postbooks-schema-demo-4.1.0/0000755000175000017500000000000012223754366015203 5ustar danieldanielpostbooks-schema-demo-4.1.0/INSTALL.txt0000644000175000017500000000722612223754366017061 0ustar danieldanielInstalling xTuple ERP =========================================== Last Updated: February 9, 2012 Thank you for your interest in xTuple ERP: PostBooks Edition, an OSI-certified open source application from xTuple. This file provides a brief overview of the steps required to manually prepare your PostgreSQL server to run xTuple ERP: PostBooks Edition. For up-to-date instructions and full details, please visit xtuple.org and click on Docs > Admin and Setup. The easiest way to get started is to use the xTuple all-in-one installer. The xTuple installer is available for Windows, Mac, and Linux. You can download the installer from the PostBooks-installers directory on the PostBooks SourceForge page. For more advanced users who prefer not to use the PostBooks installer, the following steps will get you started: 1. Install and configure PostgreSQL 2. Create the PostgreSQL database superuser 'admin' and the group 'xtrole' $ psql -U postgres -f init.sql template0 # see init.sql below 3. Create a new PostgreSQL database $ createdb -U admin production 4. Restore one of the xTuple starter databases into it (see Starter Databases below), for example: $ pg_restore -U admin -d production quickstart.backup -v PostgreSQL Considerations ------------------------- Before you can start using the xTuple Applications, you must first have PostgreSQL installed and properly configured. Check http://www.xtuple.org/compatibility-matrix to make sure the version of PostgreSQL you are running is compatible with the version of xTuple ERP you are installing. For additional information on installing PostgreSQL, please visit http://www.postgresql.org where you will find in-depth documentation and other resources related to PostgreSQL. Installation support is also available from xTuple. To learn more about xTuple's PostgreSQL services, please visit http://www.xtuple.com/postgres. NOTE: The xTuple applications require the PostgreSQL pgcrypto module. This is used for credit card processing and storing other sensitive information. You should be sure to include the pgcrypto module when installing PostgreSQL. If you do not, you will encounter errors when running the xTuple ERP application. init.sql: Creating the admin user and xtrole group -------------------------------------------------- Run the following SQL script using either psql, pgAdmin, or some other program that allows connecting directly to a PostgreSQL database server before creating your xTuple ERP database: -- -- This script creates the group xtrole and the user admin -- CREATE GROUP xtrole; -- Create the user 'admin' with the password 'admin', -- give it permission to create databases and users, -- and place it in the xtrole group. CREATE USER admin WITH PASSWORD 'admin' CREATEDB CREATEUSER IN GROUP xtrole; -- End of init.sql NOTE: Since the default password for the user admin is 'admin', you'll want to change it immediately. Starter databases ----------------- xTuple supplies three different databases to help get you started: * empty.backup This is an empty database with no data, but with all the tables and structures created. * quickstart.backup This database contains a basic Chart of Accounts and also the Account Assignments required to run the full range of transactions. * demo.backup This database contains a suite of sample data built on top of the 'quickstart' database ----------------- Again, thank you for your interest in xTuple ERP. You can find more information, full documentation, discussion forums, support options, training opportunities, and commercial offerings at http://www.xtuple.org postbooks-schema-demo-4.1.0/LICENSE.txt0000644000175000017500000006724412223754366017043 0ustar danieldanielCommon Public Attribution License Version 1.0 (CPAL) 1. Definitions 1.0.1 "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. 1.1 "Contributor" means each entity that creates or contributes to the creation of Modifications. 1.2 "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. 1.3 "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. 1.4 "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5 "Executable" means Covered Code in any form other than Source Code. 1.6 "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. 1.7 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.8 "License" means this document. 1.8.1 "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. 1.9 "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. 1.10 "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. 1.10.1 "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. 1.11 "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. 1.12 "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. Source Code License. 2.1 The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. 2.2 Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. 3. Distribution Obligations. 3.1 Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. 3.2 Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. 3.3 Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. 3.4 Intellectual Property Matters (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. 3.5 Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. 3.6 Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer, Original Developer or any Contributor. You hereby agree to indemnify the Initial Developer, Original Developer and every Contributor for any liability incurred by the Initial Developer, Original Developer or such Contributor as a result of any such terms You offer. 3.7 Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. 4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. 6. Versions of the License. 6.1 New Versions. Socialtext, Inc. ("Socialtext") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. 6.2 Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Socialtext. No one other than Socialtext has the right to modify the terms applicable to Covered Code created under this License. 6.3 Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Socialtext", "CPAL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the CPAL. (Filling in the name of the Initial Developer, Original Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) 7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER, ORIGINAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 8. TERMINATION. 8.1 This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 8.2 If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer, Original Developer or a Contributor (the Initial Developer, Original Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. 8.3 If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. 8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ORIGINAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. 10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. 11. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by Virginia law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of Virginia, with venue lying in Norfolk, Virginia, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. 12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer, Original Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer, Original Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. 13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the Covered Code as Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the CPAL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. 14. ADDITIONAL TERM: ATTRIBUTION (a) As a modest attribution to the organizer of the development of the Original Code ("Original Developer"), in the hope that its promotional value may help justify the time, money and effort invested in writing the Original Code, the Original Developer may include in Exhibit B ("Attribution Information") a requirement that each time an Executable and Source Code or a Larger Work is launched or initially run (which includes initiating a session), a prominent display of the Original Developer's Attribution Information (as defined below) must occur on the graphic user interface employed by the end user to access such Covered Code (which may include display on a splash screen), if any. The size of the graphic image should be consistent with the size of the other elements of the Attribution Information. If the access by the end user to the Executable and Source Code does not create a graphic user interface for access to the Covered Code, this obligation shall not apply. If the Original Code displays such Attribution Information in a particular form (such as in the form of a splash screen, notice at login, an "about" display, or dedicated attribution area on user interface screens), continued use of such form for that Attribution Information is one way of meeting this requirement for notice. (b) Attribution information may only include a copyright notice, a brief phrase, graphic image and a URL ("Attribution Information") and is subject to the Attribution Limits as defined below. For these purposes, prominent shall mean display for sufficient duration to give reasonable notice to the user of the identity of the Original Developer and that if You include Attribution Information or similar information for other parties, You must ensure that the Attribution Information for the Original Developer shall be no less prominent than such Attribution Information or similar information for the other party. For greater certainty, the Original Developer may choose to specify in Exhibit B below that the above attribution requirement only applies to an Executable and Source Code resulting from the Original Code or any Modification, but not a Larger Work. The intent is to provide for reasonably modest attribution, therefore the Original Developer cannot require that You display, at any time, more than the following information as Attribution Information: (a) a copyright notice including the name of the Original Developer; (b) a word or one phrase (not exceeding 10 words); (c) one graphic image provided by the Original Developer; and (d) a URL (collectively, the "Attribution Limits"). (c) If Exhibit B does not include any Attribution Information, then there are no requirements for You to display any Attribution Information of the Original Developer. (d) You acknowledge that all trademarks, service marks and/or trade names contained within the Attribution Information distributed with the Covered Code are the exclusive property of their owners and may only be used with the permission of their owners, or under circumstances otherwise permitted by law or as expressly set out in this License. 15. ADDITIONAL TERM: NETWORK USE. The term "External Deployment" means the use, distribution, or communication of the Original Code or Modifications in any way such that the Original Code or Modifications may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Code or Modifications as a distribution under section 3.1 and make Source Code available under Section 3.2. EXHIBIT A. Common Public Attribution License Version 1.0. The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.xTuple.com/CPAL. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is xTuple ERP: PostBooks Edition The Original Developer is not the Initial Developer and is __________. If left blank, the Original Developer is the Initial Developer. The Initial Developer of the Original Code is OpenMFG, LLC, d/b/a xTuple. All portions of the code written by xTuple are Copyright (c) 1999-2012 OpenMFG, LLC, d/b/a xTuple. All Rights Reserved. Contributor(s): ______________________. Alternatively, the contents of this file may be used under the terms of the xTuple End-User License Agreeement (the xTuple License), in which case the provisions of the xTuple License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the xTuple License and not to allow others to use your version of this file under the CPAL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the xTuple License. If you do not delete the provisions above, a recipient may use your version of this file under either the CPAL or the xTuple License. [NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] EXHIBIT B. Attribution Information Attribution Copyright Notice: Copyright (c) 1999-2012 by OpenMFG, LLC, d/b/a xTuple Attribution Phrase (not exceeding 10 words): Powered by xTuple ERP: PostBooks Edition Attribution URL: www.xtuple.org (to be included in the "Community" menu of the application if possible) Graphic Image as provided in the Covered Code, if any. (online at www.xtuple.com/poweredby) Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work which combines Covered Code or portions thereof with code not governed by the terms of the CPAL. postbooks-schema-demo-4.1.0/init.sql0000644000175000017500000000062612223754366016673 0ustar danieldaniel-- -- This script creates the group xtrole and the user admin -- -- -- Create the xtrole group -- CREATE GROUP xtrole; -- -- Create the admin user with createdb and createuser -- permissions. Place the user in the xtrole group and -- set the password to the default of admin. -- CREATE USER admin WITH PASSWORD 'admin' CREATEDB CREATEUSER IN GROUP xtrole; postbooks-schema-demo-4.1.0/README_Databases.txt0000644000175000017500000000351112223754366020650 0ustar danieldanielPostBooks Databases Overview xTuple ERP ==================================== Last Updated: August 9, 2010 Thank you for your interest in PostBooks, an OSI-certified open source application from xTuple. This file provides a brief overview of the steps required to manually prepare your PostgreSQL server to run a PostBooks database. Of course, the easiest way to get started is to use the xTuple all- in-one installer. The xTuple installer is available for Windows, Mac, and Linux. You can download the installer from the PostBooks-installers directory on the PostBooks SourceForge page. The all-in-one installer will install both the xTuple client and the xTuple databases--as well as other tools you can use for database administration. Using the installer is the easiest way to ensure your xTuple installation will work for you "out of the box." For more advanced users who prefer not to use the PostBooks installer, the following steps will get you started: 1. Install and configure PostgreSQL. (For more information, see the INSTALL.txt file.) 2. Run the 'init.sql' script to create the user 'admin' and the group 'xtrole'. (For more information, see the INSTALL.txt file.) 3. Create a new PostgreSQL Database and then restore the xTuple Database schema into it. There are several starter schema to choose from, including the following: * empty.backup - This is an empty database with no data * quickstart.backup - This database contains a basic Chart of Accounts and also the Account Assignments required to run the full range of transactions * demo.backup - This database (if available) contains a suite of sample data built on top of the 'quickstart' database To learn more about loading the xTuple Database schema, please see the INSTALL.txt file. 4. Once a database has been loaded, simply connect to it using your PostBooks client application.postbooks-schema-demo-4.1.0/ReleaseNotes_4-1-0.txt0000644000175000017500000001774212223754366021066 0ustar danieldanielRelease Notes xTuple ERP Version 4.1.0 August 8, 2013 ================================== This is the final release of version 4.1.0. Thanks to all in the community who made this release possible! You will find several new features and bug fixes in this release. One note: The automatic update feature for the Desktop client has been removed from 4.1.0. It will be reintroduced in a future xTuple release. Information about compatibility issues related to this software version can be found on the xTuple Compatibility Matrix at the following address: www.xtuple.org/compatibility-matrix. ================================== The following features and bug fixes have been added to the applications since 4.1.0RC. Additional detail for each item listed below may be found on our community website under the Issue Tracker. Bug Fixes: * Expired registration key crashes the application on login [20098] * Selecting to open a "Time Clock Summary" screen displays "Could Not Create Form" error dialog [20508] * "Production Time Clock By Employee" screen does not filters the production time clock entries according to the selected Employee [20509] * It is not possible to create a new Work Order time clock entry from "Production Time Clock By Work Order" screen [20510] * Fold username to lowercase [20702] * Remove non-usable P/O reservations code [20772] * Unable to change the bank account of a sales order set in the "Cash" section under the "Payment" tab [20779] * Disallow mismatched client versions option is not honored [20811] * Time Clock Summary form is missing [20916] * Shifts are being duplicated [20917 ================================== The following features and bug fixes have been added to the applications since 4.1.0Beta2. Additional detail for each item listed below may be found on our community website under the Issue Tracker. New Features: * Substitute items on a sales order [19354] * Add "Titles" to Customer List [20578] * Checks and Cash payment from the CC payment tab in Sales Order Entry [20621] * Create SO Link PO (adjust qty for PO) [20628] * Item analyzation [20663] Bug Fixes: * Item Master Sorting is not working properly [16914] * Selecting to add a Bill of Material to a new item generates a DB log error [17345] * Set all get...id() stored procedures Volatitlity to STABLE [17998] * Contact screen proportionality has changed [18689] * Inconsistent behavior of "Close" button on Sales order screen [18875] * Add owner to api.contact view [19344] * Saving Filters with Class Code Matching Quantifiers Crashes xTuple [19346] * Costs not handled consistently on Quote and Sales Order [19751] * Change Sales Order header to show profit margin based on the "long 30" calculation [20001] * Expose Sales Order Item Unit Cost for visibility and editability [20003] * Revert the Sales Order Item Markup/Discount behavior to Discount only [20005] * AR Statement cannot be emailed via EDI [20222] * Duplicate Pricing Schedule Assignment does not display error [20346] * Blank "BOM Item Actual Cost" screen is displayed on selecting to edit a costing element of a Bill Of Materials Item [20427] * Check Register [20442] * BOL 3.8.4 -> 4.0.3 Upgrade [20464] * It is not possible to create a size zone with same details in different sites [20482] * It possible to Clock-In a blank operation from "Time Clock" screen [20507] * Text overlap in "Post Production" screen [20511] * Employee Code is not displayed in Production Time clock By Work Order screen [20512] * External Catalog Cross warehouse item creation [20533] * Documents are lost when converting an iQuote to an Open Sales Order [20564] * 4.0.5: "MaintainRegistrationKey" privilege is not available in Postbooks Empty database [20580] * Running Availability Screen (inconsistant) [20588] * Inventory, Utlility, Update Reoder Levels [20594] * Batch Pack List Screen ( add Pick List Batch screen) [20598] * The "purchaseOrder" dialog is displayed irrelevantly on selecting to create a Purchase Order [20602] * Pricing Schedules using scheduled date [20606] * Sort sequence on Pick tickets/Packlist [20607] * Sales Reservations report in PostBooks db [20619] * Irrelevant behavior is observed in "Adjust Inventory Value" screen [20633] * PO items do not worklike SO items during PO entry [20665] * Vendor label is missing in "Attach a Document" screen [20670] * Selecting to print "A/P Applications" screen does not displays "Doc#" label [20700] ================================== The following features and bug fixes have been added to the applications since 4.1.0Beta. Additional detail for each item listed below may be found on our community website under the Issue Tracker. New Features: * Replace "List Cost" naming with "Wholesale Price" [20002] Bug Fixes: * Currency exchange rate window does not handle localized numerics properly [10418] * Delete posted invoice before saving [18630] * Inventory update should be disabled if no item site [20043] * Running Availability print does not print all information [20153] * Picking List SO with Locations report not showing reserved qty [20174] * API Price Schedule Item Error [20223] * Pricing Schedules [20263] * Recurring creation utility bug [20277] * Site to Site transfer of fractional amount of item not set as fractional [20287] * Cost for newly created item [20299] * Error running MRP with exceptions: poitem_soitem_id does not exist [20308] * Irrelevant behavior is observed on selected to post the receipt for a PO line item [20337] * G/LSeries Report & filter [20376] * deleteitemcost(integer,integer) function uses SELECT where it should use PERFORM [20381] * Selecting to copy a Drop Ship quote does not creates drop ship enabled quote [20390] * It is possible to create duplicate records for site zone [20403] * Re-opening a quote doesn't shows the Override Price of a quote item [20417] * Make sure new installer does two-letter state abbreviations [20432] ================================== The following features and bug fixes have been added to the applications since 4.0.3. Additional detail for each item listed below may be found on our community website under the Issue Tracker. New Features: * Make updates more automatic [5837] * Substitute items on a sales order [19354] * New API for entering Physical Inventory Counts [19388] Bug Fixes: * Freight amount is calculated incorrectly for a sales order with multiple shipments [17525] * Postbooks Demo: Selecting to purge invoices generates DB log error [17779] * Selecting to post a cash receipt displays a system message [18623] * DB log error is generated on selecting to query "Update Reorder Level by Item" screen [18678] * Irrelavent behaviour is observed in "User Information" screen [18705] * Observation: Incorrect Net unit price is populated in Purchase Order item screen [18755] * DB log error is generated on selecting to query the "Return Authorization Workbench" screen [18934] * Irrelevent dialog is displayed on selecting to print Sale Types [18975] * Unable to print "Contracts" screen [18995] * API item view missing fields [19317] * API requires custinfo_shipform in order to display data [19339] * Only Show Shortages [19421] * Trial Balance Out of Balance [19583] * Item "Maximum Desired Cost" value not converted to local currency when comparing to PO Unit Price [19600] * "purgeSalesOrders" does not exist on login after 38xto400 std update [19602] * It is not possible to copy an already copied Locale [19618] * DB log error is generated on selecting to print a Sales Order created for a foreign customer [19639] * api.itemsourceprice does not include newly added public.itemsrcp columns [19651] * Profit Margin doesn't recalculate [19694] * Convert Quote to Order/Convert Quote to Invoice [19728] * Substitute items salesOrderItem Screen [19729] * List cost does not show in local currency [19756] * Performance issue with Master Schedule display after migrating to 3.8.4 and new cloud [19961] * View public.usr, locales, roundqty() affect performance of cloud db's with more users [19971] * Return Authorization automatic numbering problem [20013]postbooks-schema-demo-4.1.0/postbooks_demo-4.1.0.sql0000644000175000017500007012046112223754366021424 0ustar danieldaniel-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; -- -- Name: api; Type: SCHEMA; Schema: -; Owner: admin -- CREATE SCHEMA api; ALTER SCHEMA api OWNER TO admin; -- -- Name: fixcountry; Type: SCHEMA; Schema: -; Owner: admin -- CREATE SCHEMA fixcountry; ALTER SCHEMA fixcountry OWNER TO admin; -- -- Name: SCHEMA fixcountry; Type: COMMENT; Schema: -; Owner: admin -- COMMENT ON SCHEMA fixcountry IS 'Schema to hold contents of fixcountry'; -- -- Name: te; Type: SCHEMA; Schema: -; Owner: admin -- CREATE SCHEMA te; ALTER SCHEMA te OWNER TO admin; -- -- Name: SCHEMA te; Type: COMMENT; Schema: -; Owner: admin -- COMMENT ON SCHEMA te IS 'This file is part of the xTuple ERP: PostBooks Edition, a free and open source Enterprise Resource Planning software suite, Copyright (c) 1999-2010 by OpenMFG LLC, d/b/a xTuple. It is licensed to you under the Common Public Attribution License version 1.0, the full text of which (including xTuple-specific Exhibits) is available at www.xtuple.com/CPAL. By using this software, you agree to be bound by its terms.'; -- -- Name: xtdesktop; Type: SCHEMA; Schema: -; Owner: admin -- CREATE SCHEMA xtdesktop; ALTER SCHEMA xtdesktop OWNER TO admin; -- -- Name: SCHEMA xtdesktop; Type: COMMENT; Schema: -; Owner: admin -- COMMENT ON SCHEMA xtdesktop IS 'Schema to hold contents of xtdesktop'; -- -- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: admin -- CREATE PROCEDURAL LANGUAGE plpgsql; ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: achline; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE achline AS ( achline_checkhead_id integer, achline_batch text, achline_type text, achline_value text ); ALTER TYPE public.achline OWNER TO admin; -- -- Name: apaging; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE apaging AS ( apaging_docdate text, apaging_duedate date, apaging_ponumber text, apaging_reference text, apaging_invcnumber text, apaging_docnumber text, apaging_doctype text, apaging_vend_id integer, apaging_vend_number text, apaging_vend_name text, apaging_vend_vendtype_id integer, apaging_vendtype_code text, apaging_terms_descrip text, apaging_apopen_amount numeric, apaging_cur_val numeric, apaging_thirty_val numeric, apaging_sixty_val numeric, apaging_ninety_val numeric, apaging_plus_val numeric, apaging_total_val numeric, apaging_discdate date, apaging_disc_val numeric, apaging_discdays numeric, apaging_discprcnt numeric ); ALTER TYPE public.apaging OWNER TO admin; -- -- Name: araging; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE araging AS ( araging_docdate date, araging_duedate date, araging_ponumber text, araging_docnumber text, araging_doctype text, araging_cust_id integer, araging_cust_number text, araging_cust_name text, araging_cust_custtype_id integer, araging_custtype_code text, araging_terms_descrip text, araging_aropen_amount numeric, araging_cur_val numeric, araging_thirty_val numeric, araging_sixty_val numeric, araging_ninety_val numeric, araging_plus_val numeric, araging_total_val numeric ); ALTER TYPE public.araging OWNER TO admin; -- -- Name: bomdata; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE bomdata AS ( bomdata_bomwork_id integer, bomdata_bomwork_parent_id integer, bomdata_bomwork_level integer, bomdata_bomwork_seqnumber integer, bomdata_bomitem_id integer, bomdata_item_id integer, bomdata_item_number text, bomdata_uom_name text, bomdata_item_descrip1 text, bomdata_item_descrip2 text, bomdata_itemdescription text, bomdata_batchsize numeric, bomdata_qtyfxd numeric, bomdata_qtyper numeric, bomdata_qtyreq numeric, bomdata_scrap numeric, bomdata_createchild boolean, bomdata_issuemethod text, bomdata_effective date, bomdata_expires date, bomdata_expired boolean, bomdata_future boolean, bomdata_actunitcost numeric, bomdata_stdunitcost numeric, bomdata_actextendedcost numeric, bomdata_stdextendedcost numeric, bomdata_ecn text, bomdata_char_id integer, bomdata_value text, bomdata_notes text, bomdata_ref text ); ALTER TYPE public.bomdata OWNER TO admin; -- -- Name: checkdata; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE checkdata AS ( checkdata_page integer, checkdata_checknumber text, checkdata_checkwords text, checkdata_checkdate text, checkdata_checkamount text, checkdata_checkcurrsymbol text, checkdata_checkcurrabbr text, checkdata_checkcurrname text, checkdata_checkpayto text, checkdata_checkaddress text, checkdata_checkmemo text, checkdata_docnumber text, checkdata_docreference text, checkdata_docdate text, checkdata_docamount text, checkdata_docdiscount text, checkdata_docnetamount text ); ALTER TYPE public.checkdata OWNER TO admin; -- -- Name: cntctdup; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE cntctdup AS ( cntct_id integer, cntct_crmacct_id integer, cntct_addr_id integer, cntct_first_name text, cntct_last_name text, cntct_honorific text, cntct_initials text, cntct_active boolean, cntct_phone text, cntct_phone2 text, cntct_fax text, cntct_email text, cntct_webaddr text, cntct_notes text, cntct_title text, cntct_number text, cntct_middle text, cntct_suffix text, cntct_owner_username text, cntct_name text, crmacct_number text, crmacct_name text, addr_id integer, addr_active boolean, addr_line1 text, addr_line2 text, addr_line3 text, addr_city text, addr_state text, addr_postalcode text, addr_country text, addr_notes text, addr_number text, cntctdup_level integer ); ALTER TYPE public.cntctdup OWNER TO admin; -- -- Name: flcoldata; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE flcoldata AS ( flcoldata_column integer, flcoldata_start date, flcoldata_end date ); ALTER TYPE public.flcoldata OWNER TO admin; -- -- Name: flstmthead; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE flstmthead AS ( flstmthead_flhead_id integer, flstmthead_flcol_id integer, flstmthead_period_id integer, flstmthead_username text, flstmthead_typedescrip1 text, flstmthead_typedescrip2 text, flstmthead_flhead_name text, flstmthead_flcol_name text, flstmthead_month text, flstmthead_qtr text, flstmthead_year text, flstmthead_prmonth text, flstmthead_prqtr text, flstmthead_pryear text ); ALTER TYPE public.flstmthead OWNER TO admin; -- -- Name: flstmtitem; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE flstmtitem AS ( flstmtitem_flhead_id integer, flstmtitem_period_id integer, flstmtitem_username text, flstmtitem_order integer, flstmtitem_level integer, flstmtitem_subgrp integer, flstmtitem_type text, flstmtitem_type_id integer, flstmtitem_parent_id integer, flstmtitem_accnt_id integer, flstmtitem_name text, flstmtitem_month numeric, flstmtitem_monthdb numeric, flstmtitem_monthcr numeric, flstmtitem_monthprcnt numeric, flstmtitem_monthbudget numeric, flstmtitem_monthbudgetprcnt numeric, flstmtitem_monthbudgetdiff numeric, flstmtitem_monthbudgetdiffprcnt numeric, flstmtitem_qtr numeric, flstmtitem_qtrdb numeric, flstmtitem_qtrcr numeric, flstmtitem_qtrprcnt numeric, flstmtitem_qtrbudget numeric, flstmtitem_qtrbudgetprcnt numeric, flstmtitem_qtrbudgetdiff numeric, flstmtitem_qtrbudgetdiffprcnt numeric, flstmtitem_year numeric, flstmtitem_yeardb numeric, flstmtitem_yearcr numeric, flstmtitem_yearprcnt numeric, flstmtitem_yearbudget numeric, flstmtitem_yearbudgetprcnt numeric, flstmtitem_yearbudgetdiff numeric, flstmtitem_yearbudgetdiffprcnt numeric, flstmtitem_prmonth numeric, flstmtitem_prmonthprcnt numeric, flstmtitem_prmonthdiff numeric, flstmtitem_prmonthdiffprcnt numeric, flstmtitem_prqtr numeric, flstmtitem_prqtrprcnt numeric, flstmtitem_prqtrdiff numeric, flstmtitem_prqtrdiffprcnt numeric, flstmtitem_pryear numeric, flstmtitem_pryearprcnt numeric, flstmtitem_pryeardiff numeric, flstmtitem_pryeardiffprcnt numeric ); ALTER TYPE public.flstmtitem OWNER TO admin; -- -- Name: fltrendhead; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE fltrendhead AS ( fltrendhead_flhead_id integer, fltrendhead_username text, fltrendhead_typedescrip text, fltrendhead_flhead_name text, fltrendhead_fld1 text, fltrendhead_fld2 text, fltrendhead_fld3 text, fltrendhead_fld4 text, fltrendhead_fld5 text, fltrendhead_fld6 text, fltrendhead_fld7 text, fltrendhead_fld8 text, fltrendhead_fld9 text, fltrendhead_fld10 text, fltrendhead_fld11 text, fltrendhead_fld12 text, fltrendhead_grndttl text ); ALTER TYPE public.fltrendhead OWNER TO admin; -- -- Name: fltrenditem; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE fltrenditem AS ( fltrenditem_flhead_id integer, fltrenditem_username text, fltrenditem_order integer, fltrenditem_level integer, fltrenditem_subgrp integer, fltrenditem_type text, fltrenditem_type_id integer, fltrenditem_parent_id integer, fltrenditem_accnt_id integer, fltrenditem_name text, fltrenditem_fld1 text, fltrenditem_fld2 text, fltrenditem_fld3 text, fltrenditem_fld4 text, fltrenditem_fld5 text, fltrenditem_fld6 text, fltrenditem_fld7 text, fltrenditem_fld8 text, fltrenditem_fld9 text, fltrenditem_fld10 text, fltrenditem_fld11 text, fltrenditem_fld12 text, fltrenditem_grndttl text ); ALTER TYPE public.fltrenditem OWNER TO admin; -- -- Name: freightdata; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE freightdata AS ( freightdata_schedule text, freightdata_from text, freightdata_to text, freightdata_shipvia text, freightdata_freightclass text, freightdata_weight numeric, freightdata_uom text, freightdata_price numeric, freightdata_type text, freightdata_total numeric, freightdata_currency text ); ALTER TYPE public.freightdata OWNER TO admin; -- -- Name: itemprice; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE itemprice AS ( itemprice_price numeric, itemprice_type character(1) ); ALTER TYPE public.itemprice OWNER TO admin; -- -- Name: orderitemtype; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE orderitemtype AS ( orderitem_id integer, orderitem_orderhead_type text, orderitem_orderhead_id integer, orderitem_linenumber integer, orderitem_status text, orderitem_itemsite_id integer, orderitem_scheddate date, orderitem_qty_ordered numeric, orderitem_qty_shipped numeric, orderitem_qty_received numeric, orderitem_qty_uom_id integer, orderitem_qty_invuomratio numeric, orderitem_unitcost numeric, orderitem_unitcost_curr_id integer, orderitem_freight numeric, orderitem_freight_received numeric, orderitem_freight_curr_id integer ); ALTER TYPE public.orderitemtype OWNER TO admin; -- -- Name: ordhead; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE ordhead AS ( orderhead_id integer, orderhead_type text, orderhead_number text, orderhead_status text, orderhead_orderdate date, orderhead_linecount integer, orderhead_from_id integer, orderhead_from text, orderhead_to_id integer, orderhead_to text, orderhead_curr_id integer, orderhead_agent_username text, orderhead_shipvia text ); ALTER TYPE public.ordhead OWNER TO admin; -- -- Name: orditem; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE orditem AS ( orderitem_id integer, orderitem_orderhead_type text, orderitem_orderhead_id integer, orderitem_linenumber integer, orderitem_status text, orderitem_itemsite_id integer, orderitem_scheddate date, orderitem_qty_ordered numeric, orderitem_qty_shipped numeric, orderitem_qty_received numeric, orderitem_qty_uom_id integer, orderitem_qty_invuomratio numeric, orderitem_unitcost numeric, orderitem_unitcost_curr_id integer, orderitem_freight numeric, orderitem_freight_received numeric, orderitem_freight_curr_id integer ); ALTER TYPE public.orditem OWNER TO admin; -- -- Name: reordlvl; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE reordlvl AS ( reordlvl_itemsite_id integer, reordlvl_item_id integer, reordlvl_warehous_code text, reordlvl_item_number text, reordlvl_item_descrip text, reordlvl_leadtime integer, reordlvl_daysofstock integer, reordlvl_curr_level numeric, reordlvl_total_days numeric, reordlvl_total_usage numeric, reordlvl_calc_level integer ); ALTER TYPE public.reordlvl OWNER TO admin; -- -- Name: seqiss; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE seqiss AS ( seqiss_number integer, seqiss_time timestamp with time zone ); ALTER TYPE public.seqiss OWNER TO admin; -- -- Name: subtax; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE subtax AS ( subtax_taxcode_id integer, subtax_taxcode_code text, subtax_taxcode_descrip text, subtax_taxcode_level integer ); ALTER TYPE public.subtax OWNER TO admin; -- -- Name: taxassign; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE taxassign AS ( taxassign_taxzone_id integer, taxassign_taxtype_id integer, taxassign_level integer, taxassign_zone_code text, taxassign_type_descrip text, taxassign_taxclass_code text, taxassign_taxclass_sequence integer ); ALTER TYPE public.taxassign OWNER TO admin; -- -- Name: taxdetail; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE taxdetail AS ( taxdetail_tax_id integer, taxdetail_tax_code text, taxdetail_tax_descrip text, taxdetail_tax_basis_tax_id integer, taxdetail_taxrate_percent numeric(10,6), taxdetail_taxrate_amount numeric(16,2), taxdetail_level integer, taxdetail_taxclass_id integer, taxdetail_taxclass_code text, taxdetail_taxclass_sequence integer, taxdetail_tax numeric(16,6), taxdetail_curr_id integer, taxdetail_curr_abbr text ); ALTER TYPE public.taxdetail OWNER TO admin; -- -- Name: wodata; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE wodata AS ( wodata_id integer, wodata_id_type integer, wodata_number integer, wodata_subnumber integer, wodata_itemnumber text, wodata_descrip text, wodata_status character(1), wodata_startdate date, wodata_duedate date, wodata_adhoc boolean, wodata_itemsite_id integer, wodata_qoh numeric, wodata_short numeric, wodata_qtyper numeric, wodata_qtyiss numeric, wodata_qtyrcv numeric, wodata_qtyordreq numeric, wodata_qtyuom text, wodata_scrap numeric, wodata_setup numeric, wodata_run numeric, wodata_notes text, wodata_ref text, wodata_level integer ); ALTER TYPE public.wodata OWNER TO admin; -- -- Name: woinvav; Type: TYPE; Schema: public; Owner: admin -- CREATE TYPE woinvav AS ( woinvav_itemsite_id integer, woinvav_womatl_id integer, woinvav_type character(1), woinvav_item_wo_number text, woinvav_descrip text, woinvav_uomname text, woinvav_qoh numeric, woinvav_balance numeric, woinvav_allocated numeric, woinvav_ordered numeric, woinvav_woavail numeric, woinvav_totalavail numeric, woinvav_reorderlevel numeric, woinvav_level integer ); ALTER TYPE public.woinvav OWNER TO admin; SET search_path = api, pg_catalog; -- -- Name: getcustnumberfrominfo(text, text, text, text, text, boolean); Type: FUNCTION; Schema: api; Owner: admin -- CREATE FUNCTION getcustnumberfrominfo(text, text, text, text, text, boolean) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _email TEXT := COALESCE(UPPER($1), ''); _company TEXT := COALESCE(UPPER($2), ''); _first TEXT := COALESCE(UPPER($3), ''); _last TEXT := COALESCE(UPPER($4), ''); _fullname TEXT := COALESCE(UPPER($5), TRIM(_first || ' ' || _last)); _generate BOOLEAN := COALESCE($6, FALSE); _counter INTEGER; _custcount INTEGER := 0; _custnumber TEXT; _candidate TEXT := ''; _loopmax INTEGER := 0; _minlength INTEGER := 5; _maxlength INTEGER := 8; _numformat TEXT := ''; _testme TEXT; BEGIN IF (_email != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE (UPPER(cntct_email)=_email) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_company != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo WHERE (UPPER(cust_name)=_company) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_fullname = '' AND (_first != '' OR _last != '')) THEN _fullname := TRIM(_first || ' ' || _last); END IF; IF (_custcount <= 0 AND _fullname != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo WHERE (UPPER(cust_name)=_fullname) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_custcount > 1) THEN RAISE EXCEPTION 'Found % possible Customers for % and % and %', _custcount, _email, _company, _fullname; END IF; IF (_custcount <= 0 AND _generate) THEN IF (_maxlength < _minlength) THEN RAISE EXCEPTION 'Fix getCustNumberFromInfo: max length < min length'; END IF; IF (_company != '') THEN _candidate := _company; ELSIF (_email != '') THEN _candidate := SUBSTRING(_email FOR POSITION('@' IN _email) - 1); ELSIF (_last != '') THEN _candidate := _last; IF (_first != '') THEN _candidate := _candidate || _first; END IF; ELSIF (_fullname != '' AND (POSITION(' ' IN _fullname) > 0)) THEN _candidate := SUBSTRING(_fullname FROM POSITION(' ' IN _fullname) + 1) || SUBSTRING(_fullname FOR POSITION(' ' IN _fullname) - 1); END IF; WHILE (POSITION(' ' IN _candidate) > 0) LOOP _candidate := SUBSTRING(_candidate FOR POSITION(' ' IN _candidate) - 1) || SUBSTRING(_candidate FROM POSITION(' ' IN _candidate) + 1); END LOOP; FOR _counter IN _minlength.._maxlength LOOP _testme := SUBSTRING(_candidate FOR _counter); IF (NOT EXISTS(SELECT cust_number FROM custinfo WHERE (cust_number=_testme))) THEN _custnumber := _testme; EXIT; END IF; END LOOP; IF (_custnumber IS NULL OR _custnumber = '') THEN IF (LENGTH(_candidate) < _minlength) THEN _minlength := LENGTH(_candidate); END IF; FOR _counter IN _minlength.._maxlength LOOP _loopmax := _loopmax * 10 + 9; _numformat := _numformat || '0'; END LOOP; FOR _counter IN 1.._loopmax LOOP _testme := SUBSTRING(_candidate FOR _minlength) || TRIM(TO_CHAR(_counter, _numformat)); IF (NOT EXISTS(SELECT cust_number FROM custinfo WHERE (cust_number=_testme))) THEN _custnumber := _testme; EXIT; END IF; END LOOP; END IF; IF (_custnumber IS NULL OR _custnumber = '') THEN RAISE EXCEPTION 'Could not generate a new Customer Number'; END IF; END IF; IF (_custnumber IS NULL OR _custnumber = '') THEN RAISE EXCEPTION 'Could not find Customer Number for % and % and %', _email, _company, _fullname; END IF; RETURN _custnumber; END; $_$; ALTER FUNCTION api.getcustnumberfrominfo(text, text, text, text, text, boolean) OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: formatlocationname(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatlocationname(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _name TEXT; _r RECORD; BEGIN SELECT location_aisle, location_rack, location_bin, location_name INTO _r FROM location WHERE (location_id=pLocationid); IF (FOUND) THEN IF (_r.location_aisle IS NOT NULL) THEN _name := _r.location_aisle; ELSE _name := ''; END IF; IF (_r.location_rack IS NOT NULL) THEN _name := (_name || _r.location_rack); END IF; IF (_r.location_bin IS NOT NULL) THEN _name := (_name || _r.location_bin); END IF; IF (_r.location_name IS NOT NULL) THEN _name := (_name || _r.location_name); END IF; RETURN _name; ELSE RETURN 'N/A'; END IF; END; $_$; ALTER FUNCTION public.formatlocationname(integer) OWNER TO admin; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name: cntslip; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cntslip ( cntslip_id integer DEFAULT nextval(('"cntslip_cntslip_id_seq"'::text)::regclass) NOT NULL, cntslip_cnttag_id integer, cntslip_entered timestamp with time zone, cntslip_posted boolean, cntslip_number text, cntslip_qty numeric(18,6), cntslip_comments text, cntslip_location_id integer, cntslip_lotserial text, cntslip_lotserial_expiration date, cntslip_lotserial_warrpurc date, cntslip_username text ); ALTER TABLE public.cntslip OWNER TO admin; -- -- Name: TABLE cntslip; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cntslip IS 'Count Slip information'; -- -- Name: invcnt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invcnt ( invcnt_id integer DEFAULT nextval(('invcnt_invcnt_id_seq'::text)::regclass) NOT NULL, invcnt_itemsite_id integer, invcnt_tagdate timestamp with time zone, invcnt_cntdate timestamp with time zone, invcnt_qoh_before numeric(18,6), invcnt_qoh_after numeric(18,6), invcnt_matcost numeric(16,6), invcnt_posted boolean, invcnt_postdate timestamp with time zone, invcnt_comments text, invcnt_priority boolean, invcnt_tagnumber text, invcnt_invhist_id integer, invcnt_location_id integer, invcnt_cnt_username text, invcnt_post_username text, invcnt_tag_username text ); ALTER TABLE public.invcnt OWNER TO admin; -- -- Name: TABLE invcnt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE invcnt IS 'Count Tag information'; -- -- Name: item; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE item ( item_id integer DEFAULT nextval(('item_item_id_seq'::text)::regclass) NOT NULL, item_number text NOT NULL, item_descrip1 text NOT NULL, item_descrip2 text NOT NULL, item_classcode_id integer NOT NULL, item_picklist boolean DEFAULT true NOT NULL, item_comments text, item_sold boolean NOT NULL, item_fractional boolean NOT NULL, item_active boolean NOT NULL, item_type character(1) DEFAULT 'R'::bpchar NOT NULL, item_prodweight numeric(16,2) DEFAULT 0 NOT NULL, item_packweight numeric(16,2) DEFAULT 0 NOT NULL, item_prodcat_id integer NOT NULL, item_exclusive boolean DEFAULT false NOT NULL, item_listprice numeric(16,4) NOT NULL, item_config boolean DEFAULT false, item_extdescrip text, item_upccode text, item_maxcost numeric(16,6) DEFAULT 0 NOT NULL, item_inv_uom_id integer NOT NULL, item_price_uom_id integer NOT NULL, item_warrdays integer DEFAULT 0, item_freightclass_id integer, item_tax_recoverable boolean DEFAULT false NOT NULL, item_listcost numeric(16,6) DEFAULT 0.0 NOT NULL, CONSTRAINT item_item_number_check CHECK ((item_number <> ''::text)), CONSTRAINT item_item_type_check CHECK (((((((((((((item_type = 'P'::bpchar) OR (item_type = 'M'::bpchar)) OR (item_type = 'F'::bpchar)) OR (item_type = 'O'::bpchar)) OR (item_type = 'R'::bpchar)) OR (item_type = 'S'::bpchar)) OR (item_type = 'T'::bpchar)) OR (item_type = 'B'::bpchar)) OR (item_type = 'L'::bpchar)) OR (item_type = 'Y'::bpchar)) OR (item_type = 'C'::bpchar)) OR (item_type = 'K'::bpchar))), CONSTRAINT item_sold_check CHECK ((NOT (item_sold AND (item_prodcat_id = (-1))))) ); ALTER TABLE public.item OWNER TO admin; -- -- Name: TABLE item; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE item IS 'Item information'; -- -- Name: COLUMN item.item_maxcost; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN item.item_maxcost IS 'Maximum cost for item. Used to constrain purchase order price.'; -- -- Name: COLUMN item.item_listcost; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN item.item_listcost IS 'List cost for item. Basis for markup pricing.'; -- -- Name: itemsite; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemsite ( itemsite_id integer DEFAULT nextval(('itemsite_itemsite_id_seq'::text)::regclass) NOT NULL, itemsite_item_id integer NOT NULL, itemsite_warehous_id integer, itemsite_qtyonhand numeric(18,6) NOT NULL, itemsite_reorderlevel numeric(18,6) NOT NULL, itemsite_ordertoqty numeric(18,6) NOT NULL, itemsite_cyclecountfreq integer NOT NULL, itemsite_datelastcount date, itemsite_datelastused date, itemsite_loccntrl boolean NOT NULL, itemsite_safetystock numeric(18,6) NOT NULL, itemsite_minordqty numeric(18,6) NOT NULL, itemsite_multordqty numeric(18,6) NOT NULL, itemsite_leadtime integer NOT NULL, itemsite_abcclass character(1), itemsite_issuemethod character(1), itemsite_controlmethod character(1), itemsite_active boolean NOT NULL, itemsite_plancode_id integer NOT NULL, itemsite_costcat_id integer NOT NULL, itemsite_eventfence integer NOT NULL, itemsite_sold boolean NOT NULL, itemsite_stocked boolean NOT NULL, itemsite_freeze boolean DEFAULT false NOT NULL, itemsite_location_id integer NOT NULL, itemsite_useparams boolean NOT NULL, itemsite_useparamsmanual boolean NOT NULL, itemsite_soldranking integer DEFAULT 1, itemsite_createpr boolean, itemsite_location text, itemsite_location_comments text, itemsite_notes text, itemsite_perishable boolean NOT NULL, itemsite_nnqoh numeric(18,6) DEFAULT 0 NOT NULL, itemsite_autoabcclass boolean NOT NULL, itemsite_ordergroup integer DEFAULT 1 NOT NULL, itemsite_disallowblankwip boolean DEFAULT false NOT NULL, itemsite_maxordqty numeric(18,6) DEFAULT 0.0 NOT NULL, itemsite_mps_timefence integer DEFAULT 0 NOT NULL, itemsite_createwo boolean DEFAULT false NOT NULL, itemsite_warrpurc boolean DEFAULT false NOT NULL, itemsite_autoreg boolean DEFAULT false, itemsite_costmethod character(1) NOT NULL, itemsite_value numeric(12,2) NOT NULL, itemsite_ordergroup_first boolean DEFAULT false NOT NULL, itemsite_supply_itemsite_id integer, itemsite_planning_type character(1) DEFAULT 'M'::bpchar NOT NULL, itemsite_wosupply boolean DEFAULT false NOT NULL, itemsite_posupply boolean DEFAULT false NOT NULL, itemsite_lsseq_id integer, itemsite_cosdefault character(1), itemsite_createsopr boolean DEFAULT false, itemsite_createsopo boolean DEFAULT false, itemsite_dropship boolean DEFAULT false, itemsite_recvlocation_id integer DEFAULT (-1) NOT NULL, itemsite_issuelocation_id integer DEFAULT (-1) NOT NULL, itemsite_location_dist boolean DEFAULT false NOT NULL, itemsite_recvlocation_dist boolean DEFAULT false NOT NULL, itemsite_issuelocation_dist boolean DEFAULT false NOT NULL, CONSTRAINT itemsite_itemsite_abcclass_check CHECK (((((itemsite_abcclass = 'A'::bpchar) OR (itemsite_abcclass = 'B'::bpchar)) OR (itemsite_abcclass = 'C'::bpchar)) OR (itemsite_abcclass = 'T'::bpchar))), CONSTRAINT itemsite_itemsite_controlmethod_check CHECK (((((itemsite_controlmethod = 'N'::bpchar) OR (itemsite_controlmethod = 'R'::bpchar)) OR (itemsite_controlmethod = 'S'::bpchar)) OR (itemsite_controlmethod = 'L'::bpchar))), CONSTRAINT itemsite_itemsite_costmethod_check CHECK (((((itemsite_costmethod = 'N'::bpchar) OR (itemsite_costmethod = 'A'::bpchar)) OR (itemsite_costmethod = 'S'::bpchar)) OR (itemsite_costmethod = 'J'::bpchar))), CONSTRAINT itemsite_itemsite_ordergroup_check CHECK ((itemsite_ordergroup > 0)) ); ALTER TABLE public.itemsite OWNER TO admin; -- -- Name: TABLE itemsite; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemsite IS 'Item Site information'; -- -- Name: COLUMN itemsite.itemsite_lsseq_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsite.itemsite_lsseq_id IS 'Foreign key reference for automatic lot/serial numbering'; -- -- Name: COLUMN itemsite.itemsite_createsopr; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsite.itemsite_createsopr IS 'Used to flag Sales items that create P/Rs'; -- -- Name: COLUMN itemsite.itemsite_createsopo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsite.itemsite_createsopo IS 'Used to flag Sales items that create P/Os'; -- -- Name: COLUMN itemsite.itemsite_dropship; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsite.itemsite_dropship IS 'Used to flag Sales items to drop ship'; -- -- Name: whsinfo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE whsinfo ( warehous_id integer DEFAULT nextval(('warehous_warehous_id_seq'::text)::regclass) NOT NULL, warehous_code text NOT NULL, warehous_descrip text, warehous_fob text, warehous_active boolean, warehous_counttag_prefix text, warehous_counttag_number integer, warehous_bol_prefix text, warehous_bol_number integer, warehous_shipping boolean, warehous_useslips boolean, warehous_usezones boolean, warehous_aislesize integer, warehous_aislealpha boolean, warehous_racksize integer, warehous_rackalpha boolean, warehous_binsize integer, warehous_binalpha boolean, warehous_locationsize integer, warehous_locationalpha boolean, warehous_enforcearbl boolean, warehous_default_accnt_id integer, warehous_shipping_commission numeric(8,4) DEFAULT 0.00, warehous_cntct_id integer, warehous_addr_id integer, warehous_transit boolean DEFAULT false NOT NULL, warehous_shipform_id integer, warehous_shipvia_id integer, warehous_shipcomments text, warehous_costcat_id integer, warehous_sitetype_id integer, warehous_taxzone_id integer, warehous_sequence integer DEFAULT 0 NOT NULL, CONSTRAINT whsinfo_check CHECK (((warehous_transit AND (warehous_costcat_id IS NOT NULL)) OR (NOT warehous_transit))), CONSTRAINT whsinfo_warehous_code_check CHECK ((warehous_code <> ''::text)) ); ALTER TABLE public.whsinfo OWNER TO admin; -- -- Name: TABLE whsinfo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE whsinfo IS 'Warehouse information'; SET search_path = api, pg_catalog; -- -- Name: physinvcount; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW physinvcount AS SELECT whsinfo.warehous_code AS site, item.item_number, invcnt.invcnt_tagnumber AS tag_number, cntslip.cntslip_qty AS quantity, public.formatlocationname(cntslip.cntslip_location_id) AS location, cntslip.cntslip_lotserial AS lotserial, cntslip.cntslip_comments AS comment FROM ((((public.invcnt JOIN public.itemsite ON ((itemsite.itemsite_id = invcnt.invcnt_itemsite_id))) JOIN public.whsinfo ON ((whsinfo.warehous_id = itemsite.itemsite_warehous_id))) JOIN public.item ON ((item.item_id = itemsite.itemsite_item_id))) LEFT JOIN public.cntslip ON ((cntslip.cntslip_cnttag_id = invcnt.invcnt_id))); ALTER TABLE api.physinvcount OWNER TO admin; -- -- Name: VIEW physinvcount; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW physinvcount IS 'Physical Inventory Count Tag and Slip'; -- -- Name: insertphysinvcount(physinvcount); Type: FUNCTION; Schema: api; Owner: admin -- CREATE FUNCTION insertphysinvcount(physinvcount) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNEW ALIAS FOR $1; _itemid INTEGER; _type TEXT; _siteid INTEGER; _itemsiteid INTEGER; _controlmethod TEXT; _loccntrl BOOLEAN; _locationid INTEGER; _lsid INTEGER; _invcntid INTEGER; _cntslipid INTEGER; _result INTEGER; BEGIN -- Check Item SELECT item_id, item_type INTO _itemid, _type FROM item WHERE (item_number=UPPER(pNEW.item_number)); IF (NOT FOUND OR _type IN ('F', 'R', 'L','J')) THEN SELECT item_id, item_type INTO _itemid, _type FROM item WHERE (item_upccode=pNEW.item_number); IF (NOT FOUND OR _type IN ('F', 'R', 'L','J')) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Item % not found or invalid type', pNEW.item_number; END IF; END IF; -- Check Site SELECT warehous_id INTO _siteid FROM whsinfo WHERE (warehous_code=COALESCE(pNEW.site, (SELECT warehous_code FROM usrpref,whsinfo WHERE (usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse') AND (warehous_id=CAST(usrpref_value AS INTEGER))))); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Site % not found', pNEW.site; END IF; -- Check Itemsite SELECT itemsite_id, itemsite_controlmethod, itemsite_loccntrl INTO _itemsiteid, _controlmethod, _loccntrl FROM itemsite WHERE (itemsite_item_id=_itemid) AND (itemsite_warehous_id=_siteid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Itemsite %, % not found', pNEW.site, pNEW.item_number; END IF; IF (_controlmethod = 'N') THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Itemsite %, % not inventory control method', pNEW.site, pNEW.item_number; END IF; IF (_controlmethod IN ('L', 'S') AND COALESCE(pNEW.lotserial, '') = '') THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Itemsite %, % lot/serial controlled and lotserial not provided', pNEW.site, pNEW.item_number; END IF; IF (_controlmethod = 'S') THEN -- Check for unique serial id SELECT ls_id INTO _lsid FROM ls WHERE (ls_number=pNEW.lotserial); IF (FOUND) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Serial %, %, % not unique', pNEW.site, pNEW.item_number, pNEW.lotserial; END IF; END IF; IF (_loccntrl) THEN IF (pNEW.location IS NULL) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Itemsite %, % multi location and location not provided', pNEW.site, pNEW.item_number; ELSE -- Check Location SELECT location_id INTO _locationid FROM location WHERE (location_id=getLocationId(pNEW.site, pNEW.location)); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Location %, % not found', pNEW.site, pNEW.location; END IF; END IF; END IF; -- Create Count Tag SELECT CreateCountTag(_itemsiteid, pNEW.comment, FALSE, FALSE) INTO _invcntid; IF (_invcntid <= 0) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because CreateCountTag failed for Itemsite %, %', pNEW.site, pNEW.item_number; END IF; -- Create Count Slip INSERT INTO cntslip ( cntslip_cnttag_id, cntslip_username, cntslip_entered, cntslip_posted, cntslip_number, cntslip_qty, cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, cntslip_comments ) VALUES ( _invcntid, getEffectiveXtUser(), CURRENT_TIMESTAMP, FALSE, 'N/A', pNEW.quantity, COALESCE(_locationid, -1), pNEW.lotserial, NULL, NULL, pNEW.comment ) RETURNING cntslip_id INTO _cntslipid; -- Post Count Slip SELECT postCountSlip(_cntslipid) INTO _result; IF (_result < 0) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because postCountSlip failed for Itemsite %, %, %', pNEW.site, pNEW.item_number, _result; END IF; RETURN TRUE; END; $_$; ALTER FUNCTION api.insertphysinvcount(physinvcount) OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: basecurrid(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION basecurrid() RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE returnVal INTEGER; BEGIN SELECT curr_id INTO returnVal FROM curr_symbol WHERE curr_base = TRUE; IF NOT FOUND THEN RAISE EXCEPTION 'No base currency found'; END IF; RETURN returnVal; END; $$; ALTER FUNCTION public.basecurrid() OWNER TO admin; -- -- Name: formatglaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatglaccount(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntid ALIAS FOR $1; _accnt RECORD; BEGIN SELECT COALESCE(accnt_company, '') AS accnt_company, COALESCE(accnt_profit, '') AS accnt_profit, accnt_number, COALESCE(accnt_sub, '') AS accnt_sub INTO _accnt FROM accnt WHERE (accnt_id=pAccntid); IF (NOT FOUND) THEN RETURN 'Error'; END IF; RETURN formatGlAccount(_accnt.accnt_company, _accnt.accnt_profit, _accnt.accnt_number, _accnt.accnt_sub); END; $_$; ALTER FUNCTION public.formatglaccount(integer) OWNER TO admin; -- -- Name: formatsolinenumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatsolinenumber(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; _r RECORD; BEGIN SELECT coitem_linenumber, coitem_subnumber INTO _r FROM coitem WHERE(coitem_id=pSoitemid); IF(NOT FOUND) THEN RETURN NULL; END IF; IF(COALESCE(_r.coitem_subnumber, 0) > 0) THEN RETURN _r.coitem_linenumber || '.' || _r.coitem_subnumber; END IF; RETURN _r.coitem_linenumber; END; $_$; ALTER FUNCTION public.formatsolinenumber(integer) OWNER TO admin; -- -- Name: geteffectivextuser(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION geteffectivextuser() RETURNS text LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN /* The default return value of this function is simply the user currently connected. Overload this function from another schema to implement specific user handling from an external application that uses connection pooling. Use setEffectiveXtUser(text) to create a temporary table that inserts user data that can in turn be used as a lookup reference for an over loaded version of this function like so: SELECT effective_value FROM effective_user WHERE effective_key = 'username' */ RETURN CURRENT_USER; END; $$; ALTER FUNCTION public.geteffectivextuser() OWNER TO admin; -- -- Name: getitemtaxtype(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getitemtaxtype(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pTaxzoneid ALIAS FOR $2; _taxtypeid INTEGER; BEGIN SELECT itemtax_taxtype_id INTO _taxtypeid FROM itemtax WHERE ((itemtax_item_id=pItemid) AND (itemtax_taxzone_id=pTaxzoneid)); IF (NOT FOUND) THEN SELECT itemtax_taxtype_id INTO _taxtypeid FROM itemtax WHERE ((itemtax_item_id=pItemid) AND (itemtax_taxzone_id IS NULL)); IF (NOT FOUND) THEN RETURN NULL; END IF; END IF; RETURN _taxtypeid; END; $_$; ALTER FUNCTION public.getitemtaxtype(integer, integer) OWNER TO admin; -- -- Name: cohead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cohead ( cohead_id integer DEFAULT nextval(('cohead_cohead_id_seq'::text)::regclass) NOT NULL, cohead_number text NOT NULL, cohead_cust_id integer NOT NULL, cohead_custponumber text, cohead_type character(1), cohead_orderdate date, cohead_warehous_id integer, cohead_shipto_id integer, cohead_shiptoname text, cohead_shiptoaddress1 text, cohead_shiptoaddress2 text, cohead_shiptoaddress3 text, cohead_shiptoaddress4 text, cohead_shiptoaddress5 text, cohead_salesrep_id integer NOT NULL, cohead_terms_id integer NOT NULL, cohead_fob text, cohead_shipvia text, cohead_shiptocity text, cohead_shiptostate text, cohead_shiptozipcode text, cohead_freight numeric(16,4) NOT NULL, cohead_misc numeric(16,4) DEFAULT 0 NOT NULL, cohead_imported boolean DEFAULT false, cohead_ordercomments text, cohead_shipcomments text, cohead_shiptophone text, cohead_shipchrg_id integer, cohead_shipform_id integer, cohead_billtoname text, cohead_billtoaddress1 text, cohead_billtoaddress2 text, cohead_billtoaddress3 text, cohead_billtocity text, cohead_billtostate text, cohead_billtozipcode text, cohead_misc_accnt_id integer, cohead_misc_descrip text, cohead_commission numeric(16,4), cohead_miscdate date, cohead_holdtype character(1), cohead_packdate date, cohead_prj_id integer, cohead_wasquote boolean DEFAULT false NOT NULL, cohead_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, cohead_shipcomplete boolean DEFAULT false NOT NULL, cohead_created timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone, cohead_creator text DEFAULT geteffectivextuser(), cohead_quote_number text, cohead_billtocountry text, cohead_shiptocountry text, cohead_curr_id integer DEFAULT basecurrid(), cohead_calcfreight boolean DEFAULT false NOT NULL, cohead_shipto_cntct_id integer, cohead_shipto_cntct_honorific text, cohead_shipto_cntct_first_name text, cohead_shipto_cntct_middle text, cohead_shipto_cntct_last_name text, cohead_shipto_cntct_suffix text, cohead_shipto_cntct_phone text, cohead_shipto_cntct_title text, cohead_shipto_cntct_fax text, cohead_shipto_cntct_email text, cohead_billto_cntct_id integer, cohead_billto_cntct_honorific text, cohead_billto_cntct_first_name text, cohead_billto_cntct_middle text, cohead_billto_cntct_last_name text, cohead_billto_cntct_suffix text, cohead_billto_cntct_phone text, cohead_billto_cntct_title text, cohead_billto_cntct_fax text, cohead_billto_cntct_email text, cohead_taxzone_id integer, cohead_taxtype_id integer, cohead_ophead_id integer, cohead_status character(1) DEFAULT 'O'::bpchar NOT NULL, cohead_saletype_id integer, cohead_shipzone_id integer, CONSTRAINT cohead_check CHECK (((cohead_misc = (0)::numeric) OR ((cohead_misc <> (0)::numeric) AND (cohead_misc_accnt_id IS NOT NULL)))), CONSTRAINT cohead_cohead_number_check CHECK ((cohead_number <> ''::text)) ); ALTER TABLE public.cohead OWNER TO admin; -- -- Name: TABLE cohead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cohead IS 'Sales Order header information'; -- -- Name: COLUMN cohead.cohead_saletype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cohead.cohead_saletype_id IS 'Associated sale type for sales order.'; -- -- Name: COLUMN cohead.cohead_shipzone_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cohead.cohead_shipzone_id IS 'Associated shipping zone for sales order.'; -- -- Name: coitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE coitem ( coitem_id integer DEFAULT nextval(('coitem_coitem_id_seq'::text)::regclass) NOT NULL, coitem_cohead_id integer, coitem_linenumber integer NOT NULL, coitem_itemsite_id integer, coitem_status character(1), coitem_scheddate date, coitem_promdate date, coitem_qtyord numeric(18,6) NOT NULL, coitem_unitcost numeric(16,6) NOT NULL, coitem_price numeric(16,4) NOT NULL, coitem_custprice numeric(16,4) NOT NULL, coitem_qtyshipped numeric(18,6) NOT NULL, coitem_order_id integer, coitem_memo text, coitem_imported boolean DEFAULT false, coitem_qtyreturned numeric(18,6), coitem_closedate timestamp with time zone, coitem_custpn text, coitem_order_type character(1), coitem_close_username text, coitem_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, coitem_substitute_item_id integer, coitem_created timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone, coitem_creator text DEFAULT geteffectivextuser(), coitem_prcost numeric(16,6), coitem_qty_uom_id integer NOT NULL, coitem_qty_invuomratio numeric(20,10) NOT NULL, coitem_price_uom_id integer NOT NULL, coitem_price_invuomratio numeric(20,10) NOT NULL, coitem_warranty boolean DEFAULT false NOT NULL, coitem_cos_accnt_id integer, coitem_qtyreserved numeric(18,6) DEFAULT 0.0 NOT NULL, coitem_subnumber integer DEFAULT 0 NOT NULL, coitem_firm boolean DEFAULT false NOT NULL, coitem_taxtype_id integer, coitem_rev_accnt_id integer, coitem_pricemode character(1) DEFAULT 'D'::bpchar NOT NULL, CONSTRAINT coitem_coitem_status_check CHECK ((((coitem_status = 'O'::bpchar) OR (coitem_status = 'C'::bpchar)) OR (coitem_status = 'X'::bpchar))), CONSTRAINT valid_coitem_pricemode CHECK ((coitem_pricemode = ANY (ARRAY['D'::bpchar, 'M'::bpchar]))) ); ALTER TABLE public.coitem OWNER TO admin; -- -- Name: TABLE coitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE coitem IS 'Sales Order Line Item information'; -- -- Name: COLUMN coitem.coitem_pricemode; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN coitem.coitem_pricemode IS 'Pricing mode for sales order item. Valid values are D-discount, and M-markup'; -- -- Name: pohead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE pohead ( pohead_id integer DEFAULT nextval(('pohead_pohead_id_seq'::text)::regclass) NOT NULL, pohead_status character(1), pohead_number text NOT NULL, pohead_orderdate date, pohead_vend_id integer, pohead_fob text, pohead_shipvia text, pohead_comments text, pohead_freight numeric(16,2) DEFAULT 0, pohead_printed boolean DEFAULT false, pohead_terms_id integer, pohead_warehous_id integer, pohead_vendaddr_id integer, pohead_agent_username text, pohead_curr_id integer DEFAULT basecurrid(), pohead_saved boolean DEFAULT true NOT NULL, pohead_taxzone_id integer, pohead_taxtype_id integer, pohead_dropship boolean DEFAULT false, pohead_vend_cntct_id integer, pohead_vend_cntct_honorific text, pohead_vend_cntct_first_name text, pohead_vend_cntct_middle text, pohead_vend_cntct_last_name text, pohead_vend_cntct_suffix text, pohead_vend_cntct_phone text, pohead_vend_cntct_title text, pohead_vend_cntct_fax text, pohead_vend_cntct_email text, pohead_vendaddress1 text, pohead_vendaddress2 text, pohead_vendaddress3 text, pohead_vendcity text, pohead_vendstate text, pohead_vendzipcode text, pohead_vendcountry text, pohead_shipto_cntct_id integer, pohead_shipto_cntct_honorific text, pohead_shipto_cntct_first_name text, pohead_shipto_cntct_middle text, pohead_shipto_cntct_last_name text, pohead_shipto_cntct_suffix text, pohead_shipto_cntct_phone text, pohead_shipto_cntct_title text, pohead_shipto_cntct_fax text, pohead_shipto_cntct_email text, pohead_shiptoaddress_id integer, pohead_shiptoaddress1 text, pohead_shiptoaddress2 text, pohead_shiptoaddress3 text, pohead_shiptocity text, pohead_shiptostate text, pohead_shiptozipcode text, pohead_shiptocountry text, pohead_cohead_id integer, pohead_released date, CONSTRAINT pohead_pohead_number_check CHECK ((pohead_number <> ''::text)), CONSTRAINT pohead_pohead_status_check CHECK ((((pohead_status = 'U'::bpchar) OR (pohead_status = 'O'::bpchar)) OR (pohead_status = 'C'::bpchar))) ); ALTER TABLE public.pohead OWNER TO admin; -- -- Name: TABLE pohead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE pohead IS 'Purchase Order header information'; -- -- Name: poitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE poitem ( poitem_id integer DEFAULT nextval(('poitem_poitem_id_seq'::text)::regclass) NOT NULL, poitem_status character(1), poitem_pohead_id integer, poitem_linenumber integer, poitem_duedate date, poitem_itemsite_id integer, poitem_vend_item_descrip text, poitem_vend_uom text, poitem_invvenduomratio numeric(20,10), poitem_qty_ordered numeric(18,6) NOT NULL, poitem_qty_received numeric(18,6) DEFAULT 0.0 NOT NULL, poitem_qty_returned numeric(18,6) DEFAULT 0.0 NOT NULL, poitem_qty_vouchered numeric(18,6) DEFAULT 0.0 NOT NULL, poitem_unitprice numeric(16,6), poitem_vend_item_number text, poitem_comments text, poitem_qty_toreceive numeric(18,6), poitem_expcat_id integer, poitem_itemsrc_id integer, poitem_freight numeric(16,4) DEFAULT 0.0 NOT NULL, poitem_freight_received numeric(16,4) DEFAULT 0.0 NOT NULL, poitem_freight_vouchered numeric(16,4) DEFAULT 0.0 NOT NULL, poitem_prj_id integer, poitem_stdcost numeric(16,6), poitem_bom_rev_id integer, poitem_boo_rev_id integer, poitem_manuf_name text, poitem_manuf_item_number text, poitem_manuf_item_descrip text, poitem_taxtype_id integer, poitem_tax_recoverable boolean DEFAULT true NOT NULL, poitem_rlsd_duedate date, poitem_order_id integer, poitem_order_type character(1), CONSTRAINT poitem_poitem_status_check CHECK ((((poitem_status = 'U'::bpchar) OR (poitem_status = 'O'::bpchar)) OR (poitem_status = 'C'::bpchar))) ); ALTER TABLE public.poitem OWNER TO admin; -- -- Name: TABLE poitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE poitem IS 'Purchase Order Line Item information'; -- -- Name: taxtype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE taxtype ( taxtype_id integer NOT NULL, taxtype_name text NOT NULL, taxtype_descrip text, taxtype_sys boolean DEFAULT false NOT NULL, CONSTRAINT taxtype_taxtype_name_check CHECK ((taxtype_name <> ''::text)) ); ALTER TABLE public.taxtype OWNER TO admin; -- -- Name: TABLE taxtype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE taxtype IS 'The list of Tax Types'; -- -- Name: uom; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE uom ( uom_id integer NOT NULL, uom_name text NOT NULL, uom_descrip text, uom_item_weight boolean DEFAULT false NOT NULL, CONSTRAINT uom_uom_name_check CHECK ((uom_name <> ''::text)) ); ALTER TABLE public.uom OWNER TO admin; -- -- Name: TABLE uom; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE uom IS 'Unit of Measure information'; SET search_path = api, pg_catalog; -- -- Name: salesline; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW salesline AS SELECT (cohead.cohead_number)::character varying AS order_number, (public.formatsolinenumber(coitem.coitem_id))::character varying AS line_number, l.item_number, coitem.coitem_custpn AS customer_pn, s.item_number AS substitute_for, whsinfo.warehous_code AS sold_from_site, coitem.coitem_status AS status, coitem.coitem_qtyord AS qty_ordered, q.uom_name AS qty_uom, coitem.coitem_price AS net_unit_price, p.uom_name AS price_uom, coitem.coitem_scheddate AS scheduled_date, coitem.coitem_promdate AS promise_date, coitem.coitem_warranty AS warranty, COALESCE((SELECT taxtype.taxtype_name FROM public.taxtype WHERE (taxtype.taxtype_id = public.getitemtaxtype(l.item_id, cohead.cohead_taxzone_id))), 'None'::text) AS tax_type, CASE WHEN (coitem.coitem_price = (0)::numeric) THEN '100'::text WHEN (coitem.coitem_custprice = (0)::numeric) THEN 'N/A'::text ELSE (round((((1)::numeric - (coitem.coitem_price / coitem.coitem_custprice)) * (100)::numeric), 4))::text END AS discount_pct_from_list, CASE WHEN (coitem.coitem_order_id = (-1)) THEN false ELSE true END AS create_order, CASE WHEN (coitem.coitem_order_id = (-1)) THEN ''::text ELSE ((pohead.pohead_number || '-'::text) || poitem.poitem_linenumber) END AS create_po, coitem.coitem_prcost AS overwrite_po_price, coitem.coitem_memo AS notes, CASE WHEN (coitem.coitem_cos_accnt_id IS NOT NULL) THEN public.formatglaccount(coitem.coitem_cos_accnt_id) ELSE NULL::text END AS alternate_cos_account, CASE WHEN (coitem.coitem_rev_accnt_id IS NOT NULL) THEN public.formatglaccount(coitem.coitem_rev_accnt_id) ELSE NULL::text END AS alternate_rev_account FROM public.cohead, (((public.coitem LEFT JOIN public.itemsite isb ON ((coitem.coitem_substitute_item_id = isb.itemsite_id))) LEFT JOIN public.item s ON ((isb.itemsite_item_id = s.item_id))) LEFT JOIN (public.poitem JOIN public.pohead ON ((poitem.poitem_pohead_id = pohead.pohead_id))) ON ((poitem.poitem_id = coitem.coitem_order_id))), public.itemsite il, public.item l, public.whsinfo, public.uom q, public.uom p WHERE ((((((cohead.cohead_id = coitem.coitem_cohead_id) AND (coitem.coitem_itemsite_id = il.itemsite_id)) AND (il.itemsite_item_id = l.item_id)) AND (il.itemsite_warehous_id = whsinfo.warehous_id)) AND (coitem.coitem_qty_uom_id = q.uom_id)) AND (coitem.coitem_price_uom_id = p.uom_id)) ORDER BY cohead.cohead_number, coitem.coitem_linenumber, coitem.coitem_subnumber; ALTER TABLE api.salesline OWNER TO admin; -- -- Name: VIEW salesline; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW salesline IS 'Sales Order Line Item'; -- -- Name: insertsalesline(salesline); Type: FUNCTION; Schema: api; Owner: admin -- CREATE FUNCTION insertsalesline(salesline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNEW ALIAS FOR $1; _r RECORD; BEGIN IF (NOT EXISTS (SELECT cohead_id FROM cohead WHERE cohead_number=pNEW.order_number)) THEN RAISE EXCEPTION 'Function insertSalesLine failed because Sales Order % not found', pNEW.order_number; END IF; IF (NOT EXISTS (SELECT item_id FROM item WHERE item_number=pNEW.item_number)) THEN RAISE EXCEPTION 'Function insertSalesLine failed because Item Number % not found', pNEW.item_number; END IF; SELECT * INTO _r FROM cohead, itemsite, item, whsinfo WHERE ((cohead_number=pNEW.order_number) AND (itemsite_warehous_id=warehous_id AND (itemsite_item_id=item_id) AND (itemsite_active) AND (item_number=pNEW.item_number) AND (warehous_active) AND (warehous_id=COALESCE(getWarehousId(pNEW.sold_from_site,'ALL'),cohead_warehous_id,fetchprefwarehousid())))); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertSalesLine failed with unknown failure to retrieve Sales Order'; END IF; INSERT INTO coitem ( coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_qtyshipped, coitem_unitcost, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_custprice, coitem_order_id, coitem_memo, coitem_imported, coitem_qtyreturned, coitem_custpn, coitem_order_type, coitem_substitute_item_id, coitem_prcost, coitem_taxtype_id, coitem_warranty, coitem_cos_accnt_id, coitem_rev_accnt_id) VALUES ( _r.cohead_id, pNEW.line_number::INTEGER, _r.itemsite_id, pNEW.status, pNEW.scheduled_date, pNEW.promise_date, pNEW.qty_ordered, COALESCE(getUomId(pNEW.qty_uom),_r.item_inv_uom_id), itemuomtouomratio(_r.item_id,COALESCE(getUomId(pNEW.qty_uom),_r.item_inv_uom_id),_r.item_inv_uom_id), 0, stdCost(_r.item_id), COALESCE(pNEW.net_unit_price,itemPrice(_r.item_id,_r.cohead_cust_id, _r.cohead_shipto_id,pNEW.qty_ordered,_r.cohead_curr_id,_r.cohead_orderdate)), COALESCE(getUomId(pNEW.price_uom),_r.item_price_uom_id), itemuomtouomratio(_r.item_id,COALESCE(getUomId(pNEW.price_uom),_r.item_price_uom_id),_r.item_price_uom_id), itemPrice(_r.item_id, _r.cohead_cust_id, _r.cohead_shipto_id, pNEW.qty_ordered, _r.item_inv_uom_id, _r.item_price_uom_id, _r.cohead_curr_id,_r.cohead_orderdate, CASE WHEN (fetchMetricText('soPriceEffective') = 'ScheduleDate') THEN pNEW.scheduled_date WHEN (fetchMetricText('soPriceEffective') = 'OrderDate') THEN _r.cohead_orderdate ELSE CURRENT_DATE END, NULL) -1, pNEW.notes, true, 0, pNEW.customer_pn, CASE WHEN ((pNEW.create_order AND (_r.item_type = 'M')) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createwo)) THEN 'W' WHEN ((pNEW.create_order AND (_r.item_type = 'P')) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createsopr)) THEN 'R' WHEN ((pNEW.create_order AND (_r.item_type = 'P') AND (_r.itemsite_createsopo)) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createsopo)) THEN 'P' END, getitemid(pNEW.substitute_for), pNEW.overwrite_po_price, COALESCE(getTaxTypeId(pNEW.tax_type), getItemTaxType(_r.itemsite_item_id, _r.cohead_taxzone_id)), pNEW.warranty, getGlAccntId(pNEW.alternate_cos_account), getGlAccntId(pNEW.alternate_rev_account) ); RETURN TRUE; END; $_$; ALTER FUNCTION api.insertsalesline(salesline) OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: _accntdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _accntdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _accntnum TEXT := formatGLAccount(OLD.accnt_id); _check INTEGER; BEGIN -- This trigger is to protect against accounts that are in use -- Check to see if the passed accnt is used in a Cost Category SELECT costcat_id INTO _check FROM costcat WHERE ( (costcat_asset_accnt_id=OLD.accnt_id) OR (costcat_liability_accnt_id=OLD.accnt_id) OR (costcat_adjustment_accnt_id=OLD.accnt_id) OR (costcat_purchprice_accnt_id=OLD.accnt_id) OR (costcat_laboroverhead_accnt_id=OLD.accnt_id) OR (costcat_scrap_accnt_id=OLD.accnt_id) OR (costcat_invcost_accnt_id=OLD.accnt_id) OR (costcat_wip_accnt_id=OLD.accnt_id) OR (costcat_shipasset_accnt_id=OLD.accnt_id) OR (costcat_mfgscrap_accnt_id=OLD.accnt_id) OR (costcat_transform_accnt_id=OLD.accnt_id) OR (costcat_freight_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Cost Category'; END IF; -- Check to see if the passed accnt is used in a Sales Account Assignment SELECT salesaccnt_id INTO _check FROM salesaccnt WHERE ( (salesaccnt_sales_accnt_id=OLD.accnt_id) OR (salesaccnt_credit_accnt_id=OLD.accnt_id) OR (salesaccnt_cos_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Sales Account Assignment'; END IF; -- Check to see if the passed accnt is used in a A/R Account Assignment SELECT araccnt_id INTO _check FROM araccnt WHERE ( (araccnt_freight_accnt_id=OLD.accnt_id) OR (araccnt_ar_accnt_id=OLD.accnt_id) OR (araccnt_prepaid_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in A/R Account Assignment'; END IF; -- Check to see if the passed accnt is used in a Warehouse SELECT warehous_id INTO _check FROM whsinfo WHERE (warehous_default_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Site'; END IF; -- Check to see if the passed accnt is used in a Bank Account SELECT bankaccnt_id INTO _check FROM bankaccnt WHERE (bankaccnt_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Bank Account'; END IF; -- Check to see if the passed accnt is used in an Expense Category SELECT expcat_id INTO _check FROM expcat WHERE ( (expcat_exp_accnt_id=OLD.accnt_id) OR (expcat_liability_accnt_id=OLD.accnt_id) OR (expcat_purchprice_accnt_id=OLD.accnt_id) OR (expcat_freight_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Expense Category'; END IF; -- Check to see if the passed accnt is used in a Tax Code SELECT tax_id INTO _check FROM tax WHERE (tax_sales_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Tax Code'; END IF; -- Check to see if the passed accnt is used in a Standard Journal Item SELECT stdjrnlitem_id INTO _check FROM stdjrnlitem WHERE (stdjrnlitem_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Standard Journal Item'; END IF; -- Check to see if the passed accnt is used in a A/P Account Assignment SELECT apaccnt_ap_accnt_id INTO _check FROM apaccnt WHERE ( (apaccnt_ap_accnt_id=OLD.accnt_id) OR (apaccnt_prepaid_accnt_id=OLD.accnt_id) OR (apaccnt_discount_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in A/P Account Assignment'; END IF; -- Check to see if the passed accnt is used in an A/R Open Item record SELECT aropen_accnt_id INTO _check FROM aropen WHERE (aropen_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in A/R Open Item'; END IF; -- Check to see if the passed accnt has been used in the G/L SELECT gltrans_accnt_id INTO _check FROM gltrans WHERE (gltrans_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in G/L Transaction'; END IF; SELECT sltrans_accnt_id INTO _check FROM sltrans WHERE (sltrans_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in G/L Journal Transaction'; END IF; SELECT glseries_accnt_id INTO _check FROM glseries WHERE (glseries_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in G/L Series'; END IF; SELECT trialbal_accnt_id INTO _check FROM trialbal WHERE (trialbal_accnt_id=OLD.accnt_id) AND (trialbal_beginning != 0 OR trialbal_ending != 0) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Trial Balance'; END IF; SELECT cashrcptmisc_accnt_id INTO _check FROM cashrcptmisc WHERE (cashrcptmisc_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Cash Receipt Misc. Application'; END IF; -- TODO: everything above here should be replaced by fkeys IF (OLD.accnt_id = fetchMetricValue('DefaultAPAccount')) THEN RAISE EXCEPTION 'Cannot delete the default A/P Account [xtuple: accnt, -1, %]', _accntnum; ELSIF (OLD.accnt_id = fetchMetricValue('DefaultARAccount')) THEN RAISE EXCEPTION 'Cannot delete the default A/R Account [xtuple: accnt, -2, %]', _accntnum; END IF; RETURN OLD; END; $$; ALTER FUNCTION public._accntdeletetrigger() OWNER TO admin; -- -- Name: _accnttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _accnttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ffSub BOOLEAN; ffProfit BOOLEAN; result INTEGER; BEGIN SELECT (metric_value='t') INTO ffSub FROM metric WHERE(metric_name='GLFFSubaccounts') LIMIT 1; ffSub := COALESCE(ffSub, false); SELECT (metric_value='t') INTO ffProfit FROM metric WHERE(metric_name='GLFFProfitCenters') LIMIT 1; ffProfit := COALESCE(ffSub, false); IF (NEW.accnt_sub IS NOT NULL AND ffSub = false) THEN SELECT subaccnt_id INTO result FROM subaccnt WHERE(subaccnt_number=NEW.accnt_sub) LIMIT 1; IF (NOT FOUND) THEN RAISE EXCEPTION 'You must supply a valid Sub Account Number.'; END IF; END IF; IF (NEW.accnt_profit IS NOT NULL AND ffProfit = false) THEN SELECT prftcntr_id INTO result FROM prftcntr WHERE(prftcntr_number=NEW.accnt_profit) LIMIT 1; IF (NOT FOUND) THEN RAISE EXCEPTION 'You must supply a valid Profit Center Number.'; END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF ((NEW.accnt_type != OLD.accnt_type) AND (SELECT (count(*) > 0) FROM gltrans WHERE (gltrans_accnt_id=NEW.accnt_id))) THEN RAISE EXCEPTION 'You may not change the account type of an account that has transaction history'; END IF; END IF; NEW.accnt_name := formatGlAccount(NEW.accnt_company, NEW.accnt_profit, NEW.accnt_number, NEW.accnt_sub); RETURN NEW; END; $$; ALTER FUNCTION public._accnttrigger() OWNER TO admin; -- -- Name: _accntuniquetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _accntuniquetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN -- This trigger is to protect against id collision on inherited tables since there is no way -- to enforce that with regular constraints. It should be applied to accnt and any table that -- inherits accnt. IF (SELECT (count(accnt_id) > 0) FROM accnt WHERE (accnt_id = NEW.accnt_id)) THEN RAISE EXCEPTION 'Can not create record on account with duplicate key %.', NEW.accnt_id; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._accntuniquetrigger() OWNER TO admin; -- -- Name: _addrtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _addrtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _uses INTEGER := 0; BEGIN IF (TG_OP = 'INSERT') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('AddressNumber', NEW.addr_number); ELSE SELECT count(*) INTO _uses FROM cntct WHERE ((cntct_addr_id=OLD.addr_id) AND cntct_active); END IF; IF (TG_OP = 'UPDATE') THEN IF (OLD.addr_active AND NOT NEW.addr_active AND _uses > 0) THEN RAISE EXCEPTION 'Cannot inactivate Address with Active Contacts (%)', _uses; END IF; ELSIF (TG_OP = 'DELETE') THEN IF (_uses > 0) THEN RAISE EXCEPTION 'Cannot Delete Address with Active Contacts (%)', _uses; END IF; UPDATE cntct SET cntct_addr_id = NULL WHERE ((cntct_addr_id=OLD.addr_id) AND (NOT cntct_active)); RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._addrtrigger() OWNER TO admin; -- -- Name: _alarmbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _alarmbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN PERFORM clearNumberIssue('AlarmNumber', NEW.alarm_number); RETURN NEW; END; $$; ALTER FUNCTION public._alarmbeforetrigger() OWNER TO admin; -- -- Name: _apapplytrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _apapplytrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _tpaid NUMERIC; BEGIN -- get the exchange rate for the doc date IF (TG_OP = 'INSERT') THEN SELECT currtocurr(NEW.apapply_curr_id,apopen_curr_id,NEW.apapply_amount,NEW.apapply_postdate) INTO _tpaid FROM apopen WHERE ( apopen_id=NEW.apapply_target_apopen_id ); IF (FOUND) THEN NEW.apapply_target_paid := _tpaid; ELSE RAISE EXCEPTION 'Error calculating paid amount on application'; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._apapplytrigger() OWNER TO admin; -- -- Name: _apopentrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _apopentrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _currrate NUMERIC; BEGIN -- get the base exchange rate for the doc date IF (TG_OP = 'INSERT' AND NEW.apopen_curr_rate IS NULL) THEN SELECT curr_rate INTO _currrate FROM curr_rate WHERE ( (NEW.apopen_curr_id=curr_id) AND ( NEW.apopen_docdate BETWEEN curr_effective AND curr_expires) ); IF (FOUND) THEN NEW.apopen_curr_rate := _currrate; ELSE RAISE EXCEPTION 'Currency exchange rate not found'; END IF; END IF; NEW.apopen_open := NEW.apopen_amount > NEW.apopen_paid; IF (TG_OP = 'INSERT') THEN IF (NEW.apopen_open=FALSE) THEN NEW.apopen_status='C'; ELSE NEW.apopen_status='O'; END IF; --- clear the number from the issue cache PERFORM clearNumberIssue('APMemoNumber', NEW.apopen_docnumber); END IF; IF (TG_OP = 'UPDATE') THEN IF ((OLD.apopen_open=TRUE) AND (NEW.apopen_open=FALSE)) THEN NEW.apopen_status='C'; IF (NEW.apopen_closedate IS NULL) THEN NEW.apopen_closedate=CURRENT_DATE; END IF; END IF; IF ((OLD.apopen_open=FALSE) AND (NEW.apopen_open=TRUE)) THEN NEW.apopen_status='O'; NEW.apopen_closedate=NULL; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._apopentrigger() OWNER TO admin; -- -- Name: _arapplytrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _arapplytrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _tpaid NUMERIC; BEGIN -- get the exchange rate for the doc date IF (TG_OP = 'INSERT') THEN IF (NEW.arapply_target_doctype != 'K') THEN SELECT round(currtocurr(NEW.arapply_curr_id,aropen_curr_id,NEW.arapply_applied,NEW.arapply_postdate),2) INTO NEW.arapply_target_paid FROM aropen WHERE ( aropen_id=NEW.arapply_target_aropen_id ); ELSE SELECT round(currtocurr(NEW.arapply_curr_id,aropen_curr_id,NEW.arapply_applied,NEW.arapply_postdate),2) INTO NEW.arapply_target_paid FROM aropen WHERE ( aropen_id=NEW.arapply_source_aropen_id ); END IF; IF NOT FOUND THEN NEW.arapply_target_paid := NEW.arapply_applied; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._arapplytrigger() OWNER TO admin; -- -- Name: _aropenaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _aropenaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _openAmount NUMERIC; _lateCount INTEGER := 0; _graceDays INTEGER; _checkLate BOOLEAN := false; _checkLimit BOOLEAN := false; _id INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN _id := NEW.aropen_id; ELSE _id := OLD.aropen_id; END IF; -- If metric is set then auto close any associated incidents when AR is closed IF (fetchMetricBool('AutoCloseARIncident')) THEN IF (NEW.aropen_open = FALSE) THEN UPDATE incdt SET incdt_status='L' WHERE (incdt_aropen_id=_id); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._aropenaftertrigger() OWNER TO admin; -- -- Name: _aropentrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _aropentrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _openAmount NUMERIC; _p RECORD; _lateCount INTEGER := 0; _graceDays INTEGER; _checkLate BOOLEAN := false; _checkLimit BOOLEAN := false; _id INTEGER; _currRate NUMERIC; BEGIN -- Checks -- Start with privileges IF ( (NOT checkPrivilege('MaintainARMemos')) AND (NOT checkPrivilege('PostMiscInvoices')) AND (NOT checkPrivilege('PostARDocuments')) ) THEN RAISE EXCEPTION 'You do not have privileges to maintain A/R Memos.'; END IF; IF ( (NEW.aropen_docnumber IS NULL) OR (LENGTH(NEW.aropen_docnumber) = 0) ) THEN RAISE EXCEPTION 'You must enter a valid Document # for this A/R Memo.'; END IF; IF ( (NEW.aropen_amount IS NOT NULL) AND (NEW.aropen_amount < 0) ) THEN RAISE EXCEPTION 'You must enter a positive Amount for this A/R Memo.'; END IF; IF (TG_OP IN ('INSERT', 'UPDATE') AND NEW.aropen_cust_id < 0) THEN RAISE NOTICE 'Fixing deprecated use of negative aropen_cust_id'; NEW.aropen_cust_id := NULL; END IF; IF (TG_OP IN ('INSERT', 'UPDATE') AND NEW.aropen_salesrep_id < 0) THEN RAISE NOTICE 'Fixing deprecated use of negative aropen_salesrep_id'; NEW.aropen_salesrep_id := NULL; END IF; IF (TG_OP = 'INSERT') THEN SELECT aropen_id INTO _id FROM aropen WHERE ( (aropen_doctype=NEW.aropen_doctype) AND (aropen_docnumber=NEW.aropen_docnumber) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'This Document Type/Number already exists. You may not enter a duplicate A/R Memo.'; END IF; --- clear the number from the issue cache if applicable PERFORM clearNumberIssue('ARMemoNumber', NEW.aropen_docnumber); END IF; -- Determine the number of late invoices IF ( SELECT (metric_value='t') FROM metric WHERE(metric_name='AutoCreditWarnLateCustomers')) THEN _checkLate := true; SELECT COALESCE(metric_value::integer, _graceDays) INTO _graceDays FROM metric WHERE(metric_name='DefaultAutoCreditWarnGraceDays'); IF (NOT FOUND) THEN _graceDays := 30; END IF; SELECT COALESCE(cust_gracedays, _graceDays) INTO _graceDays FROM custinfo WHERE(cust_id=NEW.aropen_cust_id); IF (NOT FOUND) THEN _graceDays := 30; END IF; SELECT count(aropen_id) INTO _lateCount FROM aropen WHERE((NEW.aropen_cust_id = aropen_cust_id) AND (aropen_open) AND (aropen_amount > aropen_paid) AND (aropen_doctype IN ('I', 'D')) AND (aropen_duedate < (CURRENT_DATE - _graceDays))); -- Adjust _lateCount if late invoice being paid IF ( (NEW.aropen_paid = NEW.aropen_amount) AND (NEW.aropen_doctype IN ('I', 'D')) AND (NEW.aropen_duedate < (CURRENT_DATE - _graceDays))) THEN _lateCount := _lateCount - 1; END IF; END IF; -- get the base exchange rate for the doc date IF (TG_OP = 'INSERT' AND NEW.aropen_curr_rate IS NULL) THEN SELECT curr_rate INTO _currrate FROM curr_rate WHERE ( (NEW.aropen_curr_id=curr_id) AND ( NEW.aropen_docdate BETWEEN curr_effective AND curr_expires) ); IF (FOUND) THEN NEW.aropen_curr_rate := _currrate; ELSE RAISE EXCEPTION 'Currency exchange rate not found'; END IF; END IF; -- Close this aropen if it is paid IF (NEW.aropen_paid = NEW.aropen_amount) THEN NEW.aropen_open=FALSE; -- Remove any aropenalloc regards that reference this aropen item DELETE FROM aropenalloc WHERE (aropenalloc_aropen_id=NEW.aropen_id); END IF; IF (TG_OP = 'INSERT') THEN IF (NEW.aropen_open=FALSE) AND (NEW.aropen_closedate IS NULL) THEN NEW.aropen_closedate=current_date; END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF ((OLD.aropen_open=TRUE) AND (NEW.aropen_open=FALSE) AND (NEW.aropen_closedate IS NULL)) THEN NEW.aropen_closedate=current_date; END IF; END IF; -- Only check if the customer in question has a non-zero Credit Limit SELECT cust_id, cust_creditlmt, cust_creditstatus, cust_autoupdatestatus, cust_autoholdorders INTO _p FROM custinfo WHERE (cust_id=NEW.aropen_cust_id); IF (_p.cust_creditlmt > 0) THEN _checkLimit := true; SELECT COALESCE(SUM( CASE WHEN (aropen_doctype IN ('I', 'D')) THEN (aropen_amount - aropen_paid) ELSE ((aropen_amount - aropen_paid) * -1) END ), 0.0) INTO _openAmount FROM aropen AS current WHERE ( (current.aropen_cust_id=NEW.aropen_cust_id) AND (current.aropen_open) AND (current.aropen_id <> NEW.aropen_id) ); -- Add in the value of the current aropen item IF (NEW.aropen_doctype IN ('I', 'D')) THEN _openAmount := (_openAmount + (NEW.aropen_amount - NEW.aropen_paid)); ELSE _openAmount := (_openAmount - (NEW.aropen_amount - NEW.aropen_paid)); END IF; ELSE _openAmount := 0; END IF; IF (_checkLimit OR _checkLate) THEN -- Handle a Customer that is going under its credit limit IF ((_p.cust_creditlmt >= _openAmount) AND (_lateCount <= 0)) THEN -- Handle the Customer Status IF ( (_p.cust_autoupdatestatus) AND (_p.cust_creditstatus='W') ) THEN UPDATE custinfo SET cust_creditstatus='G' WHERE (cust_id=NEW.aropen_cust_id); END IF; -- Handle the open Sales Orders IF (_p.cust_autoholdorders) THEN UPDATE cohead SET cohead_holdtype='N' FROM coitem WHERE ( (coitem_cohead_id=cohead_id) AND (cohead_holdtype='C') AND (coitem_status='O') AND (cohead_cust_id=_p.cust_id) ); END IF; -- Handle a Customer that is going over its credit limit ELSIF ((_p.cust_creditlmt < _openAmount) OR (_lateCount > 0)) THEN -- Handle the Customer Status IF ( (_p.cust_autoupdatestatus) AND (_p.cust_creditstatus = 'G') ) THEN UPDATE custinfo SET cust_creditstatus='W' WHERE (cust_id=NEW.aropen_cust_id); END IF; -- Handle the open Sales Orders IF (_p.cust_autoholdorders) THEN UPDATE cohead SET cohead_holdtype='C' FROM coitem WHERE ( (coitem_cohead_id=cohead_id) AND (cohead_holdtype='N') AND (coitem_status='O') AND (cohead_cust_id=_p.cust_id) ); END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._aropentrigger() OWNER TO admin; -- -- Name: _bomheadtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _bomheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _revid INTEGER; _check TEXT; BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainBOMs')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Bills of Material.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._bomheadtrigger() OWNER TO admin; -- -- Name: _bomitemaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _bomitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF ( SELECT fetchMetricBool('ItemChangeLog') ) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, ('Created BOM Item Sequence ' || NEW.bomitem_seqnumber::TEXT)); ELSIF (TG_OP = 'UPDATE') THEN IF (NEW.bomitem_effective <> OLD.bomitem_effective) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Effective Date Changed from ' || formatDate(OLD.bomitem_effective, 'Always') || ' to ' || formatDate(NEW.bomitem_effective, 'Always' ) ) ); END IF; IF (NEW.bomitem_expires <> OLD.bomitem_expires) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Expiration Date Changed from ' || formatDate(OLD.bomitem_expires, 'Never') || ' to ' || formatDate(NEW.bomitem_expires, 'Never' ) ) ); END IF; IF (NEW.bomitem_qtyfxd <> OLD.bomitem_qtyfxd) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Fixed Qty. Changed from ' || formatQtyPer(OLD.bomitem_qtyfxd) || ' to ' || formatQtyPer(NEW.bomitem_qtyfxd ) ) ); END IF; IF (NEW.bomitem_qtyper <> OLD.bomitem_qtyper) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Qty. Per Changed from ' || formatQtyPer(OLD.bomitem_qtyper) || ' to ' || formatQtyPer(NEW.bomitem_qtyper ) ) ); END IF; IF (NEW.bomitem_scrap <> OLD.bomitem_scrap) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Scrap % Changed from ' || formatPrcnt(OLD.bomitem_scrap) || ' to ' || formatPrcnt(NEW.bomitem_scrap ) ) ); END IF; IF (NEW.bomitem_issuemethod <> OLD.bomitem_issuemethod) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Issue Method Changed from ' || (CASE WHEN(OLD.bomitem_issuemethod='S') THEN 'Push' WHEN(OLD.bomitem_issuemethod='L') THEN 'Pull' WHEN(OLD.bomitem_issuemethod='M') THEN 'Mixed' ELSE OLD.bomitem_issuemethod END) || ' to ' || (CASE WHEN(NEW.bomitem_issuemethod='S') THEN 'Push' WHEN(NEW.bomitem_issuemethod='L') THEN 'Pull' WHEN(NEW.bomitem_issuemethod='M') THEN 'Mixed' ELSE NEW.bomitem_issuemethod END) ) ); END IF; IF (NEW.bomitem_ecn <> OLD.bomitem_ecn) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'ECN Changed from ' || OLD.bomitem_ecn || ' to ' || NEW.bomitem_ecn ) ); END IF; IF (OLD.bomitem_createwo <> NEW.bomitem_createwo) THEN IF (NEW.bomitem_createwo) THEN PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, 'Create Child W/O activated'); ELSE PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, 'Create Child W/O deactivated'); END IF; END IF; IF (OLD.bomitem_issuewo <> NEW.bomitem_issuewo) THEN IF (NEW.bomitem_issuewo) THEN PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, 'Issue Child W/O activated'); ELSE PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, 'Issue Child W/O deactivated'); END IF; END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM comment WHERE ( (comment_source='BMI') AND (comment_source_id=OLD.bomitem_id) ); RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._bomitemaftertrigger() OWNER TO admin; -- -- Name: _bomitembeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _bomitembeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN DELETE FROM comment WHERE ( (comment_source='BMI') AND (comment_source_id=OLD.bomitem_id) ); RETURN OLD; END; $$; ALTER FUNCTION public._bomitembeforedeletetrigger() OWNER TO admin; -- -- Name: _bomitembeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _bomitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _bomworksetid INTEGER; _bomworkid INTEGER; _seqNumber INTEGER; _parentItem RECORD; BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainBOMs')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Bills of Material.'; END IF; -- Cache Parent Item SELECT * INTO _parentItem FROM item WHERE (item_id=NEW.bomitem_parent_item_id); IF (TG_OP = 'INSERT') THEN -- Make sure that the parent and component are not the same IF (NEW.bomitem_parent_item_id = NEW.bomitem_item_id) THEN RAISE EXCEPTION 'BOM Item Parent and Component Item cannot be the same. [xtuple: createBOMItem, -1]'; END IF; -- Make sure that the parent is not used in the component at some level IF ( SELECT (item_type IN ('M', 'F')) FROM item WHERE (item_id=NEW.bomitem_item_id) ) THEN SELECT indentedWhereUsed(NEW.bomitem_parent_item_id) INTO _bomworksetid; SELECT bomwork_id INTO _bomworkid FROM bomwork WHERE ((bomwork_set_id=_bomworksetid) AND (bomwork_item_id=NEW.bomitem_item_id)) LIMIT 1; IF (FOUND) THEN PERFORM deleteBOMWorkset(_bomworksetid); RAISE EXCEPTION 'BOM Item Parent is used by Component, BOM is recursive. [xtuple: createBOMItem, -2]'; END IF; END IF; PERFORM deleteBOMWorkset(_bomworksetid); -- Set defaults NEW.bomitem_rev_id := COALESCE(NEW.bomitem_rev_id, -1); NEW.bomitem_booitem_seq_id := COALESCE(NEW.bomitem_booitem_seq_id, -1); NEW.bomitem_schedatwooper := COALESCE(NEW.bomitem_schedatwooper, FALSE); IF (NEW.bomitem_seqnumber IS NULL) THEN -- Grab the next Sequence Number, if any SELECT MAX(bomitem_seqnumber) INTO _seqNumber FROM bomitem(NEW.bomitem_parent_item_id,NEW.bomitem_rev_id); IF (_seqNumber IS NOT NULL) THEN NEW.bomitem_seqnumber := (_seqNumber + 10); ELSE NEW.bomitem_seqnumber := 10; END IF; END IF; END IF; -- end Insert specific IF (TG_OP = 'UPDATE') THEN -- Disallow changes that would compromise revision control integrity IF (NEW.bomitem_parent_item_id != OLD.bomitem_parent_item_id) THEN RAISE EXCEPTION 'Parent Item ID may not be changed.'; END IF; IF (NEW.bomitem_item_id != OLD.bomitem_item_id) THEN RAISE EXCEPTION 'Item ID may not be changed.'; END IF; IF ((fetchMetricBool('RevControl')) AND (OLD.bomitem_rev_id > -1)) THEN IF (SELECT (rev_status = 'I') FROM rev WHERE (rev_id=OLD.bomitem_rev_id)) THEN RAISE EXCEPTION 'Bill of material is Inactive and may not be modified'; END IF; END IF; END IF; -- end Update specific -- Check for valid UOM IF (SELECT (count(*) != 1) FROM (SELECT uom_id FROM item JOIN uom ON (item_inv_uom_id=uom_id) WHERE(item_id=NEW.bomitem_item_id) UNION SELECT uom_id FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN uom ON (itemuomconv_to_uom_id=uom_id), itemuom, uomtype WHERE((itemuomconv_from_uom_id=item_inv_uom_id) AND (item_id=NEW.bomitem_item_id) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (uomtype_id=itemuom_uomtype_id) AND (uomtype_name='MaterialIssue')) UNION SELECT uom_id FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN uom ON (itemuomconv_from_uom_id=uom_id), itemuom, uomtype WHERE((itemuomconv_to_uom_id=item_inv_uom_id) AND (item_id=NEW.bomitem_item_id) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (uomtype_id=itemuom_uomtype_id) AND (uomtype_name='MaterialIssue'))) AS data WHERE (uom_id=NEW.bomitem_uom_id)) THEN RAISE EXCEPTION 'Unit of Measure Invalid for Material Issue.'; END IF; -- Disallow configuration parameters if parent is not a job item IF (NEW.bomitem_char_id IS NOT NULL) THEN IF (NOT _parentItem.item_config) THEN RAISE EXCEPTION 'Configuration characteristics may only be defined for Configured Items'; END IF; END IF; -- Kit items must be sold and not kits themselves IF (_parentItem.item_type = 'K') THEN IF (SELECT (COUNT(item_id) = 0) FROM item WHERE ((item_id=NEW.bomitem_item_id) AND (item_sold) AND (item_type != 'K'))) THEN RAISE EXCEPTION 'Bill of Material Items for kits must be sold and not kits themselves'; END IF; END IF; -- Over ride logic to disallow invalid data IF (NEW.bomitem_createwo) THEN IF (SELECT (item_type != 'M') FROM item WHERE (item_id=NEW.bomitem_item_id)) THEN NEW.bomitem_createwo := FALSE; END IF; IF (NEW.bomitem_booitem_seq_id = -1) THEN NEW.bomitem_schedatwooper := FALSE; END IF; END IF; NEW.bomitem_moddate := COALESCE(NEW.bomitem_moddate, CURRENT_DATE); RETURN NEW; END; $$; ALTER FUNCTION public._bomitembeforetrigger() OWNER TO admin; -- -- Name: _bomitemsubtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _bomitemsubtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainBOMs')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Bills of Material.'; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END; $$; ALTER FUNCTION public._bomitemsubtrigger() OWNER TO admin; -- -- Name: _cashrcptitemaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cashrcptitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _total NUMERIC; BEGIN -- Checks -- Total Over Application Warning SELECT (cashrcpt_amount - SUM(COALESCE(cashrcptitem_amount, 0))) INTO _total FROM cashrcptitem JOIN cashrcpt ON (cashrcpt_id=cashrcptitem_cashrcpt_id) WHERE (cashrcptitem_cashrcpt_id=NEW.cashrcptitem_cashrcpt_id) GROUP BY cashrcpt_amount; IF (_total < 0.0) THEN RAISE WARNING 'Warning -- the Cash Receipt has been over applied.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cashrcptitemaftertrigger() OWNER TO admin; -- -- Name: _cashrcptitemtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cashrcptitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _openAmount NUMERIC; BEGIN -- Checks -- Start with Privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add a new Cash Receipt Application.'; END IF; ELSE SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Cash Receipt Application.'; END IF; END IF; -- Over Application SELECT round(currToCurr(aropen_curr_id, cashrcpt_curr_id, aropen_amount - aropen_paid, cashrcpt_distdate) - COALESCE((SELECT SUM(cashrcptitem_amount) FROM cashrcptitem, cashrcpt WHERE ((cashrcpt_id=cashrcptitem_cashrcpt_id) AND (NOT cashrcpt_void) AND (NOT cashrcpt_posted) AND (cashrcpt_id != NEW.cashrcptitem_cashrcpt_id) AND (cashrcptitem_aropen_id=NEW.cashrcptitem_aropen_id))), 0),2) INTO _openAmount FROM aropen, cashrcpt WHERE ( (aropen_id=NEW.cashrcptitem_aropen_id) AND (cashrcpt_id=NEW.cashrcptitem_cashrcpt_id) ); IF (NEW.cashrcptitem_amount > _openAmount) THEN RAISE EXCEPTION 'You may not apply more than the balance of this item.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cashrcptitemtrigger() OWNER TO admin; -- -- Name: _cashrcptmisctrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cashrcptmisctrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; BEGIN -- Checks -- Start with Privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add a new Cash Receipt Misc. Application.'; END IF; ELSE SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Cash Receipt Misc. Application.'; END IF; END IF; -- Account is required IF (NEW.cashrcptmisc_accnt_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid GL Account.'; END IF; -- Amount is required IF (COALESCE(NEW.cashrcptmisc_amount, 0) = 0) THEN RAISE EXCEPTION 'You must supply a valid Amount.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cashrcptmisctrigger() OWNER TO admin; -- -- Name: _cashrcpttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cashrcpttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _checkId INTEGER; _currId INTEGER; _bankCurrId INTEGER; _evntType TEXT; _whsId INTEGER; _custNumber TEXT; _currrate NUMERIC; BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add new Cash Receipts.'; END IF; ELSE SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Cash Receipt.'; END IF; END IF; -- Currency must be same as Bank Currency IF (TG_OP = 'INSERT') THEN _currId = COALESCE(NEW.cashrcpt_curr_id, basecurrid()); --- clear the number from the issue cache PERFORM clearNumberIssue('CashRcptNumber', NEW.cashrcpt_number); ELSE _currId = NEW.cashrcpt_curr_id; END IF; -- get the base exchange rate for the dist date IF (NEW.cashrcpt_curr_rate IS NULL) THEN SELECT curr_rate INTO _currrate FROM curr_rate WHERE ( (NEW.cashrcpt_curr_id=curr_id) AND ( NEW.cashrcpt_distdate BETWEEN curr_effective AND curr_expires) ); IF (FOUND) THEN NEW.cashrcpt_curr_rate := _currrate; ELSE RAISE EXCEPTION 'Currency exchange rate not found'; END IF; END IF; -- Create CashReceiptPosted Event IF (TG_OP = 'UPDATE') THEN IF (OLD.cashrcpt_posted=FALSE AND NEW.cashrcpt_posted=TRUE) THEN _evntType = 'CashReceiptPosted'; -- Find the warehouse for which to create evntlog entries SELECT usrpref_value INTO _whsId FROM usrpref WHERE usrpref_username = getEffectiveXtUser() AND usrpref_name = 'PreferredWarehouse'; -- Find the Customer Number SELECT cust_number INTO _custNumber FROM custinfo WHERE (cust_id=NEW.cashrcpt_cust_id); INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT DISTINCT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, NEW.cashrcpt_id, _whsId, (_custNumber || '-' || NEW.cashrcpt_docnumber || ' ' || currConcat(NEW.cashrcpt_curr_id) || formatMoney(NEW.cashrcpt_amount)) FROM evntnot, evnttype WHERE ((evntnot_evnttype_id=evnttype_id) AND (evnttype_name=_evntType)); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cashrcpttrigger() OWNER TO admin; -- -- Name: _ccardtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _ccardtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN New.ccard_lastupdated := current_timestamp; New.ccard_last_updated_by_username := getEffectiveXtUser(); IF (TG_OP = 'UPDATE') THEN INSERT INTO ccardaud VALUES (nextval('ccardaud_ccardaud_id_seq'), NEW.ccard_id, OLD.ccard_seq, NEW.ccard_seq, OLD.ccard_cust_id, NEW.ccard_cust_id, OLD.ccard_active, NEW.ccard_active, OLD.ccard_name, NEW.ccard_name, OLD.ccard_address1, NEW.ccard_address1, OLD.ccard_address2, NEW.ccard_address2, OLD.ccard_city, NEW.ccard_city, OLD.ccard_state, NEW.ccard_state, OLD.ccard_zip, NEW.ccard_zip, OLD.ccard_country, NEW.ccard_country, OLD.ccard_number, NEW.ccard_number, OLD.ccard_debit, NEW.ccard_debit, OLD.ccard_month_expired, NEW.ccard_month_expired, OLD.ccard_year_expired, NEW.ccard_year_expired, OLD.ccard_type, NEW.ccard_type); ELSE -- We are inserting a record, therefore no old values INSERT INTO ccardaud VALUES (nextval('ccardaud_ccardaud_id_seq'), NEW.ccard_id, NULL, NEW.ccard_seq, NULL, NEW.ccard_cust_id, NULL, NEW.ccard_active, NULL, NEW.ccard_name, NULL, NEW.ccard_address1, NULL, NEW.ccard_address2, NULL, NEW.ccard_city, NULL, NEW.ccard_state, NULL, NEW.ccard_zip, NULL, NEW.ccard_country, NULL, NEW.ccard_number, NULL, NEW.ccard_debit, NULL, NEW.ccard_month_expired, NULL, NEW.ccard_year_expired, NULL, NEW.ccard_type); END IF; RETURN NEW; END; $$; ALTER FUNCTION public._ccardtrigger() OWNER TO admin; -- -- Name: _charasshistorytrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _charasshistorytrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF(TG_OP = 'DELETE') THEN IF (OLD.charass_target_type = 'INCDT') THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(OLD.charass_target_id, ('Characteristic ' || COALESCE((SELECT char_name FROM char WHERE (char_id=OLD.charass_char_id)), '') || ' Deleted: "' || COALESCE(OLD.charass_value,'') || '"') ); END IF; RETURN OLD; ELSIF (NEW.charass_target_type = 'INCDT') THEN IF (TG_OP = 'INSERT') THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(NEW.charass_target_id, ('Characteristic ' || COALESCE((SELECT char_name FROM char WHERE (char_id=NEW.charass_char_id)), '') || ' Added: "' || COALESCE(NEW.charass_value,'') || '"') ); ELSIF (TG_OP = 'UPDATE') THEN IF (COALESCE(NEW.charass_value,'') <> COALESCE(OLD.charass_value,'')) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(NEW.charass_target_id, ('Characteristic ' || COALESCE((SELECT char_name FROM char WHERE (char_id=NEW.charass_char_id)), '') || ' Changed: "' || COALESCE(OLD.charass_value,'') || '" -> "' || COALESCE(NEW.charass_value,'') || '"') ); END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._charasshistorytrigger() OWNER TO admin; -- -- Name: _charasstrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _charasstrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NEW.charass_target_type = 'I' AND NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Items.'; END IF; IF (NEW.charass_target_type = 'C' AND NOT checkPrivilege('MaintainCustomerMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Customers.'; END IF; -- Data check IF (NEW.charass_char_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Characteristic ID.'; END IF; -- Default Logic IF (NEW.charass_default) THEN UPDATE charass SET charass_default = false WHERE ((charass_target_id=NEW.charass_target_id) AND (charass_target_type=NEW.charass_target_type) AND (charass_char_id=NEW.charass_char_id) AND (charass_id <> NEW.charass_ID)); END IF; -- Incident update IF (NEW.charass_target_type = 'INCDT') THEN UPDATE incdt SET incdt_updated = now() WHERE incdt_id = NEW.charass_target_id; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._charasstrigger() OWNER TO admin; -- -- Name: _charbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _charbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainCharacteristics')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Characteristics.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._charbeforetrigger() OWNER TO admin; -- -- Name: _charopttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _charopttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainCharacteristics')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Characteristic options.'; END IF; IF (TG_OP = 'UPDATE') THEN UPDATE charass SET charass_value = NEW.charopt_value WHERE ((charass_char_id=NEW.charopt_char_id) AND (charass_value=OLD.charopt_value)); END IF; IF (TG_OP = 'DELETE') THEN IF (SELECT (count(charass_id) > 0) FROM charass WHERE ((charass_char_id=OLD.charopt_char_id) AND (charass_value=OLD.charopt_value))) THEN RAISE EXCEPTION 'This characteristic option value is in use and can not be deleted.'; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._charopttrigger() OWNER TO admin; -- -- Name: _checkheadbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _checkheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _amount NUMERIC; _currrate NUMERIC; BEGIN -- get the base exchange rate for the check date IF (TG_OP = 'INSERT' AND NEW.checkhead_curr_rate IS NULL) THEN SELECT curr_rate INTO _currrate FROM curr_rate WHERE ( (NEW.checkhead_curr_id=curr_id) AND ( NEW.checkhead_checkdate BETWEEN curr_effective AND curr_expires) ); IF (FOUND) THEN NEW.checkhead_curr_rate := _currrate; ELSE RAISE EXCEPTION 'Currency exchange rate not found'; END IF; END IF; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN IF (NOT EXISTS (SELECT checkrecip_id FROM checkrecip WHERE ((checkrecip_type=NEW.checkhead_recip_type) AND (checkrecip_id=NEW.checkhead_recip_id)) )) THEN RAISE EXCEPTION 'Cannot verify recipient for check % (type % id %)', NEW.checkhead_number, NEW.checkhead_recip_type, NEW.checkhead_recip_id; END IF; IF (NEW.checkhead_journalnumber IS NOT NULL AND NOT EXISTS (SELECT jrnluse_number FROM jrnluse WHERE (jrnluse_number=NEW.checkhead_journalnumber)) ) THEN RAISE EXCEPTION 'Journal Number % does not exist and cannot be used for check %.', NEW.checkhead_journalnumber, NEW.checkhead_number; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._checkheadbeforetrigger() OWNER TO admin; -- -- Name: _cmheadbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cmheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _id INTEGER; BEGIN -- Checks -- Start with privileges SELECT checkPrivilege('MaintainCreditMemos') INTO _check; IF ( (TG_OP = 'INSERT') OR (TG_OP = 'DELETE') ) THEN IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Credit Memos.'; END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF ((OLD.cmhead_printed = NEW.cmhead_printed) AND NOT (_check) ) THEN RAISE EXCEPTION 'You do not have privileges to maintain Credit Memos.'; END IF; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM cmheadtax WHERE (taxhist_parent_id=OLD.cmhead_id); RETURN OLD; END IF; IF ( (NEW.cmhead_number IS NULL) OR (LENGTH(NEW.cmhead_number) = 0) ) THEN RAISE EXCEPTION 'You must enter a valid Memo # for this Credit Memo.'; END IF; IF (TG_OP = 'INSERT') THEN SELECT cmhead_id INTO _id FROM cmhead WHERE (cmhead_number=NEW.cmhead_number); IF (FOUND) THEN RAISE EXCEPTION 'The Memo # is already in use.'; END IF; IF (fetchMetricText('CMNumberGeneration') IN ('A','O')) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('CmNumber', NEW.cmhead_number); ELSIF (fetchMetricText('CMNumberGeneration') = 'S') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('SoNumber', NEW.cmhead_number); END IF; END IF; IF (NEW.cmhead_cust_id IS NOT NULL) THEN SELECT cust_id INTO _id FROM custinfo WHERE (cust_id=NEW.cmhead_cust_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'You must enter a valid Customer # for this Credit Memo.'; END IF; END IF; IF ( (NEW.cmhead_misc > 0) AND (NEW.cmhead_misc_accnt_id = -1) ) THEN RAISE EXCEPTION 'You may not enter a Misc. Charge without indicating the G/L Sales Account.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cmheadbeforetrigger() OWNER TO admin; -- -- Name: _cmheadtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cmheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN -- If this was created by a return, then reset the return IF (OLD.cmhead_rahead_id IS NOT NULL) THEN UPDATE rahead SET rahead_headcredited=false WHERE (rahead_id=OLD.cmhead_rahead_id); DELETE FROM rahist WHERE ((rahist_rahead_id=OLD.cmhead_rahead_id) AND (rahist_source='CM') AND (rahist_source_id=OLD.cmhead_id)); END IF; RETURN OLD; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Freight Tax IF (NEW.cmhead_freight <> 0) THEN PERFORM calculateTaxHist( 'cmheadtax', NEW.cmhead_id, NEW.cmhead_taxzone_id, getFreightTaxtypeId(), NEW.cmhead_docdate, NEW.cmhead_curr_id, NEW.cmhead_freight * -1 ); END IF; END IF; -- Update row IF (TG_OP = 'UPDATE') THEN IF ( (NEW.cmhead_freight <> OLD.cmhead_freight) OR (COALESCE(NEW.cmhead_taxzone_id,-1) <> COALESCE(OLD.cmhead_taxzone_id,-1)) OR (NEW.cmhead_docdate <> OLD.cmhead_docdate) OR (NEW.cmhead_curr_id <> OLD.cmhead_curr_id) ) THEN -- Calculate cmhead Tax PERFORM calculateTaxHist( 'cmheadtax', NEW.cmhead_id, NEW.cmhead_taxzone_id, getFreightTaxtypeId(), NEW.cmhead_docdate, NEW.cmhead_curr_id, NEW.cmhead_freight * -1 ); END IF; IF ( (COALESCE(NEW.cmhead_taxzone_id,-1) <> COALESCE(OLD.cmhead_taxzone_id,-1)) OR (NEW.cmhead_docdate <> OLD.cmhead_docdate) OR (NEW.cmhead_curr_id <> OLD.cmhead_curr_id) ) THEN -- Calculate cmitem Tax IF (COALESCE(NEW.cmhead_taxzone_id,-1) <> COALESCE(OLD.cmhead_taxzone_id,-1)) THEN -- Cmitem trigger will calculate tax UPDATE cmitem SET cmitem_taxtype_id=getItemTaxType(itemsite_item_id,NEW.cmhead_taxzone_id) FROM itemsite WHERE ((itemsite_id=cmitem_itemsite_id) AND (cmitem_cmhead_id=NEW.cmhead_id)); ELSE PERFORM calculateTaxHist( 'cmitemtax', cmitem_id, NEW.cmhead_taxzone_id, cmitem_taxtype_id, NEW.cmhead_docdate, NEW.cmhead_curr_id, (cmitem_qtycredit * cmitem_qty_invuomratio) * (cmitem_unitprice / cmitem_price_invuomratio) * -1) FROM cmitem WHERE (cmitem_cmhead_id = NEW.cmhead_id); END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cmheadtrigger() OWNER TO admin; -- -- Name: _cmitembeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cmitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _id INTEGER; BEGIN -- Checks -- Start with privileges SELECT checkPrivilege('MaintainCreditMemos') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Credit Memos.'; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM cmitemtax WHERE (taxhist_parent_id=OLD.cmitem_id); RETURN OLD; END IF; IF (TG_OP = 'INSERT') THEN IF ( (NEW.cmitem_qtycredit IS NULL) OR (NEW.cmitem_qtycredit = 0) ) THEN RAISE EXCEPTION 'Quantity to Credit must be greater than zero.'; END IF; SELECT cmitem_id INTO _id FROM cmitem WHERE ( (cmitem_cmhead_id=NEW.cmitem_cmhead_id) AND (cmitem_linenumber=NEW.cmitem_linenumber) ); IF (FOUND) THEN RAISE EXCEPTION 'The Memo Line Number is already in use.'; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cmitembeforetrigger() OWNER TO admin; -- -- Name: _cmitemtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cmitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ext NUMERIC; _r RECORD; BEGIN IF (TG_OP = 'DELETE') THEN -- If this was created by a return, reset return values IF (OLD.cmitem_raitem_id) IS NOT NULL THEN _ext := ROUND((OLD.cmitem_qtycredit * OLD.cmitem_qty_invuomratio) * (OLD.cmitem_unitprice / OLD.cmitem_price_invuomratio),2); UPDATE raitem SET raitem_status = 'O', raitem_qtycredited = raitem_qtycredited-OLD.cmitem_qtycredit, raitem_amtcredited = raitem_amtcredited-_ext WHERE (raitem_id=OLD.cmitem_raitem_id); END IF; RETURN OLD; END IF; -- Cache Credit Memo Head SELECT * INTO _r FROM cmhead WHERE (cmhead_id=NEW.cmitem_cmhead_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Credit Memo head not found'; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Tax PERFORM calculateTaxHist( 'cmitemtax', NEW.cmitem_id, COALESCE(_r.cmhead_taxzone_id, -1), NEW.cmitem_taxtype_id, COALESCE(_r.cmhead_docdate, CURRENT_DATE), COALESCE(_r.cmhead_curr_id, -1), (NEW.cmitem_qtycredit * NEW.cmitem_qty_invuomratio) * (NEW.cmitem_unitprice / NEW.cmitem_price_invuomratio) * -1); END IF; -- Update row IF (TG_OP = 'UPDATE') THEN -- Calculate Tax IF ( (NEW.cmitem_qtycredit <> OLD.cmitem_qtycredit) OR (NEW.cmitem_qty_invuomratio <> OLD.cmitem_qty_invuomratio) OR (NEW.cmitem_unitprice <> OLD.cmitem_unitprice) OR (NEW.cmitem_price_invuomratio <> OLD.cmitem_price_invuomratio) OR (COALESCE(NEW.cmitem_taxtype_id, -1) <> COALESCE(OLD.cmitem_taxtype_id, -1)) ) THEN PERFORM calculateTaxHist( 'cmitemtax', NEW.cmitem_id, COALESCE(_r.cmhead_taxzone_id, -1), NEW.cmitem_taxtype_id, COALESCE(_r.cmhead_docdate, CURRENT_DATE), COALESCE(_r.cmhead_curr_id, -1), (NEW.cmitem_qtycredit * NEW.cmitem_qty_invuomratio) * (NEW.cmitem_unitprice / NEW.cmitem_price_invuomratio) * -1); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cmitemtrigger() OWNER TO admin; -- -- Name: _cntcttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cntcttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN NEW.cntct_name := formatCntctName(NULL, NEW.cntct_first_name, NEW.cntct_middle, NEW.cntct_last_name, NEW.cntct_suffix); NEW.cntct_email := lower(NEW.cntct_email); IF (TG_OP = 'INSERT') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('ContactNumber', NEW.cntct_number); END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cntcttrigger() OWNER TO admin; -- -- Name: _cntcttriggerafter(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cntcttriggerafter() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cntctemlid INTEGER; _rows INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN IF(length(coalesce(NEW.cntct_email,'')) > 0) THEN INSERT INTO cntcteml ( cntcteml_cntct_id, cntcteml_primary, cntcteml_email ) VALUES ( NEW.cntct_id, true, NEW.cntct_email ); END IF; PERFORM postComment('ChangeLog', 'T', NEW.cntct_id, ('Created by ' || getEffectiveXtUser())); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.cntct_email != NEW.cntct_email) THEN SELECT cntcteml_id INTO _cntctemlid FROM cntcteml WHERE ((cntcteml_cntct_id=NEW.cntct_id) AND (cntcteml_email=NEW.cntct_email)); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0) THEN UPDATE cntcteml SET cntcteml_primary=false WHERE ((cntcteml_cntct_id=NEW.cntct_id) AND (cntcteml_primary=true)); INSERT INTO cntcteml ( cntcteml_cntct_id, cntcteml_primary, cntcteml_email ) VALUES ( NEW.cntct_id, true, NEW.cntct_email ); ELSE UPDATE cntcteml SET cntcteml_primary=false WHERE ((cntcteml_cntct_id=NEW.cntct_id) AND (cntcteml_primary=true)); UPDATE cntcteml SET cntcteml_primary=true WHERE (cntcteml_id=_cntctemlid); END IF; END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM comment WHERE (comment_source_id=OLD.cntct_id AND comment_source = 'T'); DELETE FROM docass WHERE (docass_source_id=OLD.cntct_id AND docass_source_type = 'T') OR (docass_target_id=OLD.cntct_id AND docass_target_type = 'T'); RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cntcttriggerafter() OWNER TO admin; -- -- Name: _cntcttriggerbeforedelete(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cntcttriggerbeforedelete() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM cntctaddr WHERE cntctaddr_cntct_id=OLD.cntct_id; DELETE FROM cntctdata WHERE cntctdata_cntct_id=OLD.cntct_id; DELETE FROM cntcteml WHERE cntcteml_cntct_id=OLD.cntct_id; DELETE FROM docass WHERE docass_source_id = OLD.cntct_id AND docass_source_type = 'T'; DELETE FROM docass WHERE docass_target_id = OLD.cntct_id AND docass_target_type = 'T'; -- these have denormalized cntct info so it should be ok to update them UPDATE cohead SET cohead_billto_cntct_id=NULL WHERE cohead_billto_cntct_id=OLD.cntct_id; UPDATE cohead SET cohead_shipto_cntct_id=NULL WHERE cohead_shipto_cntct_id=OLD.cntct_id; UPDATE pohead SET pohead_vend_cntct_id=NULL WHERE pohead_vend_cntct_id=OLD.cntct_id; UPDATE pohead SET pohead_shipto_cntct_id=NULL WHERE pohead_shipto_cntct_id=OLD.cntct_id; UPDATE quhead SET quhead_billto_cntct_id=NULL WHERE quhead_billto_cntct_id=OLD.cntct_id; UPDATE quhead SET quhead_shipto_cntct_id=NULL WHERE quhead_shipto_cntct_id=OLD.cntct_id; IF (fetchMetricBool('MultiWhs')) THEN UPDATE tohead SET tohead_destcntct_id=NULL WHERE tohead_destcntct_id=OLD.cntct_id; UPDATE tohead SET tohead_srccntct_id=NULL WHERE tohead_srccntct_id=OLD.cntct_id; END IF; END IF; RETURN OLD; END; $$; ALTER FUNCTION public._cntcttriggerbeforedelete() OWNER TO admin; -- -- Name: _cntsliptrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cntsliptrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _p RECORD; _comments TEXT; _temp TEXT; BEGIN IF (TG_OP = 'DELETE') THEN SELECT itemsite_loccntrl, itemsite_controlmethod, cntslip_posted, cntslip_lotserial, cntslip_comments, cntslip_number, cntslip_qty INTO _p FROM cntslip, invcnt, itemsite WHERE ( (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id) AND (cntslip_id=OLD.cntslip_id) ); IF(_p.cntslip_posted) THEN SELECT ( ' Count Slip #' || _p.cntslip_number || ' deleted ' || formatQty(_p.cntslip_qty) ) INTO _comments; -- Add the Location name if the itemsite is MLC IF (_p.itemsite_loccntrl) THEN SELECT ( ', Location:' || location_name ) INTO _temp FROM location, cntslip WHERE ( (cntslip_location_id=location_id) AND (cntslip_id=OLD.cntslip_id) ); _comments := (_comments || _temp); END IF; -- Add the Lot/Serial if the itemsite is Lot or Serial controlled IF (_p.itemsite_controlmethod = 'L') THEN _comments := (_comments || ( ', Lot #:' || _p.cntslip_lotserial)); ELSIF (_p.itemsite_controlmethod = 'S') THEN _comments := (_comments || ( ', Serial #:' || _p.cntslip_lotserial)); END IF; _comments := (_comments || ' ' || _p.cntslip_comments); UPDATE invcnt SET invcnt_qoh_after = ( COALESCE(invcnt_qoh_after, 0) - cntslip_qty), invcnt_comments = (invcnt_comments || _comments) FROM cntslip WHERE ( (cntslip_cnttag_id=invcnt_id) AND (NOT invcnt_posted) AND (cntslip_id=OLD.cntslip_id) ); END IF; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cntsliptrigger() OWNER TO admin; -- -- Name: _cobillbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cobillbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM cobilltax WHERE (taxhist_parent_id=OLD.cobill_id); RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cobillbeforetrigger() OWNER TO admin; -- -- Name: _cobilltrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cobilltrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; -- Cache Billing Head SELECT * INTO _r FROM cobmisc WHERE (cobmisc_id=NEW.cobill_cobmisc_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Billing head not found'; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Tax PERFORM calculateTaxHist( 'cobilltax', NEW.cobill_id, COALESCE(_r.cobmisc_taxzone_id, -1), NEW.cobill_taxtype_id, COALESCE(_r.cobmisc_shipdate, CURRENT_DATE), COALESCE(_r.cobmisc_curr_id, -1), (NEW.cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ) FROM coitem WHERE (coitem_id=NEW.cobill_coitem_id); END IF; -- Update row IF (TG_OP = 'UPDATE') THEN -- Calculate Tax IF ( (NEW.cobill_qty <> OLD.cobill_qty) OR (NEW.cobill_taxtype_id <> OLD.cobill_taxtype_id) ) THEN PERFORM calculateTaxHist( 'cobilltax', NEW.cobill_id, COALESCE(_r.cobmisc_taxzone_id, -1), NEW.cobill_taxtype_id, COALESCE(_r.cobmisc_shipdate, CURRENT_DATE), COALESCE(_r.cobmisc_curr_id, -1), (NEW.cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ) FROM coitem WHERE (coitem_id=NEW.cobill_coitem_id); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cobilltrigger() OWNER TO admin; -- -- Name: _cobmiscbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cobmiscbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM cobmisctax WHERE (taxhist_parent_id=OLD.cobmisc_id); RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cobmiscbeforetrigger() OWNER TO admin; -- -- Name: _cobmisctrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _cobmisctrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN -- Something can go here RETURN OLD; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Freight Tax IF (NEW.cobmisc_freight <> 0) THEN PERFORM calculateTaxHist( 'cobmisctax', NEW.cobmisc_id, NEW.cobmisc_taxzone_id, getFreightTaxtypeId(), NEW.cobmisc_invcdate, NEW.cobmisc_curr_id, NEW.cobmisc_freight ); END IF; END IF; -- Update row IF (TG_OP = 'UPDATE') THEN -- Calculate Tax IF (COALESCE(NEW.cobmisc_taxzone_id,-1) <> COALESCE(OLD.cobmisc_taxzone_id,-1)) THEN UPDATE cobill SET cobill_taxtype_id=getItemTaxType(itemsite_item_id,NEW.cobmisc_taxzone_id) FROM coitem JOIN itemsite ON (coitem_itemsite_id=itemsite_id) WHERE ((coitem_id=cobill_coitem_id) AND (cobill_cobmisc_id=NEW.cobmisc_id)); END IF; IF ( (NEW.cobmisc_freight <> OLD.cobmisc_freight) OR (COALESCE(NEW.cobmisc_taxzone_id,-1) <> COALESCE(OLD.cobmisc_taxzone_id,-1)) OR (NEW.cobmisc_invcdate <> OLD.cobmisc_invcdate) OR (NEW.cobmisc_curr_id <> OLD.cobmisc_curr_id) ) THEN PERFORM calculateTaxHist( 'cobmisctax', NEW.cobmisc_id, NEW.cobmisc_taxzone_id, getFreightTaxtypeId(), NEW.cobmisc_invcdate, NEW.cobmisc_curr_id, NEW.cobmisc_freight ); PERFORM calculateTaxHist( 'cobilltax', cobill_id, NEW.cobmisc_taxzone_id, cobill_taxtype_id, NEW.cobmisc_invcdate, NEW.cobmisc_curr_id, (cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ) FROM cobill JOIN coitem ON (coitem_id = cobill_coitem_id) WHERE (cobill_cobmisc_id = NEW.cobmisc_id); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._cobmisctrigger() OWNER TO admin; -- -- Name: _commenttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _commenttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NEW.comment_cmnttype_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Comment Type ID.'; ELSIF (NEW.comment_source = 'INCDT') THEN UPDATE incdt SET incdt_updated = now() WHERE incdt_id = NEW.comment_source_id; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._commenttrigger() OWNER TO admin; -- -- Name: _companytrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _companytrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _used BOOLEAN := false; BEGIN IF (NEW.company_external AND NOT OLD.company_external) THEN IF EXISTS(SELECT accnt_id FROM accnt, company, ( SELECT DISTINCT apaccnt_ap_accnt_id AS test_accnt_id FROM apaccnt UNION SELECT DISTINCT apaccnt_discount_accnt_id FROM apaccnt UNION SELECT DISTINCT apaccnt_prepaid_accnt_id FROM apaccnt UNION SELECT DISTINCT apopen_accnt_id FROM apopen UNION SELECT DISTINCT araccnt_ar_accnt_id FROM araccnt UNION SELECT DISTINCT araccnt_deferred_accnt_id FROM araccnt UNION SELECT DISTINCT araccnt_freight_accnt_id FROM araccnt UNION SELECT DISTINCT araccnt_prepaid_accnt_id FROM araccnt UNION SELECT DISTINCT aropen_accnt_id FROM aropen UNION SELECT DISTINCT bankaccnt_accnt_id FROM bankaccnt UNION SELECT DISTINCT bankaccnt_rec_accnt_id FROM bankaccnt UNION SELECT DISTINCT budgitem_accnt_id FROM budgitem UNION SELECT DISTINCT cashrcptmisc_accnt_id FROM cashrcptmisc UNION SELECT DISTINCT cmhead_misc_accnt_id FROM cmhead UNION SELECT DISTINCT cobmisc_misc_accnt_id FROM cobmisc UNION SELECT DISTINCT cohead_misc_accnt_id FROM cohead UNION SELECT DISTINCT coitem_cos_accnt_id FROM coitem UNION SELECT DISTINCT costcat_adjustment_accnt_id FROM costcat UNION SELECT DISTINCT costcat_asset_accnt_id FROM costcat UNION SELECT DISTINCT costcat_freight_accnt_id FROM costcat UNION SELECT DISTINCT costcat_invcost_accnt_id FROM costcat UNION SELECT DISTINCT costcat_laboroverhead_accnt_id FROM costcat UNION SELECT DISTINCT costcat_liability_accnt_id FROM costcat UNION SELECT DISTINCT costcat_matusage_accnt_id FROM costcat UNION SELECT DISTINCT costcat_mfgscrap_accnt_id FROM costcat UNION SELECT DISTINCT costcat_purchprice_accnt_id FROM costcat UNION SELECT DISTINCT costcat_scrap_accnt_id FROM costcat UNION SELECT DISTINCT costcat_shipasset_accnt_id FROM costcat UNION SELECT DISTINCT costcat_toliability_accnt_id FROM costcat UNION SELECT DISTINCT costcat_transform_accnt_id FROM costcat UNION SELECT DISTINCT costcat_wip_accnt_id FROM costcat UNION SELECT DISTINCT costelem_exp_accnt_id FROM costelem UNION SELECT DISTINCT expcat_exp_accnt_id FROM expcat UNION SELECT DISTINCT expcat_freight_accnt_id FROM expcat UNION SELECT DISTINCT expcat_liability_accnt_id FROM expcat UNION SELECT DISTINCT expcat_purchprice_accnt_id FROM expcat UNION SELECT DISTINCT glseries_accnt_id FROM glseries UNION SELECT DISTINCT gltrans_accnt_id FROM gltrans UNION SELECT DISTINCT invchead_misc_accnt_id FROM invchead UNION SELECT DISTINCT quhead_misc_accnt_id FROM quhead UNION SELECT DISTINCT salesaccnt_cor_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_cos_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_cow_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_credit_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_returns_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_sales_accnt_id FROM salesaccnt UNION SELECT DISTINCT salescat_ar_accnt_id FROM salescat UNION SELECT DISTINCT salescat_prepaid_accnt_id FROM salescat UNION SELECT DISTINCT salescat_sales_accnt_id FROM salescat UNION SELECT DISTINCT stdjrnlitem_accnt_id FROM stdjrnlitem UNION SELECT DISTINCT tax_sales_accnt_id FROM tax UNION SELECT DISTINCT taxauth_accnt_id FROM taxauth UNION SELECT DISTINCT vodist_accnt_id FROM vodist UNION SELECT DISTINCT warehous_default_accnt_id FROM whsinfo ) AS dummy WHERE ((accnt_id=test_accnt_id) AND (accnt_company=company_number) AND (accnt_company=NEW.company_number)) ) THEN RAISE EXCEPTION 'Cannot make Company % External because it is used in the local database.', NEW.company_number; ELSIF (fetchMetricBool('EnableReturnAuth')) THEN IF EXISTS(SELECT accnt_id FROM accnt, company, ( SELECT DISTINCT rahead_misc_accnt_id AS test_accnt_id FROM rahead UNION SELECT DISTINCT raitem_cos_accnt_id FROM raitem ) AS dummy WHERE ((accnt_id=test_accnt_id) AND (accnt_company=company_number) AND (accnt_company=NEW.company_number)) ) THEN RAISE EXCEPTION 'Cannot make Company % External because it is used in the local database.', NEW.company_number; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._companytrigger() OWNER TO admin; -- -- Name: _contrctaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _contrctaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN -- synchronize contract effectivity with item source effectivity IF (NEW.contrct_effective <> OLD.contrct_effective) THEN UPDATE itemsrc SET itemsrc_effective=NEW.contrct_effective WHERE itemsrc_contrct_id=NEW.contrct_id; END IF; IF (NEW.contrct_expires <> OLD.contrct_expires) THEN UPDATE itemsrc SET itemsrc_expires=NEW.contrct_expires WHERE itemsrc_contrct_id=NEW.contrct_id; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._contrctaftertrigger() OWNER TO admin; -- -- Name: _crmacctaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _crmacctaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _gotpriv BOOLEAN; BEGIN /* update _number and _name separately to propagate just what changed. the priv manipulation allows targeted updates of crmaccount-maintained data (note: grantPriv() == false if the user already had the priv, true if this call granted the priv). */ IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN IF (NEW.crmacct_cust_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainCustomerMasters'); UPDATE custinfo SET cust_number = NEW.crmacct_number WHERE ((cust_id=NEW.crmacct_cust_id) AND (cust_number!=NEW.crmacct_number)); UPDATE custinfo SET cust_name = NEW.crmacct_name WHERE ((cust_id=NEW.crmacct_cust_id) AND (cust_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainCustomerMasters'); END IF; END IF; IF (NEW.crmacct_emp_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainEmployees'); UPDATE emp SET emp_code = NEW.crmacct_number WHERE ((emp_id=NEW.crmacct_emp_id) AND (emp_code!=NEW.crmacct_number)); UPDATE emp SET emp_name = NEW.crmacct_name WHERE ((emp_id=NEW.crmacct_emp_id) AND (emp_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainEmployees'); END IF; END IF; IF (NEW.crmacct_prospect_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainProspectMasters'); UPDATE prospect SET prospect_number = NEW.crmacct_number WHERE ((prospect_id=NEW.crmacct_prospect_id) AND (prospect_number!=NEW.crmacct_number)); UPDATE prospect SET prospect_name = NEW.crmacct_name WHERE ((prospect_id=NEW.crmacct_prospect_id) AND (prospect_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainProspectMasters'); END IF; END IF; IF (NEW.crmacct_salesrep_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainSalesReps'); UPDATE salesrep SET salesrep_number = NEW.crmacct_number WHERE ((salesrep_id=NEW.crmacct_salesrep_id) AND (salesrep_number!=NEW.crmacct_number)); UPDATE salesrep SET salesrep_name = NEW.crmacct_name WHERE ((salesrep_id=NEW.crmacct_salesrep_id) AND (salesrep_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainSalesReps'); END IF; END IF; IF (NEW.crmacct_taxauth_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainTaxAuthorities'); UPDATE taxauth SET taxauth_code = NEW.crmacct_number WHERE ((taxauth_id=NEW.crmacct_taxauth_id) AND (taxauth_code!=NEW.crmacct_number)); UPDATE taxauth SET taxauth_name = NEW.crmacct_name WHERE ((taxauth_id=NEW.crmacct_taxauth_id) AND (taxauth_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainTaxAuthorities'); END IF; END IF; IF (NEW.crmacct_vend_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainVendors'); UPDATE vendinfo SET vend_number = NEW.crmacct_number WHERE ((vend_id=NEW.crmacct_vend_id) AND (vend_number!=NEW.crmacct_number)); UPDATE vendinfo SET vend_name = NEW.crmacct_name WHERE ((vend_id=NEW.crmacct_vend_id) AND (vend_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainVendors'); END IF; END IF; -- Link Primary and Secondary Contacts to this Account if they are not already IF (NEW.crmacct_cntct_id_1 IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainAllContacts'); UPDATE cntct SET cntct_crmacct_id = NEW.crmacct_id WHERE cntct_id=NEW.crmacct_cntct_id_1; IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainAllContacts'); END IF; END IF; IF (NEW.crmacct_cntct_id_2 IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainAllContacts'); UPDATE cntct SET cntct_crmacct_id = NEW.crmacct_id WHERE cntct_id=NEW.crmacct_cntct_id_2; IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainAllContacts'); END IF; END IF; -- cannot have fkey references to system catalogs so enforce them here IF (NEW.crmacct_usr_username IS NOT NULL) THEN IF (NOT EXISTS(SELECT usr_username FROM usr WHERE usr_username=NEW.crmacct_usr_username)) THEN RAISE EXCEPTION 'User % does not exist so this CRM Account Number is invalid.', NEW.crmacct_usr_username; END IF; IF (TG_OP = 'UPDATE') THEN -- reminder: this evaluates to false if either is NULL IF (NEW.crmacct_usr_username != OLD.crmacct_usr_username) THEN RAISE EXCEPTION 'Cannot change the user name for %', OLD.crmacct_usr_username; END IF; END IF; UPDATE usrpref SET usrpref_value = NEW.crmacct_name WHERE ((usrpref_username=NEW.crmacct_usr_username) AND (usrpref_name='propername') AND (usrpref_value!=NEW.crmacct_name)); END IF; ELSIF (TG_OP = 'DELETE') THEN IF (OLD.crmacct_cust_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Customer [xtuple: deleteCrmAccount, -1]'; END IF; IF (OLD.crmacct_emp_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is an Employee [xtuple: deleteCrmAccount, -7]'; END IF; IF (OLD.crmacct_prospect_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Prospect [xtuple: deleteCrmAccount, -3]'; END IF; DELETE FROM salesrep WHERE salesrep_id = OLD.crmacct_salesrep_id; IF (OLD.crmacct_salesrep_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Sales Rep [xtuple: deleteCrmAccount, -6]'; END IF; IF (OLD.crmacct_taxauth_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Tax Authority [xtuple: deleteCrmAccount, -5]'; END IF; IF (EXISTS(SELECT usename FROM pg_user WHERE usename=OLD.crmacct_usr_username)) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a User [xtuple: deleteCrmAccount, -8]'; END IF; IF (OLD.crmacct_vend_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Vendor [xtuple: deleteCrmAccount, -2]'; END IF; DELETE FROM imageass WHERE (imageass_source_id=OLD.crmacct_id) AND (imageass_source='CRMA'); DELETE FROM url WHERE (url_source_id=OLD.crmacct_id) AND (url_source='CRMA'); END IF; SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'CRMA', NEW.crmacct_id, ('Created by ' || getEffectiveXtUser())); ELSIF (TG_OP = 'DELETE') THEN PERFORM postComment(_cmnttypeid, 'CRMA', OLD.crmacct_id, 'Deleted "' || OLD.crmacct_number || '"'); END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._crmacctaftertrigger() OWNER TO admin; -- -- Name: _crmacctbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _crmacctbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _count INTEGER; BEGIN -- disallow reusing crmacct_numbers IF (TG_OP IN ('INSERT', 'UPDATE')) THEN IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.crmacct_number); END IF; NEW.crmacct_usr_username := LOWER(TRIM(NEW.crmacct_usr_username)); IF (NEW.crmacct_usr_username = '') THEN NEW.crmacct_usr_username = NULL; END IF; NEW.crmacct_owner_username := LOWER(TRIM(NEW.crmacct_owner_username)); IF (COALESCE(NEW.crmacct_owner_username, '') = '') THEN NEW.crmacct_owner_username = getEffectiveXtUser(); END IF; IF (NEW.crmacct_competitor_id < 0) THEN NEW.crmacct_competitor_id := NULL; END IF; IF (NEW.crmacct_partner_id < 0) THEN NEW.crmacct_partner_id := NULL; END IF; NEW.crmacct_number = UPPER(NEW.crmacct_number); IF (TG_OP = 'UPDATE') THEN -- TODO: why not ALTER USER OLD.crmacct_number RENAME TO LOWER(NEW.crmacct_number)? IF (NEW.crmacct_number != UPPER(OLD.crmacct_number) AND NEW.crmacct_usr_username IS NOT NULL AND UPPER(NEW.crmacct_usr_username) != NEW.crmacct_number) THEN RAISE EXCEPTION 'The CRM Account % is associated with a system User so the number cannot be changed.', NEW.crmacct_number; END IF; END IF; ELSIF (TG_OP = 'DELETE') THEN UPDATE cntct SET cntct_crmacct_id = NULL WHERE cntct_crmacct_id = OLD.crmacct_id; DELETE FROM docass WHERE docass_source_id = OLD.crmacct_id AND docass_source_type = 'CRMA'; DELETE FROM docass WHERE docass_target_id = OLD.crmacct_id AND docass_target_type = 'CRMA'; GET DIAGNOSTICS _count = ROW_COUNT; RAISE DEBUG 'updated % contacts', _count; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._crmacctbeforetrigger() OWNER TO admin; -- -- Name: _custaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _custaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _whsId INTEGER := -1; BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_cust_id=NEW.cust_id, crmacct_name=NEW.cust_name, crmacct_prospect_id=NULL WHERE crmacct_number=NEW.cust_number; IF (FOUND) THEN DELETE FROM prospect WHERE prospect_id=NEW.cust_id; EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_cust_id, crmacct_cntct_id_1, crmacct_cntct_id_2 ) VALUES (NEW.cust_number, NEW.cust_name, NEW.cust_active, 'O', NEW.cust_id, NEW.cust_cntct_id, NEW.cust_corrcntct_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; PERFORM updateCharAssignment('C', NEW.cust_id, char_id, charass_value) FROM custtype JOIN charass ON (custtype_id=charass_target_id AND charass_target_type='CT') JOIN char ON (charass_char_id=char_id) WHERE ((custtype_id=NEW.cust_custtype_id) AND (custtype_char) AND (charass_default)); ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.cust_number WHERE ((crmacct_cust_id=NEW.cust_id) AND (crmacct_number!=NEW.cust_number)); UPDATE crmacct SET crmacct_name = NEW.cust_name WHERE ((crmacct_cust_id=NEW.cust_id) AND (crmacct_name!=NEW.cust_name)); END IF; IF (TG_OP = 'INSERT') THEN -- find the warehouse for which to create evntlog entries SELECT usrpref_value INTO _whsId FROM usrpref WHERE usrpref_username = getEffectiveXtUser() AND usrpref_name = 'PreferredWarehouse'; INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT DISTINCT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'C', NEW.cust_id, _whsId, NEW.cust_number FROM evntnot, evnttype WHERE ((evntnot_evnttype_id=evnttype_id) AND (evnttype_name='NewCustomer')); END IF; IF (fetchMetricBool('CustomerChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.cust_number <> NEW.cust_number) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.cust_id, ('Number changed from "' || OLD.cust_number || '" to "' || NEW.cust_number || '"') ); END IF; IF (OLD.cust_name <> NEW.cust_name) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.cust_id, ('Name changed from "' || OLD.cust_name || '" to "' || NEW.cust_name || '"') ); END IF; IF (OLD.cust_active <> NEW.cust_active) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, CASE WHEN NEW.cust_active THEN 'Activated' ELSE 'Deactivated' END); END IF; IF (OLD.cust_discntprcnt <> NEW.cust_discntprcnt) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Discount changed from "' || formatprcnt(OLD.cust_discntprcnt) || '%" to "' || formatprcnt(NEW.cust_discntprcnt) || '%"') ); END IF; IF (OLD.cust_creditlmt <> NEW.cust_creditlmt) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Credit Limit changed from ' || formatMoney(OLD.cust_creditlmt) || ' to ' || formatMoney(NEW.cust_creditlmt))); END IF; IF (OLD.cust_creditstatus <> NEW.cust_creditstatus) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Credit Status Changed from "' || CASE OLD.cust_creditstatus WHEN 'G' THEN 'In Good Standing' WHEN 'W' THEN 'Credit Warning' WHEN 'H' THEN 'Credit Hold' ELSE 'Unknown/Error' END || '" to "' || CASE NEW.cust_creditstatus WHEN 'G' THEN 'In Good Standing' WHEN 'W' THEN 'Credit Warning' WHEN 'H' THEN 'Credit Hold' ELSE 'Unknown/Error' END || '"') ); END IF; IF (OLD.cust_custtype_id <> NEW.cust_custtype_id) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Customer type changed from "' || (SELECT custtype_code FROM custtype WHERE custtype_id = OLD.cust_custtype_id) || '" to "' || (SELECT custtype_code FROM custtype WHERE custtype_id = NEW.cust_custtype_id) || '"') ); END IF; IF (COALESCE(OLD.cust_gracedays,-1) <> COALESCE(NEW.cust_gracedays,-1)) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Grace Days changed from "' || COALESCE(TEXT(OLD.cust_gracedays), 'Default') || '" to "' || COALESCE(TEXT(NEW.cust_gracedays), 'Default') || '"')); END IF; IF (OLD.cust_terms_id <> NEW.cust_terms_id) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Terms changed from "' || (SELECT terms_code FROM terms WHERE terms_id = OLD.cust_terms_id) || '" to "' || (SELECT terms_code FROM terms WHERE terms_id = NEW.cust_terms_id) || '"')); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._custaftertrigger() OWNER TO admin; -- -- Name: _custinfoafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _custinfoafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- handle transitory state when converting customer to prospect IF EXISTS(SELECT quhead_id FROM quhead WHERE (quhead_cust_id=OLD.cust_id) AND NOT EXISTS(SELECT prospect_id FROM prospect WHERE prospect_id=OLD.cust_id)) THEN RAISE EXCEPTION '[xtuple: deleteCustomer, -8]'; END IF; IF EXISTS(SELECT invchead_id FROM invchead WHERE (invchead_cust_id=OLD.cust_id)) THEN RAISE EXCEPTION '[xtuple: deleteCustomer, -7]'; END IF; -- end TODO IF EXISTS(SELECT checkhead_recip_id FROM checkhead WHERE ((checkhead_recip_id=OLD.cust_id) AND (checkhead_recip_type='C'))) THEN RAISE EXCEPTION '[xtuple: deleteCustomer, -6]'; END IF; DELETE FROM taxreg WHERE ((taxreg_rel_type='C') AND (taxreg_rel_id=OLD.cust_id)); DELETE FROM ipsass WHERE (ipsass_cust_id=OLD.cust_id); DELETE FROM docass WHERE docass_source_id = OLD.cust_id AND docass_source_type = 'C'; DELETE FROM docass WHERE docass_target_id = OLD.cust_id AND docass_target_type = 'C'; IF (fetchMetricBool('CustomerChangeLog')) THEN PERFORM postComment(cmnttype_id, 'C', OLD.cust_id, ('Deleted "' || OLD.cust_number || '"')) FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; ALTER FUNCTION public._custinfoafterdeletetrigger() OWNER TO admin; -- -- Name: _custinfobeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _custinfobeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainCustomerMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Customers.'; END IF; UPDATE crmacct SET crmacct_cust_id = NULL WHERE crmacct_cust_id = OLD.cust_id; RETURN OLD; END; $$; ALTER FUNCTION public._custinfobeforedeletetrigger() OWNER TO admin; -- -- Name: _custtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _custtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainCustomerMasters') OR checkPrivilege('PostMiscInvoices')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Customers.'; END IF; IF (NEW.cust_number IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Customer Number.'; END IF; IF (LENGTH(COALESCE(NEW.cust_name,''))=0) THEN RAISE EXCEPTION 'You must supply a valid Customer Name.'; END IF; IF (NEW.cust_custtype_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Customer Type ID.'; END IF; IF (NEW.cust_salesrep_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Sales Rep ID.'; END IF; IF (NEW.cust_terms_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Terms Code ID.'; END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.cust_number); END IF; NEW.cust_number := UPPER(NEW.cust_number); RETURN NEW; END; $$; ALTER FUNCTION public._custtrigger() OWNER TO admin; -- -- Name: _custtypeafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _custtypeafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (SELECT fetchMetricValue('DefaultCustType') = OLD.custtype_id) THEN RAISE EXCEPTION 'Cannot delete the default Customer Type [xtuple: custtype, -1, %]', OLD.custtype_code; END IF; RETURN OLD; END; $$; ALTER FUNCTION public._custtypeafterdeletetrigger() OWNER TO admin; -- -- Name: _custtypetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _custtypetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _code TEXT; BEGIN -- Checks IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (LENGTH(COALESCE(NEW.custtype_code, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Customer Type Code.'; END IF; SELECT custtype_code INTO _code FROM custtype WHERE ( (UPPER(custtype_code)=UPPER(NEW.custtype_code)) AND (custtype_id<>NEW.custtype_id) ); IF (FOUND) THEN RAISE EXCEPTION 'The Customer Type Code entered cannot be used as it is in use.'; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._custtypetrigger() OWNER TO admin; -- -- Name: _docasstrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _docasstrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NEW.docass_source_type = 'INCDT') THEN UPDATE incdt SET incdt_updated = now() WHERE incdt_id = NEW.docass_source_id; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._docasstrigger() OWNER TO admin; -- -- Name: _empafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _empafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (fetchMetricBool('EmployeeChangeLog')) THEN PERFORM postComment(cmnttype_id, 'EMP', OLD.emp_id, ('Deleted "' || OLD.emp_code || '"')) FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; ALTER FUNCTION public._empafterdeletetrigger() OWNER TO admin; -- -- Name: _empaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _empaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _newcrmacctname TEXT; BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_emp_id=NEW.emp_id, crmacct_name=NEW.emp_name WHERE crmacct_number=NEW.emp_code; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_emp_id, crmacct_cntct_id_1 ) VALUES (NEW.emp_code, NEW.emp_name, NEW.emp_active, 'I', NEW.emp_id, NEW.emp_cntct_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; /* TODO: default characteristic assignments based on empgrp? */ ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.emp_code WHERE ((crmacct_emp_id=NEW.emp_id) AND (crmacct_number!=NEW.emp_code)); UPDATE crmacct SET crmacct_name = NEW.emp_name WHERE ((crmacct_emp_id=NEW.emp_id) AND (crmacct_name!=NEW.emp_name)); END IF; IF (fetchMetricBool('EmployeeChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.emp_number <> NEW.emp_number) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, ('Number Changed from "' || OLD.emp_number || '" to "' || NEW.emp_number || '"')); END IF; IF (OLD.emp_code <> NEW.emp_code) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, ('Code Changed from "' || OLD.emp_code || '" to "' || NEW.emp_code || '"')); END IF; IF (OLD.emp_active <> NEW.emp_active) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, CASE WHEN NEW.emp_active THEN 'Activated' ELSE 'Deactivated' END); END IF; IF (COALESCE(OLD.emp_dept_id, -1) <> COALESCE(NEW.emp_dept_id, -1)) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, ('Department Changed from "' || COALESCE((SELECT dept_number FROM dept WHERE dept_id=OLD.emp_dept_id), '') || '" to "' || COALESCE((SELECT dept_number FROM dept WHERE dept_id=NEW.emp_dept_id), '') || '"')); END IF; IF (COALESCE(OLD.emp_shift_id, -1) <> COALESCE(NEW.emp_shift_id, -1)) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, ('Shift Changed from "' || COALESCE((SELECT shift_number FROM shift WHERE shift_id=OLD.emp_shift_id), '') || '" to "' || COALESCE((SELECT shift_number FROM shift WHERE shift_id=NEW.emp_shift_id), '') || '"')); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._empaftertrigger() OWNER TO admin; -- -- Name: _empbeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _empbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainEmployees')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Employees.'; END IF; UPDATE crmacct SET crmacct_emp_id = NULL WHERE crmacct_emp_id = OLD.emp_id; UPDATE salesrep SET salesrep_emp_id = NULL WHERE salesrep_emp_id = OLD.emp_id; DELETE FROM docass WHERE docass_source_id = OLD.emp_id AND docass_source_type = 'EMP'; DELETE FROM docass WHERE docass_target_id = OLD.emp_id AND docass_target_type = 'EMP'; RETURN OLD; END; $$; ALTER FUNCTION public._empbeforedeletetrigger() OWNER TO admin; -- -- Name: _empbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _empbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainEmployees')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Employees.'; END IF; IF (NEW.emp_code IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Employee Code.'; END IF; IF (NEW.emp_number IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Employee Number.'; END IF; IF (NEW.emp_id = NEW.emp_mgr_emp_id) THEN RAISE EXCEPTION 'An Employee may not be his or her own Manager.'; END IF; -- ERROR: cannot use column references in default expression IF (NEW.emp_name IS NULL) THEN NEW.emp_name = COALESCE(formatCntctName(NEW.emp_cntct_id), NEW.emp_number); END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.emp_number); END IF; NEW.emp_code := UPPER(NEW.emp_code); -- deprecated column emp_username IF (TG_OP = 'UPDATE' AND LOWER(NEW.emp_username) != LOWER(NEW.emp_code) AND EXISTS(SELECT 1 FROM crmacct WHERE crmacct_emp_id = NEW.emp_id AND crmacct_usr_username IS NOT NULL)) THEN NEW.emp_username = LOWER(NEW.emp_code); END IF; RETURN NEW; END; $$; ALTER FUNCTION public._empbeforetrigger() OWNER TO admin; -- -- Name: _gltransaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _gltransaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _externalCompany BOOLEAN := false; _updated BOOLEAN := false; BEGIN IF(TG_OP='DELETE') THEN RAISE EXCEPTION 'You may not delete G/L Transactions once they have been created.'; ELSIF (TG_OP = 'UPDATE') THEN SELECT company_external INTO _externalCompany FROM company JOIN accnt ON (company_number=accnt_company) WHERE (accnt_id=NEW.gltrans_accnt_id); IF (_externalCompany) THEN RAISE EXCEPTION 'Transactions are not allowed for G/L Accounts with External Company segments.'; END IF; IF(OLD.gltrans_id != NEW.gltrans_id) THEN _updated := true; ELSIF(OLD.gltrans_date != NEW.gltrans_date) THEN _updated := true; ELSIF(OLD.gltrans_accnt_id != NEW.gltrans_accnt_id) THEN _updated := true; ELSIF(OLD.gltrans_amount != NEW.gltrans_amount) THEN _updated := true; ELSIF(OLD.gltrans_username != NEW.gltrans_username) THEN _updated := true; ELSIF( (OLD.gltrans_sequence IS NULL AND NEW.gltrans_sequence IS NOT NULL) OR (OLD.gltrans_sequence IS NOT NULL AND NEW.gltrans_sequence IS NULL) OR (COALESCE(OLD.gltrans_sequence,0) != COALESCE(NEW.gltrans_sequence,0)) ) THEN _updated := true; ELSIF( (OLD.gltrans_created IS NULL AND NEW.gltrans_created IS NOT NULL) OR (OLD.gltrans_created IS NOT NULL AND NEW.gltrans_created IS NULL) OR (COALESCE(OLD.gltrans_created,now()) != COALESCE(NEW.gltrans_created,now())) ) THEN _updated := true; ELSIF( (OLD.gltrans_source IS NULL AND NEW.gltrans_source IS NOT NULL) OR (OLD.gltrans_source IS NOT NULL AND NEW.gltrans_source IS NULL) OR (COALESCE(OLD.gltrans_source,'') != COALESCE(NEW.gltrans_source,'')) ) THEN _updated := true; ELSIF( (OLD.gltrans_docnumber IS NULL AND NEW.gltrans_docnumber IS NOT NULL) OR (OLD.gltrans_docnumber IS NOT NULL AND NEW.gltrans_docnumber IS NULL) OR (COALESCE(OLD.gltrans_docnumber,'') != COALESCE(NEW.gltrans_docnumber,'')) ) THEN _updated := true; ELSIF( (OLD.gltrans_doctype IS NULL AND NEW.gltrans_doctype IS NOT NULL) OR (OLD.gltrans_doctype IS NOT NULL AND NEW.gltrans_doctype IS NULL) OR (COALESCE(OLD.gltrans_doctype,'') != COALESCE(NEW.gltrans_doctype,'')) ) THEN _updated := true; END IF; IF(_updated) THEN RAISE EXCEPTION 'You may not alter some G/L Transaction fields once they have been created.'; END IF; ELSE RAISE EXCEPTION 'trigger for gltrans table called in unexpected state.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._gltransaltertrigger() OWNER TO admin; -- -- Name: _gltransinserttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _gltransinserttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _reqNotes BOOLEAN; _externalCompany BOOLEAN := false; BEGIN -- Checks -- Start with privileges IF ((NEW.gltrans_doctype='JE') AND (NOT checkPrivilege('PostJournalEntries'))) THEN RAISE EXCEPTION 'You do not have privileges to create a Journal Entry.'; END IF; SELECT company_external INTO _externalCompany FROM company JOIN accnt ON (company_number=accnt_company) WHERE (accnt_id=NEW.gltrans_accnt_id); IF (_externalCompany) THEN RAISE EXCEPTION 'Transactions are not allowed for G/L Accounts with External Company segments.'; END IF; -- RAISE NOTICE '_gltransInsertTrigger(): company_external = %', _externalCompany; SELECT metric_value='t' INTO _reqNotes FROM metric WHERE(metric_name='MandatoryGLEntryNotes'); IF (_reqNotes IS NULL) THEN _reqNotes := false; END IF; IF ((NEW.gltrans_doctype='JE') AND _reqNotes AND (TRIM(BOTH FROM COALESCE(NEW.gltrans_notes,''))='')) THEN RAISE EXCEPTION 'Notes are required for Journal Entries.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._gltransinserttrigger() OWNER TO admin; -- -- Name: _grpprivtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _grpprivtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _returnVal INTEGER; BEGIN -- This looks like a candidate for a foreign key but isn't. -- fkeys don't work if the foreign key value resides in a child of the -- table and not the table itself. IF ((TG_OP = 'UPDATE' OR TG_OP = 'INSERT') AND (NOT EXISTS(SELECT priv_id FROM priv WHERE (priv_id=NEW.grppriv_priv_id)))) THEN RAISE EXCEPTION 'Privilege id % does not exist or is part of a disabled package.', NEW.grppriv_priv_id; RETURN OLD; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._grpprivtrigger() OWNER TO admin; -- -- Name: _imageasstrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _imageasstrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NEW.imageass_source = 'INCDT') THEN UPDATE incdt SET incdt_updated = now() WHERE incdt_id = NEW.imageass_source_id; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._imageasstrigger() OWNER TO admin; -- -- Name: _incdtbeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _incdtbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.incdt_id) AND (recur_parent_type='INCDT')); IF (_recurid IS NOT NULL) THEN SELECT MIN(incdt_id) INTO _newparentid FROM incdt WHERE ((incdt_recurring_incdt_id=OLD.inctd_id) AND (incdt_id!=OLD.incdt_id)); -- client is responsible for warning about deleting a recurring incdt IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; END IF; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._incdtbeforedeletetrigger() OWNER TO admin; -- -- Name: _incdtbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _incdtbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _rec RECORD; _check BOOLEAN; _crmacct INTEGER; BEGIN IF(TG_OP = 'DELETE') THEN _rec := OLD; ELSE _rec := NEW; END IF; -- Set the incident number if blank IF (TG_OP = 'INSERT') THEN IF (NEW.incdt_number IS NULL) THEN SELECT fetchIncidentNumber() INTO NEW.incdt_number; END IF; --- clear the number from the issue cache PERFORM clearNumberIssue('IncidentNumber', NEW.incdt_number); END IF; -- Description is required IF (LENGTH(COALESCE(NEW.incdt_summary,''))=0) THEN RAISE EXCEPTION 'You must supply a valid Incident Description.'; END IF; -- CRM Account is required IF (NEW.incdt_crmacct_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid CRM Account.'; END IF; -- Contact is required IF (NEW.incdt_cntct_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Contact.'; END IF; NEW.incdt_updated := now(); RETURN NEW; END; $$; ALTER FUNCTION public._incdtbeforetrigger() OWNER TO admin; -- -- Name: _incdttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _incdttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _counter INTEGER := 0; _whsId INTEGER := -1; _evntType TEXT; _cmnttypeid INTEGER := -1; _cmntid INTEGER := -1; BEGIN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='Notes to Comment'); IF NOT FOUND OR _cmnttypeid IS NULL THEN _cmnttypeid := -1; END IF; IF (TG_OP = 'DELETE') THEN -- This should never happen RETURN OLD; ELSIF (TG_OP = 'INSERT') THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'N', NULL, 'Incident Added'); _evntType = 'NewIncident'; IF (_cmnttypeid <> -1 AND COALESCE(NEW.incdt_descrip, '') <> '') THEN PERFORM postComment(_cmnttypeid, 'INCDT', NEW.incdt_id, NEW.incdt_descrip); END IF; ELSIF (TG_OP = 'UPDATE') THEN _evntType = 'UpdatedIncident'; IF (COALESCE(NEW.incdt_cntct_id,-1) <> COALESCE(OLD.incdt_cntct_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'C', NEW.incdt_cntct_id, ('Contact Changed: "' || COALESCE((SELECT cntct_first_name || ' ' || cntct_last_name FROM cntct WHERE (cntct_id=OLD.incdt_cntct_id)), '') || '" -> "' || COALESCE((SELECT cntct_first_name || ' ' || cntct_last_name FROM cntct WHERE (cntct_id=NEW.incdt_cntct_id)), '') || '"') ); END IF; IF (COALESCE(NEW.incdt_summary,'') <> COALESCE(OLD.incdt_summary,'')) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(NEW.incdt_id, ('Summary Updated: "' || COALESCE(OLD.incdt_summary, '') || '" -> "' || COALESCE(NEW.incdt_summary, '') || '"') ); END IF; IF (COALESCE(NEW.incdt_descrip,'') <> COALESCE(OLD.incdt_descrip,'')) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(NEW.incdt_id, ('Description Updated: "' || substr(COALESCE(OLD.incdt_descrip, ''), 1, 20) || '..." -> "' || substr(COALESCE(NEW.incdt_descrip, ''), 1, 20) || '..."') ); IF (_cmnttypeid <> -1) THEN -- find an existing comment SELECT comment_id INTO _cmntid FROM comment WHERE comment_source = 'INCDT' AND comment_source_id = NEW.incdt_id AND comment_cmnttype_id = _cmnttypeid; IF FOUND THEN UPDATE comment SET comment_text = NEW.incdt_descrip WHERE comment_id = _cmntid; ELSE PERFORM postComment(_cmnttypeid, 'INCDT', NEW.incdt_id, NEW.incdt_descrip); END IF; END IF; END IF; IF (NEW.incdt_status <> OLD.incdt_status) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'S', NULL, ('Status Changed: ' || CASE WHEN(OLD.incdt_status='N') THEN 'New' WHEN(OLD.incdt_status='F') THEN 'Feedback' WHEN(OLD.incdt_status='C') THEN 'Confirmed' WHEN(OLD.incdt_status='A') THEN 'Assigned' WHEN(OLD.incdt_status='R') THEN 'Resolved' WHEN(OLD.incdt_status='L') THEN 'Closed' ELSE OLD.incdt_status END || ' -> ' || CASE WHEN(NEW.incdt_status='N') THEN 'New' WHEN(NEW.incdt_status='F') THEN 'Feedback' WHEN(NEW.incdt_status='C') THEN 'Confirmed' WHEN(NEW.incdt_status='A') THEN 'Assigned' WHEN(NEW.incdt_status='R') THEN 'Resolved' WHEN(NEW.incdt_status='L') THEN 'Closed' ELSE NEW.incdt_status END ) ); IF (NEW.incdt_status = 'L') THEN _evntType = 'ClosedIncident'; ELSIF (OLD.incdt_status = 'L') THEN _evntType = 'ReopenedIncident'; END IF; END IF; IF (COALESCE(NEW.incdt_assigned_username,'') <> COALESCE(OLD.incdt_assigned_username,'')) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'A', NULL, ('Assigned to: "' || COALESCE(OLD.incdt_assigned_username, '') || '" -> "' || COALESCE(NEW.incdt_assigned_username, '') || '"') ); END IF; IF (COALESCE(NEW.incdt_incdtcat_id,-1) <> COALESCE(OLD.incdt_incdtcat_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'T', NEW.incdt_incdtcat_id, ('Category Changed: ' || COALESCE((SELECT incdtcat_name FROM incdtcat WHERE (incdtcat_id=OLD.incdt_incdtcat_id)), '') || ' -> ' || COALESCE((SELECT incdtcat_name FROM incdtcat WHERE (incdtcat_id=NEW.incdt_incdtcat_id)), '') || '') ); END IF; IF (COALESCE(NEW.incdt_incdtseverity_id,-1) <> COALESCE(OLD.incdt_incdtseverity_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'V', NEW.incdt_incdtseverity_id, ('Severity Changed: ' || COALESCE((SELECT incdtseverity_name FROM incdtseverity WHERE (incdtseverity_id=OLD.incdt_incdtseverity_id)), '') || ' -> ' || COALESCE((SELECT incdtseverity_name FROM incdtseverity WHERE (incdtseverity_id=NEW.incdt_incdtseverity_id)), '') || '') ); END IF; IF (COALESCE(NEW.incdt_incdtpriority_id,-1) <> COALESCE(OLD.incdt_incdtpriority_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'P', NEW.incdt_incdtpriority_id, ('Priority Changed: ' || COALESCE((SELECT incdtpriority_name FROM incdtpriority WHERE (incdtpriority_id=OLD.incdt_incdtpriority_id)), '') || ' -> ' || COALESCE((SELECT incdtpriority_name FROM incdtpriority WHERE (incdtpriority_id=NEW.incdt_incdtpriority_id)), '') || '') ); END IF; IF (COALESCE(NEW.incdt_incdtresolution_id,-1) <> COALESCE(OLD.incdt_incdtresolution_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'E', NEW.incdt_incdtresolution_id, ('Resolution Changed: ' || COALESCE((SELECT incdtresolution_name FROM incdtresolution WHERE (incdtresolution_id=OLD.incdt_incdtresolution_id)), '') || ' -> ' || COALESCE((SELECT incdtresolution_name FROM incdtresolution WHERE (incdtresolution_id=NEW.incdt_incdtresolution_id)), '') || '') ); END IF; END IF; -- find the warehouse for which to create evntlog entries SELECT usrpref_value INTO _whsId FROM usrpref WHERE usrpref_username = getEffectiveXtUser() AND usrpref_name = 'PreferredWarehouse'; INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT DISTINCT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'IC', NEW.incdt_id, _whsId, NEW.incdt_number FROM evntnot, evnttype WHERE ((evntnot_evnttype_id=evnttype_id) AND (evnttype_name=_evntType)); RETURN NEW; END; $$; ALTER FUNCTION public._incdttrigger() OWNER TO admin; -- -- Name: _invcheadaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _invcheadaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _cohead_id INTEGER; BEGIN -- Create a comment entry when on a Sales Order when an Invoice is Posted for that order -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'UPDATE') THEN IF ((OLD.invchead_posted != NEW.invchead_posted) AND NEW.invchead_posted) THEN SELECT cohead_id INTO _cohead_id FROM cohead WHERE (cohead_number = OLD.invchead_ordernumber); IF (FOUND) THEN PERFORM postComment( _cmnttypeid, 'S', _cohead_id, ('Invoice, ' || NEW.invchead_invcnumber || ', posted for this order') ); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._invcheadaftertrigger() OWNER TO admin; -- -- Name: _invcheadbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _invcheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'UPDATE') THEN IF (OLD.invchead_posted AND ((OLD.invchead_invcnumber != NEW.invchead_invcnumber) OR (OLD.invchead_invcdate != NEW.invchead_invcdate) OR (OLD.invchead_terms_id != NEW.invchead_terms_id) OR (OLD.invchead_salesrep_id != NEW.invchead_salesrep_id) OR (OLD.invchead_commission != NEW.invchead_commission) OR (OLD.invchead_taxzone_id != NEW.invchead_taxzone_id) OR (OLD.invchead_shipchrg_id != NEW.invchead_shipchrg_id) OR (OLD.invchead_prj_id != NEW.invchead_prj_id) OR (OLD.invchead_misc_accnt_id != NEW.invchead_misc_accnt_id) OR (OLD.invchead_misc_amount != NEW.invchead_misc_amount) OR (OLD.invchead_freight != NEW.invchead_freight))) THEN RAISE EXCEPTION 'Edit not allow on Posted Invoice.'; END IF; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM invcheadtax WHERE (taxhist_parent_id=OLD.invchead_id); SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.invchead_id) AND (recur_parent_type='I')); IF (_recurid IS NOT NULL) THEN SELECT invchead_id INTO _newparentid FROM invchead WHERE ((invchead_recurring_invchead_id=OLD.invchead_id) AND (invchead_id!=OLD.invchead_id)) ORDER BY invchead_invcdate LIMIT 1; IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; UPDATE invchead SET invchead_recurring_invchead_id=_newparentid WHERE invchead_recurring_invchead_id=OLD.invchead_id AND invchead_id!=OLD.invchead_id; END IF; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._invcheadbeforetrigger() OWNER TO admin; -- -- Name: _invcheadtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _invcheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN -- Something can go here RETURN OLD; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Freight Tax IF (NEW.invchead_freight <> 0) THEN PERFORM calculateTaxHist( 'invcheadtax', NEW.invchead_id, NEW.invchead_taxzone_id, getFreightTaxtypeId(), NEW.invchead_invcdate, NEW.invchead_curr_id, NEW.invchead_freight ); END IF; --- clear the number from the issue cache PERFORM clearNumberIssue('InvcNumber', NEW.invchead_invcnumber); END IF; -- Update row IF (TG_OP = 'UPDATE') THEN IF ( (NEW.invchead_freight <> OLD.invchead_freight) OR (COALESCE(NEW.invchead_taxzone_id,-1) <> COALESCE(OLD.invchead_taxzone_id,-1)) OR (NEW.invchead_invcdate <> OLD.invchead_invcdate) OR (NEW.invchead_curr_id <> OLD.invchead_curr_id) ) THEN -- Calculate invchead Tax PERFORM calculateTaxHist( 'invcheadtax', NEW.invchead_id, NEW.invchead_taxzone_id, getFreightTaxtypeId(), NEW.invchead_invcdate, NEW.invchead_curr_id, NEW.invchead_freight ); END IF; IF ( (COALESCE(NEW.invchead_taxzone_id,-1) <> COALESCE(OLD.invchead_taxzone_id,-1)) OR (NEW.invchead_invcdate <> OLD.invchead_invcdate) OR (NEW.invchead_curr_id <> OLD.invchead_curr_id) ) THEN -- Calculate invcitem Tax IF (COALESCE(NEW.invchead_taxzone_id,-1) <> COALESCE(OLD.invchead_taxzone_id,-1)) THEN UPDATE invcitem SET invcitem_taxtype_id=getItemTaxType(invcitem_item_id,NEW.invchead_taxzone_id) WHERE (invcitem_invchead_id=NEW.invchead_id); PERFORM calculateTaxHist( 'invcitemtax', invcitem_id, NEW.invchead_taxzone_id, invcitem_taxtype_id, NEW.invchead_invcdate, NEW.invchead_curr_id, (invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio) ) FROM invcitem WHERE (invcitem_invchead_id = NEW.invchead_id); END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._invcheadtrigger() OWNER TO admin; -- -- Name: _invcitembeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _invcitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _itemfractional BOOLEAN; BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM invcitemtax WHERE (taxhist_parent_id=OLD.invcitem_id); RETURN OLD; END IF; IF (TG_OP IN ('UPDATE','DELETE')) THEN IF (SELECT COUNT(invchead_id) > 0 FROM invchead WHERE ((invchead_id=OLD.invcitem_invchead_id) AND (invchead_posted))) THEN RAISE EXCEPTION 'Edit not allowed on Posted Invoices.'; END IF; END IF; -- If regular Item then enforce item_fractional IF (COALESCE(NEW.invcitem_item_id, -1) <> -1) THEN SELECT itemuomfractionalbyuom(NEW.invcitem_item_id, NEW.invcitem_qty_uom_id) INTO _itemfractional; IF (NOT _itemfractional) THEN IF (TRUNC(NEW.invcitem_ordered) <> NEW.invcitem_ordered) THEN RAISE EXCEPTION 'Item does not support fractional quantities'; END IF; IF (TRUNC(NEW.invcitem_billed) <> NEW.invcitem_billed) THEN RAISE EXCEPTION 'Item does not support fractional quantities'; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._invcitembeforetrigger() OWNER TO admin; -- -- Name: _invcitemtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _invcitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; -- Cache Invoice Head SELECT * INTO _r FROM invchead WHERE (invchead_id=NEW.invcitem_invchead_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Invoice head not found'; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Tax PERFORM calculateTaxHist( 'invcitemtax', NEW.invcitem_id, COALESCE(_r.invchead_taxzone_id, -1), NEW.invcitem_taxtype_id, COALESCE(_r.invchead_invcdate, CURRENT_DATE), COALESCE(_r.invchead_curr_id, -1), (NEW.invcitem_billed * NEW.invcitem_qty_invuomratio) * (NEW.invcitem_price / NEW.invcitem_price_invuomratio) ); END IF; -- Update row IF (TG_OP = 'UPDATE') THEN -- Calculate Tax IF ( (NEW.invcitem_billed <> OLD.invcitem_billed) OR (NEW.invcitem_qty_invuomratio <> OLD.invcitem_qty_invuomratio) OR (NEW.invcitem_price <> OLD.invcitem_price) OR (NEW.invcitem_price_invuomratio <> OLD.invcitem_price_invuomratio) OR (COALESCE(NEW.invcitem_taxtype_id, -1) <> COALESCE(OLD.invcitem_taxtype_id, -1)) ) THEN PERFORM calculateTaxHist( 'invcitemtax', NEW.invcitem_id, COALESCE(_r.invchead_taxzone_id, -1), NEW.invcitem_taxtype_id, COALESCE(_r.invchead_invcdate, CURRENT_DATE), COALESCE(_r.invchead_curr_id, -1), (NEW.invcitem_billed * NEW.invcitem_qty_invuomratio) * (NEW.invcitem_price / NEW.invcitem_price_invuomratio) ); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._invcitemtrigger() OWNER TO admin; -- -- Name: _ipsassbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _ipsassbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Checks IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; -- Business logic, disallow invalid combinations IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (LENGTH(COALESCE(NEW.ipsass_custtype_pattern,'')) != 0) THEN new.ipsass_cust_id = -1; new.ipsass_custtype_id = -1; new.ipsass_shipto_id = -1; new.ipsass_shipto_pattern = ''; ELSIF (COALESCE(NEW.ipsass_custtype_id,-1) > -1) THEN new.ipsass_cust_id = -1; new.ipsass_shipto_id = -1; new.ipsass_shipto_pattern = ''; new.ipsass_custtype_pattern = ''; ELSIF (LENGTH(COALESCE(NEW.ipsass_shipto_pattern,'')) != 0) THEN new.ipsass_custtype_id = -1; new.ipsass_shipto_id = -1; new.ipsass_custtype_pattern = ''; ELSE new.ipsass_shipto_id = COALESCE(NEW.ipsass_shipto_id,-1); new.ipsass_custtype_id = -1; new.ipsass_shipto_pattern = ''; new.ipsass_custtype_pattern = ''; END IF; RETURN NEW; ELSE RETURN OLD; END IF; END; $$; ALTER FUNCTION public._ipsassbeforetrigger() OWNER TO admin; -- -- Name: _ipsheadbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _ipsheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Checks IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN RETURN NEW; ELSE RETURN OLD; END IF; END; $$; ALTER FUNCTION public._ipsheadbeforetrigger() OWNER TO admin; -- -- Name: _ipsitemcharbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _ipsitemcharbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Checks IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (SELECT (COUNT(item_id)=0) FROM ipsiteminfo JOIN item ON (item_id=ipsitem_item_id) WHERE ((ipsitem_id=NEW.ipsitemchar_ipsitem_id) AND (item_config))) THEN RAISE EXCEPTION 'Characteristic prices may only be set on configured items.'; ELSIF (SELECT (COUNT(item_id)=0) FROM ipsiteminfo JOIN item ON (item_id=ipsitem_item_id) JOIN charass ON (charass_target_id=item_id AND charass_target_type='I') WHERE ((ipsitem_id=NEW.ipsitemchar_ipsitem_id) AND (charass_char_id=NEW.ipsitemchar_char_id) AND (charass_value=NEW.ipsitemchar_value))) THEN RAISE EXCEPTION 'No characteristic with matching value exists for this item.'; END IF; RETURN NEW; ELSE RETURN OLD; END IF; END; $$; ALTER FUNCTION public._ipsitemcharbeforetrigger() OWNER TO admin; -- -- Name: _ipsiteminfobeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _ipsiteminfobeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN -- Checks IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN RETURN NEW; ELSE RETURN OLD; END IF; END; $$; ALTER FUNCTION public._ipsiteminfobeforetrigger() OWNER TO admin; -- -- Name: _itemaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Items.'; END IF; -- Integrity checks IF (TG_OP = 'UPDATE') THEN IF ((OLD.item_type <> NEW.item_type) AND (NEW.item_type = 'L')) THEN IF (SELECT COUNT(*) != 0 FROM bomitem WHERE (bomitem_item_id = OLD.item_id)) THEN RAISE EXCEPTION 'This item is part of one or more Bills of Materials and cannot be a Planning Item.'; END IF; END IF; IF ((OLD.item_type <> NEW.item_type) AND (NEW.item_type IN ('R','S','T'))) THEN IF (SELECT COUNT(*) != 0 FROM itemsite WHERE ((itemsite_item_id=OLD.item_id) AND (itemsite_qtyonhand + qtyallocated(itemsite_id,startoftime(),endoftime()) + qtyordered(itemsite_id,startoftime(),endoftime()) > 0 ))) THEN RAISE EXCEPTION 'Item type not allowed when there are itemsites with quantities with on hand quantities or pending inventory activity for this item.'; END IF; END IF; -- If type changed remove costs and deactivate item sites IF (NEW.item_type <> OLD.item_type) THEN PERFORM updateCost(itemcost_id, 0) FROM itemcost WHERE (itemcost_item_id=OLD.item_id); UPDATE itemsite SET itemsite_active=false WHERE (itemsite_item_id=OLD.item_id); IF (NEW.item_type = 'R') THEN UPDATE itemsite SET itemsite_controlmethod='N' WHERE (itemsite_item_id=OLD.item_id); END IF; END IF; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='ItemChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'I', NEW.item_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.item_active <> NEW.item_active) THEN IF (NEW.item_active) THEN PERFORM postComment(_cmnttypeid, 'I', NEW.item_id, 'Activated'); ELSE PERFORM postComment(_cmnttypeid, 'I', NEW.item_id, 'Deactivated'); END IF; END IF; IF (OLD.item_descrip1 <> NEW.item_descrip1) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Description 1 Changed from "' || OLD.item_descrip1 || '" to "' || NEW.item_descrip1 || '"' ) ); END IF; IF (OLD.item_descrip2 <> NEW.item_descrip2) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Description 2 Changed from "' || OLD.item_descrip2 || '" to "' || NEW.item_descrip2 || '"' ) ); END IF; IF (OLD.item_inv_uom_id <> NEW.item_inv_uom_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Inventory UOM Changed from "' || (SELECT uom_name FROM uom WHERE uom_id=OLD.item_inv_uom_id) || '" (' || CAST(OLD.item_inv_uom_id AS TEXT) || ') to "' || (SELECT uom_name FROM uom WHERE uom_id=NEW.item_inv_uom_id) || '" (' || CAST(NEW.item_inv_uom_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_sold <> NEW.item_sold) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_sold) THEN 'Sold Changed from FALSE to TRUE' ELSE 'Sold Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_picklist <> NEW.item_picklist) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_picklist) THEN 'Pick List Changed from FALSE to TRUE' ELSE 'Pick List Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_fractional <> NEW.item_fractional) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_fractional) THEN 'Fractional Changed from FALSE to TRUE' ELSE 'Fractional Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_exclusive <> NEW.item_exclusive) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_exclusive) THEN 'Exclusive Changed from FALSE to TRUE' ELSE 'Exclusive Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_config <> NEW.item_config) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_config) THEN 'Configured Changed from FALSE to TRUE' ELSE 'Configured Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_listprice <> NEW.item_listprice) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'List Price Changed from "' || formatSalesPrice(OLD.item_listprice) || '" to "' || formatSalesPrice(NEW.item_listprice) || '"' ) ); END IF; -- Add New stuff IF (OLD.item_type <> NEW.item_type) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Type Changed from "' || OLD.item_type || '" to "' || NEW.item_type || '"' ) ); END IF; IF (OLD.item_price_uom_id <> NEW.item_price_uom_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Price UOM Changed from "' || (SELECT uom_name FROM uom WHERE uom_id=OLD.item_price_uom_id) || '" (' || CAST(OLD.item_price_uom_id AS TEXT) || ') to "' || (SELECT uom_name FROM uom WHERE uom_id=NEW.item_price_uom_id) || '" (' || CAST(NEW.item_price_uom_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_classcode_id <> NEW.item_classcode_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Class Code Changed from "' || (SELECT classcode_code || '-' || classcode_descrip FROM classcode WHERE classcode_id=OLD.item_classcode_id) || '" (' || CAST(OLD.item_classcode_id AS TEXT) || ') to "' || (SELECT classcode_code || '-' || classcode_descrip FROM classcode WHERE classcode_id=NEW.item_classcode_id) || '" (' || CAST(NEW.item_classcode_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_freightclass_id <> NEW.item_freightclass_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Freight Class Changed from "' || (SELECT freightclass_code || '-' || freightclass_descrip FROM freightclass WHERE freightclass_id=OLD.item_freightclass_id) || '" (' || CAST(OLD.item_freightclass_id AS TEXT) || ') to "' || (SELECT freightclass_code || '-' || freightclass_descrip FROM freightclass WHERE freightclass_id=NEW.item_freightclass_id) || '" (' || CAST(NEW.item_freightclass_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_prodcat_id <> NEW.item_prodcat_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Product Category Changed from "' || (SELECT prodcat_code || '-' || prodcat_descrip FROM prodcat WHERE prodcat_id=OLD.item_prodcat_id) || '" (' || CAST(OLD.item_prodcat_id AS TEXT) || ') to "' || (SELECT prodcat_code || '-' || prodcat_descrip FROM prodcat WHERE prodcat_id=NEW.item_prodcat_id) || '" (' || CAST(NEW.item_prodcat_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_upccode <> NEW.item_upccode) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'UPC Code Changed from "' || OLD.item_upccode || '" to "' || NEW.item_upccode || '"' ) ); END IF; IF (OLD.item_prodweight <> NEW.item_prodweight) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Product Weight Changed from "' || formatWeight(OLD.item_prodweight) || '" to "' || formatWeight(NEW.item_prodweight) || '"' ) ); END IF; IF (OLD.item_packweight <> NEW.item_packweight) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Packaging Weight Changed from "' || formatWeight(OLD.item_packweight) || '" to "' || formatWeight(NEW.item_packweight) || '"' ) ); END IF; IF (OLD.item_maxcost <> NEW.item_maxcost) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Maximum Desired Cost Changed from "' || formatCost(OLD.item_maxcost) || '" to "' || formatCost(NEW.item_maxcost) || '"' ) ); END IF; IF (OLD.item_listcost <> NEW.item_listcost) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'List Cost Changed from "' || formatCost(OLD.item_listcost) || '" to "' || formatCost(NEW.item_listcost) || '"' ) ); END IF; -- End changes END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM imageass WHERE ((imageass_source_id=OLD.item_id) AND (imageass_source='I')); DELETE FROM url WHERE ((url_source_id=OLD.item_id) AND (url_source='I')); DELETE FROM docass WHERE docass_source_id = OLD.item_id AND docass_source_type = 'I'; DELETE FROM docass WHERE docass_target_id = OLD.item_id AND docass_target_type = 'I'; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemaftertrigger() OWNER TO admin; -- -- Name: _itemaliastrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemaliastrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Aliases.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemaliastrigger() OWNER TO admin; -- -- Name: _itemcostaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemcostaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _itemNumber TEXT; _maxCost NUMERIC; _oldStdCost NUMERIC; _oldActCost NUMERIC; _actualCost NUMERIC; _standardCost NUMERIC; BEGIN -- Create Event if Standard or Actual Cost is greater than Max Cost IF NOT EXISTS(SELECT 1 FROM evntnot JOIN evnttype ON (evnttype_id = evntnot_evnttype_id) JOIN usrpref ON (evntnot_username = usrpref_username) WHERE evnttype_name = 'CostExceedsMaxDesired' AND usrpref_name = 'active' AND usrpref_value = 't') THEN RETURN NEW; END IF; SELECT item_number, item_maxcost, actcost(item_id), stdcost(item_id) INTO _itemNumber, _maxCost, _actualCost, _standardCost FROM item WHERE (item_id=NEW.itemcost_item_id); IF (_maxCost > 0.0) THEN -- IF (_standardCost > _maxCost) IF NOT EXISTS(SELECT 1 --COUNT(evntlog_id) FROM evntlog, evnttype WHERE evntlog_evnttype_id = evnttype_id AND evntlog_number LIKE (_itemNumber || ' -Standard- New:' || '%') AND (evntlog_dispatched IS NULL) AND CAST(evntlog_evnttime AS DATE) = current_date ) AND (_standardCost > _maxCost) THEN IF (TG_OP = 'INSERT') THEN _oldStdCost := 0; _oldActCost := 0; ELSE _oldStdCost := OLD.itemcost_stdcost; _oldActCost := OLD.itemcost_stdcost; END IF; INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_newvalue, evntlog_oldvalue ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, '', NEW.itemcost_item_id, itemsite_warehous_id, (_itemNumber || ' -Standard- ' || 'New: ' || formatCost(_standardCost) || ' Max: '|| formatCost(_MaxCost)), NEW.itemcost_stdcost, _oldStdCost FROM evntnot, evnttype, itemsite, usrpref WHERE ( (evntnot_evnttype_id=evnttype_id) AND (itemsite_item_id=NEW.itemcost_item_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (evnttype_name='CostExceedsMaxDesired') AND (itemsite_active) AND (usrpref_username = evntnot_username) AND (usrpref_name = 'active') AND (usrpref_value = 't')); -- LIMIT 1; END IF; IF NOT EXISTS( SELECT 1 FROM evntlog, evnttype WHERE evntlog_evnttype_id = evnttype_id AND evntlog_number LIKE (_itemNumber || ' -Actual- New:' || '%') AND (evntlog_dispatched IS NULL) AND CAST(evntlog_evnttime AS DATE) = current_date ) AND (_actualCost > _maxCost) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_newvalue, evntlog_oldvalue ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, '', NEW.itemcost_item_id, itemsite_warehous_id, (_itemNumber || ' -Actual- ' || 'New: ' || formatCost(_actualCost) || ' Max: '|| formatCost(_MaxCost)), NEW.itemcost_actcost, _oldActCost FROM evntnot, evnttype, itemsite, usrpref WHERE ( (evntnot_evnttype_id=evnttype_id) AND (itemsite_item_id=NEW.itemcost_item_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (evnttype_name='CostExceedsMaxDesired') AND (itemsite_active) AND (usrpref_username = evntnot_username) AND (usrpref_name = 'active') AND (usrpref_value = 't') ); --LIMIT 1; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemcostaftertrigger() OWNER TO admin; -- -- Name: _itemcosttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemcosttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN --Privilege Checks IF ( (TG_OP = 'INSERT') AND (NOT checkPrivilege('CreateCosts')) AND (NOT checkPrivilege('PostVouchers')) ) THEN RAISE EXCEPTION 'You do not have privileges to enter Item Costs.'; END IF; IF ( (TG_OP = 'UPDATE') AND (NOT checkPrivilege('EnterActualCosts')) AND (NOT checkPrivilege('PostVouchers')) AND (NOT checkPrivilege('UpdateActualCosts')) AND (NOT checkPrivilege('PostActualCosts')) AND (NOT checkPrivilege('PostStandardCosts')) ) THEN RAISE EXCEPTION 'You do not have privileges to update Item Costs.'; END IF; IF ( (TG_OP = 'DELETE') AND (NOT checkPrivilege('DeleteCosts')) ) THEN RAISE EXCEPTION 'You do not have privileges to delete Item Costs.'; END IF; IF (TG_OP = 'UPDATE') THEN IF (NEW.itemcost_actcost <> OLD.itemcost_actcost OR NEW.itemcost_curr_id <> OLD.itemcost_curr_id) THEN INSERT INTO costhist ( costhist_item_id, costhist_costelem_id, costhist_type, costhist_lowlevel, costhist_username, costhist_date, costhist_oldcost, costhist_newcost, costhist_oldcurr_id, costhist_newcurr_id ) VALUES ( NEW.itemcost_item_id, NEW.itemcost_costelem_id, 'A', NEW.itemcost_lowlevel, getEffectiveXtUser(), CURRENT_TIMESTAMP, OLD.itemcost_actcost, NEW.itemcost_actcost, OLD.itemcost_curr_id, NEW.itemcost_curr_id ); END IF; IF (NEW.itemcost_stdcost <> OLD.itemcost_stdcost) THEN INSERT INTO costhist ( costhist_item_id, costhist_costelem_id, costhist_type, costhist_lowlevel, costhist_username, costhist_date, costhist_oldcost, costhist_newcost, costhist_oldcurr_id, costhist_newcurr_id ) VALUES ( NEW.itemcost_item_id, NEW.itemcost_costelem_id, 'S', NEW.itemcost_lowlevel, getEffectiveXtUser(), CURRENT_TIMESTAMP, OLD.itemcost_stdcost, NEW.itemcost_stdcost, baseCurrId(), baseCurrId() ); END IF; RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN INSERT INTO costhist ( costhist_item_id, costhist_costelem_id, costhist_type, costhist_lowlevel, costhist_username, costhist_date, costhist_oldcost, costhist_newcost, costhist_oldcurr_id, costhist_newcurr_id ) VALUES ( NEW.itemcost_item_id, NEW.itemcost_costelem_id, 'N', NEW.itemcost_lowlevel, getEffectiveXtUser(), CURRENT_TIMESTAMP, 0, NEW.itemcost_actcost, baseCurrId(), NEW.itemcost_curr_id ); RETURN NEW; ELSIF (TG_OP = 'DELETE') THEN INSERT INTO costhist ( costhist_item_id, costhist_costelem_id, costhist_type, costhist_lowlevel, costhist_username, costhist_date, costhist_oldcost, costhist_newcost, costhist_oldcurr_id, costhist_newcurr_id ) VALUES ( OLD.itemcost_item_id, OLD.itemcost_costelem_id, 'D', OLD.itemcost_lowlevel, getEffectiveXtUser(), CURRENT_TIMESTAMP, OLD.itemcost_stdcost, 0, OLD.itemcost_curr_id, baseCurrId() ); RETURN OLD; END IF; END; $$; ALTER FUNCTION public._itemcosttrigger() OWNER TO admin; -- -- Name: _itemsiteaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemsiteaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _state INTEGER; _wasLocationControl BOOLEAN; _isLocationControl BOOLEAN; _wasLotSerial BOOLEAN; _isLotSerial BOOLEAN; _wasPerishable BOOLEAN; _isPerishable BOOLEAN; _qty NUMERIC; _maint BOOLEAN; _cost NUMERIC; _variance NUMERIC; _application TEXT; BEGIN -- Cache Application SELECT fetchMetricText('Application') INTO _application; -- Check if we are doing maintenance IF (TG_OP = 'INSERT') THEN _maint := TRUE; ELSIF (TG_OP = 'UPDATE') THEN IF ((OLD.itemsite_item_id != NEW.itemsite_item_id) OR (OLD.itemsite_warehous_id != NEW.itemsite_warehous_id) OR (OLD.itemsite_reorderlevel != NEW.itemsite_reorderlevel) OR (OLD.itemsite_ordertoqty != NEW.itemsite_ordertoqty) OR (OLD.itemsite_cyclecountfreq != NEW.itemsite_cyclecountfreq) OR (OLD.itemsite_planning_type != NEW.itemsite_planning_type) OR (OLD.itemsite_posupply != NEW.itemsite_posupply) OR (OLD.itemsite_wosupply != NEW.itemsite_wosupply) OR (OLD.itemsite_loccntrl != NEW.itemsite_loccntrl) OR (OLD.itemsite_safetystock != NEW.itemsite_safetystock) OR (OLD.itemsite_minordqty != NEW.itemsite_minordqty) OR (OLD.itemsite_multordqty != NEW.itemsite_multordqty) OR (OLD.itemsite_leadtime != NEW.itemsite_leadtime) OR (OLD.itemsite_abcclass != NEW.itemsite_abcclass) OR (OLD.itemsite_controlmethod != NEW.itemsite_controlmethod) OR (OLD.itemsite_active != NEW.itemsite_active) OR (OLD.itemsite_plancode_id != NEW.itemsite_plancode_id) OR (OLD.itemsite_costcat_id != NEW.itemsite_costcat_id) OR (OLD.itemsite_eventfence != NEW.itemsite_eventfence) OR (OLD.itemsite_sold != NEW.itemsite_sold) OR (OLD.itemsite_stocked != NEW.itemsite_stocked) OR (OLD.itemsite_location_id != NEW.itemsite_location_id) OR (OLD.itemsite_useparams != NEW.itemsite_useparams) OR (OLD.itemsite_useparamsmanual != NEW.itemsite_useparamsmanual) OR (OLD.itemsite_soldranking != NEW.itemsite_soldranking) OR (OLD.itemsite_createpr != NEW.itemsite_createpr) OR (OLD.itemsite_location != NEW.itemsite_location) OR (OLD.itemsite_location_comments != NEW.itemsite_location_comments) OR (OLD.itemsite_notes != NEW.itemsite_notes) OR (OLD.itemsite_perishable != NEW.itemsite_perishable) OR (OLD.itemsite_autoabcclass != NEW.itemsite_autoabcclass) OR (OLD.itemsite_ordergroup != NEW.itemsite_ordergroup) OR (OLD.itemsite_disallowblankwip != NEW.itemsite_disallowblankwip) OR (OLD.itemsite_maxordqty != NEW.itemsite_maxordqty) OR (OLD.itemsite_mps_timefence != NEW.itemsite_mps_timefence) OR (OLD.itemsite_createwo != NEW.itemsite_createwo) OR (OLD.itemsite_warrpurc != NEW.itemsite_warrpurc) OR (OLD.itemsite_costmethod != NEW.itemsite_costmethod) OR (OLD.itemsite_autoreg != NEW.itemsite_autoreg) OR (OLD.itemsite_lsseq_id != NEW.itemsite_lsseq_id) ) THEN IF (OLD.itemsite_item_id != NEW.itemsite_item_id) THEN RAISE EXCEPTION 'The item number on an itemsite may not be changed.'; ELSIF (OLD.itemsite_warehous_id != NEW.itemsite_warehous_id) THEN RAISE EXCEPTION 'The warehouse code on an itemsite may not be changed.'; END IF; _maint := TRUE; END IF; ELSE _maint := FALSE; END IF; IF (_maint) THEN -- Begin Maintenance -- Privilege Checks IF ( NOT checkPrivilege('MaintainItemSites') ) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Sites.'; END IF; -- Override values to avoid invalid data combinations IF (NOT NEW.itemsite_posupply) THEN UPDATE itemsite SET itemsite_createpr = FALSE WHERE (itemsite_id=NEW.itemsite_id); END IF; IF (NOT NEW.itemsite_wosupply) THEN UPDATE itemsite SET itemsite_createwo = FALSE WHERE (itemsite_id=NEW.itemsite_id); END IF; IF (NEW.itemsite_controlmethod NOT IN ('S','L')) THEN UPDATE itemsite SET itemsite_perishable = FALSE, itemsite_warrpurc = FALSE, itemsite_autoreg = FALSE, itemsite_lsseq_id = NULL WHERE (itemsite_id=NEW.itemsite_id); END IF; IF (NOT NEW.itemsite_loccntrl) THEN UPDATE itemsite SET itemsite_disallowblankwip = FALSE WHERE (itemsite_id=NEW.itemsite_id); END IF; IF (NOT NEW.itemsite_useparams) THEN UPDATE itemsite SET itemsite_reorderlevel = 0, itemsite_ordertoqty = 0, itemsite_minordqty = 0, itemsite_maxordqty = 0, itemsite_multordqty = 0, itemsite_useparamsmanual = FALSE WHERE (itemsite_id = NEW.itemsite_id); END IF; -- Integrity check IF (TG_OP = 'INSERT') THEN -- Handle MLC logic IF ( (NEW.itemsite_loccntrl) AND (NEW.itemsite_warehous_id IS NOT NULL) ) THEN IF (SELECT count(*)=0 FROM location WHERE ((location_warehous_id=NEW.itemsite_warehous_id) AND ( (NOT location_restrict) OR ( (location_restrict) AND (location_id IN ( SELECT locitem_location_id FROM locitem WHERE (locitem_item_id=NEW.itemsite_item_id) ) ) ) ))) THEN RAISE EXCEPTION 'You must first create at least one valid Location for this Item Site before it may be multiply located.'; END IF; END IF; --This could be made a table constraint later, but do not want to create a big problem --for users with problematic legacy data over a relatively trivial problem for now, --so we will just check moving forword. IF (NEW.itemsite_stocked AND NEW.itemsite_reorderlevel<=0) THEN RAISE EXCEPTION 'Stocked items must have postive reorder level specified.'; END IF; END IF; IF (TG_OP = 'UPDATE') THEN --This could be made a table constraint later, but do not want to create a big problem --for users with problematic legacy data over a relatively trivial problem for now, --so we will just check moving forword. IF ((NEW.itemsite_stocked) AND (NEW.itemsite_stocked != OLD.itemsite_stocked) --Avoid checking unless explicitly changed AND (NEW.itemsite_reorderlevel<=0)) THEN RAISE EXCEPTION 'Stocked items must have postive reorder level specified.'; END IF; END IF; IF (TG_OP = 'UPDATE') THEN -- Integrity check IF (NOT OLD.itemsite_loccntrl AND NEW.itemsite_loccntrl) THEN IF (SELECT count(*)=0 FROM location WHERE ((location_warehous_id=NEW.itemsite_warehous_id) AND ( (NOT location_restrict) OR ( (location_restrict) AND (location_id IN ( SELECT locitem_location_id FROM locitem WHERE (locitem_item_id=NEW.itemsite_item_id) ) ) ) ))) THEN RAISE EXCEPTION 'You must first create at least one valid Location for this Item Site before it may be multiply located.'; END IF; END IF; -- Update detail records based on control method changes _wasLocationControl := OLD.itemsite_loccntrl; _isLocationControl := NEW.itemsite_loccntrl; _wasLotSerial := OLD.itemsite_controlmethod IN ('S','L'); _isLotSerial := NEW.itemsite_controlmethod IN ('S','L'); _wasPerishable := OLD.itemsite_perishable; _isPerishable := NEW.itemsite_perishable; _state := 0; IF ( (_wasLocationControl) AND (_isLocationControl) ) THEN _state := 10; ELSIF ( (NOT _wasLocationControl) AND (NOT _isLocationControl) ) THEN _state := 20; ELSIF ( (NOT _wasLocationControl) AND (_isLocationControl) ) THEN _state := 30; ELSIF ( (_wasLocationControl) AND (NOT _isLocationControl) ) THEN _state := 40; END IF; IF ( (_wasLotSerial) AND (_isLotSerial) ) THEN _state := _state + 1; ELSIF ( (NOT _wasLotSerial) AND (NOT _isLotSerial) ) THEN _state := _state + 2; ELSIF ( (NOT _wasLotSerial) AND (_isLotSerial) ) THEN _state := _state + 3; ELSIF ( (_wasLotSerial) AND (NOT _isLotSerial) ) THEN _state := _state + 4; END IF; IF ( (_application = 'Standard') AND (_state IN (41, 43, 14, 34, 24, 42, 44)) ) THEN -- Check for Reservations IF (SELECT COUNT(*) > 0 FROM itemloc JOIN itemlocrsrv ON (itemlocrsrv_itemloc_id=itemloc_id) WHERE (itemloc_itemsite_id=OLD.itemsite_id)) THEN RAISE EXCEPTION 'Sales Order Reservations by Location exist for this Item Site'; END IF; END IF; IF (_state IN (41, 43)) THEN PERFORM consolidateLotSerial(OLD.itemsite_id); ELSIF (_state IN (14, 34)) THEN PERFORM consolidateLocations(OLD.itemsite_id); ELSIF (_state IN (24, 42, 44)) THEN RAISE NOTICE 'Deleting item site detail records,'; SELECT SUM(itemloc_qty) INTO _qty FROM itemloc, location WHERE ((itemloc_location_id=location_id) AND (NOT location_netable) AND (itemloc_itemsite_id=OLD.itemsite_id)); IF (_qty != 0) THEN UPDATE itemsite SET itemsite_qtyonhand = itemsite_qtyonhand + _qty, itemsite_nnqoh = itemsite_nnqoh - _qty WHERE (itemsite_id=OLD.itemsite_id); END IF; DELETE FROM itemloc WHERE (itemloc_itemsite_id=OLD.itemsite_id); END IF; IF (NEW.itemsite_qtyonhand != 0) THEN -- Handle detail creation -- Create itemloc records if they do not exist IF (_state IN (23, 32, 33)) THEN INSERT INTO itemloc ( itemloc_itemsite_id, itemloc_location_id, itemloc_expiration, itemloc_qty ) VALUES ( NEW.itemsite_id, -1, endOfTime(), NEW.itemsite_qtyonhand ); END IF; -- Handle Location distribution IF (_state IN (31, 32, 33, 34)) THEN IF (SELECT (COUNT(*)=1) FROM location WHERE ((location_id=NEW.itemsite_location_id) AND (location_warehous_id=NEW.itemsite_warehous_id) AND ( (NOT location_restrict) OR ( (location_restrict) AND (location_id IN ( SELECT locitem_location_id FROM locitem WHERE (locitem_item_id=NEW.itemsite_item_id) ) ) ) ))) THEN PERFORM initialDistribution(NEW.itemsite_id, NEW.itemsite_location_id); ELSE RAISE EXCEPTION 'A valid default location must be selected to distribute existing inventory to.'; END IF; END IF; -- Handle Lot/Serial distribution IF ( (_state = 13) OR (_state = 23) OR (_state = 33) OR (_state = 43) ) THEN RAISE NOTICE 'You should now use the Reassign Lot/Serial # window to assign Lot/Serial #s.'; END IF; END IF; IF (OLD.itemsite_costmethod='A' AND NEW.itemsite_costmethod='S') THEN -- TODO: Average costing cost method change SELECT stdcost(NEW.itemsite_item_id) * NEW.itemsite_qtyonhand INTO _cost; _variance := _cost - NEW.itemsite_value; NEW.itemsite_value := _cost; IF(_variance <> 0.0) THEN PERFORM insertGLTransaction( 'P/D', '', '', 'Itemsite converted from Average to Standard cost.', costcat_invcost_accnt_id, costcat_asset_accnt_id, NEW.itemsite_id, _variance, CURRENT_DATE ) FROM costcat WHERE(costcat_id=NEW.itemsite_costcat_id); UPDATE itemsite SET itemsite_value = _cost WHERE (itemsite_id = NEW.itemsite_id); END IF; END IF; END IF; -- Handle Perishable IF ( (_application = 'Standard') AND (_wasPerishable) AND (NOT _isPerishable) ) THEN UPDATE itemloc SET itemloc_expiration = endOfTime() WHERE (itemloc_itemsite_id = OLD.itemsite_id); PERFORM consolidateLotSerial(OLD.itemsite_id); END IF; -- If Planning Type changed to None then delete all Planned Orders IF ( (_application = 'Standard') AND (TG_OP = 'UPDATE') ) THEN IF (NEW.itemsite_planning_type = 'N' AND OLD.itemsite_planning_type <> 'N') THEN PERFORM deletePlannedOrder(planord_id, TRUE) FROM planord WHERE (planord_itemsite_id=NEW.itemsite_id); END IF; END IF; END IF; -- End Maintenance RETURN NEW; END; $$; ALTER FUNCTION public._itemsiteaftertrigger() OWNER TO admin; -- -- Name: _itemsitetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemsitetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _r RECORD; BEGIN -- Cache some information SELECT item_type INTO _r FROM item WHERE (item_id=NEW.itemsite_item_id); -- Override values to avoid invalid data combinations IF (_r.item_type IN ('J','R','S')) THEN NEW.itemsite_planning_type := 'N'; END IF; IF (_r.item_type = 'L') THEN NEW.itemsite_planning_type := 'S'; END IF; IF (TG_OP = 'UPDATE') THEN IF ( (NEW.itemsite_qtyonhand <> OLD.itemsite_qtyonhand) ) THEN IF (OLD.itemsite_freeze) THEN NEW.itemsite_qtyonhand := OLD.itemsite_qtyonhand; ELSE NEW.itemsite_datelastused := CURRENT_DATE; END IF; IF ( (NEW.itemsite_qtyonhand < 0) AND (OLD.itemsite_qtyonhand >= 0) AND (NEW.itemsite_eventfence > 0) ) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'I', NEW.itemsite_id, warehous_id, (item_number || '/' || warehous_code) FROM evntnot, evnttype, item, whsinfo WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=NEW.itemsite_warehous_id) AND (NEW.itemsite_item_id=item_id) AND (NEW.itemsite_warehous_id=warehous_id) AND (evnttype_name='QOHBelowZero') ); END IF; END IF; IF ( (NEW.itemsite_value <> OLD.itemsite_value) AND (OLD.itemsite_freeze) ) THEN NEW.itemsite_value := OLD.itemsite_value; END IF; END IF; IF (NEW.itemsite_qtyonhand < 0 AND NEW.itemsite_costmethod = 'A') THEN RAISE EXCEPTION 'Itemsite (%) is set to use average costing and is not allowed to have a negative quantity on hand.', NEW.itemsite_id; ELSIF (NEW.itemsite_value < 0 AND NEW.itemsite_costmethod = 'A') THEN RAISE EXCEPTION 'This transaction results in a negative itemsite value. Itemsite (%) is set to use average costing and is not allowed to have a negative value.', NEW.itemsite_id; END IF; -- Handle the ChangeLog IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='ItemSiteChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'IS', NEW.itemsite_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.itemsite_plancode_id <> NEW.itemsite_plancode_id) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Planner Code Changed from "' || oldplancode.plancode_code || '" to "' || newplancode.plancode_code || '"' ) ) FROM plancode AS oldplancode, plancode AS newplancode WHERE ( (oldplancode.plancode_id=OLD.itemsite_plancode_id) AND (newplancode.plancode_id=NEW.itemsite_plancode_id) ); END IF; IF (NEW.itemsite_reorderlevel <> OLD.itemsite_reorderlevel) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Reorder Level Changed from ' || formatQty(OLD.itemsite_reorderlevel) || ' to ' || formatQty(NEW.itemsite_reorderlevel ) ) ); END IF; IF (NEW.itemsite_ordertoqty <> OLD.itemsite_ordertoqty) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Order Up To Changed from ' || formatQty(OLD.itemsite_ordertoqty) || ' to ' || formatQty(NEW.itemsite_ordertoqty ) ) ); END IF; IF (NEW.itemsite_leadtime <> OLD.itemsite_leadtime) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Itemsite Leadtime Changed from ' || formatQty(OLD.itemsite_leadtime) || ' to ' || formatQty(NEW.itemsite_leadtime ) ) ); END IF; IF (NEW.itemsite_abcclass <> OLD.itemsite_abcclass) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Itemsite ABC Class Changed from ' || COALESCE(OLD.itemsite_abcclass, 'None') || ' to ' || COALESCE(NEW.itemsite_abcclass,'None') ) ); END IF; IF (NEW.itemsite_controlmethod <> OLD.itemsite_controlmethod) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Itemsite Control Method Changed from ' || COALESCE(OLD.itemsite_controlmethod,'None') || ' to ' || COALESCE(NEW.itemsite_controlmethod,'None') ) ); END IF; IF (OLD.itemsite_sold <> NEW.itemsite_sold) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, CASE WHEN (NEW.itemsite_sold) THEN 'Sold Changed from FALSE to TRUE' ELSE 'Sold Changed from TRUE to FALSE' END ); END IF; IF (OLD.itemsite_active <> NEW.itemsite_active) THEN IF (NEW.itemsite_active) THEN PERFORM postComment(_cmnttypeid, 'IS', NEW.itemsite_id, 'Activated'); ELSE PERFORM postComment(_cmnttypeid, 'IS', NEW.itemsite_id, 'Deactivated'); END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemsitetrigger() OWNER TO admin; -- -- Name: _itemsrcaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemsrcaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemSources')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Sources.'; END IF; -- Set default to false for other item sources of this item IF (COALESCE(NEW.itemsrc_default, FALSE) = TRUE) THEN UPDATE itemsrc SET itemsrc_default = FALSE WHERE ( (itemsrc_item_id = NEW.itemsrc_item_id) AND (itemsrc_id <> NEW.itemsrc_id) ); END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemsrcaftertrigger() OWNER TO admin; -- -- Name: _itemsrcptrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemsrcptrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemSources')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Sources.'; END IF; -- Set defaults NEW.itemsrcp_curr_id := COALESCE(NEW.itemsrcp_curr_id,basecurrid()); RETURN NEW; END; $$; ALTER FUNCTION public._itemsrcptrigger() OWNER TO admin; -- -- Name: _itemsrctrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemsrctrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemSources')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Sources.'; END IF; -- Set defaults NEW.itemsrc_invvendoruomratio := COALESCE(NEW.itemsrc_invvendoruomratio,1); NEW.itemsrc_minordqty := COALESCE(NEW.itemsrc_minordqty,0); NEW.itemsrc_multordqty := COALESCE(NEW.itemsrc_multordqty,0); NEW.itemsrc_active := COALESCE(NEW.itemsrc_active,true); NEW.itemsrc_leadtime := COALESCE(NEW.itemsrc_leadtime,0); NEW.itemsrc_ranking := COALESCE(NEW.itemsrc_ranking,1); RETURN NEW; END; $$; ALTER FUNCTION public._itemsrctrigger() OWNER TO admin; -- -- Name: _itemsubtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemsubtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Substitutes.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemsubtrigger() OWNER TO admin; -- -- Name: _itemtaxtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemtaxtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Items.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemtaxtrigger() OWNER TO admin; -- -- Name: _itemtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Override values to avoid invalid data combinations IF (NEW.item_type IN ('R','S','O','L','B')) THEN NEW.item_picklist := FALSE; END IF; IF (NEW.item_type IN ('F','S','O','L','B')) THEN NEW.item_picklist := FALSE; NEW.item_sold := FALSE; NEW.item_prodcat_id := -1; NEW.item_exclusive := false; NEW.item_listprice := 0; NEW.item_upccode := ''; NEW.item_prodweight := 0; NEW.item_packweight := 0; END IF; IF (NEW.item_type NOT IN ('M','R')) THEN NEW.item_config := false; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemtrigger() OWNER TO admin; -- -- Name: _itemuomconvtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _itemuomconvtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Items.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._itemuomconvtrigger() OWNER TO admin; -- -- Name: _locationaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _locationaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _itemloc RECORD; BEGIN -- Maintain itemsite_qtyonhand and itemsite_nnqoh when location_netable changes IF (TG_OP = 'UPDATE') THEN IF (OLD.location_netable <> NEW.location_netable) THEN FOR _itemloc IN SELECT * FROM itemloc WHERE (itemloc_location_id=NEW.location_id) LOOP IF (NEW.location_netable) THEN UPDATE itemsite SET itemsite_qtyonhand = itemsite_qtyonhand + _itemloc.itemloc_qty, itemsite_nnqoh = itemsite_nnqoh - _itemloc.itemloc_qty WHERE (itemsite_id=_itemloc.itemloc_itemsite_id); ELSE UPDATE itemsite SET itemsite_qtyonhand = itemsite_qtyonhand - _itemloc.itemloc_qty, itemsite_nnqoh = itemsite_nnqoh + _itemloc.itemloc_qty WHERE (itemsite_id=_itemloc.itemloc_itemsite_id); END IF; END LOOP; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._locationaftertrigger() OWNER TO admin; -- -- Name: _locationtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _locationtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _checkId INTEGER; BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainLocations') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add new Locations.'; END IF; ELSE SELECT checkPrivilege('MaintainLocations') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Location.'; END IF; END IF; -- Code is required IF ( (LENGTH(COALESCE(NEW.location_name,''))=0) AND (LENGTH(COALESCE(NEW.location_aisle,''))=0) AND (LENGTH(COALESCE(NEW.location_rack,''))=0) AND (LENGTH(COALESCE(NEW.location_bin,''))=0) ) THEN RAISE EXCEPTION 'You must supply a valid Location Identifier.'; END IF; -- Site is required IF (NEW.location_warehous_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Site.'; END IF; -- Location Identifier must be unique SELECT location_id INTO _checkId FROM location WHERE ( (UPPER(location_name)=UPPER(NEW.location_name)) AND (UPPER(location_aisle)=UPPER(NEW.location_aisle)) AND (UPPER(location_rack)=UPPER(NEW.location_rack)) AND (UPPER(location_bin)=UPPER(NEW.location_bin)) AND (location_warehous_id=NEW.location_warehous_id) AND (location_id<>NEW.location_id) ); IF (FOUND) THEN RAISE EXCEPTION 'You must supply a unique Location Identifier for this Site.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._locationtrigger() OWNER TO admin; -- -- Name: _metasqlaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _metasqlaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT (isDBA() OR checkPrivilege('MaintainMetaSQL'))) THEN RAISE EXCEPTION '% does not have privileges to maintain MetaSQL statements in %.%', getEffectiveXtUser(), TG_TABLE_SCHEMA, TG_TABLE_NAME; END IF; IF ((TG_OP = 'UPDATE' OR TG_OP = 'DELETE') AND NEW.metasql_grade <= 0 AND NOT isDBA()) THEN RAISE EXCEPTION 'You may not alter grade 0 metasql queries except using the xTuple Updater utility'; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._metasqlaltertrigger() OWNER TO admin; -- -- Name: _metasqltrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _metasqltrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN NEW.metasql_lastuser := getEffectiveXtUser(); NEW.metasql_lastupdate := current_date; RETURN NEW; END; $$; ALTER FUNCTION public._metasqltrigger() OWNER TO admin; -- -- Name: _opheadaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _opheadaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM docass WHERE docass_source_id = OLD.ophead_id AND docass_source_type = 'OPP'; DELETE FROM docass WHERE docass_target_id = OLD.ophead_id AND docass_target_type = 'OPP'; END IF; -- Comments IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='OpportunityChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'OPP', NEW.ophead_id, 'Created'); --- clear the number from the issue cache PERFORM clearNumberIssue('OpportunityNumber', NEW.ophead_number); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.ophead_active <> NEW.ophead_active) THEN IF (NEW.ophead_active) THEN PERFORM postComment(_cmnttypeid, 'OPP', NEW.ophead_id, 'Activated'); ELSE PERFORM postComment(_cmnttypeid, 'OPP', NEW.ophead_id, 'Deactivated'); END IF; END IF; IF (OLD.ophead_name <> NEW.ophead_name) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Name Changed from "' || OLD.ophead_name || '" to "' || NEW.ophead_name || '"' ) ); END IF; IF (OLD.ophead_owner_username <> NEW.ophead_owner_username) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Owner Name Changed from "' || OLD.ophead_owner_username || '" to "' || NEW.ophead_owner_username || '"' ) ); END IF; IF (OLD.ophead_probability_prcnt <> NEW.ophead_probability_prcnt) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Probability % Changed from "' || OLD.ophead_probability_prcnt || '" to "' || NEW.ophead_probability_prcnt || '"' ) ); END IF; IF (OLD.ophead_amount <> NEW.ophead_amount) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Amount Changed from "' || OLD.ophead_amount || '" to "' || NEW.ophead_amount || '"' ) ); END IF; IF (OLD.ophead_target_date <> NEW.ophead_target_date) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Target Date Changed from "' || OLD.ophead_target_date || '" to "' || NEW.ophead_target_date || '"' ) ); END IF; IF (OLD.ophead_actual_date <> NEW.ophead_actual_date) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Actual Date Changed from "' || OLD.ophead_actual_date || '" to "' || NEW.ophead_actual_date || '"' ) ); END IF; IF (OLD.ophead_crmacct_id <> NEW.ophead_crmacct_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'CRM Account Changed from "' || (SELECT crmacct_name FROM crmacct WHERE crmacct_id=OLD.ophead_crmacct_id) || '" (' || OLD.ophead_crmacct_id || ') to "' || (SELECT crmacct_name FROM crmacct WHERE crmacct_id=NEW.ophead_crmacct_id) || '" (' || NEW.ophead_crmacct_id || ')' ) ); END IF; IF (OLD.ophead_curr_id <> NEW.ophead_curr_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Currency Changed from "' || (SELECT curr_name FROM curr_symbol WHERE curr_id=OLD.ophead_curr_id) || '" (' || OLD.ophead_curr_id || ') to "' || (SELECT curr_name FROM curr_symbol WHERE curr_id=NEW.ophead_curr_id) || '" (' || NEW.ophead_curr_id || ')' ) ); END IF; IF (OLD.ophead_opstage_id <> NEW.ophead_opstage_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Stage Changed from "' || (SELECT opstage_name FROM opstage WHERE opstage_id=OLD.ophead_opstage_id) || '" (' || OLD.ophead_opstage_id || ') to "' || (SELECT opstage_name FROM opstage WHERE opstage_id=NEW.ophead_opstage_id) || '" (' || NEW.ophead_opstage_id || ')' ) ); END IF; IF (OLD.ophead_opsource_id <> NEW.ophead_opsource_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Source Changed from "' || (SELECT opsource_name FROM opsource WHERE opsource_id=OLD.ophead_opsource_id) || '" (' || OLD.ophead_opsource_id || ') to "' || (SELECT opsource_name FROM opsource WHERE opsource_id=NEW.ophead_opsource_id) || '" (' || NEW.ophead_opsource_id || ')' ) ); END IF; IF (OLD.ophead_optype_id <> NEW.ophead_optype_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Type Changed from "' || (SELECT optype_name FROM optype WHERE optype_id=OLD.ophead_optype_id) || '" (' || OLD.ophead_optype_id || ') to "' || (SELECT optype_name FROM optype WHERE optype_id=NEW.ophead_optype_id) || '" (' || NEW.ophead_optype_id || ')' ) ); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._opheadaftertrigger() OWNER TO admin; -- -- Name: _opheadbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _opheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _rec record; _check boolean; _test text; BEGIN IF(TG_OP = 'DELETE') THEN _rec := OLD; ELSE _rec := NEW; END IF; -- Auto inactivate IF (TG_OP = 'UPDATE') THEN IF ( (NEW.ophead_opstage_id != OLD.ophead_opstage_id) AND (SELECT opstage_opinactive FROM opstage WHERE opstage_id=NEW.ophead_opstage_id) ) THEN NEW.ophead_active := FALSE; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._opheadbeforetrigger() OWNER TO admin; -- -- Name: _packbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _packbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF ((TG_OP = 'INSERT') AND (NEW.pack_head_id) IS NOT NULL)THEN PERFORM postComment(_cmnttypeid, 'S', NEW.pack_head_id, 'Added to Packing List Batch'); END IF; END IF; IF ((TG_OP = 'INSERT') OR (TG_OP = 'UPDATE')) THEN IF (NEW.pack_shiphead_id IS NOT NULL AND NEW.pack_shiphead_id NOT IN (SELECT shiphead_id FROM shiphead WHERE (shiphead_order_id=NEW.pack_head_id) AND (shiphead_order_type=NEW.pack_head_type))) THEN RAISE EXCEPTION 'Shipment does not exist for % id %', NEW.pack_head_type, NEW.pack_head_id; RETURN OLD; END IF; IF (NEW.pack_head_type = 'SO' AND NEW.pack_head_id IN (SELECT cohead_id FROM cohead)) THEN RETURN NEW; ELSEIF (NEW.pack_head_type = 'TO') THEN IF (NOT fetchMetricBool('MultiWhs')) THEN RAISE EXCEPTION 'Transfer Orders are not supported by this version of the application'; ELSEIF (NEW.pack_head_id IN (SELECT tohead_id FROM tohead)) THEN RETURN NEW; END IF; END IF; RAISE EXCEPTION '% with id % does not exist', NEW.pack_head_type, NEW.pack_head_id; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._packbeforetrigger() OWNER TO admin; -- -- Name: _periodaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _periodaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _idoffirst INTEGER; _test INTEGER; BEGIN -- This trigger can easily cause an infinite loop -- because of this we have to be very careful to not -- do an update on the period table if no updates -- are absolutely needed so we don't just keep -- trigger ourselves again and again -- Figure out which period is the first one SELECT period_id INTO _idoffirst FROM period ORDER BY period_start LIMIT 1; -- If we didn't find anything there is nothing to do IF( NOT FOUND ) THEN RETURN NEW; END IF; -- do a select to see if there is at least one record that needs to be -- updated. If we do not find any then we can just leave without -- causing a retrigger of ourselves SELECT period_id INTO _test FROM period WHERE((COALESCE(period_initial, true) AND (NOT period_id=_idoffirst)) OR ((NOT COALESCE(period_initial, false)) AND (period_id=_idoffirst))) LIMIT 1; -- Nothing to update - get out of here IF( NOT FOUND ) THEN RETURN NEW; END IF; -- Update all the period records that already have the initial flag -- set and the one that we know should be the first. -- We don't have to be as careful here since we have already ruled -- out if don't need to update already. UPDATE period SET period_initial = (_idoffirst=period_id) WHERE((COALESCE(period_initial, true)) OR (period_id=_idoffirst)); RETURN NEW; END; $$; ALTER FUNCTION public._periodaftertrigger() OWNER TO admin; -- -- Name: _pkgcmdaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgcmdaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgcmdaftertrigger() OWNER TO admin; -- -- Name: _pkgcmdaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgcmdaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create custom commands in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter custom commands in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete custom commands from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgcmdaltertrigger() OWNER TO admin; -- -- Name: _pkgcmdargaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgcmdargaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgcmdargaftertrigger() OWNER TO admin; -- -- Name: _pkgcmdargaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgcmdargaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create command arguments in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter command arguments in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete command arguments from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgcmdargaltertrigger() OWNER TO admin; -- -- Name: _pkgcmdargbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgcmdargbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmdargid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN RETURN NEW; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgcmdargbeforetrigger() OWNER TO admin; -- -- Name: _pkgcmdbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgcmdbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmdid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN IF (_debug) THEN RAISE NOTICE 'OLD.cmd_name %, NEW.cmd_name %', OLD.cmd_name, NEW.cmd_name; END IF; IF (NEW.cmd_name != OLD.cmd_name) THEN SELECT cmd_id INTO _cmdid FROM cmd WHERE cmd_name=NEW.cmd_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot change command name % because another command with that name already exists.', NEW.cmd_name; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN IF (_debug) THEN RAISE NOTICE 'inserting NEW.cmd_name %', NEW.cmd_name; END IF; SELECT cmd_id INTO _cmdid FROM cmd WHERE cmd_name=NEW.cmd_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot create new command % because another command with that name already exists.', NEW.cmd_name; END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM cmdarg WHERE cmdarg_cmd_id=OLD.cmd_id; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgcmdbeforetrigger() OWNER TO admin; -- -- Name: _pkgheadbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF (TG_OP = 'UPDATE') THEN NEW.pkghead_created := OLD.pkghead_created; NEW.pkghead_updated := CURRENT_TIMESTAMP; IF (NEW.pkghead_indev AND NOT userCanCreateUsers(getEffectiveXtUser())) THEN NEW.pkghead_indev = FALSE; END IF; ELSIF (TG_OP = 'INSERT') THEN NEW.pkghead_created := CURRENT_TIMESTAMP; NEW.pkghead_updated := NEW.pkghead_created; IF (NEW.pkghead_indev AND NOT userCanCreateUsers(getEffectiveXtUser())) THEN NEW.pkghead_indev = FALSE; END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM pkgdep WHERE pkgdep_pkghead_id=OLD.pkghead_id; EXECUTE 'DROP SCHEMA ' || OLD.pkghead_name || ' CASCADE'; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgheadbeforetrigger() OWNER TO admin; -- -- Name: _pkgimageaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgimageaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgimageaftertrigger() OWNER TO admin; -- -- Name: _pkgimagealtertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgimagealtertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create images in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter images in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete images from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgimagealtertrigger() OWNER TO admin; -- -- Name: _pkgimagebeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgimagebeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _imageid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN IF (_debug) THEN RAISE NOTICE 'OLD.image_name %, NEW.image_name %', OLD.image_name, NEW.image_name; END IF; IF (NEW.image_name != OLD.image_name) THEN SELECT image_id INTO _imageid FROM image WHERE image_name=NEW.image_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot change image named % because another image with that name already exists.', NEW.image_name; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN IF (_debug) THEN RAISE NOTICE 'inserting NEW.image_name %', NEW.image_name; END IF; SELECT image_id INTO _imageid FROM image WHERE image_name=NEW.image_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot create new image % because another image with that name already exists.', NEW.image_name; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgimagebeforetrigger() OWNER TO admin; -- -- Name: _pkgitembeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _functionargs TEXT; _group TEXT; _object TEXT; _schema TEXT; _debug BOOL := false; BEGIN IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN _object = NEW.pkgitem_name; SELECT LOWER(pkghead_name) INTO _schema FROM pkghead WHERE (pkghead_id=NEW.pkgitem_pkghead_id); IF (NOT FOUND) THEN _schema := 'public'; END IF; IF (NEW.pkgitem_type = 'F') THEN _object := SPLIT_PART(_object, '(', 1); ELSIF (NEW.pkgitem_type = 'M') THEN _group := SPLIT_PART(_object, '-', 1); _object := SPLIT_PART(_object, '-', 2); END IF; IF _debug THEN RAISE NOTICE '_schema % and _object %', _schema, _object; END IF; IF (NEW.pkgitem_type = 'C') THEN IF (NOT EXISTS(SELECT script_id FROM script WHERE ((script_id=NEW.pkgitem_item_id) AND (script_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Script % as a Package Item without a corresponding script record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'D') THEN IF (NOT EXISTS(SELECT cmd_id FROM cmd WHERE ((cmd_id=NEW.pkgitem_item_id) AND (cmd_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Custom Command % as a Package Item without a corresponding cmd record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'F') THEN IF (NOT EXISTS(SELECT pg_proc.oid FROM pg_proc, pg_namespace WHERE ((pg_proc.oid=NEW.pkgitem_item_id) AND (proname = (_object)) AND (pronamespace=pg_namespace.oid) AND (nspname=_schema)) )) THEN RAISE EXCEPTION 'Cannot create Function % (oid %) as a Package Item without a corresponding function in the database.', NEW.pkgitem_name, NEW.pkgitem_item_id; END IF; ELSIF (NEW.pkgitem_type = 'G') THEN IF (NOT EXISTS(SELECT pg_class.oid FROM pg_trigger, pg_class, pg_namespace WHERE ((tgname=_object) AND (tgrelid=pg_class.oid) AND (relnamespace=pg_namespace.oid) AND (nspname=_schema)))) THEN RAISE EXCEPTION 'Cannot create Trigger % as a Package Item without a corresponding trigger in the database.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'I') THEN IF (NOT EXISTS(SELECT image_id FROM image WHERE ((image_id=NEW.pkgitem_item_id) AND (image_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Image % as a Package Item without a corresponding image record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'M') THEN IF (NOT EXISTS(SELECT metasql_id FROM metasql WHERE ((metasql_id=NEW.pkgitem_item_id) AND (metasql_group=_group) AND (metasql_name=_object)))) THEN RAISE EXCEPTION 'Cannot create MetaSQL statement % as a Package Item without a corresponding metasql record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'P') THEN IF (NOT EXISTS(SELECT priv_id FROM priv WHERE ((priv_id=NEW.pkgitem_item_id) AND (priv_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Privilege % as a Package Item without a corresponding priv record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'R') THEN IF (NOT EXISTS(SELECT report_id FROM report WHERE ((report_id=NEW.pkgitem_item_id) AND (report_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Report % as a Package Item without a corresponding report record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'S') THEN IF (NOT EXISTS(SELECT oid FROM pg_namespace WHERE (LOWER(nspname)=LOWER(NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Schema % as a Package Item without a corresponding schema in the database.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'T') THEN IF (NOT EXISTS(SELECT pg_class.oid FROM pg_class, pg_namespace WHERE ((relname=_object) AND (relnamespace=pg_namespace.oid) AND (relkind='r') AND (nspname=_schema)))) THEN RAISE EXCEPTION 'Cannot create Table % as a Package Item without a corresponding table in the database.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'U') THEN IF (NOT EXISTS(SELECT uiform_id FROM uiform WHERE ((uiform_id=NEW.pkgitem_item_id) AND (uiform_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create User Interface Form % as a Package Item without a corresponding uiform record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'V') THEN IF (NOT EXISTS(SELECT pg_class.oid FROM pg_class, pg_namespace WHERE ((relname=_object) AND (relnamespace=pg_namespace.oid) AND (relkind='v') AND (nspname=_schema)))) THEN RAISE EXCEPTION 'Cannot create View % as a Package Item without a corresponding view in the database.', NEW.pkgitem_name; END IF; ELSE RAISE EXCEPTION '"%" is not a valid type of package item.', NEW.pkgitem_type; END IF; ELSIF (TG_OP = 'DELETE') THEN IF _debug THEN RAISE NOTICE 'Deleting % % %', OLD.pkgitem_item_id, OLD.pkgitem_name, OLD.pkgitem_type; END IF; _object = OLD.pkgitem_name; SELECT pkghead_name INTO _schema FROM pkghead WHERE (pkghead_id=OLD.pkgitem_pkghead_id); IF (NOT FOUND) THEN _schema := 'public'; END IF; IF (OLD.pkgitem_type = 'F') THEN _object := SPLIT_PART(_object, '(', 1); ELSIF (OLD.pkgitem_type = 'M') THEN _group := SPLIT_PART(_object, '-', 1); _object := SPLIT_PART(_object, '-', 2); END IF; IF _debug THEN RAISE NOTICE '_schema % and _object %', _schema, _object; END IF; IF (OLD.pkgitem_type = 'C') THEN DELETE FROM script WHERE ((script_id=OLD.pkgitem_item_id) AND (script_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'D') THEN DELETE FROM cmd WHERE ((cmd_id=OLD.pkgitem_item_id) AND (cmd_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'F') THEN -- SELECT dropIfExists('FUNCTION', CAST (oid::regprocedure AS TEXT), _schema) PERFORM dropIfExists('FUNCTION', proname || '(' || oidvectortypes(proargtypes) || ')', _schema) FROM pg_proc WHERE (oid=OLD.pkgitem_item_id); ELSIF (OLD.pkgitem_type = 'G') THEN PERFORM dropIfExists('TRIGGER', _object, _schema); ELSIF (OLD.pkgitem_type = 'I') THEN DELETE FROM image WHERE ((image_id=OLD.pkgitem_item_id) AND (image_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'M') THEN DELETE FROM metasql WHERE ((metasql_id=OLD.pkgitem_item_id) AND (metasql_group=_group) AND (metasql_name=_object)); ELSIF (OLD.pkgitem_type = 'P') THEN DELETE FROM priv WHERE ((priv_id=OLD.pkgitem_item_id) AND (priv_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'R') THEN DELETE FROM report WHERE ((report_id=OLD.pkgitem_item_id) AND (report_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'S') THEN PERFORM dropIfExists('SCHEMA', OLD.pkgitem_name, OLD.pkgitem_name); ELSIF (OLD.pkgitem_type = 'T') THEN PERFORM dropIfExists('TABLE', _object, _schema, true); ELSIF (OLD.pkgitem_type = 'U') THEN DELETE FROM uiform WHERE ((uiform_id=OLD.pkgitem_item_id) AND (uiform_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'V') THEN PERFORM dropIfExists('VIEW', _object, _schema, true); ELSE RAISE EXCEPTION '"%" is not a valid type of package item.', OLD.pkgitem_type; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgitembeforetrigger() OWNER TO admin; -- -- Name: _pkgmetasqlaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgmetasqlaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgmetasqlaftertrigger() OWNER TO admin; -- -- Name: _pkgmetasqlaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgmetasqlaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _isdba BOOLEAN := false; BEGIN SELECT rolsuper INTO _isdba FROM pg_roles WHERE (rolname=getEffectiveXtUser()); IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; -- cannot combine IF's because plpgsql does not always evaluate left-to-right IF (TG_OP = 'INSERT') THEN IF (NEW.metasql_grade <= 0 AND NOT _isdba) THEN RAISE EXCEPTION 'You may not create grade 0 MetaSQL statements in packages except using the xTuple Updater utility'; END IF; ELSIF (TG_OP = 'UPDATE') THEN IF (NEW.metasql_grade <= 0 AND NOT _isdba) THEN RAISE EXCEPTION 'You may not alter grade 0 MetaSQL statements in packages except using the xTuple Updater utility'; END IF; ELSIF (TG_OP = 'DELETE') THEN IF (OLD.metasql_grade <= 0 AND NOT _isdba) THEN RAISE EXCEPTION 'You may not delete grade 0 MetaSQL statements from packages. Try deleting or disabling the package.'; ELSE RETURN OLD; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgmetasqlaltertrigger() OWNER TO admin; -- -- Name: _pkgmetasqlbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgmetasqlbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _metasqlid INTEGER; _isdba BOOLEAN := false; BEGIN SELECT rolsuper INTO _isdba FROM pg_roles WHERE (rolname=getEffectiveXtUser()); IF (NOT (_isdba OR checkPrivilege('MaintainMetaSQL'))) THEN RAISE EXCEPTION '% does not have privileges to maintain MetaSQL statements in %.% (DBA=%)', getEffectiveXtUser(), TG_TABLE_SCHEMA, TG_TABLE_NAME, _isdba; END IF; IF (TG_OP = 'UPDATE') THEN RAISE DEBUG 'update OLD %-%-%, NEW %-%-%', OLD.metasql_group, OLD.metasql_name, OLD.metasql_grade, NEW.metasql_group, NEW.metasql_name, NEW.metasql_grade; IF (NEW.metasql_name != OLD.metasql_name OR NEW.metasql_group != OLD.metasql_group OR NEW.metasql_grade != OLD.metasql_grade) THEN SELECT metasql_id INTO _metasqlid FROM metasql WHERE metasql_name=NEW.metasql_name AND metasql_group=NEW.metasql_group AND metasql_grade=NEW.metasql_grade; IF (FOUND) THEN RAISE EXCEPTION 'Cannot change the MetaSQL statement named %-%-% because another MetaSQL statement with that group, name and grade already exists.', NEW.metasql_group, NEW.metasql_name, NEW.metasql_grade; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN RAISE DEBUG 'insert NEW %-% %', NEW.metasql_group, NEW.metasql_name, NEW.metasql_grade; SELECT metasql_id INTO _metasqlid FROM metasql WHERE metasql_name=NEW.metasql_name AND metasql_group=NEW.metasql_group AND metasql_grade=NEW.metasql_grade; IF (FOUND) THEN RAISE EXCEPTION 'The new MetaSQL statement %-% % conflicts with an existing statement.', NEW.metasql_group, NEW.metasql_name, NEW.metasql_grade; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgmetasqlbeforetrigger() OWNER TO admin; -- -- Name: _pkgprivaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgprivaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgprivaftertrigger() OWNER TO admin; -- -- Name: _pkgprivaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgprivaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create privileges in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter privileges in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete privileges from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgprivaltertrigger() OWNER TO admin; -- -- Name: _pkgprivbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgprivbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _privid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN IF (_debug) THEN RAISE NOTICE 'OLD.priv_name %, NEW.priv_name %', OLD.priv_name, NEW.priv_name; END IF; IF (NEW.priv_name != OLD.priv_name) THEN SELECT priv_id INTO _privid FROM priv WHERE priv_name=NEW.priv_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot change privilege name % because another privilege with that name already exists.', NEW.priv_name; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN IF (_debug) THEN RAISE NOTICE 'inserting NEW.priv_name %', NEW.priv_name; END IF; SELECT priv_id INTO _privid FROM priv WHERE priv_name=NEW.priv_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot create new privilege % because another privilege with that name already exists.', NEW.priv_name; END IF; ELSIF (TG_OP = 'DELETE') THEN IF (_debug) THEN RAISE NOTICE 'deleting pkgpriv_id %', OLD.priv_id; END IF; DELETE FROM usrpriv WHERE usrpriv_priv_id=OLD.priv_id; DELETE FROM grppriv WHERE grppriv_priv_id=OLD.priv_id; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgprivbeforetrigger() OWNER TO admin; -- -- Name: _pkgreportaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgreportaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgreportaftertrigger() OWNER TO admin; -- -- Name: _pkgreportaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgreportaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create report definitions in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter report definitions in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete report definitions from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgreportaltertrigger() OWNER TO admin; -- -- Name: _pkgreportbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgreportbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _reportid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN IF (_debug) THEN RAISE NOTICE 'update OLD % %, NEW % %', OLD.report_name, OLD.report_grade, NEW.report_name, NEW.report_grade; END IF; IF (NEW.report_name != OLD.report_name) THEN SELECT report_id INTO _reportid FROM report WHERE ((report_name=NEW.report_name) AND (report_grade=NEW.report_grade)); IF (FOUND) THEN RAISE EXCEPTION 'Cannot change report % % because another report with that name and grade already exists.', NEW.report_name, NEW.report_grade; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN IF (_debug) THEN RAISE NOTICE 'insert NEW % %', NEW.report_name, NEW.report_grade; END IF; SELECT report_id INTO _reportid FROM report WHERE ((report_name=NEW.report_name) AND (report_grade=NEW.report_grade)); IF (FOUND) THEN RAISE EXCEPTION 'Cannot create new report % % because another report with that name and grade already exists.', NEW.report_name, NEW.report_grade; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgreportbeforetrigger() OWNER TO admin; -- -- Name: _pkgscriptaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgscriptaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgscriptaftertrigger() OWNER TO admin; -- -- Name: _pkgscriptaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgscriptaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create scripts in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter scripts in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete scripts from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgscriptaltertrigger() OWNER TO admin; -- -- Name: _pkgscriptbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkgscriptbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _scriptid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN RETURN NEW; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkgscriptbeforetrigger() OWNER TO admin; -- -- Name: _pkguiformaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkguiformaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkguiformaftertrigger() OWNER TO admin; -- -- Name: _pkguiformaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkguiformaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create forms in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter forms in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete forms from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkguiformaltertrigger() OWNER TO admin; -- -- Name: _pkguiformbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _pkguiformbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _uiformid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN RETURN NEW; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._pkguiformbeforetrigger() OWNER TO admin; -- -- Name: _poheadtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _poheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _check BOOLEAN; _maint BOOLEAN := TRUE; BEGIN -- Check if we are doing maintenance IF (TG_OP = 'UPDATE') THEN IF ( (OLD.pohead_status != NEW.pohead_status) OR (OLD.pohead_printed != NEW.pohead_printed) ) THEN _maint := FALSE; END IF; END IF; -- Check IF ( (NOT _maint) AND (NOT checkPrivilege('MaintainPurchaseOrders')) AND (NOT checkPrivilege('PostPurchaseOrders')) AND (NOT checkPrivilege('PrintPurchaseOrders')) AND (NOT checkPrivilege('PostVouchers')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Purchase Order.'; END IF; IF ( _maint AND (NOT checkPrivilege('MaintainPurchaseOrders')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Purchase Order.'; END IF; IF (TG_OP = 'INSERT') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('PoNumber', NEW.pohead_number); END IF; IF ( (TG_OP = 'INSERT') OR (TG_op = 'UPDATE') ) THEN IF (NOT ISNUMERIC(NEW.pohead_number) AND NEW.pohead_saved) THEN RAISE EXCEPTION 'Purchase Order Number must be numeric.'; END IF; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='POChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'P', NEW.pohead_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.pohead_terms_id <> NEW.pohead_terms_id) THEN PERFORM postComment( _cmnttypeid, 'P', NEW.pohead_id, ('Terms Changed from "' || oldterms.terms_code || '" to "' || newterms.terms_code || '"') ) FROM terms AS oldterms, terms AS newterms WHERE ( (oldterms.terms_id=OLD.pohead_terms_id) AND (newterms.terms_id=NEW.pohead_terms_id) ); END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM docass WHERE docass_source_id = OLD.pohead_id AND docass_source_type = 'P'; DELETE FROM docass WHERE docass_target_id = OLD.pohead_id AND docass_target_type = 'P'; DELETE FROM comment WHERE ( (comment_source='P') AND (comment_source_id=OLD.pohead_id) ); END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END; $$; ALTER FUNCTION public._poheadtrigger() OWNER TO admin; -- -- Name: _poheadtriggerafter(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _poheadtriggerafter() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (COALESCE(NEW.pohead_taxzone_id,-1) <> COALESCE(OLD.pohead_taxzone_id,-1)) THEN UPDATE poitem SET poitem_taxtype_id=getItemTaxType(itemsite_item_id,NEW.pohead_taxzone_id) FROM itemsite WHERE ((itemsite_id=poitem_itemsite_id) AND (poitem_pohead_id=NEW.pohead_id)); END IF; -- Do not update closed poitems IF (TG_OP = 'UPDATE') THEN IF (OLD.pohead_status != NEW.pohead_status) THEN UPDATE poitem SET poitem_status=NEW.pohead_status WHERE ( (poitem_pohead_id=NEW.pohead_id) AND (poitem_status <> 'C') ); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._poheadtriggerafter() OWNER TO admin; -- -- Name: _poitemtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _poitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _status CHAR(1); _check BOOLEAN; _cnt INTEGER; _s RECORD; BEGIN -- Check IF ( (TG_OP = 'UPDATE') AND (NOT checkPrivilege('MaintainPurchaseOrders')) AND (NOT checkPrivilege('ChangePurchaseOrderQty')) AND (NOT checkPrivilege('EnterReceipts')) AND (NOT checkPrivilege('PostVouchers')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Purchase Order.'; END IF; IF ( ( (TG_OP = 'INSERT') OR (TG_OP = 'DELETE') ) AND (NOT checkPrivilege('MaintainPurchaseOrders')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Purchase Order.'; END IF; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN SELECT pohead_status INTO _status FROM pohead WHERE (pohead_id=NEW.poitem_pohead_id); IF (NEW.poitem_itemsite_id=-1) THEN NEW.poitem_itemsite_id := NULL; END IF; IF (NEW.poitem_expcat_id=-1) THEN NEW.poitem_expcat_id := NULL; END IF; IF (NEW.poitem_itemsite_id IS NOT NULL AND NEW.poitem_expcat_id IS NOT NULL) THEN RAISE EXCEPTION 'A purchase order line may not include both an inventory and non-inventory item'; ELSIF (NEW.poitem_itemsite_id IS NULL AND NEW.poitem_expcat_id IS NULL) THEN RAISE EXCEPTION 'A purchase order line must specify either an inventory item or a non-inventory expense category'; ELSIF (NEW.poitem_qty_ordered IS NULL) THEN RAISE EXCEPTION 'A purchase order line must specify a quantity'; ELSIF (COALESCE(NEW.poitem_itemsite_id,-1) != -1) THEN SELECT (COUNT(item_id)=1) INTO _check FROM itemsite, item WHERE ((itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=item_id) AND (item_type IN ('P','O','M','T'))); IF NOT (_check) THEN RAISE EXCEPTION 'The item is not a purchasable item type'; END IF; END IF; END IF; IF (TG_OP = 'INSERT') THEN IF (_status='C') THEN RAISE EXCEPTION 'New lines may not be inserted into a closed purchase order'; END IF; --Fetch and apply default item source data if applicable IF ((NEW.poitem_itemsrc_id IS NULL) AND (NEW.poitem_itemsite_id IS NOT NULL)) THEN IF (NEW.poitem_itemsrc_id IS NULL) THEN SELECT COUNT(itemsrc_id) INTO _cnt FROM pohead,itemsrc,itemsite WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_vend_id=itemsrc_vend_id) AND (itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=itemsrc_item_id)); IF (_cnt = 1) THEN -- We found the one and only item source, so populate data for it SELECT itemsrc.* INTO _s FROM pohead,itemsrc,itemsite WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_vend_id=itemsrc_vend_id) AND (itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=itemsrc_item_id)); IF (FOUND) THEN NEW.poitem_itemsrc_id := _s.itemsrc_id; NEW.poitem_vend_uom := _s.itemsrc_vend_uom; NEW.poitem_invvenduomratio := _s.itemsrc_invvendoruomratio; NEW.poitem_duedate := COALESCE(NEW.poitem_duedate, CURRENT_DATE + _s.itemsrc_leadtime); NEW.poitem_vend_item_number := COALESCE(NEW.poitem_vend_item_number,_s.itemsrc_vend_item_number); NEW.poitem_vend_item_descrip := COALESCE(NEW.poitem_vend_item_descrip,_s.itemsrc_vend_item_descrip); NEW.poitem_manuf_name := COALESCE(NEW.poitem_manuf_name,_s.itemsrc_manuf_name); NEW.poitem_manuf_item_number := COALESCE(NEW.poitem_manuf_item_number, _s.itemsrc_manuf_item_number); NEW.poitem_manuf_item_descrip := COALESCE(NEW.poitem_manuf_item_descrip, _s.itemsrc_manuf_item_descrip); END IF; ELSIF (_cnt > 1) THEN -- There are multiple sources, see if there is an exact match with provided vendor info. SELECT itemsrc.* INTO _s FROM pohead,itemsrc,itemsite WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_vend_id=itemsrc_vend_id) AND (itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=itemsrc_item_id) AND (NEW.poitem_vend_item_number=itemsrc_vend_item_number) AND (COALESCE(NEW.poitem_manuf_name,'')=COALESCE(itemsrc_manuf_name,'')) AND (COALESCE(NEW.poitem_manuf_item_number,'')=COALESCE(itemsrc_manuf_item_number,''))); IF (FOUND) THEN NEW.poitem_itemsrc_id := _s.itemsrc_id; NEW.poitem_vend_uom := _s.itemsrc_vend_uom; NEW.poitem_invvenduomratio := _s.itemsrc_invvendoruomratio; NEW.poitem_duedate := COALESCE(NEW.poitem_duedate, CURRENT_DATE + _s.itemsrc_leadtime); NEW.poitem_vend_item_descrip := COALESCE(NEW.poitem_vend_item_descrip,_s.itemsrc_vend_item_descrip); NEW.poitem_manuf_item_descrip := COALESCE(NEW.poitem_manuf_item_descrip, _s.itemsrc_manuf_item_descrip); END IF; END IF; END IF; END IF; IF (NEW.poitem_duedate IS NULL) THEN RAISE EXCEPTION 'A due date is required'; END IF; --Set defaults NEW.poitem_linenumber := COALESCE(NEW.poitem_linenumber,( SELECT COALESCE(MAX(poitem_linenumber),0) + 1 FROM poitem WHERE (poitem_pohead_id=NEW.poitem_pohead_id))); NEW.poitem_status := _status; NEW.poitem_invvenduomratio := COALESCE(NEW.poitem_invvenduomratio,1); IF (NEW.poitem_invvenduomratio = 0.0) THEN NEW.poitem_invvenduomratio = 1.0; END IF; NEW.poitem_vend_item_number := COALESCE(NEW.poitem_vend_item_number,''); NEW.poitem_vend_item_descrip := COALESCE(NEW.poitem_vend_item_descrip,''); NEW.poitem_unitprice := COALESCE(NEW.poitem_unitprice,( SELECT itemsrcPrice(NEW.poitem_itemsrc_id, COALESCE(itemsite_warehous_id, -1), pohead_dropship, NEW.poitem_qty_ordered, pohead_curr_id, CURRENT_DATE) FROM itemsite, pohead WHERE ( (itemsite_id=NEW.poitem_itemsite_id) AND (pohead_id=NEW.poitem_pohead_id) )), 0.0); NEW.poitem_stdcost := COALESCE(NEW.poitem_stdcost,( SELECT stdcost(itemsite_item_id) FROM itemsite WHERE (itemsite_id=NEW.poitem_itemsite_id))); NEW.poitem_bom_rev_id := COALESCE(NEW.poitem_bom_rev_id,( SELECT getActiveRevId('BOM',itemsite_item_id) FROM itemsite WHERE (itemsite_id=NEW.poitem_itemsite_id))); NEW.poitem_boo_rev_id := COALESCE(NEW.poitem_boo_rev_id,( SELECT getActiveRevId('BOO',itemsite_item_id) FROM itemsite WHERE (itemsite_id=NEW.poitem_itemsite_id))); NEW.poitem_comments := COALESCE(NEW.poitem_comments,''); NEW.poitem_freight := COALESCE(NEW.poitem_freight,0); NEW.poitem_qty_received := 0; NEW.poitem_qty_returned := 0; NEW.poitem_qty_vouchered := 0; -- Insert Event Start INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', NEW.poitem_id, itemsite_warehous_id, (pohead_number || '-' || NEW.poitem_linenumber || ': ' || item_number) FROM evntnot, evnttype, itemsite, item, pohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.poitem_pohead_id=pohead_id) AND (NEW.poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='POitemCreate') ); -- Insert Event End END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='POChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'P', NEW.poitem_pohead_id, ('Created Line #' || NEW.poitem_linenumber::TEXT)); PERFORM postComment(_cmnttypeid, 'PI', NEW.poitem_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (NEW.poitem_qty_ordered <> OLD.poitem_qty_ordered) THEN PERFORM postComment( _cmnttypeid, 'PI', NEW.poitem_id, ( 'Qty. Ordered Changed from ' || formatQty(OLD.poitem_qty_ordered) || ' to ' || formatQty(NEW.poitem_qty_ordered ) ) ); END IF; IF (NEW.poitem_unitprice <> OLD.poitem_unitprice) THEN PERFORM postComment( _cmnttypeid, 'PI', NEW.poitem_id, ( 'Unit Price Changed from ' || formatPurchPrice(OLD.poitem_unitprice) || ' to ' || formatPurchPrice(NEW.poitem_unitprice ) ) ); END IF; IF (NEW.poitem_duedate <> OLD.poitem_duedate) THEN PERFORM postComment( _cmnttypeid, 'PI', NEW.poitem_id, ( 'Due Date Changed from ' || formatDate(OLD.poitem_duedate) || ' to ' || formatDate(NEW.poitem_duedate ) ) ); END IF; IF (COALESCE(OLD.poitem_taxtype_id, -1) <> COALESCE(NEW.poitem_taxtype_id, -1)) THEN PERFORM postComment( _cmnttypeid, 'PI', NEW.poitem_id, ( 'Tax Type Changed from "' || COALESCE((SELECT taxtype_name FROM taxtype WHERE taxtype_id=OLD.poitem_taxtype_id), 'None') || '" (' || COALESCE(OLD.poitem_taxtype_id, 0) || ') to "' || COALESCE((SELECT taxtype_name FROM taxtype WHERE taxtype_id=NEW.poitem_taxtype_id), 'None') || '" (' || COALESCE(NEW.poitem_taxtype_id, 0) || ')' ) ); END IF; IF (NEW.poitem_status <> OLD.poitem_status) THEN IF (NEW.poitem_status = 'C') THEN PERFORM postComment(_cmnttypeid, 'PI', NEW.poitem_id, 'Closed'); ELSIF (NEW.poitem_status = 'O') THEN PERFORM postComment(_cmnttypeid, 'PI', NEW.poitem_id, 'Opened'); END IF; END IF; ELSIF (TG_OP = 'DELETE') THEN PERFORM postComment(_cmnttypeid, 'P', OLD.poitem_pohead_id, ('Deleted Line #' || OLD.poitem_linenumber::TEXT)); END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN IF (EXISTS(SELECT recv_id FROM recv WHERE ((recv_order_type='PO') AND (recv_orderitem_id=OLD.poitem_id) AND (recv_qty>0)))) THEN RAISE EXCEPTION 'Cannot delete an P/O Item which has been received'; END IF; DELETE FROM comment WHERE ( (comment_source='PI') AND (comment_source_id=OLD.poitem_id) ); DELETE FROM charass WHERE ((charass_target_type='PI') AND (charass_target_id=OLD.poitem_id)); IF (OLD.poitem_status = 'O') THEN IF ( (SELECT (count(*) < 1) FROM poitem WHERE ((poitem_pohead_id=OLD.poitem_pohead_id) AND (poitem_id != OLD.poitem_id) AND (poitem_status <> 'C')) ) ) THEN UPDATE pohead SET pohead_status = 'C' WHERE ((pohead_id=OLD.poitem_pohead_id) AND (pohead_status='O')); END IF; END IF; RETURN OLD; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.poitem_itemsite_id != OLD.poitem_itemsite_id) THEN RAISE EXCEPTION 'You may not change the item site for a line item.'; ELSIF (NEW.poitem_expcat_id != OLD.poitem_expcat_id) THEN RAISE EXCEPTION 'You may not change the expense category for a line item.'; END IF; IF (OLD.poitem_status <> NEW.poitem_status) THEN IF ( (SELECT (count(*) < 1) FROM poitem WHERE ((poitem_pohead_id=NEW.poitem_pohead_id) AND (poitem_id != NEW.poitem_id) AND (poitem_status<>'C')) ) AND (NEW.poitem_status='C') ) THEN UPDATE pohead SET pohead_status = 'C' WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_status='O')); ELSE UPDATE pohead SET pohead_status = 'O' WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_status='C')); END IF; END IF; END IF; RETURN NEW; END IF; END; $$; ALTER FUNCTION public._poitemtrigger() OWNER TO admin; -- -- Name: _prjaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prjaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (NOT FOUND) THEN RAISE EXCEPTION 'Comment type ChangeLog not found'; END IF; IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'J', NEW.prj_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.prj_start_date <> NEW.prj_start_date) THEN PERFORM postComment( _cmnttypeid, 'J', NEW.prj_id, ('Start Date Changed from ' || formatDate(OLD.prj_start_date) || ' to ' || formatDate(NEW.prj_start_date)) ); END IF; IF (OLD.prj_due_date <> NEW.prj_due_date) THEN PERFORM postComment( _cmnttypeid, 'J', NEW.prj_id, ('Due Date Changed from ' || formatDate(OLD.prj_due_date) || ' to ' || formatDate(NEW.prj_due_date)) ); END IF; IF (OLD.prj_assigned_date <> NEW.prj_assigned_date) THEN PERFORM postComment( _cmnttypeid, 'J', NEW.prj_id, ('Assigned Date Changed from ' || formatDate(OLD.prj_assigned_date) || ' to ' || formatDate(NEW.prj_assigned_date)) ); END IF; IF (OLD.prj_completed_date <> NEW.prj_completed_date) THEN PERFORM postComment( _cmnttypeid, 'J', NEW.prj_id, ('Completed Date Changed from ' || formatDate(OLD.prj_completed_date) || ' to ' || formatDate(NEW.prj_completed_date)) ); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._prjaftertrigger() OWNER TO admin; -- -- Name: _prjbeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prjbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM docass WHERE docass_source_id = OLD.prj_id AND docass_source_type = 'J'; DELETE FROM docass WHERE docass_target_id = OLD.prj_id AND docass_target_type = 'J'; SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.prj_id) AND (recur_parent_type='J')); IF (_recurid IS NOT NULL) THEN SELECT MIN(prj_id) INTO _newparentid FROM prj WHERE ((prj_recurring_prj_id=OLD.prj_id) AND (prj_id!=OLD.prj_id)); -- client is responsible for warning about deleting a recurring prj IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; END IF; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._prjbeforedeletetrigger() OWNER TO admin; -- -- Name: _prjtaskaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prjtaskaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (NOT FOUND) THEN RAISE EXCEPTION 'Comment type ChangeLog not found'; END IF; IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'TA', NEW.prjtask_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.prjtask_start_date <> NEW.prjtask_start_date) THEN PERFORM postComment( _cmnttypeid, 'TA', NEW.prjtask_id, ('Start Date Changed from ' || formatDate(OLD.prjtask_start_date) || ' to ' || formatDate(NEW.prjtask_start_date)) ); END IF; IF (OLD.prjtask_due_date <> NEW.prjtask_due_date) THEN PERFORM postComment( _cmnttypeid, 'TA', NEW.prjtask_id, ('Due Date Changed from ' || formatDate(OLD.prjtask_due_date) || ' to ' || formatDate(NEW.prjtask_due_date)) ); END IF; IF (OLD.prjtask_assigned_date <> NEW.prjtask_assigned_date) THEN PERFORM postComment( _cmnttypeid, 'TA', NEW.prjtask_id, ('Assigned Date Changed from ' || formatDate(OLD.prjtask_assigned_date) || ' to ' || formatDate(NEW.prjtask_assigned_date)) ); END IF; IF (OLD.prjtask_completed_date <> NEW.prjtask_completed_date) THEN PERFORM postComment( _cmnttypeid, 'TA', NEW.prjtask_id, ('Completed Date Changed from ' || formatDate(OLD.prjtask_completed_date) || ' to ' || formatDate(NEW.prjtask_completed_date)) ); END IF; IF (OLD.prjtask_hours_actual != NEW.prjtask_hours_actual) THEN PERFORM postComment(_cmnttypeid, 'TA', NEW.prjtask_id, 'Actual Hours changed from ' || formatQty(OLD.prjtask_hours_actual) || ' to ' || formatQty(NEW.prjtask_hours_actual)); END IF; IF (OLD.prjtask_exp_actual != NEW.prjtask_exp_actual) THEN PERFORM postComment(_cmnttypeid, 'TA', NEW.prjtask_id, 'Actual Expense changed from ' || formatQty(OLD.prjtask_exp_actual) || ' to ' || formatQty(NEW.prjtask_exp_actual)); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._prjtaskaftertrigger() OWNER TO admin; -- -- Name: _prjtasktrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prjtasktrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Checks IF (NEW.prjtask_owner_username=getEffectiveXtUser()) THEN IF (NOT checkPrivilege('MaintainAllProjects') AND NOT checkPrivilege('MaintainPersonalProjects')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Projects.'; END IF; ELSIF (NOT checkPrivilege('MaintainAllProjects')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Projects.'; ELSIF (LENGTH(COALESCE(NEW.prjtask_number,'')) = 0) THEN RAISE EXCEPTION 'You must ender a valid number.'; ELSIF (LENGTH(COALESCE(NEW.prjtask_name,'')) = 0) THEN RAISE EXCEPTION 'You must ender a valid name.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._prjtasktrigger() OWNER TO admin; -- -- Name: _prospectafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prospectafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF EXISTS(SELECT 1 FROM quhead WHERE quhead_cust_id = OLD.prospect_id) AND NOT EXISTS (SELECT 1 FROM custinfo WHERE cust_id = OLD.prospect_id) THEN RAISE EXCEPTION '[xtuple: deleteProspect, -1]'; END IF; IF (fetchMetricBool('ProspectChangeLog')) THEN PERFORM postComment(cmnttype_id, 'PSPCT', OLD.prospect_id, 'Deleted "' || OLD.prospect_number || '"') FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; ALTER FUNCTION public._prospectafterdeletetrigger() OWNER TO admin; -- -- Name: _prospectaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prospectaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _custid INTEGER; _prospectid INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN SELECT crmacct_cust_id, crmacct_prospect_id INTO _custid, _prospectid FROM crmacct WHERE crmacct_number=NEW.prospect_number; IF (_custid > 0 AND _custid != _prospectid) THEN RAISE EXCEPTION '[xtuple: createProspect, -2]'; END IF; IF (_prospectid > 0) THEN RAISE EXCEPTION '[xtuple: createProspect, -3]'; END IF; -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_prospect_id=NEW.prospect_id, crmacct_cust_id=NULL, crmacct_name=NEW.prospect_name WHERE crmacct_number=NEW.prospect_number; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_prospect_id, crmacct_cntct_id_1 ) VALUES (NEW.prospect_number, NEW.prospect_name, NEW.prospect_active, 'O', NEW.prospect_id, NEW.prospect_cntct_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; /* TODO: default characteristic assignments based on what? */ ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.prospect_number WHERE ((crmacct_prospect_id=NEW.prospect_id) AND (crmacct_number!=NEW.prospect_number)); UPDATE crmacct SET crmacct_name = NEW.prospect_name WHERE ((crmacct_prospect_id=NEW.prospect_id) AND (crmacct_name!=NEW.prospect_name)); END IF; IF (fetchMetricBool('ProspectChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.prospect_active <> NEW.prospect_active) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, CASE WHEN NEW.prospect_active THEN 'Activated' ELSE 'Deactivated' END); END IF; IF (OLD.prospect_number <> NEW.prospect_number) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Number changed from "' || OLD.prospect_number || '" to "' || NEW.prospect_number || '"'); END IF; IF (OLD.prospect_name <> NEW.prospect_name) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Name changed from "' || OLD.prospect_name || '" to "' || NEW.prospect_name || '"'); END IF; IF (OLD.prospect_cntct_id <> NEW.prospect_cntct_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Contact changed from "' || formatCntctName(OLD.prospect_cntct_id) || '" to "' || formatCntctName(NEW.prospect_cntct_id) || '"'); END IF; IF (OLD.prospect_taxauth_id <> NEW.prospect_taxauth_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Tax Authority changed from "' || (SELECT taxauth_code FROM taxauth WHERE taxauth_id=OLD.prospect_taxauth_id) || '" to "' || (SELECT taxauth_code FROM taxauth WHERE taxauth_id=NEW.prospect_taxauth_id) || '"'); END IF; IF (OLD.prospect_salesrep_id <> NEW.prospect_salesrep_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Sales Rep changed from "' || (SELECT salesrep_number FROM salesrep WHERE salesrep_id=OLD.prospect_salesrep_id) || '" to "' || (SELECT salesrep_number FROM salesrep WHERE salesrep_id=NEW.prospect_salesrep_id) || '"'); END IF; IF (OLD.prospect_warehous_id <> NEW.prospect_warehous_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Warehouse changed from "' || (SELECT warehous_code FROM whsinfo WHERE warehous_id=OLD.prospect_warehous_id) || '" to "' || (SELECT warehous_code FROM whsinfo WHERE warehous_id=NEW.prospect_warehous_id) || '"'); END IF; IF (OLD.prospect_taxzone_id <> NEW.prospect_taxzone_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Tax Zone changed from "' || (SELECT taxzone_code FROM taxzone WHERE taxzone_id=OLD.prospect_taxzone_id) || '" to "' || (SELECT taxzone_code FROM taxzone WHERE taxzone_id=NEW.prospect_taxzone_id) || '"'); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._prospectaftertrigger() OWNER TO admin; -- -- Name: _prospectbeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prospectbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainProspectMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Prospects.'; END IF; UPDATE crmacct SET crmacct_prospect_id = NULL WHERE crmacct_prospect_id = OLD.prospect_id; RETURN OLD; END; $$; ALTER FUNCTION public._prospectbeforedeletetrigger() OWNER TO admin; -- -- Name: _prospecttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prospecttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainProspectMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Prospects.'; END IF; IF (NEW.prospect_number IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Prospect Number.'; END IF; NEW.prospect_number := UPPER(NEW.prospect_number); RETURN NEW; END; $$; ALTER FUNCTION public._prospecttrigger() OWNER TO admin; -- -- Name: _prtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _prtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/EULA for the full text of the software license. BEGIN --- clear the number from the issue cache PERFORM clearNumberIssue('PrNumber', NEW.pr_number); RETURN NEW; END; $$; ALTER FUNCTION public._prtrigger() OWNER TO admin; -- -- Name: _quheadtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _quheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _oldHoldType TEXT; _newHoldType TEXT; _p RECORD; _a RECORD; _w RECORD; _shiptoId INTEGER; _addrId INTEGER; _prjId INTEGER; _check BOOLEAN; _numGen CHAR(1); BEGIN -- Checks SELECT checkPrivilege('MaintainQuotes') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Quotes.'; END IF; -- If this is imported, check the quote number IF (TG_OP = 'INSERT') THEN IF (NEW.quhead_imported) THEN SELECT fetchMetricText('QUNumberGeneration') INTO _numGen; IF ((NEW.quhead_number IS NULL) AND (_numGen='M')) THEN RAISE EXCEPTION 'You must supply a Quote Number.'; ELSE IF ((NEW.quhead_number IS NOT NULL) AND (_numGen='A')) THEN RAISE EXCEPTION 'You may not supply a new Quote Number xTuple will generate the number.'; ELSE IF ((NEW.quhead_number IS NULL) AND (_numGen='O')) THEN SELECT fetchqunumber() INTO NEW.quhead_number; ELSE IF (NEW.quhead_number IS NULL) THEN SELECT fetchsonumber() INTO NEW.quhead_number; END IF; END IF; END IF; END IF; END IF; IF (fetchMetricText('QUNumberGeneration') IN ('A','O')) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('QuNumber', NEW.quhead_number); ELSIF (fetchMetricText('QUNumberGeneration') = 'S') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('SoNumber', NEW.quhead_number); END IF; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.quhead_number <> OLD.quhead_number) THEN RAISE EXCEPTION 'The order number may not be changed.'; END IF; END IF; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN -- Get Customer data IF (NEW.quhead_shipto_id IS NULL) THEN SELECT * INTO _p FROM ( SELECT cust_number,cust_usespos,cust_blanketpos,cust_ffbillto, cust_ffshipto,cust_name,cust_salesrep_id,cust_terms_id,cust_shipvia, cust_commprcnt,cust_curr_id,cust_taxzone_id, addr_line1,addr_line2,addr_line3,addr_city,addr_state,addr_postalcode,addr_country, shipto_id,shipto_addr_id,shipto_name,shipto_salesrep_id,shipto_shipvia, shipto_shipchrg_id,shipto_shipform_id,shipto_commission,shipto_taxzone_id FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) LEFT OUTER JOIN shiptoinfo ON ((cust_id=shipto_cust_id) AND shipto_default) WHERE (cust_id=NEW.quhead_cust_id) UNION SELECT prospect_number,false,false,true, true,prospect_name,prospect_salesrep_id,null,null, null,null,prospect_taxzone_id, addr_line1,addr_line2,addr_line3,addr_city,addr_state,addr_postalcode,addr_country, null,null,null,null,null, null,null,null,null FROM prospect LEFT OUTER JOIN cntct ON (prospect_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE (prospect_id=NEW.quhead_cust_id)) AS data; ELSE SELECT cust_creditstatus,cust_number,cust_usespos,cust_blanketpos,cust_ffbillto, cust_ffshipto,cust_name,cust_salesrep_id,cust_terms_id,cust_shipvia, cust_shipchrg_id,cust_shipform_id,cust_commprcnt,cust_curr_id,cust_taxzone_id, addr_line1,addr_line2,addr_line3,addr_city,addr_state,addr_postalcode,addr_country, shipto_id,shipto_addr_id,shipto_name,shipto_salesrep_id,shipto_shipvia, shipto_shipchrg_id,shipto_shipform_id,shipto_commission,shipto_taxzone_id INTO _p FROM shiptoinfo,custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE ((cust_id=NEW.quhead_cust_id) AND (shipto_id=shipto_id)); END IF; -- If there is customer data, then we can get to work IF (FOUND) THEN -- Only check PO number for imports because UI checks when whole quote is saved IF (TG_OP = 'INSERT') THEN -- Set to defaults if values not provided NEW.quhead_shipto_id := COALESCE(NEW.quhead_shipto_id,_p.shipto_id); NEW.quhead_salesrep_id := COALESCE(NEW.quhead_salesrep_id,_p.shipto_salesrep_id,_p.cust_salesrep_id); NEW.quhead_terms_id := COALESCE(NEW.quhead_terms_id,_p.cust_terms_id); NEW.quhead_shipvia := COALESCE(NEW.quhead_shipvia,_p.shipto_shipvia,_p.cust_shipvia); NEW.quhead_commission := COALESCE(NEW.quhead_commission,_p.shipto_commission,_p.cust_commprcnt); NEW.quhead_quotedate := COALESCE(NEW.quhead_quotedate,current_date); NEW.quhead_packdate := COALESCE(NEW.quhead_packdate,NEW.quhead_quotedate); NEW.quhead_curr_id := COALESCE(NEW.quhead_curr_id,_p.cust_curr_id,basecurrid()); NEW.quhead_taxzone_id := COALESCE(NEW.quhead_taxzone_id,_p.shipto_taxzone_id,_p.cust_taxzone_id); NEW.quhead_freight := COALESCE(NEW.quhead_freight,0); NEW.quhead_custponumber := COALESCE(NEW.quhead_custponumber,''); NEW.quhead_ordercomments := COALESCE(NEW.quhead_ordercomments,''); NEW.quhead_shipcomments := COALESCE(NEW.quhead_shipcomments,''); NEW.quhead_shiptophone := COALESCE(NEW.quhead_shiptophone,''); NEW.quhead_misc := COALESCE(NEW.quhead_misc,0); NEW.quhead_misc_descrip := COALESCE(NEW.quhead_misc_descrip,''); IF ((NEW.quhead_warehous_id IS NULL) OR (NEW.quhead_fob IS NULL)) THEN IF (NEW.quhead_warehous_id IS NULL) THEN SELECT warehous_id,warehous_fob INTO _w FROM usrpref, whsinfo WHERE ((warehous_id=CAST(usrpref_value AS INTEGER)) AND (warehous_shipping) AND (warehous_active) AND (usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse')); ELSE SELECT warehous_id,warehous_fob INTO _w FROM whsinfo WHERE (warehous_id=NEW.quhead_warehous_id); END IF; IF (FOUND) THEN NEW.quhead_warehous_id := COALESCE(NEW.quhead_warehous_id,_w.warehous_id); NEW.quhead_fob := COALESCE(NEW.quhead_fob,_w.warehous_fob); END IF; END IF; END IF; --Auto create project if applicable IF ((TG_OP = 'INSERT') AND (NEW.quhead_prj_id=-1)) THEN SELECT fetchMetricBool('AutoCreateProjectsForOrders') INTO _check; IF (_check) THEN SELECT NEXTVAL('prj_prj_id_seq') INTO _prjId; NEW.quhead_prj_id := _prjId; INSERT INTO prj (prj_id, prj_number, prj_name, prj_descrip, prj_so, prj_wo, prj_po) VALUES(_prjId, NEW.quhead_number, NEW.quhead_number, 'Auto Generated Project from Quote.', TRUE, TRUE, TRUE); END IF; END IF; -- Deal with Billing Address IF (TG_OP = 'INSERT') THEN IF (_p.cust_ffbillto) THEN -- If they didn't supply data, we'll put in the bill to address NEW.quhead_billtoname=COALESCE(NEW.quhead_billtoname,_p.cust_name,''); NEW.quhead_billtoaddress1=COALESCE(NEW.quhead_billtoaddress1,_p.addr_line1,''); NEW.quhead_billtoaddress2=COALESCE(NEW.quhead_billtoaddress2,_p.addr_line2,''); NEW.quhead_billtoaddress3=COALESCE(NEW.quhead_billtoaddress3,_p.addr_line3,''); NEW.quhead_billtocity=COALESCE(NEW.quhead_billtocity,_p.addr_city,''); NEW.quhead_billtostate=COALESCE(NEW.quhead_billtostate,_p.addr_state,''); NEW.quhead_billtozip=COALESCE(NEW.quhead_billtozip,_p.addr_postalcode,''); NEW.quhead_billtocountry=COALESCE(NEW.quhead_billtocountry,_p.addr_country,''); ELSE -- Free form not allowed, we're going to put in the address regardless NEW.quhead_billtoname=COALESCE(_p.cust_name,''); NEW.quhead_billtoaddress1=COALESCE(_p.addr_line1,''); NEW.quhead_billtoaddress2=COALESCE(_p.addr_line2,''); NEW.quhead_billtoaddress3=COALESCE(_p.addr_line3,''); NEW.quhead_billtocity=COALESCE(_p.addr_city,''); NEW.quhead_billtostate=COALESCE(_p.addr_state,''); NEW.quhead_billtozip=COALESCE(_p.addr_postalcode,''); NEW.quhead_billtocountry=COALESCE(_p.addr_country,''); END IF; END IF; -- Now let's look at Shipto Address -- If there's nothing in the address fields and there is a shipto id -- or there is a default address available, let's put in some shipto address data IF ((TG_OP = 'INSERT') AND NOT ((NEW.quhead_shipto_id IS NULL) AND NOT _p.cust_ffshipto) AND (NEW.quhead_shiptoname IS NULL) AND (NEW.quhead_shiptoaddress1 IS NULL) AND (NEW.quhead_shiptoaddress2 IS NULL) AND (NEW.quhead_shiptoaddress3 IS NULL) AND (NEW.quhead_shiptocity IS NULL) AND (NEW.quhead_shiptostate IS NULL) AND (NEW.quhead_shiptocountry IS NULL)) THEN IF ((NEW.quhead_shipto_id IS NULL) AND (_p.shipto_id IS NOT NULL)) THEN _shiptoId := _p.shipto_addr_id; ELSE _shiptoId := NEW.quhead_shipto_id; END IF; SELECT * INTO _a FROM shiptoinfo, addr WHERE ((shipto_id=_shiptoId) AND (addr_id=shipto_addr_id)); NEW.quhead_shiptoname := COALESCE(_p.shipto_name,''); NEW.quhead_shiptoaddress1 := COALESCE(_a.addr_line1,''); NEW.quhead_shiptoaddress2 := COALESCE(_a.addr_line2,''); NEW.quhead_shiptoaddress3 := COALESCE(_a.addr_line3,''); NEW.quhead_shiptocity := COALESCE(_a.addr_city,''); NEW.quhead_shiptostate := COALESCE(_a.addr_state,''); NEW.quhead_shiptozipcode := COALESCE(_a.addr_postalcode,''); NEW.quhead_shiptocountry := COALESCE(_a.addr_country,''); ELSE IF (_p.cust_ffshipto) THEN -- Use Address Save function to see if the new address entered matches -- data for the shipto number. If not that will insert new address for CRM SELECT SaveAddr( NULL, NULL, NEW.quhead_shiptoaddress1, NEW.quhead_shiptoaddress2, NEW.quhead_shiptoaddress3, NEW.quhead_shiptocity, NEW.quhead_shiptostate, NEW.quhead_shiptozipcode, NEW.quhead_shiptocountry, 'CHANGEONE') INTO _addrId; SELECT shipto_addr_id INTO _shiptoid FROM shiptoinfo WHERE (shipto_id=NEW.quhead_shipto_id); -- If the address passed doesn't match shipto address, then it's something else IF (_shiptoid <> _addrId) THEN NEW.quhead_shipto_id := NULL; END IF; ELSE SELECT quhead_shipto_id INTO _shiptoid FROM quhead WHERE (quhead_id=NEW.quhead_id); -- Get the shipto address IF (COALESCE(NEW.quhead_shipto_id,-1) <> COALESCE(_shiptoid,-1)) THEN SELECT * INTO _a FROM shiptoinfo LEFT OUTER JOIN cntct ON (shipto_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (shipto_addr_id=addr_id) WHERE (shipto_id=NEW.quhead_shipto_id); IF (FOUND) THEN -- Free form not allowed so we're going to make sure address matches Shipto data NEW.quhead_shiptoname := COALESCE(_a.shipto_name,''); NEW.quhead_shiptophone := COALESCE(_a.cntct_phone,''); NEW.quhead_shiptoaddress1 := COALESCE(_a.addr_line1,''); NEW.quhead_shiptoaddress2 := COALESCE(_a.addr_line2,''); NEW.quhead_shiptoaddress3 := COALESCE(_a.addr_line3,''); NEW.quhead_shiptocity := COALESCE(_a.addr_city,''); NEW.quhead_shiptostate := COALESCE(_a.addr_state,''); NEW.quhead_shiptozipcode := COALESCE(_a.addr_postalcode,''); NEW.quhead_shiptocountry := COALESCE(_a.addr_country,''); ELSE -- If no shipto data and free form not allowed, this won't work RAISE EXCEPTION 'Free form Shipto is not allowed on this Customer. You must supply a valid Shipto ID.'; END IF; END IF; END IF; END IF; END IF; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='SalesOrderChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'Q', NEW.quhead_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.quhead_terms_id <> NEW.quhead_terms_id) THEN PERFORM postComment( _cmnttypeid, 'Q', NEW.quhead_id, ('Terms Changed from "' || oldterms.terms_code || '" to "' || newterms.terms_code || '"') ) FROM terms AS oldterms, terms AS newterms WHERE ( (oldterms.terms_id=OLD.quhead_terms_id) AND (newterms.terms_id=NEW.quhead_terms_id) ); END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM comment WHERE ( (comment_source='Q') AND (comment_source_id=OLD.quhead_id) ); END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END; $$; ALTER FUNCTION public._quheadtrigger() OWNER TO admin; -- -- Name: _quitemaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _quitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check NUMERIC; BEGIN --If auto calculate freight, recalculate quhead_freight IF (SELECT quhead_calcfreight FROM quhead WHERE (quhead_id=NEW.quitem_quhead_id)) THEN UPDATE quhead SET quhead_freight = (SELECT SUM(freightdata_total) FROM freightDetail('QU', quhead_id, quhead_cust_id, quhead_shipto_id, quhead_quotedate, quhead_shipvia, quhead_curr_id)) WHERE quhead_id=NEW.quitem_quhead_id; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._quitemaftertrigger() OWNER TO admin; -- -- Name: _quitembeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _quitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check NUMERIC; _itemNumber TEXT; BEGIN -- Check IF (NEW.quitem_scheddate IS NULL) THEN RAISE EXCEPTION 'A schedule date is required.'; END IF; -- If this is imported, go ahead and insert default characteristics IF ((TG_OP = 'INSERT') AND NEW.quitem_imported) THEN PERFORM updateCharAssignment('SI', NEW.quitem_id, char_id, charass_value) FROM ( SELECT DISTINCT char_id, char_name, charass_value FROM charass, char, itemsite, item WHERE ((itemsite_id=NEW.quitem_itemsite_id) AND (itemsite_item_id=item_id) AND (charass_target_type='I') AND (charass_target_id=item_id) AND (charass_default) AND (char_id=charass_char_id)) ORDER BY char_name) AS data; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._quitembeforetrigger() OWNER TO admin; -- -- Name: _quitemtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _quitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _check BOOLEAN; BEGIN -- Checks SELECT checkPrivilege('MaintainQuotes') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Quotes.'; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='SalesOrderChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); ELSE _cmnttypeid := -1; END IF; IF (TG_OP = 'INSERT') THEN IF (_cmnttypeid <> -1) THEN PERFORM postComment(_cmnttypeid, 'QI', NEW.quitem_id, 'Created'); END IF; RETURN NEW; ELSE IF (TG_OP = 'DELETE') THEN DELETE FROM comment WHERE ( (comment_source='QI') AND (comment_source_id=OLD.quitem_id) ); DELETE FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=OLD.quitem_id)); RETURN OLD; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.quitem_qtyord <> OLD.quitem_qtyord) THEN IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'QI', NEW.quitem_id, ( 'Changed Qty. Ordered from ' || formatQty(OLD.quitem_qtyord) || ' to ' || formatQty(NEW.quitem_qtyord) ) ); END IF; END IF; IF (NEW.quitem_scheddate <> OLD.quitem_scheddate) THEN IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'QI', NEW.quitem_id, ( 'Changed Sched. Date from ' || formatDate(OLD.quitem_scheddate) || ' to ' || formatDate(NEW.quitem_scheddate)) ); END IF; END IF; END IF; END IF; END IF; -- NEW.quitem_lastupdated = CURRENT_TIMESTAMP; RETURN NEW; END; $$; ALTER FUNCTION public._quitemtrigger() OWNER TO admin; -- -- Name: _recuraftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _recuraftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _parentid INTEGER; _parenttype TEXT; BEGIN IF (TG_OP = 'DELETE') THEN IF (UPPER(OLD.recur_parent_type) = 'TODO') THEN UPDATE todoitem SET todoitem_recurring_todoitem_id=NULL WHERE (todoitem_recurring_todoitem_id=OLD.recur_parent_id); END IF; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._recuraftertrigger() OWNER TO admin; -- -- Name: _reporttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _reporttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN NEW.report_loaddate = CURRENT_TIMESTAMP; RETURN NEW; END; $$; ALTER FUNCTION public._reporttrigger() OWNER TO admin; -- -- Name: _salesrepafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _salesrepafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN IF (SELECT fetchMetricValue('DefaultSalesRep') = OLD.salesrep_id) THEN RAISE EXCEPTION 'Cannot delete the default Sales Rep [xtuple: salesrep, -1, %]', OLD.salesrep_number; END IF; PERFORM postComment('ChangeLog', 'SR', OLD.salesrep_id, 'Deleted "' || OLD.salesrep_number || '"'); RETURN OLD; END; $$; ALTER FUNCTION public._salesrepafterdeletetrigger() OWNER TO admin; -- -- Name: _salesrepaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _salesrepaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_salesrep_id=NEW.salesrep_id, crmacct_name=NEW.salesrep_name WHERE crmacct_number=NEW.salesrep_number; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_salesrep_id ) VALUES (NEW.salesrep_number, NEW.salesrep_name, NEW.salesrep_active, 'I', NEW.salesrep_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; -- TODO: default characteristic assignments? ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.salesrep_number WHERE ((crmacct_salesrep_id=NEW.salesrep_id) AND (crmacct_number!=NEW.salesrep_number)); UPDATE crmacct SET crmacct_name = NEW.salesrep_name WHERE ((crmacct_salesrep_id=NEW.salesrep_id) AND (crmacct_name!=NEW.salesrep_name)); END IF; IF (fetchMetricBool('SalesRepChangeLog')) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.salesrep_active <> NEW.salesrep_active) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, CASE WHEN NEW.salesrep_active THEN 'Activated' ELSE 'Deactivated' END); END IF; IF (OLD.salesrep_number <> NEW.salesrep_number) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Number changed from "' || OLD.salesrep_number || '" to "' || NEW.salesrep_number || '"'); END IF; IF (OLD.salesrep_name <> NEW.salesrep_name) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Name changed from "' || OLD.salesrep_name || '" to "' || NEW.salesrep_name || '"'); END IF; IF (OLD.salesrep_commission <> NEW.salesrep_commission) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Commission changed from "' || OLD.salesrep_commission || '" to "' || NEW.salesrep_commission || '"'); END IF; IF (OLD.salesrep_method <> NEW.salesrep_method) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Method changed from "' || OLD.salesrep_method || '" to "' || NEW.salesrep_method || '"'); END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._salesrepaftertrigger() OWNER TO admin; -- -- Name: _salesrepbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _salesrepbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainSalesReps')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Sales Reps.'; END IF; IF (TG_OP IN ('INSERT', 'UPDATE')) THEN IF (NEW.salesrep_number IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Sales Rep Number.'; END IF; IF (NEW.salesrep_commission IS NULL) THEN RAISE EXCEPTION 'You must supply a Commission Rate for this Sales Rep.'; END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O') AND isNumeric(NEW.salesrep_number)) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('CRMAccountNumber', NEW.salesrep_number); END IF; NEW.salesrep_number = UPPER(NEW.salesrep_number); -- deprecated column salesrep_emp_id -- TODO: will this prevent breaking the crmacct-emp relationship? IF (TG_OP = 'UPDATE') THEN SELECT crmacct_emp_id INTO NEW.salesrep_emp_id FROM crmacct WHERE crmacct_salesrep_id = NEW.salesrep_id; END IF; ELSIF (TG_OP = 'DELETE') THEN UPDATE crmacct SET crmacct_salesrep_id = NULL WHERE crmacct_salesrep_id = OLD.salesrep_id; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._salesrepbeforetrigger() OWNER TO admin; -- -- Name: _saletypebeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _saletypebeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check TEXT; BEGIN -- Check to see if any sales orders are assigned to the passed saletype SELECT cohead_number INTO _check FROM cohead WHERE (cohead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Sales Order % and possibly more. [xtuple: deletesaletype, -1]', _check; END IF; -- Check to see if any quotes are assigned to the passed saletype SELECT quhead_number INTO _check FROM quhead WHERE (quhead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Quote % and possibly more. [xtuple: deletesaletype, -2]', _check; END IF; -- Check to see if any invoice are assigned to the passed saletype SELECT invchead_invcnumber INTO _check FROM invchead WHERE (invchead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Invoice % and possibly more. [xtuple: deletesaletype, -3]', _check; END IF; -- Check to see if any credit memos are assigned to the passed saletype SELECT cmhead_number INTO _check FROM cmhead WHERE (cmhead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Credit Memo % and possibly more. [xtuple: deletesaletype, -4]', _check; END IF; -- Check to see if any return ruthorizations are assigned to the passed saletype IF (fetchMetricBool('EnableReturnAuth')) THEN SELECT rahead_number INTO _check FROM rahead WHERE (rahead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Return Authorization % and possibly more returns. [xtuple: deleteSaleType, -5]', _check; END IF; END IF; RETURN OLD; END; $$; ALTER FUNCTION public._saletypebeforedeletetrigger() OWNER TO admin; -- -- Name: _shipdatasumtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _shipdatasumtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (LENGTH(TRIM(NEW.shipdatasum_shiphead_number)) = 0) THEN NEW.shipdatasum_shiphead_number = NULL; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._shipdatasumtrigger() OWNER TO admin; -- -- Name: _shipdatatrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _shipdatatrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _newShipdata_cohead_number INTEGER; _shipdatasum_shipper TEXT; _rows INTEGER; _cohead_id INTEGER; _shiphead_number TEXT; _headcount INTEGER; BEGIN -- This is where the shipper is identified and may need to be changed NEW.shipdata_cohead_number := TRIM(NEW.shipdata_cohead_number); IF (substring(NEW.shipdata_cosmisc_tracknum from 1 for 2) = '1Z') THEN _shipdatasum_shipper := 'UPS'; ELSE _shipdatasum_shipper := 'UNKNOWN'; END IF; IF (LENGTH(TRIM(NEW.shipdata_shiphead_number)) = 0) THEN NEW.shipdata_shiphead_number := NULL; END IF; IF (NEW.shipdata_cosmisc_tracknum = NEW.shipdata_cosmisc_packnum_tracknum) THEN IF (NEW.shipdata_void_ind = 'Y') THEN -- Delete the current shipdatasum DELETE FROM shipdatasum WHERE ((shipdatasum_cohead_number = NEW.shipdata_cohead_number) AND (shipdatasum_cosmisc_tracknum = NEW.shipdata_cosmisc_tracknum)); ELSIF (TG_OP = 'INSERT') THEN -- RAISE NOTICE 'Getting cohead_id (%)', NEW.shipdata_cohead_number; IF (NEW.shipdata_shiphead_number IS NULL) THEN SELECT cohead_id INTO _cohead_id FROM cohead WHERE cohead_number = NEW.shipdata_cohead_number; IF (FOUND) THEN -- RAISE NOTICE 'Getting shiphead number (%)', _cohead_id; SELECT count(shiphead_order_id), MAX(shiphead_number) INTO _headcount, _shiphead_number FROM shiphead WHERE ((shiphead_tracknum IS NULL OR shiphead_tracknum = '') AND ( shiphead_order_type = 'SO' and shiphead_order_id = _cohead_id) ); IF (_headcount = 1) THEN -- RAISE NOTICE 'Updating Shiphead Number (%)', _shiphead_number; NEW.shipdata_shiphead_number = _shiphead_number; ELSIF (_headcount > 1) THEN -- Trap for potential workflow problem. Can only infer shiphead from sales order number -- if shipping one at a time RAISE EXCEPTION 'Multiple shipments exist for this order. Please provide a specific a shipment number.'; END IF; END IF; END IF; INSERT INTO shipdatasum (shipdatasum_cohead_number, shipdatasum_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum, shipdatasum_weight, shipdatasum_base_freight, shipdatasum_total_freight, shipdatasum_base_freight_curr_id, shipdatasum_total_freight_curr_id, shipdatasum_shipper, shipdatasum_billing_option, shipdatasum_package_type, shipdatasum_shiphead_number) VALUES (NEW.shipdata_cohead_number, NEW.shipdata_cosmisc_tracknum, NEW.shipdata_cosmisc_packnum_tracknum, NEW.shipdata_weight, NEW.shipdata_base_freight, NEW.shipdata_total_freight, NEW.shipdata_base_freight_curr_id, NEW.shipdata_total_freight_curr_id, _shipdatasum_shipper, NEW.shipdata_billing_option, NEW.shipdata_package_type, NEW.shipdata_shiphead_number); ELSIF (TG_OP = 'UPDATE') THEN UPDATE shipdatasum SET shipdatasum_cohead_number=NEW.shipdata_cohead_number, shipdatasum_cosmisc_tracknum=NEW.shipdata_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum=NEW.shipdata_cosmisc_packnum_tracknum, shipdatasum_weight=NEW.shipdata_weight, shipdatasum_base_freight=NEW.shipdata_base_freight, shipdatasum_total_freight=NEW.shipdata_total_freight, shipdatasum_base_freight_curr_id=NEW.shipdata_base_freight_curr_id, shipdatasum_total_freight_curr_id=NEW.shipdata_total_freight_curr_id, shipdatasum_shipper=_shipdatasum_shipper, shipdatasum_billing_option=NEW.shipdata_billing_option, shipdatasum_package_type=NEW.shipdata_package_type, shipdatasum_shiphead_number=NEW.shipdata_shiphead_number WHERE ((TRIM(shipdatasum_cohead_number)=TRIM(OLD.shipdata_cohead_number)) AND (TRIM(shipdatasum_cosmisc_tracknum)=TRIM(OLD.shipdata_cosmisc_tracknum)) AND (TRIM(shipdatasum_cosmisc_packnum_tracknum)=TRIM(OLD.shipdata_cosmisc_packnum_tracknum))); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows <= 0) THEN INSERT INTO shipdatasum (shipdatasum_cohead_number, shipdatasum_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum, shipdatasum_weight, shipdatasum_base_freight, shipdatasum_total_freight, shipdatasum_base_freight_curr_id, shipdatasum_total_freight_curr_id, shipdatasum_shipper, shipdatasum_billing_option, shipdatasum_package_type, shipdatasum_shiphead_number) VALUES (NEW.shipdata_cohead_number, NEW.shipdata_cosmisc_tracknum, NEW.shipdata_cosmisc_packnum_tracknum, NEW.shipdata_weight, NEW.shipdata_base_freight, NEW.shipdata_total_freight, NEW.shipdata_base_freight_curr_id, NEW.shipdata_total_freight_curr_id, _shipdatasum_shipper, NEW.shipdata_billing_option, NEW.shipdata_package_type, NEW.shipdata_shiphead_number); END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._shipdatatrigger() OWNER TO admin; -- -- Name: _shipformafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _shipformafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (fetchMetricValue('DefaultShipFormId') = OLD.shipform_id) THEN RAISE EXCEPTION 'Cannot delete the default Shipping Form [xtuple: shipform, -1, %, %]', OLD.shipform_name, OLD.shipform_report_name; END IF; RETURN OLD; END; $$; ALTER FUNCTION public._shipformafterdeletetrigger() OWNER TO admin; -- -- Name: _shipheadbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _shipheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF ((TG_OP = 'INSERT') OR (TG_OP = 'UPDATE')) THEN IF (NEW.shiphead_order_type = 'SO' AND NEW.shiphead_order_id IN (SELECT cohead_id FROM cohead)) THEN RETURN NEW; ELSEIF (NEW.shiphead_order_type = 'TO' AND NEW.shiphead_order_id IN (SELECT tohead_id FROM tohead)) THEN RETURN NEW; END IF; RAISE EXCEPTION '% with id % does not exist', NEW.shiphead_order_type, NEW.shiphead_order_id; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._shipheadbeforetrigger() OWNER TO admin; -- -- Name: _shiptoinfoaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _shiptoinfoaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF (NEW.shipto_default) THEN UPDATE shiptoinfo SET shipto_default = false WHERE ((shipto_cust_id=NEW.shipto_cust_id) AND (shipto_id <> NEW.shipto_id)); END IF; IF (SELECT fetchMetricBool('CustomerChangeLog')) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'C', NEW.shipto_cust_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.shipto_name <> NEW.shipto_name) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To Name Changed from "' || COALESCE(OLD.shipto_name, '') || '" to "' || COALESCE(NEW.shipto_name, '') || '"' ) ); END IF; IF (OLD.shipto_shipvia <> NEW.shipto_shipvia) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To ShipVia Changed from "' || COALESCE(OLD.shipto_shipvia, '') || '" to "' || COALESCE(NEW.shipto_shipvia, '') || '"' ) ); END IF; IF (COALESCE(OLD.shipto_taxzone_id, -1) <> COALESCE(NEW.shipto_taxzone_id, -1)) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To Tax Zone Changed from "' || COALESCE((SELECT taxzone_code FROM taxzone WHERE taxzone_id=OLD.shipto_taxzone_id), 'None') || '" to "' || COALESCE((SELECT taxzone_code FROM taxzone WHERE taxzone_id=NEW.shipto_taxzone_id), 'None') || '"' ) ); END IF; IF (OLD.shipto_shipzone_id <> NEW.shipto_shipzone_id) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To Shipping Zone Changed from "' || (SELECT shipzone_name FROM shipzone WHERE shipzone_id=OLD.shipto_shipzone_id) || '" to "' || (SELECT shipzone_name FROM shipzone WHERE shipzone_id=NEW.shipto_shipzone_id) || '"' ) ); END IF; IF (OLD.shipto_salesrep_id <> NEW.shipto_salesrep_id) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To Sales Rep Changed from "' || (SELECT salesrep_name FROM salesrep WHERE salesrep_id=OLD.shipto_salesrep_id) || '" to "' || (SELECT salesrep_name FROM salesrep WHERE salesrep_id=NEW.shipto_salesrep_id) || '"' ) ); END IF; IF (OLD.shipto_active <> NEW.shipto_active) THEN IF (NEW.shipto_active) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.shipto_cust_id, (NEW.shipto_name || ': Ship To Activated')); ELSE PERFORM postComment(_cmnttypeid, 'C', NEW.shipto_cust_id, (NEW.shipto_name || ': Ship To Deactivated')); END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._shiptoinfoaftertrigger() OWNER TO admin; -- -- Name: _shipviaafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _shipviaafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (SELECT fetchMetricValue('DefaultShipViaId') = OLD.shipvia_id) THEN RAISE EXCEPTION 'Cannot delete the default Ship-Via [xtuple: shipvia, -1, %]', OLD.shipvia_code; END IF; RETURN OLD; END; $$; ALTER FUNCTION public._shipviaafterdeletetrigger() OWNER TO admin; -- -- Name: _sltransaltertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _sltransaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _externalCompany BOOLEAN := false; _updated BOOLEAN := false; BEGIN IF(TG_OP='DELETE') THEN RAISE EXCEPTION 'You may not delete Journal Transactions once they have been created.'; ELSIF (TG_OP = 'UPDATE') THEN IF(OLD.sltrans_id != NEW.sltrans_id) THEN _updated := true; ELSIF(OLD.sltrans_date != NEW.sltrans_date) THEN _updated := true; ELSIF(OLD.sltrans_accnt_id != NEW.sltrans_accnt_id) THEN _updated := true; ELSIF(OLD.sltrans_amount != NEW.sltrans_amount) THEN _updated := true; ELSIF(OLD.sltrans_username != NEW.sltrans_username) THEN _updated := true; ELSIF( (OLD.sltrans_sequence IS NULL AND NEW.sltrans_sequence IS NOT NULL) OR (OLD.sltrans_sequence IS NOT NULL AND NEW.sltrans_sequence IS NULL) OR (COALESCE(OLD.sltrans_sequence,0) != COALESCE(NEW.sltrans_sequence,0)) ) THEN _updated := true; ELSIF( (OLD.sltrans_created IS NULL AND NEW.sltrans_created IS NOT NULL) OR (OLD.sltrans_created IS NOT NULL AND NEW.sltrans_created IS NULL) OR (COALESCE(OLD.sltrans_created,now()) != COALESCE(NEW.sltrans_created,now())) ) THEN _updated := true; ELSIF( (OLD.sltrans_source IS NULL AND NEW.sltrans_source IS NOT NULL) OR (OLD.sltrans_source IS NOT NULL AND NEW.sltrans_source IS NULL) OR (COALESCE(OLD.sltrans_source,'') != COALESCE(NEW.sltrans_source,'')) ) THEN _updated := true; ELSIF( (OLD.sltrans_docnumber IS NULL AND NEW.sltrans_docnumber IS NOT NULL) OR (OLD.sltrans_docnumber IS NOT NULL AND NEW.sltrans_docnumber IS NULL) OR (COALESCE(OLD.sltrans_docnumber,'') != COALESCE(NEW.sltrans_docnumber,'')) ) THEN _updated := true; ELSIF( (OLD.sltrans_doctype IS NULL AND NEW.sltrans_doctype IS NOT NULL) OR (OLD.sltrans_doctype IS NOT NULL AND NEW.sltrans_doctype IS NULL) OR (COALESCE(OLD.sltrans_doctype,'') != COALESCE(NEW.sltrans_doctype,'')) ) THEN _updated := true; END IF; IF(_updated) THEN RAISE EXCEPTION 'You may not alter some Journal Transaction fields once they have been created.'; END IF; ELSE RAISE EXCEPTION 'trigger for sltrans table called in unexpected state.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._sltransaltertrigger() OWNER TO admin; -- -- Name: _sltransinserttrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _sltransinserttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _reqNotes BOOLEAN; _externalCompany BOOLEAN := false; BEGIN -- Checks SELECT company_external INTO _externalCompany FROM company JOIN accnt ON (company_number=accnt_company) WHERE (accnt_id=NEW.sltrans_accnt_id); IF (_externalCompany) THEN RAISE EXCEPTION 'Transactions are not allowed for G/L Accounts with External Company segments.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._sltransinserttrigger() OWNER TO admin; -- -- Name: _soheadtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _soheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _p RECORD; _a RECORD; _w RECORD; _shiptoId INTEGER; _addrId INTEGER; _prjId INTEGER; _check BOOLEAN; _numGen CHAR(1); BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN IF ( (NOT checkPrivilege('MaintainSalesOrders')) AND (NOT checkPrivilege('EnterReceipts')) ) THEN RAISE EXCEPTION 'You do not have privileges to create a Sales Order.'; END IF; ELSIF (TG_OP = 'UPDATE') THEN IF ( (NOT checkPrivilege('MaintainSalesOrders')) AND (NOT checkPrivilege('IssueStockToShipping')) AND (NEW.cohead_holdtype = OLD.cohead_holdtype) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Sales Order.'; END IF; ELSE IF ( (NOT checkPrivilege('MaintainSalesOrders')) AND (NOT checkPrivilege('IssueStockToShipping')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Sales Order.'; END IF; END IF; -- If this is imported, check the order number IF (TG_OP = 'INSERT') THEN IF (NEW.cohead_imported) THEN SELECT fetchMetricText('CONumberGeneration') INTO _numGen; IF ((NEW.cohead_number IS NULL) AND (_numGen='M')) THEN RAISE EXCEPTION 'You must supply an Order Number.'; ELSE IF (NEW.cohead_number IS NULL) THEN SELECT fetchsonumber() INTO NEW.cohead_number; END IF; END IF; END IF; IF (fetchMetricText('CONumberGeneration') IN ('A','O')) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('SoNumber', NEW.cohead_number); END IF; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.cohead_number <> OLD.cohead_number) THEN RAISE EXCEPTION 'The order number may not be changed.'; END IF; END IF; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN -- Get Customer data IF (NEW.cohead_shipto_id IS NULL) THEN SELECT cust_creditstatus,cust_number,cust_usespos,cust_blanketpos,cust_ffbillto, cust_ffshipto,cust_name,cust_salesrep_id,cust_terms_id,cust_shipvia, cust_shipchrg_id,cust_shipform_id,cust_commprcnt,cust_curr_id,cust_taxzone_id, cntct.*,addr.*, shipto_id,shipto_addr_id,shipto_name,shipto_salesrep_id,shipto_shipvia, shipto_shipchrg_id,shipto_shipform_id,shipto_commission,shipto_taxzone_id INTO _p FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) LEFT OUTER JOIN shiptoinfo ON ((cust_id=shipto_cust_id) AND shipto_default) WHERE (cust_id=NEW.cohead_cust_id); ELSE SELECT cust_creditstatus,cust_number,cust_usespos,cust_blanketpos,cust_ffbillto, cust_ffshipto,cust_name,cust_salesrep_id,cust_terms_id,cust_shipvia, cust_shipchrg_id,cust_shipform_id,cust_commprcnt,cust_curr_id,cust_taxzone_id, cntct.*,addr.*, shipto_id,shipto_addr_id,shipto_name,shipto_salesrep_id,shipto_shipvia, shipto_shipchrg_id,shipto_shipform_id,shipto_commission,shipto_taxzone_id INTO _p FROM shiptoinfo,custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE ((cust_id=NEW.cohead_cust_id) AND (shipto_id=NEW.cohead_shipto_id)); END IF; -- If there is customer data, then we can get to work IF (FOUND) THEN -- Check Credit IF (TG_OP = 'INSERT') THEN IF (_p.cust_creditstatus = 'H') THEN SELECT checkPrivilege('CreateSOForHoldCustomer') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'Customer % has been placed on a Credit Hold and you do not have privilege to create Sales Orders for Customers on Credit Hold. The selected Customer must be taken off of Credit Hold before you may create a new Sales Order for the Customer.',_p.cust_number; ELSE NEW.cohead_holdtype='C'; END IF; END IF; IF (_p.cust_creditstatus = 'W') THEN SELECT checkPrivilege('CreateSOForWarnCustomer') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'Customer % has been placed on a Credit Warning and you do not have privilege to create Sales Orders for Customers on Credit Warning. The selected Customer must be taken off of Credit Warning before you may create a new Sales Order for the Customer.',_p.cust_number; ELSE NEW.cohead_holdtype='C'; END IF; END IF; -- Set to defaults if values not provided NEW.cohead_shipto_id := COALESCE(NEW.cohead_shipto_id,_p.shipto_id); NEW.cohead_terms_id := COALESCE(NEW.cohead_terms_id,_p.cust_terms_id); NEW.cohead_orderdate := COALESCE(NEW.cohead_orderdate,current_date); NEW.cohead_packdate := COALESCE(NEW.cohead_packdate,NEW.cohead_orderdate); NEW.cohead_curr_id := COALESCE(NEW.cohead_curr_id,_p.cust_curr_id,basecurrid()); NEW.cohead_freight := COALESCE(NEW.cohead_freight,0); NEW.cohead_custponumber := COALESCE(NEW.cohead_custponumber,''); NEW.cohead_ordercomments := COALESCE(NEW.cohead_ordercomments,''); NEW.cohead_shipcomments := COALESCE(NEW.cohead_shipcomments,''); NEW.cohead_shiptophone := COALESCE(NEW.cohead_shiptophone,''); NEW.cohead_misc := COALESCE(NEW.cohead_misc,0); NEW.cohead_misc_descrip := COALESCE(NEW.cohead_misc_descrip,''); NEW.cohead_shipcomplete := COALESCE(NEW.cohead_shipcomplete,false); IF (_p.shipto_id IS NOT NULL) THEN -- Pull in over ride values NEW.cohead_salesrep_id := COALESCE(NEW.cohead_salesrep_id,_p.shipto_salesrep_id); NEW.cohead_shipvia := COALESCE(NEW.cohead_shipvia,_p.shipto_shipvia); NEW.cohead_shipchrg_id := COALESCE(NEW.cohead_shipchrg_id,_p.shipto_shipchrg_id); NEW.cohead_shipform_id := COALESCE(NEW.cohead_shipform_id,_p.shipto_shipform_id); NEW.cohead_commission := COALESCE(NEW.cohead_commission,_p.shipto_commission); IF (NEW.cohead_taxzone_id=-1) THEN NEW.cohead_taxzone_id := NULL; ELSE NEW.cohead_taxzone_id := COALESCE(NEW.cohead_taxzone_id,_p.shipto_taxzone_id); END IF; ELSE NEW.cohead_salesrep_id := COALESCE(NEW.cohead_salesrep_id,_p.cust_salesrep_id); NEW.cohead_shipvia := COALESCE(NEW.cohead_shipvia,_p.cust_shipvia); NEW.cohead_shipchrg_id := COALESCE(NEW.cohead_shipchrg_id,_p.cust_shipchrg_id); NEW.cohead_shipform_id := COALESCE(NEW.cohead_shipform_id,_p.cust_shipform_id); NEW.cohead_commission := COALESCE(NEW.cohead_commission,_p.cust_commprcnt); IF (NEW.cohead_taxzone_id=-1) THEN NEW.cohead_taxzone_id := NULL; ELSE NEW.cohead_taxzone_id := COALESCE(NEW.cohead_taxzone_id,_p.cust_taxzone_id); END IF; END IF; IF ((NEW.cohead_warehous_id IS NULL) OR (NEW.cohead_fob IS NULL)) THEN IF (NEW.cohead_warehous_id IS NULL) THEN SELECT warehous_id,warehous_fob INTO _w FROM usrpref, whsinfo WHERE ((warehous_id=CAST(usrpref_value AS INTEGER)) AND (warehous_shipping) AND (warehous_active) AND (usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse')); ELSE SELECT warehous_id,warehous_fob INTO _w FROM whsinfo WHERE (warehous_id=NEW.cohead_warehous_id); END IF; IF (FOUND) THEN NEW.cohead_warehous_id := COALESCE(NEW.cohead_warehous_id,_w.warehous_id); NEW.cohead_fob := COALESCE(NEW.cohead_fob,_w.warehous_fob); END IF; END IF; END IF; -- Only Check P/O logic for imports, because UI checks when entire order is saved IF (NEW.cohead_imported) THEN -- Check for required Purchase Order IF (_p.cust_usespos AND ((NEW.cohead_custponumber IS NULL) OR (TRIM(BOTH FROM NEW.cohead_custponumber)=''))) THEN RAISE EXCEPTION 'You must enter a Customer P/O for this Sales Order.'; END IF; -- Check for duplicate Purchase Orders if not allowed IF (_p.cust_usespos AND NOT (_p.cust_blanketpos)) THEN SELECT cohead_id INTO _a FROM cohead WHERE ((cohead_cust_id=NEW.cohead_cust_id) AND (cohead_id<>NEW.cohead_id) AND (UPPER(cohead_custponumber) = UPPER(NEW.cohead_custponumber)) ) UNION SELECT quhead_id FROM quhead WHERE ((quhead_cust_id=NEW.cohead_cust_id) AND (quhead_id<>NEW.cohead_id) AND (UPPER(quhead_custponumber) = UPPER(NEW.cohead_custponumber)) ); IF (FOUND) THEN RAISE EXCEPTION 'This Customer does not use Blanket P/O Numbers and the P/O Number you entered has already been used for another Sales Order. Please verify the P/O Number and either enter a new P/O Number or add to the existing Sales Order.'; END IF; END IF; END IF; --Auto create project if applicable IF ((TG_OP = 'INSERT') AND (NEW.cohead_prj_id IS NULL)) THEN SELECT fetchMetricBool('AutoCreateProjectsForOrders') INTO _check; IF (_check) THEN SELECT NEXTVAL('prj_prj_id_seq') INTO _prjId; NEW.cohead_prj_id := _prjId; INSERT INTO prj (prj_id, prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po) VALUES(_prjId, NEW.cohead_number, NEW.cohead_number, 'Auto Generated Project from Sales Order.', 'O', TRUE, TRUE, TRUE); END IF; END IF; IF (TG_OP = 'UPDATE') THEN SELECT true INTO _check FROM coitem WHERE ( (coitem_status='C') AND (coitem_cohead_id=NEW.cohead_id) ) LIMIT 1; IF (NOT FOUND) THEN --Update project references on supply UPDATE pr SET pr_prj_id=NEW.cohead_prj_id FROM coitem WHERE ((coitem_cohead_id=NEW.cohead_id) AND (coitem_order_type='R') AND (coitem_order_id=pr_id)); PERFORM changeWoProject(coitem_order_id, NEW.cohead_prj_id, TRUE) FROM coitem WHERE ((coitem_cohead_id=NEW.cohead_id) AND (coitem_order_type='W')); ELSE IF NEW.cohead_prj_id <> COALESCE(OLD.cohead_prj_id,-1) THEN RAISE EXCEPTION 'You can not change the project ID on orders with closed lines.'; END IF; END IF; END IF; -- Deal with Billing Address IF (TG_OP = 'INSERT') THEN IF (_p.cust_ffbillto) THEN -- If they didn't supply data, we'll put in the bill to contact and address NEW.cohead_billto_cntct_id=COALESCE(NEW.cohead_billto_cntct_id,_p.cntct_id); NEW.cohead_billto_cntct_honorific=COALESCE(NEW.cohead_billto_cntct_honorific,_p.cntct_honorific,''); NEW.cohead_billto_cntct_first_name=COALESCE(NEW.cohead_billto_cntct_first_name,_p.cntct_first_name,''); NEW.cohead_billto_cntct_middle=COALESCE(NEW.cohead_billto_cntct_middle,_p.cntct_middle,''); NEW.cohead_billto_cntct_last_name=COALESCE(NEW.cohead_billto_cntct_last_name,_p.cntct_last_name,''); NEW.cohead_billto_cntct_phone=COALESCE(NEW.cohead_billto_cntct_phone,_p.cntct_phone,''); NEW.cohead_billto_cntct_title=COALESCE(NEW.cohead_billto_cntct_title,_p.cntct_title,''); NEW.cohead_billto_cntct_fax=COALESCE(NEW.cohead_billto_cntct_fax,_p.cntct_fax,''); NEW.cohead_billto_cntct_email=COALESCE(NEW.cohead_billto_cntct_email,_p.cntct_email,''); NEW.cohead_billtoname=COALESCE(NEW.cohead_billtoname,_p.cust_name,''); NEW.cohead_billtoaddress1=COALESCE(NEW.cohead_billtoaddress1,_p.addr_line1,''); NEW.cohead_billtoaddress2=COALESCE(NEW.cohead_billtoaddress2,_p.addr_line2,''); NEW.cohead_billtoaddress3=COALESCE(NEW.cohead_billtoaddress3,_p.addr_line3,''); NEW.cohead_billtocity=COALESCE(NEW.cohead_billtocity,_p.addr_city,''); NEW.cohead_billtostate=COALESCE(NEW.cohead_billtostate,_p.addr_state,''); NEW.cohead_billtozipcode=COALESCE(NEW.cohead_billtozipcode,_p.addr_postalcode,''); NEW.cohead_billtocountry=COALESCE(NEW.cohead_billtocountry,_p.addr_country,''); ELSE -- Free form not allowed, we're going to put in the address regardless NEW.cohead_billto_cntct_id=_p.cntct_id; NEW.cohead_billto_cntct_honorific=COALESCE(_p.cntct_honorific,''); NEW.cohead_billto_cntct_first_name=COALESCE(_p.cntct_first_name,''); NEW.cohead_billto_cntct_middle=COALESCE(_p.cntct_middle,''); NEW.cohead_billto_cntct_last_name=COALESCE(_p.cntct_last_name,''); NEW.cohead_billto_cntct_phone=COALESCE(_p.cntct_phone,''); NEW.cohead_billto_cntct_title=COALESCE(_p.cntct_title,''); NEW.cohead_billto_cntct_fax=COALESCE(_p.cntct_fax,''); NEW.cohead_billto_cntct_email=COALESCE(_p.cntct_email,''); NEW.cohead_billtoname=COALESCE(_p.cust_name,''); NEW.cohead_billtoaddress1=COALESCE(_p.addr_line1,''); NEW.cohead_billtoaddress2=COALESCE(_p.addr_line2,''); NEW.cohead_billtoaddress3=COALESCE(_p.addr_line3,''); NEW.cohead_billtocity=COALESCE(_p.addr_city,''); NEW.cohead_billtostate=COALESCE(_p.addr_state,''); NEW.cohead_billtozipcode=COALESCE(_p.addr_postalcode,''); NEW.cohead_billtocountry=COALESCE(_p.addr_country,''); END IF; END IF; -- Now let's look at Shipto Address -- If there's nothing in the address fields and there is a shipto id -- or there is a default address available, let's put in some shipto address data IF ((TG_OP = 'INSERT') AND NOT ((NEW.cohead_shipto_id IS NULL) AND NOT _p.cust_ffshipto) AND (NEW.cohead_shipto_cntct_id IS NULL) AND (NEW.cohead_shipto_cntct_honorific IS NULL) AND (NEW.cohead_shipto_cntct_first_name IS NULL) AND (NEW.cohead_shipto_cntct_middle IS NULL) AND (NEW.cohead_shipto_cntct_last_name IS NULL) AND (NEW.cohead_shipto_cntct_suffix IS NULL) AND (NEW.cohead_shipto_cntct_phone IS NULL) AND (NEW.cohead_shipto_cntct_title IS NULL) AND (NEW.cohead_shipto_cntct_fax IS NULL) AND (NEW.cohead_shipto_cntct_email IS NULL) AND (NEW.cohead_shiptoname IS NULL) AND (NEW.cohead_shiptoaddress1 IS NULL) AND (NEW.cohead_shiptoaddress2 IS NULL) AND (NEW.cohead_shiptoaddress3 IS NULL) AND (NEW.cohead_shiptocity IS NULL) AND (NEW.cohead_shiptostate IS NULL) AND (NEW.cohead_shiptocountry IS NULL)) THEN IF ((NEW.cohead_shipto_id IS NULL) AND (_p.shipto_id IS NOT NULL)) THEN _shiptoId := _p.shipto_addr_id; ELSE _shiptoId := NEW.cohead_shipto_id; END IF; SELECT * INTO _a FROM shiptoinfo LEFT OUTER JOIN addr ON (addr_id=shipto_addr_id) LEFT OUTER JOIN cntct ON (cntct_id=shipto_cntct_id) WHERE (shipto_id=_shiptoId); NEW.cohead_shipto_cntct_id := _a.cntct_id; NEW.cohead_shipto_cntct_honorific := COALESCE(_a.cntct_honorific,''); NEW.cohead_shipto_cntct_first_name := COALESCE(_a.cntct_first_name,''); NEW.cohead_shipto_cntct_middle := COALESCE(_a.cntct_middle,''); NEW.cohead_shipto_cntct_last_name := COALESCE(_a.cntct_last_name,''); NEW.cohead_shipto_cntct_suffix := COALESCE(_a.cntct_suffix,''); NEW.cohead_shipto_cntct_phone := COALESCE(_a.cntct_phone,''); NEW.cohead_shipto_cntct_title := COALESCE(_a.cntct_title,''); NEW.cohead_shipto_cntct_fax := COALESCE(_a.cntct_fax,''); NEW.cohead_shipto_cntct_email := COALESCE(_a.cntct_email,''); NEW.cohead_shiptoname := COALESCE(_p.shipto_name,''); NEW.cohead_shiptoaddress1 := COALESCE(_a.addr_line1,''); NEW.cohead_shiptoaddress2 := COALESCE(_a.addr_line2,''); NEW.cohead_shiptoaddress3 := COALESCE(_a.addr_line3,''); NEW.cohead_shiptocity := COALESCE(_a.addr_city,''); NEW.cohead_shiptostate := COALESCE(_a.addr_state,''); NEW.cohead_shiptozipcode := COALESCE(_a.addr_postalcode,''); NEW.cohead_shiptocountry := COALESCE(_a.addr_country,''); ELSE IF (_p.cust_ffshipto) THEN -- Use Address Save function to see if the new address entered matches -- data for the shipto number. If not that will insert new address for CRM SELECT SaveAddr( NULL, NULL, NEW.cohead_shiptoaddress1, NEW.cohead_shiptoaddress2, NEW.cohead_shiptoaddress3, NEW.cohead_shiptocity, NEW.cohead_shiptostate, NEW.cohead_shiptozipcode, NEW.cohead_shiptocountry, 'CHANGEONE') INTO _addrId; SELECT shipto_addr_id INTO _shiptoid FROM shiptoinfo WHERE (shipto_id=NEW.cohead_shipto_id); -- If the address passed doesn't match shipto address, then it's something else IF (_shiptoid <> _addrId) THEN NEW.cohead_shipto_id := NULL; END IF; ELSE SELECT cohead_shipto_id INTO _shiptoid FROM cohead WHERE (cohead_id=NEW.cohead_id); -- Get the shipto address IF (COALESCE(NEW.cohead_shipto_id,-1) <> COALESCE(_shiptoid,-1)) THEN SELECT * INTO _a FROM shiptoinfo LEFT OUTER JOIN cntct ON (shipto_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (shipto_addr_id=addr_id) WHERE (shipto_id=NEW.cohead_shipto_id); IF (FOUND) THEN -- Free form not allowed so we're going to make sure address matches Shipto data NEW.cohead_shipto_cntct_id=_a.cntct_id; NEW.cohead_shipto_cntct_honorific=COALESCE(_a.cntct_honorific,''); NEW.cohead_shipto_cntct_first_name=COALESCE(_a.cntct_first_name,''); NEW.cohead_shipto_cntct_middle=COALESCE(_a.cntct_middle,''); NEW.cohead_shipto_cntct_last_name=COALESCE(_a.cntct_last_name,''); NEW.cohead_shipto_cntct_phone=COALESCE(_a.cntct_phone,''); NEW.cohead_shipto_cntct_title=COALESCE(_a.cntct_title,''); NEW.cohead_shipto_cntct_fax=COALESCE(_a.cntct_fax,''); NEW.cohead_shipto_cntct_email=COALESCE(_a.cntct_email,''); NEW.cohead_shiptoname := COALESCE(_a.shipto_name,''); NEW.cohead_shiptophone := COALESCE(_a.cntct_phone,''); NEW.cohead_shiptoaddress1 := COALESCE(_a.addr_line1,''); NEW.cohead_shiptoaddress2 := COALESCE(_a.addr_line2,''); NEW.cohead_shiptoaddress3 := COALESCE(_a.addr_line3,''); NEW.cohead_shiptocity := COALESCE(_a.addr_city,''); NEW.cohead_shiptostate := COALESCE(_a.addr_state,''); NEW.cohead_shiptozipcode := COALESCE(_a.addr_postalcode,''); NEW.cohead_shiptocountry := COALESCE(_a.addr_country,''); ELSE -- If no shipto data and free form not allowed, this won't work RAISE EXCEPTION 'Free form Shipto is not allowed on this Customer. You must supply a valid Shipto ID.'; END IF; END IF; END IF; END IF; END IF; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='SalesOrderChangeLog') ) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment('ChangeLog', 'S', NEW.cohead_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.cohead_terms_id <> NEW.cohead_terms_id) THEN PERFORM postComment( 'ChangeLog', 'S', NEW.cohead_id, ('Terms Changed from "' || oldterms.terms_code || '" to "' || newterms.terms_code || '"') ) FROM terms AS oldterms, terms AS newterms WHERE ( (oldterms.terms_id=OLD.cohead_terms_id) AND (newterms.terms_id=NEW.cohead_terms_id) ); END IF; IF (OLD.cohead_shipvia <> NEW.cohead_shipvia) THEN PERFORM postComment ('ChangeLog', 'S', New.cohead_id, ('Shipvia Changed from "' || OLD.cohead_shipvia || '" to "' || NEW.cohead_shipvia || '"')); END IF; IF (OLD.cohead_holdtype <> NEW.cohead_holdtype) THEN PERFORM postComment( 'ChangeLog', 'S', NEW.cohead_id, ( 'Hold Type Changed from ' || (CASE OLD.cohead_holdtype WHEN('N') THEN 'No Hold' WHEN('C') THEN 'Credit Hold' WHEN('P') THEN 'Packing Hold' WHEN('S') THEN 'Shipping Hold' ELSE 'Unknown/Error' END) || ' to ' || (CASE NEW.cohead_holdtype WHEN('N') THEN 'No Hold' WHEN('C') THEN 'Credit Hold' WHEN('P') THEN 'Packing Hold' WHEN('S') THEN 'Shipping Hold' ELSE 'Unknown/Error' END) ) ); END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM docass WHERE docass_source_id = OLD.cohead_id AND docass_source_type = 'S'; DELETE FROM docass WHERE docass_target_id = OLD.cohead_id AND docass_target_type = 'S'; DELETE FROM comment WHERE ( (comment_source='S') AND (comment_source_id=OLD.cohead_id) ); END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF ( (NOT (OLD.cohead_holdtype = 'N')) AND (NEW.cohead_holdtype='N') ) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.cohead_id, NEW.cohead_warehous_id, NEW.cohead_number::TEXT FROM evntnot, evnttype WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=NEW.cohead_warehous_id) AND (evnttype_name='SoReleased') ); END IF; IF (OLD.cohead_ordercomments <> NEW.cohead_ordercomments) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.cohead_id, NEW.cohead_warehous_id, NEW.cohead_number::TEXT FROM evntnot, evnttype WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=NEW.cohead_warehous_id) AND (evnttype_name='SoNotesChanged') ); END IF; IF ((OLD.cohead_shipchrg_id != NEW.cohead_shipchrg_id) OR (OLD.cohead_freight != NEW.cohead_freight) OR (OLD.cohead_shipvia != NEW.cohead_shipvia)) THEN UPDATE shiphead SET shiphead_shipchrg_id=NEW.cohead_shipchrg_id, shiphead_freight=NEW.cohead_freight, shiphead_shipvia=NEW.cohead_shipvia WHERE ((shiphead_order_type='SO') AND (shiphead_order_id=NEW.cohead_id) AND (NOT shiphead_shipped)); END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE NEW.cohead_lastupdated = CURRENT_TIMESTAMP; RETURN NEW; END IF; END; $$; ALTER FUNCTION public._soheadtrigger() OWNER TO admin; -- -- Name: _soheadtriggerafter(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _soheadtriggerafter() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (COALESCE(NEW.cohead_taxzone_id,-1) <> COALESCE(OLD.cohead_taxzone_id,-1)) THEN UPDATE coitem SET coitem_taxtype_id=getItemTaxType(itemsite_item_id,NEW.cohead_taxzone_id) FROM itemsite WHERE ((itemsite_id=coitem_itemsite_id) AND (coitem_cohead_id=NEW.cohead_id)); END IF; -- update comments on any associated drop ship POs IF (COALESCE(NEW.cohead_shipcomments, TEXT('')) <> COALESCE(OLD.cohead_shipcomments, TEXT(''))) THEN UPDATE pohead SET pohead_comments=NEW.cohead_shipcomments FROM poitem JOIN coitem ON (coitem_cohead_id=NEW.cohead_id AND coitem_order_type='P' AND coitem_order_id=poitem_id) WHERE (pohead_id=poitem_pohead_id); END IF; RETURN NEW; END; $$; ALTER FUNCTION public._soheadtriggerafter() OWNER TO admin; -- -- Name: _soitemafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _soitemafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (OLD.coitem_status = 'O') THEN IF ( (SELECT (count(*) < 1) FROM coitem WHERE ((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_id != OLD.coitem_id) AND (coitem_status = 'O')) ) ) THEN UPDATE cohead SET cohead_status = 'C' WHERE ((cohead_id=OLD.coitem_cohead_id) AND (cohead_status='O')); END IF; END IF; RETURN OLD; END; $$; ALTER FUNCTION public._soitemafterdeletetrigger() OWNER TO admin; -- -- Name: _soitemaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _soitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check NUMERIC; _r RECORD; _kit BOOLEAN; _fractional BOOLEAN; _rec RECORD; _kstat TEXT; _pstat TEXT; _result INTEGER; _coitemid INTEGER; _itemsrcid INTEGER; _orderid INTEGER; BEGIN _rec := NEW; --Cache some information SELECT * INTO _r FROM cohead WHERE (cohead_id=_rec.coitem_cohead_id); --Determine if this is a kit for later processing SELECT COALESCE(item_type,'')='K', item_fractional INTO _kit, _fractional FROM itemsite, item WHERE((itemsite_item_id=item_id) AND (itemsite_id=_rec.coitem_itemsite_id)); _kit := COALESCE(_kit, false); _fractional := COALESCE(_fractional, false); IF (_kit) THEN -- Kit Processing IF (TG_OP = 'INSERT') THEN -- Create Sub Lines for Kit Components PERFORM explodeKit(NEW.coitem_cohead_id, NEW.coitem_linenumber, 0, NEW.coitem_itemsite_id, NEW.coitem_qtyord, NEW.coitem_scheddate, NEW.coitem_promdate, NEW.coitem_memo); IF (fetchMetricBool('KitComponentInheritCOS')) THEN -- Update kit line item COS UPDATE coitem SET coitem_cos_accnt_id = CASE WHEN (COALESCE(NEW.coitem_cos_accnt_id, -1) != -1) THEN NEW.coitem_cos_accnt_id WHEN (NEW.coitem_warranty) THEN resolveCOWAccount(NEW.coitem_itemsite_id, _r.cohead_cust_id, _r.cohead_saletype_id, _r.cohead_shipzone_id) ELSE resolveCOSAccount(NEW.coitem_itemsite_id, _r.cohead_cust_id, _r.cohead_saletype_id, _r.cohead_shipzone_id) END WHERE((coitem_cohead_id=NEW.coitem_cohead_id) AND (coitem_linenumber = NEW.coitem_linenumber) AND (coitem_subnumber > 0)); END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF (NEW.coitem_qtyord <> OLD.coitem_qtyord) THEN -- Recreate Sub Lines for Kit Components FOR _coitemid IN SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_subnumber > 0) ) LOOP SELECT deleteSoItem(_coitemid) INTO _result; IF (_result < 0) THEN RAISE EXCEPTION 'Error deleting kit components: deleteSoItem(integer) Error:%', _result; END IF; END LOOP; PERFORM explodeKit(NEW.coitem_cohead_id, NEW.coitem_linenumber, 0, NEW.coitem_itemsite_id, NEW.coitem_qtyord, NEW.coitem_scheddate, NEW.coitem_promdate); END IF; IF ( (NEW.coitem_qtyord <> OLD.coitem_qtyord) OR (NEW.coitem_cos_accnt_id <> OLD.coitem_cos_accnt_id) ) THEN IF (fetchMetricBool('KitComponentInheritCOS')) THEN -- Update kit line item COS UPDATE coitem SET coitem_cos_accnt_id = CASE WHEN (COALESCE(NEW.coitem_cos_accnt_id, -1) != -1) THEN NEW.coitem_cos_accnt_id WHEN (NEW.coitem_warranty) THEN resolveCOWAccount(NEW.coitem_itemsite_id, _r.cohead_cust_id, _r.cohead_saletype_id, _r.cohead_shipzone_id) ELSE resolveCOSAccount(NEW.coitem_itemsite_id, _r.cohead_cust_id, _r.cohead_saletype_id, _r.cohead_shipzone_id) END WHERE((coitem_cohead_id=NEW.coitem_cohead_id) AND (coitem_linenumber = NEW.coitem_linenumber) AND (coitem_subnumber > 0)); END IF; END IF; IF (NEW.coitem_scheddate <> OLD.coitem_scheddate) THEN -- Update kit line item Schedule Date UPDATE coitem SET coitem_scheddate = NEW.coitem_scheddate WHERE((coitem_cohead_id=NEW.coitem_cohead_id) AND (coitem_linenumber = NEW.coitem_linenumber) AND (coitem_subnumber > 0)); END IF; END IF; END IF; IF (TG_OP = 'INSERT') THEN -- Create Purchase Request if flagged to do so IF ((NEW.coitem_order_type='R') AND (NEW.coitem_order_id=-1)) THEN SELECT createpr(CAST(cohead_number AS INTEGER), 'S', NEW.coitem_id) INTO _orderid FROM cohead WHERE (cohead_id=NEW.coitem_cohead_id); IF (_orderid > 0) THEN UPDATE coitem SET coitem_order_id=_orderid WHERE (coitem_id=NEW.coitem_id); END IF; END IF; -- Create Purchase Order if flagged to do so IF ((NEW.coitem_order_type='P') AND (NEW.coitem_order_id=-1)) THEN SELECT itemsrc_id INTO _itemsrcid FROM itemsite JOIN itemsrc ON (itemsrc_item_id=itemsite_item_id AND itemsrc_default) WHERE (itemsite_id=NEW.coitem_itemsite_id); IF (FOUND) THEN SELECT createPurchaseToSale(NEW.coitem_id, _itemsrcid, itemsite_dropship, CASE WHEN (NEW.coitem_prcost=0.0) THEN NULL ELSE NEW.coitem_prcost END) INTO _orderid FROM itemsite WHERE (itemsite_id=NEW.coitem_itemsite_id); IF (_orderid > 0) THEN UPDATE coitem SET coitem_order_id=_orderid WHERE (coitem_id=NEW.coitem_id); END IF; END IF; END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF (NEW.coitem_order_type = 'P') THEN --If soitem is cancelled IF ((NEW.coitem_status = 'X') AND (OLD.coitem_status <> 'X')) THEN --Generate the PoItemSoCancelled event INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', poitem_id, itemsite_warehous_id, (pohead_number || '-' || poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id=evnttype_id) JOIN itemsite ON (evntnot_warehous_id=itemsite_warehous_id) JOIN item ON (itemsite_item_id=item_id) JOIN poitem ON (poitem_itemsite_id=itemsite_id) JOIN pohead ON( poitem_pohead_id=pohead_id) WHERE( (poitem_id=OLD.coitem_order_id) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='PoItemSoCancelled') ); END IF; END IF; END IF; IF (_rec.coitem_subnumber > 0) THEN SELECT coitem_status INTO _kstat FROM coitem WHERE((coitem_cohead_id=_rec.coitem_cohead_id) AND (coitem_linenumber=_rec.coitem_linenumber) AND (coitem_subnumber = 0)); IF ((SELECT count(*) FROM coitem WHERE((coitem_cohead_id=_rec.coitem_cohead_id) AND (coitem_linenumber=_rec.coitem_linenumber) AND (coitem_subnumber <> _rec.coitem_subnumber) AND (coitem_subnumber > 0) AND (coitem_status = 'O'))) > 0) THEN _pstat := 'O'; ELSE _pstat := _rec.coitem_status; END IF; END IF; IF(TG_OP = 'INSERT') THEN IF (_rec.coitem_subnumber > 0 AND _rec.coitem_status = 'O') THEN _pstat := 'O'; END IF; ELSIF (TG_OP = 'UPDATE') THEN IF (_rec.coitem_subnumber > 0 AND _rec.coitem_status = 'O') THEN _pstat := 'O'; END IF; IF ((NEW.coitem_status = 'C') AND (OLD.coitem_status <> 'C')) THEN IF(_kit) THEN UPDATE coitem SET coitem_status='C' WHERE((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_status='O') AND (coitem_subnumber > 0)); END IF; END IF; IF ((NEW.coitem_status = 'X') AND (OLD.coitem_status <> 'X')) THEN IF(_kit) THEN UPDATE coitem SET coitem_status='X' WHERE((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_status='O') AND (coitem_subnumber > 0)); END IF; END IF; IF(NEW.coitem_status = 'O' AND OLD.coitem_status <> 'O') THEN IF(_kit) THEN UPDATE coitem SET coitem_status='O' WHERE((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND ((coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) > 0) AND (coitem_subnumber > 0)); END IF; END IF; END IF; IF ((_kstat IS NOT NULL) AND (_pstat IS NOT NULL) AND (_rec.coitem_subnumber > 0) AND (_kstat <> _pstat)) THEN UPDATE coitem SET coitem_status = _pstat WHERE((coitem_cohead_id=_rec.coitem_cohead_id) AND (coitem_linenumber=_rec.coitem_linenumber) AND (coitem_subnumber = 0)); END IF; --If auto calculate freight, recalculate cohead_freight IF (SELECT cohead_calcfreight FROM cohead WHERE (cohead_id=NEW.coitem_cohead_id)) THEN UPDATE cohead SET cohead_freight = COALESCE( (SELECT SUM(freightdata_total) FROM freightDetail('SO', cohead_id, cohead_cust_id, cohead_shipto_id, cohead_orderdate, cohead_shipvia, cohead_curr_id)), 0) WHERE cohead_id=NEW.coitem_cohead_id; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._soitemaftertrigger() OWNER TO admin; -- -- Name: _soitembeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _soitembeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _kit BOOLEAN := FALSE; _shipped BOOLEAN := FALSE; _coitemid INTEGER := 0; _result INTEGER := 0; BEGIN -- Check Priv IF NOT (checkPrivilege('MaintainSalesOrders')) THEN RAISE EXCEPTION 'You do not have privileges to alter a Sales Order.'; END IF; -- Cache some information SELECT * INTO _r FROM cohead, itemsite, item WHERE ( (cohead_id=OLD.coitem_cohead_id) AND (itemsite_id=OLD.coitem_itemsite_id) AND (item_id=itemsite_item_id) ); _kit := (COALESCE(_r.item_type,'')='K'); -- Check for shipped kit components IF(_kit AND OLD.coitem_status <> 'C' AND OLD.coitem_status <> 'X') THEN IF (EXISTS (SELECT coitem_id FROM coitem JOIN shipitem ON (shipitem_orderitem_id=coitem_id) JOIN shiphead ON (shiphead_id=shipitem_shiphead_id AND shiphead_order_type='SO') WHERE ((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_subnumber > 0)) GROUP BY coitem_id HAVING (SUM(shipitem_qty) > 0) LIMIT 1) ) THEN _shipped := TRUE; END IF; END IF; IF(_kit AND _shipped) THEN RAISE EXCEPTION 'You can not delete this Sales Order Line as it has several sub components that have already been shipped.'; END IF; DELETE FROM comment WHERE ( (comment_source='SI') AND (comment_source_id=OLD.coitem_id) ); DELETE FROM charass WHERE ((charass_target_type='SI') AND (charass_target_id=OLD.coitem_id)); -- Delete Sub Lines for Kit Components IF (OLD.coitem_subnumber = 0) THEN FOR _coitemid IN SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_subnumber > 0) ) LOOP SELECT deleteSoItem(_coitemid) INTO _result; IF (_result < 0) THEN IF NOT (_r.itemsite_createsopo AND (_result = -10 OR _result = -20)) THEN RAISE EXCEPTION 'Error deleting kit components: deleteSoItem(integer) Error:%', _result; END IF; END IF; END LOOP; END IF; INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', OLD.coitem_id, _r.itemsite_warehous_id, (_r.cohead_number || '-' || OLD.coitem_linenumber) FROM evntnot, evnttype WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=_r.itemsite_warehous_id) AND (OLD.coitem_scheddate <= (CURRENT_DATE + _r.itemsite_eventfence)) AND (evnttype_name='SoitemCancelled') ); RETURN OLD; END; $$; ALTER FUNCTION public._soitembeforedeletetrigger() OWNER TO admin; -- -- Name: _soitembeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _soitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check NUMERIC; _itemNumber TEXT; _r RECORD; _kit BOOLEAN; BEGIN --Determine if this is a kit for later processing SELECT COALESCE(item_type,'')='K' INTO _kit FROM itemsite, item WHERE((itemsite_item_id=item_id) AND (itemsite_id=NEW.coitem_itemsite_id)); _kit := COALESCE(_kit, false); IF (TG_OP = 'INSERT') THEN -- If this is imported, go ahead and insert default characteristics IF (NEW.coitem_imported) THEN INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_price) SELECT 'SI', NEW.coitem_id, char_id, charass_value, itemcharprice(item_id,char_id,charass_value,cohead_cust_id,cohead_shipto_id,NEW.coitem_qtyord,cohead_curr_id,cohead_orderdate) FROM ( SELECT DISTINCT char_id, char_name, charass_value, item_id, cohead_cust_id, cohead_shipto_id, cohead_curr_id, cohead_orderdate FROM cohead, charass, char, itemsite, item WHERE((itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (charass_target_type='I') AND (charass_target_id=item_id) AND (charass_default) AND (char_id=charass_char_id) AND (cohead_id=NEW.coitem_cohead_id)) ORDER BY char_name) AS data; END IF; END IF; -- Create work order and process if flagged to do so IF ((NEW.coitem_order_type='W') AND (NEW.coitem_order_id=-1)) THEN SELECT createwo(CAST(cohead_number AS INTEGER), NEW.coitem_itemsite_id, 1, -- priority validateOrderQty(NEW.coitem_itemsite_id, NEW.coitem_qtyord, TRUE), itemsite_leadtime, NEW.coitem_scheddate, NEW.coitem_memo, 'S', NEW.coitem_id, cohead_prj_id) INTO NEW.coitem_order_id FROM cohead, itemsite WHERE ((cohead_id=NEW.coitem_cohead_id) AND (itemsite_id=NEW.coitem_itemsite_id)); INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT 'W', NEW.coitem_order_id, charass_char_id, charass_value FROM charass WHERE ((charass_target_type='SI') AND (charass_target_id=NEW.coitem_id)); END IF; IF (TG_OP = 'UPDATE') THEN -- Update P/R date if applicable IF (NEW.coitem_scheddate <> OLD.coitem_scheddate AND NEW.coitem_order_type='R' AND NEW.coitem_order_id > 1) THEN UPDATE pr SET pr_duedate = NEW.coitem_scheddate WHERE (pr_order_id=NEW.coitem_id AND pr_order_type='S'); END IF; -- If closing or cancelling and there is a job item work order, then close job and distribute remaining costs IF ((NEW.coitem_status = 'C' AND OLD.coitem_status <> 'C') OR (NEW.coitem_status = 'X' AND OLD.coitem_status <> 'X')) AND (OLD.coitem_order_id > -1) THEN SELECT wo_id, wo_wipvalue INTO _r FROM wo,itemsite,item WHERE ((wo_ordtype='S') AND (wo_ordid=OLD.coitem_id) AND (itemsite_id=wo_itemsite_id) AND (item_id=itemsite_item_id) AND (itemsite_costmethod = 'J')); IF (FOUND) THEN IF (_r.wo_wipvalue > 0) THEN -- Distribute to G/L, debit Cost of Sales, credit WIP PERFORM MIN(insertGLTransaction( 'W/O', 'WO', formatWoNumber(NEW.coitem_order_id), 'Job Closed Incomplete', costcat_wip_accnt_id, CASE WHEN (COALESCE(NEW.coitem_cos_accnt_id, -1) != -1) THEN NEW.coitem_cos_accnt_id WHEN (NEW.coitem_warranty=TRUE) THEN resolveCOWAccount(itemsite_id, cohead_cust_id, cohead_saletype_id, cohead_shipzone_id) ELSE resolveCOSAccount(itemsite_id, cohead_cust_id, cohead_saletype_id, cohead_shipzone_id) END, -1, _r.wo_wipvalue, current_date )) FROM itemsite, costcat, cohead WHERE ((itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (cohead_id=NEW.coitem_cohead_id)); END IF; UPDATE wo SET wo_status = 'C', wo_wipvalue = 0 WHERE (wo_id = _r.wo_id); END IF; END IF; -- Likewise, reopen the job if line reopened IF ((NEW.coitem_status != 'C' AND OLD.coitem_status = 'C') OR (NEW.coitem_status != 'X' AND OLD.coitem_status = 'X')) AND (OLD.coitem_order_id > -1) THEN UPDATE wo SET wo_status = 'I' FROM itemsite, item WHERE ((wo_ordtype = 'S') AND (wo_ordid=NEW.coitem_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costmethod='J')); END IF; -- Handle links to Return Authorization IF (fetchMetricBool('EnableReturnAuth')) THEN SELECT * INTO _r FROM raitem,rahead WHERE ((raitem_new_coitem_id=NEW.coitem_id) AND (rahead_id=raitem_rahead_id)); IF (FOUND) THEN IF ((_r.raitem_qtyauthorized <> NEW.coitem_qtyord OR _r.raitem_qty_uom_id <> NEW.coitem_qty_uom_id OR _r.raitem_qty_invuomratio <> NEW.coitem_qty_invuomratio OR _r.raitem_price_uom_id <> NEW.coitem_price_uom_id OR _r.raitem_price_invuomratio <> NEW.coitem_price_invuomratio) AND NOT (NEW.coitem_status = 'X' AND _r.raitem_qtyauthorized = 0)) THEN RAISE EXCEPTION 'Quantities for line item % may only be changed on the Return Authorization that created it.',NEW.coitem_linenumber; END IF; IF (OLD.coitem_warranty <> NEW.coitem_warranty) THEN UPDATE raitem SET raitem_warranty = NEW.coitem_warranty WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (raitem_warranty != NEW.coitem_warranty)); END IF; IF (OLD.coitem_cos_accnt_id <> NEW.coitem_cos_accnt_id) THEN UPDATE raitem SET raitem_cos_accnt_id = NEW.coitem_cos_accnt_id WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (COALESCE(raitem_cos_accnt_id,-1) != COALESCE(NEW.coitem_cos_accnt_id,-1))); END IF; IF (OLD.coitem_taxtype_id <> NEW.coitem_taxtype_id) THEN UPDATE raitem SET raitem_taxtype_id = NEW.coitem_taxtype_id WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (COALESCE(raitem_taxtype_id,-1) != COALESCE(NEW.coitem_taxtype_id,-1))); END IF; IF (OLD.coitem_scheddate <> NEW.coitem_scheddate) THEN UPDATE raitem SET raitem_scheddate = NEW.coitem_scheddate WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (raitem_scheddate != NEW.coitem_scheddate)); END IF; IF (OLD.coitem_memo <> NEW.coitem_memo) THEN UPDATE raitem SET raitem_notes = NEW.coitem_memo WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (raitem_notes != NEW.coitem_memo)); END IF; IF ((OLD.coitem_qtyshipped <> NEW.coitem_qtyshipped) AND (NEW.coitem_qtyshipped >= _r.raitem_qtyauthorized) AND ((_r.raitem_disposition = 'S') OR (_r.raitem_status = 'O') AND (_r.raitem_disposition IN ('P','V')) AND (_r.raitem_qtyreceived >= _r.raitem_qtyauthorized))) THEN UPDATE raitem SET raitem_status = 'C' WHERE (raitem_new_coitem_id=NEW.coitem_id); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._soitembeforetrigger() OWNER TO admin; -- -- Name: _soitemtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _soitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _changelog BOOLEAN := FALSE; _check BOOLEAN; _kit BOOLEAN; _shipped BOOLEAN; _atShipping NUMERIC; _tmp INTEGER; _rec RECORD; BEGIN -- Check SELECT checkPrivilege('MaintainSalesOrders') OR checkPrivilege('ShipOrders') OR checkPrivilege('IssueStockToShipping') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Sales Order.'; END IF; IF ( SELECT fetchMetricBool('SalesOrderChangeLog') ) THEN _changelog := TRUE; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (NEW.coitem_scheddate IS NULL) THEN IF (fetchmetricbool('AllowASAPShipSchedules')) THEN NEW.coitem_scheddate := current_date; ELSE RAISE EXCEPTION 'A schedule date is required.'; END IF; END IF; END IF; _rec := NEW; SELECT COALESCE(item_type,'')='K' INTO _kit FROM itemsite, item WHERE((itemsite_item_id=item_id) AND (itemsite_id=_rec.coitem_itemsite_id)); _kit := COALESCE(_kit, false); _shipped := false; IF(_kit AND _rec.coitem_status <> 'C' AND _rec.coitem_status <> 'X') THEN SELECT coitem_id INTO _tmp FROM coitem JOIN shipitem ON (shipitem_orderitem_id=coitem_id) JOIN shiphead ON (shiphead_id=shipitem_shiphead_id AND shiphead_order_type='SO') WHERE((coitem_cohead_id=_rec.coitem_cohead_id) AND (coitem_linenumber=_rec.coitem_linenumber) AND (coitem_subnumber > 0)) GROUP BY coitem_id HAVING (SUM(shipitem_qty) > 0) LIMIT 1; IF (FOUND) THEN _shipped := true; END IF; END IF; IF (TG_OP ='UPDATE') THEN IF ((OLD.coitem_status <> 'C') AND (NEW.coitem_status = 'C')) THEN SELECT qtyAtShipping(NEW.coitem_id) INTO _atShipping; IF (_atShipping > 0) THEN RAISE EXCEPTION 'Line % cannot be Closed at this time as there is inventory at shipping.',NEW.coitem_linenumber; END IF; END IF; END IF; IF (TG_OP = 'INSERT') THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.coitem_id, itemsite_warehous_id, (cohead_number || '-' || NEW.coitem_linenumber) FROM evntnot, evnttype, itemsite, item, cohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.coitem_cohead_id=cohead_id) AND (NEW.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='SoitemCreated') ); IF (_changelog) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Created'); END IF; --Set defaults if no values passed NEW.coitem_linenumber := COALESCE(NEW.coitem_linenumber, (SELECT (COALESCE(MAX(coitem_linenumber), 0) + 1) FROM coitem WHERE (coitem_cohead_id=NEW.coitem_cohead_id))); NEW.coitem_status := COALESCE(NEW.coitem_status,'O'); NEW.coitem_scheddate := COALESCE(NEW.coitem_scheddate, (SELECT MIN(coitem_scheddate) FROM coitem WHERE (coitem_cohead_id=NEW.coitem_cohead_id))); NEW.coitem_memo := COALESCE(NEW.coitem_memo,''); NEW.coitem_prcost := COALESCE(NEW.coitem_prcost,0); NEW.coitem_warranty := COALESCE(NEW.coitem_warranty,false); IF (NEW.coitem_status='O') THEN UPDATE cohead SET cohead_status = 'O' WHERE ((cohead_id=NEW.coitem_cohead_id) AND (cohead_status='C')); END IF; RETURN NEW; ELSIF (TG_OP = 'UPDATE') THEN IF (NEW.coitem_qtyord <> OLD.coitem_qtyord) THEN IF(_kit) THEN IF(_shipped) THEN RAISE EXCEPTION 'You can not change the qty ordered for a Kit item when one or more of its components have shipped inventory.'; END IF; END IF; INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_oldvalue, evntlog_newvalue ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.coitem_id, itemsite_warehous_id, (cohead_number || '-' || NEW.coitem_linenumber), OLD.coitem_qtyord, NEW.coitem_qtyord FROM evntnot, evnttype, itemsite, item, cohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.coitem_cohead_id=cohead_id) AND ( (NEW.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) OR (OLD.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) ) AND (evnttype_name='SoitemQtyChanged') ); IF (_changelog) THEN PERFORM postComment( 'ChangeLog', 'SI', NEW.coitem_id, ( 'Changed Qty. Ordered from ' || formatQty(OLD.coitem_qtyord) || ' to ' || formatQty(NEW.coitem_qtyord) ) ); END IF; END IF; IF (NEW.coitem_scheddate <> OLD.coitem_scheddate) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_olddate, evntlog_newdate ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.coitem_id, itemsite_warehous_id, (cohead_number || '-' || NEW.coitem_linenumber), OLD.coitem_scheddate, NEW.coitem_scheddate FROM evntnot, evnttype, itemsite, item, cohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.coitem_cohead_id=cohead_id) AND ( (NEW.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) OR (OLD.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) ) AND (evnttype_name='SoitemSchedDateChanged') ); IF (_changelog) THEN PERFORM postComment( 'ChangeLog', 'SI', NEW.coitem_id, ( 'Changed Sched. Date from ' || formatDate(OLD.coitem_scheddate) || ' to ' || formatDate(NEW.coitem_scheddate)) ); END IF; END IF; IF ((NEW.coitem_status = 'C') AND (OLD.coitem_status <> 'C')) THEN NEW.coitem_closedate = CURRENT_TIMESTAMP; NEW.coitem_close_username = getEffectiveXtUser(); NEW.coitem_qtyreserved := 0; IF (_changelog) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Closed'); END IF; END IF; IF ((NEW.coitem_status <> 'C') AND (OLD.coitem_status = 'C')) THEN NEW.coitem_closedate = NULL; NEW.coitem_close_username = NULL; IF (_changelog) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Reopened'); END IF; END IF; IF ((NEW.coitem_status = 'X') AND (OLD.coitem_status <> 'X')) THEN IF ((OLD.coitem_order_type = 'W') AND (SELECT wo_status IN ('O', 'E', 'R') FROM wo WHERE (wo_id=OLD.coitem_order_id))) THEN -- Close any associated W/O PERFORM closeWo(OLD.coitem_order_id, FALSE, CURRENT_DATE); ELSIF (OLD.coitem_order_type = 'R') THEN -- Delete any associated P/R PERFORM deletePr(OLD.coitem_order_id); END IF; NEW.coitem_qtyreserved := 0; IF (_changelog) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Canceled'); PERFORM postComment('ChangeLog', 'S', NEW.coitem_cohead_id, 'Line # '|| NEW.coitem_linenumber ||' Canceled'); END IF; INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', OLD.coitem_id, itemsite_warehous_id, (cohead_number || '-' || OLD.coitem_linenumber) FROM evntnot, evnttype, itemsite, item, cohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=OLD.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (OLD.coitem_cohead_id=cohead_id) AND (OLD.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='SoitemCancelled') ); END IF; IF ((NEW.coitem_qtyreserved <> OLD.coitem_qtyreserved) AND (_changelog)) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Changed Qty Reserved to '|| NEW.coitem_qtyreserved); END IF; END IF; NEW.coitem_lastupdated = CURRENT_TIMESTAMP; -- Handle status for header IF (TG_OP = 'UPDATE') THEN IF (OLD.coitem_status <> NEW.coitem_status) THEN IF ( (SELECT (count(*) < 1) FROM coitem WHERE ((coitem_cohead_id=NEW.coitem_cohead_id) AND (coitem_id != NEW.coitem_id) AND (coitem_status='O')) ) AND (NEW.coitem_status<>'O') ) THEN UPDATE cohead SET cohead_status = 'C' WHERE ((cohead_id=NEW.coitem_cohead_id) AND (cohead_status='O')); ELSE UPDATE cohead SET cohead_status = 'O' WHERE ((cohead_id=NEW.coitem_cohead_id) AND (cohead_status='C')); END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._soitemtrigger() OWNER TO admin; -- -- Name: _taxauthafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _taxauthafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (EXISTS(SELECT 1 FROM checkhead WHERE checkhead_recip_id = OLD.taxauth_id AND checkhead_recip_type='T')) THEN RAISE EXCEPTION 'Cannot delete the tax authority % because checks have been written to it [xtuple: deleteTaxAuthority, -7, %]', OLD.taxauth_number, OLD.taxauth_number; END IF; IF (fetchMetricValue('DefaultTaxAuthority') = OLD.taxauth_id) THEN RAISE EXCEPTION 'Cannot delete the default Tax Authority [xtuple: deleteTaxAuthority, -8, %]', OLD.taxauth_code; END IF; IF (fetchMetricBool('TaxAuthChangeLog')) THEN PERFORM postComment(cmnttype_id, 'TAXAUTH', OLD.taxauth_id, 'Deleted "' || OLD.taxauth_number || '"') FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; ALTER FUNCTION public._taxauthafterdeletetrigger() OWNER TO admin; -- -- Name: _taxauthaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _taxauthaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_taxauth_id=NEW.taxauth_id, crmacct_name=NEW.taxauth_name WHERE crmacct_number=NEW.taxauth_code; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_taxauth_id ) VALUES (NEW.taxauth_code, NEW.taxauth_name, TRUE, 'O', NEW.taxauth_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; /* TODO: default characteristic assignments based on what? */ ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.taxauth_code WHERE ((crmacct_taxauth_id=NEW.taxauth_id) AND (crmacct_number!=NEW.taxauth_code)); UPDATE crmacct SET crmacct_name = NEW.taxauth_name WHERE ((crmacct_taxauth_id=NEW.taxauth_id) AND (crmacct_name!=NEW.taxauth_name)); END IF; IF (fetchMetricBool('TaxAuthChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.taxauth_code <> NEW.taxauth_code) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Code changed from "' || OLD.taxauth_code || '" to "' || NEW.taxauth_code || '"'); END IF; IF (OLD.taxauth_name <> NEW.taxauth_name) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Name changed from "' || OLD.taxauth_name || '" to "' || NEW.taxauth_name || '"'); END IF; IF (OLD.taxauth_extref <> NEW.taxauth_extref) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'External Ref. changed from "' || OLD.taxauth_extref || '" to "' || NEW.taxauth_extref || '"'); END IF; IF (OLD.taxauth_addr_id <> NEW.taxauth_addr_id) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Address changed from ' || formatAddr(OLD.taxauth_addr_id) || ' to ' || formatAddr(NEW.taxauth_addr_id)); END IF; IF (OLD.taxauth_curr_id <> NEW.taxauth_curr_id) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Currency changed from "' || currConcat(OLD.taxauth_curr_id) || '" to "' || currConcat(NEW.taxauth_curr_id) || '"'); END IF; IF (OLD.taxauth_county <> NEW.taxauth_county) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'County changed from "' || OLD.taxauth_county || '" to "' || NEW.taxauth_county || '"'); END IF; IF (OLD.taxauth_accnt_id <> NEW.taxauth_accnt_id) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Account changed from "' || formatGLAccount(OLD.taxauth_accnt_id) || '" to "' || formatGLAccount(NEW.taxauth_accnt_id) || '"'); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._taxauthaftertrigger() OWNER TO admin; -- -- Name: _taxauthbeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _taxauthbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainTaxAuthorities')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Tax Authorities.'; END IF; UPDATE crmacct SET crmacct_taxauth_id = NULL WHERE crmacct_taxauth_id = OLD.taxauth_id; RETURN OLD; END; $$; ALTER FUNCTION public._taxauthbeforedeletetrigger() OWNER TO admin; -- -- Name: _taxauthbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _taxauthbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainTaxAuthorities')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Tax Authorities.'; END IF; IF (NEW.taxauth_code IS NULL) THEN RAISE EXCEPTION 'You must supply a Tax Authority Code.'; END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.taxauth_code); END IF; NEW.taxauth_code := UPPER(NEW.taxauth_code); RETURN NEW; END; $$; ALTER FUNCTION public._taxauthbeforetrigger() OWNER TO admin; -- -- Name: _termsafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _termsafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (fetchMetricValue('DefaultTerms') = OLD.terms_id) THEN RAISE EXCEPTION 'Cannot delete the default Terms [xtuple: terms, -1, %]', OLD.terms_code; END IF; RETURN OLD; END; $$; ALTER FUNCTION public._termsafterdeletetrigger() OWNER TO admin; -- -- Name: _todoitemtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _todoitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.todoitem_id) AND (recur_parent_type='TODO')); IF (_recurid IS NOT NULL) THEN RAISE DEBUG 'recur_id for deleted todoitem = %', _recurid; SELECT todoitem_id INTO _newparentid FROM todoitem WHERE ((todoitem_recurring_todoitem_id=OLD.todoitem_id) AND (todoitem_id!=OLD.todoitem_id)) ORDER BY todoitem_due_date LIMIT 1; RAISE DEBUG '_newparentid for deleted todoitem = %', COALESCE(_newparentid, NULL); -- client is responsible for warning about deleting a recurring todoitem IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; UPDATE todoitem SET todoitem_recurring_todoitem_id=_newparentid WHERE todoitem_recurring_todoitem_id=OLD.todoitem_id AND todoitem_id != OLD.todoitem_id; RAISE DEBUG 'reparented recurrence'; END IF; END IF; DELETE FROM alarm WHERE ((alarm_source='TODO') AND (alarm_source_id=OLD.todoitem_id)); DELETE FROM docass WHERE docass_source_id = OLD.todoitem_id AND docass_source_type = 'TODO'; DELETE FROM docass WHERE docass_target_id = OLD.todoitem_id AND docass_target_type = 'TODO'; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._todoitemtrigger() OWNER TO admin; -- -- Name: _uomconvupdate(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _uomconvupdate() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE itemuomconv SET itemuomconv_to_value = NEW.uomconv_to_value, itemuomconv_from_value = NEW.uomconv_from_value, itemuomconv_fractional = NEW.uomconv_fractional WHERE((itemuomconv_from_uom_id = NEW.uomconv_from_uom_id) AND (itemuomconv_to_uom_id = NEW.uomconv_to_uom_id)); RETURN NEW; END; $$; ALTER FUNCTION public._uomconvupdate() OWNER TO admin; -- -- Name: _usrprefaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _usrprefaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE IF (NEW.usrpref_name='active') THEN LOOP UPDATE crmacct SET crmacct_usr_username=NEW.usrpref_username WHERE crmacct_number=UPPER(NEW.usrpref_username); IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_active, crmacct_type, crmacct_usr_username ) VALUES (NEW.usrpref_username, NEW.usrpref_value::BOOL, 'I', NEW.usrpref_username); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; ELSIF (NEW.usrpref_name='propername') THEN LOOP UPDATE crmacct SET crmacct_name=NEW.usrpref_value WHERE crmacct_number=UPPER(NEW.usrpref_username); IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_active, crmacct_name, crmacct_type, crmacct_usr_username ) VALUES (UPPER(NEW.usrpref_username), TRUE, NEW.usrpref_value, 'I', NEW.usrpref_username); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._usrprefaftertrigger() OWNER TO admin; -- -- Name: _usrprefbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _usrprefbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainUsers') OR checkPrivilege('MaintainPreferencesOthers') OR (checkPrivilege('MaintainPreferencesSelf'))) THEN -- 2 IFs because plpgsql doesn't always evaluate boolean exprs left-to-right IF (TG_OP = 'DELETE') THEN IF NOT (OLD.usrpref_name LIKE '%/checked' OR OLD.usrpref_name LIKE '%/columnsShown') THEN RAISE EXCEPTION 'You do not have privileges to change this User Preference.'; END IF; ELSIF (NEW.usrpref_username = getEffectiveXtUser()) THEN IF NOT (NEW.usrpref_name LIKE '%/checked' OR NEW.usrpref_name LIKE '%/columnsShown') THEN RAISE EXCEPTION 'You do not have privileges to change this User Preference.'; END IF; END IF; END IF; IF (TG_OP IN ('INSERT', 'UPDATE')) THEN IF (NEW.usrpref_name = 'locale') THEN IF NOT EXISTS(SELECT locale_id FROM locale WHERE locale_id = NEW.usrpref_value::INTEGER) THEN RAISE EXCEPTION 'You must supply a valid Locale.'; END IF; ELSIF (NEW.usrpref_name IN ('agent', 'active')) THEN IF (NEW.usrpref_value NOT IN ('t', 'f')) THEN RAISE EXCEPTION '% must be either "t" or "f"', NEW.usrpref_name; END IF; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._usrprefbeforetrigger() OWNER TO admin; -- -- Name: _usrprivtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _usrprivtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _returnVal INTEGER; BEGIN -- This looks like a candidate for a foreign key but isn't. -- fkeys don't work if the foreign key value resides in a child of the -- table and not the table itself. IF ((TG_OP = 'UPDATE' OR TG_OP = 'INSERT') AND (NOT EXISTS(SELECT priv_id FROM priv WHERE (priv_id=NEW.usrpriv_priv_id)))) THEN RAISE EXCEPTION 'Privilege id % does not exist or is part of a disabled package.', NEW.usrpriv_priv_id; RETURN OLD; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._usrprivtrigger() OWNER TO admin; -- -- Name: _vendaddrtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _vendaddrtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _vendname TEXT; BEGIN -- Checks SELECT checkPrivilege('MaintainVendors') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Vendors.'; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (LENGTH(COALESCE(NEW.vendaddr_code, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Vendor Address Number.'; END IF; IF (LENGTH(COALESCE(NEW.vendaddr_name, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Vendor Address Name.'; END IF; IF (NEW.vendaddr_vend_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Vendor ID.'; END IF; SELECT vendaddr_code INTO _vendname FROM vendaddrinfo WHERE ( (vendaddr_vend_id=NEW.vendaddr_vend_id) AND (UPPER(vendaddr_code)=UPPER(NEW.vendaddr_code)) AND (vendaddr_id<>NEW.vendaddr_id) ); IF (FOUND) THEN RAISE EXCEPTION 'The Vendor Address Number entered cannot be used as it is in use.'; END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._vendaddrtrigger() OWNER TO admin; -- -- Name: _vendaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _vendaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_vend_id=NEW.vend_id, crmacct_name=NEW.vend_name WHERE crmacct_number=NEW.vend_number; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_vend_id, crmacct_cntct_id_1, crmacct_cntct_id_2 ) VALUES (NEW.vend_number, NEW.vend_name, NEW.vend_active, 'O', NEW.vend_id, NEW.vend_cntct1_id, NEW.vend_cntct2_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; /* TODO: default characteristic assignments based on vendgrp? */ ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.vend_number WHERE ((crmacct_vend_id=NEW.vend_id) AND (crmacct_number!=NEW.vend_number)); UPDATE crmacct SET crmacct_name = NEW.vend_name WHERE ((crmacct_vend_id=NEW.vend_id) AND (crmacct_name!=NEW.vend_name)); END IF; IF (fetchMetricBool('VendorChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'V', NEW.vend_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.vend_number <> NEW.vend_number) THEN PERFORM postComment(_cmnttypeid, 'V', NEW.vend_id, ('Number Changed from "' || OLD.vend_number || '" to "' || NEW.vend_number || '"') ); END IF; IF (OLD.vend_name <> NEW.vend_name) THEN PERFORM postComment( _cmnttypeid, 'V', NEW.vend_id, ('Name Changed from "' || OLD.vend_name || '" to "' || NEW.vend_name || '"') ); END IF; IF (OLD.vend_active <> NEW.vend_active) THEN PERFORM postComment(_cmnttypeid, 'V', NEW.vend_id, CASE WHEN NEW.vend_active THEN 'Activated' ELSE 'Deactivated' END); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._vendaftertrigger() OWNER TO admin; -- -- Name: _vendinfoafterdeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _vendinfoafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF EXISTS(SELECT 1 FROM checkhead WHERE ((checkhead_recip_id=OLD.vend_id) AND (checkhead_recip_type='V'))) THEN RAISE EXCEPTION '[xtuple: deleteVendor, -7]'; END IF; DELETE FROM taxreg WHERE ((taxreg_rel_type='V') AND (taxreg_rel_id=OLD.vend_id)); IF (fetchMetricBool('VendorChangeLog')) THEN PERFORM postComment(cmnttype_id, 'V', OLD.vend_id, ('Deleted "' || OLD.vend_number || '"')) FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; ALTER FUNCTION public._vendinfoafterdeletetrigger() OWNER TO admin; -- -- Name: _vendinfobeforedeletetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _vendinfobeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainVendors')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Vendors.'; END IF; DELETE FROM itemsrcp WHERE itemsrcp_itemsrc_id IN (SELECT itemsrc_id FROM itemsrc WHERE itemsrc_vend_id=OLD.vend_id); DELETE FROM itemsrc WHERE (itemsrc_vend_id=OLD.vend_id); DELETE FROM vendaddrinfo WHERE (vendaddr_vend_id=OLD.vend_id); DELETE FROM docass WHERE docass_source_id = OLD.vend_id AND docass_source_type = 'V'; DELETE FROM docass WHERE docass_target_id = OLD.vend_id AND docass_target_type = 'V'; UPDATE crmacct SET crmacct_vend_id = NULL WHERE crmacct_vend_id = OLD.vend_id; RETURN OLD; END; $$; ALTER FUNCTION public._vendinfobeforedeletetrigger() OWNER TO admin; -- -- Name: _vendtrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _vendtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainVendors')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Vendors.'; END IF; IF (LENGTH(COALESCE(NEW.vend_number, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Vendor Number.'; END IF; IF (LENGTH(COALESCE(NEW.vend_name, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Vendor Name.'; END IF; IF (NEW.vend_vendtype_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Vendor Type ID.'; END IF; IF (NEW.vend_terms_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Terms Code ID.'; END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.vend_number); END IF; NEW.vend_number := UPPER(NEW.vend_number); RETURN NEW; END; $$; ALTER FUNCTION public._vendtrigger() OWNER TO admin; -- -- Name: _vodistaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _vodistaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF ( (TG_OP = 'UPDATE') OR (TG_OP = 'DELETE') ) THEN IF (OLD.vodist_tax_id <> -1) THEN -- Delete any existing voheadtax adjustment records DELETE FROM voheadtax WHERE ( (taxhist_parent_id=OLD.vodist_vohead_id) AND (taxhist_tax_id=OLD.vodist_tax_id) AND (taxhist_taxtype_id=getAdjustmentTaxTypeId()) ); END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; -- Cache Voucher Head SELECT * INTO _r FROM vohead WHERE (vohead_id=NEW.vodist_vohead_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Voucher head not found'; END IF; IF (NEW.vodist_tax_id <> -1) THEN -- Insert adjustment voheadtax INSERT INTO voheadtax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate ) VALUES ( NEW.vodist_vohead_id, getAdjustmentTaxTypeId(), NEW.vodist_tax_id, 0, NULL, 1, 0, 0, (NEW.vodist_amount * -1), _r.vohead_docdate ); END IF; RETURN NEW; END; $$; ALTER FUNCTION public._vodistaftertrigger() OWNER TO admin; -- -- Name: _vodistbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _vodistbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'DELETE') THEN IF (OLD.vodist_tax_id <> -1) THEN -- Delete any existing voheadtax adjustment records DELETE FROM voheadtax WHERE ( (taxhist_parent_id=OLD.vodist_vohead_id) AND (taxhist_tax_id=OLD.vodist_tax_id) AND (taxhist_taxtype_id=getAdjustmentTaxTypeId()) ); END IF; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._vodistbeforetrigger() OWNER TO admin; -- -- Name: _voheadaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _voheadaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN PERFORM releaseVoNumber(CAST(OLD.vohead_number AS INTEGER)); RETURN OLD; END IF; IF (TG_OP = 'INSERT') THEN PERFORM clearNumberIssue('VcNumber', NEW.vohead_number); RETURN NEW; END IF; IF (TG_OP = 'UPDATE') THEN IF ( (COALESCE(NEW.vohead_taxzone_id,-1) <> COALESCE(OLD.vohead_taxzone_id,-1)) OR (NEW.vohead_docdate <> OLD.vohead_docdate) OR (NEW.vohead_curr_id <> OLD.vohead_curr_id) ) THEN PERFORM calculateTaxHist( 'voitemtax', voitem_id, NEW.vohead_taxzone_id, voitem_taxtype_id, NEW.vohead_docdate, NEW.vohead_curr_id, (vodist_amount * -1) ) FROM voitem JOIN vodist ON ( (vodist_vohead_id=voitem_vohead_id) AND (vodist_poitem_id=voitem_poitem_id) ) WHERE (voitem_vohead_id = NEW.vohead_id); END IF; -- Touch any Misc Tax Distributions so voheadtax is recalculated IF (NEW.vohead_docdate <> OLD.vohead_docdate) THEN UPDATE vodist SET vodist_vohead_id=NEW.vohead_id WHERE ( (vodist_vohead_id=OLD.vohead_id) AND (vodist_tax_id <> -1) ); END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._voheadaftertrigger() OWNER TO admin; -- -- Name: _voheadbeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _voheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN IF (OLD.vohead_posted) THEN -- Cannot delete a posted voucher RAISE EXCEPTION 'Cannot delete a posted voucher'; END IF; /* TODO: is setting recv_invoiced and poreject_invoiced to FALSE correct? this behavior is inherited from the now-defunct deleteVoucher. */ UPDATE recv SET recv_vohead_id = NULL, recv_voitem_id = NULL, recv_invoiced = FALSE WHERE recv_vohead_id = OLD.vohead_id; UPDATE poreject SET poreject_vohead_id = NULL, poreject_voitem_id = NULL, poreject_invoiced = FALSE WHERE poreject_vohead_id = OLD.vohead_id; DELETE FROM vodist WHERE vodist_vohead_id = OLD.vohead_id; DELETE FROM voheadtax WHERE taxhist_parent_id = OLD.vohead_id; DELETE FROM voitem WHERE voitem_vohead_id = OLD.vohead_id; SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.vohead_id) AND (recur_parent_type='V')); IF (_recurid IS NOT NULL) THEN SELECT vohead_id INTO _newparentid FROM vohead WHERE ((vohead_recurring_vohead_id=OLD.vohead_id) AND (vohead_id!=OLD.vohead_id)) ORDER BY vohead_docdate LIMIT 1; IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; UPDATE vohead SET vohead_recurring_vohead_id=_newparentid WHERE vohead_recurring_vohead_id=OLD.vohead_id AND vohead_id!=OLD.vohead_id; END IF; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._voheadbeforetrigger() OWNER TO admin; -- -- Name: _voitemaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _voitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; -- Cache Voucher Head SELECT * INTO _r FROM vohead WHERE (vohead_id=NEW.voitem_vohead_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Voucher head not found'; END IF; -- Calculate Tax PERFORM calculateTaxHist( 'voitemtax', NEW.voitem_id, COALESCE(_r.vohead_taxzone_id, -1), NEW.voitem_taxtype_id, COALESCE(_r.vohead_docdate, CURRENT_DATE), COALESCE(_r.vohead_curr_id, -1), COALESCE(SUM(vodist_amount * -1), 0) ) FROM vodist WHERE ( (vodist_vohead_id=_r.vohead_id) AND (vodist_poitem_id=NEW.voitem_poitem_id) ); RETURN NEW; END; $$; ALTER FUNCTION public._voitemaftertrigger() OWNER TO admin; -- -- Name: _voitembeforetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _voitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM voitemtax WHERE (taxhist_parent_id=OLD.voitem_id); RETURN OLD; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._voitembeforetrigger() OWNER TO admin; -- -- Name: _warehoustrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _warehoustrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _check BOOLEAN; _checkId INTEGER; BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainWarehouses') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add new Sites.'; END IF; ELSE SELECT checkPrivilege('MaintainWarehouses') OR checkPrivilege('IssueCountTags') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Site.'; END IF; END IF; -- Code is required IF (LENGTH(COALESCE(NEW.warehous_code,''))=0) THEN RAISE EXCEPTION 'You must supply a valid Site Code.'; END IF; -- Sitetype is required IF (NEW.warehous_sitetype_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Site Type.'; END IF; -- Cost Category is required for Transit types IF ((NEW.warehous_transit) AND (NEW.warehous_costcat_id IS NULL)) THEN RAISE EXCEPTION 'You must supply a valid Cost Category for Transit Sites.'; END IF; -- Code must be unique SELECT warehous_id INTO _checkId FROM whsinfo WHERE ( (UPPER(warehous_code)=UPPER(NEW.warehous_code)) AND (warehous_id<>NEW.warehous_id) ); IF (FOUND) THEN RAISE EXCEPTION 'You must supply a unique Site Code.'; END IF; -- Count Tag Prefix must be unique IF (TG_OP = 'INSERT') THEN SELECT warehous_id INTO _checkId FROM whsinfo WHERE (warehous_counttag_prefix=NEW.warehous_counttag_prefix); ELSE SELECT warehous_id INTO _checkId FROM whsinfo WHERE ( (warehous_counttag_prefix=NEW.warehous_counttag_prefix) AND (warehous_id<>NEW.warehous_id) ); END IF; IF (FOUND) THEN RAISE EXCEPTION 'You must supply a unique Count Tag Prefix.'; END IF; -- Check Complete -- Change Log IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='WarehouseChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'WH', NEW.warehous_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.warehous_code <> NEW.warehous_code) THEN PERFORM postComment( _cmnttypeid, 'WH', NEW.warehous_id, ('Code Changed from "' || OLD.warehous_code || '" to "' || NEW.warehous_code || '"') ); END IF; IF (OLD.warehous_descrip <> NEW.warehous_descrip) THEN PERFORM postComment( _cmnttypeid, 'WH', NEW.warehous_id, ( 'Description Changed from "' || OLD.warehous_descrip || '" to "' || NEW.warehous_descrip || '"' ) ); END IF; IF (OLD.warehous_active <> NEW.warehous_active) THEN IF (NEW.warehous_active) THEN PERFORM postComment(_cmnttypeid, 'WH', NEW.warehous_id, 'Activated'); ELSE PERFORM postComment(_cmnttypeid, 'WH', NEW.warehous_id, 'Deactivated'); END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._warehoustrigger() OWNER TO admin; -- -- Name: _whsezonetrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _whsezonetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _checkId INTEGER; BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainWarehouses') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add new Site Zones.'; END IF; ELSE SELECT checkPrivilege('MaintainWarehouses') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Site Zone.'; END IF; END IF; -- Name is required IF (LENGTH(COALESCE(NEW.whsezone_name,''))=0) THEN RAISE EXCEPTION 'You must supply a valid Site Zone Name.'; END IF; -- Site is required IF (NEW.whsezone_warehous_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Site.'; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._whsezonetrigger() OWNER TO admin; -- -- Name: _womatlaftertrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _womatlaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'INSERT') THEN -- Create any required P/R's PERFORM createPr('W', NEW.womatl_id) FROM itemsite WHERE ((itemsite_id=NEW.womatl_itemsite_id) AND (itemsite_createpr)); END IF; RETURN NEW; END; $$; ALTER FUNCTION public._womatlaftertrigger() OWNER TO admin; -- -- Name: _wotrigger(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION _wotrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='WorkOrderChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); ELSE _cmnttypeid := -1; END IF; IF (TG_OP = 'INSERT') THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', NEW.wo_id, itemsite_warehous_id, (NEW.wo_number || '-' || NEW.wo_subnumber) FROM evntnot, evnttype, itemsite, item WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.wo_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='WoCreated') ); IF (_cmnttypeid <> -1) THEN PERFORM postComment(_cmnttypeid, 'W', NEW.wo_id, 'Created'); END IF; IF (fetchMetricText('WONumberGeneration') IN ('A','O')) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('WoNumber', NEW.wo_number); END IF; RETURN NEW; ELSE IF (TG_OP = 'DELETE') THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', OLD.wo_id, itemsite_warehous_id, (OLD.wo_number || '-' || OLD.wo_subnumber) FROM evntnot, evnttype, itemsite, item WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=OLD.wo_itemsite_id) AND (itemsite_item_id=item_id) AND (OLD.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='WoCancelled') ); DELETE FROM docass WHERE docass_source_id = OLD.wo_id AND docass_source_type = 'W'; DELETE FROM docass WHERE docass_target_id = OLD.wo_id AND docass_target_type = 'W'; DELETE FROM comment WHERE ( (comment_source='W') AND (comment_source_id=OLD.wo_id) ); DELETE FROM charass WHERE ((charass_target_type='W') AND (charass_target_id=OLD.wo_id)); RETURN OLD; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.wo_qtyord <> OLD.wo_qtyord) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_oldvalue, evntlog_newvalue ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', NEW.wo_id, itemsite_warehous_id, (NEW.wo_number || '-' || NEW.wo_subnumber), OLD.wo_qtyord, NEW.wo_qtyord FROM evntnot, evnttype, itemsite, item WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.wo_itemsite_id) AND (itemsite_item_id=item_id) AND ( (NEW.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) OR (OLD.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) ) AND (evnttype_name='WoQtyChanged') ); IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'W', NEW.wo_id, ( 'Qty. Ordered Changed from ' || formatQty(OLD.wo_qtyord) || ' to ' || formatQty(NEW.wo_qtyord ) ) ); END IF; END IF; IF (NEW.wo_duedate <> OLD.wo_duedate) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_olddate, evntlog_newdate ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', NEW.wo_id, itemsite_warehous_id, (NEW.wo_number || '-' || NEW.wo_subnumber), OLD.wo_duedate, NEW.wo_duedate FROM evntnot, evnttype, itemsite, item WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.wo_itemsite_id) AND (itemsite_item_id=item_id) AND ( (NEW.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) OR (OLD.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) ) AND (evnttype_name='WoDueDateChanged') ); IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'W', NEW.wo_id, ( 'Due Date Changed from ' || formatDate(OLD.wo_duedate) || ' to ' || formatDate(NEW.wo_duedate ) ) ); END IF; END IF; IF (NEW.wo_status <> OLD.wo_status) THEN IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'W', NEW.wo_id, ('Status Changed from ' || OLD.wo_status || ' to ' || NEW.wo_status) ); END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public._wotrigger() OWNER TO admin; -- -- Name: acknowledgemessage(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION acknowledgemessage(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMsgid ALIAS FOR $1; BEGIN UPDATE msguser SET msguser_viewed=CURRENT_TIMESTAMP WHERE ( (msguser_msg_id=pMsgid) AND (msguser_username=getEffectiveXtUser()) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.acknowledgemessage(integer) OWNER TO admin; -- -- Name: actcost(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION actcost(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN actCost($1, NULL, baseCurrId()); END; $_$; ALTER FUNCTION public.actcost(integer) OWNER TO admin; -- -- Name: actcost(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION actcost(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN actCost($1, $2, baseCurrId()); END; $_$; ALTER FUNCTION public.actcost(integer, integer) OWNER TO admin; -- -- Name: actcost(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION actcost(integer, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pBomitemid ALIAS FOR $2; pCurrid ALIAS FOR $3; _cost NUMERIC; BEGIN -- Return actual cost in the given currency at the current conversion rate SELECT SUM(CASE WHEN (bomitemcost_id IS NOT NULL) THEN ROUND(currToCurr(bomitemcost_curr_id, pCurrid, bomitemcost_actcost, CURRENT_DATE), 6) ELSE ROUND(currToCurr(itemcost_curr_id, pCurrid, itemcost_actcost, CURRENT_DATE), 6) END) INTO _cost FROM itemcost LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=pBomitemid AND bomitemcost_costelem_id=itemcost_costelem_id) WHERE (itemcost_item_id=pItemid); IF (_cost IS NULL) THEN RETURN 0; ELSE RETURN _cost; END IF; END; $_$; ALTER FUNCTION public.actcost(integer, integer, integer) OWNER TO admin; -- -- Name: addrusecount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION addrusecount(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAddrId ALIAS FOR $1; _fk RECORD; _r RECORD; _seq INTEGER; _col TEXT; _qry TEXT; _count INTEGER = 0; BEGIN -- Determine where this address is used by analyzing foreign key linkages -- TO DO: Can this be rationalized with cntctused(int)? FOR _fk IN SELECT pg_namespace.nspname AS schemaname, con.relname AS tablename, conkey AS seq, conrelid AS class_id FROM pg_constraint, pg_class f, pg_class con, pg_namespace WHERE confrelid=f.oid AND conrelid=con.oid AND f.relname = 'addr' AND con.relnamespace=pg_namespace.oid AND con.relname NOT IN ('pohead') -- exception(s) where address key doesn't actually drive document information LOOP -- Validate IF (ARRAY_UPPER(_fk.seq,1) > 1) THEN RAISE EXCEPTION 'Checks to tables where the address is one of multiple foreign key columns is not supported. Error on Table: %', pg_namespace.nspname || '.' || con.relname; END IF; _seq := _fk.seq[1]; -- Get the specific column name SELECT attname INTO _col FROM pg_attribute, pg_class WHERE ((attrelid=pg_class.oid) AND (pg_class.oid=_fk.class_id) AND (attnum=_seq)); -- See if there are dependencies _qry := 'SELECT * FROM ' || _fk.schemaname || '.' || _fk.tablename || ' WHERE ('|| _col || '=' || pAddrId || ');'; FOR _r IN EXECUTE _qry LOOP _count := _count + 1; END LOOP; END LOOP; RETURN _count; END; $_$; ALTER FUNCTION public.addrusecount(integer) OWNER TO admin; -- -- Name: addtaxtoglseries(integer, text, text, text, integer, date, date, text, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION addtaxtoglseries(integer, text, text, text, integer, date, date, text, integer, text) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pCurrId ALIAS FOR $5; pExchDate ALIAS FOR $6; pDistDate ALIAS FOR $7; pTableName ALIAS FOR $8; pParentId ALIAS FOR $9; pNotes ALIAS FOR $10; _count INTEGER := 0; _baseTax NUMERIC := 0; _returnVal NUMERIC := 0; _t RECORD; _test INTEGER := 0; BEGIN -- This is just a fancy select statement on taxhist. -- Because all tax records tables inherit from taxhist, -- we can use the same select statement for all. -- https://www.postgresql.org/docs/8.1/static/ddl-inherit.html -- pTableName in the where clause narrows down the selection -- to the correct sub table. FOR _t IN SELECT * FROM taxhist JOIN tax ON (tax_id = taxhist_tax_id) JOIN pg_class ON (pg_class.oid = taxhist.tableoid) WHERE ( (taxhist_parent_id = pParentId) AND (relname = pTableName) ) LOOP _count := _count + 1; _baseTax := currToBase(pCurrId, _t.taxhist_tax, pExchDate); _returnVal := _returnVal + _baseTax; PERFORM insertIntoGLSeries( pSequence, pSource, pDocType, pDocNumber, _t.tax_sales_accnt_id, _baseTax, pDistDate, pNotes ); UPDATE taxhist SET taxhist_docdate=pExchDate, taxhist_distdate=pDistDate, taxhist_curr_id=pCurrId, taxhist_curr_rate=curr_rate FROM curr_rate WHERE ((taxhist_id=_t.taxhist_id) AND (pCurrId=curr_id) AND ( pExchDate BETWEEN curr_effective AND curr_expires) ); END LOOP; RETURN _returnVal; END; $_$; ALTER FUNCTION public.addtaxtoglseries(integer, text, text, text, integer, date, date, text, integer, text) OWNER TO admin; -- -- Name: addtopackinglistbatch(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION addtopackinglistbatch(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; returnVal INTEGER; BEGIN -- MIN because error codes are negative SELECT MIN(addToPackingListBatch('SO', pSoheadid, shiphead_id)) INTO returnVal FROM shiphead WHERE ((shiphead_order_id=pSoheadid) AND (NOT shiphead_shipped) AND (shiphead_order_type='SO')); IF (NOT FOUND OR returnVal IS NULL) THEN returnVal := addToPackingListBatch('SO', pSoheadid, NULL); END IF; RETURN returnVal; END; $_$; ALTER FUNCTION public.addtopackinglistbatch(integer) OWNER TO admin; -- -- Name: addtopackinglistbatch(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION addtopackinglistbatch(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN addToPackingListBatch('SO', $1, $2); END; $_$; ALTER FUNCTION public.addtopackinglistbatch(integer, integer) OWNER TO admin; -- -- Name: addtopackinglistbatch(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION addtopackinglistbatch(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pheadtype ALIAS FOR $1; pheadid ALIAS FOR $2; returnVal INTEGER; BEGIN -- MIN because error codes are negative SELECT MIN(addToPackingListBatch(pheadtype, pheadid, shiphead_id)) INTO returnVal FROM shiphead WHERE ((shiphead_order_id=pheadid) AND (NOT shiphead_shipped) AND (shiphead_order_type=pheadtype)); IF (NOT FOUND OR returnVal IS NULL) THEN returnVal := addToPackingListBatch(pheadtype, pheadid, NULL); END IF; RETURN returnVal; END; $_$; ALTER FUNCTION public.addtopackinglistbatch(text, integer) OWNER TO admin; -- -- Name: addtopackinglistbatch(text, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION addtopackinglistbatch(text, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pheadtype ALIAS FOR $1; pheadid ALIAS FOR $2; pshipheadid ALIAS FOR $3; _check INTEGER; BEGIN SELECT pack_id INTO _check FROM pack WHERE ((pack_head_id=pheadid) AND ((pack_shiphead_id=pshipheadid) OR (pshipheadid IS NULL AND pack_shiphead_id IS NULL)) AND (pack_head_type=pheadtype) ); IF (NOT FOUND) THEN INSERT INTO pack ( pack_head_type, pack_head_id, pack_shiphead_id, pack_printed ) VALUES ( pheadtype, pheadid, pshipheadid, FALSE ); -- Auto Firm Sales Orders conditionally based on metric IF ( (pheadtype = 'SO') AND (fetchMetricBool('FirmSalesOrderPackingList')) ) THEN UPDATE coitem SET coitem_firm=TRUE WHERE (coitem_cohead_id=pheadid); END IF; END IF; RETURN pheadid; END; $_$; ALTER FUNCTION public.addtopackinglistbatch(text, integer, integer) OWNER TO admin; -- -- Name: adjustinvvalue(integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION adjustinvvalue(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pNewValue ALIAS FOR $2; pAccountid ALIAS FOR $3; _delta NUMERIC; _glreturn INTEGER; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN SELECT pNewValue - itemsite_value INTO _delta FROM itemsite WHERE (itemsite_id=pItemsiteid) FOR UPDATE; IF (NOT FOUND) THEN RETURN -1; END IF; SELECT insertGLTransaction('I/M', '', 'Post Value', 'Inventory Value Adjustment for ' || item_number, COALESCE (pAccountid, costcat_adjustment_accnt_id), costcat_asset_accnt_id, -1, _delta, CURRENT_DATE) INTO _glreturn FROM itemsite JOIN costcat ON (itemsite_costcat_id=costcat_id) JOIN item ON (itemsite_item_id=item_id) WHERE (itemsite_id=pItemsiteid); -- Create the AD transaction INSERT INTO invhist ( invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT itemsite_id, CURRENT_TIMESTAMP, 'AD', 0.0, itemsite_qtyonhand, itemsite_qtyonhand, '', 'Inventory Value Adjustment', uom_name, _delta, FALSE, itemsite_costmethod, itemsite_value, pNewValue, 0 FROM itemsite, item, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_id=pItemsiteid) ); UPDATE itemsite SET itemsite_value=pNewValue WHERE (itemsite_id=pItemsiteid); RETURN 0; END; $_$; ALTER FUNCTION public.adjustinvvalue(integer, numeric, integer) OWNER TO admin; -- -- Name: adjustments(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION adjustments(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('CC', 'AD')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.adjustments(text) OWNER TO admin; -- -- Name: allocatedforso(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION allocatedforso(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN allocatedForSo(pItemsiteid, startOfTime(), pDate); END; $_$; ALTER FUNCTION public.allocatedforso(integer, date) OWNER TO admin; -- -- Name: allocatedforso(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION allocatedforso(integer, integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN allocatedForSo(pItemsiteid, startOfTime(), (CURRENT_DATE + pDate)); END; $_$; ALTER FUNCTION public.allocatedforso(integer, integer) OWNER TO admin; -- -- Name: allocatedforso(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION allocatedforso(integer, date, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _qty NUMERIC; BEGIN SELECT COALESCE(SUM(noNeg(itemuomtouom(itemsite_item_id, coitem_qty_uom_id, NULL, coitem_qtyord - (coitem_qtyshipped + qtyAtShipping(coitem_id)) + coitem_qtyreturned))), 0.0) INTO _qty FROM coitem, itemsite, item WHERE ( (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (coitem_status='O') AND (coitem_itemsite_id=pItemsiteid) AND (coitem_scheddate BETWEEN pStartDate AND pEndDate) ); RETURN _qty; END; $_$; ALTER FUNCTION public.allocatedforso(integer, date, date) OWNER TO admin; -- -- Name: allocatedforwo(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION allocatedforwo(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN allocatedForWo(pItemsiteid, startOfTime(), pDate); END; $_$; ALTER FUNCTION public.allocatedforwo(integer, date) OWNER TO admin; -- -- Name: allocatedforwo(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION allocatedforwo(integer, integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAheadDays ALIAS FOR $2; BEGIN RETURN allocatedForWo(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookaheadDays)); END; $_$; ALTER FUNCTION public.allocatedforwo(integer, integer) OWNER TO admin; -- -- Name: allocatedforwo(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION allocatedforwo(integer, date, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _itemtype TEXT; _qty NUMERIC; BEGIN SELECT item_type INTO _itemtype FROM itemsite JOIN item ON (item_id=itemsite_item_id) WHERE (itemsite_id=pItemsiteid); IF (_itemtype != 'T') THEN SELECT COALESCE(SUM(noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq - womatl_qtyiss))), 0.0) INTO _qty FROM womatl JOIN wo ON (wo_id=womatl_wo_id AND wo_status IN ('E','I','R')) JOIN itemsite ON (itemsite_id=womatl_itemsite_id) WHERE (womatl_itemsite_id=pItemsiteid) AND (womatl_duedate BETWEEN pStartDate AND pEndDate); ELSE SELECT COALESCE(SUM(noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq))), 0.0) - ( SELECT COALESCE(SUM(invhist_invqty),0) FROM itemsite, item, wo, womatl LEFT OUTER JOIN womatlpost ON (womatl_id=womatlpost_womatl_id) LEFT OUTER JOIN invhist ON ((womatlpost_invhist_id=invhist_id) AND (invhist_invqty > 0)) WHERE ( (womatl_itemsite_id=pItemsiteid) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_duedate BETWEEN pStartDate AND pEndDate) AND (wo_id=womatl_wo_id) AND (wo_status IN ('E','I','R')) ) ) INTO _qty FROM womatl JOIN wo ON (wo_id=womatl_wo_id AND wo_status IN ('E','I','R')) JOIN itemsite ON (itemsite_id=womatl_itemsite_id) WHERE (womatl_itemsite_id=pItemsiteid) AND (womatl_duedate BETWEEN pStartDate AND pEndDate); END IF; RETURN COALESCE(_qty,0); END; $_$; ALTER FUNCTION public.allocatedforwo(integer, date, date) OWNER TO admin; -- -- Name: alterencrypt(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION alterencrypt(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOldKey ALIAS FOR $1; pNewKey ALIAS FOR $2; _cc RECORD; _ccaud RECORD; _metricenc RECORD; num_updated INTEGER; BEGIN num_updated := 0; -- Update ccard FOR _cc IN SELECT ccard_id, decrypt(setbytea(ccard_name), setbytea(pOldKey), 'bf') AS ccard_name, decrypt(setbytea(ccard_address1), setbytea(pOldKey), 'bf') AS ccard_address1, decrypt(setbytea(ccard_address2), setbytea(pOldKey), 'bf') AS ccard_address2, decrypt(setbytea(ccard_city), setbytea(pOldKey), 'bf') AS ccard_city, decrypt(setbytea(ccard_state), setbytea(pOldKey), 'bf') AS ccard_state, decrypt(setbytea(ccard_zip), setbytea(pOldKey), 'bf') AS ccard_zip, decrypt(setbytea(ccard_country), setbytea(pOldKey), 'bf') AS ccard_country, decrypt(setbytea(ccard_number), setbytea(pOldKey), 'bf') AS ccard_number, decrypt(setbytea(ccard_month_expired), setbytea(pOldKey), 'bf') AS ccard_month_expired, decrypt(setbytea(ccard_year_expired), setbytea(pOldKey), 'bf') AS ccard_year_expired FROM ccard LOOP UPDATE ccard set ccard_name = encrypt(setbytea(_cc.ccard_name), setbytea(pNewKey), 'bf'), ccard_address1 = encrypt(setbytea(_cc.ccard_address1), setbytea(pNewKey), 'bf'), ccard_address2 = encrypt(setbytea(_cc.ccard_address2), setbytea(pNewKey), 'bf'), ccard_city = encrypt(setbytea(_cc.ccard_city), setbytea(pNewKey), 'bf'), ccard_state = encrypt(setbytea(_cc.ccard_state), setbytea(pNewKey), 'bf'), ccard_zip = encrypt(setbytea(_cc.ccard_zip), setbytea(pNewKey), 'bf'), ccard_country = encrypt(setbytea(_cc.ccard_country), setbytea(pNewKey), 'bf'), ccard_number = encrypt(setbytea(_cc.ccard_number), setbytea(pNewKey), 'bf'), ccard_month_expired = encrypt(setbytea(_cc.ccard_month_expired), setbytea(pNewKey), 'bf'), ccard_year_expired = encrypt(setbytea(_cc.ccard_year_expired), setbytea(pNewKey), 'bf') WHERE ccard_id = _cc.ccard_id; num_updated := num_updated + 1; END LOOP; -- Update ccardaud FOR _ccaud IN SELECT ccardaud_id, decrypt(setbytea(ccardaud_ccard_name_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_name_old, decrypt(setbytea(ccardaud_ccard_name_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_name_new, decrypt(setbytea(ccardaud_ccard_address1_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_address1_old, decrypt(setbytea(ccardaud_ccard_address1_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_address1_new, decrypt(setbytea(ccardaud_ccard_address2_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_address2_old, decrypt(setbytea(ccardaud_ccard_address2_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_address2_new, decrypt(setbytea(ccardaud_ccard_city_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_city_old, decrypt(setbytea(ccardaud_ccard_city_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_city_new, decrypt(setbytea(ccardaud_ccard_state_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_state_old, decrypt(setbytea(ccardaud_ccard_state_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_state_new, decrypt(setbytea(ccardaud_ccard_zip_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_zip_old, decrypt(setbytea(ccardaud_ccard_zip_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_zip_new, decrypt(setbytea(ccardaud_ccard_country_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_country_old, decrypt(setbytea(ccardaud_ccard_country_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_country_new, decrypt(setbytea(ccardaud_ccard_number_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_number_old, decrypt(setbytea(ccardaud_ccard_number_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_number_new, decrypt(setbytea(ccardaud_ccard_month_expired_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_month_expired_old, decrypt(setbytea(ccardaud_ccard_month_expired_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_month_expired_new, decrypt(setbytea(ccardaud_ccard_year_expired_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_year_expired_old, decrypt(setbytea(ccardaud_ccard_year_expired_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_year_expired_new FROM ccardaud LOOP UPDATE ccardaud set ccardaud_ccard_name_old = encrypt(setbytea(_ccaud.ccardaud_ccard_name_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_name_new = encrypt(setbytea(_ccaud.ccardaud_ccard_name_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_address1_old = encrypt(setbytea(_ccaud.ccardaud_ccard_address1_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_address1_new = encrypt(setbytea(_ccaud.ccardaud_ccard_address1_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_address2_old = encrypt(setbytea(_ccaud.ccardaud_ccard_address2_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_address2_new = encrypt(setbytea(_ccaud.ccardaud_ccard_address2_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_city_old = encrypt(setbytea(_ccaud.ccardaud_ccard_city_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_city_new = encrypt(setbytea(_ccaud.ccardaud_ccard_city_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_state_old = encrypt(setbytea(_ccaud.ccardaud_ccard_state_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_state_new = encrypt(setbytea(_ccaud.ccardaud_ccard_state_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_zip_old = encrypt(setbytea(_ccaud.ccardaud_ccard_zip_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_zip_new = encrypt(setbytea(_ccaud.ccardaud_ccard_zip_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_country_old = encrypt(setbytea(_ccaud.ccardaud_ccard_country_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_country_new = encrypt(setbytea(_ccaud.ccardaud_ccard_country_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_number_old = encrypt(setbytea(_ccaud.ccardaud_ccard_number_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_number_new = encrypt(setbytea(_ccaud.ccardaud_ccard_number_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_month_expired_old = encrypt(setbytea(_ccaud.ccardaud_ccard_month_expired_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_month_expired_new = encrypt(setbytea(_ccaud.ccardaud_ccard_month_expired_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_year_expired_old = encrypt(setbytea(_ccaud.ccardaud_ccard_year_expired_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_year_expired_new = encrypt(setbytea(_ccaud.ccardaud_ccard_year_expired_new), setbytea(pNewKey), 'bf') WHERE ccardaud_id = _ccaud.ccardaud_id; num_updated := num_updated + 1; END LOOP; -- Update metricenc FOR _metricenc IN SELECT metricenc_id, decrypt(setbytea(metricenc_value), setbytea(pOldKey), 'bf') AS metricenc_value FROM metricenc LOOP UPDATE metricenc set metricenc_value = encrypt(setbytea(_metricenc.metricenc_value), setbytea(pNewKey), 'bf') WHERE metricenc_id = _metricenc.metricenc_id; num_updated := num_updated + 1; END LOOP; RETURN num_updated; END; $_$; ALTER FUNCTION public.alterencrypt(text, text) OWNER TO admin; -- -- Name: apaging(date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION apaging(date, boolean) RETURNS SETOF apaging LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAsOfDate ALIAS FOR $1; pUseDocDate ALIAS FOR $2; _row apaging%ROWTYPE; _x RECORD; _returnVal INTEGER; _asOfDate DATE; BEGIN _asOfDate := COALESCE(pAsOfDate,current_date); FOR _x IN SELECT --report uses currency rate snapshot to convert all amounts to base based on apopen_docdate to ensure the same exchange rate --today and greater base: CASE WHEN((apopen_duedate >= DATE(_asOfDate))) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS cur_val, --0 to 30 base CASE WHEN((apopen_duedate >= DATE(_asOfDate)-30) AND (apopen_duedate < DATE(_asOfDate))) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS thirty_val, --30-60 base CASE WHEN((apopen_duedate >= DATE(_asOfDate)-60) AND (apopen_duedate < DATE(_asOfDate) - 30 )) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS sixty_val, --60-90 base CASE WHEN((apopen_duedate >= DATE(_asOfDate)-90) AND (apopen_duedate < DATE(_asOfDate) - 60)) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS ninety_val, --greater than 90 base: CASE WHEN((apopen_duedate > DATE(_asOfDate)-10000) AND (apopen_duedate < DATE(_asOfDate) - 90)) THEN (((apopen_amount-apopen_paid + COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS plus_val, --total amount base: CASE WHEN((apopen_duedate > DATE(_asOfDate)-10000)) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS total_val, --AP Open Amount base CASE WHEN apopen_doctype IN ('C', 'R') THEN (apopen_amount * -1) / apopen_curr_rate ELSE apopen_amount / apopen_curr_rate END AS apopen_amount, apopen_docdate, apopen_duedate, apopen_ponumber, apopen_invcnumber, apopen_docnumber, apopen_doctype, vend_id, vend_name, vend_number, vend_vendtype_id, vendtype_code, terms_descrip, determineDiscountDate(terms_id, apopen_docdate) AS discdate, noNeg(apopen_discountable_amount * CASE WHEN (CURRENT_DATE <= determineDiscountDate(terms_id, apopen_docdate)) THEN terms_discprcnt ELSE 0.0 END) AS disc_val, terms_discdays AS discdays, (terms_discprcnt * 100.0) AS discprcnt FROM vendinfo, vendtype, apopen LEFT OUTER JOIN terms ON (apopen_terms_id=terms_id) LEFT OUTER JOIN apapply ON (((apopen_id=apapply_target_apopen_id) OR (apopen_id=apapply_source_apopen_id)) AND (apapply_postdate >_asOfDate)) WHERE ( (apopen_vend_id = vend_id) AND (vend_vendtype_id=vendtype_id) AND (CASE WHEN (pUseDocDate) THEN apopen_docdate ELSE apopen_distdate END <= _asOfDate) AND (COALESCE(apopen_closedate,_asOfDate+1)>_asOfDate) ) GROUP BY apopen_id,apopen_docdate,apopen_duedate,apopen_ponumber, apopen_invcnumber, apopen_docnumber,apopen_doctype,apopen_paid, apopen_curr_id,apopen_amount,vend_id,vend_name,vend_number,vend_vendtype_id,vendtype_code,terms_descrip, apopen_curr_rate, terms_id, terms_discdays, terms_discprcnt, apopen_discountable_amount ORDER BY vend_number, apopen_duedate LOOP _row.apaging_docdate := _x.apopen_docdate; _row.apaging_duedate := _x.apopen_duedate; _row.apaging_ponumber := _x.apopen_ponumber; _row.apaging_invcnumber := _x.apopen_invcnumber; _row.apaging_docnumber := _x.apopen_docnumber; _row.apaging_doctype := _x.apopen_doctype; _row.apaging_vend_id := _x.vend_id; _row.apaging_vend_number := _x.vend_number; _row.apaging_vend_name := _x.vend_name; _row.apaging_vend_vendtype_id := _x.vend_vendtype_id; _row.apaging_vendtype_code := _x.vendtype_code; _row.apaging_terms_descrip := _x.terms_descrip; _row.apaging_apopen_amount := _x.apopen_amount; _row.apaging_cur_val := _x.cur_val; _row.apaging_thirty_val := _x.thirty_val; _row.apaging_sixty_val := _x.sixty_val; _row.apaging_ninety_val := _x.ninety_val; _row.apaging_plus_val := _x.plus_val; _row.apaging_total_val := _x.total_val; _row.apaging_discdate := _x.discdate; _row.apaging_disc_val := _x.disc_val; _row.apaging_discdays := _x.discdays; _row.apaging_discprcnt := _x.discprcnt; RETURN NEXT _row; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.apaging(date, boolean) OWNER TO admin; -- -- Name: apapplied(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION apapplied(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pDate ALIAS FOR $2; _amount NUMERIC; BEGIN -- Return amount applied to an apopen in base currency as of apapply_postdate SELECT SUM(currtobase(apapply_curr_id,apapply_amount,apapply_postdate)) INTO _amount FROM apapply WHERE (((apapply_target_apopen_id = pApopenid) OR (apapply_source_apopen_id = pApopenid)) AND (((apapply_journalnumber=0) AND (apapply_postdate <= pDate)) OR EXISTS(SELECT * FROM gltrans WHERE ((gltrans_journalnumber=apapply_journalnumber) AND (gltrans_date <= pDate))))); IF (_amount IS NULL) THEN RETURN 0; ELSE RETURN _amount; END IF; END; $_$; ALTER FUNCTION public.apapplied(integer, date) OWNER TO admin; -- -- Name: apcheckpending(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION apcheckpending(integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; _qty NUMERIC := 0.0; BEGIN SELECT SUM(checkitem_amount + checkitem_discount) INTO _qty FROM checkitem JOIN checkhead ON (checkitem_checkhead_id=checkhead_id) WHERE ((checkitem_apopen_id=pApopenid) AND (NOT checkhead_deleted) AND (NOT checkhead_replaced) AND (NOT checkhead_posted)); RETURN COALESCE(_qty, 0.0); END; $_$; ALTER FUNCTION public.apcheckpending(integer) OWNER TO admin; -- -- Name: apcurrgain(integer, integer, numeric, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION apcurrgain(integer, integer, numeric, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenId ALIAS FOR $1; pCurrId ALIAS FOR $2; pValue ALIAS FOR $3; pDate ALIAS FOR $4; _start DATE; _end DATE; _gain NUMERIC; _r RECORD; BEGIN IF (pApopenId IS NULL OR pValue = 0) THEN RETURN 0; END IF; SELECT apopen_docdate, apopen_curr_rate INTO _r FROM apopen WHERE (apopen_id=pApopenId); IF (_r.apopen_docdate > pDate) THEN _gain := (currToBase(pCurrId, pValue, pDate) - (pValue / _r.apopen_curr_rate)) * -1; ELSE _gain := (pValue / _r.apopen_curr_rate) - currToBase(pCurrId, pValue, pDate); END IF; IF (_gain IS NULL) THEN RAISE EXCEPTION 'Error processing currency gain/loss.'; END IF; RETURN _gain; END; $_$; ALTER FUNCTION public.apcurrgain(integer, integer, numeric, date) OWNER TO admin; -- -- Name: applyapcreditmemotobalance(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION applyapcreditmemotobalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; _amount NUMERIC; _curr_id INTEGER; _curr_rate NUMERIC; _docdate DATE; _applyAmount NUMERIC; _r RECORD; _p RECORD; BEGIN -- Find the balance to apply SELECT (apopen_amount - apopen_paid - COALESCE(prepared,0.0) - COALESCE(selected,0.0) - COALESCE(SUM(currToCurr(apcreditapply_curr_id, apopen_curr_id, apcreditapply_amount, apopen_docdate)), 0)), apopen_curr_id, apopen_curr_rate, apopen_docdate INTO _amount, _curr_id, _curr_rate, _docdate FROM apopen LEFT OUTER JOIN apcreditapply ON (apcreditapply_source_apopen_id=apopen_id) LEFT OUTER JOIN (SELECT apopen_id AS selected_apopen_id, SUM(currToCurr(apselect_curr_id, apopen_curr_id, apselect_amount + apselect_discount, apselect_date)) AS selected FROM apselect JOIN apopen ON (apselect_apopen_id=apopen_id) GROUP BY apopen_id) AS sub1 ON (apopen_id=selected_apopen_id) LEFT OUTER JOIN (SELECT apopen_id AS prepared_apopen_id, SUM(checkitem_amount + checkitem_discount) AS prepared FROM checkhead JOIN checkitem ON (checkitem_checkhead_id=checkhead_id) JOIN apopen ON (checkitem_apopen_id=apopen_id) WHERE ((NOT checkhead_posted) AND (NOT checkhead_void)) GROUP BY apopen_id) AS sub2 ON (prepared_apopen_id=apopen_id) WHERE (apopen_id=pApopenid) GROUP BY apopen_amount, apopen_paid, apopen_curr_id, apopen_curr_rate, apopen_docdate, prepared, selected; IF (_amount < 0) THEN RETURN -1; END IF; -- Loop through the apopen items in order of due date FOR _r IN SELECT target.apopen_id AS apopenid, currToCurr(target.apopen_curr_id,source.apopen_curr_id, target.apopen_amount - target.apopen_paid - COALESCE(prepared,0.0) - COALESCE(selected,0.0) - COALESCE(applied,0.0), current_date) AS balance FROM apopen AS source, apopen AS target LEFT OUTER JOIN (SELECT apcreditapply_target_apopen_id AS applied_apopen_id, SUM(currToCurr(apcreditapply_curr_id, apopen_curr_id, apcreditapply_amount, apopen_docdate)) AS applied FROM apcreditapply JOIN apopen ON (apopen_id=apcreditapply_source_apopen_id) GROUP BY apcreditapply_target_apopen_id) AS sub3 ON (target.apopen_id=applied_apopen_id) LEFT OUTER JOIN (SELECT apopen_id AS selected_apopen_id, SUM(currToCurr(apselect_curr_id, apopen_curr_id, apselect_amount + apselect_discount, apselect_date)) AS selected FROM apselect JOIN apopen ON (apselect_apopen_id=apopen_id) GROUP BY apopen_id) AS sub1 ON (target.apopen_id=selected_apopen_id) LEFT OUTER JOIN (SELECT apopen_id AS prepared_apopen_id, SUM(checkitem_amount + checkitem_discount) AS prepared FROM checkhead JOIN checkitem ON (checkitem_checkhead_id=checkhead_id) JOIN apopen ON (checkitem_apopen_id=apopen_id) WHERE ((NOT checkhead_posted) AND (NOT checkhead_void)) GROUP BY apopen_id) AS sub2 ON (prepared_apopen_id=target.apopen_id) WHERE ( (source.apopen_vend_id=target.apopen_vend_id) AND (target.apopen_doctype IN ('V', 'D')) AND (target.apopen_open) AND (source.apopen_id=pApopenid) ) ORDER BY target.apopen_duedate, (target.apopen_amount - target.apopen_paid) LOOP -- Determine the amount to apply IF (_r.balance <= 0.0) THEN CONTINUE; ELSEIF (_r.balance > _amount) THEN _applyAmount := _amount; ELSE _applyAmount := _r.balance; END IF; -- Does an apcreditapply record already exist? SELECT apcreditapply_id, apcreditapply_amount * _curr_rate / currRate(apcreditapply_curr_id,_docdate) AS apcreditapply_amount INTO _p FROM apcreditapply WHERE ( (apcreditapply_target_apopen_id=_r.apopenid) AND (apcreditapply_source_apopen_id=pApopenid) ); IF (FOUND) THEN -- The following is depreciated, just skip the record -- Recalculate the amount to apply -- IF ((_r.balance - _p.apcreditapply_amount) > _amount) THEN -- _applyAmount := _amount; -- ELSE -- _applyAmount := (_r.balance - _p.apcreditapply_amount); -- END IF; -- Update the apcreditapply with the new amount to apply -- UPDATE apcreditapply -- SET apcreditapply_amount = (apcreditapply_amount + -- _applyAmount * currRate(apcreditapply_curr_id,_docdate) / _curr_rate) -- WHERE (apcreditapply_id=_p.apcreditapply_id); CONTINUE; ELSE -- Create a new apcreditapply record INSERT INTO apcreditapply ( apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id ) VALUES ( pApopenid, _r.apopenid, _applyAmount, _curr_id ); END IF; _amount := (_amount - _applyAmount); IF (_amount = 0) THEN EXIT; END IF; END LOOP; RETURN 1; END; $_$; ALTER FUNCTION public.applyapcreditmemotobalance(integer) OWNER TO admin; -- -- Name: applyapcredits(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION applyapcredits(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendId ALIAS FOR $1; _result INTEGER; _apopenid INTEGER; _r RECORD; BEGIN -- Fetch credit memo(s) for the vendor FOR _r IN SELECT apopen_id, apopen_duedate FROM apopen JOIN vendinfo ON (apopen_vend_id = vend_id) WHERE ((apopen_doctype = 'C') AND (apopen_status = 'O') AND (vend_id = pVendId)) ORDER BY apopen_duedate LOOP -- Apply credit memo(s) according to due date SELECT applyapcreditmemotobalance(_r.apopen_id) INTO _result; -- Post the credit memo if applied IF (_result = 1) THEN SELECT postapcreditmemoapplication(_r.apopen_id) INTO _apopenid; IF (_apopenid < 0) THEN RETURN -1; END IF; ELSE RETURN -1; END IF; END LOOP; RETURN 1; END; $_$; ALTER FUNCTION public.applyapcredits(integer) OWNER TO admin; -- -- Name: applyarcreditmemotobalance(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION applyarcreditmemotobalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenid ALIAS FOR $1; BEGIN RETURN applyARCreditMemoToBalance(pAropenid, NULL); END; $_$; ALTER FUNCTION public.applyarcreditmemotobalance(integer) OWNER TO admin; -- -- Name: applyarcreditmemotobalance(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION applyarcreditmemotobalance(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceAropenid ALIAS FOR $1; pTargetAropenid ALIAS FOR $2; _amount NUMERIC; _amountcurrid INTEGER; _applyAmount NUMERIC; _applycurrid INTEGER; _curr_rate NUMERIC; _r RECORD; _p RECORD; BEGIN -- Find the balance to apply SELECT (aropen_amount - COALESCE(SUM(currToCurr(arcreditapply_curr_id, aropen_curr_id, arcreditapply_amount, aropen_docdate)), 0) - aropen_paid - COALESCE(prepared,0.0) - COALESCE(cashapplied,0.0)), aropen_curr_id, aropen_curr_rate INTO _amount, _amountcurrid, _curr_rate FROM aropen LEFT OUTER JOIN arcreditapply ON (arcreditapply_source_aropen_id=aropen_id) LEFT OUTER JOIN (SELECT aropen_id AS prepared_aropen_id, SUM(checkitem_amount + checkitem_discount) AS prepared FROM checkhead JOIN checkitem ON (checkitem_checkhead_id=checkhead_id) JOIN aropen ON (checkitem_aropen_id=aropen_id) WHERE ((NOT checkhead_posted) AND (NOT checkhead_void)) GROUP BY aropen_id) AS sub1 ON (prepared_aropen_id=aropen_id) LEFT OUTER JOIN (SELECT aropen_id AS cash_aropen_id, SUM(cashrcptitem_amount + cashrcptitem_discount) * -1.0 AS cashapplied FROM cashrcpt JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id) JOIN aropen ON (cashrcptitem_aropen_id=aropen_id) WHERE (NOT cashrcpt_posted) AND (NOT cashrcpt_void) GROUP BY aropen_id ) AS sub2 ON (cash_aropen_id=aropen_id) WHERE (aropen_id=pSourceAropenid) GROUP BY aropen_amount, aropen_paid, aropen_curr_id, aropen_curr_rate, prepared, cashapplied; IF (_amount < 0) THEN RETURN -1; END IF; -- Loop through the aropen items in order of due date FOR _r IN SELECT target.aropen_id AS aropenid, currToCurr(target.aropen_curr_id,source.aropen_curr_id, (target.aropen_amount - target.aropen_paid - calcpendingarapplications(target.aropen_id)), current_date) AS balance, target.aropen_curr_id AS curr_id, target.aropen_docdate AS docdate FROM aropen AS target, aropen AS source WHERE ( (source.aropen_cust_id=target.aropen_cust_id) AND (target.aropen_doctype IN ('D', 'I')) AND (target.aropen_open) AND (source.aropen_id=pSourceAropenid) AND ((pTargetAropenid IS NULL) OR (target.aropen_id=pTargetAropenid)) ) ORDER BY target.aropen_duedate, target.aropen_docnumber LOOP -- Determine the amount to apply IF (_r.balance > _amount) THEN _applyAmount := _amount; ELSE _applyAmount := _r.balance; END IF; _applycurrid := _amountcurrid; -- Does an arcreditapply record already exist? SELECT arcreditapply_id, arcreditapply_amount, arcreditapply_amount * _curr_rate / currRate(arcreditapply_curr_id,_r.docdate) AS arcreditapply_amount_applycurr INTO _p FROM arcreditapply WHERE ( (arcreditapply_target_aropen_id=_r.aropenid) AND (arcreditapply_source_aropen_id=pSourceAropenid) ); IF (FOUND) THEN -- Offset the amount to apply by the amount already applied _applyAmount := (_applyAmount - _p.arcreditapply_amount_applycurr); IF (_applyAmount < 0) THEN _applyAmount := 0; END IF; -- Update the arcreditapply with the new amount to apply UPDATE arcreditapply SET arcreditapply_amount = (arcreditapply_amount + _applyAmount * currRate(arcreditapply_curr_id,_r.docdate) / _curr_rate) WHERE (arcreditapply_id=_p.arcreditapply_id); ELSE -- Create a new arcreditapply record INSERT INTO arcreditapply ( arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id ) VALUES ( pSourceAropenid, _r.aropenid, _applyAmount, _applycurrid ); END IF; _amount := _amount - currToCurr(_applycurrid, _amountcurrid, _applyAmount, _r.docdate); IF (_amount = 0) THEN EXIT; END IF; END LOOP; RETURN 1; END; $_$; ALTER FUNCTION public.applyarcreditmemotobalance(integer, integer) OWNER TO admin; -- -- Name: applycashreceiptlinebalance(integer, integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION applycashreceiptlinebalance(integer, integer, numeric, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptId ALIAS FOR $1; pAropenid ALIAS FOR $2; pAmount ALIAS FOR $3; pCurrId ALIAS FOR $4; _balance NUMERIC; _amount NUMERIC; _applyAmount NUMERIC := 0; _discount NUMERIC := 0; _discprct NUMERIC; _docDate DATE; _r RECORD; _doctype CHAR(1); BEGIN -- All calculations performed in currency of Cash Receipt -- Clear previously applied DELETE FROM cashrcptitem WHERE ((cashrcptitem_cashrcpt_id=pCashrcptId) AND (cashrcptitem_aropen_id=pAropenId)); -- Find the balance to apply SELECT (pAmount - (COALESCE(SUM(cashrcptitem_amount), 0) ) ), COALESCE(cashrcpt_docdate, current_date) INTO _amount, _docDate FROM cashrcpt LEFT OUTER JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id = cashrcpt_id) WHERE (cashrcpt_id=pCashrcptid) GROUP BY cashrcpt_curr_id, cashrcpt_distdate, cashrcpt_docdate; SELECT (_amount - COALESCE(SUM(cashrcptmisc_amount), 0)) INTO _amount FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid); SELECT aropen_doctype INTO _doctype FROM aropen WHERE (aropen_id=pAropenId); RAISE DEBUG 'Amount (%) DocType (%)', _amount, _doctype; IF (_amount <= 0 AND _doctype IN ('I','D')) THEN RETURN 0; END IF; -- Determine Line balance SELECT currToCurr(aropen_curr_id, cashrcpt_curr_id, aropen_amount - aropen_paid, cashrcpt_distdate) - COALESCE((SELECT (SUM(cashrcptitem_amount) + SUM(cashrcptitem_discount)) FROM cashrcptitem, cashrcpt WHERE ((cashrcpt_id=cashrcptitem_cashrcpt_id) AND (NOT cashrcpt_void) AND (NOT cashrcpt_posted) AND (cashrcpt_id != pCashrcptId) AND (cashrcptitem_aropen_id=pAropenId))), 0) INTO _balance FROM aropen, cashrcpt WHERE ((aropen_id=pAropenId) AND (cashrcpt_id=pCashrcptId)); RAISE DEBUG 'Balance (%)', _balance; -- If Invoice or Debit Memo, determine Max Discount as per Terms IF (_doctype IN ('I','D')) THEN SELECT round(noNeg(_balance * CASE WHEN (_docDate <= determineDiscountDate(terms_id, aropen_docdate)) THEN COALESCE(terms_discprcnt, 0.0) ELSE 0.00 END - applied),2), CASE WHEN (_docDate <= determineDiscountDate(terms_id, aropen_docdate)) THEN COALESCE(terms_discprcnt, 0.0) ELSE 0.00 END INTO _discount, _discprct FROM aropen LEFT OUTER JOIN terms ON (terms_id=aropen_terms_id), (SELECT COALESCE(SUM(arapply_applied), 0.00) AS applied FROM arapply, aropen WHERE ((arapply_target_aropen_id=pAropenId) AND (arapply_source_aropen_id=pAropenId) AND (aropen_discount) ) ) AS data WHERE (aropen_id=pAropenId); -- Determine the amount to apply IF (_balance <= _amount + _discount) THEN _applyAmount := _balance - _discount; ELSE _discount := round((_amount / (1 - _discprct)) - _amount, 2); _applyAmount := _amount; END IF; ELSIF (_doctype IN ('C', 'R')) THEN -- Handle Credits, discounts don't apply here _applyAmount := _balance * -1; ELSE _applyAmount := _amount; END IF; IF (_applyAmount != 0) THEN -- Create a new cashrcptitem INSERT INTO cashrcptitem ( cashrcptitem_aropen_id, cashrcptitem_cashrcpt_id, cashrcptitem_amount,cashrcptitem_discount ) VALUES ( pAropenid, pCashrcptid, round(_applyAmount, 2), round(_discount, 2) ); END IF; RETURN abs(_applyAmount); END; $_$; ALTER FUNCTION public.applycashreceiptlinebalance(integer, integer, numeric, integer) OWNER TO admin; -- -- Name: applycashreceipttobalance(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION applycashreceipttobalance(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptid ALIAS FOR $1; pAmount ALIAS FOR $2; BEGIN RETURN applyCashReceiptToBalance(pCashrcptid, pAmount, baseCurrId() ); END; $_$; ALTER FUNCTION public.applycashreceipttobalance(integer, numeric) OWNER TO admin; -- -- Name: applycashreceipttobalance(integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION applycashreceipttobalance(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptid ALIAS FOR $1; pAmount ALIAS FOR $2; pCurrId ALIAS FOR $3; BEGIN RETURN applyCashReceiptToBalance(pCashrcptid, pAmount, pCurrId, false); END; $_$; ALTER FUNCTION public.applycashreceipttobalance(integer, numeric, integer) OWNER TO admin; -- -- Name: applycashreceipttobalance(integer, numeric, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION applycashreceipttobalance(integer, numeric, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptid ALIAS FOR $1; pAmount ALIAS FOR $2; pCurrId ALIAS FOR $3; pInclCredits ALIAS FOR $4; _amount NUMERIC; _applied NUMERIC := 0; _applyAmount NUMERIC; _discount NUMERIC; _discprct NUMERIC; _docDate DATE; _r RECORD; _toApply NUMERIC; BEGIN -- Apply open credits first if applicable IF (pInclCredits) THEN -- First find total debits unaccounted for by this receipt so we can apply as much credit -- as possible to clear, but no more SELECT coalesce(noNeg(sum(currToCurr(aropen_curr_id, cashrcpt_curr_id, aropen_amount - aropen_paid, cashrcpt_distdate) - COALESCE((SELECT (SUM(cashrcptitem_amount) + SUM(cashrcptitem_discount)) FROM cashrcptitem, cashrcpt WHERE ((cashrcpt_id=cashrcptitem_cashrcpt_id) AND (NOT cashrcpt_void) AND (NOT cashrcpt_posted) AND (cashrcpt_id != pCashrcptid) AND (cashrcptitem_aropen_id=aropen_id))), 0)) - pAmount),0) INTO _toApply FROM cashrcpt JOIN custinfo ON (cashrcpt_cust_id=cust_id) JOIN aropen ON (cust_id=aropen_cust_id) WHERE ((cashrcpt_id=pCashrcptid) AND (aropen_open) AND (aropen_doctype IN ('I','D'))); -- Loop through and apply credits until we account for all remaining debits we can FOR _r IN SELECT aropen_id FROM cashrcpt JOIN custinfo ON (cashrcpt_cust_id=cust_id) JOIN aropen ON (cust_id=aropen_cust_id) WHERE ((cashrcpt_id=pCashrcptid) AND (aropen_open) AND (aropen_doctype IN ('C','R'))) ORDER BY aropen_duedate, aropen_docnumber LOOP EXIT WHEN _toApply <= 0; _toApply := _toApply - applyCashReceiptLineBalance(pCashrcptid, _r.aropen_id, _toApply, pCurrId); END LOOP; END IF; -- Find the balance to apply SELECT (currToCurr(pCurrId, cashrcpt_curr_id, pAmount, cashrcpt_distdate) - (COALESCE(SUM(cashrcptitem_amount), 0) ) ), COALESCE(cashrcpt_docdate, current_date) INTO _amount, _docDate FROM cashrcpt LEFT OUTER JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id = cashrcpt_id) WHERE (cashrcpt_id=pCashrcptid) GROUP BY cashrcpt_curr_id, cashrcpt_distdate, cashrcpt_docdate; SELECT (_amount - COALESCE(SUM(cashrcptmisc_amount), 0)) INTO _amount FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid); IF (_amount = 0) THEN RETURN 1; END IF; -- Loop through the aropen item in order of due date, searching only for -- aropen items that are open, for the current customer and have an outstanding balance FOR _r IN SELECT aropen_id, currToCurr(aropen_curr_id, cashrcpt_curr_id, aropen_amount - aropen_paid, cashrcpt_distdate) - COALESCE((SELECT SUM(cashrcptitem_amount) + SUM(cashrcptitem_discount) FROM cashrcptitem, cashrcpt WHERE ((cashrcpt_id=cashrcptitem_cashrcpt_id) AND (NOT cashrcpt_void) AND (NOT cashrcpt_posted) AND (cashrcpt_id != pCashrcptId) AND (cashrcptitem_aropen_id=aropen_id))), 0) AS balance, s.cashrcptitem_id AS cashrcptitem_id FROM cashrcpt, aropen LEFT OUTER JOIN cashrcptitem s ON (s.cashrcptitem_aropen_id=aropen_id AND s.cashrcptitem_cashrcpt_id=pCashrcptId) LEFT OUTER JOIN terms ON (aropen_terms_id=terms_id), (SELECT COALESCE(SUM(arapply_applied), 0.00) AS applied FROM arapply, aropen WHERE ((arapply_target_aropen_id=aropen_id) AND (arapply_source_aropen_id=aropen_id) AND (aropen_discount) ) ) AS data WHERE ( (aropen_cust_id=cashrcpt_cust_id) AND (aropen_doctype IN ('I', 'D')) AND (aropen_open) AND (cashrcpt_id=pCashrcptid) ) ORDER BY aropen_duedate, aropen_amount, balance LOOP -- Determine Max Discount as per Terms SELECT round(noNeg(_r.balance * CASE WHEN (_docDate <= determineDiscountDate(terms_id, aropen_docdate)) THEN terms_discprcnt ELSE 0.00 END - applied),2), CASE WHEN (_docDate <= determineDiscountDate(terms_id, aropen_docdate)) THEN terms_discprcnt ELSE 0.00 END INTO _discount, _discprct FROM aropen LEFT OUTER JOIN terms ON (terms_id=aropen_terms_id), (SELECT COALESCE(SUM(arapply_applied), 0.00) AS applied FROM arapply, aropen WHERE ((arapply_target_aropen_id=_r.aropen_id) AND (arapply_source_aropen_id=_r.aropen_id) AND (aropen_discount) ) ) AS data WHERE (aropen_id=_r.aropen_id); -- Determine the amount to apply IF (_r.balance <= _amount + _discount) THEN _applyAmount := _r.balance - _discount; ELSE _discount := round((_amount / (1 - _discprct)) - _amount, 2); _applyAmount := _amount; END IF; IF (_applyAmount > 0) THEN -- Does an cashrcptitem already exist? IF (_r.cashrcptitem_id IS NOT NULL) THEN -- Update the cashrcptitem with the new amount to apply UPDATE cashrcptitem SET cashrcptitem_amount = round(cashrcptitem_amount + _applyAmount, 2), cashrcptitem_discount = round(_discount, 2) WHERE (cashrcptitem_id=_r.cashrcptitem_id); ELSE -- Create a new cashrcptitem INSERT INTO cashrcptitem ( cashrcptitem_aropen_id, cashrcptitem_cashrcpt_id, cashrcptitem_amount, cashrcptitem_discount ) VALUES ( _r.aropen_id, pCashrcptid, round(_applyAmount, 2), round(_discount, 2) ); END IF; _amount := (_amount - _applyAmount); IF (round(_amount, 2) = 0) THEN EXIT; END IF; END IF; END LOOP; RETURN 1; END; $_$; ALTER FUNCTION public.applycashreceipttobalance(integer, numeric, integer, boolean) OWNER TO admin; -- -- Name: araging(date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION araging(date, boolean) RETURNS SETOF araging LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAsOfDate ALIAS FOR $1; pUseDocDate ALIAS FOR $2; _row araging%ROWTYPE; BEGIN FOR _row IN SELECT * FROM araging(pAsOfDate, pUseDocDate, true) LOOP RETURN NEXT _row; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.araging(date, boolean) OWNER TO admin; -- -- Name: araging(date, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION araging(date, boolean, boolean) RETURNS SETOF araging LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAsOfDate ALIAS FOR $1; pUseDocDate ALIAS FOR $2; pConvBaseCurr ALIAS FOR $3; _row araging%ROWTYPE; _x RECORD; _returnVal INTEGER; _asOfDate DATE; BEGIN _asOfDate := COALESCE(pAsOfDate,current_date); FOR _x IN SELECT aropen_docdate, aropen_duedate, aropen_ponumber, aropen_docnumber, aropen_doctype, cust_id, cust_name, cust_number, cust_custtype_id, custtype_code, terms_descrip, --if pConvBaseCurr is true then use currtobase to convert all amounts to base based on aropen_docdate to ensure the same exchange rate --otherwise use currtocurr to convert all amounts to customer's currency based on aropen_docdate to ensure the same exchange rate --today and greater: CASE WHEN((aropen_duedate >= DATE(_asOfDate))) THEN balance ELSE 0.0 END AS cur_val, --0 to 30 CASE WHEN((aropen_duedate >= DATE(_asOfDate)-30) AND (aropen_duedate < DATE(_asOfDate))) THEN balance ELSE 0.0 END AS thirty_val, --30-60 CASE WHEN((aropen_duedate >= DATE(_asOfDate)-60) AND (aropen_duedate < DATE(_asOfDate) - 30 )) THEN balance ELSE 0.0 END AS sixty_val, --60-90 CASE WHEN((aropen_duedate >= DATE(_asOfDate)-90) AND (aropen_duedate < DATE(_asOfDate) - 60)) THEN balance ELSE 0.0 END AS ninety_val, --greater than 90: CASE WHEN((aropen_duedate > DATE(_asOfDate)-10000) AND (aropen_duedate < DATE(_asOfDate) - 90)) THEN balance ELSE 0.0 END AS plus_val, --total amount: CASE WHEN((aropen_duedate > DATE(_asOfDate)-10000)) THEN balance ELSE 0.0 END AS total_val, --AR Open Amount base aropen_amount FROM ( SELECT (((aropen_amount - aropen_paid + COALESCE(SUM(arapply_target_paid),0))) / CASE WHEN (pConvBaseCurr) THEN aropen_curr_rate ELSE currRate(aropen_curr_id, cust_curr_id, aropen_docdate) END * CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1.0 ELSE 1.0 END) AS balance, ((aropen_amount) / CASE WHEN (pConvBaseCurr) THEN aropen_curr_rate ELSE currRate(aropen_curr_id, cust_curr_id, aropen_docdate) END * CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1.0 ELSE 1.0 END) AS aropen_amount, aropen_docdate, aropen_duedate, aropen_ponumber, aropen_docnumber, aropen_doctype, cust_id, cust_name, cust_number, cust_custtype_id, custtype_code, COALESCE(arterms.terms_descrip, custterms.terms_descrip, '') AS terms_descrip FROM aropen JOIN custinfo ON (cust_id=aropen_cust_id) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN terms arterms ON (arterms.terms_id=aropen_terms_id) LEFT OUTER JOIN terms custterms ON (custterms.terms_id=cust_terms_id) LEFT OUTER JOIN arapply ON (((aropen_id=arapply_target_aropen_id) OR (aropen_id=arapply_source_aropen_id)) AND (arapply_distdate>_asOfDate)) WHERE ( (CASE WHEN (pUseDocDate) THEN aropen_docdate ELSE aropen_distdate END <= _asOfDate) AND (COALESCE(aropen_closedate,_asOfDate+1)>_asOfDate) ) GROUP BY aropen_id,aropen_docdate,aropen_duedate,aropen_ponumber,aropen_docnumber,aropen_doctype,aropen_paid, aropen_curr_id,aropen_amount,cust_id,cust_name,cust_number,cust_custtype_id,custtype_code, arterms.terms_descrip,custterms.terms_descrip, aropen_curr_rate, aropen_curr_id, cust_curr_id ORDER BY cust_number, aropen_duedate ) AS data LOOP _row.araging_docdate := _x.aropen_docdate; _row.araging_duedate := _x.aropen_duedate; _row.araging_ponumber := _x.aropen_ponumber; _row.araging_docnumber := _x.aropen_docnumber; _row.araging_doctype := _x.aropen_doctype; _row.araging_cust_id := _x.cust_id; _row.araging_cust_number := _x.cust_number; _row.araging_cust_name := _x.cust_name; _row.araging_cust_custtype_id := _x.cust_custtype_id; _row.araging_custtype_code := _x.custtype_code; _row.araging_terms_descrip := _x.terms_descrip; _row.araging_aropen_amount := _x.aropen_amount; _row.araging_cur_val := _x.cur_val; _row.araging_thirty_val := _x.thirty_val; _row.araging_sixty_val := _x.sixty_val; _row.araging_ninety_val := _x.ninety_val; _row.araging_plus_val := _x.plus_val; _row.araging_total_val := _x.total_val; RETURN NEXT _row; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.araging(date, boolean, boolean) OWNER TO admin; -- -- Name: arapplied(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION arapplied(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenid ALIAS FOR $1; pDate ALIAS FOR $2; _amount NUMERIC; BEGIN -- Return amount applied to an aropen in base currency item as of the parameter date SELECT SUM(currtobase(arapply_curr_id,arapply_applied,pDate)) INTO _amount FROM arapply WHERE (((arapply_target_aropen_id = pAropenid) OR (arapply_source_aropen_id = pAropenid)) AND (((arapply_journalnumber=0) AND (arapply_postdate <= pDate)) OR EXISTS(SELECT * FROM gltrans WHERE ((gltrans_journalnumber=arapply_journalnumber) AND (gltrans_date <= pDate))))); IF (_amount IS NULL) THEN RETURN 0; ELSE RETURN _amount; END IF; END; $_$; ALTER FUNCTION public.arapplied(integer, date) OWNER TO admin; -- -- Name: archivesaleshistory(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION archivesaleshistory(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSohistid ALIAS FOR $1; BEGIN INSERT INTO asohist ( asohist_id, asohist_cust_id, asohist_itemsite_id, asohist_shipdate, asohist_invcdate, asohist_duedate, asohist_promisedate, asohist_ordernumber, asohist_invcnumber, asohist_qtyshipped, asohist_unitprice, asohist_unitcost, asohist_billtoname, asohist_billtoaddress1, asohist_billtoaddress2, asohist_billtoaddress3, asohist_billtocity, asohist_billtostate, asohist_billtozip, asohist_shiptoname, asohist_shiptoaddress1, asohist_shiptoaddress2, asohist_shiptoaddress3, asohist_shiptocity, asohist_shiptostate, asohist_shiptozip, asohist_shipto_id, asohist_shipvia, asohist_salesrep_id, asohist_misc_type, asohist_misc_descrip, asohist_misc_id, asohist_commission, asohist_commissionpaid, asohist_doctype, asohist_orderdate, asohist_imported, asohist_ponumber, asohist_curr_id, asohist_taxtype_id, asohist_taxzone_id ) SELECT cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipdate, cohist_invcdate, cohist_duedate, cohist_promisedate, cohist_ordernumber, cohist_invcnumber, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_shipto_id, cohist_shipvia, cohist_salesrep_id, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_commission, cohist_commissionpaid, cohist_doctype, cohist_orderdate, cohist_imported, cohist_ponumber, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id FROM cohist WHERE (cohist_id=pSohistid); INSERT INTO asohisttax ( taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM cohisttax WHERE (taxhist_parent_id=pSohistid); DELETE FROM cohisttax WHERE (taxhist_parent_id=pSohistid); DELETE FROM cohist WHERE (cohist_id=pSohistid); RETURN pSohistid; END; $_$; ALTER FUNCTION public.archivesaleshistory(integer) OWNER TO admin; -- -- Name: arcurrgain(integer, integer, numeric, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION arcurrgain(integer, integer, numeric, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenId ALIAS FOR $1; pCurrId ALIAS FOR $2; pValue ALIAS FOR $3; pDate ALIAS FOR $4; _start DATE; _end DATE; _gain NUMERIC; _r RECORD; BEGIN IF (pAropenId IS NULL OR pValue = 0) THEN RETURN 0; END IF; SELECT aropen_docdate, aropen_curr_id, aropen_curr_rate INTO _r FROM aropen WHERE (aropen_id=pAropenId); IF (_r.aropen_docdate > pDate) THEN _gain := (currToBase(pCurrId, pValue, pDate) - currToCurr(pCurrId,_r.aropen_curr_id, pValue, pDate) / _r.aropen_curr_rate) * -1; ELSE _gain := currToCurr(pCurrId,_r.aropen_curr_id, pValue, pDate) / _r.aropen_curr_rate - currToBase(pCurrId, pValue, pDate); END IF; IF (_gain IS NULL) THEN RAISE EXCEPTION 'Error processing currency gain/loss.'; END IF; RETURN _gain; END; $_$; ALTER FUNCTION public.arcurrgain(integer, integer, numeric, date) OWNER TO admin; -- -- Name: armor(bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION armor(bytea) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_armor'; ALTER FUNCTION public.armor(bytea) OWNER TO admin; -- -- Name: invbal; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invbal ( invbal_id integer NOT NULL, invbal_period_id integer, invbal_itemsite_id integer, invbal_qoh_beginning numeric(18,6) NOT NULL, invbal_qoh_ending numeric(18,6) NOT NULL, invbal_qty_in numeric(18,6) NOT NULL, invbal_qty_out numeric(18,6) NOT NULL, invbal_value_beginning numeric(12,2) NOT NULL, invbal_value_ending numeric(12,2) NOT NULL, invbal_value_in numeric(12,2) NOT NULL, invbal_value_out numeric(12,2) NOT NULL, invbal_nn_beginning numeric(18,6) NOT NULL, invbal_nn_ending numeric(18,6) NOT NULL, invbal_nn_in numeric(18,6) NOT NULL, invbal_nn_out numeric(18,6) NOT NULL, invbal_nnval_beginning numeric(12,2) NOT NULL, invbal_nnval_ending numeric(12,2) NOT NULL, invbal_nnval_in numeric(12,2) NOT NULL, invbal_nnval_out numeric(12,2) NOT NULL, invbal_dirty boolean DEFAULT true NOT NULL ); ALTER TABLE public.invbal OWNER TO admin; -- -- Name: asofinvbal(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION asofinvbal(integer, date) RETURNS SETOF invbal LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; pAsofDate ALIAS FOR $2; _result invbal%ROWTYPE; _i RECORD; _h RECORD; _r RECORD; _prevCostmethod TEXT := 'A'; _prevDate TIMESTAMP WITH TIME ZONE; _runningQty NUMERIC := 0; _runningNn NUMERIC := 0; _runningValue NUMERIC := 0; _runningNnval NUMERIC := 0; BEGIN /* This is a base function to gather data. Because it is STABLE it should only need to be calculated once, even though it is likely to be called several times by other functions in parent query to present the various data. */ -- First make sure inventory balance is forward updated PERFORM forwardUpdateItemsite(pItemsiteId); -- Next find the previous period balace to use as a starting point SELECT invbal.*, period_start, itemsite_costmethod INTO _i FROM invbal JOIN itemsite ON (invbal_itemsite_id=itemsite_id) JOIN period ON (invbal_period_id=period_id) WHERE ((invbal_itemsite_id=pItemsiteId) AND (pAsofDate >= period_start)) ORDER BY period_start DESC LIMIT 1; _runningQty := _i.invbal_qoh_beginning; _runningNn := _i.invbal_nn_beginning; _runningValue := _i.invbal_value_beginning; _runningNnval := _i.invbal_nnval_beginning; _prevDate := _i.period_start; _prevCostmethod := _i.itemsite_costmethod; FOR _r IN SELECT invhist_id, invhist_created, invhist_invqty, invhist_transtype, invhist_unitcost, invhist_costmethod, itemsite_item_id, invhistSense(invhist_id) AS sense FROM invhist JOIN itemsite ON (itemsite_id=invhist_itemsite_id) WHERE ((invhist_itemsite_id=pItemsiteId) AND (invhist_transdate::date BETWEEN _i.period_start AND pAsofdate)) ORDER BY invhist_created, invhist_id LOOP -- Update balances changed by any standard cost update between transactions IF (_prevCostmethod = 'S' AND _runningQty != 0) THEN FOR _h IN SELECT costhist_oldcost, costhist_newcost FROM costhist JOIN item ON (costhist_item_id=item_id) JOIN itemsite ON (itemsite_item_id=item_id) WHERE ((itemsite_id=pItemsiteId) AND (costhist_date BETWEEN _prevDate AND _r.invhist_created) AND (costhist_type IN ('S','D'))) LOOP _runningValue := _runningValue + round((_h.costhist_newcost-_h.costhist_oldcost) * _runningQty,2); _runningNnval := _runningNnval + round((_h.costhist_newcost-_h.costhist_oldcost) * _runningNn,2); END LOOP; END IF; _prevDate := _r.invhist_created; _prevCostmethod := _r.invhist_costmethod; _runningQty := _runningQty + _r.invhist_invqty * _r.sense; _runningValue := _runningValue + round( _r.invhist_invqty * _r.sense * _r.invhist_unitcost,2); IF (_r.invhist_transtype = 'NN') THEN _runningNn := _runningNn + _r.invhist_invqty * -1; _runningNnval := _runningNnval + round( _r.invhist_invqty * -1 * _r.invhist_unitcost,2); END IF; END LOOP; _prevDate := COALESCE(_prevDate, _i.period_start); _prevCostmethod := COALESCE(_r.invhist_costmethod, _i.itemsite_costmethod); IF (_prevCostmethod = 'S' AND _runningQty != 0) THEN FOR _h IN SELECT costhist_oldcost, costhist_newcost FROM costhist JOIN item ON (costhist_item_id=item_id) JOIN itemsite ON (itemsite_item_id=item_id) WHERE ((itemsite_id=pItemsiteId) AND (costhist_date BETWEEN _prevDate AND CAST(pAsofDate + 1 AS TIMESTAMP WITH TIME ZONE)) AND (costhist_type IN ('S','D'))) LOOP _runningValue := _runningValue + round((_h.costhist_newcost-_h.costhist_oldcost) * _runningQty,2); _runningNnval := _runningNnval + round((_h.costhist_newcost-_h.costhist_oldcost) * _runningNn,2); END LOOP; END IF; _result := _i; _result.invbal_qoh_ending := _runningQty; _result.invbal_value_ending := _runningValue; _result.invbal_nn_ending := _runningNn; _result.invbal_nnval_ending := _runningNnval; RETURN NEXT _result; RETURN; END; $_$; ALTER FUNCTION public.asofinvbal(integer, date) OWNER TO admin; -- -- Name: asofinvnn(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION asofinvnn(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; pAsofDate ALIAS FOR $2; _result NUMERIC; BEGIN SELECT invbal_nn_ending INTO _result FROM asofinvbal(pItemsiteId, pAsofDate); RETURN COALESCE(_result, 0); END; $_$; ALTER FUNCTION public.asofinvnn(integer, date) OWNER TO admin; -- -- Name: asofinvqty(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION asofinvqty(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; pAsofDate ALIAS FOR $2; _result NUMERIC; BEGIN SELECT invbal_qoh_ending INTO _result FROM asofinvbal(pItemsiteId, pAsofDate); RETURN COALESCE(_result, 0); END; $_$; ALTER FUNCTION public.asofinvqty(integer, date) OWNER TO admin; -- -- Name: attachcontact(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION attachcontact(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcntctId ALIAS FOR $1; pcrmacctId ALIAS FOR $2; BEGIN UPDATE cntct SET cntct_crmacct_id = pcrmacctId WHERE cntct_id = pcntctId; RETURN 0; END; $_$; ALTER FUNCTION public.attachcontact(integer, integer) OWNER TO admin; -- -- Name: attachquotetoopportunity(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION attachquotetoopportunity(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pOpheadid ALIAS FOR $2; BEGIN -- Check Quote IF (NOT EXISTS(SELECT quhead_id FROM quhead WHERE (quhead_id=pQuheadid))) THEN RETURN -1; END IF; -- Check Opportunity IF (NOT EXISTS(SELECT ophead_id FROM ophead WHERE (ophead_id=pOpheadid))) THEN RETURN -2; END IF; -- Cannot attach if already attached IF (EXISTS(SELECT quhead_id FROM quhead WHERE ((quhead_id=pQuheadid) AND (quhead_ophead_id IS NOT NULL)))) THEN RETURN -3; END IF; UPDATE quhead SET quhead_ophead_id=pOpheadid WHERE (quhead_id=pQuheadid); RETURN 0; END; $_$; ALTER FUNCTION public.attachquotetoopportunity(integer, integer) OWNER TO admin; -- -- Name: attachsalesordertoopportunity(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION attachsalesordertoopportunity(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pOpheadid ALIAS FOR $2; BEGIN -- Check Sales Order IF (NOT EXISTS(SELECT cohead_id FROM cohead WHERE (cohead_id=pSoheadid))) THEN RETURN -1; END IF; -- Check Opportunity IF (NOT EXISTS(SELECT ophead_id FROM ophead WHERE (ophead_id=pOpheadid))) THEN RETURN -2; END IF; -- Cannot attach if already attached IF (EXISTS(SELECT cohead_id FROM cohead WHERE ((cohead_id=pSoheadid) AND (cohead_ophead_id IS NOT NULL)))) THEN RETURN -3; END IF; UPDATE cohead SET cohead_ophead_id=pOpheadid WHERE (cohead_id=pSoheadid); RETURN 0; END; $_$; ALTER FUNCTION public.attachsalesordertoopportunity(integer, integer) OWNER TO admin; -- -- Name: averagesalesprice(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION averagesalesprice(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _p RECORD; BEGIN -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitprice, cohist_shipdate)) AS totalsales, SUM(cohist_qtyshipped) AS totalship INTO _p FROM cohist WHERE ( (cohist_itemsite_id=pItemsiteid) AND (cohist_invcdate BETWEEN pStartDate AND pEndDate) ); IF ( (_p.totalship IS NULL) OR (_p.totalship = 0) ) THEN RETURN 0; ELSE RETURN (_p.totalsales / _p.totalship); END IF; END; $_$; ALTER FUNCTION public.averagesalesprice(integer, date, date) OWNER TO admin; -- -- Name: avgcost(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION avgcost(pitemsiteid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC; _qoh NUMERIC; _qohnn NUMERIC; BEGIN SELECT itemsite_value, itemsite_qtyonhand, itemsite_nnqoh INTO _value, _qoh, _qohnn FROM itemsite WHERE(itemsite_id=pItemsiteid); IF (_qoh = 0.0 AND _qohnn = 0.0) THEN RETURN 0.0; END IF; RETURN _value / (_qoh + _qohnn); END; $$; ALTER FUNCTION public.avgcost(pitemsiteid integer) OWNER TO admin; -- -- Name: balanceitemsite(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION balanceitemsite(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _itemlocseries INTEGER; _balanced NUMERIC; _qoh NUMERIC; _nnQoh NUMERIC; BEGIN -- Make sure that that passed Itemsite is MLC or Lot/Serial controlled IF ( ( SELECT (NOT ( (itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S')) )) FROM itemsite WHERE (itemsite_id=pItemsiteid) ) ) THEN RETURN 0; END IF; IF ( ( SELECT itemsite_freeze FROM itemsite WHERE(itemsite_id=pItemsiteid) ) ) THEN RETURN -1; END IF; -- Calculate the Netable portion SELECT COALESCE(SUM(itemloc_qty), 0) INTO _balanced FROM itemloc LEFT OUTER JOIN location ON (itemloc_location_id=location_id) WHERE ( ( (location_id IS NULL) OR (location_netable) ) AND (itemloc_itemsite_id=pItemsiteid) ); -- Post an AD Transaction for the Netable portion SELECT invAdjustment( itemsite_id, (_balanced - itemsite_qtyonhand), 'Balance', 'Inventory Balance' ) INTO _itemlocseries FROM itemsite WHERE (itemsite_id=pItemsiteid); -- Post the invtrans records associated with the itemlocdist records PERFORM postInvhist(itemlocdist_invhist_id) FROM itemlocdist WHERE(itemlocdist_series=_itemlocseries); -- Kill the resultant distribution records DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocseries); -- Calculate and write the Non-Netable portion directly SELECT COALESCE(SUM(itemloc_qty), 0) INTO _nnQoh FROM itemloc, location WHERE ( (itemloc_location_id=location_id) AND (NOT location_netable) AND (itemloc_itemsite_id=pItemsiteid) ); UPDATE itemsite SET itemsite_nnqoh = _nnQoh WHERE (itemsite_id=pItemsiteid); RETURN 1; END; $_$; ALTER FUNCTION public.balanceitemsite(integer) OWNER TO admin; -- -- Name: bomcontains(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomcontains(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pparentitemid ALIAS FOR $1; pchilditemid ALIAS FOR $2; _bomworksetid INTEGER; _result BOOLEAN; BEGIN _bomworksetid := indentedWhereUsed(pchilditemid); _result := EXISTS(SELECT bomwork_id FROM bomwork WHERE ((bomwork_set_id=_bomworksetid) AND (bomwork_item_id=pparentitemid) )); PERFORM deleteBOMWorkset(_bomworksetid); RETURN _result; END; $_$; ALTER FUNCTION public.bomcontains(integer, integer) OWNER TO admin; -- -- Name: bomhistsequence(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomhistsequence(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pHistid ALIAS FOR $1; _wid INTEGER; _seqnum TEXT; _bomhist RECORD; BEGIN _wid := pHistid; SELECT bomhist_parent_id AS parent, to_char(bomhist_seqnumber, '00009') AS seq INTO _bomhist FROM bomhist WHERE bomhist_seq_id=_wid; IF (FOUND) THEN _seqnum := _bomhist.seq; _wid := _bomhist.parent; WHILE (_wid != -1) LOOP SELECT bomhist_parent_id AS parent, to_char(bomhist_seqnumber, '00009') AS seq INTO _bomhist FROM bomhist WHERE bomhist_seq_id=_wid; IF (FOUND) THEN _seqnum := _bomhist.seq || '-' || _seqnum; _wid := _bomhist.parent; ELSE _wid := -1; END IF; END LOOP; ELSE _seqnum := ''::TEXT; END IF; RETURN _seqnum; END; $_$; ALTER FUNCTION public.bomhistsequence(integer) OWNER TO admin; -- -- Name: bomitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bomitem ( bomitem_id integer DEFAULT nextval(('bomitem_bomitem_id_seq'::text)::regclass) NOT NULL, bomitem_parent_item_id integer NOT NULL, bomitem_seqnumber integer, bomitem_item_id integer NOT NULL, bomitem_qtyper numeric(20,8) NOT NULL, bomitem_scrap numeric(8,4) NOT NULL, bomitem_status character(1), bomitem_effective date NOT NULL, bomitem_expires date NOT NULL, bomitem_createwo boolean NOT NULL, bomitem_issuemethod character(1) NOT NULL, bomitem_schedatwooper boolean NOT NULL, bomitem_ecn text, bomitem_moddate date, bomitem_subtype character(1) NOT NULL, bomitem_uom_id integer NOT NULL, bomitem_rev_id integer DEFAULT (-1), bomitem_booitem_seq_id integer DEFAULT (-1), bomitem_char_id integer, bomitem_value text, bomitem_notes text, bomitem_ref text, bomitem_qtyfxd numeric(20,8) DEFAULT 0 NOT NULL, bomitem_issuewo boolean DEFAULT false NOT NULL, CONSTRAINT bomitem_bomitem_issuemethod_check CHECK ((((bomitem_issuemethod = 'M'::bpchar) OR (bomitem_issuemethod = 'S'::bpchar)) OR (bomitem_issuemethod = 'L'::bpchar))), CONSTRAINT bomitem_bomitem_subtype_check CHECK ((((bomitem_subtype = 'N'::bpchar) OR (bomitem_subtype = 'I'::bpchar)) OR (bomitem_subtype = 'B'::bpchar))) ); ALTER TABLE public.bomitem OWNER TO admin; -- -- Name: TABLE bomitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bomitem IS 'Bill of Materials (BOM) component Items information'; -- -- Name: COLUMN bomitem.bomitem_qtyfxd; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN bomitem.bomitem_qtyfxd IS 'The fixed quantity required'; -- -- Name: bomitem(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomitem(integer) RETURNS SETOF bomitem LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT * FROM bomitem WHERE ((bomitem_parent_item_id=$1) AND (bomitem_rev_id=getActiveRevId('BOM',$1))); $_$; ALTER FUNCTION public.bomitem(integer) OWNER TO admin; -- -- Name: bomitem(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomitem(integer, integer) RETURNS SETOF bomitem LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT * FROM bomitem WHERE ((bomitem_parent_item_id=$1) AND (bomitem_rev_id=$2)); $_$; ALTER FUNCTION public.bomitem(integer, integer) OWNER TO admin; -- -- Name: bomlevelbyitem(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomlevelbyitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _cnt INTEGER; _result INTEGER; _bomitem RECORD; BEGIN _cnt := 0; BEGIN FOR _bomitem IN SELECT bomitem_parent_item_id FROM bomitem WHERE ((bomitem_item_id=pItemid) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1))) LOOP SELECT bomLevelByItem(_bomitem.bomitem_parent_item_id) + 1 INTO _result; IF (_result > _cnt) THEN _cnt := _result; END IF; END LOOP; EXCEPTION WHEN statement_too_complex THEN RAISE EXCEPTION 'potential recursive BOM found for item_id %', pItemid; END; return _cnt; END; $_$; ALTER FUNCTION public.bomlevelbyitem(integer) OWNER TO admin; -- -- Name: bomlevelbyitem(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomlevelbyitem(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pBomrevid ALIAS FOR $2; _cnt INTEGER; _result INTEGER; _bomitem RECORD; BEGIN _cnt := 0; BEGIN FOR _bomitem IN SELECT bomitem_parent_item_id FROM bomitem WHERE ((bomitem_item_id=pItemid) AND (bomitem_rev_id=pBomrevid) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1))) LOOP SELECT bomLevelByItem(_bomitem.bomitem_parent_item_id, pBomrevid) + 1 INTO _result; IF (_result > _cnt) THEN _cnt := _result; END IF; END LOOP; EXCEPTION WHEN statement_too_complex THEN RAISE EXCEPTION 'potential recursive BOM found for item_id %', pItemid; END; return _cnt; END; $_$; ALTER FUNCTION public.bomlevelbyitem(integer, integer) OWNER TO admin; -- -- Name: bomworkeffective(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomworkeffective(integer, date) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE workid ALIAS FOR $1; effdate ALIAS FOR $2; _wid INTEGER; _bomwork RECORD; BEGIN _wid := workid; WHILE (_wid != -1) LOOP SELECT bomwork_parent_id AS parent, bomwork_effective AS effective INTO _bomwork FROM bomwork WHERE bomwork_id=_wid; IF (FOUND) THEN _wid := _bomwork.parent; IF (_bomwork.effective > effdate) THEN RETURN FALSE; END IF; ELSE _wid := -1; END IF; END LOOP; RETURN TRUE; END; $_$; ALTER FUNCTION public.bomworkeffective(integer, date) OWNER TO admin; -- -- Name: bomworkexpired(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomworkexpired(integer, date) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE workid ALIAS FOR $1; expdate ALIAS FOR $2; _wid INTEGER; _bomwork RECORD; BEGIN _wid := workid; WHILE (_wid != -1) LOOP SELECT bomwork_parent_id AS parent, bomwork_expires AS expires INTO _bomwork FROM bomwork WHERE bomwork_id=_wid; IF (FOUND) THEN _wid := _bomwork.parent; IF (_bomwork.expires <= expdate) THEN RETURN TRUE; END IF; ELSE _wid := -1; END IF; END LOOP; RETURN FALSE; END; $_$; ALTER FUNCTION public.bomworkexpired(integer, date) OWNER TO admin; -- -- Name: bomworkitemsequence(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomworkitemsequence(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWorkid ALIAS FOR $1; _wid INTEGER; _seqnum TEXT; _bomwork RECORD; BEGIN _wid := pWorkid; SELECT bomwork_parent_id AS parent, item_number AS seq INTO _bomwork FROM bomwork, item WHERE ((bomwork_id=_wid) AND (bomwork_item_id=item_id)); IF (FOUND) THEN _seqnum := _bomwork.seq; _wid := _bomwork.parent; WHILE (_wid != -1) LOOP SELECT bomwork_parent_id AS parent, item_number AS seq INTO _bomwork FROM bomwork, item WHERE ((bomwork_id=_wid) AND (bomwork_item_id=item_id)); IF (FOUND) THEN _seqnum := _bomwork.seq || '-' || _seqnum; _wid := _bomwork.parent; ELSE _wid := -1; END IF; END LOOP; ELSE _seqnum := ''::TEXT; END IF; RETURN _seqnum; END; $_$; ALTER FUNCTION public.bomworkitemsequence(integer) OWNER TO admin; -- -- Name: bomworksequence(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION bomworksequence(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWorkid ALIAS FOR $1; _wid INTEGER; _seqnum TEXT; _bomwork RECORD; BEGIN _wid := pWorkid; SELECT bomwork_parent_id AS parent, to_char(bomwork_seqnumber, '00009') AS seq INTO _bomwork FROM bomwork WHERE bomwork_id=_wid; IF (FOUND) THEN _seqnum := _bomwork.seq; _wid := _bomwork.parent; WHILE (_wid != -1) LOOP SELECT bomwork_parent_id AS parent, to_char(bomwork_seqnumber, '00009') AS seq INTO _bomwork FROM bomwork WHERE bomwork_id=_wid; IF (FOUND) THEN _seqnum := _bomwork.seq || '-' || _seqnum; _wid := _bomwork.parent; ELSE _wid := -1; END IF; END LOOP; ELSE _seqnum := ''::TEXT; END IF; RETURN _seqnum; END; $_$; ALTER FUNCTION public.bomworksequence(integer) OWNER TO admin; -- -- Name: buildinvbal(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION buildinvbal(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; _r RECORD; _prevCostmethod TEXT := 'A'; _prevDate TIMESTAMP WITH TIME ZONE; _runningQty NUMERIC := 0; _runningNn NUMERIC := 0; BEGIN -- Validate IF (SELECT (count(invhist_id) > 0) FROM invhist WHERE ((invhist_itemsite_id=pItemsiteId) AND (NOT invhist_posted))) THEN SELECT item_number, warehous_code INTO _r FROM itemsite JOIN item ON (item_id=itemsite_item_id) JOIN whsinfo ON (itemsite_warehous_id=warehous_id) WHERE (itemsite_id=pItemsiteId); RAISE EXCEPTION 'Unposted inventory transactions exist for % at % [xtuple: buildInvBal, -1, %, %]', _r.item_number, _r.warehous_code, _r.item_number, _r.warehous_code; END IF; -- Remove any old records DELETE FROM invbal WHERE invbal_itemsite_id=pItemsiteId; FOR _r IN SELECT invhist.*, itemsite_item_id, invhistSense(invhist_id) AS sense, item_number, warehous_code FROM invhist JOIN itemsite ON (itemsite_id=invhist_itemsite_id) JOIN item ON (itemsite_item_id=item_id) JOIN whsinfo ON (itemsite_warehous_id=warehous_id) WHERE (invhist_itemsite_id=pItemsiteId) ORDER BY invhist_created, invhist_id LOOP RAISE NOTICE 'Calculating balances for Item % at Site % against transaction %, transtype %, sense %, qty %, %', _r.item_number, _r.warehous_code, _r.invhist_id, _r.invhist_transtype, _r.sense, _r.invhist_invqty, _r.invhist_comments; -- Update balances changed by any standard cost update between transactions IF (_prevCostmethod = 'S' AND _runningQty != 0) THEN PERFORM postValueintoInvBalance(pItemsiteid, costhist_date::date, _runningQty, _runningNn, costhist_oldcost, costhist_newcost ) FROM costhist WHERE ((costhist_item_id=_r.itemsite_item_id) AND (costhist_date BETWEEN _prevDate AND _r.invhist_created) AND (costhist_type IN ('S','D'))); END IF; -- Post transaction into inventory balance table PERFORM postIntoInvBalance(_r.invhist_id); _prevDate := _r.invhist_created; _prevCostmethod := _r.invhist_costmethod; _runningQty := _runningQty + _r.invhist_invqty * _r.sense; IF (_r.invhist_transtype = 'NN') THEN _runningNn := _runningNn + _r.invhist_invqty * -1; END IF; END LOOP; -- Update balances changed by any standard cost since last transaction IF (_prevCostmethod = 'S' AND _runningQty != 0) THEN PERFORM postValueintoInvBalance(pItemsiteid, costhist_date::date, _runningQty, _runningNn, costhist_oldcost, costhist_newcost ) FROM costhist WHERE ((costhist_item_id=_r.itemsite_item_id) AND (costhist_date > _prevDate) AND (costhist_type IN ('S','D'))); END IF; -- Forward update changes through all the balances PERFORM forwardupdateitemsite(pItemsiteId); RETURN 1; END; $_$; ALTER FUNCTION public.buildinvbal(integer) OWNER TO admin; -- -- Name: buildsearchpath(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION buildsearchpath() RETURNS text LANGUAGE plpgsql AS $_$ DECLARE _path TEXT := ''; _schema TEXT; _seq INTEGER; BEGIN -- get the schemas as ordered by the administrator SELECT concatagg(quote_ident(schemaord_name) || ',') INTO _path FROM (SELECT schemaord_name FROM schemaord LEFT OUTER JOIN pkghead ON (schemaord_name=pkghead_name) WHERE (pkghead_id IS NULL OR (pkghead_id IS NOT NULL AND packageisenabled(pkghead_id))) ORDER BY schemaord_order ) AS xtspq; -- add others that we think/know we need -- TODO: is there a reason not to include public, api, or packages? FOR _schema, _seq IN SELECT pkghead_name AS schema, 0 AS seq FROM pkghead WHERE packageisenabled(pkghead_id) UNION ALL SELECT 'public', 1 UNION ALL SELECT 'api', 2 ORDER BY seq, schema LOOP IF (_path !~* (E'(^|\\W)' || _schema || E'(\\W|$)')) THEN _path := _path || ',' || quote_ident(_schema); END IF; END LOOP; -- remove extraneous spaces and commas _path = BTRIM(REGEXP_REPLACE(_path, '( ?, ?)+', ',', 'g'), ', '); RAISE DEBUG 'buildSearchPath() returning %', _path; RETURN _path; END; $_$; ALTER FUNCTION public.buildsearchpath() OWNER TO admin; -- -- Name: FUNCTION buildsearchpath(); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION buildsearchpath() IS 'buildSearchPath() examines the schemaord and pkghead tables to build a search path string. It ensures that public, api, and all enabled packages are included even if they are not listed in the schemaord table. It returns the constructed search_path but does not set it.'; -- -- Name: calccashbudget(integer, integer, character); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calccashbudget(integer, integer, character) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntId ALIAS FOR $1; pPeriodId ALIAS FOR $2; pInterval ALIAS FOR $3; _accntType CHAR; _currentBudget NUMERIC; _priorBudget NUMERIC; _result NUMERIC; BEGIN SELECT accnt_type INTO _accntType FROM accnt WHERE (accnt_id=pAccntId); SELECT COALESCE(SUM(budget_amount),0) INTO _currentBudget FROM budget WHERE ((budget_accnt_id=pAccntId) AND (budget_period_id=pPeriodId)); IF (pInterval='M') THEN SELECT (COALESCE(SUM(budget_amount),0)) INTO _priorBudget FROM budget, (SELECT COALESCE(pp.period_id,-1) AS prior_period_id FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1) AS data WHERE ((budget_accnt_id=pAccntId) AND (budget_period_id=prior_period_id)); ELSE IF (pInterval='Q') THEN SELECT (COALESCE(SUM(budget_amount),0)) INTO _priorBudget FROM budget, (SELECT COALESCE(pp.period_id,-1) AS prior_period_id FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start) AND (pp.period_quarter= CASE WHEN cp.period_quarter > 1 THEN cp.period_quarter - 1 ELSE 4 END) AND (pp.period_start >= cp.period_start - interval '1 year')) ORDER BY pp.period_start DESC LIMIT 1) AS data WHERE ((budget_accnt_id=pAccntId) AND (budget_period_id=prior_period_id)); ELSE SELECT (COALESCE(SUM(budget_amount),0)) INTO _priorBudget FROM budget, (SELECT pp.period_id AS prior_period_id FROM period cp, period pp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=cy.yearperiod_id) AND (pp.period_yearperiod_id=py.yearperiod_id) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY pp.period_start DESC LIMIT 1) AS data WHERE ((budget_accnt_id=pAccntId) AND (budget_period_id=prior_period_id)); END IF; END IF; IF _accntType='A' THEN _result := ((_priorBudget-_currentBudget) * -1 ); ELSE IF (_accntType IN ('L','Q')) THEN _result := ((_priorBudget-_currentBudget) *-1); ELSE RETURN -1; END IF; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.calccashbudget(integer, integer, character) OWNER TO admin; -- -- Name: calccmheadamt(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calccmheadamt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM(COALESCE(extprice, 0)) INTO _amount FROM cmhead JOIN creditmemoitem ON (cmhead_id=cmitem_cmhead_id) WHERE (cmhead_id=pCmheadid); RETURN _amount; END; $_$; ALTER FUNCTION public.calccmheadamt(integer) OWNER TO admin; -- -- Name: calccmheadtax(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calccmheadtax(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; _headamount NUMERIC := 0; _itemamount NUMERIC := 0; _amount NUMERIC := 0; BEGIN SELECT COALESCE(SUM(taxhist_tax), 0) INTO _headamount FROM cmhead JOIN cmheadtax ON (taxhist_parent_id=cmhead_id) WHERE (cmhead_id=pCmheadid); SELECT SUM(COALESCE(tax, 0)) INTO _itemamount FROM cmhead JOIN creditmemoitem ON (cmhead_id=cmitem_cmhead_id) WHERE (cmhead_id=pCmheadid); _amount := _headamount + _itemamount; RETURN (_amount * -1.0); END; $_$; ALTER FUNCTION public.calccmheadtax(integer) OWNER TO admin; -- -- Name: calccobillamt(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calccobillamt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobillid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT COALESCE(round((cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio), 2), 0) INTO _amount FROM cobill JOIN coitem ON (coitem_id=cobill_coitem_id) WHERE (cobill_id=pCobillid); RETURN _amount; END; $_$; ALTER FUNCTION public.calccobillamt(integer) OWNER TO admin; -- -- Name: calccobilltax(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calccobilltax(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobillid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT COALESCE(calculateTax(cobmisc_taxzone_id, cobill_taxtype_id, cobmisc_shipdate, cobmisc_curr_id, calcCobillAmt(cobill_id)), 0) INTO _amount FROM cobill JOIN coitem ON (coitem_id=cobill_coitem_id) JOIN cobmisc ON (cobmisc_id=cobill_cobmisc_id) WHERE (cobill_id=pCobillid); RETURN _amount; END; $_$; ALTER FUNCTION public.calccobilltax(integer) OWNER TO admin; -- -- Name: calccobmiscamt(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calccobmiscamt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM(COALESCE(calcCobillAmt(cobill_id), 0)) INTO _amount FROM cobmisc JOIN cobill ON (cobmisc_id=cobill_cobmisc_id) WHERE (cobmisc_id=pCobmiscid); RETURN _amount; END; $_$; ALTER FUNCTION public.calccobmiscamt(integer) OWNER TO admin; -- -- Name: calccobmisctax(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calccobmisctax(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM( COALESCE(calculateTax(cobmisc_taxzone_id, cobill_taxtype_id, cobmisc_shipdate, cobmisc_curr_id, COALESCE(round((cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio), 2), 0)) , 0) ) INTO _amount FROM cobmisc JOIN cobill ON (cobmisc_id=cobill_cobmisc_id) JOIN coitem ON (coitem_id=cobill_coitem_id) WHERE (cobmisc_id=pCobmiscid); RETURN _amount; END; $_$; ALTER FUNCTION public.calccobmisctax(integer) OWNER TO admin; -- -- Name: calcpendingarapplications(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcpendingarapplications(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE paropenid ALIAS FOR $1; _arcreditsum NUMERIC; _aropencurrid INTEGER; _cashrcptsum NUMERIC; _sense INTEGER; BEGIN SELECT aropen_curr_id, (CASE WHEN aropen_doctype IN ('I','D') THEN 1 ELSE -1 END) INTO _aropencurrid, _sense FROM aropen WHERE (aropen_id=paropenid); SELECT SUM(currToCurr(cashrcpt_curr_id, _aropencurrid, cashrcptitem_amount + cashrcptitem_discount, coalesce(cashrcpt_applydate, cashrcpt_distdate))) * _sense INTO _cashrcptsum FROM cashrcptitem, cashrcpt WHERE ((cashrcptitem_cashrcpt_id=cashrcpt_id) AND (NOT cashrcpt_posted) AND (NOT cashrcpt_void) AND (cashrcptitem_aropen_id=paropenid) ); SELECT SUM(currToCurr(arcreditapply_curr_id, _aropencurrid, arcreditapply_amount, CURRENT_DATE)) INTO _arcreditsum FROM arcreditapply WHERE ((arcreditapply_target_aropen_id=paropenid) ); RETURN round(COALESCE(_cashrcptsum, 0) + COALESCE(_arcreditsum, 0),2); END; $_$; ALTER FUNCTION public.calcpendingarapplications(integer) OWNER TO admin; -- -- Name: calcquoteamt(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcquoteamt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; _subtotal NUMERIC := 0; _tax NUMERIC := 0; _freight NUMERIC := 0; _misc NUMERIC := 0; _amount NUMERIC := 0; BEGIN SELECT COALESCE(SUM(ROUND((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio), 2)), 0) INTO _subtotal FROM quitem WHERE (quitem_quhead_id=pQuheadid); SELECT COALESCE(SUM(tax), 0) INTO _tax FROM ( SELECT ROUND(SUM(taxdetail_tax), 2) AS tax FROM tax JOIN calculateTaxDetailSummary('Q', pQuheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id ) AS data; SELECT COALESCE(quhead_freight, 0), COALESCE(quhead_misc, 0) INTO _freight, _misc FROM quhead WHERE (quhead_id=pQuheadid); _amount := _subtotal + _tax + _freight + _misc; RETURN _amount; END; $_$; ALTER FUNCTION public.calcquoteamt(integer) OWNER TO admin; -- -- Name: calcsalesorderamt(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcsalesorderamt(pcoheadid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN calcSalesOrderAmt(pCoheadid, 'T'); END; $$; ALTER FUNCTION public.calcsalesorderamt(pcoheadid integer) OWNER TO admin; -- -- Name: calcsalesorderamt(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcsalesorderamt(pcoheadid integer, ptype text) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _subtotal NUMERIC := 0; _tax NUMERIC := 0; _freight NUMERIC := 0; _misc NUMERIC := 0; _credit NUMERIC := 0; _amount NUMERIC := 0; BEGIN -- pType: S = line item subtotal -- T = total -- B = balance due -- C = allocated credits -- X = tax SELECT COALESCE(SUM(ROUND((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio), 2)), 0) INTO _subtotal FROM coitem WHERE (coitem_cohead_id=pCoheadid) AND (coitem_status != 'X'); SELECT COALESCE(SUM(tax), 0) INTO _tax FROM ( SELECT ROUND(SUM(taxdetail_tax), 2) AS tax FROM tax JOIN calculateTaxDetailSummary('S', pCoheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id ) AS data; SELECT COALESCE(cohead_freight, 0), COALESCE(cohead_misc, 0), COALESCE(SUM(currToCurr(aropenalloc_curr_id, cohead_curr_id, aropenalloc_amount, CURRENT_DATE)),0) INTO _freight, _misc, _credit FROM cohead LEFT OUTER JOIN aropenalloc ON (aropenalloc_doctype='S' AND aropenalloc_doc_id=cohead_id) WHERE (cohead_id=pCoheadid) GROUP BY cohead_freight, cohead_misc, cohead_curr_id; _amount := CASE pType WHEN 'S' THEN (_subtotal) WHEN 'T' THEN (_subtotal + _tax + _freight + _misc) WHEN 'B' THEN (_subtotal + _tax + _freight + _misc - _credit) WHEN 'C' THEN (_credit) WHEN 'X' THEN (_tax) ELSE 0.0 END; RETURN _amount; END; $$; ALTER FUNCTION public.calcsalesorderamt(pcoheadid integer, ptype text) OWNER TO admin; -- -- Name: calcshipfreight(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcshipfreight(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadId ALIAS FOR $1; _result NUMERIC := 0; _order RECORD; _shipment RECORD; _weights RECORD; _price RECORD; _sales RECORD; _freightid INTEGER; _totalprice NUMERIC; _includepkgweight BOOLEAN := FALSE; _freight RECORD; _debug BOOLEAN := false; BEGIN --Get shipment SELECT shiphead_order_id, shiphead_order_type, shiphead_freight INTO _shipment FROM shiphead WHERE (shiphead_id=pShipheadId); IF (NOT FOUND) THEN RAISE EXCEPTION 'Shipment not found'; END IF; IF (_shipment.shiphead_order_type = 'SO') THEN --Sales Orders --Get the order header information SELECT cust_id AS cust_id, custtype_id, custtype_code, shipto_id, shipto_num, cohead_orderdate AS orderdate, cohead_shipvia AS shipvia, shipto_shipzone_id AS shipzone_id, cohead_curr_id AS curr_id, currConcat(cohead_curr_id) AS currAbbr, cohead_calcfreight, cohead_freight INTO _order FROM cohead JOIN custinfo ON (cust_id=cohead_cust_id) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN shiptoinfo ON (shipto_id=cohead_shipto_id) WHERE (cohead_id=_shipment.shiphead_order_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Order not found'; END IF; IF (_debug) THEN RAISE NOTICE 'cust_id = %', _order.cust_id; RAISE NOTICE 'custtype_id = %', _order.custtype_id; RAISE NOTICE 'shipto_id = %', _order.shipto_id; RAISE NOTICE 'shipto_num = %', _order.shipto_num; RAISE NOTICE 'orderdate = %', _order.orderdate; RAISE NOTICE 'shipvia = %', _order.shipvia; RAISE NOTICE 'shipzone_id = %', _order.shipzone_id; RAISE NOTICE 'curr_id = %', _order.curr_id; RAISE NOTICE 'currAbbr = %', _order.currAbbr; RAISE NOTICE 'calcfreight = %', _order.cohead_calcfreight; RAISE NOTICE 'freight = %', _order.cohead_freight; END IF; IF (NOT _order.cohead_calcfreight) THEN SELECT noNeg( _order.cohead_freight - COALESCE((SELECT SUM(shiphead_freight) FROM shiphead WHERE (shiphead_order_id = _shipment.shiphead_order_id) AND (shiphead_shipped='true')), 0) ) INTO _result; RETURN _result; END IF; SELECT fetchMetricBool('IncludePackageWeight') INTO _includepkgweight; --Calculate Sales Order freight --Get a list of aggregated weights from sites and --freight classes used on order lines FOR _weights IN SELECT CASE WHEN (_includePkgWeight) THEN SUM(shipitem_qty * (item_prodweight + item_packweight)) ELSE SUM(shipitem_qty * item_prodweight) END AS weight, itemsite_warehous_id, item_freightclass_id FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id) JOIN coitem ON (shipitem_orderitem_id=coitem_id) JOIN itemsite ON (itemsite_id=coitem_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE ( (shiphead_id=pShipheadId) AND (item_freightclass_id IS NOT NULL) ) GROUP BY itemsite_warehous_id, item_freightclass_id LOOP IF (_debug) THEN RAISE NOTICE '_weights.weight - %', _weights.weight; RAISE NOTICE '_weights.itemsite_warehous_id = %', _weights.itemsite_warehous_id; RAISE NOTICE '_weights.item_freightclass_id = %', _weights.item_freightclass_id; END IF; -- First get a sales price if any so we when we find other prices -- we can determine if we want that price or this price. -- Check for a Sale Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _sales FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN sale ON (sale_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN sale_startdate AND sale_enddate) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_sales.price IS NOT NULL) THEN RAISE NOTICE 'Sales Price found, %', _sales.price; END IF; END IF; -- Check for a Customer Shipto Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=_order.cust_id) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=_order.shipto_id) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Shipto Price found, %', _price.price; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Shipto Pattern Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=_order.cust_id) AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND (_order.shipto_num ~ ipsass_shipto_pattern) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Shipto Pattern Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=_order.cust_id) AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) = 0) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Type Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_custtype_id=_order.custtype_id) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Type Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Type Pattern Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND (_order.custtype_code ~ ipsass_custtype_pattern) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Type Pattern Price found, %', _price.price; END IF; END IF; END IF; -- Select the lowest price IF ( (_price.price IS NOT NULL) AND ((_sales.price IS NULL) OR (_price.price < _sales.price)) ) THEN _freightid := _price.ipsfreight_id; _totalprice := _price.price; ELSE IF ( (_sales.price IS NOT NULL) AND ((_price.price IS NULL) OR (_sales.price <= _price.price)) ) THEN _freightid := _sales.ipsfreight_id; _totalprice := _sales.price; END IF; END IF; -- Total IF (_freightid IS NOT NULL) THEN _result := _result + _totalprice; END IF; END LOOP; RETURN ROUND(_result,2); END IF; IF (_shipment.shiphead_order_type = 'TO') THEN --Transfer Orders SELECT noNeg( (SELECT SUM(toitem_freight) + tohead_freight FROM tohead, toitem WHERE (toitem_tohead_id=tohead_id) AND (tohead_id = _shipment.shiphead_order_id) GROUP BY tohead_freight) - COALESCE((SELECT SUM(shiphead_freight) FROM shiphead WHERE (shiphead_order_id = _shipment.shiphead_order_id) AND (shiphead_shipped='true')), 0) ) INTO _result; RETURN _result; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.calcshipfreight(integer) OWNER TO admin; -- -- Name: calctotalslipqty(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calctotalslipqty(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTagid ALIAS FOR $1; _qty NUMERIC := 0; BEGIN SELECT SUM(COALESCE(cntslip_qty, 0.0)) INTO _qty FROM cntslip WHERE (cntslip_cnttag_id=pTagid); RETURN _qty; END; $_$; ALTER FUNCTION public.calctotalslipqty(integer) OWNER TO admin; -- -- Name: calculatefreightdetail(integer, integer, text, integer, integer, text, date, text, integer, character varying, integer, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calculatefreightdetail(integer, integer, text, integer, integer, text, date, text, integer, character varying, integer, integer, numeric) RETURNS SETOF freightdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustId ALIAS FOR $1; pCustTypeId ALIAS FOR $2; pCustTypeCode ALIAS FOR $3; pShiptoId ALIAS FOR $4; pShipZoneId ALIAS FOR $5; pShiptoNum ALIAS FOR $6; pOrderDate ALIAS FOR $7; pShipVia ALIAS FOR $8; pCurrId ALIAS FOR $9; pCurrAbbr ALIAS FOR $10; pItemSiteWhsId ALIAS FOR $11; pItemFreightclassId ALIAS FOR $12; pWeight ALIAS FOR $13; _row freightData%ROWTYPE; _price RECORD; _sales RECORD; _freightid INTEGER; _totalprice NUMERIC; _asof DATE; _debug BOOLEAN := FALSE; BEGIN --Get pricing effectivity metric IF (SELECT fetchMetricText('soPriceEffective') = 'OrderDate') THEN _asof := pOrderDate; ELSE _asof := CURRENT_DATE; END IF; _freightid := NULL; _totalprice := 0.0; IF (_debug) THEN RAISE NOTICE 'pWeight - %', pWeight; RAISE NOTICE 'pItemSiteWhsId = %', pItemSiteWhsId; RAISE NOTICE 'pItemFreightclassId = %', pItemFreightclassId; END IF; -- First get a sales price if any so when we find other prices -- we can determine if we want that price or this sales price. -- Check for a Sale Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _sales FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN sale ON (sale_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN sale_startdate AND sale_enddate) AND (pCustId IS NOT NULL) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_sales.price IS NOT NULL) THEN RAISE NOTICE 'Sales Price found, %', _sales.price; END IF; END IF; -- Check for a Customer Shipto Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=pShiptoId) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Shipto Price found, %', _price.price; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Shipto Pattern Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=pCustId) AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND (pShiptoNum ~ ipsass_shipto_pattern) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Shipto Pattern Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=pCustId) AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) = 0) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Type Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_custtype_id=pCustTypeId) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Type Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Type Pattern Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND (pCustTypeCode ~ ipsass_custtype_pattern) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Type Pattern Price found, %', _price.price; END IF; END IF; END IF; -- Select the lowest price IF ( (_price.price IS NOT NULL) AND ((_sales.price IS NULL) OR (_price.price < _sales.price)) ) THEN _freightid := _price.ipsfreight_id; _totalprice := _price.price; ELSE IF ( (_sales.price IS NOT NULL) AND ((_price.price IS NULL) OR (_sales.price <= _price.price)) ) THEN _freightid := _sales.ipsfreight_id; _totalprice := _sales.price; END IF; END IF; IF (_debug) THEN RAISE NOTICE '_freightid = %', _freightid; RAISE NOTICE '_totalprice = %', _totalprice; END IF; -- Get information for the selected ipsfreight -- and return IF (_freightid IS NULL) THEN _row.freightdata_schedule := 'N/A'; _row.freightdata_from := ''; _row.freightdata_to := ''; _row.freightdata_shipvia := ''; _row.freightdata_freightclass := ''; _row.freightdata_weight := 0; _row.freightdata_uom := ''; _row.freightdata_price := 0; _row.freightdata_type := ''; _row.freightdata_total := 0; _row.freightdata_currency := ''; RETURN NEXT _row; ELSE SELECT ipshead_name AS freightdata_schedule, COALESCE(warehous_code, 'Any') AS freightdata_from, COALESCE(shipzone_name, 'Any') AS freightdata_to, COALESCE(ipsfreight_shipvia, 'Any') AS freightdata_shipvia, COALESCE(freightclass_code, 'Any') AS freightdata_freightclass, pWeight AS freightdata_weight, uom_name AS freightdata_uom, currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) AS freightdata_price, CASE WHEN (ipsfreight_type='F') THEN 'Flat Rate' ELSE 'Per UOM' END AS freightdata_type, _totalprice AS freightdata_total, pCurrAbbr AS freightdata_currency INTO _row FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) LEFT OUTER JOIN uom ON (uom_item_weight) LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id) LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id) LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id) WHERE (ipsfreight_id=_freightid); RETURN NEXT _row; END IF; RETURN; END; $_$; ALTER FUNCTION public.calculatefreightdetail(integer, integer, text, integer, integer, text, date, text, integer, character varying, integer, integer, numeric) OWNER TO admin; -- -- Name: calculatesubtax(integer, date, integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calculatesubtax(integer, date, integer, numeric, integer) RETURNS SETOF taxdetail LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxCodeId ALIAS FOR $1; pDate ALIAS FOR $2; pCurrId ALIAS FOR $3; pAmount ALIAS FOR $4; pLevel ALIAS FOR $5; _row taxdetail%ROWTYPE; _rownumber INTEGER := 1; _calc_tax Numeric :=0; _x RECORD; _y RECORD; BEGIN FOR _x IN SELECT tax_id, tax_code, tax_descrip, tax_basis_tax_id, taxrate_id, taxrate_percent, taxrate_curr_id, taxrate_amount, taxclass_id, taxclass_code, COALESCE(taxclass_sequence,0) AS taxclass_sequence, curr_id, curr_abbr FROM tax, taxrate, taxclass, curr_symbol WHERE ((tax_id = taxrate_tax_id) AND (tax_taxclass_id = taxclass_id) AND (taxrate_curr_id = curr_id) AND (tax_basis_tax_id = pTaxCodeId) AND (pDate BETWEEN taxrate_effective AND taxrate_expires) AND (taxrate_curr_id = pCurrId)) LOOP SELECT ROUND((_x.taxrate_percent * pAmount + currToCurr(_x.curr_id, pCurrId, _x.taxrate_amount, pDate)), 6) INTO _calc_tax; _row.taxdetail_tax_id = _x.tax_id; _row.taxdetail_tax_code = _x.tax_code; _row.taxdetail_tax_descrip = _x.tax_descrip; _row.taxdetail_tax_basis_tax_id = _x.tax_basis_tax_id ; _row.taxdetail_taxrate_percent = _x.taxrate_percent; _row.taxdetail_taxrate_amount = _x.taxrate_amount; _row.taxdetail_level = pLevel + 1; _row.taxdetail_taxclass_id = _x.taxclass_id ; _row.taxdetail_taxclass_code = _x.taxclass_code; _row.taxdetail_taxclass_sequence = _x.taxclass_sequence; _row.taxdetail_tax = _calc_tax; _row.taxdetail_curr_id = _x.curr_id; _row.taxdetail_curr_abbr = _x.curr_abbr; RETURN NEXT _row; _rownumber := _rownumber + 1; FOR _y IN SELECT * FROM calculateSubTax( _x.tax_id, pDate, pCurrId, _calc_tax, pLevel + 1) LOOP _row.taxdetail_tax_id = _y.taxdetail_tax_id; _row.taxdetail_tax_code = _y.taxdetail_tax_code; _row.taxdetail_tax_descrip = _y.taxdetail_tax_descrip; _row.taxdetail_tax_basis_tax_id = _y.taxdetail_tax_basis_tax_id ; _row.taxdetail_taxrate_percent = _y.taxdetail_taxrate_percent; _row.taxdetail_taxrate_amount = _y.taxdetail_taxrate_amount; _row.taxdetail_level = _y.taxdetail_level + 1; _row.taxdetail_taxclass_id = _y.taxdetail_taxclass_id ; _row.taxdetail_taxclass_code = _y.taxdetail_taxclass_code; _row.taxdetail_taxclass_sequence = _y.taxdetail_taxclass_sequence; _row.taxdetail_tax = _y.taxdetail_tax; _row.taxdetail_curr_id = _y.taxdetail_curr_id; _row.taxdetail_curr_abbr = _y.taxdetail_curr_abbr; RETURN NEXT _row; _rownumber := _rownumber + 1; END LOOP; END LOOP; END; $_$; ALTER FUNCTION public.calculatesubtax(integer, date, integer, numeric, integer) OWNER TO admin; -- -- Name: calculatetax(integer, integer, date, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calculatetax(integer, integer, date, integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxZoneId ALIAS FOR $1; pTaxTypeId ALIAS FOR $2; pDate ALIAS FOR $3; pCurrId ALIAS FOR $4; pAmount ALIAS FOR $5; _tottax numeric := 0; -- total tax BEGIN SELECT COALESCE(ROUND(SUM(taxdetail_tax),6),0) INTO _tottax FROM calculateTaxDetail(pTaxZoneId, pTaxTypeId, pDate, pCurrId, pAmount); RETURN _tottax; END; $_$; ALTER FUNCTION public.calculatetax(integer, integer, date, integer, numeric) OWNER TO admin; -- -- Name: calculatetaxdetail(integer, integer, date, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calculatetaxdetail(integer, integer, date, integer, numeric) RETURNS SETOF taxdetail LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxZoneId ALIAS FOR $1; pTaxTypeId ALIAS FOR $2; pDate ALIAS FOR $3; pCurrId ALIAS FOR $4; pAmount ALIAS FOR $5; _row taxdetail%ROWTYPE; _x RECORD; _y RECORD; _z RECORD; _currcum numeric := 0; -- Current cumulative tax _currseq numeric := 0; -- Current group sequence _prevcum numeric := 0; -- Previous cumulative tax _tax numeric := 0; -- Calculated tax amount _taxbasis numeric := 0; -- Used for calculating sub taxes BEGIN IF ((COALESCE(pTaxTypeId,-1) = -1) OR (COALESCE(pTaxZoneId,-1) = -1)) THEN RETURN; END IF; SELECT DISTINCT COALESCE(taxass_taxzone_id, -1) AS taxzone_id, COALESCE(taxass_taxtype_id, -1) AS taxtype_id, taxass_tax_id, CASE WHEN ((taxass_taxzone_id IS NOT NULL) AND (taxass_taxtype_id IS NOT NULL)) THEN 0 WHEN ((taxass_taxzone_id IS NOT NULL) AND (taxass_taxtype_id IS NULL)) THEN 1 WHEN ((taxass_taxzone_id IS NULL) AND (taxass_taxtype_id IS NOT NULL)) THEN 2 ELSE 3 END AS sequence INTO _x FROM taxass WHERE ((COALESCE(taxass_taxzone_id, pTaxZoneId, -1) = COALESCE(pTaxZoneId,-1)) AND (COALESCE(taxass_taxtype_id, pTaxTypeId, -1) = COALESCE(pTaxTypeId,-1))) ORDER BY sequence LIMIT 1; --Now loop through each tax detail record and return calculated result FOR _y IN SELECT --the data required by taxdetail type. Coalesce group sequence to 0 if no class. tax_id ,tax_code ,tax_descrip ,tax_basis_tax_id ,taxrate_percent ,taxrate_amount ,0 as taxdetail_level ,taxclass_id ,taxclass_code ,COALESCE(taxclass_sequence, 0) AS taxclass_sequence ,0 as taxdetail_tax ,curr_id ,curr_abbr FROM taxass, taxclass RIGHT OUTER JOIN tax LEFT OUTER JOIN taxrate ON (taxrate_tax_id=tax_id) ON (tax_taxclass_id=taxclass_id), curr_symbol WHERE taxass_tax_id=tax_id AND taxrate_curr_id=curr_id AND COALESCE(taxass_taxzone_id, -1) = _x.taxzone_id AND COALESCE(taxass_taxtype_id, -1) = _x.taxtype_id AND pDate BETWEEN COALESCE(taxrate_effective, startoftime()) AND COALESCE(taxrate_expires, endoftime()) ORDER BY COALESCE(taxclass_sequence, 0) LOOP -- If sequence has changed, cache the previous cumulative tax IF (_currseq != _x.sequence) THEN _prevcum := _currcum; END IF; -- Calculate the tax amount. Convert currency for flat rate amounts SELECT ROUND((_y.taxrate_percent * (pAmount + _prevcum) + currToCurr(_y.curr_id, pCurrId, _y.taxrate_amount, pDate)), 6) INTO _tax FROM tax JOIN taxrate ON (tax_id = taxrate_tax_id) WHERE (tax_id=_x.taxass_tax_id) AND (pDate BETWEEN COALESCE(taxrate_effective, startoftime()) AND COALESCE(taxrate_expires, endoftime())); --Map fields to _row _row.taxdetail_tax_id := _y.tax_id; _row.taxdetail_tax_code := _y.tax_code; _row.taxdetail_tax_descrip := _y.tax_descrip; _row.taxdetail_tax_basis_tax_id := _y.tax_basis_tax_id; _row.taxdetail_taxrate_percent := _y.taxrate_percent; _row.taxdetail_taxrate_amount := _y.taxrate_amount; _row.taxdetail_level := _y.taxdetail_level; _row.taxdetail_taxclass_id := _y.taxclass_id; _row.taxdetail_taxclass_code := _y.taxclass_code; _row.taxdetail_taxclass_sequence := _y.taxclass_sequence; _row.taxdetail_tax := _tax; _row.taxdetail_curr_id := _y.curr_id; _row.taxdetail_curr_abbr := _y.curr_abbr; RETURN NEXT _row; -- Increment cumulative balance and sequence number IF(_y.taxclass_sequence <> 0) THEN _currcum := _currcum + _tax; END IF; _currseq := _y.taxclass_sequence; -- Loop to Calculate sub taxes FOR _z IN SELECT * FROM calculateSubTax(_y.tax_id,pDate, pCurrId, _tax, 0) LOOP --Mapping of data _row.taxdetail_tax_id := _z.taxdetail_tax_id; _row.taxdetail_tax_code := _z.taxdetail_tax_code; _row.taxdetail_tax_descrip := _z.taxdetail_tax_descrip; _row.taxdetail_tax_basis_tax_id := _z.taxdetail_tax_basis_tax_id; _row.taxdetail_taxrate_percent := _z.taxdetail_taxrate_percent; _row.taxdetail_taxrate_amount := _z.taxdetail_taxrate_amount; _row.taxdetail_level := _z.taxdetail_level; _row.taxdetail_taxclass_id := _z.taxdetail_taxclass_id; _row.taxdetail_taxclass_code := _z.taxdetail_taxclass_code; _row.taxdetail_taxclass_sequence := _z.taxdetail_taxclass_sequence; _row.taxdetail_tax := _z.taxdetail_tax; _row.taxdetail_curr_id := _z.taxdetail_curr_id; _row.taxdetail_curr_abbr := _z.taxdetail_curr_abbr; RETURN NEXT _row; --Add to cumulative counter (_curcum) _currcum := _currcum + _z.taxdetail_tax ; END LOOP; END LOOP; END; $_$; ALTER FUNCTION public.calculatetaxdetail(integer, integer, date, integer, numeric) OWNER TO admin; -- -- Name: calculatetaxdetailline(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calculatetaxdetailline(text, integer) RETURNS SETOF taxdetail LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderType ALIAS FOR $1; pOrderId ALIAS FOR $2; _row taxdetail%ROWTYPE; _qry text; _totaltax numeric; _y RECORD; _table text; BEGIN _totaltax=0.0; IF pOrderType = 'II' THEN _table := 'invcitemtax'; ELSIF pOrderType = 'BI' THEN _table := 'cobilltax'; ELSIF pOrderType = 'CI' THEN _table := 'cmitemtax'; ELSIF pOrderType = 'VI' THEN _table := 'voitemtax'; ELSIF pOrderType = 'TI' THEN _table := 'toitemtax'; ELSIF pOrderType = 'AR' THEN _table := 'aropentax'; ELSIF pOrderType = 'AP' THEN _table := 'apopentax'; END IF; _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, COALESCE(taxhist_sequence,0) AS taxhist_sequence FROM taxhist JOIN tax ON (taxhist_tax_id=tax_id) JOIN pg_class ON (pg_class.oid=taxhist.tableoid) WHERE ( (taxhist_parent_id = ' || pOrderId || ') AND (relname=''' || _table || ''') );'; FOR _y IN EXECUTE _qry LOOP _row.taxdetail_tax_id=_y.tax_id; _row.taxdetail_tax_code = _y.tax_code; _row.taxdetail_tax_descrip = _y.tax_descrip; _row.taxdetail_tax = _y.taxhist_tax; _row.taxdetail_level= 0 ; _row.taxdetail_taxclass_sequence= _y.taxhist_sequence; _totaltax = _totaltax + _y.taxhist_tax; RETURN NEXT _row; END LOOP; END; $_$; ALTER FUNCTION public.calculatetaxdetailline(text, integer) OWNER TO admin; -- -- Name: calculatetaxdetailsummary(text, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calculatetaxdetailsummary(text, integer, text) RETURNS SETOF taxdetail LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderType ALIAS FOR $1; pOrderId ALIAS FOR $2; pDisplayType ALIAS FOR $3; _row taxdetail%ROWTYPE; _qry text := ''; _qry1 text; _totaltax numeric; _x RECORD; _y RECORD; _table text; BEGIN _totaltax=0.0; IF pOrderType IN ('S','Q','RA','PO') THEN IF pOrderType = 'S' THEN _qry := 'SELECT ' || 'COALESCE(cohead_taxzone_id, -1) AS taxzone_id, cohead_orderdate AS order_date, cohead_curr_id AS curr_id, COALESCE(coitem_taxtype_id, -1) AS taxtype_id, ROUND((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio),2) AS amount FROM cohead, coitem WHERE ( (coitem_cohead_id = ' || pOrderId || ') AND (' || 'cohead_id = coitem_cohead_id) AND ( coitem_status != ''X'') )'; ELSEIF pOrderType = 'Q' THEN _qry := 'SELECT ' || 'COALESCE(quhead_taxzone_id, -1) AS taxzone_id, quhead_quotedate AS order_date, quhead_curr_id AS curr_id, COALESCE(quitem_taxtype_id, -1) AS taxtype_id, ROUND((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio),2) AS amount FROM quhead, quitem WHERE ( (quitem_quhead_id = ' || pOrderId || ') AND (quhead_id = quitem_quhead_id) )'; ELSEIF pOrderType = 'RA' THEN _qry := 'SELECT ' || 'COALESCE(rahead_taxzone_id, -1) AS taxzone_id, rahead_authdate AS order_date, rahead_curr_id AS curr_id, COALESCE(raitem_taxtype_id, -1) AS taxtype_id, ROUND((raitem_qtyauthorized * raitem_qty_invuomratio) * (raitem_unitprice / raitem_price_invuomratio),2) AS amount FROM rahead, raitem WHERE ( (raitem_rahead_id = ' || pOrderId || ') AND (rahead_id = raitem_rahead_id) )'; ELSEIF pOrderType = 'PO' THEN _qry := 'SELECT ' || 'COALESCE(pohead_taxzone_id, -1) AS taxzone_id, pohead_orderdate AS order_date, pohead_curr_id AS curr_id, COALESCE(poitem_taxtype_id, -1) AS taxtype_id, ROUND(poitem_qty_ordered * poitem_unitprice, 2) AS amount FROM pohead, poitem WHERE ( (poitem_pohead_id = ' || pOrderId || ') AND (pohead_id = poitem_pohead_id) )'; END IF; FOR _x IN EXECUTE _qry LOOP _qry1 := 'SELECT * from calculatetaxdetail(' || _x.taxzone_id || ',' || _x.taxtype_id || ',''' || _x.order_date || ''',' || _x.curr_id || ',' || _x.amount || ')'; FOR _y IN EXECUTE _qry1 LOOP _row.taxdetail_tax_id=_y.taxdetail_tax_id; _row.taxdetail_tax_code = _y.taxdetail_tax_code; _row.taxdetail_tax_descrip = _y.taxdetail_tax_descrip; _row.taxdetail_tax = _y.taxdetail_tax; _row.taxdetail_level=_y.taxdetail_level; _row.taxdetail_taxclass_sequence= _y.taxdetail_taxclass_sequence; _totaltax = _totaltax + _y.taxdetail_tax; RETURN NEXT _row; END LOOP; END LOOP; IF pDisplayType = 'T' AND pOrderType <> 'PO' THEN IF pOrderType = 'S' THEN _qry := 'SELECT COALESCE(cohead_taxzone_id, -1) AS taxzone_id, cohead_orderdate AS order_date, cohead_curr_id AS curr_id, cohead_freight AS freight FROM cohead WHERE cohead_id = ' || pOrderId ; ELSEIF pOrderType = 'Q' THEN _qry := 'SELECT COALESCE(quhead_taxzone_id, -1) AS taxzone_id, quhead_quotedate AS order_date, quhead_curr_id AS curr_id, COALESCE(quhead_freight,0) AS freight FROM quhead WHERE quhead_id = ' || pOrderId; ELSEIF pOrderType = 'RA' THEN _qry := 'SELECT COALESCE(rahead_taxzone_id, -1) AS taxzone_id, COALESCE(rahead_authdate,CURRENT_DATE) AS order_date, rahead_curr_id AS curr_id, COALESCE(rahead_freight,0) AS freight FROM rahead WHERE rahead_id = ' || pOrderId; END IF; FOR _x IN EXECUTE _qry LOOP _qry1 := 'SELECT * from calculatetaxdetail(' || _x.taxzone_id || ', getfreighttaxtypeid(),''' || _x.order_date || ''',' || _x.curr_id || ',' || _x.freight || ')'; FOR _y IN EXECUTE _qry1 LOOP _row.taxdetail_tax_id=_y.taxdetail_tax_id; _row.taxdetail_tax_code = _y.taxdetail_tax_code; _row.taxdetail_tax_descrip = _y.taxdetail_tax_descrip; _row.taxdetail_tax = _y.taxdetail_tax; _row.taxdetail_level=_y.taxdetail_level; _row.taxdetail_taxclass_sequence= _y.taxdetail_taxclass_sequence; _totaltax = _totaltax + _y.taxdetail_tax; RETURN NEXT _row; END LOOP; END LOOP; END IF; ELSEIF pOrderType IN ('I','B','CM', 'VO','TO') THEN IF (pOrderType='I') THEN _table := 'invcheadtax'; ELSIF (pOrderType='B') THEN _table := 'cobmisctax'; ELSIF (pOrderType='CM') THEN _table := 'cmheadtax'; ELSIF (pOrderType='VO') THEN _table := 'voheadtax'; ELSIF (pOrderType='TO') THEN _table := 'tohead'; END IF; IF pOrderType = 'I' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM invchead, invcitemtax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN invcitem ON (invcitem_id=taxhist_parent_id) WHERE invcitem_invchead_id = ' || pOrderId || ' AND invchead_id = invcitem_invchead_id '; ELSIF pOrderType = 'B' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM cobmisc, cobilltax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN cobill ON (cobill_id=taxhist_parent_id) WHERE cobill_cobmisc_id = ' || pOrderId || ' AND cobmisc_id = cobill_cobmisc_id '; ELSIF pOrderType = 'CM' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM cmhead, cmitemtax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN cmitem ON (cmitem_id=taxhist_parent_id) WHERE cmitem_cmhead_id = ' || pOrderId || ' AND cmhead_id = cmitem_cmhead_id '; ELSIF pOrderType = 'VO' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM vohead, voitemtax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN voitem ON (voitem_id=taxhist_parent_id) WHERE voitem_vohead_id = ' || pOrderId || ' AND vohead_id = voitem_vohead_id '; ELSIF pOrderType = 'TO' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM tohead, toitemtax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN toitem ON (toitem_id=taxhist_parent_id) WHERE toitem_tohead_id = ' || pOrderId || ' AND tohead_id = toitem_tohead_id '; END IF; IF pDisplayType IN ('F','T') AND pOrderType <> 'VO' THEN IF (length(_qry) > 0) THEN _qry := _qry || ' UNION ALL '; END IF; _qry := _qry || 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM taxhist JOIN tax ON (taxhist_tax_id=tax_id) JOIN pg_class ON (pg_class.oid=taxhist.tableoid) WHERE ( (taxhist_parent_id = ' || pOrderId || ') AND (taxhist_taxtype_id=getfreighttaxtypeid()) AND (relname=''' || _table || ''') )'; END IF; IF pDisplayType IN ('A','T') THEN IF (length(_qry) > 0) THEN _qry := _qry || ' UNION ALL '; END IF; _qry := _qry || 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM taxhist JOIN tax ON (taxhist_tax_id=tax_id) JOIN pg_class ON (pg_class.oid=taxhist.tableoid) WHERE ( (taxhist_parent_id = ' || pOrderId || ') AND (taxhist_taxtype_id=getadjustmenttaxtypeid()) AND (relname=''' || _table || ''') )'; END IF; FOR _y IN EXECUTE _qry LOOP _row.taxdetail_tax_id=_y.tax_id; _row.taxdetail_tax_code = _y.tax_code; _row.taxdetail_tax_descrip = _y.tax_descrip; _row.taxdetail_tax = _y.taxhist_tax; _row.taxdetail_level= 0 ; _row.taxdetail_taxclass_sequence= COALESCE(_y.taxhist_sequence,0); _totaltax = _totaltax + _y.taxhist_tax; RETURN NEXT _row; END LOOP; END IF; END; $_$; ALTER FUNCTION public.calculatetaxdetailsummary(text, integer, text) OWNER TO admin; -- -- Name: calculatetaxhist(text, integer, integer, integer, date, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calculatetaxhist(text, integer, integer, integer, date, integer, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTableName ALIAS FOR $1; pParentId ALIAS FOR $2; pTaxZoneId ALIAS FOR $3; pTaxTypeId ALIAS FOR $4; pDate ALIAS FOR $5; pCurrId ALIAS FOR $6; pAmount ALIAS FOR $7; _qry TEXT; BEGIN IF (pTableName IS NULL) THEN RAISE EXCEPTION 'A table name is required to calculate tax history'; ELSEIF (pParentId IS NULL) THEN RAISE EXCEPTION 'A parent ID is required to calculate tax history'; ELSEIF (pDate IS NULL) THEN RAISE EXCEPTION 'A date is required to calculate tax history'; ELSEIF (pAmount IS NULL) THEN RAISE EXCEPTION 'An amount is required to calculate tax history'; END IF; -- Build a query that deletes any previous tax history for this document record _qry := 'DELETE FROM ' || pTableName || ' WHERE taxhist_parent_id = ' || pParentId || ' AND taxhist_taxtype_id <> getadjustmenttaxtypeid();'; EXECUTE _qry; -- Next, build and execute query that inserts new rows. _qry := 'INSERT INTO ' || pTableName || ' ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate) SELECT ' || pParentId || ','; IF (pTaxTypeId IS NULL) THEN _qry := _qry || 'NULL'; ELSE _qry := _qry || pTaxTypeId; END If; _qry := _qry || ', taxdetail_tax_id,' || pAmount || ', taxdetail_tax_basis_tax_id, taxdetail_taxclass_sequence, taxdetail_taxrate_percent, taxdetail_taxrate_amount, taxdetail_tax, ''' || pDate || ''' FROM calculatetaxdetail(' || COALESCE(pTaxZoneId,-1) || ',' || COALESCE(pTaxTypeId,-1) ||',''' || pDate || ''',' || pCurrId || ',' || pAmount || ');'; EXECUTE _qry; RETURN true; END; $_$; ALTER FUNCTION public.calculatetaxhist(text, integer, integer, integer, date, integer, numeric) OWNER TO admin; -- -- Name: calcvoucheramt(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcvoucheramt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoucherid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM(COALESCE(vodist_amount, 0)) INTO _amount FROM vodist WHERE (vodist_vohead_id=pVoucherid); RETURN _amount; END; $_$; ALTER FUNCTION public.calcvoucheramt(integer) OWNER TO admin; -- -- Name: calcvoucherfreight(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcvoucherfreight(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoucherid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM(COALESCE(voitem_freight, 0)) INTO _amount FROM voitem WHERE (voitem_vohead_id=pVoucherid); RETURN _amount; END; $_$; ALTER FUNCTION public.calcvoucherfreight(integer) OWNER TO admin; -- -- Name: calcvouchertax(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcvouchertax(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoucherid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT COALESCE(calculateTax(vohead_taxzone_id, vohead_taxtype_id, vohead_docdate, vohead_curr_id, calcVoucherAmt(vohead_id)), 0) INTO _amount FROM vohead WHERE (vohead_id=pVoucherid); RETURN _amount; END; $_$; ALTER FUNCTION public.calcvouchertax(integer) OWNER TO admin; -- -- Name: calcwooperstartstub(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION calcwooperstartstub(integer, integer) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoId ALIAS FOR $1; pBooitemSeqId ALIAS FOR $2; _result DATE; BEGIN IF ( SELECT ((metric_value='t') AND packageIsEnabled('xtmfg')) FROM metric WHERE(metric_name='Routings') ) THEN RETURN xtmfg.calcWooperStart(pWoId, pBooitemSeqId); END IF; RETURN null; END; $_$; ALTER FUNCTION public.calcwooperstartstub(integer, integer) OWNER TO admin; -- -- Name: cancelbillingselection(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cancelbillingselection(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; BEGIN IF ( ( SELECT cobmisc_posted FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ) ) THEN RETURN -1; END IF; DELETE FROM cobill WHERE (cobill_cobmisc_id=pCobmiscid); DELETE FROM cobmisc WHERE (cobmisc_id=pCobmiscid); RETURN 1; END; $_$; ALTER FUNCTION public.cancelbillingselection(integer) OWNER TO admin; -- -- Name: changeaccountingperioddates(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changeaccountingperioddates(integer, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _check INTEGER; _r RECORD; BEGIN -- Check to make sure that the passed period is not closed IF ( ( SELECT period_closed FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Check to make sure that the passed start date does not fall -- into another period SELECT period_id INTO _check FROM period WHERE ( (pStartDate BETWEEN period_start AND period_end) AND (period_id <> pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to make sure that the passed end date does not fall -- into another period SELECT period_id INTO _check FROM period WHERE ( (pEndDate BETWEEN period_start AND period_end) AND (period_id <> pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to make sure that the new passed start and end dates do not -- orphan a posted G/L Transaction SELECT gltrans_id INTO _check FROM gltrans, period WHERE ( (gltrans_date BETWEEN period_start AND period_end) AND (gltrans_posted) AND (NOT (gltrans_date BETWEEN pStartDate AND pEndDate)) AND (period_id=pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; -- Alter the start and end dates of the pass period UPDATE period SET period_start=pStartDate, period_end=pEndDate WHERE (period_id=pPeriodid); -- Post any unposted G/L Transactions into the period FOR _r IN SELECT DISTINCT gltrans_sequence FROM gltrans WHERE ( (NOT gltrans_posted) AND (gltrans_date BETWEEN pStartDate AND pEndDate) ) LOOP PERFORM postIntoTrialBalance(_r.gltrans_sequence); END LOOP; -- All done RETURN 1; END; $_$; ALTER FUNCTION public.changeaccountingperioddates(integer, date, date) OWNER TO admin; -- -- Name: changeaccountingyearperioddates(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changeaccountingyearperioddates(integer, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _check INTEGER; _checkBool BOOLEAN; _r RECORD; BEGIN -- Check to make sure that the passed yearperiod is not closed IF ( ( SELECT yearperiod_closed FROM yearperiod WHERE (yearperiod_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Check to make sure that the passed start date does not fall -- into another yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE ( (pStartDate BETWEEN yearperiod_start AND yearperiod_end) AND (yearperiod_id <> pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to make sure that the passed end date does not fall -- into another yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE ( (pEndDate BETWEEN yearperiod_start AND yearperiod_end) AND (yearperiod_id <> pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to make sure that the passed yearperiod is not closed IF ( ( SELECT (count(period_id) > 0) FROM period WHERE ((period_yearperiod_id=pPeriodid) AND (period_start < pStartDate OR period_end > pEndDate)) ) ) THEN RETURN -4; END IF; -- Make sure that the passed start is prior to the end date SELECT (pStartDate > pEndDate) INTO _checkBool; IF (_checkBool) THEN RETURN -5; END IF; -- Alter the start and end dates of the pass period UPDATE yearperiod SET yearperiod_start=pStartDate, yearperiod_end=pEndDate WHERE (yearperiod_id=pPeriodid); -- All done RETURN 1; END; $_$; ALTER FUNCTION public.changeaccountingyearperioddates(integer, date, date) OWNER TO admin; -- -- Name: changefkeypointers(text, text, integer, integer, text[], boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changefkeypointers(text, text, integer, integer, text[], boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSchema ALIAS FOR $1; pTable ALIAS FOR $2; pSourceId ALIAS FOR $3; pTargetId ALIAS FOR $4; pIgnore ALIAS FOR $5; _purge BOOLEAN := COALESCE($6, FALSE); _counter INTEGER := 0; _count1 INTEGER := 0; _fk RECORD; _pk TEXT[]; BEGIN -- for all foreign keys that point to pSchema.pTable FOR _fk IN EXECUTE 'SELECT fkeyns.nspname AS schemaname, fkeytab.relname AS tablename, conkey, attname, typname FROM pg_constraint JOIN pg_class basetab ON (confrelid=basetab.oid) JOIN pg_namespace basens ON (basetab.relnamespace=basens.oid) JOIN pg_class fkeytab ON (conrelid=fkeytab.oid) JOIN pg_namespace fkeyns ON (fkeytab.relnamespace=fkeyns.oid) JOIN pg_attribute ON (attrelid=conrelid AND attnum=conkey[1]) JOIN pg_type ON (atttypid=pg_type.oid) WHERE basetab.relname = ' || quote_literal(pTable) || ' AND basens.nspname = ' || quote_literal(pSchema) || ' AND fkeytab.relname NOT IN (''' || ARRAY_TO_STRING(pIgnore, ''', ''') || ''')' LOOP IF (ARRAY_UPPER(_fk.conkey, 1) > 1) THEN RAISE EXCEPTION 'Cannot change the foreign key in %.% that refers to %.% because the foreign key constraint has multiple columns. [xtuple: changefkeypointers, -1, %.%, %.%]', _fk.schemaname, _fk.tablename, pSchema, pTable, _fk.schemaname, _fk.tablename, pSchema, pTable; END IF; -- optionally make a backup copy of the data IF (NOT _purge) THEN -- determine the primary key column of the fkey table _pk := primaryKeyFields(_fk.schemaname, _fk.tablename); IF (ARRAY_UPPER(_pk, 1) > 1) THEN RAISE EXCEPTION 'Cannot change foreign key references in %.% because it has a composite primary key. Try setting the purge option. [xtuple: changefkeypointers, -4, %.%]', _fk.schemaname, _fk.tablename, _fk.schemaname, _fk.tablename; END IF; -- make the backup copy EXECUTE 'INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT ' || quote_literal(_fk.schemaname) || ', ' || quote_literal(_fk.tablename) || ', ' || quote_literal(_pk[1]) || ', ' || _pk[1] || ', ' || quote_literal(_fk.attname) || ', ' || _fk.attname || ', ' || quote_literal(_fk.typname) || ', ' || quote_literal(pSchema) || ', ' || quote_literal(pTable) || ', ' || pTargetId || ' FROM ' || _fk.schemaname || '.' || _fk.tablename || ' WHERE ('|| _fk.attname || '=' || pSourceId || ');'; END IF; -- actually change the foreign keys to point to the desired base table record EXECUTE 'UPDATE ' || _fk.schemaname || '.' || _fk.tablename || ' SET ' || _fk.attname || '=' || pTargetId || ' WHERE (' || _fk.attname || '=' || pSourceId || ');'; GET DIAGNOSTICS _count1 = ROW_COUNT; _counter := _counter + _count1; END LOOP; RETURN _counter; END; $_$; ALTER FUNCTION public.changefkeypointers(text, text, integer, integer, text[], boolean) OWNER TO admin; -- -- Name: FUNCTION changefkeypointers(text, text, integer, integer, text[], boolean); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION changefkeypointers(text, text, integer, integer, text[], boolean) IS 'Change the data in all tables with foreign key relationships so they point to the pSchema.pTable record with primary key pTargetId instead of the record with primary key pSourceId. Ignore any tables listed in pIgnore. If the final arg is TRUE, make a backup copy of the original data in the mrgundo table.'; -- -- Name: changepoitemduedate(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changepoitemduedate(ppoitemid integer, pdate date) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN changePoitemDueDate(pPoitemid, pDate, false); END; $$; ALTER FUNCTION public.changepoitemduedate(ppoitemid integer, pdate date) OWNER TO admin; -- -- Name: changepoitemduedate(integer, date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changepoitemduedate(ppoitemid integer, pdate date, pbyso boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF ( ( SELECT (poitem_status IN ('C')) FROM poitem WHERE (poitem_id=pPoitemid) ) ) THEN RETURN -1; END IF; UPDATE poitem SET poitem_duedate=pDate WHERE (poitem_id=pPoitemid); IF (pBySO) THEN --Generate the PoItemUpdatedBySo event INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', poitem_id, itemsite_warehous_id, (pohead_number || '-'|| poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id=evnttype_id) JOIN itemsite ON (evntnot_warehous_id=itemsite_warehous_id) JOIN item ON (itemsite_item_id=item_id) JOIN poitem ON (poitem_itemsite_id=itemsite_id) JOIN pohead ON (poitem_pohead_id=pohead_id) WHERE( (poitem_id=pPoitemid) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='PoItemUpdatedBySo') ); END IF; RETURN pPoitemid; END; $$; ALTER FUNCTION public.changepoitemduedate(ppoitemid integer, pdate date, pbyso boolean) OWNER TO admin; -- -- Name: changepoitemqty(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changepoitemqty(ppoitemid integer, pqty numeric) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN changePoitemQty(pPoitemid, pQty, false); END; $$; ALTER FUNCTION public.changepoitemqty(ppoitemid integer, pqty numeric) OWNER TO admin; -- -- Name: changepoitemqty(integer, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changepoitemqty(ppoitemid integer, pqty numeric, pbyso boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF ( ( SELECT (poitem_status IN ('C')) FROM poitem WHERE (poitem_id=pPoitemid) ) ) THEN RETURN -1; END IF; UPDATE poitem SET poitem_qty_ordered=pQty WHERE (poitem_id=pPoitemid); IF (pBySO) THEN --Generate the PoItemUpdatedBySo event INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', poitem_id, itemsite_warehous_id, (pohead_number || '-'|| poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id=evnttype_id) JOIN itemsite ON (evntnot_warehous_id=itemsite_warehous_id) JOIN item ON (itemsite_item_id=item_id) JOIN poitem ON (poitem_itemsite_id=itemsite_id) JOIN pohead ON (poitem_pohead_id=pohead_id) WHERE( (poitem_id=pPoitemid) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='PoItemUpdatedBySo') ); END IF; RETURN pPoitemid; END; $$; ALTER FUNCTION public.changepoitemqty(ppoitemid integer, pqty numeric, pbyso boolean) OWNER TO admin; -- -- Name: changeprdate(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changeprdate(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrid ALIAS FOR $1; pDueDate ALIAS FOR $2; BEGIN UPDATE pr SET pr_duedate=pDueDate WHERE (pr_id=pPrid); RETURN 0; END; $_$; ALTER FUNCTION public.changeprdate(integer, date) OWNER TO admin; -- -- Name: changeprqty(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changeprqty(integer, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrid ALIAS FOR $1; pQty ALIAS FOR $2; BEGIN UPDATE pr SET pr_qtyreq=pQty WHERE (pr_id=pPrid); RETURN TRUE; END; $_$; ALTER FUNCTION public.changeprqty(integer, numeric) OWNER TO admin; -- -- Name: changeprqty(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changeprqty(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pPrid ALIAS FOR $1; pDueDate ALIAS FOR $2; BEGIN UPDATE pr SET pr_duedate=pDueDate WHERE (pr_id=pPrid); RETURN 0; END; $_$; ALTER FUNCTION public.changeprqty(integer, date) OWNER TO admin; -- -- Name: changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSchema ALIAS FOR $1; pTable ALIAS FOR $2; pFkeyCol ALIAS FOR $3; pSourceId ALIAS FOR $4; pBaseSchema ALIAS FOR $5; pBaseTable ALIAS FOR $6; pTargetId ALIAS FOR $7; pTypeCol ALIAS FOR $8; pType ALIAS FOR $9; _purge BOOLEAN := COALESCE($10, FALSE); _counter INTEGER := 0; _coltype TEXT; _pk TEXT[]; BEGIN IF (NOT _purge) THEN EXECUTE 'SELECT typname FROM pg_type JOIN pg_attribute ON (pg_type.oid=atttypid) JOIN pg_class ON (attrelid=pg_class.oid) JOIN pg_namespace ON (relnamespace=pg_namespace.oid) WHERE (relname=' || quote_literal(pTable) || ') AND (nspname=' || quote_literal(pSchema) || ') AND (attname=' || quote_literal(pFkeyCol) || ')' INTO _coltype; _pk := primaryKeyFields(pSchema, pTable); IF (ARRAY_UPPER(_pk, 1) > 1) THEN RAISE EXCEPTION 'Cannot change pseudo-foreign key references in %.% because it has a composite primary key. Try setting the purge option. [xtuple: changepseudofkeypointers, -1, %.%', pSchema, pTable, pSchema, pTable; END IF; EXECUTE 'INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT ' || quote_literal(pSchema) || ', ' || quote_literal(pTable) || ', ' || quote_literal(_pk[1]) || ', ' || quote_ident(_pk[1]) || ', ' || quote_literal(pFkeyCol) || ', ' || quote_ident(pFkeyCol) || ', ' || quote_literal(_coltype) || ', ' || quote_literal(pBaseSchema) || ', ' || quote_literal(pBaseTable) || ', ' || pTargetId || ' FROM ' || quote_ident(pSchema) || '.' || quote_ident(pTable) || ' WHERE (('|| quote_ident(pFkeyCol) || '=' || pSourceId || ') AND ('|| quote_ident(pTypeCol) || '=' || quote_literal(pType) || '));'; END IF; -- actually change the foreign keys to point to the desired base table record EXECUTE 'UPDATE ' || quote_ident(pSchema) || '.' || quote_ident(pTable) || ' SET ' || quote_ident(pFkeyCol) || '=' || pTargetId || ' WHERE ((' || quote_ident(pFkeyCol) || '=' || pSourceId || ') AND (' || quote_ident(pTypeCol) || '=' || quote_literal(pType) || '));'; GET DIAGNOSTICS _counter = ROW_COUNT; RETURN _counter; END; $_$; ALTER FUNCTION public.changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean) OWNER TO admin; -- -- Name: FUNCTION changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean) IS 'Change the data in pSchema.pTable with a pseudo-foreign key relationship to another (unnamed) table. Make pSchema.pTable point to the record with primary key pTargetId instead of the record with primary key pSourceId. pSchema.pTable cannot have a true foreign key relationship because it holds data that can point to any of several tables. The pType value in the pTypeCol column describes which table the data refer to (e.g. "T" may indicate that the current record refers to a "cntct"). If the final arg is TRUE, make a backup copy of the data in the mrgundo table.'; -- -- Name: changewodates(integer, date, date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changewodates(integer, date, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pStartDate ALIAS FOR $2; pDueDate ALIAS FOR $3; changeChildren ALIAS FOR $4; _p RECORD; returnCode INTEGER; _vtemp NUMERIC; BEGIN SELECT wo_status, wo_startdate, itemsite_warehous_id INTO _p FROM wo Inner Join itemsite on wo_itemsite_id=itemsite_id WHERE (wo_id=pWoid); IF (_p.wo_status = 'C') THEN returnCode := 0; ELSIF (_p.wo_status IN ('R','I')) THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_olddate, evntlog_newdate) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', wo_id, itemsite_warehous_id, formatWoNumber(wo_id), wo_duedate, pDueDate FROM evntnot, evnttype, itemsite, item, wo WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (evnttype_name='RWoDueDateRequestChange') AND (wo_id=pWoid) ); returnCode := 0; END IF; -- Reschedule operations if routings enabled IF (fetchMetricBool('Routings')) THEN -- Reschedule wooper IF (fetchMetricBool('UseSiteCalendar')) THEN UPDATE xtmfg.wooper SET wooper_scheduled = calculatenextworkingdate(itemsite_warehous_id,DATE(pStartDate), CAST(calculateworkdays(itemsite_warehous_id, DATE(wo_startdate), DATE(wooper_scheduled)) as INTEGER)) FROM wo JOIN itemsite ON (wo_itemsite_id=itemsite_id) WHERE ( (wooper_wo_id=wo_id) AND (wo_id=pWoid) ); ELSE UPDATE xtmfg.wooper SET wooper_scheduled = (wooper_scheduled::DATE + (pStartDate - wo_startdate)) FROM wo WHERE ( (wooper_wo_id=wo_id) AND (wo_id=pWoid) ); END IF; -- Reschedule any womatl that is linked to wooper items -- and is set to be scheduled with the wooper in question UPDATE womatl SET womatl_duedate=wooper_scheduled FROM xtmfg.wooper WHERE ( (womatl_schedatwooper) AND (womatl_wooper_id=wooper_id) AND (womatl_wo_id=pWoid) ); END IF; -- Reschedule any womatl that is not linked to wooper items UPDATE womatl SET womatl_duedate=pStartDate WHERE ( (NOT womatl_schedatwooper) AND (womatl_wo_id=pWoid) ); -- Reschedule the W/O UPDATE wo SET wo_startdate=pStartDate, wo_duedate=pDueDate WHERE (wo_id=pWoid); -- Do the same for the children IF (changeChildren) THEN SELECT MAX(changeWoDates(wo_id, (pStartDate - itemsite_leadtime), pStartDate, TRUE)) INTO returnCode FROM wo, itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (wo_ordtype='W') AND (wo_ordid=pWoid) ); END IF; IF (returnCode IS NULL) THEN returnCode := 0; END IF; RETURN returnCode; END; $_$; ALTER FUNCTION public.changewodates(integer, date, date, boolean) OWNER TO admin; -- -- Name: changewoproject(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changewoproject(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pPrjid ALIAS FOR $2; changeChildren ALIAS FOR $3; woStatus CHAR(1); _result INTEGER; BEGIN SELECT wo_status INTO woStatus FROM wo WHERE (wo_id=pWoid); UPDATE wo SET wo_prj_id=pPrjid WHERE (wo_id=pWoid); IF (woStatus = 'E' AND changeChildren) THEN _result := ( SELECT MIN(changeWoProject(wo_id, pPrjid, TRUE)) FROM womatl, wo WHERE ((womatl_itemsite_id=wo_itemsite_id) AND (wo_ordtype='W') AND (womatl_wo_id=pWoid) AND (wo_ordid=pWoid)) ); UPDATE pr SET pr_prj_id=pPrjid FROM womatl WHERE ((womatl_wo_id=pWoid) AND (pr_order_type='W') AND (pr_order_id=womatl_id)); ELSE _result = 1; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.changewoproject(integer, integer, boolean) OWNER TO admin; -- -- Name: changewoqty(integer, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION changewoqty(integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pQty ALIAS FOR $2; changeChildren ALIAS FOR $3; _r RECORD; _result INTEGER := 1; BEGIN SELECT wo_qtyord, wo_status, item_fractional INTO _r FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE (wo_id=pWoid); IF (_r.wo_qtyord = pQty) THEN RETURN 0; END IF; IF (NOT _r.wo_status IN ('O','E','R','I')) THEN RETURN 1; END IF; IF (_r.wo_status IN ('R','I')) THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_oldvalue, evntlog_newvalue) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', wo_id, itemsite_warehous_id, formatWoNumber(wo_id), wo_qtyord, pQty FROM evntnot, evnttype, itemsite, item, wo WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (evnttype_name='RWoQtyRequestChange') AND (wo_id=pWoid) ); _result = 0; END IF; UPDATE wo SET wo_qtyord=roundQty(_r.item_fractional, pQty) WHERE (wo_id=pWoid); UPDATE womatl SET womatl_qtyreq=(womatl_qtyfxd + wo_qtyord * womatl_qtyper) * (1 + womatl_scrap) FROM wo, itemsite WHERE ((womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (wo_id=pWoid)); IF (fetchMetricBool('Routings')) THEN UPDATE xtmfg.wooper SET wooper_rntime = CASE WHEN ((booitem_rnqtyper = 0) OR (booitem_invproduomratio = 0)) THEN 0 WHEN (NOT booitem_rnrpt) THEN 0 ELSE ( ( booitem_rntime / booitem_rnqtyper / booitem_invproduomratio ) * wo_qtyord ) END FROM xtmfg.booitem, wo WHERE ((wooper_wo_id=wo_id) AND (wooper_booitem_id=booitem_id) AND (wo_id=pWoid)); END IF; IF (changeChildren) THEN _result := ( SELECT MIN(changeWoQty(wo_id, womatl_qtyreq, TRUE)) FROM womatl, wo WHERE ((womatl_itemsite_id=wo_itemsite_id) AND (wo_ordtype='W') AND (womatl_wo_id=pWoid) AND (wo_ordid=pWoid)) ); END IF; RETURN _result; END; $_$; ALTER FUNCTION public.changewoqty(integer, numeric, boolean) OWNER TO admin; -- -- Name: characteristicstostring(text, integer, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION characteristicstostring(text, integer, text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetId ALIAS FOR $2; pValKeySep ALIAS FOR $3; pPairSep ALIAS FOR $4; _string TEXT := ''; _extra BOOLEAN := false; _r RECORD; BEGIN FOR _r IN SELECT char_name, charass_value FROM charass, char WHERE ((charass_char_id=char_id) AND (charass_target_type=pTargetType) AND (charass_target_id=pTargetId)) LOOP IF(_extra) THEN _string := _string || pPairSep; END IF; _extra := true; _string := _string || _r.char_name || pValKeySep || _r.charass_value; END LOOP; RETURN _string; END; $_$; ALTER FUNCTION public.characteristicstostring(text, integer, text, text) OWNER TO admin; -- -- Name: checkcreditmemositeprivs(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkcreditmemositeprivs(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT cmitem_id FROM cmitem JOIN itemsite ON (itemsite_id=cmitem_itemsite_id) WHERE ( (cmitem_cmhead_id=pCmheadid) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; ALTER FUNCTION public.checkcreditmemositeprivs(integer) OWNER TO admin; -- -- Name: checkdetailformatted(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkdetailformatted(integer, integer) RETURNS SETOF checkdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckheadid ALIAS FOR $1; pMaxLines ALIAS FOR $2; _row checkdata%ROWTYPE; _checkhead RECORD; _checkdetail RECORD; _rowcount INTEGER := 0; _page INTEGER := 1; _docnumber TEXT := ''; _docreference TEXT := ''; _docdate TEXT := ''; _docamount TEXT := ''; _docdiscount TEXT := ''; _docnetamount TEXT := ''; BEGIN -- Check header information SELECT checkhead_number AS checknumber, INITCAP(spellAmount(checkhead_amount, curr_id)) AS checkwords, formatDate(checkhead_checkdate) AS checkdate, formatMoney(checkhead_amount) AS checkamount, curr_symbol AS checkcurrsymbol, curr_abbr AS checkcurrabbr, curr_name AS checkcurrname, CASE WHEN checkhead_recip_type = 'C' THEN (SELECT cust_name FROM custinfo WHERE cust_id=checkhead_recip_id) WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_name FROM taxauth WHERE taxauth_id=checkhead_recip_id) WHEN checkhead_recip_type = 'V' THEN COALESCE((SELECT vendaddr_name FROM vendaddrinfo WHERE((UPPER(vendaddr_code)='REMIT') AND (vendaddr_vend_id=checkhead_recip_id))), (SELECT vend_name FROM vendinfo WHERE(vend_id=checkhead_recip_id))) END AS checkpayto, formatAddr(CASE WHEN checkhead_recip_type = 'C' THEN (SELECT cntct_addr_id FROM cntct, custinfo WHERE((cust_cntct_id=cntct_id) AND (cust_id=checkhead_recip_id))) WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_addr_id FROM taxauth WHERE(taxauth_id=checkhead_recip_id)) WHEN checkhead_recip_type = 'V' THEN COALESCE((SELECT vendaddr_addr_id FROM vendaddrinfo WHERE((UPPER(vendaddr_code)='REMIT') AND (vendaddr_vend_id=checkhead_recip_id))), (SELECT vend_addr_id FROM vendinfo WHERE(vend_id=checkhead_recip_id))) END) AS checkaddress, checkhead_for AS checkmemo INTO _checkhead FROM checkhead, curr_symbol WHERE((checkhead_curr_id = curr_id) AND (checkhead_id=pCheckheadid) ); IF (NOT FOUND) THEN RETURN; END IF; _row.checkdata_page := _page; _row.checkdata_checknumber := _checkhead.checknumber; _row.checkdata_checkwords := _checkhead.checkwords; _row.checkdata_checkdate := _checkhead.checkdate; _row.checkdata_checkamount := _checkhead.checkamount; _row.checkdata_checkcurrsymbol := _checkhead.checkcurrsymbol; _row.checkdata_checkcurrabbr := _checkhead.checkcurrabbr; _row.checkdata_checkcurrname := _checkhead.checkcurrname; _row.checkdata_checkpayto := _checkhead.checkpayto; _row.checkdata_checkaddress := _checkhead.checkaddress; _row.checkdata_checkmemo := _checkhead.checkmemo; -- Check item details FOR _checkdetail IN SELECT --VOUCHER------------- 1 AS ord, 1 AS sequence_value, checkitem_invcnumber, checkitem_ponumber, formatMoney(checkitem_amount) AS docnetamount, 'Invoice#: ' || vohead_invcnumber AS docnumber, formatDate(vohead_docdate) AS docdate, vohead_reference AS docreference, 'Voucher: ' || checkitem_vouchernumber AS vouchernumber, formatMoney(apopen_amount) AS docamount, formatMoney(checkitem_discount) AS docdiscount FROM checkitem, vohead, apopen WHERE ((checkitem_checkhead_id=pCheckheadid) AND (checkitem_vouchernumber = vohead_number) AND (apopen_docnumber = checkitem_vouchernumber) AND (apopen_doctype = 'V')) UNION SELECT --DEBIT MEMO ------------------------- 2 AS ord, 1 AS sequence_value, checkitem_invcnumber, checkitem_ponumber, formatMoney(checkitem_amount) AS f_amount, 'Debit Memo PO#: ' || checkitem_ponumber AS doc_number, '' AS f_docdate, 'Debit Memo: ' || checkitem_vouchernumber AS doc_reference, checkitem_vouchernumber AS vouchernumber, formatMoney(apopen_amount) AS amount, formatMoney(checkitem_discount) AS disc_cred FROM checkitem, apopen WHERE ((checkitem_checkhead_id=pCheckheadid) AND (checkitem_vouchernumber = apopen_docnumber) AND (apopen_doctype = 'D')) UNION SELECT --CREDITs-------------------------- 3 AS ord, 1 AS sequence_value, checkitem_invcnumber, checkitem_ponumber, formatMoney(checkitem_amount) AS f_amount, 'Invoice#: ' || vohead_invcnumber AS doc_number, formatDate(vohead_docdate) AS f_docdate, 'Credit Applied: ' || apapply_source_doctype || ' ' || apapply_source_docnumber AS doc_reference, 'Voucher ' || checkitem_vouchernumber AS vouchernumber, '' AS amount, formatMoney((apapply_amount)) AS disc_cred FROM checkitem, vohead, apapply WHERE ((checkitem_checkhead_id=pCheckheadid) AND (checkitem_vouchernumber = vohead_number) AND (apapply_target_docnumber = checkitem_vouchernumber )) UNION SELECT --NON-VENDOR----------------------- 4 AS ord, 1 AS sequence_value, checkitem_invcnumber, checkitem_ponumber, formatMoney(checkitem_amount) AS f_amount, checkitem_invcnumber AS doc_number, formatDate(checkitem_docdate) AS f_docdate, '' AS doc_reference, '' AS vouchernumber, '' AS amount, '' AS disc_cred FROM checkhead LEFT OUTER JOIN checkitem ON (checkitem_checkhead_id=checkhead_id) WHERE ((checkhead_id=pCheckheadid) AND (checkhead_recip_type != 'V')) LOOP IF (_rowcount = pMaxLines) THEN _row.checkdata_docnumber := _docnumber; _row.checkdata_docreference := _docreference; _row.checkdata_docdate := _docdate; _row.checkdata_docamount := _docamount; _row.checkdata_docdiscount := _docdiscount; _row.checkdata_docnetamount := _docnetamount; RETURN NEXT _row; -- update/reset some variables _rowcount = 0; _page := _page + 1; _docnumber := ''; _docreference := ''; _docdate := ''; _docamount := ''; _docdiscount := ''; _docnetamount := ''; _row.checkdata_page := _page; _row.checkdata_checknumber := _checkhead.checknumber; _row.checkdata_checkwords := 'VOID VOID PAGE '||_page||' OF CHECK #'||_checkhead.checknumber||' VOID VOID'; _row.checkdata_checkdate := 'VOID VOID VOID'; _row.checkdata_checkamount := 'VOID VOID VOID'; --_row.checkdata_checkcurrsymbol := _checkhead.checkcurrsymbol; --_row.checkdata_checkcurrabbr := _checkhead.checkcurrabbr; --_row.checkdata_checkcurrname := _checkhead.checkcurrname; _row.checkdata_checkpayto := 'VOID VOID VOID'; --_row.checkdata_checkaddress := _checkhead.checkaddress; _row.checkdata_checkmemo := 'VOID VOID PAGE '||_page||' OF CHECK #'||_checkhead.checknumber||' VOID VOID'; END IF; _rowcount := _rowcount + 1; _docnumber := _docnumber || _checkdetail.docnumber || E'\n'; _docreference := _docreference || _checkdetail.docreference || E'\n'; _docdate := _docdate || _checkdetail.docdate || E'\n'; _docamount := _docamount || _checkdetail.docamount || E'\n'; _docdiscount := _docdiscount || _checkdetail.docdiscount || E'\n'; _docnetamount := _docnetamount || _checkdetail.docnetamount || E'\n'; END LOOP; _row.checkdata_docnumber := _docnumber; _row.checkdata_docreference := _docreference; _row.checkdata_docdate := _docdate; _row.checkdata_docamount := _docamount; _row.checkdata_docdiscount := _docdiscount; _row.checkdata_docnetamount := _docnetamount; RETURN NEXT _row; RETURN; END; $_$; ALTER FUNCTION public.checkdetailformatted(integer, integer) OWNER TO admin; -- -- Name: checkinvoicesiteprivs(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkinvoicesiteprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT invcitem_id FROM invcitem WHERE ( (invcitem_invchead_id=pInvcheadid) AND (invcitem_warehous_id <> -1) AND (invcitem_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; ALTER FUNCTION public.checkinvoicesiteprivs(integer) OWNER TO admin; -- -- Name: checkpositeprivs(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkpositeprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT poitem_id FROM poitem, itemsite WHERE ( (poitem_pohead_id=pPoheadid) AND (poitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT pohead_warehous_id FROM pohead WHERE ( (pohead_id=pPoheadid) AND (pohead_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; ALTER FUNCTION public.checkpositeprivs(integer) OWNER TO admin; -- -- Name: checkprivilege(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkprivilege(text) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrivilege ALIAS FOR $1; _result TEXT; BEGIN SELECT priv_id INTO _result FROM priv, grppriv, usrgrp WHERE((usrgrp_grp_id=grppriv_grp_id) AND (grppriv_priv_id=priv_id) AND (priv_name=pPrivilege) AND (usrgrp_username=getEffectiveXtUser())); IF (FOUND) THEN RETURN true; END IF; SELECT priv_id INTO _result FROM priv, usrpriv WHERE ((priv_id=usrpriv_priv_id) AND (priv_name=pPrivilege) AND (usrpriv_username=getEffectiveXtUser())); IF (FOUND) THEN RETURN true; ELSE RETURN false; END IF; END; $_$; ALTER FUNCTION public.checkprivilege(text) OWNER TO admin; -- -- Name: checkquotesiteprivs(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkquotesiteprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; BEGIN RETURN checkQuoteSitePrivs(pQuheadid, NULL); END; $_$; ALTER FUNCTION public.checkquotesiteprivs(integer) OWNER TO admin; -- -- Name: checkquotesiteprivs(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkquotesiteprivs(integer, integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pWarehousid ALIAS FOR $2; _result INTEGER := 0; BEGIN -- RAISE NOTICE 'checkQuoteSitePrivs, pQuheadid = %', pQuheadid; -- RAISE NOTICE 'checkQuoteSitePrivs, pWarehousid = %', pWarehousid; IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF ( (NOT fetchUsrPrefBool('selectedSites')) AND (pWarehousid IS NULL) ) THEN RETURN true; END IF; IF (pWarehousid IS NULL) THEN SELECT COALESCE(COUNT(*), 0) INTO _result FROM quitem JOIN itemsite ON (itemsite_id=quitem_itemsite_id) JOIN site() ON (warehous_id=itemsite_warehous_id) WHERE (quitem_quhead_id=pQuheadid); ELSE SELECT COALESCE(COUNT(*), 0) INTO _result FROM quitem JOIN itemsite ON (itemsite_id=quitem_itemsite_id) JOIN site() ON (warehous_id=itemsite_warehous_id) WHERE ( (quitem_quhead_id=pQuheadid) AND (itemsite_warehous_id=pWarehousid) ); END IF; IF (_result > 0) THEN RETURN true; END IF; RETURN false; END; $_$; ALTER FUNCTION public.checkquotesiteprivs(integer, integer) OWNER TO admin; -- -- Name: checkrasiteprivs(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkrasiteprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pRaheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT raitem_id FROM raitem, itemsite WHERE ( (raitem_rahead_id=pRaheadid) AND (raitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT raitem_id FROM raitem, itemsite WHERE ( (raitem_rahead_id=pRaheadid) AND (raitem_coitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; ALTER FUNCTION public.checkrasiteprivs(integer) OWNER TO admin; -- -- Name: checkshipmentsiteprivs(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkshipmentsiteprivs(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT coitem_id FROM shipitem, coitem, itemsite WHERE ( (shipitem_shiphead_id=pShipheadid) AND (coitem_id=shipitem_orderitem_id) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT cohead_warehous_id FROM shipitem, coitem, cohead WHERE ( (shipitem_shiphead_id=pShipheadid) AND (coitem_id=shipitem_orderitem_id) AND (cohead_id=coitem_cohead_id) AND (cohead_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; ALTER FUNCTION public.checkshipmentsiteprivs(integer) OWNER TO admin; -- -- Name: checksositeprivs(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checksositeprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT coitem_id FROM coitem, itemsite WHERE ( (coitem_cohead_id=pSoheadid) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT cohead_warehous_id FROM cohead WHERE ( (cohead_id=pSoheadid) AND (cohead_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; ALTER FUNCTION public.checksositeprivs(integer) OWNER TO admin; -- -- Name: checkvouchersiteprivs(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION checkvouchersiteprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT voitem_id FROM voitem, poitem, itemsite WHERE ( (voitem_vohead_id=pVoheadid) AND (poitem_id=voitem_poitem_id) AND (poitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT pohead_warehous_id FROM vohead, pohead WHERE ( (vohead_id=pVoheadid) AND (pohead_id=vohead_pohead_id) AND (pohead_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; ALTER FUNCTION public.checkvouchersiteprivs(integer) OWNER TO admin; -- -- Name: clearnumberissue(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION clearnumberissue(psequence text, pnumber integer) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE __seqiss seqiss[]; __newiss seqiss[] := ARRAY[]::seqiss[]; _i INTEGER; _result BOOLEAN := FALSE; _interval TEXT := fetchMetricText('NumberIssueResetIntervalDays') || ' day'; _number INTEGER; BEGIN -- get the sequence to update SELECT orderseq_seqiss INTO __seqiss FROM orderseq WHERE (orderseq_name=psequence); IF (NOT FOUND) THEN RAISE EXCEPTION 'Invalid orderseq_name %', psequence; END IF; IF(ARRAY_LENGTH(COALESCE(__seqiss,__newiss),1) IS NULL) THEN RETURN FALSE; END IF; -- build a new array sans the number we are releasing FOR _i IN 1..ARRAY_LENGTH(__seqiss,1) LOOP IF((__seqiss[_i]).seqiss_number = pnumber) THEN _result = TRUE; -- don't bother re-adding stale numbers ELSIF (now() - _interval::INTERVAL > (__seqiss[_i]).seqiss_time) THEN IF (_number IS NULL) THEN _number := (__seqiss[_i]).seqiss_number; ELSE _number := LEAST((__seqiss[_i]).seqiss_number, _number); END IF; ELSE __newiss := __newiss || __seqiss[_i]; END IF; END LOOP; -- update the order sequence with the result UPDATE orderseq SET orderseq_seqiss = __newiss WHERE (orderseq_name=psequence); -- reset to any cleared stale number IF(_number IS NOT NULL) THEN UPDATE orderseq SET orderseq_number = _number WHERE (orderseq_name=psequence); END IF; RETURN _result; END; $$; ALTER FUNCTION public.clearnumberissue(psequence text, pnumber integer) OWNER TO admin; -- -- Name: clearnumberissue(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION clearnumberissue(psequence text, pnumber text) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _castpnumber INTEGER; BEGIN -- for now, order numbers in the database are text but usually -- string representations of integers. allow for the occasional non-integer. BEGIN _castpnumber := CAST(pnumber AS INTEGER); EXCEPTION WHEN cannot_coerce OR invalid_text_representation THEN RAISE DEBUG 'clearNumberIssue(%, %) received an unexpected pnumber', psequence, pnumber; RETURN FALSE; END; RETURN clearNumberIssue(psequence, _castpnumber); END; $$; ALTER FUNCTION public.clearnumberissue(psequence text, pnumber text) OWNER TO admin; -- -- Name: clearpayment(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION clearpayment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApselectid ALIAS FOR $1; BEGIN DELETE FROM apselect WHERE (apselect_id=pApselectid); RETURN 1; END; $_$; ALTER FUNCTION public.clearpayment(integer) OWNER TO admin; -- -- Name: closeaccountingperiod(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION closeaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _r RECORD; _nextPeriodid INTEGER; _trialbalid INTEGER; _ending NUMERIC; _currYear INTEGER; _nextYear INTEGER; BEGIN -- Bypass error checking is this the the initial period IF ( NOT ( SELECT period_initial FROM period WHERE (period_id=pPeriodid) ) ) THEN -- Check to make use that the period is not already closed IF ( ( SELECT period_closed FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Make sure that the day before this period belongs to another period SELECT prev.period_id AS periodid, prev.period_closed AS closed INTO _r FROM period AS prev, period AS curr WHERE ( (prev.period_end = (curr.period_start - 1)) AND (curr.period_id=pPeriodid) ); IF (NOT FOUND) THEN RETURN -2; END IF; -- Make sure that the previous period is closed IF (NOT _r.closed) THEN RETURN -3; END IF; END IF; -- Make sure that there the next period is defined SELECT next.period_id INTO _nextPeriodid FROM period AS next, period AS curr WHERE ( (next.period_start = (curr.period_end + 1)) AND (curr.period_id=pPeriodid) ); IF (NOT FOUND) THEN RETURN -4; END IF; -- Make sure that the user is not trying to prematurely close the Period IF ( ( SELECT (period_end >= CURRENT_DATE) FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -5; END IF; SELECT yearperiod_id INTO _currYear FROM yearperiod, period WHERE ((period_end BETWEEN yearperiod_start and yearperiod_end) AND (period_id=pPeriodid)); IF (NOT FOUND) THEN _currYear := -1; END IF; SELECT yearperiod_id INTO _nextYear FROM yearperiod, period WHERE ((period_end BETWEEN yearperiod_start and yearperiod_end) AND (period_id=_nextPeriodid)); IF (NOT FOUND) THEN RETURN -6; END IF; -- Walk through the entire COA, calculating the ending balance and pushing -- it to the beginning balance for the next period FOR _r IN SELECT accnt_id, accnt_type IN ('E', 'R') AS revexp, trialbal_id, trialbal_beginning, trialbal_credits, trialbal_debits FROM accnt LEFT OUTER JOIN trialbal ON ( (trialbal_accnt_id=accnt_id) AND (trialbal_period_id=pPeriodid) ) ORDER BY accnt_id LOOP IF (_r.trialbal_id IS NULL) THEN _ending = 0; INSERT INTO trialbal ( trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_dirty, trialbal_credits, trialbal_debits ) VALUES ( pPeriodid, _r.accnt_id, 0, 0, FALSE, 0, 0 ); ELSE _ending = (_r.trialbal_beginning - _r.trialbal_debits + _r.trialbal_credits); UPDATE trialbal SET trialbal_ending=_ending, trialbal_dirty = FALSE WHERE (trialbal_id=_r.trialbal_id); PERFORM forwardUpdateTrialBalance(_r.trialbal_id); END IF; IF (_r.revexp AND _currYear != _nextYear) THEN _ending := 0; END IF; -- Find the trialbal record for the next period SELECT trialbal_id INTO _trialbalid FROM trialbal WHERE ( (trialbal_period_id=_nextPeriodid) AND (trialbal_accnt_id=_r.accnt_id) ); IF (FOUND) THEN UPDATE trialbal SET trialbal_beginning = (_ending + trialbal_yearend), trialbal_ending = (_ending + trialbal_yearend - trialbal_debits + trialbal_credits) WHERE (trialbal_id=_trialbalid); ELSE INSERT INTO trialbal ( trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_dirty, trialbal_credits, trialbal_debits ) VALUES(_nextPeriodid, _r.accnt_id, _ending, _ending, TRUE, 0, 0 ); END IF; END LOOP; -- Set the period_closed flag UPDATE period SET period_closed=TRUE WHERE (period_id=pPeriodid); RETURN pPeriodid; END; $_$; ALTER FUNCTION public.closeaccountingperiod(integer) OWNER TO admin; -- -- Name: closeaccountingyearperiod(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION closeaccountingyearperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pYearPeriodid ALIAS FOR $1; _result INTEGER; BEGIN -- Check to make sure that the yearperiod is not already closed IF ( ( SELECT yearperiod_closed FROM yearperiod WHERE (yearperiod_id=pYearPeriodid) ) ) THEN RETURN -1; END IF; IF ( ( SELECT (count(period_id) > 0) FROM period WHERE ((period_yearperiod_id=pYearPeriodid) AND (NOT period_closed)) ) ) THEN RETURN -10; END IF; IF ( ( SELECT (count(yearperiod_id) > 0) FROM yearperiod WHERE ((yearperiod_end< ( SELECT yearperiod_end FROM yearperiod WHERE (yearperiod_id=pYearPeriodId)) ) AND (NOT yearperiod_closed)) ) ) THEN RETURN -11; END IF; -- Should we check for a previous yearperiod existing already ? -- If so then we should return -2 if one does not. -- If we did the previous yearperiod we should check to make sure that -- it is also closed. Returning -3 if it is not. -- Make sure that the user is not trying to prematurely close the YearPeriod IF ( ( SELECT (yearperiod_end >= CURRENT_DATE) FROM yearperiod WHERE (yearperiod_id=pYearPeriodid) ) ) THEN RETURN -5; END IF; -- Update the year end Retained Earnings SELECT updateRetainedEarnings(pYearPeriodid) INTO _result; IF (_result < 0) THEN RETURN _result; END IF; UPDATE yearperiod SET yearperiod_closed = TRUE WHERE yearperiod_id = pYearPeriodid; RETURN 0; END; $_$; ALTER FUNCTION public.closeaccountingyearperiod(integer) OWNER TO admin; -- -- Name: closepo(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION closepo(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; BEGIN UPDATE poitem SET poitem_status='C' WHERE (poitem_pohead_id=pPoheadid); -- _poitemTrigger will close pohead when the last poitem is closed -- UPDATE pohead -- SET pohead_status='C' -- WHERE (pohead_id=pPoheadid); RETURN 1; END; $_$; ALTER FUNCTION public.closepo(integer) OWNER TO admin; -- -- Name: closewo(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION closewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pPostMaterialVariances ALIAS FOR $2; BEGIN RETURN closeWo(pWoid, pPostMaterialVariances, CURRENT_DATE); END; $_$; ALTER FUNCTION public.closewo(integer, boolean) OWNER TO admin; -- -- Name: closewo(integer, boolean, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION closewo(integer, boolean, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pPostMaterialVariances ALIAS FOR $2; pTransDate ALIAS FOR $3; _woNumber TEXT; _check CHAR; _itemlocSeries INTEGER := 0; BEGIN --If this is item type Job then we cannot close here SELECT itemsite_costmethod INTO _check FROM wo,itemsite WHERE ((wo_id=pWoid) AND (wo_itemsite_id=itemsite_id) AND (itemsite_costmethod = 'J')); IF (FOUND) THEN RAISE EXCEPTION 'Work orders for Job items are closed when all quantities are shipped'; END IF; SELECT formatWoNumber(pWoid) INTO _woNumber; -- If there are any tools issued on this job then we cannot close here IF ( SELECT (count(*) > 0) FROM womatl JOIN itemsite ON (womatl_itemsite_id=itemsite_id) JOIN item ON ((itemsite_item_id=item_id) AND (item_type='T')) WHERE ((womatl_wo_id=pWoid) AND (womatl_qtyiss > 0)) ) THEN RAISE EXCEPTION 'All Tools must be returned before the W/O can be closed'; END IF; -- Distribute any remaining wo_wipvalue to G/L - debit Inventory Cost, credit WIP PERFORM insertGLTransaction( 'W/O', 'WO', _woNumber, ('Manufacturing Inventory Cost Variance for ' || item_number), getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), getPrjAccntId(wo_prj_id, costcat_invcost_accnt_id), -1, COALESCE(wo_wipvalue, 0), pTransDate ) FROM wo, itemsite, item, costcat WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (wo_id=pWoid) ); -- Distribute any remaining wo_brdvalue to G/L - debit Inventory Cost, credit WIP PERFORM insertGLTransaction( 'W/O', 'WO', _woNumber, ('Breeder Inventory Cost Variance for ' || item_number), getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), CASE WHEN(itemsite_costmethod='A') THEN costcat_asset_accnt_id ELSE getPrjAccntId(wo_prj_id, costcat_invcost_accnt_id) END, -1, COALESCE(wo_brdvalue, 0), pTransDate ) FROM wo, itemsite, item, costcat WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (wo_id=pWoid) ); -- Don't bother with posting variances if the qtyrcv is 0 as -- they are meaningless. IF ( ( SELECT wo_qtyrcv FROM wo WHERE (wo_id=pWoid) ) > 0 ) THEN IF (pPostMaterialVariances) THEN -- Post womatl variances INSERT INTO womatlvar ( womatlvar_number, womatlvar_subnumber, womatlvar_posted, womatlvar_parent_itemsite_id, womatlvar_component_itemsite_id, womatlvar_qtyord, womatlvar_qtyrcv, womatlvar_qtyiss, womatlvar_qtyfxd, womatlvar_qtyper, womatlvar_scrap, womatlvar_wipscrap, womatlvar_bomitem_id, womatlvar_notes, womatlvar_ref ) SELECT wo_number, wo_subnumber, pTransDate, wo_itemsite_id, womatl_itemsite_id, wo_qtyord, wo_qtyrcv, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyiss), itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyfxd), itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyper), womatl_scrap, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtywipscrap), womatl_bomitem_id, womatl_notes, womatl_ref FROM wo, womatl, itemsite, item WHERE ((womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_type <> 'T') AND (wo_id=pWoid)); END IF; END IF; -- Delete any P/R's created for this W/O PERFORM deletePr('W', womatl_id) FROM womatl WHERE (womatl_wo_id=pWoid); UPDATE wo SET wo_wipvalue = 0, wo_brdvalue=0, wo_status='C' WHERE (wo_id=pWoid); RETURN 1; END; $_$; ALTER FUNCTION public.closewo(integer, boolean, date) OWNER TO admin; -- -- Name: cntct; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cntct ( cntct_id integer NOT NULL, cntct_crmacct_id integer, cntct_addr_id integer, cntct_first_name text, cntct_last_name text, cntct_honorific text, cntct_initials text, cntct_active boolean DEFAULT true, cntct_phone text, cntct_phone2 text, cntct_fax text, cntct_email text, cntct_webaddr text, cntct_notes text, cntct_title text, cntct_number text NOT NULL, cntct_middle text, cntct_suffix text, cntct_owner_username text, cntct_name text ); ALTER TABLE public.cntct OWNER TO admin; -- -- Name: TABLE cntct; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cntct IS 'Contact - information on how to reach a living person'; -- -- Name: cntct(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cntct() RETURNS SETOF cntct LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row cntct%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllContacts','ViewAllContacts','MaintainPersonalContacts','ViewPersonalContacts') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM cntct LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM cntct WHERE cntct_owner_username = getEffectiveXtUser() LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; ALTER FUNCTION public.cntct() OWNER TO admin; -- -- Name: FUNCTION cntct(); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION cntct() IS 'A table function that returns Contact results according to privilege settings.'; -- -- Name: cntctdups(text, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cntctdups(text, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS SETOF cntctdup LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSearchText ALIAS FOR $1; pSearchContactName ALIAS FOR $2; pSearchPhone ALIAS FOR $3; pSearchEmail ALIAS FOR $4; pSearchNumber ALIAS FOR $5; pSearchName ALIAS FOR $6; pShowInactive ALIAS FOR $7; pIgnoreBlanks ALIAS FOR $8; pIndentedDups ALIAS FOR $9; pCheckHnfc ALIAS FOR $10; pCheckFirst ALIAS FOR $11; pCheckMiddle ALIAS FOR $12; pCheckLast ALIAS FOR $13; pCheckSuffix ALIAS FOR $14; pCheckPhone ALIAS FOR $15; pCheckEmail ALIAS FOR $16; _cntct cntctdup%ROWTYPE; _cntctdup cntctdup%ROWTYPE; _rec RECORD; _operator TEXT := ''; _clause TEXT; _qry TEXT := ''; _return BOOLEAN := true; _text TEXT; _first BOOLEAN := true; BEGIN -- Validate IF (pIndentedDups AND NOT pCheckHnfc AND NOT pCheckFirst AND NOT pCheckMiddle AND NOT pCheckLast AND NOT pCheckSuffix AND NOT pCheckEmail AND NOT pCheckPhone) THEN RETURN; END IF; _text = quote_literal(pSearchText); IF (pIndentedDups) THEN _qry := 'SELECT -1 AS cntct_id, -1 AS cntct_crmacct_id, -1 AS cntct_addr_id,'; IF (NOT pCheckFirst) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_first_name,'; IF (NOT pCheckLast) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_last_name,'; IF (NOT pCheckHnfc) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_honorific,'; _qry := _qry || ' '''' AS cntct_initials,'; _qry := _qry || ' NULL AS cntct_active,'; IF (NOT pCheckPhone) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_phone,'; IF (NOT pCheckPhone) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_phone2,'; _qry := _qry || ' '''' AS cntct_fax,'; IF (NOT pCheckEmail) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_email,'; _qry := _qry || ' '''' AS cntct_webaddr,'; _qry := _qry || ' '''' AS cntct_notes,'; _qry := _qry || ' '''' AS cntct_title,'; _qry := _qry || ' '''' AS cntct_number,'; IF (NOT pCheckMiddle) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_middle,'; IF (NOT pCheckSuffix) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_suffix,'; _qry := _qry || ' '''' AS cntct_owner_username,'; _qry := _qry || ' '''' AS cntct_name,'; _qry := _qry || ' '''' AS crmacct_number, '; _qry := _qry || ' '''' AS crmacct_name, '; _qry := _qry || ' NULL AS addr_id, NULL AS addr_active, '''' AS addr_line1, '''' AS addr_line2, '''' AS addr_line3, '''' AS addr_city, '''' AS addr_state, '''' AS addr_postalcode, '''' AS addr_country, '''' AS addr_notes, '''' AS addr_number, cntctdup_level FROM ('; END IF; _clause := 'SELECT cntct_id, cntct_crmacct_id, cntct_addr_id, UPPER(cntct_first_name) AS cntct_first_name, UPPER(cntct_last_name) AS cntct_last_name, UPPER(cntct_honorific) AS cntct_honorific, cntct_initials, cntct_active, cntct_phone, cntct_phone2, cntct_fax, UPPER(cntct_email) AS cntct_email, cntct_webaddr, cntct_notes, cntct_title, cntct_number, UPPER(cntct_middle) AS cntct_middle, UPPER(cntct_suffix) AS cntct_suffix, cntct_owner_username, cntct_name, crmacct_number, crmacct_name, addr.*, 0 AS cntctdup_level FROM cntct() LEFT OUTER JOIN crmacct ON (cntct_crmacct_id=crmacct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE '; IF (NOT pIndentedDups) THEN WHILE position('UPPER' in _clause) > 0 LOOP _clause := regexp_replace(_clause, 'UPPER', ''); END LOOP; END IF; _qry := _qry || _clause; IF (NOT pShowInactive) THEN _qry := _qry || ' cntct_active AND '; END IF; IF (pIgnoreBlanks) THEN _qry := _qry || ' (COALESCE(LENGTH(cntct_first_name || cntct_last_name),0) > 0) AND '; END IF; _qry := _qry || '(false '; IF (pSearchNumber) THEN _qry := _qry || ' OR (crmacct_number ~* ' || quote_literal(pSearchText) || ') '; END IF; IF (pSearchName) THEN _qry := _qry || ' OR (crmacct_name ~* ' || quote_literal(pSearchText) || ') '; END IF; IF (pSearchContactName) THEN _qry := _qry || ' OR (cntct_first_name || '' '' || cntct_last_name ~* ' || quote_literal(pSearchText) || ') '; END IF; IF (pSearchPhone) THEN _qry := _qry || ' OR (cntct_phone || '' '' || cntct_phone2 || '' '' || cntct_fax ~* ' || quote_literal(pSearchText) || ') '; END IF; IF (pSearchEmail) THEN _qry := _qry || ' OR (cntct_email ~* ' || quote_literal(pSearchText) || ') '; END IF; _qry := _qry || ' ) '; IF (pIndentedDups) THEN _qry := _qry || ') data'; _clause := ' GROUP BY cntctdup_level'; IF (pCheckHnfc) THEN _clause := _clause || ',cntct_honorific'; END IF; IF (pCheckFirst) THEN _clause := _clause || ',cntct_first_name'; END IF; IF (pCheckMiddle) THEN _clause := _clause || ',cntct_middle'; END IF; IF (pCheckLast) THEN _clause := _clause || ',cntct_last_name'; END IF; IF (pCheckSuffix) THEN _clause := _clause || ',cntct_suffix'; END IF; IF (pCheckEmail) THEN _clause := _clause || ',cntct_email'; END IF; IF (pCheckPhone) THEN _clause := _clause || ',cntct_phone'; _clause := _clause || ',cntct_phone2'; END IF; _qry := _qry || _clause; _clause := ' HAVING('; IF (pCheckHnfc) THEN _clause := _clause || 'OR COUNT(cntct_honorific) > 1 '; END IF; IF (pCheckFirst) THEN _clause := _clause || 'OR COUNT(cntct_first_name) > 1 '; END IF; IF (pCheckMiddle) THEN _clause := _clause || 'OR COUNT(cntct_middle) > 1 '; END IF; IF (pCheckLast) THEN _clause := _clause || 'OR COUNT(cntct_last_name) > 1 '; END IF; IF (pCheckSuffix) THEN _clause := _clause || 'OR COUNT(cntct_suffix) > 1 '; END IF; IF (pCheckEmail) THEN _clause := _clause || 'OR COUNT(cntct_email) > 1 '; END IF; IF (pCheckPhone) THEN _clause := _clause || 'OR (COUNT(cntct_phone) > 1 AND LENGTH(cntct_phone) > 0) '; _clause := _clause || 'OR (COUNT(cntct_phone2) > 1 AND LENGTH(cntct_phone2) > 0) '; END IF; _clause := _clause || ') '; _clause := overlay(_clause placing '' from 9 for 2); IF (pCheckHnfc) THEN _clause := _clause || 'AND LENGTH(cntct_honorific) > 0 '; END IF; IF (pCheckFirst) THEN _clause := _clause || 'AND LENGTH(cntct_first_name) > 0 '; END IF; IF (pCheckMiddle) THEN _clause := _clause || 'AND LENGTH(cntct_middle) > 0 '; END IF; IF (pCheckLast) THEN _clause := _clause || 'AND LENGTH(cntct_last_name) > 0 '; END IF; IF (pCheckSuffix) THEN _clause := _clause || 'AND LENGTH(cntct_suffix) > 0 '; END IF; IF (pCheckEmail) THEN _clause := _clause || 'AND LENGTH(cntct_email) > 0 '; END IF; _qry := _qry || _clause; END IF; _qry := _qry || ' ORDER BY cntct_last_name, cntct_first_name;'; -- raise exception '%',_qry; FOR _cntct IN EXECUTE _qry LOOP RETURN NEXT _cntct; -- If duplicates, get duplicates IF (pIndentedDups) THEN _qry := 'SELECT cntct.*, crmacct_number, crmacct_name, addr.*, 1 AS cntctdup_level FROM cntct() LEFT OUTER JOIN crmacct ON (cntct_crmacct_id=crmacct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE (true) '; IF (pCheckHnfc) THEN _qry := _qry || ' AND (UPPER(cntct_honorific)=' || quote_literal(_cntct.cntct_honorific) || ')'; END IF; IF (pCheckFirst) THEN _qry := _qry || ' AND (UPPER(cntct_first_name)=' || quote_literal(_cntct.cntct_first_name) || ')'; END IF; IF (pCheckMiddle) THEN _qry := _qry || ' AND (UPPER(cntct_middle)=' || quote_literal(_cntct.cntct_middle) || ')'; END IF; IF (pCheckLast) THEN _qry := _qry || ' AND (UPPER(cntct_last_name)=' || quote_literal(_cntct.cntct_last_name) || ')'; END IF; IF (pCheckSuffix) THEN _qry := _qry || ' AND (UPPER(cntct_suffix)=' || quote_literal(_cntct.cntct_suffix) || ')'; END IF; IF (pCheckPhone) THEN _qry := _qry || ' AND (cntct_phone=' || quote_literal(_cntct.cntct_phone) || ')'; END IF; IF (pCheckEmail) THEN _qry := _qry || ' AND (UPPER(cntct_email)=' || quote_literal(_cntct.cntct_email) || ')'; END IF; -- raise exception '%',_qry; FOR _cntctdup IN EXECUTE _qry LOOP RETURN NEXT _cntctdup; END LOOP; END IF; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.cntctdups(text, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: cntctmerge(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cntctmerge(integer, integer, boolean) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceCntctId ALIAS FOR $1; pTargetCntctId ALIAS FOR $2; pPurge ALIAS FOR $3; _fk RECORD; _pk RECORD; _sel RECORD; _seq INTEGER; _col TEXT; _pkcol TEXT; _qry TEXT; _multi BOOLEAN; BEGIN -- Validate IF (pSourceCntctId IS NULL) THEN RAISE EXCEPTION 'Source contact id can not be null'; ELSIF (pTargetCntctId IS NULL) THEN RAISE EXCEPTION 'Target contact id can not be null'; ELSIF (pPurge IS NULL) THEN RAISE EXCEPTION 'Purge flag can not be null'; END IF; -- Determine where this contact is used by analyzing foreign key linkages and update each FOR _fk IN SELECT pg_namespace.nspname AS schemaname, con.relname AS tablename, conkey AS seq, conrelid AS class_id FROM pg_constraint, pg_class f, pg_class con, pg_namespace WHERE confrelid=f.oid AND conrelid=con.oid AND f.relname = 'cntct' AND con.relnamespace=pg_namespace.oid AND con.relname NOT IN ('cntctsel', 'cntctmrgd', 'mrghist','trgthist') LOOP -- Validate IF (ARRAY_UPPER(_fk.seq,1) > 1) THEN RAISE EXCEPTION 'Updates to tables where the contact is one of multiple foreign key columns is not supported. Error on Table: %', pg_namespace.nspname || '.' || con.relname; END IF; _seq := _fk.seq[1]; -- Get the specific column name SELECT attname INTO _col FROM pg_attribute, pg_class WHERE ((attrelid=pg_class.oid) AND (pg_class.oid=_fk.class_id) AND (attnum=_seq)); IF (NOT pPurge) THEN -- Cache what we're going to do so we can restore if need be. -- Start by determining the primary key column for this table. _multi := false; _qry := 'SELECT pg_attribute.attname AS key FROM pg_attribute, pg_class WHERE pg_class.relnamespace = ( SELECT oid FROM pg_namespace WHERE pg_namespace.nspname = ''' || _fk.schemaname || ''') AND pg_class.oid IN ( SELECT indexrelid FROM pg_index WHERE indisprimary = true AND indrelid IN ( SELECT oid FROM pg_class WHERE lower(relname) = ''' || _fk.tablename || ''')) AND pg_attribute.attrelid = pg_class.oid AND pg_attribute.attisdropped = false ORDER BY pg_attribute.attnum;'; FOR _pk IN EXECUTE _qry LOOP IF (_multi) THEN RAISE EXCEPTION 'Reference tables with composite primary keys not supported. Try the merge and purge option.'; END IF; _pkcol := _pk.key; _multi := true; END LOOP; -- Gather and store the history _qry := 'INSERT INTO mrghist SELECT ' || pSourceCntctId || ', ''' || _fk.schemaname || '.' || _fk.tablename || ''', ''' || _pkcol || ''', ' || _pkcol || ', ''' || _col || ''' FROM ' || _fk.schemaname || '.' || _fk.tablename || ' WHERE (' || _col || '=' || pSourceCntctId || ');'; -- raise exception '%',_qry; EXECUTE _qry; END IF; -- Merge references _qry := 'UPDATE ' || _fk.schemaname || '.' || _fk.tablename || ' SET ' || _col || '=' || pTargetCntctId || ' WHERE (' || _col || '=' || pSourceCntctId || ');'; EXECUTE _qry; END LOOP; -- Merge cases with no foreign key IF (NOT pPurge) THEN INSERT INTO mrghist SELECT pSourceCntctId, 'comment', 'comment_id', comment_id, 'comment_source_id' FROM comment WHERE ((comment_source_id= pSourceCntctId) AND (comment_source='T')); INSERT INTO mrghist SELECT pSourceCntctId, 'docass', 'docass_id', docass_id, 'docass_source_id' FROM docass WHERE ((docass_source_id= pSourceCntctId) AND (docass_source_type='T')); INSERT INTO mrghist SELECT pSourceCntctId, 'docass', 'docass_id', docass_id, 'docass_target_id' FROM docass WHERE ((docass_target_id= pSourceCntctId) AND (docass_target_type='T')); INSERT INTO mrghist SELECT pSourceCntctId, 'vendinfo', 'vend_id', vend_id, 'vend_cntct1_id' FROM vendinfo WHERE (vend_cntct1_id=pSourceCntctId); INSERT INTO mrghist SELECT pSourceCntctId, 'vendinfo', 'vend_id', vend_id, 'vend_cntct2_id' FROM vendinfo WHERE (vend_cntct2_id=pSourceCntctId); IF (fetchMetricBool('EnableBatchManager') AND packageIsEnabled('xtbatch')) THEN INSERT INTO mrghist SELECT pSourceCntctId, 'xtbatch.emlassc', 'emlassc_id', emlassc_id, 'emlassc_assc_id' FROM xtbatch.emlassc WHERE ((emlassc_assc_id= pSourceCntctId) AND (emlassc_type='T')); END IF; END IF; UPDATE comment SET comment_source_id = pTargetCntctId WHERE ((comment_source = 'T') AND (comment_source_id = pSourceCntctId)); UPDATE docass SET docass_source_id = pTargetCntctId WHERE ((docass_source_type = 'T') AND (docass_source_id = pSourceCntctId)); UPDATE docass SET docass_target_id = pTargetCntctId WHERE ((docass_target_type = 'T') AND (docass_target_id = pSourceCntctId)); UPDATE vendinfo SET vend_cntct1_id = pTargetCntctId WHERE (vend_cntct1_id = pSourceCntctId); UPDATE vendinfo SET vend_cntct2_id = pTargetCntctId WHERE (vend_cntct2_id = pSourceCntctId); IF (fetchMetricBool('EnableBatchManager') AND packageIsEnabled('xtbatch')) THEN UPDATE xtbatch.emlassc SET emlassc_assc_id = pTargetCntctId WHERE ((emlassc_type = 'T') AND (emlassc_assc_id = pSourceCntctId)); END IF; IF (NOT pPurge) THEN -- Record that this has been merged if not already IF (SELECT (COUNT(cntctmrgd_cntct_id) = 0) FROM cntctmrgd WHERE (cntctmrgd_cntct_id=pSourceCntctId)) THEN INSERT INTO cntctmrgd VALUES (pSourceCntctId,false); END IF; END IF; -- Merge field detail to target SELECT * INTO _sel FROM cntctsel JOIN cntct ON (cntctsel_cntct_id=cntct_id) WHERE (cntctsel_cntct_id=pSourceCntctId); IF (FOUND) THEN IF (_sel.cntctsel_mrg_crmacct_id) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_crmacct_id', cntct_crmacct_id::text || '::integer' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_crmacct_id=_sel.cntct_crmacct_id WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_addr_id) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_addr_id', cntct_addr_id::text || '::integer' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_addr_id=_sel.cntct_addr_id WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_first_name) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_first_name', '''' || cntct_first_name || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_first_name=_sel.cntct_first_name WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_last_name) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_last_name', '''' || cntct_last_name || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_last_name=_sel.cntct_last_name WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_honorific) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_honorific', '''' || cntct_honorific || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_honorific=_sel.cntct_honorific WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_initials) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_initials', '''' || cntct_initials || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_initials=_sel.cntct_initials WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_phone) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_phone', '''' || cntct_phone || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_phone=_sel.cntct_phone WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_phone2) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_phone2', '''' || cntct_phone2 || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_phone2=_sel.cntct_phone2 WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_fax) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_fax', '''' || cntct_fax || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_fax=_sel.cntct_fax WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_email) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_email', '''' || cntct_email || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_email=_sel.cntct_email WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_webaddr) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_webaddr', '''' || cntct_webaddr || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_webaddr=_sel.cntct_webaddr WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_notes) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_notes', '''' || cntct_notes || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_notes=cntct_notes || ' ' || _sel.cntct_notes WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_title) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_title', '''' || cntct_title || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_title=_sel.cntct_title WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_middle) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_middle', '''' || cntct_middle || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_middle=_sel.cntct_middle WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_suffix) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_suffix', '''' || cntct_suffix || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_suffix=_sel.cntct_suffix WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_owner_username) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_owner_username', '''' || cntct_owner_username || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_owner_username=_sel.cntct_owner_username WHERE (cntct_id=pTargetCntctId); END IF; ELSE RAISE EXCEPTION 'Source Contact not Found'; END IF; -- Disposition source contact IF (pPurge) THEN DELETE FROM cntct WHERE cntct_id = pSourceCntctId; END IF; -- Deactivate contact UPDATE cntct SET cntct_active = false WHERE (cntct_id=pSourceCntctId); -- Clean up DELETE FROM cntctsel WHERE (cntctsel_cntct_id=pSourceCntctId); RETURN true; END; $_$; ALTER FUNCTION public.cntctmerge(integer, integer, boolean) OWNER TO admin; -- -- Name: cntctrestore(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cntctrestore(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; _r RECORD; _qry TEXT; BEGIN -- Validate SELECT * INTO _r FROM cntctmrgd WHERE (cntctmrgd_cntct_id=pCntctId); IF (NOT FOUND) THEN RETURN false; END IF; -- Gather the list of affected records FOR _r IN SELECT * FROM mrghist WHERE (mrghist_cntct_id=pCntctId) LOOP -- Restore the old references _qry := 'UPDATE ' || _r.mrghist_table || ' SET ' || _r.mrghist_cntct_col || '=' || pCntctId || ' WHERE (' || _r.mrghist_pkey_col || '=' || _r.mrghist_pkey_id || ');'; EXECUTE _qry; END LOOP; -- Gather the list of affected fields FOR _r IN SELECT * FROM trgthist WHERE (trgthist_src_cntct_id=pCntctId) LOOP -- Restore the old values _qry := 'UPDATE cntct SET ' || _r.trgthist_col || '=' || _r.trgthist_value || ' WHERE (cntct_id=' || _r.trgthist_trgt_cntct_id || ');'; EXECUTE _qry; END LOOP; -- Clean up UPDATE cntct SET cntct_active=true WHERE (cntct_id=pCntctId); DELETE FROM mrghist WHERE (mrghist_cntct_id=pCntctId); DELETE FROM trgthist WHERE (trgthist_src_cntct_id=pCntctId); DELETE FROM cntctmrgd WHERE (cntctmrgd_cntct_id=pCntctId); RETURN true; END; $_$; ALTER FUNCTION public.cntctrestore(integer) OWNER TO admin; -- -- Name: cntctselect(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cntctselect(integer, boolean) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; pTarget ALIAS FOR $2; BEGIN -- If target, delete any other targets IF (pTarget) THEN DELETE FROM cntctsel WHERE cntctsel_target; END IF; -- Delete any previous selection of this contact DELETE FROM cntctsel WHERE cntctsel_cntct_id=pCntctId; -- Add this contact in appropriate selection state INSERT INTO cntctsel VALUES (pCntctId,pTarget); RETURN true; END; $_$; ALTER FUNCTION public.cntctselect(integer, boolean) OWNER TO admin; -- -- Name: cntctselectcol(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cntctselectcol(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; pColNumber ALIAS FOR $2; BEGIN IF (pColNumber = 2 OR pColNumber = 3) THEN UPDATE cntctsel SET cntctsel_mrg_crmacct_id=false WHERE (cntctsel_mrg_crmacct_id AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_crmacct_id=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 4) THEN UPDATE cntctsel SET cntctsel_mrg_honorific=false WHERE (cntctsel_mrg_honorific AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_honorific=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 5) THEN UPDATE cntctsel SET cntctsel_mrg_first_name=false WHERE (cntctsel_mrg_first_name AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_first_name=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 6) THEN UPDATE cntctsel SET cntctsel_mrg_middle=false WHERE (cntctsel_mrg_middle AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_middle=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 7) THEN UPDATE cntctsel SET cntctsel_mrg_last_name=false WHERE (cntctsel_mrg_last_name AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_last_name=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 8) THEN UPDATE cntctsel SET cntctsel_mrg_suffix=false WHERE (cntctsel_mrg_suffix AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_suffix=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 9) THEN UPDATE cntctsel SET cntctsel_mrg_initials=false WHERE (cntctsel_mrg_initials AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_initials=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 10) THEN UPDATE cntctsel SET cntctsel_mrg_phone=false WHERE (cntctsel_mrg_phone AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_phone=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 11) THEN UPDATE cntctsel SET cntctsel_mrg_phone2=false WHERE (cntctsel_mrg_phone2 AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_phone2=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 12) THEN UPDATE cntctsel SET cntctsel_mrg_fax=false WHERE (cntctsel_mrg_fax AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_fax=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 13) THEN UPDATE cntctsel SET cntctsel_mrg_email=false WHERE (cntctsel_mrg_email AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_email=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 14) THEN UPDATE cntctsel SET cntctsel_mrg_webaddr=false WHERE (cntctsel_mrg_webaddr AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_webaddr=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 15) THEN UPDATE cntctsel SET cntctsel_mrg_title=false WHERE (cntctsel_mrg_title AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_title=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 16) THEN UPDATE cntctsel SET cntctsel_mrg_owner_username=false WHERE (cntctsel_mrg_owner_username AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_owner_username=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 17) THEN UPDATE cntctsel SET cntctsel_mrg_notes=false WHERE (cntctsel_mrg_notes AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_notes=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber >= 18) THEN UPDATE cntctsel SET cntctsel_mrg_addr_id=false WHERE (cntctsel_mrg_addr_id AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_addr_id=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; END IF; RETURN false; END; $_$; ALTER FUNCTION public.cntctselectcol(integer, integer) OWNER TO admin; -- -- Name: cntctused(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cntctused(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; _fk RECORD; _r RECORD; _seq INTEGER; _col TEXT; _qry TEXT; BEGIN -- Determine where this contact is used by analyzing foreign key linkages -- but ignore child tables and those with impermanent relationships FOR _fk IN SELECT pg_namespace.nspname AS schemaname, con.relname AS tablename, conkey AS seq, conrelid AS class_id FROM pg_constraint, pg_class f, pg_class con, pg_namespace WHERE confrelid=f.oid AND conrelid=con.oid AND f.relname = 'cntct' AND con.relnamespace=pg_namespace.oid AND con.relname NOT IN ('cntctaddr', 'cntctdata', 'cntcteml', 'cohead', 'pohead', 'quhead', 'tohead', 'cntctsel', 'cntctmrgd', 'mrghist', 'trgthist') LOOP -- Validate IF (ARRAY_UPPER(_fk.seq,1) > 1) THEN RAISE EXCEPTION 'Cannot check dependencies when the contact is one of multiple foreign key columns (%.%) [xtuple: fkeycheck, -1, %, %]', _fk.nspname, _fk.relname, _fk.nspname, _fk.relname; END IF; _seq := _fk.seq[1]; -- Get the specific column name SELECT attname INTO _col FROM pg_attribute, pg_class WHERE ((attrelid=pg_class.oid) AND (pg_class.oid=_fk.class_id) AND (attnum=_seq)); -- See if there are dependencies _qry := 'SELECT * FROM ' || _fk.schemaname || '.' || _fk.tablename || ' WHERE ('|| _col || '=' || pCntctId || ');'; FOR _r IN EXECUTE _qry LOOP RETURN true; END LOOP; END LOOP; RETURN false; END; $_$; ALTER FUNCTION public.cntctused(integer) OWNER TO admin; -- -- Name: coheadstatecolor(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION coheadstatecolor(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoheadId ALIAS FOR $1; _shipheadid INTEGER; _result TEXT := ''; BEGIN IF (pCoheadid IS NULL) THEN RAISE EXCEPTION 'Customer Id is required.'; END IF; SELECT shiphead_id INTO _shipheadid FROM cohead JOIN shiphead ON ((shiphead_order_id=cohead_id) AND (shiphead_order_type='SO')) JOIN shipitem ON (shiphead_id=shipitem_shiphead_id) WHERE ((cohead_id=pCoheadId) AND (NOT shipitem_invoiced)) ORDER BY shiphead_id DESC LIMIT 1; IF (FOUND) THEN SELECT CASE WHEN ((shiphead_shipped) AND (COALESCE(shiphead_order_id,0) > 0) AND (SUM(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) <= 0)) THEN 'altemphasis' WHEN ((COALESCE(cobmisc_cohead_id,0) > 0) AND (SUM(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) > 0)) THEN 'error' WHEN (NOT shiphead_shipped) THEN 'emphasis' END INTO _result FROM cohead JOIN coitem ON (cohead_id=coitem_cohead_id) JOIN shiphead ON ((shiphead_order_id=cohead_id) AND (shiphead_order_type='SO')) JOIN shipitem ON (shiphead_id=shipitem_shiphead_id) LEFT OUTER JOIN (SELECT DISTINCT cobmisc_cohead_id FROM cobmisc) AS cobmisc ON (cobmisc_cohead_id=cohead_id) WHERE (shiphead_id=_shipheadid) GROUP BY shiphead_id,shiphead_shipped,shiphead_order_id,cobmisc_cohead_id ORDER BY shiphead_id DESC; ELSE _result := ''; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.coheadstatecolor(integer) OWNER TO admin; -- -- Name: concataggsfunc(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION concataggsfunc(text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE prevstate ALIAS FOR $1; newval ALIAS FOR $2; BEGIN RETURN prevstate || newval; END; $_$; ALTER FUNCTION public.concataggsfunc(text, text) OWNER TO admin; -- -- Name: consolidatelocations(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION consolidatelocations(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _r RECORD; BEGIN UPDATE itemloc SET itemloc_consolflag = TRUE WHERE (itemloc_itemsite_id=pItemsiteid); FOR _r IN SELECT itemloc_location_id, SUM(itemloc_qty) AS qty FROM itemloc WHERE (itemloc_itemsite_id=pItemsiteid) GROUP BY itemloc_location_id LOOP INSERT INTO itemloc ( itemloc_itemsite_id, itemloc_location_id, itemloc_expiration, itemloc_qty, itemloc_consolflag ) VALUES ( pItemsiteid, _r.itemloc_location_id, endOfTime(), _r.qty, FALSE ); END LOOP; DELETE FROM itemloc WHERE ( (itemloc_itemsite_id=pItemsiteid) AND (itemloc_consolflag) ); RETURN 1; END; $_$; ALTER FUNCTION public.consolidatelocations(integer) OWNER TO admin; -- -- Name: convertcustomertoprospect(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION convertcustomertoprospect(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustId ALIAS FOR $1; _c RECORD; BEGIN SELECT * INTO _c FROM custinfo WHERE (cust_id=pCustId); INSERT INTO prospect ( prospect_id, prospect_active, prospect_number, prospect_name, prospect_cntct_id, prospect_taxzone_id, prospect_salesrep_id, prospect_warehous_id, prospect_comments ) VALUES ( _c.cust_id, _c.cust_active, _c.cust_number, _c.cust_name, _c.cust_cntct_id, _c.cust_taxzone_id, CASE WHEN(_c.cust_salesrep_id > 0) THEN _c.cust_salesrep_id ELSE NULL END, CASE WHEN(_c.cust_preferred_warehous_id > 0) THEN _c.cust_preferred_warehous_id ELSE NULL END, _c.cust_comments); DELETE FROM custinfo WHERE (cust_id=pCustId); RETURN pCustId; END; $_$; ALTER FUNCTION public.convertcustomertoprospect(integer) OWNER TO admin; -- -- Name: convertprospecttocustomer(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION convertprospecttocustomer(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN convertProspectToCustomer($1, FALSE); END; $_$; ALTER FUNCTION public.convertprospecttocustomer(integer) OWNER TO admin; -- -- Name: convertprospecttocustomer(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION convertprospecttocustomer(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pProspectId ALIAS FOR $1; pdoquotes ALIAS FOR $2; _p RECORD; _q RECORD; BEGIN SELECT * INTO _p FROM prospect WHERE (prospect_id=pProspectId); IF (EXISTS(SELECT cust_id FROM custinfo WHERE cust_id=pProspectId)) THEN RAISE EXCEPTION '[xtuple: convertProspectToCustomer, -10]'; END IF; INSERT INTO custinfo ( cust_id, cust_active, cust_number, cust_name, cust_cntct_id, cust_taxzone_id, cust_comments, cust_creditstatus, cust_salesrep_id, cust_preferred_warehous_id, cust_terms_id, cust_custtype_id, cust_shipform_id, cust_shipvia, cust_balmethod, cust_ffshipto, cust_backorder, cust_partialship, cust_creditlmt, cust_creditrating, cust_commprcnt, cust_discntprcnt, cust_blanketpos, cust_shipchrg_id, cust_ffbillto, cust_usespos, cust_emaildelivery, cust_autoupdatestatus,cust_autoholdorders, cust_soemaildelivery) SELECT _p.prospect_id, _p.prospect_active, _p.prospect_number, _p.prospect_name, _p.prospect_cntct_id, _p.prospect_taxzone_id, _p.prospect_comments, 'G', COALESCE(_p.prospect_salesrep_id, salesrep_id), COALESCE(_p.prospect_warehous_id, -1), FetchMetricValue('DefaultTerms'), FetchMetricValue('DefaultCustType'), FetchMetricValue('DefaultShipFormId'), COALESCE(FetchMetricValue('DefaultShipViaId'),-1), FetchMetricText('DefaultBalanceMethod'), FetchMetricBool('DefaultFreeFormShiptos'), FetchMetricBool('DefaultBackOrders'), FetchMetricBool('DefaultPartialShipments'), FetchMetricValue('SOCreditLimit'), FetchMetricText('SOCreditRate'), salesrep_commission, 0, false, -1,false,false,false,false, false, false FROM salesrep WHERE (salesrep_id=FetchMetricValue('DefaultSalesRep')); DELETE FROM prospect WHERE (prospect_id=pprospectId); IF (pdoquotes) THEN BEGIN FOR _q IN SELECT quhead_number, convertQuote(quhead_id) AS err FROM quhead WHERE ((COALESCE(quhead_expire, endOfTime()) >= CURRENT_DATE) AND (quhead_cust_id=pProspectId)) LOOP IF (_q.err < 0) THEN RAISE NOTICE 'Quote % for % didn''t convert to a Sales Order [xtuple: convertQuote, %]', _q.quhead_number, _p.prospect_number, _q.err; END IF; END LOOP; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Ignored errors convering quotes: % %', SQLSTATE, SQLERRM; END; END IF; RETURN pProspectId; END; $_$; ALTER FUNCTION public.convertprospecttocustomer(integer, boolean) OWNER TO admin; -- -- Name: convertquote(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION convertquote(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; _soheadid INTEGER; _soitemid INTEGER; _orderid INTEGER; _ordertype CHARACTER(1); _creditstatus TEXT; _usespos BOOLEAN := false; _blanketpos BOOLEAN := true; _showConvertedQuote BOOLEAN := false; _prospectid INTEGER; _r RECORD; _soNum TEXT; BEGIN -- Check to make sure the quote has not expired IF (SELECT COALESCE(quhead_expire, endOfTime()) < CURRENT_DATE FROM quhead WHERE(quhead_id=pQuheadid)) THEN RETURN -6; END IF; -- Check to make sure that all of the quote items have a valid itemsite SELECT quitem_id INTO _r FROM quitem LEFT OUTER JOIN itemsite ON (quitem_itemsite_id=itemsite_id) WHERE ((itemsite_id IS NULL) AND (quitem_quhead_id=pQuheadid)); IF (FOUND) THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'Q', quhead_id, quhead_warehous_id, quhead_number FROM evntnot, evnttype, quhead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=quhead_warehous_id) AND (evnttype_name='CannotConvertQuote') AND (quhead_id=pQuheadid) ); RETURN -1; END IF; SELECT cust_creditstatus, cust_usespos, cust_blanketpos INTO _creditstatus, _usespos, _blanketpos FROM quhead, custinfo WHERE ((quhead_cust_id=cust_id) AND (quhead_id=pQuheadid)); IF (NOT FOUND) THEN SELECT prospect_id INTO _prospectid FROM quhead, prospect WHERE ((quhead_cust_id=prospect_id) AND (quhead_id=pQuheadid)); IF (NOT FOUND) THEN RETURN -2; ELSE RETURN -3; END IF; ELSIF (_creditstatus = 'H' AND NOT checkPrivilege('CreateSOForHoldCustomer')) THEN RETURN -4; ELSIF (_creditstatus = 'W' AND NOT checkPrivilege('CreateSOForWarnCustomer')) THEN RETURN -5; END IF; IF ( (_usespos) AND (NOT _blanketpos) ) THEN PERFORM cohead_id FROM quhead JOIN cohead ON ( (cohead_cust_id=quhead_cust_id) AND (UPPER(cohead_custponumber)=UPPER(quhead_custponumber)) ) WHERE (quhead_id=pQuheadid); IF (FOUND) THEN RAISE EXCEPTION 'Duplicate Customer PO'; END IF; END IF; PERFORM quhead_number, cohead_id FROM quhead, cohead WHERE quhead_id = pQuheadid AND cohead_number = quhead_number; IF (FOUND) THEN SELECT fetchSoNumber() INTO _soNum; ELSE SELECT quhead_number INTO _soNum FROM quhead WHERE quhead_id = pQuheadid; END IF; SELECT NEXTVAL('cohead_cohead_id_seq') INTO _soheadid; INSERT INTO cohead ( cohead_id, cohead_number, cohead_cust_id, cohead_orderdate, cohead_packdate, cohead_custponumber, cohead_warehous_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_billtocountry, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_shiptocountry, cohead_salesrep_id, cohead_commission, cohead_terms_id, cohead_shipchrg_id, cohead_shipform_id, cohead_fob, cohead_shipvia, cohead_ordercomments, cohead_shipcomments, cohead_freight, cohead_misc, cohead_misc_accnt_id, cohead_misc_descrip, cohead_holdtype, cohead_wasquote, cohead_quote_number, cohead_prj_id, cohead_curr_id, cohead_taxzone_id, cohead_taxtype_id, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_ophead_id, cohead_calcfreight, cohead_saletype_id, cohead_shipzone_id ) SELECT _soheadid, _soNum, quhead_cust_id, CURRENT_DATE, quhead_packdate, quhead_custponumber, quhead_warehous_id, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_billtocountry, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptocountry, quhead_salesrep_id, quhead_commission, quhead_terms_id, cust_shipchrg_id, cust_shipform_id, quhead_fob, quhead_shipvia, quhead_ordercomments, quhead_shipcomments, quhead_freight, quhead_misc, quhead_misc_accnt_id, quhead_misc_descrip, 'N', TRUE, quhead_number, quhead_prj_id, quhead_curr_id, quhead_taxzone_id, quhead_taxtype_id, quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email, quhead_ophead_id, quhead_calcfreight, quhead_saletype_id, quhead_shipzone_id FROM quhead JOIN custinfo ON (cust_id=quhead_cust_id) WHERE (quhead_id=pQuheadid); UPDATE url SET url_source_id = _soheadid, url_source = 'S' WHERE ((url_source='Q') AND (url_source_id = pQuheadid)); UPDATE imageass SET imageass_source_id = _soheadid, imageass_source = 'S' WHERE ((imageass_source='Q') AND (imageass_source_id = pQuheadid)); UPDATE docass SET docass_source_id = _soheadid, docass_source_type = 'S' WHERE ((docass_source_type='Q') AND (docass_source_id = pQuheadid)); -- Copy Comments INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text, comment_public ) SELECT comment_cmnttype_id, 'S', _soheadid, comment_date, comment_user, ('Quote-' || comment_text), comment_public FROM comment WHERE ( (comment_source='Q') AND (comment_source_id=pQuheadid) ); FOR _r IN SELECT quitem.*, quhead_number, quhead_prj_id, itemsite_item_id, itemsite_leadtime, itemsite_createsopo, itemsite_createsopr, item_type, COALESCE(quitem_itemsrc_id, itemsrc_id, -1) AS itemsrcid FROM quhead JOIN quitem ON (quitem_quhead_id=quhead_id) JOIN itemsite ON (itemsite_id=quitem_itemsite_id) JOIN item ON (item_id=itemsite_item_id) LEFT OUTER JOIN itemsrc ON ( (itemsrc_item_id=item_id) AND (itemsrc_default) ) WHERE (quhead_id=pQuheadid) ORDER BY quitem_linenumber LOOP SELECT NEXTVAL('coitem_coitem_id_seq') INTO _soitemid; INSERT INTO coitem ( coitem_id, coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_price, coitem_custprice, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_price_uom_id, coitem_price_invuomratio, coitem_unitcost, coitem_prcost, coitem_custpn, coitem_memo, coitem_taxtype_id, coitem_order_id ) VALUES ( _soitemid, _soheadid, _r.quitem_linenumber, _r.quitem_itemsite_id, 'O', _r.quitem_scheddate, _r.quitem_promdate, _r.quitem_price, _r.quitem_custprice, _r.quitem_qtyord, 0, 0, _r.quitem_qty_uom_id, _r.quitem_qty_invuomratio, _r.quitem_price_uom_id, _r.quitem_price_invuomratio, stdcost(_r.itemsite_item_id), _r.quitem_prcost, _r.quitem_custpn, _r.quitem_memo, _r.quitem_taxtype_id, -1 ); IF (fetchMetricBool('enablextcommissionission')) THEN PERFORM xtcommission.getSalesReps(quhead_cust_id, quhead_shipto_id, _r.itemsite_item_id, _r.quitem_price, _soitemid, 'SalesItem') FROM quhead WHERE (quhead_id=pQuheadid); END IF; INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default, charass_price) SELECT 'SI', _soitemid, charass_char_id, charass_value, charass_default, charass_price FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=_r.quitem_id)); -- Copy Comments INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text ) SELECT comment_cmnttype_id, 'SI', _soitemid, comment_date, comment_user, ('Quote-' || comment_text) FROM comment WHERE ( (comment_source='QI') AND (comment_source_id=_r.quitem_id) ); _orderid := -1; _ordertype := ''; IF (_r.quitem_createorder) THEN IF (_r.item_type IN ('M')) THEN SELECT createWo( CAST(_r.quhead_number AS INTEGER), supply.itemsite_id, 1, (_r.quitem_qtyord * _r.quitem_qty_invuomratio), _r.itemsite_leadtime, _r.quitem_scheddate, _r.quitem_memo, 'S', _soitemid, _r.quhead_prj_id ) INTO _orderId FROM itemsite sold, itemsite supply WHERE ((sold.itemsite_item_id=supply.itemsite_item_id) AND (supply.itemsite_warehous_id=_r.quitem_order_warehous_id) AND (sold.itemsite_id=_r.quitem_itemsite_id) ); _orderType := 'W'; INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT 'W', _orderId, charass_char_id, charass_value FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=_r.quitem_id)); ELSIF ( (_r.item_type IN ('P', 'O')) AND (_r.itemsite_createsopr) ) THEN SELECT createPr( CAST(_r.quhead_number AS INTEGER), _r.quitem_itemsite_id, (_r.quitem_qtyord * _r.quitem_qty_invuomratio), _r.quitem_scheddate, '', 'S', _soitemid ) INTO _orderId; _orderType := 'R'; UPDATE pr SET pr_prj_id=_r.quhead_prj_id WHERE pr_id=_orderId; ELSIF ( (_r.item_type IN ('P', 'O')) AND (_r.itemsite_createsopo) ) THEN IF (_r.quitem_prcost=0) THEN SELECT createPurchaseToSale(_soitemid, _r.itemsrcid, _r.quitem_dropship) INTO _orderId; ELSE SELECT createPurchaseToSale(_soitemid, _r.itemsrcid, _r.quitem_dropship, _r.quitem_prcost) INTO _orderId; END IF; _orderType := 'P'; END IF; UPDATE coitem SET coitem_order_type=_ordertype, coitem_order_id=_orderid WHERE (coitem_id=_soitemid); END IF; END LOOP; SELECT metric_value INTO _showConvertedQuote FROM metric WHERE metric_name = 'ShowQuotesAfterSO'; IF (_showConvertedQuote) THEN UPDATE quhead SET quhead_status= 'C' WHERE (quhead_id = pQuheadid); ELSE PERFORM deleteQuote(pQuheadid); END IF; RETURN _soheadid; END; $_$; ALTER FUNCTION public.convertquote(integer) OWNER TO admin; -- -- Name: convertquotetoinvoice(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION convertquotetoinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; _iheadid INTEGER; _iitemid INTEGER; _orderid INTEGER; _ordertype CHARACTER(1); _creditstatus TEXT; _usespos BOOLEAN := false; _blanketpos BOOLEAN := true; _showConvertedQuote BOOLEAN := false; _prospectid INTEGER; _r RECORD; _inNum TEXT; BEGIN -- Check to make sure the quote has not expired IF (SELECT COALESCE(quhead_expire, endOfTime()) < CURRENT_DATE FROM quhead WHERE(quhead_id=pQuheadid)) THEN RETURN -6; END IF; -- Check to make sure that all of the quote items have a valid itemsite SELECT quitem_id INTO _r FROM quitem LEFT OUTER JOIN itemsite ON (quitem_itemsite_id=itemsite_id) WHERE ((itemsite_id IS NULL) AND (quitem_quhead_id=pQuheadid)); IF (FOUND) THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'Q', quhead_id, quhead_warehous_id, quhead_number FROM evntnot, evnttype, quhead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=quhead_warehous_id) AND (evnttype_name='CannotConvertQuote') AND (quhead_id=pQuheadid) ); RETURN -1; END IF; -- Get Credit Stat, Uses POs and Blanket POs SELECT cust_creditstatus, cust_usespos, cust_blanketpos INTO _creditstatus, _usespos, _blanketpos FROM quhead, custinfo WHERE ((quhead_cust_id=cust_id) AND (quhead_id=pQuheadid)); -- Check to see if customer or prospect IF (NOT FOUND) THEN SELECT prospect_id INTO _prospectid FROM quhead, prospect WHERE ((quhead_cust_id=prospect_id) AND (quhead_id=pQuheadid)); IF (NOT FOUND) THEN RETURN -2; ELSE RETURN -3; END IF; ELSIF (_creditstatus = 'H' AND NOT hasPriv('CreateSOForHoldCustomer')) THEN RETURN -4; ELSIF (_creditstatus = 'W' AND NOT hasPriv('CreateSOForWarnCustomer')) THEN RETURN -5; END IF; -- PO/blanket PO checks IF ( (_usespos) AND (NOT _blanketpos) ) THEN PERFORM invchead_id FROM quhead JOIN invchead ON ( (invchead_cust_id=quhead_cust_id) AND (UPPER(invchead_custponumber)=UPPER(quhead_custponumber)) ) WHERE (quhead_id=pQuheadid); IF (FOUND) THEN RAISE EXCEPTION 'Duplicate Customer PO'; END IF; END IF; --Check to see if an invoice exists with the quote number PERFORM quhead_number, invchead_id FROM quhead, invchead WHERE quhead_id = pQuheadid AND invchead_invcnumber = quhead_number; -- If it does then get a new Invoice number otherwise use the quote number as the invoice number IF (FOUND) THEN SELECT fetchinvcnumber() INTO _inNum; ELSE SELECT quhead_number INTO _inNum FROM quhead WHERE quhead_id = pQuheadid; END IF; --Insert quote info into invoice tables SELECT NEXTVAL('invchead_invchead_id_seq') INTO _iheadid; INSERT INTO invchead ( invchead_ordernumber, invchead_shipdate, invchead_recurring, invchead_id, invchead_invcnumber, invchead_cust_id, invchead_orderdate, invchead_ponumber, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_country, invchead_shipto_id, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_country, invchead_salesrep_id, invchead_commission, invchead_terms_id, invchead_shipchrg_id, invchead_fob, invchead_shipvia, invchead_notes, invchead_freight, invchead_misc_amount, invchead_misc_accnt_id, invchead_misc_descrip, invchead_prj_id, invchead_curr_id, invchead_taxzone_id, invchead_posted, invchead_printed, invchead_invcdate, invchead_saletype_id, invchead_shipzone_id --invchead_taxtype_id, --invchead_shipto_cntct_id, invchead_shipto_cntct_honorific, invchead_shipto_cntct_first_name, --invchead_shipto_cntct_middle, invchead_shipto_cntct_last_name, invchead_shipto_cntct_suffix, --invchead_shipto_cntct_phone, invchead_shipto_cntct_title, invchead_shipto_cntct_fax, --invchead_shipto_cntct_email, --invchead_billto_cntct_id, invchead_billto_cntct_honorific, --invchead_billto_cntct_first_name, invchead_billto_cntct_middle, invchead_billto_cntct_last_name, --invchead_billto_cntct_suffix, invchead_billto_cntct_phone, invchead_billto_cntct_title, --invchead_billto_cntct_fax, invchead_billto_cntct_email, --invchead_ophead_id, --invchead_calcfreight ) SELECT quhead_number, quhead_packdate, 'f', _iheadid, _inNum, quhead_cust_id, CURRENT_DATE, quhead_custponumber, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_billtocountry, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptocountry, quhead_salesrep_id, quhead_commission, quhead_terms_id, cust_shipchrg_id, quhead_fob, quhead_shipvia, quhead_ordercomments, quhead_freight, quhead_misc, quhead_misc_accnt_id, quhead_misc_descrip, quhead_prj_id, quhead_curr_id, quhead_taxzone_id, 'f','f',current_date, quhead_saletype_id, quhead_shipzone_id --quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, --quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, --quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, --quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, --quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, --quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, --quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email, quhead_ophead_id, --quhead_calcfreight FROM quhead JOIN custinfo ON (cust_id=quhead_cust_id) WHERE (quhead_id=pQuheadid); -- Attachments on Invoice not supported but leaving this in for future use: /* UPDATE url SET url_source_id = _iheadid, url_source = 'I' WHERE ((url_source='Q') AND (url_source_id = pQuheadid)); UPDATE imageass SET imageass_source_id = _iheadid, imageass_source = 'I' WHERE ((imageass_source='Q') AND (imageass_source_id = pQuheadid)); UPDATE docass SET docass_source_id = _iheadid, docass_source_type = 'I' WHERE ((docass_source_type='Q') AND (docass_source_id = pQuheadid)); */ -- Comments not supported on Invoice but leaving this in for future use: /* INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text, comment_public ) SELECT comment_cmnttype_id, 'I', _iheadid, comment_date, comment_user, ('Quote-' || comment_text), comment_public FROM comment WHERE ( (comment_source='Q') AND (comment_source_id=pQuheadid) ); */ FOR _r IN SELECT quitem.*, quhead_number, quhead_prj_id, itemsite_item_id, itemsite_leadtime, itemsite_createsopo, itemsite_createsopr, item_type, COALESCE(quitem_itemsrc_id, itemsrc_id, -1) AS itemsrcid FROM quhead JOIN quitem ON (quitem_quhead_id=quhead_id) JOIN itemsite ON (itemsite_id=quitem_itemsite_id) JOIN item ON (item_id=itemsite_item_id) LEFT OUTER JOIN itemsrc ON ( (itemsrc_item_id=item_id) AND (itemsrc_default) ) WHERE (quhead_id=pQuheadid) LOOP SELECT NEXTVAL('invcitem_invcitem_id_seq') INTO _iitemid; INSERT INTO invcitem ( invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, --invcitem_status, --invcitem_scheddate, invcitem_promdate, invcitem_price, invcitem_custprice, invcitem_ordered, invcitem_billed, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_custpn, invcitem_notes, invcitem_taxtype_id ) VALUES ( _iitemid, _iheadid, _r.quitem_linenumber, (SELECT itemsite_item_id FROM itemsite WHERE itemsite_id = _r.quitem_itemsite_id), (SELECT itemsite_warehous_id FROM itemsite WHERE itemsite_id = _r.quitem_itemsite_id), --'O', --_r.quitem_scheddate, _r.quitem_promdate, _r.quitem_price, _r.quitem_custprice, _r.quitem_qtyord, _r.quitem_qtyord, _r.quitem_qty_uom_id, _r.quitem_qty_invuomratio, _r.quitem_price_uom_id, _r.quitem_price_invuomratio, _r.quitem_custpn, _r.quitem_memo, _r.quitem_taxtype_id ); IF (fetchMetricBool('enablextcommissionission')) THEN PERFORM xtcommission.getSalesReps(quhead_cust_id, quhead_shipto_id, _r.itemsite_item_id, _r.quitem_price, _iitemid, 'InvoiceItem') FROM quhead WHERE (quhead_id=pQuheadid); END IF; -- Chracteristics not supported on Invoice but leaving in for future use: /* INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default, charass_price) SELECT 'SI', _iitemid, charass_char_id, charass_value, charass_default, charass_price FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=_r.quitem_id)); */ -- Comments not supported but leaving in for future use /* INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text ) SELECT comment_cmnttype_id, 'SI', _iitemid, comment_date, comment_user, ('Quote-' || comment_text) FROM comment WHERE ( (comment_source='QI') AND (comment_source_id=_r.quitem_id) ); */ _orderid := -1; _ordertype := ''; IF (_r.quitem_createorder) THEN IF (_r.item_type IN ('M')) THEN SELECT createWo( CAST(_r.quhead_number AS INTEGER), supply.itemsite_id, 1, (_r.quitem_qtyord * _r.quitem_qty_invuomratio), _r.itemsite_leadtime, _r.quitem_scheddate, _r.quitem_memo, 'Q', _iitemid, _r.quhead_prj_id ) INTO _orderId FROM itemsite sold, itemsite supply WHERE ((sold.itemsite_item_id=supply.itemsite_item_id) AND (supply.itemsite_warehous_id=_r.quitem_order_warehous_id) AND (sold.itemsite_id=_r.quitem_itemsite_id) ); _orderType := 'W'; INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT 'W', _orderId, charass_char_id, charass_value FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=_r.quitem_id)); ELSIF ( (_r.item_type IN ('P', 'O')) AND (_r.itemsite_createsopr) ) THEN SELECT createPr( CAST(_r.quhead_number AS INTEGER), _r.quitem_itemsite_id, (_r.quitem_qtyord * _r.quitem_qty_invuomratio), _r.quitem_scheddate, '', 'S', _iitemid ) INTO _orderId; _orderType := 'R'; UPDATE pr SET pr_prj_id=_r.quhead_prj_id WHERE pr_id=_orderId; ELSIF ( (_r.item_type IN ('P', 'O')) AND (_r.itemsite_createsopo) ) THEN IF (_r.quitem_prcost=0) THEN -- For now quote to invoice/dropship will not be supported but with the creation of a createPurchaseToQuote() version of createPurchaseToSale() -- it can be -- SELECT createPurchaseToSale(_iitemid, _r.itemsrcid, _r.quitem_dropship) INTO _orderId; RAISE EXCEPTION 'Quote contains one or more dropship items that may not be converted from a Quote to an Invoice'; ELSE -- For now quote to invoice/dropship will not be supported but with the creation of a createPurchaseToQuote() version of createPurchaseToSale() -- it can be -- SELECT createPurchaseToSale(_iitemid, _r.itemsrcid, _r.quitem_dropship, _r.quitem_prcost) INTO _orderId; RAISE EXCEPTION 'Quote contains one or more dropship items that may not be converted from a Quote to an Invoice'; END IF; _orderType := 'P'; END IF; -- UPDATE invcitem SET invcitem_order_type=_ordertype, invcitem_order_id=_orderid -- WHERE (invcitem_id=_iitemid); END IF; END LOOP; SELECT metric_value INTO _showConvertedQuote FROM metric WHERE metric_name = 'ShowQuotesAfterSO'; IF (_showConvertedQuote) THEN UPDATE quhead SET quhead_status= 'C' WHERE (quhead_id = pQuheadid); ELSE PERFORM deleteQuote(pQuheadid); END IF; RETURN _iheadid; END; $_$; ALTER FUNCTION public.convertquotetoinvoice(integer) OWNER TO admin; -- -- Name: copybom(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copybom(psitemid integer, ptitemid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _result INTEGER; BEGIN SELECT copyBOM (pSItemid, PTItemid, FALSE) into _result; RETURN _result; END; $$; ALTER FUNCTION public.copybom(psitemid integer, ptitemid integer) OWNER TO admin; -- -- Name: copybom(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copybom(psitemid integer, ptitemid integer, pcopyusedat boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _bh RECORD; _bi RECORD; _bomheadid INTEGER; _bomitemid INTEGER; _bomworksetid INTEGER; _temp INTEGER; _schedatwooper BOOLEAN; _booitemseqid INTEGER; BEGIN -- Cache source bomhead SELECT * INTO _bh FROM bomhead WHERE ((bomhead_item_id=pSItemid) AND (bomhead_rev_id=getActiveRevID('BOM', pSItemid))); IF (NOT FOUND) THEN RETURN -1; END IF; -- Make sure that source bomitems exist SELECT bomitem_id INTO _bomitemid FROM bomitem WHERE ((bomitem_parent_item_id=_bh.bomhead_item_id) AND (bomitem_rev_id=_bh.bomhead_rev_id)) LIMIT 1; IF (NOT FOUND) THEN RETURN -2; END IF; -- Make sure that target bomitems do not exist SELECT bomitem_id INTO _bomitemid FROM bomitem WHERE ((bomitem_parent_item_id=pTItemid) AND (bomitem_rev_id= -1)) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Make sure that the parent is not used in the component at some level IF ( SELECT (item_type IN ('M', 'F')) FROM item WHERE (item_id=pSItemid) ) THEN SELECT indentedWhereUsed(pTItemid) INTO _bomworksetid; SELECT bomwork_id INTO _temp FROM bomwork WHERE ( (bomwork_set_id=_bomworksetid) AND (bomwork_item_id=pSItemid) ) LIMIT 1; IF (FOUND) THEN PERFORM deleteBOMWorkset(_bomworksetid); RETURN -4; END IF; PERFORM deleteBOMWorkset(_bomworksetid); END IF; -- Check for existing target bomhead SELECT bomhead_id INTO _bomheadid FROM bomhead WHERE ((bomhead_item_id=pTItemid) AND (bomhead_rev_id= -1)); IF (NOT FOUND) THEN INSERT INTO bomhead ( bomhead_item_id, bomhead_serial, bomhead_docnum, bomhead_batchsize, bomhead_requiredqtyper ) VALUES ( pTItemid, _bh.bomhead_serial, _bh.bomhead_docnum, _bh.bomhead_batchsize, _bh.bomhead_requiredqtyper ); END IF; FOR _bi IN SELECT bomitem.* FROM bomitem(pSItemid) WHERE (bomitem_expires>CURRENT_DATE) LOOP SELECT NEXTVAL('bomitem_bomitem_id_seq') INTO _bomitemid; IF (pCopyUsedAt) THEN _schedatwooper := _bi.bomitem_schedatwooper; _booitemseqid := _bi.bomitem_booitem_seq_id; ELSE _schedatwooper := FALSE; _booitemseqid := -1; END IF; INSERT INTO bomitem ( bomitem_id, bomitem_parent_item_id, bomitem_seqnumber, bomitem_item_id, bomitem_uom_id, bomitem_qtyfxd, bomitem_qtyper, bomitem_scrap, bomitem_schedatwooper, bomitem_booitem_seq_id, bomitem_effective, bomitem_expires, bomitem_ecn, bomitem_createwo, bomitem_issuemethod, bomitem_moddate, bomitem_subtype, bomitem_notes, bomitem_ref ) VALUES ( _bomitemid, pTItemid, _bi.bomitem_seqnumber, _bi.bomitem_item_id, _bi.bomitem_uom_id, _bi.bomitem_qtyfxd, _bi.bomitem_qtyper, _bi.bomitem_scrap, _schedatwooper, _booitemseqid, CURRENT_DATE, _bi.bomitem_expires, _bi.bomitem_ecn, _bi.bomitem_createwo, _bi.bomitem_issuemethod, CURRENT_DATE, _bi.bomitem_subtype, _bi.bomitem_notes, _bi.bomitem_ref ); INSERT INTO bomitemsub ( bomitemsub_bomitem_id, bomitemsub_item_id, bomitemsub_uomratio, bomitemsub_rank ) SELECT _bomitemid, bomitemsub_item_id, bomitemsub_uomratio, bomitemsub_rank FROM bomitemsub WHERE (bomitemsub_bomitem_id=_bi.bomitem_id); END LOOP; RETURN pTItemid; END; $$; ALTER FUNCTION public.copybom(psitemid integer, ptitemid integer, pcopyusedat boolean) OWNER TO admin; -- -- Name: copybudget(integer, text, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copybudget(integer, text, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudgheadid ALIAS FOR $1; pName ALIAS FOR $2; pDescrip ALIAS FOR $3; pInterval ALIAS FOR $4; _budgheadid INTEGER; _periodid INTEGER; _result INTEGER; BEGIN SELECT 1 INTO _result FROM budgitem WHERE ((budgitem_budghead_id=pBudgheadid) AND (nextPeriodByInterval(budgitem_period_id, pInterval)=-1)) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; SELECT nextval('budghead_budghead_id_seq') INTO _budgheadid; INSERT INTO budghead (budghead_id, budghead_name, budghead_descrip) VALUES(_budgheadid, pName, pDescrip); INSERT INTO budgitem (budgitem_budghead_id, budgitem_period_id, budgitem_accnt_id, budgitem_amount) SELECT _budgheadid, nextPeriodByInterval(budgitem_period_id, pInterval), budgitem_accnt_id, budgitem_amount FROM budgitem WHERE (budgitem_budghead_id=pBudgheadid); RETURN _budgheadid; END; $_$; ALTER FUNCTION public.copybudget(integer, text, text, integer) OWNER TO admin; -- -- Name: copycmd(integer, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copycmd(integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmdId ALIAS FOR $1; pModule ALIAS FOR $2; pTitle ALIAS FOR $3; _cmdId INTEGER; BEGIN SELECT nextval('cmd_cmd_id_seq') INTO _cmdId; INSERT INTO cmd SELECT _cmdId, pModule, pTitle, cmd_descrip, cmd_privname, cmd_executable FROM cmd WHERE (cmd_id=pCmdId); INSERT INTO cmdarg (cmdarg_cmd_id, cmdarg_order, cmdarg_arg) SELECT _cmdId, cmdarg_order, cmdarg_arg FROM cmdarg WHERE (cmdarg_cmd_id=pCmdId); RETURN 1; END; $_$; ALTER FUNCTION public.copycmd(integer, text, text) OWNER TO admin; -- -- Name: copycontract(integer, text, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copycontract(pcontrctid integer, pnumber text, peffective date, pexpires date) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _contrctid INTEGER; _itemsrcid INTEGER; _r RECORD; BEGIN INSERT INTO contrct ( contrct_number, contrct_vend_id, contrct_descrip, contrct_effective, contrct_expires, contrct_note ) SELECT pNumber, contrct_vend_id, contrct_descrip, pEffective, pExpires, contrct_note FROM contrct WHERE (contrct_id=pContrctid) RETURNING contrct_id INTO _contrctid; FOR _r IN SELECT * FROM itemsrc WHERE (itemsrc_contrct_id=pContrctid) LOOP INSERT INTO itemsrc ( itemsrc_item_id, itemsrc_vend_id, itemsrc_vend_item_number, itemsrc_vend_item_descrip, itemsrc_comments, itemsrc_vend_uom, itemsrc_invvendoruomratio, itemsrc_minordqty, itemsrc_multordqty, itemsrc_leadtime, itemsrc_ranking, itemsrc_active, itemsrc_manuf_name, itemsrc_manuf_item_number, itemsrc_manuf_item_descrip, itemsrc_default, itemsrc_upccode, itemsrc_effective, itemsrc_expires, itemsrc_contrct_id ) VALUES ( _r.itemsrc_item_id, _r.itemsrc_vend_id, _r.itemsrc_vend_item_number, _r.itemsrc_vend_item_descrip, _r.itemsrc_comments, _r.itemsrc_vend_uom, _r.itemsrc_invvendoruomratio, _r.itemsrc_minordqty, _r.itemsrc_multordqty, _r.itemsrc_leadtime, _r.itemsrc_ranking, _r.itemsrc_active, _r.itemsrc_manuf_name, _r.itemsrc_manuf_item_number, _r.itemsrc_manuf_item_descrip, _r.itemsrc_default, _r.itemsrc_upccode, pEffective, pExpires, _contrctid ) RETURNING itemsrc_id INTO _itemsrcid; INSERT INTO itemsrcp ( itemsrcp_itemsrc_id, itemsrcp_qtybreak, itemsrcp_price, itemsrcp_updated, itemsrcp_curr_id, itemsrcp_dropship, itemsrcp_warehous_id, itemsrcp_type, itemsrcp_discntprcnt, itemsrcp_fixedamtdiscount ) SELECT _itemsrcid, itemsrcp_qtybreak, itemsrcp_price, CURRENT_DATE, itemsrcp_curr_id, itemsrcp_dropship, itemsrcp_warehous_id, itemsrcp_type, itemsrcp_discntprcnt, itemsrcp_fixedamtdiscount FROM itemsrcp WHERE (itemsrcp_itemsrc_id=_r.itemsrc_id); END LOOP; RETURN _contrctid; END; $$; ALTER FUNCTION public.copycontract(pcontrctid integer, pnumber text, peffective date, pexpires date) OWNER TO admin; -- -- Name: copyfinancialgroup(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyfinancialgroup(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceGroup ALIAS FOR $1; pFlheadid ALIAS FOR $2; pParentFlgrpid ALIAS FOR $3; _flgrpid INTEGER; BEGIN SELECT nextval('flgrp_flgrp_id_seq') INTO _flgrpid; -- Copy the group item INSERT INTO flgrp (flgrp_id, flgrp_flhead_id, flgrp_flgrp_id, flgrp_order, flgrp_name, flgrp_descrip, flgrp_subtotal, flgrp_summarize, flgrp_subtract, flgrp_showstart, flgrp_showend, flgrp_showdelta, flgrp_showbudget, flgrp_showdiff, flgrp_showcustom, flgrp_showstartprcnt, flgrp_showendprcnt, flgrp_showdeltaprcnt, flgrp_showbudgetprcnt, flgrp_showdiffprcnt, flgrp_showcustomprcnt, flgrp_usealtsubtotal, flgrp_altsubtotal,flgrp_prcnt_flgrp_id) SELECT _flgrpid, pFlheadid, pParentFlgrpid, flgrp_order, flgrp_name, flgrp_descrip, flgrp_subtotal, flgrp_summarize, flgrp_subtract, flgrp_showstart, flgrp_showend, flgrp_showdelta, flgrp_showbudget, flgrp_showdiff, flgrp_showcustom, flgrp_showstartprcnt, flgrp_showendprcnt, flgrp_showdeltaprcnt, flgrp_showbudgetprcnt, flgrp_showdiffprcnt, flgrp_showcustomprcnt, flgrp_usealtsubtotal, flgrp_altsubtotal,flgrp_prcnt_flgrp_id FROM flgrp WHERE (flgrp_id=pSourceGroup); -- Store temporary cross ref info EXECUTE ' INSERT INTO tmp_flgrpxref' || getEffectiveXtUser() || ' (flgrpxref_oldid,flgrpxref_newid) VALUES (' || pSourceGroup || ',' || _flgrpid || ');'; -- Copy any children flitems INSERT INTO flitem (flitem_flhead_id, flitem_flgrp_id, flitem_order, flitem_accnt_id, flitem_showstart, flitem_showend, flitem_showdelta, flitem_showbudget, flitem_showdiff, flitem_showcustom, flitem_subtract, flitem_showstartprcnt, flitem_showendprcnt, flitem_showdeltaprcnt, flitem_showbudgetprcnt, flitem_showdiffprcnt, flitem_showcustomprcnt, flitem_custom_source, flitem_company, flitem_profit, flitem_number, flitem_sub, flitem_type, flitem_subaccnttype_code, flitem_prcnt_flgrp_id) SELECT pFlheadid, _flgrpid, flitem_order, flitem_accnt_id, flitem_showstart, flitem_showend, flitem_showdelta, flitem_showbudget, flitem_showdiff, flitem_showcustom, flitem_subtract, flitem_showstartprcnt, flitem_showendprcnt, flitem_showdeltaprcnt, flitem_showbudgetprcnt, flitem_showdiffprcnt, flitem_showcustomprcnt, flitem_custom_source, flitem_company, flitem_profit, flitem_number, flitem_sub, flitem_type, flitem_subaccnttype_code, flitem_prcnt_flgrp_id FROM flitem WHERE (flitem_flgrp_id=pSourceGroup); -- Copy any children flspecs INSERT INTO flspec (flspec_flhead_id, flspec_flgrp_id, flspec_order, flspec_name, flspec_type, flspec_showstart, flspec_showend, flspec_showdelta, flspec_showbudget, flspec_showdiff, flspec_showcustom, flspec_subtract, flspec_showstartprcnt, flspec_showendprcnt, flspec_showdeltaprcnt, flspec_showbudgetprcnt, flspec_showdiffprcnt, flspec_showcustomprcnt, flspec_custom_source, flspec_prcnt_flgrp_id) SELECT pFlheadid, _flgrpid, flspec_order, flspec_name, flspec_type, flspec_showstart, flspec_showend, flspec_showdelta, flspec_showbudget, flspec_showdiff, flspec_showcustom, flspec_subtract, flspec_showstartprcnt, flspec_showendprcnt, flspec_showdeltaprcnt, flspec_showbudgetprcnt, flspec_showdiffprcnt, flspec_showcustomprcnt, flspec_custom_source, flspec_prcnt_flgrp_id FROM flspec WHERE (flspec_flgrp_id=pSourceGroup); -- Copy the groups PERFORM copyFinancialGroup(flgrp_id, pFlheadid, _flgrpid) FROM flgrp WHERE (flgrp_flgrp_id=pSourceGroup); RETURN _flgrpid; END; $_$; ALTER FUNCTION public.copyfinancialgroup(integer, integer, integer) OWNER TO admin; -- -- Name: copyfinanciallayout(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyfinanciallayout(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceFlheadid ALIAS FOR $1; pDestName ALIAS FOR $2; _flheadid INTEGER; _tblName TEXT; BEGIN -- Check for the flhead to be copy that it exists PERFORM flhead_id FROM flhead WHERE (flhead_id=pSourceFlheadid); IF (NOT FOUND) THEN RETURN -1; END IF; -- Check that the name is valid IF (pDestName IS NULL OR pDestName = '') THEN RETURN -2; END IF; -- Check for the name to copy to does not exist PERFORM flhead_id FROM flhead WHERE (flhead_name=pDestName); IF (FOUND) THEN RETURN -3; END IF; -- Copy the flhead record SELECT nextval('flhead_flhead_id_seq') INTO _flheadid; INSERT INTO flhead (flhead_id, flhead_name, flhead_descrip, flhead_showtotal, flhead_showstart, flhead_showend, flhead_showdelta, flhead_showbudget, flhead_showdiff, flhead_showcustom, flhead_custom_label, flhead_usealttotal, flhead_alttotal, flhead_usealtbegin, flhead_altbegin, flhead_usealtend, flhead_altend, flhead_usealtdebits, flhead_altdebits, flhead_usealtcredits, flhead_altcredits, flhead_usealtbudget, flhead_altbudget, flhead_usealtdiff, flhead_altdiff, flhead_type, flhead_active, flhead_sys ) SELECT _flheadid, pDestName, flhead_descrip, flhead_showtotal, flhead_showstart, flhead_showend, flhead_showdelta, flhead_showbudget, flhead_showdiff, flhead_showcustom, flhead_custom_label, flhead_usealttotal, flhead_alttotal, flhead_usealtbegin, flhead_altbegin, flhead_usealtend, flhead_altend, flhead_usealtdebits, flhead_altdebits, flhead_usealtcredits, flhead_altcredits, flhead_usealtbudget, flhead_altbudget, flhead_usealtdiff, flhead_altdiff, flhead_type, flhead_active, false FROM flhead WHERE (flhead_id=pSourceFlheadid); -- Create temporary table so old and new group ids can be stored SELECT relname FROM pg_class INTO _tblName WHERE relname = 'tmp_flgrpxref'; IF (_tblName IS NULL) THEN EXECUTE 'CREATE TEMPORARY TABLE tmp_flgrpxref' || getEffectiveXtUser() || ' ( flgrpxref_oldid int4, flgrpxref_newid int4 ) ON COMMIT DROP;'; END IF; -- Copy the top level groups PERFORM copyFinancialGroup(flgrp_id, _flheadid, -1) FROM flgrp WHERE ((flgrp_flhead_id=pSourceFlheadid) AND (flgrp_flgrp_id=-1)); -- Update Group Percent settings EXECUTE 'UPDATE flgrp SET flgrp_prcnt_flgrp_id=flgrpxref_newid FROM tmp_flgrpxref' || getEffectiveXtUser() || ' WHERE ((flgrp_flhead_id=' || _flheadid || ') AND (flgrp_prcnt_flgrp_id=flgrpxref_oldid));'; EXECUTE 'UPDATE flitem SET flitem_prcnt_flgrp_id=flgrpxref_newid FROM tmp_flgrpxref' || getEffectiveXtUser() || ' WHERE ((flitem_flhead_id=' || _flheadid || ') AND (flitem_prcnt_flgrp_id=flgrpxref_oldid));'; EXECUTE 'UPDATE flspec SET flspec_prcnt_flgrp_id=flgrpxref_newid FROM tmp_flgrpxref' || getEffectiveXtUser() || ' WHERE ((flspec_flhead_id=' || _flheadid || ') AND (flspec_prcnt_flgrp_id=flgrpxref_oldid));'; -- Copy Column Layounts INSERT INTO flcol (flcol_flhead_id, flcol_name, flcol_descrip, flcol_report_id, flcol_month, flcol_quarter, flcol_year, flcol_showdb, flcol_prcnt, flcol_priortype, flcol_priormonth, flcol_priorquarter, flcol_prioryear, flcol_priorprcnt, flcol_priordiff, flcol_priordiffprcnt, flcol_budget, flcol_budgetprcnt, flcol_budgetdiff, flcol_budgetdiffprcnt ) SELECT _flheadid,flcol_name,flcol_descrip, flcol_report_id,flcol_month,flcol_quarter, flcol_year,flcol_showdb,flcol_prcnt, flcol_priortype,flcol_priormonth,flcol_priorquarter, flcol_prioryear,flcol_priorprcnt,flcol_priordiff, flcol_priordiffprcnt,flcol_budget,flcol_budgetprcnt, flcol_budgetdiff,flcol_budgetdiffprcnt FROM flcol WHERE (flcol_flhead_id=pSourceFlheadid); RETURN _flheadid; END; $_$; ALTER FUNCTION public.copyfinanciallayout(integer, text) OWNER TO admin; -- -- Name: copyglseries(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyglseries(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _sequence INTEGER := fetchGLSequence(); _journal INTEGER; BEGIN SELECT gltrans_journalnumber INTO _journal FROM gltrans WHERE ( gltrans_sequence=pSequence ) LIMIT 1; IF (FOUND) THEN INSERT INTO glseries ( glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, glseries_notes, glseries_accnt_id, glseries_amount, glseries_distdate ) SELECT _sequence, gltrans_source, gltrans_doctype, gltrans_docnumber, gltrans_notes, gltrans_accnt_id, gltrans_amount, gltrans_date FROM gltrans WHERE ( gltrans_sequence=pSequence ); ELSE RAISE EXCEPTION 'g/l transaction sequence not found'; END IF; RETURN _sequence; END; $_$; ALTER FUNCTION public.copyglseries(integer) OWNER TO admin; -- -- Name: copyincdt(integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyincdt(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pparentid ALIAS FOR $1; ptimestamp TIMESTAMP WITH TIME ZONE := COALESCE($2, CURRENT_TIMESTAMP); _alarmid INTEGER; _incdtid INTEGER; _todoitemid INTEGER; BEGIN INSERT INTO incdt(incdt_number, incdt_crmacct_id, incdt_cntct_id, incdt_summary, incdt_descrip, incdt_item_id, incdt_timestamp, incdt_incdtcat_id, incdt_incdtseverity_id,incdt_incdtpriority_id, incdt_owner_username, incdt_recurring_incdt_id ) SELECT fetchIncidentNumber(), incdt_crmacct_id, incdt_cntct_id, incdt_summary, incdt_descrip, incdt_item_id, ptimestamp, incdt_incdtcat_id, incdt_incdtseverity_id,incdt_incdtpriority_id, incdt_owner_username, incdt_recurring_incdt_id FROM incdt WHERE (incdt_id=pparentid) RETURNING incdt_id INTO _incdtid; IF (_incdtid IS NULL) THEN RETURN -10; END IF; SELECT MIN(copyTodoitem(todoitem_id, CAST(ptimestamp AS DATE), _incdtid)) INTO _todoitemid FROM todoitem WHERE (todoitem_incdt_id=pparentid); IF (_todoitemid < 0) THEN RETURN _todoitemid; END IF; SELECT saveAlarm(NULL, NULL, CAST(ptimestamp AS DATE), CAST(alarm_time - DATE_TRUNC('day',alarm_time) AS TIME), alarm_time_offset, alarm_time_qualifier, alarm_event_recipient IS NOT NULL, alarm_event_recipient, alarm_email_recipient IS NOT NULL, alarm_email_recipient, alarm_sysmsg_recipient IS NOT NULL, alarm_sysmsg_recipient, 'INCDT', _incdtid, 'CHANGEONE') INTO _alarmid FROM alarm WHERE ((alarm_source='INCDT') AND (alarm_source_id=pparentid)); IF (_alarmid < 0) THEN RETURN _alarmid; END IF; INSERT INTO docass (docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose ) SELECT _incdtid, 'INCDT', docass_target_id, docass_target_type, docass_purpose FROM docass WHERE ((docass_source_id=pparentid) AND (docass_source_type='INCDT')); RETURN _incdtid; END; $_$; ALTER FUNCTION public.copyincdt(integer, timestamp with time zone) OWNER TO admin; -- -- Name: copyinvoice(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyinvoice(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; _invcheadid INTEGER; _invcnumber TEXT; _invcdate DATE := COALESCE($2, CURRENT_DATE); _i RECORD; _l RECORD; _invcitemid INTEGER; BEGIN SELECT * INTO _i FROM invchead WHERE(invchead_id=pInvcheadid); IF(NOT FOUND) THEN RETURN -1; END IF; _invcnumber := fetchInvcNumber(); _invcheadid := nextval('invchead_invchead_id_seq'); INSERT INTO invchead (invchead_id, invchead_cust_id, invchead_shipto_id, invchead_ordernumber, invchead_orderdate, invchead_posted, invchead_printed, invchead_invcnumber, invchead_invcdate, invchead_shipdate, invchead_ponumber, invchead_shipvia, invchead_fob, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_phone, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_phone, invchead_salesrep_id, invchead_commission, invchead_terms_id, invchead_freight, invchead_misc_amount, invchead_misc_descrip, invchead_misc_accnt_id, invchead_payment, invchead_paymentref, invchead_notes, invchead_billto_country, invchead_shipto_country, invchead_prj_id, invchead_curr_id, invchead_taxzone_id, invchead_recurring_invchead_id, invchead_saletype_id, invchead_shipzone_id) VALUES(_invcheadid, _i.invchead_cust_id, _i.invchead_shipto_id, _i.invchead_ordernumber, _i.invchead_orderdate, false, false, _invcnumber, _invcdate, _i.invchead_shipdate, _i.invchead_ponumber, _i.invchead_shipvia, _i.invchead_fob, _i.invchead_billto_name, _i.invchead_billto_address1, _i.invchead_billto_address2, _i.invchead_billto_address3, _i.invchead_billto_city, _i.invchead_billto_state, _i.invchead_billto_zipcode, _i.invchead_billto_phone, _i.invchead_shipto_name, _i.invchead_shipto_address1, _i.invchead_shipto_address2, _i.invchead_shipto_address3, _i.invchead_shipto_city, _i.invchead_shipto_state, _i.invchead_shipto_zipcode, _i.invchead_shipto_phone, _i.invchead_salesrep_id, _i.invchead_commission, _i.invchead_terms_id, _i.invchead_freight, _i.invchead_misc_amount, _i.invchead_misc_descrip, _i.invchead_misc_accnt_id, _i.invchead_payment, _i.invchead_paymentref, _i.invchead_notes, _i.invchead_billto_country, _i.invchead_shipto_country, _i.invchead_prj_id, _i.invchead_curr_id, _i.invchead_taxzone_id, _i.invchead_recurring_invchead_id, _i.invchead_saletype_id, _i.invchead_shipzone_id); FOR _l IN SELECT * FROM invcitem WHERE (invcitem_invchead_id=pInvcheadid) LOOP SELECT NEXTVAL('invcitem_invcitem_id_seq') INTO _invcitemid; INSERT INTO invcitem (invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_custprice, invcitem_price, invcitem_notes, invcitem_salescat_id, invcitem_taxtype_id, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_coitem_id) VALUES (_invcitemid, _invcheadid, _l.invcitem_linenumber, _l.invcitem_item_id, _l.invcitem_warehous_id, _l.invcitem_custpn, _l.invcitem_number, _l.invcitem_descrip, _l.invcitem_ordered, _l.invcitem_billed, _l.invcitem_custprice, _l.invcitem_price, _l.invcitem_notes, _l.invcitem_salescat_id, _l.invcitem_taxtype_id, _l.invcitem_qty_uom_id, _l.invcitem_qty_invuomratio, _l.invcitem_price_uom_id, _l.invcitem_price_invuomratio, _l.invcitem_coitem_id); END LOOP; RETURN _invcheadid; END; $_$; ALTER FUNCTION public.copyinvoice(integer, date) OWNER TO admin; -- -- Name: copyitem(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyitem(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; _itemid INTEGER; _r RECORD; _id INTEGER; BEGIN SELECT NEXTVAL('item_item_id_seq') INTO _itemid; INSERT INTO item ( item_id, item_number, item_descrip1, item_descrip2, item_classcode_id, item_type, item_active, item_picklist, item_sold, item_fractional, item_maxcost, item_prodweight, item_packweight, item_prodcat_id,item_exclusive, item_listprice, item_listcost, item_config, item_comments, item_extdescrip, item_upccode, item_inv_uom_id, item_price_uom_id ) SELECT _itemid, pTItemNumber, item_descrip1, item_descrip2, item_classcode_id, item_type, item_active, item_picklist, item_sold, item_fractional, item_maxcost, item_prodweight, item_packweight, item_prodcat_id, item_exclusive, item_listprice, item_listcost, item_config, item_comments, item_extdescrip, item_upccode, item_inv_uom_id, item_price_uom_id FROM item WHERE (item_id=pSItemid); INSERT INTO imageass (imageass_source_id, imageass_source, imageass_image_id, imageass_purpose) SELECT _itemid, 'I', imageass_image_id, imageass_purpose FROM imageass WHERE ((imageass_source_id=pSItemid) AND (imageass_source='I')); INSERT INTO url (url_source_id, url_source, url_title, url_url) SELECT _itemid, 'I', url_title, url_url FROM url WHERE ((url_source_id=pSItemid) AND (url_source='I')); INSERT INTO itemtax (itemtax_item_id, itemtax_taxzone_id, itemtax_taxtype_id) SELECT _itemid, itemtax_taxzone_id, itemtax_taxtype_id FROM itemtax WHERE(itemtax_item_id=pSItemid); INSERT INTO charass ( charass_target_type, charass_target_id, charass_char_id, charass_value ) SELECT 'I', _itemid, charass_char_id, charass_value FROM charass WHERE ( (charass_target_type='I') AND (charass_target_id=pSItemid) ); FOR _r IN SELECT itemuomconv_id, itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional FROM itemuomconv WHERE(itemuomconv_item_id=pSItemid) LOOP SELECT nextval('itemuomconv_itemuomconv_id_seq') INTO _id; INSERT INTO itemuomconv (itemuomconv_id, itemuomconv_item_id, itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional) VALUES(_id, _itemid, _r.itemuomconv_from_uom_id, _r.itemuomconv_from_value, _r.itemuomconv_to_uom_id, _r.itemuomconv_to_value, _r.itemuomconv_fractional); INSERT INTO itemuom (itemuom_itemuomconv_id, itemuom_uomtype_id) SELECT _id, itemuom_uomtype_id FROM itemuom WHERE(itemuom_itemuomconv_id=_r.itemuomconv_id); END LOOP; RETURN _itemid; END; $_$; ALTER FUNCTION public.copyitem(integer, text) OWNER TO admin; -- -- Name: copyitem(integer, text, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyitem(integer, text, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; pCopyBOM ALIAS FOR $3; pCopyBOO ALIAS FOR $4; -- deprecated - xtmfg-specific pCopyCosts ALIAS FOR $5; BEGIN RAISE NOTICE 'copyItem(INTEGER, TEXT, BOOLEAN, BOOLEAN, BOOLEAN) has been deprecated. Use copyItem(INTEGER, TEXT) or copyItem(INTEGER, TEXT, BOOLEAN, BOOLEAN) or a package-specific version instead.'; RETURN copyItem(pSItemid, pTItemNumber, pCopyBOM, pCopyCosts); END; $_$; ALTER FUNCTION public.copyitem(integer, text, boolean, boolean, boolean) OWNER TO admin; -- -- Name: copyitem(integer, text, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyitem(integer, text, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; pCopyBOM ALIAS FOR $3; pCopyBOO ALIAS FOR $4; -- deprecated - xtmfg-specific pCopyCosts ALIAS FOR $5; pCopyUsedAt ALIAS FOR $6; -- deprecated - xtmfg-specific BEGIN RETURN copyItem(pSItemid, pTItemNumber, pCopyBOM, pCopyCosts); END; $_$; ALTER FUNCTION public.copyitem(integer, text, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: copyitem(integer, text, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyitem(integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; pCopyBOM ALIAS FOR $3; pCopyCosts ALIAS FOR $4; _itemid INTEGER; BEGIN _itemid := copyItem(pSItemid, pTItemNumber); IF (pCopyBOM) THEN PERFORM copyBOM(pSItemid, _itemid, FALSE); END IF; IF (pCopyCosts) THEN INSERT INTO itemcost ( itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_curr_id, itemcost_updated ) SELECT _itemid, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, CURRENT_DATE, itemcost_actcost, itemcost_curr_id, CURRENT_DATE FROM itemcost WHERE (itemcost_item_id=pSItemid); END IF; RETURN _itemid; END; $_$; ALTER FUNCTION public.copyitem(integer, text, boolean, boolean) OWNER TO admin; -- -- Name: copyitemsite(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyitemsite(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemsiteid ALIAS FOR $1; pdestwhsid ALIAS FOR $2; _destwhs whsinfo%ROWTYPE; _new itemsite%ROWTYPE; BEGIN -- make a copy of the old itemsite SELECT * INTO _new FROM itemsite WHERE (itemsite_id=pitemsiteid); IF (NOT FOUND) THEN RETURN -1; END IF; -- if there is no dest warehouse then perhaps the user is manually copying it IF (pdestwhsid IS NOT NULL) THEN SELECT * INTO _destwhs FROM whsinfo WHERE (warehous_id=pdestwhsid); IF (NOT FOUND) THEN RETURN -2; END IF; END IF; IF (NOT checkPrivilege('MaintainItemSites')) THEN RETURN -3; END IF; SELECT itemsite_id INTO _new.itemsite_id FROM itemsite WHERE ((itemsite_item_id=_new.itemsite_item_id) AND (itemsite_warehous_id=pdestwhsid OR (itemsite_warehous_id IS NULL AND pdestwhsid IS NULL))); IF (FOUND) THEN RETURN _new.itemsite_id; END IF; -- now override the things we know have to change _new.itemsite_id := NEXTVAL('itemsite_itemsite_id_seq'); _new.itemsite_warehous_id := pdestwhsid; _new.itemsite_qtyonhand := 0; _new.itemsite_value := 0; _new.itemsite_datelastcount := NULL; _new.itemsite_datelastused := NULL; _new.itemsite_nnqoh := 0; _new.itemsite_location_id := -1; IF (_destwhs.warehous_transit) THEN _new.itemsite_reorderlevel := 0; _new.itemsite_ordertoqty := 0; _new.itemsite_soldranking := NULL; _new.itemsite_posupply := FALSE; _new.itemsite_wosupply := FALSE; _new.itemsite_loccntrl := FALSE; _new.itemsite_safetystock := 0; _new.itemsite_minordqty := 0; _new.itemsite_multordqty := 0; _new.itemsite_leadtime := 0; _new.itemsite_controlmethod := 'R'; IF(_new.itemsite_costmethod='N') THEN _new.itemsite_costmethod := 'S'; END IF; _new.itemsite_active := TRUE; -- ? _new.itemsite_plancode_id := -1; -- ? _new.itemsite_costcat_id := -1; _new.itemsite_eventfence := 1; _new.itemsite_sold := FALSE; _new.itemsite_stocked := FALSE; _new.itemsite_location_id := -1; _new.itemsite_useparams := FALSE; _new.itemsite_useparamsmanual := FALSE; _new.itemsite_createpr := FALSE; _new.itemsite_location := NULL; _new.itemsite_location_comments := NULL; _new.itemsite_notes := 'Transit Warehouse'; _new.itemsite_nnqoh := 0; _new.itemsite_createwo := FALSE; _new.itemsite_costcat_id := _destwhs.warehous_costcat_id; END IF; INSERT INTO itemsite ( itemsite_id, itemsite_item_id, itemsite_warehous_id, itemsite_qtyonhand, itemsite_costmethod, itemsite_value, itemsite_reorderlevel, itemsite_ordertoqty, itemsite_cyclecountfreq, itemsite_datelastcount, itemsite_datelastused, itemsite_posupply, itemsite_wosupply, itemsite_loccntrl, itemsite_safetystock, itemsite_minordqty, itemsite_multordqty, itemsite_leadtime, itemsite_abcclass, itemsite_issuemethod, itemsite_controlmethod, itemsite_active, itemsite_plancode_id, itemsite_costcat_id, itemsite_eventfence, itemsite_sold, itemsite_stocked, itemsite_freeze, itemsite_location_id, itemsite_useparams, itemsite_useparamsmanual, itemsite_soldranking, itemsite_createpr, itemsite_location, itemsite_location_comments, itemsite_notes, itemsite_perishable, itemsite_nnqoh, itemsite_autoabcclass, itemsite_ordergroup, itemsite_disallowblankwip, itemsite_maxordqty, itemsite_mps_timefence, itemsite_createwo, itemsite_warrpurc, itemsite_autoreg, itemsite_planning_type, itemsite_supply_itemsite_id ) VALUES ( _new.itemsite_id, _new.itemsite_item_id, _new.itemsite_warehous_id, _new.itemsite_qtyonhand, _new.itemsite_costmethod, _new.itemsite_value, _new.itemsite_reorderlevel, _new.itemsite_ordertoqty, _new.itemsite_cyclecountfreq, _new.itemsite_datelastcount, _new.itemsite_datelastused, _new.itemsite_posupply, _new.itemsite_wosupply, _new.itemsite_loccntrl, _new.itemsite_safetystock, _new.itemsite_minordqty, _new.itemsite_multordqty, _new.itemsite_leadtime, _new.itemsite_abcclass, _new.itemsite_issuemethod, _new.itemsite_controlmethod, _new.itemsite_active, _new.itemsite_plancode_id, _new.itemsite_costcat_id, _new.itemsite_eventfence, _new.itemsite_sold, _new.itemsite_stocked, _new.itemsite_freeze, _new.itemsite_location_id, _new.itemsite_useparams, _new.itemsite_useparamsmanual, _new.itemsite_soldranking, _new.itemsite_createpr, _new.itemsite_location, _new.itemsite_location_comments, _new.itemsite_notes, _new.itemsite_perishable, _new.itemsite_nnqoh, _new.itemsite_autoabcclass, _new.itemsite_ordergroup, _new.itemsite_disallowblankwip, _new.itemsite_maxordqty, _new.itemsite_mps_timefence, _new.itemsite_createwo, _new.itemsite_warrpurc, _new.itemsite_autoreg, _new.itemsite_planning_type, _new.itemsite_supply_itemsite_id ); RETURN _new.itemsite_id; END; $_$; ALTER FUNCTION public.copyitemsite(integer, integer) OWNER TO admin; -- -- Name: copylocale(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copylocale(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocaleid ALIAS FOR $1; _localecode TEXT; _localeid INTEGER; BEGIN SELECT locale_code INTO _localecode FROM locale WHERE (locale_id=pLocaleid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Attempt to copy a non-existent locale-id.'; END IF; IF (EXISTS(SELECT locale_id FROM locale WHERE (locale_code = (_localecode || '-COPY')))) THEN RAISE EXCEPTION 'Attempt to copy a Locale Code that already exists.'; END IF; SELECT NEXTVAL('locale_locale_id_seq') INTO _localeid; INSERT INTO locale (locale_id, locale_code, locale_descrip, locale_lang_file, locale_dateformat, locale_currformat, locale_qtyformat, locale_comments, locale_qtyperformat, locale_salespriceformat, locale_extpriceformat, locale_timeformat, locale_timestampformat, local_costformat, locale_costformat, locale_purchpriceformat, locale_uomratioformat, locale_intervalformat, locale_lang_id, locale_country_id, locale_error_color, locale_warning_color, locale_emphasis_color, locale_altemphasis_color, locale_expired_color, locale_future_color, locale_curr_scale, locale_salesprice_scale, locale_purchprice_scale, locale_extprice_scale, locale_cost_scale, locale_qty_scale, locale_qtyper_scale, locale_uomratio_scale) SELECT _localeid, locale_code || '-COPY', '', locale_lang_file, locale_dateformat, locale_currformat, locale_qtyformat, locale_comments, locale_qtyperformat, locale_salespriceformat, locale_extpriceformat, locale_timeformat, locale_timestampformat, local_costformat, locale_costformat, locale_purchpriceformat, locale_uomratioformat, locale_intervalformat, locale_lang_id, locale_country_id, locale_error_color, locale_warning_color, locale_emphasis_color, locale_altemphasis_color, locale_expired_color, locale_future_color, locale_curr_scale, locale_salesprice_scale, locale_purchprice_scale, locale_extprice_scale, locale_cost_scale, locale_qty_scale, locale_qtyper_scale, locale_uomratio_scale FROM locale WHERE(locale_id=pLocaleid); RETURN _localeid; END; $_$; ALTER FUNCTION public.copylocale(integer) OWNER TO admin; -- -- Name: copypo(integer, integer, date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copypo(integer, integer, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSrcid ALIAS FOR $1; pVendid ALIAS FOR $2; pOrderdate ALIAS FOR $3; pRecheckVendinfo ALIAS FOR $4; _tgtid INTEGER; _orderdate DATE; _head RECORD; _itemsrc RECORD; _lineitem RECORD; _qty NUMERIC; _unitprice NUMERIC; _uomratio NUMERIC; _vend_restrictpurch BOOLEAN; BEGIN SELECT * INTO _head FROM pohead WHERE pohead_id = pSrcid; IF (NOT FOUND) THEN RETURN -1; END IF; IF (_head.pohead_vend_id != pVendid) THEN RETURN -2; -- not supported now but should be in the future END IF; -- when enabled, set pRecheckVendinfo if vendors don't match IF (pOrderdate IS NULL) THEN _orderdate := CURRENT_DATE; ELSE _orderdate := pOrderdate; END IF; INSERT INTO pohead (pohead_status, pohead_number, pohead_orderdate, pohead_vend_id, pohead_fob, pohead_shipvia, pohead_freight, pohead_printed, pohead_terms_id, pohead_warehous_id, pohead_vendaddr_id, pohead_agent_username, pohead_curr_id, pohead_saved, pohead_taxtype_id, pohead_taxzone_id, pohead_dropship, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry ) VALUES ( 'U', fetchPoNumber(), _orderdate, _head.pohead_vend_id, _head.pohead_fob, _head.pohead_shipvia, _head.pohead_freight, false, _head.pohead_terms_id, _head.pohead_warehous_id, _head.pohead_vendaddr_id, _head.pohead_agent_username, _head.pohead_curr_id, true, _head.pohead_taxtype_id, _head.pohead_taxzone_id, false, _head.pohead_vend_cntct_id, _head.pohead_vend_cntct_honorific, _head.pohead_vend_cntct_first_name, _head.pohead_vend_cntct_middle, _head.pohead_vend_cntct_last_name, _head.pohead_vend_cntct_suffix, _head.pohead_vend_cntct_phone, _head.pohead_vend_cntct_title, _head.pohead_vend_cntct_fax, _head.pohead_vend_cntct_email, _head.pohead_vendaddress1, _head.pohead_vendaddress2, _head.pohead_vendaddress3, _head.pohead_vendcity, _head.pohead_vendstate, _head.pohead_vendzipcode, _head.pohead_vendcountry, _head.pohead_shipto_cntct_id, _head.pohead_shipto_cntct_honorific, _head.pohead_shipto_cntct_first_name, _head.pohead_shipto_cntct_middle, _head.pohead_shipto_cntct_last_name, _head.pohead_shipto_cntct_suffix, _head.pohead_shipto_cntct_phone, _head.pohead_shipto_cntct_title, _head.pohead_shipto_cntct_fax, _head.pohead_shipto_cntct_email, _head.pohead_shiptoaddress_id, _head.pohead_shiptoaddress1, _head.pohead_shiptoaddress2, _head.pohead_shiptoaddress3, _head.pohead_shiptocity, _head.pohead_shiptostate, _head.pohead_shiptozipcode, _head.pohead_shiptocountry); _tgtid := CURRVAL('pohead_pohead_id_seq'); IF (pRecheckVendinfo) THEN SELECT vend_restrictpurch INTO _vend_restrictpurch FROM vendinfo WHERE (vend_id = pVendid); FOR _lineitem IN SELECT * FROM poitem WHERE (poitem_pohead_id = pSrcid) LOOP SELECT * INTO _itemsrc FROM itemsrc, itemsite WHERE (itemsrc_active AND (itemsrc_id = _lineitem.poitem_itemsrc_id) AND (itemsite_id = _lineitem.poitem_itemsite_id)); IF (NOT FOUND AND _vend_restrictpurch) THEN RETURN -3; END IF; -- handle changes to the uom ratio and consequent qty changes _uomratio := COALESCE(_itemsrc.itemsrc_invvendoruomratio, _lineitem.poitem_invvenduomratio); IF (_itemsrc.itemsrc_invvendoruomratio IS NULL OR _itemsrc.itemsrc_invvendoruomratio != _lineitem.poitem_invvenduomratio) THEN _qty := _lineitem.poitem_qty_ordered; ELSE _qty := _lineitem.poitem_qty_ordered * _lineitem.poitem_invvenduomratio / _itemsrc.itemsrc_invvendoruomratio; IF (_itemsrc.itemsrc_minordqty IS NOT NULL) THEN IF (_qty < _itemsrc.itemsrc_minordqty) THEN _qty := _itemsrc.itemsrc_minordqty; ELSIF (_itemsrc.itemsrc_multordqty > 0 AND _qty % _itemsrc.itemsrc_multordqty > 0) THEN _qty = _qty % _itemsrc.itemsrc_multordqty + _itemsrc.itemsrc_multordqty; END IF; END IF; END IF; IF (_itemsrc.itemsrc_id IS NULL) THEN _unitprice = _lineitem.poitem_unitprice; ELSE SELECT itemsrcPrice(_itemsrc.itemsrc_id, _head.pohead_warehous_id, _head.pohead_dropship, _lineitem.poitem_qty_ordered, _head.pohead_curr_id, CURRENT_DATE) INTO _unitprice; IF (_unitprice IS NULL) THEN RETURN -4; END IF; END IF; INSERT INTO poitem (poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_comments, poitem_expcat_id, poitem_itemsrc_id, poitem_freight, poitem_stdcost, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id ) VALUES ( 'U', _tgtid, _lineitem.poitem_linenumber, _orderdate + COALESCE(_itemsrc.itemsrc_leadtime, 0), _lineitem.poitem_itemsite_id, COALESCE(_itemsrc.itemsrc_vend_item_descrip, _lineitem.poitem_vend_item_descrip), COALESCE(_itemsrc.itemsrc_vend_uom, _lineitem.poitem_vend_uom), COALESCE(_itemsrc.itemsrc_invvendoruomratio, _lineitem.poitem_invvenduomratio), _qty, _unitprice, COALESCE(_itemsrc.itemsrc_vend_item_number, _lineitem.poitem_vend_item_number), _lineitem.poitem_comments, _lineitem.poitem_expcat_id, COALESCE(_itemsrc.itemsrc_id, -1), _lineitem.poitem_freight, stdcost(_itemsrc.itemsite_item_id), COALESCE(_itemsrc.itemsrc_manuf_name, _lineitem.poitem_manuf_name), COALESCE(_itemsrc.itemsrc_manuf_item_number, _lineitem.poitem_manuf_item_number), COALESCE(_itemsrc.itemsrc_manuf_item_descrip, _lineitem.poitem_manuf_item_descrip), _lineitem.poitem_taxtype_id); END LOOP; ELSE INSERT INTO poitem (poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_comments, poitem_expcat_id, poitem_itemsrc_id, poitem_freight, poitem_stdcost, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id ) SELECT 'U', _tgtid, poitem_linenumber, _orderdate + COALESCE(itemsrc_leadtime, 0), poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_comments, poitem_expcat_id, poitem_itemsrc_id, poitem_freight, stdcost(itemsite_item_id), poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id FROM poitem LEFT OUTER JOIN itemsrc ON (itemsrc_id=poitem_itemsrc_id) LEFT OUTER JOIN itemsite ON (itemsite_id=poitem_itemsite_id) WHERE (poitem_pohead_id = pSrcid); END IF; -- Todo: recalculate tax? RETURN _tgtid; END; $_$; ALTER FUNCTION public.copypo(integer, integer, date, boolean) OWNER TO admin; -- -- Name: copypricingschedule(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copypricingschedule(pipsheadid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ipsheadid INTEGER; _ipsitemid INTEGER; _ipsfreightid INTEGER; _x RECORD; BEGIN _ipsheadid := nextval('ipshead_ipshead_id_seq'); INSERT INTO ipshead ( ipshead_id, ipshead_name, ipshead_descrip, ipshead_effective, ipshead_expires, ipshead_curr_id, ipshead_updated ) SELECT _ipsheadid, orig.ipshead_name || (SELECT CAST((COUNT(cnt.ipshead_id)+1) AS text) FROM ipshead cnt WHERE (SUBSTRING(cnt.ipshead_name FROM 0 FOR char_length(orig.ipshead_name)+1) = orig.ipshead_name)), orig.ipshead_descrip, orig.ipshead_effective, orig.ipshead_expires, orig.ipshead_curr_id, CURRENT_DATE FROM ipshead orig WHERE (orig.ipshead_id=pIpsheadId); FOR _x IN SELECT ipsitem_id FROM ipsiteminfo WHERE (ipsitem_ipshead_id=pIpsheadid) LOOP INSERT INTO ipsiteminfo (ipsitem_ipshead_id, ipsitem_item_id, ipsitem_prodcat_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_type, ipsitem_warehous_id) SELECT _ipsheadid, ipsitem_item_id, ipsitem_prodcat_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_type, ipsitem_warehous_id FROM ipsiteminfo WHERE (ipsitem_id=_x.ipsitem_id) RETURNING ipsitem_id INTO _ipsitemid; INSERT INTO ipsitemchar ( ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value, ipsitemchar_price) SELECT _ipsitemid, ipsitemchar_char_id, ipsitemchar_value, ipsitemchar_price FROM ipsitemchar WHERE (ipsitemchar_ipsitem_id=_x.ipsitem_id); END LOOP; FOR _x IN SELECT ipsfreight_id FROM ipsfreight WHERE (ipsfreight_ipshead_id=pIpsheadid) LOOP _ipsfreightid := nextval('ipsfreight_ipsfreight_id_seq'); INSERT INTO ipsfreight (ipsfreight_id, ipsfreight_ipshead_id, ipsfreight_qtybreak, ipsfreight_price, ipsfreight_type, ipsfreight_warehous_id, ipsfreight_shipzone_id,ipsfreight_freightclass_id, ipsfreight_shipvia) SELECT _ipsfreightid, _ipsheadid, ipsfreight_qtybreak, ipsfreight_price,ipsfreight_type, ipsfreight_warehous_id,ipsfreight_shipzone_id, ipsfreight_freightclass_id,ipsfreight_shipvia FROM ipsfreight WHERE (ipsfreight_id=_x.ipsfreight_id); END LOOP; RETURN _ipsheadid; END; $$; ALTER FUNCTION public.copypricingschedule(pipsheadid integer) OWNER TO admin; -- -- Name: copyprj(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyprj(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pparentid ALIAS FOR $1; _counter INTEGER; _duedate DATE := COALESCE($2, CURRENT_DATE); _alarmid INTEGER; _i INTEGER; _newnumber TEXT; _p RECORD; _prjid INTEGER; _testnumber TEXT; BEGIN RAISE DEBUG 'copyPrj(%, %) entered', pparentid, _duedate; SELECT * INTO _p FROM prj WHERE (prj_id=pparentid); -- new number = old number up to but not including -, followed by _duedate -- e.g. REPAIR-FRIDGE becomes REPAIR-2010-05-15 -- but REPAIR_FRIDGE becomes REPAIR_FRIDGE-2010-05-15 IF (_p.prj_recurring_prj_id IS NULL) THEN _newnumber := _p.prj_number; ELSE _newnumber := SUBSTRING(_p.prj_number FROM '[^-]*'); IF (_newnumber IS NULL) THEN _newnumber := _p.prj_number; END IF; END IF; _newnumber := _newnumber || '-' || to_char(_duedate, 'YYYY-MM-DD'); RAISE DEBUG 'copyPrj checking if _newnumber % exists', _newnumber; SELECT MAX(prj_number) INTO _testnumber FROM prj WHERE (prj_number ~ ('^' || _newnumber)); IF (_testnumber = _newnumber) THEN _newnumber := _newnumber || '-001'; ELSIF (_testnumber IS NOT NULL) THEN _counter := CAST(SUBSTRING(_testnumber FROM '...$') AS INTEGER); _counter := _counter + 1; _newnumber := REGEXP_REPLACE(_testnumber, '...$', to_char(_counter, 'FM009')); END IF; RAISE DEBUG 'copyPrj _newnumber is now %', _newnumber; INSERT INTO prj( prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po, prj_owner_username, prj_due_date, prj_username, prj_recurring_prj_id ) SELECT _newnumber, _p.prj_name, _p.prj_descrip, 'P', _p.prj_so, _p.prj_wo, _p.prj_po, _p.prj_owner_username, _duedate, _p.prj_username, _p. prj_recurring_prj_id FROM prj WHERE (prj_id=pparentid) RETURNING prj_id INTO _prjid; IF (_prjid IS NULL) THEN RETURN -1; END IF; SELECT saveAlarm(NULL, NULL, _duedate, CAST(alarm_time - DATE_TRUNC('day',alarm_time) AS TIME), alarm_time_offset, alarm_time_qualifier, alarm_event_recipient IS NOT NULL, alarm_event_recipient, alarm_email_recipient IS NOT NULL, alarm_email_recipient, alarm_sysmsg_recipient IS NOT NULL, alarm_sysmsg_recipient, 'J', _prjid, 'CHANGEONE') INTO _alarmid FROM alarm WHERE ((alarm_source='J') AND (alarm_source_id=pparentid)); IF (_alarmid < 0) THEN RETURN _alarmid; END IF; RETURN _prjid; END; $_$; ALTER FUNCTION public.copyprj(integer, date) OWNER TO admin; -- -- Name: copyproject(integer, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyproject(integer, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrjId ALIAS FOR $1; pPrjNumber ALIAS FOR $2; pDueDateOffset ALIAS FOR $3; _prjid INTEGER; BEGIN IF (COALESCE(pPrjNumber, '') = '') THEN RETURN -1; END IF; IF (EXISTS(SELECT prj_id FROM prj WHERE UPPER(prj_number)=UPPER(pPrjNumber))) THEN RETURN -2; END IF; IF (NOT EXISTS(SELECT prj_id FROM prj WHERE prj_id=pPrjId)) THEN RETURN -3; END IF; SELECT NEXTVAL('prj_prj_id_seq') INTO _prjid; INSERT INTO prj ( prj_id, prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po, prj_owner_username, prj_start_date, prj_due_date, prj_assigned_date, prj_completed_date, prj_username, prj_recurring_prj_id, prj_crmacct_id, prj_cntct_id ) SELECT _prjid, UPPER(pPrjNumber), prj_name, prj_descrip, 'P', prj_so, prj_wo, prj_po, prj_owner_username, NULL, (prj_due_date + COALESCE(pDueDateOffset, 0)), CASE WHEN (prj_username IS NULL) THEN NULL ELSE CURRENT_DATE END, NULL, prj_username, prj_recurring_prj_id, prj_crmacct_id, prj_cntct_id FROM prj WHERE (prj_id=pPrjId); INSERT INTO prjtask ( prjtask_number, prjtask_name, prjtask_descrip, prjtask_prj_id, prjtask_anyuser, prjtask_status, prjtask_hours_budget, prjtask_hours_actual, prjtask_exp_budget, prjtask_exp_actual, prjtask_owner_username, prjtask_start_date, prjtask_due_date, prjtask_assigned_date, prjtask_completed_date, prjtask_username ) SELECT prjtask_number, prjtask_name, prjtask_descrip, _prjid, prjtask_anyuser, 'P', prjtask_hours_budget, 0.0, prjtask_exp_budget, 0.0, prjtask_owner_username, NULL, (prjtask_due_date + COALESCE(pDueDateOffset, 0)), CASE WHEN (prjtask_username IS NULL) THEN NULL ELSE CURRENT_DATE END, NULL, prjtask_username FROM prjtask WHERE (prjtask_prj_id=pPrjId); INSERT INTO docass ( docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose ) SELECT _prjid, docass_source_type, docass_target_id, docass_target_type, docass_purpose FROM docass WHERE ((docass_source_id=pPrjId) AND (docass_source_type='J')); RETURN _prjid; END; $_$; ALTER FUNCTION public.copyproject(integer, text, integer) OWNER TO admin; -- -- Name: copyquote(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyquote(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pSchedDate ALIAS FOR $2; _quheadid INTEGER; _qunumber TEXT; BEGIN SELECT NEXTVAL('quhead_quhead_id_seq') INTO _quheadid; IF (fetchMetricText('QUNumberGeneration') = 'S') THEN SELECT fetchSoNumber() INTO _qunumber; ELSE SELECT fetchQuNumber() INTO _qunumber; END IF; INSERT INTO quhead ( quhead_id, quhead_number, quhead_cust_id, quhead_prj_id, quhead_quotedate, quhead_packdate, quhead_fob, quhead_warehous_id, quhead_terms_id, quhead_salesrep_id, quhead_custponumber, quhead_shipvia, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptophone, quhead_shiptocountry, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_misc_accnt_id, quhead_misc_descrip, quhead_misc, quhead_freight, quhead_commission, quhead_ordercomments, quhead_shipcomments, quhead_imported, quhead_curr_id, quhead_taxzone_id, quhead_taxtype_id, quhead_ophead_id, quhead_status, quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email ) SELECT _quheadid, _qunumber, quhead_cust_id, quhead_prj_id, CURRENT_DATE, COALESCE(pSchedDate, quhead_packdate), quhead_fob, quhead_warehous_id, quhead_terms_id, quhead_salesrep_id, quhead_custponumber, quhead_shipvia, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptophone, quhead_shiptocountry, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_misc_accnt_id, quhead_misc_descrip, quhead_misc, quhead_freight, quhead_commission, quhead_ordercomments, quhead_shipcomments, FALSE, quhead_curr_id, quhead_taxzone_id, quhead_taxtype_id, quhead_ophead_id, 'O', quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email FROM quhead WHERE (quhead_id=pQuheadid); INSERT INTO quitem ( quitem_quhead_id, quitem_linenumber, quitem_itemsite_id, quitem_scheddate, quitem_promdate, quitem_qtyord, quitem_price, quitem_custprice, quitem_unitcost, quitem_qty_uom_id, quitem_price_uom_id, quitem_qty_invuomratio, quitem_price_invuomratio, quitem_memo, quitem_custpn, quitem_imported, quitem_taxtype_id, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_dropship, quitem_itemsrc_id, quitem_pricemode ) SELECT _quheadid, quitem_linenumber, quitem_itemsite_id, COALESCE(pSchedDate, quitem_scheddate), quitem_promdate, quitem_qtyord, quitem_price, quitem_custprice, stdCost(itemsite_item_id), quitem_qty_uom_id, quitem_price_uom_id, quitem_qty_invuomratio, quitem_price_invuomratio, quitem_memo, quitem_custpn, FALSE, quitem_taxtype_id, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_dropship, quitem_itemsrc_id, quitem_pricemode FROM quitem, itemsite WHERE ( (quitem_itemsite_id=itemsite_id) AND (quitem_quhead_id=pQuheadid)); INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT charass_target_type, b.quitem_id, charass_char_id, charass_value FROM quitem a, charass, quitem b WHERE ((charass_target_type='SI') AND (charass_target_id=a.quitem_id) AND (a.quitem_quhead_id=pQuheadid) AND (b.quitem_quhead_id=_quheadid) AND (a.quitem_linenumber=b.quitem_linenumber) ); RETURN _quheadid; END; $_$; ALTER FUNCTION public.copyquote(integer, date) OWNER TO admin; -- -- Name: copyso(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyso(psoheadid integer, pscheddate date) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _soheadid INTEGER; _soitemid INTEGER; _soitem RECORD; BEGIN SELECT NEXTVAL('cohead_cohead_id_seq') INTO _soheadid; INSERT INTO cohead ( cohead_id, cohead_number, cohead_cust_id, cohead_custponumber, cohead_type, cohead_orderdate, cohead_warehous_id, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_shiptoaddress4, cohead_shiptoaddress5, cohead_salesrep_id, cohead_terms_id, cohead_fob, cohead_shipvia, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_freight, cohead_misc, cohead_imported, cohead_ordercomments, cohead_shipcomments, cohead_shiptophone, cohead_shipchrg_id, cohead_shipform_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_misc_accnt_id, cohead_misc_descrip, cohead_commission, cohead_miscdate, cohead_holdtype, cohead_packdate, cohead_prj_id, cohead_wasquote, cohead_lastupdated, cohead_shipcomplete, cohead_created, cohead_creator, cohead_quote_number, cohead_billtocountry, cohead_shiptocountry, cohead_curr_id, cohead_calcfreight, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_taxzone_id, cohead_taxtype_id, cohead_ophead_id, cohead_status, cohead_saletype_id, cohead_shipzone_id ) SELECT _soheadid, fetchSoNumber(), cohead_cust_id, cohead_custponumber, cohead_type, CURRENT_DATE, cohead_warehous_id, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_shiptoaddress4, cohead_shiptoaddress5, cohead_salesrep_id, cohead_terms_id, cohead_fob, cohead_shipvia, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_freight, cohead_misc, FALSE, cohead_ordercomments, cohead_shipcomments, cohead_shiptophone, cohead_shipchrg_id, cohead_shipform_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_misc_accnt_id, cohead_misc_descrip, cohead_commission, cohead_miscdate, cohead_holdtype, COALESCE(pSchedDate, cohead_packdate), cohead_prj_id, FALSE, cohead_lastupdated, cohead_shipcomplete, NULL, getEffectiveXtUser(), NULL, cohead_billtocountry, cohead_shiptocountry, cohead_curr_id, cohead_calcfreight, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_taxzone_id, cohead_taxtype_id, cohead_ophead_id, cohead_status, cohead_saletype_id, cohead_shipzone_id FROM cohead WHERE (cohead_id=pSoheadid); FOR _soitem IN SELECT * FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE ( (coitem_cohead_id=pSoheadid) AND (coitem_status <> 'X') AND (coitem_subnumber = 0) ) LOOP SELECT NEXTVAL('coitem_coitem_id_seq') INTO _soitemid; -- insert characteristics first so they can be copied to associated supply order INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT charass_target_type, _soitemid, charass_char_id, charass_value FROM charass WHERE ((charass_target_type='SI') AND (charass_target_id=_soitem.coitem_id)); INSERT INTO coitem ( coitem_id, coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_unitcost, coitem_price, coitem_custprice, coitem_qtyshipped, coitem_order_id, coitem_memo, coitem_imported, coitem_qtyreturned, coitem_closedate, coitem_custpn, coitem_order_type, coitem_close_username, -- coitem_lastupdated, coitem_substitute_item_id, coitem_created, coitem_creator, coitem_prcost, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_price_uom_id, coitem_price_invuomratio, coitem_warranty, coitem_cos_accnt_id, coitem_qtyreserved, coitem_subnumber, coitem_firm, coitem_taxtype_id ) VALUES ( _soitemid, _soheadid, _soitem.coitem_linenumber, _soitem.coitem_itemsite_id, 'O', COALESCE(pSchedDate, _soitem.coitem_scheddate), _soitem.coitem_promdate, _soitem.coitem_qtyord, stdCost(_soitem.itemsite_item_id), _soitem.coitem_price, _soitem.coitem_custprice, 0.0, -1, _soitem.coitem_memo, FALSE, 0.0, NULL, _soitem.coitem_custpn, _soitem.coitem_order_type, NULL, -- NULL, _soitem.coitem_substitute_item_id, NULL, getEffectiveXtUser(), _soitem.coitem_prcost, _soitem.coitem_qty_uom_id, _soitem.coitem_qty_invuomratio, _soitem.coitem_price_uom_id, _soitem.coitem_price_invuomratio, _soitem.coitem_warranty, _soitem.coitem_cos_accnt_id, 0.0, _soitem.coitem_subnumber, _soitem.coitem_firm, _soitem.coitem_taxtype_id ); END LOOP; RETURN _soheadid; END; $$; ALTER FUNCTION public.copyso(psoheadid integer, pscheddate date) OWNER TO admin; -- -- Name: copytodoitem(integer, date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copytodoitem(integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pparentid ALIAS FOR $1; _duedate DATE := COALESCE($2, CURRENT_DATE); pincdtid ALIAS FOR $3; _alarmid INTEGER; _todoitemid INTEGER; BEGIN INSERT INTO todoitem( todoitem_name, todoitem_description, todoitem_incdt_id, todoitem_creator_username, todoitem_status, todoitem_active, todoitem_due_date, todoitem_assigned_date, todoitem_seq, todoitem_notes, todoitem_crmacct_id, todoitem_ophead_id, todoitem_owner_username,todoitem_priority_id, todoitem_username, todoitem_recurring_todoitem_id ) SELECT todoitem_name, todoitem_description, CASE WHEN pincdtid IS NULL THEN todoitem_incdt_id ELSE pincdtid END, getEffectiveXtUser(), 'N', TRUE, _duedate, CASE WHEN (todoitem_username IS NOT NULL) THEN CURRENT_DATE ELSE NULL END, todoitem_seq, todoitem_notes, todoitem_crmacct_id, todoitem_ophead_id, todoitem_owner_username,todoitem_priority_id, todoitem_username, todoitem_recurring_todoitem_id FROM todoitem WHERE (todoitem_id=pparentid) RETURNING todoitem_id INTO _todoitemid; IF (_todoitemid IS NULL) THEN RETURN -10; END IF; SELECT saveAlarm(NULL, NULL, _duedate, CAST(alarm_time - DATE_TRUNC('day',alarm_time) AS TIME), alarm_time_offset, alarm_time_qualifier, alarm_event, alarm_event_recipient, alarm_email, alarm_email_recipient, alarm_sysmsg, alarm_sysmsg_recipient, 'TODO', _todoitemid, 'CHANGEONE') INTO _alarmid FROM alarm WHERE ((alarm_source='TODO') AND (alarm_source_id=pparentid)); IF (_alarmid < 0) THEN RETURN _alarmid; END IF; RETURN _todoitemid; END; $_$; ALTER FUNCTION public.copytodoitem(integer, date, integer) OWNER TO admin; -- -- Name: copyvoucher(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION copyvoucher(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoheadid ALIAS FOR $1; _voheadid INTEGER; _vonumber TEXT; _vodate DATE := COALESCE($2, CURRENT_DATE); _i RECORD; _l RECORD; _vodistid INTEGER; BEGIN SELECT * INTO _i FROM vohead WHERE(vohead_id=pVoheadid); IF(NOT FOUND) THEN RETURN -1; END IF; _vonumber := fetchVoNumber(); _voheadid := nextval('vohead_vohead_id_seq'); INSERT INTO vohead (vohead_id, vohead_number, vohead_pohead_id, vohead_posted, vohead_duedate, vohead_invcnumber, vohead_amount, vohead_docdate, vohead_1099, vohead_distdate, vohead_reference, vohead_terms_id, vohead_vend_id, vohead_curr_id, vohead_adjtaxtype_id, vohead_freighttaxtype_id, vohead_gldistdate, vohead_misc, vohead_taxzone_id, vohead_taxtype_id, vohead_notes, vohead_recurring_vohead_id ) VALUES(_voheadid, _vonumber, _i.vohead_pohead_id, false, determineDueDate(_i.vohead_terms_id, _vodate), _i.vohead_invcnumber, _i.vohead_amount, _vodate, _i.vohead_1099, _vodate, _i.vohead_reference, _i.vohead_terms_id, _i.vohead_vend_id, _i.vohead_curr_id, _i.vohead_adjtaxtype_id, _i.vohead_freighttaxtype_id, _vodate, _i.vohead_misc, _i.vohead_taxzone_id, _i.vohead_taxtype_id, _i.vohead_notes, _i.vohead_recurring_vohead_id); FOR _l IN SELECT * FROM vodist WHERE (vodist_vohead_id=pVoheadid) LOOP SELECT NEXTVAL('vodist_vodist_id_seq') INTO _vodistid; INSERT INTO vodist (vodist_id, vodist_poitem_id, vodist_vohead_id, vodist_costelem_id, vodist_accnt_id, vodist_amount, vodist_qty, vodist_expcat_id, vodist_tax_id, vodist_discountable, vodist_notes) VALUES (_vodistid, _l.vodist_poitem_id, _voheadid, _l.vodist_costelem_id, _l.vodist_accnt_id, _l.vodist_amount, _l.vodist_qty, _l.vodist_expcat_id, _l.vodist_tax_id, _l.vodist_discountable, _l.vodist_notes); END LOOP; RETURN _voheadid; END; $_$; ALTER FUNCTION public.copyvoucher(integer, date) OWNER TO admin; -- -- Name: correctporeceipt(integer, numeric, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION correctporeceipt(integer, numeric, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPorecvid ALIAS FOR $1; pQty ALIAS FOR $2; pFreight ALIAS FOR $3; pItemlocSeries ALIAS FOR $4; BEGIN RETURN correctReceipt('PO', $1, $2, $3, $4, NULL, NULL); END; $_$; ALTER FUNCTION public.correctporeceipt(integer, numeric, numeric, integer) OWNER TO admin; -- -- Name: correctporeceipt(integer, numeric, numeric, integer, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION correctporeceipt(integer, numeric, numeric, integer, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN correctReceipt('PO', $1, $2, $3, $4, $5, $6); END; $_$; ALTER FUNCTION public.correctporeceipt(integer, numeric, numeric, integer, integer, date) OWNER TO admin; -- -- Name: correctproduction(integer, numeric, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION correctproduction(integer, numeric, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'correctProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN) has been deprecated. Use corrrectProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER) or a package-specific version instead.'; RETURN correctProduction($1, $2, $3, 0, now()); END; $_$; ALTER FUNCTION public.correctproduction(integer, numeric, boolean, boolean) OWNER TO admin; -- -- Name: correctproduction(integer, numeric, boolean, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION correctproduction(integer, numeric, boolean, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'correctProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN, INTEGER) has been deprecated. Use corrrectProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER) or a package-specific version instead.'; RETURN correctProduction($1, $2, $3, $5, now()); END; $_$; ALTER FUNCTION public.correctproduction(integer, numeric, boolean, boolean, integer) OWNER TO admin; -- -- Name: correctproduction(integer, numeric, boolean, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION correctproduction(integer, numeric, boolean, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pQty ALIAS FOR $2; pBackflush ALIAS FOR $3; pItemlocSeries ALIAS FOR $4; pGlDistTS ALIAS FOR $5; BEGIN RETURN correctProduction($1, $2, $3, $4, $5, NULL); END; $_$; ALTER FUNCTION public.correctproduction(integer, numeric, boolean, integer, timestamp with time zone) OWNER TO admin; -- -- Name: correctproduction(integer, numeric, boolean, integer, timestamp with time zone, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION correctproduction(integer, numeric, boolean, integer, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pQty ALIAS FOR $2; pBackflush ALIAS FOR $3; pItemlocSeries ALIAS FOR $4; pGlDistTS ALIAS FOR $5; pInvhistId ALIAS FOR $6; _invhistid INTEGER; _itemlocSeries INTEGER; _r RECORD; _parentWIPAccntid INTEGER; _parentQty NUMERIC; _qty NUMERIC; _wipPost NUMERIC; _sense TEXT; _status TEXT; _type TEXT; _qtyfxd NUMERIC := 0; BEGIN -- Qty is positive for Assembly W/O -- Qty is negative for Disassembly W/O IF (pQty = 0) THEN RETURN pItemlocseries; ELSIF (pQty > 0) THEN _sense := 'from'; ELSE _sense := 'to'; END IF; SELECT item_type, roundQty(item_fractional, pQty), wo_status INTO _type, _parentQty, _status FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE (wo_id=pWoid); IF (_status != 'I') THEN RETURN -1; END IF; IF (_type = 'J') THEN RETURN -2; END IF; IF (pItemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; ELSE _itemlocSeries := pItemlocSeries; END IF; -- Calculate the WIP to correct SELECT CASE WHEN (wo_cosmethod = 'D') THEN wo_postedvalue ELSE round(((wo_postedvalue - wo_wipvalue) / wo_qtyrcv * _parentQty), 2) END INTO _wipPost FROM wo WHERE (wo_id=pWoid); -- Post the inventory transaction SELECT postInvTrans( itemsite_id, 'RM', (_parentQty * -1.0), 'W/O', 'WO', formatwonumber(pWoid), '', ('Correct Receive Inventory ' || item_number || ' ' || _sense || ' Manufacturing'), costcat_asset_accnt_id, getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), _itemlocSeries, pGlDistTS, (_wipPost * -1.0), -- only used when cost is average pInvhistId) INTO _invhistid FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN item ON (item_id=itemsite_item_id) JOIN costcat ON (costcat_id=itemsite_costcat_id) WHERE (wo_id=pWoid); -- Decrease this W/O's qty. received and increase its WIP value UPDATE wo SET wo_qtyrcv = (wo_qtyrcv - _parentQty), wo_wipvalue = (wo_wipvalue + (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _wipPost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _parentQty ELSE 0.0 END)) FROM itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (wo_id=pWoid) ); IF (pBackflush) THEN FOR _r IN SELECT item_id, item_fractional, itemsite_id, itemsite_warehous_id, itemsite_controlmethod, itemsite_loccntrl, itemsite_costmethod, wo_qtyrcv, wo_prj_id, womatl_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_issuemethod, womatl_uom_id FROM wo JOIN womatl ON (womatl_wo_id=wo_id AND womatl_issuemethod='L') JOIN itemsite ON (itemsite_id=womatl_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE (wo_id=pWoid) LOOP -- Cache the qty to be issued -- If going back to beginning, unissue fixed qty as well IF (_r.wo_qtyrcv - _parentQty > 0) THEN _qtyfxd := 0; ELSE _qtyfxd := _r.womatl_qtyfxd; END IF; _qty = roundQty(_r.item_fractional, (_qtyfxd + _parentQty * _r.womatl_qtyper) * (1 + _r.womatl_scrap)); IF (_qty > 0) THEN SELECT returnWoMaterial(_r.womatl_id, _qty, _itemlocSeries, pGlDistTS) INTO _itemlocSeries; END IF; END LOOP; -- BEGIN ROB Decrease this W/O's WIP value for custom costing UPDATE wo SET wo_wipvalue = (wo_wipvalue - (itemcost_stdcost * _parentQty)) FROM costelem, itemcost, costcat, itemsite, item WHERE ((wo_id=pWoid) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (costelem_id = itemcost_costelem_id) AND (itemcost_item_id = itemsite_item_id) AND (itemsite_costcat_id = costcat_id) AND (costelem_exp_accnt_id) IS NOT NULL AND (costelem_sys = false)); -- ROB Distribute to G/L - create Cost Variance, debit WIP PERFORM insertGLTransaction( 'W/O', 'WO', formatwonumber(pWoid), ('Correct Post Other Cost ' || item_number || ' ' || _sense || ' Manufacturing'), getPrjAccntId(wo_prj_id, costelem_exp_accnt_id), getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), _invhistid, ((itemcost_stdcost * _parentQty)* -1), CURRENT_DATE ) FROM wo, costelem, itemcost, costcat, itemsite, item WHERE ((wo_id=pWoid) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (costelem_id = itemcost_costelem_id) AND (itemcost_item_id = itemsite_item_id) AND (itemsite_costcat_id = costcat_id) AND (costelem_exp_accnt_id) IS NOT NULL AND (costelem_sys = false)); --End ROB END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.correctproduction(integer, numeric, boolean, integer, timestamp with time zone, integer) OWNER TO admin; -- -- Name: correctreceipt(integer, numeric, numeric, integer, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION correctreceipt(integer, numeric, numeric, integer, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ BEGIN RETURN correctReceipt($1, $2, $3, $4, $5, $6, NULL); END; $_$; ALTER FUNCTION public.correctreceipt(integer, numeric, numeric, integer, integer, date) OWNER TO admin; -- -- Name: correctreceipt(integer, numeric, numeric, integer, integer, date, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION correctreceipt(integer, numeric, numeric, integer, integer, date, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE precvid ALIAS FOR $1; pQty ALIAS FOR $2; pFreight ALIAS FOR $3; _itemlocSeries INTEGER := COALESCE($4, 0); _currid INTEGER := $5; pEffective ALIAS FOR $6; pRecvCost ALIAS FOR $7; _freight NUMERIC; _qty NUMERIC; _invhistid INTEGER; _o RECORD; _r RECORD; _recvcost NUMERIC; _tmp INTEGER; _pricevar NUMERIC := 0.00; _journalNumber INTEGER := fetchJournalNumber('GL-MISC'); BEGIN SELECT recv_qty, recv_date::DATE AS recv_date, recv_freight_curr_id, recv_orderitem_id, round(currToCurr(recv_freight_curr_id, COALESCE(_currid, recv_freight_curr_id), recv_freight, recv_date::DATE),2) AS recv_freight, recv_posted, recv_order_type, COALESCE(itemsite_id, -1) AS itemsiteid, itemsite_item_id, itemsite_costmethod, itemsite_controlmethod, (recv_splitfrom_id IS NOT NULL OR (SELECT (count(*) > 0) FROM recv WHERE (recv_splitfrom_id=recv_id))) AS split INTO _r FROM recv LEFT OUTER JOIN itemsite ON (recv_itemsite_id=itemsite_id) WHERE (recv_id=precvid); IF (NOT FOUND) THEN RETURN _itemlocSeries; END IF; IF (NOT _r.recv_order_type IN ('PO', 'RA', 'TO')) THEN RETURN -11; END IF; IF (_r.split) THEN RETURN -12; END IF; SELECT currToBase(orderitem_unitcost_curr_id, orderitem_unitcost, _r.recv_date::DATE) AS unitprice_base, orderhead_number, orderitem_linenumber, orderhead_curr_id AS freight_curr_id, orderitem_orderhead_type, orderitem_qty_invuomratio INTO _o FROM orderhead, orderitem WHERE ((orderhead_id=orderitem_orderhead_id) AND (orderhead_type=orderitem_orderhead_type) AND (orderitem_id=_r.recv_orderitem_id) AND (orderitem_orderhead_type=_r.recv_order_type)); IF (NOT FOUND) THEN RETURN _itemlocSeries; END IF; -- Default to _o.orderitem_unitcost if recv_purchcost is not supplied -- Note: this should never happen, a value is always supplied if (pRecvCost IS NULL) THEN _recvcost := _o.orderitem_unitcost; ELSE -- Note: if the receipt has already been posted, pRecvCost will always -- equal the original recv_purchcost (cannot be modified in GUI) _recvcost := pRecvCost; END IF; IF (_r.recv_posted) THEN _qty := (pQty - _r.recv_qty); IF (_qty <> 0) THEN IF (_r.itemsiteid = -1) THEN PERFORM insertGLTransaction( _journalNumber,'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory from ' || _r.recv_order_type, expcat_liability_accnt_id, getPrjAccntId(poitem_prj_id, expcat_exp_accnt_id), -1, ROUND(_o.unitprice_base * _qty, 2), pEffective ) FROM poitem, expcat WHERE ((poitem_expcat_id=expcat_id) AND (poitem_id=_r.recv_orderitem_id) AND (_o.orderitem_orderhead_type='PO')); UPDATE recv SET recv_qty=pQty, recv_value=(recv_value + ROUND(_o.unitprice_base * _qty, 2)), recv_date = pEffective WHERE (recv_id=precvid); ELSEIF (_r.itemsite_controlmethod = 'N') THEN PERFORM insertGLTransaction( _journalNumber,'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Controlled Inventory from ' || _r.recv_order_type, costcat_liability_accnt_id, getPrjAccntId(poitem_prj_id, costcat_exp_accnt_id), -1, ROUND(_o.unitprice_base * _qty, 2), pEffective ) FROM poitem, itemsite, costcat WHERE ((poitem_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (poitem_id=_r.recv_orderitem_id) AND (_o.orderitem_orderhead_type='PO')); UPDATE recv SET recv_qty=pQty, recv_value=(recv_value + ROUND(_o.unitprice_base * _qty, 2)), recv_date = pEffective WHERE (recv_id=precvid); ELSE IF (_itemlocSeries = 0 OR _itemlocSeries IS NULL) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; SELECT postInvTrans( itemsite_id, 'RP', (_qty * _o.orderitem_qty_invuomratio), 'S/R', _r.recv_order_type, _o.orderhead_number::TEXT || '-' || _o.orderitem_linenumber::TEXT, '', 'Receive Inventory from ' || _r.recv_order_type, costcat_asset_accnt_id, costcat_liability_accnt_id, _itemlocSeries, pEffective, ROUND(_recvcost * _qty, 2) -- alway passing since it is ignored if not average costed item ) INTO _tmp FROM itemsite, costcat WHERE ((itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsiteid) ); IF(_r.itemsite_costmethod='A') THEN UPDATE recv SET recv_qty=pQty, recv_value=(recv_value + _recvcost * _qty * _o.orderitem_qty_invuomratio), recv_date = pEffective WHERE(recv_id=precvid); ELSE UPDATE recv SET recv_qty=pQty, recv_value=(recv_value + stdcost(_r.itemsite_item_id) * _qty * _o.orderitem_qty_invuomratio), recv_date = pEffective WHERE(recv_id=precvid); END IF; END IF; IF (_r.recv_order_type = 'PO') THEN UPDATE poitem SET poitem_qty_received=(poitem_qty_received + _qty) WHERE (poitem_id=_r.recv_orderitem_id); ELSIF (_r.recv_order_type = 'RA' AND fetchMetricBool('EnableReturnAuth')) THEN UPDATE raitem SET raitem_qtyreceived=(raitem_qtyreceived + _qty) WHERE (raitem_id=_r.recv_orderitem_id); ELSIF (_r.recv_order_type = 'TO' AND fetchMetricBool('MultiWhs')) THEN UPDATE toitem SET toitem_qty_received=(toitem_qty_received + _qty) WHERE (toitem_id=_r.recv_orderitem_id); END IF; END IF; IF (fetchMetricBool('RecordPPVonReceipt')) THEN -- If the 'Purchase Price Variance on Receipt' option is true _invhistid := _tmp; -- Find the difference in the purchase price value expected from the P/O and the value of the transaction SELECT (((currToBase(pohead_curr_id, COALESCE(recv_purchcost, poitem_unitprice), recv_date::DATE)) * _qty) - (invhist_value_after - invhist_value_before)) INTO _pricevar FROM invhist, recv, pohead, poitem WHERE ((recv_orderitem_id=poitem_id) AND (poitem_pohead_id=pohead_id) AND (recv_id=precvid) AND (invhist_id = _invhistid)); -- If difference exists then IF (_pricevar <> 0.00) THEN -- Record an additional GL Transaction for the purchase price variance SELECT insertGLTransaction( _journalNumber, 'S/R', _r.recv_order_type, _o.orderhead_number, 'Purchase price variance adjusted for P/O ' || _o.orderhead_number || ' for item ' || _o.orderitem_linenumber::TEXT, costcat_liability_accnt_id, getPrjAccntId(poitem_prj_id, costcat_purchprice_accnt_id), -1, _pricevar, pEffective, false ) INTO _tmp FROM itemsite, costcat, poitem, recv WHERE ((itemsite_costcat_id=costcat_id) AND (recv_id=precvid) AND (recv_orderitem_id=poitem_id) AND (itemsite_id=recv_itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not insert G/L transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; END IF; END IF; _freight := (pFreight - _r.recv_freight); IF (_freight <> 0) THEN IF (_r.itemsiteid = -1) THEN PERFORM insertGLTransaction( _journalNumber,'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory Freight from ' || _r.recv_order_type, expcat_liability_accnt_id, getPrjAccntId(poitem_prj_id, expcat_freight_accnt_id), -1, ROUND(currToBase(_currid, _freight, pEffective), 2), pEffective ) FROM poitem, expcat WHERE ((poitem_expcat_id=expcat_id) AND (poitem_id=_r.recv_orderitem_id) AND (_r.recv_order_type='PO')); ELSE PERFORM insertGLTransaction(_journalNumber,'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory Freight from ' || _r.recv_order_type, costcat_liability_accnt_id, costcat_freight_accnt_id, -1, round(currToBase(_currid, _freight, pEffective), 2), pEffective ) FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsiteid) ); END IF; IF (_r.recv_order_type = 'PO') THEN UPDATE poitem SET poitem_freight_received=(poitem_freight_received + currToCurr(_currid, _o.freight_curr_id, _freight, pEffective)) WHERE (poitem_id=_r.recv_orderitem_id); -- raitem does not track freight ELSEIF (_r.recv_order_type = 'TO' AND fetchMetricBool('MultiWhs')) THEN UPDATE toitem SET toitem_freight_received=(toitem_freight_received + currToCurr(_currid, _o.freight_curr_id, _freight, pEffective)) WHERE (toitem_id=_r.recv_orderitem_id); END IF; UPDATE recv SET recv_freight=currToCurr(_currid, recv_freight_curr_id, pFreight, pEffective), recv_date = pEffective WHERE (recv_id=precvid); END IF; ELSE -- Receipt not posted yet UPDATE recv SET recv_qty=pQty, recv_freight=pFreight, recv_purchcost=_recvcost WHERE recv_id=precvid; END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.correctreceipt(integer, numeric, numeric, integer, integer, date, numeric) OWNER TO admin; -- -- Name: cosbycustomervalue(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION cosbycustomervalue(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist WHERE ( (cohist_cust_id=pCustid) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.cosbycustomervalue(integer, integer) OWNER TO admin; -- -- Name: costsbycustomerbyitemsite(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION costsbycustomerbyitemsite(integer, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPeriodid ALIAS FOR $3; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist WHERE ( (cohist_itemsite_id<>pItemsiteid) AND (cohist_cust_id=pCustid) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.costsbycustomerbyitemsite(integer, integer, integer) OWNER TO admin; -- -- Name: costsbycustomervalue(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION costsbycustomervalue(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist WHERE ( (cohist_itemsite_id<>-1) AND (cohist_cust_id=pCustid) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.costsbycustomervalue(integer, integer) OWNER TO admin; -- -- Name: costsbycustomervalue(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION costsbycustomervalue(integer, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pProdcatid ALIAS FOR $3; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist, itemsite, item WHERE ( (cohist_cust_id=pCustid) AND (cohist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_prodcat_id=pProdcatid) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.costsbycustomervalue(integer, integer, integer) OWNER TO admin; -- -- Name: costsbycustomervalue(integer, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION costsbycustomervalue(integer, integer, text) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pProdcat ALIAS FOR $3; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right date to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist, itemsite, item, prodcat WHERE ( (cohist_cust_id=pCustid) AND (cohist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_prodcat_id=prodcat_id) AND (prodcat_code ~ pProdcat) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.costsbycustomervalue(integer, integer, text) OWNER TO admin; -- -- Name: createaccountingperiod(date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createaccountingperiod(date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; pEndDate ALIAS FOR $2; BEGIN RETURN createAccountingPeriod(pStartDate, pEndDate, NULL, NULL); END; $_$; ALTER FUNCTION public.createaccountingperiod(date, date) OWNER TO admin; -- -- Name: createaccountingperiod(date, date, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createaccountingperiod(date, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; pEndDate ALIAS FOR $2; pYearPeriodId ALIAS FOR $3; pQuarter ALIAS FOR $4; _periodid INTEGER; _check INTEGER; _r RECORD; _initial BOOLEAN; _number INTEGER; BEGIN -- Make that the passed start date doesn't fall into any existing period SELECT period_id INTO _check FROM period WHERE (pStartDate BETWEEN period_start AND period_end); IF (FOUND) THEN RETURN -1; END IF; -- Make that the passed end date doesn't fall into any existing period SELECT period_id INTO _check FROM period WHERE (pEndDate BETWEEN period_start AND period_end); IF (FOUND) THEN RETURN -2; END IF; -- Make that the passed start and end dates don't enclose an existing period SELECT period_id INTO _check FROM period WHERE ( (period_start >= pStartDate) AND (period_end <= pEndDate) ); IF (FOUND) THEN RETURN -3; END IF; -- Make sure period is inside fiscal year SELECT yearperiod_id INTO _check FROM yearperiod WHERE ((yearperiod_id=pYearPeriodId) AND (pStartDate>=yearperiod_start) AND (pEndDate<=yearperiod_end)); IF NOT (FOUND) THEN RETURN -4; END IF; -- Determine if this is the initial accounting period SELECT CASE WHEN(count(*) > 0) THEN FALSE ELSE TRUE END INTO _initial FROM period; -- Determine the next number SELECT COALESCE(MAX(period_number),0) + 1 INTO _number FROM period WHERE (period_yearperiod_id=pYearPeriodId); -- Create the new accounting period SELECT NEXTVAL('period_period_id_seq') INTO _periodid; INSERT INTO period ( period_id, period_start, period_end, period_closed, period_freeze, period_initial, period_number, period_yearperiod_id, period_quarter ) VALUES ( _periodid, pStartDate, pEndDate, FALSE, FALSE, _initial, _number, pYearPeriodId, pQuarter ); -- Post any unposted G/L Transactions into the new period FOR _r IN SELECT DISTINCT gltrans_sequence FROM gltrans WHERE ( (NOT gltrans_posted) AND (gltrans_date BETWEEN pStartDate AND pEndDate) ) LOOP PERFORM postIntoTrialBalance(_r.gltrans_sequence); END LOOP; RETURN _periodid; END; $_$; ALTER FUNCTION public.createaccountingperiod(date, date, integer, integer) OWNER TO admin; -- -- Name: createaccountingyearperiod(date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createaccountingyearperiod(date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; pEndDate ALIAS FOR $2; _yearperiodid INTEGER; _check INTEGER; _checkBool BOOLEAN; _r RECORD; _initial BOOLEAN; BEGIN -- Make that the passed start date doesn't fall into any existing yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE (pStartDate BETWEEN yearperiod_start AND yearperiod_end); IF (FOUND) THEN RETURN -1; END IF; -- Make that the passed end date doesn't fall into any existing yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE (pEndDate BETWEEN yearperiod_start AND yearperiod_end); IF (FOUND) THEN RETURN -2; END IF; -- Make that the passed start and end dates don't enclose an existing yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE ( (yearperiod_start >= pStartDate) AND (yearperiod_end <= pEndDate) ); IF (FOUND) THEN RETURN -3; END IF; -- Make sure that the passed start is prior to the end date SELECT (pStartDate > pEndDate) INTO _checkBool; IF (_checkBool) THEN RETURN -5; END IF; -- Determine if this is the initial accounting yearperiod SELECT CASE WHEN(count(*) > 0) THEN FALSE ELSE TRUE END INTO _initial FROM yearperiod; -- Create the new accounting yearperiod SELECT NEXTVAL('yearperiod_yearperiod_id_seq') INTO _yearperiodid; INSERT INTO yearperiod ( yearperiod_id, yearperiod_start, yearperiod_end, yearperiod_closed ) VALUES ( _yearperiodid, pStartDate, pEndDate, FALSE ); RETURN _yearperiodid; END; $_$; ALTER FUNCTION public.createaccountingyearperiod(date, date) OWNER TO admin; -- -- Name: createapchecks(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapchecks(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'createAPChecks() is deprecated - use createChecks() instead'; RETURN createChecks($1, $2); END; $_$; ALTER FUNCTION public.createapchecks(integer, date) OWNER TO admin; -- -- Name: createapcreditmemo(integer, text, text, date, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemo(integer, text, text, date, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; _result INTEGER; BEGIN SELECT createAPCreditMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, -1, pDocDate, -1, baseCurrId() ) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.createapcreditmemo(integer, text, text, date, numeric, text) OWNER TO admin; -- -- Name: createapcreditmemo(integer, integer, text, text, date, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemo(integer, integer, text, text, date, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; BEGIN RETURN createAPCreditMemo(pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, -1, pDocDate, -1, baseCurrId() ); END; $_$; ALTER FUNCTION public.createapcreditmemo(integer, integer, text, text, date, numeric, text) OWNER TO admin; -- -- Name: createapcreditmemo(integer, text, text, date, numeric, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemo(integer, text, text, date, numeric, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pAccntid ALIAS FOR $7; _result INTEGER; BEGIN SELECT createAPCreditMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDocDate, -1, baseCurrId() ) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.createapcreditmemo(integer, text, text, date, numeric, text, integer) OWNER TO admin; -- -- Name: createapcreditmemo(integer, integer, text, text, date, numeric, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemo(integer, integer, text, text, date, numeric, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; BEGIN RETURN createAPCreditMemo( pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDocDate, -1, baseCurrId() ); END; $_$; ALTER FUNCTION public.createapcreditmemo(integer, integer, text, text, date, numeric, text, integer) OWNER TO admin; -- -- Name: createapcreditmemo(integer, text, text, date, numeric, text, integer, date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemo(integer, text, text, date, numeric, text, integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pAccntid ALIAS FOR $7; pDueDate ALIAS FOR $8; pTermsid ALIAS FOR $9; _result INTEGER; BEGIN SELECT createAPCreditMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, baseCurrId() ) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.createapcreditmemo(integer, text, text, date, numeric, text, integer, date, integer) OWNER TO admin; -- -- Name: createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; pDueDate ALIAS FOR $9; pTermsid ALIAS FOR $10; BEGIN RETURN createAPCreditMemo( pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, baseCurrId() ); END; $_$; ALTER FUNCTION public.createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer) OWNER TO admin; -- -- Name: createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; pDueDate ALIAS FOR $9; pTermsid ALIAS FOR $10; pCurrId ALIAS FOR $11; BEGIN RETURN createAPCreditMemo( NULL, pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, pCurrId ); END; $_$; ALTER FUNCTION public.createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer) OWNER TO admin; -- -- Name: createapcreditmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pVendid ALIAS FOR $2; pJournalNumber ALIAS FOR $3; pDocNumber ALIAS FOR $4; pPoNumber ALIAS FOR $5; pDocDate ALIAS FOR $6; pAmount ALIAS FOR $7; pNotes ALIAS FOR $8; pAccntid ALIAS FOR $9; pDueDate ALIAS FOR $10; pTermsid ALIAS FOR $11; pCurrId ALIAS FOR $12; _vendName TEXT; _apAccntid INTEGER; _prepaidAccntid INTEGER; _accntid INTEGER; _glSequence INTEGER; _journalNumber INTEGER; _apopenid INTEGER; _baseAmount NUMERIC; _taxBaseValue NUMERIC; _test INTEGER; BEGIN _apopenid := pId; SELECT findAPAccount(pVendid) INTO _apAccntid; SELECT findAPPrepaidAccount(pVendid) INTO _prepaidAccntid; SELECT vend_name INTO _vendName FROM vendinfo WHERE (vend_id=pVendid); _accntid := pAccntid; PERFORM accnt_id FROM accnt WHERE (accnt_id=_accntid); IF (FOUND) THEN _prepaidAccntid := _accntid; ELSE _accntid := -1; END IF; IF(pJournalNumber IS NULL) THEN SELECT fetchJournalNumber('AP-MISC') INTO _journalNumber; ELSE _journalNumber := pJournalNumber; END IF; SELECT fetchGLSequence() INTO _glSequence; IF (_apopenid IS NOT NULL) THEN UPDATE apopen SET apopen_username=getEffectiveXtUser(), apopen_journalnumber=_journalNumber, apopen_vend_id=pVendid, apopen_docnumber=pDocNumber, apopen_doctype='C', apopen_ponumber=pPoNumber, apopen_docdate=pDocDate, apopen_duedate=pDueDate, apopen_distdate=pDocDate, apopen_terms_id=pTermsid, apopen_amount=pAmount, apopen_paid=0, apopen_open=(pAmount <> 0), apopen_notes=pNotes, apopen_accnt_id=_accntid, apopen_curr_id=pCurrId, apopen_closedate=CASE WHEN (pAmount = 0) THEN pDocdate END WHERE apopen_id = _apopenid; ELSE SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_accnt_id, apopen_curr_id, apopen_closedate ) VALUES ( _apopenid, getEffectiveXtUser(), _journalNumber, pVendid, pDocNumber, 'C', pPoNumber, pDocDate, pDueDate, pDocDate, pTermsid, pAmount, 0, (pAmount <> 0), pNotes, _accntid, pCurrId, CASE WHEN (pAmount = 0) THEN pDocDate END ); END IF; _baseAmount := round(currToBase(pCurrId, pAmount, pDocDate), 2); -- Debit the A/P account for the full amount SELECT insertIntoGLSeries ( _glSequence, 'A/P', 'CM', pDocNumber, _apAccntid, (_baseAmount * -1), pDocDate, (_vendName || ' ' || pNotes) ) INTO _test; -- Credit the Tax account for the tax amount _taxBaseValue := addTaxToGLSeries(_glSequence, 'A/P', 'CM', pDocNumber, pCurrId, pDocDate, pDocDate, 'apopentax', _apopenid, _vendName); UPDATE apopentax SET taxhist_journalnumber = _journalNumber WHERE taxhist_parent_id=_apopenid; -- Credit the Prepaid account for the basis amount SELECT insertIntoGLSeries ( _glSequence, 'A/P', 'CM', pDocNumber, _prepaidAccntid, (_baseAmount - _taxBaseValue), pDocDate, (_vendName || ' ' || pNotes) ) INTO _test; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _journalNumber) INTO _test; IF (_test < 0) THEN DELETE FROM apopen WHERE (apopen_id=_apopenid); PERFORM deleteGLSeries(_glSequence); RAISE EXCEPTION 'postGLSeries commit failed with %', _test; END IF; RETURN pJournalNumber; END; $_$; ALTER FUNCTION public.createapcreditmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer) OWNER TO admin; -- -- Name: createapcreditmemoapplication(integer, integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapcreditmemoapplication(psourceapopenid integer, ptargetapopenid integer, pamount numeric, pcurrid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _apCreditApplyId INTEGER; BEGIN IF (pAmount > (SELECT currToCurr(apopen_curr_id, pCurrId, ROUND(apopen_amount - apopen_paid, 2), apopen_docdate) FROM apopen WHERE (apopen_id=pTargetApopenId))) THEN RETURN -1; END IF; IF (pAmount > (SELECT ROUND((apopen_amount - apopen_paid) - COALESCE(SUM(currToCurr(apcreditapply_curr_id, apopen_curr_id, apcreditapply_amount, apopen_docdate)), 0), 2) FROM apopen LEFT OUTER JOIN apcreditapply ON ((apcreditapply_source_apopen_id=apopen_id) AND (apcreditapply_target_apopen_id<>pTargetApopenId)) WHERE (apopen_id=pSourceApopenId) GROUP BY apopen_amount, apopen_paid)) THEN RETURN -2; END IF; SELECT apcreditapply_id INTO _apCreditApplyId FROM apcreditapply WHERE ((apcreditapply_source_apopen_id=pSourceApopenId) AND (apcreditapply_target_apopen_id=pTargetApopenId)); IF (FOUND) THEN UPDATE apcreditapply SET apcreditapply_amount=pAmount, apcreditapply_curr_id=pCurrId WHERE (apcreditapply_id=_apCreditApplyId); ELSE INSERT INTO apcreditapply ( apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id ) VALUES ( pSourceApopenId, pTargetApopenId, pAmount, pCurrId) RETURNING apcreditapply_id INTO _apCreditApplyId; END IF; RETURN _apCreditApplyId; END; $$; ALTER FUNCTION public.createapcreditmemoapplication(psourceapopenid integer, ptargetapopenid integer, pamount numeric, pcurrid integer) OWNER TO admin; -- -- Name: createapdebitmemo(integer, text, text, date, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdebitmemo(integer, text, text, date, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; _result INTEGER; BEGIN SELECT createAPDebitMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, -1, pDocDate, -1, baseCurrId() ) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.createapdebitmemo(integer, text, text, date, numeric, text) OWNER TO admin; -- -- Name: createapdebitmemo(integer, integer, text, text, date, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdebitmemo(integer, integer, text, text, date, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; BEGIN RETURN createAPDebitMemo(pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, -1, pDocDate, -1, baseCurrId() ); END; $_$; ALTER FUNCTION public.createapdebitmemo(integer, integer, text, text, date, numeric, text) OWNER TO admin; -- -- Name: createapdebitmemo(integer, text, text, date, numeric, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdebitmemo(integer, text, text, date, numeric, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pAccntid ALIAS FOR $7; _result INTEGER; BEGIN SELECT createAPDebitMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDocDate, -1, baseCurrId() ) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.createapdebitmemo(integer, text, text, date, numeric, text, integer) OWNER TO admin; -- -- Name: createapdebitmemo(integer, integer, text, text, date, numeric, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdebitmemo(integer, integer, text, text, date, numeric, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; BEGIN RETURN createAPDebitMemo( pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDocDate, -1, baseCurrId() ); END; $_$; ALTER FUNCTION public.createapdebitmemo(integer, integer, text, text, date, numeric, text, integer) OWNER TO admin; -- -- Name: createapdebitmemo(integer, text, text, date, numeric, text, integer, date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdebitmemo(integer, text, text, date, numeric, text, integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pAccntid ALIAS FOR $7; pDueDate ALIAS FOR $8; pTermsid ALIAS FOR $9; _result INTEGER; BEGIN SELECT createAPDebitMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, baseCurrId() ) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.createapdebitmemo(integer, text, text, date, numeric, text, integer, date, integer) OWNER TO admin; -- -- Name: createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; pDueDate ALIAS FOR $9; pTermsid ALIAS FOR $10; BEGIN RETURN createAPDebitMemo(pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, baseCurrId() ); END; $_$; ALTER FUNCTION public.createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer) OWNER TO admin; -- -- Name: createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; pDueDate ALIAS FOR $9; pTermsid ALIAS FOR $10; pCurrId ALIAS FOR $11; BEGIN RETURN createAPDebitMemo(NULL, pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, pCurrId ); END; $_$; ALTER FUNCTION public.createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer) OWNER TO admin; -- -- Name: createapdebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pVendid ALIAS FOR $2; pJournalNumber ALIAS FOR $3; pDocNumber ALIAS FOR $4; pPoNumber ALIAS FOR $5; pDocDate ALIAS FOR $6; pAmount ALIAS FOR $7; pNotes ALIAS FOR $8; pAccntid ALIAS FOR $9; pDueDate ALIAS FOR $10; pTermsid ALIAS FOR $11; pCurrId ALIAS FOR $12; _vendName TEXT; _apAccntid INTEGER; _prepaidAccntid INTEGER; _accntid INTEGER; _glSequence INTEGER; _journalNumber INTEGER; _apopenid INTEGER; _baseAmount NUMERIC; _taxBaseValue NUMERIC; _test INTEGER; BEGIN _apopenid := pId; SELECT findAPAccount(pVendid) INTO _apAccntid; SELECT findAPPrepaidAccount(pVendid) INTO _prepaidAccntid; SELECT vend_name INTO _vendName FROM vendinfo WHERE (vend_id=pVendid); _accntid := pAccntid; PERFORM accnt_id FROM accnt WHERE (accnt_id=_accntid); IF (FOUND) THEN _prepaidAccntid := _accntid; ELSE _accntid := -1; END IF; IF(pJournalNumber IS NULL) THEN SELECT fetchJournalNumber('AP-MISC') INTO _journalNumber; ELSE _journalNumber := pJournalNumber; END IF; SELECT fetchGLSequence() INTO _glSequence; IF (_apopenid IS NOT NULL) THEN UPDATE apopen SET apopen_username=getEffectiveXtUser(), apopen_journalnumber=_journalNumber, apopen_vend_id=pVendid, apopen_docnumber=pDocNumber, apopen_doctype='D', apopen_ponumber=pPoNumber, apopen_docdate=pDocDate, apopen_duedate=pDueDate, apopen_distdate=pDocDate, apopen_terms_id=pTermsid, apopen_amount=pAmount, apopen_paid=0, apopen_open=(pAmount <> 0), apopen_notes=pNotes, apopen_accnt_id=_accntid, apopen_curr_id=pCurrId, apopen_closedate=CASE WHEN (pAmount = 0) THEN pDocdate END WHERE apopen_id = _apopenid; ELSE SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_amount, apopen_paid, apopen_discountable_amount, apopen_open, apopen_notes, apopen_accnt_id, apopen_curr_id, apopen_closedate ) VALUES ( _apopenid, getEffectiveXtUser(), _journalNumber, pVendid, pDocNumber, 'D', pPoNumber, pDocDate, pDueDate, pDocDate, pTermsid, pAmount, 0, 0, (pAmount <> 0), pNotes, _accntid, pCurrId, CASE WHEN (pAmount = 0) THEN pDocDate END ); END IF; _baseAmount := round(currToBase(pCurrId, pAmount, pDocDate), 2); -- Credit the A/P account for the full amount SELECT insertIntoGLSeries ( _glSequence, 'A/P', 'DM', pDocNumber, _apAccntid, _baseAmount, pDocDate, (_vendName || ' ' || pNotes) ) INTO _test; -- Debit the Tax account for the tax amount _taxBaseValue := addTaxToGLSeries(_glSequence, 'A/P', 'DM', pDocNumber, pCurrId, pDocDate, pDocDate, 'apopentax', _apopenid, _vendName); UPDATE apopentax SET taxhist_journalnumber = _journalNumber WHERE taxhist_parent_id=_apopenid; -- Debit the Prepaid account for the basis amount -- Note, the taxBaseValue is negative so it is added SELECT insertIntoGLSeries ( _glSequence, 'A/P', 'DM', pDocNumber, _prepaidAccntid, (_baseAmount + _taxBaseValue) * -1, pDocDate, (_vendName || ' ' || pNotes) ) INTO _test; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _journalNumber) INTO _test; IF (_test < 0) THEN DELETE FROM apopen WHERE (apopen_id=_apopenid); PERFORM deleteGLSeries(_glSequence); RAISE EXCEPTION 'postGLSeries commit failed with %', _test; END IF; RETURN _apopenid; END; $_$; ALTER FUNCTION public.createapdebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer) OWNER TO admin; -- -- Name: createapdiscount(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdiscount(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pAmount ALIAS FOR $2; _result INTEGER; BEGIN SELECT createAPDiscount(pApopenid, fetchJournalNumber('AP-MISC'), pAmount) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.createapdiscount(integer, numeric) OWNER TO admin; -- -- Name: createapdiscount(integer, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createapdiscount(integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pAmount ALIAS FOR $3; _ap RECORD; _sequence INTEGER; _apopenid INTEGER; _apcreditapplyid INTEGER; _result INTEGER; _crAccnt INTEGER; _dbAccnt INTEGER; _reference TEXT; _discountDateAmt NUMERIC; BEGIN SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; SELECT * INTO _ap FROM apopen WHERE (apopen_id = pApopenid); IF (NOT FOUND) THEN RETURN -1; END IF; _crAccnt := findAPDiscountAccount(_ap.apopen_vend_id); _dbAccnt := findAPAccount(_ap.apopen_vend_id); _reference := ('Discount for ' || _ap.apopen_doctype || ' ' || _ap.apopen_docnumber); SELECT fetchGLSequence() INTO _sequence; _discountDateAmt = round(pAmount / _ap.apopen_curr_rate, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'DS', _ap.apopen_docnumber, _dbAccnt, _discountDateAmt * -1, CURRENT_DATE, _reference); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'DS', _ap.apopen_docnumber, _crAccnt, _discountDateAmt, CURRENT_DATE, _reference); PERFORM postGLSeries(_sequence, pJournalNumber); INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_curr_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_discount, apopen_curr_rate ) SELECT _apopenid, getEffectiveXtUser(), pJournalNumber, apopen_vend_id, apopen_docnumber, 'C', apopen_ponumber, CURRENT_DATE, CURRENT_DATE, CURRENT_DATE, -1, apopen_curr_id, pAmount, 0, TRUE, _reference, TRUE, apopen_curr_rate FROM apopen WHERE (apopen_id=pApopenid); SELECT apcreditapply_id INTO _apcreditapplyid FROM apcreditapply WHERE ( (apcreditapply_source_apopen_id=_apopenid) AND (apcreditapply_target_apopen_id=pApopenid) ); IF (FOUND) THEN UPDATE apcreditapply SET apcreditapply_amount=pAmount WHERE (apcreditapply_id=_apcreditapplyid); ELSE SELECT nextval('apcreditapply_apcreditapply_id_seq') INTO _apcreditapplyid; INSERT INTO apcreditapply ( apcreditapply_id, apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id ) VALUES ( _apcreditapplyid, _apopenid, pApopenid, pAmount, _ap.apopen_curr_id ); END IF; SELECT postAPCreditMemoApplication(_apopenid) INTO _result; IF (_result < 0) THEN RETURN _result; END IF; RETURN pJournalNumber; END; $_$; ALTER FUNCTION public.createapdiscount(integer, integer, numeric) OWNER TO admin; -- -- Name: createarcashdeposit(integer, text, text, date, numeric, text, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createarcashdeposit(integer, text, text, date, numeric, text, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pOrderNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pJournalNumber ALIAS FOR $7; pCurrId ALIAS FOR $8; _prepaidaccntid INTEGER; _deferredaccntid INTEGER; _glSequence INTEGER; _aropenid INTEGER; BEGIN IF (pAmount <= 0) THEN RETURN 0; END IF; _prepaidaccntid := findPrepaidAccount(pCustid); IF (_prepaidaccntid = -1) THEN RAISE EXCEPTION 'There was an error creating the Customer Deposit GL Transactions. No Prepaid Account is assigned.'; END IF; _deferredaccntid := findDeferredAccount(pCustid); IF (_deferredaccntid = -1) THEN RAISE EXCEPTION 'There was an error creating the Customer Deposit GL Transactions. No Deferred Account is assigned.'; END IF; SELECT NEXTVAL('aropen_aropen_id_seq') INTO _aropenid; SELECT insertGLTransaction( pJournalNumber, 'A/R', 'CD', pDocNumber, pNotes, _deferredaccntid, _prepaidaccntid, _aropenid, round(currToBase(pCurrId, pAmount, pDocDate), 2), pDocDate) INTO _glSequence; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_cust_id, aropen_docnumber, aropen_doctype, aropen_ordernumber, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_salesrep_id, aropen_amount, aropen_paid, aropen_commission_due, aropen_commission_paid, aropen_applyto, aropen_ponumber, aropen_cobmisc_id, aropen_open, aropen_notes, aropen_rsncode_id, aropen_salescat_id, aropen_accnt_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), pJournalNumber, pCustid, pDocNumber, 'R', pOrderNumber, pDocDate, pDocDate, pDocDate, -1, NULL, round(pAmount, 2), 0, 0.0, FALSE, '', '', -1, TRUE, pNotes, -1, -1, -1, pCurrId ); RETURN _aropenid; END; $_$; ALTER FUNCTION public.createarcashdeposit(integer, text, text, date, numeric, text, integer, integer) OWNER TO admin; -- -- Name: createarcreditmemo(integer, integer, text, text, date, numeric, text, integer, integer, integer, date, integer, integer, numeric, integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createarcreditmemo(pid integer, pcustid integer, pdocnumber text, pordernumber text, pdocdate date, pamount numeric, pnotes text, prsncodeid integer, psalescatid integer, paccntid integer, pduedate date, ptermsid integer, psalesrepid integer, pcommissiondue numeric DEFAULT 0, pjournalnumber integer DEFAULT NULL::integer, pcurrid integer DEFAULT basecurrid(), paraccntid integer DEFAULT NULL::integer, pcoccpayid integer DEFAULT NULL::integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _accntid INTEGER; _arAccntid INTEGER; _aropenid INTEGER; _cohistid INTEGER; _custName TEXT; _duedate DATE := COALESCE(pDueDate, pDocDate); _glSequence INTEGER; _journalNumber INTEGER; _prepaidAccntid INTEGER; _salescatid INTEGER; _taxBaseValue NUMERIC; _test INTEGER; _tmp INTEGER; BEGIN _aropenid := pId; IF (pAmount <= 0) THEN RETURN 0; END IF; _arAccntid := COALESCE(pARAccntid, findARAccount(pCustid)); _prepaidAccntid := findPrepaidAccount(pCustid); _accntid := pAccntid; _salescatid := pSalescatid; SELECT cust_name INTO _custName FROM custinfo WHERE (cust_id=pCustid); IF EXISTS(SELECT 1 FROM accnt WHERE (accnt_id=_accntid)) THEN _prepaidAccntid := _accntid; ELSE _accntid := -1; END IF; SELECT accnt_id INTO _tmp FROM salescat, accnt WHERE ((salescat_prepaid_accnt_id=accnt_id) AND (salescat_id=_salescatid)); IF (FOUND) THEN _accntid := -1; _prepaidAccntid := _tmp; ELSE _salescatid = -1; END IF; IF(pJournalNumber IS NULL) THEN SELECT fetchJournalNumber('AR-MISC') INTO _journalNumber; ELSE _journalNumber := pJournalNumber; END IF; _glSequence := fetchGLSequence(); -- CreatelUpdate aropen for full amount IF (_aropenid IS NOT NULL) THEN UPDATE aropen SET aropen_username=getEffectiveXtUser(), aropen_journalnumber=_journalNumber, aropen_cust_id=pCustid, aropen_docnumber=pDocNumber, aropen_doctype='C', aropen_ordernumber=pOrderNumber,aropen_docdate=pDocDate, aropen_duedate=_duedate, aropen_distdate=pDocDate, aropen_terms_id=pTermsid, aropen_salesrep_id=pSalesrepid, aropen_amount=round(pAmount, 2), aropen_paid=0, aropen_commission_due=pCommissiondue, aropen_commission_paid=FALSE, aropen_applyto='', aropen_ponumber='', aropen_cobmisc_id=-1, aropen_open=TRUE, aropen_notes=pNotes, aropen_rsncode_id=pRsncodeid, aropen_salescat_id=_salescatid, aropen_accnt_id=_accntid, aropen_curr_id=pCurrId WHERE aropen_id = pId; ELSE SELECT NEXTVAL('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_cust_id, aropen_docnumber, aropen_doctype, aropen_ordernumber, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_salesrep_id, aropen_amount, aropen_paid, aropen_commission_due, aropen_commission_paid, aropen_applyto, aropen_ponumber, aropen_cobmisc_id, aropen_open, aropen_notes, aropen_rsncode_id, aropen_salescat_id, aropen_accnt_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), _journalNumber, pCustid, pDocNumber, 'C', pOrderNumber, pDocDate, _duedate, pDocDate, pTermsid, pSalesrepid, round(pAmount, 2), 0, pCommissiondue, FALSE, '', '', -1, TRUE, pNotes, pRsncodeid, _salescatid, _accntid, pCurrId ); END IF; -- Credit the A/R account for the full amount SELECT insertIntoGLSeries ( _glSequence, 'A/R', 'CM', pDocNumber, _arAccntid, round(currToBase(pCurrId, pAmount, pDocDate), 2), pDocDate, (_custName || ' ' || pNotes)) INTO _test; -- Debit the Tax account for the tax amount _taxBaseValue := addTaxToGLSeries(_glSequence, 'A/R', 'CM', pDocNumber, pCurrId, pDocDate, pDocDate, 'aropentax', _aropenid, (_custName || ' ' || pNotes)); UPDATE aropentax SET taxhist_journalnumber = _journalNumber WHERE taxhist_parent_id=_aropenid; -- Debit the Prepaid account for the basis amount -- Note, _taxBaseValue is negative so it is added to pAmount SELECT insertIntoGLSeries ( _glSequence, 'A/R', 'CM', pDocNumber, _prepaidAccntid, round(currToBase(pCurrId, pAmount * -1, pDocDate) + _taxBaseValue * -1, 2), pDocDate, (_custName || ' ' || pNotes)) INTO _test; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _journalNumber) INTO _test; IF (_test < 0) THEN DELETE FROM aropen WHERE (aropen_id=_aropenid); PERFORM deleteGLSeries(_glSequence); RAISE EXCEPTION 'postGLSeries commit failed with %', _test; END IF; -- Record Sales History INSERT INTO cohist ( cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_curr_id, cohist_sequence, cohist_cohead_ccpay_id) VALUES (CASE WHEN pCustid < 0 THEN NULL ELSE pCustid END, -1, -1, 'M', 'A/R Misc Credit Memo', pDocDate, '', pOrderNumber, '', pDocDate, 'C', pDocNumber, pDocDate, 1, (pAmount - _taxBaseValue) * -1, 0, CASE WHEN pSalesrepid < 0 THEN NULL ELSE pSalesrepid END, (pCommissiondue * -1.0), FALSE, pCurrId, _glSequence, pCoCcpayId) RETURNING cohist_id INTO _cohistid; INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM aropentax WHERE (taxhist_parent_id=_aropenid); RETURN _aropenid; END; $$; ALTER FUNCTION public.createarcreditmemo(pid integer, pcustid integer, pdocnumber text, pordernumber text, pdocdate date, pamount numeric, pnotes text, prsncodeid integer, psalescatid integer, paccntid integer, pduedate date, ptermsid integer, psalesrepid integer, pcommissiondue numeric, pjournalnumber integer, pcurrid integer, paraccntid integer, pcoccpayid integer) OWNER TO admin; -- -- Name: createardebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, integer, integer, date, integer, integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createardebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, integer, integer, date, integer, integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pCustid ALIAS FOR $2; pJournalNumber ALIAS FOR $3; pDocNumber ALIAS FOR $4; pOrderNumber ALIAS FOR $5; pDocDate ALIAS FOR $6; pAmount ALIAS FOR $7; pNotes ALIAS FOR $8; pRsncodeid ALIAS FOR $9; pSalescatid ALIAS FOR $10; pAccntid ALIAS FOR $11; pDueDate ALIAS FOR $12; pTermsid ALIAS FOR $13; pSalesrepid ALIAS FOR $14; pCommissiondue ALIAS FOR $15; pCurrId ALIAS FOR $16; _custName TEXT; _journalNumber INTEGER; _arAccntid INTEGER; _prepaidAccntid INTEGER; _salescatid INTEGER; _accntid INTEGER; _glSequence INTEGER; _aropenid INTEGER; _cohistid INTEGER; _tmp INTEGER; _test INTEGER; _taxBaseValue NUMERIC; BEGIN _aropenid=pId; IF (pAmount <= 0) THEN RETURN 0; END IF; SELECT findARAccount(pCustid) INTO _arAccntid; SELECT findPrepaidAccount(pCustid) INTO _prepaidAccntid; _accntid := pAccntid; _salescatid := pSalescatid; SELECT cust_name INTO _custName FROM custinfo WHERE (cust_id=pCustid); PERFORM accnt_id FROM accnt WHERE (accnt_id=_accntid); IF (FOUND) THEN _prepaidAccntid := _accntid; ELSE _accntid := -1; END IF; SELECT accnt_id INTO _tmp FROM salescat, accnt WHERE ((salescat_prepaid_accnt_id=accnt_id) AND (salescat_id=_salescatid)); IF (FOUND) THEN _accntid := -1; _prepaidAccntid := _tmp; ELSE _salescatid = -1; END IF; IF (pJournalNumber IS NULL) THEN _journalNumber := fetchJournalNumber('AR-MISC'); ELSE _journalNumber := pJournalNumber; END IF; SELECT fetchGLSequence() INTO _glSequence; -- CreatelUpdate aropen for full amount IF (_aropenid IS NOT NULL) THEN UPDATE aropen SET aropen_username=getEffectiveXtUser(), aropen_journalnumber=_journalNumber, aropen_cust_id=pCustid, aropen_docnumber=pDocNumber, aropen_doctype='D', aropen_ordernumber=pOrderNumber,aropen_docdate=pDocDate, aropen_duedate=pDueDate, aropen_distdate=pDocDate, aropen_terms_id=pTermsid, aropen_salesrep_id=pSalesrepid, aropen_amount=round(pAmount, 2), aropen_paid=0, aropen_commission_due=pCommissiondue, aropen_commission_paid=FALSE, aropen_applyto='', aropen_ponumber='', aropen_cobmisc_id=-1, aropen_open=TRUE, aropen_notes=pNotes, aropen_rsncode_id=pRsncodeid, aropen_salescat_id=_salescatid, aropen_accnt_id=_accntid, aropen_curr_id=pCurrId WHERE aropen_id = pId; ELSE SELECT NEXTVAL('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_cust_id, aropen_docnumber, aropen_doctype, aropen_ordernumber, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_salesrep_id, aropen_amount, aropen_paid, aropen_commission_due, aropen_commission_paid, aropen_applyto, aropen_ponumber, aropen_cobmisc_id, aropen_open, aropen_notes, aropen_rsncode_id, aropen_salescat_id, aropen_accnt_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), _journalNumber, pCustid, pDocNumber, 'D', pOrderNumber, pDocDate, pDueDate, pDocDate, pTermsid, pSalesrepid, round(pAmount, 2), 0, pCommissiondue, FALSE, '', '', -1, TRUE, pNotes, pRsncodeid, _salescatid, _accntid, pCurrId ); END IF; -- Debit the A/R account for the full amount SELECT insertIntoGLSeries ( _glSequence, 'A/R', 'DM', pDocNumber, _arAccntid, round(currToBase(pCurrId, pAmount, pDocDate) * -1, 2), pDocDate, (_custName || ' ' || pNotes)) INTO _test; -- Credit the Tax account for the tax amount _taxBaseValue := addTaxToGLSeries(_glSequence, 'A/R', 'DM', pDocNumber, pCurrId, pDocDate, pDocDate, 'aropentax', _aropenid, (_custName || ' ' || pNotes)); UPDATE aropentax SET taxhist_journalnumber = _journalNumber WHERE taxhist_parent_id=_aropenid; -- Credit the Prepaid account for the basis amount SELECT insertIntoGLSeries ( _glSequence, 'A/R', 'DM', pDocNumber, _prepaidAccntid, round(currToBase(pCurrId, (pAmount), pDocDate), 2) - _taxBaseValue, pDocDate, (_custName || ' ' || pNotes)) INTO _test; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _journalNumber) INTO _test; IF (_test < 0) THEN DELETE FROM aropen WHERE (aropen_id=_aropenid); PERFORM deleteGLSeries(_glSequence); RAISE EXCEPTION 'postGLSeries commit failed with %', _test; END IF; -- Record Sales History SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_curr_id, cohist_sequence ) VALUES ( _cohistid, pCustid, -1, -1, 'M', 'A/R Misc Debit Memo', pDocDate, '', '', '', pDocDate, 'D', pDocNumber, pDocDate, 1, (pAmount - _taxBaseValue), 0, pSalesrepid, pCommissiondue, FALSE, pCurrId, _glSequence ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM aropentax WHERE (taxhist_parent_id=_aropenid); RETURN _aropenid; END; $_$; ALTER FUNCTION public.createardebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, integer, integer, date, integer, integer, numeric, integer) OWNER TO admin; -- -- Name: createbillingheader(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createbillingheader(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; _cobmiscid INTEGER; _cohead cohead%ROWTYPE; _miscApplied NUMERIC := 0.0; _freight NUMERIC; _freighttypeid INTEGER; _invcDate DATE; _schedDate DATE; _shipDate DATE; _shipVia TEXT; _tax NUMERIC; BEGIN -- Fetch cohead SELECT * INTO _cohead FROM cohead WHERE (cohead_id=pSoheadid); -- Check for an existing cobmisc SELECT cobmisc_id INTO _cobmiscid FROM cobmisc WHERE ( (NOT cobmisc_posted) AND (cobmisc_cohead_id=pSoheadid) ); IF (FOUND) THEN -- Find a Shipping-Entered freight charge SELECT SUM(currToCurr(shiphead_freight_curr_id, _cohead.cohead_curr_id, shiphead_freight, CURRENT_DATE)) INTO _freight FROM ( SELECT shiphead_id, shiphead_freight_curr_id, shiphead_freight FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id AND NOT shipitem_invoiced) WHERE ((shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid)) GROUP BY shiphead_id, shiphead_freight_curr_id, shiphead_freight) AS data; IF (_freight IS NOT NULL) THEN UPDATE cobmisc SET cobmisc_freight = _freight WHERE (cobmisc_id=_cobmiscid); END IF; RETURN _cobmiscid; END IF; -- Find misc charges that have already been applied for the S/O SELECT COALESCE(SUM(cobmisc_misc), 0.0) INTO _miscApplied FROM cobmisc WHERE (cobmisc_cohead_id=pSoheadid); SELECT NEXTVAL('cobmisc_cobmisc_id_seq') INTO _cobmiscid; -- Check for a valid shipdate SELECT MIN(shiphead_shipdate) INTO _shipDate FROM shiphead, shipitem WHERE ( (shipitem_shiphead_id=shiphead_id) AND (NOT shipitem_invoiced) AND (shiphead_shipped) AND (shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid) ); -- Schema shouldn't allow, but we'll try for now IF (_shipDate IS NULL) THEN SELECT MAX(shipitem_shipdate) INTO _shipDate FROM shipitem, shiphead WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid) ); -- How about a transaction date IF (_shipDate IS NULL) THEN SELECT COALESCE(MAX(shipitem_transdate), CURRENT_DATE) INTO _shipDate FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid) ); END IF; END IF; -- Get the earliest schedule date for this order. SELECT MIN(coitem_scheddate) INTO _schedDate FROM coitem WHERE ((coitem_status <> 'X') AND (coitem_cohead_id=pSoheadid)); IF (_schedDate IS NULL) THEN _schedDate := _shipDate; END IF; -- Find a Shipping-Entered freight charge SELECT SUM(currToCurr(shiphead_freight_curr_id, _cohead.cohead_curr_id, shiphead_freight, CURRENT_DATE)), shiphead_shipvia INTO _freight, _shipVia FROM ( SELECT shiphead_id, shiphead_freight_curr_id, shiphead_freight, shiphead_shipvia FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id AND NOT shipitem_invoiced) WHERE ((shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid)) GROUP BY shiphead_id, shiphead_freight_curr_id, shiphead_freight, shiphead_shipvia) AS data GROUP BY shiphead_shipvia; -- Nope, use the cohead freight charge IF (_freight IS NULL) THEN _freight := _cohead.cohead_freight; END IF; -- Finally, look for a Shipping-Entered Ship Via SELECT shiphead_shipvia INTO _shipVia FROM shiphead, shipitem WHERE ( (shipitem_shiphead_id=shiphead_id) AND (NOT shipitem_invoiced) AND (shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid) ) LIMIT 1; IF (NOT FOUND) THEN _shipVia := _cohead.cohead_shipvia; END IF; --Determine any tax SELECT getFreightTaxTypeId() INTO _freighttypeid; SELECT SUM(COALESCE(taxdetail_tax, 0.00)) INTO _tax FROM calculatetaxdetail(_cohead.cohead_taxzone_id, _freighttypeid, _cohead.cohead_orderdate,_cohead.cohead_curr_id, _freight); -- Determine if we are using the _shipDate or _schedDate or current_date for the _invcDate IF( fetchMetricText('InvoiceDateSource')='scheddate') THEN _invcDate := _schedDate; ELSIF( fetchMetricText('InvoiceDateSource')='shipdate') THEN _invcDate := _shipDate; ELSE _invcDate := current_date; END IF; INSERT INTO cobmisc ( cobmisc_id, cobmisc_cohead_id, cobmisc_shipvia, cobmisc_freight, cobmisc_misc, cobmisc_payment ,cobmisc_notes,cobmisc_shipdate ,cobmisc_invcdate,cobmisc_posted ,cobmisc_misc_accnt_id ,cobmisc_misc_descrip,cobmisc_closeorder,cobmisc_curr_id ,cobmisc_taxtype_id,cobmisc_taxzone_id ) SELECT _cobmiscid,_cohead.cohead_id,_shipVia,_freight, CASE WHEN (_cohead.cohead_misc - _miscApplied = 0.0) THEN 0.0 ELSE (_cohead.cohead_misc - _miscApplied) END,0, _cohead.cohead_ordercomments,_shipDate,_invcDate,FALSE,_cohead.cohead_misc_accnt_id, _cohead.cohead_misc_descrip,NOT(cust_backorder),_cohead.cohead_curr_id, _cohead.cohead_taxtype_id,_cohead.cohead_taxzone_id FROM custinfo WHERE (cust_id=_cohead.cohead_cust_id); RETURN _cobmiscid; END; $_$; ALTER FUNCTION public.createbillingheader(integer) OWNER TO admin; -- -- Name: createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pSeqNumber ALIAS FOR $4; pIssueMethod ALIAS FOR $5; pUomId ALIAS FOR $6; pQtyPer ALIAS FOR $7; pScrap ALIAS FOR $8; pEffective ALIAS FOR $9; pExpires ALIAS FOR $10; pCreateWo ALIAS FOR $11; pBOOItemseqid ALIAS FOR $12; pSchedAtWooper ALIAS FOR $13; pECN ALIAS FOR $14; pSubType ALIAS FOR $15; pRevisionid ALIAS FOR $16; pCharId ALIAS FOR $17; pCharVal ALIAS FOR $18; _bomworksetid INTEGER; _temp INTEGER; _bomitemid INTEGER; BEGIN SELECT createBOMItem( pBomitemid, pParentItemid, pComponentItemid, pSeqNumber, pIssueMethod, pUomId, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, pSchedAtWooper, pECN, pSubType, pRevisionid, pCharId, pCharVal, NULL, NULL ) INTO _bomitemid; RETURN _bomitemid; END; $_$; ALTER FUNCTION public.createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text) OWNER TO admin; -- -- Name: createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pSeqNumber ALIAS FOR $4; pIssueMethod ALIAS FOR $5; pUomId ALIAS FOR $6; pQtyPer ALIAS FOR $7; pScrap ALIAS FOR $8; pEffective ALIAS FOR $9; pExpires ALIAS FOR $10; pCreateWo ALIAS FOR $11; pBOOItemseqid ALIAS FOR $12; pSchedAtWooper ALIAS FOR $13; pECN ALIAS FOR $14; pSubType ALIAS FOR $15; pRevisionid ALIAS FOR $16; pCharId ALIAS FOR $17; pCharVal ALIAS FOR $18; pNotes ALIAS FOR $19; pRef ALIAS FOR $20; _bomworksetid INTEGER; _temp INTEGER; BEGIN -- Make sure that the parent and component are not the same IF (pParentItemid = pComponentItemid) THEN RETURN -1; END IF; -- Make sure that the parent is not used in the component at some level IF ( SELECT (item_type IN ('M', 'F')) FROM item WHERE (item_id=pComponentItemid) ) THEN SELECT indentedWhereUsed(pParentItemid) INTO _bomworksetid; SELECT bomwork_id INTO _temp FROM bomwork WHERE ( (bomwork_set_id=_bomworksetid) AND (bomwork_item_id=pComponentItemid) ) LIMIT 1; IF (FOUND) THEN PERFORM deleteBOMWorkset(_bomworksetid); RETURN -2; END IF; END IF; PERFORM deleteBOMWorkset(_bomworksetid); -- Create the BOM Item INSERT INTO bomitem ( bomitem_id, bomitem_parent_item_id, bomitem_item_id, bomitem_seqnumber, bomitem_issuemethod, bomitem_uom_id, bomitem_qtyper, bomitem_scrap, bomitem_effective, bomitem_expires, bomitem_createwo, bomitem_booitem_seq_id, bomitem_schedatwooper, bomitem_ecn, bomitem_subtype, bomitem_moddate, bomitem_rev_id, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref ) VALUES ( pBomitemid, pParentItemid, pComponentItemid, pSeqNumber, pIssueMethod, pUomId, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, COALESCE(pSchedAtWooper, FALSE), pECN, pSubType, CURRENT_DATE, pRevisionid, pCharId,pCharVal,pNotes, pRef ); RETURN pBomitemid; END; $_$; ALTER FUNCTION public.createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) OWNER TO admin; -- -- Name: createbomitem(integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createbomitem(integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pIssueMethod ALIAS FOR $4; pUomId ALIAS FOR $5; pQtyPer ALIAS FOR $6; pScrap ALIAS FOR $7; pEffective ALIAS FOR $8; pExpires ALIAS FOR $9; pCreateWo ALIAS FOR $10; pBOOItemseqid ALIAS FOR $11; pSchedAtWooper ALIAS FOR $12; pECN ALIAS FOR $13; pSubType ALIAS FOR $14; pRevisionid ALIAS FOR $15; pCharId ALIAS FOR $16; pCharVal ALIAS FOR $17; pNotes ALIAS FOR $18; pRef ALIAS FOR $19; _seqNumber INTEGER; _bomitemid INTEGER; BEGIN -- Grab the next Sequence Number, if any SELECT MAX(bomitem_seqnumber) INTO _seqNumber FROM bomitem(pParentItemid,pRevisionid); IF (_seqNumber IS NOT NULL) THEN _seqNumber := (_seqNumber + 10); ELSE _seqNumber := 10; END IF; SELECT createBOMItem( pBomitemid, pParentItemid, pComponentItemid, _seqNumber, pIssueMethod, pUomId, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, pSchedAtWooper, pECN, pSubType, pRevisionid, pCharId, pCharVal, pNotes, pRef ) INTO _bomitemid; RETURN _bomitemid; END; $_$; ALTER FUNCTION public.createbomitem(integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) OWNER TO admin; -- -- Name: createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pSeqNumber ALIAS FOR $4; pIssueMethod ALIAS FOR $5; pUomId ALIAS FOR $6; pQtyFxd ALIAS FOR $7; pQtyPer ALIAS FOR $8; pScrap ALIAS FOR $9; pEffective ALIAS FOR $10; pExpires ALIAS FOR $11; pCreateWo ALIAS FOR $12; pBOOItemseqid ALIAS FOR $13; pSchedAtWooper ALIAS FOR $14; pECN ALIAS FOR $15; pSubType ALIAS FOR $16; pRevisionid ALIAS FOR $17; pCharId ALIAS FOR $18; pCharVal ALIAS FOR $19; pNotes ALIAS FOR $20; pRef ALIAS FOR $21; _bomworksetid INTEGER; _temp INTEGER; BEGIN -- Make sure that the parent and component are not the same IF (pParentItemid = pComponentItemid) THEN RETURN -1; END IF; -- Make sure that the parent is not used in the component at some level IF ( SELECT (item_type IN ('M', 'F')) FROM item WHERE (item_id=pComponentItemid) ) THEN SELECT indentedWhereUsed(pParentItemid) INTO _bomworksetid; SELECT bomwork_id INTO _temp FROM bomwork WHERE ( (bomwork_set_id=_bomworksetid) AND (bomwork_item_id=pComponentItemid) ) LIMIT 1; IF (FOUND) THEN PERFORM deleteBOMWorkset(_bomworksetid); RETURN -2; END IF; END IF; PERFORM deleteBOMWorkset(_bomworksetid); -- Create the BOM Item INSERT INTO bomitem ( bomitem_id, bomitem_parent_item_id, bomitem_item_id, bomitem_seqnumber, bomitem_issuemethod, bomitem_uom_id, bomitem_qtyfxd, bomitem_qtyper, bomitem_scrap, bomitem_effective, bomitem_expires, bomitem_createwo, bomitem_booitem_seq_id, bomitem_schedatwooper, bomitem_ecn, bomitem_subtype, bomitem_moddate, bomitem_rev_id, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref ) VALUES ( pBomitemid, pParentItemid, pComponentItemid, pSeqNumber, pIssueMethod, pUomId, pQtyFxd, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, COALESCE(pSchedAtWooper, FALSE), pECN, pSubType, CURRENT_DATE, pRevisionid, pCharId,pCharVal,pNotes, pRef ); RETURN pBomitemid; END; $_$; ALTER FUNCTION public.createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) OWNER TO admin; -- -- Name: createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pSeqNumber ALIAS FOR $4; pIssueMethod ALIAS FOR $5; pUomId ALIAS FOR $6; pQtyFxd ALIAS FOR $7; pQtyPer ALIAS FOR $8; pScrap ALIAS FOR $9; pEffective ALIAS FOR $10; pExpires ALIAS FOR $11; pCreateWo ALIAS FOR $12; pBOOItemseqid ALIAS FOR $13; pSchedAtWooper ALIAS FOR $14; pECN ALIAS FOR $15; pSubType ALIAS FOR $16; pRevisionid ALIAS FOR $17; pCharId ALIAS FOR $18; pCharVal ALIAS FOR $19; _bomworksetid INTEGER; _temp INTEGER; _bomitemid INTEGER; BEGIN SELECT createBOMItem( pBomitemid, pParentItemid, pComponentItemid, pSeqNumber, pIssueMethod, pUomId, pQtyFxd, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, pSchedAtWooper, pECN, pSubType, pRevisionid, pCharId, pCharVal, NULL, NULL ) INTO _bomitemid; RETURN _bomitemid; END; $_$; ALTER FUNCTION public.createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text) OWNER TO admin; -- -- Name: createbomitem(integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createbomitem(integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pIssueMethod ALIAS FOR $4; pUomId ALIAS FOR $5; pQtyFxd ALIAS FOR $6; pQtyPer ALIAS FOR $7; pScrap ALIAS FOR $8; pEffective ALIAS FOR $9; pExpires ALIAS FOR $10; pCreateWo ALIAS FOR $11; pBOOItemseqid ALIAS FOR $12; pSchedAtWooper ALIAS FOR $13; pECN ALIAS FOR $14; pSubType ALIAS FOR $15; pRevisionid ALIAS FOR $16; pCharId ALIAS FOR $17; pCharVal ALIAS FOR $18; pNotes ALIAS FOR $19; pRef ALIAS FOR $20; _seqNumber INTEGER; _bomitemid INTEGER; BEGIN -- Grab the next Sequence Number, if any SELECT MAX(bomitem_seqnumber) INTO _seqNumber FROM bomitem(pParentItemid,pRevisionid); IF (_seqNumber IS NOT NULL) THEN _seqNumber := (_seqNumber + 10); ELSE _seqNumber := 10; END IF; SELECT createBOMItem( pBomitemid, pParentItemid, pComponentItemid, _seqNumber, pIssueMethod, pUomId, pQtyFxd, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, pSchedAtWooper, pECN, pSubType, pRevisionid, pCharId, pCharVal, pNotes, pRef ) INTO _bomitemid; RETURN _bomitemid; END; $_$; ALTER FUNCTION public.createbomitem(integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) OWNER TO admin; -- -- Name: createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; pRecipType ALIAS FOR $2; pRecipId ALIAS FOR $3; pCheckDate ALIAS FOR $4; pAmount ALIAS FOR $5; pCurrid ALIAS FOR $6; pExpcatid ALIAS FOR $7; _journalNumber INTEGER := $8; pFor ALIAS FOR $9; pNotes ALIAS FOR $10; pMisc ALIAS FOR $11; _checkid INTEGER; BEGIN SELECT createCheck(pBankaccntid,pRecipType,pRecipId,pCheckDate,pAmount,pCurrid,pExpcatid,_journalNumber,pFor,pNotes,pMisc,NULL) INTO _checkid; RETURN _checkid; END; $_$; ALTER FUNCTION public.createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean) OWNER TO admin; -- -- Name: createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; pRecipType ALIAS FOR $2; pRecipId ALIAS FOR $3; pCheckDate ALIAS FOR $4; pAmount ALIAS FOR $5; pCurrid ALIAS FOR $6; pExpcatid ALIAS FOR $7; _journalNumber INTEGER := $8; pFor ALIAS FOR $9; pNotes ALIAS FOR $10; pMisc ALIAS FOR $11; pAropenid ALIAS FOR $12; _checkid INTEGER; _check_curr_rate NUMERIC; _bankaccnt_currid INTEGER; BEGIN SELECT bankaccnt_curr_id,currRate(bankaccnt_curr_id,pCheckDate) INTO _bankaccnt_currid, _check_curr_rate FROM bankaccnt WHERE bankaccnt_id = pBankaccntid; IF (NOT FOUND) THEN RETURN -1; END IF; IF (pRecipType NOT IN ('C', 'T', 'V')) THEN RETURN -2; END IF; IF (pCheckDate IS NULL) THEN RETURN -3; END IF; IF (pAmount <= 0) THEN RETURN -4; END IF; IF (pCurrid IS NULL OR NOT EXISTS(SELECT * FROM curr_symbol WHERE (curr_id=pCurrid))) THEN RETURN -5; END IF; IF (pExpcatid IS NOT NULL AND NOT EXISTS(SELECT * FROM expcat WHERE (expcat_id=pExpcatid))) THEN RETURN -6; END IF; -- Do not assign Journal Number until check is posted -- if (_journalNumber IS NULL) THEN -- _journalNumber := fetchJournalNumber('AP-CK'); -- END IF; _checkid := NEXTVAL('checkhead_checkhead_id_seq'); INSERT INTO checkhead ( checkhead_id, checkhead_recip_type, checkhead_recip_id, checkhead_bankaccnt_id, checkhead_number, checkhead_amount, checkhead_checkdate, checkhead_misc, checkhead_expcat_id, checkhead_journalnumber, checkhead_for, checkhead_notes, checkhead_curr_id ) VALUES ( _checkid, pRecipType, pRecipId, pBankaccntid, -1, --fetchNextCheckNumber(pBankaccntid), currToCurr(pCurrid, _bankaccnt_currid, pAmount, pCheckDate), pCheckDate, COALESCE(pMisc, FALSE), pExpcatid, _journalNumber, pFor, pNotes, _bankaccnt_currid ); IF (pAropenid IS NOT NULL AND fetchmetricbool('EnableReturnAuth')) THEN INSERT INTO checkitem (checkitem_checkhead_id,checkitem_amount,checkitem_discount,checkitem_ponumber, checkitem_aropen_id,checkitem_docdate,checkitem_curr_id,checkitem_cmnumber, checkitem_ranumber, checkitem_curr_rate) SELECT _checkid, currToCurr(checkhead_curr_id, aropen_curr_id, pAmount, checkhead_checkdate), 0,cmhead_custponumber,pAropenid,aropen_docdate,aropen_curr_id,cmhead_number,rahead_number, 1 / (_check_curr_rate / aropen_curr_rate) FROM checkhead, aropen LEFT OUTER JOIN cmhead ON (aropen_docnumber=cmhead_number) LEFT OUTER JOIN rahead ON (cmhead_rahead_id=rahead_id) WHERE ((aropen_id=pAropenid) AND (checkhead_id=_checkid)); ELSIF (pAropenid IS NOT NULL) THEN INSERT INTO checkitem (checkitem_checkhead_id,checkitem_amount,checkitem_discount,checkitem_ponumber, checkitem_aropen_id,checkitem_docdate,checkitem_curr_id,checkitem_cmnumber, checkitem_ranumber, checkitem_curr_rate) SELECT _checkid,currToCurr(checkhead_curr_id, aropen_curr_id, pAmount, checkhead_checkdate), 0,cmhead_custponumber,pAropenid,aropen_docdate,aropen_curr_id,cmhead_number,NULL, 1 / (_check_curr_rate / aropen_curr_rate) FROM checkhead, aropen LEFT OUTER JOIN cmhead ON (aropen_docnumber=cmhead_number) WHERE ((aropen_id=pAropenid) AND (checkhead_id=_checkid)); END IF; RETURN _checkid; END; $_$; ALTER FUNCTION public.createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean, integer) OWNER TO admin; -- -- Name: createchecks(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createchecks(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; pCheckDate ALIAS FOR $2; _v RECORD; _r RECORD; _c RECORD; _checkid INTEGER; _counter INTEGER := 0; _check_curr_id INTEGER; _check_curr_rate NUMERIC; BEGIN SELECT bankaccnt_curr_id, currRate(bankaccnt_curr_id, pCheckDate) INTO _check_curr_id, _check_curr_rate FROM bankaccnt WHERE ( bankaccnt_id = pBankaccntid ); FOR _v IN SELECT DISTINCT vend_id, vend_number, vend_name FROM apselect JOIN apopen ON (apselect_apopen_id=apopen_id) JOIN vendinfo ON (apopen_vend_id=vend_id) WHERE ((apselect_bankaccnt_id=pBankaccntid) AND (apselect_date <= pCheckDate)) LOOP -- if we owe this vendor anything (we might not) then create a check IF ((SELECT SUM(apselect_amount * _check_curr_rate / apopen_curr_rate) FROM apselect, apopen WHERE ((apselect_apopen_id=apopen_id) AND (apopen_vend_id=_v.vend_id) AND (apselect_bankaccnt_id=pBankaccntid)) ) > 0) THEN -- 0.01 is a temporary amount; we''ll update the check amount later _checkid := createCheck(pBankaccntid, 'V', _v.vend_id, pCheckDate, 0.01, _check_curr_id, NULL, NULL, '', '', FALSE); FOR _r IN SELECT apopen_id, apselect_id, apopen_docnumber, apopen_invcnumber, apopen_ponumber, apopen_docdate, apselect_curr_id, apselect_amount, apselect_discount FROM apselect, apopen WHERE ( (apselect_apopen_id=apopen_id) AND (apopen_vend_id=_v.vend_id) AND (apselect_bankaccnt_id=pBankaccntid) ) LOOP INSERT INTO checkitem ( checkitem_checkhead_id, checkitem_apopen_id, checkitem_vouchernumber, checkitem_invcnumber, checkitem_ponumber, checkitem_amount, checkitem_discount, checkitem_docdate, checkitem_curr_id, checkitem_curr_rate ) VALUES ( _checkid, _r.apopen_id, _r.apopen_docnumber, _r.apopen_invcnumber, _r.apopen_ponumber, _r.apselect_amount, _r.apselect_discount, _r.apopen_docdate, _r.apselect_curr_id, 1 / (_check_curr_rate / currRate(_r.apselect_curr_id, pCheckdate)) ); DELETE FROM apselect WHERE (apselect_id=_r.apselect_id); END LOOP; -- one check can pay for purchases on multiple dates in multiple currencies UPDATE checkhead SET checkhead_amount = (SELECT SUM(checkitem_amount / checkitem_curr_rate) FROM checkitem WHERE (checkitem_checkhead_id=checkhead_id)) WHERE (checkhead_id=_checkid); _counter := (_counter + 1); END IF; END LOOP; RETURN _counter; END; $_$; ALTER FUNCTION public.createchecks(integer, date) OWNER TO admin; -- -- Name: createcounttag(integer, text, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcounttag(integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pComments ALIAS FOR $2; pPriority ALIAS FOR $3; pFreeze ALIAS FOR $4; BEGIN RETURN createCountTag(pItemsiteid, pComments, pPriority, pFreeze, NULL); END; $_$; ALTER FUNCTION public.createcounttag(integer, text, boolean, boolean) OWNER TO admin; -- -- Name: createcounttag(integer, text, boolean, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcounttag(integer, text, boolean, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pComments ALIAS FOR $2; pPriority ALIAS FOR $3; pFreeze ALIAS FOR $4; pLocationid ALIAS FOR $5; _invcntid INTEGER; _whs RECORD; _type CHARACTER; _controlmethod CHARACTER; BEGIN SELECT item_type, itemsite_controlmethod INTO _type, _controlmethod FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid)); IF (NOT FOUND OR _type IN ('F', 'R', 'L','J') OR _controlmethod = 'N') THEN RETURN 0; -- We simply do not do these item types. END IF; -- Test for existing tags IF (pLocationid IS NULL) THEN SELECT invcnt_id INTO _invcntid FROM invcnt WHERE ((NOT invcnt_posted) AND (invcnt_location_id IS NULL) AND (invcnt_itemsite_id=pItemsiteid)); ELSE SELECT invcnt_id INTO _invcntid FROM invcnt WHERE ((NOT invcnt_posted) AND (invcnt_itemsite_id=pItemsiteid) AND (invcnt_location_id=pLocationid)); END IF; IF (NOT FOUND) THEN SELECT NEXTVAL('invcnt_invcnt_id_seq') INTO _invcntid; SELECT whsinfo.* INTO _whs FROM whsinfo, itemsite WHERE ((warehous_id=itemsite_warehous_id) AND (itemsite_id=pItemsiteid)); INSERT INTO invcnt ( invcnt_id, invcnt_itemsite_id, invcnt_tagdate, invcnt_tagnumber, invcnt_tag_username, invcnt_posted, invcnt_priority, invcnt_comments, invcnt_location_id ) VALUES ( _invcntid, pItemsiteid, CURRENT_TIMESTAMP, (_whs.warehous_counttag_prefix || _whs.warehous_counttag_number::TEXT), getEffectiveXtUser(), FALSE, pPriority, pComments, pLocationid ); UPDATE whsinfo SET warehous_counttag_number=(warehous_counttag_number + 1) WHERE (warehous_id=_whs.warehous_id); IF (pFreeze) THEN UPDATE itemsite SET itemsite_freeze=TRUE WHERE (itemsite_id=pItemsiteid); END IF; END IF; RETURN _invcntid; END; $_$; ALTER FUNCTION public.createcounttag(integer, text, boolean, boolean, integer) OWNER TO admin; -- -- Name: createcustomer(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcustomer(integer) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pcrmacctId ALIAS FOR $1; _custId INTEGER := 0; BEGIN IF (pcrmacctId < 0 OR pcrmacctId IS NULL) THEN RETURN -1; END IF; SELECT crmacct_cust_id INTO _custId FROM crmacct WHERE crmacct_id = pcrmacctId; IF (_custId IS NOT NULL AND _custId <= 0) THEN RETURN -2; END IF; INSERT INTO _customer (active, customer_number, customer_name) SELECT crmacct_active, crmacct_number, crmacct_name FROM crmacct WHERE crmacct_id = pcrmacctId; _custId := CURRVAL('cust_cust_id_seq'); UPDATE crmacct SET crmacct_prospect_id = NULL, crmacct_cust_id = _custId WHERE crmacct_id = pcrmacctId; RETURN _custId; END; $_$; ALTER FUNCTION public.createcustomer(integer) OWNER TO admin; -- -- Name: createcyclecountsbywarehouse(integer, integer, text, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcyclecountsbywarehouse(integer, integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pMaxNumber ALIAS FOR $2; pComments ALIAS FOR $3; pPriority ALIAS FOR $4; pFreeze ALIAS FOR $5; BEGIN RETURN createCycleCountsByWarehouse(pWarehousid, pMaxNumber, pComments, pPriority, pFreeze, NULL, FALSE); END; $_$; ALTER FUNCTION public.createcyclecountsbywarehouse(integer, integer, text, boolean, boolean) OWNER TO admin; -- -- Name: createcyclecountsbywarehouse(integer, integer, integer, text, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcyclecountsbywarehouse(integer, integer, integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pClasscodeid ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; BEGIN RETURN createCycleCountsByWarehouseByClassCode(pWarehousid, pClasscodeid, pMaxNumber, pComments, pPriority, pFreeze, NULL, FALSE); END; $_$; ALTER FUNCTION public.createcyclecountsbywarehouse(integer, integer, integer, text, boolean, boolean) OWNER TO admin; -- -- Name: createcyclecountsbywarehouse(integer, text, integer, text, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcyclecountsbywarehouse(integer, text, integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pClasscodePattern ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; BEGIN RETURN createCycleCountsByWarehouseByClassCode(pWarehousid, pClasscodePattern, pMaxNumber, pComments, pPriority, pFreeze, NULL, FALSE); END; $_$; ALTER FUNCTION public.createcyclecountsbywarehouse(integer, text, integer, text, boolean, boolean) OWNER TO admin; -- -- Name: createcyclecountsbywarehouse(integer, integer, text, boolean, boolean, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcyclecountsbywarehouse(integer, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pMaxNumber ALIAS FOR $2; pComments ALIAS FOR $3; pPriority ALIAS FOR $4; pFreeze ALIAS FOR $5; pLocationid ALIAS FOR $6; pIgnoreZeroBalance ALIAS FOR $7; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, itemloc WHERE ( (itemsite_active) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (pLocationid = itemloc_location_id) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.createcyclecountsbywarehouse(integer, integer, text, boolean, boolean, integer, boolean) OWNER TO admin; -- -- Name: createcyclecountsbywarehousebyclasscode(integer, integer, integer, text, boolean, boolean, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcyclecountsbywarehousebyclasscode(integer, integer, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pClasscodeid ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; pLocationid ALIAS FOR $7; pIgnoreZeroBalance ALIAS FOR $8; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) AND (item_classcode_id=pClasscodeid) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, item, itemloc WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (pLocationid = itemloc_location_id) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (item_classcode_id=pClasscodeid) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.createcyclecountsbywarehousebyclasscode(integer, integer, integer, text, boolean, boolean, integer, boolean) OWNER TO admin; -- -- Name: createcyclecountsbywarehousebyclasscode(integer, text, integer, text, boolean, boolean, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcyclecountsbywarehousebyclasscode(integer, text, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pClasscodePattern ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; pLocationid ALIAS FOR $7; pIgnoreZeroBalance ALIAS FOR $8; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item, classcode WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) AND (classcode_code ~ pClasscodePattern) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, item, classcode, itemloc WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (pLocationid = itemloc_location_id) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (classcode_code ~ pClasscodePattern) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.createcyclecountsbywarehousebyclasscode(integer, text, integer, text, boolean, boolean, integer, boolean) OWNER TO admin; -- -- Name: createcyclecountsbywarehousebyplannercode(integer, text, integer, text, boolean, boolean, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcyclecountsbywarehousebyplannercode(integer, text, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pPlancodePattern ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; pLocationid ALIAS FOR $7; pIgnoreZeroBalance ALIAS FOR $8; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item, plancode WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_plancode_id=plancode_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) AND (plancode_code ~ pPlancodePattern) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, plancode, itemloc WHERE ( (itemsite_active) AND (itemsite_plancode_id=plancode_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (pLocationid = itemloc_location_id) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (plancode_code ~ pPlancodePattern) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.createcyclecountsbywarehousebyplannercode(integer, text, integer, text, boolean, boolean, integer, boolean) OWNER TO admin; -- -- Name: createcyclecountsbywarehousebyplannercode(integer, integer, integer, text, boolean, boolean, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createcyclecountsbywarehousebyplannercode(integer, integer, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pPlancodeid ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; pLocationid ALIAS FOR $7; pIgnoreZeroBalance ALIAS FOR $8; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) AND (itemsite_plancode_id=pPlancodeid) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, itemloc WHERE ( (itemsite_active) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (pLocationid = itemloc_location_id) AND (itemsite_plancode_id=pPlancodeid) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.createcyclecountsbywarehousebyplannercode(integer, integer, integer, text, boolean, boolean, integer, boolean) OWNER TO admin; -- -- Name: createfile(text, text, bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createfile(text, text, bytea) RETURNS integer LANGUAGE plpgsql AS $_$ declare pTitle ALIAS FOR $1; pDescription ALIAS FOR $2; pStream ALIAS FOR $3; _id integer; begin _id := nextval('file_file_id_seq'); insert into file (file_id, file_title, file_descrip, file_stream) values (_id, pTitle, pDescription, pStream); return _id; end; $_$; ALTER FUNCTION public.createfile(text, text, bytea) OWNER TO admin; -- -- Name: createinvoice(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; _invcheadid INTEGER; _invcitemid INTEGER; _qtyToInvoice NUMERIC; _r RECORD; _s RECORD; _lastlinenumber INTEGER := 1; BEGIN IF ( ( SELECT cobmisc_posted FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ) ) THEN RETURN -1; END IF; SELECT NEXTVAL('invchead_invchead_id_seq') INTO _invcheadid; -- Give this selection a number if it has not been assigned one UPDATE cobmisc SET cobmisc_invcnumber=fetchInvcNumber() WHERE ( (cobmisc_invcnumber IS NULL) AND (cobmisc_id=pCobmiscid) ); -- Create the Invoice header INSERT INTO invchead ( invchead_id,invchead_cust_id,invchead_shipto_id,invchead_ordernumber,invchead_orderdate, invchead_posted,invchead_printed,invchead_invcnumber,invchead_invcdate,invchead_shipdate, invchead_ponumber,invchead_shipvia,invchead_fob,invchead_billto_name,invchead_billto_address1, invchead_billto_address2,invchead_billto_address3,invchead_billto_city,invchead_billto_state,invchead_billto_zipcode, invchead_billto_phone,invchead_billto_country,invchead_shipto_name,invchead_shipto_address1,invchead_shipto_address2, invchead_shipto_address3,invchead_shipto_city,invchead_shipto_state,invchead_shipto_zipcode,invchead_shipto_phone, invchead_shipto_country,invchead_salesrep_id,invchead_commission,invchead_terms_id,invchead_freight, invchead_misc_amount,invchead_misc_descrip,invchead_misc_accnt_id,invchead_payment, invchead_paymentref,invchead_notes,invchead_prj_id,invchead_curr_id, invchead_taxzone_id, invchead_shipchrg_id, invchead_saletype_id, invchead_shipzone_id ) SELECT _invcheadid,cohead_cust_id,cohead_shipto_id,cohead_number,cohead_orderdate, FALSE,FALSE,cobmisc_invcnumber,cobmisc_invcdate,cobmisc_shipdate, cohead_custponumber,cobmisc_shipvia,cohead_fob,cohead_billtoname,cohead_billtoaddress1, cohead_billtoaddress2,cohead_billtoaddress3,cohead_billtocity,cohead_billtostate,cohead_billtozipcode, cntct_phone AS cust_phone,cohead_billtocountry,cohead_shiptoname,cohead_shiptoaddress1,cohead_shiptoaddress2, cohead_shiptoaddress3,cohead_shiptocity,cohead_shiptostate,cohead_shiptozipcode,cohead_shipto_cntct_phone, cohead_shiptocountry,cohead_salesrep_id,COALESCE(cohead_commission,0),cohead_terms_id,cobmisc_freight, COALESCE(cobmisc_misc, 0.00),cobmisc_misc_descrip,cobmisc_misc_accnt_id,cobmisc_payment, cobmisc_paymentref,cobmisc_notes,cohead_prj_id,cobmisc_curr_id, cobmisc_taxzone_id, cohead_shipchrg_id, cohead_saletype_id, cohead_shipzone_id FROM cobmisc, cohead, custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE ( (cobmisc_cohead_id=cohead_id) AND (cohead_cust_id=cust_id) AND (cobmisc_id=pCobmiscid) ); INSERT INTO invcheadtax(taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate) SELECT _invcheadid,taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate FROM cobmisctax WHERE taxhist_parent_id = pCobmiscid AND taxhist_taxtype_id = getadjustmenttaxtypeid(); -- Create the Invoice items FOR _r IN SELECT coitem_id, coitem_linenumber, coitem_subnumber, coitem_custpn, coitem_qtyord, cobill_qty, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_custprice, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_memo, coitem_rev_accnt_id, itemsite_item_id, itemsite_warehous_id, cobill_taxtype_id, formatSoItemNumber(coitem_id) AS ordnumber FROM coitem, cobill, itemsite WHERE ( (cobill_coitem_id=coitem_id) AND (coitem_itemsite_id=itemsite_id) AND (cobill_cobmisc_id=pCobmiscid) ) ORDER BY coitem_linenumber, coitem_subnumber LOOP SELECT NEXTVAL('invcitem_invcitem_id_seq') INTO _invcitemid; INSERT INTO invcitem ( invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_custprice, invcitem_price, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_notes, invcitem_taxtype_id, invcitem_coitem_id, invcitem_rev_accnt_id ) VALUES ( _invcitemid, _invcheadid, _lastlinenumber, _r.itemsite_item_id, _r.itemsite_warehous_id, _r.coitem_custpn, '', '', _r.coitem_qtyord, _r.cobill_qty, _r.coitem_qty_uom_id, _r.coitem_qty_invuomratio, _r.coitem_custprice, _r.coitem_price, _r.coitem_price_uom_id, _r.coitem_price_invuomratio, _r.coitem_memo, _r.cobill_taxtype_id, _r.coitem_id, _r.coitem_rev_accnt_id ); -- Find and mark any Lot/Serial invdetail records associated with this bill UPDATE invdetail SET invdetail_invcitem_id = _invcitemid WHERE (invdetail_id IN (SELECT invdetail_id FROM invhist JOIN invdetail ON (invdetail_invhist_id=invhist_id) WHERE ( (invhist_ordnumber = _r.ordnumber) AND (invhist_ordtype = 'SO') AND (invhist_transtype = 'SH') AND (invdetail_invcitem_id IS NULL) ) )); -- Mark any shipped, uninvoiced shipitems for the current coitem as invoiced _qtyToInvoice := _r.cobill_qty; FOR _s IN SELECT shipitem.*, shipitem_qty = _r.cobill_qty AS matched FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=_r.coitem_id) AND (shiphead_shipped) AND (shiphead_order_type='SO') AND (NOT shipitem_invoiced)) ORDER BY matched DESC, shipitem_qty DESC FOR UPDATE LOOP IF (_qtyToInvoice >= _s.shipitem_qty) THEN UPDATE shipitem SET shipitem_invoiced=TRUE, shipitem_invcitem_id=_invcitemid WHERE (shipitem_id=_s.shipitem_id); _qtyToInvoice := _qtyToInvoice - _s.shipitem_qty; END IF; IF (_qtyToInvoice <= 0) THEN EXIT; END IF; END LOOP; UPDATE cobill SET cobill_invcnum=cobmisc_invcnumber, cobill_invcitem_id=invcitem_id FROM invcitem, coitem, cobmisc WHERE ((invcitem_linenumber=_lastlinenumber) AND (coitem_id=cobill_coitem_id) AND (cobmisc_id=cobill_cobmisc_id) AND (cobill_cobmisc_id=pCobmiscid) AND (invcitem_invchead_id=_invcheadid)); _lastlinenumber := _lastlinenumber + 1; END LOOP; -- Close all requested coitem's IF ( ( SELECT cobmisc_closeorder FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ) ) THEN UPDATE coitem SET coitem_status='C' FROM cobmisc WHERE ( (coitem_status NOT IN ('C', 'X')) AND (coitem_cohead_id=cobmisc_cohead_id) AND (cobmisc_id=pCobmiscid) ); ELSE UPDATE coitem SET coitem_status='C' FROM cobill WHERE ( (cobill_coitem_id=coitem_id) AND (coitem_status <> 'X') AND (cobill_toclose) AND (cobill_cobmisc_id=pCobmiscid) ); END IF; -- Mark the cobmisc as posted UPDATE cobmisc SET cobmisc_posted=TRUE, cobmisc_invchead_id=_invcheadid WHERE (cobmisc_id=pCobmiscid); -- All done RETURN _invcheadid; END; $_$; ALTER FUNCTION public.createinvoice(integer) OWNER TO admin; -- -- Name: createinvoiceconsolidated(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createinvoiceconsolidated(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _invcheadid INTEGER; _invcitemid INTEGER; _qtyToInvoice NUMERIC; _r RECORD; _s RECORD; _c RECORD; _i RECORD; _count INTEGER; _invcnumber INTEGER; _lastlinenumber INTEGER; BEGIN _count := 0; FOR _c IN SELECT min(cobmisc_id) AS cobmisc_id, count(*) AS cnt, -- there are the key values for consolidation cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cntct_phone AS cust_phone, cohead_billtocountry, cohead_salesrep_id, cohead_commission, cohead_terms_id, cobmisc_misc_accnt_id, cohead_prj_id, cobmisc_curr_id, cobmisc_taxzone_id, cohead_shipchrg_id, cohead_saletype_id, cohead_shipzone_id, -- the following are consolidated values to use in creating the header MIN(cohead_number) AS cohead_number, MIN(cohead_orderdate) AS cohead_orderdate, MIN(cobmisc_invcdate) AS cobmisc_invcdate, MIN(cobmisc_shipdate) AS cobmisc_shipdate, SUM(cobmisc_freight) AS cobmisc_freight, SUM(cobmisc_misc) AS cobmisc_misc, SUM(cobmisc_payment) AS cobmisc_payment FROM cobmisc JOIN cohead ON (cobmisc_cohead_id=cohead_id) JOIN custinfo ON (cohead_cust_id=cust_id) LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE(NOT cobmisc_posted AND (cohead_cust_id=pCustid) ) GROUP BY cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cust_phone, cohead_billtocountry, cohead_salesrep_id, cohead_commission, cohead_terms_id, cobmisc_misc_accnt_id, cohead_prj_id, cobmisc_curr_id, cobmisc_taxzone_id, cohead_shipchrg_id, cohead_saletype_id, cohead_shipzone_id LOOP IF(_c.cnt = 1) THEN PERFORM createInvoice(_c.cobmisc_id); _count := (_count + 1); ELSE SELECT NEXTVAL('invchead_invchead_id_seq'), fetchInvcNumber() INTO _invcheadid, _invcnumber; -- Create the Invoice header INSERT INTO invchead ( invchead_id, invchead_cust_id, invchead_shipto_id, invchead_ordernumber, invchead_orderdate, invchead_posted, invchead_printed, invchead_invcnumber, invchead_invcdate, invchead_shipdate, invchead_ponumber, invchead_shipvia, invchead_fob, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_phone, invchead_billto_country, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_phone, invchead_shipto_country, invchead_salesrep_id, invchead_commission, invchead_terms_id, invchead_freight, invchead_misc_amount, invchead_misc_descrip, invchead_misc_accnt_id, invchead_payment, invchead_paymentref, invchead_notes, invchead_prj_id, invchead_curr_id, invchead_taxzone_id, invchead_shipchrg_id, invchead_saletype_id, invchead_shipzone_id ) VALUES(_invcheadid, pCustid, -1, NULL, _c.cohead_orderdate, FALSE, FALSE, _invcnumber, _c.cobmisc_invcdate, _c.cobmisc_shipdate, 'MULTIPLE', '', '', _c.cohead_billtoname, _c.cohead_billtoaddress1, _c.cohead_billtoaddress2, _c.cohead_billtoaddress3, _c.cohead_billtocity, _c.cohead_billtostate, _c.cohead_billtozipcode, _c.cust_phone, _c.cohead_billtocountry, '', '', '', '', '', '', '', '', '', _c.cohead_salesrep_id, COALESCE(_c.cohead_commission, 0), _c.cohead_terms_id, _c.cobmisc_freight, _c.cobmisc_misc, CASE WHEN(_c.cobmisc_misc <> 0) THEN 'Multiple' ELSE '' END, _c.cobmisc_misc_accnt_id, _c.cobmisc_payment, '', 'Multiple Sales Order # Invoice', _c.cohead_prj_id, _c.cobmisc_curr_id, _c.cobmisc_taxzone_id, _c.cohead_shipchrg_id, _c.cohead_saletype_id, _c.cohead_shipzone_id ); _lastlinenumber := 1; FOR _i IN SELECT cobmisc_id FROM cobmisc JOIN cohead ON (cobmisc_cohead_id=cohead_id) JOIN custinfo ON (cohead_cust_id=cust_id) LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE(NOT cobmisc_posted AND (cohead_cust_id=pCustid) AND (COALESCE(cohead_billtoname,'') = COALESCE(_c.cohead_billtoname,'')) AND (COALESCE(cohead_billtoaddress1,'') = COALESCE(_c.cohead_billtoaddress1,'')) AND (COALESCE(cohead_billtoaddress2,'') = COALESCE(_c.cohead_billtoaddress2,'')) AND (COALESCE(cohead_billtoaddress3,'') = COALESCE(_c.cohead_billtoaddress3,'')) AND (COALESCE(cohead_billtocity,'') = COALESCE(_c.cohead_billtocity,'')) AND (COALESCE(cohead_billtostate,'') = COALESCE(_c.cohead_billtostate,'')) AND (COALESCE(cohead_billtozipcode,'') = COALESCE(_c.cohead_billtozipcode,'')) AND (COALESCE(cntct_phone,'') = COALESCE(_c.cust_phone,'')) AND (COALESCE(cohead_billtocountry,'') = COALESCE(_c.cohead_billtocountry,'')) AND (COALESCE(cohead_salesrep_id, 0) = COALESCE(_c.cohead_salesrep_id, 0)) AND (COALESCE(cohead_commission, 0) = COALESCE(_c.cohead_commission, 0)) AND (COALESCE(cohead_terms_id, 0) = COALESCE(_c.cohead_terms_id, 0)) AND (COALESCE(cobmisc_misc_accnt_id, 0) = COALESCE(_c.cobmisc_misc_accnt_id, 0)) AND (COALESCE(cohead_prj_id, 0) = COALESCE(_c.cohead_prj_id, 0)) AND (COALESCE(cobmisc_curr_id, 0) = COALESCE(_c.cobmisc_curr_id, 0)) AND (COALESCE(cobmisc_taxzone_id, 0) = COALESCE(_c.cobmisc_taxzone_id, 0)) AND (COALESCE(cohead_saletype_id, 0) = COALESCE(_c.cohead_saletype_id, 0)) AND (COALESCE(cohead_shipzone_id, 0) = COALESCE(_c.cohead_shipzone_id, 0)) ) LOOP -- Create the Invoice Head tax INSERT INTO invcheadtax(taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate) SELECT _invcheadid,taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate FROM cobmisctax WHERE taxhist_parent_id = _i.cobmisc_id AND taxhist_taxtype_id = getadjustmenttaxtypeid(); -- Give this selection a number if it has not been assigned one UPDATE cobmisc SET cobmisc_invcnumber=_invcnumber WHERE(cobmisc_id=_i.cobmisc_id); -- Create the Invoice items FOR _r IN SELECT coitem_id, coitem_linenumber, coitem_subnumber, coitem_custpn, coitem_qtyord, cobill_qty, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_custprice, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_memo, itemsite_item_id, itemsite_warehous_id, cobill_taxtype_id FROM cohead, coitem, cobill, itemsite WHERE((cobill_coitem_id=coitem_id) AND (cohead_id=coitem_cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (cobill_cobmisc_id=_i.cobmisc_id) ) ORDER BY cohead_number, coitem_linenumber, coitem_subnumber LOOP SELECT NEXTVAL('invcitem_invcitem_id_seq') INTO _invcitemid; INSERT INTO invcitem ( invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_custprice, invcitem_price, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_notes, invcitem_taxtype_id, invcitem_coitem_id ) VALUES ( _invcitemid, _invcheadid, _lastlinenumber, _r.itemsite_item_id, _r.itemsite_warehous_id, _r.coitem_custpn, '', '', _r.coitem_qtyord, _r.cobill_qty, _r.coitem_qty_uom_id, _r.coitem_qty_invuomratio, _r.coitem_custprice, _r.coitem_price, _r.coitem_price_uom_id, _r.coitem_price_invuomratio, _r.coitem_memo, _r.cobill_taxtype_id, _r.coitem_id ); -- Find and mark any Lot/Serial invdetail records associated with this bill UPDATE invdetail SET invdetail_invcitem_id = _invcitemid WHERE (invdetail_id IN (SELECT invdetail_id FROM coitem, cohead, invhist, invdetail WHERE ((coitem_cohead_id=cohead_id) AND (invdetail_invhist_id=invhist_id) AND (invhist_ordnumber = text(cohead_number||'-'||formatSoLineNumber(coitem_id))) AND (invdetail_invcitem_id IS NULL) AND (coitem_id=_r.coitem_id)) ) ); -- Mark any shipped, uninvoiced shipitems for the current coitem as invoiced _qtyToInvoice := _r.cobill_qty; FOR _s IN SELECT shipitem.*, shipitem_qty = _r.cobill_qty AS matched FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=_r.coitem_id) AND (shiphead_shipped) AND (shiphead_order_type='SO') AND (NOT shipitem_invoiced)) ORDER BY matched DESC, shipitem_qty DESC FOR UPDATE LOOP IF (_qtyToInvoice >= _s.shipitem_qty) THEN UPDATE shipitem SET shipitem_invoiced=TRUE, shipitem_invcitem_id=_invcitemid WHERE (shipitem_id=_s.shipitem_id); _qtyToInvoice := _qtyToInvoice - _s.shipitem_qty; END IF; IF (_qtyToInvoice <= 0) THEN EXIT; END IF; END LOOP; UPDATE cobill SET cobill_invcnum=cobmisc_invcnumber, cobill_invcitem_id=invcitem_id FROM invcitem, coitem, cobmisc WHERE ((invcitem_linenumber=_lastlinenumber ) AND (coitem_id=cobill_coitem_id) AND (cobmisc_id=cobill_cobmisc_id) AND (cobill_cobmisc_id=_i.cobmisc_id) AND (invcitem_invchead_id=_invcheadid)); _lastlinenumber := _lastlinenumber + 1; END LOOP; -- Close all requested coitem's IF ( ( SELECT cobmisc_closeorder FROM cobmisc WHERE (cobmisc_id=_i.cobmisc_id) ) ) THEN UPDATE coitem SET coitem_status='C' FROM cobmisc WHERE ( (coitem_status NOT IN ('C', 'X')) AND (coitem_cohead_id=cobmisc_cohead_id) AND (cobmisc_id=_i.cobmisc_id) ); ELSE UPDATE coitem SET coitem_status='C' FROM cobill WHERE ( (cobill_coitem_id=coitem_id) AND (coitem_status <> 'X') AND (cobill_toclose) AND (cobill_cobmisc_id=_i.cobmisc_id) ); END IF; -- Mark the cobmisc as posted UPDATE cobmisc SET cobmisc_posted=TRUE, cobmisc_invchead_id=_invcheadid WHERE (cobmisc_id=_i.cobmisc_id); -- All done _count := (_count + 1); END LOOP; END IF; END LOOP; RETURN _count; END; $_$; ALTER FUNCTION public.createinvoiceconsolidated(integer) OWNER TO admin; -- -- Name: createinvoices(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createinvoices() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _counter INTEGER; _cobmisc RECORD; BEGIN _counter := 0; FOR _cobmisc IN SELECT cobmisc_id FROM cobmisc WHERE (NOT cobmisc_posted) LOOP PERFORM createinvoice(_cobmisc.cobmisc_id); _counter := (_counter + 1); END LOOP; RETURN _counter; END; $$; ALTER FUNCTION public.createinvoices() OWNER TO admin; -- -- Name: createinvoices(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createinvoices(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN createinvoices($1, false); END; $_$; ALTER FUNCTION public.createinvoices(integer) OWNER TO admin; -- -- Name: createinvoices(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createinvoices(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustTypeId ALIAS FOR $1; pConsolidate ALIAS FOR $2; _counter INTEGER; _tcounter INTEGER; _cobmisc RECORD; BEGIN _counter := 0; IF (pConsolidate) THEN FOR _cobmisc IN SELECT DISTINCT cust_id FROM cobmisc, cohead, custinfo WHERE((NOT cobmisc_posted) AND (cohead_id=cobmisc_cohead_id) AND (cust_id=cohead_cust_id) AND (cust_custtype_id=pCustTypeId)) LOOP SELECT createinvoiceConsolidated(_cobmisc.cust_id) INTO _tcounter; _counter := (_counter + _tcounter); END LOOP; ELSE FOR _cobmisc IN SELECT cobmisc_id FROM cobmisc, cohead, custinfo WHERE((NOT cobmisc_posted) AND (cohead_id=cobmisc_cohead_id) AND (cust_id=cohead_cust_id) AND (cust_custtype_id=pCustTypeId)) LOOP PERFORM createinvoice(_cobmisc.cobmisc_id); _counter := (_counter + 1); END LOOP; END IF; RETURN _counter; END; $_$; ALTER FUNCTION public.createinvoices(integer, boolean) OWNER TO admin; -- -- Name: createmiscapcheck(integer, integer, date, numeric, integer, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createmiscapcheck(integer, integer, date, numeric, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'createMiscAPCheck() is deprecated - use createCheck() instead'; RETURN createCheck($1, 'V', $2, $3, $4, baseCurrId(), $5, NULL, $6, $7, FALSE); END; $_$; ALTER FUNCTION public.createmiscapcheck(integer, integer, date, numeric, integer, text, text) OWNER TO admin; -- -- Name: createmiscapcheck(integer, integer, date, numeric, integer, integer, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createmiscapcheck(integer, integer, date, numeric, integer, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'createMiscAPCheck() is deprecated - use createCheck() instead'; RETURN createCheck($1, 'V', $2, $3, pAmount, $5, $6, NULL, $7, $8, FALSE); END; $_$; ALTER FUNCTION public.createmiscapcheck(integer, integer, date, numeric, integer, integer, text, text) OWNER TO admin; -- -- Name: createpkgschema(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpkgschema(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pname ALIAS FOR $1; pcomment ALIAS FOR $2; _createtable TEXT; _debug BOOL := true; _namespaceoid INTEGER := -1; _tabs TEXT[] := ARRAY['cmd', 'cmdarg', 'image', 'metasql', 'priv', 'report', 'script', 'uiform'] ; _pkgtab TEXT; BEGIN IF (LENGTH(COALESCE(pname, '')) <= 0) THEN RAISE EXCEPTION 'Cannot create a schema for this package without a name.'; END IF; SELECT oid INTO _namespaceoid FROM pg_namespace WHERE (LOWER(nspname)=LOWER(pname)); IF (NOT FOUND) THEN EXECUTE 'CREATE SCHEMA ' || LOWER(pname); EXECUTE 'GRANT ALL ON SCHEMA ' || LOWER(pname) || ' TO GROUP xtrole;'; SELECT oid INTO _namespaceoid FROM pg_namespace WHERE (LOWER(nspname)=LOWER(pname)); END IF; FOR i IN ARRAY_LOWER(_tabs,1)..ARRAY_UPPER(_tabs,1) LOOP _pkgtab := pname || '.pkg' || _tabs[i]; IF NOT EXISTS(SELECT oid FROM pg_class WHERE ((relname=_pkgtab) AND (relnamespace=_namespaceoid))) THEN _createtable := 'CREATE TABLE ' || _pkgtab || ' () INHERITS (' || _tabs[i] || ');'; IF (_debug) THEN RAISE NOTICE '%', _createtable; END IF; EXECUTE _createtable; EXECUTE 'ALTER TABLE ' || _pkgtab || ' ALTER ' || _tabs[i] || '_id SET NOT NULL,' || ' ADD PRIMARY KEY (' || _tabs[i] || '_id),' || ' ALTER ' || _tabs[i] || '_id SET DEFAULT NEXTVAL(''' || _tabs[i] || '_' || _tabs[i] || '_id_seq'');'; EXECUTE 'REVOKE ALL ON ' || _pkgtab || ' FROM PUBLIC;'; EXECUTE 'GRANT ALL ON ' || _pkgtab || ' TO GROUP xtrole;'; IF (_tabs[i] = 'cmdarg') THEN EXECUTE 'ALTER TABLE ' || _pkgtab || ' ADD FOREIGN KEY (cmdarg_cmd_id) REFERENCES ' || pname || '.pkgcmd(cmd_id);'; END IF; EXECUTE 'SELECT dropIfExists(''TRIGGER'', ''pkg' || _tabs[i] || 'beforetrigger'', ''' || pname || ''');' ; EXECUTE 'CREATE TRIGGER pkg' || _tabs[i] || 'beforetrigger ' || 'BEFORE INSERT OR UPDATE OR DELETE ON ' || _pkgtab || ' FOR EACH ROW EXECUTE PROCEDURE _pkg' || _tabs[i] || 'beforetrigger();'; EXECUTE 'SELECT dropIfExists(''TRIGGER'', ''pkg' || _tabs[i] || 'altertrigger'', ''' || pname || ''');' ; EXECUTE 'CREATE TRIGGER pkg' || _tabs[i] || 'altertrigger ' || 'BEFORE INSERT OR UPDATE OR DELETE ON ' || _pkgtab || ' FOR EACH ROW EXECUTE PROCEDURE _pkg' || _tabs[i] || 'altertrigger();'; EXECUTE 'SELECT dropIfExists(''TRIGGER'', ''pkg' || _tabs[i] || 'aftertrigger'', ''' || pname || ''');' ; EXECUTE 'CREATE TRIGGER pkg' || _tabs[i] || 'aftertrigger ' || 'AFTER INSERT OR UPDATE OR DELETE ON ' || _pkgtab || ' FOR EACH ROW EXECUTE PROCEDURE _pkg' || _tabs[i] || 'aftertrigger();'; END IF; END LOOP; EXECUTE 'COMMENT ON SCHEMA ' || quote_ident(pname) || ' IS ' || quote_literal(pcomment) || ';'; RETURN _namespaceoid; END; $_$; ALTER FUNCTION public.createpkgschema(text, text) OWNER TO admin; -- -- Name: createpr(integer, integer, numeric, date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpr(integer, integer, numeric, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQty ALIAS FOR $3; pDueDate ALIAS FOR $4; pNotes ALIAS FOR $5; _prid INTEGER; BEGIN SELECT NEXTVAL('pr_pr_id_seq') INTO _prid; INSERT INTO pr ( pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_itemsite_id, pr_qtyreq, pr_duedate, pr_releasenote ) VALUES ( _prid, pOrderNumber, nextPrSubnumber(pOrderNumber), 'O', 'M', -1, pItemsiteid, pQty, pDuedate, pNotes); RETURN _prid; END; $_$; ALTER FUNCTION public.createpr(integer, integer, numeric, date, text) OWNER TO admin; -- -- Name: createpr(integer, character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpr(integer, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderNumber ALIAS FOR $1; pParentType ALIAS FOR $2; pParentId ALIAS FOR $3; _parent RECORD; _prid INTEGER; _orderNumber INTEGER; BEGIN IF (pOrderNumber = -1) THEN SELECT fetchPrNumber() INTO _orderNumber; ELSE _orderNumber := pOrderNumber; END IF; IF (pParentType = 'W') THEN SELECT womatl_itemsite_id AS itemsiteid, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) AS qty, womatl_duedate AS duedate, wo_prj_id AS prjid, womatl_notes AS notes INTO _parent FROM wo, womatl, itemsite WHERE ((womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_id=pParentId)); ELSIF (pParentType = 'S') THEN SELECT coitem_itemsite_id AS itemsiteid, (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS qty, coitem_scheddate AS duedate, cohead_prj_id AS prjid, coitem_memo AS notes INTO _parent FROM coitem, cohead WHERE ((cohead_id=coitem_cohead_id) AND (coitem_id=pParentId)); ELSIF (pParentType = 'F') THEN SELECT planord_itemsite_id AS itemsiteid, planord_qty AS qty, planord_duedate AS duedate, NULL::INTEGER AS prjid, planord_comments AS notes INTO _parent FROM planord WHERE (planord_id=pParentId); ELSE RETURN -2; END IF; IF (NOT FOUND) THEN RETURN -1; END IF; SELECT NEXTVAL('pr_pr_id_seq') INTO _prid; INSERT INTO pr ( pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_prj_id, pr_itemsite_id, pr_qtyreq, pr_duedate, pr_releasenote ) VALUES ( _prid, _orderNumber, nextPrSubnumber(_orderNumber), 'O', pParentType, pParentId, _parent.prjid, _parent.itemsiteid, validateOrderQty(_parent.itemsiteid, _parent.qty, TRUE), _parent.duedate, _parent.notes ); RETURN _prid; END; $_$; ALTER FUNCTION public.createpr(integer, character, integer) OWNER TO admin; -- -- Name: createpr(character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpr(character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentType ALIAS FOR $1; pParentId ALIAS FOR $2; _orderNumber INTEGER; _prid INTEGER; BEGIN IF (pParentType = 'W') THEN SELECT wo_number INTO _orderNumber FROM wo, womatl WHERE ((womatl_wo_id=wo_id) AND (womatl_id=pParentId)); ELSIF (pParentType = 'S') THEN SELECT CAST(cohead_number AS INTEGER) INTO _orderNumber FROM cohead, coitem WHERE ((coitem_cohead_id=cohead_id) AND (coitem_id=pParentId)); ELSIF (pParentType = 'F') THEN SELECT fetchPrNumber() INTO _orderNumber; ELSE RETURN -2; END IF; IF (NOT FOUND) THEN RETURN -1; END IF; SELECT createPr(_orderNumber, pParentType, pParentId) INTO _prid; RETURN _prid; END; $_$; ALTER FUNCTION public.createpr(character, integer) OWNER TO admin; -- -- Name: createpr(integer, integer, numeric, date, text, character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpr(integer, integer, numeric, date, text, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQty ALIAS FOR $3; pDueDate ALIAS FOR $4; pNotes ALIAS FOR $5; pOrderType ALIAS FOR $6; pOrderId ALIAS FOR $7; _prid INTEGER; BEGIN SELECT NEXTVAL('pr_pr_id_seq') INTO _prid; INSERT INTO pr ( pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_itemsite_id, pr_qtyreq, pr_duedate, pr_releasenote ) VALUES ( _prid, pOrderNumber, nextPrSubnumber(pOrderNumber), 'O', pOrderType, pOrderId, pItemsiteid, pQty, pDuedate, pNotes ); RETURN _prid; END; $_$; ALTER FUNCTION public.createpr(integer, integer, numeric, date, text, character, integer) OWNER TO admin; -- -- Name: createpr(integer, character, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpr(integer, character, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderNumber ALIAS FOR $1; pParentType ALIAS FOR $2; pParentId ALIAS FOR $3; pParentNotes ALIAS FOR $4; _parent RECORD; _prid INTEGER; _orderNumber INTEGER; BEGIN IF (pOrderNumber = -1) THEN SELECT fetchPrNumber() INTO _orderNumber; ELSE _orderNumber := pOrderNumber; END IF; IF (pParentType = 'W') THEN SELECT womatl_itemsite_id AS itemsiteid, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) AS qty, womatl_duedate AS duedate, wo_prj_id AS prjid INTO _parent FROM wo, womatl, itemsite WHERE ((womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_id=pParentId)); ELSIF (pParentType = 'S') THEN SELECT coitem_itemsite_id AS itemsiteid, (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS qty, coitem_scheddate AS duedate, cohead_prj_id AS prjid INTO _parent FROM coitem, cohead WHERE ((cohead_id=coitem_cohead_id) AND (coitem_id=pParentId)); ELSIF (pParentType = 'F') THEN SELECT planord_itemsite_id AS itemsiteid, planord_qty AS qty, planord_duedate AS duedate, NULL::INTEGER AS prjid INTO _parent FROM planord WHERE (planord_id=pParentId); ELSE RETURN -2; END IF; IF (NOT FOUND) THEN RETURN -1; END IF; SELECT NEXTVAL('pr_pr_id_seq') INTO _prid; INSERT INTO pr ( pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_prj_id, pr_itemsite_id, pr_qtyreq, pr_duedate, pr_releasenote ) VALUES ( _prid, _orderNumber, nextPrSubnumber(_orderNumber), 'O', pParentType, pParentId, _parent.prjid, _parent.itemsiteid, validateOrderQty(_parent.itemsiteid, _parent.qty, TRUE), _parent.duedate, pParentNotes ); RETURN _prid; END; $_$; ALTER FUNCTION public.createpr(integer, character, integer, text) OWNER TO admin; -- -- Name: createpriv(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpriv(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pModule ALIAS FOR $1; pName ALIAS FOR $2; pDesc ALIAS FOR $3; _id INTEGER; BEGIN SELECT priv_id INTO _id FROM priv WHERE(priv_name=pName); IF (FOUND) THEN UPDATE priv SET priv_module=pModule, priv_descrip=pDesc WHERE(priv_id=_id); ELSE SELECT nextval('priv_priv_id_seq') INTO _id; INSERT INTO priv (priv_id, priv_module, priv_name, priv_descrip) VALUES(_id, pModule, pName, pDesc); END IF; RETURN _id; END; $_$; ALTER FUNCTION public.createpriv(text, text, text) OWNER TO admin; -- -- Name: createpurchasetosale(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpurchasetosale(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoitemId ALIAS FOR $1; pItemSourceId ALIAS FOR $2; pDropShip ALIAS FOR $3; BEGIN RETURN createPurchaseToSale(pCoitemId, pItemSourceId, pDropShip, NULL, NULL, NULL); END; $_$; ALTER FUNCTION public.createpurchasetosale(integer, integer, boolean) OWNER TO admin; -- -- Name: createpurchasetosale(integer, integer, boolean, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpurchasetosale(integer, integer, boolean, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoitemId ALIAS FOR $1; pItemSourceId ALIAS FOR $2; pDropShip ALIAS FOR $3; pPrice ALIAS FOR $4; BEGIN RETURN createPurchaseToSale(pCoitemId, pItemSourceId, pDropShip, NULL, NULL, pPrice); END; $_$; ALTER FUNCTION public.createpurchasetosale(integer, integer, boolean, numeric) OWNER TO admin; -- -- Name: createpurchasetosale(integer, integer, boolean, numeric, date, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createpurchasetosale(integer, integer, boolean, numeric, date, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoitemId ALIAS FOR $1; pItemSourceId ALIAS FOR $2; pDropShip ALIAS FOR $3; pQty ALIAS FOR $4; pDueDate ALIAS FOR $5; pPrice ALIAS FOR $6; _s RECORD; _w RECORD; _i RECORD; _shipto RECORD; _poheadid INTEGER := -1; _poitemid INTEGER := -1; _taxtypeid INTEGER := -1; _polinenumber INTEGER; _ponumber NUMERIC; _price NUMERIC; _temp INTEGER; BEGIN -- Check for existing poitem for this coitem SELECT poitem_id INTO _poitemid FROM poitem WHERE (poitem_order_id=pCoitemId) AND (poitem_order_type='S'); IF (FOUND) THEN RETURN _poitemid; END IF; SELECT *, COALESCE(roundQty(item_fractional, (coitem_qtyord * coitem_qty_invuomratio)), 0.0) AS orderqty INTO _s FROM cohead JOIN coitem ON (cohead_id = coitem_cohead_id) LEFT OUTER JOIN shiptoinfo ON (cohead_shipto_id = shipto_id) LEFT OUTER JOIN itemsite ON (coitem_itemsite_id = itemsite_id) LEFT OUTER JOIN item ON (item_id = itemsite_item_id) WHERE (coitem_id = pCoitemId); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT * INTO _w FROM whsinfo JOIN addr ON (warehous_addr_id = addr_id) JOIN cntct ON (warehous_cntct_id = cntct_id) JOIN itemsite ON (warehous_id = itemsite_warehous_id) WHERE (itemsite_id = _s.itemsite_id); SELECT * INTO _i FROM itemsrc JOIN vendinfo ON (itemsrc_vend_id = vend_id) LEFT OUTER JOIN cntct ON (vend_cntct1_id = cntct_id) LEFT OUTER JOIN addr ON (vend_addr_id = addr_id) WHERE (itemsrc_id = pItemSourceId); IF (NOT FOUND) THEN RETURN -2; END IF; SELECT * INTO _shipto FROM shiptoinfo JOIN cntct ON (shipto_cntct_id = cntct_id) JOIN addr ON (shipto_addr_id = addr_id) RIGHT OUTER JOIN cohead ON (cohead_cust_id = shipto_cust_id) WHERE (cohead_id = _s.cohead_id) LIMIT 1; IF (pDropShip) THEN SELECT COALESCE(pohead_id, -1) INTO _temp FROM pohead WHERE ( (pohead_status = 'U') AND (pohead_vend_id = _i.itemsrc_vend_id) AND (pohead_shiptoaddress_id = _s.shipto_addr_id) ); ELSE SELECT COALESCE(pohead_id, -1) INTO _temp FROM pohead WHERE ( (pohead_status = 'U') AND (pohead_vend_id = _i.itemsrc_vend_id) AND (pohead_shiptoaddress_id = _w.addr_id) ); END IF; IF (FOUND) THEN _poheadid := _temp; UPDATE pohead SET pohead_dropship = pDropShip WHERE (pohead_id = _poheadid); ELSE SELECT NEXTVAL('pohead_pohead_id_seq') INTO _poheadid; SELECT fetchPoNumber() INTO _ponumber; IF (pDropShip) THEN INSERT INTO pohead ( pohead_id, pohead_number, pohead_status, pohead_dropship, pohead_agent_username, pohead_vend_id, pohead_taxzone_id, pohead_orderdate, pohead_curr_id, pohead_cohead_id, pohead_warehous_id, pohead_shipvia, pohead_terms_id, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry, pohead_comments ) VALUES ( _poheadid, _ponumber, 'U', pDropShip, getEffectiveXtUser(), _i.itemsrc_vend_id, _i.vend_taxzone_id, CURRENT_DATE, COALESCE(_i.vend_curr_id, basecurrid()), _s.cohead_id, COALESCE(_s.cohead_warehous_id, -1), COALESCE(_i.vend_shipvia, TEXT('')), COALESCE(_i.vend_terms_id, -1), COALESCE(_s.cohead_shipto_cntct_id, _shipto.shipto_cntct_id), COALESCE(_s.cohead_shipto_cntct_honorific, _shipto.cntct_honorific), COALESCE(_s.cohead_shipto_cntct_first_name, _shipto.cntct_first_name), COALESCE(_s.cohead_shipto_cntct_middle, _shipto.cntct_middle), COALESCE(_s.cohead_shipto_cntct_last_name, _shipto.cntct_last_name), COALESCE(_s.cohead_shipto_cntct_suffix, _shipto.cntct_suffix), COALESCE(_s.cohead_shipto_cntct_phone, _shipto.cntct_phone), COALESCE(_s.cohead_shipto_cntct_title, _shipto.cntct_title), COALESCE(_s.cohead_shipto_cntct_fax, _shipto.cntct_fax), COALESCE(_s.cohead_shipto_cntct_email, _shipto.cntct_email), COALESCE(_s.shipto_addr_id, _shipto.addr_id), COALESCE(_s.cohead_shiptoaddress1, _shipto.addr_line1), COALESCE(_s.cohead_shiptoaddress2, _shipto.addr_line2), COALESCE(_s.cohead_shiptoaddress3, _shipto.addr_line3), COALESCE(_s.cohead_shiptocity, _shipto.addr_city), COALESCE(_s.cohead_shiptostate, _shipto.addr_state), COALESCE(_s.cohead_shiptozipcode, _shipto.addr_postalcode), COALESCE(_s.cohead_shiptocountry, _shipto.addr_country), _i.cntct_id, COALESCE(_i.cntct_honorific, TEXT('')), COALESCE(_i.cntct_first_name, TEXT('')), COALESCE(_i.cntct_middle, TEXT('')), COALESCE(_i.cntct_last_name, TEXT('')), COALESCE(_i.cntct_suffix, TEXT('')), COALESCE(_i.cntct_phone, TEXT('')), COALESCE(_i.cntct_title, TEXT('')), COALESCE(_i.cntct_fax, TEXT('')), COALESCE(_i.cntct_email, TEXT('')), COALESCE(_i.addr_line1, TEXT('')), COALESCE(_i.addr_line2, TEXT('')), COALESCE(_i.addr_line3, TEXT('')), COALESCE(_i.addr_city, TEXT('')), COALESCE(_i.addr_state, TEXT('')), COALESCE(_i.addr_postalcode, TEXT('')), COALESCE(_i.addr_country, TEXT('')), COALESCE(_s.cohead_shipcomments, TEXT('')) ); ELSE INSERT INTO pohead ( pohead_id, pohead_number, pohead_status, pohead_dropship, pohead_agent_username, pohead_vend_id, pohead_taxzone_id, pohead_orderdate, pohead_curr_id, pohead_cohead_id, pohead_warehous_id, pohead_shipvia, pohead_terms_id, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry ) VALUES ( _poheadid, _ponumber, 'U', pDropShip, getEffectiveXtUser(), _i.itemsrc_vend_id, _i.vend_taxzone_id, CURRENT_DATE, COALESCE(_i.vend_curr_id, basecurrid()), _s.cohead_id, COALESCE(_s.cohead_warehous_id, -1), COALESCE(_i.vend_shipvia, TEXT('')), COALESCE(_i.vend_terms_id, -1), _w.cntct_id, _w.cntct_honorific, _w.cntct_first_name, _w.cntct_middle, _w.cntct_last_name, _w.cntct_suffix, _w.cntct_phone, _w.cntct_title, _w.cntct_fax, _w.cntct_email, _w.addr_id, _w.addr_line1, _w.addr_line2, _w.addr_line3, _w.addr_city, _w.addr_state, _w.addr_postalcode, _w.addr_country, _i.cntct_id, COALESCE(_i.cntct_honorific, TEXT('')), COALESCE(_i.cntct_first_name, TEXT('')), COALESCE(_i.cntct_middle, TEXT('')), COALESCE(_i.cntct_last_name, TEXT('')), COALESCE(_i.cntct_suffix, TEXT('')), COALESCE(_i.cntct_phone, TEXT('')), COALESCE(_i.cntct_title, TEXT('')), COALESCE(_i.cntct_fax, TEXT('')), COALESCE(_i.cntct_email, TEXT('')), COALESCE(_i.addr_line1, TEXT('')), COALESCE(_i.addr_line2, TEXT('')), COALESCE(_i.addr_line3, TEXT('')), COALESCE(_i.addr_city, TEXT('')), COALESCE(_i.addr_state, TEXT('')), COALESCE(_i.addr_postalcode, TEXT('')), COALESCE(_i.addr_country, TEXT('')) ); END IF; END IF; SELECT NEXTVAL('poitem_poitem_id_seq') INTO _poitemid; SELECT (COALESCE(MAX(poitem_linenumber), 0) + 1) INTO _polinenumber FROM poitem WHERE (poitem_pohead_id = _poheadid); SELECT COALESCE(itemtax_taxtype_id, -1) INTO _taxtypeid FROM itemtax WHERE (itemtax_item_id = _i.itemsrc_item_id); IF (pPrice IS NULL) THEN SELECT itemsrcPrice(pItemSourceId, COALESCE(_s.cohead_warehous_id, -1), pDropShip, COALESCE(pQty, _s.orderqty), COALESCE(_i.vend_curr_id, baseCurrId()), CURRENT_DATE) INTO _price; ELSE _price := pPrice; END IF; raise notice '_price=%', _price; IF (pDropShip) THEN INSERT INTO poitem ( poitem_id, poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_itemsrc_id, poitem_order_id, poitem_order_type, poitem_prj_id, poitem_stdcost, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id, poitem_comments ) VALUES ( _poitemid, 'U', _poheadid, _polinenumber, COALESCE(pDueDate, _s.coitem_scheddate), _s.coitem_itemsite_id, COALESCE(_i.itemsrc_vend_item_descrip, TEXT('')), COALESCE(_i.itemsrc_vend_uom, TEXT('')), COALESCE(_i.itemsrc_invvendoruomratio, 1.00), (COALESCE(pQty, _s.orderqty) / COALESCE(_i.itemsrc_invvendoruomratio, 1.00)), _price, COALESCE(_i.itemsrc_vend_item_number, TEXT('')), pItemSourceId, pCoitemId, 'S', _s.cohead_prj_id, stdcost(_i.itemsrc_item_id), COALESCE(_i.itemsrc_manuf_name, TEXT('')), COALESCE(_i.itemsrc_manuf_item_number, TEXT('')), COALESCE(_i.itemsrc_manuf_item_descrip, TEXT('')), _taxtypeid, COALESCE(_s.coitem_memo, TEXT(''))); ELSE INSERT INTO poitem ( poitem_id, poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_itemsrc_id, poitem_order_id, poitem_order_type, poitem_prj_id, poitem_stdcost, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id ) VALUES ( _poitemid, 'U', _poheadid, _polinenumber, COALESCE(pDueDate, _s.coitem_scheddate), _s.coitem_itemsite_id, COALESCE(_i.itemsrc_vend_item_descrip, TEXT('')), COALESCE(_i.itemsrc_vend_uom, TEXT('')), COALESCE(_i.itemsrc_invvendoruomratio, 1.00), (COALESCE(pQty, _s.orderqty) / COALESCE(_i.itemsrc_invvendoruomratio, 1.00)), _price, COALESCE(_i.itemsrc_vend_item_number, TEXT('')), pItemSourceId, pCoitemId, 'S', _s.cohead_prj_id, stdcost(_i.itemsrc_item_id), COALESCE(_i.itemsrc_manuf_name, TEXT('')), COALESCE(_i.itemsrc_manuf_item_number, TEXT('')), COALESCE(_i.itemsrc_manuf_item_descrip, TEXT('')), _taxtypeid ); END IF; -- Copy characteristics from the coitem to the poitem INSERT INTO charass ( charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default, charass_price ) SELECT 'PI', _poitemid, charass_char_id, charass_value, charass_default, charass_price FROM charass WHERE ( (charass_target_type='SI') AND (charass_target_id=pCoitemId) ); UPDATE coitem SET coitem_order_type = 'P', coitem_order_id = _poitemid WHERE ( coitem_id = pCoitemId ); -- Generate the PoItemCreatedBySo event notice INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id , 'P', poitem_id, itemsite_warehous_id, (pohead_number || '-' || poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id=evnttype_id) JOIN itemsite ON (evntnot_warehous_id=itemsite_warehous_id) JOIN item ON (itemsite_item_id=item_id) JOIN poitem ON (poitem_itemsite_id=itemsite_id) JOIN pohead ON (poitem_pohead_id=pohead_id) WHERE ( (poitem_id=_poitemid) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='PoItemCreatedBySo') ); RETURN _poitemid; END; $_$; ALTER FUNCTION public.createpurchasetosale(integer, integer, boolean, numeric, date, numeric) OWNER TO admin; -- -- Name: createrecurringinvoices(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createrecurringinvoices() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'createRecurringInvoices() has been deprecated; use createRecurringItems(NULL, ''I'') instead.'; RETURN createRecurringItems(NULL, 'I'); END; $$; ALTER FUNCTION public.createrecurringinvoices() OWNER TO admin; -- -- Name: createrecurringitems(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createrecurringitems(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentid ALIAS FOR $1; -- if NULL then all items with the given pType pType TEXT := UPPER($2); -- if NULL then all types -- if both are null then all items of all types _copystmt TEXT; _count INTEGER := 0; _countstmt TEXT; _existcnt INTEGER; _id INTEGER; _interval TEXT; _last TIMESTAMP WITH TIME ZONE; _loopcount INTEGER := 1; _maxstmt TEXT; _maxdate TIMESTAMP WITH TIME ZONE := endOfTime(); _result INTEGER := 0; _next TIMESTAMP WITH TIME ZONE; _r RECORD; _rt RECORD; _tmp INTEGER; BEGIN RAISE DEBUG 'createRecurringItems(%, %) entered', pParentid, pType; FOR _r IN SELECT * FROM recur WHERE ((COALESCE(recur_end, endOfTime()) >= CURRENT_TIMESTAMP) AND (pParentid IS NULL OR recur_parent_id=pParentid) AND (pType IS NULL OR UPPER(recur_parent_type)=UPPER(pType))) LOOP RAISE DEBUG 'createRecurringItems looking at recur %, %', _r.recur_id, _r.recur_parent_type; _r.recur_max := COALESCE(_r.recur_max, CAST(fetchMetricValue('RecurringInvoiceBuffer') AS INTEGER), 1); _interval := CASE _r.recur_period WHEN 'Y' THEN ' year' WHEN 'M' THEN ' month' WHEN 'W' THEN ' week' WHEN 'D' THEN ' day' WHEN 'H' THEN ' hour' WHEN 'm' THEN ' minute' ELSE NULL END; IF (_interval IS NULL OR COALESCE(_r.recur_freq, 0) <= 0) THEN RAISE EXCEPTION 'Unknown recurrence frequency % % ON % %', _r.recur_freq, _r.recur_period, _r.recur_parent_type, _r.recur_parent_id; END IF; SELECT * INTO _rt FROM recurtype WHERE (UPPER(recurtype_type)=UPPER(pType)); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count <= 0) THEN RETURN -10; END IF; -- if the recurrence type has a max lookahead window, use it IF (_r.recur_parent_type = 'I') THEN _maxdate := CURRENT_TIMESTAMP + CAST(fetchMetricText('RecurringInvoiceBuffer') || ' days' AS INTERVAL); END IF; IF (_r.recur_parent_type = 'V') THEN _maxdate := CURRENT_TIMESTAMP + CAST(fetchMetricText('RecurringVoucherBuffer') || ' days' AS INTERVAL); END IF; IF (_maxdate > _r.recur_end) THEN -- if recur_end is null, _maxdate is ok _maxdate = _r.recur_end; END IF; -- build statements dynamically from the recurtype table because packages -- might also require recurring items. this way the algorithm is fixed -- and the details are data-driven _countstmt := 'SELECT COUNT(*) FROM [fulltable]' || ' WHERE (($1=[table]_recurring_[table]_id)' || ' AND NOT([done]) ' || ' AND ([limit]));'; _countstmt := REPLACE(_countstmt, '[fulltable]', _rt.recurtype_table); _countstmt := REPLACE(_countstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _countstmt := REPLACE(_countstmt, '[done]', _rt.recurtype_donecheck); _countstmt := REPLACE(_countstmt, '[limit]', COALESCE(_rt.recurtype_limit, 'TRUE')); _maxstmt := 'SELECT MAX([schedcol]) FROM [fulltable]' || ' WHERE (($1=[table]_recurring_[table]_id)' || ' AND ([limit]));'; _maxstmt := REPLACE(_maxstmt, '[schedcol]', _rt.recurtype_schedcol); _maxstmt := REPLACE(_maxstmt, '[fulltable]',_rt.recurtype_table); _maxstmt := REPLACE(_maxstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _maxstmt := REPLACE(_maxstmt, '[limit]', COALESCE(_rt.recurtype_limit, 'TRUE')); _copystmt := 'SELECT [copy]($1, [datetime] [more]);'; _copystmt := REPLACE(_copystmt, '[copy]', _rt.recurtype_copyfunc); _copystmt := REPLACE(_copystmt, '[datetime]', CASE WHEN UPPER(_rt.recurtype_copyargs[2])='DATE' THEN 'CAST(''$2'' AS DATE)' ELSE '''$2''' END); -- 8.4+: -- _copystmt := REPLACE(_copystmt, '[more]', -- REPEAT(', NULL', -- array_length(_rt.recurtype_copyargs) - 2)); _tmp := CAST(REPLACE(REGEXP_REPLACE(array_dims(_rt.recurtype_copyargs), '.*:', ''), ']', '') AS INTEGER); _copystmt := REPLACE(_copystmt, '[more]', REPEAT(', NULL', _tmp - 2)); EXECUTE REPLACE(_countstmt, '$1', _r.recur_parent_id::TEXT) INTO _existcnt; EXECUTE REPLACE(_maxstmt, '$1', _r.recur_parent_id::TEXT) INTO _last; RAISE DEBUG E'% got %, % got %', _countstmt, _existcnt, _maxstmt, _last; _next := _last; _loopcount := 1; WHILE (_existcnt < _r.recur_max AND _next < _maxdate) LOOP _next := _last + CAST(_r.recur_freq * _loopcount || _interval AS INTERVAL); RAISE DEBUG 'createrecurringitems looping, existcnt = %, max = %, is % between % and %?', _existcnt, _r.recur_max, _next, _r.recur_start, _r.recur_end; IF (_next BETWEEN _r.recur_start AND _maxdate) THEN RAISE DEBUG 'createrecurringitems executing % with % and %', _copystmt, _r.recur_parent_id, _next; -- 8.4+: EXECUTE _copystmt INTO _id USING _r.recur_parent_id, _next; EXECUTE REPLACE(REPLACE(_copystmt, '$1', _r.recur_parent_id::TEXT), '$2', _next::TEXT) INTO _id; RAISE DEBUG 'Copying for % returned %', _next, _id; _result := _result + 1; _existcnt := _existcnt + 1; END IF; _loopcount := _loopcount + 1; END LOOP; END LOOP; RETURN _result; END; $_$; ALTER FUNCTION public.createrecurringitems(integer, text) OWNER TO admin; -- -- Name: createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN createTodoItem($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, NULL); END; $_$; ALTER FUNCTION public.createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text) OWNER TO admin; -- -- Name: createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoid ALIAS FOR $1; pusername ALIAS FOR $2; pname ALIAS FOR $3; pdesc ALIAS FOR $4; pincdtid ALIAS FOR $5; pcrmacctid ALIAS FOR $6; pOpheadid ALIAS FOR $7; pstarted ALIAS FOR $8; pdue ALIAS FOR $9; pstatus ALIAS FOR $10; passigned ALIAS FOR $11; pcompleted ALIAS FOR $12; ppriority ALIAS FOR $13; pnotes ALIAS FOR $14; powner ALIAS FOR $15; pcntctid ALIAS FOR $16; _todoid INTEGER; _priority INTEGER := ppriority; _status CHARACTER(1) := pstatus; _incdtid INTEGER := pincdtid; _crmacctid INTEGER := pcrmacctid; _opheadid INTEGER := pOpheadid; _assigned DATE := passigned; _result INTEGER; BEGIN IF (pusername IS NULL OR pusername = '') THEN RETURN -1; END IF; IF (pname IS NULL OR pname = '') THEN RETURN -2; END IF; IF (pdue IS NULL) THEN RETURN -3; END IF; IF (pcompleted IS NOT NULL) THEN _status := 'C'; ELSIF (pstatus IS NULL AND pstarted IS NOT NULL) THEN _status := 'I'; ELSIF (pstatus IS NULL) THEN _status := 'N'; END IF; IF (_incdtid <= 0) THEN _incdtid := NULL; END IF; IF (_crmacctid <= 0) THEN _crmacctid := NULL; END IF; IF (_opheadid <= 0) THEN _opheadid := NULL; END IF; IF (_priority <= 0) THEN _priority := NULL; END IF; IF (_assigned IS NULL) THEN _assigned := CURRENT_DATE; END IF; IF (ptodoid IS NULL) THEN SELECT NEXTVAL('todoitem_todoitem_id_seq') INTO _todoid; ELSE _todoid := ptodoid; END IF; INSERT INTO todoitem ( todoitem_id, todoitem_username, todoitem_name, todoitem_description, todoitem_incdt_id, todoitem_creator_username, todoitem_status, todoitem_active, todoitem_start_date, todoitem_due_date, todoitem_assigned_date, todoitem_completed_date, todoitem_priority_id, todoitem_notes, todoitem_crmacct_id, todoitem_ophead_id, todoitem_owner_username, todoitem_cntct_id ) VALUES ( _todoid, pusername, pname, pdesc, _incdtid, getEffectiveXtUser(), _status, TRUE, pstarted, pdue, _assigned, pcompleted, _priority, pnotes, _crmacctid, _opheadid, powner, pcntctid ); RETURN _todoid; END; $_$; ALTER FUNCTION public.createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text, integer) OWNER TO admin; -- -- Name: createurl(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createurl(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ declare pTitle ALIAS FOR $1; pUrl ALIAS FOR $2; _id integer; begin _id := nextval('urlinfo_url_id_seq'); insert into urlinfo (url_id, url_title, url_url) values (_id, pTitle, pUrl); return _id; end; $_$; ALTER FUNCTION public.createurl(text, text) OWNER TO admin; -- -- Name: createuser(text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createuser(pusername text, pcreateusers boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pCreateUsers) THEN EXECUTE 'CREATE USER "' || pUsername || '" CREATEROLE IN GROUP xtrole;'; ELSE EXECUTE 'CREATE USER "' || pUsername || '" NOCREATEROLE IN GROUP xtrole;'; END IF; RETURN 1; END; $$; ALTER FUNCTION public.createuser(pusername text, pcreateusers boolean) OWNER TO admin; -- -- Name: createwo(integer, integer, numeric, integer, date, text, character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, numeric, integer, date, text, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQtyOrdered ALIAS FOR $3; pLeadTime ALIAS FOR $4; pDueDate ALIAS FOR $5; pProductionNotes ALIAS FOR $6; pParentType ALIAS FOR $7; pParentId ALIAS FOR $8; BEGIN RETURN createWo( pWoNumber, pItemsiteid, 1, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, pParentType, pParentId, -1 ); END; $_$; ALTER FUNCTION public.createwo(integer, integer, numeric, integer, date, text, character, integer) OWNER TO admin; -- -- Name: createwo(integer, integer, numeric, integer, date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, numeric, integer, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQtyOrdered ALIAS FOR $3; pLeadTime ALIAS FOR $4; pDueDate ALIAS FOR $5; pProductionNotes ALIAS FOR $6; BEGIN RETURN createWo( pWoNumber, pItemsiteid, 1, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, NULL, NULL, -1 ); END; $_$; ALTER FUNCTION public.createwo(integer, integer, numeric, integer, date, text) OWNER TO admin; -- -- Name: createwo(integer, integer, numeric, date, date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, numeric, date, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQtyOrdered ALIAS FOR $3; pStartDate ALIAS FOR $4; pDueDate ALIAS FOR $5; pProductionNotes ALIAS FOR $6; BEGIN RETURN createWo( pWoNumber, pItemsiteid, 1, pQtyOrdered, pStartDate, pDueDate, pProductionNotes, NULL, NULL, -1); END; $_$; ALTER FUNCTION public.createwo(integer, integer, numeric, date, date, text) OWNER TO admin; -- -- Name: createwo(integer, integer, integer, numeric, integer, date, text, character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, integer, numeric, integer, date, text, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pLeadTime ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; BEGIN RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, pParentType, pParentId, -1); END; $_$; ALTER FUNCTION public.createwo(integer, integer, integer, numeric, integer, date, text, character, integer) OWNER TO admin; -- -- Name: createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pLeadTime ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; BEGIN RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, pParentType, pParentId, pProjectId); END; $_$; ALTER FUNCTION public.createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer) OWNER TO admin; -- -- Name: createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pStartDate ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; _woid INTEGER; _result INTEGER; _parentType char(1); _bomrevid INTEGER; _boorevid INTEGER; BEGIN SELECT getActiveRevId('BOM',itemsite_item_id) INTO _bomrevid FROM itemsite WHERE (itemsite_id=pItemsiteid); SELECT getActiveRevId('BOO',itemsite_item_id) INTO _boorevid FROM itemsite WHERE (itemsite_id=pItemsiteid); RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, pStartDate, pDueDate, pProductionNotes, pParentType, pParentId, pProjectId, _bomrevid, _boorevid, NULL); END; $_$; ALTER FUNCTION public.createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer) OWNER TO admin; -- -- Name: createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pLeadTime ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; pBomRevId ALIAS FOR $11; pBooRevId ALIAS FOR $12; BEGIN RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, pParentType, pParentId, pProjectId, pBomRevId, pBooRevId, NULL); END; $_$; ALTER FUNCTION public.createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer, integer, integer) OWNER TO admin; -- -- Name: createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pStartDate ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; pBomRevId ALIAS FOR $11; pBooRevId ALIAS FOR $12; BEGIN RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, pStartDate, pDueDate, pProductionNotes, pParentType, pParentId, pProjectId, pBomRevId, pBooRevId, NULL); END; $_$; ALTER FUNCTION public.createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer) OWNER TO admin; -- -- Name: createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pStartDate ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; pBomRevId ALIAS FOR $11; pBooRevId ALIAS FOR $12; pCosMethod ALIAS FOR $13; _startDate DATE; _woid INTEGER; _result INTEGER; _parentType char(1); _parentId INTEGER; _cosmethod char(1); _itemsite RECORD; BEGIN _parentType := COALESCE(pParentType, ' '); _parentId := COALESCE(pParentId, -1); SELECT * INTO _itemsite FROM itemsite WHERE itemsite_id = pItemsiteid; -- Check to make sure the itemsite specified is supplied at itemsite IF (NOT _itemsite.itemsite_wosupply) THEN RETURN -1; END IF; -- Check to make sure if this is a job item that it is tied to a sales order -- Or if it is just an avarage costed item IF (pCosMethod IN ('D', 'P')) THEN _cosmethod := pCosMethod; ELSE IF (_itemsite.itemsite_costmethod = 'J') THEN IF (_parentType = ' ' OR _parentId = -1) THEN RAISE EXCEPTION 'Work Orders for Item Sites that are Job cost must have a parent order.'; ELSE SELECT COALESCE(itemsite_cosdefault,fetchmetrictext('JobItemCosDefault'),'D') INTO _cosmethod FROM itemsite WHERE itemsite_id=pItemsiteid; END IF; ELSIF (_itemsite.itemsite_costmethod = 'A') THEN _cosmethod := COALESCE(_itemsite.itemsite_cosdefault,fetchmetrictext('JobItemCosDefault'),'D'); END IF; END IF; -- Check to see if the site calendar metric is set, and if so adjust the start date if necessary IF (fetchmetricbool('UseSiteCalendar')) THEN _startDate := calculatenextworkingdate(_itemsite.itemsite_warehous_id, pStartDate, 0); IF (_startDate != pStartDate) THEN _startDate := calculatenextworkingdate(_itemsite.itemsite_warehous_id, pDueDate, -_itemsite.itemsite_leadtime); END IF; ELSE _startDate := pStartDate; END IF; -- Grab the next wo_id SELECT NEXTVAL('wo_wo_id_seq') INTO _woid; -- Create the W/O INSERT INTO wo ( wo_id, wo_number, wo_subnumber, wo_itemsite_id, wo_priority, wo_ordtype, wo_ordid, wo_status, wo_startdate, wo_duedate, wo_qtyord, wo_qtyrcv, wo_prodnotes, wo_prj_id, wo_bom_rev_id, wo_boo_rev_id, wo_cosmethod ) SELECT _woid, pWoNumber, nextWoSubnumber(pWoNumber), itemsite_id, pPriority, _parentType, pParentId, 'O', _startDate, pDueDate, roundQty(item_fractional, pQtyOrdered), 0, pProductionNotes, pProjectId, pBomRevid, pBooRevid, _cosmethod FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid)); -- Explode the newly created W/O according to metrics IF ( ( SELECT (metric_value='t') FROM metric WHERE (metric_name='AutoExplodeWO') ) ) THEN SELECT explodeWo( _woid, ( SELECT (metric_value = 'M') FROM metric WHERE (metric_name='WOExplosionLevel') ) ) INTO _result; ELSE _result := _woid; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer, text) OWNER TO admin; -- -- Name: createwomaterial(integer, integer, character, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwomaterial(integer, integer, character, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pQtyPer ALIAS FOR $4; pScrap ALIAS FOR $5; _result INTEGER; BEGIN SELECT createWoMaterial(pWoid, pItemsiteid, pIssueMethod, item_inv_uom_id, pQtyPer, pScrap) INTO _result FROM itemsite JOIN item ON (itemsite_item_id=item_id) WHERE(itemsite_id=pItemsiteid); RETURN _result; END; $_$; ALTER FUNCTION public.createwomaterial(integer, integer, character, numeric, numeric) OWNER TO admin; -- -- Name: createwomaterial(integer, integer, character, integer, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyPer ALIAS FOR $5; pScrap ALIAS FOR $6; _womatlid INTEGER; BEGIN SELECT createWoMaterial(pWoid,pItemsiteid,pIssueMethod,pUomId,pQtyPer,pScrap,-1, NULL, NULL) INTO _womatlid; RETURN _womatlid; END; $_$; ALTER FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric) OWNER TO admin; -- -- Name: createwomaterial(integer, integer, character, integer, numeric, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyPer ALIAS FOR $5; pScrap ALIAS FOR $6; pBomitemId ALIAS FOR $7; _womatlid INTEGER; BEGIN _womatlid := (SELECT NEXTVAL('womatl_womatl_id_seq')); INSERT INTO womatl ( womatl_id, womatl_wo_id, womatl_itemsite_id, womatl_issuemethod, womatl_uom_id, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_wooper_id, womatl_bomitem_id, womatl_duedate ) SELECT _womatlid, wo_id, pItemsiteid, pIssueMethod, pUomId, pQtyPer, pScrap, roundQty(item_fractional, (wo_qtyord * (pQtyPer * (1 + pScrap)))), 0, 0, -1, pBomitemId, wo_startdate FROM wo, itemsite, item WHERE ( (itemsite_item_id=item_id) AND (wo_id=pWoid) AND (itemsite_id=pItemsiteid) ); UPDATE wo SET wo_adhoc=TRUE WHERE (wo_id=pWoid); UPDATE wo SET wo_status='E' WHERE ( (wo_status='O') AND (wo_id=pWoid) ); RETURN _womatlid; END; $_$; ALTER FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric, integer) OWNER TO admin; -- -- Name: createwomaterial(integer, integer, character, integer, numeric, numeric, integer, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyPer ALIAS FOR $5; pScrap ALIAS FOR $6; pBomitemId ALIAS FOR $7; pNotes ALIAS FOR $8; pRef ALIAS FOR $9; _womatlid INTEGER; _p RECORD; BEGIN _womatlid := (SELECT NEXTVAL('womatl_womatl_id_seq')); INSERT INTO womatl ( womatl_id, womatl_wo_id, womatl_itemsite_id, womatl_issuemethod, womatl_uom_id, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_wooper_id, womatl_bomitem_id, womatl_duedate, womatl_notes, womatl_ref ) SELECT _womatlid, wo_id, pItemsiteid, pIssueMethod, pUomId, pQtyPer, pScrap, roundQty(item_fractional, (wo_qtyord * (pQtyPer * (1 + pScrap)))), 0, 0, -1, pBomitemId, wo_startdate, pNotes, pRef FROM wo, itemsite, item WHERE ( (itemsite_item_id=item_id) AND (wo_id=pWoid) AND (itemsite_id=pItemsiteid) ); -- Handle all of the Phantom material requirements WHILE ( ( SELECT COUNT(*) FROM womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_wo_id=pWoid) AND (item_type='F') ) ) > 0 ) LOOP FOR _p IN SELECT wo_qtyord, wo_startdate, womatl_id, womatl_wooper_id FROM wo, womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_type='F') AND (womatl_wo_id=wo_id) AND (wo_id=pWoid) ) LOOP INSERT INTO womatl ( womatl_wo_id, womatl_itemsite_id, womatl_wooper_id, womatl_schedatwooper, womatl_duedate, womatl_uom_id, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_createwo, womatl_issuemethod, womatl_notes, womatl_ref ) SELECT pWoid, cs.itemsite_id, _p.womatl_wooper_id, womatl_schedatwooper, womatl_duedate, bomitem_uom_id, (bomitem_qtyper * womatl_qtyper), bomitem_scrap, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id), (_p.wo_qtyord * bomitem_qtyper * womatl_qtyper * (1 + bomitem_scrap))), 0, 0, startOfTime(), startOfTime(), 0, ci.item_picklist, ( (ci.item_type='M') AND (bomitem_createwo) ), bomitem_issuemethod, bomitem_notes, bomitem_ref FROM wo, womatl, bomitem, itemsite AS cs, itemsite AS ps, item AS ci, item AS pi WHERE ( (womatl_itemsite_id=ps.itemsite_id) AND (womatl_wo_id=wo_id) AND (bomitem_parent_item_id=pi.item_id) AND (bomitem_item_id=ci.item_id) AND (ps.itemsite_warehous_id=cs.itemsite_warehous_id) AND (cs.itemsite_item_id=ci.item_id) AND (ps.itemsite_item_id=pi.item_id) AND (woEffectiveDate(_p.wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (womatl_id=_p.womatl_id)); DELETE FROM womatl WHERE (womatl_id=_p.womatl_id); END LOOP; END LOOP; UPDATE wo SET wo_adhoc=TRUE WHERE (wo_id=pWoid); UPDATE wo SET wo_status='E' WHERE ( (wo_status='O') AND (wo_id=pWoid) ); RETURN _womatlid; END; $_$; ALTER FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric, integer, text, text) OWNER TO admin; -- -- Name: createwomaterial(integer, integer, character, numeric, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwomaterial(integer, integer, character, numeric, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pQtyFxd ALIAS FOR $4; pQtyPer ALIAS FOR $5; pScrap ALIAS FOR $6; _result INTEGER; BEGIN SELECT createWoMaterial(pWoid, pItemsiteid, pIssueMethod, item_inv_uom_id, pQtyFxd, pQtyPer, pScrap) INTO _result FROM itemsite JOIN item ON (itemsite_item_id=item_id) WHERE(itemsite_id=pItemsiteid); RETURN _result; END; $_$; ALTER FUNCTION public.createwomaterial(integer, integer, character, numeric, numeric, numeric) OWNER TO admin; -- -- Name: createwomaterial(integer, integer, character, integer, numeric, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyFxd ALIAS FOR $5; pQtyPer ALIAS FOR $6; pScrap ALIAS FOR $7; _womatlid INTEGER; BEGIN SELECT createWoMaterial(pWoid,pItemsiteid,pIssueMethod,pUomId,pQtyFxd,pQtyPer,pScrap,-1, NULL, NULL) INTO _womatlid; RETURN _womatlid; END; $_$; ALTER FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric, numeric) OWNER TO admin; -- -- Name: createwomaterial(integer, integer, character, integer, numeric, numeric, numeric, integer, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric, numeric, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyFxd ALIAS FOR $5; pQtyPer ALIAS FOR $6; pScrap ALIAS FOR $7; pBomitemId ALIAS FOR $8; pNotes ALIAS FOR $9; pRef ALIAS FOR $10; _womatlid INTEGER; BEGIN SELECT createWoMaterial(pWoid,pItemsiteid,pIssueMethod,pUomId,pQtyFxd,pQtyPer,pScrap,pBomitemId,pNotes,pRef,NULL,NULL) INTO _womatlid; RETURN _womatlid; END; $_$; ALTER FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric, numeric, integer, text, text) OWNER TO admin; -- -- Name: createwomaterial(integer, integer, character, integer, numeric, numeric, numeric, integer, text, text, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION createwomaterial(pwoid integer, pitemsiteid integer, pissuemethod character, puomid integer, pqtyfxd numeric, pqtyper numeric, pscrap numeric, pbomitemid integer, pnotes text, pref text, pwooperid integer, ppicklist boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _womatlid INTEGER; _p RECORD; BEGIN _womatlid := (SELECT NEXTVAL('womatl_womatl_id_seq')); INSERT INTO womatl ( womatl_id, womatl_wo_id, womatl_itemsite_id, womatl_issuemethod, womatl_uom_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_wooper_id, womatl_bomitem_id, womatl_duedate, womatl_notes, womatl_ref, womatl_picklist ) SELECT _womatlid, wo_id, pItemsiteid, pIssueMethod, pUomId, pQtyFxd, pQtyPer, pScrap, roundQty(item_fractional, (pQtyFxd + wo_qtyord * pQtyPer) * (1 + pScrap) ), 0, 0, COALESCE(pWooperId, -1), pBomitemId, wo_startdate, pNotes, pRef, COALESCE(pPickList, item_picklist) FROM wo, itemsite JOIN item ON (item_id=itemsite_item_id) WHERE ( (wo_id=pWoid) AND (itemsite_id=pItemsiteid) ); -- Handle all of the Phantom material requirements WHILE ( ( SELECT COUNT(*) FROM womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_wo_id=pWoid) AND (item_type='F') ) ) > 0 ) LOOP FOR _p IN SELECT wo_qtyord, wo_startdate, womatl_id, womatl_wooper_id FROM wo, womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_type='F') AND (womatl_wo_id=wo_id) AND (wo_id=pWoid) ) LOOP INSERT INTO womatl ( womatl_wo_id, womatl_itemsite_id, womatl_wooper_id, womatl_schedatwooper, womatl_duedate, womatl_uom_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_createwo, womatl_issuemethod, womatl_notes, womatl_ref ) SELECT pWoid, cs.itemsite_id, _p.womatl_wooper_id, womatl_schedatwooper, womatl_duedate, bomitem_uom_id, bomitem_qtyfxd, (bomitem_qtyper * womatl_qtyper), bomitem_scrap, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id), ((bomitem_qtyfxd + _p.wo_qtyord * bomitem_qtyper) * womatl_qtyper * (1 + bomitem_scrap))), 0, 0, startOfTime(), startOfTime(), 0, ci.item_picklist, ( (ci.item_type='M') AND (bomitem_createwo) ), bomitem_issuemethod, bomitem_notes, bomitem_ref FROM wo, womatl, bomitem, itemsite AS cs, itemsite AS ps, item AS ci, item AS pi WHERE ( (womatl_itemsite_id=ps.itemsite_id) AND (womatl_wo_id=wo_id) AND (bomitem_parent_item_id=pi.item_id) AND (bomitem_item_id=ci.item_id) AND (ps.itemsite_warehous_id=cs.itemsite_warehous_id) AND (cs.itemsite_item_id=ci.item_id) AND (ps.itemsite_item_id=pi.item_id) AND (woEffectiveDate(_p.wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (womatl_id=_p.womatl_id)); DELETE FROM womatl WHERE (womatl_id=_p.womatl_id); END LOOP; END LOOP; UPDATE wo SET wo_adhoc=TRUE WHERE (wo_id=pWoid); UPDATE wo SET wo_status='E' WHERE ( (wo_status='O') AND (wo_id=pWoid) ); RETURN _womatlid; END; $$; ALTER FUNCTION public.createwomaterial(pwoid integer, pitemsiteid integer, pissuemethod character, puomid integer, pqtyfxd numeric, pqtyper numeric, pscrap numeric, pbomitemid integer, pnotes text, pref text, pwooperid integer, ppicklist boolean) OWNER TO admin; -- -- Name: creditmemototal(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION creditmemototal(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCreditmemoId ALIAS FOR $1; _result NUMERIC; BEGIN -- TO DO: Add in line item taxes SELECT COALESCE(cmhead_freight,0.0) + COALESCE(cmhead_misc,0.0) + ( SELECT COALESCE(ROUND(SUM((cmitem_qtycredit * cmitem_qty_invuomratio) * cmitem_unitprice / cmitem_price_invuomratio), 2), 0.0) FROM cmitem WHERE (cmitem_cmhead_id=cmhead_id) ) + (SELECT COALESCE(SUM(tax) * -1, 0) AS tax FROM ( SELECT ROUND(SUM(taxdetail_tax),2) AS tax FROM tax JOIN calculateTaxDetailSummary('CM', cmhead_id, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id) AS data) INTO _result FROM cmhead WHERE (cmhead_id=pCreditmemoId); IF (NOT FOUND) THEN return 0; ELSE RETURN _result; END IF; END; $_$; ALTER FUNCTION public.creditmemototal(integer) OWNER TO admin; -- -- Name: crmacct; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE crmacct ( crmacct_id integer NOT NULL, crmacct_number text NOT NULL, crmacct_name text, crmacct_active boolean DEFAULT true, crmacct_type character(1), crmacct_cust_id integer, crmacct_competitor_id integer, crmacct_partner_id integer, crmacct_prospect_id integer, crmacct_vend_id integer, crmacct_cntct_id_1 integer, crmacct_cntct_id_2 integer, crmacct_parent_id integer, crmacct_notes text, crmacct_taxauth_id integer, crmacct_owner_username text, crmacct_emp_id integer, crmacct_salesrep_id integer, crmacct_usr_username text, CONSTRAINT crmacct_crmacct_number_check CHECK ((crmacct_number <> ''::text)), CONSTRAINT crmacct_crmacct_type_check CHECK ((crmacct_type = ANY (ARRAY['I'::bpchar, 'O'::bpchar]))), CONSTRAINT crmacct_crmacct_usr_username_check CHECK ((btrim(crmacct_usr_username) <> ''::text)), CONSTRAINT crmacct_owner_username_check CHECK ((btrim(crmacct_owner_username) <> ''::text)) ); ALTER TABLE public.crmacct OWNER TO admin; -- -- Name: TABLE crmacct; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE crmacct IS 'CRM Accounts are umbrella records that tie together people and organizations with whom we have business relationships.'; -- -- Name: COLUMN crmacct.crmacct_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_id IS 'Internal ID of this CRM Account.'; -- -- Name: COLUMN crmacct.crmacct_number; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_number IS 'Abbreviated human-readable identifier for this CRM Account.'; -- -- Name: COLUMN crmacct.crmacct_name; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_name IS 'Long name of this CRM Account.'; -- -- Name: COLUMN crmacct.crmacct_active; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_active IS 'This CRM Account is available for new activity.'; -- -- Name: COLUMN crmacct.crmacct_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_type IS 'This indicates whether the CRM Account represents an organization or an individual person.'; -- -- Name: COLUMN crmacct.crmacct_cust_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_cust_id IS 'If this is not null, this CRM Account is a Customer.'; -- -- Name: COLUMN crmacct.crmacct_competitor_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_competitor_id IS 'For now, > 0 indicates this CRM Account is a competitor. Eventually this may become a foreign key to a table of competitors.'; -- -- Name: COLUMN crmacct.crmacct_partner_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_partner_id IS 'For now, > 0 indicates this CRM Account is a partner. Eventually this may become a foreign key to a table of partners.'; -- -- Name: COLUMN crmacct.crmacct_prospect_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_prospect_id IS 'If this is not null, this CRM Account is a Prospect.'; -- -- Name: COLUMN crmacct.crmacct_vend_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_vend_id IS 'If this is not null, this CRM Account is a Vendor.'; -- -- Name: COLUMN crmacct.crmacct_cntct_id_1; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_cntct_id_1 IS 'The primary contact for the CRM Account.'; -- -- Name: COLUMN crmacct.crmacct_cntct_id_2; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_cntct_id_2 IS 'The secondary contact for the CRM Account.'; -- -- Name: COLUMN crmacct.crmacct_parent_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_parent_id IS 'The internal ID of an (optional) parent CRM Account. For example, if the current CRM Account is a subsidiary of another company, the crmacct_parent_id points to the CRM Account representing that parent company.'; -- -- Name: COLUMN crmacct.crmacct_notes; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_notes IS 'Free-form comments pertaining to the CRM Account.'; -- -- Name: COLUMN crmacct.crmacct_taxauth_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_taxauth_id IS 'If this is not null, this CRM Account is a Tax Authority.'; -- -- Name: COLUMN crmacct.crmacct_owner_username; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_owner_username IS 'The application User responsible for this CRM Account.'; -- -- Name: COLUMN crmacct.crmacct_emp_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_emp_id IS 'If this is not null, this CRM Account is an Employee.'; -- -- Name: COLUMN crmacct.crmacct_salesrep_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_salesrep_id IS 'If this is not null, this CRM Account is a Sales Rep.'; -- -- Name: COLUMN crmacct.crmacct_usr_username; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacct.crmacct_usr_username IS 'If this is not null, this CRM Account is an application User.'; -- -- Name: crmacct(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION crmacct() RETURNS SETOF crmacct LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row crmacct%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllCRMAccounts','ViewAllCRMAccounts','MaintainPersonalCRMAccounts','ViewPersonalCRMAccounts') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM crmacct LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM crmacct WHERE crmacct_owner_username = getEffectiveXtUser() LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; ALTER FUNCTION public.crmacct() OWNER TO admin; -- -- Name: FUNCTION crmacct(); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION crmacct() IS 'A table function that returns CRM Account results according to privilege settings.'; -- -- Name: crypt(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION crypt(text, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_crypt'; ALTER FUNCTION public.crypt(text, text) OWNER TO admin; -- -- Name: currconcat(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currconcat(integer) RETURNS character varying LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE id ALIAS FOR $1; returnVal VARCHAR(15) := ''; BEGIN SELECT currConcat(curr_abbr, curr_symbol) INTO returnVal FROM curr_symbol WHERE curr_id = id; RETURN returnVal; END; $_$; ALTER FUNCTION public.currconcat(integer) OWNER TO admin; -- -- Name: currconcat(character varying, character varying); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currconcat(character varying, character varying) RETURNS character varying LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE curr_abbr ALIAS FOR $1; curr_symbol ALIAS FOR $2; returnVal VARCHAR(15) := ''; BEGIN IF length(trim(curr_abbr)) > 0 AND length(trim(curr_symbol)) > 0 THEN returnVal := trim(curr_abbr) || ' - ' || trim(curr_symbol); ELSIF length(trim(curr_abbr)) > 0 THEN returnVal := curr_abbr; ELSIF length(trim(curr_symbol)) > 0 THEN returnVal := curr_symbol; END IF; RETURN returnVal; END; $_$; ALTER FUNCTION public.currconcat(character varying, character varying) OWNER TO admin; -- -- Name: currentapmemonumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currentapmemonumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _number INTEGER; BEGIN SELECT orderseq_number INTO _number FROM orderseq WHERE (orderseq_name='APMemoNumber'); IF (NOT FOUND) THEN _number := 0; END IF; RETURN _number; END; $$; ALTER FUNCTION public.currentapmemonumber() OWNER TO admin; -- -- Name: currentarmemonumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currentarmemonumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _number INTEGER; BEGIN SELECT orderseq_number INTO _number FROM orderseq WHERE (orderseq_name='ARMemoNumber'); IF (NOT FOUND) THEN _number := 0; END IF; RETURN _number; END; $$; ALTER FUNCTION public.currentarmemonumber() OWNER TO admin; -- -- Name: currentcashrcptnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currentcashrcptnumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _number INTEGER; BEGIN SELECT orderseq_number INTO _number FROM orderseq WHERE (orderseq_name='CashRcptNumber'); IF (NOT FOUND) THEN _number := 0; END IF; RETURN _number; END; $$; ALTER FUNCTION public.currentcashrcptnumber() OWNER TO admin; -- -- Name: currentnumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currentnumber(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pName ALIAS FOR $1; _number INTEGER; BEGIN SELECT orderseq_number INTO _number FROM orderseq WHERE (orderseq_name=pName); IF (NOT FOUND) THEN _number := 0; END IF; RETURN _number; END; $_$; ALTER FUNCTION public.currentnumber(text) OWNER TO admin; -- -- Name: currexchangecheckoverlap(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currexchangecheckoverlap() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE numberOfOverlaps INTEGER NOT NULL := 0; curr_string VARCHAR(16); new_id INTEGER; BEGIN new_id := NEW.curr_id; -- ensure that effective date <= expiration date IF NEW.curr_effective > NEW.curr_expires THEN RAISE EXCEPTION 'Effective date % must be earlier than expiration date %', NEW.curr_effective, NEW.curr_expires; END IF; -- ensure new exchange rate does not overlap in time with any others SELECT count(*) INTO numberOfOverlaps FROM curr_rate WHERE curr_id = NEW.curr_id AND curr_rate_id != NEW.curr_rate_id AND ( (curr_effective BETWEEN NEW.curr_effective AND NEW.curr_expires OR curr_expires BETWEEN NEW.curr_effective AND NEW.curr_expires) OR (curr_effective <= NEW.curr_effective AND curr_expires >= NEW.curr_expires) ); IF numberOfOverlaps > 0 THEN SELECT currConcat(curr_symbol, curr_abbr) INTO curr_string FROM curr_symbol WHERE curr_id = new_id; RAISE EXCEPTION 'The date range % to % overlaps with another date range.', NEW.curr_effective, NEW.curr_expires; END IF; RETURN NEW; END; $$; ALTER FUNCTION public.currexchangecheckoverlap() OWNER TO admin; -- -- Name: currgain(integer, numeric, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currgain(integer, numeric, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pValue ALIAS FOR $2; pStart ALIAS FOR $3; pEnd ALIAS FOR $4; _start DATE; _end DATE; _gain NUMERIC; _multiplier INTEGER := 1; BEGIN IF (pEnd = pStart OR pValue = 0) THEN RETURN 0; END IF; IF (pStart > pEnd) THEN _start := pEnd; _end := pStart; _multiplier := -1; ELSE _start := pStart; _end := pEnd; END IF; _gain := currToBase(pId, pValue, _start) - currToBase(pId, pValue, _end); IF (_gain IS NULL) THEN RAISE EXCEPTION 'Missing exchange rate for curr_id % on % or %', pId, _start, _end; END IF; RETURN _gain * _multiplier; END; $_$; ALTER FUNCTION public.currgain(integer, numeric, date, date) OWNER TO admin; -- -- Name: curronebase(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION curronebase() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE baseCount INTEGER := 0; BEGIN IF NEW.curr_base = TRUE THEN SELECT count(*) INTO baseCount FROM curr_symbol WHERE curr_base = TRUE AND curr_id != NEW.curr_id; IF baseCount > 0 THEN RAISE EXCEPTION 'Cannot make % - % the base currency because one is already defined.', NEW.curr_symbol, NEW.curr_abbr; ELSE SELECT count(*) INTO baseCount FROM curr_rate WHERE curr_id = NEW.curr_id; IF baseCount = 0 THEN -- put a row in the curr_rate table to avoid special-case -- code for converting base currency to base currency INSERT INTO curr_rate (curr_id, curr_rate, curr_effective, curr_expires) VALUES (NEW.curr_id, 1, startOfTime(), endOfTime()); END IF; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public.curronebase() OWNER TO admin; -- -- Name: currrate(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currrate(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN currRate($1, NULL, $2); END; $_$; ALTER FUNCTION public.currrate(integer, date) OWNER TO admin; -- -- Name: currrate(integer, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currrate(pfromcurr integer, ptocurr integer, pdate date) RETURNS numeric LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _fromRate NUMERIC := 1.0; _toRate NUMERIC := 1.0; _returnVal NUMERIC := 1.0; BEGIN IF pFromCurr = pToCurr THEN RETURN _returnVal; END IF; IF (pFromCurr IS NOT NULL) THEN SELECT curr_rate INTO _fromRate FROM curr_rate WHERE ( (curr_id=pFromCurr) AND (pDate BETWEEN curr_effective AND curr_expires) ); IF ( NOT FOUND) THEN RAISE EXCEPTION 'Currency exchange rate for currency % not found on %', pFromCurr, formatDate(pDate); END IF; END IF; IF (pToCurr IS NOT NULL) THEN SELECT curr_rate INTO _toRate FROM curr_rate WHERE ( (curr_id=pToCurr) AND (pDate BETWEEN curr_effective AND curr_expires) ); IF ( NOT FOUND) THEN RAISE EXCEPTION 'Currency exchange rate for currency % not found on %', pToCurr, formatDate(pDate); END IF; END IF; _returnVal := _fromRate / _toRate; RETURN _returnVal; END; $$; ALTER FUNCTION public.currrate(pfromcurr integer, ptocurr integer, pdate date) OWNER TO admin; -- -- Name: currtobase(integer, numeric, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currtobase(integer, numeric, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pValue ALIAS FOR $2; _date DATE; _output NUMERIC; BEGIN _date := $3; IF _date IS NULL THEN _date := 'now'; END IF; IF pValue = 0 OR pValue IS NULL THEN _output := 0; ELSIF (baseCurrId() = pId) THEN _output := pValue; ELSE SELECT pValue / curr_rate INTO _output FROM curr_rate WHERE curr_id = pId AND _date BETWEEN curr_effective AND curr_expires; IF (_output IS NULL OR NOT FOUND) THEN RAISE EXCEPTION 'No exchange rate for % on %', pId, _date; END IF; END IF; RETURN _output; END; $_$; ALTER FUNCTION public.currtobase(integer, numeric, date) OWNER TO admin; -- -- Name: currtocurr(integer, integer, numeric, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currtocurr(integer, integer, numeric, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFromCurr ALIAS FOR $1; pToCurr ALIAS FOR $2; pValue ALIAS FOR $3; pEffective ALIAS FOR $4; _convertedValue NUMERIC; _fromRate NUMERIC; _toRate NUMERIC; BEGIN IF pFromCurr = pToCurr THEN RETURN pValue; END IF; IF pValue = 0 OR pValue IS NULL THEN RETURN 0; END IF; SELECT curr_rate INTO _fromRate FROM curr_rate WHERE curr_id = pFromCurr AND pEffective BETWEEN curr_effective AND curr_expires; IF (NOT FOUND) THEN RAISE EXCEPTION 'No exchange rate for % on %', pFromCurr, pEffective; END IF; SELECT curr_rate INTO _toRate FROM curr_rate WHERE curr_id = pToCurr AND pEffective BETWEEN curr_effective AND curr_expires; IF (NOT FOUND) THEN RAISE EXCEPTION 'No exchange rate for % on %', pToCurr, pEffective; END IF; _convertedValue := pValue * _toRate / _fromRate; RETURN _convertedValue; END; $_$; ALTER FUNCTION public.currtocurr(integer, integer, numeric, date) OWNER TO admin; -- -- Name: currtolocal(integer, numeric, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION currtolocal(integer, numeric, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pValue ALIAS FOR $2; _date DATE; _output NUMERIC; BEGIN _date := $3; IF _date IS NULL THEN _date := 'now'; END IF; IF pValue = 0 OR pValue IS NULL THEN _output := 0; ELSIF (baseCurrId() = pId) THEN _output := pValue; ELSE SELECT pValue * curr_rate INTO _output FROM curr_rate WHERE curr_id = pId AND _date BETWEEN curr_effective AND curr_expires; IF (_output IS NULL OR NOT FOUND) THEN RAISE EXCEPTION 'No exchange rate for % on %', pId, _date; END IF; END IF; RETURN _output; END; $_$; ALTER FUNCTION public.currtolocal(integer, numeric, date) OWNER TO admin; -- -- Name: custitem(integer, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION custitem(cust_id integer, shipto_id integer DEFAULT (-1), asof date DEFAULT ('now'::text)::date) RETURNS SETOF integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. -- Non Exclusive SELECT item_id FROM item WHERE (NOT item_exclusive) AND (item_sold) UNION -- Exclusive, Shipto match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE (item_exclusive) AND (item_sold) AND ($2 != -1) AND (ipsass_shipto_id=$2) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE (item_exclusive) AND (item_sold) AND ($2 != -1) AND (ipsass_shipto_id=$2) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION -- Exclusive, Shipto pattern match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN shiptoinfo ON (shipto_num ~ ipsass_shipto_pattern) WHERE (item_exclusive) AND (item_sold) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (ipsass_cust_id=$1) AND ($2 != -1) AND (shipto_id=$2) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN shiptoinfo ON (shipto_num ~ ipsass_shipto_pattern) WHERE (item_exclusive) AND (item_sold) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (ipsass_cust_id=$1) AND ($2 != -1) AND (shipto_id=$2) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION -- Exclusive, Customer match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE (item_exclusive) AND (item_sold) AND (ipsass_cust_id=$1) AND (ipsass_shipto_id=-1) AND (ipsass_shipto_pattern='') AND (ipsass_custtype_id=-1) AND (ipsass_custtype_pattern='') AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE (item_exclusive) AND (item_sold) AND (ipsass_cust_id=$1) AND (ipsass_shipto_id=-1) AND (ipsass_shipto_pattern='') AND (ipsass_custtype_id=-1) AND (ipsass_custtype_pattern='') AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION -- Exclusive, Customer Type match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN custinfo ON (ipsass_custtype_id=cust_custtype_id) WHERE (item_exclusive) AND (item_sold) AND (cust_id=$1) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN custinfo ON (ipsass_custtype_id=cust_custtype_id) WHERE (item_exclusive) AND (item_sold) AND (cust_id=$1) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION -- Exclusive, Customer Type pattern match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN custtype ON (custtype_code ~ ipsass_custtype_pattern) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE (item_exclusive) AND (item_sold) AND (COALESCE(length(ipsass_custtype_pattern), 0) > 0) AND (cust_id=$1) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN custtype ON (custtype_code ~ ipsass_custtype_pattern) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE (item_exclusive) AND (item_sold) AND (COALESCE(length(ipsass_custtype_pattern), 0) > 0) AND (cust_id=$1) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) $_$; ALTER FUNCTION public.custitem(cust_id integer, shipto_id integer, asof date) OWNER TO admin; -- -- Name: customercanpurchase(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION customercanpurchase(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemid ALIAS FOR $1; pCustid ALIAS FOR $2; BEGIN RETURN customerCanPurchase(pitemid, pCustid, -1); END; $_$; ALTER FUNCTION public.customercanpurchase(integer, integer) OWNER TO admin; -- -- Name: customercanpurchase(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION customercanpurchase(integer, integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemid ALIAS FOR $1; pCustid ALIAS FOR $2; pShiptoid AlIAS FOR $3; _id INTEGER; _item RECORD; BEGIN RETURN customerCanPurchase(pitemid, pCustid, pShiptoid, CURRENT_DATE); END; $_$; ALTER FUNCTION public.customercanpurchase(integer, integer, integer) OWNER TO admin; -- -- Name: customercanpurchase(integer, integer, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION customercanpurchase(integer, integer, integer, date) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemid ALIAS FOR $1; pCustid ALIAS FOR $2; pShiptoid AlIAS FOR $3; pAsOf ALIAS FOR $4; _id INTEGER; _item RECORD; BEGIN SELECT item_sold, item_exclusive INTO _item FROM item WHERE(item_id=pItemid); -- Make sure that this is at least a sold Item IF (NOT _item.item_sold) THEN RETURN FALSE; END IF; -- Everyone can purchase a non-exclusive item IF (NOT _item.item_exclusive) THEN RETURN TRUE; END IF; IF(pShiptoid != -1) THEN -- Check for a shipto Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsitem_item_id=pItemid) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=pShiptoid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (item_id=pItemid) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=pShiptoid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; -- Check for a Shipto Pattern Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass, shiptoinfo WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (shipto_num ~ ipsass_shipto_pattern) AND (ipsass_cust_id=pCustid) AND (ipsitem_item_id=pItemid) AND (shipto_id=pShiptoid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass, shiptoinfo WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (shipto_num ~ ipsass_shipto_pattern) AND (ipsass_cust_id=pCustid) AND (item_id=pItemid) AND (shipto_id=pShiptoid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; END IF; -- Check for a Customer Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsitem_item_id=pItemid) AND (COALESCE(length(ipsass_shipto_pattern), 0) = 0) AND (ipsass_cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (item_id=pItemid) AND (COALESCE(length(ipsass_shipto_pattern), 0) = 0) AND (ipsass_cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; -- Check for a Customer Type Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass, custinfo WHERE( (ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (ipsass_custtype_id != -1) AND (cust_custtype_id = ipsass_custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsitem_item_id=pItemid) AND (cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass, custinfo WHERE( (ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (ipsass_custtype_id != -1) AND (cust_custtype_id = ipsass_custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (item_id=pItemid) AND (cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; -- Check for a Customer Type Pattern Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass, custtype, custinfo WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (coalesce(length(ipsass_custtype_pattern), 0) > 0) AND (custtype_code ~ ipsass_custtype_pattern) AND (cust_custtype_id=custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsitem_item_id=pItemid) AND (cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass, custtype, custinfo WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (coalesce(length(ipsass_custtype_pattern), 0) > 0) AND (custtype_code ~ ipsass_custtype_pattern) AND (cust_custtype_id=custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (item_id=pItemid) AND (cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; -- That's it, Sales don't count - yet RETURN FALSE; END; $_$; ALTER FUNCTION public.customercanpurchase(integer, integer, integer, date) OWNER TO admin; -- -- Name: dearmor(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION dearmor(text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_dearmor'; ALTER FUNCTION public.dearmor(text) OWNER TO admin; -- -- Name: decrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION decrypt(bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_decrypt'; ALTER FUNCTION public.decrypt(bytea, bytea, text) OWNER TO admin; -- -- Name: decrypt_iv(bytea, bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION decrypt_iv(bytea, bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_decrypt_iv'; ALTER FUNCTION public.decrypt_iv(bytea, bytea, bytea, text) OWNER TO admin; -- -- Name: defaultlocationname(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION defaultlocationname(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _p RECORD; BEGIN SELECT itemsite_location_id, itemsite_location INTO _p FROM itemsite WHERE (itemsite_id=pItemsiteid); IF (NOT FOUND) THEN RETURN 'Error'; ELSIF (_p.itemsite_location_id = -1) THEN RETURN _p.itemsite_location; ELSE RETURN formatLocationName(_p.itemsite_location_id); END IF; END; $_$; ALTER FUNCTION public.defaultlocationname(integer) OWNER TO admin; -- -- Name: deleteaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if the passed accnt is used in a Cost Category SELECT costcat_id INTO _check FROM costcat WHERE ( (costcat_asset_accnt_id=pAccntid) OR (costcat_liability_accnt_id=pAccntid) OR (costcat_adjustment_accnt_id=pAccntid) OR (costcat_purchprice_accnt_id=pAccntid) OR (costcat_laboroverhead_accnt_id=pAccntid) OR (costcat_scrap_accnt_id=pAccntid) OR (costcat_invcost_accnt_id=pAccntid) OR (costcat_wip_accnt_id=pAccntid) OR (costcat_shipasset_accnt_id=pAccntid) OR (costcat_mfgscrap_accnt_id=pAccntid) OR (costcat_transform_accnt_id=pAccntid) OR (costcat_freight_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Check to see if the passed accnt is used in a Sales Account Assignment SELECT salesaccnt_id INTO _check FROM salesaccnt WHERE ( (salesaccnt_sales_accnt_id=pAccntid) OR (salesaccnt_credit_accnt_id=pAccntid) OR (salesaccnt_cos_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to see if the passed accnt is used in a A/R Account Assignment SELECT araccnt_id INTO _check FROM araccnt WHERE ( (araccnt_freight_accnt_id=pAccntid) OR (araccnt_ar_accnt_id=pAccntid) OR (araccnt_prepaid_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to see if the passed accnt is used in a Warehouse IF EXISTS (SELECT 1 FROM whsinfo WHERE (warehous_default_accnt_id=pAccntid)) THEN RETURN -4; END IF; -- Check to see if the passed accnt is used in a Bank Account SELECT bankaccnt_id INTO _check FROM bankaccnt WHERE (bankaccnt_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; -- Check to see if the passed accnt is used in an Expense Category SELECT expcat_id INTO _check FROM expcat WHERE ( (expcat_exp_accnt_id=pAccntid) OR (expcat_liability_accnt_id=pAccntid) OR (expcat_purchprice_accnt_id=pAccntid) OR (expcat_freight_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; -- Check to see if the passed accnt is used in a Tax Code SELECT tax_id INTO _check FROM tax WHERE (tax_sales_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -7; END IF; -- Check to see if the passed accnt is used in a Standard Journal Item SELECT stdjrnlitem_id INTO _check FROM stdjrnlitem WHERE (stdjrnlitem_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -8; END IF; -- Check to see if the passed accnt is used in a A/P Account Assignment SELECT apaccnt_ap_accnt_id INTO _check FROM apaccnt WHERE ( (apaccnt_ap_accnt_id=pAccntid) OR (apaccnt_prepaid_accnt_id=pAccntid) OR (apaccnt_discount_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -9; END IF; -- Check to see if the passed accnt is used in an A/R Open Item record SELECT aropen_accnt_id INTO _check FROM aropen WHERE (aropen_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -11; END IF; -- Check to see if the passed accnt has been used in the G/L SELECT gltrans_accnt_id INTO _check FROM gltrans WHERE (gltrans_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -99; END IF; SELECT glseries_accnt_id INTO _check FROM glseries WHERE (glseries_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -99; END IF; SELECT trialbal_accnt_id INTO _check FROM trialbal WHERE (trialbal_accnt_id=pAccntid) AND (trialbal_beginning != 0 OR trialbal_ending != 0) LIMIT 1; IF (FOUND) THEN RETURN -99; END IF; SELECT cashrcptmisc_accnt_id INTO _check FROM cashrcptmisc WHERE (cashrcptmisc_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -99; END IF; -- Delete any non-critical use DELETE FROM flitem WHERE (flitem_accnt_id=pAccntid); -- only possible because of trialbal error-check above DELETE FROM trialbal WHERE (trialbal_accnt_id=pAccntid) AND (trialbal_beginning=0) AND (trialbal_ending=0); -- Delete the Account DELETE FROM accnt WHERE (accnt_id=pAccntid); RETURN 0; END; $_$; ALTER FUNCTION public.deleteaccount(integer) OWNER TO admin; -- -- Name: deleteaccountingperiod(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _check RECORD; BEGIN -- Check to make sure that the passed period is not closed IF ( ( SELECT period_closed FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Check to make sure that there are not any posted G/L Transactions -- in the period. SELECT gltrans_id INTO _check FROM gltrans, period WHERE ( (gltrans_date BETWEEN period_start AND period_end) AND (gltrans_posted) AND (period_id=pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT b.period_id INTO _check FROM period AS a, period AS b WHERE((a.period_id=pPeriodid) AND (a.period_end < b.period_start)) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; -- Delete the period DELETE FROM period WHERE (period_id=pPeriodid); RETURN 1; END; $_$; ALTER FUNCTION public.deleteaccountingperiod(integer) OWNER TO admin; -- -- Name: deleteaccountingyearperiod(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteaccountingyearperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _check RECORD; BEGIN -- Check to make sure that the passed yearperiod is not closed IF ( ( SELECT yearperiod_closed FROM yearperiod WHERE (yearperiod_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- this yearperiod is in use by existing periods IF (EXISTS(SELECT period_id FROM period WHERE (period_yearperiod_id=pPeriodid))) THEN RETURN -2; END IF; -- Delete the yearperiod DELETE FROM yearperiod WHERE (yearperiod_id=pPeriodid); RETURN 1; END; $_$; ALTER FUNCTION public.deleteaccountingyearperiod(integer) OWNER TO admin; -- -- Name: deleteaddress(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteaddress(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE paddrId ALIAS FOR $1; _count INTEGER := 0; BEGIN SELECT count(*) INTO _count FROM cntct WHERE (cntct_active AND (cntct_addr_id = paddrId)); IF (_count > 0) THEN RETURN -1; END IF; SELECT count(*) INTO _count FROM vendinfo WHERE (vend_active AND (vend_addr_id = paddrId)); IF (_count > 0) THEN RETURN -2; END IF; SELECT count(*) INTO _count FROM shiptoinfo WHERE (shipto_active AND (shipto_addr_id = paddrId)); IF (_count > 0) THEN RETURN -3; END IF; SELECT count(*) INTO _count FROM vendaddrinfo WHERE (vendaddr_addr_id = paddrId); IF (_count > 0) THEN RETURN -4; END IF; SELECT count(*) INTO _count FROM whsinfo WHERE (warehous_active AND (warehous_addr_id = paddrId)); IF (_count > 0) THEN RETURN -5; END IF; UPDATE cntct SET cntct_addr_id = NULL WHERE (cntct_addr_id = paddrId); UPDATE vendinfo SET vend_addr_id = NULL WHERE (vend_addr_id = paddrId); UPDATE shiptoinfo SET shipto_addr_id = NULL WHERE (shipto_addr_id =paddrId); UPDATE vendaddrinfo SET vendaddr_addr_id = NULL WHERE (vendaddr_addr_id = paddrId); UPDATE whsinfo SET warehous_addr_id = NULL WHERE (warehous_addr_id=paddrId); DELETE FROM addr WHERE addr_id = paddrId; RETURN 0; END; $_$; ALTER FUNCTION public.deleteaddress(integer) OWNER TO admin; -- -- Name: deleteapcheck(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'deleteAPCheck() is deprecated - use deleteCheck() instead'; RETURN deleteCheck($1); END; $_$; ALTER FUNCTION public.deleteapcheck(integer) OWNER TO admin; -- -- Name: deletebankadjustmenttype(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletebankadjustmenttype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankadjtypeid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if the the adjustment type is being used in any adjustments SELECT bankadj_bankadjtype_id INTO _check FROM bankadj WHERE (bankadj_bankadjtype_id=pBankadjtypeid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the Account DELETE FROM bankadjtype WHERE (bankadjtype_id=pbankadjtypeid); RETURN 0; END; $_$; ALTER FUNCTION public.deletebankadjustmenttype(integer) OWNER TO admin; -- -- Name: deletebankreconciliation(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletebankreconciliation(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pbankrecid ALIAS FOR $1; BEGIN DELETE FROM bankrecitem WHERE bankrecitem_bankrec_id=pbankrecid; DELETE FROM bankrec WHERE bankrec_id=pbankrecid; RETURN 0; END; $_$; ALTER FUNCTION public.deletebankreconciliation(integer) OWNER TO admin; -- -- Name: deletebom(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletebom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _result INTEGER; BEGIN IF (fetchmetricbool('RevControl')) THEN SELECT rev_id INTO _result FROM rev WHERE ((rev_target_id=pItemid) AND (rev_target_type = 'BOM')) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Bill of Materials has revision control records and may not be deleted.'; END IF; END IF; DELETE FROM bomhead WHERE (bomhead_item_id=pItemid); DELETE FROM bomitem WHERE (bomitem_parent_item_id=pItemid); RETURN 0; END; $_$; ALTER FUNCTION public.deletebom(integer) OWNER TO admin; -- -- Name: deletebomworkset(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletebomworkset(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWorksetid ALIAS FOR $1; BEGIN -- All done with the bomwork set indicated by pWorksetid, delete all of it DELETE FROM bomwork WHERE (bomwork_set_id=pWorksetid); RETURN 1; END; $_$; ALTER FUNCTION public.deletebomworkset(integer) OWNER TO admin; -- -- Name: deletebudget(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletebudget(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudgheadid ALIAS FOR $1; BEGIN DELETE FROM budgitem WHERE (budgitem_budghead_id=pBudgheadid); DELETE FROM budghead WHERE (budghead_id=pBudgheadid); RETURN pBudgheadid; END; $_$; ALTER FUNCTION public.deletebudget(integer) OWNER TO admin; -- -- Name: deletebudgetitems(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletebudgetitems(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudgheadid ALIAS FOR $1; BEGIN DELETE FROM budgitem WHERE (budgitem_budghead_id=pBudgheadid); RETURN pBudgheadid; END; $_$; ALTER FUNCTION public.deletebudgetitems(integer) OWNER TO admin; -- -- Name: deletecashrcpt(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletecashrcpt(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcashrcptid ALIAS FOR $1; _ccreceipt BOOLEAN; BEGIN IF EXISTS(SELECT cashrcpt_id FROM cashrcpt JOIN ccpay ON (cashrcpt_cust_id=ccpay_cust_id) AND ((CASE WHEN TRIM(COALESCE(cashrcpt_docnumber, ''))='' THEN TEXT(cashrcpt_id) ELSE cashrcpt_docnumber END)=ccpay_order_number) WHERE ((cashrcpt_fundstype IN ('A', 'D', 'M', 'V')) AND (ccpay_status NOT IN ('D', 'X')) AND (ccpay_id NOT IN (SELECT payco_ccpay_id FROM payco)) AND (cashrcpt_id=pcashrcptid))) THEN RETURN -1; END IF; IF EXISTS(SELECT cashrcpt_id FROM cashrcpt WHERE ( (cashrcpt_id=pcashrcptid) AND (cashrcpt_posted) )) THEN RETURN -2; END IF; -- If there are applications for this Cash Receipt then -- it has been posted and reversed. Void instead of delete. IF EXISTS(SELECT cashrcpt_id FROM cashrcpt JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id) JOIN arapply ON ((arapply_reftype='CRA') AND (arapply_ref_id=cashrcptitem_id)) WHERE (cashrcpt_id=pcashrcptid)) OR EXISTS(SELECT cashrcpt_id FROM cashrcpt JOIN cashrcptmisc ON (cashrcptmisc_cashrcpt_id=cashrcpt_id) JOIN arapply ON ((arapply_reftype='CRD') AND (arapply_ref_id=cashrcptmisc_id)) WHERE (cashrcpt_id=pcashrcptid)) THEN UPDATE cashrcpt SET cashrcpt_void = TRUE WHERE (cashrcpt_id=pcashrcptid); RETURN 1; END IF; DELETE FROM cashrcptitem WHERE (cashrcptitem_cashrcpt_id=pcashrcptid); DELETE FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pcashrcptid); DELETE FROM cashrcpt WHERE (cashrcpt_id=pcashrcptid); RETURN 1; END; $_$; ALTER FUNCTION public.deletecashrcpt(integer) OWNER TO admin; -- -- Name: deletecharacteristic(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletecharacteristic(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCharid ALIAS FOR $1; _check INTEGER; _r RECORD; BEGIN -- Cache the specifics of the characteristic SELECT * INTO _r FROM char WHERE (char_id=pCharid); IF (NOT(FOUND)) THEN RETURN 0; END IF; -- If the passed characteristic is used SELECT * INTO _r FROM charass WHERE (charass_char_id=pCharid) LIMIT 1; IF (FOUND) THEN IF (_r.charass_target_type = 'I') THEN RETURN -1; ELSIF (_r.charass_target_type = 'C') THEN RETURN -2; ELSIF (_r.charass_target_type = 'ADDR') THEN RETURN -3; ELSIF (_r.charass_target_type = 'CNTCT') THEN RETURN -4; ELSIF (_r.charass_target_type = 'CRMACCT') THEN RETURN -5; ELSIF (_r.charass_target_type = 'INCDT ') THEN RETURN -6; ELSIF (_r.charass_target_type = 'EMP') THEN RETURN -7; ELSE RETURN -99; END IF; END IF; -- Delete the passed characterisitic DELETE FROM char WHERE (char_id=pCharid); RETURN pCharid; END; $_$; ALTER FUNCTION public.deletecharacteristic(integer) OWNER TO admin; -- -- Name: deletecheck(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletecheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; BEGIN IF (SELECT (NOT checkhead_void) OR checkhead_posted OR checkhead_replaced OR checkhead_deleted OR (checkhead_ach_batch IS NOT NULL AND checkhead_printed) FROM checkhead WHERE (checkhead_id=pCheckid) ) THEN RETURN -1; END IF; UPDATE checkhead SET checkhead_deleted=TRUE WHERE (checkhead_id=pCheckid); RETURN 1; END; $_$; ALTER FUNCTION public.deletecheck(integer) OWNER TO admin; -- -- Name: deleteclasscode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteclasscode(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClasscodeid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if any items are assigned to the passed classcode SELECT item_id INTO _check FROM item WHERE (item_classcode_id=pClasscodeid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the passed classcode DELETE FROM classcode WHERE (classcode_id=pClasscodeid); RETURN pClasscodeid; END; $_$; ALTER FUNCTION public.deleteclasscode(integer) OWNER TO admin; -- -- Name: deletecompany(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletecompany(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcompanyid ALIAS FOR $1; BEGIN IF (EXISTS(SELECT accnt_id FROM accnt, company WHERE ((accnt_company=company_number) AND (company_id=pcompanyid)) )) THEN RETURN -1; END IF; DELETE FROM company WHERE (company_id=pcompanyid); RETURN pcompanyid; END; $_$; ALTER FUNCTION public.deletecompany(integer) OWNER TO admin; -- -- Name: deletecreditmemo(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletecreditmemo(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; BEGIN DELETE FROM cmitem WHERE (cmitem_cmhead_id=pCmheadid); DELETE FROM cmhead WHERE (cmhead_id=pCmheadid); RETURN TRUE; END; $_$; ALTER FUNCTION public.deletecreditmemo(integer) OWNER TO admin; -- -- Name: deletecustomer(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletecustomer(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; BEGIN PERFORM shipto_id FROM shiptoinfo WHERE (shipto_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; PERFORM cohead_id FROM cohead WHERE (cohead_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; PERFORM cmhead_id FROM cmhead WHERE (cmhead_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; PERFORM cohist_id FROM cohist WHERE (cohist_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; PERFORM aropen_id FROM aropen WHERE (aropen_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; PERFORM checkhead_recip_id FROM checkhead WHERE ((checkhead_recip_id=pCustid) AND (checkhead_recip_type='C')) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; PERFORM invchead_id FROM invchead WHERE(invchead_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -7; END IF; PERFORM quhead_id FROM quhead WHERE(quhead_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -8; END IF; DELETE FROM taxreg WHERE ((taxreg_rel_type='C') AND (taxreg_rel_id=pCustid)); DELETE FROM ipsass WHERE (ipsass_cust_id=pCustid); DELETE FROM custinfo WHERE (cust_id=pCustid); UPDATE crmacct SET crmacct_cust_id = NULL WHERE (crmacct_cust_id=pCustid); RETURN 0; END; $_$; ALTER FUNCTION public.deletecustomer(integer) OWNER TO admin; -- -- Name: deletecustomertype(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletecustomertype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCusttypeid ALIAS FOR $1; BEGIN IF EXISTS(SELECT 1 FROM custinfo WHERE (cust_custtype_id=pCusttypeid)) THEN RETURN -1; END IF; DELETE FROM ipsass WHERE (ipsass_custtype_id=pCusttypeid); DELETE FROM salesaccnt WHERE (salesaccnt_custtype_id=pCusttypeid); DELETE FROM araccnt WHERE (araccnt_custtype_id=pCusttypeid); DELETE FROM custform WHERE (custform_custtype_id=pCusttypeid); DELETE FROM custtype WHERE (custtype_id=pCusttypeid); RETURN pCusttypeid; END; $_$; ALTER FUNCTION public.deletecustomertype(integer) OWNER TO admin; -- -- Name: deleteempgrp(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteempgrp(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pempgrpid ALIAS FOR $1; BEGIN -- Check to see if any employees are assigned to the passed empgrp PERFORM empgrpitem_emp_id FROM empgrpitem WHERE (empgrpitem_empgrp_id=pempgrpid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; DELETE FROM empgrp WHERE (empgrp_id=pempgrpid); RETURN 0; END; $_$; ALTER FUNCTION public.deleteempgrp(integer) OWNER TO admin; -- -- Name: deleteexpiredips(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteexpiredips() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN FOR _r IN SELECT ipshead_id FROM ipshead WHERE (ipshead_expires <= current_date) LOOP DELETE FROM ipsass WHERE (ipsass_ipshead_id=_r.ipshead_id); DELETE FROM ipsiteminfo WHERE (ipsitem_ipshead_id=_r.ipshead_id); DELETE FROM ipsfreight WHERE (ipsfreight_ipshead_id=_r.ipshead_id); DELETE FROM ipshead WHERE (ipshead_id=_r.ipshead_id); END LOOP; RETURN TRUE; END; $$; ALTER FUNCTION public.deleteexpiredips() OWNER TO admin; -- -- Name: deletefile(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletefile(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ declare pId ALIAS FOR $1; begin delete from file where ( file_id in ( select file_id from file join docass on (docass_target_id=file_id) and (docass_target_type='FILE') where ( docass_id = pId ) ) ); delete from docass where docass_id = pId; return true; end; $_$; ALTER FUNCTION public.deletefile(integer) OWNER TO admin; -- -- Name: deleteflgrp(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteflgrp(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlgrpid ALIAS FOR $1; _r RECORD; BEGIN FOR _r IN SELECT flgrp_id FROM flgrp WHERE (flgrp_flgrp_id=pFlgrpid) LOOP PERFORM deleteFlgrp(_r.flgrp_id); END LOOP; DELETE FROM flitem WHERE (flitem_flgrp_id=pFlgrpid); DELETE FROM flspec WHERE (flspec_flgrp_id=pFlgrpid); DELETE FROM flgrp WHERE (flgrp_id=pFlgrpid); RETURN 1; END; $_$; ALTER FUNCTION public.deleteflgrp(integer) OWNER TO admin; -- -- Name: deleteform(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteform(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFormid ALIAS FOR $1; _key TEXT; _check INTEGER; BEGIN -- Cache the key of the passed form SELECT form_key INTO _key FROM form WHERE (form_id=pFormid); IF (NOT(FOUND)) THEN RETURN 0; END IF; -- Handle checks based on the type of the form IF (_key='Chck') THEN SELECT bankaccnt_id INTO _check FROM bankaccnt WHERE (bankaccnt_check_form_id=pFormid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; END IF; -- Delete the form DELETE FROM form WHERE (form_id=pFormid); RETURN pFormid; END; $_$; ALTER FUNCTION public.deleteform(integer) OWNER TO admin; -- -- Name: deletefreightclass(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletefreightclass(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFreightClassid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if any items are assigned to the passed freightclass SELECT item_id INTO _check FROM item WHERE (item_freightclass_id=pFreightClassid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the passed freightclass DELETE FROM freightclass WHERE (freightclass_id=pFreightClassid); RETURN pFreightClassid; END; $_$; ALTER FUNCTION public.deletefreightclass(integer) OWNER TO admin; -- -- Name: deleteglseries(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteglseries(integer) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pSequence ALIAS FOR $1; BEGIN DELETE FROM glseries WHERE (glseries_sequence=pSequence); RETURN pSequence; END; $_$; ALTER FUNCTION public.deleteglseries(integer) OWNER TO admin; -- -- Name: deleteglseries(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteglseries(integer, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pNotes ALIAS FOR $2; _trialbalid INTEGER; _count INTEGER; _r RECORD; BEGIN -- March through all of the G/L Transactions for the passed sequence FOR _r IN SELECT gltrans_id, gltrans_date, gltrans_accnt_id, gltrans_amount, gltrans_posted, gltrans_rec, accnt_forwardupdate, period_id, period_closed, period_freeze FROM accnt, gltrans LEFT OUTER JOIN period ON (gltrans_date BETWEEN period_start AND period_end) WHERE ( (gltrans_accnt_id=accnt_id) AND (NOT gltrans_deleted) AND (gltrans_sequence=pSequence) ) LOOP -- If we can post into a Trial Balance, do so IF ( (NOT _r.period_closed) AND ( (NOT _r.period_freeze) OR (checkPrivilege('PostFrozenPeriod')) ) AND ( NOT _r.gltrans_rec) AND ( _r.gltrans_posted ) ) THEN -- Try to find an existing trialbal SELECT trialbal_id INTO _trialbalid FROM trialbal WHERE ( (trialbal_period_id=_r.period_id) AND (trialbal_accnt_id=_r.gltrans_accnt_id) ); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count > 0) THEN -- We found a trialbal, update it with the G/L Transaction -- Note - two stage update to avoid any funny value caching logic IF (_r.gltrans_amount > 0) THEN UPDATE trialbal SET trialbal_credits = (trialbal_credits - _r.gltrans_amount) WHERE (trialbal_id=_trialbalid); ELSE UPDATE trialbal SET trialbal_debits = (trialbal_debits - (_r.gltrans_amount * -1)) WHERE (trialbal_id=_trialbalid); END IF; UPDATE trialbal SET trialbal_ending = (trialbal_beginning - trialbal_debits + trialbal_credits), trialbal_dirty=TRUE WHERE (trialbal_id=_trialbalid); ELSE RAISE EXCEPTION 'Can not delete G/L Series. Trial balance record not found.'; END IF; -- Forward update if we should IF (_r.accnt_forwardupdate AND fetchmetricbool('ManualForwardUpdate')) THEN PERFORM forwardUpdateTrialBalance(_trialbalid); END IF; -- Delete any bank reconciliation records if this was marked cleared but non reconciled DELETE FROM bankrecitem WHERE ((bankrecitem_source='GL') AND (bankrecitem_source_id=_r.gltrans_id)); -- Unflag any journals as posted as a result of this series UPDATE sltrans SET sltrans_posted=false, sltrans_gltrans_journalnumber=null FROM gltrans WHERE ((gltrans_sequence=pSequence) AND (sltrans_gltrans_journalnumber=gltrans_journalnumber)); -- Mark the G/L Transaction as deleted UPDATE gltrans SET gltrans_posted=false, gltrans_deleted=true, gltrans_notes=gltrans_notes || E'\n' || pNotes WHERE (gltrans_id=_r.gltrans_id); ELSIF (_r.period_freeze) THEN RAISE EXCEPTION 'Can not delete a G/L Transaction in a frozen period'; ELSIF (_r.period_closed) THEN RAISE EXCEPTION 'Can not delete a G/L Transaction on account % in a closed period', formatGlAccount(_r.gltrans_accnt_id); ELSIF (_r.gltrans_rec) THEN RAISE EXCEPTION 'Can not delete a G/L Transaction that has been reconciled'; ELSIF (NOT _r.gltrans_posted) THEN RAISE EXCEPTION 'Can not delete a G/L Transaction that has not been posted to Trial Balance'; END IF; END LOOP; RETURN true; END; $_$; ALTER FUNCTION public.deleteglseries(integer, text) OWNER TO admin; -- -- Name: deleteincident(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteincident(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pincdtid ALIAS FOR $1; _count INTEGER := 0; _incdtnbr INTEGER := 0; BEGIN SELECT COUNT(*) INTO _count FROM todoitem WHERE (todoitem_incdt_id=pincdtid); IF (_count > 0) THEN RETURN -1; END IF; DELETE FROM comment WHERE((comment_source='INCDT') AND (comment_source_id=pincdtid)); DELETE FROM incdthist WHERE (incdthist_incdt_id=pincdtid); DELETE FROM imageass WHERE ((imageass_source='INCDT') AND (imageass_source_id=pincdtid)); DELETE FROM url WHERE ((url_source='INCDT') AND (url_source_id=pincdtid)); SELECT incdt_number INTO _incdtnbr FROM incdt WHERE (incdt_id=pincdtid); DELETE FROM incdt WHERE (incdt_id=pincdtid); -- Incident #11538 needs to be fully resolved before release can be implemented -- PERFORM releaseIncidentNumber(_incdtnbr); RETURN 0; END; $_$; ALTER FUNCTION public.deleteincident(integer) OWNER TO admin; -- -- Name: deleteinvoice(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; BEGIN UPDATE shipitem SET shipitem_invoiced=FALSE, shipitem_invcitem_id=NULL FROM invcitem WHERE ((shipitem_invoiced) AND (shipitem_invcitem_id=invcitem_id) AND (invcitem_invchead_id=pInvcheadid)); UPDATE coitem SET coitem_status = 'O' WHERE ((coitem_status = 'C') AND (coitem_id IN (SELECT cobill_coitem_id FROM cobill, invcitem WHERE ((cobill_invcitem_id=invcitem_id) AND (invcitem_invchead_id=pInvcheadid))))); UPDATE cobill SET cobill_invcnum=NULL, cobill_invcitem_id=NULL FROM invcitem WHERE ((cobill_invcitem_id=invcitem_id) AND (invcitem_invchead_id=pInvcheadid)); UPDATE invdetail SET invdetail_invcitem_id=NULL FROM invcitem WHERE ((invdetail_invcitem_id=invcitem_id) AND (invcitem_invchead_id=pInvcheadid)); UPDATE cobmisc SET cobmisc_invcnumber=NULL, cobmisc_invchead_id=NULL, cobmisc_posted=FALSE WHERE (cobmisc_invchead_id=pInvcheadid); DELETE FROM aropenalloc WHERE (aropenalloc_doctype='I') AND (aropenalloc_doc_id=pInvcheadid); DELETE FROM invcitem WHERE (invcitem_invchead_id=pInvcheadid); DELETE FROM invchead WHERE (invchead_id=pInvcheadid); RETURN pInvcheadid; END; $_$; ALTER FUNCTION public.deleteinvoice(integer) OWNER TO admin; -- -- Name: deleteipsitem(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteipsitem(pipsitemid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN DELETE FROM ipsiteminfo WHERE ipsitem_id=pIpsItemId; RETURN 1; END; $$; ALTER FUNCTION public.deleteipsitem(pipsitemid integer) OWNER TO admin; -- -- Name: deleteipsprodcat(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteipsprodcat(pipsitemid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN DELETE FROM ipsiteminfo WHERE ipsitem_id=pIpsItemId; RETURN 1; END; $$; ALTER FUNCTION public.deleteipsprodcat(pipsitemid integer) OWNER TO admin; -- -- Name: deleteitem(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _result INTEGER; BEGIN SELECT bomitem_id INTO _result FROM bomitem WHERE (bomitem_item_id=pItemid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; SELECT itemsite_id INTO _result FROM itemsite WHERE (itemsite_item_id=pItemid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; SELECT itemsub_id INTO _result FROM itemsub WHERE (itemsub_sub_item_id=pItemid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; IF (fetchmetricbool('RevControl')) THEN SELECT rev_id INTO _result FROM rev WHERE ((rev_target_id=pItemid) AND (rev_target_type = 'BOM')) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; END IF; DELETE FROM bomhead WHERE (bomhead_item_id=pItemid); DELETE FROM bomitem WHERE (bomitem_item_id=pItemid); DELETE FROM itemcost WHERE (itemcost_item_id=pItemid); DELETE FROM costhist WHERE (costhist_item_id=pItemid); DELETE FROM itemsub WHERE (itemsub_parent_item_id=pItemid); DELETE FROM itemsub WHERE (itemsub_sub_item_id=pItemid); DELETE FROM itemsrcp WHERE (itemsrcp_itemsrc_id IN (SELECT itemsrc_id FROM itemsrc WHERE (itemsrc_item_id=pItemid))); DELETE FROM itemsrc WHERE (itemsrc_item_id=pItemid); DELETE FROM itemalias WHERE (itemalias_item_id=pItemid); DELETE FROM itemgrpitem WHERE (itemgrpitem_item_id=pItemid); DELETE FROM ipsiteminfo WHERE (ipsitem_item_id=pItemid); DELETE FROM imageass WHERE ( (imageass_source='I') AND (imageass_source_id=pItemid) ); DELETE FROM locitem WHERE (locitem_item_id=pItemid); DELETE FROM itemtax WHERE(itemtax_item_id=pItemid); DELETE FROM itemsite WHERE (itemsite_item_id=pItemid); DELETE FROM itemuom WHERE(itemuom_itemuomconv_id IN (SELECT itemuomconv_id FROM itemuomconv WHERE(itemuomconv_item_id=pItemid))); DELETE FROM itemuomconv WHERE(itemuomconv_item_id=pItemid); DELETE FROM item WHERE (item_id=pItemid); RETURN 0; END; $_$; ALTER FUNCTION public.deleteitem(integer) OWNER TO admin; -- -- Name: deleteitemcost(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteitemcost(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pCostElemId ALIAS FOR $2; _itemcost_id INTEGER; _postcost_return BOOLEAN; _std_cost NUMERIC; BEGIN SELECT itemcost_id INTO _itemcost_id FROM itemcost WHERE ( (itemcost_item_id = pItemId) AND (itemcost_costelem_id = pCostElemId) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'itemcost % not found for. ', pItemId || ' & ' || pCostElemId; END IF; SELECT itemcost_stdcost INTO _std_cost FROM itemcost WHERE (itemcost_id = _itemcost_id); IF (_std_cost > 0) THEN --Actual Cost is updated to zero to ensure inventory is valued correctly PERFORM updateCost(_itemcost_id, 0); END IF; DELETE FROM itemcost WHERE (itemcost_id=_itemcost_id); RETURN _itemcost_id; END; $_$; ALTER FUNCTION public.deleteitemcost(integer, integer) OWNER TO admin; -- -- Name: deleteitemsite(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteitemsite(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _result INTEGER; _lotserial BOOLEAN; _bbom BOOLEAN; _mfg BOOLEAN; _standard BOOLEAN; BEGIN IF ( ( SELECT ( (itemsite_qtyonhand <> 0) OR (itemsite_nnqoh <> 0) ) FROM itemsite WHERE (itemsite_id=pItemsiteid) ) ) THEN RETURN -9; END IF; SELECT metric_value='t' INTO _bbom FROM metric WHERE (metric_name='BBOM'); SELECT metric_value='t' INTO _lotserial FROM metric WHERE (metric_name='LotSerialControl'); SELECT metric_value NOT IN ('PostBooks', 'Standard') INTO _mfg FROM metric WHERE (metric_name='Application'); SELECT metric_value='Standard' INTO _standard FROM metric WHERE (metric_name='Application'); SELECT invhist_id INTO _result FROM invhist WHERE (invhist_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; IF (_lotserial) THEN SELECT lsdetail_id INTO _result FROM lsdetail WHERE (lsdetail_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; END IF; SELECT wo_id INTO _result FROM wo WHERE (wo_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; SELECT womatl_id INTO _result FROM womatl WHERE (womatl_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; SELECT womatlvar_id INTO _result FROM womatlvar WHERE ( (womatlvar_parent_itemsite_id=pItemsiteid) OR (womatlvar_component_itemsite_id=pItemsiteid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; IF (_bbom) THEN SELECT brdvar_id INTO _result FROM xtmfg.brdvar WHERE ( (brdvar_itemsite_id=pItemsiteid) OR (brdvar_parent_itemsite_id=pItemsiteid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; END IF; SELECT coitem_id INTO _result FROM coitem WHERE (coitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT cohist_id INTO _result FROM cohist WHERE (cohist_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT quitem_id INTO _result FROM quitem WHERE (quitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT cmitem_id INTO _result FROM cmitem WHERE (cmitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT poitem_id INTO _result FROM poitem WHERE (poitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT recv_id INTO _result FROM recv WHERE (recv_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT poreject_id INTO _result FROM poreject WHERE (poreject_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT pr_id INTO _result FROM pr WHERE (pr_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; IF (_mfg OR _standard) THEN SELECT planord_id INTO _result FROM planord WHERE (planord_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; END IF; IF (_mfg) THEN SELECT pschitem_id INTO _result FROM xtmfg.pschitem WHERE (pschitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; SELECT woopervar_id INTO _result FROM xtmfg.woopervar WHERE (woopervar_parent_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; END IF; IF (_mfg OR _standard) THEN SELECT itemsite_id INTO _result FROM itemsite WHERE (itemsite_supply_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -7; END IF; END IF; DELETE FROM invcnt WHERE (invcnt_itemsite_id=pItemsiteid); DELETE FROM itemloc WHERE (itemloc_itemsite_id=pItemsiteid); DELETE FROM itemlocdist WHERE (itemlocdist_itemsite_id=pItemsiteid); IF (_bbom) THEN DELETE FROM xtmfg.brddist WHERE (brddist_itemsite_id=pItemsiteid); END IF; DELETE FROM itemsite WHERE (itemsite_id=pItemsiteid); RETURN 0; END; $_$; ALTER FUNCTION public.deleteitemsite(integer) OWNER TO admin; -- -- Name: deleteitemuom(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteitemuom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemuomid ALIAS FOR $1; BEGIN DELETE FROM itemuom WHERE itemuom_id=pItemuomid; RETURN 0; END; $_$; ALTER FUNCTION public.deleteitemuom(integer) OWNER TO admin; -- -- Name: deleteitemuomconv(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteitemuomconv(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemuomconvid ALIAS FOR $1; _fromuomid INTEGER; _invuomid INTEGER; _itemid INTEGER; _touomid INTEGER; BEGIN SELECT itemuomconv_item_id, item_inv_uom_id, itemuomconv_from_uom_id, itemuomconv_to_uom_id INTO _itemid, _invuomid, _fromuomid, _touomid FROM itemuomconv JOIN item ON (itemuomconv_item_id=item_id) WHERE (itemuomconv_id=pItemuomconvid); IF EXISTS(SELECT * FROM uomusedforitem(_itemid) WHERE ((uom_id IN (_fromuomid, _touomid)) AND (uom_id != _invuomid)) ) THEN RETURN -1; END IF; DELETE FROM itemuom WHERE itemuom_itemuomconv_id=pItemuomconvid; DELETE FROM itemuomconv WHERE itemuomconv_id=pItemuomconvid; RETURN 0; END; $_$; ALTER FUNCTION public.deleteitemuomconv(integer) OWNER TO admin; -- -- Name: deletelocation(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletelocation(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if any itemsite used the passed location as their default SELECT itemsite_id INTO _check FROM itemsite WHERE (itemsite_location_id=pLocationid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Check to see if any inventory is currently stored at the passed location SELECT itemloc_id INTO _check FROM itemloc WHERE (itemloc_location_id=pLocationid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to see if any undistributed inventory transactions are currently posted at the passed location SELECT itemlocdist_id INTO _check FROM itemlocdist WHERE ( (itemlocdist_source_type='L') AND (itemlocdist_source_id=pLocationid) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to see if the passed location has any Inventory Detail posted against it SELECT invdetail_id INTO _check FROM invdetail WHERE (invdetail_location_id=pLocationid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; -- Delete any associated locitem records DELETE FROM locitem WHERE (locitem_location_id=pLocationid); -- Delete the location record DELETE FROM location WHERE (location_id=pLocationid); RETURN pLocationid; END; $_$; ALTER FUNCTION public.deletelocation(integer) OWNER TO admin; -- -- Name: deletemetasql(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletemetasql(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pid ALIAS FOR $1; BEGIN DELETE FROM metasql WHERE metasql_id = pid; RETURN 0; END; $_$; ALTER FUNCTION public.deletemetasql(integer) OWNER TO admin; -- -- Name: deleteopenrecurringitems(integer, text, timestamp with time zone, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteopenrecurringitems(integer, text, timestamp with time zone, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentid ALIAS FOR $1; pType TEXT := UPPER($2); pDatetime TIMESTAMP WITH TIME ZONE := COALESCE($3, startOfTime()); pInclParent BOOLEAN := COALESCE($4, FALSE); _count INTEGER := 0; _delchildstmt TEXT; _delparentstmt TEXT; _rt RECORD; _tmp INTEGER; BEGIN RAISE DEBUG 'deleteOpenRecurringItems(%, %, %)', pParentid, pType, pDatetime; IF (pParentid IS NULL) THEN RETURN -11; END IF; SELECT * INTO _rt FROM recurtype WHERE (UPPER(recurtype_type)=pType); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count <= 0) THEN RETURN -10; END IF; -- 2 deletes avoid reparenting problems if the parent gets deleted first IF (_rt.recurtype_delfunc IS NULL) THEN _delchildstmt := 'DELETE FROM [fulltable] ' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>''$2'')' || ' AND ([table]_recurring_[table]_id=$1)' || ' AND ([table]_id!=$1));'; _delparentstmt := 'DELETE FROM [fulltable] USING recur' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>''$2'')' || ' AND ([table]_recurring_[table]_id=$1)' || ' AND ([table]_id=$1));'; ELSE _delchildstmt := 'SELECT [delfunc]([table]_id)' || ' FROM [fulltable] ' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>''$2'')' || ' AND ([table]_recurring_[table]_id=$1)' || ' AND ([table]_id!=$1));'; _delparentstmt := 'SELECT [delfunc]([table]_id)' || ' FROM [fulltable] ' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>''$2'')' || ' AND ([table]_recurring_[table]_id=$1)' || ' AND ([table]_id!=$1));'; _delchildstmt := REPLACE(_delchildstmt, '[delfunc]', _rt.recurtype_delfunc); _delparentstmt := REPLACE(_delparentstmt, '[delfunc]', _rt.recurtype_delfunc); END IF; RAISE DEBUG '_delchildstmt has been set to %', _delchildstmt; _delchildstmt := REPLACE(_delchildstmt, '[fulltable]', _rt.recurtype_table); _delchildstmt := REPLACE(_delchildstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _delchildstmt := REPLACE(_delchildstmt, '[done]', _rt.recurtype_donecheck); _delchildstmt := REPLACE(_delchildstmt, '[schedcol]', _rt.recurtype_schedcol); _delparentstmt := REPLACE(_delparentstmt, '[fulltable]', _rt.recurtype_table); _delparentstmt := REPLACE(_delparentstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _delparentstmt := REPLACE(_delparentstmt, '[done]', _rt.recurtype_donecheck); _delparentstmt := REPLACE(_delparentstmt, '[schedcol]', _rt.recurtype_schedcol); RAISE DEBUG 'substitutions changed _delchildstmt to %', _delchildstmt; IF (_rt.recurtype_delfunc IS NULL) THEN -- 8.4+: EXECUTE _delchildstmt USING pDatetime, pType; RAISE DEBUG '% with % and %', _delchildstmt, pType, pDatetime; EXECUTE REPLACE(REPLACE(_delchildstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT); GET DIAGNOSTICS _count = ROW_COUNT; IF (pInclParent) THEN -- 8.4+: EXECUTE _delparentstmt USING pDatetime, pType; RAISE DEBUG '% with % and %', _delparentstmt, pType, pDatetime; EXECUTE REPLACE(REPLACE(_delparentstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT); GET DIAGNOSTICS _tmp = ROW_COUNT; _count := _count + _tmp; END IF; ELSE -- 8.4+: FOR _tmp IN EXECUTE _delchildstmt USING pDatetime, pType LOOP FOR _tmp IN EXECUTE REPLACE(REPLACE(_delchildstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT) LOOP IF _tmp < 0 THEN RETURN _tmp; END IF; _count := _count + 1; END LOOP; IF (pInclParent) THEN -- 8.4+: EXECUTE _delparentstmt INTO _tmp USING pDatetime, pType; EXECUTE REPLACE(REPLACE(_delparentstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT) INTO _tmp; IF (_tmp < 0) THEN RETURN _tmp; END IF; _count := _count + 1; END IF; END IF; RAISE DEBUG 'deleteOpenrecurringItems() returning %', _count; RETURN _count; END; $_$; ALTER FUNCTION public.deleteopenrecurringitems(integer, text, timestamp with time zone, boolean) OWNER TO admin; -- -- Name: deleteopportunity(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteopportunity(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOpheadid ALIAS FOR $1; _test INTEGER; BEGIN SELECT todoitem_id INTO _test FROM todoitem WHERE(todoitem_ophead_id=pOpheadid) LIMIT 1; IF(FOUND) THEN RETURN -1; END IF; SELECT quhead_id INTO _test FROM quhead WHERE(quhead_ophead_id=pOpheadid) LIMIT 1; IF(FOUND) THEN RETURN -2; END IF; SELECT cohead_id INTO _test FROM cohead WHERE(cohead_ophead_id=pOpheadid) LIMIT 1; IF(FOUND) THEN RETURN -3; END IF; DELETE FROM charass WHERE((charass_target_type='OPP') AND (charass_target_id=pOpheadid)); DELETE FROM comment WHERE((comment_source='OPP') AND (comment_source_id=pOpheadid)); DELETE FROM ophead WHERE(ophead_id=pOpheadid); return 0; END; $_$; ALTER FUNCTION public.deleteopportunity(integer) OWNER TO admin; -- -- Name: deletepackage(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletepackage(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgheadid ALIAS FOR $1; _i INTEGER := 0; _pkgname TEXT; _r RECORD; _tabs TEXT[] := ARRAY['cmd', 'cmdarg', 'image', 'metasql', 'priv', 'report', 'script', 'uiform']; _debug BOOL := false; BEGIN IF (EXISTS(SELECT * FROM pkgdep WHERE (pkgdep_parent_pkghead_id=ppkgheadid))) THEN RETURN -1; END IF; SELECT pkghead_name INTO _pkgname FROM pkghead WHERE (pkghead_id=ppkgheadid); IF (NOT FOUND) THEN RETURN -2; END IF; IF (LOWER(_pkgname) = 'public' OR LOWER(_pkgname) = 'api') THEN RETURN -3; END IF; FOR _i IN ARRAY_LOWER(_tabs,1)..ARRAY_UPPER(_tabs,1) LOOP EXECUTE 'ALTER TABLE ' || _pkgname || '.pkg' || _tabs[_i] || ' DISABLE TRIGGER pkg' || _tabs[_i] || 'altertrigger;'; END LOOP; DELETE FROM pkghead WHERE pkghead_id=ppkgheadid; RETURN ppkgheadid; END; $_$; ALTER FUNCTION public.deletepackage(integer) OWNER TO admin; -- -- Name: deletepo(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletepo(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; _poitemid INTEGER; BEGIN IF ( ( SELECT pohead_status FROM pohead WHERE (pohead_id=pPoheadid) ) = 'U' ) THEN -- Unlink from any Sales Orders UPDATE coitem SET coitem_order_type=NULL, coitem_order_id=NULL FROM poitem WHERE ( (coitem_order_type='P') AND (coitem_order_id=poitem_id) AND (poitem_pohead_id=pPoheadid) ); DELETE FROM poitem WHERE (poitem_pohead_id=pPoheadid); DELETE FROM pohead WHERE (pohead_id=pPoheadid); RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.deletepo(integer) OWNER TO admin; -- -- Name: deletepoitem(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletepoitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoitemid ALIAS FOR $1; _poheadid INTEGER := -1; _status CHARACTER; BEGIN SELECT poitem_pohead_id, poitem_status INTO _poheadid, _status FROM poitem WHERE (poitem_id=pPoitemid); IF NOT(FOUND) THEN RETURN 0; END IF; IF ( _status = 'U' ) THEN DELETE FROM poitem WHERE (poitem_id=pPoitemid); ELSE IF ( _status = 'O' ) THEN PERFORM recv_id FROM recv WHERE ( (recv_order_type='PO') AND (recv_orderitem_id=pPoitemid) ); IF (FOUND) THEN RETURN -10; ELSE RETURN -20; END IF; ELSE RETURN -10; END IF; END IF; PERFORM poitem_id FROM poitem WHERE poitem_pohead_id = _poheadid; IF NOT(FOUND) THEN DELETE FROM pohead WHERE (pohead_id = _poheadid); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.deletepoitem(integer) OWNER TO admin; -- -- Name: deletepr(character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletepr(character, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentType ALIAS FOR $1; pParentId ALIAS FOR $2; BEGIN DELETE FROM pr WHERE ((pr_status='O') AND (pr_order_type=pParentType) AND (pr_order_id=pParentId)); RETURN TRUE; END; $_$; ALTER FUNCTION public.deletepr(character, integer) OWNER TO admin; -- -- Name: deletepr(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletepr(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrid ALIAS FOR $1; BEGIN DELETE FROM pr WHERE ( (pr_status='O') AND (pr_id=pPrid) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.deletepr(integer) OWNER TO admin; -- -- Name: deleteproductcategory(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteproductcategory(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pProdcatid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if any items are assigned to the passed classcode SELECT item_id INTO _check FROM item WHERE (item_prodcat_id=pProdcatid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete any assocated records DELETE FROM salesaccnt WHERE (salesaccnt_prodcat_id=pProdcatid); -- Delete the passed prodcat DELETE FROM prodcat WHERE (prodcat_id=pProdcatid); RETURN pProdcatid; END; $_$; ALTER FUNCTION public.deleteproductcategory(integer) OWNER TO admin; -- -- Name: deleteprofitcenter(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteprofitcenter(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pid ALIAS FOR $1; BEGIN IF (EXISTS(SELECT accnt_id FROM accnt, prftcntr WHERE ((accnt_company=prftcntr_number) AND (prftcntr_id=pid)) )) THEN RETURN -1; END IF; DELETE FROM prftcntr WHERE (prftcntr_id=pid); RETURN pid; END; $_$; ALTER FUNCTION public.deleteprofitcenter(integer) OWNER TO admin; -- -- Name: deleteproject(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteproject(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrjid ALIAS FOR $1; _result INTEGER; BEGIN SELECT quhead_id INTO _result FROM quhead WHERE (quhead_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; SELECT cohead_id INTO _result FROM cohead WHERE (cohead_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; SELECT wo_id INTO _result FROM wo WHERE (wo_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT pr_id INTO _result FROM pr WHERE (pr_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT poitem_id INTO _result FROM poitem WHERE (poitem_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; SELECT invchead_id INTO _result FROM invchead WHERE (invchead_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; DELETE FROM comment WHERE ((comment_source='J') AND (comment_source_id=pPrjid)); DELETE FROM comment WHERE ((comment_source='TA') AND (comment_source_id IN ( SELECT prjtask_id FROM prjtask WHERE (prjtask_prj_id=pPrjId)))); DELETE FROM prjtask WHERE (prjtask_prj_id=pPrjid); UPDATE prj SET prj_recurring_prj_id=null WHERE(prj_recurring_prj_id=pPrjid); DELETE FROM prj WHERE (prj_id=pPrjid); RETURN pPrjid; END; $_$; ALTER FUNCTION public.deleteproject(integer) OWNER TO admin; -- -- Name: deleteprojecttask(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteprojecttask(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrjtaskid ALIAS FOR $1; _row RECORD; _result INTEGER; BEGIN SELECT * INTO _row FROM prjtask WHERE (prjtask_id=pPrjtaskid) LIMIT 1; IF (NOT FOUND) THEN RETURN -1; END IF; IF (COALESCE(_row.prjtask_hours_actual, 0.0) > 0.0) THEN RETURN -2; END IF; IF (COALESCE(_row.prjtask_exp_actual, 0.0) > 0.0) THEN RETURN -3; END IF; DELETE FROM comment WHERE ((comment_source='TA') AND (comment_source_id=pPrjtaskid)); DELETE FROM prjtask WHERE (prjtask_id=pPrjtaskid); RETURN 0; END; $_$; ALTER FUNCTION public.deleteprojecttask(integer) OWNER TO admin; -- -- Name: deleteqryhead(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteqryhead(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pqryheadid ALIAS FOR $1; BEGIN DELETE FROM qryitem WHERE (qryitem_qryhead_id=pqryheadid); DELETE FROM qryhead WHERE (qryhead_id=pqryheadid); RETURN pqryheadid; END; $_$; ALTER FUNCTION public.deleteqryhead(integer) OWNER TO admin; -- -- Name: deletequote(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletequote(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pQuoteNumber ALIAS FOR $2; _quNumberScheme TEXT; _quoteNumber TEXT; _quitemid INTEGER; _result INTEGER; BEGIN SELECT fetchMetricText('QUNumberGeneration') INTO _quNumberScheme; IF (pQuoteNumber IS NULL) THEN SELECT quhead_number INTO _quoteNumber FROM quhead WHERE (quhead_id=pQuheadid); ELSE _quoteNumber := pQuoteNumber; END IF; DELETE FROM quitem WHERE (quitem_quhead_id=pQuheadid); DELETE FROM quhead WHERE (quhead_id=pQuheadid); IF (_quoteNumber IS NOT NULL) THEN IF (_quNumberScheme IN ('A', 'O')) THEN -- do not release quote # if quote converted to sales order IF (NOT EXISTS (SELECT cohead_id FROM cohead WHERE (cohead_number=_quoteNumber))) THEN _result = releaseQuNumber(_quoteNumber); END IF; ELSEIF (_quNumberScheme = 'S') THEN _result = releaseSoNumber(_quoteNumber); END IF; END IF; -- Don't care about result of release number RETURN 0; END; $_$; ALTER FUNCTION public.deletequote(integer, text) OWNER TO admin; -- -- Name: deletequote(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletequote(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; BEGIN RETURN deleteQuote(pQuheadid, NULL::TEXT); END; $_$; ALTER FUNCTION public.deletequote(integer) OWNER TO admin; -- -- Name: deletequote(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletequote(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pQuoteNumber ALIAS FOR $2; BEGIN RETURN deleteQuote(pQuheadid, pQuoteNumber::TEXT); END; $_$; ALTER FUNCTION public.deletequote(integer, integer) OWNER TO admin; -- -- Name: deleterecvfororder(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleterecvfororder(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderid ALIAS FOR $2; BEGIN DELETE FROM recv USING orderitem WHERE ((recv_orderitem_id=orderitem_id) AND (recv_order_type=orderitem_orderhead_type) AND (NOT recv_posted) AND (orderitem_orderhead_id=porderid) AND (orderitem_orderhead_type=pordertype)); RETURN 0; END; $_$; ALTER FUNCTION public.deleterecvfororder(text, integer) OWNER TO admin; -- -- Name: deletesalescategory(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletesalescategory(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalescatid ALIAS FOR $1; BEGIN PERFORM invcitem_salescat_id FROM invchead, invcitem WHERE ( (invcitem_invchead_id=invchead_id) AND (NOT invchead_posted) AND (invcitem_salescat_id=pSalescatid) ); IF (FOUND) THEN RETURN -1; END IF; PERFORM invcitem_salescat_id FROM invchead, invcitem WHERE ( (invcitem_invchead_id=invchead_id) AND (invchead_posted) AND (invcitem_salescat_id=pSalescatid) ); IF (FOUND) THEN RETURN -2; END IF; PERFORM aropen_salescat_id FROM aropen WHERE (aropen_salescat_id=pSalescatid); IF (FOUND) THEN RETURN -3; END IF; DELETE FROM salescat WHERE (salescat_id=pSalescatid); RETURN 0; END; $_$; ALTER FUNCTION public.deletesalescategory(integer) OWNER TO admin; -- -- Name: deleteshippingcharge(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteshippingcharge(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipchrgid ALIAS FOR $1; BEGIN IF EXISTS(SELECT 1 FROM custinfo WHERE (cust_shipchrg_id=pShipchrgid)) THEN RETURN -1; END IF; DELETE FROM shipchrg WHERE (shipchrg_id=pShipchrgid); RETURN pShipchrgid; END; $_$; ALTER FUNCTION public.deleteshippingcharge(integer) OWNER TO admin; -- -- Name: deleteshippingchargetype(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteshippingchargetype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipchrgid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if the passed shipchrg is used as a default for any customers SELECT cust_id INTO _check FROM custinfo WHERE (cust_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Check to see if the passed shipchrg is used as a default for any shiptos SELECT shipto_id INTO _check FROM shiptoinfo WHERE (shipto_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to see if the passed shipchrg is used on any sales orders SELECT cohead_id INTO _check FROM cohead WHERE (cohead_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to see if the passed shipchrg is used on any shippers SELECT shiphead_id INTO _check FROM shiphead WHERE (shiphead_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; -- Check to see if the passed shipchrg is used on any invoices SELECT invchead_id INTO _check FROM invchead WHERE (invchead_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; -- Delete the passed shipchrg DELETE FROM shipchrg WHERE (shipchrg_id=pShipchrgid); RETURN pShipchrgid; END; $_$; ALTER FUNCTION public.deleteshippingchargetype(integer) OWNER TO admin; -- -- Name: deleteshipto(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteshipto(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShiptoid ALIAS FOR $1; BEGIN PERFORM asohist_id FROM asohist WHERE (asohist_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; PERFORM cohead_id FROM cohead WHERE (cohead_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; PERFORM cmhead_id FROM cmhead WHERE (cmhead_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; PERFORM cohist_id FROM cohist WHERE (cohist_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; PERFORM quhead_id FROM quhead WHERE (quhead_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; PERFORM invchead_id FROM invchead WHERE (invchead_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; DELETE FROM ipsass WHERE (ipsass_shipto_id=pShiptoid); DELETE FROM shiptoinfo WHERE (shipto_id=pShiptoid); RETURN 0; END; $_$; ALTER FUNCTION public.deleteshipto(integer) OWNER TO admin; -- -- Name: deleteso(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteso(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; BEGIN RETURN deleteSo(pSoheadid, NULL); END; $_$; ALTER FUNCTION public.deleteso(integer) OWNER TO admin; -- -- Name: deleteso(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteso(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pSonumber ALIAS FOR $2; _r RECORD; _coitemid INTEGER; _result INTEGER; _poStatus INTEGER := 0; BEGIN -- Get cohead SELECT * INTO _r FROM cohead WHERE (cohead_id=pSoheadid); IF (NOT FOUND) THEN RETURN 0; END IF; -- Cannot delete if credit card payments IF (EXISTS(SELECT ccpay_id FROM ccpay, payco WHERE ((ccpay_status IN ('C')) AND (ccpay_id=payco_ccpay_id) AND (payco_cohead_id=pSoheadid)))) THEN RETURN -1; END IF; -- Cannot delete if credit card history IF (EXISTS(SELECT ccpay_id FROM ccpay, payco WHERE ((ccpay_status != 'C') AND (ccpay_id=payco_ccpay_id) AND (payco_cohead_id=pSoheadid)))) THEN RETURN -2; END IF; -- Delete Sales Order Items FOR _coitemid IN SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=pSoheadid) AND (coitem_subnumber=0) ) LOOP SELECT deleteSoItem(_coitemid) INTO _result; IF (_result < 0) THEN IF (_result = -20) THEN _poStatus := _poStatus - 1; ELSE RETURN _result; END IF; END IF; END LOOP; DELETE FROM pack WHERE (pack_head_id=pSoheadid and pack_head_type = 'SO'); DELETE FROM cohead WHERE (cohead_id=pSoheadid); IF (fetchMetricBool('AutoCreateProjectsForOrders')) THEN PERFORM deleteProject(_r.cohead_prj_id); END IF; DELETE FROM aropenalloc WHERE ((aropenalloc_doctype='S') AND (aropenalloc_doc_id=pSoheadid)); IF (COALESCE(pSonumber,'') != '') THEN _result = releaseSoNumber(pSonumber); ELSEIF (_r.cohead_number IS NOT NULL) THEN _result = releaseSoNumber(_r.cohead_number); END IF; IF (_poStatus < 0) THEN RETURN -20; ELSE RETURN 0; END IF; END; $_$; ALTER FUNCTION public.deleteso(integer, text) OWNER TO admin; -- -- Name: deletesoitem(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletesoitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; _r RECORD; _s RECORD; _result INTEGER; _deletePO INTEGER := 0; _recvId INTEGER := -1; _poStatus TEXT; _jobItem BOOLEAN; BEGIN -- Get coitem SELECT * INTO _r FROM coitem WHERE (coitem_id=pSoitemid); IF (NOT FOUND) THEN RETURN -999; END IF; -- Cannot delete if shipped IF (_r.coitem_qtyshipped > 0) THEN RETURN -101; END IF; -- Cannot delete if issued to shipping SELECT shipitem_id INTO _result FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id AND shiphead_order_type='SO') WHERE (shipitem_orderitem_id=pSoitemid) LIMIT 1; IF (FOUND) THEN RETURN -102; END IF; -- Cannot delete if returned IF (fetchMetricBool('MultiWhs')) THEN SELECT raitem_id INTO _result FROM raitem WHERE ( (raitem_orig_coitem_id=pSoitemid) OR (raitem_new_coitem_id=pSoitemid) ) LIMIT 1; IF (FOUND) THEN RETURN -103; END IF; END IF; -- Cannot delete if any inventory history SELECT invhist_id INTO _result FROM invhist WHERE ( (invhist_ordnumber=formatSoNumber(pSoitemid)) AND (invhist_ordtype='SO') ) LIMIT 1; IF (FOUND) THEN RETURN -105; END IF; -- If Kit, check deletion of component items IF (_r.coitem_subnumber = 0) THEN FOR _s IN SELECT * FROM coitem WHERE ((coitem_cohead_id = _r.coitem_cohead_id) AND (coitem_linenumber = _r.coitem_linenumber) AND (coitem_subnumber > 0)) LOOP IF ((COALESCE(_s.coitem_order_id, -1) > 0) AND (_s.coitem_order_type = 'P')) THEN SELECT poitem_status, COALESCE(recv_id, -1) INTO _poStatus, _recvId FROM poitem LEFT OUTER JOIN recv ON ((recv_orderitem_id=poitem_id) AND (recv_order_type='PO')) WHERE (poitem_id = _s.coitem_order_id); IF ((_recvId > 0) OR (_poStatus = 'C')) THEN RETURN -10; ELSIF ((_recvId = -1) AND (_poStatus = 'O')) THEN _deletePO := _deletePO - 1; END IF; END IF; END LOOP; END IF; SELECT (itemsite_costmethod='J') INTO _jobItem FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE (coitem_id=pSoitemid); IF (_jobItem AND _r.coitem_order_type='W') THEN -- Delete associated Job Work Order SELECT deleteWo(_r.coitem_order_id, TRUE, TRUE) INTO _result; IF (_result < 0) THEN RETURN -104; END IF; ELSIF (_r.coitem_order_type='W') THEN -- Delete associated Job Work Order SELECT deleteWo(_r.coitem_order_id, TRUE) INTO _result; IF (_result < 0) THEN -- Cannot delete so break association PERFORM changeWoProject(_r.coitem_order_id, -1, TRUE); END IF; ELSIF (_r.coitem_order_type='R') THEN -- Delete associated Purchase Request PERFORM deletePr(_r.coitem_order_id); ELSIF (_r.coitem_order_type='P') THEN -- Delete associated Purchase Order Item SELECT deletepoitem(_r.coitem_order_id) INTO _result; IF ((_result < 0) AND (_result <> -20)) THEN RETURN _result; ELSIF (_result = -20) THEN _deletePO := _deletePO - 1; END IF; END IF; -- Delete the coitem DELETE FROM coitem WHERE (coitem_id=pSoitemid); IF (_deletePO < 0) THEN RETURN -20; ELSE RETURN 0; END IF; END; $_$; ALTER FUNCTION public.deletesoitem(integer) OWNER TO admin; -- -- Name: deletestandardjournal(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletestandardjournal(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; BEGIN DELETE FROM stdjrnlitem WHERE (stdjrnlitem_stdjrnl_id=pStdjrnlid); DELETE FROM stdjrnlgrpitem WHERE (stdjrnlgrpitem_stdjrnl_id=pStdjrnlid); DELETE FROM stdjrnl WHERE (stdjrnl_id=pStdjrnlid); RETURN 1; END; $_$; ALTER FUNCTION public.deletestandardjournal(integer) OWNER TO admin; -- -- Name: deletestandardjournalgroup(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletestandardjournalgroup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlgrpid ALIAS FOR $1; BEGIN DELETE FROM stdjrnlgrpitem WHERE (stdjrnlgrpitem_stdjrnlgrp_id=pStdjrnlgrpid); DELETE FROM stdjrnlgrp WHERE (stdjrnlgrp_id=pStdjrnlgrpid); RETURN 1; END; $_$; ALTER FUNCTION public.deletestandardjournalgroup(integer) OWNER TO admin; -- -- Name: deletesubaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletesubaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pid ALIAS FOR $1; BEGIN IF (EXISTS(SELECT accnt_id FROM accnt, subaccnt WHERE ((accnt_company=subaccnt_number) AND (subaccnt_id=pid)) )) THEN RETURN -1; END IF; DELETE FROM subaccnt WHERE (subaccnt_id=pid); RETURN pid; END; $_$; ALTER FUNCTION public.deletesubaccount(integer) OWNER TO admin; -- -- Name: deletesubaccounttype(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletesubaccounttype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSubAccntTypeid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if the passed subaccnttype is used in any accounts SELECT accnt_id INTO _check FROM accnt, subaccnttype WHERE ( (accnt_subaccnttype_code=subaccnttype_code) AND (subaccnttype_id=pSubAccntTypeid) ) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the Sub Account Type DELETE FROM subaccnttype WHERE (subaccnttype_id=pSubAccntTypeid); RETURN 0; END; $_$; ALTER FUNCTION public.deletesubaccounttype(integer) OWNER TO admin; -- -- Name: deletetax(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletetax(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptaxid ALIAS FOR $1; BEGIN -- these checks allow nice error reporting instead of throwing an SQL error IF EXISTS(SELECT taxass_id FROM taxass WHERE (taxass_tax_id=ptaxid)) THEN RETURN -10; END IF; IF EXISTS(SELECT taxhist_id FROM taxhist WHERE (taxhist_tax_id=ptaxid)) THEN RETURN -20; END IF; DELETE FROM taxrate WHERE (taxrate_tax_id = ptaxid); DELETE FROM tax WHERE (tax_id = ptaxid); RETURN ptaxid; END; $_$; ALTER FUNCTION public.deletetax(integer) OWNER TO admin; -- -- Name: deletetaxclass(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletetaxclass(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxclassid ALIAS FOR $1; _result INTEGER; BEGIN -- Check to find if the tax class is used in any tax code SELECT tax_id INTO _result FROM tax WHERE (tax_taxclass_id = pTaxclassid); IF (FOUND) THEN RETURN -1; END IF; -- Delete the tax class if the above condition doesn't match DELETE FROM taxclass WHERE taxclass_id = pTaxclassid ; RETURN pTaxclassid; END; $_$; ALTER FUNCTION public.deletetaxclass(integer) OWNER TO admin; -- -- Name: deletetaxtype(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletetaxtype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxtypeid ALIAS FOR $1; _result INTEGER; BEGIN SELECT taxtype_id INTO _result FROM taxtype WHERE ((taxtype_sys) AND (taxtype_id=pTaxtypeid)); IF (FOUND) THEN RETURN -1; END IF; SELECT taxass_id INTO _result FROM taxass WHERE (taxass_taxtype_id=pTaxtypeid); IF (FOUND) THEN RETURN -2; END IF; SELECT taxhist_id INTO _result FROM taxhist WHERE (taxhist_taxtype_id=pTaxtypeid); IF (FOUND) THEN RETURN -3; END IF; DELETE FROM taxtype WHERE (taxtype_id=pTaxtypeid); RETURN pTaxtypeid; END; $_$; ALTER FUNCTION public.deletetaxtype(integer) OWNER TO admin; -- -- Name: deletetaxzone(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletetaxzone(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxzoneid ALIAS FOR $1; _result INTEGER; BEGIN -- Check to find if the tax zone is used in any tax assignment SELECT taxass_id INTO _result FROM taxass WHERE (taxass_taxzone_id=pTaxzoneid); IF (FOUND) THEN RETURN -1; END IF; -- Check to find if the tax zone has been referenced in any tax registration SELECT taxreg_id INTO _result FROM taxreg WHERE (taxreg_taxzone_id=pTaxzoneid); IF (FOUND) THEN RETURN -2; END IF; -- Delete the tax zone if none of the above conditions match DELETE FROM taxzone WHERE taxzone_id = pTaxzoneid ; RETURN pTaxzoneid; END; $_$; ALTER FUNCTION public.deletetaxzone(integer) OWNER TO admin; -- -- Name: deletetodoitem(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletetodoitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoItemId ALIAS FOR $1; BEGIN DELETE FROM alarm WHERE ( (alarm_source='TODO') AND (alarm_source_id=ptodoItemId) ); DELETE FROM todoitem WHERE todoitem_id = ptodoItemId; RETURN 0; END; $_$; ALTER FUNCTION public.deletetodoitem(integer) OWNER TO admin; -- -- Name: deleteunusedclasscodes(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteunusedclasscodes() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN DELETE FROM classcode WHERE (classcode_id NOT IN (SELECT DISTINCT item_classcode_id FROM item)); RETURN 0; END; $$; ALTER FUNCTION public.deleteunusedclasscodes() OWNER TO admin; -- -- Name: deleteunusedfreightclasses(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteunusedfreightclasses() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN DELETE FROM freightclass WHERE (freightclass_id NOT IN (SELECT DISTINCT COALESCE(item_freightclass_id, 0) FROM item)); RETURN 0; END; $$; ALTER FUNCTION public.deleteunusedfreightclasses() OWNER TO admin; -- -- Name: deleteunusedproductcategories(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteunusedproductcategories() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Delete any associated records DELETE FROM salesaccnt WHERE ( (salesaccnt_prodcat_id <> -1) AND (salesaccnt_prodcat_id NOT IN (SELECT DISTINCT item_prodcat_id FROM item)) ); DELETE FROM prodcat WHERE (prodcat_id NOT IN (SELECT DISTINCT item_prodcat_id FROM item)); RETURN 0; END; $$; ALTER FUNCTION public.deleteunusedproductcategories() OWNER TO admin; -- -- Name: deleteuom(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteuom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUomid ALIAS FOR $1; BEGIN DELETE FROM uomconv WHERE uomconv_from_uom_id=pUomid; DELETE FROM uomconv WHERE uomconv_to_uom_id=pUomid; DELETE FROM uom WHERE uom_id=pUomid; RETURN 0; END; $_$; ALTER FUNCTION public.deleteuom(integer) OWNER TO admin; -- -- Name: deleteuomconv(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteuomconv(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUomconvid ALIAS FOR $1; BEGIN DELETE FROM uomconv WHERE uomconv_id=pUomconvid; RETURN 0; END; $_$; ALTER FUNCTION public.deleteuomconv(integer) OWNER TO admin; -- -- Name: deleteurl(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteurl(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ declare pId ALIAS FOR $1; begin delete from urlinfo where ( url_id in ( select url_id from urlinfo join docass on (docass_target_id=url_id) and (docass_target_type='URL') where ( docass_id = pId ) ) ); delete from docass where docass_id = pId; return true; end; $_$; ALTER FUNCTION public.deleteurl(integer) OWNER TO admin; -- -- Name: deleteuserpreference(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteuserpreference(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrefname ALIAS FOR $1; _return BOOLEAN; BEGIN SELECT deleteUserPreference(getEffectiveXtUser(), pPrefname) INTO _return; RETURN _return; END; $_$; ALTER FUNCTION public.deleteuserpreference(text) OWNER TO admin; -- -- Name: deleteuserpreference(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deleteuserpreference(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrefname ALIAS FOR $2; BEGIN DELETE FROM usrpref WHERE ( (usrpref_username=pUsername) AND (usrpref_name=pPrefname) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.deleteuserpreference(text, text) OWNER TO admin; -- -- Name: deletevendoraddress(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletevendoraddress(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendaddrid ALIAS FOR $1; _test INTEGER; BEGIN -- Check to see if the passed vendor address is used in pohead SELECT pohead_id INTO _test FROM pohead WHERE (pohead_vendaddr_id=pVendaddrid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the passed vendor address DELETE FROM vendaddrinfo WHERE (vendaddr_id=pVendaddrid); RETURN 0; END; $_$; ALTER FUNCTION public.deletevendoraddress(integer) OWNER TO admin; -- -- Name: deletevendortype(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletevendortype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendtypeid ALIAS FOR $1; _test INTEGER; BEGIN -- Check to see if the passed vendor type is used in vendinfo SELECT vend_id INTO _test FROM vendinfo WHERE (vend_vendtype_id=pVendtypeid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the passed vendor type DELETE FROM vendtype WHERE (vendtype_id=pVendtypeid); RETURN 0; END; $_$; ALTER FUNCTION public.deletevendortype(integer) OWNER TO admin; -- -- Name: deletewo(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; deleteChildren ALIAS FOR $2; BEGIN RETURN deleteWo(pWoid, deleteChildren, FALSE); END; $_$; ALTER FUNCTION public.deletewo(integer, boolean) OWNER TO admin; -- -- Name: deletewo(integer, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletewo(integer, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; deleteChildren ALIAS FOR $2; deleteForce ALIAS FOR $3; woStatus CHAR(1); itemType CHAR(1); ordtype CHAR(1); ordid INTEGER; returnCode INTEGER; _wotcCnt INTEGER; _routings BOOLEAN; BEGIN SELECT wo_status, wo_ordtype, wo_ordid, item_type INTO woStatus, ordtype, ordid, itemType FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE (wo_id=pWoid); IF (NOT woStatus IN ('O', 'E', 'C')) THEN RETURN -3; END IF; IF (NOT deleteForce) THEN IF (itemType = 'J') THEN RETURN -2; END IF; END IF; SELECT fetchMetricBool('Routings') INTO _routings; IF _routings THEN SELECT count(*) INTO _wotcCnt FROM xtmfg.wotc WHERE (wotc_wo_id=pWoid); IF (_wotcCnt > 0) THEN RETURN -1; END IF; END IF; IF (woStatus = 'R') THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', wo_id, itemsite_warehous_id, formatWoNumber(wo_id) FROM evntnot, evnttype, itemsite, item, wo WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (evnttype_name='RWoRequestCancel') AND (wo_id=pWoid) ); RETURN 0; ELSE IF (woStatus = 'E') THEN returnCode := (SELECT implodeWo(pWoid, FALSE)); END IF; END IF; IF (woStatus IN ('O', 'E', 'C')) THEN DELETE FROM womatl WHERE (womatl_wo_id=pWoid); IF _routings THEN DELETE FROM xtmfg.wooper WHERE (wooper_wo_id=pWoid); END IF; IF (ordtype = 'S') THEN UPDATE coitem SET coitem_order_type=NULL, coitem_order_id=NULL WHERE coitem_id=ordid; END IF; DELETE FROM wo WHERE (wo_id=pWoid); END IF; IF (deleteChildren) THEN returnCode := (SELECT MAX(deleteWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.deletewo(integer, boolean, boolean) OWNER TO admin; -- -- Name: deletewomaterial(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION deletewomaterial(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; BEGIN UPDATE wo SET wo_adhoc=TRUE FROM womatl WHERE ((womatl_wo_id=wo_id) AND (womatl_id=pWomatlid)); -- Delete any created P/R for this Womatl PERFORM deletePr('W', pWomatlid); DELETE FROM womatl WHERE (womatl_id=pWomatlid); RETURN 0; END; $_$; ALTER FUNCTION public.deletewomaterial(integer) OWNER TO admin; -- -- Name: detachccpayfromso(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION detachccpayfromso(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcoheadid ALIAS FOR $1; pwarehousid ALIAS FOR $2; pcustid ALIAS FOR $3; BEGIN RAISE NOTICE 'detachCCPayFromSO(INTEGER, INTEGER, INTEGER): deprecated'; RETURN 0; END; $_$; ALTER FUNCTION public.detachccpayfromso(integer, integer, integer) OWNER TO admin; -- -- Name: detachcontact(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION detachcontact(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcntctId ALIAS FOR $1; pcrmacctId ALIAS FOR $2; BEGIN UPDATE cntct SET cntct_crmacct_id = NULL WHERE cntct_id = pcntctId AND cntct_crmacct_id = pcrmacctId; UPDATE crmacct SET crmacct_cntct_id_1 = NULL WHERE crmacct_id = pcrmacctId AND crmacct_cntct_id_1 = pcntctId; UPDATE crmacct SET crmacct_cntct_id_2 = NULL WHERE crmacct_id = pcrmacctId AND crmacct_cntct_id_2 = pcntctId; RETURN 0; END; $_$; ALTER FUNCTION public.detachcontact(integer, integer) OWNER TO admin; -- -- Name: detag(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION detag(text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; _result TEXT := ''; BEGIN SELECT regexp_replace(pSource, E'<[^>]*>', '', 'g') INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.detag(text) OWNER TO admin; -- -- Name: detailednnqoh(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION detailednnqoh(integer, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pABS ALIAS FOR $2; _qoh NUMERIC; BEGIN IF (pABS) THEN SELECT SUM(noNeg(itemloc_qty)) INTO _qoh FROM itemloc, location WHERE ( (itemloc_location_id=location_id) AND (NOT location_netable) AND (itemloc_itemsite_id=pItemsiteid) ); ELSE SELECT SUM(itemloc_qty) INTO _qoh FROM itemloc, location WHERE ( (itemloc_location_id=location_id) AND (NOT location_netable) AND (itemloc_itemsite_id=pItemsiteid) ); END IF; IF (_qoh IS NULL) THEN _qoh := 0; END IF; RETURN _qoh; END; $_$; ALTER FUNCTION public.detailednnqoh(integer, boolean) OWNER TO admin; -- -- Name: detailedqoh(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION detailedqoh(integer, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pABS ALIAS FOR $2; _qoh NUMERIC; BEGIN IF (pABS) THEN SELECT SUM(noNeg(itemloc_qty)) INTO _qoh FROM itemloc LEFT OUTER JOIN location ON (itemloc_location_id=location_id) WHERE ( ( (location_id IS NULL) OR (location_netable) ) AND (itemloc_itemsite_id=pItemsiteid) ); ELSE SELECT SUM(itemloc_qty) INTO _qoh FROM itemloc LEFT OUTER JOIN location ON (itemloc_location_id=location_id) WHERE ( ( (location_id IS NULL) OR (location_netable) ) AND (itemloc_itemsite_id=pItemsiteid) ); END IF; IF (_qoh IS NULL) THEN _qoh := 0; END IF; RETURN _qoh; END; $_$; ALTER FUNCTION public.detailedqoh(integer, boolean) OWNER TO admin; -- -- Name: determinediscountdate(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION determinediscountdate(integer, date) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTermsid ALIAS FOR $1; pSourceDate ALIAS FOR $2; _discDate DATE; _p RECORD; BEGIN SELECT terms_type, terms_discdays, terms_cutoffday INTO _p FROM terms WHERE (terms_id=pTermsid); IF (NOT FOUND) THEN _discDate := pSourceDate; -- Handle type D terms ELSIF (_p.terms_type = 'D') THEN _discDate := (pSourceDate + _p.terms_discdays); -- Handle type P terms ELSIF (_p.terms_type = 'P') THEN IF (date_part('day', pSourceDate) <= _p.terms_cutoffday) THEN _discDate := (DATE(date_trunc('month', pSourceDate)) + (_p.terms_discdays - 1)); ELSE _discDate := (DATE(date_trunc('month', pSourceDate)) + (_p.terms_discdays - 1) + INTERVAL '1 month'); END IF; -- Handle unknown terms ELSE _discDate := pSourceDate; END IF; RETURN _discDate; END; $_$; ALTER FUNCTION public.determinediscountdate(integer, date) OWNER TO admin; -- -- Name: determineduedate(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION determineduedate(integer, date) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTermsid ALIAS FOR $1; pSourceDate ALIAS FOR $2; _dueDate DATE; _p RECORD; BEGIN SELECT terms_type, terms_duedays, terms_cutoffday INTO _p FROM terms WHERE (terms_id=pTermsid); IF (NOT FOUND) THEN _dueDate := pSourceDate; -- Handle type D terms ELSIF (_p.terms_type = 'D') THEN _dueDate := (pSourceDate + _p.terms_duedays); -- Handle type P terms ELSIF (_p.terms_type = 'P') THEN IF (date_part('day', pSourceDate) <= _p.terms_cutoffday) THEN _dueDate := (DATE(date_trunc('month', pSourceDate)) + (_p.terms_duedays - 1)); ELSE _dueDate := (DATE(date_trunc('month', pSourceDate)) + (_p.terms_duedays - 1) + INTERVAL '1 month'); END IF; -- Handle unknown terms ELSE _dueDate := pSourceDate; END IF; RETURN _dueDate; END; $_$; ALTER FUNCTION public.determineduedate(integer, date) OWNER TO admin; -- -- Name: digest(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION digest(text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_digest'; ALTER FUNCTION public.digest(text, text) OWNER TO admin; -- -- Name: digest(bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION digest(bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_digest'; ALTER FUNCTION public.digest(bytea, text) OWNER TO admin; -- -- Name: disablepackage(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION disablepackage(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgname ALIAS FOR $1; _i INTEGER := 0; _tabs TEXT[] := ARRAY['cmd', 'cmdarg', 'image', 'metasql', 'priv', 'report', 'script', 'uiform']; BEGIN IF (version() < 'PostgreSQL 8.2') THEN RETURN -1; END IF; FOR _i IN ARRAY_LOWER(_tabs,1)..ARRAY_UPPER(_tabs,1) LOOP EXECUTE 'ALTER TABLE ' || ppkgname || '.pkg' || _tabs[_i] || ' NO INHERIT public.' || _tabs[_i] || ';'; END LOOP; RETURN 0; END; $_$; ALTER FUNCTION public.disablepackage(text) OWNER TO admin; -- -- Name: disablepackage(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION disablepackage(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgheadid ALIAS FOR $1; _pkgname TEXT; BEGIN SELECT pkghead_name INTO _pkgname FROM pkghead WHERE (pkghead_id=ppkgheadid); IF (NOT FOUND) THEN RETURN -2; END IF; RETURN disablePackage(_pkgname); END; $_$; ALTER FUNCTION public.disablepackage(integer) OWNER TO admin; -- -- Name: distributeitemlocseries(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION distributeitemlocseries(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocSeries ALIAS FOR $1; _distCounter INTEGER; _itemlocdist RECORD; _itemlocid INTEGER; _invhistid INTEGER; _check BOOLEAN; _debug BOOLEAN := true; BEGIN IF (_debug) THEN RAISE NOTICE 'distributeItemlocSeries, series=%', pItemlocSeries; END IF; _distCounter := 0; -- March through all of the itemlocdists for pItemlocSeries FOR _itemlocdist IN SELECT itemlocdist_id AS itemlocdistid, itemlocdist_source_type AS type, itemlocdist_source_id AS sourceid, itemlocdist_qty AS qty, itemlocdist_itemsite_id AS itemsiteid, itemsite_freeze, itemlocdist_invhist_id AS invhistid, itemlocdist_ls_id AS lotserialid, itemlocdist_expiration AS expiration, itemlocdist_flush, itemlocdist_warranty AS warranty, itemlocdist_series AS series FROM itemlocdist, itemsite WHERE ( (itemlocdist_itemsite_id=itemsite_id) AND (itemlocdist_series=pItemlocSeries) ) ORDER BY itemlocdist_flush DESC LOOP _distCounter := _distCounter + 1; IF (_debug) THEN RAISE NOTICE 'itemlocdist loop %', _distCounter; RAISE NOTICE 'itemlocdistid=%', _itemlocdist.itemlocdistid; RAISE NOTICE 'type=%', _itemlocdist.type; RAISE NOTICE 'sourceid=%', _itemlocdist.sourceid; RAISE NOTICE 'qty=%', _itemlocdist.qty; RAISE NOTICE 'itemsiteid=%', _itemlocdist.itemsiteid; RAISE NOTICE 'freeze=%', _itemlocdist.itemsite_freeze; RAISE NOTICE 'invhistid=%', _itemlocdist.invhistid; RAISE NOTICE 'lotserialid=%', _itemlocdist.lotserialid; RAISE NOTICE 'expiration=%', _itemlocdist.expiration; RAISE NOTICE 'flush=%', _itemlocdist.itemlocdist_flush; RAISE NOTICE 'warranty=%', _itemlocdist.warranty; END IF; -- Commit invhist to itemsite IF (NOT _itemlocdist.itemsite_freeze) THEN PERFORM postInvHist(_itemlocdist.invhistid); END IF; -- Mark the invhist tuple for the itemlocdist in question as having detail UPDATE invhist SET invhist_hasdetail=TRUE WHERE ( (NOT invhist_hasdetail) AND (invhist_id=_itemlocdist.invhistid) ); -- If this itemlocdist is a flush, write a invdetail tuple that records the empty IF (_itemlocdist.itemlocdist_flush) THEN INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc ) SELECT _itemlocdist.invhistid, itemloc_location_id, itemloc_ls_id, (itemloc_qty * -1), itemloc_qty, 0, itemloc_expiration, _itemlocdist.warranty FROM itemloc WHERE ( (itemloc_qty <> 0) AND (itemloc_id=_itemlocdist.sourceid) ); -- Delete the flushed itemloc if its parent itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN DELETE FROM itemloc WHERE (itemloc_id=_itemlocdist.sourceid); END IF; ELSE -- If this is a location type distribution, check to see if the target itemloc -- already exists IF (_itemlocdist.type = 'L') THEN SELECT itemloc_id INTO _itemlocid FROM itemloc WHERE ( (itemloc_itemsite_id=_itemlocdist.itemsiteid) AND (itemloc_location_id=_itemlocdist.sourceid) AND (COALESCE(itemloc_ls_id,-1)=COALESCE(_itemlocdist.lotserialid,-1)) AND (COALESCE(itemloc_expiration,endOfTime())=COALESCE(_itemlocdist.expiration,endOfTime())) AND (COALESCE(itemloc_warrpurc,endoftime())=COALESCE(_itemlocdist.warranty,endoftime())) ); -- Nope, create it IF (NOT FOUND) THEN SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _itemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_qty, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc ) VALUES ( _itemlocid, _itemlocdist.itemsiteid, _itemlocdist.sourceid, 0, _itemlocdist.lotserialid, _itemlocdist.expiration, _itemlocdist.warranty ); END IF; ELSE _itemlocid = _itemlocdist.sourceid; IF (_itemlocid IS NOT NULL AND (SELECT count(itemloc_id) = 0 FROM itemloc WHERE itemloc_id=_itemlocid)) THEN RAISE EXCEPTION 'No record to distribute against. Someone else may have already distributed this record.'; END IF; END IF; -- Record the invdetail INSERT INTO invdetail (invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc) SELECT _itemlocdist.invhistid, itemloc_location_id, _itemlocdist.lotserialid, _itemlocdist.qty, itemloc_qty, (itemloc_qty + _itemlocdist.qty), itemloc_expiration,_itemlocdist.warranty FROM itemloc WHERE (itemloc_id=_itemlocid); -- Update the itemloc_qty if its parent itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN UPDATE itemloc SET itemloc_qty = (itemloc_qty + _itemlocdist.qty) WHERE (itemloc_id=_itemlocid); END IF; -- Adjust QOH if this itemlocdist is to/from a non-netable location IF ( SELECT (NOT location_netable) FROM itemloc, location WHERE ( (itemloc_location_id=location_id) AND (itemloc_id=_itemlocid) ) ) THEN -- Record the netable->non-netable (or visaveras) invhist SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT _invhistid, itemsite_id, 'NN', (_itemlocdist.qty * -1), itemsite_qtyonhand, (itemsite_qtyonhand - _itemlocdist.qty), invhist_docnumber, invhist_comments, uom_name, stdCost(item_id), itemsite_costmethod, itemsite_value, (itemsite_value + (_itemlocdist.qty * -1 * CASE WHEN(itemsite_costmethod='A') THEN avgcost(itemsite_id) ELSE stdCost(itemsite_item_id) END)), _itemlocdist.series FROM item, itemsite, invhist, uom WHERE ((itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=_itemlocdist.itemsiteid) AND (invhist_id=_itemlocdist.invhistid)); -- Adjust the parent itemsite IF (NOT _itemlocdist.itemsite_freeze) THEN UPDATE itemsite SET itemsite_qtyonhand = (itemsite_qtyonhand - _itemlocdist.qty), itemsite_nnqoh = (itemsite_nnqoh + _itemlocdist.qty) FROM itemloc WHERE ((itemloc_itemsite_id=itemsite_id) AND (itemloc_id=_itemlocid)); END IF; END IF; END IF; -- If, after the distribution, the target itemloc_qty = 0, delete the itemloc -- if its parent itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN DELETE FROM itemloc WHERE ( (itemloc_qty=0) AND (itemloc_id=_itemlocid) ); END IF; END LOOP; DELETE FROM itemlocdist WHERE (itemlocdist_series=pItemlocSeries); RETURN _distCounter; END; $_$; ALTER FUNCTION public.distributeitemlocseries(integer) OWNER TO admin; -- -- Name: distributetodefault(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION distributetodefault(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; BEGIN RETURN distributeToDefault(pItemlocdistid, 'O'); END; $_$; ALTER FUNCTION public.distributetodefault(integer) OWNER TO admin; -- -- Name: distributetodefault(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION distributetodefault(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; pTranstype ALIAS FOR $2; _locationid INTEGER; _itemlocdistid INTEGER; _qty NUMERIC; BEGIN -- Make sure that the itemsite in question has a default location SELECT CASE WHEN (pTranstype='R') THEN itemsite_recvlocation_id WHEN (pTranstype='I') THEN itemsite_issuelocation_id ELSE itemsite_location_id END INTO _locationid FROM itemlocdist, itemsite WHERE ( (itemlocdist_itemsite_id=itemsite_id) AND (itemlocdist_id=pItemlocdistid) ); IF ( (NOT FOUND) OR (_locationid = -1) ) THEN RETURN -1; END IF; -- Determine the remaining qty required to distribute SELECT (p.itemlocdist_qty - COALESCE(SUM(c.itemlocdist_qty), 0)) INTO _qty FROM itemlocdist AS p LEFT OUTER JOIN itemlocdist AS c ON (c.itemlocdist_itemlocdist_id=p.itemlocdist_id) WHERE (p.itemlocdist_id=pItemlocdistid) GROUP BY p.itemlocdist_qty; IF (_qty = 0) THEN RETURN -2; END IF; -- Check to see if an itemlocdist with the correct location/lotserial/expiration already exists SELECT target.itemlocdist_id INTO _itemlocdistid FROM itemlocdist AS source, itemlocdist AS target, itemloc, itemsite WHERE ( (target.itemlocdist_source_type='L') AND (target.itemlocdist_source_id=_locationid) AND (target.itemlocdist_itemsite_id=source.itemlocdist_itemsite_id) AND (COALESCE(target.itemlocdist_ls_id)=COALESCE(source.itemlocdist_ls_id)) AND (target.itemlocdist_expiration=source.itemlocdist_expiration) AND (target.itemlocdist_itemlocdist_id=source.itemlocdist_itemlocdist_id) AND (target.itemlocdist_itemsite_id=itemsite_id) AND (source.itemlocdist_id=pItemlocdistid) ); IF (FOUND) THEN UPDATE itemlocdist SET itemlocdist_qty = (itemlocdist_qty + _qty) WHERE (itemlocdist_id=_itemlocdistid); RETURN _itemlocdistid; END IF; -- Create a new itemlocdist SELECT NEXTVAL('itemlocdist_itemlocdist_id_seq') INTO _itemlocdistid; INSERT INTO itemlocdist ( itemlocdist_id, itemlocdist_itemlocdist_id, itemlocdist_source_type, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_qty ) SELECT _itemlocdistid, pItemlocdistid, 'L', itemlocdist_ls_id, itemlocdist_expiration, _locationid, itemlocdist_itemsite_id, _qty FROM itemlocdist WHERE (itemlocdist_id=pItemlocdistid); RETURN _itemlocdistid; END; $_$; ALTER FUNCTION public.distributetodefault(integer, text) OWNER TO admin; -- -- Name: distributetodefaultitemloc(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION distributetodefaultitemloc(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; BEGIN RETURN distributeToDefaultItemLoc(pItemlocdistid, 'O'); END; $_$; ALTER FUNCTION public.distributetodefaultitemloc(integer) OWNER TO admin; -- -- Name: distributetodefaultitemloc(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION distributetodefaultitemloc(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; pTranstype ALIAS FOR $2; _itemlocid INTEGER; _itemlocdistid INTEGER; _qty NUMERIC; BEGIN -- Make sure that the itemsite in question has a default location SELECT itemloc_id INTO _itemlocid FROM itemlocdist, itemsite, itemloc WHERE ((itemlocdist_itemsite_id=itemsite_id) AND ( (itemsite_location_id=itemloc_location_id AND pTranstype='O') OR (itemsite_recvlocation_id=itemloc_location_id AND pTranstype='R') OR (itemsite_issuelocation_id=itemloc_location_id AND pTranstype='I') ) AND (itemloc_itemsite_id=itemsite_id) AND (itemlocdist_id=pItemlocdistid)); IF ( (NOT FOUND) OR (_itemlocid = -1) ) THEN RETURN -1; END IF; -- Determine the remaining qty required to distribute SELECT (p.itemlocdist_qty - COALESCE(SUM(c.itemlocdist_qty), 0)) INTO _qty FROM itemlocdist AS p LEFT OUTER JOIN itemlocdist AS c ON (c.itemlocdist_itemlocdist_id=p.itemlocdist_id) WHERE (p.itemlocdist_id=pItemlocdistid) GROUP BY p.itemlocdist_qty; IF (_qty = 0) THEN RETURN -2; END IF; -- Check to see if an itemlocdist with the correct location/lotserial/expiration already exists SELECT target.itemlocdist_id INTO _itemlocdistid FROM itemlocdist AS source, itemlocdist AS target WHERE ( (target.itemlocdist_source_type='I') AND (target.itemlocdist_source_id=_itemlocid) AND (COALESCE(target.itemlocdist_ls_id,-1)=COALESCE(source.itemlocdist_ls_id,-1)) AND (target.itemlocdist_expiration=source.itemlocdist_expiration) AND (target.itemlocdist_itemlocdist_id=source.itemlocdist_id) AND (source.itemlocdist_id=pItemlocdistid) ); IF (FOUND) THEN UPDATE itemlocdist SET itemlocdist_qty = (itemlocdist_qty + _qty) WHERE (itemlocdist_id=_itemlocdistid); RETURN _itemlocdistid; END IF; -- Create a new itemlocdist SELECT NEXTVAL('itemlocdist_itemlocdist_id_seq') INTO _itemlocdistid; INSERT INTO itemlocdist ( itemlocdist_id, itemlocdist_itemlocdist_id, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_qty, itemlocdist_expiration ) VALUES ( _itemlocdistid, pItemlocdistid, 'I', _itemlocid, _qty, endOfTime() ); RETURN _itemlocdistid; END; $_$; ALTER FUNCTION public.distributetodefaultitemloc(integer, text) OWNER TO admin; -- -- Name: distributetolocations(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION distributetolocations(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; _distCounter INTEGER; _itemlocdist RECORD; _itemlocid INTEGER; _runningQty NUMERIC; _tmp RECORD; BEGIN _distCounter := 0; _runningQty := 0; -- A scenario can occur where two people try to post distributions -- to the same itemsite against two or more lot/serial/mlc locations -- leading to a deadlock. This line tries to prevent that by locking -- ahead of time all the itemsites that the transaction will need -- before any of the other tables are locked individually. SELECT itemsite_id INTO _tmp FROM itemsite WHERE(itemsite_id in (SELECT DISTINCT itemlocdist_itemsite_id FROM itemlocdist WHERE(itemlocdist_id=pItemlocdistid))) FOR UPDATE; -- March through all of the itemlocdist owned by the passed parent itemlocdist FOR _itemlocdist IN SELECT c.itemlocdist_id AS itemlocdistid, c.itemlocdist_source_type AS type, c.itemlocdist_source_id AS sourceid, c.itemlocdist_qty AS qty, p.itemlocdist_itemsite_id AS itemsiteid, itemsite_freeze, p.itemlocdist_invhist_id AS invhistid, p.itemlocdist_ls_id AS lotserialid, p.itemlocdist_expiration AS expiration, p.itemlocdist_warranty AS warranty, p.itemlocdist_order_type AS ordertype, p.itemlocdist_order_id AS orderid, p.itemlocdist_series AS series FROM itemlocdist AS c, itemlocdist AS p, itemsite WHERE ( (c.itemlocdist_itemlocdist_id=p.itemlocdist_id) AND (p.itemlocdist_source_type='O') AND (p.itemlocdist_itemsite_id=itemsite_id) AND (p.itemlocdist_id=pItemlocdistid) ) LOOP _distCounter := _distCounter + 1; -- If the target for this itemlocdist is a location, check to see if the -- required itemloc already exists IF (_itemlocdist.type = 'L') THEN SELECT itemloc_id INTO _itemlocid FROM itemloc WHERE ( (itemloc_itemsite_id=_itemlocdist.itemsiteid) AND (itemloc_location_id=_itemlocdist.sourceid) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(_itemlocdist.lotserialid, -1)) AND (COALESCE(itemloc_expiration,endOfTime())=COALESCE(_itemlocdist.expiration,endOfTime())) AND (COALESCE(itemloc_warrpurc,endoftime())=COALESCE(_itemlocdist.warranty,endoftime())) ); -- Nope, make it IF (NOT FOUND) THEN SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _itemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_qty, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc ) VALUES ( _itemlocid, _itemlocdist.itemsiteid, _itemlocdist.sourceid, 0, _itemlocdist.lotserialid, _itemlocdist.expiration, _itemlocdist.warranty ); END IF; ELSE -- Yep, cache it _itemlocid = _itemlocdist.sourceid; IF (_itemlocid IS NOT NULL AND (SELECT count(itemloc_id) = 0 FROM itemloc WHERE itemloc_id=_itemlocid)) THEN RAISE EXCEPTION 'No record to distribute against. Someone else may have already distributed this record.'; END IF; END IF; -- Record the invdetail for this itemlocdist INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc ) SELECT _itemlocdist.invhistid, itemloc_location_id, itemloc_ls_id, _itemlocdist.qty, itemloc_qty, (itemloc_qty + _itemlocdist.qty), itemloc_expiration,_itemlocdist.warranty FROM itemloc WHERE (itemloc_id=_itemlocid); -- Update the parent invhist to indicate that it has invdetail records UPDATE invhist SET invhist_hasdetail=TRUE WHERE ((invhist_hasdetail=FALSE) AND (invhist_id=_itemlocdist.invhistid)); -- Update the itemloc_qty if its parent itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN UPDATE itemloc SET itemloc_qty = (itemloc_qty + _itemlocdist.qty) WHERE (itemloc_id=_itemlocid); PERFORM postInvHist(_itemlocdist.invhistid); -- Handle reservation data IF ( (SELECT fetchMetricBool('EnableSOReservationsByLocation')) AND (_itemlocdist.qty < 0) ) THEN -- If a shipment on a sales order, record reservation change before updating -- so it can be reversed later if necessary IF (_itemlocdist.ordertype = 'SO') THEN INSERT INTO shipitemlocrsrv SELECT nextval('shipitemlocrsrv_shipitemlocrsrv_id_seq'), shipitem_id, itemloc_itemsite_id, itemloc_location_id, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc, least(_itemlocdist.qty, itemlocrsrv_qty) FROM shipitem, itemloc JOIN itemlocrsrv ON (itemloc_id=itemlocrsrv_itemloc_id) WHERE ( (shipitem_invhist_id=_itemlocdist.invhistid) AND (itemloc_id=_itemlocid) AND (itemlocrsrv_source=_itemlocdist.ordertype) AND (itemlocrsrv_source_id=_itemlocdist.orderid) ); END IF; -- Update the itemloc reservation UPDATE itemlocrsrv SET itemlocrsrv_qty = (itemlocrsrv_qty + _itemlocdist.qty) WHERE ( (itemlocrsrv_itemloc_id=_itemlocid) AND (itemlocrsrv_source=_itemlocdist.ordertype) AND (itemlocrsrv_source_id=_itemlocdist.orderid) ); -- Delete reservation if fully distributed DELETE FROM itemlocrsrv WHERE ( (itemlocrsrv_itemloc_id=_itemlocid) AND (itemlocrsrv_source=_itemlocdist.ordertype) AND (itemlocrsrv_source_id=_itemlocdist.orderid) AND (itemlocrsrv_qty=0) ); END IF; END IF; -- Adjust QOH if this itemlocdist is to/from a non-netable location IF ( SELECT (NOT location_netable) FROM itemloc, location WHERE ((itemloc_location_id=location_id) AND (itemloc_id=_itemlocid)) ) THEN -- Record the invhist record for the netable->non-netable (or visaversa) INSERT INTO invhist ( invhist_itemsite_id, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT itemsite_id, 'NN', (_itemlocdist.qty * -1), itemsite_qtyonhand, (itemsite_qtyonhand - _itemlocdist.qty), invhist_docnumber, invhist_comments, uom_name, stdCost(item_id), itemsite_costmethod, itemsite_value, (itemsite_value + (_itemlocdist.qty * -1 * CASE WHEN(itemsite_costmethod='A') THEN avgcost(itemsite_id) ELSE stdCost(itemsite_item_id) END)), _itemlocdist.series FROM item, itemsite, invhist, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=_itemlocdist.itemsiteid) AND (invhist_id=_itemlocdist.invhistid) ); -- Update the itemsite_qoh IF (NOT _itemlocdist.itemsite_freeze) THEN UPDATE itemsite SET itemsite_qtyonhand = (itemsite_qtyonhand - _itemlocdist.qty), itemsite_nnqoh = (itemsite_nnqoh + _itemlocdist.qty) FROM itemloc WHERE ((itemloc_itemsite_id=itemsite_id) AND (itemloc_id=_itemlocid)); END IF; END IF; -- Cache the running qty. _runningQty := _runningQty + _itemlocdist.qty; -- Dene with the child itemlocdist, so delete it DELETE FROM itemlocdist WHERE (itemlocdist_id=_itemlocdist.itemlocdistid); -- If the target itemloc is now at qty=0, delete it if its parent -- itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN DELETE FROM itemloc WHERE ( (itemloc_qty=0) AND (itemloc_id=_itemlocid) ); END IF; END LOOP; -- If the running qty for the detailed distributions is the same as the -- total qty to distribute indicated by the parent itemlocdist, then the -- parent itemlocdist has been fully distributed and should be deleted. IF ( ( SELECT itemlocdist_qty FROM itemlocdist WHERE (itemlocdist_id=pItemlocdistid) ) = _runningQty) THEN DELETE FROM itemlocdist WHERE (itemlocdist_id=pItemlocdistid); ELSE -- There is still some more qty to distribute in the parent itemlocdist. -- Update the qty to distribute with the qty that has been distributed. UPDATE itemlocdist SET itemlocdist_qty = (itemlocdist_qty - _runningQty) WHERE (itemlocdist_id=pItemlocdistid); END IF; RETURN _distCounter; END; $_$; ALTER FUNCTION public.distributetolocations(integer) OWNER TO admin; -- -- Name: distributevoucherline(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION distributevoucherline(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoucherId ALIAS FOR $1; pPoitemId ALIAS FOR $2; pCurrId ALIAS FOR $3; _count INTEGER; _costelemId INTEGER; _close BOOLEAN; _r RECORD; _qtyOrdered NUMERIC; _voitemId INTEGER; _taxtypeid INTEGER; BEGIN -- Make sure the P/O and Voucher are same currency SELECT COALESCE(COUNT(*),0) INTO _count FROM poitem JOIN pohead ON (pohead_id=poitem_pohead_id) WHERE ((poitem_id=pPoitemid) AND (pohead_curr_id=pCurrId)); IF (_count = 0) THEN RETURN -3; END IF; -- Validate and get cost element SELECT COALESCE(COUNT(*),0) INTO _count FROM itemcost, item, itemsite, poitem WHERE ((itemcost_item_id=item_id) AND (item_id=itemsite_item_id) AND (itemsite_id=poitem_itemsite_id) AND (poitem_id=pPoitemId)); IF (_count > 1) THEN RETURN -5; ELSEIF (_count = 1) THEN SELECT itemcost_costelem_id INTO _costelemId FROM itemcost, item, itemsite, poitem WHERE ((itemcost_item_id=item_id) AND (item_id=itemsite_item_id) AND (itemsite_id=poitem_itemsite_id) AND (poitem_id=pPoitemId)); ELSE SELECT costelem_id INTO _costelemId FROM costelem WHERE (costelem_type='Material'); END IF; -- Clear previous distributions UPDATE recv SET recv_vohead_id=NULL, recv_voitem_id=NULL WHERE ((recv_vohead_id=pVoucherId) AND (recv_orderitem_id=pPoitemId) AND (recv_order_type='PO')); UPDATE poreject SET poreject_vohead_id=NULL, poreject_voitem_id=NULL WHERE ((poreject_vohead_id=pVoucherId) AND (poreject_poitem_id=pPoitemId)); DELETE FROM vodist WHERE ((vodist_poitem_id=pPoitemId) AND (vodist_vohead_id=pVoucherId)); DELETE FROM voitem WHERE ((voitem_poitem_id=pPoitemId) AND (voitem_vohead_id=pVoucherId)); -- Determine Line balances SELECT COALESCE(SUM(qty_received),0) AS qty_received, COALESCE(SUM(qty_rejected),0) AS qty_rejected, COALESCE(SUM(qty_vouchered),0) AS qty_vouchered, round(COALESCE(SUM(balance),0),2) AS balance, round(COALESCE(SUM(freight),0),2) AS freight INTO _r FROM ( SELECT recv_qty AS qty_received, 0 AS qty_rejected, 0 AS qty_vouchered, (recv_qty * COALESCE(recv_purchcost, poitem_unitprice)) AS balance, recv_freight AS freight FROM poitem JOIN recv ON ((recv_orderitem_id=poitem_id) AND (recv_order_type='PO')) WHERE ( (recv_vohead_id IS NULL) AND (NOT recv_invoiced) AND (recv_posted) AND (poitem_id=pPoitemId) ) UNION ALL SELECT 0 AS qty_received, (poreject_qty) AS qty_rejected, 0 AS qty_vouchered, (poreject_qty * -1 * COALESCE(recv_purchcost, poitem_unitprice)) AS balance, 0 AS freight FROM poitem JOIN poreject ON (poreject_poitem_id=poitem_id) LEFT OUTER JOIN recv ON (recv_id=poreject_recv_id) WHERE ( (poreject_posted) AND (poreject_vohead_id IS NULL) AND (NOT poreject_invoiced) AND (poitem_id=pPoitemId) ) UNION ALL SELECT 0 AS qty_received, 0 AS qty_rejected, voitem_qty AS qty_vouchered, 0 AS balance, 0 AS freight FROM voitem, poitem WHERE ( (voitem_poitem_id=pPoitemId) AND (poitem_id=voitem_poitem_id) ) ) AS data; SELECT poitem_qty_ordered INTO _qtyOrdered FROM poitem WHERE (poitem_id=pPoitemId); IF _r.balance < 0 THEN RETURN -4; ELSEIF ( ((_r.qty_received <> 0) OR (_r.qty_received <> 0)) AND (_r.qty_received - _r.qty_rejected = 0) ) THEN RETURN -2; ELSEIF ((_r.qty_received - _r.qty_rejected) = 0) THEN RETURN 0; END IF; -- Determine whether to close P/O item IF (_r.qty_received -_r.qty_rejected + _r.qty_vouchered) >= _qtyOrdered THEN _close:=True; ELSE _close:=False; END IF; -- Create distribution INSERT INTO vodist (vodist_poitem_id,vodist_vohead_id,vodist_costelem_id,vodist_amount,vodist_qty,vodist_expcat_id) VALUES (pPoitemId,pVoucherId,_costelemId,_r.balance,(_r.qty_received -_r.qty_rejected),-1); -- Create voucher item SELECT poitem_taxtype_id INTO _taxtypeid FROM poitem WHERE (poitem_id=pPoitemId); SELECT NEXTVAL('voitem_voitem_id_seq') INTO _voitemId; INSERT INTO voitem (voitem_id,voitem_vohead_id,voitem_poitem_id,voitem_close,voitem_qty,voitem_freight, voitem_taxtype_id) VALUES (_voitemId,pVoucherId,pPoitemId,_close,(_r.qty_received -_r.qty_rejected),_r.freight, _taxtypeid); -- Tag receipt records UPDATE recv SET recv_vohead_id=pVoucherId, recv_voitem_id=_voitemId WHERE ((recv_orderitem_id=pPoitemId) AND (recv_order_type='PO') AND (recv_vohead_id IS NULL)); UPDATE poreject SET poreject_vohead_id=pVoucherId,poreject_voitem_id=_voitemId WHERE ((poreject_poitem_id=pPoitemId) AND (NOT poreject_invoiced) AND (poreject_vohead_id IS NULL)); RETURN 1; END; $_$; ALTER FUNCTION public.distributevoucherline(integer, integer, integer) OWNER TO admin; -- -- Name: dopostcosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION dopostcosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMaterial ALIAS FOR $1; plowerMaterial ALIAS FOR $2; pdirectLabor ALIAS FOR $3; plowerDirectLabor ALIAS FOR $4; poverhead ALIAS FOR $5; plowerOverhead ALIAS FOR $6; pmachOverhead ALIAS FOR $7; plowerMachOverhead ALIAS FOR $8; pUser ALIAS FOR $9; plowerUser ALIAS FOR $10; prollUp ALIAS FOR $11; _item RECORD; _result INTEGER := 0; BEGIN PERFORM resetLowLevelCode(-1); FOR _item IN SELECT costUpdate_item_id FROM costUpdate ORDER BY costUpdate_lowlevel_code DESC LOOP PERFORM doPostCosts(_item.costUpdate_item_id, FALSE, pMaterial, plowerMaterial, pdirectLabor, plowerDirectLabor, poverhead, plowerOverhead, pmachOverhead, plowerMachOverhead, puser, plowerUser, prollUp); END LOOP; RETURN _result; END; $_$; ALTER FUNCTION public.dopostcosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: dopostcosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION dopostcosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pResetLowLevel ALIAS FOR $2; pMaterial ALIAS FOR $3; plowerMaterial ALIAS FOR $4; pdirectLabor ALIAS FOR $5; plowerDirectLabor ALIAS FOR $6; poverhead ALIAS FOR $7; plowerOverhead ALIAS FOR $8; pmachOverhead ALIAS FOR $9; plowerMachOverhead ALIAS FOR $10; pUser ALIAS FOR $11; plowerUser ALIAS FOR $12; prollUp ALIAS FOR $13; _itemcost RECORD; _result INTEGER; BEGIN IF (pResetLowLevel) THEN PERFORM resetLowLevelCode(pItemId); END IF; FOR _itemcost IN SELECT itemcost_id, costelem_sys, costelem_type, itemcost_lowlevel, costUpdate_lowlevel_code, costUpdate_item_type FROM itemcost, costelem, costUpdate WHERE itemcost_item_id = pItemId AND costUpdate_item_id = itemcost_item_id AND itemcost_costelem_id = costelem_id LOOP IF (NOT _itemcost.costelem_sys) THEN IF ( (pUser) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerUser) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; IF (_itemcost.costelem_type = 'Material') THEN IF ( (pMaterial) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerMaterial) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; IF (_itemcost.costelem_type = 'Direct Labor') THEN IF ( (pdirectLabor) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerDirectLabor) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; IF (_itemcost.costelem_type = 'Overhead') THEN IF ( (poverhead) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerOverhead) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; IF (_itemcost.costelem_type = 'Machine Overhead') THEN IF ( (pmachOverhead) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerMachOverhead) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; END LOOP; IF (prollUp) THEN PERFORM rollUpStandardCost(pItemId); _result := _result + 1; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.dopostcosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE plowerMaterial ALIAS FOR $1; pdirectLabor ALIAS FOR $2; plowerDirectLabor ALIAS FOR $3; poverhead ALIAS FOR $4; plowerOverhead ALIAS FOR $5; pmachOverhead ALIAS FOR $6; plowerMachOverhead ALIAS FOR $7; plowerUser ALIAS FOR $8; prollUp ALIAS FOR $9; BEGIN RETURN doUpdateCosts(plowerMaterial, pdirectLabor, plowerDirectLabor, poverhead, plowerOverhead, pmachOverhead, plowerMachOverhead, plowerUser, prollUp, TRUE); END; $_$; ALTER FUNCTION public.doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pResetLowLevel ALIAS FOR $2; plowerMaterial ALIAS FOR $3; pdirectLabor ALIAS FOR $4; plowerDirectLabor ALIAS FOR $5; poverhead ALIAS FOR $6; plowerOverhead ALIAS FOR $7; pmachOverhead ALIAS FOR $8; plowerMachOverhead ALIAS FOR $9; plowerUser ALIAS FOR $10; prollUp ALIAS FOR $11; BEGIN RETURN doUpdateCosts(pItemId, pResetLowLevel, plowerMaterial, pdirectLabor, plowerDirectLabor, poverhead, plowerOverhead, pmachOverhead, plowerMachOverhead, plowerUser, prollUp, TRUE); END; $_$; ALTER FUNCTION public.doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE plowerMaterial ALIAS FOR $1; pdirectLabor ALIAS FOR $2; plowerDirectLabor ALIAS FOR $3; poverhead ALIAS FOR $4; plowerOverhead ALIAS FOR $5; pmachOverhead ALIAS FOR $6; plowerMachOverhead ALIAS FOR $7; plowerUser ALIAS FOR $8; prollUp ALIAS FOR $9; pActual ALIAS FOR $10; _item RECORD; _bom RECORD; _result INTEGER := 0; BEGIN PERFORM resetLowLevelCode(-1); FOR _item IN SELECT costUpdate_item_id FROM costUpdate ORDER BY costUpdate_lowlevel_code DESC LOOP PERFORM doUpdateCosts(_item.costUpdate_item_id, false, plowerMaterial, pdirectLabor, plowerDirectLabor, poverhead, plowerOverhead, pmachOverhead, plowerMachOverhead, plowerUser, prollUp, pActual); END LOOP; RETURN _result; END; $_$; ALTER FUNCTION public.doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pResetLowLevel ALIAS FOR $2; plowerMaterial ALIAS FOR $3; pdirectLabor ALIAS FOR $4; plowerDirectLabor ALIAS FOR $5; poverhead ALIAS FOR $6; plowerOverhead ALIAS FOR $7; pmachOverhead ALIAS FOR $8; plowerMachOverhead ALIAS FOR $9; plowerUser ALIAS FOR $10; prollUp ALIAS FOR $11; pUpdateActual ALIAS FOR $12; _item RECORD; _bom RECORD; _result INTEGER := 0; _resultFromReset INTEGER; _counterNum INTEGER; _feedBackNum INTEGER; BEGIN IF (pResetLowLevel) THEN PERFORM resetLowLevelCode(pItemId); END IF; SELECT costUpdate_item_id AS item_id, costUpdate_item_type AS item_type INTO _item FROM costUpdate WHERE costUpdate_item_id = pItemId; IF ((plowerMaterial) AND ((_item.item_type <> 'P') AND (_item.item_type <> 'O'))) THEN PERFORM updateSorACost(_item.item_id, 'Material', TRUE, lowerCost(_item.item_id, 'Material', pUpdateActual), pUpdateActual); END IF; IF (pdirectLabor) THEN PERFORM updateSorACost(_item.item_id, 'Direct Labor', FALSE, xtmfg.directLaborCost(_item.item_id), pUpdateActual); END IF; IF (plowerDirectLabor) THEN PERFORM updateSorACost(_item.item_id, 'Direct Labor', TRUE, lowerCost(_item.item_id, 'Direct Labor', pUpdateActual), pUpdateActual); END IF; IF (poverhead) THEN PERFORM updateSorACost(_item.item_id, 'Overhead', FALSE, xtmfg.overheadCost(_item.item_id), pUpdateActual); END IF; IF (plowerOverhead) THEN PERFORM updateSorACost(_item.item_id, 'Overhead', TRUE, lowerCost(_item.item_id, 'Overhead', pUpdateActual), pUpdateActual); END IF; IF (pmachOverhead) THEN PERFORM updateSorACost(_item.item_id, 'Machine Overhead', FALSE, xtmfg.machineOverheadCost(_item.item_id), pUpdateActual); END IF; IF (plowerMachOverhead) THEN PERFORM updateSorACost(_item.item_id, 'Machine Overhead', TRUE, lowerCost(_item.item_id, 'Machine Overhead', pUpdateActual), pUpdateActual); END IF; IF (plowerUser) THEN PERFORM updateLowerUserCosts(_item.item_id, pUpdateActual); END IF; IF (prollUp) THEN PERFORM rollUpSorACost(_item.item_id, pUpdateActual); END IF; RETURN _result; END; $_$; ALTER FUNCTION public.doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: dropifexists(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION dropifexists(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN dropIfExists($1, $2, 'public'); END; $_$; ALTER FUNCTION public.dropifexists(text, text) OWNER TO admin; -- -- Name: dropifexists(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION dropifexists(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN dropIfExists($1, $2, $3, false); END; $_$; ALTER FUNCTION public.dropifexists(text, text, text) OWNER TO admin; -- -- Name: dropifexists(text, text, text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION dropifexists(text, text, text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pType ALIAS FOR $1; pObject ALIAS FOR $2; pSchema ALIAS FOR $3; pCascade ALIAS FOR $4; _table TEXT; _query TEXT; BEGIN IF (UPPER(pType) = 'INDEX') THEN _query = 'DROP INDEX ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_object OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSEIF (UPPER(pType) = 'TABLE') THEN _query = 'DROP TABLE ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pObject)); IF (pCascade) THEN _query = _query || ' CASCADE'; END IF; BEGIN EXECUTE _query; EXCEPTION WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'VIEW') THEN _query = 'DROP VIEW ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pObject)); IF (pCascade) THEN _query = _query || ' CASCADE'; END IF; BEGIN EXECUTE _query; EXCEPTION WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'TRIGGER') THEN SELECT relname INTO _table FROM pg_trigger, pg_class WHERE ((tgrelid=pg_class.oid) AND (UPPER(tgname)=UPPER(pObject))); IF (NOT FOUND) THEN _table := '[no table]'; END IF; _query = 'DROP TRIGGER ' || quote_ident(LOWER(pObject)) || ' ON ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(_table)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_object THEN RETURN 0; WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'FUNCTION') THEN _query = 'DROP FUNCTION ' || (LOWER(pSchema)) || '.' || (LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_object OR undefined_function OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'CONSTRAINT') THEN IF( (SELECT count(*) FROM pg_constraint, pg_class, pg_namespace WHERE((conrelid=pg_class.oid) AND (connamespace=pg_namespace.oid) AND (conname=pObject) AND (nspname=pSchema)) ) > 1 ) THEN RAISE EXCEPTION 'dropIfExists called on constraint name that matches more than 1 constraint.'; END IF; SELECT relname INTO _table FROM pg_constraint, pg_class, pg_namespace WHERE ((conrelid=pg_class.oid) AND (connamespace=pg_namespace.oid) AND (conname=pObject) AND (nspname=pSchema)); IF (NOT FOUND) THEN RETURN 0; END IF; _query = 'ALTER TABLE ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(_table)) || ' DROP CONSTRAINT ' || quote_ident(LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'SCHEMA') THEN _query = 'DROP SCHEMA ' || quote_ident(LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'TYPE') THEN _query = 'DROP TYPE ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pObject)); IF (pCascade) THEN _query = _query || ' CASCADE'; END IF; BEGIN EXECUTE _query; EXCEPTION WHEN undefined_object OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSE RAISE EXCEPTION 'dropIfExists(%, %): unknown pType %', pType, pObject, pType; END IF; RETURN 1; END; $_$; ALTER FUNCTION public.dropifexists(text, text, text, boolean) OWNER TO admin; -- -- Name: dropifexists(text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION dropifexists(text, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pType ALIAS FOR $1; pObject ALIAS FOR $2; pSchema ALIAS FOR $3; pRelation ALIAS FOR $4; _table TEXT; _query TEXT; BEGIN IF (UPPER(pType) = 'CONSTRAINT') THEN SELECT relname INTO _table FROM pg_constraint, pg_class, pg_namespace WHERE ((conrelid=pg_class.oid) AND (connamespace=pg_namespace.oid) AND (conname=pObject) AND (relname=pRelation) AND (nspname=pSchema)); IF (NOT FOUND) THEN RETURN 0; END IF; _query = 'ALTER TABLE ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pRelation)) || ' DROP CONSTRAINT ' || quote_ident(LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSE RAISE EXCEPTION 'dropIfExists(%, %, %, %): pType % is not supported when relation is specified', pType, pObject, pSchema, pRelation, pType; END IF; RETURN 1; END; $_$; ALTER FUNCTION public.dropifexists(text, text, text, text) OWNER TO admin; -- -- Name: dropstdopntable(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION dropstdopntable() RETURNS boolean LANGUAGE plpgsql AS $$ BEGIN IF((SELECT metric_value != 'Manufacturing' FROM metric WHERE metric_name = 'Application')) THEN PERFORM dropIfExists('TABLE', 'stdopn'); RETURN true; END IF; RETURN false; END; $$; ALTER FUNCTION public.dropstdopntable() OWNER TO admin; -- -- Name: editccnumber(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION editccnumber(text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardnum ALIAS FOR $1; pCcardtype ALIAS FOR $2; card_length INTEGER; card_valid boolean := false; starting_digits TEXT; _sum INTEGER := 0; _digit INTEGER := 0; _timesTwo BOOLEAN := false; BEGIN -- Check the card type IF (pCcardtype NOT IN ('M', 'V', 'A', 'D')) THEN -- Unknown Card Type RETURN -1; END IF; card_length := length(pCcardnum); -- Process Master Card Checking length -- Process Master Card Starting digits IF (pCcardtype = 'M') THEN IF (card_length != 16) THEN -- Bad Card Length Card Type RETURN -2; END IF; starting_digits := substr(pCcardnum, 1, 2); IF (starting_digits < '51' OR starting_digits > '55') THEN -- Bad Starting digits RETURN -6; END IF; END IF; -- Process Visa Card Checking length -- Process Visa Card Starting digits IF (pCcardtype = 'V') THEN IF (card_length != 13 AND card_length != 16) THEN -- Bad Card Length Card Type RETURN -3; END IF; starting_digits := substr(pCcardnum, 1, 1); IF (starting_digits != '4') THEN -- Bad Starting digits RETURN -7; END IF; END IF; -- Process American Express Card Checking length -- Process American Express Card Starting digits IF (pCcardtype = 'A') THEN IF (card_length != 15) THEN -- Bad Card Length Card Type RETURN -4; END IF; starting_digits := substr(pCcardnum, 1, 2); IF (starting_digits != '34' AND starting_digits != '37') THEN -- Bad Starting digits RETURN -8; END IF; END IF; -- Process Discover Card Checking length -- Process Discover Card Starting digits IF (pCcardtype = 'D') THEN IF (card_length != 16) THEN -- Bad Card Length Card Type RETURN -5; END IF; starting_digits := substr(pCcardnum, 1, 4); IF (starting_digits != '6011') THEN -- Bad Starting digits RETURN -9; END IF; END IF; -- Now comes the fun part of doing the "check" for the check sum -- perform a luhn checksum FOR i IN REVERSE card_length .. 1 LOOP _digit := int4(substr(pCcardnum, i, 1)); IF (_timesTwo) THEN _digit := _digit * 2; IF (_digit > 9) THEN _digit := _digit - 9; END IF; END IF; _sum := _sum + _digit; _timesTwo := NOT _timesTwo; END LOOP; IF (mod(_sum, 10) != 0) THEN RETURN -10; END IF; RETURN 0; -- No Error END; $_$; ALTER FUNCTION public.editccnumber(text, text) OWNER TO admin; -- -- Name: enablepackage(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enablepackage(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgname ALIAS FOR $1; _i INTEGER := 0; _tabs TEXT[] := ARRAY['cmd', 'cmdarg', 'image', 'metasql', 'priv', 'report', 'script', 'uiform']; BEGIN IF (version() < 'PostgreSQL 8.2') THEN RETURN -1; END IF; FOR _i IN ARRAY_LOWER(_tabs,1)..ARRAY_UPPER(_tabs,1) LOOP EXECUTE 'ALTER TABLE ' || ppkgname || '.pkg' || _tabs[_i] || ' INHERIT public.' || _tabs[_i] || ';'; END LOOP; RETURN 0; END; $_$; ALTER FUNCTION public.enablepackage(text) OWNER TO admin; -- -- Name: enablepackage(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enablepackage(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgheadid ALIAS FOR $1; _pkgname TEXT; BEGIN SELECT pkghead_name INTO _pkgname FROM pkghead WHERE (pkghead_id=ppkgheadid); IF (NOT FOUND) THEN RETURN -2; END IF; RETURN enablePackage(_pkgname); END; $_$; ALTER FUNCTION public.enablepackage(integer) OWNER TO admin; -- -- Name: encrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION encrypt(bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_encrypt'; ALTER FUNCTION public.encrypt(bytea, bytea, text) OWNER TO admin; -- -- Name: encrypt_iv(bytea, bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION encrypt_iv(bytea, bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_encrypt_iv'; ALTER FUNCTION public.encrypt_iv(bytea, bytea, bytea, text) OWNER TO admin; -- -- Name: endoftime(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION endoftime() RETURNS date LANGUAGE sql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT DATE('2100-01-01') as result; $$; ALTER FUNCTION public.endoftime() OWNER TO admin; -- -- Name: entercount(integer, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION entercount(integer, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcntid ALIAS FOR $1; pQty ALIAS FOR $2; pComments ALIAS FOR $3; BEGIN UPDATE invcnt SET invcnt_qoh_after = pQty, invcnt_comments = CASE WHEN ( (LENGTH(invcnt_comments) = 0) AND (LENGTH(pComments) > 0) ) THEN pComments WHEN (LENGTH(pComments) > 0) THEN (invcnt_comments || E'\n' || pComments) ELSE invcnt_comments END, invcnt_cntdate = CURRENT_TIMESTAMP, invcnt_cnt_username = getEffectiveXtUser() WHERE (invcnt_id=pInvcntid); RETURN 0; END; $_$; ALTER FUNCTION public.entercount(integer, numeric, text) OWNER TO admin; -- -- Name: enterporeceipt(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enterporeceipt(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterReceipt('PO', $1, $2, 0.0, '', NULL, NULL); END; $_$; ALTER FUNCTION public.enterporeceipt(integer, numeric) OWNER TO admin; -- -- Name: enterporeceipt(integer, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enterporeceipt(integer, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterPoReceipt('PO', $1, $2, 0.0, $3, NULL, NULL); END; $_$; ALTER FUNCTION public.enterporeceipt(integer, numeric, text) OWNER TO admin; -- -- Name: enterporeceipt(integer, numeric, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enterporeceipt(integer, numeric, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterPoReceipt('PO', $1, $2, $3, $4, NULL, NULL); END; $_$; ALTER FUNCTION public.enterporeceipt(integer, numeric, numeric, text) OWNER TO admin; -- -- Name: enterporeceipt(integer, numeric, numeric, text, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enterporeceipt(integer, numeric, numeric, text, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterReceipt('PO', $1, $2, $3, $4, $5, $6); END; $_$; ALTER FUNCTION public.enterporeceipt(integer, numeric, numeric, text, integer, date) OWNER TO admin; -- -- Name: enterporeturn(integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enterporeturn(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterPoReturn($1, $2, $3, NULL); END; $_$; ALTER FUNCTION public.enterporeturn(integer, numeric, integer) OWNER TO admin; -- -- Name: enterporeturn(integer, numeric, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enterporeturn(integer, numeric, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoitemid ALIAS FOR $1; pQty ALIAS FOR $2; pRjctcodeid ALIAS FOR $3; pRecvid ALIAS FOR $4; _porejectid INTEGER; BEGIN SELECT NEXTVAL('poreject_poreject_id_seq') INTO _porejectid; INSERT INTO poreject ( poreject_id, poreject_date, poreject_ponumber, poreject_poitem_id, poreject_trans_username, poreject_agent_username, poreject_itemsite_id, poreject_vend_id, poreject_vend_item_number, poreject_vend_item_descrip, poreject_vend_uom, poreject_qty, poreject_rjctcode_id, poreject_posted, poreject_invoiced, poreject_recv_id ) SELECT _porejectid, CURRENT_TIMESTAMP, pohead_number, poitem_id, getEffectiveXtUser(), pohead_agent_username, poitem_itemsite_id, pohead_vend_id, poitem_vend_item_number, poitem_vend_item_descrip, poitem_vend_uom, pQty, pRjctcodeid, FALSE, FALSE, pRecvid FROM poitem JOIN pohead ON (pohead_id=poitem_pohead_id) WHERE (poitem_id=pPoitemid); RETURN _porejectid; END; $_$; ALTER FUNCTION public.enterporeturn(integer, numeric, integer, integer) OWNER TO admin; -- -- Name: enterreceipt(text, integer, numeric, numeric, text, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enterreceipt(text, integer, numeric, numeric, text, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterReceipt($1, $2, $3, $4, $5, $6, $7, NULL); END; $_$; ALTER FUNCTION public.enterreceipt(text, integer, numeric, numeric, text, integer, date) OWNER TO admin; -- -- Name: enterreceipt(text, integer, numeric, numeric, text, integer, date, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION enterreceipt(text, integer, numeric, numeric, text, integer, date, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; pQty ALIAS FOR $3; pFreight ALIAS FOR $4; pNotes ALIAS FOR $5; pcurrid ALIAS FOR $6; -- NULL is handled by SELECT ... INTO _o precvdate ALIAS FOR $7; -- NULL is handled by INSERT INTO recv pRecvCost ALIAS FOR $8; _timestamp TIMESTAMP; _o RECORD; _recvid INTEGER; _warehouseid INTEGER; _recvcost NUMERIC; BEGIN IF(precvdate IS NULL OR precvdate = CURRENT_DATE) THEN _timestamp := CURRENT_TIMESTAMP; ELSE _timestamp := precvdate; END IF; SELECT NEXTVAL('recv_recv_id_seq') INTO _recvid; DELETE FROM recv WHERE ((NOT recv_posted) AND (recv_order_type=pordertype) AND (recv_orderitem_id=porderitemid) ); IF (pQty > 0) THEN IF (pordertype='PO') THEN SELECT pohead_number AS orderhead_number, poitem_id AS orderitem_id, pohead_agent_username AS orderhead_agent_username, CASE WHEN (poitem_itemsite_id = -1) THEN NULL ELSE poitem_itemsite_id END AS itemsite_id, vend_id, COALESCE(poitem_vend_item_number, '') AS vend_item_number, COALESCE(poitem_vend_item_descrip, '') AS vend_item_descrip, COALESCE(poitem_vend_uom, '') AS vend_uom, poitem_duedate AS duedate, poitem_unitprice AS orderitem_unitcost, pohead_curr_id AS orderitem_unitcost_curr_id, pohead_curr_id AS freight_curr_id, poitem_rlsd_duedate AS rlsd_duedate INTO _o FROM pohead JOIN poitem ON (pohead_id=poitem_pohead_id) JOIN vendinfo ON (pohead_vend_id=vend_id) WHERE (poitem_id=porderitemid); ELSIF (pordertype='RA') THEN SELECT rahead_number AS orderhead_number, raitem_id AS orderitem_id, ''::text AS orderhead_agent_username, raitem_itemsite_id AS itemsite_id, NULL::integer AS vend_id, ''::text AS vend_item_number, ''::text AS vend_item_descrip, ''::text AS vend_uom, raitem_scheddate AS duedate, raitem_unitprice AS orderitem_unitcost, rahead_curr_id AS orderitem_unitcost_curr_id, rahead_curr_id AS freight_curr_id, raitem_scheddate AS rlsd_duedate INTO _o FROM rahead JOIN raitem ON (rahead_id=raitem_rahead_id) WHERE (raitem_id=porderitemid); ELSIF (pordertype='TO') THEN SELECT tohead_number AS orderhead_number, toitem_id AS orderitem_id, tohead_agent_username AS orderhead_agent_username, itemsite_id, NULL::integer AS vend_id, ''::text AS vend_item_number, ''::text AS vend_item_descrip, ''::text AS vend_uom, toitem_duedate AS duedate, toitem_stdcost AS orderitem_unitcost, baseCurrId() AS orderitem_unitcost_curr_id, toitem_freight_curr_id AS freight_curr_id, toitem_duedate AS rlsd_duedate INTO _o FROM itemsite, tohead JOIN toitem ON (tohead_id=toitem_tohead_id) WHERE ((toitem_id=porderitemid) AND (tohead_dest_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id)); END IF; --Make sure user has site privileges IF ((FOUND) AND (_o.itemsite_id IS NOT NULL)) THEN SELECT warehous_id INTO _warehouseid FROM itemsite,site() WHERE ((itemsite_id=_o.itemsite_id) AND (warehous_id=itemsite_warehous_id)); IF (NOT FOUND) THEN RETURN 0; END IF; END IF; --Make sure we aren't trying to receive a Kit IF ((FOUND) AND (_o.itemsite_id IS NOT NULL)) THEN IF (SELECT (item_type='K') FROM itemsite, item WHERE ((itemsite_id=_o.itemsite_id) AND (item_id=itemsite_item_id))) THEN RETURN 0; END IF; END IF; IF (NOT FOUND) THEN RETURN -1; END IF; -- default to orderitem_unitcost if recv_purchcost is not specified IF(pRecvCost IS NULL) THEN _recvcost := _o.orderitem_unitcost; ELSE _recvcost := pRecvCost; END IF; INSERT INTO recv ( recv_id, recv_date, recv_order_number, recv_order_type, recv_orderitem_id, recv_trans_usr_name, recv_agent_username, recv_itemsite_id, recv_vend_id, recv_vend_item_number, recv_vend_item_descrip, recv_vend_uom, recv_qty, recv_duedate, recv_purchcost, recv_purchcost_curr_id, recv_notes, recv_freight, recv_freight_curr_id, recv_rlsd_duedate ) VALUES ( _recvid, _timestamp, _o.orderhead_number, pordertype, _o.orderitem_id::INTEGER, getEffectiveXtUser(), _o.orderhead_agent_username, _o.itemsite_id::INTEGER, _o.vend_id::INTEGER, _o.vend_item_number, _o.vend_item_descrip, _o.vend_uom, pQty, _o.duedate, _recvcost, _o.orderitem_unitcost_curr_id::INTEGER, pNotes, pFreight, _o.freight_curr_id::INTEGER, _o.rlsd_duedate); END IF; RETURN _recvid; END; $_$; ALTER FUNCTION public.enterreceipt(text, integer, numeric, numeric, text, integer, date, numeric) OWNER TO admin; -- -- Name: expirecreditcard(integer, bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION expirecreditcard(integer, bytea) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCust ALIAS FOR $1; pKey ALIAS FOR $2; num_updated INTEGER; cc_year INTEGER; cc_month INTEGER; cc_year_t TEXT; cc_month_t TEXT; _dr RECORD; _cc RECORD; bf TEXT; BEGIN num_updated := 0; bf := 'bf'; select cast(date_part('year', CURRENT_DATE) AS INTEGER) AS check_year, cast(date_part('month', CURRENT_DATE) AS INTEGER) AS check_month INTO _dr; FOR _cc IN SELECT ccard_id, decrypt(setbytea(ccard_month_expired), setbytea(pKey), 'bf') AS ccard_month_expired, decrypt(setbytea(ccard_year_expired), setbytea(pKey), 'bf') AS ccard_year_expired FROM ccard WHERE ( (ccard_cust_id=pCust) AND (ccard_active) ) LOOP SELECT formatbytea(_cc.ccard_month_expired) INTO cc_month_t; SELECT formatbytea(_cc.ccard_year_expired) INTO cc_year_t; SELECT cast(cc_month_t AS INTEGER) INTO cc_month; SELECT cast(cc_year_t AS INTEGER) INTO cc_year; IF (cc_year < _dr.check_year) THEN -- We have an expired card UPDATE ccard set ccard_active = FALSE where ccard_id = _cc.ccard_id; num_updated := num_updated + 1; ELSIF (cc_year = _dr.check_year AND cc_month < _dr.check_month) THEN -- We have an expired card UPDATE ccard set ccard_active = FALSE where ccard_id = _cc.ccard_id; num_updated := num_updated + 1; END IF; END LOOP; RETURN num_updated; END; $_$; ALTER FUNCTION public.expirecreditcard(integer, bytea) OWNER TO admin; -- -- Name: explodebom(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION explodebom(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pParentid ALIAS FOR $2; pLevel ALIAS FOR $3; _revid INTEGER; BEGIN SELECT getActiveRevId('BOM',pItemid) INTO _revid; RETURN explodeBOM(pItemid, _revid, pParentid, pLevel); END; $_$; ALTER FUNCTION public.explodebom(integer, integer, integer) OWNER TO admin; -- -- Name: explodebom(integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION explodebom(integer, integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; pParentid ALIAS FOR $3; pLevel ALIAS FOR $4; _bomworkid INTEGER; _level INTEGER; _p RECORD; _r RECORD; _temp TEXT; BEGIN _level := (pLevel + 1); -- Cache some parameters about the parent SELECT bomwork_item_id, bomwork_set_id, bomwork_qtyreq, bomwork_seqnumber, bomwork_effective, bomwork_expires INTO _p FROM bomwork WHERE (bomwork_id=pParentid); -- Step through all of the components of the parent component FOR _r IN SELECT bomitem.*, item_id, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, CASE WHEN (_p.bomwork_effective > bomitem_effective) THEN _p.bomwork_effective ELSE bomitem_effective END AS effective, CASE WHEN (_p.bomwork_expires < bomitem_expires) THEN _p.bomwork_expires ELSE bomitem_expires END AS expires, stdcost(item_id, bomitem_id) AS standardcost, actcost(item_id, bomitem_id) AS actualcost FROM bomitem(pItemid, pRevisionid), item WHERE ( (bomitem_item_id=item_id) AND (bomitem_expires > _p.bomwork_effective) ) LOOP -- Insert the current component and some bomitem parameters into the bomwork set SELECT NEXTVAL('bomwork_bomwork_id_seq') INTO _bomworkid; INSERT INTO bomwork ( bomwork_id, bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_parent_seqnumber, bomwork_seqnumber, bomwork_item_id, bomwork_createwo, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_stdunitcost, bomwork_actunitcost, bomwork_notes, bomwork_ref, bomwork_bomitem_id, bomwork_ecn ) VALUES ( _bomworkid, _p.bomwork_set_id, pParentid, _level, _p.bomwork_seqnumber, _r.bomitem_seqnumber, _r.item_id, _r.bomitem_createwo, (_p.bomwork_qtyreq * _r.qtyper + _r.qtyfxd), _r.qtyfxd, _r.qtyper, _r.bomitem_scrap, _r.bomitem_issuemethod, _r.effective, _r.expires, _r.standardcost, _r.actualcost, _r.bomitem_notes, _r.bomitem_ref, _r.bomitem_id, _r.bomitem_ecn ); -- Recursively repeat for this component's components PERFORM explodeBOM(_r.item_id, _bomworkid, _level); END LOOP; RETURN 1; END; $_$; ALTER FUNCTION public.explodebom(integer, integer, integer, integer) OWNER TO admin; -- -- Name: explodekit(integer, integer, integer, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION explodekit(integer, integer, integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pLinenumber ALIAS FOR $2; pSubnumber ALIAS FOR $3; pItemsiteid ALIAS FOR $4; pQty ALIAS FOR $5; BEGIN RETURN explodeKit(pSoheadid, pLinenumber, pSubnumber, pItemsiteid, pQty, CURRENT_DATE, NULL); END; $_$; ALTER FUNCTION public.explodekit(integer, integer, integer, integer, numeric) OWNER TO admin; -- -- Name: explodekit(integer, integer, integer, integer, numeric, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION explodekit(integer, integer, integer, integer, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pLinenumber ALIAS FOR $2; pSubnumber ALIAS FOR $3; pItemsiteid ALIAS FOR $4; pQty ALIAS FOR $5; pScheddate ALIAS FOR $6; pPromdate ALIAS FOR $7; BEGIN RETURN explodeKit(pSoheadid, pLinenumber, pSubnumber, pItemsiteid, pQty, CURRENT_DATE, NULL, ''); END; $_$; ALTER FUNCTION public.explodekit(integer, integer, integer, integer, numeric, date, date) OWNER TO admin; -- -- Name: explodekit(integer, integer, integer, integer, numeric, date, date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION explodekit(integer, integer, integer, integer, numeric, date, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pLinenumber ALIAS FOR $2; pSubnumber ALIAS FOR $3; pItemsiteid ALIAS FOR $4; pQty ALIAS FOR $5; pScheddate ALIAS FOR $6; pPromdate ALIAS FOR $7; pMemo ALIAS FOR $8; _subnumber INTEGER := COALESCE(pSubnumber,0); _revid INTEGER; _itemid INTEGER; _warehousid INTEGER; _item RECORD; _type TEXT; _coitemid INTEGER; _count INTEGER; _orderid INTEGER := 0; _itemsrcid INTEGER; BEGIN SELECT getActiveRevId('BOM',itemsite_item_id), itemsite_warehous_id, itemsite_item_id INTO _revid, _warehousid, _itemid FROM itemsite WHERE(itemsite_id=pItemsiteid); IF(NOT FOUND) THEN RAISE EXCEPTION 'No Item Site for the specified line was found.'; END IF; FOR _item IN SELECT bomitem_id, itemsite_id, itemsite_warehous_id, COALESCE((itemsite_active AND item_active), false) AS active, COALESCE((itemsite_sold AND item_sold), false) AS sold, item_id, item_type, item_price_uom_id, itemsite_createsopr,itemsite_createwo,itemsite_createsopo, itemsite_dropship, bomitem_uom_id, itemuomtouomratio(item_id, bomitem_uom_id, item_inv_uom_id) AS invuomratio, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id),(bomitem_qtyfxd + bomitem_qtyper * pQty) * (1 + bomitem_scrap)) AS qty FROM bomitem JOIN item ON (item_id=bomitem_item_id) LEFT OUTER JOIN itemsite ON ((itemsite_item_id=item_id) AND (itemsite_warehous_id=_warehousid)) WHERE((bomitem_parent_item_id=_itemid) AND (bomitem_rev_id=_revid) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1))) ORDER BY bomitem_seqnumber LOOP IF (NOT _item.active) THEN RAISE EXCEPTION 'One or more of the components for the kit is inactive for the selected item site.'; ELSIF (NOT _item.sold) THEN RAISE EXCEPTION 'One or more of the components for the kit is not sold for the selected item site.'; ELSIF (_item.item_type='F') THEN SELECT explodeKit(pSoheadid, pLinenumber, _subnumber, _item.itemsite_id, _item.qty) INTO _subnumber; ELSE IF (_item.itemsite_createsopr) THEN _type := 'R'; ELSIF (_item.itemsite_createsopo) THEN _type := 'P'; ELSIF (_item.itemsite_createwo) THEN _type := 'W'; ELSE _type := NULL; END IF; _subnumber := _subnumber + 1; _coitemid = nextval('coitem_coitem_id_seq'); raise notice 'coitem id: %',_coitemid; INSERT INTO coitem (coitem_id, coitem_cohead_id, coitem_linenumber, coitem_subnumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_qtyshipped, coitem_qtyreturned, coitem_unitcost, coitem_custprice, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_order_type, coitem_order_id, coitem_custpn, coitem_memo, coitem_prcost) VALUES (_coitemid, pSoheadid, pLinenumber, _subnumber, _item.itemsite_id, 'O', pScheddate, pPromdate, _item.qty, _item.bomitem_uom_id, _item.invuomratio, 0, 0, stdCost(_item.item_id), 0, 0, _item.item_price_uom_id, 1, _type, -1, '', pMemo, 0); IF (_item.itemsite_createsopr) THEN SELECT createPR(cohead_number::INTEGER, 'S', _coitemid) INTO _orderid FROM cohead WHERE (cohead_id=pSoheadid); IF (_orderid > 0) THEN UPDATE coitem SET coitem_order_id=_orderid WHERE (coitem_id=_coitemid); ELSE RAISE EXCEPTION 'Could not explode kit. CreatePR failed, result=%', _orderid; END IF; END IF; IF (_item.itemsite_createsopo) THEN SELECT itemsrc_id INTO _itemsrcid FROM itemsrc WHERE ((itemsrc_item_id=_item.item_id) AND (itemsrc_default)); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count > 0) THEN PERFORM createPurchaseToSale(_coitemid, _itemsrcid, _item.itemsite_dropship); ELSE RAISE WARNING 'One or more Kit items are flagged as purchase-to-order for this site, but no default item source is defined.'; END IF; END IF; END IF; END LOOP; RETURN _subnumber; END; $_$; ALTER FUNCTION public.explodekit(integer, integer, integer, integer, numeric, date, date, text) OWNER TO admin; -- -- Name: explodephantomorder(integer, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION explodephantomorder(integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPlanordid ALIAS FOR $1; pPhantomid ALIAS FOR $2; pQty ALIAS FOR $3; _b RECORD; BEGIN FOR _b IN SELECT planord_number, c.itemsite_id AS componentsiteid, calculatenextworkingdate(c.itemsite_warehous_id, planord_startdate, (c.itemsite_leadtime * -1)) AS startdate, planord_startdate AS duedate, bomitem_createwo, c.itemsite_planning_type AS planningtype, (itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd + pQty * bomitem_qtyper) * (1 + bomitem_scrap))) AS qtyreq, item_type FROM bomitem, planord, itemsite AS p, itemsite AS c, item WHERE ((bomitem_parent_item_id=p.itemsite_item_id) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) AND (bomitem_item_id=c.itemsite_item_id) AND (p.itemsite_warehous_id=c.itemsite_warehous_id) AND (c.itemsite_item_id=item_id) AND (woEffectiveDate(planord_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (p.itemsite_id=pPhantomid) AND (planord_id=pPlanordid)) LOOP IF (_b.item_type = 'F') THEN PERFORM explodePhantomOrder(pPlanordid, _b.componentsiteid, _b.qtyreq); ELSE -- Create the Planned Requirement INSERT INTO planreq ( planreq_source, planreq_source_id, planreq_itemsite_id, planreq_qty ) VALUES ( 'P', pPlanordid, _b.componentsiteid, _b.qtyreq ); IF (_b.bomitem_createwo AND _b.planningtype != 'N') THEN PERFORM createPlannedOrder( pPlanordid, _b.planord_number, _b.componentsiteid, _b.qtyreq, _b.startdate, _b.duedate, FALSE, FALSE, NULL, NULL); END IF; END IF; END LOOP; RETURN pPlanordid; END; $_$; ALTER FUNCTION public.explodephantomorder(integer, integer, numeric) OWNER TO admin; -- -- Name: explodewo(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION explodewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pExplodeChildren ALIAS FOR $2; resultCode INTEGER; newWo RECORD; _newwoid INTEGER; _p RECORD; _r RECORD; _bbom BOOLEAN; BEGIN -- Find out if Breeder BOMs are enabled SELECT metric_value='t' INTO _bbom FROM metric WHERE (metric_name='BBOM'); -- Make sure that this W/O is Open SELECT wo_id INTO resultCode FROM wo WHERE ((wo_status='O') AND (wo_id=pWoid)); IF (NOT FOUND) THEN RETURN -4; END IF; -- Make sure that all Component Item Sites exist and are valid -- Item Sites must be active and not Job Costed SELECT bomitem_id INTO resultCode FROM wo, bomitem, itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=bomitem_parent_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (wo_id=pWoid) AND (bomitem_rev_id=wo_bom_rev_id) AND (bomitem_item_id NOT IN ( SELECT component.itemsite_item_id FROM itemsite AS component, itemsite AS parent WHERE ( (wo_itemsite_id=parent.itemsite_id) AND (parent.itemsite_item_id=bomitem_parent_item_id) AND (bomitem_item_id=component.itemsite_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (component.itemsite_active) AND (component.itemsite_warehous_id=parent.itemsite_warehous_id) ) ) ) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- If the Parent Item is a Breeder, make sure that all the -- Co-Product/By-Product Item Sites exist IF (_bbom) THEN IF ( ( SELECT (item_type='B') FROM wo, itemsite, item WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (wo_id=pWoid) ) ) ) THEN SELECT bbomitem_id INTO resultCode FROM wo, xtmfg.bbomitem, itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=bbomitem_parent_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bbomitem_effective AND (bbomitem_expires - 1)) AND (wo_id=pWoid) AND (bbomitem_item_id NOT IN ( SELECT component.itemsite_item_id FROM itemsite AS component, itemsite AS parent WHERE ( (wo_itemsite_id=parent.itemsite_id) AND (parent.itemsite_item_id=bbomitem_parent_item_id) AND (bbomitem_item_id=component.itemsite_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bbomitem_effective AND (bbomitem_expires - 1)) AND (component.itemsite_active) AND (component.itemsite_warehous_id=parent.itemsite_warehous_id) ) ) ) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; END IF; END IF; -- Create the W/O Material Requirements INSERT INTO womatl ( womatl_wo_id, womatl_bomitem_id, womatl_wooper_id, womatl_schedatwooper, womatl_itemsite_id, womatl_duedate, womatl_uom_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_createwo, womatl_issuewo, womatl_issuemethod, womatl_notes, womatl_ref ) SELECT wo_id, bomitem_id, bomitem_booitem_seq_id, bomitem_schedatwooper, cs.itemsite_id, CASE WHEN bomitem_schedatwooper THEN COALESCE(calcWooperStartStub(wo_id,bomitem_booitem_seq_id), wo_startdate) ELSE wo_startdate END, bomitem_uom_id, bomitem_qtyfxd, bomitem_qtyper, bomitem_scrap, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id), (bomitem_qtyfxd + bomitem_qtyper * wo_qtyord) * (1 + bomitem_scrap)), 0, 0, startOfTime(), startOfTime(), 0, item_picklist, ( (item_type='M') AND (bomitem_createwo) ), CASE WHEN ( (item_type='M') AND (bomitem_issuewo) ) THEN TRUE WHEN (cs.itemsite_costmethod='J') THEN TRUE ELSE FALSE END, bomitem_issuemethod, bomitem_notes, bomitem_ref FROM bomitem, wo, itemsite AS ps, itemsite AS cs, item WHERE ( (wo_itemsite_id=ps.itemsite_id) AND (bomitem_parent_item_id=ps.itemsite_item_id) AND (bomitem_item_id=cs.itemsite_item_id) AND (bomitem_rev_id=wo_bom_rev_id) AND (ps.itemsite_warehous_id=cs.itemsite_warehous_id) AND (cs.itemsite_item_id=item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (wo_id=pWoid) AND ((bomitem_char_id IS NULL) OR EXISTS ( SELECT charass_id FROM coitem,charass WHERE ((charass_target_type='SI') AND (charass_target_id=coitem_id) AND (charass_char_id=bomitem_char_id) AND (charass_value=bomitem_value) AND (wo_ordtype='S') AND (coitem_id=wo_ordid)))) ); -- Update any created P/R's the have the project id as the parent WO. UPDATE pr SET pr_prj_id=wo_prj_id FROM womatl, wo WHERE ((wo_id=pWoid) AND (womatl_wo_id=wo_id) AND (pr_order_type='W') AND (pr_order_id=womatl_id)); -- If the parent Item is a Breeder, create the brddist -- records for the Co-Products and By-Products IF (_bbom) THEN INSERT INTO xtmfg.brddist ( brddist_wo_id, brddist_wo_qty, brddist_itemsite_id, brddist_stdqtyper, brddist_qty, brddist_posted ) SELECT wo_id, 0, cs.itemsite_id, bbomitem_qtyper, 0, FALSE FROM wo, xtmfg.bbomitem, itemsite AS ps, itemsite AS cs, item WHERE ( (bbomitem_parent_item_id=ps.itemsite_item_id) AND (wo_itemsite_id=ps.itemsite_id) AND (ps.itemsite_item_id=item_id) AND (item_type='B') AND (bbomitem_item_id=cs.itemsite_item_id) AND (cs.itemsite_warehous_id=ps.itemsite_warehous_id) AND (wo_id=pWoid) ); END IF; -- Insert the W/O Operations if routings enabled IF ( ( SELECT (metric_value='t') FROM metric WHERE (metric_name='Routings') ) ) THEN INSERT INTO xtmfg.wooper ( wooper_wo_id, wooper_booitem_id, wooper_seqnumber, wooper_wrkcnt_id, wooper_stdopn_id, wooper_descrip1, wooper_descrip2, wooper_toolref, wooper_sutime, wooper_sucosttype, wooper_surpt, wooper_rntime, wooper_rncosttype, wooper_rnrpt, wooper_rnqtyper, wooper_produom, wooper_invproduomratio, wooper_issuecomp, wooper_rcvinv, wooper_suconsumed, wooper_sucomplete, wooper_rnconsumed, wooper_rncomplete, wooper_qtyrcv, wooper_instruc, wooper_scheduled, wooper_wip_location_id ) SELECT wo_id, booitem_id, booitem_seqnumber, booitem_wrkcnt_id, booitem_stdopn_id, booitem_descrip1, booitem_descrip2, booitem_toolref, CASE WHEN (booitem_surpt) THEN booitem_sutime ELSE 0 END, booitem_sucosttype, booitem_surpt, CASE WHEN ((booitem_rnqtyper = 0) OR (booitem_invproduomratio = 0)) THEN 0 WHEN (NOT booitem_rnrpt) THEN 0 ELSE ( ( booitem_rntime / booitem_rnqtyper / booitem_invproduomratio ) * wo_qtyord ) END, booitem_rncosttype, booitem_rnrpt, CASE WHEN (booitem_rnqtyper = 0) THEN 0 WHEN (NOT booitem_rnrpt) THEN 0 ELSE (booitem_rntime / booitem_rnqtyper) END, booitem_produom, booitem_invproduomratio, booitem_issuecomp, booitem_rcvinv, 0::NUMERIC, FALSE, 0::NUMERIC, FALSE, 0::NUMERIC, booitem_instruc, calculatenextworkingdate(itemsite_warehous_id,wo_startdate,booitem_execday-1), booitem_wip_location_id FROM xtmfg.booitem, wo, itemsite WHERE ((wo_itemsite_id=itemsite_id) AND (itemsite_item_id=booitem_item_id) AND (booitem_rev_id=wo_boo_rev_id) AND (woEffectiveDate(wo_startdate) BETWEEN booitem_effective AND (booitem_expires - 1)) AND (wo_id=pWoid)); -- Update womatls item to link to wooper items when the respective -- bomitem record indicates a booitem issue link. UPDATE womatl SET womatl_wooper_id=wooper_id FROM wo,xtmfg.wooper,xtmfg.booitem WHERE ((womatl_wooper_id=booitem_seq_id) AND (wooper_booitem_id=booitem_id) AND (womatl_wo_id=wo_id) AND (wooper_wo_id=wo_id) AND (wo_boo_rev_id=booitem_rev_id) AND (wo_id=pWoid)); END IF; -- Handle all of the Phantom material requirements WHILE ( ( SELECT COUNT(*) FROM womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_wo_id=pWoid) AND (item_type='F') ) ) > 0 ) LOOP FOR _p IN SELECT wo_qtyord, wo_startdate, womatl_id, womatl_wooper_id FROM wo, womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_type='F') AND (womatl_wo_id=wo_id) AND (wo_id=pWoid) ) LOOP INSERT INTO womatl ( womatl_wo_id, womatl_itemsite_id, womatl_wooper_id, womatl_schedatwooper, womatl_duedate, womatl_uom_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_createwo, womatl_issuewo, womatl_issuemethod, womatl_notes, womatl_ref ) SELECT pWoid, cs.itemsite_id, _p.womatl_wooper_id, womatl_schedatwooper, womatl_duedate, bomitem_uom_id, bomitem_qtyfxd, (bomitem_qtyper * womatl_qtyper), bomitem_scrap, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id), (bomitem_qtyfxd + _p.wo_qtyord * bomitem_qtyper * womatl_qtyper) * (1 + bomitem_scrap)), 0, 0, startOfTime(), startOfTime(), 0, ci.item_picklist, ( (ci.item_type='M') AND (bomitem_createwo) ), ( (ci.item_type='M') AND (bomitem_issuewo) ), bomitem_issuemethod, bomitem_notes, bomitem_ref FROM womatl JOIN wo ON (wo_id=womatl_wo_id) JOIN itemsite ps ON (ps.itemsite_id=womatl_itemsite_id) JOIN item pi ON (pi.item_id=ps.itemsite_item_id) JOIN bomitem ON ( (bomitem_parent_item_id=pi.item_id) AND (woEffectiveDate(_p.wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (bomitem_rev_id=getActiveRevId('BOM', pi.item_id)) ) JOIN item ci ON (ci.item_id=bomitem.bomitem_item_id) JOIN itemsite cs ON ( (cs.itemsite_item_id=ci.item_id) AND (cs.itemsite_warehous_id=ps.itemsite_warehous_id) ) WHERE (womatl_id=_p.womatl_id); DELETE FROM womatl WHERE (womatl_id=_p.womatl_id); END LOOP; END LOOP; -- Create W/Os for manufactured component items FOR newWo IN SELECT wo_number, nextWoSubnumber(wo_number) AS nextSubnumber, itemsite_id, itemsite_leadtime, womatl_duedate, womatl_wo_id, womatl_qtyreq, womatl_uom_id, wo_prj_id, item_id, item_inv_uom_id, womatl_id FROM womatl, wo, itemsite, item WHERE ( (womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_createwo) AND (itemsite_wosupply) AND (itemsite_item_id=item_id) AND (wo_id=pWoid) ) ORDER BY womatl_id LOOP SELECT createWo( newWo.wo_number, newWo.itemsite_id, 1, itemuomtouom(newWo.item_id,newWo.womatl_uom_id,newWo.item_inv_uom_id,newWo.womatl_qtyreq), newWo.itemsite_leadtime, newWo.womatl_duedate, '', 'W', newWo.womatl_wo_id, newWo.wo_prj_id ) INTO _newwoid; UPDATE wo SET wo_womatl_id = newWo.womatl_id WHERE wo_id=_newwoid; END LOOP; UPDATE wo SET wo_status='E', wo_adhoc=FALSE WHERE (wo_id=pWoid); IF (pExplodeChildren) THEN SELECT MAX(explodeWo(wo_id, TRUE)) INTO resultCode FROM wo WHERE ( (wo_ordtype='W') AND (wo_ordid=pWoid) ); END IF; RETURN pWoid; END; $_$; ALTER FUNCTION public.explodewo(integer, boolean) OWNER TO admin; -- -- Name: explodewoeffective(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION explodewoeffective() RETURNS text LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value TEXT; BEGIN SELECT metric_value INTO _value FROM metric WHERE (metric_name='ExplodeWOEffective'); RETURN _value; END; $$; ALTER FUNCTION public.explodewoeffective() OWNER TO admin; -- -- Name: fetchapmemonumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchapmemonumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('APMemoNumber')::INTEGER; $$; ALTER FUNCTION public.fetchapmemonumber() OWNER TO admin; -- -- Name: fetcharmemonumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetcharmemonumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('ARMemoNumber'); $$; ALTER FUNCTION public.fetcharmemonumber() OWNER TO admin; -- -- Name: fetchcashrcptnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchcashrcptnumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('CashRcptNumber'); $$; ALTER FUNCTION public.fetchcashrcptnumber() OWNER TO admin; -- -- Name: fetchcmnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchcmnumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('CmNumber'); $$; ALTER FUNCTION public.fetchcmnumber() OWNER TO admin; -- -- Name: fetchcrmaccountnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchcrmaccountnumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('CRMAccountNumber')::INTEGER; $$; ALTER FUNCTION public.fetchcrmaccountnumber() OWNER TO admin; -- -- Name: fetchdefaultfob(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchdefaultfob(pwarehousid integer) RETURNS text LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT warehous_fob FROM whsinfo WHERE (warehous_id=$1); $_$; ALTER FUNCTION public.fetchdefaultfob(pwarehousid integer) OWNER TO admin; -- -- Name: fetchdefaultshipvia(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchdefaultshipvia() RETURNS text LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal TEXT; BEGIN SELECT shipvia_code INTO _returnVal FROM shipvia WHERE shipvia_id= (SELECT CAST(metric_value AS integer) FROM metric WHERE metric_name = 'DefaultShipViaId'); RETURN _returnVal; END; $$; ALTER FUNCTION public.fetchdefaultshipvia() OWNER TO admin; -- -- Name: fetchglsequence(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchglsequence() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _sequence INTEGER; BEGIN SELECT NEXTVAL('gltrans_sequence_seq') INTO _sequence; RETURN _sequence; END; $$; ALTER FUNCTION public.fetchglsequence() OWNER TO admin; -- -- Name: fetchincidentnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchincidentnumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('IncidentNumber')::integer; $$; ALTER FUNCTION public.fetchincidentnumber() OWNER TO admin; -- -- Name: fetchinvcnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchinvcnumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('InvcNumber')::integer; $$; ALTER FUNCTION public.fetchinvcnumber() OWNER TO admin; -- -- Name: fetchitemuomconvtypes(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchitemuomconvtypes(integer) RETURNS text[] LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemUomConvId ALIAS FOR $1; _p RECORD; _result text[]; _cnt INTEGER; BEGIN _cnt := 0; FOR _p IN SELECT uomtype_name FROM itemuomconv, itemuom, uomtype WHERE ((itemuomconv_id=pItemUomConvId) AND (itemuomconv_id=itemuom_itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id)) LOOP _result[_cnt] := _p.uomtype_name; _cnt := _cnt + 1; END LOOP; RETURN _result; END; $_$; ALTER FUNCTION public.fetchitemuomconvtypes(integer) OWNER TO admin; -- -- Name: fetchjournalnumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchjournalnumber(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUse ALIAS FOR $1; _number INTEGER; BEGIN SELECT nextval('journal_number_seq') INTO _number; INSERT INTO jrnluse (jrnluse_date, jrnluse_number, jrnluse_use) VALUES (CURRENT_TIMESTAMP, _number, pUse); RETURN _number; END; $_$; ALTER FUNCTION public.fetchjournalnumber(text) OWNER TO admin; -- -- Name: fetchmetricbool(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchmetricbool(text) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _pMetricName ALIAS FOR $1; _returnVal BOOLEAN; BEGIN SELECT CASE WHEN MIN(metric_value) = 't' THEN true ELSE false END INTO _returnVal FROM metric WHERE metric_name = _pMetricName; RETURN _returnVal; END; $_$; ALTER FUNCTION public.fetchmetricbool(text) OWNER TO admin; -- -- Name: fetchmetrictext(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchmetrictext(text) RETURNS text LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _pMetricName ALIAS FOR $1; _returnVal TEXT; BEGIN SELECT metric_value::TEXT INTO _returnVal FROM metric WHERE metric_name = _pMetricName; RETURN _returnVal; END; $_$; ALTER FUNCTION public.fetchmetrictext(text) OWNER TO admin; -- -- Name: fetchmetricvalue(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchmetricvalue(text) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _pMetricName ALIAS FOR $1; _returnVal INTEGER; BEGIN SELECT CASE WHEN (isNumeric(metric_value)) THEN metric_value::INTEGER ELSE NULL END INTO _returnVal FROM metric WHERE metric_name = _pMetricName; RETURN _returnVal; END; $_$; ALTER FUNCTION public.fetchmetricvalue(text) OWNER TO admin; -- -- Name: fetchnextchecknumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchnextchecknumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; _nextChkNumber INTEGER; BEGIN SELECT bankaccnt_nextchknum INTO _nextChkNumber FROM bankaccnt WHERE (bankaccnt_id=pBankaccntid); UPDATE bankaccnt SET bankaccnt_nextchknum = (bankaccnt_nextchknum + 1) WHERE (bankaccnt_id=pBankaccntid); RETURN _nextChkNumber; END; $_$; ALTER FUNCTION public.fetchnextchecknumber(integer) OWNER TO admin; -- -- Name: fetchnextnumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchnextnumber(text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE psequence ALIAS FOR $1; _number TEXT; _numcol TEXT; _select TEXT; _table TEXT; _test TEXT; _nextnum INTEGER; _seqiss seqiss; __seqiss seqiss[]; _not_issued BOOLEAN; BEGIN SELECT CAST(orderseq_number AS text), orderseq_number, orderseq_table, orderseq_numcol, COALESCE(orderseq_seqiss, ARRAY[]::seqiss[]) INTO _number, _nextnum, _table, _numcol, __seqiss FROM orderseq WHERE (orderseq_name=psequence) FOR UPDATE; IF (NOT FOUND) THEN RAISE EXCEPTION 'Invalid orderseq_name %', psequence; END IF; LOOP _seqiss := (_nextnum, now()); SELECT count(*) = 0 INTO _not_issued FROM (SELECT UNNEST(__seqiss) AS issued) data WHERE (issued).seqiss_number = _nextnum; _nextnum := _nextnum + 1; -- Test if the number has been issued, but not committed IF (_not_issued) THEN -- Test if the number has been committed _select := 'SELECT ' || quote_ident(_numcol) || ' FROM ' || quote_ident(_table) || ' WHERE (' || quote_ident(_numcol) || '=' || quote_literal(_number) || ');'; EXECUTE _select INTO _test; IF (_test IS NULL OR NOT FOUND) THEN EXIT; END IF; END IF; -- Number in use, try again _number = _nextnum::text; END LOOP; UPDATE orderseq SET orderseq_number = _nextnum, orderseq_seqiss = orderseq_seqiss || _seqiss WHERE (orderseq_name=psequence); RETURN _number; END; $_$; ALTER FUNCTION public.fetchnextnumber(text) OWNER TO admin; -- -- Name: fetchponumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchponumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('PoNumber'); $$; ALTER FUNCTION public.fetchponumber() OWNER TO admin; -- -- Name: fetchprefwarehousid(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchprefwarehousid() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _result INTEGER; BEGIN SELECT CAST(usrpref_value AS INTEGER) INTO _result FROM usrpref WHERE ((usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse')); RETURN _result; END; $$; ALTER FUNCTION public.fetchprefwarehousid() OWNER TO admin; -- -- Name: fetchprnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchprnumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('PrNumber')::INTEGER; $$; ALTER FUNCTION public.fetchprnumber() OWNER TO admin; -- -- Name: fetchqunumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchqunumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('QuNumber'); $$; ALTER FUNCTION public.fetchqunumber() OWNER TO admin; -- -- Name: fetchshipmentnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchshipmentnumber() RETURNS text LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _number TEXT; _test INTEGER; BEGIN LOOP SELECT CAST(nextval('shipment_number_seq') AS TEXT) INTO _number; SELECT shiphead_id INTO _test FROM shiphead WHERE (shiphead_number=_number); IF (NOT FOUND) THEN EXIT; END IF; END LOOP; RETURN _number; END; $$; ALTER FUNCTION public.fetchshipmentnumber() OWNER TO admin; -- -- Name: fetchsonumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchsonumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('SoNumber'); $$; ALTER FUNCTION public.fetchsonumber() OWNER TO admin; -- -- Name: fetchtonumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchtonumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('ToNumber'); $$; ALTER FUNCTION public.fetchtonumber() OWNER TO admin; -- -- Name: fetchusrprefbool(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchusrprefbool(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _pPrefName ALIAS FOR $1; _returnVal BOOLEAN; BEGIN SELECT CASE WHEN MIN(usrpref_value) = 't' THEN true ELSE false END INTO _returnVal FROM usrpref WHERE ( (usrpref_username=getEffectiveXtUser()) AND (usrpref_name=_pPrefName) ); RETURN _returnVal; END; $_$; ALTER FUNCTION public.fetchusrprefbool(text) OWNER TO admin; -- -- Name: fetchvonumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchvonumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('VcNumber')::INTEGER; $$; ALTER FUNCTION public.fetchvonumber() OWNER TO admin; -- -- Name: fetchwonumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fetchwonumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('WoNumber')::INTEGER; $$; ALTER FUNCTION public.fetchwonumber() OWNER TO admin; -- -- Name: financialreport(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION financialreport(integer, integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pPrjid ALIAS FOR $3; _result bool; BEGIN SELECT financialreport(pFlheadid,pPeriodid,'M', pPrjid) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.financialreport(integer, integer, integer) OWNER TO admin; -- -- Name: financialreport(integer, integer, character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION financialreport(integer, integer, character, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pInterval ALIAS FOR $3; pPrjid ALIAS FOR $4; _r RECORD; _t RECORD; _s RECORD; BEGIN -- Validate Interval IF pInterval <> 'M' AND pInterval <> 'Q' AND pInterval <> 'Y' THEN RAISE EXCEPTION 'Invalid Interval --> %', pInterval; END IF; -- Get rid of any old reporting done by this user for the specified criteria DELETE FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodId) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())); -- Find out if we need to show a Grand Total and which if any of the values -- we want to show in that grand total. SELECT flhead_showtotal, CASE WHEN(flhead_showstart) THEN 0.00 ELSE NULL END AS beginning, CASE WHEN(flhead_showend) THEN 0.00 ELSE NULL END AS ending, CASE WHEN(flhead_showdelta) THEN 0.00 ELSE NULL END AS debits, CASE WHEN(flhead_showdelta) THEN 0.00 ELSE NULL END AS credits, CASE WHEN(flhead_showbudget) THEN 0.00 ELSE NULL END AS budget, CASE WHEN(flhead_showdiff) THEN 0.00 ELSE NULL END AS diff, CASE WHEN(flhead_showcustom) THEN 0.00 ELSE NULL END AS custom, CASE WHEN(flhead_usealttotal) THEN flhead_alttotal ELSE NULL END AS altname INTO _r FROM flhead WHERE (flhead_id=pFlheadid); IF (NOT FOUND) THEN return FALSE; END IF; -- If showing a Grand Total then create a record as a Group which acts -- as a parent to the whole report. This allows the code to update as -- it would for normal group total values. IF (_r.flhead_showtotal) THEN INSERT INTO flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_diff, flrpt_custom, flrpt_altname, flrpt_interval ) VALUES (pFlheadid, pPeriodid, getEffectiveXtUser(), 0, -1, 'G', -1, _r.beginning, _r.ending, _r.debits, _r.credits, _r.budget, _r.diff, _r.custom, _r.altname, pInterval ); END IF; PERFORM insertFlGroup(pFlheadid, pPeriodid, -1, 0, FALSE, pInterval, pPrjid); -- go through the list of records that need percentages calculated and perform -- those calculations. FOR _t IN SELECT flrpt_order, CASE WHEN(flgrp_prcnt_flgrp_id = -1) THEN flgrp_flgrp_id ELSE flgrp_prcnt_flgrp_id END AS flgrp_id FROM flrpt, flgrp WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=flgrp_id)) UNION SELECT flrpt_order, CASE WHEN(flitem_prcnt_flgrp_id = -1) THEN flitem_flgrp_id ELSE flitem_prcnt_flgrp_id END AS flgrp_id FROM flrpt, flitem WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='I') AND (flrpt_type_id=flitem_id)) UNION SELECT flrpt_order, CASE WHEN(flspec_prcnt_flgrp_id = -1) THEN flspec_flgrp_id ELSE flspec_prcnt_flgrp_id END AS flgrp_id FROM flrpt, flspec WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='S') AND (flrpt_type_id=flspec_id)) LOOP IF( (_t.flgrp_id=-1) OR (NOT (SELECT flgrp_summarize FROM flgrp WHERE flgrp_id=_t.flgrp_id)) ) THEN SELECT COALESCE(SUM(flrpt_beginning),0) AS beginningTotal, COALESCE(SUM(flrpt_ending),0) AS endingTotal, COALESCE(SUM(flrpt_debits),0) AS debitsTotal, COALESCE(SUM(flrpt_credits),0) AS creditsTotal, COALESCE(SUM(flrpt_budget),0) AS budgetTotal, COALESCE(SUM(flrpt_diff), 0) AS diffTotal, COALESCE(SUM(flrpt_custom), 0) AS customTotal INTO _s FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type != 'T') AND (flrpt_parent_id=_t.flgrp_id)); ELSE SELECT COALESCE(SUM(flrpt_beginning),0) AS beginningTotal, COALESCE(SUM(flrpt_ending),0) AS endingTotal, COALESCE(SUM(flrpt_debits),0) AS debitsTotal, COALESCE(SUM(flrpt_credits),0) AS creditsTotal, COALESCE(SUM(flrpt_budget),0) AS budgetTotal, COALESCE(SUM(flrpt_diff), 0) AS diffTotal, COALESCE(SUM(flrpt_custom), 0) AS customTotal INTO _s FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type = 'G') AND (flrpt_type_id=_t.flgrp_id)); END IF; UPDATE flrpt SET flrpt_beginningprcnt = flrpt_beginningprcnt + flrpt_beginning / CASE WHEN (_s.beginningTotal=0) THEN 1 ELSE _s.beginningTotal END, flrpt_endingprcnt = flrpt_endingprcnt + flrpt_ending / CASE WHEN (_s.endingTotal=0) THEN 1 ELSE _s.endingTotal END, flrpt_debitsprcnt = flrpt_debitsprcnt + flrpt_debits / CASE WHEN (_s.debitsTotal=0) THEN 1 ELSE _s.debitsTotal END, flrpt_creditsprcnt = flrpt_creditsprcnt + flrpt_credits / CASE WHEN (_s.creditsTotal=0) THEN 1 ELSE _s.creditsTotal END, flrpt_budgetprcnt = flrpt_budgetprcnt + flrpt_budget / CASE WHEN (_s.budgetTotal=0) THEN 1 ELSE _s.budgetTotal END, flrpt_diffprcnt = flrpt_diffprcnt + flrpt_diff / CASE WHEN (_s.diffTotal=0) THEN 1 ELSE _s.diffTotal END, flrpt_customprcnt = flrpt_customprcnt + flrpt_custom / CASE WHEN (_s.customTotal=0) THEN 1 ELSE _s.customTotal END WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_order=_t.flrpt_order)); END LOOP; -- Update any subtotal records to reflect the percentage values of the parents -- since those are calculated after the subtotal records were created. FOR _t IN SELECT a.flrpt_order AS flrpt_order, b.flrpt_beginningprcnt AS flrpt_beginningprcnt, b.flrpt_endingprcnt AS flrpt_endingprcnt, b.flrpt_debitsprcnt AS flrpt_debitsprcnt, b.flrpt_creditsprcnt AS flrpt_creditsprcnt, b.flrpt_budgetprcnt AS flrpt_budgetprcnt, b.flrpt_diffprcnt AS flrpt_diffprcnt, b.flrpt_customprcnt AS flrpt_customprcnt FROM flrpt AS a, flrpt AS b WHERE ((a.flrpt_flhead_id=pFlheadid) AND (a.flrpt_period_id=pPeriodid) AND (a.flrpt_interval=pInterval) AND (a.flrpt_username=getEffectiveXtUser()) AND (a.flrpt_type='T') AND (b.flrpt_flhead_id=a.flrpt_flhead_id) AND (b.flrpt_period_id=a.flrpt_period_id) AND (b.flrpt_interval=pInterval) AND (b.flrpt_username=a.flrpt_username) AND (b.flrpt_type='G') AND (b.flrpt_type_id=a.flrpt_parent_id)) LOOP UPDATE flrpt SET flrpt_beginningprcnt=flrpt_beginningprcnt + _t.flrpt_beginningprcnt, flrpt_endingprcnt=flrpt_endingprcnt + _t.flrpt_endingprcnt, flrpt_debitsprcnt=flrpt_debitsprcnt + _t.flrpt_debitsprcnt, flrpt_creditsprcnt=flrpt_creditsprcnt + _t.flrpt_creditsprcnt, flrpt_budgetprcnt=flrpt_budgetprcnt + _t.flrpt_budgetprcnt, flrpt_diffprcnt=flrpt_diffprcnt + _t.flrpt_diffprcnt, flrpt_customprcnt=flrpt_customprcnt + _t.flrpt_customprcnt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_order=_t.flrpt_order)); END LOOP; -- If showing a Grand total then move the record we created early to the -- end of the report and marked as a Total record. IF (_r.flhead_showtotal) THEN UPDATE flrpt SET flrpt_order = COALESCE((SELECT MAX(flrpt_order) FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ), 0) + 1, flrpt_level = 0, flrpt_type = 'T' WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_order=0) AND (flrpt_level = -1) AND (flrpt_type = 'G') AND (flrpt_type_id=-1)); END IF; return TRUE; END; $_$; ALTER FUNCTION public.financialreport(integer, integer, character, integer) OWNER TO admin; -- -- Name: financialreport(integer, integer[], character, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION financialreport(integer, integer[], character, boolean, integer) RETURNS SETOF fltrenditem LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadId ALIAS FOR $1; pPeriodIds ALIAS FOR $2; pInterval ALIAS FOR $3; pShowNumbers ALIAS FOR $4; pPrjid ALIAS FOR $5; _row fltrenditem%ROWTYPE; _type CHAR; _p RECORD; _count INTEGER; _n NUMERIC; _fld NUMERIC[]; _grndttl NUMERIC; _i INTEGER; _first BOOLEAN; _prevlevel INTEGER; _subgrp INTEGER; BEGIN _first := true; _subgrp := 0; IF ARRAY_UPPER(pPeriodIds,1) <= 12 THEN _count := ARRAY_UPPER(pPeriodIds,1); ELSE _count := 12; END IF; --Get Type SELECT flhead_type FROM flhead INTO _type WHERE flhead_id=pFlheadId; --Build Financial Data FOR _i IN 1.._count LOOP PERFORM financialreport(pFlheadId,pPeriodIds[_i],pInterval,pPrjid); END LOOP; --Get Row Data FOR _p IN SELECT flrpt_flhead_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, flrpt_accnt_id, formatindent(flgrp.flgrp_name,flrpt.flrpt_level) AS flrpt_name, CASE WHEN (flgrp_summarize AND (_type IN ('I','C'))) THEN (COALESCE(flrpt_diff,0)) WHEN (flgrp_summarize AND (_type = 'B')) THEN (COALESCE(flrpt_ending,0)) ELSE NULL END AS f_fld1, flgrp_summarize AS display FROM flrpt,flgrp WHERE ((flrpt_flhead_id=pFlheadId) AND (flgrp_id=flrpt_type_id) AND (flrpt_type='G') AND (flrpt_period_id=pPeriodIds[1]) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) UNION SELECT flrpt_flhead_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, flrpt_accnt_id, formatindent(accnt_descrip,flrpt.flrpt_level) AS flrpt_name, CASE WHEN (_type IN ('I','C')) THEN (COALESCE(flrpt_diff,0)) WHEN (_type = 'B') THEN (COALESCE(flrpt_ending,0)) ELSE NULL END AS f_fld1, true AS display FROM flrpt,flitem,accnt WHERE ((flrpt_flhead_id=pFlheadId) AND (flrpt_accnt_id=accnt_id) AND (flitem_id=flrpt_type_id) AND (flrpt_type='I') AND (flrpt_period_id=pPeriodIds[1]) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) UNION SELECT flrpt_flhead_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, flrpt_accnt_id, CASE WHEN (flrpt.flrpt_type='T' AND flrpt.flrpt_level=0) THEN COALESCE(flrpt.flrpt_altname, 'Total') WHEN (flrpt.flrpt_type='T') THEN formatindent(COALESCE(flrpt.flrpt_altname, 'Subtotal') ,flrpt.flrpt_level) ELSE formatindent(('Type ' || flrpt.flrpt_type || ' ' || text(flrpt.flrpt_type_id)), flrpt.flrpt_level) END AS flstmtitem_name, CASE WHEN (_type IN ('I','C')) THEN (COALESCE(flrpt_diff,0)) WHEN (_type = 'B') THEN (COALESCE(flrpt_ending,0)) ELSE NULL END AS f_fld1, true AS display FROM flrpt WHERE ((flrpt_flhead_id=pFlheadId) AND (flrpt_type NOT IN ('I','S','G')) AND (flrpt_period_id=pPeriodIds[1]) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ORDER BY flrpt_order LOOP IF _type IN ('I','C') THEN _grndttl := _p.f_fld1; END IF; --Loop through and calculate period column values IF (_p.display) THEN FOR _i IN 2.._count LOOP SELECT CASE WHEN (_type IN ('I','C')) THEN COALESCE(flrpt_diff,0) WHEN (_type = 'B') THEN COALESCE(flrpt_ending,0) ELSE NULL END INTO _n FROM flrpt WHERE ((flrpt_flhead_id=pFlheadId) AND (flrpt_period_id=pPeriodIds[_i]) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_order=_p.flrpt_order)); _fld[_i-1] := _n; IF _type IN ('I','C') THEN _grndttl := _grndttl+_n; END IF; END LOOP; END IF; --Send it all back to the caller IF _prevlevel > _p.flrpt_level THEN _subgrp := _subgrp+1; END IF; _prevlevel:=_p.flrpt_level; _row.fltrenditem_subgrp := _subgrp; IF NOT _first THEN RETURN NEXT _row; END IF; _first := FALSE; _row.fltrenditem_flhead_id := _p.flrpt_flhead_id; _row.fltrenditem_username := _p.flrpt_username; _row.fltrenditem_order := _p.flrpt_order; _row.fltrenditem_level := _p.flrpt_level; _row.fltrenditem_type := _p.flrpt_type; _row.fltrenditem_type_id := _p.flrpt_type_id; _row.fltrenditem_parent_id := _p.flrpt_parent_id; _row.fltrenditem_accnt_id := _p.flrpt_accnt_id; _row.fltrenditem_name := _p.flrpt_name; IF (_p.display) THEN _row.fltrenditem_fld1 := (_p.f_fld1); _row.fltrenditem_fld2 := (_fld[1]); _row.fltrenditem_fld3 := (_fld[2]); _row.fltrenditem_fld4 := (_fld[3]); _row.fltrenditem_fld5 := (_fld[4]); _row.fltrenditem_fld6 := (_fld[5]); _row.fltrenditem_fld7 := (_fld[6]); _row.fltrenditem_fld8 := (_fld[7]); _row.fltrenditem_fld9 := (_fld[8]); _row.fltrenditem_fld10 := (_fld[9]); _row.fltrenditem_fld11 := (_fld[10]); _row.fltrenditem_fld12 := (_fld[11]); _row.fltrenditem_grndttl := (_grndttl); ELSE _row.fltrenditem_fld1 := NULL; _row.fltrenditem_fld2 := NULL; _row.fltrenditem_fld3 := NULL; _row.fltrenditem_fld4 := NULL; _row.fltrenditem_fld5 := NULL; _row.fltrenditem_fld6 := NULL; _row.fltrenditem_fld7 := NULL; _row.fltrenditem_fld8 := NULL; _row.fltrenditem_fld9 := NULL; _row.fltrenditem_fld10 := NULL; _row.fltrenditem_fld11 := NULL; _row.fltrenditem_fld12 := NULL; _row.fltrenditem_grndttl := NULL; END IF; END LOOP; _row.fltrenditem_subgrp := _subgrp + 1; RETURN NEXT _row; END; $_$; ALTER FUNCTION public.financialreport(integer, integer[], character, boolean, integer) OWNER TO admin; -- -- Name: financialreport(integer, integer, boolean, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION financialreport(integer, integer, boolean, boolean, integer) RETURNS SETOF flstmtitem LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlcolid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pShowNumbers ALIAS FOR $3; pIndentName ALIAS FOR $4; pPrjid ALIAS FOR $5; _row flstmtitem%ROWTYPE; _p RECORD; _x RECORD; _priorMoPeriodId INTEGER; _priorQtPeriodId INTEGER; _priorYrPeriodId INTEGER; _first BOOLEAN; _prevlevel INTEGER; _subgrp INTEGER; _qtrInterval TEXT; _yrInterval TEXT; BEGIN _priorMoPeriodId := -1; _priorQtPeriodId := -1; _priorYrPeriodId := -1; _first := TRUE; _prevlevel :=0; _subgrp := 0; --Get Layout Data SELECT flhead_id,flhead_type, flcol_month,flcol_quarter,flcol_year,flcol_priortype, flcol_priormonth,flcol_priorquarter,flcol_prioryear, flcol_priordiff,flcol_priordiffprcnt,flcol_priorprcnt, flcol_budget,flcol_budgetdiff,flcol_budgetdiffprcnt, flcol_budgetprcnt INTO _p FROM flhead,flcol WHERE ((flcol_id=pFlcolid) AND (flhead_id=flcol_flhead_id)); IF (_p.flhead_type='B') THEN _qtrInterval := 'M'; _yrInterval := 'M'; ELSE _qtrInterval := 'Q'; _yrInterval := 'Y'; END IF; --Delete old data from all periods DELETE FROM flrpt WHERE ((flrpt_username=getEffectiveXtUser()) AND (flrpt_flhead_id=_p.flhead_id)); --Populate report data... --...for Month IF (_p.flcol_month) THEN PERFORM financialreport(_p.flhead_id,pPeriodid,'M',pPrjid); IF ((_p.flcol_priortype = 'P') AND (_p.flcol_priormonth)) THEN SELECT COALESCE(pp.period_id,-1) INTO _priorMoPeriodId FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorMoPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorMoPeriodId,'M',pPrjid); END IF; ELSE IF ((_p.flcol_priortype='Y')AND (_p.flcol_priormonth)) THEN SELECT COALESCE(pp.period_id,-1) INTO _priorMoPeriodId FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_id != pp.period_id) AND (cp.period_start > pp.period_start) AND (cp.period_number = pp.period_number)) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorMoPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorMoPeriodId,'M',pPrjid); END IF; END IF; END IF; END IF; --...for Quarter IF (_p.flcol_quarter) THEN PERFORM financialreport(_p.flhead_id,pPeriodid,'Q',pPrjid); END IF; IF ((_p.flcol_priortype='P') AND (_p.flcol_priorquarter)) THEN SELECT COALESCE(pp.period_id,-1) INTO _priorQtPeriodId FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start) AND (pp.period_quarter= CASE WHEN cp.period_quarter > 1 THEN cp.period_quarter - 1 ELSE 4 END) AND (pp.period_start >= cp.period_start - interval '1 year')) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorQtPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorQtPeriodId,'Q',pPrjid); END IF; ELSE IF ((_p.flcol_priortype='Y')AND (_p.flcol_priorquarter)) THEN SELECT pp.period_id INTO _priorQtPeriodId FROM period cp, period pp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=cy.yearperiod_id) AND (pp.period_yearperiod_id=py.yearperiod_id) AND (cp.period_quarter=pp.period_quarter) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY py.yearperiod_start DESC, pp.period_start DESC LIMIT 1; IF (_priorQtPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorQtPeriodId,'Q',pPrjid); END IF; END IF; END IF; --...for Year IF (_p.flcol_year) THEN PERFORM financialreport(_p.flhead_id,pPeriodid,'Y',pPrjid); END IF; IF (_p.flcol_prioryear='D') THEN SELECT COALESCE(pp.period_id,-1) INTO _priorYrPeriodId FROM period cp, period pp WHERE ((cp.period_id = pPeriodId) AND (cp.period_number = pp.period_number) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorYrPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorYrPeriodId,'Y',pPrjid); END IF; ELSE IF (_p.flcol_prioryear='F') THEN SELECT pp.period_id INTO _priorYrPeriodId FROM period cp, period pp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=cy.yearperiod_id) AND (pp.period_yearperiod_id=py.yearperiod_id) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorYrPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorYrPeriodId,'Y',pPrjid); END IF; END IF; END IF; --Return the data FOR _x IN SELECT flrpt.flrpt_flhead_id AS flstmtitem_flhead_id, flrpt.flrpt_period_id AS flstmtitem_period_id, flrpt.flrpt_username AS flstmtitem_username, flrpt.flrpt_order AS flstmtitem_order, flrpt.flrpt_level AS flstmtitem_level, flrpt.flrpt_type AS flstmtitem_type, flrpt.flrpt_type_id AS flstmtitem_type_id, flrpt.flrpt_parent_id AS flstmtitem_parent_id, NULL AS flstmtitem_accnt_id, CASE WHEN (pIndentName) THEN formatindent(flgrp.flgrp_name,flrpt.flrpt_level) ELSE flgrp.flgrp_name END AS flstmtitem_name, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C'))) THEN (COALESCE(flrptmo.flrpt_diff,0)) WHEN (flgrp_summarize AND (flhead_type = 'B')) THEN (COALESCE(flrptmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_month, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptmo.flrpt_debits,0)) ELSE NULL END AS flstmtitem_monthdb, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptmo.flrpt_credits,0)) ELSE NULL END AS flstmtitem_monthcr, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (COALESCE(flrptmo.flrpt_diffprcnt,0)) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (COALESCE(flrptmo.flrpt_endingprcnt,0)) ELSE NULL END AS flstmtitem_monthprcnt, CASE WHEN (flgrp_summarize) THEN (flrptmo.flrpt_budget) ELSE NULL END AS flstmtitem_monthbudget, CASE WHEN (flgrp_summarize) THEN (flrptmo.flrpt_budgetprcnt) ELSE NULL END AS flstmtitem_monthbudgetprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE((flrptmo.flrpt_diff-flrptmo.flrpt_budget),0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE((flrptmo.flrpt_ending-flrptmo.flrpt_budget),0)) ELSE NULL END AS flstmtitem_monthbudgetdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_diff-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) WHEN (flgrp_summarize AND (flhead_type='B') AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_ending-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) WHEN (flgrp_summarize AND (flrptmo.flrpt_budget = 0)) THEN NULL ELSE NULL END AS flstmtitem_monthbudgetdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_qtr, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptqt.flrpt_debits,0)) ELSE NULL END AS flstmtitem_qtrdb, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptqt.flrpt_credits,0)) ELSE NULL END AS flstmtitem_qtrcr, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (flrptqt.flrpt_diffprcnt) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (flrptqt.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_qtrprcnt, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptqt.flrpt_budget,0)) ELSE NULL END AS flstmtitem_qtrbudget, CASE WHEN (flgrp_summarize) THEN (flrptqt.flrpt_budgetprcnt) ELSE NULL END AS flstmtitem_qtrbudgetprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE((flrptqt.flrpt_diff-flrptqt.flrpt_budget),0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE((flrptqt.flrpt_ending-flrptqt.flrpt_budget),0)) ELSE NULL END AS flstmtitem_qtrbudgetdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_diff-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) WHEN (flgrp_summarize AND (flhead_type='B') AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_ending-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) ELSE NULL END AS flstmtitem_qtrbudgetdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptyr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_year, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptyr.flrpt_debits,0)) ELSE NULL END AS flstmtitem_yeardb, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptyr.flrpt_credits,0)) ELSE NULL END AS flstmtitem_yearcr, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (COALESCE(flrptyr.flrpt_diffprcnt,0)) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (COALESCE(flrptyr.flrpt_endingprcnt,0)) ELSE NULL END AS flstmtitem_yearprcnt, CASE WHEN (flgrp_summarize) THEN (flrptyr.flrpt_budget) ELSE NULL END AS flstmtitem_yearbudget, CASE WHEN (flgrp_summarize) THEN (flrptyr.flrpt_budgetprcnt) ELSE NULL END AS flstmtitem_yearbudgetprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE((flrptyr.flrpt_diff-flrptyr.flrpt_budget),0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE((flrptyr.flrpt_ending-flrptyr.flrpt_budget),0)) ELSE NULL END AS flstmtitem_yearbudgetdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_diff-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) WHEN (flgrp_summarize AND (flhead_type = 'B') AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_ending-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) WHEN (flgrp_summarize AND (flrptyr.flrpt_budget = 0)) THEN NULL ELSE NULL END AS flstmtitem_yearbudgetdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptprmo.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptprmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prmonth, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (flrptprmo.flrpt_diffprcnt) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (flrptprmo.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_prmonthprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff-flrptprmo.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptmo.flrpt_ending-flrptprmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prmonthdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptprmo.flrpt_diff > 0)) THEN (COALESCE((flrptmo.flrpt_diff-flrptprmo.flrpt_diff)/flrptprmo.flrpt_diff,0)) WHEN (flgrp_summarize AND (flhead_type = 'B') AND (flrptprmo.flrpt_ending > 0)) THEN (COALESCE((flrptmo.flrpt_ending-flrptprmo.flrpt_ending)/flrptprmo.flrpt_ending,0)) WHEN (flgrp_summarize AND (flrptprmo.flrpt_ending = 0)) THEN NULL ELSE NULL END AS flstmtitem_prmonthdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptprqt.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptprqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prqtr, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (flrptprqt.flrpt_diffprcnt) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (flrptprqt.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_prqtrprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff-flrptprqt.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptqt.flrpt_ending-flrptprqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prqtrdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptprqt.flrpt_diff > 0)) THEN (COALESCE((flrptqt.flrpt_diff-flrptprqt.flrpt_diff)/flrptprqt.flrpt_diff,0)) WHEN (flgrp_summarize AND (flhead_type = 'B') AND (flrptprqt.flrpt_ending > 0)) THEN (COALESCE((flrptqt.flrpt_ending-flrptprqt.flrpt_ending)/flrptprqt.flrpt_ending,0)) WHEN (flgrp_summarize AND (flrptprqt.flrpt_ending = 0)) THEN NULL ELSE NULL END AS flstmtitem_prqtrdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptpryr.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptpryr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_pryear, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (flrptpryr.flrpt_diffprcnt) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (flrptpryr.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_pryearprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff-flrptpryr.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptyr.flrpt_ending-flrptpryr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_pryeardiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptpryr.flrpt_diff > 0)) THEN (COALESCE((flrptyr.flrpt_diff-flrptpryr.flrpt_diff)/flrptpryr.flrpt_diff,0)) WHEN (flgrp_summarize AND (flhead_type = 'B' ) AND (flrptpryr.flrpt_ending > 0)) THEN (COALESCE((flrptyr.flrpt_ending-flrptpryr.flrpt_ending)/flrptpryr.flrpt_ending,0)) WHEN (flgrp_summarize AND (flrptpryr.flrpt_ending = 0)) THEN NULL ELSE NULL END AS flstmtitem_pryeardiffprcnt FROM flgrp,flhead, (SELECT DISTINCT flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id FROM flrpt WHERE ((flrpt_type='G') AND (flrpt_flhead_id=_p.flhead_id) AND (flrpt_period_id=pPeriodId) AND (flrpt_username=getEffectiveXtUser()))) AS flrpt LEFT OUTER JOIN flrpt flrptmo ON ((flrptmo.flrpt_type=flrpt.flrpt_type) AND (flrptmo.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptmo.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptmo.flrpt_interval='M') AND (flrptmo.flrpt_username=flrpt.flrpt_username) AND (flrptmo.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptqt ON ((flrptqt.flrpt_type=flrpt.flrpt_type) AND (flrptqt.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptqt.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptqt.flrpt_interval=_qtrInterval) AND (flrptqt.flrpt_username=flrpt.flrpt_username) AND (flrptqt.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptyr ON ((flrptyr.flrpt_type=flrpt.flrpt_type) AND (flrptyr.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptyr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptyr.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptyr.flrpt_interval=_yrInterval) AND (flrptyr.flrpt_username=flrpt.flrpt_username) AND (flrptyr.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptprmo ON ((flrptprmo.flrpt_type=flrpt.flrpt_type) AND (flrptprmo.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptprmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprmo.flrpt_period_id=_priorMoPeriodId) AND (flrptprmo.flrpt_interval='M') AND (flrptprmo.flrpt_username=flrpt.flrpt_username) AND (flrptprmo.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptprqt ON ((flrptprqt.flrpt_type=flrpt.flrpt_type) AND (flrptprqt.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptprqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprqt.flrpt_period_id=_priorQtPeriodId) AND (flrptprqt.flrpt_interval='Q') AND (flrptprqt.flrpt_username=flrpt.flrpt_username) AND (flrptprqt.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptpryr ON ((flrptpryr.flrpt_type=flrpt.flrpt_type) AND (flrptpryr.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptpryr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptpryr.flrpt_period_id=_priorYrPeriodId) AND (flrptpryr.flrpt_interval='Y') AND (flrptpryr.flrpt_username=flrpt.flrpt_username) AND (flrptpryr.flrpt_order=flrpt.flrpt_order)) WHERE ((flgrp_id = flrpt.flrpt_type_id) AND (flhead_id = flgrp_flhead_id)) UNION SELECT flrpt.flrpt_flhead_id AS flstmtitem_flhead_id, flrpt.flrpt_period_id AS flstmtitem_period_id, flrpt.flrpt_username AS flstmtitem_username, flrpt.flrpt_order AS flstmtitem_order, flrpt.flrpt_level AS flstmtitem_level, flrpt.flrpt_type AS flstmtitem_type, flrpt.flrpt_type_id AS flstmtitem_type_id, flrpt.flrpt_parent_id AS flstmtitem_parent_id, flrpt.flrpt_accnt_id AS flstmtitem_accnt_id, CASE WHEN (pIndentName) THEN formatindent(flrpt.flrpt_name,flrpt.flrpt_level) ELSE flrpt.flrpt_name END AS flstmtitem_name, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff,0)) ELSE (COALESCE(flrptmo.flrpt_ending,0)) END AS flstmtitem_month, (COALESCE(flrptmo.flrpt_debits,0)) AS flstmtitem_monthdb, (COALESCE(flrptmo.flrpt_credits,0)) AS flstmtitem_monthcr, CASE WHEN (flitem_showdiffprcnt) THEN (flrptmo.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptmo.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_monthprcnt, (COALESCE(flrptmo.flrpt_budget,0)) AS flstmtitem_monthbudget, (flrptmo.flrpt_budgetprcnt) AS flstmtitem_monthbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptmo.flrpt_diff-flrptmo.flrpt_budget),0)) ELSE (COALESCE((flrptmo.flrpt_ending-flrptmo.flrpt_budget),0)) END AS flstmtitem_monthbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_diff-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) WHEN ((flhead_type='B') AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_ending-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) ELSE NULL END AS flstmtitem_monthbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff,0)) ELSE (COALESCE(flrptqt.flrpt_ending,0)) END AS flstmtitem_qtr, (COALESCE(flrptqt.flrpt_debits,0)) AS flstmtitem_qtrdb, (COALESCE(flrptqt.flrpt_credits,0)) AS flstmtitem_qtrcr, CASE WHEN (flitem_showdiffprcnt) THEN (COALESCE(flrptqt.flrpt_diffprcnt,0)) WHEN (flitem_showendprcnt) THEN (COALESCE(flrptqt.flrpt_endingprcnt,0)) ELSE NULL END AS flstmtitem_qtrprcnt, (COALESCE(flrptqt.flrpt_budget,0)) AS flstmtitem_qtrbudget, (flrptqt.flrpt_budgetprcnt) AS flstmtitem_qtrbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptqt.flrpt_diff-flrptqt.flrpt_budget),0)) ELSE (COALESCE((flrptqt.flrpt_ending-flrptqt.flrpt_budget),0)) END AS flstmtitem_qtrbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_diff-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) WHEN ((flhead_type='B') AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_ending-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) ELSE NULL END AS flstmtitem_qtrbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff,0)) ELSE (COALESCE(flrptyr.flrpt_ending,0)) END AS flstmtitem_year, (COALESCE(flrptyr.flrpt_debits,0)) AS flstmtitem_yeardb, (COALESCE(flrptyr.flrpt_credits,0)) AS flstmtitem_yearcr, CASE WHEN (flitem_showdiffprcnt) THEN (flrptyr.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptyr.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_yearprcnt, (COALESCE(flrptyr.flrpt_budget,0)) AS flstmtitem_yearbudget, (flrptyr.flrpt_budgetprcnt) AS flstmtitem_yearbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptyr.flrpt_diff-flrptyr.flrpt_budget),0)) ELSE (COALESCE((flrptyr.flrpt_ending-flrptyr.flrpt_budget),0)) END AS flstmtitem_yearbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_diff-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) WHEN ((flhead_type = 'B') AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_ending-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) ELSE NULL END AS flstmtitem_yearbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptprmo.flrpt_diff,0)) ELSE (COALESCE(flrptprmo.flrpt_ending,0)) END AS flstmtitem_prmonth, CASE WHEN (flitem_showdiffprcnt) THEN (flrptprmo.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptprmo.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_prmonthprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff-flrptprmo.flrpt_diff,0)) ELSE (COALESCE(flrptmo.flrpt_ending-flrptprmo.flrpt_ending,0)) END AS flstmtitem_prmonthdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptprmo.flrpt_diff > 0)) THEN (COALESCE((flrptmo.flrpt_diff-flrptprmo.flrpt_diff)/flrptprmo.flrpt_diff,0)) WHEN ((flhead_type = 'B') AND (flrptprmo.flrpt_ending > 0)) THEN (COALESCE((flrptmo.flrpt_ending-flrptprmo.flrpt_ending)/flrptprmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prmonthdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptprqt.flrpt_diff,0)) ELSE (COALESCE(flrptprqt.flrpt_ending,0)) END AS flstmtitem_prqtr, CASE WHEN (flitem_showdiffprcnt) THEN (flrptprqt.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptprqt.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_prqtrprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff-flrptprqt.flrpt_diff,0)) ELSE (COALESCE(flrptqt.flrpt_ending-flrptprqt.flrpt_ending,0)) END AS flstmtitem_prqtrdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptprqt.flrpt_diff > 0)) THEN (COALESCE((flrptqt.flrpt_diff-flrptprqt.flrpt_diff)/flrptprqt.flrpt_diff,0)) WHEN ((flhead_type = 'B') AND (flrptprqt.flrpt_ending > 0)) THEN (COALESCE((flrptqt.flrpt_ending-flrptprqt.flrpt_ending)/flrptprqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prqtrdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptpryr.flrpt_diff,0)) ELSE (COALESCE(flrptpryr.flrpt_ending,0)) END AS flstmtitem_pryear, CASE WHEN (flitem_showdiffprcnt) THEN (flrptpryr.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptpryr.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_pryearprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptyr.flrpt_diff-flrptpryr.flrpt_diff),0)) ELSE (COALESCE((flrptyr.flrpt_ending-flrptpryr.flrpt_ending),0)) END AS flstmtitem_pryeardiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptpryr.flrpt_diff > 0)) THEN (COALESCE((flrptyr.flrpt_diff-flrptpryr.flrpt_diff)/flrptpryr.flrpt_diff,0)) WHEN ((flhead_type = 'B' ) AND (flrptpryr.flrpt_ending > 0)) THEN (COALESCE((flrptyr.flrpt_ending-flrptpryr.flrpt_ending)/flrptpryr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_pryeardiffprcnt FROM flitem,flhead, (SELECT DISTINCT flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, accnt_id AS flrpt_accnt_id, CASE WHEN (pShowNumbers) THEN (formatGLAccount(accnt_id) || '-' || accnt_descrip) ELSE accnt_descrip END AS flrpt_name FROM flrpt,accnt WHERE ((flrpt_type='I') AND (flrpt_flhead_id=_p.flhead_id) AND (flrpt_period_id=pPeriodid) AND (flrpt_username=getEffectiveXtUser()) AND (accnt_id=flrpt_accnt_id))) AS flrpt LEFT OUTER JOIN flrpt flrptmo ON ((flrptmo.flrpt_type=flrpt.flrpt_type) AND (flrptmo.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptmo.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptmo.flrpt_interval='M') AND (flrptmo.flrpt_username=flrpt.flrpt_username) AND (flrptmo.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptqt ON ((flrptqt.flrpt_type=flrpt.flrpt_type) AND (flrptqt.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptqt.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptqt.flrpt_interval=_qtrInterval) AND (flrptqt.flrpt_username=flrpt.flrpt_username) AND (flrptqt.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptyr ON ((flrptyr.flrpt_type=flrpt.flrpt_type) AND (flrptyr.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptyr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptyr.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptyr.flrpt_interval=_yrInterval) AND (flrptyr.flrpt_username=flrpt.flrpt_username) AND (flrptyr.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptprmo ON ((flrptprmo.flrpt_type=flrpt.flrpt_type) AND (flrptprmo.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptprmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprmo.flrpt_period_id=_priorMoPeriodId) AND (flrptprmo.flrpt_interval='M') AND (flrptprmo.flrpt_username=flrpt.flrpt_username) AND (flrptprmo.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptprqt ON ((flrptprqt.flrpt_type=flrpt.flrpt_type) AND (flrptprqt.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptprqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprqt.flrpt_period_id=_priorQtPeriodId) AND (flrptprqt.flrpt_interval='Q') AND (flrptprqt.flrpt_username=flrpt.flrpt_username) AND (flrptprqt.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptpryr ON ((flrptpryr.flrpt_type=flrpt.flrpt_type) AND (flrptpryr.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptpryr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptpryr.flrpt_period_id=_priorYrPeriodId) AND (flrptpryr.flrpt_interval='Y') AND (flrptpryr.flrpt_username=flrpt.flrpt_username) AND (flrptpryr.flrpt_order=flrpt.flrpt_order) ) WHERE ((flitem_id = flrpt.flrpt_type_id) AND (flhead_id = flitem_flhead_id)) UNION SELECT flrpt.flrpt_flhead_id AS flstmtitem_flhead_id, flrpt.flrpt_period_id AS flstmtitem_period_id, flrpt.flrpt_username AS flstmtitem_username, flrpt.flrpt_order AS flstmtitem_order, flrpt.flrpt_level AS flstmtitem_level, flrpt.flrpt_type AS flstmtitem_type, flrpt.flrpt_type_id AS flstmtitem_type_id, flrpt.flrpt_parent_id AS flstmtitem_parent_id, NULL AS flstmtitem_accnt_id, CASE WHEN(flrpt.flrpt_type='T' AND flrpt.flrpt_level=0) THEN COALESCE(flrpt.flrpt_altname, 'Total') WHEN(flrpt.flrpt_type='T') THEN formatindent(COALESCE(flrpt.flrpt_altname, 'Subtotal') , (CASE WHEN pIndentName THEN flrpt.flrpt_level ELSE 0 END)) ELSE formatindent(('Type ' || flrpt.flrpt_type || ' ' || text(flrpt.flrpt_type_id)), (CASE WHEN pIndentName THEN flrpt.flrpt_level ELSE 0 END)) END AS flstmtitem_name, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff,0)) ELSE (COALESCE(flrptmo.flrpt_ending,0)) END AS flstmtitem_month, (COALESCE(flrptmo.flrpt_debits,0)) AS flstmtitem_monthdb, (COALESCE(flrptmo.flrpt_credits,0)) AS flstmtitem_monthcr, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptmo.flrpt_diffprcnt) ELSE (flrptmo.flrpt_endingprcnt) END AS flstmtitem_monthprcnt, (COALESCE(flrptmo.flrpt_budget,0)) AS flstmtitem_monthbudget, (flrptmo.flrpt_budgetprcnt) AS flstmtitem_monthbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptmo.flrpt_diff-flrptmo.flrpt_budget),0)) ELSE (COALESCE((flrptmo.flrpt_ending-flrptmo.flrpt_budget),0)) END AS flstmtitem_monthbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_diff-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) WHEN ((flhead_type='B') AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_ending-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) ELSE NULL END AS flstmtitem_monthbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff,0)) ELSE (COALESCE(flrptqt.flrpt_ending,0)) END AS flstmtitem_qtr, (COALESCE(flrptqt.flrpt_debits,0)) AS flstmtitem_qtrdb, (COALESCE(flrptqt.flrpt_credits,0)) AS flstmtitem_qtrcr, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptqt.flrpt_diffprcnt) ELSE (flrptqt.flrpt_endingprcnt) END AS flstmtitem_qtrprcnt, (COALESCE(flrptqt.flrpt_budget,0)) AS flstmtitem_qtrbudget, (flrptqt.flrpt_budgetprcnt) AS flstmtitem_qtrbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptqt.flrpt_diff-flrptqt.flrpt_budget),0)) ELSE (COALESCE((flrptqt.flrpt_ending-flrptqt.flrpt_budget),0)) END AS flstmtitem_qtrbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_diff-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) WHEN ((flhead_type='B') AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_ending-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) ELSE NULL END AS flstmtitem_qtrbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff,0)) ELSE (COALESCE(flrptyr.flrpt_ending,0)) END AS flstmtitem_year, (COALESCE(flrptyr.flrpt_debits,0)) AS flstmtitem_yeardb, (COALESCE(flrptyr.flrpt_credits,0)) AS flstmtitem_yearcr, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptyr.flrpt_diffprcnt) ELSE (flrptyr.flrpt_endingprcnt) END AS flstmtitem_yearprcnt, (COALESCE(flrptyr.flrpt_budget,0)) AS flstmtitem_yearbudget, (flrptyr.flrpt_budgetprcnt) AS flstmtitem_yearbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptyr.flrpt_diff-flrptyr.flrpt_budget),0)) ELSE (COALESCE((flrptyr.flrpt_ending-flrptyr.flrpt_budget),0)) END AS flstmtitem_yearbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_diff-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) WHEN ((flhead_type = 'B') AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_ending-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) ELSE NULL END AS flstmtitem_yearbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptprmo.flrpt_diff,0)) ELSE (COALESCE(flrptprmo.flrpt_ending,0)) END AS flstmtitem_prmonth, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptprmo.flrpt_diffprcnt) ELSE (flrptprmo.flrpt_endingprcnt) END AS flstmtitem_prmonthprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff-flrptprmo.flrpt_diff,0)) ELSE (COALESCE(flrptmo.flrpt_ending-flrptprmo.flrpt_ending,0)) END AS flstmtitem_prmonthdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptprmo.flrpt_diff > 0)) THEN (COALESCE((flrptmo.flrpt_diff-flrptprmo.flrpt_diff)/flrptprmo.flrpt_diff,0)) WHEN ((flhead_type = 'B') AND (flrptprmo.flrpt_ending > 0)) THEN (COALESCE((flrptmo.flrpt_ending-flrptprmo.flrpt_ending)/flrptprmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prmonthdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptprqt.flrpt_diff,0)) ELSE (COALESCE(flrptprqt.flrpt_ending,0)) END AS flstmtitem_prqtr, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptprqt.flrpt_diffprcnt) ELSE (flrptprqt.flrpt_endingprcnt) END AS flstmtitem_prqtrprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff-flrptprqt.flrpt_diff,0)) ELSE (COALESCE(flrptqt.flrpt_ending-flrptprqt.flrpt_ending,0)) END AS flstmtitem_prqtrdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptprqt.flrpt_diff > 0)) THEN (COALESCE((flrptqt.flrpt_diff-flrptprqt.flrpt_diff)/flrptprqt.flrpt_diff,0)) WHEN ((flhead_type = 'B') AND (flrptprqt.flrpt_ending > 0)) THEN (COALESCE((flrptqt.flrpt_ending-flrptprqt.flrpt_ending)/flrptprqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prqtrdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptpryr.flrpt_diff,0)) ELSE (COALESCE(flrptpryr.flrpt_ending,0)) END AS flstmtitem_pryear, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptpryr.flrpt_diffprcnt) ELSE (flrptpryr.flrpt_endingprcnt) END AS flstmtitem_pryearprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff-flrptpryr.flrpt_diff,0)) ELSE (COALESCE(flrptyr.flrpt_ending-flrptpryr.flrpt_ending,0)) END AS flstmtitem_pryeardiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptpryr.flrpt_diff > 0)) THEN (COALESCE((flrptyr.flrpt_diff-flrptpryr.flrpt_diff)/flrptpryr.flrpt_diff,0)) WHEN ((flhead_type = 'B' ) AND (flrptpryr.flrpt_ending > 0)) THEN (COALESCE((flrptyr.flrpt_ending-flrptpryr.flrpt_ending)/flrptpryr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_pryeardiffprcnt FROM flhead CROSS JOIN (SELECT DISTINCT flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, flrpt_altname FROM flrpt WHERE ((NOT (flrpt_type IN ('G','I','S'))) AND (flrpt_flhead_id=_p.flhead_id) AND (flrpt_period_id=pPeriodId) AND (flrpt_username=getEffectiveXtUser()))) AS flrpt LEFT OUTER JOIN flrpt flrptmo ON ((flrptmo.flrpt_type=flrpt.flrpt_type) AND (flrptmo.flrpt_order=flrpt.flrpt_order) AND (flrptmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptmo.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptmo.flrpt_interval='M') AND (flrptmo.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptqt ON ((flrptqt.flrpt_type=flrpt.flrpt_type) AND (flrptqt.flrpt_order=flrpt.flrpt_order) AND (flrptqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptqt.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptqt.flrpt_interval=_qtrInterval) AND (flrptqt.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptyr ON ((flrptyr.flrpt_type=flrpt.flrpt_type) AND (flrptyr.flrpt_order=flrpt.flrpt_order) AND (flrptyr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptyr.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptyr.flrpt_interval=_yrInterval) AND (flrptyr.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptprmo ON ((flrptprmo.flrpt_type=flrpt.flrpt_type) AND (flrptprmo.flrpt_order=flrpt.flrpt_order) AND (flrptprmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprmo.flrpt_period_id=_priorMoPeriodId) AND (flrptprmo.flrpt_interval='M') AND (flrptprmo.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptprqt ON ((flrptprqt.flrpt_type=flrpt.flrpt_type) AND (flrptprqt.flrpt_order=flrpt.flrpt_order) AND (flrptprqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprqt.flrpt_period_id=_priorQtPeriodId) AND (flrptprqt.flrpt_interval='Q') AND (flrptprqt.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptpryr ON ((flrptpryr.flrpt_type=flrpt.flrpt_type) AND (flrptpryr.flrpt_order=flrpt.flrpt_order) AND (flrptpryr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptpryr.flrpt_period_id=_priorYrPeriodId) AND (flrptpryr.flrpt_interval='Y') AND (flrptpryr.flrpt_username=flrpt.flrpt_username)) WHERE (flhead_id=flrpt.flrpt_flhead_id) ORDER BY flstmtitem_order LOOP IF _prevlevel > _x.flstmtitem_level THEN _subgrp := _subgrp+1; END IF; _prevlevel:=_x.flstmtitem_level; _row.flstmtitem_subgrp := _subgrp; IF NOT _first THEN RETURN NEXT _row; END IF; _first := FALSE; _row.flstmtitem_flhead_id := _x.flstmtitem_flhead_id; _row.flstmtitem_period_id := _x.flstmtitem_period_id; _row.flstmtitem_username := _x.flstmtitem_username; _row.flstmtitem_order := _x.flstmtitem_order; _row.flstmtitem_level := _x.flstmtitem_level; _row.flstmtitem_type := _x.flstmtitem_type; _row.flstmtitem_type_id := _x.flstmtitem_type_id; _row.flstmtitem_parent_id := _x.flstmtitem_parent_id; _row.flstmtitem_accnt_id := _x.flstmtitem_accnt_id; _row.flstmtitem_name := _x.flstmtitem_name; _row.flstmtitem_month := _x.flstmtitem_month; _row.flstmtitem_monthdb := _x.flstmtitem_monthdb; _row.flstmtitem_monthcr := _x.flstmtitem_monthcr; _row.flstmtitem_monthprcnt := _x.flstmtitem_monthprcnt; _row.flstmtitem_monthbudget := _x.flstmtitem_monthbudget; _row.flstmtitem_monthbudgetprcnt := _x.flstmtitem_monthbudgetprcnt; _row.flstmtitem_monthbudgetdiff := _x.flstmtitem_monthbudgetdiff; _row.flstmtitem_monthbudgetdiffprcnt := _x.flstmtitem_monthbudgetdiffprcnt; _row.flstmtitem_qtr := _x.flstmtitem_qtr; _row.flstmtitem_qtrdb := _x.flstmtitem_qtrdb; _row.flstmtitem_qtrcr := _x.flstmtitem_qtrcr; _row.flstmtitem_qtrprcnt := _x.flstmtitem_qtrprcnt; _row.flstmtitem_qtrbudget := _x.flstmtitem_qtrbudget; _row.flstmtitem_qtrbudgetprcnt := _x.flstmtitem_qtrbudgetprcnt; _row.flstmtitem_qtrbudgetdiff := _x.flstmtitem_qtrbudgetdiff; _row.flstmtitem_qtrbudgetdiffprcnt := _x.flstmtitem_qtrbudgetdiffprcnt; _row.flstmtitem_year := _x.flstmtitem_year; _row.flstmtitem_yeardb := _x.flstmtitem_yeardb; _row.flstmtitem_yearcr := _x.flstmtitem_yearcr; _row.flstmtitem_yearprcnt := _x.flstmtitem_yearprcnt; _row.flstmtitem_yearbudget := _x.flstmtitem_yearbudget; _row.flstmtitem_yearbudgetprcnt := _x.flstmtitem_yearbudgetprcnt; _row.flstmtitem_yearbudgetdiff := _x.flstmtitem_yearbudgetdiff; _row.flstmtitem_yearbudgetdiffprcnt := _x.flstmtitem_yearbudgetdiffprcnt; _row.flstmtitem_prmonth := _x.flstmtitem_prmonth; _row.flstmtitem_prmonthprcnt := _x.flstmtitem_prmonthprcnt; _row.flstmtitem_prmonthdiff := _x.flstmtitem_prmonthdiff; _row.flstmtitem_prmonthdiffprcnt := _x.flstmtitem_prmonthdiffprcnt; _row.flstmtitem_prqtr := _x.flstmtitem_prqtr; _row.flstmtitem_prqtrprcnt := _x.flstmtitem_prqtrprcnt; _row.flstmtitem_prqtrdiff := _x.flstmtitem_prqtrdiff; _row.flstmtitem_prqtrdiffprcnt := _x.flstmtitem_prqtrdiffprcnt; _row.flstmtitem_pryear := _x.flstmtitem_pryear; _row.flstmtitem_pryearprcnt := _x.flstmtitem_pryearprcnt; _row.flstmtitem_pryeardiff := _x.flstmtitem_pryeardiff; _row.flstmtitem_pryeardiffprcnt := _x.flstmtitem_pryeardiffprcnt; END LOOP; _row.flstmtitem_subgrp := _subgrp + 1; RETURN NEXT _row; END; $_$; ALTER FUNCTION public.financialreport(integer, integer, boolean, boolean, integer) OWNER TO admin; -- -- Name: findapaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findapaccount(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceAPToGL')) THEN RETURN 0; END IF; SELECT apaccnt_ap_accnt_id INTO _accntid FROM apaccnt JOIN vendinfo ON (apaccnt_vendtype_id=vend_vendtype_id) WHERE (vend_id=pVendid); IF (FOUND) THEN RETURN _accntid; END IF; SELECT apaccnt_ap_accnt_id INTO _accntid FROM apaccnt JOIN vendtype ON (vendtype_code ~ apaccnt_vendtype) JOIN vendinfo ON (vend_vendtype_id=vendtype_id) WHERE ((apaccnt_vendtype_id=-1) AND (vend_id=pVendid)); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.findapaccount(integer) OWNER TO admin; -- -- Name: findapdiscountaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findapdiscountaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceAPToGL')) THEN RETURN 0; END IF; SELECT apaccnt_discount_accnt_id INTO _accntid FROM apaccnt JOIN vendinfo ON (apaccnt_vendtype_id=vend_vendtype_id) WHERE (vend_id=pVendid); IF (FOUND) THEN RETURN _accntid; END IF; SELECT apaccnt_discount_accnt_id INTO _accntid FROM apaccnt JOIN vendtype ON (vendtype_code ~ apaccnt_vendtype) JOIN vendinfo ON (vend_vendtype_id=vendtype_id) WHERE ((apaccnt_vendtype_id=-1) AND (vend_id=pVendid)); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.findapdiscountaccount(integer) OWNER TO admin; -- -- Name: findapprepaidaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findapprepaidaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceAPToGL')) THEN RETURN 0; END IF; -- Check for a Vendor Type specific Account SELECT apaccnt_prepaid_accnt_id INTO _accntid FROM apaccnt JOIN vendinfo ON (apaccnt_vendtype_id=vend_vendtype_id) WHERE (vend_id=pVendid); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Vendor Type pattern SELECT apaccnt_prepaid_accnt_id INTO _accntid FROM apaccnt JOIN vendtype ON (vendtype_code ~ apaccnt_vendtype) JOIN vendinfo ON (vend_vendtype_id=vendtype_id) WHERE ((apaccnt_vendtype_id=-1) AND (vend_id=pVendid)); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.findapprepaidaccount(integer) OWNER TO admin; -- -- Name: findaraccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findaraccount(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_ar_accnt_id INTO _accntid FROM araccnt, custinfo WHERE ( (araccnt_custtype_id=cust_custtype_id) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_ar_accnt_id INTO _accntid FROM araccnt, custinfo, custtype WHERE ( (custtype_code ~ araccnt_custtype) AND (araccnt_custtype_id=-1) AND (cust_custtype_id=custtype_id) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.findaraccount(integer) OWNER TO admin; -- -- Name: findardiscountaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findardiscountaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_discount_accnt_id INTO _accntid FROM araccnt, custinfo WHERE ( (araccnt_custtype_id=cust_custtype_id) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_discount_accnt_id INTO _accntid FROM araccnt, custinfo, custtype WHERE ( (custtype_code ~ araccnt_custtype) AND (cust_custtype_id=custtype_id) AND (araccnt_custtype_id=-1) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.findardiscountaccount(integer) OWNER TO admin; -- -- Name: findcalendarorigin(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findcalendarorigin(integer) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCalheadid ALIAS FOR $1; _originType CHAR(1); _origin DATE; BEGIN SELECT calhead_origin INTO _originType FROM calhead WHERE (calhead_id=pCalheadid); IF (NOT FOUND) THEN _origin := NULL; ELSIF (_originType = 'D') THEN _origin := CURRENT_DATE; ELSIF (_originType = 'E') THEN _origin := (CURRENT_DATE + 1); ELSIF (_originType = 'W') THEN _origin := (CURRENT_DATE - EXTRACT(DOW FROM CURRENT_DATE)::INTEGER); ELSIF (_originType = 'X') THEN _origin := ((CURRENT_DATE - EXTRACT(DOW FROM CURRENT_DATE)::INTEGER) + INTERVAL '1 week'); ELSIF (_originType = 'M') THEN _origin := date_trunc('month', CURRENT_DATE); ELSIF (_originType = 'N') THEN _origin := (date_trunc('month', CURRENT_DATE) + INTERVAL '1 month'); ELSIF (_originType = 'L') THEN _origin := (date_trunc('year', CURRENT_DATE) - INTERVAL '1 year'); ELSIF (_originType = 'Y') THEN _origin := date_trunc('year', CURRENT_DATE); ELSIF (_originType = 'Z') THEN _origin := (date_trunc('year', CURRENT_DATE) + INTERVAL '1 year'); ELSE _origin := NULL; END IF; RETURN _origin; END; $_$; ALTER FUNCTION public.findcalendarorigin(integer) OWNER TO admin; -- -- Name: findcustomerform(integer, character); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findcustomerform(integer, character) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pFormtype ALIAS FOR $2; _f RECORD; _found BOOLEAN; BEGIN -- Check for a Customer Type specific Form SELECT custform.* INTO _f FROM custform JOIN custinfo ON (custform_custtype_id=cust_custtype_id) WHERE (cust_id=pCustid); IF (FOUND) THEN _found := TRUE; ELSE -- Check for a Customer Type pattern SELECT custform.* INTO _f FROM custform JOIN custtype ON (custtype_code ~ custform_custtype) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE ((custform_custtype_id=-1) AND (cust_id=pCustid)); IF (FOUND) THEN _found := TRUE; ELSE _found := FALSE; END IF; END IF; IF (_found) THEN IF ( (pFormType = 'I') AND (_f.custform_invoice_report_name IS NOT NULL) ) THEN RETURN _f.custform_invoice_report_name; ELSIF ( (pFormType = 'C') AND (_f.custform_creditmemo_report_name IS NOT NULL) ) THEN RETURN _f.custform_creditmemo_report_name; ELSIF ( (pFormType = 'S') AND (_f.custform_statement_report_name IS NOT NULL) ) THEN RETURN _f.custform_statement_report_name; ELSIF ( (pFormType = 'Q') AND (_f.custform_quote_report_name IS NOT NULL) ) THEN RETURN _f.custform_quote_report_name; ELSIF ( (pFormType = 'P') AND (_f.custform_packinglist_report_name IS NOT NULL) ) THEN RETURN _f.custform_packinglist_report_name; ELSIF ( (pFormType = 'L') AND (_f.custform_sopicklist_report_name IS NOT NULL) ) THEN RETURN _f.custform_sopicklist_report_name; END IF; END IF; IF (pFormType = 'I') THEN RETURN 'Invoice'; ELSIF (pFormType = 'C') THEN RETURN 'CreditMemo'; ELSIF (pFormType = 'S') THEN RETURN 'Statement'; ELSIF (pFormType = 'Q') THEN RETURN 'Quote'; ELSIF (pFormType = 'P') THEN RETURN 'PackingList-Shipment'; ELSIF (pFormType = 'L') THEN RETURN 'PackingList'; END IF; END; $_$; ALTER FUNCTION public.findcustomerform(integer, character) OWNER TO admin; -- -- Name: finddeferredaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION finddeferredaccount(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_deferred_accnt_id INTO _accntid FROM araccnt JOIN custinfo ON (araccnt_custtype_id=cust_custtype_id) WHERE (cust_id=pCustid); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_deferred_accnt_id INTO _accntid FROM araccnt JOIN custtype ON (custtype_code ~ araccnt_custtype) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE ((araccnt_custtype_id=-1) AND (cust_id=pCustid)); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.finddeferredaccount(integer) OWNER TO admin; -- -- Name: findfreightaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findfreightaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_freight_accnt_id INTO _accntid FROM araccnt, custinfo WHERE ( (araccnt_custtype_id=cust_custtype_id) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_freight_accnt_id INTO _accntid FROM araccnt, custinfo, custtype WHERE ( (custtype_code ~ araccnt_custtype) AND (cust_custtype_id=custtype_id) AND (araccnt_custtype_id=-1) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; -- Find the default SELECT metric_value::INTEGER INTO _accntid FROM metric WHERE (metric_name='FreightAccount'); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.findfreightaccount(integer) OWNER TO admin; -- -- Name: findperiodend(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findperiodend(integer) RETURNS date LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCalitemid ALIAS FOR $1; _calType CHAR(1); _calItem RECORD; _start DATE; _loop INTEGER; BEGIN SELECT calhead_type INTO _calType FROM calhead, acalitem WHERE ((acalitem_calhead_id=calhead_id) AND (acalitem_id=pCalitemid)); IF (NOT FOUND) THEN SELECT calhead_type INTO _calType FROM calhead, rcalitem WHERE ((rcalitem_calhead_id=calhead_id) AND (rcalitem_id=pCalitemid)); IF (NOT FOUND) THEN RETURN NULL; END IF; END IF; IF (_calType = 'A') THEN RETURN ( SELECT (findPeriodStart(acalitem_id) + acalitem_periodlength - 1) FROM acalitem WHERE (acalitem_id=pCalitemid) ); ELSIF (_calType = 'R') THEN -- Grab the relative calitem's particulars SELECT rcalitem_periodtype, rcalitem_periodcount INTO _calitem FROM rcalitem WHERE (rcalitem_id=pCalitemid); IF (NOT FOUND) THEN RETURN NULL; END If; -- Grab the origin of the calitem SELECT findPeriodStart(pCalitemid) INTO _start; IF (_start IS NULL) THEN -- If days... ELSIF (_calitem.rcalitem_periodtype = 'D') THEN _start := (_start + _calitem.rcalitem_periodcount - 1); -- If weeks... (gotta be a better way) ELSIF (_calitem.rcalitem_periodtype = 'W') THEN _loop := _calitem.rcalitem_periodcount; WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 week'); _loop := (_loop - 1); END LOOP; _start := (_start - 1); -- If months... (gotta be a better way) ELSIF (_calitem.rcalitem_periodtype = 'M') THEN _loop := _calitem.rcalitem_periodcount; WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 month'); _loop := (_loop - 1); END LOOP; _start := (_start - 1); -- If years... (gotta be a better way) ELSIF (_calitem.rcalitem_periodtype = 'Y') THEN _loop := _calitem.rcalitem_periodcount; WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 year'); _loop := (_loop - 1); END LOOP; _start := (_start - 1); ELSE _start := NULL; END IF; ELSE _start := NULL; END IF; RETURN _start; END; $_$; ALTER FUNCTION public.findperiodend(integer) OWNER TO admin; -- -- Name: findperiodstart(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findperiodstart(integer) RETURNS date LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCalitemid ALIAS FOR $1; _calType CHAR(1); _calItem RECORD; _start DATE; _loop INTEGER; BEGIN SELECT calhead_type INTO _calType FROM calhead, acalitem WHERE ((acalitem_calhead_id=calhead_id) AND (acalitem_id=pCalitemid)); IF (NOT FOUND) THEN SELECT calhead_type INTO _calType FROM calhead, rcalitem WHERE ((rcalitem_calhead_id=calhead_id) AND (rcalitem_id=pCalitemid)); IF (NOT FOUND) THEN RETURN NULL; END IF; END IF; IF (_calType = 'A') THEN RETURN ( SELECT acalitem_periodstart FROM acalitem WHERE (acalitem_id=pCalitemid) ); ELSIF (_calType = 'R') THEN -- Grab the relative calitem's particulars SELECT rcalitem_offsettype, rcalitem_offsetcount INTO _calitem FROM rcalitem WHERE (rcalitem_id=pCalitemid); IF (NOT FOUND) THEN RETURN NULL; END If; -- Grab the origin of the calitem's parend calhead SELECT findCalendarOrigin(calhead_id) INTO _start FROM calhead, rcalitem WHERE ((rcalitem_calhead_id=calhead_id) AND (rcalitem_id=pCalitemid)); -- If days... IF (_calitem.rcalitem_offsettype = 'D') THEN _start := (_start + _calitem.rcalitem_offsetcount); -- If weeks... ELSIF (_calitem.rcalitem_offsettype = 'W') THEN _start := (_start + (_calitem.rcalitem_offsetcount * 7)); -- If months... (gotta be a better way) ELSIF (_calitem.rcalitem_offsettype = 'M') THEN _loop := _calitem.rcalitem_offsetcount; IF (_loop > 0) THEN WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 month'); _loop := _loop - 1; END LOOP; ELSE WHILE (_loop < 0) LOOP _start := (_start - INTERVAL '1 month'); _loop := _loop + 1; END LOOP; END IF; -- If years... (gotta be a better way) ELSIF (_calitem.rcalitem_offsettype = 'Y') THEN _loop := _calitem.rcalitem_offsetcount; IF (_loop > 0) THEN WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 year'); _loop := _loop - 1; END LOOP; ELSE WHILE (_loop < 0) LOOP _start := (_start - INTERVAL '1 year'); _loop := _loop + 1; END LOOP; END IF; ELSE _start := NULL; END IF; ELSE _start := NULL; END IF; RETURN _start; END; $_$; ALTER FUNCTION public.findperiodstart(integer) OWNER TO admin; -- -- Name: findprepaidaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findprepaidaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_prepaid_accnt_id INTO _accntid FROM araccnt JOIN custinfo ON (araccnt_custtype_id=cust_custtype_id) WHERE (cust_id=pCustid); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_prepaid_accnt_id INTO _accntid FROM araccnt JOIN custtype ON (custtype_code ~ araccnt_custtype) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE ((araccnt_custtype_id=-1) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.findprepaidaccount(integer) OWNER TO admin; -- -- Name: findsalesaccnt(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findsalesaccnt(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN findSalesAccnt($1, 'IS', $2, NULL, NULL); END; $_$; ALTER FUNCTION public.findsalesaccnt(integer, integer) OWNER TO admin; -- -- Name: findsalesaccnt(integer, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findsalesaccnt(integer, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN findSalesAccnt($1, $2, $3, NULL, NULL); END; $_$; ALTER FUNCTION public.findsalesaccnt(integer, text, integer) OWNER TO admin; -- -- Name: findsalesaccnt(integer, text, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findsalesaccnt(pid integer, pidtype text, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _s RECORD; BEGIN IF (pidType = 'I') THEN -- Check for a custtype specific rule SELECT salesaccnt_id, CASE WHEN (salesaccnt_warehous_id<>-1) THEN 1 ELSE 0 END + CASE WHEN (salesaccnt_custtype_id<>-1) THEN 2 ELSE 0 END + CASE WHEN (salesaccnt_prodcat_id<>-1) THEN 3 ELSE 0 END + CASE WHEN (salesaccnt_shipzone_id<>-1) THEN 4 ELSE 0 END + CASE WHEN (salesaccnt_saletype_id<>-1) THEN 5 ELSE 0 END AS orderby INTO _s FROM salesaccnt, item, prodcat, custinfo, custtype WHERE ( (salesaccnt_warehous_id=-1) AND (item_prodcat_id=prodcat_id) AND (cust_custtype_id=custtype_id) AND ( (salesaccnt_prodcat='.*') OR ( (salesaccnt_prodcat_id=-1) AND (salesaccnt_prodcat<>'') AND (prodcat_code ~ salesaccnt_prodcat) ) OR ( (salesaccnt_prodcat_id=prodcat_id) ) ) AND ( (salesaccnt_custtype='.*') OR ( (salesaccnt_custtype_id=-1) AND (salesaccnt_custtype<>'') AND (custtype_code ~ salesaccnt_custtype) ) OR ( (salesaccnt_custtype_id=custtype_id) ) ) AND ( (salesaccnt_shipzone_id=-1) OR (salesaccnt_shipzone_id=pShipzoneid) ) AND ( (salesaccnt_saletype_id=-1) OR (salesaccnt_saletype_id=pSaletypeid) ) AND (item_id=pid) AND (cust_id=pCustid) ) ORDER BY orderby DESC, salesaccnt_custtype DESC, salesaccnt_prodcat DESC, salesaccnt_saletype_id DESC, salesaccnt_shipzone_id DESC LIMIT 1; ELSIF (pidType = 'IS') THEN -- Check for a custtype specific rule SELECT salesaccnt_id, CASE WHEN (salesaccnt_warehous_id<>-1) THEN 1 ELSE 0 END + CASE WHEN (salesaccnt_custtype_id<>-1) THEN 2 ELSE 0 END + CASE WHEN (salesaccnt_prodcat_id<>-1) THEN 3 ELSE 0 END + CASE WHEN (salesaccnt_shipzone_id<>-1) THEN 4 ELSE 0 END + CASE WHEN (salesaccnt_saletype_id<>-1) THEN 5 ELSE 0 END AS orderby INTO _s FROM salesaccnt, itemsite, item, prodcat, custinfo, custtype WHERE ( ( (salesaccnt_warehous_id=-1) OR (salesaccnt_warehous_id=itemsite_warehous_id) ) AND (itemsite_item_id=item_id) AND (item_prodcat_id=prodcat_id) AND (cust_custtype_id=custtype_id) AND ( (salesaccnt_prodcat='.*') OR ( (salesaccnt_prodcat_id=-1) AND (salesaccnt_prodcat<>'') AND (prodcat_code ~ salesaccnt_prodcat) ) OR ( (salesaccnt_prodcat_id=prodcat_id) ) ) AND ( (salesaccnt_custtype='.*') OR ( (salesaccnt_custtype_id=-1) AND (salesaccnt_custtype<>'') AND (custtype_code ~ salesaccnt_custtype) ) OR ( (salesaccnt_custtype_id=custtype_id) ) ) AND ( (salesaccnt_shipzone_id=-1) OR (salesaccnt_shipzone_id=pShipzoneid) ) AND ( (salesaccnt_saletype_id=-1) OR (salesaccnt_saletype_id=pSaletypeid) ) AND (itemsite_id=pid) AND (cust_id=pCustid) ) ORDER BY orderby DESC, salesaccnt_custtype DESC, salesaccnt_prodcat DESC, salesaccnt_warehous_id DESC, salesaccnt_saletype_id DESC, salesaccnt_shipzone_id DESC LIMIT 1; ELSE RETURN -2; -- invalid pidType END IF; IF (FOUND) THEN RETURN _s.salesaccnt_id; END IF; RETURN -1; END; $$; ALTER FUNCTION public.findsalesaccnt(pid integer, pidtype text, pcustid integer, psaletypeid integer, pshipzoneid integer) OWNER TO admin; -- -- Name: findspecialfinancial(text, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION findspecialfinancial(text, text, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUnit ALIAS FOR $1; pType ALIAS FOR $2; pPeriodid ALIAS FOR $3; _value NUMERIC; BEGIN _value := 0.00; IF ('OpenAR' = pType) THEN IF ( pUnit IN ('D','E') ) THEN SELECT SUM( CASE WHEN (aropen_doctype IN ('C', 'R')) THEN ((aropen_amount - aropen_paid) * -1) ELSE (aropen_amount - aropen_paid) END ) INTO _value FROM aropen, period WHERE ((aropen_open) AND (aropen_duedate BETWEEN period_start AND period_end) AND (period_id=pPeriodid)); IF ('E' = pUnit) THEN _value := 0.00 - _value; END IF; END IF; END IF; IF ('OpenAP' = pType) THEN IF ( pUnit IN ('C','E') ) THEN SELECT SUM( CASE WHEN (apopen_doctype='C') THEN ((apopen_amount - apopen_paid) * -1) ELSE (apopen_amount - apopen_paid) END ) INTO _value FROM apopen, period WHERE ((apopen_open) AND (apopen_duedate BETWEEN period_start AND period_end) AND (period_id=pPeriodid)); END IF; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.findspecialfinancial(text, text, integer) OWNER TO admin; -- -- Name: first_agg(anyelement, anyelement); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION first_agg(anyelement, anyelement) RETURNS anyelement LANGUAGE sql STABLE AS $_$ SELECT CASE WHEN $1 IS NULL THEN $2 ELSE $1 END; $_$; ALTER FUNCTION public.first_agg(anyelement, anyelement) OWNER TO admin; -- -- Name: firstline(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION firstline(text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; _result TEXT := ''; BEGIN SELECT regexp_replace(pSource, E'^(\r?\n)*([^\r\n]*)\r?\n.*', E'\\2') INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.firstline(text) OWNER TO admin; -- -- Name: fixacl(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION fixacl() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _count INTEGER := 0; _oldgrp BOOLEAN := false; _objtype TEXT; _table TEXT; _schema TEXT; BEGIN IF EXISTS(SELECT 1 FROM pg_group WHERE groname = 'openmfg') THEN _oldgrp := true; END IF; FOR _r IN SELECT relname, nspname, relkind, CASE relkind WHEN 'r' THEN 1 WHEN 'v' THEN 2 WHEN 'S' THEN 3 ELSE 4 END AS seq FROM pg_catalog.pg_class c, pg_namespace n WHERE ((n.oid=c.relnamespace) AND (nspname in ('public', 'api') OR nspname in (SELECT pkghead_name FROM pkghead)) AND (relkind in ('S', 'r', 'v'))) ORDER BY seq LOOP _schema := quote_ident(_r.nspname); _table := quote_ident(_r.relname); RAISE DEBUG '%.%', _schema, _table; IF (_oldgrp) THEN EXECUTE 'REVOKE ALL ON ' || _schema || '.' || _table || ' FROM openmfg;'; END IF; EXECUTE 'REVOKE ALL ON ' || _schema || '.' || _table || ' FROM PUBLIC;'; EXECUTE 'GRANT ALL ON ' || _schema || '.' || _table || ' TO GROUP xtrole;'; _count := _count + 1; _objtype := CASE _r.relkind WHEN 'S' THEN 'SEQUENCE' WHEN 'r' THEN 'TABLE' WHEN 'v' THEN 'VIEW' ELSE NULL END; IF (_objtype IS NOT NULL) THEN BEGIN EXECUTE 'ALTER ' || _objtype || ' ' || _schema || '.' || _table || ' OWNER TO admin;'; EXCEPTION WHEN OTHERS THEN RAISE WARNING 'Could not change ownership of %.% to admin', _schema, _table; END; END IF; END LOOP; RETURN _count; END; $$; ALTER FUNCTION public.fixacl() OWNER TO admin; -- -- Name: formatabachecks(integer, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatabachecks(integer, integer, text) RETURNS SETOF achline LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pbankaccntid ALIAS FOR $1; -- all unprinted checks for this bankaccnt pcheckheadid ALIAS FOR $2; -- but if 2nd arg not null then just 1 check penckey ALIAS FOR $3; _bank RECORD; _batchcount INTEGER := 0; _batchdate DATE; _check RECORD; _vendnumber TEXT; _vendname TEXT; _filenum TEXT; _prevsec TEXT; _row achline%ROWTYPE; _totalcr NUMERIC := 0; _totaldb NUMERIC := 0; _detailcount INTEGER := 0; -- count of type 1 entries _vendbsb TEXT; BEGIN -- General notes: -- Numeric values are formatted using RPAD(TO_CHAR(#, '0..0SG', #)). -- TO_CHAR(#, ...) (at least in the default server locale) puts a space at -- the beginning of the string for numbers >= 0 and '-' for numbers < 0. -- 'SG' pushes the sign char to the end, then RPAD cuts it off. -- This whole thing is for Australian bank transactions only, and generates entries for an ABA file. -- Currently restricted to checks to Vendor; there's no support for checks to -- customers or tax authorities, or for debits or corrections. -- This function has been adapted from the US-centric ACH formatACHChecks function. IF (NOT fetchMetricBool('ACHEnabled')) THEN RAISE EXCEPTION 'Cannot format the ABA file because the system is not configured for ABA file generation.'; END IF; IF (LENGTH(COALESCE(penckey, '')) <= 0) THEN RAISE EXCEPTION 'Cannot format the ABA file because there is no encryption key.'; END IF; SELECT * INTO _bank FROM bankaccnt WHERE (bankaccnt_id=pbankaccntid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not find the bank information to create the ABA file.'; ELSIF (NOT _bank.bankaccnt_ach_enabled) THEN RAISE EXCEPTION 'Cannot format the ABA file because the Bank Account % is not configured for ABA transactions.', _bank.bankaccnt_name; ELSIF (LENGTH(COALESCE(_bank.bankaccnt_routing, '')) <= 0) THEN RAISE EXCEPTION 'Cannot format the ABA file because the Bank Account % has no BSB number.', _bank.bankaccnt_name; END IF; -- Check the BSB number is in the right format and then re-format for output. -- Valid format is \d{3}-\d{3}|\d{6}000 IF (_bank.bankaccnt_routing ~ E'^(\\d{3})(?:-(?=\\d{3}$)|(?=\\d{3}0{3}$))(\\d{3})(0{3})?$') THEN _bank.bankaccnt_routing := regexp_replace( _bank.bankaccnt_routing, E'^(\\d{3})(?:-(?=\\d{3}$)|(?=\\d{3}0{3}$))(\\d{3})(0{3})?$', E'\\1-\\2' ); ELSE RAISE EXCEPTION 'Cannot format the ABA file because the Bank Account % has an invalid BSB number.', _bank.bankaccnt_name; END IF; _filenum := LPAD(fetchNextNumber('ACHBatch'), 8, '0'); IF (COALESCE(_bank.bankaccnt_ach_lastdate,startOfTime()) < CURRENT_DATE OR _bank.bankaccnt_ach_lastfileid IS NULL) THEN _bank.bankaccnt_ach_lastfileid = '0'; ELSIF (_bank.bankaccnt_ach_lastfileid = '9') THEN _bank.bankaccnt_ach_lastfileid = 'A'; ELSIF (_bank.bankaccnt_ach_lastfileid = 'Z') THEN RAISE EXCEPTION 'Cannot write % check % to an ABA file because too many files have been written for this bank already today.', _bank.bankaccnt_name, _check.checkhead_number; ELSE _bank.bankaccnt_ach_lastfileid = CHR(ASCII(_bank.bankaccnt_ach_lastfileid) + 1); END IF; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'HEADER'; _row.achline_value := RPAD( RPAD('0',18) -- Record Type 0 blank filled with 17 spaces || '01' -- Reel sequence number || RPAD(_bank.bankaccnt_bankname,3) -- Approved financial instition abbreviation. || RPAD('',7) -- blank filled || RPAD(fetchMetricText('ACHCompanyName'), 26) -- Name of user supplying ABA file || LPAD(fetchMetricText('ACHCompanyId'),6) -- User identification number APCA issued || RPAD('PAYMENT',12) -- description of entries on file -- currently only use payment description || TO_CHAR(CURRENT_DATE, 'DDMMYY'), -- date to be processed 120 -- blank filled to 120 characters ); RETURN NEXT _row; FOR _check IN SELECT * FROM checkhead JOIN vendinfo ON (checkhead_recip_type='V' AND checkhead_recip_id=vend_id AND vend_ach_enabled) JOIN curr_symbol ON (checkhead_curr_id=curr_id) LEFT OUTER JOIN crmacct ON (crmacct_vend_id=vend_id) WHERE ((checkhead_bankaccnt_id=pbankaccntid) AND (checkhead_amount > 0) AND (checkhead_id=pcheckheadid OR pcheckheadid IS NULL) AND NOT checkhead_posted AND NOT checkhead_replaced AND NOT checkhead_deleted AND NOT checkhead_void AND NOT checkhead_printed AND (LENGTH(COALESCE(checkhead_ach_batch,'')) <= 0) AND (curr_abbr='AUD')) ORDER BY checkhead_checkdate, vend_name LOOP IF (COALESCE(_check.checkhead_number, -1) <= 0 AND _bank.bankaccnt_ach_genchecknum) THEN _check.checkhead_number := fetchNextCheckNumber(_check.checkhead_bankaccnt_id); END IF; -- Although a crmacct record is not required for used in this function -- this code is retained for consistancy with the original formatachchecks function. IF (_check.crmacct_id IS NULL) THEN RAISE NOTICE 'Vendor % does not have a corresponding crmacct record.', _check.checkhead_recip_id; ELSIF (_check.crmacct_type IS NULL) THEN RAISE NOTICE 'crmacct for vendor % does not have a valid crmacct_type.', _check.checkhead_recip_id; END IF; _vendnumber := CASE WHEN _check.vend_ach_use_vendinfo THEN _check.vend_number ELSE _check.vend_ach_indiv_number END; _vendname := CASE WHEN _check.vend_ach_use_vendinfo THEN _check.vend_name ELSE _check.vend_ach_indiv_name END; IF (COALESCE(_check.vend_ach_routingnumber, '') = '') THEN RAISE EXCEPTION 'Cannot write % check % to an ABA file because the BSB number for % has not been supplied.', _bank.bankaccnt_name, _check.checkhead_number, _vendnumber; ELSIF (COALESCE(_check.vend_ach_accntnumber, '') = '') THEN RAISE EXCEPTION 'Cannot write % check % to an ABA file because the account number for % has not been supplied.', _bank.bankaccnt_name, _check.checkhead_number, _vendnumber; END IF; _check.vend_ach_routingnumber := decrypt(setbytea(_check.vend_ach_routingnumber), setbytea(penckey), 'bf'); _check.vend_ach_accntnumber := decrypt(setbytea(_check.vend_ach_accntnumber), setbytea(penckey), 'bf'); -- Check the BSB number is in the right format and then re-format for output. -- Valid format is \d{3}-\d{3}|\d{6}000 IF (formatbytea(_check.vend_ach_routingnumber) ~ E'^(\\d{3})(?:-(?=\\d{3}$)|(?=\\d{3}0{3}$))(\\d{3})(0{3})?$') THEN _vendbsb := regexp_replace( formatbytea(_check.vend_ach_routingnumber), E'^(\\d{3})(?:-(?=\\d{3}$)|(?=\\d{3}0{3}$))(\\d{3})(0{3})?$', E'\\1-\\2' ); ELSE RAISE EXCEPTION 'Cannot write % check % to an ABA file because the BSB number for % is not valid.', _bank.bankaccnt_name, _check.checkhead_number, _vendnumber; END IF; _row.achline_checkhead_id := _check.checkhead_id; _row.achline_batch := _filenum; _row.achline_type := 'DETAIL'; _totaldb := _totaldb + _check.checkhead_amount; -- Total debits for balancing entry _detailcount := _detailcount + 1; -- Detail record counter (type 1) _totalcr := _totalcr + _check.checkhead_amount; -- Total credits from payments _row.achline_value := RPAD('1' -- record type 1 || _vendbsb -- vendor BSB # || LPAD(formatbytea(_check.vend_ach_accntnumber), 9) -- vendor account no. ||' ' -- withholding tax indicator ||'50' -- transaction code, this should be calculated. || LPAD(to_char(_check.checkhead_amount,'FM99999999V99'),10,'0') -- amount || RPAD(_vendname, 32) -- vendor name || RPAD('Deposit',8) || RPAD('#' , 2) || LPAD (_filenum,8,' ') -- Lodgement Reference || _bank.bankaccnt_routing -- BSB # || RPAD(_bank.bankaccnt_accntnumber, 9) -- company account number || RPAD(fetchMetricText('ACHCompanyName'), 16) -- company account name || LPAD('', 8, '0'), -- Witholding Tax Amount 120 -- line width ); RETURN NEXT _row; UPDATE checkhead SET checkhead_ach_batch=_filenum, checkhead_number=_check.checkhead_number WHERE (checkhead_id=_check.checkhead_id); END LOOP; IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot write an ABA file for % because there are no checks pending in AUD for EFT-enabled Vendors.', _bank.bankaccnt_name; END IF; -- Place a final balancing detail record. -- Check that the balancing record actually balances. IF (_totalcr != _totaldb) THEN RAISE EXCEPTION 'Cannot write an ABA file for % because the total credits: % does not equal the total debits: %, file will not balance.', _bank.bankaccnt_name, _totalcr, _totaldb; END IF; _detailcount := _detailcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BALANCING'; -- keep in sync with the other batchcontrol record format above -- THE FOLLOWING IS THE DEBIT BALANCING RECORD _row.achline_value := RPAD('1' -- record type 1 || _bank.bankaccnt_routing -- Austalian BSB # || LPAD(_bank.bankaccnt_accntnumber, 9) -- company account no. || ' ' -- withholding tax indicator || '13' -- transaction code || to_char(_totaldb,'FM09999999V99') -- the balancing amount || RPAD(fetchMetricText('ACHCompanyName'), 32) -- company name || RPAD('DIRECT DEPOSIT',18) || _bank.bankaccnt_routing -- Austalian BSB # || RPAD(_bank.bankaccnt_accntnumber, 9) -- company account number || RPAD(fetchMetricText('ACHCompanyName'), 16) -- company account name || LPAD('', 8, '0'), -- Witholding Tax Amount 120 -- line width ); RETURN NEXT _row; RAISE DEBUG 'formatABAChecks building TRAILER with _totaldb %, _totalcr %, _detailcount %', _totaldb, _totalcr, _detailcount; -- file control record _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'TRAILER'; _row.achline_value := RPAD('7' -- record type 7 || RPAD('999-999', 7) -- BSB format filler || RPAD('' , 12) -- blank || LPAD(to_char((_totaldb - _totalcr),'FM09999999V99'),10,'0') -- net total amount || LPAD(to_char(_totalcr, 'FM09999999V99'),10,'0') -- total credit amount || LPAD(to_char(_totaldb, 'FM09999999V99'),10,'0') -- total debit amount || RPAD('', 24) -- blank || RPAD(to_char(_detailcount, 'FM000000'), 6,'0'), -- count of type 1 records 120 -- blank fill ); RETURN NEXT _row; UPDATE bankaccnt SET bankaccnt_ach_lastdate=CURRENT_DATE, bankaccnt_ach_lastfileid=_bank.bankaccnt_ach_lastfileid WHERE (bankaccnt_id=_bank.bankaccnt_id); RETURN; END; $_$; ALTER FUNCTION public.formatabachecks(integer, integer, text) OWNER TO admin; -- -- Name: formatachchecks(integer, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatachchecks(integer, integer, text) RETURNS SETOF achline LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pbankaccntid ALIAS FOR $1; -- all unprinted checks for this bankaccnt pcheckheadid ALIAS FOR $2; -- but if 2nd arg not null then just 1 check penckey ALIAS FOR $3; _bank RECORD; _batchcount INTEGER := 0; _batchcr NUMERIC := 0; _batchdate DATE; _batchdb NUMERIC := 0; _batchhash INTEGER := 0; _check RECORD; _ccdnumber TEXT; _ccdname TEXT; _entrycount INTEGER := 0; _filenum TEXT; _prevsec TEXT; _row achline%ROWTYPE; _rowcount INTEGER := 0; _sec TEXT; _serviceclass TEXT := '200'; -- 220 = credits, 225 = debits, 200 = mixed _totalcr NUMERIC := 0; _totaldb NUMERIC := 0; _totalentrycnt INTEGER := 0; _totalhash INTEGER := 0; _transactionprefix TEXT; BEGIN -- General notes: -- Numeric values are formatted using RPAD(TO_CHAR(#, '0..0SG', #)). -- TO_CHAR(#, ...) (at least in the default server locale) puts a space at -- the beginning of the string for numbers >= 0 and '-' for numbers < 0. -- 'SG' pushes the sign char to the end, then RPAD cuts it off. -- This whole thing is US-centric, as that's where the NACHA is. -- Currently restricted to checks to Vendor; there's no support for checks to -- customers or tax authorities, or for debits or corrections. IF (NOT fetchMetricBool('ACHEnabled')) THEN RAISE EXCEPTION 'Cannot format the ACH file because the system is not configured for ACH file generation.'; END IF; IF (LENGTH(COALESCE(penckey, '')) <= 0) THEN RAISE EXCEPTION 'Cannot format the ACH file because there is no encryption key.'; END IF; SELECT * INTO _bank FROM bankaccnt WHERE (bankaccnt_id=pbankaccntid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not find the bank information to create the ACH file.'; ELSIF (NOT _bank.bankaccnt_ach_enabled) THEN RAISE EXCEPTION 'Cannot format the ACH file because the Bank Account % is not configured for ACH transactions.', _bank.bankaccnt_name; ELSIF (LENGTH(COALESCE(_bank.bankaccnt_routing, '')) <= 0) THEN RAISE EXCEPTION 'Cannot format the ACH file because the Bank Account % has no routing number.', _bank.bankaccnt_name; END IF; _filenum := LPAD(fetchNextNumber('ACHBatch'), 8, '0'); IF (COALESCE(_bank.bankaccnt_ach_lastdate,startOfTime()) < CURRENT_DATE OR _bank.bankaccnt_ach_lastfileid IS NULL) THEN _bank.bankaccnt_ach_lastfileid = '0'; ELSIF (_bank.bankaccnt_ach_lastfileid = '9') THEN _bank.bankaccnt_ach_lastfileid = 'A'; ELSIF (_bank.bankaccnt_ach_lastfileid = 'Z') THEN RAISE EXCEPTION 'Cannot write % check % to an ACH file because too many files have been written for this bank already today.', _bank.bankaccnt_name, _check.checkhead_number; ELSE _bank.bankaccnt_ach_lastfileid = CHR(ASCII(_bank.bankaccnt_ach_lastfileid) + 1); END IF; _rowcount := _rowcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'FILEHEADER'; _row.achline_value := RPAD('1' || '01' || RPAD(CASE WHEN _bank.bankaccnt_ach_desttype = 'B' THEN ' ' || _bank.bankaccnt_routing WHEN _bank.bankaccnt_ach_desttype = 'F' THEN ' ' || _bank.bankaccnt_ach_fed_dest ELSE _bank.bankaccnt_ach_dest END, 10) || RPAD(CASE WHEN _bank.bankaccnt_ach_origintype = 'B' THEN ' ' || _bank.bankaccnt_routing WHEN _bank.bankaccnt_ach_origintype = 'I' THEN formatAchCompanyId() ELSE _bank.bankaccnt_ach_origin END, 10) || TO_CHAR(CURRENT_DATE, 'YYMMDD') || TO_CHAR(CURRENT_TIMESTAMP, 'HH24MM') || UPPER(_bank.bankaccnt_ach_lastfileid) || '094' || '10' || '1' || RPAD(CASE WHEN _bank.bankaccnt_ach_desttype = 'B' THEN _bank.bankaccnt_bankname WHEN _bank.bankaccnt_ach_desttype = 'F' THEN 'Federal Reserve' ELSE _bank.bankaccnt_ach_destname END, 23) || RPAD(CASE WHEN _bank.bankaccnt_ach_origintype = 'B' THEN ' ' || _bank.bankaccnt_bankname WHEN _bank.bankaccnt_ach_origintype = 'I' THEN fetchMetricText('ACHCompanyName') ELSE _bank.bankaccnt_ach_originname END, 23) || RPAD(_filenum, 8), 94); RETURN NEXT _row; FOR _check IN SELECT * FROM checkhead JOIN vendinfo ON (checkhead_recip_type='V' AND checkhead_recip_id=vend_id AND vend_ach_enabled) JOIN curr_symbol ON (checkhead_curr_id=curr_id) LEFT OUTER JOIN crmacct ON (crmacct_vend_id=vend_id) WHERE ((checkhead_bankaccnt_id=pbankaccntid) AND (checkhead_amount > 0) AND (checkhead_id=pcheckheadid OR pcheckheadid IS NULL) AND NOT checkhead_posted AND NOT checkhead_replaced AND NOT checkhead_deleted AND NOT checkhead_void AND NOT checkhead_printed AND (LENGTH(COALESCE(checkhead_ach_batch,'')) <= 0) AND (curr_abbr='USD')) ORDER BY checkhead_checkdate, vend_name LOOP IF (COALESCE(_check.checkhead_number, -1) <= 0 AND _bank.bankaccnt_ach_genchecknum) THEN _check.checkhead_number := fetchNextCheckNumber(_check.checkhead_bankaccnt_id); END IF; _prevsec := _sec; IF (_check.crmacct_type = 'I') THEN _sec := 'PPD'; ELSE _sec := 'CCD'; IF (_check.crmacct_id IS NULL) THEN RAISE NOTICE 'Vendor % does not have a corresponding crmacct record.', _check.checkhead_recip_id; ELSIF (_check.crmacct_type IS NULL) THEN RAISE NOTICE 'crmacct for vendor % does not have a valid crmacct_type.', _check.checkhead_recip_id; END IF; END IF; _ccdnumber := CASE WHEN _check.vend_ach_use_vendinfo THEN _check.vend_number ELSE _check.vend_ach_indiv_number END; _ccdname := CASE WHEN _check.vend_ach_use_vendinfo THEN _check.vend_name ELSE _check.vend_ach_indiv_name END; IF (COALESCE(_check.vend_ach_routingnumber, '') = '') THEN RAISE EXCEPTION 'Cannot write % check % to an ACH file because the routing number for % has not been supplied.', _bank.bankaccnt_name, _check.checkhead_number, _ccdnumber; ELSIF (COALESCE(_check.vend_ach_accntnumber, '') = '') THEN RAISE EXCEPTION 'Cannot write % check % to an ACH file because the account number for % has not been supplied.', _bank.bankaccnt_name, _check.checkhead_number, _ccdnumber; END IF; _check.vend_ach_routingnumber := decrypt(setbytea(_check.vend_ach_routingnumber), setbytea(penckey), 'bf'); _check.vend_ach_accntnumber := decrypt(setbytea(_check.vend_ach_accntnumber), setbytea(penckey), 'bf'); _transactionprefix := CASE WHEN (_check.vend_ach_accnttype = 'K') THEN '2' WHEN (_check.vend_ach_accnttype = 'C') THEN '3' END; -- create separate batches for each check date and for PPD vs CCD IF (COALESCE(_batchdate, startOfTime()) != _check.checkhead_checkdate OR (_prevsec != _sec)) THEN IF (_batchcount > 0) THEN _rowcount := _rowcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BATCHCONTROL'; -- keep in sync with the other batchcontrol record format below _row.achline_value := RPAD('8' || _serviceclass || RPAD(TO_CHAR(_entrycount, '000000SG'), 6) || RPAD(TO_CHAR(_batchhash % 10000000000, '0000000000SG'), 10) || RPAD(TO_CHAR(_batchdb, '0000000000V99SG'), 12) || RPAD(TO_CHAR(_batchcr, '0000000000V99SG'), 12) || RPAD(formatAchCompanyId(), 10) || RPAD(' ', 19) || RPAD(' ', 6) || RPAD(_bank.bankaccnt_routing, 8) || RPAD(TO_CHAR(_batchcount, '0000000SG'), 7), 94); RETURN NEXT _row; END IF; _batchhash := 0; _batchcr := 0; _batchdb := 0; _batchdate := _check.checkhead_checkdate; _entrycount := 0; _rowcount := _rowcount + 1; _batchcount := _batchcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BATCHHEADER'; -- effective entry date = 1 or 2 banking days after the banking day -- of processing (the following accounts for weekends but not holidays) _row.achline_value := RPAD('5' || _serviceclass || RPAD(fetchMetricText('ACHCompanyName'), 16) || RPAD('', 20) -- TODO: find a use || RPAD(formatAchCompanyId(), 10) || _sec || RPAD('xTuple ERP', 10) || TO_CHAR(_check.checkhead_checkdate, 'YYMMDD') || TO_CHAR(CURRENT_DATE + COALESCE(_bank.bankaccnt_ach_leadtime,1) + CASE WHEN EXTRACT(DOW FROM CURRENT_DATE) = 5 THEN 2 WHEN EXTRACT(DOW FROM CURRENT_DATE) = 6 THEN 1 ELSE 0 END, 'YYMMDD') || RPAD('', 3) || '1' || RPAD(_bank.bankaccnt_routing, 8) || RPAD(TO_CHAR(_batchcount, '0000000SG'), 7), 94); RETURN NEXT _row; END IF; _row.achline_checkhead_id := _check.checkhead_id; _row.achline_batch := _filenum; _row.achline_type := _sec; IF (_sec = 'CCD' OR _sec = 'PPD') THEN _rowcount := _rowcount + 1; _entrycount := _entrycount + 1; _totalentrycnt := _totalentrycnt + 1; _batchhash := _batchhash + CAST(SUBSTRING(_bank.bankaccnt_routing FOR 8) AS INTEGER); _totalhash := _totalhash + CAST(SUBSTRING(_bank.bankaccnt_routing FOR 8) AS INTEGER); _batchdb := _batchdb + _check.checkhead_amount; _totaldb := _totaldb + _check.checkhead_amount; _row.achline_value := RPAD('6' || _transactionprefix || '7' -- debit || RPAD(_bank.bankaccnt_routing, 9) -- 2 fields || RPAD(_bank.bankaccnt_accntnumber, 17) || RPAD(TO_CHAR(_check.checkhead_amount, '00000000V99SG'), 10) || RPAD(fetchMetricText('ACHCompanyId'), 15) || RPAD(fetchMetricText('ACHCompanyName'), 22) || RPAD(TO_CHAR(_check.checkhead_id % 100, '00SG'), 2) -- last 2 digits of checkhead_id || '0' || RPAD(_bank.bankaccnt_routing, 9) -- split field || RPAD(TO_CHAR(_entrycount, '000000SG'), 15-9), 94); RETURN NEXT _row; _rowcount := _rowcount + 1; _entrycount := _entrycount + 1; _totalentrycnt := _totalentrycnt + 1; _batchhash := _batchhash + CAST(SUBSTRING(formatbytea(_check.vend_ach_routingnumber) FOR 8) AS INTEGER); _totalhash := _totalhash + CAST(SUBSTRING(formatbytea(_check.vend_ach_routingnumber) FOR 8) AS INTEGER); _totalcr := _totalcr + _check.checkhead_amount; _batchcr := _batchcr + _check.checkhead_amount; _row.achline_value := RPAD('6' || _transactionprefix || '2' -- credit || RPAD(formatbytea(_check.vend_ach_routingnumber), 9) -- 2 fields || RPAD(formatbytea(_check.vend_ach_accntnumber), 17) || RPAD(TO_CHAR(_check.checkhead_amount, '00000000V99SG'), 10) || RPAD(_ccdnumber, 15) || RPAD(_ccdname, 22) || RPAD(TO_CHAR(_check.checkhead_id % 100, '00SG'), 2) -- last 2 digits of checkhead_id || '0' || RPAD(_bank.bankaccnt_routing, 9) -- split field || RPAD(TO_CHAR(_entrycount, '000000SG'), 15-9), 94); RETURN NEXT _row; ELSE RAISE EXCEPTION 'Cannot write % check % to an ACH file because % is not a supported SEC code.', _bank.bankaccnt_name, _check.checkhead_number, _sec; END IF; UPDATE checkhead SET checkhead_ach_batch=_filenum, checkhead_number=_check.checkhead_number WHERE (checkhead_id=_check.checkhead_id); END LOOP; IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot write an ACH file for % because there are no checks pending in USD for ACH-enabled Vendors.', _bank.bankaccnt_name; END IF; -- place a final batch control record IF (_batchcount > 0) THEN _rowcount := _rowcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BATCHCONTROL'; -- keep in sync with the other batchcontrol record format above _row.achline_value := RPAD('8' || _serviceclass || RPAD(TO_CHAR(_entrycount, '000000SG'), 6) || RPAD(TO_CHAR(_batchhash % 10000000000, '0000000000SG'), 10) || RPAD(TO_CHAR(_batchdb, '0000000000V99SG'), 12) || RPAD(TO_CHAR(_batchcr, '0000000000V99SG'), 12) || RPAD(formatAchCompanyId(), 10) || RPAD(' ', 19) || RPAD(' ', 6) || RPAD(_bank.bankaccnt_routing, 8) || RPAD(TO_CHAR(_batchcount, '0000000SG'), 7), 94); RETURN NEXT _row; END IF; -- and end with a file control record _rowcount := _rowcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'FILECONTROL'; _row.achline_value := RPAD('9' || RPAD(TO_CHAR(_batchcount, '000000SG'), 6) || RPAD(TO_CHAR(_rowcount, '000000SG'), 6) || RPAD(TO_CHAR(_totalentrycnt, '00000000SG'), 8) || RPAD(TO_CHAR(_totalhash % 10000000000, '0000000000SG'), 10) || RPAD(TO_CHAR(_totaldb, '0000000000V99SG'), 12) || RPAD(TO_CHAR(_totalcr, '0000000000V99SG'), 12) || RPAD('', 39), 94); RETURN NEXT _row; -- file must be a multiple of 10 lines long _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BLOCKFILL'; WHILE (_rowcount % 10 > 0) LOOP _rowcount := _rowcount + 1; _row.achline_value := RPAD('99999999999999999999' || '99999999999999999999' || '99999999999999999999' || '99999999999999999999' || '99999999999999999999', 94); RETURN NEXT _row; END LOOP; UPDATE bankaccnt SET bankaccnt_ach_lastdate=CURRENT_DATE, bankaccnt_ach_lastfileid=_bank.bankaccnt_ach_lastfileid WHERE (bankaccnt_id=_bank.bankaccnt_id); RETURN; END; $_$; ALTER FUNCTION public.formatachchecks(integer, integer, text) OWNER TO admin; -- -- Name: formatachcompanyid(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatachcompanyid() RETURNS text LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN CASE WHEN fetchMetricText('ACHCompanyIdType') = 'D' THEN '3' WHEN fetchMetricText('ACHCompanyIdType') = 'E' THEN '1' WHEN fetchMetricText('ACHCompanyIdType') = 'O' THEN '9' END || CASE WHEN fetchMetricText('ACHCompanyIdType') = 'D' OR fetchMetricText('ACHCompanyIdType') = 'E' THEN REPLACE(fetchMetricText('ACHCompanyId'), '-', '') ELSE fetchMetricText('ACHCompanyId') END; END; $$; ALTER FUNCTION public.formatachcompanyid() OWNER TO admin; -- -- Name: formataddr(text, text, text, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formataddr(text, text, text, text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE f_addr1 ALIAS FOR $1; f_addr2 ALIAS FOR $2; f_addr3 ALIAS FOR $3; csz ALIAS FOR $4; line ALIAS FOR $5; BEGIN RETURN formatAddr(f_addr1, f_addr2, f_addr3, csz, '', line); END; $_$; ALTER FUNCTION public.formataddr(text, text, text, text, integer) OWNER TO admin; -- -- Name: formataddr(text, text, text, text, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formataddr(text, text, text, text, text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE f_addr1 ALIAS FOR $1; f_addr2 ALIAS FOR $2; f_addr3 ALIAS FOR $3; csz ALIAS FOR $4; country ALIAS FOR $5; line ALIAS FOR $6; i int:=0; BEGIN IF (LENGTH(TRIM(both from f_addr1)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN f_addr1; END IF; IF (LENGTH(TRIM(both from f_addr2)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN f_addr2; END IF; IF (LENGTH(TRIM(both from f_addr3)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN f_addr3; END IF; IF (LENGTH(TRIM(both from csz)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN csz; END IF; IF (LENGTH(TRIM(both from country)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN country; END IF; RETURN ' '; END; $_$; ALTER FUNCTION public.formataddr(text, text, text, text, text, integer) OWNER TO admin; -- -- Name: formataddr(text, text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formataddr(text, text, text, text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE f_addr1 ALIAS FOR $1; f_addr2 ALIAS FOR $2; f_addr3 ALIAS FOR $3; csz ALIAS FOR $4; country ALIAS FOR $5; addr TEXT:=''; BEGIN IF (LENGTH(TRIM(both from f_addr1)) > 0) THEN addr:=f_addr1; END IF; IF (LENGTH(TRIM(both from f_addr2)) > 0) THEN IF (LENGTH(TRIM(both from addr)) > 0) THEN addr:=addr || E'\n'; END IF; addr:=addr || f_addr2; END IF; IF (LENGTH(TRIM(both from f_addr3)) > 0) THEN IF (LENGTH(TRIM(both from addr)) > 0) THEN addr:=addr || E'\n'; END IF; addr:=addr || f_addr3; END IF; IF (LENGTH(TRIM(both from csz)) > 0) THEN IF (LENGTH(TRIM(both from addr)) > 0) THEN addr:=addr || E'\n'; END IF; addr:=addr || csz; END IF; IF (LENGTH(TRIM(both from country)) > 0) THEN IF (LENGTH(TRIM(both from addr)) > 0) THEN addr:=addr || E'\n'; END IF; addr:=addr || country; END IF; RETURN addr; END; $_$; ALTER FUNCTION public.formataddr(text, text, text, text, text) OWNER TO admin; -- -- Name: formataddr(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formataddr(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAddrId ALIAS FOR $1; _return TEXT; BEGIN -- US conventions SELECT formatAddr(addr_line1, addr_line2, addr_line3, addr_city || ', ' || addr_state || ' ' || addr_postalcode, addr_country) INTO _return FROM addr WHERE (addr_id=pAddrId); RETURN _return; END; $_$; ALTER FUNCTION public.formataddr(integer) OWNER TO admin; -- -- Name: formatboolyn(boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatboolyn(boolean) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBool ALIAS FOR $1; BEGIN IF (pBool) THEN RETURN 'Yes'; ELSE RETURN 'No'; END IF; END; $_$; ALTER FUNCTION public.formatboolyn(boolean) OWNER TO admin; -- -- Name: formatbooseq(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatbooseq(integer, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pBooitemSeqId ALIAS FOR $2; _result TEXT; BEGIN IF (fetchMetricBool('Routings')) THEN SELECT booitem_seqnumber::text INTO _result FROM xtmfg.booitem(pItemid) WHERE (booitem_seq_id=pBooitemSeqId); RETURN _result; ELSE RETURN NULL; END IF; END; $_$; ALTER FUNCTION public.formatbooseq(integer, integer) OWNER TO admin; -- -- Name: formatbytea(bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatbytea(bytea) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pField ALIAS FOR $1; output_field TEXT; BEGIN output_field := pField; RETURN output_field; END; $_$; ALTER FUNCTION public.formatbytea(bytea) OWNER TO admin; -- -- Name: formatccdashes(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatccdashes(text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCCard ALIAS FOR $1; pCCardType ALIAS FOR $2; _returnCard text; card_length integer; BEGIN IF (pCCardType = 'A') THEN _returnCard := pCCard; RETURN _returnCard; END IF; card_length := length(pCcard); if (card_length = 16) THEN _returnCard := substr(pCCard, 1, 4) || '-' || substr(pCCard, 5, 4) || '-' || substr(pCCard, 9, 4) || '-' || substr(pCCard, 13, 4); ELSE _returnCard := substr(pCCard, 1, 4) || '-' || substr(pCCard, 5, 4) || '-' || substr(pCCard, 9, 4) || '-' || substr(pCCard, 13, 1); END IF; RETURN _returnCard; END; $_$; ALTER FUNCTION public.formatccdashes(text, text) OWNER TO admin; -- -- Name: formatccnumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatccnumber(text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardnum ALIAS FOR $1; card_length INTEGER; output_cardnum TEXT; BEGIN card_length := length(pCcardnum); IF (card_length = 13) THEN output_cardnum := '*********' || substr(pCcardnum, 10, 4); END IF; IF (card_length = 14) THEN output_cardnum := '**********' || substr(pCcardnum, 11, 4); END IF; IF (card_length = 15) THEN output_cardnum := '***********' || substr(pCcardnum, 12, 4); END IF; IF (card_length = 16) THEN output_cardnum := '************' || substr(pCcardnum, 13, 4); END IF; RETURN output_cardnum; END; $_$; ALTER FUNCTION public.formatccnumber(text) OWNER TO admin; -- -- Name: formatccnumber(bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatccnumber(bytea) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardnum ALIAS FOR $1; card_length INTEGER; output_cardnum TEXT; BEGIN card_length := length(pCcardnum); IF (card_length = 13) THEN output_cardnum := '*********' || substr(pCcardnum, 10, 4); END IF; IF (card_length = 14) THEN output_cardnum := '**********' || substr(pCcardnum, 11, 4); END IF; IF (card_length = 15) THEN output_cardnum := '***********' || substr(pCcardnum, 12, 4); END IF; IF (card_length = 16) THEN output_cardnum := '************' || substr(pCcardnum, 13, 4); END IF; RETURN output_cardnum; END; $_$; ALTER FUNCTION public.formatccnumber(bytea) OWNER TO admin; -- -- Name: formatcntctname(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatcntctname(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; _r RECORD; _rows NUMERIC; BEGIN SELECT cntct_honorific, cntct_first_name, cntct_middle, cntct_last_name, cntct_suffix INTO _r FROM cntct WHERE (cntct_id=pCntctId); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0) THEN RETURN ''; END IF; RETURN formatCntctName(_r.cntct_honorific, _r.cntct_first_name, _r.cntct_middle, _r.cntct_last_name, _r.cntct_suffix); END; $_$; ALTER FUNCTION public.formatcntctname(integer) OWNER TO admin; -- -- Name: formatcntctname(text, text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatcntctname(text, text, text, text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pHonorific ALIAS FOR $1; pFirstName ALIAS FOR $2; pMiddle ALIAS FOR $3; pLastName ALIAS FOR $4; pSuffix ALIAS FOR $5; _name TEXT := ''; BEGIN IF (LENGTH(TRIM(both from COALESCE(pHonorific,''))) > 0) THEN IF (POSITION('.' IN COALESCE(pHonorific, '')) > 0) THEN _name:= pHonorific; ELSE _name:= pHonorific || '.'; END IF; END IF; IF (LENGTH(TRIM(both from COALESCE(pFirstName,''))) > 0) THEN IF (LENGTH(TRIM(both from _name)) > 0) THEN _name:=_name || ' '; END IF; _name:=_name || pFirstName; END IF; IF (LENGTH(TRIM(both from COALESCE(pMiddle,''))) > 0) THEN IF (LENGTH(TRIM(both from _name)) > 0) THEN _name:=_name || ' '; END IF; IF (POSITION('.' IN COALESCE(pHonorific, '')) > 0) THEN _name:=_name || pMiddle; ELSE _name:=_name || pMiddle || '.'; END IF; END IF; IF (LENGTH(TRIM(both from COALESCE(pLastName,''))) > 0) THEN IF (LENGTH(TRIM(both from _name)) > 0) THEN _name:=_name || ' '; END IF; _name:=_name || pLastName; END IF; IF (LENGTH(TRIM(both from COALESCE(pSuffix,''))) > 0) THEN IF (LENGTH(TRIM(both from _name)) > 0) THEN _name:=_name || ' '; END IF; _name:=_name || pSuffix; END IF; RETURN _name; END; $_$; ALTER FUNCTION public.formatcntctname(text, text, text, text, text) OWNER TO admin; -- -- Name: formatcost(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatcost(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'cost'); END;$_$; ALTER FUNCTION public.formatcost(numeric) OWNER TO admin; -- -- Name: formatcounttagbarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatcounttagbarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCnttagid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138CTXX' || LTRIM(TO_CHAR(LENGTH(invcnt_tagnumber), '00')) || invcnt_tagnumber ) INTO _barcode FROM invcnt WHERE (invcnt_id=pCnttagid); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatcounttagbarcode(integer) OWNER TO admin; -- -- Name: formatcreditmemonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatcreditmemonumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; BEGIN RETURN ( SELECT COALESCE(cmhead_number::TEXT, '') FROM cmhead WHERE (cmhead_id=pCmheadid) ); END; $_$; ALTER FUNCTION public.formatcreditmemonumber(integer) OWNER TO admin; -- -- Name: formatdate(date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatdate(date) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, COALESCE((SELECT locale_dateformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ), 'yyyy-mm-dd') ) AS result $_$; ALTER FUNCTION public.formatdate(date) OWNER TO admin; -- -- Name: formatdate(date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatdate(date, text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pDate ALIAS FOR $1; pString ALIAS FOR $2; BEGIN IF ( (pDate = startOfTime()) OR (pDate = endOfTime()) OR (pDate IS NULL) ) THEN RETURN pString; ELSE RETURN formatDate(pDate); END IF; END; $_$; ALTER FUNCTION public.formatdate(date, text) OWNER TO admin; -- -- Name: formatdate(timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatdate(timestamp with time zone) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, COALESCE((SELECT locale_dateformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ), 'yyyy-mm-dd' )) AS result $_$; ALTER FUNCTION public.formatdate(timestamp with time zone) OWNER TO admin; -- -- Name: formatdatetime(timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatdatetime(timestamp with time zone) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, COALESCE((SELECT locale_timestampformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ), 'yyyy-mm-dd HH24:MI:SS')) AS result $_$; ALTER FUNCTION public.formatdatetime(timestamp with time zone) OWNER TO admin; -- -- Name: formatdatetime(timestamp without time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatdatetime(timestamp without time zone) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, COALESCE((SELECT locale_timestampformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ), 'yyyy-mm-dd HH24:MI:SS')) AS result $_$; ALTER FUNCTION public.formatdatetime(timestamp without time zone) OWNER TO admin; -- -- Name: formatextprice(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatextprice(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'extprice'); END;$_$; ALTER FUNCTION public.formatextprice(numeric) OWNER TO admin; -- -- Name: formatflitemdescrip(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatflitemdescrip(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlitemId ALIAS FOR $1; _x RECORD; _descrip TEXT; BEGIN SELECT flitem_accnt_id, flitem_company, flitem_profit, flitem_number, flitem_sub, flitem_type, flitem_subaccnttype_code, accnt_id, accnt_descrip INTO _x FROM flitem LEFT OUTER JOIN accnt ON flitem_accnt_id=accnt_id WHERE flitem_id=pFlitemId; IF _x.flitem_accnt_id > -1 THEN SELECT (formatGLAccount(_x.accnt_id) || '-' || _x.accnt_descrip) INTO _descrip; ELSE _descrip:=''; IF _x.flitem_type = 'A' THEN _descrip:='Type=' || 'Asset'; ELSE IF _x.flitem_type='L' THEN _descrip:='Type=' || 'Liability'; ELSE IF _x.flitem_type='R' THEN _descrip:='Type=' || 'Revenue'; ELSE IF _x.flitem_type='E' THEN _descrip:='Type=' || 'Expense'; ELSE IF _x.flitem_type='Q' THEN _descrip:='Type=' || 'Equity'; END IF; END IF; END IF; END IF; END IF; IF _x.flitem_subaccnttype_code <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Sub Accnt Type=' || _x.flitem_subaccnttype_code; END IF; IF _x.flitem_company <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Company=' || _x.flitem_company; END IF; IF _x.flitem_profit <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Profit=' || _x.flitem_profit; END IF; IF _x.flitem_number <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Number=' || _x.flitem_number; END IF; IF _x.flitem_sub <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Sub Accnt=' || _x.flitem_sub; END IF; END IF; RETURN _descrip; END; $_$; ALTER FUNCTION public.formatflitemdescrip(integer) OWNER TO admin; -- -- Name: formatglaccount(text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatglaccount(text, text, text, text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCompany ALIAS FOR $1; pProfit ALIAS FOR $2; pNumber ALIAS FOR $3; pSub ALIAS FOR $4; _number TEXT := ''; BEGIN IF ( ( SELECT metric_value::INTEGER FROM metric WHERE (metric_name='GLCompanySize') ) > 0 ) THEN _number := pCompany || '-'; END IF; IF ( ( SELECT metric_value::INTEGER FROM metric WHERE (metric_name='GLProfitSize') ) > 0 ) THEN _number := _number || pProfit || '-'; END IF; _number := _number || pNumber; IF ( ( SELECT metric_value::INTEGER FROM metric WHERE (metric_name='GLSubaccountSize') ) > 0 ) THEN _number := _number || '-' || pSub; END IF; RETURN _number; END; $_$; ALTER FUNCTION public.formatglaccount(text, text, text, text) OWNER TO admin; -- -- Name: formatglaccountlong(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatglaccountlong(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntid ALIAS FOR $1; _result TEXT; BEGIN SELECT (formatGLAccount(accnt_id) || '-' || accnt_descrip) INTO _result FROM accnt WHERE (accnt_id=pAccntid); RETURN _result; END; $_$; ALTER FUNCTION public.formatglaccountlong(integer) OWNER TO admin; -- -- Name: formatindent(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatindent(text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pText ALIAS FOR $1; pIndent ALIAS FOR $2; _i INTEGER; _result TEXT; BEGIN _result := ''; _i := 0; WHILE _i < pIndent LOOP _result := _result || ' '; _i := _i + 1; END LOOP; _result := _result || pText; RETURN _result; END; $_$; ALTER FUNCTION public.formatindent(text, integer) OWNER TO admin; -- -- Name: formatinterval(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatinterval(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR(('@ ' || trunc($1) || ' min ' || ($1 - trunc($1)) * 60 || ' sec')::INTERVAL, ( SELECT locale_intervalformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ) ) AS result $_$; ALTER FUNCTION public.formatinterval(numeric) OWNER TO admin; -- -- Name: formatinterval(interval); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatinterval(interval) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, ( SELECT locale_intervalformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ) ) AS result $_$; ALTER FUNCTION public.formatinterval(interval) OWNER TO admin; -- -- Name: formatinvcnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatinvcnumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; BEGIN RETURN ( SELECT COALESCE(cobmisc_invcnumber::TEXT, '') FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ); END; $_$; ALTER FUNCTION public.formatinvcnumber(integer) OWNER TO admin; -- -- Name: formatitemsitebarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatitemsitebarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138ISXX' || LTRIM(TO_CHAR(LENGTH(item_number), '00')) || LENGTH(warehous_code)::TEXT || item_number || warehous_code ) INTO _barcode FROM itemsite, item, whsinfo WHERE ( (itemsite_item_id=item_id) AND (itemsite_warehous_id=warehous_id) AND (itemsite_id=pItemsiteid) ); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatitemsitebarcode(integer) OWNER TO admin; -- -- Name: formatlocationbarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatlocationbarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138LOXX' || LENGTH(warehous_code)::TEXT || LTRIM(TO_CHAR(LENGTH(location_name::TEXT), '00')) || warehous_code || location_name ) INTO _barcode FROM location, whsinfo WHERE ( (location_warehous_id=warehous_id) AND (location_id=pLocationid) ); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatlocationbarcode(integer) OWNER TO admin; -- -- Name: formatlocationcontentsbarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatlocationcontentsbarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138LOCN' || LENGTH(warehous_code)::TEXT || LTRIM(TO_CHAR(LENGTH(location_name), '00')) || warehous_code || location_name ) INTO _barcode FROM location, whsinfo WHERE ( (location_warehous_id=warehous_id) AND (location_id=pLocationid) ); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatlocationcontentsbarcode(integer) OWNER TO admin; -- -- Name: formatlocationissuebarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatlocationissuebarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138LOIS' || LENGTH(warehous_code)::TEXT || LTRIM(TO_CHAR(LENGTH(location_name), '00')) || warehous_code || location_name ) INTO _barcode FROM location, whsinfo WHERE ( (location_warehous_id=warehous_id) AND (location_id=pLocationid) ); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatlocationissuebarcode(integer) OWNER TO admin; -- -- Name: formatlotserialnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatlotserialnumber(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLotSerialId ALIAS FOR $1; _lotserial TEXT; BEGIN --See if lot serial control turned on (Postbooks will not ever have this) IF (fetchmetricbool('LotSerialControl')) THEN SELECT ls_number INTO _lotserial FROM ls WHERE (ls_id=pLotSerialId); END IF; RETURN COALESCE(_lotserial,''); END; $_$; ALTER FUNCTION public.formatlotserialnumber(integer) OWNER TO admin; -- -- Name: formatmoney(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatmoney(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'curr'); END;$_$; ALTER FUNCTION public.formatmoney(numeric) OWNER TO admin; -- -- Name: formatnumeric(numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatnumeric(numeric, text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC := $1; _type TEXT := LOWER(COALESCE($2, 'curr')); _abs NUMERIC; _magnitudecnt NUMERIC(1000); _wholefmt TEXT := '0'; _scale INTEGER; _neg TEXT; _decimal TEXT; _group TEXT; _string TEXT; _debug BOOL := false; _r RECORD; BEGIN -- If the value passed in is NULL then we want to pass back an empty string IF(_value IS NULL) THEN RETURN ''; END IF; SELECT * INTO _r FROM locale WHERE (locale_id=getUsrLocaleId()); _decimal := COALESCE(SUBSTRING(_r.locale_qtyformat FROM 1 FOR 1), '.'); _neg := COALESCE(SUBSTRING(_r.locale_qtyformat FROM 2 FOR 1), '-'); _group := COALESCE(SUBSTRING(_r.locale_qtyformat FROM 3 FOR 1), ','); _scale := CASE WHEN _type = 'cost' THEN _r.locale_cost_scale WHEN _type = 'extprice' THEN _r.locale_extprice_scale WHEN _type = 'percent' THEN _r.locale_percent_scale WHEN _type = 'purchprice' THEN _r.locale_purchprice_scale WHEN _type = 'qty' THEN _r.locale_qty_scale WHEN _type = 'qtyper' THEN _r.locale_qtyper_scale WHEN _type = 'salesprice' THEN _r.locale_salesprice_scale WHEN _type = 'uomratio' THEN _r.locale_uomratio_scale WHEN _type = 'weight' THEN _r.locale_weight_scale WHEN SUBSTRING(_type FOR 4) = 'curr' THEN _r.locale_curr_scale ELSE 2 END; _value := round(_value, _scale); _abs := ABS(_value); _magnitudecnt := TRUNC(_abs / 10); IF (_debug) THEN RAISE NOTICE '_value % _abs % _scale % _neg % _decimal % _group % ', _value, _abs, _scale, _decimal, _group, _scale; END IF; IF (_value < 0) THEN _string := _neg; ELSE _string := ''; END IF; WHILE (_magnitudecnt >= 1) LOOP _magnitudecnt := TRUNC(_magnitudecnt / 10); IF (LENGTH(_wholefmt) % 3 = 0) THEN _wholefmt := '"' || _group || '"' || _wholefmt; END IF; _wholefmt := '9' || _wholefmt; END LOOP; IF (_scale > 0) THEN _abs := (_abs * (10 ^ _scale)); _abs := TRUNC(_abs); _wholefmt := _wholefmt || '"' || _decimal || '"' || REPEAT('0', _scale); END IF; _wholefmt := 'FM' || _wholefmt; _string := _string || to_char(_abs, _wholefmt); RETURN _string; END;$_$; ALTER FUNCTION public.formatnumeric(numeric, text) OWNER TO admin; -- -- Name: formatperiodname(integer, character); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatperiodname(integer, character) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodId ALIAS FOR $1; pInterval ALIAS FOR $2; _result TEXT; BEGIN --...for Month IF (pInterval='M') THEN SELECT (CASE WHEN period_name='' THEN formatdate(period_start) || '-' || formatdate(period_end) ELSE period_name END) INTO _result FROM period WHERE (period_id=pPeriodId); RETURN _result; --...for Quarter ELSE IF (pInterval='Q') THEN SELECT ('Q' || period_quarter || '-' || EXTRACT(year from yearperiod_end)) INTO _result FROM period, yearperiod WHERE ((period_id=pPeriodId) AND (period_yearperiod_id=yearperiod_id)); RETURN _result; --...for Year ELSE SELECT EXTRACT(year FROM yearperiod_end) INTO _result FROM period,yearperiod WHERE ((period_id=pPeriodId) AND (period_yearperiod_id=yearperiod_id)); RETURN _result; END IF; END IF; RETURN 'Err'; END; $_$; ALTER FUNCTION public.formatperiodname(integer, character) OWNER TO admin; -- -- Name: formatplonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatplonumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPlanordid ALIAS FOR $1; _result TEXT; BEGIN SELECT (TEXT(planord_number) || '-' || TEXT(planord_subnumber)) INTO _result FROM planord WHERE (planord_id=pPlanordid); RETURN _result; END; $_$; ALTER FUNCTION public.formatplonumber(integer) OWNER TO admin; -- -- Name: formatprcnt(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatprcnt(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric($1 * 100, 'percent') AS result $_$; ALTER FUNCTION public.formatprcnt(numeric) OWNER TO admin; -- -- Name: formatprice(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatprice(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric($1, 'salesprice') AS result; $_$; ALTER FUNCTION public.formatprice(numeric) OWNER TO admin; -- -- Name: formatpurchprice(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatpurchprice(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'purchprice'); END;$_$; ALTER FUNCTION public.formatpurchprice(numeric) OWNER TO admin; -- -- Name: formatqty(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatqty(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'qty'); END;$_$; ALTER FUNCTION public.formatqty(numeric) OWNER TO admin; -- -- Name: formatqtyper(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatqtyper(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'qtyper'); END;$_$; ALTER FUNCTION public.formatqtyper(numeric) OWNER TO admin; -- -- Name: formatratio(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatratio(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric($1, 'uomratio'); $_$; ALTER FUNCTION public.formatratio(numeric) OWNER TO admin; -- -- Name: formatrevnumber(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatrevnumber(text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pRevType ALIAS FOR $1; pRevId ALIAS FOR $2; _revision TEXT; BEGIN --See if revision control turned on (Postbooks will not ever have this) IF (fetchmetricbool('RevControl')) THEN SELECT rev_number INTO _revision FROM rev WHERE ((rev_target_type=pRevType) AND (rev_id=pRevId)); END IF; RETURN COALESCE(_revision,''); END; $_$; ALTER FUNCTION public.formatrevnumber(text, integer) OWNER TO admin; -- -- Name: formatsalesprice(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatsalesprice(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'salesprice'); END;$_$; ALTER FUNCTION public.formatsalesprice(numeric) OWNER TO admin; -- -- Name: formatscrap(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatscrap(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric(($1 * 100), 'percent') AS result $_$; ALTER FUNCTION public.formatscrap(numeric) OWNER TO admin; -- -- Name: formatshipmentnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatshipmentnumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pshipheadid ALIAS FOR $1; BEGIN RETURN ( SELECT COALESCE(shiphead_number::TEXT, '') FROM shiphead WHERE (shiphead_id=pshipheadid) ); END; $_$; ALTER FUNCTION public.formatshipmentnumber(integer) OWNER TO admin; -- -- Name: formatsobarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatsobarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138SOXX' || LENGTH(TEXT(cohead_number)) || TEXT(cohead_number) ) INTO _barcode FROM cohead WHERE (cohead_id=pSoheadid); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatsobarcode(integer) OWNER TO admin; -- -- Name: formatsoitembarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatsoitembarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138SOLI' || LENGTH(TEXT(cohead_number)) || LENGTH(formatsolinenumber(coitem_id)) || TEXT(cohead_number) || formatsolinenumber(coitem_id) ) INTO _barcode FROM cohead, coitem WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_id=pSoitemid) ); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatsoitembarcode(integer) OWNER TO admin; -- -- Name: formatsoitemnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatsoitemnumber(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE targetSoitemid ALIAS FOR $1; BEGIN RETURN ( SELECT (cohead_number::TEXT || '-' || formatsolinenumber(coitem_id)) FROM cohead, coitem WHERE ((coitem_cohead_id=cohead_id) AND (coitem_id=targetSoitemid)) ); END; $_$; ALTER FUNCTION public.formatsoitemnumber(integer) OWNER TO admin; -- -- Name: formatsonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatsonumber(integer) RETURNS text LANGUAGE sql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT COALESCE((SELECT (text(cohead_number) || '-' || formatSoLineNumber(coitem_id)) FROM coitem JOIN cohead ON (coitem_cohead_id=cohead_id) WHERE (coitem_id=($1))),'DELETED'); $_$; ALTER FUNCTION public.formatsonumber(integer) OWNER TO admin; -- -- Name: formattime(timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formattime(timestamp with time zone) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, ( SELECT locale_timeformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ) ) AS result $_$; ALTER FUNCTION public.formattime(timestamp with time zone) OWNER TO admin; -- -- Name: formattime(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formattime(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT LTRIM(TO_CHAR(COALESCE($1, 0), '999999990.0')); $_$; ALTER FUNCTION public.formattime(numeric) OWNER TO admin; -- -- Name: formatuomratio(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatuomratio(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'uomratio'); END;$_$; ALTER FUNCTION public.formatuomratio(numeric) OWNER TO admin; -- -- Name: formatuserbarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatuserbarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUserid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT formatUserBarcode(usr_username) INTO _barcode FROM usr WHERE(usr_id=pUserid); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatuserbarcode(integer) OWNER TO admin; -- -- Name: formatuserbarcode(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatuserbarcode(text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; _barcode TEXT; BEGIN _barcode := ( E'\138USER' || LENGTH(pUsername)::TEXT || pUsername ); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatuserbarcode(text) OWNER TO admin; -- -- Name: formatweight(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatweight(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric($1, 'weight') AS result $_$; ALTER FUNCTION public.formatweight(numeric) OWNER TO admin; -- -- Name: formatwobarcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatwobarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138WOXX' || LENGTH(wo_number::TEXT) || LENGTH(wo_subnumber::TEXT) || wo_number::TEXT || wo_subnumber::TEXT ) INTO _barcode FROM wo WHERE (wo_id=pWoid); RETURN _barcode; END; $_$; ALTER FUNCTION public.formatwobarcode(integer) OWNER TO admin; -- -- Name: formatwonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatwonumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; BEGIN RETURN ( SELECT (wo_number::TEXT || '-' || wo_subnumber::TEXT) FROM wo WHERE (wo_id=pWoid) ); END; $_$; ALTER FUNCTION public.formatwonumber(integer) OWNER TO admin; -- -- Name: formatwooperseq(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION formatwooperseq(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWooperId ALIAS FOR $1; _result TEXT; BEGIN IF pWooperId = -1 THEN RETURN ''; ELSE SELECT wooper_seqnumber INTO _result FROM xtmfg.wooper WHERE (wooper_id=pWooperId); END IF; RETURN _result; END; $_$; ALTER FUNCTION public.formatwooperseq(integer) OWNER TO admin; -- -- Name: forwardupdateaccount(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION forwardupdateaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntid ALIAS FOR $1; _r RECORD; _trialbalid INTEGER; BEGIN SELECT trialbal_id, trialbal_dirty, CASE WHEN (trialbal_dirty) THEN 0 ELSE 1 END AS dirty_seq INTO _r FROM trialbal, period WHERE ((trialbal_period_id=period_id) AND (trialbal_accnt_id=pAccntid)) ORDER BY dirty_seq, period_start LIMIT 1; IF (FOUND) THEN IF (_r.trialbal_dirty) THEN RETURN forwardUpdateTrialBalance(_r.trialbal_id); ELSE RETURN _r.trialbal_id; END IF; ELSE _trialbalid := nextval('trialbal_trialbal_id_seq'); INSERT INTO trialbal ( trialbal_id, trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_debits, trialbal_credits, trialbal_dirty ) SELECT _trialbalid, period_id, pAccntid, 0, 0, 0, 0, FALSE FROM period ORDER BY period_start LIMIT 1; RETURN forwardUpdateTrialBalance(_trialbalid); END IF; RETURN -1; END; $_$; ALTER FUNCTION public.forwardupdateaccount(integer) OWNER TO admin; -- -- Name: forwardupdateinvbalance(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION forwardupdateinvbalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvbalid ALIAS FOR $1; _p RECORD; _r RECORD; _qohEnding NUMERIC; _valueEnding NUMERIC; _nnEnding NUMERIC; _nnvalEnding NUMERIC; BEGIN SELECT invbal_itemsite_id, invbal_qoh_ending, invbal_value_ending, invbal_nn_ending, invbal_nnval_ending, period_end INTO _p FROM invbal JOIN period ON (invbal_period_id=period_id) JOIN itemsite ON (invbal_itemsite_id=itemsite_id) WHERE (invbal_id=pInvbalid); _qohEnding = _p.invbal_qoh_ending; _valueEnding = _p.invbal_value_ending; _nnEnding = _p.invbal_nn_ending; _nnvalEnding = _p.invbal_nnval_ending; -- Find all of the subsequent periods and their inventory balance, if they exist FOR _r IN SELECT period_id, period_end, invbal_id, invbal_qty_in, invbal_qty_out, invbal_value_in, invbal_value_out, invbal_nn_in, invbal_nn_out, invbal_nnval_in, invbal_nnval_out FROM period LEFT OUTER JOIN invbal ON ( (invbal_period_id=period_id) AND (invbal_itemsite_id=_p.invbal_itemsite_id) ) WHERE (period_start > _p.period_end) ORDER BY period_start LOOP IF (_r.invbal_id IS NULL) THEN INSERT INTO invbal ( invbal_period_id, invbal_itemsite_id, invbal_qoh_beginning, invbal_qoh_ending, invbal_qty_in, invbal_qty_out, invbal_value_beginning, invbal_value_ending, invbal_value_in, invbal_value_out, invbal_nn_beginning, invbal_nn_ending, invbal_nn_in, invbal_nn_out, invbal_nnval_beginning, invbal_nnval_ending, invbal_nnval_in, invbal_nnval_out, invbal_dirty ) VALUES ( _r.period_id, _p.invbal_itemsite_id, _qohEnding, _qohEnding, 0, 0, _valueEnding, _valueEnding, 0, 0, _nnEnding, _nnEnding, 0, 0, _nnvalEnding, _nnvalEnding, 0, 0, FALSE ); ELSE UPDATE invbal SET invbal_qoh_beginning = (_qohEnding), invbal_qoh_ending = (_qohEnding + _r.invbal_qty_in - _r.invbal_qty_out), invbal_value_beginning = (_valueEnding), invbal_value_ending = (_valueEnding + _r.invbal_value_in - _r.invbal_value_out), invbal_nn_beginning = (_nnEnding), invbal_nn_ending = (_nnEnding + _r.invbal_nn_in - _r.invbal_nn_out), invbal_nnval_beginning = (_nnvalEnding), invbal_nnval_ending = (_nnvalEnding + _r.invbal_nnval_in - _r.invbal_nnval_out), invbal_dirty = FALSE WHERE (invbal_id=_r.invbal_id); _qohEnding = (_qohEnding + _r.invbal_qty_in - _r.invbal_qty_out); _valueEnding = (_valueEnding + _r.invbal_value_in - _r.invbal_value_out); _nnEnding = (_nnEnding + _r.invbal_nn_in - _r.invbal_nn_out); _nnvalEnding = (_nnvalEnding + _r.invbal_nnval_in - _r.invbal_nnval_out); END IF; END LOOP; UPDATE invbal SET invbal_dirty = false WHERE (invbal_id=pInvbalid); RETURN pInvbalid; END; $_$; ALTER FUNCTION public.forwardupdateinvbalance(integer) OWNER TO admin; -- -- Name: forwardupdateitemsite(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION forwardupdateitemsite(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; _r RECORD; _invbalid INTEGER; BEGIN SELECT invbal_id INTO _r FROM invbal JOIN period ON (invbal_period_id=period_id) WHERE (invbal_itemsite_id=pItemsiteid) ORDER BY period_start LIMIT 1; IF (FOUND) THEN RETURN forwardUpdateInvbalance(_r.invbal_id); ELSE _invbalid := nextval('invbal_invbal_id_seq'); INSERT INTO invbal ( invbal_id, invbal_period_id, invbal_itemsite_id, invbal_qoh_beginning, invbal_qoh_ending, invbal_qty_in, invbal_qty_out, invbal_value_beginning, invbal_value_ending, invbal_value_in, invbal_value_out, invbal_nn_beginning, invbal_nn_ending, invbal_nn_in, invbal_nn_out, invbal_nnval_beginning, invbal_nnval_ending, invbal_nnval_in, invbal_nnval_out, invbal_dirty ) SELECT _invbalid, period_id, pItemsiteid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false FROM period ORDER BY period_start LIMIT 1; RETURN forwardUpdateInvbalance(_invbalid); END IF; RETURN -1; END; $_$; ALTER FUNCTION public.forwardupdateitemsite(integer) OWNER TO admin; -- -- Name: forwardupdatetrialbalance(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION forwardupdatetrialbalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTrialbalid ALIAS FOR $1; _p RECORD; _r RECORD; _ending NUMERIC; _prevYear INTEGER; _currYear INTEGER; _prevYearClosed BOOLEAN; _currYearClosed BOOLEAN; _result INTEGER; BEGIN SELECT trialbal_accnt_id, trialbal_ending, yearperiod_id, yearperiod_closed, period_end, accnt_type IN ('E', 'R') AS revexp INTO _p FROM trialbal, period, yearperiod, accnt WHERE ( (trialbal_period_id=period_id) AND (yearperiod_id=period_yearperiod_id) AND (trialbal_accnt_id=accnt_id) AND (trialbal_id=pTrialbalid) ); _ending = _p.trialbal_ending; SELECT yearperiod_id, yearperiod_closed INTO _prevYear, _prevYearClosed FROM yearperiod WHERE (_p.period_end BETWEEN yearperiod_start AND yearperiod_end); IF (NOT FOUND) THEN _prevYear := -1; _prevYearClosed := false; END IF; -- Find all of the subsequent periods and their trialbal, if they exist FOR _r IN SELECT period_id, period_end, trialbal_id, trialbal_debits, trialbal_credits, trialbal_yearend FROM period LEFT OUTER JOIN trialbal ON ( (trialbal_period_id=period_id) AND (trialbal_accnt_id=_p.trialbal_accnt_id) ) WHERE (period_start > _p.period_end) ORDER BY period_start LOOP SELECT yearperiod_id, yearperiod_closed INTO _currYear, _currYearClosed FROM yearperiod WHERE (_r.period_end BETWEEN yearperiod_start AND yearperiod_end); IF (NOT FOUND) THEN _currYear := -1; _currYearClosed := false; END IF; IF (_p.revexp AND _currYear != _prevYear) THEN _ending := 0; IF (_prevYearClosed) THEN SELECT updateRetainedEarnings(_prevYear) INTO _result; IF (_result < 0) THEN RETURN _result; END IF; END IF; END IF; _prevYear := _currYear; _prevYearClosed := _currYearClosed; IF (_r.trialbal_id IS NULL) THEN -- SELECT SUM(gltrans_amount) INTO _glAmount -- FROM gltrans -- WHERE ( (gltrans_date BETWEEN _r.period_start and _r.period_end ) -- AND (gltrans_accnt_id=_p.trialbal_accnt_id) -- AND (gltrans_posted) ); -- and change 2nd and 3rd VALUES line of INSERT to read -- _ending, _ending + _glAmount, -- noneg(0 - _glAmount), noneg(_glAmount), FALSE ); INSERT INTO trialbal ( trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_debits, trialbal_credits, trialbal_dirty ) VALUES ( _r.period_id, _p.trialbal_accnt_id, _ending, _ending, 0, 0, FALSE ); ELSE UPDATE trialbal SET trialbal_beginning = (_ending + trialbal_yearend), trialbal_ending = (_ending + trialbal_yearend - _r.trialbal_debits + _r.trialbal_credits), trialbal_dirty = FALSE WHERE (trialbal_id=_r.trialbal_id); _ending = (_ending + _r.trialbal_yearend - _r.trialbal_debits + _r.trialbal_credits); END IF; END LOOP; UPDATE trialbal SET trialbal_dirty = FALSE WHERE (trialbal_id=pTrialbalid); RETURN pTrialbalid; END; $_$; ALTER FUNCTION public.forwardupdatetrialbalance(integer) OWNER TO admin; -- -- Name: freezeaccountingperiod(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION freezeaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; BEGIN -- Check to make use that the period is not already frozen IF ( ( SELECT period_freeze FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -2; END IF; -- Set the period_freeze flag UPDATE period SET period_freeze=TRUE WHERE (period_id=pPeriodid); RETURN pPeriodid; END; $_$; ALTER FUNCTION public.freezeaccountingperiod(integer) OWNER TO admin; -- -- Name: freightdetail(text, integer, integer, integer, date, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION freightdetail(text, integer, integer, integer, date, text, integer) RETURNS SETOF freightdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderType ALIAS FOR $1; pOrderId ALIAS FOR $2; pCustId ALIAS FOR $3; pShiptoId ALIAS FOR $4; pOrderDate ALIAS FOR $5; pShipVia ALIAS FOR $6; pCurrId ALIAS FOR $7; _row freightData%ROWTYPE; _order RECORD; _weights RECORD; _includepkgweight BOOLEAN := FALSE; _qry TEXT; _debug BOOLEAN := FALSE; BEGIN IF (_debug) THEN RAISE NOTICE 'pOrderType = %', pOrderType; RAISE NOTICE 'pOrderId = %', pOrderId; RAISE NOTICE 'pCustId = %', pCustId; RAISE NOTICE 'pShiptoId = %', pShiptoId; RAISE NOTICE 'pOrderDate = %', pOrderDate; RAISE NOTICE 'pShipVia = %', pShipVia; RAISE NOTICE 'pCurrId = %', pCurrId; END IF; SELECT fetchMetricBool('IncludePackageWeight') INTO _includepkgweight; --Get the order header information need to match --against price schedules IF (pOrderType = 'SO') THEN SELECT cust_id AS cust_id, custtype_id, custtype_code, COALESCE(shipto_id, -1) AS shipto_id, COALESCE(shipto_num, '') AS shipto_num, COALESCE(pOrderDate, cohead_orderdate) AS orderdate, COALESCE(pShipVia, cohead_shipvia) AS shipvia, shipto_shipzone_id AS shipzone_id, COALESCE(pCurrId, cohead_curr_id) AS curr_id, currConcat(COALESCE(pCurrId, cohead_curr_id)) AS currAbbr INTO _order FROM cohead JOIN custinfo ON (cust_id=COALESCE(pCustId, cohead_cust_id)) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN shiptoinfo ON (shipto_id=COALESCE(pShiptoId, cohead_shipto_id)) WHERE (cohead_id=pOrderId); ELSIF (pOrderType = 'QU') THEN SELECT quhead_cust_id AS cust_id, custtype_id, custtype_code, COALESCE(shipto_id, -1) AS shipto_id, COALESCE(shipto_num, '') AS shipto_num, quhead_quotedate AS orderdate, quhead_shipvia AS shipvia, shipto_shipzone_id AS shipzone_id, quhead_curr_id AS curr_id, currConcat(quhead_curr_id) AS currAbbr INTO _order FROM quhead JOIN custinfo ON (cust_id=quhead_cust_id) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN shiptoinfo ON (shipto_id=quhead_shipto_id) WHERE (quhead_id=pOrderId); ELSIF (pOrderType = 'RA') THEN SELECT cust_id AS cust_id, custtype_id, custtype_code, COALESCE(shipto_id, -1) AS shipto_id, COALESCE(shipto_num, '') AS shipto_num, COALESCE(pOrderDate, rahead_authdate) AS orderdate, ''::text AS shipvia, shipto_shipzone_id AS shipzone_id, COALESCE(pCurrId, rahead_curr_id) AS curr_id, currConcat(COALESCE(pCurrId, rahead_curr_id)) AS currAbbr INTO _order FROM rahead JOIN custinfo ON (cust_id=COALESCE(pCustId, rahead_cust_id)) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN shiptoinfo ON (shipto_id=COALESCE(pShiptoId, rahead_shipto_id)) WHERE (rahead_id=pOrderId); ELSE RAISE EXCEPTION 'Invalid order type.'; END IF; IF (_debug) THEN RAISE NOTICE 'cust_id = %', _order.cust_id; RAISE NOTICE 'custtype_id = %', _order.custtype_id; RAISE NOTICE 'shipto_id = %', _order.shipto_id; RAISE NOTICE 'shipto_num = %', _order.shipto_num; RAISE NOTICE 'orderdate = %', _order.orderdate; RAISE NOTICE 'shipvia = %', _order.shipvia; RAISE NOTICE 'shipzone_id = %', _order.shipzone_id; RAISE NOTICE 'curr_id = %', _order.curr_id; RAISE NOTICE 'currAbbr = %', _order.currAbbr; END IF; --Get a list of aggregated weights from sites and --freight classes used on order lines IF (_includePkgWeight) THEN _qry := 'SELECT SUM(orderitem_qty_ordered * orderitem_qty_invuomratio * (item_prodweight + item_packweight)) AS weight, '; ELSE _qry := 'SELECT SUM(orderitem_qty_ordered * orderitem_qty_invuomratio * item_prodweight) AS weight, '; END IF; _qry := _qry || 'itemsite_warehous_id, COALESCE(item_freightclass_id, -1) AS item_freightclass_id FROM orderitem JOIN itemsite ON (itemsite_id=orderitem_itemsite_id) JOIN item ON (item_id=itemsite_item_id) '; IF (pOrderType = 'RA') THEN _qry := _qry || 'JOIN raitem ON ((orderitem_id=raitem_id) AND (raitem_disposition IN (''C'',''R'',''P''))) '; END IF; _qry := _qry || ' WHERE ( (orderitem_orderhead_type=' || quote_literal(pOrderType) || ') AND (orderitem_orderhead_id=' || quote_literal(pOrderId) || ') AND (orderitem_status <> ''X'') ) GROUP BY itemsite_warehous_id, item_freightclass_id;'; FOR _weights IN EXECUTE _qry LOOP _row := calculateFreightDetail( _order.cust_id, --pCustId _order.custtype_id, --pCustTypeId _order.custtype_code, --pCustTypeCode _order.shipto_id, --pShiptoId _order.shipzone_id, --pShipZoneId _order.shipto_num, --pShiptoNum _order.orderdate, --pOrderDate _order.shipvia, --pShipVia _order.curr_id, --pCurrId _order.currAbbr, --pCurrAbbr _weights.itemsite_warehous_id, --pItemSiteWhsId _weights.item_freightclass_id, --pItemFreightclassId _weights.weight --pWeight ); RETURN NEXT _row; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.freightdetail(text, integer, integer, integer, date, text, integer) OWNER TO admin; -- -- Name: freightdetailquote(integer, text, integer, text, date, text, text, text[]); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION freightdetailquote(integer, text, integer, text, date, text, text, text[]) RETURNS SETOF freightdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustId ALIAS FOR $1; pCustNumber ALIAS FOR $2; pShiptoId ALIAS FOR $3; pShiptoNum ALIAS FOR $4; pOrderDate ALIAS FOR $5; pShipVia ALIAS FOR $6; pItemArrayType ALIAS FOR $7; pItemQty ALIAS FOR $8; -- Array item_id format = ARRAY[['300','3'],['310','50']] -- Array item_number format = ARRAY[['YTRUCK1','3'],['RTRUCK1','50']] -- Array itemsite_id format = ARRAY[['293','3'],['302','50']] _cust RECORD; _shipto RECORD; _curr RECORD; _includepkgweight BOOLEAN := FALSE; _order_date DATE; _ship_via TEXT; _item_num RECORD; _item_id RECORD; _weights RECORD; _row freightData%ROWTYPE; _debug BOOLEAN := FALSE; BEGIN -- Parameters are setup to allow this function to be called multiple ways. -- Check parameters and lookup what is NULL. -- Check pCustId and pCustNumber. IF (pCustId IS NULL AND (pCustNumber IS NULL OR pCustNumber = '')) THEN RAISE EXCEPTION 'You must specify a Customer ID or Number to get a freight quote.'; ELSIF (pCustId IS NULL AND pCustNumber IS NOT NULL) THEN -- Get customer info using pCustNumber. SELECT cust_id, cust_number, custtype_id, custtype_code, cust_curr_id, cust_shipvia INTO _cust FROM custinfo LEFT JOIN custtype ON cust_custtype_id = custtype_id WHERE 1=1 AND cust_number = pCustNumber; ELSE -- Get customer info using pCustId. SELECT cust_id, cust_number, custtype_id, custtype_code, cust_curr_id, cust_shipvia INTO _cust FROM custinfo LEFT JOIN custtype ON cust_custtype_id = custtype_id WHERE 1=1 AND cust_id = pCustId; END IF; IF(NOT FOUND) THEN RAISE EXCEPTION 'Invalid Customer specified when trying to get a freight quote.'; END IF; -- Check pShiptoId and pShiptoNum. IF (pShiptoId IS NULL AND (pShiptoNum IS NULL OR pShiptoNum = '')) THEN -- Get Customer's default shipto. SELECT shipto_id, shipto_name, shipto_shipzone_id, shipto_shipvia, shipto_num INTO _shipto FROM shiptoinfo WHERE 1=1 AND shipto_cust_id = _cust.cust_id AND shipto_default; ELSIF (pShiptoId IS NULL AND pShiptoNum IS NOT NULL) THEN -- Get shipto info using pShiptoNum. SELECT shipto_id, shipto_name, shipto_shipzone_id, shipto_shipvia, shipto_num INTO _shipto FROM shiptoinfo WHERE 1=1 AND shipto_cust_id = _cust.cust_id AND shipto_num = pShiptoNum; ELSE -- Get shipto info using pShiptoId. SELECT shipto_id, shipto_name, shipto_shipzone_id, shipto_shipvia, shipto_num INTO _shipto FROM shiptoinfo WHERE 1=1 AND shipto_cust_id = _cust.cust_id AND shipto_id = pShiptoId; END IF; IF(NOT FOUND) THEN RAISE EXCEPTION 'Invalid Ship-to specified when trying to get a freight quote.'; END IF; -- Get curr info. SELECT curr_id, curr_abbr INTO _curr FROM curr_symbol WHERE 1=1 AND curr_id = _cust.cust_curr_id; IF(NOT FOUND) THEN RAISE EXCEPTION 'Could not find currency when trying to get a freight quote.'; END IF; -- Check pOrderDate. IF (pOrderDate IS NULL) THEN _order_date := CURRENT_DATE; ELSE _order_date := pOrderDate; END IF; -- Check pShipVia. IF (pShipVia IS NULL OR pShipVia = '') THEN IF (_shipto.shipto_shipvia IS NULL OR _shipto.shipto_shipvia = '') THEN _ship_via := _cust.cust_shipvia; ELSE _ship_via := _shipto.shipto_shipvia; END IF; ELSE _ship_via := pShipVia; END IF; -- Determine if package weight should be included in freight calculation. SELECT fetchMetricBool('IncludePackageWeight') INTO _includepkgweight; -- Check pItemQty. IF (pItemQty IS NULL OR array_upper(pItemQty,1) IS NULL) THEN -- Item Array is NULL. RAISE EXCEPTION 'You must specify an Item ID, Item Number or Itemsite ID to get a freight quote.'; ELSIF (pItemArrayType = 'item_number' AND (array_upper(pItemQty,1) > 0)) THEN -- Using item_number. FOR _weights IN -- Get a list of aggregated weights from sites and freight classes for items. SELECT CASE WHEN _includepkgweight THEN SUM(qty * (item_prodweight + item_packweight)) ELSE SUM(qty * (item_prodweight)) END AS weight, itemsite_warehous_id, COALESCE(item_freightclass_id, -1) AS item_freightclass_id FROM -- Create item_number -> qty record from array. (SELECT unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][1])) AS item_number, unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][2:array_ndims(pItemQty)]))::numeric AS qty ) AS itemnum_qty JOIN item USING (item_number) JOIN itemsite ON item_id=itemsite_item_id WHERE 1=1 AND itemsite_warehous_id = fetchprefwarehousid() GROUP BY itemsite_warehous_id, item_freightclass_id LOOP -- Calculate the freight detail for these item weights. _row := calculateFreightDetail( _cust.cust_id, --pCustId _cust.custtype_id, --pCustTypeId _cust.custtype_code, --pCustTypeCode _shipto.shipto_id, --pShiptoId _shipto.shipto_shipzone_id, --pShipZoneId _shipto.shipto_num, --pShiptoNum _order_date, --pOrderDate _ship_via, --pShipVia _curr.curr_id, --pCurrId _curr.curr_abbr, --pCurrAbbr _weights.itemsite_warehous_id, --pItemSiteWhsId _weights.item_freightclass_id, --pItemFreightclassId _weights.weight --pWeight ); RETURN NEXT _row; END LOOP; ELSIF (pItemArrayType = 'item_id' AND (array_upper(pItemQty,1) > 0)) THEN -- Using item_id. FOR _weights IN -- Get a list of aggregated weights from sites and freight classes for items. SELECT CASE WHEN _includepkgweight THEN SUM(qty * (item_prodweight + item_packweight)) ELSE SUM(qty * (item_prodweight)) END AS weight, itemsite_warehous_id, COALESCE(item_freightclass_id, -1) AS item_freightclass_id FROM -- Create item_id -> qty record from array. (SELECT unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][1]))::integer AS item_id, unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][2:array_ndims(pItemQty)]))::numeric AS qty ) AS itemid_qty JOIN item USING (item_id) JOIN itemsite ON item_id=itemsite_item_id WHERE 1=1 AND itemsite_warehous_id = fetchprefwarehousid() GROUP BY itemsite_warehous_id, item_freightclass_id LOOP -- Calculate the freight detail for these item weights. _row := calculateFreightDetail( _cust.cust_id, --pCustId _cust.custtype_id, --pCustTypeId _cust.custtype_code, --pCustTypeCode _shipto.shipto_id, --pShiptoId _shipto.shipto_shipzone_id, --pShipZoneId _shipto.shipto_num, --pShiptoNum _order_date, --pOrderDate _ship_via, --pShipVia _curr.curr_id, --pCurrId _curr.curr_abbr, --pCurrAbbr _weights.itemsite_warehous_id, --pItemSiteWhsId _weights.item_freightclass_id, --pItemFreightclassId _weights.weight --pWeight ); RETURN NEXT _row; END LOOP; ELSIF (pItemArrayType = 'itemsite_id' AND (array_upper(pItemQty,1) > 0)) THEN -- Using itemsite_id. FOR _weights IN -- Get a list of aggregated weights from sites and freight classes for items. SELECT CASE WHEN _includepkgweight THEN SUM(qty * (item_prodweight + item_packweight)) ELSE SUM(qty * (item_prodweight)) END AS weight, itemsite_warehous_id, COALESCE(item_freightclass_id, -1) AS item_freightclass_id FROM -- Create itemsite_id -> qty record from array. (SELECT unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][1]))::integer AS itemsite_id, unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][2:array_ndims(pItemQty)]))::numeric AS qty ) AS itemsiteid_qty JOIN itemsite USING (itemsite_id) JOIN item ON item_id=itemsite_item_id WHERE 1=1 GROUP BY itemsite_warehous_id, item_freightclass_id LOOP -- Calculate the freight detail for these item weights. _row := calculateFreightDetail( _cust.cust_id, --pCustId _cust.custtype_id, --pCustTypeId _cust.custtype_code, --pCustTypeCode _shipto.shipto_id, --pShiptoId _shipto.shipto_shipzone_id, --pShipZoneId _shipto.shipto_num, --pShiptoNum _order_date, --pOrderDate _ship_via, --pShipVia _curr.curr_id, --pCurrId _curr.curr_abbr, --pCurrAbbr _weights.itemsite_warehous_id, --pItemSiteWhsId _weights.item_freightclass_id, --pItemFreightclassId _weights.weight --pWeight ); RETURN NEXT _row; END LOOP; ELSE -- The item array provided is invalid. RAISE EXCEPTION 'The Item/Itemsite array provided when trying to get a freight quote is invalid.'; END IF; IF(NOT FOUND) THEN RAISE EXCEPTION 'Error trying to aggregated weights when getting a freight quote.'; END IF; -- Print debug. IF (_debug) THEN RAISE NOTICE 'pCustId = %', _cust.cust_id; RAISE NOTICE 'pCustTypeId = %', _cust.custtype_id; RAISE NOTICE 'pCustTypeCode = %', _cust.custtype_code; RAISE NOTICE 'pShiptoId = %', _shipto.shipto_id; RAISE NOTICE 'pShipZoneId = %', _shipto.shipto_shipzone_id; RAISE NOTICE 'pShiptoNum = %', _shipto.shipto_num; RAISE NOTICE 'pOrderDate = %', _order_date; RAISE NOTICE 'pShipVia = %', _ship_via; RAISE NOTICE 'pCurrId = %', _curr.curr_id; RAISE NOTICE 'pCurrAbbr = %', _curr.curr_abbr; END IF; RETURN; END; $_$; ALTER FUNCTION public.freightdetailquote(integer, text, integer, text, date, text, text, text[]) OWNER TO admin; -- -- Name: freightforrecv(text, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION freightforrecv(text, integer, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; pposted ALIAS FOR $3; _freight NUMERIC; BEGIN IF (pordertype = 'TO' AND NOT fetchMetricBool('MultiWhs')) THEN RETURN 0; ELSIF (pordertype = 'RA' AND NOT fetchMetricBool('EnableReturnAuth')) THEN RETURN 0; END IF; SELECT SUM(COALESCE(recv_freight, 0)) INTO _freight FROM recv WHERE ((recv_orderitem_id=porderitemid) AND (recv_posted = pposted) AND (recv_order_type=pordertype)); RETURN COALESCE(_freight, 0.0); END; $_$; ALTER FUNCTION public.freightforrecv(text, integer, boolean) OWNER TO admin; -- -- Name: gen_salt(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION gen_salt(text) RETURNS text LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pg_gen_salt'; ALTER FUNCTION public.gen_salt(text) OWNER TO admin; -- -- Name: gen_salt(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION gen_salt(text, integer) RETURNS text LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pg_gen_salt_rounds'; ALTER FUNCTION public.gen_salt(text, integer) OWNER TO admin; -- -- Name: getactiverevid(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getactiverevid(text, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetid ALIAS FOR $2; _revid INTEGER; BEGIN --See if revcontrol turned on IF (fetchmetricbool('RevControl')) THEN IF (pTargetType='BOM') THEN SELECT rev_id INTO _revid FROM rev WHERE ((rev_target_type='BOM') AND (rev_target_id=pTargetid) AND (rev_status='A')); IF (NOT FOUND) THEN _revid:=-1; END IF; ELSE IF (pTargetType='BOO') THEN SELECT rev_id INTO _revid FROM rev WHERE ((rev_target_type='BOO') AND (rev_target_id=pTargetid) AND (rev_status='A')); IF (NOT FOUND) THEN _revid:=-1; END IF; ELSE RAISE EXCEPTION 'Invalid Revision Type'; END IF; END IF; ELSE _revid:=-1; END IF; RETURN _revid; END; $_$; ALTER FUNCTION public.getactiverevid(text, integer) OWNER TO admin; -- -- Name: getaddrid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getaddrid(paddressnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pAddressNumber IS NULL OR pAddressNumber = '') THEN RETURN NULL; END IF; SELECT addr_id INTO _returnVal FROM addr WHERE (addr_number=pAddressNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Address Number % not found.', pAddressNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getaddrid(paddressnumber text) OWNER TO admin; -- -- Name: getadjustmenttaxtypeid(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getadjustmenttaxtypeid() RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _taxtypeid INTEGER; BEGIN SELECT taxtype_id INTO _taxtypeid FROM taxtype WHERE (taxtype_name='Adjustment'); RETURN _taxtypeid; END; $$; ALTER FUNCTION public.getadjustmenttaxtypeid() OWNER TO admin; -- -- Name: getaropenid(text, character, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getaropenid(text, character, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustNumber ALIAS FOR $1; pDocType ALIAS FOR $2; pDocNumber ALIAS FOR $3; _returnVal INTEGER; BEGIN IF ((pCustNumber IS NULL) OR (pDocType IS NULL) OR (pDocNumber IS NULL)) THEN RETURN NULL; END IF; SELECT aropen_id INTO _returnVal FROM aropen WHERE ((aropen_cust_id=getCustId(pCustNumber,true)) AND (UPPER(aropen_doctype)=UPPER(pDocType)) AND (UPPER(aropen_docnumber)=UPPER(pDocNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'AR Open Item % not found.', pDocNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getaropenid(text, character, text) OWNER TO admin; -- -- Name: getbankaccntid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getbankaccntid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankAccntName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pBankAccntName IS NULL) THEN RETURN NULL; END IF; SELECT bankaccnt_id INTO _returnVal FROM bankaccnt WHERE (UPPER(bankaccnt_name)=UPPER(pBankAccntName)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Bank Account % not found.', pBankAccntName; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getbankaccntid(text) OWNER TO admin; -- -- Name: getbomitemid(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getbomitemid(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; pRevision ALIAS FOR $2; pSeqNumber ALIAS FOR $3; _returnVal INTEGER; BEGIN IF ((pItemNumber IS NULL) OR (pSeqNumber IS NULL) OR (pItemNumber = '') OR (pSeqNumber = '') ) THEN RETURN NULL; END IF; SELECT bomitem_id INTO _returnVal FROM bomitem(getItemId(pItemNumber),COALESCE(getRevId('BOM',pItemNumber,pRevision))) WHERE (bomitem_seqnumber=pSeqNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sequence % on Bill of Material % Revision % not found.', pSeqNumber, pItemNumber, pRevision; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getbomitemid(text, text, text) OWNER TO admin; -- -- Name: getbooitemseqid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getbooitemseqid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; pSeqNumber ALIAS FOR $2; _revid INTEGER; _returnVal INTEGER; BEGIN IF ((pItemNumber IS NULL) OR (pSeqNumber IS NULL)) THEN RETURN NULL; END IF; IF (NOT fetchMetricBool('Routings')) THEN RETURN -1; ELSE SELECT booitem_seq_id INTO _returnVal FROM booitem(getItemId(pItemNumber)) WHERE (booitem_seqnumber=CAST(pSeqNumber AS integer)); END IF; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Boo Sequence % for Item % not found.', pSeqNumber, pItemNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getbooitemseqid(text, text) OWNER TO admin; -- -- Name: getbudgheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getbudgheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudghead ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pBudghead IS NULL) THEN RETURN NULL; END IF; SELECT budghead_id INTO _returnVal FROM budghead WHERE (budghead_name=(pBudghead)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Budget % not found.', pBudghead; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getbudgheadid(text) OWNER TO admin; -- -- Name: getcashrcptid(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcashrcptid(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustNumber ALIAS FOR $1; pFundsType ALIAS FOR $2; pDocNumber ALIAS FOR $3; _returnVal INTEGER; BEGIN IF ((pCustNumber IS NULL) OR (pFundsType IS NULL) OR (pDocNumber IS NULL)) THEN RETURN NULL; END IF; SELECT cashrcpt_id INTO _returnVal FROM cashrcpt WHERE ((cashrcpt_cust_id=getCustId(pCustNumber,true)) AND (UPPER(cashrcpt_fundstype)=UPPER(pFundsType)) AND (UPPER(cashrcpt_docnumber)=UPPER(pDocNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Cash Receipt % not found.', pDocNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getcashrcptid(text, text, text) OWNER TO admin; -- -- Name: getcharid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcharid(pchar text, ptype text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (COALESCE(pChar, '') = '') THEN RETURN NULL; END IF; SELECT char_id INTO _returnVal FROM char WHERE ((char_name=pChar) AND ((pType IN ('C','CT') AND char_customers) OR (pType IN ('I','SI','QI','W','PI','TI') AND char_items) OR (pType='CRMACCT' AND char_crmaccounts) OR (pType='ADDR' AND char_addresses) OR (pType='CNTCT' AND char_contacts) OR (pType='LS' AND char_lotserial) OR (pType='EMP' AND char_employees) OR (pType='INCDT' AND char_incidents) )) LIMIT 1; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Characteristic % not found.', pChar; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcharid(pchar text, ptype text) OWNER TO admin; -- -- Name: getclasscodeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getclasscodeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClassCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pClassCode IS NULL) THEN RETURN NULL; END IF; SELECT classcode_id INTO _returnVal FROM classcode WHERE (classcode_code=pClassCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Class Code % not found.', pClassCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getclasscodeid(text) OWNER TO admin; -- -- Name: getcmheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcmheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCreditMemoNumber ALIAS FOR $1; BEGIN RETURN getCmheadId(pCreditMemoNumber, NULL); END; $_$; ALTER FUNCTION public.getcmheadid(text) OWNER TO admin; -- -- Name: getcmheadid(text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcmheadid(text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCreditMemoNumber ALIAS FOR $1; pPosted ALIAS FOR $2; _returnVal INTEGER; BEGIN IF (pCreditMemoNumber IS NULL) THEN RETURN NULL; END IF; SELECT cmhead_id INTO _returnVal FROM cmhead WHERE (UPPER(cmhead_number)=UPPER(pCreditMemoNumber)) AND ((pPosted IS NULL) OR (cmhead_posted=pPosted)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Credit Memo % not found.', pCreditMemoNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getcmheadid(text, boolean) OWNER TO admin; -- -- Name: getcmnttypeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcmnttypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmntType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pCmntType), '') = '') THEN RETURN NULL; END IF; SELECT cmnttype_id INTO _returnVal FROM cmnttype WHERE (cmnttype_name=pCmntType) LIMIT 1; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Comment Type % not found.', pCmntType; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getcmnttypeid(text) OWNER TO admin; -- -- Name: getcntctid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcntctid(pcontactnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT getCntctId(pContactNumber,true) INTO _returnVal; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcntctid(pcontactnumber text) OWNER TO admin; -- -- Name: getcntctid(text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcntctid(pcontactnumber text, pnotfounderr boolean) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pContactNumber), '') = '') THEN RETURN NULL; END IF; SELECT cntct_id INTO _returnVal FROM cntct WHERE (cntct_number=pContactNumber); IF (_returnVal IS NULL AND pNotFoundErr) THEN RAISE EXCEPTION 'Contact Number % not found.', pContactNumber; ELSIF (_returnVal IS NULL) THEN RETURN NULL; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcntctid(pcontactnumber text, pnotfounderr boolean) OWNER TO admin; -- -- Name: getcoheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcoheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSalesOrderNumber IS NULL) THEN RETURN NULL; END IF; SELECT cohead_id INTO _returnVal FROM cohead WHERE (cohead_number=pSalesOrderNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Order % not found.', pSalesOrderNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getcoheadid(text) OWNER TO admin; -- -- Name: getcoitemid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcoitemid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderNumber ALIAS FOR $1; pLineNumber ALIAS FOR $2; _linenumber INTEGER; _subnumber INTEGER; _returnVal INTEGER; BEGIN IF (pSalesOrderNumber IS NULL OR pLineNumber IS NULL) THEN RETURN NULL; END IF; --Parse Line Number IF (position('.' in pLineNumber) > 0) THEN _linenumber := CAST(substring(pLineNumber from 1 for position('.' in pLineNumber)-1) AS INTEGER); _subnumber := CAST(substring(pLineNumber from position('.' in pLineNumber)+1 for length(pLineNumber)) AS INTEGER); ELSE _linenumber := CAST(pLineNumber AS INTEGER); _subnumber := 0; END IF; SELECT coitem_id INTO _returnVal FROM cohead, coitem WHERE ((cohead_number=pSalesOrderNumber) AND (coitem_cohead_id=cohead_id) AND (coitem_linenumber=_linenumber) AND (coitem_subnumber=_subnumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Order % not found.', pSalesOrderNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getcoitemid(text, text) OWNER TO admin; -- -- Name: getcontrcteffective(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcontrcteffective(pcontrctnumber text) RETURNS date LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal DATE; BEGIN IF (pContrctNumber IS NULL) THEN RETURN NULL; END IF; SELECT contrct_effective INTO _returnVal FROM contrct WHERE (contrct_number=pContrctNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Contract Number % not found.', pContrctNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcontrcteffective(pcontrctnumber text) OWNER TO admin; -- -- Name: getcontrctexpires(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcontrctexpires(pcontrctnumber text) RETURNS date LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal DATE; BEGIN IF (pContrctNumber IS NULL) THEN RETURN NULL; END IF; SELECT contrct_expires INTO _returnVal FROM contrct WHERE (contrct_number=pContrctNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Contract Number % not found.', pContrctNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcontrctexpires(pcontrctnumber text) OWNER TO admin; -- -- Name: getcontrctid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcontrctid(pcontrctnumber text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pContrctNumber IS NULL) THEN RETURN NULL; END IF; SELECT contrct_id INTO _returnVal FROM contrct WHERE (contrct_number=pContrctNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Contract Number % not found.', pContrctNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcontrctid(pcontrctnumber text) OWNER TO admin; -- -- Name: getcostcatid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcostcatid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCostCat ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pCostCat IS NULL) THEN RETURN NULL; END IF; SELECT costcat_id INTO _returnVal FROM costcat WHERE (costcat_code=pCostCat); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Cost Category Code % not found.', pCostCat; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getcostcatid(text) OWNER TO admin; -- -- Name: getcostelemid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcostelemid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCostElemType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pCostElemType IS NULL) THEN RETURN NULL; END IF; SELECT costelem_id INTO _returnVal FROM costelem WHERE (costelem_type=pCostElemType); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Cost Element % not found.', pCostElemType; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getcostelemid(text) OWNER TO admin; -- -- Name: getcrmacctid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcrmacctid(pacctnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pAcctNumber IS NULL) THEN RETURN NULL; END IF; SELECT crmacct_id INTO _returnVal FROM crmacct WHERE (UPPER(crmacct_number)=UPPER(pAcctNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'CRM Account Number % not found.', pAcctNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcrmacctid(pacctnumber text) OWNER TO admin; -- -- Name: getcurrid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcurrid(pcurrname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pCurrName IS NULL) THEN RETURN NULL; END IF; SELECT curr_id INTO _returnVal FROM curr_symbol WHERE (curr_abbr=pCurrName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Currency % not found.', pCurrName; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcurrid(pcurrname text) OWNER TO admin; -- -- Name: getcustid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcustid(pcustnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT getCustId(pCustNumber,false) INTO _returnVal; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcustid(pcustnumber text) OWNER TO admin; -- -- Name: getcustid(text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcustid(pcustnumber text, pinclprospects boolean) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pCustNumber IS NULL) THEN RETURN NULL; END IF; SELECT cust_id INTO _returnVal FROM custinfo WHERE (cust_number=UPPER(pCustNumber)); IF (_returnVal IS NULL) THEN IF (pInclProspects) THEN SELECT prospect_id INTO _returnVal FROM prospect WHERE (UPPER(prospect_number)=UPPER(pCustNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Neither Customer nor Prospect Number % found.', pCustNumber; END IF; ELSE RAISE EXCEPTION 'Customer Number % not found.', pCustNumber; END IF; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getcustid(pcustnumber text, pinclprospects boolean) OWNER TO admin; -- -- Name: getcustnamefrominfo(text, text, text, text, text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcustnamefrominfo(text, text, text, text, text, boolean) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _email TEXT := COALESCE(UPPER($1), ''); _company TEXT := COALESCE(UPPER($2), ''); _first TEXT := COALESCE(UPPER($3), ''); _last TEXT := COALESCE(UPPER($4), ''); _fullname TEXT := COALESCE(UPPER($5), ''); _generate BOOLEAN := COALESCE($6, FALSE); _counter INTEGER; _custcount INTEGER := 0; _custname TEXT; _candidate RECORD; _r RECORD; BEGIN IF (_email != '') THEN SELECT count(*), cust_name INTO _custcount, _custname FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE (UPPER(cntct_email)=_email) GROUP BY cust_name; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custname; END IF; END IF; IF (_company != '') THEN SELECT count(*), cust_name INTO _custcount, _custname FROM custinfo WHERE (UPPER(cust_name)=_company) GROUP BY cust_name; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custname; END IF; END IF; IF (_fullname = '' AND (_first != '' OR _last != '')) THEN _fullname := TRIM(_first || ' ' || _last); END IF; IF (_custcount <= 0 AND _fullname != '') THEN SELECT count(*), cust_name INTO _custcount, _custname FROM custinfo WHERE (UPPER(cust_name)=_fullname) GROUP BY cust_name; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custname; END IF; END IF; IF (_custcount > 1) THEN RAISE EXCEPTION 'Found % possible Customers for % and % and %', _custcount, _email, _company, _fullname; END IF; IF (_custcount <= 0 AND _generate) THEN IF (_company != '') THEN RETURN _company; ELSIF (_email != '') THEN RETURN _email; ELSIF (_fullname != '') THEN RETURN _fullname; ELSE RAISE EXCEPTION 'Could not generate a new Customer Name without an email address or the name of a company or person'; END IF; END IF; IF (_custname IS NULL OR _custname = '') THEN RAISE EXCEPTION 'Could not find Customer Name for % and %', _company, _fullname; END IF; RETURN _custname; END; $_$; ALTER FUNCTION public.getcustnamefrominfo(text, text, text, text, text, boolean) OWNER TO admin; -- -- Name: getcustnumberfrominfo(text, text, text, text, text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcustnumberfrominfo(text, text, text, text, text, boolean) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _email TEXT := COALESCE(UPPER($1), ''); _company TEXT := COALESCE(UPPER($2), ''); _first TEXT := COALESCE(UPPER($3), ''); _last TEXT := COALESCE(UPPER($4), ''); _fullname TEXT := COALESCE(UPPER($5), TRIM(_first || ' ' || _last)); _generate BOOLEAN := COALESCE($6, FALSE); _counter INTEGER; _custcount INTEGER := 0; _custnumber TEXT; _candidate TEXT := ''; _loopmax INTEGER := 0; _minlength INTEGER := 5; _maxlength INTEGER := 8; _numformat TEXT := ''; _testme TEXT; BEGIN IF (_email != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE (UPPER(cntct_email)=_email) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_company != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo WHERE (UPPER(cust_name)=_company) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_fullname = '' AND (_first != '' OR _last != '')) THEN _fullname := TRIM(_first || ' ' || _last); END IF; IF (_custcount <= 0 AND _fullname != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo WHERE (UPPER(cust_name)=_fullname) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_custcount > 1) THEN RAISE EXCEPTION 'Found % possible Customers for % and % and %', _custcount, _email, _company, _fullname; END IF; IF (_custcount <= 0 AND _generate) THEN IF (_maxlength < _minlength) THEN RAISE EXCEPTION 'Fix getCustNumberFromInfo: max length < min length'; END IF; IF (_company != '') THEN _candidate := _company; ELSIF (_email != '') THEN _candidate := SUBSTRING(_email FOR POSITION('@' IN _email) - 1); ELSIF (_last != '') THEN _candidate := _last; IF (_first != '') THEN _candidate := _candidate || _first; END IF; ELSIF (_fullname != '' AND (POSITION(' ' IN _fullname) > 0)) THEN _candidate := SUBSTRING(_fullname FROM POSITION(' ' IN _fullname) + 1) || SUBSTRING(_fullname FOR POSITION(' ' IN _fullname) - 1); END IF; WHILE (POSITION(' ' IN _candidate) > 0) LOOP _candidate := SUBSTRING(_candidate FOR POSITION(' ' IN _candidate) - 1) || SUBSTRING(_candidate FROM POSITION(' ' IN _candidate) + 1); END LOOP; FOR _counter IN _minlength.._maxlength LOOP _testme := SUBSTRING(_candidate FOR _counter); IF (NOT EXISTS(SELECT cust_number FROM custinfo WHERE (cust_number=_testme))) THEN _custnumber := _testme; EXIT; END IF; END LOOP; IF (_custnumber IS NULL OR _custnumber = '') THEN IF (LENGTH(_candidate) < _minlength) THEN _minlength := LENGTH(_candidate); END IF; FOR _counter IN _minlength.._maxlength LOOP _loopmax := _loopmax * 10 + 9; _numformat := _numformat || '0'; END LOOP; FOR _counter IN 1.._loopmax LOOP _testme := SUBSTRING(_candidate FOR _minlength) || TRIM(TO_CHAR(_counter, _numformat)); IF (NOT EXISTS(SELECT cust_number FROM custinfo WHERE (cust_number=_testme))) THEN _custnumber := _testme; EXIT; END IF; END LOOP; END IF; IF (_custnumber IS NULL OR _custnumber = '') THEN RAISE EXCEPTION 'Could not generate a new Customer Number'; END IF; END IF; IF (_custnumber IS NULL OR _custnumber = '') THEN RAISE EXCEPTION 'Could not find Customer Number for % and % and %', _email, _company, _fullname; END IF; RETURN _custnumber; END; $_$; ALTER FUNCTION public.getcustnumberfrominfo(text, text, text, text, text, boolean) OWNER TO admin; -- -- Name: getcusttypeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getcusttypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustTypeCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pCustTypeCode IS NULL) THEN RETURN NULL; END IF; SELECT custtype_id INTO _returnVal FROM custtype WHERE (custtype_code=pCustTypeCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Customer Type % not found.', pCustTypeCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getcusttypeid(text) OWNER TO admin; -- -- Name: getdeptid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getdeptid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pDeptNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pDeptNumber), '') = '') THEN RETURN NULL; END IF; SELECT dept_id INTO _returnVal FROM dept WHERE (UPPER(dept_number)=UPPER(pDeptNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Department % not found.', pDeptNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getdeptid(text) OWNER TO admin; -- -- Name: getediprofileid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getediprofileid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pEdiProfileName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pEdiProfileName IS NULL) THEN RETURN NULL; END IF; SELECT pkghead_id INTO _returnVal FROM pkghead WHERE(pkghead_name='xtbatch'); IF(NOT FOUND) THEN RETURN NULL; END IF; SELECT ediprofile_id INTO _returnVal FROM xtbatch.ediprofile WHERE (ediprofile_name=pEdiProfileName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'EDI Profile % not found.', pEdiProfileName; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getediprofileid(text) OWNER TO admin; -- -- Name: getediprofilename(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getediprofilename(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pEdiProfileId ALIAS FOR $1; _returnVal TEXT; BEGIN IF (pEdiProfileId IS NULL) THEN RETURN NULL; END IF; SELECT pkghead_name INTO _returnVal FROM pkghead WHERE(pkghead_name='xtbatch'); IF(NOT FOUND) THEN RETURN NULL; END IF; SELECT ediprofile_name INTO _returnVal FROM xtbatch.ediprofile WHERE (ediprofile_id=pEdiProfileId); RETURN _returnVal; END; $_$; ALTER FUNCTION public.getediprofilename(integer) OWNER TO admin; -- -- Name: getempid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getempid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pEmpCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pEmpCode), '') = '') THEN RETURN NULL; END IF; SELECT emp_id INTO _returnVal FROM emp WHERE (UPPER(emp_code)=UPPER(pEmpCode)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Employee % not found.', pEmpCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getempid(text) OWNER TO admin; -- -- Name: getexpcatid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getexpcatid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pExpcatCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pExpcatCode), '') = '') THEN RETURN NULL; END IF; SELECT expcat_id INTO _returnVal FROM expcat WHERE (expcat_code=UPPER(pExpcatCode)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Expense Category % not found.', pExpcatCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getexpcatid(text) OWNER TO admin; -- -- Name: getflcoldata(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getflcoldata(integer, integer) RETURNS SETOF flcoldata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlcolid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _row flcoldata%ROWTYPE; _r RECORD; _start DATE; _end DATE; _col INTEGER := 1; _mult INTEGER; BEGIN --Get Layout Data SELECT * INTO _r FROM flcol WHERE (flcol_id=pFlcolid); -- Handle Month... IF (_r.flcol_month) THEN SELECT period_start, period_end INTO _start, _end FROM period WHERE (period_id=pPeriodid); IF (_r.flcol_showdb) THEN -- Debits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- Credits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; END IF; -- Month Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_prcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budget) THEN _col := _col + 1; IF (_r.flcol_budgetprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiff) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiffprcnt) THEN _col := _col + 1; END IF; END IF; END IF; -- Handle Quarter... IF (_r.flcol_quarter) THEN SELECT min(qtr.period_start), max(qtr.period_end) INTO _start, _end FROM period p JOIN period qtr ON (p.period_quarter=qtr.period_quarter) AND (p.period_yearperiod_id=qtr.period_yearperiod_id) WHERE (p.period_id=pPeriodid); IF (_r.flcol_showdb) THEN -- Debits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- Credits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; END IF; -- Quarter Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_prcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budget) THEN _col := _col + 1; IF (_r.flcol_budgetprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiff) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiffprcnt) THEN _col := _col + 1; END IF; END IF; END IF; -- Handle Year... IF (_r.flcol_year) THEN SELECT yearperiod_start, period_end INTO _start, _end FROM period p JOIN yearperiod ON (period_yearperiod_id=yearperiod_id) WHERE (p.period_id=pPeriodid); IF (_r.flcol_showdb) THEN -- Debits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- Credits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; END IF; -- Year Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_prcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budget) THEN _col := _col + 1; IF (_r.flcol_budgetprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiff) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiffprcnt) THEN _col := _col + 1; END IF; END IF; END IF; -- Handle Prior Month... IF (_r.flcol_priormonth) THEN SELECT prv.period_start, prv.period_end INTO _start, _end FROM period p JOIN period prv ON (prv.period_start < p.period_start) WHERE (p.period_id=pPeriodid) ORDER BY prv.period_start DESC LIMIT 1; -- Prior Month Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_priorprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_priordiff) THEN _col := _col + 1; END IF; IF (_r.flcol_priordiffprcnt) THEN _col := _col + 1; END IF; END IF; -- Handle Prior Quarter... IF (_r.flcol_priorquarter) THEN IF (_r.flcol_priortype = 'P') THEN -- Prior Quarter SELECT min(period_start), max(period_end) INTO _start, _end FROM ( SELECT prv.period_start, prv.period_end, prv.period_quarter, prv.period_yearperiod_id FROM period p JOIN period prv ON (prv.period_start < p.period_start) AND (prv.period_quarter != p.period_quarter) WHERE (p.period_id=pPeriodid)) data GROUP BY period_quarter, period_yearperiod_id ORDER BY min(period_start) DESC LIMIT 1; ELSE -- Prior Year Quarter SELECT min(period_start), max(period_end) INTO _start, _end FROM ( SELECT prv.period_start, prv.period_end, prv.period_quarter, prv.period_yearperiod_id FROM period p JOIN period prv ON (prv.period_start < p.period_start) AND (prv.period_yearperiod_id != p.period_yearperiod_id) AND (prv.period_quarter = p.period_quarter) WHERE (p.period_id=pPeriodid)) data GROUP BY period_quarter, period_yearperiod_id ORDER BY min(period_start) DESC LIMIT 1; END IF; -- Prior Quarter Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_priorprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_priordiff) THEN _col := _col + 1; END IF; IF (_r.flcol_priordiffprcnt) THEN _col := _col + 1; END IF; END IF; -- Handle Prior Year... IF (_r.flcol_prioryear IN ('D','F')) THEN IF (_r.flcol_prioryear = 'D') THEN -- Prior Year to Date SELECT yearperiod_start, prv.period_end INTO _start, _end FROM period p JOIN period prv ON (prv.period_number = p.period_number) AND (prv.period_yearperiod_id != p.period_yearperiod_id) AND (prv.period_start < p.period_start) JOIN yearperiod ON (prv.period_yearperiod_id=yearperiod_id) WHERE (p.period_id=pPeriodid) ORDER BY prv.period_start DESC LIMIT 1; ELSE -- Prior Full Year SELECT prv.yearperiod_start, prv.yearperiod_end INTO _start, _end FROM period p JOIN yearperiod cur ON (cur.yearperiod_id=p.period_yearperiod_id) JOIN yearperiod prv ON (prv.yearperiod_start < cur.yearperiod_start) WHERE (p.period_id=pPeriodid) ORDER BY prv.yearperiod_start DESC LIMIT 1; END IF; -- Prior Year Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; END IF; RETURN; END; $_$; ALTER FUNCTION public.getflcoldata(integer, integer) OWNER TO admin; -- -- Name: getflcoldata(character, integer[], boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getflcoldata(character, integer[], boolean) RETURNS SETOF flcoldata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInterval ALIAS FOR $1; pPeriodids ALIAS FOR $2; pBudgets ALIAS FOR $3; _row flcoldata%ROWTYPE; _r RECORD; _start DATE; _end DATE; _col INTEGER := 1; _count INTEGER; _i INTEGER := 1; _incr INTEGER := 1; BEGIN IF (pBudgets) THEN _col := 2; _incr := 2; END IF; _count := ARRAY_UPPER(pPeriodIds,1); IF (pInterval = 'M') THEN FOR _i IN 1.._count LOOP SELECT period_start, period_end INTO _start, _end FROM period WHERE (period_id=pPeriodids[_i]); _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + _incr; END LOOP; ELSIF (pInterval = 'Q') THEN FOR _i IN 1.._count LOOP SELECT min(qtr.period_start), max(qtr.period_end) INTO _start, _end FROM period cur JOIN period qtr ON (cur.period_yearperiod_id=qtr.period_yearperiod_id) AND (cur.period_quarter=qtr.period_quarter) WHERE (cur.period_id=pPeriodids[_i]); _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + _incr; END LOOP; ELSE FOR _i IN 1.._count LOOP SELECT yearperiod_start, yearperiod_end INTO _start, _end FROM period JOIN yearperiod ON (period_yearperiod_id=yearperiod_id) WHERE (period_id=pPeriodids[_i]); _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + _incr; END LOOP; END IF; RETURN; END; $_$; ALTER FUNCTION public.getflcoldata(character, integer[], boolean) OWNER TO admin; -- -- Name: getflstmthead(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getflstmthead(integer, integer) RETURNS SETOF flstmthead LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlcolid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _row flstmthead%ROWTYPE; _p RECORD; _month TEXT; _qtr TEXT; _year TEXT; _prmonth TEXT; _prqtr TEXT; _pryear TEXT; _err TEXT; BEGIN SELECT 'No Data' INTO _err; --Get Layout Data SELECT flcol_priortype, flcol_prioryear INTO _p FROM flcol WHERE (flcol_id=pFlcolid); --get data... --...for current Month SELECT (CASE WHEN period_name='' THEN formatdate(period_start) || '-' || formatdate(period_end) ELSE period_name END) INTO _month FROM period WHERE (period_id=pPeriodId); IF _month IS NULL THEN _month := _err; END IF; --...for Quarter SELECT ('Q' || period_quarter || '-' || EXTRACT(year from yearperiod_end)) INTO _qtr FROM period, yearperiod WHERE ((period_id=pPeriodId) AND (period_yearperiod_id=yearperiod_id)); IF _qtr IS NULL THEN _qtr := _err; END IF; --...for Year SELECT COALESCE((CASE WHEN period_name='' THEN (formatdate(period_start) || '-' || formatdate(period_end) || ' YTD') ELSE (period_name || ' YTD') END),'No Data') INTO _year FROM period WHERE (period_id=pPeriodId); IF _year IS NULL THEN _year := _err; END IF; --...for prior month IF (_p.flcol_priortype = 'P') THEN SELECT (CASE WHEN pp.period_name='' THEN formatdate(pp.period_start) || '-' || formatdate(pp.period_end) ELSE pp.period_name END) INTO _prmonth FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1; ELSE SELECT (CASE WHEN pp.period_name='' THEN formatdate(pp.period_start) || '-' || formatdate(pp.period_end) ELSE pp.period_name END) INTO _prmonth FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_id != pp.period_id) AND (cp.period_start > pp.period_start) AND (cp.period_number = pp.period_number)) ORDER BY pp.period_start DESC LIMIT 1; END IF; IF _prmonth IS NULL THEN _prmonth := _err; END IF; --...for prior quarter IF (_p.flcol_priortype='P') THEN SELECT ('Q' || pp.period_quarter || '-' || EXTRACT(year from yearperiod_end)) INTO _prqtr FROM period cp, period pp, yearperiod WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start) AND (pp.period_quarter= CASE WHEN cp.period_quarter > 1 THEN cp.period_quarter - 1 ELSE 4 END) AND (pp.period_start >= cp.period_start - interval '1 year') AND (pp.period_yearperiod_id=yearperiod_id)) ORDER BY pp.period_start DESC LIMIT 1; ELSE SELECT ('Q' || pp.period_quarter || '-' || EXTRACT(year from pp.period_start)) INTO _prqtr FROM period cp, period pp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=cy.yearperiod_id) AND (pp.period_yearperiod_id=py.yearperiod_id) AND (cp.period_quarter=pp.period_quarter) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY py.yearperiod_start DESC, pp.period_start DESC LIMIT 1; END IF; IF _prqtr IS NULL THEN _prqtr := _err; END IF; --...for prior year IF (_p.flcol_prioryear='F') THEN SELECT (EXTRACT(year from py.yearperiod_end)||'') INTO _pryear FROM period cp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id = cy.yearperiod_id) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY py.yearperiod_start DESC LIMIT 1; ELSE SELECT (CASE WHEN pp.period_name='' THEN formatdate(pp.period_start) || '-' || formatdate(pp.period_end) || ' YTD' ELSE pp.period_name || ' YTD' END) INTO _pryear FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_number = pp.period_number) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1; END IF; IF _pryear IS NULL THEN _pryear := _err; END IF; -- RETURN RESULTS SELECT flhead_id AS flstmthead_flhead_id, flcol_id AS flstmthead_flcol_id, pPeriodid AS flstmthead_period, getEffectiveXtUser() AS flstmthead_username, CASE WHEN flhead_type = 'I' THEN 'Income Statement' WHEN flhead_type = 'B' THEN 'Balance Sheet' WHEN flhead_type = 'C' THEN 'Cash Flow Statement' ELSE 'N/A' END AS flstmthead_flhead_typedescrip1, CASE WHEN flhead_type = 'I' THEN 'Income' WHEN flhead_type = 'B' THEN 'Balance' WHEN flhead_type = 'C' THEN 'Cash' ELSE 'N/A' END AS flstmthead_flhead_typedescrip2, flhead_name AS flstmthead_flhead_name, flcol_name AS flstmthead_flcol_name, _month AS flstmthead_month, _qtr AS flstmthead_qtr, _year AS flstmthead_year, _prmonth AS flstmthead_prmonth, _prqtr AS flstmthead_prqtr, _pryear AS flstmthead_pryear INTO _p FROM flhead,flcol WHERE ((flcol_id=pFlcolid) AND (flhead_id=flcol_flhead_id)); _row.flstmthead_flhead_id := _p.flstmthead_flhead_id; _row.flstmthead_flcol_id := _p.flstmthead_flcol_id; _row.flstmthead_period_id := _p.flstmthead_period; _row.flstmthead_username := _p.flstmthead_username; _row.flstmthead_typedescrip1 := _p.flstmthead_flhead_typedescrip1; _row.flstmthead_typedescrip2 := _p.flstmthead_flhead_typedescrip2; _row.flstmthead_flhead_name := _p.flstmthead_flhead_name; _row.flstmthead_flcol_name := _p.flstmthead_flcol_name; _row.flstmthead_month := _p.flstmthead_month; _row.flstmthead_qtr := _p.flstmthead_qtr; _row.flstmthead_year := _p.flstmthead_year; _row.flstmthead_prmonth := _p.flstmthead_prmonth; _row.flstmthead_prqtr := _p.flstmthead_prqtr; _row.flstmthead_pryear := _p.flstmthead_pryear; RETURN NEXT _row; END; $_$; ALTER FUNCTION public.getflstmthead(integer, integer) OWNER TO admin; -- -- Name: getfltrendhead(integer, integer[], character); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getfltrendhead(integer, integer[], character) RETURNS SETOF fltrendhead LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodids ALIAS FOR $2; pInterval ALIAS FOR $3; _row fltrendhead%ROWTYPE; _p RECORD; _count INTEGER; _i INTEGER; _t TEXT; _fld TEXT[]; _type CHAR; BEGIN -- Validate Interval IF pInterval <> 'M' AND pInterval <> 'Q' AND pInterval <> 'Y' THEN RAISE EXCEPTION 'Invalid Interval --> %', pInterval; END IF; IF ARRAY_UPPER(pPeriodIds,1) <= 12 THEN _count := ARRAY_UPPER(pPeriodIds,1); ELSE _count := 12; END IF; SELECT flhead_type INTO _type FROM flhead WHERE flhead_id = pFlheadId; --get data... --...for Month IF (pInterval = 'M') THEN FOR _i IN 1.._count LOOP SELECT (CASE WHEN period_name='' THEN formatdate(period_start) || '-' || formatdate(period_end) ELSE period_name END) INTO _t FROM period WHERE (period_id=pPeriodIds[_i]); _fld[_i] := _t; END LOOP; --...for Quarter ELSE IF (pInterval = 'Q') THEN FOR _i IN 1.._count LOOP SELECT ('Q' || period_quarter || '-' || EXTRACT(year from yearperiod_end)) INTO _t FROM period, yearperiod WHERE ((period_id=pPeriodIds[_i]) AND (period_yearperiod_id=yearperiod_id)); _fld[_i] := _t; END LOOP; --...for Year ELSE FOR _i IN 1.._count LOOP SELECT (EXTRACT(year from yearperiod_end)||'') INTO _t FROM period, yearperiod WHERE ((period_id=pPeriodIds[_i]) AND (period_yearperiod_id=yearperiod_id)); _fld[_i] := _t; END LOOP; END IF; END IF; -- RETURN RESULTS SELECT flhead_id AS fltrendhead_flhead_id, getEffectiveXtUser() AS fltrendhead_username, CASE WHEN flhead_type = 'I' THEN 'Income Statement' WHEN flhead_type = 'B' THEN 'Balance Sheet' WHEN flhead_type = 'C' THEN 'Cash Flow Statement' ELSE 'Ad Hoc' END AS fltrendhead_flhead_typedescrip, flhead_name AS fltrendhead_flhead_name INTO _p FROM flhead WHERE (flhead_id=pFlheadId); _row.fltrendhead_flhead_id := _p.fltrendhead_flhead_id; _row.fltrendhead_username := _p.fltrendhead_username; _row.fltrendhead_typedescrip := _p.fltrendhead_flhead_typedescrip; _row.fltrendhead_flhead_name := _p.fltrendhead_flhead_name; _row.fltrendhead_fld1 := _fld[1]; _row.fltrendhead_fld2 := _fld[2]; _row.fltrendhead_fld3 := _fld[3]; _row.fltrendhead_fld4 := _fld[4]; _row.fltrendhead_fld5 := _fld[5]; _row.fltrendhead_fld6 := _fld[6]; _row.fltrendhead_fld7 := _fld[7]; _row.fltrendhead_fld8 := _fld[8]; _row.fltrendhead_fld9 := _fld[9]; _row.fltrendhead_fld10 := _fld[10]; _row.fltrendhead_fld11 := _fld[11]; _row.fltrendhead_fld12 := _fld[12]; IF (_type IN ('I','C')) THEN _row.fltrendhead_grndttl := 'Total'; END IF; RETURN NEXT _row; END; $_$; ALTER FUNCTION public.getfltrendhead(integer, integer[], character) OWNER TO admin; -- -- Name: getfreightclassid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getfreightclassid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFreightClassCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pFreightClassCode IS NULL) THEN RETURN NULL; END IF; SELECT freightclass_id INTO _returnVal FROM freightclass WHERE (freightclass_code=pFreightClassCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Freight Class % not found.', pFreightClassCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getfreightclassid(text) OWNER TO admin; -- -- Name: getfreighttaxtypeid(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getfreighttaxtypeid() RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _taxtypeid INTEGER; BEGIN SELECT taxtype_id INTO _taxtypeid FROM taxtype WHERE (taxtype_name='Freight'); RETURN _taxtypeid; END; $$; ALTER FUNCTION public.getfreighttaxtypeid() OWNER TO admin; -- -- Name: getgainlossaccntid(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getgainlossaccntid(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntId ALIAS FOR $1; _returnVal INTEGER; BEGIN IF ( (pAccntId = 0) OR (pAccntId IS NULL) ) THEN RETURN 0; END IF; IF (fetchMetricValue('GLCompanySize') = 0) THEN _returnVal := fetchMetricValue('CurrencyGainLossAccount')::integer; ELSE SELECT company_gainloss_accnt_id INTO _returnVal FROM company JOIN accnt ON (company_number=accnt_company) WHERE (accnt_id=pAccntId); END IF; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Currency Gain/Loss Account not found for %', formatGlAccountLong(pAccntId); END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getgainlossaccntid(integer) OWNER TO admin; -- -- Name: getglaccntid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getglaccntid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGlAccnt ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pGlAccnt IS NULL) THEN RETURN NULL; END IF; SELECT accnt_id INTO _returnVal FROM accnt WHERE (formatglaccount(accnt_id)=pGlAccnt); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Account Number % not found.', pGlAccnt; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getglaccntid(text) OWNER TO admin; -- -- Name: getglaccntid(text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getglaccntid(text, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCompany ALIAS FOR $1; pProfit ALIAS FOR $2; pGlAccnt ALIAS FOR $3; pSub ALIAS FOR $4; _account TEXT; _returnVal INTEGER; BEGIN IF (pGlAccnt IS NULL) THEN RETURN NULL; END IF; IF (pCompany is not null) THEN _account := pCompany || '-'; END IF; IF (pProfit is not null) THEN _account := _account || pProfit || '-'; END IF; IF (pGlAccnt is not null) THEN if (_account is null) then _account := pGlAccnt; else _account := _account || pGlAccnt; end if; END IF; IF (pSub is not null) THEN _account := _account || '-' || pSub; END IF; SELECT accnt_id INTO _returnVal FROM accnt WHERE (formatglaccount(accnt_id)=_account); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Account Number % not found.', _account; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getglaccntid(text, text, text, text) OWNER TO admin; -- -- Name: getimageid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getimageid(pimagename text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pImageName), '') = '') THEN RETURN NULL; END IF; SELECT image_id INTO _returnVal FROM image WHERE (image_name=pImageName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Image % not found.', pImageName; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getimageid(pimagename text) OWNER TO admin; -- -- Name: getincdtcatid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getincdtcatid(pincdtcatname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncdtCatName IS NULL) THEN RETURN NULL; END IF; SELECT incdtcat_id INTO _returnVal FROM incdtcat WHERE (incdtcat_name=pIncdtCatName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Category Name % not found.', pIncdtCatName; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getincdtcatid(pincdtcatname text) OWNER TO admin; -- -- Name: getincdtcrmacctid(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getincdtcrmacctid(pincidentnumber integer) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncidentNumber IS NULL) THEN RETURN NULL; END IF; SELECT incdt_crmacct_id INTO _returnVal FROM incdt WHERE (incdt_number=pIncidentNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Number % not found.', pIncidentNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getincdtcrmacctid(pincidentnumber integer) OWNER TO admin; -- -- Name: getincdtpriorityid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getincdtpriorityid(pincdtpriorityname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncdtPriorityName IS NULL) THEN RETURN NULL; END IF; SELECT incdtpriority_id INTO _returnVal FROM incdtpriority WHERE (incdtpriority_name=pIncdtPriorityName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Priority Name % not found.', pIncdtPriorityName; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getincdtpriorityid(pincdtpriorityname text) OWNER TO admin; -- -- Name: getincdtresolutionid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getincdtresolutionid(pincdtresolutionname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncdtResolutionName IS NULL) THEN RETURN NULL; END IF; SELECT incdtresolution_id INTO _returnVal FROM incdtresolution WHERE (incdtresolution_name=pIncdtResolutionName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Resolution Name % not found.', pIncdtResolutionName; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getincdtresolutionid(pincdtresolutionname text) OWNER TO admin; -- -- Name: getincdtseverityid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getincdtseverityid(pincdtseverityname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncdtSeverityName IS NULL) THEN RETURN NULL; END IF; SELECT incdtseverity_id INTO _returnVal FROM incdtseverity WHERE (incdtseverity_name=pIncdtSeverityName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Severity Name % not found.', pIncdtSeverityName; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getincdtseverityid(pincdtseverityname text) OWNER TO admin; -- -- Name: getincidentid(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getincidentid(pincidentnumber integer) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncidentNumber IS NULL) THEN RETURN NULL; END IF; SELECT incdt_id INTO _returnVal FROM incdt WHERE (incdt_number=pIncidentNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Number % not found.', pIncidentNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getincidentid(pincidentnumber integer) OWNER TO admin; -- -- Name: getinvcheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getinvcheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pInvcNumber IS NULL) THEN RETURN NULL; END IF; SELECT invchead_id INTO _returnVal FROM invchead WHERE (UPPER(invchead_invcnumber)=UPPER(pInvcNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Invoice % not found.', pInvcNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getinvcheadid(text) OWNER TO admin; -- -- Name: getinvcitemlotserial(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getinvcitemlotserial(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcitemid ALIAS FOR $1; _lotserial text; _r RECORD; _first BOOLEAN; _newMethod BOOLEAN; BEGIN --Test to see if Lot/Serial Enabled SELECT metric_value INTO _lotserial FROM metric WHERE ((metric_name='LotSerialControl') AND (metric_value ='t')); IF (FOUND) THEN _lotserial := ''; _first := true; -- Two ways of doing this: old method and new method -- First, find out if new method employed. -- (new method is more accurate, but unfortunately no -- way to migrate or correct old data. Have to keep -- old method in case someone reprints an old invoice.) SELECT (COUNT(*) > 0) INTO _newMethod FROM shipitem WHERE ((shipitem_invcitem_id=pInvcitemid) AND (shipitem_invhist_id IS NOT NULL)); IF (_newMethod) THEN FOR _r IN SELECT DISTINCT ls_number FROM invdetail, invhist, shipitem, ls WHERE ((shipitem_invcitem_id=pInvcitemid) AND (shipitem_invhist_id=invhist_id) AND (invhist_id=invdetail_invhist_id) AND (invdetail_ls_id=ls_id)) LOOP IF (_first = false) THEN _lotserial := _lotserial || ', '; END IF; _lotserial := _lotserial || _r.ls_number; _first := false; END LOOP; RETURN _lotserial; ELSE -- Handle it old way FOR _r IN SELECT DISTINCT ls_number FROM ls, invdetail JOIN invhist ON (invdetail_invhist_id=invhist_id) WHERE ((invhist_transtype='SH') AND (invdetail_invcitem_id=pInvcitemid) AND (invdetail_ls_id=ls_id)) LOOP IF (_first = false) THEN _lotserial := _lotserial || ', '; END IF; _lotserial := _lotserial || _r.ls_number; _first := false; END LOOP; RETURN _lotserial; END IF; ELSE RETURN ''; END IF; END $_$; ALTER FUNCTION public.getinvcitemlotserial(integer) OWNER TO admin; -- -- Name: getipsheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getipsheadid(pipsname text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIpsName IS NULL) THEN RETURN NULL; END IF; SELECT ipshead_id INTO _returnVal FROM ipshead WHERE (ipshead_name=pIpsName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Pricing Schedule % not found.', pIpsName; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getipsheadid(pipsname text) OWNER TO admin; -- -- Name: getipsitemid(text, text, numeric, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getipsitemid(pipsname text, pitemnumber text, pqtybreak numeric, pqtyuom text, ppriceuom text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIpsName IS NULL AND pItemNumber IS NULL AND pQtyBreak IS NULL AND pQtyUom IS NULL AND pPriceUom IS NULL) THEN RETURN NULL; END IF; SELECT ipsitem_id INTO _returnVal FROM ipsiteminfo WHERE ((ipsitem_ipshead_id=getIpsheadId(pIpsName)) AND (ipsitem_item_id=getItemId(pItemNumber)) AND (ipsitem_qtybreak=pQtyBreak) AND (ipsitem_qty_uom_id=getUomId(pQtyUom)) AND (ipsitem_price_uom_id=getUomId(pPriceUom))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Pricing Schedule Item for Schedule %, Item %,Qt Break %,Qty UOM %, Price UOM % not found.', pIpsName, pItemNumber, pQtyBreak, pQtyUom, pPriceUom; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getipsitemid(pipsname text, pitemnumber text, pqtybreak numeric, pqtyuom text, ppriceuom text) OWNER TO admin; -- -- Name: getipsprodcatid(text, text, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getipsprodcatid(pipsname text, pprodcat text, pqtybreak numeric) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIpsName IS NULL AND pProdCat IS NULL AND pQtyBreak IS NULL) THEN RETURN NULL; END IF; SELECT ipsitem_id INTO _returnVal FROM ipsiteminfo WHERE ((ipsitem_ipshead_id=getIpsheadId(pIpsName)) AND (ipsitem_prodcat_id=getProdcatId(pProdCat)) AND (ipsitem_qtybreak=pQtyBreak)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Pricing Schedule Product Category for Schedule %, Product Category %,Qt Break % not found.', pIpsName, pProdCat, pQtyBreak; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getipsprodcatid(pipsname text, pprodcat text, pqtybreak numeric) OWNER TO admin; -- -- Name: getitemid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getitemid(text) RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pItemNumber IS NULL) THEN RETURN NULL; END IF; SELECT item_id INTO _returnVal FROM item WHERE (item_number=UPPER(pItemNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Item % not found.', pItemNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getitemid(text) OWNER TO admin; -- -- Name: getitemidfromupc(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getitemidfromupc(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemUPC ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pItemUPC IS NULL) THEN RETURN NULL; END IF; SELECT item_id INTO _returnVal FROM item WHERE (item_upccode=UPPER(pItemUPC)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Item % not found.', pItemUPC; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getitemidfromupc(text) OWNER TO admin; -- -- Name: getitemsiteid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getitemsiteid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehouseCode ALIAS FOR $1; pItemNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN SELECT getItemsiteId(pWarehouseCode,pItemNumber,'ALL') INTO _returnVal; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getitemsiteid(text, text) OWNER TO admin; -- -- Name: getitemsiteid(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getitemsiteid(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehouseCode ALIAS FOR $1; pItemNumber ALIAS FOR $2; pType ALIAS FOR $3; _type TEXT; _p RECORD; BEGIN IF ((pWarehouseCode IS NULL) OR (pItemNumber IS NULL)) THEN RETURN NULL; END IF; IF UPPER(pType) NOT IN ('ALL','ACTIVE','SOLD') THEN RAISE EXCEPTION 'Invalid Type %. Valid Itemsite types are ALL and SOLD', pType; END IF; SELECT * INTO _p FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_warehous_id=getWarehousId(pWarehouseCode,'ALL')) AND (item_number=UPPER(pItemNumber))); IF NOT (FOUND) THEN RAISE EXCEPTION 'Item % not found in Warehouse %', pItemNumber, pWarehouseCode; ELSIF ((UPPER(pType)='ACTIVE') OR (UPPER(pType)='SOLD')) THEN IF NOT (_p.item_active) THEN RAISE EXCEPTION 'Item % is inactive.', pItemNumber; ELSE IF NOT (_p.itemsite_active) THEN RAISE EXCEPTION 'Item % is inactive in Warehouse %', pItemNumber, pWarehouseCode; ELSE IF ((UPPER(pType)='SOLD') AND NOT _p.item_sold) THEN RAISE EXCEPTION 'Item % is not sold', pItemNumber; ELSE IF ((UPPER(pType)='SOLD') AND NOT _p.itemsite_sold) THEN RAISE EXCEPTION 'Item % is not sold from Warehouse %', pItemNumber, pWarehouseCode; END IF; END IF; END IF; END IF; END IF; RETURN _p.itemsite_id; END; $_$; ALTER FUNCTION public.getitemsiteid(text, text, text) OWNER TO admin; -- -- Name: getitemsrcid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getitemsrcid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; pVendNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pItemNumber IS NULL) OR (pVendNumber IS NULL)) THEN RETURN NULL; END IF; SELECT itemsrc_id INTO _returnVal FROM itemsrc WHERE ((itemsrc_item_id=getItemId(pItemNumber)) AND (itemsrc_vend_id=getVendId(pVendNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Item Source Item % Vendor % not found.', pItemNumber,pVendNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getitemsrcid(text, text) OWNER TO admin; -- -- Name: getlasttrialbalid(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getlasttrialbalid(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntId ALIAS FOR $1; pPeriodId ALIAS FOR $2; _p RECORD; _accntType TEXT; _result NUMERIC; BEGIN SELECT period_end,period_yearperiod_id INTO _p FROM period WHERE period_id=pPeriodId; SELECT accnt_type INTO _accntType FROM accnt WHERE accnt_id=pAccntId; IF (_accntType IN ('R','E')) THEN SELECT trialbal_id INTO _result FROM trialbal WHERE ((trialbal_accnt_id=pAccntId) AND (trialbal_period_id=pPeriodId)); ELSE SELECT trialbal_id INTO _result FROM (SELECT trialbal_id FROM trialbal,period WHERE ((trialbal_accnt_id=pAccntId) AND (trialbal_period_id=period_id) AND (period_end <= _p.period_end) AND (period_yearperiod_id=_p.period_yearperiod_id)) ORDER BY period_end DESC) AS data; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.getlasttrialbalid(integer, integer) OWNER TO admin; -- -- Name: getlocationid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getlocationid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehouse ALIAS FOR $1; pLocation ALIAS FOR $2; _returnVal INTEGER; BEGIN IF (pLocation IS NULL) THEN RETURN NULL; END IF; SELECT location_id INTO _returnVal FROM location WHERE ((location_warehous_id=getWarehousId(pWarehouse,'ACTIVE')) AND (formatLocationname(location_id)=pLocation)) LIMIT 1; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Location % not found in Warehouse %.', pLocation, pWarehouse; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getlocationid(text, text) OWNER TO admin; -- -- Name: getlotserialid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getlotserialid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; pLotSerialNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pItemNumber IS NULL) OR (pLotSerialNumber IS NULL) OR (pLotSerialNumber='')) THEN RETURN NULL; END IF; SELECT ls_id INTO _returnVal FROM ls WHERE ((ls_item_id=getItemId(pItemNumber)) AND (UPPER(ls_number)=UPPER(pLotSerialNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'LotSerial % not found.', pLotSerialNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getlotserialid(text, text) OWNER TO admin; -- -- Name: getopheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getopheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOpHeadName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pOpHeadName IS NULL) THEN RETURN NULL; END IF; SELECT ophead_id INTO _returnVal FROM ophead WHERE (UPPER(ophead_name)=UPPER(pOpHeadName)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Opportunity % not found.', pOpHeadName; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getopheadid(text) OWNER TO admin; -- -- Name: getpacklistcharname(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getpacklistcharname(integer, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadId ALIAS FOR $1; pOrderItemId ALIAS FOR $2; _charname text; _r RECORD; _first BOOLEAN; BEGIN -- If transfer order, get out SELECT shiphead_order_type INTO _r FROM shiphead WHERE ((shiphead_id=pShipheadId) AND (shiphead_order_type='TO')); IF (FOUND) THEN RETURN ''; END IF; _charname := ''; _first := true; FOR _r IN SELECT char_name FROM char, charass WHERE ((char_id=charass_char_id) AND (charass_target_type='SI') AND (charass_target_id=pOrderItemId)) LOOP IF (_first = false) THEN _charname := _charname || ' '; END IF; _charname := _charname || _r.char_name; _first := false; END LOOP; RETURN _charname; END $_$; ALTER FUNCTION public.getpacklistcharname(integer, integer) OWNER TO admin; -- -- Name: getpacklistcharvalue(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getpacklistcharvalue(integer, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadId ALIAS FOR $1; pOrderItemId ALIAS FOR $2; _charval text; _r RECORD; _first BOOLEAN; BEGIN -- If transfer order, get out SELECT shiphead_order_type INTO _r FROM shiphead WHERE ((shiphead_id=pShipheadId) AND (shiphead_order_type='TO')); IF (FOUND) THEN RETURN ''; END IF; _charval := ''; _first := true; FOR _r IN SELECT charass_value FROM char, charass WHERE ((char_id=charass_char_id) AND (charass_target_type='SI') AND (charass_target_id=pOrderItemId)) LOOP IF (_first = false) THEN _charval := _charval || ' '; END IF; _charval := _charval || _r.charass_value; _first := false; END LOOP; RETURN _charval; END $_$; ALTER FUNCTION public.getpacklistcharvalue(integer, integer) OWNER TO admin; -- -- Name: getpacklistitemlotserial(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getpacklistitemlotserial(integer, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadId ALIAS FOR $1; pOrderItemId ALIAS FOR $2; _lotserial text; _r RECORD; _first BOOLEAN; BEGIN --Test to see if Lot/Serial Enabled SELECT metric_value INTO _lotserial FROM metric WHERE ((metric_name='LotSerialControl') AND (metric_value ='t')); IF (FOUND) THEN _lotserial := ''; _first := true; FOR _r IN SELECT DISTINCT ls_number FROM invdetail, invhist, shipitem, ls WHERE ((shipitem_shiphead_id=pShipheadId) AND (shipitem_orderitem_id=pOrderItemId) AND (shipitem_invhist_id=invhist_id) AND (invhist_id=invdetail_invhist_id) AND (invdetail_ls_id=ls_id)) LOOP IF (_first = false) THEN _lotserial := _lotserial || ', '; END IF; _lotserial := _lotserial || _r.ls_number; _first := false; END LOOP; RETURN _lotserial; ELSE RETURN ''; END IF; END $_$; ALTER FUNCTION public.getpacklistitemlotserial(integer, integer) OWNER TO admin; -- -- Name: getperiodid(integer, character); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getperiodid(integer, character) RETURNS SETOF integer LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodId ALIAS FOR $1; pInterval ALIAS FOR $2; _x RECORD; BEGIN -- Validate Interval IF pInterval <> 'M' AND pInterval <> 'Q' AND pInterval <> 'Y' THEN RAISE EXCEPTION 'Invalid Interval --> %', pInterval; END IF; IF pInterval='M' THEN RETURN NEXT pPeriodId; ELSE IF pInterval='Q' THEN FOR _x IN SELECT qp.period_id AS period_id FROM period cp, period qp WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=qp.period_yearperiod_id) AND (cp.period_quarter=qp.period_quarter) AND (cp.period_start>=qp.period_start)) ORDER BY qp.period_start LOOP RETURN NEXT _x.period_id; END LOOP; ELSE FOR _x IN SELECT yp.period_id AS period_id FROM period cp, period yp WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=yp.period_yearperiod_id) AND (cp.period_start>=yp.period_start)) ORDER BY yp.period_start LOOP RETURN NEXT _x.period_id; END LOOP; END IF; END IF; RETURN; END; $_$; ALTER FUNCTION public.getperiodid(integer, character) OWNER TO admin; -- -- Name: getperiodid(date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getperiodid(date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodDate ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pPeriodDate IS NULL) THEN RETURN NULL; END IF; SELECT period_id INTO _returnVal FROM period WHERE ((pPeriodDate) between period_start AND period_end); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Period for % not found.', pPeriodDate; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getperiodid(date) OWNER TO admin; -- -- Name: getpkgheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getpkgheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgname ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (ppkgname IS NULL) THEN RETURN NULL; END IF; SELECT pkghead_id INTO _returnVal FROM pkghead WHERE (UPPER(pkghead_name)=UPPER(ppkgname)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Package % not found.', ppkgname; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getpkgheadid(text) OWNER TO admin; -- -- Name: getplancodeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getplancodeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPlanCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pPlanCode IS NULL) THEN RETURN NULL; END IF; SELECT plancode_id INTO _returnVal FROM plancode WHERE (plancode_code=pPlanCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Plan Code % not found.', pPlanCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getplancodeid(text) OWNER TO admin; -- -- Name: getpoheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getpoheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPurchaseOrderNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pPurchaseOrderNumber IS NULL) THEN RETURN NULL; END IF; SELECT pohead_id INTO _returnVal FROM pohead WHERE (pohead_number=pPurchaseOrderNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Purchase Order % not found.', pPurchaseOrderNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getpoheadid(text) OWNER TO admin; -- -- Name: getpoitemid(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getpoitemid(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPurchaseOrderNumber ALIAS FOR $1; pLineNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF (pPurchaseOrderNumber IS NULL OR pLineNumber IS NULL) THEN RETURN NULL; END IF; SELECT poitem_id INTO _returnVal FROM pohead, poitem WHERE ((pohead_number=pPurchaseOrderNumber) AND (poitem_pohead_id=pohead_id) AND (poitem_linenumber=pLineNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Purchase Order % not found.', pSalesOrderNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getpoitemid(text, integer) OWNER TO admin; -- -- Name: getprjaccntid(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getprjaccntid(integer, integer) RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrjid ALIAS FOR $1; pAccntid ALIAS FOR $2; BEGIN -- Project Accounting is required to fully implement this functionality RETURN pAccntId; END; $_$; ALTER FUNCTION public.getprjaccntid(integer, integer) OWNER TO admin; -- -- Name: getprjid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getprjid(pprjnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pPrjNumber IS NULL) THEN RETURN NULL; END IF; SELECT prj_id INTO _returnVal FROM prj WHERE (prj_number=pPrjNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Project Number % not found.', pPrjNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getprjid(pprjnumber text) OWNER TO admin; -- -- Name: getprjtaskid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getprjtaskid(pprjnumber text, ptasknumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pPrjNumber IS NULL OR pTaskNumber IS NULL) THEN RETURN NULL; END IF; SELECT prjtask_id INTO _returnVal FROM prjtask JOIN prj ON (prj_id=prjtask_prj_id) WHERE ((prj_number=pPrjNumber) AND (prjtask_number=pTaskNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Project Task Number %-% not found.', pPrjNumber, pTaskNumber; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getprjtaskid(pprjnumber text, ptasknumber text) OWNER TO admin; -- -- Name: getprodcatid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getprodcatid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pProdCat ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pProdCat IS NULL) THEN RETURN NULL; END IF; SELECT prodcat_id INTO _returnVal FROM prodcat WHERE (prodcat_code=pProdCat); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Product Category % not found.', pProdCat; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getprodcatid(text) OWNER TO admin; -- -- Name: getprospectid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getprospectid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pProspectNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pProspectNumber IS NULL) THEN RETURN NULL; END IF; SELECT prospect_id INTO _returnVal FROM prospect WHERE(UPPER(prospect_number)=UPPER(pProspectNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Prospect Number % found.', pProspectNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getprospectid(text) OWNER TO admin; -- -- Name: getquoteid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getquoteid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuoteNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pQuoteNumber IS NULL) THEN RETURN NULL; END IF; SELECT quhead_id INTO _returnVal FROM quhead WHERE (quhead_number=pQuoteNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Quote Number % not found.', pQuoteNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getquoteid(text) OWNER TO admin; -- -- Name: getquotelineitemid(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getquotelineitemid(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuoteNumber ALIAS FOR $1; pLineNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pQuoteNumber IS NULL) OR (pLineNumber IS NULL)) THEN RETURN NULL; END IF; SELECT quitem_id INTO _returnVal FROM quhead, quitem WHERE ((quhead_number=pQuoteNumber) AND (quhead_id=quitem_quhead_id) AND (quitem_linenumber=pLineNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Quote Line Item %-%not found.', pQuoteNumber,pLineNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getquotelineitemid(text, integer) OWNER TO admin; -- -- Name: getrevid(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getrevid(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pType ALIAS FOR $1; pItemNumber ALIAS FOR $2; pRevision ALIAS FOR $3; _returnVal INTEGER; BEGIN IF (pItemNumber IS NULL) THEN RETURN NULL; END IF; IF (NOT fetchMetricBool('RevControl')) THEN RETURN -1; ELSIF ( (pRevision IS NULL) OR (LENGTH(pRevision)=0) ) THEN SELECT getActiveRevId(pType, getItemId(pItemNumber)) INTO _returnVal; ELSE IF (pType='BOM') THEN SELECT rev_id INTO _returnVal FROM item, bomhead, rev WHERE ((item_id=bomhead_item_id) AND (bomhead_rev_id=rev_id) AND (UPPER(item_number)=UPPER(pItemNumber)) AND (rev_number=pRevision)); ELSIF (pType='BOO') THEN SELECT rev_id INTO _returnVal FROM item, xtmfg.boohead, rev WHERE ((item_id=boohead_item_id) AND (boohead_rev_id=rev_id) AND (UPPER(item_number)=UPPER(pItemNumber)) AND (rev_number=pRevision)); ELSE RAISE EXCEPTION 'Invalid Revision Type.'; END IF; END IF; IF (_returnVal IS NULL) THEN RAISE EXCEPTION '% revision % for % not found.', pType, pRevision, pItemNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getrevid(text, text, text) OWNER TO admin; -- -- Name: getrsnid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getrsnid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pRsnCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pRsnCode IS NULL) THEN RETURN NULL; END IF; SELECT rsncode_id INTO _returnVal FROM rsncode WHERE (rsncode_code=pRsnCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Reason Code % not found.', pRsnCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getrsnid(text) OWNER TO admin; -- -- Name: getsalescatid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsalescatid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesCatName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSalesCatName IS NULL) THEN RETURN NULL; END IF; SELECT salescat_id INTO _returnVal FROM salescat WHERE (salescat_name=pSalesCatName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Category % not found.', pSalesCatName; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getsalescatid(text) OWNER TO admin; -- -- Name: getsaleslineitemid(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsaleslineitemid(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN getSalesLineItemId($1, $2, 0); END $_$; ALTER FUNCTION public.getsaleslineitemid(text, integer) OWNER TO admin; -- -- Name: getsaleslineitemid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsaleslineitemid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderItem ALIAS FOR $1; _delpos INTEGER = 0; _order TEXT; _part TEXT; _ln INTEGER; _sn INTEGER; BEGIN IF (pSalesOrderItem IS NULL) THEN RETURN NULL; END IF; _delpos := strpos(pSalesOrderItem, '-'); IF (_delpos > 0) THEN _order := substr(pSalesOrderItem, 1, (_delpos - 1)); _part := substr(pSalesOrderItem, (_delpos + 1)); _delpos := strpos(_part, '.'); IF (_delpos > 0) THEN _ln := CAST(substr(_part, 1, (_delpos - 1)) AS INTEGER); _sn := CAST(substr(_part, (_delpos + 1)) AS INTEGER); ELSE _ln := CAST(_part AS INTEGER); _sn := 0; END IF; RETURN getSalesLineItemId( _order, _ln, _sn ); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.getsaleslineitemid(text) OWNER TO admin; -- -- Name: getsaleslineitemid(text, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsaleslineitemid(text, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderNumber ALIAS FOR $1; pLineNumber ALIAS FOR $2; pSubNumber ALIAS FOR $3; _returnVal INTEGER; BEGIN IF ((pSalesOrderNumber IS NULL) OR (pLineNumber IS NULL)) THEN RETURN NULL; END IF; SELECT coitem_id INTO _returnVal FROM cohead, coitem WHERE ((cohead_number=pSalesOrderNumber) AND (cohead_id=coitem_cohead_id) AND (coitem_linenumber=pLineNumber) AND (coitem_subnumber=pSubNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Line Item %-%not found.', pSalesOrderNumber,pLineNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getsaleslineitemid(text, integer, integer) OWNER TO admin; -- -- Name: getsalesorderid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsalesorderid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSalesOrderNumber IS NULL) THEN RETURN NULL; END IF; SELECT cohead_id INTO _returnVal FROM cohead WHERE (cohead_number=pSalesOrderNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Order Number % not found.', pSalesOrderNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getsalesorderid(text) OWNER TO admin; -- -- Name: getsalesrepid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsalesrepid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesRepNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSalesRepNumber IS NULL) THEN RETURN NULL; END IF; SELECT salesrep_id INTO _returnVal FROM salesrep WHERE (salesrep_number=pSalesRepNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Rep Number % not found.', pSalesRepNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getsalesrepid(text) OWNER TO admin; -- -- Name: getsaletypeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsaletypeid(psaletype text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pSaleType IS NULL) THEN RETURN NULL; END IF; SELECT saletype_id INTO _returnVal FROM saletype WHERE (saletype_code=UPPER(pSaleType)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sale Type % not found.', pSaleType; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getsaletypeid(psaletype text) OWNER TO admin; -- -- Name: getshiftid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getshiftid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShiftNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pShiftNumber), '') = '') THEN RETURN NULL; END IF; SELECT shift_id INTO _returnVal FROM shift WHERE (UPPER(shift_number)=UPPER(pShiftNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Shift % not found.', pShiftNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getshiftid(text) OWNER TO admin; -- -- Name: getshipchrgid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getshipchrgid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipChrgName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pShipChrgName IS NULL) THEN RETURN NULL; END IF; SELECT shipchrg_id INTO _returnVal FROM shipchrg WHERE (shipchrg_name=pShipChrgName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Ship Charge % not found.', pShipChrgName; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getshipchrgid(text) OWNER TO admin; -- -- Name: getshipformid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getshipformid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipFormName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pShipFormName IS NULL) THEN RETURN NULL; END IF; SELECT shipform_id INTO _returnVal FROM shipform WHERE (shipform_name=pShipFormName) LIMIT 1; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Ship Form % not found.', pShipFormName; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getshipformid(text) OWNER TO admin; -- -- Name: getshipheadid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getshipheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipmentNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pShipmentNumber IS NULL OR pShipmentNumber = '') THEN RETURN NULL; END IF; SELECT shiphead_id INTO _returnVal FROM shiphead WHERE (shiphead_number=pShipmentNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Shipment % not found.', pShipmentNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getshipheadid(text) OWNER TO admin; -- -- Name: getshiptoid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getshiptoid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustNumber ALIAS FOR $1; pShiptoNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pCustNumber IS NULL) OR (pShiptoNumber IS NULL)) THEN RETURN NULL; END IF; SELECT shipto_id INTO _returnVal FROM shiptoinfo WHERE ((shipto_cust_id=getCustId(pCustNumber,true)) AND (UPPER(shipto_num)=UPPER(pShiptoNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Shipto % not found.', pShiptoNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getshiptoid(text, text) OWNER TO admin; -- -- Name: getshiptonumberfrominfo(text, text, text, text, text, text, text, text, text, text, text, text, text, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getshiptonumberfrominfo(text, text, text, text, text, text, text, text, text, text, text, text, text, boolean, boolean) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _custname TEXT := COALESCE(TRIM(UPPER( $1)), ''); _email TEXT := COALESCE(TRIM(UPPER( $2)), ''); _company TEXT := COALESCE(TRIM(UPPER( $3)), ''); _first TEXT := COALESCE(TRIM(UPPER( $4)), ''); _last TEXT := COALESCE(TRIM(UPPER( $5)), ''); _fullname TEXT := COALESCE(TRIM(UPPER( $6)), ''); _addr1 TEXT := COALESCE(TRIM(UPPER( $7)), ''); _addr2 TEXT := COALESCE(TRIM(UPPER( $8)), ''); _addr3 TEXT := COALESCE(TRIM(UPPER( $9)), ''); _city TEXT := COALESCE(TRIM(UPPER($10)), ''); _state TEXT := COALESCE(TRIM(UPPER($11)), ''); _postalcode TEXT := COALESCE(TRIM(UPPER($12)), ''); _country TEXT := COALESCE(TRIM(UPPER($13)), ''); _generate BOOLEAN := COALESCE($14, FALSE); _create BOOLEAN := COALESCE($15, FALSE); _citytrunc TEXT; _counter INTEGER; _custid INTEGER; _custnumber TEXT; _candidate TEXT; _r RECORD; _statetrunc TEXT; BEGIN IF (_custname = '') THEN _custname := getCustNameFromInfo(_email, _company, _first, _last, _fullname, FALSE); END IF; SELECT COUNT(*) INTO _counter FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=UPPER(_custname)) AND UPPER(shipto_name)=UPPER(_fullname) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)); IF (_counter = 1) THEN SELECT shipto_num INTO _candidate FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=UPPER(_custname)) AND UPPER(shipto_name)=UPPER(_fullname) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)); RETURN _candidate; ELSE SELECT COUNT(*) INTO _counter FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=UPPER(_custname)) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)); IF (_counter = 1) THEN SELECT shipto_num INTO _candidate FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=UPPER(_custname)) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)); RETURN _candidate; ELSIF (_counter > 1) THEN SELECT shipto_num, CASE WHEN (UPPER(addr_country) = _country) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_postalcode) = _postalcode) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_state) = _state) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_city) = _city) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_line3) = _addr3) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_line2) = _addr2) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_line1) = _addr1) THEN 1 ELSE 0 END AS maxquotient INTO _candidate, _counter FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=_custname) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)) ORDER BY maxquotient desc LIMIT 1; RETURN _candidate; END IF; END IF; IF (_generate) THEN SELECT cust_number, cust_id INTO _custnumber, _custid FROM custinfo WHERE (UPPER(cust_name)=_custname); -- keep the number short _citytrunc := SUBSTRING(_city FOR 5); _statetrunc := SUBSTRING(_state FOR 5); IF (LENGTH(_citytrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_citytrunc)) )) THEN _candidate := _citytrunc; ELSIF (LENGTH(_last || _citytrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_last || _citytrunc)) )) THEN _candidate := _last || _citytrunc; ELSIF (LENGTH(_statetrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_statetrunc)) )) THEN _candidate := _statetrunc; ELSIF (LENGTH(_last || _statetrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_last || _statetrunc)) )) THEN _candidate := _last || _statetrunc; ELSIF (LENGTH(_citytrunc || _statetrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_citytrunc || _statetrunc)) )) THEN _candidate := _citytrunc || _statetrunc; ELSE SELECT CAST(COALESCE(MAX(CAST(shipto_num AS INTEGER)), 0) + 1 AS TEXT) INTO _candidate FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (shipto_num~'^[0-9]*$')); END IF; IF (_create) THEN INSERT INTO api.custshipto ( customer_number, shipto_number, name, address1, address2, address3, city, state, postal_code, country, address_change, first, last, email, edi_profile ) VALUES ( _custnumber, _candidate, _candidate, _addr1, _addr2, _addr3, _city, _state, _postalcode, _country, 'CHANGEONE', _first, _last, LOWER(_email), 'No EDI' ); END IF; RETURN _candidate; END IF; RETURN ''; END; $_$; ALTER FUNCTION public.getshiptonumberfrominfo(text, text, text, text, text, text, text, text, text, text, text, text, text, boolean, boolean) OWNER TO admin; -- -- Name: getshipviaid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getshipviaid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipViaCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pShipViaCode IS NULL) THEN RETURN NULL; END IF; SELECT shipvia_id INTO _returnVal FROM shipvia WHERE (shipvia_code=pShipViaCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'ShipVia Code % not found.', pShipViaCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getshipviaid(text) OWNER TO admin; -- -- Name: getshipzoneid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getshipzoneid(pshipzonename text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pShipZoneName IS NULL) THEN RETURN NULL; END IF; SELECT shipzone_id INTO _returnVal FROM shipzone WHERE (shipzone_name=pShipZoneName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Ship Zone % not found.', pShipZoneName; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getshipzoneid(pshipzonename text) OWNER TO admin; -- -- Name: getsitetypeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsitetypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSiteType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSiteType IS NULL) THEN RETURN NULL; END IF; SELECT sitetype_id INTO _returnVal FROM sitetype WHERE (sitetype_name=pSiteType); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Site Type % not found.', pSiteType; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getsitetypeid(text) OWNER TO admin; -- -- Name: getsoscheddate(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsoscheddate(integer) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoheadid ALIAS FOR $1; _minscheddate DATE; BEGIN SELECT MIN(coitem_scheddate) INTO _minscheddate FROM coitem WHERE ( (coitem_cohead_id=pCoheadid) AND (coitem_status NOT IN ('C', 'X')) ); RETURN _minscheddate; END; $_$; ALTER FUNCTION public.getsoscheddate(integer) OWNER TO admin; -- -- Name: getsostatus(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsostatus(integer) RETURNS character LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoheadid ALIAS FOR $1; _result char(1); BEGIN SELECT cohead_status INTO _result FROM cohead WHERE (cohead_id=pCoheadid); RETURN _result; END; $_$; ALTER FUNCTION public.getsostatus(integer) OWNER TO admin; -- -- Name: getsubtax(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getsubtax(integer, integer) RETURNS SETOF subtax LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxCodeId ALIAS FOR $1; pLevel ALIAS FOR $2; _row subtax%ROWTYPE; _x RECORD; _y RECORD; BEGIN FOR _x IN --Select all tax codes whose calculation basis is pTaxCodeId SELECT tax_id, tax_code, tax_descrip FROM tax WHERE tax_basis_tax_id = pTaxCodeId LOOP _row.subtax_taxcode_id := _x.tax_id; _row.subtax_taxcode_code := _x.tax_code; _row.subtax_taxcode_descrip := _x.tax_descrip; _row.subtax_taxcode_level := pLevel + 1; RETURN NEXT _row; FOR _y IN SELECT * from getSubTax(_x.tax_id, pLevel + 1) --This is the recursive part. LOOP _row.subtax_taxcode_id := _y.subtax_taxcode_id; _row.subtax_taxcode_code := _y.subtax_taxcode_code ; _row.subtax_taxcode_descrip := _y.subtax_taxcode_descrip; _row.subtax_taxcode_level := pLevel + 2; RETURN NEXT _row; END LOOP; END LOOP; END; $_$; ALTER FUNCTION public.getsubtax(integer, integer) OWNER TO admin; -- -- Name: gettaxauthid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION gettaxauthid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxAuthCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTaxAuthCode IS NULL) THEN RETURN NULL; END IF; SELECT taxauth_id INTO _returnVal FROM taxauth WHERE (taxauth_code=pTaxAuthCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Tax Authority % not found.', pTaxAuthCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.gettaxauthid(text) OWNER TO admin; -- -- Name: gettaxid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION gettaxid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTaxCode IS NULL) THEN RETURN NULL; END IF; SELECT tax_id INTO _returnVal FROM tax WHERE (tax_code=pTaxCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Tax Code % not found.', pTaxCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.gettaxid(text) OWNER TO admin; -- -- Name: gettaxtypeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION gettaxtypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTaxType IS NULL) THEN RETURN NULL; END IF; SELECT taxtype_id INTO _returnVal FROM taxtype WHERE (taxtype_name=pTaxType); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Tax Type % not found.', pTaxType; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.gettaxtypeid(text) OWNER TO admin; -- -- Name: gettaxzoneid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION gettaxzoneid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxZone ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTaxZone IS NULL) THEN RETURN NULL; END IF; SELECT taxzone_id INTO _returnVal FROM taxzone WHERE (taxzone_code=pTaxZone); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Tax Zone % not found.', pTaxZone; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.gettaxzoneid(text) OWNER TO admin; -- -- Name: gettermsid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION gettermsid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTermsCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTermsCode IS NULL) THEN RETURN NULL; END IF; SELECT terms_id INTO _returnVal FROM terms WHERE (terms_code=pTermsCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Terms Code % not found.', pTermsCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.gettermsid(text) OWNER TO admin; -- -- Name: getunassignedaccntid(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getunassignedaccntid() RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _test INTEGER; _returnVal INTEGER; BEGIN SELECT fetchMetricValue('UnassignedAccount') INTO _test; IF (_test IS NULL) THEN RAISE EXCEPTION 'Metric not found for UnassignedAccount'; END IF; SELECT accnt_id INTO _returnVal FROM accnt WHERE (accnt_id=_test); IF (NOT FOUND) THEN RAISE EXCEPTION 'Metric UnassignedAccount is an invalid G/L Account'; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getunassignedaccntid() OWNER TO admin; -- -- Name: getuomid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getuomid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUom ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pUom IS NULL) THEN RETURN NULL; END IF; SELECT uom_id INTO _returnVal FROM uom WHERE (uom_name=pUom); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Unit of Measure % not found.', pUom; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getuomid(text) OWNER TO admin; -- -- Name: getuomtypeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getuomtypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUomType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pUomType IS NULL) THEN RETURN NULL; END IF; SELECT uomtype_id INTO _returnVal FROM uomtype WHERE (UPPER(uomtype_name)=UPPER(pUomType)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Unit of Measuer Type % not found.', pUomType; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getuomtypeid(text) OWNER TO admin; -- -- Name: getuomtypeid(text[]); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getuomtypeid(text[]) RETURNS integer[] LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUomTypes ALIAS FOR $1; _returnVal INTEGER[]; _val INTEGER; _i INTEGER; BEGIN IF (pUomTypes IS NULL) OR (ARRAY_UPPER(pUomTypes,1) = 0) THEN RETURN NULL; END IF; FOR _i IN 1..ARRAY_UPPER(pUomTypes,1) LOOP SELECT uomtype_id INTO _val FROM uomtype WHERE (UPPER(uomtype_name)=UPPER(pUomTypes[_i])); IF (_val IS NULL) THEN RAISE EXCEPTION 'Unit of Measure Type % not found.', pUomTypes[_i]; ELSE _returnVal[_i] := _val; END IF; END LOOP; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getuomtypeid(text[]) OWNER TO admin; -- -- Name: getusrid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getusrid(pusr text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT usr_id INTO _returnVal FROM usr WHERE (usr_username=COALESCE(pUsr, getEffectiveXtUser())); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'User % not found.', pUsr; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getusrid(pusr text) OWNER TO admin; -- -- Name: getusrlocaleid(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getusrlocaleid() RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT CAST(usrpref_value AS INTEGER) FROM usrpref WHERE (usrpref_username=getEffectiveXTUser()) AND (usrpref_name='locale_id') INTO _returnVal; IF (_returnVal IS NULL) THEN SELECT locale_id FROM locale WHERE (LOWER(locale_code) = 'default') LIMIT 1 INTO _returnVal; END IF; IF (_returnVal IS NULL) THEN SELECT locale_id FROM locale ORDER BY locale_id LIMIT 1 INTO _returnVal; END IF; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'User Locale not found.'; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getusrlocaleid() OWNER TO admin; -- -- Name: getvendaddrid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getvendaddrid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendNumber ALIAS FOR $1; pVendAddrCode ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ( (pVendNumber IS NULL) OR (pVendAddrCode IS NULL) ) THEN RETURN NULL; END IF; SELECT vendaddr_id INTO _returnVal FROM vendaddrinfo JOIN vendinfo ON (vend_id=vendaddr_vend_id) WHERE ( (vendaddr_code=pVendAddrCode) AND (vend_number=pVendNumber) ); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Vendor Number % Address % not found.', pVendNumber, pVendAddrCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getvendaddrid(text, text) OWNER TO admin; -- -- Name: getvendid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getvendid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pVendNumber IS NULL) THEN RETURN NULL; END IF; SELECT vend_id INTO _returnVal FROM vendinfo WHERE (vend_number=pVendNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Vendor Number % not found.', pVendNumber; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getvendid(text) OWNER TO admin; -- -- Name: getvendtypeid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getvendtypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendTypeCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pVendTypeCode IS NULL) THEN RETURN NULL; END IF; SELECT vendtype_id INTO _returnVal FROM vendtype WHERE (UPPER(vendtype_code)=UPPER(pVendTypeCode)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Vendor Type % not found.', pVendTypeCode; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getvendtypeid(text) OWNER TO admin; -- -- Name: getwarehousid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getwarehousid(pwarehouscode text, ptype text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _active BOOL; _shipping BOOL; _returnVal INTEGER; BEGIN IF (pWarehousCode IS NULL) THEN RETURN NULL; END IF; IF (UPPER(pType) NOT IN ('ALL','ACTIVE','SHIPPING')) THEN RAISE EXCEPTION 'Warehouse lookip type % not valid. Valid types are ALL, ACTIVE and SHIPPING', pType; END IF; SELECT warehous_id, warehous_active, warehous_shipping INTO _returnVal, _active, _shipping FROM site() WHERE (warehous_code=UPPER(pWarehousCode)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Warehouse Code % not found.', pWarehousCode; ELSE IF ((pType='SHIPPING') AND (_shipping=false)) THEN RAISE EXCEPTION 'Warehouse Code % is not a vaild shipping warehouse.', pWarehousCode; ELSE IF ((pType IN ('SHIPPING','ACTIVE')) AND (_active=false)) THEN RAISE EXCEPTION 'Warehouse Code % is inactive.', pWarehousCode; END IF; END IF; END IF; RETURN _returnVal; END; $$; ALTER FUNCTION public.getwarehousid(pwarehouscode text, ptype text) OWNER TO admin; -- -- Name: getwhsezoneid(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION getwhsezoneid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWhseCode ALIAS FOR $1; pWhseZoneName ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pWhseCode IS NULL) OR (pWhseZoneName IS NULL)) THEN RETURN NULL; END IF; SELECT whsezone_id INTO _returnVal FROM whsezone WHERE ( (whsezone_warehous_id=getWarehousId(pWhseCode, 'ACTIVE')) AND (UPPER(whsezone_name)=UPPER(pWhseZoneName)) ); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Whsezone % not found.', pWhseZoneName; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.getwhsezoneid(text, text) OWNER TO admin; -- -- Name: grantallmodulecmnttypesource(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION grantallmodulecmnttypesource(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmnttypeid ALIAS FOR $1; pModuleName ALIAS FOR $2; _source RECORD; _sourceCounter INTEGER; BEGIN _sourceCounter := 0; FOR _source IN SELECT source_id FROM source WHERE (source_module=pModuleName) LOOP IF (SELECT grantCmnttypeSource(pCmnttypeid, _source.source_id)) THEN _sourceCounter := _sourceCounter + 1; END IF; END LOOP; RETURN _sourceCounter; END; $_$; ALTER FUNCTION public.grantallmodulecmnttypesource(integer, text) OWNER TO admin; -- -- Name: grantallmodulepriv(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION grantallmodulepriv(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pModuleName ALIAS FOR $2; _priv RECORD; _privCounter INTEGER; BEGIN _privCounter := 0; FOR _priv IN SELECT priv_id FROM priv WHERE (priv_module=pModuleName) LOOP IF (SELECT grantPriv(pUsername, _priv.priv_id)) THEN _privCounter := _privCounter + 1; END IF; END LOOP; RETURN _privCounter; END; $_$; ALTER FUNCTION public.grantallmodulepriv(text, text) OWNER TO admin; -- -- Name: grantallmoduleprivgroup(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION grantallmoduleprivgroup(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGrpid ALIAS FOR $1; pModuleName ALIAS FOR $2; _priv RECORD; _privCounter INTEGER; BEGIN _privCounter := 0; FOR _priv IN SELECT priv_id FROM priv WHERE (priv_module=pModuleName) LOOP IF (SELECT grantPrivGroup(pGrpid, _priv.priv_id)) THEN _privCounter := _privCounter + 1; END IF; END LOOP; RETURN _privCounter; END; $_$; ALTER FUNCTION public.grantallmoduleprivgroup(integer, text) OWNER TO admin; -- -- Name: grantcmnttypesource(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION grantcmnttypesource(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmnttypeid ALIAS FOR $1; pSourceid ALIAS FOR $2; _test INTEGER; BEGIN SELECT cmnttypesource_id INTO _test FROM cmnttypesource WHERE ( (cmnttypesource_cmnttype_id=pCmnttypeid) AND (cmnttypesource_source_id=pSourceid) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO cmnttypesource ( cmnttypesource_cmnttype_id, cmnttypesource_source_id ) VALUES ( pCmnttypeid, pSourceid ); RETURN TRUE; END; $_$; ALTER FUNCTION public.grantcmnttypesource(integer, integer) OWNER TO admin; -- -- Name: grantgroup(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION grantgroup(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pGrpid ALIAS FOR $2; _test INTEGER; BEGIN SELECT usrgrp_id INTO _test FROM usrgrp WHERE ( (usrgrp_username=pUsername) AND (usrgrp_grp_id=pGrpid) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO usrgrp ( usrgrp_username, usrgrp_grp_id ) VALUES ( pUsername, pGrpid ); RETURN TRUE; END; $_$; ALTER FUNCTION public.grantgroup(text, integer) OWNER TO admin; -- -- Name: grantpriv(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION grantpriv(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrivid ALIAS FOR $2; _test INTEGER; BEGIN SELECT usrpriv_id INTO _test FROM usrpriv WHERE ( (usrpriv_username=pUsername) AND (usrpriv_priv_id=pPrivid) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO usrpriv ( usrpriv_username, usrpriv_priv_id ) VALUES ( pUsername, pPrivid ); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; ALTER FUNCTION public.grantpriv(text, integer) OWNER TO admin; -- -- Name: grantpriv(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION grantpriv(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrivname ALIAS FOR $2; _test INTEGER; BEGIN SELECT usrpriv_id INTO _test FROM usrpriv JOIN priv ON (usrpriv_priv_id=priv_id) WHERE ((usrpriv_username=pUsername) AND (priv_name=pPrivname) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO usrpriv ( usrpriv_username, usrpriv_priv_id ) SELECT pUsername, priv_id FROM priv WHERE (priv_name=pPrivname); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; ALTER FUNCTION public.grantpriv(text, text) OWNER TO admin; -- -- Name: grantprivgroup(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION grantprivgroup(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGrpid ALIAS FOR $1; pPrivid ALIAS FOR $2; _test INTEGER; BEGIN SELECT grppriv_id INTO _test FROM grppriv WHERE ( (grppriv_grp_id=pGrpid) AND (grppriv_priv_id=pPrivid) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO grppriv ( grppriv_grp_id, grppriv_priv_id ) VALUES ( pGrpid, pPrivid ); RETURN TRUE; END; $_$; ALTER FUNCTION public.grantprivgroup(integer, integer) OWNER TO admin; -- -- Name: hasalarms(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION hasalarms() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _alarm RECORD; _batchId INTEGER; _evntlogordtype TEXT; _evnttypeid INTEGER; _evnttypename TEXT; _fromEmail TEXT; _itemid INTEGER; _longsource TEXT; _msgId INTEGER; _recipient TEXT; _recipientPart INTEGER; _returnVal BOOLEAN := FALSE; _summary TEXT; _whsId INTEGER := -1; BEGIN FOR _alarm IN SELECT * FROM alarm WHERE ((alarm_creator=getEffectiveXtUser()) AND (CURRENT_TIMESTAMP > alarm_trigger)) LOOP _returnVal := TRUE; IF (_alarm.alarm_source = 'TODO') THEN SELECT (todoitem_name || '-' || todoitem_description), 'T', 'TodoAlarm', 'To-Do Item' INTO _summary, _evntlogordtype, _evnttypename, _longsource FROM todoitem WHERE (todoitem_id = _alarm.alarm_source_id); ELSIF (_alarm.alarm_source = 'INCDT') THEN SELECT (incdt_number || '-' || incdt_summary), 'I', 'IncidentAlarm', 'Incident' INTO _summary, _evntlogordtype, _evnttypename, _longsource FROM incdt WHERE (incdt_id = _alarm.alarm_source_id); ELSIF (_alarm.alarm_source = 'J') THEN SELECT (prj_number || ' ' || prj_name || '-' || prjtask_name), 'J', 'TaskAlarm', 'Project Task' INTO _summary, _evntlogordtype, _evnttypename, _longsource FROM prjtask JOIN prj ON (prj_id=prjtask_prj_id) WHERE (prjtask_id = _alarm.alarm_source_id); ELSE CONTINUE; -- there's nothing to do for this iteration of the loop END IF; -- if event alarm IF (_alarm.alarm_event) THEN SELECT evnttype_id INTO _evnttypeid FROM evnttype WHERE (evnttype_name=_evnttypename); _recipientPart := 1; LOOP _recipient := SPLIT_PART(_alarm.alarm_event_recipient, ',', _recipientPart); EXIT WHEN (LENGTH(_recipient) = 0); SELECT usrpref_value INTO _whsId FROM usrpref WHERE ( (usrpref_username = _recipient) AND (usrpref_name = 'PreferredWarehouse') ); INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) VALUES (CURRENT_TIMESTAMP, _recipient, _evnttypeid, _evntlogordtype, _alarm.alarm_source_id, _whsId, _summary); _recipientPart := _recipientPart + 1; END LOOP; END IF; IF (_alarm.alarm_email) THEN SELECT usr_email INTO _fromEmail FROM usr WHERE (usr_username = _alarm.alarm_creator); _recipientPart := 1; LOOP _recipient := SPLIT_PART(_alarm.alarm_email_recipient, ',', _recipientPart); EXIT WHEN (LENGTH(_recipient) <= 0); _batchId := xtbatch.submitEmailToBatch(_fromEmail, _recipient, '', _summary, 'Alarm reminder for ' || _longsource || '.', NULL, CURRENT_TIMESTAMP, FALSE, NULL, NULL); _recipientPart := _recipientPart + 1; END LOOP; END IF; IF (_alarm.alarm_sysmsg) THEN _recipientPart := 1; LOOP _recipient := SPLIT_PART(_alarm.alarm_sysmsg_recipient, ',', _recipientPart); EXIT WHEN (LENGTH(_recipient) <= 0); _msgId := postMessage(_recipient, (_longsource || ' - ' || _summary)); _recipientPart := _recipientPart + 1; END LOOP; END IF; DELETE FROM alarm WHERE alarm_id=_alarm.alarm_id; END LOOP; RETURN _returnVal; END; $$; ALTER FUNCTION public.hasalarms() OWNER TO admin; -- -- Name: hasevents(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION hasevents() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN PERFORM evntlog_id FROM evntlog WHERE ( (evntlog_dispatched IS NULL) AND (evntlog_username=getEffectiveXtUser()) ) LIMIT 1; RETURN FOUND; END; $$; ALTER FUNCTION public.hasevents() OWNER TO admin; -- -- Name: hasmessages(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION hasmessages() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN PERFORM msguser_id FROM msg, msguser WHERE ( (msguser_username=getEffectiveXtUser()) AND (msguser_msg_id=msg_id) AND (CURRENT_TIMESTAMP BETWEEN msg_scheduled AND msg_expires) AND (msguser_viewed IS NULL) ) LIMIT 1; RETURN FOUND; END; $$; ALTER FUNCTION public.hasmessages() OWNER TO admin; -- -- Name: haspriv(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION haspriv(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrivName ALIAS FOR $1; _result INTEGER; _returnVal BOOLEAN; BEGIN RAISE NOTICE 'hasPriv(TEXT) is deprecated. Use checkPrivilege(TEXT) instead.'; SELECT priv_id INTO _result FROM priv, grppriv, usrgrp WHERE((usrgrp_grp_id=grppriv_grp_id) AND (grppriv_priv_id=priv_id) AND (priv_name=pPrivName) AND (usrgrp_username=getEffectiveXtUser())); IF (FOUND) THEN RETURN true; END IF; SELECT COALESCE(usrpriv_id, 0) != 0 INTO _returnVal FROM priv LEFT OUTER JOIN usrpriv ON (priv_id=usrpriv_priv_id AND usrpriv_username = getEffectiveXtUser()) WHERE (priv_name=pPrivName); IF (_returnVal IS NULL) THEN _returnVal := FALSE; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.haspriv(text) OWNER TO admin; -- -- Name: hasprivonobject(text, text, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION hasprivonobject(pprivtype text, pobjecttype text, pobjectid integer DEFAULT NULL::integer, puser text DEFAULT NULL::text) RETURNS boolean LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _haspriv BOOLEAN := FALSE; _privfound BOOLEAN := FALSE; _pkey TEXT[]; _privdesc RECORD; _qstr TEXT; BEGIN IF UPPER(pPrivType) NOT IN ('CREATE', 'EDIT', 'VIEW', 'DELETE') THEN RAISE EXCEPTION 'Cannot check if user has % on % [xtuple: hasPrivOnObject, -1, %, %]', pPrivType, pObjectType, pPrivType, pObjectType; END IF; /* TODO: create privdesc table? can't do it yet because this is a fix for a minor release NOTE: only include tables that have a single integer column as pkey NOTE: some of these are part of proprietary extensions. how do we make them part of the extension? */ FOR _privdesc IN WITH privdesc AS ( SELECT 'ADDR' AS otype, 'public' AS masterschema, 'addr' AS mastertable, 'MaintainAddressMasters' AS editall, 'ViewAddressMasters' AS viewall, NULL AS ownerfield, NULL AS editmine, NULL AS viewmine UNION ALL SELECT 'BBH', 'xtmfg', 'bbom', 'MaintainBBOMs', 'ViewBBOMs', NULL, NULL, NULL UNION ALL SELECT 'BBI', 'xtmfg', 'bbom', 'MaintainBBOMs', 'ViewBBOMs', NULL, NULL, NULL UNION ALL SELECT 'BMH', 'public', 'bom', 'MaintainBOMs', 'ViewBOMs', NULL, NULL, NULL UNION ALL SELECT 'BMI', 'public', 'bom', 'MaintainBOMs', 'ViewBOMs', NULL, NULL, NULL UNION ALL SELECT 'BOH', 'xtmfg', 'boo', 'MaintainBOOs', 'ViewBOOs', NULL, NULL, NULL UNION ALL SELECT 'BOI', 'xtmfg', 'boo', 'MaintainBOOs', 'ViewBOOs', NULL, NULL, NULL UNION ALL SELECT 'C', 'public', 'custinfo', 'MaintainCustomerMasters', 'ViewCustomerMasters', NULL, NULL, NULL UNION ALL SELECT 'CRMA', 'public', 'crmacct', 'MaintainAllCRMAccounts', 'ViewAllCRMAccounts', 'crmacct_owner_username', 'MaintainPersonalCRMAccounts', 'ViewPersonalCRMAccounts' UNION ALL SELECT 'EMP', 'public', 'emp', 'MaintainEmployees', 'ViewEmployees', NULL, NULL, NULL UNION ALL SELECT 'I', 'public', 'item', 'MaintainItemMasters', 'ViewItemMasters', NULL, NULL, NULL UNION ALL SELECT 'INCDT', 'public', 'incdt', 'MaintainAllIncidents', 'ViewAllIncidents', 'incdt_owner_username', 'MaintainPersonalIncidents', 'ViewPersonalIncidents' UNION ALL SELECT 'IR', 'public', 'itemsrc', 'MaintainItemSources', 'ViewItemSources', NULL, NULL, NULL UNION ALL SELECT 'IS', 'public', 'itemsite', 'MaintainItemSites', 'ViewItemSites', NULL, NULL, NULL UNION ALL SELECT 'J', 'public', 'prj', 'MaintainAllProjects', 'ViewAllProjects', 'prj_owner_username', 'MaintainPersonalProjects', 'ViewPersonalProjects' UNION ALL SELECT 'J', 'public', 'prj', 'MaintainAllProjects', 'ViewAllProjects', 'prj_username', 'MaintainPersonalProjects', 'ViewPersonalProjects' UNION ALL SELECT 'L', 'public', 'location', 'MaintainLocations', 'ViewLocations', NULL, NULL, NULL UNION ALL SELECT 'OPP', 'public', 'ophead', 'MaintainAllOpportunities', 'ViewAllOpportunities', 'ophead_owner_username', 'MaintainPersonalOpportunities', 'ViewPersonalOpportunities' UNION ALL SELECT 'P', 'public', 'pohead', 'MaintainPurchaseOrders', 'ViewPurchaseOrders', NULL, NULL, NULL UNION ALL SELECT 'PI', 'public', 'pohead', 'MaintainPurchaseOrders', 'ViewPurchaseOrders', NULL, NULL, NULL UNION ALL SELECT 'Q', 'public', 'quhead', 'MaintainQuotes', 'ViewQuotes', NULL, NULL, NULL UNION ALL SELECT 'QI', 'public', 'quhead', 'MaintainQuotes', 'ViewQuotes', NULL, NULL, NULL UNION ALL SELECT 'RA', 'public', 'rahead', 'MaintainReturns', 'ViewReturns', NULL, NULL, NULL UNION ALL SELECT 'RI', 'public', 'rahead', 'MaintainReturns', 'ViewReturns', NULL, NULL, NULL UNION ALL SELECT 'S', 'public', 'cohead', 'MaintainSalesOrders', 'ViewSalesOrders', NULL, NULL, NULL UNION ALL SELECT 'SI', 'public', 'cohead', 'MaintainSalesOrders', 'ViewSalesOrders', NULL, NULL, NULL UNION ALL SELECT 'T', 'public', 'cntct', 'MaintainAllContacts', 'ViewAllContacts', 'cntct_owner_username', 'MaintainPersonalContacts', 'ViewPersonalContacts' UNION ALL SELECT 'TE', 'te', 'tehead', 'MaintainTimeExpense', 'ViewTimeExpenseHistory', 'tehead_username', 'MaintainTimeExpenseSelf', NULL UNION ALL SELECT 'TE', 'te', 'tehead', 'MaintainTimeExpenseOthers', 'ViewTimeExpenseHistory', 'tehead_username', 'MaintainTimeExpenseSelf', NULL UNION ALL SELECT 'TI', 'public', 'tohead', 'MaintainTransferOrders', 'ViewTransferOrders', NULL, NULL, NULL UNION ALL SELECT 'TO', 'public', 'tohead', 'MaintainTransferOrders', 'ViewTransferOrders', NULL, NULL, NULL UNION ALL SELECT 'TODO', 'public', 'todoitem', 'MaintainAllToDoItems', 'ViewAllToDoItems', 'todoitem_owner_username', 'MaintainPersonalToDoItems', 'ViewPersonalToDoItems' UNION ALL SELECT 'V', 'public', 'vendinfo', 'MaintainVendors', 'ViewVendors', NULL, NULL, NULL UNION ALL SELECT 'W', 'public', 'wo', 'MaintainWorkOrders', 'ViewWorkOrders', NULL, NULL, NULL UNION ALL SELECT 'WH', 'public', 'whsinfo', 'MaintainWarehouses', 'ViewWarehouses', NULL, NULL, NULL) -- UNION ALL SELECT 'LS', 'public', 'ls', NULL, NULL, NULL, NULL, NULL -- UNION ALL SELECT 'P', 'public', 'pohead', 'MaintainPostedPurchaseOrders', 'ViewPurchaseOrders', NULL, NULL, NULL -- additional criteria? -- UNION ALL SELECT 'PI', 'public', 'pohead', 'MaintainPostedPurchaseOrders', 'ViewPurchaseOrders', NULL, NULL, NULL -- additional criteria? SELECT * FROM privdesc WHERE otype = pObjectType LOOP _privfound := TRUE; RAISE DEBUG '% % % % % % %', _privdesc.otype, _privdesc.masterschema, _privdesc.mastertable, _privdesc.editall, _privdesc.viewall, _privdesc.editmine, _privdesc.viewmine; IF checkPrivilege(CASE UPPER(pPrivType) WHEN 'CREATE' THEN _privdesc.editall WHEN 'EDIT' THEN _privdesc.editall WHEN 'DELETE' THEN _privdesc.editall WHEN 'VIEW' THEN _privdesc.viewall END) THEN _haspriv = TRUE; ELSIF checkPrivilege(CASE UPPER(pPrivType) WHEN 'CREATE' THEN _privdesc.editmine WHEN 'EDIT' THEN _privdesc.editmine WHEN 'DELETE' THEN _privdesc.editmine WHEN 'VIEW' THEN _privdesc.viewmine END) THEN IF pObjectId IS NULL THEN _haspriv = TRUE; ELSE _pkey := primaryKeyFields(_privdesc.masterschema, _privdesc.mastertable); -- SELECT ... FROM schema.table WHERE pkeyfield = pObjectId AND ownerfield = pUser _qstr := 'SELECT EXISTS(SELECT 1 FROM ' || quote_ident(_privdesc.masterschema) || '.' || quote_ident(_privdesc.mastertable) || ' WHERE ' || quote_ident(_pkey[1]) || ' = ' || pObjectId || ' AND ' || quote_ident(_privdesc.ownerfield) || '= ' || quote_literal(COALESCE(pUser, getEffectiveXtUser())) || ');'; RAISE DEBUG '%', _qstr; EXECUTE _qstr INTO _haspriv; END IF; END IF; EXIT WHEN _haspriv; END LOOP; RETURN _haspriv OR NOT _privfound; END; $$; ALTER FUNCTION public.hasprivonobject(pprivtype text, pobjecttype text, pobjectid integer, puser text) OWNER TO admin; -- -- Name: FUNCTION hasprivonobject(pprivtype text, pobjecttype text, pobjectid integer, puser text); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION hasprivonobject(pprivtype text, pobjecttype text, pobjectid integer, puser text) IS 'Return if a user has permission to view or edit a specific database object. pPrivType is either CREATE, EDIT, DELETE, or VIEW, and controls which privilege is checked. pObjectType is one of the string constants used by the Documents widget, such as ADDR for Addresses. pObjectId is the internal id of the record in the table associated with pObjectType (defaults to NULL). pUser is the username to be checked for those pObjectTypes that restrict access to individual users (NULL == current user and is the default).'; -- -- Name: hmac(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION hmac(text, text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_hmac'; ALTER FUNCTION public.hmac(text, text, text) OWNER TO admin; -- -- Name: hmac(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION hmac(bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_hmac'; ALTER FUNCTION public.hmac(bytea, bytea, text) OWNER TO admin; -- -- Name: implodewo(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION implodewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; implodeChildren ALIAS FOR $2; resultCode INTEGER; _wotcCnt INTEGER; _routings BOOLEAN; BEGIN SELECT metric_value='t' INTO _routings FROM metric WHERE (metric_name='Routings'); IF ((SELECT wo_id FROM wo WHERE ((wo_status='E') AND (wo_id=pWoid))) IS NULL) THEN RETURN 0; END IF; IF (_routings) THEN SELECT count(*) INTO _wotcCnt FROM xtmfg.wotc WHERE (wotc_wo_id=pWoid); IF (_wotcCnt > 0) THEN RETURN -1; END IF; END IF; -- Delete any created P/R's for this W/O PERFORM deletePr('W', womatl_id) FROM womatl WHERE (womatl_wo_id=pWoid); DELETE FROM womatl WHERE (womatl_id IN ( SELECT womatl_id FROM womatl, wo WHERE ((womatl_wo_id=wo_id) AND (wo_status='E') AND (wo_id=pWoid)) )); IF _routings THEN DELETE FROM xtmfg.wooper WHERE (wooper_id IN ( SELECT wooper_id FROM xtmfg.wooper, wo WHERE ((wooper_wo_id=wo_id) AND (wo_status='E') AND (wo_id=pWoid)) )); END IF; UPDATE wo SET wo_status='O' WHERE (wo_id=pWoid); IF (implodeChildren) THEN resultCode := (SELECT MAX(implodeWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); resultCode := (SELECT MAX(deleteWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.implodewo(integer, boolean) OWNER TO admin; -- -- Name: incdt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE incdt ( incdt_id integer NOT NULL, incdt_number integer NOT NULL, incdt_crmacct_id integer, incdt_cntct_id integer, incdt_summary text, incdt_descrip text, incdt_item_id integer, incdt_timestamp timestamp without time zone DEFAULT now() NOT NULL, incdt_status character(1) DEFAULT 'N'::bpchar NOT NULL, incdt_assigned_username text, incdt_incdtcat_id integer, incdt_incdtseverity_id integer, incdt_incdtpriority_id integer, incdt_incdtresolution_id integer, incdt_lotserial text, incdt_ls_id integer, incdt_aropen_id integer, incdt_owner_username text, incdt_recurring_incdt_id integer, incdt_updated timestamp without time zone DEFAULT now() NOT NULL, incdt_prj_id integer, incdt_public boolean ); ALTER TABLE public.incdt OWNER TO admin; -- -- Name: TABLE incdt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE incdt IS 'Incident table'; -- -- Name: COLUMN incdt.incdt_lotserial; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN incdt.incdt_lotserial IS 'incdt_lotserial is deprecated'; -- -- Name: COLUMN incdt.incdt_recurring_incdt_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN incdt.incdt_recurring_incdt_id IS 'The first incdt record in the series if this is a recurring Incident. If the incdt_recurring_incdt_id is the same as the incdt_id, this record is the first in the series.'; -- -- Name: incdt(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION incdt() RETURNS SETOF incdt LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row incdt%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllIncidents','ViewAllIncidents','MaintainPersonalIncidents','ViewPersonalIncidents') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM incdt LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM incdt WHERE getEffectiveXtUser() IN (incdt_owner_username, incdt_assigned_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; ALTER FUNCTION public.incdt() OWNER TO admin; -- -- Name: FUNCTION incdt(); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION incdt() IS 'A table function that returns Incident results according to privilege settings.'; -- -- Name: indentedbom(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION indentedbom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _revid INTEGER; BEGIN SELECT getActiveRevId('BOM',pItemid) INTO _revid; RETURN indentedBOM(pItemid, _revid); END; $_$; ALTER FUNCTION public.indentedbom(integer) OWNER TO admin; -- -- Name: indentedbom(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION indentedbom(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; _bomworkid INTEGER; _indexid INTEGER; _r RECORD; _batchsize NUMERIC; BEGIN -- Get the batch quantity SELECT COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=pRevisionid)) LIMIT 1),1) INTO _batchsize; -- Check on the temporary workspace -- PERFORM maintainBOMWorkspace(); -- Grab a new index for this bomwork set SELECT NEXTVAL('misc_index_seq') INTO _indexid; -- Step through all of the components of the passed pItemid FOR _r IN SELECT bomitem.*, item_id, itemuomtouom(item_id, item_inv_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') AS qtyreq, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, stdcost(item_id, bomitem_id) AS standardcost, actcost(item_id, bomitem_id) AS actualcost FROM bomitem(pItemId, pRevisionid), item WHERE ( (bomitem_item_id=item_id) ) LOOP -- Insert the component and bomitem parameters SELECT NEXTVAL('bomwork_bomwork_id_seq') INTO _bomworkid; INSERT INTO bomwork ( bomwork_id, bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_parent_seqnumber, bomwork_seqnumber, bomwork_item_id, bomwork_createwo, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_stdunitcost, bomwork_actunitcost, bomwork_char_id, bomwork_value, bomwork_notes, bomwork_ref, bomwork_bomitem_id, bomwork_ecn ) VALUES ( _bomworkid, _indexid, -1, 1, 0, _r.bomitem_seqnumber, _r.item_id, _r.bomitem_createwo, _r.qtyreq, _r.qtyfxd, _r.qtyper, _r.bomitem_scrap, _r.bomitem_issuemethod, _r.bomitem_effective, _r.bomitem_expires, _r.standardcost, _r.actualcost, _r.bomitem_char_id, _r.bomitem_value, _r.bomitem_notes, _r.bomitem_ref, _r.bomitem_id, _r.bomitem_ecn ); -- Explode the components of the current component PERFORM explodeBOM(_r.item_id, _bomworkid, 1); END LOOP; -- Return a key to the result RETURN _indexid; END; $_$; ALTER FUNCTION public.indentedbom(integer, integer) OWNER TO admin; -- -- Name: indentedbom(integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION indentedbom(integer, integer, integer, integer) RETURNS SETOF bomdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; pExpiredDays ALIAS FOR $3; pFutureDays ALIAS FOR $4; _row bomdata%ROWTYPE; _bomworksetid INTEGER; _x RECORD; _check CHAR(1); _inactive BOOLEAN := FALSE; _batchsize NUMERIC; BEGIN IF (pRevisionid != -1) THEN --Is this a deactivated revision? SELECT rev_status INTO _check FROM rev WHERE ((rev_id=pRevisionid) AND (rev_status='I')); IF (FOUND) THEN _inactive := TRUE; END IF; END IF; -- Get the batch quantity SELECT COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=pRevisionid)) LIMIT 1),1) INTO _batchsize; IF NOT (_inactive) THEN --We can explode this out based on current data SELECT indentedBOM(pItemid, pRevisionid) INTO _bomworksetid; FOR _x IN SELECT bomwork_id, bomwork_parent_id, bomwork_level, bomworkSequence(bomwork_id) AS seq_ord, bomwork_seqnumber, item_id, item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_createwo, CASE WHEN (bomwork_issuemethod='S') THEN 'Push' WHEN (bomwork_issuemethod='L') THEN 'Pull' WHEN (bomwork_issuemethod='M') THEN 'Mixed' ELSE 'Special' END AS issuemethod, bomwork_effective, bomwork_expires, (bomwork_expires <= CURRENT_DATE) AS expired, (bomwork_effective > CURRENT_DATE) AS future, bomwork_actunitcost AS actunitcost, bomwork_stdunitcost AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(item_id, item_inv_uom_id, NULL, (bomwork_qtyfxd/_batchsize + bomwork_qtyper) * (1 + bomwork_scrap), 'qtyper') * bomwork_actunitcost ELSE 0.0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(item_id, item_inv_uom_id, NULL, (bomwork_qtyfxd/_batchsize + bomwork_qtyper) * (1 + bomwork_scrap), 'qtyper') * bomwork_stdunitcost ELSE 0.0 END AS stdextendedcost, bomwork_char_id, bomwork_value, bomwork_notes, bomwork_ref, bomwork_bomitem_id, bomwork_ecn FROM bomwork, item, uom WHERE ( (bomwork_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (bomwork_set_id=_bomworksetid) ) AND (bomwork_expires > (CURRENT_DATE - pExpiredDays)) AND (bomwork_effective <= (CURRENT_DATE + pFutureDays)) UNION SELECT -1, -1, 1, '0', NULL,-1, costelem_type AS bomdata_item_number, '', '', '', '', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, false, false, currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actunitcost, itemcost_stdcost AS stdunitcost, currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actextendedcost, itemcost_stdcost AS stdextendedcost, NULL, NULL,NULL,NULL, NULL,NULL FROM itemcost, costelem WHERE ( (itemcost_costelem_id=costelem_id) AND (NOT itemcost_lowlevel) AND (itemcost_item_id=pItemid) ) ORDER BY seq_ord LOOP _row.bomdata_bomwork_id := _x.bomwork_id; _row.bomdata_bomwork_parent_id := _x.bomwork_parent_id; _row.bomdata_bomwork_level := _x.bomwork_level; _row.bomdata_bomwork_seqnumber := _x.bomwork_seqnumber; _row.bomdata_bomitem_id := _x.bomwork_bomitem_id; _row.bomdata_item_id := _x.item_id; _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_batchsize := _batchsize; _row.bomdata_qtyreq := _x.bomwork_qtyreq; _row.bomdata_qtyfxd := _x.bomwork_qtyfxd; _row.bomdata_qtyper := _x.bomwork_qtyper; _row.bomdata_scrap := _x.bomwork_scrap; _row.bomdata_createchild := _x.bomwork_createwo; _row.bomdata_issuemethod := _x.issuemethod; _row.bomdata_effective := _x.bomwork_effective; _row.bomdata_expires := _x.bomwork_expires; _row.bomdata_expired := _x.expired; _row.bomdata_future := _x.future; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_ecn := _x.bomwork_ecn; _row.bomdata_char_id := _x.bomwork_char_id; _row.bomdata_value := _x.bomwork_value; _row.bomdata_notes := _x.bomwork_notes; _row.bomdata_ref := _x.bomwork_ref; RETURN NEXT _row; END LOOP; PERFORM deleteBOMWorkset(_bomworksetid); ELSE -- Use historical snapshot for inactive revisions FOR _x IN SELECT bomhist_id, bomhist_parent_id, bomhist_level, bomhistSequence(bomhist_seq_id) AS seq_ord, bomhist_seqnumber, item_id, item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, bomhist_qtyreq, bomhist_qtyfxd, bomhist_qtyper, bomhist_scrap, bomhist_createwo, CASE WHEN (bomhist_issuemethod='S') THEN 'Push' WHEN (bomhist_issuemethod='L') THEN 'Pull' WHEN (bomhist_issuemethod='M') THEN 'Mixed' ELSE 'Special' END AS issuemethod, bomhist_effective, bomhist_expires, (bomhist_expires <= CURRENT_DATE) AS expired, (bomhist_effective > CURRENT_DATE) AS future, bomhist_actunitcost AS actunitcost, bomhist_stdunitcost AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN (bomist_qtyfxd/_batchsize + bomhist_qtyper) * (1 + bomhist_scrap) * bomhist_actunitcost ELSE 0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN (bomist_qtyfxd/_batchsize + bomhist_qtyper) * (1 + bomhist_scrap) * bomhist_stdunitcost ELSE 0 END AS stdextendedcost, bomhist_char_id, bomhist_value, bomhist_notes, bomhist_ref FROM bomhist, item, uom WHERE ( (bomhist_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (bomhist_rev_id=pRevisionid) ) AND (bomhist_expires > (CURRENT_DATE - pExpiredDays)) AND (bomhist_effective <= (CURRENT_DATE + pFutureDays)) UNION SELECT -1, -1, 1, '0', NULL,-1, costelem_type AS bomdata_item_number, '', '', '', '', NULL, NULL, NULL, NULL, false, '', NULL, NULL, false, false, bomhist_actunitcost AS actunitcost, bomhist_stdunitcost AS stdunitcost, bomhist_actunitcost AS actextendedcost, bomhist_stdunitcost AS stdextendedcost, NULL,NULL,NULL,NULL FROM bomhist, costelem WHERE ((bomhist_rev_id=pRevisionid) AND (costelem_id=bomhist_item_id)) ORDER BY seq_ord LOOP _row.bomdata_bomwork_id := _x.bomhist_id; _row.bomdata_bomwork_parent_id := _x.bomhist_parent_id; _row.bomdata_bomwork_level := _x.bomhist_level; _row.bomdata_bomwork_seqnumber := _x.bomhist_seqnumber; _row.bomdata_bomitem_id := -1; _row.bomdata_item_id := _x.item_id; _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_batchsize := _batchsize; _row.bomdata_qtyreq := _x.bomhist_qtyreq; _row.bomdata_qtyfxd := _x.bomist_qtyfxd; _row.bomdata_qtyper := _x.bomhist_qtyper; _row.bomdata_scrap := _x.bomhist_scrap; _row.bomdata_createchild := _x.bomhist_createwo; _row.bomdata_issuemethod := _x.issuemethod; _row.bomdata_effective := _x.bomhist_effective; _row.bomdata_expires := _x.bomhist_expires; _row.bomdata_expired := _x.expired; _row.bomdata_future := _x.future; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_ecn := ''; _row.bomdata_char_id := _x.bomhist_char_id; _row.bomdata_value := _x.bomhist_value; _row.bomdata_notes := _x.bomhist_notes; _row.bomdata_ref := _x.bomhist_ref; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; ALTER FUNCTION public.indentedbom(integer, integer, integer, integer) OWNER TO admin; -- -- Name: indentedwhereused(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION indentedwhereused(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _indexid INTEGER; _level INTEGER; BEGIN -- Check on the temporary workspace -- PERFORM maintainBOMWorkspace(); _indexid := (SELECT NEXTVAL('misc_index_seq')); _level := 1; INSERT INTO bomwork ( bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_seqnumber, bomwork_item_id, bomwork_item_type, bomwork_createwo, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_status, bomwork_stdunitcost, bomwork_actunitcost ) SELECT _indexid, -1, 1, bomitem_seqnumber, item_id, item_type, bomitem_createwo, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd), (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper), bomitem_scrap, bomitem_issuemethod, bomitem_effective, bomitem_expires, 'U', stdcost(item_id), actcost(item_id) FROM bomitem, item WHERE ((bomitem_item_id=pItemid) AND (bomitem_parent_item_id=item_id) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id))); WHILE ( ( SELECT count(*) FROM bomwork WHERE ((bomwork_item_type IN ('M', 'F')) AND (bomwork_status='U') AND (bomwork_set_id=_indexid)) ) > 0) LOOP _level := _level + 1; INSERT INTO bomwork ( bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_seqnumber, bomwork_item_id, bomwork_item_type, bomwork_createwo, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_status, bomwork_stdunitcost, bomwork_actunitcost ) SELECT _indexid, bomwork_id, _level, bomitem_seqnumber, item_id, item_type, bomitem_createwo, (bomwork_qtyper * (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd)), (bomwork_qtyper * (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper)), bomitem_scrap, bomitem_issuemethod, CASE WHEN bomitem_effective < bomwork_effective THEN bomwork_effective ELSE bomitem_effective END, CASE WHEN bomitem_expires > bomwork_expires THEN bomwork_expires ELSE bomitem_expires END, 'N', stdcost(item_id), actcost(item_id) FROM bomwork JOIN bomitem ON ( (bomitem_item_id=bomwork_item_id) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) ) JOIN item ON (item_id=bomitem_parent_item_id) WHERE ((bomwork_status='U') AND (bomwork_item_type IN ('M', 'F'))); UPDATE bomwork SET bomwork_status='C' WHERE ((bomwork_status='U') AND (bomwork_set_id=_indexid)); UPDATE bomwork SET bomwork_status='U' WHERE ((bomwork_status='N') AND (bomwork_set_id=_indexid)); END LOOP; RETURN _indexid; END; $_$; ALTER FUNCTION public.indentedwhereused(integer) OWNER TO admin; -- -- Name: indentedwo(integer, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION indentedwo(integer, boolean, boolean, boolean) RETURNS SETOF wodata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; pshowops ALIAS FOR $2; pshowmatl ALIAS FOR $3; pshowindent ALIAS FOR $4; _row wodata%ROWTYPE; _subrow wodata%ROWTYPE; _opx wodata%ROWTYPE; _x RECORD; _level INTEGER; BEGIN --The wodata_id_type column is used to indicate the source of the wodata_id --there are three different tables used wo, womatl and womatlvar --wodata_id_type = 1 = wo_id --wodata_id_type = 2 = womatl_id --wodata_id_type = 3 = wooper_id --initialise values _level := 0; --get top level works orders FOR _x IN SELECT wo_id,wo_number,wo_subnumber,wo_status,wo_startdate, wo_duedate,wo_adhoc,wo_itemsite_id,itemsite_qtyonhand, wo_qtyord,wo_qtyrcv,wo_prodnotes, item_number, item_descrip1, item_descrip2, uom_name FROM wo, itemsite, item, uom WHERE ((wo_id = pwoid) AND (itemsite_id = wo_itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id)) ORDER BY wo_number, wo_subnumber LOOP _row.wodata_id := _x.wo_id; _row.wodata_id_type := 1; _row.wodata_number := _x.wo_number; _row.wodata_subnumber := _x.wo_subnumber; _row.wodata_itemnumber := _x.item_number; _row.wodata_descrip := _x.item_descrip1 || '-' || _x.item_descrip2; _row.wodata_status := _x.wo_status; _row.wodata_startdate := _x.wo_startdate; _row.wodata_duedate := _x.wo_duedate; _row.wodata_adhoc := _x.wo_adhoc; _row.wodata_itemsite_id := _x.wo_itemsite_id; _row.wodata_qoh := _x.itemsite_qtyonhand; _row.wodata_short := noneg(_x.wo_qtyord - _x.wo_qtyrcv); _row.wodata_qtyrcv := _x.wo_qtyrcv; _row.wodata_qtyordreq := _x.wo_qtyord; _row.wodata_qtyuom := _x.uom_name; _row.wodata_scrap := 0; _row.wodata_notes := _x.wo_prodnotes; _row.wodata_level := _level; RETURN NEXT _row; IF (pshowmatl AND NOT pshowops) THEN --expand materials FOR _subrow IN SELECT * FROM indentedwomatl(pwoid, _level) LOOP RETURN NEXT _subrow; END LOOP; END IF; IF ((pshowmatl OR pshowindent) AND NOT pshowops) THEN --expand next level down FOR _subrow IN SELECT * FROM indentedwo(_x.wo_id, NULL, _level + 1, pshowmatl, pshowindent) LOOP RETURN NEXT _subrow; END LOOP; END IF; IF (pshowops) THEN --expand materials not on operations IF (pshowmatl) THEN FOR _subrow IN SELECT * FROM indentedwomatl(pwoid, -1, _level) LOOP RETURN NEXT _subrow; END LOOP; END IF; IF (pshowmatl OR pshowindent) THEN --expand next level down FOR _subrow IN SELECT * FROM indentedwo(_x.wo_id, -1, _level + 1, pshowmatl, pshowindent) LOOP RETURN NEXT _subrow; END LOOP; END IF; --expand opeartions FOR _opx IN SELECT * FROM xtmfg.indentedwoops(pwoid,_level) LOOP RETURN NEXT _opx; IF (pshowmatl) THEN --expand materials on operations FOR _subrow IN SELECT * FROM indentedwomatl(pwoid, _opx.wodata_id, _level + 1) LOOP RETURN NEXT _subrow; END LOOP; END IF; IF (pshowmatl OR pshowindent) THEN --expand next level down FOR _subrow IN SELECT * FROM indentedwo(_x.wo_id, _opx.wodata_id, _level + 2, pshowmatl, pshowindent) LOOP RETURN NEXT _subrow; END LOOP; END IF; END LOOP; END IF; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.indentedwo(integer, boolean, boolean, boolean) OWNER TO admin; -- -- Name: indentedwo(integer, integer, integer, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION indentedwo(integer, integer, integer, boolean, boolean) RETURNS SETOF wodata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; pwooperid ALIAS FOR $2; plevel ALIAS FOR $3; pshowmatl ALIAS FOR $4; pshowindent ALIAS FOR $5; _row wodata%ROWTYPE; _opx wodata%ROWTYPE; _x RECORD; _subx RECORD; _index INTEGER; _level INTEGER; _qry TEXT; BEGIN --The wodata id column is used to indicate the source of the id --there are three different tables used wo, womatl and womatlvar --wodata_id_type = 1 = wo_id --wodata_id_type = 2 = womatl_id --wodata_id_type = 3 = wooper_id _level := (plevel + 1); --find all WO with the ordid of the next level up _qry := 'SELECT wo_id,wo_number,wo_subnumber,wo_status,wo_startdate,wo_duedate, wo_adhoc,wo_itemsite_id,itemsite_qtyonhand,wo_qtyord,wo_qtyrcv, wo_prodnotes, item_number,item_descrip1, item_descrip2, uom_name, womatl_qtyiss, womatl_scrap, womatl_wooper_id FROM itemsite, wo, item, uom, womatl WHERE ((wo_ordid = ' || pwoid || ') AND (wo_ordtype = ''W'') AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (wo_womatl_id=womatl_id) AND (wo_itemsite_id = itemsite_id) '; IF (pwooperid IS NOT NULL) THEN _qry := _qry || ' AND (womatl_wooper_id=' || pwooperid || ') '; END IF; _qry := _qry || ') ORDER BY wo_number, wo_subnumber'; /* if (pwooperid IS NOT NULL) THEN raise exception 'stop %',_qry; END IF;*/ FOR _x IN EXECUTE _qry LOOP _row.wodata_id := _x.wo_id; _row.wodata_id_type := 1; _row.wodata_number := _x.wo_number; _row.wodata_subnumber := _x.wo_subnumber; _row.wodata_itemnumber := _x.item_number; _row.wodata_descrip := _x.item_descrip1 || '-' || _x.item_descrip2; _row.wodata_status := _x.wo_status; _row.wodata_startdate := _x.wo_startdate; _row.wodata_duedate := _x.wo_duedate; _row.wodata_adhoc := _x.wo_adhoc; _row.wodata_itemsite_id := _x.wo_itemsite_id; _row.wodata_qoh := _x.itemsite_qtyonhand; _row.wodata_short := noneg(_x.wo_qtyord - _x.wo_qtyrcv); _row.wodata_qtyiss := _x.womatl_qtyiss; _row.wodata_qtyrcv := _x.wo_qtyrcv; _row.wodata_qtyordreq := _x.wo_qtyord; _row.wodata_scrap := _x.womatl_scrap; _row.wodata_notes := _x.wo_prodnotes; _row.wodata_level := plevel; RETURN NEXT _row; --if indentation require expand next level IF (pshowindent AND pwooperid IS NULL) THEN IF (pshowmatl AND pshowindent) THEN --get materials for this level FOR _subx IN SELECT * FROM indentedwomatl(_x.wo_id, plevel) LOOP RETURN NEXT _subx; END LOOP; END IF; IF (pshowindent) THEN --expand lower levels FOR _subx IN SELECT * FROM indentedwo(_x.wo_id, NULL, _level, pshowmatl, pshowindent ) LOOP RETURN NEXT _subx; END LOOP; END IF; ELSIF (pshowindent) THEN --Handle operations --expand materials not on operations IF (pshowmatl) THEN FOR _subx IN SELECT * FROM indentedwomatl(_x.wo_id, -1, plevel) LOOP RETURN NEXT _subx; END LOOP; END IF; --expand next level down not on operations FOR _subx IN SELECT * FROM indentedwo(_x.wo_id, -1, _level, pshowmatl, pshowindent) LOOP RETURN NEXT _subx; END LOOP; --expand operations FOR _opx IN SELECT * FROM xtmfg.indentedwoops(_x.wo_id,plevel) LOOP RETURN NEXT _opx; IF (pshowmatl) THEN --expand materials on operations FOR _subx IN SELECT * FROM indentedwomatl(_x.wo_id, _opx.wodata_id, _level) LOOP RETURN NEXT _subx; -- raise exception 'stop %',_opx.wodata_id; END LOOP; END IF; --expand next level down FOR _subx IN SELECT * FROM indentedwo(_x.wo_id, _opx.wodata_id, _level + 2, pshowmatl, pshowindent) LOOP RETURN NEXT _subx; END LOOP; END LOOP; END IF; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.indentedwo(integer, integer, integer, boolean, boolean) OWNER TO admin; -- -- Name: indentedwomatl(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION indentedwomatl(integer, integer) RETURNS SETOF wodata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; plevel ALIAS FOR $2; _subx RECORD; BEGIN FOR _subx IN SELECT * FROM indentedwomatl(pwoid, NULL::integer, plevel) LOOP RETURN NEXT _subx; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.indentedwomatl(integer, integer) OWNER TO admin; -- -- Name: indentedwomatl(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION indentedwomatl(integer, integer, integer) RETURNS SETOF wodata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; pwooperid ALIAS FOR $2; plevel ALIAS FOR $3; _status TEXT; _subrow wodata%ROWTYPE; _subx RECORD; _level INTEGER; _qry TEXT; BEGIN --The wodata id column is used to indicate the source of the id --there are three different tables used wo, womatl and womatlvar --wodata_id_type = 1 = wo_id --wodata_id_type = 2 = womatl_id --wodata_id_type = 3 = wooper_id _qry := 'SELECT womatl_id, wo_number, wo_subnumber, wo_startdate, womatl_duedate, womatl_itemsite_id, itemsite_qtyonhand, womatl_qtyreq, womatl_qtyiss, womatl_qtyper, womatl_qtyreq, womatl_scrap, womatl_ref, womatl_notes, item_number, item_descrip1, item_descrip2, uom_name FROM womatl, wo, itemsite, item, uom WHERE ((wo_id = womatl_wo_id) AND (wo_id = ' || pwoid || ') AND (womatl_itemsite_id = itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_uom_id=uom_id) '; -- Need to display in case child w/o is deleted -- AND (NOT womatl_createwo OR womatl_createwo IS NULL) '; IF (pwooperid IS NOT NULL) THEN _qry := _qry || 'AND (womatl_wooper_id=' || pwooperid || ')'; END IF; _qry := _qry || ') ORDER BY item_number;'; _level := plevel + 1; SELECT wo_status FROM wo WHERE wo_id = pwoid LIMIT 1 INTO _status; FOR _subx IN EXECUTE _qry LOOP _subrow.wodata_id := _subx.womatl_id; _subrow.wodata_id_type := 2; _subrow.wodata_number := _subx.wo_number; _subrow.wodata_subnumber := _subx.wo_subnumber; _subrow.wodata_itemnumber := _subx.item_number; _subrow.wodata_descrip := _subx.item_descrip1 || '-' || _subx.item_descrip2; _subrow.wodata_status := _status; _subrow.wodata_startdate := _subx.wo_startdate; _subrow.wodata_duedate := _subx.womatl_duedate; _subrow.wodata_itemsite_id := _subx.womatl_itemsite_id; _subrow.wodata_qoh := _subx.itemsite_qtyonhand; IF((_subx.itemsite_qtyonhand > (_subx.womatl_qtyreq - _subx.womatl_qtyiss))) THEN _subrow.wodata_short := 0; ELSE _subrow.wodata_short := (_subx.womatl_qtyreq - _subx.womatl_qtyiss) - _subx.itemsite_qtyonhand; END IF; _subrow.wodata_qtyper := _subx.womatl_qtyper; _subrow.wodata_qtyiss := _subx.womatl_qtyiss; _subrow.wodata_qtyordreq := _subx.womatl_qtyreq; _subrow.wodata_qtyuom := _subx.uom_name; _subrow.wodata_scrap := _subx.womatl_scrap; _subrow.wodata_notes := _subx.womatl_notes; _subrow.wodata_ref := _subx.womatl_ref; _subrow.wodata_level := _level; RETURN NEXT _subrow; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.indentedwomatl(integer, integer, integer) OWNER TO admin; -- -- Name: initeffectivextuser(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION initeffectivextuser() RETURNS void LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Effective users use a temporary table to store the user information -- and this function, called by the other functions, makes sure the temp -- tables exist first. PERFORM * FROM pg_catalog.pg_class WHERE relname = 'effective_user' AND relnamespace = pg_catalog.pg_my_temp_schema(); IF NOT FOUND THEN CREATE TEMPORARY TABLE effective_user ( effective_key TEXT, effective_value TEXT ); CREATE UNIQUE INDEX effective_user_pkey ON effective_user (effective_key); END IF; END; $$; ALTER FUNCTION public.initeffectivextuser() OWNER TO admin; -- -- Name: initialdistribution(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION initialdistribution(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLocationid ALIAS FOR $2; _itemlocid INTEGER; _invhistid INTEGER; _itemlocSeries INTEGER; _r RECORD; BEGIN -- Make sure the passed itemsite points to a real item IF ( (SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; _itemlocSeries := NEXTVAL('itemloc_series_seq'); -- Reassign the location_id for all existing itemlocs if -- the passed itemsite is already lot/serial controlled IF ( ( SELECT (itemsite_controlmethod IN ('L', 'S')) FROM itemsite WHERE (itemsite_id=pItemsiteid) ) ) THEN FOR _r IN SELECT itemloc_id, itemloc_ls_id, itemloc_qty FROM itemloc WHERE (itemloc_itemsite_id=pItemsiteid) LOOP -- Create the RL transaction SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_series, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after ) SELECT _invhistid, itemsite_id, _itemlocSeries, 'RL', 0, _r.itemloc_qty, _r.itemloc_qty, 'Initial Distribution', uom_name, stdCost(item_id), TRUE, itemsite_costmethod, itemsite_value, itemsite_value FROM item, itemsite, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=pItemsiteid) ); -- Update the itemloc UPDATE itemloc SET itemloc_location_id=pLocationid WHERE (itemloc_id=_r.itemloc_id); -- Record the detail transaction INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after ) VALUES ( _invhistid, pLocationid, _r.itemloc_ls_id, _r.itemloc_qty, 0, _r.itemloc_qty ); -- Adjust QOH if this itemlocdist is to/from a non-netable location IF ( SELECT (NOT location_netable) FROM location WHERE (location_id=pLocationid) ) THEN INSERT INTO invhist ( invhist_itemsite_id, invhist_series, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after ) SELECT itemsite_id, _itemlocSeries, 'NN', (_r.itemloc_qty * -1), _r.itemloc_qty, 0, 'Initial Distribution', uom_name, stdCost(item_id), itemsite_costmethod, itemsite_value, itemsite_value FROM itemsite, item, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=pItemsiteid) ); UPDATE itemsite SET itemsite_nnqoh = (itemsite_nnqoh + _r.itemloc_qty), itemsite_qtyonhand = (itemsite_qtyonhand - _r.itemloc_qty) WHERE (itemsite_id=pItemsiteid); END IF; END LOOP; ELSE -- The passed itemsite is not lot/serial controlled -- Make sure that there are not any stagnent itemlocs DELETE FROM itemloc WHERE (itemloc_itemsite_id=pItemsiteid); -- Create the RL transaction SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_series, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after ) SELECT _invhistid, itemsite_id, _itemlocSeries, 'RL', 0, itemsite_qtyonhand, itemsite_qtyonhand, 'Initial Distribution', uom_name, stdCost(item_id), TRUE, itemsite_costmethod, itemsite_value, itemsite_value FROM item, itemsite, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=pItemsiteid) ); -- Create the itemloc SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _itemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_expiration, itemloc_qty ) SELECT _itemlocid, itemsite_id, pLocationid, endOfTime(), itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=pItemsiteid); -- Record the detail transaction INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after ) SELECT _invhistid, pLocationid, itemsite_qtyonhand, 0, itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=pItemsiteid); -- Adjust QOH if this itemlocdist is to/from a non-netable location IF ( SELECT (NOT location_netable) FROM location WHERE (location_id=pLocationid) ) THEN INSERT INTO invhist ( invhist_itemsite_id, invhist_series, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after ) SELECT itemsite_id, _itemlocSeries, 'NN', (itemloc_qty * -1), itemloc_qty, 0, 'Initial Distribution', uom_name, stdCost(item_id), itemsite_costmethod, itemsite_value, itemsite_value FROM itemloc, itemsite, item, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemloc_itemsite_id=itemsite_id) AND (itemloc_id=_itemlocid) ); UPDATE itemsite SET itemsite_nnqoh = itemsite_qtyonhand, itemsite_qtyonhand = 0 FROM itemloc WHERE ( (itemloc_itemsite_id=itemsite_id) AND (itemloc_id=_itemlocid) ); END IF; END IF; RETURN _itemlocid; END; $_$; ALTER FUNCTION public.initialdistribution(integer, integer) OWNER TO admin; -- -- Name: apopen; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE apopen ( apopen_id integer DEFAULT nextval(('"apopen_apopen_id_seq"'::text)::regclass) NOT NULL, apopen_docdate date, apopen_duedate date, apopen_terms_id integer, apopen_vend_id integer, apopen_doctype character(1), apopen_docnumber text, apopen_amount numeric(20,2), apopen_notes text, apopen_posted boolean, apopen_reference text, apopen_invcnumber text, apopen_ponumber text, apopen_journalnumber integer, apopen_paid numeric(20,2) DEFAULT 0, apopen_open boolean, apopen_username text, apopen_discount boolean DEFAULT false NOT NULL, apopen_accnt_id integer DEFAULT (-1), apopen_curr_id integer DEFAULT basecurrid(), apopen_closedate date, apopen_distdate date, apopen_void boolean DEFAULT false NOT NULL, apopen_curr_rate numeric NOT NULL, apopen_discountable_amount numeric(20,2) DEFAULT 0, apopen_status text, CONSTRAINT apopen_apopen_status_check CHECK ((((apopen_status = 'O'::text) OR (apopen_status = 'H'::text)) OR (apopen_status = 'C'::text))), CONSTRAINT apopen_apopen_status_notnull CHECK ((apopen_status IS NOT NULL)) ); ALTER TABLE public.apopen OWNER TO admin; -- -- Name: TABLE apopen; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE apopen IS 'Accounts Payable (A/P) open Items information'; -- -- Name: curr_symbol; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE curr_symbol ( curr_id integer NOT NULL, curr_base boolean DEFAULT false NOT NULL, curr_name character varying(50) NOT NULL, curr_symbol character varying(9) NOT NULL, curr_abbr character varying(3) NOT NULL ); ALTER TABLE public.curr_symbol OWNER TO admin; -- -- Name: TABLE curr_symbol; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE curr_symbol IS 'Currency Names, Symbols, and Abbreviations'; -- -- Name: terms; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE terms ( terms_id integer DEFAULT nextval(('terms_terms_id_seq'::text)::regclass) NOT NULL, terms_code text NOT NULL, terms_descrip text, terms_type character(1), terms_duedays integer, terms_discdays integer, terms_discprcnt numeric(10,6), terms_cutoffday integer, terms_ap boolean, terms_ar boolean, CONSTRAINT terms_terms_code_check CHECK ((terms_code <> ''::text)) ); ALTER TABLE public.terms OWNER TO admin; -- -- Name: TABLE terms; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE terms IS 'Billing Terms information'; -- -- Name: vendinfo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE vendinfo ( vend_id integer DEFAULT nextval(('vend_vend_id_seq'::text)::regclass) NOT NULL, vend_name text, vend_lastpurchdate date, vend_active boolean, vend_po boolean, vend_comments text, vend_pocomments text, vend_number text NOT NULL, vend_1099 boolean, vend_exported boolean, vend_fobsource character(1), vend_fob text, vend_terms_id integer, vend_shipvia text, vend_vendtype_id integer, vend_qualified boolean, vend_ediemail text, vend_ediemailbody text, vend_edisubject text, vend_edifilename text, vend_accntnum text, vend_emailpodelivery boolean, vend_restrictpurch boolean, vend_edicc text, vend_curr_id integer DEFAULT basecurrid(), vend_cntct1_id integer, vend_cntct2_id integer, vend_addr_id integer, vend_match boolean DEFAULT false NOT NULL, vend_ach_enabled boolean DEFAULT false NOT NULL, vend_ach_accnttype text, vend_ach_use_vendinfo boolean DEFAULT true NOT NULL, vend_ach_indiv_number text DEFAULT ''::text NOT NULL, vend_ach_indiv_name text DEFAULT ''::text NOT NULL, vend_ediemailhtml boolean DEFAULT false NOT NULL, vend_ach_routingnumber bytea DEFAULT '\\000'::bytea NOT NULL, vend_ach_accntnumber bytea DEFAULT '\\000'::bytea NOT NULL, vend_taxzone_id integer, vend_accnt_id integer, vend_expcat_id integer DEFAULT (-1), vend_tax_id integer DEFAULT (-1), CONSTRAINT vendinfo_vend_ach_accnttype_check CHECK (((vend_ach_accnttype = 'K'::text) OR (vend_ach_accnttype = 'C'::text))), CONSTRAINT vendinfo_vend_number_check CHECK ((vend_number <> ''::text)) ); ALTER TABLE public.vendinfo OWNER TO admin; -- -- Name: TABLE vendinfo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE vendinfo IS 'Vendor information'; -- -- Name: COLUMN vendinfo.vend_ach_accnttype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN vendinfo.vend_ach_accnttype IS 'Type of bank account: K = checKing, C = Cash = savings. These values were chosen to be consistent with bankaccnt_type.'; SET search_path = api, pg_catalog; -- -- Name: apmemo; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW apmemo AS SELECT vendinfo.vend_number AS vendor_number, apopen.apopen_docdate AS document_date, apopen.apopen_duedate AS due_date, CASE WHEN (apopen.apopen_doctype = 'C'::bpchar) THEN 'Credit Memo'::text ELSE 'Debit Memo'::text END AS document_type, apopen.apopen_docnumber AS document_number, apopen.apopen_ponumber AS po_number, apopen.apopen_journalnumber AS journal_number, terms.terms_code AS terms, curr.curr_abbr AS currency, apopen.apopen_amount AS amount, apopen.apopen_paid AS paid, (apopen.apopen_amount - apopen.apopen_paid) AS balance, apopen.apopen_notes AS notes, CASE WHEN (apopen.apopen_accnt_id = (-1)) THEN NULL::text ELSE public.formatglaccount(apopen.apopen_accnt_id) END AS alternate_prepaid_account FROM (((public.apopen LEFT JOIN public.vendinfo ON ((vendinfo.vend_id = apopen.apopen_vend_id))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = apopen.apopen_curr_id))) LEFT JOIN public.terms ON ((terms.terms_id = apopen.apopen_terms_id))) WHERE (apopen.apopen_doctype = ANY (ARRAY['C'::bpchar, 'D'::bpchar])); ALTER TABLE api.apmemo OWNER TO admin; -- -- Name: VIEW apmemo; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW apmemo IS 'A/P Credit and Debit Memo'; SET search_path = public, pg_catalog; -- -- Name: insertapmemo(api.apmemo); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertapmemo(api.apmemo) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; _result INTEGER; BEGIN IF (pNew.document_type = 'Credit Memo') THEN SELECT createAPCreditMemo( getVendId(pNew.vendor_number), pNew.document_number, pNew.po_number, pNew.document_date, pNew.amount, pNew.notes, getGLAccntId(pNew.alternate_prepaid_account), pNew.due_date, getTermsId(pNew.terms) ) INTO _result; IF (_result <= 0) THEN RAISE EXCEPTION 'Function createAPCreditMemo failed with result = %', _result; END IF; ELSE IF (pNew.document_type = 'Debit Memo') THEN SELECT createAPDebitMemo( null, getVendId(pNew.vendor_number), pNew.journal_number, pNew.document_number, pNew.po_number, pNew.document_date, pNew.amount, pNew.notes, getGLAccntId(pNew.alternate_prepaid_account), pNew.due_date, getTermsId(pNew.terms), COALESCE(getCurrId(pNew.currency), baseCurrId()) ) INTO _result; IF (_result <= 0) THEN RAISE EXCEPTION 'Function createAPDebitMemo failed with result = %', _result; END IF; ELSE RAISE EXCEPTION 'Function insertAPMemo failed, invalid Document Type'; END IF; END IF; RETURN TRUE; END; $_$; ALTER FUNCTION public.insertapmemo(api.apmemo) OWNER TO admin; -- -- Name: aropen; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE aropen ( aropen_id integer DEFAULT nextval(('"aropen_aropen_id_seq"'::text)::regclass) NOT NULL, aropen_docdate date NOT NULL, aropen_duedate date NOT NULL, aropen_terms_id integer, aropen_cust_id integer, aropen_doctype character(1), aropen_docnumber text, aropen_applyto text, aropen_ponumber text, aropen_amount numeric(20,2) NOT NULL, aropen_notes text, aropen_posted boolean DEFAULT false NOT NULL, aropen_salesrep_id integer, aropen_commission_due numeric(20,2), aropen_commission_paid boolean DEFAULT false, aropen_ordernumber text, aropen_cobmisc_id integer DEFAULT (-1), aropen_journalnumber integer, aropen_paid numeric(20,2) DEFAULT 0, aropen_open boolean, aropen_username text, aropen_rsncode_id integer, aropen_salescat_id integer DEFAULT (-1), aropen_accnt_id integer DEFAULT (-1), aropen_curr_id integer DEFAULT basecurrid(), aropen_closedate date, aropen_distdate date, aropen_curr_rate numeric NOT NULL, aropen_discount boolean DEFAULT false NOT NULL ); ALTER TABLE public.aropen OWNER TO admin; -- -- Name: TABLE aropen; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE aropen IS 'Accounts Receivable (A/R) open Items information'; -- -- Name: custinfo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE custinfo ( cust_id integer DEFAULT nextval(('cust_cust_id_seq'::text)::regclass) NOT NULL, cust_active boolean NOT NULL, cust_custtype_id integer, cust_salesrep_id integer, cust_commprcnt numeric(10,6), cust_name text, cust_creditlmt integer, cust_creditrating text, cust_financecharge boolean, cust_backorder boolean NOT NULL, cust_partialship boolean NOT NULL, cust_terms_id integer, cust_discntprcnt numeric(10,6) NOT NULL, cust_balmethod character(1) NOT NULL, cust_ffshipto boolean NOT NULL, cust_shipform_id integer, cust_shipvia text, cust_blanketpos boolean NOT NULL, cust_shipchrg_id integer NOT NULL, cust_creditstatus character(1) NOT NULL, cust_comments text, cust_ffbillto boolean NOT NULL, cust_usespos boolean NOT NULL, cust_number text NOT NULL, cust_dateadded date DEFAULT ('now'::text)::date, cust_exported boolean DEFAULT false, cust_emaildelivery boolean DEFAULT false, cust_ediemail text, cust_edisubject text, cust_edifilename text, cust_ediemailbody text, cust_autoupdatestatus boolean NOT NULL, cust_autoholdorders boolean NOT NULL, cust_edicc text, cust_ediprofile_id integer, cust_preferred_warehous_id integer DEFAULT (-1) NOT NULL, cust_curr_id integer DEFAULT basecurrid(), cust_creditlmt_curr_id integer DEFAULT basecurrid(), cust_cntct_id integer, cust_corrcntct_id integer, cust_soemaildelivery boolean DEFAULT false, cust_soediemail text, cust_soedisubject text, cust_soedifilename text, cust_soediemailbody text, cust_soedicc text, cust_soediprofile_id integer, cust_gracedays integer, cust_ediemailhtml boolean DEFAULT false NOT NULL, cust_soediemailhtml boolean DEFAULT false NOT NULL, cust_taxzone_id integer, CONSTRAINT custinfo_balmethod_check CHECK (((cust_balmethod = 'B'::bpchar) OR (cust_balmethod = 'O'::bpchar))), CONSTRAINT custinfo_creditstatus_check CHECK ((((cust_creditstatus = 'G'::bpchar) OR (cust_creditstatus = 'W'::bpchar)) OR (cust_creditstatus = 'H'::bpchar))), CONSTRAINT custinfo_cust_number_check CHECK ((cust_number <> ''::text)) ); ALTER TABLE public.custinfo OWNER TO admin; -- -- Name: TABLE custinfo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE custinfo IS 'Customer information'; -- -- Name: COLUMN custinfo.cust_ediemail; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_ediemail IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_edisubject; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_edisubject IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_edifilename; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_edifilename IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_ediemailbody; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_ediemailbody IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_edicc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_edicc IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_ediprofile_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_ediprofile_id IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_soediemail; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_soediemail IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_soedisubject; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_soedisubject IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_soedifilename; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_soedifilename IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_soediemailbody; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_soediemailbody IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_soedicc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_soedicc IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_soediprofile_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_soediprofile_id IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_ediemailhtml; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_ediemailhtml IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN custinfo.cust_soediemailhtml; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custinfo.cust_soediemailhtml IS 'Deprecated column - DO NOT USE'; -- -- Name: rsncode; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE rsncode ( rsncode_id integer NOT NULL, rsncode_code text NOT NULL, rsncode_descrip text, rsncode_doctype text, CONSTRAINT rsncode_rsncode_code_check CHECK ((rsncode_code <> ''::text)) ); ALTER TABLE public.rsncode OWNER TO admin; -- -- Name: TABLE rsncode; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE rsncode IS 'Debit/Credit Memo Reason Code information'; -- -- Name: salescat; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE salescat ( salescat_id integer NOT NULL, salescat_active boolean, salescat_name text NOT NULL, salescat_descrip text, salescat_sales_accnt_id integer, salescat_prepaid_accnt_id integer, salescat_ar_accnt_id integer, CONSTRAINT salescat_salescat_name_check CHECK ((salescat_name <> ''::text)) ); ALTER TABLE public.salescat OWNER TO admin; -- -- Name: TABLE salescat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE salescat IS 'Sales Category information'; -- -- Name: salesrep; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE salesrep ( salesrep_id integer DEFAULT nextval(('salesrep_salesrep_id_seq'::text)::regclass) NOT NULL, salesrep_active boolean, salesrep_number text NOT NULL, salesrep_name text, salesrep_commission numeric(8,4), salesrep_method character(1), salesrep_emp_id integer, CONSTRAINT salesrep_salesrep_number_check CHECK ((salesrep_number <> ''::text)) ); ALTER TABLE public.salesrep OWNER TO admin; -- -- Name: TABLE salesrep; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE salesrep IS 'Sales Representative information'; -- -- Name: COLUMN salesrep.salesrep_emp_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN salesrep.salesrep_emp_id IS 'DEPRECATED - the relationship between Sales Rep and Employee is now maintained through the crmacct table.'; SET search_path = api, pg_catalog; -- -- Name: armemo; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW armemo AS SELECT custinfo.cust_number AS customer_number, aropen.aropen_docdate AS document_date, aropen.aropen_duedate AS due_date, CASE WHEN (aropen.aropen_doctype = 'C'::bpchar) THEN 'Credit Memo'::text ELSE 'Debit Memo'::text END AS document_type, aropen.aropen_docnumber AS document_number, aropen.aropen_applyto AS order_number, aropen.aropen_journalnumber AS journal_number, rsncode.rsncode_code AS reason_code, terms.terms_code AS terms, salesrep.salesrep_number AS sales_rep, curr.curr_abbr AS currency, aropen.aropen_amount AS amount, aropen.aropen_paid AS paid, (aropen.aropen_amount - aropen.aropen_paid) AS balance, aropen.aropen_commission_due AS commission_due, aropen.aropen_commission_paid AS commission_paid, aropen.aropen_notes AS notes, salescat.salescat_name AS alternate_prepaid_sales_category, CASE WHEN (aropen.aropen_accnt_id = (-1)) THEN NULL::text ELSE public.formatglaccount(aropen.aropen_accnt_id) END AS alternate_prepaid_account FROM ((((((public.aropen LEFT JOIN public.custinfo ON ((custinfo.cust_id = aropen.aropen_cust_id))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = aropen.aropen_curr_id))) LEFT JOIN public.salesrep ON ((salesrep.salesrep_id = aropen.aropen_salesrep_id))) LEFT JOIN public.terms ON ((terms.terms_id = aropen.aropen_terms_id))) LEFT JOIN public.salescat ON ((salescat.salescat_id = aropen.aropen_salescat_id))) LEFT JOIN public.rsncode ON ((rsncode.rsncode_id = aropen.aropen_rsncode_id))) WHERE (aropen.aropen_doctype = ANY (ARRAY['C'::bpchar, 'D'::bpchar])); ALTER TABLE api.armemo OWNER TO admin; -- -- Name: VIEW armemo; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW armemo IS 'A/R Credit and Debit Memo'; SET search_path = public, pg_catalog; -- -- Name: insertarmemo(api.armemo); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertarmemo(api.armemo) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; _result INTEGER; BEGIN IF (pNew.document_type = 'Credit Memo') THEN SELECT createARCreditMemo( NULL, getCustId(pNew.customer_number), pNew.document_number, pNew.order_number, pNew.document_date, pNew.amount, pNew.notes, getRsnId(pNew.reason_code), getSalescatId(pNew.alternate_prepaid_sales_category), getGLAccntId(pNew.alternate_prepaid_account), pNew.due_date, getTermsId(pNew.terms), getSalesrepId(pNew.sales_rep), pNew.commission_due, pNew.journal_number, COALESCE(getCurrId(pNew.currency), baseCurrId()) ) INTO _result; IF (_result <= 0) THEN RAISE EXCEPTION 'Function createARCreditMemo failed with result = %', _result; END IF; ELSE IF (pNew.document_type = 'Debit Memo') THEN SELECT createARDebitMemo( null, getCustId(pNew.customer_number), pNew.journal_number, pNew.document_number, pNew.order_number, pNew.document_date, pNew.amount, pNew.notes, getRsnId(pNew.reason_code), getSalescatId(pNew.alternate_prepaid_sales_category), getGLAccntId(pNew.alternate_prepaid_account), pNew.due_date, getTermsId(pNew.terms), getSalesrepId(pNew.sales_rep), pNew.commission_due, COALESCE(getCurrId(pNew.currency), baseCurrId()) ) INTO _result; IF (_result <= 0) THEN RAISE EXCEPTION 'Function createARDebitMemo failed with result = %', _result; END IF; ELSE RAISE EXCEPTION 'Function insertARMemo failed, invalid Document Type'; END IF; END IF; RETURN TRUE; END; $_$; ALTER FUNCTION public.insertarmemo(api.armemo) OWNER TO admin; -- -- Name: insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustomer ALIAS FOR $1; pActive ALIAS FOR $2; pType ALIAS FOR $3; pNumber ALIAS FOR $4; pName ALIAS FOR $5; pAddr1 ALIAS FOR $6; pAddr2 ALIAS FOR $7; pCity ALIAS FOR $8; pState ALIAS FOR $9; pPostal ALIAS FOR $10; pCountry ALIAS FOR $11; pMonth ALIAS FOR $12; pYear ALIAS FOR $13; pKey ALIAS FOR $14; _type CHAR; _number TEXT; _month INTEGER; _year INTEGER; _result INTEGER; BEGIN --Initialize _number = CAST(encode(pNumber, 'escape') AS text); _month = CAST(encode(pMonth, 'escape') AS integer); _year = CAST(encode(pYear, 'escape') AS integer); -- Check Card holder info IF (pName IS NULL) THEN RAISE EXCEPTION 'The name of the card holder must be entered'; END IF; IF (pAddr1 IS NULL OR pAddr1 = '') THEN RAISE EXCEPTION 'The first address line must be entered'; END IF; IF (pCity IS NULL OR pCity = '') THEN RAISE EXCEPTION 'The city must be entered'; END IF; IF (pState IS NULL OR pState = '') THEN RAISE EXCEPTION 'The state must be entered'; END IF; IF (pPostal IS NULL OR pPostal = '') THEN RAISE EXCEPTION 'The zip code must be entered'; END IF; IF (pCountry IS NULL OR pCountry = '') THEN RAISE EXCEPTION 'The country must be entered'; END IF; IF (pMonth IS NULL OR pMonth = '') THEN RAISE EXCEPTION 'The Expiration Month must be entered'; END IF; IF (_month < 1 OR _month > 12) THEN RAISE EXCEPTION 'Valid Expiration Months are 01 through 12'; END IF; IF (LENGTH(_year::text) <> 4) THEN RAISE EXCEPTION 'Valid Expiration Years are CCYY in format'; END IF; IF (_year < 1970 OR _year > 2100) THEN RAISE EXCEPTION 'Valid Expiration Years are 1970 through 2100'; END IF; -- Check Number Length IF ((NOT _number ~ '[0-9]{13,16}') OR (LENGTH(_number) = 14) OR (LENGTH(_number) > 16)) THEN RAISE EXCEPTION 'The credit card number must be all numeric (no spaces or hyphens) and must be 13, 15 or 16 characters in length'; END IF; -- Convert Type IF (pType = 'Visa') THEN _type = 'V'; ELSE IF (pType = 'Master Card') THEN _type = 'M'; ELSE IF (pType = 'American Express') THEN _type = 'A'; ELSE IF (pType = 'Discover') THEN _type = 'D'; ELSE RAISE EXCEPTION 'You must select Master Card, Visa, American Express or Discover as the credit card type.'; END IF; END IF; END IF; END IF; -- Check Card Specific Data SELECT editccnumber(_number, _type) INTO _result; IF (_result = -1) THEN RAISE EXCEPTION 'You must select Master Card, Visa, American Express or Discover as the credit card type.'; END IF; IF (_result = -2) THEN RAISE EXCEPTION 'The length of a Master Card credit card number has to be 16 digits.'; END IF; IF (_result = -3) THEN RAISE EXCEPTION 'The length of a Visa credit card number has to be either 13 or 16 digits.'; END IF; IF (_result = -4) THEN RAISE EXCEPTION 'The length of an American Express credit card number has to be 15 digits.'; END IF; IF (_result = -5) THEN RAISE EXCEPTION 'The length of a Discover credit card number has to be 16 digits.'; END IF; IF (_result = -6) THEN RAISE EXCEPTION 'The first two digits for a valid Master Card number must be between 51 and 55'; END IF; IF (_result = -7) THEN RAISE EXCEPTION 'The first digit for a valid Visa number must be 4'; END IF; IF (_result = -8) THEN RAISE EXCEPTION 'The first two digits for a valid American Express number must be 34 or 37.'; END IF; IF (_result = -9) THEN RAISE EXCEPTION 'The first four digits for a valid Discover Express number must be 6011.'; END IF; IF ((_result = -10) AND NOT fetchmetricbool('CCTest')) THEN RAISE EXCEPTION 'The credit card number that you have provided is not valid.'; END IF; IF (_result < -10) THEN RAISE EXCEPTION 'Invalid Credit Card Information'; END IF; -- Insert Record INSERT INTO ccard ( ccard_seq, ccard_cust_id, ccard_active, ccard_name, ccard_address1, ccard_address2, ccard_city, ccard_state, ccard_zip, ccard_country, ccard_number, ccard_month_expired, ccard_year_expired, ccard_type) VALUES ((SELECT COALESCE(MAX(ccard_seq), 0) + 10 FROM ccard WHERE (ccard_cust_id =getCustId(pCustomer))), getCustId(pCustomer), COALESCE(pActive), encrypt(setbytea(pName), setbytea(pKey), 'bf'), encrypt(setbytea(pAddr1), setbytea(pKey), 'bf'), encrypt(setbytea(pAddr2), setbytea(pKey), 'bf'), encrypt(setbytea(pCity), setbytea(pKey), 'bf'), encrypt(setbytea(pState), setbytea(pKey), 'bf'), encrypt(setbytea(pPostal), setbytea(pKey), 'bf'), encrypt(setbytea(pCountry), setbytea(pKey), 'bf'), encrypt(setbytea(pNumber), setbytea(pKey), 'bf'), encrypt(setbytea(pMonth), setbytea(pKey), 'bf'), encrypt(setbytea(pYear), setbytea(pKey), 'bf'), _type ); RETURN true; END; $_$; ALTER FUNCTION public.insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text) OWNER TO admin; -- -- Name: FUNCTION insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text) IS 'This function is generally used to support the _custcreditcard API view'; -- -- Name: cmhead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cmhead ( cmhead_id integer DEFAULT nextval(('cmhead_cmhead_id_seq'::text)::regclass) NOT NULL, cmhead_number text NOT NULL, cmhead_posted boolean, cmhead_invcnumber text, cmhead_custponumber text, cmhead_cust_id integer, cmhead_docdate date, cmhead_shipto_id integer, cmhead_shipto_name text, cmhead_shipto_address1 text, cmhead_shipto_address2 text, cmhead_shipto_address3 text, cmhead_shipto_city text, cmhead_shipto_state text, cmhead_shipto_zipcode text, cmhead_salesrep_id integer, cmhead_freight numeric(16,4), cmhead_misc numeric(16,4), cmhead_comments text, cmhead_printed boolean, cmhead_billtoname text, cmhead_billtoaddress1 text, cmhead_billtoaddress2 text, cmhead_billtoaddress3 text, cmhead_billtocity text, cmhead_billtostate text, cmhead_billtozip text, cmhead_hold boolean, cmhead_commission numeric(8,4), cmhead_misc_accnt_id integer, cmhead_misc_descrip text, cmhead_rsncode_id integer, cmhead_curr_id integer DEFAULT basecurrid(), cmhead_freighttaxtype_id integer, cmhead_gldistdate date, cmhead_billtocountry text, cmhead_shipto_country text, cmhead_rahead_id integer, cmhead_taxzone_id integer, cmhead_prj_id integer, cmhead_void boolean DEFAULT false, cmhead_saletype_id integer, cmhead_shipzone_id integer, CONSTRAINT cmhead_cmhead_number_check CHECK ((cmhead_number <> ''::text)) ); ALTER TABLE public.cmhead OWNER TO admin; -- -- Name: TABLE cmhead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cmhead IS 'S/O Credit Memo header information'; -- -- Name: COLUMN cmhead.cmhead_freighttaxtype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cmhead.cmhead_freighttaxtype_id IS 'Deprecated column - DO NOT USE'; -- -- Name: COLUMN cmhead.cmhead_saletype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cmhead.cmhead_saletype_id IS 'Associated sale type for credit memo.'; -- -- Name: COLUMN cmhead.cmhead_shipzone_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cmhead.cmhead_shipzone_id IS 'Associated shipping zone for credit memo.'; -- -- Name: shiptoinfo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shiptoinfo ( shipto_id integer DEFAULT nextval(('shipto_shipto_id_seq'::text)::regclass) NOT NULL, shipto_cust_id integer NOT NULL, shipto_name text, shipto_salesrep_id integer, shipto_comments text, shipto_shipcomments text, shipto_shipzone_id integer, shipto_shipvia text, shipto_commission numeric(10,4) NOT NULL, shipto_shipform_id integer, shipto_shipchrg_id integer, shipto_active boolean NOT NULL, shipto_default boolean, shipto_num text, shipto_ediprofile_id integer, shipto_cntct_id integer, shipto_addr_id integer, shipto_taxzone_id integer ); ALTER TABLE public.shiptoinfo OWNER TO admin; -- -- Name: TABLE shiptoinfo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shiptoinfo IS 'Ship-To information'; -- -- Name: COLUMN shiptoinfo.shipto_ediprofile_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN shiptoinfo.shipto_ediprofile_id IS 'Deprecated column - DO NOT USE'; -- -- Name: taxzone; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE taxzone ( taxzone_id integer NOT NULL, taxzone_code text NOT NULL, taxzone_descrip text, CONSTRAINT taxzone_taxzone_code_check CHECK ((taxzone_code <> ''::text)) ); ALTER TABLE public.taxzone OWNER TO admin; -- -- Name: TABLE taxzone; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE taxzone IS 'Tax zone information'; -- -- Name: COLUMN taxzone.taxzone_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxzone.taxzone_id IS 'Primary key'; -- -- Name: COLUMN taxzone.taxzone_code; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxzone.taxzone_code IS 'Code'; -- -- Name: COLUMN taxzone.taxzone_descrip; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxzone.taxzone_descrip IS 'Description'; SET search_path = api, pg_catalog; -- -- Name: creditmemo; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW creditmemo AS SELECT cmhead.cmhead_number AS memo_number, CASE WHEN (cmhead.cmhead_invcnumber = '-1'::text) THEN ''::text ELSE cmhead.cmhead_invcnumber END AS apply_to, cmhead.cmhead_docdate AS memo_date, CASE WHEN cmhead.cmhead_posted THEN 'Posted'::text ELSE 'Unposted'::text END AS status, salesrep.salesrep_number AS sales_rep, cmhead.cmhead_commission AS commission, COALESCE(taxzone.taxzone_code, 'None'::text) AS tax_zone, COALESCE(rsncode.rsncode_code, 'None'::text) AS reason_code, cmhead.cmhead_hold AS on_hold, custinfo.cust_number AS customer_number, cmhead.cmhead_billtoname AS billto_name, cmhead.cmhead_billtoaddress1 AS billto_address1, cmhead.cmhead_billtoaddress2 AS billto_address2, cmhead.cmhead_billtoaddress3 AS billto_address3, cmhead.cmhead_billtocity AS billto_city, cmhead.cmhead_billtostate AS billto_state, cmhead.cmhead_billtozip AS billto_postal_code, cmhead.cmhead_billtocountry AS billto_country, shiptoinfo.shipto_num AS shipto_number, cmhead.cmhead_shipto_name AS shipto_name, cmhead.cmhead_shipto_address1 AS shipto_address1, cmhead.cmhead_shipto_address2 AS shipto_address2, cmhead.cmhead_shipto_address3 AS shipto_address3, cmhead.cmhead_shipto_city AS shipto_city, cmhead.cmhead_shipto_state AS shipto_state, cmhead.cmhead_shipto_zipcode AS shipto_postal_code, cmhead.cmhead_shipto_country AS shipto_country, cmhead.cmhead_custponumber AS customer_po_number, cmhead.cmhead_comments AS notes, curr.curr_abbr AS currency, cmhead.cmhead_misc_descrip AS misc_charge_description, cmhead.cmhead_misc AS misc_charge_amount, CASE WHEN (cmhead.cmhead_misc_accnt_id = (-1)) THEN ''::text ELSE public.formatglaccount(cmhead.cmhead_misc_accnt_id) END AS misc_charge_credit_account, cmhead.cmhead_freight AS freight FROM ((((((public.cmhead LEFT JOIN public.custinfo ON ((custinfo.cust_id = cmhead.cmhead_cust_id))) LEFT JOIN public.shiptoinfo ON ((shiptoinfo.shipto_id = cmhead.cmhead_shipto_id))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = cmhead.cmhead_curr_id))) LEFT JOIN public.salesrep ON ((salesrep.salesrep_id = cmhead.cmhead_salesrep_id))) LEFT JOIN public.taxzone ON ((taxzone.taxzone_id = cmhead.cmhead_taxzone_id))) LEFT JOIN public.rsncode ON ((rsncode.rsncode_id = cmhead.cmhead_rsncode_id))); ALTER TABLE api.creditmemo OWNER TO admin; -- -- Name: VIEW creditmemo; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW creditmemo IS 'Credit Memo Header'; SET search_path = public, pg_catalog; -- -- Name: insertcreditmemo(api.creditmemo); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertcreditmemo(api.creditmemo) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; BEGIN -- NOTE: (SELECT getCustId(...)) seems redundant, but it actually produces -- a HUGE performance increase because it makes the Postgres query planner -- use an index scan rather than an sequential table scan on cust_id INSERT INTO cmhead ( cmhead_number, cmhead_posted, cmhead_invcnumber, cmhead_custponumber, cmhead_cust_id, cmhead_docdate, cmhead_shipto_id, cmhead_shipto_name, cmhead_shipto_address1, cmhead_shipto_address2, cmhead_shipto_address3, cmhead_shipto_city, cmhead_shipto_state, cmhead_shipto_zipcode, cmhead_shipto_country, cmhead_salesrep_id, cmhead_freight, cmhead_misc, cmhead_comments, cmhead_printed, cmhead_billtoname, cmhead_billtoaddress1, cmhead_billtoaddress2, cmhead_billtoaddress3, cmhead_billtocity, cmhead_billtostate, cmhead_billtozip, cmhead_billtocountry, cmhead_hold, cmhead_commission, cmhead_misc_accnt_id, cmhead_misc_descrip, cmhead_rsncode_id, cmhead_curr_id, cmhead_taxzone_id, cmhead_gldistdate, cmhead_rahead_id ) SELECT (CASE -- use a case here so we don't unnecessarily fetch a new CM number WHEN pNew.memo_number IS NULL THEN fetchCMNumber() ELSE pNew.memo_number END), FALSE, -- posted pNew.apply_to, pNew.customer_po_number, cust_id, COALESCE(pNew.memo_date, CURRENT_DATE), COALESCE(shipto_id,-1), pNew.shipto_name, pNew.shipto_address1, pNew.shipto_address2, pNew.shipto_address3, pNew.shipto_city, pNew.shipto_state, pNew.shipto_postal_code, pNew.shipto_country, COALESCE(getSalesRepId(pNew.sales_rep),shipto_salesrep_id,cust_salesrep_id), COALESCE(pNew.freight, 0), COALESCE(pNew.misc_charge_amount, 0), pNew.notes, FALSE, -- printed COALESCE(pNew.billto_name, invchead_billto_name, cust_name), COALESCE(pNew.billto_address1, invchead_billto_address1, addr_line1), COALESCE(pNew.billto_address2, invchead_billto_address2, addr_line2), COALESCE(pNew.billto_address3, invchead_billto_address3, addr_line3), COALESCE(pNew.billto_city, invchead_billto_city, addr_city), COALESCE(pNew.billto_state, invchead_billto_state, addr_state), COALESCE(pNew.billto_postal_code, invchead_billto_zipcode, addr_postalcode), COALESCE(pNew.billto_country, invchead_billto_country, addr_country), COALESCE(pNew.on_hold, FALSE), COALESCE(pNew.commission, 0), COALESCE(getGlAccntId(pNew.misc_charge_credit_account),-1), pNew.misc_charge_description, (SELECT rsncode_id FROM rsncode WHERE rsncode_code = pNew.reason_code), COALESCE(getCurrId(pNew.currency),cust_curr_id,basecurrid()), CASE WHEN pNew.tax_zone = 'None' THEN NULL ELSE COALESCE(getTaxZoneID(pNew.tax_zone),cust_taxzone_id) END, NULL, NULL FROM custinfo LEFT OUTER JOIN shiptoinfo ON (shipto_id=(SELECT CASE WHEN getShiptoId(pNew.customer_number,pNew.shipto_number) IS NOT NULL THEN getShiptoId(pNew.customer_number,pNew.shipto_number) ELSE (SELECT shipto_id FROM shiptoinfo WHERE shipto_cust_id=cust_id AND shipto_default) END)) LEFT OUTER JOIN invchead ON (invchead_id=getInvcheadId(pNEW.apply_to)) LEFT OUTER JOIN cntct ON (cntct_id=cust_cntct_id) LEFT OUTER JOIN addr ON (addr_id=cntct_addr_id) WHERE cust_id = (CASE WHEN pNew.customer_number IS NOT NULL THEN (SELECT getCustId(pNew.customer_number)) ELSE (SELECT invchead_cust_id FROM invchead WHERE invchead_invcnumber = pNew.apply_to) END); RETURN TRUE; END; $_$; ALTER FUNCTION public.insertcreditmemo(api.creditmemo) OWNER TO admin; -- -- Name: cmitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cmitem ( cmitem_id integer DEFAULT nextval(('cmitem_cmitem_id_seq'::text)::regclass) NOT NULL, cmitem_cmhead_id integer NOT NULL, cmitem_linenumber integer NOT NULL, cmitem_itemsite_id integer NOT NULL, cmitem_qtycredit numeric(18,6) NOT NULL, cmitem_qtyreturned numeric(18,6) NOT NULL, cmitem_unitprice numeric(16,4) NOT NULL, cmitem_comments text, cmitem_rsncode_id integer, cmitem_taxtype_id integer, cmitem_qty_uom_id integer NOT NULL, cmitem_qty_invuomratio numeric(20,10) NOT NULL, cmitem_price_uom_id integer NOT NULL, cmitem_price_invuomratio numeric(20,10) NOT NULL, cmitem_raitem_id integer, cmitem_updateinv boolean DEFAULT true NOT NULL ); ALTER TABLE public.cmitem OWNER TO admin; -- -- Name: TABLE cmitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cmitem IS 'S/O Credit Memo Line Item information'; SET search_path = api, pg_catalog; -- -- Name: creditmemoline; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW creditmemoline AS SELECT cmhead.cmhead_number AS memo_number, cmitem.cmitem_linenumber AS line_number, item.item_number, whsinfo.warehous_code AS recv_site, rsncode.rsncode_code AS reason_code, cmitem.cmitem_qtyreturned AS qty_returned, cmitem.cmitem_qtycredit AS qty_to_credit, COALESCE(qty_uom.uom_name, 'None'::text) AS qty_uom, cmitem.cmitem_unitprice AS net_unit_price, COALESCE(price_uom.uom_name, 'None'::text) AS price_uom, COALESCE(taxtype.taxtype_name, 'None'::text) AS tax_type, cmitem.cmitem_comments AS notes FROM ((((((((public.cmitem LEFT JOIN public.cmhead ON ((cmitem.cmitem_cmhead_id = cmhead.cmhead_id))) LEFT JOIN public.itemsite ON ((itemsite.itemsite_id = cmitem.cmitem_itemsite_id))) LEFT JOIN public.item ON ((item.item_id = itemsite.itemsite_item_id))) LEFT JOIN public.whsinfo ON ((whsinfo.warehous_id = itemsite.itemsite_warehous_id))) LEFT JOIN public.rsncode ON ((rsncode.rsncode_id = cmitem.cmitem_rsncode_id))) LEFT JOIN public.taxtype ON ((taxtype.taxtype_id = cmitem.cmitem_taxtype_id))) LEFT JOIN public.uom qty_uom ON ((qty_uom.uom_id = cmitem.cmitem_qty_uom_id))) LEFT JOIN public.uom price_uom ON ((price_uom.uom_id = cmitem.cmitem_price_uom_id))); ALTER TABLE api.creditmemoline OWNER TO admin; -- -- Name: VIEW creditmemoline; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW creditmemoline IS 'Credit Memo Line'; SET search_path = public, pg_catalog; -- -- Name: insertcreditmemoline(api.creditmemoline); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertcreditmemoline(api.creditmemoline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; _check INTEGER; _r RECORD; BEGIN SELECT cmhead_id INTO _check FROM cmhead WHERE (cmhead_id=getCmheadId(pNew.memo_number, FALSE)); IF (NOT FOUND) THEN RAISE EXCEPTION 'Credit Memo # % not found', pNew.memo_number; END IF; INSERT INTO cmitem ( cmitem_cmhead_id, cmitem_linenumber, cmitem_itemsite_id, cmitem_qtycredit, cmitem_qtyreturned, cmitem_unitprice, cmitem_comments, cmitem_rsncode_id, cmitem_taxtype_id, cmitem_qty_uom_id, cmitem_qty_invuomratio, cmitem_price_uom_id, cmitem_price_invuomratio ) SELECT cmhead_id, COALESCE(pNew.line_number, (SELECT (COALESCE(MAX(cmitem_linenumber), 0) + 1) FROM cmitem WHERE (cmitem_cmhead_id=cmhead_id))), COALESCE(itemsite_id, -1), COALESCE(pNew.qty_to_credit, 0), COALESCE(pNew.qty_returned, 0), COALESCE(pNew.net_unit_price, 0), pNew.notes, getRsnId(pNew.reason_code), taxtype_id, COALESCE(getUomId(pNew.qty_uom), item_inv_uom_id), CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE(getUomId(pNew.qty_uom),item_inv_uom_id),item_inv_uom_id) ELSE 1 END, COALESCE(getUomId(pNew.price_uom),item_price_uom_id), CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE(getUomId(pNew.price_uom),item_price_uom_id),item_price_uom_id) ELSE 1 END FROM cmhead LEFT OUTER JOIN item ON (item_id=getItemId(pNew.item_number)) LEFT OUTER JOIN itemsite ON (itemsite_item_id=item_id AND itemsite_warehous_id=getWarehousId(pNew.recv_site, 'ALL')) LEFT OUTER JOIN taxtype ON (taxtype_id=CASE WHEN pNew.tax_type IS NULL THEN getItemTaxType(item_id,cmhead_taxzone_id) WHEN pNew.tax_type = 'None' THEN NULL ELSE getTaxTypeId(pNew.tax_type) END) WHERE (cmhead_id=getCmheadId(pNew.memo_number, FALSE)); RETURN TRUE; END; $_$; ALTER FUNCTION public.insertcreditmemoline(api.creditmemoline) OWNER TO admin; -- -- Name: insertflgroup(integer, integer, integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertflgroup(integer, integer, integer, integer, boolean) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pFlgrpid ALIAS FOR $3; pLevel ALIAS FOR $4; pSummarize ALIAS FOR $5; BEGIN RETURN insertFlGroup(pFlheadid, pPeriodid, pFlgrpid, pLevel, pSummarize, NULL); END; $_$; ALTER FUNCTION public.insertflgroup(integer, integer, integer, integer, boolean) OWNER TO admin; -- -- Name: insertflgroup(integer, integer, integer, integer, boolean, character); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertflgroup(integer, integer, integer, integer, boolean, character) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pFlgrpid ALIAS FOR $3; pLevel ALIAS FOR $4; pSummarize ALIAS FOR $5; pInterval ALIAS FOR $6; BEGIN RETURN insertFlGroup(pFlheadid, pPeriodid, pFlgrpid, pLevel, pSummarize, pInterval, NULL); END; $_$; ALTER FUNCTION public.insertflgroup(integer, integer, integer, integer, boolean, character) OWNER TO admin; -- -- Name: insertflgroup(integer, integer, integer, integer, boolean, character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertflgroup(integer, integer, integer, integer, boolean, character, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pFlgrpid ALIAS FOR $3; pLevel ALIAS FOR $4; pSummarize ALIAS FOR $5; pInterval ALIAS FOR $6; pPrjid ALIAS FOR $7; _subtotal BOOLEAN; _r RECORD; _g RECORD; _all BOOLEAN; BEGIN _all = COALESCE(pPrjid,-1) = -1; -- Check to see if this group wants a subtotal _subtotal := FALSE; IF (pFlgrpid != -1) THEN SELECT COALESCE(flgrp_subtotal, FALSE) INTO _subtotal FROM flgrp WHERE ((flgrp_flhead_id=pFlheadid) AND (flgrp_id=pFlgrpid)); END IF; FOR _r IN SELECT 'G' AS type, flgrp_id AS type_id, flgrp_order AS orderby, flgrp_summarize AS summarize, flgrp_subtract AS subtract, CASE WHEN(flgrp_summarize AND (NOT flgrp_showstart)) THEN NULL ELSE 0.00 END AS beginning, CASE WHEN(flgrp_summarize AND (NOT flgrp_showend)) THEN NULL ELSE 0.00 END AS ending, CASE WHEN(flgrp_summarize AND (NOT flgrp_showdelta)) THEN NULL ELSE 0.00 END AS debits, CASE WHEN(flgrp_summarize AND (NOT flgrp_showdelta)) THEN NULL ELSE 0.00 END AS credits, CASE WHEN(flgrp_summarize AND (NOT flgrp_showbudget)) THEN NULL ELSE 0.00 END AS budget, CASE WHEN(flgrp_summarize AND (NOT flgrp_showdiff)) THEN NULL ELSE 0.00 END AS diff, CASE WHEN(flgrp_summarize AND (NOT flgrp_showcustom)) THEN NULL ELSE 0.00 END AS custom, CASE WHEN(flgrp_showstartprcnt) THEN 0.00 ELSE NULL END AS beginningprcnt, CASE WHEN(flgrp_showendprcnt) THEN 0.00 ELSE NULL END AS endingprcnt, CASE WHEN(flgrp_showdeltaprcnt) THEN 0.00 ELSE NULL END AS debitsprcnt, CASE WHEN(flgrp_showdeltaprcnt) THEN 0.00 ELSE NULL END AS creditsprcnt, CASE WHEN(flgrp_showbudgetprcnt) THEN 0.00 ELSE NULL END AS budgetprcnt, CASE WHEN(flgrp_showdiffprcnt) THEN 0.00 ELSE NULL END AS diffprcnt, CASE WHEN(flgrp_showcustomprcnt) THEN 0.00 ELSE NULL END AS customprcnt, -1 AS accnt_id, '' AS accnt_number FROM flgrp WHERE ((flgrp_flgrp_id=pFlgrpid) AND (flgrp_flhead_id=pFlheadid)) UNION ALL SELECT 'I' AS type, flitem_id AS type_id, flitem_order AS orderby, FALSE AS summarize, flitem_subtract AS subtract, CASE WHEN (flitem_showstart AND (first_trialbal_id IS NULL)) THEN 0.00 WHEN (flitem_showstart) THEN normalizeTrialBal(first_trialbal_id, 'B') ELSE NULL END AS beginning, CASE WHEN (flitem_showend AND (last_trialbal_id IS NULL)) THEN 0.00 WHEN (flitem_showend) THEN normalizeTrialBal(last_trialbal_id, 'E') ELSE NULL END AS ending, CASE WHEN (flitem_showdelta) THEN sum_trialbal_debits ELSE NULL END AS debits, CASE WHEN (flitem_showdelta) THEN sum_trialbal_credits ELSE NULL END AS credits, CASE WHEN ((flitem_showbudget) AND (accnt_type IN ('R','E')) AND flhead_type IN ('I','C','A')) THEN COALESCE(sum_budget_amount,0) WHEN ((flitem_showbudget) AND (accnt_type IN ('R','E')) AND flhead_type = 'B' ) THEN (SELECT COALESCE(SUM(b.budget_amount),0) FROM budget b, (SELECT ytd.period_id AS ytd_period_id FROM period cp, period ytd WHERE ((cp.period_id = last_flitem_period_id) AND (ytd.period_start <= cp.period_start) AND (ytd.period_yearperiod_id = cp.period_yearperiod_id))) AS periods WHERE ((b.budget_accnt_id=accnt_id) AND (b.budget_period_id=ytd_period_id))) WHEN ((flitem_showbudget) AND (accnt_type IN ('A','L','Q')) AND flhead_type = 'C') THEN calccashbudget(accnt_id,last_flitem_period_id,pInterval) ELSE COALESCE(last_budget_amount,0) END AS budget, CASE WHEN (flitem_showdiff AND (first_trialbal_id IS NULL)) THEN 0.00 WHEN (flitem_showdiff) THEN COALESCE(normalizeTrialBal(last_trialbal_id, 'E') - normalizeTrialBal(first_trialbal_id, 'B'), 0.00) ELSE NULL END AS diff, CASE WHEN (NOT flitem_showcustom) THEN NULL WHEN (flitem_custom_source='S' AND (first_trialbal_id IS NOT NULL)) THEN normalizeTrialBal(first_trialbal_id, 'B') WHEN (flitem_custom_source='E' AND (first_trialbal_id IS NOT NULL)) THEN normalizeTrialBal(last_trialbal_id, 'E') WHEN (flitem_custom_source='D') THEN sum_trialbal_debits WHEN (flitem_custom_source='C') THEN sum_trialbal_credits WHEN (flitem_custom_source='B') THEN ( CASE WHEN (accnt_type IN ('R','E')) THEN sum_budget_amount ELSE last_budget_amount END) WHEN (flitem_custom_source='F' AND (first_trialbal_id IS NOT NULL)) THEN COALESCE(normalizeTrialBal(last_trialbal_id, 'E') - normalizeTrialBal(first_trialbal_id, 'B'), 0.00) ELSE 0.00 END AS custom, CASE WHEN(flitem_showstartprcnt) THEN 0.00 ELSE NULL END AS beginningprcnt, CASE WHEN(flitem_showendprcnt) THEN 0.00 ELSE NULL END AS endingprcnt, CASE WHEN(flitem_showdeltaprcnt) THEN 0.00 ELSE NULL END AS debitsprcnt, CASE WHEN(flitem_showdeltaprcnt) THEN 0.00 ELSE NULL END AS creditsprcnt, CASE WHEN(flitem_showbudgetprcnt) THEN 0.00 ELSE NULL END AS budgetprcnt, CASE WHEN(flitem_showdiffprcnt) THEN 0.00 ELSE NULL END AS diffprcnt, CASE WHEN(flitem_showcustomprcnt) THEN 0.00 ELSE NULL END AS customprcnt, accnt_id, public.formatglaccount(accnt_id) AS accnt_number FROM (SELECT flhead_type,flitem_id,flitem_order,flitem_subtract,flitem_showstart,flitem_showend, flitem_showdelta,flitem_showbudget,flitem_showdiff,flitem_showcustom, flitem_custom_source,flitem_showstartprcnt,flitem_showendprcnt,flitem_showdeltaprcnt, flitem_showbudgetprcnt,flitem_showdiffprcnt,flitem_showcustomprcnt, accnt_id,accnt_type, FIRST(trialbal_id) AS first_trialbal_id, LAST(trialbal_id) AS last_trialbal_id, SUM(trialbal_debits) AS sum_trialbal_debits, SUM(trialbal_credits) AS sum_trialbal_credits, LAST(flitem_period_id) AS last_flitem_period_id, SUM(budget_amount) AS sum_budget_amount, LAST(budget_amount) AS last_budget_amount FROM (SELECT period_id AS flitem_period_id, period_start,flhead_type,flitem_id,flitem_order,flitem_subtract,flitem_showstart,flitem_showend, flitem_showdelta,flitem_showbudget,flitem_showdiff,flitem_showcustom, flitem_custom_source,flitem_showstartprcnt,flitem_showendprcnt,flitem_showdeltaprcnt, flitem_showbudgetprcnt,flitem_showdiffprcnt,flitem_showcustomprcnt, accnt_id,accnt_type,COALESCE(trialbal_id,getlasttrialbalid(accnt_id,period_id)) as trialbal_id,COALESCE(trialbal_debits,0) as trialbal_debits, COALESCE(trialbal_credits,0) AS trialbal_credits,COALESCE(budget_amount,0) AS budget_amount FROM (SELECT period_id, period_start, flhead_type, flitem_id,flitem_order,flitem_subtract,flitem_showstart,flitem_showend, flitem_showdelta,flitem_showbudget,flitem_showdiff,flitem_showcustom,flitem_custom_source,flitem_showstartprcnt, flitem_showendprcnt,flitem_showdeltaprcnt,flitem_showbudgetprcnt,flitem_showdiffprcnt,flitem_showcustomprcnt, accnt_id, accnt_type FROM period,flaccnt WHERE ((flitem_flhead_id=pFlheadid) AND (flitem_flgrp_id=pFlgrpid) AND (_all OR prj_id=pPrjId) AND (period_id IN (SELECT * FROM getperiodid(pPeriodId,pInterval)))) ORDER BY flitem_id ) AS flitem LEFT OUTER JOIN trialbal ON ((trialbal_accnt_id=accnt_id) AND (trialbal_period_id=period_id)) LEFT OUTER JOIN budget ON ((budget_accnt_id=accnt_id) AND (budget_period_id=period_id)) ORDER BY accnt_id, period_start) AS data GROUP BY flhead_type,flitem_id,flitem_order,flitem_subtract,flitem_showstart,flitem_showend, flitem_showdelta,flitem_showbudget,flitem_showdiff,flitem_showcustom, flitem_custom_source,flitem_showstartprcnt,flitem_showendprcnt,flitem_showdeltaprcnt, flitem_showbudgetprcnt,flitem_showdiffprcnt,flitem_showcustomprcnt,accnt_id,accnt_type) AS agg UNION ALL SELECT 'S' AS type, flspec_id AS type_id, flspec_order AS orderby, FALSE AS summarize, flspec_subtract AS subtract, CASE WHEN (flspec_showstart) THEN findSpecialFinancial('S', flspec_type, pPeriodid) ELSE NULL END AS beginning, CASE WHEN (flspec_showend) THEN findSpecialFinancial('E', flspec_type, pPeriodid) ELSE NULL END AS ending, CASE WHEN (flspec_showdelta) THEN findSpecialFinancial('D', flspec_type, pPeriodid) ELSE NULL END AS debits, CASE WHEN (flspec_showdelta) THEN findSpecialFinancial('C', flspec_type, pPeriodid) ELSE NULL END AS credits, CASE WHEN (flspec_showbudget) THEN findSpecialFinancial('B', flspec_type, pPeriodid) ELSE NULL END AS budget, CASE WHEN (flspec_showdiff) THEN findSpecialFinancial('E', flspec_type, pPeriodid) - findSpecialFinancial('S', flspec_type, pPeriodid) ELSE NULL END AS diff, CASE WHEN (NOT flspec_showcustom) THEN NULL WHEN (flspec_custom_source='F') THEN findSpecialFinancial('E', flspec_type, pPeriodid) - findSpecialFinancial('S', flspec_type, pPeriodid) WHEN (flspec_custom_source IN ('S', 'E', 'D', 'C', 'B')) THEN findSpecialFinancial(flspec_custom_source, flspec_type, pPeriodid) ELSE 0.00 END AS custom, CASE WHEN(flspec_showstartprcnt) THEN 0.00 ELSE NULL END AS beginningprcnt, CASE WHEN(flspec_showendprcnt) THEN 0.00 ELSE NULL END AS endingprcnt, CASE WHEN(flspec_showdeltaprcnt) THEN 0.00 ELSE NULL END AS debitsprcnt, CASE WHEN(flspec_showdeltaprcnt) THEN 0.00 ELSE NULL END AS creditsprcnt, CASE WHEN(flspec_showbudgetprcnt) THEN 0.00 ELSE NULL END AS budgetprcnt, CASE WHEN(flspec_showdiffprcnt) THEN 0.00 ELSE NULL END AS diffprcnt, CASE WHEN(flspec_showcustomprcnt) THEN 0.00 ELSE NULL END AS customprcnt, -1 AS accnt_id, '' AS accnt_number FROM flspec WHERE ((flspec_flgrp_id=pFlgrpid) AND (flspec_flhead_id=pFlheadid)) ORDER BY orderby, accnt_number LOOP IF (_r.type = 'G') THEN -- Create a record for the items sub items to be attached to and be able to update the total INSERT INTO flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_diff, flrpt_custom, flrpt_beginningprcnt, flrpt_endingprcnt, flrpt_debitsprcnt, flrpt_creditsprcnt, flrpt_budgetprcnt, flrpt_diffprcnt, flrpt_customprcnt, flrpt_parent_id, flrpt_interval) VALUES (pFlheadid, pPeriodid, getEffectiveXtUser(), (COALESCE(( SELECT MAX(flrpt_order) FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ), 1) + 1), pLevel, _r.type, _r.type_id, _r.beginning, _r.ending, _r.debits, _r.credits, _r.budget, _r.diff, _r.custom, _r.beginningprcnt, _r.endingprcnt, _r.debitsprcnt, _r.creditsprcnt, _r.budgetprcnt, _r.diffprcnt, _r.customprcnt, pFlgrpid, pInterval); PERFORM insertFlGroup(pFlheadid, pPeriodid, _r.type_id, (pLevel + 1), (pSummarize OR _r.summarize), pInterval, pPrjid); -- Update the parent item SELECT COALESCE(flrpt_beginning, 0.00) AS beginning, COALESCE(flrpt_ending, 0.00) AS ending, COALESCE(flrpt_debits, 0.00) AS debits, COALESCE(flrpt_credits, 0.00) AS credits, COALESCE(flrpt_budget, 0.00) AS budget, COALESCE(flrpt_diff, 0.00) AS diff, COALESCE(flrpt_custom, 0.00) AS custom INTO _g FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type=_r.type) AND (flrpt_type_id=_r.type_id)); IF (_r.subtract) THEN UPDATE flrpt SET flrpt_beginning = flrpt_beginning - _g.beginning, flrpt_ending = flrpt_ending - _g.ending, flrpt_debits = flrpt_debits - _g.debits, flrpt_credits = flrpt_credits - _g.credits, flrpt_budget = flrpt_budget - _g.budget, flrpt_diff = flrpt_diff - _g.diff, flrpt_custom = flrpt_custom - _g.custom WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); ELSE UPDATE flrpt SET flrpt_beginning = flrpt_beginning + _g.beginning, flrpt_ending = flrpt_ending + _g.ending, flrpt_debits = flrpt_debits + _g.debits, flrpt_credits = flrpt_credits + _g.credits, flrpt_budget = flrpt_budget + _g.budget, flrpt_diff = flrpt_diff + _g.diff, flrpt_custom = flrpt_custom + _g.custom WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); END IF; -- If we are summarizing then we need to remove the record we created now that we have updated the total IF (pSummarize) THEN DELETE FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type=_r.type) AND (flrpt_type_id=_r.type_id)); END IF; ELSE IF (_r.type = 'I' OR _r.type = 'S' ) THEN -- If we are not summarizing then create a new entry for this record IF (NOT pSummarize) THEN INSERT INTO flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_diff, flrpt_custom, flrpt_beginningprcnt, flrpt_endingprcnt, flrpt_debitsprcnt, flrpt_creditsprcnt, flrpt_budgetprcnt, flrpt_diffprcnt, flrpt_customprcnt, flrpt_parent_id,flrpt_accnt_id,flrpt_interval) VALUES (pFlheadid, pPeriodid, getEffectiveXtUser(), (COALESCE(( SELECT MAX(flrpt_order) FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ), 1) + 1), pLevel, _r.type, _r.type_id, _r.beginning, _r.ending, _r.debits, _r.credits, _r.budget, _r.diff, _r.custom, _r.beginningprcnt, _r.endingprcnt, _r.debitsprcnt, _r.creditsprcnt, _r.budgetprcnt, _r.diffprcnt, _r.customprcnt, pFlgrpid,_r.accnt_id,pInterval); END IF; -- Update the parent item IF (_r.subtract) THEN UPDATE flrpt SET flrpt_beginning = flrpt_beginning - COALESCE(_r.beginning, 0.00), flrpt_ending = flrpt_ending - COALESCE(_r.ending, 0.00), flrpt_debits = flrpt_debits - COALESCE(_r.debits, 0.00), flrpt_credits = flrpt_credits - COALESCE(_r.credits, 0.00), flrpt_budget = flrpt_budget - COALESCE(_r.budget, 0.00), flrpt_diff = flrpt_diff - COALESCE(_r.diff, 0.00), flrpt_custom = flrpt_custom - COALESCE(_r.custom, 0.00) WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); ELSE UPDATE flrpt SET flrpt_beginning = flrpt_beginning + COALESCE(_r.beginning, 0.00), flrpt_ending = flrpt_ending + COALESCE(_r.ending, 0.00), flrpt_debits = flrpt_debits + COALESCE(_r.debits, 0.00), flrpt_credits = flrpt_credits + COALESCE(_r.credits, 0.00), flrpt_budget = flrpt_budget + COALESCE(_r.budget, 0.00), flrpt_diff = flrpt_diff + COALESCE(_r.diff, 0.00), flrpt_custom = flrpt_custom + COALESCE(_r.custom, 0.00) WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_interval=pInterval) AND (flrpt_period_id=pPeriodid) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); END IF; END IF; END IF; END LOOP; IF (NOT pSummarize) THEN -- If this group wants a summarized line create it here. IF (_subtotal) THEN INSERT INTO flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_diff, flrpt_custom, flrpt_beginningprcnt, flrpt_endingprcnt, flrpt_debitsprcnt, flrpt_creditsprcnt, flrpt_budgetprcnt, flrpt_diffprcnt, flrpt_customprcnt, flrpt_parent_id, flrpt_altname,flrpt_interval ) SELECT pFlheadid, pPeriodid, getEffectiveXtUser(), (COALESCE(( SELECT MAX(flrpt_order) FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ), 1) + 1), pLevel, 'T', -1, CASE WHEN (flgrp_showstart) THEN flrpt_beginning ELSE NULL END, CASE WHEN (flgrp_showend) THEN flrpt_ending ELSE NULL END, CASE WHEN (flgrp_showdelta) THEN flrpt_debits ELSE NULL END, CASE WHEN (flgrp_showdelta) THEN flrpt_credits ELSE NULL END, CASE WHEN (flgrp_showbudget) THEN flrpt_budget ELSE NULL END, CASE WHEN (flgrp_showdiff) THEN flrpt_diff ELSE NULL END, CASE WHEN (flgrp_showcustom) THEN flrpt_custom ELSE NULL END, CASE WHEN (flgrp_showstartprcnt) THEN flrpt_beginningprcnt ELSE NULL END, CASE WHEN (flgrp_showendprcnt) THEN flrpt_endingprcnt ELSE NULL END, CASE WHEN (flgrp_showdeltaprcnt) THEN flrpt_debitsprcnt ELSE NULL END, CASE WHEN (flgrp_showdeltaprcnt) THEN flrpt_creditsprcnt ELSE NULL END, CASE WHEN (flgrp_showbudgetprcnt) THEN flrpt_budgetprcnt ELSE NULL END, CASE WHEN (flgrp_showdiffprcnt) THEN flrpt_diffprcnt ELSE NULL END, CASE WHEN (flgrp_showcustomprcnt) THEN flrpt_customprcnt ELSE NULL END, pFlgrpid, CASE WHEN (flgrp_usealtsubtotal) THEN flgrp_altsubtotal ELSE NULL END, pInterval FROM flrpt, flgrp WHERE ((flrpt_flhead_id=flgrp_flhead_id) AND (flrpt_type_id=flgrp_id) AND (flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); END IF; END IF; return TRUE; END; $_$; ALTER FUNCTION public.insertflgroup(integer, integer, integer, integer, boolean, character, integer) OWNER TO admin; -- -- Name: insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; pDocType ALIAS FOR $2; pDocNumber ALIAS FOR $3; pNotes ALIAS FOR $4; pCreditid ALIAS FOR $5; pDebitid ALIAS FOR $6; pMiscid ALIAS FOR $7; pAmount ALIAS FOR $8; pDistDate ALIAS FOR $9; _return INTEGER; BEGIN SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), pSource, pDocType, pDocNumber, pNotes, pCreditid, pDebitid, pMiscid, pAmount, pDistDate) INTO _return; RETURN _return; END; $_$; ALTER FUNCTION public.insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date) OWNER TO admin; -- -- Name: insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pJournalNumber ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pNotes ALIAS FOR $5; pCreditid ALIAS FOR $6; pDebitid ALIAS FOR $7; pMiscid ALIAS FOR $8; pAmount ALIAS FOR $9; pDistDate ALIAS FOR $10; _return INTEGER; BEGIN SELECT insertGLTransaction( pJournalNumber, pSource, pDocType, pDocNumber, pNotes, pCreditid, pDebitid, pMiscid, pAmount, pDistDate, TRUE) INTO _return; RETURN _return; END; $_$; ALTER FUNCTION public.insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date) OWNER TO admin; -- -- Name: insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; pDocType ALIAS FOR $2; pDocNumber ALIAS FOR $3; pNotes ALIAS FOR $4; pCreditid ALIAS FOR $5; pDebitid ALIAS FOR $6; pMiscid ALIAS FOR $7; pAmount ALIAS FOR $8; pDistDate ALIAS FOR $9; pPostTrialBal ALIAS FOR $10; _return INTEGER; BEGIN SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), pSource, pDocType, pDocNumber, pNotes, pCreditid, pDebitid, pMiscid, pAmount, pDistDate, pPostTrialBal) INTO _return; RETURN _return; END; $_$; ALTER FUNCTION public.insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date, boolean) OWNER TO admin; -- -- Name: insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pJournalNumber ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pNotes ALIAS FOR $5; pCreditid ALIAS FOR $6; pDebitid ALIAS FOR $7; pMiscid ALIAS FOR $8; pAmount ALIAS FOR $9; pDistDate ALIAS FOR $10; pPostTrialBal ALIAS FOR $11; _return INTEGER; BEGIN SELECT insertGLTransaction( pJournalNumber, pSource, pDocType, pDocNumber, pNotes, pCreditid, pDebitid, pMiscid, pAmount, pDistDate, pPostTrialBal, false) INTO _return; RETURN _return; END; $_$; ALTER FUNCTION public.insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean) OWNER TO admin; -- -- Name: insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pJournalNumber ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pNotes ALIAS FOR $5; pCreditid ALIAS FOR $6; pDebitid ALIAS FOR $7; pMiscid ALIAS FOR $8; pAmount ALIAS FOR $9; pDistDate ALIAS FOR $10; pPostTrialBal ALIAS FOR $11; pOnlyGL ALIAS FOR $12; _debitid INTEGER; _creditid INTEGER; _sequence INTEGER; _check INTEGER; BEGIN -- Check GL Interface metric IF (fetchMetricBool('InterfaceToGL') = false AND pSource IN ('I/M', 'P/D', 'S/R', 'W/O')) THEN RETURN 0; END IF; IF (fetchMetricBool('InterfaceAPToGL') = false AND pSource = 'A/P') THEN RETURN 0; END IF; IF (fetchMetricBool('InterfaceARToGL') = false AND pSource IN ('A/R', 'S/O', 'S/R')) THEN RETURN 0; END IF; -- Is there anything to post? -- ToDo - 2 should really be the scale of the base currency IF (round(pAmount, 2) = 0) THEN RETURN -3; END IF; /* Make sure we don't create an imbalance across companies. The 'IgnoreCompanyBalance' metric is a back door mechanism to allow legacy users to create transactions accross companies if they have been using the company segment for something else and they MUST continue to be able to do so. It can only be implemented by direct sql update to the metric table and should otherwise be discouraged. */ IF (COALESCE(fetchMetricValue('GLCompanySize'),0) > 0 AND fetchMetricBool('IgnoreCompany') = false) THEN IF (SELECT (COALESCE(d.accnt_company,'') != COALESCE(c.accnt_company,'')) FROM accnt d, accnt c WHERE ((d.accnt_id=pDebitid) AND (c.accnt_id=pCreditid))) THEN RAISE EXCEPTION 'G/L Transaction can not be posted because accounts % and % reference two differnt companies.', formatGlaccount(pDebitid), formatGlaccount(pCreditid); END IF; END IF; -- Validate pDebitid IF (pDebitid IN (SELECT accnt_id FROM accnt)) THEN _debitid := pDebitid; ELSE SELECT getUnassignedAccntId() INTO _debitid; END IF; -- Validate pCreditid IF (pCreditid IN (SELECT accnt_id FROM accnt)) THEN _creditid := pCreditid; ELSE SELECT getUnassignedAccntId() INTO _creditid; END IF; -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id IN (_creditid, _debitid))) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', pDistDate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id IN (_creditid, _debitid))) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', pDistDate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into nonexistent periods IF NOT EXISTS(SELECT period_id FROM period WHERE (pDistDate BETWEEN period_start AND period_end)) THEN RAISE EXCEPTION 'Cannot post to nonexistent period (%).', pDistDate; END IF; -- Grab a sequence for the pair SELECT fetchGLSequence() INTO _sequence; IF (NOT pOnlyGL AND fetchMetricBool('UseJournals')) THEN -- First the credit INSERT INTO sltrans ( sltrans_journalnumber, sltrans_posted, sltrans_created, sltrans_date, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_doctype, sltrans_docnumber, sltrans_notes, sltrans_misc_id, sltrans_amount ) VALUES ( pJournalNumber, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _creditid, pSource, pDocType, pDocNumber, pNotes, pMiscid, pAmount ); -- Now the debit INSERT INTO sltrans ( sltrans_journalnumber, sltrans_posted, sltrans_created, sltrans_date, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_doctype, sltrans_docnumber, sltrans_notes, sltrans_misc_id, sltrans_amount ) VALUES ( pJournalNumber, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _debitid, pSource, pDocType, pDocNumber, pNotes, pMiscid, (pAmount * -1) ); ELSE -- First the credit INSERT INTO gltrans ( gltrans_journalnumber, gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_doctype, gltrans_docnumber, gltrans_notes, gltrans_misc_id, gltrans_amount ) VALUES ( pJournalNumber, FALSE, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _creditid, pSource, pDocType, pDocNumber, pNotes, pMiscid, pAmount ); -- Now the debit INSERT INTO gltrans ( gltrans_journalnumber, gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_doctype, gltrans_docnumber, gltrans_notes, gltrans_misc_id, gltrans_amount ) VALUES ( pJournalNumber, FALSE, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _debitid, pSource, pDocType, pDocNumber, pNotes, pMiscid, (pAmount * -1) ); IF (pPostTrialBal) THEN PERFORM postIntoTrialBalance(_sequence); END IF; END IF; RETURN _sequence; END; $_$; ALTER FUNCTION public.insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean, boolean) OWNER TO admin; -- -- Name: insertintoglseries(integer, text, text, text, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertintoglseries(integer, text, text, text, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pAccntid ALIAS FOR $5; pAmount ALIAS FOR $6; _returnValue INTEGER; BEGIN SELECT insertIntoGLSeries( pSequence, pSource, pDocType, pDocNumber, pAccntid, pAmount, CURRENT_DATE, '' ) INTO _returnValue; RETURN _returnValue; END; $_$; ALTER FUNCTION public.insertintoglseries(integer, text, text, text, integer, numeric) OWNER TO admin; -- -- Name: insertintoglseries(integer, text, text, text, integer, numeric, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertintoglseries(integer, text, text, text, integer, numeric, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pAccntid ALIAS FOR $5; pAmount ALIAS FOR $6; pDistDate ALIAS FOR $7; _returnValue INTEGER; BEGIN SELECT insertIntoGLSeries( pSequence, pSource, pDocType, pDocNumber, pAccntid, pAmount, pDistDate, '' ) INTO _returnValue; RETURN _returnValue; END; $_$; ALTER FUNCTION public.insertintoglseries(integer, text, text, text, integer, numeric, date) OWNER TO admin; -- -- Name: insertintoglseries(integer, text, text, text, integer, numeric, date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertintoglseries(integer, text, text, text, integer, numeric, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pAccntid ALIAS FOR $5; pAmount ALIAS FOR $6; pDistDate ALIAS FOR $7; pNotes ALIAS FOR $8; _returnValue INTEGER; BEGIN SELECT insertIntoGLSeries( pSequence, pSource, pDocType, pDocNumber, pAccntid, pAmount, pDistDate, pNotes, NULL ) INTO _returnValue; RETURN _returnValue; END; $_$; ALTER FUNCTION public.insertintoglseries(integer, text, text, text, integer, numeric, date, text) OWNER TO admin; -- -- Name: insertintoglseries(integer, text, text, text, integer, numeric, date, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertintoglseries(integer, text, text, text, integer, numeric, date, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pAccntid ALIAS FOR $5; pAmount ALIAS FOR $6; pDistDate ALIAS FOR $7; pNotes ALIAS FOR $8; pMiscid ALIAS FOR $9; _glseriesid INTEGER; BEGIN -- Check GL Interface metric IF (fetchMetricBool('InterfaceToGL') = false AND pSource IN ('I/M', 'P/D', 'S/R', 'W/O')) THEN RETURN 0; END IF; IF (fetchMetricBool('InterfaceAPToGL') = false AND pSource = 'A/P') THEN RETURN 0; END IF; IF (fetchMetricBool('InterfaceARToGL') = false AND pSource IN ('A/R', 'S/O', 'S/R')) THEN RETURN 0; END IF; -- Verify the target accnt IF ( (pAccntid IS NULL) OR (pAccntid = -1) ) THEN RETURN -1; END IF; -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id = pAccntid)) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', pDistDate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id = pAccntid)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', pDistDate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into nonexistent periods IF NOT EXISTS(SELECT period_id FROM period WHERE (pDistDate BETWEEN period_start AND period_end)) THEN RAISE EXCEPTION 'Cannot post to nonexistent period (%).', pDistDate; END IF; -- Insert into the glseries SELECT NEXTVAL('glseries_glseries_id_seq') INTO _glseriesid; INSERT INTO glseries ( glseries_id, glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_amount, glseries_distdate, glseries_notes, glseries_misc_id ) VALUES ( _glseriesid, pSequence, pSource, pDocType, pDocNumber, pAccntid, pAmount, pDistDate, pNotes, pMiscid ); RETURN _glseriesid; END; $_$; ALTER FUNCTION public.insertintoglseries(integer, text, text, text, integer, numeric, date, text, integer) OWNER TO admin; -- -- Name: invchead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invchead ( invchead_id integer NOT NULL, invchead_cust_id integer NOT NULL, invchead_shipto_id integer, invchead_ordernumber text, invchead_orderdate date, invchead_posted boolean NOT NULL, invchead_printed boolean NOT NULL, invchead_invcnumber text NOT NULL, invchead_invcdate date NOT NULL, invchead_shipdate date, invchead_ponumber text, invchead_shipvia text, invchead_fob text, invchead_billto_name text, invchead_billto_address1 text, invchead_billto_address2 text, invchead_billto_address3 text, invchead_billto_city text, invchead_billto_state text, invchead_billto_zipcode text, invchead_billto_phone text, invchead_shipto_name text, invchead_shipto_address1 text, invchead_shipto_address2 text, invchead_shipto_address3 text, invchead_shipto_city text, invchead_shipto_state text, invchead_shipto_zipcode text, invchead_shipto_phone text, invchead_salesrep_id integer, invchead_commission numeric(20,10) NOT NULL, invchead_terms_id integer, invchead_freight numeric(16,2) NOT NULL, invchead_misc_amount numeric(16,2) NOT NULL, invchead_misc_descrip text, invchead_misc_accnt_id integer, invchead_payment numeric(16,2), invchead_paymentref text, invchead_notes text, invchead_billto_country text, invchead_shipto_country text, invchead_prj_id integer, invchead_curr_id integer DEFAULT basecurrid(), invchead_gldistdate date, invchead_recurring boolean DEFAULT false NOT NULL, invchead_recurring_interval integer, invchead_recurring_type text, invchead_recurring_until date, invchead_recurring_invchead_id integer, invchead_shipchrg_id integer, invchead_taxzone_id integer, invchead_void boolean DEFAULT false, invchead_saletype_id integer, invchead_shipzone_id integer, CONSTRAINT invchead_invchead_invcnumber_check CHECK ((invchead_invcnumber <> ''::text)) ); ALTER TABLE public.invchead OWNER TO admin; -- -- Name: TABLE invchead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE invchead IS 'Invoice header information'; -- -- Name: COLUMN invchead.invchead_recurring; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN invchead.invchead_recurring IS 'Deprecated.'; -- -- Name: COLUMN invchead.invchead_recurring_interval; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN invchead.invchead_recurring_interval IS 'Deprecated.'; -- -- Name: COLUMN invchead.invchead_recurring_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN invchead.invchead_recurring_type IS 'Deprecated.'; -- -- Name: COLUMN invchead.invchead_recurring_until; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN invchead.invchead_recurring_until IS 'Deprecated.'; -- -- Name: COLUMN invchead.invchead_saletype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN invchead.invchead_saletype_id IS 'Associated sale type for invoice.'; -- -- Name: COLUMN invchead.invchead_shipzone_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN invchead.invchead_shipzone_id IS 'Associated shipping zone for invoice.'; -- -- Name: prj; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE prj ( prj_id integer NOT NULL, prj_number text NOT NULL, prj_name text NOT NULL, prj_descrip text, prj_status character(1) NOT NULL, prj_so boolean, prj_wo boolean, prj_po boolean, prj_owner_username text, prj_start_date date, prj_due_date date, prj_assigned_date date, prj_completed_date date, prj_username text, prj_recurring_prj_id integer, prj_crmacct_id integer, prj_cntct_id integer, CONSTRAINT prj_prj_number_check CHECK ((prj_number <> ''::text)), CONSTRAINT prj_prj_status_check CHECK ((prj_status = ANY (ARRAY['P'::bpchar, 'O'::bpchar, 'C'::bpchar]))) ); ALTER TABLE public.prj OWNER TO admin; -- -- Name: TABLE prj; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE prj IS 'Project information'; -- -- Name: COLUMN prj.prj_recurring_prj_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN prj.prj_recurring_prj_id IS 'The first prj record in the series if this is a recurring Project. If the prj_recurring_prj_id is the same as the prj_id, this record is the first in the series.'; -- -- Name: saletype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE saletype ( saletype_id integer NOT NULL, saletype_code text NOT NULL, saletype_descr text, saletype_active boolean DEFAULT true NOT NULL ); ALTER TABLE public.saletype OWNER TO admin; -- -- Name: TABLE saletype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE saletype IS 'Type or Origination of Sale.'; -- -- Name: COLUMN saletype.saletype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN saletype.saletype_id IS 'Sequence identifier for sale type.'; -- -- Name: COLUMN saletype.saletype_code; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN saletype.saletype_code IS 'User defined identifier for sale type.'; -- -- Name: COLUMN saletype.saletype_descr; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN saletype.saletype_descr IS 'Description for sale type.'; -- -- Name: COLUMN saletype.saletype_active; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN saletype.saletype_active IS 'Boolean to deactivate a sale type.'; -- -- Name: shipzone; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shipzone ( shipzone_id integer DEFAULT nextval(('shipzone_shipzone_id_seq'::text)::regclass) NOT NULL, shipzone_name text NOT NULL, shipzone_descrip text, CONSTRAINT shipzone_shipzone_name_check CHECK ((shipzone_name <> ''::text)) ); ALTER TABLE public.shipzone OWNER TO admin; -- -- Name: TABLE shipzone; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shipzone IS 'Shipping Zone information'; SET search_path = api, pg_catalog; -- -- Name: invoice; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW invoice AS SELECT invchead.invchead_invcnumber AS invoice_number, invchead.invchead_ordernumber AS order_number, invchead.invchead_invcdate AS invoice_date, invchead.invchead_shipdate AS ship_date, invchead.invchead_orderdate AS order_date, saletype.saletype_code AS sale_type, salesrep.salesrep_number AS sales_rep, invchead.invchead_commission AS commission, COALESCE(taxzone.taxzone_code, 'None'::text) AS tax_zone, terms.terms_code AS terms, custinfo.cust_number AS customer_number, invchead.invchead_billto_name AS billto_name, invchead.invchead_billto_address1 AS billto_address1, invchead.invchead_billto_address2 AS billto_address2, invchead.invchead_billto_address3 AS billto_address3, invchead.invchead_billto_city AS billto_city, invchead.invchead_billto_state AS billto_state, invchead.invchead_billto_zipcode AS billto_postal_code, invchead.invchead_billto_country AS billto_country, invchead.invchead_billto_phone AS billto_phone, shiptoinfo.shipto_num AS shipto_number, invchead.invchead_shipto_name AS shipto_name, invchead.invchead_shipto_address1 AS shipto_address1, invchead.invchead_shipto_address2 AS shipto_address2, invchead.invchead_shipto_address3 AS shipto_address3, invchead.invchead_shipto_city AS shipto_city, invchead.invchead_shipto_state AS shipto_state, invchead.invchead_shipto_zipcode AS shipto_postal_code, invchead.invchead_shipto_country AS shipto_country, shipzone.shipzone_name AS shipto_shipzone, invchead.invchead_shipto_phone AS shipto_phone, invchead.invchead_ponumber AS po_number, invchead.invchead_shipvia AS ship_via, prj.prj_number AS project_number, invchead.invchead_fob AS fob, invchead.invchead_misc_descrip AS misc_charge_description, invchead.invchead_misc_amount AS misc_charge, CASE WHEN (invchead.invchead_misc_accnt_id = (-1)) THEN NULL::text ELSE public.formatglaccount(invchead.invchead_misc_accnt_id) END AS misc_charge_account_number, invchead.invchead_freight AS freight, curr.curr_abbr AS currency, invchead.invchead_payment AS payment, invchead.invchead_notes AS notes FROM (((((((((public.invchead LEFT JOIN public.custinfo ON ((custinfo.cust_id = invchead.invchead_cust_id))) LEFT JOIN public.shiptoinfo ON ((shiptoinfo.shipto_id = invchead.invchead_shipto_id))) LEFT JOIN public.prj ON ((prj.prj_id = invchead.invchead_prj_id))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = invchead.invchead_curr_id))) LEFT JOIN public.salesrep ON ((salesrep.salesrep_id = invchead.invchead_salesrep_id))) LEFT JOIN public.terms ON ((terms.terms_id = invchead.invchead_terms_id))) LEFT JOIN public.taxzone ON ((taxzone.taxzone_id = invchead.invchead_taxzone_id))) LEFT JOIN public.saletype ON ((invchead.invchead_saletype_id = saletype.saletype_id))) LEFT JOIN public.shipzone ON ((invchead.invchead_shipzone_id = shipzone.shipzone_id))); ALTER TABLE api.invoice OWNER TO admin; -- -- Name: VIEW invoice; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW invoice IS ' This view can be used as an interface to import Invioce Header data directly into the system. Required fields will be checked and default values will be populated'; SET search_path = public, pg_catalog; -- -- Name: insertinvoice(api.invoice); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertinvoice(api.invoice) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; BEGIN -- NOTE: (SELECT getCustId(...)) seems redundant, but it actually produces -- a HUGE performance increase because it makes the Postgres query planner -- use an index scan rather than an sequential table scan on cust_id INSERT INTO invchead ( invchead_invcnumber, invchead_ordernumber, invchead_invcdate, invchead_shipdate, invchead_orderdate, invchead_printed, invchead_posted, invchead_salesrep_id, invchead_commission, invchead_taxzone_id, invchead_terms_id, invchead_cust_id, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_country, invchead_billto_phone, invchead_shipto_id, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_country, invchead_shipto_phone, invchead_ponumber, invchead_shipvia, invchead_prj_id, invchead_fob, invchead_misc_descrip, invchead_misc_amount, invchead_misc_accnt_id, invchead_freight, invchead_curr_id, invchead_payment, invchead_notes, invchead_saletype_id, invchead_shipzone_id ) SELECT (CASE -- use a case here so we don't unnecessarily fetch a new invoice number WHEN pNew.invoice_number IS NULL THEN CAST(fetchInvcNumber() AS TEXT) WHEN pNew.invoice_number = '' THEN CAST(fetchInvcNumber() AS TEXT) ELSE pNew.invoice_number END), pNew.order_number, COALESCE(pNew.invoice_date, CURRENT_DATE), pNew.ship_date, pNew.order_date, FALSE, FALSE, COALESCE(getSalesRepId(pNew.sales_rep),shipto_salesrep_id,cust_salesrep_id), COALESCE(pNew.commission, 0), CASE WHEN pNew.tax_zone = 'None' THEN NULL ELSE COALESCE(getTaxZoneId(pNew.tax_zone),shipto_taxzone_id,cust_taxzone_id) END, COALESCE(getTermsId(pNew.terms),cust_terms_id), (SELECT getCustId(pNew.customer_number)), COALESCE(pNew.billto_name, cohead_billtoname, cust_name), COALESCE(pNew.billto_address1, cohead_billtoaddress1, addr_line1), COALESCE(pNew.billto_address2, cohead_billtoaddress2, addr_line2), COALESCE(pNew.billto_address3, cohead_billtoaddress3, addr_line3), COALESCE(pNew.billto_city, cohead_billtocity, addr_city), COALESCE(pNew.billto_state, cohead_billtostate, addr_state), COALESCE(pNew.billto_postal_code, cohead_billtozipcode, addr_postalcode), COALESCE(pNew.billto_country, cohead_billtocountry, addr_country), COALESCE(pNew.billto_phone, ''), COALESCE(shipto_id,-1), pNew.shipto_name, pNew.shipto_address1, pNew.shipto_address2, pNew.shipto_address3, pNew.shipto_city, pNew.shipto_state, pNew.shipto_postal_code, pNew.shipto_country, pNew.shipto_phone, COALESCE(pNew.po_number, ''), COALESCE(pNew.ship_via,shipto_shipvia,cust_shipvia), COALESCE(getPrjId(pNew.project_number),-1), COALESCE(pNew.fob,fetchDefaultFob(( SELECT CAST(usrpref_value AS INTEGER) FROM usrpref, whsinfo WHERE ((warehous_id=CAST(usrpref_value AS INTEGER)) AND (warehous_shipping) AND (warehous_active) AND (usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse') ) ))), pNew.misc_charge_description, COALESCE(pNew.misc_charge, 0), COALESCE(getGlAccntId(pNew.misc_charge_account_number),-1), COALESCE(pNew.freight, 0), COALESCE(getCurrId(pNew.currency),( SELECT cust_curr_id FROM custinfo WHERE (cust_id=(SELECT getCustId(pNew.customer_number))) ),basecurrid()), COALESCE(pNew.payment,0), COALESCE(pNew.notes,''), getSaleTypeId(pNew.sale_type), getShipZoneId(pNew.shipto_shipzone) FROM custinfo LEFT OUTER JOIN shiptoinfo ON (shipto_id=(SELECT CASE WHEN getShiptoId(pNew.customer_number,pNew.shipto_number) IS NOT NULL THEN getShiptoId(pNew.customer_number,pNew.shipto_number) ELSE (SELECT shipto_id FROM shiptoinfo WHERE shipto_cust_id=cust_id AND shipto_default) END)) LEFT OUTER JOIN cohead ON (cohead_number=pNEW.order_number) LEFT OUTER JOIN cntct ON (cntct_id=cust_cntct_id) LEFT OUTER JOIN addr ON (addr_id=cntct_addr_id) WHERE cust_id = (SELECT getCustId(pNew.customer_number)); RETURN TRUE; END; $_$; ALTER FUNCTION public.insertinvoice(api.invoice) OWNER TO admin; -- -- Name: invcitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invcitem ( invcitem_id integer NOT NULL, invcitem_invchead_id integer NOT NULL, invcitem_linenumber integer, invcitem_item_id integer, invcitem_warehous_id integer DEFAULT (-1), invcitem_custpn text, invcitem_number text, invcitem_descrip text, invcitem_ordered numeric(20,6) NOT NULL, invcitem_billed numeric(20,6) NOT NULL, invcitem_custprice numeric(20,4), invcitem_price numeric(20,4) NOT NULL, invcitem_notes text, invcitem_salescat_id integer, invcitem_taxtype_id integer, invcitem_qty_uom_id integer, invcitem_qty_invuomratio numeric(20,10) NOT NULL, invcitem_price_uom_id integer, invcitem_price_invuomratio numeric(20,10) NOT NULL, invcitem_coitem_id integer, invcitem_updateinv boolean DEFAULT false, invcitem_rev_accnt_id integer ); ALTER TABLE public.invcitem OWNER TO admin; -- -- Name: TABLE invcitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE invcitem IS 'Invoice Line Item information'; SET search_path = api, pg_catalog; -- -- Name: invoiceline; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW invoiceline AS SELECT invchead.invchead_invcnumber AS invoice_number, invcitem.invcitem_linenumber AS line_number, item.item_number, invcitem.invcitem_number AS misc_item_number, whsinfo.warehous_code AS site, invcitem.invcitem_descrip AS misc_item_description, salescat.salescat_name AS sales_category, invcitem.invcitem_custpn AS customer_part_number, invcitem.invcitem_ordered AS qty_ordered, invcitem.invcitem_billed AS qty_billed, invcitem.invcitem_updateinv AS update_inventory, invcitem.invcitem_price AS net_unit_price, COALESCE(taxtype.taxtype_name, 'None'::text) AS tax_type, COALESCE(qty_uom.uom_name, 'None'::text) AS qty_uom, COALESCE(price_uom.uom_name, 'None'::text) AS price_uom, invcitem.invcitem_notes AS notes, CASE WHEN (invcitem.invcitem_rev_accnt_id IS NOT NULL) THEN public.formatglaccount(invcitem.invcitem_rev_accnt_id) ELSE NULL::text END AS alternate_rev_account FROM (((((((public.invcitem LEFT JOIN public.invchead ON ((invcitem.invcitem_invchead_id = invchead.invchead_id))) LEFT JOIN public.item ON ((item.item_id = invcitem.invcitem_item_id))) LEFT JOIN public.whsinfo ON ((invcitem.invcitem_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.salescat ON ((salescat.salescat_id = invcitem.invcitem_salescat_id))) LEFT JOIN public.taxtype ON ((taxtype.taxtype_id = invcitem.invcitem_taxtype_id))) LEFT JOIN public.uom qty_uom ON ((qty_uom.uom_id = invcitem.invcitem_qty_uom_id))) LEFT JOIN public.uom price_uom ON ((price_uom.uom_id = invcitem.invcitem_price_uom_id))); ALTER TABLE api.invoiceline OWNER TO admin; -- -- Name: VIEW invoiceline; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW invoiceline IS ' This view can be used as an interface to import Invoice Line Items data directly into the system. Required fields will be checked and default values will be populated'; SET search_path = public, pg_catalog; -- -- Name: insertinvoicelineitem(api.invoiceline); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertinvoicelineitem(api.invoiceline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; _r RECORD; BEGIN INSERT INTO invcitem ( invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_updateinv, invcitem_custprice, invcitem_price, invcitem_notes, invcitem_salescat_id, invcitem_taxtype_id, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_rev_accnt_id ) SELECT invchead_id, COALESCE(pNew.line_number,( SELECT (COALESCE(MAX(invcitem_linenumber), 0) + 1) FROM invcitem WHERE (invcitem_invchead_id=invchead_id) )), COALESCE(item_id, -1), COALESCE(getwarehousid(pNew.site,'ALL'),-1), pNew.customer_part_number, (CASE WHEN item_id IS NULL THEN pNew.misc_item_number ELSE NULL END), (CASE WHEN item_id IS NULL THEN pNew.misc_item_description ELSE NULL END), pNew.qty_ordered, COALESCE(pNew.qty_billed, 0), COALESCE(pNew.update_inventory,FALSE), 0, -- invcitem_custprice COALESCE(pNew.net_unit_price,itemPrice(item_id,invchead_cust_id, invchead_shipto_id,pNew.qty_ordered,invchead_curr_id,invchead_orderdate)), COALESCE(pNew.notes,''), CASE WHEN item_id IS NULL THEN (SELECT salescat_id FROM salescat WHERE salescat_name = pNew.sales_category) ELSE NULL END, taxtype_id, CASE WHEN item_id IS NOT NULL THEN COALESCE((SELECT uom_id FROM uom WHERE (uom_name=pNew.qty_uom)), item_price_uom_id) ELSE NULL END, CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.qty_uom),item_price_uom_id), item_price_uom_id ) ELSE 1 END, CASE WHEN item_id IS NOT NULL THEN COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.price_uom),item_price_uom_id) ELSE NULL END, CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.price_uom),item_price_uom_id), item_price_uom_id ) ELSE 1 END, getGlAccntId(pNew.alternate_rev_account) FROM invchead LEFT OUTER JOIN item ON (item_id=getItemId(pNew.item_number)) LEFT OUTER JOIN taxtype ON (taxtype_id=CASE WHEN pNew.tax_type IS NULL THEN getItemTaxType(item_id,invchead_taxzone_id) WHEN pNew.tax_type = 'None' THEN NULL ELSE (SELECT taxtype_id FROM taxtype WHERE taxtype_name=pNew.tax_type) END) WHERE (invchead_invcnumber=pNew.invoice_number) AND (invchead_posted=FALSE); RETURN TRUE; END; $_$; ALTER FUNCTION public.insertinvoicelineitem(api.invoiceline) OWNER TO admin; -- -- Name: insertitemcost(integer, integer, integer, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertitemcost(integer, integer, integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pCostElemId ALIAS FOR $2; pCurrId ALIAS FOR $3; pCost ALIAS FOR $4; pPostToStandard ALIAS FOR $5; _itemcost_id INTEGER; _update_return INTEGER; _postcost_return BOOLEAN; --This function is used with the api.itemcost View for updating and inserting --into the itemcosts table BEGIN IF (pCost IS NULL OR pCost < 0) THEN RAISE EXCEPTION 'itemcost Actual Cost Invalid ', pCost; END IF; -- Check for uniqueness SELECT itemcost_id INTO _itemcost_id FROM itemcost WHERE ( (itemcost_item_id = pItemId) AND (itemcost_costelem_id = pCostElemId) AND (NOT itemcost_lowlevel) ); IF (FOUND) THEN RAISE EXCEPTION 'itemcost already exists for this Item and Cost Element'; END IF; -- Check for valid combination of item_type and costelem_type IF (SELECT (COUNT(*) > 0) FROM item, costelem WHERE (item_id=pItemId) AND (costelem_id=pCostElemId) AND (item_type IN ('M', 'F', 'B', 'C', 'T')) AND (costelem_type IN ('Material'))) THEN RAISE EXCEPTION 'itemcost of this type is invalid for Manufactured Item'; END IF; IF (SELECT (COUNT(*) > 0) FROM item, costelem WHERE (item_id=pItemId) AND (costelem_id=pCostElemId) AND (item_type IN ('O', 'P')) AND (costelem_type IN ('Direct Labor', 'Overhead', 'Machine Overhead'))) THEN RAISE EXCEPTION 'itemcost of this type is invalid for Purchased Item'; END IF; IF (pCost > 0) THEN SELECT NEXTVAL('itemcost_itemcost_id_seq') INTO _itemcost_id; INSERT INTO itemcost ( itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id ) VALUES ( _itemcost_id, pItemId, pCostElemId, FALSE, 0, startOfTime(), pCost, CURRENT_DATE, pCurrId ); --Only Post Cost to standard if the parameter is set to true IF (pPostToStandard) THEN IF (NOT checkPrivilege('PostStandardCosts')) THEN RAISE EXCEPTION 'You do not have privileges to poststandard itemcosts. Set api.itemcost post_to_standard to false'; END IF; SELECT postcost(_itemcost_id) INTO _postcost_return; IF (NOT _postcost_return) THEN RETURN -2; END IF; END IF; ELSE RETURN -1; END IF; RETURN _itemcost_id; END; $_$; ALTER FUNCTION public.insertitemcost(integer, integer, integer, numeric, boolean) OWNER TO admin; -- -- Name: insertsalesline(api.salesline); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION insertsalesline(api.salesline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNEW ALIAS FOR $1; _r RECORD; BEGIN IF (NOT EXISTS (SELECT cohead_id FROM cohead WHERE cohead_number=pNEW.order_number)) THEN RAISE EXCEPTION 'Function insertSalesLine failed because Sales Order % not found', pNEW.order_number; END IF; IF (NOT EXISTS (SELECT item_id FROM item WHERE item_number=pNEW.item_number)) THEN RAISE EXCEPTION 'Function insertSalesLine failed because Item Number % not found', pNEW.item_number; END IF; SELECT * INTO _r FROM cohead, itemsite, item, whsinfo WHERE ((cohead_number=pNEW.order_number) AND (itemsite_warehous_id=warehous_id AND (itemsite_item_id=item_id) AND (itemsite_active) AND (item_number=pNEW.item_number) AND (warehous_active) AND (warehous_id=COALESCE(getWarehousId(pNEW.sold_from_site,'ALL'),cohead_warehous_id,fetchprefwarehousid())))); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertSalesLine failed with unknown failure to retrieve Sales Order'; END IF; INSERT INTO coitem ( coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_qtyshipped, coitem_unitcost, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_custprice, coitem_order_id, coitem_memo, coitem_imported, coitem_qtyreturned, coitem_custpn, coitem_order_type, coitem_substitute_item_id, coitem_prcost, coitem_taxtype_id, coitem_warranty, coitem_cos_accnt_id, coitem_rev_accnt_id) VALUES ( _r.cohead_id, pNEW.line_number::INTEGER, _r.itemsite_id, pNEW.status, pNEW.scheduled_date, pNEW.promise_date, pNEW.qty_ordered, COALESCE(getUomId(pNEW.qty_uom),_r.item_inv_uom_id), itemuomtouomratio(_r.item_id,COALESCE(getUomId(pNEW.qty_uom),_r.item_inv_uom_id),_r.item_inv_uom_id), 0, stdCost(_r.item_id), COALESCE(pNEW.net_unit_price,itemPrice(_r.item_id,_r.cohead_cust_id, _r.cohead_shipto_id,pNEW.qty_ordered,_r.cohead_curr_id,_r.cohead_orderdate)), COALESCE(getUomId(pNEW.price_uom),_r.item_price_uom_id), itemuomtouomratio(_r.item_id,COALESCE(getUomId(pNEW.price_uom),_r.item_price_uom_id),_r.item_price_uom_id), itemPrice(_r.item_id,_r.cohead_cust_id,_r.cohead_shipto_id,pNEW.qty_ordered,_r.cohead_curr_id,_r.cohead_orderdate), -1, pNEW.notes, true, 0, pNEW.customer_pn, CASE WHEN ((pNEW.create_order AND (_r.item_type = 'M')) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createwo)) THEN 'W' WHEN ((pNEW.create_order AND (_r.item_type = 'P')) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createsopr)) THEN 'R' WHEN ((pNEW.create_order AND (_r.item_type = 'P') AND (_r.itemsite_createsopo)) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createsopo)) THEN 'P' END, getitemid(pNEW.substitute_for), pNEW.overwrite_po_price, COALESCE(getTaxTypeId(pNEW.tax_type), getItemTaxType(_r.itemsite_item_id, _r.cohead_taxzone_id)), pNEW.warranty, getGlAccntId(pNEW.alternate_cos_account), getGlAccntId(pNEW.alternate_rev_account) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.insertsalesline(api.salesline) OWNER TO admin; -- -- Name: intervaltominutes(interval); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION intervaltominutes(interval) RETURNS numeric LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT (EXTRACT(DAY FROM $1) * 24 * 60 + EXTRACT(HOUR FROM $1) * 60 + EXTRACT(MINUTE FROM $1) + ROUND((EXTRACT(SECOND FROM $1) / 60)::NUMERIC, 4))::NUMERIC AS result $_$; ALTER FUNCTION public.intervaltominutes(interval) OWNER TO admin; -- -- Name: invadjustment(integer, numeric, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invadjustment(integer, numeric, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invAdjustment($1, $2, $3, $4, CURRENT_TIMESTAMP, NULL); END; $_$; ALTER FUNCTION public.invadjustment(integer, numeric, text, text) OWNER TO admin; -- -- Name: invadjustment(integer, numeric, text, text, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invadjustment(integer, numeric, text, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invAdjustment($1, $2, $3, $4, $5, NULL); END; $_$; ALTER FUNCTION public.invadjustment(integer, numeric, text, text, timestamp with time zone) OWNER TO admin; -- -- Name: invadjustment(integer, numeric, text, text, timestamp with time zone, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invadjustment(integer, numeric, text, text, timestamp with time zone, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pDocumentNumber ALIAS FOR $3; pComments ALIAS FOR $4; pGlDistTS ALIAS FOR $5; pCostValue ALIAS FOR $6; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; SELECT postInvTrans( itemsite_id, 'AD', pQty, 'I/M', 'AD', pDocumentNumber, '', ('Miscellaneous Adjustment for item ' || item_number || E'\n' || pComments), costcat_asset_accnt_id, costcat_adjustment_accnt_id, _itemlocSeries, pGlDistTS, pCostValue) INTO _invhistid FROM itemsite, item, costcat WHERE ( (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) ); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.invadjustment(integer, numeric, text, text, timestamp with time zone, numeric) OWNER TO admin; -- -- Name: invexpense(integer, numeric, integer, text, text, timestamp with time zone, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invexpense(pitemsiteid integer, pqty numeric, pexpcatid integer, pdocumentnumber text, pcomments text, pgldistts timestamp with time zone DEFAULT now(), pprjid integer DEFAULT NULL::integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; SELECT postInvTrans( itemsite_id, 'EX', pQty, 'I/M', 'EX', pDocumentNumber, '', CASE WHEN (pQty < 0) THEN ('Reverse Material Expense for item ' || item_number || E'\n' || pComments) ELSE ('Material Expense for item ' || item_number || E'\n' || pComments) END, getPrjAccntId(pPrjid, expcat_exp_accnt_id), costcat_asset_accnt_id, _itemlocSeries, pGlDistTS) INTO _invhistid FROM itemsite, item, costcat, expcat WHERE ( (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) AND (expcat_id=pExpcatid) ); INSERT INTO invhistexpcat (invhistexpcat_invhist_id, invhistexpcat_expcat_id) VALUES (_invhistid, pExpcatid); RETURN _itemlocSeries; END; $$; ALTER FUNCTION public.invexpense(pitemsiteid integer, pqty numeric, pexpcatid integer, pdocumentnumber text, pcomments text, pgldistts timestamp with time zone, pprjid integer) OWNER TO admin; -- -- Name: invhistsense(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invhistsense(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvhistId ALIAS FOR $1; _count INTEGER; _row RECORD; _sense INTEGER; BEGIN SELECT invhist_transtype, invhist_ordnumber, itemsite_warehous_id INTO _row FROM invhist JOIN itemsite ON (itemsite_id=invhist_itemsite_id) WHERE (invhist_id=pInvhistId); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count = 0) THEN RAISE EXCEPTION 'Record not found for invhist_id=%',pInvhistId; END IF; -- increase inventory: AD RM RT RP RR RS RX RB TR -- decrease inventory: IM IB IT SH SI EX RI -- TS and TR are special: shipShipment and recallShipment should not change -- QOH at the Transfer Order src whs (as this was done by issueToShipping) -- but postReceipt should change QOH at the transit whs IF (_row.invhist_transtype='TS') THEN _sense := CASE WHEN (SELECT tohead_trns_warehous_id=_row.itemsite_warehous_id FROM tohead WHERE (tohead_number=_row.invhist_ordnumber)) THEN -1 ELSE 0 END; ELSIF (_row.invhist_transtype='TR') THEN _sense := CASE WHEN (SELECT tohead_src_warehous_id=_row.itemsite_warehous_id FROM tohead WHERE (tohead_number=_row.invhist_ordnumber)) THEN 0 ELSE 1 END; ELSIF (_row.invhist_transtype IN ('IM', 'IB', 'IT', 'SH', 'SI', 'EX', 'RI')) THEN _sense := -1; ELSE _sense := 1; END IF; RETURN _sense; END; $_$; ALTER FUNCTION public.invhistsense(integer) OWNER TO admin; -- -- Name: invhisttrig(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invhisttrig() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Need to allow 'temporary' negative for average costed item that has been frozen. -- Check at itemsite after all of the transactions have been thawed will ensure -- that final Qty On Hand is positive. -- IF (NEW.invhist_qoh_after < 0 AND NEW.invhist_costmethod = 'A') THEN -- RAISE EXCEPTION 'Invhist (%) is recording with average costing and is not allowed to have a negative quantity on hand.', NEW.invhist_id; -- END IF; IF ( ( SELECT itemsite_freeze FROM itemsite WHERE (itemsite_id=NEW.invhist_itemsite_id) ) ) THEN NEW.invhist_posted = FALSE; END IF; -- never change the created timestamp, which defaults to CURRENT_TIMESTAMP IF (TG_OP != 'INSERT') THEN NEW.invhist_created = OLD.invhist_created; ELSE -- Always need a series id for distribution posting IF (NEW.invhist_series IS NULL) THEN RAISE EXCEPTION 'Column invhist_series may not be null.'; END IF; END IF; RETURN NEW; END; $$; ALTER FUNCTION public.invhisttrig() OWNER TO admin; -- -- Name: invoicetotal(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invoicetotal(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvoiceId ALIAS FOR $1; _linesum NUMERIC; _linetax NUMERIC; _result NUMERIC; _allocated NUMERIC; _posted BOOLEAN; BEGIN SELECT SUM(ROUND(COALESCE((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / COALESCE(invcitem_price_invuomratio,1)), 0),2)) INTO _linesum FROM invcitem WHERE (invcitem_invchead_id=pInvoiceId); -- TODO: why sum on the result of select round(sum(), 2)? SELECT SUM(tax) INTO _linetax FROM (SELECT ROUND(SUM(COALESCE(taxdetail_tax, 0)),2) AS tax FROM tax JOIN calculateTaxDetailSummary('I', pInvoiceId, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id) AS data; SELECT noNeg(invchead_freight + invchead_misc_amount + COALESCE(_linetax, 0) + COALESCE(_linesum, 0)), invchead_posted INTO _result, _posted FROM invchead WHERE (invchead_id=pInvoiceId); IF NOT FOUND THEN RETURN 0; END IF; IF (_posted) THEN SELECT COALESCE(SUM(currToCurr(arapply_curr_id, aropen_curr_id, arapply_applied, aropen_docdate)),0) INTO _allocated FROM arapply, aropen, invchead WHERE ( (invchead_posted) AND (invchead_id=pInvoiceId) AND (aropen_docnumber=invchead_invcnumber) AND (aropen_doctype='I') AND (arapply_target_aropen_id=aropen_id) AND (arapply_reftype='S') AND (invchead_posted) ) ; ELSE SELECT COALESCE(SUM(CASE WHEN((aropen_amount - aropen_paid) >= currToCurr(aropenalloc_curr_id, aropen_curr_id, aropenalloc_amount, aropen_docdate)) THEN currToCurr(aropenalloc_curr_id, invchead_curr_id, aropenalloc_amount, aropen_docdate) ELSE currToCurr(aropen_curr_id, invchead_curr_id, aropen_amount - aropen_paid, aropen_docdate) END),0) INTO _allocated FROM invchead LEFT OUTER JOIN cohead ON (cohead_number=invchead_ordernumber) JOIN aropenalloc ON ((aropenalloc_doctype='I' AND aropenalloc_doc_id=invchead_id) OR (aropenalloc_doctype='S' AND aropenalloc_doc_id=cohead_id)) JOIN aropen ON (aropen_id=aropenalloc_aropen_id AND (aropen_amount - aropen_paid) > 0.0) WHERE ( (NOT invchead_posted) AND (invchead_id=pInvoiceId) ); END IF; RETURN _result - COALESCE(_allocated, 0); END; $_$; ALTER FUNCTION public.invoicetotal(integer) OWNER TO admin; -- -- Name: invreceipt(integer, numeric, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invreceipt(integer, numeric, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invReceipt($1, $2, $3, $4, $5, CURRENT_TIMESTAMP, NULL); END; $_$; ALTER FUNCTION public.invreceipt(integer, numeric, text, text, text) OWNER TO admin; -- -- Name: invreceipt(integer, numeric, text, text, text, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invreceipt(integer, numeric, text, text, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invReceipt($1, $2, $3, $4, $5, $6, NULL); END; $_$; ALTER FUNCTION public.invreceipt(integer, numeric, text, text, text, timestamp with time zone) OWNER TO admin; -- -- Name: invreceipt(integer, numeric, text, text, text, timestamp with time zone, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invreceipt(integer, numeric, text, text, text, timestamp with time zone, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pOrdernumber ALIAS FOR $3; pDocumentNumber ALIAS FOR $4; pComments ALIAS FOR $5; pGlDistTS ALIAS FOR $6; pCostValue ALIAS FOR $7; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; SELECT postInvTrans( itemsite_id, 'RX', pQty, 'I/M', 'RX', pDocumentNumber, '', ('Miscellaneous Receipt for item ' || item_number || E'\n' || pComments), costcat_asset_accnt_id, costcat_liability_accnt_id, _itemlocSeries, pGlDistTS, pCostValue) INTO _invhistid FROM itemsite, item, costcat WHERE ( (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) ); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.invreceipt(integer, numeric, text, text, text, timestamp with time zone, numeric) OWNER TO admin; -- -- Name: invscrap(integer, numeric, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invscrap(integer, numeric, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invScrap($1, $2, $3, $4, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.invscrap(integer, numeric, text, text) OWNER TO admin; -- -- Name: invscrap(integer, numeric, text, text, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invscrap(integer, numeric, text, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invScrap($1, $2, $3, $4, $5, NULL); END; $_$; ALTER FUNCTION public.invscrap(integer, numeric, text, text, timestamp with time zone) OWNER TO admin; -- -- Name: invscrap(integer, numeric, text, text, timestamp with time zone, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invscrap(integer, numeric, text, text, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invScrap($1, $2, $3, $4, $5, $6, NULL); END; $_$; ALTER FUNCTION public.invscrap(integer, numeric, text, text, timestamp with time zone, integer) OWNER TO admin; -- -- Name: invscrap(integer, numeric, text, text, timestamp with time zone, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION invscrap(integer, numeric, text, text, timestamp with time zone, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pDocumentNumber ALIAS FOR $3; pComments ALIAS FOR $4; pGlDistTS ALIAS FOR $5; pInvHistId ALIAS FOR $6; pPrjid ALIAS FOR $7; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; IF (pInvHistId IS NOT NULL) THEN SELECT invhist_series INTO _itemlocSeries FROM invhist WHERE invhist_id=pInvHistId; ELSE SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( itemsite_id, 'SI', pQty, 'I/M', 'SI', pDocumentNumber, '', CASE WHEN (pQty < 0) THEN ('Reverse Material Scrap for item ' || item_number || E'\n' || pComments) ELSE ('Material Scrap for item ' || item_number || E'\n' || pComments) END, getPrjAccntId(pPrjid, costcat_scrap_accnt_id), costcat_asset_accnt_id, _itemlocSeries, pGlDistTS, NULL, pInvHistId) INTO _invhistid FROM itemsite, item, costcat WHERE ( (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) ); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.invscrap(integer, numeric, text, text, timestamp with time zone, integer, integer) OWNER TO admin; -- -- Name: isdba(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION isdba(text DEFAULT NULL::text) RETURNS boolean LANGUAGE sql AS $_$ SELECT (datdba=pg_roles.oid OR rolsuper) AS issuper FROM pg_database, pg_roles WHERE ((datname=current_database()) AND (rolname=COALESCE($1, getEffectiveXtUser()))); $_$; ALTER FUNCTION public.isdba(text) OWNER TO admin; -- -- Name: ismulticurr(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION ismulticurr() RETURNS boolean LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN (SELECT (count(*) > 1) FROM curr_symbol); END; $$; ALTER FUNCTION public.ismulticurr() OWNER TO admin; -- -- Name: isnumeric(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION isnumeric(text) RETURNS boolean LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pText ALIAS FOR $1; _cursor INTEGER; BEGIN IF ( (LENGTH(pText) = 0) OR (pText IS NULL) ) THEN RETURN FALSE; END IF; FOR _cursor IN 1..LENGTH(pText) LOOP IF (SUBSTRING(pText FROM _cursor FOR 1) NOT IN ( '0', '1', '2', '3', '4', '5' ,'6' ,'7' ,'8' ,'9' )) THEN RETURN FALSE; END IF; END LOOP; RETURN TRUE; END; $_$; ALTER FUNCTION public.isnumeric(text) OWNER TO admin; -- -- Name: issueallbalancetoshipping(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issueallbalancetoshipping(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueAllBalanceToShipping('SO', $1, 0, NULL); END; $_$; ALTER FUNCTION public.issueallbalancetoshipping(integer) OWNER TO admin; -- -- Name: issueallbalancetoshipping(text, integer, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issueallbalancetoshipping(text, integer, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; pheadid ALIAS FOR $2; _itemlocSeries INTEGER := $3; _timestamp TIMESTAMP WITH TIME ZONE := $4; _s RECORD; BEGIN IF (pordertype = 'SO') THEN FOR _s IN SELECT coitem_id, noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ( (shipitem_orderitem_id=coitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) AND (shiphead_order_type=pordertype) ) ) ) AS balance FROM coitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id)) ON (coitem_itemsite_id=itemsite_id) WHERE ( (coitem_status NOT IN ('C','X')) AND (item_type != 'K') AND (coitem_cohead_id=pheadid) ) LOOP IF (_s.balance <> 0) THEN _itemlocSeries := issueToShipping(pordertype, _s.coitem_id, _s.balance, _itemlocSeries, _timestamp); IF (_itemlocSeries < 0) THEN EXIT; END IF; END IF; END LOOP; ELSEIF (pordertype = 'TO') THEN FOR _s IN SELECT toitem_id, noNeg( toitem_qty_ordered - toitem_qty_shipped - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ( (shipitem_orderitem_id=toitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) AND (shiphead_order_type=pordertype) ) ) ) AS balance FROM toitem WHERE ( (toitem_status NOT IN ('C','X')) AND (toitem_tohead_id=pheadid) ) LOOP IF (_s.balance <> 0) THEN _itemlocSeries := issueToShipping(pordertype, _s.toitem_id, _s.balance, _itemlocSeries, _timestamp); IF (_itemlocSeries < 0) THEN EXIT; END IF; END IF; END LOOP; ELSE RETURN -1; END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.issueallbalancetoshipping(text, integer, integer, timestamp with time zone) OWNER TO admin; -- -- Name: issuelinebalancetoshipping(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuelinebalancetoshipping(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueLineBalanceToShipping('SO', $1, NULL); END; $_$; ALTER FUNCTION public.issuelinebalancetoshipping(integer) OWNER TO admin; -- -- Name: issuelinebalancetoshipping(text, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuelinebalancetoshipping(text, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueLineBalanceToShipping($1, $2, $3, 0, NULL); END; $_$; ALTER FUNCTION public.issuelinebalancetoshipping(text, integer, timestamp with time zone) OWNER TO admin; -- -- Name: issuelinebalancetoshipping(text, integer, timestamp with time zone, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuelinebalancetoshipping(text, integer, timestamp with time zone, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; pitemid ALIAS FOR $2; ptimestamp ALIAS FOR $3; pitemlocseries ALIAS FOR $4; pinvhistid ALIAS FOR $5; _itemlocSeries INTEGER := 0; _qty NUMERIC; BEGIN _itemlocSeries := COALESCE(pitemlocseries,0); IF (pordertype = 'SO') THEN SELECT noNeg( coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ((shipitem_orderitem_id=coitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) ) ) ) INTO _qty FROM coitem WHERE (coitem_id=pitemid); ELSEIF (pordertype = 'TO') THEN SELECT noNeg( toitem_qty_ordered - toitem_qty_shipped - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ( (shipitem_orderitem_id=toitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) ) ) ) INTO _qty FROM toitem WHERE (toitem_id=pitemid); ELSE RETURN -1; END IF; IF (_qty > 0) THEN _itemlocSeries := issueToShipping(pordertype, pitemid, _qty, _itemlocSeries, ptimestamp, pinvhistid); END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.issuelinebalancetoshipping(text, integer, timestamp with time zone, integer, integer) OWNER TO admin; -- -- Name: issues(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issues(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('IM', 'IB', 'IT')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.issues(text) OWNER TO admin; -- -- Name: issuetoshipping(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuetoshipping(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueToShipping('SO', $1, $2, 0, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.issuetoshipping(integer, numeric) OWNER TO admin; -- -- Name: issuetoshipping(integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuetoshipping(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueToShipping('SO', $1, $2, $3, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.issuetoshipping(integer, numeric, integer) OWNER TO admin; -- -- Name: issuetoshipping(text, integer, numeric, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuetoshipping(text, integer, numeric, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueToShipping($1, $2, $3, $4, $5, NULL); END; $_$; ALTER FUNCTION public.issuetoshipping(text, integer, numeric, integer, timestamp with time zone) OWNER TO admin; -- -- Name: issuetoshipping(text, integer, numeric, integer, timestamp with time zone, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuetoshipping(text, integer, numeric, integer, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; pitemid ALIAS FOR $2; pQty ALIAS FOR $3; _itemlocSeries INTEGER := $4; _timestamp TIMESTAMP WITH TIME ZONE := $5; pinvhistid ALIAS FOR $6; _coholdtype TEXT; _invhistid INTEGER; _shipheadid INTEGER; _shipnumber INTEGER; _cntctid INTEGER; _p RECORD; _m RECORD; _value NUMERIC; _warehouseid INTEGER; _shipitemid INTEGER; _freight NUMERIC; BEGIN IF (_timestamp IS NULL) THEN _timestamp := CURRENT_TIMESTAMP; END IF; IF (_itemlocSeries = 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; IF (pordertype = 'SO') THEN -- Check site security SELECT warehous_id INTO _warehouseid FROM coitem,itemsite,site() WHERE ((coitem_id=pitemid) AND (itemsite_id=coitem_itemsite_id) AND (warehous_id=itemsite_warehous_id)); IF (NOT FOUND) THEN RETURN 0; END IF; -- Check for average cost items going negative IF ( SELECT ( (itemsite_costmethod='A') AND ((itemsite_qtyonhand - round(pQty * coitem_qty_invuomratio, 6)) < 0.0) ) FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE (coitem_id=pitemid) ) THEN RETURN -20; END IF; -- Check auto registration IF ( SELECT COALESCE(itemsite_autoreg, FALSE) FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE (coitem_id=pitemid) ) THEN SELECT COALESCE(crmacct_cntct_id_1, -1) INTO _cntctid FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id) JOIN crmacct ON (crmacct_cust_id=cohead_cust_id) WHERE (coitem_id=pitemid); IF (_cntctid = -1) THEN RETURN -15; END IF; END IF; SELECT shiphead_id INTO _shipheadid FROM shiphead, coitem WHERE ((shiphead_order_id=coitem_cohead_id) AND (NOT shiphead_shipped) AND (coitem_id=pitemid) AND (shiphead_order_type=pordertype)); IF (NOT FOUND) THEN SELECT NEXTVAL('shiphead_shiphead_id_seq') INTO _shipheadid; _shipnumber := fetchShipmentNumber(); IF (_shipnumber < 0) THEN RETURN -10; END IF; SELECT cohead_holdtype INTO _coholdtype FROM cohead, coitem WHERE ((cohead_id=coitem_cohead_id) AND (coitem_id=pitemid)); IF (_coholdtype = 'C') THEN RETURN -12; ELSIF (_coholdtype = 'P') THEN RETURN -13; ELSIF (_coholdtype = 'R') THEN RETURN -14; END IF; INSERT INTO shiphead ( shiphead_id, shiphead_number, shiphead_order_id, shiphead_order_type, shiphead_shipped, shiphead_sfstatus, shiphead_shipvia, shiphead_shipchrg_id, shiphead_freight, shiphead_freight_curr_id, shiphead_shipdate, shiphead_notes, shiphead_shipform_id ) SELECT _shipheadid, _shipnumber, coitem_cohead_id, pordertype, FALSE, 'N', cohead_shipvia, CASE WHEN (cohead_shipchrg_id <= 0) THEN NULL ELSE cohead_shipchrg_id END, cohead_freight, cohead_curr_id, _timestamp::DATE, cohead_shipcomments, CASE WHEN cohead_shipform_id = -1 THEN NULL ELSE cohead_shipform_id END FROM cohead, coitem WHERE ((coitem_cohead_id=cohead_id) AND (coitem_id=pitemid) ); UPDATE pack SET pack_shiphead_id = _shipheadid, pack_printed = FALSE FROM coitem WHERE ((pack_head_id=coitem_cohead_id) AND (pack_shiphead_id IS NULL) AND (pack_head_type='SO') AND (coitem_id=pitemid)); ELSE UPDATE pack SET pack_printed = FALSE FROM coitem WHERE ((pack_head_id=coitem_cohead_id) AND (pack_shiphead_id=_shipheadid) AND (pack_head_type='SO') AND (coitem_id=pitemid)); END IF; -- Handle g/l transaction SELECT postInvTrans( itemsite_id, 'SH', (pQty * coitem_qty_invuomratio), 'S/R', porderType, formatSoNumber(coitem_id), shiphead_number, ('Issue ' || item_number || ' to Shipping for customer ' || cohead_billtoname), getPrjAccntId(cohead_prj_id, costcat_shipasset_accnt_id), costcat_asset_accnt_id, _itemlocSeries, _timestamp, NULL, pinvhistid ) INTO _invhistid FROM coitem, cohead, itemsite, item, costcat, shiphead WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (coitem_id=pitemid) AND (shiphead_id=_shipheadid) ); SELECT (invhist_unitcost * invhist_invqty) INTO _value FROM invhist WHERE (invhist_id=_invhistid); _shipitemid := nextval('shipitem_shipitem_id_seq'); INSERT INTO shipitem ( shipitem_id, shipitem_shiphead_id, shipitem_orderitem_id, shipitem_qty, shipitem_transdate, shipitem_trans_username, shipitem_invoiced, shipitem_value, shipitem_invhist_id ) VALUES ( _shipitemid, _shipheadid, pitemid, pQty, _timestamp, getEffectiveXtUser(), FALSE, _value, CASE WHEN _invhistid = -1 THEN NULL ELSE _invhistid END ); -- Handle reservation IF (fetchmetricbool('EnableSOReservations')) THEN -- Remember what was reserved so we can re-reserve if this issue is returned INSERT INTO shipitemrsrv (shipitemrsrv_shipitem_id, shipitemrsrv_qty) SELECT _shipitemid, least(pQty,coitem_qtyreserved) FROM coitem WHERE ((coitem_id=pitemid) AND (coitem_qtyreserved > 0)); -- Update sales order UPDATE coitem SET coitem_qtyreserved = noNeg(coitem_qtyreserved - pQty) WHERE(coitem_id=pitemid); END IF; -- Calculate shipment freight SELECT calcShipFreight(_shipheadid) INTO _freight; UPDATE shiphead SET shiphead_freight=_freight WHERE (shiphead_id=_shipheadid); ELSEIF (pordertype = 'TO') THEN -- Check site security IF (fetchMetricBool('MultiWhs')) THEN SELECT warehous_id INTO _warehouseid FROM toitem, tohead, site() WHERE ( (toitem_id=pitemid) AND (tohead_id=toitem_tohead_id) AND (warehous_id=tohead_src_warehous_id) ); IF (NOT FOUND) THEN RETURN 0; END IF; END IF; SELECT postInvTrans( itemsite_id, 'SH', pQty, 'S/R', pordertype, formatToNumber(toitem_id), '', 'Issue to Shipping', costcat_shipasset_accnt_id, costcat_asset_accnt_id, _itemlocSeries, _timestamp) INTO _invhistid FROM tohead, toitem, itemsite, costcat WHERE ((tohead_id=toitem_tohead_id) AND (itemsite_item_id=toitem_item_id) AND (itemsite_warehous_id=tohead_src_warehous_id) AND (itemsite_costcat_id=costcat_id) AND (toitem_id=pitemid) ); SELECT shiphead_id INTO _shipheadid FROM shiphead, toitem WHERE ((shiphead_order_id=toitem_tohead_id) AND (NOT shiphead_shipped) AND (toitem_id=pitemid) AND (shiphead_order_type=pordertype)); IF (NOT FOUND) THEN _shipheadid := NEXTVAL('shiphead_shiphead_id_seq'); _shipnumber := fetchShipmentNumber(); IF (_shipnumber < 0) THEN RETURN -10; END IF; INSERT INTO shiphead ( shiphead_id, shiphead_number, shiphead_order_id, shiphead_order_type, shiphead_shipped, shiphead_sfstatus, shiphead_shipvia, shiphead_shipchrg_id, shiphead_freight, shiphead_freight_curr_id, shiphead_shipdate, shiphead_notes, shiphead_shipform_id ) SELECT _shipheadid, _shipnumber, tohead_id, pordertype, FALSE, 'N', tohead_shipvia, tohead_shipchrg_id, tohead_freight + SUM(toitem_freight), tohead_freight_curr_id, _timestamp::DATE, tohead_shipcomments, tohead_shipform_id FROM tohead, toitem WHERE ((toitem_tohead_id=tohead_id) AND (tohead_id IN (SELECT toitem_tohead_id FROM toitem WHERE (toitem_id=pitemid))) ) GROUP BY tohead_id, tohead_shipvia, tohead_shipchrg_id, tohead_freight, tohead_freight_curr_id, tohead_shipcomments, tohead_shipform_id; END IF; INSERT INTO shipitem ( shipitem_shiphead_id, shipitem_orderitem_id, shipitem_qty, shipitem_transdate, shipitem_trans_username, shipitem_value, shipitem_invhist_id ) SELECT _shipheadid, pitemid, pQty, _timestamp, getEffectiveXtUser(), invhist_invqty * invhist_unitcost, _invhistid FROM toitem, item, invhist WHERE ((toitem_id=pitemid) AND (item_id=toitem_item_id) AND (invhist_id=_invhistid)); ELSE RETURN -11; END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.issuetoshipping(text, integer, numeric, integer, timestamp with time zone, integer) OWNER TO admin; -- -- Name: issuewomaterial(integer, numeric, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterial(integer, numeric, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; pMarkPush ALIAS FOR $4; _itemlocSeries INTEGER; BEGIN RETURN issueWoMaterial(pWomatlid, pQty, pItemlocSeries,now()); END; $_$; ALTER FUNCTION public.issuewomaterial(integer, numeric, integer, boolean) OWNER TO admin; -- -- Name: issuewomaterial(integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterial(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; _p RECORD; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN RETURN issueWoMaterial(pWomatlid, pQty, pItemlocSeries, now()); END; $_$; ALTER FUNCTION public.issuewomaterial(integer, numeric, integer) OWNER TO admin; -- -- Name: issuewomaterial(integer, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterial(integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pMarkPush ALIAS FOR $3; _itemlocSeries INTEGER; BEGIN RETURN issueWoMaterial(pWomatlid, pQty, pMarkPush, now()); END; $_$; ALTER FUNCTION public.issuewomaterial(integer, numeric, boolean) OWNER TO admin; -- -- Name: issuewomaterial(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterial(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; _itemlocSeries INTEGER; BEGIN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; RETURN issueWoMaterial(pWomatlid, pQty, _itemlocSeries); END; $_$; ALTER FUNCTION public.issuewomaterial(integer, numeric) OWNER TO admin; -- -- Name: issuewomaterial(integer, numeric, integer, boolean, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterial(integer, numeric, integer, boolean, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; pMarkPush ALIAS FOR $4; pGlDistTS ALIAS FOR $5; _itemlocSeries INTEGER; BEGIN SELECT issueWoMaterial(pWomatlid, pQty, pItemlocSeries, pGlDistTS) INTO _itemlocSeries; IF (pMarkPush) THEN UPDATE womatl SET womatl_issuemethod='S' WHERE ((womatl_issuemethod='M') AND (womatl_id=pWomatlid)); END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.issuewomaterial(integer, numeric, integer, boolean, timestamp with time zone) OWNER TO admin; -- -- Name: issuewomaterial(integer, numeric, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterial(integer, numeric, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueWoMaterial($1, $2, $3, $4, NULL); END; $_$; ALTER FUNCTION public.issuewomaterial(integer, numeric, integer, timestamp with time zone) OWNER TO admin; -- -- Name: issuewomaterial(integer, numeric, boolean, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterial(integer, numeric, boolean, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pMarkPush ALIAS FOR $3; pGlDistTS ALIAS FOR $4; _itemlocSeries INTEGER; BEGIN SELECT issueWoMaterial(pWomatlid, pQty, 0, pGlDistTS) INTO _itemlocSeries; IF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; IF (pMarkPush) THEN UPDATE womatl SET womatl_issuemethod='S' WHERE ((womatl_issuemethod='M') AND (womatl_id=pWomatlid)); END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.issuewomaterial(integer, numeric, boolean, timestamp with time zone) OWNER TO admin; -- -- Name: issuewomaterial(integer, numeric, integer, timestamp with time zone, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterial(integer, numeric, integer, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; pGlDistTS ALIAS FOR $4; pInvhistid ALIAS FOR $5; _p RECORD; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN SELECT item_id, itemsite_id AS c_itemsite_id, wo_itemsite_id AS p_itemsite_id, itemsite_loccntrl, itemsite_controlmethod, womatl_wo_id, womatl_qtyreq, itemsite_item_id, womatl_uom_id, wo_prj_id, roundQty(item_fractional, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, pQty)) AS qty, formatWoNumber(wo_id) AS woNumber, CASE WHEN(itemsite_costmethod='J' AND item_type='P' AND poitem_id IS NOT NULL) THEN poitem_unitprice WHEN(itemsite_costmethod IN ('A','J')) THEN avgcost(itemsite_id) WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) ELSE 0.0 END AS cost, womatl_issuemethod AS issueMethod INTO _p FROM womatl JOIN wo ON (wo_id=womatl_wo_id) JOIN itemsite ON (itemsite_id=womatl_itemsite_id) JOIN item ON (item_id=itemsite_item_id) LEFT OUTER JOIN poitem ON (poitem_order_id=womatl_id AND poitem_order_type='W') WHERE (womatl_id=pWomatlid); IF (pQty < 0) THEN RETURN pItemlocSeries; END IF; IF (pItemlocSeries <> 0) THEN _itemlocSeries := pItemlocSeries; ELSE SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( ci.itemsite_id, 'IM', _p.qty, 'W/O', 'WO', _p.woNumber, '', ('Material ' || item_number || ' Issue to Work Order'), getPrjAccntId(_p.wo_prj_id, pc.costcat_wip_accnt_id), cc.costcat_asset_accnt_id, _itemlocSeries, pGlDistTS, NULL, pInvhistid ) INTO _invhistid FROM itemsite AS ci, itemsite AS pi, costcat AS cc, costcat AS pc, item WHERE ( (ci.itemsite_costcat_id=cc.costcat_id) AND (pi.itemsite_costcat_id=pc.costcat_id) AND (ci.itemsite_id=_p.c_itemsite_id) AND (pi.itemsite_id=_p.p_itemsite_id) AND (ci.itemsite_item_id=item_id) ); -- Create linkage to the transaction created IF (_invhistid != -1) THEN INSERT INTO womatlpost (womatlpost_womatl_id,womatlpost_invhist_id) VALUES (pWomatlid,_invhistid); END IF; -- Increase the parent W/O's WIP value by the value of the issued components UPDATE wo SET wo_wipvalue = (wo_wipvalue + (_p.cost * _p.qty)), wo_postedvalue = (wo_postedvalue + (_p.cost * _p.qty)) WHERE (wo_id=_p.womatl_wo_id); UPDATE womatl SET womatl_qtyiss = (womatl_qtyiss + itemuomtouom(_p.itemsite_item_id, NULL, _p.womatl_uom_id, _p.qty)), womatl_lastissue = pGlDistTS::DATE WHERE (womatl_id=pWomatlid); UPDATE wo SET wo_status='I' WHERE ( (wo_status <> 'I') AND (wo_id=_p.womatl_wo_id) ); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.issuewomaterial(integer, numeric, integer, timestamp with time zone, integer) OWNER TO admin; -- -- Name: issuewomaterialbatch(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION issuewomaterialbatch(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; _itemlocSeries INTEGER; _r RECORD; _woNumber TEXT; BEGIN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; FOR _r IN SELECT womatl_id, CASE WHEN (womatl_qtyreq >= 0) THEN roundQty(itemuomfractionalbyuom(item_id, womatl_uom_id), noNeg(womatl_qtyreq - womatl_qtyiss)) ELSE roundQty(itemuomfractionalbyuom(item_id, womatl_uom_id), noNeg(womatl_qtyiss * -1)) END AS qty FROM womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_issuemethod IN ('S', 'M')) AND (womatl_wo_id=pWoid) ) LOOP IF (_r.qty > 0) THEN SELECT issueWoMaterial(_r.womatl_id, _r.qty, _itemlocSeries, TRUE) INTO _itemlocSeries; END IF; END LOOP; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.issuewomaterialbatch(integer) OWNER TO admin; -- -- Name: itemaltcapinvrat(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemaltcapinvrat(integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMRatioByType(pItemid, 'AltCapacity'); END; $_$; ALTER FUNCTION public.itemaltcapinvrat(integer) OWNER TO admin; -- -- Name: itemaltcapuom(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemaltcapuom(integer) RETURNS text LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMByType(pItemid, 'AltCapacity'); END; $_$; ALTER FUNCTION public.itemaltcapuom(integer) OWNER TO admin; -- -- Name: itemcapinvrat(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcapinvrat(integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMRatioByType(pItemid, 'Capacity'); END; $_$; ALTER FUNCTION public.itemcapinvrat(integer) OWNER TO admin; -- -- Name: itemcapuom(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcapuom(integer) RETURNS text LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMByType(pItemid, 'Capacity'); END; $_$; ALTER FUNCTION public.itemcapuom(integer) OWNER TO admin; -- -- Name: itemcharprice(integer, integer, text, integer, integer, numeric, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcharprice(integer, integer, text, integer, integer, numeric, integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pShiptoid ALIAS FOR $5; pQty ALIAS FOR $6; pCurrid ALIAS FOR $7; pEffective ALIAS FOR $8; BEGIN RETURN itemCharPrice(pItemid, pCharid, pCharValue, pCustid, pShiptoid, pQty, pCurrid, CURRENT_DATE, CURRENT_DATE); END; $_$; ALTER FUNCTION public.itemcharprice(integer, integer, text, integer, integer, numeric, integer, date) OWNER TO admin; -- -- Name: itemcharprice(integer, integer, text, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcharprice(integer, integer, text, integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pQty ALIAS FOR $5; BEGIN RETURN itemCharPrice(pItemid, pCharid, pCharValue, pCustid, -1, pQty, baseCurrId(), CURRENT_DATE); END; $_$; ALTER FUNCTION public.itemcharprice(integer, integer, text, integer, numeric) OWNER TO admin; -- -- Name: itemcharprice(integer, integer, text, integer, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcharprice(integer, integer, text, integer, integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pShiptoid ALIAS FOR $5; pQty ALIAS FOR $6; BEGIN RETURN itemCharPrice(pItemid, pCharid, pCharValue, pCustid, pShiptoid, pQty, baseCurrId(), CURRENT_DATE); END; $_$; ALTER FUNCTION public.itemcharprice(integer, integer, text, integer, integer, numeric) OWNER TO admin; -- -- Name: itemcharprice(integer, integer, text, integer, integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcharprice(integer, integer, text, integer, integer, numeric, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pShiptoid ALIAS FOR $5; pQty ALIAS FOR $6; pCurrid ALIAS FOR $7; BEGIN RETURN itemCharPrice(pItemid, pCharid, pCharValue, pCustid, pShiptoid, pQty, pCurrid, CURRENT_DATE); END; $_$; ALTER FUNCTION public.itemcharprice(integer, integer, text, integer, integer, numeric, integer) OWNER TO admin; -- -- Name: itemcharprice(integer, integer, text, integer, integer, numeric, integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcharprice(integer, integer, text, integer, integer, numeric, integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pShiptoid ALIAS FOR $5; pQty ALIAS FOR $6; pCurrid ALIAS FOR $7; pEffective ALIAS FOR $8; pAsOf ALIAS FOR $9; _price NUMERIC; _sales NUMERIC; _item RECORD; _iteminvpricerat NUMERIC; BEGIN -- If the charass_value passed in is NULL, we can skip this function IF (pCharValue IS NULL) THEN RETURN 0; END IF; -- Return the itemCharPrice in the currency passed in as pCurrid -- Get a value here so we do not have to call the function several times SELECT iteminvpricerat(pItemid) INTO _iteminvpricerat; -- First get a sales price if any so we when we find other prices -- we can determine if we want that price or this price. -- Check for a Sale Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price - (ipsprice_price * cust_discntprcnt), pEffective) INTO _sales FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, sale, custinfo WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (sale_ipshead_id=ipshead_id) AND (pAsOf BETWEEN sale_startdate AND sale_enddate) AND (ipsprice_qtybreak <= pQty) AND (cust_id=pCustid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; -- Check for a Customer Shipto Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE ((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=pShiptoid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- Check for a Customer Shipto Pattern Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE ((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass, shiptoinfo WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (shipto_num ~ ipsass_shipto_pattern) AND (ipsass_cust_id=pCustid) AND (shipto_id=pShiptoid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- Check for a Customer Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE ((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (COALESCE(length(ipsass_shipto_pattern), 0) = 0) AND (ipsass_cust_id=pCustid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- Check for a Customer Type Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass, custinfo WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (ipsass_custtype_id=cust_custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (cust_id=pCustid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- Check for a Customer Type Pattern Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE ((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass, custtype, custinfo WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (coalesce(length(ipsass_custtype_pattern), 0) > 0) AND (custtype_code ~ ipsass_custtype_pattern) AND (cust_custtype_id=custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (cust_id=pCustid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- If we have not found another price yet and we have a -- sales price we will use that. IF (_sales IS NOT NULL) THEN RETURN _sales; END IF; -- Check for a list price SELECT MIN(currToLocal(pCurrid, charass_price - (charass_price * COALESCE(cust_discntprcnt, 0)), pEffective)) AS price, item_exclusive INTO _item FROM charass,item LEFT OUTER JOIN custinfo ON (cust_id=pCustid) WHERE ((item_id=pItemid) AND (charass_char_id=pCharid) AND (charass_value=pCharValue) AND (charass_target_type='I') AND (charass_target_id=item_id)) GROUP BY item_exclusive; IF (FOUND) THEN IF (NOT _item.item_exclusive) THEN IF (_item.price < 0) THEN RETURN 0; ELSE RETURN _item.price; END IF; ELSE RETURN 0; END IF; ELSE RETURN 0; END IF; END; $_$; ALTER FUNCTION public.itemcharprice(integer, integer, text, integer, integer, numeric, integer, date, date) OWNER TO admin; -- -- Name: itemcharvalue(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcharvalue(integer, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharName ALIAS FOR $2; _value TEXT; BEGIN SELECT charass_value INTO _value FROM charass, char WHERE ( (charass_char_id=char_id) AND (charass_target_type='I') AND (charass_target_id=pItemid) AND (char_name=pCharName) ); IF (NOT FOUND) THEN _value = ''; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.itemcharvalue(integer, text) OWNER TO admin; -- -- Name: itemcost(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemcost(integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _cost NUMERIC; BEGIN SELECT CASE WHEN (itemsite_costmethod='A' AND itemsite_qtyonhand != 0.0) THEN (itemsite_value / itemsite_qtyonhand) WHEN (itemsite_costmethod='A' AND itemsite_qtyonhand = 0.0) THEN 0.0 WHEN (itemsite_costmethod='N') THEN 0.0 ELSE stdCost(itemsite_item_id) END INTO _cost FROM itemsite WHERE(itemsite_id=pItemsiteid); RETURN _cost; END; $_$; ALTER FUNCTION public.itemcost(integer) OWNER TO admin; -- -- Name: iteminventoryuominuse(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION iteminventoryuominuse(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _uomid INTEGER; _result INTEGER; BEGIN SELECT item_inv_uom_id INTO _uomid FROM item WHERE(item_id=pItemid); SELECT itemuomconv_id INTO _result FROM itemuomconv WHERE(itemuomconv_item_id=pItemid) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT itemsite_id INTO _result FROM itemsite WHERE ( (itemsite_item_id=pItemid) AND ((itemsite_qtyonhand <> 0) OR (itemsite_nnqoh <> 0)) ) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; RETURN FALSE; END; $_$; ALTER FUNCTION public.iteminventoryuominuse(integer) OWNER TO admin; -- -- Name: iteminvpricerat(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION iteminvpricerat(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _fromUomid INTEGER; _toUomid INTEGER; _ratio NUMERIC; BEGIN IF(pItemid IS NULL) THEN RETURN 1.0; END IF; SELECT item_inv_uom_id, item_price_uom_id INTO _fromUomid, _toUomid FROM item WHERE(item_id=pItemid); IF(NOT FOUND) THEN RAISE EXCEPTION 'No item record found for item_id %', pItemid; END IF; IF(_fromUomid = _toUomid) THEN RETURN 1.0; END IF; -- Return the ration as inventory / price SELECT CASE WHEN(itemuomconv_from_uom_id=_fromUomid) THEN itemuomconv_from_value / itemuomconv_to_value ELSE itemuomconv_to_value / itemuomconv_from_value END INTO _ratio FROM itemuomconv WHERE((((itemuomconv_from_uom_id=_fromUomid) AND (itemuomconv_to_uom_id=_toUomid)) OR ((itemuomconv_from_uom_id=_toUomid) AND (itemuomconv_to_uom_id=_fromUomid))) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'No itemuomconv record found for item_id % to item_price_uomid %', pItemid, _toUomid; END IF; RETURN _ratio; END; $_$; ALTER FUNCTION public.iteminvpricerat(integer) OWNER TO admin; -- -- Name: itemipsprice(integer, integer, integer, numeric, integer, integer, integer, date, date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemipsprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date, psiteid integer) RETURNS SETOF itemprice LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row itemprice%ROWTYPE; _sale RECORD; _ips RECORD; _item RECORD; _cust RECORD; _shipto RECORD; _iteminvpricerat NUMERIC := 1.0; _listprice NUMERIC := 0.0; _qty NUMERIC; _asof DATE; _wholesalepricecosting BOOLEAN := false; _long30markups BOOLEAN := false; _itempricingprecedence BOOLEAN := false; BEGIN _wholesalepricecosting := fetchMetricBool('WholesalePriceCosting'); _long30markups := fetchMetricBool('Long30Markups'); _itempricingprecedence := fetchMetricBool('ItemPricingPrecedence'); -- Return the itemPrice in the currency passed in as pCurrid _qty := itemuomtouom(pItemid, pQtyUOM, NULL, pQty); -- If no as of passed, use current date _asof := COALESCE(pAsOf, CURRENT_DATE); -- Cache Item, Customer and Shipto SELECT item.*, itemCost(itemsite_id) AS invcost INTO _item FROM item LEFT OUTER JOIN itemsite ON (itemsite_item_id=item_id AND itemsite_warehous_id=pSiteid) WHERE (item_id=pItemid); SELECT * INTO _cust FROM custinfo JOIN custtype ON (custtype_id=cust_custtype_id) WHERE (cust_id=pCustid); SELECT * INTO _shipto FROM shiptoinfo WHERE (shipto_id=pShiptoid); -- Get a value here so we do not have to call the function several times SELECT itemuomtouomratio(pItemid, pPriceUOM, _item.item_price_uom_id) AS ratio INTO _iteminvpricerat; -- First get a sales price if any so we when we find other prices -- we can determine if we want that price or this price. -- Check for a Sale Price SELECT INTO _sale currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) AS rightprice, ipsitem_type AS righttype FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, ipsitem_type, CASE WHEN (ipsitem_type = 'N') THEN (ipsitem_price * itemuomtouomratio(_item.item_id, pPriceUOM, ipsitem_price_uom_id)) WHEN (ipsitem_type = 'D') THEN noNeg(_item.item_listprice - (_item.item_listprice * ipsitem_discntprcnt) - ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND _long30markups AND _wholesalepricecosting) THEN (_item.item_listcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND _long30markups) THEN (_item.invcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN (ipsitem_type = 'M' AND _wholesalepricecosting) THEN (_item.item_listcost + (_item.item_listcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN (ipsitem_type = 'M') THEN (_item.invcost + (_item.invcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat ELSE 0.00 END AS ipsprice_price, CASE WHEN (ipsitem_item_id=_item.item_id) THEN itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) ELSE ipsitem_qtybreak END AS ipsprice_qtybreak, (COALESCE(ipsitem_price_uom_id, -1)=COALESCE(pPriceUOM,-1)) AS uommatched, CASE WHEN (_itempricingprecedence) THEN (COALESCE(ipsitem_item_id, -1)=_item.item_id) ELSE true END AS itemmatched FROM ipsiteminfo WHERE(ipsitem_item_id=_item.item_id) OR (ipsitem_prodcat_id=_item.item_prodcat_id) ) AS ipsprice, ipshead, ipsass, sale WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (sale_ipshead_id=ipsprice_ipshead_id) AND (_asof BETWEEN sale_startdate AND sale_enddate) AND (ipsprice_qtybreak <= _qty) AND (ipsass_ipshead_id=ipshead_id) AND ( (ipsass_shipto_id=_shipto.shipto_id) OR ((COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND (_shipto.shipto_num ~ ipsass_shipto_pattern)) OR (ipsass_cust_id=_cust.cust_id) OR (ipsass_custtype_id=_cust.cust_custtype_id) OR ((COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND (_cust.custtype_code ~ ipsass_custtype_pattern)) ) ) ORDER BY itemmatched DESC, uommatched DESC, ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; -- Find the best Price Schedule Price SELECT INTO _ips currToCurr(ipshead_curr_id, pCurrid, protoprice, pEffective) AS rightprice, ipsitem_type AS righttype FROM ( SELECT *, CASE WHEN (COALESCE(ipsass_shipto_id, -1) > 0) THEN 1 WHEN (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) THEN 2 WHEN (COALESCE(ipsass_cust_id, -1) > 0) THEN 3 WHEN (COALESCE(ipsass_custtype_id, -1) > 0) THEN 4 WHEN (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) THEN 5 ELSE 99 END AS assignseq, CASE WHEN (ipsitem_type = 'N') THEN (ipsitem_price * itemuomtouomratio(_item.item_id, pPriceUOM, ipsitem_price_uom_id)) WHEN (ipsitem_type = 'D') THEN noNeg(_item.item_listprice - (_item.item_listprice * ipsitem_discntprcnt) - ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND _long30markups AND _wholesalepricecosting) THEN (_item.item_listcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND _long30markups) THEN (_item.invcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN (ipsitem_type = 'M' AND _wholesalepricecosting) THEN (_item.item_listcost + (_item.item_listcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN (ipsitem_type = 'M') THEN (_item.invcost + (_item.invcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat ELSE 0.00 END AS protoprice, CASE WHEN (ipsitem_item_id=_item.item_id) THEN itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) ELSE ipsitem_qtybreak END AS protoqtybreak, (COALESCE(ipsitem_price_uom_id, -1)=COALESCE(pPriceUOM,-1)) AS uommatched, CASE WHEN (_itempricingprecedence) THEN (COALESCE(ipsitem_item_id, -1)=_item.item_id) ELSE true END AS itemmatched FROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id) JOIN ipsiteminfo ON (ipsitem_ipshead_id=ipshead_id) WHERE ((ipsitem_item_id=_item.item_id) OR (ipsitem_prodcat_id=_item.item_prodcat_id)) AND (_asof BETWEEN ipshead_effective AND ipshead_expires) AND ((ipsitem_warehous_id=pSiteid) OR (ipsitem_warehous_id IS NULL)) AND ( (ipsass_shipto_id=_shipto.shipto_id) OR ((COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND (_shipto.shipto_num ~ ipsass_shipto_pattern)) OR (ipsass_cust_id=_cust.cust_id) OR (ipsass_custtype_id=_cust.cust_custtype_id) OR ((COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND (_cust.custtype_code ~ ipsass_custtype_pattern)) ) ) AS proto WHERE (protoqtybreak <= pQty) ORDER BY assignseq, itemmatched DESC, protoqtybreak DESC, rightprice LIMIT 1; IF (_ips.rightprice IS NOT NULL) THEN IF ((_sale.rightprice IS NOT NULL) AND (_sale.rightprice < _ips.rightprice)) THEN RAISE DEBUG 'itemprice, item=%, cust=%, shipto=%, sale price= %', pItemid, pCustid, pShiptoid, _sale.rightprice; _row.itemprice_price := _sale.rightprice; _row.itemprice_type := _sale.righttype; RETURN NEXT _row; END IF; RAISE DEBUG 'itemprice, item=%, cust=%, shipto=%, schedule price= %', pItemid, pCustid, pShiptoid, _ips.rightprice; _row.itemprice_price := _ips.rightprice; _row.itemprice_type := _ips.righttype; RETURN NEXT _row; END IF; -- If item is exclusive then list list price does not apply IF (_item.item_exclusive) THEN RAISE DEBUG 'itemprice, item=%, cust=%, shipto=%, item exclusive, price=-9999', pItemid, pCustid, pShiptoid; _row.itemprice_price := -9999.0; _row.itemprice_type := ''; RETURN NEXT _row; END IF; -- Check for a list price _listprice := noNeg(currToLocal(pCurrid, _item.item_listprice - (_item.item_listprice * COALESCE(_cust.cust_discntprcnt, 0.0)), pEffective) * itemuomtouomratio(pItemid, pPriceUOM, _item.item_price_uom_id)); RAISE DEBUG 'itemprice, item=%, cust=%, shipto=%, list price= %', pItemid, pCustid, pShiptoid, _listprice; _row.itemprice_price := _listprice; _row.itemprice_type := 'P'; RETURN NEXT _row; RETURN; END; $$; ALTER FUNCTION public.itemipsprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date, psiteid integer) OWNER TO admin; -- -- Name: itemlocdistqty(text, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemlocdistqty(text, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTypes ALIAS FOR $1; pLocationid ALIAS FOR $2; pParentid ALIAS FOR $3; _qty NUMERIC := 0; _tempQty NUMERIC; BEGIN IF (strpos(pTypes, 'L') > 0) THEN SELECT COALESCE(SUM(itemlocdist_qty), 0) INTO _tempQty FROM itemlocdist WHERE ( (itemlocdist_source_type='L') AND (itemlocdist_source_id=pLocationid) AND (itemlocdist_itemlocdist_id=pParentid) ); _qty := (_qty + _tempQty); END IF; IF (strpos(pTypes, 'I') > 0) THEN SELECT COALESCE(SUM(itemlocdist_qty), 0) INTO _tempQty FROM itemlocdist, itemloc WHERE ( (itemlocdist_source_type='I') AND (itemlocdist_source_id=itemloc_id) AND (itemloc_location_id=pLocationid) AND (itemlocdist_itemlocdist_id=pParentid) ); _qty := (_qty + _tempQty); END IF; RETURN _qty; END; $_$; ALTER FUNCTION public.itemlocdistqty(text, integer, integer) OWNER TO admin; -- -- Name: itemlocdistqty(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemlocdistqty(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; pParentid ALIAS FOR $2; _qty NUMERIC; _tempQty NUMERIC; BEGIN SELECT COALESCE(SUM(itemlocdist_qty), 0) INTO _qty FROM itemlocdist WHERE ( (itemlocdist_source_type='L') AND (itemlocdist_source_id=pLocationid) AND (itemlocdist_itemlocdist_id=pParentid) ); SELECT COALESCE(SUM(itemlocdist_qty), 0) INTO _tempQty FROM itemlocdist, itemloc WHERE ( (itemlocdist_source_type='I') AND (itemlocdist_source_id=itemloc_id) AND (itemloc_location_id=pLocationid) AND (itemlocdist_itemlocdist_id=pParentid) ); _qty := (_qty + _tempQty); RETURN _qty; END; $_$; ALTER FUNCTION public.itemlocdistqty(integer, integer) OWNER TO admin; -- -- Name: itemprice(integer, integer, integer, numeric, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pcurrid integer, peffective date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _item RECORD; BEGIN SELECT item_inv_uom_id, item_price_uom_id INTO _item FROM item WHERE(item_id=pItemid); IF (FOUND) THEN RETURN itemPrice(pItemid, pCustid, pShiptoid, pQty, _item.item_inv_uom_id, _item.item_price_uom_id, pCurrid, pEffective); END IF; RETURN -9999; END; $$; ALTER FUNCTION public.itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pcurrid integer, peffective date) OWNER TO admin; -- -- Name: itemprice(integer, integer, integer, numeric, integer, integer, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN RETURN itemPrice(pItemid, pCustid, pShiptoid, pQty, pQtyUOM, pPriceUOM, pCurrid, pEffective, CURRENT_DATE); END; $$; ALTER FUNCTION public.itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date) OWNER TO admin; -- -- Name: itemprice(integer, integer, integer, numeric, integer, integer, integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN RETURN itemPrice(pItemid, pCustid, pShiptoid, pQty, pQtyUOM, pPriceUOM, pCurrid, pEffective, pAsOf, NULL); END; $$; ALTER FUNCTION public.itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date) OWNER TO admin; -- -- Name: itemprice(integer, integer, integer, numeric, integer, integer, integer, date, date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date, psiteid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN SELECT * FROM itemIpsPrice(pItemid, pCustid, pShiptoid, pQty, pQtyUOM, pPriceUOM, pCurrid, pEffective, pAsOf, pSiteid) INTO _r; RETURN _r.itemprice_price; END; $$; ALTER FUNCTION public.itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date, psiteid integer) OWNER TO admin; -- -- Name: itemsellinguom(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemsellinguom(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMByType(pItemid, 'Selling'); END; $_$; ALTER FUNCTION public.itemsellinguom(integer) OWNER TO admin; -- -- Name: itemsrcprice(integer, numeric, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemsrcprice(pitemsrcid integer, pqty numeric, pcurrid integer, peffective date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _price NUMERIC := 0.0; BEGIN SELECT itemsrcPrice(pItemsrcid, -1, FALSE, pQty, pCurrid, pEffective) INTO _price; RETURN _price; END; $$; ALTER FUNCTION public.itemsrcprice(pitemsrcid integer, pqty numeric, pcurrid integer, peffective date) OWNER TO admin; -- -- Name: itemsrcprice(integer, integer, boolean, numeric, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemsrcprice(pitemsrcid integer, psiteid integer, pdropship boolean, pqty numeric, pcurrid integer, peffective date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _price NUMERIC := 0.0; _r RECORD; _effective DATE; BEGIN -- If no pEffective passed, use current date _effective := COALESCE(pEffective, CURRENT_DATE); -- Cache Itemsrc and Item SELECT * INTO _r FROM itemsrc JOIN item ON (item_id=itemsrc_item_id) WHERE (itemsrc_id=pItemsrcid); IF (NOT FOUND) THEN RAISE EXCEPTION 'itemsrc % not found.', pItemsrcid; END IF; -- Determine price SELECT currToCurr(itemsrcp_curr_id, pCurrid, price, _effective) INTO _price FROM ( SELECT *, CASE itemsrcp_type WHEN ('N') THEN itemsrcp_price WHEN ('D') THEN (_r.item_listcost - (_r.item_listcost * itemsrcp_discntprcnt) - itemsrcp_fixedamtdiscount) ELSE 0.0 END AS price FROM itemsrcp WHERE ( (itemsrcp_itemsrc_id=_r.itemsrc_id) AND ((itemsrcp_warehous_id=pSiteid) OR (itemsrcp_warehous_id=-1)) AND ((itemsrcp_dropship=pDropship) OR (NOT itemsrcp_dropship)) AND (itemsrcp_qtybreak <= pQty) ) ORDER BY itemsrcp_qtybreak DESC LIMIT 1 ) AS data ; RETURN _price; END; $$; ALTER FUNCTION public.itemsrcprice(pitemsrcid integer, psiteid integer, pdropship boolean, pqty numeric, pcurrid integer, peffective date) OWNER TO admin; -- -- Name: itemuombytype(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemuombytype(integer, text) RETURNS text LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUomtype ALIAS FOR $2; _uom TEXT; BEGIN SELECT uom_name INTO _uom FROM ( SELECT uom_name FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN itemuom ON (itemuom_itemuomconv_id=itemuomconv_id) JOIN uomtype ON (itemuom_uomtype_id=uomtype_id) JOIN uom ON (itemuomconv_to_uom_id=uom_id) WHERE((item_id=pItemid) AND (uomtype_name=pUomtype) AND (item_inv_uom_id != itemuomconv_to_uom_id)) UNION SELECT uom_name FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN itemuom ON (itemuom_itemuomconv_id=itemuomconv_id) JOIN uomtype ON (itemuom_uomtype_id=uomtype_id) JOIN uom ON (itemuomconv_from_uom_id=uom_id) WHERE((item_id=pItemid) AND (uomtype_name=pUomtype) AND (item_inv_uom_id != itemuomconv_from_uom_id))) data LIMIT 1; IF (NOT FOUND) THEN SELECT uom_name INTO _uom FROM item JOIN uom ON (item_inv_uom_id=uom_id) WHERE(item_id=pItemid); END IF; RETURN _uom; END; $_$; ALTER FUNCTION public.itemuombytype(integer, text) OWNER TO admin; -- -- Name: itemuomfractionalbytype(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemuomfractionalbytype(integer, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUomtype ALIAS FOR $2; _frac BOOLEAN; BEGIN SELECT itemuomconv_fractional INTO _frac FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN itemuom ON (itemuom_itemuomconv_id=itemuomconv_id) JOIN uomtype ON (itemuom_uomtype_id=uomtype_id) WHERE((item_id=pItemid) AND (uomtype_name=pUomtype)) LIMIT 1; IF (NOT FOUND) THEN SELECT item_fractional INTO _frac FROM item JOIN uom ON (item_inv_uom_id=uom_id) WHERE(item_id=pItemid); END IF; RETURN _frac; END; $_$; ALTER FUNCTION public.itemuomfractionalbytype(integer, text) OWNER TO admin; -- -- Name: itemuomfractionalbyuom(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemuomfractionalbyuom(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUomid ALIAS FOR $2; _frac BOOLEAN; BEGIN SELECT itemuomconv_fractional INTO _frac FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) WHERE((item_id=pItemid) AND ((itemuomconv_from_uom_id=item_inv_uom_id AND itemuomconv_to_uom_id=pUomid) OR (itemuomconv_to_uom_id=item_inv_uom_id AND itemuomconv_from_uom_id=pUomid))) LIMIT 1; IF (NOT FOUND) THEN SELECT item_fractional INTO _frac FROM item JOIN uom ON (item_inv_uom_id=uom_id) WHERE(item_id=pItemid); END IF; RETURN _frac; END; $_$; ALTER FUNCTION public.itemuomfractionalbyuom(integer, integer) OWNER TO admin; -- -- Name: itemuomratiobytype(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemuomratiobytype(integer, text) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUomtype ALIAS FOR $2; _ratio NUMERIC; BEGIN -- Return the ration as alternate / inventory uom SELECT CASE WHEN(itemuomconv_from_uom_id=item_inv_uom_id) THEN itemuomconv_to_value / itemuomconv_from_value ELSE itemuomconv_from_value / itemuomconv_to_value END INTO _ratio FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN itemuom ON (itemuom_itemuomconv_id=itemuomconv_id) JOIN uomtype ON (itemuom_uomtype_id=uomtype_id) WHERE((item_id=pItemid) AND (uomtype_name=pUomtype)) LIMIT 1; IF (NOT FOUND) THEN _ratio := 1.0; END IF; RETURN _ratio; END; $_$; ALTER FUNCTION public.itemuomratiobytype(integer, text) OWNER TO admin; -- -- Name: itemuomtouom(integer, integer, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemuomtouom(integer, integer, integer, numeric) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN itemuomtouom($1, $2, $3, $4, 'qty'); END; $_$; ALTER FUNCTION public.itemuomtouom(integer, integer, integer, numeric) OWNER TO admin; -- -- Name: itemuomtouom(integer, integer, integer, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemuomtouom(pitemid integer, puomidfrom integer, puomidto integer, pqtyfrom numeric, plocale text) RETURNS numeric LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _uomidFrom INTEGER; _uomidTo INTEGER; _uomidInv INTEGER; _valueFrom NUMERIC := 0.0; _valueTo NUMERIC := 0.0; _value NUMERIC := 0.0; _item RECORD; _conv RECORD; _frac BOOLEAN := FALSE; BEGIN SELECT item_inv_uom_id, item_fractional INTO _item FROM item WHERE(item_id=pItemid); IF(NOT FOUND) THEN RAISE EXCEPTION 'No item record was found for item id %', pItemid; END IF; _uomidFrom := COALESCE(pUomidFrom, _item.item_inv_uom_id); _uomidTo := COALESCE(pUomidTo, _item.item_inv_uom_id); _uomidInv := _item.item_inv_uom_id; -- Should we round the qty here or not? IF(_uomidFrom = _uomidTo) THEN -- Both from/to are the same. If it is the item inv uom -- then use the item fractional value otherwise assume -- it is fractional for now so the user gets the same value back. IF(_uomidFrom = _item.item_inv_uom_id) THEN _frac := _item.item_fractional; ELSE _frac := true; END IF; RETURN roundLocale(_frac, pQtyFrom, pLocale); END IF; -- Try a direct conversion SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidFrom AND itemuomconv_to_uom_id=_uomidTo) OR (itemuomconv_from_uom_id=_uomidTo AND itemuomconv_to_uom_id=_uomidFrom)) AND (itemuomconv_item_id=pItemid)); IF(FOUND) THEN IF(_conv.itemuomconv_from_uom_id=_uomidFrom) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; -- If we are converting to the item inv uom use the item fractional value -- otherwise use the conversion fractional value. if(_uomidTo = _uomidInv) THEN _frac := _item.item_fractional; ELSE _frac := _conv.itemuomconv_fractional; END IF; _value := roundLocale(_frac, ((_valueTo/_valueFrom) * pQtyFrom), pLocale); ELSE -- Try to convert the from uom to the inventory uom SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidFrom AND itemuomconv_to_uom_id=_uomidInv) OR (itemuomconv_from_uom_id=_uomidInv AND itemuomconv_to_uom_id=_uomidFrom)) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'A conversion for item_id % from uom_id % to inv_uom_id % was not found.', pItemid, _uomidFrom, _uomidInv; END IF; IF(_conv.itemuomconv_from_uom_id=_uomidInv) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := (_valueTo / _valueFrom); IF (_conv.itemuomconv_fractional OR _item.item_fractional) THEN _frac := TRUE; END IF; -- Try to convert the to uom to the inventory uom SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidInv AND itemuomconv_to_uom_id=_uomidTo) OR (itemuomconv_from_uom_id=_uomidTo AND itemuomconv_to_uom_id=_uomidInv)) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'A conversion for item_id % from uom_id % to inv_uom_id % was not found.', pItemid, _uomidTo, _uomidInv; END IF; IF(_conv.itemuomconv_from_uom_id=_uomidInv) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := _value * (_valueTo / _valueFrom); IF (_conv.itemuomconv_fractional OR _item.item_fractional) THEN _frac := TRUE; END IF; _value := roundLocale(_frac, (_value * pQtyFrom), pLocale); END IF; RETURN _value; END; $$; ALTER FUNCTION public.itemuomtouom(pitemid integer, puomidfrom integer, puomidto integer, pqtyfrom numeric, plocale text) OWNER TO admin; -- -- Name: itemuomtouomratio(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION itemuomtouomratio(pitemid integer, puomidfrom integer, puomidto integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _uomidFrom INTEGER; _uomidTo INTEGER; _uomidInv INTEGER; _valueFrom NUMERIC := 0.0; _valueTo NUMERIC := 0.0; _value NUMERIC := 0.0; _item RECORD; _conv RECORD; BEGIN SELECT item_inv_uom_id INTO _item FROM item WHERE(item_id=pItemid); IF(NOT FOUND) THEN RAISE EXCEPTION 'No item record was found for item id %', pItemid; END IF; _uomidFrom := COALESCE(pUomidFrom, _item.item_inv_uom_id); _uomidTo := COALESCE(pUomidTo, _item.item_inv_uom_id); _uomidInv := _item.item_inv_uom_id; IF(_uomidFrom = _uomidTo) THEN RETURN 1.0; END IF; -- Try a direct conversion SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidFrom AND itemuomconv_to_uom_id=_uomidTo) OR (itemuomconv_from_uom_id=_uomidTo AND itemuomconv_to_uom_id=_uomidFrom)) AND (itemuomconv_item_id=pItemid)); IF(FOUND) THEN IF(_conv.itemuomconv_from_uom_id=_uomidFrom) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := (_valueTo / _valueFrom); ELSE -- Try to convert the from uom to the inventory uom SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidFrom AND itemuomconv_to_uom_id=_uomidInv) OR (itemuomconv_from_uom_id=_uomidInv AND itemuomconv_to_uom_id=_uomidFrom)) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'A conversion for item_id % from uom_id % to inv_uom_id % was not found.', pItemid, _uomidFrom, _uomidInv; END IF; IF(_conv.itemuomconv_from_uom_id=_uomidInv) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := (_valueTo / _valueFrom); -- Try to convert the to uom to the inventory uom SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidInv AND itemuomconv_to_uom_id=_uomidTo) OR (itemuomconv_from_uom_id=_uomidTo AND itemuomconv_to_uom_id=_uomidInv)) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'A conversion for item_id % from uom_id % to inv_uom_id % was not found.', pItemid, _uomidTo, _uomidInv; END IF; IF(_conv.itemuomconv_from_uom_id=_uomidInv) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := _value * (_valueTo / _valueFrom); END IF; RETURN _value; END; $$; ALTER FUNCTION public.itemuomtouomratio(pitemid integer, puomidfrom integer, puomidto integer) OWNER TO admin; -- -- Name: last_agg(anyelement, anyelement); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION last_agg(anyelement, anyelement) RETURNS anyelement LANGUAGE sql STABLE AS $_$ SELECT $2; $_$; ALTER FUNCTION public.last_agg(anyelement, anyelement) OWNER TO admin; -- -- Name: login(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION login() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _p RECORD; BEGIN RETURN login(false); END; $$; ALTER FUNCTION public.login() OWNER TO admin; -- -- Name: login(boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION login(boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _setSearchPath ALIAS FOR $1; _p RECORD; BEGIN PERFORM pg_try_advisory_lock(datid::integer, procpid) FROM pg_stat_activity WHERE(procpid = pg_backend_pid()); -- This is new to version 9.0 and higher and will error on older versions IF (select CAST(split_part(split_part(version(), ' ', 2),'.',1) AS integer) >= 9) THEN SET bytea_output TO escape; END IF; -- this is temporary until either qt fixes the postgres driver or we find & -- fix all of the places in our app that can write strings with backslashes SET standard_conforming_strings TO false; SELECT usr_id, userCanLogin(usr_username) AS usr_active INTO _p FROM usr WHERE (usr_username=getEffectiveXtUser()); IF (NOT FOUND) THEN RETURN -1; ELSIF (NOT _p.usr_active) THEN IF(SELECT metric_value='AdminOnly' FROM metric WHERE metric_name='AllowedUserLogins') THEN RETURN -3; END IF; RETURN -2; END IF; IF (_setSearchPath) THEN IF EXISTS(SELECT 1 FROM pg_proc JOIN pg_namespace ON (pronamespace=pg_namespace.oid) WHERE nspname='public' AND proname='buildsearchpath') THEN EXECUTE 'SET SEARCH_PATH TO ' || public.buildSearchPath(); END IF; END IF; RETURN 1; END; $_$; ALTER FUNCTION public.login(boolean) OWNER TO admin; -- -- Name: logout(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION logout() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN PERFORM pg_advisory_unlock(datid::integer, procpid) FROM pg_stat_activity WHERE(procpid = pg_backend_pid()); RETURN 0; END; $$; ALTER FUNCTION public.logout() OWNER TO admin; -- -- Name: lowercost(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION lowercost(integer, text) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCosttype ALIAS FOR $2; BEGIN RETURN lowerCost(pItemid, pCosttype, TRUE); END; $_$; ALTER FUNCTION public.lowercost(integer, text) OWNER TO admin; -- -- Name: lowercost(integer, text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION lowercost(integer, text, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCosttype ALIAS FOR $2; pActual ALIAS FOR $3; _type CHAR(1); _actCost NUMERIC; _actCost1 NUMERIC; _actCost2 NUMERIC; _stdCost NUMERIC; _stdCost1 NUMERIC; _stdCost2 NUMERIC; _cost NUMERIC; _cost1 NUMERIC; _cost2 NUMERIC; _batchsize NUMERIC; BEGIN SELECT item_type INTO _type FROM item WHERE (item_id=pItemid); _batchsize := COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=getActiveRevId('BOM',pItemId))) LIMIT 1), 1); -- find the lowercost in the base currency at the current conversion rate IF (_type IN ('M', 'F', 'B', 'T')) THEN IF (pActual) THEN SELECT SUM( CASE WHEN (bomitemcost_id IS NOT NULL AND bc.costelem_id IS NOT NULL) THEN round(currToBase(bomitemcost_curr_id, bomitemcost_actcost, CURRENT_DATE),6) * itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') ELSE round(currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE),6) * itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') END ) INTO _cost FROM bomitem(pItemid) JOIN item ON (item_id=bomitem_item_id AND item_type <> 'T') JOIN itemcost ON (itemcost_item_id=bomitem_item_id) JOIN costelem ic ON (ic.costelem_id=itemcost_costelem_id AND ic.costelem_type=pCosttype) LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=bomitem_id) LEFT OUTER JOIN costelem bc ON (bc.costelem_id=bomitemcost_costelem_id AND bc.costelem_type=pCosttype) WHERE ( CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1) ); ELSE SELECT SUM( CASE WHEN (bomitemcost_id IS NOT NULL AND bc.costelem_id IS NOT NULL) THEN bomitemcost_stdcost * itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') ELSE itemcost_stdcost * itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') END ) INTO _cost FROM bomitem(pItemid) JOIN item ON (item_id=bomitem_item_id AND item_type <> 'T') JOIN itemcost ON (itemcost_item_id=bomitem_item_id) JOIN costelem ON (costelem_id=itemcost_costelem_id AND costelem_type=pCosttype) LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=bomitem_id) LEFT OUTER JOIN costelem bc ON (bc.costelem_id=bomitemcost_costelem_id AND bc.costelem_type=pCosttype) WHERE ( CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1) ); END IF; IF (NOT FOUND) THEN _cost := NULL; END IF; ELSIF (_type IN ('C')) THEN SELECT SUM(CASE WHEN (bbomitem_qtyper = 0) THEN 0 ELSE currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) / bbomitem_qtyper * bbomitem_costabsorb END), SUM(CASE WHEN (bbomitem_qtyper = 0) THEN 0 ELSE itemcost_stdcost / bbomitem_qtyper * bbomitem_costabsorb END) INTO _actCost1, _stdCost1 FROM itemcost JOIN costelem ON (itemcost_costelem_id=costelem_id) JOIN xtmfg.bbomitem ON (bbomitem_parent_item_id=itemcost_item_id) WHERE ( (bbomitem_item_id=pItemid) AND (CURRENT_DATE BETWEEN bbomitem_effective AND (bbomitem_expires - 1)) AND (costelem_type=pCosttype) ); SELECT SUM(CASE WHEN (t.bbomitem_qtyper = 0) THEN 0 ELSE currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) * s.bbomitem_qtyper / t.bbomitem_qtyper * t.bbomitem_costabsorb END), SUM(CASE WHEN (t.bbomitem_qtyper = 0) THEN 0 ELSE itemcost_stdcost * s.bbomitem_qtyper / t.bbomitem_qtyper * t.bbomitem_costabsorb END) INTO _actCost2, _stdCost2 FROM costelem JOIN itemcost ON (costelem_id=itemcost_costelem_id) JOIN xtmfg.bbomitem AS s ON (itemcost_item_id=s.bbomitem_item_id) JOIN xtmfg.bbomitem AS t ON (s.bbomitem_parent_item_id=t.bbomitem_parent_item_id) JOIN item ON (s.bbomitem_item_id=item_id) WHERE ( (t.bbomitem_item_id=pItemid) AND ( CURRENT_DATE BETWEEN s.bbomitem_effective AND (s.bbomitem_expires - 1) ) AND ( CURRENT_DATE BETWEEN t.bbomitem_effective AND (t.bbomitem_expires - 1) ) AND (item_type='Y') AND (costelem_type=pCosttype) ); IF (pActual) THEN _cost = _actCost; _cost1 = _actCost1; _cost2 = _actCost2; ELSE _cost = _stdCost; _cost1 = _stdCost1; _cost2 = _stdCost2; -- should this be std or act? END IF; IF (_cost1 IS NULL AND _cost2 IS NULL) THEN _cost = NULL; ELSE _cost = COALESCE(_cost1, 0) + COALESCE(_cost2, 0); END IF; ELSE RETURN NULL; END IF; RETURN round(_cost,6); END; $_$; ALTER FUNCTION public.lowercost(integer, text, boolean) OWNER TO admin; -- -- Name: maintainbomworkspace(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION maintainbomworkspace() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _test TEXT; BEGIN SELECT tablename INTO _test FROM pg_tables WHERE (tablename='bomwork'); IF (NOT FOUND) THEN CREATE TEMPORARY TABLE bomwork ( bomwork_id INTEGER, bomwork_set_id INTEGER, bomwork_parent_id INTEGER, bomwork_seqnumber INTEGER, bomwork_parent_seqnumber INTEGER, bomwork_item_id INTEGER, bomwork_item_type CHARACTER(1), bomwork_status CHARACTER(1), bomwork_qtyper NUMERIC(20, 8), bomwork_scrap NUMERIC(20, 10), bomwork_level INTEGER, bomwork_effective DATE, bomwork_expires DATE, bomwork_stdunitcost NUMERIC(16, 4), bomwork_actunitcost NUMERIC(16, 4), bomwork_createwo BOOLEAN, bomwork_issuemethod CHARACTER(1) ); CREATE INDEX bomwork_set_id_idx ON bomwork(bomwork_set_id); END IF; RETURN 1; END; $$; ALTER FUNCTION public.maintainbomworkspace() OWNER TO admin; -- -- Name: markapcheckasposted(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION markapcheckasposted(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'markAPCheckAsPosted() is deprecated - use markCheckAsPosted() instead'; RETURN markCheckAsPosted($1); END; $_$; ALTER FUNCTION public.markapcheckasposted(integer) OWNER TO admin; -- -- Name: markapcheckasprinted(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION markapcheckasprinted(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'markAPCheckAsPrinted() is deprecated - use markCheckAsPrinted()'; RETURN markCheckAsPrinted($1); END; $_$; ALTER FUNCTION public.markapcheckasprinted(integer) OWNER TO admin; -- -- Name: markcheckasposted(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION markcheckasposted(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; BEGIN UPDATE checkhead SET checkhead_posted=TRUE WHERE (checkhead_id=pCheckid); RETURN 1; END; $_$; ALTER FUNCTION public.markcheckasposted(integer) OWNER TO admin; -- -- Name: markcheckasprinted(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION markcheckasprinted(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; BEGIN UPDATE checkhead SET checkhead_printed=TRUE WHERE (checkhead_id=pCheckid); RETURN 1; END; $_$; ALTER FUNCTION public.markcheckasprinted(integer) OWNER TO admin; -- -- Name: massexpirebomitem(integer, date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION massexpirebomitem(integer, date, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pExpireDate ALIAS FOR $2; pECN ALIAS FOR $3; BEGIN UPDATE bomitem SET bomitem_expires=pExpireDate WHERE ( (bomitem_expires >= CURRENT_DATE) AND (bomitem_item_id=pItemid) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.massexpirebomitem(integer, date, text) OWNER TO admin; -- -- Name: massreplacebomitem(integer, integer, date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION massreplacebomitem(integer, integer, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNewItemid ALIAS FOR $1; pOriginalItemid ALIAS FOR $2; pEffectiveDate ALIAS FOR $3; pECN ALIAS FOR $4; _effectiveDate DATE; _result INTEGER; BEGIN _effectiveDate := COALESCE(pEffectiveDate, CURRENT_DATE); IF (BOMContains(pOriginalItemid, pNewItemid) OR BOMContains(pNewItemid, pOriginalItemid)) THEN RETURN -1; END IF; INSERT INTO bomitem ( bomitem_parent_item_id, bomitem_seqnumber, bomitem_item_id, bomitem_qtyfxd, bomitem_qtyper, bomitem_uom_id, bomitem_scrap, bomitem_effective, bomitem_expires, bomitem_ecn, bomitem_createwo, bomitem_issuemethod, bomitem_subtype, bomitem_booitem_seq_id, bomitem_schedatwooper, bomitem_moddate, bomitem_rev_id, bomitem_char_id, bomitem_value ) SELECT bomitem_parent_item_id, bomitem_seqnumber, pNewItemid, bomitem_qtyfxd, bomitem_qtyper, bomitem_uom_id, bomitem_scrap, _effectiveDate, endOfTime(), pECN, bomitem_createwo, bomitem_issuemethod, 'I', bomitem_booitem_seq_id, bomitem_schedatwooper, CURRENT_DATE, getActiveRevId('BOM',bomitem_parent_item_id), bomitem_char_id, bomitem_value FROM bomitem WHERE ( (_effectiveDate < bomitem_expires) AND (bomitem_item_id=pOriginalItemid) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) ); UPDATE bomitem SET bomitem_expires=_effectiveDate WHERE ( (_effectiveDate < bomitem_expires) AND (bomitem_item_id=pOriginalItemid) AND (bomitem_rev_id=getActiveRevid('BOM',bomitem_parent_item_id)) ); RETURN 1; END; $_$; ALTER FUNCTION public.massreplacebomitem(integer, integer, date, text) OWNER TO admin; -- -- Name: merge2crmaccts(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION merge2crmaccts(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceId ALIAS FOR $1; pTargetId ALIAS FOR $2; _purge BOOLEAN := COALESCE($3, FALSE); _coldesc RECORD; _count INTEGER := 0; _hassubtype BOOLEAN; _mrgcol BOOLEAN; _result INTEGER := 0; _sel RECORD; _colname TEXT; _tmpid INTEGER; BEGIN -- Validate IF (pSourceId = pTargetId) THEN RAISE NOTICE 'Tried to merge a CRM Account with itself: %.', pSourceId; RETURN 0; ELSIF (pSourceId IS NULL) THEN RAISE EXCEPTION 'Merge source id cannot be null [xtuple: merge, -1]'; ELSIF NOT(EXISTS(SELECT 1 FROM crmacct WHERE crmacct_id=pSourceId)) THEN RAISE EXCEPTION 'Merge source % not found [xtuple: merge, -2, %]', pSourceId, pSourceId; ELSIF (pTargetId IS NULL) THEN RAISE EXCEPTION 'Merge target id cannot be null [xtuple: merge, -3]'; ELSIF NOT(EXISTS(SELECT 1 FROM crmacct WHERE crmacct_id=pTargetId)) THEN RAISE EXCEPTION 'Merge target % not found [xtuple: merge, -4, %]', pTargetId, pTargetId; ELSIF NOT(EXISTS(SELECT 1 FROM crmacctsel WHERE (crmacctsel_src_crmacct_id=pSourceId) AND (crmacctsel_dest_crmacct_id=pTargetId))) THEN RAISE EXCEPTION 'Source % and target % have not been selected for merging [xtuple: merge, -5, %, %]', pSourceId, pTargetId, pSourceId, pTargetId; END IF; _result:= changeFkeyPointers('public', 'crmacct', pSourceId, pTargetId, ARRAY[ 'crmacctsel', 'crmacctmrgd' ], _purge) + changePseudoFKeyPointers('public', 'alarm', 'alarm_source_id', pSourceId, 'public', 'crmacct', pTargetId, 'alarm_source', 'CRMA', _purge) + changePseudoFKeyPointers('public', 'charass', 'charass_target_id', pSourceId, 'public', 'crmacct', pTargetId, 'charass_target_type', 'CRMACCT', _purge) + changePseudoFKeyPointers('public', 'comment', 'comment_source_id', pSourceId, 'public', 'crmacct', pTargetId, 'comment_source', 'CRMA', _purge) + changePseudoFKeyPointers('public', 'docass', 'docass_source_id', pSourceId, 'public', 'crmacct', pTargetId, 'docass_source_type', 'CRMA', _purge) + changePseudoFKeyPointers('public', 'docass', 'docass_target_id', pSourceId, 'public', 'crmacct', pTargetId, 'docass_target_type', 'CRMA', _purge) + changePseudoFKeyPointers('public', 'imageass', 'imageass_source_id', pSourceId, 'public', 'crmacct', pTargetId, 'imageass_source', 'CRMA', _purge) ; -- TODO: find a generic way to handle pseudofkeys in packages - see 9401 IF (fetchMetricBool('EnableBatchManager') AND packageIsEnabled('xtbatch')) THEN _result:= _result + changePseudoFKeyPointers('xtbatch', 'emlassc', 'emlassc_assc_id', pSourceId, 'public', 'crmacct', pTargetId, 'emlassc_type', 'CRMA', _purge); END IF; -- back up all of the values in the target record that are about to be changed FOR _coldesc IN SELECT attname, typname FROM pg_attribute JOIN pg_type ON (atttypid=pg_type.oid) JOIN pg_class ON (attrelid=pg_class.oid) JOIN pg_namespace ON (relnamespace=pg_namespace.oid) WHERE (attnum >= 0) AND (relname='crmacct') AND (nspname='public') AND (attname NOT IN ('crmacct_id', 'crmacct_number')) LOOP -- if we're supposed to merge this column at all EXECUTE 'SELECT ' || quote_ident('crmacctsel_mrg_' || _coldesc.attname) || ' FROM crmacctsel WHERE ((crmacctsel_src_crmacct_id=' || pSourceId || ') AND (crmacctsel_dest_crmacct_id=' || pTargetId || '))' INTO _mrgcol; IF (_mrgcol) THEN _colname := REPLACE(_coldesc.attname, 'crmacctsel_mrg_', ''); -- optionally back up the old value from the destination -- we'll back up the old value from the source further down IF (NOT _purge) THEN BEGIN EXECUTE 'INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT ''public'', ''crmacct'', ''crmacct_id'', crmacct_id, ' || quote_literal(_colname) || ', ' || quote_ident(_colname) || ', ' || quote_literal(_coldesc.typname) || ', ''public'', ''crmacct'', crmacct_id FROM crmacct WHERE (crmacct_id=' || pTargetId || ');' ; EXCEPTION WHEN unique_violation THEN RAISE EXCEPTION 'Could not make a backup copy of % when merging % into % [xtuple: merge, -8, %, %, public, crmacct, %]', _colname, pSourceId, pTargetId, _colname, pSourceId, pTargetId; END; END IF; -- TODO: what do we do about users? /* update the destination crmacct in one of 3 different ways: - crmacct_notes might be concatenated from more than one source record - foreign keys to crm account subtype records (e.g. crmacct_cust_id) must not leave orphaned records and must avoid uniqueness violations - some fields can simply be updated in place */ IF (_colname = 'crmacct_notes') THEN EXECUTE 'UPDATE crmacct dest SET ' || quote_ident(_colname) || '=dest.' || quote_ident(_colname) || E' || E''\\n'' || src.' || _colname || ' FROM crmacct src JOIN crmacctsel ON (src.crmacct_id=crmacctsel_src_crmacct_id) WHERE ((dest.crmacct_id=crmacctsel_dest_crmacct_id) AND (dest.crmacct_id!=crmacctsel_src_crmacct_id));'; ELSIF (_colname IN ('crmacct_cust_id', 'crmacct_prospect_id', 'crmacct_vend_id', 'crmacct_taxauth_id', 'crmacct_emp_id', 'crmacct_salesrep_id')) THEN IF (_colname IN ('crmacct_cust_id', 'crmacct_prospect_id')) THEN EXECUTE 'SELECT src.' || quote_ident(_colname) || ' IS NOT NULL AND (dest.crmacct_prospect_id IS NOT NULL OR dest.crmacct_cust_id IS NOT NULL) FROM crmacct src JOIN crmacctsel ON (src.crmacct_id=crmacctsel_src_crmacct_id) JOIN crmacct dest ON (crmacctsel_dest_crmacct_id=dest.crmacct_id) WHERE ((src.crmacct_id=' || pSourceId || ') AND (dest.crmacct_id=' || pTargetId || '))' INTO _hassubtype; IF (_hassubtype) THEN RAISE EXCEPTION 'Cannot merge two CRM Accounts that both refer to Customers and/or Prospects [xtuple: merge, -6, %, %]', pSourceId, pTargetId; END IF; ELSE EXECUTE 'SELECT src.' || quote_ident(_colname) || ' IS NOT NULL AND dest.'|| quote_ident(_colname) || ' IS NOT NULL FROM crmacct src JOIN crmacctsel ON (src.crmacct_id=crmacctsel_src_crmacct_id) JOIN crmacct dest ON (crmacctsel_dest_crmacct_id=dest.crmacct_id) WHERE ((src.crmacct_id=' || pSourceId || ') AND (dest.crmacct_id=' || pTargetId || '))' INTO _hassubtype; IF (_hassubtype) THEN RAISE EXCEPTION 'Cannot merge CRM Accounts until the % child records have been merged [xtuple: merge, -7, %, %, %]', _colname, _colname, pSourceId, pTargetId; END IF; END IF; /* clearing the source separately from setting the target avoids problems with triggers updating the wrong records */ EXECUTE 'SELECT ' || quote_ident(_colname) || ' FROM crmacct WHERE crmacct_id=' || pSourceId INTO _tmpid; -- now we have the data to back up the source IF (NOT _purge) THEN BEGIN EXECUTE 'INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT ''public'', ''crmacct'', ''crmacct_id'', crmacct_id, ' || quote_literal(_colname) || ', ' || quote_ident(_colname) || ', ' || quote_literal(_coldesc.typname) || ', ''public'', ''crmacct'', ' || pTargetId || ' FROM crmacct WHERE (crmacct_id=' || pSourceId || ');' ; EXCEPTION WHEN unique_violation THEN RAISE EXCEPTION 'Could not make a backup copy of % when merging % into % [xtuple: merge, -8, %, %, public, crmacct, %]', _colname, pSourceId, pTargetId, _colname, pSourceId, pTargetId; END; END IF; EXECUTE 'UPDATE crmacct SET ' || quote_ident(_colname) || '=NULL WHERE (crmacct_id=' || pSourceId || ');'; EXECUTE 'UPDATE crmacct SET ' || quote_ident(_colname) || '=' || quote_literal(_tmpid) || ' WHERE (crmacct_id=' || pTargetId || ');'; ELSE EXECUTE 'UPDATE crmacct dest SET ' || quote_ident(_colname) || ' =src.' || quote_ident(_colname) || ' FROM crmacct src WHERE ((dest.crmacct_id=' || pTargetId || ') AND (src.crmacct_id=' || pSourceId || '));'; END IF; GET DIAGNOSTICS _count = ROW_COUNT; _result := _result + _count; END IF; END LOOP; IF (_purge) THEN DELETE FROM crmacct WHERE crmacct = pSourceId; ELSE INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT 'public', 'crmacct', 'crmacct_id', pSourceId, 'crmacct_active', crmacct_active, 'bool', 'public', 'crmacct', pTargetId FROM crmacct WHERE crmacct_active AND (crmacct_id = pSourceId); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count > 0) THEN _result := _result + _count; UPDATE crmacct SET crmacct_active = false WHERE (crmacct_id=pSourceId); END IF; -- make a special record of the source crm account so we can delete it later INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) VALUES ( 'public', 'crmacct', 'crmacct_id', pSourceId, NULL, NULL, NULL, 'public', 'crmacct', pTargetId); END IF; DELETE FROM crmacctsel WHERE (crmacctsel_src_crmacct_id=pSourceId); RETURN _result; END; $_$; ALTER FUNCTION public.merge2crmaccts(integer, integer, boolean) OWNER TO admin; -- -- Name: FUNCTION merge2crmaccts(integer, integer, boolean); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION merge2crmaccts(integer, integer, boolean) IS 'This function merges two crmacct records as decribed in crmacctsel records. For each field in the crmacctsel record marked TRUE, the data are copied from the crmacct record with crmacct_id=pSourceId to the record with crmacct_id=pTargetId. If the purge argument is TRUE, the source record is deleted. If it is FALSE, then mrgundo records are created so the merge can later be undone.'; -- -- Name: mergecrmaccts(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION mergecrmaccts(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetId ALIAS FOR $1; _purge BOOLEAN := COALESCE($2, FALSE); _retval INTEGER; BEGIN /* if crmacctsel says the target should not keep its original notes, clear them. notes are special because the merge allows concatenating them from multiple sources. this needs to be kept in sync with merge2crmaccts' similar check. */ IF NOT (SELECT crmacctsel_mrg_crmacct_notes FROM crmacctsel WHERE crmacctsel_src_crmacct_id=crmacctsel_dest_crmacct_id AND crmacctsel_dest_crmacct_id=pTargetId) THEN IF (NOT _purge) THEN INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id) SELECT 'public', 'crmacct', crmacct_id, 'public', 'crmacct', 'crmacct_id', crmacct_id, 'crmacct_notes', crmacct_notes, 'text', 'public', 'crmacct', crmacct_id FROM crmacct WHERE (crmacct_id=pTargetId); END IF; UPDATE crmacct SET crmacct_notes = '' WHERE (crmacct_id=pTargetId); END IF; -- merge the data from the various source records SELECT SUM(merge2crmaccts(crmacctsel_src_crmacct_id, pTargetId, _purge)) INTO _retval FROM crmacctsel WHERE ((crmacctsel_dest_crmacct_id=pTargetId) AND (crmacctsel_dest_crmacct_id!=crmacctsel_src_crmacct_id)); DELETE FROM crmacctsel WHERE crmacctsel_dest_crmacct_id=pTargetId; RETURN COALESCE(_retval, 0); END; $_$; ALTER FUNCTION public.mergecrmaccts(integer, boolean) OWNER TO admin; -- -- Name: FUNCTION mergecrmaccts(integer, boolean); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION mergecrmaccts(integer, boolean) IS 'This function uses the crmacctsel table to merge multiple crmacct records together. Only the merges into the specified target account are performed. Most of the work is done by repeated calls to the merge2crmaccts function. If the purge argument is FALSE, data are kept to allow reversing the merge.'; -- -- Name: movebomitemdown(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION movebomitemdown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; _nextBomitem RECORD; BEGIN SELECT nextbomitem.bomitem_seqnumber AS next_seqnumber, thisbomitem.bomitem_seqnumber AS this_seqnumber, thisbomitem.bomitem_parent_item_id AS parent_item_id, thisbomitem.bomitem_rev_id AS rev_id INTO _nextBomitem FROM bomitem AS nextbomitem, bomitem AS thisbomitem WHERE ((nextbomitem.bomitem_seqnumber > thisbomitem.bomitem_seqnumber) AND (nextbomitem.bomitem_parent_item_id=thisbomitem.bomitem_parent_item_id) AND (nextbomitem.bomitem_rev_id=thisbomitem.bomitem_rev_id) AND (thisbomitem.bomitem_id=pBomitemid)) ORDER BY next_seqnumber LIMIT 1; IF (FOUND) THEN -- Swap the seqnumber of the current bomitem and the next bomitem -- There is the potential for multiple bomitems with the same seqnumber UPDATE bomitem SET bomitem_seqnumber=0 WHERE (bomitem_seqnumber=_nextBomitem.next_seqnumber) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); UPDATE bomitem SET bomitem_seqnumber=_nextBomitem.next_seqnumber WHERE (bomitem_seqnumber=_nextBomitem.this_seqnumber) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); UPDATE bomitem SET bomitem_seqnumber=_nextBomitem.this_seqnumber WHERE (bomitem_seqnumber=0) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.movebomitemdown(integer) OWNER TO admin; -- -- Name: movebomitemup(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION movebomitemup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; _nextBomitem RECORD; BEGIN SELECT nextbomitem.bomitem_seqnumber AS next_seqnumber, thisbomitem.bomitem_seqnumber AS this_seqnumber, thisbomitem.bomitem_parent_item_id AS parent_item_id, thisbomitem.bomitem_rev_id AS rev_id INTO _nextBomitem FROM bomitem AS nextbomitem, bomitem AS thisbomitem WHERE ((nextbomitem.bomitem_seqnumber < thisbomitem.bomitem_seqnumber) AND (nextbomitem.bomitem_parent_item_id=thisbomitem.bomitem_parent_item_id) AND (nextbomitem.bomitem_rev_id=thisbomitem.bomitem_rev_id) AND (thisbomitem.bomitem_id=pBomitemid)) ORDER BY next_seqnumber DESC LIMIT 1; IF (FOUND) THEN -- Swap the seqnumber of the current bomitem and the next bomitem -- There is the potential for multiple bomitems with the same seqnumber UPDATE bomitem SET bomitem_seqnumber=0 WHERE (bomitem_seqnumber=_nextBomitem.next_seqnumber) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); UPDATE bomitem SET bomitem_seqnumber=_nextBomitem.next_seqnumber WHERE (bomitem_seqnumber=_nextBomitem.this_seqnumber) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); UPDATE bomitem SET bomitem_seqnumber=_nextBomitem.this_seqnumber WHERE (bomitem_seqnumber=0) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.movebomitemup(integer) OWNER TO admin; -- -- Name: moveccarddown(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveccarddown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardid ALIAS FOR $1; _nextCcard RECORD; BEGIN SELECT nextCcard.ccard_id, nextCcard.ccard_seq AS next_seqnumber, thisCcard.ccard_seq AS this_seqnumber INTO _nextCcard FROM Ccard AS nextCcard, Ccard AS thisCcard WHERE ((nextCcard.ccard_seq > thisCcard.ccard_seq) AND (nextCcard.ccard_cust_id=thisCcard.ccard_cust_id) AND (thisCcard.ccard_id=pCcardid)) ORDER BY next_seqnumber LIMIT 1; IF (FOUND) THEN -- Swap the seqnumber of the current Ccard and the next Ccard UPDATE Ccard SET ccard_seq=_nextCcard.next_seqnumber WHERE (ccard_id=pCcardid); UPDATE Ccard SET ccard_seq=_nextCcard.this_seqnumber WHERE (ccard_id=_nextCcard.ccard_id); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.moveccarddown(integer) OWNER TO admin; -- -- Name: moveccardup(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveccardup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardid ALIAS FOR $1; _nextCcard RECORD; BEGIN SELECT nextCcard.ccard_id AS ccard_id, nextCcard.ccard_seq AS next_seqnumber, thisCcard.ccard_seq AS this_seqnumber INTO _nextCcard FROM ccard AS nextCcard, ccard AS thisCcard WHERE ((nextCcard.ccard_seq < thisCcard.ccard_seq) AND (nextCcard.ccard_cust_id=thisCcard.ccard_cust_id) AND (thisCcard.ccard_id=pCcardid)) ORDER BY next_seqnumber DESC LIMIT 1; IF (FOUND) THEN -- Swap the seqnumber of the current Ccard and the next Ccard UPDATE Ccard SET ccard_seq=_nextCcard.next_seqnumber WHERE (ccard_id=pCcardid); UPDATE Ccard SET ccard_seq=_nextCcard.this_seqnumber WHERE (ccard_id=_nextCcard.ccard_id); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.moveccardup(integer) OWNER TO admin; -- -- Name: moveflgroupdown(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveflgroupdown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlgrpid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flgrp_id AS id, flgrp_flhead_id AS flhead_id, flgrp_flgrp_id AS flgrp_id, flgrp_order AS ord INTO _from FROM flgrp WHERE (flgrp_id=pFlgrpid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord > _from.ord) ORDER BY ord LIMIT 1; IF (FOUND) THEN UPDATE flgrp SET flgrp_order=_to.ord WHERE (flgrp_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.moveflgroupdown(integer) OWNER TO admin; -- -- Name: moveflgroupup(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveflgroupup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlgrpid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flgrp_id AS id, flgrp_flhead_id AS flhead_id, flgrp_flgrp_id AS flgrp_id, flgrp_order AS ord INTO _from FROM flgrp WHERE (flgrp_id=pFlgrpid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord < _from.ord) ORDER BY ord DESC LIMIT 1; IF (FOUND) THEN UPDATE flgrp SET flgrp_order=_to.ord WHERE (flgrp_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.moveflgroupup(integer) OWNER TO admin; -- -- Name: moveflitemdown(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveflitemdown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlitemid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flitem_id AS id, flitem_flhead_id AS flhead_id, flitem_flgrp_id AS flgrp_id, flitem_order AS ord INTO _from FROM flitem WHERE (flitem_id=pFlitemid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord > _from.ord) ORDER BY ord LIMIT 1; IF (FOUND) THEN UPDATE flitem SET flitem_order=_to.ord WHERE (flitem_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.moveflitemdown(integer) OWNER TO admin; -- -- Name: moveflitemup(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveflitemup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlitemid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flitem_id AS id, flitem_flhead_id AS flhead_id, flitem_flgrp_id AS flgrp_id, flitem_order AS ord INTO _from FROM flitem WHERE (flitem_id=pFlitemid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord < _from.ord) ORDER BY ord DESC LIMIT 1; IF (FOUND) THEN UPDATE flitem SET flitem_order=_to.ord WHERE (flitem_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.moveflitemup(integer) OWNER TO admin; -- -- Name: moveflspecdown(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveflspecdown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlspecid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flspec_id AS id, flspec_flhead_id AS flhead_id, flspec_flgrp_id AS flgrp_id, flspec_order AS ord INTO _from FROM flspec WHERE (flspec_id=pFlspecid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord > _from.ord) ORDER BY ord LIMIT 1; IF (FOUND) THEN UPDATE flspec SET flspec_order=_to.ord WHERE (flspec_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.moveflspecdown(integer) OWNER TO admin; -- -- Name: moveflspecup(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveflspecup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlspecid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flspec_id AS id, flspec_flhead_id AS flhead_id, flspec_flgrp_id AS flgrp_id, flspec_order AS ord INTO _from FROM flspec WHERE (flspec_id=pFlspecid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord < _from.ord) ORDER BY ord DESC LIMIT 1; IF (FOUND) THEN UPDATE flspec SET flspec_order=_to.ord WHERE (flspec_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.moveflspecup(integer) OWNER TO admin; -- -- Name: movescript(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION movescript(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pscriptid ALIAS FOR $1; poldpkgid ALIAS FOR $2; pnewpkgid ALIAS FOR $3; _deletestr TEXT; _destination TEXT; _insertstr TEXT; _rows INTEGER; _selectstr TEXT; _source TEXT; _record RECORD; BEGIN IF (poldpkgid = pnewpkgid) THEN RETURN 0; END IF; IF (poldpkgid = -1) THEN _source = 'public.script'; ELSE SELECT pkghead_name || '.pkgscript' INTO _source FROM pkghead WHERE pkghead_id=poldpkgid; IF NOT FOUND THEN RETURN -1; END IF; END IF; IF (pnewpkgid = -1) THEN _destination = 'public.script'; ELSE SELECT pkghead_name || '.pkgscript' INTO _destination FROM pkghead WHERE pkghead_id=pnewpkgid; IF NOT FOUND THEN RETURN -2; END IF; END IF; _selectstr := ' SELECT * FROM ' || _source || ' WHERE script_id = ' || pscriptid; EXECUTE _selectstr INTO _record; _deletestr := 'DELETE FROM ONLY ' || _source || ' WHERE script_id = ' || pscriptid; EXECUTE _deletestr; GET DIAGNOSTICS _rows = ROW_COUNT; RAISE NOTICE '% rows from %', _rows, _deletestr; IF (_rows < 1) THEN RETURN -3; ELSIF (_rows > 1) THEN RAISE EXCEPTION 'Tried to delete % scripts with the id % when there should be exactly 1', _rows, pscriptid; END IF; _insertstr := 'INSERT INTO ' || _destination || ' (script_id, script_name, script_order, script_enabled, ' || ' script_source, script_notes) VALUES (' || _record.script_id || ',' || quote_literal(_record.script_name) || ',' || _record.script_order || ',' || _record.script_enabled || ',' || quote_literal(_record.script_source) || ',' || quote_literal(_record.script_notes ) || ');' ; EXECUTE _insertstr; GET DIAGNOSTICS _rows = ROW_COUNT; RAISE NOTICE '% rows from %', _rows, _insertstr; IF (_rows < 1) THEN RETURN -4; ELSIF (_rows > 1) THEN RAISE EXCEPTION 'Tried to insert % scripts with the id % when there should be exactly 1', _rows, pscriptid; END IF; RETURN pscriptid; END; $_$; ALTER FUNCTION public.movescript(integer, integer, integer) OWNER TO admin; -- -- Name: moveuiform(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveuiform(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE puiformid ALIAS FOR $1; poldpkgid ALIAS FOR $2; pnewpkgid ALIAS FOR $3; _deletestr TEXT; _destination TEXT; _insertstr TEXT; _rows INTEGER; _selectstr TEXT; _source TEXT; _record RECORD; BEGIN IF (poldpkgid = pnewpkgid) THEN RETURN 0; END IF; IF (poldpkgid = -1) THEN _source = 'public.uiform'; ELSE SELECT pkghead_name || '.pkguiform' INTO _source FROM pkghead WHERE pkghead_id=poldpkgid; IF NOT FOUND THEN RETURN -1; END IF; END IF; IF (pnewpkgid = -1) THEN _destination = 'public.uiform'; ELSE SELECT pkghead_name || '.pkguiform' INTO _destination FROM pkghead WHERE pkghead_id=pnewpkgid; IF NOT FOUND THEN RETURN -2; END IF; END IF; _selectstr := ' SELECT * FROM ' || _source || ' WHERE uiform_id = ' || puiformid; EXECUTE _selectstr INTO _record; _deletestr := 'DELETE FROM ONLY ' || _source || ' WHERE uiform_id = ' || puiformid; EXECUTE _deletestr; GET DIAGNOSTICS _rows = ROW_COUNT; RAISE NOTICE '% rows from %', _rows, _deletestr; IF (_rows < 1) THEN RETURN -3; ELSIF (_rows > 1) THEN RAISE EXCEPTION 'Tried to delete % uiforms with the id % when there should be exactly 1', _rows, puiformid; END IF; _insertstr := 'INSERT INTO ' || _destination || ' (uiform_id, uiform_name, uiform_order, uiform_enabled, ' || ' uiform_source, uiform_notes) VALUES (' || _record.uiform_id || ',' || quote_literal(_record.uiform_name) || ',' || _record.uiform_order || ',' || _record.uiform_enabled || ',' || quote_literal(_record.uiform_source) || ',' || quote_literal(_record.uiform_notes ) || ');' ; EXECUTE _insertstr; GET DIAGNOSTICS _rows = ROW_COUNT; RAISE NOTICE '% rows from %', _rows, _insertstr; IF (_rows < 1) THEN RETURN -4; ELSIF (_rows > 1) THEN RAISE EXCEPTION 'Tried to insert % uiforms with the id % when there should be exactly 1', _rows, puiformid; END IF; RETURN puiformid; END; $_$; ALTER FUNCTION public.moveuiform(integer, integer, integer) OWNER TO admin; -- -- Name: moveupdown(integer, text, text, text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION moveupdown(pid integer, pschema text, ptable text, pseqcol text, pjoincol text, pextra text, pdir text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE _keyfield TEXT; _keysize INTEGER; _qry TEXT; _r RECORD; _rowcnt INTEGER; _schema TEXT := COALESCE(pSchema, 'public'); BEGIN RAISE DEBUG 'moveUpDown(%, %, %, %, %, %, %) entered', pId, pSchema, pTable, pSeqCol, pJoinCol, pExtra, pDir; IF (UPPER(pDir) NOT IN ('UP', 'DOWN')) THEN RAISE EXCEPTION 'Cannot change the order of records; unsure what % means for sequencing [xtuple: moveUpDown, -1, %, %.%]', pDir, pDir, _schema, pTable; END IF; SELECT attname, ARRAY_UPPER(conkey, 1) INTO _keyfield, _keysize FROM pg_attribute JOIN pg_constraint ON (attrelid=conrelid AND attnum=conkey[1]) JOIN pg_class ON (conrelid=pg_class.oid) JOIN pg_namespace ON (relnamespace=pg_namespace.oid) WHERE ((contype='p') AND (nspname=_schema) AND (relname=pTable)); RAISE DEBUG 'SELECT attname... returned %, %', _keyfield, _keysize; IF (_keysize > 1) THEN RAISE EXCEPTION 'Cannot change the order of records because %.% has a composite primary key [xtuple: moveUpDown, -2, %.%]', _schema, pTable, _schema, pTable; END IF; /* SELECT next._keyfield AS nextid, next.pSeqCol AS nextseq, this.pSeqCol AS thisseq FROM _schema.pTable AS next, _schema.pTable AS this WHERE (this._keyfield=$1) AND (next.pSeqCol [> or <] this.pSeqCol) [ AND (next.pJoinCol=this.pJoinCol) ] [ AND (pExtra) ] ORDER BY nextseq [ DESC or ASC ] LIMIT 1; */ _qry := 'SELECT next.' || quote_ident(_keyfield) || ' AS nextid, next.' || quote_ident(pSeqCol) || ' AS nextseq, this.' || quote_ident(pSeqCol) || ' AS thisseq FROM ' || _schema || '.' || quote_ident(pTable) || ' AS next, ' || _schema || '.' || quote_ident(pTable) || ' AS this WHERE ((this.' || quote_ident(_keyfield) || '=$1) AND (next.' || quote_ident(pSeqCol) || CASE pDir WHEN 'UP' THEN ' < ' ELSE ' > ' END || 'this.' || quote_ident(pSeqCol) || ')' || CASE WHEN pJoinCol IS NULL THEN '' ELSE ' AND (next.' || quote_ident(pJoinCol) || '=this.' || quote_ident(pJoinCol) || ')' END || ' AND (' || COALESCE(pExtra, 'TRUE') || ')) ORDER BY nextseq ' || CASE pDir WHEN 'UP' THEN 'DESC' ELSE 'ASC' END || ' LIMIT 1;'; RAISE DEBUG 'moveUpDown about to use % when running %', pId, _qry; EXECUTE _qry INTO _r USING pId; GET DIAGNOSTICS _rowcnt = ROW_COUNT; RAISE DEBUG 'next id %, next seq %, this id %, this seq %', _r.nextid, _r.nextseq, pId, _r.thisseq; IF (_rowcnt > 0) THEN _qry := 'UPDATE ' || _schema || '.' || quote_ident(pTable) || ' SET ' || pSeqCol || '=CAST($1 AS INTEGER) WHERE (' || quote_ident(_keyfield) || '=$2);'; EXECUTE _qry USING -1, _r.nextid; EXECUTE _qry USING _r.nextseq, pId; EXECUTE _qry USING _r.thisseq, _r.nextid; RETURN _r.nextid; END IF; RETURN pId; END; $_$; ALTER FUNCTION public.moveupdown(pid integer, pschema text, ptable text, pseqcol text, pjoincol text, pextra text, pdir text) OWNER TO admin; -- -- Name: FUNCTION moveupdown(pid integer, pschema text, ptable text, pseqcol text, pjoincol text, pextra text, pdir text); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION moveupdown(pid integer, pschema text, ptable text, pseqcol text, pjoincol text, pextra text, pdir text) IS 'moveUpDown moves a particular record up or down in an ordered list. pId argument names the record to move. pSchema (uses public if NULL) and pTable name the table holding the list. pSeqCol is the column that holds the sequence number. pJoinCol is the column that distinguishes one list from another in the same table, or NULL if the table holds only one list. pExtra is an extra join clause that may be required, or NULL. pDir is either UP, meaning move the pId record closer to the beginning, or DOWN. Returns the id of the record with which pId was swapped, or pId if the record was already at the end in the specified direction.'; -- -- Name: nextperiodbyinterval(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION nextperiodbyinterval(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; pInterval ALIAS FOR $2; _periodid INTEGER; BEGIN SELECT b.period_id INTO _periodid FROM period AS a, period AS b WHERE ((a.period_id=pPeriodid) AND (b.period_start >= a.period_start)) ORDER BY b.period_start LIMIT 1 OFFSET pInterval; IF (NOT FOUND) THEN RETURN -1; END IF; RETURN _periodid; END; $_$; ALTER FUNCTION public.nextperiodbyinterval(integer, integer) OWNER TO admin; -- -- Name: nextprsubnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION nextprsubnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrNumber ALIAS FOR $1; _subNumber INTEGER; BEGIN SELECT MAX(pr_subnumber) INTO _subNumber FROM pr WHERE (pr_number=pPrNumber); IF (_subNumber IS NULL) THEN _subNumber := 0; END IF; RETURN (_subNumber + 1); END; $_$; ALTER FUNCTION public.nextprsubnumber(integer) OWNER TO admin; -- -- Name: nextwosubnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION nextwosubnumber(integer) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT COALESCE((MAX(wo_subnumber) + 1), 1) FROM wo WHERE (wo_number=($1)); $_$; ALTER FUNCTION public.nextwosubnumber(integer) OWNER TO admin; -- -- Name: noneg(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION noneg(numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pValue ALIAS FOR $1; BEGIN IF (pValue < 0) THEN RETURN 0; ELSE RETURN pValue; END IF; END; $_$; ALTER FUNCTION public.noneg(numeric) OWNER TO admin; -- -- Name: nopos(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION nopos(numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pValue ALIAS FOR $1; BEGIN IF (pValue > 0) THEN RETURN 0; ELSE RETURN pValue; END IF; END; $_$; ALTER FUNCTION public.nopos(numeric) OWNER TO admin; -- -- Name: normalizetrialbal(integer, character); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION normalizetrialbal(integer, character) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTrialbalid ALIAS FOR $1; pSide ALIAS FOR $2; _value NUMERIC; _r RECORD; BEGIN SELECT accnt_type, trialbal_beginning, trialbal_ending INTO _r FROM trialbal, accnt WHERE ( (trialbal_accnt_id=accnt_id) AND (trialbal_id=pTrialbalid) ); IF (NOT FOUND) THEN RETURN -1; END IF; -- If we are looking for the Ending Balance, cache it IF (pSide = 'E') THEN _value = _r.trialbal_ending; -- We had better been looking for the Beginning Balance! ELSE _value = _r.trialbal_beginning; END IF; -- If the accnt_type is Asset or Expense, swap the sense IF (_r.accnt_type IN ('A', 'E')) THEN _value := (_value * -1); END IF; RETURN _value; END; $_$; ALTER FUNCTION public.normalizetrialbal(integer, character) OWNER TO admin; -- -- Name: numofdatabaseusers(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION numofdatabaseusers() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _count INTEGER; BEGIN SELECT count(*) INTO _count FROM pg_stat_activity, pg_locks WHERE((database=datid) AND (classid=datid) AND (objsubid=2) AND (procpid = pg_backend_pid())); IF (_count IS NULL) THEN _count := 0; END IF; RETURN _count; END; $$; ALTER FUNCTION public.numofdatabaseusers() OWNER TO admin; -- -- Name: numofserverusers(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION numofserverusers() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _count INTEGER; BEGIN SELECT COUNT(*) INTO _count FROM pg_stat_activity; IF (_count IS NULL) THEN _count := 0; END IF; RETURN _count; END; $$; ALTER FUNCTION public.numofserverusers() OWNER TO admin; -- -- Name: openaccountingperiod(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION openaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _r RECORD; BEGIN -- Check to make use that the period is closed IF ( ( SELECT (NOT period_closed) FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; IF ( ( SELECT (count(period_id) > 0) FROM period WHERE ((period_end > ( SELECT period_end FROM period WHERE (period_id=pPeriodId)) ) AND (period_closed)) ) ) THEN RETURN -3; END IF; -- Make sure the year is open IF ( ( SELECT (yearperiod_closed) FROM yearperiod JOIN period ON (period_yearperiod_id=yearperiod_id) WHERE (period_id=pPeriodid) ) ) THEN RETURN -4; END IF; -- Reset the period_closed flag UPDATE period SET period_closed=FALSE WHERE (period_id=pPeriodid); -- Post any unposted G/L Transactions into the new period FOR _r IN SELECT DISTINCT gltrans_sequence FROM gltrans, period WHERE ( (NOT gltrans_posted) AND (gltrans_date BETWEEN period_start AND period_end) AND (period_id=pPeriodid) ) LOOP PERFORM postIntoTrialBalance(_r.gltrans_sequence); END LOOP; RETURN pPeriodid; END; $_$; ALTER FUNCTION public.openaccountingperiod(integer) OWNER TO admin; -- -- Name: openaccountingyearperiod(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION openaccountingyearperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pYearPeriodId ALIAS FOR $1; _r RECORD; BEGIN -- Check to make use that the yearperiod is closed IF ( ( SELECT (NOT yearperiod_closed) FROM yearperiod WHERE (yearperiod_id=pYearPeriodId) ) ) THEN RETURN -1; END IF; IF ( ( SELECT (count(yearperiod_id) > 0) FROM yearperiod WHERE ((yearperiod_end> ( SELECT yearperiod_end FROM yearperiod WHERE (yearperiod_id=pYearPeriodId)) ) AND (yearperiod_closed)) ) ) THEN RETURN -2; END IF; -- Reset the yearperiod_closed flag UPDATE yearperiod SET yearperiod_closed=FALSE WHERE (yearperiod_id=pYearPeriodId); RETURN pYearPeriodid; END; $_$; ALTER FUNCTION public.openaccountingyearperiod(integer) OWNER TO admin; -- -- Name: openapitemsvalue(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION openapitemsvalue(pvendid integer, pperiodid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC; BEGIN SELECT SUM( (apopen_amount - apopen_paid) / apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END ) INTO _value FROM apopen WHERE ( (apopen_open) AND (apopen_vend_id=pVendid) AND (apopen_duedate BETWEEN findPeriodStart(pPeriodid) AND findPeriodEnd(pPeriodid)) ); RETURN COALESCE(_value, 0.0); END; $$; ALTER FUNCTION public.openapitemsvalue(pvendid integer, pperiodid integer) OWNER TO admin; -- -- Name: openaritemsvalue(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION openaritemsvalue(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT SUM( CASE WHEN (aropen_doctype IN ('C', 'R')) THEN ((aropen_amount - aropen_paid) * -1) ELSE (aropen_amount - aropen_paid) END ) INTO _value FROM aropen WHERE ( (aropen_open) AND (aropen_cust_id=pCustid) AND (aropen_duedate BETWEEN findPeriodStart(pPeriodid) AND findPeriodEnd(pPeriodid)) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.openaritemsvalue(integer, integer) OWNER TO admin; -- -- Name: openrecurringitems(integer, text, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION openrecurringitems(integer, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentid ALIAS FOR $1; pType TEXT := UPPER($2); pDatetime TIMESTAMP WITH TIME ZONE := COALESCE($3, CURRENT_TIMESTAMP); _count INTEGER := -1; _countstmt TEXT; _rt RECORD; BEGIN IF (pParentid IS NULL) THEN RETURN -11; END IF; SELECT * INTO _rt FROM recurtype WHERE (UPPER(recurtype_type)=pType); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count <= 0) THEN RETURN -10; END IF; _countstmt := 'SELECT COUNT(*) FROM [fulltable]' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>=''$1'')' || ' AND ([table]_recurring_[table]_id=''$2''));'; _countstmt := REPLACE(_countstmt, '[fulltable]', _rt.recurtype_table); _countstmt := REPLACE(_countstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _countstmt := REPLACE(_countstmt, '[done]', _rt.recurtype_donecheck); _countstmt := REPLACE(_countstmt, '[schedcol]', _rt.recurtype_schedcol); -- 8.4+: EXECUTE _countstmt INTO _count USING pDatetime, pParentid; EXECUTE REPLACE(REPLACE(_countstmt, '$1', pDatetime::TEXT), '$2', pParentid::TEXT) INTO _count; RETURN _count; END; $_$; ALTER FUNCTION public.openrecurringitems(integer, text, timestamp with time zone) OWNER TO admin; -- -- Name: ophead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ophead ( ophead_id integer NOT NULL, ophead_name text NOT NULL, ophead_crmacct_id integer, ophead_owner_username text, ophead_opstage_id integer, ophead_opsource_id integer, ophead_optype_id integer, ophead_probability_prcnt integer, ophead_amount numeric(20,4), ophead_target_date date, ophead_actual_date date, ophead_notes text, ophead_curr_id integer, ophead_active boolean DEFAULT true, ophead_cntct_id integer, ophead_username text, ophead_start_date date, ophead_assigned_date date, ophead_priority_id integer, ophead_number text NOT NULL, CONSTRAINT ophead_ophead_number_check CHECK ((ophead_number <> ''::text)) ); ALTER TABLE public.ophead OWNER TO admin; -- -- Name: TABLE ophead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ophead IS 'Opportunity header.'; -- -- Name: ophead(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION ophead() RETURNS SETOF ophead LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row ophead%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllOpportunities','ViewAllOpportunities','MaintainPersonalOpportunities','ViewPersonalOpportunities') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM ophead LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM ophead WHERE getEffectiveXtUser() IN (ophead_owner_username, ophead_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; ALTER FUNCTION public.ophead() OWNER TO admin; -- -- Name: FUNCTION ophead(); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION ophead() IS 'A table function that returns Opportunity results according to privilege settings.'; -- -- Name: orderedbypo(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION orderedbypo(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _qty NUMERIC; BEGIN SELECT COALESCE(SUM(noNeg(poitem_qty_ordered - poitem_qty_received) * poitem_invvenduomratio), 0.0) INTO _qty FROM poitem WHERE ( (poitem_itemsite_id=pItemsiteid) AND (poitem_status <> 'C') AND (poitem_duedate BETWEEN pStartDate AND pEndDate) ); RETURN _qty; END; $_$; ALTER FUNCTION public.orderedbypo(integer, date, date) OWNER TO admin; -- -- Name: orderedbypo(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION orderedbypo(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAhead ALIAS FOR $2; _qty NUMERIC; BEGIN SELECT orderedByPo(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookAhead)) INTO _qty; RETURN _qty; END; $_$; ALTER FUNCTION public.orderedbypo(integer, integer) OWNER TO admin; -- -- Name: orderedbywo(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION orderedbywo(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAheadDays ALIAS FOR $2; BEGIN RETURN orderedByWo(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookAheadDays)); END; $_$; ALTER FUNCTION public.orderedbywo(integer, integer) OWNER TO admin; -- -- Name: orderedbywo(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION orderedbywo(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _itemType CHARACTER(1); _qty NUMERIC := 0; BEGIN SELECT item_type INTO _itemType FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ); IF (_itemType NOT IN ('C','T')) THEN SELECT COALESCE(SUM(noNeg(wo_qtyord - wo_qtyrcv)), 0.0) INTO _qty FROM wo WHERE ( (wo_status <> 'C') AND (wo_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ); ELSIF (_itemType = 'C') THEN SELECT COALESCE(SUM((noNeg(wo_qtyord - wo_qtyrcv) * brddist_stdqtyper)), 0.0) INTO _qty FROM wo, xtmfg.brddist WHERE ( (wo_status <> 'C') AND (brddist_wo_id=wo_id) AND (brddist_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ); ELSIF (_itemType = 'T' AND fetchMetricBool('Routings')) THEN -- Tooling: Determine quantity already returned SELECT -- Qty Required COALESCE(SUM(noNeg(womatl_qtyreq)),0) - -- Qty Returned (SELECT COALESCE(SUM(abs(invhist_invqty)),0) FROM wo JOIN womatl ON (womatl_wo_id=wo_id) JOIN womatlpost ON (womatl_id=womatlpost_womatl_id) JOIN invhist ON ((womatlpost_invhist_id=invhist_id) AND (invhist_invqty < 0)) LEFT OUTER JOIN xtmfg.wooper ON (womatl_wooper_id=wooper_id) WHERE ( NOT (COALESCE(wooper_rncomplete,wo_status = 'C')) AND (womatl_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ) ) INTO _qty FROM wo JOIN womatl ON (womatl_wo_id=wo_id) LEFT OUTER JOIN xtmfg.wooper ON (womatl_wooper_id=wooper_id) WHERE ( NOT (COALESCE(wooper_rncomplete,wo_status = 'C')) AND (womatl_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ) GROUP BY womatl_qtyreq; ELSIF (_itemType = 'T') THEN -- Tooling: Determine quantity already returned SELECT -- Qty Required COALESCE(SUM(noNeg(womatl_qtyreq)),0) - -- Qty Returned (SELECT COALESCE(SUM(abs(invhist_invqty)),0) FROM wo JOIN womatl ON (womatl_wo_id=wo_id) JOIN womatlpost ON (womatl_id=womatlpost_womatl_id) JOIN invhist ON ((womatlpost_invhist_id=invhist_id) AND (invhist_invqty < 0)) WHERE ( NOT (wo_status = 'C') AND (womatl_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ) ) INTO _qty FROM wo JOIN womatl ON (womatl_wo_id=wo_id) WHERE ( NOT (wo_status = 'C') AND (womatl_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ) GROUP BY womatl_qtyreq; END IF; RETURN COALESCE(_qty,0); END; $_$; ALTER FUNCTION public.orderedbywo(integer, date, date) OWNER TO admin; -- -- Name: orderhead(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION orderhead() RETURNS SETOF ordhead LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row ordhead%ROWTYPE; _query TEXT; BEGIN _query := ' SELECT DISTINCT * FROM ( SELECT pohead_id AS orderhead_id, ''PO'' AS orderhead_type, pohead_number AS orderhead_number, pohead_status AS orderhead_status, pohead_orderdate AS orderhead_orderdate, (SELECT count(*) FROM poitem WHERE poitem_pohead_id=pohead_id) AS orderhead_linecount, pohead_vend_id AS orderhead_from_id, vend_name AS orderhead_from, NULL AS orderhead_to_id, '''' AS orderhead_to, pohead_curr_id AS orderhead_curr_id, pohead_agent_username AS orderhead_agent_username, pohead_shipvia AS orderhead_shipvia FROM pohead LEFT OUTER JOIN vendinfo ON (pohead_vend_id=vend_id) UNION SELECT cohead_id AS orderhead_id, ''SO'' AS orderhead_type, cohead_number AS orderhead_number, COALESCE(coitem_status,''C'') AS orderhead_status, cohead_orderdate AS orderhead_orderdate, (SELECT count(*) FROM coitem WHERE coitem_cohead_id=cohead_id) AS orderhead_linecount, NULL AS orderhead_from_id, '''' AS orderhead_from, cohead_cust_id AS orderhead_to_id, cust_name AS orderhead_to, cohead_curr_id AS orderhead_curr_id, '''' AS orderhead_agent_username, cohead_shipvia AS orderhead_shipvia FROM cohead LEFT OUTER JOIN custinfo ON (cohead_cust_id=cust_id) LEFT OUTER JOIN coitem ON ((cohead_id=coitem_cohead_id) AND (coitem_status=''O''))'; IF (fetchmetricbool('MultiWhs')) THEN _query := _query || ' UNION SELECT tohead_id AS orderhead_id, ''TO'' AS orderhead_type, tohead_number AS orderhead_number, tohead_status AS orderhead_status, tohead_orderdate AS orderhead_orderdate, (SELECT count(*) FROM toitem WHERE toitem_tohead_id=tohead_id) AS orderhead_linecount, tohead_src_warehous_id AS orderhead_from_id, tohead_srcname AS orderhead_from, tohead_dest_warehous_id AS orderhead_to_id, tohead_destname AS orderhead_to, tohead_freight_curr_id AS orderhead_curr_id, tohead_agent_username AS orderhead_agent_username, tohead_shipvia AS orderhead_shipvia FROM tohead'; END IF; IF (fetchmetricbool('EnableReturnAuth')) THEN _query := _query || ' UNION SELECT rahead_id AS orderhead_id, ''RA'' AS orderhead_type, rahead_number AS orderhead_number, COALESCE(raitem_status,''C'') AS orderhead_status, rahead_authdate AS orderhead_orderdate, (SELECT count(*) FROM raitem WHERE raitem_rahead_id=rahead_id) AS orderhead_linecount, rahead_cust_id AS orderhead_from_id, cust_name AS orderhead_from, NULL AS orderhead_to_id, '''' AS orderhead_to, rahead_curr_id AS orderhead_curr_id, '''' AS orderhead_agent_username, '''' AS orderhead_shipvia FROM rahead LEFT OUTER JOIN custinfo ON (rahead_cust_id=cust_id) LEFT OUTER JOIN raitem ON ((rahead_id=raitem_rahead_id) AND (raitem_status=''O''))'; END IF; _query := _query || ') AS data ORDER BY orderhead_type, orderhead_number ;'; FOR _row IN EXECUTE _query LOOP RETURN NEXT _row; END LOOP; RETURN; END; $$; ALTER FUNCTION public.orderhead() OWNER TO admin; -- -- Name: orderitem(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION orderitem() RETURNS SETOF orditem LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row orditem%ROWTYPE; _query TEXT; BEGIN _query := ' SELECT poitem_id AS orderitem_id, ''PO'' AS orderitem_orderhead_type, poitem_pohead_id AS orderitem_orderhead_id, poitem_linenumber AS orderitem_linenumber, poitem_status AS orderitem_status, poitem_itemsite_id AS orderitem_itemsite_id, poitem_duedate AS orderitem_scheddate, poitem_qty_ordered AS orderitem_qty_ordered, poitem_qty_returned AS orderitem_qty_shipped, poitem_qty_received AS orderitem_qty_received, uom_id AS orderitem_qty_uom_id, poitem_invvenduomratio AS orderitem_qty_invuomratio, poitem_unitprice AS orderitem_unitcost, pohead_curr_id AS orderitem_unitcost_curr_id, poitem_freight AS orderitem_freight, poitem_freight_received AS orderitem_freight_received, pohead_curr_id AS orderitem_freight_curr_id FROM poitem LEFT OUTER JOIN pohead ON (poitem_pohead_id=pohead_id) LEFT OUTER JOIN uom ON (uom_name=poitem_vend_uom) UNION SELECT coitem_id AS orderitem_id, ''SO'' AS orderitem_orderhead_type, coitem_cohead_id AS orderitem_orderhead_id, coitem_linenumber AS orderitem_linenumber, coitem_status AS orderitem_status, coitem_itemsite_id AS orderitem_itemsite_id, coitem_scheddate AS orderitem_scheddate, coitem_qtyord AS orderitem_qty_ordered, coitem_qtyshipped AS orderitem_qty_shipped, coitem_qtyreturned AS orderitem_qty_received, coitem_qty_uom_id AS orderitem_qty_uom_id, coitem_qty_invuomratio AS orderitem_qty_invuomratio, coitem_unitcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL AS orderitem_freight, NULL AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM coitem'; IF (fetchmetricbool('MultiWhs')) THEN _query := _query || ' UNION SELECT toitem_id AS orderitem_id, ''TO'' AS orderitem_orderhead_type, toitem_tohead_id AS orderitem_orderhead_id, toitem_linenumber AS orderitem_linenumber, toitem_status AS orderitem_status, itemsite_id AS orderitem_itemsite_id, toitem_duedate AS orderitem_scheddate, toitem_qty_ordered AS orderitem_qty_ordered, toitem_qty_shipped AS orderitem_qty_shipped, toitem_qty_received AS orderitem_qty_received, uom_id AS orderitem_qty_uom_id, 1 AS orderitem_qty_invuomratio, toitem_stdcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, toitem_freight AS orderitem_freight, toitem_freight_received AS orderitem_freight_received, toitem_freight_curr_id AS orderitem_freight_curr_id FROM tohead, itemsite, toitem LEFT OUTER JOIN uom ON (uom_name=toitem_uom) WHERE ((toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id)) '; END IF; IF (fetchmetricbool('EnableReturnAuth')) THEN _query := _query || ' UNION SELECT raitem_id AS orderitem_id, ''RA'' AS orderitem_orderhead_type, raitem_rahead_id AS orderitem_orderhead_id, raitem_linenumber AS orderitem_linenumber, raitem_status AS orderitem_status, raitem_itemsite_id AS orderitem_itemsite_id, raitem_scheddate AS orderitem_scheddate, raitem_qtyauthorized AS orderitem_qty_ordered, 0 AS orderitem_qty_shipped, raitem_qtyreceived AS orderitem_qty_received, raitem_qty_uom_id AS orderitem_qty_uom_id, raitem_qty_invuomratio AS orderitem_qty_invuomratio, raitem_unitprice AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL AS orderitem_freight, NULL AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM raitem'; END IF; FOR _row IN EXECUTE _query LOOP RETURN NEXT _row; END LOOP; RETURN; END; $$; ALTER FUNCTION public.orderitem() OWNER TO admin; -- -- Name: orderitemdata(text, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION orderitemdata(text, integer, integer) RETURNS SETOF orderitemtype LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrdertype ALIAS FOR $1; pOrderheadid ALIAS FOR $2; pOrderitemid ALIAS FOR $3; _row orderitemtype%ROWTYPE; _set RECORD; BEGIN IF(UPPER(pOrdertype)='PO') THEN FOR _set IN SELECT poitem_id AS orderitem_id, 'PO' AS orderitem_orderhead_type, poitem_pohead_id AS orderitem_orderhead_id, poitem_linenumber AS orderitem_linenumber, poitem_status AS orderitem_status, poitem_itemsite_id AS orderitem_itemsite_id, poitem_duedate AS orderitem_scheddate, poitem_qty_ordered AS orderitem_qty_ordered, poitem_qty_returned AS orderitem_qty_shipped, poitem_qty_received AS orderitem_qty_received, uom_id AS orderitem_qty_uom_id, poitem_invvenduomratio AS orderitem_qty_invuomratio, poitem_unitprice AS orderitem_unitcost, (SELECT pohead_curr_id FROM pohead WHERE pohead_id=poitem_pohead_id) AS orderitem_unitcost_curr_id, poitem_freight AS orderitem_freight, poitem_freight_received AS orderitem_freight_received, (SELECT pohead_curr_id FROM pohead WHERE pohead_id=poitem_pohead_id) AS orderitem_freight_curr_id FROM poitem LEFT OUTER JOIN uom ON (uom_name=poitem_vend_uom) WHERE(((pOrderheadid IS NULL) OR (poitem_pohead_id=pOrderheadid)) AND ((pOrderitemid IS NULL) OR (poitem_id=pOrderitemid))) LOOP _row.orderitem_id := _set.orderitem_id; _row.orderitem_orderhead_type := _set.orderitem_orderhead_type; _row.orderitem_orderhead_id := _set.orderitem_orderhead_id; _row.orderitem_linenumber := _set.orderitem_linenumber; _row.orderitem_status := _set.orderitem_status; _row.orderitem_itemsite_id := _set.orderitem_itemsite_id; _row.orderitem_scheddate := _set.orderitem_scheddate; _row.orderitem_qty_ordered := _set.orderitem_qty_ordered; _row.orderitem_qty_shipped := _set.orderitem_qty_shipped; _row.orderitem_qty_received := _set.orderitem_qty_received; _row.orderitem_qty_uom_id := _set.orderitem_qty_uom_id; _row.orderitem_qty_invuomratio := _set.orderitem_qty_invuomratio; _row.orderitem_unitcost := _set.orderitem_unitcost; _row.orderitem_unitcost_curr_id := _set.orderitem_unitcost_curr_id; _row.orderitem_freight := _set.orderitem_freight; _row.orderitem_freight_received := _set.orderitem_freight_received; _row.orderitem_freight_curr_id := _set.orderitem_freight_curr_id; RETURN NEXT _row; END LOOP; ELSEIF(UPPER(pOrdertype)='SO') THEN FOR _set IN SELECT coitem_id AS orderitem_id, 'SO' AS orderitem_orderhead_type, coitem_cohead_id AS orderitem_orderhead_id, coitem_linenumber AS orderitem_linenumber, coitem_status AS orderitem_status, coitem_itemsite_id AS orderitem_itemsite_id, coitem_scheddate AS orderitem_scheddate, coitem_qtyord AS orderitem_qty_ordered, coitem_qtyshipped AS orderitem_qty_shipped, coitem_qtyreturned AS orderitem_qty_received, coitem_qty_uom_id AS orderitem_qty_uom_id, coitem_qty_invuomratio AS orderitem_qty_invuomratio, coitem_unitcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL AS orderitem_freight, NULL AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM coitem WHERE(((pOrderheadid IS NULL) OR (coitem_cohead_id=pOrderheadid)) AND ((pOrderitemid IS NULL) OR (coitem_id=pOrderitemid))) LOOP _row.orderitem_id := _set.orderitem_id; _row.orderitem_orderhead_type := _set.orderitem_orderhead_type; _row.orderitem_orderhead_id := _set.orderitem_orderhead_id; _row.orderitem_linenumber := _set.orderitem_linenumber; _row.orderitem_status := _set.orderitem_status; _row.orderitem_itemsite_id := _set.orderitem_itemsite_id; _row.orderitem_scheddate := _set.orderitem_scheddate; _row.orderitem_qty_ordered := _set.orderitem_qty_ordered; _row.orderitem_qty_shipped := _set.orderitem_qty_shipped; _row.orderitem_qty_received := _set.orderitem_qty_received; _row.orderitem_qty_uom_id := _set.orderitem_qty_uom_id; _row.orderitem_qty_invuomratio := _set.orderitem_qty_invuomratio; _row.orderitem_unitcost := _set.orderitem_unitcost; _row.orderitem_unitcost_curr_id := _set.orderitem_unitcost_curr_id; _row.orderitem_freight := _set.orderitem_freight; _row.orderitem_freight_received := _set.orderitem_freight_received; _row.orderitem_freight_curr_id := _set.orderitem_freight_curr_id; RETURN NEXT _row; END LOOP; ELSEIF(UPPER(pOrdertype)='RA') THEN FOR _set IN SELECT raitem_id AS orderitem_id, 'RA' AS orderitem_orderhead_type, raitem_rahead_id AS orderitem_orderhead_id, raitem_linenumber AS orderitem_linenumber, raitem_status AS orderitem_status, raitem_itemsite_id AS orderitem_itemsite_id, raitem_scheddate AS orderitem_scheddate, raitem_qtyauthorized AS orderitem_qty_ordered, 0 AS orderitem_qty_shipped, raitem_qtyreceived AS orderitem_qty_received, raitem_qty_uom_id AS orderitem_qty_uom_id, raitem_qty_invuomratio AS orderitem_qty_invuomratio, raitem_unitprice AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL AS orderitem_freight, NULL AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM raitem WHERE(((pOrderheadid IS NULL) OR (raitem_rahead_id=pOrderheadid)) AND ((pOrderitemid IS NULL) OR (raitem_id=pOrderitemid))) LOOP _row.orderitem_id := _set.orderitem_id; _row.orderitem_orderhead_type := _set.orderitem_orderhead_type; _row.orderitem_orderhead_id := _set.orderitem_orderhead_id; _row.orderitem_linenumber := _set.orderitem_linenumber; _row.orderitem_status := _set.orderitem_status; _row.orderitem_itemsite_id := _set.orderitem_itemsite_id; _row.orderitem_scheddate := _set.orderitem_scheddate; _row.orderitem_qty_ordered := _set.orderitem_qty_ordered; _row.orderitem_qty_shipped := _set.orderitem_qty_shipped; _row.orderitem_qty_received := _set.orderitem_qty_received; _row.orderitem_qty_uom_id := _set.orderitem_qty_uom_id; _row.orderitem_qty_invuomratio := _set.orderitem_qty_invuomratio; _row.orderitem_unitcost := _set.orderitem_unitcost; _row.orderitem_unitcost_curr_id := _set.orderitem_unitcost_curr_id; _row.orderitem_freight := _set.orderitem_freight; _row.orderitem_freight_received := _set.orderitem_freight_received; _row.orderitem_freight_curr_id := _set.orderitem_freight_curr_id; RETURN NEXT _row; END LOOP; ELSEIF(UPPER(pOrdertype)='TO') THEN FOR _set IN SELECT toitem_id AS orderitem_id, 'TO' AS orderitem_orderhead_type, toitem_tohead_id AS orderitem_orderhead_id, toitem_linenumber AS orderitem_linenumber, toitem_status AS orderitem_status, itemsite_id AS orderitem_itemsite_id, toitem_duedate AS orderitem_scheddate, toitem_qty_ordered AS orderitem_qty_ordered, toitem_qty_shipped AS orderitem_qty_shipped, toitem_qty_received AS orderitem_qty_received, uom_id AS orderitem_qty_uom_id, 1 AS orderitem_qty_invuomratio, toitem_stdcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, toitem_freight AS orderitem_freight, toitem_freight_received AS orderitem_freight_received, toitem_freight_curr_id AS orderitem_freight_curr_id FROM tohead, itemsite, toitem LEFT OUTER JOIN uom ON (uom_name=toitem_uom) WHERE((toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id) AND ((pOrderheadid IS NULL) OR (toitem_tohead_id=pOrderheadid)) AND ((pOrderitemid IS NULL) OR (toitem_id=pOrderitemid))) LOOP _row.orderitem_id := _set.orderitem_id; _row.orderitem_orderhead_type := _set.orderitem_orderhead_type; _row.orderitem_orderhead_id := _set.orderitem_orderhead_id; _row.orderitem_linenumber := _set.orderitem_linenumber; _row.orderitem_status := _set.orderitem_status; _row.orderitem_itemsite_id := _set.orderitem_itemsite_id; _row.orderitem_scheddate := _set.orderitem_scheddate; _row.orderitem_qty_ordered := _set.orderitem_qty_ordered; _row.orderitem_qty_shipped := _set.orderitem_qty_shipped; _row.orderitem_qty_received := _set.orderitem_qty_received; _row.orderitem_qty_uom_id := _set.orderitem_qty_uom_id; _row.orderitem_qty_invuomratio := _set.orderitem_qty_invuomratio; _row.orderitem_unitcost := _set.orderitem_unitcost; _row.orderitem_unitcost_curr_id := _set.orderitem_unitcost_curr_id; _row.orderitem_freight := _set.orderitem_freight; _row.orderitem_freight_received := _set.orderitem_freight_received; _row.orderitem_freight_curr_id := _set.orderitem_freight_curr_id; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; ALTER FUNCTION public.orderitemdata(text, integer, integer) OWNER TO admin; -- -- Name: packageisenabled(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION packageisenabled(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT COUNT(*) >= 8 FROM pg_inherits, pg_class, pg_namespace, pkghead WHERE ((inhrelid=pg_class.oid) AND (relnamespace=pg_namespace.oid) AND (nspname=lower(pkghead_name)) AND (pkghead_id=$1)); $_$; ALTER FUNCTION public.packageisenabled(integer) OWNER TO admin; -- -- Name: packageisenabled(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION packageisenabled(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT COUNT(*) >= 8 FROM pg_inherits, pg_class, pg_namespace WHERE ((inhrelid=pg_class.oid) AND (relnamespace=pg_namespace.oid) AND (nspname=lower($1))); $_$; ALTER FUNCTION public.packageisenabled(text) OWNER TO admin; -- -- Name: pgp_key_id(bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_key_id(bytea) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_key_id_w'; ALTER FUNCTION public.pgp_key_id(bytea) OWNER TO admin; -- -- Name: pgp_pub_decrypt(bytea, bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_decrypt(bytea, bytea) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'; ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea) OWNER TO admin; -- -- Name: pgp_pub_decrypt(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'; ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea, text) OWNER TO admin; -- -- Name: pgp_pub_decrypt(bytea, bytea, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'; ALTER FUNCTION public.pgp_pub_decrypt(bytea, bytea, text, text) OWNER TO admin; -- -- Name: pgp_pub_decrypt_bytea(bytea, bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'; ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea) OWNER TO admin; -- -- Name: pgp_pub_decrypt_bytea(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'; ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea, text) OWNER TO admin; -- -- Name: pgp_pub_decrypt_bytea(bytea, bytea, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'; ALTER FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea, text, text) OWNER TO admin; -- -- Name: pgp_pub_encrypt(text, bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_encrypt(text, bytea) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_pub_encrypt_text'; ALTER FUNCTION public.pgp_pub_encrypt(text, bytea) OWNER TO admin; -- -- Name: pgp_pub_encrypt(text, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_encrypt(text, bytea, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_pub_encrypt_text'; ALTER FUNCTION public.pgp_pub_encrypt(text, bytea, text) OWNER TO admin; -- -- Name: pgp_pub_encrypt_bytea(bytea, bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_pub_encrypt_bytea'; ALTER FUNCTION public.pgp_pub_encrypt_bytea(bytea, bytea) OWNER TO admin; -- -- Name: pgp_pub_encrypt_bytea(bytea, bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_pub_encrypt_bytea'; ALTER FUNCTION public.pgp_pub_encrypt_bytea(bytea, bytea, text) OWNER TO admin; -- -- Name: pgp_sym_decrypt(bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_sym_decrypt(bytea, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_sym_decrypt_text'; ALTER FUNCTION public.pgp_sym_decrypt(bytea, text) OWNER TO admin; -- -- Name: pgp_sym_decrypt(bytea, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_sym_decrypt(bytea, text, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_sym_decrypt_text'; ALTER FUNCTION public.pgp_sym_decrypt(bytea, text, text) OWNER TO admin; -- -- Name: pgp_sym_decrypt_bytea(bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_sym_decrypt_bytea'; ALTER FUNCTION public.pgp_sym_decrypt_bytea(bytea, text) OWNER TO admin; -- -- Name: pgp_sym_decrypt_bytea(bytea, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_sym_decrypt_bytea'; ALTER FUNCTION public.pgp_sym_decrypt_bytea(bytea, text, text) OWNER TO admin; -- -- Name: pgp_sym_encrypt(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_sym_encrypt(text, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_sym_encrypt_text'; ALTER FUNCTION public.pgp_sym_encrypt(text, text) OWNER TO admin; -- -- Name: pgp_sym_encrypt(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_sym_encrypt(text, text, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_sym_encrypt_text'; ALTER FUNCTION public.pgp_sym_encrypt(text, text, text) OWNER TO admin; -- -- Name: pgp_sym_encrypt_bytea(bytea, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_sym_encrypt_bytea'; ALTER FUNCTION public.pgp_sym_encrypt_bytea(bytea, text) OWNER TO admin; -- -- Name: pgp_sym_encrypt_bytea(bytea, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_sym_encrypt_bytea'; ALTER FUNCTION public.pgp_sym_encrypt_bytea(bytea, text, text) OWNER TO admin; -- -- Name: pkgmaybemodified(name); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION pkgmaybemodified(name) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pschemaname ALIAS FOR $1; _returnval BOOLEAN; BEGIN SELECT pkghead_indev INTO _returnval FROM pkghead WHERE (pkghead_name=pschemaname); IF (NOT FOUND) THEN RETURN FALSE; END IF; RETURN _returnval; END; $_$; ALTER FUNCTION public.pkgmaybemodified(name) OWNER TO admin; -- -- Name: plpgsql_call_handler(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler LANGUAGE c AS '$libdir/plpgsql', 'plpgsql_call_handler'; ALTER FUNCTION public.plpgsql_call_handler() OWNER TO admin; -- -- Name: plpgsql_validator(oid); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION plpgsql_validator(oid) RETURNS void LANGUAGE c AS '$libdir/plpgsql', 'plpgsql_validator'; ALTER FUNCTION public.plpgsql_validator(oid) OWNER TO admin; -- -- Name: postapcheck(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postAPCheck() is deprecated - use postCheck() instead'; RETURN postCheck($1, fetchJournalNumber('AP-CK')); END; $_$; ALTER FUNCTION public.postapcheck(integer) OWNER TO admin; -- -- Name: postapcheck(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postapcheck(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postAPCheck() is deprecated - use postCheck() instead'; RETURN postCheck($1, $2); END; $_$; ALTER FUNCTION public.postapcheck(integer, integer) OWNER TO admin; -- -- Name: postapchecks(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postapchecks(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postAPChecks() is deprecated - use postChecks() instead'; RETURN postChecks($1); END; $_$; ALTER FUNCTION public.postapchecks(integer) OWNER TO admin; -- -- Name: postapcreditmemoapplication(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postapcreditmemoapplication(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; _src RECORD; _r RECORD; _totalAmount NUMERIC := 0.0; _exchGain NUMERIC := 0.0; _apaccntid INTEGER; BEGIN SELECT apopen_docnumber, (apopen_amount - apopen_paid) AS balance, -- SUM(currtocurr(apcreditapply_curr_id, apopen_curr_id, -- apcreditapply_amount, CURRENT_DATE)) AS toApply, SUM(apcreditapply_amount) AS toApply, apopen_curr_rate INTO _src FROM apopen, apcreditapply WHERE ( (apcreditapply_source_apopen_id=apopen_id) AND (apopen_id=pApopenid) ) GROUP BY apopen_docnumber, apopen_amount, apopen_paid, apopen_curr_rate; IF (NOT FOUND) THEN RETURN -1; ELSIF (_src.toApply = 0) THEN RETURN -2; ELSIF (_src.toApply > _src.balance) THEN RETURN -3; -- ELSIF (_src.toApply IS NULL AND _src.junk IS NOT NULL) THEN -- RETURN -4; -- missing exchange rate ELSIF (_src.toApply IS NULL) THEN RETURN -6; -- amount to apply is NULL for some unknown reason END IF; SELECT apopen_id, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_amount, apopen_curr_id, apopen_curr_rate, apopen_docdate, apopen_accnt_id INTO _src FROM apopen WHERE (apopen_id=pApopenid); IF (NOT FOUND) THEN RETURN -5; END IF; FOR _r IN SELECT apcreditapply_id, apcreditapply_target_apopen_id, apcreditapply_amount AS apply_amountSource, currToCurr(apcreditapply_curr_id, apopen_curr_id, apcreditapply_amount, CURRENT_DATE) AS apply_amountTarget, apopen_id, apopen_doctype, apopen_docnumber, apopen_curr_id, apopen_curr_rate, apopen_docdate FROM apcreditapply, apopen WHERE ( (apcreditapply_source_apopen_id=pApopenid) AND (apcreditapply_target_apopen_id=apopen_id) ) LOOP IF (_r.apply_amountTarget IS NULL) THEN RETURN -4; -- missing exchange rate END IF; IF (_r.apply_amountTarget > 0) THEN -- Update the apopen item to post the paid amount UPDATE apopen SET apopen_paid = (apopen_paid + _r.apply_amountTarget) WHERE (apopen_id=_r.apcreditapply_target_apopen_id); UPDATE apopen SET apopen_open = false, apopen_closedate = current_date WHERE ( (apopen_id=_r.apcreditapply_target_apopen_id) AND (apopen_amount <= apopen_paid) ); -- Cache the running amount posted _totalAmount := (_totalAmount + _r.apply_amountSource); -- Record the application INSERT INTO apapply ( apapply_vend_id, apapply_amount, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_postdate, apapply_journalnumber, apapply_username, apapply_curr_id ) VALUES ( _src.apopen_vend_id, round(_r.apply_amountSource, 2), pApopenid, 'C', _src.apopen_docnumber, _r.apopen_id, _r.apopen_doctype, _r.apopen_docnumber, CURRENT_DATE, 0, getEffectiveXtUser(), _src.apopen_curr_id ); END IF; -- Delete the posted apcreditapply record DELETE FROM apcreditapply WHERE (apcreditapply_id=_r.apcreditapply_id); END LOOP; -- Record the amount posted and mark the source apopen as closed if it is completely posted UPDATE apopen SET apopen_paid = (apopen_paid + _totalAmount) WHERE (apopen_id=pApopenid); UPDATE apopen SET apopen_open = false, apopen_closedate = current_date WHERE ( (apopen_id=pApopenid) AND (apopen_amount <= apopen_paid) ); IF (_r.apopen_curr_id = _src.apopen_curr_id) THEN IF (_r.apopen_docdate > _src.apopen_docdate) THEN _exchGain := (_totalAmount / _r.apopen_curr_rate - _totalAmount / _src.apopen_curr_rate) * -1; ELSE _exchGain := _totalAmount / _src.apopen_curr_rate - _totalAmount / _r.apopen_curr_rate; END IF; END IF; IF (_src.apopen_accnt_id > -1) THEN _apaccntid := _src.apopen_accnt_id; ELSE _apaccntid := findAPAccount(_src.apopen_vend_id); END IF; PERFORM insertGLTransaction(fetchJournalNumber('AP-MISC'), 'A/P', 'CM', _src.apopen_docnumber, 'CM Application', _apaccntid, getGainLossAccntId(_apaccntid), -1, _exchGain, CURRENT_DATE); RETURN pApopenid; END; $_$; ALTER FUNCTION public.postapcreditmemoapplication(integer) OWNER TO admin; -- -- Name: postapopenitems(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postapopenitems() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE apopen SET apopen_posted=TRUE WHERE (NOT apopen_posted); RETURN TRUE; END; $$; ALTER FUNCTION public.postapopenitems() OWNER TO admin; -- -- Name: postarcreditmemoapplication(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postarcreditmemoapplication(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenid ALIAS FOR $1; BEGIN RETURN postARCreditMemoApplication(pAropenid, CURRENT_DATE); END; $_$; ALTER FUNCTION public.postarcreditmemoapplication(integer) OWNER TO admin; -- -- Name: postarcreditmemoapplication(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postarcreditmemoapplication(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenid ALIAS FOR $1; _applyDate DATE := COALESCE($2, CURRENT_DATE); _p RECORD; _r RECORD; _totalAmount NUMERIC := 0; _totalTarget NUMERIC := 0; _exchGain NUMERIC := 0; _result NUMERIC; _araccntid INTEGER; BEGIN SELECT aropen_docnumber, ROUND(aropen_amount - aropen_paid, 2) AS balance, aropen_open, aropen_curr_rate, ROUND(SUM(currToCurr(arcreditapply_curr_id, aropen_curr_id, COALESCE(arcreditapply_amount, 0), _applyDate)), 2) AS toApply INTO _p FROM aropen, arcreditapply WHERE ( (arcreditapply_source_aropen_id=aropen_id) AND (aropen_id=pAropenid) ) GROUP BY aropen_docnumber, aropen_amount, aropen_paid, aropen_open, aropen_curr_rate; IF (NOT FOUND) THEN RETURN -1; ELSIF (_p.toApply = 0) THEN RETURN -2; ELSIF (_p.toApply > _p.balance) THEN RETURN -3; END IF; SELECT aropen_cust_id, aropen_docnumber, aropen_doctype, aropen_amount, aropen_curr_id, aropen_docdate, aropen_accnt_id, aropen_cust_id, aropen_curr_rate INTO _p FROM aropen WHERE (aropen_id=pAropenid); IF (NOT FOUND) THEN RETURN -5; END IF; FOR _r IN SELECT arcreditapply_id, arcreditapply_target_aropen_id, arcreditapply_amount AS arcreditapply_amountSource, arcreditapply_reftype, arcreditapply_ref_id, currToCurr(arcreditapply_curr_id, aropen_curr_id, arcreditapply_amount, _applyDate) AS arcreditapply_amountTarget, aropen_id, aropen_doctype, aropen_docnumber, aropen_docdate, aropen_curr_rate FROM arcreditapply, aropen WHERE ( (arcreditapply_source_aropen_id=pAropenid) AND (arcreditapply_target_aropen_id=aropen_id) ) LOOP IF (_r.arcreditapply_amountTarget IS NULL) THEN RETURN -4; END IF; IF (_r.arcreditapply_amountTarget > 0) THEN -- Update the aropen item to post the paid amount UPDATE aropen SET aropen_paid = round(aropen_paid + _r.arcreditapply_amountTarget, 2) WHERE (aropen_id=_r.arcreditapply_target_aropen_id); UPDATE aropen SET aropen_open = (round(aropen_amount, 2) > round(aropen_paid, 2)) WHERE (aropen_id=_r.arcreditapply_target_aropen_id); -- Cache the running amount posted _totalAmount := (_totalAmount + _r.arcreditapply_amountSource); _totalTarget := (_totalTarget + _r.arcreditapply_amountTarget); -- Record the application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id, arapply_reftype, arapply_ref_id ) VALUES ( _p.aropen_cust_id, pAropenid, _p.aropen_doctype, _p.aropen_docnumber, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, '', '', round(_r.arcreditapply_amountSource, 2), TRUE, _applyDate, _applyDate, 0, getEffectiveXtUser(), _p.aropen_curr_id, _r.arcreditapply_reftype, _r.arcreditapply_ref_id ); END IF; -- Delete the posted arcreditapply record DELETE FROM arcreditapply WHERE (arcreditapply_id=_r.arcreditapply_id); IF (_r.aropen_docdate > _p.aropen_docdate) THEN _exchGain := (_totalTarget / _r.aropen_curr_rate - _totalAmount / _p.aropen_curr_rate) * -1; ELSE _exchGain := _totalAmount / _p.aropen_curr_rate - _totalTarget / _r.aropen_curr_rate; END IF; IF (_p.aropen_accnt_id > -1) THEN _araccntid := _p.aropen_accnt_id; ELSE _araccntid := findARAccount(_p.aropen_cust_id); END IF; IF (_exchGain <> 0) THEN PERFORM insertGLTransaction(fetchJournalNumber('AR-MISC'), 'A/R', 'CR', _p.aropen_docnumber, 'CM Application', _araccntid, getGainLossAccntId(_araccntid), -1, _exchGain * -1, _applyDate); END IF; END LOOP; -- TODO: If this is a Customer Deposit (aropen_doctype='R') -- the we need to convert the total to a base transaction IF(_p.aropen_doctype='R') THEN SELECT insertGLTransaction(fetchJournalNumber('AR-MISC'), 'A/R', 'CD', _p.aropen_docnumber, 'CM Application', cr.accnt_id, db.accnt_id, -1, currToBase(_p.aropen_curr_id, _totalAmount, _p.aropen_docdate), _applyDate) INTO _result FROM accnt AS cr, accnt AS db WHERE ((db.accnt_id = findDeferredAccount(_p.aropen_cust_id)) AND (cr.accnt_id = findARAccount(_p.aropen_cust_id)) ); IF(NOT FOUND OR _result < 0) THEN RAISE EXCEPTION 'There was an error posting the Customer Deposit GL Transactions.'; END IF; END IF; -- Record the amount posted and mark the source aropen as closed if it is completely posted UPDATE aropen SET aropen_paid = round(aropen_paid + _totalAmount, 2) WHERE (aropen_id=pAropenid); UPDATE aropen SET aropen_open = (round(aropen_amount, 2) > round(aropen_paid, 2)) WHERE (aropen_id=pAropenid); RETURN pAropenid; END; $_$; ALTER FUNCTION public.postarcreditmemoapplication(integer, date) OWNER TO admin; -- -- Name: postaropenitems(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postaropenitems() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE aropen SET aropen_posted=TRUE WHERE (NOT aropen_posted); RETURN TRUE; END; $$; ALTER FUNCTION public.postaropenitems() OWNER TO admin; -- -- Name: postbankadjustment(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postbankadjustment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankadjid ALIAS FOR $1; _sequence INTEGER; _r RECORD; BEGIN -- Post the G/L transaction SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), 'G/L', 'AD', bankadj_docnumber, (bankadjtype_name || '-' || bankadj_notes), bankadjtype_accnt_id, bankaccnt_accnt_id, bankadj_id, round(currToBase(bankaccnt_curr_id, CASE WHEN(bankadjtype_iscredit) THEN (bankadj_amount * -1) ELSE bankadj_amount END, bankadj_date), 2), bankadj_date, TRUE, TRUE ) INTO _sequence FROM bankadj, bankaccnt, bankadjtype WHERE ( (bankadj_bankaccnt_id=bankaccnt_id) AND (bankadj_bankadjtype_id=bankadjtype_id) AND (NOT bankadj_posted) AND (bankadj_id=pBankadjid) ); IF ( NOT FOUND ) THEN RETURN -1; END IF; IF (_sequence >= 0) THEN -- Update the bankadj record with this sequence and mark it posted UPDATE bankadj SET bankadj_sequence = _sequence, bankadj_posted = TRUE WHERE bankadj_id=pBankadjid; END IF; RETURN _sequence; END; $_$; ALTER FUNCTION public.postbankadjustment(integer) OWNER TO admin; -- -- Name: postbankreconciliation(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postbankreconciliation(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankrecid ALIAS FOR $1; _accntid INTEGER; _sequence INTEGER; _gltransid INTEGER; _r RECORD; BEGIN -- Check the accnt information to make sure it is valid SELECT accnt_id INTO _accntid FROM bankrec, bankaccnt, accnt WHERE ( (bankaccnt_accnt_id=accnt_id) AND (bankrec_bankaccnt_id=bankaccnt_id) AND (bankrec_id=pBankrecid) ); IF ( NOT FOUND ) THEN RETURN -1; END IF; -- Delete any bankrecitem records that are not marked as cleared for cleanliness DELETE FROM bankrecitem WHERE ( (NOT bankrecitem_cleared) AND (bankrecitem_bankrec_id=pBankrecid) ); -- Post any bankadj items that were marked as cleared and convert the bankrecitem FOR _r IN SELECT bankrecitem_id, bankrecitem_source_id FROM bankrecitem, bankadj WHERE ( (bankrecitem_source = 'AD') AND (bankrecitem_source_id=bankadj_id) AND (bankrecitem_cleared) AND (NOT bankadj_posted) AND (bankrecitem_bankrec_id=pBankrecid) ) LOOP SELECT postBankAdjustment(_r.bankrecitem_source_id) INTO _sequence; IF (_sequence < 0) THEN RETURN -10; END IF; SELECT gltrans_id INTO _gltransid FROM gltrans WHERE ( (gltrans_sequence=_sequence) AND (gltrans_accnt_id=_accntid) ); IF ( NOT FOUND ) THEN RETURN -11; END IF; UPDATE bankrecitem SET bankrecitem_source = 'GL', bankrecitem_source_id=_gltransid WHERE (bankrecitem_id=_r.bankrecitem_id); END LOOP; -- Mark all the gltrans items that have been cleared as reconciled. UPDATE gltrans SET gltrans_rec = TRUE WHERE ( (gltrans_id IN (SELECT bankrecitem_source_id FROM bankrecitem WHERE ((bankrecitem_source = 'GL') AND (bankrecitem_cleared) AND (bankrecitem_bankrec_id=pBankrecid) ) ) ) AND (gltrans_accnt_id=_accntid) ) ; -- Mark all the sltrans items that have been cleared as reconciled. UPDATE sltrans SET sltrans_rec = TRUE WHERE ( (sltrans_id IN (SELECT bankrecitem_source_id FROM bankrecitem WHERE ((bankrecitem_source = 'SL') AND (bankrecitem_cleared) AND (bankrecitem_bankrec_id=pBankrecid) ) ) ) AND (sltrans_accnt_id=_accntid) ) ; -- Mark the bankrec record as posted UPDATE bankrec SET bankrec_posted = TRUE, bankrec_postdate = now() WHERE (bankrec_id=pBankrecid); RETURN pBankrecid; END; $_$; ALTER FUNCTION public.postbankreconciliation(integer) OWNER TO admin; -- -- Name: postbillingselection(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postbillingselection(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; BEGIN RAISE NOTICE 'postBillingselection(integer) has been deprecated. Please use createInvoice(integer).'; RETURN createInvoice(pCobmiscid); END; $_$; ALTER FUNCTION public.postbillingselection(integer) OWNER TO admin; -- -- Name: postbillingselectionconsolidated(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postbillingselectionconsolidated(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; BEGIN RAISE NOTICE 'postBillingselectionConsolidated(integer) has been deprecated. Please use createInvoiceConsolidated(integer).'; RETURN createInvoiceConsolidated(pCustid); END; $_$; ALTER FUNCTION public.postbillingselectionconsolidated(integer) OWNER TO admin; -- -- Name: postbillingselections(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postbillingselections() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postBillingselections() has been deprecated. Please use createInvoices().'; RETURN createInvoices(); END; $$; ALTER FUNCTION public.postbillingselections() OWNER TO admin; -- -- Name: postbillingselections(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postbillingselections(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postBillingselections(int) has been deprecated. Please use createInvoices(int).'; RETURN createInvoices($1, false); END; $_$; ALTER FUNCTION public.postbillingselections(integer) OWNER TO admin; -- -- Name: postbillingselections(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postbillingselections(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustTypeId ALIAS FOR $1; pConsolidate ALIAS FOR $2; BEGIN RAISE NOTICE 'postBillingselections(int,bool) has been deprecated. Please use createInvoices(int,bool).'; RETURN createInvoices(pCustTypeId, pConsolidate); END; $_$; ALTER FUNCTION public.postbillingselections(integer, boolean) OWNER TO admin; -- -- Name: postcashreceipt(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcashreceipt(pcashrcptid integer, pjournalnumber integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ccpayid INTEGER; _cctype TEXT; _p RECORD; _r RECORD; _t RECORD; _v RECORD; _postToAR NUMERIC; _postToMisc NUMERIC; _postToCM NUMERIC; _posted_base NUMERIC := 0; _posted NUMERIC := 0; _sequence INTEGER; _aropenid INTEGER; _arMemoNumber TEXT; _arAccntid INTEGER; _closed BOOLEAN; _debitAccntid INTEGER; _exchGain NUMERIC; _comment TEXT; _predist BOOLEAN; _check INTEGER; BEGIN _posted := 0; _posted_base := 0; SELECT fetchGLSequence() INTO _sequence; SELECT accnt_id INTO _arAccntid FROM cashrcpt, accnt, salescat WHERE ((cashrcpt_salescat_id=salescat_id) AND (salescat_ar_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid)); IF (NOT FOUND) THEN SELECT accnt_id INTO _arAccntid FROM cashrcpt LEFT OUTER JOIN accnt ON (accnt_id=findARAccount(cashrcpt_cust_id)) WHERE ( (findARAccount(cashrcpt_cust_id)=0 OR accnt_id > 0) -- G/L interface might be disabled AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -5; END IF; END IF; SELECT cashrcpt_cust_id, (cust_number||'-'||cust_name) AS custnote, cashrcpt_fundstype, cashrcpt_number, cashrcpt_docnumber, cashrcpt_distdate, cashrcpt_amount, cashrcpt_discount, (cashrcpt_amount / cashrcpt_curr_rate) AS cashrcpt_amount_base, (cashrcpt_discount / cashrcpt_curr_rate) AS cashrcpt_discount_base, cashrcpt_notes, cashrcpt_bankaccnt_id AS bankaccnt_id, accnt_id AS prepaid_accnt_id, cashrcpt_usecustdeposit, COALESCE(cashrcpt_applydate, cashrcpt_distdate) AS applydate, cashrcpt_curr_id, cashrcpt_curr_rate, cashrcpt_posted, cashrcpt_void INTO _p FROM cashrcpt LEFT OUTER JOIN custinfo ON (cashrcpt_cust_id=cust_id) LEFT OUTER JOIN accnt ON (accnt_id=findPrepaidAccount(cashrcpt_cust_id)) WHERE ( (findPrepaidAccount(cashrcpt_cust_id)=0 OR accnt_id > 0) -- G/L interface might be disabled AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -7; END IF; IF (COALESCE(_p.cashrcpt_distdate > _p.applydate, false)) THEN RAISE EXCEPTION 'Cannot post cashrcpt % because application date is before distribution date.', _p.cashrcpt_docnumber; END IF; IF (COALESCE(_p.cashrcpt_posted, false)) THEN RAISE EXCEPTION 'Cannot post cashrcpt % because the document has already been posted.', _p.cashrcpt_docnumber; END IF; IF (COALESCE(_p.cashrcpt_void, false)) THEN RAISE EXCEPTION 'Cannot post cashrcpt % because the document has been voided.', _p.cashrcpt_docnumber; END IF; _predist := COALESCE(_p.cashrcpt_distdate < _p.applydate, false); IF (_p.cashrcpt_fundstype IN ('A', 'D', 'M', 'V')) THEN SELECT ccpay_id, ccpay_type INTO _ccpayid, _cctype FROM ccpay WHERE ((ccpay_r_ordernum IN (CAST(pCashrcptid AS TEXT), _p.cashrcpt_docnumber)) AND (ccpay_status IN ('C', 'A'))); IF NOT FOUND THEN -- the following select seems to work except for xikar - bug 8848. why? -- raise warning so there is some visibility if people fall into this path. SELECT ccpay_id, ccpay_type INTO _ccpayid, _cctype FROM ccpay WHERE ((ccpay_order_number IN (CAST(pCashrcptid AS TEXT), _p.cashrcpt_docnumber)) AND (ccpay_status IN ('C', 'A'))); IF (NOT FOUND) THEN RETURN -8; ELSE RAISE NOTICE 'PostCashReceipt() found ccpay_id % for order number %/% (ref 8848).', _ccpayid, pCashrcptid, _p.cashrcpt_docnumber; END IF; END IF; -- If there is a ccpay entry and the card was charged directly, use the prepaid account IF (_cctype = 'C' ) THEN _debitAccntid := findPrepaidAccount(_p.cashrcpt_cust_id); -- If there is a ccpay entry and the card was preauthed and then charged, use the Bank account ELSE SELECT accnt_id INTO _debitAccntid FROM cashrcpt, bankaccnt, accnt WHERE ( (cashrcpt_bankaccnt_id=bankaccnt_id) AND (bankaccnt_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -6; END IF; END IF; ELSE SELECT accnt_id INTO _debitAccntid FROM cashrcpt, bankaccnt, accnt WHERE ( (cashrcpt_bankaccnt_id=bankaccnt_id) AND (bankaccnt_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -6; END IF; END IF; -- Determine the amount to post to A/R Open Items SELECT COALESCE(SUM(cashrcptitem_amount), 0) INTO _postToAR FROM cashrcptitem JOIN aropen ON (aropen_id=cashrcptitem_aropen_id) WHERE (cashrcptitem_cashrcpt_id=pCashrcptid); IF (NOT FOUND) THEN _postToAR := 0; END IF; -- Determine the amount to post to Misc. Distributions SELECT COALESCE(SUM(cashrcptmisc_amount), 0) INTO _postToMisc FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid); IF (NOT FOUND) THEN _postToMisc := 0; END IF; -- Determine the amount to post to Discount Credit Memo SELECT COALESCE(SUM(cashrcptitem_discount), 0) INTO _postToCM FROM cashrcptitem JOIN aropen ON ( (aropen_id=cashrcptitem_aropen_id) AND (aropen_doctype IN ('I', 'D')) ) WHERE (cashrcptitem_cashrcpt_id=pCashrcptid); IF (NOT FOUND) THEN _postToCM := 0; END IF; -- Check to see if the C/R is over applied IF ((_postToAR + _postToMisc) > _p.cashrcpt_amount) THEN RETURN -1; END IF; -- Check to see if the C/R is positive amount IF (_p.cashrcpt_amount <= 0) THEN RETURN -2; END IF; -- Distribute A/R Applications FOR _r IN SELECT aropen_id, aropen_doctype, aropen_docnumber, aropen_docdate, aropen_duedate, aropen_curr_id, aropen_curr_rate, aropen_amount, round(aropen_amount - aropen_paid, 2) <= round(currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_amount + cashrcptitem_discount),_p.cashrcpt_distdate),2) AS closed, cashrcptitem_id, cashrcptitem_amount, cashrcptitem_discount, (cashrcptitem_amount / _p.cashrcpt_curr_rate) AS cashrcptitem_amount_base, (cashrcptitem_discount / _p.cashrcpt_curr_rate) AS cashrcptitem_discount_base, round(aropen_paid + currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_amount),_p.cashrcpt_distdate),2) AS new_paid, round(currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,cashrcptitem_discount,_p.cashrcpt_distdate),2) AS new_discount FROM cashrcptitem JOIN aropen ON (aropen_id=cashrcptitem_aropen_id) WHERE ((cashrcptitem_cashrcpt_id=pCashrcptid) AND (NOT _predist OR aropen_doctype IN ('C','R'))) LOOP -- Handle discount IF (_r.cashrcptitem_discount_base > 0) THEN PERFORM postCashReceiptDisc(_r.cashrcptitem_id, pJournalNumber); END IF; -- Update the aropen item to post the paid amount UPDATE aropen SET aropen_paid = _r.new_paid + _r.new_discount, aropen_open = (NOT _r.closed), aropen_closedate = CASE WHEN _r.closed THEN _p.cashrcpt_distdate END WHERE (aropen_id=_r.aropen_id); -- Cache the running amount posted _posted_base := _posted_base + _r.cashrcptitem_amount_base; _posted := _posted + _r.cashrcptitem_amount; -- Record the cashrcpt application IF (_r.aropen_doctype IN ('I','D')) THEN INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_reftype, arapply_ref_id, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id ) VALUES ( _p.cashrcpt_cust_id, -1, 'K', _p.cashrcpt_number, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, _p.cashrcpt_fundstype, _p.cashrcpt_docnumber, 'CRA', _r.cashrcptitem_id, round(_r.cashrcptitem_amount, 2), _r.closed, _p.applydate, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id); ELSE INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_reftype, arapply_ref_id, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id ) VALUES ( _p.cashrcpt_cust_id, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, -1, 'R', _p.cashrcpt_number, '', '', 'CRA', _r.cashrcptitem_id, round(abs(_r.cashrcptitem_amount), 2), _r.closed, _p.applydate, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id ); END IF; _exchGain := arCurrGain(_r.aropen_id,_p.cashrcpt_curr_id, abs(_r.cashrcptitem_amount), _p.cashrcpt_distdate); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', (_r.aropen_doctype || '-' || _r.aropen_docnumber), CASE WHEN _r.aropen_doctype != 'R' THEN _arAccntid ELSE findDeferredAccount(_p.cashrcpt_cust_id) END, round(_r.cashrcptitem_amount_base + _exchGain, 2), _p.cashrcpt_distdate, _p.custnote, pCashrcptid ); IF (_exchGain <> 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/R', 'CR', _r.aropen_doctype || '-' || _r.aropen_docnumber, getGainLossAccntId( CASE WHEN _r.aropen_doctype != 'R' THEN _arAccntid ELSE findDeferredAccount(_p.cashrcpt_cust_id) END ), round(_exchGain, 2) * -1, _p.cashrcpt_distdate, _p.custnote, pCashrcptid); END IF; END LOOP; -- Distribute Misc. Applications FOR _r IN SELECT cashrcptmisc_id, cashrcptmisc_accnt_id, cashrcptmisc_amount, (cashrcptmisc_amount / cashrcpt_curr_rate) AS cashrcptmisc_amount_base, cashrcptmisc_notes, cashrcpt_curr_id FROM cashrcptmisc JOIN cashrcpt ON (cashrcptmisc_cashrcpt_id = cashrcpt_id) WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid) LOOP -- Cache the running amount posted _posted_base := (_posted_base + _r.cashrcptmisc_amount_base); _posted := (_posted + _r.cashrcptmisc_amount); -- Record the cashrcpt application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id, arapply_reftype, arapply_ref_id ) VALUES ( _p.cashrcpt_cust_id, -1, 'K', '', -1, 'Misc.', '', _p.cashrcpt_fundstype, _p.cashrcpt_docnumber, round(_r.cashrcptmisc_amount, 2), TRUE, _p.applydate, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _r.cashrcpt_curr_id, 'CRD', _r.cashrcptmisc_id ); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', _r.cashrcptmisc_notes, _r.cashrcptmisc_accnt_id, round(_r.cashrcptmisc_amount_base, 2), _p.cashrcpt_distdate, _p.custnote, pCashrcptid ); END LOOP; -- Post any remaining Cash to an A/R Cash Despoit (Credit Memo) -- this credit memo may absorb an occasional currency exchange rounding error IF (round(_posted_base, 2) < round(_p.cashrcpt_amount_base, 2)) THEN _comment := ('Unapplied from ' || _p.cashrcpt_fundstype || '-' || _p.cashrcpt_docnumber); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', _comment, _p.prepaid_accnt_id, round(_p.cashrcpt_amount_base, 2) - round(_posted_base, 2), _p.cashrcpt_distdate, _p.custnote, pCashrcptid ); SELECT fetchArMemoNumber() INTO _arMemoNumber; IF(_p.cashrcpt_usecustdeposit) THEN -- Post Customer Deposit SELECT createARCashDeposit(_p.cashrcpt_cust_id, _arMemoNumber, '', _p.cashrcpt_distdate, (_p.cashrcpt_amount - _posted), _comment, pJournalNumber, _p.cashrcpt_curr_id) INTO _aropenid; ELSE -- Post A/R Credit Memo _aropenid := createARCreditMemo(NULL, _p.cashrcpt_cust_id, _arMemoNumber, '', _p.cashrcpt_distdate, (_p.cashrcpt_amount - _posted), _comment, -1, -1, -1, _p.cashrcpt_distdate, -1, NULL, 0, pJournalNumber, _p.cashrcpt_curr_id, _arAccntid); END IF; IF (_ccpayid IS NOT NULL) THEN INSERT INTO payaropen (payaropen_ccpay_id, payaropen_aropen_id, payaropen_amount, payaropen_curr_id ) VALUES (_ccpayid, _aropenid, _p.cashrcpt_amount, _p.cashrcpt_curr_id); END IF; -- Create Cash Receipt Item to capture posting IF (_predist=false) THEN INSERT INTO cashrcptitem ( cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount, cashrcptitem_applied ) VALUES ( pCashrcptid, _aropenid, (_p.cashrcpt_amount - _posted), false ); END IF; ELSIF (round(_posted_base, 2) > round((_p.cashrcpt_amount_base), 2)) THEN PERFORM insertIntoGLSeries(_sequence, 'A/R', 'CR', 'Currency Exchange Rounding - ' || _p.cashrcpt_docnumber, getGainLossAccntId(_debitAccntid), round(_posted_base, 2) - round((_p.cashrcpt_amount_base + _p.cashrcpt_discount_base), 2), _p.cashrcpt_distdate, _p.custnote, pCashrcptid); END IF; -- Debit Cash PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', (_p.cashrcpt_fundstype || '-' || _p.cashrcpt_docnumber), _debitAccntid, round(_p.cashrcpt_amount_base, 2) * -1, _p.cashrcpt_distdate, _p.custnote, pCashrcptid ); PERFORM postGLSeries(_sequence, pJournalNumber); -- convert the cashrcptitem records to applications against the cm/cd if we are _predist IF(_predist=true) THEN FOR _r IN SELECT * FROM cashrcptitem WHERE ((cashrcptitem_cashrcpt_id=pCashrcptid) AND (cashrcptitem_amount > 0)) LOOP -- Handle discount if applicable IF (_r.cashrcptitem_discount > 0) THEN PERFORM postCashReceiptDisc(_r.cashrcptitem_id, pJournalNumber); END IF; INSERT INTO arcreditapply (arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id) VALUES(_aropenid, _r.cashrcptitem_aropen_id, _r.cashrcptitem_amount, _p.cashrcpt_curr_id); _posted := (_posted + _r.cashrcptitem_amount); END LOOP; PERFORM postArCreditMemoApplication(_aropenid, _p.applydate); -- If there is any left over go ahead and create an additional cashrcptitem record for it with the amount IF (round(_posted, 2) < round(_p.cashrcpt_amount, 2)) THEN INSERT INTO cashrcptitem ( cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount, cashrcptitem_applied ) VALUES ( pCashrcptid, _aropenid, (_p.cashrcpt_amount - _posted), false ); END IF; END IF; -- Update the posted cashrcpt UPDATE cashrcpt SET cashrcpt_posted=TRUE, cashrcpt_posteddate=CURRENT_DATE, cashrcpt_postedby=getEffectiveXtUser() WHERE (cashrcpt_id=pCashrcptid); RETURN 1; END; $$; ALTER FUNCTION public.postcashreceipt(pcashrcptid integer, pjournalnumber integer) OWNER TO admin; -- -- Name: postcashreceiptdisc(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcashreceiptdisc(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptItemId ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _r RECORD; _t RECORD; _v RECORD; _ardiscountid INTEGER; _arMemoNumber TEXT; _arAccntid INTEGER; _discountAccntid INTEGER; _comment TEXT; _discprcnt NUMERIC; _check INTEGER; BEGIN -- Fetch base records for processing SELECT aropen_id, aropen_doctype, aropen_amount, cashrcptitem_discount, cashrcpt_cust_id, cashrcpt_distdate, cashrcpt_applydate, cashrcpt_curr_id, cashrcpt_fundstype, cashrcpt_docnumber, round(currToCurr(cashrcpt_curr_id, aropen_curr_id, cashrcptitem_discount, cashrcpt_distdate),2) AS aropen_discount INTO _r FROM cashrcptitem JOIN cashrcpt ON (cashrcptitem_cashrcpt_id=cashrcpt_id) JOIN aropen ON ( (aropen_id=cashrcptitem_aropen_id) AND (aropen_doctype IN ('I', 'D')) ) WHERE (cashrcptitem_id=pCashrcptItemId); -- Get discount account _discountAccntid := findardiscountaccount(_r.cashrcpt_cust_id); IF (_r.cashrcptitem_discount > 0) THEN -- Determine discount percentage _discprcnt := _r.aropen_discount / _r.aropen_amount; SELECT fetchArMemoNumber() INTO _arMemoNumber; _comment := 'Discount Credit from ' || _r.cashrcpt_fundstype || '-' || _r.cashrcpt_docnumber; -- Create misc credit memo record _ardiscountid := nextval('aropen_aropen_id_seq'); INSERT INTO aropen ( aropen_id, aropen_docdate, aropen_duedate, aropen_doctype, aropen_docnumber, aropen_curr_id, aropen_posted, aropen_amount) VALUES ( _ardiscountid, _r.cashrcpt_distdate, _r.cashrcpt_distdate, 'C', _arMemoNumber, _r.cashrcpt_curr_id, false,_r.cashrcptitem_discount); IF (fetchMetricBool('CreditTaxDiscount')) THEN -- proportional tax credits calculated and implemented for the credit memo generated by the discount IF (_r.aropen_doctype = 'I') THEN -- Tax for invoices SELECT aropen_cobmisc_id AS invcheadid, invchead_curr_id, invchead_invcdate INTO _t FROM aropen LEFT OUTER JOIN invchead ON (aropen_cobmisc_id = invchead_id) LEFT OUTER JOIN invcitem ON (invchead_id = invcitem_invchead_id) WHERE aropen_id = _r.aropen_id; FOR _v IN SELECT tax_sales_accnt_id, tax_id, round(sum(taxdetail_tax), 2) AS tax, currToBase(_t.invchead_curr_id, round(sum(taxdetail_tax), 2), _t.invchead_invcdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('I', _t.invcheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP INSERT INTO aropentax( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_basis) VALUES ( _ardiscountid, getadjustmenttaxtypeid(), _v.tax_id, 0.00, 0.00, (round((_v.tax * _discprcnt), 2) * -1), _r.cashrcpt_distdate, 0.00); END LOOP; ELSIF (_r.aropen_doctype = 'D') THEN -- Tax for debit memos INSERT INTO aropentax( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_basis) SELECT _ardiscountid, taxhist_taxtype_id, taxhist_tax_id, 0.00, 0.00, (round((taxhist_tax * _discprcnt), 2) * -1), _r.cashrcpt_distdate, 0.00 FROM aropentax WHERE (taxhist_parent_id=_r.aropen_id); END IF; END IF; -- End taxes -- Create credit memo for discount SELECT createARCreditMemo(_ardiscountid, _r.cashrcpt_cust_id, _arMemoNumber, '', _r.cashrcpt_distdate, _r.cashrcptitem_discount, _comment, -1, -1, _discountAccntid, _r.cashrcpt_distdate, -1, NULL, 0, pJournalNumber, _r.cashrcpt_curr_id) INTO _ardiscountid; -- Apply discount credit memo INSERT INTO arcreditapply ( arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id ) VALUES ( _ardiscountid, _r.aropen_id, _r.cashrcptitem_discount, _r.cashrcpt_curr_id ); SELECT postARCreditMemoApplication(_ardiscountid, _r.cashrcpt_applydate) INTO _check; IF (_check < 0) THEN RAISE EXCEPTION 'Error posting discount credit memo application. Code %', _check; END IF; END IF; -- End handle Discount RETURN 1; END; $_$; ALTER FUNCTION public.postcashreceiptdisc(integer, integer) OWNER TO admin; -- -- Name: postcccashreceipt(integer, integer, text, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcccashreceipt(pccpay integer, pdocid integer, pdoctype text DEFAULT NULL::text, pamount numeric DEFAULT NULL::numeric) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _aropenid INTEGER; _bankaccnt_id INTEGER; _c RECORD; _ccOrderDesc TEXT; _journal INTEGER; _realaccnt INTEGER; _return INTEGER := 0; BEGIN SELECT * INTO _c FROM ccpay, ccard, custinfo WHERE ( (ccpay_id = pCCpay) AND (ccpay_ccard_id = ccard_id) AND (ccpay_cust_id = cust_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot find the Credit Card transaction information [xtuple: postCCcashReceipt, -11, %]', pCCpay; END IF; IF (pamount IS NOT NULL) THEN _c.ccpay_amount = pamount; END IF; SELECT bankaccnt_id, bankaccnt_accnt_id INTO _bankaccnt_id, _realaccnt FROM ccbank JOIN bankaccnt ON (ccbank_bankaccnt_id=bankaccnt_id) WHERE (ccbank_ccard_type=_c.ccard_type); IF (_bankaccnt_id IS NULL) THEN RAISE EXCEPTION 'Cannot find the default Bank Account for this Credit Card [xtuple: postCCcredit, -1, %]', _c.ccard_type; END IF; _ccOrderDesc := (_c.ccard_type || '-' || _c.ccpay_order_number::TEXT || '-' || _c.ccpay_order_number_seq::TEXT); _journal := fetchJournalNumber('C/R'); IF (pdoctype = 'cashrcpt') THEN IF (COALESCE(pdocid, -1) < 0) THEN INSERT INTO cashrcpt ( cashrcpt_cust_id, cashrcpt_amount, cashrcpt_curr_id, cashrcpt_fundstype, cashrcpt_docnumber, cashrcpt_notes, cashrcpt_distdate, cashrcpt_bankaccnt_id, cashrcpt_usecustdeposit ) VALUES ( _c.ccpay_cust_id, _c.ccpay_amount, _c.ccpay_curr_id, _c.ccard_type, _c.ccpay_r_ordernum, _ccOrderDesc, CURRENT_DATE, _bankaccnt_id, fetchMetricBool('EnableCustomerDeposits')) RETURNING cashrcpt_id INTO _return; ELSE UPDATE cashrcpt SET cashrcpt_cust_id=_c.ccpay_cust_id, cashrcpt_amount=_c.ccpay_amount, cashrcpt_curr_id=_c.ccpay_curr_id, cashrcpt_fundstype=_c.ccard_type, cashrcpt_docnumber=_c.ccpay_r_ordernum, cashrcpt_notes=_ccOrderDesc, cashrcpt_distdate=CURRENT_DATE, cashrcpt_bankaccnt_id=_bankaccnt_id WHERE (cashrcpt_id=pdocid); _return := pdocid; END IF; ELSIF (pdoctype = 'cohead') THEN SELECT createARCreditMemo(NULL, _c.ccpay_cust_id, fetchArMemoNumber(), cohead_number, CURRENT_DATE, _c.ccpay_amount, 'Unapplied from ' || _ccOrderDesc, NULL, NULL, NULL, CURRENT_DATE, NULL, cohead_salesrep_id, NULL, _journal, _c.ccpay_curr_id, NULL, pCCpay) INTO _aropenid FROM cohead WHERE cohead_id = pdocid; IF (COALESCE(_aropenid, -1) < 0) THEN -- coalesce handles not-found case RAISE EXCEPTION '[xtuple: createARCreditMemo, %]', _aropenid; END IF; INSERT INTO payaropen (payaropen_ccpay_id, payaropen_aropen_id, payaropen_amount, payaropen_curr_id) VALUES (pccpay, _aropenid, _c.ccpay_amount, _c.ccpay_curr_id); INSERT INTO aropenalloc (aropenalloc_aropen_id, aropenalloc_doctype, aropenalloc_doc_id, aropenalloc_amount, aropenalloc_curr_id) VALUES (_aropenid, 'S', pdocid, _c.ccpay_amount, _c.ccpay_curr_id); _return := _aropenid; END IF; PERFORM insertGLTransaction(_journal, 'A/R', 'CR', _ccOrderDesc, ('Cash Receipt from Credit Card ' || _c.cust_name), findPrepaidAccount(_c.ccpay_cust_id), _realaccnt, NULL, ROUND(currToBase(_c.ccpay_curr_id, _c.ccpay_amount, _c.ccpay_transaction_datetime::DATE),2), CURRENT_DATE); RETURN _return; END; $$; ALTER FUNCTION public.postcccashreceipt(pccpay integer, pdocid integer, pdoctype text, pamount numeric) OWNER TO admin; -- -- Name: postcccredit(integer, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcccredit(integer, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCCpay ALIAS FOR $1; preftype ALIAS FOR $2; prefid ALIAS FOR $3; _c RECORD; _ccOrderDesc TEXT; _cglaccnt INTEGER; _dglaccnt INTEGER; _glseriesres INTEGER; _notes TEXT := 'Credit via Credit Card'; _r RECORD; _sequence INTEGER; _dmaropenid INTEGER; BEGIN IF ((preftype = 'cohead') AND NOT EXISTS(SELECT cohead_id FROM cohead WHERE (cohead_id=prefid))) THEN RAISE EXCEPTION 'Cannot find original Sales Order for this Credit Card credit [xtuple: postCCcredit, -2, %, %, %]', pCCpay, preftype, prefid; ELSIF ((preftype = 'aropen') AND NOT EXISTS(SELECT aropen_id FROM aropen WHERE (aropen_id=prefid))) THEN RAISE EXCEPTION 'Cannot find original A/R Open record for this Credit Card credit [xtuple: postCCcredit, -2, %, %, %]', pCCpay, preftype, prefid; ELSIF ((preftype = 'cmhead') AND NOT EXISTS(SELECT cmhead_id FROM cmhead WHERE cmhead_id=prefid)) THEN RAISE EXCEPTION 'Cannot find original Credit Memo record for this Credit Card credit [xtuple: postCCcredit, -2, %, %, %]', pCCpay, preftype, prefid; END IF; SELECT * INTO _c FROM ccpay JOIN ccard ON (ccpay_ccard_id = ccard_id) JOIN ccbank ON (ccard_type=ccbank_ccard_type) WHERE (ccpay_id = pCCpay); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot find the record for this Credit Card credit [xtuple: postCCcredit, -3, %, %, %]', pCCpay, preftype, prefid; END IF; IF (preftype = 'cohead') THEN _dglaccnt := findPrepaidAccount(_c.ccpay_cust_id); ELSE _dglaccnt := findARAccount(_c.ccpay_cust_id); END IF; SELECT bankaccnt_accnt_id INTO _cglaccnt FROM bankaccnt WHERE (bankaccnt_id=_c.ccbank_bankaccnt_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot find the default Bank Account for this Credit Card [xtuple: postCCcredit, -1, %]', pCCpay; END IF; IF (_c.ccpay_type != 'R') THEN RAISE EXCEPTION 'This Credit Card transaction is not a credit/refund [xtuple: postCCcredit, -4, %]', pCCpay; END IF; _sequence := fetchGLSequence(); IF (_c.ccpay_r_ref IS NOT NULL) THEN _ccOrderDesc := (_c.ccard_type || '-' || _c.ccpay_r_ref); ELSE _ccOrderDesc := (_c.ccard_type || '-' || _c.ccpay_order_number::TEXT || '-' || COALESCE(_c.ccpay_order_number_seq::TEXT, '')); END IF; _glseriesres := insertIntoGLSeries(_sequence, 'A/R', 'CC', _ccOrderDesc, _dglaccnt, ROUND(currToBase(_c.ccpay_curr_id, _c.ccpay_amount, _c.ccpay_transaction_datetime::DATE), 2) * -1, CURRENT_DATE, _notes); IF (_glseriesres < 0) THEN RAISE EXCEPTION 'Could not write debit side of Credit Card credit to the G/L [xtuple: insertIntoGLSeries, %]', _glseriesres; END IF; _glseriesres := insertIntoGLSeries(_sequence, 'A/R', 'CC', _ccOrderDesc, _cglaccnt, ROUND(currToBase(_c.ccpay_curr_id, _c.ccpay_amount, _c.ccpay_transaction_datetime::DATE),2), CURRENT_DATE, _notes); IF (_glseriesres < 0) THEN RAISE EXCEPTION 'Could not write credit side of Credit Card credit to the G/L [xtuple: insertIntoGLSeries, %]', _glseriesres; END IF; _glseriesres := postGLSeries(_sequence, fetchJournalNumber('C/R') ); IF (_glseriesres < 0) THEN RAISE EXCEPTION 'Could not post Credit Card credit to the G/L [xtuple: postglseries, %]', _glseriesres; END IF; IF (preftype = 'aropen') THEN SELECT * INTO _r FROM aropen WHERE (aropen_id=prefid); ELSE SELECT aropen.* INTO _r FROM ccpay n JOIN ccpay o ON (o.ccpay_id=n.ccpay_ccpay_id) JOIN payaropen ON (payaropen_ccpay_id=o.ccpay_id) JOIN aropen ON (payaropen_aropen_id=aropen_id) WHERE (n.ccpay_id=pCCpay); END IF; IF (FOUND) THEN SELECT createardebitmemo( NULL, _r.aropen_cust_id, NULL, fetchARMemoNumber(), _r.aropen_ordernumber, current_date, _c.ccpay_amount, _notes, -1, -1, -1, CURRENT_DATE, -1, NULL, 0, _r.aropen_curr_id) INTO _dmaropenid; IF (_r.aropen_open) THEN PERFORM applyARCreditMemoToBalance(_r.aropen_id, _dmaropenid); PERFORM postARCreditMemoApplication(_r.aropen_id); END IF; END IF; IF (preftype = 'cohead') THEN INSERT INTO payco ( payco_ccpay_id, payco_cohead_id, payco_amount, payco_curr_id ) VALUES ( pCCpay, prefid, 0 - _c.ccpay_amount, _c.ccpay_curr_id ); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.postcccredit(integer, text, integer) OWNER TO admin; -- -- Name: postccvoid(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postccvoid(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pccpayid ALIAS FOR $1; BEGIN -- for now this is very simple: mark the ccpay record voided. -- in the future this might be expanded to back out changes to other tables -- but for now the VOID request is sent to the credit card processing company -- before those other tables are modified. UPDATE ccpay SET ccpay_status = 'V' WHERE (ccpay_id=pccpayid); IF (NOT FOUND) THEN RETURN -1; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.postccvoid(integer) OWNER TO admin; -- -- Name: postcheck(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcheck(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcheckid ALIAS FOR $1; _journalNumber INTEGER := $2; _amount_base NUMERIC := 0; _credit_glaccnt INTEGER; _exchGain NUMERIC := 0; _exchGainTmp NUMERIC := 0; _gltransNote TEXT; _p RECORD; _r RECORD; _t RECORD; _sequence INTEGER; _test INTEGER; _cm BOOLEAN; _amount_check NUMERIC := 0; BEGIN _cm := FALSE; SELECT fetchGLSequence() INTO _sequence; IF (_journalNumber IS NULL) THEN _journalNumber := fetchJournalNumber('AP-CK'); END IF; SELECT checkhead.*, checkhead_amount / checkhead_curr_rate AS checkhead_amount_base, bankaccnt_accnt_id AS bankaccntid INTO _p FROM checkhead JOIN bankaccnt ON (checkhead_bankaccnt_id=bankaccnt_id) WHERE (checkhead_id=pcheckid); IF (FOUND) THEN IF (_p.checkhead_recip_type = 'V') THEN SELECT vend_number AS checkrecip_number, vend_name AS checkrecip_name, findAPAccount(vend_id) AS checkrecip_accnt_id, 'A/P'::text AS checkrecip_gltrans_source INTO _t FROM vendinfo WHERE (vend_id=_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'C') THEN SELECT cust_number AS checkrecip_number, cust_name AS checkrecip_name, findARAccount(cust_id) AS checkrecip_accnt_id, 'A/R'::text AS checkrecip_gltrans_source INTO _t FROM custinfo WHERE (cust_id=_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'T') THEN SELECT taxauth_code AS checkrecip_number, taxauth_name AS checkrecip_name, taxauth_accnt_id AS checkrecip_accnt_id, 'G/L'::text AS checkrecip_gltrans_source INTO _t FROM taxauth WHERE (taxauth_id=_p.checkhead_recip_id); ELSE RETURN -11; END IF; ELSE RETURN -11; END IF; IF (_p.checkhead_posted) THEN RETURN -10; END IF; IF (_p.checkhead_recip_type = 'C') THEN SELECT checkitem_id FROM checkitem INTO _test WHERE (checkitem_checkhead_id=pcheckid) LIMIT 1; IF (FOUND) THEN _cm := TRUE; END IF; END IF; _gltransNote := _t.checkrecip_number || '-' || _t.checkrecip_name; IF (_p.checkhead_misc AND NOT _cm) THEN IF (COALESCE(_p.checkhead_expcat_id, -1) < 0) THEN IF (_p.checkhead_recip_type = 'V') THEN PERFORM createAPCreditMemo( _p.checkhead_recip_id, _journalNumber, CAST(fetchAPMemoNumber() AS text), '', _p.checkhead_checkdate, _p.checkhead_amount, _gltransNote || ' ' || _p.checkhead_notes, -1, _p.checkhead_checkdate, -1, _p.checkhead_curr_id ); _credit_glaccnt := findAPPrepaidAccount(_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'C') THEN PERFORM createARDebitMemo(NULL, _p.checkhead_recip_id, NULL, fetchARMemoNumber(), '', _p.checkhead_checkdate, _p.checkhead_amount, _gltransNote || ' ' || _p.checkhead_notes, -1, -1, -1, _p.checkhead_checkdate, -1, NULL, 0, _p.checkhead_curr_id ); _credit_glaccnt := findPrepaidAccount(_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'T') THEN -- TODO: should we create a credit memo for the tax authority? how? _credit_glaccnt := _t.checkrecip_accnt_id; END IF; -- recip type ELSE IF (_cm) THEN _credit_glaccnt := findARAccount(_p.checkhead_recip_id); ELSE SELECT expcat_exp_accnt_id INTO _credit_glaccnt FROM expcat WHERE (expcat_id=_p.checkhead_expcat_id); IF (NOT FOUND) THEN RETURN -12; END IF; END IF; END IF; IF (COALESCE(_credit_glaccnt, -1) < 0) THEN RETURN -13; END IF; PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), _credit_glaccnt, round(_p.checkhead_amount_base, 2) * -1, _p.checkhead_checkdate, _gltransNote, pcheckid ); _amount_base := _p.checkhead_amount_base; ELSE FOR _r IN SELECT checkitem_amount, checkitem_discount, CASE WHEN (checkitem_apopen_id IS NOT NULL) THEN checkitem_amount / apopen_curr_rate ELSE currToBase(checkitem_curr_id, checkitem_amount, COALESCE(checkitem_docdate, _p.checkhead_checkdate)) END AS checkitem_amount_base, currTocurr(checkitem_curr_id, _p.checkhead_curr_id, checkitem_amount, _p.checkhead_checkdate) AS amount_check, apopen_id, apopen_doctype, apopen_docnumber, aropen_id, aropen_doctype, aropen_docnumber, checkitem_curr_id, checkitem_curr_rate, apopen_curr_rate, COALESCE(checkitem_docdate, _p.checkhead_checkdate) AS docdate FROM (checkitem LEFT OUTER JOIN apopen ON (checkitem_apopen_id=apopen_id)) LEFT OUTER JOIN aropen ON (checkitem_aropen_id=aropen_id) WHERE (checkitem_checkhead_id=pcheckid) LOOP _exchGainTmp := 0; IF (_r.apopen_id IS NOT NULL) THEN -- take the discount if specified before we do anything else IF(_r.checkitem_discount > 0.0) THEN PERFORM createAPDiscount(_r.apopen_id, _r.checkitem_discount); END IF; UPDATE apopen SET apopen_paid = round(apopen_paid + _r.checkitem_amount, 2), apopen_open = round(apopen_amount, 2) > round(apopen_paid + _r.checkitem_amount, 2), apopen_closedate = CASE WHEN (round(apopen_amount, 2) <= round(apopen_paid + _r.checkitem_amount, 2)) THEN _p.checkhead_checkdate END WHERE (apopen_id=_r.apopen_id); -- Post the application INSERT INTO apapply ( apapply_vend_id, apapply_postdate, apapply_username, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_journalnumber, apapply_amount, apapply_curr_id, apapply_checkhead_id ) VALUES ( _p.checkhead_recip_id, _p.checkhead_checkdate, getEffectiveXtUser(), -1, 'K', _p.checkhead_number, _r.apopen_id, _r.apopen_doctype, _r.apopen_docnumber, _journalNumber, _r.checkitem_amount, _r.checkitem_curr_id, _p.checkhead_id ); END IF; -- if check item's apopen_id is not null IF (_r.aropen_id IS NOT NULL) THEN UPDATE aropen SET aropen_paid = round(aropen_paid + _r.checkitem_amount, 2), aropen_open = round(aropen_amount, 2) > round(aropen_paid + _r.checkitem_amount, 2), aropen_closedate = CASE WHEN (round(aropen_amount, 2) <= round(aropen_paid + _r.checkitem_amount, 2)) THEN _p.checkhead_checkdate END WHERE (aropen_id=_r.aropen_id); -- Post the application INSERT INTO arapply ( arapply_cust_id, arapply_postdate, arapply_distdate, arapply_username, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_journalnumber, arapply_applied, arapply_curr_id ) VALUES ( _p.checkhead_recip_id, _p.checkhead_checkdate, _p.checkhead_checkdate, getEffectiveXtUser(), _r.aropen_id,_r.aropen_doctype, _r.aropen_docnumber, -1, 'K',_p.checkhead_number , _journalNumber, _r.checkitem_amount, _r.checkitem_curr_id ); END IF; -- if check item's aropen_id is not null IF (_r.apopen_id IS NOT NULL) THEN SELECT apCurrGain(_r.apopen_id,_r.checkitem_curr_id, _r.checkitem_amount, _p.checkhead_checkdate) INTO _exchGainTmp; ELSIF (_r.aropen_id IS NOT NULL) THEN SELECT arCurrGain(_r.aropen_id,_r.checkitem_curr_id, _r.checkitem_amount, _p.checkhead_checkdate) INTO _exchGainTmp; END IF; _exchGain := _exchGain + _exchGainTmp; PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), _t.checkrecip_accnt_id, round(_r.checkitem_amount_base, 2) * -1, _p.checkhead_checkdate, _gltransNote, pcheckid ); IF (_exchGainTmp <> 0) THEN PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), getGainLossAccntId(_t.checkrecip_accnt_id), round(_exchGainTmp,2), _p.checkhead_checkdate, _gltransNote, pcheckid ); END IF; _amount_check := (_amount_check + _r.amount_check); _amount_base := (_amount_base + _r.checkitem_amount_base); END LOOP; IF( (_amount_check - _p.checkhead_amount) <> 0.0 ) THEN _exchGainTmp := currToBase(_p.checkhead_curr_id, _amount_check - _p.checkhead_amount, _p.checkhead_checkdate); _exchGain := _exchGain + _exchGainTmp; END IF; -- ensure that the check balances, attribute rounding errors to gain/loss IF round(_amount_base, 2) - round(_exchGain, 2) <> round(_p.checkhead_amount_base, 2) THEN IF round(_amount_base - _exchGain, 2) = round(_p.checkhead_amount_base, 2) THEN PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), getGainLossAccntId(_p.bankaccntid), round(_amount_base, 2) - round(_exchGain, 2) - round(_p.checkhead_amount_base, 2), _p.checkhead_checkdate, _gltransNote, pcheckid ); ELSE RAISE EXCEPTION 'checkhead_id % does not balance (% - % <> %)', pcheckid, _amount_base, _exchGain, _p.checkhead_amount_base; END IF; END IF; END IF; PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), _p.bankaccntid, round(_p.checkhead_amount_base, 2), _p.checkhead_checkdate, _gltransNote, pcheckid ); PERFORM postGLSeries(_sequence, _journalNumber); UPDATE checkhead SET checkhead_posted=TRUE, checkhead_journalnumber=_journalNumber WHERE (checkhead_id=pcheckid); RETURN _journalNumber; END; $_$; ALTER FUNCTION public.postcheck(integer, integer) OWNER TO admin; -- -- Name: postchecks(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postchecks(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; _journalNumber INTEGER; BEGIN SELECT fetchJournalNumber('AP-CK') INTO _journalNumber; PERFORM postCheck(checkhead_id, _journalNumber) FROM checkhead WHERE ( (NOT checkhead_void) AND (NOT checkhead_posted) AND (checkhead_printed) AND (checkhead_bankaccnt_id=pBankaccntid) ); RETURN _journalNumber; END; $_$; ALTER FUNCTION public.postchecks(integer) OWNER TO admin; -- -- Name: postcomment(integer, text, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcomment(pcmnttypeid integer, psource text, psourceid integer, ptext text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN RETURN postComment(pCmnttypeid, pSource, pSourceid, pText, NULL); END $$; ALTER FUNCTION public.postcomment(pcmnttypeid integer, psource text, psourceid integer, ptext text) OWNER TO admin; -- -- Name: postcomment(integer, text, integer, text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcomment(pcmnttypeid integer, psource text, psourceid integer, ptext text, ppublic boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _commentid INTEGER; _public BOOLEAN; BEGIN _public := COALESCE(pPublic, fetchmetricbool('CommentPublicDefault')); INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text, comment_public ) VALUES ( pCmnttypeid, pSource, pSourceid, CURRENT_TIMESTAMP, getEffectiveXtUser(), pText, _public ) RETURNING comment_id INTO _commentid; RETURN _commentid; END; $$; ALTER FUNCTION public.postcomment(pcmnttypeid integer, psource text, psourceid integer, ptext text, ppublic boolean) OWNER TO admin; -- -- Name: postcomment(text, text, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcomment(pcmnttypename text, psource text, psourceid integer, ptext text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name=pCmnttypename); IF (NOT FOUND) THEN RAISE EXCEPTION 'Comment type % not found.', pCmnttypename; END IF; RETURN postComment(_cmnttypeid, pSource, pSourceid, pText, NULL); END $$; ALTER FUNCTION public.postcomment(pcmnttypename text, psource text, psourceid integer, ptext text) OWNER TO admin; -- -- Name: postcost(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcost(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemcostid ALIAS FOR $1; _p RECORD; BEGIN SELECT round(currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE),6) AS newcost, itemcost_curr_id, CURRENT_DATE AS effective, item_number, itemcost_stdcost AS oldcost INTO _p FROM itemcost, item WHERE ((itemcost_item_id=item_id) AND (itemcost_id=pItemcostid)); IF (_p.newcost IS NULL) THEN RAISE EXCEPTION 'There is no valid Exchange Rate for this currency. (%, %)', _p.itemcost_curr_id, _p.effective; RETURN FALSE; END IF; RETURN updateStdCost(pItemcostid, _p.newcost, _p.oldcost, 'Post Cost', ('Post Actual Cost to Standard for item ' || _p.item_number)); END; $_$; ALTER FUNCTION public.postcost(integer) OWNER TO admin; -- -- Name: postcountslip(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcountslip(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntslipid ALIAS FOR $1; _p RECORD; _comments TEXT; _temp TEXT; BEGIN SELECT itemsite_loccntrl, itemsite_controlmethod, cntslip_posted, cntslip_lotserial, cntslip_comments, cntslip_number, cntslip_qty INTO _p FROM cntslip, invcnt, itemsite WHERE ( (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id) AND (cntslip_id=pCntslipid) ); IF (NOT _p.cntslip_posted) THEN SELECT ( E'\nCount Slip #' || _p.cntslip_number || ' counted ' || formatQty(_p.cntslip_qty) ) INTO _comments; -- Add the Location name if the itemsite is MLC IF (_p.itemsite_loccntrl) THEN SELECT ( ', Location:' || location_name ) INTO _temp FROM location, cntslip WHERE ( (cntslip_location_id=location_id) AND (cntslip_id=pCntslipid) ); _comments := (_comments || _temp); END IF; -- Add the Lot/Serial if the itemsite is Lot or Serial controlled IF (_p.itemsite_controlmethod = 'L') THEN _comments := (_comments || ( ', Lot #:' || _p.cntslip_lotserial)); ELSIF (_p.itemsite_controlmethod = 'S') THEN _comments := (_comments || ( ', Serial #:' || _p.cntslip_lotserial)); END IF; _comments := (_comments || ' ' || _p.cntslip_comments); UPDATE cntslip SET cntslip_posted=TRUE WHERE (cntslip_id=pCntslipid); UPDATE invcnt SET invcnt_qoh_after = ( COALESCE(invcnt_qoh_after, 0) + cntslip_qty), invcnt_comments = (invcnt_comments || _comments) FROM cntslip WHERE ( (cntslip_cnttag_id=invcnt_id) AND (cntslip_id=pCntslipid) ); RETURN 1; ELSE RETURN -1; END IF; END; $_$; ALTER FUNCTION public.postcountslip(integer) OWNER TO admin; -- -- Name: postcounttag(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcounttag(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcntid ALIAS FOR $1; pThaw ALIAS FOR $2; _avgCostingMethod TEXT; _invhistid INTEGER; _postDate TIMESTAMP; _runningQty NUMERIC; _errorCode INTEGER; _itemlocSeries INTEGER := 0; _hasDetail BOOLEAN; _p RECORD; _itemloc RECORD; _cntslip RECORD; _lsid INTEGER; BEGIN SELECT COALESCE(fetchMetricText('CountAvgCostMethod'), 'STD') INTO _avgCostingMethod; SELECT invcnt_id, invcnt_tagnumber, invcnt_qoh_after, invcnt_location_id, item_number, itemsite_id, itemsite_freeze, itemsite_qtyonhand, itemsite_loccntrl, itemsite_location_id, CASE WHEN (itemsite_costmethod = 'N') THEN 0 WHEN ( (itemsite_costmethod = 'A') AND (itemsite_qtyonhand = 0) AND (_avgCostingMethod = 'ACT') ) THEN actcost(itemsite_item_id) WHEN ( (itemsite_costmethod = 'A') AND (_avgCostingMethod IN ('ACT', 'AVG')) ) THEN avgcost(itemsite_id) ELSE stdcost(itemsite_item_id) END AS cost, itemsite_costmethod, itemsite_controlmethod, itemsite_value INTO _p FROM invcnt, itemsite, item WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invcnt_qoh_after IS NOT NULL) AND (NOT invcnt_posted) AND (invcnt_id=pInvcntid) ); IF (FOUND) THEN -- If the invcnt_location_id is not null then -- call a separate function so as not to affect -- the existing functionality. IF (_p.invcnt_location_id IS NOT NULL) THEN RETURN postCountTagLocation(pInvcntid, pThaw); END IF; SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; IF (_p.itemsite_freeze) THEN SELECT invcnt_tagdate INTO _postDate FROM invcnt WHERE (invcnt_id=pInvcntid) ; ELSE _postDate = CURRENT_TIMESTAMP; END IF; _hasDetail = FALSE; -- Post the detail indicated by cntslips IF ( (_p.itemsite_loccntrl) OR (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; -- Adjust any existing detail to 0 FOR _itemloc IN SELECT itemloc_id, itemloc_location_id, itemloc_ls_id, itemloc_qty FROM itemloc WHERE (itemloc_itemsite_id=_p.itemsite_id) LOOP _hasDetail = TRUE; -- Create the itemlocdist flushing records INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_expiration, itemlocdist_itemsite_id, itemlocdist_invhist_id, itemlocdist_flush ) VALUES ( _itemlocSeries, 'I', _itemloc.itemloc_id, endOfTime(), _p.itemsite_id, _invhistid, TRUE ); END LOOP; -- Clear the running detail Qty _runningQty := 0; -- Adjust the detail to the cntslip indicated value FOR _cntslip IN SELECT cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, SUM(cntslip_qty) AS qty, itemsite_item_id FROM cntslip, invcnt, itemsite WHERE ((cntslip_cnttag_id=pInvcntid) AND (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id)) GROUP BY cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc,itemsite_item_id LOOP -- Handle the LotSerial IF (LENGTH(_cntslip.cntslip_lotserial)>0) THEN SELECT ls_id INTO _lsid FROM ls WHERE ((ls_item_id=_cntslip.itemsite_item_id) AND (UPPER(ls_number)=UPPER(_cntslip.cntslip_lotserial))); IF (NOT FOUND) THEN _lsid := NEXTVAL('ls_ls_id_seq'); INSERT INTO ls VALUES (_lsid,_cntslip.itemsite_item_id,UPPER(_cntslip.cntslip_lotserial)); END IF; END IF; -- Track the running Qty _runningQty := (_runningQty + _cntslip.qty); _hasDetail = TRUE; -- Create the itemlocdist populating record INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_warranty, itemlocdist_qty, itemlocdist_invhist_id ) VALUES ( _itemlocSeries, 'L', _cntslip.cntslip_location_id, _p.itemsite_id, _lsid, COALESCE(_cntslip.cntslip_lotserial_expiration, endOfTime()), _cntslip.cntslip_lotserial_warrpurc,_cntslip.qty, _invhistid ); END LOOP; IF (_runningQty > _p.invcnt_qoh_after) THEN -- The total Count Slip Qty is greater than the Count Tag Qty, -- Don't post the Count. _errorCode = -1; ELSIF ( (_runningQty < _p.invcnt_qoh_after) AND (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and the Item Site is Lot/Serial controlled. -- Don't post the Count. _errorCode = -2; ELSIF (_runningQty < _p.invcnt_qoh_after) THEN IF ( (NOT _p.itemsite_loccntrl) OR (_p.itemsite_location_id = -1) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and there isn't a default location to post into. -- Don't post the Count. _errorCode = -3; ELSIF ( SELECT (metric_value='f') FROM metric WHERE (metric_name='PostCountTagToDefault') ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and we don't post Count Tags to default Locations -- Don't post the Count. _errorCode = -4; ELSE -- Distribute the remaining qty into the default location. INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_expiration, itemlocdist_qty, itemlocdist_invhist_id ) SELECT _itemlocSeries, 'L', _p.itemsite_location_id, _p.itemsite_id, endOfTime(), (_p.invcnt_qoh_after - _runningQty), _invhistid; _hasDetail = TRUE; _errorCode = 0; END IF; ELSE -- The Count Slip Qty. must equal the Count Tag Qty. _errorCode = 0; END IF; -- If we shouldn't post the count then delete the itemlocdist records, -- and return with the error. IF (_errorCode <> 0) THEN DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); RETURN _errorCode; END IF; END IF; -- Mod. the Count Tag. UPDATE invcnt SET invcnt_qoh_before=_p.itemsite_qtyonhand, invcnt_postdate=_postDate, invcnt_posted=TRUE, invcnt_invhist_id=_invhistid, invcnt_post_username=getEffectiveXtUser() WHERE (invcnt_id=pInvcntid); -- Create the CC transaction INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT _invhistid, itemsite_id, _postDate, 'CC', (invcnt_qoh_after - invcnt_qoh_before), invcnt_qoh_before, invcnt_qoh_after, invcnt_tagnumber, invcnt_comments, uom_name, _p.cost, _hasDetail, _p.itemsite_costmethod, _p.itemsite_value, _p.itemsite_value + (_p.cost * (invcnt_qoh_after - invcnt_qoh_before)), _itemlocSeries FROM itemsite, invcnt, item, uom WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (invcnt_id=pInvcntid) ); IF ( SELECT metric_value FROM metric WHERE ((metric_name = 'EnableAsOfQOH') AND (metric_value = 't'))) THEN IF (NOT postIntoInvBalance(_invhistid)) THEN RAISE EXCEPTION 'Post into Inventory Balance for invhist_id=% was unsuccessful',_invhistid; END IF; END IF; -- Update the QOH -- Avoid negative value when average cost item UPDATE itemsite SET itemsite_qtyonhand=_p.invcnt_qoh_after, itemsite_nnqoh = 0, itemsite_value = CASE WHEN ((itemsite_costmethod='A') AND (_p.itemsite_value + (_p.cost * (_p.invcnt_qoh_after - itemsite_qtyonhand))) < 0.0) THEN 0.0 ELSE (_p.itemsite_value + (_p.cost * (_p.invcnt_qoh_after - itemsite_qtyonhand))) END, itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); -- Post the detail, if any IF (_hasDetail) THEN PERFORM distributeItemlocSeries(_itemlocSeries); END IF; -- Thaw the itemsite if it's frozen IF (pThaw) THEN PERFORM thawItemSite(invcnt_itemsite_id) FROM invcnt WHERE (invcnt_id=pInvcntid); END IF; -- Distribute to G/L PERFORM insertGLTransaction( 'I/M', 'CT', _p.invcnt_tagnumber, ('Post Count Tag #' || _p.invcnt_tagnumber || ' for Item ' || _p.item_number), costcat_adjustment_accnt_id, costcat_asset_accnt_id, _invhistid, ( (_p.invcnt_qoh_after - _p.itemsite_qtyonhand) * _p.cost), _postDate::DATE ) FROM invcnt, itemsite, costcat WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (invcnt_id=pInvcntid) ); RETURN 0; ELSE RETURN -9; END IF; END; $_$; ALTER FUNCTION public.postcounttag(integer, boolean) OWNER TO admin; -- -- Name: postcounttaglocation(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcounttaglocation(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcntid ALIAS FOR $1; pThaw ALIAS FOR $2; _avgCostingMethod TEXT; _invhistid INTEGER; _postDate TIMESTAMP; _runningQty NUMERIC; _errorCode INTEGER; _itemlocSeries INTEGER := 0; _hasDetail BOOLEAN; _p RECORD; _itemloc RECORD; _cntslip RECORD; _origLocQty NUMERIC; _netable BOOLEAN; _lsid INTEGER; BEGIN SELECT COALESCE(fetchMetricText('CountAvgCostMethod'), 'STD') INTO _avgCostingMethod; SELECT invcnt_id, invcnt_tagnumber, invcnt_qoh_after, invcnt_location_id, invcnt_tagdate, item_number, itemsite_id, itemsite_freeze, itemsite_qtyonhand, itemsite_loccntrl, COALESCE(invcnt_location_id, -1) AS itemsite_location_id, CASE WHEN (itemsite_costmethod = 'N') THEN 0 WHEN ( (itemsite_costmethod = 'A') AND (itemsite_qtyonhand = 0) AND (_avgCostingMethod = 'ACT') ) THEN actcost(itemsite_item_id) WHEN ( (itemsite_costmethod = 'A') AND (_avgCostingMethod IN ('ACT', 'AVG')) ) THEN avgcost(itemsite_id) ELSE stdcost(itemsite_item_id) END AS cost, itemsite_costmethod, itemsite_controlmethod, itemsite_value INTO _p FROM invcnt, itemsite, item WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invcnt_qoh_after IS NOT NULL) AND (NOT invcnt_posted) AND (invcnt_id=pInvcntid) ); IF (NOT FOUND) THEN RETURN -9; END IF; SELECT COALESCE(SUM(itemloc_qty),0.0), location_netable INTO _origLocQty,_netable FROM itemloc,location WHERE ((itemloc_itemsite_id=_p.itemsite_id) AND (location_id=itemloc_location_id) AND (itemloc_location_id=_p.invcnt_location_id)) GROUP BY location_netable; IF (NOT FOUND) THEN _origLocQty := 0.0; _netable := TRUE; END IF; SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; IF (_p.itemsite_freeze) THEN _postDate := _p.invcnt_tagdate; ELSE _postDate := CURRENT_TIMESTAMP; END IF; _hasDetail = FALSE; -- Post the detail indicated by cntslips IF ( (_p.itemsite_loccntrl) OR (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; -- Adjust any existing detail to 0 FOR _itemloc IN SELECT itemloc_id, itemloc_location_id, itemloc_ls_id, itemloc_qty FROM itemloc WHERE ((itemloc_itemsite_id=_p.itemsite_id) AND (itemloc_location_id=_p.invcnt_location_id)) LOOP _hasDetail = TRUE; -- Create the itemlocdist flushing records INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_expiration, itemlocdist_itemsite_id, itemlocdist_invhist_id, itemlocdist_flush ) VALUES ( _itemlocSeries, 'I', _itemloc.itemloc_id, endOfTime(), _p.itemsite_id, _invhistid, TRUE ); END LOOP; -- Clear the running detail Qty _runningQty := 0; -- Adjust the detail to the cntslip indicated value FOR _cntslip IN SELECT cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, SUM(cntslip_qty) AS qty, itemsite_item_id FROM cntslip,invcnt,itemsite WHERE ((cntslip_cnttag_id=pInvcntid) AND (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id)) GROUP BY cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, itemsite_item_id LOOP -- Handle the LotSerial IF (LENGTH(_cntslip.cntslip_lotserial)>0) THEN SELECT ls_id INTO _lsid FROM ls WHERE ((ls_item_id=_cntslip.itemsite_item_id) AND (UPPER(ls_number)=UPPER(_cntslip.cntslip_lotserial))); IF (NOT FOUND) THEN _lsid := NEXTVAL('ls_ls_id_seq'); INSERT INTO ls VALUES (_lsid,_cntslip.itemsite_item_id,UPPER(_cntslip.cntslip_lotserial)); END IF; END IF; -- Track the running Qty _runningQty := (_runningQty + _cntslip.qty); _hasDetail = TRUE; -- Create the itemlocdist populating record INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_warranty, itemlocdist_qty, itemlocdist_invhist_id ) VALUES ( _itemlocSeries, 'L', _cntslip.cntslip_location_id, _p.itemsite_id, _lsid, COALESCE(_cntslip.cntslip_lotserial_expiration, endOfTime()), _cntslip.cntslip_lotserial_warrpurc, _cntslip.qty, _invhistid ); END LOOP; IF (_runningQty > _p.invcnt_qoh_after) THEN -- The total Count Slip Qty is greater than the Count Tag Qty, -- Don't post the Count. _errorCode = -1; ELSIF ( (_runningQty < _p.invcnt_qoh_after) AND (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and the Item Site is Lot/Serial controlled. -- Don't post the Count. _errorCode = -2; ELSIF (_runningQty < _p.invcnt_qoh_after) THEN IF ( (NOT _p.itemsite_loccntrl) OR (_p.itemsite_location_id = -1) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and there isn't a default location to post into. -- Don't post the Count. _errorCode = -3; ELSIF ( SELECT (metric_value='f') FROM metric WHERE (metric_name='PostCountTagToDefault') ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and we don't post Count Tags to default Locations -- Don't post the Count. _errorCode = -4; ELSE -- Distribute the remaining qty into the default location. INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_qty, itemlocdist_invhist_id ) SELECT _itemlocSeries, 'L', _p.itemsite_location_id, _p.itemsite_id, _lsid, endOfTime(), (_p.invcnt_qoh_after - _runningQty), _invhistid; _hasDetail = TRUE; _errorCode = 0; END IF; ELSE -- The Count Slip Qty. must equal the Count Tag Qty. _errorCode = 0; END IF; -- If we shouldn't post the count then delete the itemlocdist records, -- and return with the error. IF (_errorCode <> 0) THEN DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); RETURN _errorCode; END IF; END IF; -- Mod. the Count Tag. UPDATE invcnt SET invcnt_qoh_before=_origLocQty, invcnt_postdate=_postDate, invcnt_posted=TRUE, invcnt_invhist_id=_invhistid, invcnt_post_username=getEffectiveXtUser() WHERE (invcnt_id=pInvcntid); -- Create the CC transaction INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT _invhistid, itemsite_id, _postDate, 'CC', (invcnt_qoh_after - invcnt_qoh_before), invcnt_qoh_before, invcnt_qoh_after, invcnt_tagnumber, invcnt_comments, uom_name, _p.cost, _hasDetail, _p.itemsite_costmethod, _p.itemsite_value, _p.itemsite_value + (_p.cost * (invcnt_qoh_after - invcnt_qoh_before)), _itemlocSeries FROM itemsite, invcnt, item, uom WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (invcnt_id=pInvcntid) ); -- Update the QOH IF (_netable) THEN UPDATE itemsite SET itemsite_qtyonhand= itemsite_qtyonhand + (_p.invcnt_qoh_after - _origLocQty), itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); ELSE UPDATE itemsite SET itemsite_nnqoh = itemsite_nnqoh - _origLocQty, itemsite_qtyonhand = itemsite_qtyonhand + _p.invcnt_qoh_after, itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); END IF; -- Post the detail, if any IF (_hasDetail) THEN PERFORM distributeItemlocSeries(_itemlocSeries); END IF; -- Thaw the itemsite if it's frozen IF (pThaw) THEN PERFORM thawItemSite(invcnt_itemsite_id) FROM invcnt WHERE (invcnt_id=pInvcntid); END IF; -- Distribute to G/L PERFORM insertGLTransaction( 'I/M', 'CT', _p.invcnt_tagnumber, ('Post Count Tag #' || _p.invcnt_tagnumber || ' for Item ' || _p.item_number), costcat_adjustment_accnt_id, costcat_asset_accnt_id, _invhistid, ( (_p.invcnt_qoh_after - _origLocQty) * _p.cost), CURRENT_DATE ) FROM invcnt, itemsite, costcat WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (invcnt_id=pInvcntid) ); RETURN 0; END; $_$; ALTER FUNCTION public.postcounttaglocation(integer, boolean) OWNER TO admin; -- -- Name: postcounttaglocation(integer, boolean, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcounttaglocation(integer, boolean, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pInvcntid ALIAS FOR $1; pThaw ALIAS FOR $2; pAvgCostingMethod ALIAS FOR $3; _invhistid INTEGER; _postDate TIMESTAMP; _runningQty NUMERIC; _errorCode INTEGER; _itemlocSeries INTEGER := 0; _hasDetail BOOLEAN; _p RECORD; _itemloc RECORD; _cntslip RECORD; _origLocQty NUMERIC; _netable BOOLEAN; _lsid INTEGER; BEGIN SELECT invcnt_id, invcnt_tagnumber, invcnt_qoh_after, invcnt_location_id, invcnt_tagdate, item_number, itemsite_id, itemsite_freeze, itemsite_qtyonhand, itemsite_loccntrl, COALESCE(invcnt_location_id, -1) AS itemsite_location_id, CASE WHEN (itemsite_costmethod = 'N') THEN 0 WHEN ( (itemsite_costmethod = 'A') AND (itemsite_qtyonhand = 0) AND (pAvgCostingMethod = 'ACT') ) THEN actcost(itemsite_item_id) WHEN ( (itemsite_costmethod = 'A') AND (pAvgCostingMethod IN ('ACT', 'AVG')) ) THEN avgcost(itemsite_id) ELSE stdcost(itemsite_item_id) END AS cost, itemsite_costmethod, itemsite_controlmethod, itemsite_value INTO _p FROM invcnt, itemsite, item WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invcnt_qoh_after IS NOT NULL) AND (NOT invcnt_posted) AND (invcnt_id=pInvcntid) ); IF (NOT FOUND) THEN RETURN -9; END IF; SELECT COALESCE(SUM(itemloc_qty),0.0), location_netable INTO _origLocQty,_netable FROM itemloc,location WHERE ((itemloc_itemsite_id=_p.itemsite_id) AND (location_id=itemloc_location_id) AND (itemloc_location_id=_p.invcnt_location_id)) GROUP BY location_netable; IF (NOT FOUND) THEN _origLocQty := 0.0; _netable := TRUE; END IF; SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; IF (_p.itemsite_freeze) THEN _postDate := _p.invcnt_tagdate; ELSE _postDate := CURRENT_TIMESTAMP; END IF; _hasDetail = FALSE; -- Post the detail indicated by cntslips IF ( (_p.itemsite_loccntrl) OR (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; -- Adjust any existing detail to 0 FOR _itemloc IN SELECT itemloc_id, itemloc_location_id, itemloc_ls_id, itemloc_qty FROM itemloc WHERE ((itemloc_itemsite_id=_p.itemsite_id) AND (itemloc_location_id=_p.invcnt_location_id)) LOOP _hasDetail = TRUE; -- Create the itemlocdist flushing records INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_expiration, itemlocdist_itemsite_id, itemlocdist_invhist_id, itemlocdist_flush ) VALUES ( _itemlocSeries, 'I', _itemloc.itemloc_id, endOfTime(), _p.itemsite_id, _invhistid, TRUE ); END LOOP; -- Clear the running detail Qty _runningQty := 0; -- Adjust the detail to the cntslip indicated value FOR _cntslip IN SELECT cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, SUM(cntslip_qty) AS qty, itemsite_item_id FROM cntslip,invcnt,itemsite WHERE ((cntslip_cnttag_id=pInvcntid) AND (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id)) GROUP BY cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, itemsite_item_id LOOP -- Handle the LotSerial IF (LENGTH(_cntslip.cntslip_lotserial)>0) THEN SELECT ls_id INTO _lsid FROM ls WHERE ((ls_item_id=_cntslip.itemsite_item_id) AND (UPPER(ls_number)=UPPER(_cntslip.cntslip_lotserial))); IF (NOT FOUND) THEN _lsid := NEXTVAL('ls_ls_id_seq'); INSERT INTO ls VALUES (_lsid,_cntslip.itemsite_item_id,UPPER(_cntslip.cntslip_lotserial)); END IF; END IF; -- Track the running Qty _runningQty := (_runningQty + _cntslip.qty); _hasDetail = TRUE; -- Create the itemlocdist populating record INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_warranty, itemlocdist_qty, itemlocdist_invhist_id ) VALUES ( _itemlocSeries, 'L', _cntslip.cntslip_location_id, _p.itemsite_id, _lsid, COALESCE(_cntslip.cntslip_lotserial_expiration, endOfTime()), _cntslip.cntslip_lotserial_warrpurc, _cntslip.qty, _invhistid ); END LOOP; IF (_runningQty > _p.invcnt_qoh_after) THEN -- The total Count Slip Qty is greater than the Count Tag Qty, -- Don't post the Count. _errorCode = -1; ELSIF ( (_runningQty < _p.invcnt_qoh_after) AND (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and the Item Site is Lot/Serial controlled. -- Don't post the Count. _errorCode = -2; ELSIF (_runningQty < _p.invcnt_qoh_after) THEN IF ( (NOT _p.itemsite_loccntrl) OR (_p.itemsite_location_id = -1) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and there isn't a default location to post into. -- Don't post the Count. _errorCode = -3; ELSIF ( SELECT (metric_value='f') FROM metric WHERE (metric_name='PostCountTagToDefault') ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and we don't post Count Tags to default Locations -- Don't post the Count. _errorCode = -4; ELSE -- Distribute the remaining qty into the default location. INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_qty, itemlocdist_invhist_id ) SELECT _itemlocSeries, 'L', _p.itemsite_location_id, _p.itemsite_id, _lsid, endOfTime(), (_p.invcnt_qoh_after - _runningQty), _invhistid; _hasDetail = TRUE; _errorCode = 0; END IF; ELSE -- The Count Slip Qty. must equal the Count Tag Qty. _errorCode = 0; END IF; -- If we shouldn't post the count then delete the itemlocdist records, -- and return with the error. IF (_errorCode <> 0) THEN DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); RETURN _errorCode; END IF; END IF; -- Mod. the Count Tag. UPDATE invcnt SET invcnt_qoh_before=_origLocQty, invcnt_postdate=_postDate, invcnt_posted=TRUE, invcnt_invhist_id=_invhistid, invcnt_post_username=CURRENT_USER WHERE (invcnt_id=pInvcntid); -- Create the CC transaction INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT _invhistid, itemsite_id, _postDate, 'CC', (invcnt_qoh_after - invcnt_qoh_before), invcnt_qoh_before, invcnt_qoh_after, invcnt_tagnumber, invcnt_comments, uom_name, _p.cost, _hasDetail, _p.itemsite_costmethod, _p.itemsite_value, _p.itemsite_value + (_p.cost * (invcnt_qoh_after - invcnt_qoh_before)), _itemlocSeries FROM itemsite, invcnt, item, uom WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (invcnt_id=pInvcntid) ); -- Update the QOH IF (_netable) THEN UPDATE itemsite SET itemsite_qtyonhand= itemsite_qtyonhand + (_p.invcnt_qoh_after - _origLocQty), itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); ELSE UPDATE itemsite SET itemsite_nnqoh = itemsite_nnqoh - _origLocQty, itemsite_qtyonhand = itemsite_qtyonhand + _p.invcnt_qoh_after, itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); END IF; -- Post the detail, if any IF (_hasDetail) THEN PERFORM distributeItemlocSeries(_itemlocSeries); END IF; -- Thaw the itemsite if it's frozen IF (pThaw) THEN PERFORM thawItemSite(invcnt_itemsite_id) FROM invcnt WHERE (invcnt_id=pInvcntid); END IF; -- Distribute to G/L PERFORM insertGLTransaction( 'I/M', 'CT', _p.invcnt_tagnumber, ('Post Count Tag #' || _p.invcnt_tagnumber || ' for Item ' || _p.item_number), costcat_adjustment_accnt_id, costcat_asset_accnt_id, _invhistid, ( (_p.invcnt_qoh_after - _origLocQty) * _p.cost), CURRENT_DATE ) FROM invcnt, itemsite, costcat WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (invcnt_id=pInvcntid) ); RETURN 0; END; $_$; ALTER FUNCTION public.postcounttaglocation(integer, boolean, text) OWNER TO admin; -- -- Name: postcounttags(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcounttags(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pThaw ALIAS FOR $2; _invcnt RECORD; _result INTEGER := 0; _return INTEGER := 0; BEGIN FOR _invcnt IN SELECT invcnt_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND ( (pWarehousid=-1) OR (itemsite_warehous_id=pWarehousid) ) AND (invcnt_qoh_after IS NOT NULL) AND (NOT invcnt_posted) ) LOOP SELECT postCountTag(_invcnt.invcnt_id, pThaw) INTO _result; IF (_result < _return) THEN _return := _result; END IF; END LOOP; RETURN _return; END; $_$; ALTER FUNCTION public.postcounttags(integer, boolean) OWNER TO admin; -- -- Name: postcreditmemo(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcreditmemo(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; pItemlocSeries ALIAS FOR $2; _return INTEGER; BEGIN SELECT postCreditMemo(pCmheadid, fetchJournalNumber('AR-CM'), pItemlocSeries) INTO _return; RETURN _return; END; $_$; ALTER FUNCTION public.postcreditmemo(integer, integer) OWNER TO admin; -- -- Name: postcreditmemo(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcreditmemo(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; _r RECORD; _p RECORD; _aropenid INTEGER; _cohistid INTEGER; _sequence INTEGER; _itemlocSeries INTEGER; _invhistid INTEGER; _test INTEGER; _totalAmount NUMERIC := 0; _commissionDue NUMERIC := 0; _toApply NUMERIC; _toClose BOOLEAN; _glDate DATE; _taxBaseValue NUMERIC := 0; BEGIN -- Cache some parameters SELECT cmhead.*, findARAccount(cmhead_cust_id) AS ar_accnt_id, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM cmheadtax WHERE ( (taxhist_parent_id = cmhead_id) AND (taxhist_taxtype_id = getAdjustmentTaxtypeId()) ) ) AS adjtax INTO _p FROM cmhead WHERE (cmhead_id=pCmheadid); IF (_p.cmhead_posted) THEN RETURN -10; END IF; IF (_p.cmhead_hold) THEN RETURN -11; END IF; _glDate := COALESCE(_p.cmhead_gldistdate, _p.cmhead_docdate); _itemlocSeries = pItemlocSeries; SELECT fetchGLSequence() INTO _sequence; -- Start by handling taxes FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.cmhead_curr_id, round(sum(taxdetail_tax),2), _p.cmhead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('CM', pCmheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, _r.tax_sales_accnt_id, _r.taxbasevalue, _glDate, _p.cmhead_billtoname ); _totalAmount := _totalAmount + _r.tax * -1; END LOOP; -- Update item tax records with posting data UPDATE cmitemtax SET taxhist_docdate=_p.cmhead_docdate, taxhist_distdate=_glDate, taxhist_curr_id=_p.cmhead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM cmhead JOIN cmitem ON (cmhead_id=cmitem_cmhead_id), curr_rate WHERE ((cmhead_id=pCmheadId) AND (taxhist_parent_id=cmitem_id) AND (_p.cmhead_curr_id=curr_id) AND (_p.cmhead_docdate BETWEEN curr_effective AND curr_expires) ); -- Update Header taxes (Freight and Adjustments) with posting data UPDATE cmheadtax SET taxhist_docdate=_p.cmhead_docdate, taxhist_distdate=_glDate, taxhist_curr_id=_p.cmhead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM curr_rate WHERE ((taxhist_parent_id=pCmheadId) AND (_p.cmhead_curr_id=curr_id) AND (_p.cmhead_docdate BETWEEN curr_effective AND curr_expires) ); -- Process line items -- Always use std cost FOR _r IN SELECT *, stdCost(item_id) AS std_cost FROM creditmemoitem WHERE ( (cmitem_cmhead_id=pCmheadid) AND (cmitem_qtycredit <> 0 ) ) LOOP -- Calcuate the Commission to be debited _commissionDue := (_commissionDue + (_r.extprice * _p.cmhead_commission)); IF (_r.extprice <> 0) THEN -- Debit the Sales Account for the current cmitem SELECT insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, CASE WHEN _p.cmhead_rahead_id IS NULL THEN getPrjAccntId(_p.cmhead_prj_id, salesaccnt_credit_accnt_id) ELSE getPrjAccntId(_p.cmhead_prj_id, salesaccnt_returns_accnt_id) END, round(currToBase(_p.cmhead_curr_id, _r.extprice * -1, _p.cmhead_docdate), 2), _glDate, _p.cmhead_billtoname) INTO _test FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.cmitem_itemsite_id, 'IS', _p.cmhead_cust_id, _p.cmhead_saletype_id, _p.cmhead_shipzone_id)); IF (NOT FOUND) THEN PERFORM deleteGLSeries(_sequence); RETURN -12; END IF; END IF; -- Record Sales History for this C/M Item SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.cmhead_cust_id, _r.cmitem_itemsite_id, _p.cmhead_shipto_id, _p.cmhead_docdate, '', _p.cmhead_number, _p.cmhead_custponumber, _p.cmhead_docdate, 'C', _p.cmhead_invcnumber, _p.cmhead_docdate, (_r.qty * -1), _r.unitprice, _r.std_cost, _p.cmhead_salesrep_id, (_p.cmhead_commission * _r.extprice * -1), FALSE, _p.cmhead_billtoname, _p.cmhead_billtoaddress1, _p.cmhead_billtoaddress2, _p.cmhead_billtoaddress3, _p.cmhead_billtocity, _p.cmhead_billtostate, _p.cmhead_billtozip, _p.cmhead_shipto_name, _p.cmhead_shipto_address1, _p.cmhead_shipto_address2, _p.cmhead_shipto_address3, _p.cmhead_shipto_city, _p.cmhead_shipto_state, _p.cmhead_shipto_zipcode, _p.cmhead_curr_id, _r.cmitem_taxtype_id, _p.cmhead_taxzone_id, _p.cmhead_shipzone_id, _p.cmhead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM cmitemtax WHERE (taxhist_parent_id=_r.cmitem_id); _totalAmount := _totalAmount + round(_r.extprice, 2); END LOOP; -- Credit the Misc. Account for Miscellaneous Charges IF (_p.cmhead_misc <> 0) THEN SELECT insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, getPrjAccntId(_p.cmhead_prj_id, accnt_id), round(currToBase(_p.cmhead_curr_id, _p.cmhead_misc * -1, _p.cmhead_docdate), 2), _glDate, _p.cmhead_billtoname) INTO _test FROM accnt WHERE (accnt_id=_p.cmhead_misc_accnt_id); -- If the Misc. Charges Account was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_sequence); RETURN -14; END IF; -- Record the Sales History for any Misc. Charge INSERT INTO cohist ( cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _p.cmhead_cust_id, -1, _p.cmhead_shipto_id, 'M', _p.cmhead_misc_descrip, _p.cmhead_misc_accnt_id, _p.cmhead_docdate, '', _p.cmhead_number, _p.cmhead_custponumber, _p.cmhead_docdate, 'C', _p.cmhead_invcnumber, _p.cmhead_docdate, 1, (_p.cmhead_misc * -1), (_p.cmhead_misc * -1), _p.cmhead_salesrep_id, 0, FALSE, _p.cmhead_billtoname, _p.cmhead_billtoaddress1, _p.cmhead_billtoaddress2, _p.cmhead_billtoaddress3, _p.cmhead_billtocity, _p.cmhead_billtostate, _p.cmhead_billtozip, _p.cmhead_shipto_name, _p.cmhead_shipto_address1, _p.cmhead_shipto_address2, _p.cmhead_shipto_address3, _p.cmhead_shipto_city, _p.cmhead_shipto_state, _p.cmhead_shipto_zipcode, _p.cmhead_curr_id, _p.cmhead_shipzone_id, _p.cmhead_saletype_id ); -- Cache the Misc. Amount distributed _totalAmount := _totalAmount + _p.cmhead_misc; END IF; -- Credit Tax Adjustments IF (_p.adjtax <> 0) THEN -- Record the Sales History for Tax Adjustment SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.cmhead_cust_id, -1, _p.cmhead_shipto_id, 'T', 'Misc Tax Adjustment', _p.cmhead_docdate, '', _p.cmhead_number, _p.cmhead_custponumber, _p.cmhead_docdate, 'C', _p.cmhead_invcnumber, _p.cmhead_docdate, 0, 0, 0, _p.cmhead_salesrep_id, 0, FALSE, _p.cmhead_billtoname, _p.cmhead_billtoaddress1, _p.cmhead_billtoaddress2, _p.cmhead_billtoaddress3, _p.cmhead_billtocity, _p.cmhead_billtostate, _p.cmhead_billtozip, _p.cmhead_shipto_name, _p.cmhead_shipto_address1, _p.cmhead_shipto_address2, _p.cmhead_shipto_address3, _p.cmhead_shipto_city, _p.cmhead_shipto_state, _p.cmhead_shipto_zipcode, _p.cmhead_curr_id, getAdjustmentTaxtypeId(), _p.cmhead_taxzone_id, _p.cmhead_shipzone_id, _p.cmhead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, (taxhist_basis * -1), taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM cmheadtax WHERE ( (taxhist_parent_id=_p.cmhead_id) AND (taxhist_taxtype_id=getAdjustmentTaxtypeId()) ); END IF; -- Debit the Freight Account IF (_p.cmhead_freight <> 0) THEN SELECT insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, getPrjAccntId(_p.cmhead_prj_id, accnt_id), round(currToBase(_p.cmhead_curr_id, _p.cmhead_freight * -1, _p.cmhead_docdate), 2), _glDate, _p.cmhead_billtoname) INTO _test FROM accnt WHERE (accnt_id=findFreightAccount(_p.cmhead_cust_id)); -- If the Freight Charges Account was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_sequence); RETURN -16; END IF; -- Cache the Amount Distributed to Freight _totalAmount := _totalAmount + _p.cmhead_freight; -- Record the Sales History for any Freight SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.cmhead_cust_id, -1, _p.cmhead_shipto_id, 'F', 'Freight Charge', _p.cmhead_docdate, '', _p.cmhead_number, _p.cmhead_custponumber, _p.cmhead_docdate, 'C', _p.cmhead_invcnumber, _p.cmhead_docdate, 1, (_p.cmhead_freight * -1), (_p.cmhead_freight * -1), _p.cmhead_salesrep_id, 0, FALSE, _p.cmhead_billtoname, _p.cmhead_billtoaddress1, _p.cmhead_billtoaddress2, _p.cmhead_billtoaddress3, _p.cmhead_billtocity, _p.cmhead_billtostate, _p.cmhead_billtozip, _p.cmhead_shipto_name, _p.cmhead_shipto_address1, _p.cmhead_shipto_address2, _p.cmhead_shipto_address3, _p.cmhead_shipto_city, _p.cmhead_shipto_state, _p.cmhead_shipto_zipcode, _p.cmhead_curr_id, getFreightTaxtypeId(), _p.cmhead_taxzone_id, _p.cmhead_shipzone_id, _p.cmhead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, (taxhist_basis * -1), taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM cmheadtax WHERE ( (taxhist_parent_id=_p.cmhead_id) AND (taxhist_taxtype_id=getFreightTaxtypeId()) ); END IF; _totalAmount := _totalAmount; -- Credit the A/R for the total Amount IF (_totalAmount <> 0) THEN IF (_p.ar_accnt_id != -1) THEN PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, _p.ar_accnt_id, round(currToBase(_p.cmhead_curr_id, _totalAmount, _p.cmhead_docdate), 2), _glDate, _p.cmhead_billtoname); ELSE PERFORM deleteGLSeries(_sequence); RETURN -18; END IF; END IF; -- Commit the GLSeries; PERFORM postGLSeries(_sequence, pJournalNumber); -- Create the Invoice aropen item SELECT NEXTVAL('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_open, aropen_posted, aropen_cust_id, aropen_ponumber, aropen_docnumber, aropen_applyto, aropen_doctype, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_amount, aropen_paid, aropen_salesrep_id, aropen_commission_due, aropen_commission_paid, aropen_ordernumber, aropen_notes, aropen_rsncode_id, aropen_curr_id ) SELECT _aropenid, getEffectiveXtUser(), pJournalNumber, TRUE, FALSE, cmhead_cust_id, cmhead_custponumber, cmhead_number, CASE WHEN (cmhead_invcnumber='-1') THEN 'OPEN' ELSE (cmhead_invcnumber::TEXT) END, 'C', cmhead_docdate, cmhead_docdate, _glDate, -1, _totalAmount, 0, cmhead_salesrep_id, (_commissionDue * -1), FALSE, cmhead_number::TEXT, cmhead_comments, cmhead_rsncode_id, cmhead_curr_id FROM cmhead WHERE (cmhead_id=pCmheadid); -- Handle the Inventory and G/L Transactions for any returned Inventory where cmitem_updateinv is true FOR _r IN SELECT cmitem_itemsite_id AS itemsite_id, cmitem_id, (cmitem_qtyreturned * cmitem_qty_invuomratio) AS qty, cmhead_number, cmhead_cust_id AS cust_id, item_number, cmhead_saletype_id AS saletype_id, cmhead_shipzone_id AS shipzone_id, stdCost(item_id) AS std_cost, cmhead_prj_id, itemsite_costmethod FROM cmhead, cmitem, itemsite, item WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (cmitem_qtyreturned <> 0) AND (cmitem_updateinv) AND (cmhead_id=pCmheadid) ) LOOP -- Return credited stock to inventory IF (_itemlocSeries = 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; IF (_r.itemsite_costmethod != 'J') THEN SELECT postInvTrans(itemsite_id, 'RS', _r.qty, 'S/O', 'CM', _r.cmhead_number, '', ('Credit Return ' || _r.item_number), costcat_asset_accnt_id, getPrjAccntId(_r.cmhead_prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)), _itemlocSeries, _glDate, _r.std_cost) INTO _invhistid FROM itemsite, costcat WHERE ((itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id)); ELSE RAISE DEBUG 'postCreditMemo(%, %, %) tried to postInvTrans a %-costed item', pCmheadid, pJournalNumber, pItemlocSeries, _r.itemsite_costmethod; END IF; END LOOP; -- Update coitem to reflect the returned qty where cmitem_updateinv is true FOR _r IN SELECT cmitem_qtyreturned, cmitem_itemsite_id, cohead_id FROM cmitem, cmhead, invchead, cohead WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmhead_invcnumber=invchead_invcnumber) AND (invchead_ordernumber=cohead_number) AND (cmitem_qtyreturned <> 0) AND (cmitem_updateinv) AND (cmhead_id=pCmheadid) ) LOOP UPDATE coitem SET coitem_qtyreturned = (coitem_qtyreturned + _r.cmitem_qtyreturned) WHERE coitem_id IN ( SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=_r.cohead_id) AND (coitem_itemsite_id = _r.cmitem_itemsite_id) ) LIMIT 1 ); END LOOP; -- Mark the cmhead as posted UPDATE cmhead SET cmhead_posted=TRUE, cmhead_gldistdate=_glDate WHERE (cmhead_id=pCmheadid); -- Find the apply-to document and make the application SELECT cmhead_number, cmhead_curr_id, cmhead_docdate, aropen_id, aropen_cust_id, aropen_docnumber, currToCurr(aropen_curr_id, cmhead_curr_id, aropen_amount - aropen_paid, cmhead_docdate) AS balance INTO _p FROM aropen, cmhead WHERE ( (aropen_doctype='I') AND (aropen_docnumber=cmhead_invcnumber) AND (cmhead_id=pCmheadid) ); IF (FOUND) THEN IF round(_totalAmount, 2) <= round(_p.balance, 2) THEN _toApply = _totalAmount; ELSE _toApply = _p.balance; END IF; UPDATE aropen SET aropen_paid = round(aropen_paid + currToCurr(_p.cmhead_curr_id, aropen_curr_id, _toApply, _p.cmhead_docdate), 2) WHERE (aropen_id=_p.aropen_id); -- Alter the new A/R Open Item to reflect the application UPDATE aropen SET aropen_paid = round(currToCurr(_p.cmhead_curr_id, aropen_curr_id, _toApply, _p.cmhead_docdate), 2) WHERE (aropen_id=_aropenid); -- Record the application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_curr_id ) VALUES ( _p.aropen_cust_id, _aropenid, 'C', _p.cmhead_number, _p.aropen_id, 'I', _p.aropen_docnumber, '', '', round(_toApply, 2), _toClose, CURRENT_DATE, _p.cmhead_docdate, 0, _p.cmhead_curr_id ); END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postcreditmemo(integer, integer, integer) OWNER TO admin; -- -- Name: postcreditmemos(boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcreditmemos(boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; _cmhead RECORD; _result INTEGER; _return INTEGER := 0; _itemlocSeries INTEGER := 0; BEGIN _itemlocSeries := 0; FOR _cmhead IN SELECT cmhead_id FROM cmhead WHERE ( (NOT cmhead_posted) AND (NOT cmhead_hold) AND (checkCreditMemoSitePrivs(cmhead_id)) AND ((pPostUnprinted) OR (cmhead_printed)) ) LOOP SELECT postCreditMemo(_cmhead.cmhead_id, _itemlocSeries) INTO _result; IF (_result < _return) THEN _return := _result; END IF; END LOOP; RETURN _return; END; $_$; ALTER FUNCTION public.postcreditmemos(boolean) OWNER TO admin; -- -- Name: postcreditmemos(boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postcreditmemos(boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _r RECORD; _itemlocSeries INTEGER := 0; BEGIN _itemlocSeries := 0; FOR _r IN SELECT cmhead_id FROM cmhead WHERE ( (NOT cmhead_posted) AND (NOT cmhead_hold) AND (checkCreditMemoSitePrivs(cmhead_id)) AND ((pPostUnprinted) OR (cmhead_printed)) ) LOOP SELECT postCreditMemo(_r.cmhead_id, pJournalNumber, _itemlocSeries) INTO _itemlocSeries; END LOOP; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postcreditmemos(boolean, integer) OWNER TO admin; -- -- Name: postglseries(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postglseries(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _journalNumber INTEGER; _returnValue INTEGER; BEGIN SELECT postGLSeries(pSequence, fetchJournalNumber('G/L')) INTO _returnValue; RETURN _returnValue; END; $_$; ALTER FUNCTION public.postglseries(integer) OWNER TO admin; -- -- Name: postglseries(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postglseries(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _returnValue INTEGER; BEGIN SELECT postGLSeries(pSequence, pJournalNumber, true) INTO _returnValue; RETURN _returnValue; END; $_$; ALTER FUNCTION public.postglseries(integer, integer) OWNER TO admin; -- -- Name: postglseries(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postglseries(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pPostZero ALIAS FOR $3; _glseries RECORD; _transCount INTEGER := 0; _delta NUMERIC; _discrepDate DATE; _discrepAccntid INTEGER; _rows INTEGER; BEGIN /* Make sure we don't create an imbalance across companies. The 'IgnoreCompanyBalance' metric is a back door mechanism to allow legacy users to create transactions accross companies if they have been using the company segment for something else and they MUST continue to be able to do so. It can only be implemented by direct sql update to the metric table and should otherwise be discouraged. */ IF (COALESCE(fetchMetricValue('GLCompanySize'),0) > 0 AND fetchMetricBool('IgnoreCompany') = false) THEN SELECT count(accnt_company) INTO _rows FROM ( SELECT DISTINCT accnt_company FROM accnt JOIN glseries ON (glseries_accnt_id=accnt_id) WHERE (glseries_sequence=pSequence)) _data; IF (_rows > 1) THEN RAISE EXCEPTION 'G/L Series can not be posted because multiple companies are referenced in the same series.'; END IF; END IF; -- Make sure that we balance SELECT SUM(glseries_amount), MAX(glseries_distdate) INTO _delta, _discrepDate FROM glseries WHERE (glseries_sequence=pSequence); IF ( _delta <> 0 ) THEN IF (COALESCE(fetchMetricValue('GLCompanySize'),0) = 0) THEN SELECT accnt_id INTO _discrepAccntid FROM accnt, metric WHERE ((metric_name='GLSeriesDiscrepancyAccount') AND (accnt_id=CAST(metric_value AS INTEGER))); ELSE SELECT company_dscrp_accnt_id INTO _discrepAccntid FROM company JOIN accnt ON (accnt_company=company_number) JOIN glseries ON (glseries_accnt_id=accnt_id) WHERE (glseries_sequence=pSequence) LIMIT 1; END IF; IF (NOT FOUND) THEN RETURN -5; END IF; INSERT INTO glseries ( glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_amount, glseries_distdate, glseries_notes ) SELECT glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, _discrepAccntid, (_delta * -1), _discrepDate, 'G/L Series Discrepancy' FROM glseries WHERE (glseries_sequence=pSequence) LIMIT 1; END IF; -- March through the glseries members, posting them one at a time FOR _glseries IN SELECT glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_distdate, glseries_notes, glseries_misc_id, SUM(glseries_amount) as amount FROM glseries WHERE ((glseries_amount<>0.0) AND (glseries_sequence=pSequence)) GROUP BY glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_distdate, glseries_notes, glseries_misc_id LOOP -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (_glseries.glseries_distdate BETWEEN period_start AND period_end) WHERE (accnt_id = _glseries.glseries_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', _glseries.glseries_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (_glseries.glseries_distdate BETWEEN period_start AND period_end) WHERE (accnt_id = _glseries.glseries_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', _glseries.glseries_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into nonexistent periods IF NOT EXISTS(SELECT period_id FROM period WHERE (_glseries.glseries_distdate BETWEEN period_start AND period_end)) THEN RAISE EXCEPTION 'Cannot post to nonexistent period (%).', pDistDate; END IF; IF (_glseries.amount != 0 OR pPostZero) THEN IF (fetchMetricBool('UseJournals')) THEN INSERT INTO sltrans ( sltrans_posted, sltrans_created, sltrans_date, sltrans_misc_id, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_notes, sltrans_doctype, sltrans_docnumber, sltrans_amount, sltrans_journalnumber ) VALUES ( FALSE, CURRENT_TIMESTAMP, _glseries.glseries_distdate, _glseries.glseries_misc_id, pSequence, _glseries.glseries_accnt_id, _glseries.glseries_source, _glseries.glseries_notes, _glseries.glseries_doctype, _glseries.glseries_docnumber, _glseries.amount, pJournalNumber ); ELSE INSERT INTO gltrans ( gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_misc_id, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_notes, gltrans_doctype, gltrans_docnumber, gltrans_amount, gltrans_journalnumber ) VALUES ( FALSE, FALSE, CURRENT_TIMESTAMP, _glseries.glseries_distdate, _glseries.glseries_misc_id, pSequence, _glseries.glseries_accnt_id, _glseries.glseries_source, _glseries.glseries_notes, _glseries.glseries_doctype, _glseries.glseries_docnumber, _glseries.amount, pJournalNumber ); END IF; _transCount := _transCount + 1; END IF; END LOOP; -- Delete all of the posted glseries members DELETE FROM glseries WHERE (glseries_sequence=pSequence); PERFORM postIntoTrialBalance(pSequence); RETURN _transCount; END; $_$; ALTER FUNCTION public.postglseries(integer, integer, boolean) OWNER TO admin; -- -- Name: postglseriesnosumm(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postglseriesnosumm(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _journalNumber INTEGER; _returnValue INTEGER; BEGIN SELECT postGLSeriesNoSumm(pSequence, fetchJournalNumber('G/L')) INTO _returnValue; RETURN _returnValue; END; $_$; ALTER FUNCTION public.postglseriesnosumm(integer) OWNER TO admin; -- -- Name: postglseriesnosumm(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postglseriesnosumm(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _glseries RECORD; _transCount INTEGER := 0; _rows INTEGER; BEGIN /* Make sure we don't create an imbalance across companies. The 'IgnoreCompanyBalance' metric is a back door mechanism to allow legacy users to create transactions accross companies if they have been using the company segment for something else and they MUST continue to be able to do so. It can only be implemented by direct sql update to the metric table and should otherwise be discouraged. */ IF (COALESCE(fetchMetricValue('GLCompanySize'),0) > 0 AND fetchMetricBool('IgnoreCompany') = false) THEN SELECT count(accnt_company) INTO _rows FROM ( SELECT DISTINCT accnt_company FROM accnt JOIN glseries ON (glseries_accnt_id=accnt_id) WHERE (glseries_sequence=pSequence)) _data; IF (_rows > 1) THEN RAISE EXCEPTION 'G/L Series can not be posted because multiple companies are referenced in the same series.'; END IF; END IF; -- Make sure that we balance IF ( ( SELECT SUM(glseries_amount) FROM glseries WHERE (glseries_sequence=pSequence) ) <> 0 ) THEN RETURN -1; END IF; -- March through the glseries members, posting them one at a time FOR _glseries IN SELECT glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_distdate, glseries_notes, glseries_misc_id, glseries_amount as amount FROM glseries WHERE ((glseries_amount<>0.0) AND (glseries_sequence=pSequence)) LOOP -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (_glseries.glseries_distdate BETWEEN period_start AND period_end) WHERE (accnt_id = _glseries.glseries_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', _glseries.glseries_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (_glseries.glseries_distdate BETWEEN period_start AND period_end) WHERE (accnt_id = _glseries.glseries_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', _glseries.glseries_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into nonexistent periods IF NOT EXISTS(SELECT period_id FROM period WHERE (_glseries.glseries_distdate BETWEEN period_start AND period_end)) THEN RAISE EXCEPTION 'Cannot post to nonexistent period (%).', pDistDate; END IF; IF (fetchMetricBool('UseJournals')) THEN INSERT INTO sltrans ( sltrans_posted, sltrans_created, sltrans_date, sltrans_misc_id, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_notes, sltrans_doctype, sltrans_docnumber, sltrans_amount, sltrans_journalnumber ) VALUES ( FALSE, CURRENT_TIMESTAMP, _glseries.glseries_distdate, _glseries.glseries_misc_id, pSequence, _glseries.glseries_accnt_id, _glseries.glseries_source, _glseries.glseries_notes, _glseries.glseries_doctype, _glseries.glseries_docnumber, _glseries.amount, pJournalNumber ); ELSE INSERT INTO gltrans ( gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_misc_id, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_notes, gltrans_doctype, gltrans_docnumber, gltrans_amount, gltrans_journalnumber ) VALUES ( FALSE, FALSE, CURRENT_TIMESTAMP, _glseries.glseries_distdate, _glseries.glseries_misc_id, pSequence, _glseries.glseries_accnt_id, _glseries.glseries_source, _glseries.glseries_notes, _glseries.glseries_doctype, _glseries.glseries_docnumber, _glseries.amount, pJournalNumber ); END IF; _transCount := _transCount + 1; END LOOP; -- Delete all of the posted glseries members DELETE FROM glseries WHERE (glseries_sequence=pSequence); PERFORM postIntoTrialBalance(pSequence); RETURN _transCount; END; $_$; ALTER FUNCTION public.postglseriesnosumm(integer, integer) OWNER TO admin; -- -- Name: postintoinvbalance(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postintoinvbalance(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvhistId ALIAS FOR $1; _invbalid INTEGER; _r RECORD; _count INTEGER; _qty NUMERIC; BEGIN -- Grab the invhist record to post -- Special fix for transit sites when transtype=TS and invqty<0 -- Set the sense to 1 to correct invhist populated incorrectly. SELECT invhist.*, CASE WHEN (invhist_transtype='TS' AND invhist_invqty < 0.0 AND warehous_transit) THEN 1 ELSE invhistSense(invhist_id) END AS sense, period_id INTO _r FROM invhist JOIN itemsite ON (itemsite_id=invhist_itemsite_id) JOIN whsinfo ON (warehous_id=itemsite_warehous_id) LEFT OUTER JOIN period ON (invhist_transdate::date BETWEEN period_start AND period_end) WHERE ( invhist_id=pInvhistId ); GET DIAGNOSTICS _count = ROW_COUNT; -- If we can post into a Inv Balance, do so IF ( _count > 0 ) THEN -- Validate IF (_r.period_id IS NULL) THEN RAISE EXCEPTION 'No accounting period exists for invhist_id %, transaction date %. Transaction can not be posted.', _r.invhist_id, formatDate(_r.invhist_transdate); END IF; -- If cycle count, then we need to reference balance which needs to be accurate -- IF (_r.invhist_transtype = 'CC') THEN -- PERFORM forwardupdateitemsite(_r.invhist_itemsite_id); -- END IF; -- Try to find an existing invbal SELECT invbal_id, -- CASE WHEN (_r.invhist_transtype != 'CC') THEN _r.invhist_invqty ELSE _r.invhist_invqty - invbal_qoh_ending END _r.invhist_invqty INTO _invbalid, _qty FROM invbal WHERE ( (invbal_period_id=_r.period_id) AND (invbal_itemsite_id=_r.invhist_itemsite_id) ); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count > 0) THEN -- We found a invbal, update it with the Inventory Transaction -- Note - two stage update to avoid any funny value caching logic IF (_r.sense * _qty > 0) THEN UPDATE invbal SET invbal_qty_in = (invbal_qty_in + abs(_qty)), invbal_value_in = (invbal_value_in + abs(_qty) * _r.invhist_unitcost) WHERE (invbal_id=_invbalid); ELSIF (_r.sense * _qty < 0) THEN UPDATE invbal SET invbal_qty_out = (invbal_qty_out + abs(_qty)), invbal_value_out = (invbal_value_out + abs(_qty) * _r.invhist_unitcost) WHERE (invbal_id=_invbalid); END IF; -- Non-netable transactions have their own balances IF (_r.invhist_transtype = 'NN') THEN UPDATE invbal SET invbal_nn_in = (invbal_nn_in + _qty * -1), invbal_nnval_in = (invbal_nnval_in + _qty * -1 * _r.invhist_unitcost) WHERE (invbal_id=_invbalid); END IF; UPDATE invbal SET invbal_qoh_ending = (invbal_qoh_beginning + invbal_qty_in - invbal_qty_out), invbal_value_ending = (invbal_value_beginning + invbal_value_in - invbal_value_out), invbal_nn_ending = (invbal_nn_beginning + invbal_nn_in - invbal_nn_out), invbal_nnval_ending = (invbal_nnval_beginning + invbal_nnval_in - invbal_nnval_out), invbal_dirty=true WHERE (invbal_id=_invbalid); ELSE -- No existing invbal, make one SELECT NEXTVAL('invbal_invbal_id_seq') INTO _invbalid; INSERT INTO invbal ( invbal_id, invbal_itemsite_id, invbal_period_id, invbal_qoh_beginning, invbal_qoh_ending, invbal_qty_in, invbal_qty_out, invbal_value_beginning, invbal_value_ending, invbal_value_in, invbal_value_out, invbal_nn_beginning, invbal_nn_ending, invbal_nn_in, invbal_nn_out, invbal_nnval_beginning, invbal_nnval_ending, invbal_nnval_in, invbal_nnval_out, invbal_dirty ) VALUES ( _invbalid, _r.invhist_itemsite_id, _r.period_id, -- Netable 0, _r.invhist_invqty * _r.sense, CASE WHEN (_r.sense > 0) THEN _r.invhist_invqty ELSE 0 END, CASE WHEN (_r.sense < 0) THEN (_r.invhist_invqty) ELSE 0 END, 0, _r.invhist_invqty * _r.invhist_unitcost * _r.sense, CASE WHEN (_r.sense > 0) THEN _r.invhist_invqty * _r.invhist_unitcost ELSE 0 END, CASE WHEN (_r.sense < 0) THEN (_r.invhist_invqty * _r.invhist_unitcost) ELSE 0 END, -- Non netable 0, CASE WHEN (_r.invhist_transtype='NN') THEN _r.invhist_invqty * -1 ELSE 0 END, CASE WHEN (_r.sense > 0 AND _r.invhist_transtype='NN') THEN _r.invhist_invqty * -1 ELSE 0 END, CASE WHEN (_r.sense < 0 AND _r.invhist_transtype='NN') THEN _r.invhist_invqty * -1 ELSE 0 END, 0, CASE WHEN (_r.invhist_transtype='NN') THEN _r.invhist_invqty * _r.invhist_unitcost * -1 ELSE 0 END, CASE WHEN (_r.sense > 0 AND _r.invhist_transtype='NN') THEN _r.invhist_invqty * -1 * _r.invhist_unitcost ELSE 0 END, CASE WHEN (_r.sense < 0 AND _r.invhist_transtype='NN') THEN (_r.invhist_invqty * -1 * _r.invhist_unitcost) ELSE 0 END, true ); END IF; ELSE RETURN FALSE; END IF; RETURN TRUE; END; $_$; ALTER FUNCTION public.postintoinvbalance(integer) OWNER TO admin; -- -- Name: postintotrialbalance(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postintotrialbalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _trialbalid INTEGER; _r RECORD; BEGIN -- March through all of the G/L Transactions for the passed sequence that are not posted FOR _r IN SELECT gltrans_id, gltrans_date, gltrans_accnt_id, gltrans_amount, accnt_forwardupdate, period_id, period_closed, period_freeze FROM accnt, gltrans LEFT OUTER JOIN period ON (gltrans_date BETWEEN period_start AND period_end) WHERE ( (gltrans_accnt_id=accnt_id) AND (NOT gltrans_posted) AND (NOT gltrans_deleted) AND (gltrans_sequence=pSequence) ) LOOP -- If we can post into a Trial Balance, do so IF ( (NOT _r.period_closed) AND ( (NOT _r.period_freeze) OR (checkPrivilege('PostFrozenPeriod')) ) ) THEN -- Try to find an existing trialbal SELECT trialbal_id INTO _trialbalid FROM trialbal WHERE ( (trialbal_period_id=_r.period_id) AND (trialbal_accnt_id=_r.gltrans_accnt_id) ); IF (FOUND) THEN -- We found a trialbal, update it with the G/L Transaction -- Note - two stage update to avoid any funny value caching logic IF (_r.gltrans_amount > 0) THEN UPDATE trialbal SET trialbal_credits = (trialbal_credits + _r.gltrans_amount) WHERE (trialbal_id=_trialbalid); ELSE UPDATE trialbal SET trialbal_debits = (trialbal_debits + (_r.gltrans_amount * -1)) WHERE (trialbal_id=_trialbalid); END IF; UPDATE trialbal SET trialbal_ending = (trialbal_beginning - trialbal_debits + trialbal_credits), trialbal_dirty=TRUE WHERE (trialbal_id=_trialbalid); ELSE -- No existing trialbal, make one SELECT NEXTVAL('trialbal_trialbal_id_seq') INTO _trialbalid; INSERT INTO trialbal ( trialbal_id, trialbal_accnt_id, trialbal_period_id, trialbal_beginning, trialbal_dirty, trialbal_ending, trialbal_credits, trialbal_debits ) VALUES ( _trialbalid, _r.gltrans_accnt_id, _r.period_id, 0, TRUE, _r.gltrans_amount, CASE WHEN (_r.gltrans_amount > 0) THEN _r.gltrans_amount ELSE 0 END, CASE WHEN (_r.gltrans_amount < 0) THEN (_r.gltrans_amount * -1) ELSE 0 END ); END IF; -- Forward update if we should IF (_r.accnt_forwardupdate AND fetchmetricbool('ManualForwardUpdate')) THEN PERFORM forwardUpdateTrialBalance(_trialbalid); END IF; -- Mark the G/L Transaction as posted UPDATE gltrans SET gltrans_posted=TRUE WHERE (gltrans_id=_r.gltrans_id); END IF; END LOOP; RETURN 1; END; $_$; ALTER FUNCTION public.postintotrialbalance(integer) OWNER TO admin; -- -- Name: postinvhist(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postinvhist(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvhistId ALIAS FOR $1; _r RECORD; BEGIN IF ( SELECT metric_value FROM metric WHERE ((metric_name = 'EnableAsOfQOH') AND (metric_value = 't'))) THEN IF (NOT postIntoInvBalance(pInvhistId)) THEN RAISE EXCEPTION 'Post into Inventory Balance for invhist_id=% was unsuccessful',pInvhistId; END IF; END IF; --Update itemsite qoh and change posted flag UPDATE itemsite SET itemsite_qtyonhand = (itemsite_qtyonhand + (invhist_invqty * invhistSense(invhist_id))), itemsite_value = itemsite_value + invhist_value_after - invhist_value_before FROM invhist WHERE ( (itemsite_id=invhist_itemsite_id) AND (invhist_id=pInvhistId) AND (NOT invhist_posted) ); --Flag as posted UPDATE invhist SET invhist_posted=TRUE WHERE ( (invhist_id=pInvhistId) AND (invhist_posted=FALSE) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.postinvhist(integer) OWNER TO admin; -- -- Name: postinvoice(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; _return INTEGER; BEGIN SELECT postInvoice(pInvcheadid, fetchJournalNumber('AR-IN')) INTO _return; RETURN _return; END; $_$; ALTER FUNCTION public.postinvoice(integer) OWNER TO admin; -- -- Name: postinvoice(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postinvoice(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _itemlocSeries INTEGER; _return INTEGER; BEGIN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; SELECT postInvoice(pInvcheadid, pJournalNumber, _itemlocseries) INTO _return; RETURN _return; END; $_$; ALTER FUNCTION public.postinvoice(integer, integer) OWNER TO admin; -- -- Name: postinvoice(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postinvoice(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; _aropenid INTEGER; _cohistid INTEGER; _itemlocSeries INTEGER := 0; _invhistid INTEGER := 0; _amount NUMERIC; _roundedBase NUMERIC; _sequence INTEGER; _r RECORD; _p RECORD; _test INTEGER; _totalAmount NUMERIC := 0; _totalRoundedBase NUMERIC := 0; _totalAmountBase NUMERIC := 0; _appliedAmount NUMERIC := 0; _commissionDue NUMERIC := 0; _tmpAccntId INTEGER; _tmpCurrId INTEGER; _firstExchDate DATE; _glDate DATE; _exchGain NUMERIC := 0; BEGIN IF ( ( SELECT invchead_posted FROM invchead WHERE (invchead_id=pInvcheadid) ) ) THEN RETURN -10; END IF; -- Cache some parameters SELECT invchead.*, fetchGLSequence() AS sequence, findFreightAccount(invchead_cust_id) AS freightaccntid, findARAccount(invchead_cust_id) AS araccntid, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM invcheadtax WHERE ( (taxhist_parent_id = invchead_id) AND (taxhist_taxtype_id = getFreightTaxtypeId()) ) ) AS freighttax, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM invcheadtax WHERE ( (taxhist_parent_id = invchead_id) AND (taxhist_taxtype_id = getAdjustmentTaxtypeId()) ) ) AS adjtax INTO _p FROM invchead WHERE (invchead_id=pInvcheadid); _itemlocSeries = pItemlocSeries; _glDate := COALESCE(_p.invchead_gldistdate, _p.invchead_invcdate); IF (_p.invchead_salesrep_id < 0) THEN RAISE NOTICE 'Patch negative invchead_salesrep_id until invchead_salesrep_id is a true fkey'; _p.invchead_salesrep_id := NULL; END IF; -- the 1st MC iteration used the cohead_orderdate so we could get curr exch -- gain/loss between the sales and invoice dates, but see issue 3892. leave -- this condition TRUE until we make this configurable or decide not to. IF TRUE THEN _firstExchDate := _p.invchead_invcdate; ELSE -- can we save a select by using: _firstExchDate := _p.invchead_orderdate; SELECT cohead_orderdate INTO _firstExchDate FROM cohead JOIN invchead ON (cohead_number = invchead_ordernumber) WHERE (invchead_id = pInvcheadid); END IF; -- Start by handling taxes FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.invchead_curr_id, round(sum(taxdetail_tax),2), _firstExchDate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('I', pInvcheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, _r.tax_sales_accnt_id, _r.taxbasevalue, _glDate, _p.invchead_billto_name ); _totalAmount := _totalAmount + _r.tax; _totalRoundedBase := _totalRoundedBase + _r.taxbasevalue; END LOOP; -- Update item tax records with posting data UPDATE invcitemtax SET taxhist_docdate=_firstExchDate, taxhist_distdate=_glDate, taxhist_curr_id=_p.invchead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM invchead JOIN invcitem ON (invchead_id=invcitem_invchead_id), curr_rate WHERE ((invchead_id=pInvcheadId) AND (taxhist_parent_id=invcitem_id) AND (_p.invchead_curr_id=curr_id) AND ( _firstExchDate BETWEEN curr_effective AND curr_expires) ); -- Update Invchead taxes (Freight and Adjustments) with posting data UPDATE invcheadtax SET taxhist_docdate=_firstExchDate, taxhist_distdate=_glDate, taxhist_curr_id=_p.invchead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM curr_rate WHERE ((taxhist_parent_id=pInvcheadid) AND (_p.invchead_curr_id=curr_id) AND ( _firstExchDate BETWEEN curr_effective AND curr_expires) ); -- March through the Non-Misc. Invcitems FOR _r IN SELECT * FROM invoiceitem WHERE ( (invcitem_invchead_id = pInvcheadid) AND (invcitem_item_id <> -1) ) LOOP -- Cache the amount due for this line _amount := _r.extprice; IF (_amount > 0) THEN -- Credit the Sales Account for the invcitem item IF (_r.invcitem_rev_accnt_id IS NOT NULL) THEN SELECT getPrjAccntId(_p.invchead_prj_id, _r.invcitem_rev_accnt_id) INTO _tmpAccntId; ELSEIF (_r.itemsite_id IS NULL) THEN SELECT getPrjAccntId(_p.invchead_prj_id, salesaccnt_sales_accnt_id) INTO _tmpAccntId FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.invcitem_item_id, 'I', _p.invchead_cust_id, _p.invchead_saletype_id, _p.invchead_shipzone_id)); ELSE SELECT getPrjAccntId(_p.invchead_prj_id, salesaccnt_sales_accnt_id) INTO _tmpAccntId FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.itemsite_id, 'IS', _p.invchead_cust_id, _p.invchead_saletype_id, _p.invchead_shipzone_id)); END IF; -- If the Sales Account Assignment was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN -11; END IF; _roundedBase := round(currToBase(_p.invchead_curr_id, _amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, _tmpAccntId, _roundedBase, _glDate, _p.invchead_billto_name ) INTO _test; _totalAmount := (_totalAmount + _amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; _commissionDue := (_commissionDue + (_amount * _p.invchead_commission)); END IF; _totalAmount := _totalAmount; _totalRoundedBase := _totalRoundedBase; -- Record Sales History for this S/O Item SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.invchead_cust_id, _r.itemsite_id, _p.invchead_shipto_id, _p.invchead_shipdate, _p.invchead_shipvia, COALESCE(_p.invchead_ordernumber, _r.cohead_number), _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, _r.qty, _r.unitprice, _r.unitcost, _p.invchead_salesrep_id, (_p.invchead_commission * _r.extprice), FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, _r.invcitem_taxtype_id, _p.invchead_taxzone_id, _p.invchead_shipzone_id, _p.invchead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM invcitemtax WHERE (taxhist_parent_id=_r.invcitem_id); END LOOP; -- March through the Misc. Invcitems FOR _r IN SELECT * FROM invoiceitem JOIN salescat ON (salescat_id = invcitem_salescat_id) WHERE ( (invcitem_item_id = -1) AND (invcitem_invchead_id=pInvcheadid) ) LOOP -- Cache the amount due for this line and the commission due for such _amount := _r.extprice; IF (_amount > 0) THEN -- Credit the Sales Account for the invcitem item _roundedBase = round(currToBase(_p.invchead_curr_id, _amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id, COALESCE(_r.invcitem_rev_accnt_id, _r.salescat_sales_accnt_id)), _roundedBase, _glDate, _p.invchead_billto_name ) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; _totalAmount := (_totalAmount + _amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; _commissionDue := (_commissionDue + (_amount * _p.invchead_commission)); END IF; -- Record Sales History for this S/O Item SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.invchead_cust_id, -1, _p.invchead_shipto_id, 'M', (_r.invcitem_number || '-' || _r.invcitem_descrip), _p.invchead_shipdate, _p.invchead_shipvia, COALESCE(_p.invchead_ordernumber, _r.cohead_number), _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, _r.qty, _r.unitprice, 0, _p.invchead_salesrep_id, (_p.invchead_commission * _r.extprice), FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, _r.invcitem_taxtype_id, _p.invchead_taxzone_id, _p.invchead_shipzone_id, _p.invchead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM invcitemtax WHERE (taxhist_parent_id=_r.invcitem_id); END LOOP; -- Credit the Freight Account for Freight Charges IF (_p.invchead_freight <> 0) THEN IF (_p.freightaccntid <> -1) THEN _roundedBase = round(currToBase(_p.invchead_curr_id, _p.invchead_freight, _firstExchDate), 2); SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id,_p.freightaccntid), _roundedBase, _glDate, _p.invchead_billto_name ) INTO _test; -- Cache the Freight Amount distributed _totalAmount := (_totalAmount + _p.invchead_freight); _totalRoundedBase := _totalRoundedBase + _roundedBase; ELSE _test := -14; END IF; -- If the Freight Account was not found then punt IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; -- Record Sales History for the Freight SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.invchead_cust_id, -1, _p.invchead_shipto_id, 'F', 'Freight', _p.invchead_shipdate, _p.invchead_shipvia, _p.invchead_ordernumber, _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, 1, _p.invchead_freight, _p.invchead_freight, _p.invchead_salesrep_id, 0, FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, getFreightTaxtypeId(), _p.invchead_taxzone_id, _p.invchead_shipzone_id, _p.invchead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM invcheadtax WHERE ( (taxhist_parent_id=_p.invchead_id) AND (taxhist_taxtype_id=getFreightTaxtypeId()) ); END IF; -- Credit the Misc. Account for Miscellaneous Charges IF (_p.invchead_misc_amount <> 0) THEN _roundedBase := round(currToBase(_p.invchead_curr_id, _p.invchead_misc_amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id, _p.invchead_misc_accnt_id), _roundedBase, _glDate, _p.invchead_billto_name ) INTO _test; -- If the Misc. Charges Account was not found then punt IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; -- Cache the Misc. Amount distributed _totalAmount := (_totalAmount + _p.invchead_misc_amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; -- Record Sales History for the Misc. Charge INSERT INTO cohist ( cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _p.invchead_cust_id, -1, _p.invchead_shipto_id, 'M', _p.invchead_misc_descrip, _p.invchead_misc_accnt_id, _p.invchead_shipdate, _p.invchead_shipvia, _p.invchead_ordernumber, _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, 1, _p.invchead_misc_amount, _p.invchead_misc_amount, _p.invchead_salesrep_id, 0, FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, _p.invchead_shipzone_id, _p.invchead_saletype_id ); END IF; -- Record Sales History for the Tax Adjustment IF (_p.adjtax <> 0) THEN SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.invchead_cust_id, -1, _p.invchead_shipto_id, 'T', 'Misc Tax Adjustment', _p.invchead_shipdate, _p.invchead_shipvia, _p.invchead_ordernumber, _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, 1, 0.0, 0.0, _p.invchead_salesrep_id, 0, FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, getAdjustmentTaxtypeId(), _p.invchead_taxzone_id, _p.invchead_shipzone_id, _p.invchead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM invcheadtax WHERE ( (taxhist_parent_id=_p.invchead_id) AND (taxhist_taxtype_id=getAdjustmentTaxtypeId()) ); END IF; -- ToDo: handle rounding errors _exchGain := currGain(_p.invchead_curr_id, _totalAmount, _firstExchDate, _glDate); IF (_exchGain <> 0) THEN SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, getGainLossAccntId(_p.araccntid), round(_exchGain, 2) * -1, _glDate, _p.invchead_billto_name ) INTO _test ; IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; END IF; -- Debit A/R for the total Amount IF (_totalRoundedBase <> 0) THEN IF (_p.araccntid != -1) THEN PERFORM insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, _p.araccntid, round(_totalRoundedBase * -1, 2), _glDate, _p.invchead_billto_name ); ELSE PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN -17; END IF; END IF; -- Commit the GLSeries; SELECT postGLSeries(_p.sequence, pJournalNumber) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; -- Create the Invoice aropen item SELECT nextval('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_open, aropen_posted, aropen_cust_id, aropen_ponumber, aropen_docnumber, aropen_applyto, aropen_doctype, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_amount, aropen_paid, aropen_salesrep_id, aropen_commission_due, aropen_commission_paid, aropen_ordernumber, aropen_notes, aropen_cobmisc_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), pJournalNumber, TRUE, FALSE, _p.invchead_cust_id, _p.invchead_ponumber, _p.invchead_invcnumber, _p.invchead_invcnumber, 'I', _p.invchead_invcdate, determineDueDate(_p.invchead_terms_id, _p.invchead_invcdate), _glDate, _p.invchead_terms_id, round(_totalAmount, 2), 0, _p.invchead_salesrep_id, _commissionDue, FALSE, _p.invchead_ordernumber::text, _p.invchead_notes, pInvcheadid, _p.invchead_curr_id ); -- Handle the Inventory and G/L Transactions for any billed Inventory where invcitem_updateinv is true FOR _r IN SELECT itemsite_id AS itemsite_id, invcitem_id, (invcitem_billed * invcitem_qty_invuomratio) AS qty, invchead_invcnumber, invchead_cust_id AS cust_id, item_number, invchead_saletype_id AS saletype_id, invchead_shipzone_id AS shipzone_id, invchead_prj_id, itemsite_costmethod FROM invchead JOIN invcitem ON ( (invcitem_invchead_id=invchead_id) AND (invcitem_billed <> 0) AND (invcitem_updateinv) ) JOIN itemsite ON ( (itemsite_item_id=invcitem_item_id) AND (itemsite_warehous_id=invcitem_warehous_id) ) JOIN item ON (item_id=invcitem_item_id) WHERE (invchead_id=pInvcheadid) LOOP -- Issue billed stock from inventory IF (_itemlocSeries = 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; IF (_r.itemsite_costmethod != 'J') THEN SELECT postInvTrans(itemsite_id, 'SH', _r.qty, 'S/O', 'IN', _r.invchead_invcnumber, '', ('Invoice Billed ' || _r.item_number), getPrjAccntId(_r.invchead_prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)), costcat_asset_accnt_id, _itemlocSeries, _glDate) INTO _invhistid FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); ELSE RAISE DEBUG 'postInvoice(%, %, %) tried to postInvTrans a %-costed item', pInvcheadid, pJournalNumber, pItemlocSeries, _r.itemsite_costmethod; END IF; END LOOP; -- Mark the invoice as posted UPDATE invchead SET invchead_posted=TRUE, invchead_gldistdate=_glDate WHERE (invchead_id=pInvcheadid); IF (_totalAmount > 0) THEN -- get a list of allocated CMs FOR _r IN SELECT aropen_id, CASE WHEN((aropen_amount - aropen_paid) >= aropenalloc_amount / (1 / aropen_curr_rate / currRate(aropenalloc_curr_id,_firstExchDate))) THEN aropenalloc_amount / (1 / aropen_curr_rate / currRate(aropenalloc_curr_id,_firstExchDate)) ELSE (aropen_amount - aropen_paid) END AS balance, aropen_curr_id, aropen_curr_rate, aropenalloc_doctype, aropenalloc_doc_id FROM aropenalloc, aropen WHERE ( (aropenalloc_aropen_id=aropen_id) AND ((aropenalloc_doctype='S' AND aropenalloc_doc_id=(SELECT cohead_id FROM cohead WHERE cohead_number=_p.invchead_ordernumber)) OR (aropenalloc_doctype='I' AND aropenalloc_doc_id=_p.invchead_id)) ) LOOP _appliedAmount := _r.balance; IF (_totalAmount < _appliedAmount / (1 / currRate(_r.aropen_curr_id,_firstExchDate) / _r.aropen_curr_rate)) THEN _appliedAmount := _totalAmount; _tmpCurrId := _p.invchead_curr_id; ELSE _tmpCurrId := _r.aropen_curr_id; END IF; -- ignore if no appliable balance IF (_appliedAmount > 0) THEN -- create an arcreditapply record linking the source c/m and the target invoice -- for an amount that is equal to the balance on the invoice or the balance on -- c/m whichever is greater. INSERT INTO arcreditapply (arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id, arcreditapply_reftype, arcreditapply_ref_id) VALUES(_r.aropen_id, _aropenid, _appliedAmount, _tmpCurrId, 'S', _r.aropenalloc_doc_id); -- call postARCreditMemoApplication(aropen_id of C/M) SELECT postARCreditMemoApplication(_r.aropen_id) into _test; -- if no error decrement the balance and contiue on IF (_test >= 0) THEN _totalAmount := _totalAmount - currToCurr(_tmpCurrId, _p.invchead_curr_id, _appliedAmount, _firstExchDate); END IF; END IF; END LOOP; END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postinvoice(integer, integer, integer) OWNER TO admin; -- -- Name: postinvoices(boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postinvoices(boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; BEGIN RETURN postInvoices(pPostUnprinted, FALSE); END; $_$; ALTER FUNCTION public.postinvoices(boolean) OWNER TO admin; -- -- Name: postinvoices(boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postinvoices(boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; pInclZeros ALIAS FOR $2; BEGIN RETURN postInvoices(pPostUnprinted, pInclZeros, fetchJournalNumber('AR-IN')); END; $_$; ALTER FUNCTION public.postinvoices(boolean, boolean) OWNER TO admin; -- -- Name: postinvoices(boolean, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postinvoices(boolean, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; pInclZeros ALIAS FOR $2; pJournalNumber ALIAS FOR $3; _invcheadid INTEGER; _itemlocSeries INTEGER; _counter INTEGER; _r RECORD; BEGIN _itemlocSeries := 0; IF (pInclZeros) THEN FOR _invcheadid IN SELECT invchead_id FROM invchead WHERE ( (NOT invchead_posted) AND (checkInvoiceSitePrivs(invchead_id)) AND (pPostUnprinted OR invchead_printed) ) LOOP SELECT postInvoice(_invcheadid, pJournalNumber, _itemlocSeries) INTO _itemlocSeries; IF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; END LOOP; ELSE FOR _invcheadid IN SELECT invchead_id FROM invchead LEFT OUTER JOIN invcitem ON (invchead_id=invcitem_invchead_id) LEFT OUTER JOIN item ON (invcitem_item_id=item_id) WHERE((NOT invchead_posted) AND (checkInvoiceSitePrivs(invchead_id)) AND (pPostUnprinted OR invchead_printed)) GROUP BY invchead_id, invchead_freight, invchead_misc_amount HAVING (COALESCE(SUM(round((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / CASE WHEN (item_id IS NULL) THEN 1 ELSE invcitem_price_invuomratio END), 2)),0) + invchead_freight + invchead_misc_amount) > 0 LOOP SELECT postInvoice(_invcheadid, pJournalNumber, _itemlocSeries) INTO _itemlocSeries; IF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; END LOOP; END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postinvoices(boolean, boolean, integer) OWNER TO admin; -- -- Name: postinvtrans(integer, text, numeric, text, text, text, text, text, integer, integer, integer, timestamp with time zone, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postinvtrans(pitemsiteid integer, ptranstype text, pqty numeric, pmodule text, pordertype text, pordernumber text, pdocnumber text, pcomments text, pdebitid integer, pcreditid integer, pitemlocseries integer, ptimestamp timestamp with time zone DEFAULT now(), pcostovrld numeric DEFAULT NULL::numeric, pinvhistid integer DEFAULT NULL::integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. -- pInvhistid is the original transaction to be returned, reversed, etc. DECLARE _creditid INTEGER; _debitid INTEGER; _glreturn INTEGER; _invhistid INTEGER; _itemlocdistid INTEGER; _r RECORD; _sense INTEGER; -- direction in which to adjust inventory QOH _t RECORD; _timestamp TIMESTAMP WITH TIME ZONE; _xferwhsid INTEGER; BEGIN -- Cache item and itemsite info SELECT CASE WHEN(itemsite_costmethod IN ('A','J')) THEN COALESCE(abs(pCostOvrld / pQty), avgcost(itemsite_id)) ELSE stdCost(itemsite_item_id) END AS cost, itemsite_costmethod, itemsite_qtyonhand, itemsite_warehous_id, ( (item_type = 'R') OR (itemsite_controlmethod = 'N') ) AS nocontrol, (itemsite_controlmethod IN ('L', 'S')) AS lotserial, (itemsite_loccntrl) AS loccntrl, itemsite_freeze AS frozen INTO _r FROM itemsite JOIN item ON (item_id=itemsite_item_id) WHERE (itemsite_id=pItemsiteid); --Post the Inventory Transactions IF (_r.nocontrol) THEN RETURN -1; -- non-fatal error so dont throw an exception? END IF; IF (COALESCE(pItemlocSeries,0) = 0) THEN RAISE EXCEPTION 'Transaction series must be provided'; END IF; SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; IF ((pTimestamp IS NULL) OR (CAST(pTimestamp AS date)=CURRENT_DATE)) THEN _timestamp := CURRENT_TIMESTAMP; ELSE _timestamp := pTimestamp; END IF; IF (pTransType = 'TS' OR pTransType = 'TR') THEN SELECT * INTO _t FROM tohead WHERE (tohead_number=pDocNumber); IF (pTransType = 'TS') THEN _xferwhsid := CASE WHEN (_t.tohead_src_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_trns_warehous_id WHEN (_t.tohead_trns_warehous_id=_r.itemsite_warehous_id AND pComments ~* 'recall') THEN _t.tohead_src_warehous_id WHEN (_t.tohead_trns_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_dest_warehous_id WHEN (_t.tohead_dest_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_trns_warehous_id ELSE NULL END; ELSIF (pTransType = 'TR') THEN _xferwhsid := CASE WHEN (_t.tohead_src_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_trns_warehous_id WHEN (_t.tohead_trns_warehous_id=_r.itemsite_warehous_id AND pComments ~* 'recall') THEN _t.tohead_dest_warehous_id WHEN (_t.tohead_trns_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_src_warehous_id WHEN (_t.tohead_dest_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_trns_warehous_id ELSE NULL END; END IF; END IF; -- increase inventory: AD RM RT RP RR RS RX RB TR -- decrease inventory: IM IB IT SH SI EX RI -- TS and TR are special: shipShipment and recallShipment should not change -- QOH at the Transfer Order src whs (as this was done by issueToShipping) -- but postReceipt should change QOH at the transit whs IF (pTransType='TS') THEN _sense := CASE WHEN (SELECT tohead_trns_warehous_id=_r.itemsite_warehous_id FROM tohead WHERE (tohead_number=pDocNumber)) THEN -1 ELSE 0 END; ELSIF (pTransType='TR') THEN _sense := CASE WHEN (SELECT tohead_src_warehous_id=_r.itemsite_warehous_id FROM tohead WHERE (tohead_number=pDocNumber)) THEN 0 ELSE 1 END; ELSIF (pTransType IN ('IM', 'IB', 'IT', 'SH', 'SI', 'EX', 'RI')) THEN _sense := -1; ELSE _sense := 1; END IF; IF((_r.itemsite_costmethod='A') AND (_r.itemsite_qtyonhand + round(_sense * pQty, 6)) < 0) THEN -- Can not let average costed itemsites go negative RAISE EXCEPTION 'This transaction will cause an Average Costed item to go negative which is not allowed [xtuple: postinvtrans, -2]'; END IF; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transtype, invhist_transdate, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_ordtype, invhist_ordnumber, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_xfer_warehous_id, invhist_posted, invhist_series ) SELECT _invhistid, itemsite_id, pTransType, _timestamp, pQty, itemsite_qtyonhand, (itemsite_qtyonhand + (_sense * pQty)), itemsite_costmethod, itemsite_value, itemsite_value + (_r.cost * _sense * pQty), pOrderType, pOrderNumber, pDocNumber, pComments, uom_name, _r.cost, _xferwhsid, FALSE, pItemlocSeries FROM itemsite, item, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_id=pItemsiteid) ); IF (pCreditid IN (SELECT accnt_id FROM accnt)) THEN _creditid = pCreditid; ELSE SELECT warehous_default_accnt_id INTO _creditid FROM itemsite, whsinfo WHERE ( (itemsite_warehous_id=warehous_id) AND (itemsite_id=pItemsiteid) ); END IF; IF (pDebitid IN (SELECT accnt_id FROM accnt)) THEN _debitid = pDebitid; ELSE SELECT warehous_default_accnt_id INTO _debitid FROM itemsite, whsinfo WHERE ( (itemsite_warehous_id=warehous_id) AND (itemsite_id=pItemsiteid) ); END IF; -- Post the G/L Transaction IF (_creditid <> _debitid) THEN SELECT insertGLTransaction(pModule, pOrderType, pOrderNumber, pComments, _creditid, _debitid, _invhistid, (_r.cost * pQty), _timestamp::DATE, FALSE) INTO _glreturn; END IF; -- Distribute this if this itemsite is controlled IF ( _r.lotserial OR _r.loccntrl ) THEN _itemlocdistid := nextval('itemlocdist_itemlocdist_id_seq'); INSERT INTO itemlocdist ( itemlocdist_id, itemlocdist_itemsite_id, itemlocdist_source_type, itemlocdist_reqlotserial, itemlocdist_distlotserial, itemlocdist_expiration, itemlocdist_qty, itemlocdist_series, itemlocdist_invhist_id, itemlocdist_order_type, itemlocdist_order_id ) SELECT _itemlocdistid, pItemsiteid, 'O', (((pQty * _sense) > 0) AND _r.lotserial), ((pQty * _sense) < 0), endOfTime(), (_sense * pQty), pItemlocSeries, _invhistid, pOrderType, CASE WHEN pOrderType='SO' THEN getSalesLineItemId(pOrderNumber) ELSE NULL END; -- populate distributions if invhist_id parameter passed to undo IF (pInvhistid IS NOT NULL) THEN INSERT INTO itemlocdist ( itemlocdist_itemlocdist_id, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_qty, itemlocdist_series, itemlocdist_invhist_id ) SELECT _itemlocdistid, 'L', COALESCE(invdetail_location_id, -1), invhist_itemsite_id, invdetail_ls_id, COALESCE(invdetail_expiration, endoftime()), (invdetail_qty * -1.0), pItemlocSeries, _invhistid FROM invhist JOIN invdetail ON (invdetail_invhist_id=invhist_id) WHERE (invhist_id=pInvhistid); IF ( _r.lotserial) THEN INSERT INTO lsdetail ( lsdetail_itemsite_id, lsdetail_ls_id, lsdetail_created, lsdetail_source_type, lsdetail_source_id, lsdetail_source_number ) SELECT invhist_itemsite_id, invdetail_ls_id, CURRENT_TIMESTAMP, 'I', _itemlocdistid, '' FROM invhist JOIN invdetail ON (invdetail_invhist_id=invhist_id) WHERE (invhist_id=pInvhistid); END IF; PERFORM distributeitemlocseries(pItemlocSeries); END IF; END IF; -- end of distributions -- These records will be used for posting G/L transactions to trial balance after records committed. -- If we try to do it now concurrency locking prevents any transactions while -- user enters item distribution information. Cant have that. INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _glreturn, pItemlocSeries ); RETURN _invhistid; END; $$; ALTER FUNCTION public.postinvtrans(pitemsiteid integer, ptranstype text, pqty numeric, pmodule text, pordertype text, pordernumber text, pdocnumber text, pcomments text, pdebitid integer, pcreditid integer, pitemlocseries integer, ptimestamp timestamp with time zone, pcostovrld numeric, pinvhistid integer) OWNER TO admin; -- -- Name: postitemlocseries(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postitemlocseries(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocseries ALIAS FOR $1; _result INTEGER; BEGIN PERFORM postIntoTrialBalance(itemlocpost_glseq) FROM ( SELECT DISTINCT itemlocpost_glseq, gltrans_accnt_id FROM itemlocpost JOIN gltrans ON (itemlocpost_glseq=gltrans_sequence) WHERE (itemlocpost_itemlocseries=pItemlocseries) ORDER BY gltrans_accnt_id ) AS data; PERFORM postInvHist(invhist_id) FROM invhist JOIN itemsite ON (invhist_itemsite_id=itemsite_id) WHERE ( (invhist_series=pItemlocseries) AND ( NOT invhist_posted) AND ( NOT itemsite_freeze) ); DELETE FROM itemlocpost WHERE (itemlocpost_itemlocseries=pItemlocseries); RETURN TRUE; END; $_$; ALTER FUNCTION public.postitemlocseries(integer) OWNER TO admin; -- -- Name: postjournals(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postjournals(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _transCount INTEGER := 0; _journalnumber INTEGER := fetchJournalNumber('J/P'); _sequence INTEGER := fetchGLSequence(); _sltrans RECORD; BEGIN -- Make sure that we balance IF (SELECT SUM(sltrans_amount) != 0 FROM sltrans WHERE ((NOT sltrans_posted ) AND (sltrans_sequence=pSequence))) THEN RAISE EXCEPTION 'Can not post journals. Transactions do not balance in selected date range.'; END IF; -- March through the sltrans members, posting them one at a time FOR _sltrans IN SELECT sltrans_source, sltrans_accnt_id, SUM(sltrans_amount) as amount FROM sltrans WHERE ((sltrans_amount<>0.0) AND (NOT sltrans_posted) AND (sltrans_sequence=pSequence)) GROUP BY sltrans_source, sltrans_accnt_id LOOP -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (CURRENT_DATE BETWEEN period_start AND period_end) WHERE (accnt_id = _sltrans.sltrans_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', _sltrans.sltrans_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (CURRENT_DATE BETWEEN period_start AND period_end) WHERE (accnt_id = _sltrans.sltrans_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', _sltrans.sltrans_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; IF (_sltrans.amount != 0) THEN INSERT INTO gltrans ( gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_notes, gltrans_doctype, gltrans_docnumber, gltrans_amount, gltrans_journalnumber, gltrans_rec ) VALUES ( FALSE, FALSE, CURRENT_TIMESTAMP, CURRENT_DATE, _sequence, _sltrans.sltrans_accnt_id, _sltrans.sltrans_source, 'Journal Posting', 'JP', _journalnumber, _sltrans.amount, _journalnumber, TRUE ); _transCount := _transCount + 1; END IF; END LOOP; -- Update all of the posted sltrans members UPDATE sltrans SET sltrans_posted=true, sltrans_gltrans_journalnumber=_journalnumber WHERE ((NOT sltrans_posted) AND (sltrans_sequence=pSequence)); PERFORM postIntoTrialBalance(_sequence); RETURN _journalnumber; END; $_$; ALTER FUNCTION public.postjournals(integer) OWNER TO admin; -- -- Name: postjournals(text[], date, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postjournals(text[], date, date, date) RETURNS SETOF integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSources ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; pDistDate ALIAS FOR $4; _i INTEGER; BEGIN FOR _i IN 1..ARRAY_UPPER(pSources,1) LOOP RETURN NEXT postJournals(pSources[_i], pStartDate, pEndDate, pDistDate); END LOOP; RETURN; END; $_$; ALTER FUNCTION public.postjournals(text[], date, date, date) OWNER TO admin; -- -- Name: postjournals(text, date, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postjournals(text, date, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; pDistDate ALIAS FOR $4; _transCount INTEGER := 0; _journalnumber INTEGER := fetchJournalNumber('J/P'); _sequence INTEGER := fetchGLSequence(); _sltrans RECORD; BEGIN -- Make sure that we balance IF (SELECT SUM(sltrans_amount) != 0 FROM sltrans WHERE ((NOT sltrans_posted ) AND (sltrans_source=pSource) AND (sltrans_date BETWEEN pStartDate AND pEndDate))) THEN RAISE EXCEPTION 'Can not post journals. Transactions do not balance in selected date range.'; END IF; -- March through the sltrans members, posting them one at a time FOR _sltrans IN SELECT sltrans_source, sltrans_accnt_id, SUM(sltrans_amount) as amount FROM sltrans WHERE ((sltrans_amount<>0.0) AND (NOT sltrans_posted) AND (sltrans_source=pSource) AND (sltrans_date BETWEEN pStartDate AND pEndDate)) GROUP BY sltrans_source, sltrans_accnt_id LOOP -- refuse to accept postings into frozen periods if any of the accounts disallow it IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id = _sltrans.sltrans_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', _sltrans.sltrans_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; IF (_sltrans.amount != 0) THEN INSERT INTO gltrans ( gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_notes, gltrans_doctype, gltrans_docnumber, gltrans_amount, gltrans_journalnumber ) VALUES ( FALSE, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _sltrans.sltrans_accnt_id, _sltrans.sltrans_source, 'Journal Posting', 'JP', _journalnumber, _sltrans.amount, _journalnumber ); _transCount := _transCount + 1; END IF; END LOOP; -- Update all of the posted sltrans members UPDATE sltrans SET sltrans_posted=true, sltrans_gltrans_journalnumber=_journalnumber WHERE ((NOT sltrans_posted) AND (sltrans_source=pSource) AND (sltrans_date BETWEEN pStartDate AND pEndDate)); PERFORM postIntoTrialBalance(_sequence); RETURN _journalnumber; END; $_$; ALTER FUNCTION public.postjournals(text, date, date, date) OWNER TO admin; -- -- Name: postmessage(timestamp without time zone, timestamp without time zone, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postmessage(timestamp without time zone, timestamp without time zone, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pScheduled ALIAS FOR $1; pExpires ALIAS FOR $2; pText ALIAS FOR $3; _msgid INTEGER; BEGIN SELECT NEXTVAL('msg_msg_id_seq') INTO _msgid; INSERT INTO msg (msg_id, msg_posted, msg_scheduled, msg_expires, msg_username, msg_text) VALUES (_msgid, CURRENT_TIMESTAMP, pScheduled, pExpires, getEffectiveXtUser(), pText); INSERT INTO msguser ( msguser_msg_id, msguser_username ) SELECT _msgid, usr_username FROM usr WHERE (usr_username <> getEffectiveXtUser()); NOTIFY "messagePosted"; RETURN _msgid; END; $_$; ALTER FUNCTION public.postmessage(timestamp without time zone, timestamp without time zone, text) OWNER TO admin; -- -- Name: postmessage(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postmessage(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pText ALIAS FOR $2; _msgid INTEGER; BEGIN SELECT NEXTVAL('msg_msg_id_seq') INTO _msgid; INSERT INTO msg (msg_id, msg_posted, msg_scheduled, msg_expires, msg_username, msg_text) VALUES (_msgid, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, endOfTime(), getEffectiveXtUser(), pText); INSERT INTO msguser ( msguser_msg_id, msguser_username ) VALUES ( _msgid, pUsername ); NOTIFY "messagePosted"; RETURN _msgid; END; $_$; ALTER FUNCTION public.postmessage(text, text) OWNER TO admin; -- -- Name: postmessage(timestamp without time zone, timestamp without time zone, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postmessage(timestamp without time zone, timestamp without time zone, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pScheduled ALIAS FOR $1; pExpires ALIAS FOR $2; pUsername ALIAS FOR $3; pText ALIAS FOR $4; _msgid INTEGER; BEGIN SELECT NEXTVAL('msg_msg_id_seq') INTO _msgid; INSERT INTO msg (msg_id, msg_posted, msg_scheduled, msg_expires, msg_username, msg_text) VALUES (_msgid, CURRENT_TIMESTAMP, pScheduled, pExpires, getEffectiveXtUser(), pText); INSERT INTO msguser ( msguser_msg_id, msguser_username ) VALUES ( _msgid, pUsername ); NOTIFY "messagePosted"; RETURN _msgid; END; $_$; ALTER FUNCTION public.postmessage(timestamp without time zone, timestamp without time zone, text, text) OWNER TO admin; -- -- Name: postmisccount(integer, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postmisccount(pitemsiteid integer, pqty numeric, pcomments text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pComments ALIAS FOR $3; _invcntid INTEGER; _result INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; SELECT invcnt_id INTO _invcntid FROM invcnt WHERE ( (NOT invcnt_posted) AND (invcnt_itemsite_id=pItemsiteid) ); IF (_invcntid IS NULL) THEN _invcntid := NEXTVAL('invcnt_invcnt_id_seq'); INSERT INTO invcnt ( invcnt_id, invcnt_itemsite_id, invcnt_tagdate, invcnt_qoh_before, invcnt_qoh_after, invcnt_tag_username, invcnt_cntdate, invcnt_cnt_username, invcnt_postdate, invcnt_post_username, invcnt_posted, invcnt_priority, invcnt_comments ) SELECT _invcntid, pItemsiteid, now(), itemsite_qtyonhand, pQty, getEffectiveXtUser(), now(), getEffectiveXtUser(), now(), getEffectiveXtUser(), FALSE, FALSE, pComments FROM itemsite WHERE (itemsite_id=pItemsiteid); SELECT postCountTag(_invcntid, FALSE) INTO _result; IF (_result < 0) THEN DELETE FROM invcnt WHERE (invcnt_id=_invcntid); END IF; RETURN _result; ELSE RETURN -2; END IF; END; $_$; ALTER FUNCTION public.postmisccount(pitemsiteid integer, pqty numeric, pcomments text) OWNER TO admin; -- -- Name: postpogltransactions(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postpogltransactions() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE gltrans SET gltrans_exported=TRUE WHERE ( (NOT gltrans_exported) AND (gltrans_source='A/P') AND (gltrans_doctype IN ('VO')) ); RETURN TRUE; END; $$; ALTER FUNCTION public.postpogltransactions() OWNER TO admin; -- -- Name: postporeceipt(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postporeceipt(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN postReceipt($1, $2); END; $_$; ALTER FUNCTION public.postporeceipt(integer, integer) OWNER TO admin; -- -- Name: postporeceipts(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postporeceipts(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN postReceipts('PO', $1, NULL); END; $_$; ALTER FUNCTION public.postporeceipts(integer) OWNER TO admin; -- -- Name: postporeturncreditmemo(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postporeturncreditmemo(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPorejectId ALIAS FOR $1; BEGIN RETURN postPoReturnCreditMemo(pPorejectId, NULL); END; $_$; ALTER FUNCTION public.postporeturncreditmemo(integer) OWNER TO admin; -- -- Name: postporeturncreditmemo(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postporeturncreditmemo(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPorejectId ALIAS FOR $1; pAmount ALIAS FOR $2; _p RECORD; _a RECORD; _itemsiteId INTEGER; _docNumber TEXT; _sequence INTEGER; _journalNumber INTEGER; _apopenid INTEGER; _exchGainItem NUMERIC; _itemAmount_base NUMERIC; _itemAmount NUMERIC; _glseriesTotal NUMERIC; _tmpTotal NUMERIC; _test INTEGER; _exchDate DATE; _tax RECORD; _taxAmount NUMERIC := 0; _taxAmount_base NUMERIC; _apaccntid INTEGER; BEGIN --Set things up SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; SELECT fetchGLSequence() INTO _sequence; SELECT fetchJournalNumber('AP-MISC') INTO _journalNumber; SELECT fetchapmemonumber() INTO _docNumber; _glseriesTotal := 0; --Get poreject data SELECT pohead_vend_id, pohead_number, pohead_curr_id, pohead_orderdate, pohead_taxzone_id, poitem_id, poitem_itemsite_id,poitem_expcat_id, poitem_taxtype_id, itemsite_costcat_id, poreject_qty, poreject_date, ('Return of Item ' || COALESCE(item_number,poitem_vend_item_number) || ', qty. ' || formatqty(poreject_qty)) AS notes, poreject_value AS value, currToBase(pohead_curr_id,(poitem_unitprice * poreject_qty),CURRENT_DATE) AS itemAmount_base, (poitem_unitprice * poreject_qty) AS itemAmount INTO _p FROM pohead, poreject, poitem LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) LEFT OUTER JOIN item ON (itemsite_item_id=item_id) WHERE ((poreject_poitem_id=poitem_id) AND (pohead_id=poitem_pohead_id) AND (poreject_id=pPorejectId)); _itemAmount := _p.itemAmount; _itemAmount_base := _p.itemAmount_base; IF (pAmount IS NOT NULL) THEN _itemAmount := pAmount; _itemAmount_base := currToBase(_p.pohead_curr_id, pAmount, CURRENT_DATE); END IF; -- Grab the G/L Accounts IF (COALESCE(_p.poitem_itemsite_id, -1) = -1) THEN SELECT pp.accnt_id AS pp_accnt_id, lb.accnt_id AS lb_accnt_id INTO _a FROM expcat, accnt AS pp, accnt AS lb WHERE ( (expcat_purchprice_accnt_id=pp.accnt_id) AND (expcat_liability_accnt_id=lb.accnt_id) AND (expcat_id=_p.poitem_expcat_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Credit Memo due to unassigned G/L Accounts.'; END IF; ELSE SELECT pp.accnt_id AS pp_accnt_id, lb.accnt_id AS lb_accnt_id INTO _a FROM costcat, accnt AS pp, accnt AS lb WHERE ( (costcat_purchprice_accnt_id=pp.accnt_id) AND (costcat_liability_accnt_id=lb.accnt_id) AND (costcat_id=_p.itemsite_costcat_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Credit Memo due to unassigned G/L Accounts.'; END IF; END IF; -- AP Open Item record INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_accnt_id, apopen_curr_id, apopen_closedate ) VALUES ( _apopenid, getEffectiveXtUser(), _journalNumber, _p.pohead_vend_id, _docNumber, 'C', _p.pohead_number, CURRENT_DATE, CURRENT_DATE, CURRENT_DATE, -1, round(_itemAmount, 2), 0, (round(_itemAmount, 2) <> 0), _p.notes, -1, _p.pohead_curr_id, CASE WHEN (round(_itemAmount, 2) = 0) THEN _p.poreject_date END ); -- Taxes FOR _tax IN SELECT taxdetail_tax_id, sum(taxdetail_tax) AS taxdetail_tax, currToBase(_p.pohead_curr_id, round(sum(taxdetail_tax),2), current_date) AS taxbasevalue FROM calculateTaxDetail(_p.pohead_taxzone_id, _p.poitem_taxtype_id, current_date, _p.pohead_curr_id, _itemAmount) GROUP BY taxdetail_tax_id LOOP INSERT INTO apopentax (taxhist_basis,taxhist_percent,taxhist_amount,taxhist_docdate, taxhist_tax_id, taxhist_tax, taxhist_taxtype_id, taxhist_parent_id, taxhist_journalnumber ) VALUES (0, 0, 0, current_date, _tax.taxdetail_tax_id, _tax.taxdetail_tax, getadjustmenttaxtypeid(), _apopenid, _journalNumber); _taxAmount := _taxAmount + _tax.taxdetail_tax; END LOOP; _taxAmount_base := addTaxToGLSeries(_sequence, 'A/P', 'CM', _docNumber, _p.pohead_curr_id, current_date, current_date, 'apopentax', _apopenid, _p.notes); UPDATE apopen SET apopen_amount = round(_itemAmount + _taxAmount,2) WHERE (apopen_id = _apopenid); -- Distribute from the clearing account PERFORM insertIntoGLSeries( _sequence, 'A/P', 'CM', _docNumber, _a.lb_accnt_id, round(_p.value, 2), current_date, _p.notes ); _glseriesTotal := _glseriesTotal + round(_p.value, 2); -- Distribute the remaining variance to the Purchase Price Variance account IF (round(_itemAmount_base, 2) <> round(_p.value, 2)) THEN _tmpTotal := round(_itemAmount_base, 2) - round(_p.value, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'CM', _docNumber, _a.pp_accnt_id, _tmpTotal, current_date, _p.notes ); _glseriesTotal := _glseriesTotal + _tmpTotal; END IF; -- Post the reject item for this P/O Item as Invoiced UPDATE poreject SET poreject_invoiced=TRUE WHERE poreject_id=pPorejectId; -- Update the qty vouchered field UPDATE poitem SET poitem_qty_vouchered = (poitem_qty_vouchered - _p.poreject_qty) WHERE (poitem_id=_p.poitem_id); -- Post to A/P SELECT findAPAccount(_p.pohead_vend_id) INTO _apaccntid; IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Credit Memo due to an unassigned A/P Account.'; END IF; SELECT insertIntoGLSeries( _sequence, 'A/P', 'CM', _docNumber, _apaccntid, round(_itemAmount_base + _taxAmount_base, 2) *-1, current_date, _p.notes ) INTO _test; IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Credit Memo.'; END IF; -- Clean up loose ends _glseriesTotal := _glseriesTotal + round(_itemAmount_base, 2)*-1; IF (round(_glseriesTotal, 2) != 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/P', 'CM', 'Currency Exchange Rounding - ' || _docNumber, getGainLossAccntId(_apaccntid), round(_glseriesTotal, 2) * -1, current_date, _p.notes); END IF; -- Post it all PERFORM postGLSeries(_sequence, _journalNumber); RETURN _journalNumber; END; $_$; ALTER FUNCTION public.postporeturncreditmemo(integer, numeric) OWNER TO admin; -- -- Name: postporeturns(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postporeturns(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; _itemlocSeries INTEGER; _p RECORD; _returnval INTEGER; BEGIN _itemlocSeries := 0; SELECT postPoReturns(pPoheadid,false) INTO _itemlocseries; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postporeturns(integer) OWNER TO admin; -- -- Name: postporeturns(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postporeturns(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; pCreateMemo ALIAS FOR $2; _itemlocSeries INTEGER; _p RECORD; _returnval INTEGER; _tmp INTEGER; _pricevar NUMERIC := 0.00; _invhistid INTEGER; _journalNumber INTEGER := fetchJournalNumber('GL-MISC'); BEGIN _itemlocSeries := 0; FOR _p IN SELECT pohead_number, pohead_curr_id, poreject_id, poitem_prj_id, poreject_poitem_id, poitem_id, poitem_expcat_id, poitem_linenumber, currToBase(COALESCE(recv_purchcost_curr_id, pohead_curr_id), COALESCE(recv_purchcost, poitem_unitprice), pohead_orderdate) AS poitem_unitprice_base, COALESCE(itemsite_id, -1) AS itemsiteid, poitem_invvenduomratio, SUM(poreject_qty) AS totalqty, itemsite_item_id, itemsite_costmethod, itemsite_controlmethod, recv_date FROM pohead JOIN poitem ON (poitem_pohead_id=pohead_id) JOIN poreject ON (poreject_poitem_id=poitem_id AND NOT poreject_posted) LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) LEFT OUTER JOIN recv ON (recv_id=poreject_recv_id) WHERE (pohead_id=pPoheadid) GROUP BY poreject_id, pohead_number, poreject_poitem_id, poitem_id, poitem_prj_id, poitem_expcat_id, poitem_linenumber, poitem_unitprice, pohead_curr_id, pohead_orderdate, itemsite_id, poitem_invvenduomratio, itemsite_item_id, itemsite_costmethod, itemsite_controlmethod, recv_date, recv_purchcost_curr_id, recv_purchcost LOOP IF (_p.itemsiteid = -1) THEN SELECT insertGLTransaction( 'S/R', 'PO', _p.pohead_number, 'Return Non-Inventory to P/O', expcat_liability_accnt_id, getPrjAccntId(_p.poitem_prj_id, expcat_exp_accnt_id), -1, round(_p.poitem_unitprice_base * _p.totalqty * -1, 2), CURRENT_DATE ) INTO _returnval FROM expcat WHERE (expcat_id=_p.poitem_expcat_id); UPDATE poreject SET poreject_posted=TRUE, poreject_value= round(_p.poitem_unitprice_base * _p.totalqty, 2) WHERE (poreject_id=_p.poreject_id); ELSEIF (_p.itemsite_controlmethod='N') THEN SELECT insertGLTransaction('S/R', 'PO', _p.pohead_number, 'Return Non-Controlled Inventory from PO', costcat_liability_accnt_id, getPrjAccntId(_p.poitem_prj_id, costcat_exp_accnt_id), -1, round((_p.poitem_unitprice_base * _p.totalqty * -1), 2), CURRENT_DATE ) INTO _returnval FROM itemsite, costcat WHERE((itemsite_costcat_id=costcat_id) AND (itemsite_id=_p.itemsiteid)); IF (_returnval = -3) THEN -- zero value transaction _returnval := 0; END IF; UPDATE poreject SET poreject_posted=TRUE, poreject_value= round(_p.poitem_unitprice_base * _p.totalqty, 2) WHERE (poreject_id=_p.poreject_id); ELSE IF (_itemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( itemsite_id, 'RP', (_p.totalqty * _p.poitem_invvenduomratio * -1), 'S/R', 'PO', (_p.pohead_number || '-' || _p.poitem_linenumber::TEXT), '', 'Return Inventory to P/O', costcat_asset_accnt_id, costcat_liability_accnt_id, _itemlocSeries, CURRENT_TIMESTAMP) INTO _returnval FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_p.itemsiteid) ); UPDATE poreject SET poreject_posted=TRUE, poreject_value=(invhist_unitcost *_p.totalqty * _p.poitem_invvenduomratio) FROM invhist WHERE ((poreject_id=_p.poreject_id) AND (invhist_id=_returnval)); END IF; IF (_returnval < 0) THEN RETURN _returnval; END IF; UPDATE poitem SET poitem_qty_returned=(poitem_qty_returned + _p.totalqty), poitem_status='O' WHERE (poitem_id=_p.poitem_id); IF (fetchMetricBool('RecordPPVonReceipt')) THEN -- If the 'Purchase Price Variance on Receipt' option is true _invhistid := _returnval; -- Find the difference in the purchase price value expected from the P/O and the value of the transaction SELECT ((_p.poitem_unitprice_base * poitem_qty_returned) - (invhist_value_before - invhist_value_after)) INTO _pricevar FROM invhist, poitem WHERE ((invhist_id = _invhistid) AND (poitem_id=_p.poitem_id)); -- If difference exists then IF (_pricevar <> 0.00) THEN -- Record an additional GL Transaction for the purchase price variance SELECT insertGLTransaction( _journalNumber, 'S/R', 'PO', _p.pohead_number, 'Purchase price variance adjusted for P/O ' || _p.pohead_number || ' for item ' || _p.poitem_linenumber::TEXT, costcat_liability_accnt_id, getPrjAccntId(_p.poitem_prj_id, costcat_purchprice_accnt_id), -1, _pricevar, CURRENT_DATE, false ) INTO _tmp FROM itemsite, costcat, poitem WHERE ((itemsite_costcat_id=costcat_id) AND (itemsite_id=poitem_itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not insert G/L transaction: no cost category found for itemsite_id %', _p.itemsiteid; ELSIF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; END IF; END IF; IF (pCreateMemo) THEN SELECT postPoReturnCreditMemo(_p.poreject_id) INTO _returnval; END IF; IF (_returnval < 0) THEN RETURN _returnval; END IF; END LOOP; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postporeturns(integer, boolean) OWNER TO admin; -- -- Name: postproduction(integer, numeric, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postproduction(integer, numeric, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN) is deprecated. please use postProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER, TIMESTAMP WITH TIME ZONE) instead'; RETURN postProduction($1, $2, $3, 0, now()); END; $_$; ALTER FUNCTION public.postproduction(integer, numeric, boolean, boolean) OWNER TO admin; -- -- Name: postproduction(integer, numeric, boolean, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postproduction(integer, numeric, boolean, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN, INTEGER) is deprecated. please use postProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER, TIMESTAMP WITH TIME ZONE) instead'; RETURN postProduction($1, $2, $3, $5, now()); END; $_$; ALTER FUNCTION public.postproduction(integer, numeric, boolean, boolean, integer) OWNER TO admin; -- -- Name: postproduction(integer, numeric, boolean, boolean, integer, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postproduction(integer, numeric, boolean, boolean, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN, INTEGER, TEXT, TEXT) is deprecated. please use postProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER, TIMESTAMP WITH TIME ZONE) instead'; RETURN postProduction($1, $2, $3, $5, now()); END; $_$; ALTER FUNCTION public.postproduction(integer, numeric, boolean, boolean, integer, text, text) OWNER TO admin; -- -- Name: postproduction(integer, numeric, boolean, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postproduction(integer, numeric, boolean, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pQty ALIAS FOR $2; pBackflush ALIAS FOR $3; pItemlocSeries ALIAS FOR $4; pGlDistTS ALIAS FOR $5; _test INTEGER; _invhistid INTEGER; _itemlocSeries INTEGER; _parentQty NUMERIC; _r RECORD; _sense TEXT; _wipPost NUMERIC; _woNumber TEXT; _ucost NUMERIC; BEGIN IF (pQty = 0) THEN RETURN 0; ELSIF (pQty > 0) THEN _sense = 'from'; ELSE _sense = 'to'; END IF; IF ( ( SELECT wo_status FROM wo WHERE (wo_id=pWoid) ) NOT IN ('R','E','I') ) THEN RETURN -1; END IF; -- Make sure that all Component Item Sites exist SELECT bomitem_id INTO _test FROM wo, bomitem, itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=bomitem_parent_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (wo_id=pWoid) AND (bomitem_rev_id=wo_bom_rev_id) AND (bomitem_item_id NOT IN ( SELECT component.itemsite_item_id FROM itemsite AS component, itemsite AS parent WHERE ( (wo_itemsite_id=parent.itemsite_id) AND (parent.itemsite_item_id=bomitem_parent_item_id) AND (bomitem_item_id=component.itemsite_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (bomitem_rev_id=wo_bom_rev_id) AND (component.itemsite_active) AND (component.itemsite_warehous_id=parent.itemsite_warehous_id) ) ) ) ) LIMIT 1; IF (FOUND AND pBackflush) THEN RETURN -2; END IF; SELECT formatWoNumber(pWoid) INTO _woNumber; SELECT roundQty(item_fractional, pQty) INTO _parentQty FROM wo, itemsite, item WHERE ((wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (wo_id=pWoid)); -- Create the material receipt transaction IF (pItemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; ELSE _itemlocSeries = pItemlocSeries; END IF; IF (pBackflush) THEN FOR _r IN SELECT womatl_id, womatl_qtyiss + (CASE WHEN (womatl_qtywipscrap > ((womatl_qtyfxd + (_parentQty + wo_qtyrcv) * womatl_qtyper) * womatl_scrap)) THEN (womatl_qtyfxd + (_parentQty + wo_qtyrcv) * womatl_qtyper) * womatl_scrap ELSE womatl_qtywipscrap END) AS consumed, (womatl_qtyfxd + ((_parentQty + wo_qtyrcv) * womatl_qtyper)) * (1 + womatl_scrap) AS expected FROM womatl, wo, itemsite, item WHERE ((womatl_issuemethod IN ('L', 'M')) AND (womatl_wo_id=pWoid) AND (womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id)) LOOP -- Don't issue more than should have already been consumed at this point IF (pQty > 0) THEN IF (noNeg(_r.expected - _r.consumed) > 0) THEN SELECT issueWoMaterial(_r.womatl_id, noNeg(_r.expected - _r.consumed), _itemlocSeries, pGlDistTS) INTO _itemlocSeries; END IF; ELSE -- Used by postMiscProduction of disassembly SELECT returnWoMaterial(_r.womatl_id, (_r.expected * -1.0), _itemlocSeries, CURRENT_TIMESTAMP, true) INTO _itemlocSeries; END IF; UPDATE womatl SET womatl_issuemethod='L' WHERE ( (womatl_issuemethod='M') AND (womatl_id=_r.womatl_id) ); END LOOP; END IF; SELECT CASE WHEN (pQty < 0 AND itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * pQty WHEN (pQty < 0) THEN avgcost(itemsite_id) * pQty WHEN (wo_cosmethod = 'D') THEN wo_wipvalue ELSE round((wo_wipvalue - (wo_postedvalue / wo_qtyord * (wo_qtyord - CASE WHEN (wo_qtyord < wo_qtyrcv + pQty) THEN wo_qtyord ELSE wo_qtyrcv + pQty END ))),2) END INTO _wipPost FROM wo JOIN itemsite ON (wo_itemsite_id=itemsite_id) WHERE (wo_id=pWoid); SELECT postInvTrans( itemsite_id, 'RM', _parentQty, 'W/O', 'WO', _woNumber, '', ('Receive Inventory ' || item_number || ' ' || _sense || ' Manufacturing'), costcat_asset_accnt_id, getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), _itemlocSeries, pGlDistTS, -- the following is only actually used when the item is average or job costed _wipPost ) INTO _invhistid FROM wo, itemsite, item, costcat WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (wo_id=pWoid) ); IF (pQty < 0 ) THEN _wipPost := _wipPost * -1; END IF; -- Increase this W/O's received qty decrease its WIP value UPDATE wo SET wo_qtyrcv = (wo_qtyrcv + _parentQty), wo_wipvalue = (wo_wipvalue - (CASE WHEN (itemsite_costmethod IN ('A','J')) THEN _wipPost WHEN (itemsite_costmethod='S') THEN (stdcost(itemsite_item_id) * _parentQty) ELSE 0.0 END)) FROM itemsite, item WHERE ((wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (wo_id=pWoid)); -- ROB Increase this W/O's WIP value for custom costing SELECT SUM(itemcost_stdcost * _parentQty) INTO _ucost FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN itemcost ON (itemcost_item_id=itemsite_item_id) JOIN costelem ON ((costelem_id=itemcost_costelem_id) AND (costelem_exp_accnt_id IS NOT NULL) AND (NOT costelem_sys)) WHERE (wo_id=pWoid); UPDATE wo SET wo_wipvalue = (wo_wipvalue + coalesce(_ucost,0)) WHERE (wo_id=pWoid); -- ROB Distribute to G/L - create Cost Variance, debit WIP PERFORM insertGLTransaction( 'W/O', 'WO', _woNumber, ('Post Other Cost ' || item_number || ' ' || _sense || ' Manufacturing'), getPrjAccntId(wo_prj_id, costelem_exp_accnt_id), getPrjAccntId(wo_prj_id,costcat_wip_accnt_id), _invhistid, (itemcost_stdcost * _parentQty), pGlDistTS::DATE ) FROM wo, costelem, itemcost, costcat, itemsite, item WHERE ((wo_id=pWoid) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (costelem_id = itemcost_costelem_id) AND (itemcost_item_id = itemsite_item_id) AND (itemsite_costcat_id = costcat_id) AND (costelem_exp_accnt_id) IS NOT NULL AND (costelem_sys = false)); --End -- Make sure the W/O is at issue status UPDATE wo SET wo_status='I' WHERE (wo_id=pWoid); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postproduction(integer, numeric, boolean, integer, timestamp with time zone) OWNER TO admin; -- -- Name: postreceipt(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postreceipt(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2011 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE precvid ALIAS FOR $1; _itemlocSeries INTEGER := COALESCE($2, 0); _freightAccnt INTEGER; _glDate TIMESTAMP WITH TIME ZONE; _o RECORD; _ordertypeabbr TEXT; _r RECORD; _ra RECORD; _recvinvqty NUMERIC := 0.00; _recvvalue NUMERIC := 0.00; _pricevar NUMERIC := 0.00; _tmp INTEGER; _toitemitemid INTEGER; _coheadid INTEGER; _coitemid INTEGER; _linenumber INTEGER; _invhistid INTEGER; _shipheadid INTEGER; _ship BOOLEAN; _i RECORD; BEGIN SELECT recv_id, recv_order_type, recv_orderitem_id, recv_qty, round(currToBase(recv_freight_curr_id, recv_freight, recv_date::DATE), 2) AS recv_freight_base, recv_freight, recv_freight_curr_id, recv_date, recv_gldistdate, itemsite_id, itemsite_item_id, item_inv_uom_id, itemsite_costmethod, itemsite_controlmethod, vend_name, item_number, item_fractional INTO _r FROM recv LEFT OUTER JOIN itemsite ON (recv_itemsite_id=itemsite_id) LEFT OUTER JOIN item ON (itemsite_item_id=item_id) LEFT OUTER JOIN vendinfo ON (recv_vend_id=vend_id) WHERE ((recv_id=precvid) AND (NOT recv_posted)); IF (NOT FOUND) THEN IF (_itemlocSeries = 0) THEN RETURN -10; END IF; RETURN _itemlocSeries; ELSEIF (_r.recv_qty <= 0) THEN RETURN -11; ELSIF (_r.recv_order_type ='PO') THEN _ordertypeabbr := ('P/O for ' || _r.vend_name || ' for item ' || _r.item_number); SELECT pohead_number AS orderhead_number, poitem_id AS orderitem_id, poitem_linenumber AS orderitem_linenumber, currToBase(pohead_curr_id, COALESCE(recv_purchcost, poitem_unitprice), recv_date::DATE) AS item_unitprice_base, poitem_invvenduomratio AS invvenduomratio, pohead_orderdate AS orderdate, pohead_dropship, poitem_prj_id AS prj_id INTO _o FROM recv, pohead, poitem WHERE ((recv_orderitem_id=poitem_id) AND (poitem_pohead_id=pohead_id) AND (NOT recv_posted) AND (recv_id=precvid)); ELSIF (_r.recv_order_type ='RA') THEN _ordertypeabbr := 'R/A for item ' || _r.item_number; SELECT rahead_id AS orderhead_id, rahead_number AS orderhead_number, raitem_id AS orderitem_id, raitem_linenumber AS orderitem_linenumber, currToBase(rahead_curr_id, raitem_unitprice, recv_date::DATE) AS item_unitprice_base, raitem_qty_invuomratio AS invvenduomratio, rahead_authdate AS orderdate, raitem_unitcost AS unitcost, rahead_prj_id AS prj_id INTO _o FROM recv, rahead, raitem WHERE ((recv_orderitem_id=raitem_id) AND (raitem_rahead_id=rahead_id) AND (NOT recv_posted) AND (recv_id=precvid)); ELSIF (_r.recv_order_type ='TO') THEN _ordertypeabbr := 'T/O for item ' || _r.item_number; SELECT tohead_number AS orderhead_number, toitem_id AS orderitem_id, toitem_linenumber AS orderitem_linenumber, toitem_stdcost AS item_unitprice_base, 1.0 AS invvenduomratio, tohead_orderdate AS orderdate, NULL AS prj_id INTO _o FROM recv, tohead, toitem WHERE ((recv_orderitem_id=toitem_id) AND (toitem_tohead_id=tohead_id) AND (NOT recv_posted) AND (recv_id=precvid)); ELSE RETURN -13; -- don't know how to handle this order type END IF; IF (NOT FOUND) THEN IF (_itemlocSeries = 0) THEN RETURN -10; END IF; RETURN _itemlocSeries; END IF; IF (_itemlocSeries = 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); ELSEIF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; _glDate := COALESCE(_r.recv_gldistdate, _r.recv_date); _recvinvqty := roundQty(_r.item_fractional, (_r.recv_qty * _o.invvenduomratio)); IF ( (_r.recv_order_type = 'PO') AND (_r.itemsite_id = -1 OR _r.itemsite_id IS NULL OR _r.itemsite_controlmethod = 'N') ) THEN IF (_r.itemsite_id IS NOT NULL) THEN SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Controlled Inventory from ' || _ordertypeabbr, costcat_liability_accnt_id, getPrjAccntId(_o.prj_id, costcat_exp_accnt_id), -1, round((_o.item_unitprice_base * _r.recv_qty),2), _glDate::DATE, false ) INTO _tmp FROM poitem, itemsite, costcat WHERE((poitem_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (poitem_id=_o.orderitem_id)); ELSE SELECT insertGLTransaction(fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory from ' || 'P/O for ' || _r.vend_name || ' for ' || expcat_code, expcat_liability_accnt_id, getPrjAccntId(_o.prj_id, expcat_exp_accnt_id), -1, round((_o.item_unitprice_base * _r.recv_qty),2), _glDate::DATE, false ) INTO _tmp FROM poitem, expcat WHERE((poitem_expcat_id=expcat_id) AND (poitem_id=_o.orderitem_id)); END IF; IF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory Freight from ' || _ordertypeabbr, expcat_liability_accnt_id, getPrjAccntId(_o.prj_id, expcat_freight_accnt_id), -1, _r.recv_freight_base, _glDate::DATE, false ), expcat_freight_accnt_id INTO _tmp, _freightAccnt FROM poitem, expcat WHERE((poitem_expcat_id=expcat_id) AND (poitem_id=_o.orderitem_id)); IF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; _recvvalue := ROUND((_o.item_unitprice_base * _r.recv_qty),2); UPDATE poitem SET poitem_qty_received = (poitem_qty_received + _r.recv_qty), poitem_freight_received = (poitem_freight_received + _r.recv_freight_base) WHERE (poitem_id=_o.orderitem_id); ELSEIF ( (_r.recv_order_type = 'RA') AND (_r.itemsite_id = -1 OR _r.itemsite_id IS NULL OR _r.itemsite_controlmethod = 'N') ) THEN RAISE NOTICE 'itemsite controlmethod is %, cannot post receipt.', _r.itemsite_controlmethod; RETURN -14; -- otherwise how do we get the accounts? ELSEIF ( (_r.recv_order_type = 'TO') AND (_r.itemsite_id = -1 OR _r.itemsite_id IS NULL) ) THEN RAISE NOTICE 'itemsite missing'; RETURN -14; -- otherwise how do we get the accounts? ELSE -- not ELSIF: some code is shared between diff order types IF (_r.recv_order_type = 'PO') THEN SELECT postInvTrans( itemsite_id, 'RP'::TEXT, _recvinvqty, 'S/R'::TEXT, _r.recv_order_type::TEXT, _o.orderhead_number::TEXT || '-' || _o.orderitem_linenumber::TEXT, ''::TEXT, 'Receive Inventory from ' || _ordertypeabbr, costcat_asset_accnt_id, costcat_liability_accnt_id, _itemlocSeries, _glDate, round((_o.item_unitprice_base * _r.recv_qty),2) -- always passing this in since it is ignored if it is not average costed item ) INTO _tmp FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not post inventory transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < -1) THEN -- less than -1 because -1 means it is a none controlled item IF(_tmp = -3) THEN RETURN -12; -- The GL trans value was 0 which means we likely do not have a std cost END IF; RETURN _tmp; END IF; -- If the 'Purchase Price Variance on Receipt' option is true IF (fetchMetricBool('RecordPPVonReceipt')) THEN _invhistid := _tmp; -- Find the difference in the purchase price value expected from the P/O and the value of the transaction SELECT ((_o.item_unitprice_base * _r.recv_qty) - (invhist_value_after - invhist_value_before)) INTO _pricevar FROM invhist WHERE (invhist_id = _invhistid); -- If difference exists then IF (_pricevar <> 0.00) THEN -- Record an additional GL Transaction for the purchase price variance SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Purchase price variance adjusted for P/O ' || _o.orderhead_number || ' for item ' || _r.item_number, costcat_liability_accnt_id, getPrjAccntId(_o.prj_id, costcat_purchprice_accnt_id), -1, _pricevar, _glDate::DATE, false ) INTO _tmp FROM itemsite, costcat WHERE ((itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not insert G/L transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; END IF; END IF; SELECT insertGLTransaction(fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Inventory Freight from ' || _o.orderhead_number || ' for item ' || _r.item_number, costcat_liability_accnt_id, getPrjAccntId(_o.prj_id, costcat_freight_accnt_id), -1, _r.recv_freight_base, _glDate::DATE, false ), costcat_freight_accnt_id INTO _tmp, _freightAccnt FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not insert G/L transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; UPDATE poitem SET poitem_qty_received = (poitem_qty_received + _r.recv_qty), poitem_freight_received = (poitem_freight_received + _r.recv_freight_base) WHERE (poitem_id=_o.orderitem_id); ELSIF (_r.recv_order_type = 'RA') THEN SELECT rahead.*, raitem.* INTO _ra FROM rahead, raitem WHERE ((rahead_id=raitem_rahead_id) AND (raitem_id=_r.recv_orderitem_id)); SELECT postInvTrans(_r.itemsite_id, 'RR', _recvinvqty, 'S/R', _r.recv_order_type, _ra.rahead_number::TEXT || '-' || _ra.raitem_linenumber::TEXT, '', 'Receive Inventory from ' || _ordertypeabbr, costcat_asset_accnt_id, CASE WHEN(COALESCE(_ra.raitem_cos_accnt_id, -1) != -1) THEN getPrjAccntId(_o.prj_id, _ra.raitem_cos_accnt_id) WHEN (_ra.raitem_warranty) THEN getPrjAccntId(_o.prj_id, resolveCOWAccount(_r.itemsite_id, _ra.rahead_cust_id, _ra.rahead_saletype_id, _ra.rahead_shipzone_id)) ELSE getPrjAccntId(_o.prj_id, resolveCORAccount(_r.itemsite_id, _ra.rahead_cust_id, _ra.rahead_saletype_id, _ra.rahead_shipzone_id)) END, _itemlocSeries, _glDate, COALESCE(_o.unitcost,stdcost(itemsite_item_id)) * _recvinvqty) INTO _tmp FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not post inventory transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < -1) THEN -- less than -1 because -1 means it is a none controlled item IF(_tmp = -3) THEN RAISE NOTICE 'The GL trans value was 0 which means we likely do not have a std cost'; RETURN -12; -- The GL trans value was 0 which means we likely do not have a std cost END IF; RETURN _tmp; END IF; INSERT INTO rahist (rahist_itemsite_id, rahist_date, rahist_descrip, rahist_qty, rahist_uom_id, rahist_source, rahist_source_id, rahist_rahead_id ) VALUES (_r.itemsite_id, _glDate, 'Receive Inventory from ' || _ordertypeabbr, _recvinvqty, _r.item_inv_uom_id, 'RR', _r.recv_id, _ra.rahead_id ); SELECT insertGLTransaction(fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Inventory Freight from ' || _o.orderhead_number || ' for item ' || _r.item_number, costcat_liability_accnt_id, getPrjAccntId(_o.prj_id, costcat_freight_accnt_id), -1, _r.recv_freight_base, _glDate::DATE, false ), costcat_freight_accnt_id INTO _tmp, _freightAccnt FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; INSERT INTO rahist (rahist_date, rahist_descrip, rahist_source, rahist_source_id, rahist_curr_id, rahist_amount, rahist_rahead_id ) VALUES (_glDate, 'Receive Inventory Freight from ' || _ordertypeabbr, 'RR', _r.recv_id, _r.recv_freight_curr_id, _r.recv_freight, _ra.rahead_id ); UPDATE raitem SET raitem_qtyreceived = (raitem_qtyreceived + _r.recv_qty) WHERE (raitem_id=_o.orderitem_id); -- Expire date doesn't mean anything once the RA is received -- WARNING: INSERTING 'NULL' MIGHT CAUSE PROBLEMS!! UPDATE rahead SET rahead_expiredate = NULL WHERE (rahead_id=_o.orderhead_id); -- Look for 'ship' lines SELECT (count(*) > 0) INTO _ship FROM raitem WHERE ((raitem_disposition = 'S') AND (raitem_new_coitem_id IS NULL) AND (raitem_rahead_id=_ra.rahead_id)); -- If receiving a qty on a shippable and upon receipt item, create coitem IF ((_ra.rahead_timing='R') AND (_ship OR ( (_ra.raitem_disposition IN ('P','V')) AND (_ra.raitem_new_coitem_id IS NULL) AND (_ra.raitem_qtyauthorized > 0)))) THEN IF (_ra.rahead_new_cohead_id IS NOT NULL) THEN _coheadid = _ra.rahead_new_cohead_id; ELSE -- No header, so create a Sales Order header first. SELECT nextval('cohead_cohead_id_seq') INTO _coheadid; INSERT INTO cohead ( cohead_id,cohead_number,cohead_cust_id,cohead_custponumber, cohead_orderdate,cohead_salesrep_id,cohead_terms_id, cohead_shipvia,cohead_shipto_id,cohead_shiptoname, cohead_shiptoaddress1,cohead_shiptoaddress2,cohead_shiptoaddress3, cohead_shiptocity,cohead_shiptostate,cohead_shiptozipcode, cohead_shiptocountry,cohead_freight,cohead_shiptophone, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_shipchrg_id, cohead_shipform_id,cohead_billtoname, cohead_billtoaddress1,cohead_billtoaddress2,cohead_billtoaddress3, cohead_billtocity,cohead_billtostate,cohead_billtozipcode, cohead_billtocountry,cohead_misc_accnt_id,cohead_misc_descrip, cohead_commission,cohead_holdtype,cohead_prj_id,cohead_shipcomplete, cohead_curr_id,cohead_taxzone_id,cohead_saletype_id,cohead_shipzone_id) SELECT _coheadid,fetchsonumber(),rahead_cust_id,rahead_custponumber, current_date,rahead_salesrep_id,COALESCE(cohead_terms_id,cust_terms_id), COALESCE(cohead_shipvia,cust_shipvia),rahead_shipto_id,rahead_shipto_name, rahead_shipto_address1,rahead_shipto_address2,rahead_shipto_address3, rahead_shipto_city,rahead_shipto_state,rahead_shipto_zipcode, rahead_shipto_country,0,COALESCE(cohead_shiptophone,''), cntct_id, cntct_honorific, cntct_first_name, cntct_middle, cntct_last_name, cntct_suffix, cntct_phone, cntct_title, cntct_fax, cntct_email, COALESCE(cohead_shipchrg_id,cust_shipchrg_id), COALESCE(cohead_shipform_id,cust_shipform_id), rahead_billtoname,rahead_billtoaddress1,rahead_billtoaddress2,rahead_billtoaddress3, rahead_billtocity,rahead_billtostate,rahead_billtozip, rahead_billtocountry,NULL,'',rahead_commission, 'N', rahead_prj_id, COALESCE(cohead_shipcomplete, CASE WHEN cust_partialship THEN false ELSE true END),rahead_curr_id,rahead_taxzone_id,rahead_saletype_id,rahead_shipzone_id FROM rahead JOIN custinfo ON (rahead_cust_id=cust_id) LEFT OUTER JOIN cohead ON (rahead_orig_cohead_id=cohead_id) LEFT OUTER JOIN shiptoinfo ON (rahead_shipto_id=shipto_id) LEFT OUTER JOIN cntct ON (shipto_cntct_id=cntct_id) WHERE (rahead_id=_ra.rahead_id); UPDATE rahead SET rahead_new_cohead_id=_coheadid WHERE rahead_id=_ra.rahead_id; END IF; -- Now enter the line item(s) IF (_ra.raitem_disposition IN ('P','V')) AND (_ra.raitem_new_coitem_id IS NULL) AND (_ra.raitem_qtyauthorized > 0) THEN SELECT nextval('coitem_coitem_id_seq') INTO _coitemid; SELECT COALESCE(MAX(coitem_linenumber),0)+1 INTO _linenumber FROM coitem WHERE (coitem_cohead_id=_coheadid); INSERT INTO coitem ( coitem_id,coitem_cohead_id,coitem_linenumber,coitem_itemsite_id, coitem_status,coitem_scheddate,coitem_promdate, coitem_qtyord, coitem_unitcost,coitem_price,coitem_custprice,coitem_qtyshipped, coitem_order_id,coitem_memo,coitem_qtyreturned, coitem_taxtype_id,coitem_qty_uom_id,coitem_qty_invuomratio, coitem_price_uom_id,coitem_price_invuomratio,coitem_warranty, coitem_cos_accnt_id,coitem_order_type, coitem_custpn) SELECT _coitemid,_coheadid,_linenumber,_ra.raitem_coitem_itemsite_id, 'O',_ra.raitem_scheddate,_ra.raitem_scheddate,_ra.raitem_qtyauthorized, stdcost(itemsite_item_id),COALESCE(_ra.raitem_saleprice,0),0,0, -1,_ra.raitem_notes,0, _ra.raitem_taxtype_id,_ra.raitem_qty_uom_id,_ra.raitem_qty_invuomratio, _ra.raitem_price_uom_id,_ra.raitem_price_invuomratio,_ra.raitem_warranty, _ra.raitem_cos_accnt_id, CASE WHEN itemsite_createwo THEN 'W' ELSE NULL END, _ra.raitem_custpn FROM itemsite WHERE (itemsite_id=_ra.raitem_coitem_itemsite_id); UPDATE raitem SET raitem_new_coitem_id=_coitemid WHERE (raitem_id=_ra.raitem_id); END IF; -- Create items to ship that have no direct relation to receipts. IF (_ship) THEN FOR _i IN SELECT raitem_id FROM raitem WHERE ((raitem_rahead_id=_ra.rahead_id) AND (raitem_disposition = 'S') AND (raitem_new_coitem_id IS NULL)) LOOP SELECT nextval('coitem_coitem_id_seq') INTO _coitemid; SELECT COALESCE(MAX(coitem_linenumber),0)+1 INTO _linenumber FROM coitem WHERE (coitem_cohead_id=_coheadid); INSERT INTO coitem ( coitem_id,coitem_cohead_id,coitem_linenumber,coitem_itemsite_id, coitem_status,coitem_scheddate,coitem_promdate, coitem_qtyord, coitem_unitcost,coitem_price,coitem_custprice,coitem_qtyshipped, coitem_order_id,coitem_memo,coitem_qtyreturned, coitem_taxtype_id,coitem_qty_uom_id,coitem_qty_invuomratio, coitem_price_uom_id,coitem_price_invuomratio,coitem_warranty, coitem_cos_accnt_id,coitem_order_type,coitem_custpn) SELECT _coitemid,_coheadid,_linenumber,raitem_coitem_itemsite_id, 'O',raitem_scheddate,raitem_scheddate,raitem_qtyauthorized, stdcost(itemsite_item_id),COALESCE(raitem_saleprice,0),0,0, -1,raitem_notes,0, raitem_taxtype_id,raitem_qty_uom_id,raitem_qty_invuomratio, raitem_price_uom_id,raitem_price_invuomratio,raitem_warranty, raitem_cos_accnt_id, CASE WHEN itemsite_createwo THEN 'W' ELSE NULL END,raitem_custpn FROM raitem JOIN itemsite ON (itemsite_id=raitem_itemsite_id) WHERE (raitem_id=_i.raitem_id); UPDATE raitem SET raitem_new_coitem_id=_coitemid WHERE (raitem_id=_i.raitem_id); END LOOP; END IF; END IF; ELSIF (_r.recv_order_type = 'TO' AND fetchMetricBool('MultiWhs')) THEN SELECT interWarehouseTransfer(toitem_item_id, tohead_trns_warehous_id, tohead_dest_warehous_id, _r.recv_qty, 'TO', formatToNumber(toitem_id), 'Receive from Transit To Dest Warehouse', _itemlocSeries, _glDate ) INTO _tmp FROM tohead, toitem WHERE ((tohead_id=toitem_tohead_id) AND (toitem_id=_r.recv_orderitem_id)); IF (_tmp < 0) THEN RETURN _tmp; END IF; SELECT insertGLTransaction(fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Inventory Freight from ' || _o.orderhead_number || ' for item ' || _r.item_number, costcat_toliability_accnt_id, costcat_freight_accnt_id, -1, _r.recv_freight_base, _glDate::DATE, false ), costcat_freight_accnt_id INTO _tmp, _freightAccnt FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; UPDATE toitem SET toitem_qty_received = (toitem_qty_received + _r.recv_qty), toitem_freight_received = (toitem_freight_received + currToCurr(_r.recv_freight_curr_id, toitem_freight_curr_id, _r.recv_freight, _glDate::DATE)) WHERE (toitem_id=_o.orderitem_id); END IF; IF(_r.itemsite_costmethod='A') THEN _recvvalue := ROUND((_o.item_unitprice_base * _r.recv_qty),2); ELSIF (fetchMetricBool('RecordPPVonReceipt')) THEN _recvvalue := ROUND((_o.item_unitprice_base * _r.recv_qty), 2); ELSE _recvvalue := ROUND(stdcost(_r.itemsite_item_id) * _recvinvqty, 2); END IF; END IF; UPDATE recv SET recv_value=_recvvalue, recv_recvcost=_recvvalue / recv_qty, recv_posted=TRUE, recv_gldistdate=_glDate::DATE WHERE (recv_id=precvid); IF (_r.recv_order_type = 'PO') THEN -- If this is a drop-shipped PO, then Issue the item to Shipping and Ship the item IF (_o.pohead_dropship = TRUE) THEN -- Generate the PoItemDropShipped event INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', _o.orderitem_id, evntnot_warehous_id, (pohead_number || '-' || poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id = evnttype_id) JOIN itemsite ON (evntnot_warehous_id = itemsite_warehous_id) JOIN item ON (itemsite_item_id = item_id) JOIN poitem ON (poitem_itemsite_id = itemsite_id) JOIN pohead ON (poitem_pohead_id = pohead_id) WHERE( (poitem_id = _o.orderitem_id) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name = 'PoItemDropShipped') ); END IF; END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postreceipt(integer, integer) OWNER TO admin; -- -- Name: postreceipts(text, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postreceipts(text, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderid ALIAS FOR $2; _itemlocSeries INTEGER := $3; _qtyToRecv NUMERIC; _r RECORD; BEGIN SELECT SUM(qtyToReceive(pordertype, recv_orderitem_id)) INTO _qtyToRecv FROM recv, orderitem WHERE ((recv_orderitem_id=orderitem_id) AND (recv_order_type=pordertype) AND (orderitem_orderhead_type=pordertype) AND (orderitem_orderhead_id=porderid)); IF (_qtyToRecv <= 0) THEN RETURN -11; END IF; IF (_itemlocSeries IS NULL OR _itemlocSeries <= 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; FOR _r IN SELECT postReceipt(recv_id, _itemlocSeries) AS postResult FROM recv, orderitem WHERE ((recv_orderitem_id=orderitem_id) AND (orderitem_orderhead_id=porderid) AND (orderitem_orderhead_type=pordertype) AND (NOT recv_posted) -- Check for multiple users receiving the same order AND (recv_trans_usr_name=getEffectiveXtUser()) AND (recv_order_type=pordertype)) LOOP IF (_r.postResult < 0 AND _r.postResult != -11) THEN RETURN _r.postResult; -- fail on 1st error but ignore lines with qty == 0 END IF; END LOOP; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postreceipts(text, integer, integer) OWNER TO admin; -- -- Name: postsogltransactions(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postsogltransactions() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE gltrans SET gltrans_exported=TRUE WHERE ( (NOT gltrans_exported) AND (gltrans_source='A/R') AND (gltrans_doctype IN ('IN', 'CM')) ); RETURN TRUE; END; $$; ALTER FUNCTION public.postsogltransactions() OWNER TO admin; -- -- Name: postsoitemproduction(integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postsoitemproduction(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemId ALIAS FOR $1; pGlDistTS ALIAS FOR $2; _qty NUMERIC; BEGIN -- Issuing all, so determine line balance SELECT noNeg( coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ((shipitem_orderitem_id=coitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) ) ) ) INTO _qty FROM coitem WHERE (coitem_id=pSoitemId); RETURN postSoItemProduction($1, _qty, $2); END; $_$; ALTER FUNCTION public.postsoitemproduction(integer, timestamp with time zone) OWNER TO admin; -- -- Name: postsoitemproduction(integer, numeric, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postsoitemproduction(integer, numeric, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemId ALIAS FOR $1; pQty ALIAS FOR $2; pGlDistTS ALIAS FOR $3; _itemlocSeries INTEGER := 0; BEGIN --If this cost method is not Job then we are using the wrong function IF (NOT EXISTS(SELECT itemsite_costmethod FROM coitem,itemsite WHERE ((coitem_id=pSoitemId) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_costmethod = 'J')))) THEN RAISE EXCEPTION 'The postSoLineBalanceProduction function may only be used with Job costed item sites'; END IF; IF (pQty > 0) THEN SELECT COALESCE(postProduction(wo_id, (pQty * coitem_qty_invuomratio), true, 0, pGlDistTS),-1) INTO _itemlocSeries FROM wo, coitem WHERE ((wo_ordid=pSoItemid) AND (wo_ordtype='S') AND (coitem_id=pSoItemid)); UPDATE wo SET wo_status = 'C' WHERE ((wo_ordid=pSoItemid) AND (wo_ordtype='S') AND (wo_qtyrcv >= wo_qtyord)); END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.postsoitemproduction(integer, numeric, timestamp with time zone) OWNER TO admin; -- -- Name: poststandardjournal(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION poststandardjournal(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; pDate ALIAS FOR $2; _returnValue INTEGER; BEGIN SELECT postStandardJournal(pStdjrnlid, pDate, FALSE, fetchGLSequence()) INTO _returnValue; RETURN _returnValue; END; $_$; ALTER FUNCTION public.poststandardjournal(integer, date) OWNER TO admin; -- -- Name: poststandardjournal(integer, date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION poststandardjournal(integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; pDate ALIAS FOR $2; pGlSequence ALIAS FOR $3; BEGIN RETURN postStandardJournal(pStdjrnlid, pDate, FALSE, pGLSequence); END; $_$; ALTER FUNCTION public.poststandardjournal(integer, date, integer) OWNER TO admin; -- -- Name: poststandardjournal(integer, date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION poststandardjournal(integer, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; pDate ALIAS FOR $2; pReverse ALIAS FOR $3; _returnValue INTEGER; BEGIN RETURN postStandardJournal(pStdjrnlid, pDate, pReverse, fetchGLSequence()); END; $_$; ALTER FUNCTION public.poststandardjournal(integer, date, boolean) OWNER TO admin; -- -- Name: poststandardjournal(integer, date, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION poststandardjournal(integer, date, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; pDate ALIAS FOR $2; pReverse ALIAS FOR $3; pGlSequence ALIAS FOR $4; BEGIN INSERT INTO glseries ( glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, glseries_notes, glseries_accnt_id, glseries_amount, glseries_distdate ) SELECT pGlSequence, 'G/L', 'ST', stdjrnl_name, stdjrnlitem_notes, stdjrnlitem_accnt_id, CASE WHEN (pReverse=TRUE) THEN (stdjrnlitem_amount * -1) ELSE stdjrnlitem_amount END, pDate FROM stdjrnlitem, stdjrnl WHERE ( (stdjrnlitem_stdjrnl_id=stdjrnl_id) AND (stdjrnl_id=pStdjrnlid) ); RETURN pGlSequence; END; $_$; ALTER FUNCTION public.poststandardjournal(integer, date, boolean, integer) OWNER TO admin; -- -- Name: poststandardjournalgroup(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION poststandardjournalgroup(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlgrpid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN postStandardJournalGroup(pStdjrnlgrpid, pDate, FALSE); END; $_$; ALTER FUNCTION public.poststandardjournalgroup(integer, date) OWNER TO admin; -- -- Name: poststandardjournalgroup(integer, date, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION poststandardjournalgroup(integer, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlgrpid ALIAS FOR $1; pDate ALIAS FOR $2; pReverse ALIAS FOR $3; _r RECORD; _glSequence INTEGER := -1; BEGIN FOR _r IN SELECT stdjrnlgrpitem_id, stdjrnlgrpitem_stdjrnl_id FROM stdjrnlgrpitem WHERE ( (stdjrnlgrpitem_stdjrnlgrp_id=pStdjrnlgrpid) AND (CURRENT_DATE BETWEEN stdjrnlgrpitem_effective AND (stdjrnlgrpitem_expires - 1)) AND ( (stdjrnlgrpitem_toapply = -1) OR (stdjrnlgrpitem_toapply > stdjrnlgrpitem_applied) ) ) LOOP IF (_glSequence = -1) THEN SELECT fetchGLSequence() INTO _glSequence; END IF; PERFORM postStandardJournal(_r.stdjrnlgrpitem_stdjrnl_id, pDate, pReverse, _glSequence); UPDATE stdjrnlgrpitem SET stdjrnlgrpitem_applied=(stdjrnlgrpitem_applied + 1) WHERE (stdjrnlgrpitem_id=_r.stdjrnlgrpitem_id); END LOOP; RETURN _glSequence; END; $_$; ALTER FUNCTION public.poststandardjournalgroup(integer, date, boolean) OWNER TO admin; -- -- Name: postvalueintoinvbalance(integer, date, numeric, numeric, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postvalueintoinvbalance(integer, date, numeric, numeric, numeric, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; pDate ALIAS FOR $2; pQoh ALIAS FOR $3; pNn ALIAS FOR $4; pOldCost ALIAS FOR $5; pNewCost ALIAS FOR $6; _invbalid INTEGER; _r RECORD; _count INTEGER; _valChange NUMERIC; _nnvalChange NUMERIC; BEGIN -- Grab the costhist record to post SELECT period_id INTO _r FROM period WHERE (pDate BETWEEN period_start AND period_end); GET DIAGNOSTICS _count = ROW_COUNT; -- Find an inventory balance to post into IF ( _count > 0 ) THEN -- Try to find an existing invbal SELECT invbal_id INTO _invbalid FROM invbal WHERE ( (invbal_period_id=_r.period_id) AND (invbal_itemsite_id=pItemsiteId) ); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count = 0) THEN -- Wasn't there, so forward update PERFORM forwardUpdateItemsite(pItemsiteId); -- Try to find an existing invbal again SELECT invbal_id INTO _invbalid FROM invbal WHERE ( (invbal_period_id=_r.period_id) AND (invbal_itemsite_id=pItemsiteId) ); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count = 0) THEN RAISE EXCEPTION 'An inventory balance record was not found for updating standard costs'; END IF; END IF; _valChange := round((pNewCost - pOldCost) * pQoh, 2); _nnvalChange := round((pNewCost - pOldCost) * pNn, 2); -- We found an invbal, update it with the change IF (_valChange > 0) THEN UPDATE invbal SET invbal_value_in = (invbal_value_in + _valChange) WHERE (invbal_id=_invbalid); ELSE UPDATE invbal SET invbal_value_out = (invbal_value_out - _valChange) WHERE (invbal_id=_invbalid); END IF; IF (_nnvalChange > 0) THEN UPDATE invbal SET invbal_nnval_in = (invbal_nnval_in + _nnvalChange) WHERE (invbal_id=_invbalid); ELSE UPDATE invbal SET invbal_nnval_out = (invbal_nnval_out - _nnvalChange) WHERE (invbal_id=_invbalid); END IF; UPDATE invbal SET invbal_value_ending = (invbal_value_beginning + invbal_value_in - invbal_value_out), invbal_nnval_ending = (invbal_nnval_beginning + invbal_nnval_in - invbal_nnval_out), invbal_dirty=true WHERE (invbal_id=_invbalid); ELSE RAISE EXCEPTION 'No period exists for date %.', pDate; END IF; RETURN TRUE; END; $_$; ALTER FUNCTION public.postvalueintoinvbalance(integer, date, numeric, numeric, numeric, numeric) OWNER TO admin; -- -- Name: postvoucher(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postvoucher(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoheadid ALIAS FOR $1; pPostCosts ALIAS FOR $2; BEGIN RETURN postVoucher(pVoheadid, fetchJournalNumber('AP-VO'), pPostCosts); END; $_$; ALTER FUNCTION public.postvoucher(integer, boolean) OWNER TO admin; -- -- Name: postvoucher(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postvoucher(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoheadid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pPostCosts ALIAS FOR $3; _sequence INTEGER; _totalAmount_base NUMERIC; _totalAmount NUMERIC; _itemAmount_base NUMERIC; _itemAmount NUMERIC; _totalDiscountableAmount NUMERIC; _test INTEGER; _a RECORD; _d RECORD; _g RECORD; _p RECORD; _r RECORD; _costx RECORD; _pPostCosts BOOLEAN; _pExplain BOOLEAN; _pLowLevel BOOLEAN; _exchGainFreight NUMERIC; _taxBaseValue NUMERIC; _firstExchDateFreight DATE; _tmpTotal NUMERIC; _glDate DATE; BEGIN RAISE DEBUG 'postVoucher(%, %, %)', pVoheadid, pJournalNumber, pPostCosts; _pPostCosts := TRUE; _totalAmount_base := 0; _totalAmount := 0; _totalDiscountableAmount := 0; SELECT fetchGLSequence() INTO _sequence; -- Cache Voucher Infomation SELECT vohead.*, vend_number || '-' || vend_name || ' ' || vohead_reference AS glnotes, COALESCE(pohead_orderdate, vohead_docdate) AS pohead_orderdate, COALESCE(pohead_curr_id, vohead_curr_id) AS pohead_curr_id INTO _p FROM vendinfo, vohead LEFT OUTER JOIN pohead ON (vohead_pohead_id = pohead_id) WHERE ( (vohead_id=pVoheadid) AND (vend_id=vohead_vend_id) ) FOR UPDATE OF vohead; IF (_p.vohead_posted) THEN RAISE EXCEPTION 'Cannot post Voucher #% as it is already posted [xtuple: postVoucher, -10, %]', _p.vohead_number, _p.vohead_number; END IF; _glDate := COALESCE(_p.vohead_gldistdate, _p.vohead_distdate); -- If the vohead_distdate is NULL, assume that this is a NULL vohead and quietly delete it IF (_p.vohead_distdate IS NULL) THEN DELETE FROM vohead WHERE vohead_id = pVoheadid; RETURN 0; END IF; IF (_p.vohead_amount <= 0) THEN RAISE EXCEPTION 'Cannot Post Voucher #% for a negative or zero amount (%) [xtuple: postVoucher, -1, %, %]', _p.vohead_number, _p.vohead_amount, _p.vohead_number, _p.vohead_amount; END IF; -- there is no currency gain/loss on items, see issue 3892, -- but there might be on freight, which is first encountered at p/o receipt SELECT recv_date::DATE INTO _firstExchDateFreight FROM recv WHERE (recv_vohead_id = pVoheadid); SELECT round(SUM(amount),4) INTO _tmpTotal FROM ( SELECT SUM(vodist_amount) AS amount FROM vodist WHERE ( (vodist_vohead_id=pVoheadid) AND (vodist_tax_id=-1) ) UNION ALL SELECT SUM(voitem_freight) AS amount FROM voitem WHERE (voitem_vohead_id=pVoheadid) UNION ALL SELECT SUM(tax*-1) FROM (SELECT round(sum(taxdetail_tax),2) AS tax, currToBase(_p.vohead_curr_id, round(sum(taxdetail_tax),2), _p.vohead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('VO', pVoheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id ) AS taxdata ) AS data; IF (_tmpTotal IS NULL OR _tmpTotal <= 0) THEN RAISE EXCEPTION 'Cannot Post Voucher #% with negative or zero distributions (%) [xtuple: postVoucher, -2, %, %]', _p.vohead_number, _tmpTotal, _p.vohead_number, _tmpTotal; END IF; IF (_tmpTotal > _p.vohead_amount) THEN RAISE EXCEPTION 'Cannot Post Voucher #% with distributions greater than the voucher amount (% > %) [xtuple: postVoucher, -3, %, %, %]', _p.vohead_number, _tmpTotal, _p.vohead_amount, _p.vohead_number, _tmpTotal, _p.vohead_amount; END IF; IF (_tmpTotal < _p.vohead_amount) THEN RAISE EXCEPTION 'Cannot Post Voucher #% with distributions less than the voucher amount (% < %) [xtuple: postVoucher, -4, %, %, %]', _p.vohead_number, _tmpTotal, _p.vohead_amount, _p.vohead_number, _tmpTotal, _p.vohead_amount; END IF; SELECT DISTINCT poitem_linenumber INTO _test FROM vodist, voitem, poitem WHERE ( (vodist_poitem_id=poitem_id) AND (voitem_poitem_id=poitem_id) AND (voitem_vohead_id=vodist_vohead_id) AND ((poitem_qty_received - poitem_qty_vouchered) = 0) AND (vodist_vohead_id=pVoheadid) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Cannot Post Voucher #% as one or more of the line items have already been fully vouchered. Check P/O Line #% [postVoucher, -6, %, %]', _p.vohead_number, _test, _p.vohead_number, _test; END IF; -- Start by handling taxes FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.vohead_curr_id, round(sum(taxdetail_tax),2), _p.vohead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('VO', pVoheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', _p.vohead_number, _r.tax_sales_accnt_id, _r.taxbasevalue, _glDate, _p.glnotes ); RAISE DEBUG 'postVoucher: _r.tax=%', _r.tax; _totalAmount_base := (_totalAmount_base - _r.taxbasevalue); _totalAmount := (_totalAmount - _r.tax); END LOOP; -- Update item tax records with posting data UPDATE voitemtax SET taxhist_docdate=_p.vohead_docdate, taxhist_distdate=_glDate, taxhist_curr_id=_p.vohead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM vohead JOIN voitem ON (vohead_id=voitem_vohead_id), curr_rate WHERE ((vohead_id=pVoheadId) AND (taxhist_parent_id=voitem_id) AND (_p.vohead_curr_id=curr_id) AND (_p.vohead_docdate BETWEEN curr_effective AND curr_expires) ); -- Update Misc distributions with posting data UPDATE voheadtax SET taxhist_docdate=_p.vohead_docdate, taxhist_distdate=_glDate, taxhist_curr_id=_p.vohead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM curr_rate WHERE ((taxhist_parent_id=pVoheadid) AND (_p.vohead_curr_id=curr_id) AND (_p.vohead_docdate BETWEEN curr_effective AND curr_expires) ); -- Loop through the vodist records for the passed vohead that -- are posted against a P/O Item FOR _g IN SELECT DISTINCT poitem_id, voitem_id, voitem_qty, poitem_expcat_id, poitem_invvenduomratio, poitem_prj_id, COALESCE(itemsite_id, -1) AS itemsiteid, COALESCE(itemsite_costcat_id, -1) AS costcatid, COALESCE(itemsite_item_id, -1) AS itemsite_item_id, (SELECT SUM(value) FROM ( SELECT SUM(recv_value) AS value FROM recv WHERE (recv_voitem_id=voitem_id) UNION SELECT SUM(poreject_value)*-1 AS value FROM poreject WHERE (poreject_voitem_id=voitem_id)) as data) AS value_base, (poitem_freight_received - poitem_freight_vouchered) / (poitem_qty_received - poitem_qty_vouchered) * voitem_qty AS vouchered_freight, currToBase(_p.pohead_curr_id, (poitem_freight_received - poitem_freight_vouchered) / (poitem_qty_received - poitem_qty_vouchered) * voitem_qty, _firstExchDateFreight ) AS vouchered_freight_base, voitem_freight, currToBase(_p.vohead_curr_id, voitem_freight, _p.vohead_distdate) AS voitem_freight_base FROM vodist, voitem, poitem LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) WHERE ( (vodist_poitem_id=poitem_id) AND (voitem_poitem_id=poitem_id) AND (voitem_vohead_id=vodist_vohead_id) AND (vodist_vohead_id=pVoheadid)) LOOP -- Grab the G/L Accounts IF (_g.costcatid = -1) THEN SELECT getPrjAccntId(_g.poitem_prj_id, pp.accnt_id) AS pp_accnt_id, lb.accnt_id AS lb_accnt_id, fr.accnt_id AS freight_accnt_id INTO _a FROM expcat, accnt AS pp, accnt AS lb, accnt AS fr WHERE ( (expcat_purchprice_accnt_id=pp.accnt_id) AND (expcat_liability_accnt_id=lb.accnt_id) AND (expcat_freight_accnt_id=fr.accnt_id) AND (expcat_id=_g.poitem_expcat_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Voucher #% due to unassigned G/L Accounts [xtuple: postVoucher, -7, %]', _p.vohead_number, _p.vohead_number; END IF; ELSE SELECT getPrjAccntId(_g.poitem_prj_id, costcat_purchprice_accnt_id) AS pp_accnt_id, getPrjAccntId(_g.poitem_prj_id, costcat_liability_accnt_id) AS lb_accnt_id, getPrjAccntId(_g.poitem_prj_id, costcat_freight_accnt_id) AS freight_accnt_id INTO _a FROM costcat WHERE (costcat_id=_g.costcatid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Voucher #% due to unassigned G/L Accounts [xtuple: postVoucher, -8, %]', _p.vohead_number, _p.vohead_number; END IF; END IF; -- Clear the Item Amount accumulator _itemAmount_base := 0; _itemAmount := 0; -- Figure out the total posted value for this line item FOR _d IN SELECT vodist_id, vodist_amount, vodist_discountable, _p.vohead_curr_id, vodist_costelem_id, currToBase(_p.vohead_curr_id, vodist_amount, _p.vohead_distdate) AS vodist_amount_base FROM vodist WHERE ( (vodist_vohead_id=pVoheadid) AND (vodist_poitem_id=_g.poitem_id) ) LOOP _pExplain := FALSE; SELECT * INTO _costx FROM itemcost WHERE ( (itemcost_item_id = _g.itemsite_item_id) AND (itemcost_costelem_id = _d.vodist_costelem_id) ); IF (FOUND) THEN _pExplain := _costx.itemcost_lowlevel; END IF; -- Post the cost to the Actual if requested -- IF ( (pPostCosts) AND (_d.vodist_costelem_id <> -1) ) THEN IF ( (_d.vodist_costelem_id <> -1) AND (_g.itemsite_item_id <> -1) ) THEN PERFORM updateCost( _g.itemsite_item_id, _d.vodist_costelem_id, _pExplain, (_d.vodist_amount / (_g.voitem_qty * _g.poitem_invvenduomratio)), _p.vohead_curr_id ); END IF; -- Add the Distribution Amount to the Item Amount RAISE DEBUG 'postVoucher: _d.vodist_amount=%', _d.vodist_amount; _itemAmount_base := _itemAmount_base + ROUND(_d.vodist_amount_base, 2); _itemAmount := _itemAmount + _d.vodist_amount; IF (_d.vodist_discountable) THEN _totalDiscountableAmount := (_totalDiscountableAmount + _d.vodist_amount); END IF; END LOOP; -- Distribute from the clearing account PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.lb_accnt_id, round(_g.value_base + _g.vouchered_freight_base, 2) * -1, _glDate, _p.glnotes ); -- Attribute the correct portion to currency gain/loss _exchGainFreight := 0; SELECT currGain(_p.pohead_curr_id, _g.vouchered_freight, _firstExchDateFreight, _p.vohead_distdate ) INTO _exchGainFreight; IF (round(_exchGainFreight, 2) <> 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/P', 'VO', text(_p.vohead_number), getGainLossAccntId(_a.lb_accnt_id), round(_exchGainFreight, 2), _glDate, _p.glnotes); END IF; -- Distribute the remaining variance to the Purchase Price Variance account IF (round(_itemAmount_base, 2) <> round(_g.value_base, 2)) THEN _tmpTotal := round(_itemAmount_base, 2) - round(_g.value_base, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.pp_accnt_id, _tmpTotal * -1, _glDate, _p.glnotes ); END IF; -- Distribute the remaining freight variance to the Purchase Price Variance account IF (round(_g.voitem_freight_base + _exchGainFreight, 2) <> round(_g.vouchered_freight_base, 2)) THEN _tmpTotal := round(_g.voitem_freight_base + _exchGainFreight, 2) - round(_g.vouchered_freight_base, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.freight_accnt_id, _tmpTotal * -1, _glDate, _p.glnotes ); END IF; -- Add the distribution amount to the total amount to distribute RAISE DEBUG 'postVoucher: _itemAmount=%', _itemAmount; _totalAmount_base := (_totalAmount_base + _itemAmount_base + _g.voitem_freight_base); _totalAmount := (_totalAmount + _itemAmount + _g.voitem_freight); -- Post all the Tagged Receivings for this P/O Item as Invoiced and -- record the purchase and receive costs -- Comment out because recv cost is set at receiving now. UPDATE recv SET recv_invoiced=TRUE, recv_recvcost_curr_id=basecurrid(), recv_recvcost=round(_g.value_base / _g.voitem_qty, 2) FROM poitem WHERE ((recv_orderitem_id=poitem_id) AND (recv_order_type='PO') AND (recv_orderitem_id=_g.poitem_id) AND (recv_vohead_id=pVoheadid) ); -- Post all the Tagged Rejections for this P/O Item as Invoiced UPDATE poreject SET poreject_invoiced=TRUE WHERE ( (poreject_poitem_id=_g.poitem_id) AND (poreject_vohead_id=pVoheadid) ); -- Update the qty and freight vouchered fields UPDATE poitem SET poitem_qty_vouchered = (poitem_qty_vouchered + _g.voitem_qty), poitem_freight_vouchered = (poitem_freight_vouchered + _g.vouchered_freight) WHERE (poitem_id=_g.poitem_id); END LOOP; -- Loop through the vodist records for the passed vohead that -- are not posted against a P/O Item -- Skip the tax distributions FOR _d IN SELECT vodist_id, vodist_discountable, currToBase(_p.vohead_curr_id, vodist_amount, _p.vohead_distdate) AS vodist_amount_base, vodist_amount, vodist_accnt_id, vodist_expcat_id FROM vodist WHERE ( (vodist_vohead_id=pVoheadid) AND (vodist_poitem_id=-1) AND (vodist_tax_id=-1) ) LOOP -- Distribute from the misc. account IF (_d.vodist_accnt_id = -1) THEN PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), expcat_exp_accnt_id, round(_d.vodist_amount_base, 2) * -1, _glDate, _p.glnotes ) FROM expcat WHERE (expcat_id=_d.vodist_expcat_id); ELSE PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _d.vodist_accnt_id, round(_d.vodist_amount_base, 2) * -1, _glDate, _p.glnotes ); END IF; -- Add the Distribution Amount to the Total Amount RAISE DEBUG 'postVoucher: _d.vodist_amount=%', _d.vodist_amount; _totalAmount_base := _totalAmount_base + ROUND(_d.vodist_amount_base, 2); _totalAmount := _totalAmount + _d.vodist_amount; IF (_d.vodist_discountable) THEN _totalDiscountableAmount := (_totalDiscountableAmount + _d.vodist_amount); END IF; END LOOP; SELECT insertIntoGLSeries( _sequence, 'A/P', 'VO', text(vohead_number), accnt_id, round(_totalAmount_base, 2), _glDate, _p.glnotes ) INTO _test FROM vohead LEFT OUTER JOIN accnt ON (accnt_id=findAPAccount(vohead_vend_id)) WHERE ( (findAPAccount(vohead_vend_id)=0 OR accnt_id > 0) -- G/L interface might be disabled AND (vohead_id=pVoheadid) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Voucher #% due to an unassigned A/P Account [xtuple: postVoucher, -9, %]', _p.vohead_number, _p.vohead_number; END IF; PERFORM postGLSeries(_sequence, pJournalNumber); -- Create the A/P Open Item RAISE DEBUG 'postVoucher: _totalAmount=%, _totalDiscountableAmount=%', _totalAmount, _totalDiscountableAmount; INSERT INTO apopen ( apopen_journalnumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_open, apopen_terms_id, apopen_vend_id, apopen_doctype, apopen_docnumber, apopen_invcnumber, apopen_ponumber, apopen_reference, apopen_amount, apopen_paid, apopen_notes, apopen_username, apopen_posted, apopen_curr_id, apopen_discountable_amount ) -- TODO: SELECT pJournalNumber, vohead_docdate, vohead_duedate, _glDate, TRUE, vohead_terms_id, vohead_vend_id, 'V', vohead_number, vohead_invcnumber, COALESCE(TEXT(pohead_number), 'Misc.'), vohead_reference, round(_totalAmount, 2), 0, '', getEffectiveXtUser(), FALSE, vohead_curr_id, round(_totalDiscountableAmount, 2) FROM vohead LEFT OUTER JOIN pohead ON (vohead_pohead_id=pohead_id) WHERE (vohead_id=pVoheadid); -- Close all of the P/O Items that should be closed by this Voucher UPDATE poitem SET poitem_status='C' FROM voitem WHERE ( (voitem_poitem_id=poitem_id) AND (voitem_close) AND (voitem_vohead_id=pVoheadid) ); -- Check the P/O items and if they are all closed go ahead -- and close the P/O head. IF ( (SELECT (count(*) < 1) FROM vohead, poitem WHERE ((vohead_pohead_id=poitem_pohead_id) AND (poitem_status<>'C') AND (vohead_id=pVoheadid) ) ) ) THEN PERFORM closePo(vohead_pohead_id) FROM vohead WHERE (vohead_id=pVoheadid); END IF; -- Set the vohead as posted UPDATE vohead SET vohead_posted=TRUE, vohead_gldistdate=_glDate WHERE (vohead_id=pVoheadid); RETURN pJournalNumber; END; $_$; ALTER FUNCTION public.postvoucher(integer, integer, boolean) OWNER TO admin; -- -- Name: postvouchers(boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION postvouchers(boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostCosts ALIAS FOR $1; _journalNumber INTEGER; BEGIN SELECT fetchJournalNumber('AP-VO') INTO _journalNumber; PERFORM postVoucher(vohead_id, _journalNumber, pPostCosts) FROM vohead WHERE (NOT vohead_posted); RETURN _journalNumber; END; $_$; ALTER FUNCTION public.postvouchers(boolean) OWNER TO admin; -- -- Name: primarykeyfields(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION primarykeyfields(text, text) RETURNS text[] LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSchema ALIAS FOR $1; pRelation ALIAS FOR $2; _colname TEXT; _counter INTEGER := 0; _result TEXT[]; BEGIN EXECUTE 'SELECT ARRAY(SELECT attname FROM pg_attribute JOIN pg_class idx ON (attrelid = idx.oid) JOIN pg_namespace ON (idx.relnamespace = pg_namespace.oid) JOIN pg_index ON (idx.oid = indexrelid) JOIN pg_class tab ON (indrelid = tab.oid) WHERE NOT attisdropped AND nspname = ''' || pSchema || ''' AND indisprimary AND LOWER(tab.relname) = ''' || pRelation || ''' ORDER BY attnum);' INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.primarykeyfields(text, text) OWNER TO admin; -- -- Name: FUNCTION primarykeyfields(text, text); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION primarykeyfields(text, text) IS 'Return an array containing the names of the primary key fields of pSchema.pRelation. The first key field is in _result[1].'; -- -- Name: prj(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION prj() RETURNS SETOF prj LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row prj%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllProjects','ViewAllProjects','MaintainPersonalProjects','ViewPersonalProjects') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM prj LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM prj WHERE getEffectiveXtUser() IN (prj_owner_username, prj_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; ALTER FUNCTION public.prj() OWNER TO admin; -- -- Name: FUNCTION prj(); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION prj() IS 'A table function that returns Project results according to privilege settings.'; -- -- Name: prjtask; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE prjtask ( prjtask_id integer NOT NULL, prjtask_number text NOT NULL, prjtask_name text NOT NULL, prjtask_descrip text, prjtask_prj_id integer NOT NULL, prjtask_anyuser boolean, prjtask_status character(1) NOT NULL, prjtask_hours_budget numeric(18,6) NOT NULL, prjtask_hours_actual numeric(18,6) NOT NULL, prjtask_exp_budget numeric(16,4) NOT NULL, prjtask_exp_actual numeric(16,4) NOT NULL, prjtask_owner_username text, prjtask_start_date date, prjtask_due_date date, prjtask_assigned_date date, prjtask_completed_date date, prjtask_username text, CONSTRAINT prjtask_prjtask_status_check CHECK ((prjtask_status = ANY (ARRAY['P'::bpchar, 'O'::bpchar, 'C'::bpchar]))) ); ALTER TABLE public.prjtask OWNER TO admin; -- -- Name: TABLE prjtask; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE prjtask IS 'Project Task information'; -- -- Name: prjtask(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION prjtask() RETURNS SETOF prjtask LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row prjtask%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllProjects','ViewAllProjects','MaintainPersonalProjects','ViewPersonalProjects') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM prjtask LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT prjtask.* FROM prjtask JOIN prj ON prj_id=prjtask_prj_id WHERE getEffectiveXtUser() IN (prjtask_owner_username,prjtask_username,prj_username,prj_owner_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; ALTER FUNCTION public.prjtask() OWNER TO admin; -- -- Name: FUNCTION prjtask(); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION prjtask() IS 'A table function that returns Project results according to privilege settings.'; -- -- Name: purgecreditmemos(date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION purgecreditmemos(date) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; BEGIN DELETE FROM cmitem WHERE (cmitem_id IN ( SELECT cmitem_id FROM cmitem, cmhead WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmhead_posted) AND (cmhead_printed) AND (cmhead_docdate<=pCutoffDate) AND (checkCreditMemoSitePrivs(cmhead_id)) ) ) ); DELETE FROM cmhead WHERE ( (cmhead_posted) AND (cmhead_printed) AND (cmhead_docdate<=pCutoffDate) AND (checkCreditMemoSitePrivs(cmhead_id)) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.purgecreditmemos(date) OWNER TO admin; -- -- Name: purgecrmacctmerge(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION purgecrmacctmerge(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pDestid ALIAS FOR $1; _result INTEGER := 0; _tmpcount INTEGER := 0; BEGIN IF EXISTS(SELECT 1 FROM crmacctsel WHERE crmacctsel_dest_crmacct_id=pDestid) THEN DELETE FROM crmacctsel WHERE crmacctsel_dest_crmacct_id = pDestid; GET DIAGNOSTICS _result = ROW_COUNT; ELSIF EXISTS(SELECT 1 FROM mrgundo WHERE mrgundo_base_schema='public' AND mrgundo_base_table='crmacct' AND mrgundo_base_id=pDestid) THEN DELETE FROM crmacct WHERE crmacct_id IN ( SELECT mrgundo_pkey_id FROM mrgundo WHERE mrgundo_schema = 'public' AND mrgundo_table = 'crmacct' and mrgundo_pkey_col = 'crmacct_id' AND mrgundo_col IS NULL AND mrgundo_base_schema = 'public' AND mrgundo_base_table = 'crmacct' AND mrgundo_base_id = pDestid) AND crmacct_id != pDestid; GET DIAGNOSTICS _result = ROW_COUNT; DELETE FROM mrgundo WHERE mrgundo_base_schema ='public' AND mrgundo_base_table ='crmacct' AND mrgundo_base_id = pDestid; GET DIAGNOSTICS _tmpcount = ROW_COUNT; _result := _result + _tmpcount; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.purgecrmacctmerge(integer) OWNER TO admin; -- -- Name: purgeinvoicerecord(date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION purgeinvoicerecord(date, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; pInvcheadId ALIAS FOR $2; _r RECORD; _ra RECORD; _raheadid INTEGER; _result INTEGER; _debug BOOLEAN := FALSE; BEGIN -- Purge records where the entire Invoice, Billing, Shipper, Sales Order -- chain of associated documents are closed and complete FOR _r IN SELECT invchead_id, cobmisc_id, shiphead_id, ordershipped.cohead_id AS ordship_id, orderinvoiced.cohead_id AS ordinv_id FROM invchead LEFT OUTER JOIN invcitem ON (invcitem_invchead_id=invchead_id) LEFT OUTER JOIN cobmisc ON (cobmisc_invcnumber::TEXT=invchead_invcnumber) LEFT OUTER JOIN shipitem ON (shipitem_invcitem_id=invcitem_id) LEFT OUTER JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) LEFT OUTER JOIN cohead ordershipped ON (ordershipped.cohead_id=shiphead_order_id) LEFT OUTER JOIN coitem ON (coitem_id=invcitem_coitem_id) LEFT OUTER JOIN cohead orderinvoiced ON (orderinvoiced.cohead_id=coitem_cohead_id) WHERE ( (invchead_id = pInvcheadId) AND (invchead_posted) AND (checkInvoiceSitePrivs(invchead_id)) ) GROUP BY invchead_id, cobmisc_id, shiphead_id, ordship_id, ordinv_id LOOP -- Check Billing -- Billing header (cobmisc) must be posted SELECT cobmisc_id INTO _result FROM cobmisc WHERE ( (cobmisc_id=_r.cobmisc_id) AND (NOT cobmisc_posted) ); IF (FOUND) THEN RETURN 'Billing not closed'; END IF; -- Billing line items (cobill), associated Invoice line items, and -- associated Sales Order line items must be closed, posted, and after cutoff date SELECT cobill_id INTO _result FROM cobill JOIN invcitem ON (invcitem_id=cobill_invcitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) JOIN coitem ON ( (coitem_id=cobill_coitem_id) AND (coitem_status NOT IN ('C', 'X')) ) WHERE (cobill_cobmisc_id=_r.cobmisc_id); IF (FOUND) THEN RETURN 'Invoice/Sales Order associated with Billing not closed'; END IF; -- Check Shipping -- Shipping header (shiphead) must be shipped SELECT shiphead_id INTO _result FROM shiphead WHERE ( (shiphead_id=_r.shiphead_id) AND (NOT shiphead_shipped) ); IF (FOUND) THEN RETURN 'Shipper not closed'; END IF; -- Shipping line items (shipitem) and associated Sales Order line items -- must be closed SELECT shiphead_id INTO _result FROM shiphead, cohead, coitem WHERE ( (shiphead_id=_r.shiphead_id) AND ( (shiphead_order_type='SO') AND (shiphead_order_id=cohead_id) ) AND (coitem_cohead_id=cohead_id) AND (coitem_status NOT IN ('C', 'X')) ); IF (FOUND) THEN RETURN 'Sales Order associated with Shipper not closed'; END IF; -- Shipping line items (shipitem) and associated Invoices must be posted -- and after cutoff date SELECT shiphead_id INTO _result FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id) JOIN invcitem ON (invcitem_id=shipitem_invcitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (shiphead_id=_r.shiphead_id); IF (FOUND) THEN RETURN 'Invoice associated with Shipper not closed'; END IF; -- Check Sales Order -- Sales Order line items (coitem) must be closed SELECT cohead_id INTO _result FROM cohead JOIN coitem ON ( (coitem_cohead_id=cohead_id) AND (coitem_status NOT IN ('C', 'X')) ) WHERE (cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped Sales Order not closed'; END IF; SELECT cohead_id INTO _result FROM cohead JOIN coitem ON ( (coitem_cohead_id=cohead_id) AND (coitem_status NOT IN ('C', 'X')) ) WHERE (cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced Sales Order not closed'; END IF; IF (fetchMetricBool('MultiWhs')) THEN -- Check Original Return Authorization and cross check to New Sales Order SELECT rahead_id INTO _result FROM rahead JOIN raitem ON ( (raitem_rahead_id=rahead_id) AND (raitem_status NOT IN ('C', 'X')) ) JOIN coitem ON ( (coitem_id=raitem_new_coitem_id) AND (coitem_status NOT IN ('C', 'X')) ) JOIN invcitem ON (invcitem_coitem_id=coitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (rahead_orig_cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped Original Return Authorization not closed'; END IF; SELECT rahead_id INTO _result FROM rahead JOIN raitem ON ( (raitem_rahead_id=rahead_id) AND (raitem_status NOT IN ('C', 'X')) ) JOIN coitem ON ( (coitem_id=raitem_new_coitem_id) AND (coitem_status NOT IN ('C', 'X')) ) JOIN invcitem ON (invcitem_coitem_id=coitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (rahead_orig_cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced Original Return Authorization not closed'; END IF; -- Check New Return Authorization SELECT rahead_id INTO _result FROM rahead JOIN raitem ON ( (raitem_rahead_id=rahead_id) AND (NOT raitem_status IN ('C', 'X')) ) JOIN coitem ON ( (coitem_id=raitem_orig_coitem_id) AND (NOT coitem_status IN ('C', 'X')) ) JOIN invcitem ON (invcitem_coitem_id=coitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (rahead_new_cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped New Return Authorization not closed'; END IF; SELECT rahead_id INTO _result FROM rahead JOIN raitem ON ( (raitem_rahead_id=rahead_id) AND (NOT raitem_status IN ('C', 'X')) ) JOIN coitem ON ( (coitem_id=raitem_orig_coitem_id) AND (NOT coitem_status IN ('C', 'X')) ) JOIN invcitem ON (invcitem_coitem_id=coitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (rahead_new_cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced New Return Authorization not closed'; END IF; END IF; -- Check Lot/Serial Registration IF (fetchMetricBool('MultiWhs')) THEN -- Registration associated with Sales Order must be expired SELECT lsreg_id INTO _result FROM lsreg WHERE ( (lsreg_cohead_id=_r.ordship_id) AND (lsreg_expiredate > CURRENT_DATE) ); IF (FOUND) THEN RETURN 'Shipped Sales Order Lot/Serial Registration not closed'; END IF; SELECT lsreg_id INTO _result FROM lsreg WHERE ( (lsreg_cohead_id=_r.ordinv_id) AND (lsreg_expiredate > CURRENT_DATE) ); IF (FOUND) THEN RETURN 'Invoiced Sales Order Lot/Serial Registration not closed'; END IF; -- Registration associated with Shipping must be expired SELECT lsreg_id INTO _result FROM lsreg WHERE ( (lsreg_cohead_id=_r.shiphead_id) AND (lsreg_expiredate > CURRENT_DATE) ); IF (FOUND) THEN RETURN 'Shipper Lot/Serial Registration not closed'; END IF; END IF; IF (fetchMetricBool('MultiWhs')) THEN -- Registration associated with Original Return Authorization must be expired SELECT rahead_id INTO _result FROM rahead JOIN raitem ON (raitem_rahead_id=rahead_id) JOIN raitemls ON (raitemls_raitem_id=raitem_id) JOIN lsreg ON ( (lsreg_ls_id=raitemls_ls_id) AND (lsreg_expiredate > CURRENT_DATE) ) WHERE (rahead_orig_cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped Original Return Authorization Lot/Serial Registration not closed'; END IF; SELECT rahead_id INTO _result FROM rahead JOIN raitem ON (raitem_rahead_id=rahead_id) JOIN raitemls ON (raitemls_raitem_id=raitem_id) JOIN lsreg ON ( (lsreg_ls_id=raitemls_ls_id) AND (lsreg_expiredate > CURRENT_DATE) ) WHERE (rahead_orig_cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced Original Return Authorization Lot/Serial Registration not closed'; END IF; -- Registration associated with New Return Authorization must be expired SELECT rahead_id INTO _result FROM rahead JOIN raitem ON (raitem_rahead_id=rahead_id) JOIN raitemls ON (raitemls_raitem_id=raitem_id) JOIN lsreg ON ( (lsreg_ls_id=raitemls_ls_id) AND (lsreg_expiredate > CURRENT_DATE) ) WHERE (rahead_new_cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped New Return Authorization Lot/Serial Registration not closed'; END IF; SELECT rahead_id INTO _result FROM rahead JOIN raitem ON (raitem_rahead_id=rahead_id) JOIN raitemls ON (raitemls_raitem_id=raitem_id) JOIN lsreg ON ( (lsreg_ls_id=raitemls_ls_id) AND (lsreg_expiredate > CURRENT_DATE) ) WHERE (rahead_new_cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced New Return Authorization Lot/Serial Registration not closed'; END IF; END IF; -- Cash Advances associated with Sales Order cannot exist SELECT aropenalloc_doc_id INTO _result FROM aropenalloc WHERE ((aropenalloc_doctype='S') AND (aropenalloc_doc_id=_r.ordship_id)); IF (FOUND) THEN RETURN 'Shipped Cash Advance not closed'; END IF; SELECT aropenalloc_doc_id INTO _result FROM aropenalloc WHERE ((aropenalloc_doctype='S') AND (aropenalloc_doc_id=_r.ordinv_id)); IF (FOUND) THEN RETURN 'Invoiced Cash Advance not closed'; END IF; END LOOP; -- Everything is OK, delete the chain FOR _r IN SELECT invchead_id, cobmisc_id, shiphead_id, ordershipped.cohead_id AS ordship_id, orderinvoiced.cohead_id AS ordinv_id FROM invchead LEFT OUTER JOIN invcitem ON (invcitem_invchead_id=invchead_id) LEFT OUTER JOIN cobmisc ON (cobmisc_invcnumber::TEXT=invchead_invcnumber) LEFT OUTER JOIN shipitem ON (shipitem_invcitem_id=invcitem_id) LEFT OUTER JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) LEFT OUTER JOIN cohead ordershipped ON (ordershipped.cohead_id=shiphead_order_id) LEFT OUTER JOIN coitem ON (coitem_id=invcitem_coitem_id) LEFT OUTER JOIN cohead orderinvoiced ON (orderinvoiced.cohead_id=coitem_cohead_id) WHERE ( (invchead_id = pInvcheadId) AND (invchead_posted) AND (checkInvoiceSitePrivs(invchead_id)) ) GROUP BY invchead_id, cobmisc_id, shiphead_id, ordship_id, ordinv_id LOOP IF (fetchMetricBool('MultiWhs')) THEN FOR _ra IN SELECT rahead_id FROM rahead WHERE (rahead_orig_cohead_id=_r.ordship_id) LOOP IF (_debug) THEN RAISE NOTICE 'Deleting Original Return head id %', _ra.rahead_id; END IF; DELETE FROM raitemls WHERE (raitemls_raitem_id IN (SELECT raitem_id FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id))); DELETE FROM rahist WHERE (rahist_rahead_id=_ra.rahead_id); DELETE FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id); DELETE FROM rahead WHERE (rahead_id=_ra.rahead_id); END LOOP; FOR _ra IN SELECT rahead_id FROM rahead WHERE (rahead_orig_cohead_id=_r.ordinv_id) LOOP IF (_debug) THEN RAISE NOTICE 'Deleting Original Return head id %', _ra.rahead_id; END IF; DELETE FROM raitemls WHERE (raitemls_raitem_id IN (SELECT raitem_id FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id))); DELETE FROM rahist WHERE (rahist_rahead_id=_ra.rahead_id); DELETE FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id); DELETE FROM rahead WHERE (rahead_id=_ra.rahead_id); END LOOP; FOR _ra IN SELECT rahead_id FROM rahead WHERE (rahead_new_cohead_id=_r.ordship_id) LOOP IF (_debug) THEN RAISE NOTICE 'Deleting New Return head id %', _ra.rahead_id; END IF; DELETE FROM raitemls WHERE (raitemls_raitem_id IN (SELECT raitem_id FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id))); DELETE FROM rahist WHERE (rahist_rahead_id=_ra.rahead_id); DELETE FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id); DELETE FROM rahead WHERE (rahead_id=_ra.rahead_id); END LOOP; FOR _ra IN SELECT rahead_id FROM rahead WHERE (rahead_new_cohead_id=_r.ordinv_id) LOOP IF (_debug) THEN RAISE NOTICE 'Deleting New Return head id %', _ra.rahead_id; END IF; DELETE FROM raitemls WHERE (raitemls_raitem_id IN (SELECT raitem_id FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id))); DELETE FROM rahist WHERE (rahist_rahead_id=_ra.rahead_id); DELETE FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id); DELETE FROM rahead WHERE (rahead_id=_ra.rahead_id); END LOOP; END IF; IF (fetchMetricBool('MultiWhs')) THEN IF (_debug) THEN RAISE NOTICE 'Deleting Lot/Serial Registrations'; END IF; DELETE FROM lsreg WHERE (lsreg_cohead_id=_r.ordship_id); DELETE FROM lsreg WHERE (lsreg_cohead_id=_r.ordinv_id); DELETE FROM lsreg WHERE (lsreg_shiphead_id=_r.shiphead_id); END IF; IF (_debug) THEN RAISE NOTICE 'Deleting Shipped Sales Order head id %', _r.ordship_id; END IF; DELETE FROM payco WHERE (payco_cohead_id=_r.ordship_id); -- Delete kit components first DELETE FROM coitem WHERE (coitem_cohead_id=_r.ordship_id AND coitem_subnumber > 0); DELETE FROM coitem WHERE (coitem_cohead_id=_r.ordship_id); DELETE FROM cohead WHERE (cohead_id=_r.ordship_id); IF (_debug) THEN RAISE NOTICE 'Deleting Sales Order head id %', _r.ordinv_id; END IF; DELETE FROM payco WHERE (payco_cohead_id=_r.ordinv_id); -- Delete kit components first DELETE FROM coitem WHERE (coitem_cohead_id=_r.ordinv_id AND coitem_subnumber > 0); DELETE FROM coitem WHERE (coitem_cohead_id=_r.ordinv_id); DELETE FROM cohead WHERE (cohead_id=_r.ordinv_id); IF (_debug) THEN RAISE NOTICE 'Deleting Ship head id %', _r.shiphead_id; END IF; DELETE FROM shipitem WHERE (shipitem_shiphead_id=_r.shiphead_id); DELETE FROM pack WHERE (pack_shiphead_id=_r.shiphead_id); DELETE FROM shiphead WHERE (shiphead_id=_r.shiphead_id); IF (_debug) THEN RAISE NOTICE 'Deleting Billing head id %', _r.cobmisc_id; END IF; DELETE FROM cobill WHERE (cobill_cobmisc_id=_r.cobmisc_id); DELETE FROM cobmisc WHERE (cobmisc_id=_r.cobmisc_id); END LOOP; -- Everything is OK, delete the Invoice IF (_debug) THEN RAISE NOTICE 'Deleting Invoice head id %', _r.invchead_id; END IF; DELETE FROM invcitem WHERE (invcitem_invchead_id=_r.invchead_id); DELETE FROM invchead WHERE (invchead_id=_r.invchead_id); RETURN 'Purged'; END; $_$; ALTER FUNCTION public.purgeinvoicerecord(date, integer) OWNER TO admin; -- -- Name: purgeinvoicerecords(date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION purgeinvoicerecords(date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; BEGIN -- Remove the shipitem records DELETE FROM shipitem WHERE (shipitem_invcitem_id IN (SELECT invcitem_id FROM invcitem WHERE invcitem_invchead_id IN ( SELECT invchead_id FROM invchead WHERE ( (invchead_invcdate <= pCutoffDate) AND (checkInvoiceSitePrivs(invchead_id)) AND (invchead_posted) ) ) ) ); -- Remove the cobill and cobmisc records DELETE FROM cobill WHERE (cobill_cobmisc_id IN ( SELECT cobmisc_id FROM cobmisc, invchead WHERE ( (invchead_invcnumber=cobmisc_invcnumber::TEXT) AND (checkInvoiceSitePrivs(invchead_id)) AND (cobmisc_invcdate <= pCutoffDate) AND (cobmisc_posted)) ) ); DELETE FROM cobmisc WHERE ( (checkInvoiceSitePrivs(getInvcheadId(cobmisc_invcnumber::TEXT))) AND (cobmisc_invcdate <= pCutoffDate) AND (cobmisc_posted) ); -- Remove the invchead and invcitem records DELETE FROM invcitem WHERE (invcitem_invchead_id IN ( SELECT invchead_id FROM invchead WHERE ( (invchead_invcdate <= pCutoffDate) AND (checkInvoiceSitePrivs(invchead_id)) AND (invchead_posted) ) ) ); DELETE FROM invchead WHERE ( (invchead_invcdate <= pCutoffDate) AND (checkInvoiceSitePrivs(invchead_id)) AND (invchead_posted) ); RETURN 1; END; $_$; ALTER FUNCTION public.purgeinvoicerecords(date) OWNER TO admin; -- -- Name: purgepostedcountslips(date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION purgepostedcountslips(date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; pWarehousid ALIAS FOR $2; BEGIN IF (pWarehousid = -1) THEN DELETE FROM cntslip WHERE (cntslip_id IN ( SELECT cntslip_id FROM cntslip, invcnt WHERE ( (cntslip_cnttag_id=invcnt_id) AND (invcnt_posted) AND (cntslip_posted) AND (date(invcnt_postdate) <= pCutoffDate) ) ) ); ELSE DELETE FROM cntslip WHERE (cntslip_id IN ( SELECT cntslip_id FROM invcnt, itemsite WHERE ( (cntslip_cnttag_id=invcnt_id) AND (invcnt_posted) AND (cntslip_posted) AND (invcnt_itemsite_id=itemsite_id) AND (date(invcnt_postdate) <= pCutoffDate) AND (itemsite_warehous_id=pWarehousid) ) ) ); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.purgepostedcountslips(date, integer) OWNER TO admin; -- -- Name: purgepostedcounttags(date, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION purgepostedcounttags(date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; pWarehousid ALIAS FOR $2; BEGIN IF (pWarehousid = -1) THEN DELETE FROM cntslip WHERE (cntslip_cnttag_id IN ( SELECT invcnt_id FROM invcnt WHERE ( (invcnt_posted) AND (date(invcnt_postdate) <= pCutoffDate) ) ) ); DELETE FROM invcnt WHERE ((invcnt_posted) AND (date(invcnt_postdate) <= pCutoffDate)); ELSE DELETE FROM cntslip WHERE (cntslip_cnttag_id IN ( SELECT invcnt_id FROM invcnt, itemsite WHERE ( (invcnt_posted) AND (invcnt_itemsite_id=itemsite_id) AND (date(invcnt_postdate) <= pCutoffDate) AND (itemsite_warehous_id=pWarehousid) ) ) ); DELETE FROM invcnt WHERE (invcnt_id IN ( SELECT invcnt_id FROM invcnt, itemsite WHERE ( (invcnt_posted) AND (invcnt_itemsite_id=itemsite_id) AND (date(invcnt_postdate) <= pCutoffDate) AND (itemsite_warehous_id=pWarehousid) ) ) ); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.purgepostedcounttags(date, integer) OWNER TO admin; -- -- Name: purgeshipments(date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION purgeshipments(date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcutoff ALIAS FOR $1; _r RECORD; BEGIN -- Used for transfer orders shipments (which are never invoiced) FOR _r IN SELECT shiphead_id FROM shiphead WHERE ( (shiphead_order_type='TO') AND (shiphead_shipped) AND (shiphead_shipdate <= pcutoff) ) LOOP DELETE FROM shipitem WHERE (shipitem_shiphead_id=_r.shiphead_id); DELETE FROM shiphead WHERE (shiphead_id=_r.shiphead_id); END LOOP; RETURN 0; END; $_$; ALTER FUNCTION public.purgeshipments(date) OWNER TO admin; -- -- Name: qtyallocated(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyallocated(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAheaddays ALIAS FOR $2; BEGIN RETURN qtyAllocated(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookAheadDays)); END; $_$; ALTER FUNCTION public.qtyallocated(integer, integer) OWNER TO admin; -- -- Name: qtyallocated(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyallocated(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN qtyAllocated(pItemsiteid, startOfTime(), pDate); END; $_$; ALTER FUNCTION public.qtyallocated(integer, date) OWNER TO admin; -- -- Name: qtyallocated(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyallocated(integer, date, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; BEGIN IF ( fetchMetricBool('MultiWhs')) THEN IF ( SELECT item_sold FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid)) ) THEN RETURN (allocatedForTo(pItemsiteid, pStartDate, pEndDate) + allocatedForWo(pItemsiteid, pStartDate, pEndDate) + allocatedForSo(pItemsiteid, pStartDate, pEndDate)); ELSE RETURN (allocatedForTo(pItemsiteid, pStartDate, pEndDate) + allocatedForWo(pItemsiteid, pStartDate, pEndDate)); END IF; ELSE IF ( SELECT item_sold FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid)) ) THEN RETURN (allocatedForWo(pItemsiteid, pStartDate, pEndDate) + allocatedForSo(pItemsiteid, pStartDate, pEndDate)); ELSE RETURN (allocatedForWo(pItemsiteid, pStartDate, pEndDate)); END IF; END IF; END; $_$; ALTER FUNCTION public.qtyallocated(integer, date, date) OWNER TO admin; -- -- Name: qtyatshipping(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyatshipping(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN qtyAtShipping('SO', $1); END; $_$; ALTER FUNCTION public.qtyatshipping(integer) OWNER TO admin; -- -- Name: qtyatshipping(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyatshipping(text, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN qtyAtShipping($1, $2, 'U'); END; $_$; ALTER FUNCTION public.qtyatshipping(text, integer) OWNER TO admin; -- -- Name: qtyatshipping(text, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyatshipping(text, integer, text) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; plineitemid ALIAS FOR $2; pstatus ALIAS FOR $3; _qty NUMERIC := 0.0; BEGIN -- pstatus U=unshipped -- S=shipped -- B=both unshipped and shipped IF (pordertype NOT IN ('SO', 'TO')) THEN RAISE EXCEPTION '% is not a valid order type', pordertype; END IF; IF (pstatus NOT IN ('U', 'S', 'B')) THEN RAISE EXCEPTION '% is not a valid status', pstatus; END IF; SELECT COALESCE(SUM(shipitem_qty), 0.0) INTO _qty FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type=pordertype) AND (shipitem_orderitem_id=plineitemid) AND (((shiphead_shipped) AND (pstatus IN ('S', 'B'))) OR ((NOT shiphead_shipped) AND (pstatus IN ('U', 'B')))) ); RETURN _qty; END; $_$; ALTER FUNCTION public.qtyatshipping(text, integer, text) OWNER TO admin; -- -- Name: qtyavailable(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyavailable(integer, integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAheadDays ALIAS FOR $2; BEGIN RETURN ( ( SELECT itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=pItemsiteid) ) + (SELECT qtyOrdered(pItemsiteid, pLookAheadDays)) - (SELECT qtyAllocated(pitemsiteid, pLookAheadDays)) ); END; $_$; ALTER FUNCTION public.qtyavailable(integer, integer) OWNER TO admin; -- -- Name: qtyavailable(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyavailable(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN ( ( SELECT itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=pItemsiteid) ) + (SELECT qtyOrdered(pItemsiteid, (pDate - CURRENT_DATE))) - (SELECT qtyAllocated(pItemsiteid, (pDate - CURRENT_DATE))) ); END; $_$; ALTER FUNCTION public.qtyavailable(integer, date) OWNER TO admin; -- -- Name: qtyinshipment(text, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyinshipment(text, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; plineitemid ALIAS FOR $2; pshipheadid ALIAS FOR $3; _qty NUMERIC; BEGIN IF (pordertype NOT IN ('SO', 'TO')) THEN RAISE EXCEPTION '% is not a valid order type', pordertype; END IF; IF (pshipheadid IS NULL) THEN RAISE EXCEPTION 'Cannot calculate quantity in a shipment with a NULL shipment'; END IF; SELECT SUM(COALESCE(shipitem_qty, 0.0)) INTO _qty FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type=pordertype) AND (shipitem_orderitem_id=plineitemid) AND (shiphead_id=pshipheadid)); IF (NOT FOUND) THEN RAISE NOTICE 'Quantity of % item % is 0 because shipment % does not exist.', pordertype, plineitemid, pshipheadid; END IF; RETURN _qty; END; $_$; ALTER FUNCTION public.qtyinshipment(text, integer, integer) OWNER TO admin; -- -- Name: qtylocation(integer, integer, date, date, integer, text, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtylocation(integer, integer, date, date, integer, text, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationId ALIAS FOR $1; pLsId ALIAS FOR $2; pExpiration ALIAS FOR $3; pWarranty ALIAS FOR $4; pItemsiteId ALIAS FOR $5; pOrderType ALIAS FOR $6; pOrderId ALIAS FOR $7; pItemlocdistId ALIAS FOR $8; _qty NUMERIC = 0.0; _qtyDist NUMERIC = 0.0; _qtyReserved NUMERIC = 0.0; BEGIN -- Summarize itemloc qty for this location/itemsite SELECT COALESCE(SUM(itemloc_qty), 0) INTO _qty FROM itemloc WHERE ( (itemloc_itemsite_id=pItemsiteId) AND (itemloc_location_id=pLocationId) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(pLsId, itemloc_ls_id, -1)) AND (COALESCE(itemloc_expiration, endoftime())=COALESCE(pExpiration, itemloc_expiration, endoftime())) AND (COALESCE(itemloc_warrpurc, endoftime())=COALESCE(pWarranty, itemloc_warrpurc, endoftime())) ); -- Summarize qty distributed but not yet committed by previous distributions SELECT COALESCE(SUM(loc.itemlocdist_qty), 0) INTO _qtyDist FROM itemlocdist loc JOIN itemlocdist ls ON ((ls.itemlocdist_source_type='O') AND (ls.itemlocdist_id=loc.itemlocdist_itemlocdist_id)) WHERE ( (ls.itemlocdist_itemsite_id=pItemsiteId) AND (loc.itemlocdist_source_type='L') AND (loc.itemlocdist_source_id=pLocationId) AND (COALESCE(ls.itemlocdist_ls_id, -1)=COALESCE(pLsId, ls.itemlocdist_ls_id, -1)) AND (COALESCE(ls.itemlocdist_expiration, endoftime())=COALESCE(pExpiration, ls.itemlocdist_expiration, endoftime())) AND (COALESCE(ls.itemlocdist_warranty, endoftime())=COALESCE(pWarranty, ls.itemlocdist_warranty, endoftime())) AND (ls.itemlocdist_id != pItemlocdistId ) ); -- Summarize itemlocrsrv qty for this location/itemsite -- that is reserved for a different order IF (fetchMetricBool('EnableSOReservationsByLocation')) THEN SELECT COALESCE(SUM(itemlocrsrv_qty), 0) INTO _qtyReserved FROM itemloc JOIN itemlocrsrv ON ( (itemlocrsrv_itemloc_id=itemloc_id) AND ((itemlocrsrv_source <> COALESCE(pOrderType, '')) OR (itemlocrsrv_source_id <> COALESCE(pOrderId, -1))) ) WHERE ( (itemloc_itemsite_id=pItemsiteId) AND (itemloc_location_id=pLocationId) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(pLsId, itemloc_ls_id, -1)) AND (COALESCE(itemloc_expiration, endoftime())=COALESCE(pExpiration, itemloc_expiration, endoftime())) AND (COALESCE(itemloc_warrpurc, endoftime())=COALESCE(pWarranty, itemloc_warrpurc, endoftime())) ); END IF; RETURN (_qty + _qtyDist - _qtyReserved); END; $_$; ALTER FUNCTION public.qtylocation(integer, integer, date, date, integer, text, integer, integer) OWNER TO admin; -- -- Name: qtyordered(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyordered(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookahead ALIAS FOR $2; _itemType TEXT; _result NUMERIC; BEGIN RETURN qtyOrdered(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookahead)); END; $_$; ALTER FUNCTION public.qtyordered(integer, integer) OWNER TO admin; -- -- Name: qtyordered(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyordered(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN qtyOrdered(pItemsiteid, startOfTime(), pDate); END; $_$; ALTER FUNCTION public.qtyordered(integer, date) OWNER TO admin; -- -- Name: qtyordered(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtyordered(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _itemType TEXT; BEGIN SELECT item_type INTO _itemType FROM item, itemsite WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ); IF ( SELECT metric_value FROM metric WHERE ((metric_name = 'MultiWhs') AND (metric_value = 't'))) THEN RETURN orderedByPo(pItemsiteid, pStartDate, pEndDate) + orderedByWo(pItemsiteid, pStartDate, pEndDate) + orderedByTo(pItemsiteid, pStartDate, pEndDate); ELSE RETURN orderedByPo(pItemsiteid, pStartDate, pEndDate) + orderedByWo(pItemsiteid, pStartDate, pEndDate); END IF; END; $_$; ALTER FUNCTION public.qtyordered(integer, date, date) OWNER TO admin; -- -- Name: qtypr(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtypr(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookahead ALIAS FOR $2; BEGIN RETURN qtypr(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookahead)); END; $_$; ALTER FUNCTION public.qtypr(integer, integer) OWNER TO admin; -- -- Name: qtypr(integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtypr(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN qtypr(pItemsiteid, startOfTime(), pDate); END; $_$; ALTER FUNCTION public.qtypr(integer, date) OWNER TO admin; -- -- Name: qtypr(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtypr(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _prtotal NUMERIC; BEGIN SELECT SUM(pr_qtyreq) INTO _prtotal FROM pr WHERE ((pr_status = 'O') AND (pr_itemsite_id=pItemsiteid) AND (pr_duedate BETWEEN pStartDate AND pEndDate)); IF (_prtotal IS NULL) THEN RETURN 0.0; END IF; RETURN _prtotal; END; $_$; ALTER FUNCTION public.qtypr(integer, date, date) OWNER TO admin; -- -- Name: qtytoreceive(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION qtytoreceive(text, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; _qty NUMERIC; BEGIN IF (pordertype = 'TO' AND NOT fetchMetricBool('MultiWhs')) THEN RETURN 0; END IF; IF (pordertype = 'RA' AND NOT fetchMetricBool('EnableReturnAuth')) THEN RETURN 0; END IF; SELECT SUM(recv_qty) INTO _qty FROM recv WHERE ((recv_orderitem_id=porderitemid) AND (NOT recv_posted) AND (recv_order_type=pordertype)); RETURN COALESCE(_qty, 0.0); END; $_$; ALTER FUNCTION public.qtytoreceive(text, integer) OWNER TO admin; -- -- Name: recallshipment(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION recallshipment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN recallShipment($1, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.recallshipment(integer) OWNER TO admin; -- -- Name: recallshipment(integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION recallshipment(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pshipheadid ALIAS FOR $1; _timestamp TIMESTAMP WITH TIME ZONE := $2; _allInvoiced BOOLEAN; _invoicePosted BOOLEAN; _in RECORD; _co RECORD; _cobill RECORD; _h RECORD; _result INTEGER; _invhistid INTEGER; _itemlocSeries INTEGER; _qty NUMERIC; _qtyToBill NUMERIC; _shiphead RECORD; _to RECORD; _ti RECORD; _value NUMERIC; BEGIN IF (_timestamp IS NULL) THEN _timestamp := CURRENT_TIMESTAMP; END IF; SELECT * INTO _shiphead FROM shiphead WHERE (shiphead_id=pshipheadid); IF (NOT FOUND OR NOT _shiphead.shiphead_shipped) THEN RETURN -1; END IF; IF (_shiphead.shiphead_order_type = 'SO') THEN SELECT cohead_number AS head_number, cohead_cust_id AS cust_id, cohead_prj_id AS prj_id, cohead_saletype_id AS saletype_id, cohead_shipzone_id AS shipzone_id INTO _h FROM cohead WHERE (cohead_id=_shiphead.shiphead_order_id); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT COALESCE(BOOL_AND(shipitem_invoiced), FALSE) INTO _allInvoiced FROM cobill, shipitem WHERE ((cobill_coitem_id=shipitem_orderitem_id) AND (shipitem_shiphead_id=pshipheadid)); IF (_allInvoiced AND NOT checkPrivilege('RecallInvoicedShipment')) THEN RETURN -2; END IF; -- Check for any associated posted Invoices SELECT COALESCE(BOOL_AND(invchead_posted), FALSE) INTO _invoicePosted FROM shipitem JOIN invcitem ON (invcitem_id=shipitem_invcitem_id) JOIN invchead ON (invchead_id=invcitem_invchead_id) WHERE (shipitem_shiphead_id=pshipheadid); IF (_invoicePosted) THEN RETURN -4; END IF; -- Delete any associated unposted Invoices FOR _in IN SELECT DISTINCT invchead_id FROM shipitem JOIN invcitem ON (invcitem_id=shipitem_invcitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND (NOT invchead_posted) ) WHERE (shipitem_shiphead_id=pshipheadid) LOOP SELECT deleteInvoice(_in.invchead_id) INTO _result; IF (_result < 0) THEN RETURN _result; END IF; END LOOP; FOR _co IN SELECT coitem_id, coitem_itemsite_id, coitem_qty_invuomratio, coitem_warranty, coitem_cos_accnt_id, itemsite_controlmethod FROM coitem JOIN itemsite ON (coitem_itemsite_id=itemsite_id) WHERE(coitem_id IN (SELECT shipitem_orderitem_id FROM shipitem, shiphead WHERE((shipitem_shiphead_id=shiphead_id) AND (shiphead_shipped) AND (shiphead_id=pshipheadid)))) FOR UPDATE LOOP SELECT SUM(shipitem_qty),SUM(COALESCE(shipitem_value, 0)) INTO _qty, _value FROM shipitem WHERE ( (shipitem_orderitem_id=_co.coitem_id) AND (shipitem_shiphead_id=pshipheadid) ); UPDATE coitem SET coitem_qtyshipped = (coitem_qtyshipped - _qty) WHERE (coitem_id=_co.coitem_id); _qtyToBill := _qty; FOR _cobill IN SELECT cobill_id, cobill_qty FROM cobill, shipitem WHERE ((cobill_coitem_id=shipitem_orderitem_id) AND (shipitem_shiphead_id=pshipheadid) AND (cobill_coitem_id=_co.coitem_id)) FOR UPDATE LOOP IF (noNeg(_cobill.cobill_qty - _qtyToBill) = 0) THEN DELETE FROM cobill WHERE (cobill_id=_cobill.cobill_id); ELSE UPDATE cobill SET cobill_qty = noNeg(cobill_qty - _qtyToBill) WHERE (cobill_id=_cobill.cobill_id); END IF; _qtyToBill = _qtyToBill - _cobill.cobill_qty; EXIT WHEN (_qtyToBill <= 0.0); END LOOP; -- Check to see if all of the cobills have been deleted for this cobmisc IF (EXISTS(SELECT cobmisc_id FROM cobmisc JOIN cobill ON (cobill_cobmisc_id=cobmisc_id) WHERE (cobmisc_cohead_id=_shiphead.shiphead_order_id AND NOT cobmisc_posted))) THEN -- Lines exist, update the freight UPDATE cobmisc SET cobmisc_freight = (cobmisc_freight - _shiphead.shiphead_freight) WHERE (cobmisc_cohead_id=_shiphead.shiphead_order_id AND NOT cobmisc_posted); ELSE -- No lines exist, delete the cobmisc DELETE FROM cobmisc WHERE (cobmisc_cohead_id=_shiphead.shiphead_order_id AND NOT cobmisc_posted); END IF; -- Distribute to G/L, debit Shipping Asset, credit COS IF (_co.itemsite_controlmethod != 'N') THEN PERFORM insertGLTransaction( 'S/R', _shiphead.shiphead_order_type, _h.head_number::TEXT, 'Recall Shipment', CASE WHEN(COALESCE(_co.coitem_cos_accnt_id, -1) != -1) THEN getPrjAccntId(_h.prj_id, _co.coitem_cos_accnt_id) WHEN(_co.coitem_warranty = TRUE) THEN getPrjAccntId(_h.prj_id, resolveCOWAccount(itemsite_id, _h.cust_id, _h.saletype_id, _h.shipzone_id)) ELSE getPrjAccntId(_h.prj_id, resolveCOSAccount(itemsite_id, _h.cust_id, _h.saletype_id, _h.shipzone_id)) END, getPrjAccntId(_h.prj_id,costcat_shipasset_accnt_id), -1, _value, _timestamp::DATE ) FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_co.coitem_itemsite_id) ); END IF; END LOOP; -- Kit billing selection -- Set kit billing qty to zero since kits are shipped complete FOR _cobill IN SELECT cobill_id, cobill_qty FROM shipitem JOIN coitem sub ON (sub.coitem_id=shipitem_orderitem_id) JOIN coitem kit ON (kit.coitem_id <> sub.coitem_id AND kit.coitem_cohead_id = sub.coitem_cohead_id AND kit.coitem_linenumber = sub.coitem_linenumber AND kit.coitem_subnumber = 0) JOIN cobill ON (cobill_coitem_id=kit.coitem_id) WHERE (shipitem_shiphead_id=pshipheadid) AND (sub.coitem_subnumber > 0) GROUP BY cobill_id, cobill_qty LOOP UPDATE cobill SET cobill_qty = 0.0 WHERE (cobill_id=_cobill.cobill_id); END LOOP; ELSEIF (_shiphead.shiphead_order_type = 'TO') THEN SELECT * INTO _to FROM tohead WHERE (tohead_id=_shiphead.shiphead_order_id); IF (NOT FOUND) THEN RETURN -1; END IF; IF (_to.tohead_status = 'C') THEN RETURN -6; END IF; FOR _ti IN SELECT toitem_id, sis.itemsite_id AS src_itemsite_id, tis.itemsite_id AS trns_itemsite_id, scc.costcat_shipasset_accnt_id AS src_shipasset_accnt_id, tcc.costcat_asset_accnt_id AS trns_asset_accnt_id, itemcost(tis.itemsite_id) AS trns_cost, SUM(shipitem_qty) AS recall_qty FROM shipitem JOIN toitem ON (toitem_id=shipitem_orderitem_id) JOIN itemsite sis ON (sis.itemsite_item_id=toitem_item_id AND sis.itemsite_warehous_id=_to.tohead_src_warehous_id) JOIN itemsite tis ON (tis.itemsite_item_id=toitem_item_id AND tis.itemsite_warehous_id=_to.tohead_trns_warehous_id) JOIN costcat scc ON (scc.costcat_id=sis.itemsite_costcat_id) JOIN costcat tcc ON (tcc.costcat_id=tis.itemsite_costcat_id) WHERE (shipitem_shiphead_id=pshipheadid) GROUP BY toitem_id, sis.itemsite_id, tis.itemsite_id, scc.costcat_shipasset_accnt_id, tcc.costcat_asset_accnt_id LOOP _itemlocSeries := NEXTVAL('itemloc_series_seq'); SELECT postInvTrans(_ti.src_itemsite_id, 'TS', (_ti.recall_qty * -1.0), 'I/M', _shiphead.shiphead_order_type, formatToNumber(_ti.toitem_id), _to.tohead_number, 'Recall TO Shipment To Src Warehouse', _ti.trns_asset_accnt_id, _ti.src_shipasset_accnt_id, _itemlocSeries, _timestamp, (_ti.trns_cost * _ti.recall_qty * -1.0)) INTO _invhistid; IF (_invhistid < 0) THEN RETURN _invhistid; END IF; -- post the inventory history if lot/serial or location control PERFORM postItemlocseries(_itemlocSeries); -- record inventory history and qoh changes at transit warehouse but -- there is only one g/l account to touch SELECT postInvTrans(_ti.trns_itemsite_id, 'TR', (_ti.recall_qty * -1.0), 'I/M', _shiphead.shiphead_order_type, formatToNumber(_ti.toitem_id), _to.tohead_number, 'Recall TO Shipment From Transit Warehouse', _ti.trns_asset_accnt_id, _ti.trns_asset_accnt_id, _itemlocSeries, _timestamp, (_ti.trns_cost * _ti.recall_qty * -1.0)) INTO _invhistid; IF (_invhistid < 0) THEN RETURN _invhistid; END IF; -- post the inventory history if lot/serial or location control PERFORM postItemlocseries(_itemlocSeries); UPDATE toitem SET toitem_qty_shipped = (toitem_qty_shipped - _ti.recall_qty) WHERE (toitem_id=_ti.toitem_id); UPDATE shipitem SET shipitem_shipdate=NULL, shipitem_shipped=FALSE, shipitem_value=(shipitem_qty * _ti.trns_cost) WHERE ((shipitem_orderitem_id=_ti.toitem_id) AND (shipitem_shiphead_id=pshipheadid)); DELETE FROM recv WHERE ((recv_orderitem_id=_ti.toitem_id) AND (recv_order_type='TO') AND (NOT recv_posted)); END LOOP; END IF; UPDATE shiphead SET shiphead_shipped=FALSE WHERE (shiphead_id=pshipheadid); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.recallshipment(integer, timestamp with time zone) OWNER TO admin; -- -- Name: recallwo(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION recallwo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; recallChildren ALIAS FOR $2; returnCode INTEGER; BEGIN UPDATE wo SET wo_status='E' WHERE ((wo_status='R') AND (wo_id=pWoid)); IF (recallChildren) THEN returnCode := (SELECT MAX(recallWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.recallwo(integer, boolean) OWNER TO admin; -- -- Name: receipts(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION receipts(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('RM', 'RB', 'RT', 'RP', 'RR', 'RX', 'TR')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.receipts(text) OWNER TO admin; -- -- Name: releaseapmemonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseapmemonumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('APMemoNumber', $1::INTEGER) > 0; $_$; ALTER FUNCTION public.releaseapmemonumber(integer) OWNER TO admin; -- -- Name: releasearmemonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasearmemonumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. select releaseNumber('ARMemoNumber', $1::INTEGER) > 0; $_$; ALTER FUNCTION public.releasearmemonumber(integer) OWNER TO admin; -- -- Name: releasecashrcptnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasecashrcptnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('CashRcptNumber', $1) > 0; $_$; ALTER FUNCTION public.releasecashrcptnumber(integer) OWNER TO admin; -- -- Name: releasecmnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasecmnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('CmNumber', $1) > 0; $_$; ALTER FUNCTION public.releasecmnumber(integer) OWNER TO admin; -- -- Name: releasecmnumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasecmnumber(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('CmNumber', $1::INTEGER) > 0; $_$; ALTER FUNCTION public.releasecmnumber(text) OWNER TO admin; -- -- Name: releasecrmaccountnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasecrmaccountnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('CRMAccountNumber', $1::INTEGER) > 0; $_$; ALTER FUNCTION public.releasecrmaccountnumber(integer) OWNER TO admin; -- -- Name: releaseincidentnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseincidentnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('IncidentNumber', $1) = 1; $_$; ALTER FUNCTION public.releaseincidentnumber(integer) OWNER TO admin; -- -- Name: releaseinvcnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseinvcnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('InvcNumber', $1) > 0; $_$; ALTER FUNCTION public.releaseinvcnumber(integer) OWNER TO admin; -- -- Name: releaseinvcnumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseinvcnumber(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('InvcNumber', $1::INTEGER) > 0; $_$; ALTER FUNCTION public.releaseinvcnumber(text) OWNER TO admin; -- -- Name: releasenumber(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasenumber(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE psequence ALIAS FOR $1; pnumber ALIAS FOR $2; BEGIN -- drop the number back into the pool if it was not committed PERFORM clearNumberIssue(psequence, pnumber); UPDATE orderseq SET orderseq_number = LEAST(pnumber, orderseq_number) WHERE (orderseq_name=psequence); RETURN 1; END; $_$; ALTER FUNCTION public.releasenumber(text, integer) OWNER TO admin; -- -- Name: releaseponumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseponumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('PoNumber', $1) > 0; $_$; ALTER FUNCTION public.releaseponumber(integer) OWNER TO admin; -- -- Name: releaseponumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseponumber(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('PoNumber', $1::INTEGER) > 0; $_$; ALTER FUNCTION public.releaseponumber(text) OWNER TO admin; -- -- Name: releaseprnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseprnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('PrNumber', $1) > 0; $_$; ALTER FUNCTION public.releaseprnumber(integer) OWNER TO admin; -- -- Name: releasepurchaseorder(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasepurchaseorder(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; BEGIN IF ( ( SELECT (COUNT(*) = 0) FROM poitem WHERE ( (poitem_pohead_id=pPoheadid) AND (poitem_status='U') ) ) ) THEN RETURN -1; END IF; IF ( ( SELECT (pohead_status='U') FROM pohead WHERE (pohead_id=pPoheadid) ) ) THEN --update status and store the date that the order was released on UPDATE pohead SET pohead_status='O', pohead_released = current_date WHERE (pohead_id=pPoheadid); END IF; --update status and store the duedates at release UPDATE poitem SET poitem_status='O', poitem_rlsd_duedate = poitem_duedate WHERE (poitem_pohead_id=pPoheadid); RETURN 1; END; $_$; ALTER FUNCTION public.releasepurchaseorder(integer) OWNER TO admin; -- -- Name: releasequnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasequnumber(integer) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('QuNumber', $1); $_$; ALTER FUNCTION public.releasequnumber(integer) OWNER TO admin; -- -- Name: releasequnumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasequnumber(text) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('QuNumber', $1::INTEGER); $_$; ALTER FUNCTION public.releasequnumber(text) OWNER TO admin; -- -- Name: releaseshipmentnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseshipmentnumber(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _test INTEGER; BEGIN -- Check to see if a Shipment exists with the passed number SELECT shiphead_id INTO _test FROM shiphead WHERE (shiphead_number=pNumber); IF (FOUND) THEN RETURN FALSE; END IF; -- Check to see if ShipmentNumber orderseq has been incremented past the passed number SELECT orderseq_number INTO _test FROM orderseq WHERE (orderseq_name='ShipmentNumber'); IF ((_test - 1) <> pNumber) THEN RETURN FALSE; END IF; -- Decrement the orderseq, releasing the passed number UPDATE orderseq SET orderseq_number = (orderseq_number - 1) WHERE (orderseq_name='ShipmentNumber'); RETURN TRUE; END; $_$; ALTER FUNCTION public.releaseshipmentnumber(integer) OWNER TO admin; -- -- Name: releasesohead(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasesohead(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; BEGIN DELETE FROM soheadlock WHERE ( (soheadlock_sohead_id=pSoheadid) AND (soheadlock_username=getEffectiveXtUser()) AND (soheadlock_procpid=pg_backend_pid()) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.releasesohead(integer) OWNER TO admin; -- -- Name: releasesonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasesonumber(integer) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('SoNumber', $1); $_$; ALTER FUNCTION public.releasesonumber(integer) OWNER TO admin; -- -- Name: releasesonumber(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasesonumber(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (COALESCE($1, '') = '' OR $1 ~ '[^0-9]') THEN --do nothing; RETURN 1; ELSE RETURN releaseNumber('SoNumber', $1::INTEGER); END IF; END; $_$; ALTER FUNCTION public.releasesonumber(text) OWNER TO admin; -- -- Name: releaseunusedbillingheader(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releaseunusedbillingheader(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; _p RECORD; BEGIN IF ( ( SELECT cobmisc_posted FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ) ) THEN RETURN -1; END IF; SELECT cobill_id INTO _p FROM cobill WHERE (cobill_cobmisc_id=pCobmiscid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; DELETE FROM cobmisc WHERE (cobmisc_id=pCobmiscid); RETURN 0; END; $_$; ALTER FUNCTION public.releaseunusedbillingheader(integer) OWNER TO admin; -- -- Name: releasevonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasevonumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('VcNumber', $1) > 0; $_$; ALTER FUNCTION public.releasevonumber(integer) OWNER TO admin; -- -- Name: releasewo(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; releaseChildren ALIAS FOR $2; returnCode INTEGER; BEGIN UPDATE wo SET wo_status='R' WHERE ((wo_status='E') AND (wo_id=pWoid)); IF (releaseChildren) THEN returnCode := (SELECT MAX(releaseWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.releasewo(integer, boolean) OWNER TO admin; -- -- Name: releasewonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION releasewonumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('WoNumber', $1) > 0; $_$; ALTER FUNCTION public.releasewonumber(integer) OWNER TO admin; -- -- Name: relocateinventory(integer, integer, integer, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION relocateinventory(integer, integer, integer, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN relocateInventory($1, $2, $3, $4, $5, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.relocateinventory(integer, integer, integer, numeric, text) OWNER TO admin; -- -- Name: relocateinventory(integer, integer, integer, numeric, text, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION relocateinventory(integer, integer, integer, numeric, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceItemlocid ALIAS FOR $1; pTargetLocationid ALIAS FOR $2; pItemsiteid ALIAS FOR $3; pQty ALIAS FOR $4; pComments ALIAS FOR $5; _GlDistTS TIMESTAMP WITH TIME ZONE := $6; _targetItemlocid INTEGER; _invhistid INTEGER; _p RECORD; _qty NUMERIC; _itemlocSeries INTEGER := NEXTVAL('itemloc_series_seq'); BEGIN IF ((_GlDistTS IS NULL) OR (CAST(_GlDistTS AS date)=CURRENT_DATE)) THEN _GlDistTS := CURRENT_TIMESTAMP; END IF; -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; -- Cache some parameters SELECT itemloc_ls_id, itemloc_itemsite_id AS itemsiteid, itemloc_expiration, itemloc_warrpurc, itemloc_qty, sourceloc.location_netable AS sourcenet, targetloc.location_netable AS targetnet INTO _p FROM itemloc, location AS sourceloc, location AS targetloc WHERE ( (itemloc_location_id=sourceloc.location_id) AND (targetloc.location_id=pTargetLocationid) AND (itemloc_id=pSourceItemlocid) ); -- Check to make sure the qty being transfered exists IF (_p.itemloc_qty < pQty) THEN RETURN -1; END IF; -- Create the RL transaction SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_transdate, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series) SELECT _invhistid, itemsite_id, 'RL', 0, itemsite_qtyonhand, itemsite_qtyonhand, pComments, _GlDistTS, uom_name, CASE WHEN (itemsite_costmethod='A') THEN avgcost(itemsite_id) ELSE stdCost(item_id) END, itemsite_costmethod, itemsite_value, itemsite_value, _itemlocSeries FROM item, itemsite, uom WHERE ((itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=pItemsiteid)); -- Relocate the inventory from the source and record the transactions INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc ) SELECT _invhistid, itemloc_location_id, itemloc_ls_id, (pQty * -1), itemloc_qty, (itemloc_qty - pQty), itemloc_expiration, itemloc_warrpurc FROM itemloc WHERE (itemloc_id=pSourceItemlocid); UPDATE itemloc SET itemloc_qty=(itemloc_qty - pQty) FROM itemsite WHERE ( (itemloc_itemsite_id=itemsite_id) AND (NOT itemsite_freeze) AND (itemloc_id=pSourceItemlocid) ); -- Check to see if there is anything left at the source Itemloc and delete if not DELETE FROM itemloc WHERE ( (itemloc_qty=0) AND (itemloc_id=pSourceItemlocid) ); -- Check to see if any of the current Lot/Serial #/Expiration exists at the target location SELECT itemloc_id INTO _targetItemlocid FROM itemloc WHERE ( (COALESCE(itemloc_ls_id, -1)=COALESCE(_p.itemloc_ls_id,-1)) AND (COALESCE(itemloc_expiration,endOfTime())=COALESCE(_p.itemloc_expiration,endOfTime())) AND (COALESCE(itemloc_warrpurc,endOfTime())=COALESCE(_p.itemloc_warrpurc,endOfTime())) AND (itemloc_itemsite_id=pItemsiteid) AND (itemloc_location_id=pTargetLocationid) ); IF (NOT FOUND) THEN SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _targetItemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc, itemloc_qty ) VALUES ( _targetItemlocid, pItemsiteid, pTargetLocationid, _p.itemloc_ls_id, _p.itemloc_expiration, _p.itemloc_warrpurc, 0 ); END IF; -- Relocate the inventory to the resultant target and record the transactions INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc ) SELECT _invhistid, pTargetLocationid, _p.itemloc_ls_id, pQty, itemloc_qty, (itemloc_qty + pQty), _p.itemloc_expiration, _p.itemloc_warrpurc FROM itemloc WHERE (itemloc_id=_targetItemlocid); UPDATE itemloc SET itemloc_qty=(itemloc_qty + pQty) FROM itemsite WHERE ( (itemloc_itemsite_id=itemsite_id) AND (NOT itemsite_freeze) AND (itemloc_id=_targetItemlocid) ); UPDATE invhist SET invhist_hasdetail=TRUE WHERE (invhist_id=_invhistid); -- Post in incomming or outgoing NN transaction if required IF (_p.sourcenet <> _p.targetnet) THEN IF (_p.targetnet) THEN _qty = (pQty * -1); ELSE _qty = pQty; END IF; INSERT INTO invhist ( invhist_itemsite_id, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_transdate, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series) SELECT itemsite_id, 'NN', (_qty * -1), itemsite_qtyonhand, (itemsite_qtyonhand - _qty), '', '', _GlDistTS, uom_name, CASE WHEN (itemsite_costmethod='A') THEN avgcost(itemsite_id) ELSE stdCost(item_id) END, itemsite_costmethod, itemsite_value, itemsite_value, _itemlocSeries FROM item, itemsite, uom WHERE ( (itemsite_item_id=item_id) ANd (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=_p.itemsiteid) ); UPDATE itemsite SET itemsite_qtyonhand = (itemsite_qtyonhand - _qty), itemsite_nnqoh = (itemsite_nnqoh + _qty) WHERE (itemsite_id=_p.itemsiteid); END IF; -- Check to see if there is anything left at the target Itemloc and delete if not -- Could be zero if relocate increased a negative quantity to zero DELETE FROM itemloc WHERE ( (itemloc_qty=0) AND (itemloc_id=_targetItemlocid) ); -- Return the invhist_id RETURN _invhistid; END; $_$; ALTER FUNCTION public.relocateinventory(integer, integer, integer, numeric, text, timestamp with time zone) OWNER TO admin; -- -- Name: reorderdate(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION reorderdate(integer, integer, boolean) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAhead ALIAS FOR $2; pIncludePlanned ALIAS FOR $3; _runningAvailability NUMERIC; _reorderLevel NUMERIC; _availability RECORD; BEGIN -- Make sure that we know how to handle the passed part IF ( SELECT (NOT (item_type IN ('M', 'P'))) FROM item, itemsite WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) THEN RETURN NULL; END IF; -- Load the initial QOH SELECT itemsite_qtyonhand INTO _runningAvailability FROM itemsite WHERE (itemsite_id=pItemsiteid); -- Grab the Reorder Level, if any IF ( ( SELECT itemsite_useparams FROM itemsite WHERE (itemsite_id=pItemsiteid) ) ) THEN SELECT itemsite_reorderlevel INTO _reorderLevel FROM itemsite WHERE (itemsite_id=pItemsiteid); ELSE _reorderLevel := 0; END IF; -- If we are already below the Reorder Level then we should order ASAP IF (_runningAvailability <= _reorderLevel) THEN RETURN CURRENT_DATE; END IF; -- Grab all of the availability trigger points FOR _availability IN SELECT 1 AS seq, wo_duedate AS orderdate, (noNeg(wo_qtyord - wo_qtyrcv)) AS balance FROM wo WHERE ((wo_status IN ('O', 'E', 'R', 'I')) AND (wo_duedate <= (CURRENT_DATE + pLookAhead)) AND (wo_itemsite_id=pItemsiteid)) UNION SELECT 2 AS seq, womatl_duedate AS orderdate, (noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq - womatl_qtyiss)) * -1) AS balance FROM womatl, wo, itemsite WHERE ((wo_status IN ('O', 'E', 'R', 'I')) AND (womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_duedate <= (CURRENT_DATE + pLookahead)) AND (womatl_itemsite_id=pItemsiteid)) UNION SELECT 1 AS seq, poitem_duedate AS orderdate, (noNeg(poitem_qty_ordered - poitem_qty_received) * poitem_invvenduomratio) AS balance FROM pohead, poitem WHERE ((poitem_pohead_id=pohead_id) AND (poitem_status = 'O') AND (poitem_duedate <= (CURRENT_DATE + pLookAhead)) AND (poitem_itemsite_id=pItemsiteid)) UNION SELECT 2 AS seq, coitem_scheddate AS orderdate, (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * -1) AS balance FROM coitem, cohead WHERE ((coitem_status = 'O') AND (coitem_cohead_id=cohead_id) AND (coitem_scheddate <= (CURRENT_DATE + pLookAhead)) AND (coitem_itemsite_id=pItemsiteid)) UNION SELECT 2 AS seq, planord_startdate AS orderdate, (planreq_qty * -1) AS balance FROM planreq, planord WHERE ( (pIncludePlanned) AND (planreq_source='P') AND (planreq_source_id=planord_id) AND (planord_startdate <= (CURRENT_DATE + pLookAhead)) AND (planord_itemsite_id=pItemsiteid) ) UNION SELECT 1 AS seq, planord_duedate AS orderdate, planord_qty AS balance FROM planord WHERE ( (pIncludePlanned) AND (planord_duedate <= (CURRENT_DATE + pLookAhead)) AND (planord_itemsite_id=pItemsiteid) ) ORDER BY orderdate, seq LOOP -- Calculate the new projected availability _runningAvailability := (_runningAvailability + _availability.balance); -- Check to see if the project availability drop below the reorder level IF (_runningAvailability < _reorderLevel) THEN RETURN _availability.orderdate; END IF; END LOOP; -- The reorder level was not reached within the look ahead period RETURN NULL; END; $_$; ALTER FUNCTION public.reorderdate(integer, integer, boolean) OWNER TO admin; -- -- Name: replaceallvoidedapchecks(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION replaceallvoidedapchecks(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'replaceAllVoidedAPChecks() is deprecated - use replaceAllVoidedChecks() instead'; RETURN replaceAllVoidedChecks($1); END; $_$; ALTER FUNCTION public.replaceallvoidedapchecks(integer) OWNER TO admin; -- -- Name: replaceallvoidedchecks(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION replaceallvoidedchecks(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; _returnValue INTEGER := 0; BEGIN SELECT MIN(replaceVoidedCheck(checkhead_id)) INTO _returnValue FROM checkhead WHERE ( (checkhead_void) AND (NOT checkhead_posted) AND (NOT checkhead_replaced) AND (NOT checkhead_deleted) AND (checkhead_bankaccnt_id=pBankaccntid) ); RETURN _returnValue; END; $_$; ALTER FUNCTION public.replaceallvoidedchecks(integer) OWNER TO admin; -- -- Name: replacevoidedapcheck(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION replacevoidedapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'replaceVoidedAPCheck() is deprecated - use replaceVoidedCheck()'; RETURN replaceVoidedCheck($1); END; $_$; ALTER FUNCTION public.replacevoidedapcheck(integer) OWNER TO admin; -- -- Name: replacevoidedcheck(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION replacevoidedcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; _newCheckid INTEGER; BEGIN IF ( ( SELECT ( (NOT checkhead_void) OR checkhead_posted OR checkhead_replaced ) FROM checkhead WHERE (checkhead_id=pCheckid) ) ) THEN RETURN -1; END IF; -- has someone created a new check for one of the items while this was void? IF EXISTS (SELECT dup.checkitem_id FROM checkitem orig, checkitem dup, checkhead AS duphead WHERE ((COALESCE(orig.checkitem_aropen_id,-1)=COALESCE(dup.checkitem_aropen_id,-1)) AND (COALESCE(orig.checkitem_apopen_id,-1)=COALESCE(dup.checkitem_apopen_id,-1)) AND (orig.checkitem_checkhead_id!=dup.checkitem_checkhead_id) AND (dup.checkitem_checkhead_id=duphead.checkhead_id) AND (NOT duphead.checkhead_void) AND (orig.checkitem_checkhead_id=pCheckid))) THEN RETURN -2; END IF; SELECT NEXTVAL('checkhead_checkhead_id_seq') INTO _newCheckid; INSERT INTO checkhead ( checkhead_id, checkhead_recip_id, checkhead_recip_type, checkhead_bankaccnt_id, checkhead_checkdate, checkhead_number, checkhead_amount, checkhead_for, checkhead_journalnumber, checkhead_notes, checkhead_misc, checkhead_expcat_id, checkhead_curr_id ) SELECT _newCheckid, checkhead_recip_id, checkhead_recip_type, checkhead_bankaccnt_id, checkhead_checkdate, -1, -- fetchNextCheckNumber(checkhead_bankaccnt_id), checkhead_amount, checkhead_for, checkhead_journalnumber, checkhead_notes || ' Replaces voided check ' || checkhead_number, checkhead_misc, checkhead_expcat_id, checkhead_curr_id FROM checkhead WHERE (checkhead_id=pCheckid); INSERT INTO checkitem ( checkitem_checkhead_id, checkitem_amount, checkitem_discount, checkitem_ponumber, checkitem_vouchernumber, checkitem_invcnumber, checkitem_apopen_id, checkitem_aropen_id, checkitem_docdate, checkitem_curr_id, checkitem_curr_rate ) SELECT _newCheckid, checkitem_amount, checkitem_discount, checkitem_ponumber, checkitem_vouchernumber, checkitem_invcnumber, checkitem_apopen_id, checkitem_aropen_id, checkitem_docdate, checkitem_curr_id, checkitem_curr_rate FROM checkitem WHERE (checkitem_checkhead_id=pCheckid); UPDATE checkhead SET checkhead_replaced=TRUE WHERE (checkhead_id=pCheckid); RETURN _newCheckid; END; $_$; ALTER FUNCTION public.replacevoidedcheck(integer) OWNER TO admin; -- -- Name: reprioritizewo(integer, integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION reprioritizewo(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pPriority ALIAS FOR $2; pChangeChildren ALIAS FOR $3; _status CHAR(1); _result INTEGER; BEGIN SELECT wo_status INTO _status FROM wo WHERE (wo_id=pWoid); IF (NOT (_status IN ('O', 'E','R','I'))) THEN return -1; END IF; UPDATE wo SET wo_priority=pPriority WHERE (wo_id=pWoid); IF ( (_status IN ('E','R','I')) AND (pChangeChildren) ) THEN SELECT COALESCE(MIN(reprioritizeWo(wo_id, pPriority, TRUE)), 1) INTO _result FROM wo WHERE ( (wo_ordtype='W') AND (wo_ordid=pWoid) ); ELSE _result = 1; END IF; RETURN _result; END; $_$; ALTER FUNCTION public.reprioritizewo(integer, integer, boolean) OWNER TO admin; -- -- Name: resetdbobjperms(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resetdbobjperms(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pObjname ALIAS FOR $1; BEGIN EXECUTE 'ALTER TABLE ' || pObjname || ' OWNER TO ' || getEffectiveXtUser() || ';'; EXECUTE 'REVOKE ALL ON ' || pObjname || ' FROM PUBLIC;'; EXECUTE 'GRANT ALL ON ' || pObjname || ' TO GROUP xtrole;'; RETURN 1; END; $_$; ALTER FUNCTION public.resetdbobjperms(text) OWNER TO admin; -- -- Name: resetdbobjperms(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resetdbobjperms() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _count INTEGER := 0; BEGIN SELECT SUM(resetDBObjPerms(nspname || '.' || relname)) INTO _count FROM pg_catalog.pg_class, pg_catalog.pg_namespace WHERE (relkind IN ('r', 'S', 'v') AND (relnamespace=pg_namespace.oid) AND (nspname IN ('public', 'api'))); RETURN _count; END; $$; ALTER FUNCTION public.resetdbobjperms() OWNER TO admin; -- -- Name: resetlowlevelcode(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resetlowlevelcode(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; _result INTEGER; _counterNum INTEGER := 1; _feedBackNum INTEGER := 1; _r RECORD; BEGIN DELETE FROM costUpdate; IF pItemId = -1 THEN -- -1 is an invalid item_id => do them all INSERT INTO costUpdate ( costUpdate_item_id, costUpdate_item_type ) SELECT item_id, item_type FROM item; -- Recalculate the Item Lowlevel codes WHILE _feedBackNum > 0 LOOP SELECT updateLowlevel(_counterNum) INTO _feedBackNum; _counterNum := _counterNum + 1; END LOOP; ELSE INSERT INTO costUpdate ( costUpdate_item_id, costUpdate_item_type ) SELECT item_id, item_type FROM item WHERE (item_id=pItemId); FOR _r IN SELECT item_id, bomdata_bomwork_level, item_type FROM item, indentedBOM(pItemId, getActiveRevId('BOM',pItemId),0,0) WHERE (bomdata_item_id=item_id) ORDER BY bomdata_bomwork_level LOOP -- this only works because of the ORDER BY in the loop SELECT UPDATE costUpdate SET costupdate_lowlevel_code = _r.bomdata_bomwork_level WHERE (costupdate_item_id=_r.item_id); IF (NOT FOUND) THEN INSERT INTO costUpdate ( costUpdate_item_id, costUpdate_lowlevel_code, costUpdate_item_type ) VALUES ( _r.item_id, _r.bomdata_bomwork_level, _r.item_type ); END IF; END LOOP; END IF; SELECT count(*) INTO _result FROM costUpdate; RETURN _result; END; $_$; ALTER FUNCTION public.resetlowlevelcode(integer) OWNER TO admin; -- -- Name: resetqohbalance(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resetqohbalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resetQOHBalance($1, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.resetqohbalance(integer) OWNER TO admin; -- -- Name: resetqohbalance(integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resetqohbalance(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pGlDistTS ALIAS FOR $2; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN IF ( ( SELECT ( (itemsite_controlmethod IN ('L', 'S')) OR (item_type = 'R') OR (itemsite_costmethod = 'J') OR (itemsite_loccntrl) OR (itemsite_qtyonhand > 0) ) FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; _itemlocSeries := NEXTVAL('itemloc_series_seq'); SELECT postInvTrans( itemsite_id, 'AD', (itemsite_qtyonhand * -1), 'I/M', '', '', 'RESET', 'Reset QOH Balance to 0', costcat_asset_accnt_id, costcat_adjustment_accnt_id, _itemlocSeries, pGlDistTS ) INTO _invhistid FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) ); PERFORM postItemLocSeries(_itemlocSeries); RETURN _invhistid; END; $_$; ALTER FUNCTION public.resetqohbalance(integer, timestamp with time zone) OWNER TO admin; -- -- Name: resolvecosaccount(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resolvecosaccount(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resolveCOSAccount($1, $2, -1, -1); END; $_$; ALTER FUNCTION public.resolvecosaccount(integer, integer) OWNER TO admin; -- -- Name: resolvecosaccount(integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resolvecosaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _salesaccntid INTEGER; _accntid INTEGER; BEGIN SELECT findSalesAccnt(pItemsiteid, 'IS', pCustid, pSaletypeid, pShipzoneid) INTO _salesaccntid; IF (_salesaccntid = -1) THEN SELECT getUnassignedAccntId() INTO _accntid; ELSE SELECT salesaccnt_cos_accnt_id INTO _accntid FROM salesaccnt WHERE (salesaccnt_id=_salesaccntid); END IF; RETURN _accntid; END; $$; ALTER FUNCTION public.resolvecosaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) OWNER TO admin; -- -- Name: resolvecowaccount(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resolvecowaccount(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resolveCOWAccount($1, $2, -1, -1); END; $_$; ALTER FUNCTION public.resolvecowaccount(integer, integer) OWNER TO admin; -- -- Name: resolvecowaccount(integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resolvecowaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _salesaccntid INTEGER; _accntid INTEGER; BEGIN SELECT findSalesAccnt(pItemsiteid, 'IS', pCustid, pSaletypeid, pShipzoneid) INTO _salesaccntid; IF (_salesaccntid = -1) THEN SELECT getUnassignedAccntId() INTO _accntid; ELSE SELECT salesaccnt_cow_accnt_id INTO _accntid FROM salesaccnt WHERE (salesaccnt_id=_salesaccntid); END IF; RETURN _accntid; END; $$; ALTER FUNCTION public.resolvecowaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) OWNER TO admin; -- -- Name: resolvecreditaccount(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resolvecreditaccount(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resolveCreditAccount($1, $2, -1, -1); END; $_$; ALTER FUNCTION public.resolvecreditaccount(integer, integer) OWNER TO admin; -- -- Name: resolvecreditaccount(integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resolvecreditaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _salesaccntid INTEGER; _accntid INTEGER; BEGIN SELECT findSalesAccnt(pItemsiteid, 'IS', pCustid, pSaletypeid, pShipzoneid) INTO _salesaccntid; IF (_salesaccntid = -1) THEN SELECT getUnassignedAccntId() INTO _accntid; ELSE SELECT salesaccnt_credit_accnt_id INTO _accntid FROM salesaccnt WHERE (salesaccnt_id=_salesaccntid); END IF; RETURN _accntid; END; $$; ALTER FUNCTION public.resolvecreditaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) OWNER TO admin; -- -- Name: resolvesalesaccount(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resolvesalesaccount(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resolveSalesAccount($1, $2, -1, -1); END; $_$; ALTER FUNCTION public.resolvesalesaccount(integer, integer) OWNER TO admin; -- -- Name: resolvesalesaccount(integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION resolvesalesaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _salesaccntid INTEGER; _accntid INTEGER; BEGIN SELECT findSalesAccnt(pItemsiteid, 'IS', pCustid, pSaletypeid, pShipzoneid) INTO _salesaccntid; IF (_salesaccntid = -1) THEN SELECT getUnassignedAccntId() INTO _accntid; ELSE SELECT salesaccnt_sales_accnt_id INTO _accntid FROM salesaccnt WHERE (salesaccnt_id=_salesaccntid); END IF; RETURN _accntid; END; $$; ALTER FUNCTION public.resolvesalesaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) OWNER TO admin; -- -- Name: restoresaleshistory(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION restoresaleshistory(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAsohistid ALIAS FOR $1; BEGIN INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipdate, cohist_invcdate, cohist_duedate, cohist_promisedate, cohist_ordernumber, cohist_invcnumber, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_shipto_id, cohist_shipvia, cohist_salesrep_id, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_commission, cohist_commissionpaid, cohist_doctype, cohist_orderdate, cohist_imported, cohist_ponumber, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id ) SELECT asohist_id, CASE asohist_cust_id WHEN -1 THEN NULL ELSE asohist_cust_id END, asohist_itemsite_id, asohist_shipdate, asohist_invcdate, asohist_duedate, asohist_promisedate, asohist_ordernumber, asohist_invcnumber, asohist_qtyshipped, asohist_unitprice, asohist_unitcost, asohist_billtoname, asohist_billtoaddress1, asohist_billtoaddress2, asohist_billtoaddress3, asohist_billtocity, asohist_billtostate, asohist_billtozip, asohist_shiptoname, asohist_shiptoaddress1, asohist_shiptoaddress2, asohist_shiptoaddress3, asohist_shiptocity, asohist_shiptostate, asohist_shiptozip, asohist_shipto_id, asohist_shipvia, CASE asohist_salesrep_id WHEN -1 THEN NULL ELSE asohist_salesrep_id END, asohist_misc_type, asohist_misc_descrip, asohist_misc_id, asohist_commission, asohist_commissionpaid, asohist_doctype, asohist_orderdate, asohist_imported, asohist_ponumber, asohist_curr_id, asohist_taxtype_id, asohist_taxzone_id FROM asohist WHERE (asohist_id=pAsohistid); INSERT INTO cohisttax ( taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM asohisttax WHERE (taxhist_parent_id=pAsohistid); DELETE FROM asohisttax WHERE (taxhist_parent_id=pAsohistid); DELETE FROM asohist WHERE (asohist_id=pAsohistid); RETURN pAsohistid; END; $_$; ALTER FUNCTION public.restoresaleshistory(integer) OWNER TO admin; -- -- Name: returncompleteshipment(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returncompleteshipment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnCompleteShipment($1, 0, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.returncompleteshipment(integer) OWNER TO admin; -- -- Name: returncompleteshipment(integer, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returncompleteshipment(integer, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pshipheadid ALIAS FOR $1; _itemlocSeries INTEGER := $2; _timestamp TIMESTAMP WITH TIME ZONE := $3; _r RECORD; _result RECORD; _shiphead_number TEXT := ''; _count INTEGER := 0; _countsum INTEGER := 0; BEGIN FOR _r IN SELECT shipitem_id FROM shipitem, shiphead WHERE ( (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) AND (shiphead_id=pshipheadid) ) LOOP _itemlocSeries := returnShipmentTransaction(_r.shipitem_id, _itemlocSeries, _timestamp); END LOOP; FOR _result IN SELECT shiphead_number FROM shiphead WHERE ( (shiphead_id=pshipheadid) ) LOOP _shiphead_number := _result.shiphead_number; END LOOP; SELECT COUNT(*) INTO _count FROM shipdata WHERE(shipdata_shiphead_number=_shiphead_number); SELECT COUNT(*) INTO _countsum FROM shipdatasum WHERE(shipdatasum_shiphead_number=_shiphead_number); IF (_count > 0) THEN DELETE FROM shipdata WHERE(shipdata_shiphead_number=_shiphead_number); END IF; IF (_countsum > 0) THEN DELETE FROM shipdatasum WHERE(shipdatasum_shiphead_number=_shiphead_number); END IF; DELETE FROM pack WHERE(pack_shiphead_id=pshipheadid); DELETE FROM shiphead WHERE (shiphead_id=pshipheadid); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.returncompleteshipment(integer, integer, timestamp with time zone) OWNER TO admin; -- -- Name: returnitemshipments(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnitemshipments(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnItemShipments('SO', $1, $2, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.returnitemshipments(integer, integer) OWNER TO admin; -- -- Name: returnitemshipments(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnitemshipments(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnItemShipments('SO', $1, 0, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.returnitemshipments(integer) OWNER TO admin; -- -- Name: returnitemshipments(text, integer, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnitemshipments(text, integer, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; pitemid ALIAS FOR $2; _itemlocSeries INTEGER := $3; _timestamp TIMESTAMP WITH TIME ZONE := $4; _invhistid INTEGER; _r RECORD; BEGIN IF (COALESCE(_itemlocSeries,0) = 0 ) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; FOR _r IN SELECT shipitem_id FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) WHERE ((NOT shiphead_shipped) AND (shiphead_order_type=pordertype) AND (shipitem_orderitem_id=pitemid)) LOOP SELECT returnShipmentTransaction(_r.shipitem_id, _itemlocSeries, _timestamp) INTO _itemlocSeries; IF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; END LOOP; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.returnitemshipments(text, integer, integer, timestamp with time zone) OWNER TO admin; -- -- Name: returnshipmenttransaction(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnshipmenttransaction(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnShipmentTransaction($1, 0, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.returnshipmenttransaction(integer) OWNER TO admin; -- -- Name: returnshipmenttransaction(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnshipmenttransaction(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnShipmentTransaction($1, $2, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.returnshipmenttransaction(integer, integer) OWNER TO admin; -- -- Name: returnshipmenttransaction(integer, integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnshipmenttransaction(integer, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipitemId ALIAS FOR $1; pItemlocSeries ALIAS FOR $2; pTimestamp ALIAS FOR $3; _itemlocSeries INTEGER; _invhistid INTEGER; _itemlocrsrvid INTEGER; _coheadid INTEGER; _rows INTEGER; _r RECORD; _rsrv RECORD; BEGIN IF (COALESCE(pItemlocSeries, 0) = 0 ) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); ELSE _itemlocSeries := pItemlocSeries; END IF; -- Find the shipment transaction record SELECT shipitem.*, shiphead_id, shiphead_number, shiphead_order_type, invhist_series, itemsite_loccntrl, itemsite_costmethod, itemsite_controlmethod, cohead_prj_id AS prj_id INTO _r FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) JOIN invhist ON (invhist_id=shipitem_invhist_id) JOIN itemsite ON (itemsite_id=invhist_itemsite_id) LEFT OUTER JOIN cohead ON ((shiphead_order_type = 'SO') AND (shiphead_order_id = cohead_id)) WHERE ((NOT shiphead_shipped) AND (shipitem_id=pShipitemId)); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0 ) THEN -- Was it a non-controlled sales order item? SELECT shipitem.*, shiphead_id, shiphead_number, shiphead_order_type, itemsite_loccntrl, itemsite_costmethod, itemsite_controlmethod, cohead_prj_id AS prj_id INTO _r FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) JOIN coitem ON (shipitem_orderitem_id=coitem_id) JOIN cohead ON (cohead_id=coitem_cohead_id) JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE ((NOT shiphead_shipped) AND (shipitem_id=pShipitemId) AND (shiphead_order_type = 'SO')); END IF; GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0 AND fetchmetricbool('MultiWhs') ) THEN -- Was it a non-controlled transfer order item? SELECT shipitem.*, shiphead_id, shiphead_number, shiphead_order_type, itemsite_loccntrl, itemsite_costmethod, itemsite_controlmethod, NULL AS prj_id INTO _r FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) JOIN toitem ON (shipitem_orderitem_id=toitem_id) JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE ((NOT shiphead_shipped) AND (shipitem_id=pShipitemId) AND (shiphead_order_type = 'TO')); END IF; IF (_rows > 0 ) THEN IF (_r.shiphead_order_type = 'SO') THEN -- Handle inventory transaction IF (_r.itemsite_controlmethod != 'N' OR _r.itemsite_costmethod = 'J') THEN SELECT postInvTrans( itemsite_id, 'RS', (_r.shipitem_qty * coitem_qty_invuomratio), 'S/R', _r.shiphead_order_type, formatSoNumber(_r.shipitem_orderitem_id), shiphead_number, 'Return from Shipping', costcat_asset_accnt_id, getPrjAccntId(_r.prj_id, costcat_shipasset_accnt_id), _itemlocSeries, pTimestamp, _r.shipitem_value, _r.shipitem_invhist_id ) INTO _invhistid FROM coitem, itemsite, costcat, shiphead, shipitem WHERE ((coitem_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (coitem_id=_r.shipitem_orderitem_id) AND (shiphead_order_type=_r.shiphead_order_type) AND (shiphead_id=shipitem_shiphead_id) AND (shipitem_orderitem_id=_r.shipitem_orderitem_id)); -- We know the distribution so post this through so the any w/o activity knows about it PERFORM postItemlocseries(_itemlocSeries); END IF; IF (_r.itemsite_costmethod = 'J') THEN -- Reopen the work order UPDATE wo SET wo_status = 'I' WHERE ((wo_ordtype='S') AND (wo_ordid=_r.shipitem_orderitem_id)); -- Job cost, so correct Production Posting referencing original receipt for reverse info. PERFORM correctProduction(wo_id, invhist_invqty, false, _itemlocSeries, pTimestamp, invhist_id) FROM wo, invhist WHERE ((wo_ordtype = 'S') AND (wo_ordid = _r.shipitem_orderitem_id) AND (invhist_series=_r.invhist_series) AND (invhist_transtype='RM')); -- Return eligble material PERFORM returnWoMaterial(womatlpost_womatl_id, _itemlocSeries, pTimestamp, womatlpost_invhist_id) FROM womatlpost, invhist m, invhist s WHERE ((womatlpost_invhist_id=m.invhist_id) AND (m.invhist_series=s.invhist_series) AND (m.invhist_transtype='IM') AND (s.invhist_id=_r.shipitem_invhist_id)); END IF; -- end Job Costing ELSIF (_r.shiphead_order_type = 'TO') THEN SELECT postInvTrans(itemsite_id, 'RS', _r.shipitem_qty, 'S/R', _r.shiphead_order_type, formatToNumber(toitem_id), tohead_number, 'Return from Shipping', costcat_asset_accnt_id, costcat_shipasset_accnt_id, _itemlocSeries, pTimestamp, _r.shipitem_value, _r.shipitem_invhist_id ) INTO _invhistid FROM toitem, tohead, itemsite, costcat WHERE ((toitem_item_id=itemsite_item_id) AND (toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (itemsite_costcat_id=costcat_id) AND (toitem_id=_r.shipitem_orderitem_id)); ELSE -- Don't know what kind of order this is RETURN -11; END IF; UPDATE shiphead SET shiphead_sfstatus='D' WHERE ((shiphead_id=_r.shiphead_id) AND (shiphead_sfstatus='P')); -- Handle reservation if applicable IF (fetchmetricbool('EnableSOReservations')) THEN UPDATE coitem SET coitem_qtyreserved = (coitem_qtyreserved + shipitemrsrv_qty) FROM shipitemrsrv WHERE ((coitem_id=_r.shipitem_orderitem_id) AND (shipitemrsrv_shipitem_id=_r.shipitem_id)); -- Handle location reservations if applicable FOR _rsrv IN SELECT * FROM shipitemlocrsrv WHERE (shipitemlocrsrv_shipitem_id=_r.shipitem_id) LOOP -- See if a reservation record still exists SELECT itemlocrsrv_id, itemlocrsrv_qty INTO _itemlocrsrvid FROM itemlocrsrv JOIN itemloc ON (itemlocrsrv_itemloc_id=itemloc_id) WHERE ((itemlocrsrv_source = 'SO') AND (itemlocrsrv_source_id = _r.shipitem_orderitem_id ) AND (itemloc_itemsite_id=_rsrv.shipitemlocrsrv_itemsite_id) AND (itemloc_location_id=_rsrv.shipitemlocrsrv_location_id) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(_rsrv.shipitemlocrsrv_ls_id, -1)) AND (COALESCE(itemloc_expiration, endOfTime())=COALESCE(_rsrv.shipitemlocrsrv_expiration, endOfTime())) AND (COALESCE(itemloc_warrpurc, endoftime())=COALESCE(_rsrv.shipitemlocrsrv_warrpurc, endoftime())) ); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows > 0 ) THEN -- Update existing UPDATE itemlocrsrv SET itemlocrsrv_qty = (itemlocrsrv_qty + _rsrv.shipitemlocrsrv_qty) WHERE (itemlocrsrv_id=_itemlocrsvrid); ELSE -- Recreate record INSERT INTO itemlocrsrv SELECT nextval('itemlocrsrv_itemlocrsrv_id_seq'), 'SO', _r.shipitem_orderitem_id, itemloc_id, _rsrv.shipitemlocrsrv_qty FROM itemloc WHERE ((itemloc_itemsite_id=_rsrv.shipitemlocrsrv_itemsite_id) AND (itemloc_location_id=_rsrv.shipitemlocrsrv_location_id) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(_rsrv.shipitemlocrsrv_ls_id, -1)) AND (COALESCE(itemloc_expiration, endOfTime())=COALESCE(_rsrv.shipitemlocrsrv_expiration, endOfTime())) AND (COALESCE(itemloc_warrpurc, endoftime())=COALESCE(_rsrv.shipitemlocrsrv_warrpurc, endoftime())) ); END IF; END LOOP; END IF; DELETE FROM shipitem WHERE (shipitem_id = _r.shipitem_id ); -- Clean up if this is the last shipitem on the shipment IF (NOT EXISTS(SELECT shipitem_shiphead_id FROM shipitem WHERE (shipitem_shiphead_id=_r.shiphead_id))) THEN DELETE FROM shipdata WHERE(shipdata_shiphead_number=_r.shiphead_number); DELETE FROM shipdatasum WHERE(shipdatasum_shiphead_number=_r.shiphead_number); DELETE FROM pack WHERE(pack_shiphead_id=_r.shiphead_id); DELETE FROM shiphead WHERE (shiphead_id=_r.shiphead_id); END IF; END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.returnshipmenttransaction(integer, integer, timestamp with time zone) OWNER TO admin; -- -- Name: returnwomaterial(integer, numeric, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnwomaterial(integer, numeric, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pGlDistTS ALIAS FOR $3; _itemlocSeries INTEGER; BEGIN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; RETURN returnWoMaterial(pWomatlid, pQty, _itemlocSeries, pGlDistTS); END; $_$; ALTER FUNCTION public.returnwomaterial(integer, numeric, timestamp with time zone) OWNER TO admin; -- -- Name: returnwomaterial(integer, integer, timestamp with time zone, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnwomaterial(integer, integer, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pItemlocSeries ALIAS FOR $2; pGlDistTS ALIAS FOR $3; pInvhistId ALIAS FOR $4; _woNumber TEXT; _invhistid INTEGER; _itemlocSeries INTEGER; _invqty NUMERIC; _womatlqty NUMERIC; _cost NUMERIC := 0; _rows INTEGER; BEGIN _itemlocSeries := 0; SELECT invhist_invqty, invhist_invqty * invhist_unitcost INTO _invqty, _cost FROM invhist WHERE (invhist_id=pInvhistId); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0) THEN RAISE EXCEPTION 'No transaction found for invhist_id %', pInvhistId; END IF; SELECT itemuomtouom(itemsite_item_id, NULL, womatl_uom_id, _invqty) INTO _womatlqty FROM womatl, itemsite WHERE((womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid)); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0) THEN _womatlqty := _invqty; END IF; IF ( SELECT ( CASE WHEN (womatl_qtyreq >= 0) THEN womatl_qtyiss < _womatlqty ELSE womatl_qtyiss > _womatlqty END ) FROM womatl WHERE ( womatl_id=pWomatlid ) ) THEN RETURN pItemlocSeries; END IF; SELECT formatWoNumber(womatl_wo_id) INTO _woNumber FROM womatl WHERE (womatl_id=pWomatlid); IF (pItemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; ELSE _itemlocSeries = pItemlocSeries; END IF; -- Post the transaction SELECT postInvTrans( ci.itemsite_id, 'IM', (_invqty * -1), 'W/O', 'WO', _woNumber, '', ('Return ' || item_number || ' from Work Order'), getPrjAccntId(wo_prj_id, pc.costcat_wip_accnt_id), cc.costcat_asset_accnt_id, _itemlocSeries, pGlDistTS, -- Cost will be ignored by Standard Cost items sites _cost, pInvhistId) INTO _invhistid FROM womatl, wo, itemsite AS ci, costcat AS cc, itemsite AS pi, costcat AS pc, item WHERE((womatl_itemsite_id=ci.itemsite_id) AND (ci.itemsite_costcat_id=cc.costcat_id) AND (womatl_wo_id=wo_id) AND (wo_itemsite_id=pi.itemsite_id) AND (pi.itemsite_costcat_id=pc.costcat_id) AND (ci.itemsite_item_id=item_id) AND (womatl_id=pWomatlid) ); -- Create linkage to the transaction created INSERT INTO womatlpost (womatlpost_womatl_id,womatlpost_invhist_id) VALUES (pWomatlid,_invhistid); -- Decrease the parent W/O's WIP value by the value of the returned components UPDATE wo SET wo_wipvalue = (wo_wipvalue - (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _cost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _invqty ELSE 0.0 END )), wo_postedvalue = (wo_postedvalue - (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _cost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _invqty ELSE 0.0 END )) FROM womatl, itemsite WHERE ( (wo_id=womatl_wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid) ); UPDATE womatl SET womatl_qtyiss = (womatl_qtyiss - _womatlqty), womatl_lastreturn = CURRENT_DATE WHERE (womatl_id=pWomatlid); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.returnwomaterial(integer, integer, timestamp with time zone, integer) OWNER TO admin; -- -- Name: FUNCTION returnwomaterial(integer, integer, timestamp with time zone, integer); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION returnwomaterial(integer, integer, timestamp with time zone, integer) IS 'Returns material by reversing a specific historical transaction'; -- -- Name: returnwomaterial(integer, numeric, integer, timestamp with time zone, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnwomaterial(integer, numeric, integer, timestamp with time zone, boolean DEFAULT false) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; pGlDistTS ALIAS FOR $4; pReqStdCost ALIAS FOR $5; _woNumber TEXT; _invhistid INTEGER; _itemlocSeries INTEGER; _qty NUMERIC; _cost NUMERIC := 0; BEGIN _itemlocSeries := 0; IF ( SELECT ( CASE WHEN (womatl_qtyreq >= 0) THEN womatl_qtyiss < pQty ELSE womatl_qtyiss > pQty END ) FROM womatl WHERE ( womatl_id=pWomatlid ) ) THEN RETURN pItemlocSeries; END IF; SELECT itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, pQty) INTO _qty FROM womatl, itemsite WHERE((womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid)); IF (NOT FOUND) THEN _qty := pQty; END IF; SELECT formatWoNumber(womatl_wo_id) INTO _woNumber FROM womatl WHERE (womatl_id=pWomatlid); IF (pItemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; ELSE _itemlocSeries = pItemlocSeries; END IF; -- Get the cost average IF (pReqStdCost) THEN SELECT stdcost(itemsite_item_id) * _qty INTO _cost FROM womatl, itemsite WHERE((womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid)); ELSE SELECT SUM(invhist_value_before - invhist_value_after) / SUM(invhist_qoh_before - invhist_qoh_after) * _qty INTO _cost FROM invhist, womatlpost, womatl WHERE((womatlpost_womatl_id=womatl_id) AND (womatlpost_invhist_id=invhist_id) AND (invhist_qoh_before > invhist_qoh_after) AND (womatl_id=pWomatlId)); END IF; _cost := COALESCE(_cost, 0); -- make sure it's not a null value -- Post the transaction SELECT postInvTrans( ci.itemsite_id, 'IM', (_qty * -1), 'W/O', 'WO', _woNumber, '', ('Return ' || item_number || ' from Work Order'), getPrjAccntId(wo_prj_id, pc.costcat_wip_accnt_id), cc.costcat_asset_accnt_id, _itemlocSeries, pGlDistTS, -- Cost will be ignored by Standard Cost items sites _cost) INTO _invhistid FROM womatl, wo, itemsite AS ci, costcat AS cc, itemsite AS pi, costcat AS pc, item WHERE((womatl_itemsite_id=ci.itemsite_id) AND (ci.itemsite_costcat_id=cc.costcat_id) AND (womatl_wo_id=wo_id) AND (wo_itemsite_id=pi.itemsite_id) AND (pi.itemsite_costcat_id=pc.costcat_id) AND (ci.itemsite_item_id=item_id) AND (womatl_id=pWomatlid) ); -- Create linkage to the transaction created IF (_invhistid != -1) THEN INSERT INTO womatlpost (womatlpost_womatl_id,womatlpost_invhist_id) VALUES (pWomatlid,_invhistid); END IF; -- Decrease the parent W/O's WIP value by the value of the returned components UPDATE wo SET wo_wipvalue = (wo_wipvalue - (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _cost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _qty ELSE 0.0 END )), wo_postedvalue = (wo_postedvalue - (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _cost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _qty ELSE 0.0 END )) FROM womatl, itemsite WHERE ( (wo_id=womatl_wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid) ); UPDATE womatl SET womatl_qtyiss = (womatl_qtyiss - pQty), womatl_lastreturn = CURRENT_DATE WHERE (womatl_id=pWomatlid); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.returnwomaterial(integer, numeric, integer, timestamp with time zone, boolean) OWNER TO admin; -- -- Name: returnwomaterialbatch(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION returnwomaterialbatch(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; _itemlocSeries INTEGER; _woid INTEGER; _r RECORD; BEGIN SELECT wo_id INTO _woid FROM wo WHERE ( (wo_status IN ('E','I')) AND (wo_id=pWoid) ); IF (FOUND) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; FOR _r IN SELECT womatl_id, CASE WHEN wo_qtyord >= 0 THEN womatl_qtyiss ELSE ((womatl_qtyreq - womatl_qtyiss) * -1) END AS qty FROM wo, womatl, itemsite WHERE ((wo_id=womatl_wo_id) AND (womatl_itemsite_id=itemsite_id) AND ( (wo_qtyord < 0) OR (womatl_issuemethod IN ('S','M')) ) AND (womatl_wo_id=pWoid)) LOOP IF (_r.qty != 0) THEN PERFORM returnWoMaterial(_r.womatl_id, _r.qty, _itemlocSeries, now()); END IF; END LOOP; -- Reset the W/O Status to E UPDATE wo SET wo_status='E' WHERE (wo_id=pWoid); RETURN _itemlocSeries; ELSE RETURN -1; END IF; END; $_$; ALTER FUNCTION public.returnwomaterialbatch(integer) OWNER TO admin; -- -- Name: reversecashreceipt(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION reversecashreceipt(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _p RECORD; _r RECORD; _postToAR NUMERIC; _postToMisc NUMERIC; _posted_base NUMERIC := 0; _posted NUMERIC := 0; _sequence INTEGER; _aropenid INTEGER; _arMemoNumber TEXT; _arAccntid INTEGER; _closed BOOLEAN; _debitAccntid INTEGER; _exchGain NUMERIC; _comment TEXT; BEGIN _posted := 0; _posted_base := 0; SELECT fetchGLSequence() INTO _sequence; SELECT accnt_id INTO _arAccntid FROM cashrcpt, accnt, salescat WHERE ((cashrcpt_salescat_id=salescat_id) AND (salescat_ar_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid)); IF (NOT FOUND) THEN SELECT accnt_id INTO _arAccntid FROM cashrcpt, accnt WHERE ( (findARAccount(cashrcpt_cust_id)=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -5; END IF; END IF; SELECT cashrcpt_cust_id, ('Reverse Cash Receipt posting for ' || cust_number||'-'||cust_name) AS custnote, cashrcpt_fundstype, cashrcpt_number, cashrcpt_docnumber, cashrcpt_distdate, cashrcpt_amount, cashrcpt_discount, (cashrcpt_amount / cashrcpt_curr_rate) AS cashrcpt_amount_base, (cashrcpt_discount / cashrcpt_curr_rate) AS cashrcpt_discount_base, cashrcpt_notes, cashrcpt_bankaccnt_id AS bankaccnt_id, accnt_id AS prepaid_accnt_id, cashrcpt_usecustdeposit, cashrcpt_curr_id, cashrcpt_curr_rate INTO _p FROM accnt, cashrcpt LEFT OUTER JOIN custinfo ON (cashrcpt_cust_id=cust_id) WHERE ( (findPrepaidAccount(cashrcpt_cust_id)=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -7; END IF; IF (_p.cashrcpt_fundstype IN ('A', 'D', 'M', 'V')) THEN IF NOT EXISTS(SELECT ccpay_id FROM ccpay WHERE ((ccpay_order_number=CAST(pCashrcptid AS TEXT)) AND (ccpay_status IN ('C', 'A')))) THEN RETURN -8; END IF; _debitAccntid := findPrepaidAccount(_p.cashrcpt_cust_id); ELSE SELECT accnt_id INTO _debitAccntid FROM cashrcpt, bankaccnt, accnt WHERE ( (cashrcpt_bankaccnt_id=bankaccnt_id) AND (bankaccnt_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -6; END IF; END IF; -- Determine the amount to post to A/R Open Items SELECT COALESCE(SUM(cashrcptitem_amount),0) INTO _postToAR FROM cashrcptitem JOIN aropen ON (aropen_id=cashrcptitem_aropen_id) WHERE ((cashrcptitem_cashrcpt_id=pCashrcptid) AND (cashrcptitem_applied)); IF (NOT FOUND) THEN _postToAR := 0; END IF; -- Determine the amount to post to Misc. Distributions SELECT COALESCE(SUM(cashrcptmisc_amount),0) INTO _postToMisc FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid); IF (NOT FOUND) THEN _postToMisc := 0; END IF; -- Check to see if the C/R is over applied IF ((_postToAR + _postToMisc) > _p.cashrcpt_amount) THEN RETURN -1; END IF; -- Check to see if the C/R is positive amount IF (_p.cashrcpt_amount <= 0) THEN RETURN -2; END IF; -- Distribute A/R Applications FOR _r IN SELECT aropen_id, aropen_doctype, aropen_docnumber, aropen_docdate, aropen_duedate, aropen_curr_id, aropen_curr_rate, round(aropen_amount - aropen_paid, 2) <= round(aropen_paid + currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_amount + cashrcptitem_discount),_p.cashrcpt_distdate),2) AS closed, cashrcptitem_id, cashrcptitem_amount, cashrcptitem_discount, (cashrcptitem_amount / _p.cashrcpt_curr_rate) AS cashrcptitem_amount_base, (cashrcptitem_discount / _p.cashrcpt_curr_rate) AS cashrcptitem_discount_base, round(aropen_paid - currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_amount),_p.cashrcpt_distdate),2) AS new_paid, round(currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_discount),_p.cashrcpt_distdate),2) AS new_discount FROM cashrcptitem JOIN aropen ON (cashrcptitem_aropen_id=aropen_id) WHERE ((cashrcptitem_cashrcpt_id=pCashrcptid) AND (cashrcptitem_applied)) LOOP -- Handle discount IF (_r.cashrcptitem_discount_base > 0) THEN PERFORM reverseCashReceiptDisc(_r.cashrcptitem_id, pJournalNumber); END IF; -- Update the aropen item to post the paid amount UPDATE aropen SET aropen_paid = _r.new_paid - _r.new_discount, aropen_open = TRUE, aropen_closedate = NULL WHERE (aropen_id=_r.aropen_id); -- Cache the running amount posted _posted_base := _posted_base + _r.cashrcptitem_amount_base; _posted := _posted + _r.cashrcptitem_amount; -- Record the cashrcpt application IF (_r.aropen_doctype IN ('I','D')) THEN INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_reftype, arapply_ref_id, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id ) VALUES ( _p.cashrcpt_cust_id, -1, 'K', _p.cashrcpt_number, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, _p.cashrcpt_fundstype, _p.cashrcpt_docnumber, 'CRA', _r.cashrcptitem_id, (round(_r.cashrcptitem_amount, 2) * -1.0), _r.closed, CURRENT_DATE, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id ); ELSE INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_reftype, arapply_ref_id, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id ) VALUES ( _p.cashrcpt_cust_id, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, -1, 'R', _p.cashrcpt_number, '', '', 'CRA', _r.cashrcptitem_id, (round(abs(_r.cashrcptitem_amount), 2) * -1.0), _r.closed, CURRENT_DATE, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id ); END IF; _exchGain := arCurrGain(_r.aropen_id,_p.cashrcpt_curr_id, abs(_r.cashrcptitem_amount), _p.cashrcpt_distdate); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', (_r.aropen_doctype || '-' || _r.aropen_docnumber), CASE WHEN _r.aropen_doctype != 'R' THEN _arAccntid ELSE findDeferredAccount(_p.cashrcpt_cust_id) END, (round(_r.cashrcptitem_amount_base + _exchGain, 2) * -1.0), _p.cashrcpt_distdate, _p.custnote ); IF (_exchGain <> 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/R', 'CR', _r.aropen_doctype || '-' || _r.aropen_docnumber, getGainLossAccntId( CASE WHEN _r.aropen_doctype != 'R' THEN _arAccntid ELSE findDeferredAccount(_p.cashrcpt_cust_id) END ), round(_exchGain, 2), _p.cashrcpt_distdate, _p.custnote); END IF; END LOOP; -- Distribute Misc. Applications FOR _r IN SELECT cashrcptmisc_id, cashrcptmisc_accnt_id, cashrcptmisc_amount, (cashrcptmisc_amount / _p.cashrcpt_curr_rate) AS cashrcptmisc_amount_base, cashrcptmisc_notes FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid) LOOP -- Cache the running amount posted _posted_base := (_posted_base + _r.cashrcptmisc_amount_base); _posted := (_posted + _r.cashrcptmisc_amount); -- Record the cashrcpt application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id, arapply_reftype, arapply_ref_id ) VALUES ( _p.cashrcpt_cust_id, -1, 'K', '', -1, 'Misc.', '', _p.cashrcpt_fundstype, _p.cashrcpt_docnumber, (round(_r.cashrcptmisc_amount, 2) * -1.0), TRUE, CURRENT_DATE, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id, 'CRD', _r.cashrcptmisc_id ); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', _r.cashrcptmisc_notes, _r.cashrcptmisc_accnt_id, (round(_r.cashrcptmisc_amount_base, 2) * -1.0), _p.cashrcpt_distdate, _p.custnote ); END LOOP; -- Post any remaining Cash to an A/R Debit Memo -- this credit memo may absorb an occasional currency exchange rounding error IF (round(_posted_base, 2) < round(_p.cashrcpt_amount_base, 2)) THEN _comment := ('Unapplied from ' || _p.cashrcpt_fundstype || '-' || _p.cashrcpt_docnumber); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', _comment, _p.prepaid_accnt_id, ((round(_p.cashrcpt_amount_base, 2) - round(_posted_base, 2)) * -1.0), _p.cashrcpt_distdate, _p.custnote ); SELECT fetchArMemoNumber() INTO _arMemoNumber; -- Post A/R Debit Memo SELECT createARDebitMemo(NULL, _p.cashrcpt_cust_id, pJournalNumber, _arMemoNumber, '', _p.cashrcpt_distdate, (_p.cashrcpt_amount - _posted), _comment, -1, -1, -1, _p.cashrcpt_distdate, -1, NULL, 0, _p.cashrcpt_curr_id) INTO _aropenid; -- Create Cash Receipt Item to capture posting INSERT INTO cashrcptitem ( cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount ) VALUES ( pCashrcptid, _aropenid, ((_p.cashrcpt_amount - _posted) * 1.0) ); ELSIF (round(_posted_base, 2) > round(_p.cashrcpt_amount_base, 2)) THEN PERFORM insertIntoGLSeries(_sequence, 'A/R', 'CR', 'Currency Exchange Rounding - ' || _p.cashrcpt_docnumber, getGainLossAccntId(_debitAccntid), ((round(_posted_base, 2) - round((_p.cashrcpt_amount_base + _p.cashrcpt_discount_base), 2)) * 1.0), _p.cashrcpt_distdate, _p.custnote); END IF; -- Debit Cash PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', (_p.cashrcpt_fundstype || '-' || _p.cashrcpt_docnumber), _debitAccntid, round(_p.cashrcpt_amount_base, 2), _p.cashrcpt_distdate, _p.custnote ); PERFORM postGLSeries(_sequence, pJournalNumber); -- Update and void the posted cashrcpt UPDATE cashrcpt SET cashrcpt_posted=FALSE, cashrcpt_posteddate=NULL, cashrcpt_postedby=NULL, cashrcpt_void=TRUE WHERE (cashrcpt_id=pCashrcptid); RETURN 1; END; $_$; ALTER FUNCTION public.reversecashreceipt(integer, integer) OWNER TO admin; -- -- Name: reversecashreceiptdisc(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION reversecashreceiptdisc(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptItemId ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _r RECORD; _t RECORD; _v RECORD; _ardiscountid INTEGER; _arMemoNumber TEXT; _arAccntid INTEGER; _discountAccntid INTEGER; _comment TEXT; _discprcnt NUMERIC; _check INTEGER; BEGIN -- Fetch base records for processing SELECT aropen_id, aropen_doctype, aropen_amount, cashrcptitem_discount, cashrcpt_cust_id, cashrcpt_distdate, cashrcpt_applydate, cashrcpt_curr_id, cashrcpt_fundstype, cashrcpt_docnumber, round(currToCurr(cashrcpt_curr_id, aropen_curr_id, cashrcptitem_discount, cashrcpt_distdate),2) AS aropen_discount INTO _r FROM cashrcptitem JOIN cashrcpt ON (cashrcptitem_cashrcpt_id=cashrcpt_id) JOIN aropen ON ( (aropen_id=cashrcptitem_aropen_id) AND (aropen_doctype IN ('I', 'D')) ) WHERE (cashrcptitem_id=pCashrcptItemId); -- Get discount account _discountAccntid := findardiscountaccount(_r.cashrcpt_cust_id); IF (_r.cashrcptitem_discount > 0) THEN -- Determine discount percentage _discprcnt := _r.aropen_discount / _r.aropen_amount; SELECT fetchArMemoNumber() INTO _arMemoNumber; _comment := 'Discount Credit Reversal from ' || _r.cashrcpt_fundstype || '-' || _r.cashrcpt_docnumber; -- Create misc debit memo record _ardiscountid := nextval('aropen_aropen_id_seq'); INSERT INTO aropen ( aropen_id, aropen_docdate, aropen_duedate, aropen_doctype, aropen_docnumber, aropen_curr_id, aropen_posted, aropen_amount ) VALUES ( _ardiscountid, _r.cashrcpt_distdate, _r.cashrcpt_distdate, 'D', _arMemoNumber, _r.cashrcpt_curr_id, false,_r.cashrcptitem_discount); IF (fetchMetricBool('CreditTaxDiscount')) THEN -- proportional tax credits calculated and implemented for the debit memo generated by the discount IF (_r.aropen_doctype = 'I') THEN -- Tax for invoices SELECT aropen_cobmisc_id AS invcheadid, invchead_curr_id, invchead_invcdate INTO _t FROM aropen LEFT OUTER JOIN invchead ON (aropen_cobmisc_id = invchead_id) LEFT OUTER JOIN invcitem ON (invchead_id = invcitem_invchead_id) WHERE aropen_id = _r.aropen_id; FOR _v IN SELECT tax_sales_accnt_id, tax_id, round(sum(taxdetail_tax), 2) AS tax, currToBase(_t.invchead_curr_id, round(sum(taxdetail_tax), 2), _t.invchead_invcdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('I', _t.invcheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP INSERT INTO aropentax( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_basis) VALUES ( _ardiscountid, getadjustmenttaxtypeid(), _v.tax_id, 0.00, 0.00, (round((_v.tax * _discprcnt), 2)), _r.cashrcpt_distdate, 0.00); END LOOP; ELSIF (_r.aropen_doctype = 'D') THEN -- Tax for debit memos INSERT INTO aropentax( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_basis) SELECT _ardiscountid, taxhist_taxtype_id, taxhist_tax_id, 0.00, 0.00, (round((taxhist_tax * _discprcnt), 2)), _r.cashrcpt_distdate, 0.00 FROM aropentax WHERE (taxhist_parent_id=_r.aropen_id); END IF; END IF; -- End taxes -- Create debit memo for discount SELECT createARDebitMemo(_ardiscountid, _r.cashrcpt_cust_id, pJournalNumber, _arMemoNumber, '', _r.cashrcpt_distdate, _r.cashrcptitem_discount, _comment, -1, -1, _discountAccntid, _r.cashrcpt_distdate, -1, NULL, 0, _r.cashrcpt_curr_id) INTO _ardiscountid; END IF; -- End handle Discount RETURN 1; END; $_$; ALTER FUNCTION public.reversecashreceiptdisc(integer, integer) OWNER TO admin; -- -- Name: reverseglseries(integer, date, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION reverseglseries(integer, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pDistDate ALIAS FOR $2; pNotes ALIAS FOR $3; _sequence INTEGER := fetchGLSequence(); _journal INTEGER; BEGIN IF (SELECT COUNT(gltrans_sequence) > 0 FROM gltrans WHERE gltrans_sequence = pSequence) THEN SELECT fetchJournalNumber(jrnluse_use) INTO _journal FROM gltrans JOIN jrnluse ON (gltrans_journalnumber=jrnluse_number) WHERE (gltrans_sequence=pSequence) LIMIT 1; INSERT INTO gltrans (gltrans_created, gltrans_posted, gltrans_exported, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_docnumber, gltrans_misc_id, gltrans_amount, gltrans_notes, gltrans_journalnumber, gltrans_doctype) SELECT CURRENT_TIMESTAMP, FALSE, FALSE, pDistDate, _sequence, gltrans_accnt_id, gltrans_source, gltrans_docnumber, gltrans_misc_id, (gltrans_amount * -1), pNotes, _journal, gltrans_doctype FROM gltrans WHERE (gltrans_sequence=pSequence); PERFORM postIntoTrialBalance(_sequence); ELSE SELECT fetchJournalNumber(jrnluse_use) INTO _journal FROM sltrans JOIN jrnluse ON (sltrans_journalnumber=jrnluse_number) WHERE (sltrans_sequence=pSequence) LIMIT 1; INSERT INTO sltrans (sltrans_created, sltrans_posted, sltrans_date, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_docnumber, sltrans_misc_id, sltrans_amount, sltrans_notes, sltrans_journalnumber, sltrans_doctype) SELECT CURRENT_TIMESTAMP, FALSE, pDistDate, _sequence, sltrans_accnt_id, sltrans_source, sltrans_docnumber, sltrans_misc_id, (sltrans_amount * -1), pNotes, _journal, sltrans_doctype FROM sltrans WHERE (sltrans_sequence=pSequence); END IF; RETURN _journal; END; $_$; ALTER FUNCTION public.reverseglseries(integer, date, text) OWNER TO admin; -- -- Name: revokeallmodulecmnttypesource(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION revokeallmodulecmnttypesource(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmnttypeid ALIAS FOR $1; pModuleName ALIAS FOR $2; BEGIN DELETE FROM cmnttypesource WHERE (cmnttypesource_id IN ( SELECT cmnttypesource_id FROM cmnttypesource, source WHERE ( (cmnttypesource_source_id=source_id) AND (cmnttypesource_cmnttype_id=pCmnttypeid) AND (source_module=pModuleName) ) ) ); RETURN 1; END; $_$; ALTER FUNCTION public.revokeallmodulecmnttypesource(integer, text) OWNER TO admin; -- -- Name: revokeallmodulepriv(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION revokeallmodulepriv(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pModuleName ALIAS FOR $2; BEGIN DELETE FROM usrpriv WHERE (usrpriv_id IN ( SELECT usrpriv_id FROM usrpriv, priv WHERE ( (usrpriv_priv_id=priv_id) AND (usrpriv_username=pUsername) AND (priv_module=pModuleName) ) ) ); NOTIFY "usrprivUpdated"; RETURN 1; END; $_$; ALTER FUNCTION public.revokeallmodulepriv(text, text) OWNER TO admin; -- -- Name: revokeallmoduleprivgroup(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION revokeallmoduleprivgroup(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGrpid ALIAS FOR $1; pModuleName ALIAS FOR $2; BEGIN DELETE FROM grppriv WHERE (grppriv_id IN ( SELECT grppriv_id FROM grppriv, priv WHERE ( (grppriv_priv_id=priv_id) AND (grppriv_grp_id=pGrpid) AND (priv_module=pModuleName) ) ) ); RETURN 1; END; $_$; ALTER FUNCTION public.revokeallmoduleprivgroup(integer, text) OWNER TO admin; -- -- Name: revokecmnttypesource(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION revokecmnttypesource(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmnttypeid ALIAS FOR $1; pSourceid ALIAS FOR $2; BEGIN DELETE FROM cmnttypesource WHERE ( (cmnttypesource_cmnttype_id=pCmnttypeid) AND (cmnttypesource_source_id=pSourceid) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.revokecmnttypesource(integer, integer) OWNER TO admin; -- -- Name: revokegroup(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION revokegroup(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pGrpid ALIAS FOR $2; BEGIN DELETE FROM usrgrp WHERE ( (usrgrp_username=pUsername) AND (usrgrp_grp_id=pGrpid) ); RETURN TRUE; END; $_$; ALTER FUNCTION public.revokegroup(text, integer) OWNER TO admin; -- -- Name: revokepriv(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION revokepriv(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrivid ALIAS FOR $2; BEGIN DELETE FROM usrpriv WHERE ( (usrpriv_username=pUsername) AND (usrpriv_priv_id=pPrivid) ); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; ALTER FUNCTION public.revokepriv(text, integer) OWNER TO admin; -- -- Name: revokepriv(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION revokepriv(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrivname ALIAS FOR $2; BEGIN DELETE FROM usrpriv WHERE ( (usrpriv_username=pUsername) AND (usrpriv_priv_id IN (SELECT priv_id FROM priv WHERE priv_name=pPrivname) )); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; ALTER FUNCTION public.revokepriv(text, text) OWNER TO admin; -- -- Name: revokeprivgroup(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION revokeprivgroup(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGrpid ALIAS FOR $1; pPrivid ALIAS FOR $2; BEGIN DELETE FROM grppriv WHERE ( (grppriv_grp_id=pGrpid) AND (grppriv_priv_id=pPrivid) ); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; ALTER FUNCTION public.revokeprivgroup(integer, integer) OWNER TO admin; -- -- Name: rollupactualcost(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION rollupactualcost(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN rollUpSorACost(pitemid, TRUE); END; $_$; ALTER FUNCTION public.rollupactualcost(integer) OWNER TO admin; -- -- Name: rollupsoracost(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION rollupsoracost(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pActual ALIAS FOR $2; _counter INTEGER; _setid INTEGER; _consumers RECORD; BEGIN _counter := 0; SELECT indentedWhereUsed(pItemid) INTO _setid; FOR _consumers IN SELECT bomwork_item_id FROM bomwork WHERE (bomwork_set_id=_setid) ORDER BY bomwork_level LOOP PERFORM updateSorACost( _consumers.bomwork_item_id, costelem_type, TRUE, lowerCost(_consumers.bomwork_item_id, costelem_type, pActual), pActual ) FROM costelem WHERE (costelem_sys); PERFORM updateLowerUserCosts(_consumers.bomwork_item_id, pActual); _counter := _counter + 1; END LOOP; PERFORM deleteBOMWorkset(_setid); RETURN _counter; END; $_$; ALTER FUNCTION public.rollupsoracost(integer, boolean) OWNER TO admin; -- -- Name: rollupstandardcost(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION rollupstandardcost(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN rollUpSorACost(pItemid, FALSE); END; $_$; ALTER FUNCTION public.rollupstandardcost(integer) OWNER TO admin; -- -- Name: roundcost(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION roundcost(pcost numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _scale INTEGER; BEGIN IF (pCost IS NULL) THEN RETURN NULL; END IF; SELECT locale_cost_scale INTO _scale FROM locale WHERE (locale_id=getUsrLocaleId()); RETURN ROUND(pCost, _scale); END; $$; ALTER FUNCTION public.roundcost(pcost numeric) OWNER TO admin; -- -- Name: roundlocale(boolean, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION roundlocale(pfractional boolean, pqty numeric, plocale text) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _scale INTEGER; BEGIN IF (pFractional) THEN SELECT * INTO _r FROM locale WHERE (locale_id=getUsrLocaleId()); _scale := CASE pLocale WHEN 'qtyper' THEN _r.locale_qtyper_scale WHEN 'cost' THEN _r.locale_cost_scale ELSE _r.locale_qty_scale END; RETURN ROUND(pQty, _scale); ELSE IF (TRUNC(pQty) < pQty) THEN RETURN (TRUNC(pQty) + 1); ELSE RETURN TRUNC(pQty); END IF; END IF; END; $$; ALTER FUNCTION public.roundlocale(pfractional boolean, pqty numeric, plocale text) OWNER TO admin; -- -- Name: roundqty(boolean, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION roundqty(pfractional boolean, pqty numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _scale INTEGER; BEGIN SELECT locale_qty_scale INTO _scale FROM locale WHERE (locale_id=getUsrLocaleId()); IF (pFractional) THEN RETURN ROUND(pQty, _scale); ELSE IF (TRUNC(pQty) < ROUND(pQty, _scale)) THEN RETURN (TRUNC(pQty) + 1); ELSE RETURN TRUNC(pQty); END IF; END IF; END; $$; ALTER FUNCTION public.roundqty(pfractional boolean, pqty numeric) OWNER TO admin; -- -- Name: roundsale(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION roundsale(psale numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _scale INTEGER; BEGIN IF (pSale IS NULL) THEN RETURN NULL; END IF; SELECT locale_salesprice_scale INTO _scale FROM locale WHERE (locale_id=getUsrLocaleId()); RETURN ROUND(pSale, _scale); END; $$; ALTER FUNCTION public.roundsale(psale numeric) OWNER TO admin; -- -- Name: roundup(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION roundup(numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pValue ALIAS FOR $1; _checkValue integer; BEGIN _checkValue := pValue::integer; IF (_checkValue::numeric < pValue) THEN RETURN (_checkValue + 1)::numeric; ELSE RETURN _checkValue::numeric; END IF; END; $_$; ALTER FUNCTION public.roundup(numeric) OWNER TO admin; -- -- Name: saveaddr(integer, text, text, text, text, text, text, text, text, boolean, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveaddr(integer, text, text, text, text, text, text, text, text, boolean, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAddrId ALIAS FOR $1; pNumber ALIAS FOR $2; pAddr1 ALIAS FOR $3; pAddr2 ALIAS FOR $4; pAddr3 ALIAS FOR $5; pCity ALIAS FOR $6; pState ALIAS FOR $7; pPostalCode ALIAS FOR $8; pCountry ALIAS FOR $9; pActive ALIAS FOR $10; pNotes ALIAS FOR $11; pFlag ALIAS FOR $12; _addrId INTEGER; _addrNumber INTEGER; _flag TEXT; _p RECORD; _cnt INTEGER; _notes TEXT; BEGIN --Validate IF ((pFlag IS NULL) OR (pFlag = '') OR (pFlag = 'CHECK') OR (pFlag = 'CHANGEONE') OR (pFlag = 'CHANGEALL')) THEN IF (pFlag='') THEN _flag := 'CHECK'; ELSE _flag := COALESCE(pFlag,'CHECK'); END IF; ELSE RAISE EXCEPTION 'Invalid Flag (%). Valid flags are CHECK, CHANGEONE or CHANGEALL', pFlag; END IF; _notes := COALESCE(pNotes,''); --If there is nothing here, get out IF ( (pNumber = '' OR pNumber IS NULL) AND (pAddr1 = '' OR pAddr1 IS NULL) AND (pAddr2 = '' OR pAddr2 IS NULL) AND (pAddr3 = '' OR pAddr3 IS NULL) AND (pCity = '' OR pCity IS NULL) AND (pState = '' OR pState IS NULL) AND (pPostalCode = '' OR pPostalCode IS NULL) AND (pCountry = '' OR pCountry IS NULL) ) THEN RETURN NULL; END IF; _addrId := COALESCE(pAddrId,-1); --If we have an ID see if anything has changed, if not get out IF (_addrId >= 0) THEN SELECT * FROM addr INTO _p WHERE ((pAddrId=addr_id) AND (COALESCE(pNumber,addr_number)=addr_number) AND (COALESCE(pAddr1, '')=COALESCE(addr_line1, '')) AND (COALESCE(pAddr2, '')=COALESCE(addr_line2, '')) AND (COALESCE(pAddr3, '')=COALESCE(addr_line3, '')) AND (COALESCE(pCity, '')=COALESCE(addr_city, '')) AND (COALESCE(pState, '')=COALESCE(addr_state, '')) AND (COALESCE(pPostalCode, '')=COALESCE(addr_postalcode, '')) AND (COALESCE(pCountry, '')=COALESCE(addr_country, '')) AND (pActive=addr_active) AND (_notes=COALESCE(addr_notes,''))); IF (FOUND) THEN RETURN _addrId; END IF; END IF; --Check to see if duplicate address exists SELECT addr_id, addr_notes INTO _p FROM addr WHERE ((_addrId <> addr_id) AND (COALESCE(UPPER(addr_line1),'') = COALESCE(UPPER(pAddr1),'')) AND (COALESCE(UPPER(addr_line2),'') = COALESCE(UPPER(pAddr2),'')) AND (COALESCE(UPPER(addr_line3),'') = COALESCE(UPPER(pAddr3),'')) AND (COALESCE(UPPER(addr_city),'') = COALESCE(UPPER(pCity),'')) AND (COALESCE(UPPER(addr_state),'') = COALESCE(UPPER(pState),'')) AND (COALESCE(UPPER(addr_postalcode),'') = COALESCE(UPPER(pPostalcode),'')) AND (COALESCE(UPPER(addr_country),'') = COALESCE(UPPER(pCountry),''))); IF (FOUND) THEN --Note: To prevent overwriting of existing notes, the application --needs to load any existing notes for a matching address before altering them. IF (_notes <> _p.addr_notes) THEN UPDATE addr SET addr_notes=addr_notes || ' ' || _notes WHERE addr_id=_p.addr_id; END IF; RETURN _p.addr_id; --A matching address exits END IF; IF (_addrId < 0) THEN _flag := 'CHANGEONE'; END IF; IF (_flag = 'CHECK') THEN IF addrUseCount(_addrId) > 1 THEN RETURN -2; ELSIF (SELECT COUNT(addr_id)=0 FROM addr WHERE (addr_id=_addrId)) THEN _flag := 'CHANGEONE'; ELSE _flag := 'CHANGEALL'; END IF; END IF; IF (_flag = 'CHANGEALL') THEN _addrNumber := pNumber; IF (_addrNumber IS NULL) THEN SELECT addr_number INTO _addrNumber FROM addr WHERE(addr_id = _addrId); IF (_addrNumber IS NULL) THEN _addrNumber := fetchNextNumber('AddressNumber'); END IF; END IF; UPDATE addr SET addr_line1 = pAddr1, addr_line2 = pAddr2, addr_line3 = pAddr3, addr_city = pCity, addr_state = pState, addr_postalcode = pPostalcode, addr_country = pCountry, addr_active = pActive, addr_notes = pNotes WHERE addr_id = _addrId; RETURN _addrId; ELSE SELECT NEXTVAL('addr_addr_id_seq') INTO _addrId; IF (_flag = 'CHANGEONE') THEN _addrNumber := fetchNextNumber('AddressNumber'); ELSE _addrNumber := COALESCE(pNumber::text,fetchNextNumber('AddressNumber')); END IF; INSERT INTO addr ( addr_id, addr_number, addr_line1, addr_line2, addr_line3, addr_city, addr_state, addr_postalcode, addr_country, addr_active, addr_notes ) VALUES ( _addrId, _addrNumber, pAddr1, pAddr2, pAddr3, pCity, pState, pPostalcode, pCountry, pActive, _notes); RETURN _addrId; END IF; END; $_$; ALTER FUNCTION public.saveaddr(integer, text, text, text, text, text, text, text, text, boolean, text, text) OWNER TO admin; -- -- Name: saveaddr(integer, text, text, text, text, text, text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveaddr(integer, text, text, text, text, text, text, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAddrId ALIAS FOR $1; pNumber ALIAS FOR $2; pAddr1 ALIAS FOR $3; pAddr2 ALIAS FOR $4; pAddr3 ALIAS FOR $5; pCity ALIAS FOR $6; pState ALIAS FOR $7; pPostalCode ALIAS FOR $8; pCountry ALIAS FOR $9; pFlag ALIAS FOR $10; _returnVal INTEGER; BEGIN SELECT saveAddr(pAddrId,pNumber, pAddr1,pAddr2,pAddr3,pCity,pState,pPostalCode,pCountry,true,'',pFlag) INTO _returnVal; RETURN _returnVal; END; $_$; ALTER FUNCTION public.saveaddr(integer, text, text, text, text, text, text, text, text, text) OWNER TO admin; -- -- Name: savealarm(integer, text, date, time without time zone, integer, text, boolean, text, boolean, text, boolean, text, text, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savealarm(integer, text, date, time without time zone, integer, text, boolean, text, boolean, text, boolean, text, text, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAlarmId ALIAS FOR $1; pAlarmNumber ALIAS FOR $2; pDate ALIAS FOR $3; pTime ALIAS FOR $4; pOffset ALIAS FOR $5; pQualifier ALIAS FOR $6; pEvent ALIAS FOR $7; pEventRecipient ALIAS FOR $8; pEmail ALIAS FOR $9; pEmailRecipient ALIAS FOR $10; pSysmsg ALIAS FOR $11; pSysmsgRecipient ALIAS FOR $12; pSource ALIAS FOR $13; pSourceId ALIAS FOR $14; pFlag ALIAS FOR $15; _alarmId INTEGER; _alarmNumber TEXT; _alarmTime TIMESTAMP; _alarmInterval INTERVAL; _alarmTrigger TIMESTAMP; _isNew BOOLEAN; _flag TEXT; _alarmCount INTEGER := 0; _debug BOOLEAN := false; BEGIN IF (_debug) THEN RAISE NOTICE 'pAlarmId = %', pAlarmId; RAISE NOTICE 'pAlarmNumber = %', pAlarmNumber; RAISE NOTICE 'pDate = %', pDate; RAISE NOTICE 'pTime = %', pTime; RAISE NOTICE 'pOffset = %', pOffset; RAISE NOTICE 'pQualifier = %', pQualifier; RAISE NOTICE 'pEvent = %', pEvent; RAISE NOTICE 'pEventRecipient = %', pEventRecipient; RAISE NOTICE 'pEmail = %', pEmail; RAISE NOTICE 'pEmailRecipient = %', pEmailRecipient; RAISE NOTICE 'pSysmsg = %', pSysmsg; RAISE NOTICE 'pSysmsgRecipient = %', pSysmsgRecipient; RAISE NOTICE 'pSource = %', pSource; RAISE NOTICE 'pSourceId = %', pSourceId; RAISE NOTICE 'pFlag = %', pFlag; END IF; --Validate IF ((pFlag IS NULL) OR (pFlag = '') OR (pFlag = 'CHECK') OR (pFlag = 'CHANGEONE') OR (pFlag = 'CHANGEALL')) THEN IF (pFlag='') THEN _flag := 'CHECK'; ELSE _flag := COALESCE(pFlag,'CHECK'); END IF; ELSE RAISE EXCEPTION 'Invalid Flag (%). Valid flags are CHECK, CHANGEONE or CHANGEALL', pFlag; END IF; --If there is nothing here get out IF ( (pAlarmId IS NULL OR pAlarmId = -1) AND (pOffset IS NULL) AND (pSourceId IS NULL) AND (COALESCE(pQualifier, '') = '') AND (COALESCE(pEventRecipient, '') = '') AND (COALESCE(pEmailRecipient, '') = '') AND (COALESCE(pSysmsgRecipient, '') = '') AND (COALESCE(pSource, '') = '') ) THEN RETURN NULL; END IF; IF (pAlarmId IS NULL OR pAlarmId = -1) THEN _isNew := true; _alarmId := nextval('alarm_alarm_id_seq'); _alarmNumber := fetchNextNumber('AlarmNumber'); ELSE SELECT COUNT(alarm_id) INTO _alarmCount FROM alarm WHERE ((alarm_id=pAlarmId) AND (alarm_source=pSource) AND (alarm_source_id=pSourceId)); -- ask whether new or update if name changes -- but only if this isn't a new record with a pre-allocated id IF (_alarmCount < 1 AND _flag = 'CHECK') THEN IF (EXISTS(SELECT alarm_id FROM alarm WHERE (alarm_id=pAlarmId))) THEN RETURN -10; ELSE _isNew := true; _alarmNumber := fetchNextNumber('AlarmNumber'); END IF; ELSIF (_flag = 'CHANGEONE') THEN _isNew := true; _alarmId := nextval('alarm_alarm_id_seq'); _alarmNumber := fetchNextNumber('AlarmNumber'); END IF; END IF; _alarmNumber := COALESCE(_alarmNumber,pAlarmNumber,fetchNextNumber('AlarmNumber')); _alarmTime := COALESCE(pDate, CURRENT_DATE) + COALESCE(pTime, CURRENT_TIME); IF (COALESCE(pOffset, 0) > 0) THEN _alarmInterval := CASE WHEN (pQualifier IN ('MB', 'MA')) THEN CAST(pOffset AS TEXT) || ' minutes' WHEN (pQualifier IN ('HB', 'HA')) THEN CAST(pOffset AS TEXT) || ' hours' WHEN (pQualifier IN ('DB', 'DA')) THEN CAST(pOffset AS TEXT) || ' days' ELSE '' END; _alarmTrigger := CASE WHEN (pQualifier IN ('MB', 'HB', 'DB')) THEN _alarmTime - _alarmInterval WHEN (pQualifier IN ('MA', 'HA', 'DA')) THEN _alarmTime + _alarmInterval ELSE _alarmTime END; ELSE _alarmTrigger := _alarmTime; END IF; IF (_isNew) THEN _alarmId := COALESCE(_alarmId,pAlarmId,nextval('alarm_alarm_id_seq')); INSERT INTO alarm ( alarm_id,alarm_number, alarm_event, alarm_email, alarm_sysmsg, alarm_trigger, alarm_time, alarm_time_offset, alarm_time_qualifier, alarm_creator, alarm_event_recipient, alarm_email_recipient, alarm_sysmsg_recipient, alarm_source, alarm_source_id ) VALUES ( _alarmId, _alarmNumber, pEvent, pEmail, pSysmsg, _alarmTrigger, _alarmTime, pOffset, pQualifier, getEffectiveXtUser(), pEventRecipient, pEmailRecipient, pSysmsgRecipient, pSource, pSourceId ); RETURN _alarmId; ELSE UPDATE alarm SET alarm_number=_alarmNumber, alarm_event=COALESCE(pEvent, alarm_event), alarm_email=COALESCE(pEmail, alarm_event), alarm_sysmsg=COALESCE(pSysmsg, alarm_event), alarm_trigger=_alarmTrigger, alarm_time=_alarmTime, alarm_time_offset=COALESCE(pOffset, alarm_time_offset), alarm_time_qualifier=COALESCE(pQualifier, alarm_time_qualifier), alarm_event_recipient=COALESCE(pEventRecipient, alarm_event_recipient), alarm_email_recipient=COALESCE(pEmailRecipient, alarm_email_recipient), alarm_sysmsg_recipient=COALESCE(pSysmsgRecipient, alarm_sysmsg_recipient) WHERE (alarm_id=pAlarmId); RETURN pAlarmId; END IF; END; $_$; ALTER FUNCTION public.savealarm(integer, text, date, time without time zone, integer, text, boolean, text, boolean, text, boolean, text, text, integer, text) OWNER TO admin; -- -- Name: savebomhead(integer, text, date, text, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savebomhead(integer, text, date, text, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevision ALIAS FOR $2; pRevisionDate ALIAS FOR $3; pDocumentNumber ALIAS FOR $4; pBatchSize ALIAS FOR $5; pRequiredQtyPer ALIAS FOR $6; _seq INTEGER; _p RECORD; _revid INTEGER; BEGIN IF (NOT fetchMetricBool('RevControl')) THEN -- Deal with BOM if Rev Control Turned off SELECT bomhead_id INTO _seq FROM bomhead WHERE (bomhead_item_id=pItemid); IF (NOT FOUND) THEN -- No bomhead exists _seq := NEXTVAL('bomhead_bomhead_id_seq'); INSERT INTO bomhead (bomhead_id,bomhead_item_id,bomhead_docnum,bomhead_revision, bomhead_revisiondate,bomhead_batchsize,bomhead_requiredqtyper,bomhead_rev_id) VALUES (_seq,pItemid, pDocumentNumber, pRevision, pRevisionDate, pBatchSize, pRequiredQtyPer,-1); ELSE UPDATE bomhead SET bomhead_revision = pRevision, bomhead_revisiondate = pRevisionDate, bomhead_docnum = pDocumentNumber, bomhead_batchsize = pBatchSize, bomhead_requiredqtyper = pRequiredQtyPer WHERE (bomhead_id=_seq); END IF; RETURN _seq; ELSE -- Deal with Revision Control IF (COALESCE(pRevision,'') = '' AND getActiveRevId('BOM',pItemid) != -1) THEN RAISE EXCEPTION 'Revision Control records exist for item. You must provide a new or existing revision number.'; END IF; SELECT * INTO _p FROM bomhead LEFT OUTER JOIN rev ON (bomhead_rev_id=rev_id), item WHERE ((bomhead_item_id=pItemid) AND (COALESCE(bomhead_revision,'')=COALESCE(pRevision,'')) AND (bomhead_item_id=item_id)); IF (NOT FOUND) THEN -- This is a new bomhead record IF LENGTH(pRevision) > 0 THEN -- We need to create a revision record SELECT createbomrev(pItemid, pRevision) INTO _revid; UPDATE bomhead SET bomhead_revisiondate = pRevisiondate, bomhead_docnum = pDocumentNumber, bomhead_batchsize = pBatchsize, bomhead_requiredqtyper = pRequiredqtyper WHERE (bomhead_rev_id=_revid); SELECT bomhead_id INTO _seq FROM bomhead WHERE (bomhead_rev_id=_revid); RETURN _seq; ELSE -- Just create a regular bom header record _seq := NEXTVAL('bomhead_bomhead_id_seq'); INSERT INTO bomhead (bomhead_id,bomhead_item_id,bomhead_docnum,bomhead_revision, bomhead_revisiondate,bomhead_batchsize,bomhead_requiredqtyper,bomhead_rev_id) VALUES (_seq,pItemid, pDocumentNumber, pRevision, pRevisionDate, pBatchSize, pRequiredQtyPer,-1); RETURN _seq; END IF; ELSE -- We need to update a record IF (_p.rev_status = 'I') THEN RAISE EXCEPTION 'Revision % for % is inactive. Update not allowed.', _p.rev_number, _p.item_number; ELSIF (COALESCE(pRevision,'') = COALESCE(_p.bomhead_revision,'')) THEN -- No change, just update UPDATE bomhead SET bomhead_revisiondate = pRevisiondate, bomhead_docnum = pDocumentNumber, bomhead_batchsize = pBatchSize, bomhead_requiredqtyper = pRequiredqtyper WHERE (bomhead_id=_p.bomhead_id); RETURN _p.bomhead_id; ELSE -- Need a new revision SELECT createbomrev(pItemid, pRevision) INTO _revid; UPDATE bomhead SET bomhead_revisiondate = pRevisiondate, bomhead_docnum = pDocumentNumber, bomhead_batchsize = pBatchSize, bomhead_requiredqtyper = pRequiredqtyper WHERE (bomhead_rev_id=_revid); SELECT bomhead_id INTO _seq FROM bomhead WHERE (bomhead_rev_id=_revid); RETURN _seq; END IF; END IF; END IF; RETURN _seq; END; $_$; ALTER FUNCTION public.savebomhead(integer, text, date, text, numeric, numeric) OWNER TO admin; -- -- Name: savecntct(integer, text, integer, integer, text, text, text, text, text, text, boolean, text, text, text, text, text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savecntct(pcntctid integer, pcontactnumber text, pcrmacctid integer, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pinitials text, pactive boolean, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, pnotes text, ptitle text, pflag text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT saveCntct( pCntctId, pContactNumber, pCrmAcctId, pAddrId, pHonorific, pFirstName, pMiddleName, pLastName, pSuffix, pInitials, pActive, pPhone, pPhone2, pFax, pEmail, pWebAddr, pNotes, pTitle, pFlag, NULL) INTO _returnVal; RETURN _returnVal; END; $$; ALTER FUNCTION public.savecntct(pcntctid integer, pcontactnumber text, pcrmacctid integer, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pinitials text, pactive boolean, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, pnotes text, ptitle text, pflag text) OWNER TO admin; -- -- Name: savecntct(integer, text, integer, text, text, text, text, text, text, text, text, text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savecntct(pcntctid integer, pcontactnumber text, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, ptitle text, pflag text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT saveCntct(pCntctId,pContactNumber,NULL,pAddrId,pHonorific,pFirstName,pMiddleName,pLastName,pSuffix,NULL, NULL,pPhone,pPhone2,pFax,pEmail,pWebAddr,NULL,pTitle,pFlag, NULL) INTO _returnVal; RETURN _returnVal; END; $$; ALTER FUNCTION public.savecntct(pcntctid integer, pcontactnumber text, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, ptitle text, pflag text) OWNER TO admin; -- -- Name: savecntct(integer, text, integer, integer, text, text, text, text, text, text, boolean, text, text, text, text, text, text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savecntct(pcntctid integer, pcontactnumber text, pcrmacctid integer, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pinitials text, pactive boolean, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, pnotes text, ptitle text, pflag text, pownerusername text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cntctId INTEGER; _cntctNumber TEXT; _isNew BOOLEAN; _flag TEXT; _contactCount INTEGER := 0; BEGIN --Validate IF ((pFlag IS NULL) OR (pFlag = '') OR (pFlag = 'CHECK') OR (pFlag = 'CHANGEONE') OR (pFlag = 'CHANGEALL')) THEN IF (pFlag='') THEN _flag := 'CHECK'; ELSE _flag := COALESCE(pFlag,'CHECK'); END IF; ELSE RAISE EXCEPTION 'Invalid Flag (%). Valid flags are CHECK, CHANGEONE or CHANGEALL', pFlag; END IF; --If there is nothing here get out IF ( (pCntctId IS NULL OR pCntctId = -1) AND (pAddrId IS NULL) AND (COALESCE(pFirstName, '') = '') AND (COALESCE(pMiddleName, '') = '') AND (COALESCE(pLastName, '') = '') AND (COALESCE(pSuffix, '') = '') AND (COALESCE(pHonorific, '') = '') AND (COALESCE(pInitials, '') = '') AND (COALESCE(pPhone, '') = '') AND (COALESCE(pPhone2, '') = '') AND (COALESCE(pFax, '') = '') AND (COALESCE(pEmail, '') = '') AND (COALESCE(pWebAddr, '') = '') AND (COALESCE(pNotes, '') = '') AND (COALESCE(pTitle, '') = '') ) THEN RETURN NULL; END IF; IF (pCntctId IS NULL OR pCntctId = -1) THEN _isNew := true; _cntctId := nextval('cntct_cntct_id_seq'); _cntctNumber := COALESCE(pContactNumber,fetchNextNumber('ContactNumber')); ELSE SELECT COUNT(cntct_id) INTO _contactCount FROM cntct WHERE ((cntct_id=pCntctId) AND (cntct_first_name=pFirstName) AND (cntct_last_name=pLastName)); -- ask whether new or update if name changes -- but only if this isn't a new record with a pre-allocated id IF (_contactCount < 1 AND _flag = 'CHECK') THEN IF (EXISTS(SELECT cntct_id FROM cntct WHERE (cntct_id=pCntctId))) THEN RETURN -10; ELSE _isNew := true; _cntctNumber := fetchNextNumber('ContactNumber'); END IF; ELSIF (_flag = 'CHANGEONE') THEN _isNew := true; _cntctId := nextval('cntct_cntct_id_seq'); _cntctNumber := fetchNextNumber('ContactNumber'); ELSIF (_flag = 'CHANGEALL') THEN _isNew := false; END IF; END IF; IF (pContactNumber = '') THEN _cntctNumber := fetchNextNumber('ContactNumber'); ELSE _cntctNumber := COALESCE(_cntctNumber,pContactNumber,fetchNextNumber('ContactNumber')); END IF; IF (_isNew) THEN _cntctId := COALESCE(_cntctId,pCntctId,nextval('cntct_cntct_id_seq')); INSERT INTO cntct ( cntct_id,cntct_number, cntct_crmacct_id,cntct_addr_id,cntct_first_name, cntct_last_name,cntct_honorific,cntct_initials, cntct_active,cntct_phone,cntct_phone2, cntct_fax,cntct_email,cntct_webaddr, cntct_notes,cntct_title,cntct_middle,cntct_suffix, cntct_owner_username ) VALUES ( _cntctId, COALESCE(_cntctNumber,fetchNextNumber('ContactNumber')) ,pCrmAcctId,pAddrId, pFirstName,pLastName,pHonorific, pInitials,COALESCE(pActive,true),pPhone,pPhone2,pFax, pEmail,pWebAddr,pNotes,pTitle,pMiddleName,pSuffix,pOwnerUsername ); RETURN _cntctId; ELSE UPDATE cntct SET cntct_number=COALESCE(_cntctNumber,fetchNextNumber('ContactNumber')), cntct_crmacct_id=COALESCE(pCrmAcctId,cntct_crmacct_id), cntct_addr_id=COALESCE(pAddrId,cntct_addr_id), cntct_first_name=COALESCE(pFirstName,cntct_first_name), cntct_last_name=COALESCE(pLastName,cntct_last_name), cntct_honorific=COALESCE(pHonorific,cntct_honorific), cntct_initials=COALESCE(pInitials,cntct_initials), cntct_active=COALESCE(pActive,cntct_active), cntct_phone=COALESCE(pPhone,cntct_phone), cntct_phone2=COALESCE(pPhone2,cntct_phone2), cntct_fax=COALESCE(pFax,cntct_fax), cntct_email=COALESCE(pEmail,cntct_email), cntct_webaddr=COALESCE(pWebAddr,cntct_webaddr), cntct_notes=COALESCE(pNotes,cntct_notes), cntct_title=COALESCE(pTitle,cntct_title), cntct_middle=COALESCE(pMiddleName,cntct_middle), cntct_suffix=COALESCE(pSuffix,cntct_suffix), cntct_owner_username=COALESCE(pOwnerUsername, cntct_owner_username) WHERE (cntct_id=pCntctId); RETURN pCntctId; END IF; END; $$; ALTER FUNCTION public.savecntct(pcntctid integer, pcontactnumber text, pcrmacctid integer, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pinitials text, pactive boolean, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, pnotes text, ptitle text, pflag text, pownerusername text) OWNER TO admin; -- -- Name: saveimageass(text, integer, character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveimageass(text, integer, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; pSourceId ALIAS FOR $2; pPurpose ALIAS FOR $3; pImageid ALIAS FOR $4; _imageassId INTEGER = 0; BEGIN -- See if this link already exists SELECT imageass_id INTO _imageassId FROM imageass WHERE ((imageass_source_id=pSourceId) AND (imageass_source=pSource) AND (imageass_image_id=pImageId) AND (imageass_purpose=pPurpose)); IF (FOUND) THEN RETURN _imageassId; END IF; -- See if a record with this purpose already exists (item only) IF (pSource = 'I' AND pPurpose != 'M') THEN SELECT imageass_id INTO _imageassId FROM imageass WHERE ((imageass_source_id=pSourceId) AND (imageass_source=pSource) AND (imageass_purpose=pPurpose)); END IF; IF (_imageassId > 0) THEN UPDATE imageass SET imageass_image_id=pImageId WHERE (imageass_id=_imageassId); ELSE _imageassId := NEXTVAL('imageass_imageass_id_seq'); INSERT INTO imageass VALUES (_imageassId,pSourceId,pSource,pImageid,CASE WHEN pSource='I' THEN pPurpose ELSE 'M' END); END IF; RETURN _imageassId; END; $_$; ALTER FUNCTION public.saveimageass(text, integer, character, integer) OWNER TO admin; -- -- Name: saveipsitem(integer, integer, integer, numeric, numeric, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveipsitem(integer, integer, integer, numeric, numeric, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pIpsItemId ALIAS FOR $1; pIpsHeadId ALIAS FOR $2; pItemId ALIAS FOR $3; pQtyBreak ALIAS FOR $4; pPrice ALIAS FOR $5; pQtyUomId ALIAS FOR $6; pPriceUomId ALIAS FOR $7; _ipsitemid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(item_id)=0 FROM item WHERE (item_id=pItemId)) THEN RAISE EXCEPTION 'You must provide a valid Item'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pPrice,0) < 0) THEN RAISE EXCEPTION 'Price must be a negative value'; ELSIF ((pQtyUomId IS NOT NULL) AND (SELECT COUNT(item_id)=0 FROM (SELECT item_id FROM item WHERE ((item_id=pItemId) AND (item_inv_uom_id=pQtyUomId)) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_from_uom_id=pQtyUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling')) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_to_uom_id=pQtyUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling'))) AS data)) THEN RAISE EXCEPTION 'Qty UOM Must be a valid Selling UOM for the Item'; ELSIF ((pPriceUomId IS NOT NULL) AND (SELECT COUNT(item_id)=0 FROM (SELECT item_id FROM item WHERE ((item_id=pItemId) AND (item_inv_uom_id=pPriceUomId)) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_from_uom_id=pPriceUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling')) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_to_uom_id=pPriceUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling'))) AS data)) THEN RAISE EXCEPTION 'Price UOM Must be a valid Selling UOM for the Item'; END IF; _new := TRUE; IF (pIpsItemId IS NOT NULL) THEN SELECT ipsitem_id INTO _ipsitemid FROM ipsitem WHERE (ipsitem_id=pIpsItemId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Item not found.'; END IF; ELSE SELECT ipsitem_id INTO _ipsitemid FROM ipsitem WHERE ((ipsitem_ipshead_id = pIpsheadId) AND (ipsitem_item_id = pItemId) AND (ipsitem_qtybreak = pQtyBreak) AND (ipsitem_qty_uom_id = COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId))) AND (ipsitem_price_uom_id = CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END)); END IF; IF (FOUND) THEN _new := false; ELSE _ipsitemid := nextval('ipsitem_ipsitem_id_seq'); END IF; IF (_new) THEN INSERT INTO ipsitem ( ipsitem_id, ipsitem_ipshead_id, ipsitem_item_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount) VALUES ( _ipsitemid, pIpsheadId, pItemId, pQtyBreak, pPrice, COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)), CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END, 0.0, 0.0); ELSE UPDATE ipsitem SET ipsitem_qtybreak = pQtyBreak, ipsitem_price = pPrice, ipsitem_qty_uom_id = COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)), ipsitem_price_uom_id = CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END WHERE (ipsitem_id=_ipsitemid); END IF; RETURN _ipsitemid; END; $_$; ALTER FUNCTION public.saveipsitem(integer, integer, integer, numeric, numeric, integer, integer) OWNER TO admin; -- -- Name: saveipsitem(integer, integer, integer, numeric, numeric, integer, integer, numeric, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveipsitem(pipsitemid integer, pipsheadid integer, pitemid integer, pqtybreak numeric, pprice numeric, pqtyuomid integer, ppriceuomid integer, ppercent numeric, pfixedamt numeric, ptype text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ipsitemid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(item_id)=0 FROM item WHERE (item_id=pItemId)) THEN RAISE EXCEPTION 'You must provide a valid Item'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pPrice,0) < 0) THEN RAISE EXCEPTION 'Price must be a negative value'; ELSIF ((pQtyUomId IS NOT NULL) AND (SELECT COUNT(item_id)=0 FROM (SELECT item_id FROM item WHERE ((item_id=pItemId) AND (item_inv_uom_id=pQtyUomId)) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_from_uom_id=pQtyUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling')) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_to_uom_id=pQtyUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling'))) AS data)) THEN RAISE EXCEPTION 'Qty UOM Must be a valid Selling UOM for the Item'; ELSIF ((pPriceUomId IS NOT NULL) AND (SELECT COUNT(item_id)=0 FROM (SELECT item_id FROM item WHERE ((item_id=pItemId) AND (item_inv_uom_id=pPriceUomId)) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_from_uom_id=pPriceUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling')) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_to_uom_id=pPriceUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling'))) AS data)) THEN RAISE EXCEPTION 'Price UOM Must be a valid Selling UOM for the Item'; END IF; _new := TRUE; IF (pIpsItemId IS NOT NULL) THEN SELECT ipsitem_id INTO _ipsitemid FROM ipsiteminfo WHERE (ipsitem_id=pIpsItemId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Item not found.'; END IF; ELSE SELECT ipsitem_id INTO _ipsitemid FROM ipsiteminfo WHERE ((ipsitem_ipshead_id = pIpsheadId) AND (ipsitem_item_id = pItemId) AND (ipsitem_qtybreak = pQtyBreak) AND (ipsitem_qty_uom_id = COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId))) AND (ipsitem_price_uom_id = CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END)); END IF; IF (FOUND) THEN _new := false; END IF; IF (_new) THEN INSERT INTO ipsiteminfo ( ipsitem_ipshead_id, ipsitem_item_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_type) VALUES ( pIpsheadId, pItemId, pQtyBreak, pPrice, COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)), CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END, pPercent, pFixedAmt, pType) RETURNING ipsitem_id INTO _ipsitemid; ELSE UPDATE ipsiteminfo SET ipsitem_qtybreak = pQtyBreak, ipsitem_price = pPrice, ipsitem_qty_uom_id = COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)), ipsitem_price_uom_id = CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END, ipsitem_discntprcnt=pPercent, ipsitem_fixedamtdiscount=pFixedAmt, ipsitem_type=pType WHERE (ipsitem_id=_ipsitemid); END IF; RETURN _ipsitemid; END; $$; ALTER FUNCTION public.saveipsitem(pipsitemid integer, pipsheadid integer, pitemid integer, pqtybreak numeric, pprice numeric, pqtyuomid integer, ppriceuomid integer, ppercent numeric, pfixedamt numeric, ptype text) OWNER TO admin; -- -- Name: saveipsprodcat(integer, integer, integer, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveipsprodcat(integer, integer, integer, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pIpsProdcatId ALIAS FOR $1; pIpsHeadId ALIAS FOR $2; pProdCatId ALIAS FOR $3; pQtyBreak ALIAS FOR $4; pDiscount ALIAS FOR $5; _ipsprodcatid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(*)=0 FROM prodcat WHERE (prodcat_id=pProdcatId)) THEN RAISE EXCEPTION 'You must provide a valid Product Category'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pDiscount,0) < 0) THEN RAISE EXCEPTION 'Discount must be a negative value'; END IF; _new := TRUE; IF (pIpsProdcatId IS NOT NULL) THEN SELECT ipsprodcat_id INTO _ipsprodcatid FROM ipsprodcat WHERE (ipsprodcat_id=pIpsprodcatId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Product Category not found'; END IF; ELSE SELECT ipsprodcat_id INTO _ipsprodcatid FROM ipsprodcat WHERE ((ipsprodcat_ipshead_id=pIpsheadId) AND (ipsprodcat_prodcat_id=pProdcatId) AND (ipsprodcat_qtybreak=pQtyBreak)); IF (FOUND) THEN _new := false; ELSE _ipsprodcatid := nextval('ipsprodcat_ipsprodcat_id_seq'); END IF; END IF; IF (_new) THEN INSERT INTO ipsprodcat ( ipsprodcat_id, ipsprodcat_ipshead_id, ipsprodcat_prodcat_id, ipsprodcat_qtybreak, ipsprodcat_discntprcnt) VALUES ( _ipsprodcatid, pIpsheadId, pProdcatId, pQtyBreak, pDiscount * .01); ELSE UPDATE ipsprodcat SET ipsprodcat_qtybreak = pQtyBreak, ipsprodcat_discntprcnt = pDiscount * .01 WHERE (ipsprodcat_id=_ipsprodcatid); END IF; RETURN _ipsprodcatid; END; $_$; ALTER FUNCTION public.saveipsprodcat(integer, integer, integer, numeric, numeric) OWNER TO admin; -- -- Name: saveipsprodcat(integer, integer, integer, numeric, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveipsprodcat(integer, integer, integer, numeric, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pIpsProdcatId ALIAS FOR $1; pIpsHeadId ALIAS FOR $2; pProdCatId ALIAS FOR $3; pQtyBreak ALIAS FOR $4; pDiscount ALIAS FOR $5; pFixedAmtDiscount ALIAS FOR $6; _ipsprodcatid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(*)=0 FROM prodcat WHERE (prodcat_id=pProdcatId)) THEN RAISE EXCEPTION 'You must provide a valid Product Category'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pDiscount,0) < 0) THEN RAISE EXCEPTION 'Discount must be a negative value'; END IF; _new := TRUE; IF (pIpsProdcatId IS NOT NULL) THEN SELECT ipsprodcat_id INTO _ipsprodcatid FROM ipsprodcat WHERE (ipsprodcat_id=pIpsprodcatId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Product Category not found'; END IF; ELSE SELECT ipsprodcat_id INTO _ipsprodcatid FROM ipsprodcat WHERE ((ipsprodcat_ipshead_id=pIpsheadId) AND (ipsprodcat_prodcat_id=pProdcatId) AND (ipsprodcat_qtybreak=pQtyBreak)); IF (FOUND) THEN _new := false; ELSE _ipsprodcatid := nextval('ipsprodcat_ipsprodcat_id_seq'); END IF; END IF; IF (_new) THEN INSERT INTO ipsprodcat ( ipsprodcat_id, ipsprodcat_ipshead_id, ipsprodcat_prodcat_id, ipsprodcat_qtybreak, ipsprodcat_discntprcnt, ipsprodcat_fixedamtdiscount) VALUES ( _ipsprodcatid, pIpsheadId, pProdcatId, pQtyBreak, pDiscount * .01, pFixedAmtDiscount); ELSE UPDATE ipsprodcat SET ipsprodcat_qtybreak = pQtyBreak, ipsprodcat_discntprcnt = pDiscount * .01, ipsprodcat_fixedamtdiscount = pFixedAmtDiscount WHERE (ipsprodcat_id=_ipsprodcatid); END IF; RETURN _ipsprodcatid; END; $_$; ALTER FUNCTION public.saveipsprodcat(integer, integer, integer, numeric, numeric, numeric) OWNER TO admin; -- -- Name: saveipsprodcat(integer, integer, integer, numeric, numeric, numeric, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveipsprodcat(pipsprodcatid integer, pipsheadid integer, pprodcatid integer, pqtybreak numeric, pdiscount numeric, pfixedamtdiscount numeric, ptype text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ipsitemid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(*)=0 FROM prodcat WHERE (prodcat_id=pProdcatId)) THEN RAISE EXCEPTION 'You must provide a valid Product Category'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pDiscount,0) < 0) THEN RAISE EXCEPTION 'Discount must be a negative value'; END IF; _new := TRUE; IF (pIpsProdcatId IS NOT NULL) THEN SELECT ipsitem_id INTO _ipsitemid FROM ipsiteminfo WHERE (ipsprodcat_id=pIpsprodcatId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Product Category not found'; END IF; ELSE SELECT ipsitem_id INTO _ipsitemid FROM ipsiteminfo WHERE ((ipsitem_ipshead_id=pIpsheadId) AND (ipsitem_prodcat_id=pProdcatId) AND (ipsitem_qtybreak=pQtyBreak)); IF (FOUND) THEN _new := false; ELSE _ipsitemid := nextval('ipsitem_ipsitem_id_seq'); END IF; END IF; IF (_new) THEN INSERT INTO ipsiteminfo ( ipsitem_id, ipsitem_ipshead_id, ipsitem_prodcat_id, ipsitem_qtybreak, ipsitem_price, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_type) VALUES ( _ipsitemid, pIpsheadId, pProdcatId, pQtyBreak, 0.0, pDiscount * .01, pFixedAmtDiscount, pType); ELSE UPDATE ipsiteminfo SET ipsitem_qtybreak = pQtyBreak, ipsitem_discntprcnt = pDiscount * .01, ipsitem_fixedamtdiscount = pFixedAmtDiscount, ipsitem_type = pType WHERE (ipsitem_id=_ipsitemid); END IF; RETURN _ipsitemid; END; $$; ALTER FUNCTION public.saveipsprodcat(pipsprodcatid integer, pipsheadid integer, pprodcatid integer, pqtybreak numeric, pdiscount numeric, pfixedamtdiscount numeric, ptype text) OWNER TO admin; -- -- Name: saveitemimage(integer, character, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveitemimage(integer, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pPurpose ALIAS FOR $2; pImageid ALIAS FOR $3; _itemimageId INTEGER; BEGIN -- See if a record with this purpose already exists SELECT imageass_id INTO _itemimageId FROM imageass WHERE ( (imageass_source='I') AND (imageass_source_id=pItemid) AND (imageass_purpose=pPurpose) ); IF (FOUND) THEN UPDATE imageass SET imageass_image_id=pImageId WHERE (imageass_id=_itemimageId); ELSE _itemimageId := NEXTVAL('imageass_imageass_id_seq'); INSERT INTO imageass VALUES (_itemimageId,pItemid,'I',pImageid,pPurpose); END IF; RETURN _itemimageId; END; $_$; ALTER FUNCTION public.saveitemimage(integer, character, integer) OWNER TO admin; -- -- Name: saveitemuomconv(integer, integer, numeric, integer, numeric, boolean, integer[]); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION saveitemuomconv(integer, integer, numeric, integer, numeric, boolean, integer[]) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pFromUomId ALIAS FOR $2; pFromValue ALIAS FOR $3; pToUomId ALIAS FOR $4; pToValue ALIAS FOR $5; pFractional ALIAS FOR $6; pUomTypes ALIAS FOR $7; _p RECORD; _fromUomId INTEGER; _fromValue NUMERIC; _toUomId INTEGER; _toValue NUMERIC; _fractional BOOLEAN; _seq INTEGER; _i INTEGER; _uomtype TEXT; BEGIN -- Make sure we have some itemtypes IF (pUomTypes IS NULL) OR (ARRAY_UPPER(pUomTypes,1) = 0) THEN RAISE EXCEPTION 'You must include at least one item type.'; END IF; -- If this is a global UOM, over-ride with global data. SELECT * INTO _p FROM uomconv WHERE ((((uomconv_from_uom_id=pFromUomId) AND (uomconv_to_uom_id=pToUomId)) OR ((uomconv_from_uom_id=pToUomId) AND (uomconv_to_uom_id=pFromUomId)))); IF (FOUND) THEN _fromUomId := _p.uomconv_from_uom_id; _toUomId := _p.uomconv_to_uom_id; _fromValue := _p.uomconv_from_value; _toValue := _p.uomconv_to_value; _fractional := _p.uomconv_fractional; RAISE NOTICE 'Defaulted to global Unit of Measure conversion ratios.'; ELSE _fromUomId := pFromUomId; _fromValue := pFromValue; _toUomId := pToUomId; _toValue := pToValue; _fractional := pFractional; END IF; -- See if an item conversion exists going the other way SELECT f.uom_name AS f_uom, t.uom_name as t_uom INTO _p FROM itemuomconv,uom f, uom t WHERE ((itemuomconv_item_id=pItemId) AND (itemuomconv_from_uom_id=_toUomId) AND (itemuomconv_to_uom_id=_fromUomId) AND (f.uom_id=itemuomconv_from_uom_id) AND (t.uom_id=itemuomconv_to_uom_id)); IF (FOUND) THEN RAISE EXCEPTION 'Unit of measure conversion already exists going from % to %.',_p.f_uom,_p.t_uom; END IF; -- See if an item conversion record exists SELECT * INTO _p FROM itemuomconv WHERE ((itemuomconv_item_id=pItemId) AND (itemuomconv_from_uom_id=_fromUomId) AND (itemuomconv_to_uom_id=_toUomId)); -- Update if found IF (FOUND) THEN UPDATE itemuomconv SET itemuomconv_from_value=_fromValue, itemuomconv_to_value=_toValue, itemuomconv_fractional=_fractional WHERE (itemuomconv_id=_p.itemuomconv_id); _seq := _p.itemuomconv_id; --Delete old type list DELETE FROM itemuom WHERE itemuom_itemuomconv_id=_p.itemuomconv_id; ELSE -- Otherwise create a new one SELECT NEXTVAL('itemuomconv_itemuomconv_id_seq') INTO _seq; INSERT INTO itemuomconv VALUES (_seq, pItemId,_fromUomId,_fromValue,_toUomId,_toValue,_fractional); END IF; -- Build new type list FOR _i IN 1..ARRAY_UPPER(pUomTypes,1) LOOP SELECT uomtype_name INTO _uomtype FROM itemuomconv, itemuom, uomtype WHERE ((itemuom_uomtype_id=uomtype_id) AND (itemuomconv_id=itemuom_itemuomconv_id) AND (itemuomconv_item_id=pItemId) AND (uomtype_name != 'Selling') AND (itemuom_uomtype_id=pUomTypes[_i])); IF (FOUND) THEN RAISE EXCEPTION 'Unit of Measure Type % is already used on this item',_uomtype; ELSE INSERT INTO itemuom (itemuom_itemuomconv_id,itemuom_uomtype_id) VALUES (_seq,pUomTypes[_i]); END IF; END LOOP; RETURN _seq; END; $_$; ALTER FUNCTION public.saveitemuomconv(integer, integer, numeric, integer, numeric, boolean, integer[]) OWNER TO admin; -- -- Name: savemetasql(text, text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savemetasql(text, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN saveMetasql($1, $2, $3, $4, true, NULL, 0); END; $_$; ALTER FUNCTION public.savemetasql(text, text, text, text) OWNER TO admin; -- -- Name: savemetasql(text, text, text, text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savemetasql(text, text, text, text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN saveMetasql($1, $2, $3, $4, $5, NULL, 0); END; $_$; ALTER FUNCTION public.savemetasql(text, text, text, text, boolean) OWNER TO admin; -- -- Name: savemetasql(text, text, text, text, boolean, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savemetasql(text, text, text, text, boolean, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN saveMetasql($1, $2, $3, $4, $5, $6, 0); END; $_$; ALTER FUNCTION public.savemetasql(text, text, text, text, boolean, text) OWNER TO admin; -- -- Name: savemetasql(text, text, text, text, boolean, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION savemetasql(text, text, text, text, boolean, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGroup ALIAS FOR $1; pName ALIAS FOR $2; pNotes ALIAS FOR $3; pQuery ALIAS FOR $4; pSystem ALIAS FOR $5; pSchema ALIAS FOR $6; pGrade ALIAS FOR $7; _metasqlid INTEGER; _debug BOOL := false; _grade INTEGER; _insertstr TEXT; _table TEXT; BEGIN --See if Query already exists SELECT metasql_id INTO _metasqlid FROM metasql WHERE ((metasql_group=pGroup) AND (metasql_name=pName) AND (metasql_grade=pGrade)); IF (FOUND) THEN IF (_debug) THEN RAISE NOTICE 'update metasql'; END IF; UPDATE metasql SET metasql_group=pGroup, metasql_name=pName, metasql_notes=pNotes, metasql_query=pQuery WHERE (metasql_id=_metasqlid); ELSE IF (COALESCE(pSchema, 'public') = 'public' OR TRIM(pSchema) = '') THEN _table := 'metasql'; ELSE _table := pSchema || '.pkgmetasql'; END IF; IF (pGrade IS NULL) THEN SELECT MAX(metasql_grade) + 1 INTO _grade FROM metasql WHERE ((metasql_group=pGroup) AND (metasql_name=pName)); ELSE _grade := pGrade; END IF; _insertstr := 'INSERT INTO ' || _table || ' (metasql_group, metasql_name, metasql_notes, ' || ' metasql_query, metasql_grade) VALUES (' || COALESCE(quote_literal(pGroup),'NULL') || ',' || COALESCE(quote_literal(pName), 'NULL') || ',' || COALESCE(quote_literal(pNotes), 'NULL') || ',' || COALESCE(quote_literal(pQuery), 'NULL') ||',' || COALESCE(quote_literal(_grade), 'NULL') || ') RETURNING metasql_id;' ; IF (_debug) THEN RAISE NOTICE '%', _insertstr; END IF; EXECUTE _insertstr INTO _metasqlid; END IF; RETURN _metasqlid; END; $_$; ALTER FUNCTION public.savemetasql(text, text, text, text, boolean, text, integer) OWNER TO admin; -- -- Name: scraps(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION scraps(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('SI', 'SM', 'EX')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.scraps(text) OWNER TO admin; -- -- Name: scrapwomaterial(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION scrapwomaterial(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN scrapWoMaterial($1, $2, CURRENT_TIMESTAMP); END; $_$; ALTER FUNCTION public.scrapwomaterial(integer, numeric) OWNER TO admin; -- -- Name: scrapwomaterial(integer, numeric, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION scrapwomaterial(integer, numeric, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pGlDistTS ALIAS FOR $3; _costmethod CHAR(1); _scrapValue NUMERIC; _r RECORD; BEGIN -- Validate IF (pQty <= 0) THEN RAISE EXCEPTION 'Scrap quantity must be a positive number'; ELSIF ( ( SELECT (womatl_qtyiss < pQty) FROM womatl WHERE (womatl_id=pWomatlid) ) ) THEN RAISE EXCEPTION 'You may not scrap more material than has been issued'; END IF; -- Get the wip G/L account SELECT costcat_wip_accnt_id INTO _r FROM womatl, wo, itemsite, costcat WHERE((womatl_wo_id=wo_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (womatl_id=pWomatlid)); -- Calculate scrap value SELECT itemsite_costmethod INTO _costmethod FROM womatl JOIN itemsite ON (womatl_itemsite_id=itemsite_id) WHERE (womatl_id=pWomatlid); IF (_costmethod = 'S') THEN SELECT ROUND((stdCost(itemsite_item_id) * itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, pQty)),2) INTO _scrapValue FROM womatl JOIN itemsite ON (womatl_itemsite_id=itemsite_id) WHERE (womatl_id=pWomatlid); ELSIF (_costmethod = 'A') THEN SELECT ROUND((SUM(invhist_invqty * invhist_unitcost)-womatl_scrapvalue)/ (CASE WHEN (SUM(invhist_invqty)-itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtywipscrap) = 0) THEN 1 ELSE SUM(invhist_invqty)-itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtywipscrap) END),2) * itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, pQty) INTO _scrapValue FROM womatl JOIN womatlpost ON (womatl_id=womatlpost_womatl_id) JOIN invhist ON (womatlpost_invhist_id=invhist_id) JOIN itemsite ON (womatl_itemsite_id=itemsite_id) WHERE (womatl_id=pWomatlid) GROUP BY itemsite_item_id,womatl_uom_id,womatl_qtywipscrap,womatl_scrapvalue; ELSE RAISE EXCEPTION 'Cost method not supported to scrap this item'; END IF; -- Distribute to G/L PERFORM insertGLTransaction( 'W/O', 'WO', formatWoNumber(womatl_wo_id), ('Scrap ' || item_number || ' from Work Order'), getPrjAccntId(wo_prj_id, _r.costcat_wip_accnt_id), getPrjAccntId(wo_prj_id, costcat_mfgscrap_accnt_id), -1, _scrapValue, date(pGlDistTS) ) FROM wo, womatl, itemsite, item, costcat WHERE ( (wo_id=womatl_wo_id) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (womatl_id=pWomatlid) ); UPDATE womatl SET womatl_qtywipscrap=(womatl_qtywipscrap + pQty), womatl_scrapvalue = womatl_scrapvalue + _scrapValue, womatl_qtyiss=(womatl_qtyiss - pQty) WHERE (womatl_id=pWomatlid); UPDATE wo SET wo_wipvalue = wo_wipvalue-_scrapValue, wo_postedvalue = wo_postedvalue-_scrapValue FROM womatl WHERE ((womatl_id=pWomatlid) AND (wo_id=womatl_wo_id)); RETURN pWomatlid; END; $_$; ALTER FUNCTION public.scrapwomaterial(integer, numeric, timestamp with time zone) OWNER TO admin; -- -- Name: selectbalanceforbilling(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectbalanceforbilling(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; _returnval BOOLEAN := TRUE; _doSelect BOOLEAN; _result INTEGER; _soitem RECORD; BEGIN FOR _soitem IN -- Get the shipments for this SO. Kits are not shipped SELECT cust_partialship, coitem_id, coitem_linenumber, 'NOTK' AS item_type, SUM(shipitem_qty) AS qty, ( (SUM(shipitem_qty) >= (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned + SUM(shipitem_qty))) OR (NOT cust_partialship) ) AS toclose FROM cohead JOIN custinfo ON (cust_id=cohead_cust_id) JOIN coitem ON (coitem_cohead_id=cohead_id) JOIN shipitem ON ( (shipitem_orderitem_id=coitem_id) AND (NOT shipitem_invoiced) ) JOIN shiphead ON ( (shiphead_id=shipitem_shiphead_id) AND (shiphead_order_type='SO') AND (shiphead_shipped) ) WHERE (cohead_id=pSoheadid) GROUP BY cust_partialship, coitem_id, item_type, coitem_linenumber, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned UNION -- Get the Kits for this SO SELECT cust_partialship, coitem_id, coitem_linenumber, 'K' AS item_type, coitem_qtyord AS qty, TRUE AS toclose FROM cohead JOIN custinfo ON (cust_id=cohead_cust_id) JOIN coitem ON (coitem_cohead_id=cohead_id AND coitem_status='O') JOIN itemsite ON (itemsite_id=coitem_itemsite_id) JOIN item ON ( (item_id=itemsite_item_id) AND (item_type='K') ) WHERE (cohead_id=pSoheadid) LOOP _doSelect := true; IF(_soitem.item_type = 'K') THEN -- see if all the sub items are shipped SELECT coitem_id INTO _result FROM coitem WHERE((coitem_cohead_id=pSoheadid) AND (coitem_linenumber=_soitem.coitem_linenumber) AND (coitem_subnumber > 0) AND ((coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) > 0)) LIMIT 1; IF( FOUND ) THEN _doSelect := false; END IF; END IF; IF (_doSelect) THEN -- do as much as we can but still report errors if they occur IF (selectForBilling(_soitem.coitem_id, _soitem.qty, _soitem.toclose) < 0) THEN _returnval := FALSE; END IF; END IF; END LOOP; RETURN _returnval; END; $_$; ALTER FUNCTION public.selectbalanceforbilling(integer) OWNER TO admin; -- -- Name: selectdiscountitemsforpayment(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectdiscountitemsforpayment(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pBankaccntid ALIAS FOR $2; _currid INTEGER; _r RECORD; BEGIN SELECT bankaccnt_curr_id INTO _currid FROM bankaccnt WHERE (bankaccnt_id=pBankaccntid); FOR _r IN SELECT apopen_id FROM apopen, terms WHERE((CURRENT_DATE <= determineDiscountDate(apopen_terms_id, apopen_docdate)) AND (terms_discprcnt > 0.0) AND (apopen_terms_id=terms_id) AND (apopen_open) AND (apopen_status = 'O') AND (apopen_doctype IN ('V', 'D')) AND (apopen_vend_id=pVendid) AND (apopen_curr_id=_currid) ) LOOP PERFORM selectPayment(_r.apopen_id, pBankaccntid); END LOOP; RETURN 1; END; $_$; ALTER FUNCTION public.selectdiscountitemsforpayment(integer, integer) OWNER TO admin; -- -- Name: selectdueitemsforpayment(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectdueitemsforpayment(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pBankaccntid ALIAS FOR $2; _currid INTEGER; BEGIN SELECT bankaccnt_curr_id INTO _currid FROM bankaccnt WHERE (bankaccnt_id=pBankaccntid); PERFORM selectPayment(apopen_id, pBankaccntid) FROM apopen WHERE((apopen_open) AND (apopen_vend_id=pVendid) AND (apopen_duedate <= CURRENT_DATE) AND (apopen_status = 'O') AND (apopen_doctype IN ('V', 'D')) AND (apopen_curr_id=_currid) ); RETURN 1; END; $_$; ALTER FUNCTION public.selectdueitemsforpayment(integer, integer) OWNER TO admin; -- -- Name: selectforbilling(integer, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectforbilling(integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; pQty ALIAS FOR $2; pClose ALIAS FOR $3; _itemid INTEGER := NULL; _taxzoneid INTEGER := NULL; _taxid INTEGER := NULL; _taxtypeid INTEGER := NULL; BEGIN SELECT cobmisc_taxzone_id, item_id, coitem_taxtype_id INTO _taxzoneid, _itemid, _taxtypeid FROM cobmisc, coitem, itemsite, item WHERE ((cobmisc_cohead_id = coitem_cohead_id) AND (NOT cobmisc_posted) AND (coitem_itemsite_id = itemsite_id) AND (itemsite_item_id = item_id) AND (coitem_id = pSoitemid) ) LIMIT 1; RETURN selectforbilling(pSoitemid, pQty, pClose, _taxtypeid); END; $_$; ALTER FUNCTION public.selectforbilling(integer, numeric, boolean) OWNER TO admin; -- -- Name: selectforbilling(integer, numeric, boolean, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectforbilling(integer, numeric, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; pQty ALIAS FOR $2; pClose ALIAS FOR $3; ptaxtypeid ALIAS FOR $4; _cobillid INTEGER; _r RECORD; BEGIN -- Get some information SELECT cobmisc_id, cobmisc_taxzone_id, coitem_id, coitem_price, coitem_price_invuomratio AS invpricerat, coitem_qty_invuomratio, item_id INTO _r FROM cobmisc, coitem, itemsite, item, site() WHERE ((cobmisc_cohead_id = coitem_cohead_id) AND (NOT cobmisc_posted) AND (coitem_itemsite_id = itemsite_id) AND (itemsite_item_id = item_id) AND (coitem_id = pSoitemid) AND (itemsite_warehous_id = warehous_id) ) LIMIT 1; -- check to make sure the qty to bill for is not less than -- the total un-invoiced shipped amount IF ((SELECT (pQty < SUM(shipitem_qty)) FROM shipitem, shiphead, coitem WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type='SO') AND (shiphead_order_id=coitem_cohead_id) AND (shipitem_orderitem_id=coitem_id) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_id=pSoitemid) ) ) ) THEN RETURN -1; END IF; SELECT cobill_id INTO _cobillid FROM cobill, cobmisc, coitem WHERE ((cobill_cobmisc_id = cobmisc_id) AND (cobmisc_cohead_id = coitem_cohead_id) AND (cobill_coitem_id = coitem_id) AND (NOT cobmisc_posted) AND (coitem_id = pSoitemid)); IF (FOUND) THEN UPDATE cobill SET cobill_selectdate = CURRENT_DATE, cobill_select_username = getEffectiveXtUser(), cobill_qty = pQty, cobill_toclose = pClose, cobill_taxtype_id = ptaxtypeid WHERE (cobill_id=_cobillid); ELSE SELECT NEXTVAL('cobill_cobill_id_seq') INTO _cobillid; INSERT INTO cobill (cobill_id, cobill_coitem_id, cobill_cobmisc_id, cobill_selectdate, cobill_select_username, cobill_qty, cobill_toclose, cobill_taxtype_id) VALUES (_cobillid, _r.coitem_id, _r.cobmisc_id, CURRENT_DATE, getEffectiveXtUser(), pQty, pClose, ptaxtypeid); END IF; RETURN _cobillid; END; $_$; ALTER FUNCTION public.selectforbilling(integer, numeric, boolean, integer) OWNER TO admin; -- -- Name: selectpayment(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectpayment(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pBankaccntid ALIAS FOR $2; _p RECORD; _apselectid INTEGER; _amount NUMERIC; _discount NUMERIC; BEGIN SELECT apopen_amount, apopen_paid, apopen_doctype, apopen_docdate, apopen_curr_id, apopen_amount - apopen_paid - COALESCE((SELECT SUM(currToCurr(checkitem_curr_id, apopen_curr_id, checkitem_amount + checkitem_discount, checkhead_checkdate)) FROM checkitem, checkhead WHERE((checkitem_checkhead_id=checkhead_id) AND (checkitem_apopen_id=apopen_id) AND (NOT checkhead_deleted) AND (NOT checkhead_replaced) AND (NOT checkhead_posted)) ),0) AS balance, noNeg(COALESCE(apopen_discountable_amount, 0) * CASE WHEN (CURRENT_DATE <= determineDiscountDate(apopen_terms_id, apopen_docdate)) THEN terms_discprcnt ELSE 0.0 END - discount_applied) AS discount_available INTO _p FROM apopen LEFT OUTER JOIN terms ON (apopen_terms_id=terms_id), (SELECT COALESCE(SUM(apapply_amount),0) AS discount_applied FROM apapply, apopen WHERE((apapply_target_apopen_id=pApopenid) AND (apapply_source_apopen_id=apopen_id) AND (apopen_discount)) ) AS data WHERE(apopen_id=pApopenid); IF(NOT FOUND OR (NOT _p.apopen_doctype IN ('V','D'))) THEN RETURN -1; END IF; _discount := round(_p.discount_available, 2); _amount := noNeg(round(_p.balance, 2) - _discount); IF (round(_p.balance,2) < (_discount + _amount)) THEN RETURN -2; END IF; IF (_amount > 0) THEN SELECT apselect_id INTO _apselectid FROM apselect WHERE (apselect_apopen_id=pApopenid); IF (FOUND) THEN UPDATE apselect SET apselect_amount=_amount, apselect_discount=_discount, apselect_curr_id = _p.apopen_curr_id WHERE(apselect_id=_apselectid); ELSE SELECT NEXTVAL('apselect_apselect_id_seq') INTO _apselectid; INSERT INTO apselect ( apselect_id, apselect_apopen_id, apselect_amount, apselect_discount, apselect_bankaccnt_id, apselect_curr_id, apselect_date ) VALUES ( _apselectid, pApopenid, _amount, _discount, pBankaccntid, _p.apopen_curr_id, _p.apopen_docdate ); END IF; ELSE _apselectid := 0; END IF; RETURN _apselectid; END; $_$; ALTER FUNCTION public.selectpayment(integer, integer) OWNER TO admin; -- -- Name: selectuninvoicedshipment(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectuninvoicedshipment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadid ALIAS FOR $1; _cobmiscid INTEGER; _coheadid INTEGER; _r RECORD; _cobillid INTEGER; BEGIN -- make a cobmisc head if it doesn't already exist for this cohead SELECT shiphead_order_id, createBillingHeader(shiphead_order_id) INTO _coheadid, _cobmiscid FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id) WHERE (shiphead_shipped AND NOT shipitem_invoiced AND (shiphead_id=pShipheadid)); -- Grab all of the uninvoiced shipitem records FOR _r IN SELECT cohead_id, coitem_id, SUM(shipitem_qty) AS qty, coitem_price, coitem_price_invuomratio AS invpricerat, coitem_qty_invuomratio, item_id, ( ((coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) <= 0) OR (NOT cust_partialship) ) AS toclose, coitem_taxtype_id FROM shiphead, shipitem, coitem, cohead, custinfo, itemsite, item WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (coitem_cohead_id=cohead_id) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (cohead_cust_id=cust_id) AND (item_type != 'K') AND (cohead_id=_coheadid) AND (shiphead_id=pShipheadid) ) GROUP BY cohead_id, coitem_id, cust_partialship, coitem_taxtype_id, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned, coitem_price, invpricerat, coitem_qty_invuomratio, item_id UNION SELECT cohead_id, coitem_id, coitem_qtyord AS qty, coitem_price, coitem_price_invuomratio AS invpricerat, coitem_qty_invuomratio, item_id, true AS toclose, coitem_taxtype_id FROM shiphead, cohead, custinfo, itemsite, item, coitem AS kit WHERE((shiphead_order_id=cohead_id) AND (coitem_cohead_id=cohead_id) AND (coitem_status='O') AND (shiphead_shipped) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (cohead_cust_id=cust_id) AND (item_type = 'K') AND (cohead_id=_coheadid) AND (shiphead_id=pShipheadid) AND (coitem_linenumber NOT IN (SELECT sub.coitem_linenumber FROM coitem AS sub WHERE sub.coitem_cohead_id=cohead_id -- cohead for kit AND sub.coitem_linenumber=kit.coitem_linenumber AND sub.coitem_subnumber > 0 AND ((sub.coitem_qtyord - sub.coitem_qtyshipped + sub.coitem_qtyreturned) > 0) LIMIT 1) )) GROUP BY cohead_id, coitem_id, cust_partialship, coitem_taxtype_id, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned, coitem_price, invpricerat, coitem_qty_invuomratio, item_id, coitem_linenumber LOOP SELECT cobill_id INTO _cobillid FROM cobill, cobmisc, coitem WHERE ((cobill_cobmisc_id=cobmisc_id) AND (cobmisc_cohead_id=coitem_cohead_id) AND (cobill_coitem_id=coitem_id) AND (NOT cobmisc_posted) AND (cobill_cobmisc_id=_cobmiscid) AND (coitem_id=_r.coitem_id)) LIMIT 1; IF (FOUND) THEN UPDATE cobill SET cobill_selectdate = CURRENT_DATE, cobill_select_username = getEffectiveXtUser(), cobill_qty = cobill_qty + _r.qty, cobill_toclose = _r.toclose, cobill_taxtype_id = _r.coitem_taxtype_id WHERE (cobill_id=_cobillid); ELSE -- Now insert the cobill line INSERT INTO cobill ( cobill_cobmisc_id, cobill_coitem_id, cobill_selectdate, cobill_select_username, cobill_qty, cobill_toclose, cobill_taxtype_id ) VALUES ( _cobmiscid, _r.coitem_id, CURRENT_DATE, getEffectiveXtUser(), _r.qty, _r.toclose, _r.coitem_taxtype_id ); END IF; END LOOP; RETURN _cobmiscid; END; $_$; ALTER FUNCTION public.selectuninvoicedshipment(integer) OWNER TO admin; -- -- Name: selectuninvoicedshipments(integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectuninvoicedshipments(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pCusttype ALIAS FOR $2; _r RECORD; _recordCounter INTEGER := 0; BEGIN -- Grab all of the uninvoiced shipitem records FOR _r IN SELECT DISTINCT shiphead_id FROM shiphead, shipitem, coitem, itemsite, cohead, custinfo, custtype WHERE ( (shiphead_order_type='SO') AND (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'C') AND (coitem_cohead_id=cohead_id) AND (cohead_cust_id=cust_id) AND (cust_custtype_id=custtype_id) AND ( (pWarehousid = -1) OR (itemsite_warehous_id=pWarehousid) ) AND (custtype_code ~ pCusttype) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_id NOT IN ( SELECT cobill_coitem_id FROM cobmisc, cobill WHERE ((cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) ) ) ) LOOP PERFORM selectUninvoicedShipment(_r.shiphead_id); _recordCounter := _recordCounter + 1; END LOOP; RETURN _recordCounter; END; $_$; ALTER FUNCTION public.selectuninvoicedshipments(integer, text) OWNER TO admin; -- -- Name: selectuninvoicedshipments(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectuninvoicedshipments(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; _r RECORD; _recordCounter INTEGER := 0; BEGIN -- Grab all of the uninvoiced shipitem records FOR _r IN SELECT DISTINCT shiphead_id FROM shiphead, shipitem, coitem, itemsite WHERE ( (shiphead_order_type='SO') AND (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'C') AND ( (pWarehousid = -1) OR (itemsite_warehous_id=pWarehousid) ) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_id NOT IN ( SELECT cobill_coitem_id FROM cobmisc, cobill WHERE ((cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) ) ) ) LOOP PERFORM selectUninvoicedShipment(_r.shiphead_id); _recordCounter := _recordCounter + 1; END LOOP; RETURN _recordCounter; END; $_$; ALTER FUNCTION public.selectuninvoicedshipments(integer) OWNER TO admin; -- -- Name: selectuninvoicedshipments(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION selectuninvoicedshipments(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pCusttypeid ALIAS FOR $2; _r RECORD; _recordCounter INTEGER := 0; BEGIN -- Grab all of the uninvoiced shipitem records FOR _r IN SELECT DISTINCT shiphead_id FROM shiphead, shipitem, coitem, itemsite, cohead, custinfo WHERE ( (shiphead_order_type='SO') AND (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'C') AND (coitem_cohead_id=cohead_id) AND (cohead_cust_id=cust_id) AND (cust_custtype_id=pCusttypeid) AND ( (pWarehousid = -1) OR (itemsite_warehous_id=pWarehousid) ) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_id NOT IN ( SELECT cobill_coitem_id FROM cobmisc, cobill WHERE ((cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) ) ) ) LOOP PERFORM selectUninvoicedShipment(_r.shiphead_id); _recordCounter := _recordCounter + 1; END LOOP; RETURN _recordCounter; END; $_$; ALTER FUNCTION public.selectuninvoicedshipments(integer, integer) OWNER TO admin; -- -- Name: setapjournalnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setapjournalnumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _journalNumber INTEGER; _r RECORD; BEGIN -- Fetch the next Journal Number SELECT fetchJournalNumber('A/P') INTO _journalNumber; -- Walk through all of the A/P Open Items FOR _r IN SELECT apopen_id, apopen_docnumber FROM apopen WHERE (NOT apopen_posted) LOOP -- Set the Journal Number for all of the G/L Transactions -- for the A/P Open Item UPDATE gltrans SET gltrans_journalnumber=_journalNumber WHERE ( (gltrans_source='P/O') AND (gltrans_doctype IN ('VO')) AND (gltrans_docnumber=_r.apopen_docnumber) AND (NOT gltrans_exported) ); -- Set the Journal Number for the A/P Open Item UPDATE apopen SET apopen_journalnumber=_journalNumber WHERE (apopen_id=_r.apopen_id); END LOOP; RETURN _journalNumber; END; $$; ALTER FUNCTION public.setapjournalnumber() OWNER TO admin; -- -- Name: setarjournalnumber(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setarjournalnumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _journalNumber INTEGER; _r RECORD; BEGIN -- Fetch the next Journal Number SELECT fetchJournalNumber('A/R') INTO _journalNumber; -- Walk through all of the A/R Open Items FOR _r IN SELECT aropen_id, aropen_docnumber FROM aropen WHERE (NOT aropen_posted) LOOP -- Set the Journal Number for all of the G/L Transactions -- for the A/R Open Item UPDATE gltrans SET gltrans_journalnumber=_journalNumber WHERE ( (gltrans_source='S/O') AND (gltrans_doctype IN ('CM', 'IN')) AND (gltrans_docnumber=_r.aropen_docnumber) AND (NOT gltrans_exported) ); -- Set the Journal Number for the A/R Open Item UPDATE aropen SET aropen_journalnumber=_journalNumber WHERE (aropen_id=_r.aropen_id); END LOOP; RETURN _journalNumber; END; $$; ALTER FUNCTION public.setarjournalnumber() OWNER TO admin; -- -- Name: setbudget(integer, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setbudget(integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; pAccntid ALIAS FOR $2; pAmount ALIAS FOR $3; BEGIN RETURN setBudget(1, pPeriodid, pAccntid, pAmount); END; $_$; ALTER FUNCTION public.setbudget(integer, integer, numeric) OWNER TO admin; -- -- Name: setbudget(integer, integer, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setbudget(integer, integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudgheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pAccntid ALIAS FOR $3; pAmount ALIAS FOR $4; _budgetid INTEGER; BEGIN SELECT budgitem_id INTO _budgetid FROM budgitem WHERE ((budgitem_period_id=pPeriodid) AND (budgitem_budghead_id=pBudgheadid) AND (budgitem_accnt_id=pAccntid)); IF (FOUND) THEN UPDATE budgitem SET budgitem_amount = pAmount WHERE (budgitem_id=_budgetid); ELSE SELECT nextval('budgitem_budgitem_id_seq') INTO _budgetid; INSERT INTO budgitem (budgitem_id, budgitem_budghead_id, budgitem_period_id, budgitem_accnt_id, budgitem_amount) VALUES(_budgetid, pBudgheadid, pPeriodid, pAccntid, pAmount); END IF; RETURN _budgetid; END; $_$; ALTER FUNCTION public.setbudget(integer, integer, integer, numeric) OWNER TO admin; -- -- Name: setbytea(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setbytea(text) RETURNS bytea LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMetricName ALIAS FOR $1; _value bytea; BEGIN _value := decode(pMetricName, 'escape'); RETURN _value; END; $_$; ALTER FUNCTION public.setbytea(text) OWNER TO admin; -- -- Name: setbytea(bytea); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setbytea(bytea) RETURNS bytea LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMetricName ALIAS FOR $1; _value bytea; BEGIN _value := pMetricName; RETURN _value; END; $_$; ALTER FUNCTION public.setbytea(bytea) OWNER TO admin; -- -- Name: setccbankaccnt(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setccbankaccnt(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pccardtype ALIAS FOR $1; pbankaccntid ALIAS FOR $2; _ccbankid INTEGER; _numfound INTEGER; BEGIN RAISE DEBUG 'setCCBankAccount(%, %) entered', pccardtype, pbankaccntid; UPDATE ccbank SET ccbank_bankaccnt_id=pbankaccntid WHERE ccbank_ccard_type=pccardtype RETURNING ccbank_id INTO _ccbankid; GET DIAGNOSTICS _numfound = ROW_COUNT; IF (_numfound <= 0) THEN INSERT INTO ccbank (ccbank_ccard_type, ccbank_bankaccnt_id) VALUES (pccardtype, pbankaccntid) RETURNING _ccbankid; END IF; RETURN _ccbankid; END; $_$; ALTER FUNCTION public.setccbankaccnt(text, integer) OWNER TO admin; -- -- Name: seteffectivextuser(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION seteffectivextuser(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; BEGIN PERFORM initEffectiveXtUser(); PERFORM * FROM effective_user WHERE effective_key = 'username'; IF FOUND THEN UPDATE effective_user SET effective_value = pUsername WHERE effective_key = 'username'; ELSE INSERT INTO effective_user (effective_key, effective_value) VALUES('username', pUsername); END IF; RETURN true; END; $_$; ALTER FUNCTION public.seteffectivextuser(text) OWNER TO admin; -- -- Name: setgljournalnumber(date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setgljournalnumber(date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; pEndDate ALIAS FOR $2; _journalNumber INTEGER; BEGIN -- Fetch the next Journal Number SELECT fetchJournalNumber('G/L') INTO _journalNumber; -- Set the Journal Number for all of the unposted G/L Transactions -- in the passed date range. UPDATE gltrans SET gltrans_journalnumber=_journalNumber WHERE ( (NOT gltrans_exported) AND (gltrans_date BETWEEN pStartDate and pEndDate) ); RETURN _journalNumber; END; $_$; ALTER FUNCTION public.setgljournalnumber(date, date) OWNER TO admin; -- -- Name: setmetric(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setmetric(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMetricName ALIAS FOR $1; pMetricValue ALIAS FOR $2; _metricid INTEGER; BEGIN SELECT metric_id INTO _metricid FROM metric WHERE (metric_name=pMetricName); IF (FOUND) THEN UPDATE metric SET metric_value=pMetricValue WHERE (metric_id=_metricid); ELSE INSERT INTO metric (metric_name, metric_value) VALUES (pMetricName, pMetricValue); END IF; RETURN TRUE; END; $_$; ALTER FUNCTION public.setmetric(text, text) OWNER TO admin; -- -- Name: setmetricenc(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setmetricenc(text, text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMetricName ALIAS FOR $1; pMetricValue ALIAS FOR $2; pMetricEnc ALIAS FOR $3; _metricid INTEGER; _value bytea; _key bytea; BEGIN _value = decode(pMetricValue, 'escape'); _key = decode(pMetricEnc, 'escape'); SELECT metricenc_id INTO _metricid FROM metricenc WHERE (metricenc_name=pMetricName); IF (FOUND) THEN UPDATE metricenc SET metricenc_value=encrypt(_value, _key, 'bf') WHERE (metricenc_id=_metricid); ELSE INSERT INTO metricenc (metricenc_name, metricenc_value) VALUES (pMetricName, encrypt(_value, _key, 'bf')); END IF; RETURN TRUE; END; $_$; ALTER FUNCTION public.setmetricenc(text, text, text) OWNER TO admin; -- -- Name: setnextapmemonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextapmemonumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='APMemoNumber'); IF (FOUND) THEN UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_id=_orderseqid); ELSE INSERT INTO orderseq (orderseq_name, orderseq_number) VALUES ('APMemoNumber', pNumber); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.setnextapmemonumber(integer) OWNER TO admin; -- -- Name: setnextarmemonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextarmemonumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='ARMemoNumber'); IF (FOUND) THEN UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_id=_orderseqid); ELSE INSERT INTO orderseq (orderseq_name, orderseq_number) VALUES ('ARMemoNumber', pNumber); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.setnextarmemonumber(integer) OWNER TO admin; -- -- Name: setnextcashrcptnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextcashrcptnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='CashRcptNumber'); IF (FOUND) THEN UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_id=_orderseqid); ELSE INSERT INTO orderseq (orderseq_name, orderseq_number) VALUES ('CashRcptNumber', pNumber); END IF; RETURN 1; END; $_$; ALTER FUNCTION public.setnextcashrcptnumber(integer) OWNER TO admin; -- -- Name: setnextchecknumber(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextchecknumber(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; pNextCheckNumber ALIAS FOR $2; BEGIN UPDATE bankaccnt SET bankaccnt_nextchknum=pNextCheckNumber WHERE (bankaccnt_id=pBankaccntid); RETURN TRUE; END; $_$; ALTER FUNCTION public.setnextchecknumber(integer, integer) OWNER TO admin; -- -- Name: setnextcmnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextcmnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='CmNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'CmNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='CmNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextcmnumber(integer) OWNER TO admin; -- -- Name: setnextcrmaccountnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextcrmaccountnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='CRMAccountNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'CRMAccountNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='CRMAccountNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextcrmaccountnumber(integer) OWNER TO admin; -- -- Name: setnextincidentnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextincidentnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='IncidentNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'IncidentNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='IncidentNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextincidentnumber(integer) OWNER TO admin; -- -- Name: setnextinvcnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextinvcnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='InvcNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'InvcNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='InvcNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextinvcnumber(integer) OWNER TO admin; -- -- Name: setnextnumber(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextnumber(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE psequence ALIAS FOR $1; pnumber ALIAS FOR $2; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name=psequence); IF (NOT FOUND) THEN INSERT INTO orderseq (orderseq_name, orderseq_number, orderseq_table, orderseq_numcol) VALUES (psequence, pnumber, CASE WHEN (psequence='APMemoNumber') THEN 'apopen' WHEN (psequence='ARMemoNumber') THEN 'aropen' WHEN (psequence='CmNumber') THEN 'cmhead' WHEN (psequence='IncidentNumber') THEN 'incdt' WHEN (psequence='InvcNumber') THEN 'invchead' WHEN (psequence='JournalNumber') THEN 'gltrans' WHEN (psequence='PlanNumber') THEN 'planord' WHEN (psequence='PoNumber') THEN 'pohead' WHEN (psequence='PrNumber') THEN 'pr' WHEN (psequence='QuNumber') THEN 'quhead' WHEN (psequence='ShipmentNumber') THEN 'shiphead' WHEN (psequence='SoNumber') THEN 'cohead' WHEN (psequence='ToNumber') THEN 'tohead' WHEN (psequence='VcNumber') THEN 'vohead' WHEN (psequence='WoNumber') THEN 'wo' ELSE '' END, CASE WHEN (psequence='APMemoNumber') THEN 'apopen_docnumber' WHEN (psequence='ARMemoNumber') THEN 'aropen_docnumber' WHEN (psequence='CmNumber') THEN 'cmhead_number' WHEN (psequence='IncidentNumber') THEN 'incdt_number' WHEN (psequence='InvcNumber') THEN 'invchead_invcnumber' WHEN (psequence='JournalNumber') THEN 'gltrans_journalnumber' WHEN (psequence='PlanNumber') THEN 'planord_number' WHEN (psequence='PoNumber') THEN 'pohead_number' WHEN (psequence='PrNumber') THEN 'pr_number' WHEN (psequence='QuNumber') THEN 'quhead_number' WHEN (psequence='ShipmentNumber') THEN 'shiphead_number' WHEN (psequence='SoNumber') THEN 'cohead_number' WHEN (psequence='ToNumber') THEN 'tohead_number' WHEN (psequence='VcNumber') THEN 'vohead_number' WHEN (psequence='WoNumber') THEN 'wo_number' ELSE '' END ); ELSE UPDATE orderseq SET orderseq_number=pnumber WHERE (orderseq_name=psequence); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.setnextnumber(text, integer) OWNER TO admin; -- -- Name: setnextponumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextponumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='PoNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'PoNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='PoNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextponumber(integer) OWNER TO admin; -- -- Name: setnextprnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextprnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='PrNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'PrNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='PrNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextprnumber(integer) OWNER TO admin; -- -- Name: setnextqunumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextqunumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='QuNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'QuNumber', pQuNumber); ELSE UPDATE orderseq SET orderseq_number=pQuNumber WHERE (orderseq_name='QuNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextqunumber(integer) OWNER TO admin; -- -- Name: setnextshipmentnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextshipmentnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipmentNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='ShipmentNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'ShipmentNumber', pShipmentNumber); ELSE UPDATE orderseq SET orderseq_number=pShipmentNumber WHERE (orderseq_name='ShipmentNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextshipmentnumber(integer) OWNER TO admin; -- -- Name: setnextsonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextsonumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='SoNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'SoNumber', pSoNumber); ELSE UPDATE orderseq SET orderseq_number=pSoNumber WHERE (orderseq_name='SoNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextsonumber(integer) OWNER TO admin; -- -- Name: setnextvcnumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextvcnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='VcNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'VcNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='VcNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextvcnumber(integer) OWNER TO admin; -- -- Name: setnextwonumber(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setnextwonumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='WoNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'WoNumber', pWoNumber); ELSE UPDATE orderseq SET orderseq_number=pWoNumber WHERE (orderseq_name='WoNumber'); END IF; RETURN _orderseqid; END; $_$; ALTER FUNCTION public.setnextwonumber(integer) OWNER TO admin; -- -- Name: setusercancreateusers(text, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setusercancreateusers(pusername text, pcreateuser boolean) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pCreateUser) THEN EXECUTE 'ALTER USER "' || pUsername || '" CREATEROLE;'; ELSE EXECUTE 'ALTER USER "' || pUsername || '" NOCREATEROLE;'; END IF; RETURN TRUE; END; $$; ALTER FUNCTION public.setusercancreateusers(pusername text, pcreateuser boolean) OWNER TO admin; -- -- Name: setuserpreference(text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setuserpreference(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrefName ALIAS FOR $1; pPrefValue ALIAS FOR $2; BEGIN RETURN setUserPreferences(getEffectiveXtUser(), pPrefName, pPrefValue); END; $_$; ALTER FUNCTION public.setuserpreference(text, text) OWNER TO admin; -- -- Name: setuserpreference(text, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION setuserpreference(text, text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrefName ALIAS FOR $2; pPrefValue ALIAS FOR $3; _usrprefid INTEGER; BEGIN SELECT usrpref_id INTO _usrprefid FROM usrpref WHERE ( (usrpref_username=pUsername) AND (usrpref_name=pPrefName) ); IF (FOUND) THEN UPDATE usrpref SET usrpref_value=pPrefValue WHERE (usrpref_id=_usrprefid); ELSE INSERT INTO usrpref (usrpref_username, usrpref_name, usrpref_value) VALUES (pUsername, pPrefName, pPrefValue); END IF; RETURN TRUE; END; $_$; ALTER FUNCTION public.setuserpreference(text, text, text) OWNER TO admin; -- -- Name: shipments(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION shipments(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('SC', 'SV', 'SH', 'RS', 'TS')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.shipments(text) OWNER TO admin; -- -- Name: shipshipment(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION shipshipment(integer) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT shipShipment($1, CURRENT_TIMESTAMP); $_$; ALTER FUNCTION public.shipshipment(integer) OWNER TO admin; -- -- Name: shipshipment(integer, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION shipshipment(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pshipheadid ALIAS FOR $1; _timestamp TIMESTAMP WITH TIME ZONE := $2; _billedQty NUMERIC; _c RECORD; _coholdtype TEXT; _gldate DATE; _invhistid INTEGER; _itemlocSeries INTEGER; _lineitemsToClose INTEGER[]; _newQty NUMERIC; _result INTEGER; _s RECORD; _shipcomplete BOOLEAN; _shiphead RECORD; _ti RECORD; _to RECORD; _variance NUMERIC; _k RECORD; BEGIN IF (_timestamp IS NULL) THEN _timestamp := CURRENT_TIMESTAMP; END IF; _gldate := _timestamp::DATE; SELECT * INTO _shiphead FROM shiphead WHERE (shiphead_id=pshipheadid); IF (NOT FOUND) THEN RETURN -50; END IF; IF (_shiphead.shiphead_order_type = 'SO') THEN SELECT cohead_shipcomplete, cohead_holdtype INTO _shipcomplete, _coholdtype FROM cohead, shiphead WHERE ((shiphead_order_id=cohead_id) AND (NOT shiphead_shipped) AND (shiphead_order_type=_shiphead.shiphead_order_type) AND (shiphead_id=pshipheadid)); IF (_coholdtype = 'C') THEN RETURN -12; ELSIF (_coholdtype = 'P') THEN RETURN -13; ELSIF (_coholdtype = 'R') THEN RETURN -14; ELSIF (_coholdtype = 'S') THEN RETURN -15; END IF; ---Must Ship Kit components (coitem_subnumber <> 0 complete--------------- IF (( -- Test to see if order's customer accepts backorders and partials -- If not then test for shipping kit components complete SELECT cohead_number FROM shiphead, cohead, custinfo WHERE (shiphead_order_id = cohead_id) AND (cohead_cust_id = cust_id) AND (shiphead_order_type = 'SO') AND (cust_partialship) AND (cust_backorder) AND (shiphead_id = pshipheadid) ) IS NULL) THEN FOR _k IN SELECT (coitem_qtyord - (COALESCE(SUM(shipitem_qty),0) + (coitem_qtyshipped - coitem_qtyreturned))) AS remain FROM (coitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id)) ON (coitem_itemsite_id=itemsite_id)) LEFT OUTER JOIN shipitem ON (shipitem_orderitem_id=coitem_id AND shipitem_shiphead_id=pshipheadid) WHERE ((coitem_status NOT IN ('C','X')) AND (item_type != 'K') AND (coitem_cohead_id=_shiphead.shiphead_order_id) AND (coitem_subnumber <> 0) ) GROUP BY coitem_id, coitem_qtyshipped, coitem_qtyord, coitem_qtyreturned LOOP IF (_k.remain > 0) THEN RAISE EXCEPTION 'Kit component item not shipped complete. Kits must be shipped and shipped complete or closed on the order.'; END IF; END LOOP; END IF; ---End-------------------------------------------------------------------- IF ( _shipcomplete ) THEN FOR _c IN SELECT (coitem_qtyord - (COALESCE(SUM(shipitem_qty),0) + (coitem_qtyshipped - coitem_qtyreturned))) AS remain FROM (coitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id)) ON (coitem_itemsite_id=itemsite_id)) LEFT OUTER JOIN shipitem ON (shipitem_orderitem_id=coitem_id AND shipitem_shiphead_id=pshipheadid) WHERE ((coitem_status<>'X') AND (item_type != 'K') AND (coitem_cohead_id=_shiphead.shiphead_order_id)) GROUP BY coitem_id, coitem_qtyshipped, coitem_qtyord, coitem_qtyreturned LOOP IF (_c.remain > 0) THEN RETURN -99; END IF; END LOOP; END IF; FOR _c IN SELECT coitem_id, cohead_number, cohead_cust_id, cohead_billtoname, cohead_prj_id, cohead_saletype_id, cohead_shipzone_id, itemsite_id, itemsite_item_id, coitem_qty_invuomratio, coitem_warranty, coitem_cos_accnt_id, SUM(shipitem_qty) AS _qty, SUM(shipitem_value) AS _value FROM coitem, cohead, shiphead, shipitem, itemsite WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (shiphead_order_id=cohead_id) AND (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (NOT shiphead_shipped) AND (shiphead_id=pshipheadid) ) GROUP BY coitem_id, coitem_qty_invuomratio, cohead_number, cohead_cust_id, cohead_billtoname, itemsite_id, itemsite_item_id, coitem_warranty, coitem_cos_accnt_id, cohead_prj_id, cohead_saletype_id, cohead_shipzone_id LOOP IF _c._value > 0 THEN -- Distribute to G/L, credit Shipping Asset, debit COS SELECT MIN(insertGLTransaction( 'S/R', 'SH', _shiphead.shiphead_number, ('Ship Order ' || _c.cohead_number || ' for Customer ' || _c.cohead_billtoname), getPrjAccntId(_c.cohead_prj_id, costcat_shipasset_accnt_id), CASE WHEN (COALESCE(_c.coitem_cos_accnt_id, -1) != -1) THEN getPrjAccntId(_c.cohead_prj_id, _c.coitem_cos_accnt_id) WHEN (_c.coitem_warranty=TRUE) THEN getPrjAccntId(_c.cohead_prj_id, resolveCOWAccount(itemsite_id, _c.cohead_cust_id, _c.cohead_saletype_id, _c.cohead_shipzone_id)) ELSE getPrjAccntId(_c.cohead_prj_id, resolveCOSAccount(itemsite_id, _c.cohead_cust_id, _c.cohead_saletype_id, _c.cohead_shipzone_id)) END, -1, _c._value, _gldate )) INTO _result FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_c.itemsite_id) ); IF (_result < 0 AND _result != -3) THEN -- ignore -3 as it just means it's not posting a 0 value RETURN _result; END IF; END IF; UPDATE coitem SET coitem_qtyshipped = (coitem_qtyshipped + _c._qty) WHERE (coitem_id=_c.coitem_id); -- check to see if we have more invoiced than shipped items -- if we do we will need to mark some of these records as invoiced SELECT noNeg(( SELECT COALESCE(SUM(cobill_qty), 0.0) FROM cobill, cobmisc, coitem WHERE ( (cobill_cobmisc_id=cobmisc_id) AND (cobmisc_cohead_id=coitem_cohead_id) AND (cobill_coitem_id=coitem_id) AND (cobmisc_posted) AND (coitem_id=_c.coitem_id) ) ) - ( SELECT COALESCE(SUM(shipitem_qty), 0.0) FROM shipitem, shiphead, coitem WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shiphead_order_id=coitem_cohead_id) AND (shipitem_orderitem_id=coitem_id) AND (shiphead_order_type=_shiphead.shiphead_order_type) AND (shiphead_shipped) AND (coitem_id=_c.coitem_id) ) ) ) INTO _billedQty; IF (_billedQty > 0.0) THEN FOR _s IN SELECT shipitem_id, shipitem_qty FROM shipitem, shiphead WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=_c.coitem_id) AND (shiphead_order_type=_shiphead.shiphead_order_type) AND (NOT shiphead_shipped) AND (shiphead_id=pshipheadid) ) ORDER BY shipitem_qty LOOP IF (_billedQty > 0.0) THEN IF (_billedQty >= _s.shipitem_qty) THEN UPDATE shipitem SET shipitem_invoiced=TRUE WHERE shipitem_id=_s.shipitem_id; -- must wait to close coitems until after shiphead_shipped -> true _lineitemsToClose := _lineitemsToClose || _c.coitem_id; ELSE _newQty := _s.shipitem_qty - _billedQty; UPDATE shipitem SET shipitem_invoiced=TRUE, shipitem_qty=_billedQty WHERE shipitem_id=_s.shipitem_id; INSERT INTO shipitem ( shipitem_orderitem_id, shipitem_shipdate, shipitem_qty, shipitem_transdate, shipitem_invoiced, shipitem_shiphead_id, shipitem_trans_username) SELECT shipitem_orderitem_id, shipitem_shipdate, _newQty, shipitem_transdate, FALSE, shipitem_shiphead_id, shipitem_trans_username FROM shipitem WHERE (shipitem_id=_s.shipitem_id); END IF; _billedQty := _billedQty - _s.shipitem_qty; END IF; END LOOP; END IF; END LOOP; ELSEIF (_shiphead.shiphead_order_type = 'TO') THEN IF (_shiphead.shiphead_shipped) THEN RETURN -8; END IF; SELECT tohead.* INTO _to FROM tohead WHERE (tohead_id=_shiphead.shiphead_order_id); IF ( _to.tohead_shipcomplete ) THEN -- use sufficientInventory...()? FOR _ti IN SELECT (toitem_qty_ordered - (COALESCE(SUM(shipitem_qty),0) + toitem_qty_shipped)) AS remain FROM toitem LEFT OUTER JOIN shipitem ON (shipitem_orderitem_id=toitem_id) WHERE ((toitem_status<>'X') AND (toitem_tohead_id=_shiphead.shiphead_order_id)) GROUP BY toitem_qty_shipped, toitem_qty_ordered LOOP IF (_ti.remain > 0) THEN RETURN -99; END IF; END LOOP; END IF; FOR _ti IN SELECT toitem_id, toitem_item_id, SUM(shipitem_qty) AS qty, SUM(shipitem_value) AS value FROM toitem, shipitem WHERE ((toitem_tohead_id=_to.tohead_id) AND (shipitem_orderitem_id=toitem_id) AND (shipitem_shiphead_id=pshipheadid)) GROUP BY toitem_id, toitem_item_id LOOP IF (NOT EXISTS(SELECT itemsite_id FROM itemsite WHERE ((itemsite_item_id=_ti.toitem_item_id) AND (itemsite_warehous_id = _to.tohead_trns_warehous_id)) )) THEN RETURN -6; END IF; _itemlocSeries := NEXTVAL('itemloc_series_seq'); SELECT postInvTrans(si.itemsite_id, 'TS', _ti.qty, 'I/M', _shiphead.shiphead_order_type, formatToNumber(_ti.toitem_id), _to.tohead_number, 'Ship from Src to Transit Warehouse', tc.costcat_asset_accnt_id, sc.costcat_shipasset_accnt_id, _itemlocSeries, _timestamp, _ti.value) INTO _invhistid FROM itemsite AS ti, costcat AS tc, itemsite AS si, costcat AS sc WHERE ( (ti.itemsite_costcat_id=tc.costcat_id) AND (si.itemsite_costcat_id=sc.costcat_id) AND (ti.itemsite_item_id=_ti.toitem_item_id) AND (si.itemsite_item_id=_ti.toitem_item_id) AND (ti.itemsite_warehous_id=_to.tohead_trns_warehous_id) AND (si.itemsite_warehous_id=_to.tohead_src_warehous_id) ); --We do not need to distribute lot/serial info for transit, post trans and discard dist detail PERFORM postIntoTrialBalance(itemlocpost_glseq) FROM itemlocpost WHERE (itemlocpost_itemlocseries=_itemlocSeries); PERFORM postInvHist(_invhistid); DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); DELETE FROM itemlocpost WHERE (itemlocpost_itemlocSeries=_itemlocSeries); IF (_result < 0) THEN RETURN _result; END IF; -- record inventory history and qoh changes at transit warehouse but -- there is only one g/l account to touch SELECT postInvTrans(ti.itemsite_id, 'TR', _ti.qty, 'I/M', _shiphead.shiphead_order_type, formatToNumber(_ti.toitem_id), _to.tohead_number, 'Receive into Transit from Src Warehouse', tc.costcat_asset_accnt_id, tc.costcat_asset_accnt_id, _itemlocSeries, _timestamp, _ti.value) INTO _invhistid FROM itemsite AS ti, costcat AS tc WHERE ((ti.itemsite_costcat_id=tc.costcat_id) AND (ti.itemsite_item_id=_ti.toitem_item_id) AND (ti.itemsite_warehous_id=_to.tohead_trns_warehous_id)); --We do not need to distribute lot/serial info for transit, post trans and discard dist detail PERFORM postIntoTrialBalance(itemlocpost_glseq) FROM itemlocpost WHERE (itemlocpost_itemlocseries=_itemlocSeries); PERFORM postInvHist(_invhistid); DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); DELETE FROM itemlocpost WHERE (itemlocpost_itemlocSeries=_itemlocSeries); --See if there was a change in values during the transfer, if so record the variance SELECT (invhist_invqty * invhist_unitcost - _ti.value) INTO _variance FROM invhist WHERE (invhist_id=_invhistid); IF (_variance > 0) THEN PERFORM insertGLTransaction( 'S/R', _shiphead.shiphead_order_type, _to.tohead_number, 'Transfer Order - Transfer Variance', tc.costcat_invcost_accnt_id, tc.costcat_asset_accnt_id, _invhistid, _variance, CAST(_timestamp AS DATE) ) FROM itemsite AS ti, costcat AS tc WHERE ( (ti.itemsite_costcat_id=tc.costcat_id) AND (ti.itemsite_item_id=_ti.toitem_item_id) AND (ti.itemsite_warehous_id=_to.tohead_trns_warehous_id) ); END IF; IF (_result < 0) THEN RETURN _result; END IF; UPDATE shipitem SET shipitem_shipdate=_timestamp, shipitem_shipped=TRUE WHERE ((shipitem_orderitem_id=_ti.toitem_id) AND (shipitem_shiphead_id=pshipheadid)); UPDATE toitem SET toitem_qty_shipped = (toitem_qty_shipped + _ti.qty) WHERE (toitem_id=_ti.toitem_id); END LOOP; END IF; UPDATE shiphead SET shiphead_shipped=TRUE, shiphead_shipdate=_gldate WHERE (shiphead_id=pshipheadid); -- now try to close line items that are fully shipped and invoiced IF (_shiphead.shiphead_order_type = 'SO') THEN UPDATE coitem SET coitem_status='C' WHERE ((coitem_id = ANY (_lineitemsToClose)) AND (coitem_qtyshipped >= coitem_qtyord)); END IF; RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.shipshipment(integer, timestamp with time zone) OWNER TO admin; -- -- Name: singlecharacteristicstostring(text, integer, text, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION singlecharacteristicstostring(text, integer, text, text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetId ALIAS FOR $2; pValKeySep ALIAS FOR $3; pPairSep ALIAS FOR $4; pCharId ALIAS FOR $5; _string TEXT := ''; _extra BOOLEAN := false; _r RECORD; BEGIN FOR _r IN SELECT char_name, charass_value FROM charass, char WHERE ((charass_char_id=char_id) AND (charass_char_id=pCharId) AND (charass_target_type=pTargetType) AND (charass_target_id=pTargetId)) LOOP IF(_extra) THEN _string := _string || pPairSep; END IF; _extra := true; _string := _string || _r.char_name || pValKeySep || _r.charass_value; END LOOP; RETURN _string; END; $_$; ALTER FUNCTION public.singlecharacteristicstostring(text, integer, text, text, integer) OWNER TO admin; -- -- Name: singlelevelbom(integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION singlelevelbom(integer, integer, integer, integer) RETURNS SETOF bomdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; pExpiredDays ALIAS FOR $3; pFutureDays ALIAS FOR $4; _row bomdata%ROWTYPE; _bomworksetid INTEGER; _x RECORD; _check CHAR(1); _inactive BOOLEAN; _batchsize NUMERIC; BEGIN _inactive := FALSE; IF (pRevisionid != -1) THEN --Is this a deactivated revision? SELECT rev_status INTO _check FROM rev WHERE ((rev_id=pRevisionid) AND (rev_status='I')); IF (FOUND) THEN _inactive := TRUE; END IF; END IF; -- Get the batch quantity SELECT COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=pRevisionid))),1) INTO _batchsize; IF NOT (_inactive) THEN FOR _x IN SELECT bomitem_id, bomitem_seqnumber, bomitem_seqnumber AS f_bomitem_seqnumber, item_id, item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, bomitem_scrap, bomitem_createwo, CASE WHEN (bomitem_issuemethod='S') THEN 'Push' WHEN (bomitem_issuemethod='L') THEN 'Pull' WHEN (bomitem_issuemethod='M') THEN 'Mixed' ELSE 'Special' END AS issuemethod, bomitem_effective, bomitem_expires, CASE WHEN (bomitem_expires <= CURRENT_DATE) THEN TRUE ELSE FALSE END AS expired, CASE WHEN (bomitem_effective > CURRENT_DATE) THEN TRUE ELSE FALSE END AS future, actcost(bomitem_item_id, bomitem_id) AS actunitcost, stdcost(bomitem_item_id, bomitem_id) AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * actcost(bomitem_item_id, bomitem_id) ELSE 0.0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * stdcost(bomitem_item_id, bomitem_id) ELSE 0.0 END AS stdextendedcost, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref FROM bomitem(pItemid,pRevisionid), item, uom WHERE ( (item_inv_uom_id=uom_id) AND (bomitem_item_id=item_id) AND (bomitem_expires > (CURRENT_DATE - pExpiredDays)) AND (bomitem_effective <= (CURRENT_DATE + pFutureDays)) ) UNION SELECT -1, -1, NULL, -1, costelem_type AS bomdata_item_number, '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, false,false, currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actunitcost, itemcost_stdcost AS stdunitcost, currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actextendedcost, itemcost_stdcost AS stdextendedcost, NULL, NULL, NULL, NULL FROM itemcost, costelem WHERE ( (itemcost_costelem_id=costelem_id) AND (NOT itemcost_lowlevel) AND (itemcost_item_id=pItemid) ) ORDER BY bomitem_seqnumber, bomitem_effective, item_number LOOP _row.bomdata_bomitem_id := _x.bomitem_id; _row.bomdata_bomwork_seqnumber := _x.f_bomitem_seqnumber; _row.bomdata_item_id := _x.item_id; _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_batchsize := _batchsize; _row.bomdata_qtyfxd := _x.qtyfxd; _row.bomdata_qtyper := _x.qtyper; _row.bomdata_scrap := _x.bomitem_scrap; _row.bomdata_createchild := _x.bomitem_createwo; _row.bomdata_issuemethod := _x.issuemethod; _row.bomdata_effective := _x.bomitem_effective; _row.bomdata_expires := _x.bomitem_expires; _row.bomdata_expired := _x.expired; _row.bomdata_future := _x.future; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_char_id := _x.bomitem_char_id; _row.bomdata_value := _x.bomitem_value; _row.bomdata_notes := _x.bomitem_notes; _row.bomdata_ref := _x.bomitem_ref; RETURN NEXT _row; END LOOP; ELSE -- Use historical snapshot for inactive revisions FOR _x IN SELECT bomitem_id, bomitem_seqnumber, bomitem_seqnumber AS f_bomitem_seqnumber, item_id, item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, bomitem_scrap, bomitem_createwo, CASE WHEN (bomitem_issuemethod='S') THEN 'Push' WHEN (bomitem_issuemethod='L') THEN 'Pull' WHEN (bomitem_issuemethod='M') THEN 'Mixed' ELSE 'Special' END AS issuemethod, bomitem_effective, bomitem_expires, CASE WHEN (bomitem_expires <= CURRENT_DATE) THEN TRUE ELSE FALSE END AS expired, CASE WHEN (bomitem_effective > CURRENT_DATE) THEN TRUE ELSE FALSE END AS future, actcost(bomitem_item_id) AS actunitcost, stdcost(bomitem_item_id) AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * actcost(bomitem_item_id) ELSE 0.0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * stdcost(bomitem_item_id) ELSE 0.0 END AS stdextendedcost, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref FROM bomitem(pItemid,pRevisionid), item, uom WHERE ( (item_inv_uom_id=uom_id) AND (bomitem_item_id=item_id) AND (bomitem_expires > (CURRENT_DATE - pExpiredDays)) AND (bomitem_effective <= (CURRENT_DATE + pFutureDays)) ) UNION SELECT -1, -1, NULL, -1, costelem_type AS bomdata_item_number, '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, false,false, bomhist_actunitcost AS actunitcost, bomhist_stdunitcost AS stdunitcost, bomhist_actunitcost AS actextendedcost, bomhist_stdunitcost AS stdextendedcost, NULL, NULL, NULL, NULL FROM bomhist, costelem WHERE ( (bomhist_item_id=costelem_id) AND (bomhist_item_type='E') AND (bomhist_rev_id=pRevisionid) ) ORDER BY bomitem_seqnumber, bomitem_effective, item_number LOOP _row.bomdata_bomitem_id := _x.bomitem_id; _row.bomdata_bomwork_seqnumber := _x.f_bomitem_seqnumber; _row.bomdata_item_id := _x.item_id; _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_batchsize := _batchsize; _row.bomdata_qtyfxd := _x.qtyfxd; _row.bomdata_qtyper := _x.qtyper; _row.bomdata_scrap := _x.bomitem_scrap; _row.bomdata_createchild := _x.bomitem_createwo; _row.bomdata_issuemethod := _x.issuemethod; _row.bomdata_effective := _x.bomitem_effective; _row.bomdata_expires := _x.bomitem_expires; _row.bomdata_expired := _x.expired; _row.bomdata_future := _x.future; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_char_id := _x.bomitem_char_id; _row.bomdata_value := _x.bomitem_value; _row.bomdata_notes := _x.bomitem_notes; _row.bomdata_ref := _x.bomitem_ref; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; ALTER FUNCTION public.singlelevelbom(integer, integer, integer, integer) OWNER TO admin; -- -- Name: site(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION site() RETURNS SETOF whsinfo LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row whsinfo%ROWTYPE; _r RECORD; BEGIN IF ( (fetchMetricBool('MultiWhs')) AND (SELECT (COUNT(usrpref_id)=1) FROM usrpref WHERE ((usrpref_name='selectedSites') AND (usrpref_value='t') AND (usrpref_username=getEffectiveXtUser()))) ) THEN FOR _r IN SELECT * FROM whsinfo,usrsite WHERE ((warehous_id=usrsite_warehous_id) AND (usrsite_username=getEffectiveXtUser())) LOOP _row.warehous_id:=_r.warehous_id; _row.warehous_code:=_r.warehous_code; _row.warehous_descrip:=_r.warehous_descrip; _row.warehous_fob:=_r.warehous_fob; _row.warehous_active:=_r.warehous_active; _row.warehous_counttag_prefix:=_r.warehous_counttag_prefix; _row.warehous_counttag_number:=_r.warehous_counttag_number; _row.warehous_bol_prefix:=_r.warehous_bol_prefix; _row.warehous_bol_number:=_r.warehous_bol_number; _row.warehous_shipping:=_r.warehous_shipping; _row.warehous_useslips:=_r.warehous_useslips; _row.warehous_usezones:=_r.warehous_usezones; _row.warehous_aislesize:=_r.warehous_aislesize; _row.warehous_racksize:=_r.warehous_racksize; _row.warehous_binsize:=_r.warehous_binsize; _row.warehous_binalpha:=_r.warehous_binalpha; _row.warehous_locationsize:=_r.warehous_locationsize; _row.warehous_locationalpha:=_r.warehous_locationalpha; _row.warehous_enforcearbl:=_r.warehous_enforcearbl; _row.warehous_default_accnt_id:=_r.warehous_default_accnt_id; _row.warehous_shipping_commission:=_r.warehous_shipping_commission; _row.warehous_cntct_id:=_r.warehous_cntct_id; _row.warehous_addr_id:=_r.warehous_addr_id; _row.warehous_taxzone_id:=_r.warehous_taxzone_id; _row.warehous_transit:=_r.warehous_transit; _row.warehous_shipform_id:=_r.warehous_shipform_id; _row.warehous_shipvia_id:=_r.warehous_shipvia_id; _row.warehous_shipcomments:=_r.warehous_shipcomments; _row.warehous_costcat_id:=_r.warehous_costcat_id; _row.warehous_sitetype_id:=_r.warehous_sitetype_id; RETURN NEXT _row; END LOOP; ELSE FOR _r IN SELECT * FROM whsinfo LOOP _row.warehous_id:=_r.warehous_id; _row.warehous_code:=_r.warehous_code; _row.warehous_descrip:=_r.warehous_descrip; _row.warehous_fob:=_r.warehous_fob; _row.warehous_active:=_r.warehous_active; _row.warehous_counttag_prefix:=_r.warehous_counttag_prefix; _row.warehous_counttag_number:=_r.warehous_counttag_number; _row.warehous_bol_prefix:=_r.warehous_bol_prefix; _row.warehous_bol_number:=_r.warehous_bol_number; _row.warehous_shipping:=_r.warehous_shipping; _row.warehous_useslips:=_r.warehous_useslips; _row.warehous_usezones:=_r.warehous_usezones; _row.warehous_aislesize:=_r.warehous_aislesize; _row.warehous_racksize:=_r.warehous_racksize; _row.warehous_binsize:=_r.warehous_binsize; _row.warehous_binalpha:=_r.warehous_binalpha; _row.warehous_locationsize:=_r.warehous_locationsize; _row.warehous_locationalpha:=_r.warehous_locationalpha; _row.warehous_enforcearbl:=_r.warehous_enforcearbl; _row.warehous_default_accnt_id:=_r.warehous_default_accnt_id; _row.warehous_shipping_commission:=_r.warehous_shipping_commission; _row.warehous_cntct_id:=_r.warehous_cntct_id; _row.warehous_addr_id:=_r.warehous_addr_id; _row.warehous_taxzone_id:=_r.warehous_taxzone_id; _row.warehous_transit:=_r.warehous_transit; _row.warehous_shipform_id:=_r.warehous_shipform_id; _row.warehous_shipvia_id:=_r.warehous_shipvia_id; _row.warehous_shipcomments:=_r.warehous_shipcomments; _row.warehous_costcat_id:=_r.warehous_costcat_id; _row.warehous_sitetype_id:=_r.warehous_sitetype_id; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; ALTER FUNCTION public.site() OWNER TO admin; -- -- Name: snoozemessage(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION snoozemessage(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMsgid ALIAS FOR $1; snooze INTERVAL := '10 minutes'; BEGIN UPDATE msg SET msg_scheduled=(msg_scheduled + snooze) WHERE (msg_id=pMsgid); RETURN TRUE; END; $_$; ALTER FUNCTION public.snoozemessage(integer) OWNER TO admin; -- -- Name: spellamount(numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION spellamount(numeric) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN spellAmount($1, baseCurrId()); END; $_$; ALTER FUNCTION public.spellamount(numeric) OWNER TO admin; -- -- Name: spellamount(numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION spellamount(numeric, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pN ALIAS FOR $1; pCurrId ALIAS FOR $2; _t text; _dollars text; _cents text; _l integer; _p integer; _words text; _word text; _hundreds char; _tens char; _ones char; _fractionalPartName text; _curr curr_symbol%ROWTYPE; BEGIN _t := ltrim(to_char(pN, '999999999990D99'),' '); IF strpos(_t, '.') > 0 THEN _dollars := split_part(_t, '.', 1); _cents := split_part(_t, '.', 2); ELSIF strpos(_t, ',') > 0 THEN _dollars := split_part(_t, ',', 1); _cents := split_part(_t, ',', 2); END IF; _p := 0; _l := length(_dollars); _words := ''; WHILE (_p < _l) LOOP IF((_l - _p - 2) < 1) THEN _hundreds := '0'; ELSE _hundreds := substr(_dollars, _l - _p - 2, 1); END IF; IF((_l - _p - 1) < 1) THEN _tens := '0'; ELSE _tens := substr(_dollars, _l - _p - 1, 1); END IF; IF((_l - _p) < 1) THEN _ones := '0'; ELSE _ones := substr(_dollars, _l - _p, 1); END IF; IF(_hundreds != '0' OR _tens != '0' OR _ones != '0') THEN IF (_p = 3) THEN _words := 'thousand ' || _words; ELSIF (_p = 6) THEN _words := 'million ' || _words; ELSIF (_p = 9) THEN _words := 'billion ' || _words; END IF; _word := ''; IF(_tens = '1') THEN IF(_ones = '0') THEN _word := 'ten'; ELSIF(_ones = '1') THEN _word := 'eleven'; ELSIF(_ones = '2') THEN _word := 'twelve'; ELSIF(_ones = '3') THEN _word := 'thirteen'; ELSIF(_ones = '4') THEN _word := 'fourteen'; ELSIF(_ones = '5') THEN _word := 'fifteen'; ELSIF(_ones = '6') THEN _word := 'sixteen'; ELSIF(_ones = '7') THEN _word := 'seventeen'; ELSIF(_ones = '8') THEN _word := 'eighteen'; ELSIF(_ones = '9') THEN _word := 'nineteen'; ELSE _word := 'ERROR'; END IF; ELSE IF(_ones = '1') THEN _word := 'one'; ELSIF(_ones = '2') THEN _word := 'two'; ELSIF(_ones = '3') THEN _word := 'three'; ELSIF(_ones = '4') THEN _word := 'four'; ELSIF(_ones = '5') THEN _word := 'five'; ELSIF(_ones = '6') THEN _word := 'six'; ELSIF(_ones = '7') THEN _word := 'seven'; ELSIF(_ones = '8') THEN _word := 'eight'; ELSIF(_ones = '9') THEN _word := 'nine'; ELSIF(_ones != '0') THEN _word := 'ERROR'; END IF; if(_tens != '0') THEN _word := '-' || _word; END IF; IF(_tens = '2') THEN _word := 'twenty' || _word; ELSIF(_tens = '3') THEN _word := 'thirty' || _word; ELSIF(_tens = '4') THEN _word := 'forty' || _word; ELSIF(_tens = '5') THEN _word := 'fifty' || _word; ELSIF(_tens = '6') THEN _word := 'sixty' || _word; ELSIF(_tens = '7') THEN _word := 'seventy' || _word; ELSIF(_tens = '8') THEN _word := 'eighty' || _word; ELSIF(_tens = '9') THEN _word := 'ninety' || _word; ELSIF(_tens != '0' AND _tens != '1') THEN _word := 'ERROR' || _word; END IF; END IF; if(_word != '') THEN _words := _word || ' ' || _words; END IF; _word := ''; IF(_hundreds = '1') THEN _word := 'one hundred'; ELSIF(_hundreds = '2') THEN _word := 'two hundred'; ELSIF(_hundreds = '3') THEN _word := 'three hundred'; ELSIF(_hundreds = '4') THEN _word := 'four hundred'; ELSIF(_hundreds = '5') THEN _word := 'five hundred'; ELSIF(_hundreds = '6') THEN _word := 'six hundred'; ELSIF(_hundreds = '7') THEN _word := 'seven hundred'; ELSIF(_hundreds = '8') THEN _word := 'eight hundred'; ELSIF(_hundreds = '9') THEN _word := 'nine hundred'; ELSIF(_hundreds != '0') THEN _words := 'ERROR'; END IF; if(_word != '') THEN _words := _word || ' ' || _words; END IF; END IF; _p := _p + 3; END LOOP; _words := rtrim(_words, ' '); IF(_words = '') THEN _words := 'zero'; END IF; SELECT * INTO _curr FROM curr_symbol WHERE curr_id = pCurrId; IF(_words = 'one') AND TRIM(_curr.curr_name) ~ '.*s' THEN _word := rtrim(_curr.curr_name, ' s'); ELSE _word := trim(_curr.curr_name); END IF; IF _curr.curr_abbr = 'USD' OR _curr.curr_abbr = 'CAD' THEN IF (_cents = '1') THEN _fractionalPartName = ' cent'; ELSE _fractionalPartName = ' cents'; END IF; ELSE _fractionalPartName = ' / 100 '; END IF; RETURN _words || ' ' || _word || ' and ' || _cents || _fractionalPartName; END; $_$; ALTER FUNCTION public.spellamount(numeric, integer) OWNER TO admin; -- -- Name: splitreceipt(integer, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION splitreceipt(integer, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE precvid ALIAS FOR $1; pqty ALIAS FOR $2; pfreight ALIAS FOR $3; _check RECORD; _seq INTEGER; BEGIN -- validate IF (COALESCE(pQty,0) <= 0) THEN RETURN -7; END IF; SELECT * INTO _check FROM recv WHERE (recv_id=precvid); IF (FOUND) THEN IF (_check.recv_order_type != 'PO') THEN RETURN -1; ELSIF ( NOT _check.recv_posted) THEN RETURN -2; ELSIF ( (_check.recv_invoiced) OR (_check.recv_vohead_id IS NOT NULL) OR (_check.recv_voitem_id IS NOT NULL) ) THEN RETURN -3; ELSIF (pqty >= _check.recv_qty) THEN RETURN -4; ELSIF (COALESCE(pfreight,0) > _check.recv_freight) THEN RETURN -5; END IF; ELSE RETURN -6; END IF; -- Create new receipt record _seq := nextval('recv_recv_id_seq'); INSERT INTO recv SELECT _seq, recv_order_type,recv_order_number, recv_orderitem_id, recv_agent_username, recv_itemsite_id, recv_vend_id, recv_vend_item_number, recv_vend_item_descrip, recv_vend_uom, recv_purchcost, recv_purchcost_curr_id, recv_duedate, pqty, recv_recvcost, recv_recvcost_curr_id, COALESCE(pfreight,0), recv_freight_curr_id, recv_date, ROUND(recv_value/recv_qty * pqty, 2), TRUE, FALSE, NULL, NULL, recv_trans_usr_name, recv_notes, recv_gldistdate, precvid FROM recv WHERE (recv_id=precvid); -- Update qty and value of old record UPDATE recv SET recv_qty = recv_qty-pqty, recv_value = recv_value - ROUND(recv_value/recv_qty * pqty, 2), recv_freight = recv_freight - COALESCE(pfreight,0) WHERE (recv_id=precvid); RETURN _seq; END; $_$; ALTER FUNCTION public.splitreceipt(integer, numeric, numeric) OWNER TO admin; -- -- Name: splitrecurrence(integer, text, timestamp with time zone); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION splitrecurrence(integer, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentid ALIAS FOR $1; pType TEXT := UPPER($2); pDatetime TIMESTAMP WITH TIME ZONE := COALESCE($3, CURRENT_TIMESTAMP); _count INTEGER; _newrecurid INTEGER; _newparentid INTEGER; _newparentstmt TEXT; _rt RECORD; _updchildstmt TEXT; BEGIN IF (pParentid IS NULL) THEN RETURN -11; END IF; SELECT * INTO _rt FROM recurtype WHERE (UPPER(recurtype_type)=pType); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count <= 0) THEN RETURN -10; END IF; _newparentstmt := 'SELECT [table]_id FROM [fulltable]' || ' WHERE (([table]_recurring_[table]_id=$1)' || ' AND NOT ([done])' || ' AND ([schedcol]>=''$2''))' || ' ORDER BY [schedcol]' || ' LIMIT 1;'; _newparentstmt := REPLACE(_newparentstmt, '[fulltable]', _rt.recurtype_table); _newparentstmt := REPLACE(_newparentstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _newparentstmt := REPLACE(_newparentstmt, '[done]', _rt.recurtype_donecheck); _newparentstmt := REPLACE(_newparentstmt, '[schedcol]', _rt.recurtype_schedcol); _updchildstmt := 'UPDATE [fulltable] SET [table]_recurring_[table]_id=$1' || ' WHERE (([table]_recurring_[table]_id=$2)' || ' AND NOT ([done])' || ' AND ([schedcol] > ''$3''));'; _updchildstmt := REPLACE(_updchildstmt, '[fulltable]', _rt.recurtype_table); _updchildstmt := REPLACE(_updchildstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _updchildstmt := REPLACE(_updchildstmt, '[done]', _rt.recurtype_donecheck); _updchildstmt := REPLACE(_updchildstmt, '[schedcol]', _rt.recurtype_schedcol); -- 8.4+: EXECUTE _newparentstmt INTO _newparentid USING pParentid, pDatetime; EXECUTE REPLACE(REPLACE(_newparentstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT) INTO _newparentid; -- if nothing to split IF (_newparentid = pParentid OR _newparentid IS NULL) THEN SELECT recur_id INTO _newrecurid FROM recur WHERE ((recur_parent_id=pParentid) AND (recur_parent_type=pType)); ELSE INSERT INTO recur (recur_parent_id, recur_parent_type, recur_period, recur_freq, recur_start, recur_end, recur_max, recur_data ) SELECT _newparentid, pType, recur_period, recur_freq, pDatetime, recur_end, recur_max, recur_data FROM recur WHERE ((recur_parent_id=pParentid) AND (recur_parent_type=pType)) RETURNING recur_id INTO _newrecurid; UPDATE recur SET recur_end=pDatetime WHERE ((recur_parent_id=pParentid) AND (recur_parent_type=pType)); -- 8.4+: EXECUTE _updchildstmt USING _newparentid, pParentid, pDatetime; EXECUTE REPLACE(REPLACE(REPLACE(_updchildstmt, '$1', _newparentid::TEXT), '$2', pParentid::TEXT), '$3', pDatetime::TEXT); END IF; RETURN _newrecurid; END; $_$; ALTER FUNCTION public.splitrecurrence(integer, text, timestamp with time zone) OWNER TO admin; -- -- Name: startoftime(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION startoftime() RETURNS date LANGUAGE sql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT DATE('1970-01-01') AS return; $$; ALTER FUNCTION public.startoftime() OWNER TO admin; -- -- Name: stdcost(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION stdcost(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN stdCost($1, NULL); END; $_$; ALTER FUNCTION public.stdcost(integer) OWNER TO admin; -- -- Name: stdcost(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION stdcost(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pBomitemid ALIAS FOR $2; _cost NUMERIC; BEGIN SELECT SUM(COALESCE(bomitemcost_stdcost, itemcost_stdcost)) INTO _cost FROM itemcost LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=pBomitemid AND bomitemcost_costelem_id=itemcost_costelem_id) WHERE (itemcost_item_id=pItemid); IF (_cost IS NULL) THEN RETURN 0; ELSE RETURN _cost; END IF; END; $_$; ALTER FUNCTION public.stdcost(integer, integer) OWNER TO admin; -- -- Name: sufficientinventorytoshipitem(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION sufficientinventorytoshipitem(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; BEGIN RETURN sufficientInventoryToShipItem(pordertype, porderitemid, NULL); END; $_$; ALTER FUNCTION public.sufficientinventorytoshipitem(text, integer) OWNER TO admin; -- -- Name: sufficientinventorytoshipitem(text, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION sufficientinventorytoshipitem(text, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; pqty ALIAS FOR $3; _returnVal INTEGER; _isqtyavail BOOLEAN; BEGIN IF (porderitemid IS NULL) THEN RETURN -1; END IF; IF (pordertype = 'SO') THEN IF ( SELECT fetchMetricBool('EnableSOReservations') ) THEN IF (SELECT (itemsite_costmethod = 'J') FROM coitem JOIN itemsite ON (coitem_itemsite_id=itemsite_id) WHERE (coitem_id=porderitemid)) THEN RETURN 0; END IF; SELECT (((COALESCE(pqty, roundQty(item_fractional, noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(pordertype, coitem_id) ))) - coitem_qtyreserved) * coitem_qty_invuomratio ) <= itemsite_qtyonhand) AND (((COALESCE(pqty, roundQty(item_fractional, noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(pordertype, coitem_id) ))) - coitem_qtyreserved) * coitem_qty_invuomratio ) <= qtyunreserved(itemsite_id)) INTO _isqtyavail FROM coitem, itemsite, item WHERE ((coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'X') AND (NOT ((item_type IN ('R','J')) OR (itemsite_controlmethod = 'N'))) AND (itemsite_item_id=item_id) AND (coitem_id=porderitemid)); ELSE SELECT (COALESCE(pqty, roundQty(item_fractional, noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(pordertype, coitem_id) - coitem_qtyreserved ) * coitem_qty_invuomratio ) ) <= itemsite_qtyonhand) INTO _isqtyavail FROM coitem, itemsite, item WHERE ((coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'X') AND (NOT ((item_type IN ('R','J')) OR (itemsite_controlmethod = 'N'))) AND (itemsite_item_id=item_id) AND (coitem_id=porderitemid)); END IF; ELSEIF (pordertype = 'TO') THEN SELECT (COALESCE(pqty, roundQty(item_fractional, noNeg(toitem_qty_ordered - toitem_qty_shipped - qtyAtShipping(pordertype, toitem_id) ) ) ) <= itemsite_qtyonhand) INTO _isqtyavail FROM toitem, tohead, itemsite, item WHERE ((toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id) AND (itemsite_warehous_id=tohead_src_warehous_id) AND (itemsite_item_id=item_id) AND (toitem_status <> 'X') AND (NOT ((item_type IN ('R','J')) OR (itemsite_controlmethod = 'N'))) AND (toitem_id=porderitemid)); ELSE RETURN -11; END IF; IF (NOT _isqtyavail) THEN RETURN -2; END IF; IF (pordertype = 'SO') THEN SELECT (COALESCE((SELECT SUM(itemloc_qty) FROM itemloc WHERE (itemloc_itemsite_id=itemsite_id)), 0.0) >= roundQty(item_fractional, COALESCE(pQty, noNeg( coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(pordertype, coitem_id) )) * coitem_qty_invuomratio )) INTO _isqtyavail FROM coitem, itemsite, item WHERE ((coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (NOT ((item_type ='R') OR (itemsite_controlmethod = 'N'))) AND ((itemsite_controlmethod IN ('L', 'S')) OR (itemsite_loccntrl)) AND (coitem_id=porderitemid)); ELSEIF (pordertype = 'TO') THEN SELECT (COALESCE((SELECT SUM(itemloc_qty) FROM itemloc WHERE (itemloc_itemsite_id=itemsite_id)), 0.0) >= roundQty(item_fractional, noNeg( toitem_qty_ordered - toitem_qty_shipped - qtyAtShipping(pordertype, toitem_id) ) )) INTO _isqtyavail FROM toitem, tohead, itemsite, item WHERE ((toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id) AND (itemsite_item_id=item_id) AND (toitem_status <> 'X') AND (NOT ((item_type ='R') OR (itemsite_costmethod = 'J') OR (itemsite_controlmethod = 'N'))) AND ((itemsite_controlmethod IN ('L', 'S')) OR (itemsite_loccntrl)) AND (toitem_id=porderitemid)); END IF; IF (NOT _isqtyavail) THEN RETURN -3; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.sufficientinventorytoshipitem(text, integer, numeric) OWNER TO admin; -- -- Name: sufficientinventorytoshiporder(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION sufficientinventorytoshiporder(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderid ALIAS FOR $2; _s RECORD; _returnVal INTEGER := 0; BEGIN IF (pordertype = 'SO') THEN FOR _s IN SELECT coitem_id FROM coitem JOIN itemsite ON (coitem_itemsite_id=itemsite_id) WHERE((coitem_cohead_id=porderid) AND (itemsite_costmethod != 'J')) LOOP _returnVal := sufficientInventoryToShipItem(pordertype, _s.coitem_id); EXIT WHEN (_returnVal < 0); END LOOP; ELSEIF (pordertype = 'TO') THEN FOR _s IN SELECT toitem_id FROM toitem WHERE(toitem_tohead_id=porderid) LOOP _returnVal := sufficientInventoryToShipItem(pordertype, _s.toitem_id); EXIT WHEN (_returnVal < 0); END LOOP; END IF; RETURN _returnVal; END; $_$; ALTER FUNCTION public.sufficientinventorytoshiporder(text, integer) OWNER TO admin; -- -- Name: summarizedbom(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summarizedbom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _revid INTEGER; BEGIN SELECT getActiveRevId('BOM',pItemid) INTO _revid; RETURN summarizedBOM(pItemid, _revid); END; $_$; ALTER FUNCTION public.summarizedbom(integer) OWNER TO admin; -- -- Name: summarizedbom(integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summarizedbom(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pExpired ALIAS FOR $2; pFuture ALIAS FOR $3; _revid INTEGER; BEGIN SELECT getActiveRevId('BOM',pItemid) INTO _revid; RETURN summarizedBOM(pItemid, _revid, pExpired, pFuture); END; $_$; ALTER FUNCTION public.summarizedbom(integer, integer, integer) OWNER TO admin; -- -- Name: summarizedbom(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summarizedbom(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; _bomworkid INTEGER; _indexid INTEGER; _r RECORD; BEGIN -- Check on the temporary workspace -- PERFORM maintainBOMWorkspace(); -- Grab a new index for this bomwork set SELECT NEXTVAL('misc_index_seq') INTO _indexid; -- Step through all of the components of the passed pItemid FOR _r IN SELECT bomitem.*, item_id, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, stdcost(item_id, bomitem_id) AS standardcost, actcost(item_id, bomitem_id) AS actualcost FROM bomitem(pItemid, pRevisionid), item WHERE (bomitem_item_id=item_id) LOOP -- Insert the component and bomitem parameters SELECT NEXTVAL('bomwork_bomwork_id_seq') INTO _bomworkid; INSERT INTO bomwork ( bomwork_id, bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_parent_seqnumber, bomwork_seqnumber, bomwork_item_id, bomwork_createwo, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_stdunitcost, bomwork_actunitcost ) VALUES ( _bomworkid, _indexid, -1, 1, 0, _r.bomitem_seqnumber, _r.item_id, _r.bomitem_createwo, (_r.qtyfxd + _r.qtyper), _r.qtyfxd, _r.qtyper, _r.bomitem_scrap, _r.bomitem_issuemethod, _r.bomitem_effective, _r.bomitem_expires, _r.standardcost, _r.actualcost, _r.bomitem_char_id, _r.bomitem_value, _r.bomitem_notes, _r.bomitem_ref, _r.bomitem_id, _r.bomitem_ecn ); -- Explode the components of the current component PERFORM explodeBOM(_r.item_id, _bomworkid, 1); END LOOP; -- Return a key to the result RETURN _indexid; END; $_$; ALTER FUNCTION public.summarizedbom(integer, integer) OWNER TO admin; -- -- Name: summarizedbom(integer, integer, integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summarizedbom(integer, integer, integer, integer) RETURNS SETOF bomdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; pExpiredDays INTEGER := COALESCE($3, 0); pFutureDays INTEGER := COALESCE($4, 0); _row bomdata%ROWTYPE; _bomworksetid INTEGER; _x RECORD; _check CHAR(1); _inactive BOOLEAN := FALSE; _batchsize NUMERIC; BEGIN IF (pRevisionid != -1) THEN --Is this a deactivated revision? SELECT rev_status INTO _check FROM rev WHERE ((rev_id=pRevisionid) AND (rev_status='I')); IF (FOUND) THEN _inactive := TRUE; END IF; END IF; -- Get the batch quantity SELECT COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=pRevisionid))),1) INTO _batchsize; IF NOT (_inactive) THEN --We can explode this out based on current data SELECT indentedBOM(pItemid, pRevisionid) INTO _bomworksetid; FOR _x IN SELECT item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, SUM(bomwork_qtyreq) AS qtyreq, SUM(bomwork_qtyfxd * (1 + bomwork_scrap)) AS qtyfxd, SUM(bomwork_qtyper * (1 + bomwork_scrap)) AS qtyper, MAX(bomwork_actunitcost) AS actunitcost, MAX(bomwork_stdunitcost) AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN SUM(bomwork_actunitcost * bomwork_qtyreq) ELSE 0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN SUM(bomwork_stdunitcost * bomwork_qtyreq) ELSE 0 END AS stdextendedcost, bomwork_effective, bomwork_expires, bomwork_effective > CURRENT_DATE AS future, bomwork_expires <= CURRENT_DATE AS expired FROM ( SELECT item_number, item_type, uom_name, item_descrip1, item_descrip2, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_actunitcost, bomwork_stdunitcost, CASE WHEN (bomwork_effective > CURRENT_DATE) THEN (CURRENT_DATE + 1) ELSE CURRENT_DATE END AS bomwork_effective, CASE WHEN (bomwork_expires <= CURRENT_DATE) THEN (CURRENT_DATE - 1) ELSE (CURRENT_DATE + 1) END AS bomwork_expires FROM bomwork, item, uom WHERE ( (bomwork_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (bomwork_set_id=_bomworksetid) ) AND (bomwork_expires > (CURRENT_DATE - pExpiredDays)) AND (bomwork_effective <= (CURRENT_DATE + pFutureDays)) ) AS data GROUP BY item_number, uom_name, item_type, item_descrip1, item_descrip2, bomwork_effective, bomwork_expires ORDER BY item_number LOOP _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_qtyreq := _x.qtyreq; _row.bomdata_qtyfxd := _x.qtyfxd; _row.bomdata_qtyper := _x.qtyper; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_effective := _x.bomwork_effective; _row.bomdata_expires := _x.bomwork_expires; _row.bomdata_future := _x.future; _row.bomdata_expired := _x.expired; RETURN NEXT _row; END LOOP; PERFORM deleteBOMWorkset(_bomworksetid); ELSE -- Use historical snapshot for inactive revisions FOR _x IN SELECT item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, SUM(bomhist_qtyreq * (1 + bomhist_scrap)) AS qtyreq, SUM(bomhist_qtyfxd * (1 + bomhist_scrap)) AS qtyfxd, SUM(bomhist_qtyper * (1 + bomhist_scrap)) AS qtyper, MAX(bomhist_actunitcost) AS actunitcost, MAX(bomhist_stdunitcost) AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN MAX(bomhist_actunitcost) * SUM((bomhist_qtyfxd/_batchsize + bomhist_qtyper) * (1 + bomhist_scrap)) ELSE 0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN MAX(bomhist_stdunitcost) * SUM((bomhist_qtyfxd/_batchsize + bomhist_qtyper) * (1 + bomhist_scrap)) ELSE 0 END AS stdextendedcost FROM bomhist, item, uom WHERE ( (bomhist_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (bomhist_rev_id=pRevisionid) ) AND (bomhist_expires > (CURRENT_DATE - pExpiredDays)) AND (bomhist_effective <= (CURRENT_DATE + pFutureDays)) GROUP BY item_number, uom_name, item_type, item_descrip1, item_descrip2 ORDER BY item_number LOOP _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_qtyreq := _x.qtyreq; _row.bomdata_qtyfxd := _x.qtyfxd; _row.bomdata_qtyper := _x.qtyper; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; ALTER FUNCTION public.summarizedbom(integer, integer, integer, integer) OWNER TO admin; -- -- Name: summarizetransactions(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summarizetransactions(integer, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _startDate DATE; _endDate DATE; _invhist RECORD; _itemuom TEXT; _transCounter INTEGER; _itemlocSeries INTEGER; BEGIN -- Cache the uom_name SELECT uom_name INTO _itemuom FROM itemsite, item, uom WHERE ((itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_id=pItemsiteid)); -- Can't summarize into the future... IF (pEndDate > CURRENT_DATE) THEN _endDate := CURRENT_DATE; ELSE _endDate := pEndDate; END IF; -- Verify date bounds IF (pStartDate > pEndDate) THEN _startDate := pEndDate; ELSE _startDate := pStartDate; END IF; -- Verify that history is not referenced elsewhere SELECT invhist_id INTO _transCounter FROM invhist JOIN womatlpost ON (womatlpost_invhist_id=invhist_id) WHERE ((invhist_itemsite_id=pItemsiteid) AND (invhist_transdate::DATE BETWEEN _startDate AND _endDate)) LIMIT 1; IF (FOUND) THEN RETURN 0; END IF; SELECT invhist_id INTO _transCounter FROM invhist JOIN shipitem ON (shipitem_invhist_id=invhist_id) WHERE ((invhist_itemsite_id=pItemsiteid) AND (invhist_transdate::DATE BETWEEN _startDate AND _endDate)) LIMIT 1; IF (FOUND) THEN RETURN 0; END IF; _transCounter := 0; _itemlocSeries := NEXTVAL('itemloc_series_seq'); FOR _invhist IN SELECT invhist_transtype, invhist_costmethod, SUM(invhist_invqty) AS qty FROM invhist WHERE ((invhist_itemsite_id=pItemsiteid) AND (invhist_transdate::DATE BETWEEN _startDate AND _endDate)) GROUP BY invhist_transtype, invhist_costmethod LOOP DELETE FROM invhist WHERE ((invhist_transdate::DATE BETWEEN _startDate AND _endDate) AND (invhist_transtype=_invhist.invhist_transtype) AND (invhist_itemsite_id=pItemsiteid)); INSERT INTO invhist ( invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_invuom, invhist_user, invhist_ordnumber, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) VALUES ( pItemsiteid, _endDate, _invhist.invhist_transtype, _invhist.qty, 0, 0, _itemuom, getEffectiveXtUser(), 'Summary', _invhist.invhist_costmethod, 0, 0, _itemlocSeries ); _transCounter := (_transCounter + 1); END LOOP; RETURN _transCounter; END; $_$; ALTER FUNCTION public.summarizetransactions(integer, date, date) OWNER TO admin; -- -- Name: summdemand(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summdemand(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(wo_qtyord - wo_qtyrcv) INTO _value FROM wo WHERE ( (wo_itemsite_id=pItemsiteid) AND (wo_status IN ('R', 'I')) AND (wo_startdate::DATE BETWEEN pStartDate AND pEndDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.summdemand(integer, date, date) OWNER TO admin; -- -- Name: summdemand(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summdemand(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summDemand(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; ALTER FUNCTION public.summdemand(integer, integer) OWNER TO admin; -- -- Name: summprod(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summprod(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteid) AND (invhist_transtype IN ('RM', 'RB')) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.summprod(integer, date, date) OWNER TO admin; -- -- Name: summprod(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summprod(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summProd(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; ALTER FUNCTION public.summprod(integer, integer) OWNER TO admin; -- -- Name: summtransa(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtransa(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ((invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('AD', 'CC')) AND (invhist_itemsite_id=pItemsiteid)); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.summtransa(integer, date, date) OWNER TO admin; -- -- Name: summtransa(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtransa(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransA(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; ALTER FUNCTION public.summtransa(integer, integer) OWNER TO admin; -- -- Name: summtransc(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtransc(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDAte ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ((invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('SI')) AND (invhist_itemsite_id=pItemsiteid)); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.summtransc(integer, date, date) OWNER TO admin; -- -- Name: summtransc(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtransc(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransC(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; ALTER FUNCTION public.summtransc(integer, integer) OWNER TO admin; -- -- Name: summtransi(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtransi(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ((invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('IM', 'IC')) AND (invhist_itemsite_id=pItemsiteid)); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.summtransi(integer, date, date) OWNER TO admin; -- -- Name: summtransi(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtransi(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransI(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; ALTER FUNCTION public.summtransi(integer, integer) OWNER TO admin; -- -- Name: summtransr(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtransr(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ((invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('RM', 'RP', 'RX')) AND (invhist_itemsite_id=pItemsiteid) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.summtransr(integer, date, date) OWNER TO admin; -- -- Name: summtransr(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtransr(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransR(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; ALTER FUNCTION public.summtransr(integer, integer) OWNER TO admin; -- -- Name: summtranss(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtranss(pitemsiteid integer, pstartdate date, penddate date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC; BEGIN SELECT SUM( CASE WHEN (invhist_transtype = 'RS') THEN (invhist_invqty * -1) ELSE (invhist_invqty) END ) INTO _value FROM invhist WHERE ( (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('SC', 'SH', 'SV', 'RS')) AND (invhist_ordtype != 'TO') AND (invhist_itemsite_id=pItemsiteid) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $$; ALTER FUNCTION public.summtranss(pitemsiteid integer, pstartdate date, penddate date) OWNER TO admin; -- -- Name: summtranss(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtranss(pitemsiteid integer, pcalitemid integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransS(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; ALTER FUNCTION public.summtranss(pitemsiteid integer, pcalitemid integer) OWNER TO admin; -- -- Name: summtranst(integer, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtranst(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM( CASE WHEN (invhist_transtype = 'TS') THEN (invhist_invqty * -1) ELSE (invhist_invqty) END ) INTO _value FROM invhist WHERE ( (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('TS', 'TR', 'TW')) AND (invhist_itemsite_id=pItemsiteid) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ALTER FUNCTION public.summtranst(integer, date, date) OWNER TO admin; -- -- Name: summtranst(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION summtranst(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransT(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; ALTER FUNCTION public.summtranst(integer, integer) OWNER TO admin; -- -- Name: taxassignments(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION taxassignments(integer, integer) RETURNS SETOF taxassign LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxZoneId ALIAS FOR $1; pTaxTypeId ALIAS FOR $2; _row taxassign%ROWTYPE; _qry text; _x RECORD; _y RECORD; _z RECORD; BEGIN _qry = 'SELECT DISTINCT COALESCE(taxass_taxzone_id, -1) AS taxass_taxzone_id, COALESCE(taxass_taxtype_id, -1) AS taxass_taxtype_id, '; _qry = _qry || 'taxzone_code, taxtype_name FROM taxass LEFT OUTER JOIN taxzone ON (taxass_taxzone_id=taxzone_id) '; _qry = _qry || 'LEFT OUTER JOIN taxtype ON (taxass_taxtype_id=taxtype_id) '; IF ((pTaxZoneId > 0) OR (pTaxTypeId > 0)) THEN _qry := _qry || ' WHERE '; IF (pTaxZoneId > 0) THEN _qry := _qry || ' (taxass_taxzone_id = ' || pTaxZoneId ||')'; IF (pTaxTypeId > 0) THEN _qry := _qry || ' AND '; END IF; END IF; IF (pTaxTypeId > 0) THEN _qry := _qry || ' (taxass_taxtype_id = ' || pTaxTypeId || ')'; END IF; END IF; --This first query gets all the distinct tax zone and type groupings as if it were its own table. --This allows us to have a level 0 record as pictured in Tax Assignments window that code assignements will --Subordinate to. FOR _x IN EXECUTE _qry LOOP --Map values to _row here _row.taxassign_taxzone_id = _x.taxass_taxzone_id; _row.taxassign_taxtype_id = _x.taxass_taxtype_id; _row.taxassign_level = 0; _row.taxassign_zone_code = _x.taxzone_code; _row.taxassign_type_descrip = _x.taxtype_name; _row.taxassign_taxclass_code = ''; _row.taxassign_taxclass_sequence = NULL; RETURN NEXT _row; --so we get a level tax zone/type 0 record. -- Now get all the tax code assignments that belong to this Zone and Type pair FOR _y IN SELECT taxass_id, COALESCE(taxzone_id, -1) AS taxzone_id, tax_id, tax_code, tax_descrip, COALESCE(taxtype_id, -1) AS taxtype_id, taxzone_code, taxtype_descrip, taxclass_code, COALESCE(taxclass_sequence, 0) AS taxclass_sequence FROM taxass JOIN tax LEFT OUTER JOIN taxclass ON (tax_taxclass_id = taxclass_id) ON (taxass_tax_id = tax_id) LEFT OUTER JOIN taxzone ON (taxass_taxzone_id = taxzone_id) LEFT OUTER JOIN taxtype ON (taxass_taxtype_id = taxtype_id) WHERE COALESCE(taxass_taxzone_id, -1) = _x.taxass_taxzone_id AND COALESCE(taxass_taxtype_id, -1) = _x.taxass_taxtype_id LOOP --Map results to _row _row.taxassign_taxzone_id = _y.taxzone_id; _row.taxassign_taxtype_id = _y.taxtype_id; _row.taxassign_level = 1; _row.taxassign_zone_code = _y.tax_code; _row.taxassign_type_descrip = _y.tax_descrip; _row.taxassign_taxclass_code = _y.taxclass_code; _row.taxassign_taxclass_sequence = _y.taxclass_sequence; RETURN NEXT _row; --to get code detail record; FOR _z IN SELECT * FROM getsubtax(_y.tax_id, 1) --a new recursive function described above LOOP --Map results to _row _row.taxassign_taxzone_id = _y.taxzone_id; _row.taxassign_taxtype_id = _y.taxtype_id; _row.taxassign_level = _z.subtax_taxcode_level; _row.taxassign_zone_code = _z.subtax_taxcode_code; _row.taxassign_type_descrip = _z.subtax_taxcode_descrip; _row.taxassign_taxclass_code = _y.taxclass_code; _row.taxassign_taxclass_sequence = _y.taxclass_sequence; RETURN NEXT _row; END LOOP; END LOOP; END LOOP; END; $_$; ALTER FUNCTION public.taxassignments(integer, integer) OWNER TO admin; -- -- Name: thawaccountingperiod(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION thawaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _r RECORD; BEGIN -- Check to make sure that the period is frozen IF ( ( SELECT (NOT period_freeze) FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -2; END IF; -- Check to make sure that the period is not closed IF ( ( SELECT (period_closed) FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Reset the period_freeze flag UPDATE period SET period_freeze=FALSE WHERE (period_id=pPeriodid); -- Post any unposted G/L Transactions into the period FOR _r IN SELECT DISTINCT gltrans_sequence FROM gltrans, accnt, period WHERE ( (gltrans_accnt_id=accnt_id) AND (NOT gltrans_posted) AND (gltrans_date BETWEEN period_start AND period_end) AND (period_id=pPeriodid) ) LOOP PERFORM postIntoTrialBalance(_r.gltrans_sequence); END LOOP; RETURN pPeriodid; END; $_$; ALTER FUNCTION public.thawaccountingperiod(integer) OWNER TO admin; -- -- Name: thawitemsite(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION thawitemsite(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _qoh NUMERIC := 0; _netable_qoh NUMERIC := 0; _nonnetable_qoh NUMERIC := 0; _value NUMERIC := 0; _itemlocid INTEGER; _itemloc RECORD; _invhist RECORD; _coarse RECORD; _fine RECORD; BEGIN IF ( SELECT itemsite_freeze FROM itemsite WHERE (itemsite_id=pItemsiteid) ) THEN SELECT invhist_id INTO _invhist FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteid) AND (NOT invhist_posted) ) LIMIT 1; IF (NOT FOUND) THEN UPDATE itemsite SET itemsite_freeze=FALSE WHERE (itemsite_id=pItemsiteid); END IF; -- Run through any invdetail if this itemsite is still MLC and/or Lot/Serial IF ( SELECT ( (itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S')) ) FROM itemsite WHERE (itemsite_id=pItemsiteid) ) THEN -- Grab all of the itemsite/location/lot/serial combinations -- that have unposted detail FOR _coarse IN SELECT DISTINCT invdetail_location_id, invdetail_ls_id, invdetail_expiration, invdetail_warrpurc FROM invhist, invdetail WHERE ( (invdetail_invhist_id=invhist_id) AND (NOT invhist_posted) AND (invhist_itemsite_id=pItemsiteid) ) ORDER BY invdetail_location_id, invdetail_ls_id LOOP -- Cache the initial qty of the itemloc specified by the -- itemsite/location/lot/serial SELECT itemloc_id, itemloc_qty, COALESCE(location_netable, TRUE) AS location_netable INTO _itemloc FROM itemloc LEFT OUTER JOIN location ON (location_id=itemloc_location_id) WHERE ( (itemloc_itemsite_id=pItemsiteid) AND (itemloc_location_id=_coarse.invdetail_location_id) AND (COALESCE(itemloc_ls_id,-1)=COALESCE(_coarse.invdetail_ls_id,-1)) AND (COALESCE(itemloc_expiration,endOfTime())=COALESCE(_coarse.invdetail_expiration,endOfTime())) AND (COALESCE(itemloc_warrpurc,endOfTime())=COALESCE(_coarse.invdetail_warrpurc,endOfTime())) ); -- If the itemloc in question cannot be found, create it IF (NOT FOUND) THEN SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _itemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_ls_id, itemloc_qty, itemloc_expiration ) VALUES ( _itemlocid, pItemsiteid, _coarse.invdetail_location_id, _coarse.invdetail_ls_id, 0, endOfTime() ); _qoh := 0.0; _netable_qoh := 0.0; _nonnetable_qoh := 0.0; ELSE _itemlocid := _itemloc.itemloc_id; _qoh := _itemloc.itemloc_qty; IF (_itemloc.location_netable) THEN _netable_qoh := _itemloc.itemloc_qty; ELSE _nonnetable_qoh := _itemloc.itemloc_qty; END IF; END IF; -- Now step through each unposted invdetail record for a given -- itemsite/location/lot/serial FOR _fine IN SELECT invdetail_id, invdetail_qty FROM invhist, invdetail WHERE ( (invdetail_invhist_id=invhist_id) AND (NOT invhist_posted) AND (invhist_itemsite_id=pItemsiteid) AND (invdetail_location_id=_coarse.invdetail_location_id) AND (COALESCE(invdetail_ls_id,-1)=COALESCE(_coarse.invdetail_ls_id,-1)) AND (COALESCE(invdetail_expiration,endOfTime())=COALESCE(_coarse.invdetail_expiration,endOfTime())) AND (COALESCE(invdetail_warrpurc,endOfTime())=COALESCE(_coarse.invdetail_warrpurc,endOfTime())) ) ORDER BY invhist_transdate LOOP -- Update the running qoh fields in the detail record UPDATE invdetail SET invdetail_qty_before = _qoh, invdetail_qty_after = (_qoh + invdetail_qty) WHERE (invdetail_id=_fine.invdetail_id); -- Update the running qoh _qoh = (_qoh + _fine.invdetail_qty); IF (_itemloc.location_netable) THEN _netable_qoh := (_netable_qoh + _fine.invdetail_qty); ELSE _nonnetable_qoh := (_nonnetable_qoh + _fine.invdetail_qty); END IF; END LOOP; -- If the running qoh end up at 0, delete the itemloc in question IF (_qoh = 0) THEN DELETE FROM itemloc WHERE (itemloc_id=_itemlocid); -- Otherwise, update the itemloc in question with the resultant qty ELSE UPDATE itemloc SET itemloc_qty=_qoh WHERE (itemloc_id=_itemlocid); END IF; END LOOP; END IF; -- Cache the inital qoh of the itemsite SELECT itemsite_qtyonhand, itemsite_value INTO _qoh, _value FROM itemsite WHERE (itemsite_id=pItemsiteid); -- We have to un-freeze the itemsite before update-ing its QOH -- so that that itemsite trigger won't block the QOH update. -- Also so the invhist trigger won't block the posted update. UPDATE itemsite SET itemsite_freeze=FALSE WHERE (itemsite_id=pItemsiteid); FOR _invhist IN SELECT invhist_id, invhist_qoh_before, invhist_qoh_after, invhist_value_before, invhist_value_after FROM invhist WHERE((invhist_itemsite_id=pItemsiteid) AND (NOT invhist_posted)) ORDER BY invhist_transdate LOOP UPDATE invhist SET invhist_qoh_before = _qoh, invhist_qoh_after = ( _qoh + _invhist.invhist_qoh_after - _invhist.invhist_qoh_before ), invhist_value_before = _value, invhist_value_after = ( _value + _invhist.invhist_value_after - _invhist.invhist_value_before ), invhist_posted = TRUE WHERE (invhist_id=_invhist.invhist_id); _qoh := (_qoh + (_invhist.invhist_qoh_after - _invhist.invhist_qoh_before)); _value := (_value + (_invhist.invhist_value_after - _invhist.invhist_value_before)); END LOOP; -- _qoh can be used for the netable qoh because of the negative NN transactions UPDATE itemsite SET itemsite_qtyonhand = _qoh, itemsite_nnqoh = _nonnetable_qoh, itemsite_value = CASE WHEN ((itemsite_costmethod='A') AND (_value < 0.0)) THEN 0.0 ELSE _value END WHERE(itemsite_id=pItemsiteid); END IF; RETURN pItemsiteid; END; $_$; ALTER FUNCTION public.thawitemsite(integer) OWNER TO admin; -- -- Name: todoitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE todoitem ( todoitem_id integer NOT NULL, todoitem_name text NOT NULL, todoitem_description text, todoitem_incdt_id integer, todoitem_creator_username text DEFAULT geteffectivextuser() NOT NULL, todoitem_status character(1), todoitem_active boolean DEFAULT true NOT NULL, todoitem_start_date date, todoitem_due_date date, todoitem_assigned_date date, todoitem_completed_date date, todoitem_seq integer DEFAULT 0 NOT NULL, todoitem_notes text, todoitem_crmacct_id integer, todoitem_ophead_id integer, todoitem_owner_username text, todoitem_priority_id integer, todoitem_username text, todoitem_recurring_todoitem_id integer, todoitem_cntct_id integer ); ALTER TABLE public.todoitem OWNER TO admin; -- -- Name: TABLE todoitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE todoitem IS 'To-Do List items.'; -- -- Name: COLUMN todoitem.todoitem_recurring_todoitem_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN todoitem.todoitem_recurring_todoitem_id IS 'The first todoitem record in the series if this is a recurring To-Do item. If the todoitem_recurring_todoitem_id is the same as the todoitem_id, this record is the first in the series.'; -- -- Name: todoitem(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION todoitem() RETURNS SETOF todoitem LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row todoitem%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllToDoItems','ViewAllToDoItems','MaintainPersonalToDoItems','ViewPersonalToDoItems') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM todoitem LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM todoitem WHERE getEffectiveXtUser() IN (todoitem_owner_username, todoitem_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; ALTER FUNCTION public.todoitem() OWNER TO admin; -- -- Name: FUNCTION todoitem(); Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON FUNCTION todoitem() IS 'A table function that returns To Do Items results according to privilege settings.'; -- -- Name: todoitemmove(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION todoitemmove(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoItemId ALIAS FOR $1; pHowFar ALIAS FOR $2; -- -1 moves toward front of list, +1 toward back _howFar INTEGER := pHowFar; _username TEXT; _currseq INTEGER; BEGIN SELECT todoitem_username, todoitem_seq INTO _username, _currseq FROM todoitem WHERE todoitem_id = ptodoItemId; IF NOT FOUND THEN RETURN -1; END IF; IF (_currseq + pHowFar <= 0) THEN _howFar = 1 - _currseq; -- move to beginning END IF; UPDATE todoitem SET todoitem_seq=todoitem_seq - _howFar WHERE todoitem_seq >= _currseq + _howFar AND todoitem_id != ptodoItemId AND todoitem_username = _username AND todoitem_status != 'C'; UPDATE todoitem SET todoitem_seq=_currseq + _howFar WHERE todoitem_id = ptodoItemId; RETURN 0; END; $_$; ALTER FUNCTION public.todoitemmove(integer, integer) OWNER TO admin; -- -- Name: todoitemmovedown(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION todoitemmovedown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoItemId ALIAS FOR $1; BEGIN RETURN todoItemMove(ptodoItemId, 1); -- move toward end of list END; $_$; ALTER FUNCTION public.todoitemmovedown(integer) OWNER TO admin; -- -- Name: todoitemmoveup(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION todoitemmoveup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoItemId ALIAS FOR $1; BEGIN RETURN todoItemMove(ptodoItemId, -1); -- move toward front of list END; $_$; ALTER FUNCTION public.todoitemmoveup(integer) OWNER TO admin; -- -- Name: togglebankreccleared(integer, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION togglebankreccleared(integer, text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ DECLARE pBankrecid ALIAS FOR $1; pSource ALIAS FOR $2; pSourceid ALIAS FOR $3; _cleared BOOLEAN; _r RECORD; BEGIN SELECT bankrecitem_id, bankrecitem_cleared INTO _r FROM bankrecitem WHERE ( (bankrecitem_bankrec_id=pBankrecid) AND (bankrecitem_source=pSource) AND (bankrecitem_source_id=pSourceid) ); IF ( NOT FOUND ) THEN _cleared := TRUE; INSERT INTO bankrecitem (bankrecitem_bankrec_id, bankrecitem_source, bankrecitem_source_id, bankrecitem_cleared) VALUES (pBankrecid, pSource, pSourceid, _cleared); ELSE _cleared := (NOT _r.bankrecitem_cleared); UPDATE bankrecitem SET bankrecitem_cleared=_cleared WHERE (bankrecitem_id=_r.bankrecitem_id); END IF; RETURN _cleared; END; $_$; ALTER FUNCTION public.togglebankreccleared(integer, text, integer) OWNER TO admin; -- -- Name: togglebankreccleared(integer, text, integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION togglebankreccleared(integer, text, integer, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ DECLARE pBankrecid ALIAS FOR $1; pSource ALIAS FOR $2; pSourceid ALIAS FOR $3; pCurrrate ALIAS FOR $4; _cleared BOOLEAN; _r RECORD; BEGIN SELECT bankrecitem_id, bankrecitem_cleared INTO _r FROM bankrecitem WHERE ( (bankrecitem_bankrec_id=pBankrecid) AND (bankrecitem_source=pSource) AND (bankrecitem_source_id=pSourceid) ); IF ( NOT FOUND ) THEN _cleared := TRUE; INSERT INTO bankrecitem (bankrecitem_bankrec_id, bankrecitem_source, bankrecitem_source_id, bankrecitem_cleared, bankrecitem_curr_rate) VALUES (pBankrecid, pSource, pSourceid, _cleared, pCurrrate); ELSE _cleared := (NOT _r.bankrecitem_cleared); UPDATE bankrecitem SET bankrecitem_cleared=_cleared, bankrecitem_curr_rate=pCurrrate WHERE (bankrecitem_id=_r.bankrecitem_id); END IF; RETURN _cleared; END; $_$; ALTER FUNCTION public.togglebankreccleared(integer, text, integer, numeric) OWNER TO admin; -- -- Name: togglebankreccleared(integer, text, integer, numeric, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION togglebankreccleared(integer, text, integer, numeric, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankrecid ALIAS FOR $1; pSource ALIAS FOR $2; pSourceid ALIAS FOR $3; pCurrrate ALIAS FOR $4; pAmount ALIAS FOR $5; _cleared BOOLEAN; _r RECORD; BEGIN SELECT bankrecitem_id, bankrecitem_cleared INTO _r FROM bankrecitem WHERE ( (bankrecitem_bankrec_id=pBankrecid) AND (bankrecitem_source=pSource) AND (bankrecitem_source_id=pSourceid) ); IF ( NOT FOUND ) THEN _cleared := TRUE; INSERT INTO bankrecitem (bankrecitem_bankrec_id, bankrecitem_source, bankrecitem_source_id, bankrecitem_cleared, bankrecitem_curr_rate, bankrecitem_amount) VALUES (pBankrecid, pSource, pSourceid, _cleared, pCurrrate, pAmount); ELSE _cleared := FALSE; DELETE FROM bankrecitem WHERE bankrecitem_id = _r.bankrecitem_id; END IF; RETURN _cleared; END; $_$; ALTER FUNCTION public.togglebankreccleared(integer, text, integer, numeric, numeric) OWNER TO admin; -- -- Name: togglebomitemcost(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION togglebomitemcost(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; pEnabled ALIAS FOR $2; BEGIN IF (pEnabled) THEN INSERT INTO bomitemcost (bomitemcost_bomitem_id, bomitemcost_costelem_id, bomitemcost_lowlevel, bomitemcost_stdcost, bomitemcost_posted, bomitemcost_actcost, bomitemcost_updated, bomitemcost_curr_id) SELECT bomitem_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id FROM bomitem JOIN itemcost ON (itemcost_item_id=bomitem_item_id) WHERE (bomitem_id=pBomitemid); ELSE DELETE FROM bomitemcost WHERE (bomitemcost_bomitem_id=pBomitemid); END IF; RETURN 0; END; $_$; ALTER FUNCTION public.togglebomitemcost(integer, boolean) OWNER TO admin; -- -- Name: tonumeric(text, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION tonumeric(text, numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pText ALIAS FOR $1; pDefault ALIAS FOR $2; BEGIN IF (isNumeric(pText)) THEN RETURN TO_NUMBER(pText, '999999999999'); ELSE RETURN pDefault; END IF; END; $_$; ALTER FUNCTION public.tonumeric(text, numeric) OWNER TO admin; -- -- Name: transitwhs(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION transitwhs() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _id INTEGER; BEGIN _id = fetchMetricValue('TransitWarehouse'); IF (_id IS NOT NULL AND EXISTS(SELECT warehous_id FROM whsinfo WHERE (warehous_id=_id)) ) THEN RETURN _id; END IF; SELECT warehous_id INTO _id FROM whsinfo WHERE warehous_transit; IF (NOT FOUND) THEN _id := NEXTVAL('warehous_warehous_id_seq'); INSERT INTO whsinfo ( warehous_id, warehous_code, warehous_descrip, --warehous_fob, warehous_active, --warehous_counttag_prefix, --warehous_counttag_number, --warehous_bol_prefix, --warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, --warehous_aislesize, --warehous_aislealpha, --warehous_racksize, --warehous_rackalpha, --warehous_binsize, --warehous_binalpha, --warehous_locationsize, --warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, --warehous_shipping_commission, --warehous_cntct_id, --warehous_addr_id, warehous_taxzone_id ) VALUES ( _id, 'TRANSIT', 'Intermediate Warehouse for Inter-Warehouse Transfers', --text, TRUE, --text, --integer, --text, --integer, TRUE, FALSE, FALSE, --integer, --boolean, --integer, --boolean, --integer, --boolean, --integer, --boolean, FALSE, fetchMetricValue('UnassignedAccount'), --numeric(8,4) default 0.00, --integer, --integer, NULL ); END IF; PERFORM setMetric('TransitWarehouse', _id); RETURN _id; END; $$; ALTER FUNCTION public.transitwhs() OWNER TO admin; -- -- Name: transtype(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION transtype(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; pTargetType ALIAS FOR $2; BEGIN IF (pTargetType = 255) THEN RETURN TRUE; ELSIF (pTargetType = 1) THEN RETURN receipts(pTransType); ELSIF (pTargetType = 2) THEN RETURN issues(pTransType); ELSIF (pTargetType = 4) THEN RETURN shipments(pTransType); ELSIF (pTargetType = 8) THEN RETURN adjustments(pTransType); ELSIF (pTargetType = 16) THEN RETURN transfers(pTransType); ELSIF (pTargetType = 32) THEN RETURN scraps(pTransType); ELSE RETURN TRUE; END IF; END; $_$; ALTER FUNCTION public.transtype(text, integer) OWNER TO admin; -- -- Name: trylock(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION trylock(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pKey1 ALIAS FOR $1; pKey2 ALIAS FOR $2; _pid integer; BEGIN /* The standard try lock ignores locks made by the current user in same session. Check for ANY lock on this id, whether by this user or not */ SELECT pid INTO _pid FROM pg_locks WHERE ((classid=pKey1) AND (objid=pKey2) AND (objsubid=2)); IF (FOUND) THEN RETURN false; ELSE RETURN pg_try_advisory_lock(pKey1,pKey2); END IF; END; $_$; ALTER FUNCTION public.trylock(integer, integer) OWNER TO admin; -- -- Name: undomerge(text, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION undomerge(text, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSchema ALIAS FOR $1; pTable ALIAS FOR $2; pId ALIAS FOR $3; _qry TEXT; _r RECORD; _result INTEGER; BEGIN FOR _r IN SELECT * FROM mrgundo WHERE mrgundo_base_schema = pSchema AND mrgundo_base_table = pTable AND mrgundo_base_id = pId AND mrgundo_col IS NOT NULL -- NULL mrgundo_col signals a row to delete on purge LOOP IF (_r.mrgundo_value IS NULL) THEN _qry := 'UPDATE ' || quote_ident(_r.mrgundo_schema) || '.' || quote_ident(_r.mrgundo_table) || ' SET ' || quote_ident(_r.mrgundo_col) || '= NULL WHERE (' || _r.mrgundo_pkey_col || '=' || _r.mrgundo_pkey_id || ');'; ELSE _qry := 'UPDATE ' || quote_ident(_r.mrgundo_schema) || '.' || quote_ident(_r.mrgundo_table) || ' SET ' || quote_ident(_r.mrgundo_col) || '= CAST(' || quote_literal(_r.mrgundo_value) || ' AS ' || quote_ident(_r.mrgundo_type) || ') WHERE (' || _r.mrgundo_pkey_col || '=' || _r.mrgundo_pkey_id || ');'; END IF; EXECUTE _qry; END LOOP; DELETE FROM mrgundo WHERE mrgundo_base_schema = pSchema AND mrgundo_base_table = pTable AND mrgundo_base_id = pId; GET DIAGNOSTICS _result = ROW_COUNT; RETURN _result; END; $_$; ALTER FUNCTION public.undomerge(text, text, integer) OWNER TO admin; -- -- Name: uomusedforitem(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION uomusedforitem(integer) RETURNS SETOF uom LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemid ALIAS FOR $1; _row uom%ROWTYPE; BEGIN FOR _row IN SELECT DISTINCT * FROM uom WHERE uom_id IN ( SELECT bomitem_uom_id AS uom_id FROM bomitem WHERE (bomitem_item_id=pitemid) UNION SELECT cmitem_qty_uom_id FROM cmitem, itemsite WHERE ((cmitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT cmitem_price_uom_id FROM cmitem, itemsite WHERE ((cmitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT coitem_qty_uom_id FROM coitem, itemsite WHERE ((coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT coitem_price_uom_id FROM coitem, itemsite WHERE ((coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT invcitem_qty_uom_id FROM invcitem WHERE ((invcitem_item_id=pitemid)) UNION SELECT invcitem_price_uom_id FROM invcitem WHERE ((invcitem_item_id=pitemid)) UNION SELECT ipsitem_qty_uom_id FROM ipsiteminfo WHERE (ipsitem_item_id=pitemid) UNION SELECT ipsitem_price_uom_id FROM ipsiteminfo WHERE (ipsitem_item_id=pitemid) UNION SELECT quitem_qty_uom_id FROM quitem, itemsite WHERE ((quitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT quitem_price_uom_id FROM quitem, itemsite WHERE ((quitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT womatl_uom_id FROM womatl, itemsite WHERE ((womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) ) LOOP RETURN NEXT _row; END LOOP; IF (fetchmetricbool('MultiWhs')) THEN FOR _row IN SELECT DISTINCT * FROM uom WHERE uom_id IN ( SELECT rahist_uom_id FROM rahist, itemsite WHERE ((rahist_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) ) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; ALTER FUNCTION public.uomusedforitem(integer) OWNER TO admin; -- -- Name: updateabcclass(text, numeric, numeric, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateabcclass(text, numeric, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClassCodePattern ALIAS FOR $1; pACutoff ALIAS FOR $2; pBCutoff ALIAS FOR $3; pStartDate ALIAS FOR $4; pEndDate ALIAS FOR $5; _result INTEGER; BEGIN SELECT updateABCClass(pClassCodePattern, -1, pACutoff, pBCutoff, pStartDate, pEndDate) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.updateabcclass(text, numeric, numeric, date, date) OWNER TO admin; -- -- Name: updateabcclass(text, integer, numeric, numeric, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateabcclass(text, integer, numeric, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClassCodePattern ALIAS FOR $1; pWarehousid ALIAS FOR $2; pACutoff ALIAS FOR $3; pBCutoff ALIAS FOR $4; pStartDate ALIAS FOR $5; pEndDate ALIAS FOR $6; _updateCount INTEGER; _totalValue NUMERIC; _cumulativeValue NUMERIC; _itemsite RECORD; BEGIN SELECT COUNT(*) INTO _updateCount FROM itemsite, item, classcode WHERE ( (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (itemsite_autoabcclass) AND (classcode_code ~ pClassCodePattern) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); IF (_updateCount IS NULL) THEN RETURN 0; ELSE UPDATE itemsite SET itemsite_abcclass='T' FROM item, classcode WHERE ( (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (itemsite_autoabcclass) AND (classcode_code ~ pClassCodePattern) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); SELECT SUM(ABS(invhist_qoh_before - invhist_qoh_after) * invhist_unitcost) INTO _totalValue FROM invhist, itemsite, item, classcode WHERE ( (invhist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (invhist_analyze) AND (invhist_transtype ~ '^[IR]') AND (itemsite_autoabcclass) AND (classcode_code ~ pClassCodePattern) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); IF ( (_totalValue IS NULL) OR (_totalValue = 0) ) THEN UPDATE itemsite SET itemsite_abcclass='A' WHERE (itemsite_abcclass='T'); ELSE _cumulativeValue := 0; FOR _itemsite IN SELECT itemsite_id, item_number, SUM(ABS(invhist_qoh_before - invhist_qoh_after) * invhist_unitcost) AS value FROM invhist, itemsite, item, classcode WHERE ( (invhist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (invhist_analyze) AND (invhist_transtype ~ '^[IR]') AND (itemsite_autoabcclass) AND (classcode_code ~ pClassCodePattern) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ) GROUP BY itemsite_id, item_number ORDER BY value DESC LOOP IF (_itemsite.value IS NOT NULL) THEN _cumulativeValue := _cumulativeValue + _itemsite.value; END IF; IF ((_cumulativeValue / _totalValue) <= pACutoff) THEN UPDATE itemsite SET itemsite_abcclass='A' WHERE (itemsite_id=_itemsite.itemsite_id); ELSE IF ((_cumulativeValue / _totalValue) <= pBCutoff) THEN UPDATE itemsite SET itemsite_abcclass='B' WHERE (itemsite_id=_itemsite.itemsite_id); ELSE UPDATE itemsite SET itemsite_abcclass='C' WHERE (itemsite_id=_itemsite.itemsite_id); END IF; END IF; END LOOP; UPDATE itemsite SET itemsite_abcclass='C' WHERE (itemsite_abcclass='T'); END IF; END IF; RETURN _updateCount; END; $_$; ALTER FUNCTION public.updateabcclass(text, integer, numeric, numeric, date, date) OWNER TO admin; -- -- Name: updateabcclass(integer, numeric, numeric, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateabcclass(integer, numeric, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClasscodeid ALIAS FOR $1; pACutoff ALIAS FOR $2; pBCutoff ALIAS FOR $3; pStartDate ALIAS FOR $4; pEndDate ALIAS FOR $5; _result INTEGER; BEGIN SELECT updateABCClass(pClassCodeid, -1, pACutoff, pBCutoff, pStartDate, pEndDate) INTO _result; RETURN _result; END; $_$; ALTER FUNCTION public.updateabcclass(integer, numeric, numeric, date, date) OWNER TO admin; -- -- Name: updateabcclass(integer, integer, numeric, numeric, date, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateabcclass(integer, integer, numeric, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClasscodeid ALIAS FOR $1; pWarehousid ALIAS FOR $2; pACutoff ALIAS FOR $3; pBCutoff ALIAS FOR $4; pStartDate ALIAS FOR $5; pEndDate ALIAS FOR $6; _updateCount INTEGER; _totalValue NUMERIC; _cumulativeValue NUMERIC; _itemsite RECORD; BEGIN SELECT COUNT(*) INTO _updateCount FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND ((item_classcode_id=pClasscodeid) OR (pClasscodeid=-1)) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); IF (_updateCount IS NULL) THEN _updateCount := 0; ELSE UPDATE itemsite SET itemsite_abcclass='T' FROM item WHERE ( (itemsite_item_id=item_id) AND ((item_classcode_id=pClasscodeid) OR (pClasscodeid=-1)) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); SELECT SUM(ABS(invhist_qoh_before - invhist_qoh_after) * invhist_unitcost) INTO _totalValue FROM invhist, itemsite, item WHERE ( (invhist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invhist_analyze) AND (invhist_transtype ~ '^[IR]') AND ((item_classcode_id=pClasscodeid) OR (pClasscodeid=-1)) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); IF ( (_totalValue IS NULL) OR (_totalValue = 0) ) THEN UPDATE itemsite SET itemsite_abcclass='A' WHERE (itemsite_abcclass='T'); ELSE _cumulativeValue := 0; FOR _itemsite IN SELECT itemsite_id, item_number, SUM(ABS(invhist_qoh_before - invhist_qoh_after) * invhist_unitcost) AS value FROM invhist, itemsite, item WHERE ( (invhist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invhist_analyze) AND (invhist_transtype ~ '^[IR]') AND ((item_classcode_id=pClasscodeid) OR (pClasscodeid=-1)) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ) GROUP BY itemsite_id, item_number ORDER BY value DESC LOOP IF (_itemsite.value IS NOT NULL) THEN _cumulativeValue := _cumulativeValue + _itemsite.value; END IF; IF ((_cumulativeValue / _totalValue) <= pACutoff) THEN UPDATE itemsite SET itemsite_abcclass='A' WHERE (itemsite_id=_itemsite.itemsite_id); ELSE IF ((_cumulativeValue / _totalValue) <= pBCutoff) THEN UPDATE itemsite SET itemsite_abcclass='B' WHERE (itemsite_id=_itemsite.itemsite_id); ELSE UPDATE itemsite SET itemsite_abcclass='C' WHERE (itemsite_id=_itemsite.itemsite_id); END IF; END IF; END LOOP; UPDATE itemsite SET itemsite_abcclass='C' WHERE (itemsite_abcclass='T'); END IF; END IF; RETURN _updateCount; END; $_$; ALTER FUNCTION public.updateabcclass(integer, integer, numeric, numeric, date, date) OWNER TO admin; -- -- Name: updatecharassignment(text, integer, integer, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecharassignment(text, integer, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetId ALIAS FOR $2; pCharId ALIAS FOR $3; pValue ALIAS FOR $4; _charassid INTEGER; BEGIN SELECT updateCharAssignment(pTargetType, pTargetId, pCharId, pValue, 0) INTO _charassid; RETURN _charassid; END; $_$; ALTER FUNCTION public.updatecharassignment(text, integer, integer, text) OWNER TO admin; -- -- Name: updatecharassignment(text, integer, integer, text, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecharassignment(text, integer, integer, text, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetId ALIAS FOR $2; pCharId ALIAS FOR $3; pValue ALIAS FOR $4; pPrice ALIAS FOR $5; _charassid INTEGER; _charassprice NUMERIC; _explodedJob BOOLEAN = FALSE; _value TEXT; BEGIN -- Check for Valid Assignment IF (pTargetType='SI') THEN SELECT (item_config AND wo_status != 'O') INTO _explodedJob FROM coitem,itemsite,item,wo WHERE ((coitem_id=pTargetId) AND (itemsite_id=coitem_itemsite_id) AND (item_id=itemsite_item_id) AND (wo_ordtype='S') AND (wo_ordid=coitem_id)); END IF; SELECT charass_id,charass_value INTO _charassid, _value FROM charass WHERE ((charass_target_type=pTargetType) AND (charass_target_id=pTargetId) AND (charass_char_id=pCharId) ) LIMIT 1; IF (FOUND) THEN IF (_explodedJob AND pValue != _value) THEN RAISE EXCEPTION 'Characteristic may not be updated for Configured Item with exploded Work Order.'; ELSIF(COALESCE(pValue, '')!='') THEN UPDATE charass SET charass_value = pValue, charass_price = pPrice WHERE (charass_id=_charassid); ELSE DELETE FROM charass WHERE (charass_id=_charassid); _charassid := 0; END IF; ELSE IF ( (_explodedJob) AND (COALESCE(pValue, '')!='') ) THEN RAISE EXCEPTION 'Characteristics may not be updated for Configured Item with exploded Work Order.'; ELSIF(COALESCE(pValue, '')!='') THEN SELECT nextval('charass_charass_id_seq') INTO _charassid; INSERT INTO charass (charass_id, charass_target_type, charass_target_id, charass_char_id, charass_value, charass_price) VALUES(_charassid, pTargetType, pTargetId, pCharId, pValue, pPrice); ELSE _charassid := 0; END IF; END IF; RETURN _charassid; END; $_$; ALTER FUNCTION public.updatecharassignment(text, integer, integer, text, numeric) OWNER TO admin; -- -- Name: updatecost(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecost(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemcostid ALIAS FOR $1; pCost ALIAS FOR $2; BEGIN RETURN updateCost(pItemcostid, pCost, baseCurrId()); END; $_$; ALTER FUNCTION public.updatecost(integer, numeric) OWNER TO admin; -- -- Name: updatecost(integer, text, boolean, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecost(integer, text, boolean, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE returnVal INTEGER; BEGIN SELECT updateCost($1, $2, $3, $4, baseCurrId()) INTO returnVal; RETURN returnVal; END; $_$; ALTER FUNCTION public.updatecost(integer, text, boolean, numeric) OWNER TO admin; -- -- Name: updatecost(integer, integer, boolean, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecost(integer, integer, boolean, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE returnVal INTEGER; BEGIN SELECT updateCost($1, $2, $3, $4, baseCurrId()) INTO returnVal; RETURN returnVal; END; $_$; ALTER FUNCTION public.updatecost(integer, integer, boolean, numeric) OWNER TO admin; -- -- Name: updatecost(integer, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecost(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemcostid ALIAS FOR $1; pCost ALIAS FOR $2; pCurrId ALIAS FOR $3; BEGIN IF ( ( SELECT (itemcost_stdcost > 0) FROM itemcost WHERE (itemcost_id=pItemcostid) ) OR (pCost > 0) ) THEN UPDATE itemcost SET itemcost_actcost=pCost, itemcost_updated=CURRENT_DATE, itemcost_curr_id=pCurrId WHERE (itemcost_id=pItemcostid); RETURN pItemcostid; ELSE DELETE FROM itemcost WHERE (itemcost_id=pItemcostid); RETURN -1; END IF; END; $_$; ALTER FUNCTION public.updatecost(integer, numeric, integer) OWNER TO admin; -- -- Name: updatecost(integer, text, boolean, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecost(integer, text, boolean, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCosttype ALIAS FOR $2; pLevel ALIAS FOR $3; pCost ALIAS FOR $4; pCurrid ALIAS FOR $5; _cost NUMERIC; _currId INTEGER; _p RECORD; _itemcostid INTEGER; BEGIN IF (pCost IS NULL) THEN _cost = 0; ELSE _cost = pCost; END IF; IF (pCurrId IS NULL) THEN _currId := baseCurrID(); ELSE _currId := pCurrId; END IF; SELECT itemcost_id, itemcost_stdcost INTO _p FROM itemcost, costelem WHERE ( (itemcost_costelem_id=costelem_id) AND (itemcost_item_id=pItemid) AND (itemcost_lowlevel=pLevel) AND (costelem_type=pCosttype) ); IF (NOT FOUND) THEN IF (_cost > 0) THEN SELECT NEXTVAL('itemcost_itemcost_id_seq') INTO _itemcostid; INSERT INTO itemcost ( itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id ) SELECT _itemcostid, pItemid, costelem_id, pLevel, 0, startOfTime(), _cost, CURRENT_DATE, _currId FROM costelem WHERE (costelem_type=pCosttype); RETURN _itemcostid; ELSE RETURN -1; END IF; ELSIF ( (_p.itemcost_stdcost > 0) OR (_cost > 0) ) THEN UPDATE itemcost SET itemcost_actcost=_cost, itemcost_curr_id = _currId, itemcost_updated=CURRENT_DATE WHERE (itemcost_id=_p.itemcost_id); RETURN _p.itemcost_id; ELSE DELETE FROM itemcost WHERE (itemcost_id=_p.itemcost_id); RETURN -1; END IF; END; $_$; ALTER FUNCTION public.updatecost(integer, text, boolean, numeric, integer) OWNER TO admin; -- -- Name: updatecost(integer, integer, boolean, numeric, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecost(integer, integer, boolean, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCostelemid ALIAS FOR $2; pLevel ALIAS FOR $3; pCost ALIAS FOR $4; pCurrid ALIAS FOR $5; _cost NUMERIC; _currId INTEGER; _p RECORD; _itemcostid INTEGER; BEGIN IF (pCost IS NULL) THEN _cost = 0; ELSE _cost = pCost; END IF; IF (pCurrId IS NULL) THEN _currId := baseCurrID(); ELSE _currId := pCurrId; END IF; SELECT itemcost_id, itemcost_stdcost INTO _p FROM itemcost WHERE ((itemcost_costelem_id=pCostelemid) AND (itemcost_item_id=pItemid) AND (itemcost_lowlevel=pLevel) ); IF (NOT FOUND) THEN IF (_cost > 0) THEN SELECT NEXTVAL('itemcost_itemcost_id_seq') INTO _itemcostid; INSERT INTO itemcost ( itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id ) SELECT _itemcostid, pItemid, costelem_id, pLevel, 0, startOfTime(), _cost, CURRENT_DATE, _currId FROM costelem WHERE (costelem_id=pCostelemid); RETURN _itemcostid; ELSE RETURN -1; END IF; ELSIF ( (_p.itemcost_stdcost > 0) OR (_cost > 0) ) THEN UPDATE itemcost SET itemcost_actcost=_cost, itemcost_curr_id = _currId, itemcost_updated=CURRENT_DATE WHERE (itemcost_id=_p.itemcost_id); RETURN _p.itemcost_id; ELSE DELETE FROM itemcost WHERE (itemcost_id=_p.itemcost_id); RETURN -1; END IF; END; $_$; ALTER FUNCTION public.updatecost(integer, integer, boolean, numeric, integer) OWNER TO admin; -- -- Name: updatecreditmemoline(api.creditmemoline, api.creditmemoline); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecreditmemoline(api.creditmemoline, api.creditmemoline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; pOld ALIAS FOR $2; _check INTEGER; _r RECORD; BEGIN SELECT cmitem_id INTO _check FROM cmitem WHERE ( (cmitem_cmhead_id=getCmheadId(pOld.memo_number, FALSE)) AND (cmitem_linenumber=pOld.line_number) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Credit Memo # % Line Number # not found', pOld.memo_number, pOld.line_number; END IF; UPDATE cmitem SET cmitem_itemsite_id=COALESCE(itemsite_id, -1), cmitem_qtycredit=pNew.qty_to_credit, cmitem_qtyreturned=pNew.qty_returned, cmitem_unitprice=pNew.net_unit_price, cmitem_comments=pNew.notes, cmitem_rsncode_id=getRsnId(pNew.reason_code), cmitem_taxtype_id=taxtype_id, cmitem_qty_uom_id=COALESCE(getUomId(pNew.qty_uom), item_inv_uom_id), cmitem_qty_invuomratio=CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE(getUomId(pNew.qty_uom),item_inv_uom_id),item_inv_uom_id) ELSE 1 END, cmitem_price_uom_id=COALESCE(getUomId(pNew.price_uom),item_price_uom_id), cmitem_price_invuomratio=CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE(getUomId(pNew.price_uom),item_price_uom_id),item_price_uom_id) ELSE 1 END FROM cmhead LEFT OUTER JOIN item ON (item_id=getItemId(pNew.item_number)) LEFT OUTER JOIN itemsite ON (itemsite_item_id=item_id AND itemsite_warehous_id=getWarehousId(pNew.recv_site, 'ALL')) LEFT OUTER JOIN taxtype ON (taxtype_id=CASE WHEN pNew.tax_type IS NULL THEN getItemTaxType(item_id,cmhead_taxzone_id) WHEN pNew.tax_type = 'None' THEN NULL ELSE getTaxTypeId(pNew.tax_type) END) WHERE cmitem_cmhead_id=cmhead_id AND cmhead_number=pOld.memo_number AND cmitem_linenumber=pOld.line_number AND cmhead_posted=FALSE; RETURN TRUE; END; $_$; ALTER FUNCTION public.updatecreditmemoline(api.creditmemoline, api.creditmemoline) OWNER TO admin; -- -- Name: updatecustomprivs(); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatecustomprivs() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN FOR _r IN SELECT priv_id FROM priv WHERE ((priv_name IN (SELECT priv_name FROM priv WHERE (priv_module='Custom') EXCEPT SELECT ('Custom'||cmd_privname) FROM cmd)) AND (priv_module='Custom')) LOOP -- TODO: something here DELETE FROM grppriv WHERE grppriv_priv_id=_r.priv_id; DELETE FROM usrpriv WHERE usrpriv_priv_id=_r.priv_id; DELETE FROM priv WHERE priv_id=_r.priv_id; END LOOP; FOR _r IN SELECT ('Custom'||cmd_privname) AS privname FROM cmd EXCEPT SELECT priv_name FROM priv WHERE (priv_module='Custom') LOOP -- TODO: something here INSERT INTO priv (priv_module, priv_name, priv_descrip) VALUES ('Custom', _r.privname, 'Auto Generated Custom Priv.'); END LOOP; RETURN TRUE; END; $$; ALTER FUNCTION public.updatecustomprivs() OWNER TO admin; -- -- Name: updateinvoicelineitem(api.invoiceline, api.invoiceline); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateinvoicelineitem(api.invoiceline, api.invoiceline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; pOld ALIAS FOR $2; _r RECORD; BEGIN UPDATE invcitem SET invcitem_linenumber=pNew.line_number, invcitem_item_id=COALESCE(item_id, -1), invcitem_custpn=pNew.customer_part_number, invcitem_number=(CASE WHEN item_id IS NULL THEN pNew.misc_item_number ELSE NULL END), invcitem_warehous_id=(CASE WHEN invcitem_warehous_id IS NULL THEN COALESCE(getwarehousid(pNew.site,'ALL'),-1) ELSE NULL END), invcitem_descrip=(CASE WHEN item_id IS NULL THEN pNew.misc_item_description ELSE NULL END), invcitem_ordered=pNew.qty_ordered, invcitem_billed=COALESCE(pNew.qty_billed, 0), invcitem_updateinv=COALESCE(pNew.update_inventory,FALSE), invcitem_price=COALESCE(pNew.net_unit_price,itemPrice(item_id,invchead_cust_id, invchead_shipto_id,pNew.qty_ordered,invchead_curr_id,invchead_orderdate)), invcitem_notes=COALESCE(pNew.notes,''), invcitem_salescat_id=CASE WHEN item_id IS NULL THEN (SELECT salescat_id FROM salescat WHERE salescat_name = pNew.sales_category) ELSE NULL END, invcitem_taxtype_id=taxtype_id, invcitem_qty_uom_id=CASE WHEN item_id IS NOT NULL THEN COALESCE((SELECT uom_id FROM uom WHERE (uom_name=pNew.qty_uom)), item_price_uom_id) ELSE NULL END, invcitem_qty_invuomratio=CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.qty_uom),item_price_uom_id), item_price_uom_id ) ELSE 1 END, invcitem_price_uom_id=CASE WHEN item_id IS NOT NULL THEN COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.price_uom),item_price_uom_id) ELSE NULL END, invcitem_price_invuomratio=CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.price_uom),item_price_uom_id), item_price_uom_id ) ELSE 1 END, invcitem_rev_accnt_id=getGlAccntId(alternate_rev_account) FROM invchead LEFT OUTER JOIN item ON (item_id=getItemId(pNew.item_number)) LEFT OUTER JOIN taxtype ON (taxtype_id=CASE WHEN pNew.tax_type IS NULL THEN getItemTaxType(item_id,invchead_taxzone_id) WHEN pNew.tax_type = 'None' THEN NULL ELSE (SELECT taxtype_id FROM taxtype WHERE taxtype_name=pNew.tax_type) END) WHERE invcitem_invchead_id=invchead_id AND invcitem_linenumber=pOld.line_number AND invchead_invcnumber=pOld.invoice_number AND invchead_posted=FALSE; RETURN TRUE; END; $_$; ALTER FUNCTION public.updateinvoicelineitem(api.invoiceline, api.invoiceline) OWNER TO admin; -- -- Name: updateitemcost(integer, integer, integer, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateitemcost(integer, integer, integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pCostElemId ALIAS FOR $2; pCurrId ALIAS FOR $3; pCost ALIAS FOR $4; pPostToStandard ALIAS FOR $5; _itemcost_id INTEGER; _update_return INTEGER; _postcost_return BOOLEAN; --This function is used with the api.itemcost View for updating --the itemcost table BEGIN SELECT itemcost_id INTO _itemcost_id FROM itemcost WHERE ( (itemcost_item_id = pItemId) AND (itemcost_costelem_id = pCostElemId) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'itemcost % not found for. ', pItemId || ' & ' || pCostElemId; END IF; IF (pCost IS NULL OR pCost < 0) THEN RAISE EXCEPTION 'itemcost Actual Cost Invalid ', pCost; END IF; IF (pCost > 0) THEN UPDATE itemcost SET itemcost_actcost=pCost, itemcost_curr_id = pCurrId WHERE (itemcost_id=_itemcost_id); --Only Post Cost to standard if the parameter is set to true IF (pPostToStandard) THEN IF (NOT checkPrivilege('PostStandardCosts')) THEN RAISE EXCEPTION 'You do not have privileges to poststandard itemcosts. Set api.itemcost post_to_standard to false'; END IF; SELECT postcost(_itemcost_id) INTO _postcost_return; IF (NOT _postcost_return) THEN RETURN -2; END IF; END IF; ELSE RETURN -1; END IF; RETURN _itemcost_id; END; $_$; ALTER FUNCTION public.updateitemcost(integer, integer, integer, numeric, boolean) OWNER TO admin; -- -- Name: updateitemsiteleadtime(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateitemsiteleadtime(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pPad ALIAS FOR $2; _p RECORD; _materialLeadTime INTEGER; _productionLeadTime INTEGER; _leadTime INTEGER; BEGIN SELECT item_type, itemsite_wosupply INTO _p FROM item, itemsite WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pitemsiteid) ); IF ( (_p.item_type IN ('M', 'P')) ) THEN IF (_p.item_type = 'M') THEN SELECT COALESCE(MAX(component.itemsite_leadtime), 0) INTO _materialLeadTime FROM bomitem, itemsite AS parent, itemsite AS component WHERE ( (bomitem_parent_item_id=parent.itemsite_item_id) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) AND (bomitem_item_id=component.itemsite_item_id) AND (parent.itemsite_warehous_id=component.itemsite_warehous_id) AND (parent.itemsite_id=pItemsiteid) ); SELECT COALESCE(MAX(booitem_execday), 0) INTO _productionLeadTime FROM xtmfg.booitem, itemsite WHERE ( (booitem_item_id=itemsite_item_id) AND (booitem_rev_id=getActiveRevId('BOO',booitem_item_id)) AND (itemsite_id=pItemsiteid) ); _leadTime := (_materialLeadTime + _productionLeadTime + pPad); ELSIF (_p.item_type IN ('P')) THEN SELECT COALESCE(MAX(itemsrc_leadtime), 0) INTO _leadTime FROM itemsrc, itemsite WHERE ( (itemsite_item_id=itemsrc_item_id) AND (itemsite_id=pItemsiteid) ); _leadTime := (_leadTime + pPad); END IF; ELSE _leadTime = pPad; END IF; UPDATE itemsite SET itemsite_leadtime=_leadTime WHERE (itemsite_id=pItemsiteid); RETURN _leadTime; END; $_$; ALTER FUNCTION public.updateitemsiteleadtime(integer, integer) OWNER TO admin; -- -- Name: updatelistprice(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatelistprice(integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUpdateBy ALIAS FOR $2; BEGIN UPDATE item SET item_listprice = (item_listprice * pUpdateBy) WHERE (item_id=pItemid); RETURN 1; END; $_$; ALTER FUNCTION public.updatelistprice(integer, numeric) OWNER TO admin; -- -- Name: updatelowerusercosts(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatelowerusercosts(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN updateLowerUserCosts(pItemid, TRUE); END; $_$; ALTER FUNCTION public.updatelowerusercosts(integer) OWNER TO admin; -- -- Name: updatelowerusercosts(integer, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatelowerusercosts(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUpdateActual ALIAS FOR $2; _bomitem RECORD; _type CHAR(1); BEGIN SELECT item_type INTO _type FROM item WHERE (item_id=pItemid); IF (_type IN ('M', 'F', 'B', 'T')) THEN FOR _bomitem IN SELECT DISTINCT costelem_type FROM ( SELECT COALESCE(bc.costelem_type, ic.costelem_type) AS costelem_type FROM bomitem(pItemid) JOIN item ON (item_id=bomitem_item_id AND item_type <> 'T') JOIN itemcost ON (itemcost_item_id=bomitem_item_id) JOIN costelem ic ON (ic.costelem_id=itemcost_costelem_id AND NOT ic.costelem_sys) LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=bomitem_id) LEFT OUTER JOIN costelem bc ON (bc.costelem_id=bomitemcost_costelem_id AND NOT bc.costelem_sys) WHERE ( CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1) ) UNION SELECT costelem_type FROM itemcost, costelem WHERE ( (itemcost_costelem_id=costelem_id) AND (itemcost_item_id=pItemid) ) ) AS data LOOP PERFORM updateSorACost( pItemid, _bomitem.costelem_type, TRUE, lowerCost(pItemid, _bomitem.costelem_type, pUpdateActual), pUpdateActual); END LOOP; ELSIF (_type = 'C') THEN FOR _bomitem IN SELECT DISTINCT costelem_type FROM ( SELECT costelem_type FROM itemcost, costelem, xtmfg.bbomitem WHERE ( (bbomitem_item_id=pItemid) AND ( CURRENT_DATE BETWEEN bbomitem_effective AND (bbomitem_expires - 1) ) AND (NOT costelem_sys) AND (bbomitem_item_id=itemcost_item_id) AND (itemcost_costelem_id=costelem_id) ) UNION SELECT costelem_type FROM itemcost, costelem, xtmfg.bbomitem AS t, xtmfg.bbomitem AS s WHERE ( (t.bbomitem_item_id=pItemid) AND ( CURRENT_DATE BETWEEN s.bbomitem_effective AND (s.bbomitem_expires - 1) ) AND ( CURRENT_DATE BETWEEN t.bbomitem_effective AND (t.bbomitem_expires - 1) ) AND (s.bbomitem_parent_item_id=t.bbomitem_parent_item_id) AND (NOT costelem_sys) AND (s.bbomitem_item_id=itemcost_item_id) AND (itemcost_costelem_id=costelem_id) ) ) AS data LOOP PERFORM updateSorACost( pItemid, _bomitem.costelem_type, TRUE, lowerCost(pItemid, _bomitem.costelem_type, pUpdateActual), pUpdateActual); END LOOP; END IF; RETURN 1; END; $_$; ALTER FUNCTION public.updatelowerusercosts(integer, boolean) OWNER TO admin; -- -- Name: updatelowlevel(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatelowlevel(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLowlevel ALIAS FOR $1; _num_back INTEGER; BEGIN UPDATE costUpdate SET costUpdate_lowlevel_code = (pLowlevel + 1) WHERE costUpdate_item_id IN ( SELECT bomitem_item_id FROM bomitem JOIN costUpdate ON (bomitem_parent_item_id = costUpdate_item_id) WHERE ((costUpdate_lowlevel_code = pLowlevel) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1)))) AND costUpdate_lowlevel_code >= pLowlevel; GET DIAGNOSTICS _num_back = ROW_COUNT; RETURN _num_back; END; $_$; ALTER FUNCTION public.updatelowlevel(integer) OWNER TO admin; -- -- Name: updateoutlevel(integer, integer, integer[]); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateoutlevel(integer, integer, integer[]) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDays ALIAS FOR $2; pPeriods ALIAS FOR $3; _cursor INTEGER; _periodid INTEGER; _usage NUMERIC; _totalUsage NUMERIC; _totalDays INTEGER; _outLevel NUMERIC; _averageUsage NUMERIC; BEGIN _cursor := 1; _totalUsage := 0; _totalDays := 0; _periodid = pPeriods[_cursor]; WHILE (_periodid IS NOT NULL) LOOP SELECT COALESCE(SUM(invhist_invqty), 0) INTO _usage FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteid) AND ( invhist_transdate::DATE BETWEEN findPeriodStart(_periodid) AND findPeriodEnd(_periodid) ) AND (invhist_transtype IN ('SH', 'IM')) ); _totalUsage := (_totalUsage + _usage); _totalDays := ( _totalDays + ( findPeriodEnd(_periodid) - findPeriodStart(_periodid) + 1 ) ); _cursor := (_cursor + 1); _periodid = pPeriods[_cursor]; END LOOP; IF (_totalDays > 0) THEN _outLevel := round(_totalUsage / _totalDays * pDays); IF (_outLevel > 0) THEN UPDATE itemsite SET itemsite_ordertoqty = _outLevel WHERE (itemsite_id=pItemsiteid); ELSE UPDATE itemsite SET itemsite_ordertoqty = 0 WHERE (itemsite_id=pItemsiteid); END IF; RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.updateoutlevel(integer, integer, integer[]) OWNER TO admin; -- -- Name: updateprice(integer, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateprice(integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pIpsitemid ALIAS FOR $1; pUpdateBy ALIAS FOR $2; BEGIN RETURN updatePrice(pIpsitemid, 'P', pUpdateBy); END; $_$; ALTER FUNCTION public.updateprice(integer, numeric) OWNER TO admin; -- -- Name: updateprice(integer, character, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateprice(integer, character, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pIpsitemid ALIAS FOR $1; pUpdateType ALIAS FOR $2; pUpdateBy ALIAS FOR $3; BEGIN IF (pUpdateType IN('V')) THEN UPDATE ipsitem SET ipsitem_price = (ipsitem_price + pUpdateBy) WHERE (ipsitem_id=pIpsitemid); RETURN 1; ELSE UPDATE ipsitem SET ipsitem_price = (ipsitem_price * pUpdateBy) WHERE (ipsitem_id=pIpsitemid); RETURN 1; END IF; END; $_$; ALTER FUNCTION public.updateprice(integer, character, numeric) OWNER TO admin; -- -- Name: updatepricesbypricingschedule(integer, character, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatepricesbypricingschedule(pipsheadid integer, pupdatetype character, pupdateby numeric, pupdatecharprices boolean) RETURNS numeric LANGUAGE plpgsql AS $$ DECLARE _percentMultiplier NUMERIC; _currencyDecimals INTEGER; _itemRows INTEGER :=0; _charRows INTEGER :=0; BEGIN IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; -- Get the current user's currency precision SELECT COALESCE(locale_curr_scale, 2) INTO _currencyDecimals FROM locale, usr WHERE usr_locale_id = locale_id AND usr_username = CURRENT_USER; IF (pUpdateType = 'V') THEN UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price + pUpdateBy), _currencyDecimals)) WHERE (ipsitem_ipshead_id = pIpsHeadId); GET DIAGNOSTICS _itemRows = ROW_COUNT; ELSE _percentMultiplier := (1.0 + (pUpdateBy / 100.0)); UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price * _percentMultiplier), _currencyDecimals)) WHERE (ipsitem_ipshead_id = pIpsHeadId); GET DIAGNOSTICS _itemRows = ROW_COUNT; IF (pUpdateCharPrices) THEN UPDATE ipsitemchar SET ipsitemchar_price = noNeg(ROUND( (ipsitemchar_price * _percentMultiplier), _currencyDecimals)) FROM ipsitem WHERE ipsitemchar_ipsitem_id = ipsitem_id AND ipsitem_ipshead_id = pIpsHeadId; GET DIAGNOSTICS _charRows = ROW_COUNT; END IF; END IF; RETURN _itemRows + _charRows; END; $$; ALTER FUNCTION public.updatepricesbypricingschedule(pipsheadid integer, pupdatetype character, pupdateby numeric, pupdatecharprices boolean) OWNER TO admin; -- -- Name: updatepricesbyproductcategory(integer, text, character, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatepricesbyproductcategory(pprodcatid integer, pprodcatpattern text, pupdatetype character, pupdateby numeric, pupdatecharprices boolean) RETURNS numeric LANGUAGE plpgsql AS $$ DECLARE _percentMultiplier NUMERIC; _currencyDecimals INTEGER; _itemRows INTEGER :=0; _charRows INTEGER :=0; BEGIN IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; -- Get the current user's currency precision SELECT COALESCE(locale_curr_scale, 2) INTO _currencyDecimals FROM locale, usr WHERE usr_locale_id = locale_id AND usr_username = CURRENT_USER; _percentMultiplier := (1.0 + (pUpdateBy / 100.0)); IF (pUpdateType = 'V') THEN IF (pProdCatId IS NOT NULL) THEN -- Specified category id UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price + pUpdateBy), _currencyDecimals )) FROM item WHERE ipsitem_item_id = item_id AND item_prodcat_id = pProdCatId; ELSIF (pProdCatPattern IS NOT NULL) THEN -- Pattern match category UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price + pUpdateBy), _currencyDecimals )) FROM item WHERE ipsitem_item_id = item_id AND item_prodcat_id IN ( SELECT prodcat_id FROM prodcat WHERE (prodcat_code ~ pProdCatPattern) ); ELSE -- All categories UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price + pUpdateBy), _currencyDecimals )); END IF; GET DIAGNOSTICS _itemRows = ROW_COUNT; ELSE IF (pProdCatId IS NOT NULL) THEN -- Specified category id UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price * _percentMultiplier), _currencyDecimals )) FROM item WHERE ipsitem_item_id = item_id AND item_prodcat_id = pProdCatId; GET DIAGNOSTICS _itemRows = ROW_COUNT; IF(pUpdateCharPrices) THEN UPDATE ipsitemchar SET ipsitemchar_price = noNeg(ROUND( (ipsitemchar_price * _percentMultiplier), _currencyDecimals )) FROM ipsitem, item WHERE item_prodcat_id = pProdCatId AND ipsitem_item_id = item_id AND ipsitemchar_ipsitem_id = ipsitem_id; GET DIAGNOSTICS _charRows = ROW_COUNT; END IF; ELSIF (pProdCatPattern IS NOT NULL) THEN -- Pattern match category UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price * _percentMultiplier), _currencyDecimals )) FROM item WHERE item_prodcat_id IN ( SELECT prodcat_id FROM prodcat WHERE (prodcat_code ~ pProdCatPattern ) ) AND ipsitem_item_id = item_id; GET DIAGNOSTICS _itemRows = ROW_COUNT; IF(pUpdateCharPrices) THEN UPDATE ipsitemchar SET ipsitemchar_price = noNeg(ROUND( (ipsitemchar_price * _percentMultiplier), _currencyDecimals )) FROM ipsitem, item WHERE item_prodcat_id IN ( SELECT prodcat_id FROM prodcat WHERE (prodcat_code ~ pProdCatPattern ) ) AND ipsitem_item_id = item_id AND ipsitemchar_ipsitem_id = ipsitem_id; GET DIAGNOSTICS _charRows = ROW_COUNT; END IF; ELSE -- All categories UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price * _percentMultiplier), _currencyDecimals )); GET DIAGNOSTICS _itemRows = ROW_COUNT; IF(pUpdateCharPrices) THEN UPDATE ipsitemchar SET ipsitemchar_price = noNeg(ROUND( (ipsitemchar_price * _percentMultiplier), _currencyDecimals )); GET DIAGNOSTICS _charRows = ROW_COUNT; END IF; END IF; END IF; RETURN _itemRows + _charRows; END; $$; ALTER FUNCTION public.updatepricesbyproductcategory(pprodcatid integer, pprodcatpattern text, pupdatetype character, pupdateby numeric, pupdatecharprices boolean) OWNER TO admin; -- -- Name: updatereorderlevel(integer, integer, integer[]); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatereorderlevel(integer, integer, integer[]) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDays ALIAS FOR $2; pPeriods ALIAS FOR $3; _cursor INTEGER; _periodid INTEGER; _usage NUMERIC; _totalUsage NUMERIC; _totalDays INTEGER; _reorderLevel INTEGER; _averageUsage NUMERIC; _result TEXT; BEGIN _cursor := 1; _totalUsage := 0; _totalDays := 0; _periodid = pPeriods[_cursor]; WHILE (_periodid IS NOT NULL) LOOP SELECT COALESCE(SUM(invhist_invqty), 0) INTO _usage FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteid) AND ( invhist_transdate::DATE BETWEEN findPeriodStart(_periodid) AND findPeriodEnd(_periodid) ) AND (invhist_transtype IN ('SH', 'IM')) ); _totalUsage := (_totalUsage + _usage); _totalDays := ( _totalDays + ( findPeriodEnd(_periodid) - findPeriodStart(_periodid) + 1 ) ); _cursor := (_cursor + 1); _periodid = pPeriods[_cursor]; END LOOP; IF (_totalDays > 0) THEN _reorderLevel := round(_totalUsage / _totalDays * pDays); SELECT itemsite_stocked INTO _result from itemsite WHERE (itemsite_id=pItemsiteid); IF (_reorderLevel = 0 AND _result='t') THEN _reorderLevel := 1; END IF; IF (_reorderLevel > 0) THEN UPDATE itemsite SET itemsite_reorderlevel = _reorderLevel WHERE (itemsite_id=pItemsiteid); ELSE UPDATE itemsite SET itemsite_reorderlevel = 0 WHERE (itemsite_id=pItemsiteid); END IF; RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.updatereorderlevel(integer, integer, integer[]) OWNER TO admin; -- -- Name: updatereorderlevel(integer[], integer, boolean, integer[]); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatereorderlevel(integer[], integer, boolean, integer[]) RETURNS SETOF reordlvl LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteids ALIAS FOR $1; pDays ALIAS FOR $2; pAddLeadtime ALIAS FOR $3; pPeriodIds ALIAS FOR $4; _icursor INTEGER := 1; _pcursor INTEGER := 1; _totalUsage NUMERIC := 0; _totalDays INTEGER := 0; _reorderLevel INTEGER := 0; _result TEXT; _usage NUMERIC; _averageUsage NUMERIC; _row reordlvl %ROWTYPE; BEGIN -- Validate IF (pItemsiteIds[1] IS NULL OR pPeriodIds[1] IS NULL) THEN RETURN; END IF; -- Calculate total days FOR _pcursor IN 1..ARRAY_UPPER(pPeriodIds,1) LOOP _totalDays := ( _totalDays + ( findPeriodEnd(pPeriodIds[_pcursor]) - findPeriodStart(pPeriodIds[_pcursor]) + 1 ) ); END LOOP; -- Loop through each itemsite id FOR _icursor IN 1..ARRAY_UPPER(pItemsiteIds,1) LOOP -- Get itemsite data SELECT itemsite_id, item_id, warehous_code, item_number, item_descrip1, itemsite_leadtime, 0, itemsite_reorderlevel, 0, 0, 0 INTO _row FROM itemsite JOIN item ON (itemsite_item_id=item_id) JOIN whsinfo ON (itemsite_warehous_id=warehous_id) WHERE (itemsite_id=pItemsiteIds[_icursor]); IF (FOUND) THEN IF (pAddLeadtime) THEN _row.reordlvl_daysofstock := pDays + _row.reordlvl_leadtime; ELSE _row.reordlvl_daysofstock := pDays; END IF; -- Loop through each period id FOR _pcursor IN 1..ARRAY_UPPER(pPeriodIds,1) LOOP -- Sum days and usage shipping and inventory transactions SELECT COALESCE(SUM(invhist_invqty), 0) INTO _usage FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteIds[_icursor]) AND ( invhist_transdate::DATE BETWEEN findPeriodStart(pPeriodIds[_pcursor]) AND findPeriodEnd(pPeriodIds[_pcursor]) ) AND (invhist_transtype IN ('SH', 'IM')) ); _totalUsage := (_totalUsage + _usage); END LOOP; -- Calculate reorder level IF (_totalDays > 0) THEN _reorderLevel := round(_totalUsage / _totalDays * _row.reordlvl_daysofstock); END IF; IF (_reorderLevel <= 0) THEN _reorderLevel := 0; END IF; SELECT itemsite_stocked INTO _result from itemsite WHERE (itemsite_id=pItemsiteIds[_icursor]); IF (_reorderLevel = 0 AND _result='t') THEN _reorderLevel := 1; END IF; -- Set values _row.reordlvl_total_days := _totalDays; _row.reordlvl_total_usage := _totalUsage; _row.reordlvl_calc_level := _reorderLevel; -- Return result RETURN NEXT _row; END IF; _usage := 0; _averageUsage := 0; _totalUsage := 0; _reorderLevel := 0; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.updatereorderlevel(integer[], integer, boolean, integer[]) OWNER TO admin; -- -- Name: updateretainedearnings(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updateretainedearnings(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pYearPeriodid ALIAS FOR $1; _r RECORD; _n RECORD; _c RECORD; _beginningPeriodid INTEGER; _trialbalid INTEGER; _accntid INTEGER; _totalProfitLoss NUMERIC; _periodid INTEGER; _forwardupdate INTEGER; BEGIN -- First thing we need to do is to get the yearperiod SELECT * INTO _r FROM yearperiod where yearperiod_id = pYearPeriodid; IF (NOT FOUND) THEN RETURN -6; END IF; -- Now we need to find the next yearperiod SELECT * INTO _n FROM yearperiod WHERE yearperiod_start = _r.yearperiod_end + interval '1 day'; IF (NOT FOUND) THEN RETURN -4; END IF; -- Now we have to find where to stick the end of year data SELECT period_id INTO _periodid FROM period WHERE period_start = _n.yearperiod_start; IF (NOT FOUND) THEN RETURN -8; END IF; -- Loop through companies and process each one IF (coalesce(fetchMetricValue('GLCompanySize'),0) = 0) THEN -- Process for installs not using company segment -- Now we need to get the default account number for year end closing SELECT CAST ( metric_value AS integer ) INTO _accntid FROM metric WHERE metric_name = 'YearEndEquityAccount'; IF (NOT FOUND) THEN RETURN -7; END IF; -- So far so good. Now we need to calculate the profit-loss for the year that we are closing SELECT SUM(gltrans_amount) INTO _totalProfitLoss FROM gltrans, accnt WHERE ( (gltrans_accnt_id = accnt_id) AND (accnt_type IN ( 'R', 'E' ) ) AND (gltrans_posted) AND (NOT gltrans_deleted) AND (gltrans_date between _r.yearperiod_start and _r.yearperiod_end ) ); IF (_totalProfitLoss IS NULL) THEN _totalProfitLoss := 0; END IF; -- Get the trailbal_id SELECT trialbal_id INTO _trialbalid FROM trialbal WHERE ( (trialbal_period_id = _periodid ) AND (trialbal_accnt_id = _accntid) ); IF (NOT FOUND) THEN RETURN -9; END IF; -- Lets do the update for the trialbal UPDATE trialbal SET trialbal_beginning = trialbal_beginning - trialbal_yearend + _totalProfitLoss, trialbal_ending = trialbal_beginning - trialbal_yearend - trialbal_debits + trialbal_credits + _totalProfitLoss, trialbal_yearend = _totalProfitLoss WHERE trialbal_id = _trialbalid; -- Now the forward update SELECT forwardupdatetrialbalance(_trialbalid) INTO _forwardupdate; ELSE -- Process for a multi-company set up FOR _c IN SELECT company_number, company_yearend_accnt_id FROM company LOOP -- Calculate the profit-loss for the year that we are closing SELECT SUM(gltrans_amount) INTO _totalProfitLoss FROM gltrans, accnt WHERE ( (gltrans_accnt_id = accnt_id) AND (accnt_type IN ( 'R', 'E' ) ) AND (gltrans_posted) AND (NOT gltrans_deleted) AND (accnt_company = _c.company_number) AND (gltrans_date between _r.yearperiod_start and _r.yearperiod_end ) ); IF(_totalProfitLoss IS NULL) THEN _totalProfitLoss := 0; END IF; -- Get the trailbal_id SELECT trialbal_id INTO _trialbalid FROM trialbal JOIN accnt ON (trialbal_accnt_id=accnt_id) WHERE ( (trialbal_period_id = _periodid ) AND (trialbal_accnt_id = _c.company_yearend_accnt_id) ); IF (NOT FOUND) THEN -- Create a trial balance record SELECT NEXTVAL('trialbal_trialbal_id_seq') INTO _trialbalid; INSERT INTO trialbal ( trialbal_id, trialbal_accnt_id, trialbal_period_id, trialbal_beginning, trialbal_dirty, trialbal_ending, trialbal_credits, trialbal_debits, trialbal_yearend ) VALUES ( _trialbalid, _c.company_yearend_accnt_id, _periodid, _totalProfitLoss, TRUE, _totalProfitLoss, 0, 0, _totalProfitLoss ); ELSE -- Lets do the update for the trialbal UPDATE trialbal SET trialbal_beginning = trialbal_beginning - trialbal_yearend + _totalProfitLoss, trialbal_ending = trialbal_beginning - trialbal_yearend - trialbal_debits + trialbal_credits + _totalProfitLoss, trialbal_yearend = _totalProfitLoss WHERE trialbal_id = _trialbalid; END IF; -- Now the forward update SELECT forwardupdatetrialbalance(_trialbalid) INTO _forwardupdate; END LOOP; END IF; RETURN 0; END; $_$; ALTER FUNCTION public.updateretainedearnings(integer) OWNER TO admin; -- -- Name: updatesoracost(integer, text, boolean, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatesoracost(integer, text, boolean, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCosttype ALIAS FOR $2; pLevel ALIAS FOR $3; pCost ALIAS FOR $4; pUpdateActual ALIAS FOR $5; BEGIN IF (pUpdateActual) THEN RETURN updateCost(pItemid, pCosttype, pLevel, pCost); ELSE RETURN updateStdCost(pItemid, pCosttype, pLevel, pCost); END IF; END; $_$; ALTER FUNCTION public.updatesoracost(integer, text, boolean, numeric, boolean) OWNER TO admin; -- -- Name: updatestdcost(integer, numeric, numeric, text, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatestdcost(integer, numeric, numeric, text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemcostid ALIAS FOR $1; pNewcost ALIAS FOR $2; pOldcost ALIAS FOR $3; pDocNumber ALIAS FOR $4; pNotes ALIAS FOR $5; _itemcostid INTEGER; _r RECORD; _newcost NUMERIC; _oldcost NUMERIC; BEGIN IF (pNewcost IS NULL) THEN _newcost := 0; ELSE _newcost := pNewcost; END IF; IF (pOldcost IS NULL) THEN _oldcost := 0; ELSE _oldcost := pOldcost; END IF; IF (_newcost > 0) THEN UPDATE itemcost SET itemcost_stdcost=_newcost, itemcost_posted=CURRENT_DATE WHERE (itemcost_id=pItemcostid); END IF; -- Distribute to G/L, debit Inventory Asset, credit Inventory Cost Variance FOR _r IN SELECT itemsite_id, (itemsite_qtyonhand + itemsite_nnqoh) AS totalQty, costcat_invcost_accnt_id, costcat_asset_accnt_id, itemsite_costmethod FROM itemcost, itemsite, costcat WHERE ( (itemsite_item_id=itemcost_item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_costmethod != 'A') AND ((itemsite_qtyonhand + itemsite_nnqoh) <> 0) AND (itemcost_id=pItemcostid) ) LOOP -- IF (_newcost <> _oldcost) THEN -- RAISE NOTICE 'itemcost_id = %, Qty = %, Old Cost = %, New Cost = %', pItemcostid, _r.totalQty, _oldcost, _newcost; -- END IF; PERFORM insertGLTransaction( 'P/D', '', pDocNumber, pNotes, _r.costcat_invcost_accnt_id, _r.costcat_asset_accnt_id, _r.itemsite_id, ((_newcost - _oldcost) * _r.totalQty), CURRENT_DATE ); -- Update Itemsite Value if not Average Cost IF (_r.itemsite_costmethod <> 'A') THEN -- RAISE NOTICE 'itemsite_id = %, Qty = %, New Cost = %', _r.itemsite_id, _r.totalQty, _newcost; UPDATE itemsite SET itemsite_value=(_r.totalQty * stdCost(itemsite_item_id)) WHERE (itemsite_id=_r.itemsite_id); END IF; END LOOP; IF (_newcost = 0) THEN DELETE FROM itemcost WHERE (itemcost_id=pItemcostid); RETURN FALSE; END IF; IF ( SELECT metric_value FROM metric WHERE ((metric_name = 'EnableAsOfQOH') AND (metric_value = 't'))) THEN IF (pNewcost IS NOT NULL) THEN _newcost := pNewcost; END IF; IF (pOldcost IS NULL) THEN _oldcost := 0; ELSE _oldcost := pOldcost; END IF; -- Distribute to G/L, debit Inventory Asset, credit Inventory Cost Variance PERFORM postValueIntoInvBalance( itemsite_id, current_date, asofinvqty(itemsite_id,current_date), asofinvnn(itemsite_id,current_date), _oldcost, _newcost) FROM itemsite JOIN item ON (itemsite_item_id=item_id) JOIN itemcost ON (itemcost_item_id=item_id) WHERE((itemsite_costmethod = 'S') AND (itemcost_id=pItemcostid)); END IF; RETURN TRUE; END; $_$; ALTER FUNCTION public.updatestdcost(integer, numeric, numeric, text, text) OWNER TO admin; -- -- Name: updatestdcost(integer, text, boolean, numeric); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatestdcost(integer, text, boolean, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCostType ALIAS FOR $2; pLevel ALIAS FOR $3; pCost ALIAS FOR $4; _newCost NUMERIC; _oldCost NUMERIC := 0; _itemcostid INTEGER; _updateRet BOOLEAN; _itemNumber TEXT; BEGIN IF (pCost IS NULL) THEN _newCost = 0; ELSE _newCost = pCost; END IF; SELECT itemcost_id, itemcost_stdCost, item_number INTO _itemcostid, _oldCost, _itemNumber FROM itemcost, costelem, item WHERE ((itemcost_costelem_id=costelem_id) AND (itemcost_item_id=item_id) AND (item_id=pItemid) AND (itemcost_lowlevel=pLevel) AND (costelem_type=pCosttype)); -- RAISE NOTICE 'updateStdCost(%, %, %, %) has itemcost_id % and stdcost %', -- pItemid, pCostType, plevel, _newCost, _itemcostid, _oldCost; IF (NOT FOUND) AND (_newCost > 0) THEN SELECT NEXTVAL('itemcost_itemcost_id_seq') INTO _itemcostid; RAISE NOTICE 'updateStdCost() inserting itemcost_id %', _itemcostid; INSERT INTO itemcost (itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated) SELECT _itemcostid, pItemid, costelem_id, pLevel, _newCost, CURRENT_DATE, 0, CURRENT_DATE FROM costelem WHERE (costelem_type=pCosttype); END IF; IF (_itemcostid IS NOT NULL) THEN SELECT updateStdCost(_itemcostid, _newCost, _oldCost, 'Post Cost', ('Set Standard Cost - ' || pCosttype || ' for item ' || _itemNumber)) INTO _updateRet; IF (_updateRet) THEN RETURN _itemcostid; END IF; END IF; RETURN -1; END; $_$; ALTER FUNCTION public.updatestdcost(integer, text, boolean, numeric) OWNER TO admin; -- -- Name: updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN updateTodoItem($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, NULL); END; $_$; ALTER FUNCTION public.updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text) OWNER TO admin; -- -- Name: updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoitemid ALIAS FOR $1; pusername ALIAS FOR $2; pname ALIAS FOR $3; pdesc ALIAS FOR $4; pincdtid ALIAS FOR $5; pcrmacctid ALIAS FOR $6; pOpheadid ALIAS FOR $7; pstarted ALIAS FOR $8; pdue ALIAS FOR $9; pstatus ALIAS FOR $10; passigned ALIAS FOR $11; pcompleted ALIAS FOR $12; ppriority ALIAS FOR $13; pnotes ALIAS FOR $14; pactive ALIAS FOR $15; powner ALIAS FOR $16; pcntctid ALIAS FOR $17; _priority INTEGER := ppriority; _status CHARACTER(1) := pstatus; _incdtid INTEGER := pincdtid; _crmacctid INTEGER := pcrmacctid; _opheadid INTEGER := pOpheadid; _assigned DATE := passigned; _active BOOL := pactive; _result INTEGER; BEGIN IF (pusername IS NULL OR pusername = '') THEN RETURN -1; END IF; IF (pname IS NULL OR pname = '') THEN RETURN -2; END IF; IF (pdue IS NULL) THEN RETURN -3; END IF; IF (ptodoitemid IS NULL OR ptodoitemid <= 0) THEN RETURN -10; END IF; IF (pcompleted IS NOT NULL) THEN _status := 'C'; ELSIF (pstatus IS NULL AND pstarted IS NOT NULL) THEN _status := 'I'; ELSIF (pstatus IS NULL) THEN _status := 'N'; END IF; IF (_incdtid <= 0) THEN _incdtid := NULL; END IF; IF (_crmacctid <= 0) THEN _crmacctid := NULL; END IF; IF (_opheadid <= 0) THEN _opheadid := NULL; END IF; IF (_priority <= 0) THEN _priority := NULL; END IF; IF (_assigned IS NULL) THEN _assigned := CURRENT_DATE; END IF; IF (_active IS NULL) THEN _active := TRUE; END IF; UPDATE todoitem SET todoitem_username=pusername, todoitem_name=pname, todoitem_description=pdesc, todoitem_incdt_id=_incdtid, todoitem_status=_status, todoitem_active=_active, todoitem_start_date=pstarted, todoitem_due_date=pdue, todoitem_assigned_date=_assigned, todoitem_completed_date=pcompleted, todoitem_priority_id=_priority, todoitem_notes=pnotes, todoitem_crmacct_id=_crmacctid, todoitem_ophead_id=_opheadid, todoitem_owner_username=powner, todoitem_cntct_id=pcntctid WHERE (todoitem_id=ptodoitemid); RETURN ptodoitemid; END; $_$; ALTER FUNCTION public.updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text, integer) OWNER TO admin; -- -- Name: usedefaultlocation(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION usedefaultlocation(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _p RECORD; BEGIN SELECT itemsite_location_id, LENGTH(itemsite_location) AS locationlength INTO _p FROM itemsite WHERE (itemsite_id=pItemsiteid); IF (NOT FOUND) THEN RETURN FALSE; ELSIF (_p.itemsite_location_id <> -1) THEN RETURN TRUE; ELSIF (_p.locationlength > 0) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; ALTER FUNCTION public.usedefaultlocation(integer) OWNER TO admin; -- -- Name: usercancreateusers(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION usercancreateusers(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT rolcreaterole OR rolsuper FROM pg_roles WHERE rolname=($1); $_$; ALTER FUNCTION public.usercancreateusers(text) OWNER TO admin; -- -- Name: usercanlogin(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION usercanlogin(pusername text) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _isactive BOOLEAN; _mode TEXT; BEGIN IF (isDBA(pUsername) OR userCanCreateUsers(pUsername)) THEN RETURN TRUE; ELSIF (pg_has_role(pUsername, 'xtrole', 'member')) THEN _mode := COALESCE(fetchMetricText('AllowedUserLogins'), ''); IF (_mode = 'AdminOnly') THEN RETURN FALSE; -- administrators were checked above END IF; IF (_mode NOT IN ('AdminOnly','ActiveOnly','Any')) THEN _mode := 'ActiveOnly'; END IF; SELECT (usrpref_value = 't') INTO _isactive FROM usrpref WHERE usrpref_username = pUsername AND usrpref_name = 'active'; IF (_isactive OR _mode = 'Any') THEN RETURN TRUE; END IF; END IF; RETURN FALSE; END; $$; ALTER FUNCTION public.usercanlogin(pusername text) OWNER TO admin; -- -- Name: userid(text); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION userid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; _userId INTEGER; BEGIN SELECT usesysid INTO _userId FROM pg_user WHERE (usename=pUsername); IF (FOUND) THEN RETURN _userId; ELSE RETURN -1; END IF; END; $_$; ALTER FUNCTION public.userid(text) OWNER TO admin; -- -- Name: validateorderqty(integer, numeric, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION validateorderqty(integer, numeric, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pManual ALIAS FOR $3; _p RECORD; _qty NUMERIC; BEGIN _qty := pQty; SELECT itemsite_useparams, CASE WHEN (itemsite_useparams) THEN itemsite_useparamsmanual ELSE FALSE END AS itemsite_useparamsmanual, CASE WHEN (itemsite_useparams) THEN itemsite_minordqty ELSE 0.0 END AS itemsite_minordqty, CASE WHEN (itemsite_useparams) THEN itemsite_multordqty ELSE 0.0 END AS itemsite_multordqty, item_fractional, item_type INTO _p FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ); IF ( (pManual AND (_p.itemsite_useparamsmanual)) OR ((NOT pManual) AND (_p.itemsite_useparams)) ) THEN IF (_qty < _p.itemsite_minordqty) THEN _qty := _p.itemsite_minordqty; END IF; IF ( (_p.itemsite_multordqty > 0) AND ((_qty % _p.itemsite_multordqty) > 0) ) THEN _qty := ((TRUNC(_qty / _p.itemsite_multordqty) * _p.itemsite_multordqty) + _p.itemsite_multordqty); END IF; END IF; _qty := roundQty(_p.item_fractional, _qty); RETURN _qty; END; $_$; ALTER FUNCTION public.validateorderqty(integer, numeric, boolean) OWNER TO admin; -- -- Name: validlocation(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION validlocation(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; _p RECORD; BEGIN SELECT location_restrict INTO _p FROM location, itemsite WHERE ( (location_warehous_id=itemsite_warehous_id) AND (itemsite_id=pItemsiteid) AND (location_id=pLocationid) ); IF (FOUND) THEN IF (_p.location_restrict) THEN SELECT locitem_id INTO _p FROM locitem, itemsite WHERE ( (locitem_item_id=itemsite_item_id) AND (itemsite_id=pItemsiteid) AND (locitem_location_id=pLocationid) ); IF (FOUND) THEN RETURN TRUE; END IF; ELSE RETURN TRUE; END IF; ELSE RETURN FALSE; END IF; RETURN FALSE; END; $_$; ALTER FUNCTION public.validlocation(integer, integer) OWNER TO admin; -- -- Name: valueatshipping(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION valueatshipping(plineitemid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN valueAtShipping('SO', plineitemid); END; $$; ALTER FUNCTION public.valueatshipping(plineitemid integer) OWNER TO admin; -- -- Name: valueatshipping(text, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION valueatshipping(pordertype text, plineitemid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC := 0.0; BEGIN IF (pordertype NOT IN ('SO', 'TO')) THEN RAISE EXCEPTION '% is not a valid order type', pordertype; END IF; SELECT COALESCE(SUM(shipitem_value), 0.0) INTO _value FROM shipitem JOIN shiphead ON (shipitem_shiphead_id=shiphead_id) WHERE ( (NOT shiphead_shipped) AND (shiphead_order_type=pordertype) AND (shipitem_orderitem_id=plineitemid) ); RETURN _value; END; $$; ALTER FUNCTION public.valueatshipping(pordertype text, plineitemid integer) OWNER TO admin; -- -- Name: voidapcheck(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'voidAPCheck() is deprecated - use voidCheck() instead'; RETURN voidCheck($1); END; $_$; ALTER FUNCTION public.voidapcheck(integer) OWNER TO admin; -- -- Name: voidapopenvoucher(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidapopenvoucher(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; BEGIN RETURN voidApopenVoucher(pApopenid, fetchJournalNumber('AP-VO')); END; $_$; ALTER FUNCTION public.voidapopenvoucher(integer) OWNER TO admin; -- -- Name: voidapopenvoucher(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidapopenvoucher(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _apopenid INTEGER; _apcreditapplyid INTEGER; _reference TEXT; _result INTEGER; _sequence INTEGER; _totalAmount_base NUMERIC; _totalAmount NUMERIC; _itemAmount_base NUMERIC; _itemAmount NUMERIC; _test INTEGER; _a RECORD; _d RECORD; _g RECORD; _p RECORD; _n RECORD; _r RECORD; _costx RECORD; _pExplain BOOLEAN; _pLowLevel BOOLEAN; _exchGainFreight NUMERIC; _firstExchDateFreight DATE; _tmpTotal NUMERIC; _glDate DATE; BEGIN _totalAmount_base := 0; _totalAmount := 0; SELECT fetchGLSequence() INTO _sequence; -- Cache APOpen Information SELECT apopen.* INTO _n FROM apopen WHERE ( (apopen_doctype='V') AND (apopen_id=pApopenid) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% as apopen not found', pApopenid; END IF; -- Cache Voucher Infomation SELECT vohead.*, vend_number || '-' || vend_name || ' ' || vohead_reference AS glnotes, COALESCE(pohead_orderdate, vohead_docdate) AS pohead_orderdate, COALESCE(pohead_curr_id, vohead_curr_id) AS pohead_curr_id INTO _p FROM vohead JOIN vendinfo ON (vend_id=vohead_vend_id) LEFT OUTER JOIN pohead ON (vohead_pohead_id = pohead_id) WHERE (vohead_number=_n.apopen_docnumber); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% as vohead not found', _n.apopen_docnumber; END IF; _glDate := COALESCE(_p.vohead_gldistdate, _p.vohead_distdate); -- there is no currency gain/loss on items, see issue 3892, -- but there might be on freight, which is first encountered at p/o receipt SELECT recv_date::DATE INTO _firstExchDateFreight FROM recv WHERE (recv_vohead_id = _p.vohead_id); -- Start by handling taxes FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.vohead_curr_id, round(sum(taxdetail_tax),2), _p.vohead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('VO', _p.vohead_id, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', _p.vohead_number, _r.tax_sales_accnt_id, (_r.taxbasevalue * -1), _glDate, _p.glnotes ); _totalAmount_base := (_totalAmount_base - _r.taxbasevalue); _totalAmount := (_totalAmount - _r.tax); END LOOP; -- Loop through the vodist records for the passed vohead that -- are posted against a P/O Item FOR _g IN SELECT DISTINCT poitem_id, voitem_qty, poitem_expcat_id, poitem_invvenduomratio, COALESCE(itemsite_id, -1) AS itemsiteid, COALESCE(itemsite_costcat_id, -1) AS costcatid, COALESCE(itemsite_item_id, -1) AS itemsite_item_id, (SELECT SUM(value) FROM ( SELECT SUM(recv_value) AS value FROM recv WHERE (recv_voitem_id=voitem_id) UNION SELECT SUM(poreject_value)*-1 AS value FROM poreject WHERE (poreject_voitem_id=voitem_id)) as data) AS value_base, (poitem_freight_vouchered / poitem_qty_vouchered) * voitem_qty AS vouchered_freight, currToBase(_p.pohead_curr_id, (poitem_freight_vouchered / poitem_qty_vouchered) * voitem_qty, _firstExchDateFreight ) AS vouchered_freight_base, voitem_freight, currToBase(_p.vohead_curr_id, voitem_freight, _p.vohead_distdate) AS voitem_freight_base FROM vodist, voitem, poitem LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) WHERE ( (vodist_poitem_id=poitem_id) AND (voitem_poitem_id=poitem_id) AND (voitem_vohead_id=vodist_vohead_id) AND (vodist_vohead_id=_p.vohead_id)) LOOP -- Grab the G/L Accounts IF (_g.costcatid = -1) THEN SELECT pp.accnt_id AS pp_accnt_id, lb.accnt_id AS lb_accnt_id INTO _a FROM expcat, accnt AS pp, accnt AS lb WHERE ( (expcat_purchprice_accnt_id=pp.accnt_id) AND (expcat_liability_accnt_id=lb.accnt_id) AND (expcat_id=_g.poitem_expcat_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% due to unassigned G/L Accounts.', _p.vohead_number; END IF; ELSE SELECT pp.accnt_id AS pp_accnt_id, lb.accnt_id AS lb_accnt_id INTO _a FROM costcat, accnt AS pp, accnt AS lb WHERE ( (costcat_purchprice_accnt_id=pp.accnt_id) AND (costcat_liability_accnt_id=lb.accnt_id) AND (costcat_id=_g.costcatid) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% due to unassigned G/L Accounts.', _p.vohead_number; END IF; END IF; -- Clear the Item Amount accumulator _itemAmount_base := 0; _itemAmount := 0; -- Figure out the total posted value for this line item FOR _d IN SELECT vodist_id, vodist_amount, _p.vohead_curr_id, vodist_costelem_id, currToBase(_p.vohead_curr_id, vodist_amount, _p.vohead_distdate) AS vodist_amount_base FROM vodist WHERE ( (vodist_vohead_id=_p.vohead_id) AND (vodist_poitem_id=_g.poitem_id) ) LOOP _pExplain := TRUE; SELECT * INTO _costx FROM itemcost WHERE ( (itemcost_item_id = _g.itemsite_item_id) AND (itemcost_costelem_id = _d.vodist_costelem_id) ); IF (FOUND) THEN _pExplain := _costx.itemcost_lowlevel; END IF; -- Add the Distribution Amount to the Item Amount _itemAmount_base := _itemAmount_base + ROUND(_d.vodist_amount_base, 2); _itemAmount := _itemAmount + _d.vodist_amount; END LOOP; -- Distribute from the clearing account PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.lb_accnt_id, round(_g.value_base + _g.vouchered_freight_base, 2), _glDate, _p.glnotes ); -- Attribute the correct portion to currency gain/loss _exchGainFreight := 0; SELECT currGain(_p.pohead_curr_id, _g.vouchered_freight, _firstExchDateFreight, _p.vohead_distdate ) INTO _exchGainFreight; IF (round(_exchGainFreight, 2) <> 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/P', 'VO', text(_p.vohead_number), getGainLossAccntId(_a.lb_accnt_id), round(_exchGainFreight, 2) * -1, _glDate, _p.glnotes); END IF; -- Distribute the remaining variance to the Purchase Price Variance account IF (round(_itemAmount_base, 2) <> round(_g.value_base, 2)) THEN _tmpTotal := round(_itemAmount_base, 2) - round(_g.value_base, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.pp_accnt_id, _tmpTotal, _glDate, _p.glnotes ); END IF; -- Distribute the remaining freight variance to the Purchase Price Variance account IF (round(_g.voitem_freight_base + _exchGainFreight, 2) <> round(_g.vouchered_freight_base, 2)) THEN _tmpTotal := round(_g.voitem_freight_base + _exchGainFreight, 2) - round(_g.vouchered_freight_base, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.pp_accnt_id, _tmpTotal, _glDate, _p.glnotes ); END IF; -- Add the distribution amount to the total amount to distribute _totalAmount_base := (_totalAmount_base + _itemAmount_base + _g.voitem_freight_base); _totalAmount := (_totalAmount + _itemAmount + _g.voitem_freight); -- Reverse the posting for all the Tagged Receivings for this P/O Item UPDATE recv SET recv_invoiced=FALSE, recv_recvcost_curr_id=basecurrid(), recv_recvcost=0, recv_vohead_id=NULL, recv_voitem_id=NULL FROM poitem WHERE ( (recv_orderitem_id=poitem_id) AND (recv_order_type='PO') AND (recv_orderitem_id=_g.poitem_id) AND (recv_vohead_id=_p.vohead_id) ); -- Reverse the posting for all the Tagged Rejections for this P/O Item UPDATE poreject SET poreject_invoiced=FALSE, poreject_vohead_id=NULL, poreject_voitem_id=NULL WHERE ( (poreject_poitem_id=_g.poitem_id) AND (poreject_vohead_id=_p.vohead_id) ); -- Update the qty and freight vouchered fields UPDATE poitem SET poitem_qty_vouchered = (poitem_qty_vouchered - _g.voitem_qty), poitem_freight_vouchered = (poitem_freight_vouchered - _g.voitem_freight) WHERE (poitem_id=_g.poitem_id); END LOOP; -- Loop through the vodist records for the passed vohead that -- are not posted against a P/O Item -- Skip the tax distributions FOR _d IN SELECT vodist_id, currToBase(_p.vohead_curr_id, vodist_amount, _p.vohead_distdate) AS vodist_amount_base, vodist_amount, vodist_accnt_id, vodist_expcat_id FROM vodist WHERE ( (vodist_vohead_id=_p.vohead_id) AND (vodist_poitem_id=-1) AND (vodist_tax_id=-1) ) LOOP -- Distribute from the misc. account IF (_d.vodist_accnt_id = -1) THEN PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), expcat_exp_accnt_id, round(_d.vodist_amount_base, 2), _glDate, _p.glnotes ) FROM expcat WHERE (expcat_id=_d.vodist_expcat_id); ELSE PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _d.vodist_accnt_id, round(_d.vodist_amount_base, 2), _glDate, _p.glnotes ); END IF; -- Add the Distribution Amount to the Total Amount _totalAmount_base := _totalAmount_base + ROUND(_d.vodist_amount_base, 2); _totalAmount := _totalAmount + _d.vodist_amount; END LOOP; SELECT insertIntoGLSeries( _sequence, 'A/P', 'VO', text(vohead_number), accnt_id, round(_totalAmount_base, 2) * -1, _glDate, _p.glnotes ) INTO _test FROM vohead LEFT OUTER JOIN accnt ON (accnt_id=findAPAccount(vohead_vend_id)) WHERE ( (findAPAccount(vohead_vend_id)=0 OR accnt_id > 0) -- G/L interface might be disabled AND (vohead_id=_p.vohead_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% due to an unassigned A/P Account.', _p.vohead_number; END IF; PERFORM postGLSeries(_sequence, pJournalNumber); -- Create the A/P Open Item SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; _reference := ('Void Voucher #' || _n.apopen_docnumber); INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_curr_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_discount, apopen_curr_rate ) SELECT _apopenid, getEffectiveXtUser(), pJournalnumber, apopen_vend_id, apopen_docnumber, 'C', apopen_ponumber, CURRENT_DATE, CURRENT_DATE, CURRENT_DATE, -1, apopen_curr_id, apopen_amount - apopen_paid, 0, TRUE, _reference, TRUE, apopen_curr_rate FROM apopen WHERE (apopen_id=_n.apopen_id); SELECT apcreditapply_id INTO _apcreditapplyid FROM apcreditapply WHERE ( (apcreditapply_source_apopen_id=_apopenid) AND (apcreditapply_target_apopen_id=_n.apopen_id) ); IF (FOUND) THEN UPDATE apcreditapply SET apcreditapply_amount=_n.apopen_amount-_n.apopen_paid WHERE (apcreditapply_id=_apcreditapplyid); ELSE SELECT nextval('apcreditapply_apcreditapply_id_seq') INTO _apcreditapplyid; INSERT INTO apcreditapply ( apcreditapply_id, apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id ) VALUES ( _apcreditapplyid, _apopenid, _n.apopen_id, _n.apopen_amount-_n.apopen_paid, _n.apopen_curr_id ); END IF; SELECT postAPCreditMemoApplication(_apopenid) INTO _result; IF (_result < 0) THEN RAISE EXCEPTION 'Credit application failed with result %.', _result; END IF; -- Reopen all of the P/O Items that were closed by this Voucher UPDATE poitem SET poitem_status='O' FROM voitem WHERE ( (voitem_poitem_id=poitem_id) AND (voitem_close) AND (voitem_vohead_id=_p.vohead_id) ); -- Reopen the P/O UPDATE pohead SET pohead_status='O' WHERE (pohead_id=_p.vohead_pohead_id); -- Mark as voided UPDATE apopen SET apopen_void=TRUE WHERE (apopen_id=_n.apopen_id); RETURN pJournalNumber; END; $_$; ALTER FUNCTION public.voidapopenvoucher(integer, integer) OWNER TO admin; -- -- Name: voidcheck(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; BEGIN IF ( SELECT (checkhead_void OR checkhead_posted OR checkhead_replaced) FROM checkhead WHERE (checkhead_id=pCheckid) ) THEN RETURN -1; END IF; UPDATE checkhead SET checkhead_void=TRUE WHERE (checkhead_id=pCheckid); RETURN 1; END; $_$; ALTER FUNCTION public.voidcheck(integer) OWNER TO admin; -- -- Name: voidcreditmemo(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidcreditmemo(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; _r RECORD; _p RECORD; _n RECORD; _glSequence INTEGER := 0; _glJournal INTEGER := 0; _itemlocSeries INTEGER := 0; _invhistid INTEGER; _test INTEGER; _amount NUMERIC; _roundedBase NUMERIC; _totalAmount NUMERIC := 0; _totalRoundedBase NUMERIC := 0; _commissionDue NUMERIC := 0; _toApply NUMERIC; _toClose BOOLEAN; _glDate DATE; _taxBaseValue NUMERIC := 0; BEGIN -- Cache C/M information SELECT cmhead.*, findARAccount(cmhead_cust_id) AS ar_accnt_id, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM cmheadtax WHERE ( (taxhist_parent_id = cmhead_id) AND (taxhist_taxtype_id = getAdjustmentTaxtypeId()) ) ) AS adjtax INTO _p FROM cmhead WHERE (cmhead_id=pCmheadid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Credit Memo as cmhead not found'; END IF; IF (NOT _p.cmhead_posted) THEN RETURN -10; END IF; -- Cache AROpen Information SELECT aropen.* INTO _n FROM aropen WHERE ( (aropen_doctype='C') AND (aropen_docnumber=_p.cmhead_number) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Credit Memo as aropen not found'; END IF; -- Check for ARApplications SELECT arapply_id INTO _test FROM arapply WHERE (arapply_target_aropen_id=_n.aropen_id) OR (arapply_source_aropen_id=_n.aropen_id) LIMIT 1; IF (FOUND) THEN RETURN -20; END IF; _glDate := COALESCE(_p.cmhead_gldistdate, _p.cmhead_docdate); SELECT fetchGLSequence() INTO _glSequence; SELECT fetchJournalNumber('AR-IN') INTO _glJournal; -- Start by handling taxes (reverse sense) FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.cmhead_curr_id, round(sum(taxdetail_tax),2), _p.cmhead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('CM', _p.cmhead_id, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, _r.tax_sales_accnt_id, (_r.taxbasevalue * -1.0), _glDate, ('Void-' || _p.cmhead_billtoname) ); _totalAmount := _totalAmount + _r.tax * -1; _totalRoundedBase := _totalRoundedBase + _r.taxbasevalue * -1; END LOOP; -- Process line items FOR _r IN SELECT * FROM creditmemoitem WHERE ( (cmitem_cmhead_id=_p.cmhead_id) AND (cmitem_qtycredit <> 0 ) ) LOOP IF (_r.extprice <> 0) THEN -- Debit the Sales Account for the current cmitem (reverse sense) _roundedBase := round(currToBase(_p.cmhead_curr_id, _r.extprice, _p.cmhead_docdate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, CASE WHEN _p.cmhead_rahead_id IS NULL THEN getPrjAccntId(_p.cmhead_prj_id, salesaccnt_credit_accnt_id) ELSE getPrjAccntId(_p.cmhead_prj_id, salesaccnt_returns_accnt_id) END, _roundedBase, _glDate, ('Void-' || _p.cmhead_billtoname) ) INTO _test FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.cmitem_itemsite_id, 'IS', _p.cmhead_cust_id, _p.cmhead_saletype_id, _p.cmhead_shipzone_id)); IF (NOT FOUND) THEN PERFORM deleteGLSeries(_glSequence); RETURN -11; END IF; END IF; _totalAmount := _totalAmount + round(_r.extprice, 2); _totalRoundedBase := _totalRoundedBase + _roundedBase; END LOOP; -- Credit the Misc. Account for Miscellaneous Charges (reverse sense) IF (_p.cmhead_misc <> 0) THEN _roundedBase := round(currToBase(_p.cmhead_curr_id, _p.cmhead_misc, _p.cmhead_docdate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, getPrjAccntId(_p.cmhead_prj_id, accnt_id), _roundedBase, _glDate, ('Void-' ||_p.cmhead_billtoname) ) INTO _test FROM accnt WHERE (accnt_id=_p.cmhead_misc_accnt_id); -- If the Misc. Charges Account was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Cache the Misc. Amount distributed _totalAmount := _totalAmount + _p.cmhead_misc; _totalRoundedBase := _totalRoundedBase + _roundedBase; END IF; -- Debit the Freight Account (reverse sense) IF (_p.cmhead_freight <> 0) THEN _roundedBase := round(currToBase(_p.cmhead_curr_id, _p.cmhead_freight, _p.cmhead_docdate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, getPrjAccntId(_p.cmhead_prj_id, accnt_id), _roundedBase, _glDate, ('Void-' || _p.cmhead_billtoname) ) INTO _test FROM accnt WHERE (accnt_id=findFreightAccount(_p.cmhead_cust_id)); -- If the Freight Charges Account was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Cache the Amount Distributed to Freight _totalAmount := _totalAmount + _p.cmhead_freight; _totalRoundedBase := _totalRoundedBase + _roundedBase; END IF; _totalAmount := _totalAmount; -- Credit the A/R for the total Amount (reverse sense) IF (_totalAmount <> 0) THEN IF (_p.ar_accnt_id != -1) THEN SELECT insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, _p.ar_accnt_id, (_totalRoundedBase * -1.0), _glDate, ('Void-' || _p.cmhead_billtoname) ) INTO _test; ELSE PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; END IF; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _glJournal) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Delete sales history DELETE FROM cohisttax WHERE (taxhist_parent_id IN (SELECT cohist_id FROM cohist WHERE (cohist_doctype='C' AND cohist_ordernumber=_p.cmhead_number))); DELETE FROM cohist WHERE (cohist_doctype='C' AND cohist_ordernumber=_p.cmhead_number); -- Delete the Invoice aropen item DELETE FROM aropen WHERE (aropen_doctype='C' AND aropen_docnumber=_p.cmhead_number); -- Handle the Inventory and G/L Transactions for any returned Inventory where cmitem_updateinv is true (reverse sense) FOR _r IN SELECT cmitem_itemsite_id AS itemsite_id, cmitem_id, (cmitem_qtyreturned * cmitem_qty_invuomratio) AS qty, cmhead_number, cmhead_cust_id AS cust_id, item_number, cmhead_prj_id AS prj_id, cmhead_saletype_id AS saletype_id, cmhead_shipzone_id AS shipzone_id FROM cmhead, cmitem, itemsite, item WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (cmitem_qtyreturned <> 0) AND (cmitem_updateinv) AND (cmhead_id=_p.cmhead_id) ) LOOP -- Return credited stock to inventory IF (_itemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( itemsite_id, 'RS', (_r.qty * -1), 'S/O', 'CM', _r.cmhead_number, '', ('Credit Voided ' || _r.item_number), costcat_asset_accnt_id, getPrjAccntId(_r.prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)), _itemlocSeries, _glDate) INTO _invhistid FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); END LOOP; -- Update coitem to reflect the returned qty where cmitem_updateinv is true (reverse sense) FOR _r IN SELECT cmitem_qtyreturned, cmitem_itemsite_id, cohead_id FROM cmitem, cmhead, invchead, cohead WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmhead_invcnumber=invchead_invcnumber) AND (invchead_ordernumber=cohead_number) AND (cmitem_qtyreturned <> 0) AND (cmitem_updateinv) AND (cmhead_id=_p.cmhead_id) ) LOOP UPDATE coitem SET coitem_qtyreturned = (coitem_qtyreturned + (_r.cmitem_qtyreturned * -1.0)) WHERE coitem_id IN ( SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=_r.cohead_id) AND (coitem_itemsite_id = _r.cmitem_itemsite_id) ) LIMIT 1 ); END LOOP; -- Mark the cmhead as voided UPDATE cmhead SET cmhead_void=TRUE WHERE (cmhead_id=_p.cmhead_id); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.voidcreditmemo(integer) OWNER TO admin; -- -- Name: voidinvoice(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; _glSequence INTEGER := 0; _glJournal INTEGER := 0; _itemlocSeries INTEGER := 0; _aropenid INTEGER := 0; _invhistid INTEGER := 0; _amount NUMERIC; _roundedBase NUMERIC; _r RECORD; _p RECORD; _n RECORD; _test INTEGER; _totalAmount NUMERIC := 0; _totalRoundedBase NUMERIC := 0; _totalAmountBase NUMERIC := 0; _appliedAmount NUMERIC := 0; _commissionDue NUMERIC := 0; _tmpAccntId INTEGER; _tmpCurrId INTEGER; _firstExchDate DATE; _glDate DATE; _exchGain NUMERIC := 0; BEGIN -- Cache Invoice information SELECT invchead.*, findFreightAccount(invchead_cust_id) AS freightaccntid, findARAccount(invchead_cust_id) AS araccntid, aropen_id, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM invcheadtax WHERE ( (taxhist_parent_id = invchead_id) AND (taxhist_taxtype_id = getFreightTaxtypeId()) ) ) AS freighttax, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM invcheadtax WHERE ( (taxhist_parent_id = invchead_id) AND (taxhist_taxtype_id = getAdjustmentTaxtypeId()) ) ) AS adjtax INTO _p FROM invchead JOIN aropen ON (aropen_doctype='I' AND aropen_docnumber=invchead_invcnumber) WHERE (invchead_id=pInvcheadid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Invoice as invchead not found'; END IF; IF (NOT _p.invchead_posted) THEN RETURN -10; END IF; -- Cache AROpen Information SELECT aropen.* INTO _n FROM aropen WHERE ( (aropen_doctype='I') AND (aropen_docnumber=_p.invchead_invcnumber) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Invoice as aropen not found'; END IF; -- Check for ARApplications SELECT arapply_id INTO _test FROM arapply WHERE (arapply_target_aropen_id=_n.aropen_id) LIMIT 1; IF (FOUND) THEN RETURN -20; END IF; SELECT fetchGLSequence() INTO _glSequence; SELECT fetchJournalNumber('AR-IN') INTO _glJournal; _glDate := COALESCE(_p.invchead_gldistdate, _p.invchead_invcdate); -- the 1st MC iteration used the cohead_orderdate so we could get curr exch -- gain/loss between the sales and invoice dates, but see issue 3892. leave -- this condition TRUE until we make this configurable or decide not to. IF TRUE THEN _firstExchDate := _p.invchead_invcdate; ELSE -- can we save a select by using: _firstExchDate := _p.invchead_orderdate; SELECT cohead_orderdate INTO _firstExchDate FROM cohead WHERE (cohead_number = _p.invchead_ordernumber); END IF; -- Start by handling taxes (reverse sense) FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.invchead_curr_id, round(sum(taxdetail_tax),2), _firstExchDate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('I', _p.invchead_id, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, _r.tax_sales_accnt_id, (_r.taxbasevalue * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ); _totalAmount := _totalAmount + _r.tax; _totalRoundedBase := _totalRoundedBase + _r.taxbasevalue; END LOOP; -- March through the Non-Misc. Invcitems FOR _r IN SELECT * FROM invoiceitem WHERE ( (invcitem_invchead_id = _p.invchead_id) AND (invcitem_item_id <> -1) ) LOOP -- Cache the amount due for this line _amount := _r.extprice; IF (_amount > 0) THEN -- Credit the Sales Account for the invcitem item (reverse sense) IF (_r.itemsite_id IS NULL) THEN SELECT getPrjAccntId(_p.invchead_prj_id, salesaccnt_sales_accnt_id) INTO _tmpAccntId FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.invcitem_item_id, 'I', _p.invchead_cust_id, _p.invchead_saletype_id, _p.invchead_shipzone_id)); ELSE SELECT getPrjAccntId(_p.invchead_prj_id, salesaccnt_sales_accnt_id) INTO _tmpAccntId FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.itemsite_id, 'IS', _p.invchead_cust_id, _p.invchead_saletype_id, _p.invchead_shipzone_id)); END IF; -- If the Sales Account Assignment was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_glSequence); RETURN -11; END IF; _roundedBase := round(currToBase(_p.invchead_curr_id, _amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, _tmpAccntId, (_roundedBase * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; _totalAmount := (_totalAmount + _amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; _commissionDue := (_commissionDue + (_amount * _p.invchead_commission)); END IF; _totalAmount := _totalAmount; _totalRoundedBase := _totalRoundedBase; END LOOP; -- March through the Misc. Invcitems FOR _r IN SELECT * FROM invoiceitem JOIN salescat ON (salescat_id = invcitem_salescat_id) WHERE ( (invcitem_item_id = -1) AND (invcitem_invchead_id=_p.invchead_id) ) LOOP -- Cache the amount due for this line and the commission due for such _amount := _r.extprice; IF (_amount > 0) THEN -- Credit the Sales Account for the invcitem item (reverse sense) _roundedBase = round(currToBase(_p.invchead_curr_id, _amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id, _r.salescat_sales_accnt_id), (_roundedBase * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; _totalAmount := (_totalAmount + _amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; _commissionDue := (_commissionDue + (_amount * _p.invchead_commission)); END IF; END LOOP; -- Credit the Freight Account for Freight Charges (reverse sense) IF (_p.invchead_freight <> 0) THEN IF (_p.freightaccntid <> -1) THEN _roundedBase = round(currToBase(_p.invchead_curr_id, _p.invchead_freight, _firstExchDate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id,_p.freightaccntid), (_roundedBase * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; -- Cache the Freight Amount distributed _totalAmount := (_totalAmount + _p.invchead_freight); _totalRoundedBase := _totalRoundedBase + _roundedBase; ELSE _test := -14; END IF; -- If the Freight Account was not found then punt IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; END IF; -- Credit the Misc. Account for Miscellaneous Charges (reverse sense) IF (_p.invchead_misc_amount <> 0) THEN _roundedBase := round(currToBase(_p.invchead_curr_id, _p.invchead_misc_amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id, _p.invchead_misc_accnt_id), (_roundedBase * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; -- If the Misc. Charges Account was not found then punt IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Cache the Misc. Amount distributed _totalAmount := (_totalAmount + _p.invchead_misc_amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; END IF; -- ToDo: handle rounding errors (reverse sense) _exchGain := currGain(_p.invchead_curr_id, _totalAmount, _firstExchDate, _glDate); IF (_exchGain <> 0) THEN SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, getGainLossAccntId(_p.araccntid), round(_exchGain, 2), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test ; IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; END IF; -- Debit A/R for the total Amount (reverse sense) IF (_totalRoundedBase <> 0) THEN IF (_p.araccntid != -1) THEN SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, _p.araccntid, round(_totalRoundedBase, 2), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; ELSE PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; END IF; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _glJournal) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Delete sales history DELETE FROM cohisttax WHERE (taxhist_parent_id IN (SELECT cohist_id FROM cohist WHERE (cohist_doctype='I' AND cohist_invcnumber=_p.invchead_invcnumber))); DELETE FROM cohist WHERE (cohist_doctype='I' AND cohist_invcnumber=_p.invchead_invcnumber); -- Create the Credit aropen item SELECT nextval('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_open, aropen_posted, aropen_cust_id, aropen_ponumber, aropen_docnumber, aropen_applyto, aropen_doctype, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_amount, aropen_paid, aropen_salesrep_id, aropen_commission_due, aropen_commission_paid, aropen_ordernumber, aropen_notes, aropen_cobmisc_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), _glJournal, TRUE, FALSE, _p.invchead_cust_id, _p.invchead_ponumber, _p.invchead_invcnumber, _p.invchead_invcnumber, 'C', _p.invchead_invcdate, determineDueDate(_p.invchead_terms_id, _p.invchead_invcdate), _glDate, _p.invchead_terms_id, round(_totalAmount, 2), round(_totalAmount, 2), _p.invchead_salesrep_id, _commissionDue, FALSE, _p.invchead_ordernumber::text, _p.invchead_notes, pInvcheadid, _p.invchead_curr_id ); -- Alter the Invoice A/R Open Item to reflect the application UPDATE aropen SET aropen_paid = round(_totalAmount, 2) WHERE (aropen_id=_p.aropen_id); -- Record the application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_curr_id ) VALUES ( _p.invchead_cust_id, _aropenid, 'C', _p.invchead_invcnumber, _p.aropen_id, 'I', _p.invchead_invcnumber, '', '', round(_totalAmount, 2), TRUE, CURRENT_DATE, _p.invchead_invcdate, 0, _p.invchead_curr_id ); -- Handle the Inventory and G/L Transactions for any billed Inventory where invcitem_updateinv is true (reverse sense) FOR _r IN SELECT itemsite_id AS itemsite_id, invcitem_id, (invcitem_billed * invcitem_qty_invuomratio) AS qty, invchead_invcnumber, invchead_cust_id AS cust_id, item_number, invchead_prj_id AS prj_id, invchead_saletype_id AS saletype_id, invchead_shipzone_id AS shipzone_id FROM invchead JOIN invcitem ON ( (invcitem_invchead_id=invchead_id) AND (invcitem_billed <> 0) AND (invcitem_updateinv) ) JOIN itemsite ON ( (itemsite_item_id=invcitem_item_id) AND (itemsite_warehous_id=invcitem_warehous_id) ) JOIN item ON (item_id=invcitem_item_id) WHERE (invchead_id=_p.invchead_id) LOOP -- Issue billed stock from inventory IF (_itemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( itemsite_id, 'SH', (_r.qty * -1.0), 'S/O', 'IN', _r.invchead_invcnumber, '', ('Invoice Voided ' || _r.item_number), getPrjAccntId(_r.prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)), costcat_asset_accnt_id, _itemlocSeries, _glDate) INTO _invhistid FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); END LOOP; -- Reopen Billing UPDATE shipitem SET shipitem_invoiced=FALSE, shipitem_invcitem_id=NULL WHERE (shipitem_invcitem_id IN (SELECT invcitem_id FROM invcitem WHERE (invcitem_invchead_id=_p.invchead_id))); UPDATE cobill SET cobill_invcnum=NULL, cobill_invcitem_id=NULL WHERE (cobill_invcitem_id IN (SELECT invcitem_id FROM invcitem WHERE (invcitem_invchead_id=_p.invchead_id))); UPDATE cobmisc SET cobmisc_posted=FALSE, cobmisc_invcnumber=NULL, cobmisc_invchead_id=NULL WHERE (cobmisc_invchead_id=_p.invchead_id); -- Mark the invoice as voided UPDATE invchead SET invchead_void=TRUE, invchead_notes=(invchead_notes || 'Voided on ' || current_date || ' by ' || getEffectiveXtUser()) WHERE (invchead_id=_p.invchead_id); RETURN _itemlocSeries; END; $_$; ALTER FUNCTION public.voidinvoice(integer) OWNER TO admin; -- -- Name: voidpostedapcheck(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidpostedapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'voidPostedAPCheck() is deprecated - use voidPostedCheck() instead'; RETURN voidPostedCheck($1, fetchJournalNumber('AP-CK'), CURRENT_DATE); END; $_$; ALTER FUNCTION public.voidpostedapcheck(integer) OWNER TO admin; -- -- Name: voidpostedapcheck(integer, integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidpostedapcheck(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'voidPostedAPCheck() is deprecated - use voidPostedCheck() instead'; RETURN voidPostedCheck($1, $2, CURRENT_DATE); END; $_$; ALTER FUNCTION public.voidpostedapcheck(integer, integer) OWNER TO admin; -- -- Name: voidpostedapcheck(integer, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidpostedapcheck(integer, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'voidPostedAPCheck() is deprecated - use voidPostedCheck() instead'; RETURN voidPostedCheck($1, $2, $3); END; $_$; ALTER FUNCTION public.voidpostedapcheck(integer, integer, date) OWNER TO admin; -- -- Name: voidpostedcheck(integer, integer, date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION voidpostedcheck(integer, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pVoidDate ALIAS FOR $3; _amount_base NUMERIC := 0; _result INTEGER; _apopenid INTEGER; _credit_glaccnt INTEGER; _docnumber TEXT; _exchGain NUMERIC := 0; _exchGainTmp NUMERIC := 0; _gltransNote TEXT; _p RECORD; _r RECORD; _sequence INTEGER; _amount_check NUMERIC := 0; BEGIN SELECT fetchGLSequence() INTO _sequence; SELECT checkhead.*, checkhead_amount / checkhead_curr_rate AS checkhead_amount_base, bankaccnt_accnt_id AS bankaccntid, findPrepaidAccount(checkhead_recip_id) AS prepaidaccntid, checkrecip.* INTO _p FROM bankaccnt, checkhead LEFT OUTER JOIN checkrecip ON ((checkrecip_type=checkhead_recip_type) AND (checkrecip_id=checkhead_recip_id)) WHERE ((checkhead_bankaccnt_id=bankaccnt_id) AND (checkhead_id=pCheckid)); IF (NOT _p.checkhead_posted) THEN RETURN -10; END IF; IF (_p.checkrecip_id IS NULL) THEN -- outer join failed RETURN -11; END IF; -- Cannot void if already reconciled SELECT trans_id INTO _result FROM ( SELECT gltrans_id AS trans_id FROM gltrans WHERE ((gltrans_doctype='CK') AND (gltrans_misc_id=_p.checkhead_id) AND (gltrans_rec)) UNION ALL SELECT sltrans_id AS trans_id FROM sltrans WHERE ((sltrans_doctype='CK') AND (sltrans_misc_id=_p.checkhead_id) AND (sltrans_rec)) ) AS data; IF (FOUND) THEN RETURN -14; END IF; _gltransNote := 'Void Posted Check #' || _p.checkhead_number || ' ' || _p.checkrecip_number || '-' || _p.checkrecip_name; IF (_p.checkhead_misc) THEN IF (COALESCE(_p.checkhead_expcat_id, -1) < 0) THEN IF (_p.checkhead_recip_type = 'V') THEN PERFORM createAPDebitMemo(_p.checkhead_recip_id, pJournalNumber, CAST(fetchAPMemoNumber() AS text), '', pVoidDate, _p.checkhead_amount, _gltransNote || ' '|| _p.checkhead_notes, -1, pVoidDate, -1, _p.checkhead_curr_id ); _credit_glaccnt := findAPPrepaidAccount(_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'C') THEN PERFORM createARCreditMemo(NULL, _p.checkhead_recip_id, fetchARMemoNumber(), '', pVoidDate, _p.checkhead_amount, _gltransNote || ' '|| _p.checkhead_notes, -1, -1, -1, pVoidDate, -1, NULL, 0.0, pJournalNumber, _p.checkhead_curr_id ); _credit_glaccnt := _p.prepaidaccntid; ELSIF (_p.checkhead_recip_type = 'T') THEN -- TODO: should we create a debit memo for the tax authority? how? _credit_glaccnt := _p.checkrecip_accnt_id; END IF; -- recip type ELSE SELECT expcat_exp_accnt_id INTO _credit_glaccnt FROM expcat WHERE (expcat_id=_p.checkhead_expcat_id); IF (NOT FOUND) THEN RETURN -12; END IF; END IF; IF (COALESCE(_credit_glaccnt, -1) < 0) THEN RETURN -13; END IF; PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), _credit_glaccnt, round(_p.checkhead_amount_base, 2), pVoidDate, _gltransNote, pCheckid); _amount_base := _p.checkhead_amount_base; ELSE FOR _r IN SELECT checkitem_amount, checkitem_discount, CASE WHEN (checkitem_apopen_id IS NOT NULL) THEN checkitem_amount / apopen_curr_rate ELSE currToBase(checkitem_curr_id, checkitem_amount, COALESCE(checkitem_docdate, _p.checkhead_checkdate)) END AS checkitem_amount_base, checkitem_amount / checkitem_curr_rate AS amount_check, apopen_id, apopen_doctype, apopen_docnumber, apopen_curr_rate, apopen_docdate, aropen_id, aropen_doctype, aropen_docnumber, checkitem_curr_id, checkitem_curr_rate, COALESCE(checkitem_docdate, _p.checkhead_checkdate) AS docdate FROM (checkitem LEFT OUTER JOIN apopen ON (checkitem_apopen_id=apopen_id)) LEFT OUTER JOIN aropen ON (checkitem_aropen_id=aropen_id) WHERE (checkitem_checkhead_id=pcheckid) LOOP _exchGainTmp := 0; IF (_r.apopen_id IS NOT NULL) THEN -- undo the APDiscount Credit Memo if a discount was taken IF(_r.checkitem_discount > 0) THEN SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; SELECT fetchAPMemoNumber() INTO _docnumber; INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_accnt_id, apopen_curr_id, apopen_discount, apopen_curr_rate, apopen_closedate ) VALUES ( _apopenid, getEffectiveXtUser(), pJournalNumber, _p.checkhead_recip_id, _docnumber, 'D', '', pVoidDate, pVoidDate, pVoidDate, -1, _r.checkitem_discount, _r.checkitem_discount, FALSE, ('Reverse Posted Discount ' || _r.apopen_doctype || ' ' || _r.apopen_docnumber), -1, _p.checkhead_curr_id, TRUE, _r.apopen_curr_rate, current_date ); PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'DS', _r.apopen_docnumber, findAPDiscountAccount(_p.checkhead_recip_id), round(_r.checkitem_discount / _r.apopen_curr_rate, 2) * -1, pVoidDate, _gltransNote, pCheckid); PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'DS', _r.apopen_docnumber, findAPAccount(_p.checkhead_recip_id), round(_r.checkitem_discount / _r.apopen_curr_rate, 2), pVoidDate, _gltransNote, pCheckid); -- Post the application INSERT INTO apapply ( apapply_vend_id, apapply_postdate, apapply_username, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_journalnumber, apapply_amount, apapply_curr_id ) VALUES ( _p.checkhead_recip_id, pVoidDate, getEffectiveXtUser(), _apopenid, 'D', _docnumber, _r.apopen_id, _r.apopen_doctype, _r.apopen_docnumber, pJournalNumber, (_r.checkitem_discount * -1), _r.checkitem_curr_id ); END IF; -- discount was taken UPDATE apopen SET apopen_paid = round(apopen_paid - (_r.checkitem_amount + noNeg(_r.checkitem_discount)), 2), apopen_open = round(apopen_amount, 2) > round(apopen_paid - (_r.checkitem_amount + noNeg(_r.checkitem_discount)), 2), apopen_closedate = CASE WHEN (round(apopen_amount, 2) > round(apopen_paid - (_r.checkitem_amount + noNeg(_r.checkitem_discount)))) THEN NULL ELSE apopen_closedate END WHERE (apopen_id=_r.apopen_id); -- Post the application INSERT INTO apapply ( apapply_vend_id, apapply_postdate, apapply_username, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_journalnumber, apapply_amount, apapply_curr_id ) VALUES ( _p.checkhead_recip_id, pVoidDate, getEffectiveXtUser(), -1, 'K', _p.checkhead_number, _r.apopen_id, _r.apopen_doctype, _r.apopen_docnumber, pJournalNumber, (_r.checkitem_amount * -1), _r.checkitem_curr_id ); END IF; -- if check item's apopen_id is not null IF (_r.aropen_id IS NOT NULL) THEN UPDATE aropen SET aropen_paid = round(aropen_paid -_r.checkitem_amount, 2), aropen_open = round(aropen_amount, 2) > round(aropen_paid - _r.checkitem_amount, 2) WHERE (aropen_id=_r.aropen_id); -- Post the application INSERT INTO arapply ( arapply_cust_id, arapply_postdate, arapply_distdate, arapply_username, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_journalnumber, arapply_applied, arapply_curr_id ) VALUES ( _p.checkhead_recip_id, pVoidDate, pVoidDate, getEffectiveXtUser(), -1, 'K', _p.checkhead_number, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, pJournalNumber, (_r.checkitem_amount * -1), _r.checkitem_curr_id ); END IF; -- if check item's aropen_id is not null -- calculate currency gain/loss IF (_r.apopen_id IS NOT NULL) THEN IF (_p.checkhead_curr_id = _r.checkitem_curr_id) THEN IF (_r.apopen_docdate > _p.checkhead_checkdate) THEN _exchGainTmp := ((_r.checkitem_amount/_p.checkhead_curr_rate) - (_r.checkitem_amount / _r.apopen_curr_rate)) * -1; ELSE _exchGainTmp := ((_r.checkitem_amount / _r.apopen_curr_rate) - (_r.checkitem_amount/_p.checkhead_curr_rate)); END IF; ELSE -- unusual condition where bank overridden and different currency from voucher IF (_r.apopen_docdate > _p.checkhead_checkdate) THEN _exchGainTmp := ((_r.checkitem_amount/_r.checkitem_curr_rate) - (_r.checkitem_amount / _r.apopen_curr_rate)) * -1; ELSE _exchGainTmp := ((_r.checkitem_amount / _r.apopen_curr_rate) - (_r.checkitem_amount/_r.checkitem_curr_rate)); END IF; END IF; ELSE SELECT arCurrGain(_r.aropen_id,_r.checkitem_curr_id, _r.checkitem_amount, _p.checkhead_checkdate) INTO _exchGainTmp; END IF; _exchGain := _exchGain + _exchGainTmp; PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), _p.checkrecip_accnt_id, round(_r.checkitem_amount_base, 2), pVoidDate, _gltransNote, pCheckid); IF (_exchGainTmp <> 0) THEN PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), getGainLossAccntId(_p.checkrecip_accnt_id), round(_exchGainTmp, 2) * -1, pVoidDate, _gltransNote, pCheckid); END IF; _amount_check := (_amount_check + _r.amount_check); _amount_base := (_amount_base + _r.checkitem_amount_base); END LOOP; IF( (_amount_check - _p.checkhead_amount) <> 0.0 ) THEN _exchGainTmp := (_amount_check - _p.checkhead_amount) / _p.checkhead_curr_rate; _exchGain := _exchGain + _exchGainTmp; END IF; -- ensure that the check balances, attribute rounding errors to gain/loss IF round(_amount_base, 2) - round(_exchGain, 2) <> round(_p.checkhead_amount_base, 2) THEN IF round(_amount_base - _exchGain, 2) = round(_p.checkhead_amount_base, 2) THEN PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), getGainLossAccntId(_p.bankaccntid), (round(_amount_base, 2) - round(_exchGain, 2) - round(_p.checkhead_amount_base, 2)) * -1, pVoidDate, _gltransNote, pCheckid); ELSE RAISE EXCEPTION 'checkhead_id % does not balance (% - % <> %)', pCheckid, _amount_base, _exchGain, _p.checkhead_amount_base; END IF; END IF; END IF; PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), _p.bankaccntid, round(_p.checkhead_amount_base, 2) * -1, pVoidDate, _gltransNote, pCheckid); PERFORM postGLSeries(_sequence, pJournalNumber); UPDATE gltrans SET gltrans_misc_id=pCheckid WHERE gltrans_sequence=_sequence; UPDATE checkhead SET checkhead_posted=false, checkhead_void=true, checkhead_journalnumber=pJournalNumber WHERE (checkhead_id=pCheckid); RETURN pJournalNumber; END; $_$; ALTER FUNCTION public.voidpostedcheck(integer, integer, date) OWNER TO admin; -- -- Name: woeffectivedate(date); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION woeffectivedate(date) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; BEGIN IF (explodeWoEffective() = 'E') THEN RETURN CURRENT_DATE; ELSE RETURN pStartDate; END IF; END; $_$; ALTER FUNCTION public.woeffectivedate(date) OWNER TO admin; -- -- Name: woinvavail(integer, boolean, boolean, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION woinvavail(integer, boolean, boolean, boolean, boolean) RETURNS SETOF woinvav LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; pshowchildindent ALIAS FOR $2; pshowchildsum ALIAS FOR $3; pshowshortage ALIAS FOR $4; pshowlowinventory ALIAS FOR $5; _row woinvav%ROWTYPE; _subrow woinvav%ROWTYPE; _wonumber TEXT; _x RECORD; _subx RECORD; _qry TEXT; BEGIN IF(pshowchildindent) THEN --get top level order FOR _x IN SELECT wo_id, itemsite_id, item_type, wo_number, wo_subnumber, item_number, item_descrip1, item_descrip2, uom_name, qoh, wobalance, allocated, ordered, reorderlevel, (qoh + ordered - wobalance) AS woavail, (qoh + ordered - allocated) AS totalavail FROM(SELECT wo_id, itemsite_id, item_type, wo_number, wo_subnumber, item_number, item_descrip1, item_descrip2, uom_name, noNeg(itemsite_qtyonhand) AS qoh, noNeg(wo_qtyord - wo_qtyrcv) AS wobalance, qtyAllocated(itemsite_id, wo_duedate) AS allocated, qtyOrdered(itemsite_id, wo_duedate) AS ordered, CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel FROM wo, itemsite, item, uom WHERE ((wo_id = pwoid) AND (itemsite_id = wo_itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id)) ORDER BY wo_number, wo_subnumber) AS data LOOP _row.woinvav_itemsite_id := _x.itemsite_id; _row.woinvav_womatl_id := -1; _row.woinvav_type := _x.item_type; _row.woinvav_item_wo_number := _x.wo_number || '-' || _x.wo_subnumber; _row.woinvav_descrip := _x.item_descrip1 || ' ' || _x.item_descrip2; _row.woinvav_uomname := _x.uom_name; _row.woinvav_qoh := _x.qoh; _row.woinvav_balance := _x.wobalance; _row.woinvav_allocated := _x.allocated; _row.woinvav_ordered := _x.ordered; _row.woinvav_woavail := _x.woavail; _row.woinvav_totalavail := _x.totalavail; _row.woinvav_reorderlevel := _x.reorderlevel; _row.woinvav_level := 0; RETURN NEXT _row; --get materials for this level FOR _subx IN SELECT * FROM woinvavailmatl(_x.wo_id, 1, pshowshortage, pshowlowinventory) LOOP RETURN NEXT _subx; END LOOP; FOR _subx IN SELECT * FROM woinvavail(_x.wo_id, 1, pshowshortage, pshowlowinventory) LOOP RETURN NEXT _subx; END LOOP; END LOOP; ELSE SELECT wo_number FROM wo WHERE wo_id=pwoid LIMIT 1 INTO _wonumber; --display a single level sum of work order requirements _qry := 'SELECT wo_id, itemsite_id, womatl_id, item_type, wo_number, item_number, item_descrip1, item_descrip2, uom_name, qoh, wobalance, allocated, ordered, reorderlevel, (qoh + ordered - wobalance) AS woavail, (qoh + ordered - allocated) AS totalavail FROM (SELECT wo_id, itemsite_id, womatl_id, item_type, wo_number, item_number, item_descrip1, item_descrip2, uom_name, noNeg(itemsite_qtyonhand) AS qoh, noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq - womatl_qtyiss)) AS wobalance, qtyAllocated(itemsite_id, womatl_duedate) AS allocated, qtyOrdered(itemsite_id, womatl_duedate) AS ordered, CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel FROM wo, womatl, itemsite, item, uom WHERE (womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) '; IF(pshowchildsum) THEN _qry := _qry || ' AND (wo_number=' || _wonumber || ')'; ELSE _qry := _qry || ' AND (womatl_wo_id=' || pwoid || ')'; END IF; _qry := _qry || ' ORDER BY item_number) AS data '; IF(pshowshortage) THEN _qry := _qry || ' WHERE (((qoh + ordered - allocated) < 0) OR ((qoh + ordered - wobalance) < 0)) '; END IF; IF(pshowlowinventory AND NOT pshowshortage) THEN _qry := _qry || ' WHERE (((qoh - allocated) < 0) OR ((qoh - wobalance) < 0)) '; END IF; FOR _x IN EXECUTE _qry LOOP _row.woinvav_itemsite_id := _x.itemsite_id; _row.woinvav_womatl_id := _x.womatl_id; _row.woinvav_type := _x.item_type; _row.woinvav_item_wo_number := _x.item_number; _row.woinvav_descrip := _x.item_descrip1 || ' ' || _x.item_descrip2; _row.woinvav_uomname := _x.uom_name; _row.woinvav_qoh := _x.qoh; _row.woinvav_balance := _x.wobalance; _row.woinvav_allocated := _x.allocated; _row.woinvav_ordered := _x.ordered; _row.woinvav_woavail := _x.woavail; _row.woinvav_totalavail := _x.totalavail; _row.woinvav_reorderlevel := _x.reorderlevel; _row.woinvav_level := 0; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; ALTER FUNCTION public.woinvavail(integer, boolean, boolean, boolean, boolean) OWNER TO admin; -- -- Name: woinvavail(integer, integer, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION woinvavail(integer, integer, boolean, boolean) RETURNS SETOF woinvav LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; plevel ALIAS FOR $2; pshowshortage ALIAS FOR $3; pshowlowinventory ALIAS FOR $4; _row woinvav%ROWTYPE; _x RECORD; _subx RECORD; _index INTEGER; _level INTEGER; _qry TEXT; BEGIN FOR _x IN SELECT wo_id, itemsite_id, item_type, wo_number, wo_subnumber, item_number, item_descrip1, item_descrip2, uom_name, qoh, wobalance, allocated, ordered, reorderlevel, (qoh + ordered - wobalance) AS woavail, (qoh + ordered - allocated) AS totalavail FROM(SELECT wo_id, itemsite_id, item_type, wo_number, wo_subnumber, item_number, item_descrip1, item_descrip2, uom_name, noNeg(itemsite_qtyonhand) AS qoh, noNeg(wo_qtyord - wo_qtyrcv) AS wobalance, qtyAllocated(itemsite_id, wo_duedate) AS allocated, qtyOrdered(itemsite_id, wo_duedate) AS ordered, CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel FROM wo, itemsite, item, uom WHERE ((wo_ordid = pwoid) AND NOT (wo_status = 'C') AND (itemsite_id = wo_itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id)) ORDER BY wo_number, wo_subnumber) AS data LOOP _row.woinvav_itemsite_id := _x.itemsite_id; _row.woinvav_womatl_id := -1; _row.woinvav_type := _x.item_type; _row.woinvav_item_wo_number := _x.wo_number || '-' || _x.wo_subnumber; _row.woinvav_descrip := _x.item_descrip1 || ' ' || _x.item_descrip2; _row.woinvav_uomname := _x.uom_name; _row.woinvav_qoh := _x.qoh; _row.woinvav_balance := _x.wobalance; _row.woinvav_allocated := _x.allocated; _row.woinvav_ordered := _x.ordered; _row.woinvav_woavail := _x.woavail; _row.woinvav_totalavail := _x.totalavail; _row.woinvav_reorderlevel := _x.reorderlevel; _row.woinvav_level := plevel; RETURN NEXT _row; --get materials for this level FOR _subx IN SELECT * FROM woinvavailmatl(_x.wo_id, plevel + 1, pshowshortage, pshowlowinventory) LOOP RETURN NEXT _subx; END LOOP; --get next level wo FOR _subx IN SELECT * FROM woinvavail(_x.wo_id, plevel + 1, pshowshortage, pshowlowinventory) LOOP RETURN NEXT _subx; END LOOP; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.woinvavail(integer, integer, boolean, boolean) OWNER TO admin; -- -- Name: woinvavailmatl(integer, integer, boolean, boolean); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION woinvavailmatl(integer, integer, boolean, boolean) RETURNS SETOF woinvav LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; plevel ALIAS FOR $2; pshowshortage ALIAS FOR $3; pshowlowinventory ALIAS FOR $4; _subrow woinvav%ROWTYPE; _subx RECORD; _qry TEXT; BEGIN _qry := 'SELECT itemsite_id, womatl_id, item_type, wo_number, wo_subnumber, womatl_ref, womatl_notes, item_number, item_descrip1, item_descrip2, uom_name, qoh, wobalance, allocated, ordered, (qoh + ordered - wobalance) AS woavail, (qoh + ordered - allocated) AS totalavail, reorderlevel FROM(SELECT itemsite_id, womatl_id, item_type, wo_number, wo_subnumber, womatl_ref, womatl_notes, item_number, item_descrip1, item_descrip2, uom_name, noNeg(itemsite_qtyonhand) AS qoh, noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq - womatl_qtyiss)) AS wobalance, qtyAllocated(itemsite_id, womatl_duedate) AS allocated, qtyOrdered(itemsite_id, womatl_duedate) AS ordered, CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel FROM womatl, wo, itemsite, item, uom WHERE ((wo_id = womatl_wo_id) AND (womatl_itemsite_id = itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_uom_id=uom_id) AND (NOT womatl_createwo OR womatl_createwo IS NULL))'; _qry := _qry || ' AND (wo_id=' || pwoid || ') ORDER BY item_number) AS data'; IF(pshowshortage) THEN _qry := _qry || ' WHERE (((qoh + ordered - allocated) < 0) OR ((qoh + ordered - wobalance) < 0)) '; END IF; IF(pshowlowinventory AND NOT pshowshortage) THEN _qry := _qry || ' WHERE (((qoh - allocated) < 0) OR ((qoh - wobalance) < 0)) '; END IF; FOR _subx IN EXECUTE _qry LOOP _subrow.woinvav_itemsite_id := _subx.itemsite_id; _subrow.woinvav_womatl_id := _subx.womatl_id; _subrow.woinvav_type := _subx.item_type; _subrow.woinvav_item_wo_number := _subx.item_number; _subrow.woinvav_descrip := _subx.item_descrip1 || ' ' || _subx.item_descrip2; _subrow.woinvav_uomname := _subx.uom_name; _subrow.woinvav_qoh := _subx.qoh; _subrow.woinvav_balance := _subx.wobalance; _subrow.woinvav_allocated := _subx.allocated; _subrow.woinvav_ordered := _subx.ordered; _subrow.woinvav_woavail := _subx.woavail; _subrow.woinvav_totalavail := _subx.totalavail; _subrow.woinvav_reorderlevel := _subx.reorderlevel; _subrow.woinvav_level := plevel; RETURN NEXT _subrow; END LOOP; RETURN; END; $_$; ALTER FUNCTION public.woinvavailmatl(integer, integer, boolean, boolean) OWNER TO admin; -- -- Name: wostarted(integer); Type: FUNCTION; Schema: public; Owner: admin -- CREATE FUNCTION wostarted(pwoid integer) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _result BOOLEAN := FALSE; BEGIN -- is it really this simple? SELECT (wo_wipvalue > 0) INTO _result FROM wo WHERE wo_id=pWoid; RETURN COALESCE(_result, FALSE); END; $$; ALTER FUNCTION public.wostarted(pwoid integer) OWNER TO admin; SET search_path = te, pg_catalog; -- -- Name: calcrate(numeric, character); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION calcrate(numeric, character) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAmount ALIAS FOR $1; pPeriod ALIAS FOR $2; _state integer; _count integer; BEGIN -- Convert amount to hourly rate IF (pPeriod = 'H') THEN -- hourly RETURN round(pAmount,2); ELSIF (pPeriod = 'D') THEN -- daily RETURN round(pAmount / 8, 2); ELSIF (pPeriod = 'W') THEN -- weekly RETURN round(pAmount / 40, 2); ELSIF (pPeriod = 'BW') THEN -- bi-weekly RETURN round(pAmount / 80, 2); ELSIF (pPeriod = 'M') THEN -- monthly RETURN round(pAmount / 160, 2); ELSIF (pPeriod = 'Y') THEN -- annually RETURN round(pAmount / 2080, 2); ELSE RAISE EXCEPTION 'Unknown period type passed: %', pPeriod; END IF; END; $_$; ALTER FUNCTION te.calcrate(numeric, character) OWNER TO admin; -- -- Name: copyitem(integer, text); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION copyitem(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; _itemid INTEGER; _r RECORD; _id INTEGER; BEGIN _itemid := public.copyItem(pSItemid, pTItemNumber); INSERT INTO te.teexp SELECT _itemid, teexp_expcat_id, teexp_accnt_id FROM te.teexp src WHERE (src.teexp_id=pSItemid); RETURN _itemid; END; $_$; ALTER FUNCTION te.copyitem(integer, text) OWNER TO admin; -- -- Name: invoicesheets(integer[]); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION invoicesheets(integer[]) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pHeadIDs ALIAS FOR $1; _invcnum text; _invcheadid integer; _invcitemid integer; _s record; _t record; _linenum integer; BEGIN -- Loop through time sheet items with matching criteria and make invoices FOR _s in SELECT DISTINCT teitem_cust_id, teitem_po, prj_id, teitem_curr_id FROM te.tehead JOIN te.teitem ON (teitem_tehead_id=tehead_id AND teitem_billable) JOIN prjtask ON (teitem_prjtask_id=prjtask_id) JOIN prj ON (prjtask_prj_id=prj_id) WHERE ((tehead_id IN (SELECT * FROM te.unnest(pHeadIDs) ) ) AND (teitem_billable) AND (teitem_invcitem_id IS NULL)) -- loop thru records and create invoices by customer, by PO for the provided headid LOOP --select nextval('invchead_invchead_id_seq') into _invcid; _invcnum := CAST(fetchInvcNumber() AS TEXT); _invcheadid := nextval('invchead_invchead_id_seq'); _linenum := 1; INSERT INTO invchead SELECT _invcheadid, cust_id, -1, '', current_date, false, false, _invcnum, current_date, current_date, _s.teitem_po, '', '', cust_name, COALESCE(addr_line1,''), COALESCE(addr_line2,''), COALESCE(addr_line3,''), COALESCE(addr_city,''), COALESCE(addr_state,''), COALESCE(addr_postalcode,''), cntct_phone, '', '', '', '', '', '', '', '', cust_salesrep_id, salesrep_commission, cust_terms_id, 0, 0, '', -1, 0, '', '', COALESCE(addr_country,''), '', _s.prj_id, _s.teitem_curr_id, current_date, false, null, null, null, null, null, cust_taxzone_id FROM custinfo JOIN salesrep ON (cust_salesrep_id=salesrep_id) LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE (cust_id=_s.teitem_cust_id); -- loop thru all lines of the sheet FOR _t IN SELECT teitem_id, teitem_linenumber, tehead_warehous_id, teitem_type, tehead_emp_id, cust_taxzone_id, item_number, teitem_cust_id, teitem_po, teitem_item_id, teitem_qty, teitem_uom_id, teitem_rate, teitem_notes FROM te.teitem JOIN te.tehead ON (teitem_tehead_id = tehead_id) JOIN custinfo ON (cust_id = teitem_cust_id) JOIN item ON (item_id = teitem_item_id) JOIN prjtask ON (teitem_prjtask_id=prjtask_id) JOIN prj ON (prjtask_prj_id=prj_id) WHERE ((tehead_id IN (SELECT * FROM te.unnest(pHeadIDs) ) ) AND (teitem_billable) AND (teitem_invcitem_id IS NULL) AND (item_id = teitem_item_id) AND (teitem_cust_id = _s.teitem_cust_id) AND (teitem_po = _s.teitem_po) AND (prj_id = _s.prj_id) AND (teitem_curr_id = _s.teitem_curr_id)) ORDER BY teitem_linenumber LOOP _invcitemid := nextval('invcitem_invcitem_id_seq'); INSERT INTO invcitem SELECT _invcitemid, _invcheadid, _linenum, _t.teitem_item_id, _t.tehead_warehous_id, '', '', '', _t.teitem_qty, _t.teitem_qty, _t.teitem_rate, _t.teitem_rate, _t.teitem_notes, -1, getItemTaxType(item_id, _t.cust_taxzone_id), _t.teitem_uom_id, itemuomtouomratio(item_id, _t.teitem_uom_id, item_inv_uom_id), _t.teitem_uom_id, itemuomtouomratio(item_id, _t.teitem_uom_id, item_inv_uom_id), null FROM item WHERE (item_id=_t.teitem_item_id); _linenum := _linenum + 1; -- Update the time sheet item record UPDATE te.teitem SET teitem_invcitem_id = _invcitemid WHERE (teitem_id = _t.teitem_id); END LOOP; END LOOP; RETURN 1; END; $_$; ALTER FUNCTION te.invoicesheets(integer[]) OWNER TO admin; -- -- Name: postsheet(integer, text, text); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION postsheet(integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTeheadId ALIAS FOR $1; pPhrase1 ALIAS FOR $2; pPhrase2 ALIAS FOR $3; _r record; _notes TEXT; _value NUMERIC; _olaccntid INTEGER; _expaccntid INTEGER; _count INTEGER; BEGIN -- Validate: No posting for contractors IF (SELECT (count(teemp_id) > 0) FROM te.tehead JOIN te.teemp ON (tehead_emp_id=teemp_emp_id) WHERE ((tehead_id=pTeheadId) AND (teemp_contractor))) THEN RAISE EXCEPTION 'Time and Expense Sheets can not be posted for contractors. Voucher instead.'; END IF; -- Get labor and overhead account SELECT accnt_id INTO _olaccntid FROM accnt WHERE (accnt_id=fetchmetricvalue('PrjLaborAndOverhead')); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count = 0) THEN RAISE EXCEPTION 'No valid Project Labor and Overhead Account Defined'; END IF; -- Get applicable time sheets FOR _r IN SELECT tehead_number, teitem_id, teitem_linenumber, teitem_type, teitem_notes, item_descrip1, teitem_qty, teexp_expcat_id, teexp_accnt_id, emp_code, emp_wage, emp_wage_period, prj_id, prj_number FROM te.tehead JOIN te.teitem ON (teitem_tehead_id=tehead_id) JOIN item ON (teitem_item_id=item_id) JOIN te.teexp ON (teitem_item_id=teexp_id) JOIN emp ON (tehead_emp_id=emp_id) JOIN prjtask ON (prjtask_id=teitem_prjtask_id) JOIN prj ON (prj_id=prjtask_prj_id) WHERE ((tehead_id = pTeheadId) AND (NOT teitem_posted) AND (teitem_vodist_id IS NULL) AND (teitem_type = 'T')) LOOP -- Determine value _value := te.calcRate(_r.emp_wage, _r.emp_wage_period) * _r.teitem_qty; -- Determine G/L account to post to IF (_r.teexp_accnt_id > 1) THEN _expaccntid := getPrjAccntId(_r.prj_id, _r.teexp_accnt_id); ELSE SELECT getPrjAccntId(_r.prj_id, expcat_exp_accnt_id) INTO _expaccntid FROM expcat WHERE (expcat_id=_r.teexp_expcat_id); END IF; -- Execute the posting _notes := (pPhrase1 || _r.item_descrip1 || '/' || _r.emp_code || pPhrase2 || ' ' || _r.prj_number); PERFORM insertGLTransaction( 'T/E', 'TE', _r.tehead_number, _notes, _olaccntid, _expaccntid, -1, _value, current_date ); -- Update the time sheet item UPDATE te.teitem SET teitem_posted = true, teitem_postedvalue = teitem_postedvalue + _value WHERE (teitem_id=_r.teitem_id); END LOOP; RETURN 1; END; $_$; ALTER FUNCTION te.postsheet(integer, text, text) OWNER TO admin; -- -- Name: sheetstate(integer, character); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION sheetstate(integer, character) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTeheadId ALIAS FOR $1; pType ALIAS FOR $2; _state INTEGER := -1; BEGIN -- Check and return the process state of the sheet -- 1 = All processed -- 0 = Processing required -- -1 = Not Applicable IF (pType = 'I') THEN SELECT MIN(CASE teitem_invcitem_id IS NULL WHEN TRUE THEN 0 ELSE 1 END) INTO _state FROM te.teitem WHERE ((teitem_tehead_id=pTeheadId) AND (teitem_billable) AND (teitem_qty >= 0)); ELSIF (pType = 'V') THEN -- todo: why outer join then check teitem_type and vend_id is not null? SELECT MIN(CASE teitem_vodist_id IS NULL WHEN TRUE THEN 0 ELSE 1 END) INTO _state FROM te.tehead JOIN emp ON (tehead_emp_id=emp_id) LEFT OUTER JOIN te.teemp ON (emp_id=teemp_emp_id) LEFT OUTER JOIN te.teitem ON (teitem_tehead_id=tehead_id) LEFT OUTER JOIN vendinfo ON (UPPER(emp_number)=UPPER(vend_number)) WHERE ((teitem_tehead_id=pTeheadId) AND ((teitem_type = 'E' AND NOT teitem_prepaid) OR (teitem_type = 'T' AND COALESCE(teemp_contractor,false))) AND (vend_id IS NOT NULL) AND (teitem_qty > 0)); ELSIF (pType = 'P') THEN SELECT MIN(CASE teitem_posted WHEN FALSE THEN 0 ELSE 1 END) INTO _state FROM te.teitem JOIN te.tehead ON (teitem_tehead_id=tehead_id) JOIN te.teemp ON (tehead_emp_id=teemp_emp_id) WHERE ((teitem_tehead_id=pTeheadId) AND (teitem_type = 'T') AND (NOT teemp_contractor)); ELSE -- TODO: either make ErrorReporter::error find this or use xtuple RAISE EXCEPTION 'Unknown process type % [xtte: sheetstate, -2, %]', pType, pType; END IF; RETURN _state; END; $_$; ALTER FUNCTION te.sheetstate(integer, character) OWNER TO admin; -- -- Name: triggertehead(); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION triggertehead() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _sense INTEGER := 0; BEGIN -- Determine whether we are adding or subtracting totals IF (TG_OP = 'UPDATE') THEN IF (OLD.tehead_status = 'O' AND NEW.tehead_status = 'A') THEN -- Approving so add _sense := 1; ELSIF (OLD.tehead_status = 'A' AND NEW.tehead_status = 'O') THEN -- Unapproving so subtract _sense := -1; END IF; END IF; IF (_sense != 0) THEN -- Loop thru all lines of the sheet and update project FOR _r in SELECT teitem_prjtask_id, teitem_type, teitem_qty, teitem_total FROM te.teitem WHERE teitem_tehead_id = NEW.tehead_id LOOP IF (_r.teitem_type = 'T') THEN UPDATE prjtask SET prjtask_hours_actual = prjtask_hours_actual + _r.teitem_qty * _sense WHERE prjtask_id = _r.teitem_prjtask_id; ELSE UPDATE prjtask SET prjtask_exp_actual = prjtask_exp_actual + _r.teitem_total * _sense WHERE prjtask_id = _r.teitem_prjtask_id; END IF; END LOOP; END IF; RETURN NEW; END; $$; ALTER FUNCTION te.triggertehead() OWNER TO admin; -- -- Name: triggerteitem(); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION triggerteitem() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _status CHAR(1) := 'O'; BEGIN -- Validate whether we can take this action IF (TG_OP = 'UPDATE') THEN IF ((OLD.teitem_type != NEW.teitem_type) OR (OLD.teitem_workdate != NEW.teitem_workdate) OR (OLD.teitem_cust_id != NEW.teitem_cust_id) OR (OLD.teitem_po != NEW.teitem_po) OR (OLD.teitem_item_id != NEW.teitem_item_id) OR (OLD.teitem_qty != NEW.teitem_qty) OR (OLD.teitem_rate != NEW.teitem_rate) OR (OLD.teitem_total != NEW.teitem_total) OR (OLD.teitem_billable != NEW.teitem_billable) OR (OLD.teitem_prepaid != NEW.teitem_prepaid) OR (OLD.teitem_notes != NEW.teitem_notes)) THEN SELECT tehead_status INTO _status FROM te.tehead WHERE tehead_id=NEW.teitem_tehead_id; END IF; ELSIF (TG_OP = 'INSERT') THEN SELECT tehead_status INTO _status FROM te.tehead WHERE tehead_id=NEW.teitem_tehead_id; ELSE -- Must be delete SELECT tehead_status INTO _status FROM te.tehead WHERE tehead_id=OLD.teitem_tehead_id; END IF; IF (_status != 'O') THEN RAISE EXCEPTION 'Time and Expense Sheets may only be edited or deleted when the status is Open'; END IF; _status := 'C'; -- Update header status, default is to close if all processing complete IF (TG_OP = 'UPDATE') THEN IF ((COALESCE(OLD.teitem_invcitem_id,-1) != COALESCE(NEW.teitem_invcitem_id,-1)) OR (COALESCE(OLD.teitem_vodist_id,-1) != COALESCE(NEW.teitem_vodist_id,-1)) OR (OLD.teitem_posted != NEW.teitem_posted)) THEN SELECT te.sheetstate(NEW.teitem_tehead_id, 'I') AS invoiced, te.sheetstate(NEW.teitem_tehead_id, 'V') AS vouchered, te.sheetstate(NEW.teitem_tehead_id, 'P') AS posted INTO _r; IF (_r.invoiced = 0 OR _r.vouchered = 0 OR _r.posted = 0) THEN _status := 'A'; -- Something is still open, so approved END IF; UPDATE te.tehead SET tehead_status = _status WHERE (tehead_id=NEW.teitem_tehead_id); END IF; END IF; -- Update header with last use info IF (TG_OP = 'DELETE') THEN UPDATE te.tehead SET tehead_lastupdated=('now'::text)::timestamp(6) with time zone WHERE (tehead_id=OLD.teitem_tehead_id); ELSE UPDATE te.tehead SET tehead_lastupdated=('now'::text)::timestamp(6) with time zone, tehead_username=current_user WHERE (tehead_id=NEW.teitem_tehead_id); END IF; RETURN NEW; END; $$; ALTER FUNCTION te.triggerteitem() OWNER TO admin; -- -- Name: triggerteprj(); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION triggerteprj() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _update BOOLEAN := false; BEGIN IF (TG_OP = 'INSERT') THEN _update = true; ELSIF (TG_OP = 'UPDATE') THEN IF (COALESCE(OLD.teprj_cust_id,-1) != COALESCE(NEW.teprj_cust_id,-1)) THEN _update = true; END IF; END IF; IF (_update) THEN UPDATE te.teprjtask SET teprjtask_cust_id=NEW.teprj_cust_id FROM prjtask WHERE ((teprjtask_prjtask_id=prjtask_id) AND (prjtask_prj_id=NEW.teprj_prj_id)); END IF; RETURN NEW; END; $$; ALTER FUNCTION te.triggerteprj() OWNER TO admin; -- -- Name: unnest(anyarray); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION unnest(anyarray) RETURNS SETOF anyelement LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT $1[i] FROM generate_series(array_lower($1,1), array_upper($1,1)) i; $_$; ALTER FUNCTION te.unnest(anyarray) OWNER TO admin; -- -- Name: vouchersheet(integer); Type: FUNCTION; Schema: te; Owner: admin -- CREATE FUNCTION vouchersheet(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pHeadID ALIAS FOR $1; _distamt NUMERIC; _glaccnt INTEGER; _notes TEXT; _s RECORD; _total NUMERIC := 0; _v RECORD; _vodistid INTEGER; _voheadid INTEGER; BEGIN FOR _v IN -- distinct filters duplicate rows returned because of the teitem join -- TODO: can we push the teitem down into the loop and avoid the distinct? SELECT DISTINCT tehead_id, tehead_number, tehead_weekending, tehead_notes, teitem_curr_id, emp_wage, emp_wage_period, vend_id, vend_taxzone_id, vend_terms_id, vend_number, vend_1099, COALESCE(teemp_contractor, false) AS isContractor FROM te.tehead JOIN te.teitem ON (teitem_tehead_id=tehead_id) JOIN emp ON (tehead_emp_id=emp_id) JOIN vendinfo ON (UPPER(emp_number)=UPPER(vend_number)) LEFT OUTER JOIN te.teemp ON (emp_id=teemp_emp_id) WHERE ((tehead_id = pHeadID) AND (teitem_prepaid = false) AND (teitem_vodist_id IS NULL) AND (teitem_type = 'E' OR (COALESCE(teemp_contractor,false) AND (teitem_empcost > 0 OR emp_wage > 0 )))) LOOP INSERT INTO vohead (vohead_id, vohead_number, vohead_vend_id, vohead_distdate, vohead_docdate, vohead_duedate, vohead_terms_id, vohead_taxzone_id, vohead_invcnumber, vohead_reference, vohead_amount, vohead_1099, vohead_curr_id, vohead_notes, vohead_posted, vohead_misc, vohead_pohead_id) VALUES (DEFAULT, fetchVoNumber(), _v.vend_id, _v.tehead_weekending, _v.tehead_weekending, determineDueDate(_v.vend_terms_id, _v.tehead_weekending), _v.vend_terms_id, _v.vend_taxzone_id, 'N/A', ('T&E Sheet ' || _v.tehead_number), 0, _v.vend_1099, _v.teitem_curr_id, _v.tehead_notes, false, true, -1) RETURNING vohead_id INTO _voheadid; FOR _s IN SELECT teitem_id, teitem_linenumber, teitem_workdate, teitem_type, item_number, teitem_item_id, teitem_qty, prjtask_prj_id, CASE WHEN teitem_empcost > 0 THEN teitem_empcost ELSE te.calcRate(_v.emp_wage, _v.emp_wage_period) END AS rate, teitem_total, teitem_type, teexp_expcat_id, teexp_accnt_id FROM te.teitem JOIN te.teexp ON (teitem_item_id=teexp_id) JOIN item ON (teitem_item_id=item_id) JOIN prjtask ON (teitem_prjtask_id=prjtask_id) WHERE ((teitem_tehead_id = _v.tehead_id) AND (teitem_curr_id = _v.teitem_curr_id) AND (teitem_prepaid = false) AND (teitem_vodist_id IS NULL) AND (teitem_type = 'E' OR (_v.isContractor AND (teitem_empcost > 0 OR _v.emp_wage > 0 )))) -- Loop thru records and create vouchers by supplier for the provided headid LOOP -- insert vodist records here _vodistid = nextval('vodist_vodist_id_seq'); -- Map expense directly to account so we can get project account mapping if applicable IF (_s.teexp_accnt_id > 1) THEN _glaccnt := getPrjAccntId(_s.prjtask_prj_id, _s.teexp_accnt_id); ELSE SELECT getPrjAccntId(_s.prjtask_prj_id, expcat_exp_accnt_id) INTO _glaccnt FROM expcat WHERE (expcat_id=_s.teexp_expcat_id); END IF; IF (_s.teitem_type = 'T') THEN -- Time sheet record _notes := formatdate(_s.teitem_workdate) || E'\t' || _s.item_number || E'\t' || formatQty(_s.teitem_qty) || ' hours' || E'\t'; _distamt := _s.rate * _s.teitem_qty; ELSE -- Expense record _notes := formatdate(_s.teitem_workdate) || E'\t' || _s.item_number || E'\t' || E'\t'; _distamt := _s.teitem_total; END IF; INSERT INTO vodist (vodist_id, vodist_vohead_id, vodist_poitem_id, vodist_costelem_id, vodist_accnt_id, vodist_amount, vodist_expcat_id, vodist_notes) VALUES (_vodistid, _voheadid, -1, -1, _glaccnt, _distamt, -1, _notes); _total := _total + _distamt; -- Update the te.teitem record with the relationship UPDATE te.teitem SET teitem_vodist_id = _vodistid WHERE teitem_id = _s.teitem_id; END LOOP; UPDATE vohead SET vohead_amount = _total WHERE (vohead_id=_voheadid); _total := 0; END LOOP; RETURN 1; END; $_$; ALTER FUNCTION te.vouchersheet(integer) OWNER TO admin; SET search_path = xtdesktop, pg_catalog; -- -- Name: fetchwelcomehtml(); Type: FUNCTION; Schema: xtdesktop; Owner: admin -- CREATE FUNCTION fetchwelcomehtml() RETURNS text LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _html TEXT; BEGIN _html := '

Welcome to xTuple


You are not connected to the internet at this time

'; RETURN _html; END; $$; ALTER FUNCTION xtdesktop.fetchwelcomehtml() OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: concatagg(text); Type: AGGREGATE; Schema: public; Owner: admin -- CREATE AGGREGATE concatagg(text) ( SFUNC = concataggsfunc, STYPE = text, INITCOND = '' ); ALTER AGGREGATE public.concatagg(text) OWNER TO admin; -- -- Name: first(anyelement); Type: AGGREGATE; Schema: public; Owner: admin -- CREATE AGGREGATE first(anyelement) ( SFUNC = first_agg, STYPE = anyelement ); ALTER AGGREGATE public.first(anyelement) OWNER TO admin; -- -- Name: last(anyelement); Type: AGGREGATE; Schema: public; Owner: admin -- CREATE AGGREGATE last(anyelement) ( SFUNC = last_agg, STYPE = anyelement ); ALTER AGGREGATE public.last(anyelement) OWNER TO admin; -- -- Name: addr; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE addr ( addr_id integer NOT NULL, addr_active boolean DEFAULT true, addr_line1 text DEFAULT ''::text, addr_line2 text DEFAULT ''::text, addr_line3 text DEFAULT ''::text, addr_city text DEFAULT ''::text, addr_state text DEFAULT ''::text, addr_postalcode text DEFAULT ''::text, addr_country text DEFAULT ''::text, addr_notes text DEFAULT ''::text, addr_number text NOT NULL, CONSTRAINT addr_addr_number_check CHECK ((addr_number <> ''::text)) ); ALTER TABLE public.addr OWNER TO admin; -- -- Name: TABLE addr; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE addr IS 'Postal Address'; SET search_path = api, pg_catalog; -- -- Name: account; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW account AS SELECT (c.crmacct_number)::character varying AS account_number, p.crmacct_number AS parent_account, c.crmacct_name AS account_name, c.crmacct_active AS active, CASE WHEN (c.crmacct_type = 'O'::bpchar) THEN 'Organization'::text ELSE 'Individual'::text END AS type, pc.cntct_number AS primary_contact_number, pc.cntct_honorific AS primary_contact_honorific, pc.cntct_first_name AS primary_contact_first, pc.cntct_middle AS primary_contact_middle, pc.cntct_last_name AS primary_contact_last, pc.cntct_suffix AS primary_contact_suffix, pc.cntct_title AS primary_contact_job_title, pc.cntct_phone AS primary_contact_voice, pc.cntct_fax AS primary_contact_fax, pc.cntct_email AS primary_contact_email, ''::text AS primary_contact_change, m.addr_number AS primary_contact_address_number, m.addr_line1 AS primary_contact_address1, m.addr_line2 AS primary_contact_address2, m.addr_line3 AS primary_contact_address3, m.addr_city AS primary_contact_city, m.addr_state AS primary_contact_state, m.addr_postalcode AS primary_contact_postalcode, m.addr_country AS primary_contact_country, ''::text AS primary_contact_address_change, sc.cntct_number AS secondary_contact_number, sc.cntct_honorific AS secondary_contact_honorific, sc.cntct_first_name AS secondary_contact_first, sc.cntct_middle AS secondary_contact_middle, sc.cntct_last_name AS secondary_contact_last, sc.cntct_suffix AS secondary_contact_suffix, sc.cntct_title AS secondary_contact_job_title, sc.cntct_phone AS secondary_contact_voice, sc.cntct_fax AS secondary_contact_fax, sc.cntct_email AS secondary_contact_email, sc.cntct_webaddr AS secondary_contact_web, ''::text AS secondary_contact_change, s.addr_number AS secondary_contact_address_number, s.addr_line1 AS secondary_contact_address1, s.addr_line2 AS secondary_contact_address2, s.addr_line3 AS secondary_contact_address3, s.addr_city AS secondary_contact_city, s.addr_state AS secondary_contact_state, s.addr_postalcode AS secondary_contact_postalcode, s.addr_country AS secondary_contact_country, ''::text AS secondary_contact_address_change, c.crmacct_notes AS notes FROM (((((public.crmacct c LEFT JOIN public.crmacct p ON ((c.crmacct_id = p.crmacct_parent_id))) LEFT JOIN public.cntct pc ON ((c.crmacct_cntct_id_1 = pc.cntct_id))) LEFT JOIN public.addr m ON ((pc.cntct_addr_id = m.addr_id))) LEFT JOIN public.cntct sc ON ((c.crmacct_cntct_id_2 = sc.cntct_id))) LEFT JOIN public.addr s ON ((sc.cntct_addr_id = s.addr_id))); ALTER TABLE api.account OWNER TO admin; -- -- Name: VIEW account; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW account IS 'Account'; SET search_path = public, pg_catalog; -- -- Name: char; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE "char" ( char_id integer NOT NULL, char_name text NOT NULL, char_items boolean, char_options boolean, char_attributes boolean, char_lotserial boolean, char_notes text, char_customers boolean, char_crmaccounts boolean, char_addresses boolean, char_contacts boolean, char_opportunity boolean, char_employees boolean DEFAULT false, char_mask text, char_validator text, char_incidents boolean DEFAULT false, char_type integer DEFAULT 0 NOT NULL, char_order integer DEFAULT 0 NOT NULL, char_search boolean DEFAULT true NOT NULL, CONSTRAINT char_char_name_check CHECK ((char_name <> ''::text)) ); ALTER TABLE public."char" OWNER TO admin; -- -- Name: TABLE "char"; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE "char" IS 'Characteristic information'; -- -- Name: charass; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE charass ( charass_id integer NOT NULL, charass_target_type text, charass_target_id integer, charass_char_id integer, charass_value text, charass_default boolean DEFAULT false NOT NULL, charass_price numeric(16,4) DEFAULT 0 NOT NULL ); ALTER TABLE public.charass OWNER TO admin; -- -- Name: TABLE charass; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE charass IS 'Characteristic assignment information'; SET search_path = api, pg_catalog; -- -- Name: accountchar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW accountchar AS SELECT (crmacct.crmacct_number)::character varying AS account_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.crmacct, public."char", public.charass WHERE ((('CRMACCT'::text = charass.charass_target_type) AND (crmacct.crmacct_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); ALTER TABLE api.accountchar OWNER TO admin; -- -- Name: VIEW accountchar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW accountchar IS 'Account Characteristics'; SET search_path = public, pg_catalog; -- -- Name: cmnttype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cmnttype ( cmnttype_id integer NOT NULL, cmnttype_name text NOT NULL, cmnttype_descrip text NOT NULL, cmnttype_usedin text, cmnttype_sys boolean DEFAULT false NOT NULL, cmnttype_editable boolean DEFAULT false NOT NULL, cmnttype_order integer, CONSTRAINT cmnttype_cmnttype_name_check CHECK ((cmnttype_name <> ''::text)) ); ALTER TABLE public.cmnttype OWNER TO admin; -- -- Name: TABLE cmnttype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cmnttype IS 'Comment Type information'; -- -- Name: comment; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE comment ( comment_id integer DEFAULT nextval(('"comment_comment_id_seq"'::text)::regclass) NOT NULL, comment_source_id integer, comment_date timestamp with time zone, comment_user text, comment_text text, comment_cmnttype_id integer, comment_source text, comment_public boolean ); ALTER TABLE public.comment OWNER TO admin; -- -- Name: TABLE comment; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE comment IS 'Comment information'; SET search_path = api, pg_catalog; -- -- Name: accountcomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW accountcomment AS SELECT (crmacct.crmacct_number)::character varying AS account_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.crmacct, public.cmnttype, public.comment WHERE (((comment.comment_source = 'CRMA'::text) AND (comment.comment_source_id = crmacct.crmacct_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.accountcomment OWNER TO admin; -- -- Name: VIEW accountcomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW accountcomment IS 'Account Comment'; SET search_path = public, pg_catalog; -- -- Name: docass; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE docass ( docass_id integer NOT NULL, docass_source_id integer NOT NULL, docass_source_type text NOT NULL, docass_target_id integer NOT NULL, docass_target_type text DEFAULT 'URL'::text NOT NULL, docass_purpose character(1) DEFAULT 'S'::bpchar NOT NULL, CONSTRAINT docass_docass_purpose_check CHECK (((((((((docass_purpose = 'I'::bpchar) OR (docass_purpose = 'E'::bpchar)) OR (docass_purpose = 'M'::bpchar)) OR (docass_purpose = 'P'::bpchar)) OR (docass_purpose = 'A'::bpchar)) OR (docass_purpose = 'C'::bpchar)) OR (docass_purpose = 'S'::bpchar)) OR (docass_purpose = 'D'::bpchar))) ); ALTER TABLE public.docass OWNER TO admin; -- -- Name: TABLE docass; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE docass IS 'Document Assignement References'; -- -- Name: file; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE file ( file_id integer NOT NULL, file_title text NOT NULL, file_stream bytea, file_descrip text NOT NULL ); ALTER TABLE public.file OWNER TO admin; -- -- Name: urlinfo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE urlinfo ( url_id integer NOT NULL, url_title text NOT NULL, url_url text NOT NULL ); ALTER TABLE public.urlinfo OWNER TO admin; -- -- Name: url; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW url AS SELECT docass.docass_id AS url_id, docass.docass_source_id AS url_source_id, docass.docass_source_type AS url_source, file.file_title AS url_title, file.file_descrip AS url_url, file.file_stream AS url_stream FROM (file JOIN docass ON (((docass.docass_target_id = file.file_id) AND (docass.docass_target_type = 'FILE'::text)))) UNION ALL SELECT docass.docass_id AS url_id, docass.docass_source_id AS url_source_id, docass.docass_source_type AS url_source, urlinfo.url_title, urlinfo.url_url, NULL::unknown AS url_stream FROM (urlinfo JOIN docass ON (((docass.docass_target_id = urlinfo.url_id) AND (docass.docass_target_type = 'URL'::text)))); ALTER TABLE public.url OWNER TO admin; SET search_path = api, pg_catalog; -- -- Name: accountfile; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW accountfile AS SELECT crmacct.crmacct_number AS account_number, url.url_title AS title, url.url_url AS url FROM public.crmacct, public.url WHERE ((crmacct.crmacct_id = url.url_source_id) AND (url.url_source = 'CRMA'::text)); ALTER TABLE api.accountfile OWNER TO admin; -- -- Name: VIEW accountfile; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW accountfile IS 'Account File'; SET search_path = public, pg_catalog; -- -- Name: docass_docass_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE docass_docass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.docass_docass_id_seq OWNER TO admin; -- -- Name: docass_docass_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE docass_docass_id_seq OWNED BY docass.docass_id; -- -- Name: docass_docass_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('docass_docass_id_seq', 7, true); -- -- Name: image; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE image ( image_id integer DEFAULT nextval(('"image_image_id_seq"'::text)::regclass) NOT NULL, image_name text, image_descrip text, image_data text ); ALTER TABLE public.image OWNER TO admin; -- -- Name: TABLE image; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE image IS 'Image information'; -- -- Name: imageass; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE imageass ( imageass_id integer DEFAULT nextval('docass_docass_id_seq'::regclass) NOT NULL, imageass_source_id integer NOT NULL, imageass_source text NOT NULL, imageass_image_id integer NOT NULL, imageass_purpose character(1) NOT NULL, CONSTRAINT imageass_imageass_purpose_check CHECK (((((((((imageass_purpose = 'I'::bpchar) OR (imageass_purpose = 'E'::bpchar)) OR (imageass_purpose = 'M'::bpchar)) OR (imageass_purpose = 'P'::bpchar)) OR (imageass_purpose = 'A'::bpchar)) OR (imageass_purpose = 'C'::bpchar)) OR (imageass_purpose = 'D'::bpchar)) OR (imageass_purpose = 'S'::bpchar))) ); ALTER TABLE public.imageass OWNER TO admin; -- -- Name: TABLE imageass; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE imageass IS 'Image Assignement References'; SET search_path = api, pg_catalog; -- -- Name: accountimage; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW accountimage AS SELECT crmacct.crmacct_number AS account_number, image.image_name FROM public.crmacct, public.imageass, public.image WHERE (((crmacct.crmacct_id = imageass.imageass_source_id) AND (imageass.imageass_source = 'CRMA'::text)) AND (imageass.imageass_image_id = image.image_id)); ALTER TABLE api.accountimage OWNER TO admin; -- -- Name: VIEW accountimage; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW accountimage IS 'Account Image'; -- -- Name: address; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW address AS SELECT (addr.addr_number)::character varying AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postal_code, addr.addr_country AS country, addr.addr_active AS active, addr.addr_notes AS notes, ''::text AS change FROM public.addr; ALTER TABLE api.address OWNER TO admin; -- -- Name: VIEW address; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW address IS 'Address'; -- -- Name: addresschar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW addresschar AS SELECT (addr.addr_number)::character varying AS address_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.addr, public."char", public.charass WHERE ((('ADDR'::text = charass.charass_target_type) AND (addr.addr_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); ALTER TABLE api.addresschar OWNER TO admin; -- -- Name: VIEW addresschar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW addresschar IS 'Address Characteristics'; -- -- Name: addresscomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW addresscomment AS SELECT (addr.addr_number)::character varying AS address_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.addr, public.cmnttype, public.comment WHERE (((comment.comment_source = 'ADDR'::text) AND (comment.comment_source_id = addr.addr_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.addresscomment OWNER TO admin; -- -- Name: VIEW addresscomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW addresscomment IS 'Address Comment'; SET search_path = public, pg_catalog; -- -- Name: bomhead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bomhead ( bomhead_id integer DEFAULT nextval(('"bomhead_bomhead_id_seq"'::text)::regclass) NOT NULL, bomhead_item_id integer NOT NULL, bomhead_serial integer, bomhead_docnum text, bomhead_revision text, bomhead_revisiondate date, bomhead_batchsize numeric(18,6), bomhead_requiredqtyper numeric(20,8), bomhead_rev_id integer DEFAULT (-1), CONSTRAINT bomhead_bomhead_batchsize_check CHECK ((bomhead_batchsize > (0)::numeric)) ); ALTER TABLE public.bomhead OWNER TO admin; -- -- Name: TABLE bomhead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bomhead IS 'Bill of Materials (BOM) header information'; SET search_path = api, pg_catalog; -- -- Name: bom; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW bom AS SELECT (item.item_number)::character varying AS item_number, (bomhead.bomhead_revision)::character varying AS revision, bomhead.bomhead_docnum AS document_number, bomhead.bomhead_revisiondate AS revision_date, bomhead.bomhead_batchsize AS batch_size, bomhead.bomhead_requiredqtyper AS total_qty_per FROM public.bomhead, public.item WHERE (bomhead.bomhead_item_id = item.item_id); ALTER TABLE api.bom OWNER TO admin; -- -- Name: VIEW bom; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW bom IS 'Bill of Material Header'; -- -- Name: bomitem; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW bomitem AS SELECT bomitem.bomitem_id AS id, (p.item_number)::character varying AS bom_item_number, (bomhead.bomhead_revision)::character varying AS bom_revision, bomitem.bomitem_seqnumber AS sequence_number, i.item_number, CASE WHEN (bomitem.bomitem_effective = public.startoftime()) THEN 'Always'::text ELSE public.formatdate(bomitem.bomitem_effective) END AS effective, CASE WHEN (bomitem.bomitem_expires = public.endoftime()) THEN 'Never'::text ELSE public.formatdate(bomitem.bomitem_expires) END AS expires, bomitem.bomitem_qtyper AS qty_per, uom.uom_name AS issue_uom, bomitem.bomitem_scrap AS scrap, bomitem.bomitem_createwo AS create_child_wo, CASE WHEN (bomitem.bomitem_issuemethod = 'M'::bpchar) THEN 'Mixed'::text WHEN (bomitem.bomitem_issuemethod = 'L'::bpchar) THEN 'Pull'::text WHEN (bomitem.bomitem_issuemethod = 'S'::bpchar) THEN 'Push'::text ELSE NULL::text END AS issue_method, public.formatbooseq(p.item_id, bomitem.bomitem_booitem_seq_id) AS used_at, bomitem.bomitem_schedatwooper AS schedule_at_wo_operation, bomitem.bomitem_ecn AS ecn_number, bomitem.bomitem_notes AS notes, bomitem.bomitem_ref AS reference, CASE WHEN (bomitem.bomitem_subtype = 'N'::bpchar) THEN 'No'::text WHEN (bomitem.bomitem_subtype = 'I'::bpchar) THEN 'Item-Defined'::text WHEN (bomitem.bomitem_subtype = 'B'::bpchar) THEN 'BOM-Defined'::text ELSE NULL::text END AS substitutions, "char".char_name AS characteristic, bomitem.bomitem_value AS value FROM ((public.bomitem LEFT JOIN public.bomhead ON (((bomitem.bomitem_parent_item_id = bomhead.bomhead_item_id) AND (bomitem.bomitem_rev_id = bomhead.bomhead_rev_id)))) LEFT JOIN public."char" ON ((bomitem.bomitem_char_id = "char".char_id))), public.item p, public.item i, public.uom WHERE (((bomitem.bomitem_parent_item_id = p.item_id) AND (bomitem.bomitem_item_id = i.item_id)) AND (bomitem.bomitem_uom_id = uom.uom_id)) ORDER BY p.item_number, bomitem.bomitem_seqnumber; ALTER TABLE api.bomitem OWNER TO admin; -- -- Name: VIEW bomitem; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW bomitem IS 'Bill of Material Item'; -- -- Name: bomitemcomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW bomitemcomment AS SELECT bomitem.bomitem_id, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM (public.bomitem LEFT JOIN public.bomhead ON (((bomitem.bomitem_parent_item_id = bomhead.bomhead_item_id) AND (bomitem.bomitem_rev_id = bomhead.bomhead_rev_id)))), public.item, public.cmnttype, public.comment WHERE ((((comment.comment_source = 'BMI'::text) AND (comment.comment_source_id = bomitem.bomitem_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)) AND (bomitem.bomitem_parent_item_id = item.item_id)) ORDER BY item.item_number, bomhead.bomhead_revision, bomitem.bomitem_seqnumber, comment.comment_date; ALTER TABLE api.bomitemcomment OWNER TO admin; -- -- Name: VIEW bomitemcomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW bomitemcomment IS 'Bill of Material Comment'; SET search_path = public, pg_catalog; -- -- Name: bomitemsub; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bomitemsub ( bomitemsub_id integer NOT NULL, bomitemsub_bomitem_id integer NOT NULL, bomitemsub_item_id integer NOT NULL, bomitemsub_uomratio numeric(20,10) NOT NULL, bomitemsub_rank integer NOT NULL ); ALTER TABLE public.bomitemsub OWNER TO admin; -- -- Name: TABLE bomitemsub; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bomitemsub IS 'Bill of Materials (BOM) defined Substitutions information'; SET search_path = api, pg_catalog; -- -- Name: bomitemsubstitute; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW bomitemsubstitute AS SELECT bomitem.bomitem_id, (p.item_number)::character varying AS bom_item_number, (bomhead.bomhead_revision)::character varying AS bom_revision, bomitem.bomitem_seqnumber AS sequence_number, (s.item_number)::character varying AS substitute_item_number, bomitemsub.bomitemsub_uomratio AS sub_parent_uom_ratio, bomitemsub.bomitemsub_rank AS ranking FROM public.item p, public.item s, (public.bomitem LEFT JOIN public.bomhead ON (((bomitem.bomitem_parent_item_id = bomhead.bomhead_item_id) AND (bomitem.bomitem_rev_id = bomhead.bomhead_rev_id)))), public.bomitemsub WHERE (((p.item_id = bomitem.bomitem_parent_item_id) AND (s.item_id = bomitemsub.bomitemsub_item_id)) AND (bomitemsub.bomitemsub_bomitem_id = bomitem.bomitem_id)); ALTER TABLE api.bomitemsubstitute OWNER TO admin; -- -- Name: VIEW bomitemsubstitute; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW bomitemsubstitute IS 'Bill of Material Item Substitute'; SET search_path = public, pg_catalog; -- -- Name: budghead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE budghead ( budghead_id integer NOT NULL, budghead_name text NOT NULL, budghead_descrip text, CONSTRAINT budghead_budghead_name_check CHECK ((budghead_name <> ''::text)) ); ALTER TABLE public.budghead OWNER TO admin; SET search_path = api, pg_catalog; -- -- Name: budget; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW budget AS SELECT budghead.budghead_name AS name, budghead.budghead_descrip AS description FROM public.budghead ORDER BY budghead.budghead_name; ALTER TABLE api.budget OWNER TO admin; -- -- Name: VIEW budget; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW budget IS 'Budget Header'; SET search_path = public, pg_catalog; -- -- Name: accnt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE accnt ( accnt_id integer DEFAULT nextval(('accnt_accnt_id_seq'::text)::regclass) NOT NULL, accnt_number text, accnt_descrip text, accnt_comments text, accnt_profit text, accnt_sub text, accnt_type character(1) NOT NULL, accnt_extref text, accnt_company text, accnt_forwardupdate boolean, accnt_subaccnttype_code text, accnt_curr_id integer DEFAULT basecurrid(), accnt_active boolean DEFAULT true NOT NULL, accnt_name text, CONSTRAINT accnt_accnt_type_check CHECK ((accnt_type = ANY (ARRAY['A'::bpchar, 'E'::bpchar, 'L'::bpchar, 'Q'::bpchar, 'R'::bpchar]))) ); ALTER TABLE public.accnt OWNER TO admin; -- -- Name: TABLE accnt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE accnt IS 'General Ledger (G/L) Account Number information'; -- -- Name: budgitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE budgitem ( budgitem_id integer NOT NULL, budgitem_budghead_id integer NOT NULL, budgitem_period_id integer NOT NULL, budgitem_accnt_id integer NOT NULL, budgitem_amount numeric(20,4) NOT NULL ); ALTER TABLE public.budgitem OWNER TO admin; -- -- Name: period; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE period ( period_id integer NOT NULL, period_start date, period_end date, period_closed boolean, period_freeze boolean, period_initial boolean DEFAULT false, period_name text, period_yearperiod_id integer, period_quarter integer, period_number integer NOT NULL ); ALTER TABLE public.period OWNER TO admin; -- -- Name: TABLE period; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE period IS 'Accounting Period information'; SET search_path = api, pg_catalog; -- -- Name: budgetentry; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW budgetentry AS SELECT budghead.budghead_name AS name, public.formatglaccount(accnt.accnt_id) AS account, period.period_start, budgitem.budgitem_amount AS amount FROM public.budgitem, public.budghead, public.period, public.accnt WHERE (((budgitem.budgitem_budghead_id = budghead.budghead_id) AND (budgitem.budgitem_period_id = period.period_id)) AND (budgitem.budgitem_accnt_id = accnt.accnt_id)) ORDER BY budghead.budghead_name, period.period_start, public.formatglaccount(accnt.accnt_id); ALTER TABLE api.budgetentry OWNER TO admin; -- -- Name: VIEW budgetentry; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW budgetentry IS 'Budget Entry'; SET search_path = public, pg_catalog; -- -- Name: bankaccnt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bankaccnt ( bankaccnt_id integer NOT NULL, bankaccnt_name text NOT NULL, bankaccnt_descrip text, bankaccnt_bankname text, bankaccnt_accntnumber text, bankaccnt_ar boolean, bankaccnt_ap boolean, bankaccnt_nextchknum integer, bankaccnt_type character(1), bankaccnt_accnt_id integer, bankaccnt_check_form_id integer, bankaccnt_userec boolean, bankaccnt_rec_accnt_id integer, bankaccnt_curr_id integer DEFAULT basecurrid(), bankaccnt_notes text, bankaccnt_routing text DEFAULT ''::text NOT NULL, bankaccnt_ach_enabled boolean DEFAULT false NOT NULL, bankaccnt_ach_origin text DEFAULT ''::text NOT NULL, bankaccnt_ach_genchecknum boolean DEFAULT false NOT NULL, bankaccnt_ach_leadtime integer, bankaccnt_ach_lastdate date, bankaccnt_ach_lastfileid character(1), bankaccnt_ach_origintype text, bankaccnt_ach_originname text, bankaccnt_ach_desttype text, bankaccnt_ach_fed_dest text, bankaccnt_ach_destname text, bankaccnt_ach_dest text, CONSTRAINT bankaccnt_bankaccnt_name_check CHECK ((bankaccnt_name <> ''::text)) ); ALTER TABLE public.bankaccnt OWNER TO admin; -- -- Name: TABLE bankaccnt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bankaccnt IS 'Bank Account information'; -- -- Name: cashrcpt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cashrcpt ( cashrcpt_id integer NOT NULL, cashrcpt_cust_id integer NOT NULL, cashrcpt_amount numeric(20,2) NOT NULL, cashrcpt_fundstype character(1) NOT NULL, cashrcpt_docnumber text, cashrcpt_bankaccnt_id integer NOT NULL, cashrcpt_notes text, cashrcpt_distdate date DEFAULT ('now'::text)::date, cashrcpt_salescat_id integer DEFAULT (-1), cashrcpt_curr_id integer DEFAULT basecurrid(), cashrcpt_usecustdeposit boolean DEFAULT false NOT NULL, cashrcpt_void boolean DEFAULT false NOT NULL, cashrcpt_number text NOT NULL, cashrcpt_docdate date, cashrcpt_posted boolean DEFAULT false NOT NULL, cashrcpt_posteddate date, cashrcpt_postedby text, cashrcpt_applydate date, cashrcpt_discount numeric(20,2) DEFAULT 0.00 NOT NULL, cashrcpt_curr_rate numeric NOT NULL, CONSTRAINT cashrcpt_cashrcpt_number_check CHECK ((cashrcpt_number <> ''::text)) ); ALTER TABLE public.cashrcpt OWNER TO admin; -- -- Name: TABLE cashrcpt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cashrcpt IS 'Temporary table for storing Cash Receipt information before Cash Receipts are posted'; SET search_path = api, pg_catalog; -- -- Name: cashreceipt; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW cashreceipt AS SELECT (custinfo.cust_number)::character varying AS customer_number, CASE WHEN (cashrcpt.cashrcpt_fundstype = 'C'::bpchar) THEN 'Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'T'::bpchar) THEN 'Certified Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'M'::bpchar) THEN 'Master Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'V'::bpchar) THEN 'Visa'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'A'::bpchar) THEN 'American Express'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'D'::bpchar) THEN 'Discover Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'R'::bpchar) THEN 'Other Credit Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'K'::bpchar) THEN 'Cash'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'W'::bpchar) THEN 'Wire Transfer'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'O'::bpchar) THEN 'Other'::character varying ELSE NULL::character varying END AS funds_type, (cashrcpt.cashrcpt_docnumber)::character varying AS check_document_number, custinfo.cust_name AS customer_name, m.addr_line1 AS customer_address, curr_symbol.curr_abbr AS currency, cashrcpt.cashrcpt_amount AS amount_received, bankaccnt.bankaccnt_name AS post_to, public.formatdate(cashrcpt.cashrcpt_distdate) AS distribution_date, CASE WHEN cashrcpt.cashrcpt_usecustdeposit THEN 'Customer Deposit'::text ELSE 'Credit Memo'::text END AS apply_balance_as, salescat.salescat_name AS sales_category, cashrcpt.cashrcpt_notes AS notes FROM ((((((public.cashrcpt LEFT JOIN public.custinfo ON ((custinfo.cust_id = cashrcpt.cashrcpt_cust_id))) LEFT JOIN public.cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN public.addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN public.curr_symbol ON ((curr_symbol.curr_id = cashrcpt.cashrcpt_curr_id))) LEFT JOIN public.bankaccnt ON ((bankaccnt.bankaccnt_id = cashrcpt.cashrcpt_bankaccnt_id))) LEFT JOIN public.salescat ON ((salescat.salescat_id = cashrcpt.cashrcpt_salescat_id))); ALTER TABLE api.cashreceipt OWNER TO admin; -- -- Name: VIEW cashreceipt; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW cashreceipt IS ' This view can be used as an interface to import Cash Receipt data directly into the system. Required fields will be checked and default values will be populated'; SET search_path = public, pg_catalog; -- -- Name: cashrcptitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cashrcptitem ( cashrcptitem_id integer NOT NULL, cashrcptitem_cashrcpt_id integer NOT NULL, cashrcptitem_aropen_id integer NOT NULL, cashrcptitem_amount numeric(20,2) NOT NULL, cashrcptitem_discount numeric(20,2) DEFAULT 0.00 NOT NULL, cashrcptitem_applied boolean DEFAULT true ); ALTER TABLE public.cashrcptitem OWNER TO admin; -- -- Name: TABLE cashrcptitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cashrcptitem IS 'Temporary table for storing information about applications of Cash Receipts before Cash Receipts are posted'; SET search_path = api, pg_catalog; -- -- Name: cashreceiptapply; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW cashreceiptapply AS SELECT (custinfo.cust_number)::character varying AS customer_number, CASE WHEN (cashrcpt.cashrcpt_fundstype = 'C'::bpchar) THEN 'Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'T'::bpchar) THEN 'Certified Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'M'::bpchar) THEN 'Master Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'V'::bpchar) THEN 'Visa'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'A'::bpchar) THEN 'American Express'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'D'::bpchar) THEN 'Discover Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'R'::bpchar) THEN 'Other Credit Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'K'::bpchar) THEN 'Cash'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'W'::bpchar) THEN 'Wire Transfer'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'O'::bpchar) THEN 'Other'::character varying ELSE NULL::character varying END AS funds_type, (cashrcpt.cashrcpt_docnumber)::character varying AS check_document_number, (aropen.aropen_doctype)::character varying AS doc_type, (aropen.aropen_docnumber)::character varying AS doc_number, custinfo.cust_name AS customer_name, m.addr_line1 AS customer_address, public.formatdate(aropen.aropen_docdate) AS doc_date, public.formatdate(aropen.aropen_duedate) AS due_date, curr_symbol.curr_abbr AS currency, aropen.aropen_amount AS open_amount, cashrcptitem.cashrcptitem_amount AS amount_to_apply, cashrcptitem.cashrcptitem_discount FROM ((((((public.cashrcptitem LEFT JOIN public.cashrcpt ON ((cashrcpt.cashrcpt_id = cashrcptitem.cashrcptitem_cashrcpt_id))) LEFT JOIN public.custinfo ON ((custinfo.cust_id = cashrcpt.cashrcpt_cust_id))) LEFT JOIN public.cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN public.addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN public.curr_symbol ON ((curr_symbol.curr_id = cashrcpt.cashrcpt_curr_id))) LEFT JOIN public.aropen ON ((aropen.aropen_id = cashrcptitem.cashrcptitem_aropen_id))); ALTER TABLE api.cashreceiptapply OWNER TO admin; -- -- Name: VIEW cashreceiptapply; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW cashreceiptapply IS ' This view can be used as an interface to import Cash Receipt Application data directly into the system. Required fields will be checked and default values will be populated'; SET search_path = public, pg_catalog; -- -- Name: cashrcptmisc; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cashrcptmisc ( cashrcptmisc_id integer NOT NULL, cashrcptmisc_cashrcpt_id integer NOT NULL, cashrcptmisc_accnt_id integer NOT NULL, cashrcptmisc_amount numeric(20,2) NOT NULL, cashrcptmisc_notes text ); ALTER TABLE public.cashrcptmisc OWNER TO admin; -- -- Name: TABLE cashrcptmisc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cashrcptmisc IS 'Cash Receipt Miscellaneous Application information'; SET search_path = api, pg_catalog; -- -- Name: cashreceiptapplymisc; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW cashreceiptapplymisc AS SELECT (custinfo.cust_number)::character varying AS customer_number, CASE WHEN (cashrcpt.cashrcpt_fundstype = 'C'::bpchar) THEN 'Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'T'::bpchar) THEN 'Certified Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'M'::bpchar) THEN 'Master Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'V'::bpchar) THEN 'Visa'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'A'::bpchar) THEN 'American Express'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'D'::bpchar) THEN 'Discover Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'R'::bpchar) THEN 'Other Credit Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'K'::bpchar) THEN 'Cash'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'W'::bpchar) THEN 'Wire Transfer'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'O'::bpchar) THEN 'Other'::character varying ELSE NULL::character varying END AS funds_type, (cashrcpt.cashrcpt_docnumber)::character varying AS check_document_number, (public.formatglaccount(accnt.accnt_id))::character varying AS account, custinfo.cust_name AS customer_name, m.addr_line1 AS customer_address, accnt.accnt_descrip AS account_description, curr_symbol.curr_abbr AS currency, cashrcptmisc.cashrcptmisc_amount AS amount_to_distribute, cashrcptmisc.cashrcptmisc_notes AS notes FROM ((((((public.cashrcptmisc LEFT JOIN public.cashrcpt ON ((cashrcpt.cashrcpt_id = cashrcptmisc.cashrcptmisc_cashrcpt_id))) LEFT JOIN public.custinfo ON ((custinfo.cust_id = cashrcpt.cashrcpt_cust_id))) LEFT JOIN public.cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN public.addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN public.curr_symbol ON ((curr_symbol.curr_id = cashrcpt.cashrcpt_curr_id))) LEFT JOIN public.accnt ON ((accnt.accnt_id = cashrcptmisc.cashrcptmisc_accnt_id))); ALTER TABLE api.cashreceiptapplymisc OWNER TO admin; -- -- Name: VIEW cashreceiptapplymisc; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW cashreceiptapplymisc IS ' This view can be used as an interface to import Cash Receipt Miscellaneous Application data directly into the system. Required fields will be checked and default values will be populated'; -- -- Name: contact; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW contact AS SELECT (cntct.cntct_number)::character varying AS contact_number, cntct.cntct_honorific AS honorific, cntct.cntct_first_name AS first, cntct.cntct_middle AS middle, cntct.cntct_last_name AS last, cntct.cntct_suffix AS suffix, cntct.cntct_initials AS initials, crmacct.crmacct_number AS crm_account, cntct.cntct_active AS active, cntct.cntct_title AS job_title, cntct.cntct_phone AS voice, cntct.cntct_phone2 AS alternate, cntct.cntct_fax AS fax, cntct.cntct_email AS email, cntct.cntct_webaddr AS web, ''::text AS contact_change, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postal_code, addr.addr_country AS country, cntct.cntct_notes AS notes, ''::text AS address_change FROM ((public.cntct LEFT JOIN public.addr ON ((cntct.cntct_addr_id = addr.addr_id))) LEFT JOIN public.crmacct ON ((cntct.cntct_crmacct_id = crmacct.crmacct_id))); ALTER TABLE api.contact OWNER TO admin; -- -- Name: VIEW contact; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW contact IS 'Contact'; -- -- Name: contactchar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW contactchar AS SELECT cntct.cntct_number AS contact_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.cntct, public."char", public.charass WHERE ((('CNTCT'::text = charass.charass_target_type) AND (cntct.cntct_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); ALTER TABLE api.contactchar OWNER TO admin; -- -- Name: VIEW contactchar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW contactchar IS 'Contact Characteristics'; -- -- Name: contactcomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW contactcomment AS SELECT cntct.cntct_number AS contact_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.cntct, public.cmnttype, public.comment WHERE (((comment.comment_source = 'T'::text) AND (comment.comment_source_id = cntct.cntct_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.contactcomment OWNER TO admin; -- -- Name: VIEW contactcomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW contactcomment IS 'Contact Comment'; -- -- Name: custchar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW custchar AS SELECT (custinfo.cust_number)::character varying AS customer_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.custinfo, public."char", public.charass WHERE ((('C'::text = charass.charass_target_type) AND (custinfo.cust_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); ALTER TABLE api.custchar OWNER TO admin; -- -- Name: VIEW custchar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW custchar IS 'Customer Characteristics'; -- -- Name: custcomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW custcomment AS SELECT (custinfo.cust_number)::character varying AS customer_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.custinfo, public.cmnttype, public.comment WHERE (((comment.comment_source = 'C'::text) AND (comment.comment_source_id = custinfo.cust_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.custcomment OWNER TO admin; -- -- Name: VIEW custcomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW custcomment IS 'Customer Comment'; SET search_path = public, pg_catalog; -- -- Name: ccard; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ccard ( ccard_id integer NOT NULL, ccard_seq integer DEFAULT 10 NOT NULL, ccard_cust_id integer NOT NULL, ccard_active boolean DEFAULT true, ccard_name bytea, ccard_address1 bytea, ccard_address2 bytea, ccard_city bytea, ccard_state bytea, ccard_zip bytea, ccard_country bytea, ccard_number bytea, ccard_debit boolean DEFAULT false, ccard_month_expired bytea, ccard_year_expired bytea, ccard_type character(1) NOT NULL, ccard_date_added timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, ccard_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, ccard_added_by_username text DEFAULT geteffectivextuser() NOT NULL, ccard_last_updated_by_username text DEFAULT geteffectivextuser() NOT NULL ); ALTER TABLE public.ccard OWNER TO admin; -- -- Name: TABLE ccard; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ccard IS 'Credit Card Information - all bytea data is encrypted'; SET search_path = api, pg_catalog; -- -- Name: custcreditcard; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW custcreditcard AS SELECT (custinfo.cust_number)::character varying AS customer_number, CASE WHEN (ccard.ccard_type = 'V'::bpchar) THEN 'Visa'::text WHEN (ccard.ccard_type = 'M'::bpchar) THEN 'Master Card'::text WHEN (ccard.ccard_type = 'A'::bpchar) THEN 'American Express'::text WHEN (ccard.ccard_type = 'D'::bpchar) THEN 'Discover'::text ELSE 'Not Supported'::text END AS credit_card_type, ccard.ccard_active AS active, ccard.ccard_number AS credit_card_number, ccard.ccard_name AS name, ccard.ccard_address1 AS street_address1, ccard.ccard_address2 AS street_address2, ccard.ccard_city AS city, ccard.ccard_state AS state, ccard.ccard_zip AS postal_code, ccard.ccard_country AS country, ccard.ccard_month_expired AS expiration_month, ccard.ccard_year_expired AS expiration_year, ''::text AS key FROM public.ccard, public.custinfo WHERE (ccard.ccard_cust_id = custinfo.cust_id); ALTER TABLE api.custcreditcard OWNER TO admin; -- -- Name: VIEW custcreditcard; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW custcreditcard IS 'Customer Credit Cards.'; SET search_path = public, pg_catalog; -- -- Name: custtype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE custtype ( custtype_id integer DEFAULT nextval(('custtype_custtype_id_seq'::text)::regclass) NOT NULL, custtype_code text NOT NULL, custtype_descrip text NOT NULL, custtype_char boolean DEFAULT false NOT NULL, CONSTRAINT custtype_custtype_code_check CHECK ((custtype_code <> ''::text)) ); ALTER TABLE public.custtype OWNER TO admin; -- -- Name: TABLE custtype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE custtype IS 'Customer Type information'; -- -- Name: shipchrg; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shipchrg ( shipchrg_id integer NOT NULL, shipchrg_name text NOT NULL, shipchrg_descrip text, shipchrg_custfreight boolean, shipchrg_handling character(1), CONSTRAINT shipchrg_shipchrg_name_check CHECK ((shipchrg_name <> ''::text)) ); ALTER TABLE public.shipchrg OWNER TO admin; -- -- Name: TABLE shipchrg; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shipchrg IS 'Shipping Charge information'; -- -- Name: shipform; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shipform ( shipform_id integer DEFAULT nextval(('"shipform_shipform_id_seq"'::text)::regclass) NOT NULL, shipform_name text NOT NULL, shipform_report_id integer, shipform_report_name text, CONSTRAINT shipform_shipform_name_check CHECK ((shipform_name <> ''::text)) ); ALTER TABLE public.shipform OWNER TO admin; -- -- Name: TABLE shipform; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shipform IS 'Shipping Form information'; -- -- Name: COLUMN shipform.shipform_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN shipform.shipform_report_id IS 'Obsolete -- reference shipform_report_name instead.'; SET search_path = api, pg_catalog; -- -- Name: customer; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW customer AS SELECT (custinfo.cust_number)::character varying AS customer_number, custtype.custtype_code AS customer_type, custinfo.cust_name AS customer_name, custinfo.cust_active AS active, salesrep.salesrep_number AS sales_rep, (custinfo.cust_commprcnt * (100)::numeric) AS commission, custinfo.cust_shipvia AS ship_via, shipform.shipform_name AS ship_form, shipchrg.shipchrg_name AS shipping_charges, custinfo.cust_backorder AS accepts_backorders, custinfo.cust_partialship AS accepts_partial_shipments, custinfo.cust_ffshipto AS allow_free_form_shipto, custinfo.cust_ffbillto AS allow_free_form_billto, whsinfo.warehous_code AS preferred_selling_site, taxzone.taxzone_code AS default_tax_zone, terms.terms_code AS default_terms, CASE WHEN (custinfo.cust_balmethod = 'B'::bpchar) THEN 'Balance Forward'::text ELSE 'Open Item'::text END AS balance_method, custinfo.cust_discntprcnt AS default_discount, dc.curr_abbr AS default_currency, clc.curr_abbr AS credit_limit_currency, custinfo.cust_creditlmt AS credit_limit, CASE WHEN (COALESCE(custinfo.cust_gracedays, 0) > 0) THEN custinfo.cust_gracedays ELSE NULL::integer END AS alternate_grace_days, custinfo.cust_creditrating AS credit_rating, CASE WHEN (custinfo.cust_creditstatus = 'G'::bpchar) THEN 'In Good Standing'::text WHEN (custinfo.cust_creditstatus = 'W'::bpchar) THEN 'On Credit Warning'::text ELSE 'On Credit Hold'::text END AS credit_status, custinfo.cust_autoupdatestatus AS credit_status_exceed_warn, custinfo.cust_autoholdorders AS credit_status_exceed_hold, custinfo.cust_usespos AS uses_purchase_orders, custinfo.cust_blanketpos AS uses_blanket_pos, mc.cntct_number AS billing_contact_number, mc.cntct_honorific AS billing_contact_honorific, mc.cntct_first_name AS billing_contact_first, mc.cntct_middle AS billing_contact_middle, mc.cntct_last_name AS billing_contact_last, mc.cntct_suffix AS billing_contact_suffix, mc.cntct_title AS billing_contact_job_title, mc.cntct_phone AS billing_contact_voice, mc.cntct_phone2 AS billing_contact_alternate, mc.cntct_fax AS billing_contact_fax, mc.cntct_email AS billing_contact_email, mc.cntct_webaddr AS billing_contact_web, ''::text AS billing_contact_change, m.addr_number AS billing_contact_address_number, m.addr_line1 AS billing_contact_address1, m.addr_line2 AS billing_contact_address2, m.addr_line3 AS billing_contact_address3, m.addr_city AS billing_contact_city, m.addr_state AS billing_contact_state, m.addr_postalcode AS billing_contact_postalcode, m.addr_country AS billing_contact_country, ''::text AS billing_contact_address_change, cc.cntct_number AS correspond_contact_number, cc.cntct_honorific AS correspond_contact_honorific, cc.cntct_first_name AS correspond_contact_first, cc.cntct_middle AS correspond_contact_middle, cc.cntct_last_name AS correspond_contact_last, cc.cntct_suffix AS correspond_contact_suffix, cc.cntct_title AS correspond_contact_job_title, cc.cntct_phone AS correspond_contact_voice, cc.cntct_phone2 AS correspond_contact_alternate, cc.cntct_fax AS correspond_contact_fax, cc.cntct_email AS correspond_contact_email, cc.cntct_webaddr AS correspond_contact_web, ''::text AS correspond_contact_change, c.addr_number AS correspond_contact_address_number, c.addr_line1 AS correspond_contact_address1, c.addr_line2 AS correspond_contact_address2, c.addr_line3 AS correspond_contact_address3, c.addr_city AS correspond_contact_city, c.addr_state AS correspond_contact_state, c.addr_postalcode AS correspond_contact_postalcode, c.addr_country AS correspond_contact_country, ''::text AS correspond_contact_address_change, custinfo.cust_comments AS notes FROM ((((((((public.custinfo LEFT JOIN public.shipchrg ON ((custinfo.cust_shipchrg_id = shipchrg.shipchrg_id))) LEFT JOIN public.whsinfo ON ((custinfo.cust_preferred_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN public.addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN public.cntct cc ON ((custinfo.cust_corrcntct_id = cc.cntct_id))) LEFT JOIN public.addr c ON ((cc.cntct_addr_id = c.addr_id))) LEFT JOIN public.taxzone ON ((custinfo.cust_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.shipform ON ((custinfo.cust_shipform_id = shipform.shipform_id))), public.custtype, public.salesrep, public.curr_symbol dc, public.curr_symbol clc, public.terms WHERE (((((custinfo.cust_custtype_id = custtype.custtype_id) AND (custinfo.cust_salesrep_id = salesrep.salesrep_id)) AND (custinfo.cust_curr_id = dc.curr_id)) AND (custinfo.cust_creditlmt_curr_id = clc.curr_id)) AND (custinfo.cust_terms_id = terms.terms_id)); ALTER TABLE api.customer OWNER TO admin; -- -- Name: VIEW customer; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW customer IS 'Customer'; SET search_path = public, pg_catalog; -- -- Name: taxauth; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE taxauth ( taxauth_id integer NOT NULL, taxauth_code text NOT NULL, taxauth_name text, taxauth_extref text, taxauth_addr_id integer, taxauth_curr_id integer, taxauth_county text, taxauth_accnt_id integer, CONSTRAINT taxauth_taxauth_code_check CHECK ((taxauth_code <> ''::text)) ); ALTER TABLE public.taxauth OWNER TO admin; -- -- Name: TABLE taxauth; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE taxauth IS 'The Tax Authority table.'; -- -- Name: COLUMN taxauth.taxauth_curr_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxauth.taxauth_curr_id IS 'The required currency for recording tax information as. NULL means no preference.'; -- -- Name: taxreg; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE taxreg ( taxreg_id integer NOT NULL, taxreg_rel_id integer NOT NULL, taxreg_rel_type character(1), taxreg_taxauth_id integer, taxreg_number text NOT NULL, taxreg_taxzone_id integer, taxreg_effective date DEFAULT startoftime(), taxreg_expires date DEFAULT endoftime(), taxreg_notes text DEFAULT ''::text, CONSTRAINT taxreg_taxreg_number_check CHECK ((taxreg_number <> ''::text)) ); ALTER TABLE public.taxreg OWNER TO admin; -- -- Name: TABLE taxreg; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE taxreg IS 'Stores Tax Registration numbers related to objects and a given tax authority. The rel_id specifies the object id and teh rel_type specifies the object type. See column comment for additional detail on types.'; -- -- Name: COLUMN taxreg.taxreg_rel_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxreg.taxreg_rel_type IS 'The type of relation this record is for. Known values are C=Customer, V=Vendor, NULL=This Manufacturer in which case taxreg_rel_id is meaningless and should be -1.'; SET search_path = api, pg_catalog; -- -- Name: customertaxreg; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW customertaxreg AS SELECT (custinfo.cust_number)::character varying AS customer_number, (COALESCE(taxzone.taxzone_code, 'Any'::text))::character varying AS tax_zone, (taxauth.taxauth_code)::character varying AS tax_authority, taxreg.taxreg_number AS registration_number, CASE WHEN (taxreg.taxreg_effective = public.startoftime()) THEN 'Always'::text ELSE public.formatdate(taxreg.taxreg_effective) END AS start_date, CASE WHEN (taxreg.taxreg_expires = public.endoftime()) THEN 'Never'::text ELSE public.formatdate(taxreg.taxreg_expires) END AS end_date, taxreg.taxreg_notes AS notes FROM (((public.taxreg LEFT JOIN public.custinfo ON ((custinfo.cust_id = taxreg.taxreg_rel_id))) LEFT JOIN public.taxauth ON ((taxauth.taxauth_id = taxreg.taxreg_taxauth_id))) LEFT JOIN public.taxzone ON ((taxzone.taxzone_id = taxreg.taxreg_taxzone_id))) WHERE (taxreg.taxreg_rel_type = 'C'::bpchar) ORDER BY custinfo.cust_number, taxreg.taxreg_number; ALTER TABLE api.customertaxreg OWNER TO admin; -- -- Name: VIEW customertaxreg; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW customertaxreg IS 'Customer Tax Registrations'; -- -- Name: customertype; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW customertype AS SELECT (custtype.custtype_code)::character varying AS code, custtype.custtype_descrip AS description, custtype.custtype_char AS enable_characteristics_profile FROM public.custtype ORDER BY custtype.custtype_code; ALTER TABLE api.customertype OWNER TO admin; -- -- Name: VIEW customertype; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW customertype IS 'Customer Type'; -- -- Name: customertypechar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW customertypechar AS SELECT (custtype.custtype_code)::character varying AS customer_type, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value, charass.charass_default AS is_default FROM public.custtype, public."char", public.charass WHERE ((('CT'::text = charass.charass_target_type) AND (custtype.custtype_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); ALTER TABLE api.customertypechar OWNER TO admin; -- -- Name: VIEW customertypechar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW customertypechar IS 'Customer Type Characteristics'; -- -- Name: custshipto; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW custshipto AS SELECT (custinfo.cust_number)::character varying AS customer_number, (shiptoinfo.shipto_num)::character varying AS shipto_number, shiptoinfo.shipto_active AS active, shiptoinfo.shipto_name AS name, shiptoinfo.shipto_default AS default_flag, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postal_code, addr.addr_country AS country, ''::text AS address_change, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS honorific, cntct.cntct_first_name AS first, cntct.cntct_middle AS middle, cntct.cntct_last_name AS last, cntct.cntct_suffix AS suffix, cntct.cntct_title AS job_title, cntct.cntct_phone AS phone, cntct.cntct_fax AS fax, cntct.cntct_email AS email, ''::text AS contact_change, salesrep.salesrep_number AS sales_rep, (shiptoinfo.shipto_commission * 100.0) AS commission, shipzone.shipzone_name AS zone, taxzone.taxzone_code AS tax_zone, shiptoinfo.shipto_shipvia AS ship_via, shipform.shipform_name AS ship_form, shipchrg.shipchrg_name AS shipping_charges, CASE WHEN (shiptoinfo.shipto_ediprofile_id = (-1)) THEN 'No EDI'::text WHEN (shiptoinfo.shipto_ediprofile_id = (-2)) THEN 'Use Customer Master'::text ELSE public.getediprofilename(shiptoinfo.shipto_ediprofile_id) END AS edi_profile, shiptoinfo.shipto_comments AS general_notes, shiptoinfo.shipto_shipcomments AS shipping_notes FROM public.custinfo, ((((((public.shiptoinfo LEFT JOIN public.shipchrg ON ((shiptoinfo.shipto_shipchrg_id = shipchrg.shipchrg_id))) LEFT JOIN public.cntct ON ((shiptoinfo.shipto_cntct_id = cntct.cntct_id))) LEFT JOIN public.addr ON ((shiptoinfo.shipto_addr_id = addr.addr_id))) LEFT JOIN public.taxzone ON ((shiptoinfo.shipto_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.shipzone ON ((shiptoinfo.shipto_shipzone_id = shipzone.shipzone_id))) LEFT JOIN public.salesrep ON ((shiptoinfo.shipto_salesrep_id = salesrep.salesrep_id))), public.shipform WHERE ((custinfo.cust_id = shiptoinfo.shipto_cust_id) AND (custinfo.cust_shipform_id = shipform.shipform_id)); ALTER TABLE api.custshipto OWNER TO admin; -- -- Name: VIEW custshipto; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW custshipto IS 'Customer Shipto Address'; -- -- Name: custtax; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW custtax AS SELECT (custinfo.cust_number)::character varying AS customer_number, (taxauth.taxauth_code)::character varying AS tax_authority, taxreg.taxreg_number AS registration_number FROM public.custinfo, public.taxauth, public.taxreg WHERE (((taxreg.taxreg_rel_type = 'C'::bpchar) AND (taxreg.taxreg_rel_id = custinfo.cust_id)) AND (taxreg.taxreg_taxauth_id = taxauth.taxauth_id)); ALTER TABLE api.custtax OWNER TO admin; -- -- Name: VIEW custtax; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW custtax IS 'Customer Tax Registration'; SET search_path = public, pg_catalog; -- -- Name: dept; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE dept ( dept_id integer NOT NULL, dept_number text NOT NULL, dept_name text NOT NULL, CONSTRAINT dept_dept_number_check CHECK ((dept_number <> ''::text)) ); ALTER TABLE public.dept OWNER TO admin; -- -- Name: TABLE dept; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE dept IS 'List of Departments'; -- -- Name: emp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE emp ( emp_id integer NOT NULL, emp_code text NOT NULL, emp_number text NOT NULL, emp_active boolean DEFAULT true NOT NULL, emp_cntct_id integer, emp_warehous_id integer, emp_mgr_emp_id integer, emp_wage_type text NOT NULL, emp_wage numeric, emp_wage_curr_id integer DEFAULT basecurrid(), emp_wage_period text NOT NULL, emp_dept_id integer, emp_shift_id integer, emp_notes text, emp_image_id integer, emp_username text, emp_extrate numeric, emp_extrate_period text NOT NULL, emp_startdate date DEFAULT ('now'::text)::date, emp_name text NOT NULL, CONSTRAINT emp_check CHECK (((((COALESCE(emp_wage_type, ''::text) = ''::text) OR (COALESCE(emp_wage_type, ''::text) = 'H'::text)) OR (COALESCE(emp_wage_type, ''::text) = 'S'::text)) AND ((COALESCE(emp_wage, (0)::numeric) = (0)::numeric) OR ((COALESCE(emp_wage_type, ''::text) <> ''::text) AND (emp_wage IS NOT NULL))))), CONSTRAINT emp_emp_code_check CHECK ((emp_code <> ''::text)), CONSTRAINT emp_emp_number_check CHECK ((emp_number <> ''::text)), CONSTRAINT emp_emp_wage_period_check CHECK ((((((((COALESCE(emp_wage_period, ''::text) = ''::text) OR (COALESCE(emp_wage_period, ''::text) = 'H'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'D'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'W'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'BW'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'M'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'Y'::text))) ); ALTER TABLE public.emp OWNER TO admin; -- -- Name: TABLE emp; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE emp IS 'Employee table describing the basic properties of an employee. Employees need not be system users.'; -- -- Name: COLUMN emp.emp_code; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN emp.emp_code IS 'Short, human-readable name for employee. This value is kept synchronized with usr_username and salesrep_number, and so is unique across all three tables emp, usr, and salesrep.'; -- -- Name: COLUMN emp.emp_number; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN emp.emp_number IS 'Official employee number. This might be used for ID badges, payroll accounting, or other purposes.'; -- -- Name: COLUMN emp.emp_mgr_emp_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN emp.emp_mgr_emp_id IS 'Internal ID of this employee''s manager/supervisor.'; -- -- Name: COLUMN emp.emp_wage_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN emp.emp_wage_type IS 'The nature of the wage or employment agreement. ''H'' indicates this employee is paid on an hourly basis (or some other period) while ''S'' indicates this employee is salaried.'; -- -- Name: COLUMN emp.emp_wage_period; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN emp.emp_wage_period IS 'The periodicity of wage payment: ''H'' for hourly, ''D'' for daily, ''W'' for weekly, ''BW'' for biweekly, ''M'' for monthly, ''Y'' for yearly.'; -- -- Name: COLUMN emp.emp_username; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN emp.emp_username IS 'DEPRECATED - the relationship between Employee and User is now maintained through the crmacct table.'; -- -- Name: COLUMN emp.emp_extrate_period; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN emp.emp_extrate_period IS 'The periodicity of external rate payment: ''H'' for hourly, ''D'' for daily, ''W'' for weekly, ''BW'' for biweekly, ''M'' for monthly, ''Y'' for yearly.'; -- -- Name: shift; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shift ( shift_id integer NOT NULL, shift_number text NOT NULL, shift_name text NOT NULL, CONSTRAINT shift_shift_number_check CHECK ((shift_number <> ''::text)) ); ALTER TABLE public.shift OWNER TO admin; -- -- Name: TABLE shift; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shift IS 'List of work Shifts'; SET search_path = api, pg_catalog; -- -- Name: employee; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW employee AS SELECT (e.emp_code)::character varying AS code, (e.emp_number)::character varying AS number, e.emp_active AS active, e.emp_startdate AS start_date, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS honorific, cntct.cntct_first_name AS first, cntct.cntct_middle AS middle, cntct.cntct_last_name AS last, cntct.cntct_suffix AS suffix, cntct.cntct_title AS job_title, cntct.cntct_phone AS voice, cntct.cntct_phone2 AS alternate, cntct.cntct_fax AS fax, cntct.cntct_email AS email, cntct.cntct_webaddr AS web, ''::text AS contact_change, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postalcode, addr.addr_country AS country, ''::text AS address_change, whsinfo.warehous_code AS site, m.emp_code AS manager_code, CASE WHEN (e.emp_wage_type = 'H'::text) THEN 'Hourly'::text WHEN (e.emp_wage_type = 'S'::text) THEN 'Salaried'::text WHEN (e.emp_wage_type IS NULL) THEN NULL::text ELSE 'Error'::text END AS wage_type, e.emp_wage AS wage, curr_symbol.curr_abbr AS wage_currency, CASE WHEN (e.emp_wage_period = 'H'::text) THEN 'Hour'::text WHEN (e.emp_wage_period = 'D'::text) THEN 'Day'::text WHEN (e.emp_wage_period = 'W'::text) THEN 'Week'::text WHEN (e.emp_wage_period = 'BW'::text) THEN 'Biweek'::text WHEN (e.emp_wage_period = 'M'::text) THEN 'Month'::text WHEN (e.emp_wage_period = 'Y'::text) THEN 'Year'::text WHEN (e.emp_wage_period IS NULL) THEN NULL::text ELSE 'Error'::text END AS wage_period, dept.dept_number AS department, shift.shift_number AS shift, (crmacct.crmacct_usr_username IS NOT NULL) AS is_user, (salesrep.salesrep_id IS NOT NULL) AS is_salesrep, (vendinfo.vend_id IS NOT NULL) AS is_vendor, e.emp_notes AS notes, image.image_name AS image, e.emp_extrate AS rate, curr_symbol.curr_abbr AS billing_currency, CASE WHEN (e.emp_extrate_period = 'H'::text) THEN 'Hour'::text WHEN (e.emp_extrate_period = 'D'::text) THEN 'Day'::text WHEN (e.emp_extrate_period = 'W'::text) THEN 'Week'::text WHEN (e.emp_extrate_period = 'BW'::text) THEN 'Biweek'::text WHEN (e.emp_extrate_period = 'M'::text) THEN 'Month'::text WHEN (e.emp_extrate_period = 'Y'::text) THEN 'Year'::text WHEN (e.emp_extrate_period IS NULL) THEN NULL::text ELSE 'Error'::text END AS billing_period FROM (((((((((((public.emp e JOIN public.crmacct ON ((e.emp_id = crmacct.crmacct_emp_id))) LEFT JOIN public.cntct ON ((e.emp_cntct_id = cntct.cntct_id))) LEFT JOIN public.addr ON ((cntct.cntct_addr_id = addr.addr_id))) LEFT JOIN public.whsinfo ON ((e.emp_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.emp m ON ((e.emp_mgr_emp_id = m.emp_id))) LEFT JOIN public.dept ON ((e.emp_dept_id = dept.dept_id))) LEFT JOIN public.shift ON ((e.emp_shift_id = shift.shift_id))) LEFT JOIN public.salesrep ON ((crmacct.crmacct_salesrep_id = salesrep.salesrep_id))) LEFT JOIN public.vendinfo ON ((crmacct.crmacct_vend_id = vendinfo.vend_id))) LEFT JOIN public.image ON ((e.emp_image_id = image.image_id))) JOIN public.curr_symbol ON ((e.emp_wage_curr_id = curr_symbol.curr_id))); ALTER TABLE api.employee OWNER TO admin; -- -- Name: VIEW employee; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW employee IS 'Employee'; -- -- Name: employeechar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW employeechar AS SELECT (emp.emp_code)::character varying AS employee_code, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.emp, public."char", public.charass WHERE ((('EMP'::text = charass.charass_target_type) AND (emp.emp_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); ALTER TABLE api.employeechar OWNER TO admin; -- -- Name: VIEW employeechar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW employeechar IS 'Employee Characteristics'; -- -- Name: employeecomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW employeecomment AS SELECT (emp.emp_code)::character varying AS code, (cmnttype.cmnttype_name)::character varying AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.emp, public.cmnttype, public.comment WHERE (((comment.comment_source = 'EMP'::text) AND (comment.comment_source_id = emp.emp_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.employeecomment OWNER TO admin; -- -- Name: VIEW employeecomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW employeecomment IS 'Employee Comment'; SET search_path = public, pg_catalog; -- -- Name: shipdata; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shipdata ( shipdata_cohead_number text NOT NULL, shipdata_cosmisc_tracknum text NOT NULL, shipdata_cosmisc_packnum_tracknum text NOT NULL, shipdata_weight numeric(16,4), shipdata_base_freight numeric(16,4), shipdata_total_freight numeric(16,4), shipdata_shipper text DEFAULT 'UPS'::text, shipdata_billing_option text, shipdata_package_type text, shipdata_void_ind character(1) NOT NULL, shipdata_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, shipdata_shiphead_number text, shipdata_base_freight_curr_id integer DEFAULT basecurrid(), shipdata_total_freight_curr_id integer DEFAULT basecurrid() ); ALTER TABLE public.shipdata OWNER TO admin; -- -- Name: TABLE shipdata; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shipdata IS 'Shipping Interface information - note that the shipdata_cohead_nember is text and not int. That is due to ODBC chopping off during the transfer'; SET search_path = api, pg_catalog; -- -- Name: extshipmaint; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW extshipmaint AS SELECT (shipdata.shipdata_cohead_number)::character varying AS so_number, (shipdata.shipdata_shiphead_number)::character varying AS shipment_number, (shipdata.shipdata_shipper)::character varying AS shipper, (shipdata.shipdata_cosmisc_packnum_tracknum)::character varying AS package_tracking_number, shipdata.shipdata_void_ind AS void, shipdata.shipdata_billing_option AS billing_option, shipdata.shipdata_weight AS weight, shipdata.shipdata_base_freight AS base_freight, base.curr_abbr AS base_freight_currency, shipdata.shipdata_total_freight AS total_freight, total.curr_abbr AS total_freight_currency, shipdata.shipdata_package_type AS package_type, shipdata.shipdata_cosmisc_tracknum AS tracking_number, shipdata.shipdata_lastupdated AS last_updated FROM public.shipdata, public.curr_symbol base, public.curr_symbol total WHERE ((shipdata.shipdata_base_freight_curr_id = base.curr_id) AND (shipdata.shipdata_total_freight_curr_id = total.curr_id)) ORDER BY shipdata.shipdata_cohead_number, shipdata.shipdata_shiphead_number; ALTER TABLE api.extshipmaint OWNER TO admin; -- -- Name: VIEW extshipmaint; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW extshipmaint IS 'External Shipping Maintenance'; SET search_path = public, pg_catalog; -- -- Name: freightclass; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE freightclass ( freightclass_id integer NOT NULL, freightclass_code text NOT NULL, freightclass_descrip text, CONSTRAINT freightclass_freightclass_code_check CHECK ((freightclass_code <> ''::text)) ); ALTER TABLE public.freightclass OWNER TO admin; -- -- Name: TABLE freightclass; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE freightclass IS 'This table is the freight price schedules.'; -- -- Name: ipsfreight; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ipsfreight ( ipsfreight_id integer NOT NULL, ipsfreight_ipshead_id integer NOT NULL, ipsfreight_qtybreak numeric DEFAULT 0 NOT NULL, ipsfreight_price numeric DEFAULT 0 NOT NULL, ipsfreight_type character(1) NOT NULL, ipsfreight_warehous_id integer, ipsfreight_shipzone_id integer, ipsfreight_freightclass_id integer, ipsfreight_shipvia text ); ALTER TABLE public.ipsfreight OWNER TO admin; -- -- Name: ipshead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ipshead ( ipshead_id integer DEFAULT nextval(('"ipshead_ipshead_id_seq"'::text)::regclass) NOT NULL, ipshead_name text NOT NULL, ipshead_descrip text, ipshead_effective date, ipshead_expires date, ipshead_curr_id integer DEFAULT basecurrid() NOT NULL, ipshead_updated date, CONSTRAINT ipshead_ipshead_name_check CHECK ((ipshead_name <> ''::text)) ); ALTER TABLE public.ipshead OWNER TO admin; -- -- Name: TABLE ipshead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ipshead IS 'Pricing Schedule header information'; SET search_path = api, pg_catalog; -- -- Name: freightpricingscheduleitem; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW freightpricingscheduleitem AS SELECT (ipshead.ipshead_name)::character varying AS pricing_schedule, ipsfreight.ipsfreight_qtybreak AS qty_break, (qtyuom.uom_name)::character varying AS qty_uom, ipsfreight.ipsfreight_price AS price, CASE WHEN (ipsfreight.ipsfreight_type = 'F'::bpchar) THEN 'Flat Rate'::text ELSE 'Price Per UOM'::text END AS price_type, COALESCE(whsinfo.warehous_code, 'Any'::text) AS from_site, COALESCE(shipzone.shipzone_name, 'Any'::text) AS to_shipzone, COALESCE(ipsfreight.ipsfreight_shipvia, 'Any'::text) AS ship_via, COALESCE(freightclass.freightclass_code, 'Any'::text) AS freight_class FROM (((((public.ipsfreight JOIN public.ipshead ON ((ipsfreight.ipsfreight_ipshead_id = ipshead.ipshead_id))) LEFT JOIN public.uom qtyuom ON (qtyuom.uom_item_weight)) LEFT JOIN public.whsinfo ON ((whsinfo.warehous_id = ipsfreight.ipsfreight_warehous_id))) LEFT JOIN public.shipzone ON ((shipzone.shipzone_id = ipsfreight.ipsfreight_shipzone_id))) LEFT JOIN public.freightclass ON ((freightclass.freightclass_id = ipsfreight.ipsfreight_freightclass_id))); ALTER TABLE api.freightpricingscheduleitem OWNER TO admin; -- -- Name: VIEW freightpricingscheduleitem; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW freightpricingscheduleitem IS 'Freight Pricing Schedule Item'; -- -- Name: glaccount; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW glaccount AS SELECT (accnt.accnt_company)::character varying AS company, (accnt.accnt_profit)::character varying AS profit_center, (accnt.accnt_number)::character varying AS account_number, (accnt.accnt_sub)::character varying AS sub_account, accnt.accnt_descrip AS description, accnt.accnt_extref AS ext_reference, CASE WHEN (accnt.accnt_type = 'A'::bpchar) THEN 'Asset'::text WHEN (accnt.accnt_type = 'L'::bpchar) THEN 'Liability'::text WHEN (accnt.accnt_type = 'E'::bpchar) THEN 'Expense'::text WHEN (accnt.accnt_type = 'R'::bpchar) THEN 'Revenue'::text WHEN (accnt.accnt_type = 'Q'::bpchar) THEN 'Equity'::text ELSE '?'::text END AS type, accnt.accnt_subaccnttype_code AS sub_type, accnt.accnt_forwardupdate AS forward_update_trial_balances, accnt.accnt_comments AS notes FROM public.accnt ORDER BY accnt.accnt_company, accnt.accnt_profit, accnt.accnt_number, accnt.accnt_sub; ALTER TABLE api.glaccount OWNER TO admin; -- -- Name: VIEW glaccount; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW glaccount IS 'GL Account'; SET search_path = public, pg_catalog; -- -- Name: incdtcat; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE incdtcat ( incdtcat_id integer NOT NULL, incdtcat_name text NOT NULL, incdtcat_order integer, incdtcat_descrip text, incdtcat_ediprofile_id integer, CONSTRAINT incdtcat_incdtcat_name_check CHECK ((incdtcat_name <> ''::text)) ); ALTER TABLE public.incdtcat OWNER TO admin; -- -- Name: TABLE incdtcat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE incdtcat IS 'Incident Category table'; -- -- Name: incdtpriority; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE incdtpriority ( incdtpriority_id integer NOT NULL, incdtpriority_name text NOT NULL, incdtpriority_order integer, incdtpriority_descrip text, CONSTRAINT incdtpriority_incdtpriority_name_check CHECK ((incdtpriority_name <> ''::text)) ); ALTER TABLE public.incdtpriority OWNER TO admin; -- -- Name: TABLE incdtpriority; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE incdtpriority IS 'Incident Priority table'; -- -- Name: incdtresolution; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE incdtresolution ( incdtresolution_id integer NOT NULL, incdtresolution_name text NOT NULL, incdtresolution_order integer, incdtresolution_descrip text, CONSTRAINT incdtresolution_incdtresolution_name_check CHECK ((incdtresolution_name <> ''::text)) ); ALTER TABLE public.incdtresolution OWNER TO admin; -- -- Name: TABLE incdtresolution; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE incdtresolution IS 'Incident Resolution table'; -- -- Name: incdtseverity; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE incdtseverity ( incdtseverity_id integer NOT NULL, incdtseverity_name text NOT NULL, incdtseverity_order integer, incdtseverity_descrip text, CONSTRAINT incdtseverity_incdtseverity_name_check CHECK ((incdtseverity_name <> ''::text)) ); ALTER TABLE public.incdtseverity OWNER TO admin; -- -- Name: TABLE incdtseverity; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE incdtseverity IS 'Incident Severity table'; SET search_path = api, pg_catalog; -- -- Name: incident; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW incident AS SELECT incdt.incdt_number AS incident_number, incdtcat.incdtcat_name AS category, incdt.incdt_summary AS description, crmacct.crmacct_number AS crm_account, incdt.incdt_assigned_username AS assigned_to, CASE WHEN (incdt.incdt_status = 'N'::bpchar) THEN 'New'::text WHEN (incdt.incdt_status = 'F'::bpchar) THEN 'Feedback'::text WHEN (incdt.incdt_status = 'C'::bpchar) THEN 'Confirmed'::text WHEN (incdt.incdt_status = 'A'::bpchar) THEN 'Assigned'::text WHEN (incdt.incdt_status = 'R'::bpchar) THEN 'Resolved'::text WHEN (incdt.incdt_status = 'L'::bpchar) THEN 'Closed'::text ELSE '?'::text END AS status, incdtseverity.incdtseverity_name AS severity, incdtpriority.incdtpriority_name AS priority, incdtresolution.incdtresolution_name AS resolution, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS honorific, cntct.cntct_first_name AS first, cntct.cntct_middle AS middle, cntct.cntct_last_name AS last, cntct.cntct_suffix AS suffix, cntct.cntct_title AS job_title, cntct.cntct_phone AS phone, cntct.cntct_fax AS fax, cntct.cntct_email AS email, ''::text AS contact_change, incdt.incdt_descrip AS notes, item.item_number, incdt.incdt_lotserial AS lot_serial_number, CASE WHEN (aropen.aropen_doctype = 'C'::bpchar) THEN 'C/M'::text WHEN (aropen.aropen_doctype = 'D'::bpchar) THEN 'D/M'::text WHEN (aropen.aropen_doctype = 'I'::bpchar) THEN 'Invoice'::text WHEN (aropen.aropen_doctype = 'R'::bpchar) THEN 'C/D'::text ELSE ''::text END AS ar_doc_type, aropen.aropen_docnumber AS ar_doc_number FROM ((((((((public.incdt LEFT JOIN public.incdtcat ON ((incdtcat.incdtcat_id = incdt.incdt_incdtcat_id))) LEFT JOIN public.crmacct ON ((crmacct.crmacct_id = incdt.incdt_crmacct_id))) LEFT JOIN public.incdtseverity ON ((incdtseverity.incdtseverity_id = incdt.incdt_incdtseverity_id))) LEFT JOIN public.incdtpriority ON ((incdtpriority.incdtpriority_id = incdt.incdt_incdtpriority_id))) LEFT JOIN public.incdtresolution ON ((incdtresolution.incdtresolution_id = incdt.incdt_incdtresolution_id))) LEFT JOIN public.cntct ON ((cntct.cntct_id = incdt.incdt_cntct_id))) LEFT JOIN public.item ON ((item.item_id = incdt.incdt_item_id))) LEFT JOIN public.aropen ON ((aropen.aropen_id = incdt.incdt_aropen_id))); ALTER TABLE api.incident OWNER TO admin; -- -- Name: VIEW incident; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW incident IS 'Incident'; -- -- Name: incidentchar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW incidentchar AS SELECT incdt.incdt_number AS incident_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.incdt, public."char", public.charass WHERE ((('INCDT'::text = charass.charass_target_type) AND (incdt.incdt_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); ALTER TABLE api.incidentchar OWNER TO admin; -- -- Name: VIEW incidentchar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW incidentchar IS 'Incident Characteristics'; -- -- Name: incidentcomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW incidentcomment AS SELECT incdt.incdt_number AS incident_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text, comment.comment_public AS public FROM public.incdt, public.cmnttype, public.comment WHERE (((comment.comment_source = 'INCDT'::text) AND (comment.comment_source_id = incdt.incdt_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.incidentcomment OWNER TO admin; -- -- Name: VIEW incidentcomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW incidentcomment IS 'Incident Comment'; -- -- Name: incidentfile; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW incidentfile AS SELECT incdt.incdt_number AS incident_number, url.url_title AS title, url.url_url AS url FROM public.incdt, public.url WHERE ((incdt.incdt_id = url.url_source_id) AND (url.url_source = 'INCDT'::text)); ALTER TABLE api.incidentfile OWNER TO admin; -- -- Name: VIEW incidentfile; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW incidentfile IS 'Incident File'; -- -- Name: incidentimage; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW incidentimage AS SELECT incdt.incdt_number AS incident_number, image.image_name FROM public.incdt, public.imageass, public.image WHERE (((incdt.incdt_id = imageass.imageass_source_id) AND (imageass.imageass_source = 'INCDT'::text)) AND (imageass.imageass_image_id = image.image_id)); ALTER TABLE api.incidentimage OWNER TO admin; -- -- Name: VIEW incidentimage; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW incidentimage IS 'Incident Image'; SET search_path = public, pg_catalog; -- -- Name: classcode; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE classcode ( classcode_id integer DEFAULT nextval(('classcode_classcode_id_seq'::text)::regclass) NOT NULL, classcode_code text NOT NULL, classcode_descrip text, classcode_mfg boolean, classcode_creator text, classcode_created timestamp without time zone, classcode_modifier text, classcode_modified timestamp without time zone, classcode_type text, CONSTRAINT classcode_classcode_code_check CHECK ((classcode_code <> ''::text)) ); ALTER TABLE public.classcode OWNER TO admin; -- -- Name: TABLE classcode; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE classcode IS 'Class Code information'; -- -- Name: prodcat; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE prodcat ( prodcat_id integer DEFAULT nextval(('prodcat_prodcat_id_seq'::text)::regclass) NOT NULL, prodcat_code text NOT NULL, prodcat_descrip text, CONSTRAINT prodcat_prodcat_code_check CHECK ((prodcat_code <> ''::text)) ); ALTER TABLE public.prodcat OWNER TO admin; -- -- Name: TABLE prodcat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE prodcat IS 'Product Category information'; SET search_path = api, pg_catalog; -- -- Name: item; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW item AS SELECT (item.item_number)::character varying AS item_number, item.item_active AS active, item.item_descrip1 AS description1, item.item_descrip2 AS description2, CASE WHEN (item.item_type = 'P'::bpchar) THEN 'Purchased'::text WHEN (item.item_type = 'M'::bpchar) THEN 'Manufactured'::text WHEN (item.item_type = 'J'::bpchar) THEN 'Job'::text WHEN (item.item_type = 'K'::bpchar) THEN 'Kit'::text WHEN (item.item_type = 'F'::bpchar) THEN 'Phantom'::text WHEN (item.item_type = 'R'::bpchar) THEN 'Reference'::text WHEN (item.item_type = 'S'::bpchar) THEN 'Costing'::text WHEN (item.item_type = 'T'::bpchar) THEN 'Tooling'::text WHEN (item.item_type = 'O'::bpchar) THEN 'Outside Process'::text WHEN (item.item_type = 'L'::bpchar) THEN 'Planning'::text WHEN (item.item_type = 'B'::bpchar) THEN 'Breeder'::text WHEN (item.item_type = 'C'::bpchar) THEN 'Co-Product'::text WHEN (item.item_type = 'Y'::bpchar) THEN 'By-Product'::text ELSE NULL::text END AS item_type, item.item_maxcost AS maximum_desired_cost, classcode.classcode_code AS class_code, i.uom_name AS inventory_uom, item.item_picklist AS pick_list_item, item.item_fractional AS fractional, item.item_config AS configured, item.item_sold AS item_is_sold, prodcat.prodcat_code AS product_category, item.item_exclusive AS exclusive, item.item_listprice AS list_price, item.item_listcost AS list_cost, p.uom_name AS list_price_uom, item.item_upccode AS upc_code, item.item_prodweight AS product_weight, item.item_packweight AS packaging_weight, item.item_comments AS notes, item.item_extdescrip AS ext_description FROM (public.item LEFT JOIN public.prodcat ON ((item.item_prodcat_id = prodcat.prodcat_id))), public.classcode, public.uom i, public.uom p WHERE (((item.item_classcode_id = classcode.classcode_id) AND (item.item_inv_uom_id = i.uom_id)) AND (item.item_price_uom_id = p.uom_id)) ORDER BY (item.item_number)::character varying; ALTER TABLE api.item OWNER TO admin; -- -- Name: VIEW item; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW item IS 'Item'; SET search_path = public, pg_catalog; -- -- Name: itemalias; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemalias ( itemalias_id integer DEFAULT nextval(('"itemalias_itemalias_id_seq"'::text)::regclass) NOT NULL, itemalias_item_id integer NOT NULL, itemalias_number text NOT NULL, itemalias_comments text, itemalias_usedescrip boolean NOT NULL, itemalias_descrip1 text, itemalias_descrip2 text, CONSTRAINT itemalias_itemalias_number_check CHECK ((itemalias_number <> ''::text)) ); ALTER TABLE public.itemalias OWNER TO admin; -- -- Name: TABLE itemalias; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemalias IS 'Item Alias information'; SET search_path = api, pg_catalog; -- -- Name: itemalias; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemalias AS SELECT (item.item_number)::character varying AS item_number, itemalias.itemalias_number AS alias_number, itemalias.itemalias_usedescrip AS use_description, itemalias.itemalias_descrip1 AS description1, itemalias.itemalias_descrip2 AS description2, itemalias.itemalias_comments AS comments FROM public.item, public.itemalias WHERE (item.item_id = itemalias.itemalias_item_id); ALTER TABLE api.itemalias OWNER TO admin; -- -- Name: VIEW itemalias; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemalias IS 'Item Alias'; -- -- Name: itemchar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemchar AS SELECT (item.item_number)::character varying AS item_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value, charass.charass_default AS is_default FROM public.item, public."char", public.charass WHERE ((('I'::text = charass.charass_target_type) AND (item.item_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); ALTER TABLE api.itemchar OWNER TO admin; -- -- Name: VIEW itemchar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemchar IS 'Item Characteristic'; -- -- Name: itemcomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemcomment AS SELECT (item.item_number)::character varying AS item_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.item, public.cmnttype, public.comment WHERE (((comment.comment_source = 'I'::text) AND (comment.comment_source_id = item.item_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.itemcomment OWNER TO admin; -- -- Name: VIEW itemcomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemcomment IS 'Item Comments'; SET search_path = public, pg_catalog; -- -- Name: costelem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE costelem ( costelem_id integer DEFAULT nextval(('costelem_costelem_id_seq'::text)::regclass) NOT NULL, costelem_type text NOT NULL, costelem_sys boolean, costelem_po boolean, costelem_active boolean, costelem_exp_accnt_id integer, costelem_cost_item_id integer, CONSTRAINT costelem_costelem_type_check CHECK ((costelem_type <> ''::text)) ); ALTER TABLE public.costelem OWNER TO admin; -- -- Name: TABLE costelem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE costelem IS 'Costing Element information'; -- -- Name: itemcost; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemcost ( itemcost_id integer DEFAULT nextval(('itemcost_itemcost_id_seq'::text)::regclass) NOT NULL, itemcost_item_id integer NOT NULL, itemcost_costelem_id integer NOT NULL, itemcost_lowlevel boolean DEFAULT false NOT NULL, itemcost_stdcost numeric(16,6) DEFAULT 0 NOT NULL, itemcost_posted date, itemcost_actcost numeric(16,6) DEFAULT 0 NOT NULL, itemcost_updated date, itemcost_curr_id integer DEFAULT basecurrid() NOT NULL ); ALTER TABLE public.itemcost OWNER TO admin; -- -- Name: TABLE itemcost; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemcost IS 'Item Cost information'; SET search_path = api, pg_catalog; -- -- Name: itemcost; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemcost AS SELECT (item.item_number)::character varying(100) AS item_number, (costelem.costelem_type)::character varying(100) AS costing_element, itemcost.itemcost_actcost AS actual_cost, curr_symbol.curr_abbr AS currency, false AS post_to_standard FROM (((public.itemcost LEFT JOIN public.item ON ((itemcost.itemcost_item_id = item.item_id))) LEFT JOIN public.costelem ON ((itemcost.itemcost_costelem_id = costelem.costelem_id))) LEFT JOIN public.curr_symbol ON ((itemcost.itemcost_curr_id = curr_symbol.curr_id))) ORDER BY (item.item_number)::character varying(100), (costelem.costelem_type)::character varying(100); ALTER TABLE api.itemcost OWNER TO admin; -- -- Name: VIEW itemcost; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemcost IS 'Item Cost'; -- -- Name: itemfile; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemfile AS SELECT (item.item_number)::character varying AS item_number, url.url_title AS title, url.url_url AS url FROM public.item, public.url WHERE ((item.item_id = url.url_source_id) AND (url.url_source = 'I'::text)); ALTER TABLE api.itemfile OWNER TO admin; -- -- Name: VIEW itemfile; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemfile IS 'Item File'; -- -- Name: itemimage; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemimage AS SELECT (item.item_number)::character varying AS item_number, CASE WHEN (imageass.imageass_purpose = 'P'::bpchar) THEN 'Product Description'::text WHEN (imageass.imageass_purpose = 'I'::bpchar) THEN 'Inventory Description'::text WHEN (imageass.imageass_purpose = 'E'::bpchar) THEN 'Engineering Reference'::text WHEN (imageass.imageass_purpose = 'M'::bpchar) THEN 'Miscellaneous'::text ELSE 'Other'::text END AS purpose, image.image_name FROM public.item, public.imageass, public.image WHERE (((item.item_id = imageass.imageass_source_id) AND (imageass.imageass_source = 'I'::text)) AND (imageass.imageass_image_id = image.image_id)); ALTER TABLE api.itemimage OWNER TO admin; -- -- Name: VIEW itemimage; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemimage IS 'Item Image'; SET search_path = public, pg_catalog; -- -- Name: costcat; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE costcat ( costcat_id integer DEFAULT nextval(('costcat_costcat_id_seq'::text)::regclass) NOT NULL, costcat_code text NOT NULL, costcat_descrip text, costcat_asset_accnt_id integer, costcat_liability_accnt_id integer, costcat_adjustment_accnt_id integer, costcat_matusage_accnt_id integer, costcat_purchprice_accnt_id integer, costcat_laboroverhead_accnt_id integer, costcat_scrap_accnt_id integer, costcat_invcost_accnt_id integer, costcat_wip_accnt_id integer, costcat_shipasset_accnt_id integer, costcat_mfgscrap_accnt_id integer, costcat_transform_accnt_id integer, costcat_freight_accnt_id integer, costcat_toliability_accnt_id integer, costcat_exp_accnt_id integer, CONSTRAINT costcat_costcat_code_check CHECK ((costcat_code <> ''::text)) ); ALTER TABLE public.costcat OWNER TO admin; -- -- Name: TABLE costcat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE costcat IS 'Cost Category information'; -- -- Name: location; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE location ( location_id integer DEFAULT nextval(('location_location_id_seq'::text)::regclass) NOT NULL, location_warehous_id integer NOT NULL, location_name text NOT NULL, location_descrip text, location_restrict boolean, location_netable boolean, location_whsezone_id integer, location_aisle text, location_rack text, location_bin text ); ALTER TABLE public.location OWNER TO admin; -- -- Name: TABLE location; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE location IS 'Warehouse Location information'; -- -- Name: plancode; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE plancode ( plancode_id integer DEFAULT nextval(('plancode_plancode_id_seq'::text)::regclass) NOT NULL, plancode_code text NOT NULL, plancode_name text, plancode_mpsexplosion character(1), plancode_consumefcst boolean, plancode_mrpexcp_resched boolean, plancode_mrpexcp_delete boolean, CONSTRAINT plancode_plancode_code_check CHECK ((plancode_code <> ''::text)) ); ALTER TABLE public.plancode OWNER TO admin; -- -- Name: TABLE plancode; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE plancode IS 'Planner Code information'; SET search_path = api, pg_catalog; -- -- Name: itemsite; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemsite AS SELECT (item.item_number)::character varying AS item_number, (whsinfo.warehous_code)::character varying AS site, itemsite.itemsite_active AS active, itemsite.itemsite_wosupply AS wo_supplied_at_site, itemsite.itemsite_createwo AS create_wos, itemsite.itemsite_posupply AS po_supplied_at_site, itemsite.itemsite_createpr AS create_prs, itemsite.itemsite_createsopr AS create_soprs, itemsite.itemsite_createsopo AS create_sopos, itemsite.itemsite_dropship AS dropship, itemsite.itemsite_sold AS sold_from_site, itemsite.itemsite_soldranking AS ranking, CASE WHEN (itemsite.itemsite_costmethod = 'N'::bpchar) THEN 'None'::text WHEN (itemsite.itemsite_costmethod = 'A'::bpchar) THEN 'Average'::text WHEN (itemsite.itemsite_costmethod = 'S'::bpchar) THEN 'Standard'::text WHEN (itemsite.itemsite_costmethod = 'J'::bpchar) THEN 'Job'::text ELSE NULL::text END AS cost_method, CASE WHEN (itemsite.itemsite_controlmethod = 'N'::bpchar) THEN 'None'::text WHEN (itemsite.itemsite_controlmethod = 'R'::bpchar) THEN 'Regular'::text WHEN (itemsite.itemsite_controlmethod = 'S'::bpchar) THEN 'Serial #'::text WHEN (itemsite.itemsite_controlmethod = 'L'::bpchar) THEN 'Lot #'::text ELSE NULL::text END AS control_method, plancode.plancode_code AS planner_code, costcat.costcat_code AS cost_category, itemsite.itemsite_stocked AS stocked, itemsite.itemsite_abcclass AS abc_class, itemsite.itemsite_autoabcclass AS allow_automatic_updates, itemsite.itemsite_cyclecountfreq AS cycl_cnt_freq, itemsite.itemsite_eventfence AS event_fence, itemsite.itemsite_loccntrl AS multiple_location_control, public.formatlocationname(itemsite.itemsite_location_id) AS location, itemsite.itemsite_location AS user_defined_location, itemsite.itemsite_location_comments AS location_comment, itemsite.itemsite_disallowblankwip AS disallow_blank_wip_locations, itemsite.itemsite_useparams AS enforce_order_parameters, itemsite.itemsite_reorderlevel AS reorder_level, itemsite.itemsite_ordertoqty AS order_up_to, itemsite.itemsite_minordqty AS minimum_order, itemsite.itemsite_maxordqty AS maximum_order, itemsite.itemsite_multordqty AS order_multiple, itemsite.itemsite_useparamsmanual AS enforce_on_manual_orders, CASE WHEN (itemsite.itemsite_planning_type = 'N'::bpchar) THEN 'None'::text WHEN (itemsite.itemsite_planning_type = 'M'::bpchar) THEN 'MRP'::text WHEN (itemsite.itemsite_planning_type = 'S'::bpchar) THEN 'MPS'::text ELSE NULL::text END AS planning_system, itemsite.itemsite_ordergroup AS group_mps_mrp_orders, itemsite.itemsite_ordergroup_first AS first_group, itemsite.itemsite_mps_timefence AS mps_time_fence, itemsite.itemsite_leadtime AS lead_time, itemsite.itemsite_safetystock AS safety_stock, COALESCE((SELECT whsinfo.warehous_code FROM (public.itemsite supplysite JOIN public.whsinfo ON ((whsinfo.warehous_id = supplysite.itemsite_warehous_id))) WHERE (supplysite.itemsite_id = itemsite.itemsite_supply_itemsite_id)), 'None'::text) AS supplied_from_site, itemsite.itemsite_notes AS notes, itemsite.itemsite_perishable AS perishable, itemsite.itemsite_warrpurc AS require_warranty, itemsite.itemsite_autoreg AS auto_register FROM public.item, (public.itemsite LEFT JOIN public.location ON ((itemsite.itemsite_location_id = location.location_id))), public.plancode, public.costcat, public.whsinfo WHERE ((((item.item_id = itemsite.itemsite_item_id) AND (itemsite.itemsite_plancode_id = plancode.plancode_id)) AND (itemsite.itemsite_costcat_id = costcat.costcat_id)) AND (itemsite.itemsite_warehous_id = whsinfo.warehous_id)); ALTER TABLE api.itemsite OWNER TO admin; -- -- Name: VIEW itemsite; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemsite IS 'Item Site'; -- -- Name: itemsitecomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemsitecomment AS SELECT (item.item_number)::character varying AS item_number, (whsinfo.warehous_code)::character varying AS site, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.itemsite, public.item, public.whsinfo, public.cmnttype, public.comment WHERE ((itemsite.itemsite_item_id = item.item_id) AND ((((itemsite.itemsite_warehous_id = whsinfo.warehous_id) AND (comment.comment_source = 'IS'::text)) AND (comment.comment_source_id = itemsite.itemsite_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id))); ALTER TABLE api.itemsitecomment OWNER TO admin; -- -- Name: VIEW itemsitecomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemsitecomment IS 'Item Site Comments'; SET search_path = public, pg_catalog; -- -- Name: contrct; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE contrct ( contrct_id integer NOT NULL, contrct_number text NOT NULL, contrct_vend_id integer NOT NULL, contrct_descrip text, contrct_effective date NOT NULL, contrct_expires date NOT NULL, contrct_note text ); ALTER TABLE public.contrct OWNER TO admin; -- -- Name: TABLE contrct; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE contrct IS 'Grouping of Item Sources for a Vendor with common effective and expiration dates.'; -- -- Name: COLUMN contrct.contrct_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN contrct.contrct_id IS 'Sequence identifier for contract.'; -- -- Name: COLUMN contrct.contrct_number; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN contrct.contrct_number IS 'User defined identifier for contract.'; -- -- Name: COLUMN contrct.contrct_vend_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN contrct.contrct_vend_id IS 'Vendor associated with contract.'; -- -- Name: COLUMN contrct.contrct_descrip; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN contrct.contrct_descrip IS 'Description for contract.'; -- -- Name: COLUMN contrct.contrct_effective; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN contrct.contrct_effective IS 'Effective date for contract. Constraint for overlap.'; -- -- Name: COLUMN contrct.contrct_expires; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN contrct.contrct_expires IS 'Expiration date for contract. Constraint for overlap.'; -- -- Name: COLUMN contrct.contrct_note; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN contrct.contrct_note IS 'Notes for contract.'; -- -- Name: itemsrc; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemsrc ( itemsrc_id integer DEFAULT nextval(('"itemsrc_itemsrc_id_seq"'::text)::regclass) NOT NULL, itemsrc_item_id integer NOT NULL, itemsrc_vend_id integer NOT NULL, itemsrc_vend_item_number text, itemsrc_vend_item_descrip text, itemsrc_comments text, itemsrc_vend_uom text NOT NULL, itemsrc_invvendoruomratio numeric(20,10) NOT NULL, itemsrc_minordqty numeric(18,6) NOT NULL, itemsrc_multordqty numeric(18,6) NOT NULL, itemsrc_leadtime integer NOT NULL, itemsrc_ranking integer NOT NULL, itemsrc_active boolean NOT NULL, itemsrc_manuf_name text DEFAULT ''::text NOT NULL, itemsrc_manuf_item_number text DEFAULT ''::text NOT NULL, itemsrc_manuf_item_descrip text, itemsrc_default boolean, itemsrc_upccode text, itemsrc_effective date DEFAULT startoftime() NOT NULL, itemsrc_expires date DEFAULT endoftime() NOT NULL, itemsrc_contrct_id integer ); ALTER TABLE public.itemsrc OWNER TO admin; -- -- Name: TABLE itemsrc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemsrc IS 'Item Source information'; -- -- Name: COLUMN itemsrc.itemsrc_effective; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsrc.itemsrc_effective IS 'Effective date for item source. Constraint for overlap.'; -- -- Name: COLUMN itemsrc.itemsrc_expires; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsrc.itemsrc_expires IS 'Expiration date for item source. Constraint for overlap.'; -- -- Name: COLUMN itemsrc.itemsrc_contrct_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsrc.itemsrc_contrct_id IS 'Associated contract for item source. Inherits effective, expiration dates.'; SET search_path = api, pg_catalog; -- -- Name: itemsource; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemsource AS SELECT (item.item_number)::character varying AS item_number, (vendinfo.vend_number)::character varying AS vendor, itemsrc.itemsrc_vend_item_number AS vendor_item_number, itemsrc.itemsrc_active AS active, itemsrc.itemsrc_default, itemsrc.itemsrc_vend_uom AS vendor_uom, itemsrc.itemsrc_invvendoruomratio AS inventory_vendor_uom_ratio, itemsrc.itemsrc_minordqty AS minimum_order, itemsrc.itemsrc_multordqty AS order_multiple, itemsrc.itemsrc_ranking AS vendor_ranking, itemsrc.itemsrc_leadtime AS lead_time, itemsrc.itemsrc_comments AS notes, itemsrc.itemsrc_vend_item_descrip AS vendor_description, itemsrc.itemsrc_manuf_name AS manufacturer_name, itemsrc.itemsrc_manuf_item_number AS manufacturer_item_number, itemsrc.itemsrc_manuf_item_descrip AS manufacturer_description, itemsrc.itemsrc_upccode AS bar_code, contrct.contrct_number AS contract_number, itemsrc.itemsrc_effective AS effective_date, itemsrc.itemsrc_expires AS expires_date FROM (((public.itemsrc LEFT JOIN public.item ON ((itemsrc.itemsrc_item_id = item.item_id))) LEFT JOIN public.vendinfo ON ((itemsrc.itemsrc_vend_id = vendinfo.vend_id))) LEFT JOIN public.contrct ON ((itemsrc.itemsrc_contrct_id = contrct.contrct_id))) ORDER BY (item.item_number)::character varying(100), (vendinfo.vend_number)::character varying(100); ALTER TABLE api.itemsource OWNER TO admin; -- -- Name: VIEW itemsource; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemsource IS 'Item Source'; SET search_path = public, pg_catalog; -- -- Name: itemsrcp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemsrcp ( itemsrcp_id integer DEFAULT nextval(('itemsrcp_itemsrcp_id_seq'::text)::regclass) NOT NULL, itemsrcp_itemsrc_id integer NOT NULL, itemsrcp_qtybreak numeric(18,6) NOT NULL, itemsrcp_price numeric(16,6), itemsrcp_updated date, itemsrcp_curr_id integer DEFAULT basecurrid() NOT NULL, itemsrcp_dropship boolean DEFAULT false NOT NULL, itemsrcp_warehous_id integer DEFAULT (-1) NOT NULL, itemsrcp_type character(1) NOT NULL, itemsrcp_discntprcnt numeric(16,6), itemsrcp_fixedamtdiscount numeric(16,6), CONSTRAINT valid_itemsrcp_type CHECK ((itemsrcp_type = ANY (ARRAY['N'::bpchar, 'D'::bpchar]))) ); ALTER TABLE public.itemsrcp OWNER TO admin; -- -- Name: TABLE itemsrcp; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemsrcp IS 'Item Source Price information'; -- -- Name: COLUMN itemsrcp.itemsrcp_dropship; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsrcp.itemsrcp_dropship IS 'Used to determine if item source price applies only to drop ship purchase orders.'; -- -- Name: COLUMN itemsrcp.itemsrcp_warehous_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsrcp.itemsrcp_warehous_id IS 'Used to determine if item source price applies only to specific site on purchase orders.'; -- -- Name: COLUMN itemsrcp.itemsrcp_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsrcp.itemsrcp_type IS 'Pricing type for item source price. Valid values are N-nominal and D-discount.'; -- -- Name: COLUMN itemsrcp.itemsrcp_discntprcnt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsrcp.itemsrcp_discntprcnt IS 'Discount percent for item source price.'; -- -- Name: COLUMN itemsrcp.itemsrcp_fixedamtdiscount; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN itemsrcp.itemsrcp_fixedamtdiscount IS 'Fixed amount discount for item source price.'; SET search_path = api, pg_catalog; -- -- Name: itemsourceprice; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemsourceprice AS SELECT (item.item_number)::character varying AS item_number, (vendinfo.vend_number)::character varying AS vendor, itemsrcp.itemsrcp_qtybreak AS qty_break, CASE WHEN (itemsrcp.itemsrcp_type = 'N'::bpchar) THEN 'Nominal'::text ELSE 'Discount'::text END AS pricing_type, CASE WHEN (itemsrcp.itemsrcp_warehous_id = (-1)) THEN 'All'::text ELSE whsinfo.warehous_code END AS pricing_site, itemsrcp.itemsrcp_dropship AS dropship_only, itemsrcp.itemsrcp_price AS price_per_unit, curr_symbol.curr_abbr AS currency, (itemsrcp.itemsrcp_discntprcnt * 100.0) AS discount_percent, itemsrcp.itemsrcp_fixedamtdiscount AS discount_fixed_amount FROM (((((public.itemsrcp LEFT JOIN public.itemsrc ON ((itemsrc.itemsrc_id = itemsrcp.itemsrcp_itemsrc_id))) LEFT JOIN public.item ON ((itemsrc.itemsrc_item_id = item.item_id))) LEFT JOIN public.vendinfo ON ((itemsrc.itemsrc_vend_id = vendinfo.vend_id))) LEFT JOIN public.curr_symbol ON ((itemsrcp.itemsrcp_curr_id = curr_symbol.curr_id))) LEFT JOIN public.whsinfo ON ((itemsrcp.itemsrcp_warehous_id = whsinfo.warehous_id))) ORDER BY (item.item_number)::character varying(100), (vendinfo.vend_number)::character varying(100); ALTER TABLE api.itemsourceprice OWNER TO admin; -- -- Name: VIEW itemsourceprice; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemsourceprice IS 'Item Source Price'; SET search_path = public, pg_catalog; -- -- Name: itemsub; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemsub ( itemsub_id integer DEFAULT nextval(('itemsub_itemsub_id_seq'::text)::regclass) NOT NULL, itemsub_parent_item_id integer NOT NULL, itemsub_sub_item_id integer NOT NULL, itemsub_uomratio numeric(20,10) NOT NULL, itemsub_rank integer NOT NULL ); ALTER TABLE public.itemsub OWNER TO admin; -- -- Name: TABLE itemsub; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemsub IS 'Item Substitutes information'; SET search_path = api, pg_catalog; -- -- Name: itemsubstitute; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemsubstitute AS SELECT (p.item_number)::character varying AS root_item_number, (s.item_number)::character varying AS substitute_item_number, itemsub.itemsub_uomratio AS sub_parent_uom_ratio, itemsub.itemsub_rank AS ranking FROM public.item p, public.item s, public.itemsub WHERE ((p.item_id = itemsub.itemsub_parent_item_id) AND (s.item_id = itemsub.itemsub_sub_item_id)); ALTER TABLE api.itemsubstitute OWNER TO admin; -- -- Name: VIEW itemsubstitute; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemsubstitute IS 'Item Substitute'; SET search_path = public, pg_catalog; -- -- Name: itemtax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemtax ( itemtax_id integer NOT NULL, itemtax_item_id integer NOT NULL, itemtax_taxtype_id integer NOT NULL, itemtax_taxzone_id integer ); ALTER TABLE public.itemtax OWNER TO admin; -- -- Name: TABLE itemtax; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemtax IS 'This table associates tax types in a specified tax authority for the given item.'; SET search_path = api, pg_catalog; -- -- Name: itemtaxtype; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemtaxtype AS SELECT (item.item_number)::character varying AS item_number, CASE WHEN (taxzone.taxzone_id IS NULL) THEN 'Any'::character varying ELSE (taxzone.taxzone_code)::character varying END AS tax_zone, taxtype.taxtype_name AS tax_type FROM public.item, (public.itemtax LEFT JOIN public.taxzone ON ((itemtax.itemtax_taxzone_id = taxzone.taxzone_id))), public.taxtype WHERE ((item.item_id = itemtax.itemtax_item_id) AND (itemtax.itemtax_taxtype_id = taxtype.taxtype_id)); ALTER TABLE api.itemtaxtype OWNER TO admin; -- -- Name: VIEW itemtaxtype; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemtaxtype IS 'Item Tax Type'; SET search_path = public, pg_catalog; -- -- Name: itemuomconv; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemuomconv ( itemuomconv_id integer NOT NULL, itemuomconv_item_id integer NOT NULL, itemuomconv_from_uom_id integer NOT NULL, itemuomconv_from_value numeric(20,10) NOT NULL, itemuomconv_to_uom_id integer NOT NULL, itemuomconv_to_value numeric(20,10) NOT NULL, itemuomconv_fractional boolean DEFAULT false NOT NULL, CONSTRAINT itemuomconv_uom CHECK ((itemuomconv_from_uom_id <> itemuomconv_to_uom_id)) ); ALTER TABLE public.itemuomconv OWNER TO admin; -- -- Name: TABLE itemuomconv; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemuomconv IS 'UOM conversion information. From Unit to To Unit with a value per.'; SET search_path = api, pg_catalog; -- -- Name: itemuomconversion; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW itemuomconversion AS SELECT (item.item_number)::character varying AS item_number, (f.uom_name)::character varying AS uom, itemuomconv.itemuomconv_from_value AS uom_value, p.uom_name AS per_uom, itemuomconv.itemuomconv_to_value AS per_uom_value, itemuomconv.itemuomconv_fractional AS fractional, public.fetchitemuomconvtypes(itemuomconv.itemuomconv_id) AS selected_types FROM public.item, public.itemuomconv, public.uom f, public.uom p WHERE (((item.item_id = itemuomconv.itemuomconv_item_id) AND (itemuomconv.itemuomconv_from_uom_id = f.uom_id)) AND (itemuomconv.itemuomconv_to_uom_id = p.uom_id)); ALTER TABLE api.itemuomconversion OWNER TO admin; -- -- Name: VIEW itemuomconversion; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW itemuomconversion IS 'Item Unit of Measure Conversion'; SET search_path = public, pg_catalog; -- -- Name: gltrans; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE gltrans ( gltrans_id integer DEFAULT nextval(('"gltrans_gltrans_id_seq"'::text)::regclass) NOT NULL, gltrans_exported boolean, gltrans_created timestamp with time zone, gltrans_date date NOT NULL, gltrans_sequence integer, gltrans_accnt_id integer NOT NULL, gltrans_source text, gltrans_docnumber text, gltrans_misc_id integer, gltrans_amount numeric(20,2) NOT NULL, gltrans_notes text, gltrans_journalnumber integer, gltrans_posted boolean NOT NULL, gltrans_doctype text, gltrans_rec boolean DEFAULT false NOT NULL, gltrans_username text DEFAULT geteffectivextuser() NOT NULL, gltrans_deleted boolean DEFAULT false ); ALTER TABLE public.gltrans OWNER TO admin; -- -- Name: TABLE gltrans; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE gltrans IS 'General Ledger (G/L) transaction information'; SET search_path = api, pg_catalog; -- -- Name: journalentry; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW journalentry AS SELECT curr_symbol.curr_abbr AS currency, c.gltrans_amount AS amount, c.gltrans_date AS dist_date, c.gltrans_docnumber AS doc_number, public.formatglaccount(da.accnt_id) AS debit, public.formatglaccount(ca.accnt_id) AS credit, c.gltrans_notes AS notes FROM public.gltrans d, public.gltrans c, public.accnt da, public.accnt ca, public.curr_symbol WHERE ((((((((d.gltrans_sequence = c.gltrans_sequence) AND (d.gltrans_accnt_id = da.accnt_id)) AND (c.gltrans_accnt_id = ca.accnt_id)) AND (d.gltrans_amount < (0)::numeric)) AND (c.gltrans_amount > (0)::numeric)) AND (d.gltrans_doctype = 'JE'::text)) AND (c.gltrans_doctype = 'JE'::text)) AND (curr_symbol.curr_id = public.basecurrid())) ORDER BY d.gltrans_date DESC; ALTER TABLE api.journalentry OWNER TO admin; -- -- Name: VIEW journalentry; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW journalentry IS 'Journal Entry'; SET search_path = public, pg_catalog; -- -- Name: whsezone; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE whsezone ( whsezone_id integer NOT NULL, whsezone_warehous_id integer NOT NULL, whsezone_name text NOT NULL, whsezone_descrip text ); ALTER TABLE public.whsezone OWNER TO admin; -- -- Name: TABLE whsezone; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE whsezone IS 'Warehouse Zone information'; SET search_path = api, pg_catalog; -- -- Name: location; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW location AS SELECT (whsinfo.warehous_code)::character varying AS site, (location.location_aisle)::character varying AS aisle, (location.location_rack)::character varying AS rack, (location.location_bin)::character varying AS bin, (location.location_name)::character varying AS location, whsezone.whsezone_name AS zone, location.location_netable AS netable, location.location_restrict AS restricted, location.location_descrip AS description FROM ((public.location LEFT JOIN public.whsinfo ON ((whsinfo.warehous_id = location.location_warehous_id))) LEFT JOIN public.whsezone ON ((whsezone.whsezone_id = location.location_whsezone_id))); ALTER TABLE api.location OWNER TO admin; -- -- Name: VIEW location; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW location IS 'Location'; -- -- Name: misccounttag; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW misccounttag AS SELECT 'This view is for inserts only'::text AS site, 'This view is for inserts only'::text AS item_number, (0)::numeric AS quantity, 'This view is for inserts only'::text AS comment; ALTER TABLE api.misccounttag OWNER TO admin; -- -- Name: VIEW misccounttag; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW misccounttag IS 'Miscellaneous Count Tag'; -- -- Name: pricingschedule; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW pricingschedule AS SELECT (ipshead.ipshead_name)::character varying AS name, ipshead.ipshead_descrip AS description, public.formatdate(ipshead.ipshead_effective, 'Always'::text) AS effective, public.formatdate(ipshead.ipshead_expires, 'Never'::text) AS expires, curr_symbol.curr_abbr AS currency FROM public.ipshead, public.curr_symbol WHERE (curr_symbol.curr_id = ipshead.ipshead_curr_id); ALTER TABLE api.pricingschedule OWNER TO admin; -- -- Name: VIEW pricingschedule; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW pricingschedule IS 'Pricing Schedule'; SET search_path = public, pg_catalog; -- -- Name: ipsass; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ipsass ( ipsass_id integer NOT NULL, ipsass_ipshead_id integer NOT NULL, ipsass_cust_id integer, ipsass_custtype_id integer, ipsass_custtype_pattern text, ipsass_shipto_id integer DEFAULT (-1), ipsass_shipto_pattern text ); ALTER TABLE public.ipsass OWNER TO admin; -- -- Name: TABLE ipsass; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ipsass IS 'Pricing Schedule assignment information'; SET search_path = api, pg_catalog; -- -- Name: pricingscheduleassign; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW pricingscheduleassign AS SELECT (COALESCE(custinfo.cust_number, 'Any'::text))::character varying AS customer_number, (COALESCE(shiptoinfo.shipto_num, 'Any'::text))::character varying AS customer_shipto, (COALESCE(ipsass.ipsass_shipto_pattern, 'N/A'::text))::character varying AS customer_shipto_pattern, (COALESCE(custtype.custtype_code, 'N/A'::text))::character varying AS customer_type, (COALESCE(ipsass.ipsass_custtype_pattern, 'N/A'::text))::character varying AS customer_type_pattern, (ipshead.ipshead_name)::character varying AS pricing_schedule FROM ((((public.ipshead JOIN public.ipsass ON ((ipshead.ipshead_id = ipsass.ipsass_ipshead_id))) LEFT JOIN public.custinfo ON ((ipsass.ipsass_cust_id = custinfo.cust_id))) LEFT JOIN public.custtype ON ((ipsass.ipsass_custtype_id = custtype.custtype_id))) LEFT JOIN public.shiptoinfo ON ((ipsass.ipsass_shipto_id = shiptoinfo.shipto_id))) ORDER BY (COALESCE(custinfo.cust_number, 'Any'::text))::character varying, (COALESCE(shiptoinfo.shipto_num, 'Any'::text))::character varying, (COALESCE(custtype.custtype_code, 'N/A'::text))::character varying, (COALESCE(ipsass.ipsass_custtype_pattern, 'N/A'::text))::character varying, (ipshead.ipshead_name)::character varying; ALTER TABLE api.pricingscheduleassign OWNER TO admin; -- -- Name: VIEW pricingscheduleassign; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW pricingscheduleassign IS 'Pricing Schedule Assignments'; SET search_path = public, pg_catalog; -- -- Name: ipsiteminfo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ipsiteminfo ( ipsitem_id integer DEFAULT nextval(('"ipsitem_ipsitem_id_seq"'::text)::regclass) NOT NULL, ipsitem_ipshead_id integer, ipsitem_item_id integer, ipsitem_qtybreak numeric(18,6) NOT NULL, ipsitem_price numeric(16,4) NOT NULL, ipsitem_qty_uom_id integer, ipsitem_price_uom_id integer, ipsitem_discntprcnt numeric(10,6) DEFAULT 0.00 NOT NULL, ipsitem_fixedamtdiscount numeric(16,4) DEFAULT 0.00 NOT NULL, ipsitem_prodcat_id integer, ipsitem_type character(1) NOT NULL, ipsitem_warehous_id integer, CONSTRAINT valid_ipsitem_type CHECK ((ipsitem_type = ANY (ARRAY['N'::bpchar, 'D'::bpchar, 'M'::bpchar]))) ); ALTER TABLE public.ipsiteminfo OWNER TO admin; -- -- Name: TABLE ipsiteminfo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ipsiteminfo IS 'Pricing Schedule Item information'; -- -- Name: COLUMN ipsiteminfo.ipsitem_prodcat_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ipsiteminfo.ipsitem_prodcat_id IS 'Product category for pricing schedule item.'; -- -- Name: COLUMN ipsiteminfo.ipsitem_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ipsiteminfo.ipsitem_type IS 'Pricing type for pricing schedule item. Valid values are N-nominal, D-discount, and M-markup'; -- -- Name: COLUMN ipsiteminfo.ipsitem_warehous_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ipsiteminfo.ipsitem_warehous_id IS 'Site for pricing schedule item which enables pricing by site.'; SET search_path = api, pg_catalog; -- -- Name: pricingscheduleitem; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW pricingscheduleitem AS SELECT (ipshead.ipshead_name)::character varying AS pricing_schedule, CASE WHEN (COALESCE(ipsiteminfo.ipsitem_item_id, (-1)) > 0) THEN 'Item'::character varying ELSE 'Product Category'::character varying END AS type, (COALESCE(item.item_number, ''::text))::character varying AS item_number, (COALESCE(prodcat.prodcat_code, ''::text))::character varying AS product_category, ipsiteminfo.ipsitem_qtybreak AS qty_break, (qtyuom.uom_name)::character varying AS qty_uom, (priceuom.uom_name)::character varying AS price_uom, ipsiteminfo.ipsitem_price AS price, ipsiteminfo.ipsitem_discntprcnt AS percent, ipsiteminfo.ipsitem_fixedamtdiscount AS fixedamt, CASE WHEN (ipsiteminfo.ipsitem_type = 'N'::bpchar) THEN 'Nominal'::character varying WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN 'Discount'::character varying WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN 'Markup'::character varying ELSE NULL::character varying END AS pricing_type FROM (((((public.ipsiteminfo JOIN public.ipshead ON ((ipsiteminfo.ipsitem_ipshead_id = ipshead.ipshead_id))) LEFT JOIN public.item ON ((ipsiteminfo.ipsitem_item_id = item.item_id))) LEFT JOIN public.prodcat ON ((ipsiteminfo.ipsitem_prodcat_id = prodcat.prodcat_id))) LEFT JOIN public.uom qtyuom ON ((ipsiteminfo.ipsitem_qty_uom_id = qtyuom.uom_id))) LEFT JOIN public.uom priceuom ON ((ipsiteminfo.ipsitem_price_uom_id = priceuom.uom_id))); ALTER TABLE api.pricingscheduleitem OWNER TO admin; -- -- Name: VIEW pricingscheduleitem; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW pricingscheduleitem IS 'Pricing Schedule Item'; SET search_path = public, pg_catalog; -- -- Name: ipsitemchar; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ipsitemchar ( ipsitemchar_id integer NOT NULL, ipsitemchar_ipsitem_id integer NOT NULL, ipsitemchar_char_id integer NOT NULL, ipsitemchar_value text NOT NULL, ipsitemchar_price numeric(16,4) ); ALTER TABLE public.ipsitemchar OWNER TO admin; -- -- Name: TABLE ipsitemchar; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ipsitemchar IS 'Item Price Schedule Characteristic Prices.'; SET search_path = api, pg_catalog; -- -- Name: pricingscheduleitemchar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW pricingscheduleitemchar AS SELECT (ipshead.ipshead_name)::character varying AS pricing_schedule, (item.item_number)::character varying AS item_number, ipsiteminfo.ipsitem_qtybreak AS qty_break, (qtyuom.uom_name)::character varying AS qty_uom, (priceuom.uom_name)::character varying AS price_uom, ("char".char_name)::character varying AS characteristic, (ipsitemchar.ipsitemchar_value)::character varying AS value, ipsitemchar.ipsitemchar_price AS price FROM public.ipshead, public.ipsiteminfo, public.ipsitemchar, public.item, public."char", public.uom qtyuom, public.uom priceuom WHERE ((((((ipshead.ipshead_id = ipsiteminfo.ipsitem_ipshead_id) AND (ipsiteminfo.ipsitem_id = ipsitemchar.ipsitemchar_ipsitem_id)) AND (ipsiteminfo.ipsitem_item_id = item.item_id)) AND (ipsiteminfo.ipsitem_qty_uom_id = qtyuom.uom_id)) AND (ipsiteminfo.ipsitem_price_uom_id = priceuom.uom_id)) AND (ipsitemchar.ipsitemchar_char_id = "char".char_id)); ALTER TABLE api.pricingscheduleitemchar OWNER TO admin; -- -- Name: VIEW pricingscheduleitemchar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW pricingscheduleitemchar IS 'Pricing Schedule Item Characteristics'; -- -- Name: project; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW project AS SELECT prj.prj_number AS number, prj.prj_name AS name, prj.prj_descrip AS description, prj.prj_owner_username AS owner, prj.prj_username AS assigned_to, prj.prj_so AS sales_orders, prj.prj_wo AS work_orders, prj.prj_po AS purchase_orders, CASE WHEN (prj.prj_status = 'P'::bpchar) THEN 'Concept'::text WHEN (prj.prj_status = 'O'::bpchar) THEN 'In-Process'::text WHEN (prj.prj_status = 'C'::bpchar) THEN 'Closed'::text ELSE 'Error'::text END AS status, prj.prj_due_date AS due, prj.prj_assigned_date AS assigned, prj.prj_start_date AS started, prj.prj_completed_date AS completed FROM public.prj; ALTER TABLE api.project OWNER TO admin; -- -- Name: VIEW project; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW project IS 'Project'; -- -- Name: projectcomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW projectcomment AS SELECT (prj.prj_number)::character varying AS project_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.prj, public.cmnttype, public.comment WHERE (((comment.comment_source = 'J'::text) AND (comment.comment_source_id = prj.prj_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.projectcomment OWNER TO admin; -- -- Name: VIEW projectcomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW projectcomment IS 'Project Comment'; SET search_path = public, pg_catalog; -- -- Name: cust_cust_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cust_cust_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cust_cust_id_seq OWNER TO admin; -- -- Name: cust_cust_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cust_cust_id_seq', 123, true); -- -- Name: prospect; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE prospect ( prospect_id integer DEFAULT nextval('cust_cust_id_seq'::regclass) NOT NULL, prospect_active boolean DEFAULT true NOT NULL, prospect_number text NOT NULL, prospect_name text NOT NULL, prospect_cntct_id integer, prospect_comments text, prospect_created date DEFAULT ('now'::text)::date NOT NULL, prospect_salesrep_id integer, prospect_warehous_id integer, prospect_taxzone_id integer, CONSTRAINT prospect_prospect_number_check CHECK ((prospect_number <> ''::text)) ); ALTER TABLE public.prospect OWNER TO admin; -- -- Name: TABLE prospect; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE prospect IS 'Prospect Information'; SET search_path = api, pg_catalog; -- -- Name: prospect; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW prospect AS SELECT (prospect.prospect_number)::character varying AS prospect_number, prospect.prospect_name, prospect.prospect_active AS active, salesrep.salesrep_number AS sales_rep, whsinfo.warehous_code AS site_code, taxzone.taxzone_code AS default_tax_zone, prospect.prospect_comments AS notes, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS contact_honorific, cntct.cntct_first_name AS contact_first, cntct.cntct_middle AS contact_middle, cntct.cntct_last_name AS contact_last, cntct.cntct_suffix AS contact_suffix, cntct.cntct_title AS contact_job_title, cntct.cntct_phone AS contact_voice, cntct.cntct_phone2 AS contact_alternate, cntct.cntct_fax AS contact_fax, cntct.cntct_email AS contact_email, cntct.cntct_webaddr AS contact_web, ''::text AS contact_change, addr.addr_number AS contact_address_number, addr.addr_line1 AS contact_address1, addr.addr_line2 AS contact_address2, addr.addr_line3 AS contact_address3, addr.addr_city AS contact_city, addr.addr_state AS contact_state, addr.addr_postalcode AS contact_postalcode, addr.addr_country AS contact_country, ''::text AS contact_address_change FROM (((((public.prospect LEFT JOIN public.cntct ON ((prospect.prospect_cntct_id = cntct.cntct_id))) LEFT JOIN public.addr ON ((cntct.cntct_addr_id = addr.addr_id))) LEFT JOIN public.taxzone ON ((prospect.prospect_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.salesrep ON ((prospect.prospect_salesrep_id = salesrep.salesrep_id))) LEFT JOIN public.whsinfo ON ((prospect.prospect_warehous_id = whsinfo.warehous_id))); ALTER TABLE api.prospect OWNER TO admin; -- -- Name: VIEW prospect; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW prospect IS 'Prospect'; SET search_path = public, pg_catalog; -- -- Name: expcat; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE expcat ( expcat_id integer NOT NULL, expcat_code text NOT NULL, expcat_descrip text, expcat_exp_accnt_id integer, expcat_liability_accnt_id integer, expcat_active boolean, expcat_purchprice_accnt_id integer, expcat_freight_accnt_id integer, CONSTRAINT expcat_expcat_code_check CHECK ((expcat_code <> ''::text)) ); ALTER TABLE public.expcat OWNER TO admin; -- -- Name: TABLE expcat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE expcat IS 'Expense Category information'; -- -- Name: womatl; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE womatl ( womatl_id integer DEFAULT nextval(('womatl_womatl_id_seq'::text)::regclass) NOT NULL, womatl_wo_id integer, womatl_itemsite_id integer, womatl_qtyper numeric(20,8) NOT NULL, womatl_scrap numeric(8,4) NOT NULL, womatl_qtyreq numeric(18,6) NOT NULL, womatl_qtyiss numeric(18,6) NOT NULL, womatl_qtywipscrap numeric(18,6) NOT NULL, womatl_lastissue date, womatl_lastreturn date, womatl_cost numeric(16,6), womatl_picklist boolean, womatl_status character(1), womatl_imported boolean DEFAULT false, womatl_createwo boolean, womatl_issuemethod character(1), womatl_wooper_id integer, womatl_bomitem_id integer, womatl_duedate date, womatl_schedatwooper boolean, womatl_uom_id integer NOT NULL, womatl_notes text, womatl_ref text, womatl_scrapvalue numeric(16,6) DEFAULT 0, womatl_qtyfxd numeric(20,8) DEFAULT 0 NOT NULL, womatl_issuewo boolean DEFAULT false NOT NULL ); ALTER TABLE public.womatl OWNER TO admin; -- -- Name: TABLE womatl; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE womatl IS 'Work Order Material Requirements information'; -- -- Name: COLUMN womatl.womatl_qtyfxd; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN womatl.womatl_qtyfxd IS 'The fixed quantity required'; SET search_path = api, pg_catalog; -- -- Name: purchaseline; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW purchaseline AS SELECT (pohead.pohead_number)::character varying AS order_number, poitem.poitem_linenumber AS line_number, item.item_number, whsinfo.warehous_code AS site, expcat.expcat_code AS expense_category, poitem.poitem_qty_ordered AS qty_ordered, poitem.poitem_unitprice AS unit_price, poitem.poitem_freight AS freight, poitem.poitem_duedate AS due_date, prj.prj_number AS project_number, poitem.poitem_vend_item_number AS vend_item_number, poitem.poitem_vend_item_descrip AS vendor_description, poitem.poitem_manuf_name AS manufacturer_name, poitem.poitem_manuf_item_number AS manufacturer_item_number, poitem.poitem_manuf_item_descrip AS manufacturer_description, poitem.poitem_comments AS notes, public.formatrevnumber('BOM'::text, poitem.poitem_bom_rev_id) AS bill_of_materials_revision, public.formatrevnumber('BOO'::text, poitem.poitem_boo_rev_id) AS bill_of_operations_revision, public.formatsonumber(coitem.coitem_id) AS sales_order_number, public.formatwonumber(womatl.womatl_wo_id) AS work_order_number FROM ((((((((public.pohead JOIN public.poitem ON ((pohead.pohead_id = poitem.poitem_pohead_id))) LEFT JOIN public.prj ON ((poitem.poitem_prj_id = prj.prj_id))) LEFT JOIN public.expcat ON ((poitem.poitem_expcat_id = expcat.expcat_id))) LEFT JOIN public.itemsite ON ((poitem.poitem_itemsite_id = itemsite.itemsite_id))) LEFT JOIN public.item ON ((itemsite.itemsite_item_id = item.item_id))) LEFT JOIN public.whsinfo ON ((itemsite.itemsite_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.coitem ON (((coitem.coitem_id = poitem.poitem_order_id) AND (poitem.poitem_order_type = 'S'::bpchar)))) LEFT JOIN public.womatl ON (((womatl.womatl_id = poitem.poitem_order_id) AND (poitem.poitem_order_type = 'W'::bpchar)))) ORDER BY pohead.pohead_number, poitem.poitem_linenumber; ALTER TABLE api.purchaseline OWNER TO admin; -- -- Name: VIEW purchaseline; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW purchaseline IS 'Purchase Order Line'; -- -- Name: purchaselinechar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW purchaselinechar AS SELECT (data.order_number)::character varying AS order_number, data.line_number, data.characteristic, COALESCE(pi.charass_value, i3.charass_value) AS value FROM (((((SELECT DISTINCT "char".char_id, poitem.poitem_id, poitem.poitem_itemsite_id, pohead.pohead_number AS order_number, poitem.poitem_linenumber AS line_number, "char".char_name AS characteristic FROM public.pohead, public.poitem, public.itemsite, public.item, public.charass, public."char" WHERE ((((((pohead.pohead_id = poitem.poitem_pohead_id) AND (poitem.poitem_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (charass.charass_char_id = "char".char_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id))) data LEFT JOIN public.charass pi ON ((((data.poitem_id = pi.charass_target_id) AND ('PI'::text = pi.charass_target_type)) AND (pi.charass_char_id = data.char_id)))) LEFT JOIN public.itemsite i1 ON ((data.poitem_itemsite_id = i1.itemsite_id))) LEFT JOIN public.item i2 ON ((i1.itemsite_item_id = i2.item_id))) LEFT JOIN public.charass i3 ON (((((i2.item_id = i3.charass_target_id) AND ('I'::text = i3.charass_target_type)) AND (i3.charass_char_id = data.char_id)) AND i3.charass_default))) ORDER BY (data.order_number)::character varying, data.line_number, data.characteristic; ALTER TABLE api.purchaselinechar OWNER TO admin; -- -- Name: VIEW purchaselinechar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW purchaselinechar IS 'Purchase Order Line Item Characteristic'; -- -- Name: purchaselinecomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW purchaselinecomment AS SELECT (pohead.pohead_number)::character varying AS order_number, poitem.poitem_linenumber AS line_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.pohead, public.poitem, public.cmnttype, public.comment WHERE ((((pohead.pohead_id = poitem.poitem_pohead_id) AND (comment.comment_source = 'PI'::text)) AND (comment.comment_source_id = poitem.poitem_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)) ORDER BY pohead.pohead_number, poitem.poitem_linenumber, comment.comment_date DESC; ALTER TABLE api.purchaselinecomment OWNER TO admin; -- -- Name: VIEW purchaselinecomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW purchaselinecomment IS 'Purchase Order Line Item Comment'; SET search_path = public, pg_catalog; -- -- Name: tax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE tax ( tax_id integer DEFAULT nextval(('"tax_tax_id_seq"'::text)::regclass) NOT NULL, tax_code text NOT NULL, tax_descrip text, tax_sales_accnt_id integer, tax_taxclass_id integer, tax_taxauth_id integer, tax_basis_tax_id integer, CONSTRAINT tax_tax_code_check CHECK ((tax_code <> ''::text)) ); ALTER TABLE public.tax OWNER TO admin; -- -- Name: TABLE tax; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE tax IS 'Tax information'; -- -- Name: COLUMN tax.tax_sales_accnt_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN tax.tax_sales_accnt_id IS 'Deprecated column - DO NOT USE'; -- -- Name: vendaddrinfo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE vendaddrinfo ( vendaddr_id integer DEFAULT nextval(('vendaddr_vendaddr_id_seq'::text)::regclass) NOT NULL, vendaddr_vend_id integer, vendaddr_code text, vendaddr_name text, vendaddr_comments text, vendaddr_cntct_id integer, vendaddr_addr_id integer, vendaddr_taxzone_id integer ); ALTER TABLE public.vendaddrinfo OWNER TO admin; -- -- Name: TABLE vendaddrinfo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE vendaddrinfo IS 'Vendor Address information'; SET search_path = api, pg_catalog; -- -- Name: purchaseorder; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW purchaseorder AS SELECT (pohead.pohead_number)::character varying AS order_number, pohead.pohead_orderdate AS order_date, terms.terms_code AS terms, taxzone.taxzone_code AS tax_zone, whsinfo.warehous_code AS receiving_site, pohead.pohead_agent_username AS purchasing_agent, vendinfo.vend_number AS vendor_number, COALESCE(ua.vendaddr_code, 'MAIN'::text) AS alt_address, pohead.pohead_fob AS fob, pohead.pohead_shipvia AS ship_via, curr_symbol.curr_abbr AS currency, (SELECT COALESCE(sum(data.tax), 0.00) AS tax FROM (SELECT round(sum(calculatetaxdetailsummary.taxdetail_tax), 2) AS tax FROM (public.tax JOIN public.calculatetaxdetailsummary('PO'::text, pohead.pohead_id, 'T'::text) calculatetaxdetailsummary(taxdetail_tax_id, taxdetail_tax_code, taxdetail_tax_descrip, taxdetail_tax_basis_tax_id, taxdetail_taxrate_percent, taxdetail_taxrate_amount, taxdetail_level, taxdetail_taxclass_id, taxdetail_taxclass_code, taxdetail_taxclass_sequence, taxdetail_tax, taxdetail_curr_id, taxdetail_curr_abbr) ON ((calculatetaxdetailsummary.taxdetail_tax_id = tax.tax_id))) GROUP BY tax.tax_id) data) AS tax, pohead.pohead_freight AS freight, pohead.pohead_comments AS notes, pohead.pohead_dropship AS dropship, vc.cntct_number AS vend_contact_number, pohead.pohead_vend_cntct_honorific AS vend_cntct_honorific, pohead.pohead_vend_cntct_first_name AS vend_cntct_first_name, pohead.pohead_vend_cntct_middle AS vend_cntct_middle, pohead.pohead_vend_cntct_last_name AS vend_cntct_last_name, pohead.pohead_vend_cntct_suffix AS vend_cntct_suffix, pohead.pohead_vend_cntct_phone AS vend_cntct_phone, pohead.pohead_vend_cntct_title AS vend_cntct_title, pohead.pohead_vend_cntct_fax AS vend_cntct_fax, pohead.pohead_vend_cntct_email AS vend_cntct_email, pohead.pohead_vendaddress1 AS vendaddress1, pohead.pohead_vendaddress2 AS vendaddress2, pohead.pohead_vendaddress3 AS vendaddress3, pohead.pohead_vendcity AS vendcity, pohead.pohead_vendstate AS vendstate, pohead.pohead_vendzipcode AS vendzipcode, pohead.pohead_vendcountry AS vendcountry, sc.cntct_number AS shipto_contact_number, pohead.pohead_shipto_cntct_honorific AS shipto_cntct_honorific, pohead.pohead_shipto_cntct_first_name AS shipto_cntct_first_name, pohead.pohead_shipto_cntct_middle AS shipto_cntct_middle, pohead.pohead_shipto_cntct_last_name AS shipto_cntct_last_name, pohead.pohead_shipto_cntct_suffix AS shipto_cntct_suffix, pohead.pohead_shipto_cntct_phone AS shipto_cntct_phone, pohead.pohead_shipto_cntct_title AS shipto_cntct_title, pohead.pohead_shipto_cntct_fax AS shipto_cntct_fax, pohead.pohead_shipto_cntct_email AS shipto_cntct_email, addr.addr_number AS shiptoaddress_number, pohead.pohead_shiptoaddress1 AS shiptoaddress1, pohead.pohead_shiptoaddress2 AS shiptoaddress2, pohead.pohead_shiptoaddress3 AS shiptoaddress3, pohead.pohead_shiptocity AS shiptocity, pohead.pohead_shiptostate AS shiptostate, pohead.pohead_shiptozipcode AS shiptozipcode, pohead.pohead_shiptocountry AS shiptocountry, cohead.cohead_number AS sales_order_number FROM ((((((((((public.pohead LEFT JOIN public.cntct vc ON ((pohead.pohead_vend_cntct_id = vc.cntct_id))) LEFT JOIN public.cntct sc ON ((pohead.pohead_shipto_cntct_id = sc.cntct_id))) LEFT JOIN public.addr ON ((pohead.pohead_shiptoaddress_id = addr.addr_id))) LEFT JOIN public.terms ON ((pohead.pohead_terms_id = terms.terms_id))) LEFT JOIN public.taxzone ON ((pohead.pohead_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.whsinfo ON ((pohead.pohead_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.vendaddrinfo ua ON ((pohead.pohead_vendaddr_id = ua.vendaddr_id))) LEFT JOIN public.cohead ON ((pohead.pohead_cohead_id = cohead.cohead_id))) JOIN public.vendinfo ON ((pohead.pohead_vend_id = vendinfo.vend_id))) JOIN public.curr_symbol ON ((pohead.pohead_curr_id = curr_symbol.curr_id))) ORDER BY pohead.pohead_number; ALTER TABLE api.purchaseorder OWNER TO admin; -- -- Name: VIEW purchaseorder; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW purchaseorder IS 'Purchase Order'; -- -- Name: purchaseordercomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW purchaseordercomment AS SELECT (pohead.pohead_number)::character varying AS order_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.pohead, public.cmnttype, public.comment WHERE (((comment.comment_source = 'P'::text) AND (comment.comment_source_id = pohead.pohead_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.purchaseordercomment OWNER TO admin; -- -- Name: VIEW purchaseordercomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW purchaseordercomment IS 'Purchase Order Comment'; SET search_path = public, pg_catalog; -- -- Name: quhead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE quhead ( quhead_id integer DEFAULT nextval(('"quhead_quhead_id_seq"'::text)::regclass) NOT NULL, quhead_number text NOT NULL, quhead_cust_id integer NOT NULL, quhead_quotedate date, quhead_shipto_id integer, quhead_shiptoname text, quhead_shiptoaddress1 text, quhead_shiptoaddress2 text, quhead_shiptoaddress3 text, quhead_shiptocity text, quhead_shiptostate text, quhead_shiptozipcode text, quhead_shiptophone text, quhead_salesrep_id integer, quhead_terms_id integer, quhead_freight numeric(16,4), quhead_ordercomments text, quhead_shipcomments text, quhead_billtoname text, quhead_billtoaddress1 text, quhead_billtoaddress2 text, quhead_billtoaddress3 text, quhead_billtocity text, quhead_billtostate text, quhead_billtozip text, quhead_commission numeric(16,4), quhead_custponumber text, quhead_fob text, quhead_shipvia text, quhead_warehous_id integer, quhead_packdate date, quhead_prj_id integer, quhead_misc numeric(16,4) DEFAULT 0 NOT NULL, quhead_misc_accnt_id integer, quhead_misc_descrip text, quhead_billtocountry text, quhead_shiptocountry text, quhead_curr_id integer DEFAULT basecurrid(), quhead_imported boolean DEFAULT false, quhead_expire date, quhead_calcfreight boolean DEFAULT false NOT NULL, quhead_shipto_cntct_id integer, quhead_shipto_cntct_honorific text, quhead_shipto_cntct_first_name text, quhead_shipto_cntct_middle text, quhead_shipto_cntct_last_name text, quhead_shipto_cntct_suffix text, quhead_shipto_cntct_phone text, quhead_shipto_cntct_title text, quhead_shipto_cntct_fax text, quhead_shipto_cntct_email text, quhead_billto_cntct_id integer, quhead_billto_cntct_honorific text, quhead_billto_cntct_first_name text, quhead_billto_cntct_middle text, quhead_billto_cntct_last_name text, quhead_billto_cntct_suffix text, quhead_billto_cntct_phone text, quhead_billto_cntct_title text, quhead_billto_cntct_fax text, quhead_billto_cntct_email text, quhead_taxzone_id integer, quhead_taxtype_id integer, quhead_ophead_id integer, quhead_status text, quhead_saletype_id integer, quhead_shipzone_id integer, CONSTRAINT quhead_check CHECK ((((quhead_misc = (0)::numeric) AND (quhead_misc_accnt_id IS NULL)) OR ((quhead_misc <> (0)::numeric) AND (quhead_misc_accnt_id IS NOT NULL)))), CONSTRAINT quhead_quhead_number_check CHECK ((quhead_number <> ''::text)), CONSTRAINT quhead_quhead_status_check CHECK ((((quhead_status = 'O'::text) OR (quhead_status = 'C'::text)) OR (quhead_status = 'X'::text))) ); ALTER TABLE public.quhead OWNER TO admin; -- -- Name: TABLE quhead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE quhead IS 'Quote header information'; -- -- Name: COLUMN quhead.quhead_saletype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN quhead.quhead_saletype_id IS 'Associated sale type for quote.'; -- -- Name: COLUMN quhead.quhead_shipzone_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN quhead.quhead_shipzone_id IS 'Associated shipping zone for quote.'; SET search_path = api, pg_catalog; -- -- Name: quote; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW quote AS SELECT (quhead.quhead_number)::character varying AS quote_number, whsinfo.warehous_code AS site, quhead.quhead_quotedate AS quote_date, quhead.quhead_packdate AS pack_date, saletype.saletype_code AS sale_type, salesrep.salesrep_number AS sales_rep, quhead.quhead_commission AS commission, taxzone.taxzone_code AS tax_zone, taxtype.taxtype_name AS tax_type, terms.terms_code AS terms, prj.prj_number AS project_number, COALESCE(custinfo.cust_number, prospect.prospect_number) AS customer_number, quhead.quhead_billtoname AS billto_name, quhead.quhead_billtoaddress1 AS billto_address1, quhead.quhead_billtoaddress2 AS billto_address2, quhead.quhead_billtoaddress3 AS billto_address3, quhead.quhead_billtocity AS billto_city, quhead.quhead_billtostate AS billto_state, quhead.quhead_billtozip AS billto_postal_code, quhead.quhead_billtocountry AS billto_country, shiptoinfo.shipto_num AS shipto_number, quhead.quhead_shiptoname AS shipto_name, quhead.quhead_shiptophone AS shipto_phone, quhead.quhead_shiptoaddress1 AS shipto_address1, quhead.quhead_shiptoaddress2 AS shipto_address2, quhead.quhead_shiptoaddress3 AS shipto_address3, quhead.quhead_shiptocity AS shipto_city, quhead.quhead_shiptostate AS shipto_state, quhead.quhead_shiptozipcode AS shipto_postal_code, quhead.quhead_shiptocountry AS shipto_country, shipzone.shipzone_name AS shipto_shipzone, quhead.quhead_custponumber AS cust_po_number, quhead.quhead_fob AS fob, quhead.quhead_shipvia AS ship_via, curr_symbol.curr_abbr AS currency, quhead.quhead_misc_descrip AS misc_charge_description, CASE WHEN (quhead.quhead_misc_accnt_id IS NULL) THEN NULL::text ELSE public.formatglaccount(quhead.quhead_misc_accnt_id) END AS misc_account_number, quhead.quhead_misc AS misc_charge, quhead.quhead_freight AS freight, quhead.quhead_ordercomments AS order_notes, quhead.quhead_shipcomments AS shipping_notes, false AS add_to_packing_list_batch, quhead.quhead_expire AS expire_date, CASE WHEN (quhead.quhead_status = 'C'::text) THEN 'Converted'::text ELSE 'Open'::text END AS status FROM public.curr_symbol, (((((((((((public.quhead LEFT JOIN public.whsinfo ON ((quhead.quhead_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.prj ON ((quhead.quhead_prj_id = prj.prj_id))) LEFT JOIN public.shiptoinfo ON ((quhead.quhead_shipto_id = shiptoinfo.shipto_id))) LEFT JOIN public.taxzone ON ((quhead.quhead_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.taxtype ON ((quhead.quhead_taxtype_id = taxtype.taxtype_id))) LEFT JOIN public.custinfo ON ((quhead.quhead_cust_id = custinfo.cust_id))) LEFT JOIN public.prospect ON ((quhead.quhead_cust_id = prospect.prospect_id))) LEFT JOIN public.salesrep ON ((quhead.quhead_salesrep_id = salesrep.salesrep_id))) LEFT JOIN public.terms ON ((quhead.quhead_terms_id = terms.terms_id))) LEFT JOIN public.saletype ON ((quhead.quhead_saletype_id = saletype.saletype_id))) LEFT JOIN public.shipzone ON ((quhead.quhead_shipzone_id = shipzone.shipzone_id))) WHERE (quhead.quhead_curr_id = curr_symbol.curr_id); ALTER TABLE api.quote OWNER TO admin; -- -- Name: VIEW quote; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW quote IS 'Quote'; -- -- Name: quotecomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW quotecomment AS SELECT quhead.quhead_number AS quote_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.quhead, public.cmnttype, public.comment WHERE (((comment.comment_source = 'Q'::text) AND (comment.comment_source_id = quhead.quhead_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.quotecomment OWNER TO admin; -- -- Name: VIEW quotecomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW quotecomment IS 'Quote Comment'; SET search_path = public, pg_catalog; -- -- Name: quitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE quitem ( quitem_id integer DEFAULT nextval(('"quitem_quitem_id_seq"'::text)::regclass) NOT NULL, quitem_quhead_id integer, quitem_linenumber integer, quitem_itemsite_id integer, quitem_scheddate date, quitem_qtyord numeric(18,6), quitem_unitcost numeric(16,6), quitem_price numeric(16,4), quitem_custprice numeric(16,4), quitem_memo text, quitem_custpn text, quitem_createorder boolean, quitem_order_warehous_id integer, quitem_item_id integer, quitem_prcost numeric(16,6), quitem_imported boolean DEFAULT false, quitem_qty_uom_id integer NOT NULL, quitem_qty_invuomratio numeric(20,10) NOT NULL, quitem_price_uom_id integer NOT NULL, quitem_price_invuomratio numeric(20,10) NOT NULL, quitem_promdate date, quitem_taxtype_id integer, quitem_dropship boolean DEFAULT false, quitem_itemsrc_id integer, quitem_pricemode character(1) DEFAULT 'D'::bpchar NOT NULL, CONSTRAINT valid_quitem_pricemode CHECK ((quitem_pricemode = ANY (ARRAY['D'::bpchar, 'M'::bpchar]))) ); ALTER TABLE public.quitem OWNER TO admin; -- -- Name: TABLE quitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE quitem IS 'Quote Line Item information'; -- -- Name: COLUMN quitem.quitem_pricemode; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN quitem.quitem_pricemode IS 'Pricing mode for quote item. Valid values are D-discount, and M-markup'; SET search_path = api, pg_catalog; -- -- Name: quoteline; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW quoteline AS SELECT quhead.quhead_number AS quote_number, quitem.quitem_linenumber AS line_number, l.item_number, quitem.quitem_custpn AS customer_pn, i.warehous_code AS sold_from_site, quitem.quitem_qtyord AS qty_ordered, q.uom_name AS qty_uom, quitem.quitem_price AS net_unit_price, p.uom_name AS price_uom, quitem.quitem_scheddate AS scheduled_date, COALESCE((SELECT taxtype.taxtype_name FROM public.taxtype WHERE (taxtype.taxtype_id = public.getitemtaxtype(l.item_id, quhead.quhead_taxzone_id))), 'None'::text) AS tax_type, CASE WHEN (quitem.quitem_price = (0)::numeric) THEN '100'::text WHEN (quitem.quitem_custprice = (0)::numeric) THEN 'N/A'::text ELSE (round((((1)::numeric - (quitem.quitem_price / quitem.quitem_custprice)) * (100)::numeric), 4))::text END AS discount_pct_from_list, quitem.quitem_createorder AS create_order, s.warehous_code AS supplying_site, quitem.quitem_prcost AS overwrite_po_price, quitem.quitem_memo AS notes FROM public.quhead, public.uom q, public.uom p, (public.quitem LEFT JOIN public.whsinfo s ON ((quitem.quitem_order_warehous_id = s.warehous_id))), public.itemsite il, public.item l, public.whsinfo i WHERE ((((((quhead.quhead_id = quitem.quitem_quhead_id) AND (quitem.quitem_itemsite_id = il.itemsite_id)) AND (il.itemsite_item_id = l.item_id)) AND (il.itemsite_warehous_id = i.warehous_id)) AND (quitem.quitem_qty_uom_id = q.uom_id)) AND (quitem.quitem_price_uom_id = p.uom_id)) ORDER BY quhead.quhead_number, quitem.quitem_linenumber; ALTER TABLE api.quoteline OWNER TO admin; -- -- Name: VIEW quoteline; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW quoteline IS 'Quote Line Item'; -- -- Name: quotelinechar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW quotelinechar AS SELECT DISTINCT quhead.quhead_number AS quote_number, quitem.quitem_linenumber AS line_number, "char".char_name AS characteristic, COALESCE((SELECT b.charass_value FROM public.charass b WHERE (((b.charass_target_type = 'QI'::text) AND (b.charass_target_id = quitem.quitem_id)) AND (b.charass_char_id = "char".char_id))), (SELECT c.charass_value FROM public.charass c WHERE ((((c.charass_target_type = 'I'::text) AND (c.charass_target_id = item.item_id)) AND c.charass_default) AND (c.charass_char_id = "char".char_id)) LIMIT 1)) AS value FROM public.quhead, public.quitem, public.itemsite, public.item, public.charass a, public."char" WHERE ((((((quhead.quhead_id = quitem.quitem_quhead_id) AND (quitem.quitem_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (a.charass_char_id = "char".char_id)) AND (a.charass_target_type = 'I'::text)) AND (a.charass_target_id = item.item_id)) ORDER BY quhead.quhead_number, quitem.quitem_linenumber, "char".char_name; ALTER TABLE api.quotelinechar OWNER TO admin; -- -- Name: VIEW quotelinechar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW quotelinechar IS 'Quote Line Item Characteristics'; -- -- Name: quotelinecomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW quotelinecomment AS SELECT quhead.quhead_number AS quote_number, quitem.quitem_linenumber AS line_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.quhead, public.quitem, public.cmnttype, public.comment WHERE ((((quhead.quhead_id = quitem.quitem_quhead_id) AND (comment.comment_source = 'QI'::text)) AND (comment.comment_source_id = quitem.quitem_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)) ORDER BY quhead.quhead_number, quitem.quitem_linenumber, comment.comment_date DESC; ALTER TABLE api.quotelinecomment OWNER TO admin; -- -- Name: VIEW quotelinecomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW quotelinecomment IS 'Quote Line Item Comment'; SET search_path = public, pg_catalog; -- -- Name: aropenalloc; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE aropenalloc ( aropenalloc_aropen_id integer NOT NULL, aropenalloc_doctype character(1) NOT NULL, aropenalloc_doc_id integer NOT NULL, aropenalloc_amount numeric(20,2) DEFAULT 0.00 NOT NULL, aropenalloc_curr_id integer DEFAULT basecurrid() ); ALTER TABLE public.aropenalloc OWNER TO admin; SET search_path = api, pg_catalog; -- -- Name: salescredit; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW salescredit AS SELECT custinfo.cust_number AS customer_number, aropen.aropen_docnumber AS cm_number, cohead.cohead_number AS so_number, (aropenalloc.aropenalloc_amount)::numeric(16,4) AS amount, curr.curr_abbr AS currency FROM ((((public.aropenalloc LEFT JOIN public.aropen ON ((aropen.aropen_id = aropenalloc.aropenalloc_aropen_id))) LEFT JOIN public.custinfo ON ((custinfo.cust_id = aropen.aropen_cust_id))) LEFT JOIN public.cohead ON (((aropenalloc.aropenalloc_doctype = 'S'::bpchar) AND (cohead.cohead_id = aropenalloc.aropenalloc_doc_id)))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = aropenalloc.aropenalloc_curr_id))) WHERE (aropenalloc.aropenalloc_doctype = 'S'::bpchar); ALTER TABLE api.salescredit OWNER TO admin; -- -- Name: VIEW salescredit; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW salescredit IS 'Payments (credit memos) pre-applied to sales orders'; SET search_path = public, pg_catalog; -- -- Name: cohist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cohist ( cohist_id integer DEFAULT nextval(('cohist_cohist_id_seq'::text)::regclass) NOT NULL, cohist_cust_id integer, cohist_itemsite_id integer, cohist_shipdate date, cohist_shipvia text, cohist_ordernumber text, cohist_orderdate date, cohist_invcnumber text, cohist_invcdate date, cohist_qtyshipped numeric(18,6), cohist_unitprice numeric(16,4), cohist_shipto_id integer, cohist_salesrep_id integer, cohist_duedate date, cohist_imported boolean DEFAULT false, cohist_billtoname text, cohist_billtoaddress1 text, cohist_billtoaddress2 text, cohist_billtoaddress3 text, cohist_billtocity text, cohist_billtostate text, cohist_billtozip text, cohist_shiptoname text, cohist_shiptoaddress1 text, cohist_shiptoaddress2 text, cohist_shiptoaddress3 text, cohist_shiptocity text, cohist_shiptostate text, cohist_shiptozip text, cohist_commission numeric(16,4), cohist_commissionpaid boolean, cohist_unitcost numeric(18,6), cohist_misc_type character(1), cohist_misc_descrip text, cohist_misc_id integer, cohist_doctype text, cohist_promisedate date, cohist_ponumber text, cohist_curr_id integer DEFAULT basecurrid(), cohist_sequence integer, cohist_taxtype_id integer, cohist_taxzone_id integer, cohist_cohead_ccpay_id integer, cohist_saletype_id integer, cohist_shipzone_id integer ); ALTER TABLE public.cohist OWNER TO admin; -- -- Name: TABLE cohist; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cohist IS 'Sales Order history'; -- -- Name: COLUMN cohist.cohist_cohead_ccpay_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cohist.cohist_cohead_ccpay_id IS 'Credit card payments made at sales order time (as opposed to invoice time) need special treatment. This field allows checking for this case.'; -- -- Name: COLUMN cohist.cohist_saletype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cohist.cohist_saletype_id IS 'Associated sale type for sales history.'; -- -- Name: COLUMN cohist.cohist_shipzone_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cohist.cohist_shipzone_id IS 'Associated shipping zone for sales history.'; -- -- Name: taxhist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE taxhist ( taxhist_id integer NOT NULL, taxhist_parent_id integer NOT NULL, taxhist_taxtype_id integer, taxhist_tax_id integer NOT NULL, taxhist_basis numeric(16,2) NOT NULL, taxhist_basis_tax_id integer, taxhist_sequence integer, taxhist_percent numeric(10,6) NOT NULL, taxhist_amount numeric(16,2) NOT NULL, taxhist_tax numeric(16,6) NOT NULL, taxhist_docdate date NOT NULL, taxhist_distdate date, taxhist_curr_id integer, taxhist_curr_rate numeric, taxhist_journalnumber integer ); ALTER TABLE public.taxhist OWNER TO admin; -- -- Name: TABLE taxhist; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE taxhist IS 'A table type to record tax transaction history. Inherited by other tables that actually record history. As the parent, queries can be run against it that will join all child tables. '; -- -- Name: COLUMN taxhist.taxhist_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_id IS 'Primary key'; -- -- Name: COLUMN taxhist.taxhist_parent_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_parent_id IS 'Source parent id.'; -- -- Name: COLUMN taxhist.taxhist_taxtype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_taxtype_id IS 'Tax type id'; -- -- Name: COLUMN taxhist.taxhist_tax_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_tax_id IS 'Tax code id.'; -- -- Name: COLUMN taxhist.taxhist_basis; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_basis IS 'Base price amount on which the tax calculation is based.'; -- -- Name: COLUMN taxhist.taxhist_basis_tax_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_basis_tax_id IS 'Tax rate calculation basis. If null, then the amount of the parent document, otherwise calculated on the result amount of the tax code id referenced.'; -- -- Name: COLUMN taxhist.taxhist_amount; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_amount IS 'Flat tax amount.'; -- -- Name: COLUMN taxhist.taxhist_tax; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_tax IS 'Calculated tax amount.'; -- -- Name: COLUMN taxhist.taxhist_docdate; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_docdate IS 'The date of the parent document.'; -- -- Name: COLUMN taxhist.taxhist_distdate; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxhist.taxhist_distdate IS 'The G/L distribution date of the parent document.'; -- -- Name: taxhist_taxhist_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE taxhist_taxhist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.taxhist_taxhist_id_seq OWNER TO admin; -- -- Name: taxhist_taxhist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE taxhist_taxhist_id_seq OWNED BY taxhist.taxhist_id; -- -- Name: taxhist_taxhist_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('taxhist_taxhist_id_seq', 528, true); -- -- Name: cohisttax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cohisttax ( ) INHERITS (taxhist); ALTER TABLE public.cohisttax OWNER TO admin; SET search_path = api, pg_catalog; -- -- Name: saleshistory; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW saleshistory AS SELECT custinfo.cust_number AS customer_number, item.item_number, whsinfo.warehous_code AS site_code, cohist.cohist_shipdate AS ship_date, cohist.cohist_shipvia AS ship_via, cohist.cohist_ordernumber AS order_number, cohist.cohist_ponumber AS purchase_order_number, cohist.cohist_orderdate AS order_date, cohist.cohist_invcnumber AS invoice_number, cohist.cohist_invcdate AS invoice_date, cohist.cohist_qtyshipped AS quantity_shipped, cohist.cohist_unitprice AS unit_price, shiptoinfo.shipto_num AS shipto_number, salesrep.salesrep_number AS sales_rep, cohist.cohist_duedate AS due_date, cohist.cohist_promisedate AS promise_date, cohist.cohist_imported AS imported, cohist.cohist_billtoname AS billto_name, cohist.cohist_billtoaddress1 AS billto_address1, cohist.cohist_billtoaddress2 AS billto_address2, cohist.cohist_billtoaddress3 AS billto_address3, cohist.cohist_billtocity AS billto_city, cohist.cohist_billtostate AS billto_state, cohist.cohist_billtozip AS billto_zip, cohist.cohist_shiptoname AS shipto_name, cohist.cohist_shiptoaddress1 AS shipto_address1, cohist.cohist_shiptoaddress2 AS shipto_address2, cohist.cohist_shiptoaddress3 AS shipto_address3, cohist.cohist_shiptocity AS shipto_city, cohist.cohist_shiptostate AS shipto_state, cohist.cohist_shiptozip AS shipto_zip, cohist.cohist_commission AS commission, cohist.cohist_commissionpaid AS commission_paid, cohist.cohist_unitcost AS unit_cost, CASE WHEN (cohist.cohist_misc_type IS NULL) THEN ''::text WHEN (cohist.cohist_misc_type = 'M'::bpchar) THEN 'Misc. Charge'::text WHEN (cohist.cohist_misc_type = 'F'::bpchar) THEN 'Freight'::text ELSE 'Unknown'::text END AS misc_type, cohist.cohist_misc_descrip AS misc_description, CASE WHEN (cohist.cohist_misc_id IS NULL) THEN ''::text WHEN (cohist.cohist_misc_type = 'M'::bpchar) THEN public.formatglaccount(cohist.cohist_misc_id) ELSE 'Unknown'::text END AS misc_info, taxzone.taxzone_code AS tax_zone, taxtype.taxtype_name AS tax_type, CASE WHEN (cohist.cohist_doctype = 'I'::text) THEN 'Invoice'::text WHEN (cohist.cohist_doctype = 'C'::text) THEN 'Credit Memo'::text ELSE 'Unknown'::text END AS document_type, curr_symbol.curr_abbr AS currency, cohist.cohist_sequence AS gl_sequence, (SELECT sum(cohisttax.taxhist_tax) AS sum FROM public.cohisttax WHERE (cohisttax.taxhist_parent_id = cohist.cohist_id)) AS tax FROM (((((((((public.cohist LEFT JOIN public.custinfo ON ((cohist.cohist_cust_id = custinfo.cust_id))) LEFT JOIN public.shiptoinfo ON ((cohist.cohist_shipto_id = shiptoinfo.shipto_id))) LEFT JOIN public.taxzone ON ((cohist.cohist_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.taxtype ON ((cohist.cohist_taxtype_id = taxtype.taxtype_id))) LEFT JOIN public.salesrep ON ((cohist.cohist_salesrep_id = salesrep.salesrep_id))) LEFT JOIN public.itemsite ON ((cohist.cohist_itemsite_id = itemsite.itemsite_id))) LEFT JOIN public.item ON ((itemsite.itemsite_item_id = item.item_id))) LEFT JOIN public.whsinfo ON ((itemsite.itemsite_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.curr_symbol ON ((cohist.cohist_curr_id = curr_symbol.curr_id))); ALTER TABLE api.saleshistory OWNER TO admin; -- -- Name: VIEW saleshistory; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW saleshistory IS 'Sales History'; -- -- Name: saleslinechar; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW saleslinechar AS SELECT (data.order_number)::character varying AS order_number, data.line_number, data.characteristic, COALESCE(si.charass_value, i3.charass_value) AS value, (COALESCE(si.charass_price, public.itemcharprice(data.item_id, data.char_id, COALESCE(si.charass_value, i3.charass_value), data.cohead_cust_id, data.cohead_shipto_id, data.coitem_qtyord, data.cohead_curr_id, data.cohead_orderdate), (0)::numeric))::numeric(16,4) AS price FROM (((((SELECT DISTINCT cohead.cohead_cust_id, cohead.cohead_shipto_id, cohead.cohead_curr_id, cohead.cohead_orderdate, coitem.coitem_id, coitem.coitem_itemsite_id, coitem.coitem_qtyord, "char".char_id, item.item_id, cohead.cohead_number AS order_number, CASE WHEN (coitem.coitem_subnumber = 0) THEN ((coitem.coitem_linenumber)::character varying)::text ELSE ((((coitem.coitem_linenumber)::character varying)::text || ('.'::character varying)::text) || ((coitem.coitem_subnumber)::character varying)::text) END AS line_number, "char".char_name AS characteristic FROM public.cohead, public.coitem, public.itemsite, public.item, public.charass, public."char" WHERE ((((((cohead.cohead_id = coitem.coitem_cohead_id) AND (coitem.coitem_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (charass.charass_char_id = "char".char_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id))) data LEFT JOIN public.charass si ON ((((data.coitem_id = si.charass_target_id) AND ('SI'::text = si.charass_target_type)) AND (si.charass_char_id = data.char_id)))) LEFT JOIN public.itemsite i1 ON ((data.coitem_itemsite_id = i1.itemsite_id))) LEFT JOIN public.item i2 ON ((i1.itemsite_item_id = i2.item_id))) LEFT JOIN public.charass i3 ON (((((i2.item_id = i3.charass_target_id) AND ('I'::text = i3.charass_target_type)) AND (i3.charass_char_id = data.char_id)) AND i3.charass_default))) ORDER BY (data.order_number)::character varying, data.line_number, data.characteristic; ALTER TABLE api.saleslinechar OWNER TO admin; -- -- Name: VIEW saleslinechar; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW saleslinechar IS 'Sales Order Line Item Characteristic'; -- -- Name: saleslinecomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW saleslinecomment AS SELECT (cohead.cohead_number)::character varying AS order_number, CASE WHEN (coitem.coitem_subnumber = 0) THEN ((coitem.coitem_linenumber)::character varying)::text ELSE ((((coitem.coitem_linenumber)::character varying)::text || ('.'::character varying)::text) || ((coitem.coitem_subnumber)::character varying)::text) END AS line_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.cohead, public.coitem, public.cmnttype, public.comment WHERE ((((cohead.cohead_id = coitem.coitem_cohead_id) AND (comment.comment_source = 'SI'::text)) AND (comment.comment_source_id = coitem.coitem_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)) ORDER BY cohead.cohead_number, coitem.coitem_linenumber, comment.comment_date DESC; ALTER TABLE api.saleslinecomment OWNER TO admin; -- -- Name: VIEW saleslinecomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW saleslinecomment IS 'Sales Order Line Item Comment'; -- -- Name: salesorder; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW salesorder AS SELECT (cohead.cohead_number)::character varying AS order_number, whsinfo.warehous_code AS site, cohead.cohead_orderdate AS order_date, cohead.cohead_packdate AS pack_date, saletype.saletype_code AS sale_type, salesrep.salesrep_number AS sales_rep, cohead.cohead_commission AS commission, COALESCE(taxzone.taxzone_code, 'None'::text) AS tax_zone, terms.terms_code AS terms, prj.prj_number AS project_number, custinfo.cust_number AS customer_number, bc.cntct_number AS billto_contact_number, cohead.cohead_billto_cntct_honorific AS billto_contact_name, cohead.cohead_billto_cntct_first_name AS billto_contact_first, cohead.cohead_billto_cntct_middle AS billto_contact_middle, cohead.cohead_billto_cntct_last_name AS billto_contact_last, cohead.cohead_billto_cntct_suffix AS billto_contact_suffix, cohead.cohead_billto_cntct_phone AS billto_contact_phone, cohead.cohead_billto_cntct_title AS billto_contact_title, cohead.cohead_billto_cntct_fax AS billto_contct_fax, cohead.cohead_billto_cntct_email AS billto_contact_email, cohead.cohead_billtoname AS billto_name, cohead.cohead_billtoaddress1 AS billto_address1, cohead.cohead_billtoaddress2 AS billto_address2, cohead.cohead_billtoaddress3 AS billto_address3, cohead.cohead_billtocity AS billto_city, cohead.cohead_billtostate AS billto_state, cohead.cohead_billtozipcode AS billto_postal_code, cohead.cohead_billtocountry AS billto_country, shiptoinfo.shipto_num AS shipto_number, sc.cntct_number AS shipto_contact_number, cohead.cohead_shipto_cntct_honorific AS shipto_contact_honorific, cohead.cohead_shipto_cntct_first_name AS shipto_contact_first, cohead.cohead_shipto_cntct_middle AS shipto_contact_middle, cohead.cohead_shipto_cntct_last_name AS shipto_contact_last, cohead.cohead_shipto_cntct_suffix AS shipto_contact_suffix, cohead.cohead_shipto_cntct_phone AS shipto_contact_phone, cohead.cohead_shipto_cntct_title AS shipto_contact_title, cohead.cohead_shipto_cntct_fax AS shipto_contact_fax, cohead.cohead_shipto_cntct_email AS shipto_contact_email, cohead.cohead_shiptoname AS shipto_name, cohead.cohead_shiptophone AS shipto_phone, cohead.cohead_shiptoaddress1 AS shipto_address1, cohead.cohead_shiptoaddress2 AS shipto_address2, cohead.cohead_shiptoaddress3 AS shipto_address3, cohead.cohead_shiptocity AS shipto_city, cohead.cohead_shiptostate AS shipto_state, cohead.cohead_shiptozipcode AS shipto_postal_code, cohead.cohead_shiptocountry AS shipto_country, shipzone.shipzone_name AS shipto_shipzone, cohead.cohead_custponumber AS cust_po_number, cohead.cohead_fob AS fob, cohead.cohead_shipvia AS ship_via, CASE WHEN (cohead.cohead_holdtype = 'N'::bpchar) THEN 'None'::text WHEN (cohead.cohead_holdtype = 'C'::bpchar) THEN 'Credit'::text WHEN (cohead.cohead_holdtype = 'S'::bpchar) THEN 'Shipping'::text WHEN (cohead.cohead_holdtype = 'P'::bpchar) THEN 'Packing'::text WHEN (cohead.cohead_holdtype = 'R'::bpchar) THEN 'Return'::text ELSE 'Error'::text END AS hold_type, shipchrg.shipchrg_name AS shipping_chgs, shipform.shipform_name AS shipping_form, cohead.cohead_shipcomplete AS ship_complete, curr_symbol.curr_abbr AS currency, cohead.cohead_misc_descrip AS misc_charge_description, CASE WHEN (cohead.cohead_misc_accnt_id IS NULL) THEN NULL::text ELSE public.formatglaccount(cohead.cohead_misc_accnt_id) END AS misc_account_number, cohead.cohead_misc AS misc_charge, cohead.cohead_freight AS freight, cohead.cohead_calcfreight AS calculate_freight, cohead.cohead_ordercomments AS order_notes, cohead.cohead_shipcomments AS shipping_notes, false AS add_to_packing_list_batch FROM (((((((((public.cohead LEFT JOIN public.cntct bc ON ((cohead.cohead_billto_cntct_id = bc.cntct_id))) LEFT JOIN public.cntct sc ON ((cohead.cohead_shipto_cntct_id = sc.cntct_id))) LEFT JOIN public.whsinfo ON ((cohead.cohead_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.prj ON ((cohead.cohead_prj_id = prj.prj_id))) LEFT JOIN public.shiptoinfo ON ((cohead.cohead_shipto_id = shiptoinfo.shipto_id))) LEFT JOIN public.shipchrg ON ((cohead.cohead_shipchrg_id = shipchrg.shipchrg_id))) LEFT JOIN public.taxzone ON ((cohead.cohead_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.saletype ON ((cohead.cohead_saletype_id = saletype.saletype_id))) LEFT JOIN public.shipzone ON ((cohead.cohead_shipzone_id = shipzone.shipzone_id))), public.custinfo, public.shipform, public.salesrep, public.terms, public.curr_symbol WHERE (((((cohead.cohead_cust_id = custinfo.cust_id) AND (cohead.cohead_shipform_id = shipform.shipform_id)) AND (cohead.cohead_salesrep_id = salesrep.salesrep_id)) AND (cohead.cohead_terms_id = terms.terms_id)) AND (cohead.cohead_curr_id = curr_symbol.curr_id)); ALTER TABLE api.salesorder OWNER TO admin; -- -- Name: VIEW salesorder; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW salesorder IS 'Sales Order'; -- -- Name: salesordercomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW salesordercomment AS SELECT (cohead.cohead_number)::character varying AS order_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.cohead, public.cmnttype, public.comment WHERE (((comment.comment_source = 'S'::text) AND (comment.comment_source_id = cohead.cohead_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.salesordercomment OWNER TO admin; -- -- Name: VIEW salesordercomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW salesordercomment IS 'Sales Order Comment'; -- -- Name: salesrep; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW salesrep AS SELECT (salesrep.salesrep_number)::character varying AS number, salesrep.salesrep_active AS active, salesrep.salesrep_name AS name, (salesrep.salesrep_commission * (100)::numeric) AS commission_percent, emp.emp_number AS employee FROM (public.salesrep LEFT JOIN public.emp ON ((emp.emp_id = salesrep.salesrep_emp_id))) ORDER BY salesrep.salesrep_number; ALTER TABLE api.salesrep OWNER TO admin; -- -- Name: VIEW salesrep; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW salesrep IS 'Sales Rep'; SET search_path = public, pg_catalog; -- -- Name: shipvia; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shipvia ( shipvia_id integer DEFAULT nextval(('shipvia_shipvia_id_seq'::text)::regclass) NOT NULL, shipvia_code text NOT NULL, shipvia_descrip text, CONSTRAINT shipvia_shipvia_code_check CHECK ((shipvia_code <> ''::text)) ); ALTER TABLE public.shipvia OWNER TO admin; -- -- Name: TABLE shipvia; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shipvia IS 'Ship Via information'; -- -- Name: sitetype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE sitetype ( sitetype_id integer NOT NULL, sitetype_name text NOT NULL, sitetype_descrip text, CONSTRAINT sitetype_sitetype_name_check CHECK ((sitetype_name <> ''::text)) ); ALTER TABLE public.sitetype OWNER TO admin; -- -- Name: TABLE sitetype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE sitetype IS 'This table is the different types of sites.'; SET search_path = api, pg_catalog; -- -- Name: site; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW site AS SELECT (whsinfo.warehous_code)::character varying AS code, st.sitetype_name AS type, whsinfo.warehous_active AS active, whsinfo.warehous_descrip AS description, m.addr_number AS address_number, m.addr_line1 AS address1, m.addr_line2 AS address2, m.addr_line3 AS address3, m.addr_city AS city, m.addr_state AS state, m.addr_postalcode AS postal_code, m.addr_country AS country, ''::text AS address_change, c.cntct_number AS contact_number, c.cntct_honorific AS honorific, c.cntct_first_name AS first, c.cntct_middle AS middle, c.cntct_last_name AS last, c.cntct_suffix AS suffix, c.cntct_title AS job_title, c.cntct_phone AS phone, c.cntct_fax AS fax, c.cntct_email AS email, ''::text AS contact_change, public.formatglaccount(a.accnt_id) AS post_unassigned_transactions_to, a.accnt_descrip AS post_unassigned_transactions_to_description, whsinfo.warehous_transit AS transit_type, CASE WHEN whsinfo.warehous_transit THEN false ELSE true END AS inventory_type, CASE WHEN whsinfo.warehous_transit THEN ''::text ELSE whsinfo.warehous_bol_prefix END AS next_bill_of_lading_prefix, CASE WHEN whsinfo.warehous_transit THEN 0 ELSE whsinfo.warehous_bol_number END AS next_bill_of_lading_number, CASE WHEN whsinfo.warehous_transit THEN false ELSE whsinfo.warehous_shipping END AS shipping_site, CASE WHEN whsinfo.warehous_transit THEN ''::text ELSE whsinfo.warehous_counttag_prefix END AS next_count_tag_prefix, CASE WHEN whsinfo.warehous_transit THEN 0 ELSE whsinfo.warehous_counttag_number END AS next_count_tag_number, CASE WHEN whsinfo.warehous_transit THEN false ELSE whsinfo.warehous_useslips END AS force_the_use_of_count_slips, CASE WHEN whsinfo.warehous_transit THEN false ELSE whsinfo.warehous_usezones END AS force_the_use_of_zones, CASE WHEN whsinfo.warehous_transit THEN 0 ELSE whsinfo.warehous_sequence END AS scheduling_sequence, CASE WHEN whsinfo.warehous_transit THEN (0)::numeric ELSE (whsinfo.warehous_shipping_commission * 100.0) END AS shipping_commission, CASE WHEN whsinfo.warehous_transit THEN ''::text ELSE t.taxzone_code END AS tax_zone, CASE WHEN whsinfo.warehous_transit THEN ''::text ELSE whsinfo.warehous_fob END AS default_fob, CASE WHEN whsinfo.warehous_transit THEN s.shipvia_code ELSE ''::text END AS default_ship_via, CASE WHEN whsinfo.warehous_transit THEN f.shipform_name ELSE ''::text END AS default_shipping_form, CASE WHEN whsinfo.warehous_transit THEN cc.costcat_code ELSE ''::text END AS default_cost_category, CASE WHEN whsinfo.warehous_transit THEN whsinfo.warehous_shipcomments ELSE ''::text END AS shipping_comments, CASE WHEN whsinfo.warehous_transit THEN false ELSE whsinfo.warehous_enforcearbl END AS enforce_arbl_naming_convention, CASE WHEN whsinfo.warehous_transit THEN 0 WHEN whsinfo.warehous_enforcearbl THEN whsinfo.warehous_aislesize ELSE 0 END AS aisle_size, CASE WHEN whsinfo.warehous_transit THEN false WHEN (whsinfo.warehous_enforcearbl AND whsinfo.warehous_aislealpha) THEN true ELSE false END AS aisle_allow_alpha_characters, CASE WHEN whsinfo.warehous_transit THEN 0 WHEN whsinfo.warehous_enforcearbl THEN whsinfo.warehous_racksize ELSE 0 END AS rack_size, CASE WHEN whsinfo.warehous_transit THEN false WHEN (whsinfo.warehous_enforcearbl AND whsinfo.warehous_rackalpha) THEN true ELSE false END AS rack_allow_alpha_characters, CASE WHEN whsinfo.warehous_transit THEN 0 WHEN whsinfo.warehous_enforcearbl THEN whsinfo.warehous_binsize ELSE 0 END AS bin_size, CASE WHEN whsinfo.warehous_transit THEN false WHEN (whsinfo.warehous_enforcearbl AND whsinfo.warehous_binalpha) THEN true ELSE false END AS bin_allow_alpha_characters, CASE WHEN whsinfo.warehous_transit THEN 0 WHEN whsinfo.warehous_enforcearbl THEN whsinfo.warehous_locationsize ELSE 0 END AS location_size, CASE WHEN whsinfo.warehous_transit THEN false WHEN (whsinfo.warehous_enforcearbl AND whsinfo.warehous_locationalpha) THEN true ELSE false END AS location_allow_alpha_characters FROM ((((((((public.whsinfo LEFT JOIN public.addr m ON ((whsinfo.warehous_addr_id = m.addr_id))) LEFT JOIN public.cntct c ON ((whsinfo.warehous_cntct_id = c.cntct_id))) LEFT JOIN public.accnt a ON ((whsinfo.warehous_default_accnt_id = a.accnt_id))) LEFT JOIN public.taxzone t ON ((whsinfo.warehous_taxzone_id = t.taxzone_id))) LEFT JOIN public.shipvia s ON ((whsinfo.warehous_shipvia_id = s.shipvia_id))) LEFT JOIN public.shipform f ON ((whsinfo.warehous_shipform_id = f.shipform_id))) LEFT JOIN public.costcat cc ON ((whsinfo.warehous_costcat_id = cc.costcat_id))) LEFT JOIN public.sitetype st ON ((whsinfo.warehous_sitetype_id = st.sitetype_id))) ORDER BY whsinfo.warehous_code; ALTER TABLE api.site OWNER TO admin; -- -- Name: VIEW site; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW site IS 'Site'; -- -- Name: sitezone; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW sitezone AS SELECT (whsinfo.warehous_code)::character varying AS site, (whsezone.whsezone_name)::character varying AS name, whsezone.whsezone_descrip AS description FROM (public.whsezone LEFT JOIN public.whsinfo ON ((whsinfo.warehous_id = whsezone.whsezone_warehous_id))); ALTER TABLE api.sitezone OWNER TO admin; -- -- Name: VIEW sitezone; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW sitezone IS 'Site Zone'; -- -- Name: task; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW task AS SELECT prj.prj_number AS project_number, prjtask.prjtask_number AS number, CASE WHEN (prjtask.prjtask_status = 'P'::bpchar) THEN 'Concept'::text WHEN (prjtask.prjtask_status = 'O'::bpchar) THEN 'In-Process'::text WHEN (prjtask.prjtask_status = 'C'::bpchar) THEN 'Closed'::text ELSE 'Error'::text END AS status, prjtask.prjtask_name AS name, prjtask.prjtask_descrip AS description, prjtask.prjtask_owner_username AS owner, prjtask.prjtask_username AS assigned_to, prjtask.prjtask_hours_budget AS hours_budgeted, prjtask.prjtask_hours_actual AS hours_actual, prjtask.prjtask_exp_budget AS expenses_budgeted, prjtask.prjtask_exp_actual AS expenses_actual, prjtask.prjtask_due_date AS due, prjtask.prjtask_assigned_date AS assigned, prjtask.prjtask_start_date AS started, prjtask.prjtask_completed_date AS completed FROM (public.prjtask JOIN public.prj ON ((prj.prj_id = prjtask.prjtask_prj_id))); ALTER TABLE api.task OWNER TO admin; -- -- Name: VIEW task; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW task IS 'Task'; -- -- Name: taskcomment; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW taskcomment AS SELECT (prj.prj_number)::character varying AS project_number, (prjtask.prjtask_number)::character varying AS task_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.prj, public.prjtask, public.cmnttype, public.comment WHERE ((((comment.comment_source = 'TA'::text) AND (prj.prj_id = prjtask.prjtask_prj_id)) AND (comment.comment_source_id = prjtask.prjtask_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); ALTER TABLE api.taskcomment OWNER TO admin; -- -- Name: VIEW taskcomment; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW taskcomment IS 'Task Comment'; -- -- Name: todo; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW todo AS SELECT todoitem.todoitem_id AS task_number, todoitem.todoitem_owner_username AS owner, todoitem.todoitem_username AS assigned_to, todoitem.todoitem_name AS task_name, incdtpriority.incdtpriority_name AS priority, incdt.incdt_number AS incident, ophead.ophead_name AS opportunity, crmacct.crmacct_number AS account, public.formatdate(todoitem.todoitem_due_date) AS date_due, public.formatdate(todoitem.todoitem_assigned_date) AS date_assigned, public.formatdate(todoitem.todoitem_start_date) AS date_started, public.formatdate(todoitem.todoitem_completed_date) AS date_completed, CASE WHEN (todoitem.todoitem_status = 'P'::bpchar) THEN 'Pending Input'::text WHEN (todoitem.todoitem_status = 'D'::bpchar) THEN 'Deferred'::text ELSE 'Neither'::text END AS status, todoitem.todoitem_active AS active, todoitem.todoitem_description AS description, todoitem.todoitem_notes AS notes FROM ((((public.todoitem LEFT JOIN public.incdt ON ((incdt.incdt_id = todoitem.todoitem_incdt_id))) LEFT JOIN public.ophead ON ((ophead.ophead_id = todoitem.todoitem_ophead_id))) LEFT JOIN public.crmacct ON ((crmacct.crmacct_id = todoitem.todoitem_crmacct_id))) LEFT JOIN public.incdtpriority ON ((incdtpriority.incdtpriority_id = todoitem.todoitem_priority_id))); ALTER TABLE api.todo OWNER TO admin; -- -- Name: VIEW todo; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW todo IS 'To-Do List'; SET search_path = public, pg_catalog; -- -- Name: vendtype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE vendtype ( vendtype_id integer NOT NULL, vendtype_code text NOT NULL, vendtype_descrip text, CONSTRAINT vendtype_vendtype_code_check CHECK ((vendtype_code <> ''::text)) ); ALTER TABLE public.vendtype OWNER TO admin; -- -- Name: TABLE vendtype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE vendtype IS 'Vendor Type information'; SET search_path = api, pg_catalog; -- -- Name: vendor; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW vendor AS SELECT (vendinfo.vend_number)::character varying AS vendor_number, vendtype.vendtype_code AS vendor_type, vendinfo.vend_name AS vendor_name, vendinfo.vend_active AS active, vendinfo.vend_accntnum AS account_number, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postalcode, addr.addr_country AS country, ''::text AS address_change, terms.terms_code AS default_terms, vendinfo.vend_shipvia AS ship_via, curr_symbol.curr_abbr AS default_currency, CASE WHEN (vendinfo.vend_fobsource = 'W'::bpchar) THEN 'Receiving Site'::text ELSE vendinfo.vend_fob END AS default_fob, vendinfo.vend_po AS sells_purchase_order_items, vendinfo.vend_restrictpurch AS may_only_sell_item_source, vendinfo.vend_qualified AS qualified, vendinfo.vend_match AS matching_vo_po_amounts, vendinfo.vend_1099 AS receives_1099, taxzone.taxzone_code AS default_tax_zone, CASE WHEN (accnt.accnt_id IS NULL) THEN 'N/A'::text ELSE public.formatglaccount(accnt.accnt_id) END AS default_dist_gl_account, CASE WHEN (expcat.expcat_id IS NULL) THEN 'N/A'::text ELSE expcat.expcat_code END AS default_dist_expense_category, CASE WHEN (tax.tax_id IS NULL) THEN 'N/A'::text ELSE tax.tax_code END AS default_dist_tax_code, c1.cntct_number AS contact1_number, c1.cntct_honorific AS contact1_honorific, c1.cntct_first_name AS contact1_first, c1.cntct_middle AS contact1_middle, c1.cntct_last_name AS contact1_last, c1.cntct_suffix AS contact1_suffix, c1.cntct_title AS contact1_job_title, c1.cntct_phone AS contact1_voice, c1.cntct_phone2 AS contact1_alternate, c1.cntct_fax AS contact1_fax, c1.cntct_email AS contact1_email, c1.cntct_webaddr AS contact1_web, ''::text AS contact1_change, c2.cntct_number AS contact2_number, c2.cntct_honorific AS contact2_honorific, c2.cntct_first_name AS contact2_first, c2.cntct_middle AS contact2_middle, c2.cntct_last_name AS contact2_last, c2.cntct_suffix AS contact2_suffix, c2.cntct_title AS contact2_job_title, c2.cntct_phone AS contact2_voice, c2.cntct_phone2 AS contact2_alternate, c2.cntct_fax AS contact2_fax, c2.cntct_email AS contact2_email, c2.cntct_webaddr AS contact2_web, ''::text AS contact2_change, vendinfo.vend_comments AS notes, vendinfo.vend_pocomments AS po_comments, vendinfo.vend_emailpodelivery AS allow_email_po_delivery, vendinfo.vend_ediemail AS po_edi_email, vendinfo.vend_edicc AS po_edi_cc, vendinfo.vend_edisubject AS po_edi_subject, vendinfo.vend_edifilename AS po_edi_filename, vendinfo.vend_ediemailbody AS po_edi_emailbody FROM ((((((((((public.vendinfo LEFT JOIN public.addr ON ((vendinfo.vend_addr_id = addr.addr_id))) LEFT JOIN public.cntct c1 ON ((vendinfo.vend_cntct1_id = c1.cntct_id))) LEFT JOIN public.cntct c2 ON ((vendinfo.vend_cntct2_id = c2.cntct_id))) LEFT JOIN public.taxzone ON ((vendinfo.vend_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.curr_symbol ON ((vendinfo.vend_curr_id = curr_symbol.curr_id))) LEFT JOIN public.terms ON ((vendinfo.vend_terms_id = terms.terms_id))) LEFT JOIN public.vendtype ON ((vendinfo.vend_vendtype_id = vendtype.vendtype_id))) LEFT JOIN public.accnt ON ((vendinfo.vend_accnt_id = accnt.accnt_id))) LEFT JOIN public.expcat ON ((vendinfo.vend_expcat_id = expcat.expcat_id))) LEFT JOIN public.tax ON ((vendinfo.vend_tax_id = tax.tax_id))) ORDER BY vendinfo.vend_number; ALTER TABLE api.vendor OWNER TO admin; -- -- Name: VIEW vendor; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW vendor IS 'vendor'; -- -- Name: vendoraddress; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW vendoraddress AS SELECT (vendinfo.vend_number)::character varying AS vendor_number, vendinfo.vend_name AS vendor_name, (vendaddrinfo.vendaddr_code)::character varying AS vendor_address_number, vendaddrinfo.vendaddr_name AS vendor_address_name, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postalcode, addr.addr_country AS country, ''::text AS address_change, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS contact_honorific, cntct.cntct_first_name AS contact_first, cntct.cntct_middle AS contact_middle, cntct.cntct_last_name AS contact_last, cntct.cntct_suffix AS contact_suffix, cntct.cntct_title AS contact_job_title, cntct.cntct_phone AS contact_voice, cntct.cntct_phone2 AS contact_alternate, cntct.cntct_fax AS contact_fax, cntct.cntct_email AS contact_email, cntct.cntct_webaddr AS contact_web, ''::text AS contact_change, vendaddrinfo.vendaddr_comments AS notes FROM (((public.vendaddrinfo LEFT JOIN public.vendinfo ON ((vendinfo.vend_id = vendaddrinfo.vendaddr_vend_id))) LEFT JOIN public.addr ON ((vendaddrinfo.vendaddr_addr_id = addr.addr_id))) LEFT JOIN public.cntct ON ((vendaddrinfo.vendaddr_cntct_id = cntct.cntct_id))) ORDER BY vendaddrinfo.vendaddr_code; ALTER TABLE api.vendoraddress OWNER TO admin; -- -- Name: VIEW vendoraddress; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW vendoraddress IS 'vendor address'; -- -- Name: vendortype; Type: VIEW; Schema: api; Owner: admin -- CREATE VIEW vendortype AS SELECT (vendtype.vendtype_code)::character varying AS code, vendtype.vendtype_descrip AS description FROM public.vendtype ORDER BY vendtype.vendtype_code; ALTER TABLE api.vendortype OWNER TO admin; -- -- Name: VIEW vendortype; Type: COMMENT; Schema: api; Owner: admin -- COMMENT ON VIEW vendortype IS 'Vendor Type'; SET search_path = public, pg_catalog; -- -- Name: cmd; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cmd ( cmd_id integer NOT NULL, cmd_module text NOT NULL, cmd_title text NOT NULL, cmd_descrip text, cmd_privname text, cmd_executable text NOT NULL, cmd_name text ); ALTER TABLE public.cmd OWNER TO admin; -- -- Name: TABLE cmd; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cmd IS 'Custom menu command table.'; -- -- Name: cmd_cmd_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cmd_cmd_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cmd_cmd_id_seq OWNER TO admin; -- -- Name: cmd_cmd_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cmd_cmd_id_seq OWNED BY cmd.cmd_id; -- -- Name: cmd_cmd_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cmd_cmd_id_seq', 16, true); -- -- Name: cmd_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cmd ALTER COLUMN cmd_id SET DEFAULT nextval('cmd_cmd_id_seq'::regclass); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgcmd; Type: TABLE; Schema: fixcountry; Owner: admin; Tablespace: -- CREATE TABLE pkgcmd ( cmd_id integer DEFAULT nextval('public.cmd_cmd_id_seq'::regclass) ) INHERITS (public.cmd); ALTER TABLE fixcountry.pkgcmd OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: cmdarg; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cmdarg ( cmdarg_id integer NOT NULL, cmdarg_cmd_id integer NOT NULL, cmdarg_order integer NOT NULL, cmdarg_arg text NOT NULL ); ALTER TABLE public.cmdarg OWNER TO admin; -- -- Name: TABLE cmdarg; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cmdarg IS 'Command argument for custom menu command table.'; -- -- Name: cmdarg_cmdarg_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cmdarg_cmdarg_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cmdarg_cmdarg_id_seq OWNER TO admin; -- -- Name: cmdarg_cmdarg_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cmdarg_cmdarg_id_seq OWNED BY cmdarg.cmdarg_id; -- -- Name: cmdarg_cmdarg_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cmdarg_cmdarg_id_seq', 14, true); -- -- Name: cmdarg_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cmdarg ALTER COLUMN cmdarg_id SET DEFAULT nextval('cmdarg_cmdarg_id_seq'::regclass); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgcmdarg; Type: TABLE; Schema: fixcountry; Owner: admin; Tablespace: -- CREATE TABLE pkgcmdarg ( cmdarg_id integer DEFAULT nextval('public.cmdarg_cmdarg_id_seq'::regclass) ) INHERITS (public.cmdarg); ALTER TABLE fixcountry.pkgcmdarg OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: image_image_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE image_image_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.image_image_id_seq OWNER TO admin; -- -- Name: image_image_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('image_image_id_seq', 6645, true); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgimage; Type: TABLE; Schema: fixcountry; Owner: admin; Tablespace: -- CREATE TABLE pkgimage ( image_id integer DEFAULT nextval('public.image_image_id_seq'::regclass) ) INHERITS (public.image); ALTER TABLE fixcountry.pkgimage OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: metasql; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE metasql ( metasql_id integer NOT NULL, metasql_group text, metasql_name text, metasql_notes text, metasql_query text, metasql_lastuser text, metasql_lastupdate date, metasql_grade integer DEFAULT 0 NOT NULL ); ALTER TABLE public.metasql OWNER TO admin; -- -- Name: TABLE metasql; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE metasql IS 'MetaSQL Table'; -- -- Name: metasql_metasql_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE metasql_metasql_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.metasql_metasql_id_seq OWNER TO admin; -- -- Name: metasql_metasql_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE metasql_metasql_id_seq OWNED BY metasql.metasql_id; -- -- Name: metasql_metasql_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('metasql_metasql_id_seq', 571, true); -- -- Name: metasql_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE metasql ALTER COLUMN metasql_id SET DEFAULT nextval('metasql_metasql_id_seq'::regclass); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgmetasql; Type: TABLE; Schema: fixcountry; Owner: admin; Tablespace: -- CREATE TABLE pkgmetasql ( metasql_id integer DEFAULT nextval('public.metasql_metasql_id_seq'::regclass) ) INHERITS (public.metasql); ALTER TABLE fixcountry.pkgmetasql OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: priv; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE priv ( priv_id integer DEFAULT nextval(('priv_priv_id_seq'::text)::regclass) NOT NULL, priv_module text, priv_name text, priv_descrip text, priv_seq integer ); ALTER TABLE public.priv OWNER TO admin; -- -- Name: TABLE priv; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE priv IS 'System Privilege information'; -- -- Name: priv_priv_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE priv_priv_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.priv_priv_id_seq OWNER TO admin; -- -- Name: priv_priv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('priv_priv_id_seq', 680, true); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgpriv; Type: TABLE; Schema: fixcountry; Owner: admin; Tablespace: -- CREATE TABLE pkgpriv ( priv_id integer DEFAULT nextval('public.priv_priv_id_seq'::regclass) ) INHERITS (public.priv); ALTER TABLE fixcountry.pkgpriv OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: report; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE report ( report_id integer DEFAULT nextval(('report_report_id_seq'::text)::regclass) NOT NULL, report_name text, report_sys boolean, report_source text, report_descrip text, report_grade integer NOT NULL, report_loaddate timestamp without time zone ); ALTER TABLE public.report OWNER TO admin; -- -- Name: TABLE report; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE report IS 'Report definition information'; -- -- Name: report_report_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE report_report_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.report_report_id_seq OWNER TO admin; -- -- Name: report_report_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('report_report_id_seq', 510, true); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgreport; Type: TABLE; Schema: fixcountry; Owner: admin; Tablespace: -- CREATE TABLE pkgreport ( report_id integer DEFAULT nextval('public.report_report_id_seq'::regclass) ) INHERITS (public.report); ALTER TABLE fixcountry.pkgreport OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: script; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE script ( script_id integer NOT NULL, script_name text NOT NULL, script_order integer NOT NULL, script_enabled boolean DEFAULT false NOT NULL, script_source text NOT NULL, script_notes text ); ALTER TABLE public.script OWNER TO admin; -- -- Name: script_script_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE script_script_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.script_script_id_seq OWNER TO admin; -- -- Name: script_script_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE script_script_id_seq OWNED BY script.script_id; -- -- Name: script_script_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('script_script_id_seq', 428, true); -- -- Name: script_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE script ALTER COLUMN script_id SET DEFAULT nextval('script_script_id_seq'::regclass); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgscript; Type: TABLE; Schema: fixcountry; Owner: admin; Tablespace: -- CREATE TABLE pkgscript ( script_id integer DEFAULT nextval('public.script_script_id_seq'::regclass) ) INHERITS (public.script); ALTER TABLE fixcountry.pkgscript OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: uiform; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE uiform ( uiform_id integer NOT NULL, uiform_name text NOT NULL, uiform_order integer NOT NULL, uiform_enabled boolean DEFAULT false NOT NULL, uiform_source text NOT NULL, uiform_notes text ); ALTER TABLE public.uiform OWNER TO admin; -- -- Name: uiform_uiform_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE uiform_uiform_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.uiform_uiform_id_seq OWNER TO admin; -- -- Name: uiform_uiform_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE uiform_uiform_id_seq OWNED BY uiform.uiform_id; -- -- Name: uiform_uiform_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('uiform_uiform_id_seq', 205, true); -- -- Name: uiform_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE uiform ALTER COLUMN uiform_id SET DEFAULT nextval('uiform_uiform_id_seq'::regclass); SET search_path = fixcountry, pg_catalog; -- -- Name: pkguiform; Type: TABLE; Schema: fixcountry; Owner: admin; Tablespace: -- CREATE TABLE pkguiform ( uiform_id integer DEFAULT nextval('public.uiform_uiform_id_seq'::regclass) ) INHERITS (public.uiform); ALTER TABLE fixcountry.pkguiform OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: acalitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE acalitem ( acalitem_id integer DEFAULT nextval(('"xcalitem_xcalitem_id_seq"'::text)::regclass) NOT NULL, acalitem_calhead_id integer, acalitem_periodstart date, acalitem_periodlength integer, acalitem_name text ); ALTER TABLE public.acalitem OWNER TO admin; -- -- Name: TABLE acalitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE acalitem IS 'Absolute Calendar Item information'; -- -- Name: accnt_accnt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE accnt_accnt_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.accnt_accnt_id_seq OWNER TO admin; -- -- Name: accnt_accnt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('accnt_accnt_id_seq', 161, true); -- -- Name: addr_addr_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE addr_addr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.addr_addr_id_seq OWNER TO admin; -- -- Name: addr_addr_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE addr_addr_id_seq OWNED BY addr.addr_id; -- -- Name: addr_addr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('addr_addr_id_seq', 45, true); -- -- Name: address; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW address AS SELECT addresses.addr_id, addresses.addr_active, addresses.addr_line1, addresses.addr_line2, addresses.addr_line3, addresses.addr_city, addresses.addr_state, addresses.addr_postalcode, addresses.addr_country, addresses.addr_notes, addresses.addr_number, addresses.crmacct_id, addresses.crmacct_number, addresses.crmacct_name FROM ((((SELECT base.addr_id, base.addr_active, base.addr_line1, base.addr_line2, base.addr_line3, base.addr_city, base.addr_state, base.addr_postalcode, base.addr_country, base.addr_notes, base.addr_number, base.crmacct_id, base.crmacct_number, base.crmacct_name FROM ((((SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, COALESCE(crmacct.crmacct_id, (-1)) AS crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr LEFT JOIN cntct ON ((cntct.cntct_addr_id = addr.addr_id))) LEFT JOIN crmacct ON ((crmacct.crmacct_id = cntct.cntct_crmacct_id))) EXCEPT SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, (-1), NULL::unknown, NULL::unknown FROM ((addr JOIN vendinfo ON ((vendinfo.vend_addr_id = addr.addr_id))) JOIN crmacct ON ((vendinfo.vend_id = crmacct.crmacct_vend_id)))) EXCEPT SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, (-1), NULL::unknown, NULL::unknown FROM ((addr JOIN vendaddrinfo ON ((vendaddrinfo.vendaddr_addr_id = addr.addr_id))) JOIN crmacct ON ((vendaddrinfo.vendaddr_vend_id = crmacct.crmacct_vend_id)))) EXCEPT SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, (-1), NULL::unknown, NULL::unknown FROM ((addr JOIN taxauth ON ((taxauth.taxauth_addr_id = addr.addr_id))) JOIN crmacct ON ((taxauth.taxauth_id = crmacct.crmacct_taxauth_id)))) EXCEPT SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, (-1), NULL::unknown, NULL::unknown FROM ((addr JOIN shiptoinfo ON ((shiptoinfo.shipto_addr_id = addr.addr_id))) JOIN crmacct ON ((shiptoinfo.shipto_cust_id = crmacct.crmacct_cust_id)))) base UNION SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, crmacct.crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr JOIN vendinfo ON ((vendinfo.vend_addr_id = addr.addr_id))) JOIN crmacct ON ((vendinfo.vend_id = crmacct.crmacct_vend_id)))) UNION SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, crmacct.crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr JOIN vendaddrinfo ON ((vendaddrinfo.vendaddr_addr_id = addr.addr_id))) JOIN crmacct ON ((vendaddrinfo.vendaddr_vend_id = crmacct.crmacct_vend_id)))) UNION SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, crmacct.crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr JOIN taxauth ON ((taxauth.taxauth_addr_id = addr.addr_id))) JOIN crmacct ON ((taxauth.taxauth_id = crmacct.crmacct_taxauth_id)))) UNION SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, crmacct.crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr JOIN shiptoinfo ON ((shiptoinfo.shipto_addr_id = addr.addr_id))) JOIN crmacct ON ((shiptoinfo.shipto_cust_id = crmacct.crmacct_cust_id)))) addresses ORDER BY addresses.addr_country, addresses.addr_state, addresses.addr_postalcode, addresses.addr_line1, addresses.addr_line2, addresses.addr_line3; ALTER TABLE public.address OWNER TO admin; -- -- Name: alarm; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE alarm ( alarm_id integer NOT NULL, alarm_number text NOT NULL, alarm_event boolean DEFAULT false NOT NULL, alarm_email boolean DEFAULT false NOT NULL, alarm_sysmsg boolean DEFAULT false NOT NULL, alarm_trigger timestamp with time zone, alarm_time timestamp with time zone, alarm_time_offset integer, alarm_time_qualifier text, alarm_creator text, alarm_event_recipient text, alarm_email_recipient text, alarm_sysmsg_recipient text, alarm_source text, alarm_source_id integer ); ALTER TABLE public.alarm OWNER TO admin; -- -- Name: TABLE alarm; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE alarm IS 'This table is the open alarms.'; -- -- Name: alarm_alarm_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE alarm_alarm_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.alarm_alarm_id_seq OWNER TO admin; -- -- Name: alarm_alarm_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE alarm_alarm_id_seq OWNED BY alarm.alarm_id; -- -- Name: alarm_alarm_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('alarm_alarm_id_seq', 1, true); -- -- Name: apaccnt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE apaccnt ( apaccnt_id integer NOT NULL, apaccnt_vendtype_id integer, apaccnt_vendtype text, apaccnt_ap_accnt_id integer NOT NULL, apaccnt_prepaid_accnt_id integer, apaccnt_discount_accnt_id integer ); ALTER TABLE public.apaccnt OWNER TO admin; -- -- Name: TABLE apaccnt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE apaccnt IS 'Accounts Payable (A/P) Account assignment information'; -- -- Name: apaccnt_apaccnt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE apaccnt_apaccnt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.apaccnt_apaccnt_id_seq OWNER TO admin; -- -- Name: apaccnt_apaccnt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE apaccnt_apaccnt_id_seq OWNED BY apaccnt.apaccnt_id; -- -- Name: apaccnt_apaccnt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('apaccnt_apaccnt_id_seq', 20, true); -- -- Name: apapply; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE apapply ( apapply_id integer NOT NULL, apapply_vend_id integer, apapply_postdate date, apapply_username text, apapply_source_apopen_id integer, apapply_source_doctype text, apapply_source_docnumber text, apapply_target_apopen_id integer, apapply_target_doctype text, apapply_target_docnumber text, apapply_journalnumber integer, apapply_amount numeric(20,2), apapply_curr_id integer DEFAULT basecurrid(), apapply_target_paid numeric(20,2), apapply_checkhead_id integer ); ALTER TABLE public.apapply OWNER TO admin; -- -- Name: TABLE apapply; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE apapply IS 'Applications (e.g., Payments, A/P Credit Memos) made to Accounts Payable (A/P) Documents'; -- -- Name: COLUMN apapply.apapply_source_apopen_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN apapply.apapply_source_apopen_id IS 'If apapply_source_doctype is "C" (credit memo) then apapply_source_apopen_id acts as a foreign key to the apopen table. If the source doctype is "K" (check) then the apapply_source_apopen_id acts as a foreign key to the checkhead table. If the apapply_source_apopen_id is -1 then the internal id of the source document is not known (always the case for checks posted before release 3.2.0BETA).'; -- -- Name: apapply_apapply_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE apapply_apapply_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.apapply_apapply_id_seq OWNER TO admin; -- -- Name: apapply_apapply_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE apapply_apapply_id_seq OWNED BY apapply.apapply_id; -- -- Name: apapply_apapply_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('apapply_apapply_id_seq', 192, true); -- -- Name: checkhead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE checkhead ( checkhead_id integer NOT NULL, checkhead_recip_id integer NOT NULL, checkhead_recip_type text NOT NULL, checkhead_bankaccnt_id integer NOT NULL, checkhead_printed boolean DEFAULT false NOT NULL, checkhead_checkdate date NOT NULL, checkhead_number integer NOT NULL, checkhead_amount numeric(20,2) NOT NULL, checkhead_void boolean DEFAULT false NOT NULL, checkhead_replaced boolean DEFAULT false NOT NULL, checkhead_posted boolean DEFAULT false NOT NULL, checkhead_rec boolean DEFAULT false NOT NULL, checkhead_misc boolean DEFAULT false NOT NULL, checkhead_expcat_id integer, checkhead_for text NOT NULL, checkhead_notes text NOT NULL, checkhead_journalnumber integer, checkhead_curr_id integer DEFAULT basecurrid() NOT NULL, checkhead_deleted boolean DEFAULT false NOT NULL, checkhead_ach_batch text, checkhead_curr_rate numeric NOT NULL, CONSTRAINT checkhead_checkhead_amount_check CHECK ((checkhead_amount > (0)::numeric)), CONSTRAINT checkhead_checkhead_recip_type_check CHECK ((((checkhead_recip_type = 'C'::text) OR (checkhead_recip_type = 'V'::text)) OR (checkhead_recip_type = 'T'::text))) ); ALTER TABLE public.checkhead OWNER TO admin; -- -- Name: TABLE checkhead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE checkhead IS 'Accounts Payable Check Information'; -- -- Name: apchk; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW apchk AS SELECT checkhead.checkhead_id AS apchk_id, checkhead.checkhead_recip_id AS apchk_vend_id, checkhead.checkhead_bankaccnt_id AS apchk_bankaccnt_id, checkhead.checkhead_printed AS apchk_printed, checkhead.checkhead_checkdate AS apchk_checkdate, checkhead.checkhead_number AS apchk_number, checkhead.checkhead_amount AS apchk_amount, checkhead.checkhead_void AS apchk_void, checkhead.checkhead_replaced AS apchk_replaced, checkhead.checkhead_posted AS apchk_posted, checkhead.checkhead_rec AS apchk_rec, checkhead.checkhead_misc AS apchk_misc, checkhead.checkhead_expcat_id AS apchk_expcat_id, checkhead.checkhead_for AS apchk_for, checkhead.checkhead_notes AS apchk_notes, checkhead.checkhead_journalnumber AS apchk_journalnumber, checkhead.checkhead_curr_id AS apchk_curr_id, checkhead.checkhead_deleted AS apchk_deleted FROM checkhead WHERE (checkhead.checkhead_recip_type = 'V'::text); ALTER TABLE public.apchk OWNER TO admin; -- -- Name: checkitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE checkitem ( checkitem_id integer NOT NULL, checkitem_checkhead_id integer NOT NULL, checkitem_amount numeric(20,2) DEFAULT 0.0 NOT NULL, checkitem_discount numeric(20,2) DEFAULT 0.0 NOT NULL, checkitem_ponumber text, checkitem_vouchernumber text, checkitem_invcnumber text, checkitem_apopen_id integer, checkitem_aropen_id integer, checkitem_docdate date, checkitem_curr_id integer DEFAULT basecurrid() NOT NULL, checkitem_cmnumber text, checkitem_ranumber text, checkitem_curr_rate numeric, CONSTRAINT checkitem_check CHECK ((NOT ((checkitem_apopen_id IS NOT NULL) AND (checkitem_aropen_id IS NOT NULL)))) ); ALTER TABLE public.checkitem OWNER TO admin; -- -- Name: TABLE checkitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE checkitem IS 'Accounts Payable Check Line Item Information'; -- -- Name: apchkitem; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW apchkitem AS SELECT checkitem.checkitem_id AS apchkitem_id, checkitem.checkitem_checkhead_id AS apchkitem_apchk_id, checkitem.checkitem_vouchernumber AS apchkitem_vouchernumber, checkitem.checkitem_ponumber AS apchkitem_ponumber, checkitem.checkitem_amount AS apchkitem_amount, checkitem.checkitem_invcnumber AS apchkitem_invcnumber, checkitem.checkitem_apopen_id AS apchkitem_apopen_id, checkitem.checkitem_docdate AS apchkitem_docdate, checkitem.checkitem_curr_id AS apchkitem_curr_id, checkitem.checkitem_discount AS apchkitem_discount FROM checkhead, checkitem WHERE ((checkitem.checkitem_checkhead_id = checkhead.checkhead_id) AND (checkhead.checkhead_recip_type = 'V'::text)); ALTER TABLE public.apchkitem OWNER TO admin; -- -- Name: apcreditapply; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE apcreditapply ( apcreditapply_id integer NOT NULL, apcreditapply_source_apopen_id integer, apcreditapply_target_apopen_id integer, apcreditapply_amount numeric(20,2), apcreditapply_curr_id integer DEFAULT basecurrid() ); ALTER TABLE public.apcreditapply OWNER TO admin; -- -- Name: TABLE apcreditapply; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE apcreditapply IS 'Temporary table for storing details of Accounts Payable (A/P) Credit Memo applications before those applications are posted'; -- -- Name: apcreditapply_apcreditapply_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE apcreditapply_apcreditapply_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.apcreditapply_apcreditapply_id_seq OWNER TO admin; -- -- Name: apcreditapply_apcreditapply_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE apcreditapply_apcreditapply_id_seq OWNED BY apcreditapply.apcreditapply_id; -- -- Name: apcreditapply_apcreditapply_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('apcreditapply_apcreditapply_id_seq', 69, true); -- -- Name: apmemo; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW apmemo AS SELECT apopen.apopen_id, apopen.apopen_docnumber FROM apopen WHERE (apopen.apopen_doctype = ANY (ARRAY['D'::bpchar, 'C'::bpchar])); ALTER TABLE public.apmemo OWNER TO admin; -- -- Name: apopen_apopen_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE apopen_apopen_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.apopen_apopen_id_seq OWNER TO admin; -- -- Name: apopen_apopen_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('apopen_apopen_id_seq', 262, true); -- -- Name: apopentax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE apopentax ( ) INHERITS (taxhist); ALTER TABLE public.apopentax OWNER TO admin; -- -- Name: apselect; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE apselect ( apselect_id integer NOT NULL, apselect_apopen_id integer NOT NULL, apselect_amount numeric(20,2) NOT NULL, apselect_bankaccnt_id integer, apselect_curr_id integer DEFAULT basecurrid(), apselect_date date, apselect_discount numeric(20,2) DEFAULT 0.0 NOT NULL ); ALTER TABLE public.apselect OWNER TO admin; -- -- Name: TABLE apselect; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE apselect IS 'Temporary table for storing details of Accounts Payable (A/P) Payment selections'; -- -- Name: apselect_apselect_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE apselect_apselect_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.apselect_apselect_id_seq OWNER TO admin; -- -- Name: apselect_apselect_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE apselect_apselect_id_seq OWNED BY apselect.apselect_id; -- -- Name: apselect_apselect_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('apselect_apselect_id_seq', 629, true); -- -- Name: araccnt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE araccnt ( araccnt_id integer DEFAULT nextval(('araccnt_araccnt_id_seq'::text)::regclass) NOT NULL, araccnt_custtype_id integer, araccnt_custtype text, araccnt_freight_accnt_id integer, araccnt_ar_accnt_id integer, araccnt_prepaid_accnt_id integer, araccnt_deferred_accnt_id integer, araccnt_discount_accnt_id integer ); ALTER TABLE public.araccnt OWNER TO admin; -- -- Name: TABLE araccnt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE araccnt IS 'Accounts Receivable (A/R) Account assignment information'; -- -- Name: araccnt_araccnt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE araccnt_araccnt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.araccnt_araccnt_id_seq OWNER TO admin; -- -- Name: araccnt_araccnt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('araccnt_araccnt_id_seq', 38, true); -- -- Name: arapply; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE arapply ( arapply_id integer NOT NULL, arapply_postdate date, arapply_cust_id integer, arapply_source_doctype text, arapply_source_docnumber text, arapply_target_doctype text, arapply_target_docnumber text, arapply_fundstype text, arapply_refnumber text, arapply_applied numeric(20,2), arapply_closed boolean, arapply_journalnumber text, arapply_source_aropen_id integer, arapply_target_aropen_id integer, arapply_username text, arapply_curr_id integer DEFAULT basecurrid(), arapply_distdate date NOT NULL, arapply_target_paid numeric(20,2), arapply_reftype text, arapply_ref_id integer ); ALTER TABLE public.arapply OWNER TO admin; -- -- Name: TABLE arapply; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE arapply IS 'Applications (e.g., Cash Receipts, A/R Credit Memos) made to Accounts Receivable (A/R) Documents'; -- -- Name: arapply_arapply_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE arapply_arapply_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.arapply_arapply_id_seq OWNER TO admin; -- -- Name: arapply_arapply_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE arapply_arapply_id_seq OWNED BY arapply.arapply_id; -- -- Name: arapply_arapply_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('arapply_arapply_id_seq', 166, true); -- -- Name: cashrcptitem_cashrcptitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cashrcptitem_cashrcptitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cashrcptitem_cashrcptitem_id_seq OWNER TO admin; -- -- Name: cashrcptitem_cashrcptitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cashrcptitem_cashrcptitem_id_seq OWNED BY cashrcptitem.cashrcptitem_id; -- -- Name: cashrcptitem_cashrcptitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cashrcptitem_cashrcptitem_id_seq', 318, true); -- -- Name: arcreditapply; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE arcreditapply ( arcreditapply_id integer DEFAULT nextval('cashrcptitem_cashrcptitem_id_seq'::regclass) NOT NULL, arcreditapply_source_aropen_id integer, arcreditapply_target_aropen_id integer, arcreditapply_amount numeric(20,2), arcreditapply_curr_id integer DEFAULT basecurrid(), arcreditapply_reftype text, arcreditapply_ref_id integer ); ALTER TABLE public.arcreditapply OWNER TO admin; -- -- Name: TABLE arcreditapply; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE arcreditapply IS 'Temporary table for storing details of Accounts Receivable (A/R) Credit Memo applications before those applications are posted'; -- -- Name: arcreditapply_arcreditapply_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE arcreditapply_arcreditapply_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.arcreditapply_arcreditapply_id_seq OWNER TO admin; -- -- Name: arcreditapply_arcreditapply_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE arcreditapply_arcreditapply_id_seq OWNED BY arcreditapply.arcreditapply_id; -- -- Name: arcreditapply_arcreditapply_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('arcreditapply_arcreditapply_id_seq', 48, true); -- -- Name: armemo; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW armemo AS SELECT aropen.aropen_id, aropen.aropen_docnumber FROM aropen WHERE (aropen.aropen_doctype = ANY (ARRAY['D'::bpchar, 'C'::bpchar, 'R'::bpchar])) UNION SELECT cmhead.cmhead_id AS aropen_id, cmhead.cmhead_number AS aropen_docnumber FROM cmhead; ALTER TABLE public.armemo OWNER TO admin; -- -- Name: aropen_aropen_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE aropen_aropen_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.aropen_aropen_id_seq OWNER TO admin; -- -- Name: aropen_aropen_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('aropen_aropen_id_seq', 452, true); -- -- Name: aropentax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE aropentax ( ) INHERITS (taxhist); ALTER TABLE public.aropentax OWNER TO admin; -- -- Name: asohist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE asohist ( asohist_id integer NOT NULL, asohist_cust_id integer, asohist_itemsite_id integer, asohist_shipdate date, asohist_invcdate date, asohist_duedate date, asohist_promisedate date, asohist_ordernumber text, asohist_invcnumber text, asohist_qtyshipped numeric(18,6), asohist_unitprice numeric(16,4), asohist_unitcost numeric(16,6), asohist_billtoname text, asohist_billtoaddress1 text, asohist_billtoaddress2 text, asohist_billtoaddress3 text, asohist_billtocity text, asohist_billtostate text, asohist_billtozip text, asohist_shiptoname text, asohist_shiptoaddress1 text, asohist_shiptoaddress2 text, asohist_shiptoaddress3 text, asohist_shiptocity text, asohist_shiptostate text, asohist_shiptozip text, asohist_shipto_id integer, asohist_shipvia text, asohist_salesrep_id integer, asohist_misc_type character(1), asohist_misc_descrip text, asohist_misc_id integer, asohist_commission numeric(16,4), asohist_commissionpaid boolean, asohist_doctype text, asohist_orderdate date, asohist_imported boolean, asohist_ponumber text, asohist_curr_id integer DEFAULT basecurrid(), asohist_taxtype_id integer, asohist_taxzone_id integer ); ALTER TABLE public.asohist OWNER TO admin; -- -- Name: TABLE asohist; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE asohist IS 'Archived Sales history'; -- -- Name: asohist_asohist_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE asohist_asohist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.asohist_asohist_id_seq OWNER TO admin; -- -- Name: asohist_asohist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE asohist_asohist_id_seq OWNED BY asohist.asohist_id; -- -- Name: asohist_asohist_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('asohist_asohist_id_seq', 1, false); -- -- Name: asohisttax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE asohisttax ( ) INHERITS (taxhist); ALTER TABLE public.asohisttax OWNER TO admin; -- -- Name: atlasmap; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE atlasmap ( atlasmap_id integer NOT NULL, atlasmap_name text NOT NULL, atlasmap_filter text NOT NULL, atlasmap_filtertype text NOT NULL, atlasmap_atlas text NOT NULL, atlasmap_map text NOT NULL, atlasmap_headerline boolean DEFAULT false NOT NULL, CONSTRAINT atlasmap_atlasmap_name_check CHECK ((atlasmap_name <> ''::text)) ); ALTER TABLE public.atlasmap OWNER TO admin; -- -- Name: TABLE atlasmap; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE atlasmap IS 'Describes heuristics for finding a CSVImp atlas for a given CSV file. When looking for a CSV Atlas to use when importing a CSV file, the first atlasmap record found that matches the CSV file is used to select the Atlas file and Map in that Atlas to import the CSV file.'; -- -- Name: COLUMN atlasmap.atlasmap_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN atlasmap.atlasmap_id IS 'The internal id of this CSVImp atlas mapping.'; -- -- Name: COLUMN atlasmap.atlasmap_name; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN atlasmap.atlasmap_name IS 'The human-readable name of this atlas mapping.'; -- -- Name: COLUMN atlasmap.atlasmap_filter; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN atlasmap.atlasmap_filter IS 'A regular expression that should match the CSV file. Which part of the file that matches is determined by the filter type.'; -- -- Name: COLUMN atlasmap.atlasmap_filtertype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN atlasmap.atlasmap_filtertype IS 'A description of what aspect of the CSV file the filter should be compared with. Handled values are: ''filename'' - the filter is matched against the name of the file; and ''firstline'' - the filter is matched against the first line of the file contents.'; -- -- Name: COLUMN atlasmap.atlasmap_atlas; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN atlasmap.atlasmap_atlas IS 'The name of the CSVImp Atlas file. This should be a simple pathname, not an absolute or relative name if possible. The full path will be determined by concatenating the operating-system-specific CSV Atlas default directory with the value here unless this is an absolute pathname.'; -- -- Name: COLUMN atlasmap.atlasmap_map; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN atlasmap.atlasmap_map IS 'The name of the Map inside the Atlas to use if the filter and filter type match the CVS file.'; -- -- Name: COLUMN atlasmap.atlasmap_headerline; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN atlasmap.atlasmap_headerline IS 'An indicator of whether the first line of the CSV file should be treated as a header line or as data.'; -- -- Name: atlasmap_atlasmap_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE atlasmap_atlasmap_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.atlasmap_atlasmap_id_seq OWNER TO admin; -- -- Name: atlasmap_atlasmap_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE atlasmap_atlasmap_id_seq OWNED BY atlasmap.atlasmap_id; -- -- Name: atlasmap_atlasmap_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('atlasmap_atlasmap_id_seq', 1, false); -- -- Name: backup_usr; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE backup_usr ( usr_id integer, usr_username text, usr_propername text, usr_passwd text, usr_locale_id integer, usr_initials text, usr_agent boolean, usr_active boolean, usr_email text, usr_dept_id integer, usr_shift_id integer, usr_window text ); ALTER TABLE public.backup_usr OWNER TO admin; -- -- Name: bankaccnt_bankaccnt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bankaccnt_bankaccnt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.bankaccnt_bankaccnt_id_seq OWNER TO admin; -- -- Name: bankaccnt_bankaccnt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE bankaccnt_bankaccnt_id_seq OWNED BY bankaccnt.bankaccnt_id; -- -- Name: bankaccnt_bankaccnt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bankaccnt_bankaccnt_id_seq', 15, true); -- -- Name: bankadj; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bankadj ( bankadj_id integer NOT NULL, bankadj_bankaccnt_id integer NOT NULL, bankadj_bankadjtype_id integer NOT NULL, bankadj_created timestamp without time zone DEFAULT now() NOT NULL, bankadj_username text DEFAULT geteffectivextuser() NOT NULL, bankadj_date date NOT NULL, bankadj_docnumber text, bankadj_amount numeric(10,2) NOT NULL, bankadj_notes text, bankadj_sequence integer, bankadj_posted boolean DEFAULT false NOT NULL, bankadj_curr_id integer DEFAULT basecurrid(), bankadj_curr_rate numeric ); ALTER TABLE public.bankadj OWNER TO admin; -- -- Name: TABLE bankadj; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bankadj IS 'Bank Adjustments information'; -- -- Name: bankadj_bankadj_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bankadj_bankadj_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.bankadj_bankadj_id_seq OWNER TO admin; -- -- Name: bankadj_bankadj_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE bankadj_bankadj_id_seq OWNED BY bankadj.bankadj_id; -- -- Name: bankadj_bankadj_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bankadj_bankadj_id_seq', 1, false); -- -- Name: bankadjtype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bankadjtype ( bankadjtype_id integer NOT NULL, bankadjtype_name text NOT NULL, bankadjtype_descrip text, bankadjtype_accnt_id integer NOT NULL, bankadjtype_iscredit boolean DEFAULT false NOT NULL, CONSTRAINT bankadjtype_bankadjtype_name_check CHECK ((bankadjtype_name <> ''::text)) ); ALTER TABLE public.bankadjtype OWNER TO admin; -- -- Name: TABLE bankadjtype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bankadjtype IS 'Bank Adjustment Types information'; -- -- Name: bankadjtype_bankadjtype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bankadjtype_bankadjtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.bankadjtype_bankadjtype_id_seq OWNER TO admin; -- -- Name: bankadjtype_bankadjtype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE bankadjtype_bankadjtype_id_seq OWNED BY bankadjtype.bankadjtype_id; -- -- Name: bankadjtype_bankadjtype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bankadjtype_bankadjtype_id_seq', 1, true); -- -- Name: bankrec; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bankrec ( bankrec_id integer NOT NULL, bankrec_created timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, bankrec_username text DEFAULT geteffectivextuser() NOT NULL, bankrec_bankaccnt_id integer, bankrec_opendate date, bankrec_enddate date, bankrec_openbal numeric(20,2), bankrec_endbal numeric(20,2), bankrec_posted boolean DEFAULT false, bankrec_postdate timestamp without time zone ); ALTER TABLE public.bankrec OWNER TO admin; -- -- Name: TABLE bankrec; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bankrec IS 'Bank Reconciliation posting history'; -- -- Name: bankrec_bankrec_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bankrec_bankrec_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.bankrec_bankrec_id_seq OWNER TO admin; -- -- Name: bankrec_bankrec_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE bankrec_bankrec_id_seq OWNED BY bankrec.bankrec_id; -- -- Name: bankrec_bankrec_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bankrec_bankrec_id_seq', 40, true); -- -- Name: bankrecitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bankrecitem ( bankrecitem_id integer NOT NULL, bankrecitem_bankrec_id integer NOT NULL, bankrecitem_source text NOT NULL, bankrecitem_source_id integer NOT NULL, bankrecitem_cleared boolean DEFAULT false, bankrecitem_curr_rate numeric, bankrecitem_amount numeric ); ALTER TABLE public.bankrecitem OWNER TO admin; -- -- Name: TABLE bankrecitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bankrecitem IS 'Posted Bank Reconciliation Line Item information'; -- -- Name: bankrecitem_bankrecitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bankrecitem_bankrecitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.bankrecitem_bankrecitem_id_seq OWNER TO admin; -- -- Name: bankrecitem_bankrecitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE bankrecitem_bankrecitem_id_seq OWNED BY bankrecitem.bankrecitem_id; -- -- Name: bankrecitem_bankrecitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bankrecitem_bankrecitem_id_seq', 337, true); -- -- Name: bomhead_bomhead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bomhead_bomhead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.bomhead_bomhead_id_seq OWNER TO admin; -- -- Name: bomhead_bomhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bomhead_bomhead_id_seq', 71, true); -- -- Name: bomitem_bomitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bomitem_bomitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.bomitem_bomitem_id_seq OWNER TO admin; -- -- Name: bomitem_bomitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bomitem_bomitem_id_seq', 266, true); -- -- Name: bomitemcost; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bomitemcost ( bomitemcost_id integer NOT NULL, bomitemcost_bomitem_id integer NOT NULL, bomitemcost_costelem_id integer NOT NULL, bomitemcost_lowlevel boolean DEFAULT false NOT NULL, bomitemcost_stdcost numeric(16,6) DEFAULT 0 NOT NULL, bomitemcost_posted date, bomitemcost_actcost numeric(16,6) DEFAULT 0 NOT NULL, bomitemcost_updated date, bomitemcost_curr_id integer DEFAULT basecurrid() NOT NULL ); ALTER TABLE public.bomitemcost OWNER TO admin; -- -- Name: TABLE bomitemcost; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bomitemcost IS 'Bomitem Cost information'; -- -- Name: bomitemcost_bomitemcost_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bomitemcost_bomitemcost_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.bomitemcost_bomitemcost_id_seq OWNER TO admin; -- -- Name: bomitemcost_bomitemcost_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE bomitemcost_bomitemcost_id_seq OWNED BY bomitemcost.bomitemcost_id; -- -- Name: bomitemcost_bomitemcost_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bomitemcost_bomitemcost_id_seq', 1, false); -- -- Name: bomitemsub_bomitemsub_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bomitemsub_bomitemsub_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.bomitemsub_bomitemsub_id_seq OWNER TO admin; -- -- Name: bomitemsub_bomitemsub_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE bomitemsub_bomitemsub_id_seq OWNED BY bomitemsub.bomitemsub_id; -- -- Name: bomitemsub_bomitemsub_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bomitemsub_bomitemsub_id_seq', 3, true); -- -- Name: bomwork; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE bomwork ( bomwork_id integer NOT NULL, bomwork_set_id integer, bomwork_seqnumber integer, bomwork_item_id integer, bomwork_item_type character(1), bomwork_qtyper numeric(20,8), bomwork_scrap numeric(20,10), bomwork_status character(1), bomwork_level integer, bomwork_parent_id integer, bomwork_effective date, bomwork_expires date, bomwork_stdunitcost numeric(16,6), bomwork_actunitcost numeric(16,6), bomwork_parent_seqnumber integer, bomwork_createwo boolean, bomwork_issuemethod character(1), bomwork_char_id integer, bomwork_value text, bomwork_notes text, bomwork_ref text, bomwork_bomitem_id integer, bomwork_ecn text, bomwork_qtyfxd numeric(20,8) DEFAULT 0 NOT NULL, bomwork_qtyreq numeric(20,8) DEFAULT 0 NOT NULL ); ALTER TABLE public.bomwork OWNER TO admin; -- -- Name: TABLE bomwork; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE bomwork IS 'Temporary table for storing information requested by Bill of Materials (BOM) displays and reports'; -- -- Name: COLUMN bomwork.bomwork_qtyfxd; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN bomwork.bomwork_qtyfxd IS 'The fixed quantity required'; -- -- Name: COLUMN bomwork.bomwork_qtyreq; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN bomwork.bomwork_qtyreq IS 'The total quantity required'; -- -- Name: bomwork_bomwork_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE bomwork_bomwork_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.bomwork_bomwork_id_seq OWNER TO admin; -- -- Name: bomwork_bomwork_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE bomwork_bomwork_id_seq OWNED BY bomwork.bomwork_id; -- -- Name: bomwork_bomwork_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('bomwork_bomwork_id_seq', 3872, true); -- -- Name: budget; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW budget AS SELECT budgitem.budgitem_id AS budget_id, budgitem.budgitem_period_id AS budget_period_id, budgitem.budgitem_accnt_id AS budget_accnt_id, budgitem.budgitem_amount AS budget_amount FROM budgitem; ALTER TABLE public.budget OWNER TO admin; -- -- Name: budghead_budghead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE budghead_budghead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.budghead_budghead_id_seq OWNER TO admin; -- -- Name: budghead_budghead_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE budghead_budghead_id_seq OWNED BY budghead.budghead_id; -- -- Name: budghead_budghead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('budghead_budghead_id_seq', 2, true); -- -- Name: budgitem_budgitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE budgitem_budgitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.budgitem_budgitem_id_seq OWNER TO admin; -- -- Name: budgitem_budgitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE budgitem_budgitem_id_seq OWNED BY budgitem.budgitem_id; -- -- Name: budgitem_budgitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('budgitem_budgitem_id_seq', 1, true); -- -- Name: calhead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE calhead ( calhead_id integer DEFAULT nextval(('"calhead_calhead_id_seq"'::text)::regclass) NOT NULL, calhead_type character(1), calhead_name text NOT NULL, calhead_descrip text, calhead_origin character(1), CONSTRAINT calhead_calhead_name_check CHECK ((calhead_name <> ''::text)) ); ALTER TABLE public.calhead OWNER TO admin; -- -- Name: TABLE calhead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE calhead IS 'Calendar header information'; -- -- Name: calhead_calhead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE calhead_calhead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.calhead_calhead_id_seq OWNER TO admin; -- -- Name: calhead_calhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('calhead_calhead_id_seq', 55, true); -- -- Name: carrier_carrier_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE carrier_carrier_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.carrier_carrier_id_seq OWNER TO admin; -- -- Name: carrier_carrier_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('carrier_carrier_id_seq', 16, true); -- -- Name: cashrcpt_cashrcpt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cashrcpt_cashrcpt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cashrcpt_cashrcpt_id_seq OWNER TO admin; -- -- Name: cashrcpt_cashrcpt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cashrcpt_cashrcpt_id_seq OWNED BY cashrcpt.cashrcpt_id; -- -- Name: cashrcpt_cashrcpt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cashrcpt_cashrcpt_id_seq', 252, true); -- -- Name: cashrcptmisc_cashrcptmisc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cashrcptmisc_cashrcptmisc_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cashrcptmisc_cashrcptmisc_id_seq OWNER TO admin; -- -- Name: cashrcptmisc_cashrcptmisc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cashrcptmisc_cashrcptmisc_id_seq OWNED BY cashrcptmisc.cashrcptmisc_id; -- -- Name: cashrcptmisc_cashrcptmisc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cashrcptmisc_cashrcptmisc_id_seq', 28, true); -- -- Name: ccard_ccard_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ccard_ccard_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ccard_ccard_id_seq OWNER TO admin; -- -- Name: ccard_ccard_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ccard_ccard_id_seq OWNED BY ccard.ccard_id; -- -- Name: ccard_ccard_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ccard_ccard_id_seq', 8, true); -- -- Name: ccardaud; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ccardaud ( ccardaud_id integer NOT NULL, ccardaud_ccard_id integer, ccardaud_ccard_seq_old integer, ccardaud_ccard_seq_new integer, ccardaud_ccard_cust_id_old integer, ccardaud_ccard_cust_id_new integer, ccardaud_ccard_active_old boolean, ccardaud_ccard_active_new boolean, ccardaud_ccard_name_old bytea, ccardaud_ccard_name_new bytea, ccardaud_ccard_address1_old bytea, ccardaud_ccard_address1_new bytea, ccardaud_ccard_address2_old bytea, ccardaud_ccard_address2_new bytea, ccardaud_ccard_city_old bytea, ccardaud_ccard_city_new bytea, ccardaud_ccard_state_old bytea, ccardaud_ccard_state_new bytea, ccardaud_ccard_zip_old bytea, ccardaud_ccard_zip_new bytea, ccardaud_ccard_country_old bytea, ccardaud_ccard_country_new bytea, ccardaud_ccard_number_old bytea, ccardaud_ccard_number_new bytea, ccardaud_ccard_debit_old boolean, ccardaud_ccard_debit_new boolean, ccardaud_ccard_month_expired_old bytea, ccardaud_ccard_month_expired_new bytea, ccardaud_ccard_year_expired_old bytea, ccardaud_ccard_year_expired_new bytea, ccardaud_ccard_type_old character(1), ccardaud_ccard_type_new character(1), ccardaud_ccard_last_updated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, ccardaud_ccard_last_updated_by_username text DEFAULT geteffectivextuser() NOT NULL ); ALTER TABLE public.ccardaud OWNER TO admin; -- -- Name: TABLE ccardaud; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ccardaud IS 'Credit Card Information tracking data'; -- -- Name: ccardaud_ccardaud_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ccardaud_ccardaud_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ccardaud_ccardaud_id_seq OWNER TO admin; -- -- Name: ccardaud_ccardaud_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ccardaud_ccardaud_id_seq OWNED BY ccardaud.ccardaud_id; -- -- Name: ccardaud_ccardaud_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ccardaud_ccardaud_id_seq', 20, true); -- -- Name: ccbank; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ccbank ( ccbank_id integer NOT NULL, ccbank_ccard_type text NOT NULL, ccbank_bankaccnt_id integer, CONSTRAINT ccbank_ccbank_ccard_type_check CHECK ((ccbank_ccard_type = ANY (ARRAY['A'::text, 'D'::text, 'M'::text, 'P'::text, 'V'::text]))) ); ALTER TABLE public.ccbank OWNER TO admin; -- -- Name: ccbank_ccbank_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ccbank_ccbank_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ccbank_ccbank_id_seq OWNER TO admin; -- -- Name: ccbank_ccbank_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ccbank_ccbank_id_seq OWNED BY ccbank.ccbank_id; -- -- Name: ccbank_ccbank_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ccbank_ccbank_id_seq', 5, true); -- -- Name: ccpay; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ccpay ( ccpay_id integer NOT NULL, ccpay_ccard_id integer, ccpay_cust_id integer, ccpay_amount numeric(20,2) DEFAULT 0.00 NOT NULL, ccpay_auth boolean DEFAULT true NOT NULL, ccpay_status character(1) NOT NULL, ccpay_type character(1) NOT NULL, ccpay_auth_charge character(1) NOT NULL, ccpay_order_number text, ccpay_order_number_seq integer, ccpay_r_avs text, ccpay_r_ordernum text, ccpay_r_error text, ccpay_r_approved text, ccpay_r_code text, ccpay_r_message text, ccpay_yp_r_time timestamp without time zone, ccpay_r_ref text, ccpay_yp_r_tdate text, ccpay_r_tax text, ccpay_r_shipping text, ccpay_yp_r_score integer, ccpay_transaction_datetime timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, ccpay_by_username text DEFAULT geteffectivextuser() NOT NULL, ccpay_curr_id integer DEFAULT basecurrid(), ccpay_ccpay_id integer ); ALTER TABLE public.ccpay OWNER TO admin; -- -- Name: TABLE ccpay; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ccpay IS 'Track Credit Card PAYments, although really this table tracs communications with Credit Card processing companies. Records in this table may progress from preauthorizations through captures to credits, or they may simply remain in their original state if there is no further processing.'; -- -- Name: COLUMN ccpay.ccpay_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_id IS 'Internal ID of this ccpay record.'; -- -- Name: COLUMN ccpay.ccpay_ccard_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_ccard_id IS 'Internal ID of the Credit Card used for this transaction.'; -- -- Name: COLUMN ccpay.ccpay_cust_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_cust_id IS 'Internal ID of the Customer owning the Credit Card'; -- -- Name: COLUMN ccpay.ccpay_amount; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_amount IS 'Actual amount of this transaction.'; -- -- Name: COLUMN ccpay.ccpay_auth; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_auth IS 'Boolean indicator of whether this transaction started out as a pre-authorization or not.'; -- -- Name: COLUMN ccpay.ccpay_status; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_status IS 'The status of the last attempted transaction for this record. Values include A = Authorized, C = Charged, D = Declined or otherwise rejected, V = Voided, X = Error.'; -- -- Name: COLUMN ccpay.ccpay_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_type IS 'The most recent type of transaction attempted with this record. Values include A = Authorize, C = Capture or Charge, R = cRedit, V = reVerse or Void.'; -- -- Name: COLUMN ccpay.ccpay_auth_charge; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_auth_charge IS 'The original type of transaction attempted with this record. Values are the same as for ccpay_type.'; -- -- Name: COLUMN ccpay.ccpay_order_number; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_order_number IS 'The original xTuple ERP order for which this credit card transaction applies. This will usually be either a Sales Order number or Credit Memo number.'; -- -- Name: COLUMN ccpay.ccpay_order_number_seq; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_order_number_seq IS 'A sequence number to differentiate between different transactions for the same ccpay_order_number. For example, if a Customer makes a down payment and a final payment for a single order, there will be two distinct ccpay records with the same ccpay_order_number but different ccpay_order_number_seq values (1 and 2, respectively).'; -- -- Name: COLUMN ccpay.ccpay_r_avs; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_avs IS 'The Address Verification System code returned by the credit card processing company.'; -- -- Name: COLUMN ccpay.ccpay_r_ordernum; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_ordernum IS 'A transaction ID returned by the credit card processing company to be used when referring to this transaction later. It may be used for voiding, crediting, or capturing previous transactions.'; -- -- Name: COLUMN ccpay.ccpay_r_error; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_error IS 'Error message, if any, describing why this record failed to be processed properly.'; -- -- Name: COLUMN ccpay.ccpay_r_approved; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_approved IS 'English text stating whether the transaction was approved, declined, hit an error, or was held for review. Specific values differ depending on the credit card processor.'; -- -- Name: COLUMN ccpay.ccpay_r_code; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_code IS 'The transaction Approval code returned by the credit card processor. Specific values differ depending on the credit card processor.'; -- -- Name: COLUMN ccpay.ccpay_r_message; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_message IS 'Additional text that describes the status of the transaction. This may be empty.'; -- -- Name: COLUMN ccpay.ccpay_yp_r_time; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_yp_r_time IS 'The time the transaction was posted according to the credit card processing company. May be blank.'; -- -- Name: COLUMN ccpay.ccpay_r_ref; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_ref IS 'An additional reference number assigned to this transaction by the credit card processing company.'; -- -- Name: COLUMN ccpay.ccpay_yp_r_tdate; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_yp_r_tdate IS 'The date the transaction was posted according to the credit card processing company. May be blank.'; -- -- Name: COLUMN ccpay.ccpay_r_tax; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_tax IS '[ deprecated ]'; -- -- Name: COLUMN ccpay.ccpay_r_shipping; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_r_shipping IS '[ deprecated ]'; -- -- Name: COLUMN ccpay.ccpay_yp_r_score; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_yp_r_score IS 'A potential fraud score returned by the credit card company. May be blank.'; -- -- Name: COLUMN ccpay.ccpay_transaction_datetime; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_transaction_datetime IS 'The date and time this record was created, unless explicitly set by the application.'; -- -- Name: COLUMN ccpay.ccpay_by_username; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_by_username IS 'The user who created this record, unless explicitly set by the application.'; -- -- Name: COLUMN ccpay.ccpay_curr_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_curr_id IS 'The internal ID of the currency of the ccpay_amount.'; -- -- Name: COLUMN ccpay.ccpay_ccpay_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN ccpay.ccpay_ccpay_id IS 'Foreign key to another ccpay record. This will have a value if a new ccpay record is created to record a Refund for part or all of another ccpay record.'; -- -- Name: ccpay_ccpay_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ccpay_ccpay_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ccpay_ccpay_id_seq OWNER TO admin; -- -- Name: ccpay_ccpay_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ccpay_ccpay_id_seq OWNED BY ccpay.ccpay_id; -- -- Name: ccpay_ccpay_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ccpay_ccpay_id_seq', 54, true); -- -- Name: char_char_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE char_char_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.char_char_id_seq OWNER TO admin; -- -- Name: char_char_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE char_char_id_seq OWNED BY "char".char_id; -- -- Name: char_char_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('char_char_id_seq', 24, true); -- -- Name: charass_charass_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE charass_charass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.charass_charass_id_seq OWNER TO admin; -- -- Name: charass_charass_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE charass_charass_id_seq OWNED BY charass.charass_id; -- -- Name: charass_charass_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('charass_charass_id_seq', 332, true); -- -- Name: charopt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE charopt ( charopt_id integer NOT NULL, charopt_char_id integer, charopt_value text NOT NULL, charopt_order integer DEFAULT 0 NOT NULL ); ALTER TABLE public.charopt OWNER TO admin; -- -- Name: TABLE charopt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE charopt IS 'Stores list options for characteristics'; -- -- Name: COLUMN charopt.charopt_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN charopt.charopt_id IS 'Primary key'; -- -- Name: COLUMN charopt.charopt_char_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN charopt.charopt_char_id IS 'Reference to char table'; -- -- Name: COLUMN charopt.charopt_value; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN charopt.charopt_value IS 'Option value'; -- -- Name: COLUMN charopt.charopt_order; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN charopt.charopt_order IS 'Option sort order'; -- -- Name: charopt_charopt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE charopt_charopt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.charopt_charopt_id_seq OWNER TO admin; -- -- Name: charopt_charopt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE charopt_charopt_id_seq OWNED BY charopt.charopt_id; -- -- Name: charopt_charopt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('charopt_charopt_id_seq', 1, false); -- -- Name: checkhead_checkhead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE checkhead_checkhead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.checkhead_checkhead_id_seq OWNER TO admin; -- -- Name: checkhead_checkhead_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE checkhead_checkhead_id_seq OWNED BY checkhead.checkhead_id; -- -- Name: checkhead_checkhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('checkhead_checkhead_id_seq', 225, true); -- -- Name: checkitem_checkitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE checkitem_checkitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.checkitem_checkitem_id_seq OWNER TO admin; -- -- Name: checkitem_checkitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE checkitem_checkitem_id_seq OWNED BY checkitem.checkitem_id; -- -- Name: checkitem_checkitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('checkitem_checkitem_id_seq', 390, true); -- -- Name: checkrecip; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW checkrecip AS (SELECT custinfo.cust_id AS checkrecip_id, 'C' AS checkrecip_type, custinfo.cust_number AS checkrecip_number, custinfo.cust_name AS checkrecip_name, 'A/R' AS checkrecip_gltrans_source, findaraccount(custinfo.cust_id) AS checkrecip_accnt_id, cntct.cntct_addr_id AS checkrecip_addr_id FROM (custinfo LEFT JOIN cntct ON ((custinfo.cust_cntct_id = cntct.cntct_id))) UNION ALL SELECT taxauth.taxauth_id AS checkrecip_id, 'T' AS checkrecip_type, taxauth.taxauth_code AS checkrecip_number, taxauth.taxauth_name AS checkrecip_name, 'G/L' AS checkrecip_gltrans_source, taxauth.taxauth_accnt_id AS checkrecip_accnt_id, taxauth.taxauth_addr_id AS checkrecip_addr_id FROM taxauth) UNION ALL SELECT vendinfo.vend_id AS checkrecip_id, 'V' AS checkrecip_type, vendinfo.vend_number AS checkrecip_number, vendinfo.vend_name AS checkrecip_name, 'A/P' AS checkrecip_gltrans_source, findapaccount(vendinfo.vend_id) AS checkrecip_accnt_id, vendaddrinfo.vendaddr_addr_id AS checkrecip_addr_id FROM (vendinfo LEFT JOIN vendaddrinfo ON (((vendinfo.vend_id = vendaddrinfo.vendaddr_vend_id) AND (upper(vendaddrinfo.vendaddr_code) = 'REMIT'::text)))); ALTER TABLE public.checkrecip OWNER TO admin; -- -- Name: classcode_classcode_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE classcode_classcode_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.classcode_classcode_id_seq OWNER TO admin; -- -- Name: classcode_classcode_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('classcode_classcode_id_seq', 39, true); -- -- Name: cmhead_cmhead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cmhead_cmhead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cmhead_cmhead_id_seq OWNER TO admin; -- -- Name: cmhead_cmhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cmhead_cmhead_id_seq', 209, true); -- -- Name: cmheadtax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cmheadtax ( ) INHERITS (taxhist); ALTER TABLE public.cmheadtax OWNER TO admin; -- -- Name: cmitem_cmitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cmitem_cmitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cmitem_cmitem_id_seq OWNER TO admin; -- -- Name: cmitem_cmitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cmitem_cmitem_id_seq', 84, true); -- -- Name: cmitemtax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cmitemtax ( ) INHERITS (taxhist); ALTER TABLE public.cmitemtax OWNER TO admin; -- -- Name: cmnttype_cmnttype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cmnttype_cmnttype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cmnttype_cmnttype_id_seq OWNER TO admin; -- -- Name: cmnttype_cmnttype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cmnttype_cmnttype_id_seq OWNED BY cmnttype.cmnttype_id; -- -- Name: cmnttype_cmnttype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cmnttype_cmnttype_id_seq', 10, true); -- -- Name: cmnttypesource; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cmnttypesource ( cmnttypesource_id integer NOT NULL, cmnttypesource_cmnttype_id integer, cmnttypesource_source_id integer ); ALTER TABLE public.cmnttypesource OWNER TO admin; -- -- Name: TABLE cmnttypesource; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cmnttypesource IS 'Comment Type/Source association'; -- -- Name: cmnttypesource_cmnttypesource_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cmnttypesource_cmnttypesource_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cmnttypesource_cmnttypesource_id_seq OWNER TO admin; -- -- Name: cmnttypesource_cmnttypesource_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cmnttypesource_cmnttypesource_id_seq OWNED BY cmnttypesource.cmnttypesource_id; -- -- Name: cmnttypesource_cmnttypesource_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cmnttypesource_cmnttypesource_id_seq', 162, true); -- -- Name: cntct_cntct_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cntct_cntct_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cntct_cntct_id_seq OWNER TO admin; -- -- Name: cntct_cntct_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cntct_cntct_id_seq OWNED BY cntct.cntct_id; -- -- Name: cntct_cntct_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cntct_cntct_id_seq', 36, true); -- -- Name: cntctaddr; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cntctaddr ( cntctaddr_id integer NOT NULL, cntctaddr_cntct_id integer, cntctaddr_primary boolean NOT NULL, cntctaddr_addr_id integer NOT NULL, cntctaddr_type character(2) NOT NULL ); ALTER TABLE public.cntctaddr OWNER TO admin; -- -- Name: cntctaddr_cntctaddr_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cntctaddr_cntctaddr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cntctaddr_cntctaddr_id_seq OWNER TO admin; -- -- Name: cntctaddr_cntctaddr_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cntctaddr_cntctaddr_id_seq OWNED BY cntctaddr.cntctaddr_id; -- -- Name: cntctaddr_cntctaddr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cntctaddr_cntctaddr_id_seq', 1, false); -- -- Name: cntctdata; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cntctdata ( cntctdata_id integer NOT NULL, cntctdata_cntct_id integer, cntctdata_primary boolean NOT NULL, cntctdata_text text NOT NULL, cntctdata_type character(2) NOT NULL ); ALTER TABLE public.cntctdata OWNER TO admin; -- -- Name: cntctdata_cntctdata_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cntctdata_cntctdata_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cntctdata_cntctdata_id_seq OWNER TO admin; -- -- Name: cntctdata_cntctdata_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cntctdata_cntctdata_id_seq OWNED BY cntctdata.cntctdata_id; -- -- Name: cntctdata_cntctdata_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cntctdata_cntctdata_id_seq', 1, false); -- -- Name: cntcteml; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cntcteml ( cntcteml_id integer NOT NULL, cntcteml_cntct_id integer, cntcteml_primary boolean DEFAULT false NOT NULL, cntcteml_email text NOT NULL ); ALTER TABLE public.cntcteml OWNER TO admin; -- -- Name: TABLE cntcteml; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cntcteml IS 'Stores email addresses for contacts'; -- -- Name: COLUMN cntcteml.cntcteml_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cntcteml.cntcteml_id IS 'Primary key'; -- -- Name: COLUMN cntcteml.cntcteml_cntct_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cntcteml.cntcteml_cntct_id IS 'Reference to contact table'; -- -- Name: COLUMN cntcteml.cntcteml_primary; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cntcteml.cntcteml_primary IS 'Flags whether this is the primary email address'; -- -- Name: COLUMN cntcteml.cntcteml_email; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN cntcteml.cntcteml_email IS 'Alternate information'; -- -- Name: cntcteml_cntcteml_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cntcteml_cntcteml_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.cntcteml_cntcteml_id_seq OWNER TO admin; -- -- Name: cntcteml_cntcteml_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE cntcteml_cntcteml_id_seq OWNED BY cntcteml.cntcteml_id; -- -- Name: cntcteml_cntcteml_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cntcteml_cntcteml_id_seq', 21, true); -- -- Name: cntctmrgd; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cntctmrgd ( cntctmrgd_cntct_id integer NOT NULL, cntctmrgd_error boolean DEFAULT false ); ALTER TABLE public.cntctmrgd OWNER TO admin; -- -- Name: cntctsel; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cntctsel ( cntctsel_cntct_id integer NOT NULL, cntctsel_target boolean, cntctsel_mrg_crmacct_id boolean DEFAULT false, cntctsel_mrg_addr_id boolean DEFAULT false, cntctsel_mrg_first_name boolean DEFAULT false, cntctsel_mrg_last_name boolean DEFAULT false, cntctsel_mrg_honorific boolean DEFAULT false, cntctsel_mrg_initials boolean DEFAULT false, cntctsel_mrg_phone boolean DEFAULT false, cntctsel_mrg_phone2 boolean DEFAULT false, cntctsel_mrg_fax boolean DEFAULT false, cntctsel_mrg_email boolean DEFAULT false, cntctsel_mrg_webaddr boolean DEFAULT false, cntctsel_mrg_notes boolean DEFAULT false, cntctsel_mrg_title boolean DEFAULT false, cntctsel_mrg_middle boolean DEFAULT false, cntctsel_mrg_suffix boolean DEFAULT false, cntctsel_mrg_owner_username boolean DEFAULT false ); ALTER TABLE public.cntctsel OWNER TO admin; -- -- Name: cntslip_cntslip_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cntslip_cntslip_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cntslip_cntslip_id_seq OWNER TO admin; -- -- Name: cntslip_cntslip_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cntslip_cntslip_id_seq', 97, true); -- -- Name: cobill; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cobill ( cobill_id integer DEFAULT nextval(('cobill_cobill_id_seq'::text)::regclass) NOT NULL, cobill_coitem_id integer, cobill_selectdate timestamp with time zone, cobill_qty numeric(18,6), cobill_invcnum integer, cobill_toclose boolean, cobill_cobmisc_id integer, cobill_select_username text, cobill_invcitem_id integer, cobill_taxtype_id integer ); ALTER TABLE public.cobill OWNER TO admin; -- -- Name: TABLE cobill; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cobill IS 'Billing Selection Line Item information'; -- -- Name: cobill_cobill_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cobill_cobill_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cobill_cobill_id_seq OWNER TO admin; -- -- Name: cobill_cobill_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cobill_cobill_id_seq', 664, true); -- -- Name: cobilltax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cobilltax ( ) INHERITS (taxhist); ALTER TABLE public.cobilltax OWNER TO admin; -- -- Name: cobmisc; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cobmisc ( cobmisc_id integer DEFAULT nextval(('cobmisc_cobmisc_id_seq'::text)::regclass) NOT NULL, cobmisc_cohead_id integer, cobmisc_shipvia text, cobmisc_freight numeric(16,4), cobmisc_misc numeric(16,4), cobmisc_payment numeric(16,4), cobmisc_paymentref text, cobmisc_notes text, cobmisc_shipdate date, cobmisc_invcnumber integer, cobmisc_invcdate date, cobmisc_posted boolean, cobmisc_misc_accnt_id integer, cobmisc_misc_descrip text, cobmisc_closeorder boolean, cobmisc_curr_id integer DEFAULT basecurrid(), cobmisc_invchead_id integer, cobmisc_taxzone_id integer, cobmisc_taxtype_id integer ); ALTER TABLE public.cobmisc OWNER TO admin; -- -- Name: TABLE cobmisc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE cobmisc IS 'General information about Billing Selections'; -- -- Name: cobmisc_cobmisc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cobmisc_cobmisc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cobmisc_cobmisc_id_seq OWNER TO admin; -- -- Name: cobmisc_cobmisc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cobmisc_cobmisc_id_seq', 302, true); -- -- Name: cobmisctax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE cobmisctax ( ) INHERITS (taxhist); ALTER TABLE public.cobmisctax OWNER TO admin; -- -- Name: cohead_cohead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cohead_cohead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cohead_cohead_id_seq OWNER TO admin; -- -- Name: cohead_cohead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cohead_cohead_id_seq', 3232, true); -- -- Name: cohist_cohist_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cohist_cohist_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cohist_cohist_id_seq OWNER TO admin; -- -- Name: cohist_cohist_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cohist_cohist_id_seq', 821, true); -- -- Name: coitem_coitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE coitem_coitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.coitem_coitem_id_seq OWNER TO admin; -- -- Name: coitem_coitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('coitem_coitem_id_seq', 802, true); -- -- Name: comment_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE comment_comment_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.comment_comment_id_seq OWNER TO admin; -- -- Name: comment_comment_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('comment_comment_id_seq', 2401, true); -- -- Name: company; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE company ( company_id integer NOT NULL, company_number text NOT NULL, company_descrip text, company_external boolean DEFAULT false NOT NULL, company_server text, company_port integer, company_database text, company_curr_id integer, company_yearend_accnt_id integer, company_gainloss_accnt_id integer, company_dscrp_accnt_id integer, company_unrlzgainloss_accnt_id integer, CONSTRAINT company_company_number_check CHECK ((company_number <> ''::text)) ); ALTER TABLE public.company OWNER TO admin; -- -- Name: TABLE company; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE company IS 'Company information'; -- -- Name: company_company_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE company_company_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.company_company_id_seq OWNER TO admin; -- -- Name: company_company_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE company_company_id_seq OWNED BY company.company_id; -- -- Name: company_company_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('company_company_id_seq', 1, true); -- -- Name: contrct_contrct_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE contrct_contrct_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.contrct_contrct_id_seq OWNER TO admin; -- -- Name: contrct_contrct_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE contrct_contrct_id_seq OWNED BY contrct.contrct_id; -- -- Name: contrct_contrct_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('contrct_contrct_id_seq', 1, false); -- -- Name: shiphead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shiphead ( shiphead_id integer NOT NULL, shiphead_order_id integer NOT NULL, shiphead_order_type text NOT NULL, shiphead_number text NOT NULL, shiphead_shipvia text, shiphead_freight numeric(16,4) DEFAULT 0.0 NOT NULL, shiphead_freight_curr_id integer DEFAULT basecurrid() NOT NULL, shiphead_notes text, shiphead_shipped boolean DEFAULT false NOT NULL, shiphead_shipdate date, shiphead_shipchrg_id integer, shiphead_shipform_id integer, shiphead_sfstatus character(1) NOT NULL, shiphead_tracknum text, CONSTRAINT shiphead_shiphead_number_check CHECK ((shiphead_number <> ''::text)), CONSTRAINT shiphead_shiphead_order_type_check CHECK (((shiphead_order_type = 'SO'::text) OR (shiphead_order_type = 'TO'::text))), CONSTRAINT shiphead_shiphead_sfstatus_check CHECK ((((shiphead_sfstatus = 'D'::bpchar) OR (shiphead_sfstatus = 'N'::bpchar)) OR (shiphead_sfstatus = 'P'::bpchar))) ); ALTER TABLE public.shiphead OWNER TO admin; -- -- Name: TABLE shiphead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shiphead IS 'General information about Shipments'; -- -- Name: shipitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shipitem ( shipitem_id integer NOT NULL, shipitem_orderitem_id integer NOT NULL, shipitem_shiphead_id integer NOT NULL, shipitem_qty numeric(18,6) NOT NULL, shipitem_shipped boolean DEFAULT false NOT NULL, shipitem_shipdate timestamp with time zone, shipitem_transdate timestamp with time zone, shipitem_trans_username text, shipitem_invoiced boolean DEFAULT false NOT NULL, shipitem_invcitem_id integer, shipitem_value numeric(18,6), shipitem_invhist_id integer ); ALTER TABLE public.shipitem OWNER TO admin; -- -- Name: TABLE shipitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shipitem IS 'Information about Shipment Line Items'; -- -- Name: coship; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW coship AS SELECT shipitem.shipitem_id AS coship_id, shipitem.shipitem_orderitem_id AS coship_coitem_id, shipitem.shipitem_shipdate AS coship_shipdate, shipitem.shipitem_qty AS coship_qty, shipitem.shipitem_transdate AS coship_transdate, shipitem.shipitem_shipped AS coship_shipped, shipitem.shipitem_invoiced AS coship_invoiced, shipitem.shipitem_shiphead_id AS coship_cosmisc_id, shipitem.shipitem_trans_username AS coship_trans_username, shipitem.shipitem_invcitem_id AS coship_invcitem_id FROM shipitem, shiphead WHERE ((shipitem.shipitem_shiphead_id = shiphead.shiphead_id) AND (shiphead.shiphead_order_type = 'SO'::text)); ALTER TABLE public.coship OWNER TO admin; -- -- Name: coship_coship_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE coship_coship_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.coship_coship_id_seq OWNER TO admin; -- -- Name: coship_coship_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('coship_coship_id_seq', 502, true); -- -- Name: cosmisc; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW cosmisc AS SELECT shiphead.shiphead_id AS cosmisc_id, shiphead.shiphead_order_id AS cosmisc_cohead_id, shiphead.shiphead_shipvia AS cosmisc_shipvia, shiphead.shiphead_freight AS cosmisc_freight, shiphead.shiphead_notes AS cosmisc_notes, shiphead.shiphead_shipdate AS cosmisc_shipdate, shiphead.shiphead_shipchrg_id AS cosmisc_shipchrg_id, shiphead.shiphead_shipform_id AS cosmisc_shipform_id, shiphead.shiphead_shipped AS cosmisc_shipped, shiphead.shiphead_sfstatus AS cosmisc_sfstatus, shiphead.shiphead_tracknum AS cosmisc_tracknum, shiphead.shiphead_number AS cosmisc_number FROM shiphead WHERE (shiphead.shiphead_order_type = 'SO'::text); ALTER TABLE public.cosmisc OWNER TO admin; -- -- Name: cosmisc_cosmisc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cosmisc_cosmisc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cosmisc_cosmisc_id_seq OWNER TO admin; -- -- Name: cosmisc_cosmisc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cosmisc_cosmisc_id_seq', 240, true); -- -- Name: cosrc_cosrc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cosrc_cosrc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cosrc_cosrc_id_seq OWNER TO admin; -- -- Name: cosrc_cosrc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cosrc_cosrc_id_seq', 1, false); -- -- Name: costcat_costcat_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE costcat_costcat_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.costcat_costcat_id_seq OWNER TO admin; -- -- Name: costcat_costcat_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('costcat_costcat_id_seq', 35, true); -- -- Name: costelem_costelem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE costelem_costelem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.costelem_costelem_id_seq OWNER TO admin; -- -- Name: costelem_costelem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('costelem_costelem_id_seq', 21, true); -- -- Name: costhist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE costhist ( costhist_id integer DEFAULT nextval(('"costhist_costhist_id_seq"'::text)::regclass) NOT NULL, costhist_item_id integer, costhist_costelem_id integer, costhist_type character(1), costhist_date timestamp with time zone, costhist_oldcost numeric(16,6), costhist_newcost numeric(16,6), costhist_lowlevel boolean, costhist_oldcurr_id integer DEFAULT basecurrid(), costhist_newcurr_id integer DEFAULT basecurrid(), costhist_username text ); ALTER TABLE public.costhist OWNER TO admin; -- -- Name: TABLE costhist; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE costhist IS 'Item Cost history'; -- -- Name: costhist_costhist_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE costhist_costhist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.costhist_costhist_id_seq OWNER TO admin; -- -- Name: costhist_costhist_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('costhist_costhist_id_seq', 1640, true); -- -- Name: costupdate; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE costupdate ( costupdate_item_id integer, costupdate_lowlevel_code integer DEFAULT 1 NOT NULL, costupdate_item_type character(1) ); ALTER TABLE public.costupdate OWNER TO admin; -- -- Name: TABLE costupdate; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE costupdate IS 'Scratch area for sequencing the updating of item costs'; -- -- Name: country; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE country ( country_id integer NOT NULL, country_abbr character(2), country_name text, country_curr_abbr character(3), country_curr_name text, country_curr_number character(3), country_curr_symbol character varying(9), country_qt_number integer, CONSTRAINT country_country_abbr_check CHECK ((country_abbr <> ''::bpchar)), CONSTRAINT country_country_name_check CHECK ((country_name <> ''::text)) ); ALTER TABLE public.country OWNER TO admin; -- -- Name: TABLE country; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE country IS 'Basic information and properties about countries.'; -- -- Name: country_country_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE country_country_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.country_country_id_seq OWNER TO admin; -- -- Name: country_country_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE country_country_id_seq OWNED BY country.country_id; -- -- Name: country_country_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('country_country_id_seq', 242, true); -- -- Name: salesaccnt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE salesaccnt ( salesaccnt_id integer DEFAULT nextval(('"salesaccnt_salesaccnt_id_seq"'::text)::regclass) NOT NULL, salesaccnt_custtype_id integer, salesaccnt_prodcat_id integer, salesaccnt_warehous_id integer, salesaccnt_sales_accnt_id integer, salesaccnt_credit_accnt_id integer, salesaccnt_cos_accnt_id integer, salesaccnt_custtype text, salesaccnt_prodcat text, salesaccnt_returns_accnt_id integer, salesaccnt_cor_accnt_id integer, salesaccnt_cow_accnt_id integer, salesaccnt_saletype_id integer, salesaccnt_shipzone_id integer ); ALTER TABLE public.salesaccnt OWNER TO admin; -- -- Name: TABLE salesaccnt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE salesaccnt IS 'Sales Account assignment information'; -- -- Name: COLUMN salesaccnt.salesaccnt_saletype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN salesaccnt.salesaccnt_saletype_id IS 'Associated sale type for sales account.'; -- -- Name: COLUMN salesaccnt.salesaccnt_shipzone_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN salesaccnt.salesaccnt_shipzone_id IS 'Associated shipping zone for sales account.'; -- -- Name: creditmemoeditlist; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW creditmemoeditlist AS ((((SELECT cmhead.cmhead_id AS orderid, (-2) AS itemid, ('C/M-'::text || formatcreditmemonumber(cmhead.cmhead_id)) AS documentnumber, custinfo.cust_number, cmhead.cmhead_billtoname AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, '' AS item, '' AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, '' AS price, formatmoney((((calccmheadamt(cmhead.cmhead_id) + cmhead.cmhead_freight) + cmhead.cmhead_misc) + calccmheadtax(cmhead.cmhead_id))) AS extprice, 'Credit' AS sence, COALESCE((SELECT formatglaccountlong(accnt.accnt_id) AS formatglaccountlong FROM accnt WHERE (accnt.accnt_id = findaraccount(custinfo.cust_id))), 'Not Assigned'::text) AS account FROM custinfo, cmhead WHERE ((((cmhead.cmhead_cust_id = custinfo.cust_id) AND (cmhead.cmhead_cust_id = custinfo.cust_id)) AND (NOT cmhead.cmhead_posted)) AND (NOT cmhead.cmhead_hold)) UNION SELECT cmhead.cmhead_id AS orderid, (-1) AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, 'Freight' AS item, 'Freight Charge' AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, formatmoney(cmhead.cmhead_freight) AS price, formatmoney(cmhead.cmhead_freight) AS extprice, 'Debit' AS sence, CASE WHEN (accnt.accnt_id IS NULL) THEN 'Not Assigned'::text ELSE formatglaccountlong(accnt.accnt_id) END AS account FROM (cmhead LEFT JOIN accnt ON ((accnt.accnt_id = findfreightaccount(cmhead.cmhead_cust_id)))) WHERE (((NOT cmhead.cmhead_posted) AND (NOT cmhead.cmhead_hold)) AND (cmhead.cmhead_freight <> (0)::numeric))) UNION SELECT cmhead.cmhead_id AS orderid, (-1) AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, 'Misc. Charge' AS item, cmhead.cmhead_misc_descrip AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, formatmoney(cmhead.cmhead_misc) AS price, formatmoney(cmhead.cmhead_misc) AS extprice, 'Debit' AS sence, formatglaccountlong(cmhead.cmhead_misc_accnt_id) AS account FROM cmhead WHERE (((NOT cmhead.cmhead_posted) AND (NOT cmhead.cmhead_hold)) AND (cmhead.cmhead_misc <> (0)::numeric))) UNION SELECT cmhead.cmhead_id AS orderid, (-1) AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, 'Sales Tax' AS item, tax.tax_descrip AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, formatmoney((cmheadtax.taxhist_tax * (-1.0))) AS price, formatmoney((cmheadtax.taxhist_tax * (-1.0))) AS extprice, 'Debit' AS sence, CASE WHEN (accnt.accnt_id IS NULL) THEN 'Not Assigned'::text ELSE ((formatglaccountlong(accnt.accnt_id) || ' - '::text) || accnt.accnt_descrip) END AS account FROM (((cmhead JOIN cmheadtax ON ((cmheadtax.taxhist_parent_id = cmhead.cmhead_id))) JOIN tax ON ((tax.tax_id = cmheadtax.taxhist_tax_id))) LEFT JOIN accnt ON ((accnt.accnt_id = tax.tax_sales_accnt_id))) WHERE ((NOT cmhead.cmhead_posted) AND (NOT cmhead.cmhead_hold))) UNION SELECT cmhead.cmhead_id AS orderid, (-1) AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, 'Sales Tax' AS item, tax.tax_descrip AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, formatmoney((cmitemtax.taxhist_tax * (-1.0))) AS price, formatmoney((cmitemtax.taxhist_tax * (-1.0))) AS extprice, 'Debit' AS sence, CASE WHEN (accnt.accnt_id IS NULL) THEN 'Not Assigned'::text ELSE ((formatglaccountlong(accnt.accnt_id) || ' - '::text) || accnt.accnt_descrip) END AS account FROM ((((cmhead JOIN cmitem ON ((cmitem.cmitem_cmhead_id = cmhead.cmhead_id))) JOIN cmitemtax ON ((cmitemtax.taxhist_parent_id = cmitem.cmitem_id))) JOIN tax ON ((tax.tax_id = cmitemtax.taxhist_tax_id))) LEFT JOIN accnt ON ((accnt.accnt_id = tax.tax_sales_accnt_id))) WHERE ((NOT cmhead.cmhead_posted) AND (NOT cmhead.cmhead_hold))) UNION SELECT cmhead.cmhead_id AS orderid, cmitem.cmitem_id AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, cmitem.cmitem_linenumber AS linenumber, item.item_number AS item, item.item_descrip1 AS itemdescrip, uom.uom_name AS iteminvuom, formatqty(COALESCE((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio), (0)::numeric)) AS qtytobill, formatprice(COALESCE((cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio), (0)::numeric)) AS price, formatmoney(COALESCE(round(((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio) * (cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio)), 2), (0)::numeric)) AS extprice, 'Debit' AS sence, COALESCE((SELECT formatglaccountlong(accnt.accnt_id) AS formatglaccountlong FROM accnt, salesaccnt WHERE ((salesaccnt.salesaccnt_sales_accnt_id = accnt.accnt_id) AND (salesaccnt.salesaccnt_id = findsalesaccnt(cmitem.cmitem_itemsite_id, 'IS'::text, cmhead.cmhead_cust_id, cmhead.cmhead_saletype_id, cmhead.cmhead_shipzone_id)))), 'Not Assigned'::text) AS account FROM item, itemsite, cmhead, cmitem, uom WHERE ((((((cmitem.cmitem_cmhead_id = cmhead.cmhead_id) AND (cmitem.cmitem_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (item.item_inv_uom_id = uom.uom_id)) AND (NOT cmhead.cmhead_posted)) AND (NOT cmhead.cmhead_hold)) ORDER BY 6, 7; ALTER TABLE public.creditmemoeditlist OWNER TO admin; -- -- Name: creditmemoitem; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW creditmemoitem AS SELECT cmitem.cmitem_id, cmitem.cmitem_cmhead_id, cmitem.cmitem_linenumber, cmitem.cmitem_itemsite_id, cmitem.cmitem_qtycredit, cmitem.cmitem_qtyreturned, cmitem.cmitem_unitprice, cmitem.cmitem_comments, cmitem.cmitem_rsncode_id, cmitem.cmitem_taxtype_id, cmitem.cmitem_qty_uom_id, cmitem.cmitem_qty_invuomratio, cmitem.cmitem_price_uom_id, cmitem.cmitem_price_invuomratio, cmitem.cmitem_raitem_id, cmitem.cmitem_updateinv, itemsite.itemsite_item_id AS item_id, COALESCE((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio), (0)::numeric) AS qty, COALESCE((cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio), (0)::numeric) AS unitprice, COALESCE(round(((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio) * (cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio)), 2), (0)::numeric) AS extprice, currtobase(cmhead.cmhead_curr_id, COALESCE(round(((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio) * (cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio)), 2), (0)::numeric), cmhead.cmhead_docdate) AS baseextprice, (SELECT COALESCE(sum(cmitemtax.taxhist_tax), (0)::numeric) AS "coalesce" FROM cmitemtax WHERE (cmitemtax.taxhist_parent_id = cmitem.cmitem_id)) AS tax, CASE WHEN (itemsite.itemsite_costmethod = 'A'::bpchar) THEN avgcost(itemsite.itemsite_id) ELSE stdcost(itemsite.itemsite_item_id) END AS unitcost FROM ((cmitem JOIN cmhead ON ((cmhead.cmhead_id = cmitem.cmitem_cmhead_id))) LEFT JOIN itemsite ON ((itemsite.itemsite_id = cmitem.cmitem_itemsite_id))); ALTER TABLE public.creditmemoitem OWNER TO admin; -- -- Name: VIEW creditmemoitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON VIEW creditmemoitem IS 'Single point for credit memo item (cmitem) calculations.'; -- -- Name: crmacct_crmacct_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE crmacct_crmacct_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.crmacct_crmacct_id_seq OWNER TO admin; -- -- Name: crmacct_crmacct_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE crmacct_crmacct_id_seq OWNED BY crmacct.crmacct_id; -- -- Name: crmacct_crmacct_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('crmacct_crmacct_id_seq', 43, true); -- -- Name: crmacctsel; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE crmacctsel ( crmacctsel_src_crmacct_id integer NOT NULL, crmacctsel_dest_crmacct_id integer, crmacctsel_mrg_crmacct_active boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_cntct_id_1 boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_cntct_id_2 boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_competitor_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_cust_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_emp_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_name boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_notes boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_owner_username boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_parent_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_partner_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_prospect_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_salesrep_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_taxauth_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_type boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_usr_username boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_vend_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_number boolean DEFAULT false NOT NULL ); ALTER TABLE public.crmacctsel OWNER TO admin; -- -- Name: TABLE crmacctsel; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE crmacctsel IS 'This table records the proposed conditions of a CRM Account merge. When this merge is performed, the BOOLEAN columns in this table indicate which values in the crmacct table will be copied to the target record. Data in this table are temporary and will be removed by a purge.'; -- -- Name: COLUMN crmacctsel.crmacctsel_src_crmacct_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacctsel.crmacctsel_src_crmacct_id IS 'This is the internal ID of the CRM Account record the data will come from during the merge.'; -- -- Name: COLUMN crmacctsel.crmacctsel_dest_crmacct_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN crmacctsel.crmacctsel_dest_crmacct_id IS 'This is the internal ID of the CRM Account record the data will go to during the merge. If crmacctsel_src_crmacct_id = crmacctsel_dest_crmacct_id, they indicate which crmacct record is the destination of the merge, meaning this is the record that will remain in the database after the merge has been completed and the intermediate data have been purged.'; -- -- Name: curr_rate; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE curr_rate ( curr_rate_id integer NOT NULL, curr_id integer NOT NULL, curr_rate numeric(16,8) NOT NULL, curr_effective date NOT NULL, curr_expires date NOT NULL, CONSTRAINT curr_rate_curr_rate_check CHECK ((curr_rate > (0)::numeric)) ); ALTER TABLE public.curr_rate OWNER TO admin; -- -- Name: TABLE curr_rate; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE curr_rate IS 'Exchange Rates Between Base and Foreign Currencies'; -- -- Name: curr_rate_curr_rate_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE curr_rate_curr_rate_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.curr_rate_curr_rate_id_seq OWNER TO admin; -- -- Name: curr_rate_curr_rate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE curr_rate_curr_rate_id_seq OWNED BY curr_rate.curr_rate_id; -- -- Name: curr_rate_curr_rate_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('curr_rate_curr_rate_id_seq', 18, true); -- -- Name: curr_symbol_curr_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE curr_symbol_curr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.curr_symbol_curr_id_seq OWNER TO admin; -- -- Name: curr_symbol_curr_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE curr_symbol_curr_id_seq OWNED BY curr_symbol.curr_id; -- -- Name: curr_symbol_curr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('curr_symbol_curr_id_seq', 3, true); -- -- Name: cust; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW cust AS SELECT custinfo.cust_id, custinfo.cust_active, custinfo.cust_custtype_id, custinfo.cust_salesrep_id, custinfo.cust_commprcnt, custinfo.cust_name, m.addr_line1 AS cust_address1, m.addr_line2 AS cust_address2, m.addr_line3 AS cust_address3, m.addr_city AS cust_city, m.addr_state AS cust_state, m.addr_postalcode AS cust_zipcode, btrim(((mc.cntct_first_name || ' '::text) || mc.cntct_last_name)) AS cust_contact, mc.cntct_phone AS cust_phone, mc.cntct_fax AS cust_fax, mc.cntct_email AS cust_email, c.addr_line1 AS cust_corraddress1, c.addr_line2 AS cust_corraddress2, c.addr_line3 AS cust_corraddress3, c.addr_city AS cust_corrcity, c.addr_state AS cust_corrstate, c.addr_postalcode AS cust_corrzipcode, btrim(((cc.cntct_first_name || ' '::text) || cc.cntct_last_name)) AS cust_corrcontact, cc.cntct_phone AS cust_corrphone, cc.cntct_fax AS cust_corrfax, cc.cntct_email AS cust_corremail, custinfo.cust_creditlmt, custinfo.cust_creditrating, custinfo.cust_financecharge, custinfo.cust_backorder, custinfo.cust_partialship, custinfo.cust_terms_id, custinfo.cust_discntprcnt, custinfo.cust_taxzone_id, custinfo.cust_balmethod, custinfo.cust_ffshipto, custinfo.cust_shipform_id, custinfo.cust_shipvia, custinfo.cust_blanketpos, custinfo.cust_shipchrg_id, custinfo.cust_creditstatus, custinfo.cust_comments, custinfo.cust_ffbillto, m.addr_country AS cust_country, c.addr_country AS cust_corrcountry, custinfo.cust_usespos, custinfo.cust_number, custinfo.cust_dateadded, custinfo.cust_exported, custinfo.cust_emaildelivery, custinfo.cust_ediemail, custinfo.cust_edisubject, custinfo.cust_edifilename, custinfo.cust_ediemailbody, custinfo.cust_autoupdatestatus, custinfo.cust_autoholdorders, custinfo.cust_edicc, custinfo.cust_ediprofile_id, custinfo.cust_preferred_warehous_id, custinfo.cust_curr_id, custinfo.cust_creditlmt_curr_id FROM ((((custinfo LEFT JOIN cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN cntct cc ON ((custinfo.cust_corrcntct_id = cc.cntct_id))) LEFT JOIN addr c ON ((cc.cntct_addr_id = c.addr_id))); ALTER TABLE public.cust OWNER TO admin; -- -- Name: cust_serial_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE cust_serial_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.cust_serial_seq OWNER TO admin; -- -- Name: cust_serial_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('cust_serial_seq', 1, false); -- -- Name: custform; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE custform ( custform_id integer DEFAULT nextval(('"custform_custform_id_seq"'::text)::regclass) NOT NULL, custform_custtype_id integer, custform_custtype text, custform_invoice_report_id integer, custform_creditmemo_report_id integer, custform_quote_report_id integer, custform_packinglist_report_id integer, custform_statement_report_id integer, custform_sopicklist_report_id integer, custform_invoice_report_name text, custform_creditmemo_report_name text, custform_quote_report_name text, custform_packinglist_report_name text, custform_statement_report_name text, custform_sopicklist_report_name text ); ALTER TABLE public.custform OWNER TO admin; -- -- Name: TABLE custform; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE custform IS 'Customer Form assignment information'; -- -- Name: COLUMN custform.custform_invoice_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custform.custform_invoice_report_id IS 'Obsolete -- reference custform_invoice_report_name instead.'; -- -- Name: COLUMN custform.custform_creditmemo_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custform.custform_creditmemo_report_id IS 'Obsolete -- reference custform_creditmemo_report_name instead.'; -- -- Name: COLUMN custform.custform_quote_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custform.custform_quote_report_id IS 'Obsolete -- reference custform_quote_report_name instead.'; -- -- Name: COLUMN custform.custform_packinglist_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custform.custform_packinglist_report_id IS 'Obsolete -- reference custform_packinglist_report_name instead.'; -- -- Name: COLUMN custform.custform_statement_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custform.custform_statement_report_id IS 'Obsolete -- reference custform_statement_report_name instead.'; -- -- Name: COLUMN custform.custform_sopicklist_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN custform.custform_sopicklist_report_id IS 'Obsolete -- reference custform_sopicklist_report_name instead.'; -- -- Name: custform_custform_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE custform_custform_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.custform_custform_id_seq OWNER TO admin; -- -- Name: custform_custform_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('custform_custform_id_seq', 8, true); -- -- Name: custgrp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE custgrp ( custgrp_id integer DEFAULT nextval(('"custgrp_custgrp_id_seq"'::text)::regclass) NOT NULL, custgrp_name text NOT NULL, custgrp_descrip text, CONSTRAINT custgrp_custgrp_name_check CHECK ((custgrp_name <> ''::text)) ); ALTER TABLE public.custgrp OWNER TO admin; -- -- Name: TABLE custgrp; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE custgrp IS 'Customer Group information'; -- -- Name: custgrp_custgrp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE custgrp_custgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.custgrp_custgrp_id_seq OWNER TO admin; -- -- Name: custgrp_custgrp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('custgrp_custgrp_id_seq', 25, true); -- -- Name: custgrpitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE custgrpitem ( custgrpitem_id integer DEFAULT nextval(('"custgrpitem_custgrpitem_id_seq"'::text)::regclass) NOT NULL, custgrpitem_custgrp_id integer, custgrpitem_cust_id integer ); ALTER TABLE public.custgrpitem OWNER TO admin; -- -- Name: TABLE custgrpitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE custgrpitem IS 'Customer Group Item information'; -- -- Name: custgrpitem_custgrpitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE custgrpitem_custgrpitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.custgrpitem_custgrpitem_id_seq OWNER TO admin; -- -- Name: custgrpitem_custgrpitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('custgrpitem_custgrpitem_id_seq', 48, true); -- -- Name: custtype_custtype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE custtype_custtype_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.custtype_custtype_id_seq OWNER TO admin; -- -- Name: custtype_custtype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('custtype_custtype_id_seq', 20, true); -- -- Name: dept_dept_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE dept_dept_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.dept_dept_id_seq OWNER TO admin; -- -- Name: dept_dept_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE dept_dept_id_seq OWNED BY dept.dept_id; -- -- Name: dept_dept_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('dept_dept_id_seq', 4, true); -- -- Name: destination; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE destination ( destination_id integer DEFAULT nextval(('"destination_destination_id_seq"'::text)::regclass) NOT NULL, destination_name text, destination_city text, destination_state text, destination_comments text ); ALTER TABLE public.destination OWNER TO admin; -- -- Name: TABLE destination; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE destination IS 'Destination information'; -- -- Name: destination_destination_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE destination_destination_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.destination_destination_id_seq OWNER TO admin; -- -- Name: destination_destination_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('destination_destination_id_seq', 13, true); -- -- Name: wo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE wo ( wo_id integer DEFAULT nextval(('wo_wo_id_seq'::text)::regclass) NOT NULL, wo_number integer, wo_subnumber integer, wo_status character(1), wo_itemsite_id integer, wo_startdate date, wo_duedate date, wo_ordtype character(1), wo_ordid integer, wo_qtyord numeric(18,6), wo_qtyrcv numeric(18,6), wo_adhoc boolean, wo_itemcfg_series integer, wo_imported boolean, wo_wipvalue numeric(16,6) DEFAULT 0, wo_postedvalue numeric(16,6) DEFAULT 0, wo_prodnotes text, wo_prj_id integer, wo_priority integer DEFAULT 1 NOT NULL, wo_brdvalue numeric(16,6) DEFAULT 0, wo_bom_rev_id integer DEFAULT (-1), wo_boo_rev_id integer DEFAULT (-1), wo_cosmethod character(1), wo_womatl_id integer, wo_username text DEFAULT geteffectivextuser(), CONSTRAINT chk_wo_cosmethod CHECK ((((wo_cosmethod = NULL::bpchar) OR (wo_cosmethod = 'D'::bpchar)) OR (wo_cosmethod = 'P'::bpchar))) ); ALTER TABLE public.wo OWNER TO admin; -- -- Name: TABLE wo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE wo IS 'Work Order information'; -- -- Name: docinfo; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW docinfo AS (((((((((((((((((((((((((((((SELECT imageass.imageass_id AS id, (image.image_id)::text AS target_number, 'IMG' AS target_type, imageass.imageass_image_id AS target_id, imageass.imageass_source AS source_type, imageass.imageass_source_id AS source_id, image.image_name AS name, image.image_descrip AS description, imageass.imageass_purpose AS purpose FROM imageass, image WHERE (imageass.imageass_image_id = image.image_id) UNION ALL SELECT url.url_id AS id, (url.url_id)::text AS target_number, 'URL' AS target_type, url.url_id AS target_id, url.url_source AS source_type, url.url_source_id AS source_id, url.url_title AS name, url.url_url AS description, 'S' AS purpose FROM url WHERE (url.url_stream IS NULL)) UNION ALL SELECT url.url_id AS id, (url.url_id)::text AS target_number, 'FILE' AS target_type, url.url_id AS target_id, url.url_source AS source_type, url.url_source_id AS source_id, url.url_title AS name, url.url_url AS description, 'S' AS purpose FROM url WHERE (url.url_stream IS NOT NULL)) UNION ALL SELECT docass.docass_id AS id, (incdt.incdt_number)::text AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, incdt.incdt_summary AS name, firstline(incdt.incdt_descrip) AS description, docass.docass_purpose AS purpose FROM docass, incdt WHERE ((docass.docass_target_type = 'INCDT'::text) AND (docass.docass_target_id = incdt.incdt_id))) UNION ALL SELECT docass.docass_id AS id, (incdt.incdt_number)::text AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, incdt.incdt_summary AS name, firstline(incdt.incdt_descrip) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, incdt WHERE ((docass.docass_source_type = 'INCDT'::text) AND (docass.docass_source_id = incdt.incdt_id))) UNION ALL SELECT docass.docass_id AS id, (todoitem.todoitem_id)::text AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, todoitem.todoitem_name AS name, firstline(todoitem.todoitem_description) AS description, docass.docass_purpose AS purpose FROM docass, todoitem WHERE ((docass.docass_target_type = 'TODO'::text) AND (docass.docass_target_id = todoitem.todoitem_id))) UNION ALL SELECT docass.docass_id AS id, (todoitem.todoitem_id)::text AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, todoitem.todoitem_name AS name, firstline(todoitem.todoitem_description) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, todoitem WHERE ((docass.docass_source_type = 'TODO'::text) AND (docass.docass_source_id = todoitem.todoitem_id))) UNION ALL SELECT docass.docass_id AS id, prj.prj_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, prj.prj_name AS name, firstline(prj.prj_descrip) AS description, docass.docass_purpose AS purpose FROM docass, prj WHERE ((docass.docass_target_type = 'J'::text) AND (docass.docass_target_id = prj.prj_id))) UNION ALL SELECT docass.docass_id AS id, prj.prj_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, prj.prj_name AS name, firstline(prj.prj_descrip) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, prj WHERE ((docass.docass_source_type = 'J'::text) AND (docass.docass_source_id = prj.prj_id))) UNION ALL SELECT docass.docass_id AS id, item.item_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, firstline(item.item_descrip1) AS name, firstline(item.item_descrip2) AS description, docass.docass_purpose AS purpose FROM docass, item WHERE ((docass.docass_target_type = 'I'::text) AND (docass.docass_target_id = item.item_id))) UNION ALL SELECT docass.docass_id AS id, item.item_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, firstline(item.item_descrip1) AS name, firstline(item.item_descrip2) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, item WHERE ((docass.docass_source_type = 'I'::text) AND (docass.docass_source_id = item.item_id))) UNION ALL SELECT docass.docass_id AS id, crmacct.crmacct_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, crmacct.crmacct_name AS name, firstline(crmacct.crmacct_notes) AS description, docass.docass_purpose AS purpose FROM docass, crmacct WHERE ((docass.docass_target_type = 'CRMA'::text) AND (docass.docass_target_id = crmacct.crmacct_id))) UNION ALL SELECT docass.docass_id AS id, crmacct.crmacct_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, crmacct.crmacct_name AS name, firstline(crmacct.crmacct_notes) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, crmacct WHERE ((docass.docass_source_type = 'CRMA'::text) AND (docass.docass_source_id = crmacct.crmacct_id))) UNION SELECT docass.docass_id AS id, custinfo.cust_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, custinfo.cust_name AS name, firstline(custinfo.cust_comments) AS description, docass.docass_purpose AS purpose FROM docass, custinfo WHERE ((docass.docass_target_type = 'C'::text) AND (docass.docass_target_id = custinfo.cust_id))) UNION ALL SELECT docass.docass_id AS id, custinfo.cust_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, custinfo.cust_name AS name, firstline(custinfo.cust_comments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, custinfo WHERE ((docass.docass_source_type = 'C'::text) AND (docass.docass_source_id = custinfo.cust_id))) UNION ALL SELECT docass.docass_id AS id, vendinfo.vend_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, vendinfo.vend_name AS name, firstline(vendinfo.vend_comments) AS description, docass.docass_purpose AS purpose FROM docass, vendinfo WHERE ((docass.docass_target_type = 'V'::text) AND (docass.docass_target_id = vendinfo.vend_id))) UNION ALL SELECT docass.docass_id AS id, vendinfo.vend_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, vendinfo.vend_name AS name, firstline(vendinfo.vend_comments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, vendinfo WHERE ((docass.docass_source_type = 'V'::text) AND (docass.docass_source_id = vendinfo.vend_id))) UNION ALL SELECT docass.docass_id AS id, cntct.cntct_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, cntct.cntct_name AS name, cntct.cntct_title AS description, docass.docass_purpose AS purpose FROM docass, cntct WHERE ((docass.docass_target_type = 'T'::text) AND (docass.docass_target_id = cntct.cntct_id))) UNION ALL SELECT docass.docass_id AS id, cntct.cntct_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, cntct.cntct_name AS name, cntct.cntct_title AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, cntct WHERE ((docass.docass_source_type = 'T'::text) AND (docass.docass_source_id = cntct.cntct_id))) UNION ALL SELECT docass.docass_id AS id, (ophead.ophead_id)::text AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, ophead.ophead_name AS name, firstline(ophead.ophead_notes) AS description, docass.docass_purpose AS purpose FROM docass, ophead WHERE ((docass.docass_target_type = 'OPP'::text) AND (docass.docass_target_id = ophead.ophead_id))) UNION ALL SELECT docass.docass_id AS id, (ophead.ophead_id)::text AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, ophead.ophead_name AS name, firstline(ophead.ophead_notes) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, ophead WHERE ((docass.docass_source_type = 'OPP'::text) AND (docass.docass_source_id = ophead.ophead_id))) UNION ALL SELECT docass.docass_id AS id, quhead.quhead_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, custinfo.cust_name AS name, firstline(quhead.quhead_ordercomments) AS description, docass.docass_purpose AS purpose FROM docass, quhead, custinfo WHERE (((docass.docass_target_type = 'Q'::text) AND (docass.docass_target_id = quhead.quhead_id)) AND (custinfo.cust_id = quhead.quhead_cust_id))) UNION ALL SELECT docass.docass_id AS id, quhead.quhead_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, custinfo.cust_name AS name, firstline(quhead.quhead_ordercomments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, quhead, custinfo WHERE (((docass.docass_source_type = 'Q'::text) AND (docass.docass_source_id = quhead.quhead_id)) AND (custinfo.cust_id = quhead.quhead_cust_id))) UNION ALL SELECT docass.docass_id AS id, cohead.cohead_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, custinfo.cust_name AS name, firstline(cohead.cohead_ordercomments) AS description, docass.docass_purpose AS purpose FROM docass, cohead, custinfo WHERE (((docass.docass_target_type = 'S'::text) AND (docass.docass_target_id = cohead.cohead_id)) AND (custinfo.cust_id = cohead.cohead_cust_id))) UNION ALL SELECT docass.docass_id AS id, cohead.cohead_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, custinfo.cust_name AS name, firstline(cohead.cohead_ordercomments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, cohead, custinfo WHERE (((docass.docass_source_type = 'S'::text) AND (docass.docass_source_id = cohead.cohead_id)) AND (custinfo.cust_id = cohead.cohead_cust_id))) UNION ALL SELECT docass.docass_id AS id, pohead.pohead_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, vendinfo.vend_name AS name, firstline(pohead.pohead_comments) AS description, docass.docass_purpose AS purpose FROM docass, pohead, vendinfo WHERE (((docass.docass_target_type = 'P'::text) AND (docass.docass_target_id = pohead.pohead_id)) AND (vendinfo.vend_id = pohead.pohead_vend_id))) UNION ALL SELECT docass.docass_id AS id, pohead.pohead_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, vendinfo.vend_name AS name, firstline(pohead.pohead_comments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, pohead, vendinfo WHERE (((docass.docass_source_type = 'P'::text) AND (docass.docass_source_id = pohead.pohead_id)) AND (vendinfo.vend_id = pohead.pohead_vend_id))) UNION ALL SELECT docass.docass_id AS id, formatwonumber(wo.wo_id) AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, item.item_descrip1 AS name, item.item_descrip2 AS description, docass.docass_purpose AS purpose FROM docass, wo, itemsite, item WHERE ((((docass.docass_target_type = 'W'::text) AND (docass.docass_target_id = wo.wo_id)) AND (wo.wo_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id))) UNION ALL SELECT docass.docass_id AS id, formatwonumber(wo.wo_id) AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, item.item_descrip1 AS name, item.item_descrip2 AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, wo, itemsite, item WHERE ((((docass.docass_source_type = 'W'::text) AND (docass.docass_source_id = wo.wo_id)) AND (wo.wo_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id))) UNION ALL SELECT docass.docass_id AS id, emp.emp_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, cntct.cntct_name AS name, cntct.cntct_title AS description, docass.docass_purpose AS purpose FROM docass, (emp LEFT JOIN cntct ON ((emp.emp_cntct_id = cntct.cntct_id))) WHERE ((docass.docass_target_type = 'EMP'::text) AND (docass.docass_target_id = emp.emp_id))) UNION ALL SELECT docass.docass_id AS id, emp.emp_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, cntct.cntct_name AS name, cntct.cntct_title AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, (emp LEFT JOIN cntct ON ((emp.emp_cntct_id = cntct.cntct_id))) WHERE ((docass.docass_source_type = 'EMP'::text) AND (docass.docass_source_id = emp.emp_id)); ALTER TABLE public.docinfo OWNER TO admin; -- -- Name: emp_emp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE emp_emp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.emp_emp_id_seq OWNER TO admin; -- -- Name: emp_emp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE emp_emp_id_seq OWNED BY emp.emp_id; -- -- Name: emp_emp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('emp_emp_id_seq', 3, true); -- -- Name: empgrp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE empgrp ( empgrp_id integer NOT NULL, empgrp_name text NOT NULL, empgrp_descrip text NOT NULL, CONSTRAINT empgrp_empgrp_name_check CHECK ((empgrp_name <> ''::text)) ); ALTER TABLE public.empgrp OWNER TO admin; -- -- Name: empgrp_empgrp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE empgrp_empgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.empgrp_empgrp_id_seq OWNER TO admin; -- -- Name: empgrp_empgrp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE empgrp_empgrp_id_seq OWNED BY empgrp.empgrp_id; -- -- Name: empgrp_empgrp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('empgrp_empgrp_id_seq', 1, false); -- -- Name: empgrpitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE empgrpitem ( empgrpitem_id integer NOT NULL, empgrpitem_empgrp_id integer NOT NULL, empgrpitem_emp_id integer NOT NULL ); ALTER TABLE public.empgrpitem OWNER TO admin; -- -- Name: empgrpitem_empgrpitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE empgrpitem_empgrpitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.empgrpitem_empgrpitem_id_seq OWNER TO admin; -- -- Name: empgrpitem_empgrpitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE empgrpitem_empgrpitem_id_seq OWNED BY empgrpitem.empgrpitem_id; -- -- Name: empgrpitem_empgrpitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('empgrpitem_empgrpitem_id_seq', 1, false); -- -- Name: evntlog; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE evntlog ( evntlog_id integer DEFAULT nextval(('evntlog_evntlog_id_seq'::text)::regclass) NOT NULL, evntlog_evnttime timestamp with time zone, evntlog_evnttype_id integer, evntlog_ord_id integer, evntlog_dispatched timestamp with time zone, evntlog_action text, evntlog_warehous_id integer, evntlog_number text, evntlog_newvalue numeric(20,10), evntlog_oldvalue numeric(20,10), evntlog_newdate date, evntlog_olddate date, evntlog_ordtype character(2), evntlog_username text ); ALTER TABLE public.evntlog OWNER TO admin; -- -- Name: TABLE evntlog; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE evntlog IS 'Event Notification history'; -- -- Name: evntlog_evntlog_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE evntlog_evntlog_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.evntlog_evntlog_id_seq OWNER TO admin; -- -- Name: evntlog_evntlog_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('evntlog_evntlog_id_seq', 1880, true); -- -- Name: evntnot; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE evntnot ( evntnot_id integer DEFAULT nextval(('evntnot_evntnot_id_seq'::text)::regclass) NOT NULL, evntnot_evnttype_id integer, evntnot_warehous_id integer, evntnot_username text ); ALTER TABLE public.evntnot OWNER TO admin; -- -- Name: TABLE evntnot; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE evntnot IS 'Temporary table for storing information about user Event Notification selections'; -- -- Name: evntnot_evntnot_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE evntnot_evntnot_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.evntnot_evntnot_id_seq OWNER TO admin; -- -- Name: evntnot_evntnot_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('evntnot_evntnot_id_seq', 1093, true); -- -- Name: evnttype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE evnttype ( evnttype_id integer DEFAULT nextval(('evnttype_evnttype_id_seq'::text)::regclass) NOT NULL, evnttype_name text NOT NULL, evnttype_descrip text, evnttype_module text, CONSTRAINT evnttype_evnttype_name_check CHECK ((evnttype_name <> ''::text)) ); ALTER TABLE public.evnttype OWNER TO admin; -- -- Name: TABLE evnttype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE evnttype IS 'Event Type information'; -- -- Name: evnttype_evnttype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE evnttype_evnttype_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.evnttype_evnttype_id_seq OWNER TO admin; -- -- Name: evnttype_evnttype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('evnttype_evnttype_id_seq', 45, true); -- -- Name: expcat_expcat_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE expcat_expcat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.expcat_expcat_id_seq OWNER TO admin; -- -- Name: expcat_expcat_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE expcat_expcat_id_seq OWNED BY expcat.expcat_id; -- -- Name: expcat_expcat_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('expcat_expcat_id_seq', 25, true); -- -- Name: file_file_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE file_file_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.file_file_id_seq OWNER TO admin; -- -- Name: file_file_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE file_file_id_seq OWNED BY file.file_id; -- -- Name: file_file_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('file_file_id_seq', 1, true); -- -- Name: filter; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE filter ( filter_id integer NOT NULL, filter_screen text NOT NULL, filter_value text NOT NULL, filter_username text, filter_name text NOT NULL, filter_selected boolean DEFAULT false ); ALTER TABLE public.filter OWNER TO admin; -- -- Name: filter_filter_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE filter_filter_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.filter_filter_id_seq OWNER TO admin; -- -- Name: filter_filter_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE filter_filter_id_seq OWNED BY filter.filter_id; -- -- Name: filter_filter_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('filter_filter_id_seq', 5, true); -- -- Name: flhead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE flhead ( flhead_id integer NOT NULL, flhead_name text NOT NULL, flhead_descrip text, flhead_showtotal boolean DEFAULT false NOT NULL, flhead_showstart boolean DEFAULT true NOT NULL, flhead_showend boolean DEFAULT true NOT NULL, flhead_showdelta boolean DEFAULT true NOT NULL, flhead_showbudget boolean DEFAULT true NOT NULL, flhead_showdiff boolean DEFAULT false NOT NULL, flhead_showcustom boolean DEFAULT false NOT NULL, flhead_custom_label text, flhead_usealttotal boolean DEFAULT false NOT NULL, flhead_alttotal text, flhead_usealtbegin boolean DEFAULT false NOT NULL, flhead_altbegin text, flhead_usealtend boolean DEFAULT false NOT NULL, flhead_altend text, flhead_usealtdebits boolean DEFAULT false NOT NULL, flhead_altdebits text, flhead_usealtcredits boolean DEFAULT false NOT NULL, flhead_altcredits text, flhead_usealtbudget boolean DEFAULT false NOT NULL, flhead_altbudget text, flhead_usealtdiff boolean DEFAULT false NOT NULL, flhead_altdiff text, flhead_type character(1) DEFAULT 'A'::bpchar NOT NULL, flhead_active boolean DEFAULT true NOT NULL, flhead_sys boolean DEFAULT false, flhead_notes text DEFAULT ''::text, CONSTRAINT flhead_flhead_name_check CHECK ((flhead_name <> ''::text)) ); ALTER TABLE public.flhead OWNER TO admin; -- -- Name: TABLE flhead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE flhead IS 'Financial Layout header information'; -- -- Name: flitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE flitem ( flitem_id integer NOT NULL, flitem_flhead_id integer, flitem_flgrp_id integer, flitem_order integer, flitem_accnt_id integer, flitem_showstart boolean, flitem_showend boolean, flitem_showdelta boolean, flitem_showbudget boolean DEFAULT false NOT NULL, flitem_subtract boolean DEFAULT false NOT NULL, flitem_showstartprcnt boolean DEFAULT false NOT NULL, flitem_showendprcnt boolean DEFAULT false NOT NULL, flitem_showdeltaprcnt boolean DEFAULT false NOT NULL, flitem_showbudgetprcnt boolean DEFAULT false NOT NULL, flitem_prcnt_flgrp_id integer DEFAULT (-1) NOT NULL, flitem_showdiff boolean DEFAULT false NOT NULL, flitem_showdiffprcnt boolean DEFAULT false NOT NULL, flitem_showcustom boolean DEFAULT false NOT NULL, flitem_showcustomprcnt boolean DEFAULT false NOT NULL, flitem_custom_source character(1), flitem_company text, flitem_profit text, flitem_number text, flitem_sub text, flitem_type character(1), flitem_subaccnttype_code text ); ALTER TABLE public.flitem OWNER TO admin; -- -- Name: TABLE flitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE flitem IS 'Financial Layout Account information'; -- -- Name: flaccnt; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW flaccnt AS SELECT flhead.flhead_type, flitem.flitem_id, flitem.flitem_flhead_id, flitem.flitem_flgrp_id, flitem.flitem_order, flitem.flitem_accnt_id, flitem.flitem_showstart, flitem.flitem_showend, flitem.flitem_showdelta, flitem.flitem_showbudget, flitem.flitem_subtract, flitem.flitem_showstartprcnt, flitem.flitem_showendprcnt, flitem.flitem_showdeltaprcnt, flitem.flitem_showbudgetprcnt, flitem.flitem_prcnt_flgrp_id, flitem.flitem_showdiff, flitem.flitem_showdiffprcnt, flitem.flitem_showcustom, flitem.flitem_showcustomprcnt, flitem.flitem_custom_source, flitem.flitem_company, flitem.flitem_profit, flitem.flitem_number, flitem.flitem_sub, flitem.flitem_type, flitem.flitem_subaccnttype_code, accnt.accnt_id, accnt.accnt_type, accnt.accnt_company, accnt.accnt_profit, accnt.accnt_number, accnt.accnt_sub, (-1) AS prj_id FROM ((flhead JOIN flitem ON ((flhead.flhead_id = flitem.flitem_flhead_id))) JOIN accnt ON ((flitem.flitem_accnt_id = accnt.accnt_id))) UNION ALL SELECT flhead.flhead_type, flitem.flitem_id, flitem.flitem_flhead_id, flitem.flitem_flgrp_id, flitem.flitem_order, flitem.flitem_accnt_id, flitem.flitem_showstart, flitem.flitem_showend, flitem.flitem_showdelta, flitem.flitem_showbudget, flitem.flitem_subtract, flitem.flitem_showstartprcnt, flitem.flitem_showendprcnt, flitem.flitem_showdeltaprcnt, flitem.flitem_showbudgetprcnt, flitem.flitem_prcnt_flgrp_id, flitem.flitem_showdiff, flitem.flitem_showdiffprcnt, flitem.flitem_showcustom, flitem.flitem_showcustomprcnt, flitem.flitem_custom_source, flitem.flitem_company, flitem.flitem_profit, flitem.flitem_number, flitem.flitem_sub, flitem.flitem_type, flitem.flitem_subaccnttype_code, accnt.accnt_id, accnt.accnt_type, accnt.accnt_company, accnt.accnt_profit, accnt.accnt_number, accnt.accnt_sub, (-1) AS prj_id FROM (flhead JOIN flitem ON ((flhead.flhead_id = flitem.flitem_flhead_id))), accnt WHERE (((((((flitem.flitem_accnt_id = (-1)) AND ((flitem.flitem_type = ''::bpchar) OR (accnt.accnt_type = flitem.flitem_type))) AND ((flitem.flitem_company = 'All'::text) OR (accnt.accnt_company = flitem.flitem_company))) AND ((flitem.flitem_profit = 'All'::text) OR (accnt.accnt_profit = flitem.flitem_profit))) AND ((flitem.flitem_number = 'All'::text) OR (accnt.accnt_number = flitem.flitem_number))) AND ((flitem.flitem_sub = 'All'::text) OR (accnt.accnt_sub = flitem.flitem_sub))) AND ((flitem.flitem_subaccnttype_code = 'All'::text) OR (accnt.accnt_subaccnttype_code = flitem.flitem_subaccnttype_code))) ORDER BY 30, 31, 32, 33; ALTER TABLE public.flaccnt OWNER TO admin; -- -- Name: flcol; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE flcol ( flcol_id integer NOT NULL, flcol_flhead_id integer NOT NULL, flcol_name text, flcol_descrip text, flcol_report_id integer, flcol_month boolean, flcol_quarter boolean, flcol_year boolean, flcol_showdb boolean, flcol_prcnt boolean, flcol_priortype character(1), flcol_priormonth boolean, flcol_priorquarter boolean, flcol_prioryear character(1), flcol_priorprcnt boolean, flcol_priordiff boolean, flcol_priordiffprcnt boolean, flcol_budget boolean, flcol_budgetprcnt boolean, flcol_budgetdiff boolean, flcol_budgetdiffprcnt boolean ); ALTER TABLE public.flcol OWNER TO admin; -- -- Name: flcol_flcol_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE flcol_flcol_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.flcol_flcol_id_seq OWNER TO admin; -- -- Name: flcol_flcol_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE flcol_flcol_id_seq OWNED BY flcol.flcol_id; -- -- Name: flcol_flcol_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('flcol_flcol_id_seq', 59, true); -- -- Name: flgrp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE flgrp ( flgrp_id integer NOT NULL, flgrp_flhead_id integer, flgrp_flgrp_id integer, flgrp_order integer, flgrp_name text, flgrp_descrip text, flgrp_subtotal boolean DEFAULT false NOT NULL, flgrp_summarize boolean DEFAULT false NOT NULL, flgrp_subtract boolean DEFAULT false NOT NULL, flgrp_showstart boolean DEFAULT true NOT NULL, flgrp_showend boolean DEFAULT true NOT NULL, flgrp_showdelta boolean DEFAULT true NOT NULL, flgrp_showbudget boolean DEFAULT true NOT NULL, flgrp_showstartprcnt boolean DEFAULT false NOT NULL, flgrp_showendprcnt boolean DEFAULT false NOT NULL, flgrp_showdeltaprcnt boolean DEFAULT false NOT NULL, flgrp_showbudgetprcnt boolean DEFAULT false NOT NULL, flgrp_prcnt_flgrp_id integer DEFAULT (-1) NOT NULL, flgrp_showdiff boolean DEFAULT false NOT NULL, flgrp_showdiffprcnt boolean DEFAULT false NOT NULL, flgrp_showcustom boolean DEFAULT false NOT NULL, flgrp_showcustomprcnt boolean DEFAULT false NOT NULL, flgrp_usealtsubtotal boolean DEFAULT false NOT NULL, flgrp_altsubtotal text ); ALTER TABLE public.flgrp OWNER TO admin; -- -- Name: TABLE flgrp; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE flgrp IS 'Financial Layout Group information'; -- -- Name: flgrp_flgrp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE flgrp_flgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.flgrp_flgrp_id_seq OWNER TO admin; -- -- Name: flgrp_flgrp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE flgrp_flgrp_id_seq OWNED BY flgrp.flgrp_id; -- -- Name: flgrp_flgrp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('flgrp_flgrp_id_seq', 233, true); -- -- Name: flhead_flhead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE flhead_flhead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.flhead_flhead_id_seq OWNER TO admin; -- -- Name: flhead_flhead_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE flhead_flhead_id_seq OWNED BY flhead.flhead_id; -- -- Name: flhead_flhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('flhead_flhead_id_seq', 27, true); -- -- Name: flitem_flitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE flitem_flitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.flitem_flitem_id_seq OWNER TO admin; -- -- Name: flitem_flitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE flitem_flitem_id_seq OWNED BY flitem.flitem_id; -- -- Name: flitem_flitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('flitem_flitem_id_seq', 338, true); -- -- Name: flnotes; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE flnotes ( flnotes_id integer NOT NULL, flnotes_flhead_id integer, flnotes_period_id integer, flnotes_notes text DEFAULT ''::text ); ALTER TABLE public.flnotes OWNER TO admin; -- -- Name: flnotes_flnotes_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE flnotes_flnotes_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.flnotes_flnotes_id_seq OWNER TO admin; -- -- Name: flnotes_flnotes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE flnotes_flnotes_id_seq OWNED BY flnotes.flnotes_id; -- -- Name: flnotes_flnotes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('flnotes_flnotes_id_seq', 1, false); -- -- Name: flrpt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE flrpt ( flrpt_flhead_id integer NOT NULL, flrpt_period_id integer NOT NULL, flrpt_username text NOT NULL, flrpt_order integer NOT NULL, flrpt_level integer NOT NULL, flrpt_type text NOT NULL, flrpt_type_id integer NOT NULL, flrpt_beginning numeric, flrpt_ending numeric, flrpt_debits numeric, flrpt_credits numeric, flrpt_budget numeric, flrpt_beginningprcnt numeric, flrpt_endingprcnt numeric, flrpt_debitsprcnt numeric, flrpt_creditsprcnt numeric, flrpt_budgetprcnt numeric, flrpt_parent_id integer, flrpt_diff numeric, flrpt_diffprcnt numeric, flrpt_custom numeric, flrpt_customprcnt numeric, flrpt_altname text, flrpt_accnt_id integer, flrpt_interval character(1), flrpt_id integer NOT NULL ); ALTER TABLE public.flrpt OWNER TO admin; -- -- Name: TABLE flrpt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE flrpt IS 'Scratch table where financial reporting information is processed before being displayed.'; -- -- Name: flrpt_flrpt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE flrpt_flrpt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.flrpt_flrpt_id_seq OWNER TO admin; -- -- Name: flrpt_flrpt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE flrpt_flrpt_id_seq OWNED BY flrpt.flrpt_id; -- -- Name: flrpt_flrpt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('flrpt_flrpt_id_seq', 9046, true); -- -- Name: flspec; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE flspec ( flspec_id integer NOT NULL, flspec_flhead_id integer NOT NULL, flspec_flgrp_id integer NOT NULL, flspec_order integer NOT NULL, flspec_name text, flspec_type text, flspec_showstart boolean DEFAULT true NOT NULL, flspec_showend boolean DEFAULT true NOT NULL, flspec_showdelta boolean DEFAULT true NOT NULL, flspec_showbudget boolean DEFAULT false NOT NULL, flspec_subtract boolean DEFAULT false NOT NULL, flspec_showstartprcnt boolean DEFAULT false NOT NULL, flspec_showendprcnt boolean DEFAULT false NOT NULL, flspec_showdeltaprcnt boolean DEFAULT false NOT NULL, flspec_showbudgetprcnt boolean DEFAULT false NOT NULL, flspec_showdiff boolean DEFAULT false NOT NULL, flspec_showdiffprcnt boolean DEFAULT false NOT NULL, flspec_prcnt_flgrp_id integer DEFAULT (-1) NOT NULL, flspec_showcustom boolean DEFAULT false NOT NULL, flspec_showcustomprcnt boolean DEFAULT false NOT NULL, flspec_custom_source character(1) ); ALTER TABLE public.flspec OWNER TO admin; -- -- Name: TABLE flspec; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE flspec IS 'Financial Layout Special entries.'; -- -- Name: flspec_flspec_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE flspec_flspec_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.flspec_flspec_id_seq OWNER TO admin; -- -- Name: flspec_flspec_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE flspec_flspec_id_seq OWNED BY flspec.flspec_id; -- -- Name: flspec_flspec_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('flspec_flspec_id_seq', 1, false); -- -- Name: form; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE form ( form_id integer DEFAULT nextval(('"form_form_id_seq"'::text)::regclass) NOT NULL, form_name text NOT NULL, form_descrip text, form_report_id integer, form_key character varying(4), form_report_name text, CONSTRAINT form_form_name_check CHECK ((form_name <> ''::text)) ); ALTER TABLE public.form OWNER TO admin; -- -- Name: TABLE form; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE form IS 'Form information'; -- -- Name: COLUMN form.form_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN form.form_report_id IS 'Obsolete -- reference form_report_name instead.'; -- -- Name: form_form_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE form_form_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.form_form_id_seq OWNER TO admin; -- -- Name: form_form_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('form_form_id_seq', 23, true); -- -- Name: freightclass_freightclass_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE freightclass_freightclass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.freightclass_freightclass_id_seq OWNER TO admin; -- -- Name: freightclass_freightclass_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE freightclass_freightclass_id_seq OWNED BY freightclass.freightclass_id; -- -- Name: freightclass_freightclass_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('freightclass_freightclass_id_seq', 3, true); -- -- Name: glseries; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE glseries ( glseries_id integer DEFAULT nextval(('"glseries_glseries_id_seq"'::text)::regclass) NOT NULL, glseries_sequence integer, glseries_doctype character(2), glseries_docnumber text, glseries_accnt_id integer, glseries_amount numeric(20,2), glseries_source text, glseries_distdate date, glseries_notes text, glseries_misc_id integer ); ALTER TABLE public.glseries OWNER TO admin; -- -- Name: TABLE glseries; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE glseries IS 'Temporary table for storing information about General Ledger (G/L) Series Entries before Series Entries are posted'; -- -- Name: glseries_glseries_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE glseries_glseries_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.glseries_glseries_id_seq OWNER TO admin; -- -- Name: glseries_glseries_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('glseries_glseries_id_seq', 3511, true); -- -- Name: gltrans_gltrans_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE gltrans_gltrans_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.gltrans_gltrans_id_seq OWNER TO admin; -- -- Name: gltrans_gltrans_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('gltrans_gltrans_id_seq', 13062, true); -- -- Name: gltrans_sequence_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE gltrans_sequence_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.gltrans_sequence_seq OWNER TO admin; -- -- Name: gltrans_sequence_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('gltrans_sequence_seq', 6420, true); -- -- Name: grp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE grp ( grp_id integer NOT NULL, grp_name text NOT NULL, grp_descrip text, CONSTRAINT grp_grp_name_check CHECK ((grp_name <> ''::text)) ); ALTER TABLE public.grp OWNER TO admin; -- -- Name: TABLE grp; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE grp IS 'This table is the basic group information.'; -- -- Name: grp_grp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE grp_grp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.grp_grp_id_seq OWNER TO admin; -- -- Name: grp_grp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE grp_grp_id_seq OWNED BY grp.grp_id; -- -- Name: grp_grp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('grp_grp_id_seq', 1, true); -- -- Name: grppriv; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE grppriv ( grppriv_id integer NOT NULL, grppriv_grp_id integer NOT NULL, grppriv_priv_id integer NOT NULL ); ALTER TABLE public.grppriv OWNER TO admin; -- -- Name: TABLE grppriv; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE grppriv IS 'This is a specific priv for a specific group.'; -- -- Name: grppriv_grppriv_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE grppriv_grppriv_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.grppriv_grppriv_id_seq OWNER TO admin; -- -- Name: grppriv_grppriv_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE grppriv_grppriv_id_seq OWNED BY grppriv.grppriv_id; -- -- Name: grppriv_grppriv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('grppriv_grppriv_id_seq', 521, true); -- -- Name: hnfc; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE hnfc ( hnfc_id integer NOT NULL, hnfc_code text NOT NULL, CONSTRAINT hnfc_hnfc_code_check CHECK ((hnfc_code <> ''::text)) ); ALTER TABLE public.hnfc OWNER TO admin; -- -- Name: TABLE hnfc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE hnfc IS 'List of personal titles/honorifics used in cntct table.'; -- -- Name: hnfc_hnfc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE hnfc_hnfc_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.hnfc_hnfc_id_seq OWNER TO admin; -- -- Name: hnfc_hnfc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE hnfc_hnfc_id_seq OWNED BY hnfc.hnfc_id; -- -- Name: hnfc_hnfc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('hnfc_hnfc_id_seq', 5, true); -- -- Name: incdt_incdt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE incdt_incdt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.incdt_incdt_id_seq OWNER TO admin; -- -- Name: incdt_incdt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE incdt_incdt_id_seq OWNED BY incdt.incdt_id; -- -- Name: incdt_incdt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('incdt_incdt_id_seq', 5, true); -- -- Name: incdtcat_incdtcat_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE incdtcat_incdtcat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.incdtcat_incdtcat_id_seq OWNER TO admin; -- -- Name: incdtcat_incdtcat_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE incdtcat_incdtcat_id_seq OWNED BY incdtcat.incdtcat_id; -- -- Name: incdtcat_incdtcat_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('incdtcat_incdtcat_id_seq', 5, true); -- -- Name: incdthist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE incdthist ( incdthist_id integer NOT NULL, incdthist_incdt_id integer NOT NULL, incdthist_change character(1), incdthist_target_id integer, incdthist_timestamp timestamp without time zone DEFAULT now() NOT NULL, incdthist_username text DEFAULT geteffectivextuser() NOT NULL, incdthist_descrip text ); ALTER TABLE public.incdthist OWNER TO admin; -- -- Name: TABLE incdthist; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE incdthist IS 'Incident history changes'; -- -- Name: incdthist_incdthist_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE incdthist_incdthist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.incdthist_incdthist_id_seq OWNER TO admin; -- -- Name: incdthist_incdthist_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE incdthist_incdthist_id_seq OWNED BY incdthist.incdthist_id; -- -- Name: incdthist_incdthist_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('incdthist_incdthist_id_seq', 26, true); -- -- Name: incdtpriority_incdtpriority_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE incdtpriority_incdtpriority_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.incdtpriority_incdtpriority_id_seq OWNER TO admin; -- -- Name: incdtpriority_incdtpriority_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE incdtpriority_incdtpriority_id_seq OWNED BY incdtpriority.incdtpriority_id; -- -- Name: incdtpriority_incdtpriority_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('incdtpriority_incdtpriority_id_seq', 5, true); -- -- Name: incdtresolution_incdtresolution_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE incdtresolution_incdtresolution_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.incdtresolution_incdtresolution_id_seq OWNER TO admin; -- -- Name: incdtresolution_incdtresolution_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE incdtresolution_incdtresolution_id_seq OWNED BY incdtresolution.incdtresolution_id; -- -- Name: incdtresolution_incdtresolution_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('incdtresolution_incdtresolution_id_seq', 4, true); -- -- Name: incdtseverity_incdtseverity_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE incdtseverity_incdtseverity_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.incdtseverity_incdtseverity_id_seq OWNER TO admin; -- -- Name: incdtseverity_incdtseverity_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE incdtseverity_incdtseverity_id_seq OWNED BY incdtseverity.incdtseverity_id; -- -- Name: incdtseverity_incdtseverity_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('incdtseverity_incdtseverity_id_seq', 5, true); -- -- Name: invbal_invbal_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE invbal_invbal_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.invbal_invbal_id_seq OWNER TO admin; -- -- Name: invbal_invbal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE invbal_invbal_id_seq OWNED BY invbal.invbal_id; -- -- Name: invbal_invbal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('invbal_invbal_id_seq', 1, false); -- -- Name: invc_invc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE invc_invc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.invc_invc_id_seq OWNER TO admin; -- -- Name: invc_invc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('invc_invc_id_seq', 1, false); -- -- Name: invchead_invchead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE invchead_invchead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.invchead_invchead_id_seq OWNER TO admin; -- -- Name: invchead_invchead_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE invchead_invchead_id_seq OWNED BY invchead.invchead_id; -- -- Name: invchead_invchead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('invchead_invchead_id_seq', 127, true); -- -- Name: invcheadtax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invcheadtax ( ) INHERITS (taxhist); ALTER TABLE public.invcheadtax OWNER TO admin; -- -- Name: invcitem_invcitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE invcitem_invcitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.invcitem_invcitem_id_seq OWNER TO admin; -- -- Name: invcitem_invcitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE invcitem_invcitem_id_seq OWNED BY invcitem.invcitem_id; -- -- Name: invcitem_invcitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('invcitem_invcitem_id_seq', 153, true); -- -- Name: invcitemtax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invcitemtax ( ) INHERITS (taxhist); ALTER TABLE public.invcitemtax OWNER TO admin; -- -- Name: invcnt_invcnt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE invcnt_invcnt_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.invcnt_invcnt_id_seq OWNER TO admin; -- -- Name: invcnt_invcnt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('invcnt_invcnt_id_seq', 225, true); -- -- Name: invdetail; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invdetail ( invdetail_id integer DEFAULT nextval(('"invdetail_invdetail_id_seq"'::text)::regclass) NOT NULL, invdetail_transtype character(2), invdetail_invhist_id integer, invdetail_location_id integer, invdetail_qty numeric(18,6), invdetail_comments text, invdetail_qty_before numeric(18,6), invdetail_qty_after numeric(18,6), invdetail_invcitem_id integer, invdetail_expiration date, invdetail_warrpurc date, invdetail_ls_id integer ); ALTER TABLE public.invdetail OWNER TO admin; -- -- Name: TABLE invdetail; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE invdetail IS 'Detailed Inventory transaction information for Lot/Serial and Multiple Location Control (MLC) Items'; -- -- Name: invdetail_invdetail_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE invdetail_invdetail_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.invdetail_invdetail_id_seq OWNER TO admin; -- -- Name: invdetail_invdetail_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('invdetail_invdetail_id_seq', 1629, true); -- -- Name: invhist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invhist ( invhist_id integer DEFAULT nextval(('invhist_invhist_id_seq'::text)::regclass) NOT NULL, invhist_itemsite_id integer, invhist_transdate timestamp with time zone DEFAULT ('now'::text)::timestamp(6) with time zone, invhist_transtype character(2), invhist_invqty numeric(18,6), invhist_invuom text, invhist_ordnumber text, invhist_docnumber text, invhist_qoh_before numeric(18,6), invhist_qoh_after numeric(18,6), invhist_unitcost numeric(16,6), invhist_acct_id integer, invhist_xfer_warehous_id integer, invhist_comments text, invhist_posted boolean DEFAULT true, invhist_imported boolean, invhist_hasdetail boolean DEFAULT false, invhist_ordtype text, invhist_analyze boolean DEFAULT true, invhist_user text DEFAULT geteffectivextuser(), invhist_created timestamp with time zone DEFAULT now() NOT NULL, invhist_costmethod character(1) NOT NULL, invhist_value_before numeric(12,2) NOT NULL, invhist_value_after numeric(12,2) NOT NULL, invhist_series integer ); ALTER TABLE public.invhist OWNER TO admin; -- -- Name: TABLE invhist; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE invhist IS 'Inventory transaction history'; -- -- Name: invhist_invhist_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE invhist_invhist_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.invhist_invhist_id_seq OWNER TO admin; -- -- Name: invhist_invhist_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('invhist_invhist_id_seq', 4120, true); -- -- Name: invhistexpcat; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE invhistexpcat ( invhistexpcat_id integer NOT NULL, invhistexpcat_invhist_id integer NOT NULL, invhistexpcat_expcat_id integer NOT NULL ); ALTER TABLE public.invhistexpcat OWNER TO admin; -- -- Name: TABLE invhistexpcat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE invhistexpcat IS 'Track the relationship between an EX transaction in the invhist table and the corresponding Expense Category.'; -- -- Name: invhistexpcat_invhistexpcat_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE invhistexpcat_invhistexpcat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.invhistexpcat_invhistexpcat_id_seq OWNER TO admin; -- -- Name: invhistexpcat_invhistexpcat_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE invhistexpcat_invhistexpcat_id_seq OWNED BY invhistexpcat.invhistexpcat_id; -- -- Name: invhistexpcat_invhistexpcat_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('invhistexpcat_invhistexpcat_id_seq', 1, false); -- -- Name: invoiceitem; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW invoiceitem AS SELECT invcitem.invcitem_id, invcitem.invcitem_invchead_id, invcitem.invcitem_linenumber, invcitem.invcitem_item_id, invcitem.invcitem_warehous_id, invcitem.invcitem_custpn, invcitem.invcitem_number, invcitem.invcitem_descrip, invcitem.invcitem_ordered, invcitem.invcitem_billed, invcitem.invcitem_custprice, invcitem.invcitem_price, invcitem.invcitem_notes, invcitem.invcitem_salescat_id, invcitem.invcitem_taxtype_id, invcitem.invcitem_qty_uom_id, invcitem.invcitem_qty_invuomratio, invcitem.invcitem_price_uom_id, invcitem.invcitem_price_invuomratio, invcitem.invcitem_coitem_id, invcitem.invcitem_updateinv, invcitem.invcitem_rev_accnt_id, itemsite.itemsite_id, cohead.cohead_number, COALESCE((invcitem.invcitem_billed * invcitem.invcitem_qty_invuomratio), (0)::numeric) AS qty, COALESCE((invcitem.invcitem_price / invcitem.invcitem_price_invuomratio), (0)::numeric) AS unitprice, COALESCE(round(((invcitem.invcitem_billed * invcitem.invcitem_qty_invuomratio) * (invcitem.invcitem_price / invcitem.invcitem_price_invuomratio)), 2), (0)::numeric) AS extprice, currtobase(invchead.invchead_curr_id, COALESCE(round(((invcitem.invcitem_billed * invcitem.invcitem_qty_invuomratio) * (invcitem.invcitem_price / invcitem.invcitem_price_invuomratio)), 2), (0)::numeric), invchead.invchead_invcdate) AS baseextprice, (SELECT COALESCE(sum(invcitemtax.taxhist_tax), (0)::numeric) AS "coalesce" FROM invcitemtax WHERE (invcitemtax.taxhist_parent_id = invcitem.invcitem_id)) AS tax, ((SELECT COALESCE(sum(shipitem.shipitem_value), (itemcost(itemsite.itemsite_id) * invcitem.invcitem_billed), (0)::numeric) AS "coalesce" FROM shipitem WHERE (shipitem.shipitem_invcitem_id = invcitem.invcitem_id)) / CASE WHEN (invcitem.invcitem_billed <> (0)::numeric) THEN (invcitem.invcitem_billed * invcitem.invcitem_qty_invuomratio) ELSE (1)::numeric END) AS unitcost FROM ((((invcitem JOIN invchead ON ((invchead.invchead_id = invcitem.invcitem_invchead_id))) LEFT JOIN coitem ON ((coitem.coitem_id = invcitem.invcitem_coitem_id))) LEFT JOIN cohead ON ((cohead.cohead_id = coitem.coitem_cohead_id))) LEFT JOIN itemsite ON (((itemsite.itemsite_item_id = invcitem.invcitem_item_id) AND (itemsite.itemsite_warehous_id = invcitem.invcitem_warehous_id)))); ALTER TABLE public.invoiceitem OWNER TO admin; -- -- Name: VIEW invoiceitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON VIEW invoiceitem IS 'Single point for invoice item (invcitem) calculations.'; -- -- Name: ipsass_ipsass_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ipsass_ipsass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ipsass_ipsass_id_seq OWNER TO admin; -- -- Name: ipsass_ipsass_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ipsass_ipsass_id_seq OWNED BY ipsass.ipsass_id; -- -- Name: ipsass_ipsass_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ipsass_ipsass_id_seq', 5, true); -- -- Name: ipsctyp_ipsctyp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ipsctyp_ipsctyp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ipsctyp_ipsctyp_id_seq OWNER TO admin; -- -- Name: ipsctyp_ipsctyp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ipsctyp_ipsctyp_id_seq', 16, true); -- -- Name: ipscust_ipscust_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ipscust_ipscust_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ipscust_ipscust_id_seq OWNER TO admin; -- -- Name: ipscust_ipscust_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ipscust_ipscust_id_seq', 21, true); -- -- Name: ipsfreight_ipsfreight_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ipsfreight_ipsfreight_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ipsfreight_ipsfreight_id_seq OWNER TO admin; -- -- Name: ipsfreight_ipsfreight_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ipsfreight_ipsfreight_id_seq OWNED BY ipsfreight.ipsfreight_id; -- -- Name: ipsfreight_ipsfreight_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ipsfreight_ipsfreight_id_seq', 4, true); -- -- Name: ipshead_ipshead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ipshead_ipshead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ipshead_ipshead_id_seq OWNER TO admin; -- -- Name: ipshead_ipshead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ipshead_ipshead_id_seq', 65, true); -- -- Name: ipsitem_ipsitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ipsitem_ipsitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ipsitem_ipsitem_id_seq OWNER TO admin; -- -- Name: ipsitem_ipsitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ipsitem_ipsitem_id_seq', 78, true); -- -- Name: ipsitemchar_ipsitemchar_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ipsitemchar_ipsitemchar_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ipsitemchar_ipsitemchar_id_seq OWNER TO admin; -- -- Name: ipsitemchar_ipsitemchar_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ipsitemchar_ipsitemchar_id_seq OWNED BY ipsitemchar.ipsitemchar_id; -- -- Name: ipsitemchar_ipsitemchar_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ipsitemchar_ipsitemchar_id_seq', 1, false); -- -- Name: ipsprice; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW ipsprice AS SELECT ipsiteminfo.ipsitem_id AS ipsprice_id, 'I' AS ipsprice_source, ipsiteminfo.ipsitem_ipshead_id AS ipsprice_ipshead_id, ipsiteminfo.ipsitem_item_id AS ipsprice_item_id, itemuomtouom(ipsiteminfo.ipsitem_item_id, ipsiteminfo.ipsitem_qty_uom_id, NULL::integer, ipsiteminfo.ipsitem_qtybreak) AS ipsprice_qtybreak, CASE WHEN (ipsiteminfo.ipsitem_type = 'N'::bpchar) THEN ((ipsiteminfo.ipsitem_price * itemuomtouomratio(ipsiteminfo.ipsitem_item_id, NULL::integer, ipsiteminfo.ipsitem_price_uom_id)) * iteminvpricerat(ipsiteminfo.ipsitem_item_id)) WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN ((item.item_listprice - (item.item_listprice * ipsiteminfo.ipsitem_discntprcnt)) - ipsiteminfo.ipsitem_fixedamtdiscount) WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN ((item.item_listcost + (item.item_listcost * ipsiteminfo.ipsitem_discntprcnt)) + ipsiteminfo.ipsitem_fixedamtdiscount) ELSE NULL::numeric END AS ipsprice_price, ipsiteminfo.ipsitem_qtybreak AS ipsprice_uomqtybreak, ipsiteminfo.ipsitem_qty_uom_id AS ipsprice_uomqtybreak_uom_id, CASE WHEN (ipsiteminfo.ipsitem_type = 'N'::bpchar) THEN ipsiteminfo.ipsitem_price WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN ((item.item_listprice - (item.item_listprice * ipsiteminfo.ipsitem_discntprcnt)) - ipsiteminfo.ipsitem_fixedamtdiscount) WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN ((item.item_listcost + (item.item_listcost * ipsiteminfo.ipsitem_discntprcnt)) + ipsiteminfo.ipsitem_fixedamtdiscount) ELSE NULL::numeric END AS ipsprice_uomprice, ipsiteminfo.ipsitem_price_uom_id AS ipsprice_uomprice_uom_id, ipsiteminfo.ipsitem_discntprcnt AS ipsprice_discountpercent, ipsiteminfo.ipsitem_fixedamtdiscount AS ipsprice_discountfixed, ipsiteminfo.ipsitem_type AS ipsprice_type FROM (ipsiteminfo JOIN item ON ((item.item_id = ipsiteminfo.ipsitem_item_id))) UNION SELECT ipsiteminfo.ipsitem_id AS ipsprice_id, 'P' AS ipsprice_source, ipsiteminfo.ipsitem_ipshead_id AS ipsprice_ipshead_id, item.item_id AS ipsprice_item_id, ipsiteminfo.ipsitem_qtybreak AS ipsprice_qtybreak, CASE WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN ((item.item_listprice - (item.item_listprice * ipsiteminfo.ipsitem_discntprcnt)) - ipsiteminfo.ipsitem_fixedamtdiscount) WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN ((item.item_listcost + (item.item_listcost * ipsiteminfo.ipsitem_discntprcnt)) + ipsiteminfo.ipsitem_fixedamtdiscount) ELSE NULL::numeric END AS ipsprice_price, ipsiteminfo.ipsitem_qtybreak AS ipsprice_uomqtybreak, item.item_inv_uom_id AS ipsprice_uomqtybreak_uom_id, CASE WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN ((item.item_listprice - (item.item_listprice * ipsiteminfo.ipsitem_discntprcnt)) - ipsiteminfo.ipsitem_fixedamtdiscount) WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN ((item.item_listcost + (item.item_listcost * ipsiteminfo.ipsitem_discntprcnt)) + ipsiteminfo.ipsitem_fixedamtdiscount) ELSE NULL::numeric END AS ipsprice_uomprice, item.item_price_uom_id AS ipsprice_uomprice_uom_id, ipsiteminfo.ipsitem_discntprcnt AS ipsprice_discountpercent, ipsiteminfo.ipsitem_fixedamtdiscount AS ipsprice_discountfixed, ipsiteminfo.ipsitem_type AS ipsprice_type FROM (ipsiteminfo JOIN item ON ((ipsiteminfo.ipsitem_prodcat_id = item.item_prodcat_id))); ALTER TABLE public.ipsprice OWNER TO admin; -- -- Name: ipsprodcat_bak; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE ipsprodcat_bak ( ipsprodcat_id integer NOT NULL, ipsprodcat_ipshead_id integer NOT NULL, ipsprodcat_prodcat_id integer NOT NULL, ipsprodcat_qtybreak numeric(18,6) NOT NULL, ipsprodcat_discntprcnt numeric(10,6) NOT NULL, ipsprodcat_fixedamtdiscount numeric(16,4) DEFAULT 0.00 NOT NULL ); ALTER TABLE public.ipsprodcat_bak OWNER TO admin; -- -- Name: TABLE ipsprodcat_bak; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE ipsprodcat_bak IS 'Pricing Schedule Product Category information.'; -- -- Name: ipsprodcat_ipsprodcat_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ipsprodcat_ipsprodcat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ipsprodcat_ipsprodcat_id_seq OWNER TO admin; -- -- Name: ipsprodcat_ipsprodcat_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ipsprodcat_ipsprodcat_id_seq OWNED BY ipsprodcat_bak.ipsprodcat_id; -- -- Name: ipsprodcat_ipsprodcat_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ipsprodcat_ipsprodcat_id_seq', 1, false); -- -- Name: item_item_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE item_item_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.item_item_id_seq OWNER TO admin; -- -- Name: item_item_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('item_item_id_seq', 345, true); -- -- Name: itemalias_itemalias_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemalias_itemalias_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemalias_itemalias_id_seq OWNER TO admin; -- -- Name: itemalias_itemalias_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemalias_itemalias_id_seq', 15, true); -- -- Name: itematr_itematr_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itematr_itematr_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itematr_itematr_id_seq OWNER TO admin; -- -- Name: itematr_itematr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itematr_itematr_id_seq', 29, true); -- -- Name: itemcost_itemcost_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemcost_itemcost_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemcost_itemcost_id_seq OWNER TO admin; -- -- Name: itemcost_itemcost_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemcost_itemcost_id_seq', 429, true); -- -- Name: itemfrez_itemfrez_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemfrez_itemfrez_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemfrez_itemfrez_seq OWNER TO admin; -- -- Name: itemfrez_itemfrez_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemfrez_itemfrez_seq', 1, false); -- -- Name: itemgrp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemgrp ( itemgrp_id integer DEFAULT nextval(('"itemgrp_itemgrp_id_seq"'::text)::regclass) NOT NULL, itemgrp_name text NOT NULL, itemgrp_descrip text, CONSTRAINT itemgrp_itemgrp_name_check CHECK ((itemgrp_name <> ''::text)) ); ALTER TABLE public.itemgrp OWNER TO admin; -- -- Name: TABLE itemgrp; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemgrp IS 'Item Group information'; -- -- Name: itemgrp_itemgrp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemgrp_itemgrp_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemgrp_itemgrp_id_seq OWNER TO admin; -- -- Name: itemgrp_itemgrp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemgrp_itemgrp_id_seq', 24, true); -- -- Name: itemgrpitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemgrpitem ( itemgrpitem_id integer DEFAULT nextval(('"itemgrpitem_itemgrpitem_id_seq"'::text)::regclass) NOT NULL, itemgrpitem_itemgrp_id integer, itemgrpitem_item_id integer ); ALTER TABLE public.itemgrpitem OWNER TO admin; -- -- Name: TABLE itemgrpitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemgrpitem IS 'Item Group Item information'; -- -- Name: itemgrpitem_itemgrpitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemgrpitem_itemgrpitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemgrpitem_itemgrpitem_id_seq OWNER TO admin; -- -- Name: itemgrpitem_itemgrpitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemgrpitem_itemgrpitem_id_seq', 143, true); -- -- Name: itemimage; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW itemimage AS SELECT imageass.imageass_id AS itemimage_id, imageass.imageass_source_id AS itemimage_item_id, imageass.imageass_image_id AS itemimage_image_id, imageass.imageass_purpose AS itemimage_purpose FROM imageass WHERE (imageass.imageass_source = 'I'::text); ALTER TABLE public.itemimage OWNER TO admin; -- -- Name: VIEW itemimage; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON VIEW itemimage IS 'Itemimage view for legacy support. Use of itemimage is deprecated. Use imageass table for future development'; -- -- Name: itemimage_itemimage_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemimage_itemimage_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.itemimage_itemimage_id_seq OWNER TO admin; -- -- Name: itemimage_itemimage_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemimage_itemimage_id_seq', 29, true); -- -- Name: itemloc; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemloc ( itemloc_id integer DEFAULT nextval(('"itemloc_itemloc_id_seq"'::text)::regclass) NOT NULL, itemloc_itemsite_id integer NOT NULL, itemloc_location_id integer NOT NULL, itemloc_qty numeric(18,6) NOT NULL, itemloc_expiration date NOT NULL, itemloc_consolflag boolean, itemloc_ls_id integer, itemloc_warrpurc date ); ALTER TABLE public.itemloc OWNER TO admin; -- -- Name: TABLE itemloc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemloc IS 'Detailed Location information for Lot/Serial and Multiple Location Control (MLC) Items'; -- -- Name: itemloc_itemloc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemloc_itemloc_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.itemloc_itemloc_id_seq OWNER TO admin; -- -- Name: itemloc_itemloc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemloc_itemloc_id_seq', 667, true); -- -- Name: itemloc_series_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemloc_series_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemloc_series_seq OWNER TO admin; -- -- Name: itemloc_series_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemloc_series_seq', 1660, true); -- -- Name: itemlocdist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemlocdist ( itemlocdist_id integer DEFAULT nextval(('"itemlocdist_itemlocdist_id_seq"'::text)::regclass) NOT NULL, itemlocdist_itemlocdist_id integer, itemlocdist_source_type character(1), itemlocdist_source_id integer, itemlocdist_qty numeric(18,6), itemlocdist_series integer, itemlocdist_invhist_id integer, itemlocdist_itemsite_id integer, itemlocdist_reqlotserial boolean DEFAULT false, itemlocdist_flush boolean DEFAULT false, itemlocdist_expiration date, itemlocdist_distlotserial boolean, itemlocdist_warranty date, itemlocdist_ls_id integer, itemlocdist_order_type text, itemlocdist_order_id integer ); ALTER TABLE public.itemlocdist OWNER TO admin; -- -- Name: TABLE itemlocdist; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemlocdist IS 'Temporary table for storing information about Inventory distributions involving Lot/Serial and Multiple Location Control (MLC) Items'; -- -- Name: itemlocdist_itemlocdist_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemlocdist_itemlocdist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.itemlocdist_itemlocdist_id_seq OWNER TO admin; -- -- Name: itemlocdist_itemlocdist_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemlocdist_itemlocdist_id_seq', 2614, true); -- -- Name: itemlocpost; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemlocpost ( itemlocpost_id integer NOT NULL, itemlocpost_itemlocseries integer, itemlocpost_glseq integer ); ALTER TABLE public.itemlocpost OWNER TO admin; -- -- Name: TABLE itemlocpost; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemlocpost IS 'Temporary table for storing information about Inventory distribution G/L postings involving Lot/Serial and Multiple Location Control (MLC) Items'; -- -- Name: itemlocpost_itemlocpost_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemlocpost_itemlocpost_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.itemlocpost_itemlocpost_id_seq OWNER TO admin; -- -- Name: itemlocpost_itemlocpost_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE itemlocpost_itemlocpost_id_seq OWNED BY itemlocpost.itemlocpost_id; -- -- Name: itemlocpost_itemlocpost_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemlocpost_itemlocpost_id_seq', 277, true); -- -- Name: itemopn_itemopn_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemopn_itemopn_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemopn_itemopn_id_seq OWNER TO admin; -- -- Name: itemopn_itemopn_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemopn_itemopn_id_seq', 39, true); -- -- Name: itemsite_itemsite_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemsite_itemsite_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemsite_itemsite_id_seq OWNER TO admin; -- -- Name: itemsite_itemsite_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemsite_itemsite_id_seq', 385, true); -- -- Name: itemsrc_itemsrc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemsrc_itemsrc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemsrc_itemsrc_id_seq OWNER TO admin; -- -- Name: itemsrc_itemsrc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemsrc_itemsrc_id_seq', 107, true); -- -- Name: itemsrcp_itemsrcp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemsrcp_itemsrcp_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemsrcp_itemsrcp_id_seq OWNER TO admin; -- -- Name: itemsrcp_itemsrcp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemsrcp_itemsrcp_id_seq', 105, true); -- -- Name: itemsub_itemsub_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemsub_itemsub_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.itemsub_itemsub_id_seq OWNER TO admin; -- -- Name: itemsub_itemsub_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemsub_itemsub_id_seq', 18, true); -- -- Name: itemtax_itemtax_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemtax_itemtax_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.itemtax_itemtax_id_seq OWNER TO admin; -- -- Name: itemtax_itemtax_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE itemtax_itemtax_id_seq OWNED BY itemtax.itemtax_id; -- -- Name: itemtax_itemtax_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemtax_itemtax_id_seq', 9, true); -- -- Name: itemtrans; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemtrans ( itemtrans_id integer NOT NULL, itemtrans_source_item_id integer, itemtrans_target_item_id integer ); ALTER TABLE public.itemtrans OWNER TO admin; -- -- Name: TABLE itemtrans; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemtrans IS 'Item Transformation information'; -- -- Name: itemtrans_itemtrans_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemtrans_itemtrans_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.itemtrans_itemtrans_id_seq OWNER TO admin; -- -- Name: itemtrans_itemtrans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE itemtrans_itemtrans_id_seq OWNED BY itemtrans.itemtrans_id; -- -- Name: itemtrans_itemtrans_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemtrans_itemtrans_id_seq', 2, true); -- -- Name: itemuom; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE itemuom ( itemuom_id integer NOT NULL, itemuom_itemuomconv_id integer NOT NULL, itemuom_uomtype_id integer NOT NULL ); ALTER TABLE public.itemuom OWNER TO admin; -- -- Name: TABLE itemuom; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE itemuom IS 'A UOM type relation for a specific conversion.'; -- -- Name: itemuom_itemuom_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemuom_itemuom_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.itemuom_itemuom_id_seq OWNER TO admin; -- -- Name: itemuom_itemuom_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE itemuom_itemuom_id_seq OWNED BY itemuom.itemuom_id; -- -- Name: itemuom_itemuom_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemuom_itemuom_id_seq', 2, true); -- -- Name: itemuomconv_itemuomconv_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE itemuomconv_itemuomconv_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.itemuomconv_itemuomconv_id_seq OWNER TO admin; -- -- Name: itemuomconv_itemuomconv_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE itemuomconv_itemuomconv_id_seq OWNED BY itemuomconv.itemuomconv_id; -- -- Name: itemuomconv_itemuomconv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('itemuomconv_itemuomconv_id_seq', 2, true); -- -- Name: journal_number_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE journal_number_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.journal_number_seq OWNER TO admin; -- -- Name: journal_number_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('journal_number_seq', 6964, true); -- -- Name: jrnluse; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE jrnluse ( jrnluse_id integer DEFAULT nextval(('"jrnluse_jrnluse_id_seq"'::text)::regclass) NOT NULL, jrnluse_date timestamp without time zone, jrnluse_number integer, jrnluse_use text ); ALTER TABLE public.jrnluse OWNER TO admin; -- -- Name: TABLE jrnluse; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE jrnluse IS 'Journal entry and use information'; -- -- Name: jrnluse_jrnluse_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE jrnluse_jrnluse_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.jrnluse_jrnluse_id_seq OWNER TO admin; -- -- Name: jrnluse_jrnluse_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('jrnluse_jrnluse_id_seq', 4975, true); -- -- Name: labeldef; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE labeldef ( labeldef_id integer NOT NULL, labeldef_name text NOT NULL, labeldef_papersize text NOT NULL, labeldef_columns integer NOT NULL, labeldef_rows integer NOT NULL, labeldef_width integer NOT NULL, labeldef_height integer NOT NULL, labeldef_start_offset_x integer NOT NULL, labeldef_start_offset_y integer NOT NULL, labeldef_horizontal_gap integer NOT NULL, labeldef_vertical_gap integer NOT NULL ); ALTER TABLE public.labeldef OWNER TO admin; -- -- Name: labeldef_labeldef_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE labeldef_labeldef_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.labeldef_labeldef_id_seq OWNER TO admin; -- -- Name: labeldef_labeldef_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE labeldef_labeldef_id_seq OWNED BY labeldef.labeldef_id; -- -- Name: labeldef_labeldef_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('labeldef_labeldef_id_seq', 4, true); -- -- Name: labelform; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE labelform ( labelform_id integer DEFAULT nextval(('"labelform_labelform_id_seq"'::text)::regclass) NOT NULL, labelform_name text NOT NULL, labelform_report_id integer, labelform_perpage integer, labelform_report_name text, CONSTRAINT labelform_labelform_name_check CHECK ((labelform_name <> ''::text)) ); ALTER TABLE public.labelform OWNER TO admin; -- -- Name: TABLE labelform; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE labelform IS 'Label Form information'; -- -- Name: COLUMN labelform.labelform_report_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN labelform.labelform_report_id IS 'Obsolete -- reference labelform_report_name instead.'; -- -- Name: labelform_labelform_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE labelform_labelform_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.labelform_labelform_id_seq OWNER TO admin; -- -- Name: labelform_labelform_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('labelform_labelform_id_seq', 6, true); -- -- Name: lang; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE lang ( lang_id integer NOT NULL, lang_qt_number integer, lang_abbr3 text, lang_abbr2 text, lang_name text NOT NULL ); ALTER TABLE public.lang OWNER TO admin; -- -- Name: TABLE lang; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE lang IS 'Table mapping ISO 639-1 and 639-2 language codes to Qt''s enum QLocale::Language integer values. See http://www.loc.gov/standards/iso639-2/php/code_list.php and the QLocale documentation..'; -- -- Name: COLUMN lang.lang_abbr3; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN lang.lang_abbr3 IS 'ISO 639-2 code for language. Where there is a choice between bibliographic (B) and terminology (T) usage, this value is the T code'; -- -- Name: COLUMN lang.lang_abbr2; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN lang.lang_abbr2 IS 'ISO 639-1 code for language'; -- -- Name: COLUMN lang.lang_name; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN lang.lang_name IS 'Name of a human language, taken from the ISO 639-2 documentation'; -- -- Name: lang_lang_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE lang_lang_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.lang_lang_id_seq OWNER TO admin; -- -- Name: lang_lang_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE lang_lang_id_seq OWNED BY lang.lang_id; -- -- Name: lang_lang_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('lang_lang_id_seq', 499, true); -- -- Name: locale; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE locale ( locale_id integer DEFAULT nextval(('locale_locale_id_seq'::text)::regclass) NOT NULL, locale_code text NOT NULL, locale_descrip text, locale_lang_file text, locale_dateformat text, locale_currformat text, locale_qtyformat text, locale_comments text, locale_qtyperformat text, locale_salespriceformat text, locale_extpriceformat text, locale_timeformat text, locale_timestampformat text, local_costformat text, locale_costformat text, locale_purchpriceformat text, locale_uomratioformat text, locale_intervalformat text, locale_lang_id integer, locale_country_id integer, locale_error_color text, locale_warning_color text, locale_emphasis_color text, locale_altemphasis_color text, locale_expired_color text, locale_future_color text, locale_curr_scale integer, locale_salesprice_scale integer, locale_purchprice_scale integer, locale_extprice_scale integer, locale_cost_scale integer, locale_qty_scale integer, locale_qtyper_scale integer, locale_uomratio_scale integer, locale_percent_scale integer DEFAULT 2, locale_weight_scale integer DEFAULT 2 NOT NULL, CONSTRAINT locale_locale_code_check CHECK ((locale_code <> ''::text)) ); ALTER TABLE public.locale OWNER TO admin; -- -- Name: TABLE locale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE locale IS 'The locale table holds information required to show data to the user in a localized format. Colors are either names documented by the WWW Consortium or RGB colors. Format for RGB colors is #RGB, #RRGGBB, or #RRRGGGBBB, where the letters R, G, and B stand for hexidecimal digits.'; -- -- Name: COLUMN locale.locale_lang_file; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_lang_file IS 'Deprecated'; -- -- Name: COLUMN locale.locale_dateformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_dateformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_currformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_currformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_qtyformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_qtyformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_qtyperformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_qtyperformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_salespriceformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_salespriceformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_extpriceformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_extpriceformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_timeformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_timeformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_timestampformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_timestampformat IS 'Deprecated'; -- -- Name: COLUMN locale.local_costformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.local_costformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_costformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_costformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_purchpriceformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_purchpriceformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_uomratioformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_uomratioformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_intervalformat; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_intervalformat IS 'Deprecated'; -- -- Name: COLUMN locale.locale_error_color; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_error_color IS 'Color to use to mark data that require immediate attention.'; -- -- Name: COLUMN locale.locale_warning_color; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_warning_color IS 'Color to use to mark data that require attention soon.'; -- -- Name: COLUMN locale.locale_emphasis_color; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_emphasis_color IS 'Color to use to mark data that need to stand out but are not in error.'; -- -- Name: COLUMN locale.locale_altemphasis_color; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_altemphasis_color IS 'Color to use to mark data that need to stand out and be differentiated from other emphasized data.'; -- -- Name: COLUMN locale.locale_expired_color; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_expired_color IS 'Color to use to mark data that are no longer current.'; -- -- Name: COLUMN locale.locale_future_color; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_future_color IS 'Color to use to mark data that will not be effective until some point in the future.'; -- -- Name: COLUMN locale.locale_curr_scale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_curr_scale IS 'Number of decimal places to show when displaying Currency values.'; -- -- Name: COLUMN locale.locale_salesprice_scale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_salesprice_scale IS 'Number of decimal places to show when displaying Sales Prices.'; -- -- Name: COLUMN locale.locale_purchprice_scale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_purchprice_scale IS 'Number of decimal places to show when displaying Purchase Prices.'; -- -- Name: COLUMN locale.locale_extprice_scale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_extprice_scale IS 'Number of decimal places to show when displaying Extended Prices.'; -- -- Name: COLUMN locale.locale_cost_scale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_cost_scale IS 'Number of decimal places to show when displaying Costs.'; -- -- Name: COLUMN locale.locale_qty_scale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_qty_scale IS 'Number of decimal places to show when displaying Quantities.'; -- -- Name: COLUMN locale.locale_qtyper_scale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_qtyper_scale IS 'Number of decimal places to show when displaying Quantities Per.'; -- -- Name: COLUMN locale.locale_uomratio_scale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN locale.locale_uomratio_scale IS 'Number of decimal places to show when displaying UOM Ratios.'; -- -- Name: locale_locale_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE locale_locale_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.locale_locale_id_seq OWNER TO admin; -- -- Name: locale_locale_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('locale_locale_id_seq', 30, true); -- -- Name: location_location_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE location_location_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.location_location_id_seq OWNER TO admin; -- -- Name: location_location_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('location_location_id_seq', 131, true); -- -- Name: locitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE locitem ( locitem_id integer DEFAULT nextval(('"locitem_locitem_id_seq"'::text)::regclass) NOT NULL, locitem_location_id integer, locitem_item_id integer ); ALTER TABLE public.locitem OWNER TO admin; -- -- Name: TABLE locitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE locitem IS 'Restricted Warehouse Location Allowable Items information'; -- -- Name: locitem_locitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE locitem_locitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.locitem_locitem_id_seq OWNER TO admin; -- -- Name: locitem_locitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('locitem_locitem_id_seq', 25, true); -- -- Name: log_log_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE log_log_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.log_log_id_seq OWNER TO admin; -- -- Name: log_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('log_log_id_seq', 747, true); -- -- Name: metric; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE metric ( metric_id integer DEFAULT nextval(('metric_metric_id_seq'::text)::regclass) NOT NULL, metric_name text NOT NULL, metric_value text, metric_module text, CONSTRAINT metric_metric_name_check CHECK ((metric_name <> ''::text)) ); ALTER TABLE public.metric OWNER TO admin; -- -- Name: TABLE metric; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE metric IS 'Application-wide settings information'; -- -- Name: metric_metric_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE metric_metric_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.metric_metric_id_seq OWNER TO admin; -- -- Name: metric_metric_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('metric_metric_id_seq', 296, true); -- -- Name: metricenc; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE metricenc ( metricenc_id integer NOT NULL, metricenc_name text NOT NULL, metricenc_value bytea, metricenc_module text, CONSTRAINT metricenc_metricenc_name_check CHECK ((metricenc_name <> ''::text)) ); ALTER TABLE public.metricenc OWNER TO admin; -- -- Name: TABLE metricenc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE metricenc IS 'Application-wide settings information encrypted data'; -- -- Name: metricenc_metricenc_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE metricenc_metricenc_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.metricenc_metricenc_id_seq OWNER TO admin; -- -- Name: metricenc_metricenc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE metricenc_metricenc_id_seq OWNED BY metricenc.metricenc_id; -- -- Name: metricenc_metricenc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('metricenc_metricenc_id_seq', 11, true); -- -- Name: misc_index_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE misc_index_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.misc_index_seq OWNER TO admin; -- -- Name: misc_index_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('misc_index_seq', 2236, true); -- -- Name: mrghist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE mrghist ( mrghist_cntct_id integer NOT NULL, mrghist_table text NOT NULL, mrghist_pkey_col text NOT NULL, mrghist_pkey_id integer NOT NULL, mrghist_cntct_col text NOT NULL ); ALTER TABLE public.mrghist OWNER TO admin; -- -- Name: mrgundo; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE mrgundo ( mrgundo_base_schema text, mrgundo_base_table text, mrgundo_base_id integer, mrgundo_schema text, mrgundo_table text, mrgundo_pkey_col text, mrgundo_pkey_id integer, mrgundo_col text, mrgundo_value text, mrgundo_type text ); ALTER TABLE public.mrgundo OWNER TO admin; -- -- Name: TABLE mrgundo; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE mrgundo IS 'This table keeps track of the original values of changes made while merging two records. It is a generalization of mrghist and trgthist, which are specific to merging contacts. The schema, table, and pkey_id columns uniquely identify the record that was changed while the _base_ columns identify the merge target. The _base_ columns are required to allow finding all of the records that pertain to a particular merge (e.g. find changes to the comment table that pertain to a crmacct merge).'; -- -- Name: COLUMN mrgundo.mrgundo_base_schema; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_base_schema IS 'The schema in which the merge target resides.'; -- -- Name: COLUMN mrgundo.mrgundo_base_table; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_base_table IS 'The table in which the merge target resides.'; -- -- Name: COLUMN mrgundo.mrgundo_base_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_base_id IS 'The internal id of the merge target record.'; -- -- Name: COLUMN mrgundo.mrgundo_schema; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_schema IS 'The name of the schema in which the modified table resides.'; -- -- Name: COLUMN mrgundo.mrgundo_table; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_table IS 'The name of the table that was modified during a merge.'; -- -- Name: COLUMN mrgundo.mrgundo_pkey_col; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_pkey_col IS 'The name of the primary key column in the modified table. This could be derived during the undo processing but it is simpler just to store it during the merge.'; -- -- Name: COLUMN mrgundo.mrgundo_pkey_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_pkey_id IS 'The primary key of the modified record.'; -- -- Name: COLUMN mrgundo.mrgundo_col; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_col IS 'The column that was modified.'; -- -- Name: COLUMN mrgundo.mrgundo_value; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_value IS 'The value of the column before the change.'; -- -- Name: COLUMN mrgundo.mrgundo_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN mrgundo.mrgundo_type IS 'The data type of the modified column. This could be derived during the undo processing but it is simpler just to store it during the merge.'; -- -- Name: msg; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE msg ( msg_id integer DEFAULT nextval(('"msg_msg_id_seq"'::text)::regclass) NOT NULL, msg_posted timestamp with time zone, msg_scheduled timestamp with time zone, msg_text text, msg_expires timestamp with time zone, msg_username text ); ALTER TABLE public.msg OWNER TO admin; -- -- Name: TABLE msg; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE msg IS 'System Message information'; -- -- Name: msg_msg_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE msg_msg_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.msg_msg_id_seq OWNER TO admin; -- -- Name: msg_msg_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('msg_msg_id_seq', 29, true); -- -- Name: msguser; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE msguser ( msguser_id integer DEFAULT nextval(('"msguser_msguser_id_seq"'::text)::regclass) NOT NULL, msguser_msg_id integer, msguser_viewed timestamp with time zone, msguser_username text ); ALTER TABLE public.msguser OWNER TO admin; -- -- Name: TABLE msguser; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE msguser IS 'System Message user information'; -- -- Name: msguser_msguser_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE msguser_msguser_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.msguser_msguser_id_seq OWNER TO admin; -- -- Name: msguser_msguser_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('msguser_msguser_id_seq', 25, true); -- -- Name: nvend_nvend_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE nvend_nvend_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.nvend_nvend_id_seq OWNER TO admin; -- -- Name: nvend_nvend_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('nvend_nvend_id_seq', 1, false); -- -- Name: obsolete_tax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE obsolete_tax ( tax_id integer DEFAULT nextval(('"tax_tax_id_seq"'::text)::regclass) NOT NULL, tax_code text, tax_descrip text, tax_ratea numeric(8,4), tax_sales_accnt_id integer, tax_freight boolean DEFAULT false NOT NULL, tax_cumulative boolean DEFAULT false NOT NULL, tax_rateb numeric(8,4), tax_salesb_accnt_id integer, tax_ratec numeric(8,4), tax_salesc_accnt_id integer ); ALTER TABLE public.obsolete_tax OWNER TO admin; -- -- Name: TABLE obsolete_tax; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE obsolete_tax IS 'Tax information. Obsolete table structure.'; -- -- Name: COLUMN obsolete_tax.tax_freight; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN obsolete_tax.tax_freight IS 'Deprecated in 2.1 and moved to taxsel table where taxtype is the system defined Freight.'; -- -- Name: ophead_ophead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE ophead_ophead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.ophead_ophead_id_seq OWNER TO admin; -- -- Name: ophead_ophead_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE ophead_ophead_id_seq OWNED BY ophead.ophead_id; -- -- Name: ophead_ophead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('ophead_ophead_id_seq', 4, true); -- -- Name: opsource; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE opsource ( opsource_id integer NOT NULL, opsource_name text NOT NULL, opsource_descrip text, CONSTRAINT opsource_opsource_name_check CHECK ((opsource_name <> ''::text)) ); ALTER TABLE public.opsource OWNER TO admin; -- -- Name: TABLE opsource; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE opsource IS 'Opportunity Lead Source values.'; -- -- Name: opsource_opsource_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE opsource_opsource_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.opsource_opsource_id_seq OWNER TO admin; -- -- Name: opsource_opsource_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE opsource_opsource_id_seq OWNED BY opsource.opsource_id; -- -- Name: opsource_opsource_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('opsource_opsource_id_seq', 3, true); -- -- Name: opstage; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE opstage ( opstage_id integer NOT NULL, opstage_name text NOT NULL, opstage_descrip text, opstage_order integer DEFAULT 0 NOT NULL, opstage_opinactive boolean DEFAULT false, CONSTRAINT opstage_opstage_name_check CHECK ((opstage_name <> ''::text)) ); ALTER TABLE public.opstage OWNER TO admin; -- -- Name: TABLE opstage; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE opstage IS 'Opportunity stage values.'; -- -- Name: opstage_opstage_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE opstage_opstage_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.opstage_opstage_id_seq OWNER TO admin; -- -- Name: opstage_opstage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE opstage_opstage_id_seq OWNED BY opstage.opstage_id; -- -- Name: opstage_opstage_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('opstage_opstage_id_seq', 4, true); -- -- Name: optype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE optype ( optype_id integer NOT NULL, optype_name text NOT NULL, optype_descrip text, CONSTRAINT optype_optype_name_check CHECK ((optype_name <> ''::text)) ); ALTER TABLE public.optype OWNER TO admin; -- -- Name: TABLE optype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE optype IS 'Opportunity Type values.'; -- -- Name: optype_optype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE optype_optype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.optype_optype_id_seq OWNER TO admin; -- -- Name: optype_optype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE optype_optype_id_seq OWNED BY optype.optype_id; -- -- Name: optype_optype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('optype_optype_id_seq', 3, true); -- -- Name: orderhead; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW orderhead AS SELECT DISTINCT data.orderhead_id, data.orderhead_type, data.orderhead_number, data.orderhead_status, data.orderhead_orderdate, data.orderhead_linecount, data.orderhead_from_id, data.orderhead_from, data.orderhead_to_id, data.orderhead_to, data.orderhead_curr_id, data.orderhead_agent_username, data.orderhead_shipvia FROM (SELECT pohead.pohead_id AS orderhead_id, 'PO'::text AS orderhead_type, pohead.pohead_number AS orderhead_number, pohead.pohead_status AS orderhead_status, pohead.pohead_orderdate AS orderhead_orderdate, (SELECT count(*) AS count FROM poitem WHERE (poitem.poitem_pohead_id = pohead.pohead_id)) AS orderhead_linecount, pohead.pohead_vend_id AS orderhead_from_id, vendinfo.vend_name AS orderhead_from, NULL::integer AS orderhead_to_id, ''::text AS orderhead_to, pohead.pohead_curr_id AS orderhead_curr_id, pohead.pohead_agent_username AS orderhead_agent_username, pohead.pohead_shipvia AS orderhead_shipvia FROM (pohead LEFT JOIN vendinfo ON ((pohead.pohead_vend_id = vendinfo.vend_id))) UNION ALL SELECT cohead.cohead_id AS orderhead_id, 'SO'::text AS orderhead_type, cohead.cohead_number AS orderhead_number, cohead.cohead_status AS orderhead_status, cohead.cohead_orderdate AS orderhead_orderdate, (SELECT count(*) AS count FROM coitem WHERE (coitem.coitem_cohead_id = cohead.cohead_id)) AS orderhead_linecount, NULL::unknown AS orderhead_from_id, ''::text AS orderhead_from, cohead.cohead_cust_id AS orderhead_to_id, CASE WHEN (length(cohead.cohead_shiptoname) > 0) THEN cohead.cohead_shiptoname ELSE cohead.cohead_billtoname END AS orderhead_to, cohead.cohead_curr_id AS orderhead_curr_id, ''::text AS orderhead_agent_username, cohead.cohead_shipvia AS orderhead_shipvia FROM cohead) data; ALTER TABLE public.orderhead OWNER TO admin; -- -- Name: VIEW orderhead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON VIEW orderhead IS 'Union of all orders for use by widgets and stored procedures which process multiple types of order'; -- -- Name: orderitem; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW orderitem AS (SELECT poitem.poitem_id AS orderitem_id, 'PO' AS orderitem_orderhead_type, poitem.poitem_pohead_id AS orderitem_orderhead_id, poitem.poitem_linenumber AS orderitem_linenumber, poitem.poitem_status AS orderitem_status, poitem.poitem_itemsite_id AS orderitem_itemsite_id, poitem.poitem_duedate AS orderitem_scheddate, poitem.poitem_qty_ordered AS orderitem_qty_ordered, poitem.poitem_qty_returned AS orderitem_qty_shipped, poitem.poitem_qty_received AS orderitem_qty_received, uom.uom_id AS orderitem_qty_uom_id, poitem.poitem_invvenduomratio AS orderitem_qty_invuomratio, poitem.poitem_unitprice AS orderitem_unitcost, pohead.pohead_curr_id AS orderitem_unitcost_curr_id, poitem.poitem_freight AS orderitem_freight, poitem.poitem_freight_received AS orderitem_freight_received, pohead.pohead_curr_id AS orderitem_freight_curr_id FROM ((poitem LEFT JOIN pohead ON ((poitem.poitem_pohead_id = pohead.pohead_id))) LEFT JOIN uom ON ((uom.uom_name = poitem.poitem_vend_uom))) UNION ALL SELECT coitem.coitem_id AS orderitem_id, 'SO' AS orderitem_orderhead_type, coitem.coitem_cohead_id AS orderitem_orderhead_id, coitem.coitem_linenumber AS orderitem_linenumber, coitem.coitem_status AS orderitem_status, coitem.coitem_itemsite_id AS orderitem_itemsite_id, coitem.coitem_scheddate AS orderitem_scheddate, coitem.coitem_qtyord AS orderitem_qty_ordered, coitem.coitem_qtyshipped AS orderitem_qty_shipped, coitem.coitem_qtyreturned AS orderitem_qty_received, coitem.coitem_qty_uom_id AS orderitem_qty_uom_id, coitem.coitem_qty_invuomratio AS orderitem_qty_invuomratio, coitem.coitem_unitcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL::unknown AS orderitem_freight, NULL::unknown AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM coitem) UNION ALL SELECT quitem.quitem_id AS orderitem_id, 'QU' AS orderitem_orderhead_type, quitem.quitem_quhead_id AS orderitem_orderhead_id, quitem.quitem_linenumber AS orderitem_linenumber, 'O' AS orderitem_status, quitem.quitem_itemsite_id AS orderitem_itemsite_id, quitem.quitem_scheddate AS orderitem_scheddate, quitem.quitem_qtyord AS orderitem_qty_ordered, 0 AS orderitem_qty_shipped, 0 AS orderitem_qty_received, quitem.quitem_qty_uom_id AS orderitem_qty_uom_id, quitem.quitem_qty_invuomratio AS orderitem_qty_invuomratio, quitem.quitem_unitcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL::unknown AS orderitem_freight, NULL::unknown AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM quitem; ALTER TABLE public.orderitem OWNER TO admin; -- -- Name: VIEW orderitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON VIEW orderitem IS 'Union of all order line items for use by widgets and stored procedures which process multiple types of order'; -- -- Name: orderseq; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE orderseq ( orderseq_id integer DEFAULT nextval(('orderseq_orderseq_id_seq'::text)::regclass) NOT NULL, orderseq_name text NOT NULL, orderseq_number integer, orderseq_table text, orderseq_numcol text, orderseq_seqiss seqiss[], CONSTRAINT orderseq_orderseq_name_check CHECK ((orderseq_name <> ''::text)) ); ALTER TABLE public.orderseq OWNER TO admin; -- -- Name: TABLE orderseq; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE orderseq IS 'Configuration information for common numbering sequences'; -- -- Name: orderseq_orderseq_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE orderseq_orderseq_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.orderseq_orderseq_id_seq OWNER TO admin; -- -- Name: orderseq_orderseq_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('orderseq_orderseq_id_seq', 24, true); -- -- Name: pack; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE pack ( pack_id integer NOT NULL, pack_head_id integer NOT NULL, pack_head_type text NOT NULL, pack_shiphead_id integer, pack_printed boolean DEFAULT false NOT NULL, CONSTRAINT pack_pack_head_type_check CHECK (((pack_head_type = 'SO'::text) OR (pack_head_type = 'TO'::text))) ); ALTER TABLE public.pack OWNER TO admin; -- -- Name: TABLE pack; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE pack IS 'Temporary table for storing information about Orders added to the Packing List Batch'; -- -- Name: pack_pack_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE pack_pack_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.pack_pack_id_seq OWNER TO admin; -- -- Name: pack_pack_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE pack_pack_id_seq OWNED BY pack.pack_id; -- -- Name: pack_pack_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('pack_pack_id_seq', 2, true); -- -- Name: payaropen; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE payaropen ( payaropen_ccpay_id integer NOT NULL, payaropen_aropen_id integer NOT NULL, payaropen_amount numeric(20,2) DEFAULT 0.00 NOT NULL, payaropen_curr_id integer DEFAULT basecurrid() ); ALTER TABLE public.payaropen OWNER TO admin; -- -- Name: TABLE payaropen; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE payaropen IS 'Credit Card payment to credit memo join table'; -- -- Name: payco; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE payco ( payco_ccpay_id integer NOT NULL, payco_cohead_id integer NOT NULL, payco_amount numeric(20,2) DEFAULT 0.00 NOT NULL, payco_curr_id integer DEFAULT basecurrid() ); ALTER TABLE public.payco OWNER TO admin; -- -- Name: TABLE payco; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE payco IS 'Credit Card payment to sales order join table'; -- -- Name: period_period_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE period_period_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.period_period_id_seq OWNER TO admin; -- -- Name: period_period_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE period_period_id_seq OWNED BY period.period_id; -- -- Name: period_period_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('period_period_id_seq', 128, true); -- -- Name: pkgdep; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE pkgdep ( pkgdep_id integer NOT NULL, pkgdep_pkghead_id integer NOT NULL, pkgdep_parent_pkghead_id integer NOT NULL ); ALTER TABLE public.pkgdep OWNER TO admin; -- -- Name: TABLE pkgdep; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE pkgdep IS 'Package Dependencies list describing which packages are dependent on which other packages.'; -- -- Name: COLUMN pkgdep.pkgdep_pkghead_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN pkgdep.pkgdep_pkghead_id IS 'This is the internal ID of a package which requires at least one other package to be installed first to operate successfully'; -- -- Name: COLUMN pkgdep.pkgdep_parent_pkghead_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN pkgdep.pkgdep_parent_pkghead_id IS 'This is the internal ID of a package which must be installed for the package pointed to by pkgdep_pkghead_id to operate successfully.'; -- -- Name: pkgdep_pkgdep_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE pkgdep_pkgdep_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.pkgdep_pkgdep_id_seq OWNER TO admin; -- -- Name: pkgdep_pkgdep_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE pkgdep_pkgdep_id_seq OWNED BY pkgdep.pkgdep_id; -- -- Name: pkgdep_pkgdep_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('pkgdep_pkgdep_id_seq', 1, false); -- -- Name: pkghead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE pkghead ( pkghead_id integer NOT NULL, pkghead_name text NOT NULL, pkghead_descrip text, pkghead_version text NOT NULL, pkghead_developer text NOT NULL, pkghead_notes text, pkghead_created timestamp with time zone, pkghead_updated timestamp with time zone, pkghead_indev boolean DEFAULT false NOT NULL, CONSTRAINT pkghead_pkghead_name_check CHECK ((pkghead_name <> ''::text)) ); ALTER TABLE public.pkghead OWNER TO admin; -- -- Name: TABLE pkghead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE pkghead IS 'Information about non-core Packages added to the database'; -- -- Name: COLUMN pkghead.pkghead_indev; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN pkghead.pkghead_indev IS 'Flag indicating whether the contents of this package may be modified in-place - this package is /in dev/elopment.'; -- -- Name: pkghead_pkghead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE pkghead_pkghead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.pkghead_pkghead_id_seq OWNER TO admin; -- -- Name: pkghead_pkghead_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE pkghead_pkghead_id_seq OWNED BY pkghead.pkghead_id; -- -- Name: pkghead_pkghead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('pkghead_pkghead_id_seq', 15, true); -- -- Name: pkgitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE pkgitem ( pkgitem_id integer NOT NULL, pkgitem_pkghead_id integer, pkgitem_type text, pkgitem_item_id integer NOT NULL, pkgitem_name text NOT NULL, pkgitem_descrip text, CONSTRAINT pkgitem_pkgitem_type_check CHECK (((((((((((((pkgitem_type = 'C'::text) OR (pkgitem_type = 'D'::text)) OR (pkgitem_type = 'F'::text)) OR (pkgitem_type = 'G'::text)) OR (pkgitem_type = 'I'::text)) OR (pkgitem_type = 'M'::text)) OR (pkgitem_type = 'P'::text)) OR (pkgitem_type = 'R'::text)) OR (pkgitem_type = 'S'::text)) OR (pkgitem_type = 'T'::text)) OR (pkgitem_type = 'U'::text)) OR (pkgitem_type = 'V'::text))) ); ALTER TABLE public.pkgitem OWNER TO admin; -- -- Name: TABLE pkgitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE pkgitem IS 'Deprecated - the pkgitem table is no longer used to track package contents. It has been replaced by direct queries to the database schema and component tables. This table will be removed when all users have switched to Updater 2.2.0 or later.'; -- -- Name: pkgitem_pkgitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE pkgitem_pkgitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.pkgitem_pkgitem_id_seq OWNER TO admin; -- -- Name: pkgitem_pkgitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE pkgitem_pkgitem_id_seq OWNED BY pkgitem.pkgitem_id; -- -- Name: pkgitem_pkgitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('pkgitem_pkgitem_id_seq', 199, true); -- -- Name: plancode_plancode_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE plancode_plancode_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.plancode_plancode_id_seq OWNER TO admin; -- -- Name: plancode_plancode_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('plancode_plancode_id_seq', 28, true); -- -- Name: planord_planord_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE planord_planord_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.planord_planord_id_seq OWNER TO admin; -- -- Name: planord_planord_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('planord_planord_id_seq', 1476, true); -- -- Name: pohead_pohead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE pohead_pohead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.pohead_pohead_id_seq OWNER TO admin; -- -- Name: pohead_pohead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('pohead_pohead_id_seq', 572, true); -- -- Name: poitem_poitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE poitem_poitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.poitem_poitem_id_seq OWNER TO admin; -- -- Name: poitem_poitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('poitem_poitem_id_seq', 607, true); -- -- Name: recv; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE recv ( recv_id integer NOT NULL, recv_order_type text NOT NULL, recv_order_number text NOT NULL, recv_orderitem_id integer NOT NULL, recv_agent_username text, recv_itemsite_id integer, recv_vend_id integer, recv_vend_item_number text, recv_vend_item_descrip text, recv_vend_uom text, recv_purchcost numeric(16,6), recv_purchcost_curr_id integer, recv_duedate date, recv_qty numeric(18,6), recv_recvcost numeric(16,6), recv_recvcost_curr_id integer, recv_freight numeric(16,4), recv_freight_curr_id integer, recv_date timestamp with time zone, recv_value numeric(18,6), recv_posted boolean DEFAULT false NOT NULL, recv_invoiced boolean DEFAULT false NOT NULL, recv_vohead_id integer, recv_voitem_id integer, recv_trans_usr_name text DEFAULT geteffectivextuser() NOT NULL, recv_notes text, recv_gldistdate date, recv_splitfrom_id integer, recv_rlsd_duedate date, CONSTRAINT recv_recv_order_type_check CHECK ((((recv_order_type = 'PO'::text) OR (recv_order_type = 'RA'::text)) OR (recv_order_type = 'TO'::text))) ); ALTER TABLE public.recv OWNER TO admin; -- -- Name: TABLE recv; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE recv IS 'Information about Received Orders.'; -- -- Name: porecv; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW porecv AS SELECT recv.recv_id AS porecv_id, recv.recv_date AS porecv_date, recv.recv_rlsd_duedate AS porecv_rlsd_duedate, pohead.pohead_orderdate AS porecv_orderdate, pohead.pohead_released AS porecv_released, recv.recv_order_number AS porecv_ponumber, recv.recv_itemsite_id AS porecv_itemsite_id, recv.recv_vend_id AS porecv_vend_id, item.item_number AS porecv_item_number, recv.recv_vend_item_number AS porecv_vend_item_number, COALESCE(item.item_descrip1, recv.recv_vend_item_descrip) AS porecv_vend_item_descrip, recv.recv_vend_uom AS porecv_vend_uom, recv.recv_qty AS porecv_qty, recv.recv_posted AS porecv_posted, recv.recv_invoiced AS porecv_invoiced, (pg_user.usesysid)::integer AS porecv_trans_usr_id, recv.recv_orderitem_id AS porecv_poitem_id, NULL::integer AS porecv_linenumber, recv.recv_purchcost AS porecv_purchcost, recv.recv_vohead_id AS porecv_vohead_id, recv.recv_recvcost AS porecv_recvcost, recv.recv_duedate AS porecv_duedate, recv.recv_agent_username AS porecv_agent_username, recv.recv_notes AS porecv_notes, recv.recv_freight AS porecv_freight, recv.recv_freight_curr_id AS porecv_curr_id, recv.recv_gldistdate AS porecv_gldistdate, recv.recv_voitem_id AS porecv_voitem_id, recv.recv_value AS porecv_value FROM ((((recv LEFT JOIN pg_user ON ((recv.recv_trans_usr_name = (pg_user.usename)::text))) LEFT JOIN pohead ON ((recv.recv_order_number = pohead.pohead_number))) LEFT JOIN itemsite ON ((recv.recv_itemsite_id = itemsite.itemsite_id))) LEFT JOIN item ON ((itemsite.itemsite_item_id = item.item_id))) WHERE (recv.recv_order_type = 'PO'::text); ALTER TABLE public.porecv OWNER TO admin; -- -- Name: porecv_porecv_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE porecv_porecv_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.porecv_porecv_id_seq OWNER TO admin; -- -- Name: porecv_porecv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('porecv_porecv_id_seq', 180, true); -- -- Name: poreject; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE poreject ( poreject_id integer DEFAULT nextval(('"poreject_poreject_id_seq"'::text)::regclass) NOT NULL, poreject_date timestamp with time zone, poreject_ponumber text, poreject_itemsite_id integer, poreject_vend_id integer, poreject_vend_item_number text, poreject_vend_item_descrip text, poreject_vend_uom text, poreject_qty numeric(18,6), poreject_posted boolean, poreject_rjctcode_id integer, poreject_poitem_id integer, poreject_invoiced boolean, poreject_vohead_id integer, poreject_agent_username text, poreject_voitem_id integer, poreject_value numeric(18,6), poreject_trans_username text, poreject_recv_id integer ); ALTER TABLE public.poreject OWNER TO admin; -- -- Name: TABLE poreject; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE poreject IS 'The poreject table describes Purchase Order Items that were returned to Vendors.'; -- -- Name: COLUMN poreject.poreject_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_id IS 'This is the internal id of this poreject record'; -- -- Name: COLUMN poreject.poreject_date; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_date IS 'This is the date and time the return was entered into the database'; -- -- Name: COLUMN poreject.poreject_ponumber; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_ponumber IS 'This is the number of the original Purchase Order of this item'; -- -- Name: COLUMN poreject.poreject_itemsite_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_itemsite_id IS 'This is the Item Site into which the item had been received'; -- -- Name: COLUMN poreject.poreject_vend_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_vend_id IS 'This is the Vendor from which the item had been purchased'; -- -- Name: COLUMN poreject.poreject_vend_item_number; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_vend_item_number IS 'This is the Vendor''s item number for this item'; -- -- Name: COLUMN poreject.poreject_vend_item_descrip; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_vend_item_descrip IS 'This is the Vendor''s description of this item'; -- -- Name: COLUMN poreject.poreject_vend_uom; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_vend_uom IS 'This is the Unit of Measure in which the Vendor sold this item'; -- -- Name: COLUMN poreject.poreject_qty; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_qty IS 'This is the quantity of the item that was returned'; -- -- Name: COLUMN poreject.poreject_posted; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_posted IS 'This indicates whether or not the return has been recorded in the General Ledger, Inventory History, and Purchase Order Item'; -- -- Name: COLUMN poreject.poreject_rjctcode_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_rjctcode_id IS 'This indicates the reason for the return'; -- -- Name: COLUMN poreject.poreject_poitem_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_poitem_id IS 'This is the internal id of the original Purchase Order Item'; -- -- Name: COLUMN poreject.poreject_invoiced; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_invoiced IS 'This indicates whether the Credit Memo associated with the return has been posted'; -- -- Name: COLUMN poreject.poreject_vohead_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_vohead_id IS 'This is the Voucher associated with the Purchase Order Item'; -- -- Name: COLUMN poreject.poreject_agent_username; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_agent_username IS 'This is the Purchase Order Agent responsible for the original Purchase Order'; -- -- Name: COLUMN poreject.poreject_voitem_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_voitem_id IS 'This is the Voucher Item associated with the Purchase Order Item'; -- -- Name: COLUMN poreject.poreject_value; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_value IS 'This is the value (in base currency) of the return at the time it was posted to the General Ledger'; -- -- Name: COLUMN poreject.poreject_trans_username; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN poreject.poreject_trans_username IS 'This is the user who recorded the return'; -- -- Name: poreject_poreject_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE poreject_poreject_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.poreject_poreject_id_seq OWNER TO admin; -- -- Name: poreject_poreject_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('poreject_poreject_id_seq', 42, true); -- -- Name: potype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE potype ( potype_id integer NOT NULL, potype_name text, potype_descrip text ); ALTER TABLE public.potype OWNER TO admin; -- -- Name: TABLE potype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE potype IS 'Purchase Order Type information'; -- -- Name: potype_potype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE potype_potype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.potype_potype_id_seq OWNER TO admin; -- -- Name: potype_potype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE potype_potype_id_seq OWNED BY potype.potype_id; -- -- Name: potype_potype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('potype_potype_id_seq', 1, false); -- -- Name: pr; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE pr ( pr_id integer DEFAULT nextval(('"pr_pr_id_seq"'::text)::regclass) NOT NULL, pr_number integer, pr_subnumber integer, pr_status character(1), pr_order_type character(1), pr_order_id integer, pr_poitem_id integer, pr_duedate date, pr_itemsite_id integer, pr_qtyreq numeric(18,6), pr_prj_id integer, pr_releasenote text, pr_createdate timestamp without time zone DEFAULT now() ); ALTER TABLE public.pr OWNER TO admin; -- -- Name: TABLE pr; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE pr IS 'Purchase Request information'; -- -- Name: pr_pr_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE pr_pr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.pr_pr_id_seq OWNER TO admin; -- -- Name: pr_pr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('pr_pr_id_seq', 294, true); -- -- Name: prftcntr; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE prftcntr ( prftcntr_id integer NOT NULL, prftcntr_number text NOT NULL, prftcntr_descrip text, CONSTRAINT prftcntr_prftcntr_number_check CHECK ((prftcntr_number <> ''::text)) ); ALTER TABLE public.prftcntr OWNER TO admin; -- -- Name: TABLE prftcntr; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE prftcntr IS 'Profit Center information'; -- -- Name: prftcntr_prftcntr_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE prftcntr_prftcntr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.prftcntr_prftcntr_id_seq OWNER TO admin; -- -- Name: prftcntr_prftcntr_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE prftcntr_prftcntr_id_seq OWNED BY prftcntr.prftcntr_id; -- -- Name: prftcntr_prftcntr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('prftcntr_prftcntr_id_seq', 2, true); -- -- Name: usrgrp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE usrgrp ( usrgrp_id integer NOT NULL, usrgrp_grp_id integer NOT NULL, usrgrp_username text NOT NULL ); ALTER TABLE public.usrgrp OWNER TO admin; -- -- Name: TABLE usrgrp; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE usrgrp IS 'This is which group a user belongs to.'; -- -- Name: usrpriv; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE usrpriv ( usrpriv_id integer DEFAULT nextval(('usrpriv_usrpriv_id_seq'::text)::regclass) NOT NULL, usrpriv_priv_id integer, usrpriv_username text ); ALTER TABLE public.usrpriv OWNER TO admin; -- -- Name: TABLE usrpriv; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE usrpriv IS 'User Privileges information'; -- -- Name: privgranted; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW privgranted AS SELECT priv.priv_name AS privilege, (COALESCE(usrpriv.usrpriv_priv_id, grppriv.grppriv_priv_id, (-1)) > 0) AS granted, priv.priv_seq AS sequence FROM ((priv LEFT JOIN usrpriv ON (((priv.priv_id = usrpriv.usrpriv_priv_id) AND (usrpriv.usrpriv_username = geteffectivextuser())))) LEFT JOIN (SELECT DISTINCT grppriv.grppriv_priv_id FROM (grppriv JOIN usrgrp ON (((grppriv.grppriv_grp_id = usrgrp.usrgrp_grp_id) AND (usrgrp.usrgrp_username = geteffectivextuser()))))) grppriv ON ((grppriv.grppriv_priv_id = priv.priv_id))); ALTER TABLE public.privgranted OWNER TO admin; -- -- Name: prj_prj_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE prj_prj_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.prj_prj_id_seq OWNER TO admin; -- -- Name: prj_prj_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE prj_prj_id_seq OWNED BY prj.prj_id; -- -- Name: prj_prj_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('prj_prj_id_seq', 6, true); -- -- Name: prjtask_prjtask_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE prjtask_prjtask_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.prjtask_prjtask_id_seq OWNER TO admin; -- -- Name: prjtask_prjtask_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE prjtask_prjtask_id_seq OWNED BY prjtask.prjtask_id; -- -- Name: prjtask_prjtask_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('prjtask_prjtask_id_seq', 7, true); -- -- Name: prjtaskuser; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE prjtaskuser ( prjtaskuser_id integer NOT NULL, prjtaskuser_prjtask_id integer, prjtaskuser_username text ); ALTER TABLE public.prjtaskuser OWNER TO admin; -- -- Name: TABLE prjtaskuser; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE prjtaskuser IS 'Project Task user information'; -- -- Name: prjtaskuser_prjtaskuser_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE prjtaskuser_prjtaskuser_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.prjtaskuser_prjtaskuser_id_seq OWNER TO admin; -- -- Name: prjtaskuser_prjtaskuser_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE prjtaskuser_prjtaskuser_id_seq OWNED BY prjtaskuser.prjtaskuser_id; -- -- Name: prjtaskuser_prjtaskuser_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('prjtaskuser_prjtaskuser_id_seq', 1, false); -- -- Name: prodcat_prodcat_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE prodcat_prodcat_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.prodcat_prodcat_id_seq OWNER TO admin; -- -- Name: prodcat_prodcat_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('prodcat_prodcat_id_seq', 33, true); -- -- Name: qryhead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE qryhead ( qryhead_id integer NOT NULL, qryhead_name text NOT NULL, qryhead_descrip text, qryhead_notes text, qryhead_username text DEFAULT geteffectivextuser() NOT NULL, qryhead_updated date DEFAULT ('now'::text)::date NOT NULL, CONSTRAINT qryhead_qryhead_name_check CHECK ((qryhead_name <> ''::text)) ); ALTER TABLE public.qryhead OWNER TO admin; -- -- Name: TABLE qryhead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE qryhead IS 'A header record for a set of queries to be run sequentially. One use is for data export.'; -- -- Name: COLUMN qryhead.qryhead_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryhead.qryhead_id IS 'The primary key, holding an internal value used to cross-reference this table.'; -- -- Name: COLUMN qryhead.qryhead_name; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryhead.qryhead_name IS 'The user-assigned short name for this set of queries.'; -- -- Name: COLUMN qryhead.qryhead_descrip; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryhead.qryhead_descrip IS 'A long description of the purpose of this set of queries.'; -- -- Name: COLUMN qryhead.qryhead_notes; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryhead.qryhead_notes IS 'General information about this queryset.'; -- -- Name: COLUMN qryhead.qryhead_username; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryhead.qryhead_username IS 'The name of the user who last modified this qryhead record.'; -- -- Name: COLUMN qryhead.qryhead_updated; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryhead.qryhead_updated IS 'The date this qryhead was last modified.'; -- -- Name: qryhead_qryhead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE qryhead_qryhead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.qryhead_qryhead_id_seq OWNER TO admin; -- -- Name: qryhead_qryhead_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE qryhead_qryhead_id_seq OWNED BY qryhead.qryhead_id; -- -- Name: qryhead_qryhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('qryhead_qryhead_id_seq', 3, true); -- -- Name: qryitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE qryitem ( qryitem_id integer NOT NULL, qryitem_qryhead_id integer NOT NULL, qryitem_name text NOT NULL, qryitem_order integer NOT NULL, qryitem_src text NOT NULL, qryitem_group text, qryitem_detail text NOT NULL, qryitem_notes text DEFAULT ''::text NOT NULL, qryitem_username text DEFAULT geteffectivextuser() NOT NULL, qryitem_updated date DEFAULT ('now'::text)::date NOT NULL, CONSTRAINT qryitem_qryitem_detail_check CHECK ((btrim(qryitem_detail) <> ''::text)), CONSTRAINT qryitem_qryitem_src_check CHECK ((qryitem_src = ANY (ARRAY['REL'::text, 'MQL'::text, 'CUSTOM'::text]))) ); ALTER TABLE public.qryitem OWNER TO admin; -- -- Name: TABLE qryitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE qryitem IS 'The description of a query to be run as part of a set (see qryhead).'; -- -- Name: COLUMN qryitem.qryitem_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_id IS 'The primary key, holding an internal value used to cross-reference this table.'; -- -- Name: COLUMN qryitem.qryitem_qryhead_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_qryhead_id IS 'The primary key of the query set to which this individual query belongs.'; -- -- Name: COLUMN qryitem.qryitem_order; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_order IS 'The order in which query items within a query set should be run.'; -- -- Name: COLUMN qryitem.qryitem_src; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_src IS 'The source of the query. If the qryitem_src is "REL" then the qryitem_group and _detail name a particular table or view and all rows will be returned. If the source is "MQL" then the qryitem_group and _detail name a pre-defined MetaSQL query in the metasql table. If the source is "CUSTOM" then the qryitem_detail contains the full MetaSQL text of the query to run.'; -- -- Name: COLUMN qryitem.qryitem_group; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_group IS 'Information to help find the query to run. If the qryitem_src is "REL" then this is the schema in which to find the table or view to query and all rows will be returned (the qryitem_detail names the table or view). If the qryitem_src is "MQL" then this is the group of the query in the metasql table to run (the name is in qryitem_detail). If the qryitem_src IS "CUSTOM" then this ignored.'; -- -- Name: COLUMN qryitem.qryitem_detail; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_detail IS 'The particular query to run. If the qryitem_src is "REL" then this is the name of the table or view to query and all rows will be returned. If the qryitem_src is "MQL" then this is the name of the query in the metasql table to run. If the qryitem_src IS "CUSTOM" then this is the actual MetaSQL query text to be parsed and run.'; -- -- Name: COLUMN qryitem.qryitem_notes; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_notes IS 'General information about this query.'; -- -- Name: COLUMN qryitem.qryitem_username; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_username IS 'The name of the user who last modified this qryitem record.'; -- -- Name: COLUMN qryitem.qryitem_updated; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN qryitem.qryitem_updated IS 'The date this qryitem was last modified.'; -- -- Name: qryitem_qryitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE qryitem_qryitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.qryitem_qryitem_id_seq OWNER TO admin; -- -- Name: qryitem_qryitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE qryitem_qryitem_id_seq OWNED BY qryitem.qryitem_id; -- -- Name: qryitem_qryitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('qryitem_qryitem_id_seq', 4, true); -- -- Name: quhead_quhead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE quhead_quhead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.quhead_quhead_id_seq OWNER TO admin; -- -- Name: quhead_quhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('quhead_quhead_id_seq', 124, true); -- -- Name: quitem_quitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE quitem_quitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.quitem_quitem_id_seq OWNER TO admin; -- -- Name: quitem_quitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('quitem_quitem_id_seq', 119, true); -- -- Name: rcalitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE rcalitem ( rcalitem_id integer DEFAULT nextval(('"xcalitem_xcalitem_id_seq"'::text)::regclass) NOT NULL, rcalitem_calhead_id integer, rcalitem_offsettype character(1), rcalitem_offsetcount integer, rcalitem_periodtype character(1), rcalitem_periodcount integer, rcalitem_name text ); ALTER TABLE public.rcalitem OWNER TO admin; -- -- Name: TABLE rcalitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE rcalitem IS 'Relative Calendar Item information'; -- -- Name: recur; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE recur ( recur_id integer NOT NULL, recur_parent_id integer NOT NULL, recur_parent_type text NOT NULL, recur_period text NOT NULL, recur_freq integer DEFAULT 1 NOT NULL, recur_start timestamp with time zone DEFAULT now(), recur_end timestamp with time zone, recur_max integer, recur_data text, CONSTRAINT recur_recur_period_check CHECK ((recur_period = ANY (ARRAY['m'::text, 'H'::text, 'D'::text, 'W'::text, 'M'::text, 'Y'::text, 'C'::text]))) ); ALTER TABLE public.recur OWNER TO admin; -- -- Name: TABLE recur; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE recur IS 'Track recurring events and objects.'; -- -- Name: COLUMN recur.recur_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_id IS 'Internal ID of this recurrence record.'; -- -- Name: COLUMN recur.recur_parent_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_parent_id IS 'The internal ID of the event/object that recurs.'; -- -- Name: COLUMN recur.recur_parent_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_parent_type IS 'The table in which the parent event or object is stored.'; -- -- Name: COLUMN recur.recur_period; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_period IS 'With recur_freq, how often this event recurs. Values are "m" for every minute, "H" for every hour, "D" for daily, "W" for weekly, "M" for monthly, "Y" for yearly, and "C" for customized or complex.'; -- -- Name: COLUMN recur.recur_freq; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_freq IS 'With recur_period, how often this event recurs. Values are integers counts of recur_periods. For example, if recur_freq = 2 and recur_period = w then the event recurs every 2 weeks.'; -- -- Name: COLUMN recur.recur_start; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_start IS 'The first date/time when the event should occur.'; -- -- Name: COLUMN recur.recur_end; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_end IS 'The last date/time when the event should occur. NULL means there is no end date/time and the event should recur forever.'; -- -- Name: COLUMN recur.recur_max; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_max IS 'The maximum number of recurrence events to create at one time. If this is NULL then when new events are created, a system-wide default will limit the number.'; -- -- Name: COLUMN recur.recur_data; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recur.recur_data IS 'Not yet used and format still undetermined. Additional data to describe how to apply the period and frequency, particularly when period = "C".'; -- -- Name: recur_recur_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE recur_recur_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.recur_recur_id_seq OWNER TO admin; -- -- Name: recur_recur_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE recur_recur_id_seq OWNED BY recur.recur_id; -- -- Name: recur_recur_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('recur_recur_id_seq', 1, false); -- -- Name: recurtype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE recurtype ( recurtype_id integer NOT NULL, recurtype_type text NOT NULL, recurtype_table text NOT NULL, recurtype_donecheck text NOT NULL, recurtype_schedcol text NOT NULL, recurtype_limit text, recurtype_copyfunc text NOT NULL, recurtype_copyargs text[] NOT NULL, recurtype_delfunc text ); ALTER TABLE public.recurtype OWNER TO admin; -- -- Name: TABLE recurtype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE recurtype IS 'Describes the properties of recurring items/events in way that can be used by stored procedures to maintain the recurrence.'; -- -- Name: COLUMN recurtype.recurtype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_id IS 'The internal id of this recurrence description.'; -- -- Name: COLUMN recurtype.recurtype_type; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_type IS 'A code value used by the RecurrenceWidget and the code that uses it to describe the item/event that will recur. Examples include "INCDT" for CRM Incidents and "J" for Projects.'; -- -- Name: COLUMN recurtype.recurtype_table; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_table IS 'The table that holds the item/event that will recur.'; -- -- Name: COLUMN recurtype.recurtype_donecheck; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_donecheck IS 'A boolean expression that returns TRUE if an individual item/event record in the recurtype_table has already been completed.'; -- -- Name: COLUMN recurtype.recurtype_schedcol; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_schedcol IS 'The name of the column in the recurtype_table holding the date or timestamp by which the item is scheduled to be completed or at which the event is supposed to occur.'; -- -- Name: COLUMN recurtype.recurtype_limit; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_limit IS 'A boolean expression that returns TRUE if the current user should see the row in the recurtype_table. NULL indicates there is no specific limitation. For example, the maintainance of recurring TODO items should restricted to those items belonging to the user unless s/he has been granted the privilege to modify other people''s todo lists.'; -- -- Name: COLUMN recurtype.recurtype_copyfunc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_copyfunc IS 'The name of the function to copy an existing item/event record. The copy function is expected to take at least 2 arguments: the id of the item to copy and the new date/timestamp. If the function accepts more than 2, it must be able to accept NULL values for the 3rd and following arguments.'; -- -- Name: COLUMN recurtype.recurtype_copyargs; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_copyargs IS 'An abbreviated argument list for the copy function. This is used to determine whether the second argument must be cast to a date or a timestamp, and to figure out how many additional arguments to pass.'; -- -- Name: COLUMN recurtype.recurtype_delfunc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN recurtype.recurtype_delfunc IS 'The name of the function to delete an existing item/event record. The function is expected to take exactly one argument: the id of the item to delete. NULL indicates there is no delete function and that an SQL DELETE statement can be used. In this case, the id column name will be built as the recurtype_table concatenated with the "_id" suffix.'; -- -- Name: recurtype_recurtype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE recurtype_recurtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.recurtype_recurtype_id_seq OWNER TO admin; -- -- Name: recurtype_recurtype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE recurtype_recurtype_id_seq OWNED BY recurtype.recurtype_id; -- -- Name: recurtype_recurtype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('recurtype_recurtype_id_seq', 59, true); -- -- Name: recv_recv_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE recv_recv_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.recv_recv_id_seq OWNER TO admin; -- -- Name: recv_recv_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE recv_recv_id_seq OWNED BY recv.recv_id; -- -- Name: recv_recv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('recv_recv_id_seq', 363, true); -- -- Name: remitto; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW remitto AS SELECT (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_name'::text)) AS remitto_name, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_address1'::text)) AS remitto_address1, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_address2'::text)) AS remitto_address2, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_address3'::text)) AS remitto_address3, (((((SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_city'::text)) || ' '::text) || (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_state'::text))) || ' '::text) || (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_zipcode'::text))) AS remitto_citystatezip, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_country'::text)) AS remitto_country, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_phone'::text)) AS remitto_phone; ALTER TABLE public.remitto OWNER TO admin; -- -- Name: rjctcode; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE rjctcode ( rjctcode_id integer DEFAULT nextval(('"rjctcode_rjctcode_id_seq"'::text)::regclass) NOT NULL, rjctcode_code text NOT NULL, rjctcode_descrip text, CONSTRAINT rjctcode_rjctcode_code_check CHECK ((rjctcode_code <> ''::text)) ); ALTER TABLE public.rjctcode OWNER TO admin; -- -- Name: TABLE rjctcode; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE rjctcode IS 'Reject Code information'; -- -- Name: rjctcode_rjctcode_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE rjctcode_rjctcode_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.rjctcode_rjctcode_id_seq OWNER TO admin; -- -- Name: rjctcode_rjctcode_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('rjctcode_rjctcode_id_seq', 21, true); -- -- Name: rsncode_rsncode_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE rsncode_rsncode_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.rsncode_rsncode_id_seq OWNER TO admin; -- -- Name: rsncode_rsncode_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE rsncode_rsncode_id_seq OWNED BY rsncode.rsncode_id; -- -- Name: rsncode_rsncode_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('rsncode_rsncode_id_seq', 2, true); -- -- Name: sale; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE sale ( sale_id integer DEFAULT nextval(('"sale_sale_id_seq"'::text)::regclass) NOT NULL, sale_name text NOT NULL, sale_descrip text, sale_ipshead_id integer, sale_startdate date, sale_enddate date, CONSTRAINT sale_sale_name_check CHECK ((sale_name <> ''::text)) ); ALTER TABLE public.sale OWNER TO admin; -- -- Name: TABLE sale; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE sale IS 'Sale information'; -- -- Name: sale_sale_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE sale_sale_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.sale_sale_id_seq OWNER TO admin; -- -- Name: sale_sale_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('sale_sale_id_seq', 12, true); -- -- Name: salesaccnt_salesaccnt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE salesaccnt_salesaccnt_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.salesaccnt_salesaccnt_id_seq OWNER TO admin; -- -- Name: salesaccnt_salesaccnt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('salesaccnt_salesaccnt_id_seq', 40, true); -- -- Name: salescat_salescat_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE salescat_salescat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.salescat_salescat_id_seq OWNER TO admin; -- -- Name: salescat_salescat_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE salescat_salescat_id_seq OWNED BY salescat.salescat_id; -- -- Name: salescat_salescat_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('salescat_salescat_id_seq', 2, true); -- -- Name: saleshistory; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW saleshistory AS SELECT cohist.cohist_id, cohist.cohist_cust_id, cohist.cohist_itemsite_id, cohist.cohist_shipdate, cohist.cohist_shipvia, cohist.cohist_ordernumber, cohist.cohist_orderdate, cohist.cohist_invcnumber, cohist.cohist_invcdate, cohist.cohist_qtyshipped, cohist.cohist_unitprice, cohist.cohist_shipto_id, cohist.cohist_salesrep_id, cohist.cohist_duedate, cohist.cohist_imported, cohist.cohist_billtoname, cohist.cohist_billtoaddress1, cohist.cohist_billtoaddress2, cohist.cohist_billtoaddress3, cohist.cohist_billtocity, cohist.cohist_billtostate, cohist.cohist_billtozip, cohist.cohist_shiptoname, cohist.cohist_shiptoaddress1, cohist.cohist_shiptoaddress2, cohist.cohist_shiptoaddress3, cohist.cohist_shiptocity, cohist.cohist_shiptostate, cohist.cohist_shiptozip, cohist.cohist_commission, cohist.cohist_commissionpaid, cohist.cohist_unitcost, cohist.cohist_misc_type, cohist.cohist_misc_descrip, cohist.cohist_misc_id, cohist.cohist_doctype, cohist.cohist_promisedate, cohist.cohist_ponumber, cohist.cohist_curr_id, cohist.cohist_sequence, cohist.cohist_taxtype_id, cohist.cohist_taxzone_id, cohist.cohist_cohead_ccpay_id, cohist.cohist_saletype_id, cohist.cohist_shipzone_id, CASE WHEN (cohist.cohist_invcnumber = '-1'::text) THEN 'Credit'::text ELSE cohist.cohist_invcnumber END AS invoicenumber, custinfo.cust_id, custinfo.cust_number, custinfo.cust_name, custinfo.cust_curr_id, custinfo.cust_custtype_id, custtype.custtype_code, custtype.custtype_descrip, salesrep.salesrep_number, salesrep.salesrep_name, shipzone.shipzone_id, shipzone.shipzone_name, shipzone.shipzone_descrip, itemsite.itemsite_warehous_id, itemsite.itemsite_item_id, item.item_id, item.item_number, item.item_descrip1, ((item.item_descrip1 || ' '::text) || item.item_descrip2) AS itemdescription, item.item_prodcat_id, site.warehous_code, site.warehous_descrip, prodcat.prodcat_code, currtobase(cohist.cohist_curr_id, cohist.cohist_commission, cohist.cohist_invcdate) AS basecommission, currtobase(cohist.cohist_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate) AS baseunitprice, currtocurr(cohist.cohist_curr_id, custinfo.cust_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate) AS custunitprice, round((cohist.cohist_qtyshipped * cohist.cohist_unitprice), 2) AS extprice, round((cohist.cohist_qtyshipped * currtobase(cohist.cohist_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate)), 2) AS baseextprice, round((cohist.cohist_qtyshipped * currtocurr(cohist.cohist_curr_id, custinfo.cust_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate)), 2) AS custextprice, round((cohist.cohist_qtyshipped * cohist.cohist_unitcost), 4) AS extcost, currconcat(cohist.cohist_curr_id) AS currabbr, 'Return'::text AS cohist_invcdate_xtnullrole, 'qty'::text AS cohist_qtyshipped_xtnumericrole, 'salesprice'::text AS cohist_unitprice_xtnumericrole, 'salesprice'::text AS baseunitprice_xtnumericrole, 'curr'::text AS custunitprice_xtnumericrole, 'curr'::text AS custextprice_xtnumericrole, 'curr'::text AS extprice_xtnumericrole, 'curr'::text AS baseextprice_xtnumericrole, 'cost'::text AS cohist_unitcost_xtnumericrole, 'curr'::text AS extcost_xtnumericrole, 'curr'::text AS cohist_commission_xtnumericrole, 'curr'::text AS basecommission_xtnumericrole, 0 AS cohist_qtyshipped_xttotalrole, 0 AS custextprice_xttotalrole, 0 AS baseextprice_xttotalrole, 0 AS extcost_xttotalrole, 0 AS basecommission_xttotalrole FROM (((((((((cohist JOIN custinfo ON ((custinfo.cust_id = cohist.cohist_cust_id))) JOIN custtype ON ((custtype.custtype_id = custinfo.cust_custtype_id))) JOIN salesrep ON ((salesrep.salesrep_id = cohist.cohist_salesrep_id))) JOIN itemsite ON ((itemsite.itemsite_id = cohist.cohist_itemsite_id))) JOIN site() site(warehous_id, warehous_code, warehous_descrip, warehous_fob, warehous_active, warehous_counttag_prefix, warehous_counttag_number, warehous_bol_prefix, warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, warehous_aislesize, warehous_aislealpha, warehous_racksize, warehous_rackalpha, warehous_binsize, warehous_binalpha, warehous_locationsize, warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, warehous_shipping_commission, warehous_cntct_id, warehous_addr_id, warehous_transit, warehous_shipform_id, warehous_shipvia_id, warehous_shipcomments, warehous_costcat_id, warehous_sitetype_id, warehous_taxzone_id, warehous_sequence) ON ((site.warehous_id = itemsite.itemsite_warehous_id))) JOIN item ON ((item.item_id = itemsite.itemsite_item_id))) JOIN prodcat ON ((prodcat.prodcat_id = item.item_prodcat_id))) LEFT JOIN shiptoinfo ON ((shiptoinfo.shipto_id = cohist.cohist_shipto_id))) LEFT JOIN shipzone ON ((shipzone.shipzone_id = shiptoinfo.shipto_shipzone_id))); ALTER TABLE public.saleshistory OWNER TO admin; -- -- Name: VIEW saleshistory; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON VIEW saleshistory IS 'Single point for sales history calculations.'; -- -- Name: saleshistorymisc; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW saleshistorymisc AS SELECT cohist.cohist_id, cohist.cohist_cust_id, cohist.cohist_itemsite_id, cohist.cohist_shipdate, cohist.cohist_shipvia, cohist.cohist_ordernumber, cohist.cohist_orderdate, cohist.cohist_invcnumber, cohist.cohist_invcdate, cohist.cohist_qtyshipped, cohist.cohist_unitprice, cohist.cohist_shipto_id, cohist.cohist_salesrep_id, cohist.cohist_duedate, cohist.cohist_imported, cohist.cohist_billtoname, cohist.cohist_billtoaddress1, cohist.cohist_billtoaddress2, cohist.cohist_billtoaddress3, cohist.cohist_billtocity, cohist.cohist_billtostate, cohist.cohist_billtozip, cohist.cohist_shiptoname, cohist.cohist_shiptoaddress1, cohist.cohist_shiptoaddress2, cohist.cohist_shiptoaddress3, cohist.cohist_shiptocity, cohist.cohist_shiptostate, cohist.cohist_shiptozip, cohist.cohist_commission, cohist.cohist_commissionpaid, cohist.cohist_unitcost, cohist.cohist_misc_type, cohist.cohist_misc_descrip, cohist.cohist_misc_id, cohist.cohist_doctype, cohist.cohist_promisedate, cohist.cohist_ponumber, cohist.cohist_curr_id, cohist.cohist_sequence, cohist.cohist_taxtype_id, cohist.cohist_taxzone_id, cohist.cohist_cohead_ccpay_id, cohist.cohist_saletype_id, cohist.cohist_shipzone_id, CASE WHEN (cohist.cohist_invcnumber = '-1'::text) THEN 'Credit'::text ELSE cohist.cohist_invcnumber END AS invoicenumber, custinfo.cust_id, custinfo.cust_number, custinfo.cust_name, custinfo.cust_curr_id, custinfo.cust_custtype_id, custtype.custtype_code, salesrep.salesrep_number, salesrep.salesrep_name, shipzone.shipzone_id, shipzone.shipzone_name, itemsite.itemsite_warehous_id, itemsite.itemsite_item_id, item.item_number, item.item_descrip1, ((item.item_descrip1 || ' '::text) || item.item_descrip2) AS itemdescription, item.item_prodcat_id, site.warehous_code, prodcat.prodcat_code, currtobase(cohist.cohist_curr_id, cohist.cohist_commission, cohist.cohist_invcdate) AS basecommission, currtobase(cohist.cohist_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate) AS baseunitprice, currtocurr(cohist.cohist_curr_id, custinfo.cust_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate) AS custunitprice, round((cohist.cohist_qtyshipped * cohist.cohist_unitprice), 2) AS extprice, round((cohist.cohist_qtyshipped * currtobase(cohist.cohist_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate)), 2) AS baseextprice, round((cohist.cohist_qtyshipped * currtocurr(cohist.cohist_curr_id, custinfo.cust_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate)), 2) AS custextprice, round((cohist.cohist_qtyshipped * cohist.cohist_unitcost), 4) AS extcost, currconcat(cohist.cohist_curr_id) AS currabbr, 'Return'::text AS cohist_invcdate_xtnullrole, 'qty'::text AS cohist_qtyshipped_xtnumericrole, 'salesprice'::text AS cohist_unitprice_xtnumericrole, 'salesprice'::text AS baseunitprice_xtnumericrole, 'curr'::text AS custunitprice_xtnumericrole, 'curr'::text AS custextprice_xtnumericrole, 'curr'::text AS extprice_xtnumericrole, 'curr'::text AS baseextprice_xtnumericrole, 'cost'::text AS cohist_unitcost_xtnumericrole, 'curr'::text AS extcost_xtnumericrole, 'curr'::text AS cohist_commission_xtnumericrole, 'curr'::text AS basecommission_xtnumericrole, 0 AS cohist_qtyshipped_xttotalrole, 0 AS custextprice_xttotalrole, 0 AS baseextprice_xttotalrole, 0 AS extcost_xttotalrole, 0 AS basecommission_xttotalrole FROM (((((((((cohist JOIN custinfo ON ((custinfo.cust_id = cohist.cohist_cust_id))) JOIN custtype ON ((custtype.custtype_id = custinfo.cust_custtype_id))) JOIN salesrep ON ((salesrep.salesrep_id = cohist.cohist_salesrep_id))) LEFT JOIN itemsite ON ((itemsite.itemsite_id = cohist.cohist_itemsite_id))) LEFT JOIN site() site(warehous_id, warehous_code, warehous_descrip, warehous_fob, warehous_active, warehous_counttag_prefix, warehous_counttag_number, warehous_bol_prefix, warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, warehous_aislesize, warehous_aislealpha, warehous_racksize, warehous_rackalpha, warehous_binsize, warehous_binalpha, warehous_locationsize, warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, warehous_shipping_commission, warehous_cntct_id, warehous_addr_id, warehous_transit, warehous_shipform_id, warehous_shipvia_id, warehous_shipcomments, warehous_costcat_id, warehous_sitetype_id, warehous_taxzone_id, warehous_sequence) ON ((site.warehous_id = itemsite.itemsite_warehous_id))) LEFT JOIN item ON ((item.item_id = itemsite.itemsite_item_id))) LEFT JOIN prodcat ON ((prodcat.prodcat_id = item.item_prodcat_id))) LEFT JOIN shiptoinfo ON ((shiptoinfo.shipto_id = cohist.cohist_shipto_id))) LEFT JOIN shipzone ON ((shipzone.shipzone_id = shiptoinfo.shipto_shipzone_id))); ALTER TABLE public.saleshistorymisc OWNER TO admin; -- -- Name: VIEW saleshistorymisc; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON VIEW saleshistorymisc IS 'Single point for sales history (including misc. items) calculations.'; -- -- Name: salesrep_salesrep_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE salesrep_salesrep_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.salesrep_salesrep_id_seq OWNER TO admin; -- -- Name: salesrep_salesrep_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('salesrep_salesrep_id_seq', 31, true); -- -- Name: saletype_saletype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE saletype_saletype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.saletype_saletype_id_seq OWNER TO admin; -- -- Name: saletype_saletype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE saletype_saletype_id_seq OWNED BY saletype.saletype_id; -- -- Name: saletype_saletype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('saletype_saletype_id_seq', 3, true); -- -- Name: schemaord; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE schemaord ( schemaord_id integer NOT NULL, schemaord_name text NOT NULL, schemaord_order integer NOT NULL, CONSTRAINT schemaord_schemaord_name_check CHECK ((length(schemaord_name) > 0)), CONSTRAINT schemaord_schemaord_name_check1 CHECK ((schemaord_name <> ''::text)) ); ALTER TABLE public.schemaord OWNER TO admin; -- -- Name: TABLE schemaord; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE schemaord IS 'Set the order in which db schemas will appear in the search path after login'; -- -- Name: schemaord_schemaord_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE schemaord_schemaord_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.schemaord_schemaord_id_seq OWNER TO admin; -- -- Name: schemaord_schemaord_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE schemaord_schemaord_id_seq OWNED BY schemaord.schemaord_id; -- -- Name: schemaord_schemaord_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('schemaord_schemaord_id_seq', 1, false); -- -- Name: sequence; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE sequence ( sequence_value integer ); ALTER TABLE public.sequence OWNER TO admin; -- -- Name: TABLE sequence; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE sequence IS 'Pre-populated list of sequence numbers (1-1000) used for printing Labels and other uses'; -- -- Name: shift_shift_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shift_shift_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.shift_shift_id_seq OWNER TO admin; -- -- Name: shift_shift_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE shift_shift_id_seq OWNED BY shift.shift_id; -- -- Name: shift_shift_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shift_shift_id_seq', 2, true); -- -- Name: shipchrg_shipchrg_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shipchrg_shipchrg_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.shipchrg_shipchrg_id_seq OWNER TO admin; -- -- Name: shipchrg_shipchrg_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE shipchrg_shipchrg_id_seq OWNED BY shipchrg.shipchrg_id; -- -- Name: shipchrg_shipchrg_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shipchrg_shipchrg_id_seq', 4, true); -- -- Name: shipdatasum; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE shipdatasum ( shipdatasum_cohead_number text NOT NULL, shipdatasum_cosmisc_tracknum text NOT NULL, shipdatasum_cosmisc_packnum_tracknum text NOT NULL, shipdatasum_weight numeric(16,4), shipdatasum_base_freight numeric(16,4), shipdatasum_total_freight numeric(16,4), shipdatasum_shipper text DEFAULT 'UPS'::text, shipdatasum_billing_option text, shipdatasum_package_type text, shipdatasum_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, shipdatasum_shipped boolean DEFAULT false, shipdatasum_shiphead_number text, shipdatasum_base_freight_curr_id integer DEFAULT basecurrid(), shipdatasum_total_freight_curr_id integer DEFAULT basecurrid() ); ALTER TABLE public.shipdatasum OWNER TO admin; -- -- Name: TABLE shipdatasum; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE shipdatasum IS 'Shipping Interface information.'; -- -- Name: shipform_shipform_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shipform_shipform_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.shipform_shipform_id_seq OWNER TO admin; -- -- Name: shipform_shipform_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shipform_shipform_id_seq', 13, true); -- -- Name: shiphead_shiphead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shiphead_shiphead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.shiphead_shiphead_id_seq OWNER TO admin; -- -- Name: shiphead_shiphead_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE shiphead_shiphead_id_seq OWNED BY shiphead.shiphead_id; -- -- Name: shiphead_shiphead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shiphead_shiphead_id_seq', 323, true); -- -- Name: shipitem_shipitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shipitem_shipitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.shipitem_shipitem_id_seq OWNER TO admin; -- -- Name: shipitem_shipitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE shipitem_shipitem_id_seq OWNED BY shipitem.shipitem_id; -- -- Name: shipitem_shipitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shipitem_shipitem_id_seq', 626, true); -- -- Name: shipment_number_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shipment_number_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.shipment_number_seq OWNER TO admin; -- -- Name: shipment_number_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shipment_number_seq', 60088, true); -- -- Name: shipto; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW shipto AS SELECT shiptoinfo.shipto_id, shiptoinfo.shipto_cust_id, shiptoinfo.shipto_name, m.addr_line1 AS shipto_address1, m.addr_line2 AS shipto_address2, m.addr_line3 AS shipto_address3, m.addr_city AS shipto_city, m.addr_state AS shipto_state, m.addr_postalcode AS shipto_zipcode, shiptoinfo.shipto_taxzone_id, shiptoinfo.shipto_salesrep_id, c1.cntct_phone AS shipto_phone, shiptoinfo.shipto_comments, shiptoinfo.shipto_shipcomments, btrim(((c1.cntct_first_name || ' '::text) || c1.cntct_last_name)) AS shipto_contact, c1.cntct_fax AS shipto_fax, c1.cntct_email AS shipto_email, shiptoinfo.shipto_shipzone_id, shiptoinfo.shipto_shipvia, shiptoinfo.shipto_commission, shiptoinfo.shipto_shipform_id, shiptoinfo.shipto_shipchrg_id, shiptoinfo.shipto_active, shiptoinfo.shipto_default, shiptoinfo.shipto_num, shiptoinfo.shipto_ediprofile_id, m.addr_country AS shipto_country FROM ((shiptoinfo LEFT JOIN cntct c1 ON ((shiptoinfo.shipto_cntct_id = c1.cntct_id))) LEFT JOIN addr m ON ((shiptoinfo.shipto_addr_id = m.addr_id))); ALTER TABLE public.shipto OWNER TO admin; -- -- Name: shipto_shipto_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shipto_shipto_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.shipto_shipto_id_seq OWNER TO admin; -- -- Name: shipto_shipto_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shipto_shipto_id_seq', 35, true); -- -- Name: shipvia_shipvia_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shipvia_shipvia_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.shipvia_shipvia_id_seq OWNER TO admin; -- -- Name: shipvia_shipvia_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shipvia_shipvia_id_seq', 14, true); -- -- Name: shipzone_shipzone_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE shipzone_shipzone_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.shipzone_shipzone_id_seq OWNER TO admin; -- -- Name: shipzone_shipzone_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('shipzone_shipzone_id_seq', 37, true); -- -- Name: sitetype_sitetype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE sitetype_sitetype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.sitetype_sitetype_id_seq OWNER TO admin; -- -- Name: sitetype_sitetype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE sitetype_sitetype_id_seq OWNED BY sitetype.sitetype_id; -- -- Name: sitetype_sitetype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('sitetype_sitetype_id_seq', 5, true); -- -- Name: sltrans; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE sltrans ( sltrans_id integer DEFAULT nextval('gltrans_gltrans_id_seq'::regclass) NOT NULL, sltrans_created timestamp with time zone, sltrans_date date NOT NULL, sltrans_sequence integer, sltrans_accnt_id integer NOT NULL, sltrans_source text, sltrans_docnumber text, sltrans_misc_id integer, sltrans_amount numeric(20,2) NOT NULL, sltrans_notes text, sltrans_journalnumber integer, sltrans_posted boolean NOT NULL, sltrans_doctype text, sltrans_username text DEFAULT geteffectivextuser() NOT NULL, sltrans_gltrans_journalnumber integer, sltrans_rec boolean DEFAULT false NOT NULL ); ALTER TABLE public.sltrans OWNER TO admin; -- -- Name: TABLE sltrans; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE sltrans IS 'Journal transaction information'; -- -- Name: sltrans_backup; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE sltrans_backup ( sltrans_old_id integer, sltrans_new_id integer ); ALTER TABLE public.sltrans_backup OWNER TO admin; -- -- Name: TABLE sltrans_backup; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE sltrans_backup IS 'backup cross references of old and new ids for sltrans 4.0 upgrade.'; -- -- Name: sopack; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW sopack AS SELECT pack.pack_id AS sopack_id, pack.pack_head_id AS sopack_sohead_id, pack.pack_printed AS sopack_printed, pack.pack_shiphead_id AS sopack_cosmisc_id FROM pack WHERE (pack.pack_head_type = 'SO'::text); ALTER TABLE public.sopack OWNER TO admin; -- -- Name: sopack_sopack_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE sopack_sopack_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.sopack_sopack_id_seq OWNER TO admin; -- -- Name: sopack_sopack_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('sopack_sopack_id_seq', 65, true); -- -- Name: source; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE source ( source_id integer NOT NULL, source_module text, source_name text NOT NULL, source_descrip text, CONSTRAINT source_source_name_check CHECK ((source_name <> ''::text)) ); ALTER TABLE public.source OWNER TO admin; -- -- Name: TABLE source; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE source IS 'Tax class information'; -- -- Name: COLUMN source.source_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN source.source_id IS 'Primary key'; -- -- Name: COLUMN source.source_module; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN source.source_module IS 'Application module'; -- -- Name: COLUMN source.source_name; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN source.source_name IS 'Name'; -- -- Name: COLUMN source.source_descrip; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN source.source_descrip IS 'Description'; -- -- Name: source_source_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE source_source_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.source_source_id_seq OWNER TO admin; -- -- Name: source_source_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE source_source_id_seq OWNED BY source.source_id; -- -- Name: source_source_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('source_source_id_seq', 38, true); -- -- Name: state; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE state ( state_id integer NOT NULL, state_name text NOT NULL, state_abbr text, state_country_id integer, CONSTRAINT state_state_name_check CHECK ((state_name <> ''::text)) ); ALTER TABLE public.state OWNER TO admin; -- -- Name: TABLE state; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE state IS 'List of states, provinces, and territories associated with various countries.'; -- -- Name: state_state_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE state_state_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.state_state_id_seq OWNER TO admin; -- -- Name: state_state_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE state_state_id_seq OWNED BY state.state_id; -- -- Name: state_state_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('state_state_id_seq', 158, true); -- -- Name: status; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE status ( status_id integer NOT NULL, status_type text NOT NULL, status_code character(1) NOT NULL, status_name text, status_seq integer, status_color text DEFAULT 'white'::text ); ALTER TABLE public.status OWNER TO admin; -- -- Name: status_status_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE status_status_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.status_status_id_seq OWNER TO admin; -- -- Name: status_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE status_status_id_seq OWNED BY status.status_id; -- -- Name: status_status_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('status_status_id_seq', 6, true); -- -- Name: stdjrnl; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE stdjrnl ( stdjrnl_id integer NOT NULL, stdjrnl_name text NOT NULL, stdjrnl_descrip text, stdjrnl_notes text, CONSTRAINT stdjrnl_stdjrnl_name_check CHECK ((stdjrnl_name <> ''::text)) ); ALTER TABLE public.stdjrnl OWNER TO admin; -- -- Name: TABLE stdjrnl; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE stdjrnl IS 'Standard Journal information'; -- -- Name: stdjrnl_stdjrnl_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE stdjrnl_stdjrnl_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.stdjrnl_stdjrnl_id_seq OWNER TO admin; -- -- Name: stdjrnl_stdjrnl_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE stdjrnl_stdjrnl_id_seq OWNED BY stdjrnl.stdjrnl_id; -- -- Name: stdjrnl_stdjrnl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('stdjrnl_stdjrnl_id_seq', 33, true); -- -- Name: stdjrnlgrp; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE stdjrnlgrp ( stdjrnlgrp_id integer NOT NULL, stdjrnlgrp_name text NOT NULL, stdjrnlgrp_descrip text, CONSTRAINT stdjrnlgrp_stdjrnlgrp_name_check CHECK ((stdjrnlgrp_name <> ''::text)) ); ALTER TABLE public.stdjrnlgrp OWNER TO admin; -- -- Name: TABLE stdjrnlgrp; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE stdjrnlgrp IS 'Standard Journal Group information'; -- -- Name: stdjrnlgrp_stdjrnlgrp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.stdjrnlgrp_stdjrnlgrp_id_seq OWNER TO admin; -- -- Name: stdjrnlgrp_stdjrnlgrp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq OWNED BY stdjrnlgrp.stdjrnlgrp_id; -- -- Name: stdjrnlgrp_stdjrnlgrp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('stdjrnlgrp_stdjrnlgrp_id_seq', 13, true); -- -- Name: stdjrnlgrpitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE stdjrnlgrpitem ( stdjrnlgrpitem_id integer NOT NULL, stdjrnlgrpitem_stdjrnl_id integer, stdjrnlgrpitem_toapply integer, stdjrnlgrpitem_applied integer, stdjrnlgrpitem_effective date, stdjrnlgrpitem_expires date, stdjrnlgrpitem_stdjrnlgrp_id integer ); ALTER TABLE public.stdjrnlgrpitem OWNER TO admin; -- -- Name: TABLE stdjrnlgrpitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE stdjrnlgrpitem IS 'Standard Journal Group Item information'; -- -- Name: stdjrnlgrpitem_stdjrnlgrpitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.stdjrnlgrpitem_stdjrnlgrpitem_id_seq OWNER TO admin; -- -- Name: stdjrnlgrpitem_stdjrnlgrpitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq OWNED BY stdjrnlgrpitem.stdjrnlgrpitem_id; -- -- Name: stdjrnlgrpitem_stdjrnlgrpitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('stdjrnlgrpitem_stdjrnlgrpitem_id_seq', 19, true); -- -- Name: stdjrnlitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE stdjrnlitem ( stdjrnlitem_id integer NOT NULL, stdjrnlitem_stdjrnl_id integer NOT NULL, stdjrnlitem_accnt_id integer NOT NULL, stdjrnlitem_amount numeric(20,2) NOT NULL, stdjrnlitem_notes text ); ALTER TABLE public.stdjrnlitem OWNER TO admin; -- -- Name: TABLE stdjrnlitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE stdjrnlitem IS 'Standard Journal Item information'; -- -- Name: stdjrnlitem_stdjrnlitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE stdjrnlitem_stdjrnlitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.stdjrnlitem_stdjrnlitem_id_seq OWNER TO admin; -- -- Name: stdjrnlitem_stdjrnlitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE stdjrnlitem_stdjrnlitem_id_seq OWNED BY stdjrnlitem.stdjrnlitem_id; -- -- Name: stdjrnlitem_stdjrnlitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('stdjrnlitem_stdjrnlitem_id_seq', 40, true); -- -- Name: subaccnt; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE subaccnt ( subaccnt_id integer NOT NULL, subaccnt_number text NOT NULL, subaccnt_descrip text, CONSTRAINT subaccnt_subaccnt_number_check CHECK ((subaccnt_number <> ''::text)) ); ALTER TABLE public.subaccnt OWNER TO admin; -- -- Name: TABLE subaccnt; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE subaccnt IS 'Subaccount information'; -- -- Name: subaccnt_subaccnt_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE subaccnt_subaccnt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.subaccnt_subaccnt_id_seq OWNER TO admin; -- -- Name: subaccnt_subaccnt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE subaccnt_subaccnt_id_seq OWNED BY subaccnt.subaccnt_id; -- -- Name: subaccnt_subaccnt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('subaccnt_subaccnt_id_seq', 1, true); -- -- Name: subaccnttype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE subaccnttype ( subaccnttype_id integer NOT NULL, subaccnttype_accnt_type character(1) NOT NULL, subaccnttype_code text NOT NULL, subaccnttype_descrip text ); ALTER TABLE public.subaccnttype OWNER TO admin; -- -- Name: TABLE subaccnttype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE subaccnttype IS 'User defined Sub Account Types.'; -- -- Name: subaccnttype_subaccnttype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE subaccnttype_subaccnttype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.subaccnttype_subaccnttype_id_seq OWNER TO admin; -- -- Name: subaccnttype_subaccnttype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE subaccnttype_subaccnttype_id_seq OWNED BY subaccnttype.subaccnttype_id; -- -- Name: subaccnttype_subaccnttype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('subaccnttype_subaccnttype_id_seq', 21, true); -- -- Name: tax_tax_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE tax_tax_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.tax_tax_id_seq OWNER TO admin; -- -- Name: tax_tax_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('tax_tax_id_seq', 18, true); -- -- Name: taxass; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE taxass ( taxass_id integer NOT NULL, taxass_taxzone_id integer, taxass_taxtype_id integer, taxass_tax_id integer NOT NULL ); ALTER TABLE public.taxass OWNER TO admin; -- -- Name: TABLE taxass; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE taxass IS 'The tax assignment table associates different tax zones and tax types to a given set of tax codes.'; -- -- Name: COLUMN taxass.taxass_taxzone_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxass.taxass_taxzone_id IS 'The id of the tax zone. If NULL any tax zone will apply.'; -- -- Name: COLUMN taxass.taxass_taxtype_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxass.taxass_taxtype_id IS 'The id of the tax type. If NULL any tax type will apply.'; -- -- Name: COLUMN taxass.taxass_tax_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxass.taxass_tax_id IS 'The id of the tax code.'; -- -- Name: taxass_taxass_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE taxass_taxass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.taxass_taxass_id_seq OWNER TO admin; -- -- Name: taxass_taxass_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE taxass_taxass_id_seq OWNED BY taxass.taxass_id; -- -- Name: taxass_taxass_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('taxass_taxass_id_seq', 4, true); -- -- Name: taxauth_taxauth_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE taxauth_taxauth_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.taxauth_taxauth_id_seq OWNER TO admin; -- -- Name: taxauth_taxauth_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE taxauth_taxauth_id_seq OWNED BY taxauth.taxauth_id; -- -- Name: taxauth_taxauth_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('taxauth_taxauth_id_seq', 3, true); -- -- Name: taxclass; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE taxclass ( taxclass_id integer NOT NULL, taxclass_code text NOT NULL, taxclass_descrip text, taxclass_sequence integer, CONSTRAINT taxclass_taxclass_code_check CHECK ((taxclass_code <> ''::text)) ); ALTER TABLE public.taxclass OWNER TO admin; -- -- Name: TABLE taxclass; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE taxclass IS 'Tax class information'; -- -- Name: COLUMN taxclass.taxclass_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxclass.taxclass_id IS 'Primary key'; -- -- Name: COLUMN taxclass.taxclass_code; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxclass.taxclass_code IS 'Code'; -- -- Name: COLUMN taxclass.taxclass_descrip; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxclass.taxclass_descrip IS 'Description'; -- -- Name: COLUMN taxclass.taxclass_sequence; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxclass.taxclass_sequence IS 'Group sequence'; -- -- Name: taxclass_taxclass_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE taxclass_taxclass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.taxclass_taxclass_id_seq OWNER TO admin; -- -- Name: taxclass_taxclass_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE taxclass_taxclass_id_seq OWNED BY taxclass.taxclass_id; -- -- Name: taxclass_taxclass_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('taxclass_taxclass_id_seq', 3, true); -- -- Name: taxrate; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE taxrate ( taxrate_id integer NOT NULL, taxrate_tax_id integer NOT NULL, taxrate_percent numeric(10,6) NOT NULL, taxrate_curr_id integer, taxrate_amount numeric(16,2) NOT NULL, taxrate_effective date, taxrate_expires date ); ALTER TABLE public.taxrate OWNER TO admin; -- -- Name: TABLE taxrate; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE taxrate IS 'Tax rates.'; -- -- Name: COLUMN taxrate.taxrate_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxrate.taxrate_id IS 'Primary key.'; -- -- Name: COLUMN taxrate.taxrate_tax_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxrate.taxrate_tax_id IS 'The id of the parent tax code.'; -- -- Name: COLUMN taxrate.taxrate_percent; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxrate.taxrate_percent IS 'Tax rate percentage.'; -- -- Name: COLUMN taxrate.taxrate_curr_id; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxrate.taxrate_curr_id IS 'The currency id of the flat rate amount.'; -- -- Name: COLUMN taxrate.taxrate_amount; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxrate.taxrate_amount IS 'Flat tax rate amount.'; -- -- Name: COLUMN taxrate.taxrate_effective; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxrate.taxrate_effective IS 'The effective date of the tax rate. NULL value means always.'; -- -- Name: COLUMN taxrate.taxrate_expires; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN taxrate.taxrate_expires IS 'The expire date of the tax rate. NULL value means never.'; -- -- Name: taxrate_taxrate_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE taxrate_taxrate_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.taxrate_taxrate_id_seq OWNER TO admin; -- -- Name: taxrate_taxrate_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE taxrate_taxrate_id_seq OWNED BY taxrate.taxrate_id; -- -- Name: taxrate_taxrate_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('taxrate_taxrate_id_seq', 6, true); -- -- Name: taxreg_taxreg_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE taxreg_taxreg_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.taxreg_taxreg_id_seq OWNER TO admin; -- -- Name: taxreg_taxreg_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE taxreg_taxreg_id_seq OWNED BY taxreg.taxreg_id; -- -- Name: taxreg_taxreg_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('taxreg_taxreg_id_seq', 1, false); -- -- Name: taxtype_taxtype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE taxtype_taxtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.taxtype_taxtype_id_seq OWNER TO admin; -- -- Name: taxtype_taxtype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE taxtype_taxtype_id_seq OWNED BY taxtype.taxtype_id; -- -- Name: taxtype_taxtype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('taxtype_taxtype_id_seq', 3, true); -- -- Name: taxzone_taxzone_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE taxzone_taxzone_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.taxzone_taxzone_id_seq OWNER TO admin; -- -- Name: taxzone_taxzone_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE taxzone_taxzone_id_seq OWNED BY taxzone.taxzone_id; -- -- Name: taxzone_taxzone_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('taxzone_taxzone_id_seq', 4, true); -- -- Name: terms_terms_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE terms_terms_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.terms_terms_id_seq OWNER TO admin; -- -- Name: terms_terms_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('terms_terms_id_seq', 44, true); -- -- Name: todoitem_todoitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE todoitem_todoitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.todoitem_todoitem_id_seq OWNER TO admin; -- -- Name: todoitem_todoitem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE todoitem_todoitem_id_seq OWNED BY todoitem.todoitem_id; -- -- Name: todoitem_todoitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('todoitem_todoitem_id_seq', 15, true); -- -- Name: trgthist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE trgthist ( trgthist_src_cntct_id integer NOT NULL, trgthist_trgt_cntct_id integer NOT NULL, trgthist_col text NOT NULL, trgthist_value text NOT NULL ); ALTER TABLE public.trgthist OWNER TO admin; -- -- Name: trialbal; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE trialbal ( trialbal_id integer NOT NULL, trialbal_period_id integer, trialbal_accnt_id integer, trialbal_beginning numeric(20,2), trialbal_ending numeric(20,2), trialbal_credits numeric(20,2), trialbal_debits numeric(20,2), trialbal_dirty boolean, trialbal_yearend numeric(20,2) DEFAULT 0.00 NOT NULL ); ALTER TABLE public.trialbal OWNER TO admin; -- -- Name: TABLE trialbal; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE trialbal IS 'Trial Balance information'; -- -- Name: trialbal_trialbal_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE trialbal_trialbal_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.trialbal_trialbal_id_seq OWNER TO admin; -- -- Name: trialbal_trialbal_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE trialbal_trialbal_id_seq OWNED BY trialbal.trialbal_id; -- -- Name: trialbal_trialbal_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('trialbal_trialbal_id_seq', 21430, true); -- -- Name: uom_uom_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE uom_uom_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.uom_uom_id_seq OWNER TO admin; -- -- Name: uom_uom_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE uom_uom_id_seq OWNED BY uom.uom_id; -- -- Name: uom_uom_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('uom_uom_id_seq', 14, true); -- -- Name: uomconv; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE uomconv ( uomconv_id integer NOT NULL, uomconv_from_uom_id integer NOT NULL, uomconv_from_value numeric(20,10) NOT NULL, uomconv_to_uom_id integer NOT NULL, uomconv_to_value numeric(20,10) NOT NULL, uomconv_fractional boolean DEFAULT false NOT NULL ); ALTER TABLE public.uomconv OWNER TO admin; -- -- Name: TABLE uomconv; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE uomconv IS 'UOM conversion information. From Unit to To Unit with a value per ratio.'; -- -- Name: uomconv_uomconv_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE uomconv_uomconv_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.uomconv_uomconv_id_seq OWNER TO admin; -- -- Name: uomconv_uomconv_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE uomconv_uomconv_id_seq OWNED BY uomconv.uomconv_id; -- -- Name: uomconv_uomconv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('uomconv_uomconv_id_seq', 3, true); -- -- Name: uomtype; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE uomtype ( uomtype_id integer NOT NULL, uomtype_name text NOT NULL, uomtype_descrip text, uomtype_multiple boolean DEFAULT false NOT NULL, CONSTRAINT uomtype_uomtype_name_check CHECK ((uomtype_name <> ''::text)) ); ALTER TABLE public.uomtype OWNER TO admin; -- -- Name: TABLE uomtype; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE uomtype IS 'UOM Type values.'; -- -- Name: uomtype_uomtype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE uomtype_uomtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.uomtype_uomtype_id_seq OWNER TO admin; -- -- Name: uomtype_uomtype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE uomtype_uomtype_id_seq OWNED BY uomtype.uomtype_id; -- -- Name: uomtype_uomtype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('uomtype_uomtype_id_seq', 4, true); -- -- Name: urlinfo_url_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE urlinfo_url_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.urlinfo_url_id_seq OWNER TO admin; -- -- Name: urlinfo_url_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE urlinfo_url_id_seq OWNED BY urlinfo.url_id; -- -- Name: urlinfo_url_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('urlinfo_url_id_seq', 1, true); -- -- Name: usrpref; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE usrpref ( usrpref_id integer DEFAULT nextval(('usrpref_usrpref_id_seq'::text)::regclass) NOT NULL, usrpref_name text, usrpref_value text, usrpref_username text ); ALTER TABLE public.usrpref OWNER TO admin; -- -- Name: TABLE usrpref; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE usrpref IS 'User Preferences information'; -- -- Name: usr; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW usr AS SELECT (pg_user.usesysid)::integer AS usr_id, (pg_user.usename)::text AS usr_username, COALESCE((SELECT usrpref.usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'propername'::text))), ''::text) AS usr_propername, NULL::text AS usr_passwd, COALESCE((SELECT (usrpref.usrpref_value)::integer AS usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'locale_id'::text))), COALESCE((SELECT locale.locale_id FROM locale WHERE (lower(locale.locale_code) = 'default'::text) LIMIT 1), (SELECT locale.locale_id FROM locale ORDER BY locale.locale_id LIMIT 1))) AS usr_locale_id, COALESCE((SELECT usrpref.usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'initials'::text))), ''::text) AS usr_initials, COALESCE((SELECT CASE WHEN (usrpref.usrpref_value = 't'::text) THEN true ELSE false END AS "case" FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'agent'::text))), false) AS usr_agent, COALESCE((SELECT CASE WHEN (usrpref.usrpref_value = 't'::text) THEN true ELSE false END AS "case" FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'active'::text))), usercanlogin((pg_user.usename)::text)) AS usr_active, COALESCE((SELECT usrpref.usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'email'::text))), ''::text) AS usr_email, COALESCE((SELECT usrpref.usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'window'::text))), ''::text) AS usr_window FROM pg_user; ALTER TABLE public.usr OWNER TO admin; -- -- Name: usr_bak; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE usr_bak ( usr_id integer DEFAULT nextval(('usr_usr_id_seq'::text)::regclass) NOT NULL, usr_username text NOT NULL, usr_propername text, usr_passwd text, usr_locale_id integer NOT NULL, usr_initials text, usr_agent boolean NOT NULL, usr_active boolean NOT NULL, usr_email text, usr_window text ); ALTER TABLE public.usr_bak OWNER TO admin; -- -- Name: TABLE usr_bak; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE usr_bak IS 'User information'; -- -- Name: usr_usr_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE usr_usr_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.usr_usr_id_seq OWNER TO admin; -- -- Name: usr_usr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('usr_usr_id_seq', 9, true); -- -- Name: usrgrp_usrgrp_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE usrgrp_usrgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.usrgrp_usrgrp_id_seq OWNER TO admin; -- -- Name: usrgrp_usrgrp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE usrgrp_usrgrp_id_seq OWNED BY usrgrp.usrgrp_id; -- -- Name: usrgrp_usrgrp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('usrgrp_usrgrp_id_seq', 3, true); -- -- Name: usrpref_usrpref_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE usrpref_usrpref_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.usrpref_usrpref_id_seq OWNER TO admin; -- -- Name: usrpref_usrpref_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('usrpref_usrpref_id_seq', 1672, true); -- -- Name: usrpriv_usrpriv_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE usrpriv_usrpriv_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.usrpriv_usrpriv_id_seq OWNER TO admin; -- -- Name: usrpriv_usrpriv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('usrpriv_usrpriv_id_seq', 3847, true); -- -- Name: vend; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW vend AS SELECT vendinfo.vend_id, vendinfo.vend_name, m.addr_line1 AS vend_address1, m.addr_line2 AS vend_address2, m.addr_line3 AS vend_address3, m.addr_city AS vend_city, m.addr_state AS vend_state, m.addr_postalcode AS vend_zip, btrim(((c1.cntct_first_name || ' '::text) || c1.cntct_last_name)) AS vend_contact1, c1.cntct_phone AS vend_phone1, btrim(((c2.cntct_first_name || ' '::text) || c2.cntct_last_name)) AS vend_contact2, c2.cntct_phone AS vend_phone2, vendinfo.vend_lastpurchdate, vendinfo.vend_active, vendinfo.vend_po, vendinfo.vend_comments, vendinfo.vend_pocomments, vendinfo.vend_number, c1.cntct_fax AS vend_fax1, c2.cntct_fax AS vend_fax2, c1.cntct_email AS vend_email1, c2.cntct_email AS vend_email2, vendinfo.vend_1099, vendinfo.vend_exported, vendinfo.vend_fobsource, vendinfo.vend_fob, vendinfo.vend_terms_id, vendinfo.vend_shipvia, vendinfo.vend_vendtype_id, vendinfo.vend_qualified, vendinfo.vend_ediemail, vendinfo.vend_ediemailbody, vendinfo.vend_edisubject, vendinfo.vend_edifilename, vendinfo.vend_accntnum, vendinfo.vend_emailpodelivery, vendinfo.vend_restrictpurch, vendinfo.vend_edicc, m.addr_country AS vend_country, vendinfo.vend_curr_id, vendinfo.vend_taxzone_id FROM (((vendinfo LEFT JOIN cntct c1 ON ((vendinfo.vend_cntct1_id = c1.cntct_id))) LEFT JOIN addr m ON ((vendinfo.vend_addr_id = m.addr_id))) LEFT JOIN cntct c2 ON ((vendinfo.vend_cntct2_id = c2.cntct_id))); ALTER TABLE public.vend OWNER TO admin; -- -- Name: vend_vend_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE vend_vend_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.vend_vend_id_seq OWNER TO admin; -- -- Name: vend_vend_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('vend_vend_id_seq', 97, true); -- -- Name: vendaddr; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW vendaddr AS SELECT vendaddrinfo.vendaddr_id, vendaddrinfo.vendaddr_vend_id, vendaddrinfo.vendaddr_code, vendaddrinfo.vendaddr_name, m.addr_line1 AS vendaddr_address1, m.addr_line2 AS vendaddr_address2, m.addr_line3 AS vendaddr_address3, btrim(((c1.cntct_first_name || ' '::text) || c1.cntct_last_name)) AS vendaddr_contact1, c1.cntct_phone AS vendaddr_phone1, c1.cntct_fax AS vendaddr_fax1, m.addr_city AS vendaddr_city, m.addr_state AS vendaddr_state, m.addr_postalcode AS vendaddr_zipcode, m.addr_country AS vendaddr_country FROM ((vendaddrinfo LEFT JOIN cntct c1 ON ((vendaddrinfo.vendaddr_cntct_id = c1.cntct_id))) LEFT JOIN addr m ON ((vendaddrinfo.vendaddr_addr_id = m.addr_id))); ALTER TABLE public.vendaddr OWNER TO admin; -- -- Name: vendaddr_vendaddr_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE vendaddr_vendaddr_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.vendaddr_vendaddr_id_seq OWNER TO admin; -- -- Name: vendaddr_vendaddr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('vendaddr_vendaddr_id_seq', 36, true); -- -- Name: vendtype_vendtype_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE vendtype_vendtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.vendtype_vendtype_id_seq OWNER TO admin; -- -- Name: vendtype_vendtype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE vendtype_vendtype_id_seq OWNED BY vendtype.vendtype_id; -- -- Name: vendtype_vendtype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('vendtype_vendtype_id_seq', 22, true); -- -- Name: vodist; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE vodist ( vodist_id integer DEFAULT nextval(('"vodist_vodist_id_seq"'::text)::regclass) NOT NULL, vodist_poitem_id integer, vodist_vohead_id integer, vodist_costelem_id integer, vodist_accnt_id integer, vodist_amount numeric(18,6), vodist_qty numeric(18,6), vodist_expcat_id integer DEFAULT (-1), vodist_tax_id integer DEFAULT (-1), vodist_discountable boolean DEFAULT true NOT NULL, vodist_notes text ); ALTER TABLE public.vodist OWNER TO admin; -- -- Name: TABLE vodist; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE vodist IS 'Voucher distribution information'; -- -- Name: vodist_vodist_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE vodist_vodist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.vodist_vodist_id_seq OWNER TO admin; -- -- Name: vodist_vodist_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('vodist_vodist_id_seq', 350, true); -- -- Name: vohead; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE vohead ( vohead_id integer DEFAULT nextval(('vohead_vohead_id_seq'::text)::regclass) NOT NULL, vohead_number text NOT NULL, vohead_pohead_id integer, vohead_posted boolean, vohead_duedate date, vohead_invcnumber text, vohead_amount numeric(16,4), vohead_docdate date, vohead_1099 boolean, vohead_distdate date, vohead_reference text, vohead_terms_id integer, vohead_vend_id integer, vohead_curr_id integer DEFAULT basecurrid(), vohead_adjtaxtype_id integer, vohead_freighttaxtype_id integer, vohead_gldistdate date, vohead_misc boolean, vohead_taxzone_id integer, vohead_taxtype_id integer, vohead_notes text, vohead_recurring_vohead_id integer, CONSTRAINT vohead_vohead_number_check CHECK ((vohead_number <> ''::text)) ); ALTER TABLE public.vohead OWNER TO admin; -- -- Name: TABLE vohead; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE vohead IS 'Voucher header information'; -- -- Name: vohead_vohead_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE vohead_vohead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.vohead_vohead_id_seq OWNER TO admin; -- -- Name: vohead_vohead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('vohead_vohead_id_seq', 452, true); -- -- Name: voheadtax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE voheadtax ( ) INHERITS (taxhist); ALTER TABLE public.voheadtax OWNER TO admin; -- -- Name: voitem; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE voitem ( voitem_id integer DEFAULT nextval(('"voitem_voitem_id_seq"'::text)::regclass) NOT NULL, voitem_vohead_id integer, voitem_poitem_id integer, voitem_close boolean, voitem_qty numeric(18,6), voitem_freight numeric(16,4) DEFAULT 0.0 NOT NULL, voitem_taxtype_id integer ); ALTER TABLE public.voitem OWNER TO admin; -- -- Name: TABLE voitem; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE voitem IS 'Voucher Line Item information'; -- -- Name: voitem_voitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE voitem_voitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.voitem_voitem_id_seq OWNER TO admin; -- -- Name: voitem_voitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('voitem_voitem_id_seq', 277, true); -- -- Name: voitemtax; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE voitemtax ( ) INHERITS (taxhist); ALTER TABLE public.voitemtax OWNER TO admin; -- -- Name: warehous; Type: VIEW; Schema: public; Owner: admin -- CREATE VIEW warehous AS SELECT whsinfo.warehous_id, whsinfo.warehous_code, whsinfo.warehous_descrip, m.addr_line1 AS warehous_addr1, m.addr_line2 AS warehous_addr2, m.addr_line3 AS warehous_addr3, m.addr_city AS warehous_addr4, m.addr_city AS warehous_city, m.addr_state AS warehous_state, m.addr_postalcode AS warehous_zip, m.addr_country AS warehous_country, whsinfo.warehous_fob, whsinfo.warehous_active, whsinfo.warehous_sitetype_id, whsinfo.warehous_counttag_prefix, whsinfo.warehous_counttag_number, whsinfo.warehous_bol_prefix, whsinfo.warehous_bol_number, whsinfo.warehous_shipping, whsinfo.warehous_useslips, whsinfo.warehous_usezones, whsinfo.warehous_aislesize, whsinfo.warehous_aislealpha, whsinfo.warehous_racksize, whsinfo.warehous_rackalpha, whsinfo.warehous_binsize, whsinfo.warehous_binalpha, whsinfo.warehous_locationsize, whsinfo.warehous_locationalpha, whsinfo.warehous_enforcearbl, whsinfo.warehous_default_accnt_id, whsinfo.warehous_shipping_commission FROM ((whsinfo LEFT JOIN cntct c1 ON ((whsinfo.warehous_cntct_id = c1.cntct_id))) LEFT JOIN addr m ON ((whsinfo.warehous_addr_id = m.addr_id))); ALTER TABLE public.warehous OWNER TO admin; -- -- Name: warehous_warehous_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE warehous_warehous_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.warehous_warehous_id_seq OWNER TO admin; -- -- Name: warehous_warehous_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('warehous_warehous_id_seq', 40, true); -- -- Name: whsezone_whsezone_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE whsezone_whsezone_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.whsezone_whsezone_id_seq OWNER TO admin; -- -- Name: whsezone_whsezone_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE whsezone_whsezone_id_seq OWNED BY whsezone.whsezone_id; -- -- Name: whsezone_whsezone_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('whsezone_whsezone_id_seq', 9, true); -- -- Name: wo_wo_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE wo_wo_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.wo_wo_id_seq OWNER TO admin; -- -- Name: wo_wo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('wo_wo_id_seq', 615, true); -- -- Name: womatl_womatl_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE womatl_womatl_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.womatl_womatl_id_seq OWNER TO admin; -- -- Name: womatl_womatl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('womatl_womatl_id_seq', 1906, true); -- -- Name: womatlpost; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE womatlpost ( womatlpost_id integer NOT NULL, womatlpost_womatl_id integer, womatlpost_invhist_id integer ); ALTER TABLE public.womatlpost OWNER TO admin; -- -- Name: TABLE womatlpost; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE womatlpost IS 'Table to tie work order to work order material transactions for efficient queries'; -- -- Name: womatlpost_womatlpost_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE womatlpost_womatlpost_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.womatlpost_womatlpost_id_seq OWNER TO admin; -- -- Name: womatlpost_womatlpost_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE womatlpost_womatlpost_id_seq OWNED BY womatlpost.womatlpost_id; -- -- Name: womatlpost_womatlpost_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('womatlpost_womatlpost_id_seq', 215, true); -- -- Name: womatlvar; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE womatlvar ( womatlvar_id integer DEFAULT nextval(('"womatlvar_womatlvar_id_seq"'::text)::regclass) NOT NULL, womatlvar_number integer, womatlvar_subnumber integer, womatlvar_posted date, womatlvar_parent_itemsite_id integer, womatlvar_component_itemsite_id integer, womatlvar_qtyord numeric(18,6), womatlvar_qtyrcv numeric(18,6), womatlvar_qtyiss numeric(18,6), womatlvar_qtyper numeric(18,6), womatlvar_scrap numeric(18,6), womatlvar_wipscrap numeric(18,6), womatlvar_bomitem_id integer, womatlvar_ref text, womatlvar_notes text, womatlvar_qtyfxd numeric(20,8) DEFAULT 0 NOT NULL ); ALTER TABLE public.womatlvar OWNER TO admin; -- -- Name: TABLE womatlvar; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE womatlvar IS 'Work Order Material Requirements Variance information'; -- -- Name: COLUMN womatlvar.womatlvar_qtyfxd; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON COLUMN womatlvar.womatlvar_qtyfxd IS 'The fixed quantity required'; -- -- Name: womatlvar_womatlvar_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE womatlvar_womatlvar_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ALTER TABLE public.womatlvar_womatlvar_id_seq OWNER TO admin; -- -- Name: womatlvar_womatlvar_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('womatlvar_womatlvar_id_seq', 312, true); -- -- Name: xcalitem_xcalitem_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE xcalitem_xcalitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.xcalitem_xcalitem_id_seq OWNER TO admin; -- -- Name: xcalitem_xcalitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('xcalitem_xcalitem_id_seq', 217, true); -- -- Name: xsltmap; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE xsltmap ( xsltmap_id integer NOT NULL, xsltmap_name text NOT NULL, xsltmap_doctype text NOT NULL, xsltmap_system text NOT NULL, xsltmap_import text NOT NULL, xsltmap_export text DEFAULT ''::text NOT NULL, CONSTRAINT xsltmap_check CHECK (((xsltmap_doctype <> ''::text) OR (xsltmap_system <> ''::text))), CONSTRAINT xsltmap_xsltmap_importexport_check CHECK (((xsltmap_import <> ''::text) OR (xsltmap_export <> ''::text))), CONSTRAINT xsltmap_xsltmap_name_check CHECK ((xsltmap_name <> ''::text)) ); ALTER TABLE public.xsltmap OWNER TO admin; -- -- Name: TABLE xsltmap; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE xsltmap IS 'Mapping of XML System identifiers to XSLT transformation files'; -- -- Name: xsltmap_xsltmap_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE xsltmap_xsltmap_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.xsltmap_xsltmap_id_seq OWNER TO admin; -- -- Name: xsltmap_xsltmap_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE xsltmap_xsltmap_id_seq OWNED BY xsltmap.xsltmap_id; -- -- Name: xsltmap_xsltmap_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('xsltmap_xsltmap_id_seq', 1, true); -- -- Name: yearperiod; Type: TABLE; Schema: public; Owner: admin; Tablespace: -- CREATE TABLE yearperiod ( yearperiod_id integer NOT NULL, yearperiod_start date NOT NULL, yearperiod_end date NOT NULL, yearperiod_closed boolean DEFAULT false NOT NULL ); ALTER TABLE public.yearperiod OWNER TO admin; -- -- Name: TABLE yearperiod; Type: COMMENT; Schema: public; Owner: admin -- COMMENT ON TABLE yearperiod IS 'Accounting Year Periods information'; -- -- Name: yearperiod_yearperiod_id_seq; Type: SEQUENCE; Schema: public; Owner: admin -- CREATE SEQUENCE yearperiod_yearperiod_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE public.yearperiod_yearperiod_id_seq OWNER TO admin; -- -- Name: yearperiod_yearperiod_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: admin -- ALTER SEQUENCE yearperiod_yearperiod_id_seq OWNED BY yearperiod.yearperiod_id; -- -- Name: yearperiod_yearperiod_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin -- SELECT pg_catalog.setval('yearperiod_yearperiod_id_seq', 14, true); SET search_path = te, pg_catalog; -- -- Name: pkgcmd; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE pkgcmd ( cmd_id integer DEFAULT nextval('public.cmd_cmd_id_seq'::regclass) ) INHERITS (public.cmd); ALTER TABLE te.pkgcmd OWNER TO admin; -- -- Name: pkgcmdarg; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE pkgcmdarg ( cmdarg_id integer DEFAULT nextval('public.cmdarg_cmdarg_id_seq'::regclass) ) INHERITS (public.cmdarg); ALTER TABLE te.pkgcmdarg OWNER TO admin; -- -- Name: pkgimage; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE pkgimage ( image_id integer DEFAULT nextval('public.image_image_id_seq'::regclass) ) INHERITS (public.image); ALTER TABLE te.pkgimage OWNER TO admin; -- -- Name: pkgmetasql; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE pkgmetasql ( metasql_id integer DEFAULT nextval('public.metasql_metasql_id_seq'::regclass) ) INHERITS (public.metasql); ALTER TABLE te.pkgmetasql OWNER TO admin; -- -- Name: pkgpriv; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE pkgpriv ( priv_id integer DEFAULT nextval('public.priv_priv_id_seq'::regclass) ) INHERITS (public.priv); ALTER TABLE te.pkgpriv OWNER TO admin; -- -- Name: pkgreport; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE pkgreport ( report_id integer DEFAULT nextval('public.report_report_id_seq'::regclass) ) INHERITS (public.report); ALTER TABLE te.pkgreport OWNER TO admin; -- -- Name: pkgscript; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE pkgscript ( script_id integer DEFAULT nextval('public.script_script_id_seq'::regclass) ) INHERITS (public.script); ALTER TABLE te.pkgscript OWNER TO admin; -- -- Name: pkguiform; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE pkguiform ( uiform_id integer DEFAULT nextval('public.uiform_uiform_id_seq'::regclass) ) INHERITS (public.uiform); ALTER TABLE te.pkguiform OWNER TO admin; -- -- Name: tecustrate; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE tecustrate ( tecustrate_cust_id integer NOT NULL, tecustrate_rate numeric(16,4) NOT NULL, tecustrate_id integer NOT NULL, tecustrate_curr_id integer DEFAULT public.basecurrid() NOT NULL ); ALTER TABLE te.tecustrate OWNER TO admin; -- -- Name: TABLE tecustrate; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON TABLE tecustrate IS 'Default Customer Billing rate for Time/Expense'; -- -- Name: tecustrate_tecustrate_id_seq; Type: SEQUENCE; Schema: te; Owner: admin -- CREATE SEQUENCE tecustrate_tecustrate_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE te.tecustrate_tecustrate_id_seq OWNER TO admin; -- -- Name: tecustrate_tecustrate_id_seq; Type: SEQUENCE OWNED BY; Schema: te; Owner: admin -- ALTER SEQUENCE tecustrate_tecustrate_id_seq OWNED BY tecustrate.tecustrate_id; -- -- Name: tecustrate_tecustrate_id_seq; Type: SEQUENCE SET; Schema: te; Owner: admin -- SELECT pg_catalog.setval('tecustrate_tecustrate_id_seq', 1, false); -- -- Name: teemp; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE teemp ( teemp_id integer NOT NULL, teemp_emp_id integer, teemp_contractor boolean DEFAULT false ); ALTER TABLE te.teemp OWNER TO admin; -- -- Name: teemp_teemp_id_seq; Type: SEQUENCE; Schema: te; Owner: admin -- CREATE SEQUENCE teemp_teemp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE te.teemp_teemp_id_seq OWNER TO admin; -- -- Name: teemp_teemp_id_seq; Type: SEQUENCE OWNED BY; Schema: te; Owner: admin -- ALTER SEQUENCE teemp_teemp_id_seq OWNED BY teemp.teemp_id; -- -- Name: teemp_teemp_id_seq; Type: SEQUENCE SET; Schema: te; Owner: admin -- SELECT pg_catalog.setval('teemp_teemp_id_seq', 1, true); -- -- Name: teexp; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE teexp ( teexp_id integer NOT NULL, teexp_expcat_id integer, teexp_accnt_id integer ); ALTER TABLE te.teexp OWNER TO admin; -- -- Name: TABLE teexp; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON TABLE teexp IS 'Expense/Item'; -- -- Name: timesheet_seq; Type: SEQUENCE; Schema: te; Owner: admin -- CREATE SEQUENCE timesheet_seq START WITH 1000 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE te.timesheet_seq OWNER TO admin; -- -- Name: timesheet_seq; Type: SEQUENCE SET; Schema: te; Owner: admin -- SELECT pg_catalog.setval('timesheet_seq', 1001, true); -- -- Name: tehead; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE tehead ( tehead_id integer NOT NULL, tehead_number text DEFAULT nextval('timesheet_seq'::regclass), tehead_weekending date, tehead_lastupdated timestamp without time zone DEFAULT now() NOT NULL, tehead_notes text, tehead_status character(1) DEFAULT 'O'::bpchar NOT NULL, tehead_emp_id integer, tehead_warehous_id integer NOT NULL, tehead_username text DEFAULT "current_user"() NOT NULL, CONSTRAINT tehead_tehead_status_check CHECK ((tehead_status = ANY (ARRAY['O'::bpchar, 'A'::bpchar, 'C'::bpchar]))) ); ALTER TABLE te.tehead OWNER TO admin; -- -- Name: TABLE tehead; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON TABLE tehead IS 'time/expense header'; -- -- Name: tehead_tehead_id_seq; Type: SEQUENCE; Schema: te; Owner: admin -- CREATE SEQUENCE tehead_tehead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE te.tehead_tehead_id_seq OWNER TO admin; -- -- Name: tehead_tehead_id_seq; Type: SEQUENCE OWNED BY; Schema: te; Owner: admin -- ALTER SEQUENCE tehead_tehead_id_seq OWNED BY tehead.tehead_id; -- -- Name: tehead_tehead_id_seq; Type: SEQUENCE SET; Schema: te; Owner: admin -- SELECT pg_catalog.setval('tehead_tehead_id_seq', 2, true); -- -- Name: teitem; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE teitem ( teitem_id integer NOT NULL, teitem_tehead_id integer, teitem_linenumber integer NOT NULL, teitem_type character(1) NOT NULL, teitem_workdate date, teitem_cust_id integer, teitem_vend_id integer, teitem_po text, teitem_item_id integer NOT NULL, teitem_qty numeric NOT NULL, teitem_rate numeric NOT NULL, teitem_total numeric NOT NULL, teitem_prjtask_id numeric, teitem_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, teitem_billable boolean, teitem_prepaid boolean, teitem_notes text, teitem_posted boolean DEFAULT false, teitem_curr_id integer DEFAULT public.basecurrid() NOT NULL, teitem_uom_id integer, teitem_invcitem_id integer, teitem_vodist_id integer, teitem_postedvalue numeric DEFAULT 0 NOT NULL, teitem_empcost numeric ); ALTER TABLE te.teitem OWNER TO admin; -- -- Name: TABLE teitem; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON TABLE teitem IS 'time/expense detail'; -- -- Name: COLUMN teitem.teitem_type; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON COLUMN teitem.teitem_type IS 'T or E'; -- -- Name: COLUMN teitem.teitem_vend_id; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON COLUMN teitem.teitem_vend_id IS 'future use - for payment of vendor for expenses'; -- -- Name: COLUMN teitem.teitem_prepaid; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON COLUMN teitem.teitem_prepaid IS 'Used for expenses only. CC paid expenses would be prepaid.'; -- -- Name: teitem_teitem_id_seq; Type: SEQUENCE; Schema: te; Owner: admin -- CREATE SEQUENCE teitem_teitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE te.teitem_teitem_id_seq OWNER TO admin; -- -- Name: teitem_teitem_id_seq; Type: SEQUENCE OWNED BY; Schema: te; Owner: admin -- ALTER SEQUENCE teitem_teitem_id_seq OWNED BY teitem.teitem_id; -- -- Name: teitem_teitem_id_seq; Type: SEQUENCE SET; Schema: te; Owner: admin -- SELECT pg_catalog.setval('teitem_teitem_id_seq', 4, true); -- -- Name: teprj; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE teprj ( teprj_id integer NOT NULL, teprj_prj_id integer, teprj_cust_id integer, teprj_rate numeric, teprj_curr_id integer ); ALTER TABLE te.teprj OWNER TO admin; -- -- Name: TABLE teprj; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON TABLE teprj IS 't/e information for projects'; -- -- Name: teprj_teprj_id_seq; Type: SEQUENCE; Schema: te; Owner: admin -- CREATE SEQUENCE teprj_teprj_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE te.teprj_teprj_id_seq OWNER TO admin; -- -- Name: teprj_teprj_id_seq; Type: SEQUENCE OWNED BY; Schema: te; Owner: admin -- ALTER SEQUENCE teprj_teprj_id_seq OWNED BY teprj.teprj_id; -- -- Name: teprj_teprj_id_seq; Type: SEQUENCE SET; Schema: te; Owner: admin -- SELECT pg_catalog.setval('teprj_teprj_id_seq', 3, true); -- -- Name: teprjtask; Type: TABLE; Schema: te; Owner: admin; Tablespace: -- CREATE TABLE teprjtask ( teprjtask_id integer NOT NULL, teprjtask_cust_id integer, teprjtask_rate numeric, teprjtask_item_id integer, teprjtask_prjtask_id integer, teprjtask_curr_id integer DEFAULT public.basecurrid() ); ALTER TABLE te.teprjtask OWNER TO admin; -- -- Name: TABLE teprjtask; Type: COMMENT; Schema: te; Owner: admin -- COMMENT ON TABLE teprjtask IS 't/e information for tasks'; -- -- Name: teprjtask_teprjtask_id_seq; Type: SEQUENCE; Schema: te; Owner: admin -- CREATE SEQUENCE teprjtask_teprjtask_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ALTER TABLE te.teprjtask_teprjtask_id_seq OWNER TO admin; -- -- Name: teprjtask_teprjtask_id_seq; Type: SEQUENCE OWNED BY; Schema: te; Owner: admin -- ALTER SEQUENCE teprjtask_teprjtask_id_seq OWNED BY teprjtask.teprjtask_id; -- -- Name: teprjtask_teprjtask_id_seq; Type: SEQUENCE SET; Schema: te; Owner: admin -- SELECT pg_catalog.setval('teprjtask_teprjtask_id_seq', 7, true); SET search_path = xtdesktop, pg_catalog; -- -- Name: pkgcmd; Type: TABLE; Schema: xtdesktop; Owner: admin; Tablespace: -- CREATE TABLE pkgcmd ( cmd_id integer DEFAULT nextval('public.cmd_cmd_id_seq'::regclass) ) INHERITS (public.cmd); ALTER TABLE xtdesktop.pkgcmd OWNER TO admin; -- -- Name: pkgcmdarg; Type: TABLE; Schema: xtdesktop; Owner: admin; Tablespace: -- CREATE TABLE pkgcmdarg ( cmdarg_id integer DEFAULT nextval('public.cmdarg_cmdarg_id_seq'::regclass) ) INHERITS (public.cmdarg); ALTER TABLE xtdesktop.pkgcmdarg OWNER TO admin; -- -- Name: pkgimage; Type: TABLE; Schema: xtdesktop; Owner: admin; Tablespace: -- CREATE TABLE pkgimage ( image_id integer DEFAULT nextval('public.image_image_id_seq'::regclass) ) INHERITS (public.image); ALTER TABLE xtdesktop.pkgimage OWNER TO admin; -- -- Name: pkgmetasql; Type: TABLE; Schema: xtdesktop; Owner: admin; Tablespace: -- CREATE TABLE pkgmetasql ( metasql_id integer DEFAULT nextval('public.metasql_metasql_id_seq'::regclass) ) INHERITS (public.metasql); ALTER TABLE xtdesktop.pkgmetasql OWNER TO admin; -- -- Name: pkgpriv; Type: TABLE; Schema: xtdesktop; Owner: admin; Tablespace: -- CREATE TABLE pkgpriv ( priv_id integer DEFAULT nextval('public.priv_priv_id_seq'::regclass) ) INHERITS (public.priv); ALTER TABLE xtdesktop.pkgpriv OWNER TO admin; -- -- Name: pkgreport; Type: TABLE; Schema: xtdesktop; Owner: admin; Tablespace: -- CREATE TABLE pkgreport ( report_id integer DEFAULT nextval('public.report_report_id_seq'::regclass) ) INHERITS (public.report); ALTER TABLE xtdesktop.pkgreport OWNER TO admin; -- -- Name: pkgscript; Type: TABLE; Schema: xtdesktop; Owner: admin; Tablespace: -- CREATE TABLE pkgscript ( script_id integer DEFAULT nextval('public.script_script_id_seq'::regclass) ) INHERITS (public.script); ALTER TABLE xtdesktop.pkgscript OWNER TO admin; -- -- Name: pkguiform; Type: TABLE; Schema: xtdesktop; Owner: admin; Tablespace: -- CREATE TABLE pkguiform ( uiform_id integer DEFAULT nextval('public.uiform_uiform_id_seq'::regclass) ) INHERITS (public.uiform); ALTER TABLE xtdesktop.pkguiform OWNER TO admin; SET search_path = public, pg_catalog; -- -- Name: addr_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE addr ALTER COLUMN addr_id SET DEFAULT nextval('addr_addr_id_seq'::regclass); -- -- Name: alarm_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE alarm ALTER COLUMN alarm_id SET DEFAULT nextval('alarm_alarm_id_seq'::regclass); -- -- Name: apaccnt_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE apaccnt ALTER COLUMN apaccnt_id SET DEFAULT nextval('apaccnt_apaccnt_id_seq'::regclass); -- -- Name: apapply_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE apapply ALTER COLUMN apapply_id SET DEFAULT nextval('apapply_apapply_id_seq'::regclass); -- -- Name: apcreditapply_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE apcreditapply ALTER COLUMN apcreditapply_id SET DEFAULT nextval('apcreditapply_apcreditapply_id_seq'::regclass); -- -- Name: apselect_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE apselect ALTER COLUMN apselect_id SET DEFAULT nextval('apselect_apselect_id_seq'::regclass); -- -- Name: arapply_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE arapply ALTER COLUMN arapply_id SET DEFAULT nextval('arapply_arapply_id_seq'::regclass); -- -- Name: asohist_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE asohist ALTER COLUMN asohist_id SET DEFAULT nextval('asohist_asohist_id_seq'::regclass); -- -- Name: atlasmap_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE atlasmap ALTER COLUMN atlasmap_id SET DEFAULT nextval('atlasmap_atlasmap_id_seq'::regclass); -- -- Name: bankaccnt_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE bankaccnt ALTER COLUMN bankaccnt_id SET DEFAULT nextval('bankaccnt_bankaccnt_id_seq'::regclass); -- -- Name: bankadj_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE bankadj ALTER COLUMN bankadj_id SET DEFAULT nextval('bankadj_bankadj_id_seq'::regclass); -- -- Name: bankadjtype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE bankadjtype ALTER COLUMN bankadjtype_id SET DEFAULT nextval('bankadjtype_bankadjtype_id_seq'::regclass); -- -- Name: bankrec_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE bankrec ALTER COLUMN bankrec_id SET DEFAULT nextval('bankrec_bankrec_id_seq'::regclass); -- -- Name: bankrecitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE bankrecitem ALTER COLUMN bankrecitem_id SET DEFAULT nextval('bankrecitem_bankrecitem_id_seq'::regclass); -- -- Name: bomitemcost_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE bomitemcost ALTER COLUMN bomitemcost_id SET DEFAULT nextval('bomitemcost_bomitemcost_id_seq'::regclass); -- -- Name: bomitemsub_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE bomitemsub ALTER COLUMN bomitemsub_id SET DEFAULT nextval('bomitemsub_bomitemsub_id_seq'::regclass); -- -- Name: bomwork_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE bomwork ALTER COLUMN bomwork_id SET DEFAULT nextval('bomwork_bomwork_id_seq'::regclass); -- -- Name: budghead_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE budghead ALTER COLUMN budghead_id SET DEFAULT nextval('budghead_budghead_id_seq'::regclass); -- -- Name: budgitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE budgitem ALTER COLUMN budgitem_id SET DEFAULT nextval('budgitem_budgitem_id_seq'::regclass); -- -- Name: cashrcpt_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cashrcpt ALTER COLUMN cashrcpt_id SET DEFAULT nextval('cashrcpt_cashrcpt_id_seq'::regclass); -- -- Name: cashrcptitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cashrcptitem ALTER COLUMN cashrcptitem_id SET DEFAULT nextval('cashrcptitem_cashrcptitem_id_seq'::regclass); -- -- Name: cashrcptmisc_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cashrcptmisc ALTER COLUMN cashrcptmisc_id SET DEFAULT nextval('cashrcptmisc_cashrcptmisc_id_seq'::regclass); -- -- Name: ccard_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ccard ALTER COLUMN ccard_id SET DEFAULT nextval('ccard_ccard_id_seq'::regclass); -- -- Name: ccardaud_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ccardaud ALTER COLUMN ccardaud_id SET DEFAULT nextval('ccardaud_ccardaud_id_seq'::regclass); -- -- Name: ccbank_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ccbank ALTER COLUMN ccbank_id SET DEFAULT nextval('ccbank_ccbank_id_seq'::regclass); -- -- Name: ccpay_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ccpay ALTER COLUMN ccpay_id SET DEFAULT nextval('ccpay_ccpay_id_seq'::regclass); -- -- Name: char_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE "char" ALTER COLUMN char_id SET DEFAULT nextval('char_char_id_seq'::regclass); -- -- Name: charass_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE charass ALTER COLUMN charass_id SET DEFAULT nextval('charass_charass_id_seq'::regclass); -- -- Name: charopt_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE charopt ALTER COLUMN charopt_id SET DEFAULT nextval('charopt_charopt_id_seq'::regclass); -- -- Name: checkhead_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE checkhead ALTER COLUMN checkhead_id SET DEFAULT nextval('checkhead_checkhead_id_seq'::regclass); -- -- Name: checkitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE checkitem ALTER COLUMN checkitem_id SET DEFAULT nextval('checkitem_checkitem_id_seq'::regclass); -- -- Name: cmnttype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cmnttype ALTER COLUMN cmnttype_id SET DEFAULT nextval('cmnttype_cmnttype_id_seq'::regclass); -- -- Name: cmnttypesource_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cmnttypesource ALTER COLUMN cmnttypesource_id SET DEFAULT nextval('cmnttypesource_cmnttypesource_id_seq'::regclass); -- -- Name: cntct_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cntct ALTER COLUMN cntct_id SET DEFAULT nextval('cntct_cntct_id_seq'::regclass); -- -- Name: cntctaddr_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cntctaddr ALTER COLUMN cntctaddr_id SET DEFAULT nextval('cntctaddr_cntctaddr_id_seq'::regclass); -- -- Name: cntctdata_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cntctdata ALTER COLUMN cntctdata_id SET DEFAULT nextval('cntctdata_cntctdata_id_seq'::regclass); -- -- Name: cntcteml_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE cntcteml ALTER COLUMN cntcteml_id SET DEFAULT nextval('cntcteml_cntcteml_id_seq'::regclass); -- -- Name: company_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE company ALTER COLUMN company_id SET DEFAULT nextval('company_company_id_seq'::regclass); -- -- Name: contrct_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE contrct ALTER COLUMN contrct_id SET DEFAULT nextval('contrct_contrct_id_seq'::regclass); -- -- Name: country_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE country ALTER COLUMN country_id SET DEFAULT nextval('country_country_id_seq'::regclass); -- -- Name: crmacct_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE crmacct ALTER COLUMN crmacct_id SET DEFAULT nextval('crmacct_crmacct_id_seq'::regclass); -- -- Name: curr_rate_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE curr_rate ALTER COLUMN curr_rate_id SET DEFAULT nextval('curr_rate_curr_rate_id_seq'::regclass); -- -- Name: curr_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE curr_symbol ALTER COLUMN curr_id SET DEFAULT nextval('curr_symbol_curr_id_seq'::regclass); -- -- Name: dept_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE dept ALTER COLUMN dept_id SET DEFAULT nextval('dept_dept_id_seq'::regclass); -- -- Name: docass_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE docass ALTER COLUMN docass_id SET DEFAULT nextval('docass_docass_id_seq'::regclass); -- -- Name: emp_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE emp ALTER COLUMN emp_id SET DEFAULT nextval('emp_emp_id_seq'::regclass); -- -- Name: empgrp_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE empgrp ALTER COLUMN empgrp_id SET DEFAULT nextval('empgrp_empgrp_id_seq'::regclass); -- -- Name: empgrpitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE empgrpitem ALTER COLUMN empgrpitem_id SET DEFAULT nextval('empgrpitem_empgrpitem_id_seq'::regclass); -- -- Name: expcat_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE expcat ALTER COLUMN expcat_id SET DEFAULT nextval('expcat_expcat_id_seq'::regclass); -- -- Name: file_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE file ALTER COLUMN file_id SET DEFAULT nextval('file_file_id_seq'::regclass); -- -- Name: filter_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE filter ALTER COLUMN filter_id SET DEFAULT nextval('filter_filter_id_seq'::regclass); -- -- Name: flcol_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE flcol ALTER COLUMN flcol_id SET DEFAULT nextval('flcol_flcol_id_seq'::regclass); -- -- Name: flgrp_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE flgrp ALTER COLUMN flgrp_id SET DEFAULT nextval('flgrp_flgrp_id_seq'::regclass); -- -- Name: flhead_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE flhead ALTER COLUMN flhead_id SET DEFAULT nextval('flhead_flhead_id_seq'::regclass); -- -- Name: flitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE flitem ALTER COLUMN flitem_id SET DEFAULT nextval('flitem_flitem_id_seq'::regclass); -- -- Name: flnotes_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE flnotes ALTER COLUMN flnotes_id SET DEFAULT nextval('flnotes_flnotes_id_seq'::regclass); -- -- Name: flrpt_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE flrpt ALTER COLUMN flrpt_id SET DEFAULT nextval('flrpt_flrpt_id_seq'::regclass); -- -- Name: flspec_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE flspec ALTER COLUMN flspec_id SET DEFAULT nextval('flspec_flspec_id_seq'::regclass); -- -- Name: freightclass_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE freightclass ALTER COLUMN freightclass_id SET DEFAULT nextval('freightclass_freightclass_id_seq'::regclass); -- -- Name: grp_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE grp ALTER COLUMN grp_id SET DEFAULT nextval('grp_grp_id_seq'::regclass); -- -- Name: grppriv_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE grppriv ALTER COLUMN grppriv_id SET DEFAULT nextval('grppriv_grppriv_id_seq'::regclass); -- -- Name: hnfc_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE hnfc ALTER COLUMN hnfc_id SET DEFAULT nextval('hnfc_hnfc_id_seq'::regclass); -- -- Name: incdt_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE incdt ALTER COLUMN incdt_id SET DEFAULT nextval('incdt_incdt_id_seq'::regclass); -- -- Name: incdtcat_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE incdtcat ALTER COLUMN incdtcat_id SET DEFAULT nextval('incdtcat_incdtcat_id_seq'::regclass); -- -- Name: incdthist_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE incdthist ALTER COLUMN incdthist_id SET DEFAULT nextval('incdthist_incdthist_id_seq'::regclass); -- -- Name: incdtpriority_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE incdtpriority ALTER COLUMN incdtpriority_id SET DEFAULT nextval('incdtpriority_incdtpriority_id_seq'::regclass); -- -- Name: incdtresolution_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE incdtresolution ALTER COLUMN incdtresolution_id SET DEFAULT nextval('incdtresolution_incdtresolution_id_seq'::regclass); -- -- Name: incdtseverity_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE incdtseverity ALTER COLUMN incdtseverity_id SET DEFAULT nextval('incdtseverity_incdtseverity_id_seq'::regclass); -- -- Name: invbal_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE invbal ALTER COLUMN invbal_id SET DEFAULT nextval('invbal_invbal_id_seq'::regclass); -- -- Name: invchead_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE invchead ALTER COLUMN invchead_id SET DEFAULT nextval('invchead_invchead_id_seq'::regclass); -- -- Name: invcitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE invcitem ALTER COLUMN invcitem_id SET DEFAULT nextval('invcitem_invcitem_id_seq'::regclass); -- -- Name: invhistexpcat_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE invhistexpcat ALTER COLUMN invhistexpcat_id SET DEFAULT nextval('invhistexpcat_invhistexpcat_id_seq'::regclass); -- -- Name: ipsass_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ipsass ALTER COLUMN ipsass_id SET DEFAULT nextval('ipsass_ipsass_id_seq'::regclass); -- -- Name: ipsfreight_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ipsfreight ALTER COLUMN ipsfreight_id SET DEFAULT nextval('ipsfreight_ipsfreight_id_seq'::regclass); -- -- Name: ipsitemchar_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ipsitemchar ALTER COLUMN ipsitemchar_id SET DEFAULT nextval('ipsitemchar_ipsitemchar_id_seq'::regclass); -- -- Name: ipsprodcat_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ipsprodcat_bak ALTER COLUMN ipsprodcat_id SET DEFAULT nextval('ipsprodcat_ipsprodcat_id_seq'::regclass); -- -- Name: itemlocpost_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE itemlocpost ALTER COLUMN itemlocpost_id SET DEFAULT nextval('itemlocpost_itemlocpost_id_seq'::regclass); -- -- Name: itemtax_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE itemtax ALTER COLUMN itemtax_id SET DEFAULT nextval('itemtax_itemtax_id_seq'::regclass); -- -- Name: itemtrans_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE itemtrans ALTER COLUMN itemtrans_id SET DEFAULT nextval('itemtrans_itemtrans_id_seq'::regclass); -- -- Name: itemuom_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE itemuom ALTER COLUMN itemuom_id SET DEFAULT nextval('itemuom_itemuom_id_seq'::regclass); -- -- Name: itemuomconv_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE itemuomconv ALTER COLUMN itemuomconv_id SET DEFAULT nextval('itemuomconv_itemuomconv_id_seq'::regclass); -- -- Name: labeldef_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE labeldef ALTER COLUMN labeldef_id SET DEFAULT nextval('labeldef_labeldef_id_seq'::regclass); -- -- Name: lang_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE lang ALTER COLUMN lang_id SET DEFAULT nextval('lang_lang_id_seq'::regclass); -- -- Name: metricenc_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE metricenc ALTER COLUMN metricenc_id SET DEFAULT nextval('metricenc_metricenc_id_seq'::regclass); -- -- Name: ophead_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE ophead ALTER COLUMN ophead_id SET DEFAULT nextval('ophead_ophead_id_seq'::regclass); -- -- Name: opsource_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE opsource ALTER COLUMN opsource_id SET DEFAULT nextval('opsource_opsource_id_seq'::regclass); -- -- Name: opstage_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE opstage ALTER COLUMN opstage_id SET DEFAULT nextval('opstage_opstage_id_seq'::regclass); -- -- Name: optype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE optype ALTER COLUMN optype_id SET DEFAULT nextval('optype_optype_id_seq'::regclass); -- -- Name: pack_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE pack ALTER COLUMN pack_id SET DEFAULT nextval('pack_pack_id_seq'::regclass); -- -- Name: period_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE period ALTER COLUMN period_id SET DEFAULT nextval('period_period_id_seq'::regclass); -- -- Name: pkgdep_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE pkgdep ALTER COLUMN pkgdep_id SET DEFAULT nextval('pkgdep_pkgdep_id_seq'::regclass); -- -- Name: pkghead_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE pkghead ALTER COLUMN pkghead_id SET DEFAULT nextval('pkghead_pkghead_id_seq'::regclass); -- -- Name: pkgitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE pkgitem ALTER COLUMN pkgitem_id SET DEFAULT nextval('pkgitem_pkgitem_id_seq'::regclass); -- -- Name: potype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE potype ALTER COLUMN potype_id SET DEFAULT nextval('potype_potype_id_seq'::regclass); -- -- Name: prftcntr_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE prftcntr ALTER COLUMN prftcntr_id SET DEFAULT nextval('prftcntr_prftcntr_id_seq'::regclass); -- -- Name: prj_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE prj ALTER COLUMN prj_id SET DEFAULT nextval('prj_prj_id_seq'::regclass); -- -- Name: prjtask_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE prjtask ALTER COLUMN prjtask_id SET DEFAULT nextval('prjtask_prjtask_id_seq'::regclass); -- -- Name: prjtaskuser_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE prjtaskuser ALTER COLUMN prjtaskuser_id SET DEFAULT nextval('prjtaskuser_prjtaskuser_id_seq'::regclass); -- -- Name: qryhead_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE qryhead ALTER COLUMN qryhead_id SET DEFAULT nextval('qryhead_qryhead_id_seq'::regclass); -- -- Name: qryitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE qryitem ALTER COLUMN qryitem_id SET DEFAULT nextval('qryitem_qryitem_id_seq'::regclass); -- -- Name: recur_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE recur ALTER COLUMN recur_id SET DEFAULT nextval('recur_recur_id_seq'::regclass); -- -- Name: recurtype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE recurtype ALTER COLUMN recurtype_id SET DEFAULT nextval('recurtype_recurtype_id_seq'::regclass); -- -- Name: recv_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE recv ALTER COLUMN recv_id SET DEFAULT nextval('recv_recv_id_seq'::regclass); -- -- Name: rsncode_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE rsncode ALTER COLUMN rsncode_id SET DEFAULT nextval('rsncode_rsncode_id_seq'::regclass); -- -- Name: salescat_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE salescat ALTER COLUMN salescat_id SET DEFAULT nextval('salescat_salescat_id_seq'::regclass); -- -- Name: saletype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE saletype ALTER COLUMN saletype_id SET DEFAULT nextval('saletype_saletype_id_seq'::regclass); -- -- Name: schemaord_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE schemaord ALTER COLUMN schemaord_id SET DEFAULT nextval('schemaord_schemaord_id_seq'::regclass); -- -- Name: shift_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE shift ALTER COLUMN shift_id SET DEFAULT nextval('shift_shift_id_seq'::regclass); -- -- Name: shipchrg_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE shipchrg ALTER COLUMN shipchrg_id SET DEFAULT nextval('shipchrg_shipchrg_id_seq'::regclass); -- -- Name: shiphead_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE shiphead ALTER COLUMN shiphead_id SET DEFAULT nextval('shiphead_shiphead_id_seq'::regclass); -- -- Name: shipitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE shipitem ALTER COLUMN shipitem_id SET DEFAULT nextval('shipitem_shipitem_id_seq'::regclass); -- -- Name: sitetype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE sitetype ALTER COLUMN sitetype_id SET DEFAULT nextval('sitetype_sitetype_id_seq'::regclass); -- -- Name: source_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE source ALTER COLUMN source_id SET DEFAULT nextval('source_source_id_seq'::regclass); -- -- Name: state_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE state ALTER COLUMN state_id SET DEFAULT nextval('state_state_id_seq'::regclass); -- -- Name: status_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE status ALTER COLUMN status_id SET DEFAULT nextval('status_status_id_seq'::regclass); -- -- Name: stdjrnl_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE stdjrnl ALTER COLUMN stdjrnl_id SET DEFAULT nextval('stdjrnl_stdjrnl_id_seq'::regclass); -- -- Name: stdjrnlgrp_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE stdjrnlgrp ALTER COLUMN stdjrnlgrp_id SET DEFAULT nextval('stdjrnlgrp_stdjrnlgrp_id_seq'::regclass); -- -- Name: stdjrnlgrpitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE stdjrnlgrpitem ALTER COLUMN stdjrnlgrpitem_id SET DEFAULT nextval('stdjrnlgrpitem_stdjrnlgrpitem_id_seq'::regclass); -- -- Name: stdjrnlitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE stdjrnlitem ALTER COLUMN stdjrnlitem_id SET DEFAULT nextval('stdjrnlitem_stdjrnlitem_id_seq'::regclass); -- -- Name: subaccnt_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE subaccnt ALTER COLUMN subaccnt_id SET DEFAULT nextval('subaccnt_subaccnt_id_seq'::regclass); -- -- Name: subaccnttype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE subaccnttype ALTER COLUMN subaccnttype_id SET DEFAULT nextval('subaccnttype_subaccnttype_id_seq'::regclass); -- -- Name: taxass_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE taxass ALTER COLUMN taxass_id SET DEFAULT nextval('taxass_taxass_id_seq'::regclass); -- -- Name: taxauth_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE taxauth ALTER COLUMN taxauth_id SET DEFAULT nextval('taxauth_taxauth_id_seq'::regclass); -- -- Name: taxclass_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE taxclass ALTER COLUMN taxclass_id SET DEFAULT nextval('taxclass_taxclass_id_seq'::regclass); -- -- Name: taxhist_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE taxhist ALTER COLUMN taxhist_id SET DEFAULT nextval('taxhist_taxhist_id_seq'::regclass); -- -- Name: taxrate_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE taxrate ALTER COLUMN taxrate_id SET DEFAULT nextval('taxrate_taxrate_id_seq'::regclass); -- -- Name: taxreg_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE taxreg ALTER COLUMN taxreg_id SET DEFAULT nextval('taxreg_taxreg_id_seq'::regclass); -- -- Name: taxtype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE taxtype ALTER COLUMN taxtype_id SET DEFAULT nextval('taxtype_taxtype_id_seq'::regclass); -- -- Name: taxzone_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE taxzone ALTER COLUMN taxzone_id SET DEFAULT nextval('taxzone_taxzone_id_seq'::regclass); -- -- Name: todoitem_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE todoitem ALTER COLUMN todoitem_id SET DEFAULT nextval('todoitem_todoitem_id_seq'::regclass); -- -- Name: trialbal_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE trialbal ALTER COLUMN trialbal_id SET DEFAULT nextval('trialbal_trialbal_id_seq'::regclass); -- -- Name: uom_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE uom ALTER COLUMN uom_id SET DEFAULT nextval('uom_uom_id_seq'::regclass); -- -- Name: uomconv_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE uomconv ALTER COLUMN uomconv_id SET DEFAULT nextval('uomconv_uomconv_id_seq'::regclass); -- -- Name: uomtype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE uomtype ALTER COLUMN uomtype_id SET DEFAULT nextval('uomtype_uomtype_id_seq'::regclass); -- -- Name: url_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE urlinfo ALTER COLUMN url_id SET DEFAULT nextval('urlinfo_url_id_seq'::regclass); -- -- Name: usrgrp_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE usrgrp ALTER COLUMN usrgrp_id SET DEFAULT nextval('usrgrp_usrgrp_id_seq'::regclass); -- -- Name: vendtype_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE vendtype ALTER COLUMN vendtype_id SET DEFAULT nextval('vendtype_vendtype_id_seq'::regclass); -- -- Name: whsezone_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE whsezone ALTER COLUMN whsezone_id SET DEFAULT nextval('whsezone_whsezone_id_seq'::regclass); -- -- Name: womatlpost_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE womatlpost ALTER COLUMN womatlpost_id SET DEFAULT nextval('womatlpost_womatlpost_id_seq'::regclass); -- -- Name: xsltmap_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE xsltmap ALTER COLUMN xsltmap_id SET DEFAULT nextval('xsltmap_xsltmap_id_seq'::regclass); -- -- Name: yearperiod_id; Type: DEFAULT; Schema: public; Owner: admin -- ALTER TABLE yearperiod ALTER COLUMN yearperiod_id SET DEFAULT nextval('yearperiod_yearperiod_id_seq'::regclass); SET search_path = te, pg_catalog; -- -- Name: tecustrate_id; Type: DEFAULT; Schema: te; Owner: admin -- ALTER TABLE tecustrate ALTER COLUMN tecustrate_id SET DEFAULT nextval('tecustrate_tecustrate_id_seq'::regclass); -- -- Name: teemp_id; Type: DEFAULT; Schema: te; Owner: admin -- ALTER TABLE teemp ALTER COLUMN teemp_id SET DEFAULT nextval('teemp_teemp_id_seq'::regclass); -- -- Name: tehead_id; Type: DEFAULT; Schema: te; Owner: admin -- ALTER TABLE tehead ALTER COLUMN tehead_id SET DEFAULT nextval('tehead_tehead_id_seq'::regclass); -- -- Name: teitem_id; Type: DEFAULT; Schema: te; Owner: admin -- ALTER TABLE teitem ALTER COLUMN teitem_id SET DEFAULT nextval('teitem_teitem_id_seq'::regclass); -- -- Name: teprj_id; Type: DEFAULT; Schema: te; Owner: admin -- ALTER TABLE teprj ALTER COLUMN teprj_id SET DEFAULT nextval('teprj_teprj_id_seq'::regclass); -- -- Name: teprjtask_id; Type: DEFAULT; Schema: te; Owner: admin -- ALTER TABLE teprjtask ALTER COLUMN teprjtask_id SET DEFAULT nextval('teprjtask_teprjtask_id_seq'::regclass); SET search_path = fixcountry, pg_catalog; -- -- Data for Name: pkgcmd; Type: TABLE DATA; Schema: fixcountry; Owner: admin -- COPY pkgcmd (cmd_id, cmd_module, cmd_title, cmd_descrip, cmd_privname, cmd_executable, cmd_name) FROM stdin; \. -- -- Data for Name: pkgcmdarg; Type: TABLE DATA; Schema: fixcountry; Owner: admin -- COPY pkgcmdarg (cmdarg_id, cmdarg_cmd_id, cmdarg_order, cmdarg_arg) FROM stdin; \. -- -- Data for Name: pkgimage; Type: TABLE DATA; Schema: fixcountry; Owner: admin -- COPY pkgimage (image_id, image_name, image_descrip, image_data) FROM stdin; \. -- -- Data for Name: pkgmetasql; Type: TABLE DATA; Schema: fixcountry; Owner: admin -- COPY pkgmetasql (metasql_id, metasql_group, metasql_name, metasql_notes, metasql_query, metasql_lastuser, metasql_lastupdate, metasql_grade) FROM stdin; 158 fixcountry strictcountrycheck select details about countries used throughout the database that do not match country.country_name a copy of crm_strictcountrycheck to avoid problems later if someone disables or removes the fixCountry package -- Group: fixcountry\n-- Name: strictcountrycheck\n-- Notes: select details about countries used throughout the database\n-- that do not match country.country_name\n-- a copy of crm_strictcountrycheck to avoid problems later if\n-- someone disables or removes the fixCountry package\n\nSELECT SUM(counter) AS counter FROM (\n\n SELECT COUNT(*) AS counter\n addr_id, 'Address' AS type, addr_number AS number, addr_country AS country, '' AS detail\n \n FROM addr\n WHERE addr_country != ''\n AND addr_country NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n UNION ALL\n SELECT COUNT(*)\n cmhead_id, 'Credit Memo', cmhead_number, cmhead_billtocountry, 'Bill-To'\n \n FROM cmhead\n WHERE cmhead_billtocountry != ''\n AND cmhead_billtocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (NOT cmhead_posted) \n UNION ALL\n SELECT COUNT(*)\n cmhead_id, 'Credit Memo', cmhead_number, cmhead_billtocountry, 'Ship-To'\n \n FROM cmhead\n WHERE cmhead_shipto_country != ''\n AND cmhead_shipto_country NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (NOT cmhead_posted) \n UNION ALL\n SELECT COUNT(*)\n invchead_id, 'Invoice', invchead_invcnumber, invchead_billto_country, 'Bill-To'\n \n FROM invchead\n WHERE invchead_billto_country != ''\n AND invchead_billto_country NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (NOT invchead_posted) \n UNION ALL\n SELECT COUNT(*)\n invchead_id, 'Invoice', invchead_invcnumber, invchead_shipto_country, 'Ship-To'\n \n FROM invchead\n WHERE invchead_shipto_country != ''\n AND invchead_shipto_country NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (NOT invchead_posted) \n UNION ALL\n SELECT COUNT(*)\n quhead_id, 'Quote', CAST(quhead_number AS TEXT), quhead_billtocountry, 'Bill-To'\n \n FROM quhead\n WHERE quhead_billtocountry != ''\n AND quhead_billtocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (quhead_expire>=CURRENT_DATE) \n UNION ALL\n SELECT COUNT(*)\n quhead_id, 'Quote', CAST(quhead_number AS TEXT), quhead_shiptocountry, 'Ship-To'\n \n FROM quhead\n WHERE quhead_shiptocountry != ''\n AND quhead_shiptocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (quhead_expire>=CURRENT_DATE) \n UNION ALL\n SELECT COUNT(*)\n cohead_id, 'Sales Order', cohead_number, cohead_billtocountry, 'Bill-To'\n \n FROM cohead\n WHERE cohead_billtocountry != ''\n AND cohead_billtocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n \n AND cohead_id IN (SELECT coitem_cohead_id\n FROM coitem\n WHERE COALESCE(coitem_status, 'O')='O')\n \n UNION ALL\n SELECT COUNT(*)\n cohead_id, 'Sales Order', cohead_number, cohead_shiptocountry, 'Ship-To'\n \n FROM cohead\n WHERE cohead_shiptocountry != ''\n AND cohead_shiptocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n \n AND cohead_id IN (SELECT coitem_cohead_id\n FROM coitem\n WHERE COALESCE(coitem_status, 'O')='O')\n \n\n\n) AS dummy;\n\n \N \N 0 \. -- -- Data for Name: pkgpriv; Type: TABLE DATA; Schema: fixcountry; Owner: admin -- COPY pkgpriv (priv_id, priv_module, priv_name, priv_descrip, priv_seq) FROM stdin; \. -- -- Data for Name: pkgreport; Type: TABLE DATA; Schema: fixcountry; Owner: admin -- COPY pkgreport (report_id, report_name, report_sys, report_source, report_descrip, report_grade, report_loaddate) FROM stdin; \. -- -- Data for Name: pkgscript; Type: TABLE DATA; Schema: fixcountry; Owner: admin -- COPY pkgscript (script_id, script_name, script_order, script_enabled, script_source, script_notes) FROM stdin; 169 initMenu 0 t function sFixCountries()\n{\n try {\n var newdlg = toolbox.openWindow("fixCountries", 0, Qt.Window, Qt.NonModal);\n } catch(e) { print("sFixCountries exception: " + e); }\n}\n\nvar _crmutilsmenu = mainwindow.findChild("menu.crm.utilities");\nvar fixCountriesAction = _crmutilsmenu.addAction(\n qsTr("Fix Countries before setting Strict Countries option"));\nfixCountriesAction.enabled = privileges.value("MaintainAddresses") &&\n privileges.value("MaintainCreditMemos") &&\n privileges.value("MaintainMiscInvoices")&&\n privileges.value("MaintainSalesOrders") &&\n privileges.value("MaintainQuotes");\n\nfixCountriesAction.triggered.connect(sFixCountries);\n 170 fixCountries 0 t var _addCountry = mywindow.findChild("_addCountry");\nvar _edit = mywindow.findChild("_edit");\nvar _fixAbbr = mywindow.findChild("_fixAbbr");\nvar _fixBulk = mywindow.findChild("_fixBulk");\nvar _fixCase = mywindow.findChild("_fixCase");\nvar _list = mywindow.findChild("_list");\nvar _query = mywindow.findChild("_query");\nvar _showAll = mywindow.findChild("_showAll");\n\n_list.addColumn("Record Type", -1, Qt.AlignLeft, true, "type");\n_list.addColumn("Number", -1, Qt.AlignLeft, true, "number");\n_list.addColumn("Country", -1, Qt.AlignLeft, true, "country");\n_list.addColumn("Details", -1, Qt.AlignLeft, true, "detail");\n\nfunction sAddCountry()\n{\n try {\n var params = new Object;;\n params.mode = "new";\n\n var newdlg = toolbox.openWindow("country", mywindow, Qt.Dialog, Qt.WindowModal);\n toolbox.lastWindow().set(params);\n newdlg.exec();\n } catch (e) { print("sAddCountry exception: " + e); }\n}\n\nfunction openEditorWindow(pwindow, pidname, pparent)\n{\n try {\n var params = new Object;\n params[pidname] = _list.id();\n if (pidname == 'quhead_id')\n params.mode = "editQuote";\n else\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow(pwindow, pparent, Qt.Dialog, Qt.WindowModal);\n toolbox.lastWindow().set(params);\n newdlg.exec();\n } catch(e) { print("openEditorWindow exception (" + e.lineNumber + "): " + e); }\n}\n\nfunction sEdit()\n{\n try {\n var currentItem = _list.currentItem();\n\n switch (currentItem.text(0))\n {\n case 'Address':\n openEditorWindow("address", "addr_id", mywindow);\n break;\n\n case 'Credit Memo':\n openEditorWindow("creditMemo", "cmhead_id", 0);\n break;\n\n case 'Invoice':\n openEditorWindow("invoice", "invchead_id", mywindow);\n break;\n\n case 'Quote':\n openEditorWindow("salesOrder", "quhead_id", 0);\n break;\n\n case 'Sales Order':\n openEditorWindow("salesOrder", "sohead_id", 0);\n break;\n }\n sFillList();\n } catch (e) { print("sEdit() exception: " + e); }\n}\n\nfunction sFixBulk()\n{\n print("sFixBulk() entered");\n try {\n var params = new Object;\n if (_showAll.checked)\n params.showAll = true;\n\n var newdlg = toolbox.openWindow("bulkFixCountry", mywindow,\n Qt.WindowModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n\n sFillList();\n } catch (e) { print("sFixBulk() exception: " + e); }\n}\n\nfunction sFixCase()\n{\n try {\n if (QMessageBox.question(mywindow, qsTr("Are you sure?"),\n qsTr("

Are you sure that you want to change all "\n + "countries that appear to be correct except "\n + "for upper- and lower-case differences in a "\n + "batch?

(This change will obey the status "\n + "of the 'Show closed records' check box."),\n QMessageBox.Yes, QMessageBox.No) == QMessageBox.No)\n return;\n\n var params = new Object;\n if (_showAll.checked)\n params.showAll = true;\n\n var qry = toolbox.executeQuery(\n "UPDATE addr SET addr_country = country_name"\n + " FROM country "\n + " WHERE addr_country != ''"\n + " AND UPPER(addr_country) = UPPER(country_name)"\n + " AND addr_country != country_name;", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Address: " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE cmhead SET cmhead_billtocountry = country_name"\n + " FROM country "\n + " WHERE cmhead_billtocountry != ''"\n + " AND UPPER(cmhead_billtocountry) = UPPER(country_name)"\n + " AND cmhead_billtocountry != country_name"\n + ' '\n + " AND NOT cmhead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Credit Memo (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE cmhead SET cmhead_shipto_country = country_name"\n + " FROM country "\n + " WHERE cmhead_shipto_country != ''"\n + " AND UPPER(cmhead_shipto_country) = UPPER(country_name)"\n + " AND cmhead_shipto_country != country_name"\n + ' '\n + " AND NOT cmhead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Credit Memo (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE invchead SET invchead_billto_country = country_name"\n + " FROM country "\n + " WHERE invchead_billto_country != ''"\n + " AND UPPER(invchead_billto_country) = UPPER(country_name)"\n + " AND invchead_billto_country != country_name"\n + ' '\n + " AND NOT invchead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Invoice (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE invchead SET invchead_shipto_country = country_name"\n + " FROM country "\n + " WHERE invchead_shipto_country != ''"\n + " AND UPPER(invchead_shipto_country) = UPPER(country_name)"\n + " AND invchead_shipto_country != country_name"\n + ' '\n + " AND NOT invchead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Invoice (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE quhead SET quhead_billtocountry = country_name"\n + " FROM country"\n + " WHERE quhead_billtocountry != ''"\n + " AND UPPER(quhead_billtocountry) = UPPER(country_name)"\n + " AND quhead_billtocountry != country_name"\n + ' '\n + " AND quhead_expire >= CURRENT_DATE"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Quote (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE quhead SET quhead_shiptocountry = country_name"\n + " FROM country"\n + " WHERE quhead_shiptocountry != ''"\n + " AND UPPER(quhead_shiptocountry) = UPPER(country_name)"\n + " AND quhead_shiptocountry != country_name"\n + ' '\n + " AND quhead_expire >= CURRENT_DATE"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Quote (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE cohead SET cohead_billtocountry = country_name"\n + ' FROM country , coitem'\n + " WHERE cohead_billtocountry != ''"\n + " AND UPPER(cohead_billtocountry) = UPPER(country_name)"\n + " AND cohead_billtocountry != country_name"\n + ' '\n + " AND cohead_id=coitem_cohead_id AND COALESCE(coitem_status, 'O')='O'"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Sales Order (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE cohead SET cohead_shiptocountry = country_name"\n + ' FROM country , coitem'\n + " WHERE cohead_shiptocountry != ''"\n + " AND UPPER(cohead_shiptocountry) = UPPER(country_name)"\n + " AND cohead_shiptocountry != country_name"\n + ' '\n + " AND cohead_id=coitem_cohead_id AND COALESCE(coitem_status, 'O')='O'"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Sales Order (Ship-To): " + qry.lastError().text);\n\n } catch (e) { QMessageBox.critical(mywindow, "sFixCase() exception", e); }\n\n sFillList();\n}\n\nfunction sFixAbbr()\n{\n try {\n if (QMessageBox.question(mywindow, qsTr("Are you sure?"),\n qsTr("

Are you sure that you want to replace all "\n + "country abbreviations to the corresponding "\n + "full country names?

(This change will obey "\n + "the status of the 'Show closed records' "\n + "check box."),\n QMessageBox.Yes, QMessageBox.No) == QMessageBox.No)\n return;\n\n var params = new Object;\n if (_showAll.checked)\n params.showAll = true;\n\n var qry = toolbox.executeQuery(\n "UPDATE addr SET addr_country = country_name"\n + " FROM country "\n + " WHERE addr_country != ''"\n + " AND UPPER(addr_country) = UPPER(country_abbr);", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Address: " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE cmhead SET cmhead_billtocountry = country_name"\n + " FROM country "\n + " WHERE cmhead_billtocountry != ''"\n + " AND UPPER(cmhead_billtocountry) = UPPER(country_abbr)"\n + ' '\n + " AND NOT cmhead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Credit Memo (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE cmhead SET cmhead_shipto_country = country_name"\n + " FROM country "\n + " WHERE cmhead_shipto_country != ''"\n + " AND UPPER(cmhead_shipto_country) = UPPER(country_abbr)"\n + ' '\n + " AND NOT cmhead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Credit Memo (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE invchead SET invchead_billto_country = country_name"\n + " FROM country "\n + " WHERE invchead_billto_country != ''"\n + " AND UPPER(invchead_billto_country) = UPPER(country_abbr)"\n + ' '\n + " AND NOT invchead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Invoice (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE invchead SET invchead_shipto_country = country_name"\n + " FROM country "\n + " WHERE invchead_shipto_country != ''"\n + " AND UPPER(invchead_shipto_country) = UPPER(country_abbr)"\n + ' '\n + " AND NOT invchead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Invoice (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE quhead SET quhead_billtocountry = country_name"\n + " FROM country"\n + " WHERE quhead_billtocountry != ''"\n + " AND UPPER(quhead_billtocountry) = UPPER(country_abbr)"\n + ' '\n + " AND quhead_expire >= CURRENT_DATE"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Quote (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE quhead SET quhead_shiptocountry = country_name"\n + " FROM country"\n + " WHERE quhead_shiptocountry != ''"\n + " AND UPPER(quhead_shiptocountry) = UPPER(country_abbr)"\n + ' '\n + " AND quhead_expire >= CURRENT_DATE"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Quote (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE cohead SET cohead_billtocountry = country_name"\n + ' FROM country , coitem'\n + " WHERE cohead_billtocountry != ''"\n + " AND UPPER(cohead_billtocountry) = UPPER(country_abbr)"\n + ' '\n + " AND cohead_id=coitem_cohead_id AND COALESCE(coitem_status, 'O')='O'"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Sales Order (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n "UPDATE cohead SET cohead_shiptocountry = country_name"\n + ' FROM country , coitem'\n + " WHERE cohead_shiptocountry != ''"\n + " AND UPPER(cohead_shiptocountry) = UPPER(country_abbr)"\n + ' '\n + " AND cohead_id=coitem_cohead_id AND COALESCE(coitem_status, 'O')='O'"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Sales Order (Ship-To): " + qry.lastError().text);\n\n } catch (e)\n {\n QMessageBox.critical(mywindow, "sFixAbbr() exception", e);\n }\n sFillList();\n}\n\nfunction sFillList()\n{\n try {\n var params = new Object;\n if (_showAll.checked)\n params.showAll = true;\n\n var qry = toolbox.executeDbQuery('fixcountry', 'strictcountrycheck', params);\n _list.populate(qry);\n if (qry.lastError().type != 0)\n {\n QMessageBox.critical(mywindow, qsTr("Database Error"),\n qry.lastError().text);\n return;\n }\n } catch (e) { print("sFillList exception: " + e); }\n}\n\n_addCountry.clicked.connect(sAddCountry);\n_edit.clicked.connect(sEdit);\n_fixAbbr.clicked.connect(sFixAbbr);\n_fixBulk.clicked.connect(sFixBulk);\n_fixCase.clicked.connect(sFixCase);\n_query.clicked.connect(sFillList);\n_showAll.toggled.connect(sFillList);\n\nsFillList();\n\nif (QMessageBox.question(mywindow, qsTr("Backed Up?"),\n qsTr("

Have you backed up your database? "\n + "You really should back up your database "\n + "before running this utility."),\n QMessageBox.Yes, QMessageBox.No) == QMessageBox.No)\n mywindow.close()\n\n 171 bulkFixCountry 0 t var _buttons = mywindow.findChild("_buttons");\nvar _oldCountry = mywindow.findChild("_oldCountry");\nvar _newCountry = mywindow.findChild("_newCountry");\nvar _params;\n\nfunction set(params)\n{\n _params = params;\n var qry = toolbox.executeQuery(\n "SELECT MIN(id), country, country AS code "\n + " FROM ("\n + " SELECT addr_id AS id, addr_country AS country"\n + " FROM addr"\n + " WHERE addr_country != ''"\n + " AND addr_country NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + " UNION ALL"\n + " SELECT cmhead_id, cmhead_billtocountry"\n + " FROM cmhead"\n + " WHERE cmhead_billtocountry != ''"\n + " AND cmhead_billtocountry NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + ' AND (NOT cmhead_posted) '\n + " UNION ALL"\n + " SELECT cmhead_id, cmhead_shipto_country"\n + " FROM cmhead"\n + " WHERE cmhead_shipto_country != ''"\n + " AND cmhead_shipto_country NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + ' AND (NOT cmhead_posted) '\n + " UNION ALL"\n + " SELECT invchead_id, invchead_billto_country"\n + " FROM invchead"\n + " WHERE invchead_billto_country != ''"\n + " AND invchead_billto_country NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + ' AND (NOT invchead_posted) '\n + " UNION ALL"\n + " SELECT invchead_id, invchead_shipto_country"\n + " FROM invchead"\n + " WHERE invchead_shipto_country != ''"\n + " AND invchead_shipto_country NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + ' AND (NOT invchead_posted) '\n + " UNION ALL"\n + " SELECT quhead_id, quhead_billtocountry"\n + " FROM quhead"\n + " WHERE quhead_billtocountry != ''"\n + " AND quhead_billtocountry NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + ' AND (quhead_expire>=CURRENT_DATE) '\n + " UNION ALL"\n + " SELECT quhead_id, quhead_shiptocountry"\n + " FROM quhead"\n + " WHERE quhead_shiptocountry != ''"\n + " AND quhead_shiptocountry NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + ' AND (quhead_expire>=CURRENT_DATE) '\n + " UNION ALL"\n + " SELECT cohead_id, cohead_billtocountry"\n + " FROM cohead"\n + " WHERE cohead_billtocountry != ''"\n + " AND cohead_billtocountry NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + ' '\n + " AND cohead_id IN (SELECT coitem_cohead_id"\n + " FROM coitem"\n + " WHERE COALESCE(coitem_status, 'O')='O')"\n + ' '\n + " UNION ALL"\n + " SELECT cohead_id, cohead_shiptocountry"\n + " FROM cohead"\n + " WHERE cohead_shiptocountry != ''"\n + " AND cohead_shiptocountry NOT IN (SELECT country_name"\n + " FROM country"\n + " WHERE country_name IS NOT NULL)"\n + ' '\n + " AND cohead_id IN (SELECT coitem_cohead_id"\n + " FROM coitem"\n + " WHERE COALESCE(coitem_status, 'O')='O')"\n + ' '\n + ") AS dummy "\n + "GROUP BY country "\n + "ORDER BY country;",\n\n params);\n _oldCountry.populate(qry);\n if (qry.lastError().type != 0)\n toolbox.messageBox("warning", mywindow, qsTr("Database Error"),\n qry.lastError().text);\n}\n\nfunction sSave()\n{\n try {\n var params = _params;\n params.oldCountry = _oldCountry.currentText;\n params.newCountry = _newCountry.currentText;\n\n var qry = toolbox.executeQuery(\n 'UPDATE addr SET addr_country = '\n + ' WHERE addr_country = ;', params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Address: " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n 'UPDATE cmhead SET cmhead_billtocountry = '\n + ' WHERE cmhead_billtocountry = '\n + ' '\n + " AND NOT cmhead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Credit Memo (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n 'UPDATE cmhead SET cmhead_shipto_country = '\n + ' WHERE cmhead_shipto_country = '\n + ' '\n + " AND NOT cmhead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Credit Memo (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n 'UPDATE invchead SET invchead_billto_country = '\n + ' WHERE invchead_billto_country = '\n + ' '\n + " AND NOT invchead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Invoice (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n 'UPDATE invchead SET invchead_shipto_country = '\n + ' WHERE invchead_shipto_country = '\n + ' '\n + " AND NOT invchead_posted"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Invoice (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n 'UPDATE quhead SET quhead_billtocountry = '\n + ' WHERE quhead_billtocountry = '\n + ' '\n + " AND quhead_expire >= CURRENT_DATE"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Quote (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n 'UPDATE quhead SET quhead_shiptocountry = '\n + ' WHERE quhead_shiptocountry = '\n + ' '\n + " AND quhead_expire >= CURRENT_DATE"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Quote (Ship-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n 'UPDATE cohead SET cohead_billtocountry = '\n + ' WHERE cohead_billtocountry = '\n + ' '\n + " AND cohead_id IN (SELECT coitem_cohead_id"\n + " FROM coitem"\n + " WHERE COALESCE(coitem_status, 'O')='O')"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Sales Order (Bill-To): " + qry.lastError().text);\n\n qry = toolbox.executeQuery(\n 'UPDATE cohead SET cohead_shiptocountry = '\n + ' WHERE cohead_shiptocountry = '\n + ' '\n + " AND cohead_id IN (SELECT coitem_cohead_id"\n + " FROM coitem"\n + " WHERE COALESCE(coitem_status, 'O')='O')"\n + " ", params);\n if (qry.lastError().type != 0)\n throw new Error("Error updating Sales Order (Ship-To): " + qry.lastError().text);\n\n }\n catch (e)\n {\n toolbox.messageBox("critical", mywindow,\n "bulkFixCountry::sSave() exception", e);\n\n }\n mywindow.close();\n}\n\n_buttons.accepted.connect(sSave);\n_buttons.rejected.connect(mywindow, "close()");\n \. -- -- Data for Name: pkguiform; Type: TABLE DATA; Schema: fixcountry; Owner: admin -- COPY pkguiform (uiform_id, uiform_name, uiform_order, uiform_enabled, uiform_source, uiform_notes) FROM stdin; 99 fixCountries 0 t \n\n fixCountries\n \n \n \n 0\n 0\n 800\n 600\n \n \n \n \n 1000\n 16777215\n \n \n \n fixCountries\n \n \n \n \n \n \n \n Query\n \n \n \n \n \n \n Qt::Vertical\n \n \n QSizePolicy::Fixed\n \n \n \n 20\n 15\n \n \n \n \n \n \n \n Fix Case Differences\n \n \n \n \n \n \n Replace Abbreviations\n \n \n \n \n \n \n Bulk Replace\n \n \n \n \n \n \n Qt::Vertical\n \n \n QSizePolicy::Fixed\n \n \n \n 20\n 15\n \n \n \n \n \n \n \n false\n \n \n Edit Selection\n \n \n \n \n \n \n Add Country\n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 20\n 40\n \n \n \n \n \n \n \n \n \n \n 0\n 3\n \n \n \n \n \n \n \n Show closed records\n \n \n true\n \n \n \n \n \n \n <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n<html><head><meta name="qrichtext" content="1" /><style type="text/css">\np, li { white-space: pre-wrap; }\n</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">\n<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You must fix the countries in the following records before turning on Strict Country Checking (System &gt; Configure Modules &gt; CRM...).</p>\n<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>\n<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Here is a short description of your options (assume the <span style=" font-style:italic;">country</span> table has a country named 'Homeland' with the abbreviation 'HL'):</p>\n<ul style="-qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Query</span> will requery the database for records with invalid countries.</li>\n<li style=" font-weight:600;" style=" margin-top:1px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fix Case Differences<span style=" font-weight:400;"> will change all occurrences of 'HOMELAND' or 'HomeLand' to 'Homeland'.</span></li>\n<li style=" margin-top:1px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Replace Abbreviations</span> will change all occurrences of 'HL' to 'Homeland'.</li>\n<li style=" margin-top:1px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Bulk Replace</span> will replace all occurrences of an invalid country that you choose with a valid country that you choose.</li>\n<li style=" margin-top:1px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Edit Selection</span> will open the selected record for you to fix. If a changed address remains on the list, delete duplicates with CRM &gt; Address &gt; List....</li>\n<li style=" margin-top:1px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Add Country</span> is for the rare case where you must add a new country. Try not to use this.</li>\n<li style=" margin-top:1px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Show closed records</span> will show historical data, such as closed sales orders and posted credit memos &amp; invoices. These will continue to print properly if you don't fix them, but you will have to change the country if you edit and save them with Strict Country Checking turned on.</li></ul></body></html>\n \n \n Qt::RichText\n \n \n true\n \n \n \n \n \n \n \n XCheckBox\n QCheckBox\n

xcheckbox.h
\n \n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n \n \n _list\n _showAll\n _query\n _fixCase\n _fixAbbr\n _edit\n _addCountry\n \n \n \n \n _list\n valid(bool)\n _edit\n setEnabled(bool)\n \n \n 551\n 512\n \n \n 616\n 503\n \n \n \n \n\n 100 bulkFixCountry 0 t \n\n bulkFixCountry\n \n \n \n 0\n 0\n 427\n 162\n \n \n \n Bulk Fix Invalid Country\n \n \n \n \n \n \n \n Replace all instances of this:\n \n \n _oldCountry\n \n \n \n \n \n \n with this country:\n \n \n _newCountry\n \n \n \n \n \n \n true\n \n \n XComboBox::Countries\n \n \n \n \n \n \n \n \n \n \n \n Qt::Vertical\n \n \n QDialogButtonBox::Cancel|QDialogButtonBox::SaveAll\n \n \n false\n \n \n \n \n \n \n \n XComboBox\n QComboBox\n
xcombobox.h
\n
\n
\n \n \n
\n \. SET search_path = public, pg_catalog; -- -- Data for Name: acalitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY acalitem (acalitem_id, acalitem_calhead_id, acalitem_periodstart, acalitem_periodlength, acalitem_name) FROM stdin; 170 52 2007-01-01 31 01-2007 171 52 2007-02-01 28 02-2007 172 52 2007-03-01 31 03-2007 173 52 2007-04-01 30 04-2007 174 52 2007-05-01 31 05-2007 175 52 2007-06-01 30 06-2007 176 52 2007-07-01 31 07-2007 177 52 2007-08-01 31 08-2007 178 52 2007-09-01 30 09-2007 179 52 2007-10-01 31 10-2007 180 52 2007-11-01 30 11-2007 181 52 2007-12-01 31 12-2007 183 53 2008-02-01 29 02-2008 185 53 2008-04-01 30 04-2008 184 53 2008-03-01 31 03-2008 182 53 2008-01-01 31 01-2008 186 53 2008-05-01 31 05-2008 187 53 2008-06-01 30 06-2008 188 53 2008-07-01 31 07-2008 189 53 2008-08-01 31 08-2008 190 53 2008-09-01 30 09-2008 191 53 2008-10-01 31 10-2008 193 53 2008-12-01 31 12-2008 192 53 2008-11-01 30 11-2008 194 54 2006-01-01 31 01-2006 195 54 2006-02-01 28 02-2006 196 54 2006-03-01 31 03-2006 197 54 2006-04-01 30 04-2006 198 54 2006-05-01 31 05-2006 199 54 2006-06-01 30 06-2006 200 54 2006-07-01 31 07-2006 201 54 2006-08-01 31 08-2006 202 54 2006-09-01 30 09-2006 203 54 2006-10-01 31 10-2006 204 54 2006-11-01 30 11-2006 205 54 2006-12-01 31 12-2006 206 55 2009-01-01 31 01-2009 207 55 2009-02-01 28 02-2009 208 55 2009-03-01 31 03-2009 209 55 2009-04-01 30 04-2009 210 55 2009-05-01 31 05-2009 211 55 2009-06-01 30 06-2009 212 55 2009-07-01 31 07-2009 213 55 2009-08-01 31 08-2009 214 55 2009-09-01 30 09-2009 215 55 2009-10-01 31 10-2009 216 55 2009-11-01 30 11-2009 217 55 2009-12-01 31 12-2009 \. -- -- Data for Name: accnt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY accnt (accnt_id, accnt_number, accnt_descrip, accnt_comments, accnt_profit, accnt_sub, accnt_type, accnt_extref, accnt_company, accnt_forwardupdate, accnt_subaccnttype_code, accnt_curr_id, accnt_active, accnt_name) FROM stdin; 83 1950 Unassigned Inv Transactions 01 01 A 01-01-1699-10 01 f IN 1 t 01-01-1950-01 89 1930 Transform Clearing 01 01 A 01-01-1695-01 01 f IN 1 t 01-01-1930-01 91 8910 Inventory Adjustment 01 01 E 01-01-1380-01 01 f EXP 1 t 01-01-8910-01 92 8920 Inventory Scrap 01 01 E 01-01-1360-01 01 f EXP 1 t 01-01-8920-01 93 8930 Manufacturing Scrap 01 01 E 01-01-1370-01 01 f EXP 1 t 01-01-8930-01 133 2210 Deferred Revenue 01 01 L 01-01-2210-01 01 f CL 1 t 01-01-2210-01 136 5710 Returned Goods 01 01 E 01-01-5710-01 01 f COGS 1 t 01-01-5710-01 104 2440 Prepaid Receivables 01 01 L 01-01-1815-01 01 f CL 1 t 01-01-2440-01 86 1250 WIP Asset \n 01 01 A 01-01-1605-01 01 f IN 1 t 01-01-1250-01 107 2450 Credit Memo 01 01 L 01-01-1810-01 01 f CL 1 t 01-01-2450-01 108 5000 Cost of Goods Sold 01 01 E 01-01-1210-01 01 f COGS 1 t 01-01-5000-01 110 6750 Finance Fees and Expenses 01 01 E 01-01-1060-01 01 f EXP 1 t 01-01-6750-01 111 1500 Fixed Assets 01 01 A 01-01-1700-01 01 f FA 1 t 01-01-1500-01 113 3010 Paid-In Capital 01 01 Q 01-01-9500-01 01 f EDC 1 t 01-01-3010-01 116 2700 Long Term Note Payable 01 01 L 01-01-1800-01 01 f LTL 1 t 01-01-2700-01 97 6000 Office Supplies 01 01 E 01-01-1050-01 01 f EXP 1 t 01-01-6000-01 117 8990 Currency Gain / Loss 01 01 E 01-01-8990-01 01 f EXP 1 t 01-01-8990-01 118 8995 G/L Series Discrepancy 01 01 E 01-01-8995-01 01 f EXP 1 t 01-01-8995-01 119 6050 State Sales Tax Expense 01 01 E 01-01-6050-01 01 f EXP 1 t 01-01-6050-01 94 2320 Accrued Labor and Overhead Costs 01 01 L 01-01-1805-01 01 f CL 1 t 01-01-2320-01 125 8980 Purchase Expense Variance 01 01 E 01-01-8980-01 01 f EXP 1 t 01-01-8980-01 109 1000 Cash at eBank 01 01 A 01-01-1000-01 01 f CA 1 t 01-01-1000-01 126 1010 Cash at EuroBank 01 01 A 01-01-1010-01 01 f CA 1 t 01-01-1010-01 127 1020 Cash at GBank 01 01 A 01-01-1020-01 01 f CA 1 t 01-01-1020-01 84 3030 Retained Earnings 01 01 Q 01-01-9900-01 01 f ERE 1 t 01-01-3030-01 122 4060 Shipping Charge Revenue 01 01 R 01-01-4060-01 01 f OI 1 t 01-01-4060-01 112 6400 Depreciation Expense 01 01 E 01-01-6400-01 01 f DEP 1 t 01-01-6400-01 101 4900 Promotions and Discounts Taken 01 01 R 01-01-0610-01 01 f OI 1 t 01-01-4900-01 106 1100 Accounts Receivable 01 01 A 01-01-1500-01 01 f AR 1 t 01-01-1100-01 96 1260 Shipping Asset WH1 01 01 A 01-01-1680-01 01 f IN 1 t 01-01-1260-01 87 1450 Inventory Cost Variance \n 01 01 A 01-01-1620-01 01 f IN 1 t 01-01-1450-01 100 1400 Prepaid Account - Purchasing 01 01 A 01-01-1610-01 01 f CAS 1 t 01-01-1400-01 90 1460 Purchase Price Variance \n 01 01 A 01-01-1640-01 01 f IN 1 t 01-01-1460-01 88 1470 Material Usage Variance 01 01 A 01-01-1630-01 01 f IN 1 t 01-01-1470-01 99 2000 Accounts Payable 01 01 L 01-01-1800-01 01 f AP 1 t 01-01-2000-01 114 3040 Stock Class B 01 01 Q 01-01-9800-01 01 f EDC 1 t 01-01-3040-01 102 2360 Virginia Sales Tax Liability 01 01 L 01-01-1830-01 01 f CL 1 t 01-01-2360-01 129 2365 North Carolina Tax Liability 01 01 L 01-01-2365-01 01 f CL 1 t 01-01-2365-01 121 4050 State Sales Tax Revenue 01 01 R 01-01-4050-01 01 f OI 1 t 01-01-4050-01 98 6550 PO/TO Line Item Freight Exp 01 01 E 01-01-1070-01 01 f EXP 1 t 01-01-6550-01 132 2480 TO Freight Liability 01 01 L 01-01-2480-01 01 f CL 1 t 01-01-2480-01 131 6020 Shop Supplies 01 01 E 01-01-6020-01 01 f EXP 1 t 01-01-6020-01 135 4700 Returns 01 01 R 01-01-4700-01 01 f SI 1 t 01-01-4700-01 95 2460 P/O Liability Clearing 01 01 L 01-01-1890-01 01 f CL 1 t 01-01-2460-01 105 2470 Freight Liability - Sales 01 01 L 01-01-1820-01 01 f CL 1 t 01-01-2470-01 137 5720 Cost of Warranty 01 01 E 01-01-5720-01 01 f COGS 1 t 01-01-5720-01 128 1220 Warehouse 2: Inventory Account for product and materials stored at WH2: Green Valley Storage 01 01 A 01-01-1255-01 01 f IN 1 t 01-01-1220-01 138 1215 Warehouse 1: Materials 01 01 A 01-01-1215-01 01 f IN 1 t 01-01-1215-01 85 1210 Warehouse 1: Finished Goods 01 01 A 01-01-1600-01 01 f IN 1 t 01-01-1210-01 139 6070 Inbound Freight Expense 01 01 E 01-01-6070-01 01 f EXP 1 t 01-01-6070-01 120 6060 Outbound Freight Expense 01 01 E 01-01-6060-01 01 f EXP 1 t 01-01-6060-01 140 4010 Service Revenue 01 01 R 01-01-4010-01 01 f SI 1 t 01-01-4010-01 103 4000 Product Revenue (Domestic) 01 01 R 01-01-0500-01 01 f SI 1 t 01-01-4000-01 141 4005 Product Revenue (International) 01 01 R 01 f SI 1 t 01-01-4005-01 142 4000 Revenue (Retail) 02 01 R 01-02-4000-01 01 f SI 1 t 01-02-4000-01 143 1050 Cash at Retail 02 01 A 01-02-1050-01 01 f CA 1 t 01-02-1050-01 144 4002 Revenue Clearing (Retail) 02 01 R 01-02-4020-01 01 f SI 1 t 01-02-4002-01 145 8940 Retail Adjustment 02 01 E 01-02-8940-01 01 f EXP 1 t 01-02-8940-01 146 1240 Retail Inventory 02 01 A 01-02-1240-01 01 f IN 1 t 01-02-1240-01 147 4700 Returns (Retail) 02 01 R 01-02-4700-01 01 f SI 1 t 01-02-4700-01 148 5000 Cost of Goods Sold (Retail) 02 01 E 01-02-5000-01 01 f COGS 1 t 01-02-5000-01 149 8920 Inventory Scrap (Retail) 02 01 E 01`-02-8920-01 01 f EXP 1 t 01-02-8920-01 150 8910 Inventory Adjustment (Retail) 02 01 E 01-02-8910-01 01 f EXP 1 t 01-02-8910-01 130 1280 Shipping Asset WH2 01 01 A 01-01-1280-01 01 f IN 1 t 01-01-1280-01 134 1230 Intransit Inventory 01 01 A 01-01-1230-01 01 f IN 1 t 01-01-1230-01 152 5710 Return Goods (Retail) 02 01 E 01-02-5710-01 01 f COGS 1 t 01-02-5710-01 153 5720 Cost of Warranty (Retail) 02 01 E 01-02-5720-01 01 f COGS 1 t 01-02-5720-01 155 2370 Georgia Sales Tax Liability 01 01 L 01 f CL 1 t 01-01-2370-01 156 1600 Accumulated Depreciation 01 01 A 01-01-1600-01 01 f AD 1 t 01-01-1600-01 115 4950 Revenue Adjustment 01 01 R 01-01-0700-01 01 f SI 1 t 01-01-4950-01 157 4810 Customer Discounts 01 01 R 01-01-4810-01 01 f OI 1 t 01-01-4810-01 123 4800 Customer Credits 01 01 R 01-01-4800-01 01 f OI 1 t 01-01-4800-01 154 4800 Customer Credits (Retail) 02 01 R 01-02-4800-01 01 f OI 1 t 01-02-4800-01 158 6100 Expense Items Expensed Items (See Cost Cats.) 01 01 E 01-01-6100-01 01 f EXP 1 t 01-01-6100-01 159 6200 Travel Expense Travel Expenses 01 01 E 01-01-6050-01 01 f EXP 1 t 01-01-6200-01 160 6150 Professional Services 01 01 E 01 f EXP 1 t 01-01-6150-01 161 2330 Accrued Project Labor and Overhead Posting projects results in labor costs posted to the account which are then cleared as a part of payroll 01 01 L 01-01-2320-01 01 f CL 1 t 01-01-2330-01 \. -- -- Data for Name: addr; Type: TABLE DATA; Schema: public; Owner: admin -- COPY addr (addr_id, addr_active, addr_line1, addr_line2, addr_line3, addr_city, addr_state, addr_postalcode, addr_country, addr_notes, addr_number) FROM stdin; 19 t 1 Wayward Way Arlington VA 22204 United States 18 20 t 1 World Chem Blvd. Perkins Valley DE 19801 United States 19 24 t Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 United States 23 27 t 55 Glenlake Parkway NE Atlanta GA 30328 United States 26 1 t Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 United States 1 2 t Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 United States 2 3 t Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA United Kingdom 3 4 t Xtreme Toys Corporate Headquarters 1 Extra Way Suite 200 Reading Berkshire RG6 1RA United Kingdom 4 6 t Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium 6 10 t Olde Towne Toys Store 2 1900 Duke Street Alexandria VA 22202 United States 10 11 t Seven Corners Mall Store 1213 Corporate Accounts Mossback GA 41231 United States 11 13 t 1 ICT Plaza Newport News VA 23188 United States 13 14 t Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 United States 14 7 t Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 United States 7 15 t 1 VA IRS Way ATTN: Corporate Division Richmond VA 24343 United States 15 16 t 999 NC IRS Way ATTN: Small Business Center Winston Salem NC 45443 United States 16 28 t 112 Landsdowne Lane Kettering Northants WC3 AH1 United Kingdom 27 29 t 1245 Pine Ave SE Clemmons NC 27012 United States 28 12 t Green Valley Distribution Center American Storage Systems 60609 Valley Park Highway Green Valley NC 23187 United States 12 30 t 4589 Suite A Dillard Ave S. Williamsburg VA 23185 United States 29 9 t Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States 9 31 t 1 Internal Revenue Way Atlanta GA 30301 United States 30 33 t Prodiem Toys Inc. 1 Playland Way Norfolk AA 23180 United States 32 8 t 100 Toy Park Place Merryfield Merryfield GA 23114 United States 8 5 t 100 Toy Park Place Merryfield GA 21334 United States 5 17 t Accounts Receivable 100 Toy Park Place Merryfield GA 23114 United States 17 34 t 300 South Park Street Mableton IL 78091 United States 33 35 t 474 South Park Lane Pineville IL 79123 United States 34 36 t 1 Extra Way Building 10 Reading Berkshire RG6 1RA United Kingdom 35 37 t 1 Playland Way Norfolk VA 23180 United States 36 40 t 327 Cherry Hill Lane Virginia Beach VA 22522 United States 38 41 t Ungargasse 60 Vienna Austria 1030 Austria 39 42 t Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA \N 40 43 t Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 \N 41 44 t Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA \N 42 45 t Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 43 \. -- -- Data for Name: alarm; Type: TABLE DATA; Schema: public; Owner: admin -- COPY alarm (alarm_id, alarm_number, alarm_event, alarm_email, alarm_sysmsg, alarm_trigger, alarm_time, alarm_time_offset, alarm_time_qualifier, alarm_creator, alarm_event_recipient, alarm_email_recipient, alarm_sysmsg_recipient, alarm_source, alarm_source_id) FROM stdin; \. -- -- Data for Name: apaccnt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY apaccnt (apaccnt_id, apaccnt_vendtype_id, apaccnt_vendtype, apaccnt_ap_accnt_id, apaccnt_prepaid_accnt_id, apaccnt_discount_accnt_id) FROM stdin; 20 -1 .* 99 100 101 \. -- -- Data for Name: apapply; Type: TABLE DATA; Schema: public; Owner: admin -- COPY apapply (apapply_id, apapply_vend_id, apapply_postdate, apapply_username, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_journalnumber, apapply_amount, apapply_curr_id, apapply_target_paid, apapply_checkhead_id) FROM stdin; 1 78 2005-12-27 jsmith 73 C 30000 71 V 30000 0 5.04 1 5.04 \N 2 78 2005-12-27 jsmith 74 C 30001 72 V 30001 0 0.02 1 0.02 \N 3 78 2005-12-27 jsmith -1 K 3001 71 V 30000 2291 246.96 1 246.96 \N 4 78 2005-12-27 jsmith -1 K 3001 72 V 30001 2291 0.98 1 0.98 \N 5 78 2005-12-27 jsmith -1 K 3002 75 V 30002 2317 200.00 1 200.00 \N 6 78 2005-12-29 jsmith 77 C 30003 76 V 30003 0 14.34 1 14.34 \N 7 78 2005-12-29 jsmith -1 K 3003 76 V 30003 2439 702.66 1 702.66 \N 8 78 2005-12-29 jsmith 79 C 30004 78 V 30004 0 261.00 1 261.00 \N 9 78 2005-12-29 jsmith -1 K 3004 78 V 30004 2465 12789.00 1 12789.00 \N 10 78 2005-12-29 jsmith 81 C 30005 80 V 30005 0 1.00 1 1.00 \N 11 78 2005-12-29 jsmith -1 K 3005 80 V 30005 2470 49.00 1 49.00 \N 12 78 2006-01-09 jsmith 88 C 30009 85 V 30009 0 1.00 1 1.00 \N 13 78 2006-01-09 jsmith -1 K 3006 82 V 30006 2492 40.00 1 40.00 \N 14 78 2006-01-09 jsmith -1 K 3006 83 V 30007 2492 50.00 1 50.00 \N 15 78 2006-01-09 jsmith -1 K 3006 84 V 30008 2492 10.00 1 10.00 \N 16 78 2006-01-09 jsmith -1 K 3006 86 V 30010 2492 100.00 1 100.00 \N 17 78 2006-01-09 jsmith -1 K 3006 87 V 30011 2492 25.00 1 25.00 \N 18 78 2006-01-09 jsmith -1 K 3006 85 V 30009 2492 49.00 1 49.00 \N 19 78 2006-01-09 jsmith 90 C 30012 89 V 30012 0 0.40 1 0.40 \N 20 78 2006-01-09 jsmith -1 K 3007 89 V 30012 2522 20.00 1 20.00 \N 21 78 2006-01-12 jsmith -1 K 3008 91 V 30013 3182 200.00 1 200.00 \N 22 78 2006-01-13 jsmith 93 C 30014 92 V 30014 0 0.50 1 0.50 \N 23 78 2006-01-13 jsmith -1 K 3009 92 V 30014 3277 24.50 1 24.50 \N 24 78 2006-01-13 jsmith 95 C 30015 94 V 30015 0 0.50 1 0.50 \N 25 78 2006-01-13 jsmith -1 K 3010 94 V 30015 3322 24.50 1 24.50 \N 26 78 2006-01-30 jsmith 97 C 30016 96 V 30016 0 0.50 1 0.50 \N 27 78 2006-01-30 jsmith -1 K 3011 96 V 30016 3373 24.50 1 24.50 \N 28 78 2006-01-30 jsmith -1 K 3012 98 V 30017 3405 25.00 1 25.00 \N 29 78 2006-01-31 jsmith -1 K 3013 99 V 30018 3416 25.00 1 25.00 \N 30 78 2006-07-05 jsmith 101 C 30019 100 V 30019 0 1.00 1 1.00 \N 31 78 2006-07-05 jsmith -1 K 3014 100 V 30019 3452 49.00 1 49.00 \N 32 78 2006-07-05 jsmith -1 K 3015 102 V 30020 3483 25.00 1 25.00 \N 33 79 2006-10-11 jsmith 104 C 30021 103 V 30021 0 2.00 2 2.00 \N 34 79 2006-10-11 jsmith -1 K 5000 103 V 30021 3526 98.00 2 98.00 \N 35 78 2006-10-13 jsmith 106 C 30022 105 V 30022 0 0.66 1 0.66 \N 36 78 2006-10-13 jsmith -1 K 3017 105 V 30022 3539 32.34 1 32.34 \N 37 79 2006-12-28 mfgadmin -1 K 5001 110 V 30026 3593 100.00 2 100.00 \N 38 78 2006-12-28 mfgadmin -1 K 3020 109 V 30025 3594 100.00 1 100.00 \N 39 78 2006-12-05 mfgadmin -1 K 3019 107 V 30023 3595 3417.00 1 3417.00 \N 40 78 2006-12-05 mfgadmin -1 K 3019 108 V 30024 3595 5423.00 1 5423.00 \N 41 78 2007-01-03 mfgadmin 112 C 30027 111 V 30027 0 180.00 1 180.00 \N 42 78 2007-01-03 mfgadmin -1 K 3021 111 V 30027 3625 8820.00 1 8820.00 \N 43 78 2007-02-20 mfgadmin 114 C 30028 113 V 30028 0 1.00 1 1.00 \N 44 78 2007-02-20 mfgadmin -1 K 3022 113 V 30028 3646 49.00 1 49.00 \N 45 83 2007-05-30 mfgadmin -1 K 3027 118 V 30032 3735 399.00 1 399.00 \N 46 78 2007-05-30 mfgadmin -1 K 3026 115 V 30029 3736 2.50 1 2.50 \N 47 78 2007-05-30 mfgadmin -1 K 3026 116 V 30030 3736 3840.00 1 3840.00 \N 48 79 2007-05-30 mfgadmin -1 K 5003 117 V 30031 3737 0.88 2 0.88 \N 49 87 2007-05-30 mfgadmin -1 K 3029 121 V 30035 3913 25.00 1 25.00 \N 50 85 2007-05-30 mfgadmin -1 K 3028 120 V 30034 3914 10.00 1 10.00 \N 51 87 2007-08-03 mfgadmin -1 K 3032 122 V 30036 3920 100.00 1 100.00 \N 52 83 2007-08-03 mfgadmin -1 K 3031 123 V 30037 3921 1200.00 1 1200.00 \N 53 79 2007-08-03 mfgadmin -1 K 3030 119 V 30033 3922 0.00 2 0.00 \N 54 78 2007-08-31 mfgadmin 125 C 30038 124 V 30038 0 0.50 1 0.50 \N 55 78 2007-08-31 mfgadmin -1 K 3033 124 V 30038 3935 24.50 1 24.50 \N 56 78 2007-09-21 mfgadmin 127 C 30039 126 V 30039 0 7.50 1 7.50 \N 57 78 2007-09-21 mfgadmin -1 K 3035 126 V 30039 3973 367.50 1 367.50 \N 58 78 2007-12-14 mfgadmin 130 C 30040 128 V 30040 0 25.00 1 25.00 \N 59 78 2007-12-14 mfgadmin -1 K 3036 128 V 30040 4019 1225.00 1 1225.00 \N 60 79 2007-12-14 mfgadmin 131 C 30033 119 V 30033 0 0.47 2 0.47 \N 61 79 2007-05-30 mfgadmin -1 K 5004 119 V 30033 4022 22.88 2 22.88 \N 62 79 2007-12-14 mfgadmin 132 C 30041 129 V 30041 0 25.69 2 25.69 \N 63 79 2007-12-14 mfgadmin -1 K 5005 129 V 30041 4022 1258.56 2 1258.56 \N 64 78 2008-03-04 jsmith 134 C 30042 133 V 30042 0 5.50 1 5.50 \N 65 78 2008-03-04 jsmith -1 K 3037 133 V 30042 4105 269.50 1 269.50 \N 66 79 2008-03-04 jsmith 136 C 30043 135 V 30043 0 0.67 2 0.67 \N 67 79 2008-03-04 jsmith -1 K 5006 135 V 30043 4174 32.68 2 32.68 \N 68 78 2008-03-05 jsmith 138 C 30044 137 V 30044 0 0.70 1 0.70 \N 69 78 2008-03-05 jsmith -1 K 3038 137 V 30044 4191 34.30 1 34.30 \N 70 78 2008-04-04 mfgadmin 140 C 30045 139 V 30045 0 22.20 1 22.20 \N 71 78 2008-04-04 mfgadmin -1 K 3039 139 V 30045 4254 1087.80 1 1087.80 \N 72 78 2008-06-18 jsmith 147 C 30051 146 V 30051 0 1.00 1 1.00 \N 73 78 2008-06-18 jsmith -1 K 3040 146 V 30051 4658 49.00 1 49.00 \N 74 88 2008-06-18 jsmith 148 C 30049 143 V 30049 0 26.00 1 26.00 \N 75 88 2008-06-18 jsmith -1 K 3041 143 V 30049 4661 1274.00 1 1274.00 \N 76 88 2008-06-18 jsmith 149 C 30048 142 V 30048 0 26.00 1 26.00 \N 77 88 2008-06-18 jsmith -1 K 3041 142 V 30048 4661 1274.00 1 1274.00 \N 78 79 2008-06-18 jsmith 150 C 30050 145 V 30050 0 0.65 2 0.65 \N 79 79 2008-06-18 jsmith -1 K 5007 145 V 30050 4666 31.85 2 31.85 \N 80 79 2008-06-18 jsmith -1 K 5007 144 V 30047 4666 56.25 2 56.25 \N 81 79 2008-06-18 jsmith -1 K 5007 141 V 30046 4666 50.00 2 50.00 \N 82 78 2008-06-19 jsmith 152 C 30052 151 V 30052 0 140.00 1 140.00 \N 83 78 2008-06-19 jsmith -1 K 3042 151 V 30052 4683 6860.00 1 6860.00 \N 84 85 2008-06-19 jsmith 154 C 30053 153 V 30053 0 22.00 1 22.00 \N 85 85 2008-06-19 jsmith -1 K 3043 153 V 30053 4689 1078.00 1 1078.00 \N 86 78 2008-06-19 jsmith 157 C 30055 156 V 30055 0 50.00 1 50.00 \N 87 78 2008-06-19 jsmith -1 K 3044 156 V 30055 4778 2450.00 1 2450.00 \N 88 78 2008-06-19 jsmith 158 C 30054 155 V 30054 0 29.80 1 29.80 \N 89 78 2008-06-19 jsmith -1 K 3044 155 V 30054 4778 1460.00 1 1460.00 \N 90 78 2008-06-20 jsmith 160 C 30056 159 V 30056 0 0.70 1 0.70 \N 91 78 2008-06-20 jsmith -1 K 3045 159 V 30056 5085 34.30 1 34.30 \N 92 78 2008-09-08 admin -1 K 3046 161 V 30057 5121 33500.00 1 33500.00 \N 93 78 2008-09-08 admin 163 C 30058 162 V 30058 0 1340.00 1 1340.00 \N 94 78 2008-09-08 admin -1 K 3047 162 V 30058 5124 65660.00 1 65660.00 \N 95 78 2008-09-24 jsmith 166 C 30060 164 V 30060 0 11.00 1 11.00 \N 96 78 2008-09-24 jsmith -1 K 3052 164 V 30060 5182 539.00 1 539.00 \N 97 88 2008-09-24 jsmith 167 C 30059 165 V 30059 0 22.00 1 22.00 \N 98 88 2008-09-24 jsmith -1 K 3053 165 V 30059 5185 1078.00 1 1078.00 \N 99 78 2008-10-02 jsmith 170 C 30061 168 V 30061 0 1.40 1 1.40 \N 100 78 2008-10-02 jsmith -1 K 4001 168 V 30061 5259 68.60 1 68.60 \N 101 79 2008-10-02 jsmith 171 C 30062 169 V 30062 0 400.00 2 400.00 \N 102 79 2008-10-02 jsmith -1 K 5010 169 V 30062 5262 19600.00 2 19600.00 \N 103 85 2008-12-31 jsmith 174 C 30064 173 V 30064 0 1.82 1 1.82 \N 105 78 2008-12-31 jsmith 175 C 30063 172 V 30063 0 0.50 1 0.50 \N 107 78 2008-12-31 jsmith 177 C 30065 176 V 30065 0 1000.00 1 1000.00 \N 110 78 2009-01-12 jsmith 180 C 30067 179 V 30067 0 159.60 1 159.60 \N 104 85 2008-12-31 jsmith -1 K 4002 173 V 30064 5292 89.18 1 89.18 163 106 78 2008-12-31 jsmith -1 K 4003 172 V 30063 5295 24.50 1 24.50 162 108 78 2008-12-31 jsmith -1 K 4004 176 V 30065 5326 49000.00 1 49000.00 164 109 88 2008-12-31 jsmith -1 K 4007 178 V 30066 5347 50000.00 1 50000.00 167 111 78 2009-01-12 jsmith -1 K 4010 179 V 30067 5358 7820.40 1 7820.40 170 112 92 2009-01-12 jsmith -1 K 4012 182 V 30069 5384 1800.00 1 1800.00 173 113 83 2009-01-12 jsmith -1 K 4013 181 V 30068 5385 500.00 1 500.00 172 114 79 2009-05-12 admin -1 K 5011 183 V 30070 5394 2000.00 2 2000.00 174 115 78 2009-06-26 admin 185 C 30071 184 V 30071 0 4.00 1 4.00 \N 116 78 2009-06-26 admin -1 K 4014 184 V 30071 5405 196.00 1 196.00 175 117 88 2009-06-26 admin 187 C 30072 186 V 30072 0 500.00 2 500.00 \N 118 88 2009-06-26 admin -1 K 5012 186 V 30072 5448 24500.00 2 24500.00 176 119 78 2009-08-13 admin 189 C 30073 188 V 30073 0 962.00 1 962.00 \N 120 78 2009-08-13 admin -1 K 4015 188 V 30073 5483 47138.00 1 47138.00 177 121 78 2009-09-16 jsmith 191 C 30074 190 V 30074 0 1.00 1 1.00 \N 122 78 2009-09-16 jsmith -1 K 4016 190 V 30074 5535 51.50 1 51.50 178 123 79 2009-09-21 admin -1 K 5013 195 V 30078 5736 1071.50 2 1071.50 182 124 78 2009-09-24 admin 199 C 30075 192 V 30075 0 3.00 1 3.00 \N 125 78 2009-09-21 admin -1 K 4043 192 V 30075 5787 147.00 1 147.00 186 126 78 2009-09-24 admin 200 C 30081 198 V 30081 0 500.00 1 500.00 \N 127 78 2009-09-24 admin -1 K 4044 198 V 30081 5787 25000.00 1 25000.00 189 128 88 2009-09-24 admin 201 C 30079 196 V 30079 0 13.94 1 13.94 \N 129 88 2009-09-22 admin -1 K 4045 196 V 30079 5787 783.06 1 783.06 187 130 88 2009-09-24 admin 202 C 30076 193 V 30076 0 5.88 1 5.88 \N 131 88 2009-09-21 admin -1 K 4046 193 V 30076 5787 288.12 1 288.12 188 132 88 2009-09-24 admin 203 C 30077 194 V 30077 0 0.39 1 0.39 \N 133 88 2009-09-21 admin -1 K 4046 194 V 30077 5787 19.11 1 19.11 188 134 88 2009-09-24 admin 204 C 30080 197 V 30080 0 700.00 1 700.00 \N 135 88 2009-09-24 admin -1 K 4047 197 V 30080 5787 34800.00 1 34800.00 190 136 78 2009-09-25 jsmith 205 C 39000 206 V 30082 0 100.00 1 100.00 \N 137 78 2009-09-25 jsmith 207 C 30082 206 V 30082 0 10.65 1 10.65 \N 138 78 2009-09-25 jsmith -1 K 4048 206 V 30082 5829 421.75 1 421.75 191 139 79 2009-10-13 jsmith 211 C 30084 209 V 30084 0 27.29 2 27.29 \N 140 79 2009-10-13 jsmith -1 K 5014 209 V 30084 5923 1337.08 2 1337.08 194 141 85 2009-10-13 jsmith 212 C 30083 208 V 30083 0 18.00 1 18.00 \N 142 85 2009-10-13 jsmith -1 K 4049 208 V 30083 5926 882.00 1 882.00 193 143 78 2009-10-13 jsmith 213 C 30085 210 V 30085 0 110.00 1 110.00 \N 144 78 2009-10-13 jsmith -1 K 4050 210 V 30085 5929 5390.00 1 5390.00 192 145 78 2009-12-03 admin -1 K 4051 214 V 30086 6077 712.00 1 712.00 195 146 78 2009-12-03 admin 217 C 30087 215 V 30087 0 90.05 1 90.05 \N 147 78 2009-12-03 admin -1 K 4051 215 V 30087 6077 4637.58 1 4637.58 195 148 78 2009-12-03 admin 218 C 30088 216 V 30088 0 200.00 1 200.00 \N 149 78 2009-12-03 admin -1 K 4051 216 V 30088 6077 10192.00 1 10192.00 195 150 78 2010-01-06 admin 220 C 30089 219 V 30089 0 2.50 1 2.50 \N 151 78 2010-01-06 admin -1 K -1 219 V 30089 6096 122.50 1 122.50 196 152 94 2010-03-10 admin -1 K 4052 221 V 30090 6108 22000.00 1 22000.00 197 153 78 2010-03-12 admin 224 C 30091 222 V 30091 0 4.00 1 4.00 \N 154 78 2010-03-12 admin -1 K -1 222 V 30091 6135 204.00 1 204.00 198 155 92 2010-03-12 admin -1 K 4053 223 V 30092 6135 1040.00 1 1040.00 199 156 78 2010-03-12 admin 226 C 30093 225 V 30093 0 1.82 1 1.82 \N 157 78 2010-03-12 admin -1 K -1 225 V 30093 6161 91.82 1 91.82 200 158 94 2010-04-02 admin -1 K 4054 227 V 30094 6171 22000.00 1 22000.00 201 159 78 2010-06-07 admin 231 C 30097 230 V 30097 0 2.00 1 2.00 \N 160 78 2010-06-07 admin -1 K -1 230 V 30097 6188 98.00 1 98.00 205 161 94 2010-06-07 admin -1 K 4055 229 V 30095 6188 47500.00 1 47500.00 203 162 88 2010-06-07 admin 232 C 30096 228 V 30096 0 20.00 1 20.00 \N 163 88 2010-06-07 admin -1 K 4056 228 V 30096 6188 980.00 1 980.00 202 164 78 2010-09-07 admin -1 K -1 236 V 30098 6262 12600.00 1 12600.00 206 165 78 2010-09-07 admin -1 K -1 235 V 30100 6262 1700.00 1 1700.00 206 166 85 2010-09-07 admin -1 K 4057 234 V 30101 6262 1000.00 1 1000.00 207 167 92 2010-09-07 admin -1 K 4058 233 V 30102 6262 1930.00 1 1930.00 208 168 94 2010-09-07 admin -1 K 4059 237 V 30104 6283 88000.00 1 88000.00 209 169 94 2010-09-07 admin -1 K 4059 238 V 30105 6283 66000.00 1 66000.00 209 170 78 2010-08-30 admin -1 K -1 239 V 30106 6297 15600.00 1 15600.00 210 171 78 2010-09-08 admin 241 C 30107 240 V 30107 0 362.92 1 362.92 \N 172 78 2010-09-08 admin -1 K -1 240 V 30107 6306 17783.08 1 17783.08 211 173 85 2010-09-13 admin 243 C 30108 242 V 30108 0 2.70 1 2.70 \N 174 85 2010-09-13 admin -1 K 4060 242 V 30108 6336 132.30 1 132.30 212 175 94 2010-11-04 admin -1 K 4061 245 V 30110 6373 55000.00 1 55000.00 213 176 94 2010-11-04 admin -1 K 4061 244 V 30109 6373 44500.00 1 44500.00 213 177 79 2010-11-04 admin 247 C 30111 246 V 30111 0 0.62 2 0.62 \N 178 79 2010-11-04 admin -1 K 5015 246 V 30111 6375 30.51 2 30.51 214 179 97 2011-03-07 admin -1 K 4062 249 V 30113 6436 456.05 1 456.05 217 180 94 2011-03-07 admin -1 K 4063 248 V 30112 6436 22500.00 1 22500.00 216 181 94 2011-03-07 admin -1 K 4063 251 V 30114 6436 110000.00 1 110000.00 216 182 92 2011-03-07 admin -1 K 4064 250 V 30116 6436 1074.00 1 1074.00 215 183 94 2011-04-18 admin -1 K 4065 252 V 30117 6488 2400.00 1 2400.00 219 184 85 2011-04-18 admin 254 C 30118 253 V 30118 0 8.00 1 8.00 \N 185 85 2011-04-18 admin -1 K 4066 253 V 30118 6488 392.00 1 392.00 218 186 94 2011-04-18 admin -1 K 4068 255 V 30119 6492 22000.00 1 22000.00 220 187 85 2011-04-18 admin 257 C 30120 256 V 30120 0 20.00 1 20.00 \N 188 85 2011-04-18 admin -1 K 4069 256 V 30120 6495 980.00 1 980.00 221 189 94 2011-06-03 admin -1 K 4070 259 V 30122 6524 69000.00 1 69000.00 223 190 92 2011-06-03 admin -1 K 4071 258 V 30121 6524 555.00 1 555.00 222 191 94 2011-05-27 admin -1 K 4072 260 V 30124 6544 113000.00 1 113000.00 224 192 94 2011-06-03 admin -1 K 4073 261 V 30126 6545 77000.00 1 77000.00 225 \. -- -- Data for Name: apcreditapply; Type: TABLE DATA; Schema: public; Owner: admin -- COPY apcreditapply (apcreditapply_id, apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id) FROM stdin; \. -- -- Data for Name: apopen; Type: TABLE DATA; Schema: public; Owner: admin -- COPY apopen (apopen_id, apopen_docdate, apopen_duedate, apopen_terms_id, apopen_vend_id, apopen_doctype, apopen_docnumber, apopen_amount, apopen_notes, apopen_posted, apopen_reference, apopen_invcnumber, apopen_ponumber, apopen_journalnumber, apopen_paid, apopen_open, apopen_username, apopen_discount, apopen_accnt_id, apopen_curr_id, apopen_closedate, apopen_distdate, apopen_void, apopen_curr_rate, apopen_discountable_amount, apopen_status) FROM stdin; 221 2010-03-10 2010-04-09 43 94 V 30090 22000.00 f 54234 20082 6106 22000.00 f admin f -1 1 2010-03-10 2010-03-10 f 1.000000 22000.00 C 222 2010-03-12 2010-04-11 42 78 V 30091 208.00 f MA472771 20083 6131 208.00 f admin f -1 1 2010-03-12 2010-03-12 f 1.000000 200.00 C 223 2010-03-12 2010-04-11 43 92 V 30092 1040.00 f Misc. 6133 1040.00 f admin f -1 1 2010-03-12 2010-03-12 f 1.000000 1000.00 C 224 2010-03-12 2010-03-12 -1 78 C 30091 4.00 Discount for V 30091 \N \N \N 20083 6136 4.00 f admin t -1 1 2010-03-12 2010-03-12 f 1.000000 0.00 C 225 2010-03-12 2010-04-11 42 78 V 30093 93.64 f STRUCK Buy 36661 20084 6159 93.64 f admin f -1 1 2010-03-12 2010-03-12 f 1.000000 91.00 C 226 2010-03-12 2010-03-12 -1 78 C 30093 1.82 Discount for V 30093 \N \N \N 20084 6162 1.82 f admin t -1 1 2010-03-12 2010-03-12 f 1.000000 0.00 C 122 2007-06-04 2007-07-04 42 87 V 30036 100.00 f MA_22 NCIRS-10101 Misc. 3915 100.00 f mfgadmin f -1 1 2007-08-03 2007-06-04 f 1.000000 100.00 C 123 2007-07-04 2007-08-03 42 83 V 30037 1200.00 f RF-01001 VN-1001 Misc. 3916 1200.00 f mfgadmin f -1 1 2007-08-03 2007-07-04 f 1.000000 1200.00 C 134 2008-03-04 2008-03-04 -1 78 C 30042 5.50 Discount for V 30042 \N \N \N 20040 4106 5.50 f jsmith t -1 1 2008-03-04 2008-03-04 f 1.000000 5.50 C 184 2009-06-26 2009-07-26 42 78 V 30071 200.00 f 311231 1231231 20065 5403 200.00 f admin f -1 1 2009-06-26 2009-06-26 f 1.000000 200.00 C 187 2009-06-26 2009-06-26 -1 88 C 30072 500.00 Discount for V 30072 \N \N \N Misc. 5449 500.00 f admin t -1 2 2009-06-26 2009-06-26 f 0.714286 500.00 C 105 2006-10-13 2006-11-12 42 78 V 30022 33.00 f RF-001 VN-3301 20026 3536 33.00 f jsmith f -1 1 2006-10-13 2006-10-13 f 1.000000 33.00 C 126 2007-09-21 2007-10-21 42 78 V 30039 375.00 f MA-1001 RM1001 20037 3972 375.00 f mfgadmin f -1 1 2007-09-21 2007-09-21 f 1.000000 375.00 C 124 2007-08-31 2007-09-30 42 78 V 30038 25.00 f MA22 123111 20036 3934 25.00 f mfgadmin f -1 1 2007-08-31 2007-08-31 f 1.000000 25.00 C 81 2005-12-29 2005-12-29 -1 78 C 30005 1.00 Discount for V 30005 \N \N \N 20005 2469 1.00 f jsmith t -1 1 2005-12-29 2005-12-29 f 1.000000 1.00 C 73 2005-12-27 2005-12-27 -1 78 C 30000 5.04 Discount for V 30000 \N \N \N 20001 2289 5.04 f jsmith t -1 1 2005-12-27 2005-12-27 f 1.000000 5.04 C 74 2005-12-27 2005-12-27 -1 78 C 30001 0.02 Discount for V 30001 \N \N \N 20002 2290 0.02 f jsmith t -1 1 2005-12-27 2005-12-27 f 1.000000 0.02 C 77 2005-12-29 2005-12-29 -1 78 C 30003 14.34 Discount for V 30003 \N \N \N 20003 2438 14.34 f jsmith t -1 1 2005-12-29 2005-12-29 f 1.000000 14.34 C 88 2006-01-09 2006-01-09 -1 78 C 30009 1.00 Discount for V 30009 \N \N \N 20009 2491 1.00 f jsmith t -1 1 2006-01-09 2006-01-09 f 1.000000 1.00 C 79 2005-12-29 2005-12-29 -1 78 C 30004 261.00 Discount for V 30004 \N \N \N 20004 2464 261.00 f jsmith t -1 1 2005-12-29 2005-12-29 f 1.000000 261.00 C 90 2006-01-09 2006-01-09 -1 78 C 30012 0.40 Discount for V 30012 \N \N \N 20012 2521 0.40 f jsmith t -1 1 2006-01-09 2006-01-09 f 1.000000 0.40 C 93 2006-01-13 2006-01-13 -1 78 C 30014 0.50 Discount for V 30014 \N \N \N 20016 3276 0.50 f jsmith t -1 1 2006-01-13 2006-01-13 f 1.000000 0.50 C 95 2006-01-13 2006-01-13 -1 78 C 30015 0.50 Discount for V 30015 \N \N \N 20017 3321 0.50 f jsmith t -1 1 2006-01-13 2006-01-13 f 1.000000 0.50 C 97 2006-01-30 2006-01-30 -1 78 C 30016 0.50 Discount for V 30016 \N \N \N 20018 3372 0.50 f jsmith t -1 1 2006-01-30 2006-01-30 f 1.000000 0.50 C 101 2006-07-05 2006-07-05 -1 78 C 30019 1.00 Discount for V 30019 \N \N \N 20021 3450 1.00 f jsmith t -1 1 2006-07-05 2006-07-05 f 1.000000 1.00 C 104 2006-10-11 2006-10-11 -1 79 C 30021 2.00 Discount for V 30021 \N \N \N 20025 3524 2.00 f jsmith t -1 2 2006-10-11 2006-10-11 f 0.778210 2.00 C 106 2006-10-13 2006-10-13 -1 78 C 30022 0.66 Discount for V 30022 \N \N \N 20026 3537 0.66 f jsmith t -1 1 2006-10-13 2006-10-13 f 1.000000 0.66 C 112 2007-01-03 2007-01-03 -1 78 C 30027 180.00 Discount for V 30027 \N \N \N Misc. 3623 180.00 f mfgadmin t -1 1 2007-01-03 2007-01-03 f 1.000000 180.00 C 114 2007-02-20 2007-02-20 -1 78 C 30028 1.00 Discount for V 30028 \N \N \N 20030 3644 1.00 f mfgadmin t -1 1 2007-02-20 2007-02-20 f 1.000000 1.00 C 127 2007-09-21 2007-09-21 -1 78 C 30039 7.50 Discount for V 30039 \N \N \N 20037 3974 7.50 f mfgadmin t -1 1 2007-09-21 2007-09-21 f 1.000000 7.50 C 125 2007-08-31 2007-08-31 -1 78 C 30038 0.50 Discount for V 30038 \N \N \N 20036 3936 0.50 f mfgadmin t -1 1 2007-08-31 2007-08-31 f 1.000000 0.50 C 130 2007-12-14 2007-12-14 -1 78 C 30040 25.00 Discount for V 30040 \N \N \N 20039 4020 25.00 f mfgadmin t -1 1 2007-12-14 2007-12-14 f 1.000000 25.00 C 128 2007-12-14 2008-01-13 42 78 V 30040 1250.00 f RF01001 VN01001 20039 4016 1250.00 f mfgadmin f -1 1 2007-12-14 2007-12-14 f 1.000000 1250.00 C 131 2007-12-14 2007-12-14 -1 79 C 30033 0.47 Discount for V 30033 \N \N \N 20034 4023 0.47 f mfgadmin t -1 2 2007-12-14 2007-12-14 f 0.778210 0.47 C 119 2007-05-30 2007-06-29 42 79 V 30033 23.35 f RF01991 1231111 20034 3865 23.35 f mfgadmin f -1 2 2007-12-14 2007-05-30 f 0.778210 23.35 C 132 2007-12-14 2007-12-14 -1 79 C 30041 25.69 Discount for V 30041 \N \N \N 20038 4025 25.69 f mfgadmin t -1 2 2007-12-14 2007-12-14 f 0.778210 25.69 C 129 2007-12-14 2008-01-13 42 79 V 30041 1284.25 f RF010001 VN010010 20038 4016 1284.25 f mfgadmin f -1 2 2007-12-14 2007-12-14 f 0.778210 1284.25 C 80 2005-12-29 2006-01-28 42 78 V 30005 50.00 f RF-01 VN-01 20005 2468 50.00 f jsmith f -1 1 2005-12-29 2005-12-29 f 1.000000 50.00 C 71 2005-12-27 2006-01-26 42 78 V 30000 252.00 f RF-MDA201 VN-101 20001 2285 252.00 f jsmith f -1 1 2005-12-27 2005-12-27 f 1.000000 252.00 C 72 2005-12-27 2006-01-26 42 78 V 30001 1.00 f RF-MDA202 VN-2 20002 2288 1.00 f jsmith f -1 1 2005-12-27 2005-12-27 f 1.000000 1.00 C 75 2005-12-27 2006-01-26 42 78 V 30002 200.00 f RF-200 VN-100 Misc. 2316 200.00 f jsmith f -1 1 2005-12-27 2005-12-27 f 1.000000 200.00 C 76 2005-12-29 2006-01-28 42 78 V 30003 717.00 f RF-01 VN-27 20003 2437 717.00 f jsmith f -1 1 2005-12-29 2005-12-29 f 1.000000 717.00 C 82 2005-12-29 2006-01-28 42 78 V 30006 40.00 f RF-1 VN-1 20006 2473 40.00 f jsmith f -1 1 2006-01-09 2005-12-29 f 1.000000 40.00 C 83 2005-12-29 2006-01-28 42 78 V 30007 50.00 f RF-3 VN-3 20007 2476 50.00 f jsmith f -1 1 2006-01-09 2005-12-29 f 1.000000 50.00 C 84 2005-12-30 2006-01-29 42 78 V 30008 10.00 f 55 44 20008 2479 10.00 f jsmith f -1 1 2006-01-09 2005-12-30 f 1.000000 10.00 C 78 2005-12-29 2006-01-28 42 78 V 30004 13050.00 f RF-002 VN-001 20004 2463 13050.00 f jsmith f -1 1 2005-12-29 2005-12-29 f 1.000000 13050.00 C 86 2005-12-30 2006-01-29 42 78 V 30010 100.00 f RF VN 20010 2485 100.00 f jsmith f -1 1 2006-01-09 2005-12-30 f 1.000000 100.00 C 87 2006-01-09 2006-02-08 42 78 V 30011 25.00 f RF-01 VN-01-99 20011 2490 25.00 f jsmith f -1 1 2006-01-09 2006-01-09 f 1.000000 25.00 C 85 2005-12-30 2006-01-29 42 78 V 30009 50.00 f 50 50 20009 2482 50.00 f jsmith f -1 1 2006-01-09 2005-12-30 f 1.000000 50.00 C 91 2006-01-12 2006-01-12 42 78 V 30013 200.00 f RF-01 VN-0199 20015 3181 200.00 f jsmith f -1 1 2006-01-12 2006-01-12 f 1.000000 200.00 C 92 2006-01-13 2006-02-12 42 78 V 30014 25.00 f RF-9891 VN-9311 20016 3275 25.00 f jsmith f -1 1 2006-01-13 2006-01-13 f 1.000000 25.00 C 94 2006-01-13 2006-02-12 42 78 V 30015 25.00 f 5433 55443 20017 3320 25.00 f jsmith f -1 1 2006-01-13 2006-01-13 f 1.000000 25.00 C 96 2006-01-30 2006-03-01 42 78 V 30016 25.00 f RF-901221 VN-01221 20018 3371 25.00 f jsmith f -1 1 2006-01-30 2006-01-30 f 1.000000 25.00 C 98 2006-01-30 2006-03-01 42 78 V 30017 25.00 f RF-01221 VN-00133 20019 3404 25.00 f jsmith f -1 1 2006-01-30 2006-01-30 f 1.000000 25.00 C 236 2010-06-07 2010-07-07 42 78 V 30098 12600.00 f 1312213 20091 6242 12600.00 f admin f -1 1 2010-09-07 2010-06-07 f 1.000000 12600.00 C 186 2009-06-26 2009-07-26 42 88 V 30072 25000.00 f Machine SRN#123101 VN-10001 Misc. 5446 25000.00 f admin f -1 2 2009-06-26 2009-06-26 f 0.714286 25000.00 C 189 2009-08-13 2009-08-13 -1 78 C 30073 962.00 Discount for V 30073 \N \N \N 20066 5484 962.00 f admin t -1 1 2009-08-13 2009-08-13 f 1.000000 962.00 C 188 2009-08-13 2009-09-12 42 78 V 30073 48100.00 f RF1001 12311 20066 5481 48100.00 f admin f -1 1 2009-08-13 2009-08-13 f 1.000000 48100.00 C 99 2006-01-31 2006-03-02 42 78 V 30018 25.00 f RF-01-2006 TP-10112 20020 3415 25.00 f jsmith f -1 1 2006-01-31 2006-01-31 f 1.000000 25.00 C 100 2006-07-05 2006-08-04 42 78 V 30019 50.00 f RF-1012 12113 20021 3449 50.00 f jsmith f -1 1 2006-07-05 2006-07-05 f 1.000000 50.00 C 102 2006-07-05 2006-08-04 42 78 V 30020 25.00 f 15378 56571 20022 3482 25.00 f jsmith f -1 1 2006-07-05 2006-07-05 f 1.000000 25.00 C 103 2006-10-11 2006-11-10 42 79 V 30021 100.00 f RF-0101 ER10211 20025 3523 100.00 f jsmith f -1 2 2006-10-11 2006-10-11 f 0.778210 100.00 C 110 2006-12-28 2007-01-27 42 79 V 30026 100.00 f REF-986 VI-12311 20029 3592 100.00 f mfgadmin f -1 2 2006-12-28 2006-12-28 f 0.778210 100.00 C 109 2006-12-28 2007-01-27 42 78 V 30025 100.00 f RE-11231 VN-2177 20028 3591 100.00 f mfgadmin f -1 1 2006-12-28 2006-12-28 f 1.000000 100.00 C 107 2006-12-05 2007-01-04 42 78 V 30023 3417.00 f MDA-001 123001 Misc. 3578 3417.00 f mfgadmin f -1 1 2006-12-05 2006-12-05 f 1.000000 3417.00 C 108 2006-12-05 2007-01-04 42 78 V 30024 5423.00 f MDA-001 123119 Misc. 3579 5423.00 f mfgadmin f -1 1 2006-12-05 2006-12-05 f 1.000000 5423.00 C 111 2007-01-03 2007-02-02 42 78 V 30027 9000.00 f RF-0111 120311 Misc. 3622 9000.00 f mfgadmin f -1 1 2007-01-03 2007-01-03 f 1.000000 9000.00 C 113 2007-02-20 2007-03-22 42 78 V 30028 50.00 f RF-1010 INV-0010 20030 3643 50.00 f mfgadmin f -1 1 2007-02-20 2007-02-20 f 1.000000 50.00 C 118 2007-05-30 2007-06-29 42 83 V 30032 399.00 f 12311121 STORE BUY Misc. 3734 399.00 f mfgadmin f -1 1 2007-05-30 2007-05-30 f 1.000000 399.00 C 115 2007-05-30 2007-06-29 42 78 V 30029 2.50 f 2.100101 10019919 20031 3731 2.50 f mfgadmin f -1 1 2007-05-30 2007-05-30 f 1.000000 2.50 C 116 2007-05-30 2007-06-29 42 78 V 30030 3840.00 f 2.101001 9298887 20032 3732 3840.00 f mfgadmin f -1 1 2007-05-30 2007-05-30 f 1.000000 3840.00 C 117 2007-05-30 2007-06-29 42 79 V 30031 0.88 f 2.1 19291991 20033 3733 0.88 f mfgadmin f -1 2 2007-05-30 2007-05-30 f 0.778210 0.88 C 121 2007-05-30 2007-05-30 42 87 V 30035 25.00 f RF09090 VN10001 Misc. 3906 25.00 f mfgadmin f -1 1 2007-05-30 2007-05-30 f 1.000000 25.00 C 120 2007-05-30 2007-06-29 42 85 V 30034 10.00 f RF989898 RF09090 20035 3905 10.00 f mfgadmin f -1 1 2007-05-30 2007-05-30 f 1.000000 10.00 C 133 2008-03-04 2008-04-03 42 78 V 30042 275.00 f RF1020011 MA_10001 20040 4103 275.00 f jsmith f -1 1 2008-03-04 2008-03-04 f 1.000000 275.00 C 138 2008-03-05 2008-03-05 -1 78 C 30044 0.70 Discount for V 30044 \N \N \N 20042 4192 0.70 f jsmith t -1 1 2008-03-05 2008-03-05 f 1.000000 0.70 C 137 2008-03-05 2008-04-04 42 78 V 30044 35.00 f RF10001 1000100 20042 4189 35.00 f jsmith f -1 1 2008-03-05 2008-03-05 f 1.000000 35.00 C 140 2008-04-04 2008-04-04 -1 78 C 30045 22.20 Discount for V 30045 \N \N \N 20043 4255 22.20 f mfgadmin t -1 1 2008-04-04 2008-04-04 f 1.000000 22.20 C 139 2008-04-04 2008-05-04 42 78 V 30045 1110.00 f MF1010 VN100 20043 4252 1110.00 f mfgadmin f -1 1 2008-04-04 2008-04-04 f 1.000000 1110.00 C 136 2008-03-04 2008-03-04 -1 79 C 30043 0.67 Discount for V 30043 \N \N \N 20041 4175 0.67 f jsmith t -1 2 2008-03-04 2008-03-04 f 0.778210 0.67 C 135 2008-03-04 2008-04-03 42 79 V 30043 33.35 f MA10001 XP10010 20041 4172 33.35 f jsmith f -1 2 2008-03-04 2008-03-04 f 0.778210 33.35 C 89 2006-01-09 2006-02-28 42 78 V 30012 20.00 f RF-101 VN-102 20012 2520 20.40 f jsmith f -1 1 2006-01-09 2006-01-29 f 1.000000 20.00 C 147 2008-06-18 2008-06-18 -1 78 C 30051 1.00 Discount for V 30051 \N \N \N 20048 4659 1.00 f jsmith t -1 1 2008-06-18 2008-06-18 f 1.000000 1.00 C 146 2008-06-18 2008-07-18 42 78 V 30051 50.00 f MA002 VN10001 20048 4654 50.00 f jsmith f -1 1 2008-06-18 2008-06-18 f 1.000000 50.00 C 148 2008-06-18 2008-06-18 -1 88 C 30049 26.00 Discount for V 30049 \N \N \N 20047 4662 26.00 f jsmith t -1 1 2008-06-18 2008-06-18 f 1.000000 26.00 C 143 2008-06-12 2008-07-12 42 88 V 30049 1300.00 f RF10001 VN10001 20047 4568 1300.00 f jsmith f -1 1 2008-06-18 2008-06-12 f 1.000000 1300.00 C 149 2008-06-18 2008-06-18 -1 88 C 30048 26.00 Discount for V 30048 \N \N \N 20046 4664 26.00 f jsmith t -1 1 2008-06-18 2008-06-18 f 1.000000 26.00 C 142 2008-06-12 2008-07-12 42 88 V 30048 1300.00 f RF10001 123111 20046 4567 1300.00 f jsmith f -1 1 2008-06-18 2008-06-12 f 1.000000 1300.00 C 150 2008-06-18 2008-06-18 -1 79 C 30050 0.65 Discount for V 30050 \N \N \N 20049 4667 0.65 f jsmith t -1 2 2008-06-18 2008-06-18 f 0.671141 0.65 C 145 2008-06-18 2008-07-18 42 79 V 30050 32.50 f MA12311 123111 20049 4653 32.50 f jsmith f -1 2 2008-06-18 2008-06-18 f 0.671141 32.50 C 144 2008-05-29 2008-07-12 42 79 V 30047 56.25 f 6873 -14-7-0712 20045 4608 56.25 f jsmith f -1 2 2008-06-18 2008-06-05 f 0.671141 56.25 C 141 2008-06-05 2008-07-05 42 79 V 30046 50.00 f 0DD NEG-7ID 20044 4265 50.00 f jsmith f -1 2 2008-06-18 2008-06-12 f 0.671141 50.00 C 152 2008-06-19 2008-06-19 -1 78 C 30052 140.00 Discount for V 30052 \N \N \N 20050 4684 140.00 f jsmith t -1 1 2008-06-19 2008-06-19 f 1.000000 140.00 C 151 2008-06-19 2008-07-19 42 78 V 30052 7000.00 f RF01001 V10001 20050 4681 7000.00 f jsmith f -1 1 2008-06-19 2008-06-19 f 1.000000 7000.00 C 154 2008-06-19 2008-06-19 -1 85 C 30053 22.00 Discount for V 30053 \N \N \N 20051 4690 22.00 f jsmith t -1 1 2008-06-19 2008-06-19 f 1.000000 22.00 C 153 2008-06-19 2008-07-19 42 85 V 30053 1100.00 f RF010012 VN-01001 20051 4687 1100.00 f jsmith f -1 1 2008-06-19 2008-06-19 f 1.000000 1100.00 C 157 2008-06-19 2008-06-19 -1 78 C 30055 50.00 Discount for V 30055 \N \N \N 20053 4779 50.00 f jsmith t -1 1 2008-06-19 2008-06-19 f 1.000000 50.00 C 156 2008-06-19 2008-07-19 42 78 V 30055 2500.00 f RF19991 61661 20053 4776 2500.00 f jsmith f -1 1 2008-06-19 2008-06-19 f 1.000000 2500.00 C 158 2008-06-19 2008-06-19 -1 78 C 30054 29.80 Discount for V 30054 \N \N \N 20052 4781 29.80 f jsmith t -1 1 2008-06-19 2008-06-19 f 1.000000 29.80 C 155 2008-06-19 2008-07-19 42 78 V 30054 1489.80 f R762772 51551 20052 4775 1489.80 f jsmith f -1 1 2008-06-19 2008-06-19 f 1.000000 1489.80 C 160 2008-06-20 2008-06-20 -1 78 C 30056 0.70 Discount for V 30056 \N \N \N 20054 5086 0.70 f jsmith t -1 1 2008-06-20 2008-06-20 f 1.000000 0.70 C 159 2008-06-20 2008-07-20 42 78 V 30056 35.00 f RF3001 300-1 20054 5083 35.00 f jsmith f -1 1 2008-06-20 2008-06-20 f 1.000000 35.00 C 161 2008-08-01 2008-09-08 42 78 V 30057 33500.00 f RF109981 VN108871 20055 5119 33500.00 f admin f -1 1 2008-09-08 2008-08-01 f 1.000000 33500.00 C 163 2008-09-08 2008-09-08 -1 78 C 30058 1340.00 Discount for V 30058 \N \N \N 20055 5125 1340.00 f admin t -1 1 2008-09-08 2008-09-08 f 1.000000 1340.00 C 162 2008-09-08 2008-10-08 42 78 V 30058 67000.00 f RF1001 VI-01002301 20055 5122 67000.00 f admin f -1 1 2008-09-08 2008-09-08 f 1.000000 67000.00 C 166 2008-09-24 2008-09-24 -1 78 C 30060 11.00 Discount for V 30060 \N \N \N 20057 5183 11.00 f jsmith t -1 1 2008-09-24 2008-09-24 f 1.000000 11.00 C 164 2008-09-24 2008-10-24 42 78 V 30060 550.00 f RF10019 VN10019 20057 5177 550.00 f jsmith f -1 1 2008-09-24 2008-09-24 f 1.000000 550.00 C 167 2008-09-24 2008-09-24 -1 88 C 30059 22.00 Discount for V 30059 \N \N \N 20056 5186 22.00 f jsmith t -1 1 2008-09-24 2008-09-24 f 1.000000 22.00 C 165 2008-09-24 2008-10-24 42 88 V 30059 1100.00 f RF100191 VN10019 20056 5179 1100.00 f jsmith f -1 1 2008-09-24 2008-09-24 f 1.000000 1100.00 C 170 2008-10-02 2008-10-02 -1 78 C 30061 1.40 Discount for V 30061 \N \N \N 20058 5260 1.40 f jsmith t -1 1 2008-10-02 2008-10-02 f 1.000000 1.40 C 168 2008-10-02 2008-11-01 42 78 V 30061 70.00 f RF100191 VN1001001 20058 5255 70.00 f jsmith f -1 1 2008-10-02 2008-10-02 f 1.000000 70.00 C 171 2008-10-02 2008-10-02 -1 79 C 30062 400.00 Discount for V 30062 \N \N \N 20059 5263 400.00 f jsmith t -1 2 2008-10-02 2008-10-02 f 0.709220 400.00 C 169 2008-10-02 2008-11-01 42 79 V 30062 20000.00 f RF10001 VN10010 20059 5256 20000.00 f jsmith f -1 2 2008-10-02 2008-10-02 f 0.709220 20000.00 C 174 2008-12-31 2008-12-31 -1 85 C 30064 1.82 Discount for V 30064 \N \N \N 20060 5293 1.82 f jsmith t -1 1 2008-12-31 2008-12-31 f 1.000000 1.82 C 173 2008-12-31 2009-01-30 42 85 V 30064 91.00 f RF01991 910091 20060 5288 91.00 f jsmith f -1 1 2008-12-31 2008-12-31 f 1.000000 91.00 C 175 2008-12-31 2008-12-31 -1 78 C 30063 0.50 Discount for V 30063 \N \N \N 20061 5296 0.50 f jsmith t -1 1 2008-12-31 2008-12-31 f 1.000000 0.50 C 172 2008-12-31 2009-01-30 42 78 V 30063 25.00 f RF10001 VI01001 20061 5287 25.00 f jsmith f -1 1 2008-12-31 2008-12-31 f 1.000000 25.00 C 177 2008-12-31 2008-12-31 -1 78 C 30065 1000.00 Discount for V 30065 \N \N \N 20062 5327 1000.00 f jsmith t -1 1 2008-12-31 2008-12-31 f 1.000000 1000.00 C 176 2008-12-31 2009-01-30 42 78 V 30065 50000.00 f RF0101 MOB01 20062 5324 50000.00 f jsmith f -1 1 2008-12-31 2008-12-31 f 1.000000 50000.00 C 178 2008-11-01 2008-12-01 42 88 V 30066 50000.00 f Purchase Paint Machine 1298491 Misc. 5345 50000.00 f jsmith f -1 1 2008-12-31 2008-11-01 f 1.000000 50000.00 C 180 2009-01-12 2009-01-12 -1 78 C 30067 159.60 Discount for V 30067 \N \N \N 20063 5359 159.60 f jsmith t -1 1 2009-01-12 2009-01-12 f 1.000000 159.60 C 179 2009-01-12 2009-02-11 42 78 V 30067 7980.00 f RF101991 VN79801 20063 5356 7980.00 f jsmith f -1 1 2009-01-12 2009-01-12 f 1.000000 7980.00 C 182 2009-01-12 2009-02-11 43 92 V 30069 1800.00 f Jan09 UP10010 Misc. 5381 1800.00 f jsmith f -1 1 2009-01-12 2009-01-12 f 1.000000 1800.00 C 181 2009-01-12 2009-02-11 43 83 V 30068 500.00 f RF10001 VN1001 Misc. 5380 500.00 f jsmith f -1 1 2009-01-12 2009-01-12 f 1.000000 500.00 C 183 2009-01-30 2009-03-01 42 79 V 30070 2000.00 f RF0101 1278781 20064 5392 2000.00 f admin f -1 2 2009-05-12 2009-01-30 f 0.714286 2000.00 C 185 2009-06-26 2009-06-26 -1 78 C 30071 4.00 Discount for V 30071 \N \N \N 20065 5406 4.00 f admin t -1 1 2009-06-26 2009-06-26 f 1.000000 4.00 C 190 2009-09-16 2009-10-16 42 78 V 30074 52.50 f RF01019 188771 20067 5533 52.50 f jsmith f -1 1 2009-09-16 2009-09-16 f 1.000000 50.00 C 215 2009-12-03 2010-01-02 42 78 V 30087 4727.63 f RF103991 FG01001 20079 6045 4727.63 f admin f -1 1 2009-12-03 2009-12-03 f 1.000000 4502.50 C 195 2009-09-21 2009-10-21 42 79 V 30078 1071.50 f 745445 20071 5731 1071.50 f admin f -1 2 2009-09-21 2009-09-21 f 0.714286 1071.50 C 209 2009-10-13 2009-11-12 42 79 V 30084 1364.37 f 324234 20076 5919 1364.37 f jsmith f -1 2 2009-10-13 2009-10-13 f 0.714286 1364.37 C 192 2009-09-21 2009-10-21 42 78 V 30075 150.00 f 5334 20068 5731 150.00 f admin f -1 1 2009-09-21 2009-09-21 f 1.000000 150.00 C 208 2009-10-13 2009-11-12 42 85 V 30083 900.00 f 56456456 20075 5919 900.00 f jsmith f -1 1 2009-10-13 2009-10-13 f 1.000000 900.00 C 198 2009-09-24 2009-10-24 42 78 V 30081 25500.00 f 537726 20073 5784 25500.00 f admin f -1 1 2009-09-24 2009-09-24 f 1.000000 25000.00 C 196 2009-09-22 2009-10-22 42 88 V 30079 797.00 f 12312311 20072 5772 797.00 f jsmith f -1 1 2009-09-22 2009-09-22 f 1.000000 697.00 C 193 2009-09-21 2009-09-21 42 88 V 30076 294.00 f 34234 20069 5731 294.00 f admin f -1 1 2009-09-21 2009-09-21 f 1.000000 294.00 C 210 2009-10-13 2009-11-12 42 78 V 30085 5500.00 f 234234 20077 5919 5500.00 f jsmith f -1 1 2009-10-13 2009-10-13 f 1.000000 5500.00 C 194 2009-09-21 2009-10-21 42 88 V 30077 19.50 f 6234 20070 5731 19.50 f admin f -1 1 2009-09-21 2009-09-21 f 1.000000 19.50 C 197 2009-09-24 2009-10-24 42 88 V 30080 35500.00 f ColorCraft Paint Center 3020299 Misc. 5784 35500.00 f admin f -1 1 2009-09-24 2009-09-24 f 1.000000 35000.00 C 206 2009-09-25 2009-10-25 42 78 V 30082 532.40 f 6553435 20074 5826 532.40 f jsmith f -1 1 2009-09-25 2009-09-25 f 1.000000 532.40 C 214 2009-11-03 2009-12-03 42 78 V 30086 712.00 f RF103291 GF193882 20078 6044 712.00 f admin f -1 1 2009-12-03 2009-11-03 f 1.000000 700.00 C 216 2009-12-03 2010-01-02 42 78 V 30088 10392.00 f RF19823 TX01991 20080 6054 10392.00 f admin f -1 1 2009-12-03 2009-12-03 f 1.000000 10000.00 C 219 2010-01-06 2010-02-05 42 78 V 30089 125.00 f 43234 20081 6094 125.00 f admin f -1 1 2010-01-06 2010-01-06 f 1.000000 125.00 C 191 2009-09-16 2009-09-16 -1 78 C 30074 1.00 Discount for V 30074 \N \N \N 20067 5536 1.00 f jsmith t -1 1 2009-09-16 2009-09-16 f 1.000000 0.00 C 211 2009-10-13 2009-10-13 -1 79 C 30084 27.29 Discount for V 30084 \N \N \N 20076 5924 27.29 f jsmith t -1 2 2009-10-13 2009-10-13 f 0.714286 0.00 C 212 2009-10-13 2009-10-13 -1 85 C 30083 18.00 Discount for V 30083 \N \N \N 20075 5927 18.00 f jsmith t -1 1 2009-10-13 2009-10-13 f 1.000000 0.00 C 199 2009-09-24 2009-09-24 -1 78 C 30075 3.00 Discount for V 30075 \N \N \N 20068 5788 3.00 f admin t -1 1 2009-09-24 2009-09-24 f 1.000000 0.00 C 200 2009-09-24 2009-09-24 -1 78 C 30081 500.00 Discount for V 30081 \N \N \N 20073 5790 500.00 f admin t -1 1 2009-09-24 2009-09-24 f 1.000000 0.00 C 205 2009-09-25 2009-10-25 42 78 C 39000 100.00 Damaged Shipment \N \N \N 5801 100.00 f jsmith f -1 1 2009-09-25 2009-09-25 f 1.000000 0.00 C 201 2009-09-24 2009-09-24 -1 88 C 30079 13.94 Discount for V 30079 \N \N \N 20072 5792 13.94 f admin t -1 1 2009-09-24 2009-09-24 f 1.000000 0.00 C 202 2009-09-24 2009-09-24 -1 88 C 30076 5.88 Discount for V 30076 \N \N \N 20069 5794 5.88 f admin t -1 1 2009-09-24 2009-09-24 f 1.000000 0.00 C 213 2009-10-13 2009-10-13 -1 78 C 30085 110.00 Discount for V 30085 \N \N \N 20077 5930 110.00 f jsmith t -1 1 2009-10-13 2009-10-13 f 1.000000 0.00 C 203 2009-09-24 2009-09-24 -1 88 C 30077 0.39 Discount for V 30077 \N \N \N 20070 5796 0.39 f admin t -1 1 2009-09-24 2009-09-24 f 1.000000 0.00 C 204 2009-09-24 2009-09-24 -1 88 C 30080 700.00 Discount for V 30080 \N \N \N Misc. 5798 700.00 f admin t -1 1 2009-09-24 2009-09-24 f 1.000000 0.00 C 207 2009-09-25 2009-09-25 -1 78 C 30082 10.65 Discount for V 30082 \N \N \N 20074 5830 10.65 f jsmith t -1 1 2009-09-25 2009-09-25 f 1.000000 0.00 C 217 2009-12-03 2009-12-03 -1 78 C 30087 90.05 Discount for V 30087 \N \N \N 20079 6078 90.05 f admin t -1 1 2009-12-03 2009-12-03 f 1.000000 0.00 C 218 2009-12-03 2009-12-03 -1 78 C 30088 200.00 Discount for V 30088 \N \N \N 20080 6080 200.00 f admin t -1 1 2009-12-03 2009-12-03 f 1.000000 0.00 C 220 2010-01-06 2010-01-06 -1 78 C 30089 2.50 Discount for V 30089 \N \N \N 20081 6097 2.50 f admin t -1 1 2010-01-06 2010-01-06 f 1.000000 0.00 C 227 2010-04-02 2010-05-02 43 94 V 30094 22000.00 f MA1881 20085 6169 22000.00 f admin f -1 1 2010-04-02 2010-04-02 f 1.000000 22000.00 C 231 2010-06-07 2010-06-07 -1 78 C 30097 2.00 Discount for V 30097 \N \N \N Misc. 6189 2.00 f admin t -1 1 2010-06-07 2010-06-07 f 1.000000 0.00 C 230 2010-06-07 2010-07-07 42 78 V 30097 100.00 f REF001 TP001 Misc. 6186 100.00 f admin f -1 1 2010-06-07 2010-06-07 f 1.000000 100.00 C 229 2010-06-07 2010-07-07 43 94 V 30095 47500.00 f MA-101 IN4656256 20086 6183 47500.00 f admin f -1 1 2010-06-07 2010-06-07 f 1.000000 47500.00 C 237 2010-07-15 2010-08-14 43 94 V 30104 88000.00 f IN10019 20093 6280 88000.00 f admin f -1 1 2010-09-07 2010-07-31 f 1.000000 88000.00 C 232 2010-06-07 2010-06-07 -1 88 C 30096 20.00 Discount for V 30096 \N \N \N Misc. 6191 20.00 f admin t -1 1 2010-06-07 2010-06-07 f 1.000000 0.00 C 228 2010-06-07 2010-07-07 42 88 V 30096 1000.00 f W-101 W10881 Misc. 6182 1000.00 f admin f -1 1 2010-06-07 2010-06-07 f 1.000000 1000.00 C 235 2010-06-07 2010-07-07 42 78 V 30100 1700.00 f 1231123 20089 6242 1700.00 f admin f -1 1 2010-09-07 2010-06-07 f 1.000000 1700.00 C 234 2010-06-07 2010-07-07 42 85 V 30101 1000.00 f 12342222 20088 6242 1000.00 f admin f -1 1 2010-09-07 2010-06-07 f 1.000000 1000.00 C 233 2010-06-07 2010-07-07 43 92 V 30102 1930.00 f UPS-6 U1002991 Misc. 6242 1930.00 f admin f -1 1 2010-09-07 2010-06-07 f 1.000000 1930.00 C 238 2010-08-17 2010-09-16 43 94 V 30105 66000.00 f 87873 20094 6281 66000.00 f admin f -1 1 2010-09-07 2010-07-31 f 1.000000 66000.00 C 239 2010-08-10 2010-10-08 42 78 V 30106 15600.00 f 73776 20095 6294 15600.00 f admin f -1 1 2010-08-30 2010-08-15 f 1.000000 15000.00 C 241 2010-09-08 2010-09-08 -1 78 C 30107 362.92 Discount for V 30107 \N \N \N 20096 6307 362.92 f admin t -1 1 2010-09-08 2010-09-08 f 1.000000 0.00 C 240 2010-09-08 2010-10-08 42 78 V 30107 18146.00 f 36625 20096 6304 18146.00 f admin f -1 1 2010-09-08 2010-09-08 f 1.000000 18146.00 C 243 2010-09-13 2010-09-13 -1 85 C 30108 2.70 Discount for V 30108 \N \N \N 20098 6337 2.70 f admin t -1 1 2010-09-13 2010-09-13 f 1.000000 0.00 C 242 2010-09-13 2010-10-13 42 85 V 30108 135.00 f MDA MA01001 20098 6334 135.00 f admin f -1 1 2010-09-13 2010-09-13 f 1.000000 135.00 C 245 2010-11-04 2010-12-04 43 94 V 30110 55000.00 f 677623 20099 6370 55000.00 f admin f -1 1 2010-11-04 2010-11-04 f 1.000000 55000.00 C 244 2010-11-04 2010-12-04 43 94 V 30109 44500.00 f 20092 6360 44500.00 f admin f -1 1 2010-11-04 2010-11-04 f 1.000000 44500.00 C 247 2010-11-04 2010-11-04 -1 79 C 30111 0.62 Discount for V 30111 \N \N \N 20100 6376 0.62 f admin t -1 2 2010-11-04 2010-11-04 f 0.70422535211267605634 0.00 C 246 2010-11-04 2010-12-04 42 79 V 30111 31.13 f 543343 20100 6371 31.13 f admin f -1 2 2010-11-04 2010-11-04 f 0.70422535211267605634 31.13 C 249 2010-12-30 2011-01-29 43 97 V 30113 456.05 f T&E Sheet 1000 N/A Misc. 6415 456.05 f admin f -1 1 2011-03-07 2010-12-30 f 1.000000 456.05 C 248 2010-12-30 2011-01-29 43 94 V 30112 22500.00 f MA1001 3433 20102 6414 22500.00 f admin f -1 1 2011-03-07 2010-12-30 f 1.000000 22500.00 C 251 2011-03-07 2011-04-06 43 94 V 30114 110000.00 f 1231122 20103 6432 110000.00 f admin f -1 1 2011-03-07 2011-03-07 f 1.000000 110000.00 C 250 2011-03-07 2011-04-06 43 92 V 30116 1074.00 f US01001 Misc. 6431 1074.00 f admin f -1 1 2011-03-07 2011-03-07 f 1.000000 1074.00 C 252 2011-04-18 2011-05-18 43 94 V 30117 2400.00 f MA-01001 67623773 20097 6486 2400.00 f admin f -1 1 2011-04-18 2011-04-18 f 1.000000 2400.00 C 254 2011-04-18 2011-04-18 -1 85 C 30118 8.00 Discount for V 30118 \N \N \N 20106 6489 8.00 f admin t -1 1 2011-04-18 2011-04-18 f 1.000000 0.00 C 253 2011-04-18 2011-05-18 42 85 V 30118 400.00 f MA-1001 CR-10001 20106 6487 400.00 f admin f -1 1 2011-04-18 2011-04-18 f 1.000000 400.00 C 255 2011-04-18 2011-05-18 43 94 V 30119 22000.00 f MA-100101 12311112 20104 6491 22000.00 f admin f -1 1 2011-04-18 2011-04-18 f 1.000000 22000.00 C 257 2011-04-18 2011-04-18 -1 85 C 30120 20.00 Discount for V 30120 \N \N \N 20105 6496 20.00 f admin t -1 1 2011-04-18 2011-04-18 f 1.000000 0.00 C 256 2011-04-18 2011-05-18 42 85 V 30120 1000.00 f 20105 6494 1000.00 f admin f -1 1 2011-04-18 2011-04-18 f 1.000000 1000.00 C 259 2011-06-03 2011-07-03 43 94 V 30122 69000.00 f 20107 6523 69000.00 f admin f -1 1 2011-06-03 2011-06-03 f 1.000000 69000.00 C 258 2011-04-30 2011-05-30 43 92 V 30121 555.00 f MA9091 UX1001001 Misc. 6518 555.00 f admin f -1 1 2011-06-03 2011-04-30 f 1.000000 555.00 C 262 2011-07-03 2011-08-02 42 88 C 39001 1000.00 For damaged product. \N \N \N 6543 0.00 t admin f -1 1 \N 2011-07-03 f 1.000000 0.00 O 260 2011-05-24 2011-06-23 43 94 V 30124 113000.00 f 1099329 20109 6541 113000.00 f admin f -1 1 2011-05-27 2011-05-19 f 1.000000 113000.00 C 261 2011-06-03 2011-07-03 43 94 V 30126 77000.00 f 1091991 20108 6542 77000.00 f admin f -1 1 2011-06-03 2011-06-03 f 1.000000 77000.00 C \. -- -- Data for Name: apopentax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY apopentax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; \. -- -- Data for Name: apselect; Type: TABLE DATA; Schema: public; Owner: admin -- COPY apselect (apselect_id, apselect_apopen_id, apselect_amount, apselect_bankaccnt_id, apselect_curr_id, apselect_date, apselect_discount) FROM stdin; \. -- -- Data for Name: araccnt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY araccnt (araccnt_id, araccnt_custtype_id, araccnt_custtype, araccnt_freight_accnt_id, araccnt_ar_accnt_id, araccnt_prepaid_accnt_id, araccnt_deferred_accnt_id, araccnt_discount_accnt_id) FROM stdin; 38 -1 .* 122 106 123 133 157 \. -- -- Data for Name: arapply; Type: TABLE DATA; Schema: public; Owner: admin -- COPY arapply (arapply_id, arapply_postdate, arapply_cust_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_journalnumber, arapply_source_aropen_id, arapply_target_aropen_id, arapply_username, arapply_curr_id, arapply_distdate, arapply_target_paid, arapply_reftype, arapply_ref_id) FROM stdin; 84 2008-09-08 95 K Misc. C 121143 -250.00 t 5142 -1 -1 jsmith 1 2008-09-08 \N \N \N 86 2008-09-09 95 K Misc. C 1231112 -3.35 t 5168 -1 -1 jsmith 1 2008-09-09 \N \N \N 1 2005-12-27 95 K I 60000 C 43221 1096.50 t 2315 -1 293 jsmith 1 2005-12-27 1096.50 \N \N 2 2005-12-27 95 K I 60001 C CK2701 60.19 t 2353 -1 294 jsmith 1 2005-12-27 60.19 \N \N 3 2005-12-27 95 K I 60002 C CK2701 5.50 t 2353 -1 295 jsmith 1 2005-12-27 5.50 \N \N 4 2005-12-27 95 K I 60003 C CK2701 15.99 t 2353 -1 296 jsmith 1 2005-12-27 15.99 \N \N 5 2005-12-27 95 K I 60004 C CK2701 10.49 t 2353 -1 297 jsmith 1 2005-12-27 10.49 \N \N 6 2005-12-27 95 K I 60005 C CK2701 20.98 t 2353 -1 298 jsmith 1 2005-12-27 20.98 \N \N 8 2005-12-27 95 K I 60006 C MDA-011 18.05 t 2358 -1 300 jsmith 1 2005-12-27 18.05 \N \N 12 2005-12-29 95 K I 60008 C 10001 3676.37 t 2462 -1 304 jsmith 1 2005-12-29 3676.37 \N \N 14 2006-01-09 95 K I 60009 V 757332 99.00 t 2516 -1 306 jsmith 1 2006-01-09 99.00 \N \N 17 2006-01-09 95 K I 60010 C CK-101 104.90 t 2537 -1 307 jsmith 1 2006-01-09 104.90 \N \N 18 2006-01-09 95 K I 60011 C CK-101 8.00 t 2537 -1 310 jsmith 1 2006-01-09 8.00 \N \N 19 2006-01-09 95 K I 60012 C CK-101 4.00 t 2537 -1 311 jsmith 1 2006-01-09 4.00 \N \N 23 2006-01-11 95 K I 60014 V 50009-2 104.90 f 3136 -1 315 jsmith 1 2006-01-11 104.90 \N \N 24 2006-01-12 95 K I 60014 C MDA0111 388.36 t 3183 -1 315 jsmith 1 2006-01-12 388.36 \N \N 25 2006-01-12 95 K I 60015 C MDA0111 112.64 t 3183 -1 316 jsmith 1 2006-01-12 112.64 \N \N 26 2006-01-12 95 K I 60016 C MDA0111 104.90 t 3183 -1 317 jsmith 1 2006-01-12 104.90 \N \N 27 2006-01-12 95 K I 60017 C MDA0111 218.83 t 3183 -1 318 jsmith 1 2006-01-12 218.83 \N \N 29 2006-01-13 95 K I 60019 V 40005-1 103.86 f 3309 -1 321 jsmith 1 2006-01-13 103.86 \N \N 30 2006-01-13 95 K I 60019 C 774 7.74 t 3310 -1 321 jsmith 1 2006-01-13 7.74 \N \N 33 2006-01-13 95 K I 60021 V 54.00 t 3346 -1 325 jsmith 1 2006-01-13 54.00 \N \N 35 2006-01-30 95 K I 60022 C 123112 587.50 t 3377 -1 327 jsmith 1 2006-01-30 587.50 \N \N 36 2006-01-30 95 K I 60023 C 12311 1097.50 t 3403 -1 328 jsmith 1 2006-01-30 1097.50 \N \N 37 2006-02-01 95 K I 60024 C 12031 1034.50 t 3440 -1 329 jsmith 1 2006-02-01 1034.50 \N \N 38 2006-07-05 95 K I 60025 C 7655 1096.50 t 3476 -1 330 jsmith 1 2006-07-05 1096.50 \N \N 39 2006-07-05 95 K I 60026 C 13201 1034.50 t 3507 -1 331 jsmith 1 2006-07-05 1034.50 \N \N 40 2006-08-31 95 K I 60027 C 12311 3500.00 t 3514 -1 332 jsmith 1 2006-08-31 3500.00 \N \N 41 2006-10-13 95 K I 60028 C 321112 1042.50 t 3563 -1 333 jsmith 1 2006-10-13 1042.50 \N \N 42 2007-01-08 95 K I 60029 C 20134 1038.56 t 3627 -1 334 jsmith 1 2007-01-08 1038.56 \N \N 43 2007-01-08 95 K I 60030 C 20134 1029.50 t 3627 -1 335 jsmith 1 2007-01-08 1029.50 \N \N 46 2007-02-20 97 K I 60033 C 123112 567.13 t 3679 -1 338 mfgadmin 3 2007-02-20 567.13 \N \N 47 2007-02-20 95 K I 60034 C 10112 1042.50 t 3683 -1 340 mfgadmin 1 2007-02-20 1042.50 \N \N 48 2007-04-05 95 K I 60035 C 1882 9811.50 t 3709 -1 341 jsmith 1 2007-04-05 9811.50 \N \N 49 2007-04-05 95 K I 60036 C 35112 35000.00 t 3711 -1 342 jsmith 1 2007-04-05 35000.00 \N \N 50 2007-05-30 95 K I 60037 C 123111 7468.17 t 3836 -1 343 mfgadmin 1 2007-05-30 7468.17 \N \N 51 2007-05-30 97 K I 60038 C 1500011 15000.00 t 3839 -1 344 mfgadmin 3 2007-05-30 15000.00 \N \N 52 2007-05-30 95 K I 60040 C MDA-001021 5286.44 t 3912 -1 346 mfgadmin 1 2007-05-30 5286.44 \N \N 53 2007-08-03 95 K I 60041 C 123111 13545.00 t 3923 -1 347 mfgadmin 1 2007-08-03 13545.00 \N \N 54 2007-08-03 97 K I 60039 C 10010 10000.00 t 3924 -1 345 mfgadmin 3 2007-08-03 10000.00 \N \N 56 2007-08-31 95 K I 60042 C 41231 534.50 t 3962 -1 349 mfgadmin 1 2007-08-31 534.50 \N \N 59 2007-09-21 95 K I 60043 C 123111 597.50 t 4002 -1 351 mfgadmin 1 2007-09-21 597.50 \N \N 61 2007-12-14 97 K I 60045 C 712787 29024.85 t 4082 -1 353 mfgadmin 3 2007-12-14 29024.85 \N \N 62 2007-12-14 97 K I 60047 C 1231123 46.09 t 4085 -1 355 mfgadmin 3 2007-12-14 46.09 \N \N 63 2007-12-20 97 K I 60048 C 12123 400.00 t 4097 -1 356 mfgadmin 3 2007-12-20 400.00 \N \N 64 2008-03-04 95 K I 60049 C 123111 1337.17 t 4166 -1 357 jsmith 1 2008-03-04 1337.17 \N \N 65 2008-03-05 95 K I 60052 C 12312311 997.50 t 4219 -1 358 jsmith 1 2008-03-05 997.50 \N \N 66 2008-04-04 97 K I 60054 C 123111 7473.00 t 4251 -1 359 mfgadmin 3 2008-04-04 7473.00 \N \N 7 2005-12-27 95 C 20000 I 60006 86.85 t 0 299 300 jsmith 1 2005-12-27 86.85 \N \N 9 2005-12-29 95 C 20001 I 60007 114.89 t 0 301 302 jsmith 1 2005-12-29 114.89 \N \N 10 2005-12-29 95 C 20002 I 60007 0.49 t 0 303 302 jsmith 1 2005-12-29 0.49 \N \N 11 2005-12-29 95 C 20002 I 60008 104.41 t 0 303 304 jsmith 1 2005-12-29 104.41 \N \N 13 2006-01-09 95 C 20003 I 60009 997.50 t 0 305 306 jsmith 1 2006-01-09 997.50 \N \N 15 2006-01-09 95 C 20004 I 60011 104.90 t 0 308 310 jsmith 1 2006-01-09 104.90 \N \N 16 2006-01-09 95 C 20005 I 60012 104.90 t 0 309 311 jsmith 1 2006-01-09 104.90 \N \N 20 2006-01-11 95 C 20006 I 60013 50.00 t 0 313 312 jsmith 1 2006-01-11 50.00 \N \N 21 2006-01-11 95 C 20007 I 60013 43.78 t 0 314 312 jsmith 1 2006-01-11 43.78 \N \N 22 2006-01-11 95 C 20007 I 60014 31.22 t 0 314 315 jsmith 1 2006-01-11 31.22 \N \N 28 2006-01-13 95 C 20008 I 60018 997.50 t 0 320 319 jsmith 1 2006-01-13 997.50 \N \N 31 2006-01-13 95 C 20009 I 60020 103.86 t 0 322 323 jsmith 1 2006-01-13 103.86 \N \N 32 2006-01-13 95 C 20010 I 60021 997.50 t 0 324 325 jsmith 1 2006-01-13 997.50 \N \N 34 2006-01-30 95 C 20011 I 60022 500.00 t 0 326 327 jsmith 1 2006-01-30 500.00 \N \N 44 2007-02-20 95 C 20012 I 60031 618.28 t 0 339 336 mfgadmin 1 2007-02-20 618.28 \N \N 45 2007-02-20 95 C 20012 I 60032 618.28 t 0 339 337 mfgadmin 1 2007-02-20 618.28 \N \N 55 2007-08-31 95 R 20013 I 60042 500.00 t 0 348 349 mfgadmin 1 2007-08-31 500.00 \N \N 57 2007-09-21 95 R 20014 I 60044 1000.00 t 0 352 350 mfgadmin 1 2007-09-21 1000.00 \N \N 58 2007-09-21 95 R 20014 I 60043 500.00 t 0 352 351 mfgadmin 1 2007-09-21 500.00 \N \N 60 2007-12-14 97 C 70000 I 60045 5.28 t 0 354 353 mfgadmin 3 2007-12-14 5.28 \N \N 67 2008-06-12 97 K I 60055 C 121121 21.59 t 4260 -1 360 jsmith 3 2008-06-12 21.59 \N \N 68 2008-06-12 95 K I 60056 C 12311 10500.00 t 4262 -1 361 jsmith 1 2008-06-12 10500.00 \N \N 69 2008-06-12 97 R 20015 I 60057 16.55 t 0 362 363 jsmith 3 2008-06-12 16.55 \N \N 70 2008-06-12 97 R 20015 I 60058 247.47 t 0 362 364 jsmith 3 2008-06-12 247.47 \N \N 71 2008-06-18 95 K I 60059 C 36001 394.50 f 4669 -1 365 jsmith 1 2008-06-18 394.50 \N \N 72 2008-06-18 95 K I 60060 C 36001 3260.25 t 4669 -1 366 jsmith 1 2008-06-18 3260.25 \N \N 73 2008-06-18 95 K I 60059 C 11102 120.00 t 4670 -1 365 jsmith 1 2008-06-18 120.00 \N \N 74 2008-06-19 97 R 20015 I 60061 471.96 t 0 362 367 jsmith 3 2008-06-19 471.96 \N \N 75 2008-06-19 97 R 20015 I 60061 264.02 t 0 362 367 jsmith 3 2008-06-19 264.02 \N \N 76 2008-06-19 97 K I 60061 C 123111 41828.02 t 4748 -1 367 jsmith 3 2008-06-19 41828.02 \N \N 77 2008-06-19 95 K I 60062 C 12311 2993.76 t 4774 -1 368 jsmith 1 2008-06-19 2993.76 \N \N 78 2008-06-20 95 K I 60063 C 421231 108.56 t 4786 -1 369 jsmith 1 2008-06-20 108.56 \N \N 79 2008-06-20 95 K I 60064 C 12311 1024.00 f 5111 -1 370 jsmith 1 2008-06-20 1024.00 \N \N 80 2008-06-20 95 K I 60064 C 1231 0.50 t 5112 -1 370 jsmith 1 2008-06-20 0.50 \N \N 81 2008-09-08 95 K I 60065 C 123123 47250.00 t 5140 -1 371 jsmith 1 2008-07-15 47250.00 \N \N 82 2008-09-08 95 K I 60066 C 1231112 41692.20 t 5141 -1 372 jsmith 1 2008-09-08 41692.20 \N \N 83 2008-09-08 95 K I 60067 C 121143 47250.00 t 5142 -1 373 jsmith 1 2008-09-08 47250.00 \N \N 85 2008-09-09 95 K I 60068 C 1231112 38.35 t 5168 -1 374 jsmith 1 2008-09-09 38.35 \N \N 87 2008-10-02 95 R 20016 I 60069 1000.00 t 0 375 376 jsmith 1 2008-10-02 1000.00 \N \N 88 2008-10-02 95 K I 60069 C 12311 3213.17 t 5239 -1 376 jsmith 1 2008-10-02 3213.17 \N \N 89 2008-10-02 97 K I 60070 C 4311 213.92 t 5248 -1 377 jsmith 3 2008-10-02 213.92 \N \N 90 2008-10-02 95 K I 60071 C 3211 46590.37 t 5274 -1 378 jsmith 1 2008-10-02 46590.37 \N \N 91 2008-10-02 97 K I 60072 C 121 25000.00 t 5275 -1 379 jsmith 3 2008-10-02 25000.00 \N \N 92 2008-12-31 97 K I 60073 C 639-1001 639.77 t 5321 -1 380 jsmith 3 2008-12-31 639.77 \N \N 93 2008-12-31 97 K I 60074 C 148342.74 t 5332 -1 381 jsmith 3 2008-12-31 148342.74 \N \N 94 2008-12-31 95 K I 60075 C 23123 74455.00 t 5343 -1 382 jsmith 1 2008-11-15 74455.00 \N \N 95 2009-01-12 97 K I 60076 C 22022.00 t 5378 -1 383 jsmith 3 2009-01-12 22022.00 \N \N 96 2009-01-12 97 K I 60078 C 69.83 t 5378 -1 385 jsmith 3 2009-01-12 69.83 \N \N 97 2009-01-12 95 K I 60077 C 123123 101.06 t 5379 -1 384 jsmith 1 2009-01-12 101.06 \N \N 98 2009-06-26 95 K I 60079 C 123123 50000.00 t 5387 -1 386 admin 1 2009-06-26 50000.00 \N \N 99 2009-06-26 97 K I 60080 C 9778.15 t 5439 -1 387 admin 3 2009-06-26 9778.15 \N \N 100 2009-08-13 95 K I 60081 C 12311 115875.00 t 5509 -1 388 admin 1 2009-08-13 115875.00 \N \N 101 2009-09-21 102 K Point of Sale 100009 C 10998 51.44 t 5698 -1 -1 jsmith 1 2009-09-21 51.44 \N \N 102 2009-09-21 102 K Point of Sale 100010 C 21011 11.46 t 5704 -1 -1 jsmith 1 2009-09-21 11.46 \N \N 103 2009-09-21 102 K Point of Sale 100011 C 6411 11.46 t 5707 -1 -1 jsmith 1 2009-09-21 11.46 \N \N 104 2009-09-21 97 K I 60082 C 1231123 48890.83 t 5740 -1 393 admin 3 2009-09-21 48890.83 CRA 266 105 2009-09-22 97 K I 60082 C 1231123 -48890.83 t 5753 -1 393 admin 3 2009-09-21 -48890.83 CRA 266 106 2009-09-21 97 K I 60082 C 1231123 48890.83 t 5754 -1 393 admin 3 2009-09-21 48890.83 CRA 266 107 2009-09-22 95 K I 60083 C 32422 10000.00 t 5758 -1 396 admin 1 2009-09-22 10000.00 CRA 269 108 2009-09-22 95 K I 60083 C 32422 -10000.00 t 5759 -1 396 admin 1 2009-09-22 -10000.00 CRA 269 109 2009-09-22 95 K I 60083 C 32422 10000.00 t 5760 -1 396 admin 1 2009-09-22 10000.00 CRA 269 110 2009-09-22 95 K D 20020 C 32422 2500.00 t 5760 -1 398 admin 1 2009-09-22 2500.00 CRA 271 111 2009-09-22 95 C 20019 I 60084 2500.00 t 0 397 399 jsmith 1 2009-09-22 2500.00 \N \N 112 2009-09-22 95 C 20018 I 60084 5000.00 t 0 395 399 jsmith 1 2009-09-22 5000.00 \N \N 113 2009-09-22 95 R 20017 I 60084 10000.00 t 0 394 399 jsmith 1 2009-09-22 10000.00 \N \N 114 2009-09-22 95 K I 60084 W 12311231 27500.00 t 5771 -1 399 jsmith 1 2009-09-22 27500.00 CRA 272 115 2009-09-23 102 K Point of Sale 100013 C 1231242 12.06 t 5779 -1 -1 jsmith 1 2009-09-23 12.06 \N \N 116 2009-09-25 95 R 20023 I 60085 75.00 t 0 402 403 jsmith 1 2009-09-25 75.00 \N \N 117 2009-09-25 95 C 20022 I 60085 50.00 t 0 401 403 jsmith 1 2009-09-25 50.00 \N \N 118 2009-09-25 95 C 20021 I 60085 119.00 t 0 400 403 jsmith 1 2009-09-25 119.00 \N \N 119 2009-09-25 95 K I 60085 C 1231244 191.25 t 5889 -1 403 jsmith 1 2009-09-25 191.25 CRA 275 120 2009-10-13 95 K I 60087 W 123553 57937.50 t 6015 -1 405 jsmith 1 2009-10-13 57937.50 CRA 276 121 2009-10-13 97 K I 60086 W 23432423 29381.94 t 6016 -1 404 jsmith 3 2009-10-13 29381.94 CRA 277 122 2009-12-03 95 K I 60088 W 12311266 2025.00 t 6037 -1 406 admin 1 2009-12-03 2025.00 CRA 278 123 2009-12-03 95 K I 60089 W 1238818 115875.00 t 6085 -1 407 admin 1 2009-12-03 115875.00 CRA 279 124 2010-01-05 102 K Point of Sale 100002 C 32122 12.06 t 6091 -1 -1 admin 1 2010-01-05 12.06 \N \N 125 2010-03-10 95 C 20024 I 60090 990.00 t 0 409 408 admin 1 2010-03-10 990.00 \N \N 126 2010-03-10 95 K I 60090 C 12343388 48510.00 t 6105 -1 408 admin 1 2010-03-10 48510.00 CRA 280 127 2010-03-12 95 C 20025 I 60091 230.45 t 0 411 410 admin 1 2010-03-12 230.45 \N \N 128 2010-03-12 95 K I 60091 C 3423423 11292.25 t 6143 -1 410 admin 1 2010-03-12 11292.25 CRA 282 129 2010-03-12 95 K I 60092 C 4234 2025.00 t 6151 -1 412 admin 1 2010-03-12 2025.00 CRA 283 130 2010-04-02 97 C 20026 I 60094 638.27 t 0 415 414 admin 3 2010-04-02 638.27 \N \N 131 2010-04-02 97 K I 60094 C 12311 31275.33 t 6172 -1 414 admin 3 2010-04-02 31275.33 CRA 285 132 2010-09-07 95 K I 60095 C 123112 99000.00 t 6254 -1 416 admin 1 2010-09-07 99000.00 CRA 286 133 2010-09-07 95 R 20027 I 60098 148500.00 t 0 420 419 admin 1 2010-09-07 148500.00 \N \N 134 2010-09-07 95 R 20028 I 60097 198000.00 t 0 421 418 admin 1 2010-09-07 198000.00 \N \N 135 2010-08-15 95 K I 60099 C 1231231 52937.50 t 6293 -1 422 admin 1 2010-08-15 52937.50 CRA 290 136 2010-09-08 97 C 20029 I 60100 1707.48 t 0 424 423 admin 3 2010-09-08 1707.48 \N \N 137 2010-09-08 97 K I 60100 C 43341 83666.46 t 6332 -1 423 admin 3 2010-09-08 83666.46 CRA 292 138 2010-11-04 95 C 20030 I 60102 200.00 t 0 427 426 admin 1 2010-11-04 200.00 \N \N 139 2010-11-04 95 K 10021 I 60102 C 32123 9800.00 t 6402 -1 426 admin 1 2010-11-04 9800.00 CRA 293 140 2010-11-04 97 C 20032 I 60101 17.07 t 0 429 425 admin 3 2010-11-04 17.07 \N \N 141 2010-11-04 97 K 10023 I 60101 C 12311 836.67 t 6403 -1 425 admin 3 2010-11-04 836.67 CRA 295 142 2010-12-30 95 K 10024 I 60096 W 423433 99000.00 t 6405 -1 417 admin 1 2010-12-30 99000.00 CRA 297 143 2010-12-30 97 K 10025 I 60103 C 40000.00 t 6406 -1 431 admin 3 2010-12-30 40000.00 CRA 298 144 2011-03-07 95 R 20031 I 60106 20200.00 t 0 428 433 admin 1 2011-03-07 20200.00 \N \N 145 2011-03-07 97 R 20033 I 60104 17.07 t 0 430 432 admin 3 2011-03-07 17.07 \N \N 146 2011-03-07 95 K 10026 I 60106 W 123112 103550.00 t 6421 -1 433 admin 1 2011-03-07 103550.00 CRA 299 147 2011-03-07 97 K 10027 I 60104 W 123112 7182.93 t 6422 -1 432 admin 3 2011-03-07 7182.93 CRA 301 148 2011-03-07 97 K 10027 I 60109 W 123112 42817.07 f 6422 -1 437 admin 3 2011-03-07 42817.07 CRA 302 149 2011-03-07 95 K 10028 I 60105 W 989182 49500.00 t 6430 -1 434 admin 1 2011-03-07 49500.00 CRA 304 150 2011-03-07 95 K 10028 I 60107 W 989182 3606.05 t 6430 -1 435 admin 1 2011-03-07 3606.05 CRA 303 151 2011-03-07 95 K 10028 I 60108 W 989182 105000.00 t 6430 -1 436 admin 1 2011-03-07 105000.00 CRA 305 152 2011-03-07 95 C 20035 I 60110 344.77 t 0 440 439 admin 1 2011-03-07 344.77 \N \N 153 2011-03-07 95 K 10028 I 60110 W 989182 16893.95 f 6430 -1 439 admin 1 2011-03-07 16893.95 CRA 306 154 2011-04-18 95 R 20034 I 60110 21450.00 t 0 438 439 admin 1 2011-04-18 21450.00 \N \N 155 2011-04-18 95 K 10029 I 60110 W 387871 222686.28 t 6438 -1 439 admin 1 2011-04-18 222686.28 CRA 307 156 2011-04-18 97 K 10030 I 60109 W 42323 22182.93 t 6439 -1 437 admin 3 2011-04-18 22182.93 CRA 308 157 2011-04-18 123 C 20036 I 60111 1459.28 t 0 443 441 admin 2 2011-04-18 1459.28 \N \N 158 2011-04-18 123 K 10031 I 60111 W 45233 71504.52 t 6484 -1 441 admin 2 2011-04-18 71504.52 CRA 310 159 2011-04-18 97 C 20037 I 60112 67.83 t 0 444 442 admin 3 2011-04-18 67.83 \N \N 160 2011-04-18 97 K 10032 I 60112 W 23433 3323.53 t 6485 -1 442 admin 3 2011-04-18 3323.53 CRA 313 161 2011-06-03 95 C 20038 I 60114 2970.00 t 0 447 446 admin 1 2011-06-03 2970.00 \N \N 162 2011-06-03 95 K 10033 I 60114 W 123112 145530.00 t 6526 -1 446 admin 1 2011-06-03 145530.00 CRA 314 163 2011-05-31 97 C 20040 I 60116 3211.18 t 0 451 450 admin 3 2011-05-31 3211.18 \N \N 164 2011-05-31 97 K 10034 I 60116 W 12311 157347.82 t 6547 -1 450 admin 3 2011-05-31 157347.82 CRA 316 165 2011-06-03 97 C 20041 I 60115 3211.18 t 0 452 449 admin 3 2011-06-03 3211.18 \N \N 166 2011-06-03 97 K 10035 I 60115 W 123111 111571.42 t 6548 -1 449 admin 3 2011-06-03 111571.42 CRA 318 \. -- -- Data for Name: arcreditapply; Type: TABLE DATA; Schema: public; Owner: admin -- COPY arcreditapply (arcreditapply_id, arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id, arcreditapply_reftype, arcreditapply_ref_id) FROM stdin; \. -- -- Data for Name: aropen; Type: TABLE DATA; Schema: public; Owner: admin -- COPY aropen (aropen_id, aropen_docdate, aropen_duedate, aropen_terms_id, aropen_cust_id, aropen_doctype, aropen_docnumber, aropen_applyto, aropen_ponumber, aropen_amount, aropen_notes, aropen_posted, aropen_salesrep_id, aropen_commission_due, aropen_commission_paid, aropen_ordernumber, aropen_cobmisc_id, aropen_journalnumber, aropen_paid, aropen_open, aropen_username, aropen_rsncode_id, aropen_salescat_id, aropen_accnt_id, aropen_curr_id, aropen_closedate, aropen_distdate, aropen_curr_rate, aropen_discount) FROM stdin; 353 2007-12-14 2008-01-13 42 97 I 60045 60045 29030.13 f 29 2081.00 f 40007 53 4069 29030.13 f mfgadmin \N -1 -1 3 2007-12-14 2007-12-14 0.537634 f 355 2007-12-14 2008-01-13 42 97 I 60047 60047 46.09 \N f 29 3.46 f 50168 55 4084 46.09 f mfgadmin \N -1 -1 3 2007-12-14 2007-12-14 0.537634 f 330 2006-07-05 2006-08-04 42 95 I 60025 60025 1096.50 \N f 29 71.25 f 50151 32 3475 1096.50 f jsmith \N -1 -1 1 2006-07-05 2006-07-05 1.000000 f 332 2006-08-31 2006-09-30 42 95 I 60027 60027 3500.00 f 29 262.50 f 99001 34 3513 3500.00 f jsmith \N -1 -1 1 2006-08-31 2006-08-31 1.000000 f 331 2006-07-05 2006-08-04 42 95 I 60026 60026 1034.50 f 29 71.25 f 50152 33 3506 1034.50 f jsmith \N -1 -1 1 2006-07-05 2006-07-05 1.000000 f 333 2006-10-13 2006-11-12 42 95 I 60028 60028 1042.50 \N f 29 71.25 f 50155 35 3562 1042.50 f jsmith \N -1 -1 1 2006-10-13 2006-10-13 1.000000 f 334 2006-12-05 2007-01-04 42 95 I 60029 60029 1038.56 \N f 29 74.18 f 50157 37 3576 1038.56 f mfgadmin \N -1 -1 1 2007-01-08 2006-12-05 1.000000 f 335 2006-12-28 2007-01-27 42 95 I 60030 60030 1029.50 \N f 29 71.25 f 50158 38 3618 1029.50 f mfgadmin \N -1 -1 1 2007-01-08 2006-12-28 1.000000 f 341 2007-04-05 2007-05-05 42 95 I 60035 60035 9811.50 \N f 29 693.75 f 50162 43 3708 9811.50 f jsmith \N -1 -1 1 2007-04-05 2007-04-05 1.000000 f 343 2007-05-30 2007-06-29 42 95 I 60037 60037 7468.17 \N f 29 526.30 f 50163 45 3835 7468.17 f mfgadmin \N -1 -1 1 2007-05-30 2007-05-30 1.000000 f 318 2006-01-12 2006-02-11 42 95 I 60017 60017 218.83 \N f 29 15.62 f 50037 23 3164 218.83 f jsmith \N -1 -1 1 2006-01-12 2006-01-12 1.000000 f 319 2006-01-13 2006-02-12 42 95 I 60018 60018 997.50 \N f 29 71.25 f 50043 24 3300 997.50 f jsmith \N -1 -1 1 2006-01-13 2006-01-13 1.000000 f 321 2006-01-13 2006-02-12 42 95 I 60019 60019 111.60 \N f 29 7.42 f 40005 25 3308 111.60 f jsmith \N -1 -1 1 2006-01-13 2006-01-13 1.000000 f 342 2007-04-05 2007-05-05 42 95 I 60036 60036 35000.00 f 29 2625.00 f 99001 44 3710 35000.00 f jsmith \N -1 -1 1 2007-04-05 2007-04-05 1.000000 f 336 2007-01-08 2007-02-07 42 95 I 60031 60031 618.28 \N f 29 37.09 f 50159 39 3631 618.28 f jsmith \N -1 -1 1 2007-02-20 2007-01-08 1.000000 f 344 2007-05-30 2007-06-29 42 97 I 60038 60038 15000.00 f 29 1125.00 f \N 46 3838 15000.00 f mfgadmin \N -1 -1 3 2007-05-30 2007-05-30 0.537634 f 337 2007-01-08 2007-02-07 42 95 I 60032 60032 618.28 \N f 29 37.09 f 50159 40 3634 618.28 f jsmith \N -1 -1 1 2007-02-20 2007-01-08 1.000000 f 338 2007-02-20 2007-03-22 42 97 I 60033 60033 567.13 \N f 29 38.41 f 50160 41 3676 567.13 f mfgadmin \N -1 -1 3 2007-02-20 2007-02-20 0.537634 f 340 2007-02-20 2007-03-22 42 95 I 60034 60034 1042.50 \N f 29 71.25 f 50161 42 3682 1042.50 f mfgadmin \N -1 -1 1 2007-02-20 2007-02-20 1.000000 f 346 2007-05-30 2007-06-29 42 95 I 60040 60040 5286.44 \N f 29 373.13 f 50164 48 3911 5286.44 f mfgadmin \N -1 -1 1 2007-05-30 2007-05-30 1.000000 f 347 2007-07-04 2007-08-03 42 95 I 60041 60041 13545.00 f 29 967.50 f \N 49 3919 13545.00 f mfgadmin \N -1 -1 1 2007-08-03 2007-07-04 1.000000 f 345 2007-05-30 2007-06-29 42 97 I 60039 60039 10000.00 f 29 750.00 f \N 47 3859 10000.00 f mfgadmin \N -1 -1 3 2007-08-03 2007-05-30 0.537634 f 350 2007-09-21 2007-10-21 42 95 I 60044 60044 1000.00 f 29 75.00 f \N 52 3998 1000.00 f mfgadmin \N -1 -1 1 2007-09-21 2007-09-21 1.000000 f 349 2007-08-31 2007-09-30 42 95 I 60042 60042 1034.50 f 29 71.25 f 40006 50 3960 1034.50 f mfgadmin \N -1 -1 1 2007-08-31 2007-08-31 1.000000 f 351 2007-09-21 2007-10-21 42 95 I 60043 60043 1097.50 \N f 29 71.25 f 50165 51 3999 1097.50 f mfgadmin \N -1 -1 1 2007-09-21 2007-09-21 1.000000 f 354 2007-12-14 2007-12-14 -1 97 C 70000 OPEN 5.28 \N f 29 -0.40 f 70000 \N 4070 5.28 f mfgadmin 2 -1 -1 3 2007-12-14 2007-12-14 0.537634 f 293 2005-12-27 2006-01-26 42 95 I 60000 60000 1096.50 \N f 29 71.25 f 50001 1 2314 1096.50 f jsmith \N -1 -1 1 2005-12-27 2005-12-27 1.000000 f 294 2005-12-27 2006-01-26 42 95 I 60001 60001 60.19 \N f 29 3.75 f 50002 3 2337 60.19 f jsmith \N -1 -1 1 2005-12-27 2005-12-27 1.000000 f 295 2005-12-27 2006-01-26 42 95 I 60002 60002 5.50 \N f 29 0.00 f 50003 5 2340 5.50 f jsmith \N -1 -1 1 2005-12-27 2005-12-27 1.000000 f 356 2007-12-20 2008-01-19 42 97 I 60048 60048 400.00 f 29 22.50 f 40008 56 4096 400.00 f mfgadmin \N -1 -1 3 2007-12-20 2007-12-20 0.537634 f 296 2005-12-27 2006-01-26 42 95 I 60003 60003 15.99 \N f 29 0.75 f 50003 6 2343 15.99 f jsmith \N -1 -1 1 2005-12-27 2005-12-27 1.000000 f 297 2005-12-27 2006-01-26 42 95 I 60004 60004 10.49 \N f 29 0.75 f 50003 8 2349 10.49 f jsmith \N -1 -1 1 2005-12-27 2005-12-27 1.000000 f 298 2005-12-27 2006-01-26 42 95 I 60005 60005 20.98 \N f 29 1.50 f 50003 9 2352 20.98 f jsmith \N -1 -1 1 2005-12-27 2005-12-27 1.000000 f 306 2006-01-09 2006-02-08 42 95 I 60009 60009 1096.50 \N f 29 71.25 f 50008 15 2515 1096.50 f jsmith \N -1 -1 1 2006-01-09 2006-01-09 1.000000 f 300 2005-12-27 2006-01-26 42 95 I 60006 60006 104.90 \N f 29 7.49 f 50004 10 2357 104.90 f jsmith \N -1 -1 1 2005-12-27 2005-12-27 1.000000 f 302 2005-12-29 2006-01-28 42 95 I 60007 60007 115.38 \N f 29 8.24 f 40000 12 2376 115.38 f jsmith \N -1 -1 1 2005-12-29 2005-12-29 1.000000 f 307 2006-01-09 2006-02-08 42 95 I 60010 60010 104.90 \N f 29 7.49 f 50009 16 2526 104.90 f jsmith \N -1 -1 1 2006-01-09 2006-01-09 1.000000 f 310 2006-01-09 2006-02-08 42 95 I 60011 60011 112.90 \N f 29 7.49 f 50030 17 2533 112.90 f jsmith \N -1 -1 1 2006-01-09 2006-01-09 1.000000 f 311 2006-01-09 2006-02-08 42 95 I 60012 60012 108.90 \N f 29 7.49 f 50031 18 2536 108.90 f jsmith \N -1 -1 1 2006-01-09 2006-01-09 1.000000 f 304 2005-12-29 2006-01-28 42 95 I 60008 60008 3780.78 \N f 29 262.91 f 50005 13 2461 3780.78 f jsmith \N -1 -1 1 2005-12-29 2005-12-29 1.000000 f 312 2006-01-11 2006-02-10 42 95 I 60013 60013 93.78 f 29 6.71 f 50037 19 3130 93.78 f jsmith \N -1 -1 1 2006-01-11 2006-01-11 1.000000 f 315 2006-01-11 2006-02-10 42 95 I 60014 60014 524.48 \N f 29 37.46 f 50039 20 3135 524.48 f jsmith \N -1 -1 1 2006-01-12 2006-01-11 1.000000 f 316 2006-01-11 2006-02-10 42 95 I 60015 60015 112.64 \N f 29 7.49 f 50040 21 3139 112.64 f jsmith \N -1 -1 1 2006-01-12 2006-01-11 1.000000 f 317 2006-01-11 2006-02-10 42 95 I 60016 60016 104.90 \N f 29 7.49 f 50041 22 3143 104.90 f jsmith \N -1 -1 1 2006-01-12 2006-01-11 1.000000 f 323 2006-01-13 2006-02-12 42 95 I 60020 60020 103.86 \N f 29 7.42 f 50045 26 3315 103.86 f jsmith \N -1 -1 1 2006-01-13 2006-01-13 1.000000 f 325 2006-01-13 2006-02-12 42 95 I 60021 60021 1051.50 \N f 29 71.25 f 50046 27 3345 1051.50 f jsmith \N -1 -1 1 2006-01-13 2006-01-13 1.000000 f 327 2006-01-30 2006-03-01 42 95 I 60022 60022 1087.50 \N f 29 71.25 f 50148 28 3376 1087.50 f jsmith \N -1 -1 1 2006-01-30 2006-01-30 1.000000 f 328 2006-01-30 2006-03-01 42 95 I 60023 60023 1097.50 \N f 29 71.25 f 50149 29 3402 1097.50 f jsmith \N -1 -1 1 2006-01-30 2006-01-30 1.000000 f 329 2006-02-01 2006-03-03 42 95 I 60024 60024 1034.50 f 29 71.25 f 50150 30 3439 1034.50 f jsmith \N -1 -1 1 2006-02-01 2006-02-01 1.000000 f 357 2008-03-04 2008-04-03 42 95 I 60049 60049 1337.17 \N f 29 91.30 f 50169 57 4165 1337.17 f jsmith \N -1 -1 1 2008-03-04 2008-03-04 1.000000 f 358 2008-03-05 2008-04-04 42 95 I 60052 60052 997.50 \N f 29 71.25 f 50172 60 4218 997.50 f jsmith \N -1 -1 1 2008-03-05 2008-03-05 1.000000 f 359 2008-04-04 2008-05-04 42 97 I 60054 60054 7473.00 \N f 29 395.48 f 50174 62 4250 7473.00 f mfgadmin \N -1 -1 3 2008-04-04 2008-04-04 0.505051 f 360 2008-06-12 2008-07-12 42 97 I 60055 60055 21.59 f 29 1.62 f 50175 63 4259 21.59 f jsmith \N -1 -1 3 2008-06-12 2008-06-12 0.505051 f 361 2008-06-12 2008-07-12 42 95 I 60056 60056 10500.00 f 29 750.00 f \N 64 4261 10500.00 f jsmith \N -1 -1 1 2008-06-12 2008-06-12 1.000000 f 363 2008-06-12 2008-07-12 42 97 I 60057 60057 16.55 f 29 1.24 f 50176 65 4598 16.55 f jsmith \N -1 -1 3 2008-06-12 2008-06-12 0.505051 f 364 2008-06-12 2008-07-12 42 97 I 60058 60058 247.47 f 29 18.56 f 50177 66 4603 247.47 f jsmith \N -1 -1 3 2008-06-12 2008-06-12 0.505051 f 366 2008-06-18 2008-07-18 42 95 I 60060 60060 3260.25 f 29 232.88 f 50178 68 4629 3260.25 f jsmith \N -1 -1 1 2008-06-18 2008-06-18 1.000000 f 365 2008-06-12 2008-07-12 42 95 I 60059 60059 514.50 f 29 36.75 f 40009 67 4607 514.50 f jsmith \N -1 -1 1 2008-06-18 2008-06-12 1.000000 f 367 2008-06-19 2008-07-19 42 97 I 60061 60061 42564.00 f 29 3181.05 f 50179 69 4745 42564.00 f jsmith \N -1 -1 3 2008-06-19 2008-06-19 0.505051 f 368 2008-06-19 2008-07-19 42 95 I 60062 60062 2993.76 f 29 213.84 f 50180 70 4772 2993.76 f jsmith \N -1 -1 1 2008-06-19 2008-06-19 1.000000 f 369 2008-06-20 2008-07-20 42 95 I 60063 60063 108.56 f 29 6.68 f 50181 71 4785 108.56 f jsmith \N -1 -1 1 2008-06-20 2008-06-20 1.000000 f 370 2008-06-20 2008-07-20 42 95 I 60064 60064 1024.50 f 29 71.25 f 50182 72 5110 1024.50 f jsmith \N -1 -1 1 2008-06-20 2008-06-20 1.000000 f 371 2008-07-15 2008-08-14 42 95 I 60065 60065 47250.00 f 29 3375.00 f 50183 73 5131 47250.00 f admin \N -1 -1 1 2008-09-08 2008-07-15 1.000000 f 372 2008-09-08 2008-10-08 42 95 I 60066 60066 41692.20 f 29 2967.30 f 50183 74 5136 41692.20 f admin \N -1 -1 1 2008-09-08 2008-09-08 1.000000 f 373 2008-09-08 2008-10-08 42 95 I 60067 60067 47250.00 f 29 3375.00 f 50183 75 5139 47250.00 f admin \N -1 -1 1 2008-09-08 2008-09-08 1.000000 f 374 2008-09-09 2008-10-09 42 95 I 60068 60068 38.35 f 29 2.03 f 50184 76 5167 38.35 f jsmith \N -1 -1 1 2008-09-09 2008-09-09 1.000000 f 376 2008-10-02 2008-11-01 42 95 I 60069 60069 4213.17 f 29 2.74 f 40010 77 5237 4213.17 f jsmith \N -1 -1 1 2008-10-02 2008-10-02 1.000000 f 377 2008-10-02 2008-11-01 42 97 I 60070 60070 213.92 f 29 0.13 f 50185 78 5247 213.92 f jsmith \N -1 -1 3 2008-10-02 2008-10-02 0.568182 f 378 2008-10-02 2008-11-01 42 95 I 60071 60071 46590.37 f 29 31.07 f 50186 79 5272 46590.37 f jsmith \N -1 -1 1 2008-10-02 2008-10-02 1.000000 f 379 2008-10-02 2008-11-01 42 97 I 60072 60072 25000.00 f 29 1875.00 f \N 80 5273 25000.00 f jsmith \N -1 -1 3 2008-10-02 2008-10-02 0.568182 f 313 2006-01-11 2006-01-11 42 95 C 20006 50.00 f 29 0.00 f -1 3131 50.00 f jsmith 1 -1 -1 1 2006-01-11 2006-01-11 1.000000 f 314 2006-01-11 2006-01-11 42 95 C 20007 75.00 f 29 0.00 f -1 3134 75.00 f jsmith 1 -1 -1 1 2006-01-11 2006-01-11 1.000000 f 380 2008-12-31 2009-01-30 42 97 I 60073 60073 639.77 f 29 40.48 f 50189 81 5320 639.77 f jsmith \N -1 -1 3 2008-12-31 2008-12-31 0.694444 f 381 2008-12-31 2009-01-30 42 97 I 60074 60074 148342.74 f 29 11125.71 f 50190 82 5331 148342.74 f jsmith \N -1 -1 3 2008-12-31 2008-12-31 0.694444 f 382 2008-12-31 2009-01-30 42 95 I 60075 60075 74455.00 f 29 5584.13 f \N 83 5342 74455.00 f jsmith \N -1 -1 1 2008-12-31 2008-11-01 1.000000 f 383 2009-01-12 2009-02-11 42 97 I 60076 60076 22022.00 f 29 1614.15 f 50191 84 5369 22022.00 f jsmith \N -1 -1 3 2009-01-12 2009-01-12 0.694444 f 385 2009-01-12 2009-02-11 42 97 I 60078 60078 69.83 f 29 4.85 f 50193 86 5377 69.83 f jsmith \N -1 -1 3 2009-01-12 2009-01-12 0.694444 f 384 2009-01-12 2009-02-11 42 95 I 60077 60077 101.06 f 29 6.68 f 50192 85 5373 101.06 f jsmith \N -1 -1 1 2009-01-12 2009-01-12 1.000000 f 386 2009-01-01 2009-01-31 42 95 I 60079 60079 50000.00 f 29 3750.00 f \N 87 5386 50000.00 f admin \N -1 -1 1 2009-06-26 2009-01-01 1.000000 f 387 2009-06-26 2009-07-26 42 97 I 60080 60080 9778.15 f 29 538.05 f 50194 88 5438 9778.15 f admin \N -1 -1 3 2009-06-26 2009-06-26 0.694444 f 388 2009-08-13 2009-09-12 42 95 I 60081 60081 115875.00 f 29 6937.50 f 50195 89 5508 115875.00 f admin \N -1 -1 1 2009-08-13 2009-08-13 1.000000 f 389 2007-12-14 2008-01-13 42 97 I 60046 60046 0.00 \N f 29 0.00 f 50167 54 \N 0.00 f admin \N -1 -1 3 2007-12-14 2007-12-14 0.537634 f 390 2008-03-04 2008-04-03 42 97 I 60051 60051 0.00 \N f 29 0.00 f 50171 59 \N 0.00 f admin \N -1 -1 3 2008-03-04 2008-03-04 0.537634 f 391 2008-03-04 2008-04-03 42 95 I 60050 60050 0.00 \N f 29 0.00 f 50170 58 \N 0.00 f admin \N -1 -1 1 2008-03-04 2008-03-04 1.000000 f 392 2008-03-05 2008-04-04 42 95 I 60053 60053 0.00 \N f 29 0.00 f 50173 61 \N 0.00 f admin \N -1 -1 1 2008-03-05 2008-03-05 1.000000 f 405 2009-10-13 2009-11-12 42 95 I 60087 60087 57937.50 f 29 3468.75 f 50198 95 6014 57937.50 f jsmith \N -1 -1 1 2009-10-13 2009-10-13 1.000000 f 393 2009-09-21 2009-10-21 42 97 I 60082 60082 48890.83 f 29 2690.25 f 50196 90 5739 48890.83 f admin \N -1 -1 3 2009-09-21 2009-09-21 0.694444 f 404 2009-10-13 2009-11-12 42 97 I 60086 60086 29381.94 f 29 2203.13 f 50199 94 6011 29381.94 f jsmith \N -1 -1 3 2009-10-13 2009-10-13 0.694444 f 406 2009-12-03 2010-01-02 42 95 I 60088 60088 2025.00 f 29 151.88 f \N 98 6036 2025.00 f admin \N -1 -1 1 2009-12-03 2009-12-03 1.000000 f 396 2009-09-22 2009-10-22 42 95 I 60083 60083 10000.00 f 29 750.00 f \N 91 5757 10000.00 f admin \N -1 -1 1 2009-09-22 2009-09-22 1.000000 f 407 2009-12-03 2010-01-02 42 95 I 60089 60089 115875.00 f 29 6937.50 f 50200 99 6084 115875.00 f admin \N -1 -1 1 2009-12-03 2009-12-03 1.000000 f 399 2009-09-22 2009-10-22 42 95 I 60084 60084 45000.00 f 29 3375.00 f \N 92 5769 45000.00 f jsmith \N -1 -1 1 2009-09-22 2009-09-22 1.000000 f 400 2009-09-25 2009-10-25 42 95 C 20021 119.00 f 29 0.00 f -1 5846 119.00 f jsmith 2 -1 -1 1 2009-09-25 2009-09-25 1.000000 f 403 2009-09-25 2009-10-25 42 95 I 60085 60085 435.25 f 29 30.38 f 50197 93 5870 435.25 f jsmith \N -1 -1 1 2009-09-25 2009-09-25 1.000000 f 418 2010-09-07 2010-10-07 42 95 I 60097 60097 198000.00 f 29 14850.00 f 50207 107 6274 198000.00 f admin \N -1 -1 1 2010-09-07 2010-07-12 1.000000 f 408 2010-03-10 2010-04-09 42 95 I 60090 60090 49500.00 f 29 3712.50 f 50201 100 6104 49500.00 f admin \N -1 -1 1 2010-03-10 2010-03-10 1.000000 f 410 2010-03-12 2010-04-11 42 95 I 60091 60091 11522.70 f 29 697.43 f 50202 101 6142 11522.70 f admin \N -1 -1 1 2010-03-12 2010-03-12 1.000000 f 412 2010-01-01 2010-01-31 42 95 I 60092 60092 2025.00 f 29 151.88 f \N 102 6150 2025.00 f admin \N -1 -1 1 2010-03-12 2010-01-01 1.000000 f 413 2010-03-12 2010-04-11 42 95 I 60093 60093 0.00 f 29 0.00 f 50204 103 6156 0.00 f admin \N -1 -1 1 2010-03-12 2010-03-12 1.000000 f 422 2010-07-30 2010-08-29 42 95 I 60099 60099 52937.50 f 29 3468.75 f 50209 109 6292 52937.50 f admin \N -1 -1 1 2010-08-15 2010-07-30 1.000000 f 414 2010-04-02 2010-05-02 42 97 I 60094 60094 31913.60 f 29 0.00 f 40011 104 6168 31913.60 f admin \N -1 -1 3 2010-04-02 2010-04-02 0.61728395061728395062 f 416 2010-06-07 2010-07-07 42 95 I 60095 60095 99000.00 f 29 7425.00 f 40012 105 6181 99000.00 f admin \N -1 -1 1 2010-09-07 2010-06-07 1.000000 f 419 2010-09-07 2010-10-07 42 95 I 60098 60098 148500.00 f 29 11137.50 f 50208 108 6275 148500.00 f admin \N -1 -1 1 2010-09-07 2010-08-10 1.000000 f 423 2010-09-08 2010-10-08 42 97 I 60100 60100 85373.94 f 29 0.00 f 50210 110 6331 85373.94 f admin \N -1 -1 3 2010-09-08 2010-09-08 0.61728395061728395062 f 417 2010-09-07 2010-12-04 42 95 I 60096 60096 99000.00 f 29 7425.00 f 50206 106 6273 99000.00 f admin -1 -1 -1 1 2010-12-30 2010-09-07 1.000000 f 431 2010-11-12 2010-12-12 42 97 I 60103 60103 40000.00 f 29 0.00 f \N 114 6404 40000.00 f admin \N -1 -1 3 2010-12-30 2010-11-12 0.61728395061728395062 f 426 2010-11-04 2010-12-04 42 95 I 60102 60102 10000.00 f 29 750.00 f \N 113 6401 10000.00 f admin \N -1 -1 1 2010-11-04 2010-11-04 1.000000 f 425 2010-11-04 2010-12-04 42 97 I 60101 60101 853.74 f 29 0.00 f 50213 111 6400 853.74 f admin \N -1 -1 3 2010-11-04 2010-11-04 0.61728395061728395062 f 435 2010-12-30 2011-01-29 42 95 I 60107 60107 3606.05 f 29 270.45 f 118 6416 3606.05 f admin \N -1 -1 1 2011-03-07 2010-12-30 1.000000 f 432 2010-12-30 2011-01-29 42 97 I 60104 60104 7200.00 f 29 0.00 f \N 115 6407 7200.00 f admin \N -1 -1 3 2011-03-07 2010-12-30 0.61728395061728395062 f 436 2011-01-01 2011-01-31 42 95 I 60108 60108 105000.00 f 29 7500.00 f \N 119 6419 105000.00 f admin \N -1 -1 1 2011-03-07 2011-01-01 1.000000 f 433 2010-11-04 2010-12-04 42 95 I 60106 60106 123750.00 f 29 9281.25 f 50212 117 6412 123750.00 f admin \N -1 -1 1 2011-03-07 2010-11-04 1.000000 f 434 2010-12-30 2011-01-29 42 95 I 60105 60105 49500.00 f 29 3712.50 f 50214 116 6413 49500.00 f admin \N -1 -1 1 2011-03-07 2010-12-30 1.000000 f 439 2011-03-07 2011-04-06 42 95 I 60110 60110 261375.00 f 29 18562.50 f 50215 121 6429 261375.00 f admin \N -1 -1 1 2011-04-18 2011-03-07 1.000000 f 437 2011-02-01 2011-03-03 42 97 I 60109 60109 65000.00 f 29 0.00 f \N 120 6420 65000.00 f admin \N -1 -1 3 2011-04-18 2011-02-01 0.62893081761006289308 f 398 2009-09-22 2009-09-22 -1 95 D 20020 2500.00 Unapplied from C-32422 f \N 0.00 f -1 5759 2500.00 f admin -1 -1 -1 1 2009-09-22 2009-09-22 1.000000 f 397 2009-09-22 2009-09-22 -1 95 C 20019 2500.00 Unapplied from C-32422 f \N 0.00 f -1 5758 2500.00 f admin -1 -1 -1 1 2009-09-22 2009-09-22 1.000000 f 395 2009-09-22 2009-09-22 -1 95 C 20018 5000.00 Unapplied from C-43234 f \N 0.00 f -1 5756 5000.00 f admin -1 -1 -1 1 2009-09-22 2009-09-22 1.000000 f 394 2009-09-22 2009-09-22 -1 95 R 20017 10000.00 Unapplied from C-32334 f \N 0.00 f -1 5755 10000.00 f admin -1 -1 -1 1 2009-09-22 2009-09-22 1.000000 f 402 2009-09-25 2009-09-25 -1 95 R 20023 75.00 Unapplied from C-42123 f \N 0.00 f -1 5848 75.00 f jsmith -1 -1 -1 1 2009-09-25 2009-09-25 1.000000 f 401 2009-09-25 2009-09-25 -1 95 C 20022 50.00 Unapplied from C-101002 f \N 0.00 f -1 5847 50.00 f jsmith -1 -1 -1 1 2009-09-25 2009-09-25 1.000000 f 440 2011-03-07 2011-03-07 -1 95 C 20035 344.77 Discount Credit from W-989182 f \N 0.00 f -1 6430 344.77 f admin -1 -1 157 1 2011-03-07 2011-03-07 1.000000 f 443 2011-04-18 2011-04-18 -1 123 C 20036 1459.28 Discount Credit from W-45233 f \N 0.00 f -1 6484 1459.28 f admin -1 -1 157 2 2011-04-18 2011-04-18 0.72463768115942028986 f 441 2011-04-18 2011-05-18 42 123 I 60111 60111 123012 72963.80 f 29 0.00 f 50217 122 6482 72963.80 f admin \N -1 -1 2 2011-04-18 2011-04-18 0.72463768115942028986 f 444 2011-04-18 2011-04-18 -1 97 C 20037 67.83 Discount Credit from W-23433 f \N 0.00 f -1 6485 67.83 f admin -1 -1 157 3 2011-04-18 2011-04-18 0.62111801242236024845 f 447 2011-06-03 2011-06-03 -1 95 C 20038 2970.00 Discount Credit from W-123112 f \N 0.00 f -1 6526 2970.00 f admin -1 -1 157 1 2011-06-03 2011-06-03 1.000000 f 442 2011-04-18 2011-05-18 42 97 I 60112 60112 3391.36 f 29 0.00 f 50211 123 6483 3391.36 f admin \N -1 -1 3 2011-04-18 2011-04-18 0.62111801242236024845 f 445 2011-04-18 2011-05-18 42 123 I 60113 60113 5435.00 f 29 407.63 f 124 6517 0.00 t admin \N -1 -1 2 \N 2011-04-18 0.72463768115942028986 f 448 2011-06-03 2011-06-03 -1 95 C 20039 2970.00 Unapplied from W-123112 f \N 0.00 f -1 6526 0.00 t admin -1 -1 -1 1 \N 2011-06-03 1.000000 f 451 2011-05-31 2011-05-31 -1 97 C 20040 3211.18 Discount Credit from W-12311 f \N 0.00 f -1 6547 3211.18 f admin -1 -1 157 3 2011-06-03 2011-05-31 0.62111801242236024845 f 446 2011-06-03 2011-07-03 42 95 I 60114 60114 148500.00 f 29 11137.50 f 50219 125 6525 148500.00 f admin \N -1 -1 1 2011-06-03 2011-06-03 1.000000 f 452 2011-05-31 2011-05-31 -1 97 C 20041 3211.18 Unapplied from W-12311 f \N 0.00 f -1 6547 3211.18 f admin -1 -1 -1 3 2011-06-03 2011-05-31 0.62111801242236024845 f 450 2011-05-30 2011-06-29 42 97 I 60116 60116 160559.00 f 29 0.00 f 50221 127 6546 160559.00 f admin \N -1 -1 3 2011-05-31 2011-05-31 0.62111801242236024845 f 449 2011-06-03 2011-07-03 42 97 I 60115 60115 114782.60 f 29 0.00 f 50220 126 6536 114782.60 f admin \N -1 -1 3 2011-06-03 2011-06-03 0.62111801242236024845 f 305 2006-01-09 2006-01-09 -1 95 C 20003 997.50 Unapplied from V-50008-1 f \N 0.00 f -1 2487 997.50 f jsmith -1 -1 -1 1 2006-01-09 2006-01-09 1.000000 f 299 2005-12-27 2005-12-27 -1 95 C 20000 86.85 Unapplied from C-CK2701 f \N 0.00 f -1 2354 86.85 f jsmith -1 -1 -1 1 2005-12-27 2005-12-27 1.000000 f 308 2006-01-09 2006-01-09 -1 95 C 20004 104.90 Unapplied from C-33211 f \N 0.00 f -1 2528 104.90 f jsmith -1 -1 -1 1 2006-01-09 2006-01-09 1.000000 f 301 2005-12-28 2005-12-28 -1 95 C 20001 114.89 Unapplied from V-40000-4 f \N 0.00 f -1 2369 114.89 f jsmith -1 -1 -1 1 2005-12-29 2005-12-28 1.000000 f 309 2006-01-09 2006-01-09 -1 95 C 20005 104.90 Unapplied from V-50031-1 f \N 0.00 f -1 2530 104.90 f jsmith -1 -1 -1 1 2006-01-09 2006-01-09 1.000000 f 303 2005-12-28 2005-12-28 -1 95 C 20002 104.90 Unapplied from V-40000-2 f \N 0.00 f -1 2378 104.90 f jsmith -1 -1 -1 1 2005-12-29 2005-12-28 1.000000 f 320 2006-01-13 2006-01-13 -1 95 C 20008 997.50 Unapplied from V-50043-4 f \N 0.00 f -1 3302 997.50 f jsmith -1 -1 -1 1 2006-01-13 2006-01-13 1.000000 f 322 2006-01-13 2006-01-13 -1 95 C 20009 103.86 Unapplied from V-50045-1 f \N 0.00 f -1 3312 103.86 f jsmith -1 -1 -1 1 2006-01-13 2006-01-13 1.000000 f 324 2006-01-13 2006-01-13 -1 95 C 20010 997.50 Unapplied from V-50046-1 f \N 0.00 f -1 3317 997.50 f jsmith -1 -1 -1 1 2006-01-13 2006-01-13 1.000000 f 326 2006-01-30 2006-01-30 -1 95 C 20011 500.00 Unapplied from V-50148-1 f \N 0.00 f -1 3348 500.00 f jsmith -1 -1 -1 1 2006-01-30 2006-01-30 1.000000 f 339 2007-02-20 2007-02-20 -1 95 C 20012 1236.56 Unapplied from C-123111 f \N 0.00 f -1 3678 1236.56 f mfgadmin -1 -1 -1 1 2007-02-20 2007-02-20 1.000000 f 348 2007-08-31 2007-08-31 -1 95 R 20013 500.00 Unapplied from C-12311 f \N 0.00 f -1 3926 500.00 f mfgadmin -1 -1 -1 1 2007-08-31 2007-08-31 1.000000 f 352 2007-09-21 2007-09-21 -1 95 R 20014 1500.00 Unapplied from C-121111 f \N 0.00 f -1 4000 1500.00 f mfgadmin -1 -1 -1 1 2007-09-21 2007-09-21 1.000000 f 362 2008-06-12 2008-06-12 -1 97 R 20015 1000.00 Unapplied from C-123111 f \N 0.00 f -1 4266 1000.00 f jsmith -1 -1 -1 3 2008-06-19 2008-06-12 0.505051 f 375 2008-10-02 2008-10-02 -1 95 R 20016 1000.00 Unapplied from V- f \N 0.00 f -1 5189 1000.00 f jsmith -1 -1 -1 1 2008-10-02 2008-10-02 1.000000 f 409 2010-03-10 2010-03-10 -1 95 C 20024 990.00 Discount Credit from C-12343388 f \N 0.00 f -1 6105 990.00 f admin -1 -1 157 1 2010-03-10 2010-03-10 1.000000 f 421 2010-08-30 2010-08-30 -1 95 R 20028 198000.00 Unapplied from C-321322 f \N 0.00 f -1 6278 198000.00 f admin -1 -1 -1 1 2010-09-07 2010-08-30 1.000000 f 411 2010-03-12 2010-03-12 -1 95 C 20025 230.45 Discount Credit from C-3423423 f \N 0.00 f -1 6143 230.45 f admin -1 -1 157 1 2010-03-12 2010-03-12 1.000000 f 415 2010-04-02 2010-04-02 -1 97 C 20026 638.27 Discount Credit from C-12311 f \N 0.00 f -1 6172 638.27 f admin -1 -1 157 3 2010-04-02 2010-04-02 0.61728395061728395062 f 420 2010-07-29 2010-07-29 -1 95 R 20027 148500.00 Unapplied from C-543433 f \N 0.00 f -1 6276 148500.00 f admin -1 -1 -1 1 2010-09-07 2010-07-29 1.000000 f 424 2010-09-08 2010-09-08 -1 97 C 20029 1707.48 Discount Credit from C-43341 f \N 0.00 f -1 6332 1707.48 f admin -1 -1 157 3 2010-09-08 2010-09-08 0.61728395061728395062 f 427 2010-11-04 2010-11-04 -1 95 C 20030 200.00 Discount Credit from C-32123 f \N 0.00 f -1 6402 200.00 f admin -1 -1 157 1 2010-11-04 2010-11-04 1.000000 f 429 2010-11-04 2010-11-04 -1 97 C 20032 17.07 Discount Credit from C-12311 f \N 0.00 f -1 6403 17.07 f admin -1 -1 157 3 2010-11-04 2010-11-04 0.61728395061728395062 f 430 2010-11-04 2010-11-04 -1 97 R 20033 17.07 Unapplied from C-12311 f \N 0.00 f -1 6403 17.07 f admin -1 -1 -1 3 2011-03-07 2010-11-04 0.61728395061728395062 f 428 2010-11-04 2010-11-04 -1 95 R 20031 20200.00 Unapplied from C-32123 f \N 0.00 f -1 6402 20200.00 f admin -1 -1 -1 1 2011-03-07 2010-11-04 1.000000 f 438 2011-03-07 2011-03-07 -1 95 R 20034 21450.00 Unapplied from W-123112 f \N 0.00 f -1 6421 21450.00 f admin -1 -1 -1 1 2011-04-18 2011-03-07 1.000000 f \. -- -- Data for Name: aropenalloc; Type: TABLE DATA; Schema: public; Owner: admin -- COPY aropenalloc (aropenalloc_aropen_id, aropenalloc_doctype, aropenalloc_doc_id, aropenalloc_amount, aropenalloc_curr_id) FROM stdin; \. -- -- Data for Name: aropentax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY aropentax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; 503 411 3 16 0.00 \N \N 0.000000 0.00 -9.300000 2010-03-12 2010-03-12 1 1.000000 6143 527 440 3 16 0.00 \N \N 0.000000 0.00 -16.320000 2011-03-07 2011-03-07 1 1.000000 6430 \. -- -- Data for Name: asohist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY asohist (asohist_id, asohist_cust_id, asohist_itemsite_id, asohist_shipdate, asohist_invcdate, asohist_duedate, asohist_promisedate, asohist_ordernumber, asohist_invcnumber, asohist_qtyshipped, asohist_unitprice, asohist_unitcost, asohist_billtoname, asohist_billtoaddress1, asohist_billtoaddress2, asohist_billtoaddress3, asohist_billtocity, asohist_billtostate, asohist_billtozip, asohist_shiptoname, asohist_shiptoaddress1, asohist_shiptoaddress2, asohist_shiptoaddress3, asohist_shiptocity, asohist_shiptostate, asohist_shiptozip, asohist_shipto_id, asohist_shipvia, asohist_salesrep_id, asohist_misc_type, asohist_misc_descrip, asohist_misc_id, asohist_commission, asohist_commissionpaid, asohist_doctype, asohist_orderdate, asohist_imported, asohist_ponumber, asohist_curr_id, asohist_taxtype_id, asohist_taxzone_id) FROM stdin; \. -- -- Data for Name: asohisttax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY asohisttax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; \. -- -- Data for Name: atlasmap; Type: TABLE DATA; Schema: public; Owner: admin -- COPY atlasmap (atlasmap_id, atlasmap_name, atlasmap_filter, atlasmap_filtertype, atlasmap_atlas, atlasmap_map, atlasmap_headerline) FROM stdin; \. -- -- Data for Name: backup_usr; Type: TABLE DATA; Schema: public; Owner: admin -- COPY backup_usr (usr_id, usr_username, usr_propername, usr_passwd, usr_locale_id, usr_initials, usr_agent, usr_active, usr_email, usr_dept_id, usr_shift_id, usr_window) FROM stdin; 2 admin Administrator 3 ADMIN t t admin@xtuple.com 4 1 9 jsmith John Smith \N 3 JS t f jsmith@openmfg.com 4 1 1 mfgadmin OpenMFG Administrator \N 3 ADMIN t t matherton@openmfg.com 4 1 \. -- -- Data for Name: bankaccnt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bankaccnt (bankaccnt_id, bankaccnt_name, bankaccnt_descrip, bankaccnt_bankname, bankaccnt_accntnumber, bankaccnt_ar, bankaccnt_ap, bankaccnt_nextchknum, bankaccnt_type, bankaccnt_accnt_id, bankaccnt_check_form_id, bankaccnt_userec, bankaccnt_rec_accnt_id, bankaccnt_curr_id, bankaccnt_notes, bankaccnt_routing, bankaccnt_ach_enabled, bankaccnt_ach_origin, bankaccnt_ach_genchecknum, bankaccnt_ach_leadtime, bankaccnt_ach_lastdate, bankaccnt_ach_lastfileid, bankaccnt_ach_origintype, bankaccnt_ach_originname, bankaccnt_ach_desttype, bankaccnt_ach_fed_dest, bankaccnt_ach_destname, bankaccnt_ach_dest) FROM stdin; 15 GBank GBank GBank 432112 t t 0 C 127 20 \N \N 3 \N f f \N \N \N I \N \N \N \N \N 14 EuroBank Euro Bank Euro Bank 321223 t t 5016 K 126 20 \N \N 2 \N f f \N \N \N I \N \N \N \N \N 13 EBANK eBank Checking Account eBank 123145 t t 4074 K 109 19 \N \N 1 111111111 t f 1 2010-09-08 2 I B \. -- -- Data for Name: bankadj; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bankadj (bankadj_id, bankadj_bankaccnt_id, bankadj_bankadjtype_id, bankadj_created, bankadj_username, bankadj_date, bankadj_docnumber, bankadj_amount, bankadj_notes, bankadj_sequence, bankadj_posted, bankadj_curr_id, bankadj_curr_rate) FROM stdin; \. -- -- Data for Name: bankadjtype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bankadjtype (bankadjtype_id, bankadjtype_name, bankadjtype_descrip, bankadjtype_accnt_id, bankadjtype_iscredit) FROM stdin; 1 BANKFEE Bank Fee 110 f \. -- -- Data for Name: bankrec; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bankrec (bankrec_id, bankrec_created, bankrec_username, bankrec_bankaccnt_id, bankrec_opendate, bankrec_enddate, bankrec_openbal, bankrec_endbal, bankrec_posted, bankrec_postdate) FROM stdin; 1 2006-06-23 16:20:11.562 jsmith 13 2003-09-28 2006-06-23 0.00 1253441.40 t 2006-06-23 16:20:11.562 3 2006-07-05 09:59:56.707 jsmith 13 2006-06-05 2006-07-05 0.00 -1952.50 t 2006-07-05 09:59:56.707 4 2006-08-31 08:26:44.519 jsmith 13 2006-06-02 2006-08-31 1000000.00 1699520.72 t 2006-08-31 08:26:44.519 6 2006-10-11 10:52:50.097 jsmith 13 2006-09-11 2006-11-10 100000.00 53374.07 t 2006-10-11 10:52:50.097 7 2006-10-11 10:59:27.269 jsmith 13 2006-10-11 2006-10-11 100000.00 50000.00 t 2006-10-11 10:59:27.269 8 2006-10-11 11:00:52.972 jsmith 14 2006-10-11 2006-10-11 0.00 19455.25 t 2006-10-11 11:00:52.972 9 2006-10-11 11:01:46.769 jsmith 15 2006-10-11 2006-10-11 0.00 13477.00 t 2006-10-11 11:01:46.769 10 2007-08-03 04:10:30.14 mfgadmin 13 2007-05-05 2007-08-03 100000.00 944965.89 t 2007-08-03 04:10:30.14 19 2007-12-21 09:34:00.749 mfgadmin 13 2007-07-01 2007-12-21 1820835.00 2000000.00 t 2007-12-21 09:34:00.749 21 2007-12-21 09:52:21.406 mfgadmin 14 2007-02-02 2007-12-21 201482.32 200000.00 t 2007-12-21 09:52:21.406 23 2007-12-21 09:53:46.765 mfgadmin 15 2007-03-20 2007-12-21 100000.00 155038.06 t 2007-12-21 09:53:46.765 26 2008-06-19 16:49:36.804355 jsmith 13 2008-06-19 2008-06-19 0.00 0.00 t 2008-06-19 16:49:36.804355 27 2008-06-19 16:52:02.754619 jsmith 13 2008-06-19 2008-06-19 3000000.00 3125930.59 t 2008-06-19 16:52:02.754619 31 2009-01-12 14:17:21.007827 jsmith 13 2008-06-20 2009-01-12 3004627.69 3045161.87 t 2009-01-12 14:17:21.007827 33 2009-01-12 14:20:46.918594 jsmith 14 2007-12-22 2009-01-12 23095.22 38785.45 t 2009-01-12 14:20:46.918594 35 2009-01-12 14:23:34.68007 jsmith 15 2007-12-28 2009-01-12 127096.28 373707.14 t 2009-01-12 14:23:34.68007 38 2010-01-05 17:15:12.840725 admin 13 2009-01-13 2010-01-04 3045161.87 3442911.71 t 2010-01-05 17:15:12.884176 39 2010-12-30 16:50:22.497159 admin 13 2010-01-05 2010-12-30 3442911.71 3950194.76 t 2010-12-30 16:50:22.550342 \. -- -- Data for Name: bankrecitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bankrecitem (bankrecitem_id, bankrecitem_bankrec_id, bankrecitem_source, bankrecitem_source_id, bankrecitem_cleared, bankrecitem_curr_rate, bankrecitem_amount) FROM stdin; 1 1 GL 7009 t \N \N 2 1 GL 7079 t \N \N 3 1 GL 7169 t \N \N 4 1 GL 7177 t \N \N 5 1 GL 7196 t \N \N 6 1 GL 7199 t \N \N 7 1 GL 7202 t \N \N 8 1 GL 7205 t \N \N 9 1 GL 7208 t \N \N 10 1 GL 7221 t \N \N 11 1 GL 7357 t \N \N 12 1 GL 7405 t \N \N 13 1 GL 7458 t \N \N 14 1 GL 7482 t \N \N 15 1 GL 7486 t \N \N 16 1 GL 7504 t \N \N 17 1 GL 7706 t \N \N 18 1 GL 7731 t \N \N 19 1 GL 7735 t \N \N 20 1 GL 7743 t \N \N 21 1 GL 7745 t \N \N 22 1 GL 7751 t \N \N 23 1 GL 7753 t \N \N 24 1 GL 7757 t \N \N 25 1 GL 7761 t \N \N 26 1 GL 7765 t \N \N 27 1 GL 7771 t \N \N 28 1 GL 7775 t \N \N 29 1 GL 7830 t \N \N 30 1 GL 7834 t \N \N 31 1 GL 7864 t \N \N 32 1 GL 7922 t \N \N 33 1 GL 7938 t \N \N 34 1 GL 7940 t \N \N 35 1 GL 7944 t \N \N 36 1 GL 7955 t \N \N 37 1 GL 8007 t \N \N 38 1 GL 8012 t \N \N 39 1 GL 8065 t \N \N 40 1 GL 8109 t \N \N 41 1 GL 8178 t \N \N 42 1 GL 8181 t \N \N 43 1 GL 8188 t \N \N 44 1 GL 8192 t \N \N 45 1 GL 8196 t \N \N 46 1 GL 7728 t \N \N 47 1 GL 7768 t \N \N 48 1 GL 7738 t \N \N 49 1 GL 8179 t \N \N 50 1 GL 7193 t \N \N 51 1 GL 7035 t \N \N 52 1 GL 7083 t \N \N 53 1 GL 7373 t \N \N 54 1 GL 7318 t \N \N 55 1 GL 7203 t \N \N 56 1 GL 7365 t \N \N 57 1 GL 7469 t \N \N 58 1 GL 7414 t \N \N 59 1 GL 7831 t \N \N 60 1 GL 7825 t \N \N 61 1 GL 7726 t \N \N 62 1 GL 7877 t \N \N 63 1 GL 7964 t \N \N 64 1 GL 8114 t \N \N 65 1 GL 8055 t \N \N 66 1 GL 8136 t \N \N 67 1 GL 8197 t \N \N 68 3 GL 8251 t \N \N 69 3 GL 8253 t \N \N 70 3 GL 8256 t \N \N 71 3 GL 8258 t \N \N 72 3 GL 8207 t \N \N 73 4 GL 8308 t \N \N 74 4 GL 8312 t \N \N 75 4 GL 8316 t \N \N 76 4 GL 8266 t \N \N 77 4 GL 8317 t \N \N 78 4 GL 8322 t \N \N 86 6 GL 8325 t \N \N 87 6 GL 8327 t \N \N 88 6 GL 8335 t \N \N 89 6 GL 8339 t \N \N 90 6 GL 8333 t \N \N 91 6 GL 8331 t \N \N 92 6 GL 8353 t \N \N 93 7 GL 8354 t \N \N 94 8 GL 8355 t \N \N 95 9 GL 8356 t \N \N 96 10 GL 8413 t \N \N 97 10 GL 8429 t \N \N 98 10 GL 8450 t \N \N 99 10 GL 8448 t \N \N 100 10 GL 8455 t \N \N 101 10 GL 8459 t \N \N 102 10 GL 8463 t \N \N 103 10 GL 8538 t \N \N 104 10 GL 8544 t \N \N 105 10 GL 8636 t \N \N 106 10 GL 8648 t \N \N 107 10 GL 8650 t \N \N 108 10 GL 8662 t \N \N 109 10 GL 8701 t \N \N 110 10 GL 8704 t \N \N 111 10 GL 8916 t \N \N 112 10 GL 9037 t \N \N 113 10 GL 9046 t \N \N 114 10 GL 9050 t \N \N 115 10 GL 9061 t \N \N 116 10 GL 8369 t \N \N 117 10 GL 8426 t \N \N 118 10 GL 8442 t \N \N 119 10 GL 8482 t \N \N 120 10 GL 8480 t \N \N 121 10 GL 8537 t \N \N 122 10 GL 8655 t \N \N 123 10 GL 8582 t \N \N 124 10 GL 8707 t \N \N 125 10 GL 8709 t \N \N 126 10 GL 8742 t \N \N 127 10 GL 9039 t \N \N 128 10 GL 9041 t \N \N 129 10 GL 8740 t \N \N 130 10 GL 9060 t \N \N 131 10 GL 9058 t \N \N 132 19 GL 9065 t \N \N 133 19 GL 9072 t \N \N 134 19 GL 9136 t \N \N 135 19 GL 9216 t \N \N 136 19 GL 9206 t \N \N 137 19 GL 9211 t \N \N 138 19 GL 9212 t \N \N 139 19 GL 9222 t \N \N 140 19 GL 9090 t \N \N 141 19 GL 9138 t \N \N 142 19 GL 9157 t \N \N 143 19 GL 9226 t \N \N 144 19 GL 9246 t \N \N 145 19 GL 9224 t \N \N 146 21 GL 8454 t \N \N 147 21 GL 8451 t \N \N 148 21 GL 8447 t \N \N 149 21 GL 8478 t \N \N 150 21 GL 8657 t \N \N 151 21 GL 9250 t \N \N 152 21 GL 8744 t \N \N 153 21 GL 9254 t \N \N 154 23 GL 8638 t \N \N 155 23 GL 8922 t \N \N 156 23 GL 9064 t \N \N 157 23 GL 9347 t \N \N 158 23 GL 9353 t \N \N 159 23 GL 9370 t \N \N 160 27 GL 9489 t \N \N 161 27 GL 9493 t \N \N 162 27 GL 9486 t \N \N 163 27 GL 9578 t \N \N 164 27 GL 9955 t \N \N 165 27 GL 9959 t \N \N 166 27 GL 9963 t \N \N 167 27 GL 9650 t \N \N 168 27 GL 9949 t \N \N 169 27 GL 9951 t \N \N 170 27 GL 9968 t \N \N 171 27 GL 9380 t \N \N 172 27 GL 9529 t \N \N 173 27 GL 9637 t \N \N 174 27 GL 9937 t \N \N 175 27 GL 9943 t \N \N 176 27 GL 9982 t \N \N 177 27 GL 9988 t \N \N 178 31 GL 10139 t \N \N 179 31 GL 10162 t \N \N 180 31 GL 10240 t \N \N 181 31 GL 10242 t \N \N 182 31 GL 10302 t \N \N 183 31 GL 10294 t \N \N 184 31 GL 10296 t \N \N 185 31 GL 10297 t \N \N 186 31 GL 10353 t \N \N 187 31 GL 10380 t \N \N 188 31 GL 10482 t \N \N 189 31 GL 10540 t \N \N 190 31 GL 10654 t \N \N 191 31 GL 10713 t \N \N 192 31 GL 10152 t \N \N 193 31 GL 10196 t \N \N 194 31 GL 10254 t \N \N 195 31 GL 10305 t \N \N 196 31 GL 10262 t \N \N 197 31 GL 10307 t \N \N 198 31 GL 10374 t \N \N 199 31 GL 10378 t \N \N 200 31 GL 10515 t \N \N 201 31 GL 10520 t \N \N 202 31 GL 10655 t \N \N 203 31 GL 10568 t \N \N 204 31 GL 10624 t \N \N 205 31 GL 10647 t \N \N 206 31 GL 10660 t \N \N 207 31 GL 10572 t \N \N 208 31 GL 10649 t \N \N 209 31 GL 10644 t \N \N 210 31 GL 10662 t \N \N 211 31 GL 10675 t \N \N 212 31 GL 10721 t \N \N 213 31 GL 10677 t \N \N 214 31 GL 10723 t \N \N 215 33 GL 10521 t \N \N 216 33 GL 9506 t \N \N 217 33 GL 9947 t \N \N 218 33 GL 10519 t \N \N 219 35 GL 9629 t \N \N 220 35 GL 9645 t \N \N 221 35 GL 9658 t \N \N 222 35 GL 10093 t \N \N 223 35 GL 10497 t \N \N 224 35 GL 10542 t \N \N 225 35 GL 10615 t \N \N 226 35 GL 10631 t \N \N 227 35 GL 10710 t \N \N 228 38 GL 10808 t \N \N 229 38 GL 10810 t \N \N 230 38 GL 10816 t \N \N 231 38 GL 10819 t \N \N 232 38 GL 10726 t \N \N 233 38 GL 10824 t \N \N 234 38 GL 10890 t \N \N 235 38 GL 10963 t \N \N 236 38 GL 11853 t \N \N 237 38 GL 11214 t \N \N 238 38 GL 11232 t \N \N 239 38 GL 11277 t \N \N 240 38 GL 11270 t \N \N 241 38 GL 11284 t \N \N 242 38 GL 11286 t \N \N 243 38 GL 11294 t \N \N 244 38 GL 11290 t \N \N 245 38 GL 11300 t \N \N 246 38 GL 11305 t \N \N 247 38 GL 11387 t \N \N 248 38 GL 11390 t \N \N 249 38 GL 11396 t \N \N 250 38 GL 11404 t \N \N 251 38 GL 11420 t \N \N 252 38 GL 11429 t \N \N 253 38 GL 11441 t \N \N 254 38 GL 11435 t \N \N 255 38 GL 11445 t \N \N 256 38 GL 11538 t \N \N 257 38 GL 11606 t \N \N 258 38 GL 11616 t \N \N 259 38 GL 11618 t \N \N 260 38 GL 11821 t \N \N 261 38 GL 11838 t \N \N 262 38 GL 11880 t \N \N 263 38 GL 11864 t \N \N 264 38 GL 11950 t \N \N 265 38 GL 11961 t \N \N 266 38 GL 11967 t \N \N 267 38 GL 10838 t \N \N 268 38 GL 10850 t \N \N 269 38 GL 10862 t \N \N 270 38 GL 10844 t \N \N 271 38 GL 10856 t \N \N 272 38 GL 10874 t \N \N 273 38 GL 10868 t \N \N 274 38 GL 10880 t \N \N 275 38 GL 10752 t \N \N 276 38 GL 10886 t \N \N 277 38 GL 10916 t \N \N 278 38 GL 11859 t \N \N 279 38 GL 11011 t \N \N 280 38 GL 11235 t \N \N 281 38 GL 11213 t \N \N 282 38 GL 11217 t \N \N 283 38 GL 11280 t \N \N 284 38 GL 11458 t \N \N 285 38 GL 11472 t \N \N 286 38 GL 11401 t \N \N 287 38 GL 11466 t \N \N 288 38 GL 11444 t \N \N 289 38 GL 11426 t \N \N 290 38 GL 11427 t \N \N 291 38 GL 11462 t \N \N 292 38 GL 11475 t \N \N 293 38 GL 11501 t \N \N 294 38 GL 11830 t \N \N 295 38 GL 11667 t \N \N 296 38 GL 11671 t \N \N 297 38 GL 11886 t \N \N 298 38 GL 11940 t \N \N 299 38 GL 11955 t \N \N 300 39 GL 11534 t \N \N 301 39 GL 12079 t \N \N 302 39 GL 12069 t \N \N 303 39 GL 11988 t \N \N 304 39 GL 12060 t \N \N 305 39 GL 12084 t \N \N 306 39 GL 12126 t \N \N 307 39 GL 12137 t \N \N 308 39 GL 12266 t \N \N 309 39 GL 12305 t \N \N 310 39 GL 12311 t \N \N 311 39 GL 12339 t \N \N 312 39 GL 12460 t \N \N 313 39 GL 12464 t \N \N 314 39 GL 12534 t \N \N 315 39 GL 12546 t \N \N 316 39 GL 11975 t \N \N 317 39 GL 12075 t \N \N 318 39 GL 12065 t \N \N 319 39 GL 11992 t \N \N 320 39 GL 12040 t \N \N 321 39 GL 12042 t \N \N 322 39 GL 12100 t \N \N 323 39 GL 12112 t \N \N 324 39 GL 12122 t \N \N 325 39 GL 12132 t \N \N 326 39 GL 12158 t \N \N 327 39 GL 12156 t \N \N 328 39 GL 12161 t \N \N 329 39 GL 12344 t \N \N 330 39 GL 12277 t \N \N 331 39 GL 12279 t \N \N 332 39 GL 12318 t \N \N 333 39 GL 12274 t \N \N 334 39 GL 12357 t \N \N 335 39 GL 12413 t \N \N 336 39 GL 12456 t \N \N 337 39 GL 12480 t \N \N \. -- -- Data for Name: bomhead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bomhead (bomhead_id, bomhead_item_id, bomhead_serial, bomhead_docnum, bomhead_revision, bomhead_revisiondate, bomhead_batchsize, bomhead_requiredqtyper, bomhead_rev_id) FROM stdin; 64 319 \N MA21 2.1 2007-12-14 1000.000000 \N -1 57 304 \N \N 1.000000 \N -1 56 309 \N \N 1.000000 \N -1 55 300 \N \N 1.000000 \N -1 60 312 \N \N 1.000000 \N -1 61 313 \N \N 1.000000 \N -1 65 327 \N \N 1.000000 \N -1 63 316 \N MA21 2.1 2007-12-14 1.000000 \N -1 66 331 \N \N 1.000000 \N -1 67 333 \N \N 1.000000 \N -1 58 307 \N MA21 2.2 2007-12-14 1.000000 \N -1 59 310 \N MA21 2.2 2007-12-14 1.000000 \N -1 62 311 \N MA21 2.1 2007-12-14 1.000000 \N -1 71 345 \N \N 1.000000 \N -1 \. -- -- Data for Name: bomitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bomitem (bomitem_id, bomitem_parent_item_id, bomitem_seqnumber, bomitem_item_id, bomitem_qtyper, bomitem_scrap, bomitem_status, bomitem_effective, bomitem_expires, bomitem_createwo, bomitem_issuemethod, bomitem_schedatwooper, bomitem_ecn, bomitem_moddate, bomitem_subtype, bomitem_uom_id, bomitem_rev_id, bomitem_booitem_seq_id, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref, bomitem_qtyfxd, bomitem_issuewo) FROM stdin; 233 333 80 313 1.00000000 0.0000 \N 2008-09-09 2100-01-01 t M f 2008-09-09 I 4 -1 -1 \N \N \N \N 0.00000000 f 235 333 90 325 0.05000000 0.0000 \N 1970-01-01 2100-01-01 f S f 2008-09-09 I 8 -1 -1 \N \N \N \N 0.00000000 f 230 333 20 301 0.01000000 0.0000 \N 2008-09-09 2008-08-10 f S f initial 2008-09-09 I 8 -1 -1 \N \N \N \N 0.00000000 f 229 333 50 304 1.00000000 0.0000 \N 2008-06-11 2008-08-10 f S f 2008-09-09 I 4 -1 -1 \N \N \N \N 0.00000000 f 228 333 30 303 4.00000000 0.0000 \N 2008-08-10 2100-01-01 f S f initial 2008-09-09 I 4 -1 -1 \N \N \N \N 0.00000000 f 231 333 60 317 1.00000000 0.0000 \N 2008-08-10 2100-01-01 f S f 2.1 2008-09-09 I 4 -1 -1 \N \N \N \N 0.00000000 f 232 333 70 321 4.00000000 0.0000 \N 2008-08-10 2100-01-01 f S f 2008-09-09 I 4 -1 -1 \N \N \N \N 0.00000000 f 258 345 20 306 1.00000000 0.1000 \N 2010-06-07 2100-01-01 f M f 2010-06-07 I 4 -1 -1 \N \N \N \N 0.00000000 f 259 316 30 303 4.00000000 0.0000 \N 2010-06-07 2100-01-01 f M t initial 2010-06-07 I 4 -1 16 \N \N \N \N 0.00000000 f 260 316 20 301 0.01000000 0.0000 \N 2010-06-07 2100-01-01 f M t initial 2010-06-07 I 8 -1 15 \N \N \N \N 0.00000000 f 203 313 10 314 1.00000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2007-05-24 I 4 -1 18 \N \N \N \N 0.00000000 f 169 300 20 301 0.01000000 0.0000 \N 1970-01-01 2100-01-01 f M t initial 2007-05-26 B 8 -1 12 \N \N \N \N 0.00000000 f 211 313 20 315 1.00000000 0.0000 \N 1970-01-01 2100-01-01 f M f MA2.1 2007-05-30 I 4 -1 18 \N \N \N \N 0.00000000 f 208 319 10 323 1.00000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2.1 2007-05-26 I 9 -1 20 \N \N \N \N 0.00000000 f 198 316 30 303 4.00000000 0.0000 \N 2007-05-24 2100-01-01 f M t initial 2007-05-24 I 4 -1 16 \N \N \N \N 0.00000000 f 201 316 20 301 0.01000000 0.0000 \N 2007-05-24 2100-01-01 f M t initial 2007-05-24 I 8 -1 15 \N \N \N \N 0.00000000 f 200 316 10 302 1.00000000 0.0000 \N 2007-05-24 2007-05-26 f M t initial 2007-05-24 I 4 -1 15 \N \N \N \N 0.00000000 f 207 316 60 317 1.00000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2.1 2007-05-26 I 4 -1 16 \N \N \N \N 0.00000000 f 210 316 70 321 4.00000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2007-05-26 I 4 -1 16 \N \N \N \N 0.00000000 f 212 316 80 313 1.00000000 0.0000 \N 1970-01-01 2100-01-01 t M f 2007-05-30 I 4 -1 16 \N \N \N \N 0.00000000 f 186 310 30 303 4.00000000 0.0000 \N 2006-10-13 2100-01-01 f M t initial 2006-10-13 I 4 -1 8 \N \N \N \N 0.00000000 f 188 310 10 302 1.00000000 0.0000 \N 2006-10-13 2100-01-01 f M t initial 2006-10-13 I 4 -1 6 \N \N \N \N 0.00000000 f 189 310 20 301 0.01000000 0.0000 \N 2006-10-13 2100-01-01 f M t initial 2006-10-13 I 8 -1 6 \N \N \N \N 0.00000000 f 205 310 60 313 2.00000000 0.0000 \N 2007-05-16 2007-05-30 t M f 2007-05-30 I 4 -1 8 \N \N \N \N 0.00000000 f 215 327 10 303 1.00000000 0.0000 \N 1970-01-01 2100-01-01 f M t 2007-12-20 I 10 -1 23 \N \N \N \N 0.00000000 f 194 312 10 311 0.50000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2006-10-13 N 4 -1 -1 \N \N \N \N 0.00000000 f 195 312 20 310 0.30000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2006-10-13 N 4 -1 -1 \N \N \N \N 0.00000000 f 196 312 30 307 0.20000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2006-10-13 N 4 -1 -1 \N \N \N \N 0.00000000 f 170 300 30 303 4.00000000 0.0000 \N 1970-01-01 2100-01-01 f M t initial 2005-12-23 I 4 -1 13 \N \N \N \N 0.00000000 f 174 304 10 305 1.00000000 0.0000 \N 1970-01-01 2100-01-01 f M t 2005-12-23 I 4 -1 1 \N \N \N \N 0.00000000 f 175 304 20 306 1.00000000 0.1000 \N 1970-01-01 2100-01-01 f M t 2005-12-23 I 4 -1 1 \N \N \N \N 0.00000000 f 185 309 20 306 1.00000000 0.1000 \N 1970-01-01 2100-01-01 f M t 2006-08-30 I 4 -1 2 \N \N \N \N 0.00000000 f 180 309 10 305 1.00000000 0.0000 \N 2006-08-02 2100-01-01 f M t 2006-08-02 I 4 -1 2 \N \N \N \N 0.00000000 f 168 300 10 302 1.00000000 0.0000 \N 1970-01-01 2100-01-01 f M t initial 2006-10-16 I 4 -1 12 \N \N \N \N 0.00000000 f 216 328 20 301 0.01000000 0.0000 \N 2008-03-04 2100-01-01 f M t initial 2008-03-04 B 8 -1 12 \N \N \N \N 0.00000000 f 217 328 30 303 4.00000000 0.0000 \N 2008-03-04 2100-01-01 f M t initial 2008-03-04 I 4 -1 13 \N \N \N \N 0.00000000 f 219 328 10 302 1.00000000 0.0000 \N 2008-03-04 2100-01-01 f M t initial 2008-03-04 I 4 -1 12 \N \N \N \N 0.00000000 f 223 331 10 302 1.00000000 0.0000 \N 2008-06-12 2100-01-01 f M t initial 2008-06-12 I 4 -1 12 \N \N \N \N 0.00000000 f 220 331 20 301 0.01000000 0.0000 \N 2008-06-12 2100-01-01 f M t initial 2008-06-12 N 8 -1 12 12 Bright Yellow \N \N 0.00000000 f 224 331 30 325 0.01000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2008-06-12 N 8 -1 12 12 Neon Yellow \N \N 0.00000000 f 226 331 80 330 3.00000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2008-06-12 N 4 -1 13 20 PUSCH Racing Logo \N \N 0.00000000 f 225 331 70 329 2.00000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2008-06-12 N 4 -1 13 20 FASCAR Racing Logo \N \N 0.00000000 f 227 331 50 332 0.00100000 0.0000 \N 1970-01-01 2100-01-01 f M f 2008-06-12 N 8 -1 12 19 Gloss Coat \N \N 0.00000000 f 221 331 60 303 4.00000000 0.0000 \N 2008-06-12 2100-01-01 f M t initial 2008-06-12 I 4 -1 13 \N \N \N \N 0.00000000 f 237 334 10 305 1.00000000 0.0000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 1 \N \N \N \N 0.00000000 f 238 334 20 306 1.00000000 0.1000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 1 \N \N \N \N 0.00000000 f 240 316 50 334 1.00000000 0.0000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 17 \N \N \N \N 0.00000000 f 242 310 50 334 1.00000000 0.0000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 7 \N \N \N \N 0.00000000 f 243 300 50 334 1.00000000 0.0000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 14 \N \N \N \N 0.00000000 f 244 328 50 334 1.00000000 0.0000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 14 \N \N \N \N 0.00000000 f 245 331 90 334 1.00000000 0.0000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 14 \N \N \N \N 0.00000000 f 191 311 50 304 1.00000000 0.0000 \N 2006-10-13 2009-08-19 f M t 2006-10-13 I 4 -1 10 \N \N \N \N 0.00000000 f 199 316 50 304 1.00000000 0.0000 \N 2007-05-24 2009-08-19 f M t 2007-05-24 I 4 -1 17 \N \N \N \N 0.00000000 f 179 307 40 304 1.00000000 0.0000 \N 2006-01-09 2009-08-19 f M t 2006-01-10 I 4 -1 4 \N \N \N \N 0.00000000 f 187 310 50 304 1.00000000 0.0000 \N 2006-10-13 2009-08-19 f M t 2006-10-13 I 4 -1 7 \N \N \N \N 0.00000000 f 184 300 50 304 1.00000000 0.0000 \N 1970-01-01 2009-08-19 f M t 2006-08-30 I 4 -1 14 \N \N \N \N 0.00000000 f 218 328 50 304 1.00000000 0.0000 \N 2008-03-04 2009-08-19 f M t 2008-03-04 I 4 -1 14 \N \N \N \N 0.00000000 f 222 331 90 304 1.00000000 0.0000 \N 2008-06-12 2009-08-19 f M t 2008-06-12 I 4 -1 14 \N \N \N \N 0.00000000 f 190 311 50 303 4.00000000 0.0000 \N 2006-10-13 2100-01-01 f M t initial 2006-10-13 I 4 -1 11 \N \N \N \N 0.00000000 f 192 311 20 302 1.00000000 0.0000 \N 2006-10-13 2100-01-01 f M t initial 2006-10-13 I 4 -1 9 \N \N \N \N 0.00000000 f 204 311 70 313 2.00000000 0.0000 \N 2007-05-26 2007-05-30 t M f 2007-05-30 I 4 -1 11 \N \N \N \N 0.00000000 f 239 311 60 334 1.00000000 0.0000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 10 \N \N \N \N 0.00000000 f 177 307 30 301 0.01000000 0.0000 \N 2006-01-09 2009-09-16 f M t initial 2006-01-10 I 8 -1 5 \N \N \N \N 0.00000000 f 254 310 30 301 0.01000000 0.0000 \N 2006-12-22 2009-09-15 f M t initial 2009-09-16 I 8 -1 6 \N \N 0.00000000 f 241 307 50 334 1.00000000 0.0000 \N 2009-08-19 2100-01-01 f M t 2009-08-19 I 4 -1 4 \N \N \N \N 0.00000000 f 246 311 10 336 0.01000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2009-09-16 I 8 -1 9 \N \N 0.00000000 f 261 316 60 317 1.00000000 0.0000 \N 2010-06-07 2100-01-01 f M f 2.1 2010-06-07 I 4 -1 16 \N \N \N \N 0.00000000 f 262 316 70 321 4.00000000 0.0000 \N 2010-06-07 2100-01-01 f M f 2010-06-07 I 4 -1 16 \N \N \N \N 0.00000000 f 263 316 80 313 1.00000000 0.0000 \N 2010-06-07 2100-01-01 t M f 2010-06-07 I 4 -1 16 \N \N \N \N 0.00000000 f 264 316 50 334 1.00000000 0.0000 \N 2010-06-07 2010-06-07 f M t 2010-06-07 I 4 -1 17 \N \N 0.00000000 f 266 345 30 344 1.00000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2010-06-07 I 4 -1 -1 \N \N 0.00000000 f 257 345 10 305 1.00000000 0.0000 \N 2007-09-12 2010-05-08 f M f 2010-06-07 I 4 -1 -1 \N \N 0.00000000 f 265 316 90 345 1.00000000 0.0000 \N 2010-06-07 2100-01-01 f M f 15004 2010-06-07 I 4 -1 16 \N \N 0.00000000 f 206 307 60 313 2.00000000 0.0000 \N 2007-05-16 2007-05-30 t M f 2007-05-30 I 4 -1 3 \N \N \N \N 0.00000000 f 247 307 10 337 0.01000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2009-09-16 I 8 -1 5 \N \N 0.00000000 f 178 307 40 303 4.00000000 0.0000 \N 2006-01-09 2100-01-01 f M t initial 2006-01-10 I 4 -1 3 \N \N \N \N 0.00000000 f 176 307 20 302 1.00000000 0.0000 \N 2006-01-09 2100-01-01 f M t initial 2006-01-10 I 4 -1 5 \N \N \N \N 0.00000000 f 193 311 30 301 0.01000000 0.0000 \N 2006-10-13 2009-09-15 f M t initial 2009-09-16 I 8 -1 9 \N \N 0.00000000 f 255 310 60 334 1.00000000 0.0000 \N 2009-09-16 2100-01-01 f M t 2009-09-16 I 4 -1 7 \N \N \N \N 0.00000000 f 256 310 10 335 0.01000000 0.0000 \N 1970-01-01 2100-01-01 f M f 2009-09-16 I 8 -1 6 \N \N 0.00000000 f 252 310 50 303 4.00000000 0.0000 \N 2009-09-16 2100-01-01 f M t initial 2009-09-16 I 4 -1 8 \N \N \N \N 0.00000000 f 253 310 20 302 1.00000000 0.0000 \N 2009-09-16 2100-01-01 f M t initial 2009-09-16 I 4 -1 6 \N \N \N \N 0.00000000 f 248 307 50 334 1.00000000 0.0000 \N 2009-09-16 2011-05-16 f M t 2009-09-16 I 4 -1 4 \N \N \N \N 0.00000000 f 249 307 10 337 0.01000000 0.0000 \N 2009-09-16 2011-05-16 f M f 2009-09-16 I 8 -1 5 \N \N 0.00000000 f 250 307 40 303 4.00000000 0.0000 \N 2009-09-16 2011-05-16 f M t initial 2009-09-16 I 4 -1 3 \N \N \N \N 0.00000000 f 251 307 20 302 1.00000000 0.0000 \N 2009-09-16 2011-05-16 f M t initial 2009-09-16 I 4 -1 5 \N \N \N \N 0.00000000 f \. -- -- Data for Name: bomitemcost; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bomitemcost (bomitemcost_id, bomitemcost_bomitem_id, bomitemcost_costelem_id, bomitemcost_lowlevel, bomitemcost_stdcost, bomitemcost_posted, bomitemcost_actcost, bomitemcost_updated, bomitemcost_curr_id) FROM stdin; \. -- -- Data for Name: bomitemsub; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bomitemsub (bomitemsub_id, bomitemsub_bomitem_id, bomitemsub_item_id, bomitemsub_uomratio, bomitemsub_rank) FROM stdin; 1 169 325 1.1500000000 1 2 216 325 1.1500000000 1 \. -- -- Data for Name: bomwork; Type: TABLE DATA; Schema: public; Owner: admin -- COPY bomwork (bomwork_id, bomwork_set_id, bomwork_seqnumber, bomwork_item_id, bomwork_item_type, bomwork_qtyper, bomwork_scrap, bomwork_status, bomwork_level, bomwork_parent_id, bomwork_effective, bomwork_expires, bomwork_stdunitcost, bomwork_actunitcost, bomwork_parent_seqnumber, bomwork_createwo, bomwork_issuemethod, bomwork_char_id, bomwork_value, bomwork_notes, bomwork_ref, bomwork_bomitem_id, bomwork_ecn, bomwork_qtyfxd, bomwork_qtyreq) FROM stdin; \. -- -- Data for Name: budghead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY budghead (budghead_id, budghead_name, budghead_descrip) FROM stdin; 1 Default Default budget for conversion \. -- -- Data for Name: budgitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY budgitem (budgitem_id, budgitem_budghead_id, budgitem_period_id, budgitem_accnt_id, budgitem_amount) FROM stdin; \. -- -- Data for Name: calhead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY calhead (calhead_id, calhead_type, calhead_name, calhead_descrip, calhead_origin) FROM stdin; 48 R YR_REL_BACK_5 History - 5 Years - Backward D 47 R WK_REL_FORW_8 8 Weeks Forward From Today D 49 R WK_REL_BACK_8 8 Weeks Backwards From Today D 51 R DY_REL_FORW_7 7 Days Forward D 50 R DY_REL_BACK_7 7 Days History Rel. Today E 53 A 2008 2008 Absolute-Month \N 54 A 2006 2006 Absolute-Month \N 52 A 2007 2007 Absolute-Month \N 55 A 2009 2009 Absolute-Month \N \. -- -- Data for Name: cashrcpt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cashrcpt (cashrcpt_id, cashrcpt_cust_id, cashrcpt_amount, cashrcpt_fundstype, cashrcpt_docnumber, cashrcpt_bankaccnt_id, cashrcpt_notes, cashrcpt_distdate, cashrcpt_salescat_id, cashrcpt_curr_id, cashrcpt_usecustdeposit, cashrcpt_void, cashrcpt_number, cashrcpt_docdate, cashrcpt_posted, cashrcpt_posteddate, cashrcpt_postedby, cashrcpt_applydate, cashrcpt_discount, cashrcpt_curr_rate) FROM stdin; 222 95 57937.50 W 123553 13 2009-10-13 -1 1 t f 10008 \N t 2009-10-13 jsmith 2009-10-13 0.00 1.000000 223 97 29381.94 W 23432423 15 2009-10-13 -1 3 t f 10009 \N t 2009-10-13 jsmith 2009-10-13 0.00 0.69444444444444444444 224 95 2025.00 W 12311266 13 2009-12-03 -1 1 t f 10010 \N t 2009-12-03 admin 2009-12-03 0.00 1.000000 214 97 48890.83 C 1231123 15 2009-09-21 -1 3 t f 10000 2009-09-21 t 2009-09-22 admin 2009-09-21 0.00 0.69444444444444444444 215 95 10000.00 C 32334 13 2009-09-22 1 1 t f 10001 \N t 2009-09-22 admin 2009-09-22 0.00 1.000000 216 95 5000.00 C 43234 13 2009-09-22 -1 1 f f 10002 \N t 2009-09-22 admin 2009-09-22 0.00 1.000000 225 95 115875.00 W 1238818 13 2009-12-03 -1 1 t f 10011 \N t 2009-12-03 admin 2009-12-03 0.00 1.000000 217 95 12500.00 C 32422 13 2009-09-22 -1 1 f f 10003 \N t 2009-09-22 admin 2009-09-22 0.00 1.000000 218 95 27500.00 W 12311231 13 2009-09-22 -1 1 t f 10004 \N t 2009-09-22 jsmith 2009-09-22 0.00 1.000000 219 95 50.00 C 101002 13 2009-09-25 -1 1 f f 10005 2009-09-25 t 2009-09-25 jsmith 2009-09-25 0.00 1.000000 220 95 75.00 C 42123 13 2009-09-25 -1 1 t f 10006 2009-09-25 t 2009-09-25 jsmith 2009-09-25 0.00 1.000000 221 95 191.25 C 1231244 13 2009-09-25 -1 1 t f 10007 2009-09-25 t 2009-09-25 jsmith 2009-09-25 0.00 1.000000 226 95 48510.00 C 12343388 13 2010-03-10 -1 1 t f 10012 \N t 2010-03-10 admin 2010-03-10 990.00 1.000000 241 95 125000.00 W 123112 13 2011-03-07 -1 1 t f 10026 \N t 2011-03-07 admin 2011-03-07 0.00 1.000000 227 95 11292.25 C 3423423 13 2010-03-12 -1 1 t f 10013 2010-03-12 t 2010-03-12 admin 2010-03-12 230.45 1.000000 228 95 2025.00 C 4234 13 2010-03-12 -1 1 t f 10014 2010-03-12 t 2010-03-12 admin 2010-03-12 0.00 1.000000 250 95 148500.00 W 123112 13 2011-06-03 -1 1 f f 10033 \N t 2011-06-03 admin 2011-06-03 2970.00 1.000000 243 97 50000.00 W 123112 15 2011-03-07 -1 3 t f 10027 \N t 2011-03-07 admin 2011-03-07 0.00 0.62111801242236024845 229 97 31275.33 C 12311 15 2010-04-02 -1 3 t f 10015 2010-04-02 t 2010-04-02 admin 2010-04-02 638.27 0.61728395061728395062 231 95 99000.00 C 123112 13 2010-09-07 -1 1 t f 10016 \N t 2010-09-07 admin 2010-09-07 0.00 1.000000 251 97 160559.00 W 12311 15 2011-05-31 -1 3 f f 10034 \N t 2011-06-03 admin 2011-05-31 3211.18 0.62111801242236024845 232 95 148500.00 C 543433 13 2010-07-29 -1 1 t f 10017 2010-07-29 t 2010-09-07 admin 2010-09-07 0.00 1.000000 233 95 198000.00 C 321322 13 2010-08-30 -1 1 t f 10018 2010-08-30 t 2010-09-07 admin 2010-09-07 0.00 1.000000 252 97 111571.42 W 123111 15 2011-06-03 -1 3 t f 10035 \N t 2011-06-03 admin 2011-06-03 0.00 0.62111801242236024845 234 95 52937.50 C 1231231 13 2010-08-15 -1 1 t f 10019 2010-08-15 t 2010-09-08 admin 2010-08-15 0.00 1.000000 245 95 175000.00 W 989182 13 2011-03-07 -1 1 t f 10028 \N t 2011-03-07 admin 2011-03-07 344.77 1.000000 235 97 83666.46 C 43341 15 2010-09-08 -1 3 t f 10020 \N t 2010-09-08 admin 2010-09-08 1707.48 0.61728395061728395062 246 95 222686.28 W 387871 13 2011-04-18 -1 1 t f 10029 \N t 2011-04-18 admin 2011-04-18 0.00 1.000000 236 95 30000.00 C 32123 13 2010-11-04 -1 1 t f 10021 \N t 2010-11-04 admin 2010-11-04 200.00 1.000000 238 97 853.74 C 12311 15 2010-11-04 -1 3 t f 10023 \N t 2010-11-04 admin 2010-11-04 17.07 0.61728395061728395062 247 97 22182.93 W 42323 15 2011-04-18 -1 3 t f 10030 \N t 2011-04-18 admin 2011-04-18 0.00 0.62111801242236024845 239 95 99000.00 W 423433 13 2010-12-30 -1 1 t f 10024 \N t 2010-12-30 admin 2010-12-30 0.00 1.000000 240 97 40000.00 C 15 2010-12-30 -1 3 t f 10025 \N t 2010-12-30 admin 2010-12-30 0.00 0.61728395061728395062 248 123 71504.52 W 45233 14 2011-04-18 -1 2 t f 10031 \N t 2011-04-18 admin 2011-04-18 1459.28 0.72463768115942028986 249 97 3323.53 W 23433 15 2011-04-18 -1 3 t f 10032 \N t 2011-04-18 admin 2011-04-18 67.83 0.62111801242236024845 \. -- -- Data for Name: cashrcptitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cashrcptitem (cashrcptitem_id, cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount, cashrcptitem_discount, cashrcptitem_applied) FROM stdin; 266 214 393 48890.83 0.00 t 269 217 396 10000.00 0.00 t 271 217 398 2500.00 0.00 t 272 218 399 27500.00 0.00 t 275 221 403 191.25 0.00 t 276 222 405 57937.50 0.00 t 277 223 404 29381.94 0.00 t 278 224 406 2025.00 0.00 t 279 225 407 115875.00 0.00 t 280 226 408 48510.00 990.00 t 282 227 410 11292.25 230.45 t 283 228 412 2025.00 0.00 t 285 229 414 31275.33 638.27 t 286 231 416 99000.00 0.00 t 288 232 419 148500.00 0.00 t 289 233 418 198000.00 0.00 t 290 234 422 52937.50 0.00 t 292 235 423 83666.46 1707.48 t 270 217 397 2500.00 0.00 f 268 216 395 5000.00 0.00 f 267 215 394 10000.00 0.00 f 274 220 402 75.00 0.00 f 273 219 401 50.00 0.00 f 293 236 426 9800.00 200.00 t 294 236 428 20200.00 0.00 f 295 238 425 836.67 17.07 t 296 238 430 17.07 0.00 f 297 239 417 99000.00 0.00 t 298 240 431 40000.00 0.00 t 299 241 433 103550.00 0.00 t 300 241 438 21450.00 0.00 f 301 243 432 7182.93 0.00 t 302 243 437 42817.07 0.00 t 303 245 435 3606.05 0.00 t 304 245 434 49500.00 0.00 t 305 245 436 105000.00 0.00 t 306 245 439 16893.95 344.77 t 307 246 439 222686.28 0.00 t 308 247 437 22182.93 0.00 t 310 248 441 71504.52 1459.28 t 313 249 442 3323.53 67.83 t 314 250 446 145530.00 2970.00 t 315 250 448 2970.00 0.00 f 316 251 450 157347.82 3211.18 t 317 251 452 3211.18 0.00 f 318 252 449 111571.42 0.00 t \. -- -- Data for Name: cashrcptmisc; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cashrcptmisc (cashrcptmisc_id, cashrcptmisc_cashrcpt_id, cashrcptmisc_accnt_id, cashrcptmisc_amount, cashrcptmisc_notes) FROM stdin; \. -- -- Data for Name: ccard; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ccard (ccard_id, ccard_seq, ccard_cust_id, ccard_active, ccard_name, ccard_address1, ccard_address2, ccard_city, ccard_state, ccard_zip, ccard_country, ccard_number, ccard_debit, ccard_month_expired, ccard_year_expired, ccard_type, ccard_date_added, ccard_lastupdated, ccard_added_by_username, ccard_last_updated_by_username) FROM stdin; 5 10 95 f \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 J3p\\317\\332#4\\207 m\\011\\244K\\333\\003)r \\216b\\214\\216"u\\177H `jb\\250\\204A\\314\\316 U\\217tDp\\230\\225\\241 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w V 2005-12-28 12:38:34.255053 2006-01-13 11:01:08.290173 jsmith jsmith 6 20 95 f \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 2\\236\\\\d\\017\\311\\202S Q \\012O\\215!\\345' \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f ZE\\306y\\341|\\3069 \\3278\\002\\367y\\221\\353\\363 V 2005-12-28 15:00:24.567592 2008-06-12 16:33:35.455292 jsmith jsmith 7 30 95 t N\\215\\324M\\\\a\\335\\0066#?\\376?\\236\\202\\304 \\233\\256\\220\\355-Jz\\255\\275\\217\\314\\230\\001\\314\\234\\011\\221\\205*j\\004tG1 g\\316\\247\\2125\\322\\277\\007\\004++\\362\\2716\\302W \\014\\200\\027N\\337\\363#\\010\\200\\011\\330\\203\\023c\\261\\322 2\\236\\\\d\\017\\311\\202S \\262\\015\\357\\356\\361\\036'\\277 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f ZE\\306y\\341|\\3069 \\217v\\325\\0039QN\\001 V 2008-06-12 16:33:55.904522 2008-06-12 16:33:55.904522 jsmith jsmith 8 40 95 t \\367F~\\032\\301KiQ\\357\\345;\\210\\344\\012\\340\\262 \\233\\256\\220\\355-Jz\\255\\275\\217\\314\\230\\001\\314\\234\\011\\221\\205*j\\004tG1 g\\316\\247\\2125\\322\\277\\007\\004++\\362\\2716\\302W \\014\\200\\027N\\337\\363#\\010\\200\\011\\330\\203\\023c\\261\\322 2\\236\\\\d\\017\\311\\202S \\262\\015\\357\\356\\361\\036'\\277 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f q|\\000\\032\\312\\235j\\313 \\3278\\002\\367y\\221\\353\\363 V 2008-10-02 09:03:48.93983 2008-10-02 09:11:20.569342 jsmith jsmith \. -- -- Data for Name: ccardaud; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ccardaud (ccardaud_id, ccardaud_ccard_id, ccardaud_ccard_seq_old, ccardaud_ccard_seq_new, ccardaud_ccard_cust_id_old, ccardaud_ccard_cust_id_new, ccardaud_ccard_active_old, ccardaud_ccard_active_new, ccardaud_ccard_name_old, ccardaud_ccard_name_new, ccardaud_ccard_address1_old, ccardaud_ccard_address1_new, ccardaud_ccard_address2_old, ccardaud_ccard_address2_new, ccardaud_ccard_city_old, ccardaud_ccard_city_new, ccardaud_ccard_state_old, ccardaud_ccard_state_new, ccardaud_ccard_zip_old, ccardaud_ccard_zip_new, ccardaud_ccard_country_old, ccardaud_ccard_country_new, ccardaud_ccard_number_old, ccardaud_ccard_number_new, ccardaud_ccard_debit_old, ccardaud_ccard_debit_new, ccardaud_ccard_month_expired_old, ccardaud_ccard_month_expired_new, ccardaud_ccard_year_expired_old, ccardaud_ccard_year_expired_new, ccardaud_ccard_type_old, ccardaud_ccard_type_new, ccardaud_ccard_last_updated, ccardaud_ccard_last_updated_by_username) FROM stdin; 1 5 \N 10 \N 95 \N t \N l\\272\\251\\024s\\344\\322j \N J3p\\317\\332#4\\207 \N m\\011\\244K\\333\\003)r \N \\216b\\214\\216"u\\177H \N `jb\\250\\204A\\314\\316 \N U\\217tDp\\230\\225\\241 \N \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \N \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \N f \N ZE\\306y\\341|\\3069 \N \\354\\315\\344\\021[\\223\\246w \N V 2005-12-28 12:38:34.255053 jsmith 2 5 10 10 95 95 t t l\\272\\251\\024s\\344\\322j \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 J3p\\317\\332#4\\207 J3p\\317\\332#4\\207 m\\011\\244K\\333\\003)r m\\011\\244K\\333\\003)r \\216b\\214\\216"u\\177H \\216b\\214\\216"u\\177H `jb\\250\\204A\\314\\316 `jb\\250\\204A\\314\\316 U\\217tDp\\230\\225\\241 U\\217tDp\\230\\225\\241 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\354\\315\\344\\021[\\223\\246w V V 2005-12-28 12:40:36.077514 jsmith 3 5 10 10 95 95 t t \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 J3p\\317\\332#4\\207 J3p\\317\\332#4\\207 m\\011\\244K\\333\\003)r m\\011\\244K\\333\\003)r \\216b\\214\\216"u\\177H \\216b\\214\\216"u\\177H `jb\\250\\204A\\314\\316 `jb\\250\\204A\\314\\316 U\\217tDp\\230\\225\\241 U\\217tDp\\230\\225\\241 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\354\\315\\344\\021[\\223\\246w V V 2005-12-28 12:42:20.793589 jsmith 4 5 10 10 95 95 t t \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 J3p\\317\\332#4\\207 J3p\\317\\332#4\\207 m\\011\\244K\\333\\003)r m\\011\\244K\\333\\003)r \\216b\\214\\216"u\\177H \\216b\\214\\216"u\\177H `jb\\250\\204A\\314\\316 `jb\\250\\204A\\314\\316 U\\217tDp\\230\\225\\241 U\\217tDp\\230\\225\\241 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\354\\315\\344\\021[\\223\\246w V V 2005-12-28 12:45:47.388653 jsmith 5 5 10 10 95 95 t t \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 J3p\\317\\332#4\\207 J3p\\317\\332#4\\207 m\\011\\244K\\333\\003)r m\\011\\244K\\333\\003)r \\216b\\214\\216"u\\177H \\216b\\214\\216"u\\177H `jb\\250\\204A\\314\\316 `jb\\250\\204A\\314\\316 U\\217tDp\\230\\225\\241 U\\217tDp\\230\\225\\241 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\354\\315\\344\\021[\\223\\246w V V 2005-12-28 12:50:46.680185 jsmith 6 6 \N 20 \N 95 \N t \N \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \N \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 \N +\\351\\263\\360\\006\\020\\305\\375 \N y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 \N 2\\236\\\\d\\017\\311\\202S \N Q \\012O\\215!\\345' \N \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \N \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \N f \N ZE\\306y\\341|\\3069 \N \\354\\315\\344\\021[\\223\\246w \N V 2005-12-28 15:00:24.567592 jsmith 7 6 20 20 95 95 t t \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 +\\351\\263\\360\\006\\020\\305\\375 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 2\\236\\\\d\\017\\311\\202S 2\\236\\\\d\\017\\311\\202S Q \\012O\\215!\\345' Q \\012O\\215!\\345' \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\354\\315\\344\\021[\\223\\246w V V 2005-12-28 15:01:17.664311 jsmith 8 5 10 10 95 95 t f \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 J3p\\317\\332#4\\207 J3p\\317\\332#4\\207 m\\011\\244K\\333\\003)r m\\011\\244K\\333\\003)r \\216b\\214\\216"u\\177H \\216b\\214\\216"u\\177H `jb\\250\\204A\\314\\316 `jb\\250\\204A\\314\\316 U\\217tDp\\230\\225\\241 U\\217tDp\\230\\225\\241 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\354\\315\\344\\021[\\223\\246w V V 2006-01-13 11:01:08.290173 jsmith 9 6 20 20 95 95 t t \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 2\\236\\\\d\\017\\311\\202S 2\\236\\\\d\\017\\311\\202S Q \\012O\\215!\\345' Q \\012O\\215!\\345' \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\354\\315\\344\\021[\\223\\246w V V 2006-01-13 11:01:30.327048 jsmith 10 6 20 20 95 95 t f \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 2\\236\\\\d\\017\\311\\202S 2\\236\\\\d\\017\\311\\202S Q \\012O\\215!\\345' Q \\012O\\215!\\345' \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\354\\315\\344\\021[\\223\\246w V V 2008-03-04 13:55:01.303273 jsmith 11 6 20 20 95 95 f t \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 2\\236\\\\d\\017\\311\\202S 2\\236\\\\d\\017\\311\\202S Q \\012O\\215!\\345' Q \\012O\\215!\\345' \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\354\\315\\344\\021[\\223\\246w \\3278\\002\\367y\\221\\353\\363 V V 2008-06-12 15:58:13.904141 jsmith 12 6 20 20 95 95 t t \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 2\\236\\\\d\\017\\311\\202S 2\\236\\\\d\\017\\311\\202S Q \\012O\\215!\\345' Q \\012O\\215!\\345' \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\3278\\002\\367y\\221\\353\\363 \\3278\\002\\367y\\221\\353\\363 V V 2008-06-12 16:16:50.490189 jsmith 13 6 20 20 95 95 t t \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 2\\236\\\\d\\017\\311\\202S 2\\236\\\\d\\017\\311\\202S Q \\012O\\215!\\345' Q \\012O\\215!\\345' \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\3278\\002\\367y\\221\\353\\363 \\3278\\002\\367y\\221\\353\\363 V V 2008-06-12 16:16:50.590829 jsmith 14 6 20 20 95 95 t f \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\241\\223\\372"\\347\\023\\236\\010tN+\\010j\\271\\273\\366 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 \\014,L\\261Z\\004\\222\\273wI\\355\\245\\302*p\\267 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 y\\020)\\006\\356r\\341+\\232\\356\\346.\\030\\035_\\261 2\\236\\\\d\\017\\311\\202S 2\\236\\\\d\\017\\311\\202S Q \\012O\\215!\\345' Q \\012O\\215!\\345' \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f ZE\\306y\\341|\\3069 ZE\\306y\\341|\\3069 \\3278\\002\\367y\\221\\353\\363 \\3278\\002\\367y\\221\\353\\363 V V 2008-06-12 16:33:35.455292 jsmith 15 7 \N 30 \N 95 \N t \N N\\215\\324M\\\\a\\335\\0066#?\\376?\\236\\202\\304 \N \\233\\256\\220\\355-Jz\\255\\275\\217\\314\\230\\001\\314\\234\\011\\221\\205*j\\004tG1 \N g\\316\\247\\2125\\322\\277\\007\\004++\\362\\2716\\302W \N \\014\\200\\027N\\337\\363#\\010\\200\\011\\330\\203\\023c\\261\\322 \N 2\\236\\\\d\\017\\311\\202S \N \\262\\015\\357\\356\\361\\036'\\277 \N \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \N \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 \N f \N ZE\\306y\\341|\\3069 \N \\217v\\325\\0039QN\\001 \N V 2008-06-12 16:33:55.904522 jsmith 16 8 \N 40 \N 95 \N t \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N f \N \N \N \N \N V 2008-10-02 09:03:48.93983 jsmith 17 8 40 40 95 95 t t \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N f f \N \N \N \N V V 2008-10-02 09:06:42.921758 jsmith 18 8 40 40 95 95 t t \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N f f \N \N \N \N V V 2008-10-02 09:06:42.955925 jsmith 19 8 40 40 95 95 t t \N \\367F~\\032\\301KiQ\\357\\345;\\210\\344\\012\\340\\262 \N \\233\\256\\220\\355-Jz\\255\\275\\217\\314\\230\\001\\314\\234\\011\\221\\205*j\\004tG1 \N g\\316\\247\\2125\\322\\277\\007\\004++\\362\\2716\\302W \N \\014\\200\\027N\\337\\363#\\010\\200\\011\\330\\203\\023c\\261\\322 \N 2\\236\\\\d\\017\\311\\202S \N \\262\\015\\357\\356\\361\\036'\\277 \N \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \N \N f f \N q|\\000\\032\\312\\235j\\313 \N \\3278\\002\\367y\\221\\353\\363 V V 2008-10-02 09:11:20.508258 jsmith 20 8 40 40 95 95 t t \\367F~\\032\\301KiQ\\357\\345;\\210\\344\\012\\340\\262 \\367F~\\032\\301KiQ\\357\\345;\\210\\344\\012\\340\\262 \\233\\256\\220\\355-Jz\\255\\275\\217\\314\\230\\001\\314\\234\\011\\221\\205*j\\004tG1 \\233\\256\\220\\355-Jz\\255\\275\\217\\314\\230\\001\\314\\234\\011\\221\\205*j\\004tG1 g\\316\\247\\2125\\322\\277\\007\\004++\\362\\2716\\302W g\\316\\247\\2125\\322\\277\\007\\004++\\362\\2716\\302W \\014\\200\\027N\\337\\363#\\010\\200\\011\\330\\203\\023c\\261\\322 \\014\\200\\027N\\337\\363#\\010\\200\\011\\330\\203\\023c\\261\\322 2\\236\\\\d\\017\\311\\202S 2\\236\\\\d\\017\\311\\202S \\262\\015\\357\\356\\361\\036'\\277 \\262\\015\\357\\356\\361\\036'\\277 \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \\337\\207\\000\\036y0\\302\\017\\304\\233\\244[J\\276\\300! \N \\227j\\355P\\347\\214\\210`y\\322\\256\\3125l&~'[\\310\\363BP\\\\\\356 f f q|\\000\\032\\312\\235j\\313 q|\\000\\032\\312\\235j\\313 \\3278\\002\\367y\\221\\353\\363 \\3278\\002\\367y\\221\\353\\363 V V 2008-10-02 09:11:20.569342 jsmith \. -- -- Data for Name: ccbank; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ccbank (ccbank_id, ccbank_ccard_type, ccbank_bankaccnt_id) FROM stdin; 4 P 13 1 A 13 2 D 13 3 M 13 5 V 13 \. -- -- Data for Name: ccpay; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ccpay (ccpay_id, ccpay_ccard_id, ccpay_cust_id, ccpay_amount, ccpay_auth, ccpay_status, ccpay_type, ccpay_auth_charge, ccpay_order_number, ccpay_order_number_seq, ccpay_r_avs, ccpay_r_ordernum, ccpay_r_error, ccpay_r_approved, ccpay_r_code, ccpay_r_message, ccpay_yp_r_time, ccpay_r_ref, ccpay_yp_r_tdate, ccpay_r_tax, ccpay_r_shipping, ccpay_yp_r_score, ccpay_transaction_datetime, ccpay_by_username, ccpay_curr_id, ccpay_ccpay_id) FROM stdin; 16 6 95 104.90 t D C A 40000 1 40000-1 SGS-005000: The server encountered a database error. DECLINED 2005-12-28 14:10:03 \N \N 0 2005-12-28 16:49:52.505285 jsmith 1 \N 20 6 95 997.50 f C C C 50008 1 NNN 50008-1 APPROVED 1234560003192121:NNN :100009309292: APPROVED 2006-01-09 07:02:01 0003192121 1136815015 \N \N 0 2006-01-09 09:54:02.774859 jsmith 1 \N 17 6 95 104.90 f C C A 40000 2 NNN 40000-2 APPROVED 1234560003031755:NNN :100009278151: APPROVED 2005-12-28 14:16:06 0003031755 1135804266 \N \N 0 2005-12-28 16:56:11.906559 jsmith 1 \N 18 6 95 9.99 f D C C 40000 3 40000-3 SGS-002300: This transaction was previously approved. DECLINED DUPLICATE APPROVED 2005-12-28 14:19:36 1135804476 \N \N 0 2005-12-28 16:59:18.283679 jsmith 1 \N 19 6 95 114.89 f C C C 40000 4 NNN 40000-4 APPROVED 1234560003031809:NNN :100009278170: APPROVED 2005-12-28 14:22:56 0003031809 1135804676 \N \N 0 2005-12-28 17:02:37.384347 jsmith 1 \N 22 6 95 104.90 f D C C 50009 1 50009-1 SGS-005003: The order already exists in the database. DUPLICATE 2006-01-09 07:54:07 \N \N 0 2006-01-09 10:46:12.764421 jsmith 1 \N 24 6 95 104.90 f C C C 50031 1 NNN 50031-1 APPROVED 1234560003192673:NNN :100009309363: APPROVED 2006-01-09 08:00:54 0003192673 1136818549 \N \N 0 2006-01-09 10:52:56.014269 jsmith 1 \N 23 6 95 104.90 f C C A 50009 2 NNN 50009-2 APPROVED 1234560003192610:NNN :100009309346: APPROVED 2006-01-09 07:54:28 0003192610 1136818162 \N \N 0 2006-01-09 10:46:29.418547 jsmith 1 \N 25 6 95 997.50 t X C A 50043 1 \N \N \N \N \N \N \N \N \N \N \N 0 2006-01-13 11:02:53.762333 jsmith 1 \N 26 6 95 997.50 t X C A 50043 2 \N \N \N \N \N \N \N \N \N \N \N 0 2006-01-13 11:04:04.523402 jsmith 1 \N 27 6 95 997.50 f X C C 50043 3 \N \N \N \N \N \N \N \N \N \N \N 0 2006-01-13 11:05:13.422812 jsmith 1 \N 28 6 95 997.50 f C C A 50043 4 NNN 50043-4 APPROVED 1234560003216021:NNN :100009323145: APPROVED 2006-01-13 08:59:47 0003216021 1137167679 \N \N 0 2006-01-13 11:51:43.930367 jsmith 1 \N 29 6 95 103.86 f C C A 40005 1 NNN 40005-1 APPROVED 1234560003216040:NNN :100009323812: APPROVED 2006-01-13 10:49:03 0003216040 1137174236 \N \N 0 2006-01-13 12:48:58.008 jsmith 1 \N 30 6 95 103.86 f C C C 50045 1 NNN 50045-1 APPROVED 1234560003216058:NNN :100009324195: APPROVED 2006-01-13 11:36:34 0003216058 1137177086 \N \N 0 2006-01-13 13:36:28.387 jsmith 1 \N 31 6 95 997.50 f C C C 50046 1 NNN 50046-1 APPROVED 1234560003216072:NNN :100009325017: APPROVED 2006-01-13 13:09:36 0003216072 1137182667 \N \N 0 2006-01-13 15:09:30.383 jsmith 1 \N 33 6 95 500.00 f D C C 50047 1 50047-1 SGS-005003: The order already exists in the database. DUPLICATE 2006-01-30 09:07:58 \N \N 0 2006-01-30 11:59:39.538476 jsmith 1 \N 34 6 95 500.00 f C C C 50148 1 NNN 50148-1 APPROVED 1234560003353787:NNN :100009404491: APPROVED 2006-01-30 09:14:21 0003353787 1138637345 \N \N 0 2006-01-30 12:06:01.556067 jsmith 1 \N 35 6 95 500.00 f X C C 50149 1 \N \N \N \N \N \N \N \N \N \N \N 0 2006-01-30 16:36:06.281219 jsmith 1 \N 54 7 95 1000.00 f C C C 199 1 passed 199 \N APPROVED 123111 \N \N \N \N \N \N \N 2008-10-02 09:13:21.509805 jsmith 1 \N \. -- -- Data for Name: char; Type: TABLE DATA; Schema: public; Owner: admin -- COPY "char" (char_id, char_name, char_items, char_options, char_attributes, char_lotserial, char_notes, char_customers, char_crmaccounts, char_addresses, char_contacts, char_opportunity, char_employees, char_mask, char_validator, char_incidents, char_type, char_order, char_search) FROM stdin; 12 I-COLOR t f f f Product Color f \N \N \N f f \N \N f 0 0 t 14 QA-RESULTS f f f t QA Test Results f \N \N \N f f \N \N f 0 0 t 19 I-FINISH t f f f Prdouct Finish f f f f f f \N \N f 0 0 t 20 I-DECAL t f f f Item Decal f f f f f f \N \N f 0 0 t 16 ACCNT-REGION f f f f Accounts Region Code f t f f f f \N \N f 0 0 t 15 ADR-STOP f f f f Stop Number f f t f f f \N \N f 0 0 t 17 CONTACT-BIRTHDAY f f f f Contact's Birthday f f f t f f \N \N f 0 0 t 21 CUST-VOLUME f f f f Customer Sales Volume t f f f f f \N \N f 0 0 t 22 OPPORTUNITY-RFP-NUM f f f f Opportunity RFP Number f f f f t f \N \N f 0 0 t 23 DEGREE f f f f Education - Degree f f f f f t \N \N f 0 0 t 24 ENGINEERING t f f f f f f f f f \N \N t 0 0 t \. -- -- Data for Name: charass; Type: TABLE DATA; Schema: public; Owner: admin -- COPY charass (charass_id, charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default, charass_price) FROM stdin; 2 I 307 12 PL126 t 0.0000 3 I 310 12 PL126 t 0.0000 4 I 311 12 PL126 t 0.0000 5 I 316 12 PL126 t 0.0000 6 I 325 12 PL226 t 0.0000 7 I 300 12 PL127 t 0.0000 8 I 300 19 Gloss t 0.0000 10 SI 617 12 PL127 f 0.0000 11 SI 617 19 Gloss f 0.0000 12 W 508 12 PL127 f 0.0000 13 W 508 19 Gloss f 0.0000 14 SI 618 12 PL127 f 0.0000 29 SI 620 12 PL127 f 0.0000 30 SI 620 19 Gloss f 0.0000 31 W 520 12 PL127 f 0.0000 32 W 520 19 Gloss f 0.0000 21 W 516 12 PL127 f 0.0000 22 W 516 19 Gloss f 0.0000 36 W 522 12 PL127 f 0.0000 23 SI 619 12 PL127 f 0.0000 24 SI 619 19 Gloss f 0.0000 37 W 522 19 Gloss f 0.0000 38 SI 621 12 PL127 f 0.0000 39 SI 621 19 Gloss f 0.0000 40 W 523 12 PL127 f 0.0000 41 SI 622 12 PL127 f 0.0000 42 SI 626 12 PL126 f 0.0000 61 SI 636 12 PL127 f 0.0000 62 SI 636 19 Gloss f 0.0000 63 W 534 12 PL127 f 0.0000 64 W 534 19 Gloss f 0.0000 65 SI 638 12 PL126 f 0.0000 66 W 536 12 PL126 f 0.0000 51 SI 630 12 PL127 f 0.0000 52 SI 630 19 Gloss f 0.0000 55 W 532 12 PL127 f 0.0000 56 W 532 19 Gloss f 0.0000 67 SI 639 12 PL126 f 0.0000 68 PI 503 12 PL226 f 0.0000 70 I 331 12 Bright Yellow t 1.0000 69 I 331 12 Neon Yellow f 1.5000 71 I 331 19 Flat t 0.0000 72 I 331 19 Gloss Coat f 1.0000 73 I 331 20 PUSCH Racing Logo t 1.0000 74 I 331 20 FASCAR Racing Logo f 2.0000 75 SI 640 12 Neon Yellow f 0.7197 76 SI 640 20 FASCAR Racing Logo f 0.9596 77 SI 640 19 Gloss Coat f 0.4798 78 W 537 12 Neon Yellow f 0.0000 79 W 537 20 FASCAR Racing Logo f 0.0000 80 W 537 19 Gloss Coat f 0.0000 81 SI 641 12 PL127 f 0.0000 82 SI 641 19 Gloss f 0.0000 85 SI 642 12 PL127 f 0.0000 86 SI 642 19 Gloss f 0.0000 87 SI 643 12 Neon Yellow f 1.3500 88 SI 643 20 FASCAR Racing Logo f 1.8000 89 SI 643 19 Gloss Coat f 0.9000 90 W 539 12 Neon Yellow f 0.0000 91 W 539 20 FASCAR Racing Logo f 0.0000 92 W 539 19 Gloss Coat f 0.0000 93 SI 644 12 Neon Yellow f 0.7121 94 SI 644 20 FASCAR Racing Logo f 0.9495 95 SI 644 19 Gloss Coat f 0.4747 96 W 541 12 Neon Yellow f 0.0000 97 W 541 20 FASCAR Racing Logo f 0.0000 98 W 541 19 Gloss Coat f 0.0000 99 SI 645 12 PL127 f 0.0000 100 SI 645 19 Gloss f 0.0000 101 W 542 12 PL127 f 0.0000 102 W 542 19 Gloss f 0.0000 103 SI 646 12 PL126 f 0.0000 104 W 544 12 PL126 f 0.0000 105 SI 647 12 Bright Yellow f 0.9000 106 SI 647 20 PUSCH Racing Logo f 0.9000 107 SI 647 19 Flat f 0.0000 108 W 548 12 Bright Yellow f 0.0000 109 W 548 20 PUSCH Racing Logo f 0.0000 110 W 548 19 Flat f 0.0000 115 SI 650 12 PL127 f 0.0000 116 SI 650 19 Gloss f 0.0000 117 W 550 12 PL127 f 0.0000 118 W 550 19 Gloss f 0.0000 123 PI 521 12 PL126 f 0.0000 124 SI 652 12 PL126 f 0.0000 125 SI 653 12 PL126 f 0.0000 126 SI 655 12 PL126 f 0.0000 127 I 333 12 PL126 f 0.0000 132 PI 524 12 PL126 f 0.0000 136 W 554 12 Neon Yellow f 0.0000 137 W 554 20 PUSCH Racing Logo f 0.0000 138 W 554 19 Gloss Coat f 0.0000 133 SI 668 12 Neon Yellow f 0.8011 134 SI 668 20 PUSCH Racing Logo f 0.5341 135 SI 668 19 Gloss Coat f 0.5341 141 W 555 12 PL127 f 0.0000 142 W 555 19 Gloss f 0.0000 143 SI 671 12 PL127 f 0.0000 144 SI 671 19 Gloss f 0.0000 145 PI 526 12 PL126 f 0.0000 147 PI 528 12 PL126 f 0.0000 146 PI 527 12 PL126 f 0.0000 148 SI 679 12 PL126 f 0.0000 149 SI 680 12 PL126 f 0.0000 150 SI 681 12 PL126 f 0.0000 157 W 559 12 PL127 f 0.0000 158 W 559 19 Gloss f 0.0000 155 SI 685 12 PL127 f 0.0000 156 SI 685 19 Gloss f 0.0000 159 PI 531 12 PL126 f 0.0000 160 SI 687 12 PL126 f 0.0000 176 CT 18 21 <10,000 per year t 0.0000 177 CT 18 21 10,000 - 50,000 per year f 0.0000 178 CT 18 21 >50,000 per year f 0.0000 179 PI 536 12 PL126 f 0.0000 180 PI 537 12 PL126 f 0.0000 181 PI 538 12 PL126 f 0.0000 182 SI 709 12 PL126 f 0.0000 183 SI 710 12 PL126 f 0.0000 184 SI 711 12 PL126 f 0.0000 48 I 328 12 PL127 t 0.0000 49 I 328 19 Flat t 0.0000 191 CT 19 21 <10,000 f 0.0000 192 CT 19 21 10,000 to 50,000 f 0.0000 193 CT 19 21 > 50,000 f 0.0000 194 SI 715 12 PL127 f 0.0000 195 SI 715 19 Flat f 0.0000 196 SI 717 12 PL127 f 0.0000 197 SI 717 19 Flat f 0.0000 198 SI 720 12 PL126 f 0.0000 199 SI 721 12 PL126 f 0.0000 200 SI 722 12 PL126 f 0.0000 201 SI 724 12 PL127 f 0.0000 202 SI 724 19 Gloss f 0.0000 203 W 562 12 PL127 f 0.0000 204 W 562 19 Gloss f 0.0000 255 SI 737 12 PL127 f 0.0000 256 SI 737 19 Gloss f 0.0000 214 TI 5 12 PL126 f 0.0000 215 TI 6 12 PL126 f 0.0000 216 TI 7 12 PL126 f 0.0000 217 TI 8 12 PL127 f 0.0000 218 TI 8 19 Gloss f 0.0000 219 TI 9 12 PL126 f 0.0000 220 TI 10 12 PL126 f 0.0000 221 TI 11 12 PL126 f 0.0000 222 TI 12 12 PL127 f 0.0000 223 TI 12 19 Gloss f 0.0000 229 W 566 12 PL127 f 0.0000 230 W 566 19 Gloss f 0.0000 224 TI 13 12 PL126 f 0.0000 225 TI 14 12 PL126 f 0.0000 226 TI 15 12 PL126 f 0.0000 227 TI 16 12 PL127 f 0.0000 228 TI 16 19 Gloss f 0.0000 257 W 576 12 PL127 f 0.0000 258 W 576 19 Gloss f 0.0000 259 SI 739 12 PL126 f 0.0000 236 TI 17 12 PL126 f 0.0000 237 TI 18 12 PL126 f 0.0000 238 TI 19 12 PL126 f 0.0000 239 SI 732 12 PL127 f 0.0000 240 SI 732 19 Gloss f 0.0000 241 W 570 12 PL127 f 0.0000 242 W 570 19 Gloss f 0.0000 244 W 574 12 PL126 f 0.0000 264 TI 31 12 PL127 f 0.0000 265 TI 31 19 Gloss f 0.0000 266 TI 32 12 PL127 f 0.0000 248 SI 735 12 PL126 f 0.0000 267 TI 32 19 Gloss f 0.0000 250 TI 23 12 PL127 f 0.0000 251 TI 23 19 Gloss f 0.0000 252 TI 24 12 PL127 f 0.0000 253 TI 24 19 Gloss f 0.0000 254 TI 25 12 PL126 f 0.0000 274 SI 743 12 PL127 f 0.0000 275 SI 743 19 Gloss f 0.0000 276 W 583 12 PL127 f 0.0000 277 W 583 19 Gloss f 0.0000 282 SI 749 12 PL127 f 0.0000 283 SI 749 19 Gloss f 0.0000 284 W 586 12 PL127 f 0.0000 285 W 586 19 Gloss f 0.0000 286 SI 751 12 PL127 f 0.0000 287 SI 751 19 Gloss f 0.0000 288 PI 578 12 PL127 f 0.0000 289 PI 578 19 Flat f 0.0000 290 QI 118 12 PL126 f 0.0000 291 W 588 12 PL126 f 0.0000 292 INCDT 3 24 Upgrade f 0.0000 300 INCDT 4 24 TSUB Update f 0.0000 301 PI 592 12 PL127 f 0.0000 302 PI 592 19 Gloss f 0.0000 303 SI 771 12 PL127 f 0.0000 304 SI 771 19 Gloss f 0.0000 305 SI 773 12 PL127 f 0.0000 306 SI 773 19 Gloss f 0.0000 307 W 598 12 PL127 f 0.0000 308 W 598 19 Gloss f 0.0000 309 W 600 12 PL126 f 0.0000 310 W 602 12 PL126 f 0.0000 315 SI 781 12 PL127 f 0.0000 316 SI 781 19 Gloss f 0.0000 317 W 605 12 PL127 f 0.0000 318 W 605 19 Gloss f 0.0000 319 C 95 21 <10,000 per year f 0.0000 320 EMP 1 23 BS Mechanical Engineering f 0.0000 325 C 123 21 > 50,000 f 0.0000 326 SI 789 12 PL126 f 0.0000 327 W 610 12 PL126 f 0.0000 328 W 612 12 PL126 f 0.0000 330 SI 795 12 PL126 f 0.0000 \. -- -- Data for Name: charopt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY charopt (charopt_id, charopt_char_id, charopt_value, charopt_order) FROM stdin; \. -- -- Data for Name: checkhead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY checkhead (checkhead_id, checkhead_recip_id, checkhead_recip_type, checkhead_bankaccnt_id, checkhead_printed, checkhead_checkdate, checkhead_number, checkhead_amount, checkhead_void, checkhead_replaced, checkhead_posted, checkhead_rec, checkhead_misc, checkhead_expcat_id, checkhead_for, checkhead_notes, checkhead_journalnumber, checkhead_curr_id, checkhead_deleted, checkhead_ach_batch, checkhead_curr_rate) FROM stdin; 105 78 V 13 t 2005-12-29 3005 49.00 f f t f f \N 2470 1 f \N 1.000000 100 78 V 13 t 2005-12-27 3000 247.94 t t f f f \N \N 1 f \N 1.000000 101 78 V 13 t 2005-12-27 3001 247.94 f f t f f \N 2291 1 f \N 1.000000 106 78 V 13 t 2006-01-09 3006 274.00 f f t f f \N 2492 1 f \N 1.000000 102 78 V 13 t 2005-12-27 3002 200.00 f f t f f \N 2317 1 f \N 1.000000 107 78 V 13 t 2006-01-09 3007 20.00 f f t f f \N 2522 1 f \N 1.000000 103 78 V 13 t 2005-12-29 3003 702.66 f f t f f \N 2439 1 f \N 1.000000 104 78 V 13 t 2005-12-29 3004 12789.00 f f t f f \N 2465 1 f \N 1.000000 108 78 V 13 t 2006-01-12 3008 200.00 f f t f f \N 3182 1 f \N 1.000000 109 78 V 13 t 2006-01-13 3009 24.50 f f t f f \N 3277 1 f \N 1.000000 110 78 V 13 t 2006-01-13 3010 24.50 f f t f f \N 3322 1 f \N 1.000000 111 78 V 13 t 2006-01-30 3011 24.50 f f t f f \N 3373 1 f \N 1.000000 112 78 V 13 t 2006-01-30 3012 25.00 f f t f f \N 3405 1 f \N 1.000000 113 78 V 13 t 2006-01-31 3013 25.00 f f t f f \N 3416 1 f \N 1.000000 114 78 V 13 t 2006-07-05 3014 49.00 f f t f f \N 3452 1 f \N 1.000000 116 79 V 13 t 2006-08-31 3016 2488.78 f f t f t 16 Office Supplies Please see Jean about this order 3512 1 f \N 1.000000 117 79 V 14 t 2006-10-11 5000 98.00 f f t f f \N 3526 2 f \N 0.778210 115 78 V 13 t 2006-07-05 3015 25.00 f f t f f \N 3483 1 f \N 1.000000 118 78 V 13 t 2006-10-13 3017 32.34 f f t f f \N 3539 1 f \N 1.000000 119 78 V 13 t 2006-12-05 3018 3417.00 f f t f t 17 Test Check Notes Test Check 3577 1 f \N 1.000000 123 78 V 13 t 2007-01-03 3021 8820.00 f f t f f \N 3625 1 f \N 1.000000 122 79 V 14 t 2006-12-28 5001 100.00 f f t f f \N 3593 2 f \N 0.778210 121 78 V 13 t 2006-12-28 3020 100.00 f f t f f \N 3594 1 f \N 1.000000 120 78 V 13 t 2006-12-05 3019 8840.00 f f t f f \N 3595 1 f \N 1.000000 124 78 V 13 t 2007-02-20 3022 49.00 f f t f f \N 3646 1 f \N 1.000000 125 83 V 13 t 2007-02-20 3023 3000.00 f f t f t 16 Feb Office Supplies 3685 1 f \N 1.000000 127 83 V 13 t 2007-04-06 3024 1200.00 f f t f t 16 Office Supplies See Don 3712 1 f \N 1.000000 128 83 V 13 t 2007-04-06 3025 500.00 f f t f t 17 Shipping Service Payment Shipping Service Payment 3713 1 f \N 1.000000 126 79 V 14 t 2007-02-20 5002 100.00 f f t f t 17 Shipping Charges 3686 2 f \N 0.778210 130 83 V 13 t 2007-05-30 3027 399.00 f f t f f \N 3735 1 f \N 1.000000 129 78 V 13 t 2007-05-30 3026 3842.50 f f t f f \N 3736 1 f \N 1.000000 131 79 V 14 t 2007-05-30 5003 0.88 f f t f f \N 3737 2 f \N 0.778210 134 87 V 13 t 2007-05-30 3029 25.00 f f t f f \N 3913 1 f \N 1.000000 133 85 V 13 t 2007-05-30 3028 10.00 f f t f f \N 3914 1 f \N 1.000000 140 78 V 13 t 2007-09-21 3035 367.50 f f t f f \N 3973 1 f \N 1.000000 137 87 V 13 t 2007-08-03 3032 100.00 f f t f f \N 3920 1 f \N 1.000000 136 83 V 13 t 2007-08-03 3031 1200.00 f f t f f \N 3921 1 f \N 1.000000 138 78 V 13 t 2007-08-31 3033 24.50 f f t f f \N 3935 1 f \N 1.000000 139 78 V 13 t 2007-08-31 3034 100.00 f f t f t 15 Purchase Special Mold Purchase Special Mold - see Frank 3963 1 f \N 1.000000 141 78 V 13 t 2007-12-14 3036 1225.00 f f t f f \N 4019 1 f \N 1.000000 132 79 V 14 t 2007-05-30 5004 22.88 f f t f f \N 4022 2 f \N 0.778210 142 79 V 14 t 2007-12-14 5005 1258.56 f f t f f \N 4022 2 f \N 0.778210 143 78 V 13 t 2008-03-04 3037 269.50 f f t f f \N 4105 1 f \N 1.000000 145 78 V 13 t 2008-03-05 3038 34.30 f f t f f \N 4191 1 f \N 1.000000 146 78 V 13 t 2008-04-04 3039 1087.80 f f t f f \N 4254 1 f \N 1.000000 144 79 V 14 t 2008-03-04 5006 32.68 f f t f f \N 4174 2 f \N 0.778210 147 78 V 13 t 2008-06-18 3040 49.00 f f t f f \N 4658 1 f \N 1.000000 148 88 V 13 t 2008-06-18 3041 2548.00 f f t f f \N 4661 1 f \N 1.000000 149 79 V 14 t 2008-06-18 5007 138.10 f f t f f \N 4666 2 f \N 0.671141 150 78 V 13 t 2008-06-19 3042 6860.00 f f t f f \N 4683 1 f \N 1.000000 151 85 V 13 t 2008-06-19 3043 1078.00 f f t f f \N 4689 1 f \N 1.000000 152 78 V 13 t 2008-06-19 3044 3910.00 f f t f f \N 4778 1 f \N 1.000000 153 78 V 13 t 2008-06-20 3045 34.30 f f t f f \N 5085 1 f \N 1.000000 154 78 V 13 t 2008-09-08 3046 33500.00 f f t f f \N 5121 1 f \N 1.000000 157 1 T 13 t 2008-09-08 3048 300.00 f f t f t 19 MA-1001 5146 1 f \N 1.000000 156 2 T 13 t 2008-09-08 3049 200.00 f f t f t 18 MA-TX1 5147 1 f \N 1.000000 155 78 V 13 t 2008-09-08 3047 65660.00 f f t f f \N 5124 1 f \N 1.000000 158 78 V 13 t 2008-09-24 3052 539.00 f f t f f \N 5182 1 f \N 1.000000 159 88 V 13 t 2008-09-24 3053 1078.00 f f t f f \N 5185 1 f \N 1.000000 161 78 V 13 t 2008-10-02 4001 68.60 f f t f f \N 5259 1 f \N 1.000000 160 79 V 14 t 2008-10-02 5010 19600.00 f f t f f \N 5262 2 f \N 0.709220 163 85 V 13 t 2008-12-31 4002 89.18 f f t f f \N 5292 1 f \N 1.000000 162 78 V 13 t 2008-12-31 4003 24.50 f f t f f \N 5295 1 f \N 1.000000 164 78 V 13 t 2008-12-31 4004 49000.00 f f t f f \N 5326 1 f \N 1.000000 165 1 T 13 t 2008-12-31 4005 3881.18 f f t f t 19 Final 08 NC Sales Tax 5340 1 f \N 1.000000 166 2 T 13 t 2008-12-31 4006 8796.60 f f t f t 18 Final VA Sales Tax 08 5341 1 f \N 1.000000 167 88 V 13 t 2008-12-31 4007 50000.00 f f t f f \N 5347 1 f \N 1.000000 168 78 V 13 t 2009-01-06 4008 199.00 f f t f t 15 Shop Supplies 5349 1 f \N 1.000000 169 78 V 13 t 2009-01-12 4009 7820.40 t t f f f \N 5357 1 f \N 1.000000 170 78 V 13 t 2009-01-12 4010 7820.40 f f t f f \N \r\nReplaces voided check 4009 5358 1 f \N 1.000000 171 78 V 13 t 2009-01-12 4011 100.00 f f t f t 15 Special Service 5362 1 f \N 1.000000 173 92 V 13 t 2009-01-12 4012 1800.00 f f t f f \N 5384 1 f \N 1.000000 172 83 V 13 t 2009-01-12 4013 500.00 f f t f f \N 5385 1 f \N 1.000000 174 79 V 14 t 2009-05-12 5011 2000.00 f f t f f \N 5394 2 f \N 0.714286 175 78 V 13 t 2009-06-26 4014 196.00 f f t f f \N 5405 1 f \N 1.000000 176 88 V 14 t 2009-06-26 5012 24500.00 f f t f f \N 5448 2 f \N 0.714286 177 78 V 13 t 2009-08-13 4015 47138.00 f f t f f \N 5483 1 f \N 1.000000 178 78 V 13 t 2009-09-16 4016 51.50 f f t f f \N 5535 1 f \N 1.000000 179 78 V 13 t 2009-09-21 4021 147.00 t t f f f \N 5732 1 f \N 1.000000 180 88 V 13 t 2009-09-21 4022 307.23 t t f f f \N 5733 1 f \N 1.000000 181 79 V 15 f 2009-09-21 -1 1020.90 t f f f f \N 5734 3 t \N 0.694444 182 79 V 14 t 2009-09-21 5013 1071.50 f f t f f \N 5736 2 f \N 0.714286 194 79 V 14 t 2009-10-13 5014 1337.08 f f t f f \N 5923 2 f \N 0.714286 193 85 V 13 t 2009-10-13 4049 882.00 f f t f f \N 5926 1 f \N 1.000000 192 78 V 13 t 2009-10-13 4050 5390.00 f f t f f \N 5929 1 f \N 1.000000 184 78 V 13 t 2009-09-21 4026 147.00 t t f f f \N \r\nReplaces voided check 4021 5732 1 f \N 1.000000 183 88 V 13 t 2009-09-22 4027 783.06 t t f f f \N 5773 1 f \N 1.000000 185 88 V 13 t 2009-09-21 4028 307.23 t t f f f \N \r\nReplaces voided check 4022 5733 1 f \N 1.000000 195 78 V 13 t 2009-12-03 4051 15541.58 f f t f f \N 6077 1 f \N 1.000000 186 78 V 13 t 2009-09-21 4043 147.00 f f t f f \N \r\nReplaces voided check 4021\r\nReplaces voided check 4026 5787 1 f \N 1.000000 189 78 V 13 t 2009-09-24 4044 25000.00 f f t f f \N 5787 1 f \N 1.000000 187 88 V 13 t 2009-09-22 4045 783.06 f f t f f \N \r\nReplaces voided check 4027 5787 1 f \N 1.000000 188 88 V 13 t 2009-09-21 4046 307.23 f f t f f \N \r\nReplaces voided check 4022\r\nReplaces voided check 4028 5787 1 f \N 1.000000 190 88 V 13 t 2009-09-24 4047 34800.00 f f t f f \N 5787 1 f \N 1.000000 191 78 V 13 t 2009-09-25 4048 421.75 f f t f f \N 5829 1 f \N 1.000000 196 78 V 13 t 2010-01-06 -1 122.50 f f t f f \N 6096 1 f 00100000 1.000000 209 94 V 13 t 2010-09-07 4059 154000.00 f f t f f \N 6283 1 f \N 1.000000 197 94 V 13 t 2010-03-10 4052 22000.00 f f t f f \N 6108 1 f \N 1.000000 219 94 V 13 t 2011-04-18 4065 2400.00 f f t f f \N 6488 1 f \N 1.000000 218 85 V 13 t 2011-04-18 4066 392.00 f f t f f \N 6488 1 f \N 1.000000 198 78 V 13 t 2010-03-12 -1 204.00 f f t f f \N 6135 1 f 00100001 1.000000 199 92 V 13 t 2010-03-12 4053 1040.00 f f t f f \N 6135 1 f \N 1.000000 210 78 V 13 t 2010-08-30 -1 15600.00 f f t f f \N 6297 1 f 00100006 1.000000 200 78 V 13 t 2010-03-12 -1 91.82 f f t f f \N 6161 1 f 00100002 1.000000 211 78 V 13 t 2010-09-08 -1 17783.08 f f t f f \N 6306 1 f 00100007 1.000000 201 94 V 13 t 2010-04-02 4054 22000.00 f f t f f \N 6171 1 f \N 1.000000 220 94 V 13 t 2011-04-18 4068 22000.00 f f t f f \N 6492 1 f \N 1.000000 212 85 V 13 t 2010-09-13 4060 132.30 f f t f f \N 6336 1 f \N 1.000000 204 78 V 13 t 2010-06-07 -1 98.00 t t f f f \N 6187 1 f 00100003 1.000000 213 94 V 13 t 2010-11-04 4061 99500.00 f f t f f \N 6373 1 f \N 1.000000 221 85 V 13 t 2011-04-18 4069 980.00 f f t f f \N 6495 1 f \N 1.000000 205 78 V 13 t 2010-06-07 -1 98.00 f f t f f \N \r\nReplaces voided check -1 6188 1 f 00100004 1.000000 203 94 V 13 t 2010-06-07 4055 47500.00 f f t f f \N 6188 1 f \N 1.000000 202 88 V 13 t 2010-06-07 4056 980.00 f f t f f \N 6188 1 f \N 1.000000 214 79 V 14 t 2010-11-04 5015 30.51 f f t f f \N 6375 2 f \N 0.70422535211267605634 206 78 V 13 t 2010-09-07 -1 14300.00 f f t f f \N 6262 1 f 00100005 1.000000 207 85 V 13 t 2010-09-07 4057 1000.00 f f t f f \N 6262 1 f \N 1.000000 208 92 V 13 t 2010-09-07 4058 1930.00 f f t f f \N 6262 1 f \N 1.000000 223 94 V 13 t 2011-06-03 4070 69000.00 f f t f f \N 6524 1 f \N 1.000000 222 92 V 13 t 2011-06-03 4071 555.00 f f t f f \N 6524 1 f \N 1.000000 217 97 V 13 t 2011-03-07 4062 456.05 f f t f f \N 6436 1 f \N 1.000000 216 94 V 13 t 2011-03-07 4063 132500.00 f f t f f \N 6436 1 f \N 1.000000 215 92 V 13 t 2011-03-07 4064 1074.00 f f t f f \N 6436 1 f \N 1.000000 224 94 V 13 t 2011-05-27 4072 113000.00 f f t f f \N 6544 1 f \N 1.000000 225 94 V 13 t 2011-06-03 4073 77000.00 f f t f f \N 6545 1 f \N 1.000000 \. -- -- Data for Name: checkitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY checkitem (checkitem_id, checkitem_checkhead_id, checkitem_amount, checkitem_discount, checkitem_ponumber, checkitem_vouchernumber, checkitem_invcnumber, checkitem_apopen_id, checkitem_aropen_id, checkitem_docdate, checkitem_curr_id, checkitem_cmnumber, checkitem_ranumber, checkitem_curr_rate) FROM stdin; 256 100 246.96 0.00 20001 30000 \N 71 \N \N 1 \N \N \N 257 100 0.98 0.00 20002 30001 \N 72 \N \N 1 \N \N \N 258 101 246.96 0.00 20001 30000 \N 71 \N \N 1 \N \N \N 259 101 0.98 0.00 20002 30001 \N 72 \N \N 1 \N \N \N 260 102 200.00 0.00 Misc. 30002 \N 75 \N \N 1 \N \N \N 261 103 702.66 0.00 20003 30003 \N 76 \N \N 1 \N \N \N 262 104 12789.00 0.00 20004 30004 \N 78 \N \N 1 \N \N \N 263 105 49.00 0.00 20005 30005 \N 80 \N \N 1 \N \N \N 264 106 40.00 0.00 20006 30006 \N 82 \N \N 1 \N \N \N 265 106 50.00 0.00 20007 30007 \N 83 \N \N 1 \N \N \N 266 106 10.00 0.00 20008 30008 \N 84 \N \N 1 \N \N \N 267 106 100.00 0.00 20010 30010 \N 86 \N \N 1 \N \N \N 268 106 25.00 0.00 20011 30011 \N 87 \N \N 1 \N \N \N 269 106 49.00 0.00 20009 30009 \N 85 \N \N 1 \N \N \N 270 107 20.00 0.00 20012 30012 \N 89 \N \N 1 \N \N \N 271 108 200.00 0.00 20015 30013 \N 91 \N \N 1 \N \N \N 272 109 24.50 0.00 20016 30014 \N 92 \N \N 1 \N \N \N 273 110 24.50 0.00 20017 30015 \N 94 \N \N 1 \N \N \N 274 111 24.50 0.00 20018 30016 \N 96 \N \N 1 \N \N \N 275 112 25.00 0.00 20019 30017 \N 98 \N \N 1 \N \N \N 276 113 25.00 0.00 20020 30018 \N 99 \N \N 1 \N \N \N 280 118 32.34 0.00 20026 30022 \N 105 \N 2006-10-13 1 \N \N 1.000000 298 140 367.50 7.50 20037 30039 \N 126 \N 2007-09-21 1 \N \N 1.000000 297 138 24.50 0.50 20036 30038 \N 124 \N 2007-08-31 1 \N \N 1.000000 299 141 1225.00 25.00 20039 30040 VN01001 128 \N 2007-12-14 1 \N \N 1.000000 291 132 22.88 0.47 20034 30033 \N 119 \N 2007-05-30 2 \N \N 1.000000 300 142 1258.56 25.69 20038 30041 VN010010 129 \N 2007-12-14 2 \N \N 1.000000 277 114 49.00 0.00 20021 30019 \N 100 \N 2006-07-05 1 \N \N 1.000000 278 115 25.00 0.00 20022 30020 \N 102 \N 2006-07-05 1 \N \N 1.000000 279 117 98.00 0.00 20025 30021 \N 103 \N 2006-10-11 2 \N \N 1.000000 284 122 100.00 0.00 20029 30026 \N 110 \N 2006-12-28 2 \N \N 1.000000 283 121 100.00 0.00 20028 30025 \N 109 \N 2006-12-28 1 \N \N 1.000000 281 120 3417.00 0.00 Misc. 30023 \N 107 \N 2006-12-05 1 \N \N 1.000000 282 120 5423.00 0.00 Misc. 30024 \N 108 \N 2006-12-05 1 \N \N 1.000000 285 123 8820.00 0.00 Misc. 30027 \N 111 \N 2007-01-03 1 \N \N 1.000000 286 124 49.00 0.00 20030 30028 \N 113 \N 2007-02-20 1 \N \N 1.000000 289 130 399.00 0.00 Misc. 30032 \N 118 \N 2007-05-30 1 \N \N 1.000000 287 129 2.50 0.00 20031 30029 \N 115 \N 2007-05-30 1 \N \N 1.000000 288 129 3840.00 0.00 20032 30030 \N 116 \N 2007-05-30 1 \N \N 1.000000 290 131 0.88 0.00 20033 30031 \N 117 \N 2007-05-30 2 \N \N 1.000000 293 134 25.00 0.00 Misc. 30035 \N 121 \N 2007-05-30 1 \N \N 1.000000 292 133 10.00 0.00 20035 30034 \N 120 \N 2007-05-30 1 \N \N 1.000000 296 137 100.00 0.00 Misc. 30036 \N 122 \N 2007-06-04 1 \N \N 1.000000 295 136 1200.00 0.00 Misc. 30037 \N 123 \N 2007-07-04 1 \N \N 1.000000 301 143 269.50 5.50 20040 30042 MA_10001 133 \N 2008-03-04 1 \N \N 1.000000 303 145 34.30 0.70 20042 30044 1000100 137 \N 2008-03-05 1 \N \N 1.000000 304 146 1087.80 22.20 20043 30045 VN100 139 \N 2008-04-04 1 \N \N 1.000000 302 144 32.68 0.67 20041 30043 XP10010 135 \N 2008-03-04 2 \N \N 1.000000 305 147 49.00 1.00 20048 30051 VN10001 146 \N 2008-06-18 1 \N \N 1.000000 306 148 1274.00 26.00 20047 30049 VN10001 143 \N 2008-06-12 1 \N \N 1.000000 307 148 1274.00 26.00 20046 30048 123111 142 \N 2008-06-12 1 \N \N 1.000000 308 149 31.85 0.65 20049 30050 123111 145 \N 2008-06-18 2 \N \N 1.000000 309 149 56.25 0.00 20045 30047 -14-7-0712 144 \N 2008-05-29 2 \N \N 1.000000 310 149 50.00 0.00 20044 30046 NEG-7ID 141 \N 2008-06-05 2 \N \N 1.000000 311 150 6860.00 140.00 20050 30052 V10001 151 \N 2008-06-19 1 \N \N 1.000000 312 151 1078.00 22.00 20051 30053 VN-01001 153 \N 2008-06-19 1 \N \N 1.000000 313 152 2450.00 50.00 20053 30055 61661 156 \N 2008-06-19 1 \N \N 1.000000 314 152 1460.00 29.80 20052 30054 51551 155 \N 2008-06-19 1 \N \N 1.000000 315 153 34.30 0.70 20054 30056 300-1 159 \N 2008-06-20 1 \N \N 1.000000 316 154 33500.00 0.00 20055 30057 VN108871 161 \N 2008-08-01 1 \N \N 1.000000 317 155 65660.00 1340.00 20055 30058 VI-01002301 162 \N 2008-09-08 1 \N \N 1.000000 318 158 539.00 11.00 20057 30060 VN10019 164 \N 2008-09-24 1 \N \N 1.000000 319 159 1078.00 22.00 20056 30059 VN10019 165 \N 2008-09-24 1 \N \N 1.000000 321 161 68.60 1.40 20058 30061 VN1001001 168 \N 2008-10-02 1 \N \N 1.000000 320 160 19600.00 400.00 20059 30062 VN10010 169 \N 2008-10-02 2 \N \N 1.000000 322 162 24.50 0.50 20061 30063 VI01001 172 \N 2008-12-31 1 \N \N 1.000000 323 163 89.18 1.82 20060 30064 910091 173 \N 2008-12-31 1 \N \N 1.000000 324 164 49000.00 1000.00 20062 30065 MOB01 176 \N 2008-12-31 1 \N \N 1.000000 325 167 50000.00 0.00 Misc. 30066 1298491 178 \N 2008-11-01 1 \N \N 1.000000 326 169 7820.40 159.60 20063 30067 VN79801 179 \N 2009-01-12 1 \N \N 1.000000 327 170 7820.40 159.60 20063 30067 VN79801 179 \N 2009-01-12 1 \N \N 1.000000 328 172 500.00 0.00 Misc. 30068 VN1001 181 \N 2009-01-12 1 \N \N 1.000000 329 173 1800.00 0.00 Misc. 30069 UP10010 182 \N 2009-01-12 1 \N \N 1.000000 330 174 2000.00 0.00 20064 30070 1278781 183 \N 2009-01-30 2 \N \N 1.000000 331 175 196.00 4.00 20065 30071 1231231 184 \N 2009-06-26 1 \N \N 1.000000 332 176 24500.00 500.00 Misc. 30072 VN-10001 186 \N 2009-06-26 2 \N \N 1.000000 333 177 47138.00 962.00 20066 30073 12311 188 \N 2009-08-13 1 \N \N 1.000000 334 178 51.50 1.00 20067 30074 188771 190 \N 2009-09-16 1 \N \N 1.00000000000000000000 335 179 147.00 3.00 20068 30075 5334 192 \N 2009-09-21 1 \N \N 1.00000000000000000000 336 180 288.12 5.88 20069 30076 34234 193 \N 2009-09-21 1 \N \N 1.00000000000000000000 337 180 19.11 0.39 20070 30077 6234 194 \N 2009-09-21 1 \N \N 1.00000000000000000000 338 181 1050.07 21.43 20071 30078 745445 195 \N 2009-09-21 2 \N \N 1.02857249828639890330 339 182 1071.50 0.00 20071 30078 745445 195 \N 2009-09-21 2 \N \N 1.00000000000000000000 340 183 783.06 13.94 20072 30079 12312311 196 \N 2009-09-22 1 \N \N 1.00000000000000000000 341 184 147.00 3.00 20068 30075 5334 192 \N 2009-09-21 1 \N \N 1.00000000000000000000 342 185 288.12 5.88 20069 30076 34234 193 \N 2009-09-21 1 \N \N 1.00000000000000000000 343 185 19.11 0.39 20070 30077 6234 194 \N 2009-09-21 1 \N \N 1.00000000000000000000 344 186 147.00 3.00 20068 30075 5334 192 \N 2009-09-21 1 \N \N 1.00000000000000000000 345 187 783.06 13.94 20072 30079 12312311 196 \N 2009-09-22 1 \N \N 1.00000000000000000000 346 188 288.12 5.88 20069 30076 34234 193 \N 2009-09-21 1 \N \N 1.00000000000000000000 347 188 19.11 0.39 20070 30077 6234 194 \N 2009-09-21 1 \N \N 1.00000000000000000000 348 189 25000.00 500.00 20073 30081 537726 198 \N 2009-09-24 1 \N \N 1.00000000000000000000 349 190 34800.00 700.00 Misc. 30080 3020299 197 \N 2009-09-24 1 \N \N 1.00000000000000000000 350 191 421.75 10.65 20074 30082 6553435 206 \N 2009-09-25 1 \N \N 1.00000000000000000000 351 192 5390.00 110.00 20077 30085 234234 210 \N 2009-10-13 1 \N \N 1.00000000000000000000 352 193 882.00 18.00 20075 30083 56456456 208 \N 2009-10-13 1 \N \N 1.00000000000000000000 353 194 1337.08 27.29 20076 30084 324234 209 \N 2009-10-13 2 \N \N 1.00000000000000000000 354 195 712.00 0.00 20078 30086 GF193882 214 \N 2009-11-03 1 \N \N 1.00000000000000000000 355 195 4637.58 90.05 20079 30087 FG01001 215 \N 2009-12-03 1 \N \N 1.00000000000000000000 356 195 10192.00 200.00 20080 30088 TX01991 216 \N 2009-12-03 1 \N \N 1.00000000000000000000 357 196 122.50 2.50 20081 30089 43234 219 \N 2010-01-06 1 \N \N 1.00000000000000000000 358 197 22000.00 0.00 20082 30090 54234 221 \N 2010-03-10 1 \N \N 1.00000000000000000000 359 198 204.00 4.00 20083 30091 MA472771 222 \N 2010-03-12 1 \N \N 1.00000000000000000000 360 199 1040.00 0.00 Misc. 30092 223 \N 2010-03-12 1 \N \N 1.00000000000000000000 361 200 91.82 1.82 20084 30093 36661 225 \N 2010-03-12 1 \N \N 1.00000000000000000000 362 201 22000.00 0.00 20085 30094 MA1881 227 \N 2010-04-02 1 \N \N 1.00000000000000000000 363 202 980.00 20.00 Misc. 30096 W10881 228 \N 2010-06-07 1 \N \N 1.00000000000000000000 364 203 47500.00 0.00 20086 30095 IN4656256 229 \N 2010-06-07 1 \N \N 1.00000000000000000000 365 204 98.00 2.00 Misc. 30097 TP001 230 \N 2010-06-07 1 \N \N 1.00000000000000000000 366 205 98.00 2.00 Misc. 30097 TP001 230 \N 2010-06-07 1 \N \N 1.00000000000000000000 367 206 12600.00 0.00 20091 30098 1312213 236 \N 2010-06-07 1 \N \N 1.00000000000000000000 368 206 1700.00 0.00 20089 30100 1231123 235 \N 2010-06-07 1 \N \N 1.00000000000000000000 369 207 1000.00 0.00 20088 30101 12342222 234 \N 2010-06-07 1 \N \N 1.00000000000000000000 370 208 1930.00 0.00 Misc. 30102 U1002991 233 \N 2010-06-07 1 \N \N 1.00000000000000000000 371 209 88000.00 0.00 20093 30104 IN10019 237 \N 2010-07-15 1 \N \N 1.00000000000000000000 372 209 66000.00 0.00 20094 30105 87873 238 \N 2010-08-17 1 \N \N 1.00000000000000000000 373 210 15600.00 0.00 20095 30106 73776 239 \N 2010-08-10 1 \N \N 1.00000000000000000000 374 211 17783.08 362.92 20096 30107 36625 240 \N 2010-09-08 1 \N \N 1.00000000000000000000 375 212 132.30 2.70 20098 30108 MA01001 242 \N 2010-09-13 1 \N \N 1.00000000000000000000 376 213 55000.00 0.00 20099 30110 677623 245 \N 2010-11-04 1 \N \N 1.00000000000000000000 377 213 44500.00 0.00 20092 30109 244 \N 2010-11-04 1 \N \N 1.00000000000000000000 378 214 30.51 0.62 20100 30111 543343 246 \N 2010-11-04 2 \N \N 1.00000000000000000000 379 215 1074.00 0.00 Misc. 30116 US01001 250 \N 2011-03-07 1 \N \N 1.00000000000000000000 380 216 22500.00 0.00 20102 30112 3433 248 \N 2010-12-30 1 \N \N 1.00000000000000000000 381 216 110000.00 0.00 20103 30114 1231122 251 \N 2011-03-07 1 \N \N 1.00000000000000000000 382 217 456.05 0.00 Misc. 30113 N/A 249 \N 2010-12-30 1 \N \N 1.00000000000000000000 383 218 392.00 8.00 20106 30118 CR-10001 253 \N 2011-04-18 1 \N \N 1.00000000000000000000 384 219 2400.00 0.00 20097 30117 67623773 252 \N 2011-04-18 1 \N \N 1.00000000000000000000 385 220 22000.00 0.00 20104 30119 12311112 255 \N 2011-04-18 1 \N \N 1.00000000000000000000 386 221 980.00 20.00 20105 30120 256 \N 2011-04-18 1 \N \N 1.00000000000000000000 387 222 555.00 0.00 Misc. 30121 UX1001001 258 \N 2011-04-30 1 \N \N 1.00000000000000000000 388 223 69000.00 0.00 20107 30122 259 \N 2011-06-03 1 \N \N 1.00000000000000000000 389 224 113000.00 0.00 20109 30124 1099329 260 \N 2011-05-24 1 \N \N 1.00000000000000000000 390 225 77000.00 0.00 20108 30126 1091991 261 \N 2011-06-03 1 \N \N 1.00000000000000000000 \. -- -- Data for Name: classcode; Type: TABLE DATA; Schema: public; Owner: admin -- COPY classcode (classcode_id, classcode_code, classcode_descrip, classcode_mfg, classcode_creator, classcode_created, classcode_modifier, classcode_modified, classcode_type) FROM stdin; 34 TOYS-PLANES Toy Planes \N \N \N \N \N \N 35 TOYS-TRUCKS Toy Trucks \N \N \N \N \N \N 33 TOYS-CARS Toy Cars \N \N \N \N \N \N 36 TOYS-REPAIR Repair Toys \N \N \N \N \N \N 37 TOYS-COMP Toy Components \N \N \N \N \N \N 38 TOYS-OTHER Toys Other Items \N \N \N \N \N \N 39 SERVICES Services \N \N \N \N \N \N \. -- -- Data for Name: cmd; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cmd (cmd_id, cmd_module, cmd_title, cmd_descrip, cmd_privname, cmd_executable, cmd_name) FROM stdin; 4 Inventory Display Item Locations DisplayItemLocations !customuiform \N \. -- -- Data for Name: cmdarg; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cmdarg (cmdarg_id, cmdarg_cmd_id, cmdarg_order, cmdarg_arg) FROM stdin; 2 4 0 uiform=DisplayItemLocations \. -- -- Data for Name: cmhead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cmhead (cmhead_id, cmhead_number, cmhead_posted, cmhead_invcnumber, cmhead_custponumber, cmhead_cust_id, cmhead_docdate, cmhead_shipto_id, cmhead_shipto_name, cmhead_shipto_address1, cmhead_shipto_address2, cmhead_shipto_address3, cmhead_shipto_city, cmhead_shipto_state, cmhead_shipto_zipcode, cmhead_salesrep_id, cmhead_freight, cmhead_misc, cmhead_comments, cmhead_printed, cmhead_billtoname, cmhead_billtoaddress1, cmhead_billtoaddress2, cmhead_billtoaddress3, cmhead_billtocity, cmhead_billtostate, cmhead_billtozip, cmhead_hold, cmhead_commission, cmhead_misc_accnt_id, cmhead_misc_descrip, cmhead_rsncode_id, cmhead_curr_id, cmhead_freighttaxtype_id, cmhead_gldistdate, cmhead_billtocountry, cmhead_shipto_country, cmhead_rahead_id, cmhead_taxzone_id, cmhead_prj_id, cmhead_void, cmhead_saletype_id, cmhead_shipzone_id) FROM stdin; 209 70000 t -1 97 2007-12-14 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0000 0.0000 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA f 0.0750 \N 2 3 \N 2007-12-14 United Kingdom United Kingdom 4 \N \N f \N \N \. -- -- Data for Name: cmheadtax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cmheadtax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; \. -- -- Data for Name: cmitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cmitem (cmitem_id, cmitem_cmhead_id, cmitem_linenumber, cmitem_itemsite_id, cmitem_qtycredit, cmitem_qtyreturned, cmitem_unitprice, cmitem_comments, cmitem_rsncode_id, cmitem_taxtype_id, cmitem_qty_uom_id, cmitem_qty_invuomratio, cmitem_price_uom_id, cmitem_price_invuomratio, cmitem_raitem_id, cmitem_updateinv) FROM stdin; 84 209 1 293 1.000000 0.000000 5.2830 2 2 4 1.0000000000 4 1.0000000000 5 t \. -- -- Data for Name: cmitemtax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cmitemtax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; \. -- -- Data for Name: cmnttype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cmnttype (cmnttype_id, cmnttype_name, cmnttype_descrip, cmnttype_usedin, cmnttype_sys, cmnttype_editable, cmnttype_order) FROM stdin; 1 General General Comment ICVPL t f \N 2 ChangeLog Change Log ICVP t f \N 3 Sales Sales Related \N f t \N 5 Quote Quote Related \N f t \N 6 Complaint Customer Complaint \N f f \N 7 Prototype Prototype \N f t \N 8 QA Results:WO QA Results:WO \N f t \N 9 QA Results:PO QA Results:PO \N f t \N 10 Notes to Comment Used by certain triggers to automatically create/update comment with content of notes. \N t f \N \. -- -- Data for Name: cmnttypesource; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cmnttypesource (cmnttypesource_id, cmnttypesource_cmnttype_id, cmnttypesource_source_id) FROM stdin; 8 1 1 9 2 1 10 1 2 11 2 2 12 1 3 13 2 3 14 1 4 15 2 4 16 1 5 17 2 5 18 1 6 19 2 6 20 1 7 21 2 7 22 1 8 23 2 8 24 1 9 25 2 9 26 1 10 27 2 10 28 1 11 29 2 11 30 1 12 31 2 12 32 1 13 33 2 13 34 1 14 35 2 14 36 1 15 37 2 15 38 1 16 39 2 16 40 1 17 41 2 17 42 1 18 43 2 18 44 1 19 45 2 19 46 1 20 47 2 20 48 1 21 49 2 21 50 1 22 51 2 22 52 1 23 53 2 23 54 1 24 55 2 24 56 1 25 57 2 25 58 1 26 59 2 26 60 1 27 61 2 27 62 1 28 63 2 28 64 1 29 65 2 29 66 1 30 67 2 30 68 1 31 69 2 31 70 1 32 71 2 32 72 1 33 73 2 33 74 1 34 75 2 34 83 3 10 84 3 22 85 3 23 86 3 24 87 3 25 88 3 26 89 3 27 90 3 1 91 3 8 92 3 9 93 3 12 94 3 18 95 3 19 96 3 33 97 3 34 98 5 18 99 5 1 100 5 8 101 5 9 102 5 12 103 5 19 104 5 33 105 5 34 106 5 10 109 5 24 110 5 25 113 5 26 114 5 27 116 6 8 117 6 9 118 6 12 120 6 19 121 6 33 122 6 34 123 6 22 124 6 23 125 6 26 126 6 27 127 6 10 128 7 14 129 7 17 130 7 32 131 7 2 132 7 3 133 7 4 134 7 5 135 7 6 136 7 7 137 7 13 138 7 15 139 7 20 140 7 21 141 7 30 142 7 10 143 7 22 144 7 23 145 7 24 146 7 25 147 7 26 148 7 27 149 7 8 150 7 12 151 7 18 152 7 19 153 7 34 154 7 33 155 8 32 157 9 20 158 9 21 161 9 17 162 10 12 \. -- -- Data for Name: cntct; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cntct (cntct_id, cntct_crmacct_id, cntct_addr_id, cntct_first_name, cntct_last_name, cntct_honorific, cntct_initials, cntct_active, cntct_phone, cntct_phone2, cntct_fax, cntct_email, cntct_webaddr, cntct_notes, cntct_title, cntct_number, cntct_middle, cntct_suffix, cntct_owner_username, cntct_name) FROM stdin; 36 20 41 Arnold Waldheim Mr t 43 1-515180 aw@viennacollectibles.at viennacollectibles.at General Manager 34 \N Arnold Waldheim 32 19 40 Admin Admin Mr t 757-461-2203 aa@prodiem.com http://prodiem.xtuple.org/ Admin 30 \N Admin Admin 1 1 1 Mike Farley Mr t 703-931-4269 703-931-2212 mf@ttoys.com 1 admin Mike Farley 35 16 34 George Framble Mr t 480-321-4321 gf@gmfg.com Sales Rep 33 \N George Framble 4 2 4 Joe Stealt t 55-44-336-712-9855 336-712-9856 js@xtrm.com 4 admin Joe Stealt 8 1 7 Jake Sweet Mr t 800-321-5433 703-931-2212 js@ttoys.com 8 admin Jake Sweet 21 18 37 John Smith Mr t 703-965-5227 js@ttoys.com Administrator 20 \N John Smith 33 2 3 Karen Huffle Ms t 55-44-336-7122 kh@xtrm.com 31 \N Karen Huffle 9 3 8 Mary Field Miss t 800-321-9312 \N \N 9 \N \N \N Mary Field 6 4 6 Joe Packet Mr t 32-703-844-1212 jp@ppi.net \N \N 6 \N \N \N Joe Packet 7 4 6 Franco Venerie Ms t 32-703-844-1212 \N 7 \N \N \N Franco Venerie 14 5 \N Manny Ewel Mr t 404-555-1231 \N \N 14 \N \N \N Manny Ewel 15 5 \N Phil Farley Mr t 404-555-1231 \N \N 15 \N \N \N Phil Farley 16 7 \N Phil Tasker Mr t 757-870-1100 pt@cti.com \N \N 16 \N \N \N Phil Tasker 17 \N \N Susie Coltraine Miss t 336-321-9857 sc@ttoys.com \N \N 17 \N \N \N Susie Coltraine 22 11 \N Dale Fergus Mr t 432-781-1211 df@wc.com CSR 21 \N \N \N Dale Fergus 24 12 \N Raymond Perkins Mr t 804-561-2122 rjp@ups.com Account Manager 23 J Raymond J. Perkins 26 14 9 t 25 \N 25 13 28 Colin Kramer Mr CK t 440132 373 371 ck@worldtoys.co.uk Buyer 24 \N Colin Kramer 27 14 9 t 26 \N 28 \N \N Lindsay Holdcroft Mrs t 336-757-9812 lh@prodiem.com Store Manager 27 Lindsay Holdcroft 12 \N \N Jed Hastings Mr t 800-342-5657 800-342-1100 jh@prodiem.com \N 12 Jed Hastings 34 14 33 Frank Zane Mr t \N District Manager 32 L Frank L. Zane 19 10 \N Milly Van Eckleshoff Miss t 804-332-1211 VA IRS Taxpayer Service Rep. 19 Milly Van Eckleshoff 18 9 \N Rick Highland Mr t 336-321-2112 rh@ncirs.gov IRS Customer Service Rep 18 Rick Highland 29 \N \N Anna Perryman Miss t 757-893-2992 ap@prodiem.com Store Manager 28 Anna Perryman 5 3 5 Joe Tungsten Mr t 800-521-3122 800-555-3122 jt@tparts.com \N AR Service Rep. 5 Joe Tungsten 3 2 3 Fred Franklin t 44-336-712-9857 44-336-712-9857 ff@xtrm.com 3 admin Fred Franklin 2 1 2 Frank Farley Mr t 703-931-4268 703-931-2212 frankf@ttoys.com 2 admin Frank Farley \. -- -- Data for Name: cntctaddr; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cntctaddr (cntctaddr_id, cntctaddr_cntct_id, cntctaddr_primary, cntctaddr_addr_id, cntctaddr_type) FROM stdin; \. -- -- Data for Name: cntctdata; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cntctdata (cntctdata_id, cntctdata_cntct_id, cntctdata_primary, cntctdata_text, cntctdata_type) FROM stdin; \. -- -- Data for Name: cntcteml; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cntcteml (cntcteml_id, cntcteml_cntct_id, cntcteml_primary, cntcteml_email) FROM stdin; 1 1 t mf@ttoys.com 2 35 t gf@gmfg.com 3 32 t aa@prodiem.com 4 4 t js@xtrm.com 5 8 t js@ttoys.com 6 21 t js@ttoys.com 7 33 t kh@xtrm.com 8 6 t jp@ppi.net 9 16 t pt@cti.com 10 17 t sc@ttoys.com 11 22 t df@wc.com 12 24 t rjp@ups.com 13 25 t ck@worldtoys.co.uk 14 28 t lh@prodiem.com 15 12 t jh@prodiem.com 16 18 t rh@ncirs.gov 17 29 t ap@prodiem.com 18 5 t jt@tparts.com 19 3 t ff@xtrm.com 20 2 t frankf@ttoys.com 21 36 t aw@viennacollectibles.at \. -- -- Data for Name: cntctmrgd; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cntctmrgd (cntctmrgd_cntct_id, cntctmrgd_error) FROM stdin; \. -- -- Data for Name: cntctsel; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cntctsel (cntctsel_cntct_id, cntctsel_target, cntctsel_mrg_crmacct_id, cntctsel_mrg_addr_id, cntctsel_mrg_first_name, cntctsel_mrg_last_name, cntctsel_mrg_honorific, cntctsel_mrg_initials, cntctsel_mrg_phone, cntctsel_mrg_phone2, cntctsel_mrg_fax, cntctsel_mrg_email, cntctsel_mrg_webaddr, cntctsel_mrg_notes, cntctsel_mrg_title, cntctsel_mrg_middle, cntctsel_mrg_suffix, cntctsel_mrg_owner_username) FROM stdin; \. -- -- Data for Name: cntslip; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cntslip (cntslip_id, cntslip_cnttag_id, cntslip_entered, cntslip_posted, cntslip_number, cntslip_qty, cntslip_comments, cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, cntslip_username) FROM stdin; \. -- -- Data for Name: cobill; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cobill (cobill_id, cobill_coitem_id, cobill_selectdate, cobill_qty, cobill_invcnum, cobill_toclose, cobill_cobmisc_id, cobill_select_username, cobill_invcitem_id, cobill_taxtype_id) FROM stdin; 529 566 2005-12-27 00:00:00-05 100.000000 \N t 205 jsmith \N 2 538 573 2006-01-09 00:00:00-05 100.000000 \N t 214 jsmith \N 2 530 567 2005-12-27 00:00:00-05 5.000000 \N t 206 jsmith \N 2 539 574 2006-01-09 00:00:00-05 10.000000 \N t 215 jsmith \N 2 531 568 2005-12-27 00:00:00-05 1.000000 \N f 208 jsmith \N 2 540 575 2006-01-09 00:00:00-05 10.000000 \N t 216 jsmith \N 2 532 568 2005-12-27 00:00:00-05 1.000000 \N f 209 jsmith \N 2 541 576 2006-01-09 00:00:00-05 10.000000 \N t 217 jsmith \N 2 533 568 2005-12-27 00:00:00-05 2.000000 \N t 210 jsmith \N 2 534 569 2005-12-27 00:00:00-05 10.000000 \N t 211 jsmith \N 2 535 570 2005-12-29 00:00:00-05 10.000000 \N t 212 jsmith \N 2 536 571 2005-12-29 00:00:00-05 1.000000 \N t 212 jsmith \N 2 537 572 2005-12-29 00:00:00-05 369.000000 \N t 213 jsmith \N 2 546 581 2006-01-11 00:00:00-05 2.000000 \N f 218 jsmith \N 2 543 581 2006-01-11 00:00:00-05 1.000000 \N f 218 jsmith \N 2 545 579 2006-01-11 00:00:00-05 2.000000 \N f 218 jsmith \N 2 542 579 2006-01-11 00:00:00-05 1.000000 \N f 218 jsmith \N 2 547 580 2006-01-11 00:00:00-05 2.000000 \N f 218 jsmith \N 2 544 580 2006-01-11 00:00:00-05 1.000000 \N f 218 jsmith \N 2 548 582 2006-01-11 00:00:00-05 50.000000 \N t 219 jsmith \N 2 549 583 2006-01-11 00:00:00-05 10.000000 \N t 220 jsmith \N 2 550 585 2006-01-11 00:00:00-05 10.000000 \N t 221 jsmith \N 2 552 581 2006-01-12 00:00:00-05 7.000000 \N t 222 jsmith \N 2 551 579 2006-01-12 00:00:00-05 7.000000 \N t 222 jsmith \N 2 553 580 2006-01-12 00:00:00-05 7.000000 \N t 222 jsmith \N 2 554 587 2006-01-13 00:00:00-05 100.000000 \N t 223 jsmith \N 2 555 588 2006-01-13 00:00:00-05 10.000000 \N t 224 jsmith \N 2 556 591 2006-01-13 00:00:00-05 10.000000 \N t 225 jsmith \N 2 557 592 2006-01-13 00:00:00-05 100.000000 \N t 226 jsmith \N 2 558 594 2006-01-30 00:00:00-05 100.000000 \N t 227 jsmith \N 2 559 595 2006-01-30 00:00:00-05 100.000000 \N t 228 jsmith \N 2 561 596 2006-02-01 00:00:00-05 100.000000 \N t 229 jsmith \N 2 562 597 2006-07-05 00:00:00-04 100.000000 \N t 230 jsmith \N 2 564 598 2006-07-05 00:00:00-04 100.000000 \N t 231 jsmith \N 2 565 601 2006-10-13 00:00:00-04 100.000000 \N t 232 jsmith \N 2 566 604 2006-12-05 00:00:00-05 100.000000 \N t 233 mfgadmin \N 2 567 605 2006-12-28 00:00:00-05 100.000000 \N t 234 mfgadmin \N 2 568 607 2007-01-08 00:00:00-05 50.000000 60031 f 235 jsmith 36 2 569 607 2007-01-08 00:00:00-05 50.000000 60032 t 236 jsmith 37 2 570 609 2007-02-20 00:00:00-05 100.000000 60033 t 237 mfgadmin 38 2 572 612 2007-04-05 00:00:00-04 1000.000000 60035 t 239 jsmith 40 2 575 615 2007-05-30 00:00:00-04 100.000000 60037 t 240 mfgadmin 44 2 574 614 2007-05-30 00:00:00-04 100.000000 60037 t 240 mfgadmin 43 2 576 616 2007-05-30 00:00:00-04 100.000000 60037 t 240 mfgadmin 45 2 573 613 2007-05-30 00:00:00-04 100.000000 60037 t 240 mfgadmin 42 2 571 610 2007-02-20 00:00:00-05 100.000000 60034 t 238 mfgadmin 39 2 577 617 2007-05-30 00:00:00-04 100.000000 60040 t 241 mfgadmin 48 2 578 618 2007-05-30 00:00:00-04 100.000000 60040 t 241 mfgadmin 49 2 583 624 2007-12-14 00:00:00-05 10.000000 60046 t 245 mfgadmin 57 2 579 619 2007-08-31 00:00:00-04 100.000000 60042 t 242 mfgadmin 51 2 580 620 2007-09-21 00:00:00-04 100.000000 60043 t 243 mfgadmin 52 2 584 625 2007-12-14 00:00:00-05 1.000000 60046 t 245 mfgadmin 56 2 581 621 2007-12-14 00:00:00-05 5000.000000 60045 t 244 mfgadmin 55 2 582 622 2007-12-14 00:00:00-05 500.000000 60045 t 244 mfgadmin 54 2 586 627 2007-12-20 00:00:00-05 10.000000 60048 t 247 mfgadmin 59 \N 585 626 2007-12-14 00:00:00-05 2.000000 60047 t 246 mfgadmin 58 2 591 636 2008-03-05 00:00:00-05 100.000000 60052 t 251 jsmith 64 2 587 629 2008-03-04 00:00:00-05 3.000000 60049 t 248 jsmith 60 2 588 630 2008-03-04 00:00:00-05 100.000000 60049 t 248 jsmith 61 2 593 638 2008-04-04 00:00:00-04 1000.000000 60054 t 253 mfgadmin 66 2 589 633 2008-03-04 00:00:00-05 1.000000 60050 t 249 jsmith 62 2 592 637 2008-03-05 00:00:00-05 1.000000 60053 t 252 jsmith 65 2 590 635 2008-03-04 00:00:00-05 1.000000 60051 t 250 jsmith 63 2 594 639 2008-06-12 00:00:00-04 1.000000 60055 t 254 jsmith 67 2 595 640 2008-06-12 00:00:00-04 1.000000 60057 t 255 jsmith 69 2 596 641 2008-06-12 00:00:00-04 0.500000 60058 t 256 jsmith 70 2 597 642 2008-06-12 00:00:00-04 0.500000 60059 t 257 jsmith 71 2 598 643 2008-06-18 00:00:00-04 100.000000 60060 t 258 jsmith 72 2 599 644 2008-06-19 00:00:00-04 1000.000000 60061 t 259 jsmith 73 2 600 645 2008-06-19 00:00:00-04 1000.000000 60061 t 259 jsmith 74 2 601 646 2008-06-19 00:00:00-04 1000.000000 60061 t 259 jsmith 75 2 602 647 2008-06-19 00:00:00-04 99.000000 60062 t 260 jsmith 76 2 603 649 2008-06-20 00:00:00-04 1.000000 60063 t 261 jsmith 77 2 604 650 2008-06-20 00:00:00-04 100.000000 60064 t 262 jsmith 78 2 605 655 2008-09-08 00:00:00-04 3000.000000 60065 t 263 admin 79 2 606 653 2008-09-08 00:00:00-04 4000.000000 60066 t 264 admin 80 2 607 652 2008-09-08 00:00:00-04 3000.000000 60067 t 265 admin 81 2 608 659 2008-09-09 00:00:00-04 1.000000 60068 t 266 jsmith 82 2 609 660 2008-09-09 00:00:00-04 0.050000 60068 t 266 jsmith 87 \N 610 661 2008-09-09 00:00:00-04 4.000000 60068 t 266 jsmith 83 \N 611 662 2008-09-09 00:00:00-04 1.000000 60068 t 266 jsmith 84 \N 612 663 2008-09-09 00:00:00-04 4.000000 60068 t 266 jsmith 85 \N 613 664 2008-09-09 00:00:00-04 1.000000 60068 t 266 jsmith 86 \N 614 671 2008-10-02 00:00:00-04 100.000000 60069 t 267 jsmith 89 2 615 672 2008-10-02 00:00:00-04 3.000000 60069 t 267 jsmith 94 2 616 674 2008-10-02 00:00:00-04 5.000000 60069 t 267 jsmith 95 \N 617 675 2008-10-02 00:00:00-04 400.000000 60069 t 267 jsmith 90 \N 618 676 2008-10-02 00:00:00-04 100.000000 60069 t 267 jsmith 91 \N 619 677 2008-10-02 00:00:00-04 400.000000 60069 t 267 jsmith 92 \N 620 678 2008-10-02 00:00:00-04 100.000000 60069 t 267 jsmith 93 \N 621 673 2008-10-02 00:00:00-04 100.000000 60069 t 267 jsmith 88 2 622 668 2008-10-02 00:00:00-04 10.000000 60070 t 268 jsmith 96 2 623 679 2008-10-02 00:00:00-04 1100.000000 60071 t 269 jsmith 99 2 624 680 2008-10-02 00:00:00-04 1000.000000 60071 t 269 jsmith 98 2 625 681 2008-10-02 00:00:00-04 1000.000000 60071 t 269 jsmith 97 2 626 685 2008-12-31 00:00:00-05 100.000000 60073 t 270 jsmith 101 2 627 687 2008-12-31 00:00:00-05 5050.000000 60074 t 271 jsmith 102 2 630 711 2009-01-12 00:00:00-05 1000.000000 60076 t 272 jsmith 105 2 629 710 2009-01-12 00:00:00-05 1000.000000 60076 t 272 jsmith 106 2 628 709 2009-01-12 00:00:00-05 1000.000000 60076 t 272 jsmith 107 2 631 715 2009-01-12 00:00:00-05 1.000000 60077 t 273 jsmith 108 2 632 717 2009-01-12 00:00:00-05 1.000000 60078 t 274 jsmith 109 2 634 721 2009-06-26 00:00:00-04 300.000000 60080 t 275 admin 111 2 635 722 2009-06-26 00:00:00-04 400.000000 60080 t 275 admin 112 2 633 720 2009-06-26 00:00:00-04 300.000000 60080 t 275 admin 113 2 636 724 2009-08-13 00:00:00-04 10000.000000 60081 t 276 admin 114 2 637 732 2009-09-21 00:00:00-04 5000.000000 60082 t 277 admin 115 2 638 735 2009-09-25 00:00:00-04 10.000000 60085 t 278 jsmith 118 2 639 739 2009-10-13 00:00:00-04 1000.000000 60086 t 279 jsmith 119 2 640 737 2009-10-13 00:00:00-04 5000.000000 60087 t 280 jsmith 120 2 641 743 2009-12-03 00:00:00-05 10000.000000 60089 t 281 admin 122 2 642 747 2010-03-10 00:00:00-05 1000.000000 60090 t 282 admin 123 \N 644 751 2010-03-12 00:00:00-05 5.000000 60091 t 283 admin 124 2 643 749 2010-03-12 00:00:00-05 1000.000000 60091 t 283 admin 125 2 645 754 2010-03-12 00:00:00-05 1.000000 60093 t 284 admin 127 2 646 756 2010-04-02 00:00:00-04 1000.000000 60094 t 285 admin 128 \N 647 758 2010-06-07 00:00:00-04 2000.000000 60095 t 286 admin 129 \N 648 765 2010-09-07 00:00:00-04 2000.000000 60096 t 287 admin 130 \N 649 767 2010-09-07 00:00:00-04 4000.000000 60097 t 288 admin 131 \N 650 769 2010-09-07 00:00:00-04 3000.000000 60098 t 289 admin 132 \N 651 771 2010-09-08 00:00:00-04 5000.000000 60099 t 290 admin 133 2 652 773 2010-09-08 00:00:00-04 10000.000000 60100 t 291 admin 134 2 654 781 2010-11-04 00:00:00-04 100.000000 60101 t 293 admin 135 2 655 783 2010-12-30 00:00:00-05 1000.000000 60105 t 294 admin 139 \N 653 779 2010-11-04 00:00:00-04 2500.000000 60106 t 292 admin 140 \N 657 785 2011-03-07 00:00:00-05 5000.000000 60110 t 296 admin 146 2 663 799 2011-06-03 00:00:00-04 7000.000000 60115 t 301 admin 152 \N 659 791 2011-04-18 00:00:00-04 1000.000000 60111 t 298 admin 148 \N 660 789 2011-04-18 00:00:00-04 1000.000000 60111 t 298 admin 148 2 658 775 2011-04-18 00:00:00-04 100.000000 60112 t 297 admin 149 \N 661 797 2011-06-03 00:00:00-04 3000.000000 60114 t 299 admin 151 \N 664 801 2011-06-03 00:00:00-04 5000.000000 60116 t 302 admin 153 \N \. -- -- Data for Name: cobilltax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cobilltax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; 1 621 2 16 2700.00 \N 0 0.050000 0.00 135.000000 2008-10-02 2008-10-02 1 1.000000 \N 2 597 2 16 490.00 \N 0 0.050000 0.00 24.500000 2008-06-12 2008-06-12 1 1.000000 \N 3 559 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-30 2006-01-30 1 1.000000 \N 4 561 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-02-01 2006-02-01 1 1.000000 \N 5 562 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-07-05 2006-07-05 1 1.000000 \N 6 564 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-07-05 2006-07-05 1 1.000000 \N 7 565 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-10-13 2006-10-13 1 1.000000 \N 8 566 2 16 989.10 \N 0 0.050000 0.00 49.460000 2006-12-05 2006-12-05 1 1.000000 \N 9 567 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-12-28 2006-12-28 1 1.000000 \N 10 569 2 16 494.55 \N 0 0.050000 0.00 24.730000 2007-01-08 2007-01-08 1 1.000000 \N 11 568 2 16 494.55 \N 0 0.050000 0.00 24.730000 2007-01-08 2007-01-08 1 1.000000 \N 12 572 2 16 9250.00 \N 0 0.050000 0.00 462.500000 2007-04-05 2007-04-05 1 1.000000 \N 13 571 2 16 950.00 \N 0 0.050000 0.00 47.500000 2007-02-20 2007-02-20 1 1.000000 \N 14 575 2 16 989.10 \N 0 0.050000 0.00 49.460000 2007-05-30 2007-05-30 1 1.000000 \N 15 576 2 16 989.10 \N 0 0.050000 0.00 49.460000 2007-05-30 2007-05-30 1 1.000000 \N 16 574 2 16 989.10 \N 0 0.050000 0.00 49.460000 2007-05-30 2007-05-30 1 1.000000 \N 17 573 2 16 4050.00 \N 0 0.050000 0.00 202.500000 2007-05-30 2007-05-30 1 1.000000 \N 18 580 2 16 950.00 \N 0 0.050000 0.00 47.500000 2007-09-21 2007-09-21 1 1.000000 \N 19 538 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-09 2006-01-09 1 1.000000 \N 20 529 2 16 950.00 \N 0 0.050000 0.00 47.500000 2005-12-27 2005-12-27 1 1.000000 \N 21 539 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-09 2006-01-09 1 1.000000 \N 22 530 2 16 49.95 \N 0 0.050000 0.00 2.500000 2005-12-27 2005-12-27 1 1.000000 \N 23 540 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-09 2006-01-09 1 1.000000 \N 24 533 2 16 19.98 \N 0 0.050000 0.00 1.000000 2005-12-27 2005-12-27 1 1.000000 \N 25 532 2 16 9.99 \N 0 0.050000 0.00 0.500000 2005-12-27 2005-12-27 1 1.000000 \N 26 531 2 16 9.99 \N 0 0.050000 0.00 0.500000 2005-12-27 2005-12-27 1 1.000000 \N 27 541 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-09 2006-01-09 1 1.000000 \N 28 534 2 16 99.90 \N 0 0.050000 0.00 5.000000 2005-12-27 2005-12-27 1 1.000000 \N 29 536 2 16 9.99 \N 0 0.050000 0.00 0.500000 2005-12-29 2005-12-29 1 1.000000 \N 30 537 2 16 3505.50 \N 0 0.050000 0.00 175.280000 2005-12-29 2005-12-29 1 1.000000 \N 31 548 2 16 499.50 \N 0 0.050000 0.00 24.980000 2006-01-11 2006-01-11 1 1.000000 \N 32 549 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-11 2006-01-11 1 1.000000 \N 33 550 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-11 2006-01-11 1 1.000000 \N 34 552 2 16 69.24 \N 0 0.050000 0.00 3.460000 2006-01-12 2006-01-12 1 1.000000 \N 35 543 2 16 9.89 \N 0 0.050000 0.00 0.490000 2006-01-11 2006-01-11 1 1.000000 \N 36 546 2 16 19.78 \N 0 0.050000 0.00 0.990000 2006-01-11 2006-01-11 1 1.000000 \N 37 551 2 16 69.24 \N 0 0.050000 0.00 3.460000 2006-01-12 2006-01-12 1 1.000000 \N 38 542 2 16 9.89 \N 0 0.050000 0.00 0.490000 2006-01-11 2006-01-11 1 1.000000 \N 39 545 2 16 19.78 \N 0 0.050000 0.00 0.990000 2006-01-11 2006-01-11 1 1.000000 \N 40 553 2 16 69.93 \N 0 0.050000 0.00 3.500000 2006-01-12 2006-01-12 1 1.000000 \N 41 544 2 16 9.99 \N 0 0.050000 0.00 0.500000 2006-01-11 2006-01-11 1 1.000000 \N 42 547 2 16 19.98 \N 0 0.050000 0.00 1.000000 2006-01-11 2006-01-11 1 1.000000 \N 43 554 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-13 2006-01-13 1 1.000000 \N 44 556 2 16 98.91 \N 0 0.050000 0.00 4.950000 2006-01-13 2006-01-13 1 1.000000 \N 45 557 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-13 2006-01-13 1 1.000000 \N 46 558 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-30 2006-01-30 1 1.000000 \N 47 591 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-03-05 2008-03-05 1 1.000000 \N 49 587 2 16 267.30 \N 0 0.050000 0.00 13.370000 2008-03-04 2008-03-04 1 1.000000 \N 50 588 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-03-04 2008-03-04 1 1.000000 \N 52 598 2 16 3105.00 \N 0 0.050000 0.00 155.250000 2008-06-18 2008-06-18 1 1.000000 \N 53 602 2 16 2851.20 \N 0 0.050000 0.00 142.560000 2008-06-19 2008-06-19 1 1.000000 \N 54 603 2 16 89.10 \N 0 0.050000 0.00 4.460000 2008-06-20 2008-06-20 1 1.000000 \N 55 604 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-06-20 2008-06-20 1 1.000000 \N 56 579 2 16 950.00 \N 0 0.050000 0.00 47.500000 2007-08-31 2007-08-31 1 1.000000 \N 57 535 2 16 99.90 \N 0 0.050000 0.00 5.000000 2005-12-29 2005-12-29 1 1.000000 \N 58 555 2 16 98.91 \N 0 0.050000 0.00 4.950000 2006-01-13 2006-01-13 1 1.000000 \N 59 605 2 16 45000.00 \N 0 0.050000 0.00 2250.000000 2008-07-15 2008-07-15 1 1.000000 \N 60 606 2 16 39564.00 \N 0 0.050000 0.00 1978.200000 2008-09-08 2008-09-08 1 1.000000 \N 61 607 2 16 45000.00 \N 0 0.050000 0.00 2250.000000 2008-09-08 2008-09-08 1 1.000000 \N 62 608 2 16 27.00 \N 0 0.050000 0.00 1.350000 2008-09-09 2008-09-09 1 1.000000 \N 63 614 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-10-02 2008-10-02 1 1.000000 \N 64 615 2 16 267.30 \N 0 0.050000 0.00 13.370000 2008-10-02 2008-10-02 1 1.000000 \N 65 631 2 16 89.10 \N 0 0.050000 0.00 4.460000 2009-01-12 2009-01-12 1 1.000000 \N 66 636 2 16 92500.00 \N 0 0.050000 0.00 4625.000000 2009-08-13 2009-08-13 1 1.000000 \N 328 623 2 17 16500.00 \N 0 0.042500 0.00 701.250000 2008-10-02 2008-10-02 1 1.000000 \N 329 624 2 17 9891.00 \N 0 0.042500 0.00 420.370000 2008-10-02 2008-10-02 1 1.000000 \N 330 625 2 17 18000.00 \N 0 0.042500 0.00 765.000000 2008-10-02 2008-10-02 1 1.000000 \N 332 577 2 17 950.00 \N 0 0.042500 0.00 40.380000 2007-05-30 2007-05-30 1 1.000000 \N 333 578 2 17 4025.00 \N 0 0.042500 0.00 171.060000 2007-05-30 2007-05-30 1 1.000000 \N 334 581 2 17 24932.50 \N 0 0.042500 0.00 1059.630000 2007-12-14 2007-12-14 3 0.537630 \N 335 582 2 17 2814.15 \N 0 0.042500 0.00 119.600000 2007-12-14 2007-12-14 3 0.537630 \N 447 638 2 16 405.00 \N 0 0.050000 0.00 20.250000 2009-09-25 \N \N \N \N 458 640 2 16 46250.00 \N 0 0.050000 0.00 2312.500000 2009-10-13 \N \N \N \N 480 641 2 16 92500.00 \N 0 0.050000 0.00 4625.000000 2009-12-03 \N \N \N \N 497 643 2 16 9250.00 \N 0 0.050000 0.00 462.500000 2010-03-12 \N \N \N \N 498 644 2 16 49.00 \N 0 0.050000 0.00 2.450000 2010-03-12 \N \N \N \N 505 645 2 16 0.00 \N 0 0.050000 0.00 0.000000 2010-03-12 \N \N \N \N 510 651 2 16 46250.00 \N 0 0.050000 0.00 2312.500000 2010-07-30 \N \N \N \N 524 657 2 16 247500.00 \N 0 0.050000 0.00 12375.000000 2011-03-07 \N \N \N \N \. -- -- Data for Name: cobmisc; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cobmisc (cobmisc_id, cobmisc_cohead_id, cobmisc_shipvia, cobmisc_freight, cobmisc_misc, cobmisc_payment, cobmisc_paymentref, cobmisc_notes, cobmisc_shipdate, cobmisc_invcnumber, cobmisc_invcdate, cobmisc_posted, cobmisc_misc_accnt_id, cobmisc_misc_descrip, cobmisc_closeorder, cobmisc_curr_id, cobmisc_invchead_id, cobmisc_taxzone_id, cobmisc_taxtype_id) FROM stdin; 205 2956 UPS-GROUND-UPS Ground 99.0000 0.0000 0.0000 \N \N 2005-12-27 60000 2005-12-27 t -1 f 1 \N 2 1 214 2971 UPS-GROUND-UPS Ground 99.0000 0.0000 0.0000 \N \N 2006-01-09 60009 2006-01-09 t -1 f 1 \N 2 1 206 2958 UPS - Prepaid 7.7400 0.0000 0.0000 \N \N 2005-12-27 60001 2005-12-27 t -1 f 1 \N 2 1 215 2973 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2006-01-09 60010 2006-01-09 t -1 f 1 \N 2 1 207 2960 UPS-GROUND-UPS Ground 5.0000 0.0000 0.0000 \N \N 2005-12-27 60002 2005-12-27 t -1 f 1 \N 2 1 208 2960 UPS-GROUND-UPS Ground 5.0000 0.0000 0.0000 \N \N 2005-12-27 60003 2005-12-27 t -1 f 1 \N 2 1 216 2975 UPS-GROUND-UPS Ground 8.0000 0.0000 0.0000 \N \N 2006-01-09 60011 2006-01-09 t -1 f 1 \N 2 1 209 2960 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2005-12-27 60004 2005-12-27 t -1 f 1 \N 2 1 217 2977 UPS-GROUND-UPS Ground 4.0000 0.0000 0.0000 \N \N 2006-01-09 60012 2006-01-09 t -1 f 1 \N 2 1 210 2960 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2005-12-27 60005 2005-12-27 t -1 f 1 \N 2 1 211 2962 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2005-12-27 60006 2005-12-27 t -1 f 1 \N 2 1 212 2964 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2005-12-29 60007 2005-12-29 t -1 f 1 \N 2 1 213 2965 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N \N 2005-12-29 60008 2005-12-29 t -1 f 1 \N 2 1 218 2988 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2006-01-11 60013 2006-01-11 t -1 f 1 \N 2 1 219 2993 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2006-01-11 60014 2006-01-11 t -1 f 1 \N 2 1 220 2995 UPS - Prepaid 7.7400 0.0000 0.0000 \N \N 2006-01-11 60015 2006-01-11 t -1 f 1 \N 2 1 221 2998 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2006-01-11 60016 2006-01-11 t -1 f 1 \N 2 1 222 2988 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2006-01-12 60017 2006-01-12 t -1 f 1 \N 2 1 223 3002 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2006-01-13 60018 2006-01-13 t -1 f 1 \N 2 1 224 3005 UPS - Prepaid 7.7400 0.0000 0.0000 \N \N 2006-01-13 60019 2006-01-13 t -1 f 1 \N 2 1 225 3009 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2006-01-13 60020 2006-01-13 t -1 f 1 \N 2 1 226 3015 UPS-GROUND-UPS Ground 54.0000 0.0000 0.0000 \N \N 2006-01-13 60021 2006-01-13 t -1 f 1 \N 2 1 227 3021 UPS-GROUND-UPS Ground 90.0000 0.0000 0.0000 \N \N 2006-01-30 60022 2006-01-30 t -1 f 1 \N 2 1 228 3023 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N \N 2006-01-30 60023 2006-01-30 t -1 f 1 \N 2 1 229 3026 UPS-GROUND-UPS Ground 37.0000 0.0000 0.0000 \N 2006-02-01 60024 2006-02-01 t -1 f 1 \N 2 1 230 3028 UPS-GROUND-UPS Ground 99.0000 0.0000 0.0000 \N \N 2006-07-05 60025 2006-07-05 t -1 f 1 \N 2 1 231 3032 UPS-GROUND-UPS Ground 37.0000 0.0000 0.0000 \N 2006-07-05 60026 2006-07-05 t -1 f 1 \N 2 1 232 3038 UPS-GROUND-UPS Ground 45.0000 0.0000 0.0000 \N \N 2006-10-13 60028 2006-10-13 t -1 f 1 \N 2 1 233 3047 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2006-12-05 60029 2006-12-05 t -1 f 1 \N 2 1 234 3049 FEDX-Ground-Fedex Ground 32.0000 0.0000 0.0000 \N \N 2006-12-28 60030 2006-12-28 t -1 f 1 \N 2 1 235 3053 UPS-GROUND-UPS Ground 99.0000 0.0000 0.0000 \N \N 2007-01-08 60031 2007-01-08 t -1 f 1 39 2 1 236 3053 UPS-GROUND-UPS Ground 99.0000 0.0000 0.0000 \N \N 2007-01-08 60032 2007-01-08 t -1 f 1 40 2 1 237 3059 UPS-GROUND-UPS Ground 55.0000 0.0000 0.0000 \N \N 2007-02-20 60033 2007-02-20 t -1 f 3 41 1 1 239 3065 FEDEX - Ground-FEDEX Ground 99.0000 0.0000 0.0000 \N \N 2007-04-05 60035 2007-04-05 t -1 f 1 43 2 1 240 3067 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N \N 2007-05-30 60037 2007-05-30 t -1 f 1 45 2 1 238 3061 UPS-GROUND-UPS Ground 45.0000 0.0000 0.0000 \N \N 2007-02-20 60034 2007-02-20 t -1 f 1 42 2 1 241 3071 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N \N 2007-05-30 60040 2007-05-30 t -1 f 1 48 1 1 243 3074 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N \N 2007-09-21 60043 2007-09-21 t -1 f 1 51 2 1 242 3073 UPS-GROUND-UPS Ground 37.0000 0.0000 0.0000 \N 2007-08-31 60042 2007-08-31 t -1 f 1 50 2 1 247 3081 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N 2007-12-20 60048 2007-12-20 t -1 f 3 56 \N 1 244 3076 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N 2007-12-14 60045 2007-12-14 t -1 f 3 53 1 1 245 3078 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2007-12-14 60046 2007-12-14 t -1 f 3 54 \N 1 246 3079 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2007-12-14 60047 2007-12-14 t -1 f 3 55 \N 1 253 3095 UPS-GROUND-UPS Ground 200.0000 2000.0000 0.0000 \N \N 2008-04-04 60054 2008-04-04 t 108 Setup Charge f 3 62 \N 1 251 3092 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2008-03-05 60052 2008-03-05 t -1 f 1 60 2 1 248 3085 UPS-GROUND-UPS Ground 59.0000 0.0000 0.0000 \N \N 2008-03-04 60049 2008-03-04 t -1 f 1 57 2 1 249 3090 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2008-03-04 60050 2008-03-04 t -1 f 1 58 2 1 252 3094 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2008-03-05 60053 2008-03-05 t -1 f 1 61 2 1 250 3091 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N \N 2008-03-04 60051 2008-03-04 t -1 f 3 59 \N 1 254 3097 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-06-12 60055 2008-06-12 t -1 f 3 63 \N 1 255 3100 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-06-12 60057 2008-06-12 t -1 f 3 65 \N 1 256 3103 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-06-12 60058 2008-06-12 t -1 f 3 66 \N 1 257 3105 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-06-12 60059 2008-06-12 t -1 f 1 67 2 1 258 3106 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-06-18 60060 2008-06-18 t -1 f 1 68 2 1 259 3109 UPS-GROUND-UPS Ground 150.0000 0.0000 0.0000 \N 2008-06-19 60061 2008-06-19 t -1 f 3 69 \N 1 260 3111 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-06-19 60062 2008-06-19 t -1 f 1 70 2 1 261 3115 UPS-GROUND-UPS Ground 15.0000 0.0000 0.0000 \N 2008-06-20 60063 2008-06-20 t -1 f 1 71 2 1 262 3117 UPS-GROUND-UPS Ground 27.0000 0.0000 0.0000 \N 2008-06-20 60064 2008-06-20 t -1 f 1 72 2 1 263 3120 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-07-15 60065 2008-07-15 t \N f 1 73 2 1 264 3120 UPS-GROUND-UPS Ground 150.0000 0.0000 0.0000 \N 2008-09-08 60066 2008-09-08 t \N f 1 74 2 1 265 3120 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-09-08 60067 2008-09-08 t \N f 1 75 2 1 266 3123 UPS-GROUND-UPS Ground 10.0000 0.0000 0.0000 \N 2008-09-09 60068 2008-09-09 t \N f 1 76 2 1 267 3134 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N 2008-10-02 60069 2008-10-02 t -1 f 1 77 2 1 268 3127 UPS-GROUND-UPS Ground 35.0000 0.0000 0.0000 \N 2008-10-02 60070 2008-10-02 t \N f 3 78 \N 1 269 3135 UPS-GROUND-UPS Ground 300.0000 0.0000 0.0000 \N 2008-10-02 60071 2008-10-02 t \N f 1 79 1 1 270 3142 UPS-GROUND-UPS Ground 100.0000 0.0000 0.0000 \N 2008-12-31 60073 2008-12-31 t \N f 3 81 \N 1 271 3144 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2008-12-31 60074 2008-12-31 t \N f 3 82 \N 1 272 3155 UPS-GROUND-UPS Ground 500.0000 0.0000 0.0000 \N 2009-01-12 60076 2009-01-12 t \N f 3 84 \N 1 273 3157 UPS-GROUND-UPS Ground 7.5000 0.0000 0.0000 \N 2009-01-12 60077 2009-01-12 t \N f 1 85 2 1 274 3158 UPS-GROUND-UPS Ground 5.2100 0.0000 0.0000 \N 2009-01-12 60078 2009-01-12 t \N f 3 86 \N 1 275 3161 UPS-GROUND-UPS Ground 2604.1500 0.0000 0.0000 \N 2009-06-26 60080 2009-06-26 t \N f 3 88 \N 1 276 3163 UPS-GROUND-UPS Ground 18750.0000 0.0000 0.0000 \N 2009-08-13 60081 2009-08-13 t \N f 1 89 2 1 277 3171 UPS-GROUND-UPS Ground 13020.8300 0.0000 0.0000 \N 2009-09-21 60082 2009-09-21 t \N f 3 90 \N \N 279 3178 UPS-GROUND-UPS Ground 6.9400 0.0000 0.0000 \N 2009-10-13 60086 2009-10-13 t \N f 3 94 \N \N 278 3175 UPS-GROUND-UPS Ground 10.0000 0.0000 0.0000 \N 2009-09-25 60085 2009-09-25 t \N f 1 93 2 \N 280 3177 UPS-GROUND-UPS Ground 9375.0000 0.0000 0.0000 \N 2009-10-13 60087 2009-10-13 t \N f 1 95 2 \N 281 3183 UPS-GROUND-UPS Ground 18750.0000 0.0000 0.0000 \N 2009-12-03 60089 2009-12-03 t \N f 1 99 2 \N 302 3231 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2011-05-30 60116 2011-05-30 t -1 f 3 127 \N \N 282 3187 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-03-10 60090 2010-03-10 t \N f 1 100 2 \N 283 3189 UPS-GROUND-UPS Ground 1758.7500 0.0000 0.0000 \N 2010-03-12 60091 2010-03-12 t \N f 1 101 2 \N 296 3217 UPS-GROUND-UPS Ground 1500.0000 0.0000 0.0000 \N 2011-03-07 60110 2011-03-07 t -1 f 1 121 2 \N 284 3193 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-03-12 60093 2010-03-12 t \N f 1 103 2 \N 285 3194 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-04-02 60094 2010-04-02 t \N f 3 104 1 \N 286 3195 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-06-07 60095 2010-06-07 t \N f 1 105 2 \N 287 3198 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-09-07 60096 2010-09-07 t \N f 1 106 1 \N 288 3200 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-09-07 60097 2010-09-07 t \N f 1 107 2 \N 289 3201 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-09-07 60098 2010-09-07 t \N f 1 108 2 \N 290 3203 UPS-GROUND-UPS Ground 4375.0000 0.0000 0.0000 \N 2010-07-30 60099 2010-07-30 t \N f 1 109 2 \N 291 3205 UPS-GROUND-UPS Ground 21604.9383 0.0000 0.0000 \N 2010-09-08 60100 2010-09-08 t \N f 3 110 \N \N 293 3213 UPS-GROUND-UPS Ground 216.0494 0.0000 0.0000 \N 2010-11-04 60101 2010-11-04 t \N f 3 111 \N \N 294 3215 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-12-30 60105 2010-12-30 t \N f 1 116 2 \N 292 3211 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2010-11-04 60106 2010-11-04 t \N f 1 117 2 \N 298 3221 FEDEX - Ground-FEDEX Ground 500.0000 0.0000 0.0000 \N 2011-04-18 60111 2011-04-18 t -1 f 2 122 \N \N 297 3207 UPS-GROUND-UPS Ground 200.0000 0.0000 0.0000 \N 2011-04-18 60112 2011-04-18 t -1 f 3 123 \N \N 299 3227 UPS-GROUND-UPS Ground 0.0000 0.0000 0.0000 \N 2011-06-03 60114 2011-06-03 t \N f 1 125 2 \N 301 3229 UPS-GROUND-UPS Ground 5000.0000 -115000.0000 0.0000 \N 2011-06-03 60115 2011-06-03 t 123 Adjustment For Initial Order f 3 126 \N \N \. -- -- Data for Name: cobmisctax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cobmisctax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; 365 207 3 16 0.00 \N 0 0.050000 0.00 0.500000 2005-12-27 2005-12-27 \N \N \N 366 208 3 16 0.00 \N 0 0.050000 0.00 0.500000 2005-12-27 2005-12-27 \N \N \N 367 218 3 16 0.00 \N 0 0.050000 0.00 0.010000 2006-01-11 2006-01-11 \N \N \N 371 244 1 17 100.00 \N 0 0.000000 0.00 4.250000 2007-12-14 2007-12-14 \N \N \N 372 269 1 17 300.00 \N 0 0.042500 0.00 12.750000 2008-10-02 2008-10-02 \N \N \N \. -- -- Data for Name: cohead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cohead (cohead_id, cohead_number, cohead_cust_id, cohead_custponumber, cohead_type, cohead_orderdate, cohead_warehous_id, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_shiptoaddress4, cohead_shiptoaddress5, cohead_salesrep_id, cohead_terms_id, cohead_fob, cohead_shipvia, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_freight, cohead_misc, cohead_imported, cohead_ordercomments, cohead_shipcomments, cohead_shiptophone, cohead_shipchrg_id, cohead_shipform_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_misc_accnt_id, cohead_misc_descrip, cohead_commission, cohead_miscdate, cohead_holdtype, cohead_packdate, cohead_prj_id, cohead_wasquote, cohead_lastupdated, cohead_shipcomplete, cohead_created, cohead_creator, cohead_quote_number, cohead_billtocountry, cohead_shiptocountry, cohead_curr_id, cohead_calcfreight, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_taxzone_id, cohead_taxtype_id, cohead_ophead_id, cohead_status, cohead_saletype_id, cohead_shipzone_id) FROM stdin; 3059 50160 97 \N 2007-01-10 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2007-01-17 \N f 2012-11-07 15:33:21.623077 f 2007-01-10 11:38:22.937 mfgadmin \N United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 1 \N C 1 \N 3095 50174 97 \N 2008-04-04 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 200.0000 2000.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 108 Setup Charge 0.0750 \N N 2008-04-09 \N f 2012-11-07 15:33:21.623077 f 2008-04-04 08:39:16.08023 mfgadmin \N United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 2956 50001 95 \N 2005-12-27 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria \N \N 29 42 UPS-GROUND-UPS Ground VA 22201 USA 0.0000 0.0000 f Notes Entered on Ship-To Master 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA \N 0.0750 \N N 2006-01-03 \N f 2012-11-07 15:33:21.623077 f 2005-12-27 09:41:16.425262 jsmith \N \N \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2958 50002 95 \N 2005-12-27 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria \N \N 29 42 UPS-GROUND-UPS Ground VA 22201 USA 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA \N 0.0750 \N N 2005-12-27 \N f 2012-11-07 15:33:21.623077 f 2005-12-27 15:46:35.641556 jsmith \N \N \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2960 50003 95 \N 2005-12-27 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria \N \N 29 42 UPS-GROUND-UPS Ground VA 22201 USA 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA \N 0.0750 \N N 2005-12-27 \N f 2012-11-07 15:33:21.623077 f 2005-12-27 16:01:15.67788 jsmith \N \N \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2971 50008 95 \N 2006-01-09 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-16 \N f 2012-11-07 15:33:21.623077 f 2006-01-09 09:53:14.505507 jsmith \N \N \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2973 50009 95 \N 2006-01-09 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-18 \N f 2012-11-07 15:33:21.623077 f 2006-01-09 10:42:15.208768 jsmith \N \N \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2975 50030 95 \N 2006-01-09 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-11 \N f 2012-11-07 15:33:21.623077 f 2006-01-09 10:50:24.080274 jsmith \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2965 50005 95 \N 2005-12-29 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2005-12-29 \N f 2012-11-07 15:33:21.623077 f 2005-12-29 12:05:49.829045 jsmith \N \N \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2977 50031 95 \N 2006-01-09 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-11 \N f 2012-11-07 15:33:21.623077 f 2006-01-09 10:52:14.055756 jsmith \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2993 50039 95 \N 2006-01-11 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-13 \N f 2012-11-07 15:33:21.623077 f 2006-01-11 15:13:18.613144 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2995 50040 95 \N 2006-01-11 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-13 \N f 2012-11-07 15:33:21.623077 f 2006-01-11 15:40:41.038496 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2998 50041 95 \N 2006-01-11 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-11 \N f 2012-11-07 15:33:21.623077 f 2006-01-11 16:02:11.038217 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3002 50043 95 \N 2006-01-13 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-20 \N f 2012-11-07 15:33:21.623077 f 2006-01-13 11:00:05.14238 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3005 40005 95 \N 2006-01-13 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-16 \N t 2012-11-07 15:33:21.623077 f 2006-01-13 12:48:06.204 jsmith 40005 United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3009 50045 95 \N 2006-01-13 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-14 \N f 2012-11-07 15:33:21.623077 f 2006-01-13 13:35:44.314 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3015 50046 95 \N 2006-01-13 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-20 \N f 2012-11-07 15:33:21.623077 f 2006-01-13 15:08:33.291 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3094 50173 95 \N 2008-03-05 \N 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 \N UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f \N \N 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N \N \N f 2012-11-07 15:33:21.623077 f 2008-03-05 13:56:35.952664 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3021 50148 95 \N 2006-01-30 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-02-06 \N f 2012-11-07 15:33:21.623077 f 2006-01-30 12:05:07.009224 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3023 50149 95 \N 2006-01-30 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-02-06 \N f 2012-11-07 15:33:21.623077 f 2006-01-30 16:30:09.067059 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3026 50150 95 \N 2006-01-31 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-02-05 \N f 2012-11-07 15:33:21.623077 f 2006-01-31 14:09:17.809 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3028 50151 95 \N 2006-07-05 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-07-05 \N f 2012-11-07 15:33:21.623077 f 2006-06-23 16:20:36.765 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3032 50152 95 \N 2006-07-05 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-07-10 \N f 2012-11-07 15:33:21.623077 f 2006-07-05 10:55:08.848 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3038 50155 95 \N 2006-10-13 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-10-18 \N f 2012-11-07 15:33:21.623077 f 2006-10-13 15:10:21.3 jsmith \N UNITED STATES UNITED STATES 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3047 50157 95 \N 2006-12-05 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-12-08 \N f 2012-11-07 15:33:21.623077 f 2006-12-05 12:04:00.463 mfgadmin \N UNITED STATES UNITED STATES 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3049 50158 95 \N 2006-12-28 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2007-01-04 \N f 2012-11-07 15:33:21.623077 f 2006-12-28 11:10:16.359 mfgadmin \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3053 50159 95 \N 2007-01-08 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2007-01-15 \N f 2012-11-07 15:33:21.623077 f 2007-01-08 16:23:13.527 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3065 50162 95 \N 2007-04-05 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2007-04-12 \N f 2012-11-07 15:33:21.623077 f 2007-04-05 15:33:37.859 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3061 50161 95 \N 2007-02-20 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2007-02-27 \N f 2012-11-07 15:33:21.623077 f 2007-02-20 08:41:19.938 mfgadmin \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3067 50163 95 \N 2007-05-26 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2007-06-09 \N f 2012-11-07 15:33:21.623077 f 2007-05-26 21:53:28.562 mfgadmin \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3071 50164 95 \N 2007-05-30 35 33 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court \N \N 29 42 UPS-GROUND-UPS Ground Clemmons NC 4234 100.0000 0.0000 f 336-321-9857 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2007-06-06 \N f 2012-11-07 15:33:21.623077 f 2007-05-30 10:22:22.770776 mfgadmin \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 1 \N C 1 36 3073 40006 95 \N 2007-08-31 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2007-09-09 \N t 2012-11-07 15:33:21.623077 f 2007-08-31 10:18:36.093 mfgadmin 40006 United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3085 50169 95 \N 2008-03-04 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-03-11 \N f 2012-11-07 15:33:21.623077 f 2008-03-04 13:55:05.931349 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3092 50172 95 \N 2008-03-05 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-03-12 \N f 2012-11-07 15:33:21.623077 f 2008-03-05 13:41:42.387731 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3105 40009 95 \N 2008-06-12 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-06-19 \N t 2012-11-07 15:33:21.623077 f 2008-06-12 15:20:31.478344 jsmith 40009 United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3106 50178 95 \N 2008-06-18 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-06-25 \N f 2012-11-07 15:33:21.623077 f 2008-06-18 15:55:23.84496 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3111 50180 95 \N 2008-06-19 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-06-23 \N f 2012-11-07 15:33:21.623077 f 2008-06-19 17:07:04.200405 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3115 50181 95 \N 2008-06-20 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-06-20 \N f 2012-11-07 15:33:21.623077 f 2008-06-20 09:32:32.202601 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3117 50182 95 \N 2008-06-20 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-06-29 \N f 2012-11-07 15:33:21.623077 f 2008-06-20 12:29:30.532732 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3109 50179 97 \N 2008-06-19 35 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2008-06-23 \N f 2012-11-07 15:33:21.623077 f 2008-06-19 16:18:02.457883 jsmith \N United Kingdom United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 3103 50177 97 \N 2008-06-12 35 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2008-06-19 \N f 2012-11-07 15:33:21.623077 f 2008-06-12 14:55:59.81302 jsmith \N United Kingdom United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 3097 50175 97 \N 2008-06-12 35 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2008-06-19 \N f 2012-11-07 15:33:21.623077 f 2008-06-12 08:52:27.719723 jsmith \N United Kingdom United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 2962 50004 95 \N 2005-12-27 35 \N Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills \N \N 29 42 UPS-GROUND-UPS Ground Virginia 22209 USA 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA \N 0.0750 \N N 2006-01-05 \N f 2012-11-07 15:33:21.623077 f 2005-12-27 16:25:07.396416 jsmith \N \N \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2964 40000 95 \N 2005-12-27 35 \N Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n USA 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA \N 0.0750 \N N 2005-12-28 \N t 2012-11-07 15:33:21.623077 f 2005-12-27 16:39:49.841819 jsmith 40000 \N \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 2988 50037 95 \N 2006-01-11 35 \N Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place \N \N 29 42 UPS-GROUND-UPS Ground Walnut Hills VA 22209 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2006-01-14 \N f 2012-11-07 15:33:21.623077 f 2006-01-11 09:41:39.196074 jsmith \N 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 \N 3076 40007 97 \N 2007-12-14 35 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 100.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2007-12-21 \N t 2012-11-07 15:33:21.623077 f 2007-12-14 12:31:06.625 mfgadmin 40007 United Kingdom United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 1 \N C 1 \N 3081 40008 97 \N 2007-12-20 35 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2007-12-27 \N t 2012-11-07 15:33:21.623077 f 2007-12-20 11:30:55.265 mfgadmin 40008 United Kingdom United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 3077 50166 97 C 2007-12-14 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N R 2007-12-14 \N f 2012-11-07 15:33:21.623077 f 2007-12-14 13:08:32.625 mfgadmin \N United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 3079 50168 97 \N 2007-12-14 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2007-12-21 \N f 2012-11-07 15:33:21.623077 f 2007-12-14 13:26:23.296 mfgadmin \N United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 3091 50171 97 \N 2008-03-04 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2008-03-04 \N f 2012-11-07 15:33:21.623077 f 2008-03-04 16:31:14.556586 jsmith \N United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 3120 50183 95 \N 2008-09-08 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-07-15 \N f 2012-11-07 15:33:21.623077 f 2008-09-08 17:20:41.646126 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3090 50170 95 \N 2008-03-04 \N 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 \N UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f \N \N 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N \N \N f 2012-11-07 15:33:21.623077 f 2008-03-04 16:19:21.991688 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3127 50185 97 \N 2008-10-02 35 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0007 \N N 2008-10-09 \N f 2012-11-07 15:33:21.623077 f 2008-10-02 08:38:57.521346 jsmith \N United Kingdom United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 3171 50196 97 \N 2009-09-21 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 12152.7777 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2009-09-21 \N f 2012-11-07 15:33:21.623077 f 2009-09-21 16:53:40.305096 admin \N United Kingdom 3 t \N \N 3 Fred Franklin 44-336-712-9857 44-336-712-9857 44-336-712-9857 \N \N \N C 1 \N 3177 50198 95 \N 2009-10-13 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 8750.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2009-10-22 \N f 2012-11-07 15:33:21.623077 f 2009-10-13 13:16:17.758481 admin \N United States United States 1 t 8 Mr Jake Sweet 800-321-5433 703-931-2212 \N 1 Mr Mike Farley 703-931-4269 703-931-2212 703-931-2212 2 \N \N C 1 35 3175 50197 95 \N 2009-09-25 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 10.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2009-09-25 \N f 2012-11-07 15:33:21.623077 f 2009-09-25 10:30:40.416763 jsmith \N United States United States 1 t 8 Mr Jake Sweet 800-321-5433 703-931-2212 \N 1 Mr Mike Farley 703-931-4269 703-931-2212 703-931-2212 2 \N \N C 1 35 3198 50206 95 \N 2010-09-07 35 33 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court \N \N 29 42 UPS-GROUND-UPS Ground Clemmons NC 4234 0.0000 0.0000 f 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-09-07 \N f 2012-11-07 15:33:21.623077 f 2010-09-07 16:16:14.566356 admin \N United States United States 1 t 17 Miss. Susie \N Coltraine \N 336-321-9857 \N sc@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 1 \N \N C 1 36 3200 50207 95 \N 2010-07-06 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-07-06 \N f 2012-11-07 15:33:21.623077 f 2010-09-07 16:34:53.442771 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 2 \N \N C 1 35 3201 50208 95 \N 2010-08-01 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-08-01 \N f 2012-11-07 15:33:21.623077 f 2010-09-07 16:36:12.629997 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 2 \N \N C 1 35 3203 50209 95 \N 2010-09-08 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 8750.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-07-30 \N f 2012-11-07 15:33:21.623077 f 2010-09-08 13:16:09.354791 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 2 \N \N C 1 35 3205 50210 97 \N 2010-09-08 35 34 XTRM Toys Distribution Center 1 1 Extra Way Building 10 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 21604.9383 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0000 \N N 2010-09-15 \N f 2012-11-07 15:33:21.623077 f 2010-09-08 13:32:56.068555 admin \N United Kingdom United Kingdom 3 t 4 Joe Stealt 55-44-336-712-9855 \N 336-712-9856 js@xtrm.com 3 Fred Franklin 44-336-712-9857 \N 44-336-712-9857 ff@ttoys.com \N \N \N C 1 \N 3196 50205 95 183881 \N 2011-04-01 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2011-04-06 \N f 2012-11-07 15:33:21.623077 f 2010-06-07 11:37:58.841616 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 2 \N \N O 1 35 3221 50217 123 123012 \N 2011-04-18 35 35 Vienna Collectibles Headquarters Ungargasse 60 \N \N 29 42 FEDEX - Ground-FEDEX Ground Vienna Austria 1030 7.2464 0.0000 f 43 1-515180 4 12 Vienna Collectables Ungargasse 60 Vienna Austria 1030 \N 0.0000 \N N 2011-04-18 \N f 2012-11-07 15:33:21.623077 f 2011-04-18 07:40:29.447628 admin \N Austria Austria 2 t 36 Mr. Arnold Waldheim 43 1-515180 General Manager \N aw@viennacollectibles.at 36 Mr. Arnold Waldheim 43 1-515180 General Manager \N aw@viennacollectibles.at \N \N \N C 1 \N 3213 50213 97 \N 2010-11-04 35 34 XTRM Toys Distribution Center 1 1 Extra Way Building 10 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 216.0494 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0000 \N N 2010-11-13 \N f 2012-11-07 15:33:21.623077 f 2010-11-04 15:46:34.443535 admin \N United Kingdom United Kingdom 3 t 4 Joe Stealt 55-44-336-712-9855 \N 336-712-9856 js@xtrm.com 3 Fred Franklin 44-336-712-9857 \N 44-336-712-9857 ff@ttoys.com \N \N \N C 1 \N 3207 50211 97 \N 2011-04-06 35 34 XTRM Toys Distribution Center 1 1 Extra Way Building 10 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0000 \N N 2011-04-11 \N f 2012-11-07 15:33:21.623077 f 2010-09-08 13:50:50.476173 admin \N United Kingdom United Kingdom 3 t 4 Joe Stealt 55-44-336-712-9855 \N 336-712-9856 js@xtrm.com 3 Fred Franklin 44-336-712-9857 \N 44-336-712-9857 ff@ttoys.com \N \N \N C 1 \N 3225 50218 123 MA001 \N 2011-06-03 35 35 Vienna Collectibles Headquarters Ungargasse 60 \N \N 29 42 UPS-GROUND-UPS Ground Vienna Austria 1030 7.2464 0.0000 f 43 1-515180 4 12 Vienna Collectables Ungargasse 60 Vienna Austria 1030 \N 0.0000 \N N 2011-08-02 \N f 2012-11-07 15:33:21.623077 f 2011-04-18 14:00:22.411533 admin \N Austria Austria 2 t 36 Mr. Arnold Waldheim 43 1-515180 General Manager \N aw@viennacollectibles.at 36 Mr. Arnold Waldheim 43 1-515180 General Manager \N aw@viennacollectibles.at \N \N \N O 1 \N 3100 50176 97 \N 2008-06-12 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2008-06-17 \N f 2012-11-07 15:33:21.623077 f 2008-06-12 14:32:18.597225 jsmith \N United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C 1 \N 3074 50165 95 \N 2007-09-21 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2007-09-29 4 f 2012-11-07 15:33:21.623077 f 2007-09-21 14:30:46.203 mfgadmin \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3123 50184 95 \N 2008-09-09 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 800-321-5433 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2008-09-01 \N f 2012-11-07 15:33:21.623077 f 2008-09-09 16:50:00.65506 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3078 50167 97 C 2007-12-14 \N \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 \N UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f \N \N 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N \N \N f 2012-11-07 15:33:21.623077 f 2007-12-14 13:10:48.812 mfgadmin \N United Kingdom United Kingdom 3 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N C \N \N 3134 40010 95 \N 2008-10-02 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\nFinal 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0007 \N N 2008-10-11 \N t 2012-11-07 15:33:21.623077 f 2008-10-02 09:37:52.485931 jsmith 40010 United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 1 \N C 1 35 3135 50186 95 \N 2008-10-02 35 33 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court \N \N 29 42 UPS-GROUND-UPS Ground Clemmons NC 4234 0.0000 0.0000 f 336-321-9857 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0007 \N N 2008-10-09 \N f 2012-11-07 15:33:21.623077 f 2008-10-02 11:02:51.302916 jsmith \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 1 \N C 1 36 3155 50191 97 \N 2009-01-12 35 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 500.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2009-01-19 \N f 2012-11-07 15:33:21.623077 f 2009-01-12 13:26:55.882466 jsmith \N United Kingdom United Kingdom 3 f 3 Fred Franklin 44-336-712-9857 44-336-712-9857 \N 3 Fred Franklin 44-336-712-9857 44-336-712-9857 \N \N 1 \N C 1 \N 3142 50189 97 \N 2008-12-30 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2009-01-08 \N f 2012-11-07 15:33:21.623077 f 2008-12-30 16:49:58.843758 admin \N United Kingdom 3 f \N \N 3 Fred Franklin 44-336-712-9857 44-336-712-9857 \N \N 1 \N C 1 \N 3144 50190 97 \N 2008-12-31 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2008-12-31 \N f 2012-11-07 15:33:21.623077 f 2008-12-31 15:02:50.731578 jsmith \N United Kingdom 3 f \N \N 3 Fred Franklin 44-336-712-9857 44-336-712-9857 \N \N 1 \N C 1 \N 3194 40011 97 \N 2010-04-02 35 34 XTRM Toys Distribution Center 1 1 Extra Way Building 10 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0000 \N N 2010-04-11 \N t 2012-11-07 15:33:21.623077 f 2010-04-02 10:25:11.812873 admin 40011 United Kingdom United Kingdom 3 f 4 Joe \N Stealt \N 55-44-336-712-9855 \N 336-712-9856 3 Fred Franklin 44-336-712-9857 \N 44-336-712-9857 1 \N \N C 1 \N 3192 50203 95 \N 2010-03-12 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-03-12 \N f 2012-11-07 15:33:21.623077 f 2010-03-12 15:22:22.146822 admin \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N 1 Mr Mike Farley \N 703-931-4269 703-931-2212 703-931-2212 2 \N \N X 1 35 3193 50204 95 \N 2010-03-12 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-03-12 \N f 2012-11-07 15:33:21.623077 f 2010-03-12 15:23:59.905836 admin \N United States United States 1 f \N \N \N \N \N \N \N \N \N \N 1 Mr Mike Farley \N 703-931-4269 703-931-2212 703-931-2212 2 \N \N C 1 35 3195 40012 95 \N 2010-06-07 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-06-21 \N t 2012-11-07 15:33:21.623077 f 2010-06-07 09:37:36.924126 admin 40012 United States United States 1 f 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 \N 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 703-931-2212 2 \N 3 C 1 35 3157 50192 95 \N 2009-01-12 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 7.5000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2009-01-12 \N f 2012-11-07 15:33:21.623077 f 2009-01-12 13:51:52.678961 jsmith \N United States United States 1 t 8 Mr Jake Sweet 800-321-5433 703-931-2212 \N 1 Mr Mike Farley 703-931-4269 703-931-2212 \N 2 1 \N C 1 35 3158 50193 97 \N 2009-01-12 35 \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 5.2083 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2009-01-12 \N f 2012-11-07 15:33:21.623077 f 2009-01-12 13:52:33.626221 jsmith \N United Kingdom United Kingdom 3 t 3 Fred Franklin 44-336-712-9857 44-336-712-9857 \N 3 Fred Franklin 44-336-712-9857 44-336-712-9857 \N \N 1 \N C 1 \N 3161 50194 97 \N 2009-06-26 35 \N Xtreme Toys Corporate Headquarters 1 Extra Way Suite 200 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 2430.5555 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2009-06-26 \N f 2012-11-07 15:33:21.623077 f 2009-06-26 16:10:43.7261 admin \N United Kingdom United Kingdom 3 t 3 Fred Franklin 44-336-712-9857 44-336-712-9857 \N 3 Fred Franklin 44-336-712-9857 44-336-712-9857 \N \N 1 \N C 1 \N 3163 50195 95 \N 2009-08-13 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 17500.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2009-08-20 \N f 2012-11-07 15:33:21.623077 f 2009-08-13 08:38:23.166689 admin \N United States United States 1 t 8 Mr Jake Sweet 800-321-5433 703-931-2212 \N 1 Mr Mike Farley 703-931-4269 703-931-2212 \N 2 1 \N C 1 35 3183 50200 95 \N 2009-12-03 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 17500.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2009-12-12 \N f 2012-11-07 15:33:21.623077 f 2009-12-03 15:41:34.835512 admin \N United States United States 1 t 8 Mr Jake Sweet 800-321-5433 703-931-2212 \N 1 Mr Mike Farley 703-931-4269 703-931-2212 703-931-2212 2 \N \N C 1 35 3178 50199 97 \N 2009-10-13 35 \N \N \N 29 42 UPS-GROUND-UPS Ground 6.9444 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0750 \N N 2009-10-20 \N f 2012-11-07 15:33:21.623077 f 2009-10-13 13:17:15.159351 admin \N United Kingdom 3 t 33 \N 3 Fred Franklin 44-336-712-9857 44-336-712-9857 44-336-712-9857 \N \N \N C 1 \N 3187 50201 95 \N 2010-03-10 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-03-17 \N f 2012-11-07 15:33:21.623077 f 2010-03-10 16:36:07.033104 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 2 \N \N C 1 35 3189 50202 95 \N 2010-03-12 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 1758.7500 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-03-21 \N f 2012-11-07 15:33:21.623077 f 2010-03-12 14:56:57.96257 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 2 \N \N C 1 35 3215 50214 95 \N 2010-12-30 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2010-12-30 \N f 2012-11-07 15:33:21.623077 f 2010-12-30 16:25:16.539971 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 2 \N \N C 1 35 3211 50212 95 \N 2010-12-30 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2011-01-13 \N f 2012-11-07 15:33:21.623077 f 2010-11-04 15:44:11.360985 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 2 \N \N C 1 35 3227 50219 95 \N 2011-05-04 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2011-05-04 \N f 2012-11-07 15:33:21.623077 f 2011-06-03 16:11:29.212783 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 2 \N \N C 1 35 3217 50215 95 \N 2011-03-07 35 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street \N \N 29 42 UPS-GROUND-UPS Ground Alexandria VA 22201 0.0000 0.0000 f Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 4 12 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 \N 0.0750 \N N 2011-03-17 \N f 2012-11-07 15:33:21.623077 f 2011-03-07 15:29:10.499658 admin \N United States United States 1 t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 mf@ttoys.com 2 \N \N C 1 35 3229 50220 97 \N 2011-06-03 35 34 XTRM Toys Distribution Center 1 1 Extra Way Building 10 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0000 \N N 2011-05-04 \N f 2012-11-07 15:33:21.623077 f 2011-06-03 16:24:16.11195 admin \N United Kingdom United Kingdom 3 t 4 Joe Stealt 55-44-336-712-9855 \N 336-712-9856 js@xtrm.com 3 Fred Franklin 44-336-712-9857 \N 44-336-712-9857 ff@xtrm.com \N \N \N C 1 \N 3231 50221 97 \N 2011-05-04 35 34 XTRM Toys Distribution Center 1 1 Extra Way Building 10 \N \N 29 42 UPS-GROUND-UPS Ground Reading Berkshire RG6 1RA 0.0000 0.0000 f 4 12 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA \N 0.0000 \N N 2011-05-14 \N f 2012-11-07 15:33:21.623077 f 2011-06-03 16:34:46.037461 admin \N United Kingdom United Kingdom 3 t 4 Joe Stealt 55-44-336-712-9855 \N 336-712-9856 js@xtrm.com 3 Fred Franklin 44-336-712-9857 \N 44-336-712-9857 ff@xtrm.com \N \N \N C 1 \N \. -- -- Data for Name: cohist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cohist (cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_orderdate, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_shipto_id, cohist_salesrep_id, cohist_duedate, cohist_imported, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_commission, cohist_commissionpaid, cohist_unitcost, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_doctype, cohist_promisedate, cohist_ponumber, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_cohead_ccpay_id, cohist_saletype_id, cohist_shipzone_id) FROM stdin; 704 97 293 2008-12-31 UPS-GROUND-UPS Ground 50189 2008-12-30 60073 2008-12-31 100.000000 5.3977 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 40.4828 f 2.563400 \N \N \N I \N 3 5272 2 \N \N \N \N 494 95 293 2005-12-27 UPS-GROUND-UPS Ground 50001 2005-12-27 60000 2005-12-27 100.000000 9.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 71.2500 t 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 495 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50001 2005-12-27 60000 2005-12-27 1.000000 99.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 99.000000 F Freight \N I \N 1 \N \N \N \N \N 35 496 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50001 2005-12-27 60000 2005-12-27 1.000000 47.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 497 95 293 2005-12-27 UPS - Prepaid 50002 2005-12-27 60001 2005-12-27 5.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 3.7500 t 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 498 95 -1 2005-12-27 UPS - Prepaid 50002 2005-12-27 60001 2005-12-27 1.000000 7.7400 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 7.740000 F Freight \N I \N 1 \N \N \N \N \N 35 499 95 -1 2005-12-27 UPS - Prepaid 50002 2005-12-27 60001 2005-12-27 1.000000 2.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 2.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 500 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60002 2005-12-27 1.000000 5.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 5.000000 F Freight \N I \N 1 \N \N \N \N \N 35 501 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60002 2005-12-27 1.000000 0.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 0.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 502 95 293 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60003 2005-12-27 1.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.7500 t 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 503 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60003 2005-12-27 1.000000 5.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 5.000000 F Freight \N I \N 1 \N \N \N \N \N 35 504 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60003 2005-12-27 1.000000 1.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 1.000000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 505 95 293 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60004 2005-12-27 1.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.7493 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 506 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60004 2005-12-27 1.000000 0.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 0.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 507 95 293 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60005 2005-12-27 2.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 1.4985 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 508 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50003 2005-12-27 60005 2005-12-27 1.000000 1.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 0.0000 f 1.000000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 810 123 -1 2011-04-18 2011-04-18 20036 2011-04-18 1.000000 -1459.2800 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N 0.0000 f 0.000000 M A/R Misc Credit Memo \N C \N 2 6246 \N \N \N \N \N 509 95 293 2005-12-27 UPS-GROUND-UPS Ground 50004 2005-12-27 60006 2005-12-27 10.000000 9.9900 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA 7.4925 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N \N 510 95 -1 2005-12-27 UPS-GROUND-UPS Ground 50004 2005-12-27 60006 2005-12-27 1.000000 5.0000 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA 0.0000 f 5.000000 T Sales Tax 12 I \N 1 \N \N \N \N \N \N 511 95 293 2005-12-29 UPS-GROUND-UPS Ground 40000 2005-12-27 60007 2005-12-29 10.000000 9.9900 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 7.4925 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N \N 512 95 293 2005-12-29 UPS-GROUND-UPS Ground 40000 2005-12-27 60007 2005-12-29 1.000000 9.9900 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.7493 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N \N 513 95 -1 2005-12-29 UPS-GROUND-UPS Ground 40000 2005-12-27 60007 2005-12-29 1.000000 5.4900 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 5.490000 T Sales Tax 12 I \N 1 \N \N \N \N \N \N 514 95 293 2005-12-29 UPS-GROUND-UPS Ground 50005 2005-12-29 60008 2005-12-29 369.000000 9.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 262.9125 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 515 95 -1 2005-12-29 UPS-GROUND-UPS Ground 50005 2005-12-29 60008 2005-12-29 1.000000 100.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 100.000000 F Freight \N I \N 1 \N \N \N \N \N 35 516 95 -1 2005-12-29 UPS-GROUND-UPS Ground 50005 2005-12-29 60008 2005-12-29 1.000000 175.2800 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 175.280000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 517 95 293 2006-01-09 UPS-GROUND-UPS Ground 50008 2006-01-09 60009 2006-01-09 100.000000 9.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 518 95 -1 2006-01-09 UPS-GROUND-UPS Ground 50008 2006-01-09 60009 2006-01-09 1.000000 99.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 99.000000 F Freight \N I \N 1 \N \N \N \N \N 35 519 95 -1 2006-01-09 UPS-GROUND-UPS Ground 50008 2006-01-09 60009 2006-01-09 1.000000 47.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 520 95 293 2006-01-09 UPS-GROUND-UPS Ground 50009 2006-01-09 60010 2006-01-09 10.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 7.4925 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 521 95 -1 2006-01-09 UPS-GROUND-UPS Ground 50009 2006-01-09 60010 2006-01-09 1.000000 5.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 5.000000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 522 95 293 2006-01-09 UPS-GROUND-UPS Ground 50030 2006-01-09 60011 2006-01-09 10.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 7.4925 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 523 95 -1 2006-01-09 UPS-GROUND-UPS Ground 50030 2006-01-09 60011 2006-01-09 1.000000 8.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 8.000000 F Freight \N I \N 1 \N \N \N \N \N 35 524 95 -1 2006-01-09 UPS-GROUND-UPS Ground 50030 2006-01-09 60011 2006-01-09 1.000000 5.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 5.000000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 525 95 293 2006-01-09 UPS-GROUND-UPS Ground 50031 2006-01-09 60012 2006-01-09 10.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 7.4925 f 2.666800 \N \N \N I \N 1 \N \N \N \N \N 35 526 95 -1 2006-01-09 UPS-GROUND-UPS Ground 50031 2006-01-09 60012 2006-01-09 1.000000 4.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 4.000000 F Freight \N I \N 1 \N \N \N \N \N 35 527 95 -1 2006-01-09 UPS-GROUND-UPS Ground 50031 2006-01-09 60012 2006-01-09 1.000000 5.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 5.000000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 528 95 300 2006-01-11 UPS-GROUND-UPS Ground 50037 2006-01-11 60013 2006-01-11 3.000000 9.8910 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 2.2255 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N \N 529 95 293 2006-01-11 UPS-GROUND-UPS Ground 50037 2006-01-11 60013 2006-01-11 3.000000 9.9900 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 2.2478 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N \N 530 95 300 2006-01-11 UPS-GROUND-UPS Ground 50037 2006-01-11 60013 2006-01-11 3.000000 9.8910 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 2.2255 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N \N 531 95 -1 2006-01-11 UPS-GROUND-UPS Ground 50037 2006-01-11 60013 2006-01-11 1.000000 4.4700 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 0.0000 f 4.470000 T Sales Tax 12 I \N 1 \N \N \N \N \N \N 532 95 293 2006-01-11 UPS-GROUND-UPS Ground 50039 2006-01-11 60014 2006-01-11 50.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 37.4625 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 533 95 -1 2006-01-11 UPS-GROUND-UPS Ground 50039 2006-01-11 60014 2006-01-11 1.000000 24.9800 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 24.980000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 705 97 -1 2008-12-31 UPS-GROUND-UPS Ground 50189 2008-12-30 60073 2008-12-31 1.000000 100.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 100.000000 F Freight \N I \N 3 5272 \N \N \N \N \N 534 95 293 2006-01-11 UPS - Prepaid 50040 2006-01-11 60015 2006-01-11 10.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 7.4925 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 535 95 -1 2006-01-11 UPS - Prepaid 50040 2006-01-11 60015 2006-01-11 1.000000 7.7400 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 7.740000 F Freight \N I \N 1 \N \N \N \N \N 35 536 95 -1 2006-01-11 UPS - Prepaid 50040 2006-01-11 60015 2006-01-11 1.000000 5.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 5.000000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 537 95 293 2006-01-11 UPS-GROUND-UPS Ground 50041 2006-01-11 60016 2006-01-11 10.000000 9.9900 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 7.4925 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 538 95 -1 2006-01-11 UPS-GROUND-UPS Ground 50041 2006-01-11 60016 2006-01-11 1.000000 5.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 5.000000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 539 95 293 2006-01-12 UPS-GROUND-UPS Ground 50037 2006-01-11 60017 2006-01-12 7.000000 9.9900 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 5.2448 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N \N 540 95 300 2006-01-12 UPS-GROUND-UPS Ground 50037 2006-01-11 60017 2006-01-12 7.000000 9.8910 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 5.1928 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N \N 541 95 300 2006-01-12 UPS-GROUND-UPS Ground 50037 2006-01-11 60017 2006-01-12 7.000000 9.8910 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 5.1928 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N \N 542 95 -1 2006-01-12 UPS-GROUND-UPS Ground 50037 2006-01-11 60017 2006-01-12 1.000000 10.4200 -1 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 0.0000 f 10.420000 T Sales Tax 12 I \N 1 \N \N \N \N \N \N 543 95 293 2006-01-13 UPS-GROUND-UPS Ground 50043 2006-01-13 60018 2006-01-13 100.000000 9.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 544 95 -1 2006-01-13 UPS-GROUND-UPS Ground 50043 2006-01-13 60018 2006-01-13 1.000000 47.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 545 95 300 2006-01-13 UPS - Prepaid 40005 2006-01-13 60019 2006-01-13 10.000000 9.8910 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 7.4183 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 546 95 -1 2006-01-13 UPS - Prepaid 40005 2006-01-13 60019 2006-01-13 1.000000 7.7400 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 7.740000 F Freight \N I \N 1 \N \N \N \N \N 35 547 95 -1 2006-01-13 UPS - Prepaid 40005 2006-01-13 60019 2006-01-13 1.000000 4.9500 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 4.950000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 548 95 300 2006-01-13 UPS-GROUND-UPS Ground 50045 2006-01-13 60020 2006-01-13 10.000000 9.8910 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 7.4183 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 549 95 -1 2006-01-13 UPS-GROUND-UPS Ground 50045 2006-01-13 60020 2006-01-13 1.000000 4.9500 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 4.950000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 550 95 293 2006-01-13 UPS-GROUND-UPS Ground 50046 2006-01-13 60021 2006-01-13 100.000000 9.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 638 97 323 2008-03-04 UPS-GROUND-UPS Ground 50171 2008-03-04 60051 2008-03-04 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 16.380000 \N \N \N I \N 3 4791 2 \N \N \N \N 551 95 -1 2006-01-13 UPS-GROUND-UPS Ground 50046 2006-01-13 60021 2006-01-13 1.000000 54.0000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 54.000000 F Freight \N I \N 1 \N \N \N \N \N 35 552 95 -1 2006-01-13 UPS-GROUND-UPS Ground 50046 2006-01-13 60021 2006-01-13 1.000000 47.5000 31 29 \N f Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 553 95 293 2006-01-30 UPS-GROUND-UPS Ground 50148 2006-01-30 60022 2006-01-30 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 554 95 -1 2006-01-30 UPS-GROUND-UPS Ground 50148 2006-01-30 60022 2006-01-30 1.000000 90.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 90.000000 F Freight \N I \N 1 \N \N \N \N \N 35 555 95 -1 2006-01-30 UPS-GROUND-UPS Ground 50148 2006-01-30 60022 2006-01-30 1.000000 47.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 556 95 293 2006-01-30 UPS-GROUND-UPS Ground 50149 2006-01-30 60023 2006-01-30 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 557 95 -1 2006-01-30 UPS-GROUND-UPS Ground 50149 2006-01-30 60023 2006-01-30 1.000000 100.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 100.000000 F Freight \N I \N 1 \N \N \N \N \N 35 558 95 -1 2006-01-30 UPS-GROUND-UPS Ground 50149 2006-01-30 60023 2006-01-30 1.000000 47.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 559 95 293 2006-02-01 UPS-GROUND-UPS Ground 50150 2006-01-31 60024 2006-02-01 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 560 95 -1 2006-02-01 UPS-GROUND-UPS Ground 50150 2006-01-31 60024 2006-02-01 1.000000 37.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 37.000000 F Freight \N I \N 1 \N \N \N \N \N 35 561 95 -1 2006-02-01 UPS-GROUND-UPS Ground 50150 2006-01-31 60024 2006-02-01 1.000000 47.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 562 95 293 2006-07-05 UPS-GROUND-UPS Ground 50151 2006-07-05 60025 2006-07-05 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 563 95 -1 2006-07-05 UPS-GROUND-UPS Ground 50151 2006-07-05 60025 2006-07-05 1.000000 99.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 99.000000 F Freight \N I \N 1 \N \N \N \N \N 35 564 95 -1 2006-07-05 UPS-GROUND-UPS Ground 50151 2006-07-05 60025 2006-07-05 1.000000 47.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 565 95 293 2006-07-05 UPS-GROUND-UPS Ground 50152 2006-07-05 60026 2006-07-05 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 2.461800 \N \N \N I \N 1 \N \N \N \N \N 35 566 95 -1 2006-07-05 UPS-GROUND-UPS Ground 50152 2006-07-05 60026 2006-07-05 1.000000 37.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 37.000000 F Freight \N I \N 1 \N \N \N \N \N 35 567 95 -1 2006-07-05 UPS-GROUND-UPS Ground 50152 2006-07-05 60026 2006-07-05 1.000000 47.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 \N \N \N \N \N 35 583 97 293 2007-02-20 UPS-GROUND-UPS Ground 50160 2007-01-10 60033 2007-02-20 100.000000 5.1213 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 38.4098 f 6.381800 \N \N \N I \N 3 4329 \N \N \N \N \N 759 97 308 2009-10-13 UPS-GROUND-UPS Ground 50199 2009-10-13 60086 2009-10-13 1000.000000 29.3750 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 2203.1250 f 8.298200 \N \N \N I \N 3 5839 2 \N \N \N \N 568 95 -1 2006-08-31 UPS-GROUND-UPS Ground 99001 2006-08-31 60027 2006-08-31 1.000000 3500.0000 -1 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 262.5000 f 0.000000 M Special Design Work-Special promo product design.\t \N I \N 1 \N \N \N \N \N \N 569 95 293 2006-10-13 UPS-GROUND-UPS Ground 50155 2006-10-13 60028 2006-10-13 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 6.381800 \N \N \N I \N 1 4229 \N \N \N \N 35 570 95 -1 2006-10-13 UPS-GROUND-UPS Ground 50155 2006-10-13 60028 2006-10-13 1.000000 45.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 45.000000 F Freight \N I \N 1 4229 \N \N \N \N 35 571 95 -1 2006-10-13 UPS-GROUND-UPS Ground 50155 2006-10-13 60028 2006-10-13 1.000000 47.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 4229 \N \N \N \N 35 572 95 300 2006-12-05 UPS-GROUND-UPS Ground 50157 2006-12-05 60029 2006-12-05 100.000000 9.8910 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 74.1825 f 6.381800 \N \N \N I \N 1 4243 \N \N \N \N 35 573 95 -1 2006-12-05 UPS-GROUND-UPS Ground 50157 2006-12-05 60029 2006-12-05 1.000000 49.4600 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 49.460000 T Sales Tax 12 I \N 1 4243 \N \N \N \N 35 574 95 293 2006-12-28 FEDEX-Ground-Fedex Ground 50158 2006-12-28 60030 2006-12-28 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 6.381800 \N \N \N I \N 1 4279 \N \N \N \N 35 575 95 -1 2006-12-28 FEDEX-Ground-Fedex Ground 50158 2006-12-28 60030 2006-12-28 1.000000 32.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 32.000000 F Freight \N I \N 1 4279 \N \N \N \N 35 576 95 -1 2006-12-28 FEDEX-Ground-Fedex Ground 50158 2006-12-28 60030 2006-12-28 1.000000 47.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 4279 \N \N \N \N 35 577 95 300 2007-01-08 UPS-GROUND-UPS Ground 50159 2007-01-08 60031 2007-01-08 50.000000 9.8910 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 37.0913 f 6.381800 \N \N \N I \N 1 4291 \N \N \N \N 35 578 95 -1 2007-01-08 UPS-GROUND-UPS Ground 50159 2007-01-08 60031 2007-01-08 1.000000 99.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 99.000000 F Freight \N I \N 1 4291 \N \N \N \N 35 579 95 -1 2007-01-08 UPS-GROUND-UPS Ground 50159 2007-01-08 60031 2007-01-08 1.000000 24.7300 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 24.730000 T Sales Tax 12 I \N 1 4291 \N \N \N \N 35 580 95 300 2007-01-08 UPS-GROUND-UPS Ground 50159 2007-01-08 60032 2007-01-08 50.000000 9.8910 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 37.0913 f 6.381800 \N \N \N I \N 1 4294 \N \N \N \N 35 581 95 -1 2007-01-08 UPS-GROUND-UPS Ground 50159 2007-01-08 60032 2007-01-08 1.000000 99.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 99.000000 F Freight \N I \N 1 4294 \N \N \N \N 35 582 95 -1 2007-01-08 UPS-GROUND-UPS Ground 50159 2007-01-08 60032 2007-01-08 1.000000 24.7300 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 24.730000 T Sales Tax 12 I \N 1 4294 \N \N \N \N 35 584 97 -1 2007-02-20 UPS-GROUND-UPS Ground 50160 2007-01-10 60033 2007-02-20 1.000000 55.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 55.000000 F Freight \N I \N 3 4329 \N \N \N \N \N 585 95 293 2007-02-20 UPS-GROUND-UPS Ground 50161 2007-02-20 60034 2007-02-20 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 71.2500 f 6.381800 \N \N \N I \N 1 4335 \N \N \N \N 35 586 95 -1 2007-02-20 UPS-GROUND-UPS Ground 50161 2007-02-20 60034 2007-02-20 1.000000 45.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 45.000000 F Freight \N I \N 1 4335 \N \N \N \N 35 587 95 -1 2007-02-20 UPS-GROUND-UPS Ground 50161 2007-02-20 60034 2007-02-20 1.000000 47.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 47.500000 T Sales Tax 12 I \N 1 4335 \N \N \N \N 35 588 95 293 2007-04-05 FEDEX - Ground-FEDEX Ground 50162 2007-04-05 60035 2007-04-05 1000.000000 9.2500 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 693.7500 f 6.381800 \N \N \N I \N 1 4358 \N \N \N \N 35 589 95 -1 2007-04-05 FEDEX - Ground-FEDEX Ground 50162 2007-04-05 60035 2007-04-05 1.000000 99.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 99.000000 F Freight \N I \N 1 4358 \N \N \N \N 35 590 95 -1 2007-04-05 FEDEX - Ground-FEDEX Ground 50162 2007-04-05 60035 2007-04-05 1.000000 462.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 462.500000 T Sales Tax 12 I \N 1 4358 \N \N \N \N 35 591 95 -1 2007-04-05 UPS-GROUND-UPS Ground 99001 2007-04-05 60036 2007-04-05 1.000000 35000.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 2625.0000 f 0.000000 M Speical Product Devel. Srvcs.-Speical Product Devel. Srvcs. \N I \N 1 4360 \N \N \N \N 35 592 95 308 2007-05-30 UPS-GROUND-UPS Ground 50163 2007-05-26 60037 2007-05-30 100.000000 40.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 303.7500 f 6.381800 \N \N \N I \N 1 4464 \N \N \N \N 35 760 97 -1 2009-10-13 UPS-GROUND-UPS Ground 50199 2009-10-13 60086 2009-10-13 1.000000 6.9400 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 6.940000 F Freight \N I \N 3 5839 1 \N \N \N \N 593 95 303 2007-05-30 UPS-GROUND-UPS Ground 50163 2007-05-26 60037 2007-05-30 100.000000 9.8910 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 74.1825 f 6.381800 \N \N \N I \N 1 4464 \N \N \N \N 35 594 95 300 2007-05-30 UPS-GROUND-UPS Ground 50163 2007-05-26 60037 2007-05-30 100.000000 9.8910 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 74.1825 f 6.381800 \N \N \N I \N 1 4464 \N \N \N \N 35 595 95 302 2007-05-30 UPS-GROUND-UPS Ground 50163 2007-05-26 60037 2007-05-30 100.000000 9.8910 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 74.1825 f 6.381800 \N \N \N I \N 1 4464 \N \N \N \N 35 596 95 -1 2007-05-30 UPS-GROUND-UPS Ground 50163 2007-05-26 60037 2007-05-30 1.000000 100.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 100.000000 F Freight \N I \N 1 4464 \N \N \N \N 35 597 95 -1 2007-05-30 UPS-GROUND-UPS Ground 50163 2007-05-26 60037 2007-05-30 1.000000 350.8700 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 0.0000 f 350.870000 T Sales Tax 12 I \N 1 4464 \N \N \N \N 35 598 97 -1 2007-05-30 \N 2007-05-30 60038 2007-05-30 1.000000 15000.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 1125.0000 f 0.000000 M Design Services-Design Services\t \N I \N 3 4467 \N \N \N \N \N 599 97 -1 2007-05-30 \N 2007-05-30 60039 2007-05-30 1.000000 10000.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 750.0000 f 0.000000 M Design Services-Design Services For Private Label Product\t \N I \N 1 4480 \N \N \N \N \N 600 97 -1 2007-05-30 \N 2007-05-30 60039 2007-05-30 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4480 \N \N \N \N \N 601 95 293 2007-05-30 UPS-GROUND-UPS Ground 50164 2007-05-30 60040 2007-05-30 100.000000 9.5000 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 71.2500 f 6.381800 \N \N \N I \N 1 4523 2 \N \N \N 36 602 95 308 2007-05-30 UPS-GROUND-UPS Ground 50164 2007-05-30 60040 2007-05-30 100.000000 40.2500 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 301.8750 f 6.381800 \N \N \N I \N 1 4523 2 \N \N \N 36 603 95 -1 2007-05-30 UPS-GROUND-UPS Ground 50164 2007-05-30 60040 2007-05-30 1.000000 100.0000 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 0.0000 f 100.000000 F Freight \N I \N 1 4523 \N \N \N \N 36 604 95 -1 2007-05-30 UPS-GROUND-UPS Ground 50164 2007-05-30 60040 2007-05-30 1.000000 0.0000 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4523 \N \N \N \N 36 605 95 -1 2007-07-04 UPS-GROUND-UPS Ground \N 2007-07-04 60041 2007-07-04 1.000000 12900.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 967.5000 f 0.000000 M Engineering Services-Engineering Services\t \N I \N 1 4532 2 \N \N \N 35 606 95 -1 2007-07-04 UPS-GROUND-UPS Ground \N 2007-07-04 60041 2007-07-04 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4532 2 \N \N \N 35 607 95 293 2007-08-31 UPS-GROUND-UPS Ground 40006 2007-08-31 60042 2007-08-31 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 71.2500 f 6.381800 \N \N \N I \N 1 4569 2 \N \N \N 35 608 95 -1 2007-08-31 UPS-GROUND-UPS Ground 40006 2007-08-31 60042 2007-08-31 1.000000 37.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 37.000000 F Freight \N I \N 1 4569 \N \N \N \N 35 609 95 -1 2007-08-31 UPS-GROUND-UPS Ground 40006 2007-08-31 60042 2007-08-31 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4569 \N \N \N \N 35 610 95 -1 2007-09-21 UPS-GROUND-UPS Ground \N 2007-09-21 60044 2007-09-21 1.000000 1000.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 75.0000 f 0.000000 M Engineering Services-Engineering Services\t \N I \N 1 4602 \N \N \N \N 35 611 95 -1 2007-09-21 UPS-GROUND-UPS Ground \N 2007-09-21 60044 2007-09-21 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4602 \N \N \N \N 35 612 95 293 2007-09-21 UPS-GROUND-UPS Ground 50165 2007-09-21 60043 2007-09-21 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 71.2500 f 6.381800 \N \N \N I \N 1 4603 2 \N \N \N 35 613 95 -1 2007-09-21 UPS-GROUND-UPS Ground 50165 2007-09-21 60043 2007-09-21 1.000000 100.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 100.000000 F Freight \N I \N 1 4603 \N \N \N \N 35 614 95 -1 2007-09-21 UPS-GROUND-UPS Ground 50165 2007-09-21 60043 2007-09-21 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4603 \N \N \N \N 35 615 97 302 2007-12-14 UPS-GROUND-UPS Ground 40007 2007-12-14 60045 2007-12-14 500.000000 5.6283 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 211.0613 f 6.381800 \N \N \N I \N 3 4660 2 \N \N \N \N 616 97 293 2007-12-14 UPS-GROUND-UPS Ground 40007 2007-12-14 60045 2007-12-14 5000.000000 4.9865 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 1869.9375 f 6.381800 \N \N \N I \N 3 4660 2 \N \N \N \N 617 97 -1 2007-12-14 UPS-GROUND-UPS Ground 40007 2007-12-14 60045 2007-12-14 1.000000 100.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 100.000000 F Freight \N I \N 3 4660 \N \N \N \N \N 618 97 -1 2007-12-14 UPS-GROUND-UPS Ground 40007 2007-12-14 60045 2007-12-14 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4660 \N \N \N \N \N 619 97 293 2007-12-14 70000 2007-12-14 -1 2007-12-14 0.000000 5.2830 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA -0.3962 f 6.381800 \N \N \N C \N 3 \N 2 \N \N \N \N 620 97 302 2007-12-14 UPS-GROUND-UPS Ground 50167 2007-12-14 60046 2007-12-14 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 6.380000 \N \N \N I \N 3 4668 2 \N \N \N \N 621 97 293 2007-12-14 UPS-GROUND-UPS Ground 50167 2007-12-14 60046 2007-12-14 10.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 6.382000 \N \N \N I \N 3 4668 2 \N \N \N \N 622 97 -1 2007-12-14 UPS-GROUND-UPS Ground 50167 2007-12-14 60046 2007-12-14 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4668 \N \N \N \N \N 623 97 308 2007-12-14 UPS-GROUND-UPS Ground 50168 2007-12-14 60047 2007-12-14 2.000000 23.0457 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 3.4569 f 6.380000 \N \N \N I \N 3 4673 2 \N \N \N \N 624 97 -1 2007-12-14 UPS-GROUND-UPS Ground 50168 2007-12-14 60047 2007-12-14 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4673 \N \N \N \N \N 625 97 322 2007-12-20 UPS-GROUND-UPS Ground 40008 2007-12-20 60048 2007-12-20 10.000000 30.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 22.5000 f 13.928300 \N \N \N I \N 3 4681 \N \N \N \N \N 626 97 -1 2007-12-20 UPS-GROUND-UPS Ground 40008 2007-12-20 60048 2007-12-20 1.000000 100.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 100.000000 F Freight \N I \N 3 4681 \N \N \N \N \N 627 97 -1 2007-12-20 UPS-GROUND-UPS Ground 40008 2007-12-20 60048 2007-12-20 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4681 \N \N \N \N \N 628 95 323 2008-03-04 UPS-GROUND-UPS Ground 50169 2008-03-04 60049 2008-03-04 3.000000 89.1000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 20.0475 f 16.383300 \N \N \N I \N 1 4738 2 \N \N \N 35 629 95 293 2008-03-04 UPS-GROUND-UPS Ground 50169 2008-03-04 60049 2008-03-04 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 71.2500 f 6.381800 \N \N \N I \N 1 4738 2 \N \N \N 35 630 95 -1 2008-03-04 UPS-GROUND-UPS Ground 50169 2008-03-04 60049 2008-03-04 1.000000 59.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 59.000000 F Freight \N I \N 1 4738 \N \N \N \N 35 631 95 -1 2008-03-04 UPS-GROUND-UPS Ground 50169 2008-03-04 60049 2008-03-04 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4738 \N \N \N \N 35 632 95 325 2008-03-04 UPS-GROUND-UPS Ground 50170 2008-03-04 60050 2008-03-04 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 16.380000 \N \N \N I \N 1 4751 2 \N \N \N 35 633 95 -1 2008-03-04 UPS-GROUND-UPS Ground 50170 2008-03-04 60050 2008-03-04 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4751 \N \N \N \N 35 634 95 293 2008-03-05 UPS-GROUND-UPS Ground 50172 2008-03-05 60052 2008-03-05 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 71.2500 f 6.381800 \N \N \N I \N 1 4781 2 \N \N \N 35 635 95 -1 2008-03-05 UPS-GROUND-UPS Ground 50172 2008-03-05 60052 2008-03-05 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4781 \N \N \N \N 35 636 95 323 2008-03-05 UPS-GROUND-UPS Ground 50173 2008-03-05 60053 2008-03-05 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 16.380000 \N \N \N I \N 1 4786 2 \N \N \N 35 637 95 -1 2008-03-05 UPS-GROUND-UPS Ground 50173 2008-03-05 60053 2008-03-05 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4786 \N \N \N \N 35 639 97 -1 2008-03-04 UPS-GROUND-UPS Ground 50171 2008-03-04 60051 2008-03-04 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4791 \N \N \N \N \N 640 97 300 2008-04-04 UPS-GROUND-UPS Ground 50174 2008-04-04 60054 2008-04-04 1000.000000 5.2730 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 395.4750 f 6.381800 \N \N \N I \N 3 4808 2 \N \N \N \N 641 97 -1 2008-04-04 UPS-GROUND-UPS Ground 50174 2008-04-04 60054 2008-04-04 1.000000 200.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 200.000000 F Freight \N I \N 3 4808 \N \N \N \N \N 642 97 -1 2008-04-04 UPS-GROUND-UPS Ground 50174 2008-04-04 60054 2008-04-04 1.000000 2000.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 2000.000000 M Setup Charge 108 I \N 3 4808 \N \N \N \N \N 643 97 -1 2008-04-04 UPS-GROUND-UPS Ground 50174 2008-04-04 60054 2008-04-04 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4808 \N \N \N \N \N 750 97 -1 2009-09-21 UPS-GROUND-UPS Ground 50196 2009-09-21 60082 2009-09-21 1.000000 13020.8300 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 13020.830000 F Freight \N I \N 3 5620 1 \N \N \N \N 644 97 308 2008-06-12 UPS-GROUND-UPS Ground 50175 2008-06-12 60055 2008-06-12 1.000000 21.5909 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 1.6193 f 6.380000 \N \N \N I \N 3 4815 2 \N \N \N \N 645 97 -1 2008-06-12 UPS-GROUND-UPS Ground 50175 2008-06-12 60055 2008-06-12 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4815 \N \N \N \N \N 646 95 -1 2008-06-12 UPS-GROUND-UPS Ground \N 2008-06-12 60056 2008-06-12 1.000000 10000.0000 -1 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 750.0000 f 0.000000 M Special Design Services-Special Design Services\t \N I \N 1 4817 2 \N \N \N \N 647 95 -1 2008-06-12 UPS-GROUND-UPS Ground \N 2008-06-12 60056 2008-06-12 1.000000 0.0000 -1 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4817 2 \N \N \N \N 648 97 328 2008-06-12 UPS-GROUND-UPS Ground 50176 2008-06-12 60057 2008-06-12 1.000000 16.5530 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 1.2415 f 23.689300 \N \N \N I \N 3 4906 2 \N \N \N \N 649 97 -1 2008-06-12 UPS-GROUND-UPS Ground 50176 2008-06-12 60057 2008-06-12 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4906 \N \N \N \N \N 650 97 293 2008-06-12 UPS-GROUND-UPS Ground 50177 2008-06-12 60058 2008-06-12 50.000000 4.9495 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 18.5606 f 18634.000000 \N \N \N I \N 3 4911 2 \N \N \N \N 651 97 -1 2008-06-12 UPS-GROUND-UPS Ground 50177 2008-06-12 60058 2008-06-12 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 4911 \N \N \N \N \N 652 95 293 2008-06-12 UPS-GROUND-UPS Ground 40009 2008-06-12 60059 2008-06-12 50.000000 9.8000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 36.7500 f 18634.000000 \N \N \N I \N 1 4915 2 \N \N \N 35 653 95 -1 2008-06-12 UPS-GROUND-UPS Ground 40009 2008-06-12 60059 2008-06-12 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4915 \N \N \N \N 35 654 95 328 2008-06-18 UPS-GROUND-UPS Ground 50178 2008-06-18 60060 2008-06-18 100.000000 31.0500 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 232.8750 f 1.880000 \N \N \N I \N 1 4936 2 \N \N \N 35 655 95 -1 2008-06-18 UPS-GROUND-UPS Ground 50178 2008-06-18 60060 2008-06-18 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 4936 \N \N \N \N 35 706 97 -1 2008-12-31 UPS-GROUND-UPS Ground 50189 2008-12-30 60073 2008-12-31 1.000000 0.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 5272 \N \N \N \N \N 656 97 328 2008-06-19 UPS-GROUND-UPS Ground 50179 2008-06-19 60061 2008-06-19 1000.000000 16.3787 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 1228.4025 f 1.700000 \N \N \N I \N 3 5026 2 \N \N \N \N 657 97 293 2008-06-19 UPS-GROUND-UPS Ground 50179 2008-06-19 60061 2008-06-19 1000.000000 4.6717 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 350.3775 f 1.863400 \N \N \N I \N 3 5026 2 \N \N \N \N 658 97 308 2008-06-19 UPS-GROUND-UPS Ground 50179 2008-06-19 60061 2008-06-19 1000.000000 21.3636 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 1602.2700 f 8.348200 \N \N \N I \N 3 5026 2 \N \N \N \N 659 97 -1 2008-06-19 UPS-GROUND-UPS Ground 50179 2008-06-19 60061 2008-06-19 1.000000 150.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 150.000000 F Freight \N I \N 3 5026 \N \N \N \N \N 660 97 -1 2008-06-19 UPS-GROUND-UPS Ground 50179 2008-06-19 60061 2008-06-19 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 5026 \N \N \N \N \N 661 95 328 2008-06-19 UPS-GROUND-UPS Ground 50180 2008-06-19 60062 2008-06-19 99.000000 28.8000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 213.8400 f 1.544000 \N \N \N I \N 1 5050 2 \N \N \N 35 662 95 -1 2008-06-19 UPS-GROUND-UPS Ground 50180 2008-06-19 60062 2008-06-19 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5050 \N \N \N \N 35 663 95 323 2008-06-20 UPS-GROUND-UPS Ground 50181 2008-06-20 60063 2008-06-20 1.000000 89.1000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 6.6825 f 11.860000 \N \N \N I \N 1 5060 2 \N \N \N 35 664 95 -1 2008-06-20 UPS-GROUND-UPS Ground 50181 2008-06-20 60063 2008-06-20 1.000000 15.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 15.000000 F Freight \N I \N 1 5060 \N \N \N \N 35 665 95 -1 2008-06-20 UPS-GROUND-UPS Ground 50181 2008-06-20 60063 2008-06-20 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5060 \N \N \N \N 35 666 95 293 2008-06-20 UPS-GROUND-UPS Ground 50182 2008-06-20 60064 2008-06-20 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 71.2500 f 2.563400 \N \N \N I \N 1 5097 2 \N \N \N 35 667 95 -1 2008-06-20 UPS-GROUND-UPS Ground 50182 2008-06-20 60064 2008-06-20 1.000000 27.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 27.000000 F Freight \N I \N 1 5097 \N \N \N \N 35 668 95 -1 2008-06-20 UPS-GROUND-UPS Ground 50182 2008-06-20 60064 2008-06-20 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5097 \N \N \N \N 35 669 95 300 2008-07-15 UPS-GROUND-UPS Ground 50183 2008-09-08 60065 2008-07-15 3000.000000 15.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3375.0000 f 2.567800 \N \N \N I \N 1 5112 2 \N \N \N 35 670 95 -1 2008-07-15 UPS-GROUND-UPS Ground 50183 2008-09-08 60065 2008-07-15 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5112 \N \N \N \N 35 671 95 300 2008-09-08 UPS-GROUND-UPS Ground 50183 2008-09-08 60066 2008-09-08 4000.000000 9.8910 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 2967.3000 f 2.567800 \N \N \N I \N 1 5117 2 \N \N \N 35 672 95 -1 2008-09-08 UPS-GROUND-UPS Ground 50183 2008-09-08 60066 2008-09-08 1.000000 150.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 150.000000 F Freight \N I \N 1 5117 \N \N \N \N 35 673 95 -1 2008-09-08 UPS-GROUND-UPS Ground 50183 2008-09-08 60066 2008-09-08 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5117 \N \N \N \N 35 674 95 300 2008-09-08 UPS-GROUND-UPS Ground 50183 2008-09-08 60067 2008-09-08 3000.000000 15.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3375.0000 f 2.567800 \N \N \N I \N 1 5120 2 \N \N \N 35 675 95 -1 2008-09-08 UPS-GROUND-UPS Ground 50183 2008-09-08 60067 2008-09-08 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5120 \N \N \N \N 35 676 95 330 2008-09-09 UPS-GROUND-UPS Ground 50184 2008-09-09 60068 2008-09-09 1.000000 27.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 2.0250 f \N \N \N \N I \N 1 5147 2 \N \N \N 35 677 95 299 2008-09-09 UPS-GROUND-UPS Ground 50184 2008-09-09 60068 2008-09-09 4.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.100000 \N \N \N I \N 1 5147 \N \N \N \N 35 678 95 310 2008-09-09 UPS-GROUND-UPS Ground 50184 2008-09-09 60068 2008-09-09 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.250000 \N \N \N I \N 1 5147 \N \N \N \N 35 679 95 312 2008-09-09 UPS-GROUND-UPS Ground 50184 2008-09-09 60068 2008-09-09 4.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 1.037500 \N \N \N I \N 1 5147 \N \N \N \N 35 680 95 305 2008-09-09 UPS-GROUND-UPS Ground 50184 2008-09-09 60068 2008-09-09 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 2.330000 \N \N \N I \N 1 5147 \N \N \N \N 35 681 95 318 2008-09-09 UPS-GROUND-UPS Ground 50184 2008-09-09 60068 2008-09-09 0.050000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 15.000000 \N \N \N I \N 1 5147 \N \N \N \N 35 682 95 -1 2008-09-09 UPS-GROUND-UPS Ground 50184 2008-09-09 60068 2008-09-09 1.000000 10.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 10.000000 F Freight \N I \N 1 5147 \N \N \N \N 35 683 95 -1 2008-09-09 UPS-GROUND-UPS Ground 50184 2008-09-09 60068 2008-09-09 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5147 \N \N \N \N 35 684 95 330 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 100.000000 27.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 1.8900 f \N \N \N \N I \N 1 5209 2 \N \N \N 35 685 95 293 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 100.000000 9.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.6650 f 2.563400 \N \N \N I \N 1 5209 2 \N \N \N 35 686 95 299 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 400.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.100000 \N \N \N I \N 1 5209 \N \N \N \N 35 687 95 310 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 100.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.250000 \N \N \N I \N 1 5209 \N \N \N \N 35 688 95 312 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 400.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 1.038700 \N \N \N I \N 1 5209 \N \N \N \N 35 689 95 305 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 100.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 2.330000 \N \N \N I \N 1 5209 \N \N \N \N 35 690 95 323 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 3.000000 89.1000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.1871 f 12.563300 \N \N \N I \N 1 5209 2 \N \N \N 35 691 95 318 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 5.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 14.900000 \N \N \N I \N 1 5209 \N \N \N \N 35 692 95 -1 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 1.000000 100.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 100.000000 F Freight \N I \N 1 5209 \N \N \N \N 35 693 95 -1 2008-10-02 UPS-GROUND-UPS Ground 40010 2008-10-02 60069 2008-10-02 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5209 \N \N \N \N 35 694 97 328 2008-10-02 UPS-GROUND-UPS Ground 50185 2008-10-02 60070 2008-10-02 10.000000 17.8920 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.1252 f 6.260100 \N \N \N I \N 3 5217 2 \N \N \N \N 695 97 -1 2008-10-02 UPS-GROUND-UPS Ground 50185 2008-10-02 60070 2008-10-02 1.000000 35.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 35.000000 F Freight \N I \N 3 5217 \N \N \N \N \N 696 97 -1 2008-10-02 UPS-GROUND-UPS Ground 50185 2008-10-02 60070 2008-10-02 1.000000 0.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 5217 \N \N \N \N \N 697 95 303 2008-10-02 UPS-GROUND-UPS Ground 50186 2008-10-02 60071 2008-10-02 1000.000000 18.0000 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 12.6000 f 2.567800 \N \N \N I \N 1 5235 2 \N \N \N 36 698 95 302 2008-10-02 UPS-GROUND-UPS Ground 50186 2008-10-02 60071 2008-10-02 1000.000000 9.8910 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 6.9237 f 2.567800 \N \N \N I \N 1 5235 2 \N \N \N 36 699 95 300 2008-10-02 UPS-GROUND-UPS Ground 50186 2008-10-02 60071 2008-10-02 1100.000000 15.0000 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 11.5500 f 2.567800 \N \N \N I \N 1 5235 2 \N \N \N 36 700 95 -1 2008-10-02 UPS-GROUND-UPS Ground 50186 2008-10-02 60071 2008-10-02 1.000000 300.0000 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 0.0000 f 300.000000 F Freight \N I \N 1 5235 \N \N \N \N 36 701 95 -1 2008-10-02 UPS-GROUND-UPS Ground 50186 2008-10-02 60071 2008-10-02 1.000000 0.0000 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5235 \N \N \N \N 36 702 97 -1 2008-10-02 \N 2008-10-02 60072 2008-10-02 1.000000 25000.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 1875.0000 f 0.000000 M Pruduct Design Services-Pruduct Design Services \N I \N 3 5236 \N \N \N \N \N 703 97 -1 2008-10-02 \N 2008-10-02 60072 2008-10-02 1.000000 0.0000 -1 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 5236 \N \N \N \N \N 707 97 308 2008-12-31 UPS-GROUND-UPS Ground 50190 2008-12-31 60074 2008-12-31 5050.000000 29.3748 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 11125.7055 f 8.298200 \N \N \N I \N 3 5280 2 \N \N \N \N 708 97 -1 2008-12-31 UPS-GROUND-UPS Ground 50190 2008-12-31 60074 2008-12-31 1.000000 0.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 5280 \N \N \N \N \N 709 95 303 2008-12-31 UPS-GROUND-UPS Ground \N 2008-12-31 60075 2008-12-31 5000.000000 9.8910 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3709.1250 f \N \N \N \N I \N 1 5292 2 \N \N \N 35 710 95 -1 2008-12-31 UPS-GROUND-UPS Ground \N 2008-12-31 60075 2008-12-31 1.000000 25000.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 1875.0000 f 0.000000 M Design Services-Design Services \N I \N 1 5292 \N \N \N \N 35 711 95 -1 2008-12-31 UPS-GROUND-UPS Ground \N 2008-12-31 60075 2008-12-31 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5292 \N \N \N \N 35 712 97 300 2009-01-12 UPS-GROUND-UPS Ground 50191 2009-01-12 60076 2009-01-12 1000.000000 7.1740 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 538.0500 f 2.567800 \N \N \N I \N 3 5311 2 \N \N \N \N 713 97 302 2009-01-12 UPS-GROUND-UPS Ground 50191 2009-01-12 60076 2009-01-12 1000.000000 7.1740 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 538.0500 f 2.567800 \N \N \N I \N 3 5311 2 \N \N \N \N 714 97 303 2009-01-12 UPS-GROUND-UPS Ground 50191 2009-01-12 60076 2009-01-12 1000.000000 7.1740 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 538.0500 f 2.567800 \N \N \N I \N 3 5311 2 \N \N \N \N 715 97 -1 2009-01-12 UPS-GROUND-UPS Ground 50191 2009-01-12 60076 2009-01-12 1.000000 500.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 500.000000 F Freight \N I \N 3 5311 \N \N \N \N \N 716 97 -1 2009-01-12 UPS-GROUND-UPS Ground 50191 2009-01-12 60076 2009-01-12 1.000000 0.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 5311 \N \N \N \N \N 717 95 323 2009-01-12 UPS-GROUND-UPS Ground 50192 2009-01-12 60077 2009-01-12 1.000000 89.1000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 6.6825 f 12.563400 \N \N \N I \N 1 5315 2 \N \N \N 35 718 95 -1 2009-01-12 UPS-GROUND-UPS Ground 50192 2009-01-12 60077 2009-01-12 1.000000 7.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 7.500000 F Freight \N I \N 1 5315 \N \N \N \N 35 719 95 -1 2009-01-12 UPS-GROUND-UPS Ground 50192 2009-01-12 60077 2009-01-12 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5315 \N \N \N \N 35 723 97 323 2009-01-12 UPS-GROUND-UPS Ground 50193 2009-01-12 60078 2009-01-12 1.000000 64.6246 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 4.8468 f 12.563400 \N \N \N I \N 3 5319 2 \N \N \N \N 724 97 -1 2009-01-12 UPS-GROUND-UPS Ground 50193 2009-01-12 60078 2009-01-12 1.000000 5.2100 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 5.210000 F Freight \N I \N 3 5319 \N \N \N \N \N 725 97 -1 2009-01-12 UPS-GROUND-UPS Ground 50193 2009-01-12 60078 2009-01-12 1.000000 0.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 5319 \N \N \N \N \N 726 95 -1 2009-01-01 UPS-GROUND-UPS Ground \N 2009-01-01 60079 2009-01-01 1.000000 50000.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3750.0000 f 0.000000 M Design Services-Design Services \N I \N 1 5326 \N \N \N \N 35 727 95 -1 2009-01-01 UPS-GROUND-UPS Ground \N 2009-01-01 60079 2009-01-01 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5326 \N \N \N \N 35 728 97 303 2009-06-26 UPS-GROUND-UPS Ground 50194 2009-06-26 60080 2009-06-26 300.000000 7.1740 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys Corporate Headquarters 1 Extra Way Suite 200 Reading Berkshire RG6 1RA 161.4150 f 2.567800 \N \N \N I \N 3 5364 2 \N \N \N \N 729 97 302 2009-06-26 UPS-GROUND-UPS Ground 50194 2009-06-26 60080 2009-06-26 400.000000 7.1740 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys Corporate Headquarters 1 Extra Way Suite 200 Reading Berkshire RG6 1RA 215.2200 f 2.567800 \N \N \N I \N 3 5364 2 \N \N \N \N 730 97 300 2009-06-26 UPS-GROUND-UPS Ground 50194 2009-06-26 60080 2009-06-26 300.000000 7.1740 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys Corporate Headquarters 1 Extra Way Suite 200 Reading Berkshire RG6 1RA 161.4150 f 2.567800 \N \N \N I \N 3 5364 2 \N \N \N \N 731 97 -1 2009-06-26 UPS-GROUND-UPS Ground 50194 2009-06-26 60080 2009-06-26 1.000000 2604.1500 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys Corporate Headquarters 1 Extra Way Suite 200 Reading Berkshire RG6 1RA 0.0000 f 2604.150000 F Freight \N I \N 3 5364 \N \N \N \N \N 732 97 -1 2009-06-26 UPS-GROUND-UPS Ground 50194 2009-06-26 60080 2009-06-26 1.000000 0.0000 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys Corporate Headquarters 1 Extra Way Suite 200 Reading Berkshire RG6 1RA 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 3 5364 \N \N \N \N \N 733 95 293 2009-08-13 UPS-GROUND-UPS Ground 50195 2009-08-13 60081 2009-08-13 10000.000000 9.2500 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 6937.5000 f 2.563400 \N \N \N I \N 1 5419 2 \N \N \N 35 734 95 -1 2009-08-13 UPS-GROUND-UPS Ground 50195 2009-08-13 60081 2009-08-13 1.000000 18750.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 18750.000000 F Freight \N I \N 1 5419 \N \N \N \N 35 735 95 -1 2009-08-13 UPS-GROUND-UPS Ground 50195 2009-08-13 60081 2009-08-13 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 0.000000 T Misc Tax Adjustment \N I \N 1 5419 \N \N \N \N 35 736 102 302 2009-09-21 Retail Sale 100001 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5554 \N \N \N \N \N 737 102 336 2009-09-21 Retail Sale 100002 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5554 2 \N \N \N \N 738 102 336 2009-09-21 Retail Sale 100003 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5554 2 \N \N \N \N 739 102 336 2009-09-21 Retail Sale 100004 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5554 2 \N \N \N \N 740 102 336 2009-09-21 Retail Sale 100005 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5554 2 \N \N \N \N 741 102 332 2009-09-21 Retail Sale 100007 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 30 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.0000 f 2.563400 \N \N \N R \N \N 1 5575 2 \N \N \N \N 742 102 336 2009-09-21 Retail Sale 100008 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 30 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.0000 f 2.567800 \N \N \N R \N \N 1 5575 2 \N \N \N \N 743 102 332 2009-09-21 Retail Sale 100009 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.563400 \N \N \N R \N \N 1 5575 2 \N \N \N \N 744 102 335 2009-09-21 Retail Sale 100009 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5575 2 \N \N \N \N 745 102 336 2009-09-21 Retail Sale 100009 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5575 2 \N \N \N \N 746 102 338 2009-09-21 Retail Sale 100009 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5575 2 \N \N \N \N 747 102 336 2009-09-21 Retail Sale 100010 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5583 2 \N \N \N \N 748 102 336 2009-09-21 Retail Sale 100011 2009-09-21 \N 2009-09-21 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5588 2 \N \N \N \N 749 97 293 2009-09-21 UPS-GROUND-UPS Ground 50196 2009-09-21 60082 2009-09-21 5000.000000 7.1740 \N 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 2690.2500 f 2.563400 \N \N \N I \N 3 5620 2 \N \N \N \N 751 95 -1 2009-09-22 UPS-GROUND-UPS Ground \N 2009-09-22 60083 2009-09-22 1.000000 10000.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 750.0000 f 0.000000 M Product Design-Product Design \N I \N 1 5634 \N 2 \N \N 35 752 95 -1 2009-09-22 2009-09-22 20020 2009-09-22 1.000000 2500.0000 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N 187.5000 f 0.000000 M A/R Misc Debit Memo \N D \N 1 5638 \N \N \N \N \N 753 95 -1 2009-09-22 UPS-GROUND-UPS Ground \N 2009-09-22 60084 2009-09-22 1.000000 45000.0000 -1 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 3375.0000 f 0.000000 M Product Design-Private Label Product Design\t \N I \N 1 5644 \N 2 \N \N \N 754 102 335 2009-09-23 Retail Sale 100012 2009-09-23 \N 2009-09-23 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5655 2 \N \N \N \N 755 102 336 2009-09-23 Retail Sale 100013 2009-09-23 \N 2009-09-23 1.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 0.7693 f 2.567800 \N \N \N R \N \N 1 5655 2 \N \N \N \N 756 95 -1 2009-09-25 2009-09-25 20021 2009-09-25 1.000000 -119.0000 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -8.9250 f 0.000000 M A/R Misc Credit Memo \N M \N 1 5702 \N \N \N \N \N 757 95 308 2009-09-25 UPS-GROUND-UPS Ground 50197 2009-09-25 60085 2009-09-25 10.000000 40.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 30.3750 f 8.298200 \N \N \N I \N 1 5723 2 2 \N \N 35 758 95 -1 2009-09-25 UPS-GROUND-UPS Ground 50197 2009-09-25 60085 2009-09-25 1.000000 10.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 10.000000 F Freight \N I \N 1 5723 1 2 \N \N 35 761 95 293 2009-10-13 UPS-GROUND-UPS Ground 50198 2009-10-13 60087 2009-10-13 5000.000000 9.2500 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3468.7500 f 2.563400 \N \N \N I \N 1 5842 2 2 \N \N 35 762 95 -1 2009-10-13 UPS-GROUND-UPS Ground 50198 2009-10-13 60087 2009-10-13 1.000000 9375.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 9375.000000 F Freight \N I \N 1 5842 1 2 \N \N 35 763 102 332 2009-10-13 Retail Sale 100014 2009-10-13 \N 2009-10-13 40.000000 10.9900 \N 31 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk 23180 \N \N \N \N \N \N \N 30.7720 f 2.563400 \N \N \N R \N \N 1 5850 2 \N \N \N \N 764 95 380 2009-12-03 UPS-GROUND-UPS Ground \N 2009-12-03 60088 2009-12-03 10.000000 202.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 151.8750 f 0.000000 \N \N \N I \N 1 5861 \N 2 \N \N 35 765 95 293 2009-12-03 UPS-GROUND-UPS Ground 50200 2009-12-03 60089 2009-12-03 10000.000000 9.2500 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 6937.5000 f 2.563400 \N \N \N I \N 1 5898 2 2 \N \N 35 766 95 -1 2009-12-03 UPS-GROUND-UPS Ground 50200 2009-12-03 60089 2009-12-03 1.000000 18750.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 18750.000000 F Freight \N I \N 1 5898 1 2 \N \N 35 767 102 332 2010-01-05 Retail Sale 100001 2010-01-05 \N 2010-01-05 1.000000 10.9900 \N 30 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk AA 23180 \N \N \N \N \N \N \N 0.0000 f 2.563400 \N \N \N R \N \N 1 5905 2 \N \N \N \N 768 102 332 2010-01-05 Retail Sale 100002 2010-01-05 \N 2010-01-05 1.000000 10.9900 \N 30 \N f Master Prodiem Toys Retail Customer Prodiem Toys Inc. 1 Playland Way Norfolk AA 23180 \N \N \N \N \N \N \N 0.0000 f 2.563400 \N \N \N R \N \N 1 5905 2 \N \N \N \N 769 95 381 2010-03-10 UPS-GROUND-UPS Ground 50201 2010-03-10 60090 2010-03-10 1000.000000 49.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3712.5000 f 22.000000 \N \N \N I \N 1 5915 \N 2 \N \N 35 770 95 -1 2010-03-10 2010-03-10 20024 2010-03-10 1.000000 -990.0000 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -74.2500 f 0.000000 M A/R Misc Credit Memo \N C \N 1 5917 \N \N \N \N \N 771 95 293 2010-03-12 UPS-GROUND-UPS Ground 50202 2010-03-12 60091 2010-03-12 5.000000 9.8000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3.6750 f 2.563400 \N \N \N I \N 1 5948 2 2 \N \N 35 772 95 293 2010-03-12 UPS-GROUND-UPS Ground 50202 2010-03-12 60091 2010-03-12 1000.000000 9.2500 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 693.7500 f 2.563400 \N \N \N I \N 1 5948 2 2 \N \N 35 773 95 -1 2010-03-12 UPS-GROUND-UPS Ground 50202 2010-03-12 60091 2010-03-12 1.000000 1758.7500 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 1758.750000 F Freight \N I \N 1 5948 1 2 \N \N 35 774 95 -1 2010-03-12 2010-03-12 20025 2010-03-12 1.000000 -239.7500 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -17.9813 f 0.000000 M A/R Misc Credit Memo \N C \N 1 5950 \N \N \N \N \N 775 95 380 2010-01-01 UPS-GROUND-UPS Ground \N 2010-01-01 60092 2010-01-01 10.000000 202.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 151.8750 f 0.000000 \N \N \N I \N 1 5956 \N 2 \N \N 35 776 95 323 2010-03-12 UPS-GROUND-UPS Ground 50204 2010-03-12 60093 2010-03-12 1.000000 0.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 12.563400 \N \N \N I \N 1 5961 2 2 \N \N 35 777 97 381 2010-04-02 UPS-GROUND-UPS Ground 40011 2010-04-02 60094 2010-04-02 1000.000000 31.9136 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 22.000000 \N \N \N I \N 3 5969 \N 1 \N \N \N 778 97 -1 2010-04-02 2010-04-02 20026 2010-04-02 1.000000 -638.2700 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -47.8703 f 0.000000 M A/R Misc Credit Memo \N C \N 3 5973 \N \N \N \N \N 779 95 381 2010-06-07 UPS-GROUND-UPS Ground 40012 2010-06-07 60095 2010-06-07 2000.000000 49.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 7425.0000 f 22.000000 \N \N \N I \N 1 5981 \N 2 \N \N 35 780 95 381 2010-09-07 UPS-GROUND-UPS Ground 50206 2010-09-07 60096 2010-09-07 2000.000000 49.5000 33 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 7425.0000 f 22.000000 \N \N \N I \N 1 6059 \N 1 \N \N 36 781 95 381 2010-09-07 UPS-GROUND-UPS Ground 50207 2010-07-06 60097 2010-09-07 4000.000000 49.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 14850.0000 f 22.000000 \N \N \N I \N 1 6060 \N 2 \N \N 35 782 95 381 2010-09-07 UPS-GROUND-UPS Ground 50208 2010-08-01 60098 2010-09-07 3000.000000 49.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 11137.5000 f 22.000000 \N \N \N I \N 1 6061 \N 2 \N \N 35 783 95 293 2010-07-30 UPS-GROUND-UPS Ground 50209 2010-09-08 60099 2010-07-30 5000.000000 9.2500 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3468.7500 f 2.563400 \N \N \N I \N 1 6078 2 2 \N \N 35 784 95 -1 2010-07-30 UPS-GROUND-UPS Ground 50209 2010-09-08 60099 2010-07-30 1.000000 4375.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 4375.000000 F Freight \N I \N 1 6078 1 2 \N \N 35 785 97 293 2010-09-08 UPS-GROUND-UPS Ground 50210 2010-09-08 60100 2010-09-08 10000.000000 6.3769 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 2.563400 \N \N \N I \N 3 6108 2 \N \N \N \N 786 97 -1 2010-09-08 UPS-GROUND-UPS Ground 50210 2010-09-08 60100 2010-09-08 1.000000 21604.9400 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 21604.940000 F Freight \N I \N 3 6108 1 \N \N \N \N 787 97 -1 2010-09-08 2010-09-08 20029 2010-09-08 1.000000 -1707.4800 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -128.0610 f 0.000000 M A/R Misc Credit Memo \N C \N 3 6110 \N \N \N \N \N 788 97 293 2010-11-04 UPS-GROUND-UPS Ground 50213 2010-11-04 60101 2010-11-04 100.000000 6.3769 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 2.563400 \N \N \N I \N 3 6165 2 \N \N \N \N 789 97 -1 2010-11-04 UPS-GROUND-UPS Ground 50213 2010-11-04 60101 2010-11-04 1.000000 216.0500 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 216.050000 F Freight \N I \N 3 6165 1 \N \N \N \N 790 95 -1 2010-11-04 UPS-GROUND-UPS Ground \N 2010-11-04 60102 2010-11-04 1.000000 10000.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 750.0000 f 0.000000 M Product Design Services-Product Design Services \N I \N 1 6166 \N 2 \N \N 35 791 95 -1 2010-11-04 2010-11-04 20030 2010-11-04 1.000000 -200.0000 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -15.0000 f 0.000000 M A/R Misc Credit Memo \N C \N 1 6168 \N \N \N \N \N 792 97 -1 2010-11-04 2010-11-04 20032 2010-11-04 1.000000 -17.0700 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -1.2803 f 0.000000 M A/R Misc Credit Memo \N C \N 3 6171 \N \N \N \N \N 793 97 -1 2010-11-12 UPS-GROUND-UPS Ground \N 2010-11-12 60103 2010-11-12 1.000000 40000.0000 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 0.000000 M Product Development-Product Development \N I \N 3 6173 \N \N \N \N \N 794 97 -1 2010-12-30 UPS-GROUND-UPS Ground \N 2010-12-30 60104 2010-12-30 40.000000 180.0000 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 0.000000 M Design Services-Design Services \N I \N 3 6176 \N \N \N \N \N 795 95 381 2010-11-04 UPS-GROUND-UPS Ground 50212 2010-12-30 60106 2010-11-04 2500.000000 49.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 9281.2500 f 22.000000 \N \N \N I \N 1 6180 \N 2 \N \N 35 796 95 381 2010-12-30 UPS-GROUND-UPS Ground 50214 2010-12-30 60105 2010-12-30 1000.000000 49.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 3712.5000 f 22.000000 \N \N \N I \N 1 6181 \N 2 \N \N 35 797 95 380 2010-12-30 2010-12-30 60107 2010-12-30 18.000000 175.0000 -1 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 236.2500 f 0.000000 \N \N \N I \N 1 6184 \N 2 \N \N \N 798 95 382 2010-12-30 2010-12-30 60107 2010-12-30 1.000000 275.0000 -1 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 20.6250 f 0.000000 \N \N \N I \N 1 6184 \N 2 \N \N \N 799 95 383 2010-12-30 2010-12-30 60107 2010-12-30 355.000000 0.5100 -1 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 13.5788 f 0.000000 \N \N \N I \N 1 6184 \N 2 \N \N \N 800 95 -1 2011-03-07 UPS-GROUND-UPS Ground \N 2011-03-07 60108 2011-01-01 1.000000 100000.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 7500.0000 f 0.000000 M Special Services-Services\t \N I \N 1 6187 2 2 \N \N 35 801 97 -1 2011-03-07 UPS-GROUND-UPS Ground \N 2011-03-07 60109 2011-02-01 1.000000 65000.0000 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 0.000000 M Design Services-Design Services\t \N I \N 3 6188 \N \N \N \N \N 802 95 381 2011-03-07 UPS-GROUND-UPS Ground 50215 2011-03-07 60110 2011-03-07 5000.000000 49.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 18562.5000 f 22.000000 \N \N \N I \N 1 6196 2 2 \N \N 35 803 95 -1 2011-03-07 UPS-GROUND-UPS Ground 50215 2011-03-07 60110 2011-03-07 1.000000 1500.0000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 0.0000 f 1500.000000 F Freight \N I \N 1 6196 1 2 \N \N 35 804 95 -1 2011-03-07 2011-03-07 20035 2011-03-07 1.000000 -361.0900 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -27.0818 f 0.000000 M A/R Misc Credit Memo \N C \N 1 6198 \N \N \N \N \N 805 123 308 2011-04-18 FEDEX - Ground-FEDEX Ground 50217 2011-04-18 60111 2011-04-18 1000.000000 32.6087 35 29 \N f Vienna Collectables Ungargasse 60 Vienna Austria 1030 Vienna Collectibles Headquarters Ungargasse 60 Vienna Austria 1030 0.0000 f 8.298200 \N \N \N I \N 123012 2 6243 2 \N \N \N \N 806 123 381 2011-04-18 FEDEX - Ground-FEDEX Ground 50217 2011-04-18 60111 2011-04-18 1000.000000 39.8551 35 29 \N f Vienna Collectables Ungargasse 60 Vienna Austria 1030 Vienna Collectibles Headquarters Ungargasse 60 Vienna Austria 1030 0.0000 f 22.000000 \N \N \N I \N 123012 2 6243 \N \N \N \N \N 807 123 -1 2011-04-18 FEDEX - Ground-FEDEX Ground 50217 2011-04-18 60111 2011-04-18 1.000000 500.0000 35 29 \N f Vienna Collectables Ungargasse 60 Vienna Austria 1030 Vienna Collectibles Headquarters Ungargasse 60 Vienna Austria 1030 0.0000 f 500.000000 F Freight \N I \N 123012 2 6243 1 \N \N \N \N 808 97 381 2011-04-18 UPS-GROUND-UPS Ground 50211 2011-04-06 60112 2011-04-18 100.000000 31.9136 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 22.000000 \N \N \N I \N 3 6244 \N \N \N \N \N 809 97 -1 2011-04-18 UPS-GROUND-UPS Ground 50211 2011-04-06 60112 2011-04-18 1.000000 200.0000 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 200.000000 F Freight \N I \N 3 6244 1 \N \N \N \N 811 97 -1 2011-04-18 2011-04-18 20037 2011-04-18 1.000000 -67.8300 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -5.0873 f 0.000000 M A/R Misc Credit Memo \N C \N 3 6248 \N \N \N \N \N 812 123 380 2011-04-18 2011-04-18 60113 2011-04-18 50.000000 108.7000 -1 29 \N f Vienna Collectables Ungargasse 60 Vienna Austria 1030 407.6250 f 0.000000 \N \N \N I \N 2 6279 \N \N \N \N \N 813 95 381 2011-06-03 UPS-GROUND-UPS Ground 50219 2011-05-04 60114 2011-06-03 3000.000000 49.5000 31 29 \N f Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 11137.5000 f 22.000000 \N \N \N I \N 1 6287 \N 2 \N \N 35 814 95 -1 2011-06-03 2011-06-03 20038 2011-06-03 1.000000 -2970.0000 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -222.7500 f 0.000000 M A/R Misc Credit Memo \N C \N 1 6289 \N \N \N \N \N 816 97 381 2011-06-03 UPS-GROUND-UPS Ground 50220 2011-06-03 60115 2011-06-03 7000.000000 32.1118 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 22.000000 \N \N \N I \N 3 6298 \N \N \N \N \N 817 97 -1 2011-06-03 UPS-GROUND-UPS Ground 50220 2011-06-03 60115 2011-06-03 1.000000 5000.0000 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 5000.000000 F Freight \N I \N 3 6298 1 \N \N \N \N 818 97 -1 2011-06-03 UPS-GROUND-UPS Ground 50220 2011-06-03 60115 2011-06-03 1.000000 -115000.0000 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f -115000.000000 M Adjustment For Initial Order 123 I \N 3 6298 \N \N \N \N \N 819 97 381 2011-05-30 UPS-GROUND-UPS Ground 50221 2011-05-04 60116 2011-05-30 5000.000000 32.1118 34 29 \N f Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 0.0000 f 22.000000 \N \N \N I \N 3 6307 \N \N \N \N \N 820 97 -1 2011-05-31 2011-05-31 20040 2011-05-31 1.000000 -3211.1800 -1 29 \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N -240.8385 f 0.000000 M A/R Misc Credit Memo \N C \N 3 6309 \N \N \N \N \N 815 95 -1 2011-06-03 2011-06-03 20039 2011-06-03 1.000000 -2970.0000 -1 \N \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N 0.0000 f 0.000000 M A/R Misc Credit Memo \N C \N 1 6290 \N \N \N \N \N 821 97 -1 2011-05-31 2011-05-31 20041 2011-05-31 1.000000 -3211.1800 -1 \N \N f \N \N \N \N \N \N \N \N \N \N \N \N \N \N 0.0000 f 0.000000 M A/R Misc Credit Memo \N C \N 3 6310 \N \N \N \N \N \. -- -- Data for Name: cohisttax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY cohisttax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; 204 607 2 16 950.00 \N 0 0.050000 0.00 47.500000 2007-08-31 2007-08-31 1 1.000000 \N 205 612 2 16 950.00 \N 0 0.050000 0.00 47.500000 2007-09-21 2007-09-21 1 1.000000 \N 206 628 2 16 267.30 \N 0 0.050000 0.00 13.370000 2008-03-04 2008-03-04 1 1.000000 \N 207 629 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-03-04 2008-03-04 1 1.000000 \N 209 634 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-03-05 2008-03-05 1 1.000000 \N 211 646 2 16 10000.00 \N 0 0.050000 0.00 500.000000 2008-06-12 2008-06-12 1 1.000000 \N 212 652 2 16 490.00 \N 0 0.050000 0.00 24.500000 2008-06-12 2008-06-12 1 1.000000 \N 213 654 2 16 3105.00 \N 0 0.050000 0.00 155.250000 2008-06-18 2008-06-18 1 1.000000 \N 214 661 2 16 2851.20 \N 0 0.050000 0.00 142.560000 2008-06-19 2008-06-19 1 1.000000 \N 215 663 2 16 89.10 \N 0 0.050000 0.00 4.460000 2008-06-20 2008-06-20 1 1.000000 \N 216 666 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-06-20 2008-06-20 1 1.000000 \N 217 669 2 16 45000.00 \N 0 0.050000 0.00 2250.000000 2008-07-15 2008-07-15 1 1.000000 \N 218 671 2 16 39564.00 \N 0 0.050000 0.00 1978.200000 2008-09-08 2008-09-08 1 1.000000 \N 219 674 2 16 45000.00 \N 0 0.050000 0.00 2250.000000 2008-09-08 2008-09-08 1 1.000000 \N 220 676 2 16 27.00 \N 0 0.050000 0.00 1.350000 2008-09-09 2008-09-09 1 1.000000 \N 221 684 2 16 2700.00 \N 0 0.050000 0.00 135.000000 2008-10-02 2008-10-02 1 1.000000 \N 222 685 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-10-02 2008-10-02 1 1.000000 \N 223 690 2 16 267.30 \N 0 0.050000 0.00 13.370000 2008-10-02 2008-10-02 1 1.000000 \N 224 717 2 16 89.10 \N 0 0.050000 0.00 4.460000 2009-01-12 2009-01-12 1 1.000000 \N 225 733 2 16 92500.00 \N 0 0.050000 0.00 4625.000000 2009-08-13 2009-08-13 1 1.000000 \N 342 615 2 17 2814.15 \N 0 0.042500 0.00 119.600000 2007-12-14 2007-12-14 3 0.537630 \N 343 616 2 17 24932.50 \N 0 0.042500 0.00 1059.630000 2007-12-14 2007-12-14 3 0.537630 \N 345 697 2 17 18000.00 \N 0 0.042500 0.00 765.000000 2008-10-02 2008-10-02 1 1.000000 \N 346 698 2 17 9891.00 \N 0 0.042500 0.00 420.370000 2008-10-02 2008-10-02 1 1.000000 \N 347 699 2 17 16500.00 \N 0 0.042500 0.00 701.250000 2008-10-02 2008-10-02 1 1.000000 \N 373 617 1 17 100.00 \N 0 0.000000 0.00 4.250000 2007-12-14 2007-12-14 \N \N \N 374 700 1 17 300.00 \N 0 0.042500 0.00 12.750000 2008-10-02 2008-10-02 \N \N \N 399 737 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5676 400 738 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5676 401 739 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5676 402 740 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5676 417 741 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5698 418 742 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5698 419 743 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5698 420 744 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5698 421 745 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5698 422 746 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5698 425 747 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5704 428 748 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-21 2009-09-21 1 1.000000 5707 439 754 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-23 2009-09-23 1 1.000000 5779 440 754 2 17 10.99 \N 0 0.055000 0.00 0.604450 2009-09-23 2009-09-23 1 1.000000 5779 441 755 2 17 10.99 \N 0 0.042500 0.00 0.467075 2009-09-23 2009-09-23 1 1.000000 5779 442 755 2 17 10.99 \N 0 0.055000 0.00 0.604450 2009-09-23 2009-09-23 1 1.000000 5779 449 757 2 16 405.00 \N 0 0.050000 0.00 20.250000 2009-09-25 2009-09-25 1 1.000000 5870 460 761 2 16 46250.00 \N 0 0.050000 0.00 2312.500000 2009-10-13 2009-10-13 1 1.000000 6014 467 763 2 17 439.60 \N 0 0.042500 0.00 18.683000 2009-10-13 2009-10-13 1 1.000000 6023 468 763 2 17 439.60 \N 0 0.055000 0.00 24.178000 2009-10-13 2009-10-13 1 1.000000 6023 482 765 2 16 92500.00 \N 0 0.050000 0.00 4625.000000 2009-12-03 2009-12-03 1 1.000000 6084 491 767 2 17 10.99 \N 0 0.042500 0.00 0.467075 2010-01-05 2010-01-05 1 1.000000 6091 492 767 2 17 10.99 \N 0 0.055000 0.00 0.604450 2010-01-05 2010-01-05 1 1.000000 6091 493 768 2 17 10.99 \N 0 0.042500 0.00 0.467075 2010-01-05 2010-01-05 1 1.000000 6091 494 768 2 17 10.99 \N 0 0.055000 0.00 0.604450 2010-01-05 2010-01-05 1 1.000000 6091 501 771 2 16 49.00 \N 0 0.050000 0.00 2.450000 2010-03-12 2010-03-12 1 1.000000 6142 502 772 2 16 9250.00 \N 0 0.050000 0.00 462.500000 2010-03-12 2010-03-12 1 1.000000 6142 504 774 3 16 0.00 \N \N 0.000000 0.00 -9.300000 2010-03-12 2010-03-12 1 1.000000 6143 507 776 2 16 0.00 \N 0 0.050000 0.00 0.000000 2010-03-12 2010-03-12 1 1.000000 6156 512 783 2 16 46250.00 \N 0 0.050000 0.00 2312.500000 2010-07-30 2010-07-30 1 1.000000 6292 515 800 2 16 100000.00 \N 0 0.050000 0.00 5000.000000 2011-01-01 2011-01-01 1 1.000000 6419 526 802 2 16 247500.00 \N 0 0.050000 0.00 12375.000000 2011-03-07 2011-03-07 1 1.000000 6429 528 804 3 16 0.00 \N \N 0.000000 0.00 -16.320000 2011-03-07 2011-03-07 1 1.000000 6430 \. -- -- Data for Name: coitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY coitem (coitem_id, coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_unitcost, coitem_price, coitem_custprice, coitem_qtyshipped, coitem_order_id, coitem_memo, coitem_imported, coitem_qtyreturned, coitem_closedate, coitem_custpn, coitem_order_type, coitem_close_username, coitem_lastupdated, coitem_substitute_item_id, coitem_created, coitem_creator, coitem_prcost, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_price_uom_id, coitem_price_invuomratio, coitem_warranty, coitem_cos_accnt_id, coitem_qtyreserved, coitem_subnumber, coitem_firm, coitem_taxtype_id, coitem_rev_accnt_id, coitem_pricemode) FROM stdin; 675 3134 3 299 C 2008-10-11 \N 400.000000 0.100000 0.0000 0.0000 400.000000 -1 f 0.000000 2008-10-02 10:16:32.479963-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 09:37:52.485931 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 2 f \N \N D 676 3134 3 310 C 2008-10-11 \N 100.000000 0.250000 0.0000 0.0000 100.000000 -1 f 0.000000 2008-10-02 10:16:32.479963-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 09:37:52.485931 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 3 f \N \N D 677 3134 3 312 C 2008-10-11 \N 400.000000 1.038700 0.0000 0.0000 400.000000 -1 f 0.000000 2008-10-02 10:16:32.479963-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 09:37:52.485931 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 4 f \N \N D 678 3134 3 305 C 2008-10-11 \N 100.000000 2.330000 0.0000 0.0000 100.000000 -1 f 0.000000 2008-10-02 10:16:32.479963-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 09:37:52.485931 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 5 f \N \N D 673 3134 3 330 C 2008-10-11 \N 100.000000 0.000000 27.0000 27.0000 0.000000 -1 f 0.000000 2008-10-02 10:16:32.479963-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 09:37:52.485931 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 668 3127 1 328 C 2008-10-09 \N 10.000000 0.000000 17.8920 17.8920 10.000000 554 f 0.000000 2008-10-02 10:21:50.863093-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 08:41:21.592557 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 679 3135 1 300 C 2008-10-09 \N 1100.000000 2.567800 15.0000 9.8910 1100.000000 -1 f 0.000000 2008-10-02 11:04:42.226988-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 11:03:18.434749 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 680 3135 2 302 C 2008-10-09 \N 1000.000000 2.567800 9.8910 9.8910 1000.000000 -1 f 0.000000 2008-10-02 11:04:42.226988-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 11:03:32.824189 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 681 3135 3 303 C 2008-10-09 \N 1000.000000 2.567800 18.0000 9.8910 1000.000000 -1 f 0.000000 2008-10-02 11:04:42.226988-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 11:03:48.812686 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 685 3142 1 293 C 2009-01-09 \N 100.000000 2.563400 5.3977 5.3977 100.000000 559 f 0.000000 2008-12-31 14:14:48.129161-05 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-12-30 16:50:51.176355 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 640 3100 1 328 C 2008-06-17 \N 1.000000 0.000000 16.5530 16.5530 1.000000 537 f 0.000000 2008-06-12 14:47:52.441216-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-06-12 14:33:39.163371 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 642 3105 1 293 C 2008-06-19 \N 0.500000 0.000000 980.0000 980.0000 0.500000 -1 f 0.000000 2008-06-12 15:25:39.679957-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-06-12 15:20:31.478344 jsmith 0.000000 6 100.0000000000 6 100.0000000000 f \N 0.000000 0 f 2 \N D 624 3078 1 293 C 2007-12-14 2007-12-14 10.000000 6.381800 0.0000 0.0000 10.000000 -1 f 0.000000 2007-12-14 13:22:31.734-05 \N \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-12-14 13:10:48.812 mfgadmin \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 625 3078 2 302 C 2007-12-14 2007-12-14 1.000000 6.381800 0.0000 0.0000 1.000000 -1 f 0.000000 2007-12-14 13:22:31.734-05 \N \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-12-14 13:11:21.296 mfgadmin \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 623 3077 1 293 C 2007-12-14 2007-12-14 10.000000 6.381800 0.0000 0.0000 0.000000 -1 f 0.000000 2007-12-14 13:23:21.531-05 \N \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-12-14 13:08:32.625 mfgadmin \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 626 3079 1 308 C 2007-12-21 2007-12-21 2.000000 6.381800 23.0457 23.0457 2.000000 -1 f 0.000000 2007-12-14 13:34:58.296-05 \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-12-14 13:29:24.046 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 595 3023 1 293 C 2006-02-06 2100-01-01 100.000000 2.461800 9.5000 9.5000 100.000000 471 f 0.000000 2006-01-30 17:04:33.436889-05 W jsmith 2012-10-08 17:22:10.406998 \N 2006-01-30 16:34:29.870379 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 687 3144 1 308 C 2008-12-31 \N 5050.000000 8.298200 29.3748 29.3748 5050.000000 -1 f 0.000000 2008-12-31 15:28:09.296657-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-12-31 15:26:47.742802 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 709 3155 1 303 C 2009-01-19 \N 1000.000000 2.567800 7.1740 7.1740 1000.000000 -1 f 0.000000 2009-01-12 13:38:27.815028-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2009-01-12 13:27:17.342727 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 710 3155 2 302 C 2009-01-19 \N 1000.000000 2.567800 7.1740 7.1740 1000.000000 -1 f 0.000000 2009-01-12 13:38:27.815028-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2009-01-12 13:27:32.517759 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 721 3161 2 300 C 2009-06-26 \N 300.000000 2.567800 7.1740 7.1740 300.000000 -1 f 0.000000 2009-06-26 16:12:04.46217-04 \N admin 2012-10-08 17:22:10.406998 \N 2009-06-26 16:11:14.682855 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 596 3026 1 293 C 2006-02-05 2100-01-01 100.000000 2.461800 9.5000 9.5000 100.000000 473 f 0.000000 2006-02-01 10:11:20.777-05 W jsmith 2012-10-08 17:22:10.406998 \N 2006-01-31 14:16:19.976 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 597 3028 1 293 C 2006-07-12 2100-01-01 100.000000 2.461800 9.5000 9.5000 100.000000 475 f 0.000000 2006-07-05 09:21:53.395-04 W jsmith 2012-10-08 17:22:10.406998 \N 2006-06-23 16:21:01.656 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 598 3032 1 293 C 2006-07-10 2100-01-01 100.000000 2.461800 9.5000 9.5000 100.000000 477 f 0.000000 2006-07-05 14:18:09.317-04 W jsmith 2012-10-08 17:22:10.406998 \N 2006-07-05 11:01:50.66 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 601 3038 1 293 C 2006-10-18 2100-01-01 100.000000 6.381800 9.5000 9.5000 100.000000 484 f 0.000000 2006-10-13 15:51:19.519-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2006-10-13 15:10:33.175 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 604 3047 1 300 C 2006-12-08 2100-01-01 100.000000 6.381800 9.8910 9.8910 100.000000 -1 f 0.000000 2006-12-05 12:24:01.619-05 \N mfgadmin 2012-10-08 17:22:10.406998 \N 2006-12-05 12:04:15.666 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 605 3049 1 293 C 2007-01-04 2100-01-01 100.000000 6.381800 9.5000 9.5000 100.000000 488 f 0.000000 2006-12-28 11:52:03.156-05 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2006-12-28 11:10:38.953 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 607 3053 1 300 C 2007-01-15 2100-01-01 100.000000 6.381800 9.8910 9.8910 100.000000 -1 f 0.000000 2007-01-08 16:34:32.886-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2007-01-08 16:25:43.183 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 612 3065 1 293 C 2007-04-12 2100-01-01 1000.000000 6.381800 9.2500 9.2500 1000.000000 -1 f 0.000000 2007-04-05 15:44:06.765-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2007-04-05 15:33:56.515 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 609 3059 1 293 C 2007-02-22 2100-01-01 100.000000 6.381800 5.1213 5.1213 100.000000 492 f 0.000000 2007-02-20 08:36:16.579-05 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2007-01-10 11:38:57.484 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 610 3061 1 293 C 2007-02-27 2100-01-01 100.000000 6.381800 9.5000 9.5000 100.000000 -1 f 0.000000 2007-02-20 08:42:31.751-05 \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-02-20 08:41:33.548 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 615 3067 3 300 C 2007-06-09 2100-01-01 100.000000 6.381800 9.8910 9.8910 100.000000 -1 f 0.000000 2007-05-30 09:25:48.937-04 \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-05-30 09:19:03.703 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 616 3067 4 302 C 2007-06-09 2100-01-01 100.000000 6.381800 9.8910 9.8910 100.000000 -1 f 0.000000 2007-05-30 09:25:48.937-04 \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-05-30 09:19:20.593 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 614 3067 2 303 C 2007-06-09 2100-01-01 100.000000 6.381800 9.8910 9.8910 100.000000 -1 f 0.000000 2007-05-30 09:25:48.937-04 \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-05-30 09:18:50.421 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 613 3067 1 308 C 2007-06-09 2100-01-01 100.000000 6.381800 40.5000 40.5000 100.000000 -1 f 0.000000 2007-05-30 09:25:48.937-04 \N mfgadmin 2012-10-08 17:22:10.406998 \N 2007-05-26 21:53:49.218 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 617 3071 1 293 C 2007-06-06 2100-01-01 100.000000 6.381800 9.5000 9.5000 100.000000 508 f 0.000000 2007-05-30 11:39:39.351591-04 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2007-05-30 10:23:13.230512 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 618 3071 2 308 C 2007-06-06 2100-01-01 100.000000 6.381800 40.2500 40.5000 100.000000 509 f 0.000000 2007-05-30 11:39:39.351591-04 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2007-05-30 10:23:44.090512 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 620 3074 1 293 C 2007-09-29 2100-01-01 100.000000 6.381800 9.5000 9.5000 100.000000 520 f 0.000000 2007-09-21 14:54:18.265-04 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2007-09-21 14:31:13.89 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 573 2971 1 293 C 2006-01-16 2100-01-01 100.000000 2.666800 9.5000 9.5000 100.000000 453 f 0.000000 2006-01-09 10:28:28.104847-05 W jsmith 2012-10-08 17:22:10.406998 \N 2006-01-09 09:53:36.385879 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 566 2956 1 293 C 2006-01-03 2100-01-01 100.000000 2.666800 9.5000 9.5000 100.000000 447 f 0.000000 2005-12-27 11:17:22.004878-05 W jsmith 2012-10-08 17:22:10.406998 \N 2005-12-27 09:41:50.8595 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 574 2973 1 293 C 2006-01-18 2100-01-01 10.000000 2.666800 9.9900 9.9900 10.000000 -1 f 0.000000 2006-01-09 10:48:52.143131-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-09 10:42:27.787748 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 567 2958 1 293 C 2005-12-27 2100-01-01 5.000000 2.666800 9.9900 9.9900 5.000000 -1 f 0.000000 2005-12-27 15:58:58.531704-05 jsmith 2012-10-08 17:22:10.406998 \N 2005-12-27 15:46:48.904651 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 575 2975 1 293 C 2006-01-11 2100-01-01 10.000000 2.666800 9.9900 9.9900 10.000000 -1 f 0.000000 2006-01-09 10:53:30.738269-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-09 10:50:40.182238 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 568 2960 1 293 C 2005-12-27 2100-01-01 5.000000 2.666800 9.9900 9.9900 5.000000 -1 f 0.000000 2005-12-27 16:22:17.685291-05 jsmith 2012-10-08 17:22:10.406998 \N 2005-12-27 16:01:46.379821 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 576 2977 1 293 C 2006-01-11 2100-01-01 10.000000 2.666800 9.9900 9.9900 10.000000 -1 f 0.000000 2006-01-09 10:54:04.285897-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-09 10:52:28.423686 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 569 2962 1 293 C 2006-01-05 2100-01-01 10.000000 2.666800 9.9900 9.9900 10.000000 -1 f 0.000000 2005-12-27 16:28:28.288726-05 jsmith 2012-10-08 17:22:10.406998 \N 2005-12-27 16:25:24.149722 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 571 2964 2 293 C 2005-12-28 2100-01-01 1.000000 2.666800 9.9900 9.9900 1.000000 451 f 0.000000 2005-12-29 09:28:07.149044-05 W jsmith 2012-10-08 17:22:10.406998 \N 2005-12-28 16:59:00.338034 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 572 2965 1 293 C 2005-12-29 2100-01-01 369.000000 2.666800 9.5000 9.5000 369.000000 -1 f 0.000000 2005-12-29 12:09:45.80185-05 jsmith 2012-10-08 17:22:10.406998 \N 2005-12-29 12:06:24.742117 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 578 2988 1 293 X 2006-01-14 2100-01-01 10.000000 2.014000 9.9900 9.9900 0.000000 459 f 0.000000 \N W \N 2012-10-08 17:22:10.406998 \N 2006-01-11 09:41:59.416871 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 582 2993 1 293 C 2006-01-13 2100-01-01 50.000000 2.461800 9.9900 9.9900 50.000000 -1 f 0.000000 2006-01-11 15:14:03.484379-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-11 15:13:34.284944 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 583 2995 1 293 C 2006-01-13 2100-01-01 10.000000 2.461800 9.9900 9.9900 10.000000 -1 f 0.000000 2006-01-11 15:52:00.05543-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-11 15:40:56.919523 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 585 2998 1 293 C 2006-01-11 2100-01-01 10.000000 2.461800 9.9900 9.9900 10.000000 -1 f 0.000000 2006-01-11 16:03:57.66999-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-11 16:02:28.341476 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 581 2988 4 300 C 2006-01-14 2100-01-01 10.000000 2.014000 9.8910 9.8910 10.000000 -1 f 0.000000 2006-01-12 13:47:22.249164-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-11 09:51:26.766457 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 579 2988 2 300 C 2006-01-14 2100-01-01 10.000000 2.014000 9.8910 9.8910 10.000000 -1 f 0.000000 2006-01-12 13:47:22.249164-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-11 09:42:21.112714 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 580 2988 3 293 C 2006-01-14 2100-01-01 10.000000 2.014000 9.9900 9.9900 10.000000 -1 f 0.000000 2006-01-12 13:47:22.249164-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-11 09:51:13.777858 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 587 3002 1 293 C 2006-01-20 2100-01-01 100.000000 2.461800 9.5000 9.5000 100.000000 462 f 0.000000 2006-01-13 11:53:30.349428-05 W jsmith 2012-10-08 17:22:10.406998 \N 2006-01-13 11:00:55.854322 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 591 3009 1 300 C 2006-01-14 2100-01-01 10.000000 2.461800 9.8910 9.8910 10.000000 -1 f 0.000000 2006-01-13 13:42:28.314-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-13 13:36:09.059 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 592 3015 1 293 C 2006-01-20 2100-01-01 100.000000 2.461800 9.5000 9.5000 100.000000 466 f 0.000000 2006-01-13 15:31:00.048-05 W jsmith 2012-10-08 17:22:10.406998 \N 2006-01-13 15:08:50.276 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 594 3021 1 293 C 2006-02-06 2100-01-01 100.000000 2.461800 9.5000 9.5000 100.000000 469 f 0.000000 2006-01-30 12:42:13.841943-05 W jsmith 2012-10-08 17:22:10.406998 \N 2006-01-30 12:05:25.60101 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 638 3095 1 300 C 2008-04-09 \N 1000.000000 6.381800 5.2730 5.2730 1000.000000 -1 f 0.000000 2008-04-04 08:47:33.813122-04 \N mfgadmin 2012-10-08 17:22:10.406998 \N 2008-04-04 08:40:09.650232 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 636 3092 1 293 C 2008-03-12 2008-03-14 100.000000 6.381800 9.5000 9.5000 100.000000 534 f 0.000000 2008-03-05 13:50:12.229813-05 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-03-05 13:42:04.704723 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 637 3094 1 323 C 2008-03-12 2008-03-12 1.000000 16.381800 0.0000 0.0000 1.000000 -1 f 0.000000 2008-03-05 13:59:24.258376-05 \N \N jsmith 2012-10-08 17:22:10.406998 \N 2008-03-05 13:56:35.952664 jsmith \N 4 1.0000000000 4 1.0000000000 t \N 0.000000 0 f 2 \N D 629 3085 1 323 C 2008-03-11 \N 3.000000 16.381800 89.1000 89.1000 3.000000 -1 f 0.000000 2008-03-04 14:22:32.111536-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-03-04 13:55:38.124424 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 630 3085 2 293 C 2008-03-11 \N 100.000000 6.381800 9.5000 9.5000 100.000000 -1 f 0.000000 2008-03-04 14:22:32.111536-05 \N \N jsmith 2012-10-08 17:22:10.406998 \N 2008-03-04 13:56:04.207285 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 635 3091 2 323 C 2008-03-11 \N 1.000000 16.381800 0.0000 47.9843 1.000000 -1 f 0.000000 2008-03-04 16:36:56.24302-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-03-04 16:34:16.901846 jsmith 0.000000 4 1.0000000000 4 1.0000000000 t \N 0.000000 0 f 2 \N D 639 3097 1 308 C 2008-06-19 \N 1.000000 6.381800 21.5909 21.5909 1.000000 -1 f 0.000000 2008-06-12 09:41:58.664785-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-06-12 08:52:56.812043 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 641 3103 1 293 C 2008-06-19 \N 0.500000 1.863400 494.9490 494.9490 0.500000 -1 f 0.000000 2008-06-12 14:59:54.189527-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-06-12 14:57:32.25127 jsmith 0.000000 6 100.0000000000 6 100.0000000000 f \N 0.000000 0 f 2 \N D 643 3106 1 328 C 2008-06-25 \N 100.000000 0.000000 31.0500 31.0500 100.000000 539 f 0.000000 2008-06-18 16:03:43.500648-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-06-18 15:56:08.362994 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 644 3109 1 328 C 2008-06-23 \N 1000.000000 0.000000 16.3787 16.3787 1000.000000 541 f 0.000000 2008-06-19 16:56:06.652175-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-06-19 16:18:56.952532 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 645 3109 2 293 C 2008-06-23 \N 1000.000000 1.863400 4.6717 4.6717 1000.000000 542 f 0.000000 2008-06-19 16:56:06.652175-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-06-19 16:19:16.257614 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 646 3109 3 308 C 2008-06-23 \N 1000.000000 8.348200 21.3636 21.3636 1000.000000 -1 f 0.000000 2008-06-19 16:56:06.652175-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-06-19 16:20:36.172332 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 647 3111 1 328 C 2008-06-23 \N 99.000000 0.000000 28.8000 28.8000 99.000000 548 f 0.000000 2008-06-19 17:08:18.368415-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-06-19 17:07:16.802929 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 649 3115 1 323 C 2008-06-20 \N 1.000000 11.863400 89.1000 89.1000 1.000000 -1 f 0.000000 2008-06-20 09:34:10.778496-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-06-20 09:33:01.678197 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 650 3117 1 293 C 2008-06-29 \N 100.000000 2.563400 9.5000 9.5000 100.000000 550 f 0.000000 2008-06-20 12:36:14.765248-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-06-20 12:29:47.767355 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 619 3073 1 293 C 2007-09-09 2100-01-01 100.000000 0.000000 9.5000 9.5000 100.000000 516 f 0.000000 2007-08-31 11:10:34.734-04 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2007-08-31 10:18:36.093 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 621 3076 1 293 C 2007-12-21 \N 5000.000000 0.000000 4.9865 4.9865 5000.000000 522 f 0.000000 2007-12-14 13:06:02.015-05 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2007-12-14 12:31:06.625 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 622 3076 2 302 C 2007-12-21 \N 500.000000 0.000000 5.6283 5.6283 500.000000 523 f 0.000000 2007-12-14 13:06:02.015-05 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2007-12-14 12:31:06.625 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 627 3081 1 322 C 2007-12-27 \N 10.000000 0.000000 30.0000 25.6063 10.000000 525 f 0.000000 2007-12-20 11:57:11.89-05 \N W mfgadmin 2012-10-08 17:22:10.406998 \N 2007-12-20 11:30:55.265 mfgadmin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 570 2964 1 293 C 2005-12-28 \N 10.000000 0.000000 9.9900 9.9900 10.000000 449 f 0.000000 2005-12-29 09:28:07.149044-05 W jsmith 2012-10-08 17:22:10.406998 \N 2005-12-27 16:39:49.841819 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 588 3005 1 300 C 2006-01-16 \N 10.000000 0.000000 9.8910 9.8910 10.000000 -1 f 0.000000 2006-01-13 12:57:51.365-05 jsmith 2012-10-08 17:22:10.406998 \N 2006-01-13 12:48:06.204 jsmith \N 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 655 3120 3 300 C 2008-07-15 \N 3000.000000 2.567800 15.0000 9.8910 3000.000000 -1 f 0.000000 2008-09-08 17:31:53.477721-04 \N admin 2012-10-08 17:22:10.406998 \N 2008-09-08 17:27:01.533327 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 653 3120 2 300 C 2008-08-09 \N 4000.000000 2.567800 9.8910 9.8910 4000.000000 -1 f 0.000000 2008-09-08 17:50:16.303797-04 \N admin 2012-10-08 17:22:10.406998 \N 2008-09-08 17:22:51.914614 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 652 3120 1 300 C 2008-09-15 \N 3000.000000 2.567800 15.0000 9.8910 3000.000000 -1 f 0.000000 2008-09-08 17:51:06.598113-04 \N admin 2012-10-08 17:22:10.406998 \N 2008-09-08 17:21:12.902339 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 664 3123 1 305 C 2008-09-01 \N 1.000000 2.330000 0.0000 0.0000 1.000000 -1 f 0.000000 2008-09-09 17:04:08.672826-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-09-09 16:52:04.369968 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 5 f \N \N D 663 3123 1 312 C 2008-09-01 \N 4.000000 1.038700 0.0000 0.0000 4.000000 -1 f 0.000000 2008-09-09 17:04:08.672826-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-09-09 16:52:04.369968 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 4 f \N \N D 662 3123 1 310 C 2008-09-01 \N 1.000000 0.250000 0.0000 0.0000 1.000000 -1 f 0.000000 2008-09-09 17:04:08.672826-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-09-09 16:52:04.369968 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 3 f \N \N D 661 3123 1 299 C 2008-09-01 \N 4.000000 0.100000 0.0000 0.0000 4.000000 -1 f 0.000000 2008-09-09 17:04:08.672826-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-09-09 16:52:04.369968 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 2 f \N \N D 660 3123 1 318 C 2008-09-01 \N 0.050000 14.900000 0.0000 0.0000 0.050000 -1 f 0.000000 2008-09-09 17:04:08.672826-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-09-09 16:52:04.369968 jsmith 0.000000 8 1.0000000000 8 1.0000000000 f \N 0.000000 1 f \N \N D 659 3123 1 330 C 2008-09-01 \N 1.000000 0.000000 27.0000 27.0000 0.000000 -1 f 0.000000 2008-09-09 17:04:08.672826-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-09-09 16:52:04.369968 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 671 3134 1 293 C 2008-10-11 \N 100.000000 2.563400 9.5000 9.5000 100.000000 555 f 0.000000 2008-10-02 10:16:32.479963-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 09:37:52.485931 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 672 3134 2 323 C 2008-10-11 \N 3.000000 12.563400 89.1000 89.1000 3.000000 -1 f 0.000000 2008-10-02 10:16:32.479963-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 09:37:52.485931 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 674 3134 3 318 C 2008-10-11 \N 5.000000 14.900000 0.0000 0.0000 5.000000 -1 f 0.000000 2008-10-02 10:16:32.479963-04 jsmith 2012-10-08 17:22:10.406998 \N 2008-10-02 09:37:52.485931 jsmith 0.000000 8 1.0000000000 8 1.0000000000 f \N 0.000000 1 f \N \N D 711 3155 3 300 C 2009-01-19 \N 1000.000000 2.567800 7.1740 7.1740 1000.000000 -1 f 0.000000 2009-01-12 13:38:27.815028-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2009-01-12 13:27:53.748732 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 715 3157 1 323 C 2009-01-12 \N 1.000000 12.563400 89.1000 89.1000 1.000000 -1 f 0.000000 2009-01-12 13:54:07.127262-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2009-01-12 13:52:07.770532 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 717 3158 1 323 C 2009-01-12 \N 1.000000 12.563400 64.6246 64.6246 1.000000 -1 f 0.000000 2009-01-12 13:55:00.065076-05 \N jsmith 2012-10-08 17:22:10.406998 \N 2009-01-12 13:52:54.429404 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 722 3161 3 302 C 2009-06-26 \N 400.000000 2.567800 7.1740 7.1740 400.000000 -1 f 0.000000 2009-06-26 16:12:04.46217-04 \N admin 2012-10-08 17:22:10.406998 \N 2009-06-26 16:11:26.226741 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 720 3161 1 303 C 2009-06-26 \N 300.000000 2.567800 7.1740 7.1740 300.000000 -1 f 0.000000 2009-06-26 16:12:04.46217-04 \N admin 2012-10-08 17:22:10.406998 \N 2009-06-26 16:11:05.895894 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 724 3163 1 293 C 2009-08-20 \N 10000.000000 2.563400 9.2500 9.2500 10000.000000 562 f 0.000000 2009-08-13 08:53:13.761596-04 \N W admin 2012-10-08 17:22:10.406998 \N 2009-08-13 08:38:48.223493 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 743 3183 1 293 C 2009-12-12 \N 10000.000000 2.563400 9.2500 9.2500 10000.000000 583 f 0.000000 2009-12-03 17:05:20.259528-05 \N W admin 2012-10-08 17:22:10.406998 \N 2009-12-03 15:42:48.275583 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 739 3178 1 308 C 2009-10-20 \N 1000.000000 8.298200 29.3750 29.3750 1000.000000 -1 f 0.000000 2009-10-13 14:25:04.937474-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2009-10-13 13:17:41.745616 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 732 3171 1 293 C 2009-09-21 \N 5000.000000 2.563400 7.1740 7.1740 5000.000000 570 f 0.000000 2009-09-21 17:10:17.933799-04 \N W admin 2012-10-08 17:22:10.406998 \N 2009-09-21 16:54:07.343556 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 737 3177 1 293 C 2009-10-22 \N 5000.000000 2.563400 9.2500 9.2500 5000.000000 576 f 0.000000 2009-10-13 14:25:25.667162-04 \N W jsmith 2012-10-08 17:22:10.406998 \N 2009-10-13 13:16:39.19502 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 735 3175 1 308 C 2009-09-25 \N 10.000000 8.298200 40.5000 40.5000 10.000000 -1 f 0.000000 2009-09-25 10:32:11.686864-04 \N jsmith 2012-10-08 17:22:10.406998 \N 2009-09-25 10:31:04.538843 jsmith 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 753 3192 1 323 X 2010-03-12 2010-03-12 1.000000 12.563400 0.0000 0.0000 0.000000 -1 f 0.000000 \N \N \N \N 2012-10-08 17:22:10.406998 \N 2010-03-12 15:22:22.146822 admin 0.000000 4 1.0000000000 4 1.0000000000 t \N 0.000000 0 f 2 \N D 747 3187 1 381 C 2010-03-17 \N 1000.000000 22.000000 49.5000 49.5000 1000.000000 576 f 0.000000 2010-03-10 16:38:13.269929-05 \N P admin 2012-10-08 17:22:10.406998 \N 2010-03-10 16:36:30.409491 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 754 3193 1 323 C 2010-03-12 2010-03-12 1.000000 12.563400 0.0000 0.0000 1.000000 -1 f 0.000000 2010-03-12 15:26:48.503184-05 \N \N admin 2012-10-08 17:22:10.406998 \N 2010-03-12 15:23:59.905836 admin 0.000000 4 1.0000000000 4 1.0000000000 t \N 0.000000 0 f 2 \N D 751 3189 2 293 C 2010-03-21 \N 5.000000 2.563400 9.8000 9.8000 5.000000 -1 f 0.000000 2010-03-12 15:10:33.969113-05 \N admin 2012-10-08 17:22:10.406998 \N 2010-03-12 14:58:51.35602 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 749 3189 1 293 C 2010-03-21 \N 1000.000000 2.563400 9.2500 9.2500 1000.000000 586 f 0.000000 2010-03-12 15:10:33.969113-05 \N W admin 2012-10-08 17:22:10.406998 \N 2010-03-12 14:57:32.350525 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 755 3194 1 381 C 2010-04-11 \N 1000.000000 22.000000 31.9136 31.9136 0.000000 274 f 0.000000 2010-04-02 10:30:55.368813-04 \N P admin 2012-10-08 17:22:10.406998 \N 2010-04-02 10:25:11.812873 admin 12.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 758 3195 1 381 C 2010-06-21 2010-06-22 2000.000000 22.000000 49.5000 49.5000 2000.000000 580 f 0.000000 2010-06-07 10:18:39.501105-04 \N P admin 2012-10-08 17:22:10.406998 \N 2010-06-07 09:37:36.924126 admin 22.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 756 3194 2 381 C 2010-04-11 \N 1000.000000 22.000000 31.9136 31.9136 1000.000000 579 f 0.000000 2010-04-02 10:33:18.771964-04 \N P admin 2012-10-08 17:22:10.406998 \N 2010-04-02 10:30:32.651331 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 765 3198 1 381 C 2010-09-07 \N 2000.000000 22.000000 49.5000 49.5000 2000.000000 588 f 0.000000 2010-09-07 16:19:20.31002-04 \N P admin 2012-10-08 17:22:10.406998 \N 2010-09-07 16:16:38.01836 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 767 3200 1 381 C 2010-07-06 \N 4000.000000 22.000000 49.5000 49.5000 4000.000000 589 f 0.000000 2010-09-07 16:42:26.080983-04 \N P admin 2012-10-08 17:22:10.406998 \N 2010-09-07 16:35:29.774068 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 769 3201 1 381 C 2010-08-01 \N 3000.000000 22.000000 49.5000 49.5000 3000.000000 590 f 0.000000 2010-09-07 16:42:31.935277-04 \N P admin 2012-10-08 17:22:10.406998 \N 2010-09-07 16:36:40.001815 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 771 3203 1 293 C 2010-07-30 \N 5000.000000 2.563400 9.2500 9.2500 5000.000000 -1 f 0.000000 2010-09-08 13:21:11.088776-04 \N admin 2012-10-08 17:22:10.406998 \N 2010-09-08 13:16:31.710889 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 773 3205 1 293 C 2010-09-15 \N 10000.000000 2.563400 6.3769 6.3769 10000.000000 598 f 0.000000 2010-09-08 13:43:20.633406-04 \N W admin 2012-10-08 17:22:10.406998 \N 2010-09-08 13:33:16.874053 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 759 3196 1 381 X 2010-10-26 \N 100.000000 22.000000 49.5000 49.5000 0.000000 586 f 0.000000 2010-09-08 13:50:14.049506-04 \N P admin 2012-10-08 17:22:10.406998 \N 2010-06-07 11:38:15.492824 admin 22.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 791 3221 2 381 C 2011-04-18 \N 1000.000000 22.000000 39.8551 39.8551 1000.000000 602 f 0.000000 2011-04-18 08:26:08.946826-04 \N P admin 2012-10-08 17:22:10.406998 \N 2011-04-18 07:42:18.321685 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 789 3221 1 308 C 2011-04-18 \N 1000.000000 8.298200 32.6087 32.6087 1000.000000 -1 f 0.000000 2011-04-18 08:26:08.946826-04 \N admin 2012-10-08 17:22:10.406998 \N 2011-04-18 07:41:17.199975 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 781 3213 1 293 C 2010-11-13 \N 100.000000 2.563400 6.3769 6.3769 100.000000 605 f 0.000000 2010-11-04 16:25:28.295187-04 \N W admin 2012-10-08 17:22:10.406998 \N 2010-11-04 15:46:45.248635 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 775 3207 1 381 C 2011-04-11 \N 100.000000 22.000000 31.9136 31.9136 100.000000 596 f 0.000000 2011-04-18 08:26:59.100253-04 \N P admin 2012-10-08 17:22:10.406998 \N 2010-09-08 13:50:50.476173 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 795 3225 1 308 O 2011-08-02 \N 100.000000 8.298200 32.6087 32.6087 0.000000 -1 f 0.000000 \N \N \N 2012-10-08 17:22:10.406998 \N 2011-04-18 14:00:35.947378 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 783 3215 1 381 C 2010-12-30 2010-12-30 1000.000000 22.000000 49.5000 49.5000 1000.000000 600 f 0.000000 2010-12-30 16:27:34.219577-05 \N P admin 2012-10-08 17:22:10.406998 \N 2010-12-30 16:25:36.168772 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 779 3211 1 381 C 2010-12-30 \N 2500.000000 22.000000 49.5000 49.5000 2500.000000 598 f 0.000000 2010-12-30 16:27:40.160757-05 \N P admin 2012-10-08 17:22:10.406998 \N 2010-11-04 15:44:44.521944 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 797 3227 1 381 C 2011-05-04 \N 3000.000000 22.000000 49.5000 49.5000 3000.000000 605 f 0.000000 2011-06-03 16:21:58.23682-04 \N P admin 2012-10-08 17:22:10.406998 \N 2011-06-03 16:12:05.084477 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 785 3217 1 381 C 2011-03-17 \N 5000.000000 22.000000 49.5000 49.5000 5000.000000 601 f 0.000000 2011-03-07 15:35:41.114148-05 \N P admin 2012-10-08 17:22:10.406998 \N 2011-03-07 15:29:42.289772 admin 22.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f 2 \N D 799 3229 1 381 C 2011-05-04 \N 3500.000000 22.000000 32.1118 32.1118 7000.000000 606 f 0.000000 2011-06-03 16:33:32.589919-04 \N P admin 2012-10-08 17:22:10.406998 \N 2011-06-03 16:26:06.287401 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D 801 3231 1 381 C 2011-05-14 \N 5000.000000 22.000000 32.1118 32.1118 5000.000000 607 f 0.000000 2011-06-03 16:46:31.456763-04 \N P admin 2012-10-08 17:22:10.406998 \N 2011-06-03 16:35:13.758258 admin 0.000000 4 1.0000000000 4 1.0000000000 f \N 0.000000 0 f \N \N D \. -- -- Data for Name: comment; Type: TABLE DATA; Schema: public; Owner: admin -- COPY comment (comment_id, comment_source_id, comment_date, comment_user, comment_text, comment_cmnttype_id, comment_source, comment_public) FROM stdin; 39 35 2005-12-23 10:34:32.97254-05 mfgadmin Created 2 WH \N 40 300 2005-12-23 12:09:12.365715-05 jsmith Created 2 I \N 41 300 2005-12-23 12:11:45.874731-05 jsmith Description 1 Changed from "yellow Tough Truck" to "Yellow Tough Truck" 2 I \N 42 301 2005-12-23 12:21:36.090297-05 jsmith Created 2 I \N 43 302 2005-12-23 12:23:36.756832-05 jsmith Created 2 I \N 44 303 2005-12-23 12:25:26.499386-05 jsmith Created 2 I \N 45 304 2005-12-23 12:26:44.755245-05 jsmith Created 2 I \N 46 305 2005-12-23 12:27:42.873695-05 jsmith Created 2 I \N 47 306 2005-12-23 12:28:55.958255-05 jsmith Created 2 I \N 48 293 2005-12-23 13:47:13.260337-05 jsmith Created 2 IS \N 49 294 2005-12-23 13:51:07.941708-05 jsmith Created 2 IS \N 50 295 2005-12-23 13:52:16.651891-05 jsmith Created 2 IS \N 51 296 2005-12-23 13:54:32.395583-05 jsmith Created 2 IS \N 52 297 2005-12-23 13:57:11.802768-05 jsmith Created 2 IS \N 53 298 2005-12-23 13:59:59.079319-05 jsmith Created 2 IS \N 54 299 2005-12-23 14:01:06.291443-05 jsmith Created 2 IS \N 55 305 2005-12-23 15:00:03.374997-05 jsmith Description 1 Changed from "Prodcut Box Type 1" to "Product Box Type 1" 2 I \N 56 95 2005-12-23 16:02:31.826052-05 jsmith Created 2 C \N 57 345 2005-12-23 17:01:18.363122-05 jsmith Created 2 P \N 58 345 2005-12-23 17:01:22.343433-05 jsmith Created Line #1 2 P \N 60 345 2005-12-23 17:01:34.761773-05 jsmith Created Line #2 2 P \N 61 345 2005-12-23 17:01:45.312347-05 jsmith Created Line #3 2 P \N 62 345 2005-12-23 17:01:56.422339-05 jsmith Created Line #4 2 P \N 63 345 2005-12-23 17:02:07.030802-05 jsmith Created Line #5 2 P \N 68 297 2005-12-27 09:22:37.485159-05 jsmith Reorder Level Changed from 0.00 to 1.00 2 IS \N 69 297 2005-12-27 09:22:37.485159-05 jsmith Order Up To Changed from 0.00 to 100.00 2 IS \N 70 297 2005-12-27 09:26:14.726869-05 jsmith Reorder Level Changed from 1.00 to 0.00 2 IS \N 71 297 2005-12-27 09:26:14.726869-05 jsmith Order Up To Changed from 100.00 to 0.00 2 IS \N 73 2956 2005-12-27 09:41:16.425262-05 jsmith Created 2 S \N 74 566 2005-12-27 09:41:50.8595-05 jsmith Created 2 SI \N 75 447 2005-12-27 09:41:50.867607-05 jsmith Created 2 W \N 76 447 2005-12-27 09:41:50.867607-05 jsmith Status Changed from O to E 2 W \N 77 448 2005-12-27 09:43:19.67487-05 jsmith Created 2 W \N 78 448 2005-12-27 09:43:19.67487-05 jsmith Status Changed from O to E 2 W \N 79 347 2005-12-27 10:40:50.918164-05 jsmith Created 2 P \N 80 347 2005-12-27 10:40:53.113016-05 jsmith Created Line #1 2 P \N 82 347 2005-12-27 10:41:11.044526-05 jsmith Created Line #2 2 P \N 83 347 2005-12-27 10:41:20.338501-05 jsmith Created Line #3 2 P \N 84 347 2005-12-27 10:41:28.394455-05 jsmith Created Line #4 2 P \N 85 347 2005-12-27 10:41:38.328042-05 jsmith Created Line #5 2 P \N 86 349 2005-12-27 10:53:02.497104-05 jsmith Created 2 P \N 87 349 2005-12-27 10:53:43.823926-05 jsmith Created Line #1 2 P \N 89 447 2005-12-27 11:07:40.273841-05 jsmith Status Changed from E to R 2 W \N 90 448 2005-12-27 11:10:51.495092-05 jsmith Status Changed from E to I 2 W \N 91 448 2005-12-27 11:11:07.810441-05 jsmith Status Changed from I to C 2 W \N 92 447 2005-12-27 11:11:38.59791-05 jsmith Status Changed from R to I 2 W \N 93 447 2005-12-27 11:11:46.247601-05 jsmith Status Changed from I to C 2 W \N 94 566 2005-12-27 11:17:22.004878-05 jsmith Closed 2 SI \N 96 2958 2005-12-27 15:46:35.641556-05 jsmith Created 2 S \N 97 567 2005-12-27 15:46:48.904651-05 jsmith Created 2 SI \N 98 567 2005-12-27 15:58:58.531704-05 jsmith Closed 2 SI \N 99 2960 2005-12-27 16:01:15.67788-05 jsmith Created 2 S \N 100 568 2005-12-27 16:01:46.379821-05 jsmith Created 2 SI \N 101 568 2005-12-27 16:22:17.685291-05 jsmith Closed 2 SI \N 102 2962 2005-12-27 16:25:07.396416-05 jsmith Created 2 S \N 103 569 2005-12-27 16:25:24.149722-05 jsmith Created 2 SI \N 104 569 2005-12-27 16:28:28.288726-05 jsmith Closed 2 SI \N 105 2964 2005-12-27 16:39:49.841819-05 jsmith Created 2 S \N 106 449 2005-12-27 16:39:49.841819-05 jsmith Created 2 W \N 107 449 2005-12-27 16:39:49.841819-05 jsmith Status Changed from O to E 2 W \N 108 570 2005-12-27 16:39:49.841819-05 jsmith Created 2 SI \N 109 450 2005-12-28 09:55:44.05429-05 jsmith Created 2 W \N 110 450 2005-12-28 09:55:44.05429-05 jsmith Status Changed from O to E 2 W \N 111 352 2005-12-28 09:56:11.332606-05 jsmith Created 2 P \N 112 352 2005-12-28 09:56:19.435331-05 jsmith Created Line #1 2 P \N 114 449 2005-12-28 16:24:30.896285-05 jsmith Status Changed from E to R 2 W \N 115 449 2005-12-28 16:25:11.707602-05 jsmith Status Changed from R to I 2 W \N 116 571 2005-12-28 16:59:00.338034-05 jsmith Created 2 SI \N 117 451 2005-12-28 16:59:00.55773-05 jsmith Created 2 W \N 118 451 2005-12-28 16:59:00.55773-05 jsmith Status Changed from O to E 2 W \N 119 570 2005-12-29 09:28:07.149044-05 jsmith Closed 2 SI \N 120 571 2005-12-29 09:28:07.149044-05 jsmith Closed 2 SI \N 121 452 2005-12-29 09:50:35.542223-05 jsmith Created 2 W \N 122 452 2005-12-29 09:50:35.542223-05 jsmith Status Changed from O to E 2 W \N 123 352 2005-12-29 09:51:22.485553-05 jsmith Created Line #2 2 P \N 124 352 2005-12-29 09:51:32.208174-05 jsmith Created Line #3 2 P \N 125 352 2005-12-29 09:51:46.36611-05 jsmith Created Line #4 2 P \N 126 352 2005-12-29 09:51:55.641045-05 jsmith Created Line #5 2 P \N 127 352 2005-12-29 09:52:05.73444-05 jsmith Created Line #6 2 P \N 128 352 2005-12-29 09:52:15.930874-05 jsmith Created Line #7 2 P \N 129 452 2005-12-29 10:01:19.939306-05 jsmith Status Changed from E to I 2 W \N 597 495 2007-04-05 15:30:35.14-04 jsmith Created 2 W \N 130 452 2005-12-29 10:01:23.341554-05 jsmith Status Changed from I to C 2 W \N 131 451 2005-12-29 10:12:08.029586-05 jsmith Status Changed from E to I 2 W \N 132 451 2005-12-29 10:12:25.87401-05 jsmith Status Changed from I to C 2 W \N 133 450 2005-12-29 10:12:34.705365-05 jsmith Status Changed from E to I 2 W \N 134 450 2005-12-29 10:12:50.430673-05 jsmith Status Changed from I to C 2 W \N 135 449 2005-12-29 10:14:00.880556-05 jsmith Status Changed from I to C 2 W \N 146 357 2005-12-29 17:55:29.831287-05 jsmith Created 2 P \N 137 355 2005-12-29 11:58:05.108395-05 jsmith Created 2 P \N 138 355 2005-12-29 11:58:25.555117-05 jsmith Created Line #1 2 P \N 139 355 2005-12-29 11:58:44.170894-05 jsmith Created Line #2 2 P \N 140 355 2005-12-29 11:59:08.407083-05 jsmith Created Line #3 2 P \N 141 355 2005-12-29 11:59:28.179062-05 jsmith Created Line #4 2 P \N 147 357 2005-12-29 17:56:06.358588-05 jsmith Created Line #1 2 P \N 143 2965 2005-12-29 12:05:49.829045-05 jsmith Created 2 S \N 144 572 2005-12-29 12:06:24.742117-05 jsmith Created 2 SI \N 145 572 2005-12-29 12:09:45.80185-05 jsmith Closed 2 SI \N 149 359 2005-12-29 18:01:09.344341-05 jsmith Created 2 P \N 150 359 2005-12-29 18:01:27.142344-05 jsmith Created Line #1 2 P \N 152 361 2005-12-29 18:03:43.648982-05 jsmith Created 2 P \N 153 361 2005-12-29 18:04:24.29504-05 jsmith Created Line #1 2 P \N 155 363 2005-12-30 14:52:45.591587-05 jsmith Created 2 P \N 156 363 2005-12-30 14:53:10.737552-05 jsmith Created Line #1 2 P \N 158 365 2005-12-30 14:59:30.008941-05 jsmith Created 2 P \N 159 365 2005-12-30 15:00:00.086539-05 jsmith Created Line #1 2 P \N 161 367 2005-12-30 15:07:19.03566-05 jsmith Created 2 P \N 162 367 2005-12-30 15:07:45.979122-05 jsmith Created Line #1 2 P \N 164 2971 2006-01-09 09:53:14.505507-05 jsmith Created 2 S \N 165 573 2006-01-09 09:53:36.385879-05 jsmith Created 2 SI \N 166 453 2006-01-09 09:53:36.572916-05 jsmith Created 2 W \N 167 453 2006-01-09 09:53:36.572916-05 jsmith Status Changed from O to E 2 W \N 168 454 2006-01-09 09:56:26.215794-05 jsmith Created 2 W \N 169 454 2006-01-09 09:56:26.215794-05 jsmith Status Changed from O to E 2 W \N 170 369 2006-01-09 10:01:29.856404-05 jsmith Created 2 P \N 171 369 2006-01-09 10:01:35.924647-05 jsmith Created Line #1 2 P \N 173 454 2006-01-09 10:11:59.284841-05 jsmith Status Changed from E to I 2 W \N 174 454 2006-01-09 10:12:31.867381-05 jsmith Status Changed from I to C 2 W \N 175 453 2006-01-09 10:12:58.424348-05 jsmith Status Changed from E to I 2 W \N 176 453 2006-01-09 10:13:07.582026-05 jsmith Status Changed from I to C 2 W \N 177 573 2006-01-09 10:28:28.104847-05 jsmith Closed 2 SI \N 178 371 2006-01-09 10:32:17.930613-05 jsmith Created 2 P \N 179 371 2006-01-09 10:32:41.824351-05 jsmith Created Line #1 2 P \N 181 2973 2006-01-09 10:42:15.208768-05 jsmith Created 2 S \N 182 574 2006-01-09 10:42:27.787748-05 jsmith Created 2 SI \N 183 574 2006-01-09 10:48:52.143131-05 jsmith Closed 2 SI \N 184 2975 2006-01-09 10:50:24.080274-05 jsmith Created 2 S \N 185 575 2006-01-09 10:50:40.182238-05 jsmith Created 2 SI \N 186 2977 2006-01-09 10:52:14.055756-05 jsmith Created 2 S \N 187 576 2006-01-09 10:52:28.423686-05 jsmith Created 2 SI \N 188 575 2006-01-09 10:53:30.738269-05 jsmith Closed 2 SI \N 189 576 2006-01-09 10:54:04.285897-05 jsmith Closed 2 SI \N 193 307 2006-01-09 14:15:52.779616-05 jsmith Created 2 I \N 194 300 2006-01-09 14:16:29.171296-05 jsmith Created 2 IS \N 195 307 2006-01-09 14:17:18.829351-05 jsmith Description 1 Changed from "Yellow Tough Truck" to "Wrecker Tough Truck" 2 I \N 196 307 2006-01-09 14:17:18.829351-05 jsmith Description 2 Changed from "Truck Type 1" to "Wrecker" 2 I \N 197 456 2006-01-10 12:48:11.432869-05 jsmith Created 2 W \N 198 456 2006-01-10 12:48:11.432869-05 jsmith Status Changed from O to E 2 W \N 199 456 2006-01-10 12:49:56.229598-05 jsmith Status Changed from E to I 2 W \N 200 457 2006-01-10 14:24:36.957417-05 jsmith Created 2 W \N 201 457 2006-01-10 14:24:36.957417-05 jsmith Status Changed from O to E 2 W \N 202 457 2006-01-10 14:24:59.311032-05 jsmith Status Changed from E to I 2 W \N 203 456 2006-01-10 14:38:40.816736-05 jsmith Status Changed from I to C 2 W \N 204 457 2006-01-10 14:49:55.032635-05 jsmith Status Changed from I to C 2 W \N 205 458 2006-01-10 15:03:25.699099-05 jsmith Created 2 W \N 206 458 2006-01-10 15:03:25.699099-05 jsmith Status Changed from O to E 2 W \N 207 458 2006-01-10 15:03:57.529181-05 jsmith Status Changed from E to I 2 W \N 208 458 2006-01-10 15:47:22.609629-05 jsmith Status Changed from I to C 2 W \N 223 2988 2006-01-11 09:41:39.196074-05 jsmith Created 2 S \N 224 578 2006-01-11 09:41:59.416871-05 jsmith Created 2 SI \N 227 578 2006-01-11 09:42:06.467443-05 jsmith Canceled 2 SI \N 228 579 2006-01-11 09:42:21.112714-05 jsmith Created 2 SI \N 229 580 2006-01-11 09:51:13.777858-05 jsmith Created 2 SI \N 230 581 2006-01-11 09:51:26.766457-05 jsmith Created 2 SI \N 233 381 2006-01-11 12:38:47.102652-05 jsmith Created 2 P \N 234 381 2006-01-11 12:39:10.088686-05 jsmith Created Line #1 2 P \N 236 381 2006-01-11 12:40:18.617649-05 jsmith Created Line #2 2 P \N 237 2993 2006-01-11 15:13:18.613144-05 jsmith Created 2 S \N 238 582 2006-01-11 15:13:34.284944-05 jsmith Created 2 SI \N 239 582 2006-01-11 15:14:03.484379-05 jsmith Closed 2 SI \N 240 2995 2006-01-11 15:40:41.038496-05 jsmith Created 2 S \N 241 583 2006-01-11 15:40:56.919523-05 jsmith Created 2 SI \N 242 583 2006-01-11 15:52:00.05543-05 jsmith Closed 2 SI \N 245 2998 2006-01-11 16:02:11.038217-05 jsmith Created 2 S \N 246 585 2006-01-11 16:02:28.341476-05 jsmith Created 2 SI \N 247 585 2006-01-11 16:03:57.66999-05 jsmith Closed 2 SI \N 248 581 2006-01-12 13:47:22.249164-05 jsmith Closed 2 SI \N 249 579 2006-01-12 13:47:22.249164-05 jsmith Closed 2 SI \N 250 580 2006-01-12 13:47:22.249164-05 jsmith Closed 2 SI \N 257 461 2006-01-12 16:16:34.691546-05 jsmith Created 2 W \N 258 461 2006-01-12 16:16:34.691546-05 jsmith Status Changed from O to E 2 W \N 259 461 2006-01-12 16:16:51.263622-05 jsmith Status Changed from E to I 2 W \N 260 461 2006-01-12 16:20:53.121931-05 jsmith Status Changed from I to C 2 W \N 261 3002 2006-01-13 11:00:05.14238-05 jsmith Created 2 S \N 262 587 2006-01-13 11:00:55.854322-05 jsmith Created 2 SI \N 263 462 2006-01-13 11:00:56.045455-05 jsmith Created 2 W \N 264 462 2006-01-13 11:00:56.045455-05 jsmith Status Changed from O to E 2 W \N 265 463 2006-01-13 11:13:12.034614-05 jsmith Created 2 W \N 266 463 2006-01-13 11:13:12.034614-05 jsmith Status Changed from O to E 2 W \N 267 462 2006-01-13 11:32:40.503241-05 jsmith Status Changed from E to R 2 W \N 268 383 2006-01-13 11:39:24.374262-05 jsmith Created 2 P \N 269 383 2006-01-13 11:39:27.949053-05 jsmith Created Line #1 2 P \N 271 463 2006-01-13 11:50:07.020591-05 jsmith Status Changed from E to I 2 W \N 272 463 2006-01-13 11:50:25.175319-05 jsmith Status Changed from I to C 2 W \N 273 462 2006-01-13 11:51:00.636398-05 jsmith Status Changed from R to I 2 W \N 274 462 2006-01-13 11:51:09.367063-05 jsmith Status Changed from I to C 2 W \N 275 587 2006-01-13 11:53:30.349428-05 jsmith Closed 2 SI \N 276 3005 2006-01-13 12:48:06.204-05 jsmith Created 2 S \N 277 588 2006-01-13 12:48:06.204-05 jsmith Created 2 SI \N 278 588 2006-01-13 12:57:51.365-05 jsmith Closed 2 SI \N 289 3009 2006-01-13 13:35:44.314-05 jsmith Created 2 S \N 290 591 2006-01-13 13:36:09.059-05 jsmith Created 2 SI \N 291 591 2006-01-13 13:42:28.314-05 jsmith Closed 2 SI \N 292 3015 2006-01-13 15:08:33.291-05 jsmith Created 2 S \N 293 592 2006-01-13 15:08:50.276-05 jsmith Created 2 SI \N 294 466 2006-01-13 15:08:50.376-05 jsmith Created 2 W \N 295 466 2006-01-13 15:08:50.376-05 jsmith Status Changed from O to E 2 W \N 296 467 2006-01-13 15:23:26.626-05 jsmith Created 2 W \N 297 467 2006-01-13 15:23:26.626-05 jsmith Status Changed from O to E 2 W \N 298 385 2006-01-13 15:24:58.188-05 jsmith Created 2 P \N 299 385 2006-01-13 15:25:00.771-05 jsmith Created Line #1 2 P \N 301 467 2006-01-13 15:29:01.838-05 jsmith Status Changed from E to I 2 W \N 302 467 2006-01-13 15:29:15.227-05 jsmith Status Changed from I to C 2 W \N 303 466 2006-01-13 15:29:42.106-05 jsmith Status Changed from E to I 2 W \N 304 466 2006-01-13 15:29:50.027-05 jsmith Status Changed from I to C 2 W \N 305 592 2006-01-13 15:31:00.048-05 jsmith Closed 2 SI \N 306 95 2006-01-30 11:55:44.760979-05 jsmith Name Changed from "Tremendous Toys Inc." to "Tremendous Toys Incorporated" 2 C \N 312 3021 2006-01-30 12:05:07.009224-05 jsmith Created 2 S \N 313 594 2006-01-30 12:05:25.60101-05 jsmith Created 2 SI \N 314 469 2006-01-30 12:05:25.609502-05 jsmith Created 2 W \N 315 469 2006-01-30 12:05:25.609502-05 jsmith Status Changed from O to E 2 W \N 316 470 2006-01-30 12:10:33.500674-05 jsmith Created 2 W \N 317 470 2006-01-30 12:10:33.500674-05 jsmith Status Changed from O to E 2 W \N 318 469 2006-01-30 12:15:26.109414-05 jsmith Status Changed from E to R 2 W \N 319 470 2006-01-30 12:16:16.734143-05 jsmith Status Changed from E to I 2 W \N 320 470 2006-01-30 12:16:25.49459-05 jsmith Status Changed from I to C 2 W \N 321 469 2006-01-30 12:16:46.435991-05 jsmith Status Changed from R to I 2 W \N 322 469 2006-01-30 12:16:58.06761-05 jsmith Status Changed from I to C 2 W \N 323 387 2006-01-30 12:17:52.21944-05 jsmith Created 2 P \N 324 387 2006-01-30 12:18:00.379605-05 jsmith Created Line #1 2 P \N 326 594 2006-01-30 12:42:13.841943-05 jsmith Closed 2 SI \N 327 3023 2006-01-30 16:30:09.067059-05 jsmith Created 2 S \N 328 595 2006-01-30 16:34:29.870379-05 jsmith Created 2 SI \N 329 471 2006-01-30 16:34:29.94873-05 jsmith Created 2 W \N 330 471 2006-01-30 16:34:29.94873-05 jsmith Status Changed from O to E 2 W \N 331 472 2006-01-30 16:42:50.64006-05 jsmith Created 2 W \N 332 472 2006-01-30 16:42:50.64006-05 jsmith Status Changed from O to E 2 W \N 333 389 2006-01-30 16:48:10.574473-05 jsmith Created 2 P \N 334 389 2006-01-30 16:48:27.538966-05 jsmith Created Line #1 2 P \N 336 472 2006-01-30 16:58:10.153362-05 jsmith Status Changed from E to I 2 W \N 337 472 2006-01-30 16:58:17.581518-05 jsmith Status Changed from I to C 2 W \N 338 471 2006-01-30 17:00:37.702398-05 jsmith Status Changed from E to I 2 W \N 339 471 2006-01-30 17:01:28.109709-05 jsmith Status Changed from I to C 2 W \N 340 595 2006-01-30 17:04:33.436889-05 jsmith Closed 2 SI \N 342 3026 2006-01-31 14:09:17.809-05 jsmith Created 2 S \N 343 596 2006-01-31 14:16:19.976-05 jsmith Created 2 SI \N 344 473 2006-01-31 14:16:20.227-05 jsmith Created 2 W \N 345 473 2006-01-31 14:16:20.227-05 jsmith Status Changed from O to E 2 W \N 346 391 2006-01-31 15:18:18.153-05 jsmith Created 2 P \N 347 391 2006-01-31 15:21:22.849-05 jsmith Created Line #1 2 P \N 349 474 2006-01-31 16:08:11.697-05 jsmith Created 2 W \N 350 474 2006-01-31 16:08:11.697-05 jsmith Status Changed from O to E 2 W \N 351 474 2006-02-01 08:14:06.172-05 jsmith Status Changed from E to R 2 W \N 352 474 2006-02-01 08:16:05.143-05 jsmith Status Changed from R to I 2 W \N 353 474 2006-02-01 08:24:08.017-05 jsmith Status Changed from I to C 2 W \N 354 473 2006-02-01 08:34:02.132-05 jsmith Status Changed from E to I 2 W \N 355 473 2006-02-01 08:38:05.732-05 jsmith Status Changed from I to C 2 W \N 356 596 2006-02-01 10:11:20.777-05 jsmith Closed 2 SI \N 357 3028 2006-06-23 16:20:36.765-04 jsmith Created 2 S \N 358 597 2006-06-23 16:21:01.656-04 jsmith Created 2 SI \N 359 475 2006-06-23 16:21:02-04 jsmith Created 2 W \N 360 475 2006-06-23 16:21:02-04 jsmith Status Changed from O to E 2 W \N 361 597 2006-07-05 08:58:24.848-04 jsmith Changed Sched. Date from 2006/06/30 to 2006/07/12 2 SI \N 362 475 2006-07-05 08:58:30.395-04 jsmith Due Date Changed from 2006/06/30 to 2006/07/12 2 W \N 363 476 2006-07-05 08:59:35.301-04 jsmith Created 2 W \N 364 476 2006-07-05 08:59:35.301-04 jsmith Status Changed from O to E 2 W \N 365 393 2006-07-05 09:00:02.848-04 jsmith Created 2 P \N 366 393 2006-07-05 09:00:31.629-04 jsmith Created Line #1 2 P \N 368 476 2006-07-05 09:08:18.426-04 jsmith Status Changed from E to R 2 W \N 369 476 2006-07-05 09:16:56.52-04 jsmith Status Changed from R to I 2 W \N 370 475 2006-07-05 09:17:07.488-04 jsmith Status Changed from E to R 2 W \N 371 476 2006-07-05 09:17:18.113-04 jsmith Status Changed from I to C 2 W \N 372 475 2006-07-05 09:17:35.41-04 jsmith Status Changed from R to I 2 W \N 373 475 2006-07-05 09:18:04.098-04 jsmith Status Changed from I to C 2 W \N 374 597 2006-07-05 09:21:53.395-04 jsmith Closed 2 SI \N 375 3032 2006-07-05 10:55:08.848-04 jsmith Created 2 S \N 376 598 2006-07-05 11:01:50.66-04 jsmith Created 2 SI \N 377 477 2006-07-05 11:01:51.395-04 jsmith Created 2 W \N 378 477 2006-07-05 11:01:51.395-04 jsmith Status Changed from O to E 2 W \N 379 478 2006-07-05 11:11:48.113-04 jsmith Created 2 W \N 380 478 2006-07-05 11:11:48.113-04 jsmith Status Changed from O to E 2 W \N 381 395 2006-07-05 11:22:47.395-04 jsmith Created 2 P \N 382 395 2006-07-05 11:25:16.692-04 jsmith Created Line #1 2 P \N 384 478 2006-07-05 13:31:07.363-04 jsmith Status Changed from E to R 2 W \N 385 478 2006-07-05 13:34:55.301-04 jsmith Status Changed from R to I 2 W \N 386 478 2006-07-05 13:42:08.832-04 jsmith Status Changed from I to C 2 W \N 387 478 2006-07-05 13:42:09.332-04 jsmith Order completed on-time - no exceptions reported\t\t\t\t 1 W \N 388 477 2006-07-05 13:47:13.863-04 jsmith Status Changed from E to I 2 W \N 389 477 2006-07-05 13:58:14.051-04 jsmith Status Changed from I to C 2 W \N 390 477 2006-07-05 13:58:14.301-04 jsmith Order ready for shipping to customer. 1 W \N 391 598 2006-07-05 14:18:09.317-04 jsmith Closed 2 SI \N 397 309 2006-08-02 08:22:37.703-04 jsmith Created 2 I \N 398 180 2006-08-02 08:22:37.703-04 jsmith Created BOM Item10 2 BMI \N 440 97 2006-10-11 09:52:30.253-04 jsmith Created 2 C \N 400 301 2006-08-02 08:22:59.078-04 jsmith Created 2 IS \N 401 309 2006-08-02 08:23:21.046-04 jsmith Pick List Changed from TRUE to FALSE 2 I \N 402 309 2006-08-02 08:23:21.046-04 jsmith Capacity UOM Changed from "EA" to "N/A" 2 I \N 403 309 2006-08-02 08:23:21.046-04 jsmith Alt. Capacity UOM Changed from "EA" to "N/A" 2 I \N 404 309 2006-08-02 08:23:21.046-04 jsmith Shipping UOM Changed from "EA" to "N/A" 2 I \N 405 309 2006-08-02 08:23:21.046-04 jsmith Type Changed from "M" to "F" 2 I \N 441 97 2006-10-11 09:53:00.956-04 jsmith Name Changed from "Xtreme Toys LLC" to "Xtreme ToysLTD" 2 C \N 442 97 2006-10-11 09:53:00.956-04 jsmith Credit Limit Changed from 10,000.00 to 7,782.00 2 C \N 443 97 2006-10-11 09:53:09.847-04 jsmith Name Changed from "Xtreme ToysLTD" to "Xtreme Toys LTD" 2 C \N 444 97 2006-10-11 09:53:09.847-04 jsmith Credit Limit Changed from 7,782.00 to 6,056.00 2 C \N 445 307 2006-10-11 09:53:43.675-04 jsmith Description 1 Changed from "Wrecker Tough Truck" to "White Tough Truck" 2 I \N 446 307 2006-10-11 09:53:43.675-04 jsmith Description 2 Changed from "Wrecker" to "White" 2 I \N 447 97 2006-10-11 09:57:58.316-04 jsmith Credit Limit Changed from 6,056.00 to 4,713.00 2 C \N 448 97 2006-10-11 10:09:08.347-04 jsmith Credit Limit Changed from 4,713.00 to 2,541.00 2 C \N 450 402 2006-10-11 10:13:27.316-04 jsmith Created 2 P \N 426 184 2006-08-30 15:16:52.613-04 jsmith Created BOM Item50 2 BMI \N 451 402 2006-10-11 10:13:51.019-04 jsmith Created Line #1 2 P \N 427 185 2006-08-30 15:17:29.456-04 jsmith Created BOM Item20 2 BMI \N 454 97 2006-10-11 10:45:38.253-04 jsmith Credit Limit Changed from 2,541.00 to 1,370.00 2 C \N 455 309 2006-10-12 10:13:57.941-04 mfgadmin Deactivated 2 I \N 456 310 2006-10-13 14:44:48.628-04 jsmith Created 2 I \N 457 186 2006-10-13 14:44:48.628-04 jsmith Created BOM Item30 2 BMI \N 458 187 2006-10-13 14:44:48.628-04 jsmith Created BOM Item50 2 BMI \N 459 188 2006-10-13 14:44:48.628-04 jsmith Created BOM Item10 2 BMI \N 460 189 2006-10-13 14:44:48.628-04 jsmith Created BOM Item20 2 BMI \N 461 302 2006-10-13 14:45:11.753-04 jsmith Created 2 IS \N 462 302 2006-10-13 14:46:18.956-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MPS" 2 IS \N 463 294 2006-10-13 14:46:24.8-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MRP" 2 IS \N 464 296 2006-10-13 14:46:32.206-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MRP" 2 IS \N 465 298 2006-10-13 14:46:38.331-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MRP" 2 IS \N 466 295 2006-10-13 14:46:43.847-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MRP" 2 IS \N 467 299 2006-10-13 14:46:49.394-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MRP" 2 IS \N 468 300 2006-10-13 14:47:01.253-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MPS" 2 IS \N 469 297 2006-10-13 14:47:42.113-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MRP" 2 IS \N 754 618 2007-05-30 10:23:44.090512-04 mfgadmin Created 2 SI \N 470 293 2006-10-13 14:47:50.91-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MPS" 2 IS \N 471 301 2006-10-13 14:48:46.441-04 jsmith Planner Code Changed from "ED-MICHAELS" to "MRP" 2 IS \N 472 311 2006-10-13 14:49:37.097-04 jsmith Created 2 I \N 473 190 2006-10-13 14:49:37.097-04 jsmith Created BOM Item30 2 BMI \N 474 191 2006-10-13 14:49:37.097-04 jsmith Created BOM Item50 2 BMI \N 475 192 2006-10-13 14:49:37.097-04 jsmith Created BOM Item10 2 BMI \N 476 193 2006-10-13 14:49:37.097-04 jsmith Created BOM Item20 2 BMI \N 477 303 2006-10-13 14:49:53.753-04 jsmith Created 2 IS \N 478 311 2006-10-13 14:50:19.347-04 jsmith Description 1 Changed from "Yellow Tough Truck" to "Blue Tough Truck" 2 I \N 479 311 2006-10-13 14:50:19.347-04 jsmith Description 2 Changed from "Truck Type 1" to "Collectors" 2 I \N 480 310 2006-10-13 14:50:39.175-04 jsmith Description 1 Changed from "Yellow Tough Truck" to "Red Tough Truck" 2 I \N 481 310 2006-10-13 14:50:39.175-04 jsmith Description 2 Changed from "Truck Type 1" to "Collectors" 2 I \N 482 307 2006-10-13 14:50:49.378-04 jsmith Description 2 Changed from "White" to "Collectors" 2 I \N 483 312 2006-10-13 14:53:21.863-04 jsmith Created 2 I \N 484 304 2006-10-13 14:53:39.956-04 jsmith Created 2 IS \N 485 194 2006-10-13 14:54:12.581-04 jsmith Created BOM Item10 2 BMI \N 486 195 2006-10-13 14:54:25.613-04 jsmith Created BOM Item20 2 BMI \N 487 196 2006-10-13 14:54:42.675-04 jsmith Created BOM Item30 2 BMI \N 488 3038 2006-10-13 15:10:21.3-04 jsmith Created 2 S \N 489 601 2006-10-13 15:10:33.175-04 jsmith Created 2 SI \N 490 484 2006-10-13 15:10:33.472-04 jsmith Created 2 W \N 491 484 2006-10-13 15:10:33.472-04 jsmith Status Changed from O to E 2 W \N 492 485 2006-10-13 15:16:35.706-04 jsmith Created 2 W \N 493 485 2006-10-13 15:16:35.706-04 jsmith Status Changed from O to E 2 W \N 494 485 2006-10-13 15:17:06.05-04 jsmith Status Changed from E to R 2 W \N 495 405 2006-10-13 15:17:52.066-04 jsmith Created 2 P \N 496 405 2006-10-13 15:17:57.816-04 jsmith Created Line #1 2 P \N 498 485 2006-10-13 15:33:17.816-04 jsmith Status Changed from R to I 2 W \N 499 485 2006-10-13 15:33:31.191-04 jsmith Status Changed from I to C 2 W \N 500 484 2006-10-13 15:35:24.378-04 jsmith Status Changed from E to I 2 W \N 501 484 2006-10-13 15:35:34.878-04 jsmith Status Changed from I to C 2 W \N 502 601 2006-10-13 15:51:19.519-04 jsmith Closed 2 SI \N 516 97 2006-10-30 10:46:22.605-05 jsmith Credit Limit Changed from 1,370.00 to 739.00 2 C \N 517 293 2006-10-30 12:09:48.433-05 jsmith Planner Code Changed from "MPS" to "MRP" 2 IS \N 524 97 2006-12-05 11:06:50.713-05 mfgadmin Credit Limit Changed from 739.00 to 398.00 2 C \N 525 3047 2006-12-05 12:04:00.463-05 mfgadmin Created 2 S \N 526 604 2006-12-05 12:04:15.666-05 mfgadmin Created 2 SI \N 527 604 2006-12-05 12:24:01.619-05 mfgadmin Closed 2 SI \N 528 3049 2006-12-28 11:10:16.359-05 mfgadmin Created 2 S \N 529 605 2006-12-28 11:10:38.953-05 mfgadmin Created 2 SI \N 530 488 2006-12-28 11:10:39.781-05 mfgadmin Created 2 W \N 531 488 2006-12-28 11:10:39.781-05 mfgadmin Status Changed from O to E 2 W \N 532 489 2006-12-28 11:12:13.843-05 mfgadmin Created 2 W \N 533 489 2006-12-28 11:12:13.843-05 mfgadmin Status Changed from O to E 2 W \N 534 412 2006-12-28 11:12:42.906-05 mfgadmin Created 2 P \N 535 412 2006-12-28 11:12:47.468-05 mfgadmin Created Line #1 2 P \N 539 415 2006-12-28 11:16:52.968-05 mfgadmin Created 2 P \N 540 415 2006-12-28 11:17:42.468-05 mfgadmin Created Line #1 2 P \N 542 488 2006-12-28 11:41:11.5-05 mfgadmin Status Changed from E to I 2 W \N 543 489 2006-12-28 11:43:32.171-05 mfgadmin Status Changed from E to I 2 W \N 544 489 2006-12-28 11:43:35.187-05 mfgadmin Status Changed from I to C 2 W \N 545 488 2006-12-28 11:44:36-05 mfgadmin Status Changed from I to C 2 W \N 546 605 2006-12-28 11:52:03.156-05 mfgadmin Closed 2 SI \N 553 293 2007-01-03 14:19:19.234-05 mfgadmin Reorder Level Changed from 0.00 to 100.00 2 IS \N 554 293 2007-01-03 14:20:07.156-05 mfgadmin Reorder Level Changed from 100.00 to 200.00 2 IS \N 555 293 2007-01-03 14:22:35.906-05 mfgadmin Reorder Level Changed from 200.00 to 0.00 2 IS \N 556 293 2007-01-03 14:23:28.343-05 mfgadmin Reorder Level Changed from 0.00 to 1,000.00 2 IS \N 557 293 2007-01-03 14:26:50.312-05 mfgadmin Reorder Level Changed from 1,000.00 to 200.00 2 IS \N 558 293 2007-01-03 14:26:50.312-05 mfgadmin Order Up To Changed from 0.00 to 1,000.00 2 IS \N 559 293 2007-01-03 14:28:20.593-05 mfgadmin Reorder Level Changed from 200.00 to 0.00 2 IS \N 560 293 2007-01-03 14:28:20.593-05 mfgadmin Order Up To Changed from 1,000.00 to 0.00 2 IS \N 561 3053 2007-01-08 16:23:13.527-05 jsmith Created 2 S \N 562 607 2007-01-08 16:25:43.183-05 jsmith Created 2 SI \N 563 607 2007-01-08 16:34:32.886-05 jsmith Closed 2 SI \N 569 3059 2007-01-10 11:38:22.937-05 mfgadmin Created 2 S \N 570 609 2007-01-10 11:38:57.484-05 mfgadmin Created 2 SI \N 571 492 2007-01-10 11:38:58.312-05 mfgadmin Created 2 W \N 572 492 2007-01-10 11:38:58.312-05 mfgadmin Status Changed from O to E 2 W \N 573 609 2007-02-20 08:13:06.407-05 mfgadmin Changed Sched. Date from 2007/01/17 to 2007/02/22 2 SI \N 574 492 2007-02-20 08:13:09.079-05 mfgadmin Due Date Changed from 2007/01/17 to 2007/02/22 2 W \N 575 493 2007-02-20 08:16:55.563-05 mfgadmin Created 2 W \N 576 493 2007-02-20 08:16:55.563-05 mfgadmin Status Changed from O to E 2 W \N 577 494 2007-02-20 08:16:59.657-05 mfgadmin Created 2 W \N 578 494 2007-02-20 08:16:59.657-05 mfgadmin Status Changed from O to E 2 W \N 579 417 2007-02-20 08:20:21.735-05 mfgadmin Created 2 P \N 580 417 2007-02-20 08:20:25.579-05 mfgadmin Created Line #1 2 P \N 605 313 2007-05-24 16:27:54.546-04 mfgadmin Created 2 I \N 582 493 2007-02-20 08:34:35.173-05 mfgadmin Status Changed from E to I 2 W \N 583 494 2007-02-20 08:34:45.673-05 mfgadmin Status Changed from E to I 2 W \N 584 492 2007-02-20 08:34:53.094-05 mfgadmin Status Changed from E to I 2 W \N 585 493 2007-02-20 08:35:03.266-05 mfgadmin Status Changed from I to C 2 W \N 586 494 2007-02-20 08:35:07.923-05 mfgadmin Status Changed from I to C 2 W \N 587 492 2007-02-20 08:35:12.407-05 mfgadmin Status Changed from I to C 2 W \N 588 609 2007-02-20 08:36:16.579-05 mfgadmin Closed 2 SI \N 589 3061 2007-02-20 08:41:19.938-05 mfgadmin Created 2 S \N 590 610 2007-02-20 08:41:33.548-05 mfgadmin Created 2 SI \N 591 610 2007-02-20 08:42:31.751-05 mfgadmin Closed 2 SI \N 598 495 2007-04-05 15:30:35.14-04 jsmith Status Changed from O to E 2 W \N 594 419 2007-02-23 13:45:52.265-05 mfgadmin Created 2 P \N 595 419 2007-02-23 13:46:24.343-05 mfgadmin Created Line #1 2 P \N 599 495 2007-04-05 15:31:35.406-04 jsmith Status Changed from E to I 2 W \N 600 495 2007-04-05 15:33:00.171-04 jsmith Status Changed from I to C 2 W \N 601 495 2007-04-05 15:33:00.75-04 jsmith April Production Run - MA 1 W \N 602 3065 2007-04-05 15:33:37.859-04 jsmith Created 2 S \N 603 612 2007-04-05 15:33:56.515-04 jsmith Created 2 SI \N 604 612 2007-04-05 15:44:06.765-04 jsmith Closed 2 SI \N 606 305 2007-05-24 16:31:08.625-04 mfgadmin Created 2 IS \N 607 36 2007-05-24 16:35:01.687-04 mfgadmin Created 2 WH \N 608 314 2007-05-24 16:40:05.656-04 mfgadmin Created 2 I \N 609 306 2007-05-24 16:40:43.031-04 mfgadmin Created 2 IS \N 610 315 2007-05-24 16:45:44.187-04 mfgadmin Created 2 I \N 611 307 2007-05-24 16:46:13.359-04 mfgadmin Created 2 IS \N 612 306 2007-05-24 16:47:06.296-04 mfgadmin Reorder Level Changed from 0.00 to 100.00 2 IS \N 613 306 2007-05-24 16:47:06.296-04 mfgadmin Order Up To Changed from 0.00 to 1,000.00 2 IS \N 614 316 2007-05-24 16:53:05.453-04 mfgadmin Created 2 I \N 615 198 2007-05-24 16:53:05.453-04 mfgadmin Created BOM Item30 2 BMI \N 616 199 2007-05-24 16:53:05.453-04 mfgadmin Created BOM Item50 2 BMI \N 617 200 2007-05-24 16:53:05.453-04 mfgadmin Created BOM Item10 2 BMI \N 618 201 2007-05-24 16:53:05.453-04 mfgadmin Created BOM Item20 2 BMI \N 619 308 2007-05-24 16:54:04.937-04 mfgadmin Created 2 IS \N 620 309 2007-05-24 16:54:41.468-04 mfgadmin Created 2 IS \N 621 316 2007-05-24 16:56:02.656-04 mfgadmin Description 1 Changed from "Yellow Tough Truck" to "Classic Race Car With Logo" 2 I \N 622 316 2007-05-24 16:56:02.656-04 mfgadmin Description 2 Changed from "Truck Type 1" to "Car Type 1" 2 I \N 623 316 2007-05-24 16:56:02.656-04 mfgadmin List Price Changed from "10.9900" to "45.0000" 2 I \N 624 309 2007-05-24 16:56:56.843-04 mfgadmin Planner Code Changed from "MRP" to "NONE" 2 IS \N 625 308 2007-05-24 16:57:03.281-04 mfgadmin Planner Code Changed from "MRP" to "NONE" 2 IS \N 626 307 2007-05-24 16:57:22.968-04 mfgadmin Planner Code Changed from "MRP" to "NONE" 2 IS \N 627 203 2007-05-24 17:04:35.281-04 mfgadmin Created BOM Item10 2 BMI \N 628 204 2007-05-26 20:22:55.531-04 mfgadmin Created BOM Item60 2 BMI \N 629 205 2007-05-26 20:23:49.578-04 mfgadmin Created BOM Item60 2 BMI \N 630 206 2007-05-26 20:25:57.531-04 mfgadmin Created BOM Item50 2 BMI \N 631 206 2007-05-26 20:26:06.078-04 mfgadmin Effective Date Changed from Always to 2007/05/26 2 BMI \N 632 206 2007-05-26 20:26:16.859-04 mfgadmin Effective Date Changed from 2007/05/26 to 2007/05/16 2 BMI \N 633 205 2007-05-26 20:27:15.125-04 mfgadmin Effective Date Changed from Always to 2007/05/16 2 BMI \N 634 200 2007-05-26 20:27:51.593-04 mfgadmin Expiration Date Changed from Never to 2007/05/26 2 BMI \N 635 317 2007-05-26 20:28:57.921-04 mfgadmin Created 2 I \N 636 310 2007-05-26 20:29:54.906-04 mfgadmin Created 2 IS \N 637 317 2007-05-26 20:30:47.546-04 mfgadmin Description 1 Changed from "Tough Truck Body Type 1" to "Car Body Type 1" 2 I \N 638 317 2007-05-26 20:30:47.546-04 mfgadmin Description 2 Changed from "Tough Truck Body Type 1" to "Car Metal Body" 2 I \N 639 207 2007-05-26 20:31:32.578-04 mfgadmin Created BOM Item60 2 BMI \N 640 319 2007-05-26 20:37:38.875-04 mfgadmin Created 2 I \N 641 311 2007-05-26 20:37:55.609-04 mfgadmin Created 2 IS \N 642 319 2007-05-26 20:41:57.312-04 mfgadmin Description 2 Changed from "" to "Type 1 - Cars" 2 I \N 643 321 2007-05-26 20:43:19.546-04 mfgadmin Created 2 I \N 644 312 2007-05-26 20:43:51.296-04 mfgadmin Created 2 IS \N 645 322 2007-05-26 20:45:04.875-04 mfgadmin Created 2 I \N 646 313 2007-05-26 20:45:29.031-04 mfgadmin Created 2 IS \N 647 322 2007-05-26 20:45:47.5-04 mfgadmin Description 1 Changed from "Hubcap Type 1" to "Fender Type 1" 2 I \N 648 323 2007-05-26 20:47:11.078-04 mfgadmin Created 2 I \N 649 314 2007-05-26 20:49:18.671-04 mfgadmin Created 2 IS \N 650 315 2007-05-26 20:49:56.734-04 mfgadmin Created 2 IS \N 651 323 2007-05-26 20:50:17.765-04 mfgadmin Inventory UOM 2 Changed from "EA" to "SH" 2 I \N 652 323 2007-05-26 20:50:17.765-04 mfgadmin Capacity UOM Changed from "EA" to "SH" 2 I \N 653 323 2007-05-26 20:50:17.765-04 mfgadmin Alt. Capacity UOM Changed from "EA" to "SH" 2 I \N 654 323 2007-05-26 20:50:17.765-04 mfgadmin Shipping UOM Changed from "EA" to "SH" 2 I \N 655 324 2007-05-26 20:51:52.406-04 mfgadmin Created 2 I \N 656 316 2007-05-26 20:52:32.156-04 mfgadmin Created 2 IS \N 657 317 2007-05-26 20:53:09.625-04 mfgadmin Created 2 IS \N 658 305 2007-05-26 20:54:28-04 mfgadmin Planner Code Changed from "MRP" to "NONE" 2 IS \N 659 208 2007-05-26 21:06:05.234-04 mfgadmin Created BOM Item10 2 BMI \N 660 210 2007-05-26 21:12:47.64-04 mfgadmin Created BOM Item70 2 BMI \N 661 325 2007-05-26 21:13:11.031-04 mfgadmin Created 2 I \N 662 318 2007-05-26 21:14:25.5-04 mfgadmin Created 2 IS \N 663 325 2007-05-26 21:16:22.218-04 mfgadmin Description 1 Changed from "Yellow Paint 1" to "Yellow Paint 2" 2 I \N 664 325 2007-05-26 21:16:22.218-04 mfgadmin Description 2 Changed from " Yellow Paint Type 1" to " Yellow Paint Type 2" 2 I \N 665 421 2007-05-26 21:18:21.203-04 mfgadmin Created 2 P \N 666 421 2007-05-26 21:19:06.015-04 mfgadmin Created Line #1 2 P \N 668 496 2007-05-26 21:34:39.328-04 mfgadmin Created 2 W \N 669 496 2007-05-26 21:34:39.328-04 mfgadmin Status Changed from O to E 2 W \N 670 421 2007-05-26 21:48:28.906-04 mfgadmin Created Line #2 2 P \N 671 423 2007-05-26 21:48:46.312-04 mfgadmin Created 2 P \N 672 423 2007-05-26 21:48:52.375-04 mfgadmin Created Line #1 2 P \N 674 421 2007-05-26 21:49:07.796-04 mfgadmin Created Line #3 2 P \N 675 421 2007-05-26 21:51:19.171-04 mfgadmin Created Line #4 2 P \N 676 497 2007-05-26 21:52:43.265-04 mfgadmin Created 2 W \N 677 497 2007-05-26 21:52:43.265-04 mfgadmin Status Changed from O to E 2 W \N 678 3067 2007-05-26 21:53:28.562-04 mfgadmin Created 2 S \N 679 613 2007-05-26 21:53:49.218-04 mfgadmin Created 2 SI \N 680 498 2007-05-26 21:55:01.562-04 mfgadmin Created 2 W \N 681 498 2007-05-26 21:55:01.562-04 mfgadmin Status Changed from O to E 2 W \N 682 499 2007-05-26 21:56:32.421-04 mfgadmin Created 2 W \N 683 499 2007-05-26 21:56:32.421-04 mfgadmin Status Changed from O to E 2 W \N 684 499 2007-05-26 21:57:31.968-04 mfgadmin Status Changed from E to O 2 W \N 685 500 2007-05-26 21:57:37.281-04 mfgadmin Created 2 W \N 686 500 2007-05-26 21:57:37.281-04 mfgadmin Status Changed from O to E 2 W \N 687 499 2007-05-26 21:57:37.281-04 mfgadmin Status Changed from O to E 2 W \N 688 501 2007-05-26 21:59:02.359-04 mfgadmin Created 2 W \N 689 502 2007-05-26 21:59:02.359-04 mfgadmin Created 2 W \N 690 502 2007-05-26 21:59:02.359-04 mfgadmin Status Changed from O to E 2 W \N 691 501 2007-05-26 21:59:02.359-04 mfgadmin Status Changed from O to E 2 W \N 692 503 2007-05-26 21:59:33.125-04 mfgadmin Created 2 W \N 693 504 2007-05-26 21:59:33.125-04 mfgadmin Created 2 W \N 694 504 2007-05-26 21:59:33.125-04 mfgadmin Status Changed from O to E 2 W \N 695 503 2007-05-26 21:59:33.125-04 mfgadmin Status Changed from O to E 2 W \N 696 305 2007-05-26 22:00:43.906-04 mfgadmin Planner Code Changed from "NONE" to "OP" 2 IS \N 697 500 2007-05-26 22:02:03.281-04 mfgadmin Status Changed from E to O 2 W \N 698 502 2007-05-26 22:02:07.625-04 mfgadmin Status Changed from E to O 2 W \N 699 504 2007-05-26 22:02:11.421-04 mfgadmin Status Changed from E to O 2 W \N 700 500 2007-05-26 22:02:15.343-04 mfgadmin Status Changed from O to E 2 W \N 701 502 2007-05-26 22:02:18.671-04 mfgadmin Status Changed from O to E 2 W \N 702 504 2007-05-26 22:02:23.484-04 mfgadmin Status Changed from O to E 2 W \N 703 421 2007-05-30 08:31:40.062-04 mfgadmin Created Line #5 2 P \N 704 421 2007-05-30 08:31:53.531-04 mfgadmin Created Line #6 2 P \N 705 421 2007-05-30 08:34:00.765-04 mfgadmin Created Line #7 2 P \N 706 500 2007-05-30 08:57:50.718-04 mfgadmin Status Changed from E to I 2 W \N 707 500 2007-05-30 08:57:55.218-04 mfgadmin Status Changed from I to C 2 W \N 708 502 2007-05-30 08:58:12.296-04 mfgadmin Status Changed from E to I 2 W \N 709 502 2007-05-30 08:58:42.296-04 mfgadmin Status Changed from I to C 2 W \N 710 504 2007-05-30 08:58:56.531-04 mfgadmin Status Changed from E to I 2 W \N 711 504 2007-05-30 08:59:00.234-04 mfgadmin Status Changed from I to C 2 W \N 712 496 2007-05-30 09:00:55.109-04 mfgadmin Qty. Ordered Changed from 100.00 to 800.00 2 W \N 713 496 2007-05-30 09:03:32.578-04 mfgadmin Status Changed from E to I 2 W \N 714 496 2007-05-30 09:03:35.718-04 mfgadmin Status Changed from I to C 2 W \N 715 497 2007-05-30 09:04:07.625-04 mfgadmin Status Changed from E to I 2 W \N 716 497 2007-05-30 09:04:37.156-04 mfgadmin Status Changed from I to C 2 W \N 717 499 2007-05-30 09:04:52.671-04 mfgadmin Status Changed from E to I 2 W \N 718 501 2007-05-30 09:05:12.656-04 mfgadmin Status Changed from E to I 2 W \N 719 503 2007-05-30 09:05:32.796-04 mfgadmin Status Changed from E to I 2 W \N 720 498 2007-05-30 09:05:59.843-04 mfgadmin Status Changed from E to I 2 W \N 721 614 2007-05-30 09:18:50.421-04 mfgadmin Created 2 SI \N 722 615 2007-05-30 09:19:03.703-04 mfgadmin Created 2 SI \N 723 616 2007-05-30 09:19:20.593-04 mfgadmin Created 2 SI \N 725 615 2007-05-30 09:25:48.937-04 mfgadmin Closed 2 SI \N 726 616 2007-05-30 09:25:48.937-04 mfgadmin Closed 2 SI \N 727 614 2007-05-30 09:25:48.937-04 mfgadmin Closed 2 SI \N 728 613 2007-05-30 09:25:48.937-04 mfgadmin Closed 2 SI \N 733 211 2007-05-30 10:37:07.625-04 mfgadmin Created BOM Item20 2 BMI \N 738 507 2007-05-30 10:46:29.703-04 mfgadmin Created 2 W \N 739 507 2007-05-30 10:46:29.703-04 mfgadmin Status Changed from O to E 2 W \N 740 507 2007-05-30 10:47:10.125-04 mfgadmin Status Changed from E to I 2 W \N 741 507 2007-05-30 10:47:47.953-04 mfgadmin Status Changed from I to C 2 W \N 742 499 2007-05-30 10:57:22.109-04 mfgadmin Status Changed from I to C 2 W \N 743 501 2007-05-30 10:57:27.718-04 mfgadmin Status Changed from I to C 2 W \N 744 503 2007-05-30 10:57:33.546-04 mfgadmin Status Changed from I to C 2 W \N 747 498 2007-05-30 10:58:00.093-04 mfgadmin Status Changed from I to C 2 W \N 748 97 2007-05-30 09:51:09.061667-04 mfgadmin Credit Limit Changed from 398.00 to 215.00 2 C \N 750 3071 2007-05-30 10:22:22.770776-04 mfgadmin Created 2 S \N 751 617 2007-05-30 10:23:13.230512-04 mfgadmin Created 2 SI \N 752 508 2007-05-30 10:23:13.463922-04 mfgadmin Created 2 W \N 753 508 2007-05-30 10:23:13.463922-04 mfgadmin Status Changed from O to E 2 W \N 791 37 2007-08-03 03:35:40.734-04 mfgadmin Created 2 WH \N 759 510 2007-05-30 10:45:57.413152-04 mfgadmin Created 2 W \N 760 510 2007-05-30 10:45:57.413152-04 mfgadmin Status Changed from O to E 2 W \N 761 425 2007-05-30 10:46:22.462804-04 mfgadmin Created 2 P \N 762 425 2007-05-30 10:46:29.654508-04 mfgadmin Created Line #1 2 P \N 764 204 2007-05-30 11:03:31.436395-04 mfgadmin Expiration Date Changed from Never to 2007/05/30 2 BMI \N 765 212 2007-05-30 11:04:07.752446-04 mfgadmin Created BOM Item80 2 BMI \N 766 206 2007-05-30 11:04:32.172236-04 mfgadmin Expiration Date Changed from Never to 2007/05/30 2 BMI \N 767 205 2007-05-30 11:04:52.100511-04 mfgadmin Expiration Date Changed from Never to 2007/05/30 2 BMI \N 774 513 2007-05-30 11:26:29.12692-04 mfgadmin Created 2 W \N 775 513 2007-05-30 11:26:29.12692-04 mfgadmin Status Changed from O to E 2 W \N 776 514 2007-05-30 11:27:01.694163-04 mfgadmin Created 2 W \N 777 514 2007-05-30 11:27:01.694163-04 mfgadmin Status Changed from O to E 2 W \N 778 427 2007-05-30 11:27:33.51984-04 mfgadmin Created 2 P \N 779 427 2007-05-30 11:27:38.449304-04 mfgadmin Created Line #1 2 P \N 781 513 2007-05-30 11:31:29.479549-04 mfgadmin Status Changed from E to I 2 W \N 782 513 2007-05-30 11:31:33.421967-04 mfgadmin Status Changed from I to C 2 W \N 783 514 2007-05-30 11:32:36.219628-04 mfgadmin Status Changed from E to I 2 W \N 784 514 2007-05-30 11:33:01.452914-04 mfgadmin Status Changed from I to C 2 W \N 785 510 2007-05-30 11:33:24.73485-04 mfgadmin Status Changed from E to I 2 W \N 786 510 2007-05-30 11:33:37.241578-04 mfgadmin Status Changed from I to C 2 W \N 787 508 2007-05-30 11:33:47.228336-04 mfgadmin Status Changed from E to I 2 W \N 788 508 2007-05-30 11:34:01.639193-04 mfgadmin Status Changed from I to C 2 W \N 789 617 2007-05-30 11:39:39.351591-04 mfgadmin Closed 2 SI \N 790 618 2007-05-30 11:39:39.351591-04 mfgadmin Closed 2 SI \N 792 1 2006-10-25 14:59:32.156-04 mfgadmin Worked with Frank to define the new truck line. He is going back to his management to get final approval. 1 INCDT \N 793 1 2007-07-03 16:25:02.725-04 mfgadmin Contacted legal to get contracts for another project. 1 INCDT \N 794 1 2007-07-03 16:25:40.522-04 mfgadmin Marketing looking to use this as model for future efforts. 1 INCDT \N 828 3 2007-09-21 14:05:02.515-04 mfgadmin Created 2 TO \N 829 3 2007-09-21 14:09:41.343-04 mfgadmin Created 2 TI \N 863 436 2007-12-14 12:34:41.546-05 mfgadmin Created Line #1 2 P \N 831 3074 2007-09-21 14:30:46.203-04 mfgadmin Created 2 S \N 832 620 2007-09-21 14:31:13.89-04 mfgadmin Created 2 SI \N 800 3073 2007-08-31 10:18:36.093-04 mfgadmin Created 2 S \N 801 516 2007-08-31 10:18:36.093-04 mfgadmin Created 2 W \N 802 516 2007-08-31 10:18:36.093-04 mfgadmin Status Changed from O to E 2 W \N 803 619 2007-08-31 10:18:36.093-04 mfgadmin Created 2 SI \N 804 517 2007-08-31 10:24:41.125-04 mfgadmin Created 2 W \N 805 517 2007-08-31 10:24:41.125-04 mfgadmin Status Changed from O to E 2 W \N 806 429 2007-08-31 10:25:24.671-04 mfgadmin Created 2 P \N 807 429 2007-08-31 10:25:29.14-04 mfgadmin Created Line #1 2 P \N 833 520 2007-09-21 14:31:14.531-04 mfgadmin Created 2 W \N 809 1 2007-08-31 10:41:13.828-04 mfgadmin Created 2 TO \N 810 319 2007-08-31 10:43:28.359-04 mfgadmin Created 2 IS \N 811 320 2007-08-31 10:43:28.734-04 mfgadmin Created 2 IS \N 834 520 2007-09-21 14:31:14.531-04 mfgadmin Status Changed from O to E 2 W \N 835 521 2007-09-21 14:32:10.25-04 mfgadmin Created 2 W \N 814 321 2007-08-31 10:44:50.796-04 mfgadmin Created 2 IS \N 815 2 2007-08-31 10:45:30.89-04 mfgadmin Created 2 TI \N 816 517 2007-08-31 10:58:58.546-04 mfgadmin Status Changed from E to R 2 W \N 817 517 2007-08-31 10:59:55.343-04 mfgadmin Status Changed from R to I 2 W \N 818 517 2007-08-31 11:00:26.421-04 mfgadmin Status Changed from I to C 2 W \N 819 516 2007-08-31 11:03:44.609-04 mfgadmin Status Changed from E to I 2 W \N 820 516 2007-08-31 11:04:08.515-04 mfgadmin Status Changed from I to C 2 W \N 821 619 2007-08-31 11:10:34.734-04 mfgadmin Closed 2 SI \N 836 521 2007-09-21 14:32:10.25-04 mfgadmin Status Changed from O to E 2 W \N 865 2 2007-12-14 12:37:41.875-05 mfgadmin Closed 2 TI \N 838 432 2007-09-21 14:32:45.14-04 mfgadmin Created 2 P \N 839 432 2007-09-21 14:32:54.656-04 mfgadmin Created Line #1 2 P \N 840 432 2007-09-21 14:33:36.812-04 mfgadmin Created Line #2 2 P \N 866 3 2007-12-14 12:38:07.515-05 mfgadmin Closed 2 TI \N 842 521 2007-09-21 14:51:13.093-04 mfgadmin Status Changed from E to I 2 W \N 843 521 2007-09-21 14:51:22.203-04 mfgadmin Status Changed from I to C 2 W \N 844 520 2007-09-21 14:51:32.156-04 mfgadmin Status Changed from E to I 2 W \N 845 520 2007-09-21 14:52:09.39-04 mfgadmin Status Changed from I to C 2 W \N 846 620 2007-09-21 14:54:18.265-04 mfgadmin Closed 2 SI \N 850 3076 2007-12-14 12:31:06.625-05 mfgadmin Created 2 S \N 851 522 2007-12-14 12:31:06.625-05 mfgadmin Created 2 W \N 852 522 2007-12-14 12:31:06.625-05 mfgadmin Status Changed from O to E 2 W \N 853 621 2007-12-14 12:31:06.625-05 mfgadmin Created 2 SI \N 854 523 2007-12-14 12:31:06.625-05 mfgadmin Created 2 W \N 855 523 2007-12-14 12:31:06.625-05 mfgadmin Status Changed from O to E 2 W \N 856 622 2007-12-14 12:31:06.625-05 mfgadmin Created 2 SI \N 857 524 2007-12-14 12:33:31.062-05 mfgadmin Created 2 W \N 858 524 2007-12-14 12:33:31.062-05 mfgadmin Status Changed from O to E 2 W \N 859 434 2007-12-14 12:34:02.609-05 mfgadmin Created 2 P \N 860 434 2007-12-14 12:34:13.703-05 mfgadmin Created Line #1 2 P \N 867 5 2007-12-14 12:38:35.859-05 mfgadmin Created 2 TO \N 862 436 2007-12-14 12:34:30.765-05 mfgadmin Created 2 P \N 901 327 2007-12-20 09:31:57.202-05 mfgadmin Created 2 I \N 902 322 2007-12-20 09:33:20.124-05 mfgadmin Created 2 IS \N 904 303 2007-12-20 09:42:35.234-05 mfgadmin Inventory UOM Changed from "EA" (4) to "WSET" (10) 2 I \N 905 303 2007-12-20 09:42:35.234-05 mfgadmin Price UOM Changed from "EA" (4) to "WSET" (10) 2 I \N 868 4 2007-12-14 12:39:12.875-05 mfgadmin Created 2 TI \N 906 303 2007-12-20 09:44:04.124-05 mfgadmin Inventory UOM Changed from "WSET" (10) to "EA" (4) 2 I \N 870 4 2007-12-14 12:41:22.078-05 mfgadmin Closed 2 TI \N 871 524 2007-12-14 12:54:24.125-05 mfgadmin Status Changed from E to I 2 W \N 872 524 2007-12-14 12:54:44.265-05 mfgadmin Status Changed from I to C 2 W \N 873 522 2007-12-14 12:55:09.281-05 mfgadmin Status Changed from E to R 2 W \N 874 523 2007-12-14 12:57:11.015-05 mfgadmin Status Changed from E to R 2 W \N 875 522 2007-12-14 12:58:51.468-05 mfgadmin Status Changed from R to I 2 W \N 876 522 2007-12-14 13:00:47.765-05 mfgadmin Status Changed from I to C 2 W \N 877 523 2007-12-14 13:01:02.421-05 mfgadmin Status Changed from R to I 2 W \N 878 523 2007-12-14 13:01:17.109-05 mfgadmin Status Changed from I to C 2 W \N 879 621 2007-12-14 13:06:02.015-05 mfgadmin Closed 2 SI \N 880 622 2007-12-14 13:06:02.015-05 mfgadmin Closed 2 SI \N 881 1 2007-12-14 13:07:06.718-05 mfgadmin Created 2 RA \N 882 3077 2007-12-14 13:08:32.625-05 mfgadmin Created 2 S \N 883 623 2007-12-14 13:08:32.625-05 mfgadmin Created 2 SI \N 884 1 2007-12-14 13:08:32.625-05 mfgadmin Authorized Qty 10.00 of YTRUCK1 2 RA \N 907 303 2007-12-20 09:44:04.124-05 mfgadmin Price UOM Changed from "WSET" (10) to "EA" (4) 2 I \N 886 3 2007-12-14 13:10:17.796-05 mfgadmin Created 2 RA \N 887 3078 2007-12-14 13:10:48.812-05 mfgadmin Created 2 S \N 888 624 2007-12-14 13:10:48.812-05 mfgadmin Created 2 SI \N 889 3 2007-12-14 13:10:48.812-05 mfgadmin Authorized Qty 10.00 of YTRUCK1 2 RA \N 890 625 2007-12-14 13:11:21.296-05 mfgadmin Created 2 SI \N 891 3 2007-12-14 13:11:21.296-05 mfgadmin Authorized Qty 1.00 of RTRUCK1 2 RA \N 892 4 2007-12-14 13:11:32.703-05 mfgadmin Created 2 RA \N 893 4 2007-12-14 13:12:02.953-05 mfgadmin Authorized Qty 1.00 of YTRUCK1 2 RA \N 894 3078 2007-12-14 13:20:21.218-05 mfgadmin Hold Type Changed from "Unknown/Error" to "No Hold" 2 S \N 895 624 2007-12-14 13:22:31.734-05 mfgadmin Closed 2 SI \N 896 625 2007-12-14 13:22:31.734-05 mfgadmin Closed 2 SI \N 897 623 2007-12-14 13:23:21.531-05 mfgadmin Closed 2 SI \N 898 3079 2007-12-14 13:26:23.296-05 mfgadmin Created 2 S \N 899 626 2007-12-14 13:29:24.046-05 mfgadmin Created 2 SI \N 900 626 2007-12-14 13:34:58.296-05 mfgadmin Closed 2 SI \N 908 215 2007-12-20 09:44:59.187-05 mfgadmin Created BOM Item10 2 BMI \N 911 3081 2007-12-20 11:30:55.265-05 mfgadmin Created 2 S \N 912 525 2007-12-20 11:30:55.265-05 mfgadmin Created 2 W \N 913 525 2007-12-20 11:30:55.265-05 mfgadmin Status Changed from O to E 2 W \N 914 627 2007-12-20 11:30:55.265-05 mfgadmin Created 2 SI \N 915 525 2007-12-20 11:42:54.937-05 mfgadmin Status Changed from E to I 2 W \N 916 525 2007-12-20 11:46:03.249-05 mfgadmin Status Changed from I to C 2 W \N 917 627 2007-12-20 11:57:11.89-05 mfgadmin Closed 2 SI \N 926 328 2008-03-04 11:57:10.512315-05 jsmith Created 2 I \N 927 216 2008-03-04 11:57:10.512315-05 jsmith Created BOM Item20 2 BMI \N 928 217 2008-03-04 11:57:10.512315-05 jsmith Created BOM Item30 2 BMI \N 929 218 2008-03-04 11:57:10.512315-05 jsmith Created BOM Item50 2 BMI \N 930 219 2008-03-04 11:57:10.512315-05 jsmith Created BOM Item10 2 BMI \N 931 323 2008-03-04 11:58:51.011755-05 jsmith Created 2 IS \N 932 310 2008-03-04 12:06:19.451281-05 jsmith Reorder Level Changed from 0.00 to 100.00 2 IS \N 933 310 2008-03-04 12:06:19.451281-05 jsmith Order Up To Changed from 0.00 to 1,000.00 2 IS \N 934 294 2008-03-04 12:10:14.589551-05 jsmith Reorder Level Changed from 0.00 to 400.00 2 IS \N 935 294 2008-03-04 12:10:14.589551-05 jsmith Order Up To Changed from 0.00 to 4,000.00 2 IS \N 936 298 2008-03-04 12:11:18.730349-05 jsmith Reorder Level Changed from 0.00 to 100.00 2 IS \N 937 299 2008-03-04 12:11:55.207696-05 jsmith Reorder Level Changed from 0.00 to 400.00 2 IS \N 938 299 2008-03-04 12:11:55.207696-05 jsmith Order Up To Changed from 0.00 to 4,000.00 2 IS \N 939 294 2008-03-04 12:12:06.607439-05 jsmith Reorder Level Changed from 400.00 to 100.00 2 IS \N 940 294 2008-03-04 12:12:06.607439-05 jsmith Order Up To Changed from 4,000.00 to 1,000.00 2 IS \N 941 297 2008-03-04 12:12:57.526141-05 jsmith Reorder Level Changed from 0.00 to 10.00 2 IS \N 942 297 2008-03-04 12:12:57.526141-05 jsmith Order Up To Changed from 0.00 to 100.00 2 IS \N 943 328 2008-03-04 12:14:56.585849-05 jsmith Description 1 Changed from "Yellow Tough Truck" to "Collectors Autographed Signed" 2 I \N 944 328 2008-03-04 12:14:56.585849-05 jsmith Description 2 Changed from "Truck Type 1" to "Truck Type 2" 2 I \N 945 328 2008-03-04 12:14:56.585849-05 jsmith List Price Changed from "10.9900" to "99.0000" 2 I \N 946 527 2008-03-04 13:17:17.153063-05 jsmith Created 2 W \N 947 527 2008-03-04 13:17:17.153063-05 jsmith Status Changed from O to E 2 W \N 948 528 2008-03-04 13:17:33.842318-05 jsmith Created 2 W \N 949 528 2008-03-04 13:17:33.842318-05 jsmith Status Changed from O to E 2 W \N 950 438 2008-03-04 13:19:46.082475-05 jsmith Created 2 P \N 951 438 2008-03-04 13:19:49.266939-05 jsmith Created Line #1 2 P \N 1008 3092 2008-03-05 13:41:42.387731-05 jsmith Created 2 S \N 953 438 2008-03-04 13:21:45.451516-05 jsmith Created Line #2 2 P \N 954 527 2008-03-04 13:50:55.481281-05 jsmith Status Changed from E to I 2 W \N 955 527 2008-03-04 13:50:59.076414-05 jsmith Status Changed from I to C 2 W \N 956 528 2008-03-04 13:51:21.731285-05 jsmith Status Changed from E to I 2 W \N 957 528 2008-03-04 13:52:47.476609-05 jsmith Status Changed from I to C 2 W \N 958 3085 2008-03-04 13:55:05.931349-05 jsmith Created 2 S \N 959 629 2008-03-04 13:55:38.124424-05 jsmith Created 2 SI \N 960 630 2008-03-04 13:56:04.207285-05 jsmith Created 2 SI \N 1009 636 2008-03-05 13:42:04.704723-05 jsmith Created 2 SI \N 1010 534 2008-03-05 13:42:05.170176-05 jsmith Created 2 W \N 1011 534 2008-03-05 13:42:05.170176-05 jsmith Status Changed from O to E 2 W \N 964 530 2008-03-04 14:07:01.81499-05 jsmith Created 2 W \N 965 530 2008-03-04 14:07:01.81499-05 jsmith Status Changed from O to E 2 W \N 966 531 2008-03-04 14:07:08.888413-05 jsmith Created 2 W \N 967 531 2008-03-04 14:07:08.888413-05 jsmith Status Changed from O to E 2 W \N 968 532 2008-03-04 14:07:12.595318-05 jsmith Created 2 W \N 969 532 2008-03-04 14:07:12.595318-05 jsmith Status Changed from O to E 2 W \N 970 530 2008-03-04 14:12:42.842887-05 jsmith Status Changed from E to I 2 W \N 971 530 2008-03-04 14:12:46.171624-05 jsmith Status Changed from I to C 2 W \N 972 532 2008-03-04 14:12:56.581783-05 jsmith Status Changed from E to I 2 W \N 973 532 2008-03-04 14:13:56.021518-05 jsmith Status Changed from I to C 2 W \N 974 531 2008-03-04 14:14:07.002445-05 jsmith Status Changed from E to I 2 W \N 975 531 2008-03-04 14:14:42.493533-05 jsmith Status Changed from I to C 2 W \N 976 629 2008-03-04 14:22:32.111536-05 jsmith Closed 2 SI \N 977 630 2008-03-04 14:22:32.111536-05 jsmith Closed 2 SI \N 1012 535 2008-03-05 13:43:02.442593-05 jsmith Created 2 W \N 1013 535 2008-03-05 13:43:02.442593-05 jsmith Status Changed from O to E 2 W \N 1014 443 2008-03-05 13:43:23.606801-05 jsmith Created 2 P \N 1015 443 2008-03-05 13:43:26.947846-05 jsmith Created Line #1 2 P \N 983 441 2008-03-04 14:59:41.038913-05 jsmith Created 2 P \N 984 441 2008-03-04 14:59:57.805956-05 jsmith Created Line #1 2 P \N 1017 535 2008-03-05 13:47:57.845732-05 jsmith Status Changed from E to I 2 W \N 1018 535 2008-03-05 13:48:59.472888-05 jsmith Status Changed from I to C 2 W \N 1019 534 2008-03-05 13:49:15.295821-05 jsmith Status Changed from E to I 2 W \N 1020 534 2008-03-05 13:49:26.767851-05 jsmith Status Changed from I to C 2 W \N 1021 636 2008-03-05 13:50:12.229813-05 jsmith Closed 2 SI \N 1022 11 2008-03-05 13:55:51.417194-05 jsmith Created 2 RA \N 1023 3094 2008-03-05 13:56:35.952664-05 jsmith Created 2 S \N 992 9 2008-03-04 16:17:25.097748-05 jsmith Created 2 RA \N 993 324 2008-03-04 16:18:17.913462-05 jsmith Created 2 IS \N 994 325 2008-03-04 16:18:54.824848-05 jsmith Created 2 IS \N 995 3090 2008-03-04 16:19:21.991688-05 jsmith Created 2 S \N 997 9 2008-03-04 16:19:21.991688-05 jsmith Authorized Qty 1.00 of STRUCK1 2 RA \N 999 10 2008-03-04 16:30:39.965117-05 jsmith Created 2 RA \N 1000 3091 2008-03-04 16:31:14.556586-05 jsmith Created 2 S \N 1002 10 2008-03-04 16:31:14.556586-05 jsmith Authorized Qty 1.00 of STRUCK1 2 RA \N 1003 635 2008-03-04 16:34:16.901846-05 jsmith Created 2 SI \N 1005 3091 2008-03-04 16:35:37.5038-05 jsmith Hold Type Changed from "Unknown/Error" to "No Hold" 2 S \N 1006 635 2008-03-04 16:36:56.24302-05 jsmith Closed 2 SI \N 1007 323 2008-03-04 16:41:28.923887-05 jsmith Reorder Level Changed from 10.00 to 3.00 2 IS \N 1024 637 2008-03-05 13:56:35.952664-05 jsmith Created 2 SI \N 1025 11 2008-03-05 13:56:35.952664-05 jsmith Authorized Qty 1.00 of STRUCK1 2 RA \N 1026 3094 2008-03-05 13:57:29.476095-05 jsmith Hold Type Changed from "Unknown/Error" to "No Hold" 2 S \N 1027 637 2008-03-05 13:59:24.258376-05 jsmith Closed 2 SI \N 1028 3095 2008-04-04 08:39:16.08023-04 mfgadmin Created 2 S \N 1029 638 2008-04-04 08:40:09.650232-04 mfgadmin Created 2 SI \N 1030 536 2008-04-04 08:42:01.427961-04 mfgadmin Created 2 W \N 1031 536 2008-04-04 08:42:01.427961-04 mfgadmin Status Changed from O to E 2 W \N 1032 536 2008-04-04 08:43:12.508474-04 mfgadmin Status Changed from E to I 2 W \N 1033 536 2008-04-04 08:43:27.715534-04 mfgadmin Status Changed from I to C 2 W \N 1034 445 2008-04-04 08:43:49.189592-04 mfgadmin Created 2 P \N 1035 445 2008-04-04 08:44:03.55942-04 mfgadmin Created Line #1 2 P \N 1036 445 2008-04-04 08:44:14.018753-04 mfgadmin Created Line #2 2 P \N 1037 445 2008-04-04 08:44:26.458111-04 mfgadmin Created Line #3 2 P \N 1039 638 2008-04-04 08:47:33.813122-04 mfgadmin Closed 2 SI \N 1040 3097 2008-06-12 08:52:27.719723-04 jsmith Created 2 S \N 1041 639 2008-06-12 08:52:56.812043-04 jsmith Created 2 SI \N 1042 639 2008-06-12 09:41:58.664785-04 jsmith Closed 2 SI \N 1043 447 2008-06-12 10:33:41.49017-04 jsmith Created 2 P \N 1044 447 2008-06-12 10:34:09.123977-04 jsmith Created Line #1 2 P \N 1046 329 2008-06-12 12:46:43.599417-04 jsmith Created 2 I \N 1047 329 2008-06-12 12:46:43.599417-04 jsmith Activated 2 I \N 1048 329 2008-06-12 12:46:43.599417-04 jsmith Description 1 Changed from "" to "FASCAR Decal" 2 I \N 1049 329 2008-06-12 12:46:43.599417-04 jsmith Pick List Changed from FALSE to TRUE 2 I \N 1050 326 2008-06-12 12:48:24.400199-04 jsmith Created 2 IS \N 1051 330 2008-06-12 12:49:34.071494-04 jsmith Created 2 I \N 1052 330 2008-06-12 12:50:00.600137-04 jsmith Description 1 Changed from "FASCAR Decal" to "PUSCH Decal" 2 I \N 1053 327 2008-06-12 12:50:51.82899-04 jsmith Created 2 IS \N 1054 330 2008-06-12 12:50:57.078912-04 jsmith Description 1 Changed from "PUSCH Decal" to "PUSCH Racing Decal" 2 I \N 1055 329 2008-06-12 12:51:23.684527-04 jsmith Description 1 Changed from "FASCAR Decal" to "FASCAR Racing Decal" 2 I \N 1056 331 2008-06-12 12:55:26.036862-04 jsmith Created 2 I \N 1057 220 2008-06-12 12:55:26.036862-04 jsmith Created BOM Item20 2 BMI \N 1058 221 2008-06-12 12:55:26.036862-04 jsmith Created BOM Item30 2 BMI \N 1059 222 2008-06-12 12:55:26.036862-04 jsmith Created BOM Item50 2 BMI \N 1060 223 2008-06-12 12:55:26.036862-04 jsmith Created BOM Item10 2 BMI \N 1061 331 2008-06-12 12:56:48.424849-04 jsmith Description 1 Changed from "Yellow Tough Truck" to "Custom Tough Truck Type 1" 2 I \N 1062 331 2008-06-12 12:56:48.424849-04 jsmith Description 2 Changed from "Truck Type 1" to "" 2 I \N 1063 331 2008-06-12 12:56:48.424849-04 jsmith Pick List Changed from TRUE to FALSE 2 I \N 1064 331 2008-06-12 12:56:48.424849-04 jsmith Configured Changed from FALSE to TRUE 2 I \N 1065 331 2008-06-12 12:56:48.424849-04 jsmith List Price Changed from "10.9900" to "30.0000" 2 I \N 1066 331 2008-06-12 12:56:48.424849-04 jsmith Type Changed from "M" to "J" 2 I \N 1190 548 2008-06-19 17:07:16.802929-04 jsmith Created 2 W \N 1067 331 2008-06-12 12:56:48.424849-04 jsmith Maximum Disired Cost Changed from "5.0000" to "15.0000" 2 I \N 1068 328 2008-06-12 12:57:19.539579-04 jsmith Created 2 IS \N 1069 224 2008-06-12 13:01:34.3919-04 jsmith Created BOM Item60 2 BMI \N 1070 225 2008-06-12 13:02:29.718111-04 jsmith Created BOM Item70 2 BMI \N 1071 226 2008-06-12 13:03:22.844307-04 jsmith Created BOM Item80 2 BMI \N 1072 332 2008-06-12 13:04:32.919744-04 jsmith Created 2 I \N 1073 332 2008-06-12 13:04:32.919744-04 jsmith Activated 2 I \N 1074 332 2008-06-12 13:04:32.919744-04 jsmith Description 1 Changed from "" to "Gloss Coat Finish" 2 I \N 1075 332 2008-06-12 13:04:32.919744-04 jsmith Pick List Changed from FALSE to TRUE 2 I \N 1076 332 2008-06-12 13:04:32.919744-04 jsmith Maximum Disired Cost Changed from "0.0000" to "15.0000" 2 I \N 1077 329 2008-06-12 13:08:13.709075-04 jsmith Created 2 IS \N 1078 227 2008-06-12 13:18:33.231579-04 jsmith Created BOM Item90 2 BMI \N 1079 88 2008-06-12 13:27:35.425262-04 jsmith Created 2 V \N 1080 11 2008-06-12 13:27:35.425262-04 jsmith Created by jsmith 2 CRMA \N 1081 449 2008-06-12 13:33:18.194978-04 jsmith Created 2 P \N 1082 449 2008-06-12 13:33:27.951785-04 jsmith Created Line #1 2 P \N 1084 451 2008-06-12 13:33:42.447033-04 jsmith Created 2 P \N 1085 451 2008-06-12 13:33:50.188045-04 jsmith Created Line #1 2 P \N 1087 449 2008-06-12 13:34:21.410961-04 jsmith Created Line #2 2 P \N 1088 453 2008-06-12 13:52:20.170407-04 jsmith Created 2 P \N 1089 453 2008-06-12 13:53:15.981728-04 jsmith Created Line #1 2 P \N 1091 3100 2008-06-12 14:32:18.597225-04 jsmith Created 2 S \N 1092 640 2008-06-12 14:33:39.163371-04 jsmith Created 2 SI \N 1093 537 2008-06-12 14:33:39.163371-04 jsmith Created 2 W \N 1094 537 2008-06-12 14:33:39.163371-04 jsmith Status Changed from O to E 2 W \N 1095 538 2008-06-12 14:34:54.669161-04 jsmith Created 2 W \N 1096 538 2008-06-12 14:34:54.669161-04 jsmith Status Changed from O to E 2 W \N 1098 456 2008-06-12 14:35:26.055526-04 jsmith Created 2 P \N 1099 456 2008-06-12 14:35:28.658783-04 jsmith Created Line #1 2 P \N 1101 538 2008-06-12 14:36:42.310623-04 jsmith Status Changed from E to I 2 W \N 1102 538 2008-06-12 14:36:47.100347-04 jsmith Status Changed from I to C 2 W \N 1103 325 2008-06-12 14:38:23.323813-04 jsmith Description 1 Changed from "Yellow Paint 2" to "Yellow Neon Paint 2" 2 I \N 1105 537 2008-06-12 14:41:41.29455-04 jsmith Status Changed from E to I 2 W \N 1106 537 2008-06-12 14:41:41.29455-04 jsmith Status Changed from I to C 2 W \N 1107 640 2008-06-12 14:47:52.441216-04 jsmith Closed 2 SI \N 1111 641 2008-06-12 14:59:54.189527-04 jsmith Closed 2 SI \N 1114 3105 2008-06-12 15:20:31.478344-04 jsmith Created 2 S \N 1115 642 2008-06-12 15:20:31.478344-04 jsmith Created 2 SI \N 1116 642 2008-06-12 15:25:39.679957-04 jsmith Closed 2 SI \N 1109 3103 2008-06-12 14:55:59.81302-04 jsmith Created 2 S \N 1110 641 2008-06-12 14:57:32.25127-04 jsmith Created 2 SI \N 1117 97 2008-06-17 14:55:09.884806-04 jsmith Discount Changed from "5.00%" to "6.00%" 2 C \N 1118 97 2008-06-17 14:55:09.884806-04 jsmith Credit Limit Changed from 215.00 to 109.00 2 C \N 1119 3106 2008-06-18 15:55:23.84496-04 jsmith Created 2 S \N 1120 643 2008-06-18 15:56:08.362994-04 jsmith Created 2 SI \N 1121 539 2008-06-18 15:56:08.362994-04 jsmith Created 2 W \N 1122 539 2008-06-18 15:56:08.362994-04 jsmith Status Changed from O to E 2 W \N 1125 539 2008-06-18 16:01:40.903562-04 jsmith Status Changed from E to I 2 W \N 1126 539 2008-06-18 16:01:40.903562-04 jsmith Status Changed from I to C 2 W \N 1127 643 2008-06-18 16:03:43.500648-04 jsmith Closed 2 SI \N 1128 540 2008-06-18 16:08:36.079484-04 jsmith Created 2 W \N 1129 540 2008-06-18 16:08:36.079484-04 jsmith Status Changed from O to E 2 W \N 1130 540 2008-06-18 16:08:53.884521-04 jsmith Status Changed from E to I 2 W \N 1131 540 2008-06-18 16:08:58.970125-04 jsmith Status Changed from I to C 2 W \N 1132 458 2008-06-18 16:15:33.797839-04 jsmith Created 2 P \N 1133 458 2008-06-18 16:32:38.757636-04 jsmith Created Line #1 2 P \N 1134 458 2008-06-18 16:32:55.576426-04 jsmith Created Line #2 2 P \N 1136 456 2008-06-18 16:34:39.252088-04 jsmith Created Line #2 2 P \N 1137 3109 2008-06-19 16:18:02.457883-04 jsmith Created 2 S \N 1138 644 2008-06-19 16:18:56.952532-04 jsmith Created 2 SI \N 1139 541 2008-06-19 16:18:56.952532-04 jsmith Created 2 W \N 1140 541 2008-06-19 16:18:56.952532-04 jsmith Status Changed from O to E 2 W \N 1141 645 2008-06-19 16:19:16.257614-04 jsmith Created 2 SI \N 1142 542 2008-06-19 16:19:16.257614-04 jsmith Created 2 W \N 1143 542 2008-06-19 16:19:16.257614-04 jsmith Status Changed from O to E 2 W \N 1144 646 2008-06-19 16:20:36.172332-04 jsmith Created 2 SI \N 1147 460 2008-06-19 16:33:51.693567-04 jsmith Created 2 P \N 1148 460 2008-06-19 16:33:59.081172-04 jsmith Created Line #1 2 P \N 1150 460 2008-06-19 16:34:16.087738-04 jsmith Created Line #2 2 P \N 1151 460 2008-06-19 16:34:36.471058-04 jsmith Created Line #3 2 P \N 1152 544 2008-06-19 16:41:14.636958-04 jsmith Created 2 W \N 1153 545 2008-06-19 16:41:14.636958-04 jsmith Created 2 W \N 1154 545 2008-06-19 16:41:14.636958-04 jsmith Status Changed from O to E 2 W \N 1155 544 2008-06-19 16:41:14.636958-04 jsmith Status Changed from O to E 2 W \N 1156 462 2008-06-19 16:41:50.321112-04 jsmith Created 2 P \N 1157 462 2008-06-19 16:41:52.881415-04 jsmith Created Line #1 2 P \N 1161 546 2008-06-19 16:46:35.521902-04 jsmith Created 2 W \N 1162 546 2008-06-19 16:46:35.521902-04 jsmith Status Changed from O to E 2 W \N 1163 545 2008-06-19 16:52:50.65578-04 jsmith Status Changed from E to I 2 W \N 1164 545 2008-06-19 16:52:54.173276-04 jsmith Status Changed from I to C 2 W \N 1165 546 2008-06-19 16:53:08.961417-04 jsmith Status Changed from E to I 2 W \N 1166 546 2008-06-19 16:53:11.840328-04 jsmith Status Changed from I to C 2 W \N 1167 544 2008-06-19 16:53:23.06988-04 jsmith Status Changed from E to I 2 W \N 1168 544 2008-06-19 16:53:37.390334-04 jsmith Status Changed from I to C 2 W \N 1169 542 2008-06-19 16:53:47.841836-04 jsmith Status Changed from E to I 2 W \N 1170 542 2008-06-19 16:54:00.305723-04 jsmith Status Changed from I to C 2 W \N 1171 541 2008-06-19 16:54:18.965876-04 jsmith Status Changed from E to I 2 W \N 1172 541 2008-06-19 16:54:18.965876-04 jsmith Status Changed from I to C 2 W \N 1173 644 2008-06-19 16:56:06.652175-04 jsmith Closed 2 SI \N 1174 645 2008-06-19 16:56:06.652175-04 jsmith Closed 2 SI \N 1175 646 2008-06-19 16:56:06.652175-04 jsmith Closed 2 SI \N 1176 464 2008-06-19 17:00:32.722195-04 jsmith Created 2 P \N 1177 464 2008-06-19 17:00:51.00141-04 jsmith Created Line #1 2 P \N 1179 517 2008-06-19 17:01:54.340565-04 jsmith Qty. Ordered Changed from 1,100.00 to 1,199.00 2 PI \N 1180 464 2008-06-19 17:02:40.921176-04 jsmith Created Line #2 2 P \N 1181 547 2008-06-19 17:03:51.861398-04 jsmith Created 2 W \N 1182 547 2008-06-19 17:03:51.861398-04 jsmith Status Changed from O to E 2 W \N 1183 547 2008-06-19 17:04:14.814705-04 jsmith Status Changed from E to I 2 W \N 1184 547 2008-06-19 17:04:48.569093-04 jsmith Status Changed from I to C 2 W \N 1185 466 2008-06-19 17:05:16.400601-04 jsmith Created 2 P \N 1186 466 2008-06-19 17:05:33.292779-04 jsmith Created Line #1 2 P \N 1188 3111 2008-06-19 17:07:04.200405-04 jsmith Created 2 S \N 1189 647 2008-06-19 17:07:16.802929-04 jsmith Created 2 SI \N 1191 548 2008-06-19 17:07:16.802929-04 jsmith Status Changed from O to E 2 W \N 1192 548 2008-06-19 17:07:52.576615-04 jsmith Status Changed from E to I 2 W \N 1193 548 2008-06-19 17:07:52.576615-04 jsmith Status Changed from I to C 2 W \N 1194 647 2008-06-19 17:08:18.368415-04 jsmith Closed 2 SI \N 1200 3115 2008-06-20 09:32:32.202601-04 jsmith Created 2 S \N 1201 649 2008-06-20 09:33:01.678197-04 jsmith Created 2 SI \N 1202 649 2008-06-20 09:34:10.778496-04 jsmith Closed 2 SI \N 1203 3117 2008-06-20 12:29:30.532732-04 jsmith Created 2 S \N 1204 650 2008-06-20 12:29:47.767355-04 jsmith Created 2 SI \N 1205 550 2008-06-20 12:29:47.767355-04 jsmith Created 2 W \N 1206 550 2008-06-20 12:29:47.767355-04 jsmith Status Changed from O to E 2 W \N 1207 551 2008-06-20 12:30:31.275518-04 jsmith Created 2 W \N 1208 551 2008-06-20 12:30:31.275518-04 jsmith Status Changed from O to E 2 W \N 1209 468 2008-06-20 12:31:18.488141-04 jsmith Created 2 P \N 1210 468 2008-06-20 12:31:21.132659-04 jsmith Created Line #1 2 P \N 1212 551 2008-06-20 12:34:59.329988-04 jsmith Status Changed from E to I 2 W \N 1213 551 2008-06-20 12:35:08.196767-04 jsmith Status Changed from I to C 2 W \N 1214 550 2008-06-20 12:35:16.941089-04 jsmith Status Changed from E to I 2 W \N 1215 550 2008-06-20 12:35:31.462922-04 jsmith Status Changed from I to C 2 W \N 1216 650 2008-06-20 12:36:14.765248-04 jsmith Closed 2 SI \N 1222 470 2008-09-08 16:56:33.900971-04 admin Created 2 P \N 1223 470 2008-09-08 16:57:28.965247-04 admin Created Line #1 2 P \N 1225 3120 2008-09-08 17:20:41.646126-04 jsmith Created 2 S \N 1226 652 2008-09-08 17:21:12.902339-04 jsmith Created 2 SI \N 1227 653 2008-09-08 17:22:51.914614-04 jsmith Created 2 SI \N 1228 655 2008-09-08 17:27:01.533327-04 jsmith Created 2 SI \N 1229 655 2008-09-08 17:31:53.477721-04 admin Closed 2 SI \N 1230 653 2008-09-08 17:50:16.303797-04 admin Closed 2 SI \N 1231 95 2008-09-08 17:50:22.824305-04 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 1232 3120 2008-09-08 17:50:22.824305-04 admin Hold Type Changed from "No Hold" to "Credit Hold" 2 S \N 1233 3120 2008-09-08 17:50:46.960425-04 admin Hold Type Changed from "Credit Hold" to "No Hold" 2 S \N 1234 652 2008-09-08 17:51:06.598113-04 admin Closed 2 SI \N 1235 95 2008-09-08 18:00:35.835742-04 jsmith Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 1236 333 2008-09-09 16:35:45.516404-04 jsmith Created 2 I \N 1237 228 2008-09-09 16:35:45.516404-04 jsmith Created BOM Item30 2 BMI \N 1238 229 2008-09-09 16:35:45.516404-04 jsmith Created BOM Item50 2 BMI \N 1239 230 2008-09-09 16:35:45.516404-04 jsmith Created BOM Item20 2 BMI \N 1240 231 2008-09-09 16:35:45.516404-04 jsmith Created BOM Item60 2 BMI \N 1241 232 2008-09-09 16:35:45.516404-04 jsmith Created BOM Item70 2 BMI \N 1242 233 2008-09-09 16:35:45.516404-04 jsmith Created BOM Item80 2 BMI \N 1243 333 2008-09-09 16:36:21.367974-04 jsmith Pick List Changed from TRUE to FALSE 2 I \N 1244 333 2008-09-09 16:36:21.367974-04 jsmith List Price Changed from "45.0000" to "30.0000" 2 I \N 1245 333 2008-09-09 16:36:21.367974-04 jsmith Type Changed from "M" to "K" 2 I \N 1246 325 2008-09-09 16:38:07.314045-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1247 303 2008-09-09 16:38:56.431961-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1248 305 2008-09-09 16:39:13.563225-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1249 317 2008-09-09 16:39:35.331616-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1250 322 2008-09-09 16:40:13.817755-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1251 321 2008-09-09 16:40:47.095438-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1252 235 2008-09-09 16:43:43.243918-04 jsmith Created BOM Item90 2 BMI \N 1253 301 2008-09-09 16:45:21.840167-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1254 230 2008-09-09 16:45:31.014951-04 jsmith Expiration Date Changed from Never to 10 Aug 2008 2 BMI \N 1255 230 2008-09-09 16:45:31.014951-04 jsmith Issue Method Changed from Mixed to Push 2 BMI \N 1256 304 2008-09-09 16:46:50.854643-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1257 229 2008-09-09 16:47:04.07831-04 jsmith Effective Date Changed from 09 Sep 2008 to 11 Jun 2008 2 BMI \N 1258 229 2008-09-09 16:47:04.07831-04 jsmith Expiration Date Changed from Never to 10 Aug 2008 2 BMI \N 1259 229 2008-09-09 16:47:04.07831-04 jsmith Issue Method Changed from Mixed to Push 2 BMI \N 1260 228 2008-09-09 16:47:42.241217-04 jsmith Effective Date Changed from 09 Sep 2008 to 10 Aug 2008 2 BMI \N 1261 228 2008-09-09 16:47:42.241217-04 jsmith Issue Method Changed from Mixed to Push 2 BMI \N 1262 231 2008-09-09 16:47:47.408247-04 jsmith Effective Date Changed from 09 Sep 2008 to 10 Aug 2008 2 BMI \N 1263 231 2008-09-09 16:47:47.408247-04 jsmith Issue Method Changed from Mixed to Push 2 BMI \N 1264 232 2008-09-09 16:47:52.622397-04 jsmith Effective Date Changed from 09 Sep 2008 to 10 Aug 2008 2 BMI \N 1265 232 2008-09-09 16:47:52.622397-04 jsmith Issue Method Changed from Mixed to Push 2 BMI \N 1266 304 2008-09-09 16:48:25.161462-04 jsmith Sold Changed from TRUE to FALSE 2 I \N 1268 333 2008-09-09 16:49:09.018266-04 jsmith Description 1 Changed from "Classic Race Car With Logo" to "Kit Car Type 1" 2 I \N 1269 333 2008-09-09 16:49:09.018266-04 jsmith Description 2 Changed from "Car Type 1" to "Buld Your Own" 2 I \N 1270 330 2008-09-09 16:49:37.929292-04 jsmith Created 2 IS \N 1271 3123 2008-09-09 16:50:00.65506-04 jsmith Created 2 S \N 1272 313 2008-09-09 16:51:28.302331-04 jsmith Sold Changed from FALSE to TRUE 2 I \N 1273 660 2008-09-09 16:52:04.369968-04 jsmith Created 2 SI \N 1274 661 2008-09-09 16:52:04.369968-04 jsmith Created 2 SI \N 1275 662 2008-09-09 16:52:04.369968-04 jsmith Created 2 SI \N 1276 663 2008-09-09 16:52:04.369968-04 jsmith Created 2 SI \N 1277 664 2008-09-09 16:52:04.369968-04 jsmith Created 2 SI \N 1278 660 2008-09-09 16:52:04.369968-04 jsmith Changed Sched. Date from 09 Sep 2008 to 01 Sep 2008 2 SI \N 1279 661 2008-09-09 16:52:04.369968-04 jsmith Changed Sched. Date from 09 Sep 2008 to 01 Sep 2008 2 SI \N 1280 662 2008-09-09 16:52:04.369968-04 jsmith Changed Sched. Date from 09 Sep 2008 to 01 Sep 2008 2 SI \N 1281 663 2008-09-09 16:52:04.369968-04 jsmith Changed Sched. Date from 09 Sep 2008 to 01 Sep 2008 2 SI \N 1282 664 2008-09-09 16:52:04.369968-04 jsmith Changed Sched. Date from 09 Sep 2008 to 01 Sep 2008 2 SI \N 1283 659 2008-09-09 16:52:04.369968-04 jsmith Created 2 SI \N 1284 3123 2008-09-09 16:52:16.488439-04 jsmith Added to Packing List Batch 2 S \N 1285 664 2008-09-09 17:04:08.672826-04 jsmith Closed 2 SI \N 1286 663 2008-09-09 17:04:08.672826-04 jsmith Closed 2 SI \N 1287 662 2008-09-09 17:04:08.672826-04 jsmith Closed 2 SI \N 1288 661 2008-09-09 17:04:08.672826-04 jsmith Closed 2 SI \N 1289 660 2008-09-09 17:04:08.672826-04 jsmith Closed 2 SI \N 1290 659 2008-09-09 17:04:08.672826-04 jsmith Closed 2 SI \N 1296 472 2008-09-24 16:24:48.544774-04 jsmith Created 2 P \N 1297 472 2008-09-24 16:25:08.768485-04 jsmith Created Line #1 2 P \N 1299 474 2008-09-24 16:30:23.521752-04 jsmith Created 2 P \N 1300 474 2008-09-24 16:31:42.257244-04 jsmith Created Line #1 2 P \N 1302 3127 2008-10-02 08:38:57.521346-04 jsmith Created 2 S \N 1303 668 2008-10-02 08:41:21.592557-04 jsmith Created 2 SI \N 1304 554 2008-10-02 08:41:21.592557-04 jsmith Created 2 W \N 1305 554 2008-10-02 08:41:21.592557-04 jsmith Status Changed from O to E 2 W \N 1310 3134 2008-10-02 09:37:52.485931-04 jsmith Created 2 S \N 1311 555 2008-10-02 09:37:52.485931-04 jsmith Created 2 W \N 1312 555 2008-10-02 09:37:52.485931-04 jsmith Status Changed from O to E 2 W \N 1313 671 2008-10-02 09:37:52.485931-04 jsmith Created 2 SI \N 1314 672 2008-10-02 09:37:52.485931-04 jsmith Created 2 SI \N 1315 674 2008-10-02 09:37:52.485931-04 jsmith Created 2 SI \N 1316 675 2008-10-02 09:37:52.485931-04 jsmith Created 2 SI \N 1317 676 2008-10-02 09:37:52.485931-04 jsmith Created 2 SI \N 1318 677 2008-10-02 09:37:52.485931-04 jsmith Created 2 SI \N 1319 678 2008-10-02 09:37:52.485931-04 jsmith Created 2 SI \N 1320 678 2008-10-02 09:37:52.485931-04 jsmith Changed Sched. Date from 02 Oct 2008 to 11 Oct 2008 2 SI \N 1321 677 2008-10-02 09:37:52.485931-04 jsmith Changed Sched. Date from 02 Oct 2008 to 11 Oct 2008 2 SI \N 1322 676 2008-10-02 09:37:52.485931-04 jsmith Changed Sched. Date from 02 Oct 2008 to 11 Oct 2008 2 SI \N 1323 675 2008-10-02 09:37:52.485931-04 jsmith Changed Sched. Date from 02 Oct 2008 to 11 Oct 2008 2 SI \N 1324 674 2008-10-02 09:37:52.485931-04 jsmith Changed Sched. Date from 02 Oct 2008 to 11 Oct 2008 2 SI \N 1325 673 2008-10-02 09:37:52.485931-04 jsmith Created 2 SI \N 1326 556 2008-10-02 09:41:23.255547-04 jsmith Created 2 W \N 1327 556 2008-10-02 09:41:23.255547-04 jsmith Status Changed from O to E 2 W \N 1328 476 2008-10-02 09:42:07.455884-04 jsmith Created 2 P \N 1329 476 2008-10-02 09:42:14.621966-04 jsmith Created Line #1 2 P \N 1332 556 2008-10-02 09:56:01.068303-04 jsmith Status Changed from E to I 2 W \N 1333 556 2008-10-02 09:56:03.862618-04 jsmith Status Changed from I to C 2 W \N 1335 554 2008-10-02 09:59:48.655574-04 jsmith Status Changed from E to I 2 W \N 1336 555 2008-10-02 10:02:29.241588-04 jsmith Status Changed from E to I 2 W \N 1337 671 2008-10-02 10:16:32.479963-04 jsmith Closed 2 SI \N 1338 672 2008-10-02 10:16:32.479963-04 jsmith Closed 2 SI \N 1339 674 2008-10-02 10:16:32.479963-04 jsmith Closed 2 SI \N 1340 675 2008-10-02 10:16:32.479963-04 jsmith Closed 2 SI \N 1341 676 2008-10-02 10:16:32.479963-04 jsmith Closed 2 SI \N 1342 677 2008-10-02 10:16:32.479963-04 jsmith Closed 2 SI \N 1343 678 2008-10-02 10:16:32.479963-04 jsmith Closed 2 SI \N 1344 673 2008-10-02 10:16:32.479963-04 jsmith Closed 2 SI \N 1345 555 2008-10-02 10:20:33.199395-04 jsmith Status Changed from I to C 2 W \N 1346 554 2008-10-02 10:21:09.352899-04 jsmith Status Changed from I to C 2 W \N 1347 668 2008-10-02 10:21:50.863093-04 jsmith Closed 2 SI \N 1348 479 2008-10-02 10:27:05.905894-04 jsmith Created 2 P \N 1349 479 2008-10-02 10:27:46.469176-04 jsmith Created Line #1 2 P \N 1350 479 2008-10-02 10:28:11.272088-04 jsmith Created Line #2 2 P \N 1351 479 2008-10-02 10:28:41.484992-04 jsmith Created Line #3 2 P \N 1353 3135 2008-10-02 11:02:51.302916-04 jsmith Created 2 S \N 1354 679 2008-10-02 11:03:18.434749-04 jsmith Created 2 SI \N 1355 680 2008-10-02 11:03:32.824189-04 jsmith Created 2 SI \N 1356 681 2008-10-02 11:03:48.812686-04 jsmith Created 2 SI \N 1357 679 2008-10-02 11:04:42.226988-04 jsmith Closed 2 SI \N 1358 680 2008-10-02 11:04:42.226988-04 jsmith Closed 2 SI \N 1359 681 2008-10-02 11:04:42.226988-04 jsmith Closed 2 SI \N 1365 558 2008-12-30 16:31:30.493102-05 admin Created 2 W \N 1366 558 2008-12-30 16:31:30.493102-05 admin Status Changed from O to E 2 W \N 1367 481 2008-12-30 16:32:42.349976-05 admin Created 2 P \N 1368 481 2008-12-30 16:32:55.597947-05 admin Created Line #1 2 P \N 1370 558 2008-12-30 16:35:02.681079-05 admin Status Changed from E to I 2 W \N 1371 558 2008-12-30 16:35:26.383119-05 admin Status Changed from I to C 2 W \N 1372 3142 2008-12-30 16:49:58.843758-05 admin Created 2 S \N 1373 685 2008-12-30 16:50:51.176355-05 admin Created 2 SI \N 1374 559 2008-12-30 16:50:51.176355-05 admin Created 2 W \N 1375 559 2008-12-30 16:50:51.176355-05 admin Status Changed from O to E 2 W \N 1376 685 2008-12-31 13:31:20.885932-05 jsmith Changed Sched. Date from 08 Jan 2009 to 09 Jan 2009 2 SI \N 1377 559 2008-12-31 13:31:20.885932-05 jsmith Due Date Changed from 08 Jan 2009 to 09 Jan 2009 2 W \N 1378 560 2008-12-31 13:33:30.835179-05 jsmith Created 2 W \N 1379 560 2008-12-31 13:33:30.835179-05 jsmith Status Changed from O to E 2 W \N 1381 484 2008-12-31 13:34:12.938936-05 jsmith Created 2 P \N 1382 484 2008-12-31 13:34:17.797016-05 jsmith Created Line #1 2 P \N 1384 560 2008-12-31 14:13:35.261849-05 jsmith Status Changed from E to I 2 W \N 1385 560 2008-12-31 14:13:38.654946-05 jsmith Status Changed from I to C 2 W \N 1386 559 2008-12-31 14:13:47.92547-05 jsmith Status Changed from E to I 2 W \N 1387 559 2008-12-31 14:14:01.266206-05 jsmith Status Changed from I to C 2 W \N 1388 685 2008-12-31 14:14:48.129161-05 jsmith Closed 2 SI \N 1389 486 2008-12-31 14:58:09.726803-05 jsmith Created 2 P \N 1390 486 2008-12-31 14:58:44.652333-05 jsmith Created Line #1 2 P \N 1392 3144 2008-12-31 15:02:50.731578-05 jsmith Created 2 S \N 1393 687 2008-12-31 15:26:47.742802-05 jsmith Created 2 SI \N 1394 687 2008-12-31 15:28:09.296657-05 jsmith Closed 2 SI \N 1395 95 2008-12-31 16:04:47.561455-05 jsmith Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 1396 95 2008-12-31 16:07:28.552171-05 jsmith Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 1415 491 2009-01-12 13:10:29.786936-05 jsmith Created 2 P \N 1416 491 2009-01-12 13:13:07.755148-05 jsmith Created Line #1 2 P \N 1417 491 2009-01-12 13:13:41.650516-05 jsmith Created Line #2 2 P \N 1418 491 2009-01-12 13:14:06.478974-05 jsmith Created Line #3 2 P \N 1420 3155 2009-01-12 13:26:55.882466-05 jsmith Created 2 S \N 1421 709 2009-01-12 13:27:17.342727-05 jsmith Created 2 SI \N 1422 710 2009-01-12 13:27:32.517759-05 jsmith Created 2 SI \N 1423 711 2009-01-12 13:27:53.748732-05 jsmith Created 2 SI \N 1428 709 2009-01-12 13:38:27.815028-05 jsmith Closed 2 SI \N 1429 710 2009-01-12 13:38:27.815028-05 jsmith Closed 2 SI \N 1430 711 2009-01-12 13:38:27.815028-05 jsmith Closed 2 SI \N 1431 3157 2009-01-12 13:51:52.678961-05 jsmith Created 2 S \N 1432 715 2009-01-12 13:52:07.770532-05 jsmith Created 2 SI \N 1433 3158 2009-01-12 13:52:33.626221-05 jsmith Created 2 S \N 1434 717 2009-01-12 13:52:54.429404-05 jsmith Created 2 SI \N 1435 715 2009-01-12 13:54:07.127262-05 jsmith Closed 2 SI \N 1436 717 2009-01-12 13:55:00.065076-05 jsmith Closed 2 SI \N 1437 12 2009-01-12 14:06:27.501863-05 jsmith Created by jsmith 2 CRMA \N 1438 92 2009-01-12 14:06:27.501863-05 jsmith Created 2 V \N 1439 323 2009-01-12 14:25:05.987323-05 jsmith Reorder Level Changed from 3.00 to 1.00 2 IS \N 1440 13 2009-06-26 15:10:17.699158-04 admin Created by admin 2 CRMA \N 1441 493 2009-06-26 15:43:54.514276-04 admin Created 2 P \N 1442 493 2009-06-26 15:44:28.238031-04 admin Created Line #1 2 P \N 1443 493 2009-06-26 15:44:53.454731-04 admin Created Line #2 2 P \N 1446 495 2009-06-26 16:05:19.203905-04 admin Created 2 P \N 1447 495 2009-06-26 16:05:42.404806-04 admin Created Line #1 2 P \N 1449 3161 2009-06-26 16:10:43.7261-04 admin Created 2 S \N 1450 720 2009-06-26 16:11:05.895894-04 admin Created 2 SI \N 1451 721 2009-06-26 16:11:14.682855-04 admin Created 2 SI \N 1452 722 2009-06-26 16:11:26.226741-04 admin Created 2 SI \N 1453 721 2009-06-26 16:12:04.46217-04 admin Closed 2 SI \N 1454 722 2009-06-26 16:12:04.46217-04 admin Closed 2 SI \N 1455 720 2009-06-26 16:12:04.46217-04 admin Closed 2 SI \N 1456 3163 2009-08-13 08:38:23.166689-04 admin Created 2 S \N 1457 724 2009-08-13 08:38:48.223493-04 admin Created 2 SI \N 1458 562 2009-08-13 08:38:48.223493-04 admin Created 2 W \N 1459 562 2009-08-13 08:38:48.223493-04 admin Status Changed from O to E 2 W \N 1460 563 2009-08-13 08:41:40.128768-04 admin Created 2 W \N 1461 563 2009-08-13 08:41:40.128768-04 admin Status Changed from O to E 2 W \N 1462 497 2009-08-13 08:42:10.366073-04 admin Created 2 P \N 1463 497 2009-08-13 08:42:13.049444-04 admin Created Line #1 2 P \N 1465 497 2009-08-13 08:42:37.707128-04 admin Created Line #2 2 P \N 1466 497 2009-08-13 08:43:22.073373-04 admin Created Line #3 2 P \N 1467 497 2009-08-13 08:43:34.978567-04 admin Created Line #4 2 P \N 1468 497 2009-08-13 08:43:52.751554-04 admin Created Line #5 2 P \N 1469 546 2009-08-13 08:44:33.378945-04 admin Qty. Ordered Changed from 10,000.00 to 60,000.00 2 PI \N 1470 563 2009-08-13 08:50:25.065315-04 admin Status Changed from E to I 2 W \N 1471 563 2009-08-13 08:50:29.387888-04 admin Status Changed from I to C 2 W \N 1472 562 2009-08-13 08:52:34.091695-04 admin Status Changed from E to I 2 W \N 1473 562 2009-08-13 08:52:50.213608-04 admin Status Changed from I to C 2 W \N 1474 724 2009-08-13 08:53:13.761596-04 admin Closed 2 SI \N 1475 95 2009-08-13 08:53:23.799561-04 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 1476 95 2009-08-13 08:54:32.088319-04 admin Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 1482 309 2009-08-13 11:00:07.785387-04 admin Product Weight Changed from "0.25" to "0.00" 2 I \N 1483 309 2009-08-13 11:00:07.785387-04 admin Packaging Weight Changed from "0.10" to "0.00" 2 I \N 1484 334 2009-08-19 16:16:02.998718-04 admin Created 2 I \N 1485 237 2009-08-19 16:16:02.998718-04 admin Created BOM Item10 2 BMI \N 1486 238 2009-08-19 16:16:02.998718-04 admin Created BOM Item20 2 BMI \N 1487 331 2009-08-19 16:17:35.364161-04 admin Created 2 IS \N 1488 334 2009-08-19 16:19:22.464862-04 admin Description 1 Changed from "Truck Kit Type 1" to "Packaging Subassembly Type 1" 2 I \N 1489 239 2009-08-19 16:20:15.59102-04 admin Created BOM Item50 2 BMI \N 1490 240 2009-08-19 16:20:15.59102-04 admin Created BOM Item50 2 BMI \N 1491 241 2009-08-19 16:20:15.59102-04 admin Created BOM Item40 2 BMI \N 1492 242 2009-08-19 16:20:15.59102-04 admin Created BOM Item50 2 BMI \N 1493 243 2009-08-19 16:20:15.59102-04 admin Created BOM Item50 2 BMI \N 1494 244 2009-08-19 16:20:15.59102-04 admin Created BOM Item50 2 BMI \N 1495 245 2009-08-19 16:20:15.59102-04 admin Created BOM Item90 2 BMI \N 1496 191 2009-08-19 16:20:15.59102-04 admin Expiration Date Changed from Never to 08/19/09 2 BMI \N 1497 199 2009-08-19 16:20:15.59102-04 admin Expiration Date Changed from Never to 08/19/09 2 BMI \N 1498 179 2009-08-19 16:20:15.59102-04 admin Expiration Date Changed from Never to 08/19/09 2 BMI \N 1499 187 2009-08-19 16:20:15.59102-04 admin Expiration Date Changed from Never to 08/19/09 2 BMI \N 1500 184 2009-08-19 16:20:15.59102-04 admin Expiration Date Changed from Never to 08/19/09 2 BMI \N 1501 218 2009-08-19 16:20:15.59102-04 admin Expiration Date Changed from Never to 08/19/09 2 BMI \N 1502 222 2009-08-19 16:20:15.59102-04 admin Expiration Date Changed from Never to 08/19/09 2 BMI \N 1503 304 2009-08-19 16:20:43.834792-04 admin Deactivated 2 I \N 1509 102 2009-09-16 11:01:02.552837-04 admin Created 2 C \N 1510 14 2009-09-16 11:01:02.552837-04 admin Created by admin 2 CRMA \N 1511 102 2009-09-16 11:03:07.773497-04 admin Name Changed from "Master Prodiem Toy Retail Customer" to "Master Prodiem Toys Retail Customer" 2 C \N 1512 39 2009-09-16 11:19:24.27159-04 admin Created 2 WH \N 1513 36 2009-09-16 11:22:18.026703-04 admin Description Changed from "Offsite Storage" to "Prodiem Distribution" 2 WH \N 1514 40 2009-09-16 11:33:39.039718-04 admin Created 2 WH \N 1515 332 2009-09-16 13:28:36.447504-04 jsmith Created 2 IS \N 1516 333 2009-09-16 13:29:38.285725-04 jsmith Created 2 IS \N 1517 334 2009-09-16 13:37:33.754543-04 jsmith Created 2 IS \N 1518 335 2009-09-16 13:37:33.754543-04 jsmith Created 2 IS \N 1519 336 2009-09-16 13:37:33.754543-04 jsmith Created 2 IS \N 1520 337 2009-09-16 13:37:33.754543-04 jsmith Created 2 IS \N 1521 338 2009-09-16 13:37:33.754543-04 jsmith Created 2 IS \N 1522 339 2009-09-16 13:37:33.754543-04 jsmith Created 2 IS \N 1523 340 2009-09-16 13:39:23.485194-04 jsmith Created 2 IS \N 1524 341 2009-09-16 13:39:23.485194-04 jsmith Created 2 IS \N 1525 342 2009-09-16 13:39:23.485194-04 jsmith Created 2 IS \N 1526 343 2009-09-16 13:39:23.485194-04 jsmith Created 2 IS \N 1527 344 2009-09-16 13:39:23.485194-04 jsmith Created 2 IS \N 1528 345 2009-09-16 13:39:23.485194-04 jsmith Created 2 IS \N 1529 346 2009-09-16 13:39:23.485194-04 jsmith Created 2 IS \N 1530 341 2009-09-16 13:40:26.430284-04 jsmith Reorder Level Changed from .00 to 10.00 2 IS \N 1531 341 2009-09-16 13:40:26.430284-04 jsmith Order Up To Changed from .00 to 20.00 2 IS \N 1532 342 2009-09-16 13:40:42.711363-04 jsmith Reorder Level Changed from .00 to 10.00 2 IS \N 1533 342 2009-09-16 13:40:42.711363-04 jsmith Order Up To Changed from .00 to 20.00 2 IS \N 1534 344 2009-09-16 13:41:11.826645-04 jsmith Reorder Level Changed from .00 to 10.00 2 IS \N 1535 344 2009-09-16 13:41:11.826645-04 jsmith Order Up To Changed from .00 to 20.00 2 IS \N 1536 347 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1537 348 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1538 349 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1539 350 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1540 351 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1541 352 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1542 353 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1543 354 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1544 355 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1545 356 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1546 357 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1547 358 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1548 359 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1549 360 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1550 361 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1551 362 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1552 363 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1553 364 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1554 365 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1555 366 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1556 367 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1557 368 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1558 369 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1559 370 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1560 371 2009-09-16 13:42:04.383604-04 jsmith Created 2 IS \N 1561 335 2009-09-16 13:43:00.842225-04 jsmith Reorder Level Changed from .00 to 10.00 2 IS \N 1562 335 2009-09-16 13:43:00.842225-04 jsmith Order Up To Changed from .00 to 20.00 2 IS \N 1563 336 2009-09-16 13:43:21.222974-04 jsmith Reorder Level Changed from .00 to 10.00 2 IS \N 1564 336 2009-09-16 13:43:21.222974-04 jsmith Order Up To Changed from .00 to 20.00 2 IS \N 1565 338 2009-09-16 13:43:45.748918-04 jsmith Reorder Level Changed from .00 to 10.00 2 IS \N 2094 598 2010-09-08 13:33:16.874053-04 admin Created 2 W \N 1566 338 2009-09-16 13:43:45.748918-04 jsmith Order Up To Changed from .00 to 20.00 2 IS \N 1567 346 2009-09-16 13:44:37.460489-04 jsmith Reorder Level Changed from .00 to 10.00 2 IS \N 1568 346 2009-09-16 13:44:37.460489-04 jsmith Order Up To Changed from .00 to 20.00 2 IS \N 1569 366 2009-09-16 13:46:00.257242-04 jsmith Reorder Level Changed from .00 to 100.00 2 IS \N 1570 366 2009-09-16 13:46:00.257242-04 jsmith Order Up To Changed from .00 to 200.00 2 IS \N 1571 368 2009-09-16 13:46:50.499288-04 jsmith Reorder Level Changed from .00 to 100.00 2 IS \N 1572 368 2009-09-16 13:46:50.499288-04 jsmith Order Up To Changed from .00 to 200.00 2 IS \N 1573 370 2009-09-16 13:47:58.991282-04 jsmith Reorder Level Changed from .00 to 100.00 2 IS \N 1574 370 2009-09-16 13:47:58.991282-04 jsmith Order Up To Changed from .00 to 200.00 2 IS \N 1575 7 2009-09-16 13:49:23.683375-04 jsmith Created 2 TO \N 1576 372 2009-09-16 13:49:32.088-04 jsmith Created 2 IS \N 1577 5 2009-09-16 13:49:32.508563-04 jsmith Created 2 TI \N 1579 373 2009-09-16 13:50:11.668449-04 jsmith Created 2 IS \N 1580 6 2009-09-16 13:50:11.835718-04 jsmith Created 2 TI \N 1581 374 2009-09-16 13:50:35.34642-04 jsmith Created 2 IS \N 1582 7 2009-09-16 13:50:35.552072-04 jsmith Created 2 TI \N 1583 375 2009-09-16 13:50:51.160349-04 jsmith Created 2 IS \N 1584 8 2009-09-16 13:50:51.359356-04 jsmith Created 2 TI \N 1585 9 2009-09-16 13:51:06.331868-04 jsmith Created 2 TO \N 1586 9 2009-09-16 13:51:08.890089-04 jsmith Created 2 TI \N 1588 10 2009-09-16 13:51:30.564704-04 jsmith Created 2 TI \N 1589 11 2009-09-16 13:51:46.011927-04 jsmith Created 2 TI \N 1590 12 2009-09-16 13:52:01.611655-04 jsmith Created 2 TI \N 1591 11 2009-09-16 13:58:06.469871-04 jsmith Created 2 TO \N 1592 13 2009-09-16 13:58:09.227885-04 jsmith Created 2 TI \N 1594 14 2009-09-16 13:58:28.257755-04 jsmith Created 2 TI \N 1595 15 2009-09-16 13:58:49.735183-04 jsmith Created 2 TI \N 1596 16 2009-09-16 13:59:09.334351-04 jsmith Created 2 TI \N 1597 566 2009-09-16 13:59:21.4618-04 jsmith Created 2 W \N 1598 566 2009-09-16 13:59:21.4618-04 jsmith Status Changed from O to E 2 W \N 1599 567 2009-09-16 13:59:30.420798-04 jsmith Created 2 W \N 1600 567 2009-09-16 13:59:30.420798-04 jsmith Status Changed from O to E 2 W \N 1601 499 2009-09-16 14:01:06.16526-04 jsmith Created 2 P \N 1602 499 2009-09-16 14:01:09.4947-04 jsmith Created Line #1 2 P \N 1604 567 2009-09-16 14:02:06.670672-04 jsmith Status Changed from E to I 2 W \N 1605 566 2009-09-16 14:02:29.104421-04 jsmith Status Changed from E to I 2 W \N 1606 566 2009-09-16 14:02:41.633349-04 jsmith Status Changed from I to C 2 W \N 1607 567 2009-09-16 14:02:47.407802-04 jsmith Status Changed from I to C 2 W \N 1608 501 2009-09-16 14:07:25.706222-04 jsmith Created 2 P \N 1609 501 2009-09-16 14:07:52.646808-04 jsmith Created Line #1 2 P \N 1611 335 2009-09-16 14:10:16.323759-04 jsmith Created 2 I \N 1612 376 2009-09-16 14:11:03.1893-04 jsmith Created 2 IS \N 1613 335 2009-09-16 14:11:32.596297-04 jsmith Description 1 Changed from "Yellow Paint 1" to "Red Paint Type Paint 1" 2 I \N 1614 335 2009-09-16 14:11:32.596297-04 jsmith Description 2 Changed from " Yellow Paint Type 1" to "Red Paint Type 1" 2 I \N 1615 336 2009-09-16 14:12:00.206195-04 jsmith Created 2 I \N 1616 377 2009-09-16 14:12:37.425459-04 jsmith Created 2 IS \N 1617 336 2009-09-16 14:12:59.115763-04 jsmith Description 1 Changed from "Red Paint Type Paint 1" to "Blue Paint Type Paint 1" 2 I \N 1618 336 2009-09-16 14:12:59.115763-04 jsmith Description 2 Changed from "Red Paint Type 1" to "Blue Paint Type 1" 2 I \N 1619 337 2009-09-16 14:13:20.256624-04 jsmith Created 2 I \N 1620 378 2009-09-16 14:14:05.194808-04 jsmith Created 2 IS \N 1621 337 2009-09-16 14:14:21.914608-04 jsmith Description 1 Changed from "Blue Paint Type Paint 1" to "White Paint Type Paint 1" 2 I \N 1622 337 2009-09-16 14:14:21.914608-04 jsmith Description 2 Changed from "Blue Paint Type 1" to "White Paint Type 1" 2 I \N 1623 193 2009-09-16 14:14:45.655149-04 jsmith Expiration Date Changed from Never to 09/16/09 2 BMI \N 1624 246 2009-09-16 14:15:12.504246-04 jsmith Created BOM Item70 2 BMI \N 1625 177 2009-09-16 14:16:35.797219-04 jsmith Expiration Date Changed from Never to 09/16/09 2 BMI \N 1626 247 2009-09-16 14:16:53.712219-04 jsmith Created BOM Item60 2 BMI \N 1627 248 2009-09-16 14:17:32.559549-04 jsmith Created BOM Item50 2 BMI \N 1628 249 2009-09-16 14:17:32.559549-04 jsmith Created BOM Item10 2 BMI \N 1629 250 2009-09-16 14:17:32.559549-04 jsmith Created BOM Item40 2 BMI \N 1630 251 2009-09-16 14:17:32.559549-04 jsmith Created BOM Item20 2 BMI \N 1631 252 2009-09-16 14:18:23.191731-04 jsmith Created BOM Item30 2 BMI \N 1632 253 2009-09-16 14:18:23.191731-04 jsmith Created BOM Item10 2 BMI \N 1633 254 2009-09-16 14:18:23.191731-04 jsmith Created BOM Item20 2 BMI \N 1634 255 2009-09-16 14:18:23.191731-04 jsmith Created BOM Item50 2 BMI \N 1635 254 2009-09-16 14:18:35.884289-04 jsmith Expiration Date Changed from Never to 09/16/09 2 BMI \N 1636 256 2009-09-16 14:18:56.163644-04 jsmith Created BOM Item60 2 BMI \N 1637 13 2009-09-16 14:21:03.598218-04 jsmith Changed Qty. Ordered from 220.00 to 200.00 2 TI \N 1638 14 2009-09-16 14:21:14.131758-04 jsmith Changed Qty. Ordered from 300.00 to 200.00 2 TI \N 1639 15 2009-09-16 14:21:20.841803-04 jsmith Changed Qty. Ordered from 220.00 to 200.00 2 TI \N 1640 16 2009-09-16 14:21:39.950717-04 jsmith Changed Qty. Ordered from 120.00 to 200.00 2 TI \N 1641 377 2009-09-16 14:28:52.342942-04 jsmith Reorder Level Changed from 100.00 to 50.00 2 IS \N 1642 376 2009-09-16 14:29:00.537068-04 jsmith Reorder Level Changed from 100.00 to 50.00 2 IS \N 1643 378 2009-09-16 14:29:10.638278-04 jsmith Reorder Level Changed from 100.00 to 50.00 2 IS \N 1644 503 2009-09-16 14:33:44.167071-04 jsmith Created 2 P \N 1645 503 2009-09-16 14:33:47.233339-04 jsmith Created Line #1 2 P \N 1647 503 2009-09-16 14:34:09.470717-04 jsmith Created Line #2 2 P \N 1648 503 2009-09-16 14:34:26.854271-04 jsmith Created Line #3 2 P \N 1649 505 2009-09-16 14:37:35.399568-04 jsmith Created 2 P \N 1650 505 2009-09-16 14:37:57.734942-04 jsmith Created Line #1 2 P \N 1651 505 2009-09-16 14:38:06.193371-04 jsmith Created Line #2 2 P \N 1656 193 2009-09-16 14:43:18.641821-04 jsmith Expiration Date Changed from 09/16/09 to 09/15/09 2 BMI \N 1657 254 2009-09-16 14:46:47.047209-04 jsmith Effective Date Changed from 09/16/09 to 12/22/06 2 BMI \N 1658 254 2009-09-16 14:46:47.047209-04 jsmith Expiration Date Changed from 09/16/09 to 09/15/09 2 BMI \N 1659 16 2009-09-21 09:21:52.193661-04 jsmith Closed 2 TI \N 1660 14 2009-09-21 09:21:52.53347-04 jsmith Closed 2 TI \N 1661 13 2009-09-21 09:21:52.920137-04 jsmith Closed 2 TI \N 1662 15 2009-09-21 09:21:53.128839-04 jsmith Closed 2 TI \N 1663 7 2009-09-21 09:25:31.424429-04 jsmith Closed 2 TI \N 1664 5 2009-09-21 09:25:31.671052-04 jsmith Closed 2 TI \N 1665 6 2009-09-21 09:25:31.878395-04 jsmith Closed 2 TI \N 1666 8 2009-09-21 09:25:32.121072-04 jsmith Closed 2 TI \N 1667 9 2009-09-21 09:25:44.997847-04 jsmith Closed 2 TI \N 1668 11 2009-09-21 09:25:45.594884-04 jsmith Closed 2 TI \N 1669 10 2009-09-21 09:25:45.802683-04 jsmith Closed 2 TI \N 1670 12 2009-09-21 09:25:46.017657-04 jsmith Closed 2 TI \N 1771 3177 2009-10-13 13:16:17.758481-04 admin Created 2 S \N 1772 737 2009-10-13 13:16:39.19502-04 admin Created 2 SI \N 1773 576 2009-10-13 13:16:39.19502-04 admin Created 2 W \N 1774 576 2009-10-13 13:16:39.19502-04 admin Status Changed from O to E 2 W \N 1775 3178 2009-10-13 13:17:15.159351-04 admin Created 2 S \N 1676 13 2009-09-21 14:51:21.384903-04 admin Created 2 TO \N 1677 17 2009-09-21 14:51:48.556806-04 admin Created 2 TI \N 1678 18 2009-09-21 14:52:19.809381-04 admin Created 2 TI \N 1679 19 2009-09-21 14:52:35.291958-04 admin Created 2 TI \N 1776 739 2009-10-13 13:17:41.745616-04 admin Created 2 SI \N 1681 19 2009-09-21 14:54:06.608549-04 admin Closed 2 TI \N 1682 17 2009-09-21 14:54:06.986139-04 admin Closed 2 TI \N 1683 18 2009-09-21 14:54:07.251803-04 admin Closed 2 TI \N 1684 3171 2009-09-21 16:53:40.305096-04 admin Created 2 S \N 1685 732 2009-09-21 16:54:07.343556-04 admin Created 2 SI \N 1686 570 2009-09-21 16:54:07.343556-04 admin Created 2 W \N 1687 570 2009-09-21 16:54:07.343556-04 admin Status Changed from O to E 2 W \N 1688 571 2009-09-21 16:56:11.382785-04 admin Created 2 W \N 1689 571 2009-09-21 16:56:11.382785-04 admin Status Changed from O to E 2 W \N 1690 507 2009-09-21 16:56:53.645863-04 admin Created 2 P \N 1691 507 2009-09-21 16:57:06.27464-04 admin Created Line #1 2 P \N 1693 571 2009-09-21 16:58:18.356578-04 admin Status Changed from E to I 2 W \N 1694 571 2009-09-21 16:58:22.741897-04 admin Status Changed from I to C 2 W \N 1695 570 2009-09-21 16:58:32.138356-04 admin Status Changed from E to I 2 W \N 1696 570 2009-09-21 16:58:44.427418-04 admin Status Changed from I to C 2 W \N 1697 732 2009-09-21 17:10:17.933799-04 admin Closed 2 SI \N 1698 509 2009-09-22 08:09:59.92569-04 admin Created 2 P \N 1699 509 2009-09-22 08:10:37.300961-04 admin Created Line #1 2 P \N 1700 509 2009-09-22 08:11:24.332134-04 admin Created Line #2 2 P \N 1701 509 2009-09-22 08:11:24.332134-04 admin Created Line #3 2 P \N 1702 509 2009-09-22 08:11:24.332134-04 admin Created Line #4 2 P \N 1705 15 2009-09-22 10:48:12.83925-04 jsmith Created by jsmith 2 CRMA \N 1706 86 2009-09-22 10:48:32.630417-04 jsmith Name Changed from "Virginia Sales Tax" to "Virginia IRS" 2 V \N 1708 87 2009-09-22 11:00:09.394519-04 jsmith Deactivated 2 V \N 1709 86 2009-09-22 11:00:27.754047-04 jsmith Deactivated 2 V \N 1711 87 2009-09-22 11:01:16.738889-04 jsmith Activated 2 V \N 1713 87 2009-09-22 11:01:45.400653-04 jsmith Deactivated 2 V \N 1714 515 2009-09-24 16:00:03.774685-04 admin Created 2 P \N 1715 515 2009-09-24 16:01:42.634076-04 admin Created Line #1 2 P \N 1783 577 2009-10-13 13:26:35.498687-04 jsmith Created 2 W \N 1784 578 2009-10-13 13:26:35.498687-04 jsmith Created 2 W \N 1785 578 2009-10-13 13:26:35.498687-04 jsmith Status Changed from O to E 2 W \N 1786 577 2009-10-13 13:26:35.498687-04 jsmith Status Changed from O to E 2 W \N 1787 579 2009-10-13 13:26:35.498687-04 jsmith Created 2 W \N 1788 579 2009-10-13 13:26:35.498687-04 jsmith Status Changed from O to E 2 W \N 1789 580 2009-10-13 13:26:35.498687-04 jsmith Created 2 W \N 1790 580 2009-10-13 13:26:35.498687-04 jsmith Status Changed from O to E 2 W \N 1791 519 2009-10-13 13:27:00.980984-04 jsmith Created 2 P \N 1727 574 2009-09-25 09:23:05.964472-04 jsmith Created 2 W \N 1792 519 2009-10-13 13:27:11.256717-04 jsmith Created Line #1 2 P \N 1730 574 2009-09-25 09:23:05.964472-04 jsmith Status Changed from O to E 2 W \N 1794 521 2009-10-13 13:27:28.521557-04 jsmith Created 2 P \N 1732 574 2009-09-25 09:24:27.293829-04 jsmith Status Changed from E to I 2 W \N 1733 574 2009-09-25 09:27:35.684101-04 jsmith Status Changed from I to C 2 W \N 1734 309 2009-09-25 09:38:26.409657-04 jsmith Planner Code Changed from "NONE" to "MRP" 2 IS \N 1735 309 2009-09-25 09:38:26.409657-04 jsmith Reorder Level Changed from .00 to 20.00 2 IS \N 1736 308 2009-09-25 09:39:03.445559-04 jsmith Planner Code Changed from "NONE" to "MRP" 2 IS \N 1737 308 2009-09-25 09:39:03.445559-04 jsmith Reorder Level Changed from .00 to 10.00 2 IS \N 1795 521 2009-10-13 13:27:33.119809-04 jsmith Created Line #1 2 P \N 1739 379 2009-09-25 09:45:53.578169-04 jsmith Created 2 IS \N 1797 523 2009-10-13 13:27:49.75778-04 jsmith Created 2 P \N 1798 523 2009-10-13 13:28:01.765824-04 jsmith Created Line #1 2 P \N 1800 578 2009-10-13 13:36:44.045243-04 jsmith Status Changed from E to I 2 W \N 1801 578 2009-10-13 13:36:47.494291-04 jsmith Status Changed from I to C 2 W \N 1802 579 2009-10-13 13:37:01.52835-04 jsmith Status Changed from E to I 2 W \N 1803 579 2009-10-13 13:37:06.105587-04 jsmith Status Changed from I to C 2 W \N 1804 580 2009-10-13 13:37:14.252675-04 jsmith Status Changed from E to I 2 W \N 1805 580 2009-10-13 13:37:17.242638-04 jsmith Status Changed from I to C 2 W \N 1750 3175 2009-09-25 10:30:40.416763-04 jsmith Created 2 S \N 1751 735 2009-09-25 10:31:04.538843-04 jsmith Created 2 SI \N 1752 735 2009-09-25 10:32:11.686864-04 jsmith Closed 2 SI \N 1806 577 2009-10-13 13:37:26.971918-04 jsmith Status Changed from E to I 2 W \N 1807 577 2009-10-13 13:37:52.16287-04 jsmith Status Changed from I to C 2 W \N 1808 576 2009-10-13 13:37:59.957039-04 jsmith Status Changed from E to I 2 W \N 1809 576 2009-10-13 13:38:16.230866-04 jsmith Status Changed from I to C 2 W \N 1757 19 2009-09-25 11:00:58.064497-04 jsmith Created 2 TO \N 1758 23 2009-09-25 11:01:17.084177-04 jsmith Created 2 TI \N 1810 581 2009-10-13 13:39:57.255426-04 jsmith Created 2 W \N 1811 581 2009-10-13 13:39:57.255426-04 jsmith Status Changed from O to E 2 W \N 1812 581 2009-10-13 13:40:27.302082-04 jsmith Status Changed from E to I 2 W \N 1762 22 2009-09-25 12:48:40.959172-04 jsmith Created 2 TO \N 1763 24 2009-09-25 12:49:08.569577-04 jsmith Created 2 TI \N 1813 581 2009-10-13 13:40:57.52482-04 jsmith Status Changed from I to C 2 W \N 1765 24 2009-09-25 12:50:02.427694-04 jsmith Closed 2 TI \N 1766 24 2009-09-25 12:51:05.228582-04 jsmith Created 2 TO \N 1767 25 2009-09-25 12:51:30.669868-04 jsmith Created 2 TI \N 1769 25 2009-09-25 12:52:41.825928-04 jsmith Closed 2 TI \N 1823 739 2009-10-13 14:25:04.937474-04 jsmith Closed 2 SI \N 1824 737 2009-10-13 14:25:25.667162-04 jsmith Closed 2 SI \N 1825 95 2009-10-13 14:25:34.297924-04 jsmith Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 1826 95 2009-10-13 14:27:10.978501-04 jsmith Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 1827 32 2009-10-13 14:31:40.652794-04 jsmith Created 2 TO \N 1828 31 2009-10-13 14:32:13.224172-04 jsmith Created 2 TI \N 1830 31 2009-10-13 14:32:41.678363-04 jsmith Closed 2 TI \N 1831 34 2009-10-13 14:36:39.675686-04 jsmith Created 2 TO \N 1832 32 2009-10-13 14:37:02.031942-04 jsmith Created 2 TI \N 1834 32 2009-10-13 14:37:59.437742-04 jsmith Closed 2 TI \N 1835 525 2009-10-13 14:39:00.159243-04 jsmith Created 2 P \N 1836 525 2009-10-13 14:40:11.497597-04 jsmith Created Line #1 2 P \N 1837 525 2009-10-13 14:40:37.323508-04 jsmith Created Line #2 2 P \N 1844 340 2009-12-03 15:03:37.191311-05 admin Created 2 I \N 1845 340 2009-12-03 15:03:37.191311-05 admin Activated 2 I \N 1846 340 2009-12-03 15:03:37.191311-05 admin Description 1 Changed from "" to "Professional Services" 2 I \N 1847 340 2009-12-03 15:03:37.191311-05 admin Sold Changed from FALSE to TRUE 2 I \N 1848 340 2009-12-03 15:03:37.191311-05 admin Pick List Changed from FALSE to TRUE 2 I \N 1849 340 2009-12-03 15:03:37.191311-05 admin List Price Changed from "0.0000" to "225.0000" 2 I \N 1850 340 2009-12-03 15:04:35.939295-05 admin Pick List Changed from TRUE to FALSE 2 I \N 1851 340 2009-12-03 15:04:35.939295-05 admin Type Changed from "P" to "R" 2 I \N 1852 380 2009-12-03 15:04:56.805471-05 admin Created 2 IS \N 1853 527 2009-12-03 15:19:55.708602-05 admin Created 2 P \N 1854 527 2009-12-03 15:20:18.429499-05 admin Created Line #1 2 P \N 1855 527 2009-12-03 15:20:30.743159-05 admin Created Line #2 2 P \N 1856 527 2009-12-03 15:20:40.192816-05 admin Created Line #3 2 P \N 1858 3183 2009-12-03 15:41:34.835512-05 admin Created 2 S \N 1859 743 2009-12-03 15:42:48.275583-05 admin Created 2 SI \N 1860 583 2009-12-03 15:42:48.275583-05 admin Created 2 W \N 1861 583 2009-12-03 15:42:48.275583-05 admin Status Changed from O to E 2 W \N 1862 584 2009-12-03 16:10:10.339729-05 admin Created 2 W \N 1863 584 2009-12-03 16:10:10.339729-05 admin Status Changed from O to E 2 W \N 1864 529 2009-12-03 16:11:05.003592-05 admin Created 2 P \N 1865 529 2009-12-03 16:11:16.826596-05 admin Created Line #1 2 P \N 1867 529 2009-12-03 16:11:34.46327-05 admin Created Line #2 2 P \N 1868 573 2009-12-03 16:11:47.469006-05 admin Qty. Ordered Changed from 9,880.00 to 18,000.00 2 PI \N 1869 529 2009-12-03 16:12:19.971526-05 admin Created Line #3 2 P \N 1870 584 2009-12-03 16:38:19.24024-05 admin Status Changed from E to I 2 W \N 1871 583 2009-12-03 16:38:32.769241-05 admin Status Changed from E to I 2 W \N 1872 584 2009-12-03 16:40:59.751498-05 admin Status Changed from I to C 2 W \N 1873 583 2009-12-03 16:41:12.589341-05 admin Status Changed from I to C 2 W \N 1874 743 2009-12-03 17:05:20.259528-05 admin Closed 2 SI \N 1875 95 2009-12-03 17:06:07.31686-05 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 1876 95 2009-12-03 17:07:42.188568-05 admin Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 1882 23 2010-01-05 16:41:40.246443-05 admin Closed 2 TI \N 1883 531 2010-01-06 14:53:01.717893-05 admin Created 2 P \N 1884 531 2010-01-06 14:54:13.267225-05 admin Created Line #1 2 P \N 1887 16 2010-03-10 16:28:41.106033-05 admin Created by admin 2 CRMA \N 1888 94 2010-03-10 16:28:41.106033-05 admin Created 2 V \N 1889 341 2010-03-10 16:32:31.987424-05 admin Created 2 I \N 1890 341 2010-03-10 16:32:31.987424-05 admin Description 1 Changed from "" to "Diamond Special Edition Truck" 2 I \N 1891 341 2010-03-10 16:32:31.987424-05 admin Sold Changed from FALSE to TRUE 2 I \N 1892 341 2010-03-10 16:32:31.987424-05 admin Pick List Changed from FALSE to TRUE 2 I \N 1893 341 2010-03-10 16:32:31.987424-05 admin List Price Changed from "0.0000" to "55.0000" 2 I \N 1894 341 2010-03-10 16:32:31.987424-05 admin Product Weight Changed from "0.00" to "3.00" 2 I \N 1895 381 2010-03-10 16:33:55.876969-05 admin Created 2 IS \N 1896 3187 2010-03-10 16:36:07.033104-05 admin Created 2 S \N 1897 747 2010-03-10 16:36:30.409491-05 admin Created 2 SI \N 1898 534 2010-03-10 16:36:30.409491-05 admin Created 2 P \N 1899 534 2010-03-10 16:36:30.409491-05 admin Created Line #1 2 P \N 1900 747 2010-03-10 16:38:13.269929-05 admin Closed 2 SI \N 1901 3189 2010-03-12 14:56:57.96257-05 admin Created 2 S \N 1902 749 2010-03-12 14:57:32.350525-05 admin Created 2 SI \N 1903 586 2010-03-12 14:57:32.350525-05 admin Created 2 W \N 1904 586 2010-03-12 14:57:32.350525-05 admin Status Changed from O to E 2 W \N 1905 751 2010-03-12 14:58:51.35602-05 admin Created 2 SI \N 1906 587 2010-03-12 14:59:26.614541-05 admin Created 2 W \N 1907 587 2010-03-12 14:59:26.614541-05 admin Status Changed from O to E 2 W \N 1908 535 2010-03-12 14:59:48.186541-05 admin Created 2 P \N 1909 535 2010-03-12 15:00:03.444635-05 admin Created Line #1 2 P \N 1911 587 2010-03-12 15:03:40.677631-05 admin Status Changed from E to I 2 W \N 1912 587 2010-03-12 15:03:51.167111-05 admin Status Changed from I to C 2 W \N 1913 586 2010-03-12 15:04:01.080913-05 admin Status Changed from E to I 2 W \N 1914 586 2010-03-12 15:04:40.445197-05 admin Status Changed from I to C 2 W \N 1915 751 2010-03-12 15:10:33.969113-05 admin Closed 2 SI \N 1916 749 2010-03-12 15:10:33.969113-05 admin Closed 2 SI \N 1917 12 2010-03-12 15:21:58.053933-05 admin Created 2 RA \N 1918 12 2010-03-12 15:22:22.146822-05 admin Authorized Qty 1.00 of STRUCK1 2 RA \N 1919 3192 2010-03-12 15:22:22.146822-05 admin Created 2 S \N 1920 753 2010-03-12 15:22:22.146822-05 admin Created 2 SI \N 1921 753 2010-03-12 15:23:41.953617-05 admin Canceled 2 SI \N 1922 3192 2010-03-12 15:23:41.953617-05 admin Line # 1 Canceled 2 S \N 1923 753 2010-03-12 15:23:41.953617-05 admin Line Cancelled by return authorization item that was deleted 2 SI \N 1924 12 2010-03-12 15:23:59.905836-05 admin Authorized Qty 1.00 of STRUCK1 2 RA \N 1925 3193 2010-03-12 15:23:59.905836-05 admin Created 2 S \N 1926 754 2010-03-12 15:23:59.905836-05 admin Created 2 SI \N 1927 754 2010-03-12 15:26:48.503184-05 admin Closed 2 SI \N 1928 537 2010-03-12 15:33:02.348914-05 admin Created 2 P \N 1929 537 2010-03-12 15:33:35.587982-05 admin Created Line #1 2 P \N 1931 3 2010-04-02 09:58:41.818326-04 admin Created 2 OPP \N 1934 3 2010-04-02 10:08:47.593472-04 admin Target Date Changed from "2010-04-01" to "2010-05-02" 2 OPP \N 1936 97 2010-04-02 10:17:35.524653-04 admin Created 2 C \N 1940 3194 2010-04-02 10:25:11.812873-04 admin Created 2 S \N 1941 755 2010-04-02 10:25:11.812873-04 admin Created 2 SI \N 1942 756 2010-04-02 10:30:32.651331-04 admin Created 2 SI \N 1943 539 2010-04-02 10:30:32.651331-04 admin Created 2 P \N 1944 539 2010-04-02 10:30:32.651331-04 admin Created Line #1 2 P \N 1945 755 2010-04-02 10:30:55.368813-04 admin Closed 2 SI \N 1946 756 2010-04-02 10:33:18.771964-04 admin Closed 2 SI \N 1947 342 2010-05-04 16:17:16.835397-04 admin Created 2 I \N 1948 342 2010-05-04 16:17:16.835397-04 admin Description 1 Changed from "" to "Hotel travel expense" 2 I \N 1949 342 2010-05-04 16:17:16.835397-04 admin Sold Changed from FALSE to TRUE 2 I \N 1950 382 2010-05-04 16:19:26.428913-04 admin Created 2 IS \N 1951 343 2010-05-04 16:19:40.798933-04 admin Created 2 I \N 1952 383 2010-05-04 16:19:57.344468-04 admin Created 2 IS \N 1953 343 2010-05-04 16:20:27.352804-04 admin Description 1 Changed from "Hotel travel expense" to "Automobile mileage - travel expense" 2 I \N 1954 343 2010-05-04 16:20:27.352804-04 admin List Price Changed from "0.0000" to "0.5100" 2 I \N 1955 3 2010-05-04 16:22:56.865526-04 admin Deleted "mfgadmin" 2 EMP \N 1956 17 2010-05-04 16:24:14.072498-04 admin Created by admin 2 CRMA \N 1957 95 2010-05-04 16:24:14.072498-04 admin Created 2 V \N 1958 3 2010-06-07 09:36:04.348922-04 admin Target Date Changed from "2010-05-02" to "2010-09-05" 2 OPP \N 1961 3195 2010-06-07 09:37:36.924126-04 admin Created 2 S \N 1962 758 2010-06-07 09:37:36.924126-04 admin Created 2 SI \N 1963 540 2010-06-07 09:37:36.924126-04 admin Created 2 P \N 1964 540 2010-06-07 09:37:36.924126-04 admin Created Line #1 2 P \N 1965 758 2010-06-07 09:37:58.238529-04 admin Changed Qty. Ordered from 100.00 to 1,000.00 2 SI \N 1966 580 2010-06-07 09:37:58.238529-04 admin Qty. Ordered Changed from 100.00 to 1,000.00 2 PI \N 1967 123 2010-06-07 09:38:59.434751-04 admin Created 2 Q \N 1968 118 2010-06-07 09:39:28.822874-04 admin Created 2 QI \N 1969 758 2010-06-07 10:01:14.490705-04 admin Changed Qty. Ordered from 1,000.00 to 2,000.00 2 SI \N 1970 580 2010-06-07 10:01:14.490705-04 admin Qty. Ordered Changed from 1,000.00 to 2,000.00 2 PI \N 1971 758 2010-06-07 10:18:39.501105-04 admin Closed 2 SI \N 1972 95 2010-06-07 10:20:19.336441-04 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 1973 588 2010-06-07 11:31:04.707287-04 admin Created 2 W \N 1974 589 2010-06-07 11:31:04.707287-04 admin Created 2 W \N 1975 589 2010-06-07 11:31:04.707287-04 admin Status Changed from O to E 2 W \N 1976 588 2010-06-07 11:31:04.707287-04 admin Status Changed from O to E 2 W \N 1977 590 2010-06-07 11:32:11.807583-04 admin Created 2 W \N 1978 590 2010-06-07 11:32:11.807583-04 admin Status Changed from O to E 2 W \N 1980 542 2010-06-07 11:33:32.516089-04 admin Created 2 P \N 1981 542 2010-06-07 11:33:37.675472-04 admin Created Line #1 2 P \N 1984 545 2010-06-07 11:34:58.705031-04 admin Created 2 P \N 1985 545 2010-06-07 11:35:24.90916-04 admin Created Line #1 2 P \N 1987 545 2010-06-07 11:36:17.641936-04 admin Created Line #2 2 P \N 1988 3 2010-06-07 11:37:55.977818-04 admin In response to multiple customer requests 1 INCDT \N 1989 3196 2010-06-07 11:37:58.841616-04 admin Created 2 S \N 1990 759 2010-06-07 11:38:15.492824-04 admin Created 2 SI \N 1991 547 2010-06-07 11:38:15.492824-04 admin Created 2 P \N 1992 547 2010-06-07 11:38:15.492824-04 admin Created Line #1 2 P \N 1993 589 2010-06-07 11:41:01.512124-04 admin Status Changed from E to I 2 W \N 1994 589 2010-06-07 11:41:12.347187-04 admin Status Changed from I to C 2 W \N 1995 590 2010-06-07 11:41:22.353372-04 admin Status Changed from E to I 2 W \N 1996 590 2010-06-07 11:41:25.411251-04 admin Status Changed from I to C 2 W \N 1997 588 2010-06-07 11:41:36.21013-04 admin Status Changed from E to I 2 W \N 1998 588 2010-06-07 11:41:49.491523-04 admin Status Changed from I to C 2 W \N 1999 591 2010-06-07 11:43:31.642436-04 admin Created 2 W \N 2000 591 2010-06-07 11:43:31.642436-04 admin Status Changed from O to E 2 W \N 2001 548 2010-06-07 11:44:43.835964-04 admin Created 2 P \N 2002 548 2010-06-07 11:44:51.775802-04 admin Created Line #1 2 P \N 2004 591 2010-06-07 11:45:35.286708-04 admin Status Changed from E to I 2 W \N 2005 591 2010-06-07 11:46:06.911475-04 admin Status Changed from I to C 2 W \N 2014 344 2010-06-07 12:07:09.172259-04 admin Created 2 I \N 2015 384 2010-06-07 12:07:52.056971-04 admin Created 2 IS \N 2016 344 2010-06-07 12:08:11.421417-04 admin Description 1 Changed from "Product Box Type 1" to "Product Box Type 2" 2 I \N 2017 344 2010-06-07 12:08:11.421417-04 admin Product Weight Changed from "0.20" to "0.30" 2 I \N 2018 345 2010-06-07 12:08:43.923103-04 admin Created 2 I \N 2019 257 2010-06-07 12:08:43.923103-04 admin Created BOM Item10 2 BMI \N 2020 258 2010-06-07 12:08:43.923103-04 admin Created BOM Item20 2 BMI \N 2021 385 2010-06-07 12:13:44.109565-04 admin Created 2 IS \N 2022 345 2010-06-07 12:13:52.997118-04 admin Description 1 Changed from "Packaging Subassembly Type 1" to "Packaging Subassembly Type 2" 2 I \N 2023 259 2010-06-07 12:14:58.647084-04 admin Created BOM Item30 2 BMI \N 2024 260 2010-06-07 12:14:58.647084-04 admin Created BOM Item20 2 BMI \N 2025 261 2010-06-07 12:14:58.647084-04 admin Created BOM Item60 2 BMI \N 2026 262 2010-06-07 12:14:58.647084-04 admin Created BOM Item70 2 BMI \N 2027 263 2010-06-07 12:14:58.647084-04 admin Created BOM Item80 2 BMI \N 2028 264 2010-06-07 12:14:58.647084-04 admin Created BOM Item50 2 BMI \N 2029 264 2010-06-07 12:15:44.116656-04 admin Expiration Date Changed from Never to 06/07/10 2 BMI \N 2030 265 2010-06-07 12:16:15.041312-04 admin Created BOM Item90 2 BMI \N 2042 257 2010-06-07 12:22:19.57532-04 admin Effective Date Changed from 06/07/10 to 05/08/10 2 BMI \N 2043 257 2010-06-07 12:22:19.57532-04 admin Expiration Date Changed from Never to 05/08/10 2 BMI \N 2044 266 2010-06-07 12:22:30.161151-04 admin Created BOM Item30 2 BMI \N 2045 257 2010-06-07 12:22:53.841492-04 admin Effective Date Changed from 05/08/10 to 09/12/07 2 BMI \N 2050 18 2010-06-07 14:15:57.177899-04 admin Created by admin 2 CRMA \N 2051 265 2010-06-07 14:29:14.189862-04 admin Changed TSUBS on 6/7/10 1 BMI \N 2052 265 2010-06-07 14:29:15.261045-04 admin ECN Changed from MA-1001 to 15004 2 BMI \N 2053 95 2010-06-21 14:46:35.407432-04 admin Credit Limit Changed from 50,000.00 to 150,000.00 2 C \N 2054 95 2010-06-21 14:52:00.633082-04 admin Credit Limit Changed from 150,000.00 to 200,000.00 2 C \N 2055 95 2010-06-21 14:52:27.285278-04 admin Credit Limit Changed from 200,000.00 to 2,000,000.00 2 C \N 2056 3196 2010-06-21 14:54:31.139006-04 admin Hold Type Changed from "Credit Hold" to "No Hold" 2 S \N 2057 95 2010-06-21 14:54:44.697022-04 admin Credit Limit Changed from 2,000,000.00 to 200,000.00 2 C \N 2058 95 2010-06-21 14:54:44.697022-04 admin Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 2060 759 2010-09-07 16:07:53.335878-04 admin Changed Sched. Date from 06/14/10 to 10/07/10 2 SI \N 2061 586 2010-09-07 16:07:53.335878-04 admin Due Date Changed from 06/14/10 to 10/07/10 2 PI \N 2062 3198 2010-09-07 16:16:14.566356-04 admin Created 2 S \N 2063 765 2010-09-07 16:16:38.01836-04 admin Created 2 SI \N 2064 550 2010-09-07 16:16:38.01836-04 admin Created 2 P \N 2065 550 2010-09-07 16:16:38.01836-04 admin Created Line #1 2 P \N 2066 765 2010-09-07 16:19:20.31002-04 admin Closed 2 SI \N 2067 118 2010-09-07 16:20:44.304371-04 admin Changed Sched. Date from 06/14/10 to 10/07/10 2 QI \N 2068 3200 2010-09-07 16:34:53.442771-04 admin Created 2 S \N 2069 767 2010-09-07 16:35:29.774068-04 admin Created 2 SI \N 2070 551 2010-09-07 16:35:29.774068-04 admin Created 2 P \N 2071 551 2010-09-07 16:35:29.774068-04 admin Created Line #1 2 P \N 2072 3201 2010-09-07 16:36:12.629997-04 admin Created 2 S \N 2073 769 2010-09-07 16:36:40.001815-04 admin Created 2 SI \N 2074 552 2010-09-07 16:36:40.001815-04 admin Created 2 P \N 2075 552 2010-09-07 16:36:40.001815-04 admin Created Line #1 2 P \N 2076 767 2010-09-07 16:42:26.080983-04 admin Closed 2 SI \N 2077 769 2010-09-07 16:42:31.935277-04 admin Closed 2 SI \N 2078 95 2010-09-07 16:43:34.506819-04 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 2079 3196 2010-09-07 16:43:34.506819-04 admin Hold Type Changed from "No Hold" to "Credit Hold" 2 S \N 2080 95 2010-09-07 16:46:21.229877-04 admin Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 2081 3196 2010-09-07 16:46:21.229877-04 admin Hold Type Changed from "Credit Hold" to "No Hold" 2 S \N 2082 95 2010-09-07 16:46:21.229877-04 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 2083 3196 2010-09-07 16:46:21.229877-04 admin Hold Type Changed from "No Hold" to "Credit Hold" 2 S \N 2084 95 2010-09-07 16:47:32.014347-04 admin Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 2085 3196 2010-09-07 16:47:32.014347-04 admin Hold Type Changed from "Credit Hold" to "No Hold" 2 S \N 2086 553 2010-09-08 13:12:51.507903-04 admin Created 2 P \N 2087 553 2010-09-08 13:15:06.759501-04 admin Created Line #1 2 P \N 2089 3203 2010-09-08 13:16:09.354791-04 admin Created 2 S \N 2090 771 2010-09-08 13:16:31.710889-04 admin Created 2 SI \N 2091 771 2010-09-08 13:21:11.088776-04 admin Closed 2 SI \N 2092 3205 2010-09-08 13:32:56.068555-04 admin Created 2 S \N 2093 773 2010-09-08 13:33:16.874053-04 admin Created 2 SI \N 2095 598 2010-09-08 13:33:16.874053-04 admin Status Changed from O to E 2 W \N 2096 599 2010-09-08 13:34:02.390703-04 admin Created 2 W \N 2097 599 2010-09-08 13:34:02.390703-04 admin Status Changed from O to E 2 W \N 2098 555 2010-09-08 13:34:30.698235-04 admin Created 2 P \N 2099 555 2010-09-08 13:34:41.355796-04 admin Created Line #1 2 P \N 2101 555 2010-09-08 13:35:43.500358-04 admin Created Line #2 2 P \N 2102 555 2010-09-08 13:37:45.674201-04 admin Created Line #3 2 P \N 2106 599 2010-09-08 13:42:04.133297-04 admin Status Changed from E to I 2 W \N 2107 599 2010-09-08 13:42:12.788162-04 admin Status Changed from I to C 2 W \N 2108 598 2010-09-08 13:42:25.477028-04 admin Status Changed from E to I 2 W \N 2109 598 2010-09-08 13:42:49.511842-04 admin Status Changed from I to C 2 W \N 2110 773 2010-09-08 13:43:20.633406-04 admin Closed 2 SI \N 2112 759 2010-09-08 13:47:16.114369-04 admin Changed Sched. Date from 10/07/10 to 10/26/10 2 SI \N 2113 586 2010-09-08 13:47:16.114369-04 admin Due Date Changed from 10/07/10 to 10/26/10 2 PI \N 2114 759 2010-09-08 13:50:14.049506-04 admin Closed 2 SI \N 2115 759 2010-09-08 13:50:50.476173-04 admin Canceled 2 SI \N 2116 3196 2010-09-08 13:50:50.476173-04 admin Line # 1 Canceled 2 S \N 2117 3207 2010-09-08 13:50:50.476173-04 admin Created 2 S \N 2118 775 2010-09-08 13:50:50.476173-04 admin Created 2 SI \N 2119 557 2010-09-08 13:50:50.476173-04 admin Created 2 P \N 2120 557 2010-09-08 13:50:50.476173-04 admin Created Line #1 2 P \N 2123 600 2010-09-13 11:34:47.534525-04 admin Created 2 W \N 2124 601 2010-09-13 11:34:47.534525-04 admin Created 2 W \N 2125 601 2010-09-13 11:34:47.534525-04 admin Status Changed from O to E 2 W \N 2126 600 2010-09-13 11:34:47.534525-04 admin Status Changed from O to E 2 W \N 2127 600 2010-09-13 11:35:35.057256-04 admin Qty. Ordered Changed from 500.00 to 100.00 2 W \N 2128 601 2010-09-13 11:35:35.057256-04 admin Qty. Ordered Changed from 500.00 to 100.00 2 W \N 2129 600 2010-09-13 11:35:41.356719-04 admin Due Date Changed from 10/20/10 to 09/20/10 2 W \N 2130 601 2010-09-13 11:35:41.356719-04 admin Due Date Changed from 10/19/10 to 09/19/10 2 W \N 2131 558 2010-09-13 11:36:33.780305-04 admin Created 2 P \N 2132 558 2010-09-13 11:36:44.675974-04 admin Created Line #1 2 P \N 2134 601 2010-09-13 11:47:00.153359-04 admin Status Changed from E to I 2 W \N 2135 601 2010-09-13 11:47:17.36558-04 admin Status Changed from I to C 2 W \N 2136 600 2010-09-13 11:47:49.99169-04 admin Status Changed from E to I 2 W \N 2137 600 2010-09-13 11:48:14.890274-04 admin Status Changed from I to C 2 W \N 2138 602 2010-09-13 11:55:55.062146-04 admin Created 2 W \N 2141 602 2010-09-13 11:55:55.062146-04 admin Status Changed from O to E 2 W \N 2147 118 2010-11-04 15:32:52.169942-04 admin Changed Sched. Date from 10/07/10 to 12/04/10 2 QI \N 2149 775 2010-11-04 15:34:00.961137-04 admin Changed Sched. Date from 09/22/10 to 11/24/10 2 SI \N 2150 596 2010-11-04 15:34:00.961137-04 admin Due Date Changed from 09/22/10 to 11/24/10 2 PI \N 2151 588 2010-11-04 15:40:15.391492-04 admin Closed 2 PI \N 2152 588 2010-11-04 15:40:15.391492-04 admin Closed 2 PI \N 2153 3211 2010-11-04 15:44:11.360985-04 admin Created 2 S \N 2154 779 2010-11-04 15:44:44.521944-04 admin Created 2 SI \N 2155 560 2010-11-04 15:44:44.521944-04 admin Created 2 P \N 2156 560 2010-11-04 15:44:44.521944-04 admin Created Line #1 2 P \N 2157 598 2010-11-04 15:44:44.521944-04 admin Created 2 PI \N 2158 598 2010-11-04 15:45:42.464513-04 admin Opened 2 PI \N 2159 3213 2010-11-04 15:46:34.443535-04 admin Created 2 S \N 2160 781 2010-11-04 15:46:45.248635-04 admin Created 2 SI \N 2161 605 2010-11-04 15:46:45.248635-04 admin Created 2 W \N 2162 605 2010-11-04 15:46:45.248635-04 admin Status Changed from O to E 2 W \N 2163 606 2010-11-04 15:49:29.647032-04 admin Created 2 W \N 2164 606 2010-11-04 15:49:29.647032-04 admin Status Changed from O to E 2 W \N 2165 561 2010-11-04 15:51:50.761379-04 admin Created 2 P \N 2166 561 2010-11-04 15:51:57.078155-04 admin Created Line #1 2 P \N 2167 599 2010-11-04 15:51:57.078155-04 admin Created 2 PI \N 2169 602 2010-11-04 15:52:45.102472-04 admin Due Date Changed from 10/20/10 to 12/09/10 2 W \N 2171 599 2010-11-04 15:53:06.799235-04 admin Opened 2 PI \N 2172 598 2010-11-04 15:54:23.741121-04 admin Closed 2 PI \N 2173 598 2010-11-04 15:54:23.741121-04 admin Closed 2 PI \N 2174 599 2010-11-04 15:55:21.703133-04 admin Closed 2 PI \N 2175 599 2010-11-04 15:55:21.703133-04 admin Closed 2 PI \N 2176 606 2010-11-04 15:58:26.865018-04 admin Status Changed from E to I 2 W \N 2177 606 2010-11-04 15:58:33.370756-04 admin Status Changed from I to C 2 W \N 2178 605 2010-11-04 15:58:40.633268-04 admin Status Changed from E to I 2 W \N 2179 605 2010-11-04 16:20:02.429652-04 admin Status Changed from I to C 2 W \N 2180 781 2010-11-04 16:25:28.295187-04 admin Closed 2 SI \N 2181 95 2010-11-04 16:40:51.558991-04 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 2182 3196 2010-11-04 16:40:51.558991-04 admin Hold Type Changed from "No Hold" to "Credit Hold" 2 S \N 2183 3211 2010-11-04 16:40:51.558991-04 admin Hold Type Changed from "No Hold" to "Credit Hold" 2 S \N 2185 775 2010-11-30 15:04:07.850686-05 admin Changed Sched. Date from 11/24/10 to 11/30/10 2 SI \N 2186 596 2010-11-30 15:04:07.850686-05 admin Due Date Changed from 11/24/10 to 11/30/10 2 PI \N 2187 779 2010-11-30 15:04:44.664887-05 admin Changed Sched. Date from 11/11/10 to 11/30/10 2 SI \N 2188 598 2010-11-30 15:04:44.664887-05 admin Due Date Changed from 11/11/10 to 11/30/10 2 PI \N 2189 19 2010-12-29 11:28:27.487379-05 admin Created by admin 2 CRMA \N 2190 97 2010-12-29 11:28:27.487379-05 admin Created 2 V \N 2191 343 2010-12-29 11:59:28.98083-05 admin Inventory UOM Changed from "EA" (4) to "MILE" (12) 2 I \N 2192 343 2010-12-29 11:59:28.98083-05 admin Fractional Changed from FALSE to TRUE 2 I \N 2193 343 2010-12-29 11:59:28.98083-05 admin Price UOM Changed from "EA" (4) to "MILE" (12) 2 I \N 2194 775 2010-12-30 16:10:02.101901-05 admin Changed Sched. Date from 11/30/10 to 12/30/10 2 SI \N 2195 596 2010-12-30 16:10:02.101901-05 admin Due Date Changed from 11/30/10 to 12/30/10 2 PI \N 2196 775 2010-12-30 16:10:23.304759-05 admin Changed Sched. Date from 12/30/10 to 01/13/11 2 SI \N 2197 596 2010-12-30 16:10:23.304759-05 admin Due Date Changed from 12/30/10 to 01/13/11 2 PI \N 2199 779 2010-12-30 16:11:05.160868-05 admin Changed Sched. Date from 11/30/10 to 12/30/10 2 SI \N 2200 598 2010-12-30 16:11:05.160868-05 admin Due Date Changed from 11/30/10 to 12/30/10 2 PI \N 2201 602 2010-12-30 16:12:53.472743-05 admin Due Date Changed from 12/09/10 to 01/07/11 2 W \N 2203 602 2010-12-30 16:13:20.826297-05 admin Status Changed from E to O 2 W \N 2207 602 2010-12-30 16:13:37.125225-05 admin Status Changed from O to E 2 W \N 2208 95 2010-12-30 16:16:48.482665-05 admin Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C \N 2209 3196 2010-12-30 16:16:48.482665-05 admin Hold Type Changed from "Credit Hold" to "No Hold" 2 S \N 2210 3211 2010-12-30 16:16:48.482665-05 admin Hold Type Changed from "Credit Hold" to "No Hold" 2 S \N 2211 3215 2010-12-30 16:25:16.539971-05 admin Created 2 S \N 2212 783 2010-12-30 16:25:36.168772-05 admin Created 2 SI \N 2213 563 2010-12-30 16:25:36.168772-05 admin Created 2 P \N 2328 606 2011-06-03 16:26:06.287401-04 admin Created 2 PI f 2214 563 2010-12-30 16:25:36.168772-05 admin Created Line #1 2 P \N 2215 600 2010-12-30 16:25:36.168772-05 admin Created 2 PI \N 2216 600 2010-12-30 16:25:55.093962-05 admin Opened 2 PI \N 2217 783 2010-12-30 16:27:34.219577-05 admin Closed 2 SI \N 2218 779 2010-12-30 16:27:40.160757-05 admin Closed 2 SI \N 2219 95 2010-12-30 16:28:26.778775-05 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C \N 2220 3196 2010-12-30 16:28:26.778775-05 admin Hold Type Changed from "No Hold" to "Credit Hold" 2 S \N 2221 600 2010-12-30 16:31:23.589783-05 admin Closed 2 PI \N 2222 600 2010-12-30 16:31:23.589783-05 admin Closed 2 PI \N 2224 775 2011-03-07 14:53:35.778659-05 admin Changed Sched. Date from 01/13/11 to 04/11/11 2 SI f 2225 596 2011-03-07 14:53:35.778659-05 admin Due Date Changed from 01/13/11 to 04/11/11 2 PI f 2226 602 2011-03-07 14:59:12.8911-05 admin Due Date Changed from 01/07/11 to 03/28/11 2 W f 2228 602 2011-03-07 15:02:04.117202-05 admin Status Changed from E to O 2 W f 2230 608 2011-03-07 15:02:08.051575-05 admin Created 2 W f 2231 608 2011-03-07 15:02:08.051575-05 admin Status Changed from O to E 2 W f 2232 602 2011-03-07 15:02:08.051575-05 admin Status Changed from O to E 2 W f 2233 118 2011-03-07 15:07:06.732925-05 admin Changed Sched. Date from 12/04/10 to 05/11/11 2 QI f 2234 3217 2011-03-07 15:29:10.499658-05 admin Created 2 S f 2235 3217 2011-03-07 15:29:11.28503-05 admin Shipvia Changed from "" to "UPS-GROUND-UPS Ground" 2 S f 2236 785 2011-03-07 15:29:42.289772-05 admin Created 2 SI f 2237 564 2011-03-07 15:29:42.289772-05 admin Created 2 P f 2238 564 2011-03-07 15:29:42.289772-05 admin Created Line #1 2 P f 2239 601 2011-03-07 15:29:42.289772-05 admin Created 2 PI f 2240 601 2011-03-07 15:30:16.866934-05 admin Opened 2 PI f 2241 3217 2011-03-07 15:31:56.597251-05 admin Hold Type Changed from "Credit Hold" to "No Hold" 2 S f 2242 785 2011-03-07 15:35:41.114148-05 admin Closed 2 SI f 2243 601 2011-03-07 15:49:25.252721-05 admin Closed 2 PI f 2244 601 2011-03-07 15:49:25.252721-05 admin Closed 2 PI f 2251 95 2011-04-18 07:20:22.179731-04 admin Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C f 2252 3196 2011-04-18 07:20:22.179731-04 admin Hold Type Changed from "Credit Hold" to "No Hold" 2 S f 2253 123 2011-04-18 07:34:43.57268-04 admin Created 2 C f 2254 20 2011-04-18 07:34:43.57268-04 admin Created by admin 2 CRMA f 2255 123 2011-04-18 07:35:07.811055-04 admin Created 2 C f 2256 123 2011-04-18 07:36:44.86136-04 admin Vienna Collectibles Headquarters: Ship To Name Changed from "Vienna Collectibles" to "Vienna Collectibles Headquarters" 2 C f 2257 3221 2011-04-18 07:40:29.447628-04 admin Created 2 S f 2258 789 2011-04-18 07:41:17.199975-04 admin Created 2 SI f 2259 791 2011-04-18 07:42:18.321685-04 admin Created 2 SI f 2260 565 2011-04-18 07:42:18.321685-04 admin Created 2 P f 2261 565 2011-04-18 07:42:18.321685-04 admin Created Line #1 2 P f 2262 602 2011-04-18 07:42:18.321685-04 admin Created 2 PI f 2263 602 2011-04-18 07:44:09.308898-04 admin Opened 2 PI f 2264 596 2011-04-18 07:44:33.707929-04 admin Opened 2 PI f 2265 602 2011-04-18 07:53:10.127863-04 admin Due Date Changed from 03/28/11 to 06/06/11 2 W f 2266 608 2011-04-18 07:53:10.127863-04 admin Due Date Changed from 03/27/11 to 06/02/11 2 W f 2267 610 2011-04-18 07:53:35.513163-04 admin Created 2 W f 2268 611 2011-04-18 07:53:35.513163-04 admin Created 2 W f 2269 611 2011-04-18 07:53:35.513163-04 admin Status Changed from O to E 2 W f 2270 610 2011-04-18 07:53:35.513163-04 admin Status Changed from O to E 2 W f 2271 566 2011-04-18 07:53:55.326699-04 admin Created 2 P f 2272 566 2011-04-18 07:54:07.337032-04 admin Created Line #1 2 P f 2273 603 2011-04-18 07:54:07.337032-04 admin Created 2 PI f 2275 568 2011-04-18 07:54:42.764929-04 admin Created 2 P f 2276 568 2011-04-18 07:54:48.594901-04 admin Created Line #1 2 P f 2277 604 2011-04-18 07:54:48.594901-04 admin Created 2 PI f 2279 604 2011-04-18 07:55:09.262021-04 admin Opened 2 PI f 2280 608 2011-04-18 07:57:06.867873-04 admin Status Changed from E to I 2 W f 2281 608 2011-04-18 07:57:20.790729-04 admin Status Changed from I to C 2 W f 2282 610 2011-04-18 07:57:33.949275-04 admin Status Changed from E to I 2 W f 2283 611 2011-04-18 07:59:26.856376-04 admin Status Changed from E to I 2 W f 2284 611 2011-04-18 07:59:37.156541-04 admin Status Changed from I to C 2 W f 2285 610 2011-04-18 07:59:44.951178-04 admin Status Changed from I to C 2 W f 2286 791 2011-04-18 08:26:08.946826-04 admin Closed 2 SI f 2287 789 2011-04-18 08:26:08.946826-04 admin Closed 2 SI f 2288 775 2011-04-18 08:26:59.100253-04 admin Closed 2 SI f 2289 123 2011-04-18 08:27:59.276572-04 admin Credit Status Changed from "In Good Standing" to "Credit Warning" 2 C f 2290 123 2011-04-18 08:29:37.263089-04 admin Credit Status Changed from "Credit Warning" to "In Good Standing" 2 C f 2291 596 2011-04-18 08:34:27.781732-04 admin Closed 2 PI f 2292 596 2011-04-18 08:34:27.781732-04 admin Closed 2 PI f 2293 604 2011-04-18 08:34:32.260847-04 admin Closed 2 PI f 2294 604 2011-04-18 08:34:32.260847-04 admin Closed 2 PI f 2295 602 2011-04-18 08:37:37.831147-04 admin Closed 2 PI f 2296 602 2011-04-18 08:37:37.831147-04 admin Closed 2 PI f 2297 603 2011-04-18 13:26:50.305529-04 admin Opened 2 PI f 2298 603 2011-04-18 13:27:58.563487-04 admin Closed 2 PI f 2299 603 2011-04-18 13:27:58.563487-04 admin Closed 2 PI f 2300 602 2011-04-18 13:29:34.810123-04 admin Status Changed from E to I 2 W f 2301 602 2011-04-18 13:30:12.956417-04 admin Status Changed from I to C 2 W f 2302 612 2011-04-18 13:30:28.48679-04 admin Created 2 W f 2303 613 2011-04-18 13:30:28.48679-04 admin Created 2 W f 2304 613 2011-04-18 13:30:28.48679-04 admin Status Changed from O to E 2 W f 2305 612 2011-04-18 13:30:28.48679-04 admin Status Changed from O to E 2 W f 2308 6 2011-04-18 13:51:49.366279-04 admin Actual Hours changed from 0.00 to 50.00 2 TA f 2309 118 2011-04-18 13:59:38.361322-04 admin Changed Sched. Date from 05/11/11 to 06/17/11 2 QI f 2310 3225 2011-04-18 14:00:22.411533-04 admin Created 2 S f 2311 795 2011-04-18 14:00:35.947378-04 admin Created 2 SI f 2312 795 2011-06-03 16:11:07.793626-04 admin Changed Sched. Date from 07/17/11 to 08/02/11 2 SI f 2313 3227 2011-06-03 16:11:29.212783-04 admin Created 2 S f 2314 3227 2011-06-03 16:11:30.157639-04 admin Shipvia Changed from "" to "UPS-GROUND-UPS Ground" 2 S f 2315 797 2011-06-03 16:12:05.084477-04 admin Created 2 SI f 2316 570 2011-06-03 16:12:05.084477-04 admin Created 2 P f 2317 570 2011-06-03 16:12:05.084477-04 admin Created Line #1 2 P f 2318 605 2011-06-03 16:12:05.084477-04 admin Created 2 PI f 2319 605 2011-06-03 16:12:27.299236-04 admin Opened 2 PI f 2320 605 2011-06-03 16:16:18.646269-04 admin Closed 2 PI f 2321 605 2011-06-03 16:16:18.646269-04 admin Closed 2 PI f 2322 797 2011-06-03 16:21:58.23682-04 admin Closed 2 SI f 2323 3229 2011-06-03 16:24:16.11195-04 admin Created 2 S f 2324 3229 2011-06-03 16:24:17.273626-04 admin Shipvia Changed from "" to "UPS-GROUND-UPS Ground" 2 S f 2325 799 2011-06-03 16:26:06.287401-04 admin Created 2 SI f 2326 571 2011-06-03 16:26:06.287401-04 admin Created 2 P f 2327 571 2011-06-03 16:26:06.287401-04 admin Created Line #1 2 P f 2329 606 2011-06-03 16:26:33.076645-04 admin Opened 2 PI f 2330 799 2011-06-03 16:33:32.589919-04 admin Closed 2 SI f 2331 3231 2011-06-03 16:34:46.037461-04 admin Created 2 S f 2332 801 2011-06-03 16:35:13.758258-04 admin Created 2 SI f 2333 572 2011-06-03 16:35:13.758258-04 admin Created 2 P f 2334 572 2011-06-03 16:35:13.758258-04 admin Created Line #1 2 P f 2335 607 2011-06-03 16:35:13.758258-04 admin Created 2 PI f 2336 607 2011-06-03 16:35:38.452938-04 admin Opened 2 PI f 2337 607 2011-06-03 16:39:01.479742-04 admin Closed 2 PI f 2338 607 2011-06-03 16:39:01.479742-04 admin Closed 2 PI f 2339 606 2011-06-03 16:40:30.558225-04 admin Closed 2 PI f 2340 606 2011-06-03 16:40:30.558225-04 admin Closed 2 PI f 2341 801 2011-06-03 16:46:31.456763-04 admin Closed 2 SI f 2342 614 2011-06-03 16:54:35.94698-04 admin Created 2 W f 2343 614 2011-06-03 16:54:35.94698-04 admin Status Changed from O to E 2 W f 2344 614 2011-06-03 16:54:44.74432-04 admin Due Date Changed from 06/03/11 to 06/08/11 2 W f 2345 614 2011-06-03 16:55:14.612479-04 admin Status Changed from E to I 2 W f 2346 614 2011-06-03 16:55:32.604097-04 admin Status Changed from I to C 2 W f 2347 612 2011-06-03 16:56:48.35773-04 admin Due Date Changed from 07/17/11 to 08/07/11 2 W f 2348 613 2011-06-03 16:56:48.35773-04 admin Due Date Changed from 07/16/11 to 08/02/11 2 W f 2352 319 2011-06-15 11:18:41.853161-04 admin Description 1 Changed from "Breeder Hubcaps And Fenders" to "Inactive Item" 2 I f 2353 324 2011-06-15 11:18:41.853161-04 admin Deactivated 2 I f 2354 322 2011-06-15 11:18:41.853161-04 admin Deactivated 2 I f 2355 321 2011-06-15 11:18:41.853161-04 admin Deactivated 2 I f 2356 319 2011-06-15 11:18:41.853161-04 admin Deactivated 2 I f 2357 322 2011-06-15 11:18:41.853161-04 admin Type Changed from "C" to "P" 2 I f 2358 321 2011-06-15 11:18:41.853161-04 admin Type Changed from "C" to "P" 2 I f 2359 324 2011-06-15 11:18:41.853161-04 admin Type Changed from "Y" to "P" 2 I f 2360 319 2011-06-15 11:18:41.853161-04 admin Type Changed from "B" to "P" 2 I f 2361 324 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from S to R 2 IS f 2362 329 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from L to R 2 IS f 2363 318 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from L to R 2 IS f 2364 297 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from L to R 2 IS f 2365 323 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from S to R 2 IS f 2366 325 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from S to R 2 IS f 2367 377 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from L to R 2 IS f 2368 376 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from L to R 2 IS f 2369 378 2011-06-15 11:19:19.192094-04 admin Itemsite Control Method Changed from L to R 2 IS f 2370 312 2011-06-15 11:19:19.192094-04 admin Deactivated 2 I f 2371 312 2011-06-15 11:19:19.192094-04 admin Type Changed from "L" to "P" 2 I f 2372 525 2011-06-15 11:19:19.192094-04 admin Deleted Line #1 2 P f 2373 322 2011-06-15 11:19:19.192094-04 admin Activated 2 I f 2374 321 2011-06-15 11:19:19.192094-04 admin Activated 2 I f 2375 248 2011-06-15 11:19:19.192094-04 admin Expiration Date Changed from Never to 05/16/11 2 BMI f 2376 249 2011-06-15 11:19:19.192094-04 admin Expiration Date Changed from Never to 05/16/11 2 BMI f 2377 250 2011-06-15 11:19:19.192094-04 admin Expiration Date Changed from Never to 05/16/11 2 BMI f 2378 251 2011-06-15 11:19:19.192094-04 admin Expiration Date Changed from Never to 05/16/11 2 BMI f 2379 21 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2380 22 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2381 23 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2382 24 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2383 25 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2384 26 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2385 27 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2386 28 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2387 29 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2388 30 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2389 31 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2390 32 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2391 33 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2392 34 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2393 35 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2394 36 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2395 37 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2396 38 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2397 39 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2398 40 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2399 41 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2400 42 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f 2401 43 2011-08-19 11:28:22.599518-04 admin Created by admin 2 CRMA f \. -- -- Data for Name: company; Type: TABLE DATA; Schema: public; Owner: admin -- COPY company (company_id, company_number, company_descrip, company_external, company_server, company_port, company_database, company_curr_id, company_yearend_accnt_id, company_gainloss_accnt_id, company_dscrp_accnt_id, company_unrlzgainloss_accnt_id) FROM stdin; 1 01 ProDiem f 1024 \N 84 117 118 \N \. -- -- Data for Name: contrct; Type: TABLE DATA; Schema: public; Owner: admin -- COPY contrct (contrct_id, contrct_number, contrct_vend_id, contrct_descrip, contrct_effective, contrct_expires, contrct_note) FROM stdin; \. -- -- Data for Name: costcat; Type: TABLE DATA; Schema: public; Owner: admin -- COPY costcat (costcat_id, costcat_code, costcat_descrip, costcat_asset_accnt_id, costcat_liability_accnt_id, costcat_adjustment_accnt_id, costcat_matusage_accnt_id, costcat_purchprice_accnt_id, costcat_laboroverhead_accnt_id, costcat_scrap_accnt_id, costcat_invcost_accnt_id, costcat_wip_accnt_id, costcat_shipasset_accnt_id, costcat_mfgscrap_accnt_id, costcat_transform_accnt_id, costcat_freight_accnt_id, costcat_toliability_accnt_id, costcat_exp_accnt_id) FROM stdin; 31 DISTRIBUTION Distribution - WH2 128 95 91 \N 90 94 92 87 86 130 93 89 98 132 158 32 INTRAN Intransit Items 134 95 91 \N 90 94 92 87 86 96 93 89 98 132 158 33 MATERIALS Materials - WH1 138 95 91 \N 90 94 92 87 86 96 93 89 98 132 158 35 RETAIL Retail Items 146 95 150 \N 90 94 149 87 86 96 93 89 98 132 158 30 FINISHED Finished Product - WH1 85 95 91 88 90 94 92 87 86 96 93 89 98 132 158 \. -- -- Data for Name: costelem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY costelem (costelem_id, costelem_type, costelem_sys, costelem_po, costelem_active, costelem_exp_accnt_id, costelem_cost_item_id) FROM stdin; 3 Material f t t \N -1 4 Direct Labor f f t \N -1 5 Overhead f f t \N -1 6 Machine Overhead f f t \N -1 21 Special Handling f t t \N -1 \. -- -- Data for Name: costhist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY costhist (costhist_id, costhist_item_id, costhist_costelem_id, costhist_type, costhist_date, costhist_oldcost, costhist_newcost, costhist_lowlevel, costhist_oldcurr_id, costhist_newcurr_id, costhist_username) FROM stdin; 1402 334 4 N 2009-08-19 16:16:02.998718-04 0.000000 0.110000 f 1 1 admin 1403 334 5 N 2009-08-19 16:16:02.998718-04 0.000000 0.011000 f 1 1 admin 1404 334 3 N 2009-08-19 16:16:02.998718-04 0.000000 0.750000 t 1 1 admin 979 295 19 D 2004-03-19 15:23:23.224219-05 1.500000 0.000000 f 1 1 \N 980 296 20 D 2004-03-19 15:23:23.224219-05 0.300000 0.000000 f 1 1 \N 981 297 20 D 2004-03-19 15:23:23.224219-05 0.250000 0.000000 f 1 1 \N 982 294 20 D 2004-03-19 15:23:23.224219-05 0.100000 0.000000 f 1 1 \N 983 293 20 D 2004-03-19 15:23:23.224219-05 0.100000 0.000000 f 1 1 \N 984 298 4 D 2004-03-19 15:23:23.224219-05 0.333300 0.000000 f 1 1 \N 985 298 5 D 2004-03-19 15:23:23.224219-05 0.333300 0.000000 f 1 1 \N 986 298 20 D 2004-03-19 15:23:23.224219-05 0.550000 0.000000 t 1 1 \N 987 292 4 D 2004-03-19 15:23:23.224219-05 0.850000 0.000000 f 1 1 \N 988 292 5 D 2004-03-19 15:23:23.224219-05 0.850000 0.000000 f 1 1 \N 989 292 4 D 2004-03-19 15:23:23.224219-05 0.333300 0.000000 t 1 1 \N 990 292 19 D 2004-03-19 15:23:23.224219-05 0.015000 0.000000 t 1 1 \N 991 292 5 D 2004-03-19 15:23:23.224219-05 0.333300 0.000000 t 1 1 \N 992 292 20 D 2004-03-19 15:23:23.224219-05 1.050000 0.000000 t 1 1 \N 993 302 3 N 2005-12-23 14:28:47.617303-05 0.000000 1.000000 f 1 1 \N 994 302 3 S 2005-12-23 14:28:47.706404-05 0.000000 1.000000 f 1 1 \N 995 305 3 N 2005-12-23 14:29:07.802617-05 0.000000 0.250000 f 1 1 \N 996 305 3 S 2005-12-23 14:29:07.809914-05 0.000000 0.250000 f 1 1 \N 997 306 3 N 2005-12-23 14:29:25.475698-05 0.000000 0.500000 f 1 1 \N 998 306 3 S 2005-12-23 14:29:25.910393-05 0.000000 0.500000 f 1 1 \N 999 303 3 N 2005-12-23 14:29:44.773272-05 0.000000 0.100000 f 1 1 \N 1000 303 3 S 2005-12-23 14:29:44.800061-05 0.000000 0.100000 f 1 1 \N 1001 301 3 N 2005-12-23 14:29:56.684988-05 0.000000 0.500000 f 1 1 \N 1002 301 3 S 2005-12-23 14:29:56.69147-05 0.000000 0.500000 f 1 1 \N 1003 301 21 N 2005-12-23 14:30:04.849399-05 0.000000 0.200000 f 1 1 \N 1004 301 21 S 2005-12-23 14:30:04.870033-05 0.000000 0.200000 f 1 1 \N 1005 300 3 N 2005-12-23 14:30:30.392559-05 0.000000 1.405000 t 1 1 \N 1006 304 3 N 2005-12-23 14:30:30.392559-05 0.000000 0.800000 t 1 1 \N 1007 300 4 N 2005-12-23 14:30:30.426198-05 0.000000 0.308000 f 1 1 \N 1008 304 4 N 2005-12-23 14:30:30.426198-05 0.000000 0.110000 f 1 1 \N 1009 300 4 N 2005-12-23 14:30:30.446081-05 0.000000 0.110000 t 1 1 \N 1010 300 5 N 2005-12-23 14:30:30.463301-05 0.000000 0.030800 f 1 1 \N 1011 304 5 N 2005-12-23 14:30:30.463301-05 0.000000 0.011000 f 1 1 \N 1012 300 5 N 2005-12-23 14:30:30.724101-05 0.000000 0.011000 t 1 1 \N 1013 300 3 A 2005-12-23 14:30:30.784588-05 1.405000 2.205000 t 1 1 \N 1014 300 21 N 2005-12-23 14:30:30.784588-05 0.000000 0.002000 t 1 1 \N 1015 304 4 S 2005-12-23 14:30:42.801979-05 0.000000 0.110000 f 1 1 \N 1016 304 5 S 2005-12-23 14:30:42.801979-05 0.000000 0.011000 f 1 1 \N 1017 304 3 S 2005-12-23 14:30:42.801979-05 0.000000 0.800000 t 1 1 \N 1018 300 4 S 2005-12-23 14:30:42.801979-05 0.000000 0.308000 f 1 1 \N 1019 300 5 S 2005-12-23 14:30:42.801979-05 0.000000 0.030800 f 1 1 \N 1020 300 4 S 2005-12-23 14:30:42.801979-05 0.000000 0.110000 t 1 1 \N 1021 300 3 S 2005-12-23 14:30:42.801979-05 0.000000 2.205000 t 1 1 \N 1022 300 5 S 2005-12-23 14:30:42.801979-05 0.000000 0.011000 t 1 1 \N 1023 300 21 S 2005-12-23 14:30:42.801979-05 0.000000 0.002000 t 1 1 \N 1024 305 3 A 2005-12-27 10:52:08.918744-05 0.250000 0.500000 f 1 1 \N 1025 303 3 A 2005-12-27 10:52:08.918744-05 0.100000 0.250000 f 1 1 \N 1026 301 3 A 2005-12-27 10:52:08.918744-05 0.500000 0.100000 f 1 1 \N 1027 302 3 A 2005-12-27 10:52:08.918744-05 1.000000 0.010000 f 1 1 \N 1028 301 3 A 2005-12-27 10:59:27.845595-05 0.100000 0.125000 f 1 1 \N 1029 302 3 A 2005-12-29 10:21:04.772038-05 0.010000 0.500000 f 1 1 \N 1030 301 3 A 2005-12-29 10:21:04.772038-05 0.125000 1.000000 f 1 1 \N 1031 303 3 A 2005-12-29 10:21:04.772038-05 0.250000 0.217500 f 1 1 \N 1032 305 3 A 2005-12-29 10:21:04.772038-05 0.500000 0.250000 f 1 1 \N 1033 302 3 A 2005-12-29 12:28:14.419745-05 0.500000 0.250000 f 1 1 \N 1034 306 3 A 2005-12-29 12:28:14.419745-05 0.500000 0.250000 f 1 1 \N 1035 303 3 A 2005-12-29 12:28:14.419745-05 0.217500 0.100000 f 1 1 \N 1036 301 3 A 2005-12-29 12:28:14.419745-05 1.000000 0.500000 f 1 1 \N 1037 303 3 A 2005-12-29 18:03:11.971842-05 0.100000 0.080000 f 1 1 \N 1038 303 3 A 2005-12-29 18:06:35.831496-05 0.080000 0.100000 f 1 1 \N 1039 303 3 A 2005-12-30 15:07:00.153887-05 0.100000 0.050000 f 1 1 \N 1040 303 3 A 2005-12-30 15:09:19.170385-05 0.050000 0.200000 f 1 1 \N 1041 305 3 A 2006-01-09 10:35:38.141745-05 0.250000 0.222200 f 1 1 \N 1042 306 3 S 2006-01-09 11:06:38.102402-05 0.500000 0.250000 f 1 1 \N 1043 305 3 S 2006-01-09 11:06:38.102402-05 0.250000 0.222200 f 1 1 \N 1044 303 3 S 2006-01-09 11:06:38.102402-05 0.100000 0.200000 f 1 1 \N 1045 302 3 S 2006-01-09 11:06:38.102402-05 1.000000 0.250000 f 1 1 \N 1046 304 3 A 2006-01-09 11:08:26.771208-05 0.800000 0.497200 t 1 1 \N 1047 300 3 A 2006-01-09 11:08:26.771208-05 2.205000 1.552200 t 1 1 \N 1048 300 3 S 2006-01-09 11:09:16.170598-05 2.205000 1.552200 t 1 1 \N 1049 304 3 S 2006-01-09 11:09:16.170598-05 0.800000 0.497200 t 1 1 \N 1050 305 3 A 2006-01-09 11:19:10.13062-05 0.222200 0.250000 f 1 1 \N 1051 304 3 A 2006-01-09 11:21:28.843677-05 0.497200 0.525000 t 1 1 \N 1052 300 3 A 2006-01-09 11:21:28.843677-05 1.552200 1.580000 t 1 1 \N 1053 307 4 N 2006-01-09 14:15:52.779616-05 0.000000 0.308000 f 1 1 \N 1054 307 5 N 2006-01-09 14:15:52.779616-05 0.000000 0.030800 f 1 1 \N 1055 307 4 N 2006-01-09 14:15:52.779616-05 0.000000 0.110000 t 1 1 \N 1056 307 3 N 2006-01-09 14:15:52.779616-05 0.000000 1.580000 t 1 1 \N 1057 307 5 N 2006-01-09 14:15:52.779616-05 0.000000 0.011000 t 1 1 \N 1058 307 21 N 2006-01-09 14:15:52.779616-05 0.000000 0.002000 t 1 1 \N 1059 302 21 N 2006-01-11 12:35:21.550768-05 0.000000 1.000000 f 1 1 \N 1060 302 21 D 2006-01-11 12:35:29.219697-05 0.000000 0.000000 f 1 1 \N 1061 303 3 D 2006-01-11 12:46:50.155537-05 0.200000 0.000000 f 1 1 \N 1062 303 3 N 2006-01-11 12:47:12.614885-05 0.000000 1.000000 f 1 1 \N 1063 303 3 S 2006-01-11 12:47:12.620353-05 0.000000 1.000000 f 1 1 \N 1064 300 3 A 2006-01-11 12:48:52.129741-05 1.580000 4.780000 t 1 1 \N 1065 300 3 S 2006-01-11 12:49:16.098077-05 1.552200 4.780000 t 1 1 \N 1066 303 3 D 2006-01-11 12:49:44.044713-05 1.000000 0.000000 f 1 1 \N 1067 303 3 N 2006-01-11 12:49:52.020195-05 0.000000 0.250000 f 1 1 \N 1068 303 3 S 2006-01-11 12:49:52.026843-05 0.000000 0.250000 f 1 1 \N 1069 300 3 A 2006-01-11 12:50:56.088486-05 4.780000 1.780000 t 1 1 \N 1070 300 3 S 2006-01-11 12:52:21.332214-05 4.780000 1.780000 t 1 1 \N 1071 307 3 A 2006-01-11 12:53:52.066422-05 1.580000 1.780000 t 1 1 \N 1072 307 3 S 2006-01-11 12:54:07.767454-05 1.552200 1.780000 t 1 1 \N 1073 304 3 S 2006-01-11 12:54:07.767454-05 0.497200 0.525000 t 1 1 \N 1074 305 3 S 2006-01-11 12:54:07.767454-05 0.222200 0.250000 f 1 1 \N 1075 305 3 D 2006-01-11 13:13:41.26543-05 0.250000 0.000000 f 1 1 \N 1076 305 3 N 2006-01-11 13:13:48.983654-05 0.000000 0.470000 f 1 1 \N 1077 304 3 A 2006-01-11 13:14:04.838334-05 0.525000 0.745000 t 1 1 \N 1078 300 3 A 2006-01-11 13:14:04.838334-05 1.780000 2.000000 t 1 1 \N 1079 307 3 A 2006-01-11 13:14:04.838334-05 1.780000 2.000000 t 1 1 \N 1080 300 3 S 2006-01-11 13:14:21.026722-05 1.780000 2.000000 t 1 1 \N 1081 307 3 S 2006-01-11 13:14:21.026722-05 1.780000 2.000000 t 1 1 \N 1082 304 3 S 2006-01-11 13:14:21.026722-05 0.525000 0.745000 t 1 1 \N 1083 305 3 S 2006-01-11 13:14:21.026722-05 0.000000 0.470000 f 1 1 \N 1084 303 3 A 2006-01-12 13:54:19.301839-05 0.250000 1.000000 f 1 1 \N 1085 303 3 D 2006-01-13 10:54:29.566103-05 0.250000 0.000000 f 1 1 \N 1086 303 3 N 2006-01-13 10:54:38.906648-05 0.000000 0.250000 f 1 1 \N 1087 303 3 S 2006-01-13 10:54:38.98854-05 0.000000 0.250000 f 1 1 \N 1088 305 3 A 2006-01-13 11:42:26.339065-05 0.470000 0.250000 f 1 1 \N 1089 304 3 A 2006-01-13 13:08:14.812-05 0.745000 0.525000 t 1 1 \N 1090 307 3 A 2006-01-13 13:08:14.812-05 2.000000 1.780000 t 1 1 \N 1091 300 3 A 2006-01-13 13:08:14.812-05 2.000000 1.780000 t 1 1 \N 1092 305 3 A 2006-01-30 17:19:21.491066-05 0.250000 1.000000 f 1 1 \N 1093 305 3 A 2006-01-31 16:22:28.64-05 1.000000 0.250000 f 1 1 \N 1094 305 3 A 2006-07-05 09:04:55.16-04 0.250000 0.500000 f 1 1 \N 1095 305 3 A 2006-07-05 13:11:06.113-04 0.500000 0.250000 f 1 1 \N 1096 309 4 N 2006-08-02 08:22:37.703-04 0.000000 0.110000 f 1 1 \N 1097 309 5 N 2006-08-02 08:22:37.703-04 0.000000 0.011000 f 1 1 \N 1098 309 3 N 2006-08-02 08:22:37.703-04 0.000000 0.525000 t 1 1 \N 1099 303 3 A 2006-10-11 10:46:51.597-04 0.250000 1.000000 f 1 2 \N 1100 310 4 N 2006-10-13 14:44:48.628-04 0.000000 0.308000 f 1 1 \N 1101 310 5 N 2006-10-13 14:44:48.628-04 0.000000 0.030800 f 1 1 \N 1102 310 4 N 2006-10-13 14:44:48.628-04 0.000000 0.110000 t 1 1 \N 1103 310 3 N 2006-10-13 14:44:48.628-04 0.000000 1.780000 t 1 1 \N 1104 310 5 N 2006-10-13 14:44:48.628-04 0.000000 0.011000 t 1 1 \N 1105 310 21 N 2006-10-13 14:44:48.628-04 0.000000 0.002000 t 1 1 \N 1106 311 4 N 2006-10-13 14:49:37.097-04 0.000000 0.308000 f 1 1 \N 1107 311 5 N 2006-10-13 14:49:37.097-04 0.000000 0.030800 f 1 1 \N 1108 311 4 N 2006-10-13 14:49:37.097-04 0.000000 0.110000 t 1 1 \N 1109 311 3 N 2006-10-13 14:49:37.097-04 0.000000 1.780000 t 1 1 \N 1110 311 5 N 2006-10-13 14:49:37.097-04 0.000000 0.011000 t 1 1 \N 1111 311 21 N 2006-10-13 14:49:37.097-04 0.000000 0.002000 t 1 1 \N 1112 307 3 A 2006-10-13 14:55:43.503-04 1.780000 5.920000 t 1 1 \N 1113 300 3 A 2006-10-13 14:55:43.503-04 1.780000 5.920000 t 1 1 \N 1114 310 3 A 2006-10-13 14:55:43.503-04 1.780000 5.920000 t 1 1 \N 1115 311 3 A 2006-10-13 14:55:43.503-04 1.780000 5.920000 t 1 1 \N 1116 305 3 S 2006-10-13 14:55:52.613-04 0.470000 0.250000 f 1 1 \N 1117 309 3 S 2006-10-13 14:55:52.613-04 0.745000 0.525000 t 1 1 \N 1118 304 3 S 2006-10-13 14:55:52.613-04 0.745000 0.525000 t 1 1 \N 1119 307 3 S 2006-10-13 14:55:52.613-04 2.000000 1.780000 t 1 1 \N 1120 300 3 S 2006-10-13 14:55:52.613-04 2.000000 1.780000 t 1 1 \N 1121 310 3 S 2006-10-13 14:55:52.613-04 2.000000 1.780000 t 1 1 \N 1122 311 3 S 2006-10-13 14:55:52.613-04 2.000000 1.780000 t 1 1 \N 1123 303 3 S 2006-10-13 14:55:52.613-04 0.250000 1.285000 f 1 1 \N 1124 311 3 S 2006-10-13 14:55:52.613-04 1.780000 5.920000 t 1 1 \N 1125 310 3 S 2006-10-13 14:55:52.613-04 1.780000 5.920000 t 1 1 \N 1126 307 3 S 2006-10-13 14:55:52.613-04 1.780000 5.920000 t 1 1 \N 1127 300 3 S 2006-10-13 14:55:52.613-04 1.780000 5.920000 t 1 1 \N 1128 305 3 A 2006-10-13 15:30:35.066-04 0.250000 0.330000 f 1 1 \N 1129 309 3 A 2006-10-25 10:41:40.5-04 0.525000 0.605000 t 1 1 \N 1130 304 3 A 2006-10-25 10:41:40.5-04 0.525000 0.605000 t 1 1 \N 1131 307 3 A 2006-10-25 10:41:40.5-04 5.920000 6.000000 t 1 1 \N 1132 300 3 A 2006-10-25 10:41:40.5-04 5.920000 6.000000 t 1 1 \N 1133 310 3 A 2006-10-25 10:41:40.5-04 5.920000 6.000000 t 1 1 \N 1134 311 3 A 2006-10-25 10:41:40.5-04 5.920000 6.000000 t 1 1 \N 1135 300 4 A 2006-10-25 10:41:40.5-04 0.308000 0.304000 f 1 1 \N 1136 300 5 A 2006-10-25 10:41:40.5-04 0.030800 0.030400 f 1 1 \N 1137 305 3 A 2006-12-28 11:23:35.312-05 0.330000 1.000000 f 1 1 \N 1138 303 3 A 2006-12-28 11:23:39.39-05 1.000000 0.250000 f 2 2 \N 1139 305 3 A 2007-02-20 08:28:31.907-05 1.000000 0.250000 f 1 1 \N 1140 314 3 N 2007-05-24 16:40:05.656-04 0.000000 0.250000 f 1 1 \N 1141 316 4 N 2007-05-24 16:53:05.453-04 0.000000 0.304000 f 1 1 \N 1142 316 5 N 2007-05-24 16:53:05.453-04 0.000000 0.030400 f 1 1 \N 1143 316 4 N 2007-05-24 16:53:05.453-04 0.000000 0.110000 t 1 1 \N 1144 316 3 N 2007-05-24 16:53:05.453-04 0.000000 6.000000 t 1 1 \N 1145 316 5 N 2007-05-24 16:53:05.453-04 0.000000 0.011000 t 1 1 \N 1146 316 21 N 2007-05-24 16:53:05.453-04 0.000000 0.002000 t 1 1 \N 1147 314 3 A 2007-05-24 17:00:51.203-04 0.250000 1.000000 f 1 1 \N 1148 314 3 S 2007-05-24 17:00:51.218-04 0.250000 1.000000 f 1 1 \N 1149 304 3 A 2007-05-24 17:06:25.656-04 0.605000 0.525000 t 1 1 \N 1150 309 3 A 2007-05-24 17:06:25.656-04 0.605000 0.525000 t 1 1 \N 1151 307 3 A 2007-05-24 17:06:25.656-04 6.000000 2.065000 t 1 1 \N 1152 300 3 A 2007-05-24 17:06:25.656-04 6.000000 2.065000 t 1 1 \N 1153 310 3 A 2007-05-24 17:06:25.656-04 6.000000 2.065000 t 1 1 \N 1154 311 3 A 2007-05-24 17:06:25.656-04 6.000000 2.065000 t 1 1 \N 1155 316 3 A 2007-05-24 17:06:25.656-04 6.000000 2.065000 t 1 1 \N 1156 313 3 N 2007-05-24 17:06:25.656-04 0.000000 1.000000 t 1 1 \N 1157 313 4 N 2007-05-24 17:06:25.656-04 0.000000 0.300000 f 1 1 \N 1158 313 5 N 2007-05-24 17:06:25.656-04 0.000000 0.030000 f 1 1 \N 1159 313 3 S 2007-05-24 17:06:41.609-04 0.000000 1.000000 t 1 1 \N 1160 313 4 S 2007-05-24 17:06:41.609-04 0.000000 0.300000 f 1 1 \N 1161 313 5 S 2007-05-24 17:06:41.609-04 0.000000 0.030000 f 1 1 \N 1162 315 3 N 2007-05-26 20:18:46.359-04 0.000000 1.000000 f 1 1 \N 1163 315 3 S 2007-05-26 20:18:46.796-04 0.000000 1.000000 f 1 1 \N 1164 317 3 N 2007-05-26 20:28:57.921-04 0.000000 0.250000 f 1 1 \N 1165 307 3 A 2007-05-26 20:32:31.39-04 2.065000 4.065000 t 1 1 \N 1166 307 4 A 2007-05-26 20:32:31.39-04 0.110000 0.710000 t 1 1 \N 1167 307 5 A 2007-05-26 20:32:31.39-04 0.011000 0.071000 t 1 1 \N 1168 310 3 A 2007-05-26 20:32:31.39-04 2.065000 4.065000 t 1 1 \N 1169 310 4 A 2007-05-26 20:32:31.39-04 0.110000 0.710000 t 1 1 \N 1170 310 5 A 2007-05-26 20:32:31.39-04 0.011000 0.071000 t 1 1 \N 1171 311 3 A 2007-05-26 20:32:31.39-04 2.065000 4.065000 t 1 1 \N 1172 311 4 A 2007-05-26 20:32:31.39-04 0.110000 0.710000 t 1 1 \N 1173 311 5 A 2007-05-26 20:32:31.39-04 0.011000 0.071000 t 1 1 \N 1174 323 3 N 2007-05-26 21:08:30.906-04 0.000000 5.000000 f 1 1 \N 1175 323 3 S 2007-05-26 21:08:30.937-04 0.000000 5.000000 f 1 1 \N 1176 325 3 N 2007-05-26 21:13:11.031-04 0.000000 0.500000 f 1 1 \N 1177 325 21 N 2007-05-26 21:13:11.031-04 0.000000 0.200000 f 1 1 \N 1178 301 3 A 2007-05-26 21:19:38.765-04 0.500000 1.500000 f 1 1 \N 1179 301 3 S 2007-05-26 21:19:38.796-04 0.500000 1.500000 f 1 1 \N 1180 325 3 A 2007-05-26 21:19:57.968-04 0.500000 2.000000 f 1 1 \N 1181 325 3 S 2007-05-26 21:19:57.984-04 0.500000 2.000000 f 1 1 \N 1182 307 3 A 2007-05-26 21:22:48.359-04 4.065000 4.075000 t 1 1 \N 1183 300 3 A 2007-05-26 21:22:48.359-04 2.065000 2.075000 t 1 1 \N 1184 310 3 A 2007-05-26 21:22:48.359-04 4.065000 4.075000 t 1 1 \N 1185 311 3 A 2007-05-26 21:22:48.359-04 4.065000 4.075000 t 1 1 \N 1186 316 3 A 2007-05-26 21:22:48.359-04 2.065000 2.075000 t 1 1 \N 1187 319 3 N 2007-05-26 21:22:48.359-04 0.000000 5.000000 t 1 1 \N 1188 319 4 N 2007-05-26 21:22:48.359-04 0.000000 0.020000 f 1 1 \N 1189 319 5 N 2007-05-26 21:22:48.359-04 0.000000 0.029500 f 1 1 \N 1190 322 3 N 2007-05-26 21:22:48.359-04 0.000000 1.000000 t 1 1 \N 1191 322 4 N 2007-05-26 21:22:48.359-04 0.000000 0.004000 t 1 1 \N 1192 322 5 N 2007-05-26 21:22:48.359-04 0.000000 0.005900 t 1 1 \N 1193 324 21 N 2007-05-26 21:23:27.125-04 0.000000 1.250000 f 1 1 \N 1194 324 21 S 2007-05-26 21:23:27.14-04 0.000000 1.250000 f 1 1 \N 1195 321 3 N 2007-05-26 21:23:56.453-04 0.000000 0.750000 t 1 1 \N 1196 321 4 N 2007-05-26 21:23:56.453-04 0.000000 0.003000 t 1 1 \N 1197 321 5 N 2007-05-26 21:23:56.453-04 0.000000 0.004400 t 1 1 \N 1198 321 21 N 2007-05-26 21:23:56.453-04 0.000000 0.281300 t 1 1 \N 1199 316 3 A 2007-05-26 21:23:56.453-04 2.075000 5.075000 t 1 1 \N 1200 316 4 A 2007-05-26 21:23:56.453-04 0.110000 0.122000 t 1 1 \N 1201 316 5 A 2007-05-26 21:23:56.453-04 0.011000 0.028600 t 1 1 \N 1202 316 21 A 2007-05-26 21:23:56.453-04 0.002000 1.127200 t 1 1 \N 1203 322 21 N 2007-05-26 21:23:56.453-04 0.000000 0.375000 t 1 1 \N 1204 306 3 A 2007-05-30 08:47:42.218-04 0.250000 0.500000 f 1 1 \N 1205 325 3 A 2007-05-30 08:47:46.078-04 2.000000 2.800000 f 1 1 \N 1206 305 3 A 2007-05-30 08:47:48.406-04 0.250000 0.008800 f 1 2 \N 1207 305 3 A 2007-05-30 11:22:42.726706-04 0.008800 0.233500 f 2 2 \N 1208 305 3 A 2007-08-31 10:53:38.343-04 0.233500 0.250000 f 2 1 \N 1209 306 3 A 2007-12-14 12:44:31.218-05 0.500000 0.250000 f 1 1 \N 1210 305 3 A 2007-12-14 12:44:32.234-05 0.250000 0.233500 f 1 2 \N 1211 328 4 N 2008-03-04 11:57:10.512315-05 0.000000 0.304000 f 1 1 \N 1212 328 5 N 2008-03-04 11:57:10.512315-05 0.000000 0.030400 f 1 1 \N 1213 328 4 N 2008-03-04 11:57:10.512315-05 0.000000 0.110000 t 1 1 \N 1214 328 3 N 2008-03-04 11:57:10.512315-05 0.000000 2.075000 t 1 1 \N 1215 328 5 N 2008-03-04 11:57:10.512315-05 0.000000 0.011000 t 1 1 \N 1216 328 21 N 2008-03-04 11:57:10.512315-05 0.000000 0.002000 t 1 1 \N 1217 328 21 N 2008-03-04 12:15:31.268135-05 0.000000 10.000000 f 1 1 \N 1218 328 21 S 2008-03-04 12:15:31.3095-05 0.000000 10.000000 f 1 1 \N 1219 305 3 A 2008-03-04 13:47:46.151101-05 0.233500 0.250000 f 2 1 \N 1220 305 3 A 2008-03-04 15:02:11.642193-05 0.250000 0.233500 f 1 2 \N 1221 305 3 A 2008-03-05 13:45:49.678937-05 0.233500 0.250000 f 2 1 \N 1222 303 3 A 2008-04-04 08:54:16.448766-04 0.250000 0.100000 f 2 1 \N 1223 301 3 A 2008-04-04 08:54:16.448766-04 1.500000 0.720000 f 1 1 \N 1224 301 21 A 2008-04-04 08:54:16.448766-04 0.200000 0.080000 f 1 1 \N 1225 325 3 A 2008-06-12 11:04:13.254999-04 2.800000 9.000000 f 1 2 \N 1226 325 21 A 2008-06-12 11:04:13.254999-04 0.200000 1.000000 f 1 2 \N 1227 329 3 N 2008-06-12 12:51:58.151009-04 0.000000 0.005000 f 1 1 \N 1228 329 3 S 2008-06-12 12:51:58.314508-04 0.000000 0.005000 f 1 1 \N 1229 330 3 N 2008-06-12 12:55:03.3516-04 0.000000 0.005000 f 1 1 \N 1230 330 3 S 2008-06-12 12:55:03.439255-04 0.000000 0.005000 f 1 1 \N 1231 331 4 N 2008-06-12 12:55:26.036862-04 0.000000 0.304000 f 1 1 \N 1232 331 5 N 2008-06-12 12:55:26.036862-04 0.000000 0.030400 f 1 1 \N 1233 331 4 N 2008-06-12 12:55:26.036862-04 0.000000 0.110000 t 1 1 \N 1234 331 3 N 2008-06-12 12:55:26.036862-04 0.000000 2.075000 t 1 1 \N 1235 331 5 N 2008-06-12 12:55:26.036862-04 0.000000 0.011000 t 1 1 \N 1236 331 21 N 2008-06-12 12:55:26.036862-04 0.000000 0.002000 t 1 1 \N 1237 331 4 A 2008-06-12 12:56:48.424849-04 0.304000 0.000000 f 1 1 \N 1238 331 5 A 2008-06-12 12:56:48.424849-04 0.030400 0.000000 f 1 1 \N 1239 331 4 A 2008-06-12 12:56:48.424849-04 0.110000 0.000000 t 1 1 \N 1240 331 3 A 2008-06-12 12:56:48.424849-04 2.075000 0.000000 t 1 1 \N 1241 331 5 A 2008-06-12 12:56:48.424849-04 0.011000 0.000000 t 1 1 \N 1242 331 21 A 2008-06-12 12:56:48.424849-04 0.002000 0.000000 t 1 1 \N 1243 332 3 N 2008-06-12 13:19:22.241912-04 0.000000 20.000000 f 1 1 \N 1244 332 3 S 2008-06-12 13:19:22.303051-04 0.000000 20.000000 f 1 1 \N 1245 309 3 A 2008-06-12 13:20:31.606779-04 0.525000 0.750000 t 1 1 \N 1246 304 3 A 2008-06-12 13:20:31.606779-04 0.525000 0.750000 t 1 1 \N 1247 316 3 A 2008-06-12 13:20:31.606779-04 5.075000 5.407200 t 1 1 \N 1248 316 4 A 2008-06-12 13:20:31.606779-04 0.122000 0.422000 t 1 1 \N 1249 316 5 A 2008-06-12 13:20:31.606779-04 0.028600 0.058600 t 1 1 \N 1250 316 21 A 2008-06-12 13:20:31.606779-04 1.127200 1.126000 t 1 1 \N 1251 311 3 A 2008-06-12 13:20:31.606779-04 4.075000 1.407200 t 1 1 \N 1252 311 4 A 2008-06-12 13:20:31.606779-04 0.710000 0.110000 t 1 1 \N 1253 311 5 A 2008-06-12 13:20:31.606779-04 0.071000 0.011000 t 1 1 \N 1254 311 21 A 2008-06-12 13:20:31.606779-04 0.002000 0.000800 t 1 1 \N 1255 307 3 A 2008-06-12 13:20:31.606779-04 4.075000 1.407200 t 1 1 \N 1256 307 4 A 2008-06-12 13:20:31.606779-04 0.710000 0.110000 t 1 1 \N 1257 307 5 A 2008-06-12 13:20:31.606779-04 0.071000 0.011000 t 1 1 \N 1258 307 21 A 2008-06-12 13:20:31.606779-04 0.002000 0.000800 t 1 1 \N 1259 310 3 A 2008-06-12 13:20:31.606779-04 4.075000 1.407200 t 1 1 \N 1260 310 4 A 2008-06-12 13:20:31.606779-04 0.710000 0.110000 t 1 1 \N 1261 310 5 A 2008-06-12 13:20:31.606779-04 0.071000 0.011000 t 1 1 \N 1262 310 21 A 2008-06-12 13:20:31.606779-04 0.002000 0.000800 t 1 1 \N 1263 300 3 A 2008-06-12 13:20:31.606779-04 2.075000 1.407200 t 1 1 \N 1264 300 21 A 2008-06-12 13:20:31.606779-04 0.002000 0.000800 t 1 1 \N 1265 328 3 A 2008-06-12 13:20:31.606779-04 2.075000 1.407200 t 1 1 \N 1266 328 21 A 2008-06-12 13:20:31.606779-04 0.002000 0.000800 t 1 1 \N 1267 313 3 A 2008-06-12 13:20:31.606779-04 1.000000 2.000000 t 1 1 \N 1268 316 3 A 2008-06-12 13:20:31.606779-04 5.407200 6.407200 t 1 1 \N 1269 309 3 S 2008-06-12 13:20:44.562889-04 0.525000 0.750000 t 1 1 \N 1270 304 3 S 2008-06-12 13:20:44.562889-04 0.525000 0.750000 t 1 1 \N 1271 316 3 S 2008-06-12 13:20:44.562889-04 5.920000 7.155000 t 1 1 \N 1272 316 4 S 2008-06-12 13:20:44.562889-04 0.110000 0.410000 t 1 1 \N 1273 316 5 S 2008-06-12 13:20:44.562889-04 0.011000 0.041000 t 1 1 \N 1274 311 3 S 2008-06-12 13:20:44.562889-04 5.920000 6.155000 t 1 1 \N 1275 307 3 S 2008-06-12 13:20:44.562889-04 5.920000 6.155000 t 1 1 \N 1276 310 3 S 2008-06-12 13:20:44.562889-04 5.920000 6.155000 t 1 1 \N 1277 300 3 S 2008-06-12 13:20:44.562889-04 5.920000 6.155000 t 1 1 \N 1278 328 3 S 2008-06-12 13:20:44.562889-04 5.920000 6.155000 t 1 1 \N 1279 331 3 D 2008-06-12 13:20:44.562889-04 5.920000 0.000000 t 1 1 \N 1280 331 4 D 2008-06-12 13:20:44.562889-04 0.110000 0.000000 t 1 1 \N 1281 331 5 D 2008-06-12 13:20:44.562889-04 0.011000 0.000000 t 1 1 \N 1282 313 3 S 2008-06-12 13:20:44.562889-04 1.000000 2.000000 t 1 1 \N 1283 316 3 S 2008-06-12 13:20:44.562889-04 7.155000 8.155000 t 1 1 \N 1284 303 3 S 2008-06-12 13:20:44.562889-04 1.285000 0.100000 f 1 1 \N 1285 316 3 S 2008-06-12 13:20:44.562889-04 8.155000 3.415000 t 1 1 \N 1286 311 3 S 2008-06-12 13:20:44.562889-04 6.155000 1.415000 t 1 1 \N 1287 307 3 S 2008-06-12 13:20:44.562889-04 6.155000 1.415000 t 1 1 \N 1288 310 3 S 2008-06-12 13:20:44.562889-04 6.155000 1.415000 t 1 1 \N 1289 300 3 S 2008-06-12 13:20:44.562889-04 6.155000 1.415000 t 1 1 \N 1290 328 3 S 2008-06-12 13:20:44.562889-04 6.155000 1.415000 t 1 1 \N 1291 301 3 S 2008-06-12 13:20:44.562889-04 1.500000 0.720000 f 1 1 \N 1292 301 21 S 2008-06-12 13:20:44.562889-04 0.200000 0.080000 f 1 1 \N 1293 316 3 S 2008-06-12 13:20:44.562889-04 3.415000 3.407200 t 1 1 \N 1294 316 21 S 2008-06-12 13:20:44.562889-04 0.002000 0.000800 t 1 1 \N 1295 311 3 S 2008-06-12 13:20:44.562889-04 1.415000 1.407200 t 1 1 \N 1296 311 21 S 2008-06-12 13:20:44.562889-04 0.002000 0.000800 t 1 1 \N 1297 307 3 S 2008-06-12 13:20:44.562889-04 1.415000 1.407200 t 1 1 \N 1298 307 21 S 2008-06-12 13:20:44.562889-04 0.002000 0.000800 t 1 1 \N 1299 310 3 S 2008-06-12 13:20:44.562889-04 1.415000 1.407200 t 1 1 \N 1300 310 21 S 2008-06-12 13:20:44.562889-04 0.002000 0.000800 t 1 1 \N 1301 300 3 S 2008-06-12 13:20:44.562889-04 1.415000 1.407200 t 1 1 \N 1302 300 21 S 2008-06-12 13:20:44.562889-04 0.002000 0.000800 t 1 1 \N 1303 328 3 S 2008-06-12 13:20:44.562889-04 1.415000 1.407200 t 1 1 \N 1304 328 21 S 2008-06-12 13:20:44.562889-04 0.002000 0.000800 t 1 1 \N 1305 321 3 S 2008-06-12 13:20:44.562889-04 0.000000 0.750000 t 1 1 \N 1306 321 4 S 2008-06-12 13:20:44.562889-04 0.000000 0.003000 t 1 1 \N 1307 321 5 S 2008-06-12 13:20:44.562889-04 0.000000 0.004400 t 1 1 \N 1308 321 21 S 2008-06-12 13:20:44.562889-04 0.000000 0.281300 t 1 1 \N 1309 316 3 S 2008-06-12 13:20:44.562889-04 3.407200 6.407200 t 1 1 \N 1310 316 4 S 2008-06-12 13:20:44.562889-04 0.410000 0.422000 t 1 1 \N 1311 316 5 S 2008-06-12 13:20:44.562889-04 0.041000 0.058600 t 1 1 \N 1312 316 21 S 2008-06-12 13:20:44.562889-04 0.000800 1.126000 t 1 1 \N 1313 319 3 S 2008-06-12 13:20:44.562889-04 0.000000 5.000000 t 1 1 \N 1314 325 3 S 2008-06-12 13:20:44.562889-04 2.000000 13.410000 f 1 1 \N 1315 325 21 S 2008-06-12 13:20:44.562889-04 0.200000 1.490000 f 1 1 \N 1316 316 4 S 2008-06-12 13:20:44.562889-04 0.308000 0.304000 f 1 1 \N 1317 316 5 S 2008-06-12 13:20:44.562889-04 0.030800 0.030400 f 1 1 \N 1318 300 4 S 2008-06-12 13:20:44.562889-04 0.308000 0.304000 f 1 1 \N 1319 300 5 S 2008-06-12 13:20:44.562889-04 0.030800 0.030400 f 1 1 \N 1320 328 4 S 2008-06-12 13:20:44.562889-04 0.308000 0.304000 f 1 1 \N 1321 328 5 S 2008-06-12 13:20:44.562889-04 0.030800 0.030400 f 1 1 \N 1322 322 3 S 2008-06-12 13:20:44.562889-04 0.000000 1.000000 t 1 1 \N 1323 322 4 S 2008-06-12 13:20:44.562889-04 0.000000 0.004000 t 1 1 \N 1324 322 5 S 2008-06-12 13:20:44.562889-04 0.000000 0.005900 t 1 1 \N 1325 322 21 S 2008-06-12 13:20:44.562889-04 0.000000 0.375000 t 1 1 \N 1326 319 4 S 2008-06-12 13:20:44.562889-04 0.000000 0.020000 f 1 1 \N 1327 319 5 S 2008-06-12 13:20:44.562889-04 0.000000 0.029500 f 1 1 \N 1328 331 4 D 2008-06-12 13:20:44.562889-04 0.308000 0.000000 f 1 1 \N 1329 331 5 D 2008-06-12 13:20:44.562889-04 0.030800 0.000000 f 1 1 \N 1330 331 21 D 2008-06-12 13:20:44.562889-04 0.002000 0.000000 t 1 1 \N 1331 332 3 A 2008-06-12 14:28:26.6468-04 20.000000 12.000000 f 1 1 \N 1332 330 3 A 2008-06-12 15:34:57.86443-04 0.005000 0.002500 f 1 2 \N 1333 329 3 A 2008-06-12 15:34:57.86443-04 0.005000 0.002500 f 1 2 \N 1334 302 3 A 2008-06-19 16:37:24.836039-04 0.250000 1.000000 f 1 1 \N 1335 305 3 A 2008-06-19 16:37:24.836039-04 0.250000 0.200000 f 1 1 \N 1336 323 3 A 2008-06-19 17:11:17.478443-04 5.000000 1.250000 f 1 1 \N 1337 309 3 A 2008-06-20 09:38:31.422606-04 0.750000 0.700000 t 1 1 \N 1338 304 3 A 2008-06-20 09:38:31.422606-04 0.750000 0.700000 t 1 1 \N 1339 311 3 A 2008-06-20 09:38:31.422606-04 1.407200 2.107200 t 1 1 \N 1340 307 3 A 2008-06-20 09:38:31.422606-04 1.407200 2.107200 t 1 1 \N 1341 310 3 A 2008-06-20 09:38:31.422606-04 1.407200 2.107200 t 1 1 \N 1342 300 3 A 2008-06-20 09:38:31.422606-04 1.407200 2.107200 t 1 1 \N 1343 316 3 A 2008-06-20 09:38:31.422606-04 6.407200 6.357200 t 1 1 \N 1344 328 3 A 2008-06-20 09:38:31.422606-04 1.407200 2.107200 t 1 1 \N 1345 319 3 A 2008-06-20 09:38:31.422606-04 5.000000 1.250000 t 1 1 \N 1346 322 3 A 2008-06-20 09:38:31.422606-04 1.000000 0.250000 t 1 1 \N 1347 305 3 S 2008-06-20 09:39:08.545014-04 0.250000 0.200000 f 1 1 \N 1348 309 3 S 2008-06-20 09:39:08.545014-04 0.750000 0.700000 t 1 1 \N 1349 304 3 S 2008-06-20 09:39:08.545014-04 0.750000 0.700000 t 1 1 \N 1350 311 3 S 2008-06-20 09:39:08.545014-04 1.407200 1.357200 t 1 1 \N 1351 307 3 S 2008-06-20 09:39:08.545014-04 1.407200 1.357200 t 1 1 \N 1352 310 3 S 2008-06-20 09:39:08.545014-04 1.407200 1.357200 t 1 1 \N 1353 300 3 S 2008-06-20 09:39:08.545014-04 1.407200 1.357200 t 1 1 \N 1354 316 3 S 2008-06-20 09:39:08.545014-04 6.407200 6.357200 t 1 1 \N 1355 328 3 S 2008-06-20 09:39:08.545014-04 1.407200 1.357200 t 1 1 \N 1356 302 3 S 2008-06-20 09:39:08.545014-04 0.250000 1.000000 f 1 1 \N 1357 311 3 S 2008-06-20 09:39:08.545014-04 1.357200 2.107200 t 1 1 \N 1358 307 3 S 2008-06-20 09:39:08.545014-04 1.357200 2.107200 t 1 1 \N 1359 310 3 S 2008-06-20 09:39:08.545014-04 1.357200 2.107200 t 1 1 \N 1360 300 3 S 2008-06-20 09:39:08.545014-04 1.357200 2.107200 t 1 1 \N 1361 328 3 S 2008-06-20 09:39:08.545014-04 1.357200 2.107200 t 1 1 \N 1362 323 3 S 2008-06-20 09:39:08.545014-04 5.000000 1.250000 f 1 1 \N 1363 319 3 S 2008-06-20 09:39:08.545014-04 5.000000 1.250000 t 1 1 \N 1364 332 3 S 2008-06-20 09:39:08.545014-04 20.000000 12.000000 f 1 1 \N 1365 329 3 S 2008-06-20 09:39:08.545014-04 0.005000 0.003700 f 1 1 \N 1366 330 3 S 2008-06-20 09:39:08.545014-04 0.005000 0.003700 f 1 1 \N 1367 322 3 S 2008-06-20 09:39:08.545014-04 1.000000 0.250000 t 1 1 \N 1368 305 3 A 2008-06-20 12:33:31.399563-04 0.200000 0.250000 f 1 1 \N 1369 307 3 A 2008-09-08 17:07:31.833994-04 2.107200 10.000000 t 1 1 \N 1370 307 3 A 2008-09-24 16:35:56.675593-04 10.000000 5.500000 t 1 1 \N 1371 301 3 A 2008-09-24 16:36:14.080239-04 0.720000 10.000000 f 1 1 \N 1372 301 21 A 2008-09-24 16:36:14.080239-04 0.080000 1.000000 f 1 1 \N 1373 307 3 A 2008-10-02 10:32:29.745834-04 5.500000 8.000000 t 1 2 \N 1374 311 3 A 2008-10-02 10:32:29.745834-04 2.107200 5.000000 t 1 2 \N 1375 310 3 A 2008-10-02 10:32:29.745834-04 2.107200 6.000000 t 1 2 \N 1376 316 3 A 2008-12-31 15:00:40.220306-05 6.357200 10.000000 t 1 1 \N 1377 301 3 A 2009-01-06 15:40:08.600704-05 10.000000 0.820000 f 1 1 \N 1378 301 21 A 2009-01-06 15:40:18.265083-05 1.000000 0.080000 f 1 1 \N 1379 309 3 A 2009-01-06 15:41:25.407379-05 0.700000 0.750000 t 1 1 \N 1380 304 3 A 2009-01-06 15:41:25.407379-05 0.700000 0.750000 t 1 1 \N 1381 311 3 A 2009-01-06 15:41:25.407379-05 5.000000 2.158200 t 2 1 \N 1382 310 3 A 2009-01-06 15:41:25.407379-05 6.000000 2.158200 t 2 1 \N 1383 316 3 A 2009-01-06 15:41:25.407379-05 10.000000 6.408200 t 1 1 \N 1384 328 3 A 2009-01-06 15:41:25.407379-05 2.107200 2.158200 t 1 1 \N 1385 307 3 A 2009-01-06 15:41:25.407379-05 8.000000 2.158200 t 2 1 \N 1386 300 3 A 2009-01-06 15:41:25.407379-05 2.107200 2.158200 t 1 1 \N 1387 321 3 A 2009-01-06 15:41:25.407379-05 0.750000 0.187500 t 1 1 \N 1388 321 5 A 2009-01-06 15:41:25.407379-05 0.004400 0.004425 t 1 1 \N 1389 321 21 A 2009-01-06 15:41:25.407379-05 0.281300 0.281250 t 1 1 \N 1390 316 3 A 2009-01-06 15:41:25.407379-05 6.408200 4.158200 t 1 1 \N 1391 316 5 A 2009-01-06 15:41:25.407379-05 0.058600 0.058700 t 1 1 \N 1392 316 21 A 2009-01-06 15:41:25.407379-05 1.126000 1.125800 t 1 1 \N 1393 307 3 A 2009-01-12 13:16:07.741834-05 2.158200 2.660000 t 1 1 \N 1394 310 3 A 2009-01-12 13:16:07.741834-05 2.158200 2.660000 t 1 1 \N 1395 311 3 A 2009-01-12 13:16:07.741834-05 2.158200 2.660000 t 1 1 \N 1396 302 3 A 2009-06-26 15:47:39.989708-04 1.000000 1.000000 f 1 2 admin 1397 306 3 A 2009-06-26 15:47:39.989708-04 0.250000 1.000000 f 1 2 admin 1398 305 3 A 2009-06-26 16:06:32.570333-04 0.250000 0.200000 f 1 1 admin 1399 306 3 A 2009-08-13 08:47:32.10043-04 1.000000 0.250000 f 2 1 admin 1400 302 3 A 2009-08-13 08:47:32.10043-04 1.000000 1.000000 f 2 1 admin 1401 301 3 A 2009-08-13 08:47:32.10043-04 0.820000 0.720000 f 1 1 admin 1405 305 3 A 2009-09-16 14:04:15.939989-04 0.200000 0.250000 f 1 1 jsmith 1406 335 3 N 2009-09-16 14:10:16.323759-04 0.000000 0.720000 f 1 1 jsmith 1407 335 21 N 2009-09-16 14:10:16.323759-04 0.000000 0.080000 f 1 1 jsmith 1408 336 3 N 2009-09-16 14:12:00.206195-04 0.000000 0.720000 f 1 1 jsmith 1409 336 21 N 2009-09-16 14:12:00.206195-04 0.000000 0.080000 f 1 1 jsmith 1410 337 3 N 2009-09-16 14:13:20.256624-04 0.000000 0.720000 f 1 1 jsmith 1411 337 21 N 2009-09-16 14:13:20.256624-04 0.000000 0.080000 f 1 1 jsmith 1412 336 3 A 2009-09-21 17:02:24.292967-04 0.720000 0.980000 f 1 1 admin 1413 335 3 A 2009-09-21 17:02:24.292967-04 0.720000 0.970000 f 1 1 admin 1414 337 3 A 2009-09-21 17:02:24.292967-04 0.720000 0.990000 f 1 1 admin 1415 305 3 A 2009-09-21 17:02:25.027666-04 0.250000 0.214300 f 1 2 admin 1416 301 3 A 2009-09-22 11:06:16.58104-04 0.720000 11.000000 f 1 1 jsmith 1417 301 3 A 2009-09-22 16:20:14.768952-04 11.000000 0.800000 f 1 1 admin 1418 311 3 A 2009-09-25 09:03:03.991423-04 2.660000 2.159800 t 1 1 jsmith 1419 311 3 S 2009-09-25 09:03:29.861828-04 2.107200 2.159800 t 1 1 jsmith 1420 300 3 A 2009-12-03 15:28:51.176031-05 2.158200 3.000000 t 1 1 admin 1421 305 3 A 2009-12-03 15:28:54.250883-05 0.214300 0.200000 f 2 1 admin 1422 301 3 A 2009-12-03 15:28:54.250883-05 0.800000 0.640000 f 1 1 admin 1423 301 21 A 2009-12-03 15:28:54.250883-05 0.080000 0.160000 f 1 1 admin 1424 301 3 A 2009-12-03 16:36:55.554566-05 0.640000 0.600000 f 1 1 admin 1425 301 21 A 2009-12-03 16:36:55.554566-05 0.160000 0.200000 f 1 1 admin 1426 341 3 N 2010-03-10 16:35:35.979382-05 0.000000 22.000000 f 1 1 admin 1427 341 3 S 2010-03-10 16:35:36.097069-05 0.000000 22.000000 f 1 1 admin 1428 328 3 A 2010-03-12 15:36:03.632315-05 2.158200 22.000000 t 1 1 admin 1429 344 3 N 2010-06-07 12:07:09.172259-04 0.000000 0.200000 f 1 1 admin 1430 345 4 N 2010-06-07 12:08:43.923103-04 0.000000 0.110000 f 1 1 admin 1431 345 5 N 2010-06-07 12:08:43.923103-04 0.000000 0.011000 f 1 1 admin 1432 345 3 N 2010-06-07 12:08:43.923103-04 0.000000 0.750000 t 1 1 admin 1433 305 3 A 2010-11-04 15:55:21.703133-04 0.200000 0.211300 f 1 2 admin 1434 322 3 A 2011-06-15 11:18:41.853161-04 0.250000 0.000000 t 1 1 admin 1435 322 4 A 2011-06-15 11:18:41.853161-04 0.004000 0.000000 t 1 1 admin 1436 322 5 A 2011-06-15 11:18:41.853161-04 0.005900 0.000000 t 1 1 admin 1437 322 21 A 2011-06-15 11:18:41.853161-04 0.375000 0.000000 t 1 1 admin 1438 321 3 A 2011-06-15 11:18:41.853161-04 0.187500 0.000000 t 1 1 admin 1439 321 4 A 2011-06-15 11:18:41.853161-04 0.003000 0.000000 t 1 1 admin 1440 321 5 A 2011-06-15 11:18:41.853161-04 0.004425 0.000000 t 1 1 admin 1441 321 21 A 2011-06-15 11:18:41.853161-04 0.281250 0.000000 t 1 1 admin 1442 324 21 A 2011-06-15 11:18:41.853161-04 1.250000 0.000000 f 1 1 admin 1443 319 4 A 2011-06-15 11:18:41.853161-04 0.020000 0.000000 f 1 1 admin 1444 319 5 A 2011-06-15 11:18:41.853161-04 0.029500 0.000000 f 1 1 admin 1445 319 3 A 2011-06-15 11:18:41.853161-04 1.250000 0.000000 t 1 1 admin 1446 304 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 f 1 1 admin 1447 304 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 f 1 1 admin 1448 313 4 D 2011-06-15 11:18:41.853161-04 0.300000 0.000000 f 1 1 admin 1449 313 5 D 2011-06-15 11:18:41.853161-04 0.030000 0.000000 f 1 1 admin 1450 310 4 D 2011-06-15 11:18:41.853161-04 0.308000 0.000000 f 1 1 admin 1451 310 5 D 2011-06-15 11:18:41.853161-04 0.030800 0.000000 f 1 1 admin 1452 310 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 t 1 1 admin 1453 310 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 t 1 1 admin 1454 307 4 D 2011-06-15 11:18:41.853161-04 0.308000 0.000000 f 1 1 admin 1455 307 5 D 2011-06-15 11:18:41.853161-04 0.030800 0.000000 f 1 1 admin 1456 307 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 t 1 1 admin 1457 307 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 t 1 1 admin 1458 309 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 f 1 1 admin 1459 309 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 f 1 1 admin 1460 316 4 D 2011-06-15 11:18:41.853161-04 0.304000 0.000000 f 1 1 admin 1461 316 5 D 2011-06-15 11:18:41.853161-04 0.030400 0.000000 f 1 1 admin 1462 316 4 D 2011-06-15 11:18:41.853161-04 0.422000 0.000000 t 1 1 admin 1463 316 5 D 2011-06-15 11:18:41.853161-04 0.058600 0.000000 t 1 1 admin 1464 328 4 D 2011-06-15 11:18:41.853161-04 0.304000 0.000000 f 1 1 admin 1465 328 5 D 2011-06-15 11:18:41.853161-04 0.030400 0.000000 f 1 1 admin 1466 328 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 t 1 1 admin 1467 328 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 t 1 1 admin 1468 300 4 D 2011-06-15 11:18:41.853161-04 0.304000 0.000000 f 1 1 admin 1469 300 5 D 2011-06-15 11:18:41.853161-04 0.030400 0.000000 f 1 1 admin 1470 300 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 t 1 1 admin 1471 300 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 t 1 1 admin 1472 334 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 f 1 1 admin 1473 334 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 f 1 1 admin 1474 311 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 t 1 1 admin 1475 311 4 D 2011-06-15 11:18:41.853161-04 0.308000 0.000000 f 1 1 admin 1476 311 5 D 2011-06-15 11:18:41.853161-04 0.030800 0.000000 f 1 1 admin 1477 311 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 t 1 1 admin 1478 345 4 D 2011-06-15 11:18:41.853161-04 0.110000 0.000000 f 1 1 admin 1479 345 5 D 2011-06-15 11:18:41.853161-04 0.011000 0.000000 f 1 1 admin 1480 322 4 D 2011-06-15 11:18:41.853161-04 0.004000 0.000000 t 1 1 admin 1481 322 5 D 2011-06-15 11:18:41.853161-04 0.005900 0.000000 t 1 1 admin 1482 321 4 D 2011-06-15 11:18:41.853161-04 0.003000 0.000000 t 1 1 admin 1483 321 5 D 2011-06-15 11:18:41.853161-04 0.004400 0.000000 t 1 1 admin 1484 319 4 D 2011-06-15 11:18:41.853161-04 0.020000 0.000000 f 1 1 admin 1485 319 5 D 2011-06-15 11:18:41.853161-04 0.029500 0.000000 f 1 1 admin 1486 304 3 D 2011-06-15 11:18:41.853161-04 0.700000 0.000000 t 1 1 admin 1487 313 3 D 2011-06-15 11:18:41.853161-04 2.000000 0.000000 t 1 1 admin 1488 310 21 D 2011-06-15 11:18:41.853161-04 0.000800 0.000000 t 1 1 admin 1489 307 21 D 2011-06-15 11:18:41.853161-04 0.000800 0.000000 t 1 1 admin 1490 309 3 D 2011-06-15 11:18:41.853161-04 0.700000 0.000000 t 1 1 admin 1491 316 3 D 2011-06-15 11:18:41.853161-04 6.357200 0.000000 t 1 1 admin 1492 316 21 D 2011-06-15 11:18:41.853161-04 1.126000 0.000000 t 1 1 admin 1493 328 21 D 2011-06-15 11:18:41.853161-04 0.000800 0.000000 t 1 1 admin 1494 300 21 D 2011-06-15 11:18:41.853161-04 0.000800 0.000000 t 1 1 admin 1495 307 3 D 2011-06-15 11:18:41.853161-04 2.107200 0.000000 t 1 1 admin 1496 310 3 D 2011-06-15 11:18:41.853161-04 2.107200 0.000000 t 1 1 admin 1497 334 3 D 2011-06-15 11:18:41.853161-04 0.700000 0.000000 t 1 1 admin 1498 311 3 D 2011-06-15 11:18:41.853161-04 2.159800 0.000000 t 1 1 admin 1499 311 21 D 2011-06-15 11:18:41.853161-04 0.000800 0.000000 t 1 1 admin 1500 328 3 D 2011-06-15 11:18:41.853161-04 2.107200 0.000000 t 1 1 admin 1501 345 3 D 2011-06-15 11:18:41.853161-04 0.700000 0.000000 t 1 1 admin 1502 300 3 D 2011-06-15 11:18:41.853161-04 2.107200 0.000000 t 1 1 admin 1503 322 3 D 2011-06-15 11:18:41.853161-04 0.250000 0.000000 t 1 1 admin 1504 322 21 D 2011-06-15 11:18:41.853161-04 0.375000 0.000000 t 1 1 admin 1505 321 3 D 2011-06-15 11:18:41.853161-04 0.750000 0.000000 t 1 1 admin 1506 321 21 D 2011-06-15 11:18:41.853161-04 0.281300 0.000000 t 1 1 admin 1507 319 3 D 2011-06-15 11:18:41.853161-04 1.250000 0.000000 t 1 1 admin 1508 329 3 A 2011-06-15 11:18:41.853161-04 0.002500 0.002500 f 2 1 admin 1509 325 3 A 2011-06-15 11:18:41.853161-04 9.000000 9.000000 f 2 1 admin 1510 325 21 A 2011-06-15 11:18:41.853161-04 1.000000 1.000000 f 2 1 admin 1511 330 3 A 2011-06-15 11:18:41.853161-04 0.002500 0.002500 f 2 1 admin 1512 305 3 A 2011-06-15 11:18:41.853161-04 0.211300 0.211300 f 2 1 admin 1513 309 3 N 2011-06-15 11:18:41.853161-04 0.000000 0.711300 t 1 1 admin 1514 313 3 N 2011-06-15 11:18:41.853161-04 0.000000 2.000000 t 1 1 admin 1515 316 3 N 2011-06-15 11:18:41.853161-04 0.000000 2.656000 t 1 1 admin 1516 316 21 N 2011-06-15 11:18:41.853161-04 0.000000 0.002000 t 1 1 admin 1517 331 3 N 2011-06-15 11:18:41.853161-04 0.000000 13.508500 t 1 1 admin 1518 331 21 N 2011-06-15 11:18:41.853161-04 0.000000 0.012000 t 1 1 admin 1519 304 3 N 2011-06-15 11:18:41.853161-04 0.000000 0.711300 t 1 1 admin 1520 334 3 N 2011-06-15 11:18:41.853161-04 0.000000 0.711300 t 1 1 admin 1521 345 3 N 2011-06-15 11:18:41.853161-04 0.000000 0.700000 t 1 1 admin 1522 310 3 N 2011-06-15 11:18:41.853161-04 0.000000 2.121000 t 1 1 admin 1523 310 21 N 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1524 307 3 N 2011-06-15 11:18:41.853161-04 0.000000 2.121200 t 1 1 admin 1525 307 21 N 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1526 328 3 N 2011-06-15 11:18:41.853161-04 0.000000 2.117300 t 1 1 admin 1527 328 21 N 2011-06-15 11:18:41.853161-04 0.000000 0.002000 t 1 1 admin 1528 311 3 N 2011-06-15 11:18:41.853161-04 0.000000 2.121100 t 1 1 admin 1529 311 21 N 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1530 331 3 A 2011-06-15 11:18:41.853161-04 13.508500 14.219800 t 1 1 admin 1531 300 3 N 2011-06-15 11:18:41.853161-04 0.000000 2.117300 t 1 1 admin 1532 300 21 N 2011-06-15 11:18:41.853161-04 0.000000 0.002000 t 1 1 admin 1533 316 3 A 2011-06-15 11:18:41.853161-04 2.656000 3.356000 t 1 1 admin 1534 327 3 N 2011-06-15 11:18:41.853161-04 0.000000 0.400000 t 1 1 admin 1535 313 3 S 2011-06-15 11:18:41.853161-04 0.000000 2.000000 t 1 1 admin 1536 316 3 S 2011-06-15 11:18:41.853161-04 0.000000 2.657200 t 1 1 admin 1537 316 21 S 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1538 331 3 S 2011-06-15 11:18:41.853161-04 0.000000 13.559800 t 1 1 admin 1539 331 21 S 2011-06-15 11:18:41.853161-04 0.000000 0.015700 t 1 1 admin 1540 309 3 S 2011-06-15 11:18:41.853161-04 0.000000 0.700000 t 1 1 admin 1541 304 3 S 2011-06-15 11:18:41.853161-04 0.000000 0.700000 t 1 1 admin 1542 334 3 S 2011-06-15 11:18:41.853161-04 0.000000 0.700000 t 1 1 admin 1543 345 3 S 2011-06-15 11:18:41.853161-04 0.000000 0.700000 t 1 1 admin 1544 310 3 S 2011-06-15 11:18:41.853161-04 0.000000 2.107200 t 1 1 admin 1545 310 21 S 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1546 307 3 S 2011-06-15 11:18:41.853161-04 0.000000 2.107200 t 1 1 admin 1547 307 21 S 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1548 328 3 S 2011-06-15 11:18:41.853161-04 0.000000 2.107200 t 1 1 admin 1549 328 21 S 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1550 311 3 S 2011-06-15 11:18:41.853161-04 0.000000 2.107200 t 1 1 admin 1551 311 21 S 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1552 331 3 S 2011-06-15 11:18:41.853161-04 13.559800 14.259800 t 1 1 admin 1553 300 3 S 2011-06-15 11:18:41.853161-04 0.000000 2.107200 t 1 1 admin 1554 300 21 S 2011-06-15 11:18:41.853161-04 0.000000 0.000800 t 1 1 admin 1555 316 3 S 2011-06-15 11:18:41.853161-04 2.657200 3.357200 t 1 1 admin 1556 329 3 S 2011-06-15 11:18:41.853161-04 0.003700 0.002500 f 1 1 admin 1557 331 3 S 2011-06-15 11:18:41.853161-04 14.259800 14.257400 t 1 1 admin 1558 330 3 S 2011-06-15 11:18:41.853161-04 0.003700 0.002500 f 1 1 admin 1559 331 3 S 2011-06-15 11:18:41.853161-04 14.257400 14.253800 t 1 1 admin 1560 325 3 S 2011-06-15 11:18:41.853161-04 13.410000 9.000000 f 1 1 admin 1561 325 21 S 2011-06-15 11:18:41.853161-04 1.490000 1.000000 f 1 1 admin 1562 331 3 S 2011-06-15 11:18:41.853161-04 14.253800 14.209700 t 1 1 admin 1563 331 21 S 2011-06-15 11:18:41.853161-04 0.015700 0.010800 t 1 1 admin 1564 305 3 S 2011-06-15 11:18:41.853161-04 0.200000 0.211300 f 1 1 admin 1565 309 3 S 2011-06-15 11:18:41.853161-04 0.700000 0.711300 t 1 1 admin 1566 304 3 S 2011-06-15 11:18:41.853161-04 0.700000 0.711300 t 1 1 admin 1567 334 3 S 2011-06-15 11:18:41.853161-04 0.700000 0.711300 t 1 1 admin 1568 310 3 S 2011-06-15 11:18:41.853161-04 2.107200 2.118500 t 1 1 admin 1569 307 3 S 2011-06-15 11:18:41.853161-04 2.107200 2.118500 t 1 1 admin 1570 328 3 S 2011-06-15 11:18:41.853161-04 2.107200 2.118500 t 1 1 admin 1571 311 3 S 2011-06-15 11:18:41.853161-04 2.107200 2.118500 t 1 1 admin 1572 331 3 S 2011-06-15 11:18:41.853161-04 14.209700 14.221000 t 1 1 admin 1573 300 3 S 2011-06-15 11:18:41.853161-04 2.107200 2.118500 t 1 1 admin 1574 301 3 S 2011-06-15 11:18:41.853161-04 0.720000 0.600000 f 1 1 admin 1575 301 21 S 2011-06-15 11:18:41.853161-04 0.080000 0.200000 f 1 1 admin 1576 328 3 S 2011-06-15 11:18:41.853161-04 2.118500 2.117300 t 1 1 admin 1577 328 21 S 2011-06-15 11:18:41.853161-04 0.000800 0.002000 t 1 1 admin 1578 331 3 S 2011-06-15 11:18:41.853161-04 14.221000 14.219800 t 1 1 admin 1579 331 21 S 2011-06-15 11:18:41.853161-04 0.010800 0.012000 t 1 1 admin 1580 300 3 S 2011-06-15 11:18:41.853161-04 2.118500 2.117300 t 1 1 admin 1581 300 21 S 2011-06-15 11:18:41.853161-04 0.000800 0.002000 t 1 1 admin 1582 316 3 S 2011-06-15 11:18:41.853161-04 3.357200 3.356000 t 1 1 admin 1583 316 21 S 2011-06-15 11:18:41.853161-04 0.000800 0.002000 t 1 1 admin 1584 310 3 S 2011-06-15 11:18:41.853161-04 2.118500 2.121000 t 1 1 admin 1585 307 3 S 2011-06-15 11:18:41.853161-04 2.118500 2.121200 t 1 1 admin 1586 310 3 S 2011-06-15 11:18:41.853161-04 2.121000 2.118500 t 1 1 admin 1587 307 3 S 2011-06-15 11:18:41.853161-04 2.121200 2.118500 t 1 1 admin 1588 327 3 S 2011-06-15 11:18:41.853161-04 0.000000 0.400000 t 1 1 admin 1589 336 3 S 2011-06-15 11:18:41.853161-04 0.720000 0.980000 f 1 1 admin 1590 311 3 S 2011-06-15 11:18:41.853161-04 2.118500 2.121100 t 1 1 admin 1591 335 3 S 2011-06-15 11:18:41.853161-04 0.720000 0.970000 f 1 1 admin 1592 310 3 S 2011-06-15 11:18:41.853161-04 2.118500 2.121000 t 1 1 admin 1593 337 3 S 2011-06-15 11:18:41.853161-04 0.720000 0.990000 f 1 1 admin 1594 307 3 S 2011-06-15 11:18:41.853161-04 2.118500 2.121200 t 1 1 admin 1595 309 3 D 2011-06-15 11:19:19.192094-04 0.711300 0.000000 t 1 1 admin 1596 304 3 D 2011-06-15 11:19:19.192094-04 0.711300 0.000000 t 1 1 admin 1597 334 3 D 2011-06-15 11:19:19.192094-04 0.711300 0.000000 t 1 1 admin 1598 328 3 D 2011-06-15 11:19:19.192094-04 2.117300 0.000000 t 1 1 admin 1599 328 21 D 2011-06-15 11:19:19.192094-04 0.002000 0.000000 t 1 1 admin 1600 310 3 D 2011-06-15 11:19:19.192094-04 2.121000 0.000000 t 1 1 admin 1601 310 21 D 2011-06-15 11:19:19.192094-04 0.000800 0.000000 t 1 1 admin 1602 307 3 D 2011-06-15 11:19:19.192094-04 2.121200 0.000000 t 1 1 admin 1603 307 21 D 2011-06-15 11:19:19.192094-04 0.000800 0.000000 t 1 1 admin 1604 311 3 D 2011-06-15 11:19:19.192094-04 2.121100 0.000000 t 1 1 admin 1605 311 21 D 2011-06-15 11:19:19.192094-04 0.000800 0.000000 t 1 1 admin 1606 327 3 D 2011-06-15 11:19:19.192094-04 0.400000 0.000000 t 1 1 admin 1607 331 3 D 2011-06-15 11:19:19.192094-04 14.219800 0.000000 t 1 1 admin 1608 331 21 D 2011-06-15 11:19:19.192094-04 0.012000 0.000000 t 1 1 admin 1609 300 3 D 2011-06-15 11:19:19.192094-04 2.117300 0.000000 t 1 1 admin 1610 300 21 D 2011-06-15 11:19:19.192094-04 0.002000 0.000000 t 1 1 admin 1611 345 3 D 2011-06-15 11:19:19.192094-04 0.700000 0.000000 t 1 1 admin 1612 313 3 D 2011-06-15 11:19:19.192094-04 2.000000 0.000000 t 1 1 admin 1613 316 3 D 2011-06-15 11:19:19.192094-04 3.356000 0.000000 t 1 1 admin 1614 316 21 D 2011-06-15 11:19:19.192094-04 0.002000 0.000000 t 1 1 admin 1615 309 3 N 2011-06-15 11:19:19.192094-04 0.000000 0.711300 t 1 1 admin 1616 313 3 N 2011-06-15 11:19:19.192094-04 0.000000 2.000000 t 1 1 admin 1617 331 3 N 2011-06-15 11:19:19.192094-04 0.000000 13.508500 t 1 1 admin 1618 331 21 N 2011-06-15 11:19:19.192094-04 0.000000 0.012000 t 1 1 admin 1619 304 3 N 2011-06-15 11:19:19.192094-04 0.000000 0.711300 t 1 1 admin 1620 334 3 N 2011-06-15 11:19:19.192094-04 0.000000 0.711300 t 1 1 admin 1621 345 3 N 2011-06-15 11:19:19.192094-04 0.000000 0.700000 t 1 1 admin 1622 328 3 N 2011-06-15 11:19:19.192094-04 0.000000 2.117300 t 1 1 admin 1623 328 21 N 2011-06-15 11:19:19.192094-04 0.000000 0.002000 t 1 1 admin 1624 331 3 A 2011-06-15 11:19:19.192094-04 13.508500 14.219800 t 1 1 admin 1625 300 3 N 2011-06-15 11:19:19.192094-04 0.000000 2.117300 t 1 1 admin 1626 300 21 N 2011-06-15 11:19:19.192094-04 0.000000 0.002000 t 1 1 admin 1627 327 3 N 2011-06-15 11:19:19.192094-04 0.000000 0.400000 t 1 1 admin 1628 313 3 S 2011-06-15 11:19:19.192094-04 0.000000 2.000000 t 1 1 admin 1629 331 3 S 2011-06-15 11:19:19.192094-04 0.000000 13.508500 t 1 1 admin 1630 331 21 S 2011-06-15 11:19:19.192094-04 0.000000 0.012000 t 1 1 admin 1631 309 3 S 2011-06-15 11:19:19.192094-04 0.000000 0.711300 t 1 1 admin 1632 304 3 S 2011-06-15 11:19:19.192094-04 0.000000 0.711300 t 1 1 admin 1633 334 3 S 2011-06-15 11:19:19.192094-04 0.000000 0.711300 t 1 1 admin 1634 345 3 S 2011-06-15 11:19:19.192094-04 0.000000 0.700000 t 1 1 admin 1635 328 3 S 2011-06-15 11:19:19.192094-04 0.000000 2.117300 t 1 1 admin 1636 328 21 S 2011-06-15 11:19:19.192094-04 0.000000 0.002000 t 1 1 admin 1637 331 3 S 2011-06-15 11:19:19.192094-04 13.508500 14.219800 t 1 1 admin 1638 300 3 S 2011-06-15 11:19:19.192094-04 0.000000 2.117300 t 1 1 admin 1639 300 21 S 2011-06-15 11:19:19.192094-04 0.000000 0.002000 t 1 1 admin 1640 327 3 S 2011-06-15 11:19:19.192094-04 0.000000 0.400000 t 1 1 admin \. -- -- Data for Name: costupdate; Type: TABLE DATA; Schema: public; Owner: admin -- COPY costupdate (costupdate_item_id, costupdate_lowlevel_code, costupdate_item_type) FROM stdin; 342 1 R \. -- -- Data for Name: country; Type: TABLE DATA; Schema: public; Owner: admin -- COPY country (country_id, country_abbr, country_name, country_curr_abbr, country_curr_name, country_curr_number, country_curr_symbol, country_qt_number) FROM stdin; 214 \N \N XTS Code reserved for testing 963 \N \N 5 AD Andorra EUR Euro 978 € 5 228 AE United Arab Emirates AED UAE Dirham 784 \N 223 1 AF Afghanistan AFN Afghani 971 \N 1 9 AG Antigua And Barbuda XCD East Caribbean Dollar 951 $ 9 7 AI Anguilla XCD East Caribbean Dollar 951 $ 7 2 AL Albania ALL Lek 8 \N 2 11 AM Armenia AMD Armenian Dram 51 \N 11 154 AN Netherlands Antilles ANG Netherlands Antillian Guilder 532 ƒ 152 6 AO Angola AOA Kwanza 973 \N 6 8 AQ Antarctica \N \N \N \N 8 10 AR Argentina ARS Argentine Peso 32 $ 10 4 AS American Samoa USD US Dollar 840 $ 4 14 AT Austria EUR Euro 978 € 14 13 AU Australia AUD Australian Dollar 36 $ 13 12 AW Aruba AWG Aruban Guilder 533 ƒ 12 15 AZ Azerbaijan AZN Azerbaijanian Manat 944 \N 15 27 BA Bosnia And Herzegovina BAM Convertible Marks 977 \N 27 19 BB Barbados BBD Barbados Dollar 52 $ 19 18 BD Bangladesh BDT Taka 50 \N 18 21 BE Belgium EUR Euro 978 € 21 35 BF Burkina Faso XOF CFA Franc BCEAO 952 \N 34 34 BG Bulgaria BGN Bulgarian Lev 975 \N 33 17 BH Bahrain BHD Bahraini Dinar 48 \N 17 36 BI Burundi BIF Burundi Franc 108 \N 35 23 BJ Benin XOF CFA Franc BCEAO 952 \N 23 24 BM Bermuda BMD Bermudian Dollar 60 $ 24 33 BN Brunei Darussalam BND Brunei Dollar 96 $ 32 26 BO Bolivia BOB Boliviano 68 $ 26 30 BR Brazil BRL Brazilian Real 986 R$ 30 16 BS Bahamas BSD Bahamian Dollar 44 $ 16 25 BT Bhutan BTN Ngultrum 64 \N 25 29 BV Bouvet Island NOK Norwegian Krone 578 \N 29 28 BW Botswana BWP Pula 72 \N 28 20 BY Belarus BYR Belarussian Ruble 974 \N 20 22 BZ Belize BZD Belize Dollar 84 $ 22 39 CA Canada CAD Canadian Dollar 124 $ 38 47 CC Cocos (Keeling) Islands AUD Australian Dollar 36 $ 46 51 CD Congo, The Democratic Republic Of CDF Franc Congolais 976 \N 49 42 CF Central African Republic XAF CFA Franc BEAC 950 \N 41 50 CG Congo XAF CFA Franc BEAC 950 \N 50 209 CH Switzerland CHF Swiss Franc 756 \N 206 107 CI Ivory Coast XOF CFA Frank BCEA 952 \N 53 52 CK Cook Islands NZD New Zealand Dollar 554 $ 51 44 CL Chile CLP Chilean Peso 152 $ 43 38 CM Cameroon XAF CFA Franc BEAC 950 \N 37 45 CN China CNY Yuan Renminbi 156 \N 44 48 CO Colombia COP Colombian Peso 170 ₱ 47 53 CR Costa Rica CRC Costa Rican Colon 188 ₡ 52 55 CU Cuba CUP Cuban Peso 192 ₱ 55 40 CV Cape Verde CVE Cape Verde Escudo 132 \N 39 46 CX Christmas Island AUD Australian Dollar 36 $ 45 56 CY Cyprus CYP Cyprus Pound 196 £ 56 57 CZ Czech Republic CZK Czech Koruna 203 \N 57 81 DE Germany EUR Euro 978 € 82 59 DJ Djibouti DJF Djibouti Franc 262 \N 59 58 DK Denmark DKK Danish Krone 208 kr 58 60 DM Dominica XCD East Caribbean Dollar 951 $ 60 61 DO Dominican Republic DOP Dominican Peso 214 ₱ 61 3 DZ Algeria DZD Algerian Dinar 12 \N 3 63 EC Ecuador USD US Dollar 840 $ 63 68 EE Estonia EEK Kroon 233 \N 68 64 EG Egypt EGP Egyptian Pound 818 £ 64 239 EH Western Sahara MAD Moroccan Dirham 504 \N 236 67 ER Eritrea ERN Nakfa 232 \N 67 202 ES Spain EUR Euro 978 € 197 69 ET Ethiopia ETB Ethiopian Birr 230 \N 69 73 FI Finland EUR Euro 978 € 73 72 FJ Fiji FJD Fiji Dollar 242 $ 72 70 FK Falkland Islands (Malvinas) FKP Falkland Islands Pound 238 £ 70 141 FM Micronesia, Federated States Of USD US Dollar 840 $ 140 71 FO Faroe Islands DKK Danish Krone 208 \N 71 74 FR France EUR Euro 978 € 74 78 GA Gabon XAF CFA Franc BEAC 950 \N 79 86 GD Grenada XCD East Caribbean Dollar 951 $ 87 80 GE Georgia GEL Lari 981 \N 81 75 GF French Guiana EUR Euro 978 € 76 82 GH Ghana GHC Cedi 288 \N 83 83 GI Gibraltar GIP Gibraltar Pound 292 £ 84 85 GL Greenland DKK Danish Krone 208 \N 86 79 GM Gambia GMD Dalasi 270 \N 80 90 GN Guinea GNF Guinea Franc 324 \N 91 87 GP Guadeloupe EUR Euro 978 € 88 66 GQ Equatorial Guinea XAF CFA Franc BEAC 950 \N 66 84 GR Greece EUR Euro 978 € 85 201 GS South Georgia And The South Sandwich Islands GBP Pound Sterling 826 \N 196 89 GT Guatemala GTQ Quetzal 320 \N 90 88 GU Guam USD US Dollar 840 $ 89 91 GW Guinea-Bissau XOF CFA Franc BCEAO 952 \N 92 92 GY Guyana GYD Guyana Dollar 328 $ 93 97 HK Hong Kong HKD Hong Kong Dollar 344 $ 97 94 HM Heard Island And Mcdonald Islands AUD Australian Dollar 36 $ 95 96 HN Honduras HNL Lempira 340 \N 96 54 HR Croatia HRK Croatian Kuna 191 \N 54 93 HT Haiti HTG Gourde 332 \N 94 98 HU Hungary HUF Forint 348 \N 98 101 ID Indonesia IDR Indonesia Rupiah 360 \N 101 104 IE Ireland EUR Euro 978 € 104 105 IL Israel ILS New Israeli Sheqel 376 ₪ 105 100 IN India INR Indian Rupee 356 ₨ 100 31 IO British Indian Ocean Territory USD US Dollar 840 $ 31 103 IQ Iraq IQD Iraqi Dinar 368 \N 103 102 IR Iran IRR Iranian Rial 364 ï·¼ 102 99 IS Iceland ISK Iceland Krona 352 \N 99 106 IT Italy EUR Euro 978 € 106 108 JM Jamaica JMD Jamaican Dollar 388 $ 107 110 JO Jordan JOD Jordanian Dinar 400 \N 109 109 JP Japan JPY Yen 392 Â¥ 108 112 KE Kenya KES Kenyan Shilling 404 \N 111 117 KG Kyrgyzstan KGS Som 417 \N 116 37 KH Cambodia KHR Riel 116 ៛ 36 113 KI Kiribati AUD Australian Dollar 36 $ 112 49 KM Comoros KMF Comoro Franc 174 \N 48 183 KN Saint Kitts And Nevis XCD East Caribbean Dollar 951 $ 180 114 KP Korea, Democratic Peoples Republic Of KPW North Korean Won 408 ₩ 113 115 KR Korea, Republic Of KRW South Korean Won 410 ₩ 114 116 KW Kuwait KWD Kuwaiti Dinar 414 \N 115 41 KY Cayman Islands KYD Cayman Islands Dollar 136 $ 40 111 KZ Kazakhstan KZT Tenge 398 \N 110 118 LA Laos LAK Kip 418 ₭ 117 120 LB Lebanon LBP Lebanese Pound 422 £ 119 184 LC Saint Lucia XCD East Caribbean Dollar 951 $ 181 124 LI Liechtenstein CHF Swiss Franc 756 \N 123 203 LK Sri Lanka LKR Sri Lanka Rupee 144 ௹ 198 122 LR Liberia LRD Liberian Dollar 430 $ 121 121 LS Lesotho LSL Loti 426 \N 120 125 LT Lithuania LTL Lithuanian Litas 440 \N 124 126 LU Luxembourg EUR Euro 978 € 125 119 LV Latvia LVL Latvian Lats 428 \N 118 123 LY Libyan Arab Jamahiriya LYD Libyan Dinar 434 \N 122 147 MA Morocco MAD Moroccan Dirham 504 \N 145 143 MC Monaco EUR Euro 978 € 142 142 MD Moldova MDL Moldovan Leu 498 \N 141 145 ME Montenegro EUR Euro 978 € 241 129 MG Madagascar MGA Malagascy Ariary 969 \N 128 135 MH Marshall Islands USD US Dollar 840 $ 134 128 MK Macedonia, Former Yugoslav Republic Of MKD Denar 807 \N 127 133 ML Mali XOF CFA Franc BCEAO 952 \N 132 149 MM Myanmar MMK Kyat 104 \N 147 144 MN Mongolia MNT Tugrik 496 ₮ 143 127 MO Macao MOP Pataca 446 \N 126 162 MP Northern Mariana Islands USD US Dollar 840 $ 160 136 MQ Martinique EUR Euro 978 € 135 137 MR Mauritania MRO Ouguiya 478 \N 136 146 MS Montserrat XCD East Caribbean Dollar 951 $ 144 134 MT Malta MTL Maltese Lira 470 ₤ 133 138 MU Mauritius MUR Mauritius Rupee 480 ₨ 137 132 MV Maldives MVR Rufiyaa 462 \N 131 130 MW Malawi MWK Malawi Kwacha 454 \N 129 140 MX Mexico MXN Mexican Peso 484 $ 139 131 MY Malaysia MYR Malaysian Ringgit 458 \N 130 148 MZ Mozambique MZN Metical 943 \N 146 150 NA Namibia NAD Namibian Dollar 516 $ 148 155 NC New Caledonia XPF CFP Franc 953 \N 153 158 NE Niger XOF CFA Franc BCEAO 952 \N 156 161 NF Norfolk Island AUD Australian Dollar 36 $ 159 159 NG Nigeria NGN Naira 566 ₦ 157 157 NI Nicaragua NIO Cordoba Oro 558 \N 155 153 NL Netherlands EUR Euro 978 € 151 163 NO Norway NOK Norwegian Krone 578 \N 161 152 NP Nepal NPR Nepalese Rupee 524 ₨ 150 151 NR Nauru AUD Australian Dollar 36 $ 149 160 NU Niue NZD New Zealand Dollar 554 $ 158 156 NZ New Zealand NZD New Zealand Dollar 554 $ 154 164 OM Oman OMR Rial Omani 512 ï·¼ 162 168 PA Panama PAB Balboa 590 \N 166 171 PE Peru PEN Nuevo Sol 604 S/. 169 76 PF French Polynesia XPF CFP Franc 953 \N 77 169 PG Papua New Guinea PGK Kina 598 \N 167 172 PH Philippines PHP Philippine Peso 608 ₱ 170 165 PK Pakistan PKR Pakistan Rupee 586 ₨ 163 174 PL Poland PLN Zloty 985 \N 172 185 PM Saint Pierre And Miquelon EUR Euro 978 € 200 173 PN Pitcairn NZD New Zealand Dollar 554 $ 171 176 PR Puerto Rico USD US Dollar 840 $ 174 167 PS Palestinian Territories \N \N \N \N 165 175 PT Portugal EUR Euro 978 € 173 166 PW Palau USD US Dollar 840 $ 164 170 PY Paraguay PYG Guarani 600 \N 168 177 QA Qatar QAR Qatari Rial 634 \N 175 178 RE Reunion EUR Euro 978 € 176 179 RO Romania RON New Leu 946 \N 177 192 RS Serbia RSD Serbian Dinar 941 \N 241 180 RU Russian Federation RUB Russian Ruble 643 \N 178 181 RW Rwanda RWF Rwanda Franc 646 \N 179 190 SA Saudi Arabia SAR Saudi Riyal 682 ï·¼ 186 198 SB Solomon Islands SBD Solomon Islands Dollar 90 $ 193 193 SC Seychelles SCR Seychelles Rupee 690 ₨ 188 204 SD Sudan SDD Sudanese Dinar 736 \N 201 208 SE Sweden SEK Swedish Krona 752 kr 205 195 SG Singapore SGD Singapore Dollar 702 $ 190 182 SH Saint Helena SHP Saint Helena Pound 654 £ 199 197 SI Slovenia SIT Tolar 705 \N 192 206 SJ Svalbard And Jan Mayen NOK Norwegian Krone 578 \N 203 196 SK Slovakia SKK Slovak Koruna 703 \N 191 194 SL Sierra Leone SLL Leone 694 \N 189 188 SM San Marino EUR Euro 978 € 184 191 SN Senegal XOF CFA Franc BCEAO 952 \N 187 199 SO Somalia SOS Somali Shilling 706 \N 194 205 SR Suriname SRD Surinam Dollar 968 $ 202 189 ST Sao Tome And Principe STD Dobra 678 \N 185 65 SV El Salvador SVC El Salvador Colon 222 ₡ 65 210 SY Syria SYP Syrian Pound 760 £ 207 207 SZ Swaziland SZL Lilangeni 748 \N 204 224 TC Turks And Caicos Islands USD US Dollar 840 $ 219 43 TD Chad XAF CFA Franc BEAC 950 \N 42 77 TF French Southern Territories EUR Euro 978 € 78 217 TG Togo XOF CFA Franc BCEAO 952 \N 212 215 TH Thailand THB Baht 764 ฿ 211 212 TJ Tajikistan TJS Somoni 972 \N 209 218 TK Tokelau NZD New Zealand Dollar 554 $ 213 216 TL Timor-Leste USD US Dollar 840 $ 62 223 TM Turkmenistan TMM Turkmenistan Manat 795 \N 218 221 TN Tunisia TND Tunisian Dinar 788 \N 216 219 TO Tonga TOP Paanga 776 \N 214 62 TP East Timor IDR Indonesia Rupiah 360 \N 62 222 TR Turkey TRY New Turkish Lira 949 ₤ 217 220 TT Trinidad And Tobago TTD Trinidad and Tobago Dollar 780 $ 215 225 TV Tuvalu AUD Australian Dollar 36 $ 220 211 TW Taiwan TWD New Taiwan Dollar 901 $ 208 213 TZ Tanzania TZS Tanzanian Shilling 834 \N 210 227 UA Ukraine UAH Hryvnia 980 \N 222 226 UG Uganda UGX Uganda Shilling 800 \N 221 229 UK United Kingdom GBP Pound Sterling 826 £ 224 232 UM U.S. Minor Outlying Islands USD US Dollar 840 $ 226 230 US United States USD US Dollar 840 $ 225 231 UY Uruguay UYU Peso Uruguayo 858 ₱ 227 234 UZ Uzbekistan UZS Uzbekistan Sum 860 \N 228 95 VA Holy See (Vatican City State) EUR Euro 978 € 230 186 VC Saint Vincent And The Grenadines XCD East Caribbean Dollar 951 $ 182 236 VE Venezuela VEB Bolivar 862 \N 231 32 VG British Virgin Islands USD US Dollar 840 $ 233 233 VI U.S. Virgin Islands USD US Dollar 840 $ 234 237 VN Viet Nam VND Dong 704 ₫ 232 235 VU Vanuatu VUV Vatu 548 \N 229 238 WF Wallis And Futuna XPF CFP Franc 953 \N 235 187 WS Samoa WST Tala 882 \N 183 240 YE Yemen YER Yemeni Rial 886 ï·¼ 237 139 YT Mayotte EUR Euro 978 € 138 200 ZA South Africa ZAR Rand 710 R 195 241 ZM Zambia ZMK Zambian Kwacha 894 \N 239 242 ZW Zimbabwe ZWD Zimbabwe Dollar 716 $ 240 \. -- -- Data for Name: crmacct; Type: TABLE DATA; Schema: public; Owner: admin -- COPY crmacct (crmacct_id, crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_cust_id, crmacct_competitor_id, crmacct_partner_id, crmacct_prospect_id, crmacct_vend_id, crmacct_cntct_id_1, crmacct_cntct_id_2, crmacct_parent_id, crmacct_notes, crmacct_taxauth_id, crmacct_owner_username, crmacct_emp_id, crmacct_salesrep_id, crmacct_usr_username) FROM stdin; 4 XPPI Packaging Pros LTD t O \N \N \N \N 79 6 7 \N \N \N \N \N \N 3 TPARTS Toy Parts Inc. t O \N \N \N \N 78 5 \N \N \N \N \N \N \N 7 ICHROME International Chrome Technologies t O \N \N \N \N 85 16 \N \N \N \N \N \N \N \N 5 VOFFP Office Plus t O \N \N \N \N 83 14 15 \N \N \N \N \N \N 11 WCHEM World Chem, Inc. t O \N \N \N \N 88 22 \N \N \N \N \N \N \N \N 12 UPS United Parcel Service t O \N \N \N \N 92 24 \N \N \N \N \N \N \N \N 13 WTOYS World Toys Ltd. t O \N \N \N 98 \N 25 \N \N \N \N \N \N \N \N 14 XRETAIL Master Prodiem Toys Retail Customer t O 102 \N \N \N \N 26 26 \N \N \N \N \N \N 15 GA TAX Georgia IRS t O \N \N \N \N \N \N \N \N \N 3 \N \N \N \N 10 VA TAX Virginia IRS t O \N \N \N \N 86 19 \N \N 2 \N \N \N \N 9 NC TAX North Carolina IRS t O \N \N \N \N 87 18 \N \N 1 \N \N \N \N 16 DMFG Diamond Manufacturing t O \N \N \N \N 94 35 \N \N \N \N \N \N \N \N 2 XTRM Xtreme Toys LTD t O 97 \N \N \N \N 3 4 \N \N admin \N \N \N 18 PRODIEM ProDiem t O \N \N \N \N \N 21 \N \N \N admin \N \N \N 1 TTOYS Tremendous Toys Incorporated t O 95 \N \N \N \N 1 2 \N \N admin \N \N \N 20 VCOL Vienna Collectables t O 123 \N \N \N \N 36 \N \N \N \N \N \N \N \N 21 1000 Sam Masters t I \N \N \N \N \N \N \N \N \N \N \N \N 29 \N 19 ADMIN Admin t O \N \N \N \N 97 32 \N \N \N \N \N 1 30 admin 17 JSMITH John Smith t O \N \N \N \N 95 \N \N \N \N \N \N 2 31 jsmith \. -- -- Data for Name: crmacctsel; Type: TABLE DATA; Schema: public; Owner: admin -- COPY crmacctsel (crmacctsel_src_crmacct_id, crmacctsel_dest_crmacct_id, crmacctsel_mrg_crmacct_active, crmacctsel_mrg_crmacct_cntct_id_1, crmacctsel_mrg_crmacct_cntct_id_2, crmacctsel_mrg_crmacct_competitor_id, crmacctsel_mrg_crmacct_cust_id, crmacctsel_mrg_crmacct_emp_id, crmacctsel_mrg_crmacct_name, crmacctsel_mrg_crmacct_notes, crmacctsel_mrg_crmacct_owner_username, crmacctsel_mrg_crmacct_parent_id, crmacctsel_mrg_crmacct_partner_id, crmacctsel_mrg_crmacct_prospect_id, crmacctsel_mrg_crmacct_salesrep_id, crmacctsel_mrg_crmacct_taxauth_id, crmacctsel_mrg_crmacct_type, crmacctsel_mrg_crmacct_usr_username, crmacctsel_mrg_crmacct_vend_id, crmacctsel_mrg_crmacct_number) FROM stdin; \. -- -- Data for Name: curr_rate; Type: TABLE DATA; Schema: public; Owner: admin -- COPY curr_rate (curr_rate_id, curr_id, curr_rate, curr_effective, curr_expires) FROM stdin; 1 1 1.00000000 1970-01-01 2100-01-01 11 3 0.56818200 2008-09-09 2008-12-30 9 2 0.70922000 2008-09-09 2008-12-30 2 2 0.77821000 2003-06-09 2008-03-04 6 2 0.67114100 2008-03-05 2008-09-08 7 3 0.50505100 2008-03-05 2008-09-08 3 3 0.53763400 2003-03-19 2008-03-04 13 2 0.71428571 2008-12-31 2009-12-31 12 3 0.69444444 2008-12-31 2009-12-31 14 2 0.70422535 2010-01-01 2010-12-31 15 3 0.61728395 2010-01-01 2010-12-31 16 2 0.72463768 2011-01-01 2012-01-21 17 3 0.62893082 2011-01-01 2011-02-25 18 3 0.62111801 2011-02-26 2011-12-31 \. -- -- Data for Name: curr_symbol; Type: TABLE DATA; Schema: public; Owner: admin -- COPY curr_symbol (curr_id, curr_base, curr_name, curr_symbol, curr_abbr) FROM stdin; 3 f British Pound £ GBP 2 f Euro € EUR 1 t US Dollars $ USD \. -- -- Data for Name: custform; Type: TABLE DATA; Schema: public; Owner: admin -- COPY custform (custform_id, custform_custtype_id, custform_custtype, custform_invoice_report_id, custform_creditmemo_report_id, custform_quote_report_id, custform_packinglist_report_id, custform_statement_report_id, custform_sopicklist_report_id, custform_invoice_report_name, custform_creditmemo_report_name, custform_quote_report_name, custform_packinglist_report_name, custform_statement_report_name, custform_sopicklist_report_name) FROM stdin; 8 18 362 3 172 418 261 365 Invoice CreditMemo Quote PackingList-Shipment Statement PickingListSOClosedLines \. -- -- Data for Name: custgrp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY custgrp (custgrp_id, custgrp_name, custgrp_descrip) FROM stdin; 25 NAT-VA National Accounts - VA \. -- -- Data for Name: custgrpitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY custgrpitem (custgrpitem_id, custgrpitem_custgrp_id, custgrpitem_cust_id) FROM stdin; 48 25 95 \. -- -- Data for Name: custinfo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY custinfo (cust_id, cust_active, cust_custtype_id, cust_salesrep_id, cust_commprcnt, cust_name, cust_creditlmt, cust_creditrating, cust_financecharge, cust_backorder, cust_partialship, cust_terms_id, cust_discntprcnt, cust_balmethod, cust_ffshipto, cust_shipform_id, cust_shipvia, cust_blanketpos, cust_shipchrg_id, cust_creditstatus, cust_comments, cust_ffbillto, cust_usespos, cust_number, cust_dateadded, cust_exported, cust_emaildelivery, cust_ediemail, cust_edisubject, cust_edifilename, cust_ediemailbody, cust_autoupdatestatus, cust_autoholdorders, cust_edicc, cust_ediprofile_id, cust_preferred_warehous_id, cust_curr_id, cust_creditlmt_curr_id, cust_cntct_id, cust_corrcntct_id, cust_soemaildelivery, cust_soediemail, cust_soedisubject, cust_soedifilename, cust_soediemailbody, cust_soedicc, cust_soediprofile_id, cust_gracedays, cust_ediemailhtml, cust_soediemailhtml, cust_taxzone_id) FROM stdin; 95 t 18 29 0.075000 Tremendous Toys Incorporated 200000 D&B \N t t 42 0.100000 B t 12 UPS-GROUND-UPS Ground f 4 G t f TTOYS 2005-12-23 f f demo@openmfg.com Invoice From ProDiem Attached Prodiem Dear Tremendous Toys:\n\nAttached please find a current invoice. Contact us immediately st 800-234-2311 if there are any questions.\n\nThank You For Your Order,\n\nProDiem Toys t t matherton@openmfg.com \N 35 1 1 1 2 f demo@openmfg.com Sales Order Order Status ORDER Please see the attached document containing information about your order number: .\n\nRegards,\n\nProDiem Toys demo@openmfg.com \N \N f f 2 102 t 20 29 0.000000 Master Prodiem Toys Retail Customer 20000 No check \N t t 44 0.000000 B t 12 UPS-GROUND-UPS Ground f 4 G f f XRETAIL 2009-09-16 f f \N \N \N \N f f \N \N -1 1 1 34 \N f \N \N \N \N \N \N \N f f \N 123 t 19 29 0.000000 Vienna Collectables 20000 No check \N t t 42 0.000000 B f 12 UPS-GROUND-UPS Ground t 4 G f t VCOL 2011-04-18 f f \N \N \N \N t t \N \N 35 2 2 36 \N f \N \N \N \N \N \N 15 f f \N 97 t 19 29 0.075000 Xtreme Toys LTD 109 D&B \N t t 42 0.060000 B t 12 UPS-GROUND-UPS Ground f 4 G t f XTRM 2006-10-11 f f f f \N 35 3 3 3 4 f \N \N f f \N \. -- -- Data for Name: custtype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY custtype (custtype_id, custtype_code, custtype_descrip, custtype_char) FROM stdin; 18 NORMAL Normal Domestic Customers t 19 NORMAL-INT Normal International Customers t 20 NORMAL-RETAIL Normal Retail Customers f \. -- -- Data for Name: dept; Type: TABLE DATA; Schema: public; Owner: admin -- COPY dept (dept_id, dept_number, dept_name) FROM stdin; 1 ASSEMBLY Assembly 2 PAINT Paint 3 SHIPPING Shipping 4 ADMIN Administration \. -- -- Data for Name: destination; Type: TABLE DATA; Schema: public; Owner: admin -- COPY destination (destination_id, destination_name, destination_city, destination_state, destination_comments) FROM stdin; 13 TTOYS-22204 Arlington VA Store - Zip:22204 \. -- -- Data for Name: docass; Type: TABLE DATA; Schema: public; Owner: admin -- COPY docass (docass_id, docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose) FROM stdin; 2 3 INCDT 325 I S 3 316 I 3 INCDT S 4 316 I 4 INCDT S 6 300 I 1 URL S 7 5 J 1 FILE S \. -- -- Data for Name: emp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY emp (emp_id, emp_code, emp_number, emp_active, emp_cntct_id, emp_warehous_id, emp_mgr_emp_id, emp_wage_type, emp_wage, emp_wage_curr_id, emp_wage_period, emp_dept_id, emp_shift_id, emp_notes, emp_image_id, emp_username, emp_extrate, emp_extrate_period, emp_startdate, emp_name) FROM stdin; 1 ADMIN admin t 32 35 \N H 50 1 H 4 1 6644 admin 175 H \N Administrator 2 JSMITH jsmith t 21 35 \N H 0 1 H 4 1 18 jsmith 0 H \N John Smith \. -- -- Data for Name: empgrp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY empgrp (empgrp_id, empgrp_name, empgrp_descrip) FROM stdin; \. -- -- Data for Name: empgrpitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY empgrpitem (empgrpitem_id, empgrpitem_empgrp_id, empgrpitem_emp_id) FROM stdin; \. -- -- Data for Name: evntlog; Type: TABLE DATA; Schema: public; Owner: admin -- COPY evntlog (evntlog_id, evntlog_evnttime, evntlog_evnttype_id, evntlog_ord_id, evntlog_dispatched, evntlog_action, evntlog_warehous_id, evntlog_number, evntlog_newvalue, evntlog_oldvalue, evntlog_newdate, evntlog_olddate, evntlog_ordtype, evntlog_username) FROM stdin; 1705 2010-11-30 15:03:25.477921-05 12 761 \N \N 35 50205-2 \N \N 2010-11-30 2010-11-24 S jsmith 1707 2010-11-30 15:03:25.477921-05 12 761 \N \N 35 50205-2 \N \N 2010-11-30 2010-11-24 S mfgadmin 1708 2010-11-30 15:04:07.850686-05 12 775 \N \N 35 50211-1 \N \N 2010-11-30 2010-11-24 S jsmith 1710 2010-11-30 15:04:07.850686-05 12 775 \N \N 35 50211-1 \N \N 2010-11-30 2010-11-24 S mfgadmin 1711 2010-11-30 15:04:44.664887-05 12 779 \N \N 35 50212-1 \N \N 2010-11-30 2010-11-11 S jsmith 1713 2010-11-30 15:04:44.664887-05 12 779 \N \N 35 50212-1 \N \N 2010-11-30 2010-11-11 S mfgadmin 1706 2010-11-30 15:03:25.477921-05 12 761 2010-11-30 15:05:22.333047-05 \N 35 50205-2 \N \N 2010-11-30 2010-11-24 S admin 1709 2010-11-30 15:04:07.850686-05 12 775 2010-11-30 15:05:24.784746-05 \N 35 50211-1 \N \N 2010-11-30 2010-11-24 S admin 1712 2010-11-30 15:04:44.664887-05 12 779 2010-11-30 15:05:27.669986-05 \N 35 50212-1 \N \N 2010-11-30 2010-11-11 S admin 1714 2010-12-30 16:10:02.101901-05 12 775 \N \N 35 50211-1 \N \N 2010-12-30 2010-11-30 S jsmith 1716 2010-12-30 16:10:02.101901-05 12 775 \N \N 35 50211-1 \N \N 2010-12-30 2010-11-30 S mfgadmin 1717 2010-12-30 16:10:23.304759-05 12 775 \N \N 35 50211-1 \N \N 2011-01-13 2010-12-30 S jsmith 1719 2010-12-30 16:10:23.304759-05 12 775 \N \N 35 50211-1 \N \N 2011-01-13 2010-12-30 S mfgadmin 1720 2010-12-30 16:10:44.768572-05 12 761 \N \N 35 50205-2 \N \N 2010-12-30 2010-11-30 S jsmith 1722 2010-12-30 16:10:44.768572-05 12 761 \N \N 35 50205-2 \N \N 2010-12-30 2010-11-30 S mfgadmin 1723 2010-12-30 16:11:05.160868-05 12 779 \N \N 35 50212-1 \N \N 2010-12-30 2010-11-30 S jsmith 1725 2010-12-30 16:11:05.160868-05 12 779 \N \N 35 50212-1 \N \N 2010-12-30 2010-11-30 S mfgadmin 1726 2010-12-30 16:12:53.472743-05 1 602 \N \N 35 10080-1 \N \N 2011-01-07 2010-12-09 W jsmith 1728 2010-12-30 16:12:53.472743-05 1 602 \N \N 35 10080-1 \N \N 2011-01-07 2010-12-09 W mfgadmin 1729 2010-12-30 16:12:53.472743-05 1 603 \N \N 35 10080-2 \N \N 2011-01-02 2010-12-04 W jsmith 1731 2010-12-30 16:12:53.472743-05 1 603 \N \N 35 10080-2 \N \N 2011-01-02 2010-12-04 W mfgadmin 1732 2010-12-30 16:13:20.826297-05 8 603 \N \N 35 10080-2 \N \N \N \N W jsmith 1734 2010-12-30 16:13:20.826297-05 8 603 \N \N 35 10080-2 \N \N \N \N W mfgadmin 1735 2010-12-30 16:13:37.125225-05 3 607 \N \N 35 10080-2 \N \N \N \N W jsmith 1737 2010-12-30 16:13:37.125225-05 3 607 \N \N 35 10080-2 \N \N \N \N W mfgadmin 1738 2010-12-30 16:16:48.482665-05 14 3196 \N \N 35 50205 \N \N \N \N S mfgadmin 1740 2010-12-30 16:16:48.482665-05 14 3196 \N \N 35 50205 \N \N \N \N S jsmith 1741 2010-12-30 16:16:48.482665-05 14 3211 \N \N 35 50212 \N \N \N \N S mfgadmin 1743 2010-12-30 16:16:48.482665-05 14 3211 \N \N 35 50212 \N \N \N \N S jsmith 1744 2010-12-30 16:25:36.168772-05 11 783 \N \N 35 50214-1 \N \N \N \N S jsmith 1746 2010-12-30 16:25:36.168772-05 11 783 \N \N 35 50214-1 \N \N \N \N S mfgadmin 1747 2010-12-30 16:25:36.168772-05 33 600 \N \N 35 20102-1: DTRUCK1 \N \N \N \N P jsmith 1749 2011-03-07 14:52:45.944452-05 12 761 \N \N 35 50205-2 \N \N 2011-04-06 2010-12-30 S jsmith 1751 2011-03-07 14:52:45.944452-05 12 761 \N \N 35 50205-2 \N \N 2011-04-06 2010-12-30 S mfgadmin 1752 2011-03-07 14:53:35.778659-05 12 775 \N \N 35 50211-1 \N \N 2011-04-11 2011-01-13 S jsmith 1754 2011-03-07 14:53:35.778659-05 12 775 \N \N 35 50211-1 \N \N 2011-04-11 2011-01-13 S mfgadmin 1755 2011-03-07 14:59:12.8911-05 1 602 \N \N 35 10080-1 \N \N 2011-03-28 2011-01-07 W jsmith 1757 2011-03-07 14:59:12.8911-05 1 602 \N \N 35 10080-1 \N \N 2011-03-28 2011-01-07 W mfgadmin 1758 2011-03-07 14:59:12.8911-05 1 607 \N \N 35 10080-2 \N \N 2011-03-27 2011-01-03 W jsmith 1760 2011-03-07 14:59:12.8911-05 1 607 \N \N 35 10080-2 \N \N 2011-03-27 2011-01-03 W mfgadmin 1761 2011-03-07 15:29:42.289772-05 11 785 \N \N 35 50215-1 \N \N \N \N S jsmith 1763 2011-03-07 15:29:42.289772-05 11 785 \N \N 35 50215-1 \N \N \N \N S mfgadmin 1764 2011-03-07 15:29:42.289772-05 33 601 \N \N 35 20103-1: DTRUCK1 \N \N \N \N P jsmith 1766 2011-03-07 15:31:56.597251-05 14 3217 \N \N 35 50215 \N \N \N \N S mfgadmin 1768 2011-03-07 15:31:56.597251-05 14 3217 \N \N 35 50215 \N \N \N \N S jsmith 1769 2011-03-07 15:57:45.149314-05 11 787 \N \N 35 50216-1 \N \N \N \N S jsmith 1771 2011-03-07 15:57:45.149314-05 11 787 \N \N 35 50216-1 \N \N \N \N S mfgadmin 1772 2011-03-07 15:57:45.149314-05 3 609 \N \N 35 50216-1 \N \N \N \N W jsmith 1774 2011-03-07 15:57:45.149314-05 3 609 \N \N 35 50216-1 \N \N \N \N W mfgadmin 1775 2011-03-07 15:58:25.131657-05 8 609 \N \N 35 50216-1 \N \N \N \N W jsmith 1777 2011-03-07 15:58:25.131657-05 8 609 \N \N 35 50216-1 \N \N \N \N W mfgadmin 1778 2011-03-07 15:58:25.131657-05 13 787 \N \N 35 50216-1 \N \N \N \N S jsmith 1780 2011-03-07 15:58:25.131657-05 13 787 \N \N 35 50216-1 \N \N \N \N S mfgadmin 1781 2011-04-18 07:20:22.179731-04 14 3196 \N \N 35 50205 \N \N \N \N S mfgadmin 1783 2011-04-18 07:20:22.179731-04 14 3196 \N \N 35 50205 \N \N \N \N S jsmith 1715 2010-12-30 16:10:02.101901-05 12 775 2011-04-18 07:38:45.227937-04 \N 35 50211-1 \N \N 2010-12-30 2010-11-30 S admin 1718 2010-12-30 16:10:23.304759-05 12 775 2011-04-18 07:38:45.538955-04 \N 35 50211-1 \N \N 2011-01-13 2010-12-30 S admin 1721 2010-12-30 16:10:44.768572-05 12 761 2011-04-18 07:38:45.86589-04 \N 35 50205-2 \N \N 2010-12-30 2010-11-30 S admin 1724 2010-12-30 16:11:05.160868-05 12 779 2011-04-18 07:38:46.246135-04 \N 35 50212-1 \N \N 2010-12-30 2010-11-30 S admin 1727 2010-12-30 16:12:53.472743-05 1 602 2011-04-18 07:38:46.678844-04 \N 35 10080-1 \N \N 2011-01-07 2010-12-09 W admin 1730 2010-12-30 16:12:53.472743-05 1 603 2011-04-18 07:38:47.168021-04 \N 35 10080-2 \N \N 2011-01-02 2010-12-04 W admin 1733 2010-12-30 16:13:20.826297-05 8 603 2011-04-18 07:38:47.710601-04 \N 35 10080-2 \N \N \N \N W admin 1736 2010-12-30 16:13:37.125225-05 3 607 2011-04-18 07:38:48.347403-04 \N 35 10080-2 \N \N \N \N W admin 1739 2010-12-30 16:16:48.482665-05 14 3196 2011-04-18 07:38:49.013068-04 \N 35 50205 \N \N \N \N S admin 1742 2010-12-30 16:16:48.482665-05 14 3211 2011-04-18 07:38:49.508513-04 \N 35 50212 \N \N \N \N S admin 1745 2010-12-30 16:25:36.168772-05 11 783 2011-04-18 07:38:49.811777-04 \N 35 50214-1 \N \N \N \N S admin 1748 2010-12-30 16:25:36.168772-05 33 600 2011-04-18 07:38:50.289992-04 \N 35 20102-1: DTRUCK1 \N \N \N \N P admin 1750 2011-03-07 14:52:45.944452-05 12 761 2011-04-18 07:38:50.857229-04 \N 35 50205-2 \N \N 2011-04-06 2010-12-30 S admin 1753 2011-03-07 14:53:35.778659-05 12 775 2011-04-18 07:38:51.39716-04 \N 35 50211-1 \N \N 2011-04-11 2011-01-13 S admin 1756 2011-03-07 14:59:12.8911-05 1 602 2011-04-18 07:38:51.994164-04 \N 35 10080-1 \N \N 2011-03-28 2011-01-07 W admin 1759 2011-03-07 14:59:12.8911-05 1 607 2011-04-18 07:38:52.588515-04 \N 35 10080-2 \N \N 2011-03-27 2011-01-03 W admin 1762 2011-03-07 15:29:42.289772-05 11 785 2011-04-18 07:38:53.238874-04 \N 35 50215-1 \N \N \N \N S admin 1765 2011-03-07 15:29:42.289772-05 33 601 2011-04-18 07:38:53.944215-04 \N 35 20103-1: DTRUCK1 \N \N \N \N P admin 1767 2011-03-07 15:31:56.597251-05 14 3217 2011-04-18 07:38:54.64913-04 \N 35 50215 \N \N \N \N S admin 1770 2011-03-07 15:57:45.149314-05 11 787 2011-04-18 07:38:55.354284-04 \N 35 50216-1 \N \N \N \N S admin 1773 2011-03-07 15:57:45.149314-05 3 609 2011-04-18 07:38:56.114142-04 \N 35 50216-1 \N \N \N \N W admin 1776 2011-03-07 15:58:25.131657-05 8 609 2011-04-18 07:38:56.864688-04 \N 35 50216-1 \N \N \N \N W admin 1779 2011-03-07 15:58:25.131657-05 13 787 2011-04-18 07:38:57.360705-04 \N 35 50216-1 \N \N \N \N S admin 1782 2011-04-18 07:20:22.179731-04 14 3196 2011-04-18 07:38:57.864493-04 \N 35 50205 \N \N \N \N S admin 1784 2011-04-18 07:41:17.199975-04 11 789 \N \N 35 50217-1 \N \N \N \N S jsmith 1785 2011-04-18 07:41:17.199975-04 11 789 \N \N 35 50217-1 \N \N \N \N S admin 1786 2011-04-18 07:41:17.199975-04 11 789 \N \N 35 50217-1 \N \N \N \N S mfgadmin 1787 2011-04-18 07:42:18.321685-04 11 791 \N \N 35 50217-2 \N \N \N \N S jsmith 1788 2011-04-18 07:42:18.321685-04 11 791 \N \N 35 50217-2 \N \N \N \N S admin 1789 2011-04-18 07:42:18.321685-04 11 791 \N \N 35 50217-2 \N \N \N \N S mfgadmin 1790 2011-04-18 07:42:18.321685-04 33 602 \N \N 35 20104-1: DTRUCK1 \N \N \N \N P jsmith 1791 2011-04-18 07:42:18.321685-04 33 602 \N \N 35 20104-1: DTRUCK1 \N \N \N \N P admin 1792 2011-04-18 07:43:37.880664-04 13 761 \N \N 35 50205-2 \N \N \N \N S jsmith 1793 2011-04-18 07:43:37.880664-04 13 761 \N \N 35 50205-2 \N \N \N \N S admin 1794 2011-04-18 07:43:37.880664-04 13 761 \N \N 35 50205-2 \N \N \N \N S mfgadmin 1795 2011-04-18 07:53:10.127863-04 1 602 \N \N 35 10080-1 \N \N 2011-06-06 2011-03-28 W jsmith 1796 2011-04-18 07:53:10.127863-04 1 602 \N \N 35 10080-1 \N \N 2011-06-06 2011-03-28 W admin 1797 2011-04-18 07:53:10.127863-04 1 602 \N \N 35 10080-1 \N \N 2011-06-06 2011-03-28 W mfgadmin 1798 2011-04-18 07:53:10.127863-04 1 608 \N \N 35 10080-2 \N \N 2011-06-02 2011-03-27 W jsmith 1799 2011-04-18 07:53:10.127863-04 1 608 \N \N 35 10080-2 \N \N 2011-06-02 2011-03-27 W admin 1800 2011-04-18 07:53:10.127863-04 1 608 \N \N 35 10080-2 \N \N 2011-06-02 2011-03-27 W mfgadmin 1801 2011-04-18 07:53:35.513163-04 3 610 \N \N 35 10082-1 \N \N \N \N W jsmith 1802 2011-04-18 07:53:35.513163-04 3 610 \N \N 35 10082-1 \N \N \N \N W admin 1803 2011-04-18 07:53:35.513163-04 3 610 \N \N 35 10082-1 \N \N \N \N W mfgadmin 1804 2011-04-18 07:53:35.513163-04 3 611 \N \N 35 10082-2 \N \N \N \N W jsmith 1805 2011-04-18 07:53:35.513163-04 3 611 \N \N 35 10082-2 \N \N \N \N W admin 1806 2011-04-18 07:53:35.513163-04 3 611 \N \N 35 10082-2 \N \N \N \N W mfgadmin 1807 2011-04-18 07:54:07.337032-04 33 603 \N \N 35 20105-1: CHROMING \N \N \N \N P jsmith 1808 2011-04-18 07:54:07.337032-04 33 603 \N \N 35 20105-1: CHROMING \N \N \N \N P admin 1809 2011-04-18 07:54:48.594901-04 33 604 \N \N 35 20106-1: CHROMING \N \N \N \N P jsmith 1810 2011-04-18 07:54:48.594901-04 33 604 \N \N 35 20106-1: CHROMING \N \N \N \N P admin 1811 2011-04-18 07:57:33.949275-04 4 305 \N \N 35 CBUMP/WH1 \N \N \N \N I mfgadmin 1812 2011-04-18 07:57:33.949275-04 4 305 \N \N 35 CBUMP/WH1 \N \N \N \N I admin 1813 2011-04-18 07:57:33.949275-04 4 305 \N \N 35 CBUMP/WH1 \N \N \N \N I jsmith 1814 2011-04-18 13:43:08.067061-04 11 793 \N \N 35 50218-1 \N \N \N \N S jsmith 1815 2011-04-18 13:43:08.067061-04 11 793 \N \N 35 50218-1 \N \N \N \N S admin 1816 2011-04-18 13:43:08.067061-04 11 793 \N \N 35 50218-1 \N \N \N \N S mfgadmin 1817 2011-04-18 13:43:20.543329-04 13 793 \N \N 35 50218-1 \N \N \N \N S jsmith 1818 2011-04-18 13:43:20.543329-04 13 793 \N \N 35 50218-1 \N \N \N \N S admin 1819 2011-04-18 13:43:20.543329-04 13 793 \N \N 35 50218-1 \N \N \N \N S mfgadmin 1820 2011-06-03 16:12:05.084477-04 11 797 \N \N 35 50219-1 \N \N \N \N S jsmith 1821 2011-06-03 16:12:05.084477-04 11 797 \N \N 35 50219-1 \N \N \N \N S admin 1822 2011-06-03 16:12:05.084477-04 11 797 \N \N 35 50219-1 \N \N \N \N S mfgadmin 1823 2011-06-03 16:12:05.084477-04 33 605 \N \N 35 20107-1: DTRUCK1 \N \N \N \N P jsmith 1824 2011-06-03 16:12:05.084477-04 33 605 \N \N 35 20107-1: DTRUCK1 \N \N \N \N P admin 1825 2011-06-03 16:26:06.287401-04 11 799 \N \N 35 50220-1 \N \N \N \N S jsmith 1826 2011-06-03 16:26:06.287401-04 11 799 \N \N 35 50220-1 \N \N \N \N S admin 1827 2011-06-03 16:26:06.287401-04 11 799 \N \N 35 50220-1 \N \N \N \N S mfgadmin 1828 2011-06-03 16:26:06.287401-04 33 606 \N \N 35 20108-1: DTRUCK1 \N \N \N \N P jsmith 1829 2011-06-03 16:26:06.287401-04 33 606 \N \N 35 20108-1: DTRUCK1 \N \N \N \N P admin 1830 2011-06-03 16:28:42.031003-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I mfgadmin 1831 2011-06-03 16:28:42.031003-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I admin 1832 2011-06-03 16:28:42.031003-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I jsmith 1833 2011-06-03 16:30:08.321477-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I mfgadmin 1834 2011-06-03 16:30:08.321477-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I admin 1835 2011-06-03 16:30:08.321477-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I jsmith 1836 2011-06-03 16:35:13.758258-04 11 801 \N \N 35 50221-1 \N \N \N \N S jsmith 1837 2011-06-03 16:35:13.758258-04 11 801 \N \N 35 50221-1 \N \N \N \N S admin 1838 2011-06-03 16:35:13.758258-04 11 801 \N \N 35 50221-1 \N \N \N \N S mfgadmin 1839 2011-06-03 16:35:13.758258-04 33 607 \N \N 35 20109-1: DTRUCK1 \N \N \N \N P jsmith 1840 2011-06-03 16:35:13.758258-04 33 607 \N \N 35 20109-1: DTRUCK1 \N \N \N \N P admin 1841 2011-06-03 16:36:34.56468-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I mfgadmin 1842 2011-06-03 16:36:34.56468-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I admin 1843 2011-06-03 16:36:34.56468-04 4 381 \N \N 35 DTRUCK1/WH1 \N \N \N \N I jsmith 1844 2011-06-03 16:54:35.94698-04 3 614 \N \N 35 10084-1 \N \N \N \N W jsmith 1845 2011-06-03 16:54:35.94698-04 3 614 \N \N 35 10084-1 \N \N \N \N W admin 1846 2011-06-03 16:54:35.94698-04 3 614 \N \N 35 10084-1 \N \N \N \N W mfgadmin 1847 2011-06-03 16:54:44.74432-04 1 614 \N \N 35 10084-1 \N \N 2011-06-08 2011-06-03 W jsmith 1848 2011-06-03 16:54:44.74432-04 1 614 \N \N 35 10084-1 \N \N 2011-06-08 2011-06-03 W admin 1849 2011-06-03 16:54:44.74432-04 1 614 \N \N 35 10084-1 \N \N 2011-06-08 2011-06-03 W mfgadmin 1850 2011-06-03 16:57:40.379124-04 3 615 \N \N 35 10085-1 \N \N \N \N W jsmith 1851 2011-06-03 16:57:40.379124-04 3 615 \N \N 35 10085-1 \N \N \N \N W admin 1852 2011-06-03 16:57:40.379124-04 3 615 \N \N 35 10085-1 \N \N \N \N W mfgadmin 1853 2011-06-03 16:58:12.29632-04 8 615 \N \N 35 10085-1 \N \N \N \N W jsmith 1854 2011-06-03 16:58:12.29632-04 8 615 \N \N 35 10085-1 \N \N \N \N W admin 1855 2011-06-03 16:58:12.29632-04 8 615 \N \N 35 10085-1 \N \N \N \N W mfgadmin 1856 2011-06-15 11:18:41.853161-04 37 325 \N \N 35 YPAINT2 -Standard- New: 14.9000 Max: 2.0000 13.4100000000 13.4100000000 \N \N admin 1857 2011-06-15 11:18:41.853161-04 37 325 \N \N 35 YPAINT2 -Actual- New: 10.0000 Max: 2.0000 9.0000000000 13.4100000000 \N \N admin 1858 2011-06-15 11:18:41.853161-04 37 328 \N \N 35 STRUCK1 -Standard- New: 10.0000 Max: 5.0000 10.0000000000 10.0000000000 \N \N admin 1859 2011-06-15 11:18:41.853161-04 37 328 \N \N 36 STRUCK1 -Standard- New: 10.0000 Max: 5.0000 10.0000000000 10.0000000000 \N \N admin 1860 2011-06-15 11:18:41.853161-04 37 306 \N \N 35 TINSERT1 -Standard- New: 0.2500 Max: 0.1000 0.2500000000 0.2500000000 \N \N admin 1861 2011-06-15 11:18:41.853161-04 37 344 \N \N 35 TBOX2 -Standard- New: 0.2000 Max: 0.1000 0.2000000000 0.2000000000 \N \N admin 1862 2011-06-15 11:18:41.853161-04 37 305 \N \N 35 TBOX1 -Standard- New: 0.2000 Max: 0.1000 0.2000000000 0.2000000000 \N \N admin 1863 2011-06-15 11:18:41.853161-04 37 305 \N \N 35 TBOX1 -Actual- New: 0.2113 Max: 0.1000 0.2113000000 0.2000000000 \N \N admin 1864 2011-06-15 11:18:41.853161-04 37 328 \N \N 35 STRUCK1 -Actual- New: 12.1173 Max: 5.0000 2.1173000000 \N \N \N admin 1865 2011-06-15 11:18:41.853161-04 37 328 \N \N 36 STRUCK1 -Actual- New: 12.1173 Max: 5.0000 2.1173000000 \N \N \N admin 1866 2011-06-15 11:18:41.853161-04 37 328 \N \N 35 STRUCK1 -Actual- New: 12.1193 Max: 5.0000 0.0020000000 \N \N \N admin 1867 2011-06-15 11:18:41.853161-04 37 328 \N \N 36 STRUCK1 -Actual- New: 12.1193 Max: 5.0000 0.0020000000 \N \N \N admin 1868 2011-06-15 11:18:41.853161-04 37 328 \N \N 35 STRUCK1 -Standard- New: 12.1072 Max: 5.0000 2.1072000000 0.0000000000 \N \N admin 1869 2011-06-15 11:18:41.853161-04 37 328 \N \N 36 STRUCK1 -Standard- New: 12.1072 Max: 5.0000 2.1072000000 0.0000000000 \N \N admin 1870 2011-06-15 11:18:41.853161-04 37 328 \N \N 35 STRUCK1 -Standard- New: 12.1080 Max: 5.0000 0.0008000000 0.0000000000 \N \N admin 1871 2011-06-15 11:18:41.853161-04 37 328 \N \N 36 STRUCK1 -Standard- New: 12.1080 Max: 5.0000 0.0008000000 0.0000000000 \N \N admin 1872 2011-06-15 11:18:41.853161-04 37 325 \N \N 35 YPAINT2 -Standard- New: 10.4900 Max: 2.0000 9.0000000000 13.4100000000 \N \N admin 1873 2011-06-15 11:18:41.853161-04 37 328 \N \N 35 STRUCK1 -Standard- New: 12.1181 Max: 5.0000 2.1173000000 2.1185000000 \N \N admin 1874 2011-06-15 11:18:41.853161-04 37 328 \N \N 36 STRUCK1 -Standard- New: 12.1181 Max: 5.0000 2.1173000000 2.1185000000 \N \N admin 1875 2011-06-15 11:19:19.192094-04 13 633 \N \N 36 50170-1 \N \N \N \N S jsmith 1876 2011-06-15 11:19:19.192094-04 13 633 \N \N 36 50170-1 \N \N \N \N S admin 1877 2011-06-15 11:19:19.192094-04 13 633 \N \N 36 50170-1 \N \N \N \N S mfgadmin 1878 2011-06-15 11:19:19.192094-04 13 634 \N \N 36 50171-1 \N \N \N \N S jsmith 1879 2011-06-15 11:19:19.192094-04 13 634 \N \N 36 50171-1 \N \N \N \N S admin 1880 2011-06-15 11:19:19.192094-04 13 634 \N \N 36 50171-1 \N \N \N \N S mfgadmin \. -- -- Data for Name: evntnot; Type: TABLE DATA; Schema: public; Owner: admin -- COPY evntnot (evntnot_id, evntnot_evnttype_id, evntnot_warehous_id, evntnot_username) FROM stdin; 806 4 35 mfgadmin 807 16 35 mfgadmin 808 17 35 mfgadmin 809 15 35 mfgadmin 810 14 35 mfgadmin 811 13 35 mfgadmin 812 11 35 mfgadmin 813 10 35 mfgadmin 814 12 35 mfgadmin 815 5 35 mfgadmin 816 6 35 mfgadmin 817 7 35 mfgadmin 818 20 35 mfgadmin 819 21 35 mfgadmin 820 18 35 mfgadmin 821 19 35 mfgadmin 822 8 35 mfgadmin 823 3 35 mfgadmin 824 1 35 mfgadmin 825 2 35 mfgadmin 826 24 36 mfgadmin 827 24 35 mfgadmin 828 22 36 mfgadmin 829 22 35 mfgadmin 830 25 36 mfgadmin 831 25 35 mfgadmin 832 23 36 mfgadmin 833 23 35 mfgadmin 834 9 36 mfgadmin 835 9 35 mfgadmin 836 4 36 mfgadmin 837 26 35 mfgadmin 838 26 36 mfgadmin 839 28 35 mfgadmin 840 28 36 mfgadmin 841 27 35 mfgadmin 842 27 36 mfgadmin 843 31 35 mfgadmin 844 31 36 mfgadmin 845 32 35 mfgadmin 846 32 36 mfgadmin 847 29 35 mfgadmin 848 29 36 mfgadmin 849 30 35 mfgadmin 850 30 36 mfgadmin 851 16 36 mfgadmin 852 17 36 mfgadmin 853 15 36 mfgadmin 854 14 36 mfgadmin 855 13 36 mfgadmin 856 11 36 mfgadmin 857 10 36 mfgadmin 858 12 36 mfgadmin 859 5 36 mfgadmin 860 6 36 mfgadmin 861 7 36 mfgadmin 862 20 36 mfgadmin 863 21 36 mfgadmin 864 18 36 mfgadmin 865 19 36 mfgadmin 866 8 36 mfgadmin 867 3 36 mfgadmin 868 1 36 mfgadmin 869 2 36 mfgadmin 870 24 37 admin 871 24 35 admin 872 24 36 admin 873 22 37 admin 874 22 35 admin 875 22 36 admin 876 25 37 admin 877 25 35 admin 878 25 36 admin 879 23 37 admin 880 23 35 admin 881 23 36 admin 882 9 37 admin 883 9 35 admin 884 9 36 admin 885 4 37 admin 886 4 35 admin 887 4 36 admin 888 28 37 admin 889 28 35 admin 890 28 36 admin 891 27 37 admin 892 27 35 admin 893 27 36 admin 894 31 37 admin 895 31 35 admin 896 31 36 admin 897 32 37 admin 898 32 35 admin 899 32 36 admin 900 29 37 admin 901 29 35 admin 902 29 36 admin 903 30 37 admin 904 30 35 admin 905 30 36 admin 906 26 37 admin 907 26 35 admin 908 26 36 admin 909 33 37 admin 910 33 35 admin 911 33 36 admin 912 16 37 admin 913 16 35 admin 914 16 36 admin 915 17 37 admin 916 17 35 admin 917 17 36 admin 918 13 37 admin 919 13 35 admin 920 13 36 admin 921 11 37 admin 922 11 35 admin 923 11 36 admin 924 10 37 admin 925 10 35 admin 926 10 36 admin 927 12 37 admin 928 12 35 admin 929 12 36 admin 930 15 37 admin 931 15 35 admin 932 15 36 admin 933 14 37 admin 934 14 35 admin 935 14 36 admin 936 5 37 admin 937 5 35 admin 938 5 36 admin 939 6 37 admin 940 6 35 admin 941 6 36 admin 942 7 37 admin 943 7 35 admin 944 7 36 admin 945 8 37 admin 946 8 35 admin 947 8 36 admin 948 20 37 admin 949 20 35 admin 950 20 36 admin 951 21 37 admin 952 21 35 admin 953 21 36 admin 954 3 37 admin 955 3 35 admin 956 3 36 admin 957 18 37 admin 958 18 35 admin 959 18 36 admin 960 19 37 admin 961 19 35 admin 962 19 36 admin 963 1 37 admin 964 1 35 admin 965 1 36 admin 966 2 37 admin 967 2 35 admin 968 2 36 admin 969 24 37 jsmith 970 24 36 jsmith 971 24 35 jsmith 972 22 37 jsmith 973 22 36 jsmith 974 22 35 jsmith 975 25 37 jsmith 976 25 36 jsmith 977 25 35 jsmith 978 23 37 jsmith 979 23 36 jsmith 980 23 35 jsmith 981 9 37 jsmith 982 9 36 jsmith 983 9 35 jsmith 984 4 37 jsmith 985 4 36 jsmith 986 4 35 jsmith 987 28 37 jsmith 988 28 36 jsmith 989 28 35 jsmith 990 27 37 jsmith 991 27 36 jsmith 992 27 35 jsmith 993 31 37 jsmith 994 31 36 jsmith 995 31 35 jsmith 996 32 37 jsmith 997 32 36 jsmith 998 32 35 jsmith 999 29 37 jsmith 1000 29 36 jsmith 1001 29 35 jsmith 1002 30 37 jsmith 1003 30 36 jsmith 1004 30 35 jsmith 1005 26 37 jsmith 1006 26 36 jsmith 1007 26 35 jsmith 1008 33 37 jsmith 1009 33 36 jsmith 1010 33 35 jsmith 1011 16 37 jsmith 1012 16 36 jsmith 1013 16 35 jsmith 1014 17 37 jsmith 1015 17 36 jsmith 1016 17 35 jsmith 1017 13 37 jsmith 1018 13 36 jsmith 1019 13 35 jsmith 1020 11 37 jsmith 1021 11 36 jsmith 1022 11 35 jsmith 1023 10 37 jsmith 1024 10 36 jsmith 1025 10 35 jsmith 1026 12 37 jsmith 1027 12 36 jsmith 1028 12 35 jsmith 1029 15 37 jsmith 1030 15 36 jsmith 1031 15 35 jsmith 1032 14 37 jsmith 1033 14 36 jsmith 1034 14 35 jsmith 1035 5 37 jsmith 1036 5 36 jsmith 1037 5 35 jsmith 1038 6 37 jsmith 1039 6 36 jsmith 1040 6 35 jsmith 1041 7 37 jsmith 1042 7 36 jsmith 1043 7 35 jsmith 1044 8 37 jsmith 1045 8 36 jsmith 1046 8 35 jsmith 1047 20 37 jsmith 1048 20 36 jsmith 1049 20 35 jsmith 1050 21 37 jsmith 1051 21 36 jsmith 1052 21 35 jsmith 1053 3 37 jsmith 1054 3 36 jsmith 1055 3 35 jsmith 1056 18 37 jsmith 1057 18 36 jsmith 1058 18 35 jsmith 1059 19 37 jsmith 1060 19 36 jsmith 1061 19 35 jsmith 1062 1 37 jsmith 1063 1 36 jsmith 1064 1 35 jsmith 1065 2 37 jsmith 1066 2 36 jsmith 1067 2 35 jsmith 1068 36 37 jsmith 1069 36 35 jsmith 1070 36 36 jsmith 1071 34 37 jsmith 1072 34 35 jsmith 1073 34 36 jsmith 1074 35 37 admin 1075 35 39 admin 1076 35 35 admin 1077 35 36 admin 1078 35 40 admin 1079 36 37 admin 1080 36 39 admin 1081 36 35 admin 1082 36 36 admin 1083 36 40 admin 1084 34 37 admin 1085 34 39 admin 1086 34 35 admin 1087 34 36 admin 1088 34 40 admin 1089 37 37 admin 1090 37 39 admin 1091 37 35 admin 1092 37 36 admin 1093 37 40 admin \. -- -- Data for Name: evnttype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY evnttype (evnttype_id, evnttype_name, evnttype_descrip, evnttype_module) FROM stdin; 1 WoDueDateChanged Work Order Due Date Changed W/O 2 WoQtyChanged Work Order Qty. Changed W/O 3 WoCreated Work Order Created W/O 4 QOHBelowZero QOH Dropped to a Negative Value I/M 5 RWoDueDateRequestChange Request to Change Released Due Date W/O 6 RWoQtyRequestChange Request to Change Released W/O Qty. W/O 7 RWoRequestCancel Request to Cancel Released W/O W/O 8 WoCancelled Work Order Canceled W/O 9 CannotDistributeTransToGL Cannot Distribute an Inventory Transaction to the G/L G/L 10 SoitemQtyChanged Sales Order Qty. Changed S/O 11 SoitemCreated Sales Order Item Added S/O 12 SoitemSchedDateChanged Sales Order Item Ship Date Changed S/O 13 SoitemCancelled Sales Order Item Cancelled S/O 14 SoReleased Sales Order Released S/O 16 CannotConvertQuote Cannot Convert a Quote to a Sales Order S/O 17 DetachCCPayFromSO Detached Credit Card payment from S/O S/O 18 WODoubleClockIn User clocked in to a Work Order without having previously clocked out W/O 19 WODoubleClockOut User clocked out of a Work Order without having previously clocked in W/O 20 WOClockInOnClosedJob User clocked in to a closed Work Order W/O 21 WOClockOutWNoClockIn User clocked out of a Work Order on which s/he was not clocked in W/O 22 NewIncident New Incident Created CRM 23 UpdatedIncident Incident Modified CRM 24 ClosedIncident Incident Closed CRM 25 ReopenedIncident Incident Which had been closed previously is being reopened CRM 27 ToitemCreated Transfer Order Item Created I/M 15 SoNotesChanged Sales Order Order Comments Changed S/O 29 ToitemQtyChanged Transfer Order Item Qty. Changed I/M 30 ToitemSchedDateChanged Transfer Order Item Ship Date Changed I/M 31 ToitemNoDestItemSite Transfer Order Item created without an Item Site at the Destination Warehouse. I/M 32 ToitemNoTransitItemSite Transfer Order Item created without an Item Site at the Transit Warehouse. I/M 28 ToitemCancelled Transfer Order Item Cancelled I/M 26 ToNotesChanged Transfer Order Comments Changed I/M 33 POitemCreate Purchase Order Purchased Item Line Added P/O 34 TodoAlarm To-Do Item Alarm CRM 35 IncidentAlarm Incident Alarm CRM 36 TaskAlarm Project Task Alarm CRM 37 CostExceedsMaxDesired Cost Exceeds Max Desired P/D 38 PoItemCreatedBySo Purchase Order Item Created by a Sales Order P/O 39 PoItemUpdatedBySo Purchase Order Item Updated by a Sales Order P/O 40 PoItemSoCancelled The Sales Order item has been cancelled for a linked Purchase Item P/O 41 PoItemDropShipped A Purchase Order Item has been Drop Shipped P/O 42 CashReceiptPosted A Cash Receipt has been posted G/L 45 NewCustomer A new Customer has been created S/O \. -- -- Data for Name: expcat; Type: TABLE DATA; Schema: public; Owner: admin -- COPY expcat (expcat_id, expcat_code, expcat_descrip, expcat_exp_accnt_id, expcat_liability_accnt_id, expcat_active, expcat_purchprice_accnt_id, expcat_freight_accnt_id) FROM stdin; 16 OFFICE Office Supplies 97 95 t 125 98 19 NC TAX NC Sales Tax Payment 129 95 t 125 98 15 SHOP SUPPLIES Shop Supplies 131 95 t 125 98 18 VA TAX VA Sales Tax 102 95 t 125 98 21 CAPITAL PURCHASE Capital Purchase 111 95 t 125 98 23 TRAVEL Travel Expenses 159 95 t 125 98 22 FIXED ASSET Fixed Asset Purchase 111 95 t 125 98 17 OUTBOUND FREIGHT Outbound Shipping Charges 120 95 t 125 98 20 INBOUND FREIGHT Inbound Freight Charges 139 95 t 125 98 24 PROFESSIONAL SERVICES Professional Services 160 95 t 125 98 \. -- -- Data for Name: file; Type: TABLE DATA; Schema: public; Owner: admin -- COPY file (file_id, file_title, file_stream, file_descrip) FROM stdin; 1 Project Contract \\320\\317\\021\\340\\241\\261\\032\\341\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000;\\000\\003\\000\\376\\377\\011\\000\\006\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001\\000\\000\\0002\\000\\000\\000\\000\\000\\000\\000\\000\\020\\000\\000\\002\\000\\000\\000\\001\\000\\000\\000\\376\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\375\\377\\377\\377\\377\\377\\377\\377\\376\\377\\377\\377\\004\\000\\000\\000\\005\\000\\000\\000\\006\\000\\000\\000\\007\\000\\000\\000\\376\\377\\377\\377\\011\\000\\000\\000\\012\\000\\000\\000\\013\\000\\000\\000\\014\\000\\000\\000\\015\\000\\000\\000\\016\\000\\000\\000\\017\\000\\000\\000\\020\\000\\000\\000\\021\\000\\000\\000\\022\\000\\000\\000\\023\\000\\000\\000\\024\\000\\000\\000\\025\\000\\000\\000\\026\\000\\000\\000\\027\\000\\000\\000\\030\\000\\000\\000\\031\\000\\000\\000\\032\\000\\000\\000\\033\\000\\000\\000\\034\\000\\000\\000\\035\\000\\000\\000\\036\\000\\000\\000\\037\\000\\000\\000 \\000\\000\\000!\\000\\000\\000"\\000\\000\\000#\\000\\000\\000$\\000\\000\\000%\\000\\000\\000&\\000\\000\\000'\\000\\000\\000(\\000\\000\\000)\\000\\000\\000*\\000\\000\\000+\\000\\000\\000,\\000\\000\\000-\\000\\000\\000.\\000\\000\\000/\\000\\000\\0000\\000\\000\\0001\\000\\000\\000\\376\\377\\377\\3773\\000\\000\\000\\376\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377R\\000o\\000o\\000t\\000 \\000E\\000n\\000t\\000r\\000y\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\026\\000\\005\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\376\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\376\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\376\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\376\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\001\\000\\000\\000\\376\\377\\377\\377\\376\\377\\377\\377\\004\\000\\000\\000\\005\\000\\000\\000\\006\\000\\000\\000\\007\\000\\000\\000\\010\\000\\000\\000\\011\\000\\000\\000\\012\\000\\000\\000\\013\\000\\000\\000\\014\\000\\000\\000\\015\\000\\000\\000\\016\\000\\000\\000\\017\\000\\000\\000\\020\\000\\000\\000\\021\\000\\000\\000\\022\\000\\000\\000\\023\\000\\000\\000\\024\\000\\000\\000\\025\\000\\000\\000\\026\\000\\000\\000\\027\\000\\000\\000\\030\\000\\000\\000\\031\\000\\000\\000\\032\\000\\000\\000\\033\\000\\000\\000\\034\\000\\000\\000\\035\\000\\000\\000\\376\\377\\377\\377\\037\\000\\000\\000 \\000\\000\\000!\\000\\000\\000\\376\\377\\377\\377#\\000\\000\\000\\376\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\001\\000\\376\\377\\003\\012\\000\\000\\377\\377\\377\\377\\006\\011\\002\\000\\000\\000\\000\\000\\300\\000\\000\\000\\000\\000\\000F\\030\\000\\000\\000Microsoft Word-Dokument\\000\\012\\000\\000\\000MSWordDoc\\000\\020\\000\\000\\000Word.Document.8\\000\\3649\\262q\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001\\000\\000\\002\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\022\\000\\026\\000\\012\\000\\001\\000[\\000\\017\\000\\002\\000\\000\\000\\000\\000\\000\\000f\\000\\000\\020\\361\\377\\002\\000f\\000\\000\\000\\007\\000D\\000e\\000f\\000a\\000u\\000l\\000t\\000\\000\\000\\021\\000\\000\\000\\003$\\000a$\\0001$\\000*$\\001A$\\000\\0003\\000B*\\000OJ\\000\\000QJ\\000\\000CJ\\030\\000mH\\011\\004sH\\011\\004KH\\001\\000PJ\\003\\000nH\\004\\010^J\\004\\000aJ\\030\\000_H9\\004tH9\\004\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000B\\000A@\\362\\377\\241\\000B\\000\\000\\000\\031\\000A\\000b\\000s\\000a\\000t\\000z\\000-\\000S\\000t\\000a\\000n\\000d\\000a\\000r\\000d\\000s\\000c\\000h\\000r\\000i\\000f\\000t\\000a\\000r\\000t\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000B\\000\\376\\037\\362\\377\\361\\000B\\000\\000\\000\\031\\000A\\000b\\000s\\000a\\000t\\000z\\000-\\000S\\000t\\000a\\000n\\000d\\000a\\000r\\000d\\000s\\000c\\000h\\000r\\000i\\000f\\000t\\000a\\000r\\000t\\000\\000\\000\\000\\000H\\000\\376\\037\\362\\377\\001\\001H\\000\\000\\000\\034\\000W\\000W\\000-\\000A\\000b\\000s\\000a\\000t\\000z\\000-\\000S\\000t\\000a\\000n\\000d\\000a\\000r\\000d\\000s\\000c\\000h\\000r\\000i\\000f\\000t\\000a\\000r\\000t\\000\\000\\000\\000\\000F\\000\\376\\037\\001\\000"\\001F\\000\\000\\000\\007\\000H\\000e\\000a\\000d\\000i\\000n\\000g\\000\\000\\000\\015\\000\\021\\000\\023\\244\\360\\000\\024\\244x\\000\\006$\\001\\000\\030\\000OJ\\002\\000QJ\\002\\000CJ\\034\\000PJ\\003\\000^J\\004\\000aJ\\034\\000.\\000B\\020\\001\\000"\\001.\\000\\000\\000\\011\\000T\\000e\\000x\\000t\\000 \\000b\\000o\\000d\\000y\\000\\000\\000\\012\\000\\022\\000\\023\\244\\000\\000\\024\\244x\\000\\000\\000 \\000/\\020!\\0012\\001 \\000\\000\\000\\004\\000L\\000i\\000s\\000t\\000\\000\\000\\002\\000\\023\\000\\004\\000^J\\005\\000@\\000\\376\\037\\001\\000B\\001@\\000\\000\\000\\007\\000C\\000a\\000p\\000t\\000i\\000o\\000n\\000\\000\\000\\015\\000\\024\\000\\023\\244x\\000\\024\\244x\\000\\014$\\001\\000\\022\\000CJ\\030\\0006\\010\\001^J\\005\\000aJ\\030\\000]\\010\\001&\\000\\376\\037\\001\\000R\\001&\\000\\000\\000\\005\\000I\\000n\\000d\\000e\\000x\\000\\000\\000\\005\\000\\025\\000\\014$\\001\\000\\004\\000^J\\005\\000\\000\\000\\000\\000\\366!\\000\\000\\004\\000\\000R\\000\\000\\000\\000\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\010\\000\\000\\354K\\000\\000&\\000\\000\\000\\000\\010\\000\\000\\\\5\\000\\000\\354K\\000\\000'\\000\\000\\000(\\000\\000\\000\\000\\000\\000\\000\\366!\\000\\000\\000\\000\\000\\000\\002\\020\\000\\000\\000\\000\\000\\000\\000\\366!\\000\\000P\\000\\000\\010\\000\\000\\000\\000\\006\\000\\000\\000G\\026\\220\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000T\\000i\\000m\\000e\\000s\\000 \\000N\\000e\\000w\\000 \\000R\\000o\\000m\\000a\\000n\\000\\000\\0005\\026\\220\\001\\002\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000S\\000y\\000m\\000b\\000o\\000l\\000\\000\\0003&\\220\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000A\\000r\\000i\\000a\\000l\\000\\000\\0005\\006\\220\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000S\\000i\\000m\\000S\\000u\\000n\\000\\000\\0005\\006\\220\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000M\\000a\\000n\\000g\\000a\\000l\\000\\000\\0005\\004\\220\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000M\\000a\\000n\\000g\\000a\\000l\\000\\000\\000B\\000\\004\\000\\001\\010\\215\\030\\000\\000\\305\\002\\000\\000h\\001\\000\\000\\000\\000Z\\302\\354\\246\\000\\000\\000\\000\\000\\000\\000\\000\\001\\000\\000\\000\\000\\000O\\005\\000\\000\\335!\\000\\000\\003\\000\\015\\000\\000\\000\\004\\000\\203\\220\\015\\000\\000\\000O\\005\\000\\000\\335!\\000\\000\\003\\000\\015\\000\\000\\000\\015\\000\\000\\000\\000\\000\\000\\000'\\003\\000 \\000\\000\\000\\000\\000\\004\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\0220\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\002\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000 \\000\\000\\004\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\0000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\200\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\376\\377\\000\\000\\001\\000\\002\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\001\\000\\000\\000\\340\\205\\237\\362\\371Oh\\020\\253\\221\\010\\000+'\\263\\3310\\000\\000\\000\\234\\000\\000\\000\\007\\000\\000\\000\\001\\000\\000\\000@\\000\\000\\000\\004\\000\\000\\000H\\000\\000\\000\\011\\000\\000\\000`\\000\\000\\000\\012\\000\\000\\000l\\000\\000\\000\\013\\000\\000\\000x\\000\\000\\000\\014\\000\\000\\000\\204\\000\\000\\000\\015\\000\\000\\000\\220\\000\\000\\000\\002\\000\\000\\000\\351\\375\\000\\000\\036\\000\\000\\000\\016\\000\\000\\000Mike Atherton\\000\\000\\000\\036\\000\\000\\000\\002\\000\\000\\0000\\000\\000\\000@\\000\\000\\000\\000\\346\\211\\304\\314\\022\\000\\000@\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000@\\000\\000\\000\\000\\002*\\215v\\243\\313\\001@\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\376\\377\\000\\000\\001\\000\\002\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\002\\000\\000\\000\\002\\325\\315\\325\\234.\\033\\020\\223\\227\\010\\000+,\\371\\256D\\000\\000\\000\\005\\325\\315\\325\\234.\\033\\020\\223\\227\\010\\000+,\\371\\256\\\\\\000\\000\\000\\030\\000\\000\\000\\001\\000\\000\\000\\001\\000\\000\\000\\020\\000\\000\\000\\002\\000\\000\\000\\351\\375\\000\\000\\030\\000\\000\\000\\001\\000\\000\\000\\001\\000\\000\\000\\020\\000\\000\\000\\002\\000\\000\\000\\351\\375\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\354\\245\\001\\001M \\011\\004\\000\\000\\000\\022\\277\\000\\000\\000\\000\\000\\0000\\000\\000\\000\\000\\000\\010\\000\\000\\354K\\000\\000\\016\\000Caolan80\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\011\\004\\026\\0002R\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\366!\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\377\\377\\017\\000&\\000\\000\\000\\001\\000\\000\\000\\377\\377\\017\\000'\\000\\000\\000\\002\\000\\000\\000\\377\\377\\017\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\210\\000\\000\\000\\000\\000l\\002\\000\\000\\000\\000\\000\\000l\\002\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000l\\002\\000\\000\\024\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\200\\002\\000\\0004\\000\\000\\000\\264\\002\\000\\000\\014\\000\\000\\000\\300\\002\\000\\000\\024\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\365\\002\\000\\000X\\001\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\324\\002\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000M\\004\\000\\000b\\002\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\340\\002\\000\\000\\025\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\324\\002\\000\\000\\014\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\002\\000\\331\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000P\\000r\\000o\\000j\\000e\\000c\\000t\\000 \\000G\\000r\\000e\\000e\\000n\\000l\\000e\\000a\\000f\\000 \\000C\\000o\\000n\\000t\\000r\\000a\\000c\\000t\\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000S\\000t\\000i\\000l\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000H\\000o\\000w\\000 \\000a\\000b\\000o\\000u\\000t\\000 \\000a\\000 \\000h\\000a\\000n\\000d\\000s\\000h\\000a\\000k\\000e\\000 \\000n\\000e\\000x\\000t\\000 \\000t\\000i\\000m\\000e\\000.\\000 \\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000,\\000 \\000t\\000h\\000i\\000s\\000 \\000i\\000s\\000 \\000t\\000e\\000d\\000i\\000o\\000u\\000s\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000S\\000t\\000i\\000l\\000l\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000H\\000o\\000w\\000 \\000a\\000b\\000o\\000u\\000t\\000 \\000a\\000 \\000h\\000a\\000n\\000d\\000s\\000h\\000a\\000k\\000e\\000 \\000n\\000e\\000x\\000t\\000 \\000t\\000i\\000m\\000e\\000.\\000 \\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000S\\000t\\000i\\000l\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000H\\000o\\000w\\000 \\000a\\000b\\000o\\000u\\000t\\000 \\000a\\000 \\000h\\000a\\000n\\000d\\000s\\000h\\000a\\000k\\000e\\000 \\000n\\000e\\000x\\000t\\000 \\000t\\000i\\000m\\000e\\000.\\000 \\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000,\\000 \\000t\\000h\\000i\\000s\\000 \\000i\\000s\\000 \\000t\\000e\\000d\\000i\\000o\\000u\\000s\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000S\\000t\\000i\\000l\\000l\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000H\\000o\\000w\\000 \\000a\\000b\\000o\\000u\\000t\\000 \\000a\\000 \\000h\\000a\\000n\\000d\\000s\\000h\\000a\\000k\\000e\\000 \\000n\\000e\\000x\\000t\\000 \\000t\\000i\\000m\\000e\\000.\\000 \\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000S\\000t\\000i\\000l\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000H\\000o\\000w\\000 \\000a\\000b\\000o\\000u\\000t\\000 \\000a\\000 \\000h\\000a\\000n\\000d\\000s\\000h\\000a\\000k\\000e\\000 \\000n\\000e\\000x\\000t\\000 \\000t\\000i\\000m\\000e\\000.\\000 \\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000,\\000 \\000t\\000h\\000i\\000s\\000 \\000i\\000s\\000 \\000t\\000e\\000d\\000i\\000o\\000u\\000s\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000S\\000t\\000i\\000l\\000l\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000\\015\\000\\015\\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000A\\000n\\000d\\000 \\000a\\000l\\000s\\000o\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000R\\000e\\000a\\000l\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000I\\000 \\000t\\000o\\000l\\000d\\000 \\000y\\000o\\000u\\000,\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000J\\000i\\000b\\000b\\000e\\000r\\000i\\000s\\000h\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000M\\000o\\000r\\000e\\000 \\000l\\000e\\000a\\000g\\000a\\000l\\000 \\000j\\000u\\000n\\000k\\000.\\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000H\\000o\\000w\\000 \\000a\\000b\\000o\\000u\\000t\\000 \\000a\\000 \\000h\\000a\\000n\\000d\\000s\\000h\\000a\\000k\\000e\\000 \\000n\\000e\\000x\\000t\\000 \\000t\\000i\\000m\\000e\\000.\\000 \\000 \\000 \\000T\\000h\\000i\\000s\\000 \\000s\\000a\\000y\\000s\\000 \\000a\\000b\\000s\\000o\\000l\\000u\\000t\\000e\\000l\\000y\\000 \\000n\\000o\\000t\\000h\\000i\\000n\\000g\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000n\\000d\\000 \\000o\\000v\\000e\\000r\\000 \\000a\\000g\\000a\\000i\\000n\\000.\\000 \\000 \\000 \\000\\015\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\010\\000\\0006\\010\\000\\0008\\010\\000\\000\\324\\017\\000\\000\\326\\017\\000\\000\\344\\024\\000\\000\\346\\024\\000\\000\\244\\030\\000\\000\\246\\030\\000\\000\\310\\036\\000\\000\\312\\036\\000\\000f&\\000\\000h&\\000\\000v+\\000\\000x+\\000\\0006/\\000\\0008/\\000\\000Z5\\000\\000\\\\5\\000\\000\\370<\\000\\000\\372<\\000\\000\\010B\\000\\000\\012B\\000\\000\\310E\\000\\000\\312E\\000\\000\\354K\\000\\000\\372\\361\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\350\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\021>*\\0005\\010\\000\\\\\\010\\000OJ\\001\\000QJ\\001\\000\\021>*\\0015\\010\\001\\\\\\010\\001OJ\\001\\000QJ\\001\\000\\011>*\\0015\\010\\001\\\\\\010\\001\\000\\031\\000\\010\\000\\0006\\010\\000\\0008\\010\\000\\000\\324\\017\\000\\000\\326\\017\\000\\000\\344\\024\\000\\000\\346\\024\\000\\000\\244\\030\\000\\000\\246\\030\\000\\000\\310\\036\\000\\000\\312\\036\\000\\000f&\\000\\000h&\\000\\000v+\\000\\000x+\\000\\0006/\\000\\0008/\\000\\000Z5\\000\\000\\\\5\\000\\000\\372\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\365\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\360\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\353\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\346\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\341\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\334\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\327\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\322\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\315\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\303\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\276\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\271\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\264\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\257\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\252\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\245\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\001a$\\001\\000\\004\\000\\000\\003$\\001a$\\001\\000\\022\\\\5\\000\\000\\370<\\000\\000\\372<\\000\\000\\010B\\000\\000\\012B\\000\\000\\310E\\000\\000\\312E\\000\\000\\354K\\000\\000\\372\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\365\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\360\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\353\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\346\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\341\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\334\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\004\\000\\000\\003$\\000a$\\000\\000\\0070\\000\\037\\260\\320/ \\260\\340=!\\260n\\004"\\260n\\004#\\220n\\004$\\220n\\0042P\\000\\0001\\220h\\0010p\\000\\000\\000\\0003P\\000\\000(2\\000\\0160\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000R\\000o\\000o\\000t\\000 \\000E\\000n\\000t\\000r\\000y\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\026\\000\\005\\000\\377\\377\\377\\377\\377\\377\\377\\377\\001\\000\\000\\000\\006\\011\\002\\000\\000\\000\\000\\000\\300\\000\\000\\000\\000\\000\\000F\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\003\\000\\000\\000\\000\\011\\000\\000\\000\\000\\000\\000\\001\\000C\\000o\\000m\\000p\\000O\\000b\\000j\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\022\\000\\002\\000\\002\\000\\000\\000\\004\\000\\000\\000\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000j\\000\\000\\000\\000\\000\\000\\000\\001\\000O\\000l\\000e\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\012\\000\\002\\000\\377\\377\\377\\377\\003\\000\\000\\000\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\002\\000\\000\\000\\024\\000\\000\\000\\000\\000\\000\\0001\\000T\\000a\\000b\\000l\\000e\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\016\\000\\002\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\003\\000\\000\\000\\257\\006\\000\\000\\000\\000\\000\\000\\005\\000S\\000u\\000m\\000m\\000a\\000r\\000y\\000I\\000n\\000f\\000o\\000r\\000m\\000a\\000t\\000i\\000o\\000n\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000(\\000\\002\\000\\005\\000\\000\\000\\006\\000\\000\\000\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\036\\000\\000\\000\\314\\000\\000\\000\\000\\000\\000\\000W\\000o\\000r\\000d\\000D\\000o\\000c\\000u\\000m\\000e\\000n\\000t\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\032\\000\\002\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\010\\000\\000\\0002R\\000\\000\\000\\000\\000\\000\\005\\000D\\000o\\000c\\000u\\000m\\000e\\000n\\000t\\000S\\000u\\000m\\000m\\000a\\000r\\000y\\000I\\000n\\000f\\000o\\000r\\000m\\000a\\000t\\000i\\000o\\000n\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\0008\\000\\002\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000"\\000\\000\\000t\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\376\\377\\377\\377\\000\\000\\000\\000\\000\\000\\000\\000 Project Contract \. -- -- Data for Name: filter; Type: TABLE DATA; Schema: public; Owner: admin -- COPY filter (filter_id, filter_screen, filter_value, filter_username, filter_name, filter_selected) FROM stdin; 2 incidentWorkbench \N All f 3 incidentWorkbench categorylist:5:6`status_above:5:4` \N ECO Open f 5 dspInventoryAvailability warehous_id:35:12` \N WH1 - Look Ahead Days f \. -- -- Data for Name: flcol; Type: TABLE DATA; Schema: public; Owner: admin -- COPY flcol (flcol_id, flcol_flhead_id, flcol_name, flcol_descrip, flcol_report_id, flcol_month, flcol_quarter, flcol_year, flcol_showdb, flcol_prcnt, flcol_priortype, flcol_priormonth, flcol_priorquarter, flcol_prioryear, flcol_priorprcnt, flcol_priordiff, flcol_priordiffprcnt, flcol_budget, flcol_budgetprcnt, flcol_budgetdiff, flcol_budgetdiffprcnt) FROM stdin; 1 18 Current Current Month 375 t f f f t P f f N f f f f f f f 2 18 Current, Budget Current to Budget 376 t f f f f P f f N f f f t f t t 3 18 Current, Prior Month Current to Prior Month End 377 t f f f f P t f N f t t f f f f 4 18 Current, Prior Quarter Current to Prior Quarter End 386 t f f f f P f t N f t t f f f f 5 18 Current, Prior Year Current to Prior Year End 378 t f f f f P f f F f t t f f f f 6 18 Current, Year Ago Current to Month Prior Year 377 t f f f f Y t f N f t t f f f f 7 19 Month Current Month 375 t f f f t P f f N f f f f f f f 8 19 Month, Budget Current Month to Budget 376 t f f f f P f f N f f f t f t t 9 19 Month, Prior Month Current Month to Prior Month 377 t f f f f P t f N f t t f f f f 10 19 Month, YTD Month and Year to Date 374 t f t f t P f f N f f f f f f f 11 19 Month, QTD Month and Quarter to Date 379 t t f f t P f f N f f f f f f f 12 19 QTD, Budget Quarter to Date to Budget 381 f t f f f P f f N f f f t f t t 13 19 QTD, Prior Quarter Quarter to Date to Prior Quarter 382 f t f f f P f t N f t t f f f f 14 19 YTD Year To Date 383 f f t f t P f f N f f f f f f f 15 19 YTD, Budget Year to Date to Budget 384 f f t f f P f f N f f f t f t t 16 19 YTD, Prior Full Year Year to Date to Prior Full Year 385 f f t f f P f f F f t t f f f f 17 19 Month, Prior Year Month Current Month to Same Month Prior Year 377 t f f f f Y t f N f t t f f f f 19 19 YTD, Prior Year YTD Year to Date to Year to Date Prior Year 385 f f t f f P f f D f t t f f f f 20 19 QTD Quarter to Date 380 f t f f t P f f N f f f f f f f 21 20 Month Current Month 375 t f f f t P f f N f f f f f f f 22 20 Month, Budget Current Month to Budget 376 t f f f f P f f N f f f t f t t 23 20 Month, Prior Month Current Month to Prior Month 377 t f f f f P t f N f t t f f f f 24 20 Month, YTD Month and Year to Date 374 t f t f t P f f N f f f f f f f 25 20 Month, QTD Month and Quarter to Date 379 t t f f t P f f N f f f f f f f 26 20 QTD, Budget Quarter to Date to Budget 381 f t f f f P f f N f f f t f t t 27 20 QTD, Prior Quarter Quarter to Date to Prior Quarter 382 f t f f f P f t N f t t f f f f 28 20 YTD Year To Date 383 f f t f t P f f N f f f f f f f 29 20 YTD, Budget Year to Date to Budget 384 f f t f f P f f N f f f t f t t 30 20 YTD, Prior Full Year Year to Date to Prior Full Year 385 f f t f f P f f F f t t f f f f 31 20 Month, Prior Year Month Current Month to Same Month Prior Year 377 t f f f f Y t f N f t t f f f f 33 20 YTD, Prior Year YTD Year to Date to Year to Date Prior Year 385 f f t f f P f f D f t t f f f f 34 20 QTD Quarter to Date 380 f t f f t P f f N f f f f f f f 35 21 Current Current Month 375 t f f f t P f f N f f f f f f f 36 21 Current, Budget Current to Budget 376 t f f f f P f f N f f f t f t t 37 21 Current, Prior Month Current to Prior Month End 377 t f f f f P t f N f t t f f f f 38 21 Current, Prior Quarter Current to Prior Quarter End 386 t f f f f P f t N f t t f f f f 39 21 Current, Prior Year Current to Prior Year End 378 t f f f f P f f F f t t f f f f 40 21 Current, Year Ago Current to Month Prior Year 377 t f f f f Y t f N f t t f f f f 18 19 QTD, Prior Year Quarter Quarter to Date to Same Quarter Prior Year 382 f t f f f Y f t N f t t f f f f 32 20 QTD, Prior Year Quarter Quarter to Date to Same Quarter Prior Year 382 f t f f f Y f t N f t t f f f f 47 24 Current Current Period 375 t f f f t P f f N f f f f f f f 49 24 Current, Prior Period Current, Prior Period 377 t f f f t P t f N f f f f f f f 50 24 Current Quarter, Prior Year Quarter Current Quarter, Prior Year Quarter 382 f t f f f Y f t N f f f f f f f 51 24 Current Period, YTD Current Period, YTD 374 t f t f f Y f f N f f f f f f f \. -- -- Data for Name: flgrp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY flgrp (flgrp_id, flgrp_flhead_id, flgrp_flgrp_id, flgrp_order, flgrp_name, flgrp_descrip, flgrp_subtotal, flgrp_summarize, flgrp_subtract, flgrp_showstart, flgrp_showend, flgrp_showdelta, flgrp_showbudget, flgrp_showstartprcnt, flgrp_showendprcnt, flgrp_showdeltaprcnt, flgrp_showbudgetprcnt, flgrp_prcnt_flgrp_id, flgrp_showdiff, flgrp_showdiffprcnt, flgrp_showcustom, flgrp_showcustomprcnt, flgrp_usealtsubtotal, flgrp_altsubtotal) FROM stdin; 45 11 44 1 Current Assets Current Assets t f f f t f f f t f f 44 f f t f t Total Current Assets 3 4 -1 1 REVENUE REVENUE t f f f t f t f t f t 4 t t t t t Total Net Revenue 7 4 -1 2 EXPENSES EXPENSES f f t f f f f f f f f 4 f f f f f \N 8 4 7 1 General Expenses General Expenses t f f f t f t f t f t 4 t t t t t Total General Expenses 4 4 3 1 Sales Sales t f f f t f f f t f f 4 t t t t t Total Sales 5 4 3 2 Cost of Goods Sold Cost of Goods Sold t f t f t f t f t f t 4 t t t t t Total Cost of Goods Sold 46 11 44 2 Fixed Assets Fixed Assets t f f f t f f f t f f 44 f f t f t Total Fixed Assets 44 11 -1 1 ASSETS ASSETS t f f f t f f f t f f 44 f f t f t Total Assets 36 11 -1 2 LIABILITIES AND OWNERS EQUITY LIABILITIES AND OWNERS EQUITY t f t f t f f f t f f 44 f f t f t Total Liabilities and Owners Equity 47 11 44 3 Other Assets Other Assets t f f f t f f f t f f 44 f f t f t Total Other Assets 37 11 36 1 LIABILITIES LIABILITIES t f f f t f f f t f f 44 f f t f t Total Liabilities 40 11 36 2 OWNERS EQUITY OWNERS EQUITY t f f f t f f f t f f 44 f f t f t Total Owners Equity 38 11 37 1 Current Liabilites Current Liabilities t f f f t f f f t f f -1 f f t f t Total Current Liabilities 39 11 37 2 Long Term Liaibilities Long Term Liabilites t f f f t f f f t f f 44 f f t f t Total Long Term Liabilities 41 11 40 1 Shareholders Equity Shareholders Equity t f f f t f f f t f f 44 f f t f t Total Shareholders Equity 154 21 143 1 Current Assets Current Assets t f f f t f t f t f t 143 f f f f t Total Current Assets 43 11 40 2 Retained Earnings Retained Earnings t f f f t f f f t f f 44 f f t f t Total Retained Earniangs 42 11 40 3 Year To Date Net Income Year To Date Net Income t t f f t f f f t f f 44 f f t f f 132 18 -1 1 ASSETS ASSETS t f f f t f t f f f f -1 f f f f t Total Assets 133 18 -1 2 LIABILITIES AND OWNERS EQUITY LIABILITIES AND OWNERS EQUITY t f t f t f t f f f f -1 f f f f t Total Liabilities and Owners Equity 134 18 133 1 LIABILITIES LIABILITIES t f f f t f t f t f t -1 f f f f t Total Liabilities 135 18 133 2 OWNERS EQUITY OWNERS EQUITY t f f f t f t f t f t -1 f f f f t Total Owners Equity 136 18 135 2 Net Income f t f f t f t f t f t -1 f f f f f 137 19 -1 1 INCOME INCOME t f f f f f t f f f f -1 t f f f t Net Income 138 19 137 2 REVENUE REVENUE t f f f f f t f f f f -1 t f f f t Total Net Revenue 139 19 137 3 EXPENSES EXPENSES t f t f f f t f f f f -1 t f f f t Total Net Expenses 143 21 -1 1 ASSETS ASSETS t f f f t f t f f f f -1 f f f f t Total Assets 144 21 -1 2 LIABILITIES AND OWNERS EQUITY LIABILITIES AND OWNERS EQUITY t f t f t f t f f f f -1 f f f f t Total Liabilities and Owners Equity 145 21 144 1 LIABILITIES LIABILITIES t f f f t f t f t f t -1 f f f f t Total Liabilities 146 21 144 2 OWNERS EQUITY OWNERS EQUITY t f f f t f t f t f t -1 f f f f t Total Owners Equity 153 20 -1 2 EXPENSES EXPENSES t f t f f f t f f f t 149 t t f f t Total Expenses 148 20 -1 1 REVENUE REVENUE t f f f f f t f f f t 149 t t f f t GROSS PROFIT 151 20 148 2 Other Revenue Other Revenue t f f f f f t f f f t 149 t t f f t Total Other Revenue 152 20 148 3 Cost Of Sales Cost Of Sales t f t f f f t f f f t 149 t t f f t Total Cost Of Sales 155 21 154 1 Cash Assets Cash Assets t f f f t f t f t f t 143 f f f f t Total Cash Assets 162 21 146 4 Retained Earnings Retained Earnings t f f f t f t f t f t 143 f f f f t Total Retained Earnings 147 21 146 3 Year To Date Net Income Year To Date Net Income f t f f t f t f t f t -1 f f f f f 156 21 154 3 Inventory Assets Inventory Assets t f f f t f t f t f t 143 f f f f t Total Inventory Assets 163 21 154 2 Accounts Receivable Accounts Receivable t f f f t f t f t f t 143 f f f f t Total Accounts Receivable 159 21 145 3 Long Term Liabilites Long Term Liabilies t f f f t f t f t f t 143 f f f f t Total Long Term Liabilities 158 21 145 2 Current Liabilities Current Liabilities t f f f t f t f t f t 143 f f f f t Total Current Liabilities 164 21 145 1 Accounts Payable Accounts Payable t f f f t f t f t f t 143 f f f f t Total Accounts Payable 160 21 146 2 Shareholder's Equity Shareholder's Equity t f f f t f t f t f t 143 f f f f t Total Shareholder's Equity 149 20 148 1 Product Revenue Product Revenue t f f f f f t f f f t 149 t t f f t Total Sales 170 24 -1 1 STATEMENT OF CASH FLOWS STATEMENT OF CASHFLOWS t f f f f t t f f t t -1 t t f f t TOTAL STATEMENT OF CASH FLOWS 172 24 170 1 Cash Flow From Operating Activities Cash Flow From Operating Activities t f f f f t t f f t t -1 t t f f t Total Cash Flow From Operating Activities 174 24 172 2 Charges Not Using Cash Charges Not Using Cash t f f f f t t f f t t -1 t t f f t Total Charges Not Using Cash 173 24 172 1 Cash Flow From Operating Activities Cash Flow From Operating Activities t f f f f t t f f t t -1 t t f f t Total Cash Flow From Operating Activities 175 24 173 1 Net Income Net Income f t f f f t t f f t t -1 t t f f f 176 24 172 3 Changes in Current Assets Changes in Current Assets t f t f f t t f f t t -1 t t f f t Total Changes in Current Assets 179 24 172 5 Net Receivables Net Receivables t f t f f t t f f t t -1 t t f f t Total Net Receivables 180 24 172 6 Inventory Inventroy t f t f f t t f f t t -1 t t f f t Total Inventory 183 24 172 8 Change in Current Liability Change in Current Liability t f f f f t t f f t t -1 t t f f t Total Change in Current Liability 188 24 170 2 Cash Flow From Investing Activities Cash Flow From Investing Activities t f t f f t t f f t t -1 t t f f t Total Cash Flow From Investing Activities 189 24 188 1 Property Plant and Equipment Property Plant and Equipment t f f f f t t f f t t -1 t t f f t Total Property Plant and Equipment 190 24 188 2 Other Assets Other Assets t f f f f t t f f t t -1 t t f f t Total Other Assets 191 24 170 3 Cash Flow from Financing Activities Cash Flow from Financing Activities t f f f f t t f f t t -1 t t f f t Total Cash Flow from Financing Activities 192 24 191 1 Long Term Debt Long Term Debt t f f f f t t f f t t -1 t t f f t Total Long Term Debt 193 24 191 2 Common Stock and Equity Common Stock and Equity t f f f f t t f f t t -1 t t f f t Total Common Stock and Equity 194 24 172 9 Accounts Payable Accounts Payable t f f f f t t f f t t -1 t t f f t Total Accounts Payable 171 24 -1 2 CASH POSITION CASH POSITION t f t f f t t f f t t -1 t t f f t TOTAL CASH POSITION 157 21 143 2 Fixed Assets Fixed Assets t f f f t f t f t f t 143 f f f f t Net Fixed Assets 229 27 -1 1 Assets Assets t f f t t t t t t t t -1 t t t t t Total Assets 230 27 -1 2 Liabilities Liabilities t f f t t t t t t t t -1 t t t t t Total Liabilities 231 27 -1 3 Equity Equity t f f t t t t t t t t -1 t t t t t Total Equity 232 27 -1 4 Revenue Revenue t f f t t t t t t t t -1 t t t t t Total Revenue 233 27 -1 5 Expense Expense t f f t t t t t t t t -1 t t t t t Total Expense \. -- -- Data for Name: flhead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY flhead (flhead_id, flhead_name, flhead_descrip, flhead_showtotal, flhead_showstart, flhead_showend, flhead_showdelta, flhead_showbudget, flhead_showdiff, flhead_showcustom, flhead_custom_label, flhead_usealttotal, flhead_alttotal, flhead_usealtbegin, flhead_altbegin, flhead_usealtend, flhead_altend, flhead_usealtdebits, flhead_altdebits, flhead_usealtcredits, flhead_altcredits, flhead_usealtbudget, flhead_altbudget, flhead_usealtdiff, flhead_altdiff, flhead_type, flhead_active, flhead_sys, flhead_notes) FROM stdin; 18 Basic Balance Sheet Balance Sheet Template f f f f f f f \N f \N f \N f \N f \N f \N f \N f \N B t t 19 Basic Income Statement Income Statement Template f f f f f f f f f f f f f f I t t 11 OldVersion_Balance Sheet (Ad Hoc) Balance Sheet (Ad Hoc) t t t t t t t t Balance Total f t Account Balance f f f f A f f 4 OldVersion_Income Statement (Ad Hoc) Income Statement Template (Ad Hoc) t t t t t t t t Net Income f t Year-To-Date f f f t Current Period A f f 24 Basic Statement of Cash Flows Basic Statement of Cash Flows t f f t t t f t CHECKSUM (TOTAL STA. OF CASH FLOWS - TOTAL CASH) f f f f f f C t f 20 Official Income Statement Official Income Statement t f f f t t f t NET INCOME f f f f f f I t f 27 Ad Hoc Trial Balanace Ad Hoc Trial Balance t t t t t t t f f f f f f f A t f 21 Official Balance Sheet Balance Sheet Template t f t f t f f t BALANCE SHEET CHECK TOTAL f f f f f f B t f \. -- -- Data for Name: flitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY flitem (flitem_id, flitem_flhead_id, flitem_flgrp_id, flitem_order, flitem_accnt_id, flitem_showstart, flitem_showend, flitem_showdelta, flitem_showbudget, flitem_subtract, flitem_showstartprcnt, flitem_showendprcnt, flitem_showdeltaprcnt, flitem_showbudgetprcnt, flitem_prcnt_flgrp_id, flitem_showdiff, flitem_showdiffprcnt, flitem_showcustom, flitem_showcustomprcnt, flitem_custom_source, flitem_company, flitem_profit, flitem_number, flitem_sub, flitem_type, flitem_subaccnttype_code) FROM stdin; 56 11 42 7 97 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 55 11 42 6 108 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 232 11 42 4 123 f t f f f f f f f -1 f f t f E \N \N \N \N \N \N 54 11 42 5 101 f t f f f f f f f -1 f f t f E \N \N \N \N \N \N 248 11 45 6 128 f t f f f f t f f 44 f f t t E \N \N \N \N \N \N 68 11 45 7 86 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 219 4 4 3 122 f t f t f f t f t 4 t t t f F \N \N \N \N \N \N 217 4 8 12 118 f t f t f f t f t 4 t t t f F \N \N \N \N \N \N 237 4 8 10 125 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 216 4 8 11 117 f t f t f f t f t 4 t t t f F \N \N \N \N \N \N 5 4 8 1 97 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 221 11 42 18 118 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 235 4 8 2 120 f t t f f f t t f 4 t t t t F \N \N \N \N \N \N 246 4 5 1 108 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 3 4 4 5 101 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 233 4 4 4 123 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 242 11 45 2 126 f t f f f f t f f 44 f f t t E \N \N \N \N \N \N 238 11 42 16 125 f t f f t f t f f -1 f f t t E \N \N \N \N \N \N 220 11 42 17 117 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 243 11 45 3 127 f t f f f f t f f 44 f f t t E \N \N \N \N \N \N 66 11 45 4 106 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 67 11 45 5 85 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 76 11 46 1 111 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 47 11 38 1 99 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 46 11 38 2 94 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 48 11 38 3 104 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 53 11 42 1 103 f t f f f f f f f -1 f f t f E \N \N \N \N \N \N 49 11 38 4 105 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 2 4 4 1 103 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 10 4 8 9 93 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 9 4 8 8 92 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 11 4 8 7 91 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 6 4 8 6 110 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 7 4 8 5 98 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 61 11 42 15 93 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 60 11 42 14 92 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 62 11 42 13 91 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 59 11 42 12 112 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 218 4 4 2 121 f t f t f f t f t 4 t t t f F \N \N \N \N \N \N 57 11 42 11 110 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 58 11 42 10 98 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 223 11 42 9 120 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 222 11 42 8 119 f t f f t f f f f -1 f f t f E \N \N \N \N \N \N 225 11 42 3 122 f t f f f f f f f -1 f f t f E \N \N \N \N \N \N 224 11 42 2 121 f t f f f f f f f -1 f f t f E \N \N \N \N \N \N 236 4 8 3 119 f t t f f f t t f 4 t t t t F \N \N \N \N \N \N 8 4 8 4 112 f t f t f f t f t 4 t t t t F \N \N \N \N \N \N 241 11 38 5 107 f t f f f f t f f 44 f f t t E \N \N \N \N \N \N 50 11 38 6 102 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 51 11 38 7 95 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 140 11 39 1 116 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 52 11 41 1 113 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 63 11 43 2 84 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 65 11 45 1 109 f t f f f f t f f 44 f f t t E \N \N \N \N \N \N 247 11 41 2 114 f t f f f f t f f 44 f f t t E \N \N \N \N \N \N 75 11 45 14 83 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 74 11 45 13 89 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 73 11 45 12 96 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 72 11 45 11 90 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 71 11 45 10 88 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 70 11 45 9 87 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 69 11 45 8 100 f t f f f f t f f 44 f f t f E \N \N \N \N \N \N 249 18 132 1 -1 f t f t f f t f t -1 t f f f S All All All All A All 250 18 134 1 -1 f t f t f f t f t -1 t f f f S All All All All L All 251 18 135 1 -1 f t f t f f t f t -1 t f f f S All All All All Q All 252 18 136 1 -1 f t f t f f f f f -1 t f f f S All All All All R All 253 18 136 2 -1 f t f t t f f f f -1 t f f f S All All All All E All 254 19 138 1 -1 f f f t f f f f t -1 t t f f S All All All All R All 255 19 139 1 -1 f f f t f f f f t -1 t t f f S All All All All E All 264 20 149 1 -1 f f f t f f f f t 149 t t f f S All All All All R SI 265 20 151 1 -1 f f f t f f f f t 149 t t f f S All All All All R OI 266 20 152 1 -1 f f f t f f f f t 149 t t f f S All All All All E COGS 267 20 153 1 -1 f f f t f f f f t 149 t t f f S All All All All E EXP 268 21 155 1 -1 f t f t f f t f t 143 t f f f S All All All All A CA 270 21 156 1 -1 f t f t f f t f t 143 t f f f S All All All All A IN 272 21 156 2 -1 f t f t f f t f t 143 t f f f S All All All All A CAS 273 21 158 1 -1 f t f t f f t f t 143 t f f f S All All All All L CL 274 21 164 1 -1 f t f t f f t f t 143 t f f f S All All All All L AP 275 21 159 1 -1 f t f t f f t f t 143 t f f f S All All All All L LTL 277 21 162 1 -1 f t f t f f f f f -1 t f f f S All All All All Q ERE 276 21 160 1 -1 f t f t f f t f t 143 t f f f S All All All All Q EDC 262 21 147 1 -1 f t f t f f t f t 143 t f f f S All All All All R All 263 21 147 2 -1 f t f t t f t f t 143 t f f f S All All All All E All 269 21 163 1 -1 f t f t f f t f t 143 t f f f S All All All All A AR 271 21 157 1 -1 f t f t f f t f t 143 t f f f S All All All All A FA 294 20 153 2 -1 f f f t f f f f t 149 t t f f S All All All All E DEP 298 24 179 1 -1 f f t t f f f t t -1 t t f f S All All All All A AR 295 24 174 1 -1 f f t t f f f t t -1 t t f f S All All All All E DEP 296 24 175 1 -1 f f t t f f f t t -1 t t f f S All All All All R All 297 24 175 2 -1 f f t t t f f t t -1 t t f f S All All All All E All 299 24 180 1 -1 f f t t f f f t t -1 t t f f S All All All All A IN 300 24 176 1 -1 f f t t f f f t t -1 t t f f S All All All All A CAS 302 24 194 1 -1 f f t t f f f t t -1 t t f f S All All All All L AP 303 24 189 1 -1 f f t t f f f t t -1 t t f f S All All All All A FA 304 24 192 1 -1 f f t t f f f f f -1 t f f f S All All All All L LTL 305 24 193 1 -1 f f t t f f f t t -1 t t f f S All All All All Q All 308 21 157 2 -1 f t f t f f f f f -1 t f f f S All All All All A AD 301 24 183 1 -1 f f t t f f f t t -1 t t f f S All All All All L CL 291 24 171 1 -1 f f t t f f f t t -1 t t f f S All All All All A CA 333 27 229 1 -1 t t t t f t t t t -1 t t t t F All All All All A All 335 27 230 1 -1 t t t t f t t t t -1 t t t t F All All All All L All 336 27 231 1 -1 t t t t f t t t t -1 t t t t F All All All All Q All 337 27 232 1 -1 t t t t f t t t t -1 t t t t F All All All All R All 338 27 233 1 -1 t t t t f t t t t -1 t t t t F All All All All E All \. -- -- Data for Name: flnotes; Type: TABLE DATA; Schema: public; Owner: admin -- COPY flnotes (flnotes_id, flnotes_flhead_id, flnotes_period_id, flnotes_notes) FROM stdin; \. -- -- Data for Name: flrpt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_beginningprcnt, flrpt_endingprcnt, flrpt_debitsprcnt, flrpt_creditsprcnt, flrpt_budgetprcnt, flrpt_parent_id, flrpt_diff, flrpt_diffprcnt, flrpt_custom, flrpt_customprcnt, flrpt_altname, flrpt_accnt_id, flrpt_interval, flrpt_id) FROM stdin; 7 32 jsmith 4 2 I 12 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 1 7 32 jsmith 2 0 G 12 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 2 7 32 jsmith 3 1 G 13 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 3 7 32 jsmith 5 2 I 13 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 4 7 32 jsmith 6 2 I 14 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 5 7 32 jsmith 7 2 I 15 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 6 7 32 jsmith 8 2 I 16 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 7 7 32 jsmith 9 2 I 17 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 8 7 32 jsmith 10 2 I 18 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 9 7 32 jsmith 11 2 I 19 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 10 7 32 jsmith 12 2 I 20 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 11 7 32 jsmith 13 2 I 21 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 12 7 32 jsmith 14 2 I 22 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 13 7 32 jsmith 16 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 14 7 32 jsmith 17 2 I 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 15 7 32 jsmith 19 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 16 7 32 jsmith 22 0 G 16 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 17 7 32 jsmith 23 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 18 7 32 jsmith 24 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 19 7 32 jsmith 25 3 I 24 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 20 7 32 jsmith 26 3 I 25 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 21 7 32 jsmith 27 3 I 26 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 22 7 32 jsmith 28 3 I 27 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 23 7 32 jsmith 29 3 I 28 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 24 7 32 jsmith 30 3 I 29 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 25 7 32 jsmith 32 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 26 7 32 jsmith 35 1 G 21 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 27 7 32 jsmith 36 2 G 22 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 28 7 32 jsmith 37 3 I 30 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 29 7 32 jsmith 39 2 G 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 30 7 32 jsmith 40 2 G 24 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 31 7 32 jsmith 41 3 I 31 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 32 7 32 jsmith 42 3 I 45 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 33 7 32 jsmith 21 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 34 7 32 jsmith 15 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 35 7 32 jsmith 18 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 36 7 32 jsmith 20 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 15 \N \N \N \N \N \N \N 37 7 32 jsmith 45 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 38 7 32 jsmith 34 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 39 7 32 jsmith 31 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 40 7 32 jsmith 33 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 20 \N \N \N \N \N \N \N 41 7 32 jsmith 44 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 42 7 32 jsmith 38 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 43 7 32 jsmith 43 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 44 7 33 jsmith 2 0 G 12 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 45 7 33 jsmith 3 1 G 13 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 46 7 33 jsmith 4 2 I 12 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 47 7 33 jsmith 5 2 I 13 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 48 7 33 jsmith 6 2 I 14 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 49 7 33 jsmith 7 2 I 15 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 50 7 33 jsmith 8 2 I 16 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 51 7 33 jsmith 9 2 I 17 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 52 7 33 jsmith 10 2 I 18 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 53 7 33 jsmith 11 2 I 19 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 54 7 33 jsmith 12 2 I 20 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 55 7 33 jsmith 13 2 I 21 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 56 7 33 jsmith 14 2 I 22 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 57 7 33 jsmith 16 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 58 7 33 jsmith 17 2 I 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 59 7 33 jsmith 19 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 60 7 33 jsmith 22 0 G 16 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 61 7 33 jsmith 23 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 62 7 33 jsmith 24 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 63 7 33 jsmith 25 3 I 24 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 64 7 33 jsmith 26 3 I 25 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 65 7 33 jsmith 27 3 I 26 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 66 7 33 jsmith 28 3 I 27 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 67 7 33 jsmith 29 3 I 28 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 68 7 33 jsmith 30 3 I 29 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 69 7 33 jsmith 32 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 70 7 33 jsmith 35 1 G 21 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 71 7 33 jsmith 36 2 G 22 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 72 7 33 jsmith 37 3 I 30 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 73 7 33 jsmith 39 2 G 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 74 7 33 jsmith 40 2 G 24 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 75 7 33 jsmith 41 3 I 31 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 76 7 33 jsmith 42 3 I 45 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 77 7 33 jsmith 21 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 78 7 33 jsmith 15 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 79 7 33 jsmith 18 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 80 7 33 jsmith 20 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 15 \N \N \N \N \N \N \N 81 7 33 jsmith 45 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 82 7 33 jsmith 34 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 83 7 33 jsmith 31 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 84 7 33 jsmith 33 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 20 \N \N \N \N \N \N \N 85 7 33 jsmith 44 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 86 7 33 jsmith 38 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 87 7 33 jsmith 43 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 88 7 34 jsmith 2 0 G 12 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 89 7 34 jsmith 3 1 G 13 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 90 7 34 jsmith 4 2 I 12 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 91 7 34 jsmith 5 2 I 13 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 92 7 34 jsmith 6 2 I 14 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 93 7 34 jsmith 7 2 I 15 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 94 7 34 jsmith 8 2 I 16 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 95 7 34 jsmith 9 2 I 17 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 96 7 34 jsmith 10 2 I 18 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 97 7 34 jsmith 11 2 I 19 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 98 7 34 jsmith 12 2 I 20 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 99 7 34 jsmith 13 2 I 21 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 100 7 34 jsmith 14 2 I 22 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 101 7 34 jsmith 16 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 102 7 34 jsmith 17 2 I 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 103 7 34 jsmith 19 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 104 7 34 jsmith 22 0 G 16 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 105 7 34 jsmith 23 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 106 7 34 jsmith 24 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 107 7 34 jsmith 25 3 I 24 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 108 7 34 jsmith 26 3 I 25 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 109 7 34 jsmith 27 3 I 26 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 110 7 34 jsmith 28 3 I 27 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 111 7 34 jsmith 29 3 I 28 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 112 7 34 jsmith 30 3 I 29 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 113 7 34 jsmith 32 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 114 7 34 jsmith 35 1 G 21 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 115 7 34 jsmith 36 2 G 22 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 116 7 34 jsmith 37 3 I 30 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 117 7 34 jsmith 39 2 G 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 118 7 34 jsmith 40 2 G 24 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 119 7 34 jsmith 41 3 I 31 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 120 7 34 jsmith 42 3 I 45 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 121 7 34 jsmith 21 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 122 7 34 jsmith 15 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 123 7 34 jsmith 18 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 124 7 34 jsmith 20 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 15 \N \N \N \N \N \N \N 125 7 34 jsmith 45 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 126 7 34 jsmith 34 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 127 7 34 jsmith 31 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 128 7 34 jsmith 33 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 20 \N \N \N \N \N \N \N 129 7 34 jsmith 44 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 130 7 34 jsmith 38 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 131 7 34 jsmith 43 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 132 7 35 jsmith 2 0 G 12 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 133 7 35 jsmith 3 1 G 13 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 134 7 35 jsmith 4 2 I 12 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 135 7 35 jsmith 5 2 I 13 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 136 7 35 jsmith 6 2 I 14 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 137 7 35 jsmith 7 2 I 15 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 138 7 35 jsmith 8 2 I 16 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 139 7 35 jsmith 9 2 I 17 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 140 7 35 jsmith 10 2 I 18 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 141 7 35 jsmith 11 2 I 19 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 142 7 35 jsmith 12 2 I 20 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 143 7 35 jsmith 13 2 I 21 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 144 7 35 jsmith 14 2 I 22 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 145 7 35 jsmith 16 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 146 7 35 jsmith 17 2 I 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 147 7 35 jsmith 19 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 148 7 35 jsmith 22 0 G 16 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 149 7 35 jsmith 23 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 150 7 35 jsmith 24 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 151 7 35 jsmith 25 3 I 24 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 152 7 35 jsmith 26 3 I 25 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 153 7 35 jsmith 27 3 I 26 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 154 7 35 jsmith 28 3 I 27 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 155 7 35 jsmith 29 3 I 28 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 156 7 35 jsmith 30 3 I 29 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 157 7 35 jsmith 32 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 158 7 35 jsmith 35 1 G 21 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 159 7 35 jsmith 36 2 G 22 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 160 7 35 jsmith 37 3 I 30 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 161 7 35 jsmith 39 2 G 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 162 7 35 jsmith 40 2 G 24 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 163 7 35 jsmith 41 3 I 31 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 164 7 35 jsmith 42 3 I 45 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 165 7 35 jsmith 21 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 166 7 35 jsmith 15 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 167 7 35 jsmith 18 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 168 7 35 jsmith 20 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 15 \N \N \N \N \N \N \N 169 7 35 jsmith 45 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 170 7 35 jsmith 34 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 171 7 35 jsmith 31 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 172 7 35 jsmith 33 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 20 \N \N \N \N \N \N \N 173 7 35 jsmith 44 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 174 7 35 jsmith 38 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 175 7 35 jsmith 43 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 176 7 36 jsmith 2 0 G 12 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 177 7 36 jsmith 3 1 G 13 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 178 7 36 jsmith 4 2 I 12 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 179 7 36 jsmith 5 2 I 13 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 180 7 36 jsmith 6 2 I 14 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 181 7 36 jsmith 7 2 I 15 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 182 7 36 jsmith 8 2 I 16 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 183 7 36 jsmith 9 2 I 17 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 184 7 36 jsmith 10 2 I 18 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 185 7 36 jsmith 11 2 I 19 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 186 7 36 jsmith 12 2 I 20 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 187 7 36 jsmith 13 2 I 21 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 188 7 36 jsmith 14 2 I 22 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 189 7 36 jsmith 16 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 190 7 36 jsmith 17 2 I 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 191 7 36 jsmith 19 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 192 7 36 jsmith 22 0 G 16 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 193 7 36 jsmith 23 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 194 7 36 jsmith 24 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 195 7 36 jsmith 25 3 I 24 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 196 7 36 jsmith 26 3 I 25 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 197 7 36 jsmith 27 3 I 26 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 198 7 36 jsmith 28 3 I 27 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 199 7 36 jsmith 29 3 I 28 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 200 7 36 jsmith 30 3 I 29 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 201 7 36 jsmith 32 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 202 7 36 jsmith 35 1 G 21 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 203 7 36 jsmith 36 2 G 22 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 204 7 36 jsmith 37 3 I 30 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 205 7 36 jsmith 39 2 G 23 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 206 7 36 jsmith 40 2 G 24 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 207 7 36 jsmith 41 3 I 31 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 208 7 36 jsmith 42 3 I 45 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 209 7 36 jsmith 21 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 12 \N \N \N \N \N \N \N 210 7 36 jsmith 15 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 13 \N \N \N \N \N \N \N 211 7 36 jsmith 18 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 14 \N \N \N \N \N \N \N 212 7 36 jsmith 20 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 15 \N \N \N \N \N \N \N 213 7 36 jsmith 45 1 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 16 \N \N \N \N \N \N \N 214 7 36 jsmith 34 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 17 \N \N \N \N \N \N \N 215 7 36 jsmith 31 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 18 \N \N \N \N \N \N \N 216 7 36 jsmith 33 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 20 \N \N \N \N \N \N \N 217 7 36 jsmith 44 2 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 21 \N \N \N \N \N \N \N 218 7 36 jsmith 38 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 22 \N \N \N \N \N \N \N 219 7 36 jsmith 43 3 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N 24 \N \N \N \N \N \N \N 220 4 37 jsmith 1 0 G 3 0.00 979964.09 0.00 0.00 0.00 \N 0.63455637418917559455 \N \N 0.00000000000000000000 -1 350000.00 0.70000000000000000000 350000.00 0.70000000000000000000 \N \N \N 221 4 37 jsmith 2 1 G 4 0.00 1544329.44 0.00 0.00 0.00 \N \N \N \N \N 3 500000.00 1.00000000000000000000 500000.00 1.00000000000000000000 \N \N \N 222 4 37 jsmith 3 2 I 2 \N 1544094.54 \N \N 0.00 \N 0.99984789514858953929 \N \N 0.00000000000000000000 4 500000.00 1.00000000000000000000 500000.00 1.00000000000000000000 \N \N \N 223 4 37 jsmith 4 2 I 218 \N 95.00 \N \N 0.00 \N 0.000061515372005082024468 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 224 4 37 jsmith 5 2 I 219 \N 136.00 \N \N 0.00 \N 0.000088064111502012161343 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 225 4 37 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 226 4 37 jsmith 7 2 I 3 \N 3.90 \N \N 0.00 \N 0.000002525367903366525215 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 227 4 37 jsmith 9 1 G 5 0.00 -564365.35 0.00 0.00 0.00 \N \N \N \N \N 3 -150000.00 \N -150000.00 \N \N \N \N 228 4 37 jsmith 10 2 I 4 \N 564365.35 \N \N 0.00 \N 0.36544362581082440545 \N \N 0.00000000000000000000 5 150000.00 0.30000000000000000000 150000.00 0.30000000000000000000 \N \N \N 229 4 37 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 230 4 37 jsmith 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 231 4 37 jsmith 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.00065724318510692900 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 232 4 37 jsmith 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.00065400553394876679 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 233 4 37 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 234 4 37 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 235 4 37 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 236 4 37 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 237 4 37 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 238 4 37 jsmith 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 239 4 37 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 240 4 37 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000003237651158162211814 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 241 4 37 jsmith 24 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 242 4 37 jsmith 25 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 243 4 37 jsmith 27 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 244 4 37 jsmith 12 1 T -1 \N 979964.09 \N \N 0.00 \N 0.63455637418917559455 \N \N 0.00000000000000000000 3 350000.00 0.70000000000000000000 350000.00 0.70000000000000000000 \N \N \N 245 4 37 jsmith 8 2 T -1 \N 1544329.44 \N \N \N \N \N \N \N \N 4 500000.00 1.00000000000000000000 500000.00 1.00000000000000000000 \N \N \N 246 4 37 jsmith 26 2 T -1 \N 1015.00 \N \N 0.00 \N 0.00065724318510692900 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 247 4 37 jsmith 28 0 T -1 0.00 978949.09 \N \N 0.00 \N \N \N \N \N \N 350000.00 \N 350000.00 \N \N \N \N 248 4 36 jsmith 27 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 249 4 36 jsmith 12 1 T -1 \N 629964.09 \N \N 0.00 \N 0.60322352877459817661 \N \N 0.00000000000000000000 3 302639.64 0.66788406027382749398 302639.64 0.66788406027382749398 \N \N \N 250 4 36 jsmith 8 2 T -1 \N 1044329.44 \N \N \N \N \N \N \N \N 4 453132.00 1.00000000000000000000 453132.00 1.00000000000000000000 \N \N \N 251 4 36 jsmith 26 2 T -1 \N 1015.00 \N \N 0.00 \N 0.00097191552887755419 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 252 4 36 jsmith 28 0 T -1 0.00 628949.09 \N \N 0.00 \N \N \N \N \N \N 302639.64 \N 302639.64 \N \N \N \N 253 4 36 jsmith 1 0 G 3 0.00 629964.09 0.00 0.00 0.00 \N 0.60322352877459817661 \N \N 0.00000000000000000000 -1 302639.64 0.66788406027382749398 302639.64 0.66788406027382749398 \N \N \N 254 4 36 jsmith 2 1 G 4 0.00 1044329.44 0.00 0.00 0.00 \N \N \N \N \N 3 453132.00 1.00000000000000000000 453132.00 1.00000000000000000000 \N \N \N 255 4 36 jsmith 3 2 I 2 \N 1044094.54 \N \N 0.00 \N 0.99977507097760262317 \N \N 0.00000000000000000000 4 452900.00 0.99948800790939505486 452900.00 0.99948800790939505486 \N \N \N 256 4 36 jsmith 4 2 I 218 \N 95.00 \N \N 0.00 \N 0.000090967463293958274316 \N \N 0.00000000000000000000 4 95.00 0.00020965193365288702 95.00 \N \N \N \N 257 4 36 jsmith 5 2 I 219 \N 136.00 \N \N 0.00 \N 0.00013022710534714027 \N \N 0.00000000000000000000 4 136.00 0.00030013329449255405 136.00 \N \N \N \N 258 4 36 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 259 4 36 jsmith 7 2 I 3 \N 3.90 \N \N 0.00 \N 0.000003734453756278287051 \N \N 0.00000000000000000000 4 1.00 0.000002206862459504073868 1.00 0.000002206862459504073868 \N \N \N 260 4 36 jsmith 9 1 G 5 0.00 -414365.35 0.00 0.00 0.00 \N \N \N \N \N 3 -150492.36 \N -150492.36 \N \N \N \N 261 4 36 jsmith 10 2 I 4 \N 414365.35 \N \N 0.00 \N 0.39677647122540182339 \N \N 0.00000000000000000000 5 150492.36 0.33211593972617250602 150492.36 0.33211593972617250602 \N \N \N 262 4 36 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 263 4 36 jsmith 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 264 4 36 jsmith 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.00097191552887755419 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 265 4 36 jsmith 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.00096712776765155639 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 266 4 36 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 267 4 36 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 268 4 36 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 269 4 36 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 270 4 36 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 271 4 36 jsmith 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 272 4 36 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 273 4 36 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000004787761225997803911 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 274 4 36 jsmith 24 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 275 4 36 jsmith 25 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 276 4 38 jsmith 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 277 4 35 jsmith 3 2 I 2 \N 591194.54 \N \N 0.00 \N 0.99999509470135729952 \N \N 0.00000000000000000000 4 400000.00 1.00000000000000000000 400000.00 1.00000000000000000000 \N \N \N 278 4 35 jsmith 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 279 4 35 jsmith 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 280 4 35 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 281 4 35 jsmith 7 2 I 3 \N 2.90 \N \N 0.00 \N 0.000004905298642700482600 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 282 4 35 jsmith 9 1 G 5 0.00 -263872.99 0.00 0.00 0.00 \N \N \N \N \N 3 -215000.00 \N -215000.00 \N \N \N \N 283 4 35 jsmith 10 2 I 4 \N 263872.99 \N \N 0.00 \N 0.44633648954907517867 \N \N 0.00000000000000000000 5 215000.00 0.53750000000000000000 215000.00 0.53750000000000000000 \N \N \N 284 4 35 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 285 4 35 jsmith 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 286 4 39 jsmith 1 0 G 3 0.00 1088871.64 0.00 0.00 0.00 \N 0.64093681468073960961 \N \N 0.00000000000000000000 -1 70407.55 0.69678896871743120664 70407.55 0.69678896871743120664 \N \N \N 287 13 35 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 288 4 39 jsmith 2 1 G 4 0.00 1698875.17 0.00 0.00 0.00 \N \N \N \N \N 3 101045.73 1.00000000000000000000 101045.73 1.00000000000000000000 \N \N \N 289 4 39 jsmith 3 2 I 2 \N 1698544.54 \N \N 0.00 \N 0.99980538299350151783 \N \N 0.00000000000000000000 4 100950.00 0.99905260717103038397 100950.00 0.99905260717103038397 \N \N \N 290 4 39 jsmith 4 2 I 218 \N 142.50 \N \N 0.00 \N 0.000083879029204953298599 \N \N 0.00000000000000000000 4 47.50 0.00047008418861440261 47.50 \N \N \N \N 291 4 39 jsmith 5 2 I 219 \N 181.00 \N \N 0.00 \N 0.00010654108270944945 \N \N 0.00000000000000000000 4 45.00 0.00044534291552943405 45.00 \N \N \N \N 292 4 39 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 293 4 39 jsmith 7 2 I 3 \N 7.13 \N \N 0.00 \N 0.000004196894584079417677 \N \N 0.00000000000000000000 4 3.23 0.000031965724825779377318 3.23 0.000031965724825779377318 \N \N \N 294 4 39 jsmith 9 1 G 5 0.00 -610003.53 0.00 0.00 0.00 \N \N \N \N \N 3 -30638.18 \N -30638.18 \N \N \N \N 295 4 39 jsmith 10 2 I 4 \N 610003.53 \N \N 0.00 \N 0.35906318531926039039 \N \N 0.00000000000000000000 5 30638.18 0.30321103128256879336 30638.18 0.30321103128256879336 \N \N \N 296 4 39 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 297 4 39 jsmith 13 0 G 7 0.00 3767.61 0.00 0.00 0.00 \N \N \N \N \N -1 357.83 \N 357.83 \N \N \N \N 298 4 39 jsmith 14 1 G 8 0.00 3767.61 0.00 0.00 0.00 \N 0.00221770855594999367 \N \N 0.00000000000000000000 7 357.83 0.00354126789919771969 357.83 0.00354126789919771969 \N \N \N 299 4 39 jsmith 15 2 I 5 \N 3498.78 \N \N 0.00 \N 0.00205946856001197545 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 300 4 39 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 301 4 39 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 302 4 39 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 303 4 39 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 304 4 39 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 305 4 39 jsmith 21 2 I 11 \N 169.83 \N \N 0.00 \N 0.000099966144069313815446 \N \N 0.00000000000000000000 8 263.83 0.00261099603120290189 263.83 0.00261099603120290189 \N \N \N 306 4 39 jsmith 22 2 I 9 \N 94.00 \N \N 0.00 \N 0.000055330728036951649602 \N \N 0.00000000000000000000 8 94.00 0.00093027186799481779 94.00 0.00093027186799481779 \N \N \N 307 4 39 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000002943123831752747319 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 308 4 39 jsmith 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 309 4 39 jsmith 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 310 4 39 jsmith 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 311 4 39 jsmith 28 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 312 4 39 jsmith 12 1 T -1 \N 1088871.64 \N \N 0.00 \N 0.64093681468073960961 \N \N 0.00000000000000000000 3 70407.55 0.69678896871743120664 70407.55 0.69678896871743120664 \N \N \N 313 4 39 jsmith 8 2 T -1 \N 1698875.17 \N \N \N \N \N \N \N \N 4 101045.73 1.00000000000000000000 101045.73 1.00000000000000000000 \N \N \N 314 4 39 jsmith 27 2 T -1 \N 3767.61 \N \N 0.00 \N 0.00221770855594999367 \N \N 0.00000000000000000000 8 357.83 0.00354126789919771969 357.83 0.00354126789919771969 \N \N \N 315 4 39 jsmith 29 0 T -1 0.00 1085104.03 \N \N 0.00 \N \N \N \N \N \N 70049.72 \N 70049.72 \N \N \N \N 316 4 38 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 317 4 38 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000003129245133948714827 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 318 4 40 jsmith 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 \N \N \N \N \N \N \N 319 4 40 jsmith 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 \N \N \N \N \N \N \N 320 4 40 jsmith 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 \N \N \N \N \N \N \N 321 4 40 jsmith 4 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 \N \N \N \N \N \N \N 322 4 40 jsmith 6 1 G 5 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 \N \N \N \N \N \N \N 323 4 40 jsmith 7 2 I 4 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 \N \N \N \N \N \N \N 324 4 40 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 \N \N \N \N \N \N \N 325 4 40 jsmith 10 0 G 7 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 \N \N \N \N \N \N \N 326 4 40 jsmith 11 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 \N \N \N \N \N \N \N 327 4 40 jsmith 12 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 328 4 38 jsmith 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 329 4 40 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 330 4 40 jsmith 14 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 331 4 40 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 332 4 40 jsmith 16 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 333 4 40 jsmith 17 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 334 4 40 jsmith 18 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 335 4 40 jsmith 21 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 336 4 40 jsmith 5 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 \N \N \N \N \N \N \N 337 4 40 jsmith 9 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 \N \N \N \N \N \N \N 338 4 40 jsmith 19 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 339 4 40 jsmith 20 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 \N \N \N \N \N \N \N 340 4 40 jsmith 22 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N \N \N \N 341 4 41 jsmith 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 \N \N \N \N \N \N \N 342 4 41 jsmith 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 \N \N \N \N \N \N \N 343 4 41 jsmith 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 \N \N \N \N \N \N \N 344 4 41 jsmith 4 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 \N \N \N \N \N \N \N 345 4 41 jsmith 6 1 G 5 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 \N \N \N \N \N \N \N 346 4 41 jsmith 7 2 I 4 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 \N \N \N \N \N \N \N 347 4 41 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 \N \N \N \N \N \N \N 348 4 41 jsmith 10 0 G 7 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 \N \N \N \N \N \N \N 349 4 41 jsmith 11 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 \N \N \N \N \N \N \N 350 4 41 jsmith 12 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 351 4 41 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 352 4 41 jsmith 14 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 353 4 41 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 354 4 41 jsmith 16 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 355 4 41 jsmith 17 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 356 4 41 jsmith 18 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 357 4 41 jsmith 21 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 358 4 41 jsmith 5 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 \N \N \N \N \N \N \N 359 4 41 jsmith 9 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 \N \N \N \N \N \N \N 360 4 41 jsmith 19 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 \N \N \N \N \N \N \N 361 4 41 jsmith 20 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 \N \N \N \N \N \N \N 362 4 41 jsmith 22 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N \N \N \N 363 4 35 jsmith 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.00171685452494516891 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 364 4 35 jsmith 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.00170839711349223704 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 365 4 35 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 366 4 35 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 367 4 35 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 368 4 35 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 369 4 35 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 370 4 35 jsmith 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 371 4 35 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 372 4 35 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000008457411452931866552 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 373 4 35 jsmith 24 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 374 4 35 jsmith 25 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 375 4 35 jsmith 27 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 376 4 35 jsmith 12 1 T -1 \N 327324.45 \N \N 0.00 \N 0.55366351045092482133 \N \N 0.00000000000000000000 3 185000.00 0.46250000000000000000 185000.00 0.46250000000000000000 \N \N \N 377 4 35 jsmith 8 2 T -1 \N 591197.44 \N \N \N \N \N \N \N \N 4 400000.00 1.00000000000000000000 400000.00 1.00000000000000000000 \N \N \N 378 4 35 jsmith 26 2 T -1 \N 1015.00 \N \N 0.00 \N 0.00171685452494516891 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 379 4 35 jsmith 28 0 T -1 0.00 326309.45 \N \N 0.00 \N \N \N \N \N \N 185000.00 \N 185000.00 \N \N \N \N 380 4 35 jsmith 1 0 G 3 0.00 327324.45 0.00 0.00 0.00 \N 0.55366351045092482133 \N \N 0.00000000000000000000 -1 185000.00 0.46250000000000000000 185000.00 0.46250000000000000000 \N \N \N 381 4 35 jsmith 2 1 G 4 0.00 591197.44 0.00 0.00 0.00 \N \N \N \N \N 3 400000.00 1.00000000000000000000 400000.00 1.00000000000000000000 \N \N \N 382 4 34 jsmith 1 0 G 3 0.00 142324.45 0.00 0.00 0.00 \N 0.74438470515086394462 \N \N 0.00000000000000000000 -1 60000.00 0.80000000000000000000 60000.00 0.80000000000000000000 \N \N \N 383 4 34 jsmith 2 1 G 4 0.00 191197.44 0.00 0.00 0.00 \N \N \N \N \N 3 75000.00 1.00000000000000000000 75000.00 1.00000000000000000000 \N \N \N 384 4 34 jsmith 3 2 I 2 \N 191194.54 \N \N 0.00 \N 0.99998483243290286732 \N \N 0.00000000000000000000 4 75000.00 1.00000000000000000000 75000.00 1.00000000000000000000 \N \N \N 385 4 34 jsmith 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 386 4 34 jsmith 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 387 4 34 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 388 13 35 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 389 4 34 jsmith 7 2 I 3 \N 2.90 \N \N 0.00 \N 0.000015167567097132681274 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 390 4 34 jsmith 9 1 G 5 0.00 -48872.99 0.00 0.00 0.00 \N \N \N \N \N 3 -15000.00 \N -15000.00 \N \N \N \N 391 4 34 jsmith 10 2 I 4 \N 48872.99 \N \N 0.00 \N 0.25561529484913605538 \N \N 0.00000000000000000000 5 15000.00 0.20000000000000000000 15000.00 0.20000000000000000000 \N \N \N 392 4 34 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 393 4 34 jsmith 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 394 4 34 jsmith 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.00530864848399643845 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 395 4 34 jsmith 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.00528249750624276141 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 396 9 30 jsmith 1 0 G 26 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 397 9 30 jsmith 2 1 G 28 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 26 \N \N \N \N \N \N \N 398 9 30 jsmith 3 2 I 42 \N 0.00 \N \N \N \N \N \N \N \N 28 \N \N \N \N \N \N \N 399 9 30 jsmith 5 1 G 30 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 26 \N \N \N \N \N \N \N 400 9 30 jsmith 6 2 G 31 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 401 9 30 jsmith 7 3 I 43 \N 0.00 \N \N \N \N \N \N \N \N 31 \N \N \N \N \N \N \N 402 9 30 jsmith 9 2 G 32 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 403 9 30 jsmith 10 3 I 44 \N 0.00 \N \N \N \N \N \N \N \N 32 \N \N \N \N \N \N \N 404 9 30 jsmith 12 2 G 34 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 405 9 30 jsmith 14 0 G 35 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 406 9 30 jsmith 4 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 28 \N \N \N \N \N \N \N 407 9 30 jsmith 8 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 31 \N \N \N \N \N \N \N 408 9 30 jsmith 11 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 32 \N \N \N \N \N \N \N 409 9 30 jsmith 13 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 30 \N \N \N \N \N \N \N 410 9 30 jsmith 15 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 411 9 46 jsmith 1 0 G 26 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 412 9 46 jsmith 2 1 G 28 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 26 \N \N \N \N \N \N \N 413 9 46 jsmith 3 2 I 42 \N 0.00 \N \N \N \N \N \N \N \N 28 \N \N \N \N \N \N \N 414 9 46 jsmith 5 1 G 30 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 26 \N \N \N \N \N \N \N 415 9 46 jsmith 6 2 G 31 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 416 9 46 jsmith 7 3 I 43 \N 0.00 \N \N \N \N \N \N \N \N 31 \N \N \N \N \N \N \N 417 9 46 jsmith 9 2 G 32 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 418 9 46 jsmith 10 3 I 44 \N 0.00 \N \N \N \N \N \N \N \N 32 \N \N \N \N \N \N \N 419 9 46 jsmith 12 2 G 34 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 420 9 46 jsmith 14 0 G 35 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 421 9 46 jsmith 4 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 28 \N \N \N \N \N \N \N 422 9 46 jsmith 13 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 30 \N \N \N \N \N \N \N 423 9 46 jsmith 8 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 31 \N \N \N \N \N \N \N 424 9 46 jsmith 11 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 32 \N \N \N \N \N \N \N 425 9 46 jsmith 15 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 426 9 29 jsmith 1 0 G 26 0.00 500.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 427 9 29 jsmith 2 1 G 28 0.00 500.00 0.00 0.00 0.00 \N \N \N \N \N 26 \N \N \N \N \N \N \N 428 9 29 jsmith 3 2 I 42 \N 500.00 \N \N \N \N \N \N \N \N 28 \N \N \N \N \N \N \N 429 9 29 jsmith 5 1 G 30 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 26 \N \N \N \N \N \N \N 430 9 29 jsmith 6 2 G 31 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 431 9 29 jsmith 7 3 I 43 \N 0.00 \N \N \N \N \N \N \N \N 31 \N \N \N \N \N \N \N 432 9 29 jsmith 9 2 G 32 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 433 9 29 jsmith 10 3 I 44 \N 0.00 \N \N \N \N \N \N \N \N 32 \N \N \N \N \N \N \N 434 9 29 jsmith 12 2 G 34 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 435 9 29 jsmith 14 0 G 35 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 436 9 29 jsmith 4 2 T -1 \N 500.00 \N \N \N \N \N \N \N \N 28 \N \N \N \N \N \N \N 437 9 29 jsmith 13 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 30 \N \N \N \N \N \N \N 438 9 29 jsmith 8 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 31 \N \N \N \N \N \N \N 439 9 29 jsmith 11 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 32 \N \N \N \N \N \N \N 440 9 29 jsmith 15 0 T -1 \N 500.00 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 441 9 28 jsmith 1 0 G 26 0.00 206.07 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 442 9 28 jsmith 2 1 G 28 0.00 200.00 0.00 0.00 0.00 \N \N \N \N \N 26 \N \N \N \N \N \N \N 443 9 28 jsmith 3 2 I 42 \N 200.00 \N \N \N \N \N \N \N \N 28 \N \N \N \N \N \N \N 444 9 28 jsmith 5 1 G 30 0.00 6.07 0.00 0.00 0.00 \N \N \N \N \N 26 \N \N \N \N \N \N \N 445 9 28 jsmith 6 2 G 31 0.00 1.07 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 446 9 28 jsmith 7 3 I 43 \N 1.07 \N \N \N \N \N \N \N \N 31 \N \N \N \N \N \N \N 447 9 28 jsmith 9 2 G 32 0.00 5.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 448 9 28 jsmith 10 3 I 44 \N 5.00 \N \N \N \N \N \N \N \N 32 \N \N \N \N \N \N \N 449 9 28 jsmith 12 2 G 34 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 30 \N \N \N \N \N \N \N 450 9 28 jsmith 14 0 G 35 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 \N \N \N \N \N \N \N 451 9 28 jsmith 4 2 T -1 \N 200.00 \N \N \N \N \N \N \N \N 28 \N \N \N \N \N \N \N 452 9 28 jsmith 13 2 T -1 \N 6.07 \N \N \N \N \N \N \N \N 30 \N \N \N \N \N \N \N 453 9 28 jsmith 8 3 T -1 \N 1.07 \N \N \N \N \N \N \N \N 31 \N \N \N \N \N \N \N 454 9 28 jsmith 11 3 T -1 \N 5.00 \N \N \N \N \N \N \N \N 32 \N \N \N \N \N \N \N 455 9 28 jsmith 15 0 T -1 \N 206.07 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 456 7 31 jsmith 1 0 G 12 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1000.00 \N \N \N \N 457 7 31 jsmith 2 1 G 13 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 1000.00 \N \N \N \N 458 7 31 jsmith 3 2 I 12 \N 2000.00 \N \N \N \N \N \N \N \N 13 \N \N 2000.00 \N \N \N \N 459 7 31 jsmith 4 2 I 13 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 460 13 55 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 461 7 31 jsmith 5 2 I 14 \N -1000.00 \N \N \N \N \N \N \N \N 13 \N \N -1000.00 \N \N \N \N 462 7 31 jsmith 6 2 I 15 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 463 7 31 jsmith 7 2 I 16 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 464 7 31 jsmith 8 2 I 17 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 465 7 31 jsmith 9 2 I 18 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 466 7 31 jsmith 10 2 I 19 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 467 7 31 jsmith 11 2 I 20 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 468 7 31 jsmith 12 2 I 21 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 469 7 31 jsmith 13 2 I 22 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 470 7 31 jsmith 15 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 471 7 31 jsmith 16 2 I 23 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 472 7 31 jsmith 18 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 473 7 31 jsmith 21 0 G 16 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1000.00 \N \N \N \N 474 7 31 jsmith 22 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 0.00 \N \N \N \N 475 7 31 jsmith 23 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 476 7 31 jsmith 24 3 I 24 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 477 7 31 jsmith 25 3 I 25 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 478 7 31 jsmith 26 3 I 26 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 479 7 31 jsmith 27 3 I 27 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 480 7 31 jsmith 28 3 I 28 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 481 7 31 jsmith 29 3 I 29 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 482 7 31 jsmith 31 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 483 7 31 jsmith 34 1 G 21 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 1000.00 \N \N \N \N 484 7 31 jsmith 35 2 G 22 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 0.00 \N \N \N \N 485 7 31 jsmith 36 3 I 30 \N 0.00 \N \N \N \N \N \N \N \N 22 \N \N 0.00 \N \N \N \N 486 7 31 jsmith 38 2 G 23 \N 1000.00 \N \N \N \N \N \N \N \N 21 \N \N 1000.00 \N \N \N \N 487 7 31 jsmith 39 2 G 24 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 0.00 \N \N \N \N 488 7 31 jsmith 40 3 I 31 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 489 7 31 jsmith 41 3 I 45 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 490 7 31 jsmith 14 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 13 \N \N 1000.00 \N \N \N \N 491 7 31 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 492 7 31 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 15 \N \N 0.00 \N \N \N \N 493 7 31 jsmith 20 1 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 12 \N \N 1000.00 \N \N \N \N 494 7 31 jsmith 30 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 495 7 31 jsmith 32 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 20 \N \N 0.00 \N \N \N \N 496 7 31 jsmith 33 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 17 \N \N 0.00 \N \N \N \N 497 7 31 jsmith 37 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 22 \N \N 0.00 \N \N \N \N 498 7 31 jsmith 42 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 499 7 31 jsmith 43 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 21 \N \N 1000.00 \N \N \N \N 500 7 31 jsmith 44 1 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 16 \N \N 1000.00 \N \N \N \N 501 7 31 jsmith 45 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 502 7 47 jsmith 1 0 G 12 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 15000.00 \N \N \N \N 503 7 47 jsmith 2 1 G 13 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 15000.00 \N \N \N \N 504 7 47 jsmith 3 2 I 12 \N 8000.00 \N \N \N \N \N \N \N \N 13 \N \N 8000.00 \N \N \N \N 505 7 47 jsmith 4 2 I 13 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 506 7 47 jsmith 5 2 I 14 \N 7000.00 \N \N \N \N \N \N \N \N 13 \N \N 7000.00 \N \N \N \N 507 7 47 jsmith 6 2 I 15 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 508 7 47 jsmith 7 2 I 16 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 509 7 47 jsmith 8 2 I 17 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 510 7 47 jsmith 9 2 I 18 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 511 7 47 jsmith 10 2 I 19 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 512 7 47 jsmith 11 2 I 20 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 513 7 47 jsmith 12 2 I 21 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 514 7 47 jsmith 13 2 I 22 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 515 7 47 jsmith 15 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 516 7 47 jsmith 16 2 I 23 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 517 7 47 jsmith 18 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 518 7 47 jsmith 21 0 G 16 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 15000.00 \N \N \N \N 519 7 47 jsmith 22 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 0.00 \N \N \N \N 520 7 47 jsmith 23 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 521 7 47 jsmith 24 3 I 24 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 522 7 47 jsmith 25 3 I 25 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 523 7 47 jsmith 26 3 I 26 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 524 7 47 jsmith 27 3 I 27 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 525 7 47 jsmith 28 3 I 28 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 526 7 47 jsmith 29 3 I 29 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 527 7 47 jsmith 31 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 528 7 47 jsmith 34 1 G 21 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 15000.00 \N \N \N \N 529 7 47 jsmith 35 2 G 22 0.00 10000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 10000.00 \N \N \N \N 530 7 47 jsmith 36 3 I 30 \N 10000.00 \N \N \N \N \N \N \N \N 22 \N \N 10000.00 \N \N \N \N 531 7 47 jsmith 38 2 G 23 \N 5000.00 \N \N \N \N \N \N \N \N 21 \N \N 5000.00 \N \N \N \N 532 7 47 jsmith 39 2 G 24 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 0.00 \N \N \N \N 533 7 47 jsmith 40 3 I 31 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 534 7 47 jsmith 41 3 I 45 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 535 7 47 jsmith 14 2 T -1 \N 15000.00 \N \N \N \N \N \N \N \N 13 \N \N 15000.00 \N \N \N \N 536 7 47 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 537 7 47 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 15 \N \N 0.00 \N \N \N \N 538 7 47 jsmith 20 1 T -1 \N 15000.00 \N \N \N \N \N \N \N \N 12 \N \N 15000.00 \N \N \N \N 539 7 47 jsmith 30 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 540 7 47 jsmith 32 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 20 \N \N 0.00 \N \N \N \N 541 7 47 jsmith 33 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 17 \N \N 0.00 \N \N \N \N 542 7 47 jsmith 37 3 T -1 \N 10000.00 \N \N \N \N \N \N \N \N 22 \N \N 10000.00 \N \N \N \N 543 7 47 jsmith 42 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 544 7 47 jsmith 43 2 T -1 \N 15000.00 \N \N \N \N \N \N \N \N 21 \N \N 15000.00 \N \N \N \N 545 7 47 jsmith 44 1 T -1 \N 15000.00 \N \N \N \N \N \N \N \N 16 \N \N 15000.00 \N \N \N \N 546 7 47 jsmith 45 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 547 7 48 jsmith 4 2 I 13 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 548 7 48 jsmith 1 0 G 12 0.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 18000.00 \N \N \N \N 549 7 48 jsmith 2 1 G 13 0.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 18000.00 \N \N \N \N 550 7 48 jsmith 3 2 I 12 \N 14000.00 \N \N \N \N \N \N \N \N 13 \N \N 14000.00 \N \N \N \N 551 7 48 jsmith 5 2 I 14 \N 4000.00 \N \N \N \N \N \N \N \N 13 \N \N 4000.00 \N \N \N \N 552 7 48 jsmith 6 2 I 15 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 553 7 48 jsmith 7 2 I 16 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 554 7 48 jsmith 8 2 I 17 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 555 7 48 jsmith 9 2 I 18 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 556 7 48 jsmith 10 2 I 19 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 557 7 48 jsmith 11 2 I 20 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 558 7 48 jsmith 12 2 I 21 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 559 7 48 jsmith 13 2 I 22 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 560 7 48 jsmith 15 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 561 7 48 jsmith 16 2 I 23 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 562 7 48 jsmith 18 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 563 7 48 jsmith 21 0 G 16 0.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 18000.00 \N \N \N \N 564 7 48 jsmith 22 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 0.00 \N \N \N \N 565 7 48 jsmith 23 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 566 7 48 jsmith 24 3 I 24 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 567 7 48 jsmith 25 3 I 25 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 568 7 48 jsmith 26 3 I 26 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 569 7 48 jsmith 27 3 I 27 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 570 7 48 jsmith 28 3 I 28 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 571 7 48 jsmith 29 3 I 29 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 572 7 48 jsmith 31 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 573 7 48 jsmith 34 1 G 21 0.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 18000.00 \N \N \N \N 574 7 48 jsmith 35 2 G 22 0.00 10000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 10000.00 \N \N \N \N 575 7 48 jsmith 36 3 I 30 \N 10000.00 \N \N \N \N \N \N \N \N 22 \N \N 10000.00 \N \N \N \N 576 7 48 jsmith 38 2 G 23 \N 3000.00 \N \N \N \N \N \N \N \N 21 \N \N 3000.00 \N \N \N \N 577 7 48 jsmith 39 2 G 24 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 5000.00 \N \N \N \N 578 7 48 jsmith 40 3 I 31 \N 5000.00 \N \N \N \N \N \N \N \N 24 \N \N 5000.00 \N \N \N \N 579 7 48 jsmith 41 3 I 45 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 580 7 48 jsmith 14 2 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 13 \N \N 18000.00 \N \N \N \N 581 7 48 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 582 7 48 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 15 \N \N 0.00 \N \N \N \N 583 7 48 jsmith 20 1 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 12 \N \N 18000.00 \N \N \N \N 584 7 48 jsmith 30 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 585 7 48 jsmith 32 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 20 \N \N 0.00 \N \N \N \N 586 7 48 jsmith 33 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 17 \N \N 0.00 \N \N \N \N 587 7 48 jsmith 37 3 T -1 \N 10000.00 \N \N \N \N \N \N \N \N 22 \N \N 10000.00 \N \N \N \N 588 7 48 jsmith 42 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 24 \N \N 5000.00 \N \N \N \N 589 7 48 jsmith 43 2 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 21 \N \N 18000.00 \N \N \N \N 590 7 48 jsmith 44 1 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 16 \N \N 18000.00 \N \N \N \N 591 7 48 jsmith 45 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 592 7 46 jsmith 1 0 G 12 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 39000.00 \N \N \N \N 593 7 46 jsmith 2 1 G 13 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 39000.00 \N \N \N \N 594 7 46 jsmith 3 2 I 12 \N 36000.00 \N \N \N \N \N \N \N \N 13 \N \N 36000.00 \N \N \N \N 595 7 46 jsmith 4 2 I 13 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 596 7 46 jsmith 5 2 I 14 \N 3000.00 \N \N \N \N \N \N \N \N 13 \N \N 3000.00 \N \N \N \N 597 7 46 jsmith 6 2 I 15 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 598 7 46 jsmith 7 2 I 16 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 599 7 46 jsmith 8 2 I 17 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 600 7 46 jsmith 9 2 I 18 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 601 7 46 jsmith 10 2 I 19 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 602 7 46 jsmith 11 2 I 20 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 603 7 46 jsmith 12 2 I 21 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 604 7 46 jsmith 13 2 I 22 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 605 7 46 jsmith 15 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 606 7 46 jsmith 16 2 I 23 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 607 7 46 jsmith 18 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 608 7 46 jsmith 21 0 G 16 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 36000.00 \N \N \N \N 609 7 46 jsmith 22 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 0.00 \N \N \N \N 610 7 46 jsmith 23 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 611 7 46 jsmith 24 3 I 24 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 612 7 46 jsmith 25 3 I 25 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 613 7 46 jsmith 26 3 I 26 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 614 7 46 jsmith 27 3 I 27 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 615 7 46 jsmith 28 3 I 28 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 616 7 46 jsmith 29 3 I 29 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 617 7 46 jsmith 31 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 618 7 46 jsmith 34 1 G 21 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 36000.00 \N \N \N \N 619 7 46 jsmith 35 2 G 22 0.00 20000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 20000.00 \N \N \N \N 620 7 46 jsmith 36 3 I 30 \N 20000.00 \N \N \N \N \N \N \N \N 22 \N \N 20000.00 \N \N \N \N 621 7 46 jsmith 38 2 G 23 \N 14000.00 \N \N \N \N \N \N \N \N 21 \N \N 11000.00 \N \N \N \N 622 7 46 jsmith 39 2 G 24 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 5000.00 \N \N \N \N 623 7 46 jsmith 40 3 I 31 \N 5000.00 \N \N \N \N \N \N \N \N 24 \N \N 5000.00 \N \N \N \N 624 7 46 jsmith 41 3 I 45 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 625 7 46 jsmith 14 2 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 13 \N \N 39000.00 \N \N \N \N 626 7 46 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 627 7 46 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 15 \N \N 0.00 \N \N \N \N 628 7 46 jsmith 20 1 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 12 \N \N 39000.00 \N \N \N \N 629 7 46 jsmith 30 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 630 7 46 jsmith 32 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 20 \N \N 0.00 \N \N \N \N 631 7 46 jsmith 33 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 17 \N \N 0.00 \N \N \N \N 632 7 46 jsmith 37 3 T -1 \N 20000.00 \N \N \N \N \N \N \N \N 22 \N \N 20000.00 \N \N \N \N 633 7 46 jsmith 42 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 24 \N \N 5000.00 \N \N \N \N 634 7 46 jsmith 43 2 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 21 \N \N 36000.00 \N \N \N \N 635 7 46 jsmith 44 1 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 16 \N \N 36000.00 \N \N \N \N 636 7 46 jsmith 45 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N 0.00 \N 3000.00 \N \N \N \N 637 7 29 jsmith 10 2 I 19 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 638 7 29 jsmith 1 0 G 12 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 39000.00 \N \N \N \N 639 7 29 jsmith 2 1 G 13 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 39000.00 \N \N \N \N 640 7 29 jsmith 3 2 I 12 \N 36000.00 \N \N \N \N \N \N \N \N 13 \N \N 36000.00 \N \N \N \N 641 7 29 jsmith 4 2 I 13 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 642 7 29 jsmith 5 2 I 14 \N 3000.00 \N \N \N \N \N \N \N \N 13 \N \N 3000.00 \N \N \N \N 643 7 29 jsmith 6 2 I 15 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 644 7 29 jsmith 7 2 I 16 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 645 7 29 jsmith 8 2 I 17 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 646 7 29 jsmith 9 2 I 18 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 647 7 29 jsmith 11 2 I 20 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 648 7 29 jsmith 12 2 I 21 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 649 7 29 jsmith 13 2 I 22 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 650 7 29 jsmith 15 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 651 7 29 jsmith 16 2 I 23 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 652 7 29 jsmith 18 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 653 7 29 jsmith 21 0 G 16 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 25000.00 \N \N \N \N 654 7 29 jsmith 22 1 G 17 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 0.00 \N \N \N \N 655 7 29 jsmith 23 2 G 18 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 656 7 29 jsmith 24 3 I 24 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 657 7 29 jsmith 25 3 I 25 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 658 7 29 jsmith 26 3 I 26 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 659 7 29 jsmith 27 3 I 27 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 660 7 29 jsmith 28 3 I 28 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 661 7 29 jsmith 29 3 I 29 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 662 7 29 jsmith 31 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 663 7 29 jsmith 34 1 G 21 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 25000.00 \N \N \N \N 664 7 29 jsmith 35 2 G 22 0.00 20000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 20000.00 \N \N \N \N 665 7 29 jsmith 36 3 I 30 \N 20000.00 \N \N \N \N \N \N \N \N 22 \N \N 20000.00 \N \N \N \N 666 7 29 jsmith 38 2 G 23 \N 14000.00 \N \N \N \N \N \N \N \N 21 \N \N 0.00 \N \N \N \N 667 7 29 jsmith 39 2 G 24 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 5000.00 \N \N \N \N 668 7 29 jsmith 40 3 I 31 \N 5000.00 \N \N \N \N \N \N \N \N 24 \N \N 5000.00 \N \N \N \N 669 7 29 jsmith 41 3 I 45 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 670 7 29 jsmith 14 2 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 13 \N \N 39000.00 \N \N \N \N 671 7 29 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 672 7 29 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 15 \N \N 0.00 \N \N \N \N 673 7 29 jsmith 20 1 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 12 \N \N 39000.00 \N \N \N \N 674 7 29 jsmith 30 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 675 7 29 jsmith 32 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 20 \N \N 0.00 \N \N \N \N 676 7 29 jsmith 33 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 17 \N \N 0.00 \N \N \N \N 677 7 29 jsmith 37 3 T -1 \N 20000.00 \N \N \N \N \N \N \N \N 22 \N \N 20000.00 \N \N \N \N 678 13 42 mfgadmin 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 679 7 29 jsmith 42 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 24 \N \N 5000.00 \N \N \N \N 680 7 29 jsmith 43 2 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 21 \N \N 25000.00 \N \N \N \N 681 7 29 jsmith 44 1 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 16 \N \N 25000.00 \N \N \N \N 682 7 29 jsmith 45 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N 0.00 \N 14000.00 \N \N \N \N 683 7 28 jsmith 1 0 G 12 0.00 1043286.24 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1043286.24 \N \N \N \N 684 7 28 jsmith 2 1 G 13 0.00 1043286.24 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 1043286.24 \N \N \N \N 685 7 28 jsmith 3 2 I 12 \N 1027222.11 \N \N \N \N \N \N \N \N 13 \N \N 1027222.11 \N \N \N \N 686 7 28 jsmith 4 2 I 13 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 687 7 28 jsmith 5 2 I 14 \N 22195.81 \N \N \N \N \N \N \N \N 13 \N \N 22195.81 \N \N \N \N 688 7 28 jsmith 6 2 I 15 \N -1.06 \N \N \N \N \N \N \N \N 13 \N \N -1.06 \N \N \N \N 689 7 28 jsmith 7 2 I 16 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 690 7 28 jsmith 8 2 I 17 \N -76.85 \N \N \N \N \N \N \N \N 13 \N \N -76.85 \N \N \N \N 691 7 28 jsmith 9 2 I 18 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 692 7 28 jsmith 10 2 I 19 \N -6053.79 \N \N \N \N \N \N \N \N 13 \N \N -6053.79 \N \N \N \N 693 7 28 jsmith 11 2 I 20 \N 0.02 \N \N \N \N \N \N \N \N 13 \N \N 0.02 \N \N \N \N 694 7 28 jsmith 12 2 I 21 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 695 7 28 jsmith 13 2 I 22 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 696 7 28 jsmith 15 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 697 7 28 jsmith 16 2 I 23 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 698 7 28 jsmith 18 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 699 7 28 jsmith 21 0 G 16 0.00 1043286.24 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1029286.24 \N \N \N \N 700 7 28 jsmith 22 1 G 17 0.00 829.11 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 829.11 \N \N \N \N 701 7 28 jsmith 23 2 G 18 0.00 829.11 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 829.11 \N \N \N \N 702 7 28 jsmith 24 3 I 24 \N 250.00 \N \N \N \N \N \N \N \N 18 \N \N 250.00 \N \N \N \N 703 7 28 jsmith 25 3 I 25 \N 151.99 \N \N \N \N \N \N \N \N 18 \N \N 151.99 \N \N \N \N 704 7 28 jsmith 26 3 I 26 \N 0.00 \N \N \N \N \N \N \N \N 18 \N \N 0.00 \N \N \N \N 705 7 28 jsmith 27 3 I 27 \N 216.74 \N \N \N \N \N \N \N \N 18 \N \N 216.74 \N \N \N \N 706 7 28 jsmith 28 3 I 28 \N 238.77 \N \N \N \N \N \N \N \N 18 \N \N 238.77 \N \N \N \N 707 7 28 jsmith 29 3 I 29 \N -28.39 \N \N \N \N \N \N \N \N 18 \N \N -28.39 \N \N \N \N 708 7 28 jsmith 31 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 709 7 28 jsmith 34 1 G 21 0.00 1042457.13 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 1028457.13 \N \N \N \N 710 7 28 jsmith 35 2 G 22 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 1020000.00 \N \N \N \N 711 7 28 jsmith 36 3 I 30 \N 1020000.00 \N \N \N \N \N \N \N \N 22 \N \N 1020000.00 \N \N \N \N 712 7 28 jsmith 38 2 G 23 \N 17457.13 \N \N \N \N \N \N \N \N 21 \N \N 3457.13 \N \N \N \N 713 7 28 jsmith 39 2 G 24 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 5000.00 \N \N \N \N 714 7 28 jsmith 40 3 I 31 \N 5000.00 \N \N \N \N \N \N \N \N 24 \N \N 5000.00 \N \N \N \N 715 7 28 jsmith 41 3 I 45 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 716 7 28 jsmith 14 2 T -1 \N 1043286.24 \N \N \N \N \N \N \N \N 13 \N \N 1043286.24 \N \N \N \N 717 7 28 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 718 7 28 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 15 \N \N 0.00 \N \N \N \N 719 7 28 jsmith 20 1 T -1 \N 1043286.24 \N \N \N \N \N \N \N \N 12 \N \N 1043286.24 \N \N \N \N 720 7 28 jsmith 30 3 T -1 \N 829.11 \N \N \N \N \N \N \N \N 18 \N \N 829.11 \N \N \N \N 721 7 28 jsmith 32 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 20 \N \N 0.00 \N \N \N \N 722 7 28 jsmith 33 2 T -1 \N 829.11 \N \N \N \N \N \N \N \N 17 \N \N 829.11 \N \N \N \N 723 7 28 jsmith 37 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 22 \N \N 1020000.00 \N \N \N \N 724 7 28 jsmith 42 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 24 \N \N 5000.00 \N \N \N \N 725 7 28 jsmith 43 2 T -1 \N 1042457.13 \N \N \N \N \N \N \N \N 21 \N \N 1028457.13 \N \N \N \N 726 7 28 jsmith 44 1 T -1 \N 1043286.24 \N \N \N \N \N \N \N \N 16 \N \N 1029286.24 \N \N \N \N 727 7 28 jsmith 45 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N 0.00 \N 14000.00 \N \N \N \N 728 7 30 jsmith 4 2 I 13 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 729 7 30 jsmith 1 0 G 12 0.00 1046057.66 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1046057.66 \N \N \N \N 730 7 30 jsmith 2 1 G 13 0.00 1046057.66 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 1046057.66 \N \N \N \N 731 7 30 jsmith 3 2 I 12 \N 1030080.94 \N \N \N \N \N \N \N \N 13 \N \N 1030080.94 \N \N \N \N 732 7 30 jsmith 5 2 I 14 \N 70516.91 \N \N \N \N \N \N \N \N 13 \N \N 70516.91 \N \N \N \N 733 7 30 jsmith 6 2 I 15 \N -1.03 \N \N \N \N \N \N \N \N 13 \N \N -1.03 \N \N \N \N 734 7 30 jsmith 7 2 I 16 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 735 7 30 jsmith 8 2 I 17 \N -48695.01 \N \N \N \N \N \N \N \N 13 \N \N -48695.01 \N \N \N \N 736 7 30 jsmith 9 2 I 18 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 737 7 30 jsmith 10 2 I 19 \N -5868.79 \N \N \N \N \N \N \N \N 13 \N \N -5868.79 \N \N \N \N 738 7 30 jsmith 11 2 I 20 \N 24.64 \N \N \N \N \N \N \N \N 13 \N \N 24.64 \N \N \N \N 739 7 30 jsmith 12 2 I 21 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 740 7 30 jsmith 13 2 I 22 \N 0.00 \N \N \N \N \N \N \N \N 13 \N \N 0.00 \N \N \N \N 741 7 30 jsmith 15 1 G 14 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 742 7 30 jsmith 16 2 I 23 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 743 7 30 jsmith 18 1 G 15 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 12 0.00 \N 0.00 \N \N \N \N 744 7 30 jsmith 21 0 G 16 0.00 1046057.66 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1046057.66 \N \N \N \N 745 7 30 jsmith 22 1 G 17 0.00 726.06 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 726.06 \N \N \N \N 746 7 30 jsmith 23 2 G 18 0.00 726.06 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 726.06 \N \N \N \N 747 7 30 jsmith 24 3 I 24 \N -0.40 \N \N \N \N \N \N \N \N 18 \N \N -0.40 \N \N \N \N 748 7 30 jsmith 25 3 I 25 \N 215.73 \N \N \N \N \N \N \N \N 18 \N \N 215.73 \N \N \N \N 749 7 30 jsmith 26 3 I 26 \N -125.00 \N \N \N \N \N \N \N \N 18 \N \N -125.00 \N \N \N \N 750 7 30 jsmith 27 3 I 27 \N 335.48 \N \N \N \N \N \N \N \N 18 \N \N 335.48 \N \N \N \N 751 7 30 jsmith 28 3 I 28 \N 351.14 \N \N \N \N \N \N \N \N 18 \N \N 351.14 \N \N \N \N 752 7 30 jsmith 29 3 I 29 \N -50.89 \N \N \N \N \N \N \N \N 18 \N \N -50.89 \N \N \N \N 753 7 30 jsmith 31 2 G 20 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 17 0.00 \N 0.00 \N \N \N \N 754 7 30 jsmith 34 1 G 21 0.00 1045331.60 0.00 0.00 0.00 \N \N \N \N \N 16 0.00 \N 1045331.60 \N \N \N \N 755 7 30 jsmith 35 2 G 22 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 1020000.00 \N \N \N \N 756 7 30 jsmith 36 3 I 30 \N 1020000.00 \N \N \N \N \N \N \N \N 22 \N \N 1020000.00 \N \N \N \N 757 7 30 jsmith 38 2 G 23 \N 2874.47 \N \N \N \N \N \N \N \N 21 \N \N 2874.47 \N \N \N \N 758 7 30 jsmith 39 2 G 24 0.00 22457.13 0.00 0.00 0.00 \N \N \N \N \N 21 0.00 \N 22457.13 \N \N \N \N 759 7 30 jsmith 40 3 I 31 \N 22457.13 \N \N \N \N \N \N \N \N 24 \N \N 22457.13 \N \N \N \N 760 7 30 jsmith 41 3 I 45 \N 0.00 \N \N \N \N \N \N \N \N 24 \N \N 0.00 \N \N \N \N 761 7 30 jsmith 14 2 T -1 \N 1046057.66 \N \N \N \N \N \N \N \N 13 \N \N 1046057.66 \N \N \N \N 762 7 30 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 14 \N \N 0.00 \N \N \N \N 763 7 30 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 15 \N \N 0.00 \N \N \N \N 764 7 30 jsmith 20 1 T -1 \N 1046057.66 \N \N \N \N \N \N \N \N 12 \N \N 1046057.66 \N \N \N \N 765 7 30 jsmith 30 3 T -1 \N 726.06 \N \N \N \N \N \N \N \N 18 \N \N 726.06 \N \N \N \N 766 7 30 jsmith 32 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 20 \N \N 0.00 \N \N \N \N 767 7 30 jsmith 33 2 T -1 \N 726.06 \N \N \N \N \N \N \N \N 17 \N \N 726.06 \N \N \N \N 768 7 30 jsmith 37 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 22 \N \N 1020000.00 \N \N \N \N 769 7 30 jsmith 42 3 T -1 \N 22457.13 \N \N \N \N \N \N \N \N 24 \N \N 22457.13 \N \N \N \N 770 7 30 jsmith 43 2 T -1 \N 1045331.60 \N \N \N \N \N \N \N \N 21 \N \N 1045331.60 \N \N \N \N 771 7 30 jsmith 44 1 T -1 \N 1046057.66 \N \N \N \N \N \N \N \N 16 \N \N 1046057.66 \N \N \N \N 772 7 30 jsmith 45 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 773 4 38 jsmith 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 774 4 38 jsmith 28 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 775 4 38 jsmith 12 1 T -1 \N 1018464.09 \N \N 0.00 \N 0.63740475954680119050 \N \N 0.00000000000000000000 3 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 \N \N \N 776 4 38 jsmith 8 2 T -1 \N 1597829.44 \N \N \N \N \N \N \N \N 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 777 4 38 jsmith 27 2 T -1 \N 3409.78 \N \N 0.00 \N 0.00213400749456712977 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 778 4 38 jsmith 29 0 T -1 0.00 1015054.31 \N \N 0.00 \N \N \N \N \N \N 35000.00 \N 35000.00 \N \N \N \N 779 4 38 jsmith 1 0 G 3 0.00 1018464.09 0.00 0.00 0.00 \N 0.63740475954680119050 \N \N 0.00000000000000000000 -1 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 \N \N \N 780 4 38 jsmith 2 1 G 4 0.00 1597829.44 0.00 0.00 0.00 \N \N \N \N \N 3 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 781 4 38 jsmith 3 2 I 2 \N 1597594.54 \N \N 0.00 \N 0.99985298806360708938 \N \N 0.00000000000000000000 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 782 4 38 jsmith 4 2 I 218 \N 95.00 \N \N 0.00 \N 0.000059455657545025581704 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 783 4 38 jsmith 5 2 I 219 \N 136.00 \N \N 0.00 \N 0.000085115467643405043282 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 784 4 38 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 785 4 38 jsmith 7 2 I 3 \N 3.90 \N \N 0.00 \N 0.000002440811204479997565 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 786 4 38 jsmith 9 1 G 5 0.00 -579365.35 0.00 0.00 0.00 \N \N \N \N \N 3 -15000.00 \N -15000.00 \N \N \N \N 787 4 38 jsmith 10 2 I 4 \N 579365.35 \N \N 0.00 \N 0.36259524045319880950 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 788 4 38 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 789 4 38 jsmith 13 0 G 7 0.00 3409.78 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 790 4 38 jsmith 14 1 G 8 0.00 3409.78 0.00 0.00 0.00 \N 0.00213400749456712977 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 791 4 38 jsmith 15 2 I 5 \N 3498.78 \N \N 0.00 \N 0.00218970805795141689 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 792 4 38 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 793 4 38 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 794 4 38 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 795 4 38 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 796 4 38 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 797 4 38 jsmith 21 2 I 11 \N -94.00 \N \N 0.00 \N -0.000058829808518235838739 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 798 13 55 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 799 13 55 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 800 13 55 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 801 13 55 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 0.00 \N 0.00 \N \N \N \N 802 13 55 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 803 13 55 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 804 13 55 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 805 13 55 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 806 4 34 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 807 11 31 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 808 4 34 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 809 4 34 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 810 4 34 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 811 4 34 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 812 4 34 jsmith 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 813 4 34 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 814 4 34 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000026150977753677036680 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 815 4 34 jsmith 24 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 816 4 34 jsmith 25 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 817 4 34 jsmith 27 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 818 4 34 jsmith 12 1 T -1 \N 142324.45 \N \N 0.00 \N 0.74438470515086394462 \N \N 0.00000000000000000000 3 60000.00 0.80000000000000000000 60000.00 0.80000000000000000000 \N \N \N 819 4 34 jsmith 8 2 T -1 \N 191197.44 \N \N \N \N \N \N \N \N 4 75000.00 1.00000000000000000000 75000.00 1.00000000000000000000 \N \N \N 820 4 34 jsmith 26 2 T -1 \N 1015.00 \N \N 0.00 \N 0.00530864848399643845 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 821 4 34 jsmith 28 0 T -1 0.00 141309.45 \N \N 0.00 \N \N \N \N \N \N 60000.00 \N 60000.00 \N \N \N \N 822 4 33 jsmith 10 2 I 4 \N 33872.99 \N \N 0.00 \N 0.29151236034115725785 \N \N 0.00000000000000000000 5 15000.00 0.27272727272727272727 15000.00 0.27272727272727272727 \N \N \N 823 4 33 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 824 4 33 jsmith 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 825 4 33 jsmith 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.00873513220256831820 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 826 4 33 jsmith 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.00869210199467389299 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 827 4 33 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 828 4 33 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 829 4 33 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 830 4 33 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 831 4 33 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 832 4 33 jsmith 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 833 4 33 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 834 4 33 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000043030207894425212810 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 835 4 33 jsmith 24 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 836 4 33 jsmith 25 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 837 4 33 jsmith 27 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 838 4 33 jsmith 12 1 T -1 \N 82324.45 \N \N 0.00 \N 0.70848763965884274215 \N \N 0.00000000000000000000 3 40000.00 0.72727272727272727273 40000.00 0.72727272727272727273 \N \N \N 839 4 33 jsmith 8 2 T -1 \N 116197.44 \N \N \N \N \N \N \N \N 4 55000.00 1.00000000000000000000 55000.00 1.00000000000000000000 \N \N \N 840 4 33 jsmith 26 2 T -1 \N 1015.00 \N \N 0.00 \N 0.00873513220256831820 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 841 4 33 jsmith 28 0 T -1 0.00 81309.45 \N \N 0.00 \N \N \N \N \N \N 40000.00 \N 40000.00 \N \N \N \N 842 4 33 jsmith 1 0 G 3 0.00 82324.45 0.00 0.00 0.00 \N 0.70848763965884274215 \N \N 0.00000000000000000000 -1 40000.00 0.72727272727272727273 40000.00 0.72727272727272727273 \N \N \N 843 4 33 jsmith 2 1 G 4 0.00 116197.44 0.00 0.00 0.00 \N \N \N \N \N 3 55000.00 1.00000000000000000000 55000.00 1.00000000000000000000 \N \N \N 844 4 33 jsmith 3 2 I 2 \N 116194.54 \N \N 0.00 \N 0.99997504247942123338 \N \N 0.00000000000000000000 4 55000.00 1.00000000000000000000 55000.00 1.00000000000000000000 \N \N \N 845 4 33 jsmith 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 846 4 33 jsmith 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 847 4 33 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 848 4 33 jsmith 7 2 I 3 \N 2.90 \N \N 0.00 \N 0.000024957520578766623430 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 849 4 33 jsmith 9 1 G 5 0.00 -33872.99 0.00 0.00 0.00 \N \N \N \N \N 3 -15000.00 \N -15000.00 \N \N \N \N 850 4 32 jsmith 1 0 G 3 0.00 42324.45 0.00 0.00 0.00 \N 0.69160491027075642380 \N \N 0.00000000000000000000 -1 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 \N \N \N 851 4 32 jsmith 2 1 G 4 0.00 61197.44 0.00 0.00 0.00 \N \N \N \N \N 3 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 852 4 32 jsmith 3 2 I 2 \N 61194.54 \N \N 0.00 \N 0.99995261239685843068 \N \N 0.00000000000000000000 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 853 4 32 jsmith 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 854 4 32 jsmith 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 855 4 32 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 856 13 35 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 97000.00 \N 97000.00 \N \N \N \N 857 13 35 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 97000.00 \N 97000.00 \N \N \N \N 858 13 35 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 185000.00 \N 185000.00 \N \N \N \N 859 13 35 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 185000.00 \N 185000.00 \N \N \N \N 860 13 35 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 861 13 35 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 862 13 35 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 863 13 35 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 864 13 35 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 865 13 35 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 866 13 35 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 88000.00 \N 88000.00 \N \N \N \N 867 13 35 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 88000.00 \N 88000.00 \N \N \N \N 868 13 35 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 869 13 35 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 870 13 35 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 871 13 35 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 872 11 47 jsmith 1 0 G 44 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 15000.00 \N \N \N \N 873 11 47 jsmith 2 1 G 45 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 15000.00 \N \N \N \N 874 11 47 jsmith 3 2 I 65 \N 8000.00 \N \N \N \N \N \N \N \N 45 \N \N 8000.00 \N \N \N \N 875 11 47 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 876 11 47 jsmith 5 2 I 67 \N 7000.00 \N \N \N \N \N \N \N \N 45 \N \N 7000.00 \N \N \N \N 877 11 47 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 878 11 47 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 879 11 47 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 880 11 47 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 881 11 47 jsmith 10 2 I 72 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 882 11 47 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 883 11 47 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 884 11 47 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 885 11 47 jsmith 15 1 G 46 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 886 11 47 jsmith 16 2 I 76 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 887 11 47 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 888 11 47 jsmith 21 0 G 36 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 15000.00 \N \N \N \N 889 11 47 jsmith 22 1 G 37 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 890 11 47 jsmith 23 2 G 38 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 891 11 47 jsmith 24 3 I 47 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 892 11 47 jsmith 25 3 I 46 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 893 11 47 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 894 11 47 jsmith 27 3 I 49 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 895 11 47 jsmith 28 3 I 50 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 896 11 47 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 897 11 47 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 898 11 47 jsmith 32 2 G 39 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 899 11 47 jsmith 33 3 I 140 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 900 11 47 jsmith 36 1 G 40 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 15000.00 \N \N \N \N 901 11 47 jsmith 37 2 G 41 0.00 10000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 10000.00 \N \N \N \N 902 11 47 jsmith 38 3 I 52 \N 10000.00 \N \N \N \N \N \N \N \N 41 \N \N 10000.00 \N \N \N \N 903 11 47 jsmith 40 2 G 42 \N 5000.00 \N \N \N \N \N \N \N \N 40 \N \N 5000.00 \N \N \N \N 904 11 47 jsmith 41 2 G 43 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 0.00 \N \N \N \N 905 11 47 jsmith 42 3 I 63 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 906 11 47 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 907 11 47 jsmith 20 1 T -1 \N 15000.00 \N \N \N \N \N \N \N \N 44 \N \N 15000.00 \N \N \N \N 908 11 47 jsmith 14 2 T -1 \N 15000.00 \N \N \N \N \N \N \N \N 45 \N \N 15000.00 \N \N \N \N 909 11 47 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 910 11 47 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 911 11 47 jsmith 46 1 T -1 \N 15000.00 \N \N \N \N \N \N \N \N 36 \N \N 15000.00 \N \N \N \N 912 11 47 jsmith 35 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 37 \N \N 0.00 \N \N \N \N 913 11 47 jsmith 31 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 914 11 47 jsmith 34 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 915 11 47 jsmith 45 2 T -1 \N 15000.00 \N \N \N \N \N \N \N \N 40 \N \N 15000.00 \N \N \N \N 916 11 47 jsmith 39 3 T -1 \N 10000.00 \N \N \N \N \N \N \N \N 41 \N \N 10000.00 \N \N \N \N 917 11 47 jsmith 44 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 918 11 47 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 919 11 48 jsmith 1 0 G 44 0.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 18000.00 \N \N \N \N 920 11 48 jsmith 2 1 G 45 0.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 18000.00 \N \N \N \N 921 11 48 jsmith 3 2 I 65 \N 14000.00 \N \N \N \N \N \N \N \N 45 \N \N 14000.00 \N \N \N \N 922 11 48 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 923 11 48 jsmith 5 2 I 67 \N 4000.00 \N \N \N \N \N \N \N \N 45 \N \N 4000.00 \N \N \N \N 924 11 48 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 925 11 48 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 926 11 48 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 927 11 48 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 928 13 35 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 929 13 35 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 930 13 35 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 931 11 48 jsmith 10 2 I 72 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 932 11 48 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 933 11 48 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 934 11 48 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 935 11 48 jsmith 15 1 G 46 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 936 11 48 jsmith 16 2 I 76 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 937 11 48 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 938 11 48 jsmith 21 0 G 36 0.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 18000.00 \N \N \N \N 939 11 48 jsmith 22 1 G 37 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 940 11 48 jsmith 23 2 G 38 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 941 11 48 jsmith 24 3 I 47 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 942 11 48 jsmith 25 3 I 46 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 943 11 48 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 944 11 48 jsmith 27 3 I 49 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 945 11 48 jsmith 28 3 I 50 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 946 11 48 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 947 11 48 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 948 11 48 jsmith 32 2 G 39 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 949 11 48 jsmith 33 3 I 140 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 950 11 48 jsmith 36 1 G 40 0.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 18000.00 \N \N \N \N 951 11 48 jsmith 37 2 G 41 0.00 10000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 10000.00 \N \N \N \N 952 11 48 jsmith 38 3 I 52 \N 10000.00 \N \N \N \N \N \N \N \N 41 \N \N 10000.00 \N \N \N \N 953 11 48 jsmith 40 2 G 42 \N 3000.00 \N \N \N \N \N \N \N \N 40 \N \N 3000.00 \N \N \N \N 954 11 48 jsmith 41 2 G 43 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 5000.00 \N \N \N \N 955 11 48 jsmith 42 3 I 63 \N 5000.00 \N \N \N \N \N \N \N \N 43 \N \N 5000.00 \N \N \N \N 956 11 48 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 957 11 48 jsmith 20 1 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 44 \N \N 18000.00 \N \N \N \N 958 11 48 jsmith 14 2 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 45 \N \N 18000.00 \N \N \N \N 959 11 48 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 960 11 48 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 961 11 48 jsmith 46 1 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 36 \N \N 18000.00 \N \N \N \N 962 11 48 jsmith 35 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 37 \N \N 0.00 \N \N \N \N 963 11 48 jsmith 31 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 964 11 48 jsmith 34 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 965 11 48 jsmith 45 2 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 40 \N \N 18000.00 \N \N \N \N 966 11 48 jsmith 39 3 T -1 \N 10000.00 \N \N \N \N \N \N \N \N 41 \N \N 10000.00 \N \N \N \N 967 11 48 jsmith 44 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 43 \N \N 5000.00 \N \N \N \N 968 11 48 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 969 11 46 jsmith 1 0 G 44 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 39000.00 \N \N \N \N 970 11 46 jsmith 2 1 G 45 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 39000.00 \N \N \N \N 971 11 46 jsmith 3 2 I 65 \N 36000.00 \N \N \N \N \N \N \N \N 45 \N \N 36000.00 \N \N \N \N 972 11 46 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 973 11 46 jsmith 5 2 I 67 \N 3000.00 \N \N \N \N \N \N \N \N 45 \N \N 3000.00 \N \N \N \N 974 11 46 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 975 11 46 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 976 11 46 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 977 11 46 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 978 11 46 jsmith 10 2 I 72 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 979 11 46 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 980 11 46 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 981 11 46 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 982 11 46 jsmith 15 1 G 46 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 983 11 46 jsmith 16 2 I 76 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 984 11 46 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 985 11 46 jsmith 21 0 G 36 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 39000.00 \N \N \N \N 986 11 46 jsmith 22 1 G 37 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 987 11 46 jsmith 23 2 G 38 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 988 11 46 jsmith 24 3 I 47 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 989 11 46 jsmith 25 3 I 46 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 990 11 46 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 991 11 46 jsmith 27 3 I 49 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 992 11 46 jsmith 28 3 I 50 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 993 11 46 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 994 11 46 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 995 11 46 jsmith 32 2 G 39 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 996 11 46 jsmith 33 3 I 140 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 997 11 46 jsmith 36 1 G 40 0.00 39000.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 39000.00 \N \N \N \N 998 11 46 jsmith 37 2 G 41 0.00 20000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 20000.00 \N \N \N \N 999 11 46 jsmith 38 3 I 52 \N 20000.00 \N \N \N \N \N \N \N \N 41 \N \N 20000.00 \N \N \N \N 1000 11 46 jsmith 40 2 G 42 \N 14000.00 \N \N \N \N \N \N \N \N 40 \N \N 14000.00 \N \N \N \N 1001 11 46 jsmith 41 2 G 43 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 5000.00 \N \N \N \N 1002 11 46 jsmith 42 3 I 63 \N 5000.00 \N \N \N \N \N \N \N \N 43 \N \N 5000.00 \N \N \N \N 1003 11 46 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 1004 11 46 jsmith 20 1 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 44 \N \N 39000.00 \N \N \N \N 1005 11 46 jsmith 14 2 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 45 \N \N 39000.00 \N \N \N \N 1006 11 46 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 1007 11 46 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 1008 11 46 jsmith 46 1 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 36 \N \N 39000.00 \N \N \N \N 1009 11 46 jsmith 35 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 37 \N \N 0.00 \N \N \N \N 1010 11 46 jsmith 31 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1011 11 46 jsmith 34 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 1012 11 46 jsmith 45 2 T -1 \N 39000.00 \N \N \N \N \N \N \N \N 40 \N \N 39000.00 \N \N \N \N 1013 11 46 jsmith 39 3 T -1 \N 20000.00 \N \N \N \N \N \N \N \N 41 \N \N 20000.00 \N \N \N \N 1014 11 46 jsmith 44 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 43 \N \N 5000.00 \N \N \N \N 1015 11 46 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 1016 11 29 jsmith 1 0 G 44 0.00 40000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 40000.00 \N \N \N \N 1017 11 29 jsmith 2 1 G 45 0.00 40000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 40000.00 \N \N \N \N 1018 11 29 jsmith 3 2 I 65 \N 38000.00 \N \N \N \N \N \N \N \N 45 \N \N 38000.00 \N \N \N \N 1019 11 29 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1020 11 29 jsmith 5 2 I 67 \N 2000.00 \N \N \N \N \N \N \N \N 45 \N \N 2000.00 \N \N \N \N 1021 11 29 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1022 11 29 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1023 11 29 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1024 11 29 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1025 11 29 jsmith 10 2 I 72 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1026 11 29 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1027 11 29 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1028 11 29 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1029 11 29 jsmith 15 1 G 46 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 1030 11 29 jsmith 16 2 I 76 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 1031 11 29 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 1032 11 29 jsmith 21 0 G 36 0.00 40000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 40000.00 \N \N \N \N 1033 11 29 jsmith 22 1 G 37 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 1034 11 29 jsmith 23 2 G 38 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 1035 11 29 jsmith 24 3 I 47 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1036 11 29 jsmith 25 3 I 46 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1037 11 29 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1038 11 29 jsmith 27 3 I 49 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1039 11 29 jsmith 28 3 I 50 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1040 11 29 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1041 11 29 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1042 11 29 jsmith 32 2 G 39 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 1043 11 29 jsmith 33 3 I 140 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 1044 11 29 jsmith 36 1 G 40 0.00 40000.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 40000.00 \N \N \N \N 1045 11 29 jsmith 37 2 G 41 0.00 20000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 20000.00 \N \N \N \N 1046 11 29 jsmith 38 3 I 52 \N 20000.00 \N \N \N \N \N \N \N \N 41 \N \N 20000.00 \N \N \N \N 1047 11 29 jsmith 40 2 G 42 \N 15000.00 \N \N \N \N \N \N \N \N 40 \N \N 15000.00 \N \N \N \N 1048 11 29 jsmith 41 2 G 43 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 5000.00 \N \N \N \N 1049 11 29 jsmith 42 3 I 63 \N 5000.00 \N \N \N \N \N \N \N \N 43 \N \N 5000.00 \N \N \N \N 1050 11 29 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 1051 11 29 jsmith 20 1 T -1 \N 40000.00 \N \N \N \N \N \N \N \N 44 \N \N 40000.00 \N \N \N \N 1052 11 29 jsmith 14 2 T -1 \N 40000.00 \N \N \N \N \N \N \N \N 45 \N \N 40000.00 \N \N \N \N 1053 11 29 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 1054 11 29 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 1055 11 29 jsmith 46 1 T -1 \N 40000.00 \N \N \N \N \N \N \N \N 36 \N \N 40000.00 \N \N \N \N 1056 11 29 jsmith 35 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 37 \N \N 0.00 \N \N \N \N 1057 11 29 jsmith 31 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1058 11 29 jsmith 34 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 1059 11 29 jsmith 45 2 T -1 \N 40000.00 \N \N \N \N \N \N \N \N 40 \N \N 40000.00 \N \N \N \N 1060 11 29 jsmith 39 3 T -1 \N 20000.00 \N \N \N \N \N \N \N \N 41 \N \N 20000.00 \N \N \N \N 1061 11 29 jsmith 44 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 43 \N \N 5000.00 \N \N \N \N 1062 11 29 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 1063 13 47 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1211 4 47 jsmith 1 0 G 3 0.00 6000.00 0.00 0.00 0.00 \N 0.66666666666666666667 \N \N 0.00000000000000000000 -1 6000.00 0.66666666666666666667 6000.00 0.66666666666666666667 \N \N \N 1064 4 47 jsmith 2 1 G 4 0.00 9000.00 0.00 0.00 0.00 \N \N \N \N \N 3 9000.00 1.00000000000000000000 9000.00 1.00000000000000000000 \N \N \N 1065 4 47 jsmith 3 2 I 2 0.00 9000.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 9000.00 1.00000000000000000000 9000.00 1.00000000000000000000 \N \N \N 1066 4 47 jsmith 4 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1067 4 47 jsmith 6 1 G 5 0.00 -3000.00 0.00 0.00 0.00 \N \N \N \N \N 3 -3000.00 \N -3000.00 \N \N \N \N 1068 4 47 jsmith 7 2 I 4 \N 3000.00 \N \N 0.00 \N 0.33333333333333333333 \N \N 0.00000000000000000000 5 3000.00 0.33333333333333333333 3000.00 0.33333333333333333333 \N \N \N 1069 4 47 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1070 4 47 jsmith 10 0 G 7 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N -1 1000.00 \N 1000.00 \N \N \N \N 1071 11 31 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1072 4 47 jsmith 11 1 G 8 0.00 1000.00 0.00 0.00 0.00 \N 0.11111111111111111111 \N \N 0.00000000000000000000 7 1000.00 0.11111111111111111111 1000.00 0.11111111111111111111 \N \N \N 1073 4 47 jsmith 12 2 I 5 \N 1000.00 \N \N 0.00 \N 0.11111111111111111111 \N \N 0.00000000000000000000 8 1000.00 0.11111111111111111111 1000.00 0.11111111111111111111 \N \N \N 1074 4 47 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1075 4 47 jsmith 14 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1076 4 47 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1077 4 47 jsmith 16 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1078 4 47 jsmith 17 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1079 4 47 jsmith 18 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1080 4 47 jsmith 20 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1081 4 47 jsmith 9 1 T -1 \N 6000.00 \N \N 0.00 \N 0.66666666666666666667 \N \N 0.00000000000000000000 3 6000.00 0.66666666666666666667 6000.00 0.66666666666666666667 \N \N \N 1082 4 47 jsmith 5 2 T -1 \N 9000.00 \N \N \N \N \N \N \N \N 4 9000.00 1.00000000000000000000 9000.00 1.00000000000000000000 \N \N \N 1083 4 47 jsmith 19 2 T -1 \N 1000.00 \N \N 0.00 \N 0.11111111111111111111 \N \N 0.00000000000000000000 8 1000.00 0.11111111111111111111 1000.00 0.11111111111111111111 \N \N \N 1084 4 47 jsmith 21 0 T -1 0.00 5000.00 \N \N 0.00 \N \N \N \N \N \N 5000.00 \N 5000.00 \N \N \N \N 1085 4 48 jsmith 1 0 G 3 0.00 3000.00 0.00 0.00 0.00 \N 0.50000000000000000000 \N \N 0.00000000000000000000 -1 3000.00 0.50000000000000000000 3000.00 0.50000000000000000000 \N \N \N 1086 4 48 jsmith 2 1 G 4 0.00 6000.00 0.00 0.00 0.00 \N \N \N \N \N 3 6000.00 1.00000000000000000000 6000.00 1.00000000000000000000 \N \N \N 1087 4 48 jsmith 3 2 I 2 0.00 6000.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 6000.00 1.00000000000000000000 6000.00 1.00000000000000000000 \N \N \N 1088 4 48 jsmith 4 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1089 4 48 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1090 4 48 jsmith 6 1 G 5 0.00 -3000.00 0.00 0.00 0.00 \N \N \N \N \N 3 -3000.00 \N -3000.00 \N \N \N \N 1091 4 48 jsmith 7 2 I 4 \N 3000.00 \N \N 0.00 \N 0.50000000000000000000 \N \N 0.00000000000000000000 5 3000.00 0.50000000000000000000 3000.00 0.50000000000000000000 \N \N \N 1092 4 48 jsmith 10 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1093 4 48 jsmith 11 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1094 4 48 jsmith 12 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1095 4 48 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1096 4 48 jsmith 14 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1097 4 48 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1098 4 48 jsmith 16 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1099 4 48 jsmith 17 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1100 4 48 jsmith 18 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1101 4 48 jsmith 20 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1102 4 48 jsmith 9 1 T -1 \N 3000.00 \N \N 0.00 \N 0.50000000000000000000 \N \N 0.00000000000000000000 3 3000.00 0.50000000000000000000 3000.00 0.50000000000000000000 \N \N \N 1103 4 48 jsmith 5 2 T -1 \N 6000.00 \N \N \N \N \N \N \N \N 4 6000.00 1.00000000000000000000 6000.00 1.00000000000000000000 \N \N \N 1104 4 48 jsmith 19 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1105 4 48 jsmith 21 0 T -1 0.00 3000.00 \N \N 0.00 \N \N \N \N \N \N 3000.00 \N 3000.00 \N \N \N \N 1106 4 46 jsmith 1 0 G 3 6000.00 14000.00 0.00 0.00 0.00 \N 0.77777777777777777778 \N \N 0.00000000000000000000 -1 11000.00 0.91666666666666666667 11000.00 0.91666666666666666667 \N \N \N 1107 4 46 jsmith 2 1 G 4 6000.00 18000.00 0.00 0.00 0.00 \N \N \N \N \N 3 12000.00 1.00000000000000000000 12000.00 1.00000000000000000000 \N \N \N 1108 4 46 jsmith 3 2 I 2 6000.00 18000.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 12000.00 1.00000000000000000000 12000.00 1.00000000000000000000 \N \N \N 1109 4 46 jsmith 4 2 I 3 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1110 4 46 jsmith 6 1 G 5 0.00 -4000.00 0.00 0.00 0.00 \N \N \N \N \N 3 -1000.00 \N -1000.00 \N \N \N \N 1111 4 46 jsmith 7 2 I 4 \N 4000.00 \N \N 0.00 \N 0.22222222222222222222 \N \N 0.00000000000000000000 5 1000.00 0.08333333333333333333 1000.00 0.08333333333333333333 \N \N \N 1112 4 46 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1113 4 46 jsmith 10 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1114 4 46 jsmith 11 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1115 4 46 jsmith 12 2 I 5 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1116 4 46 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1117 4 46 jsmith 14 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1118 4 46 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1119 4 46 jsmith 16 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1120 4 46 jsmith 17 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1121 4 46 jsmith 18 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1122 4 46 jsmith 20 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1123 13 55 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 0.00 \N 0.00 \N \N \N \N 1124 4 46 jsmith 9 1 T -1 \N 14000.00 \N \N 0.00 \N 0.77777777777777777778 \N \N 0.00000000000000000000 3 11000.00 0.91666666666666666667 11000.00 0.91666666666666666667 \N \N \N 1125 4 46 jsmith 5 2 T -1 \N 18000.00 \N \N \N \N \N \N \N \N 4 12000.00 1.00000000000000000000 12000.00 1.00000000000000000000 \N \N \N 1126 4 46 jsmith 19 2 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1127 4 46 jsmith 21 0 T -1 6000.00 14000.00 \N \N 0.00 \N \N \N \N \N \N 11000.00 \N 11000.00 \N \N \N \N 1128 4 29 jsmith 1 0 G 3 18000.00 15500.00 0.00 0.00 0.00 \N 0.75609756097560975610 \N \N 0.00000000000000000000 -1 1500.00 0.60000000000000000000 1500.00 0.60000000000000000000 \N \N \N 1129 4 29 jsmith 2 1 G 4 18000.00 20500.00 0.00 0.00 0.00 \N \N \N \N \N 3 2500.00 1.00000000000000000000 2500.00 1.00000000000000000000 \N \N \N 1130 4 29 jsmith 3 2 I 2 18000.00 20500.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 2500.00 1.00000000000000000000 2500.00 1.00000000000000000000 \N \N \N 1131 4 29 jsmith 4 2 I 3 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1132 4 29 jsmith 6 1 G 5 0.00 -5000.00 0.00 0.00 0.00 \N \N \N \N \N 3 -1000.00 \N -1000.00 \N \N \N \N 1133 4 29 jsmith 7 2 I 4 \N 5000.00 \N \N 0.00 \N 0.24390243902439024390 \N \N 0.00000000000000000000 5 1000.00 0.40000000000000000000 1000.00 0.40000000000000000000 \N \N \N 1134 4 29 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1135 4 29 jsmith 10 0 G 7 0.00 500.00 0.00 0.00 0.00 \N \N \N \N \N -1 500.00 \N 500.00 \N \N \N \N 1136 4 29 jsmith 11 1 G 8 0.00 500.00 0.00 0.00 0.00 \N 0.02439024390243902439 \N \N 0.00000000000000000000 7 500.00 0.20000000000000000000 500.00 0.20000000000000000000 \N \N \N 1137 4 29 jsmith 12 2 I 5 \N 500.00 \N \N 0.00 \N 0.02439024390243902439 \N \N 0.00000000000000000000 8 500.00 0.20000000000000000000 500.00 0.20000000000000000000 \N \N \N 1138 4 29 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1139 4 29 jsmith 14 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1140 4 29 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1141 4 29 jsmith 16 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1142 4 29 jsmith 17 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1143 4 29 jsmith 18 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1144 4 29 jsmith 20 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1145 4 29 jsmith 9 1 T -1 \N 15500.00 \N \N 0.00 \N 0.75609756097560975610 \N \N 0.00000000000000000000 3 1500.00 0.60000000000000000000 1500.00 0.60000000000000000000 \N \N \N 1146 4 29 jsmith 5 2 T -1 \N 20500.00 \N \N \N \N \N \N \N \N 4 2500.00 1.00000000000000000000 2500.00 1.00000000000000000000 \N \N \N 1147 4 29 jsmith 19 2 T -1 \N 500.00 \N \N 0.00 \N 0.02439024390243902439 \N \N 0.00000000000000000000 8 500.00 0.20000000000000000000 500.00 0.20000000000000000000 \N \N \N 1148 4 29 jsmith 21 0 T -1 18000.00 15000.00 \N \N 0.00 \N \N \N \N \N \N 1000.00 \N 1000.00 \N \N \N \N 1149 13 47 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 8000.00 \N 8000.00 \N \N \N \N 1150 13 47 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 -2000.00 \N -2000.00 \N \N \N \N 1151 13 47 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 5000.00 \N 5000.00 \N \N \N \N 1152 13 47 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 5000.00 \N 5000.00 \N \N \N \N 1153 13 47 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1154 13 47 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1155 13 47 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1156 13 47 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1157 13 47 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1158 13 47 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1159 13 47 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 7000.00 \N 7000.00 \N \N \N \N 1160 13 47 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 7000.00 \N 7000.00 \N \N \N \N 1161 13 47 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1162 13 47 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1163 13 47 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1164 13 47 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1165 13 47 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1166 13 47 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1167 13 47 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1168 13 47 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1169 13 47 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1170 13 47 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1171 13 47 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1172 13 47 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1173 13 47 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1174 13 47 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1175 13 47 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1176 13 47 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1177 13 47 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1178 13 47 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1179 13 47 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1180 13 47 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1181 13 47 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1182 13 47 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1183 13 47 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1184 13 47 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1185 13 47 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1186 13 47 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1187 13 47 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 10000.00 \N 10000.00 \N \N \N \N 1188 13 47 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1189 13 47 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1190 13 47 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 10000.00 \N 10000.00 \N \N \N \N 1191 13 47 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 10000.00 \N 10000.00 \N \N \N \N 1192 13 47 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1193 13 47 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1194 13 47 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1195 13 47 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -8000.00 \N -8000.00 \N \N \N \N 1196 13 47 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 8000.00 \N 8000.00 \N \N \N \N 1197 13 47 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 8000.00 \N 8000.00 \N \N \N \N 1198 13 47 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 -2000.00 \N -2000.00 \N \N \N \N 1199 13 47 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 5000.00 \N 5000.00 \N \N \N \N 1200 13 47 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1201 13 47 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1202 13 47 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1203 13 47 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 7000.00 \N 7000.00 \N \N \N \N 1204 13 47 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1205 13 47 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1206 13 47 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1207 13 47 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1208 13 47 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1209 13 47 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1210 13 47 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1212 13 47 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1213 13 47 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 10000.00 \N 10000.00 \N \N \N \N 1214 13 47 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1215 13 47 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 10000.00 \N 10000.00 \N \N \N \N 1216 13 47 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1217 13 48 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 6000.00 \N 6000.00 \N \N \N \N 1218 13 48 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 6000.00 \N 6000.00 \N \N \N \N 1219 13 48 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 3000.00 \N 3000.00 \N \N \N \N 1220 13 48 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 3000.00 \N 3000.00 \N \N \N \N 1221 13 48 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1222 13 48 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1223 13 48 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1224 13 48 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1225 13 48 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1226 13 48 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1227 13 48 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1228 13 48 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -3000.00 \N -3000.00 \N \N \N \N 1229 13 48 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -3000.00 \N -3000.00 \N \N \N \N 1230 13 48 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1231 13 48 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1232 13 48 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1233 13 48 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1234 13 48 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1235 13 48 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1236 13 48 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1237 13 48 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1238 13 48 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1239 13 48 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1240 13 48 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1241 13 48 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1242 13 48 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1243 13 48 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1244 13 48 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1245 13 48 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1246 13 48 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1247 13 48 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1248 13 48 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1249 13 48 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1250 13 48 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1251 13 48 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1252 13 48 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1253 13 48 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1254 13 48 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1255 13 48 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1256 13 48 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1257 13 48 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1258 13 48 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1259 13 48 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1260 13 48 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1261 13 48 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1262 13 48 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1263 13 48 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -6000.00 \N -6000.00 \N \N \N \N 1264 13 48 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 6000.00 \N 6000.00 \N \N \N \N 1265 13 48 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 6000.00 \N 6000.00 \N \N \N \N 1266 13 48 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 6000.00 \N 6000.00 \N \N \N \N 1267 13 48 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 3000.00 \N 3000.00 \N \N \N \N 1268 13 48 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1269 13 48 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1270 13 48 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1271 13 48 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -3000.00 \N -3000.00 \N \N \N \N 1272 13 48 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1273 13 48 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1274 13 48 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1275 13 48 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1276 13 48 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1277 13 48 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1278 13 48 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1279 13 48 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1280 13 48 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1281 13 48 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1282 13 48 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1283 13 48 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1284 13 48 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1285 13 46 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 22000.00 \N 22000.00 \N \N \N \N 1286 13 46 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 12000.00 \N 12000.00 \N \N \N \N 1287 13 46 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 11000.00 \N 11000.00 \N \N \N \N 1288 13 46 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 11000.00 \N 11000.00 \N \N \N \N 1289 13 46 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1290 13 46 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1291 13 46 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1292 13 46 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1293 13 46 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1294 13 46 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1295 13 46 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -1000.00 \N -1000.00 \N \N \N \N 1296 13 46 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -1000.00 \N -1000.00 \N \N \N \N 1297 13 46 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1298 13 46 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1299 13 46 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1300 13 46 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1301 13 46 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1302 13 46 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1303 13 46 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1304 13 46 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1305 13 46 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1306 13 46 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1307 13 46 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1308 13 46 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1309 13 46 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1310 13 46 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1311 13 46 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1312 13 46 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1313 13 46 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1314 13 46 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1315 13 46 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1316 13 46 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1317 13 46 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1318 13 46 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1319 13 46 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1320 13 46 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1321 13 46 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1322 13 46 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1323 13 46 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 10000.00 \N 10000.00 \N \N \N \N 1324 13 46 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1325 13 46 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1326 13 46 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 10000.00 \N 10000.00 \N \N \N \N 1327 13 46 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 10000.00 \N 10000.00 \N \N \N \N 1328 13 46 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1329 13 46 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1330 13 46 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1331 13 46 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -22000.00 \N -22000.00 \N \N \N \N 1332 13 46 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 22000.00 \N 22000.00 \N \N \N \N 1333 13 46 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 22000.00 \N 22000.00 \N \N \N \N 1334 13 46 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 12000.00 \N 12000.00 \N \N \N \N 1335 13 46 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 11000.00 \N 11000.00 \N \N \N \N 1336 13 46 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1337 13 46 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1338 13 46 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1339 13 46 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -1000.00 \N -1000.00 \N \N \N \N 1340 13 46 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1341 13 46 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1342 13 46 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1343 13 46 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1344 13 46 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1345 13 46 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1346 13 46 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1347 13 46 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1348 13 46 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1349 13 46 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 10000.00 \N 10000.00 \N \N \N \N 1350 13 46 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1351 13 46 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 10000.00 \N 10000.00 \N \N \N \N 1352 13 46 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1353 13 29 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 2000.00 \N 2000.00 \N \N \N \N 1354 13 29 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 2000.00 \N 2000.00 \N \N \N \N 1355 13 29 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 1000.00 \N 1000.00 \N \N \N \N 1356 13 29 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 1000.00 \N 1000.00 \N \N \N \N 1357 13 29 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1358 13 29 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1359 13 29 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1360 13 29 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1361 13 29 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1362 13 29 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1363 13 29 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -1000.00 \N -1000.00 \N \N \N \N 1364 13 29 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -1000.00 \N -1000.00 \N \N \N \N 1365 13 29 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1366 13 29 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1367 13 29 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1368 13 29 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1369 13 29 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1370 13 29 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1371 13 29 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1372 13 29 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1373 13 29 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1374 13 29 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1375 13 29 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1376 13 29 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1377 13 29 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1378 13 29 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1379 13 29 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1380 13 29 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1381 13 29 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1382 13 29 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1383 13 29 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1384 13 29 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1385 13 29 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1386 13 29 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1387 13 29 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1388 13 29 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1389 13 29 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1390 13 29 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1391 13 29 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1392 11 30 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 1393 13 29 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1394 13 29 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1395 13 29 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1396 13 29 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1397 13 29 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1398 13 29 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1399 13 29 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1400 13 29 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -2000.00 \N -2000.00 \N \N \N \N 1401 13 29 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 2000.00 \N 2000.00 \N \N \N \N 1402 13 29 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 2000.00 \N 2000.00 \N \N \N \N 1403 13 29 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 2000.00 \N 2000.00 \N \N \N \N 1404 13 29 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 1000.00 \N 1000.00 \N \N \N \N 1405 13 29 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1406 13 29 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1407 13 29 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1408 13 29 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -1000.00 \N -1000.00 \N \N \N \N 1409 13 29 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1410 13 29 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1411 13 29 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1412 13 29 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1413 13 29 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1414 13 29 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1415 13 29 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1416 13 29 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1417 13 29 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1418 13 29 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1419 13 29 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1420 13 29 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1421 13 29 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1422 4 28 jsmith 1 0 G 3 0.00 19203.19 0.00 0.00 0.00 \N 0.75198695206096347987 \N \N 0.00000000000000000000 -1 3703.19 0.73525592661716237144 3703.19 0.73525592661716237144 \N \N \N 1423 4 28 jsmith 2 1 G 4 0.00 25536.60 0.00 0.00 0.00 \N \N \N \N \N 3 5036.60 1.00000000000000000000 5036.60 1.00000000000000000000 \N \N \N 1424 4 28 jsmith 3 2 I 2 \N 25255.20 \N \N 0.00 \N 0.98898052207419938441 \N \N 0.00000000000000000000 4 4755.20 0.94412897589643807330 4755.20 0.94412897589643807330 \N \N \N 1425 4 28 jsmith 4 2 I 3 \N 281.40 \N \N 0.00 \N 0.01101947792580061559 \N \N 0.00000000000000000000 4 281.40 0.05587102410356192670 281.40 0.05587102410356192670 \N \N \N 1426 4 28 jsmith 6 1 G 5 0.00 -6333.41 0.00 0.00 0.00 \N \N \N \N \N 3 -1333.41 \N -1333.41 \N \N \N \N 1427 4 28 jsmith 7 2 I 4 \N 6333.41 \N \N 0.00 \N 0.24801304793903652013 \N \N 0.00000000000000000000 5 1333.41 0.26474407338283762856 1333.41 0.26474407338283762856 \N \N \N 1428 4 28 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1429 4 28 jsmith 10 0 G 7 0.00 746.06 0.00 0.00 0.00 \N \N \N \N \N -1 246.06 \N 246.06 \N \N \N \N 1430 4 28 jsmith 11 1 G 8 0.00 746.06 0.00 0.00 0.00 \N 0.02921532232168730371 \N \N 0.00000000000000000000 7 246.06 0.04885438589524679347 246.06 0.04885438589524679347 \N \N \N 1431 4 28 jsmith 12 2 I 5 \N 700.00 \N \N 0.00 \N 0.02741163663134481489 \N \N 0.00000000000000000000 8 200.00 0.03970932772108168209 200.00 0.03970932772108168209 \N \N \N 1432 4 28 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1433 4 28 jsmith 14 2 I 7 \N 29.99 \N \N 0.00 \N 0.00117439283224861571 \N \N 0.00000000000000000000 8 29.99 0.00595441369177619823 29.99 0.00595441369177619823 \N \N \N 1434 4 28 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1435 4 28 jsmith 16 2 I 9 \N 5.00 \N \N 0.00 \N 0.00019579740450960582 \N \N 0.00000000000000000000 8 5.00 0.00099273319302704205 5.00 0.00099273319302704205 \N \N \N 1436 4 28 jsmith 17 2 I 10 \N 1.07 \N \N 0.00 \N 0.000041900644565055645622 \N \N 0.00000000000000000000 8 1.07 0.00021244490330778700 1.07 0.00021244490330778700 \N \N \N 1437 4 28 jsmith 18 2 I 11 \N 10.00 \N \N 0.00 \N 0.00039159480901921164 \N \N 0.00000000000000000000 8 10.00 0.00198546638605408410 10.00 0.00198546638605408410 \N \N \N 1438 4 28 jsmith 20 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1439 4 28 jsmith 5 2 T -1 \N 25536.60 \N \N \N \N \N \N \N \N 4 5036.60 1.00000000000000000000 5036.60 1.00000000000000000000 \N \N \N 1440 4 28 jsmith 9 1 T -1 \N 19203.19 \N \N 0.00 \N 0.75198695206096347987 \N \N 0.00000000000000000000 3 3703.19 0.73525592661716237144 3703.19 0.73525592661716237144 \N \N \N 1441 4 28 jsmith 19 2 T -1 \N 746.06 \N \N 0.00 \N 0.02921532232168730371 \N \N 0.00000000000000000000 8 246.06 0.04885438589524679347 246.06 0.04885438589524679347 \N \N \N 1442 4 28 jsmith 21 0 T -1 0.00 18457.13 \N \N 0.00 \N \N \N \N \N \N 3457.13 \N 3457.13 \N \N \N \N 1443 11 28 jsmith 1 0 G 44 0.00 1044286.24 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1044286.24 \N \N \N \N 1444 11 28 jsmith 2 1 G 45 0.00 1044286.24 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1044286.24 \N \N \N \N 1445 11 28 jsmith 3 2 I 65 \N 1029222.11 \N \N \N \N \N \N \N \N 45 \N \N 1029222.11 \N \N \N \N 1446 11 28 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1447 11 28 jsmith 5 2 I 67 \N 21195.81 \N \N \N \N \N \N \N \N 45 \N \N 21195.81 \N \N \N \N 1448 11 28 jsmith 6 2 I 68 \N -1.06 \N \N \N \N \N \N \N \N 45 \N \N -1.06 \N \N \N \N 1449 11 28 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1450 11 28 jsmith 8 2 I 70 \N -76.85 \N \N \N \N \N \N \N \N 45 \N \N -76.85 \N \N \N \N 1451 11 28 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1452 11 28 jsmith 10 2 I 72 \N -6053.79 \N \N \N \N \N \N \N \N 45 \N \N -6053.79 \N \N \N \N 1453 11 28 jsmith 11 2 I 73 \N 0.02 \N \N \N \N \N \N \N \N 45 \N \N 0.02 \N \N \N \N 1454 11 28 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1455 11 28 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 1456 11 28 jsmith 15 1 G 46 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 1457 11 28 jsmith 16 2 I 76 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 1458 11 28 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 1459 11 28 jsmith 21 0 G 36 0.00 1044286.24 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1044286.24 \N \N \N \N 1460 11 28 jsmith 22 1 G 37 0.00 829.11 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 829.11 \N \N \N \N 1461 11 28 jsmith 23 2 G 38 0.00 829.11 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 829.11 \N \N \N \N 1462 11 28 jsmith 24 3 I 47 \N 250.00 \N \N \N \N \N \N \N \N 38 \N \N 250.00 \N \N \N \N 1463 11 28 jsmith 25 3 I 46 \N 151.99 \N \N \N \N \N \N \N \N 38 \N \N 151.99 \N \N \N \N 1464 11 28 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1465 11 28 jsmith 27 3 I 49 \N 216.74 \N \N \N \N \N \N \N \N 38 \N \N 216.74 \N \N \N \N 1466 11 28 jsmith 28 3 I 50 \N 238.77 \N \N \N \N \N \N \N \N 38 \N \N 238.77 \N \N \N \N 1467 11 28 jsmith 29 3 I 51 \N -28.39 \N \N \N \N \N \N \N \N 38 \N \N -28.39 \N \N \N \N 1468 11 28 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 1469 11 28 jsmith 32 2 G 39 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 1470 11 28 jsmith 33 3 I 140 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 1471 11 28 jsmith 36 1 G 40 0.00 1043457.13 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 1043457.13 \N \N \N \N 1472 11 28 jsmith 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 1473 11 28 jsmith 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 1474 11 28 jsmith 40 2 G 42 \N 18457.13 \N \N \N \N \N \N \N \N 40 \N \N 18457.13 \N \N \N \N 1475 11 28 jsmith 41 2 G 43 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 5000.00 \N \N \N \N 1476 11 28 jsmith 42 3 I 63 \N 5000.00 \N \N \N \N \N \N \N \N 43 \N \N 5000.00 \N \N \N \N 1477 11 28 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 1478 11 28 jsmith 14 2 T -1 \N 1044286.24 \N \N \N \N \N \N \N \N 45 \N \N 1044286.24 \N \N \N \N 1479 11 28 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 1480 11 28 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 1481 11 28 jsmith 20 1 T -1 \N 1044286.24 \N \N \N \N \N \N \N \N 44 \N \N 1044286.24 \N \N \N \N 1482 11 28 jsmith 31 3 T -1 \N 829.11 \N \N \N \N \N \N \N \N 38 \N \N 829.11 \N \N \N \N 1483 11 28 jsmith 34 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 1484 11 28 jsmith 35 2 T -1 \N 829.11 \N \N \N \N \N \N \N \N 37 \N \N 829.11 \N \N \N \N 1485 11 28 jsmith 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 1486 11 28 jsmith 44 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 43 \N \N 5000.00 \N \N \N \N 1487 11 28 jsmith 45 2 T -1 \N 1043457.13 \N \N \N \N \N \N \N \N 40 \N \N 1043457.13 \N \N \N \N 1488 11 28 jsmith 46 1 T -1 \N 1044286.24 \N \N \N \N \N \N \N \N 36 \N \N 1044286.24 \N \N \N \N 1489 11 28 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 1490 13 28 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1491 13 28 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 991222.11 \N 991222.11 \N \N \N \N 1492 13 28 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 -8777.89 \N -8777.89 \N \N \N \N 1493 13 28 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 3457.13 \N 3457.13 \N \N \N \N 1494 13 28 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 3457.13 \N 3457.13 \N \N \N \N 1495 13 28 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1496 13 28 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1497 13 28 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1498 13 28 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1499 13 28 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1500 13 28 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 13064.13 \N 13064.13 \N \N \N \N 1501 13 28 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 19195.81 \N 19195.81 \N \N \N \N 1502 13 28 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 -76.85 \N -76.85 \N \N \N \N 1503 13 28 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1504 13 28 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 -6053.79 \N -6053.79 \N \N \N \N 1505 13 28 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.02 \N 0.02 \N \N \N \N 1506 13 28 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 -1.06 \N -1.06 \N \N \N \N 1507 13 28 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1508 13 28 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1509 13 28 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1510 13 28 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 590.34 \N 590.34 \N \N \N \N 1511 13 28 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 250.00 \N 250.00 \N \N \N \N 1512 13 28 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 151.99 \N 151.99 \N \N \N \N 1513 13 28 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1514 13 28 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1515 13 28 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 216.74 \N 216.74 \N \N \N \N 1516 13 28 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1517 13 28 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 -28.39 \N -28.39 \N \N \N \N 1518 13 28 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1519 13 28 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1520 13 28 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 238.77 \N 238.77 \N \N \N \N 1521 13 28 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 238.77 \N 238.77 \N \N \N \N 1522 13 28 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1523 13 28 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1524 13 28 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1525 13 28 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1526 13 28 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1527 13 28 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1528 13 28 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1529 13 28 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 1000000.00 \N 1000000.00 \N \N \N \N 1530 13 28 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1531 13 28 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1532 13 28 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 1000000.00 \N 1000000.00 \N \N \N \N 1533 13 28 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 1000000.00 \N 1000000.00 \N \N \N \N 1534 13 28 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1535 13 28 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1536 13 28 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1537 13 28 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -991222.11 \N -991222.11 \N \N \N \N 1538 13 28 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 991222.11 \N 991222.11 \N \N \N \N 1539 13 28 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 3457.13 \N 3457.13 \N \N \N \N 1540 13 28 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1541 13 28 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1542 13 28 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1543 13 28 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 13064.13 \N 13064.13 \N \N \N \N 1544 13 28 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1545 13 28 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 590.34 \N 590.34 \N \N \N \N 1546 13 28 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1547 13 28 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1548 13 28 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 238.77 \N 238.77 \N \N \N \N 1549 13 28 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1550 13 28 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 -8777.89 \N -8777.89 \N \N \N \N 1551 13 28 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1552 13 28 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1553 13 28 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1554 13 28 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1555 13 28 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 1000000.00 \N 1000000.00 \N \N \N \N 1556 13 28 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 1000000.00 \N 1000000.00 \N \N \N \N 1557 13 28 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 991222.11 \N 991222.11 \N \N \N \N 1558 4 42 jsmith 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1559 4 42 jsmith 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1560 4 42 jsmith 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1561 4 42 jsmith 4 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1562 4 42 jsmith 6 1 G 5 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1563 4 42 jsmith 7 2 I 4 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1564 4 42 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1565 4 42 jsmith 10 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1566 4 42 jsmith 11 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1567 4 42 jsmith 12 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1568 4 42 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1569 4 42 jsmith 14 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1570 4 42 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1571 4 42 jsmith 16 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1572 4 42 jsmith 17 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1573 4 42 jsmith 18 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1574 4 42 jsmith 20 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1575 4 42 jsmith 9 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1576 4 42 jsmith 5 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1577 4 42 jsmith 19 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1578 4 42 jsmith 21 0 T -1 0.00 0.00 \N \N 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1579 4 43 jsmith 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1580 4 43 jsmith 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1581 4 43 jsmith 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1582 4 43 jsmith 4 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1583 4 43 jsmith 6 1 G 5 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1584 4 43 jsmith 7 2 I 4 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1585 4 43 jsmith 8 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1586 4 43 jsmith 10 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1587 4 43 jsmith 11 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1588 4 43 jsmith 12 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1589 4 43 jsmith 13 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1590 4 43 jsmith 14 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1591 4 43 jsmith 15 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1592 4 43 jsmith 16 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1593 4 43 jsmith 17 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1594 4 43 jsmith 18 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1595 4 43 jsmith 20 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1596 4 43 jsmith 9 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1597 4 43 jsmith 5 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1598 4 43 jsmith 19 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1599 4 43 jsmith 21 0 T -1 0.00 0.00 \N \N 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1600 13 35 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1601 13 35 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1602 13 35 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1603 13 35 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1604 13 35 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1605 13 35 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1606 13 35 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1607 13 35 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1608 13 35 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1609 13 35 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1610 13 35 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1611 13 35 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1612 13 35 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1613 13 35 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1614 13 35 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1615 13 35 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1616 13 35 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1617 13 33 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1766 13 35 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1618 13 35 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1619 13 35 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1620 13 35 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1621 13 35 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1622 13 35 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1623 13 35 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1624 13 35 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1625 13 35 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -97000.00 \N -97000.00 \N \N \N \N 1626 4 32 jsmith 7 2 I 3 \N 2.90 \N \N 0.00 \N 0.000047387603141569320547 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1627 4 32 jsmith 9 1 G 5 0.00 -18872.99 0.00 0.00 0.00 \N \N \N \N \N 3 -15000.00 \N -15000.00 \N \N \N \N 1628 4 32 jsmith 10 2 I 4 \N 18872.99 \N \N 0.00 \N 0.30839508972924357620 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 1629 4 32 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1630 4 32 jsmith 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1631 4 32 jsmith 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.01658566109954926219 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1632 4 32 jsmith 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.01650395833551207371 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1633 4 32 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1634 4 32 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1635 4 32 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1636 4 32 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1637 13 35 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 97000.00 \N 97000.00 \N \N \N \N 1638 13 35 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 97000.00 \N 97000.00 \N \N \N \N 1639 13 35 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 97000.00 \N 97000.00 \N \N \N \N 1640 13 35 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 185000.00 \N 185000.00 \N \N \N \N 1641 13 35 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1642 13 35 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1643 13 35 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1644 13 35 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 88000.00 \N 88000.00 \N \N \N \N 1645 13 35 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1646 13 35 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1647 13 35 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1648 13 35 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1649 13 35 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1650 13 35 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1651 13 35 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1652 13 35 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1653 13 35 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1654 13 35 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1655 13 35 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1656 13 35 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1657 13 35 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1658 4 32 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1659 4 32 jsmith 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1660 4 32 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1661 4 32 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000081702764037188483701 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1662 4 32 jsmith 24 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 1663 4 32 jsmith 25 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 1664 4 32 jsmith 27 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1665 4 32 jsmith 12 1 T -1 \N 42324.45 \N \N 0.00 \N 0.69160491027075642380 \N \N 0.00000000000000000000 3 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 \N \N \N 1666 4 32 jsmith 8 2 T -1 \N 61197.44 \N \N \N \N \N \N \N \N 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 1667 4 32 jsmith 26 2 T -1 \N 1015.00 \N \N 0.00 \N 0.01658566109954926219 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 1668 4 32 jsmith 28 0 T -1 0.00 41309.45 \N \N 0.00 \N \N \N \N \N \N 35000.00 \N 35000.00 \N \N \N \N 1669 4 31 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1670 4 31 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1671 4 31 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1672 4 31 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1673 4 31 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1674 4 31 jsmith 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1675 4 31 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1676 4 31 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.00044653063557384545 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1677 4 31 jsmith 24 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 1678 4 31 jsmith 25 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 1679 4 31 jsmith 27 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1680 4 31 jsmith 12 1 T -1 \N 7324.45 \N \N 0.00 \N 0.65411826274577046182 \N \N 0.00000000000000000000 3 1703.82 0.57756610169491525424 1703.82 0.57756610169491525424 \N \N \N 1681 4 31 jsmith 8 2 T -1 \N 11197.44 \N \N \N \N \N \N \N \N 4 2950.00 1.00000000000000000000 2950.00 1.00000000000000000000 \N \N \N 1682 4 31 jsmith 26 2 T -1 \N 1015.00 \N \N 0.00 \N 0.09064571902149062643 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1683 4 31 jsmith 28 0 T -1 0.00 6309.45 \N \N 0.00 \N \N \N \N \N \N 1703.82 \N 1703.82 \N \N \N \N 1684 4 31 jsmith 1 0 G 3 0.00 7324.45 0.00 0.00 0.00 \N 0.65411826274577046182 \N \N 0.00000000000000000000 -1 1703.82 0.57756610169491525424 1703.82 0.57756610169491525424 \N \N \N 1685 4 31 jsmith 2 1 G 4 0.00 11197.44 0.00 0.00 0.00 \N \N \N \N \N 3 2950.00 1.00000000000000000000 2950.00 1.00000000000000000000 \N \N \N 1686 4 31 jsmith 3 2 I 2 \N 11194.54 \N \N 0.00 \N 0.99974101223136716964 \N \N 0.00000000000000000000 4 2950.00 1.00000000000000000000 2950.00 1.00000000000000000000 \N \N \N 1687 4 31 jsmith 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 1688 4 31 jsmith 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 1689 4 31 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1690 4 31 jsmith 7 2 I 3 \N 2.90 \N \N 0.00 \N 0.00025898776863283036 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1691 4 31 jsmith 9 1 G 5 0.00 -3872.99 0.00 0.00 0.00 \N \N \N \N \N 3 -1246.18 \N -1246.18 \N \N \N \N 1692 4 31 jsmith 10 2 I 4 \N 3872.99 \N \N 0.00 \N 0.34588173725422953818 \N \N 0.00000000000000000000 5 1246.18 0.42243389830508474576 1246.18 0.42243389830508474576 \N \N \N 1693 4 31 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1694 4 31 jsmith 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1695 4 31 jsmith 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.09064571902149062643 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1696 4 31 jsmith 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.09019918838591678098 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1697 4 30 jsmith 1 0 G 3 0.00 5620.63 0.00 0.00 0.00 \N 0.68149995635009166481 \N \N 0.00000000000000000000 -1 5620.63 0.68149995635009166481 5620.63 0.68149995635009166481 \N \N \N 1698 4 30 jsmith 2 1 G 4 0.00 8247.44 0.00 0.00 0.00 \N \N \N \N \N 3 8247.44 1.00000000000000000000 8247.44 1.00000000000000000000 \N \N \N 1699 4 30 jsmith 3 2 I 2 \N 8244.54 \N \N 0.00 \N 0.99964837573841094934 \N \N 0.00000000000000000000 4 8244.54 0.99964837573841094934 8244.54 0.99964837573841094934 \N \N \N 1700 4 30 jsmith 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 1701 4 30 jsmith 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 1702 13 55 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1703 4 30 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1704 4 30 jsmith 7 2 I 3 \N 2.90 \N \N 0.00 \N 0.00035162426158905066 \N \N 0.00000000000000000000 4 2.90 0.00035162426158905066 2.90 0.00035162426158905066 \N \N \N 1705 4 30 jsmith 9 1 G 5 0.00 -2626.81 0.00 0.00 0.00 \N \N \N \N \N 3 -2626.81 \N -2626.81 \N \N \N \N 1706 4 30 jsmith 10 2 I 4 \N 2626.81 \N \N 0.00 \N 0.31850004364990833519 \N \N 0.00000000000000000000 5 2626.81 0.31850004364990833519 2626.81 0.31850004364990833519 \N \N \N 1707 4 30 jsmith 11 1 G 6 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 3 0.00 \N 0.00 \N \N \N \N 1708 4 30 jsmith 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 1015.00 \N 1015.00 \N \N \N \N 1709 4 30 jsmith 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.12306849155616773205 \N \N 0.00000000000000000000 7 1015.00 0.12306849155616773205 1015.00 0.12306849155616773205 \N \N \N 1710 4 30 jsmith 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.12246224282929005849 \N \N 0.00000000000000000000 8 1010.00 0.12246224282929005849 1010.00 0.12246224282929005849 \N \N \N 1711 4 30 jsmith 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1712 4 30 jsmith 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1713 4 30 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1714 4 30 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1715 4 30 jsmith 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1716 4 30 jsmith 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1717 4 30 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 1718 4 30 jsmith 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.00060624872687767356 \N \N 0.00000000000000000000 8 5.00 0.00060624872687767356 5.00 0.00060624872687767356 \N \N \N 1719 4 30 jsmith 24 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 1720 4 30 jsmith 25 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 1721 4 30 jsmith 27 0 G 9 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 1722 4 30 jsmith 12 1 T -1 \N 5620.63 \N \N 0.00 \N 0.68149995635009166481 \N \N 0.00000000000000000000 3 5620.63 0.68149995635009166481 5620.63 0.68149995635009166481 \N \N \N 1723 4 30 jsmith 8 2 T -1 \N 8247.44 \N \N \N \N \N \N \N \N 4 8247.44 1.00000000000000000000 8247.44 1.00000000000000000000 \N \N \N 1724 4 30 jsmith 26 2 T -1 \N 1015.00 \N \N 0.00 \N 0.12306849155616773205 \N \N 0.00000000000000000000 8 1015.00 0.12306849155616773205 1015.00 0.12306849155616773205 \N \N \N 1725 4 30 jsmith 28 0 T -1 0.00 4605.63 \N \N 0.00 \N \N \N \N \N \N 4605.63 \N 4605.63 \N \N \N \N 1726 13 55 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1727 13 34 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1728 13 34 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 25000.00 \N 25000.00 \N \N \N \N 1729 13 34 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 25000.00 \N 25000.00 \N \N \N \N 1730 13 34 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 60000.00 \N 60000.00 \N \N \N \N 1731 13 34 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 60000.00 \N 60000.00 \N \N \N \N 1732 13 34 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1733 13 34 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1734 13 34 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1735 13 34 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1736 13 34 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1737 13 33 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1738 13 33 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1739 13 33 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1740 13 33 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1741 13 33 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1742 13 33 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1743 13 33 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1744 13 33 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1745 13 33 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1746 13 33 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1747 13 33 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1748 13 33 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1749 13 33 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1750 13 33 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -55000.00 \N -55000.00 \N \N \N \N 1751 13 33 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 55000.00 \N 55000.00 \N \N \N \N 1752 13 33 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 55000.00 \N 55000.00 \N \N \N \N 1753 13 33 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 55000.00 \N 55000.00 \N \N \N \N 1754 13 33 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 40000.00 \N 40000.00 \N \N \N \N 1755 13 33 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1756 13 33 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1757 13 33 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1758 13 33 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 1759 13 33 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1760 13 33 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1761 13 33 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1762 13 33 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1763 13 33 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1764 13 33 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1765 13 33 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1767 13 33 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1768 13 33 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1769 13 33 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1770 13 33 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1771 13 33 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1772 13 33 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 1773 13 33 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1774 13 33 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1775 13 33 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1776 13 33 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1777 13 33 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1778 13 33 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1779 13 33 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1780 13 33 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1781 13 33 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1782 13 33 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1783 13 33 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1784 13 33 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1785 13 33 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1786 13 33 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1787 13 33 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1788 13 33 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1789 13 33 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1790 13 33 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1791 13 33 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1792 13 33 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1793 13 33 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1794 13 33 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 55000.00 \N 55000.00 \N \N \N \N 1795 13 33 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 55000.00 \N 55000.00 \N \N \N \N 1796 13 33 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 40000.00 \N 40000.00 \N \N \N \N 1797 13 33 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 40000.00 \N 40000.00 \N \N \N \N 1798 13 33 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1799 13 33 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1800 13 33 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1801 13 33 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1802 13 33 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1803 13 33 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1804 13 33 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -15000.00 \N -15000.00 \N \N \N \N 1805 13 32 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1806 13 32 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1807 13 32 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1808 13 32 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1809 13 32 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1810 13 32 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1811 13 32 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1812 13 32 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1813 13 32 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1814 13 32 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1815 13 32 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1816 13 32 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1817 13 32 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1818 13 32 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1819 13 32 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1820 13 32 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1821 13 32 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -50000.00 \N -50000.00 \N \N \N \N 1822 13 32 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 50000.00 \N 50000.00 \N \N \N \N 1823 13 32 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 50000.00 \N 50000.00 \N \N \N \N 1824 13 32 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 50000.00 \N 50000.00 \N \N \N \N 1825 13 32 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 35000.00 \N 35000.00 \N \N \N \N 1826 13 32 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1827 13 32 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1828 13 32 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1829 13 32 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 1830 13 32 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1831 13 32 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1832 13 32 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1833 13 32 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1834 13 32 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 1835 13 32 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1836 13 32 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1837 13 32 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1838 13 32 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1839 13 32 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1840 13 32 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1841 13 32 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1842 13 32 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1843 13 32 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 50000.00 \N 50000.00 \N \N \N \N 1844 13 32 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 50000.00 \N 50000.00 \N \N \N \N 1845 13 32 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 35000.00 \N 35000.00 \N \N \N \N 1846 13 32 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 35000.00 \N 35000.00 \N \N \N \N 1847 13 32 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1848 13 32 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1849 13 32 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1850 13 32 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1851 13 32 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1852 13 32 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1853 13 32 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -15000.00 \N -15000.00 \N \N \N \N 1854 13 32 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 1855 13 32 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1856 13 32 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1857 13 32 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1858 13 32 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1859 13 32 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1860 13 32 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1861 13 32 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1862 13 32 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1863 13 32 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1864 13 32 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1865 13 32 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1866 13 32 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1867 13 32 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1868 13 32 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1869 13 32 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1870 13 32 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1871 13 32 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1872 13 32 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1873 13 31 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1874 13 31 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1875 13 31 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1876 13 31 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1877 13 31 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1878 13 31 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1879 13 31 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1880 13 31 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 1881 13 31 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1882 13 31 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1883 13 31 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1884 13 31 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1885 13 31 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1886 13 31 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1887 13 31 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1888 13 31 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -3034.50 \N -3034.50 \N \N \N \N 1889 13 31 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 3034.50 \N 3034.50 \N \N \N \N 1890 13 31 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 3034.50 \N 3034.50 \N \N \N \N 1891 13 31 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 3034.50 \N 3034.50 \N \N \N \N 1892 13 31 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 1703.82 \N 1703.82 \N \N \N \N 1893 13 31 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1894 13 31 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1895 13 31 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1896 13 31 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -1200.20 \N -1200.20 \N \N \N \N 1897 13 31 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1898 13 31 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 82.98 \N 82.98 \N \N \N \N 1899 13 31 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1900 13 31 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1901 13 31 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 47.50 \N 47.50 \N \N \N \N 1902 13 31 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1903 13 31 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1904 13 31 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 1905 13 31 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1906 13 31 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1907 13 31 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 1908 13 31 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1909 13 31 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 1910 13 31 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 3034.50 \N 3034.50 \N \N \N \N 1911 13 31 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 3034.50 \N 3034.50 \N \N \N \N 1912 13 31 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 1703.82 \N 1703.82 \N \N \N \N 1913 13 31 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 1703.82 \N 1703.82 \N \N \N \N 1914 13 31 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1915 13 31 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1916 13 31 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1917 13 31 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1918 13 31 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1919 13 31 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1920 13 31 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -1200.20 \N -1200.20 \N \N \N \N 1921 13 31 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -1200.20 \N -1200.20 \N \N \N \N 1922 13 31 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1923 13 31 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1924 13 31 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1925 13 31 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1926 13 31 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1927 13 31 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1928 13 31 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1929 13 31 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1930 13 31 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 82.98 \N 82.98 \N \N \N \N 1931 13 31 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1932 13 31 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 45.98 \N 45.98 \N \N \N \N 1933 13 31 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1934 13 31 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1935 13 31 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 37.00 \N 37.00 \N \N \N \N 1936 13 31 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1937 13 31 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1938 13 31 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1939 13 31 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 47.50 \N 47.50 \N \N \N \N 1940 13 31 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 47.50 \N 47.50 \N \N \N \N 1941 13 30 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 1000.00 \N 1000.00 \N \N \N \N 1942 13 30 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 1000.00 \N 1000.00 \N \N \N \N 1943 13 30 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 1000.00 \N 1000.00 \N \N \N \N 1944 13 30 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1945 13 30 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 1946 13 30 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 5000.00 \N 5000.00 \N \N \N \N 1947 13 30 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 5000.00 \N 5000.00 \N \N \N \N 1948 13 30 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 5000.00 \N 5000.00 \N \N \N \N 1949 13 30 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1950 13 30 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1951 13 30 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1952 13 30 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1953 13 30 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 1954 13 30 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -11184.79 \N -11184.79 \N \N \N \N 1955 13 30 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 11184.79 \N 11184.79 \N \N \N \N 1956 13 30 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 11184.79 \N 11184.79 \N \N \N \N 1957 13 30 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 7184.79 \N 7184.79 \N \N \N \N 1958 13 30 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 4605.63 \N 4605.63 \N \N \N \N 1959 13 30 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1960 13 30 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 1961 13 30 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1962 13 30 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -2007.06 \N -2007.06 \N \N \N \N 1963 13 30 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1964 13 30 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 259.83 \N 259.83 \N \N \N \N 1965 13 30 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 1966 13 30 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 1967 13 30 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 312.27 \N 312.27 \N \N \N \N 1968 13 30 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 1969 13 30 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 1000.00 \N 1000.00 \N \N \N \N 1970 13 30 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 1000.00 \N 1000.00 \N \N \N \N 1971 13 30 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 1972 13 30 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 5000.00 \N 5000.00 \N \N \N \N 1973 13 30 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 5000.00 \N 5000.00 \N \N \N \N 1974 13 30 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 1975 13 30 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 11184.79 \N 11184.79 \N \N \N \N 1976 13 30 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 7184.79 \N 7184.79 \N \N \N \N 1977 13 30 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 4605.63 \N 4605.63 \N \N \N \N 1978 13 30 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 4605.63 \N 4605.63 \N \N \N \N 1979 13 30 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1980 13 30 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 1981 13 30 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1982 13 30 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1983 13 30 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1984 13 30 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 1985 13 30 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -2007.06 \N -2007.06 \N \N \N \N 1986 13 30 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -8116.74 \N -8116.74 \N \N \N \N 1987 13 30 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 76.85 \N 76.85 \N \N \N \N 1988 13 30 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 1989 13 30 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 6031.79 \N 6031.79 \N \N \N \N 1990 13 30 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 -0.02 \N -0.02 \N \N \N \N 1991 13 30 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 1.06 \N 1.06 \N \N \N \N 1992 13 30 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1993 13 30 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 1994 13 30 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 1995 13 30 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 259.83 \N 259.83 \N \N \N \N 1996 13 30 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 12.95 \N 12.95 \N \N \N \N 1997 13 30 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 -151.99 \N -151.99 \N \N \N \N 1998 13 30 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 1999 13 30 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2000 13 30 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 370.48 \N 370.48 \N \N \N \N 2001 13 30 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 28.39 \N 28.39 \N \N \N \N 2002 13 30 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2003 13 30 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2004 13 30 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 312.27 \N 312.27 \N \N \N \N 2005 13 30 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 312.27 \N 312.27 \N \N \N \N 2006 13 30 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2007 13 30 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2008 13 30 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 2009 13 34 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2010 13 34 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 35000.00 \N 35000.00 \N \N \N \N 2011 13 34 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 35000.00 \N 35000.00 \N \N \N \N 2012 13 34 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2013 13 55 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2014 13 55 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2015 13 55 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2016 13 55 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2017 13 55 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2018 13 55 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2019 13 55 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2020 13 55 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2021 13 55 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2022 13 55 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2023 13 55 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2024 13 55 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2025 13 55 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2026 13 55 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2027 13 55 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2028 13 55 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2029 13 55 jsmith 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2030 13 55 jsmith 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2031 13 55 jsmith 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2032 13 55 jsmith 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 2033 13 55 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2034 13 55 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2035 13 55 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2036 13 55 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2037 13 36 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2038 13 55 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2039 13 55 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2040 13 55 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2041 13 55 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2042 13 55 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2043 13 55 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2044 13 55 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2045 13 55 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2046 13 55 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2047 13 55 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2048 13 55 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2049 13 55 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2050 13 55 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2051 13 55 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2052 13 55 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2053 13 55 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 2054 13 55 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N 0.00 \N \N \N \N 2055 13 34 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2056 13 34 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2057 13 34 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2058 13 34 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2059 13 34 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2060 13 34 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2061 13 34 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2062 13 34 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2063 13 34 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2064 13 34 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2065 13 34 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2066 13 34 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2067 13 34 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2068 13 34 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2069 13 34 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2070 13 34 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2071 13 34 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2072 13 34 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2073 13 34 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2074 13 34 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2075 13 34 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2076 13 34 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2077 13 34 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2078 13 34 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2079 13 34 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2080 11 36 jsmith 1 0 G 44 0.00 1679018.80 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1679018.80 \N \N \N \N 2081 11 36 jsmith 2 1 G 45 0.00 1678018.80 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1678018.80 \N \N \N \N 2082 13 34 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2083 13 34 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2084 13 34 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2085 13 34 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2086 13 34 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2087 13 34 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2088 13 34 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2089 13 34 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2090 13 34 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -25000.00 \N -25000.00 \N \N \N \N 2091 13 34 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 25000.00 \N 25000.00 \N \N \N \N 2092 13 34 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 60000.00 \N 60000.00 \N \N \N \N 2093 13 34 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 2094 13 34 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 2095 13 34 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2096 13 34 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 35000.00 \N 35000.00 \N \N \N \N 2097 13 34 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2098 13 34 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2099 13 34 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 2100 13 34 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 2101 13 34 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2102 13 34 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 2103 13 34 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 25000.00 \N 25000.00 \N \N \N \N 2104 13 34 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2105 13 34 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 2106 13 34 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2107 13 34 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2108 13 34 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2109 13 55 jsmith 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 2110 13 55 jsmith 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 2111 13 34 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2112 13 34 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 25000.00 \N 25000.00 \N \N \N \N 2113 11 36 jsmith 3 2 I 65 \N 1453498.40 \N \N \N \N \N \N \N \N 45 \N \N 1453498.40 \N \N \N \N 2114 11 36 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2115 11 36 jsmith 5 2 I 67 \N 224572.47 \N \N \N \N \N \N \N \N 45 \N \N 224572.47 \N \N \N \N 2116 11 36 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2117 11 36 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2118 11 36 jsmith 8 2 I 70 \N -11.07 \N \N \N \N \N \N \N \N 45 \N \N -11.07 \N \N \N \N 2119 11 36 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2120 11 36 jsmith 10 2 I 72 \N -41.00 \N \N \N \N \N \N \N \N 45 \N \N -41.00 \N \N \N \N 2121 11 36 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2122 11 36 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2123 11 36 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2124 11 36 jsmith 15 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2125 11 36 jsmith 16 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2126 11 36 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2127 11 36 jsmith 21 0 G 36 0.00 1679018.80 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1679018.80 \N \N \N \N 2128 11 36 jsmith 22 1 G 37 0.00 6612.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6612.58 \N \N \N \N 2129 11 36 jsmith 23 2 G 38 0.00 1612.58 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1612.58 \N \N \N \N 2130 11 36 jsmith 24 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 2131 11 36 jsmith 25 3 I 46 \N 126.87 \N \N \N \N \N \N \N \N 38 \N \N 126.87 \N \N \N \N 2132 11 36 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2133 11 36 jsmith 27 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 2134 11 36 jsmith 28 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 2135 11 36 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2136 11 36 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2137 11 36 jsmith 32 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2138 11 36 jsmith 33 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2139 11 36 jsmith 36 1 G 40 0.00 1672406.22 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 1672406.22 \N \N \N \N 2140 11 36 jsmith 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 2141 11 36 jsmith 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2142 11 36 jsmith 40 2 G 42 \N 628949.09 \N \N \N \N \N \N \N \N 40 \N \N 628949.09 \N \N \N \N 2143 11 36 jsmith 41 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 2144 11 36 jsmith 42 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2145 11 36 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2146 11 36 jsmith 20 1 T -1 \N 1679018.80 \N \N \N \N \N \N \N \N 44 \N \N 1679018.80 \N \N \N \N 2147 11 36 jsmith 14 2 T -1 \N 1678018.80 \N \N \N \N \N \N \N \N 45 \N \N 1678018.80 \N \N \N \N 2148 11 36 jsmith 17 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2149 11 36 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 2150 13 45 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2151 13 45 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 2152 13 45 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2153 11 36 jsmith 46 1 T -1 \N 1679018.80 \N \N \N \N \N \N \N \N 36 \N \N 1679018.80 \N \N \N \N 2154 11 36 jsmith 35 2 T -1 \N 6612.58 \N \N \N \N \N \N \N \N 37 \N \N 6612.58 \N \N \N \N 2155 11 36 jsmith 31 3 T -1 \N 1612.58 \N \N \N \N \N \N \N \N 38 \N \N 1612.58 \N \N \N \N 2156 11 36 jsmith 34 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2157 11 36 jsmith 45 2 T -1 \N 1672406.22 \N \N \N \N \N \N \N \N 40 \N \N 1672406.22 \N \N \N \N 2158 11 36 jsmith 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2159 11 36 jsmith 44 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2160 11 36 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2161 11 35 jsmith 1 0 G 44 0.00 1376298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1376298.27 \N \N \N \N 2162 11 35 jsmith 2 1 G 45 0.00 1375298.27 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1375298.27 \N \N \N \N 2163 11 35 jsmith 3 2 I 65 \N 1250441.40 \N \N \N \N \N \N \N \N 45 \N \N 1250441.40 \N \N \N \N 2164 11 35 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2165 11 35 jsmith 5 2 I 67 \N 124878.87 \N \N \N \N \N \N \N \N 45 \N \N 124878.87 \N \N \N \N 2166 11 35 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2167 11 35 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2168 11 35 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2169 11 35 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2170 11 35 jsmith 10 2 I 72 \N -22.00 \N \N \N \N \N \N \N \N 45 \N \N -22.00 \N \N \N \N 2171 13 36 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 203057.00 \N 203057.00 \N \N \N \N 2172 13 36 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 203057.00 \N 203057.00 \N \N \N \N 2173 13 36 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 302639.64 \N 302639.64 \N \N \N \N 2174 11 35 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2175 11 35 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2176 11 35 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2177 11 35 jsmith 15 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2178 11 35 jsmith 16 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2179 11 35 jsmith 40 2 G 42 \N 326309.45 \N \N \N \N \N \N \N \N 40 \N \N 326309.45 \N \N \N \N 2180 13 55 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2181 13 36 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 302639.64 \N 302639.64 \N \N \N \N 2182 13 36 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2183 13 36 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 2184 13 36 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2185 13 36 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2186 13 36 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2187 13 36 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 99663.53 \N 99663.53 \N \N \N \N 2188 13 36 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 99693.60 \N 99693.60 \N \N \N \N 2189 13 36 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 -11.07 \N -11.07 \N \N \N \N 2190 13 36 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2191 13 36 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 -19.00 \N -19.00 \N \N \N \N 2192 13 36 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2193 13 36 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2194 13 36 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2195 13 36 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2196 11 42 jsmith 1 0 G 44 0.00 2655647.72 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2655647.72 \N \N \N \N 2197 11 42 jsmith 2 1 G 45 0.00 2654647.72 0.00 0.00 0.00 \N 0.99962344403119853563 \N \N \N 44 0.00 \N 2654647.72 \N \N \N \N 2198 11 42 jsmith 3 2 I 65 \N 2434216.85 \N \N \N \N 0.91661888422459888618 \N \N \N 45 \N \N 2434216.85 0.91661888422459888618 \N \N \N 2199 11 42 jsmith 4 2 I 242 \N 24871.50 \N \N \N \N 0.00936551177804562120 \N \N \N 45 \N \N 24871.50 0.00936551177804562120 \N \N \N 2200 11 42 jsmith 5 2 I 243 \N 25000.00 \N \N \N \N 0.00941389922003660937 \N \N \N 45 \N \N 25000.00 0.00941389922003660937 \N \N \N 2201 11 42 jsmith 6 2 I 66 \N 2068.06 \N \N \N \N 0.00077874033683955642 \N \N \N 45 \N \N 2068.06 \N \N \N \N 2202 11 42 jsmith 7 2 I 67 \N 210437.61 \N \N \N \N 0.07924153810581472756 \N \N \N 45 \N \N 210437.61 \N \N \N \N 2203 11 42 jsmith 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2204 11 42 jsmith 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2205 11 42 jsmith 10 2 I 70 \N -41706.30 \N \N \N \N -0.01570475620162451366 \N \N \N 45 \N \N -41706.30 \N \N \N \N 2206 11 42 jsmith 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2207 11 42 jsmith 12 2 I 72 \N -240.00 \N \N \N \N -0.000090373432512351449988 \N \N \N 45 \N \N -240.00 \N \N \N \N 2208 11 42 jsmith 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2209 11 42 jsmith 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2210 11 42 jsmith 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2211 11 42 jsmith 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00037655596880146437 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2212 11 42 jsmith 18 2 I 76 \N 1000.00 \N \N \N \N 0.00037655596880146437 \N \N \N 46 \N \N 1000.00 \N \N \N \N 2213 11 42 jsmith 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2214 11 42 jsmith 23 0 G 36 0.00 2655647.72 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2655647.72 \N \N \N \N 2215 11 42 jsmith 24 1 G 37 0.00 6680.48 0.00 0.00 0.00 \N 0.00251557461845880673 \N \N \N 36 0.00 \N 6680.48 \N \N \N \N 2216 11 42 jsmith 25 2 G 38 0.00 1680.48 0.00 0.00 0.00 \N 0.25155078676981294757 \N \N \N 37 0.00 \N 1680.48 \N \N \N \N 2217 11 42 jsmith 26 3 I 47 \N 262.95 \N \N \N \N 0.000099015391996345057393 \N \N \N 38 \N \N 262.95 \N \N \N \N 2218 11 42 jsmith 27 3 I 46 \N 194.77 \N \N \N \N 0.000073341806043461216309 \N \N \N 38 \N \N 194.77 \N \N \N \N 2219 11 42 jsmith 29 3 I 49 \N 624.22 \N \N \N \N 0.00023505376684525009 \N \N \N 38 \N \N 624.22 \N \N \N \N 2220 11 42 jsmith 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 2221 11 42 jsmith 31 3 I 50 \N 598.54 \N \N \N \N 0.00022538380956642849 \N \N \N 38 \N \N 598.54 \N \N \N \N 2222 11 42 jsmith 32 3 I 51 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 2223 11 42 jsmith 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00188277984400732187 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2224 11 42 jsmith 35 3 I 140 \N 5000.00 \N \N \N \N 0.00188277984400732187 \N \N \N 39 \N \N 5000.00 \N \N \N \N 2225 11 42 jsmith 38 1 G 40 0.00 2648967.24 0.00 0.00 0.00 \N 0.99748442538154119327 \N \N \N 36 0.00 \N 2648967.24 \N \N \N \N 2226 11 42 jsmith 39 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.53470947569807941243 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 2227 11 42 jsmith 40 3 I 52 \N 1420000.00 \N \N \N \N 0.53470947569807941243 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 2228 11 42 jsmith 42 2 G 42 \N 26180.00 \N \N \N \N 0.00985823526322233734 \N \N \N 40 \N \N 26180.00 \N \N \N \N 2229 11 42 jsmith 43 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.45291671442023944351 \N \N \N 40 0.00 \N 1202787.24 \N \N \N \N 2230 11 42 jsmith 44 3 I 63 \N 1202787.24 \N \N \N \N 0.45291671442023944351 \N \N \N 43 \N \N 1202787.24 \N \N \N \N 2231 11 42 jsmith 45 3 I 64 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 43 \N \N 0.00 \N \N \N \N 2232 11 42 jsmith 22 1 T -1 \N 2655647.72 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2655647.72 \N Total Assets \N \N 2233 13 36 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2234 13 36 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 80.89 \N 80.89 \N \N \N \N 2235 13 36 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2236 13 36 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 80.89 \N 80.89 \N \N \N \N 2237 13 36 jsmith 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2238 13 36 jsmith 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2239 13 36 jsmith 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2240 13 36 jsmith 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2241 13 36 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2242 13 36 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2243 13 36 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2244 13 36 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2245 13 36 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2246 13 36 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2247 13 36 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2248 13 36 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2249 13 36 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2250 13 36 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2251 13 36 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2252 13 36 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2253 13 36 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2254 13 36 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2255 13 36 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2256 13 36 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2257 13 36 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2258 13 36 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2259 13 36 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2260 13 36 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -203057.00 \N -203057.00 \N \N \N \N 2261 13 36 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 203057.00 \N 203057.00 \N \N \N \N 2262 13 36 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 203057.00 \N 203057.00 \N \N \N \N 2263 13 36 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 203057.00 \N 203057.00 \N \N \N \N 2264 13 36 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 302639.64 \N 302639.64 \N \N \N \N 2265 13 36 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 2266 13 36 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 2267 13 36 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2268 13 36 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 99663.53 \N 99663.53 \N \N \N \N 2269 13 36 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2270 13 36 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 80.89 \N 80.89 \N \N \N \N 2271 13 36 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 2272 13 36 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 2273 13 36 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2274 13 36 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 2275 13 36 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2276 13 36 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2277 13 36 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 2278 13 36 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2279 13 36 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2280 13 36 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2281 13 36 jsmith 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 2282 11 35 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2283 11 35 jsmith 21 0 G 36 0.00 1376298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1376298.27 \N \N \N \N 2284 11 35 jsmith 22 1 G 37 0.00 6531.69 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6531.69 \N \N \N \N 2285 13 45 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2286 13 45 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2287 13 45 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2288 13 45 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -5461.60 \N -5461.60 \N \N \N \N 2289 13 45 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -5397.00 \N -5397.00 \N \N \N \N 2290 13 45 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 -64.61 \N -64.61 \N \N \N \N 2291 13 45 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2292 13 45 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2293 13 45 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2294 13 45 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.01 \N 0.01 \N \N \N \N 2295 13 45 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2296 13 45 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2297 13 45 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2298 13 45 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 274.20 \N 274.20 \N \N \N \N 2299 13 45 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2300 13 45 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 274.20 \N 274.20 \N \N \N \N 2301 13 45 jsmith 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2302 13 45 jsmith 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2303 13 45 jsmith 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2304 13 45 jsmith 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 2305 13 45 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2306 13 45 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2307 13 45 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2308 13 45 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2309 13 45 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2310 13 45 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2311 13 45 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2312 13 45 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2313 13 45 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2314 13 45 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2315 13 45 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2316 13 45 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2317 13 45 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2318 13 45 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2319 13 45 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2320 13 45 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2321 13 45 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2322 13 45 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2323 11 44 jsmith 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 2324 11 35 jsmith 23 2 G 38 0.00 1531.69 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1531.69 \N \N \N \N 2325 11 35 jsmith 24 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 2326 11 35 jsmith 25 3 I 46 \N 45.98 \N \N \N \N \N \N \N \N 38 \N \N 45.98 \N \N \N \N 2327 11 35 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2328 11 35 jsmith 27 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 2329 11 35 jsmith 28 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 2330 11 43 jsmith 1 0 G 44 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 2331 11 43 jsmith 2 1 G 45 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2332 11 43 jsmith 3 2 I 65 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2333 11 43 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2334 11 43 jsmith 5 2 I 67 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2335 11 43 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2336 11 43 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2337 11 43 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2338 11 43 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2339 11 43 jsmith 10 2 I 72 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2340 11 43 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2341 11 43 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2342 11 43 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2343 11 43 jsmith 15 1 G 46 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2344 11 43 jsmith 16 2 I 76 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 2345 11 43 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2346 11 43 jsmith 21 0 G 36 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 2347 11 43 jsmith 22 1 G 37 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 2348 11 43 jsmith 23 2 G 38 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 2349 11 43 jsmith 24 3 I 47 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2350 11 43 jsmith 25 3 I 46 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2351 11 43 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2352 11 43 jsmith 27 3 I 49 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2353 11 43 jsmith 28 3 I 50 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2354 11 43 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2355 11 43 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2356 11 43 jsmith 32 2 G 39 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 2357 11 43 jsmith 33 3 I 140 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 2358 11 43 jsmith 36 1 G 40 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 2359 11 43 jsmith 37 2 G 41 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 0.00 \N \N \N \N 2360 11 43 jsmith 38 3 I 52 \N 0.00 \N \N \N \N \N \N \N \N 41 \N \N 0.00 \N \N \N \N 2361 11 43 jsmith 40 2 G 42 \N 0.00 \N \N \N \N \N \N \N \N 40 \N \N 0.00 \N \N \N \N 2362 11 43 jsmith 41 2 G 43 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 0.00 \N \N \N \N 2363 11 43 jsmith 42 3 I 63 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2364 11 43 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2365 11 43 jsmith 20 1 T -1 \N 0.00 \N \N \N \N \N \N \N \N 44 \N \N 0.00 \N \N \N \N 2366 11 43 jsmith 14 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2367 11 43 jsmith 17 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 2368 11 43 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 2369 11 43 jsmith 46 1 T -1 \N 0.00 \N \N \N \N \N \N \N \N 36 \N \N 0.00 \N \N \N \N 2370 11 43 jsmith 35 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 37 \N \N 0.00 \N \N \N \N 2371 11 43 jsmith 31 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2372 11 43 jsmith 34 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 2373 11 43 jsmith 45 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 40 \N \N 0.00 \N \N \N \N 2374 11 43 jsmith 39 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 41 \N \N 0.00 \N \N \N \N 2375 11 43 jsmith 44 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2376 11 43 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2377 11 35 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2378 11 35 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2379 11 35 jsmith 32 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2380 11 35 jsmith 33 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2381 11 35 jsmith 36 1 G 40 0.00 1369766.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 1369766.58 \N \N \N \N 2382 11 35 jsmith 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 2383 11 35 jsmith 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2384 13 53 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N M 2385 11 35 jsmith 41 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 2386 11 35 jsmith 42 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2387 11 35 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2388 11 35 jsmith 20 1 T -1 \N 1376298.27 \N \N \N \N \N \N \N \N 44 \N \N 1376298.27 \N \N \N \N 2389 11 35 jsmith 14 2 T -1 \N 1375298.27 \N \N \N \N \N \N \N \N 45 \N \N 1375298.27 \N \N \N \N 2390 11 35 jsmith 17 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2391 11 35 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 2392 11 35 jsmith 46 1 T -1 \N 1376298.27 \N \N \N \N \N \N \N \N 36 \N \N 1376298.27 \N \N \N \N 2393 11 35 jsmith 35 2 T -1 \N 6531.69 \N \N \N \N \N \N \N \N 37 \N \N 6531.69 \N \N \N \N 2394 11 35 jsmith 31 3 T -1 \N 1531.69 \N \N \N \N \N \N \N \N 38 \N \N 1531.69 \N \N \N \N 2395 11 35 jsmith 34 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2396 11 35 jsmith 45 2 T -1 \N 1369766.58 \N \N \N \N \N \N \N \N 40 \N \N 1369766.58 \N \N \N \N 2397 11 35 jsmith 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2398 11 35 jsmith 44 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2399 11 35 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2400 11 34 jsmith 15 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2401 11 34 jsmith 16 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2402 11 34 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2403 11 34 jsmith 21 0 G 36 0.00 1191298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1191298.27 \N \N \N \N 2404 11 34 jsmith 22 1 G 37 0.00 6531.69 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6531.69 \N \N \N \N 2405 11 34 jsmith 23 2 G 38 0.00 1531.69 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1531.69 \N \N \N \N 2406 13 45 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -43111.50 \N -43111.50 \N \N \N \N 2407 13 45 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 43111.50 \N 43111.50 \N \N \N \N 2408 13 45 jsmith 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 2409 13 45 jsmith 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 2410 13 45 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 43111.50 \N 37983.00 \N \N \N \N 2411 13 45 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 43111.50 \N 37983.00 \N \N \N \N 2412 13 45 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 37375.70 \N 32247.20 \N \N \N \N 2413 13 45 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 2414 13 45 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 2415 13 45 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2416 13 45 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -5461.60 \N -5461.60 \N \N \N \N 2417 13 45 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2418 13 45 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 274.20 \N 274.20 \N \N \N \N 2419 13 45 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 2420 13 45 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 2421 13 45 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2422 13 45 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 2423 13 45 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2424 13 45 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2425 13 45 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 2426 13 45 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2427 13 45 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2428 13 45 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2429 13 45 jsmith 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N -5128.50 \N \N \N \N 2430 13 45 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 43111.50 \N 37983.00 \N \N \N \N 2431 13 45 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 43111.50 \N 37983.00 \N \N \N \N 2432 13 45 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 37375.70 \N 32247.20 \N \N \N \N 2433 13 45 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 37375.70 \N 32247.20 \N \N \N \N 2434 13 45 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2435 11 45 jsmith 16 2 T -1 \N 2761283.75 \N \N \N \N 0.99963798071070721826 \N \N \N 45 \N \N 2761283.75 \N Total Current Assets \N \N 2436 11 34 jsmith 24 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 2437 11 34 jsmith 25 3 I 46 \N 45.98 \N \N \N \N \N \N \N \N 38 \N \N 45.98 \N \N \N \N 2438 11 34 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2439 11 34 jsmith 28 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 2440 11 34 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2441 11 34 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2442 11 34 jsmith 32 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2443 11 34 jsmith 33 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2444 11 34 jsmith 36 1 G 40 0.00 1184766.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 1184766.58 \N \N \N \N 2445 11 34 jsmith 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 2446 11 34 jsmith 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2447 11 34 jsmith 40 2 G 42 \N 141309.45 \N \N \N \N \N \N \N \N 40 \N \N 141309.45 \N \N \N \N 2448 11 34 jsmith 41 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 2449 11 45 jsmith 19 2 T -1 \N 1000.00 \N \N \N \N 0.00036201928929278174 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 2450 11 45 jsmith 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 2451 11 32 jsmith 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2452 11 45 jsmith 48 1 T -1 \N 2762283.75 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2762283.75 \N Total Liabilities and Owners Equity \N \N 2453 11 45 jsmith 37 2 T -1 \N 7013.57 \N \N \N \N 0.00253904762680517525 \N \N \N 37 \N \N 7013.57 \N Total Liabilities \N \N 2454 11 45 jsmith 33 3 T -1 \N 2013.57 \N \N \N \N 0.28709630045754159437 \N \N \N 38 \N \N 2013.57 \N Total Current Liabilities \N \N 2455 11 45 jsmith 36 3 T -1 \N 5000.00 \N \N \N \N 0.00181009644646390871 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 2456 11 45 jsmith 47 2 T -1 \N 2755270.18 \N \N \N \N 0.99746095237319482475 \N \N \N 40 \N \N 2755270.18 \N Total Owners Equity \N \N 2457 11 45 jsmith 42 3 T -1 \N 1420000.00 \N \N \N \N 0.51406739079575007455 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 2458 11 45 jsmith 45 3 T -1 \N 1202787.24 \N \N \N \N 0.43543218179522650416 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N \N 2459 11 45 jsmith 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 2460 11 45 jsmith 1 0 G 44 0.00 2762283.75 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2762283.75 \N \N \N \N 2461 11 34 jsmith 42 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2462 11 34 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2463 11 34 jsmith 20 1 T -1 \N 1191298.27 \N \N \N \N \N \N \N \N 44 \N \N 1191298.27 \N \N \N \N 2464 11 34 jsmith 14 2 T -1 \N 1190298.27 \N \N \N \N \N \N \N \N 45 \N \N 1190298.27 \N \N \N \N 2465 11 34 jsmith 17 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2466 11 34 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 2467 11 34 jsmith 46 1 T -1 \N 1191298.27 \N \N \N \N \N \N \N \N 36 \N \N 1191298.27 \N \N \N \N 2468 11 34 jsmith 35 2 T -1 \N 6531.69 \N \N \N \N \N \N \N \N 37 \N \N 6531.69 \N \N \N \N 2469 11 34 jsmith 31 3 T -1 \N 1531.69 \N \N \N \N \N \N \N \N 38 \N \N 1531.69 \N \N \N \N 2470 11 34 jsmith 34 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2471 11 34 jsmith 45 2 T -1 \N 1184766.58 \N \N \N \N \N \N \N \N 40 \N \N 1184766.58 \N \N \N \N 2472 11 34 jsmith 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2473 11 34 jsmith 44 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2474 11 34 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2475 11 34 jsmith 1 0 G 44 0.00 1191298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1191298.27 \N \N \N \N 2476 11 34 jsmith 2 1 G 45 0.00 1190298.27 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1190298.27 \N \N \N \N 2477 11 34 jsmith 3 2 I 65 \N 1153441.40 \N \N \N \N \N \N \N \N 45 \N \N 1153441.40 \N \N \N \N 2478 11 34 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2479 11 34 jsmith 5 2 I 67 \N 36878.87 \N \N \N \N \N \N \N \N 45 \N \N 36878.87 \N \N \N \N 2480 11 34 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2481 11 34 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2482 11 34 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2483 11 34 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2484 11 34 jsmith 10 2 I 72 \N -22.00 \N \N \N \N \N \N \N \N 45 \N \N -22.00 \N \N \N \N 2485 11 34 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2486 11 34 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2487 11 34 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2488 11 34 jsmith 27 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 2489 11 33 jsmith 36 1 G 40 0.00 1124766.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 1124766.58 \N \N \N \N 2490 11 33 jsmith 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 2491 11 33 jsmith 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2492 11 33 jsmith 40 2 G 42 \N 81309.45 \N \N \N \N \N \N \N \N 40 \N \N 81309.45 \N \N \N \N 2493 11 33 jsmith 41 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 2494 11 33 jsmith 42 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2495 11 33 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2496 11 33 jsmith 20 1 T -1 \N 1131298.27 \N \N \N \N \N \N \N \N 44 \N \N 1131298.27 \N \N \N \N 2497 11 33 jsmith 14 2 T -1 \N 1130298.27 \N \N \N \N \N \N \N \N 45 \N \N 1130298.27 \N \N \N \N 2498 11 33 jsmith 17 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2499 11 33 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 2500 11 33 jsmith 46 1 T -1 \N 1131298.27 \N \N \N \N \N \N \N \N 36 \N \N 1131298.27 \N \N \N \N 2501 11 33 jsmith 35 2 T -1 \N 6531.69 \N \N \N \N \N \N \N \N 37 \N \N 6531.69 \N \N \N \N 2502 11 33 jsmith 31 3 T -1 \N 1531.69 \N \N \N \N \N \N \N \N 38 \N \N 1531.69 \N \N \N \N 2503 11 33 jsmith 34 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2504 11 33 jsmith 45 2 T -1 \N 1124766.58 \N \N \N \N \N \N \N \N 40 \N \N 1124766.58 \N \N \N \N 2505 11 33 jsmith 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2506 11 33 jsmith 44 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2507 11 33 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2508 11 33 jsmith 1 0 G 44 0.00 1131298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1131298.27 \N \N \N \N 2509 11 33 jsmith 2 1 G 45 0.00 1130298.27 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1130298.27 \N \N \N \N 2510 11 33 jsmith 3 2 I 65 \N 1128441.40 \N \N \N \N \N \N \N \N 45 \N \N 1128441.40 \N \N \N \N 2511 11 33 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2512 11 33 jsmith 5 2 I 67 \N 1878.87 \N \N \N \N \N \N \N \N 45 \N \N 1878.87 \N \N \N \N 2513 11 33 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2514 11 33 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2515 11 33 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2516 11 33 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2517 11 33 jsmith 10 2 I 72 \N -22.00 \N \N \N \N \N \N \N \N 45 \N \N -22.00 \N \N \N \N 2518 11 33 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2519 11 33 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2520 11 33 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2521 11 33 jsmith 15 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2522 11 33 jsmith 16 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2523 11 33 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2524 13 53 mfgadmin 59 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N M 2525 11 33 jsmith 21 0 G 36 0.00 1131298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1131298.27 \N \N \N \N 2526 11 33 jsmith 22 1 G 37 0.00 6531.69 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6531.69 \N \N \N \N 2527 11 33 jsmith 23 2 G 38 0.00 1531.69 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1531.69 \N \N \N \N 2528 11 33 jsmith 24 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 2529 11 33 jsmith 25 3 I 46 \N 45.98 \N \N \N \N \N \N \N \N 38 \N \N 45.98 \N \N \N \N 2530 11 33 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2531 11 33 jsmith 27 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 2532 11 33 jsmith 28 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 2533 11 33 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2534 11 33 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2535 11 33 jsmith 32 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2536 11 33 jsmith 33 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2537 11 32 jsmith 45 2 T -1 \N 1084766.58 \N \N \N \N \N \N \N \N 40 \N \N 1084766.58 \N \N \N \N 2538 11 32 jsmith 44 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2539 11 32 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2540 11 32 jsmith 1 0 G 44 0.00 1091298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1091298.27 \N \N \N \N 2541 11 32 jsmith 2 1 G 45 0.00 1090298.27 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1090298.27 \N \N \N \N 2542 11 32 jsmith 3 2 I 65 \N 1073441.40 \N \N \N \N \N \N \N \N 45 \N \N 1073441.40 \N \N \N \N 2543 11 32 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2544 11 32 jsmith 5 2 I 67 \N 16878.87 \N \N \N \N \N \N \N \N 45 \N \N 16878.87 \N \N \N \N 2545 11 32 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2546 11 32 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2547 11 32 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2548 11 32 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2549 11 32 jsmith 10 2 I 72 \N -22.00 \N \N \N \N \N \N \N \N 45 \N \N -22.00 \N \N \N \N 2550 11 32 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2551 11 32 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2552 11 32 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2553 13 55 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2554 13 55 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2555 13 55 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2556 13 55 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 2557 13 55 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 2558 13 55 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2559 13 55 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 2560 13 55 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2561 13 55 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2562 13 55 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 2563 13 55 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2564 13 55 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2565 13 55 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2566 13 55 jsmith 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 2567 13 40 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -100.00 \N -100.00 \N \N \N \N 2568 13 40 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 -100.00 \N -100.00 \N \N \N \N 2569 13 40 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2570 13 40 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 2571 13 40 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2572 13 40 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2573 13 40 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2574 13 40 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2575 13 40 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2576 13 40 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2577 13 40 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2578 13 40 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2579 13 40 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2580 13 40 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2581 13 40 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2582 13 40 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2583 13 40 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2584 13 40 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2585 13 40 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2586 13 40 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2587 13 40 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2588 11 32 jsmith 15 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2589 11 32 jsmith 16 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2590 11 32 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2591 13 40 jsmith 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2592 13 40 jsmith 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2593 13 40 jsmith 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 2594 13 40 jsmith 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 2595 13 40 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2596 13 40 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2597 13 40 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2598 13 40 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 2599 13 40 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2600 13 40 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 2601 13 40 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2602 13 40 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2603 13 40 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 2604 13 40 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2605 13 40 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 2606 13 40 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 2607 13 40 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2608 13 40 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 2609 13 40 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2610 13 40 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2611 13 40 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2612 13 40 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 2613 13 40 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 2614 13 40 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 100.00 \N 100.00 \N \N \N \N 2615 13 40 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 -100.00 \N -100.00 \N \N \N \N 2616 13 40 jsmith 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 2617 13 40 jsmith 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 2618 13 40 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 -100.00 \N -100.00 \N \N \N \N 2619 13 40 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 -100.00 \N -100.00 \N \N \N \N 2620 13 40 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 -100.00 \N -100.00 \N \N \N \N 2621 13 40 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 2622 13 40 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 2623 13 40 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 2624 13 40 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 2625 13 40 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 2626 11 32 jsmith 21 0 G 36 0.00 1091298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1091298.27 \N \N \N \N 2627 11 32 jsmith 22 1 G 37 0.00 6531.69 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6531.69 \N \N \N \N 2628 11 32 jsmith 23 2 G 38 0.00 1531.69 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1531.69 \N \N \N \N 2629 11 32 jsmith 24 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 2630 11 32 jsmith 25 3 I 46 \N 45.98 \N \N \N \N \N \N \N \N 38 \N \N 45.98 \N \N \N \N 2631 11 32 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2632 11 32 jsmith 27 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 2633 11 32 jsmith 28 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 2634 11 32 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2635 11 32 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2636 11 32 jsmith 32 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2637 11 32 jsmith 33 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2638 11 32 jsmith 36 1 G 40 0.00 1084766.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 1084766.58 \N \N \N \N 2639 11 32 jsmith 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 2640 11 32 jsmith 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2641 11 32 jsmith 40 2 G 42 \N 41309.45 \N \N \N \N \N \N \N \N 40 \N \N 41309.45 \N \N \N \N 2642 11 32 jsmith 41 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 2643 11 32 jsmith 42 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2644 11 32 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2645 11 32 jsmith 20 1 T -1 \N 1091298.27 \N \N \N \N \N \N \N \N 44 \N \N 1091298.27 \N \N \N \N 2646 11 32 jsmith 14 2 T -1 \N 1090298.27 \N \N \N \N \N \N \N \N 45 \N \N 1090298.27 \N \N \N \N 2647 11 32 jsmith 17 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2648 11 32 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 2649 11 32 jsmith 46 1 T -1 \N 1091298.27 \N \N \N \N \N \N \N \N 36 \N \N 1091298.27 \N \N \N \N 2650 11 32 jsmith 35 2 T -1 \N 6531.69 \N \N \N \N \N \N \N \N 37 \N \N 6531.69 \N \N \N \N 2651 11 32 jsmith 31 3 T -1 \N 1531.69 \N \N \N \N \N \N \N \N 38 \N \N 1531.69 \N \N \N \N 2652 11 32 jsmith 34 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2653 11 31 jsmith 1 0 G 44 0.00 1056298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1056298.27 \N \N \N \N 2654 11 31 jsmith 2 1 G 45 0.00 1055298.27 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1055298.27 \N \N \N \N 2655 11 31 jsmith 3 2 I 65 \N 1023441.40 \N \N \N \N \N \N \N \N 45 \N \N 1023441.40 \N \N \N \N 2656 11 31 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2657 11 31 jsmith 5 2 I 67 \N 31878.87 \N \N \N \N \N \N \N \N 45 \N \N 31878.87 \N \N \N \N 2658 11 31 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2659 11 31 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2660 11 31 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2661 11 31 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2662 11 31 jsmith 10 2 I 72 \N -22.00 \N \N \N \N \N \N \N \N 45 \N \N -22.00 \N \N \N \N 2663 11 31 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2664 11 31 jsmith 15 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2665 11 31 jsmith 16 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2666 11 31 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2667 11 31 jsmith 21 0 G 36 0.00 1056298.27 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1056298.27 \N \N \N \N 2668 11 31 jsmith 22 1 G 37 0.00 6531.69 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6531.69 \N \N \N \N 2669 11 31 jsmith 23 2 G 38 0.00 1531.69 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1531.69 \N \N \N \N 2670 11 31 jsmith 24 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 2671 11 31 jsmith 25 3 I 46 \N 45.98 \N \N \N \N \N \N \N \N 38 \N \N 45.98 \N \N \N \N 2672 11 31 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2673 11 31 jsmith 27 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 2674 11 31 jsmith 28 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 2675 11 31 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2676 11 31 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2677 11 31 jsmith 32 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2678 11 31 jsmith 33 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2679 11 31 jsmith 36 1 G 40 0.00 1049766.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 1049766.58 \N \N \N \N 2680 11 31 jsmith 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 2681 11 31 jsmith 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2682 11 31 jsmith 40 2 G 42 \N 6309.45 \N \N \N \N \N \N \N \N 40 \N \N 6309.45 \N \N \N \N 2683 11 31 jsmith 41 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 2684 11 31 jsmith 42 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2685 11 31 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2686 11 31 jsmith 20 1 T -1 \N 1056298.27 \N \N \N \N \N \N \N \N 44 \N \N 1056298.27 \N \N \N \N 2687 11 31 jsmith 14 2 T -1 \N 1055298.27 \N \N \N \N \N \N \N \N 45 \N \N 1055298.27 \N \N \N \N 2688 11 31 jsmith 17 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2689 11 31 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 2690 11 31 jsmith 46 1 T -1 \N 1056298.27 \N \N \N \N \N \N \N \N 36 \N \N 1056298.27 \N \N \N \N 2691 11 31 jsmith 35 2 T -1 \N 6531.69 \N \N \N \N \N \N \N \N 37 \N \N 6531.69 \N \N \N \N 2692 11 31 jsmith 31 3 T -1 \N 1531.69 \N \N \N \N \N \N \N \N 38 \N \N 1531.69 \N \N \N \N 2693 11 31 jsmith 34 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2694 11 31 jsmith 45 2 T -1 \N 1049766.58 \N \N \N \N \N \N \N \N 40 \N \N 1049766.58 \N \N \N \N 2695 11 31 jsmith 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2696 11 31 jsmith 44 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2697 11 31 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2698 11 30 jsmith 3 2 I 65 \N 1020406.90 \N \N \N \N \N \N \N \N 45 \N \N 1020406.90 \N \N \N \N 2699 11 30 jsmith 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2700 11 30 jsmith 5 2 I 67 \N 33079.07 \N \N \N \N \N \N \N \N 45 \N \N 33079.07 \N \N \N \N 2701 11 30 jsmith 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2702 11 30 jsmith 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2703 11 30 jsmith 8 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2704 11 30 jsmith 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2705 11 30 jsmith 10 2 I 72 \N -22.00 \N \N \N \N \N \N \N \N 45 \N \N -22.00 \N \N \N \N 2706 11 30 jsmith 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2707 11 30 jsmith 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2708 11 30 jsmith 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2709 11 30 jsmith 15 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2710 11 30 jsmith 16 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2711 11 30 jsmith 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2712 11 30 jsmith 21 0 G 36 0.00 1054463.97 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1054463.97 \N \N \N \N 2713 11 30 jsmith 22 1 G 37 0.00 6401.21 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6401.21 \N \N \N \N 2714 11 30 jsmith 23 2 G 38 0.00 1401.21 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1401.21 \N \N \N \N 2715 11 30 jsmith 24 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 2716 11 30 jsmith 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2717 11 30 jsmith 27 3 I 49 \N 587.22 \N \N \N \N \N \N \N \N 38 \N \N 587.22 \N \N \N \N 2718 11 30 jsmith 28 3 I 50 \N 551.04 \N \N \N \N \N \N \N \N 38 \N \N 551.04 \N \N \N \N 2719 11 30 jsmith 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2720 11 30 jsmith 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2721 11 30 jsmith 32 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2722 11 30 jsmith 33 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2723 11 30 jsmith 36 1 G 40 0.00 1048062.76 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 1048062.76 \N \N \N \N 2724 11 30 jsmith 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 2725 11 30 jsmith 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2726 11 30 jsmith 40 2 G 42 \N 4605.63 \N \N \N \N \N \N \N \N 40 \N \N 4605.63 \N \N \N \N 2727 11 30 jsmith 41 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 2728 11 30 jsmith 42 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2729 11 30 jsmith 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2730 11 30 jsmith 20 1 T -1 \N 1054463.97 \N \N \N \N \N \N \N \N 44 \N \N 1054463.97 \N \N \N \N 2731 11 30 jsmith 14 2 T -1 \N 1053463.97 \N \N \N \N \N \N \N \N 45 \N \N 1053463.97 \N \N \N \N 2732 11 30 jsmith 17 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2733 11 30 jsmith 46 1 T -1 \N 1054463.97 \N \N \N \N \N \N \N \N 36 \N \N 1054463.97 \N \N \N \N 2734 11 30 jsmith 35 2 T -1 \N 6401.21 \N \N \N \N \N \N \N \N 37 \N \N 6401.21 \N \N \N \N 2735 11 30 jsmith 31 3 T -1 \N 1401.21 \N \N \N \N \N \N \N \N 38 \N \N 1401.21 \N \N \N \N 2736 11 30 jsmith 34 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2737 11 30 jsmith 45 2 T -1 \N 1048062.76 \N \N \N \N \N \N \N \N 40 \N \N 1048062.76 \N \N \N \N 2738 11 30 jsmith 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2739 11 30 jsmith 44 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2740 11 30 jsmith 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2741 11 30 jsmith 1 0 G 44 0.00 1054463.97 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 1054463.97 \N \N \N \N 2742 11 30 jsmith 2 1 G 45 0.00 1053463.97 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1053463.97 \N \N \N \N 2743 11 30 jsmith 25 3 I 46 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2744 4 68 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 2745 4 68 mfgadmin 8 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Sales \N \N 2746 4 68 mfgadmin 11 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Cost of Goods Sold \N \N 2747 4 68 mfgadmin 12 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Net Revenue \N \N 2748 4 68 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 2749 4 68 mfgadmin 28 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N Net Income \N \N 2750 4 68 mfgadmin 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2751 4 68 mfgadmin 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2752 4 68 mfgadmin 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2753 4 68 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2754 4 68 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2755 4 68 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2756 4 68 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2757 4 68 mfgadmin 9 1 G 5 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2758 4 68 mfgadmin 10 2 I 246 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2759 4 68 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 2760 4 68 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2761 4 68 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2762 4 68 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2763 4 68 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2764 4 68 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2765 4 68 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2766 4 68 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2767 4 68 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2768 4 68 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2769 4 68 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2770 4 68 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2771 4 68 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 2772 11 42 jsmith 16 2 T -1 \N 2654647.72 \N \N \N \N 0.99962344403119853563 \N \N \N 45 \N \N 2654647.72 \N Total Current Assets \N \N 2773 11 42 jsmith 19 2 T -1 \N 1000.00 \N \N \N \N 0.00037655596880146437 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 2774 11 42 jsmith 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 2775 11 42 jsmith 48 1 T -1 \N 2655647.72 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2655647.72 \N Total Liabilities and Owners Equity \N \N 2776 11 42 jsmith 37 2 T -1 \N 6680.48 \N \N \N \N 0.00251557461845880673 \N \N \N 37 \N \N 6680.48 \N Total Liabilities \N \N 2777 11 42 jsmith 33 3 T -1 \N 1680.48 \N \N \N \N 0.25155078676981294757 \N \N \N 38 \N \N 1680.48 \N Total Current Liabilities \N \N 2778 11 42 jsmith 36 3 T -1 \N 5000.00 \N \N \N \N 0.00188277984400732187 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 2779 11 42 jsmith 47 2 T -1 \N 2648967.24 \N \N \N \N 0.99748442538154119327 \N \N \N 40 \N \N 2648967.24 \N Total Owners Equity \N \N 2780 11 42 jsmith 41 3 T -1 \N 1420000.00 \N \N \N \N 0.53470947569807941243 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 2781 11 42 jsmith 46 3 T -1 \N 1202787.24 \N \N \N \N 0.45291671442023944351 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N \N 2782 11 42 jsmith 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 2783 11 42 jsmith 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 2784 11 43 mfgadmin 1 0 G 44 0.00 2689633.85 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2689633.85 \N \N \N \N 2785 11 43 mfgadmin 2 1 G 45 0.00 2688633.85 0.00 0.00 0.00 \N 0.99962820218075408294 \N \N \N 44 0.00 \N 2688633.85 \N \N \N \N 2786 11 43 mfgadmin 3 2 I 65 \N 2485514.97 \N \N \N \N 0.92410904554908096505 \N \N \N 45 \N \N 2485514.97 0.92410904554908096505 \N \N \N 2787 11 43 mfgadmin 4 2 I 242 \N 24743.00 \N \N \N \N 0.00919939344160172583 \N \N \N 45 \N \N 24743.00 0.00919939344160172583 \N \N \N 2788 11 43 mfgadmin 5 2 I 243 \N 26052.03 \N \N \N \N 0.00968608794092920864 \N \N \N 45 \N \N 26052.03 0.00968608794092920864 \N \N \N 2789 11 43 mfgadmin 6 2 I 66 \N 0.01 \N \N \N \N 0.0000000037179781924591706042 \N \N \N 45 \N \N 0.01 \N \N \N \N 2790 11 43 mfgadmin 7 2 I 67 \N 194304.46 \N \N \N \N 0.07224197449775552163 \N \N \N 45 \N \N 194304.46 \N \N \N \N 2791 11 37 mfgadmin 22 1 G 37 0.00 6612.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6612.58 \N \N \N \N 2792 11 37 mfgadmin 23 2 G 38 0.00 1612.58 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1612.58 \N \N \N \N 2793 11 43 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2794 11 43 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2795 11 43 mfgadmin 10 2 I 70 \N -41740.62 \N \N \N \N -0.01551907148997251057 \N \N \N 45 \N \N -41740.62 \N \N \N \N 2796 11 43 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2797 11 43 mfgadmin 12 2 I 72 \N -240.00 \N \N \N \N -0.000089231476619020094501 \N \N \N 45 \N \N -240.00 \N \N \N \N 2798 11 43 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2799 11 43 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2800 11 37 mfgadmin 24 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 2801 11 37 mfgadmin 25 3 I 46 \N 126.87 \N \N \N \N \N \N \N \N 38 \N \N 126.87 \N \N \N \N 2802 11 37 mfgadmin 26 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2803 11 37 mfgadmin 27 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 2804 11 37 mfgadmin 28 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 2805 11 37 mfgadmin 29 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2806 11 37 mfgadmin 30 3 I 215 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 2807 11 37 mfgadmin 32 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2808 11 37 mfgadmin 33 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2809 11 37 mfgadmin 36 1 G 40 0.00 2023511.44 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 2023511.44 \N \N \N \N 2810 11 37 mfgadmin 37 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 2811 11 37 mfgadmin 38 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2812 11 37 mfgadmin 40 2 G 42 \N 980054.31 \N \N \N \N \N \N \N \N 40 \N \N 980054.31 \N \N \N \N 2813 11 37 mfgadmin 41 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 2814 11 37 mfgadmin 42 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2815 11 37 mfgadmin 43 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 2816 11 37 mfgadmin 14 2 T -1 \N 2029124.02 \N \N \N \N \N \N \N \N 45 \N \N 2029124.02 \N \N \N \N 2817 11 37 mfgadmin 17 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2818 11 37 mfgadmin 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 2819 11 37 mfgadmin 20 1 T -1 \N 2030124.02 \N \N \N \N \N \N \N \N 44 \N \N 2030124.02 \N \N \N \N 2820 11 37 mfgadmin 31 3 T -1 \N 1612.58 \N \N \N \N \N \N \N \N 38 \N \N 1612.58 \N \N \N \N 2821 11 37 mfgadmin 34 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 2822 11 37 mfgadmin 35 2 T -1 \N 6612.58 \N \N \N \N \N \N \N \N 37 \N \N 6612.58 \N \N \N \N 2823 11 37 mfgadmin 39 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 2824 11 37 mfgadmin 44 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 2825 11 37 mfgadmin 45 2 T -1 \N 2023511.44 \N \N \N \N \N \N \N \N 40 \N \N 2023511.44 \N \N \N \N 2826 11 37 mfgadmin 46 1 T -1 \N 2030124.02 \N \N \N \N \N \N \N \N 36 \N \N 2030124.02 \N \N \N \N 2827 11 37 mfgadmin 47 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 2828 11 37 mfgadmin 1 0 G 44 0.00 2030124.02 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2030124.02 \N \N \N \N 2829 11 37 mfgadmin 2 1 G 45 0.00 2029124.02 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 2029124.02 \N \N \N \N 2830 11 37 mfgadmin 3 2 I 65 \N 1954509.62 \N \N \N \N \N \N \N \N 45 \N \N 1954509.62 \N \N \N \N 2831 11 37 mfgadmin 4 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2832 11 37 mfgadmin 5 2 I 67 \N 74666.47 \N \N \N \N \N \N \N \N 45 \N \N 74666.47 \N \N \N \N 2833 11 37 mfgadmin 6 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2834 11 37 mfgadmin 7 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2835 11 37 mfgadmin 8 2 I 70 \N -11.07 \N \N \N \N \N \N \N \N 45 \N \N -11.07 \N \N \N \N 2836 11 37 mfgadmin 9 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2837 11 37 mfgadmin 10 2 I 72 \N -41.00 \N \N \N \N \N \N \N \N 45 \N \N -41.00 \N \N \N \N 2838 11 37 mfgadmin 11 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2839 11 37 mfgadmin 12 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2840 11 37 mfgadmin 13 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 2841 11 37 mfgadmin 15 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2842 11 37 mfgadmin 16 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 2843 11 37 mfgadmin 18 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2844 11 37 mfgadmin 21 0 G 36 0.00 2030124.02 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2030124.02 \N \N \N \N 2845 11 43 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 2846 11 43 mfgadmin 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00037179781924591706 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 2847 11 43 mfgadmin 18 2 I 76 \N 1000.00 \N \N \N \N 0.00037179781924591706 \N \N \N 46 \N \N 1000.00 \N \N \N \N 2848 11 43 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 2849 11 43 mfgadmin 23 0 G 36 0.00 2689633.85 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2689633.85 \N \N \N \N 2850 11 43 mfgadmin 24 1 G 37 0.00 6739.37 0.00 0.00 0.00 \N 0.00250568306909135606 \N \N \N 36 0.00 \N 6739.37 \N \N \N \N 2851 11 43 mfgadmin 25 2 G 38 0.00 1739.37 0.00 0.00 0.00 \N 0.25809088980127222574 \N \N \N 37 0.00 \N 1739.37 \N \N \N \N 2852 11 43 mfgadmin 26 3 I 47 \N 262.95 \N \N \N \N 0.000097764236570713891038 \N \N \N 38 \N \N 262.95 \N \N \N \N 2853 11 43 mfgadmin 27 3 I 46 \N 252.41 \N \N \N \N 0.000093845487555861925221 \N \N \N 38 \N \N 252.41 \N \N \N \N 2854 11 43 mfgadmin 29 3 I 49 \N 624.22 \N \N \N \N 0.00023208363472968635 \N \N \N 38 \N \N 624.22 \N \N \N \N 2855 11 43 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 2856 11 43 mfgadmin 31 3 I 50 \N 598.54 \N \N \N \N 0.00022253586673145120 \N \N \N 38 \N \N 598.54 \N \N \N \N 2857 11 43 mfgadmin 32 3 I 51 \N 1.25 \N \N \N \N 0.000000464747274057396326 \N \N \N 38 \N \N 1.25 \N \N \N \N 2858 11 43 mfgadmin 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00185898909622958530 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 2859 11 43 mfgadmin 35 3 I 140 \N 5000.00 \N \N \N \N 0.00185898909622958530 \N \N \N 39 \N \N 5000.00 \N \N \N \N 2860 11 43 mfgadmin 38 1 G 40 0.00 2682894.48 0.00 0.00 0.00 \N 0.99749431693090864394 \N \N \N 36 0.00 \N 2682894.48 \N \N \N \N 2861 11 43 mfgadmin 39 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.52795290332920222580 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 2862 11 43 mfgadmin 40 3 I 52 \N 1420000.00 \N \N \N \N 0.52795290332920222580 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 2863 11 43 mfgadmin 41 3 I 247 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 41 \N \N 0.00 0.000000000000000000000000 \N \N \N 2864 11 43 mfgadmin 43 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.44719367284881546237 \N \N \N 40 0.00 \N 1202787.24 \N \N \N \N 2865 11 43 mfgadmin 44 3 I 63 \N 1202787.24 \N \N \N \N 0.44719367284881546237 \N \N \N 43 \N \N 1202787.24 \N \N \N \N 2866 11 43 mfgadmin 46 2 G 42 \N 60107.24 \N \N \N \N 0.02234774075289095577 \N \N \N 40 \N \N 60107.24 \N \N \N \N 2867 4 28 mfgadmin 12 1 T -1 \N 19203.19 \N \N 0.00 \N 0.75198695206096347987 \N \N 0.00000000000000000000 3 3703.19 0.73525592661716237144 3703.19 0.73525592661716237144 Total Net Revenue \N \N 2868 13 39 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 -41671.72 \N -41671.72 \N \N \N \N 2869 4 28 mfgadmin 8 2 T -1 \N 25536.60 \N \N \N \N 1.00000000000000000000 \N \N \N 4 5036.60 1.00000000000000000000 5036.60 1.00000000000000000000 Total Sales \N \N 2870 4 28 mfgadmin 11 2 T -1 \N 6333.41 \N \N 0.00 \N 0.24801304793903652013 \N \N 0.00000000000000000000 5 1333.41 0.26474407338283762856 1333.41 0.26474407338283762856 Total Cost of Goods Sold \N \N 2871 4 28 mfgadmin 27 2 T -1 \N 746.06 \N \N 0.00 \N 0.02921532232168730371 \N \N 0.00000000000000000000 8 246.06 0.04885438589524679347 246.06 0.04885438589524679347 Total General Expenses \N \N 2872 4 28 mfgadmin 28 0 T -1 0.00 18457.13 0.00 0.00 0.00 \N \N \N \N \N \N 3457.13 \N 3457.13 \N Net Income \N \N 2873 4 28 mfgadmin 1 0 G 3 0.00 19203.19 0.00 0.00 0.00 \N 0.75198695206096347987 \N \N 0.00000000000000000000 -1 3703.19 0.73525592661716237144 3703.19 0.73525592661716237144 \N \N \N 2874 4 28 mfgadmin 2 1 G 4 0.00 25536.60 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 5036.60 1.00000000000000000000 5036.60 1.00000000000000000000 \N \N \N 2875 4 28 mfgadmin 3 2 I 2 \N 25255.20 \N \N 0.00 \N 0.98898052207419938441 \N \N 0.00000000000000000000 4 4755.20 0.94412897589643807330 4755.20 0.94412897589643807330 \N \N \N 2876 4 28 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2877 4 28 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2878 4 28 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2879 4 28 mfgadmin 7 2 I 3 \N 281.40 \N \N 0.00 \N 0.01101947792580061559 \N \N 0.00000000000000000000 4 281.40 0.05587102410356192670 281.40 0.05587102410356192670 \N \N \N 2880 4 28 mfgadmin 9 1 G 5 0.00 6333.41 0.00 0.00 0.00 \N 0.24801304793903652013 \N \N 0.00000000000000000000 3 1333.41 0.26474407338283762856 1333.41 0.26474407338283762856 \N \N \N 2881 4 28 mfgadmin 10 2 I 246 \N 6333.41 \N \N 0.00 \N 0.24801304793903652013 \N \N 0.00000000000000000000 5 1333.41 0.26474407338283762856 1333.41 0.26474407338283762856 \N \N \N 2882 4 28 mfgadmin 13 0 G 7 0.00 746.06 0.00 0.00 0.00 \N \N \N \N \N -1 246.06 \N 246.06 \N \N \N \N 2883 4 28 mfgadmin 14 1 G 8 0.00 746.06 0.00 0.00 0.00 \N 0.02921532232168730371 \N \N 0.00000000000000000000 7 246.06 0.04885438589524679347 246.06 0.04885438589524679347 \N \N \N 2884 4 28 mfgadmin 15 2 I 5 \N 700.00 \N \N 0.00 \N 0.02741163663134481489 \N \N 0.00000000000000000000 8 200.00 0.03970932772108168209 200.00 0.03970932772108168209 \N \N \N 2885 4 28 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2886 4 28 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2887 4 28 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2888 4 28 mfgadmin 19 2 I 7 \N 29.99 \N \N 0.00 \N 0.00117439283224861571 \N \N 0.00000000000000000000 8 29.99 0.00595441369177619823 29.99 0.00595441369177619823 \N \N \N 2889 4 28 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2890 4 28 mfgadmin 21 2 I 11 \N 10.00 \N \N 0.00 \N 0.00039159480901921164 \N \N 0.00000000000000000000 8 10.00 0.00198546638605408410 10.00 0.00198546638605408410 \N \N \N 2891 4 28 mfgadmin 22 2 I 9 \N 5.00 \N \N 0.00 \N 0.00019579740450960582 \N \N 0.00000000000000000000 8 5.00 0.00099273319302704205 5.00 0.00099273319302704205 \N \N \N 2892 4 28 mfgadmin 23 2 I 10 \N 1.07 \N \N 0.00 \N 0.000041900644565055645622 \N \N 0.00000000000000000000 8 1.07 0.00021244490330778700 1.07 0.00021244490330778700 \N \N \N 2893 4 28 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2894 4 28 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 2895 4 28 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 2896 4 29 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2897 4 29 mfgadmin 9 1 G 5 0.00 5000.00 0.00 0.00 0.00 \N 0.24390243902439024390 \N \N 0.00000000000000000000 3 1000.00 0.40000000000000000000 1000.00 0.40000000000000000000 \N \N \N 2898 4 29 mfgadmin 10 2 I 246 \N 5000.00 \N \N 0.00 \N 0.24390243902439024390 \N \N 0.00000000000000000000 5 1000.00 0.40000000000000000000 1000.00 0.40000000000000000000 \N \N \N 2899 4 29 mfgadmin 13 0 G 7 0.00 500.00 0.00 0.00 0.00 \N \N \N \N \N -1 500.00 \N 500.00 \N \N \N \N 2900 4 29 mfgadmin 14 1 G 8 0.00 500.00 0.00 0.00 0.00 \N 0.02439024390243902439 \N \N 0.00000000000000000000 7 500.00 0.20000000000000000000 500.00 0.20000000000000000000 \N \N \N 2901 4 29 mfgadmin 15 2 I 5 \N 500.00 \N \N 0.00 \N 0.02439024390243902439 \N \N 0.00000000000000000000 8 500.00 0.20000000000000000000 500.00 0.20000000000000000000 \N \N \N 2902 4 29 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2903 4 29 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2904 4 29 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2905 4 29 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2906 4 29 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2907 4 29 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2908 4 29 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2909 4 29 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2910 4 29 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2911 4 29 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 2912 4 29 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 2913 4 29 mfgadmin 12 1 T -1 \N 15500.00 \N \N 0.00 \N 0.75609756097560975610 \N \N 0.00000000000000000000 3 1500.00 0.60000000000000000000 1500.00 0.60000000000000000000 Total Net Revenue \N \N 2914 4 29 mfgadmin 8 2 T -1 \N 20500.00 \N \N \N \N 1.00000000000000000000 \N \N \N 4 2500.00 1.00000000000000000000 2500.00 1.00000000000000000000 Total Sales \N \N 2915 4 29 mfgadmin 11 2 T -1 \N 5000.00 \N \N 0.00 \N 0.24390243902439024390 \N \N 0.00000000000000000000 5 1000.00 0.40000000000000000000 1000.00 0.40000000000000000000 Total Cost of Goods Sold \N \N 2916 4 29 mfgadmin 27 2 T -1 \N 500.00 \N \N 0.00 \N 0.02439024390243902439 \N \N 0.00000000000000000000 8 500.00 0.20000000000000000000 500.00 0.20000000000000000000 Total General Expenses \N \N 2917 4 29 mfgadmin 28 0 T -1 0.00 15000.00 0.00 0.00 0.00 \N \N \N \N \N \N 1000.00 \N 1000.00 \N Net Income \N \N 2918 4 29 mfgadmin 1 0 G 3 0.00 15500.00 0.00 0.00 0.00 \N 0.75609756097560975610 \N \N 0.00000000000000000000 -1 1500.00 0.60000000000000000000 1500.00 0.60000000000000000000 \N \N \N 2919 4 29 mfgadmin 2 1 G 4 0.00 20500.00 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 2500.00 1.00000000000000000000 2500.00 1.00000000000000000000 \N \N \N 2920 4 29 mfgadmin 3 2 I 2 \N 20500.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 2500.00 1.00000000000000000000 2500.00 1.00000000000000000000 \N \N \N 2921 4 29 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2922 4 29 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2923 4 29 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2924 4 46 mfgadmin 1 0 G 3 0.00 14000.00 0.00 0.00 0.00 \N 0.77777777777777777778 \N \N 0.00000000000000000000 -1 11000.00 0.91666666666666666667 11000.00 0.91666666666666666667 \N \N \N 2925 4 46 mfgadmin 2 1 G 4 0.00 18000.00 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 12000.00 1.00000000000000000000 12000.00 1.00000000000000000000 \N \N \N 2926 4 46 mfgadmin 3 2 I 2 \N 18000.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 12000.00 1.00000000000000000000 12000.00 1.00000000000000000000 \N \N \N 2927 4 46 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 2928 4 46 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 2929 4 46 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2930 4 46 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2931 4 46 mfgadmin 9 1 G 5 0.00 4000.00 0.00 0.00 0.00 \N 0.22222222222222222222 \N \N 0.00000000000000000000 3 1000.00 0.08333333333333333333 1000.00 0.08333333333333333333 \N \N \N 2932 4 46 mfgadmin 10 2 I 246 \N 4000.00 \N \N 0.00 \N 0.22222222222222222222 \N \N 0.00000000000000000000 5 1000.00 0.08333333333333333333 1000.00 0.08333333333333333333 \N \N \N 2933 4 46 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 2934 4 46 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2935 4 46 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2936 4 46 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2937 4 46 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2938 4 46 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2939 4 46 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2940 4 46 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2941 4 46 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2942 4 46 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2943 4 46 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2944 4 46 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 2945 4 46 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 2946 4 46 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 2947 4 46 mfgadmin 12 1 T -1 \N 14000.00 \N \N 0.00 \N 0.77777777777777777778 \N \N 0.00000000000000000000 3 11000.00 0.91666666666666666667 11000.00 0.91666666666666666667 Total Net Revenue \N \N 2948 4 46 mfgadmin 8 2 T -1 \N 18000.00 \N \N \N \N 1.00000000000000000000 \N \N \N 4 12000.00 1.00000000000000000000 12000.00 1.00000000000000000000 Total Sales \N \N 2949 4 46 mfgadmin 11 2 T -1 \N 4000.00 \N \N 0.00 \N 0.22222222222222222222 \N \N 0.00000000000000000000 5 1000.00 0.08333333333333333333 1000.00 0.08333333333333333333 Total Cost of Goods Sold \N \N 2950 4 46 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 Total General Expenses \N \N 2951 4 46 mfgadmin 28 0 T -1 0.00 14000.00 0.00 0.00 0.00 \N \N \N \N \N \N 11000.00 \N 11000.00 \N Net Income \N \N 2952 4 48 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2953 4 48 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2954 4 48 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2955 13 53 mfgadmin 61 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 2956 4 48 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2957 4 48 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2958 4 48 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2959 4 48 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 2960 4 48 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 2961 4 48 mfgadmin 12 1 T -1 \N 3000.00 \N \N 0.00 \N 0.50000000000000000000 \N \N 0.00000000000000000000 3 3000.00 0.50000000000000000000 3000.00 0.50000000000000000000 Total Net Revenue \N \N 2962 4 48 mfgadmin 8 2 T -1 \N 6000.00 \N \N \N \N 1.00000000000000000000 \N \N \N 4 6000.00 1.00000000000000000000 6000.00 1.00000000000000000000 Total Sales \N \N 2963 4 48 mfgadmin 11 2 T -1 \N 3000.00 \N \N 0.00 \N 0.50000000000000000000 \N \N 0.00000000000000000000 5 3000.00 0.50000000000000000000 3000.00 0.50000000000000000000 Total Cost of Goods Sold \N \N 2964 13 37 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3163 4 48 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 2965 4 48 mfgadmin 28 0 T -1 0.00 3000.00 0.00 0.00 0.00 \N \N \N \N \N \N 3000.00 \N 3000.00 \N Net Income \N \N 2966 4 48 mfgadmin 1 0 G 3 0.00 3000.00 0.00 0.00 0.00 \N 0.50000000000000000000 \N \N 0.00000000000000000000 -1 3000.00 0.50000000000000000000 3000.00 0.50000000000000000000 \N \N \N 2967 4 48 mfgadmin 2 1 G 4 0.00 6000.00 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 6000.00 1.00000000000000000000 6000.00 1.00000000000000000000 \N \N \N 2968 4 48 mfgadmin 3 2 I 2 \N 6000.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 6000.00 1.00000000000000000000 6000.00 1.00000000000000000000 \N \N \N 2969 4 48 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2970 4 48 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2971 4 48 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2972 4 48 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2973 4 48 mfgadmin 9 1 G 5 0.00 3000.00 0.00 0.00 0.00 \N 0.50000000000000000000 \N \N 0.00000000000000000000 3 3000.00 0.50000000000000000000 3000.00 0.50000000000000000000 \N \N \N 2974 4 48 mfgadmin 10 2 I 246 \N 3000.00 \N \N 0.00 \N 0.50000000000000000000 \N \N 0.00000000000000000000 5 3000.00 0.50000000000000000000 3000.00 0.50000000000000000000 \N \N \N 2975 4 48 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 2976 4 48 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2977 4 48 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2978 4 48 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2979 4 48 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2980 4 48 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2981 4 47 mfgadmin 1 0 G 3 0.00 6000.00 0.00 0.00 0.00 \N 0.66666666666666666667 \N \N 0.00000000000000000000 -1 6000.00 0.66666666666666666667 6000.00 0.66666666666666666667 \N \N \N 2982 4 47 mfgadmin 2 1 G 4 0.00 9000.00 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 9000.00 1.00000000000000000000 9000.00 1.00000000000000000000 \N \N \N 2983 4 47 mfgadmin 3 2 I 2 \N 9000.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 9000.00 1.00000000000000000000 9000.00 1.00000000000000000000 \N \N \N 2984 4 47 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2985 4 47 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 2986 4 47 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2987 4 47 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2988 4 47 mfgadmin 9 1 G 5 0.00 3000.00 0.00 0.00 0.00 \N 0.33333333333333333333 \N \N 0.00000000000000000000 3 3000.00 0.33333333333333333333 3000.00 0.33333333333333333333 \N \N \N 2989 4 47 mfgadmin 10 2 I 246 \N 3000.00 \N \N 0.00 \N 0.33333333333333333333 \N \N 0.00000000000000000000 5 3000.00 0.33333333333333333333 3000.00 0.33333333333333333333 \N \N \N 2990 4 47 mfgadmin 13 0 G 7 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N -1 1000.00 \N 1000.00 \N \N \N \N 2991 4 47 mfgadmin 14 1 G 8 0.00 1000.00 0.00 0.00 0.00 \N 0.11111111111111111111 \N \N 0.00000000000000000000 7 1000.00 0.11111111111111111111 1000.00 0.11111111111111111111 \N \N \N 2992 4 47 mfgadmin 15 2 I 5 \N 1000.00 \N \N 0.00 \N 0.11111111111111111111 \N \N 0.00000000000000000000 8 1000.00 0.11111111111111111111 1000.00 0.11111111111111111111 \N \N \N 2993 4 47 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2994 4 47 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2995 4 47 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2996 4 47 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2997 4 47 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2998 4 47 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 2999 4 47 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 3000 4 47 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 3001 4 47 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 3002 4 47 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 3003 4 47 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 3004 4 47 mfgadmin 12 1 T -1 \N 6000.00 \N \N 0.00 \N 0.66666666666666666667 \N \N 0.00000000000000000000 3 6000.00 0.66666666666666666667 6000.00 0.66666666666666666667 Total Net Revenue \N \N 3005 13 53 mfgadmin 65 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N M 3006 4 47 mfgadmin 8 2 T -1 \N 9000.00 \N \N \N \N 1.00000000000000000000 \N \N \N 4 9000.00 1.00000000000000000000 9000.00 1.00000000000000000000 Total Sales \N \N 3007 4 47 mfgadmin 11 2 T -1 \N 3000.00 \N \N 0.00 \N 0.33333333333333333333 \N \N 0.00000000000000000000 5 3000.00 0.33333333333333333333 3000.00 0.33333333333333333333 Total Cost of Goods Sold \N \N 3008 4 47 mfgadmin 27 2 T -1 \N 1000.00 \N \N 0.00 \N 0.11111111111111111111 \N \N 0.00000000000000000000 8 1000.00 0.11111111111111111111 1000.00 0.11111111111111111111 Total General Expenses \N \N 3009 4 47 mfgadmin 28 0 T -1 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N \N 5000.00 \N 5000.00 \N Net Income \N \N 3010 4 41 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3011 4 41 mfgadmin 7 2 I 3 \N 7.13 \N \N 0.00 \N 0.000003852090050325314407 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3012 4 40 mfgadmin 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000002858980495446110085 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3013 13 40 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3014 4 41 mfgadmin 9 1 G 5 0.00 656279.89 0.00 0.00 0.00 \N 0.35456511002771273541 \N \N 0.00000000000000000000 3 31276.36 0.30642651579740028369 31276.36 0.30642651579740028369 \N \N \N 3015 4 41 mfgadmin 10 2 I 246 \N 656279.89 \N \N 0.00 \N 0.35456511002771273541 \N \N 0.00000000000000000000 5 31276.36 0.30642651579740028369 31276.36 0.30642651579740028369 \N \N \N 3016 4 41 mfgadmin 13 0 G 7 0.00 15333.23 3417.00 0.00 0.00 \N \N \N \N \N -1 11565.62 \N 11565.62 \N \N \N \N 3017 4 41 mfgadmin 14 1 G 8 0.00 15333.23 3417.00 0.00 0.00 \N 0.00828400879696348115 \N \N 0.00000000000000000000 7 11565.62 0.11331282283605664691 11565.62 0.11331282283605664691 \N \N \N 3018 4 41 mfgadmin 15 2 I 5 \N 12338.78 \N \N 0.00 \N 0.00666621201558947867 \N \N 0.00000000000000000000 8 8840.00 0.08660887646928921741 8840.00 0.08660887646928921741 \N \N \N 3019 4 41 mfgadmin 16 2 I 235 \N 3417.00 3417.00 0.00 \N \N 0.00184608579270148658 3417.0000000000000000 0.00000000000000000000 \N 8 3417.00 0.03347766186601371673 3417.00 0.03347766186601371673 \N \N \N 3020 4 41 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3021 4 41 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3022 4 41 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3023 4 41 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3024 4 41 mfgadmin 21 2 I 11 \N -521.55 \N \N 0.00 \N -0.00028177525466299688 \N \N 0.00000000000000000000 8 -691.38 -0.00677371549924628723 -691.38 -0.00677371549924628723 \N \N \N 3025 4 41 mfgadmin 22 2 I 9 \N 94.00 \N \N 0.00 \N 0.000050784917914527286717 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3026 4 41 mfgadmin 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000002701325420985493974 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3027 4 41 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3028 4 41 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 3029 4 41 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 3030 4 41 mfgadmin 12 1 T -1 \N 1194663.34 \N \N 0.00 \N 0.64543488997228726459 \N \N 0.00000000000000000000 3 70791.70 0.69357348420259971631 70791.70 0.69357348420259971631 Total Net Revenue \N \N 3031 4 41 mfgadmin 8 2 T -1 \N 1850943.23 \N \N \N \N 1.00000000000000000000 \N \N \N 4 102068.06 1.00000000000000000000 102068.06 1.00000000000000000000 Total Sales \N \N 3032 4 41 mfgadmin 11 2 T -1 \N 656279.89 \N \N 0.00 \N 0.35456511002771273541 \N \N 0.00000000000000000000 5 31276.36 0.30642651579740028369 31276.36 0.30642651579740028369 Total Cost of Goods Sold \N \N 3033 4 41 mfgadmin 27 2 T -1 \N 15333.23 \N \N 0.00 \N 0.00828400879696348115 \N \N 0.00000000000000000000 8 11565.62 0.11331282283605664691 11565.62 0.11331282283605664691 Total General Expenses \N \N 3034 4 41 mfgadmin 28 0 T -1 0.00 1179330.11 -3417.00 0.00 0.00 \N \N \N \N \N \N 59226.08 \N 59226.08 \N Net Income \N \N 3035 4 41 mfgadmin 1 0 G 3 0.00 1194663.34 0.00 0.00 0.00 \N 0.64543488997228726459 \N \N 0.00000000000000000000 -1 70791.70 0.69357348420259971631 70791.70 0.69357348420259971631 \N \N \N 3036 4 41 mfgadmin 2 1 G 4 0.00 1850943.23 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 102068.06 1.00000000000000000000 102068.06 1.00000000000000000000 \N \N \N 3037 4 41 mfgadmin 3 2 I 2 \N 1850483.64 \N \N 0.00 \N 0.99975169956995385536 \N \N 0.00000000000000000000 4 101939.10 0.99873652933150683965 101939.10 0.99873652933150683965 \N \N \N 3038 4 41 mfgadmin 4 2 I 218 \N 239.46 \N \N 0.00 \N 0.00012937187706183728 \N \N 0.00000000000000000000 4 96.96 0.00094995437358170617 96.96 \N \N \N \N 3039 4 41 mfgadmin 5 2 I 219 \N 213.00 \N \N 0.00 \N 0.00011507646293398204 \N \N 0.00000000000000000000 4 32.00 0.00031351629491145418 32.00 \N \N \N \N 3040 4 40 mfgadmin 1 0 G 3 0.00 1123871.64 0.00 0.00 0.00 \N 0.64262541962900645447 \N \N 0.00000000000000000000 -1 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 \N \N \N 3041 4 40 mfgadmin 2 1 G 4 0.00 1748875.17 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 3042 4 40 mfgadmin 3 2 I 2 \N 1748544.54 \N \N 0.00 \N 0.99981094705575813052 \N \N 0.00000000000000000000 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 3043 4 40 mfgadmin 4 2 I 218 \N 142.50 \N \N 0.00 \N 0.000081480944120214137410 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 3044 4 40 mfgadmin 5 2 I 219 \N 181.00 \N \N 0.00 \N 0.00010349509393514919 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 3045 4 40 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3046 4 40 mfgadmin 7 2 I 3 \N 7.13 \N \N 0.00 \N 0.000004076906186506152981 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3047 4 40 mfgadmin 9 1 G 5 0.00 625003.53 0.00 0.00 0.00 \N 0.35737458037099354553 \N \N 0.00000000000000000000 3 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 3048 4 40 mfgadmin 10 2 I 246 \N 625003.53 \N \N 0.00 \N 0.35737458037099354553 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 3049 4 40 mfgadmin 13 0 G 7 0.00 3767.61 0.00 0.00 0.00 \N \N \N \N \N -1 100.00 \N 100.00 \N \N \N \N 3050 4 40 mfgadmin 14 1 G 8 0.00 3767.61 0.00 0.00 0.00 \N 0.00215430470088954376 \N \N 0.00000000000000000000 7 100.00 0.00200000000000000000 100.00 0.00200000000000000000 \N \N \N 3051 4 40 mfgadmin 15 2 I 5 \N 3498.78 \N \N 0.00 \N 0.00200058875557138821 \N \N 0.00000000000000000000 8 100.00 0.00200000000000000000 100.00 0.00200000000000000000 \N \N \N 3052 4 40 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3053 4 40 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3054 4 40 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3055 4 40 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3056 4 40 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3057 4 40 mfgadmin 21 2 I 11 \N 169.83 \N \N 0.00 \N 0.000097108131508322575133 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3058 4 40 mfgadmin 22 2 I 9 \N 94.00 \N \N 0.00 \N 0.000053748833314386869590 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3059 11 42 mfgadmin 32 3 I 51 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3060 4 40 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3061 4 40 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 3062 4 40 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 3063 4 40 mfgadmin 12 1 T -1 \N 1123871.64 \N \N 0.00 \N 0.64262541962900645447 \N \N 0.00000000000000000000 3 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 Total Net Revenue \N \N 3064 4 40 mfgadmin 8 2 T -1 \N 1748875.17 \N \N \N \N 1.00000000000000000000 \N \N \N 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 Total Sales \N \N 3065 4 40 mfgadmin 11 2 T -1 \N 625003.53 \N \N 0.00 \N 0.35737458037099354553 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 Total Cost of Goods Sold \N \N 3066 4 40 mfgadmin 27 2 T -1 \N 3767.61 \N \N 0.00 \N 0.00215430470088954376 \N \N 0.00000000000000000000 8 100.00 0.00200000000000000000 100.00 0.00200000000000000000 Total General Expenses \N \N 3067 4 40 mfgadmin 28 0 T -1 0.00 1120104.03 0.00 0.00 0.00 \N \N \N \N \N \N 34900.00 \N 34900.00 \N Net Income \N \N 3068 4 39 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 3069 4 39 mfgadmin 12 1 T -1 \N 1088871.64 \N \N 0.00 \N 0.64093681468073960961 \N \N 0.00000000000000000000 3 70407.55 0.69678896871743120664 70407.55 0.69678896871743120664 Total Net Revenue \N \N 3070 4 39 mfgadmin 8 2 T -1 \N 1698875.17 \N \N \N \N 1.00000000000000000000 \N \N \N 4 101045.73 1.00000000000000000000 101045.73 1.00000000000000000000 Total Sales \N \N 3071 4 39 mfgadmin 11 2 T -1 \N 610003.53 \N \N 0.00 \N 0.35906318531926039039 \N \N 0.00000000000000000000 5 30638.18 0.30321103128256879336 30638.18 0.30321103128256879336 Total Cost of Goods Sold \N \N 3072 4 39 mfgadmin 27 2 T -1 \N 3667.61 \N \N 0.00 \N 0.00215884607931493872 \N \N 0.00000000000000000000 8 257.83 0.00255161697579897735 257.83 0.00255161697579897735 Total General Expenses \N \N 3073 4 39 mfgadmin 28 0 T -1 0.00 1085204.03 0.00 0.00 0.00 \N \N \N \N \N \N 70149.72 \N 70149.72 \N Net Income \N \N 3074 4 39 mfgadmin 1 0 G 3 0.00 1088871.64 0.00 0.00 0.00 \N 0.64093681468073960961 \N \N 0.00000000000000000000 -1 70407.55 0.69678896871743120664 70407.55 0.69678896871743120664 \N \N \N 3075 4 39 mfgadmin 2 1 G 4 0.00 1698875.17 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 101045.73 1.00000000000000000000 101045.73 1.00000000000000000000 \N \N \N 3076 4 39 mfgadmin 3 2 I 2 \N 1698544.54 \N \N 0.00 \N 0.99980538299350151783 \N \N 0.00000000000000000000 4 100950.00 0.99905260717103038397 100950.00 0.99905260717103038397 \N \N \N 3077 4 39 mfgadmin 4 2 I 218 \N 142.50 \N \N 0.00 \N 0.000083879029204953298599 \N \N 0.00000000000000000000 4 47.50 0.00047008418861440261 47.50 \N \N \N \N 3078 4 39 mfgadmin 5 2 I 219 \N 181.00 \N \N 0.00 \N 0.00010654108270944945 \N \N 0.00000000000000000000 4 45.00 0.00044534291552943405 45.00 \N \N \N \N 3079 4 39 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3080 4 39 mfgadmin 7 2 I 3 \N 7.13 \N \N 0.00 \N 0.000004196894584079417677 \N \N 0.00000000000000000000 4 3.23 0.000031965724825779377318 3.23 0.000031965724825779377318 \N \N \N 3081 4 39 mfgadmin 9 1 G 5 0.00 610003.53 0.00 0.00 0.00 \N 0.35906318531926039039 \N \N 0.00000000000000000000 3 30638.18 0.30321103128256879336 30638.18 0.30321103128256879336 \N \N \N 3082 13 37 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 3164 4 39 mfgadmin 10 2 I 246 \N 610003.53 \N \N 0.00 \N 0.35906318531926039039 \N \N 0.00000000000000000000 5 30638.18 0.30321103128256879336 30638.18 0.30321103128256879336 \N \N \N 3083 4 39 mfgadmin 13 0 G 7 0.00 3667.61 0.00 0.00 0.00 \N \N \N \N \N -1 257.83 \N 257.83 \N \N \N \N 3084 4 39 mfgadmin 14 1 G 8 0.00 3667.61 0.00 0.00 0.00 \N 0.00215884607931493872 \N \N 0.00000000000000000000 7 257.83 0.00255161697579897735 257.83 0.00255161697579897735 \N \N \N 3085 13 37 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3086 13 37 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3087 13 37 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3088 13 37 mfgadmin 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3089 13 37 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -149906.00 \N -149906.00 \N \N \N \N 3090 13 37 mfgadmin 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -149906.00 \N -149906.00 \N \N \N \N 3091 13 37 mfgadmin 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3092 13 37 mfgadmin 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3093 13 37 mfgadmin 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3094 13 37 mfgadmin 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3095 13 37 mfgadmin 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3096 13 37 mfgadmin 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3097 13 37 mfgadmin 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3098 13 37 mfgadmin 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3099 13 37 mfgadmin 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3100 13 37 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 501011.22 \N 501011.22 \N \N \N \N 3101 13 37 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 501011.22 \N 501011.22 \N \N \N \N 3102 13 37 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 351105.22 \N 351105.22 \N \N \N \N 3103 13 37 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 351105.22 \N 351105.22 \N \N \N \N 3104 13 37 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3105 13 37 mfgadmin 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3106 13 37 mfgadmin 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3107 13 37 mfgadmin 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3108 13 37 mfgadmin 30 3 I 128 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3109 13 37 mfgadmin 31 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3110 13 37 mfgadmin 32 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3111 13 37 mfgadmin 33 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3112 13 40 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 3113 13 40 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 3114 13 40 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3115 13 40 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 3116 13 40 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3117 13 40 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3118 13 40 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 3119 13 40 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3120 13 40 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3121 13 40 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3122 13 40 jsmith 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 3123 13 40 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -100.00 \N -100.00 \N \N \N \N 3124 13 40 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 -100.00 \N -100.00 \N \N \N \N 3125 13 39 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3126 13 39 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3127 13 39 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 169210.92 \N 169210.92 \N \N \N \N 3128 13 39 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 210771.14 \N 210771.14 \N \N \N \N 3129 13 39 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3130 13 39 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 111.50 \N 111.50 \N \N \N \N 3131 13 39 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3132 13 37 mfgadmin 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3133 13 37 mfgadmin 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3134 13 37 mfgadmin 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3135 13 37 mfgadmin 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3136 13 37 mfgadmin 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3137 13 37 mfgadmin 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3138 13 37 mfgadmin 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3139 13 37 mfgadmin 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3140 13 37 mfgadmin 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3141 13 37 mfgadmin 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3142 13 37 mfgadmin 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3143 13 37 mfgadmin 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3144 13 37 mfgadmin 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3145 13 37 mfgadmin 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3146 13 37 mfgadmin 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3147 13 37 mfgadmin 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3148 13 37 mfgadmin 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3149 13 37 mfgadmin 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3150 13 37 mfgadmin 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3151 13 37 mfgadmin 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -501011.22 \N -501011.22 \N \N \N \N 3152 13 37 mfgadmin 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 501011.22 \N 501011.22 \N \N \N \N 3153 13 37 mfgadmin 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3154 13 37 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 351105.22 \N 351105.22 \N \N \N \N 3155 13 37 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3156 13 37 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 3157 13 37 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3158 13 37 mfgadmin 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -149906.00 \N -149906.00 \N \N \N \N 3159 13 37 mfgadmin 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3160 13 37 mfgadmin 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 3161 13 37 mfgadmin 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 3162 13 37 mfgadmin 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 501011.22 \N 501011.22 \N \N \N \N 3165 13 37 mfgadmin 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3166 13 37 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 3167 13 37 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3168 13 37 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3169 13 37 mfgadmin 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3170 13 37 mfgadmin 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3171 13 37 mfgadmin 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 501011.22 \N 501011.22 \N \N \N \N 3172 13 37 mfgadmin 68 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 3173 13 39 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3174 13 39 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3175 13 39 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3176 13 39 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3177 13 39 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 45.43 \N 45.43 \N \N \N \N 3178 13 39 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3179 13 39 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 45.43 \N 45.43 \N \N \N \N 3180 13 39 jsmith 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3181 13 39 jsmith 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3182 13 39 jsmith 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3183 13 39 jsmith 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 3184 13 39 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3185 13 39 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3186 13 39 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3187 13 39 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3188 13 39 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3189 13 39 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3190 13 39 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3191 13 39 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3192 13 39 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3193 13 39 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3194 13 39 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3195 13 39 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3196 13 39 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3197 13 39 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3198 13 39 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3199 13 39 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3200 13 39 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3201 13 39 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3202 13 39 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3203 13 39 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 99015.77 \N 149015.77 \N \N \N \N 3204 13 39 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 -149015.77 \N -149015.77 \N \N \N \N 3205 13 39 jsmith 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 25000.00 \N \N \N \N \N \N 3206 13 39 jsmith 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 25000.00 \N \N \N \N \N \N 3207 13 39 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 -99015.77 \N -99015.77 \N \N \N \N 3208 13 39 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 -99015.77 \N -99015.77 \N \N \N \N 3209 13 39 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 70149.72 \N 70149.72 \N \N \N \N 3210 13 39 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3211 13 39 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 3212 13 39 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3213 13 39 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 169210.92 \N 169210.92 \N \N \N \N 3214 13 39 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3215 13 39 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 45.43 \N 45.43 \N \N \N \N 3216 13 39 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 3217 13 39 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 3218 13 39 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3219 13 39 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 3220 13 39 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3221 13 39 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3222 13 39 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 3223 13 39 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3224 13 39 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3225 13 39 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3226 13 39 jsmith 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 50000.00 \N \N \N \N 3227 13 39 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -99015.77 \N -99015.77 \N \N \N \N 3228 13 39 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 -99015.77 \N -99015.77 \N \N \N \N 3229 13 39 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 70149.72 \N 70149.72 \N \N \N \N 3230 13 39 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 70149.72 \N 70149.72 \N \N \N \N 3231 13 39 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3232 13 39 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3233 13 39 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3234 13 39 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3235 13 38 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3236 13 38 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3237 13 38 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3238 13 38 jsmith 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3239 13 38 jsmith 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3240 13 38 jsmith 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3241 13 38 jsmith 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 3242 13 38 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3243 13 38 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3244 13 38 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3245 13 38 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3246 13 38 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3247 13 38 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3248 13 38 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3249 13 38 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3250 13 38 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3251 13 38 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3252 13 38 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3253 13 38 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3254 13 38 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3255 13 38 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3256 13 38 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3257 13 38 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3258 13 38 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3259 13 38 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3260 13 38 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3261 13 38 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -50000.00 \N -50000.00 \N \N \N \N 3262 13 38 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 50000.00 \N 50000.00 \N \N \N \N 3263 13 38 jsmith 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 3264 13 38 jsmith 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 3265 13 38 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 50000.00 \N 50000.00 \N \N \N \N 3266 13 38 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 50000.00 \N 50000.00 \N \N \N \N 3267 13 38 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 35000.00 \N 35000.00 \N \N \N \N 3268 13 38 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3269 13 38 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 3270 13 38 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3271 13 38 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 3272 13 38 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3273 13 38 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3274 13 38 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 3275 13 38 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 3276 13 38 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3277 13 38 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 3278 13 38 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3279 13 38 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3280 13 38 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 3281 13 38 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3282 13 38 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3283 13 38 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3284 13 38 jsmith 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 3285 13 38 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 50000.00 \N 50000.00 \N \N \N \N 3286 13 38 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 50000.00 \N 50000.00 \N \N \N \N 3287 13 38 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 35000.00 \N 35000.00 \N \N \N \N 3288 13 38 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 35000.00 \N 35000.00 \N \N \N \N 3289 13 38 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3290 13 38 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3291 13 38 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3292 13 38 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3293 13 38 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3294 13 38 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3295 13 38 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -15000.00 \N -15000.00 \N \N \N \N 3296 13 38 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 3297 13 38 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3298 13 38 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3299 13 38 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3300 13 38 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3301 13 38 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3302 13 38 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3303 13 38 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3304 13 38 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3305 13 37 jsmith 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3306 13 37 jsmith 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3307 13 37 jsmith 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3308 13 37 jsmith 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3309 13 37 jsmith 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3310 13 37 jsmith 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3311 13 37 jsmith 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3312 13 37 jsmith 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3313 13 37 jsmith 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3314 13 37 jsmith 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3315 13 37 jsmith 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3316 13 37 jsmith 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3317 13 37 jsmith 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3318 13 37 jsmith 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3319 13 37 jsmith 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3320 13 37 jsmith 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3321 13 37 jsmith 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3322 13 37 jsmith 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3323 13 37 jsmith 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -501011.22 \N -501011.22 \N \N \N \N 3324 13 37 jsmith 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 501011.22 \N 501011.22 \N \N \N \N 3325 13 37 jsmith 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 3326 13 37 jsmith 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 3327 13 37 jsmith 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 501011.22 \N 501011.22 \N \N \N \N 3328 13 37 jsmith 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 501011.22 \N 501011.22 \N \N \N \N 3329 13 37 jsmith 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 351105.22 \N 351105.22 \N \N \N \N 3330 13 37 jsmith 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3331 13 37 jsmith 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 3332 13 37 jsmith 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3333 13 37 jsmith 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -149906.00 \N -149906.00 \N \N \N \N 3334 13 37 jsmith 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3335 13 37 jsmith 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3336 13 37 jsmith 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 3337 13 37 jsmith 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 3338 13 37 jsmith 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3339 13 37 jsmith 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 3340 13 37 jsmith 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3341 13 37 jsmith 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3342 13 37 jsmith 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 3343 13 37 jsmith 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3344 13 37 jsmith 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3345 13 37 jsmith 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3346 13 37 jsmith 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 3347 13 37 jsmith 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 501011.22 \N 501011.22 \N \N \N \N 3348 13 37 jsmith 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 501011.22 \N 501011.22 \N \N \N \N 3349 13 37 jsmith 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 351105.22 \N 351105.22 \N \N \N \N 3350 13 37 jsmith 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 351105.22 \N 351105.22 \N \N \N \N 3351 13 37 jsmith 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3352 13 37 jsmith 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3353 13 37 jsmith 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3354 13 37 jsmith 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3355 11 37 jsmith 1 0 G 44 0.00 2030124.02 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2030124.02 \N \N \N \N 3356 11 37 jsmith 2 1 G 45 0.00 2029124.02 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 2029124.02 \N \N \N \N 3357 11 37 jsmith 3 2 I 65 \N 1954509.62 \N \N \N \N 0.96322827029567172538 \N \N \N 45 \N \N 1954509.62 0.96322827029567172538 \N \N \N 3358 11 37 jsmith 4 2 I 242 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 3359 11 37 jsmith 5 2 I 243 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 3360 11 37 jsmith 6 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3361 11 37 jsmith 7 2 I 67 \N 74666.47 \N \N \N \N \N \N \N \N 45 \N \N 74666.47 \N \N \N \N 3362 11 37 jsmith 8 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3363 11 37 jsmith 9 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3364 11 37 jsmith 10 2 I 70 \N -11.07 \N \N \N \N \N \N \N \N 45 \N \N -11.07 \N \N \N \N 3365 11 37 jsmith 11 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3366 11 37 jsmith 12 2 I 72 \N -41.00 \N \N \N \N \N \N \N \N 45 \N \N -41.00 \N \N \N \N 3367 11 37 jsmith 13 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3368 11 37 jsmith 14 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3369 11 37 jsmith 15 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3370 11 37 jsmith 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 3371 11 37 jsmith 18 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 3372 11 37 jsmith 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3373 11 37 jsmith 23 0 G 36 0.00 2030124.02 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2030124.02 \N \N \N \N 3374 11 37 jsmith 24 1 G 37 0.00 6612.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6612.58 \N \N \N \N 3375 11 37 jsmith 25 2 G 38 0.00 1612.58 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1612.58 \N \N \N \N 3376 11 37 jsmith 26 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 3377 11 37 jsmith 27 3 I 46 \N 126.87 \N \N \N \N \N \N \N \N 38 \N \N 126.87 \N \N \N \N 3378 11 37 jsmith 28 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3379 11 37 jsmith 29 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 3380 11 37 jsmith 30 3 I 241 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 0.00000000000000000000 \N \N \N 3381 11 37 jsmith 31 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 3382 11 37 jsmith 32 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3383 11 37 jsmith 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 3384 11 37 jsmith 35 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 3385 11 37 jsmith 38 1 G 40 0.00 2023511.44 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 2023511.44 \N \N \N \N 3386 11 37 jsmith 39 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 3387 11 37 jsmith 40 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 3388 11 37 jsmith 45 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3389 13 37 jsmith 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3390 13 37 jsmith 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3391 11 37 jsmith 42 2 G 42 \N 980054.31 \N \N \N \N \N \N \N \N 40 \N \N 980054.31 \N \N \N \N 3392 11 37 jsmith 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 3393 11 37 jsmith 44 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 3394 11 37 jsmith 22 1 T -1 \N 2030124.02 \N \N \N \N \N \N \N \N 44 \N \N 2030124.02 \N \N \N \N 3395 11 37 jsmith 16 2 T -1 \N 2029124.02 \N \N \N \N \N \N \N \N 45 \N \N 2029124.02 \N \N \N \N 3396 11 37 jsmith 19 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 3397 11 37 jsmith 21 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 3398 11 37 jsmith 48 1 T -1 \N 2030124.02 \N \N \N \N \N \N \N \N 36 \N \N 2030124.02 \N \N \N \N 3399 11 37 jsmith 37 2 T -1 \N 6612.58 \N \N \N \N \N \N \N \N 37 \N \N 6612.58 \N \N \N \N 3400 11 37 jsmith 33 3 T -1 \N 1612.58 \N \N \N \N \N \N \N \N 38 \N \N 1612.58 \N \N \N \N 3401 11 37 jsmith 36 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 3402 11 37 jsmith 47 2 T -1 \N 2023511.44 \N \N \N \N \N \N \N \N 40 \N \N 2023511.44 \N \N \N \N 3403 11 37 jsmith 41 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 3404 11 37 jsmith 46 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 3405 11 37 jsmith 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 3406 13 37 jsmith 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -149906.00 \N -149906.00 \N \N \N \N 3407 13 37 jsmith 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -149906.00 \N -149906.00 \N \N \N \N 3408 13 37 jsmith 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3409 13 37 jsmith 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3410 13 37 jsmith 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3411 13 37 jsmith 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3412 13 37 jsmith 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3413 13 37 jsmith 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3414 13 37 jsmith 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3415 13 37 jsmith 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3416 13 37 jsmith 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3417 13 37 jsmith 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3418 13 37 jsmith 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3419 13 37 jsmith 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3420 13 37 jsmith 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3421 13 37 jsmith 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3422 13 37 jsmith 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 3423 13 37 jsmith 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3424 11 55 jsmith 18 2 I 76 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 3425 11 55 jsmith 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3426 11 55 jsmith 23 0 G 36 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 3427 11 55 jsmith 24 1 G 37 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 3428 11 55 jsmith 25 2 G 38 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 3429 11 55 jsmith 26 3 I 47 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3430 11 55 jsmith 27 3 I 46 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3431 11 55 jsmith 28 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3432 11 55 jsmith 29 3 I 49 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3433 11 55 jsmith 30 3 I 241 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 0.00000000000000000000 \N \N \N 3434 11 55 jsmith 31 3 I 50 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3435 11 55 jsmith 32 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3436 11 55 jsmith 34 2 G 39 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 3437 11 55 jsmith 35 3 I 140 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 3438 11 55 jsmith 38 1 G 40 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 3439 11 55 jsmith 39 2 G 41 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 0.00 \N \N \N \N 3440 11 55 jsmith 40 3 I 52 \N 0.00 \N \N \N \N \N \N \N \N 41 \N \N 0.00 \N \N \N \N 3441 11 55 jsmith 42 2 G 42 \N 0.00 \N \N \N \N \N \N \N \N 40 \N \N 0.00 \N \N \N \N 3442 11 55 jsmith 43 2 G 43 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 0.00 \N \N \N \N 3443 11 55 jsmith 44 3 I 63 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3444 11 55 jsmith 45 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3445 11 55 jsmith 22 1 T -1 \N 0.00 \N \N \N \N \N \N \N \N 44 \N \N 0.00 \N \N \N \N 3446 11 55 jsmith 16 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3447 11 55 jsmith 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 3448 11 55 jsmith 21 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 3449 11 55 jsmith 48 1 T -1 \N 0.00 \N \N \N \N \N \N \N \N 36 \N \N 0.00 \N \N \N \N 3450 11 55 jsmith 37 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 37 \N \N 0.00 \N \N \N \N 3451 11 55 jsmith 33 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3452 11 55 jsmith 36 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 3453 11 55 jsmith 47 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 40 \N \N 0.00 \N \N \N \N 3454 11 55 jsmith 41 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 41 \N \N 0.00 \N \N \N \N 3455 11 55 jsmith 46 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3456 11 55 jsmith 1 0 G 44 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 3457 11 55 jsmith 2 1 G 45 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3458 11 55 jsmith 3 2 I 65 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 0.00000000000000000000 \N \N \N 3459 11 55 jsmith 4 2 I 242 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 0.00000000000000000000 \N \N \N 3460 11 55 jsmith 5 2 I 243 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 0.00000000000000000000 \N \N \N 3461 11 55 jsmith 6 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3462 11 55 jsmith 7 2 I 67 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3463 11 55 jsmith 8 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3464 11 55 jsmith 9 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3465 11 55 jsmith 10 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3466 11 55 jsmith 11 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3467 11 55 jsmith 12 2 I 72 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3468 11 55 jsmith 13 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3469 11 55 jsmith 14 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3470 11 55 jsmith 15 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3471 11 55 jsmith 17 1 G 46 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3472 11 55 jsmith 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 3473 11 40 jsmith 38 1 G 40 0.00 2128561.16 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 2128561.16 \N \N \N \N 3474 11 40 jsmith 39 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 3475 11 40 jsmith 40 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 3476 11 40 jsmith 42 2 G 42 \N 1085104.03 \N \N \N \N \N \N \N \N 40 \N \N 1085104.03 \N \N \N \N 3477 11 40 jsmith 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 3478 11 40 jsmith 44 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 3479 11 40 jsmith 22 1 T -1 \N 2135219.17 \N \N \N \N \N \N \N \N 44 \N \N 2135219.17 \N \N \N \N 3480 11 40 jsmith 16 2 T -1 \N 2134219.17 \N \N \N \N \N \N \N \N 45 \N \N 2134219.17 \N \N \N \N 3481 11 40 jsmith 19 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 3482 11 40 jsmith 21 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 3483 11 40 jsmith 48 1 T -1 \N 2135219.17 \N \N \N \N \N \N \N \N 36 \N \N 2135219.17 \N \N \N \N 3484 11 40 jsmith 37 2 T -1 \N 6658.01 \N \N \N \N \N \N \N \N 37 \N \N 6658.01 \N \N \N \N 3485 11 40 jsmith 33 3 T -1 \N 1658.01 \N \N \N \N \N \N \N \N 38 \N \N 1658.01 \N \N \N \N 3486 11 40 jsmith 36 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 3487 11 40 jsmith 47 2 T -1 \N 2128561.16 \N \N \N \N \N \N \N \N 40 \N \N 2128561.16 \N \N \N \N 3488 11 40 jsmith 41 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 3489 11 40 jsmith 46 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 3490 11 40 jsmith 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 3491 11 40 jsmith 1 0 G 44 0.00 2135219.17 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2135219.17 \N \N \N \N 3492 11 40 jsmith 2 1 G 45 0.00 2134219.17 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 2134219.17 \N \N \N \N 3493 11 40 jsmith 3 2 I 65 \N 1855393.85 \N \N \N \N 0.86935487979896647634 \N \N \N 45 \N \N 1855393.85 0.86935487979896647634 \N \N \N 3494 11 40 jsmith 4 2 I 242 \N 25000.00 \N \N \N \N 0.01171388597357599407 \N \N \N 45 \N \N 25000.00 0.01171388597357599407 \N \N \N 3495 11 40 jsmith 5 2 I 243 \N 25000.00 \N \N \N \N 0.01171388597357599407 \N \N \N 45 \N \N 25000.00 0.01171388597357599407 \N \N \N 3496 11 40 jsmith 6 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3497 11 40 jsmith 7 2 I 67 \N 270437.61 \N \N \N \N \N \N \N \N 45 \N \N 270437.61 \N \N \N \N 3498 11 40 jsmith 8 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3499 11 40 jsmith 9 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3500 11 40 jsmith 10 2 I 70 \N -41682.79 \N \N \N \N \N \N \N \N 45 \N \N -41682.79 \N \N \N \N 3501 11 40 jsmith 11 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3502 11 40 jsmith 12 2 I 72 \N 70.50 \N \N \N \N \N \N \N \N 45 \N \N 70.50 \N \N \N \N 3503 11 40 jsmith 13 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3504 11 40 jsmith 14 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3505 11 40 jsmith 15 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3506 11 40 jsmith 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 3507 11 40 jsmith 18 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 3508 11 40 jsmith 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3509 11 40 jsmith 23 0 G 36 0.00 2135219.17 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2135219.17 \N \N \N \N 3510 11 40 jsmith 24 1 G 37 0.00 6658.01 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6658.01 \N \N \N \N 3511 11 40 jsmith 25 2 G 38 0.00 1658.01 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1658.01 \N \N \N \N 3512 11 40 jsmith 26 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 3513 11 40 jsmith 27 3 I 46 \N 172.30 \N \N \N \N \N \N \N \N 38 \N \N 172.30 \N \N \N \N 3514 11 40 jsmith 28 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3515 11 40 jsmith 29 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 3516 11 40 jsmith 30 3 I 241 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 0.00000000000000000000 \N \N \N 3517 11 38 jsmith 1 0 G 44 0.00 2065124.02 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2065124.02 \N \N \N \N 3518 11 38 jsmith 2 1 G 45 0.00 2064124.02 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 2064124.02 \N \N \N \N 3519 11 38 jsmith 3 2 I 65 \N 2004509.62 \N \N \N \N 0.97111878965489680218 \N \N \N 45 \N \N 2004509.62 0.97111878965489680218 \N \N \N 3520 11 38 jsmith 4 2 I 242 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 3521 11 38 jsmith 5 2 I 243 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 3522 11 38 jsmith 6 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3523 11 38 jsmith 7 2 I 67 \N 59666.47 \N \N \N \N \N \N \N \N 45 \N \N 59666.47 \N \N \N \N 3524 11 38 jsmith 8 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3525 11 38 jsmith 9 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3526 11 38 jsmith 10 2 I 70 \N -11.07 \N \N \N \N \N \N \N \N 45 \N \N -11.07 \N \N \N \N 3527 11 38 jsmith 11 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3528 11 40 jsmith 31 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 3529 11 40 jsmith 32 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3530 11 40 jsmith 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 3531 11 40 jsmith 35 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 3532 11 38 jsmith 12 2 I 72 \N -41.00 \N \N \N \N \N \N \N \N 45 \N \N -41.00 \N \N \N \N 3533 11 38 jsmith 13 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3534 11 38 jsmith 14 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3535 11 38 jsmith 15 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3536 11 38 jsmith 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 3537 11 38 jsmith 18 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 3538 11 38 jsmith 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3539 11 38 jsmith 23 0 G 36 0.00 2065124.02 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2065124.02 \N \N \N \N 3540 11 38 jsmith 24 1 G 37 0.00 6612.58 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6612.58 \N \N \N \N 3541 11 38 jsmith 25 2 G 38 0.00 1612.58 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1612.58 \N \N \N \N 3542 11 38 jsmith 26 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 3543 11 38 jsmith 27 3 I 46 \N 126.87 \N \N \N \N \N \N \N \N 38 \N \N 126.87 \N \N \N \N 3544 11 38 jsmith 28 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3545 11 38 jsmith 29 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 3546 11 38 jsmith 30 3 I 241 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 0.00000000000000000000 \N \N \N 3547 11 38 jsmith 31 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 3548 11 38 jsmith 32 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3549 11 38 jsmith 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 3550 11 38 jsmith 35 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 3551 11 38 jsmith 38 1 G 40 0.00 2058511.44 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 2058511.44 \N \N \N \N 3552 11 38 jsmith 39 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 3553 11 38 jsmith 40 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 3554 11 38 jsmith 42 2 G 42 \N 1015054.31 \N \N \N \N \N \N \N \N 40 \N \N 1015054.31 \N \N \N \N 3555 11 38 jsmith 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 3556 11 38 jsmith 44 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 3557 11 38 jsmith 45 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3558 11 38 jsmith 22 1 T -1 \N 2065124.02 \N \N \N \N \N \N \N \N 44 \N \N 2065124.02 \N \N \N \N 3559 11 38 jsmith 16 2 T -1 \N 2064124.02 \N \N \N \N \N \N \N \N 45 \N \N 2064124.02 \N \N \N \N 3560 11 38 jsmith 19 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 3561 11 38 jsmith 21 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 3562 11 38 jsmith 48 1 T -1 \N 2065124.02 \N \N \N \N \N \N \N \N 36 \N \N 2065124.02 \N \N \N \N 3563 11 38 jsmith 37 2 T -1 \N 6612.58 \N \N \N \N \N \N \N \N 37 \N \N 6612.58 \N \N \N \N 3564 11 38 jsmith 33 3 T -1 \N 1612.58 \N \N \N \N \N \N \N \N 38 \N \N 1612.58 \N \N \N \N 3565 11 38 jsmith 36 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 3566 11 38 jsmith 47 2 T -1 \N 2058511.44 \N \N \N \N \N \N \N \N 40 \N \N 2058511.44 \N \N \N \N 3567 11 38 jsmith 41 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 3568 11 38 jsmith 46 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 3569 11 38 jsmith 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 3570 11 40 jsmith 45 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3571 11 39 jsmith 1 0 G 44 0.00 2135319.17 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2135319.17 \N \N \N \N 3572 11 39 jsmith 2 1 G 45 0.00 2134319.17 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 2134319.17 \N \N \N \N 3573 11 39 jsmith 3 2 I 65 \N 1855493.85 \N \N \N \N 0.86936100096032028799 \N \N \N 45 \N \N 1855493.85 0.86936100096032028799 \N \N \N 3574 11 39 jsmith 4 2 I 242 \N 25000.00 \N \N \N \N 0.01171333713879353855 \N \N \N 45 \N \N 25000.00 0.01171333713879353855 \N \N \N 3575 11 39 jsmith 5 2 I 243 \N 25000.00 \N \N \N \N 0.01171333713879353855 \N \N \N 45 \N \N 25000.00 0.01171333713879353855 \N \N \N 3576 11 39 jsmith 6 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3577 11 39 jsmith 7 2 I 67 \N 270437.61 \N \N \N \N \N \N \N \N 45 \N \N 270437.61 \N \N \N \N 3578 11 39 jsmith 8 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3579 11 39 jsmith 9 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3580 11 39 jsmith 10 2 I 70 \N -41682.79 \N \N \N \N \N \N \N \N 45 \N \N -41682.79 \N \N \N \N 3581 11 39 jsmith 11 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3582 11 39 jsmith 12 2 I 72 \N 70.50 \N \N \N \N \N \N \N \N 45 \N \N 70.50 \N \N \N \N 3583 11 39 jsmith 13 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3584 11 39 jsmith 14 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3585 11 39 jsmith 15 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3586 11 39 jsmith 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 3587 11 39 jsmith 18 2 I 76 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 3588 11 39 jsmith 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3589 11 39 jsmith 23 0 G 36 0.00 2135319.17 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 2135319.17 \N \N \N \N 3590 11 39 jsmith 24 1 G 37 0.00 6658.01 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 6658.01 \N \N \N \N 3591 11 39 jsmith 25 2 G 38 0.00 1658.01 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 1658.01 \N \N \N \N 3592 11 39 jsmith 26 3 I 47 \N 262.95 \N \N \N \N \N \N \N \N 38 \N \N 262.95 \N \N \N \N 3593 11 39 jsmith 27 3 I 46 \N 172.30 \N \N \N \N \N \N \N \N 38 \N \N 172.30 \N \N \N \N 3594 11 39 jsmith 28 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3595 11 39 jsmith 29 3 I 49 \N 624.22 \N \N \N \N \N \N \N \N 38 \N \N 624.22 \N \N \N \N 3596 11 39 jsmith 30 3 I 241 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 0.00000000000000000000 \N \N \N 3597 11 39 jsmith 31 3 I 50 \N 598.54 \N \N \N \N \N \N \N \N 38 \N \N 598.54 \N \N \N \N 3598 11 39 jsmith 32 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3599 11 39 jsmith 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 3600 11 39 jsmith 35 3 I 140 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 3601 11 39 jsmith 38 1 G 40 0.00 2128661.16 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 2128661.16 \N \N \N \N 3602 11 39 jsmith 39 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 3603 11 39 jsmith 40 3 I 52 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 3604 11 39 jsmith 42 2 G 42 \N 1085204.03 \N \N \N \N \N \N \N \N 40 \N \N 1085204.03 \N \N \N \N 3605 11 39 jsmith 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 3606 11 39 jsmith 44 3 I 63 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 3607 11 39 jsmith 45 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3608 11 39 jsmith 22 1 T -1 \N 2135319.17 \N \N \N \N \N \N \N \N 44 \N \N 2135319.17 \N \N \N \N 3609 11 39 jsmith 16 2 T -1 \N 2134319.17 \N \N \N \N \N \N \N \N 45 \N \N 2134319.17 \N \N \N \N 3610 11 39 jsmith 19 2 T -1 \N 1000.00 \N \N \N \N \N \N \N \N 46 \N \N 1000.00 \N \N \N \N 3611 11 39 jsmith 21 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 3612 11 39 jsmith 48 1 T -1 \N 2135319.17 \N \N \N \N \N \N \N \N 36 \N \N 2135319.17 \N \N \N \N 3613 11 39 jsmith 37 2 T -1 \N 6658.01 \N \N \N \N \N \N \N \N 37 \N \N 6658.01 \N \N \N \N 3614 11 39 jsmith 33 3 T -1 \N 1658.01 \N \N \N \N \N \N \N \N 38 \N \N 1658.01 \N \N \N \N 3615 11 39 jsmith 36 3 T -1 \N 5000.00 \N \N \N \N \N \N \N \N 39 \N \N 5000.00 \N \N \N \N 3616 11 39 jsmith 47 2 T -1 \N 2128661.16 \N \N \N \N \N \N \N \N 40 \N \N 2128661.16 \N \N \N \N 3617 11 39 jsmith 41 3 T -1 \N 1020000.00 \N \N \N \N \N \N \N \N 41 \N \N 1020000.00 \N \N \N \N 3618 11 39 jsmith 46 3 T -1 \N 23457.13 \N \N \N \N \N \N \N \N 43 \N \N 23457.13 \N \N \N \N 3619 11 39 jsmith 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 3620 4 39 mfgadmin 15 2 I 5 \N 3398.78 \N \N 0.00 \N 0.00200060608337692051 \N \N 0.00000000000000000000 8 -100.00 -0.00098965092339874233 -100.00 -0.00098965092339874233 \N \N \N 3621 4 39 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3622 4 39 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3623 4 39 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3624 4 39 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3625 4 39 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3626 4 39 mfgadmin 21 2 I 11 \N 169.83 \N \N 0.00 \N 0.000099966144069313815446 \N \N 0.00000000000000000000 8 263.83 0.00261099603120290189 263.83 0.00261099603120290189 \N \N \N 3627 4 39 mfgadmin 22 2 I 9 \N 94.00 \N \N 0.00 \N 0.000055330728036951649602 \N \N 0.00000000000000000000 8 94.00 0.00093027186799481779 94.00 0.00093027186799481779 \N \N \N 3628 4 39 mfgadmin 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.000002943123831752747319 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3629 4 39 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 3630 4 39 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 3631 11 41 mfgadmin 1 0 G 44 0.00 2629467.72 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2629467.72 \N \N \N \N 3632 11 41 mfgadmin 2 1 G 45 0.00 2628467.72 0.00 0.00 0.00 \N 0.99961969489399170110 \N \N \N 44 0.00 \N 2628467.72 \N \N \N \N 3633 11 41 mfgadmin 3 2 I 65 \N 2393036.85 \N \N \N \N 0.91008413292101566472 \N \N \N 45 \N \N 2393036.85 0.91008413292101566472 \N \N \N 3634 11 41 mfgadmin 4 2 I 242 \N 24871.50 \N \N \N \N 0.00945875844408540600 \N \N \N 45 \N \N 24871.50 0.00945875844408540600 \N \N \N 3635 11 41 mfgadmin 5 2 I 243 \N 25000.00 \N \N \N \N 0.00950762765020747241 \N \N \N 45 \N \N 25000.00 0.00950762765020747241 \N \N \N 3636 11 41 mfgadmin 6 2 I 66 \N 2068.06 \N \N \N \N 0.00078649377753152262 \N \N \N 45 \N \N 2068.06 \N \N \N \N 3637 11 41 mfgadmin 7 2 I 67 \N 225437.61 \N \N \N \N 0.08573507416930754335 \N \N \N 45 \N \N 225437.61 \N \N \N \N 3638 11 41 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3639 11 41 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3640 11 41 mfgadmin 10 2 I 70 \N -41706.30 \N \N \N \N -0.01586111884271391626 \N \N \N 45 \N \N -41706.30 \N \N \N \N 3641 11 41 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3642 11 41 mfgadmin 12 2 I 72 \N -240.00 \N \N \N \N -0.000091273225441991735118 \N \N \N 45 \N \N -240.00 \N \N \N \N 3643 11 41 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3644 11 41 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3645 11 41 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3646 11 41 mfgadmin 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00038030510600829890 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 3647 11 41 mfgadmin 18 2 I 76 \N 1000.00 \N \N \N \N 0.00038030510600829890 \N \N \N 46 \N \N 1000.00 \N \N \N \N 3648 11 41 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3649 11 41 mfgadmin 23 0 G 36 0.00 2629467.72 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2629467.72 \N \N \N \N 3650 13 53 mfgadmin 70 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N M 3651 11 41 mfgadmin 24 1 G 37 0.00 6680.48 0.00 0.00 0.00 \N 0.00254062065458632061 \N \N \N 36 0.00 \N 6680.48 \N \N \N \N 3652 11 41 mfgadmin 25 2 G 38 0.00 1680.48 0.00 0.00 0.00 \N 0.25155078676981294757 \N \N \N 37 0.00 \N 1680.48 \N \N \N \N 3653 11 41 mfgadmin 26 3 I 47 \N 262.95 \N \N \N \N 0.000100001227624882194789 \N \N \N 38 \N \N 262.95 \N \N \N \N 3654 11 41 mfgadmin 27 3 I 46 \N 194.77 \N \N \N \N 0.000074072025497236376037 \N \N \N 38 \N \N 194.77 \N \N \N \N 3655 11 41 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3656 11 41 mfgadmin 29 3 I 49 \N 624.22 \N \N \N \N 0.00023739405327250034 \N \N \N 38 \N \N 624.22 \N \N \N \N 3657 11 41 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 3658 11 41 mfgadmin 31 3 I 50 \N 598.54 \N \N \N \N 0.00022762781815020722 \N \N \N 38 \N \N 598.54 \N \N \N \N 3659 11 41 mfgadmin 32 3 I 51 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3660 11 41 mfgadmin 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00190152553004149448 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 3661 11 41 mfgadmin 35 3 I 140 \N 5000.00 \N \N \N \N 0.00190152553004149448 \N \N \N 39 \N \N 5000.00 \N \N \N \N 3662 11 41 mfgadmin 38 1 G 40 0.00 2622787.24 0.00 0.00 0.00 \N 0.99745937934541367939 \N \N \N 36 0.00 \N 2622787.24 \N \N \N \N 3663 11 41 mfgadmin 39 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.54003325053178443278 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 3664 11 41 mfgadmin 40 3 I 52 \N 1420000.00 \N \N \N \N 0.54003325053178443278 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 3665 11 41 mfgadmin 42 2 G 42 \N 1179330.11 \N \N \N \N 0.44850526250232879832 \N \N \N 40 \N \N 1179330.11 \N \N \N \N 3666 11 41 mfgadmin 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N 0.00892086631130044829 \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 3667 11 41 mfgadmin 44 3 I 63 \N 23457.13 \N \N \N \N 0.00892086631130044829 \N \N \N 43 \N \N 23457.13 \N \N \N \N 3668 11 41 mfgadmin 45 3 I 64 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 43 \N \N 0.00 \N \N \N \N 3669 11 41 mfgadmin 22 1 T -1 \N 2629467.72 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2629467.72 \N Total Assets \N \N 3670 11 41 mfgadmin 16 2 T -1 \N 2628467.72 \N \N \N \N 0.99961969489399170110 \N \N \N 45 \N \N 2628467.72 \N Total Current Assets \N \N 3671 11 41 mfgadmin 19 2 T -1 \N 1000.00 \N \N \N \N 0.00038030510600829890 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 3672 11 41 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 3673 11 41 mfgadmin 48 1 T -1 \N 2629467.72 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2629467.72 \N Total Liabilities and Owners Equity \N \N 3674 11 41 mfgadmin 37 2 T -1 \N 6680.48 \N \N \N \N 0.00254062065458632061 \N \N \N 37 \N \N 6680.48 \N Total Liabilities \N \N 3675 11 41 mfgadmin 33 3 T -1 \N 1680.48 \N \N \N \N 0.25155078676981294757 \N \N \N 38 \N \N 1680.48 \N Total Current Liabilities \N \N 3676 11 41 mfgadmin 36 3 T -1 \N 5000.00 \N \N \N \N 0.00190152553004149448 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 3677 11 41 mfgadmin 47 2 T -1 \N 2622787.24 \N \N \N \N 0.99745937934541367939 \N \N \N 40 \N \N 2622787.24 \N Total Owners Equity \N \N 3678 11 41 mfgadmin 41 3 T -1 \N 1420000.00 \N \N \N \N 0.54003325053178443278 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 3679 11 41 mfgadmin 46 3 T -1 \N 23457.13 \N \N \N \N 0.00892086631130044829 \N \N \N 43 \N \N 23457.13 \N Total Retained Earniangs \N \N 3680 11 41 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 3681 11 40 mfgadmin 44 3 I 63 \N 23457.13 \N \N \N \N 0.00912650962758168207 \N \N \N 43 \N \N 23457.13 \N \N \N \N 3682 11 40 mfgadmin 45 3 I 64 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 43 \N \N 0.00 \N \N \N \N 3683 11 40 mfgadmin 22 1 T -1 \N 2570219.17 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2570219.17 \N Total Assets \N \N 3684 11 40 mfgadmin 16 2 T -1 \N 2569219.17 \N \N \N \N 0.99961092812174457480 \N \N \N 45 \N \N 2569219.17 \N Total Current Assets \N \N 3685 11 40 mfgadmin 19 2 T -1 \N 1000.00 \N \N \N \N 0.00038907187825542520 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 3686 11 40 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 3687 11 40 mfgadmin 48 1 T -1 \N 2570219.17 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2570219.17 \N Total Liabilities and Owners Equity \N \N 3688 11 40 mfgadmin 37 2 T -1 \N 6658.01 \N \N \N \N 0.00259044445614340352 \N \N \N 37 \N \N 6658.01 \N Total Liabilities \N \N 3689 11 40 mfgadmin 33 3 T -1 \N 1658.01 \N \N \N \N 0.24902485877912469341 \N \N \N 38 \N \N 1658.01 \N Total Current Liabilities \N \N 3690 11 40 mfgadmin 36 3 T -1 \N 5000.00 \N \N \N \N 0.00194535939127712599 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 3691 11 40 mfgadmin 47 2 T -1 \N 2563561.16 \N \N \N \N 0.99740955554385659648 \N \N \N 40 \N \N 2563561.16 \N Total Owners Equity \N \N 3692 11 40 mfgadmin 41 3 T -1 \N 1420000.00 \N \N \N \N 0.55248206712270378094 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 3693 11 40 mfgadmin 46 3 T -1 \N 23457.13 \N \N \N \N 0.00912650962758168207 \N \N \N 43 \N \N 23457.13 \N Total Retained Earniangs \N \N 3694 11 40 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 3695 11 40 mfgadmin 1 0 G 44 0.00 2570219.17 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2570219.17 \N \N \N \N 3696 11 40 mfgadmin 2 1 G 45 0.00 2569219.17 0.00 0.00 0.00 \N 0.99961092812174457480 \N \N \N 44 0.00 \N 2569219.17 \N \N \N \N 3697 11 40 mfgadmin 3 2 I 65 \N 2305393.85 \N \N \N \N 0.89696391533800598024 \N \N \N 45 \N \N 2305393.85 0.89696391533800598024 \N \N \N 3698 11 40 mfgadmin 4 2 I 242 \N 25000.00 \N \N \N \N 0.00972679695638562995 \N \N \N 45 \N \N 25000.00 0.00972679695638562995 \N \N \N 3699 11 40 mfgadmin 5 2 I 243 \N 25000.00 \N \N \N \N 0.00972679695638562995 \N \N \N 45 \N \N 25000.00 0.00972679695638562995 \N \N \N 3700 11 40 mfgadmin 6 2 I 66 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3701 11 40 mfgadmin 7 2 I 67 \N 255437.61 \N \N \N \N 0.09938359069977678207 \N \N \N 45 \N \N 255437.61 \N \N \N \N 3702 11 40 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3703 11 40 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3704 11 40 mfgadmin 10 2 I 70 \N -41682.79 \N \N \N \N -0.01621760139622645488 \N \N \N 45 \N \N -41682.79 \N \N \N \N 3705 11 40 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3706 11 40 mfgadmin 12 2 I 72 \N 70.50 \N \N \N \N 0.000027429567417007476448 \N \N \N 45 \N \N 70.50 \N \N \N \N 3707 11 40 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3708 11 40 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3709 11 40 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3710 11 40 mfgadmin 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00038907187825542520 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 3711 11 40 mfgadmin 18 2 I 76 \N 1000.00 \N \N \N \N 0.00038907187825542520 \N \N \N 46 \N \N 1000.00 \N \N \N \N 3712 11 40 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3713 11 40 mfgadmin 23 0 G 36 0.00 2570219.17 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2570219.17 \N \N \N \N 3714 11 40 mfgadmin 24 1 G 37 0.00 6658.01 0.00 0.00 0.00 \N 0.00259044445614340352 \N \N \N 36 0.00 \N 6658.01 \N \N \N \N 3715 11 40 mfgadmin 25 2 G 38 0.00 1658.01 0.00 0.00 0.00 \N 0.24902485877912469341 \N \N \N 37 0.00 \N 1658.01 \N \N \N \N 3716 11 40 mfgadmin 26 3 I 47 \N 262.95 \N \N \N \N 0.00010230645038726406 \N \N \N 38 \N \N 262.95 \N \N \N \N 3717 11 40 mfgadmin 27 3 I 46 \N 172.30 \N \N \N \N 0.000067037084623409761589 \N \N \N 38 \N \N 172.30 \N \N \N \N 3718 11 40 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3719 11 40 mfgadmin 29 3 I 49 \N 624.22 \N \N \N \N 0.00024286644784460152 \N \N \N 38 \N \N 624.22 \N \N \N \N 3720 11 40 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 3721 11 40 mfgadmin 31 3 I 50 \N 598.54 \N \N \N \N 0.00023287508201100220 \N \N \N 38 \N \N 598.54 \N \N \N \N 3722 11 40 mfgadmin 32 3 I 51 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3723 11 40 mfgadmin 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00194535939127712599 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 3724 11 40 mfgadmin 35 3 I 140 \N 5000.00 \N \N \N \N 0.00194535939127712599 \N \N \N 39 \N \N 5000.00 \N \N \N \N 3725 11 40 mfgadmin 38 1 G 40 0.00 2563561.16 0.00 0.00 0.00 \N 0.99740955554385659648 \N \N \N 36 0.00 \N 2563561.16 \N \N \N \N 3726 11 39 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3727 13 38 mfgadmin 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3728 13 38 mfgadmin 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3729 13 38 mfgadmin 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3730 13 38 mfgadmin 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3731 13 38 mfgadmin 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3732 13 38 mfgadmin 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3733 13 38 mfgadmin 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3734 13 38 mfgadmin 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3735 13 38 mfgadmin 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 3736 13 38 mfgadmin 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3737 13 38 mfgadmin 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3738 13 38 mfgadmin 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3739 13 38 mfgadmin 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3740 13 38 mfgadmin 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3741 13 38 mfgadmin 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3742 13 38 mfgadmin 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3743 13 38 mfgadmin 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3744 13 38 mfgadmin 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3745 13 38 mfgadmin 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3746 13 38 mfgadmin 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3747 13 38 mfgadmin 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3748 13 38 mfgadmin 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3749 13 38 mfgadmin 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3750 13 38 mfgadmin 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3751 13 38 mfgadmin 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3752 13 38 mfgadmin 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3753 13 38 mfgadmin 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3754 13 38 mfgadmin 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3755 13 38 mfgadmin 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -50000.00 \N -50000.00 \N \N \N \N 3756 13 38 mfgadmin 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 50000.00 \N 50000.00 \N \N \N \N 3757 13 38 mfgadmin 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 3758 13 38 mfgadmin 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 3759 13 38 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 35000.00 \N 35000.00 \N \N \N \N 3760 13 38 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3761 13 38 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 3762 13 38 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3763 13 38 mfgadmin 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 3764 13 38 mfgadmin 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3765 13 38 mfgadmin 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 3766 13 38 mfgadmin 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 3767 13 38 mfgadmin 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 3768 13 38 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3769 13 38 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 3770 13 38 mfgadmin 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 50000.00 \N 50000.00 \N \N \N \N 3771 13 38 mfgadmin 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3772 13 38 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 3773 13 38 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3774 13 38 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3775 13 38 mfgadmin 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3776 13 38 mfgadmin 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3777 13 38 mfgadmin 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 50000.00 \N 50000.00 \N \N \N \N 3778 13 38 mfgadmin 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 3779 13 38 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 50000.00 \N 50000.00 \N \N \N \N 3780 13 38 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 50000.00 \N 50000.00 \N \N \N \N 3781 13 38 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 35000.00 \N 35000.00 \N \N \N \N 3782 13 38 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 35000.00 \N 35000.00 \N \N \N \N 3783 13 38 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3784 13 38 mfgadmin 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3785 13 38 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3786 13 38 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3787 13 38 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3788 13 38 mfgadmin 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 3789 13 38 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -15000.00 \N -15000.00 \N \N \N \N 3790 13 38 mfgadmin 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 3791 13 38 mfgadmin 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3792 13 38 mfgadmin 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3793 13 38 mfgadmin 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3794 13 38 mfgadmin 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3795 13 38 mfgadmin 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 3796 13 38 mfgadmin 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3797 11 40 mfgadmin 39 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.55248206712270378094 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 3798 11 40 mfgadmin 40 3 I 52 \N 1420000.00 \N \N \N \N 0.55248206712270378094 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 3799 11 40 mfgadmin 42 2 G 42 \N 1120104.03 \N \N \N \N 0.43580097879357113347 \N \N \N 40 \N \N 1120104.03 \N \N \N \N 3800 13 49 mfgadmin 53 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N M 3801 11 40 mfgadmin 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N 0.00912650962758168207 \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 3802 11 39 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3803 11 39 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3804 11 39 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3805 11 39 mfgadmin 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00042820699322225835 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 3806 11 39 mfgadmin 18 2 I 76 \N 1000.00 \N \N \N \N 0.00042820699322225835 \N \N \N 46 \N \N 1000.00 \N \N \N \N 3807 11 39 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3808 11 39 mfgadmin 23 0 G 36 0.00 2335319.17 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2335319.17 \N \N \N \N 3809 11 39 mfgadmin 24 1 G 37 0.00 6658.01 0.00 0.00 0.00 \N 0.00285100644294372833 \N \N \N 36 0.00 \N 6658.01 \N \N \N \N 3810 11 39 mfgadmin 25 2 G 38 0.00 1658.01 0.00 0.00 0.00 \N 0.24902485877912469341 \N \N \N 37 0.00 \N 1658.01 \N \N \N \N 3811 11 39 mfgadmin 26 3 I 47 \N 262.95 \N \N \N \N 0.00011259702886779283 \N \N \N 38 \N \N 262.95 \N \N \N \N 3812 11 39 mfgadmin 27 3 I 46 \N 172.30 \N \N \N \N 0.000073780064932195114041 \N \N \N 38 \N \N 172.30 \N \N \N \N 3813 11 39 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3814 11 39 mfgadmin 29 3 I 49 \N 624.22 \N \N \N \N 0.00026729536930919811 \N \N \N 38 \N \N 624.22 \N \N \N \N 3815 11 39 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 3816 11 39 mfgadmin 31 3 I 50 \N 598.54 \N \N \N \N 0.00025629901372325051 \N \N \N 38 \N \N 598.54 \N \N \N \N 3817 11 39 mfgadmin 32 3 I 51 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3818 11 39 mfgadmin 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00214103496611129176 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 3819 11 39 mfgadmin 35 3 I 140 \N 5000.00 \N \N \N \N 0.00214103496611129176 \N \N \N 39 \N \N 5000.00 \N \N \N \N 3820 11 39 mfgadmin 38 1 G 40 0.00 2328661.16 0.00 0.00 0.00 \N 0.99714899355705627167 \N \N \N 36 0.00 \N 2328661.16 \N \N \N \N 3821 11 39 mfgadmin 39 2 G 41 0.00 1220000.00 0.00 0.00 0.00 \N 0.52241253173115518938 \N \N \N 40 0.00 \N 1220000.00 \N \N \N \N 3822 11 39 mfgadmin 40 3 I 52 \N 1220000.00 \N \N \N \N 0.52241253173115518938 \N \N \N 41 \N \N 1220000.00 \N \N \N \N 3823 11 39 mfgadmin 42 2 G 42 \N 1085204.03 \N \N \N \N 0.46469195471897744924 \N \N \N 40 \N \N 1085204.03 \N \N \N \N 3824 11 39 mfgadmin 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N 0.01004450710692363306 \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 3825 11 39 mfgadmin 44 3 I 63 \N 23457.13 \N \N \N \N 0.01004450710692363306 \N \N \N 43 \N \N 23457.13 \N \N \N \N 3826 11 39 mfgadmin 45 3 I 64 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 43 \N \N 0.00 \N \N \N \N 3827 11 39 mfgadmin 22 1 T -1 \N 2335319.17 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2335319.17 \N Total Assets \N \N 3828 11 39 mfgadmin 16 2 T -1 \N 2334319.17 \N \N \N \N 0.99957179300677774165 \N \N \N 45 \N \N 2334319.17 \N Total Current Assets \N \N 3829 11 39 mfgadmin 19 2 T -1 \N 1000.00 \N \N \N \N 0.00042820699322225835 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 3830 11 39 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 3831 11 39 mfgadmin 48 1 T -1 \N 2335319.17 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2335319.17 \N Total Liabilities and Owners Equity \N \N 3832 11 39 mfgadmin 37 2 T -1 \N 6658.01 \N \N \N \N 0.00285100644294372833 \N \N \N 37 \N \N 6658.01 \N Total Liabilities \N \N 3833 11 39 mfgadmin 33 3 T -1 \N 1658.01 \N \N \N \N 0.24902485877912469341 \N \N \N 38 \N \N 1658.01 \N Total Current Liabilities \N \N 3834 11 39 mfgadmin 36 3 T -1 \N 5000.00 \N \N \N \N 0.00214103496611129176 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 3835 11 39 mfgadmin 47 2 T -1 \N 2328661.16 \N \N \N \N 0.99714899355705627167 \N \N \N 40 \N \N 2328661.16 \N Total Owners Equity \N \N 3836 11 39 mfgadmin 41 3 T -1 \N 1220000.00 \N \N \N \N 0.52241253173115518938 \N \N \N 41 \N \N 1220000.00 \N Total Shareholders Equity \N \N 3837 11 39 mfgadmin 46 3 T -1 \N 23457.13 \N \N \N \N 0.01004450710692363306 \N \N \N 43 \N \N 23457.13 \N Total Retained Earniangs \N \N 3838 11 39 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 3839 11 39 mfgadmin 1 0 G 44 0.00 2335319.17 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2335319.17 \N \N \N \N 3840 11 39 mfgadmin 2 1 G 45 0.00 2334319.17 0.00 0.00 0.00 \N 0.99957179300677774165 \N \N \N 44 0.00 \N 2334319.17 \N \N \N \N 3841 11 39 mfgadmin 3 2 I 65 \N 2055493.85 \N \N \N \N 0.88017684109534372554 \N \N \N 45 \N \N 2055493.85 0.88017684109534372554 \N \N \N 3842 11 39 mfgadmin 4 2 I 242 \N 25000.00 \N \N \N \N 0.01070517483055645880 \N \N \N 45 \N \N 25000.00 0.01070517483055645880 \N \N \N 3843 11 39 mfgadmin 5 2 I 243 \N 25000.00 \N \N \N \N 0.01070517483055645880 \N \N \N 45 \N \N 25000.00 0.01070517483055645880 \N \N \N 3844 11 39 mfgadmin 6 2 I 66 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3845 11 39 mfgadmin 7 2 I 67 \N 270437.61 \N \N \N \N 0.11580327583231374750 \N \N \N 45 \N \N 270437.61 \N \N \N \N 3846 11 39 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3847 11 39 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3848 11 39 mfgadmin 10 2 I 70 \N -41682.79 \N \N \N \N -0.01784886217501481821 \N \N \N 45 \N \N -41682.79 \N \N \N \N 3849 11 39 mfgadmin 12 2 I 72 \N 70.50 \N \N \N \N 0.000030188593022169213812 \N \N \N 45 \N \N 70.50 \N \N \N \N 3850 11 43 mfgadmin 22 1 T -1 \N 2689633.85 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2689633.85 \N Total Assets \N \N 3851 11 43 mfgadmin 16 2 T -1 \N 2688633.85 \N \N \N \N 0.99962820218075408294 \N \N \N 45 \N \N 2688633.85 \N Total Current Assets \N \N 3852 11 43 mfgadmin 19 2 T -1 \N 1000.00 \N \N \N \N 0.00037179781924591706 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 3853 11 43 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 3854 11 43 mfgadmin 48 1 T -1 \N 2689633.85 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2689633.85 \N Total Liabilities and Owners Equity \N \N 3855 11 43 mfgadmin 37 2 T -1 \N 6739.37 \N \N \N \N 0.00250568306909135606 \N \N \N 37 \N \N 6739.37 \N Total Liabilities \N \N 3856 11 43 mfgadmin 33 3 T -1 \N 1739.37 \N \N \N \N 0.25809088980127222574 \N \N \N 38 \N \N 1739.37 \N Total Current Liabilities \N \N 3857 11 43 mfgadmin 36 3 T -1 \N 5000.00 \N \N \N \N 0.00185898909622958530 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 3858 11 43 mfgadmin 47 2 T -1 \N 2682894.48 \N \N \N \N 0.99749431693090864394 \N \N \N 40 \N \N 2682894.48 \N Total Owners Equity \N \N 3859 11 43 mfgadmin 42 3 T -1 \N 1420000.00 \N \N \N \N 0.52795290332920222580 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 3860 11 43 mfgadmin 45 3 T -1 \N 1202787.24 \N \N \N \N 0.44719367284881546237 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N \N 3861 11 43 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 3862 11 43 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3863 11 42 mfgadmin 41 3 I 247 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 41 \N \N 0.00 0.000000000000000000000000 \N \N \N 3864 11 42 mfgadmin 43 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.45270591913020765812 \N \N \N 40 0.00 \N 1202787.24 \N \N \N \N 3865 11 42 mfgadmin 44 3 I 63 \N 1202787.24 \N \N \N \N 0.45270591913020765812 \N \N \N 43 \N \N 1202787.24 \N \N \N \N 3866 11 42 mfgadmin 46 2 G 42 \N 27416.56 \N \N \N \N 0.01031906440426528475 \N \N \N 40 \N \N 27416.56 \N \N \N \N 3867 11 42 mfgadmin 22 1 T -1 \N 2656884.28 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2656884.28 \N Total Assets \N \N 3868 11 42 mfgadmin 16 2 T -1 \N 2655884.28 \N \N \N \N 0.99962361928687387168 \N \N \N 45 \N \N 2655884.28 \N Total Current Assets \N \N 3869 11 42 mfgadmin 19 2 T -1 \N 1000.00 \N \N \N \N 0.00037638071312612832 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 3870 11 42 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 3871 11 42 mfgadmin 48 1 T -1 \N 2656884.28 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2656884.28 \N Total Liabilities and Owners Equity \N \N 3872 11 42 mfgadmin 37 2 T -1 \N 6680.48 \N \N \N \N 0.00251440382642483774 \N \N \N 37 \N \N 6680.48 \N Total Liabilities \N \N 3873 11 42 mfgadmin 33 3 T -1 \N 1680.48 \N \N \N \N 0.25155078676981294757 \N \N \N 38 \N \N 1680.48 \N Total Current Liabilities \N \N 3874 11 42 mfgadmin 36 3 T -1 \N 5000.00 \N \N \N \N 0.00188190356563064162 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 3875 11 42 mfgadmin 47 2 T -1 \N 2650203.80 \N \N \N \N 0.99748559617357516226 \N \N \N 40 \N \N 2650203.80 \N Total Owners Equity \N \N 3876 11 42 mfgadmin 42 3 T -1 \N 1420000.00 \N \N \N \N 0.53446061263910221939 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 3877 11 42 mfgadmin 45 3 T -1 \N 1202787.24 \N \N \N \N 0.45270591913020765812 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N \N 3878 11 42 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 3879 13 42 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3880 11 38 mfgadmin 2 1 G 45 0.00 35000.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 35000.00 \N \N \N \N 3881 11 38 mfgadmin 3 2 I 65 \N 50000.00 \N \N \N \N 1.4285714285714286 \N \N \N 45 \N \N 50000.00 1.4285714285714286 \N \N \N 3882 11 38 mfgadmin 4 2 I 242 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 3883 11 38 mfgadmin 5 2 I 243 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 3884 11 38 mfgadmin 6 2 I 66 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3885 11 38 mfgadmin 7 2 I 67 \N -15000.00 \N \N \N \N \N \N \N \N 45 \N \N -15000.00 \N \N \N \N 3886 11 38 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3887 11 38 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3888 11 38 mfgadmin 10 2 I 70 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3889 11 38 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3890 11 38 mfgadmin 12 2 I 72 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3891 11 38 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3892 11 38 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3893 11 38 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N \N \N \N \N 45 \N \N 0.00 \N \N \N \N 3894 11 38 mfgadmin 17 1 G 46 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3895 11 38 mfgadmin 18 2 I 76 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 3896 11 38 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3897 11 38 mfgadmin 23 0 G 36 0.00 35000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 35000.00 \N \N \N \N 3898 11 38 mfgadmin 24 1 G 37 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 0.00 \N \N \N \N 3899 13 53 mfgadmin 72 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 3900 11 38 mfgadmin 25 2 G 38 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 3901 11 38 mfgadmin 26 3 I 47 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3902 11 38 mfgadmin 27 3 I 46 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3903 11 38 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3904 11 38 mfgadmin 29 3 I 49 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3905 11 38 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 0.00000000000000000000 \N \N \N 3906 11 38 mfgadmin 31 3 I 50 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3907 11 38 mfgadmin 32 3 I 51 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3908 11 38 mfgadmin 34 2 G 39 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 37 0.00 \N 0.00 \N \N \N \N 3909 11 38 mfgadmin 35 3 I 140 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 3910 11 38 mfgadmin 38 1 G 40 0.00 35000.00 0.00 0.00 0.00 \N \N \N \N \N 36 0.00 \N 35000.00 \N \N \N \N 3911 11 38 mfgadmin 39 2 G 41 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 0.00 \N \N \N \N 3912 11 38 mfgadmin 40 3 I 52 \N 0.00 \N \N \N \N \N \N \N \N 41 \N \N 0.00 \N \N \N \N 3913 11 38 mfgadmin 42 2 G 42 \N 35000.00 \N \N \N \N \N \N \N \N 40 \N \N 35000.00 \N \N \N \N 3914 11 38 mfgadmin 43 2 G 43 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 40 0.00 \N 0.00 \N \N \N \N 3915 11 38 mfgadmin 44 3 I 63 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3916 11 38 mfgadmin 45 3 I 64 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3917 11 38 mfgadmin 16 2 T -1 \N 35000.00 \N \N \N \N \N \N \N \N 45 \N \N 35000.00 \N \N \N \N 3918 11 38 mfgadmin 19 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 46 \N \N 0.00 \N \N \N \N 3919 11 38 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 47 \N \N 0.00 \N \N \N \N 3920 11 38 mfgadmin 22 1 T -1 \N 35000.00 \N \N \N \N \N \N \N \N 44 \N \N 35000.00 \N \N \N \N 3921 11 38 mfgadmin 33 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 38 \N \N 0.00 \N \N \N \N 3922 11 38 mfgadmin 36 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 39 \N \N 0.00 \N \N \N \N 3923 11 38 mfgadmin 37 2 T -1 \N 0.00 \N \N \N \N \N \N \N \N 37 \N \N 0.00 \N \N \N \N 3924 11 38 mfgadmin 41 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 41 \N \N 0.00 \N \N \N \N 3925 11 38 mfgadmin 46 3 T -1 \N 0.00 \N \N \N \N \N \N \N \N 43 \N \N 0.00 \N \N \N \N 3926 11 38 mfgadmin 47 2 T -1 \N 35000.00 \N \N \N \N \N \N \N \N 40 \N \N 35000.00 \N \N \N \N 3927 11 38 mfgadmin 48 1 T -1 \N 35000.00 \N \N \N \N \N \N \N \N 36 \N \N 35000.00 \N \N \N \N 3928 11 38 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N \N \N \N 3929 11 38 mfgadmin 1 0 G 44 0.00 35000.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 35000.00 \N \N \N \N 3930 11 42 mfgadmin 1 0 G 44 0.00 2656884.28 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2656884.28 \N \N \N \N 3931 11 42 mfgadmin 2 1 G 45 0.00 2655884.28 0.00 0.00 0.00 \N 0.99962361928687387168 \N \N \N 44 0.00 \N 2655884.28 \N \N \N \N 3932 11 42 mfgadmin 3 2 I 65 \N 2436284.91 \N \N \N \N 0.91697065180422536129 \N \N \N 45 \N \N 2436284.91 0.91697065180422536129 \N \N \N 3933 11 42 mfgadmin 4 2 I 242 \N 24871.50 \N \N \N \N 0.00936115290651650060 \N \N \N 45 \N \N 24871.50 0.00936115290651650060 \N \N \N 3934 11 42 mfgadmin 5 2 I 243 \N 25000.00 \N \N \N \N 0.00940951782815320809 \N \N \N 45 \N \N 25000.00 0.00940951782815320809 \N \N \N 3935 11 42 mfgadmin 6 2 I 66 \N 1236.56 \N \N \N \N 0.00046541733462324524 \N \N \N 45 \N \N 1236.56 \N \N \N \N 3936 11 42 mfgadmin 7 2 I 67 \N 210471.49 \N \N \N \N 0.07921740949891878618 \N \N \N 45 \N \N 210471.49 \N \N \N \N 3937 11 42 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3938 11 42 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3939 11 42 mfgadmin 10 2 I 70 \N -41740.18 \N \N \N \N -0.01571019871441295893 \N \N \N 45 \N \N -41740.18 \N \N \N \N 3940 11 42 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3941 11 42 mfgadmin 12 2 I 72 \N -240.00 \N \N \N \N -0.000090331371150270797643 \N \N \N 45 \N \N -240.00 \N \N \N \N 3942 11 42 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3943 11 42 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3944 11 42 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 3945 11 42 mfgadmin 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00037638071312612832 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 3946 11 42 mfgadmin 18 2 I 76 \N 1000.00 \N \N \N \N 0.00037638071312612832 \N \N \N 46 \N \N 1000.00 \N \N \N \N 3947 11 42 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 3948 11 42 mfgadmin 23 0 G 36 0.00 2656884.28 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2656884.28 \N \N \N \N 3949 11 42 mfgadmin 24 1 G 37 0.00 6680.48 0.00 0.00 0.00 \N 0.00251440382642483774 \N \N \N 36 0.00 \N 6680.48 \N \N \N \N 3950 13 40 mfgadmin 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4031 11 42 mfgadmin 25 2 G 38 0.00 1680.48 0.00 0.00 0.00 \N 0.25155078676981294757 \N \N \N 37 0.00 \N 1680.48 \N \N \N \N 3951 11 42 mfgadmin 26 3 I 47 \N 262.95 \N \N \N \N 0.000098969308516515442667 \N \N \N 38 \N \N 262.95 \N \N \N \N 3952 11 42 mfgadmin 27 3 I 46 \N 194.77 \N \N \N \N 0.000073307671495576013570 \N \N \N 38 \N \N 194.77 \N \N \N \N 3953 11 42 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 3954 11 42 mfgadmin 29 3 I 49 \N 624.22 \N \N \N \N 0.00023494436874759182 \N \N \N 38 \N \N 624.22 \N \N \N \N 3955 11 42 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 3956 11 42 mfgadmin 31 3 I 50 \N 598.54 \N \N \N \N 0.00022527891203451285 \N \N \N 38 \N \N 598.54 \N \N \N \N 3957 13 41 mfgadmin 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3958 13 41 mfgadmin 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3959 13 41 mfgadmin 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 3960 13 41 mfgadmin 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3961 13 41 mfgadmin 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3962 13 41 mfgadmin 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3963 13 41 mfgadmin 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3964 13 41 mfgadmin 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3965 13 41 mfgadmin 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 3966 13 41 mfgadmin 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3967 13 41 mfgadmin 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3968 13 41 mfgadmin 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3969 13 41 mfgadmin 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3970 13 41 mfgadmin 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3971 13 41 mfgadmin 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3972 13 41 mfgadmin 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3973 13 41 mfgadmin 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -87514.50 \N -87643.00 \N \N \N \N 3974 13 41 mfgadmin 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 87643.00 \N 87643.00 \N \N \N \N 3975 13 41 mfgadmin 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 3976 13 41 mfgadmin 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 87514.50 \N 87514.50 \N \N \N \N 3977 13 41 mfgadmin 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 87514.50 \N 87514.50 \N \N \N \N 3978 13 41 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 59226.08 \N 59226.08 \N \N \N \N 3979 13 41 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 3980 13 41 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 3981 13 41 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 2068.06 \N 2068.06 \N \N \N \N 3982 13 41 mfgadmin 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -30334.01 \N -30334.01 \N \N \N \N 3983 13 41 mfgadmin 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 3984 13 41 mfgadmin 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 22.47 \N 22.47 \N \N \N \N 3985 13 41 mfgadmin 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 3986 13 41 mfgadmin 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 3987 13 41 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 3988 13 41 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 3989 13 41 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 3990 13 41 mfgadmin 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 3991 13 41 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 3992 13 41 mfgadmin 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 3993 13 41 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 3994 13 41 mfgadmin 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 3995 13 41 mfgadmin 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N -128.50 \N \N \N \N 3996 13 41 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 87514.50 \N 87514.50 \N \N \N \N 3997 13 41 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 87514.50 \N 87514.50 \N \N \N \N 3998 13 41 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 59226.08 \N 59226.08 \N \N \N \N 3999 13 41 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 59226.08 \N 59226.08 \N \N \N \N 4000 13 41 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4001 13 41 mfgadmin 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4002 13 41 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4003 13 41 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4004 13 41 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 2068.06 \N 2068.06 \N \N \N \N 4005 13 41 mfgadmin 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 2068.06 \N 2068.06 \N \N \N \N 4006 13 41 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -30334.01 \N -30334.01 \N \N \N \N 4007 13 41 mfgadmin 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -30000.00 \N -30000.00 \N \N \N \N 4008 13 41 mfgadmin 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 -23.51 \N -23.51 \N \N \N \N 4009 13 41 mfgadmin 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4010 13 41 mfgadmin 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 -310.50 \N -310.50 \N \N \N \N 4011 13 41 mfgadmin 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4012 13 41 mfgadmin 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4013 13 41 mfgadmin 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4014 13 41 mfgadmin 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4015 13 41 mfgadmin 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4016 13 41 mfgadmin 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 22.47 \N 22.47 \N \N \N \N 4017 13 41 mfgadmin 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4018 13 41 mfgadmin 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 22.47 \N 22.47 \N \N \N \N 4019 13 41 mfgadmin 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4020 13 41 mfgadmin 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4021 13 41 mfgadmin 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4022 13 41 mfgadmin 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 4023 13 41 mfgadmin 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4024 13 41 mfgadmin 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4025 13 41 mfgadmin 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4026 13 41 mfgadmin 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 -128.50 \N \N \N \N \N \N 4027 13 40 mfgadmin 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 200000.00 \N 200000.00 \N \N \N \N 4028 13 40 mfgadmin 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4029 13 40 mfgadmin 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4030 13 49 mfgadmin 55 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 4032 13 40 mfgadmin 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -249900.00 \N -249900.00 \N \N \N \N 4033 13 40 mfgadmin 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 249900.00 \N 249900.00 \N \N \N \N 4034 13 40 mfgadmin 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 4035 13 40 mfgadmin 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 4036 13 40 mfgadmin 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 249900.00 \N 249900.00 \N \N \N \N 4037 13 40 mfgadmin 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 49900.00 \N 49900.00 \N \N \N \N 4038 13 40 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 34900.00 \N 34900.00 \N \N \N \N 4039 13 39 mfgadmin 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 25000.00 \N \N \N \N \N \N 4040 13 40 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4041 13 40 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 4042 13 40 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 4043 13 40 mfgadmin 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 4044 13 40 mfgadmin 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4045 13 40 mfgadmin 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4046 13 40 mfgadmin 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 4047 13 40 mfgadmin 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 4048 13 40 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4049 13 40 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 4050 13 40 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4051 13 40 mfgadmin 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4052 13 40 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 4053 13 40 mfgadmin 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 200000.00 \N 200000.00 \N \N \N \N 4054 13 40 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4055 13 40 mfgadmin 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 200000.00 \N 200000.00 \N \N \N \N 4056 13 40 mfgadmin 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N \N 4057 13 40 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 249900.00 \N 249900.00 \N \N \N \N 4058 13 40 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 49900.00 \N 49900.00 \N \N \N \N 4059 13 40 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 34900.00 \N 34900.00 \N \N \N \N 4060 13 40 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 34900.00 \N 34900.00 \N \N \N \N 4061 13 40 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4062 13 40 mfgadmin 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4063 13 40 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4064 13 40 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4065 13 40 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4066 13 40 mfgadmin 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 4067 13 40 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -15000.00 \N -15000.00 \N \N \N \N 4068 13 40 mfgadmin 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 4069 13 40 mfgadmin 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4070 13 40 mfgadmin 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4071 13 40 mfgadmin 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4072 13 40 mfgadmin 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4073 13 40 mfgadmin 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4074 13 40 mfgadmin 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4075 13 40 mfgadmin 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4076 13 40 mfgadmin 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4077 13 40 mfgadmin 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4078 13 40 mfgadmin 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4079 13 40 mfgadmin 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4080 13 40 mfgadmin 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4081 13 40 mfgadmin 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4082 13 40 mfgadmin 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4083 13 40 mfgadmin 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 4084 13 40 mfgadmin 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4085 13 40 mfgadmin 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4086 13 40 mfgadmin 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4087 13 40 mfgadmin 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4088 13 40 mfgadmin 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4089 13 40 mfgadmin 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4090 13 40 mfgadmin 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 4091 13 40 mfgadmin 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4092 13 40 mfgadmin 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4093 13 40 mfgadmin 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4094 13 40 mfgadmin 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4095 13 40 mfgadmin 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 200000.00 \N 200000.00 \N \N \N \N 4096 13 40 mfgadmin 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4097 13 40 mfgadmin 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4098 13 40 mfgadmin 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 200000.00 \N 200000.00 \N \N \N \N 4099 13 39 mfgadmin 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 100984.23 \N 100984.23 \N \N \N \N 4100 13 39 mfgadmin 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 -99015.77 \N -99015.77 \N \N \N \N 4101 13 39 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 70149.72 \N 70149.72 \N \N \N \N 4102 13 39 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4103 13 39 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 4104 13 39 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 4105 13 39 mfgadmin 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 169210.92 \N 169210.92 \N \N \N \N 4106 13 39 mfgadmin 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4107 13 39 mfgadmin 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 45.43 \N 45.43 \N \N \N \N 4108 13 39 mfgadmin 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 4109 13 39 mfgadmin 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 4110 13 39 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4111 13 39 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 4112 13 39 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4113 13 39 mfgadmin 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4114 13 39 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 4115 13 39 mfgadmin 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 200000.00 \N 200000.00 \N \N \N \N 4116 13 39 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4117 13 39 mfgadmin 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 200000.00 \N 200000.00 \N \N \N \N 4118 13 39 mfgadmin 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N 50000.00 \N \N \N \N 4119 13 39 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 100984.23 \N 100984.23 \N \N \N \N 4120 13 39 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 -99015.77 \N -99015.77 \N \N \N \N 4121 13 39 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 70149.72 \N 70149.72 \N \N \N \N 4122 13 39 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 70149.72 \N 70149.72 \N \N \N \N 4123 13 39 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4124 11 68 mfgadmin 1 0 G 44 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4125 11 68 mfgadmin 2 1 G 45 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 4126 11 68 mfgadmin 3 2 I 65 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 0.00000000000000000000 \N \N \N 4127 11 68 mfgadmin 4 2 I 242 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 0.00000000000000000000 \N \N \N 4128 11 68 mfgadmin 5 2 I 243 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 0.00000000000000000000 \N \N \N 4129 11 68 mfgadmin 6 2 I 66 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4130 11 68 mfgadmin 7 2 I 67 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4131 11 68 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4132 11 68 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4133 11 68 mfgadmin 10 2 I 70 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4134 11 68 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4135 11 68 mfgadmin 12 2 I 72 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4136 11 68 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4137 11 68 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4138 11 68 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4139 11 68 mfgadmin 17 1 G 46 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 4140 11 68 mfgadmin 18 2 I 76 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 46 \N \N 0.00 \N \N \N \N 4141 11 68 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 4142 11 68 mfgadmin 23 0 G 36 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4143 11 68 mfgadmin 24 1 G 37 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 36 0.00 \N 0.00 \N \N \N \N 4144 11 68 mfgadmin 25 2 G 38 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 37 0.00 \N 0.00 \N \N \N \N 4145 11 68 mfgadmin 26 3 I 47 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4146 11 68 mfgadmin 27 3 I 46 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4147 11 68 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4148 11 68 mfgadmin 29 3 I 49 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4149 11 68 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 0.00000000000000000000 \N \N \N 4150 11 68 mfgadmin 31 3 I 50 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4151 11 68 mfgadmin 32 3 I 51 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4152 11 68 mfgadmin 34 2 G 39 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 37 0.00 \N 0.00 \N \N \N \N 4153 11 68 mfgadmin 35 3 I 140 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 39 \N \N 0.00 \N \N \N \N 4154 11 68 mfgadmin 38 1 G 40 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 36 0.00 \N 0.00 \N \N \N \N 4155 11 68 mfgadmin 39 2 G 41 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 40 0.00 \N 0.00 \N \N \N \N 4156 11 68 mfgadmin 40 3 I 52 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 41 \N \N 0.00 \N \N \N \N 4157 11 68 mfgadmin 42 2 G 42 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 40 \N \N 0.00 \N \N \N \N 4158 11 68 mfgadmin 43 2 G 43 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 40 0.00 \N 0.00 \N \N \N \N 4159 11 68 mfgadmin 44 3 I 63 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 43 \N \N 0.00 \N \N \N \N 4160 11 68 mfgadmin 45 3 I 64 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 43 \N \N 0.00 \N \N \N \N 4161 11 68 mfgadmin 22 1 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 44 \N \N 0.00 \N Total Assets \N \N 4162 11 68 mfgadmin 16 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 45 \N \N 0.00 \N Total Current Assets \N \N 4163 11 68 mfgadmin 19 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 46 \N \N 0.00 \N Total Fixed Assets \N \N 4164 11 68 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 4165 11 68 mfgadmin 48 1 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 36 \N \N 0.00 \N Total Liabilities and Owners Equity \N \N 4166 11 68 mfgadmin 37 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 37 \N \N 0.00 \N Total Liabilities \N \N 4167 11 68 mfgadmin 33 3 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 38 \N \N 0.00 \N Total Current Liabilities \N \N 4168 11 68 mfgadmin 36 3 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 39 \N \N 0.00 \N Total Long Term Liabilities \N \N 4169 11 68 mfgadmin 47 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 40 \N \N 0.00 \N Total Owners Equity \N \N 4170 11 68 mfgadmin 41 3 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 41 \N \N 0.00 \N Total Shareholders Equity \N \N 4171 11 68 mfgadmin 46 3 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 43 \N \N 0.00 \N Total Retained Earniangs \N \N 4172 11 68 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 4173 13 39 mfgadmin 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4174 13 39 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4175 13 39 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4176 13 39 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4177 13 39 mfgadmin 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 4178 13 39 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 169210.92 \N 169210.92 \N \N \N \N 4179 13 39 mfgadmin 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 210771.14 \N 210771.14 \N \N \N \N 4180 13 39 mfgadmin 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 -41671.72 \N -41671.72 \N \N \N \N 4181 13 39 mfgadmin 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4182 13 39 mfgadmin 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 111.50 \N 111.50 \N \N \N \N 4183 13 39 mfgadmin 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4184 13 39 mfgadmin 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4185 13 39 mfgadmin 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4186 13 39 mfgadmin 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4187 13 39 mfgadmin 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4188 13 39 mfgadmin 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 45.43 \N 45.43 \N \N \N \N 4189 13 39 mfgadmin 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4190 13 39 mfgadmin 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 45.43 \N 45.43 \N \N \N \N 4191 13 39 mfgadmin 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4192 13 39 mfgadmin 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4193 13 39 mfgadmin 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4194 13 39 mfgadmin 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 4195 13 39 mfgadmin 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4196 13 39 mfgadmin 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4197 13 39 mfgadmin 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4198 13 39 mfgadmin 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4199 13 39 mfgadmin 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4200 13 39 mfgadmin 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4201 13 39 mfgadmin 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 4202 13 39 mfgadmin 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4203 13 39 mfgadmin 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4204 13 39 mfgadmin 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4205 13 39 mfgadmin 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4206 13 39 mfgadmin 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 200000.00 \N 200000.00 \N \N \N \N 4207 13 39 mfgadmin 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4208 13 39 mfgadmin 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4209 13 39 mfgadmin 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 200000.00 \N 200000.00 \N \N \N \N 4210 13 39 mfgadmin 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 200000.00 \N 200000.00 \N \N \N \N 4211 13 39 mfgadmin 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4212 13 39 mfgadmin 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4213 13 39 mfgadmin 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4214 13 39 mfgadmin 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -100984.23 \N -50984.23 \N \N \N \N 4215 13 39 mfgadmin 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 50984.23 \N 50984.23 \N \N \N \N 4216 13 39 mfgadmin 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 25000.00 \N \N \N \N \N \N 4217 4 38 mfgadmin 1 0 G 3 0.00 35000.00 0.00 0.00 0.00 \N 0.70000000000000000000 \N \N 0.00000000000000000000 -1 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 \N \N \N 4218 4 38 mfgadmin 2 1 G 4 0.00 50000.00 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 4219 4 38 mfgadmin 3 2 I 2 \N 50000.00 \N \N 0.00 \N 1.00000000000000000000 \N \N 0.00000000000000000000 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 4220 4 38 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4221 4 38 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4222 4 38 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4223 4 38 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4224 4 38 mfgadmin 9 1 G 5 0.00 15000.00 0.00 0.00 0.00 \N 0.30000000000000000000 \N \N 0.00000000000000000000 3 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 4225 4 38 mfgadmin 10 2 I 246 \N 15000.00 \N \N 0.00 \N 0.30000000000000000000 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 4226 4 38 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4227 4 38 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4228 4 38 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4229 4 38 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4230 4 38 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4231 4 38 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4232 4 38 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4233 4 38 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4234 4 38 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4235 4 38 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4236 4 38 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4237 4 38 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4238 4 38 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4239 4 38 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4240 4 38 mfgadmin 12 1 T -1 \N 35000.00 \N \N 0.00 \N 0.70000000000000000000 \N \N 0.00000000000000000000 3 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 Total Net Revenue \N \N 4241 4 38 mfgadmin 8 2 T -1 \N 50000.00 \N \N \N \N 1.00000000000000000000 \N \N \N 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 Total Sales \N \N 4242 4 38 mfgadmin 11 2 T -1 \N 15000.00 \N \N 0.00 \N 0.30000000000000000000 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 Total Cost of Goods Sold \N \N 4243 4 38 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 Total General Expenses \N \N 4244 4 38 mfgadmin 28 0 T -1 0.00 35000.00 0.00 0.00 0.00 \N \N \N \N \N \N 35000.00 \N 35000.00 \N Net Income \N \N 4245 4 37 mfgadmin 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4246 4 37 mfgadmin 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4247 4 37 mfgadmin 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4248 4 37 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4249 4 37 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4250 4 37 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4251 4 37 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4252 4 37 mfgadmin 9 1 G 5 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4253 4 37 mfgadmin 10 2 I 246 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4254 4 37 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4255 4 37 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4256 4 37 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4257 4 37 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4258 4 37 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4259 4 37 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4260 4 37 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4261 4 37 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4262 4 37 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4263 4 37 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4264 4 37 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4265 4 37 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4266 4 37 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4267 4 37 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4268 4 37 mfgadmin 12 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Net Revenue \N \N 4269 13 49 mfgadmin 59 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N M 4270 4 37 mfgadmin 8 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Sales \N \N 4271 4 37 mfgadmin 11 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Cost of Goods Sold \N \N 4272 4 37 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 4273 4 37 mfgadmin 28 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N Net Income \N \N 4274 4 36 mfgadmin 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4275 4 36 mfgadmin 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4276 4 36 mfgadmin 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4277 4 36 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4278 4 36 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4279 4 36 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4280 4 36 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4281 4 36 mfgadmin 9 1 G 5 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4282 4 36 mfgadmin 10 2 I 246 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4283 4 36 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4284 4 36 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4285 4 36 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4286 4 36 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4287 4 36 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4288 4 36 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4289 4 36 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4290 4 36 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4291 4 36 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4292 4 36 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4293 4 36 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4294 4 36 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4295 4 36 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4296 4 36 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4297 4 36 mfgadmin 12 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Net Revenue \N \N 4298 4 36 mfgadmin 8 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Sales \N \N 4299 4 36 mfgadmin 11 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Cost of Goods Sold \N \N 4300 4 36 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 4301 4 36 mfgadmin 28 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N Net Income \N \N 4302 4 35 mfgadmin 28 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N Net Income \N \N 4303 4 35 mfgadmin 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4304 4 35 mfgadmin 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4305 4 35 mfgadmin 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4306 4 35 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4307 4 35 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4308 4 35 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4309 4 35 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4310 4 35 mfgadmin 9 1 G 5 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4311 4 35 mfgadmin 10 2 I 246 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4312 4 35 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4313 4 35 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4314 4 35 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4315 4 35 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4316 4 35 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4317 4 35 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4318 4 35 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4319 4 35 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4320 4 35 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4321 4 35 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4322 4 35 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4323 4 35 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4324 4 35 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4325 4 35 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4326 4 35 mfgadmin 12 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Net Revenue \N \N 4327 13 44 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 35000.00 \N 29871.50 \N \N \N \N 4472 4 35 mfgadmin 8 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Sales \N \N 4328 4 35 mfgadmin 11 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Cost of Goods Sold \N \N 4329 4 35 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 4330 4 34 mfgadmin 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4331 4 34 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4332 4 34 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4333 4 34 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4334 4 34 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4335 4 34 mfgadmin 9 1 G 5 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4336 4 34 mfgadmin 10 2 I 246 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4337 4 34 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4338 4 34 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4339 4 34 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4340 4 34 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4341 4 34 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4342 4 34 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4343 4 34 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4344 4 34 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4345 4 34 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4346 4 34 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4347 4 34 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4348 4 34 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4349 4 34 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4350 4 34 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4351 4 34 mfgadmin 12 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Net Revenue \N \N 4352 4 34 mfgadmin 8 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Sales \N \N 4353 4 34 mfgadmin 11 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Cost of Goods Sold \N \N 4354 4 34 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 4355 4 34 mfgadmin 28 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N Net Income \N \N 4356 4 34 mfgadmin 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4357 4 34 mfgadmin 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4358 4 33 mfgadmin 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4359 4 33 mfgadmin 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4360 4 33 mfgadmin 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4361 4 33 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4362 4 33 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4363 4 33 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4364 4 33 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4365 4 33 mfgadmin 9 1 G 5 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4366 4 33 mfgadmin 10 2 I 246 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4367 4 33 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4368 4 33 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4369 4 33 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4370 4 33 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4371 4 33 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4372 4 33 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4373 4 33 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4374 4 33 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4375 4 33 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4376 4 33 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4377 4 33 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4378 4 33 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4379 4 33 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4380 4 33 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4381 4 33 mfgadmin 12 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Net Revenue \N \N 4382 4 33 mfgadmin 8 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Sales \N \N 4383 4 33 mfgadmin 11 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Cost of Goods Sold \N \N 4384 4 33 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 4385 4 33 mfgadmin 28 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N Net Income \N \N 4386 4 32 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4387 4 32 mfgadmin 7 2 I 3 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4388 4 32 mfgadmin 9 1 G 5 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4389 4 32 mfgadmin 10 2 I 246 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4390 4 32 mfgadmin 13 0 G 7 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4391 4 32 mfgadmin 14 1 G 8 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4392 4 32 mfgadmin 15 2 I 5 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4393 4 32 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4394 4 32 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4395 4 32 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4396 4 32 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4397 4 32 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4398 4 32 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4399 4 32 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4400 4 32 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4401 4 32 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4402 4 32 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4403 4 32 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4404 4 32 mfgadmin 12 1 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Net Revenue \N \N 4405 4 32 mfgadmin 8 2 T -1 \N 0.00 \N \N \N \N 0.00000000000000000000 \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Sales \N \N 4406 4 32 mfgadmin 11 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Cost of Goods Sold \N \N 4407 4 32 mfgadmin 27 2 T -1 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 4408 4 32 mfgadmin 28 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N Net Income \N \N 4409 4 32 mfgadmin 1 0 G 3 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4410 4 32 mfgadmin 2 1 G 4 0.00 0.00 0.00 0.00 0.00 \N 0.00000000000000000000 \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4411 4 32 mfgadmin 3 2 I 2 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4412 4 32 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4413 4 32 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4414 11 42 mfgadmin 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00188190356563064162 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 4415 11 42 mfgadmin 35 3 I 140 \N 5000.00 \N \N \N \N 0.00188190356563064162 \N \N \N 39 \N \N 5000.00 \N \N \N \N 4416 11 42 mfgadmin 38 1 G 40 0.00 2650203.80 0.00 0.00 0.00 \N 0.99748559617357516226 \N \N \N 36 0.00 \N 2650203.80 \N \N \N \N 4417 11 42 mfgadmin 39 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.53446061263910221939 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 4418 11 42 mfgadmin 40 3 I 52 \N 1420000.00 \N \N \N \N 0.53446061263910221939 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 4419 13 44 mfgadmin 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4420 13 44 mfgadmin 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4421 13 44 mfgadmin 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4422 13 44 mfgadmin 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4423 13 44 mfgadmin 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4424 13 44 mfgadmin 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 4425 13 44 mfgadmin 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4426 13 44 mfgadmin 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4427 13 44 mfgadmin 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4428 13 44 mfgadmin 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4429 13 44 mfgadmin 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4430 13 44 mfgadmin 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4431 13 44 mfgadmin 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 4432 13 44 mfgadmin 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4433 13 44 mfgadmin 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4434 13 44 mfgadmin 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4435 13 44 mfgadmin 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4436 13 44 mfgadmin 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 4437 13 44 mfgadmin 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4438 13 44 mfgadmin 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4439 13 44 mfgadmin 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4440 13 44 mfgadmin 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4441 13 44 mfgadmin 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4442 13 44 mfgadmin 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4443 13 44 mfgadmin 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4444 13 44 mfgadmin 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -50000.00 \N -50000.00 \N \N \N \N 4445 13 44 mfgadmin 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 50000.00 \N 50000.00 \N \N \N \N 4446 13 44 mfgadmin 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 4447 13 44 mfgadmin 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 4448 13 44 mfgadmin 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 50000.00 \N 44871.50 \N \N \N \N 4449 13 44 mfgadmin 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 50000.00 \N 44871.50 \N \N \N \N 4450 13 44 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 35000.00 \N 29871.50 \N \N \N \N 4451 13 44 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4452 13 44 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 4453 13 44 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 4454 13 44 mfgadmin 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 4455 13 44 mfgadmin 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4456 13 44 mfgadmin 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4457 13 44 mfgadmin 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 4458 13 44 mfgadmin 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 4459 13 44 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4460 13 44 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 4461 13 44 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4462 13 44 mfgadmin 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4463 13 44 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 4464 13 44 mfgadmin 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4465 13 44 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4466 13 44 mfgadmin 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4467 13 44 mfgadmin 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N -5128.50 \N \N \N \N 4468 13 44 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 50000.00 \N 44871.50 \N \N \N \N 4469 13 44 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 50000.00 \N 44871.50 \N \N \N \N 4470 13 44 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 35000.00 \N 29871.50 \N \N \N \N 4471 13 44 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4473 13 44 mfgadmin 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4474 13 44 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4475 13 44 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4476 13 44 mfgadmin 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N \N 4477 13 44 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -15000.00 \N -15000.00 \N \N \N \N 4478 13 44 mfgadmin 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 4479 13 44 mfgadmin 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4480 13 44 mfgadmin 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4481 13 44 mfgadmin 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4482 13 44 mfgadmin 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4483 13 44 mfgadmin 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4484 13 44 mfgadmin 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4485 13 44 mfgadmin 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4486 13 44 mfgadmin 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4487 13 44 mfgadmin 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4488 13 44 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4489 13 43 mfgadmin 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4490 13 43 mfgadmin 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4491 13 43 mfgadmin 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4492 13 43 mfgadmin 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4493 13 43 mfgadmin 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 4494 13 43 mfgadmin 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4495 13 43 mfgadmin 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4496 13 43 mfgadmin 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4497 13 43 mfgadmin 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4498 13 43 mfgadmin 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 4499 13 43 mfgadmin 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4500 13 43 mfgadmin 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4501 13 43 mfgadmin 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4502 13 43 mfgadmin 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4503 13 43 mfgadmin 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4504 13 43 mfgadmin 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4505 13 43 mfgadmin 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4506 13 43 mfgadmin 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -50153.59 \N -49230.06 \N \N \N \N 4507 13 43 mfgadmin 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 49230.06 \N 49230.06 \N \N \N \N 4508 13 43 mfgadmin 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 -128.50 \N \N \N \N \N \N 4509 13 43 mfgadmin 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 1052.03 \N \N \N \N \N \N 4510 13 43 mfgadmin 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 50153.59 \N 45153.59 \N \N \N \N 4511 13 43 mfgadmin 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 50153.59 \N 45153.59 \N \N \N \N 4512 13 43 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 32690.68 \N 27690.68 \N \N \N \N 4513 13 43 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4514 13 43 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 4515 13 43 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 -1236.55 \N -1236.55 \N \N \N \N 4516 13 43 mfgadmin 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -16167.47 \N -16167.47 \N \N \N \N 4517 13 43 mfgadmin 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4518 13 43 mfgadmin 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 58.89 \N 58.89 \N \N \N \N 4519 13 43 mfgadmin 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 4520 13 43 mfgadmin 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 4521 13 43 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4522 13 43 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 4523 13 43 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4524 13 43 mfgadmin 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4525 13 43 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 4526 13 43 mfgadmin 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4527 13 43 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4528 13 43 mfgadmin 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4529 13 43 mfgadmin 70 0 T -1 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N -4076.47 \N \N \N \N 4530 13 43 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 50153.59 \N 45153.59 \N \N \N \N 4531 13 43 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 50153.59 \N 45153.59 \N \N \N \N 4532 13 43 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 32690.68 \N 27690.68 \N \N \N \N 4533 13 43 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 32690.68 \N 27690.68 \N \N \N \N 4534 13 43 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4535 13 43 mfgadmin 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4536 13 43 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4537 13 43 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4538 13 43 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -1236.55 \N -1236.55 \N \N \N \N 4539 13 42 mfgadmin 62 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4540 13 43 mfgadmin 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 -1236.55 \N -1236.55 \N \N \N \N 4541 13 43 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -16167.47 \N -16167.47 \N \N \N \N 4542 13 43 mfgadmin 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -16167.03 \N -16167.03 \N \N \N \N 4543 13 43 mfgadmin 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 -0.44 \N -0.44 \N \N \N \N 4544 13 43 mfgadmin 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4545 13 43 mfgadmin 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4546 13 43 mfgadmin 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4547 13 43 mfgadmin 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4548 13 43 mfgadmin 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4549 13 43 mfgadmin 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4550 13 43 mfgadmin 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4551 13 43 mfgadmin 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 58.89 \N 58.89 \N \N \N \N 4552 13 43 mfgadmin 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4553 13 43 mfgadmin 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 57.64 \N 57.64 \N \N \N \N 4554 13 43 mfgadmin 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4555 13 43 mfgadmin 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4556 13 43 mfgadmin 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 1.25 \N 1.25 \N \N \N \N 4557 13 43 mfgadmin 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 4558 13 43 mfgadmin 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4559 13 43 mfgadmin 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4560 13 42 mfgadmin 56 3 I 139 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N \N 4561 13 42 mfgadmin 58 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4562 13 42 mfgadmin 59 3 I 134 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4563 13 42 mfgadmin 60 3 I 135 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4564 13 42 mfgadmin 61 3 I 136 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N \N 4565 13 42 mfgadmin 63 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4566 13 42 mfgadmin 66 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -43248.06 \N -43248.06 \N \N \N \N 4567 13 42 mfgadmin 67 1 I 108 \N \N \N \N \N \N \N \N \N \N 86 43248.06 \N 43248.06 \N \N \N \N 4568 4 31 mfgadmin 10 2 I 246 \N 3872.99 \N \N 0.00 \N 0.34588173725422953818 \N \N 0.00000000000000000000 5 1246.18 0.42243389830508474576 1246.18 0.42243389830508474576 \N \N \N 4569 4 31 mfgadmin 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4570 4 31 mfgadmin 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.09064571902149062643 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4571 4 31 mfgadmin 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.09019918838591678098 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4572 4 31 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4573 4 31 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4574 4 31 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4575 4 31 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4576 4 31 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4577 4 31 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4578 4 31 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4579 4 31 mfgadmin 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.00044653063557384545 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4580 4 31 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4581 4 31 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4582 4 31 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4583 4 31 mfgadmin 12 1 T -1 \N 7324.45 \N \N 0.00 \N 0.65411826274577046182 \N \N 0.00000000000000000000 3 1703.82 0.57756610169491525424 1703.82 0.57756610169491525424 Total Net Revenue \N \N 4584 4 31 mfgadmin 8 2 T -1 \N 11197.44 \N \N \N \N 1.00000000000000000000 \N \N \N 4 2950.00 1.00000000000000000000 2950.00 1.00000000000000000000 Total Sales \N \N 4585 11 31 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 4586 13 42 mfgadmin 68 1 I 244 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 4587 13 42 mfgadmin 69 1 I 245 \N \N \N \N \N \N \N \N \N \N 86 0.00 \N \N \N \N \N \N 4588 13 42 mfgadmin 65 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 43248.06 \N 43248.06 \N \N \N \N 4589 13 42 mfgadmin 45 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 43248.06 \N 43248.06 \N \N \N \N 4590 13 42 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 27416.56 \N 27416.56 \N \N \N \N 4591 13 42 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4592 13 42 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N \N 4593 13 42 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 -831.50 \N -831.50 \N \N \N \N 4594 13 42 mfgadmin 22 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -15000.00 \N -15000.00 \N \N \N \N 4595 13 42 mfgadmin 25 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4596 13 42 mfgadmin 34 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4597 13 42 mfgadmin 36 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N \N 4598 13 42 mfgadmin 38 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N \N 4599 13 42 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4600 13 42 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N \N 4601 13 42 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4602 13 42 mfgadmin 49 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4603 13 42 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N \N 4604 13 42 mfgadmin 64 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4605 4 31 mfgadmin 11 2 T -1 \N 3872.99 \N \N 0.00 \N 0.34588173725422953818 \N \N 0.00000000000000000000 5 1246.18 0.42243389830508474576 1246.18 0.42243389830508474576 Total Cost of Goods Sold \N \N 4606 4 31 mfgadmin 27 2 T -1 \N 1015.00 \N \N 0.00 \N 0.09064571902149062643 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N \N 4607 4 31 mfgadmin 28 0 T -1 0.00 6309.45 0.00 0.00 0.00 \N \N \N \N \N \N 1703.82 \N 1703.82 \N Net Income \N \N 4608 4 31 mfgadmin 1 0 G 3 0.00 7324.45 0.00 0.00 0.00 \N 0.65411826274577046182 \N \N 0.00000000000000000000 -1 1703.82 0.57756610169491525424 1703.82 0.57756610169491525424 \N \N \N 4609 4 31 mfgadmin 2 1 G 4 0.00 11197.44 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 2950.00 1.00000000000000000000 2950.00 1.00000000000000000000 \N \N \N 4610 4 31 mfgadmin 3 2 I 2 \N 11194.54 \N \N 0.00 \N 0.99974101223136716964 \N \N 0.00000000000000000000 4 2950.00 1.00000000000000000000 2950.00 1.00000000000000000000 \N \N \N 4611 4 31 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4612 4 31 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4613 4 31 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4614 4 31 mfgadmin 7 2 I 3 \N 2.90 \N \N 0.00 \N 0.00025898776863283036 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4615 4 31 mfgadmin 9 1 G 5 0.00 3872.99 0.00 0.00 0.00 \N 0.34588173725422953818 \N \N 0.00000000000000000000 3 1246.18 0.42243389830508474576 1246.18 0.42243389830508474576 \N \N \N 4616 4 30 mfgadmin 1 0 G 3 0.00 5620.63 0.00 0.00 0.00 \N 0.68149995635009166481 \N \N 0.00000000000000000000 -1 5620.63 0.68149995635009166481 5620.63 0.68149995635009166481 \N \N \N 4617 4 30 mfgadmin 2 1 G 4 0.00 8247.44 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 8247.44 1.00000000000000000000 8247.44 1.00000000000000000000 \N \N \N 4618 4 30 mfgadmin 3 2 I 2 \N 8244.54 \N \N 0.00 \N 0.99964837573841094934 \N \N 0.00000000000000000000 4 8244.54 0.99964837573841094934 8244.54 0.99964837573841094934 \N \N \N 4619 4 30 mfgadmin 4 2 I 218 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4620 4 30 mfgadmin 5 2 I 219 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N \N \N 4621 4 30 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4622 4 30 mfgadmin 7 2 I 3 \N 2.90 \N \N 0.00 \N 0.00035162426158905066 \N \N 0.00000000000000000000 4 2.90 0.00035162426158905066 2.90 0.00035162426158905066 \N \N \N 4623 4 30 mfgadmin 9 1 G 5 0.00 2626.81 0.00 0.00 0.00 \N 0.31850004364990833519 \N \N 0.00000000000000000000 3 2626.81 0.31850004364990833519 2626.81 0.31850004364990833519 \N \N \N 4624 4 30 mfgadmin 10 2 I 246 \N 2626.81 \N \N 0.00 \N 0.31850004364990833519 \N \N 0.00000000000000000000 5 2626.81 0.31850004364990833519 2626.81 0.31850004364990833519 \N \N \N 4625 4 30 mfgadmin 13 0 G 7 0.00 1015.00 0.00 0.00 0.00 \N \N \N \N \N -1 1015.00 \N 1015.00 \N \N \N \N 4626 4 30 mfgadmin 14 1 G 8 0.00 1015.00 0.00 0.00 0.00 \N 0.12306849155616773205 \N \N 0.00000000000000000000 7 1015.00 0.12306849155616773205 1015.00 0.12306849155616773205 \N \N \N 4627 4 30 mfgadmin 15 2 I 5 \N 1010.00 \N \N 0.00 \N 0.12246224282929005849 \N \N 0.00000000000000000000 8 1010.00 0.12246224282929005849 1010.00 0.12246224282929005849 \N \N \N 4628 4 30 mfgadmin 16 2 I 235 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4629 4 30 mfgadmin 17 2 I 236 \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4630 4 30 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4631 4 30 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4632 4 30 mfgadmin 20 2 I 6 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4633 4 30 mfgadmin 21 2 I 11 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4634 4 30 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4635 4 30 mfgadmin 23 2 I 10 \N 5.00 \N \N 0.00 \N 0.00060624872687767356 \N \N 0.00000000000000000000 8 5.00 0.00060624872687767356 5.00 0.00060624872687767356 \N \N \N 4636 4 30 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N \N 4637 4 30 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4638 4 30 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.00000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N \N \N 4639 4 30 mfgadmin 12 1 T -1 \N 5620.63 \N \N 0.00 \N 0.68149995635009166481 \N \N 0.00000000000000000000 3 5620.63 0.68149995635009166481 5620.63 0.68149995635009166481 Total Net Revenue \N \N 4640 4 30 mfgadmin 8 2 T -1 \N 8247.44 \N \N \N \N 1.00000000000000000000 \N \N \N 4 8247.44 1.00000000000000000000 8247.44 1.00000000000000000000 Total Sales \N \N 4641 4 44 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4642 4 30 mfgadmin 11 2 T -1 \N 2626.81 \N \N 0.00 \N 0.31850004364990833519 \N \N 0.00000000000000000000 5 2626.81 0.31850004364990833519 2626.81 0.31850004364990833519 Total Cost of Goods Sold \N \N 4643 4 30 mfgadmin 27 2 T -1 \N 1015.00 \N \N 0.00 \N 0.12306849155616773205 \N \N 0.00000000000000000000 8 1015.00 0.12306849155616773205 1015.00 0.12306849155616773205 Total General Expenses \N \N 4644 4 30 mfgadmin 28 0 T -1 0.00 4605.63 0.00 0.00 0.00 \N \N \N \N \N \N 4605.63 \N 4605.63 \N Net Income \N \N 4645 11 31 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 4646 11 31 mfgadmin 48 1 T -1 \N 1056298.27 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 1056298.27 \N Total Liabilities and Owners Equity \N \N 4647 11 31 mfgadmin 37 2 T -1 \N 6531.69 \N \N \N \N 0.00618356593540572588 \N \N \N 37 \N \N 6531.69 \N Total Liabilities \N \N 4648 11 31 mfgadmin 33 3 T -1 \N 1531.69 \N \N \N \N 0.23450133120218503940 \N \N \N 38 \N \N 1531.69 \N Total Current Liabilities \N \N 4649 11 31 mfgadmin 36 3 T -1 \N 5000.00 \N \N \N \N 0.00473351149197659862 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 4650 11 31 mfgadmin 47 2 T -1 \N 1049766.58 \N \N \N \N 0.99381643406459427412 \N \N \N 40 \N \N 1049766.58 \N Total Owners Equity \N \N 4651 11 31 mfgadmin 41 3 T -1 \N 1020000.00 \N \N \N \N 0.96563634436322611794 \N \N \N 41 \N \N 1020000.00 \N Total Shareholders Equity \N \N 4652 11 31 mfgadmin 46 3 T -1 \N 23457.13 \N \N \N \N 0.02220691888475780615 \N \N \N 43 \N \N 23457.13 \N Total Retained Earniangs \N \N 4653 11 31 mfgadmin 1 0 G 44 0.00 1056298.27 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 1056298.27 \N \N \N \N 4654 11 31 mfgadmin 2 1 G 45 0.00 1055298.27 0.00 0.00 0.00 \N 0.99905329770160468028 \N \N \N 44 0.00 \N 1055298.27 \N \N \N \N 4655 11 31 mfgadmin 3 2 I 65 \N 1023441.40 \N \N \N \N 0.96889432565292377124 \N \N \N 45 \N \N 1023441.40 0.96889432565292377124 \N \N \N 4656 11 31 mfgadmin 4 2 I 242 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 4657 11 31 mfgadmin 5 2 I 243 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 4658 11 31 mfgadmin 6 2 I 66 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4659 11 31 mfgadmin 7 2 I 67 \N 31878.87 \N \N \N \N 0.03017979949924560607 \N \N \N 45 \N \N 31878.87 \N \N \N \N 4660 11 31 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4661 11 31 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4662 11 31 mfgadmin 10 2 I 70 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4663 11 31 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4664 11 31 mfgadmin 12 2 I 72 \N -22.00 \N \N \N \N -0.000020827450564697033916 \N \N \N 45 \N \N -22.00 \N \N \N \N 4665 11 31 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4666 11 31 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4667 11 31 mfgadmin 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00094670229839531972 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 4668 11 31 mfgadmin 18 2 I 76 \N 1000.00 \N \N \N \N 0.00094670229839531972 \N \N \N 46 \N \N 1000.00 \N \N \N \N 4669 11 31 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 4670 11 31 mfgadmin 23 0 G 36 0.00 1056298.27 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 1056298.27 \N \N \N \N 4671 11 31 mfgadmin 24 1 G 37 0.00 6531.69 0.00 0.00 0.00 \N 0.00618356593540572588 \N \N \N 36 0.00 \N 6531.69 \N \N \N \N 4672 11 31 mfgadmin 25 2 G 38 0.00 1531.69 0.00 0.00 0.00 \N 0.23450133120218503940 \N \N \N 37 0.00 \N 1531.69 \N \N \N \N 4673 11 31 mfgadmin 26 3 I 47 \N 262.95 \N \N \N \N 0.00024893536936304932 \N \N \N 38 \N \N 262.95 \N \N \N \N 4674 11 31 mfgadmin 27 3 I 46 \N 45.98 \N \N \N \N 0.000043529371680216800885 \N \N \N 38 \N \N 45.98 \N \N \N \N 4675 11 31 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4676 11 31 mfgadmin 29 3 I 49 \N 624.22 \N \N \N \N 0.00059095050870432648 \N \N \N 38 \N \N 624.22 \N \N \N \N 4677 11 31 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 4678 11 31 mfgadmin 31 3 I 50 \N 598.54 \N \N \N \N 0.00056663919368153467 \N \N \N 38 \N \N 598.54 \N \N \N \N 4679 11 31 mfgadmin 32 3 I 51 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4680 11 31 mfgadmin 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00473351149197659862 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 4681 11 31 mfgadmin 35 3 I 140 \N 5000.00 \N \N \N \N 0.00473351149197659862 \N \N \N 39 \N \N 5000.00 \N \N \N \N 4682 11 31 mfgadmin 38 1 G 40 0.00 1049766.58 0.00 0.00 0.00 \N 0.99381643406459427412 \N \N \N 36 0.00 \N 1049766.58 \N \N \N \N 4683 11 31 mfgadmin 39 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N 0.96563634436322611794 \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 4684 11 31 mfgadmin 40 3 I 52 \N 1020000.00 \N \N \N \N 0.96563634436322611794 \N \N \N 41 \N \N 1020000.00 \N \N \N \N 4685 11 31 mfgadmin 42 2 G 42 \N 6309.45 \N \N \N \N 0.00597317081661035003 \N \N \N 40 \N \N 6309.45 \N \N \N \N 4686 11 31 mfgadmin 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N 0.02220691888475780615 \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 4687 11 31 mfgadmin 44 3 I 63 \N 23457.13 \N \N \N \N 0.02220691888475780615 \N \N \N 43 \N \N 23457.13 \N \N \N \N 4688 11 31 mfgadmin 45 3 I 64 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 43 \N \N 0.00 \N \N \N \N 4689 11 31 mfgadmin 22 1 T -1 \N 1056298.27 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 1056298.27 \N Total Assets \N \N 4690 11 31 mfgadmin 16 2 T -1 \N 1055298.27 \N \N \N \N 0.99905329770160468028 \N \N \N 45 \N \N 1055298.27 \N Total Current Assets \N \N 4691 11 31 mfgadmin 19 2 T -1 \N 1000.00 \N \N \N \N 0.00094670229839531972 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 4692 11 31 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4693 11 30 mfgadmin 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00094834914084357003 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 4694 11 30 mfgadmin 18 2 I 76 \N 1000.00 \N \N \N \N 0.00094834914084357003 \N \N \N 46 \N \N 1000.00 \N \N \N \N 4695 11 30 mfgadmin 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 4696 11 30 mfgadmin 23 0 G 36 0.00 1054463.97 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 1054463.97 \N \N \N \N 4697 11 30 mfgadmin 24 1 G 37 0.00 6401.21 0.00 0.00 0.00 \N 0.00607058200385926889 \N \N \N 36 0.00 \N 6401.21 \N \N \N \N 4698 11 30 mfgadmin 25 2 G 38 0.00 1401.21 0.00 0.00 0.00 \N 0.21889767715791233220 \N \N \N 37 0.00 \N 1401.21 \N \N \N \N 4699 11 30 mfgadmin 26 3 I 47 \N 262.95 \N \N \N \N 0.00024936840658481674 \N \N \N 38 \N \N 262.95 \N \N \N \N 4700 11 30 mfgadmin 27 3 I 46 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4701 11 30 mfgadmin 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4702 11 30 mfgadmin 29 3 I 49 \N 587.22 \N \N \N \N 0.00055688958248616119 \N \N \N 38 \N \N 587.22 \N \N \N \N 4703 11 30 mfgadmin 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 4704 11 30 mfgadmin 31 3 I 50 \N 551.04 \N \N \N \N 0.00052257831057044083 \N \N \N 38 \N \N 551.04 \N \N \N \N 4705 11 30 mfgadmin 32 3 I 51 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4706 11 30 mfgadmin 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00474174570421785014 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 4707 11 30 mfgadmin 35 3 I 140 \N 5000.00 \N \N \N \N 0.00474174570421785014 \N \N \N 39 \N \N 5000.00 \N \N \N \N 4708 11 30 mfgadmin 38 1 G 40 0.00 1048062.76 0.00 0.00 0.00 \N 0.99392941799614073111 \N \N \N 36 0.00 \N 1048062.76 \N \N \N \N 4709 11 30 mfgadmin 39 2 G 41 0.00 1020000.00 0.00 0.00 0.00 \N 0.96731612366044142788 \N \N \N 40 0.00 \N 1020000.00 \N \N \N \N 4710 11 30 mfgadmin 40 3 I 52 \N 1020000.00 \N \N \N \N 0.96731612366044142788 \N \N \N 41 \N \N 1020000.00 \N \N \N \N 4711 11 30 mfgadmin 42 2 G 42 \N 4605.63 \N \N \N \N 0.00436774525354337143 \N \N \N 40 \N \N 4605.63 \N \N \N \N 4712 11 30 mfgadmin 43 2 G 43 0.00 23457.13 0.00 0.00 0.00 \N 0.02224554908215593180 \N \N \N 40 0.00 \N 23457.13 \N \N \N \N 4713 11 30 mfgadmin 44 3 I 63 \N 23457.13 \N \N \N \N 0.02224554908215593180 \N \N \N 43 \N \N 23457.13 \N \N \N \N 4714 11 30 mfgadmin 45 3 I 64 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 43 \N \N 0.00 \N \N \N \N 4715 11 30 mfgadmin 22 1 T -1 \N 1054463.97 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 1054463.97 \N Total Assets \N \N 4716 11 30 mfgadmin 16 2 T -1 \N 1053463.97 \N \N \N \N 0.99905165085915642997 \N \N \N 45 \N \N 1053463.97 \N Total Current Assets \N \N 4717 11 30 mfgadmin 19 2 T -1 \N 1000.00 \N \N \N \N 0.00094834914084357003 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 4718 11 30 mfgadmin 21 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 4719 11 30 mfgadmin 48 1 T -1 \N 1054463.97 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 1054463.97 \N Total Liabilities and Owners Equity \N \N 4720 11 30 mfgadmin 37 2 T -1 \N 6401.21 \N \N \N \N 0.00607058200385926889 \N \N \N 37 \N \N 6401.21 \N Total Liabilities \N \N 4721 11 30 mfgadmin 33 3 T -1 \N 1401.21 \N \N \N \N 0.21889767715791233220 \N \N \N 38 \N \N 1401.21 \N Total Current Liabilities \N \N 4722 11 30 mfgadmin 36 3 T -1 \N 5000.00 \N \N \N \N 0.00474174570421785014 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 4723 11 30 mfgadmin 47 2 T -1 \N 1048062.76 \N \N \N \N 0.99392941799614073111 \N \N \N 40 \N \N 1048062.76 \N Total Owners Equity \N \N 4724 11 30 mfgadmin 41 3 T -1 \N 1020000.00 \N \N \N \N 0.96731612366044142788 \N \N \N 41 \N \N 1020000.00 \N Total Shareholders Equity \N \N 4725 11 30 mfgadmin 46 3 T -1 \N 23457.13 \N \N \N \N 0.02224554908215593180 \N \N \N 43 \N \N 23457.13 \N Total Retained Earniangs \N \N 4726 11 30 mfgadmin 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 4727 11 30 mfgadmin 1 0 G 44 0.00 1054463.97 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 1054463.97 \N \N \N \N 4728 11 30 mfgadmin 2 1 G 45 0.00 1053463.97 0.00 0.00 0.00 \N 0.99905165085915642997 \N \N \N 44 0.00 \N 1053463.97 \N \N \N \N 4729 11 30 mfgadmin 3 2 I 65 \N 1020406.90 \N \N \N \N 0.96770200692585067653 \N \N \N 45 \N \N 1020406.90 0.96770200692585067653 \N \N \N 4730 11 30 mfgadmin 4 2 I 242 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 4731 11 30 mfgadmin 5 2 I 243 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 4732 11 30 mfgadmin 6 2 I 66 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4733 11 30 mfgadmin 7 2 I 67 \N 33079.07 \N \N \N \N 0.03137050761440431198 \N \N \N 45 \N \N 33079.07 \N \N \N \N 4734 11 30 mfgadmin 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4735 11 30 mfgadmin 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4736 11 30 mfgadmin 10 2 I 70 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4737 11 30 mfgadmin 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4738 11 30 mfgadmin 12 2 I 72 \N -22.00 \N \N \N \N -0.000020863681098558540601 \N \N \N 45 \N \N -22.00 \N \N \N \N 4739 11 30 mfgadmin 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4740 11 30 mfgadmin 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4741 11 30 mfgadmin 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4742 13 42 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 43248.06 \N 43248.06 \N \N \N \N 4743 13 42 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 43248.06 \N 43248.06 \N \N \N \N 4744 13 42 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 27416.56 \N 27416.56 \N \N \N \N 4745 13 42 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 27416.56 \N 27416.56 \N \N \N \N 4746 13 42 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4747 13 42 mfgadmin 7 3 I 119 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N \N 4748 13 42 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4749 13 42 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4750 13 42 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -831.50 \N -831.50 \N \N \N \N 4751 13 42 mfgadmin 13 3 I 120 \N \N \N \N \N \N \N \N \N \N 68 -831.50 \N -831.50 \N \N \N \N 4752 13 42 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -15000.00 \N -15000.00 \N \N \N \N 4753 13 42 mfgadmin 16 3 I 121 \N \N \N \N \N \N \N \N \N \N 69 -14966.12 \N -14966.12 \N \N \N \N 4754 13 42 mfgadmin 17 3 I 122 \N \N \N \N \N \N \N \N \N \N 69 -33.88 \N -33.88 \N \N \N \N 4755 13 42 mfgadmin 18 3 I 123 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4756 13 42 mfgadmin 19 3 I 124 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4757 13 42 mfgadmin 20 3 I 137 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4758 13 42 mfgadmin 21 3 I 138 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N \N 4759 13 42 mfgadmin 23 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4760 13 42 mfgadmin 24 3 I 125 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N \N 4761 13 42 mfgadmin 26 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4762 13 42 mfgadmin 27 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4763 13 42 mfgadmin 28 3 I 126 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4764 13 42 mfgadmin 29 3 I 127 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4765 13 42 mfgadmin 30 3 I 129 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4766 13 42 mfgadmin 31 3 I 130 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4767 13 42 mfgadmin 32 3 I 131 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N \N 4768 13 42 mfgadmin 33 3 I 240 \N \N \N \N \N \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N \N \N 4769 13 42 mfgadmin 35 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4770 13 42 mfgadmin 37 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4771 13 42 mfgadmin 39 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4772 13 42 mfgadmin 40 3 I 132 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N \N 4773 13 42 mfgadmin 42 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4774 13 42 mfgadmin 44 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N \N 4775 13 42 mfgadmin 46 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 4776 13 42 mfgadmin 47 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4777 13 42 mfgadmin 48 3 I 133 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N \N 4778 13 42 mfgadmin 50 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4779 13 42 mfgadmin 52 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N \N 4780 13 42 mfgadmin 54 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N \N 4781 13 42 mfgadmin 55 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N \N 4782 4 44 mfgadmin 1 0 G 3 0.00 106597.56 0.00 0.00 0.00 \N 0.69439190786915168251 \N \N 0.00000000000000000000 -1 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 \N \N \N 4783 4 44 mfgadmin 2 1 G 4 0.00 153512.10 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 4784 4 44 mfgadmin 3 2 I 2 \N 152889.11 \N \N 0.00 \N 0.99594175312564937878 \N \N 0.00000000000000000000 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 4785 4 44 mfgadmin 4 2 I 218 \N 96.96 \N \N 0.00 \N 0.00063161144952091724 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4786 4 44 mfgadmin 5 2 I 219 \N 345.03 \N \N 0.00 \N 0.00224757527256809072 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4787 4 44 mfgadmin 7 2 I 3 \N 181.00 \N \N 0.00 \N 0.00117906015226161325 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4788 4 44 mfgadmin 9 1 G 5 0.00 46914.54 0.00 0.00 0.00 \N 0.30560809213084831749 \N \N 0.00000000000000000000 3 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 4789 4 44 mfgadmin 10 2 I 246 \N 46914.54 \N \N 0.00 \N 0.30560809213084831749 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 4790 4 44 mfgadmin 13 0 G 7 0.00 11490.32 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 4791 4 44 mfgadmin 14 1 G 8 0.00 11490.32 0.00 0.00 0.00 \N 0.07484960468914176798 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4792 4 44 mfgadmin 15 2 I 5 \N 5000.00 \N \N 0.00 \N 0.03257072243816611199 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4793 4 44 mfgadmin 16 2 I 235 \N 5128.50 0.00 0.00 \N \N 0.03340779000482698107 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4794 4 44 mfgadmin 17 2 I 236 \N 1000.00 0.00 0.00 \N \N 0.00651414448763322240 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4795 4 44 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4796 4 44 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4797 4 44 mfgadmin 20 2 I 6 \N 1000.00 \N \N 0.00 \N 0.00651414448763322240 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4798 4 44 mfgadmin 21 2 I 11 \N -638.18 \N \N 0.00 \N -0.00415719672911776987 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4799 4 44 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4800 4 44 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4801 4 44 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4802 4 44 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4803 4 44 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4804 4 44 mfgadmin 12 1 T -1 \N 106597.56 \N \N 0.00 \N 0.69439190786915168251 \N \N 0.00000000000000000000 3 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 Total Net Revenue \N \N 4805 4 44 mfgadmin 8 2 T -1 \N 153512.10 \N \N \N \N 1.00000000000000000000 \N \N \N 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 Total Sales \N \N 4806 4 44 mfgadmin 11 2 T -1 \N 46914.54 \N \N 0.00 \N 0.30560809213084831749 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 Total Cost of Goods Sold \N \N 4807 4 44 mfgadmin 27 2 T -1 \N 11490.32 \N \N 0.00 \N 0.07484960468914176798 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 Total General Expenses \N \N 4808 4 44 mfgadmin 28 0 T -1 0.00 95107.24 0.00 0.00 0.00 \N \N \N \N \N \N 35000.00 \N 35000.00 \N Net Income \N \N 4809 4 43 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4810 4 43 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4811 4 43 mfgadmin 12 1 T -1 \N 71597.56 \N \N 0.00 \N 0.69168300131095784937 \N \N 0.00000000000000000000 3 35819.18 0.68756711227103126294 35819.18 0.68756711227103126294 Total Net Revenue \N \N 4812 4 43 mfgadmin 8 2 T -1 \N 103512.10 \N \N \N \N 1.00000000000000000000 \N \N \N 4 52095.54 1.00000000000000000000 52095.54 1.00000000000000000000 Total Sales \N \N 4813 4 43 mfgadmin 11 2 T -1 \N 31914.54 \N \N 0.00 \N 0.30831699868904215063 \N \N 0.00000000000000000000 5 16276.36 0.31243288772896873706 16276.36 0.31243288772896873706 Total Cost of Goods Sold \N \N 4814 4 43 mfgadmin 27 2 T -1 \N 11490.32 \N \N 0.00 \N 0.11100460719085015182 \N \N 0.00000000000000000000 8 3128.50 0.06005312546909006030 3128.50 0.06005312546909006030 Total General Expenses \N \N 4815 13 53 mfgadmin 73 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 1730.00 \N 1730.00 \N \N \N M 4816 4 43 mfgadmin 28 0 T -1 0.00 60107.24 -128.50 0.00 0.00 \N \N \N \N \N \N 32690.68 \N 32690.68 \N Net Income \N \N 4817 4 43 mfgadmin 1 0 G 3 0.00 71597.56 0.00 0.00 0.00 \N 0.69168300131095784937 \N \N 0.00000000000000000000 -1 35819.18 0.68756711227103126294 35819.18 0.68756711227103126294 \N \N \N 4818 4 43 mfgadmin 2 1 G 4 0.00 103512.10 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 52095.54 1.00000000000000000000 52095.54 1.00000000000000000000 \N \N \N 4819 4 43 mfgadmin 3 2 I 2 \N 102889.11 \N \N 0.00 \N 0.99398147656167733048 \N \N 0.00000000000000000000 4 51900.01 0.99624670365255835720 51900.01 0.99624670365255835720 \N \N \N 4820 4 43 mfgadmin 4 2 I 218 \N 96.96 \N \N 0.00 \N 0.00093670208603631846 \N \N 0.00000000000000000000 4 47.50 0.00091178630646692596 47.50 \N \N \N \N 4821 4 43 mfgadmin 5 2 I 219 \N 345.03 \N \N 0.00 \N 0.00333323350603456021 \N \N 0.00000000000000000000 4 147.03 0.00282231453978593945 147.03 \N \N \N \N 4822 4 43 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4823 4 43 mfgadmin 7 2 I 3 \N 181.00 \N \N 0.00 \N 0.00174858784625179085 \N \N 0.00000000000000000000 4 1.00 0.000019195501188777388621 1.00 0.000019195501188777388621 \N \N \N 4824 4 43 mfgadmin 9 1 G 5 0.00 31914.54 0.00 0.00 0.00 \N 0.30831699868904215063 \N \N 0.00000000000000000000 3 16276.36 0.31243288772896873706 16276.36 0.31243288772896873706 \N \N \N 4825 4 43 mfgadmin 10 2 I 246 \N 31914.54 \N \N 0.00 \N 0.30831699868904215063 \N \N 0.00000000000000000000 5 16276.36 0.31243288772896873706 16276.36 0.31243288772896873706 \N \N \N 4826 4 43 mfgadmin 13 0 G 7 0.00 11490.32 128.50 0.00 0.00 \N \N \N \N \N -1 3128.50 \N 3128.50 \N \N \N \N 4827 4 43 mfgadmin 14 1 G 8 0.00 11490.32 128.50 0.00 0.00 \N 0.11100460719085015182 \N \N 0.00000000000000000000 7 3128.50 0.06005312546909006030 3128.50 0.06005312546909006030 \N \N \N 4828 4 43 mfgadmin 15 2 I 5 \N 5000.00 \N \N 0.00 \N 0.04830353166441411197 \N \N 0.00000000000000000000 8 3000.00 0.05758650356633216586 3000.00 0.05758650356633216586 \N \N \N 4829 4 43 mfgadmin 16 2 I 235 \N 5128.50 128.50 0.00 \N \N 0.04954493242818955465 128.5000000000000000 0.00000000000000000000 \N 8 128.50 0.00246662190275789444 128.50 0.00246662190275789444 \N \N \N 4830 4 43 mfgadmin 17 2 I 236 \N 1000.00 0.00 0.00 \N \N 0.00966070633288282239 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4831 4 43 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4832 4 43 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4833 4 43 mfgadmin 20 2 I 6 \N 1000.00 \N \N 0.00 \N 0.00966070633288282239 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4834 4 43 mfgadmin 21 2 I 11 \N -638.18 \N \N 0.00 \N -0.00616526956751915960 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4835 4 43 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4836 4 43 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4837 4 43 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4838 4 42 mfgadmin 10 2 I 246 \N 15638.18 \N \N 0.00 \N 0.30414675738711419045 \N \N 0.00000000000000000000 5 15638.18 0.30414675738711419045 15638.18 0.30414675738711419045 \N \N \N 4839 4 42 mfgadmin 14 1 G 8 0.00 8361.82 6000.00 0.00 0.00 \N 0.16262892733391732158 \N \N 0.00000000000000000000 7 8361.82 0.16262892733391732158 8361.82 0.16262892733391732158 \N \N \N 4840 4 42 mfgadmin 15 2 I 5 \N 2000.00 \N \N 0.00 \N 0.03889797372675262600 \N \N 0.00000000000000000000 8 2000.00 0.03889797372675262600 2000.00 0.03889797372675262600 \N \N \N 4841 4 42 mfgadmin 16 2 I 235 \N 5000.00 5000.00 0.00 \N \N 0.09724493431688156501 5000.0000000000000000 0.00000000000000000000 \N 8 5000.00 0.09724493431688156501 5000.00 0.09724493431688156501 \N \N \N 4842 4 42 mfgadmin 17 2 I 236 \N 1000.00 1000.00 0.00 \N \N 0.01944898686337631300 1000.0000000000000000 0.00000000000000000000 \N 8 1000.00 0.01944898686337631300 1000.00 0.01944898686337631300 \N \N \N 4843 4 42 mfgadmin 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4844 4 42 mfgadmin 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4845 4 42 mfgadmin 20 2 I 6 \N 1000.00 \N \N 0.00 \N 0.01944898686337631300 \N \N 0.00000000000000000000 8 1000.00 0.01944898686337631300 1000.00 0.01944898686337631300 \N \N \N 4846 4 42 mfgadmin 21 2 I 11 \N -638.18 \N \N 0.00 \N -0.01241195443646949543 \N \N 0.00000000000000000000 8 -638.18 -0.01241195443646949543 -638.18 -0.01241195443646949543 \N \N \N 4847 4 42 mfgadmin 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4848 4 42 mfgadmin 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4849 4 42 mfgadmin 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4850 4 42 mfgadmin 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4851 4 42 mfgadmin 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4852 4 42 mfgadmin 12 1 T -1 \N 35778.38 \N \N 0.00 \N 0.69585324261288580955 \N \N 0.00000000000000000000 3 35778.38 0.69585324261288580955 35778.38 0.69585324261288580955 Total Net Revenue \N \N 4853 4 42 mfgadmin 8 2 T -1 \N 51416.56 \N \N \N \N 1.00000000000000000000 \N \N \N 4 51416.56 1.00000000000000000000 51416.56 1.00000000000000000000 Total Sales \N \N 4854 4 42 mfgadmin 11 2 T -1 \N 15638.18 \N \N 0.00 \N 0.30414675738711419045 \N \N 0.00000000000000000000 5 15638.18 0.30414675738711419045 15638.18 0.30414675738711419045 Total Cost of Goods Sold \N \N 4855 4 42 mfgadmin 27 2 T -1 \N 8361.82 \N \N 0.00 \N 0.16262892733391732158 \N \N 0.00000000000000000000 8 8361.82 0.16262892733391732158 8361.82 0.16262892733391732158 Total General Expenses \N \N 4856 4 42 mfgadmin 28 0 T -1 0.00 27416.56 -6000.00 0.00 0.00 \N \N \N \N \N \N 27416.56 \N 27416.56 \N Net Income \N \N 4857 4 42 mfgadmin 1 0 G 3 0.00 35778.38 0.00 0.00 0.00 \N 0.69585324261288580955 \N \N 0.00000000000000000000 -1 35778.38 0.69585324261288580955 35778.38 0.69585324261288580955 \N \N \N 4858 4 42 mfgadmin 2 1 G 4 0.00 51416.56 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 51416.56 1.00000000000000000000 51416.56 1.00000000000000000000 \N \N \N 4859 4 42 mfgadmin 3 2 I 2 \N 50989.10 \N \N 0.00 \N 0.99168633607538116124 \N \N 0.00000000000000000000 4 50989.10 0.99168633607538116124 50989.10 0.99168633607538116124 \N \N \N 4860 4 42 mfgadmin 4 2 I 218 \N 49.46 \N \N 0.00 \N 0.00096194689026259244 \N \N 0.00000000000000000000 4 49.46 0.00096194689026259244 49.46 \N \N \N \N 4861 4 42 mfgadmin 5 2 I 219 \N 198.00 \N \N 0.00 \N 0.00385089939894850997 \N \N 0.00000000000000000000 4 198.00 0.00385089939894850997 198.00 \N \N \N \N 4862 4 42 mfgadmin 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4863 4 42 mfgadmin 7 2 I 3 \N 180.00 \N \N 0.00 \N 0.00350081763540773634 \N \N 0.00000000000000000000 4 180.00 0.00350081763540773634 180.00 0.00350081763540773634 \N \N \N 4864 4 42 mfgadmin 9 1 G 5 0.00 15638.18 0.00 0.00 0.00 \N 0.30414675738711419045 \N \N 0.00000000000000000000 3 15638.18 0.30414675738711419045 15638.18 0.30414675738711419045 \N \N \N 4865 4 42 mfgadmin 13 0 G 7 0.00 8361.82 6000.00 0.00 0.00 \N \N \N \N \N -1 8361.82 \N 8361.82 \N \N \N \N 4866 11 45 jsmith 2 1 G 45 0.00 2761283.75 0.00 0.00 0.00 \N 0.99963798071070721826 \N \N \N 44 0.00 \N 2761283.75 \N \N \N \N 4867 11 45 jsmith 3 2 I 65 \N 2578626.47 \N \N \N \N 0.93351252202095458151 \N \N \N 45 \N \N 2578626.47 0.93351252202095458151 \N \N \N 4868 11 45 jsmith 4 2 I 242 \N 24743.00 \N \N \N \N 0.00895744327497129866 \N \N \N 45 \N \N 24743.00 0.00895744327497129866 \N \N \N 4869 11 45 jsmith 5 2 I 243 \N 26052.03 \N \N \N \N 0.00943133738523422874 \N \N \N 45 \N \N 26052.03 0.00943133738523422874 \N \N \N 4870 11 45 jsmith 6 2 I 66 \N 0.01 \N \N \N \N 0.0000000036201928929278174264 \N \N \N 45 \N \N 0.01 \N \N \N \N 4871 11 45 jsmith 7 2 I 67 \N 173907.46 \N \N \N \N 0.06295785507191286920 \N \N \N 45 \N \N 173907.46 \N \N \N \N 4872 11 45 jsmith 8 2 I 68 \N 0.01 \N \N \N \N 0.0000000036201928929278174264 \N \N \N 45 \N \N 0.01 \N \N \N \N 4873 11 45 jsmith 10 2 I 70 \N -41805.23 \N \N \N \N -0.01513429965332127809 \N \N \N 45 \N \N -41805.23 \N \N \N \N 4874 11 45 jsmith 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4875 11 45 jsmith 12 2 I 72 \N -240.00 \N \N \N \N -0.000086884629430267618234 \N \N \N 45 \N \N -240.00 \N \N \N \N 4876 11 45 jsmith 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4877 11 45 jsmith 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4878 11 45 jsmith 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4879 11 45 jsmith 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00036201928929278174 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 4880 11 45 jsmith 18 2 I 76 \N 1000.00 \N \N \N \N 0.00036201928929278174 \N \N \N 46 \N \N 1000.00 \N \N \N \N 4881 11 45 jsmith 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 4882 11 45 jsmith 23 0 G 36 0.00 2762283.75 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2762283.75 \N \N \N \N 4883 11 45 jsmith 24 1 G 37 0.00 7013.57 0.00 0.00 0.00 \N 0.00253904762680517525 \N \N \N 36 0.00 \N 7013.57 \N \N \N \N 4884 11 45 jsmith 25 2 G 38 0.00 2013.57 0.00 0.00 0.00 \N 0.28709630045754159437 \N \N \N 37 0.00 \N 2013.57 \N \N \N \N 4885 11 45 jsmith 26 3 I 47 \N 262.95 \N \N \N \N 0.000095192972119536959228 \N \N \N 38 \N \N 262.95 \N \N \N \N 4886 11 45 jsmith 27 3 I 46 \N 526.61 \N \N \N \N 0.00019064297793447179 \N \N \N 38 \N \N 526.61 \N \N \N \N 4887 11 45 jsmith 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4888 11 45 jsmith 29 3 I 49 \N 624.22 \N \N \N \N 0.00022597968076234022 \N \N \N 38 \N \N 624.22 \N \N \N \N 4889 11 45 jsmith 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 4890 11 45 jsmith 31 3 I 50 \N 598.54 \N \N \N \N 0.00021668302541330158 \N \N \N 38 \N \N 598.54 \N \N \N \N 4891 11 45 jsmith 32 3 I 51 \N 1.25 \N \N \N \N 0.000000452524111615977178 \N \N \N 38 \N \N 1.25 \N \N \N \N 4892 11 45 jsmith 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00181009644646390871 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 4893 11 45 jsmith 35 3 I 140 \N 5000.00 \N \N \N \N 0.00181009644646390871 \N \N \N 39 \N \N 5000.00 \N \N \N \N 4894 11 45 jsmith 38 1 G 40 0.00 2755270.18 0.00 0.00 0.00 \N 0.99746095237319482475 \N \N \N 36 0.00 \N 2755270.18 \N \N \N \N 4895 11 45 jsmith 39 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.51406739079575007455 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 4896 11 45 jsmith 40 3 I 52 \N 1420000.00 \N \N \N \N 0.51406739079575007455 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 4897 11 45 jsmith 41 3 I 247 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 41 \N \N 0.00 0.000000000000000000000000 \N \N \N 4898 11 45 jsmith 43 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.43543218179522650416 \N \N \N 40 0.00 \N 1202787.24 \N \N \N \N 4899 11 45 jsmith 44 3 I 63 \N 1202787.24 \N \N \N \N 0.43543218179522650416 \N \N \N 43 \N \N 1202787.24 \N \N \N \N 4900 11 45 jsmith 46 2 G 42 \N 132482.94 \N \N \N \N 0.04796137978221824604 \N \N \N 40 \N \N 132482.94 \N \N \N \N 4901 11 45 jsmith 22 1 T -1 \N 2762283.75 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2762283.75 \N Total Assets \N \N 4902 11 44 jsmith 18 2 I 76 \N 1000.00 \N \N \N \N 0.00036702179267133454 \N \N \N 46 \N \N 1000.00 \N \N \N \N 4903 11 44 jsmith 20 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 4904 11 44 jsmith 23 0 G 36 0.00 2724633.85 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2724633.85 \N \N \N \N 4905 11 44 jsmith 24 1 G 37 0.00 6739.37 0.00 0.00 0.00 \N 0.00247349565887541183 \N \N \N 36 0.00 \N 6739.37 \N \N \N \N 4906 11 44 jsmith 25 2 G 38 0.00 1739.37 0.00 0.00 0.00 \N 0.25809088980127222574 \N \N \N 37 0.00 \N 1739.37 \N \N \N \N 4907 11 44 jsmith 26 3 I 47 \N 262.95 \N \N \N \N 0.000096508380382927416100 \N \N \N 38 \N \N 262.95 \N \N \N \N 4908 11 44 jsmith 27 3 I 46 \N 252.41 \N \N \N \N 0.000092639970688171550097 \N \N \N 38 \N \N 252.41 \N \N \N \N 4909 11 44 jsmith 28 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 4910 11 44 jsmith 29 3 I 49 \N 624.22 \N \N \N \N 0.00022910234342130044 \N \N \N 38 \N \N 624.22 \N \N \N \N 4911 11 44 jsmith 30 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 4912 11 44 jsmith 31 3 I 50 \N 598.54 \N \N \N \N 0.00021967722378550057 \N \N \N 38 \N \N 598.54 \N \N \N \N 4913 11 44 jsmith 32 3 I 51 \N 1.25 \N \N \N \N 0.000000458777240839168169 \N \N \N 38 \N \N 1.25 \N \N \N \N 4914 13 49 mfgadmin 47 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 36302.16 \N 30673.66 \N \N \N M 4915 11 44 jsmith 34 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00183510896335667268 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 4916 11 44 jsmith 35 3 I 140 \N 5000.00 \N \N \N \N 0.00183510896335667268 \N \N \N 39 \N \N 5000.00 \N \N \N \N 4917 11 44 jsmith 38 1 G 40 0.00 2717894.48 0.00 0.00 0.00 \N 0.99752650434112458817 \N \N \N 36 0.00 \N 2717894.48 \N \N \N \N 4918 11 44 jsmith 39 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.52117094559329504036 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 4919 11 44 jsmith 40 3 I 52 \N 1420000.00 \N \N \N \N 0.52117094559329504036 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 4920 11 44 jsmith 41 3 I 247 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 41 \N \N 0.00 0.000000000000000000000000 \N \N \N 4921 11 44 jsmith 43 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.44144912902700669303 \N \N \N 40 0.00 \N 1202787.24 \N \N \N \N 4922 11 44 jsmith 44 3 I 63 \N 1202787.24 \N \N \N \N 0.44144912902700669303 \N \N \N 43 \N \N 1202787.24 \N \N \N \N 4923 11 44 jsmith 46 2 G 42 \N 95107.24 \N \N \N \N 0.03490642972082285478 \N \N \N 40 \N \N 95107.24 \N \N \N \N 4924 11 44 jsmith 22 1 T -1 \N 2724633.85 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2724633.85 \N Total Assets \N \N 4925 11 44 jsmith 16 2 T -1 \N 2723633.85 \N \N \N \N 0.99963297820732866546 \N \N \N 45 \N \N 2723633.85 \N Total Current Assets \N \N 4926 11 44 jsmith 19 2 T -1 \N 1000.00 \N \N \N \N 0.00036702179267133454 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 4927 11 44 jsmith 48 1 T -1 \N 2724633.85 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2724633.85 \N Total Liabilities and Owners Equity \N \N 4928 11 44 jsmith 37 2 T -1 \N 6739.37 \N \N \N \N 0.00247349565887541183 \N \N \N 37 \N \N 6739.37 \N Total Liabilities \N \N 4929 11 44 jsmith 33 3 T -1 \N 1739.37 \N \N \N \N 0.25809088980127222574 \N \N \N 38 \N \N 1739.37 \N Total Current Liabilities \N \N 4930 11 44 jsmith 36 3 T -1 \N 5000.00 \N \N \N \N 0.00183510896335667268 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 4931 11 44 jsmith 47 2 T -1 \N 2717894.48 \N \N \N \N 0.99752650434112458817 \N \N \N 40 \N \N 2717894.48 \N Total Owners Equity \N \N 4932 11 44 jsmith 42 3 T -1 \N 1420000.00 \N \N \N \N 0.52117094559329504036 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 4933 11 44 jsmith 45 3 T -1 \N 1202787.24 \N \N \N \N 0.44144912902700669303 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N \N 4934 11 44 jsmith 49 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 4935 11 45 jsmith 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4936 11 44 jsmith 1 0 G 44 0.00 2724633.85 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2724633.85 \N \N \N \N 4937 11 44 jsmith 2 1 G 45 0.00 2723633.85 0.00 0.00 0.00 \N 0.99963297820732866546 \N \N \N 44 0.00 \N 2723633.85 \N \N \N \N 4938 11 44 jsmith 3 2 I 65 \N 2535514.97 \N \N \N \N 0.93058924963440500455 \N \N \N 45 \N \N 2535514.97 0.93058924963440500455 \N \N \N 4939 11 44 jsmith 4 2 I 242 \N 24743.00 \N \N \N \N 0.00908122021606683041 \N \N \N 45 \N \N 24743.00 0.00908122021606683041 \N \N \N 4940 11 44 jsmith 5 2 I 243 \N 26052.03 \N \N \N \N 0.00956166275332738746 \N \N \N 45 \N \N 26052.03 0.00956166275332738746 \N \N \N 4941 11 44 jsmith 6 2 I 66 \N 0.01 \N \N \N \N 0.0000000036702179267133453546 \N \N \N 45 \N \N 0.01 \N \N \N \N 4942 11 44 jsmith 7 2 I 67 \N 179304.46 \N \N \N \N 0.06580864434316559636 \N \N \N 45 \N \N 179304.46 \N \N \N \N 4943 11 44 jsmith 8 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4944 11 44 jsmith 9 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4945 11 44 jsmith 10 2 I 70 \N -41740.62 \N \N \N \N -0.01531971717961295974 \N \N \N 45 \N \N -41740.62 \N \N \N \N 4946 11 44 jsmith 11 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4947 11 44 jsmith 12 2 I 72 \N -240.00 \N \N \N \N -0.000088085230241120288511 \N \N \N 45 \N \N -240.00 \N \N \N \N 4948 11 44 jsmith 13 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4949 11 44 jsmith 14 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4950 11 44 jsmith 15 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 4951 11 44 jsmith 17 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00036702179267133454 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 4952 4 45 jsmith 1 0 G 3 0.00 145027.26 0.00 0.00 0.00 \N 0.73126576968147008223 \N \N 0.00000000000000000000 -1 38429.70 0.85758566439418452853 38429.70 0.85758566439418452853 \N \N \N 4953 4 45 jsmith 2 1 G 4 0.00 198323.60 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 44811.50 1.00000000000000000000 44811.50 1.00000000000000000000 \N \N \N 4954 4 45 jsmith 3 2 I 2 \N 197139.11 \N \N 0.00 \N 0.99402748840783446852 \N \N 0.00000000000000000000 4 44250.00 0.98746973433158898943 44250.00 0.98746973433158898943 \N \N \N 4955 4 45 jsmith 4 2 I 218 \N 559.46 \N \N 0.00 \N 0.00282094516235082461 \N \N 0.00000000000000000000 4 462.50 0.01032101134753355723 462.50 \N \N \N \N 4956 4 45 jsmith 5 2 I 219 \N 444.03 \N \N 0.00 \N 0.00223891659893225012 \N \N 0.00000000000000000000 4 99.00 0.00220925432087745333 99.00 \N \N \N \N 4957 4 45 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4958 4 45 jsmith 7 2 I 3 \N 181.00 \N \N 0.00 \N 0.00091264983088245675 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4959 4 45 jsmith 9 1 G 5 0.00 53296.34 0.00 0.00 0.00 \N 0.26873423031852991777 \N \N 0.00000000000000000000 3 6381.80 0.14241433560581547147 6381.80 0.14241433560581547147 \N \N \N 4960 4 45 jsmith 10 2 I 246 \N 53296.34 \N \N 0.00 \N 0.26873423031852991777 \N \N 0.00000000000000000000 5 6381.80 0.14241433560581547147 6381.80 0.14241433560581547147 \N \N \N 4961 4 45 jsmith 13 0 G 7 0.00 12544.32 500.00 0.00 0.00 \N \N \N \N \N -1 1054.00 \N 1054.00 \N \N \N \N 4962 4 45 jsmith 14 1 G 8 0.00 12544.32 500.00 0.00 0.00 \N 0.06325177638969845243 \N \N 0.00000000000000000000 7 1054.00 0.02352074802227106881 1054.00 0.02352074802227106881 \N \N \N 4963 4 45 jsmith 15 2 I 5 \N 6200.00 \N \N 0.00 \N 0.03126203840591840810 \N \N 0.00000000000000000000 8 1200.00 0.02677884025306004039 1200.00 0.02677884025306004039 \N \N \N 4964 4 45 jsmith 16 2 I 235 \N 5628.50 500.00 0.00 \N \N 0.02838038438188899354 500.0000000000000000 0.00000000000000000000 \N 8 500.00 0.01115785010544168350 500.00 0.01115785010544168350 \N \N \N 4965 4 45 jsmith 17 2 I 236 \N 1000.00 0.00 0.00 \N \N 0.00504226425901909808 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4966 4 45 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4967 4 45 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4968 4 45 jsmith 20 2 I 6 \N 1000.00 \N \N 0.00 \N 0.00504226425901909808 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4969 4 45 jsmith 21 2 I 11 \N -1284.18 \N \N 0.00 \N -0.00647517491614714537 \N \N 0.00000000000000000000 8 -646.00 -0.01441594233623065508 -646.00 -0.01441594233623065508 \N \N \N 4970 4 45 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4971 4 45 jsmith 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4972 4 45 jsmith 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4973 4 45 jsmith 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4974 4 45 jsmith 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4975 4 45 jsmith 12 1 T -1 \N 145027.26 \N \N 0.00 \N 0.73126576968147008223 \N \N 0.00000000000000000000 3 38429.70 0.85758566439418452853 38429.70 0.85758566439418452853 Total Net Revenue \N \N 4976 4 45 jsmith 8 2 T -1 \N 198323.60 \N \N \N \N 1.00000000000000000000 \N \N \N 4 44811.50 1.00000000000000000000 44811.50 1.00000000000000000000 Total Sales \N \N 4977 4 45 jsmith 11 2 T -1 \N 53296.34 \N \N 0.00 \N 0.26873423031852991777 \N \N 0.00000000000000000000 5 6381.80 0.14241433560581547147 6381.80 0.14241433560581547147 Total Cost of Goods Sold \N \N 4978 4 45 jsmith 27 2 T -1 \N 12544.32 \N \N 0.00 \N 0.06325177638969845243 \N \N 0.00000000000000000000 8 1054.00 0.02352074802227106881 1054.00 0.02352074802227106881 Total General Expenses \N \N 4979 4 45 jsmith 28 0 T -1 0.00 132482.94 -500.00 0.00 0.00 \N \N \N \N \N \N 37375.70 \N 37375.70 \N Net Income \N \N 4980 4 44 jsmith 19 2 I 7 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4981 4 44 jsmith 20 2 I 6 \N 1000.00 \N \N 0.00 \N 0.00651414448763322240 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4982 4 44 jsmith 21 2 I 11 \N -638.18 \N \N 0.00 \N -0.00415719672911776987 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4983 4 44 jsmith 22 2 I 9 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4984 4 44 jsmith 23 2 I 10 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4985 4 44 jsmith 24 2 I 237 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4986 4 44 jsmith 25 2 I 216 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4987 4 44 jsmith 26 2 I 217 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4988 4 44 jsmith 12 1 T -1 \N 106597.56 \N \N 0.00 \N 0.69439190786915168251 \N \N 0.00000000000000000000 3 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 Total Net Revenue \N \N 4989 4 44 jsmith 8 2 T -1 \N 153512.10 \N \N \N \N 1.00000000000000000000 \N \N \N 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 Total Sales \N \N 4990 4 44 jsmith 11 2 T -1 \N 46914.54 \N \N 0.00 \N 0.30560809213084831749 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 Total Cost of Goods Sold \N \N 4991 4 44 jsmith 27 2 T -1 \N 11490.32 \N \N 0.00 \N 0.07484960468914176798 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 Total General Expenses \N \N 4992 4 44 jsmith 28 0 T -1 0.00 95107.24 0.00 0.00 0.00 \N \N \N \N \N \N 35000.00 \N 35000.00 \N Net Income \N \N 4993 4 44 jsmith 1 0 G 3 0.00 106597.56 0.00 0.00 0.00 \N 0.69439190786915168251 \N \N 0.00000000000000000000 -1 35000.00 0.70000000000000000000 35000.00 0.70000000000000000000 \N \N \N 4994 4 44 jsmith 2 1 G 4 0.00 153512.10 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 4995 4 44 jsmith 3 2 I 2 \N 152889.11 \N \N 0.00 \N 0.99594175312564937878 \N \N 0.00000000000000000000 4 50000.00 1.00000000000000000000 50000.00 1.00000000000000000000 \N \N \N 4996 4 44 jsmith 4 2 I 218 \N 96.96 \N \N 0.00 \N 0.00063161144952091724 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4997 4 44 jsmith 5 2 I 219 \N 345.03 \N \N 0.00 \N 0.00224757527256809072 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 \N \N \N \N 4998 4 44 jsmith 6 2 I 233 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 4999 4 44 jsmith 7 2 I 3 \N 181.00 \N \N 0.00 \N 0.00117906015226161325 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 5000 4 44 jsmith 9 1 G 5 0.00 46914.54 0.00 0.00 0.00 \N 0.30560809213084831749 \N \N 0.00000000000000000000 3 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 5001 4 44 jsmith 10 2 I 246 \N 46914.54 \N \N 0.00 \N 0.30560809213084831749 \N \N 0.00000000000000000000 5 15000.00 0.30000000000000000000 15000.00 0.30000000000000000000 \N \N \N 5002 4 44 jsmith 13 0 G 7 0.00 11490.32 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N \N 5003 4 44 jsmith 14 1 G 8 0.00 11490.32 0.00 0.00 0.00 \N 0.07484960468914176798 \N \N 0.00000000000000000000 7 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 5004 4 44 jsmith 15 2 I 5 \N 5000.00 \N \N 0.00 \N 0.03257072243816611199 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 5005 4 44 jsmith 16 2 I 235 \N 5128.50 0.00 0.00 \N \N 0.03340779000482698107 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 5006 4 44 jsmith 17 2 I 236 \N 1000.00 0.00 0.00 \N \N 0.00651414448763322240 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 5007 4 44 jsmith 18 2 I 8 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N \N 5008 11 44 mfgadmin 1 0 G 44 0.00 2724633.85 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2724633.85 \N \N \N \N 5009 11 44 mfgadmin 2 1 G 45 0.00 2723633.85 0.00 0.00 0.00 \N 0.99963297820732866546 \N \N \N 44 0.00 \N 2723633.85 \N \N \N \N 5010 11 44 mfgadmin 3 2 I 65 \N 2535514.97 \N \N \N \N 0.93058924963440500455 \N \N \N 45 \N \N 2535514.97 0.93058924963440500455 \N \N \N 5011 11 44 mfgadmin 4 2 I 242 \N 24743.00 \N \N \N \N 0.00908122021606683041 \N \N \N 45 \N \N 24743.00 0.00908122021606683041 \N \N \N 5012 11 44 mfgadmin 5 2 I 243 \N 26052.03 \N \N \N \N 0.00956166275332738746 \N \N \N 45 \N \N 26052.03 0.00956166275332738746 \N \N \N 5013 11 44 mfgadmin 6 2 I 66 \N 0.01 \N \N \N \N 0.0000000036702179267133453546 \N \N \N 45 \N \N 0.01 \N \N \N \N 5014 11 44 mfgadmin 7 2 I 67 \N 179304.46 \N \N \N \N 0.06580864434316559636 \N \N \N 45 \N \N 179304.46 \N \N \N \N 5015 11 44 mfgadmin 8 2 I 248 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 5016 11 44 mfgadmin 9 2 I 68 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5017 11 44 mfgadmin 10 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5018 11 44 mfgadmin 11 2 I 70 \N -41740.62 \N \N \N \N -0.01531971717961295974 \N \N \N 45 \N \N -41740.62 \N \N \N \N 5019 11 44 mfgadmin 12 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5020 11 44 mfgadmin 13 2 I 72 \N -240.00 \N \N \N \N -0.000088085230241120288511 \N \N \N 45 \N \N -240.00 \N \N \N \N 5021 11 44 mfgadmin 14 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5022 11 44 mfgadmin 15 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5023 11 44 mfgadmin 16 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5024 11 44 mfgadmin 18 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00036702179267133454 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 5025 11 44 mfgadmin 19 2 I 76 \N 1000.00 \N \N \N \N 0.00036702179267133454 \N \N \N 46 \N \N 1000.00 \N \N \N \N 5026 11 44 mfgadmin 21 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 5027 11 44 mfgadmin 24 0 G 36 0.00 2724633.85 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2724633.85 \N \N \N \N 5028 11 44 mfgadmin 25 1 G 37 0.00 6739.37 0.00 0.00 0.00 \N 0.00247349565887541183 \N \N \N 36 0.00 \N 6739.37 \N \N \N \N 5029 11 44 mfgadmin 26 2 G 38 0.00 1739.37 0.00 0.00 0.00 \N 0.25809088980127222574 \N \N \N 37 0.00 \N 1739.37 \N \N \N \N 5030 11 44 mfgadmin 27 3 I 47 \N 262.95 \N \N \N \N 0.000096508380382927416100 \N \N \N 38 \N \N 262.95 \N \N \N \N 5031 11 44 mfgadmin 28 3 I 46 \N 252.41 \N \N \N \N 0.000092639970688171550097 \N \N \N 38 \N \N 252.41 \N \N \N \N 5032 11 44 mfgadmin 29 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 5033 11 44 mfgadmin 30 3 I 49 \N 624.22 \N \N \N \N 0.00022910234342130044 \N \N \N 38 \N \N 624.22 \N \N \N \N 5034 11 44 mfgadmin 31 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 5035 11 44 mfgadmin 32 3 I 50 \N 598.54 \N \N \N \N 0.00021967722378550057 \N \N \N 38 \N \N 598.54 \N \N \N \N 5036 11 44 mfgadmin 33 3 I 51 \N 1.25 \N \N \N \N 0.000000458777240839168169 \N \N \N 38 \N \N 1.25 \N \N \N \N 5037 11 44 mfgadmin 35 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00183510896335667268 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 5038 11 44 mfgadmin 36 3 I 140 \N 5000.00 \N \N \N \N 0.00183510896335667268 \N \N \N 39 \N \N 5000.00 \N \N \N \N 5039 11 44 mfgadmin 39 1 G 40 0.00 2717894.48 0.00 0.00 0.00 \N 0.99752650434112458817 \N \N \N 36 0.00 \N 2717894.48 \N \N \N \N 5040 11 44 mfgadmin 40 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.52117094559329504036 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 5041 11 44 mfgadmin 41 3 I 52 \N 1420000.00 \N \N \N \N 0.52117094559329504036 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 5042 11 44 mfgadmin 42 3 I 247 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 41 \N \N 0.00 0.000000000000000000000000 \N \N \N 5043 11 44 mfgadmin 44 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.44144912902700669303 \N \N \N 40 0.00 \N 1202787.24 \N \N \N \N 5044 11 44 mfgadmin 45 3 I 63 \N 1202787.24 \N \N \N \N 0.44144912902700669303 \N \N \N 43 \N \N 1202787.24 \N \N \N \N 5045 11 44 mfgadmin 47 2 G 42 \N 95107.24 \N \N \N \N 0.03490642972082285478 \N \N \N 40 \N \N 95107.24 \N \N \N \N 5046 11 44 mfgadmin 23 1 T -1 \N 2724633.85 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2724633.85 \N Total Assets \N \N 5047 11 44 mfgadmin 17 2 T -1 \N 2723633.85 \N \N \N \N 0.99963297820732866546 \N \N \N 45 \N \N 2723633.85 \N Total Current Assets \N \N 5048 11 44 mfgadmin 20 2 T -1 \N 1000.00 \N \N \N \N 0.00036702179267133454 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 5049 11 44 mfgadmin 22 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 5050 11 44 mfgadmin 49 1 T -1 \N 2724633.85 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2724633.85 \N Total Liabilities and Owners Equity \N \N 5051 11 44 mfgadmin 38 2 T -1 \N 6739.37 \N \N \N \N 0.00247349565887541183 \N \N \N 37 \N \N 6739.37 \N Total Liabilities \N \N 5052 11 44 mfgadmin 34 3 T -1 \N 1739.37 \N \N \N \N 0.25809088980127222574 \N \N \N 38 \N \N 1739.37 \N Total Current Liabilities \N \N 5053 11 44 mfgadmin 37 3 T -1 \N 5000.00 \N \N \N \N 0.00183510896335667268 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 5054 11 44 mfgadmin 48 2 T -1 \N 2717894.48 \N \N \N \N 0.99752650434112458817 \N \N \N 40 \N \N 2717894.48 \N Total Owners Equity \N \N 5055 11 44 mfgadmin 43 3 T -1 \N 1420000.00 \N \N \N \N 0.52117094559329504036 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 5056 11 44 mfgadmin 46 3 T -1 \N 1202787.24 \N \N \N \N 0.44144912902700669303 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N \N 5057 11 44 mfgadmin 50 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 5058 11 45 mfgadmin 10 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5059 11 45 mfgadmin 1 0 G 44 0.00 2762283.75 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2762283.75 \N \N \N \N 5060 11 45 mfgadmin 2 1 G 45 0.00 2761283.75 0.00 0.00 0.00 \N 0.99963798071070721826 \N \N \N 44 0.00 \N 2761283.75 \N \N \N \N 5061 11 45 mfgadmin 3 2 I 65 \N 2578626.47 \N \N \N \N 0.93351252202095458151 \N \N \N 45 \N \N 2578626.47 0.93351252202095458151 \N \N \N 5062 11 45 mfgadmin 4 2 I 242 \N 24743.00 \N \N \N \N 0.00895744327497129866 \N \N \N 45 \N \N 24743.00 0.00895744327497129866 \N \N \N 5063 11 45 mfgadmin 5 2 I 243 \N 26052.03 \N \N \N \N 0.00943133738523422874 \N \N \N 45 \N \N 26052.03 0.00943133738523422874 \N \N \N 5064 11 45 mfgadmin 6 2 I 66 \N 0.01 \N \N \N \N 0.0000000036201928929278174264 \N \N \N 45 \N \N 0.01 \N \N \N \N 5065 11 45 mfgadmin 7 2 I 67 \N 173907.46 \N \N \N \N 0.06295785507191286920 \N \N \N 45 \N \N 173907.46 \N \N \N \N 5066 11 45 mfgadmin 8 2 I 248 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 0.000000000000000000000000 \N \N \N 5067 11 45 mfgadmin 9 2 I 68 \N 0.01 \N \N \N \N 0.0000000036201928929278174264 \N \N \N 45 \N \N 0.01 \N \N \N \N 5068 11 45 mfgadmin 11 2 I 70 \N -41805.23 \N \N \N \N -0.01513429965332127809 \N \N \N 45 \N \N -41805.23 \N \N \N \N 5069 11 45 mfgadmin 12 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5070 11 45 mfgadmin 13 2 I 72 \N -240.00 \N \N \N \N -0.000086884629430267618234 \N \N \N 45 \N \N -240.00 \N \N \N \N 5071 11 45 mfgadmin 14 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5072 11 45 mfgadmin 15 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5073 11 45 mfgadmin 16 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5074 11 45 mfgadmin 18 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00036201928929278174 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 5075 11 45 mfgadmin 19 2 I 76 \N 1000.00 \N \N \N \N 0.00036201928929278174 \N \N \N 46 \N \N 1000.00 \N \N \N \N 5076 11 45 mfgadmin 21 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 5077 11 45 mfgadmin 24 0 G 36 0.00 2762283.75 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2762283.75 \N \N \N \N 5078 11 45 mfgadmin 25 1 G 37 0.00 7013.57 0.00 0.00 0.00 \N 0.00253904762680517525 \N \N \N 36 0.00 \N 7013.57 \N \N \N \N 5079 11 45 mfgadmin 26 2 G 38 0.00 2013.57 0.00 0.00 0.00 \N 0.28709630045754159437 \N \N \N 37 0.00 \N 2013.57 \N \N \N \N 5080 11 45 mfgadmin 27 3 I 47 \N 262.95 \N \N \N \N 0.000095192972119536959228 \N \N \N 38 \N \N 262.95 \N \N \N \N 5081 11 45 mfgadmin 28 3 I 46 \N 526.61 \N \N \N \N 0.00019064297793447179 \N \N \N 38 \N \N 526.61 \N \N \N \N 5082 11 45 mfgadmin 29 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 5083 11 45 mfgadmin 30 3 I 49 \N 624.22 \N \N \N \N 0.00022597968076234022 \N \N \N 38 \N \N 624.22 \N \N \N \N 5084 11 45 mfgadmin 31 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 5085 11 45 mfgadmin 32 3 I 50 \N 598.54 \N \N \N \N 0.00021668302541330158 \N \N \N 38 \N \N 598.54 \N \N \N \N 5086 11 45 mfgadmin 33 3 I 51 \N 1.25 \N \N \N \N 0.000000452524111615977178 \N \N \N 38 \N \N 1.25 \N \N \N \N 5087 11 45 mfgadmin 35 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00181009644646390871 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 5088 11 45 mfgadmin 36 3 I 140 \N 5000.00 \N \N \N \N 0.00181009644646390871 \N \N \N 39 \N \N 5000.00 \N \N \N \N 5089 11 45 mfgadmin 39 1 G 40 0.00 2755270.18 0.00 0.00 0.00 \N 0.99746095237319482475 \N \N \N 36 0.00 \N 2755270.18 \N \N \N \N 5090 11 45 mfgadmin 40 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.51406739079575007455 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 5091 11 45 mfgadmin 41 3 I 52 \N 1420000.00 \N \N \N \N 0.51406739079575007455 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 5092 11 45 mfgadmin 42 3 I 247 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 41 \N \N 0.00 0.000000000000000000000000 \N \N \N 5093 11 45 mfgadmin 44 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.43543218179522650416 \N \N \N 40 0.00 \N 1202787.24 \N \N \N \N 5094 11 45 mfgadmin 45 3 I 63 \N 1202787.24 \N \N \N \N 0.43543218179522650416 \N \N \N 43 \N \N 1202787.24 \N \N \N \N 5095 11 45 mfgadmin 47 2 G 42 \N 132482.94 \N \N \N \N 0.04796137978221824604 \N \N \N 40 \N \N 132482.94 \N \N \N \N 5096 11 45 mfgadmin 23 1 T -1 \N 2762283.75 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2762283.75 \N Total Assets \N \N 5097 11 45 mfgadmin 17 2 T -1 \N 2761283.75 \N \N \N \N 0.99963798071070721826 \N \N \N 45 \N \N 2761283.75 \N Total Current Assets \N \N 5098 11 45 mfgadmin 20 2 T -1 \N 1000.00 \N \N \N \N 0.00036201928929278174 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 5099 11 45 mfgadmin 22 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 5100 11 45 mfgadmin 49 1 T -1 \N 2762283.75 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2762283.75 \N Total Liabilities and Owners Equity \N \N 5101 11 45 mfgadmin 38 2 T -1 \N 7013.57 \N \N \N \N 0.00253904762680517525 \N \N \N 37 \N \N 7013.57 \N Total Liabilities \N \N 5102 11 45 mfgadmin 34 3 T -1 \N 2013.57 \N \N \N \N 0.28709630045754159437 \N \N \N 38 \N \N 2013.57 \N Total Current Liabilities \N \N 5103 11 45 mfgadmin 37 3 T -1 \N 5000.00 \N \N \N \N 0.00181009644646390871 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 5104 11 45 mfgadmin 48 2 T -1 \N 2755270.18 \N \N \N \N 0.99746095237319482475 \N \N \N 40 \N \N 2755270.18 \N Total Owners Equity \N \N 5105 11 45 mfgadmin 43 3 T -1 \N 1420000.00 \N \N \N \N 0.51406739079575007455 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 5106 11 45 mfgadmin 46 3 T -1 \N 1202787.24 \N \N \N \N 0.43543218179522650416 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N \N 5107 11 45 mfgadmin 50 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 5108 11 49 mfgadmin 1 0 G 44 0.00 2798003.61 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2798003.61 \N \N \N \N 5109 11 49 mfgadmin 2 1 G 45 0.00 2797003.61 0.00 0.00 0.00 \N 0.99964260231958742898 \N \N \N 44 0.00 \N 2797003.61 \N \N \N \N 5110 11 49 mfgadmin 3 2 I 65 \N 2581853.14 \N \N \N \N 0.92274832340191298038 \N \N \N 45 \N \N 2581853.14 0.92274832340191298038 \N \N \N 5111 11 49 mfgadmin 4 2 I 242 \N 24741.87 \N \N \N \N 0.00884268694706937851 \N \N \N 45 \N \N 24741.87 0.00884268694706937851 \N \N \N 5112 11 49 mfgadmin 5 2 I 243 \N 53877.21 \N \N \N \N 0.01925558988110097542 \N \N \N 45 \N \N 53877.21 0.01925558988110097542 \N \N \N 5113 11 49 mfgadmin 6 2 I 66 \N 0.01 \N \N \N \N 0.0000000035739768041257101881 \N \N \N 45 \N \N 0.01 \N \N \N \N 5114 11 49 mfgadmin 7 2 I 67 \N 174650.24 \N \N \N \N 0.06241959065949882745 \N \N \N 45 \N \N 174650.24 \N \N \N \N 5115 11 49 mfgadmin 8 2 I 248 \N 2552.72 \N \N \N \N 0.00091233620674277829 \N \N \N 45 \N \N 2552.72 0.00091233620674277829 \N \N \N 5116 11 49 mfgadmin 9 2 I 68 \N 788.85 \N \N \N \N 0.00028193316019345665 \N \N \N 45 \N \N 788.85 \N \N \N \N 5117 11 49 mfgadmin 10 2 I 69 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5118 11 49 mfgadmin 11 2 I 70 \N -41220.68 \N \N \N \N -0.01473217541702885794 \N \N \N 45 \N \N -41220.68 \N \N \N \N 5119 11 49 mfgadmin 12 2 I 71 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5120 11 49 mfgadmin 13 2 I 72 \N -239.75 \N \N \N \N -0.000085686093878913901759 \N \N \N 45 \N \N -239.75 \N \N \N \N 5121 11 49 mfgadmin 14 2 I 73 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5122 11 49 mfgadmin 15 2 I 74 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5123 11 49 mfgadmin 16 2 I 75 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N \N \N 5124 11 49 mfgadmin 18 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00035739768041257102 \N \N \N 44 0.00 \N 1000.00 \N \N \N \N 5125 11 49 mfgadmin 19 2 I 76 \N 1000.00 \N \N \N \N 0.00035739768041257102 \N \N \N 46 \N \N 1000.00 \N \N \N \N 5126 11 49 mfgadmin 21 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N \N 5127 11 49 mfgadmin 24 0 G 36 0.00 2798003.61 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2798003.61 \N \N \N \N 5128 11 49 mfgadmin 25 1 G 37 0.00 7591.80 0.00 0.00 0.00 \N 0.00271329171015615666 \N \N \N 36 0.00 \N 7591.80 \N \N \N \N 5129 11 49 mfgadmin 26 2 G 38 0.00 2591.80 0.00 0.00 0.00 \N 0.34139466266234621565 \N \N \N 37 0.00 \N 2591.80 \N \N \N \N 5130 11 49 mfgadmin 27 3 I 47 \N 262.95 \N \N \N \N 0.000093977720064485549395 \N \N \N 38 \N \N 262.95 \N \N \N \N 5131 11 49 mfgadmin 28 3 I 46 \N 1106.09 \N \N \N \N 0.00039531400032754068 \N \N \N 38 \N \N 1106.09 \N \N \N \N 5132 11 49 mfgadmin 29 3 I 48 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N \N \N 5133 11 49 mfgadmin 30 3 I 49 \N 631.35 \N \N \N \N 0.00022564302552847671 \N \N \N 38 \N \N 631.35 \N \N \N \N 5134 11 49 mfgadmin 31 3 I 241 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N \N \N 5135 11 49 mfgadmin 32 3 I 50 \N 598.54 \N \N \N \N 0.00021391680763414026 \N \N \N 38 \N \N 598.54 \N \N \N \N 5136 11 49 mfgadmin 33 3 I 51 \N -7.13 \N \N \N \N -0.000002548245461341631364 \N \N \N 38 \N \N -7.13 \N \N \N \N 5137 11 49 mfgadmin 35 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00178698840206285509 \N \N \N 37 0.00 \N 5000.00 \N \N \N \N 5138 11 49 mfgadmin 36 3 I 140 \N 5000.00 \N \N \N \N 0.00178698840206285509 \N \N \N 39 \N \N 5000.00 \N \N \N \N 5139 11 49 mfgadmin 39 1 G 40 0.00 2790411.81 0.00 0.00 0.00 \N 0.99728670828984384334 \N \N \N 36 0.00 \N 2790411.81 \N \N \N \N 5140 11 49 mfgadmin 40 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.50750470618585084670 \N \N \N 40 0.00 \N 1420000.00 \N \N \N \N 5141 11 49 mfgadmin 41 3 I 52 \N 1420000.00 \N \N \N \N 0.50750470618585084670 \N \N \N 41 \N \N 1420000.00 \N \N \N \N 5142 11 49 mfgadmin 42 3 I 247 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 41 \N \N 0.00 0.000000000000000000000000 \N \N \N 5143 11 49 mfgadmin 44 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.42987336960583835701 \N \N \N 40 0.00 \N 1202787.24 \N \N \N \N 5144 11 49 mfgadmin 45 3 I 63 \N 1202787.24 \N \N \N \N 0.42987336960583835701 \N \N \N 43 \N \N 1202787.24 \N \N \N \N 5145 11 49 mfgadmin 47 2 G 42 \N 167624.57 \N \N \N \N 0.05990863249815463962 \N \N \N 40 \N \N 167624.57 \N \N \N \N 5146 11 49 mfgadmin 23 1 T -1 \N 2798003.61 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2798003.61 \N Total Assets \N \N 5147 11 49 mfgadmin 17 2 T -1 \N 2797003.61 \N \N \N \N 0.99964260231958742898 \N \N \N 45 \N \N 2797003.61 \N Total Current Assets \N \N 5148 11 49 mfgadmin 20 2 T -1 \N 1000.00 \N \N \N \N 0.00035739768041257102 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N \N 5149 11 49 mfgadmin 22 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N \N 5150 11 49 mfgadmin 49 1 T -1 \N 2798003.61 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2798003.61 \N Total Liabilities and Owners Equity \N \N 5151 13 77 admin 21 3 I 137 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 96 M 7330 11 49 mfgadmin 38 2 T -1 \N 7591.80 \N \N \N \N 0.00271329171015615666 \N \N \N 37 \N \N 7591.80 \N Total Liabilities \N \N 5152 11 49 mfgadmin 34 3 T -1 \N 2591.80 \N \N \N \N 0.34139466266234621565 \N \N \N 38 \N \N 2591.80 \N Total Current Liabilities \N \N 5153 11 49 mfgadmin 37 3 T -1 \N 5000.00 \N \N \N \N 0.00178698840206285509 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N \N 5154 11 49 mfgadmin 48 2 T -1 \N 2790411.81 \N \N \N \N 0.99728670828984384334 \N \N \N 40 \N \N 2790411.81 \N Total Owners Equity \N \N 5155 11 49 mfgadmin 43 3 T -1 \N 1420000.00 \N \N \N \N 0.50750470618585084670 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N \N 5156 11 49 mfgadmin 46 3 T -1 \N 1202787.24 \N \N \N \N 0.42987336960583835701 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N \N 5157 11 49 mfgadmin 50 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N \N 5158 11 49 mfgadmin 1 0 G 44 0.00 2798031.33 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2798031.33 \N \N \N M 5159 11 49 mfgadmin 2 1 G 45 0.00 2797031.33 0.00 0.00 0.00 \N 0.99964260586031393723 \N \N \N 44 0.00 \N 2797031.33 \N \N \N M 5160 11 49 mfgadmin 3 2 I 65 \N 2581853.14 \N \N 0 \N 0.92273918176605978175 \N \N \N 45 \N \N 2581853.14 0.92273918176605978175 \N 109 M 5161 11 49 mfgadmin 4 2 I 242 \N 24741.87 \N \N 0 \N 0.00884259934287440591 \N \N \N 45 \N \N 24741.87 0.00884259934287440591 \N 126 M 5162 11 49 mfgadmin 5 2 I 243 \N 53877.21 \N \N 0 \N 0.01925539911663533803 \N \N \N 45 \N \N 53877.21 0.01925539911663533803 \N 127 M 5163 11 49 mfgadmin 6 2 I 66 \N 0.01 \N \N 0 \N 0.0000000035739413968606277186 \N \N \N 45 \N \N 0.01 \N \N 106 M 5164 11 49 mfgadmin 7 2 I 67 \N 174618.99 \N \N 0 \N 0.06240780370389919830 \N \N \N 45 \N \N 174618.99 \N \N 85 M 5165 11 49 mfgadmin 8 2 I 248 \N 2552.72 \N \N 0 \N 0.00091232716825940616 \N \N \N 45 \N \N 2552.72 0.00091232716825940616 \N 128 M 5166 11 49 mfgadmin 9 2 I 68 \N 0.01 \N \N 0 \N 0.0000000035739413968606277186 \N \N \N 45 \N \N 0.01 \N \N 86 M 5167 11 49 mfgadmin 10 2 I 69 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N 100 M 5168 11 49 mfgadmin 11 2 I 70 \N -40372.87 \N \N 0 \N -0.01442902714030725310 \N \N \N 45 \N \N -40372.87 \N \N 87 M 5169 11 49 mfgadmin 12 2 I 71 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N 88 M 5170 11 49 mfgadmin 13 2 I 72 \N -239.75 \N \N 0 \N -0.000085685244989733549552 \N \N \N 45 \N \N -239.75 \N \N 90 M 5171 11 49 mfgadmin 14 2 I 73 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N 96 M 5172 11 49 mfgadmin 15 2 I 74 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N 89 M 5173 11 49 mfgadmin 16 2 I 75 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N \N 45 \N \N 0.00 \N \N 83 M 5174 11 49 mfgadmin 18 1 G 46 0.00 1000.00 0.00 0.00 0.00 \N 0.00035739413968606277 \N \N \N 44 0.00 \N 1000.00 \N \N \N M 5175 11 49 mfgadmin 19 2 I 76 \N 1000.00 \N \N 0 \N 0.00035739413968606277 \N \N \N 46 \N \N 1000.00 \N \N 111 M 5176 11 49 mfgadmin 21 1 G 47 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N \N 44 0.00 \N 0.00 \N \N \N M 5177 11 49 mfgadmin 24 0 G 36 0.00 2798031.33 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N -1 0.00 \N 2798031.33 \N \N \N M 5178 11 49 mfgadmin 25 1 G 37 0.00 7619.52 0.00 0.00 0.00 \N 0.00272317179522074901 \N \N \N 36 0.00 \N 7619.52 \N \N \N M 5179 11 49 mfgadmin 26 2 G 38 0.00 2619.52 0.00 0.00 0.00 \N 0.34379068497753139305 \N \N \N 37 0.00 \N 2619.52 \N \N \N M 5180 11 49 mfgadmin 27 3 I 47 \N 262.95 \N \N 0 \N 0.000093976789030450205860 \N \N \N 38 \N \N 262.95 \N \N 99 M 5181 11 49 mfgadmin 28 3 I 46 \N 1133.81 \N \N 0 \N 0.00040521704951745483 \N \N \N 38 \N \N 1133.81 \N \N 94 M 5182 11 49 mfgadmin 29 3 I 48 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 \N \N 104 M 5183 11 49 mfgadmin 30 3 I 49 \N 631.35 \N \N 0 \N 0.00022564079009079573 \N \N \N 38 \N \N 631.35 \N \N 105 M 5184 11 49 mfgadmin 31 3 I 241 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N \N 38 \N \N 0.00 0.000000000000000000000000 \N 107 M 5185 11 49 mfgadmin 32 3 I 50 \N 598.54 \N \N 0 \N 0.00021391468836769601 \N \N \N 38 \N \N 598.54 \N \N 102 M 5186 11 49 mfgadmin 33 3 I 51 \N -7.13 \N \N 0 \N -0.000002548220215961627563 \N \N \N 38 \N \N -7.13 \N \N 95 M 5187 11 49 mfgadmin 35 2 G 39 0.00 5000.00 0.00 0.00 0.00 \N 0.00178697069843031386 \N \N \N 37 0.00 \N 5000.00 \N \N \N M 5188 11 49 mfgadmin 36 3 I 140 \N 5000.00 \N \N 0 \N 0.00178697069843031386 \N \N \N 39 \N \N 5000.00 \N \N 116 M 5189 11 49 mfgadmin 39 1 G 40 0.00 2790411.81 0.00 0.00 0.00 \N 0.99727682820477925099 \N \N \N 36 0.00 \N 2790411.81 \N \N \N M 5190 11 49 mfgadmin 40 2 G 41 0.00 1420000.00 0.00 0.00 0.00 \N 0.50749967835420913604 \N \N \N 40 0.00 \N 1420000.00 \N \N \N M 5191 11 49 mfgadmin 41 3 I 52 \N 1420000.00 \N \N 0 \N 0.50749967835420913604 \N \N \N 41 \N \N 1420000.00 \N \N 113 M 5192 11 49 mfgadmin 42 3 I 247 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N \N 41 \N \N 0.00 0.000000000000000000000000 \N 114 M 5193 11 49 mfgadmin 44 2 G 43 0.00 1202787.24 0.00 0.00 0.00 \N 0.42986911086517390783 \N \N \N 40 0.00 \N 1202787.24 \N \N \N M 5194 11 49 mfgadmin 45 3 I 63 \N 1202787.24 \N \N 0 \N 0.42986911086517390783 \N \N \N 43 \N \N 1202787.24 \N \N 84 M 5195 11 49 mfgadmin 47 2 G 42 \N 167624.57 \N \N \N \N 0.05990803898539620713 \N \N \N 40 \N \N 167624.57 \N \N \N M 5196 11 49 mfgadmin 17 2 T -1 \N 2797031.33 \N \N \N \N 0.99964260586031393723 \N \N \N 45 \N \N 2797031.33 \N Total Current Assets \N M 5197 11 49 mfgadmin 20 2 T -1 \N 1000.00 \N \N \N \N 0.00035739413968606277 \N \N \N 46 \N \N 1000.00 \N Total Fixed Assets \N M 5198 11 49 mfgadmin 22 2 T -1 \N 0.00 \N \N \N \N 0.000000000000000000000000 \N \N \N 47 \N \N 0.00 \N Total Other Assets \N M 5199 11 49 mfgadmin 23 1 T -1 \N 2798031.33 \N \N \N \N 1.00000000000000000000 \N \N \N 44 \N \N 2798031.33 \N Total Assets \N M 5200 11 49 mfgadmin 34 3 T -1 \N 2619.52 \N \N \N \N 0.34379068497753139305 \N \N \N 38 \N \N 2619.52 \N Total Current Liabilities \N M 5201 11 49 mfgadmin 37 3 T -1 \N 5000.00 \N \N \N \N 0.00178697069843031386 \N \N \N 39 \N \N 5000.00 \N Total Long Term Liabilities \N M 5202 11 49 mfgadmin 38 2 T -1 \N 7619.52 \N \N \N \N 0.00272317179522074901 \N \N \N 37 \N \N 7619.52 \N Total Liabilities \N M 5203 11 49 mfgadmin 43 3 T -1 \N 1420000.00 \N \N \N \N 0.50749967835420913604 \N \N \N 41 \N \N 1420000.00 \N Total Shareholders Equity \N M 5204 11 49 mfgadmin 46 3 T -1 \N 1202787.24 \N \N \N \N 0.42986911086517390783 \N \N \N 43 \N \N 1202787.24 \N Total Retained Earniangs \N M 5205 11 49 mfgadmin 48 2 T -1 \N 2790411.81 \N \N \N \N 0.99727682820477925099 \N \N \N 40 \N \N 2790411.81 \N Total Owners Equity \N M 5206 11 49 mfgadmin 49 1 T -1 \N 2798031.33 \N \N \N \N 1.00000000000000000000 \N \N \N 36 \N \N 2798031.33 \N Total Liabilities and Owners Equity \N M 5207 11 49 mfgadmin 50 0 T -1 \N 0.00 \N \N \N \N \N \N \N \N \N \N \N 0.00 \N Balance Total \N M 5208 4 49 mfgadmin 1 0 G 3 0.00 200116.65 0.00 0.00 0.00 \N 0.77793126917381748639 \N \N 0.00000000000000000000 -1 55089.39 0.93501053235089098546 55089.39 0.93501053235089098546 \N \N M 5209 4 49 mfgadmin 2 1 G 4 0.00 257242.07 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 58918.47 1.00000000000000000000 58918.47 1.00000000000000000000 \N \N M 5210 4 49 mfgadmin 3 2 I 2 \N 255506.71 \N \N 0 \N 0.99325398057945965059 \N \N 0.00000000000000000000 4 58367.60 0.99065030032178364442 58367.60 0.99065030032178364442 \N 103 M 5211 4 49 mfgadmin 4 2 I 218 \N 910.33 \N \N 0 \N 0.00353880685223843829 \N \N 0.00000000000000000000 4 350.87 0.00595517840161158292 350.87 \N \N 121 M 5212 4 49 mfgadmin 5 2 I 219 \N 644.03 \N \N 0 \N 0.00250359515455617349 \N \N 0.00000000000000000000 4 200.00 0.00339452127660477266 200.00 \N \N 122 M 5213 4 49 mfgadmin 6 2 I 233 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 123 M 5214 4 49 mfgadmin 7 2 I 3 \N 181.00 \N \N 0 \N 0.00070361741374573762 \N \N 0.00000000000000000000 4 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 101 M 5215 4 49 mfgadmin 9 1 G 5 0.00 57125.42 0.00 0.00 0.00 \N 0.22206873082618251361 \N \N 0.00000000000000000000 3 3829.08 0.06498946764910901454 3829.08 0.06498946764910901454 \N \N M 5216 4 49 mfgadmin 10 2 I 246 \N 57125.42 \N \N 0 \N 0.22206873082618251361 \N \N 0.00000000000000000000 5 3829.08 0.06498946764910901454 3829.08 0.06498946764910901454 \N 108 M 5217 4 49 mfgadmin 13 0 G 7 0.00 10143.32 0.00 0.00 0.00 \N \N \N \N \N -1 -2401.00 \N -2401.00 \N \N \N M 5218 4 49 mfgadmin 14 1 G 8 0.00 10143.32 0.00 0.00 0.00 \N 0.03943103085743323400 \N \N 0.00000000000000000000 7 -2401.00 -0.04075122792564029582 -2401.00 -0.04075122792564029582 \N \N M 5219 4 49 mfgadmin 15 2 I 5 \N 6599.00 \N \N 0 \N 0.02565288018402277668 \N \N 0.00000000000000000000 8 399.00 0.00677206994682652146 399.00 0.00677206994682652146 \N 97 M 5220 4 49 mfgadmin 16 2 I 235 \N 5628.50 0.00 0.00 0 \N 0.02188016913407670837 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 120 M 5221 4 49 mfgadmin 17 2 I 236 \N 1000.00 0.00 0.00 0 \N 0.00388738902621954488 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 119 M 5222 4 49 mfgadmin 18 2 I 8 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 112 M 5223 4 49 mfgadmin 19 2 I 7 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 98 M 5224 4 49 mfgadmin 20 2 I 6 \N 1000.00 \N \N 0 \N 0.00388738902621954488 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 110 M 5225 4 49 mfgadmin 21 2 I 11 \N -4084.18 \N \N 0 \N -0.01587679651310534082 \N \N 0.00000000000000000000 8 -2800.00 -0.04752329787246681728 -2800.00 -0.04752329787246681728 \N 91 M 5226 4 49 mfgadmin 22 2 I 9 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 92 M 5227 4 49 mfgadmin 23 2 I 10 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 93 M 5228 4 49 mfgadmin 24 2 I 237 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 125 M 5229 4 49 mfgadmin 25 2 I 216 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N 117 M 5230 4 49 mfgadmin 26 2 I 217 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.000000000000000000000000 0.00 \N \N 118 M 5231 4 49 mfgadmin 8 2 T -1 \N 257242.07 \N \N \N \N 1.00000000000000000000 \N \N \N 4 58918.47 1.00000000000000000000 58918.47 1.00000000000000000000 Total Sales \N M 5232 4 49 mfgadmin 11 2 T -1 \N 57125.42 \N \N 0.00 \N 0.22206873082618251361 \N \N 0.00000000000000000000 5 3829.08 0.06498946764910901454 3829.08 0.06498946764910901454 Total Cost of Goods Sold \N M 5233 4 49 mfgadmin 12 1 T -1 \N 200116.65 \N \N 0.00 \N 0.77793126917381748639 \N \N 0.00000000000000000000 3 55089.39 0.93501053235089098546 55089.39 0.93501053235089098546 Total Net Revenue \N M 5234 4 49 mfgadmin 27 2 T -1 \N 10143.32 \N \N 0.00 \N 0.03943103085743323400 \N \N 0.00000000000000000000 8 -2401.00 -0.04075122792564029582 -2401.00 -0.04075122792564029582 Total General Expenses \N M 5235 4 49 mfgadmin 28 0 T -1 0.00 189973.33 0.00 0.00 0.00 \N \N \N \N \N \N 57490.39 \N 57490.39 \N Net Income \N M 5236 4 50 mfgadmin 1 0 G 3 0.00 200116.65 0.00 0.00 0.00 \N 0.77793126917381748639 \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 5237 13 53 mfgadmin 54 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 5238 4 50 mfgadmin 2 1 G 4 0.00 257242.07 0.00 0.00 0.00 \N 1.00000000000000000000 \N \N \N 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 5239 4 50 mfgadmin 3 2 I 2 \N 255506.71 \N \N 0 \N 0.99325398057945965059 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 103 M 5240 4 50 mfgadmin 4 2 I 218 \N 910.33 \N \N 0 \N 0.00353880685223843829 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N 121 M 5241 4 50 mfgadmin 5 2 I 219 \N 644.03 \N \N 0 \N 0.00250359515455617349 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 \N \N 122 M 5242 4 50 mfgadmin 6 2 I 233 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 123 M 5243 4 50 mfgadmin 7 2 I 3 \N 181.00 \N \N 0 \N 0.00070361741374573762 \N \N 0.00000000000000000000 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 101 M 5244 4 50 mfgadmin 9 1 G 5 0.00 57125.42 0.00 0.00 0.00 \N 0.22206873082618251361 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 5245 4 50 mfgadmin 10 2 I 246 \N 57125.42 \N \N 0 \N 0.22206873082618251361 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 108 M 5246 4 50 mfgadmin 13 0 G 7 0.00 10143.32 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 5247 13 49 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N M 5248 4 50 mfgadmin 14 1 G 8 0.00 10143.32 0.00 0.00 0.00 \N 0.03943103085743323400 \N \N 0.00000000000000000000 7 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 5249 4 50 mfgadmin 15 2 I 5 \N 6599.00 \N \N 0 \N 0.02565288018402277668 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 97 M 5250 4 50 mfgadmin 16 2 I 235 \N 5628.50 0.00 0.00 0 \N 0.02188016913407670837 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 120 M 5251 4 50 mfgadmin 17 2 I 236 \N 1000.00 0.00 0.00 0 \N 0.00388738902621954488 0.00000000000000000000 0.00000000000000000000 \N 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 119 M 5252 4 50 mfgadmin 18 2 I 8 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 112 M 5253 4 50 mfgadmin 19 2 I 7 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 98 M 5254 4 50 mfgadmin 20 2 I 6 \N 1000.00 \N \N 0 \N 0.00388738902621954488 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 110 M 5255 4 50 mfgadmin 21 2 I 11 \N -4084.18 \N \N 0 \N -0.01587679651310534082 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 91 M 5256 4 50 mfgadmin 22 2 I 9 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 92 M 5257 4 50 mfgadmin 23 2 I 10 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 93 M 5258 4 50 mfgadmin 24 2 I 237 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 125 M 5259 4 50 mfgadmin 25 2 I 216 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N 117 M 5260 4 50 mfgadmin 26 2 I 217 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 \N \N 118 M 5261 4 50 mfgadmin 8 2 T -1 \N 257242.07 \N \N \N \N 1.00000000000000000000 \N \N \N 4 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Sales \N M 5262 4 50 mfgadmin 11 2 T -1 \N 57125.42 \N \N 0.00 \N 0.22206873082618251361 \N \N 0.00000000000000000000 5 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Cost of Goods Sold \N M 5263 4 50 mfgadmin 12 1 T -1 \N 200116.65 \N \N 0.00 \N 0.77793126917381748639 \N \N 0.00000000000000000000 3 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Net Revenue \N M 5264 4 50 mfgadmin 27 2 T -1 \N 10143.32 \N \N 0.00 \N 0.03943103085743323400 \N \N 0.00000000000000000000 8 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total General Expenses \N M 5265 4 50 mfgadmin 28 0 T -1 0.00 189973.33 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N Net Income \N M 5266 13 53 mfgadmin 55 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5267 13 53 mfgadmin 56 3 I 133 \N \N \N \N 0 \N \N \N \N \N 79 0.00 \N 0.00 \N \N 111 M 5268 13 53 mfgadmin 58 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5269 13 53 mfgadmin 60 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5270 13 53 mfgadmin 62 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 5271 13 53 mfgadmin 63 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5272 13 53 mfgadmin 64 3 I 139 \N \N \N \N 0 \N \N \N \N \N 83 0.00 \N 0.00 \N \N 116 M 5273 13 53 mfgadmin 66 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5274 13 53 mfgadmin 67 3 I 134 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 113 M 5275 13 53 mfgadmin 68 3 I 135 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 114 M 5276 13 53 mfgadmin 69 3 I 136 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 84 M 5277 13 53 mfgadmin 71 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5278 13 53 mfgadmin 74 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -1730.00 \N -1730.00 \N \N \N M 5279 13 53 mfgadmin 75 1 I 108 \N \N \N \N 0 \N \N \N \N \N 86 1730.00 \N 1730.00 \N \N 109 M 5280 13 53 mfgadmin 76 1 I 244 \N \N \N \N 0 \N \N \N \N \N 86 0.00 \N 0.00 \N \N 126 M 5281 13 53 mfgadmin 77 1 I 245 \N \N \N \N 0 \N \N \N \N \N 86 0.00 \N 0.00 \N \N 127 M 5282 13 53 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 969.32 \N 969.32 \N \N \N M 5283 13 53 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N M 5284 13 53 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N M 5285 13 53 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N M 5286 13 53 mfgadmin 27 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -566.80 \N -566.80 \N \N \N M 5287 13 53 mfgadmin 30 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N M 5288 13 53 mfgadmin 39 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 46.38 \N 46.38 \N \N \N M 5289 13 53 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N M 5290 13 53 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N M 5291 13 53 mfgadmin 47 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 47.50 \N 47.50 \N \N \N M 5292 13 53 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 100.00 \N 100.00 \N \N \N M 5293 13 53 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 1730.00 \N 1730.00 \N \N \N M 5294 13 53 mfgadmin 78 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N M 5295 13 53 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 1730.00 \N 1730.00 \N \N \N M 5296 13 53 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 1730.00 \N 1730.00 \N \N \N M 5297 13 53 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 969.32 \N 969.32 \N \N \N M 5298 13 53 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 969.32 \N 969.32 \N \N \N M 5299 13 53 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5300 13 53 mfgadmin 7 3 I 119 \N \N \N \N 0 \N \N \N \N \N 65 0.00 \N 0.00 \N \N 112 M 5301 13 53 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5302 13 53 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5303 13 53 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5304 13 53 mfgadmin 13 3 I 120 \N \N \N \N 0 \N \N \N \N \N 68 0.00 \N 0.00 \N \N 106 M 5305 13 53 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -566.80 \N -566.80 \N \N \N M 5306 13 53 mfgadmin 16 3 I 121 \N \N \N \N 0 \N \N \N \N \N 69 -1082.20 \N -1082.20 \N \N 85 M 5307 13 53 mfgadmin 17 3 I 256 \N \N \N \N 0 \N \N \N \N \N 69 514.00 \N 514.00 \N \N 128 M 5308 13 53 mfgadmin 18 3 I 122 \N \N \N \N 0 \N \N \N \N \N 69 1.40 \N 1.40 \N \N 87 M 5309 13 53 mfgadmin 19 3 I 123 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 88 M 5310 13 53 mfgadmin 20 3 I 124 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 90 M 5311 13 53 mfgadmin 21 3 I 137 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 96 M 5312 13 53 mfgadmin 22 3 I 138 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 86 M 5313 13 53 mfgadmin 23 3 I 280 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 130 M 5314 13 53 mfgadmin 24 3 I 281 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 134 M 5315 13 53 mfgadmin 25 3 I 282 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 89 M 5316 13 53 mfgadmin 26 3 I 283 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 83 M 5317 13 53 mfgadmin 28 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5318 13 53 mfgadmin 29 3 I 125 \N \N \N \N 0 \N \N \N \N \N 72 0.00 \N 0.00 \N \N 100 M 5319 13 53 mfgadmin 31 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5320 13 53 mfgadmin 32 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 46.38 \N 46.38 \N \N \N M 5321 13 53 mfgadmin 33 3 I 126 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 99 M 5322 13 53 mfgadmin 34 3 I 127 \N \N \N \N 0 \N \N \N \N \N 71 46.38 \N 46.38 \N \N 94 M 5323 13 53 mfgadmin 35 3 I 129 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 104 M 5324 13 53 mfgadmin 36 3 I 130 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 105 M 5325 13 53 mfgadmin 37 3 I 131 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 95 M 5326 13 53 mfgadmin 38 3 I 240 \N \N \N \N 0 \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N 107 M 5327 13 53 mfgadmin 40 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5328 13 53 mfgadmin 42 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5329 13 49 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 36302.16 \N 30673.66 \N \N \N M 5330 13 49 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 36302.16 \N 30673.66 \N \N \N M 5331 13 49 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 57490.39 \N 51861.89 \N \N \N M 5332 13 49 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 57490.39 \N 51861.89 \N \N \N M 5333 13 49 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5334 13 49 mfgadmin 7 3 I 119 \N \N \N \N 0 \N \N \N \N \N 65 0.00 \N 0.00 \N \N 112 M 5335 13 49 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5336 13 49 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5337 13 49 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 18550.12 \N 18550.12 \N \N \N M 5338 13 49 mfgadmin 13 3 I 120 \N \N \N \N 0 \N \N \N \N \N 68 18550.12 \N 18550.12 \N \N 106 M 5339 13 49 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 3545.11 \N 3545.11 \N \N \N M 5340 13 49 mfgadmin 16 3 I 121 \N \N \N \N 0 \N \N \N \N \N 69 118.76 \N 118.76 \N \N 85 M 5341 13 49 mfgadmin 17 3 I 256 \N \N \N \N 0 \N \N \N \N \N 69 1914.54 \N 1914.54 \N \N 128 M 5342 13 49 mfgadmin 18 3 I 122 \N \N \N \N 0 \N \N \N \N \N 69 1506.56 \N 1506.56 \N \N 87 M 5343 13 49 mfgadmin 19 3 I 123 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 88 M 5344 13 49 mfgadmin 20 3 I 124 \N \N \N \N 0 \N \N \N \N \N 69 5.25 \N 5.25 \N \N 90 M 5345 13 49 mfgadmin 21 3 I 137 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 96 M 5346 13 49 mfgadmin 22 3 I 138 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 86 M 5347 13 49 mfgadmin 24 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5348 13 53 mfgadmin 44 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 47.50 \N 47.50 \N \N \N M 5349 13 53 mfgadmin 45 3 I 132 \N \N \N \N 0 \N \N \N \N \N 75 47.50 \N 47.50 \N \N 102 M 5350 13 53 mfgadmin 46 3 I 278 \N \N \N \N 0 \N \N \N \N \N 75 0.00 \N 0.00 \N \N 129 M 5351 13 53 mfgadmin 48 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 100.00 \N 100.00 \N \N \N M 5352 13 53 mfgadmin 49 3 I 284 \N \N \N \N 0 \N \N \N \N \N 76 0.00 \N 0.00 \N \N 133 M 5353 13 53 mfgadmin 50 3 I 285 \N \N \N \N 0 \N \N \N \N \N 76 100.00 \N 100.00 \N \N 132 M 5354 13 53 mfgadmin 52 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5355 13 49 mfgadmin 25 3 I 125 \N \N \N \N 0 \N \N \N \N \N 72 0.00 \N 0.00 \N \N 100 M 5356 13 49 mfgadmin 27 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5357 13 49 mfgadmin 28 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 720.56 \N 720.56 \N \N \N M 5358 13 49 mfgadmin 29 3 I 126 \N \N \N \N 0 \N \N \N \N \N 71 30.00 \N 30.00 \N \N 99 M 5359 13 49 mfgadmin 30 3 I 127 \N \N \N \N 0 \N \N \N \N \N 71 684.68 \N 684.68 \N \N 94 M 5360 13 49 mfgadmin 31 3 I 129 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 104 M 5361 13 49 mfgadmin 32 3 I 130 \N \N \N \N 0 \N \N \N \N \N 71 7.13 \N 7.13 \N \N 105 M 5362 13 49 mfgadmin 33 3 I 131 \N \N \N \N 0 \N \N \N \N \N 71 -1.25 \N -1.25 \N \N 95 M 5363 13 49 mfgadmin 34 3 I 240 \N \N \N \N 0 \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N 107 M 5364 13 49 mfgadmin 36 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5365 13 49 mfgadmin 38 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5366 13 49 mfgadmin 40 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 186.44 \N 186.44 \N \N \N M 5367 13 49 mfgadmin 41 3 I 132 \N \N \N \N 0 \N \N \N \N \N 75 0.00 \N 0.00 \N \N 102 M 5368 13 49 mfgadmin 42 3 I 278 \N \N \N \N 0 \N \N \N \N \N 75 186.44 \N 186.44 \N \N 129 M 5369 13 49 mfgadmin 44 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5370 13 49 mfgadmin 46 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5371 13 49 mfgadmin 48 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 5372 13 49 mfgadmin 49 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5373 13 49 mfgadmin 50 3 I 133 \N \N \N \N 0 \N \N \N \N \N 79 0.00 \N 0.00 \N \N 111 M 5374 13 49 mfgadmin 52 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5375 13 49 mfgadmin 54 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5376 13 49 mfgadmin 56 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 5377 13 49 mfgadmin 57 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5378 13 49 mfgadmin 58 3 I 139 \N \N \N \N 0 \N \N \N \N \N 83 0.00 \N 0.00 \N \N 116 M 5379 13 49 mfgadmin 60 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5380 13 49 mfgadmin 61 3 I 134 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 113 M 5381 13 49 mfgadmin 62 3 I 135 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 114 M 5382 13 49 mfgadmin 63 3 I 136 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 84 M 5383 13 49 mfgadmin 65 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5384 13 49 mfgadmin 68 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -36302.16 \N -8478.11 \N \N \N M 5385 13 49 mfgadmin 69 1 I 108 \N \N \N \N 0 \N \N \N \N \N 86 8478.11 \N 8478.11 \N \N 109 M 5386 13 49 mfgadmin 70 1 I 244 \N \N \N \N 0 \N \N \N \N \N 86 -1.13 \N \N \N \N 126 M 5387 13 49 mfgadmin 71 1 I 245 \N \N \N \N 0 \N \N \N \N \N 86 27825.18 \N \N \N \N 127 M 5388 13 49 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 57490.39 \N 51861.89 \N \N \N M 5389 13 49 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N M 5390 13 49 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N M 5391 13 49 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 18550.12 \N 18550.12 \N \N \N M 5392 13 49 mfgadmin 23 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 3545.11 \N 3545.11 \N \N \N M 5393 13 49 mfgadmin 26 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N M 5394 13 49 mfgadmin 35 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 720.56 \N 720.56 \N \N \N M 5395 13 49 mfgadmin 37 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N M 5396 13 49 mfgadmin 39 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N M 5397 13 49 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 186.44 \N 186.44 \N \N \N M 5398 13 49 mfgadmin 45 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N M 5399 13 49 mfgadmin 64 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N M 5400 13 49 mfgadmin 66 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5401 13 49 mfgadmin 67 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 36302.16 \N 30673.66 \N \N \N M 5402 13 49 mfgadmin 72 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 22195.55 \N \N \N M 5403 13 50 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 0.00 \N -5628.50 \N \N \N M 5404 13 50 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N -5628.50 \N \N \N M 5405 13 50 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N -5628.50 \N \N \N M 5406 13 50 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N -5628.50 \N \N \N M 5407 13 50 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5408 13 50 mfgadmin 7 3 I 119 \N \N \N \N 0 \N \N \N \N \N 65 0.00 \N 0.00 \N \N 112 M 5409 13 50 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5410 13 50 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5411 13 50 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5412 13 50 mfgadmin 13 3 I 120 \N \N \N \N 0 \N \N \N \N \N 68 0.00 \N 0.00 \N \N 106 M 5413 13 50 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5414 13 50 mfgadmin 16 3 I 121 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 85 M 5415 13 50 mfgadmin 17 3 I 256 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 128 M 5416 13 50 mfgadmin 18 3 I 122 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 87 M 5417 13 50 mfgadmin 19 3 I 123 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 88 M 5418 13 50 mfgadmin 20 3 I 124 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 90 M 5419 13 50 mfgadmin 21 3 I 137 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 96 M 5420 13 50 mfgadmin 22 3 I 138 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 86 M 5421 13 50 mfgadmin 24 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5422 13 50 mfgadmin 25 3 I 125 \N \N \N \N 0 \N \N \N \N \N 72 0.00 \N 0.00 \N \N 100 M 5423 13 50 mfgadmin 27 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5424 13 50 mfgadmin 28 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5425 13 50 mfgadmin 29 3 I 126 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 99 M 5426 13 50 mfgadmin 30 3 I 127 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 94 M 5427 13 50 mfgadmin 31 3 I 129 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 104 M 5428 13 50 mfgadmin 32 3 I 130 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 105 M 5429 13 50 mfgadmin 33 3 I 131 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 95 M 5430 13 50 mfgadmin 34 3 I 240 \N \N \N \N 0 \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N 107 M 5431 13 50 mfgadmin 36 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5432 13 50 mfgadmin 38 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5433 13 50 mfgadmin 40 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5434 13 50 mfgadmin 41 3 I 132 \N \N \N \N 0 \N \N \N \N \N 75 0.00 \N 0.00 \N \N 102 M 5435 13 50 mfgadmin 42 3 I 278 \N \N \N \N 0 \N \N \N \N \N 75 0.00 \N 0.00 \N \N 129 M 5436 13 50 mfgadmin 44 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5437 13 50 mfgadmin 46 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5438 13 50 mfgadmin 48 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 5439 13 50 mfgadmin 49 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5440 13 50 mfgadmin 50 3 I 133 \N \N \N \N 0 \N \N \N \N \N 79 0.00 \N 0.00 \N \N 111 M 5441 13 50 mfgadmin 52 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5442 13 50 mfgadmin 54 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5443 13 50 mfgadmin 56 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 5444 13 50 mfgadmin 57 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5445 13 50 mfgadmin 58 3 I 139 \N \N \N \N 0 \N \N \N \N \N 83 0.00 \N 0.00 \N \N 116 M 5446 13 50 mfgadmin 60 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5447 13 50 mfgadmin 61 3 I 134 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 113 M 5448 13 50 mfgadmin 62 3 I 135 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 114 M 5449 13 50 mfgadmin 63 3 I 136 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 84 M 5450 13 50 mfgadmin 65 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5451 13 50 mfgadmin 68 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 5452 13 50 mfgadmin 69 1 I 108 \N \N \N \N 0 \N \N \N \N \N 86 0.00 \N 0.00 \N \N 109 M 5453 13 50 mfgadmin 70 1 I 244 \N \N \N \N 0 \N \N \N \N \N 86 0.00 \N \N \N \N 126 M 5454 13 50 mfgadmin 71 1 I 245 \N \N \N \N 0 \N \N \N \N \N 86 0.00 \N \N \N \N 127 M 5455 13 50 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 0.00 \N -5628.50 \N \N \N M 5456 13 50 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N M 5457 13 50 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N M 5458 13 50 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N M 5459 13 50 mfgadmin 23 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 0.00 \N 0.00 \N \N \N M 5460 13 50 mfgadmin 26 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N M 5461 13 50 mfgadmin 35 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 0.00 \N 0.00 \N \N \N M 5462 13 50 mfgadmin 37 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N M 5463 13 50 mfgadmin 39 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N M 5464 13 50 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 0.00 \N 0.00 \N \N \N M 5465 13 50 mfgadmin 45 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N M 5466 13 50 mfgadmin 47 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 0.00 \N -5628.50 \N \N \N M 5467 13 50 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N M 5468 13 50 mfgadmin 53 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N M 5469 13 50 mfgadmin 55 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5470 13 50 mfgadmin 59 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N M 5471 13 50 mfgadmin 64 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N M 5472 13 50 mfgadmin 66 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5473 13 50 mfgadmin 67 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 0.00 \N -5628.50 \N \N \N M 5474 13 50 mfgadmin 72 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N -5628.50 \N \N \N M 5475 13 52 mfgadmin 28 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5476 13 52 mfgadmin 29 3 I 125 \N \N \N \N 0 \N \N \N \N \N 72 0.00 \N 0.00 \N \N 100 M 5477 13 52 mfgadmin 31 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5478 13 52 mfgadmin 32 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -1254.46 \N -1254.46 \N \N \N M 5479 13 52 mfgadmin 33 3 I 126 \N \N \N \N 0 \N \N \N \N \N 71 -1300.00 \N -1300.00 \N \N 99 M 5480 13 52 mfgadmin 34 3 I 127 \N \N \N \N 0 \N \N \N \N \N 71 45.54 \N 45.54 \N \N 94 M 5481 13 52 mfgadmin 35 3 I 129 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 104 M 5482 13 52 mfgadmin 36 3 I 130 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 105 M 5483 13 52 mfgadmin 37 3 I 131 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 95 M 5484 13 52 mfgadmin 38 3 I 240 \N \N \N \N 0 \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N 107 M 5485 13 52 mfgadmin 40 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5486 13 52 mfgadmin 42 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5487 13 52 mfgadmin 44 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 47.50 \N 47.50 \N \N \N M 5488 13 52 mfgadmin 45 3 I 132 \N \N \N \N 0 \N \N \N \N \N 75 47.50 \N 47.50 \N \N 102 M 5489 13 52 mfgadmin 46 3 I 278 \N \N \N \N 0 \N \N \N \N \N 75 0.00 \N 0.00 \N \N 129 M 5490 13 52 mfgadmin 48 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 100.00 \N 100.00 \N \N \N M 5491 13 52 mfgadmin 49 3 I 284 \N \N \N \N 0 \N \N \N \N \N 76 0.00 \N 0.00 \N \N 133 M 5492 13 52 mfgadmin 50 3 I 285 \N \N \N \N 0 \N \N \N \N \N 76 100.00 \N 100.00 \N \N 132 M 5493 13 52 mfgadmin 52 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5494 13 52 mfgadmin 54 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 5495 13 52 mfgadmin 55 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5496 13 52 mfgadmin 56 3 I 133 \N \N \N \N 0 \N \N \N \N \N 79 0.00 \N 0.00 \N \N 111 M 5497 13 52 mfgadmin 58 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5498 13 52 mfgadmin 60 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5499 13 52 mfgadmin 62 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 5500 13 52 mfgadmin 63 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5501 13 52 mfgadmin 64 3 I 139 \N \N \N \N 0 \N \N \N \N \N 83 0.00 \N 0.00 \N \N 116 M 5502 13 52 mfgadmin 66 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5503 13 52 mfgadmin 67 3 I 134 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 113 M 5504 13 52 mfgadmin 68 3 I 135 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 114 M 5505 13 52 mfgadmin 69 3 I 136 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 84 M 5506 13 52 mfgadmin 71 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5507 13 52 mfgadmin 74 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -81705.12 \N -81705.12 \N \N \N M 5508 13 52 mfgadmin 75 1 I 108 \N \N \N \N 0 \N \N \N \N \N 86 63155.00 \N 63155.00 \N \N 109 M 5509 13 52 mfgadmin 76 1 I 244 \N \N \N \N 0 \N \N \N \N \N 86 0.00 \N 0.00 \N \N 126 M 5510 13 52 mfgadmin 77 1 I 245 \N \N \N \N 0 \N \N \N \N \N 86 18550.12 \N 18550.12 \N \N 127 M 5511 13 52 mfgadmin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 35149.32 \N 35149.32 \N \N \N M 5512 13 52 mfgadmin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N M 5513 13 52 mfgadmin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N M 5514 13 52 mfgadmin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 -32095.12 \N -32095.12 \N \N \N M 5515 13 52 mfgadmin 27 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 -15567.64 \N -15567.64 \N \N \N M 5516 13 52 mfgadmin 30 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N M 5517 13 52 mfgadmin 39 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 -1254.46 \N -1254.46 \N \N \N M 5518 13 52 mfgadmin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N M 5519 13 52 mfgadmin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N M 5520 13 52 mfgadmin 47 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 47.50 \N 47.50 \N \N \N M 5521 13 52 mfgadmin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 100.00 \N 100.00 \N \N \N M 5522 13 52 mfgadmin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 81705.12 \N 81705.12 \N \N \N M 5523 13 52 mfgadmin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N M 5524 13 52 mfgadmin 59 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N M 5525 13 52 mfgadmin 61 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 5526 13 52 mfgadmin 65 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N M 5527 13 52 mfgadmin 70 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N M 5528 13 52 mfgadmin 72 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 5529 13 52 mfgadmin 73 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 81705.12 \N 81705.12 \N \N \N M 5530 13 52 mfgadmin 78 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N M 5531 13 52 mfgadmin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 81705.12 \N 81705.12 \N \N \N M 5532 13 52 mfgadmin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 81705.12 \N 81705.12 \N \N \N M 5533 13 52 mfgadmin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 35149.32 \N 35149.32 \N \N \N M 5534 13 52 mfgadmin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 35149.32 \N 35149.32 \N \N \N M 5535 13 52 mfgadmin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5536 13 52 mfgadmin 7 3 I 119 \N \N \N \N 0 \N \N \N \N \N 65 0.00 \N 0.00 \N \N 112 M 5537 13 52 mfgadmin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5538 13 52 mfgadmin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 5539 13 52 mfgadmin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -32095.12 \N -32095.12 \N \N \N M 5540 13 52 mfgadmin 13 3 I 120 \N \N \N \N 0 \N \N \N \N \N 68 -32095.12 \N -32095.12 \N \N 106 M 5541 13 52 mfgadmin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 -15567.64 \N -15567.64 \N \N \N M 5542 13 52 mfgadmin 16 3 I 121 \N \N \N \N 0 \N \N \N \N \N 69 -55696.70 \N -55696.70 \N \N 85 M 5543 13 52 mfgadmin 17 3 I 256 \N \N \N \N 0 \N \N \N \N \N 69 128.50 \N 128.50 \N \N 128 M 5544 13 52 mfgadmin 18 3 I 122 \N \N \N \N 0 \N \N \N \N \N 69 40000.56 \N 40000.56 \N \N 87 M 5545 13 52 mfgadmin 19 3 I 123 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 88 M 5546 13 52 mfgadmin 20 3 I 124 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 90 M 5547 13 52 mfgadmin 21 3 I 137 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 96 M 5548 13 52 mfgadmin 22 3 I 138 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 86 M 5549 13 52 mfgadmin 23 3 I 280 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 130 M 5550 13 52 mfgadmin 24 3 I 281 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 134 M 5551 13 52 mfgadmin 25 3 I 282 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 89 M 5552 13 52 mfgadmin 26 3 I 283 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 83 M 5553 20 56 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 17280.24 0.33165811206625700037 0.00 \N \N \N M 5554 20 56 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 52102.57 1.00000000000000000000 0.00 \N \N \N M 5555 20 56 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 52112.37 1.00018809052989132782 \N \N \N 103 M 5556 20 56 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 -9.80 -0.00018809052989132782 \N \N \N 135 M 5557 20 56 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 429.61 0.00824546658638911670 0.00 \N \N \N M 5558 20 56 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 5559 20 56 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 371.00 0.00712057006017169595 \N \N \N 122 M 5560 20 56 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 5561 20 56 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 58.61 0.00112489652621742075 \N \N \N 101 M 5562 20 56 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 35251.94 0.67658735452013211632 0.00 \N \N \N M 5563 20 56 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 35322.14 0.67793469688731285232 \N \N \N 108 M 5564 20 56 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 -70.20 -0.00134734236718073600 \N \N \N 136 M 5565 20 56 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 5566 20 56 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 -63.83 -0.00122508352275137292 0.00 \N \N \N M 5567 20 56 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 5568 20 56 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 5569 20 56 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 5570 20 56 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 5571 20 56 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 5572 20 56 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 5573 20 56 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 5574 20 56 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -63.82 -0.00122489159363923891 \N \N \N 91 M 5575 20 56 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 5576 20 56 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 5577 20 56 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 5578 20 56 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 5579 20 56 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -0.01 -0.000000191929112134007977 \N \N \N 118 M 5580 20 56 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 52102.57 1.00000000000000000000 \N \N Total Sales \N M 5581 20 56 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 429.61 0.00824546658638911670 \N \N Total Other Revenue \N M 5582 20 56 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 35251.94 0.67658735452013211632 \N \N Total Cost Of Sales \N M 5583 20 56 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 17280.24 0.33165811206625700037 \N \N GROSS PROFIT \N M 5584 20 56 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 -63.83 -0.00122508352275137292 \N \N Total Expenses \N M 5585 20 56 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 17344.07 \N \N \N NET INCOME \N M 5586 21 56 mfgadmin 1 0 G 143 0.00 3052272.38 0.00 0.00 0.00 \N \N \N \N \N -1 20870.08 \N 0.00 \N \N \N M 5587 21 56 mfgadmin 2 1 G 154 0.00 3051272.38 0.00 0.00 0.00 \N 0.99967237524195006476 \N \N 0.00000000000000000000 143 20870.08 \N 0.00 \N \N \N M 5588 21 56 mfgadmin 3 2 G 155 0.00 3028706.08 0.00 0.00 0.00 \N 0.99227909666436781111 \N \N 0.00000000000000000000 154 1826.70 \N 0.00 \N \N \N M 5589 21 56 mfgadmin 4 3 I 268 \N 2878514.58 \N \N 0 \N 0.94307264281571096220 \N \N 0.00000000000000000000 155 -51225.00 \N \N \N \N 109 M 5590 21 56 mfgadmin 5 3 I 268 \N 23095.22 \N \N 0 \N 0.00756656586461002540 \N \N 0.00000000000000000000 155 -1617.25 \N \N \N \N 126 M 5591 21 56 mfgadmin 6 3 I 268 \N 127096.28 \N \N 0 \N 0.04163988798404682350 \N \N 0.00000000000000000000 155 54668.95 \N \N \N \N 127 M 5592 21 56 mfgadmin 8 2 G 163 0.00 0.01 0.00 0.00 0.00 \N 0.0000000032762475804993524202 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 5593 21 56 mfgadmin 9 3 I 269 \N 0.01 \N \N 0 \N 0.0000000032762475804993524202 \N \N 0.00000000000000000000 163 0.00 \N \N \N \N 106 M 5594 21 56 mfgadmin 11 2 G 156 0.00 22566.29 0.00 0.00 0.00 \N 0.00739327530133467315 \N \N 0.00000000000000000000 154 19043.38 \N 0.00 \N \N \N M 5595 21 56 mfgadmin 12 3 I 270 \N 19203.23 \N \N 0 \N 0.00629145358252725794 \N \N 0.00000000000000000000 156 19805.91 \N \N \N \N 85 M 5596 21 56 mfgadmin 13 3 I 270 \N 100.00 \N \N 0 \N 0.000032762475804993524202 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 138 M 5597 21 56 mfgadmin 14 3 I 270 \N 2685.54 \N \N 0 \N 0.00087984939273342309 \N \N 0.00000000000000000000 156 128.50 \N \N \N \N 128 M 5598 21 56 mfgadmin 15 3 I 270 \N 0.02 \N \N 0 \N 0.0000000065524951609987048404 \N \N 0.00000000000000000000 156 0.01 \N \N \N \N 86 M 5599 21 56 mfgadmin 16 3 I 270 \N 2000.00 \N \N 0 \N 0.00065524951609987048 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 5600 21 56 mfgadmin 17 3 I 270 \N -1463.01 \N \N 0 \N -0.00047931829727463576 \N \N 0.00000000000000000000 156 -1166.30 \N \N \N \N 87 M 5601 21 56 mfgadmin 18 3 I 270 \N 40.51 \N \N 0 \N 0.000013272078948602876654 \N \N 0.00000000000000000000 156 275.26 \N \N \N \N 90 M 5602 21 56 mfgadmin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 5603 21 56 mfgadmin 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 5604 21 56 mfgadmin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 5605 21 56 mfgadmin 22 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 5606 21 56 mfgadmin 23 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 5607 21 56 mfgadmin 24 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 5608 21 56 mfgadmin 27 1 G 157 0.00 1000.00 0.00 0.00 0.00 \N 0.00032762475804993524 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 5609 21 56 mfgadmin 28 2 I 271 \N 1000.00 \N \N 0 \N 0.00032762475804993524 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 5610 21 56 mfgadmin 31 0 G 144 0.00 3052272.38 0.00 0.00 0.00 \N \N \N \N \N -1 3526.01 \N 0.00 \N \N \N M 5611 21 56 mfgadmin 32 1 G 145 0.00 12349.10 0.00 0.00 0.00 \N 0.00404587089963445530 \N \N 0.00000000000000000000 144 3526.01 \N 0.00 \N \N \N M 5612 21 56 mfgadmin 33 2 G 164 0.00 262.95 0.00 0.00 0.00 \N 0.000086148930129230471889 \N \N 0.00000000000000000000 145 -0.60 \N 0.00 \N \N \N M 5613 21 56 mfgadmin 34 3 I 274 \N 262.95 \N \N 0 \N 0.000086148930129230471889 \N \N 0.00000000000000000000 164 -0.60 \N \N \N \N 99 M 5614 21 56 mfgadmin 36 2 G 158 0.00 7086.15 0.00 0.00 0.00 \N 0.00232159817925554862 \N \N 0.00000000000000000000 145 3526.61 \N 0.00 \N \N \N M 5615 21 56 mfgadmin 37 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 5616 21 56 mfgadmin 38 3 I 273 \N 2634.45 \N \N 0 \N 0.00086311104384465190 \N \N 0.00000000000000000000 158 1331.24 \N \N \N \N 94 M 5617 21 56 mfgadmin 39 3 I 273 \N 1338.54 \N \N 0 \N 0.00043853884364016032 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 5618 21 56 mfgadmin 40 3 I 273 \N 2281.81 \N \N 0 \N 0.00074757744916592273 \N \N 0.00000000000000000000 158 2195.37 \N \N \N \N 129 M 5619 21 56 mfgadmin 41 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 5620 21 56 mfgadmin 42 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 5621 21 56 mfgadmin 43 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 95 M 5622 21 56 mfgadmin 44 3 I 273 \N 631.35 \N \N 0 \N 0.00020684589099482662 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 5623 21 56 mfgadmin 45 3 I 273 \N 200.00 \N \N 0 \N 0.000065524951609987048404 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 5624 21 56 mfgadmin 47 2 G 159 0.00 5000.00 0.00 0.00 0.00 \N 0.00163812379024967621 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 5625 21 56 mfgadmin 48 3 I 275 \N 5000.00 \N \N 0 \N 0.00163812379024967621 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 5626 21 56 mfgadmin 51 1 G 146 0.00 3039923.28 0.00 0.00 0.00 \N 0.99595412910036554470 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 5627 21 56 mfgadmin 52 2 G 160 0.00 1420000.00 0.00 0.00 0.00 \N 0.46522715643090804367 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 5628 21 56 mfgadmin 53 3 I 276 \N 1420000.00 \N \N 0 \N 0.46522715643090804367 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 5629 21 56 mfgadmin 54 3 I 276 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 5630 21 56 mfgadmin 56 2 G 147 \N 417136.04 \N \N 0.00 \N 0.13721926561251901068 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 5631 21 56 mfgadmin 57 2 G 162 0.00 1202787.24 0.00 0.00 0.00 \N 0.39406287849054939193 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 5632 21 56 mfgadmin 58 3 I 277 \N 1202787.24 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 5633 21 56 mfgadmin 7 3 T -1 \N 3028706.08 \N \N 0.00 \N 0.99227909666436781111 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 5634 21 56 mfgadmin 10 3 T -1 \N 0.01 \N \N 0.00 \N 0.0000000032762475804993524202 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 5635 21 56 mfgadmin 25 3 T -1 \N 22566.29 \N \N 0.00 \N 0.00739327530133467315 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 5636 21 56 mfgadmin 26 2 T -1 \N 3051272.38 \N \N 0.00 \N 0.99967237524195006476 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 5637 13 77 admin 22 3 I 138 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 86 M 7331 21 56 mfgadmin 29 2 T -1 \N 1000.00 \N \N 0.00 \N 0.00032762475804993524 \N \N 0.00000000000000000000 157 \N \N \N \N Total Fixed Assets \N M 5638 21 56 mfgadmin 30 1 T -1 \N 3052272.38 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 5639 21 56 mfgadmin 35 3 T -1 \N 262.95 \N \N 0.00 \N 0.000086148930129230471889 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 5640 21 56 mfgadmin 46 3 T -1 \N 7086.15 \N \N 0.00 \N 0.00232159817925554862 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 5641 21 56 mfgadmin 49 3 T -1 \N 5000.00 \N \N 0.00 \N 0.00163812379024967621 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 5642 21 56 mfgadmin 50 2 T -1 \N 12349.10 \N \N 0.00 \N 0.00404587089963445530 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 5643 21 56 mfgadmin 55 3 T -1 \N 1420000.00 \N \N 0.00 \N 0.46522715643090804367 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 5644 21 56 mfgadmin 59 3 T -1 \N 1202787.24 \N \N 0.00 \N 0.39406287849054939193 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 5645 21 56 mfgadmin 60 2 T -1 \N 3039923.28 \N \N 0.00 \N 0.99595412910036554470 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 5646 21 56 mfgadmin 61 1 T -1 \N 3052272.38 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 5647 21 56 mfgadmin 62 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 5648 21 57 mfgadmin 1 0 G 143 0.00 3184272.38 0.00 0.00 0.00 \N \N \N \N \N -1 132000.00 \N 0.00 \N \N \N M 5649 21 57 mfgadmin 2 1 G 154 0.00 3183272.38 0.00 0.00 0.00 \N 0.99968595651355679567 \N \N 0.00000000000000000000 143 132000.00 \N 0.00 \N \N \N M 5650 21 57 mfgadmin 3 2 G 155 0.00 3105956.08 0.00 0.00 0.00 \N 0.97540527610266807640 \N \N 0.00000000000000000000 154 77250.00 \N 0.00 \N \N \N M 5651 21 57 mfgadmin 4 3 I 268 \N 2955764.58 \N \N 0 \N 0.92823861380853355265 \N \N 0.00000000000000000000 155 77250.00 \N \N \N \N 109 M 5652 21 57 mfgadmin 5 3 I 268 \N 23095.22 \N \N 0 \N 0.00725290340897282160 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 5653 21 57 mfgadmin 6 3 I 268 \N 127096.28 \N \N 0 \N 0.03991375888516170215 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 127 M 5654 21 57 mfgadmin 8 2 G 163 0.00 0.01 0.00 0.00 0.00 \N 0.0000000031404348644320433417 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 5655 21 57 mfgadmin 9 3 I 269 \N 0.01 \N \N 0 \N 0.0000000031404348644320433417 \N \N 0.00000000000000000000 163 0.00 \N \N \N \N 106 M 5656 21 57 mfgadmin 11 2 G 156 0.00 77316.29 0.00 0.00 0.00 \N 0.02428067727045385483 \N \N 0.00000000000000000000 154 54750.00 \N 0.00 \N \N \N M 5657 21 57 mfgadmin 12 3 I 270 \N 73953.23 \N \N 0 \N 0.02322453018293617206 \N \N 0.00000000000000000000 156 54750.00 \N \N \N \N 85 M 5658 21 57 mfgadmin 13 3 I 270 \N 100.00 \N \N 0 \N 0.000031404348644320433417 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 138 M 5659 21 57 mfgadmin 14 3 I 270 \N 2685.54 \N \N 0 \N 0.00084337634458268297 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 5660 21 57 mfgadmin 15 3 I 270 \N 0.02 \N \N 0 \N 0.0000000062808697288640866834 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 86 M 5661 21 57 mfgadmin 16 3 I 270 \N 2000.00 \N \N 0 \N 0.00062808697288640867 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 5662 21 57 mfgadmin 17 3 I 270 \N -1463.01 \N \N 0 \N -0.00045944876110127237 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 87 M 5663 21 57 mfgadmin 18 3 I 270 \N 40.51 \N \N 0 \N 0.000012721901635814207577 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 90 M 5664 21 57 mfgadmin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 5665 21 57 mfgadmin 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 5666 21 57 mfgadmin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 5667 21 57 mfgadmin 22 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 5668 21 57 mfgadmin 23 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 5669 21 57 mfgadmin 24 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 5670 21 57 mfgadmin 27 1 G 157 0.00 1000.00 0.00 0.00 0.00 \N 0.00031404348644320433 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 5671 21 57 mfgadmin 28 2 I 271 \N 1000.00 \N \N 0 \N 0.00031404348644320433 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 5672 21 57 mfgadmin 31 0 G 144 0.00 3184272.38 0.00 0.00 0.00 \N \N \N \N \N -1 100000.00 \N 0.00 \N \N \N M 5673 21 57 mfgadmin 32 1 G 145 0.00 12349.10 0.00 0.00 0.00 \N 0.00387815441843577464 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 5674 21 57 mfgadmin 33 2 G 164 0.00 262.95 0.00 0.00 0.00 \N 0.000082577734760240579671 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 5675 21 57 mfgadmin 34 3 I 274 \N 262.95 \N \N 0 \N 0.000082577734760240579671 \N \N 0.00000000000000000000 164 0.00 \N \N \N \N 99 M 5676 21 57 mfgadmin 36 2 G 158 0.00 7086.15 0.00 0.00 0.00 \N 0.00222535925145951239 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 5677 21 57 mfgadmin 37 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 5678 21 57 mfgadmin 38 3 I 273 \N 2634.45 \N \N 0 \N 0.00082733186286029966 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 94 M 5679 21 57 mfgadmin 58 3 I 277 \N 1619923.28 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 5680 21 57 mfgadmin 39 3 I 273 \N 1338.54 \N \N 0 \N 0.00042035976834368673 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 5681 21 57 mfgadmin 40 3 I 273 \N 2281.81 \N \N 0 \N 0.00071658756780096808 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 5682 21 57 mfgadmin 41 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 5683 21 57 mfgadmin 42 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 5684 21 57 mfgadmin 43 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 95 M 5685 21 57 mfgadmin 44 3 I 273 \N 631.35 \N \N 0 \N 0.00019827135516591706 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 5686 21 57 mfgadmin 45 3 I 273 \N 200.00 \N \N 0 \N 0.000062808697288640866834 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 5687 21 57 mfgadmin 47 2 G 159 0.00 5000.00 0.00 0.00 0.00 \N 0.00157021743221602167 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 5688 21 57 mfgadmin 48 3 I 275 \N 5000.00 \N \N 0 \N 0.00157021743221602167 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 5689 21 57 mfgadmin 51 1 G 146 0.00 3171923.28 0.00 0.00 0.00 \N 0.99612184558156422536 \N \N 0.00000000000000000000 144 100000.00 \N 0.00 \N \N \N M 5690 21 57 mfgadmin 52 2 G 160 0.00 1520000.00 0.00 0.00 0.00 \N 0.47734609939367058794 \N \N 0.00000000000000000000 146 100000.00 \N 0.00 \N \N \N M 5691 21 57 mfgadmin 53 3 I 276 \N 1420000.00 \N \N 0 \N 0.44594175074935015452 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 5692 21 57 mfgadmin 54 3 I 276 \N 100000.00 \N \N 0 \N 0.03140434864432043342 \N \N 0.00000000000000000000 160 100000.00 \N \N \N \N 114 M 5693 21 57 mfgadmin 56 2 G 147 \N 32000.00 \N \N 0.00 \N 0.01008851639059819883 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 5694 21 57 mfgadmin 57 2 G 162 0.00 1619923.28 0.00 0.00 0.00 \N 0.50872635462171109872 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 5695 21 57 mfgadmin 7 3 T -1 \N 3105956.08 \N \N 0.00 \N 0.97540527610266807640 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 5696 21 57 mfgadmin 10 3 T -1 \N 0.01 \N \N 0.00 \N 0.0000000031404348644320433417 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 5697 21 57 mfgadmin 25 3 T -1 \N 77316.29 \N \N 0.00 \N 0.02428067727045385483 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 5698 21 57 mfgadmin 26 2 T -1 \N 3183272.38 \N \N 0.00 \N 0.99968595651355679567 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 5699 21 57 mfgadmin 29 2 T -1 \N 1000.00 \N \N 0.00 \N 0.00031404348644320433 \N \N 0.00000000000000000000 157 \N \N \N \N Total Fixed Assets \N M 5700 13 77 admin 23 3 I 280 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 130 M 7332 21 57 mfgadmin 30 1 T -1 \N 3184272.38 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 5701 21 57 mfgadmin 35 3 T -1 \N 262.95 \N \N 0.00 \N 0.000082577734760240579671 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 5702 21 57 mfgadmin 46 3 T -1 \N 7086.15 \N \N 0.00 \N 0.00222535925145951239 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 5703 21 57 mfgadmin 49 3 T -1 \N 5000.00 \N \N 0.00 \N 0.00157021743221602167 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 5704 21 57 mfgadmin 50 2 T -1 \N 12349.10 \N \N 0.00 \N 0.00387815441843577464 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 5705 21 57 mfgadmin 55 3 T -1 \N 1520000.00 \N \N 0.00 \N 0.47734609939367058794 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 5706 21 57 mfgadmin 59 3 T -1 \N 1619923.28 \N \N 0.00 \N 0.50872635462171109872 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 5707 21 57 mfgadmin 60 2 T -1 \N 3171923.28 \N \N 0.00 \N 0.99612184558156422536 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 5708 21 57 mfgadmin 61 1 T -1 \N 3184272.38 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 5709 21 57 mfgadmin 62 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 5710 21 58 mfgadmin 58 3 I 277 \N 1619923.28 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 5711 21 58 mfgadmin 1 0 G 143 0.00 3226272.38 0.00 0.00 0.00 \N \N \N \N \N -1 42000.00 \N 0.00 \N \N \N M 5712 21 58 mfgadmin 2 1 G 154 0.00 3225272.38 0.00 0.00 0.00 \N 0.99969004476925162779 \N \N 0.00000000000000000000 143 42000.00 \N 0.00 \N \N \N M 5713 21 58 mfgadmin 3 2 G 155 0.00 3193206.08 0.00 0.00 0.00 \N 0.98975092735350509990 \N \N 0.00000000000000000000 154 87250.00 \N 0.00 \N \N \N M 5714 21 58 mfgadmin 4 3 I 268 \N 3043014.58 \N \N 0 \N 0.94319828631456095471 \N \N 0.00000000000000000000 155 87250.00 \N \N \N \N 109 M 5715 21 58 mfgadmin 5 3 I 268 \N 23095.22 \N \N 0 \N 0.00715848424428442090 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 5716 21 58 mfgadmin 6 3 I 268 \N 127096.28 \N \N 0 \N 0.03939415679465972430 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 127 M 5717 21 58 mfgadmin 8 2 G 163 0.00 0.01 0.00 0.00 0.00 \N 0.0000000030995523074837221276 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 5718 21 58 mfgadmin 9 3 I 269 \N 0.01 \N \N 0 \N 0.0000000030995523074837221276 \N \N 0.00000000000000000000 163 0.00 \N \N \N \N 106 M 5719 21 58 mfgadmin 11 2 G 156 0.00 32066.29 0.00 0.00 0.00 \N 0.00993911431619422040 \N \N 0.00000000000000000000 154 -45250.00 \N 0.00 \N \N \N M 5720 21 58 mfgadmin 12 3 I 270 \N 28703.23 \N \N 0 \N 0.00889671627787359975 \N \N 0.00000000000000000000 156 -45250.00 \N \N \N \N 85 M 5721 21 58 mfgadmin 13 3 I 270 \N 100.00 \N \N 0 \N 0.000030995523074837221276 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 138 M 5722 21 58 mfgadmin 14 3 I 270 \N 2685.54 \N \N 0 \N 0.00083239717038398351 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 5723 21 58 mfgadmin 15 3 I 270 \N 0.02 \N \N 0 \N 0.0000000061991046149674442553 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 86 M 5724 21 58 mfgadmin 16 3 I 270 \N 2000.00 \N \N 0 \N 0.00061991046149674443 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 5725 21 58 mfgadmin 17 3 I 270 \N -1463.01 \N \N 0 \N -0.00045346760213717603 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 87 M 5726 21 58 mfgadmin 18 3 I 270 \N 40.51 \N \N 0 \N 0.000012556286397616558339 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 90 M 5727 21 58 mfgadmin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 5728 21 58 mfgadmin 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 5729 21 58 mfgadmin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 5730 21 58 mfgadmin 22 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 5731 21 58 mfgadmin 23 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 5732 21 58 mfgadmin 24 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 5733 21 58 mfgadmin 27 1 G 157 0.00 1000.00 0.00 0.00 0.00 \N 0.00030995523074837221 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 5734 21 58 mfgadmin 28 2 I 271 \N 1000.00 \N \N 0 \N 0.00030995523074837221 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 5735 21 58 mfgadmin 31 0 G 144 0.00 3226272.38 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 5736 21 58 mfgadmin 32 1 G 145 0.00 12349.10 0.00 0.00 0.00 \N 0.00382766814003472329 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 5737 21 58 mfgadmin 33 2 G 164 0.00 262.95 0.00 0.00 0.00 \N 0.000081502727925284473346 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 5738 21 58 mfgadmin 34 3 I 274 \N 262.95 \N \N 0 \N 0.000081502727925284473346 \N \N 0.00000000000000000000 164 0.00 \N \N \N \N 99 M 5739 21 58 mfgadmin 36 2 G 158 0.00 7086.15 0.00 0.00 0.00 \N 0.00219638925836757776 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 5740 21 58 mfgadmin 37 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 5741 21 58 mfgadmin 38 3 I 273 \N 2634.45 \N \N 0 \N 0.00081656155764504918 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 94 M 5742 21 58 mfgadmin 39 3 I 273 \N 1338.54 \N \N 0 \N 0.00041488747456592614 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 5743 21 58 mfgadmin 40 3 I 273 \N 2281.81 \N \N 0 \N 0.00070725894507394320 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 5744 21 58 mfgadmin 41 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 5745 21 58 mfgadmin 42 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 5746 21 58 mfgadmin 43 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 95 M 5747 21 58 mfgadmin 44 3 I 273 \N 631.35 \N \N 0 \N 0.00019569023493298480 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 5748 21 58 mfgadmin 45 3 I 273 \N 200.00 \N \N 0 \N 0.000061991046149674442553 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 5749 21 58 mfgadmin 47 2 G 159 0.00 5000.00 0.00 0.00 0.00 \N 0.00154977615374186106 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 5750 21 58 mfgadmin 48 3 I 275 \N 5000.00 \N \N 0 \N 0.00154977615374186106 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 5751 21 58 mfgadmin 51 1 G 146 0.00 3213923.28 0.00 0.00 0.00 \N 0.99617233185996527671 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 5752 21 58 mfgadmin 52 2 G 160 0.00 1520000.00 0.00 0.00 0.00 \N 0.47113195073752576340 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 5753 21 58 mfgadmin 53 3 I 276 \N 1420000.00 \N \N 0 \N 0.44013642766268854212 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 5754 21 58 mfgadmin 54 3 I 276 \N 100000.00 \N \N 0 \N 0.03099552307483722128 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 5755 21 58 mfgadmin 56 2 G 147 \N 74000.00 \N \N 0.00 \N 0.02302481843934992748 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 5756 21 58 mfgadmin 57 2 G 162 0.00 1619923.28 0.00 0.00 0.00 \N 0.50210369404705996956 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 5757 21 58 mfgadmin 7 3 T -1 \N 3193206.08 \N \N 0.00 \N 0.98975092735350509990 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 5758 21 58 mfgadmin 10 3 T -1 \N 0.01 \N \N 0.00 \N 0.0000000030995523074837221276 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 5759 21 58 mfgadmin 25 3 T -1 \N 32066.29 \N \N 0.00 \N 0.00993911431619422040 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 5760 21 58 mfgadmin 26 2 T -1 \N 3225272.38 \N \N 0.00 \N 0.99969004476925162779 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 5761 21 58 mfgadmin 29 2 T -1 \N 1000.00 \N \N 0.00 \N 0.00030995523074837221 \N \N 0.00000000000000000000 157 \N \N \N \N Total Fixed Assets \N M 5762 21 58 mfgadmin 30 1 T -1 \N 3226272.38 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 5763 21 58 mfgadmin 35 3 T -1 \N 262.95 \N \N 0.00 \N 0.000081502727925284473346 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 5764 21 58 mfgadmin 46 3 T -1 \N 7086.15 \N \N 0.00 \N 0.00219638925836757776 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 5765 21 58 mfgadmin 49 3 T -1 \N 5000.00 \N \N 0.00 \N 0.00154977615374186106 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 5766 21 58 mfgadmin 50 2 T -1 \N 12349.10 \N \N 0.00 \N 0.00382766814003472329 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 5767 21 58 mfgadmin 55 3 T -1 \N 1520000.00 \N \N 0.00 \N 0.47113195073752576340 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 5768 21 58 mfgadmin 59 3 T -1 \N 1619923.28 \N \N 0.00 \N 0.50210369404705996956 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 5769 21 58 mfgadmin 60 2 T -1 \N 3213923.28 \N \N 0.00 \N 0.99617233185996527671 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 5770 21 58 mfgadmin 61 1 T -1 \N 3226272.38 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 5771 21 58 mfgadmin 62 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 5772 19 68 mfgadmin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 9.00 \N 0.00 \N \N \N Y 5773 19 68 mfgadmin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 -7.00 \N 0.00 \N \N \N Y 5774 19 68 mfgadmin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1.00 0.14285714285714285714 \N \N \N 103 Y 5775 19 68 mfgadmin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1.00 0.14285714285714285714 \N \N \N 121 Y 5776 19 68 mfgadmin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1.00 0.14285714285714285714 \N \N \N 122 Y 5777 19 68 mfgadmin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1.00 0.14285714285714285714 \N \N \N 135 Y 5778 19 68 mfgadmin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1.00 0.14285714285714285714 \N \N \N 123 Y 5779 19 68 mfgadmin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1.00 0.14285714285714285714 \N \N \N 101 Y 5780 19 68 mfgadmin 13 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 108 Y 5781 19 68 mfgadmin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1.00 0.14285714285714285714 \N \N \N 115 Y 5782 19 68 mfgadmin 12 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 -16.00 \N 0.00 \N \N \N Y 5783 19 68 mfgadmin 14 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 136 Y 5784 19 68 mfgadmin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 137 Y 5785 19 68 mfgadmin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 97 Y 5786 19 68 mfgadmin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 131 Y 5787 19 68 mfgadmin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 119 Y 5788 19 68 mfgadmin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 120 Y 5789 19 68 mfgadmin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 112 Y 5790 19 68 mfgadmin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 98 Y 5791 19 68 mfgadmin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 110 Y 5792 19 68 mfgadmin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 91 Y 5793 19 68 mfgadmin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 92 Y 5794 19 68 mfgadmin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 93 Y 5795 19 68 mfgadmin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 125 Y 5796 19 68 mfgadmin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 117 Y 5797 19 68 mfgadmin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -1.00 0.06250000000000000000 \N \N \N 118 Y 5798 19 68 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 -7.00 \N \N \N Total Net Revenue \N Y 5799 19 68 mfgadmin 29 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 -16.00 \N \N \N Total Net Expenses \N Y 5800 19 68 mfgadmin 30 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 9.00 \N \N \N Net Income \N Y 5801 19 41 mfgadmin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 1179330.11 \N 0.00 \N \N \N Y 5802 19 41 mfgadmin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 1850943.23 \N 0.00 \N \N \N Y 5803 19 41 mfgadmin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 1850483.64 0.99975169956995385536 \N \N \N 103 Y 5804 19 41 mfgadmin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 239.46 0.00012937187706183728 \N \N \N 121 Y 5805 19 41 mfgadmin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 213.00 0.00011507646293398204 \N \N \N 122 Y 5806 19 41 mfgadmin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 Y 5807 19 41 mfgadmin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 Y 5808 19 41 mfgadmin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 7.13 0.000003852090050325314407 \N \N \N 101 Y 5809 19 41 mfgadmin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 Y 5810 19 41 mfgadmin 12 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 671613.12 \N 0.00 \N \N \N Y 5811 19 41 mfgadmin 13 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 656279.89 0.97716954963595708196 \N \N \N 108 Y 5812 19 41 mfgadmin 14 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 Y 5813 19 41 mfgadmin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 Y 5814 19 41 mfgadmin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 12338.78 0.01837185670226335066 \N \N \N 97 Y 5815 19 41 mfgadmin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 Y 5816 19 41 mfgadmin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 Y 5817 19 41 mfgadmin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 3417.00 0.00508775051922749812 \N \N \N 120 Y 5818 19 41 mfgadmin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 Y 5819 19 41 mfgadmin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 Y 5820 19 41 mfgadmin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 Y 5821 19 41 mfgadmin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -521.55 -0.00077656314992774412 \N \N \N 91 Y 5822 19 41 mfgadmin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 94.00 0.00013996153023335816 \N \N \N 92 Y 5823 19 41 mfgadmin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 5.00 0.000007444762246455221125 \N \N \N 93 Y 5824 19 41 mfgadmin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 Y 5825 19 41 mfgadmin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 Y 5826 19 41 mfgadmin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 Y 5827 19 41 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 1850943.23 \N \N \N Total Net Revenue \N Y 5828 19 41 mfgadmin 29 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 671613.12 \N \N \N Total Net Expenses \N Y 5829 19 41 mfgadmin 30 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 1179330.11 \N \N \N Net Income \N Y 5830 19 56 mfgadmin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 Y 5831 19 56 mfgadmin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 417136.04 \N 0.00 \N \N \N Y 5832 19 56 mfgadmin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 703469.25 \N 0.00 \N \N \N Y 5833 19 56 mfgadmin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 701169.08 0.99673024798169927115 \N \N \N 103 Y 5834 19 56 mfgadmin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 910.33 0.00129405798476621402 \N \N \N 121 Y 5835 19 56 mfgadmin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 1152.03 0.00163764087769294820 \N \N \N 122 Y 5836 19 56 mfgadmin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -9.80 -0.000013930957181141890708 \N \N \N 135 Y 5837 19 56 mfgadmin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 247.61 0.00035198411302270853 \N \N \N 101 Y 5838 19 56 mfgadmin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 Y 5839 19 56 mfgadmin 12 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 286333.21 \N 0.00 \N \N \N Y 5840 19 56 mfgadmin 13 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 274473.92 0.95858220567568812573 \N \N \N 108 Y 5841 19 56 mfgadmin 14 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -70.20 -0.00024516890653375485 \N \N \N 136 Y 5842 19 56 mfgadmin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 Y 5843 19 56 mfgadmin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 6599.00 0.02304657570108615763 \N \N \N 97 Y 5844 19 56 mfgadmin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 1600.00 0.00558789530561264619 \N \N \N 131 Y 5845 19 56 mfgadmin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 1000.00 0.00349243456600790387 \N \N \N 119 Y 5846 19 56 mfgadmin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 5678.50 0.01983178968307588212 \N \N \N 120 Y 5847 19 56 mfgadmin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 Y 5848 19 56 mfgadmin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 200.00 0.00069848691320158077 \N \N \N 98 Y 5849 19 56 mfgadmin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 1000.00 0.00349243456600790387 \N \N \N 110 Y 5850 19 56 mfgadmin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -4148.00 -0.01448661857980078525 \N \N \N 91 Y 5851 19 56 mfgadmin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 Y 5852 19 56 mfgadmin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 Y 5853 19 56 mfgadmin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 Y 5854 19 56 mfgadmin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 Y 5855 19 56 mfgadmin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -0.01 -0.000000034924345660079039 \N \N \N 118 Y 5856 19 56 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 703469.25 \N \N \N Total Net Revenue \N Y 5857 19 56 mfgadmin 29 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 286333.21 \N \N \N Total Net Expenses \N Y 5858 19 56 mfgadmin 30 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 417136.04 \N \N \N Net Income \N Y 5859 20 62 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 -74910.85 0.44945799856362269476 0.00 \N \N \N Q 5860 20 62 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 -166669.30 1.00000000000000000000 0.00 \N \N \N Q 5861 20 62 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 -166668.30 0.99999400009479850218 \N \N \N 103 Q 5862 20 62 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 -1.00 0.000005999905201497816335 \N \N \N 135 Q 5863 20 62 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 -70.06 0.00042035335841693701 0.00 \N \N \N Q 5864 20 62 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -1.00 0.000005999905201497816335 \N \N \N 121 Q 5865 20 62 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -60.00 0.00035999431208986898 \N \N \N 122 Q 5866 20 62 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -1.00 0.000005999905201497816335 \N \N \N 123 Q 5867 20 62 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -8.06 0.000048359235924072399656 \N \N \N 101 Q 5868 20 62 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 -91828.51 0.55096235479479424225 0.00 \N \N \N Q 5869 20 62 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 -91826.51 0.55095035498439124662 \N \N \N 108 Q 5870 20 62 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 -1.00 0.000005999905201497816335 \N \N \N 136 Q 5871 20 62 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 -1.00 0.000005999905201497816335 \N \N \N 137 Q 5872 20 62 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 -38.10 0.00022859638817706680 0.00 \N \N \N Q 5873 20 62 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 97 Q 5874 20 62 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 131 Q 5875 20 62 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 119 Q 5876 20 62 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -23.85 0.00014309773905572292 \N \N \N 120 Q 5877 20 62 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 112 Q 5878 20 62 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 98 Q 5879 20 62 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 110 Q 5880 20 62 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 91 Q 5881 20 62 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 92 Q 5882 20 62 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -3.25 0.000019499691904867903087 \N \N \N 93 Q 5883 20 62 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 125 Q 5884 20 62 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 117 Q 5885 20 62 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -1.00 0.000005999905201497816335 \N \N \N 118 Q 5886 20 62 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 -166669.30 1.00000000000000000000 \N \N Total Sales \N Q 5887 20 62 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 -70.06 0.00042035335841693701 \N \N Total Other Revenue \N Q 5888 20 62 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 -91828.51 0.55096235479479424225 \N \N Total Cost Of Sales \N Q 5889 20 62 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 -74910.85 0.44945799856362269476 \N \N GROSS PROFIT \N Q 5890 20 62 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 -38.10 0.00022859638817706680 \N \N Total Expenses \N Q 5891 20 62 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N -74872.75 \N \N \N NET INCOME \N Q 5892 20 59 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 74907.85 0.44944539210750999146 0.00 \N \N \N Q 5893 20 59 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 166667.30 1.00000000000000000000 0.00 \N \N \N Q 5894 20 59 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 166667.30 1.00000000000000000000 \N \N \N 103 Q 5895 20 59 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 Q 5896 20 59 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 66.06 0.00039635849383772342 0.00 \N \N \N Q 5897 20 59 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 Q 5898 20 59 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 59.00 0.00035399865480511174 \N \N \N 122 Q 5899 20 59 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 Q 5900 20 59 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 7.06 0.000042359839032611676076 \N \N \N 101 Q 5901 20 59 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 91825.51 0.55095096638632773195 0.00 \N \N \N Q 5902 20 59 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 91825.51 0.55095096638632773195 \N \N \N 108 Q 5903 20 59 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 Q 5904 20 59 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 Q 5905 20 59 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 25.10 0.00015059942772217466 0.00 \N \N \N Q 5906 20 59 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 Q 5907 20 59 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 Q 5908 20 59 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 Q 5909 20 59 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 22.85 0.00013709947902197972 \N \N \N 120 Q 5910 20 59 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 Q 5911 20 59 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 Q 5912 20 59 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 Q 5913 20 59 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 Q 5914 20 59 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 Q 5915 20 59 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 2.25 0.000013499948700194939259 \N \N \N 93 Q 5916 20 59 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 Q 5917 20 59 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 Q 5918 20 59 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 Q 5919 20 59 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 166667.30 1.00000000000000000000 \N \N Total Sales \N Q 5920 20 59 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 66.06 0.00039635849383772342 \N \N Total Other Revenue \N Q 5921 20 59 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 91825.51 0.55095096638632773195 \N \N Total Cost Of Sales \N Q 5922 20 59 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 74907.85 0.44944539210750999146 \N \N GROSS PROFIT \N Q 5923 20 59 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 25.10 0.00015059942772217466 \N \N Total Expenses \N Q 5924 20 59 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 74882.75 \N \N \N NET INCOME \N Q 5925 20 56 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 79280.24 0.38748408683234037578 0.00 \N \N \N Q 5926 20 56 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 204602.57 1.00000000000000000000 0.00 \N \N \N Q 5927 20 56 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 204612.37 1.00004789773657290815 \N \N \N 103 Q 5928 20 56 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 -9.80 -0.000047897736572908150665 \N \N \N 135 Q 5929 20 56 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 429.61 0.00209972924582521129 0.00 \N \N \N Q 5930 20 56 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 Q 5931 20 56 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 371.00 0.00181327145597437999 \N \N \N 122 Q 5932 20 56 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 Q 5933 20 56 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 58.61 0.00028645778985083130 \N \N \N 101 Q 5934 20 56 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 125751.94 0.61461564241348483550 0.00 \N \N \N Q 5935 20 56 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 125822.14 0.61495874660811934083 \N \N \N 108 Q 5936 20 56 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 -70.20 -0.00034310419463450532 \N \N \N 136 Q 5937 20 56 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 Q 5938 20 56 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 -63.83 -0.00031197066586211503 0.00 \N \N \N Q 5939 20 56 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 Q 5940 20 56 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 Q 5941 20 56 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 Q 5942 20 56 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 Q 5943 20 56 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 Q 5944 20 56 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 Q 5945 20 56 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 Q 5946 20 56 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -63.82 -0.00031192179062071410 \N \N \N 91 Q 5947 20 56 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 Q 5948 20 56 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 Q 5949 20 56 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 Q 5950 20 56 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 Q 5951 20 56 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -0.01 -0.000000048875241400926684 \N \N \N 118 Q 5952 20 56 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 204602.57 1.00000000000000000000 \N \N Total Sales \N Q 5953 20 56 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 429.61 0.00209972924582521129 \N \N Total Other Revenue \N Q 5954 20 56 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 125751.94 0.61461564241348483550 \N \N Total Cost Of Sales \N Q 5955 20 56 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 79280.24 0.38748408683234037578 \N \N GROSS PROFIT \N Q 5956 20 56 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 -63.83 -0.00031197066586211503 \N \N Total Expenses \N Q 5957 20 56 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 79344.07 \N \N \N NET INCOME \N Q 5958 20 53 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 114668.64 0.60020225071970688301 0.00 \N \N \N Q 5959 20 53 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 191050.00 1.00000000000000000000 0.00 \N \N \N Q 5960 20 53 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 191050.00 1.00000000000000000000 \N \N \N 103 Q 5961 20 53 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 Q 5962 20 53 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 145.00 0.00075896362208845852 0.00 \N \N \N Q 5963 20 53 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 Q 5964 20 53 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 137.00 0.00071708976707668150 \N \N \N 122 Q 5965 20 53 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 Q 5966 20 53 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 8.00 0.000041873855011777021722 \N \N \N 101 Q 5967 20 53 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 76526.36 0.40055671290238157550 0.00 \N \N \N Q 5968 19 63 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 5969 20 53 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 76526.36 0.40055671290238157550 \N \N \N 108 Q 5970 20 53 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 Q 5971 20 53 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 Q 5972 20 53 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 1850.00 0.00968332897147343627 0.00 \N \N \N Q 5973 20 53 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 Q 5974 20 53 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 1600.00 0.00837477100235540434 \N \N \N 131 Q 5975 20 53 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 Q 5976 20 53 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 50.00 0.00026171159382360639 \N \N \N 120 Q 5977 20 53 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 Q 5978 20 53 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 200.00 0.00104684637529442554 \N \N \N 98 Q 5979 20 53 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 Q 5980 20 53 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 Q 5981 20 53 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 Q 5982 20 53 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 Q 5983 20 53 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 Q 5984 20 53 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 Q 5985 20 53 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 Q 5986 20 53 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 191050.00 1.00000000000000000000 \N \N Total Sales \N Q 5987 20 53 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 145.00 0.00075896362208845852 \N \N Total Other Revenue \N Q 5988 20 53 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 76526.36 0.40055671290238157550 \N \N Total Cost Of Sales \N Q 5989 20 53 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 114668.64 0.60020225071970688301 \N \N GROSS PROFIT \N Q 5990 20 53 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 1850.00 0.00968332897147343627 \N \N Total Expenses \N Q 5991 20 53 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 112818.64 \N \N \N NET INCOME \N Q 5992 20 50 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 128519.09 0.84209874876816304279 0.00 \N \N \N Q 5993 20 50 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 152617.60 1.00000000000000000000 0.00 \N \N \N Q 5994 20 50 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 152617.60 1.00000000000000000000 \N \N \N 103 Q 5995 20 50 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 Q 5996 20 50 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 1112.37 0.00728860891535445453 0.00 \N \N \N Q 5997 20 50 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 813.37 0.00532946396745853689 \N \N \N 121 Q 5998 20 50 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 299.00 0.00195914494789591764 \N \N \N 122 Q 5999 20 50 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 Q 6000 20 50 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 Q 6001 20 50 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 25210.88 0.16518986014719141174 0.00 \N \N \N Q 6002 20 50 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 25210.88 0.16518986014719141174 \N \N \N 108 Q 6003 20 50 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 Q 6004 20 50 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 Q 6005 20 50 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 -1347.00 -0.00882598075189231124 0.00 \N \N \N Q 6006 20 50 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 1599.00 0.01047716646048686390 \N \N \N 97 Q 6007 20 50 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 Q 6008 20 50 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 Q 6009 20 50 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 500.00 0.00327616212022728702 \N \N \N 120 Q 6010 20 50 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 Q 6011 20 50 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 Q 6012 20 50 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 Q 6013 20 50 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -3446.00 -0.02257930933260646216 \N \N \N 91 Q 6014 20 50 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 Q 6015 20 50 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 Q 6016 20 50 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 Q 6017 20 50 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 Q 6018 20 50 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 Q 6019 20 50 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 152617.60 1.00000000000000000000 \N \N Total Sales \N Q 6020 20 50 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 1112.37 0.00728860891535445453 \N \N Total Other Revenue \N Q 6021 20 50 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 25210.88 0.16518986014719141174 \N \N Total Cost Of Sales \N Q 6022 20 50 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 128519.09 0.84209874876816304279 \N \N GROSS PROFIT \N Q 6023 20 50 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 -1347.00 -0.00882598075189231124 \N \N Total Expenses \N Q 6024 20 50 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 129866.09 \N \N \N NET INCOME \N Q 6025 20 44 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 106597.56 0.69722140445450954617 0.00 \N \N \N Q 6026 20 44 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 152889.11 1.00000000000000000000 0.00 \N \N \N Q 6027 20 44 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 152889.11 1.00000000000000000000 \N \N \N 103 Q 6028 20 44 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 Q 6029 20 44 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 622.99 0.00407478335114907792 0.00 \N \N \N Q 6030 20 44 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 96.96 0.00063418512933982021 \N \N \N 121 Q 6031 20 44 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 345.03 0.00225673365486920553 \N \N \N 122 Q 6032 20 44 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 Q 6033 20 44 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 181.00 0.00118386456694005217 \N \N \N 101 Q 6034 20 44 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 46914.54 0.30685337889663953175 0.00 \N \N \N Q 6035 20 44 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 46914.54 0.30685337889663953175 \N \N \N 108 Q 6036 20 44 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 Q 6037 20 44 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 Q 6038 20 44 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 11490.32 0.07515460061216917281 0.00 \N \N \N Q 6039 20 44 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 5000.00 0.03270344107569204896 \N \N \N 97 Q 6040 20 44 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 Q 6041 20 44 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 1000.00 0.00654068821513840979 \N \N \N 119 Q 6042 20 44 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 5128.50 0.03354391951133733462 \N \N \N 120 Q 6043 20 44 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 Q 6044 20 44 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 Q 6045 20 44 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 1000.00 0.00654068821513840979 \N \N \N 110 Q 6046 20 44 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -638.18 -0.00417413640513703036 \N \N \N 91 Q 6047 20 44 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 Q 6048 20 44 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 Q 6049 20 44 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 Q 6050 20 44 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 Q 6051 20 44 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 Q 6052 20 44 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 152889.11 1.00000000000000000000 \N \N Total Sales \N Q 6053 20 44 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 622.99 0.00407478335114907792 \N \N Total Other Revenue \N Q 6054 20 44 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 46914.54 0.30685337889663953175 \N \N Total Cost Of Sales \N Q 6055 20 44 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 106597.56 0.69722140445450954617 \N \N GROSS PROFIT \N Q 6056 20 44 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 11490.32 0.07515460061216917281 \N \N Total Expenses \N Q 6057 20 44 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 95107.24 \N \N \N NET INCOME \N Q 6058 20 57 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 32000.00 0.41423948220064724919 0.00 \N \N \N M 6059 20 57 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 77250.00 1.00000000000000000000 0.00 \N \N \N M 6060 20 57 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 77250.00 1.00000000000000000000 \N \N \N 103 M 6061 20 57 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 6062 20 57 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.000000000000000000000000 0.00 \N \N \N M 6063 20 57 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 6064 20 57 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 122 M 6065 20 57 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 6066 20 57 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 M 6067 20 57 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 45250.00 0.58576051779935275081 0.00 \N \N \N M 6068 20 57 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 45250.00 0.58576051779935275081 \N \N \N 108 M 6069 20 57 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 6070 20 57 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 6071 20 57 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.000000000000000000000000 0.00 \N \N \N M 6072 20 57 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 6073 20 57 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 6074 20 57 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 6075 20 57 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 6076 20 57 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 6077 20 57 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 6078 20 57 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 6079 20 57 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 6080 20 57 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 6081 20 57 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 6082 20 57 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 6083 20 57 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 6084 20 57 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 6085 20 57 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 77250.00 1.00000000000000000000 \N \N Total Sales \N M 6086 20 57 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N Total Other Revenue \N M 6087 20 57 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 45250.00 0.58576051779935275081 \N \N Total Cost Of Sales \N M 6088 20 57 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 32000.00 0.41423948220064724919 \N \N GROSS PROFIT \N M 6089 20 57 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N Total Expenses \N M 6090 20 57 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 32000.00 \N \N \N NET INCOME \N M 6091 20 58 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 42000.00 0.48137535816618911175 0.00 \N \N \N M 6092 20 58 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 87250.00 1.00000000000000000000 0.00 \N \N \N M 6093 20 58 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 87250.00 1.00000000000000000000 \N \N \N 103 M 6094 20 58 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 6095 20 58 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.000000000000000000000000 0.00 \N \N \N M 6096 20 58 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 6097 20 58 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 122 M 6098 20 58 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 6099 20 58 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 M 6100 20 58 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 45250.00 0.51862464183381088825 0.00 \N \N \N M 6101 20 58 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 45250.00 0.51862464183381088825 \N \N \N 108 M 6102 20 58 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 6103 20 58 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 6104 20 58 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.000000000000000000000000 0.00 \N \N \N M 6105 20 58 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 6106 20 58 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 6107 20 58 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 6108 20 58 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 6109 20 58 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 6110 20 58 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 6111 20 58 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 6112 20 58 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 6113 20 58 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 6114 20 58 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 6115 20 58 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 6116 20 58 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 6117 20 58 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 6118 20 58 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 87250.00 1.00000000000000000000 \N \N Total Sales \N M 6119 20 58 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N Total Other Revenue \N M 6120 20 58 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 45250.00 0.51862464183381088825 \N \N Total Cost Of Sales \N M 6121 20 58 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 42000.00 0.48137535816618911175 \N \N GROSS PROFIT \N M 6122 20 58 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N Total Expenses \N M 6123 20 58 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 42000.00 \N \N \N NET INCOME \N M 6124 20 59 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 907.85 0.41888524892723665390 0.00 \N \N \N M 6125 20 59 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 2167.30 1.00000000000000000000 0.00 \N \N \N M 6126 20 59 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 2167.30 1.00000000000000000000 \N \N \N 103 M 6127 20 59 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 135 M 6128 20 59 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 66.06 0.03048032113689844507 0.00 \N \N \N M 6129 20 59 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 121 M 6130 20 59 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 59.00 0.02722281179347575324 \N \N \N 122 M 6131 20 59 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 123 M 6132 20 59 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 7.06 0.00325750934342269183 \N \N \N 101 M 6133 20 59 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 1325.51 0.61159507220966179117 0.00 \N \N \N M 6134 20 59 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 1325.51 0.61159507220966179117 \N \N \N 108 M 6135 20 59 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 136 M 6136 20 59 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 137 M 6137 20 59 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 25.10 0.01158123010197019333 0.00 \N \N \N M 6138 20 59 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 97 M 6139 20 59 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 131 M 6140 20 59 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 119 M 6141 20 59 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 22.85 0.01054307202510035528 \N \N \N 120 M 6142 20 59 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 112 M 6143 20 59 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 98 M 6144 20 59 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 110 M 6145 20 59 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 91 M 6146 20 59 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 92 M 6147 20 59 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 2.25 0.00103815807686983805 \N \N \N 93 M 6148 20 59 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 125 M 6149 20 59 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 117 M 6150 20 59 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 118 M 6151 20 59 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 2167.30 1.00000000000000000000 \N \N Total Sales \N M 6152 20 59 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 66.06 0.03048032113689844507 \N \N Total Other Revenue \N M 6153 20 59 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 1325.51 0.61159507220966179117 \N \N Total Cost Of Sales \N M 6154 20 59 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 907.85 0.41888524892723665390 \N \N GROSS PROFIT \N M 6155 20 59 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 25.10 0.01158123010197019333 \N \N Total Expenses \N M 6156 20 59 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 882.75 \N \N \N NET INCOME \N M 6157 20 60 mfgadmin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 8436.95 0.80809440115702716811 0.00 \N \N \N M 6158 20 60 mfgadmin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 10440.55 1.00000000000000000000 0.00 \N \N \N M 6159 20 60 mfgadmin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 10440.55 1.00000000000000000000 \N \N \N 103 M 6160 20 60 mfgadmin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 6161 20 60 mfgadmin 6 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 418.20 0.04005536106814296182 0.00 \N \N \N M 6162 20 60 mfgadmin 7 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 6163 20 60 mfgadmin 8 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 396.00 0.03792903630555861521 \N \N \N 122 M 6164 20 60 mfgadmin 9 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 6165 20 60 mfgadmin 10 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 22.20 0.00212632476258434661 \N \N \N 101 M 6166 20 60 mfgadmin 12 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 2421.80 0.23196095991111579371 0.00 \N \N \N M 6167 20 60 mfgadmin 13 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 2421.80 0.23196095991111579371 \N \N \N 108 M 6168 20 60 mfgadmin 14 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 6169 20 60 mfgadmin 15 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 6170 20 60 mfgadmin 18 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.000000000000000000000000 0.00 \N \N \N M 6171 20 60 mfgadmin 19 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 6172 20 60 mfgadmin 20 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 6173 20 60 mfgadmin 21 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 6174 20 60 mfgadmin 22 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 6175 20 60 mfgadmin 23 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 6176 20 60 mfgadmin 24 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 6177 20 60 mfgadmin 25 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 6178 20 60 mfgadmin 26 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 6179 20 60 mfgadmin 27 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 6180 20 60 mfgadmin 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 6181 20 60 mfgadmin 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 6182 20 60 mfgadmin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 6183 20 60 mfgadmin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 6184 20 60 mfgadmin 5 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 10440.55 1.00000000000000000000 \N \N Total Sales \N M 6185 20 60 mfgadmin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 418.20 0.04005536106814296182 \N \N Total Other Revenue \N M 6186 20 60 mfgadmin 16 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 2421.80 0.23196095991111579371 \N \N Total Cost Of Sales \N M 6187 20 60 mfgadmin 17 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 8436.95 0.80809440115702716811 \N \N GROSS PROFIT \N M 6188 20 60 mfgadmin 32 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N Total Expenses \N M 6189 20 60 mfgadmin 33 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 8436.95 \N \N \N NET INCOME \N M 6190 21 61 mfgadmin 56 2 G 147 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 6191 21 61 mfgadmin 1 0 G 143 0.00 3233515.69 0.00 0.00 0.00 \N \N \N \N \N -1 6463.03 \N 0.00 \N \N \N M 6192 21 61 mfgadmin 2 1 G 154 0.00 3232515.69 0.00 0.00 0.00 \N 0.99969073909148095088 \N \N 0.00000000000000000000 143 6463.03 \N 0.00 \N \N \N M 6193 21 61 mfgadmin 3 2 G 155 0.00 3208903.71 0.00 0.00 0.00 \N 0.99238847670474733339 \N \N 0.00000000000000000000 154 13708.75 \N 0.00 \N \N \N M 6194 21 61 mfgadmin 4 3 I 268 \N 3043957.65 \N \N 0 \N 0.94137710833250974576 \N \N 0.00000000000000000000 155 -1087.80 \N \N \N \N 109 M 6195 21 61 mfgadmin 5 3 I 268 \N 23053.23 \N \N 0 \N 0.00712946285409859879 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 6196 21 61 mfgadmin 6 3 I 268 \N 141892.83 \N \N 0 \N 0.04388190551813898884 \N \N 0.00000000000000000000 155 14796.55 \N \N \N \N 127 M 6197 21 61 mfgadmin 8 2 G 163 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 6198 21 61 mfgadmin 9 3 I 269 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 163 0.00 \N \N \N \N 106 M 6199 21 61 mfgadmin 11 2 G 156 0.00 23611.98 0.00 0.00 0.00 \N 0.00730226238673361749 \N \N 0.00000000000000000000 154 -7245.72 \N 0.00 \N \N \N M 6200 21 61 mfgadmin 12 3 I 270 \N 28817.91 \N \N 0 \N 0.00891225302822019088 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 85 M 6201 21 61 mfgadmin 13 3 I 270 \N 100.63 \N \N 0 \N 0.000031120925224271913151 \N \N 0.00000000000000000000 156 4.25 \N \N \N \N 138 M 6202 21 61 mfgadmin 14 3 I 270 \N 2734.68 \N \N 0 \N 0.00084572962130887325 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 6203 21 61 mfgadmin 15 3 I 270 \N -5365.22 \N \N 0 \N -0.00165925281160457273 \N \N 0.00000000000000000000 156 -5390.00 \N \N \N \N 86 M 6204 21 61 mfgadmin 16 3 I 270 \N 723.64 \N \N 0 \N 0.00022379356384072471 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 6205 21 61 mfgadmin 17 3 I 270 \N -2248.92 \N \N 0 \N -0.00069550304238665995 \N \N 0.00000000000000000000 156 -663.72 \N \N \N \N 87 M 6206 21 61 mfgadmin 18 3 I 270 \N -1150.74 \N \N 0 \N -0.00035587889786921059 \N \N 0.00000000000000000000 156 -1196.25 \N \N \N \N 90 M 6207 21 61 mfgadmin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 6208 21 61 mfgadmin 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 6209 21 61 mfgadmin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 6210 21 61 mfgadmin 22 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 6211 21 61 mfgadmin 23 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 6212 21 61 mfgadmin 24 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 6213 21 61 mfgadmin 27 1 G 157 0.00 1000.00 0.00 0.00 0.00 \N 0.00030926090851904912 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 6214 21 61 mfgadmin 28 2 I 271 \N 1000.00 \N \N 0 \N 0.00030926090851904912 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 6215 21 61 mfgadmin 31 0 G 144 0.00 3150195.99 0.00 0.00 0.00 \N \N \N \N \N -1 -1973.92 \N 0.00 \N \N \N M 6216 21 61 mfgadmin 32 1 G 145 0.00 10272.72 0.00 0.00 0.00 \N 0.00326097805743191236 \N \N 0.00000000000000000000 144 -1973.92 \N 0.00 \N \N \N M 6217 21 61 mfgadmin 33 2 G 164 0.00 262.95 0.00 0.00 0.00 \N 0.000081320155895083966641 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 6218 21 61 mfgadmin 34 3 I 274 \N 262.95 \N \N 0 \N 0.000081320155895083966641 \N \N 0.00000000000000000000 164 0.00 \N \N \N \N 99 M 6219 21 61 mfgadmin 36 2 G 158 0.00 5009.77 0.00 0.00 0.00 \N 0.00154932602167147672 \N \N 0.00000000000000000000 145 -1973.92 \N 0.00 \N \N \N M 6220 21 61 mfgadmin 37 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 6221 21 61 mfgadmin 38 3 I 273 \N 3059.70 \N \N 0 \N 0.00094624560179573460 \N \N 0.00000000000000000000 158 311.08 \N \N \N \N 94 M 6222 21 61 mfgadmin 39 3 I 273 \N 1446.91 \N \N 0 \N 0.00044747270114529737 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 6223 21 61 mfgadmin 40 3 I 273 \N 2281.81 \N \N 0 \N 0.00070567463366785148 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 6224 21 61 mfgadmin 41 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 6225 21 61 mfgadmin 42 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 6226 21 61 mfgadmin 43 3 I 273 \N -2610.00 \N \N 0 \N -0.00080717097123471821 \N \N 0.00000000000000000000 158 -2285.00 \N \N \N \N 95 M 6227 21 61 mfgadmin 44 3 I 273 \N 631.35 \N \N 0 \N 0.00019525187459350166 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 6228 21 61 mfgadmin 45 3 I 273 \N 200.00 \N \N 0 \N 0.000061852181703809824408 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 6229 21 61 mfgadmin 47 2 G 159 0.00 5000.00 0.00 0.00 0.00 \N 0.00154630454259524561 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 6230 21 61 mfgadmin 48 3 I 275 \N 5000.00 \N \N 0 \N 0.00154630454259524561 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 6231 21 61 mfgadmin 51 1 G 146 0.00 3139923.27 0.00 0.00 0.00 \N 0.99673902194256808764 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 6232 21 61 mfgadmin 52 2 G 160 0.00 1519999.99 0.00 0.00 0.00 \N 0.47007657785634558031 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 6233 21 61 mfgadmin 53 3 I 276 \N 1419999.99 \N \N 0 \N 0.43915048700444066811 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 6234 21 61 mfgadmin 54 3 I 276 \N 100000.00 \N \N 0 \N 0.03092609085190491220 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 6235 21 61 mfgadmin 57 2 G 162 0.00 1619923.28 0.00 0.00 0.00 \N 0.50097894530395799626 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 6236 21 61 mfgadmin 58 3 I 277 \N 1619923.28 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 6237 21 61 mfgadmin 7 3 T -1 \N 3208903.71 \N \N 0.00 \N 0.99238847670474733339 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 6238 21 61 mfgadmin 10 3 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 6239 21 61 mfgadmin 25 3 T -1 \N 23611.98 \N \N 0.00 \N 0.00730226238673361749 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 6240 21 61 mfgadmin 26 2 T -1 \N 3232515.69 \N \N 0.00 \N 0.99969073909148095088 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 6241 21 61 mfgadmin 29 2 T -1 \N 1000.00 \N \N 0.00 \N 0.00030926090851904912 \N \N 0.00000000000000000000 157 \N \N \N \N Total Fixed Assets \N M 6242 21 61 mfgadmin 30 1 T -1 \N 3233515.69 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 6243 21 61 mfgadmin 35 3 T -1 \N 262.95 \N \N 0.00 \N 0.000081320155895083966641 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 6244 21 61 mfgadmin 46 3 T -1 \N 5009.77 \N \N 0.00 \N 0.00154932602167147672 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 6245 21 61 mfgadmin 49 3 T -1 \N 5000.00 \N \N 0.00 \N 0.00154630454259524561 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 6246 21 61 mfgadmin 50 2 T -1 \N 10272.72 \N \N 0.00 \N 0.00326097805743191236 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 6247 21 61 mfgadmin 55 3 T -1 \N 1519999.99 \N \N 0.00 \N 0.47007657785634558031 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 6248 21 61 mfgadmin 59 3 T -1 \N 1619923.28 \N \N 0.00 \N 0.50097894530395799626 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 6249 21 61 mfgadmin 60 2 T -1 \N 3139923.27 \N \N 0.00 \N 0.99673902194256808764 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 6250 19 63 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6251 21 61 mfgadmin 61 1 T -1 \N 3150195.99 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 6252 21 61 mfgadmin 62 0 T -1 \N 83319.70 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 6253 21 60 mfgadmin 1 0 G 143 0.00 3233515.69 0.00 0.00 0.00 \N \N \N \N \N -1 6463.03 \N 0.00 \N \N \N M 6254 21 60 mfgadmin 2 1 G 154 0.00 3232515.69 0.00 0.00 0.00 \N 0.99969073909148095088 \N \N 0.00000000000000000000 143 6463.03 \N 0.00 \N \N \N M 6255 21 60 mfgadmin 3 2 G 155 0.00 3208903.71 0.00 0.00 0.00 \N 0.99238847670474733339 \N \N 0.00000000000000000000 154 13708.75 \N 0.00 \N \N \N M 6256 21 60 mfgadmin 4 3 I 268 \N 3043957.65 \N \N 0 \N 0.94137710833250974576 \N \N 0.00000000000000000000 155 -1087.80 \N \N \N \N 109 M 6257 21 60 mfgadmin 5 3 I 268 \N 23053.23 \N \N 0 \N 0.00712946285409859879 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 6258 21 60 mfgadmin 6 3 I 268 \N 141892.83 \N \N 0 \N 0.04388190551813898884 \N \N 0.00000000000000000000 155 14796.55 \N \N \N \N 127 M 6259 21 60 mfgadmin 8 2 G 163 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 6260 21 60 mfgadmin 9 3 I 269 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 163 0.00 \N \N \N \N 106 M 6261 21 60 mfgadmin 11 2 G 156 0.00 23611.98 0.00 0.00 0.00 \N 0.00730226238673361749 \N \N 0.00000000000000000000 154 -7245.72 \N 0.00 \N \N \N M 6262 21 60 mfgadmin 12 3 I 270 \N 28817.91 \N \N 0 \N 0.00891225302822019088 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 85 M 6263 21 60 mfgadmin 13 3 I 270 \N 100.63 \N \N 0 \N 0.000031120925224271913151 \N \N 0.00000000000000000000 156 4.25 \N \N \N \N 138 M 6264 21 60 mfgadmin 14 3 I 270 \N 2734.68 \N \N 0 \N 0.00084572962130887325 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 6265 21 60 mfgadmin 15 3 I 270 \N -5365.22 \N \N 0 \N -0.00165925281160457273 \N \N 0.00000000000000000000 156 -5390.00 \N \N \N \N 86 M 6266 21 60 mfgadmin 16 3 I 270 \N 723.64 \N \N 0 \N 0.00022379356384072471 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 6267 21 60 mfgadmin 17 3 I 270 \N -2248.92 \N \N 0 \N -0.00069550304238665995 \N \N 0.00000000000000000000 156 -663.72 \N \N \N \N 87 M 6268 21 60 mfgadmin 18 3 I 270 \N -1150.74 \N \N 0 \N -0.00035587889786921059 \N \N 0.00000000000000000000 156 -1196.25 \N \N \N \N 90 M 6269 21 60 mfgadmin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 6270 21 60 mfgadmin 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 6271 21 60 mfgadmin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 6272 21 60 mfgadmin 22 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 6273 21 60 mfgadmin 23 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 6274 21 60 mfgadmin 24 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 6275 21 60 mfgadmin 27 1 G 157 0.00 1000.00 0.00 0.00 0.00 \N 0.00030926090851904912 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 6276 21 60 mfgadmin 28 2 I 271 \N 1000.00 \N \N 0 \N 0.00030926090851904912 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 6277 21 60 mfgadmin 31 0 G 144 0.00 3233515.69 0.00 0.00 0.00 \N \N \N \N \N -1 -1973.92 \N 0.00 \N \N \N M 6278 21 60 mfgadmin 32 1 G 145 0.00 10272.72 0.00 0.00 0.00 \N 0.00317695072016180630 \N \N 0.00000000000000000000 144 -1973.92 \N 0.00 \N \N \N M 6279 21 60 mfgadmin 33 2 G 164 0.00 262.95 0.00 0.00 0.00 \N 0.000081320155895083966641 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 6280 21 60 mfgadmin 34 3 I 274 \N 262.95 \N \N 0 \N 0.000081320155895083966641 \N \N 0.00000000000000000000 164 0.00 \N \N \N \N 99 M 6281 21 60 mfgadmin 36 2 G 158 0.00 5009.77 0.00 0.00 0.00 \N 0.00154932602167147672 \N \N 0.00000000000000000000 145 -1973.92 \N 0.00 \N \N \N M 6282 21 60 mfgadmin 37 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 6283 21 60 mfgadmin 38 3 I 273 \N 3059.70 \N \N 0 \N 0.00094624560179573460 \N \N 0.00000000000000000000 158 311.08 \N \N \N \N 94 M 6284 21 60 mfgadmin 39 3 I 273 \N 1446.91 \N \N 0 \N 0.00044747270114529737 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 6285 21 60 mfgadmin 40 3 I 273 \N 2281.81 \N \N 0 \N 0.00070567463366785148 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 6286 21 60 mfgadmin 41 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 6287 21 60 mfgadmin 42 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 6288 21 60 mfgadmin 43 3 I 273 \N -2610.00 \N \N 0 \N -0.00080717097123471821 \N \N 0.00000000000000000000 158 -2285.00 \N \N \N \N 95 M 6289 21 60 mfgadmin 44 3 I 273 \N 631.35 \N \N 0 \N 0.00019525187459350166 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 6290 21 60 mfgadmin 45 3 I 273 \N 200.00 \N \N 0 \N 0.000061852181703809824408 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 6291 21 60 mfgadmin 47 2 G 159 0.00 5000.00 0.00 0.00 0.00 \N 0.00154630454259524561 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 6292 21 60 mfgadmin 48 3 I 275 \N 5000.00 \N \N 0 \N 0.00154630454259524561 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 6293 21 60 mfgadmin 51 1 G 146 0.00 3223242.97 0.00 0.00 0.00 \N 0.99682304927983819370 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 6294 21 60 mfgadmin 52 2 G 160 0.00 1519999.99 0.00 0.00 0.00 \N 0.47007657785634558031 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 6295 21 60 mfgadmin 53 3 I 276 \N 1419999.99 \N \N 0 \N 0.43915048700444066811 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 6296 21 60 mfgadmin 54 3 I 276 \N 100000.00 \N \N 0 \N 0.03092609085190491220 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 6297 21 60 mfgadmin 56 2 G 147 \N 83319.70 \N \N 0.00 \N 0.02584964918111649523 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 6298 21 60 mfgadmin 57 2 G 162 0.00 1619923.28 0.00 0.00 0.00 \N 0.50097894530395799626 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 6299 21 60 mfgadmin 58 3 I 277 \N 1619923.28 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 6300 21 60 mfgadmin 7 3 T -1 \N 3208903.71 \N \N 0.00 \N 0.99238847670474733339 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 6301 21 60 mfgadmin 10 3 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 6302 21 60 mfgadmin 25 3 T -1 \N 23611.98 \N \N 0.00 \N 0.00730226238673361749 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 6303 21 60 mfgadmin 26 2 T -1 \N 3232515.69 \N \N 0.00 \N 0.99969073909148095088 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 6304 13 77 admin 24 3 I 281 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 134 M 7333 21 60 mfgadmin 29 2 T -1 \N 1000.00 \N \N 0.00 \N 0.00030926090851904912 \N \N 0.00000000000000000000 157 \N \N \N \N Total Fixed Assets \N M 6305 21 60 mfgadmin 30 1 T -1 \N 3233515.69 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 6306 21 60 mfgadmin 35 3 T -1 \N 262.95 \N \N 0.00 \N 0.000081320155895083966641 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 6307 21 60 mfgadmin 46 3 T -1 \N 5009.77 \N \N 0.00 \N 0.00154932602167147672 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 6308 21 60 mfgadmin 49 3 T -1 \N 5000.00 \N \N 0.00 \N 0.00154630454259524561 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 6309 21 60 mfgadmin 50 2 T -1 \N 10272.72 \N \N 0.00 \N 0.00317695072016180630 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 6310 21 60 mfgadmin 55 3 T -1 \N 1519999.99 \N \N 0.00 \N 0.47007657785634558031 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 6311 21 60 mfgadmin 59 3 T -1 \N 1619923.28 \N \N 0.00 \N 0.50097894530395799626 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 6312 21 60 mfgadmin 60 2 T -1 \N 3223242.97 \N \N 0.00 \N 0.99682304927983819370 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 6313 21 60 mfgadmin 61 1 T -1 \N 3233515.69 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 6314 21 60 mfgadmin 62 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 6315 21 59 mfgadmin 1 0 G 143 0.00 3227052.66 0.00 0.00 0.00 \N \N \N \N \N -1 780.28 \N 0.00 \N \N \N M 6316 19 63 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 101 M 6317 21 59 mfgadmin 2 1 G 154 0.00 3226052.66 0.00 0.00 0.00 \N 0.99969011971437739104 \N \N 0.00000000000000000000 143 780.28 \N 0.00 \N \N \N M 6318 21 59 mfgadmin 3 2 G 155 0.00 3195194.96 0.00 0.00 0.00 \N 0.99012792682472061054 \N \N 0.00000000000000000000 154 1988.88 \N 0.00 \N \N \N M 6319 21 59 mfgadmin 4 3 I 268 \N 3045045.45 \N \N 0 \N 0.94359955377982583030 \N \N 0.00000000000000000000 155 2030.87 \N \N \N \N 109 M 6320 21 59 mfgadmin 5 3 I 268 \N 23053.23 \N \N 0 \N 0.00714374149692369755 \N \N 0.00000000000000000000 155 -41.99 \N \N \N \N 126 M 6321 21 59 mfgadmin 6 3 I 268 \N 127096.28 \N \N 0 \N 0.03938463154797108269 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 127 M 6322 21 59 mfgadmin 8 2 G 163 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 154 -0.01 \N 0.00 \N \N \N M 6323 21 59 mfgadmin 9 3 I 269 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 163 -0.01 \N \N \N \N 106 M 6324 21 59 mfgadmin 11 2 G 156 0.00 30857.70 0.00 0.00 0.00 \N 0.00956219288965678050 \N \N 0.00000000000000000000 154 -1208.59 \N 0.00 \N \N \N M 6325 21 59 mfgadmin 12 3 I 270 \N 28817.91 \N \N 0 \N 0.00893010218184663897 \N \N 0.00000000000000000000 156 114.68 \N \N \N \N 85 M 6326 21 59 mfgadmin 13 3 I 270 \N 96.38 \N \N 0 \N 0.000029866261928307051550 \N \N 0.00000000000000000000 156 -3.62 \N \N \N \N 138 M 6327 21 59 mfgadmin 14 3 I 270 \N 2734.68 \N \N 0 \N 0.00084742341948643627 \N \N 0.00000000000000000000 156 49.14 \N \N \N \N 128 M 6328 21 59 mfgadmin 15 3 I 270 \N 24.78 \N \N 0 \N 0.000007678833477728250025 \N \N 0.00000000000000000000 156 24.76 \N \N \N \N 86 M 6329 21 59 mfgadmin 16 3 I 270 \N 723.64 \N \N 0 \N 0.00022424176988794475 \N \N 0.00000000000000000000 156 -1276.36 \N \N \N \N 96 M 6330 21 59 mfgadmin 17 3 I 270 \N -1585.20 \N \N 0 \N -0.00049122222876895972 \N \N 0.00000000000000000000 156 -122.19 \N \N \N \N 87 M 6331 21 59 mfgadmin 18 3 I 270 \N 45.51 \N \N 0 \N 0.000014102651798684933762 \N \N 0.00000000000000000000 156 5.00 \N \N \N \N 90 M 6332 21 59 mfgadmin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 6333 21 59 mfgadmin 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 6334 21 59 mfgadmin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 6335 21 59 mfgadmin 22 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 6336 21 59 mfgadmin 23 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 6337 21 59 mfgadmin 24 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 6338 21 59 mfgadmin 27 1 G 157 0.00 1000.00 0.00 0.00 0.00 \N 0.00030988028562260896 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 6339 21 59 mfgadmin 28 2 I 271 \N 1000.00 \N \N 0 \N 0.00030988028562260896 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 6340 21 59 mfgadmin 31 0 G 144 0.00 3227052.66 0.00 0.00 0.00 \N \N \N \N \N -1 -102.47 \N 0.00 \N \N \N M 6341 21 59 mfgadmin 32 1 G 145 0.00 12246.64 0.00 0.00 0.00 \N 0.00379499230111726779 \N \N 0.00000000000000000000 144 -102.46 \N 0.00 \N \N \N M 6342 21 59 mfgadmin 33 2 G 164 0.00 262.95 0.00 0.00 0.00 \N 0.000081483021104465025991 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 6343 21 59 mfgadmin 34 3 I 274 \N 262.95 \N \N 0 \N 0.000081483021104465025991 \N \N 0.00000000000000000000 164 0.00 \N \N \N \N 99 M 6344 21 59 mfgadmin 36 2 G 158 0.00 6983.69 0.00 0.00 0.00 \N 0.00216410785189975797 \N \N 0.00000000000000000000 145 -102.46 \N 0.00 \N \N \N M 6345 21 59 mfgadmin 37 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 6346 21 59 mfgadmin 38 3 I 273 \N 2748.62 \N \N 0 \N 0.00085174315066801544 \N \N 0.00000000000000000000 158 114.17 \N \N \N \N 94 M 6347 21 59 mfgadmin 39 3 I 273 \N 1446.91 \N \N 0 \N 0.00044836888407020913 \N \N 0.00000000000000000000 158 108.37 \N \N \N \N 102 M 6348 21 59 mfgadmin 40 3 I 273 \N 2281.81 \N \N 0 \N 0.00070708793453652535 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 6349 21 59 mfgadmin 41 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 6350 21 59 mfgadmin 42 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 6351 21 59 mfgadmin 43 3 I 273 \N -325.00 \N \N 0 \N -0.00010071109282734791 \N \N 0.00000000000000000000 158 -325.00 \N \N \N \N 95 M 6352 21 59 mfgadmin 44 3 I 273 \N 631.35 \N \N 0 \N 0.00019564291832783417 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 6353 21 59 mfgadmin 45 3 I 273 \N 200.00 \N \N 0 \N 0.000061976057124521791969 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 6354 21 59 mfgadmin 47 2 G 159 0.00 5000.00 0.00 0.00 0.00 \N 0.00154940142811304480 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 6355 21 59 mfgadmin 48 3 I 275 \N 5000.00 \N \N 0 \N 0.00154940142811304480 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 6356 21 59 mfgadmin 51 1 G 146 0.00 3214806.02 0.00 0.00 0.00 \N 0.99620500769888273221 \N \N 0.00000000000000000000 144 -0.01 \N 0.00 \N \N \N M 6357 21 59 mfgadmin 52 2 G 160 0.00 1519999.99 0.00 0.00 0.00 \N 0.47101803104756276273 \N \N 0.00000000000000000000 146 -0.01 \N 0.00 \N \N \N M 6358 21 59 mfgadmin 53 3 I 276 \N 1419999.99 \N \N 0 \N 0.44003000248530186675 \N \N 0.00000000000000000000 160 -0.01 \N \N \N \N 113 M 6359 21 59 mfgadmin 54 3 I 276 \N 100000.00 \N \N 0 \N 0.03098802856226089598 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 6360 21 59 mfgadmin 56 2 G 147 \N 74882.75 \N \N 0.00 \N 0.02329308503658954826 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 6361 21 59 mfgadmin 57 2 G 162 0.00 1619923.28 0.00 0.00 0.00 \N 0.50198228869311354839 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 6362 21 59 mfgadmin 58 3 I 277 \N 1619923.28 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 6363 21 59 mfgadmin 7 3 T -1 \N 3195194.96 \N \N 0.00 \N 0.99012792682472061054 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 6364 21 59 mfgadmin 10 3 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 6365 21 59 mfgadmin 25 3 T -1 \N 30857.70 \N \N 0.00 \N 0.00956219288965678050 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 6366 21 59 mfgadmin 26 2 T -1 \N 3226052.66 \N \N 0.00 \N 0.99969011971437739104 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 6367 21 59 mfgadmin 29 2 T -1 \N 1000.00 \N \N 0.00 \N 0.00030988028562260896 \N \N 0.00000000000000000000 157 \N \N \N \N Total Fixed Assets \N M 6368 21 59 mfgadmin 30 1 T -1 \N 3227052.66 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 6369 21 59 mfgadmin 35 3 T -1 \N 262.95 \N \N 0.00 \N 0.000081483021104465025991 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 6370 21 59 mfgadmin 46 3 T -1 \N 6983.69 \N \N 0.00 \N 0.00216410785189975797 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 6371 21 59 mfgadmin 49 3 T -1 \N 5000.00 \N \N 0.00 \N 0.00154940142811304480 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 6372 21 59 mfgadmin 50 2 T -1 \N 12246.64 \N \N 0.00 \N 0.00379499230111726779 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 6373 21 59 mfgadmin 55 3 T -1 \N 1519999.99 \N \N 0.00 \N 0.47101803104756276273 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 6374 21 59 mfgadmin 59 3 T -1 \N 1619923.28 \N \N 0.00 \N 0.50198228869311354839 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 6375 21 59 mfgadmin 60 2 T -1 \N 3214806.02 \N \N 0.00 \N 0.99620500769888273221 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 6376 21 59 mfgadmin 61 1 T -1 \N 3227052.66 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 6377 21 59 mfgadmin 62 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 6378 19 63 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 37296.60 \N 0.00 \N \N \N M 6379 19 63 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 45000.00 \N 0.00 \N \N \N M 6380 19 63 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 45000.00 1.00000000000000000000 \N \N \N 103 M 6381 19 63 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6382 19 63 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 122 M 6383 19 63 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6384 19 63 admin 12 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 7703.40 \N 0.00 \N \N \N M 6385 19 63 admin 13 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 7703.40 1.00000000000000000000 \N \N \N 108 M 6386 19 63 admin 14 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 136 M 6387 19 63 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 137 M 6388 19 63 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 97 M 6389 19 63 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 131 M 6390 19 63 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 119 M 6391 19 63 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 120 M 6392 19 63 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 139 M 6393 19 63 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 112 M 6394 19 63 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 98 M 6395 19 63 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 110 M 6396 19 63 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 91 M 6397 19 63 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 92 M 6398 19 63 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 93 M 6399 19 63 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 125 M 6400 19 63 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 117 M 6401 19 63 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 118 M 6402 19 63 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 45000.00 \N \N \N Total Net Revenue \N M 6403 19 63 admin 30 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 7703.40 \N \N \N Total Net Expenses \N M 6404 19 63 admin 31 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 37296.60 \N \N \N Net Income \N M 6405 19 62 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 89935.01 \N 0.00 \N \N \N M 6406 19 62 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 102666.09 \N 0.00 \N \N \N M 6407 19 62 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 102030.62 0.99381032237616139857 \N \N \N 103 M 6408 19 62 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6409 19 62 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 339.00 0.00330196659870849275 \N \N \N 122 M 6410 19 62 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6411 19 62 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6412 19 62 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 296.47 0.00288771102513010869 \N \N \N 101 M 6413 19 62 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6414 19 62 admin 12 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 12731.08 \N 0.00 \N \N \N M 6415 19 62 admin 13 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 12737.07 1.00047050210979744059 \N \N \N 108 M 6416 19 62 admin 14 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6417 19 62 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6418 19 62 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6419 19 62 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 6420 19 62 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6421 19 62 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 6422 19 62 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 329.60 0.02588939822858704839 \N \N \N 139 M 6423 19 62 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 6424 19 62 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6425 19 62 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6426 19 62 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -360.34 -0.02830396164347408075 \N \N \N 91 M 6427 19 62 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 24.75 0.00194406130508959177 \N \N \N 92 M 6428 19 62 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6429 19 62 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 6430 19 62 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6431 19 62 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 6432 19 62 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 102666.09 \N \N \N Total Net Revenue \N M 6433 19 62 admin 30 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 12731.08 \N \N \N Total Net Expenses \N M 6434 19 62 admin 31 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 89935.01 \N \N \N Net Income \N M 6435 19 61 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 32000.00 \N 0.00 \N \N \N M 6436 19 61 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 77250.00 \N 0.00 \N \N \N M 6437 19 61 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 77250.00 1.00000000000000000000 \N \N \N 103 M 6438 19 61 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6439 19 61 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 122 M 6440 19 61 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6441 19 61 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6442 19 61 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 101 M 6443 19 61 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6444 19 61 admin 12 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 45250.00 \N 0.00 \N \N \N M 6445 19 61 admin 13 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 45250.00 1.00000000000000000000 \N \N \N 108 M 6446 19 61 admin 14 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6447 19 61 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6448 19 61 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6449 19 61 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 6450 19 61 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6451 19 61 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 6452 19 61 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 139 M 6453 19 61 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 6454 19 61 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6455 19 61 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6456 19 61 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 6457 19 61 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 M 6458 19 61 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6459 19 61 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 6460 19 61 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6461 19 61 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 6462 19 61 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 77250.00 \N \N \N Total Net Revenue \N M 6463 19 61 admin 30 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 45250.00 \N \N \N Total Net Expenses \N M 6464 19 61 admin 31 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 32000.00 \N \N \N Net Income \N M 6465 19 64 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 31830.00 \N 0.00 \N \N \N M 6466 19 64 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 77250.00 \N 0.00 \N \N \N M 6467 19 64 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 77250.00 1.00000000000000000000 \N \N \N 103 M 6468 19 64 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 141 M 6469 19 64 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 140 M 6470 19 64 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6471 19 64 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 122 M 6472 19 64 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6473 19 64 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6474 19 64 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 101 M 6475 19 64 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6476 19 64 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 45420.00 \N 0.00 \N \N \N M 6477 19 64 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 45250.00 0.99625715543813298107 \N \N \N 108 M 6478 19 64 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6479 19 64 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6480 19 64 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6481 19 64 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 6482 19 64 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6483 19 64 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 6484 19 64 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 170.00 0.00374284456186701893 \N \N \N 139 M 6485 19 64 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 6486 19 64 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6487 19 64 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6488 19 64 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 6489 19 64 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 M 6490 19 64 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6491 19 64 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 6492 19 64 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6493 19 64 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 6494 19 64 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 77250.00 \N \N \N Total Net Revenue \N M 6495 19 64 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 45420.00 \N \N \N Total Net Expenses \N M 6496 19 64 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 31830.00 \N \N \N Net Income \N M 6497 19 65 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 66822.06 \N 0.00 \N \N \N M 6498 19 65 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 85870.64 \N 0.00 \N \N \N M 6499 19 65 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 84590.99 0.98509793335649996320 \N \N \N 103 M 6500 19 65 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 141 M 6501 19 65 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 140 M 6502 19 65 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6503 19 65 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 160.00 0.00186326781773141553 \N \N \N 122 M 6504 19 65 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6505 19 65 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -253.35 -0.00295036813513908828 \N \N \N 123 M 6506 19 65 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 1373.00 0.01598916696090770955 \N \N \N 101 M 6507 19 65 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6508 19 65 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 19048.58 \N 0.00 \N \N \N M 6509 19 65 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 17982.48 0.94403257355666406630 \N \N \N 108 M 6510 19 65 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6511 19 65 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6512 19 65 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6513 19 65 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 6514 19 65 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6515 19 65 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 6516 19 65 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 330.00 0.01732412599784340880 \N \N \N 139 M 6517 19 65 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 6518 19 65 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6519 19 65 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6520 19 65 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 6521 19 65 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 736.10 0.03864330044549252490 \N \N \N 92 M 6522 19 65 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6523 19 65 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 6524 19 65 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6525 19 65 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 6526 19 65 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 85870.64 \N \N \N Total Net Revenue \N M 6527 19 65 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 19048.58 \N \N \N Total Net Expenses \N M 6528 19 65 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 66822.06 \N \N \N Net Income \N M 6529 19 66 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 83115.55 \N 0.00 \N \N \N M 6530 19 66 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 93650.34 \N 0.00 \N \N \N M 6531 19 66 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 92623.34 0.98903367569194089418 \N \N \N 103 M 6532 19 66 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 141 M 6533 19 66 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 140 M 6534 19 66 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6535 19 66 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 461.60 0.00492897302882189216 \N \N \N 122 M 6536 19 66 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6537 19 66 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6538 19 66 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 565.40 0.00603735127923721366 \N \N \N 101 M 6539 19 66 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6540 19 66 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 10534.79 \N 0.00 \N \N \N M 6541 19 66 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 9104.79 0.86425927806819120267 \N \N \N 108 M 6542 19 66 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6543 19 66 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6544 19 66 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6545 19 66 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 6546 19 66 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6547 19 66 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 6548 19 66 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 1430.00 0.13574072193180879733 \N \N \N 139 M 6549 19 66 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 6550 19 66 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6551 19 66 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6552 19 66 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 6553 19 66 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 M 6554 19 66 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6555 19 66 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 6556 19 66 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6557 19 66 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 6558 19 66 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 93650.34 \N \N \N Total Net Revenue \N M 6559 19 66 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 10534.79 \N \N \N Total Net Expenses \N M 6560 19 66 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 83115.55 \N \N \N Net Income \N M 6561 19 67 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 54455.00 \N 0.00 \N \N \N M 6562 19 67 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 74455.00 \N 0.00 \N \N \N M 6563 19 67 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 49455.00 0.66422671412262440400 \N \N \N 103 M 6564 19 67 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 141 M 6565 19 67 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 25000.00 0.33577328587737559600 \N \N \N 140 M 6566 19 67 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6567 19 67 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 122 M 6568 19 67 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6569 19 67 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6570 19 67 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 101 M 6571 19 67 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6572 19 67 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 20000.00 \N 0.00 \N \N \N M 6573 19 67 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 20000.00 1.00000000000000000000 \N \N \N 108 M 6574 19 67 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6575 19 67 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6576 19 67 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6577 19 67 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 6578 19 67 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6579 19 67 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 6580 19 67 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 139 M 6581 19 67 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 6582 19 67 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6583 19 67 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6584 19 67 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 6585 19 67 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 M 6586 19 67 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6587 19 67 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 6588 19 67 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6589 19 67 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 6590 19 67 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 74455.00 \N \N \N Total Net Revenue \N M 6591 19 67 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 20000.00 \N \N \N Total Net Expenses \N M 6592 19 67 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 54455.00 \N \N \N Net Income \N M 6593 19 68 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 80448.02 \N 0.00 \N \N \N M 6594 19 68 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 215538.50 \N 0.00 \N \N \N M 6595 19 68 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 214392.18 0.99468159980699503801 \N \N \N 103 M 6596 19 68 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 141 M 6597 19 68 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 140 M 6598 19 68 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6599 19 68 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 144.00 0.00066809409919805510 \N \N \N 122 M 6600 19 68 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6601 19 68 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6602 19 68 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 1002.32 0.00465030609380690689 \N \N \N 101 M 6603 19 68 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6604 19 68 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 135090.48 \N 0.00 \N \N \N M 6605 19 68 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 135016.59 0.99945303325593335667 \N \N \N 108 M 6606 19 68 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6607 19 68 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6608 19 68 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6609 19 68 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 6610 19 68 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6611 19 68 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 6612 19 68 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 139 M 6613 19 68 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 6614 19 68 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6615 19 68 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6616 19 68 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 6617 19 68 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 73.89 0.00054696674406664333 \N \N \N 92 M 6618 19 68 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6619 19 68 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 6620 19 68 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6621 19 68 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 6622 19 68 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 215538.50 \N \N \N Total Net Revenue \N M 6623 19 68 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 135090.48 \N \N \N Total Net Expenses \N M 6624 19 68 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 80448.02 \N \N \N Net Income \N M 6625 19 69 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 71741.12 \N 0.00 \N \N \N M 6626 19 69 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 82068.64 \N 0.00 \N \N \N M 6627 19 69 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 50089.10 0.61033179055970709396 \N \N \N 103 M 6628 19 69 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 31084.94 0.37876757796888068329 \N \N \N 141 M 6629 19 69 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 140 M 6630 19 69 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6631 19 69 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 735.00 0.00895591787557342244 \N \N \N 122 M 6632 19 69 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6633 19 69 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6634 19 69 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 159.60 0.00194471359583880030 \N \N \N 101 M 6635 19 69 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6636 19 69 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 10327.52 \N 0.00 \N \N \N M 6637 19 69 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 7728.52 0.74834229321269772414 \N \N \N 108 M 6638 19 69 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6639 19 69 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6640 19 69 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6641 19 69 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 799.00 0.07736610531860504748 \N \N \N 131 M 6642 19 69 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6643 19 69 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 1500.00 0.14524300122391435698 \N \N \N 120 M 6644 19 69 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 300.00 0.02904860024478287140 \N \N \N 139 M 6645 19 69 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 6646 19 69 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6647 19 69 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6648 19 69 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 6649 19 69 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 M 6650 19 69 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6651 19 69 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 6652 19 69 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6653 19 69 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 6654 19 69 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 82068.64 \N \N \N Total Net Revenue \N M 6655 19 69 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 10327.52 \N \N \N Total Net Expenses \N M 6656 19 69 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 71741.12 \N \N \N Net Income \N M 6657 19 70 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 6658 19 70 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6659 19 70 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 103 M 6660 19 70 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 141 M 6661 19 70 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 140 M 6662 19 70 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 121 M 6663 19 70 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 122 M 6664 19 70 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 135 M 6665 19 70 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 123 M 6666 19 70 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 101 M 6667 19 70 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 115 M 6668 19 70 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6669 19 70 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 108 M 6670 19 70 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 136 M 6671 19 70 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 137 M 6672 19 70 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 97 M 6673 19 70 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 131 M 6674 19 70 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 119 M 6675 19 70 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 120 M 6676 19 70 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 139 M 6677 19 70 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 112 M 6678 19 70 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 98 M 6679 19 70 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 110 M 6680 19 70 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 91 M 6681 19 70 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 92 M 6682 19 70 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 93 M 6683 19 70 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 125 M 6684 19 70 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 117 M 6685 19 70 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 118 M 6686 19 70 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 0.00 \N \N \N Total Net Revenue \N M 6687 19 70 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 0.00 \N \N \N Total Net Expenses \N M 6688 19 70 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 0.00 \N \N \N Net Income \N M 6689 19 71 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 103 M 6690 19 71 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 6691 19 71 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6692 19 71 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 141 M 6693 19 71 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 140 M 6694 19 71 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 121 M 6695 19 71 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 122 M 6696 19 71 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 135 M 6697 19 71 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 123 M 6698 19 71 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 101 M 6699 19 71 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 115 M 6700 19 71 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6701 19 71 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 108 M 6702 19 71 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 136 M 6703 19 71 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 137 M 6704 19 71 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 97 M 6705 19 71 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 131 M 6706 19 71 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 119 M 6707 19 71 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 120 M 6708 19 71 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 139 M 6709 19 71 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 112 M 6710 19 71 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 98 M 6711 19 71 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 110 M 6712 19 71 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 91 M 6713 19 71 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 92 M 6714 19 71 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 93 M 6715 19 71 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 125 M 6716 19 71 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 117 M 6717 19 71 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 118 M 6718 19 71 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 0.00 \N \N \N Total Net Revenue \N M 6719 19 71 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 0.00 \N \N \N Total Net Expenses \N M 6720 19 71 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 0.00 \N \N \N Net Income \N M 6721 19 72 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 6722 19 72 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6723 19 72 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 103 M 6724 19 72 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 141 M 6725 19 72 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 140 M 6726 19 72 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 121 M 6727 19 72 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 122 M 6728 19 72 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 135 M 6729 19 72 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 123 M 6730 19 72 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 101 M 6731 19 72 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 115 M 6732 19 72 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6733 19 72 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 108 M 6734 19 72 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 136 M 6735 19 72 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 137 M 6736 19 72 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 97 M 6737 19 72 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 131 M 6738 19 72 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 119 M 6739 19 72 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 120 M 6740 19 72 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 139 M 6741 19 72 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 112 M 6742 19 72 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 98 M 6743 19 72 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 110 M 6744 19 72 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 91 M 6745 19 72 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 92 M 6746 19 72 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 93 M 6747 19 72 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 125 M 6748 19 72 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 117 M 6749 19 72 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 118 M 6750 19 72 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 0.00 \N \N \N Total Net Revenue \N M 6751 19 72 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 0.00 \N \N \N Total Net Expenses \N M 6752 19 72 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 0.00 \N \N \N Net Income \N M 6753 19 73 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 6754 19 73 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6755 19 73 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 103 M 6756 19 73 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 141 M 6757 19 73 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 140 M 6758 19 73 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 121 M 6759 19 73 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 122 M 6760 19 73 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 135 M 6761 19 73 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 123 M 6762 19 73 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 101 M 6763 19 73 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 115 M 6764 19 73 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6765 19 73 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 108 M 6766 19 73 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 136 M 6767 19 73 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 137 M 6768 19 73 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 97 M 6769 19 73 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 131 M 6770 19 73 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 119 M 6771 19 73 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 120 M 6772 19 73 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 139 M 6773 19 73 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 112 M 6774 19 73 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 98 M 6775 19 73 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 110 M 6776 19 73 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 91 M 6777 19 73 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 92 M 6778 19 73 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 93 M 6779 19 73 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 125 M 6780 19 73 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 117 M 6781 19 73 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 118 M 6782 19 73 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 0.00 \N \N \N Total Net Revenue \N M 6783 19 73 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 0.00 \N \N \N Total Net Expenses \N M 6784 19 73 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 0.00 \N \N \N Net Income \N M 6785 19 74 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 6786 19 74 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6787 19 74 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 103 M 6788 19 74 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 141 M 6789 19 74 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 140 M 6790 19 74 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 121 M 6791 19 74 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 122 M 6792 19 74 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 135 M 6793 19 74 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 123 M 6794 19 74 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 101 M 6795 19 74 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 115 M 6796 19 74 admin 14 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N M 6797 19 74 admin 15 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 108 M 6798 19 74 admin 16 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 136 M 6799 19 74 admin 17 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 137 M 6800 19 74 admin 18 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 97 M 6801 19 74 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 131 M 6802 19 74 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 119 M 6803 19 74 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 120 M 6804 19 74 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 139 M 6805 19 74 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 112 M 6806 19 74 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 98 M 6807 19 74 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 110 M 6808 19 74 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 91 M 6809 19 74 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 92 M 6810 19 74 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 93 M 6811 19 74 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 125 M 6812 19 74 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 117 M 6813 19 74 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 118 M 6814 19 74 admin 13 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 0.00 \N \N \N Total Net Revenue \N M 6815 19 74 admin 32 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 0.00 \N \N \N Total Net Expenses \N M 6816 19 74 admin 33 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 0.00 \N \N \N Net Income \N M 6817 19 77 jsmith 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 97838.94 \N 0.00 \N \N \N M 6818 19 77 jsmith 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 126791.90 \N 0.00 \N \N \N M 6819 19 77 jsmith 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 10.99 0.000086677461257383160912 \N \N \N 103 M 6820 19 77 jsmith 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 51652.83 0.40738272713004537356 \N \N \N 141 M 6821 19 77 jsmith 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 55000.00 0.43378165324441072340 \N \N \N 140 M 6822 19 77 jsmith 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 6823 19 77 jsmith 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 18750.01 0.14788018792998606378 \N \N \N 122 M 6824 19 77 jsmith 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 6825 19 77 jsmith 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 6826 19 77 jsmith 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 1224.21 0.00965526977669709185 \N \N \N 101 M 6827 19 77 jsmith 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 6828 19 77 jsmith 13 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 153.86 0.00121348445760336425 \N \N \N 142 M 6829 19 77 jsmith 14 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 144 M 6830 19 77 jsmith 15 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 147 M 6831 19 77 jsmith 16 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 154 M 6832 19 77 jsmith 18 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 28952.96 \N 0.00 \N \N \N M 6833 19 77 jsmith 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 12822.14 0.44286110988306549658 \N \N \N 108 M 6834 19 77 jsmith 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 6835 19 77 jsmith 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 6836 19 77 jsmith 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 6837 19 77 jsmith 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 6838 19 77 jsmith 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 6839 19 77 jsmith 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 6840 19 77 jsmith 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 600.00 0.02072326974513141316 \N \N \N 139 M 6841 19 77 jsmith 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 15000.00 0.51808174362828532903 \N \N \N 112 M 6842 19 77 jsmith 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 6843 19 77 jsmith 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 6844 19 77 jsmith 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -2.57 -0.000088764672074979553041 \N \N \N 91 M 6845 19 77 jsmith 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 M 6846 19 77 jsmith 32 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 6847 19 77 jsmith 33 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 500.00 0.01726939145427617763 \N \N \N 125 M 6848 19 77 jsmith 34 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 6849 19 77 jsmith 35 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.01 0.000000345387829085523553 \N \N \N 118 M 6850 19 77 jsmith 36 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 33.39 0.00115324996131656314 \N \N \N 148 M 6851 19 77 jsmith 37 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 152 M 6852 19 77 jsmith 38 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 153 M 6853 19 77 jsmith 39 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 150 M 6854 19 77 jsmith 40 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 149 M 6855 19 77 jsmith 41 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -0.01 -0.000000345387829085523553 \N \N \N 145 M 6856 19 77 jsmith 17 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 126791.90 \N \N \N Total Net Revenue \N M 6857 20 76 jsmith 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 6858 19 77 jsmith 42 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 28952.96 \N \N \N Total Net Expenses \N M 6859 19 77 jsmith 43 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 97838.94 \N \N \N Net Income \N M 6860 19 77 jsmith 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 471798.31 \N 0.00 \N \N \N Y 6861 19 77 jsmith 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 817107.17 \N 0.00 \N \N \N Y 6862 19 77 jsmith 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 623850.09 0.76348625113643293572 \N \N \N 103 Y 6863 19 77 jsmith 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 93068.40 0.11389986946265567588 \N \N \N 141 Y 6864 19 77 jsmith 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 55000.00 0.06731063197010007879 \N \N \N 140 Y 6865 19 77 jsmith 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 Y 6866 19 77 jsmith 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 41985.01 0.05138250102492675471 \N \N \N 122 Y 6867 19 77 jsmith 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 Y 6868 19 77 jsmith 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 Y 6869 19 77 jsmith 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 3049.81 0.00373244797252238039 \N \N \N 101 Y 6870 19 77 jsmith 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 Y 6871 19 77 jsmith 13 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 153.86 0.00018829843336217451 \N \N \N 142 Y 6872 19 77 jsmith 14 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 144 Y 6873 24 76 jsmith 18 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 128 M 6874 19 77 jsmith 15 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 147 Y 6875 19 77 jsmith 16 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 154 Y 6876 19 77 jsmith 18 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 345308.86 \N 0.00 \N \N \N Y 6877 19 77 jsmith 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 326579.04 0.94575922552349221506 \N \N \N 108 Y 6878 19 77 jsmith 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 Y 6879 19 77 jsmith 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 Y 6880 19 77 jsmith 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 Y 6881 19 77 jsmith 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 799.00 0.00231387054476389630 \N \N \N 131 Y 6882 19 77 jsmith 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 Y 6883 19 77 jsmith 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 1500.00 0.00434393719292345988 \N \N \N 120 Y 6884 19 77 jsmith 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 900.00 0.00260636231575407593 \N \N \N 139 Y 6885 19 77 jsmith 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 15000.00 0.04343937192923459885 \N \N \N 112 Y 6886 19 77 jsmith 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 Y 6887 19 77 jsmith 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 Y 6888 19 77 jsmith 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -2.57 -0.000007442612390542194602 \N \N \N 91 Y 6889 19 77 jsmith 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 Y 6890 19 77 jsmith 32 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 Y 6891 19 77 jsmith 33 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 500.00 0.00144797906430781996 \N \N \N 125 Y 6892 19 77 jsmith 34 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 Y 6893 19 77 jsmith 35 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.01 0.000000028959581286156399 \N \N \N 118 Y 6894 19 77 jsmith 36 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 33.39 0.000096696041914476217031 \N \N \N 148 Y 6895 19 77 jsmith 37 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 152 Y 6896 19 77 jsmith 38 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 153 Y 6897 19 77 jsmith 39 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 150 Y 6898 19 77 jsmith 40 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 149 Y 6899 19 77 jsmith 41 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -0.01 -0.000000028959581286156399 \N \N \N 145 Y 6900 19 77 jsmith 17 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 817107.17 \N \N \N Total Net Revenue \N Y 6901 19 77 jsmith 42 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 345308.86 \N \N \N Total Net Expenses \N Y 6902 19 77 jsmith 43 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 471798.31 \N \N \N Net Income \N Y 6903 24 76 jsmith 1 0 G 170 0.00 0.00 -186731.00 -13644.32 0.00 \N \N 2.6353590380490008 -0.40736998741255066627 0.00000000000000000000 -1 68737.00 0.50000000000000000000 0.00 \N \N \N M 6904 24 76 jsmith 2 1 G 172 0.00 0.00 -186731.00 -13644.32 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 170 68737.00 1.00000000000000000000 0.00 \N \N \N M 6905 24 76 jsmith 3 2 G 173 0.00 0.00 -25634.00 112212.00 0.00 \N \N -0.07818509560395653062 0.25054703618030312503 0.00000000000000000000 172 86578.00 0.71071201887920637459 0.00 \N \N \N M 6906 24 76 jsmith 4 3 G 175 \N \N -25634.00 112212.00 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 173 86578.00 1.00000000000000000000 \N \N \N \N M 6907 24 76 jsmith 6 2 G 174 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 6908 24 76 jsmith 7 3 I 295 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 174 0.00 0.00000000000000000000 \N \N \N 112 M 6909 24 76 jsmith 9 2 G 176 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 6910 24 76 jsmith 10 3 I 300 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 176 0.00 0.00000000000000000000 \N \N \N 100 M 6911 24 76 jsmith 12 2 G 179 0.00 0.00 115875.00 115875.00 0.00 \N \N 0.35342505863729667575 0.25872578527601882698 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 6912 24 76 jsmith 13 3 I 298 \N \N 115875.00 115875.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 179 0.00 0.00000000000000000000 \N \N \N 106 M 6913 24 76 jsmith 15 2 G 180 0.00 0.00 141422.00 114881.16 0.00 \N \N 0.43134479950467115838 0.25650673859262104013 0.00000000000000000000 172 26540.84 0.21787167616657806504 0.00 \N \N \N M 6914 24 76 jsmith 16 3 I 299 \N \N 25634.00 25634.00 0 \N \N 0.18125892718247514531 0.22313493352608904715 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 85 M 6915 24 76 jsmith 17 3 I 299 \N \N 56310.00 27040.00 0 \N \N 0.39817001598054050996 0.23537366788427275630 0.00000000000000000000 180 29270.00 1.10282869720777488580 \N \N \N 138 M 6916 24 76 jsmith 19 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 134 M 6917 24 76 jsmith 20 3 I 299 \N \N 33844.00 33844.00 0 \N \N 0.23931212965450919942 0.29460008934450174424 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 86 M 6918 24 76 jsmith 21 3 I 299 \N \N 25634.00 25634.00 0 \N \N 0.18125892718247514531 0.22313493352608904715 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 96 M 6919 24 76 jsmith 22 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 130 M 6920 24 76 jsmith 23 3 I 299 \N \N 0.00 2729.16 0 \N \N 0.000000000000000000000000 0.02375637571904740516 0.00000000000000000000 180 -2729.16 -0.10282869720777488580 \N \N \N 87 M 6921 24 76 jsmith 24 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 90 M 6922 24 76 jsmith 25 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 88 M 6923 24 76 jsmith 26 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 89 M 6924 24 76 jsmith 27 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 83 M 6925 24 76 jsmith 28 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N \N 146 M 6926 24 76 jsmith 30 2 G 183 0.00 0.00 48100.00 56799.84 0.00 \N \N 0.14670761873099434825 0.12682272455277001259 0.00000000000000000000 172 8699.84 0.07141630495421556037 0.00 \N \N \N M 6927 24 76 jsmith 31 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 133 M 6928 24 76 jsmith 32 3 I 301 \N \N 0.00 4074.84 0 \N \N 0.000000000000000000000000 0.07174034293054346632 0.00000000000000000000 183 4074.84 0.46838102769706109538 \N \N \N 94 M 6929 24 76 jsmith 33 3 I 301 \N \N 0.00 4625.00 0 \N \N 0.000000000000000000000000 0.08142628570784706436 0.00000000000000000000 183 4625.00 0.53161897230293890462 \N \N \N 102 M 6930 24 76 jsmith 34 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 129 M 6931 24 76 jsmith 35 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 155 M 6932 24 76 jsmith 36 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 104 M 6933 24 76 jsmith 37 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 107 M 6934 24 76 jsmith 38 3 I 301 \N \N 48100.00 48100.00 0 \N \N 1.00000000000000000000 0.84683337136160946932 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 95 M 6935 24 76 jsmith 39 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 105 M 6936 24 76 jsmith 40 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 132 M 6937 24 76 jsmith 42 2 G 194 0.00 0.00 48100.00 48100.00 0.00 \N \N 0.14670761873099434825 0.10739771539828699528 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 6938 24 76 jsmith 43 3 I 302 \N \N 48100.00 48100.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 194 0.00 0.00000000000000000000 \N \N \N 99 M 6939 24 76 jsmith 46 1 G 188 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 170 0.00 0.000000000000000000000000 0.00 \N \N \N M 6940 24 76 jsmith 47 2 G 189 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 188 0.00 0.00000000000000000000 0.00 \N \N \N M 6941 24 76 jsmith 48 3 I 303 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 189 0.00 0.00000000000000000000 \N \N \N 111 M 6942 24 76 jsmith 50 2 G 190 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 188 0.00 0.00000000000000000000 0.00 \N \N \N M 6943 24 76 jsmith 53 1 G 191 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 170 0.00 0.000000000000000000000000 0.00 \N \N \N M 6944 24 76 jsmith 54 2 G 192 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 191 0.00 0.00000000000000000000 0.00 \N \N \N M 6945 24 76 jsmith 55 3 I 304 \N \N 0.00 0.00 0 \N \N \N \N \N 192 0.00 \N \N \N \N 116 M 6946 24 76 jsmith 57 2 G 193 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 191 0.00 0.00000000000000000000 0.00 \N \N \N M 6947 24 76 jsmith 58 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 113 M 6948 24 76 jsmith 59 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 84 M 6949 24 76 jsmith 60 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 114 M 6950 24 76 jsmith 64 0 G 171 0.00 0.00 115875.00 47138.00 0.00 \N \N -1.6353590380490008 1.4073699874125507 0.00000000000000000000 -1 68737.00 0.50000000000000000000 0.00 \N \N \N M 6951 24 76 jsmith 65 1 I 291 \N \N 115875.00 47138.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 171 68737.00 1.00000000000000000000 \N \N \N 109 M 6952 24 76 jsmith 66 1 I 291 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 171 0.00 0.000000000000000000000000 \N \N \N 126 M 6953 24 76 jsmith 67 1 I 291 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 171 0.00 0.000000000000000000000000 \N \N \N 127 M 6954 24 76 jsmith 68 1 I 291 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 171 0.00 0.000000000000000000000000 \N \N \N 143 M 6955 24 76 jsmith 5 3 T -1 \N \N -25634.00 112212.00 0.00 \N \N -0.07818509560395653062 0.25054703618030312503 0.00000000000000000000 173 86578.00 0.71071201887920637459 \N \N Total Cash Flow From Operating Activities \N M 6956 24 76 jsmith 8 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 174 0.00 0.000000000000000000000000 \N \N Total Charges Not Using Cash \N M 6957 24 76 jsmith 11 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 176 0.00 0.000000000000000000000000 \N \N Total Changes in Current Assets \N M 6958 24 76 jsmith 14 3 T -1 \N \N 115875.00 115875.00 0.00 \N \N 0.35342505863729667575 0.25872578527601882698 0.00000000000000000000 179 0.00 0.000000000000000000000000 \N \N Total Net Receivables \N M 6959 24 76 jsmith 29 3 T -1 \N \N 141422.00 114881.16 0.00 \N \N 0.43134479950467115838 0.25650673859262104013 0.00000000000000000000 180 26540.84 0.21787167616657806504 \N \N Total Inventory \N M 6960 24 76 jsmith 41 3 T -1 \N \N 48100.00 56799.84 0.00 \N \N 0.14670761873099434825 0.12682272455277001259 0.00000000000000000000 183 8699.84 0.07141630495421556037 \N \N Total Change in Current Liability \N M 6961 24 76 jsmith 44 3 T -1 \N \N 48100.00 48100.00 0.00 \N \N 0.14670761873099434825 0.10739771539828699528 0.00000000000000000000 194 0.00 0.000000000000000000000000 \N \N Total Accounts Payable \N M 6962 24 76 jsmith 45 2 T -1 \N \N -186731.00 -13644.32 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 172 68737.00 1.00000000000000000000 \N \N Total Cash Flow From Operating Activities \N M 6963 24 76 jsmith 49 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 189 0.00 0.00000000000000000000 \N \N Total Property Plant and Equipment \N M 6964 24 76 jsmith 51 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 190 0.00 0.00000000000000000000 \N \N Total Other Assets \N M 6965 24 76 jsmith 52 2 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 188 0.00 0.000000000000000000000000 \N \N Total Cash Flow From Investing Activities \N M 6966 24 76 jsmith 56 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 192 0.00 0.00000000000000000000 \N \N Total Long Term Debt \N M 6967 24 76 jsmith 61 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N Total Common Stock and Equity \N M 6968 24 76 jsmith 62 2 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 191 0.00 0.000000000000000000000000 \N \N Total Cash Flow from Financing Activities \N M 6969 24 76 jsmith 63 1 T -1 \N \N -186731.00 -13644.32 0.00 \N \N 2.6353590380490008 -0.40736998741255066627 0.00000000000000000000 170 68737.00 0.50000000000000000000 \N \N TOTAL STATEMENT OF CASH FLOWS \N M 6970 24 76 jsmith 69 1 T -1 \N \N 115875.00 47138.00 0.00 \N \N -1.6353590380490008 1.4073699874125507 0.00000000000000000000 171 68737.00 0.50000000000000000000 \N \N TOTAL CASH POSITION \N M 6971 24 76 jsmith 70 0 T -1 \N \N -302606.00 -60782.32 0.00 \N \N \N \N \N \N 0.00 \N \N \N CHECKSUM (TOTAL STA. OF CASH FLOWS - TOTAL CASH) \N M 6972 24 77 jsmith 25 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 88 M 6973 24 77 jsmith 1 0 G 170 0.00 0.00 -230801.18 10427.90 0.00 \N \N -8.7786976937018491 0.06532173675551188760 0.00000000000000000000 -1 107881.08 0.50000000000000000000 0.00 \N \N \N M 6974 24 77 jsmith 39 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 105 M 6975 24 77 jsmith 2 1 G 172 0.00 0.00 -170801.18 -34572.10 0.00 \N \N 1.5415104784985142 -3.3153463305171703 0.00000000000000000000 170 122881.08 0.53923335803042534290 0.00 \N \N \N M 6976 24 77 jsmith 3 2 G 173 0.00 0.00 -8792.04 147347.99 0.00 \N \N -0.02276080117034305953 0.27426645333589058259 0.00000000000000000000 172 98057.07 0.90670908951703491535 0.00 \N \N \N M 6977 24 77 jsmith 4 3 G 175 \N \N -8792.04 147347.99 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 173 98057.07 1.00000000000000000000 \N \N \N \N M 6978 24 77 jsmith 6 2 G 174 0.00 0.00 15000.00 0.00 0.00 \N \N 0.03883194543645682833 0.000000000000000000000000 0.00000000000000000000 172 15000.00 0.13870123126007664445 0.00 \N \N \N M 6979 24 77 jsmith 7 3 I 295 \N \N 15000.00 0.00 0 \N \N 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 174 15000.00 1.00000000000000000000 \N \N \N 112 M 6980 24 77 jsmith 9 2 G 176 0.00 0.00 0.00 100.00 0.00 \N \N 0.000000000000000000000000 0.00018613518469840721 0.00000000000000000000 172 -100.00 -0.00092467487506717763 0.00 \N \N \N M 6981 24 77 jsmith 10 3 I 300 \N \N 0.00 100.00 0 \N \N 0.00000000000000000000 1.00000000000000000000 0.00000000000000000000 176 -100.00 1.00000000000000000000 \N \N \N 100 M 6982 24 77 jsmith 12 2 G 179 0.00 0.00 208740.93 208740.93 0.00 \N \N 0.54038776027435028330 0.38854031559667290058 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 6983 24 77 jsmith 13 3 I 298 \N \N 208740.93 208740.93 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 179 0.00 0.00000000000000000000 \N \N \N 106 M 6984 21 77 jsmith 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 6985 24 77 jsmith 15 2 G 180 0.00 0.00 69799.61 77067.09 0.00 \N \N 0.18069697646706442660 0.14344897031318771134 0.00000000000000000000 172 -7267.48 -0.06720056161053212080 0.00 \N \N \N M 6986 24 77 jsmith 16 3 I 299 \N \N 17390.17 16684.82 0 \N \N 0.24914422874282535390 0.21649734017464523443 0.00000000000000000000 180 705.35 -0.09705565065194537859 \N \N \N 85 M 6987 24 77 jsmith 17 3 I 299 \N \N 6930.20 16174.87 0 \N \N 0.09928708770722357904 0.20988037825224748982 0.00000000000000000000 180 -9244.67 1.2720599162295596 \N \N \N 138 M 6988 24 77 jsmith 18 3 I 299 \N \N 2139.11 881.55 0 \N \N 0.03064644630535901275 0.01143873474397437350 0.00000000000000000000 180 1257.56 -0.17303934788950227589 \N \N \N 128 M 6989 24 77 jsmith 19 3 I 299 \N \N 3214.16 3214.16 0 \N \N 0.04604839482627481729 0.04170599927932921822 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 134 M 6990 24 77 jsmith 20 3 I 299 \N \N 20472.37 20472.37 0 \N \N 0.29330206859321993346 0.26564348024558861636 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 86 M 6991 24 77 jsmith 21 3 I 299 \N \N 16845.38 16832.56 0 \N \N 0.24133917080625522120 0.21841437116673277790 0.00000000000000000000 180 12.82 -0.00176402274240864784 \N \N \N 96 M 6992 24 77 jsmith 22 3 I 299 \N \N 821.55 821.55 0 \N \N 0.01177012307088821843 0.01066019230776716754 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 130 M 6993 24 77 jsmith 23 3 I 299 \N \N 0.00 1876.91 0 \N \N 0.000000000000000000000000 0.02435423473236111549 0.00000000000000000000 180 -1876.91 0.25826146064385454105 \N \N \N 87 M 6994 24 77 jsmith 24 3 I 299 \N \N 1134.60 0.00 0 \N \N 0.01625510515030098306 0.000000000000000000000000 0.00000000000000000000 180 1134.60 -0.15612014068150170348 \N \N \N 90 M 6995 24 77 jsmith 26 3 I 299 \N \N 25.63 26.20 0 \N \N 0.00036719402873454451 0.00033996353047714660 0.00000000000000000000 180 -0.57 0.000078431588391024123905 \N \N \N 89 M 6996 24 77 jsmith 27 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 83 M 6997 24 77 jsmith 28 3 I 299 \N \N 826.44 82.10 0 \N \N 0.01184018076891833636 0.00106530556687686015 0.00000000000000000000 180 744.34 -0.10242064649644718665 \N \N \N 146 M 6998 24 77 jsmith 30 2 G 183 0.00 0.00 37185.90 39642.43 0.00 \N \N 0.09626672265370266483 0.07378851029943678844 0.00000000000000000000 172 2456.53 0.02271491570848773863 0.00 \N \N \N M 6999 24 77 jsmith 31 3 I 301 \N \N 10075.00 10075.00 0 \N \N 0.27093602682737274074 0.25414688251956300358 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 133 M 7000 24 77 jsmith 32 3 I 301 \N \N 0.00 2431.00 0 \N \N 0.000000000000000000000000 0.06132318326601068603 0.00000000000000000000 183 2431.00 0.98960729158609909099 \N \N \N 94 M 7001 24 77 jsmith 33 3 I 301 \N \N 2.50 20.25 0 \N \N 0.000067229783331854278100 0.00051081631474155343 0.00000000000000000000 183 17.75 0.00722563941820372639 \N \N \N 102 M 7002 24 77 jsmith 34 3 I 301 \N \N 0.00 7.78 0 \N \N 0.000000000000000000000000 0.00019625436684885361 0.00000000000000000000 183 7.78 0.00316706899569718261 \N \N \N 129 M 7003 24 77 jsmith 35 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 155 M 7004 24 77 jsmith 36 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 104 M 7005 24 77 jsmith 37 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 107 M 7006 24 77 jsmith 38 3 I 301 \N \N 27108.40 27108.40 0 \N \N 0.72899674338929540498 0.68382286353283590335 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 95 M 7007 24 77 jsmith 40 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 132 M 7008 24 77 jsmith 42 2 G 194 0.00 0.00 64345.50 64345.50 0.00 \N \N 0.16657739633876885647 0.11976961527011360984 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 7009 24 77 jsmith 43 3 I 302 \N \N 64345.50 64345.50 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 194 0.00 0.00000000000000000000 \N \N \N 99 M 7010 24 77 jsmith 46 1 G 188 0.00 0.00 60000.00 0.00 0.00 \N \N -0.54151047849851418550 0.000000000000000000000000 0.00000000000000000000 170 60000.00 0.26329522398261408977 0.00 \N \N \N M 7011 24 77 jsmith 47 2 G 189 0.00 0.00 60000.00 0.00 0.00 \N \N 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 188 60000.00 1.00000000000000000000 0.00 \N \N \N M 7012 24 77 jsmith 48 3 I 303 \N \N 60000.00 0.00 0 \N \N 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 189 60000.00 1.00000000000000000000 \N \N \N 111 M 7013 24 77 jsmith 50 2 G 190 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 188 0.00 0.000000000000000000000000 0.00 \N \N \N M 7014 24 77 jsmith 53 1 G 191 0.00 0.00 0.00 45000.00 0.00 \N \N 0.000000000000000000000000 4.3153463305171703 0.00000000000000000000 170 45000.00 0.19747141798696056733 0.00 \N \N \N M 7015 24 77 jsmith 54 2 G 192 0.00 0.00 0.00 35000.00 0.00 \N \N 0.00000000000000000000 0.77777777777777777778 0.00000000000000000000 191 35000.00 0.77777777777777777778 0.00 \N \N \N M 7016 24 77 jsmith 55 3 I 304 \N \N 0.00 35000.00 0 \N \N \N \N \N 192 35000.00 \N \N \N \N 116 M 7017 24 77 jsmith 57 2 G 193 0.00 0.00 0.00 10000.00 0.00 \N \N 0.00000000000000000000 0.22222222222222222222 0.00000000000000000000 191 10000.00 0.22222222222222222222 0.00 \N \N \N M 7018 24 77 jsmith 58 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.000000000000000000000000 0.00000000000000000000 193 0.00 0.000000000000000000000000 \N \N \N 113 M 7019 24 77 jsmith 59 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.000000000000000000000000 0.00000000000000000000 193 0.00 0.000000000000000000000000 \N \N \N 84 M 7020 24 77 jsmith 60 3 I 305 \N \N 0.00 10000.00 0 \N \N 0.00000000000000000000 1.00000000000000000000 0.00000000000000000000 193 10000.00 1.00000000000000000000 \N \N \N 114 M 7021 24 77 jsmith 64 0 G 171 0.00 0.00 257092.23 149211.15 0.00 \N \N 9.7786976937018491 0.93467826324448811240 0.00000000000000000000 -1 107881.08 0.50000000000000000000 0.00 \N \N \N M 7022 24 77 jsmith 65 1 I 291 \N \N 114588.88 75610.54 0 \N \N 0.44571117532412395349 0.50673518701517949563 0.00000000000000000000 171 38978.34 0.36130839624519888010 \N \N \N 109 M 7023 24 77 jsmith 66 1 I 291 \N \N 0.00 1500.10 0 \N \N 0.000000000000000000000000 0.01005353822418766962 0.00000000000000000000 171 -1500.10 -0.01390512590344850089 \N \N \N 126 M 7024 24 77 jsmith 67 1 I 291 \N \N 140805.68 70402.84 0 \N \N 0.54768547458629924366 0.47183363977826053884 0.00000000000000000000 171 70402.84 0.65259672965824962079 \N \N \N 127 M 7025 24 77 jsmith 68 1 I 291 \N \N 1697.67 1697.67 0 \N \N 0.00660335008957680285 0.01137763498237229590 0.00000000000000000000 171 0.00 0.000000000000000000000000 \N \N \N 143 M 7026 24 77 jsmith 5 3 T -1 \N \N -8792.04 147347.99 0.00 \N \N -0.02276080117034305953 0.27426645333589058259 0.00000000000000000000 173 98057.07 0.90670908951703491535 \N \N Total Cash Flow From Operating Activities \N M 7027 24 77 jsmith 8 3 T -1 \N \N 15000.00 0.00 0.00 \N \N 0.03883194543645682833 0.000000000000000000000000 0.00000000000000000000 174 15000.00 0.13870123126007664445 \N \N Total Charges Not Using Cash \N M 7028 24 77 jsmith 11 3 T -1 \N \N 0.00 100.00 0.00 \N \N 0.000000000000000000000000 0.00018613518469840721 0.00000000000000000000 176 -100.00 -0.00092467487506717763 \N \N Total Changes in Current Assets \N M 7029 24 77 jsmith 14 3 T -1 \N \N 208740.93 208740.93 0.00 \N \N 0.54038776027435028330 0.38854031559667290058 0.00000000000000000000 179 0.00 0.000000000000000000000000 \N \N Total Net Receivables \N M 7030 24 77 jsmith 29 3 T -1 \N \N 69799.61 77067.09 0.00 \N \N 0.18069697646706442660 0.14344897031318771134 0.00000000000000000000 180 -7267.48 -0.06720056161053212080 \N \N Total Inventory \N M 7031 24 77 jsmith 41 3 T -1 \N \N 37185.90 39642.43 0.00 \N \N 0.09626672265370266483 0.07378851029943678844 0.00000000000000000000 183 2456.53 0.02271491570848773863 \N \N Total Change in Current Liability \N M 7032 24 77 jsmith 44 3 T -1 \N \N 64345.50 64345.50 0.00 \N \N 0.16657739633876885647 0.11976961527011360984 0.00000000000000000000 194 0.00 0.000000000000000000000000 \N \N Total Accounts Payable \N M 7033 24 77 jsmith 45 2 T -1 \N \N -170801.18 -34572.10 0.00 \N \N 1.5415104784985142 -3.3153463305171703 0.00000000000000000000 172 122881.08 0.53923335803042534290 \N \N Total Cash Flow From Operating Activities \N M 7034 24 77 jsmith 49 3 T -1 \N \N 60000.00 0.00 0.00 \N \N 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 189 60000.00 1.00000000000000000000 \N \N Total Property Plant and Equipment \N M 7035 24 77 jsmith 51 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 190 0.00 0.000000000000000000000000 \N \N Total Other Assets \N M 7036 24 77 jsmith 52 2 T -1 \N \N 60000.00 0.00 0.00 \N \N -0.54151047849851418550 0.000000000000000000000000 0.00000000000000000000 188 60000.00 0.26329522398261408977 \N \N Total Cash Flow From Investing Activities \N M 7037 24 77 jsmith 56 3 T -1 \N \N 0.00 35000.00 0.00 \N \N 0.00000000000000000000 0.77777777777777777778 0.00000000000000000000 192 35000.00 0.77777777777777777778 \N \N Total Long Term Debt \N M 7038 20 76 jsmith 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 7039 24 77 jsmith 61 3 T -1 \N \N 0.00 10000.00 0.00 \N \N 0.00000000000000000000 0.22222222222222222222 0.00000000000000000000 193 10000.00 0.22222222222222222222 \N \N Total Common Stock and Equity \N M 7040 24 77 jsmith 62 2 T -1 \N \N 0.00 45000.00 0.00 \N \N 0.000000000000000000000000 4.3153463305171703 0.00000000000000000000 191 45000.00 0.19747141798696056733 \N \N Total Cash Flow from Financing Activities \N M 7041 24 77 jsmith 63 1 T -1 \N \N -230801.18 10427.90 0.00 \N \N -8.7786976937018491 0.06532173675551188760 0.00000000000000000000 170 107881.08 0.50000000000000000000 \N \N TOTAL STATEMENT OF CASH FLOWS \N M 7042 24 77 jsmith 69 1 T -1 \N \N 257092.23 149211.15 0.00 \N \N 9.7786976937018491 0.93467826324448811240 0.00000000000000000000 171 107881.08 0.50000000000000000000 \N \N TOTAL CASH POSITION \N M 7043 24 77 jsmith 70 0 T -1 \N \N -487893.41 -138783.25 0.00 \N \N \N \N \N \N 0.00 \N \N \N CHECKSUM (TOTAL STA. OF CASH FLOWS - TOTAL CASH) \N M 7044 20 77 jsmith 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 113936.37 1.0666433684011860 0.00 \N \N \N M 7045 20 77 jsmith 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 106817.68 1.00000000000000000000 0.00 \N \N \N M 7046 20 77 jsmith 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 10.99 0.000102885589726344927169 \N \N \N 103 M 7047 20 77 jsmith 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 51652.83 0.48356068021698280659 \N \N \N 141 M 7048 20 77 jsmith 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 55000.00 0.51489603593712201950 \N \N \N 140 M 7049 20 77 jsmith 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 7050 20 77 jsmith 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 153.86 0.00144039825616882898 \N \N \N 142 M 7051 20 77 jsmith 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 7052 20 77 jsmith 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 7053 20 77 jsmith 11 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 19974.22 0.18699357634429057062 0.00 \N \N \N M 7054 20 77 jsmith 12 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 7055 20 77 jsmith 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 18750.01 0.17553283314147994976 \N \N \N 122 M 7056 20 77 jsmith 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 7057 20 77 jsmith 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 1224.21 0.01146074320281062086 \N \N \N 101 M 7058 20 77 jsmith 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 7059 20 77 jsmith 18 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 12855.53 0.12035020794310454973 0.00 \N \N \N M 7060 20 77 jsmith 19 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 12822.14 0.12003761924056017693 \N \N \N 108 M 7061 20 77 jsmith 20 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 7062 20 77 jsmith 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 7063 20 77 jsmith 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 33.39 0.00031258870254437280 \N \N \N 148 M 7064 20 77 jsmith 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 7065 20 77 jsmith 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 7066 20 77 jsmith 27 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 16097.43 0.15070005265046011110 0.00 \N \N \N M 7067 20 77 jsmith 28 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 7068 20 77 jsmith 29 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 7069 20 77 jsmith 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 7070 20 77 jsmith 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 7071 20 77 jsmith 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 600.00 0.00561704766476860385 \N \N \N 139 M 7072 20 77 jsmith 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 7073 20 77 jsmith 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 7074 20 77 jsmith 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -2.57 -0.000024059687497425519820 \N \N \N 91 M 7075 20 77 jsmith 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 7076 20 77 jsmith 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 7077 20 77 jsmith 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 500.00 0.00468087305397383654 \N \N \N 125 M 7078 20 77 jsmith 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 7079 20 77 jsmith 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.01 0.000000093617461079476731 \N \N \N 118 M 7080 20 77 jsmith 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 7081 20 77 jsmith 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 7082 20 77 jsmith 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -0.01 -0.000000093617461079476731 \N \N \N 145 M 7083 20 77 jsmith 44 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 15000.00 0.14042619161921509623 \N \N \N 112 M 7084 20 77 jsmith 10 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 106817.68 1.00000000000000000000 \N \N Total Sales \N M 7085 20 77 jsmith 17 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 19974.22 0.18699357634429057062 \N \N Total Other Revenue \N M 7086 20 77 jsmith 25 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 12855.53 0.12035020794310454973 \N \N Total Cost Of Sales \N M 7087 20 77 jsmith 26 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 113936.37 1.0666433684011860 \N \N GROSS PROFIT \N M 7088 20 77 jsmith 45 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 16097.43 0.15070005265046011110 \N \N Total Expenses \N M 7089 20 77 jsmith 46 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 97838.94 \N \N \N NET INCOME \N M 7090 21 77 jsmith 1 0 G 143 0.00 4268551.52 0.00 0.00 0.00 \N \N \N \N \N -1 116264.49 \N 0.00 \N \N \N M 7091 21 77 jsmith 2 1 G 154 0.00 4182551.73 0.00 0.00 0.00 \N 0.97985269954056920929 \N \N 0.00000000000000000000 143 116264.49 \N 0.00 \N \N \N M 7092 21 77 jsmith 3 2 G 155 0.00 3858422.83 0.00 0.00 0.00 \N 0.90391853347010791145 \N \N 0.00000000000000000000 154 123999.75 \N 0.00 \N \N \N M 7093 21 77 jsmith 4 3 I 268 \N 3249767.36 \N \N 0 \N 0.76132789888406922637 \N \N 0.00000000000000000000 155 54997.01 \N \N \N \N 109 M 7094 21 77 jsmith 5 3 I 268 \N 6611.60 \N \N 0 \N 0.00154890949986706498 \N \N 0.00000000000000000000 155 -1500.10 \N \N \N \N 126 M 7095 21 77 jsmith 6 3 I 268 \N 601943.87 \N \N 0 \N 0.14101829793540830919 \N \N 0.00000000000000000000 155 70402.84 \N \N \N \N 127 M 7096 21 77 jsmith 7 3 I 268 \N 100.00 \N \N 0 \N 0.000023427150763310922858 \N \N 0.00000000000000000000 155 100.00 \N \N \N \N 143 M 7097 21 77 jsmith 9 2 G 163 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 7098 21 77 jsmith 10 3 I 269 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 163 0.00 \N \N \N \N 106 M 7099 21 77 jsmith 12 2 G 156 0.00 324128.90 0.00 0.00 0.00 \N 0.07593416607046129784 \N \N 0.00000000000000000000 154 -7735.26 \N 0.00 \N \N \N M 7100 21 77 jsmith 13 3 I 270 \N 274137.79 \N \N 0 \N 0.06422267336250869475 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 85 M 7101 21 77 jsmith 14 3 I 270 \N 48582.97 \N \N 0 \N 0.01138160562719411666 \N \N 0.00000000000000000000 156 -9285.40 \N \N \N \N 138 M 7102 21 77 jsmith 15 3 I 270 \N 3758.97 \N \N 0 \N 0.00088061956904762860 \N \N 0.00000000000000000000 156 1171.81 \N \N \N \N 128 M 7103 21 77 jsmith 16 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 86 M 7104 21 77 jsmith 17 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 7105 21 77 jsmith 18 3 I 270 \N -4276.16 \N \N 0 \N -0.00100178245008039636 \N \N 0.00000000000000000000 156 -1547.00 \N \N \N \N 87 M 7106 21 77 jsmith 19 3 I 270 \N 1134.60 \N \N 0 \N 0.00026580445256052573 \N \N 0.00000000000000000000 156 1134.60 \N \N \N \N 90 M 7107 21 77 jsmith 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 7108 21 77 jsmith 22 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 7109 21 77 jsmith 23 3 I 270 \N 790.73 \N \N 0 \N 0.00018524550923072846 \N \N 0.00000000000000000000 156 790.73 \N \N \N \N 146 M 7110 21 77 jsmith 24 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 7111 21 77 jsmith 25 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 7112 21 77 jsmith 26 3 I 272 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 7113 21 77 jsmith 29 1 G 157 0.00 85999.79 0.00 0.00 0.00 \N 0.02014730045943079071 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 7114 21 77 jsmith 30 2 I 271 \N 85999.79 \N \N 0 \N 0.02014730045943079071 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 7115 21 77 jsmith 33 0 G 144 0.00 4268551.52 0.00 0.00 0.00 \N \N \N \N \N -1 3665.60 \N 0.00 \N \N \N M 7116 21 77 jsmith 34 1 G 145 0.00 18661.05 0.00 0.00 0.00 \N 0.00437175231751683297 \N \N 0.00000000000000000000 144 3665.60 \N 0.00 \N \N \N M 7117 21 77 jsmith 35 2 G 164 0.00 1260.50 0.00 0.00 0.00 \N 0.00029529923537153418 \N \N 0.00000000000000000000 145 1260.50 \N 0.00 \N \N \N M 7118 21 77 jsmith 36 3 I 274 \N 1260.50 \N \N 0 \N 0.00029529923537153418 \N \N 0.00000000000000000000 164 1260.50 \N \N \N \N 99 M 7119 21 77 jsmith 38 2 G 158 0.00 12400.55 0.00 0.00 0.00 \N 0.00290509554397975264 \N \N 0.00000000000000000000 145 2405.10 \N 0.00 \N \N \N M 7120 21 77 jsmith 39 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 7121 21 77 jsmith 40 3 I 273 \N 6936.60 \N \N 0 \N 0.00162504773984782547 \N \N 0.00000000000000000000 158 2401.96 \N \N \N \N 94 M 7122 21 77 jsmith 41 3 I 273 \N 4626.96 \N \N 0 \N 0.00108396489495809108 \N \N 0.00000000000000000000 158 -2.50 \N \N \N \N 102 M 7123 21 77 jsmith 42 3 I 273 \N 5.64 \N \N 0 \N 0.000001321291303050736049 \N \N 0.00000000000000000000 158 5.64 \N \N \N \N 129 M 7124 21 77 jsmith 43 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 155 M 7125 21 77 jsmith 44 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 7126 21 77 jsmith 45 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 7127 21 77 jsmith 46 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 95 M 7128 21 77 jsmith 47 3 I 273 \N 631.35 \N \N 0 \N 0.00014790731634416351 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 7129 21 77 jsmith 48 3 I 273 \N 200.00 \N \N 0 \N 0.000046854301526621845717 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 7130 21 77 jsmith 50 2 G 159 0.00 5000.00 0.00 0.00 0.00 \N 0.00117135753816554614 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 7131 21 77 jsmith 51 3 I 275 \N 5000.00 \N \N 0 \N 0.00117135753816554614 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 7132 21 77 jsmith 54 1 G 146 0.00 4249890.47 0.00 0.00 0.00 \N 0.99562824768248316703 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 7133 21 77 jsmith 55 2 G 160 0.00 1519999.99 0.00 0.00 0.00 \N 0.35609268925961095112 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 7134 21 77 jsmith 56 3 I 276 \N 1419999.99 \N \N 0 \N 0.33266553849630002826 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 7135 21 77 jsmith 57 3 I 276 \N 100000.00 \N \N 0 \N 0.02342715076331092286 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 7136 21 77 jsmith 59 2 G 147 \N 486558.26 \N \N 0.00 \N 0.11448724700897997496 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 7137 21 77 jsmith 60 2 G 162 0.00 2243332.22 0.00 0.00 0.00 \N 0.52554882130132987126 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 7138 21 77 jsmith 61 3 I 277 \N 2243332.22 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 7139 21 77 jsmith 8 3 T -1 \N 3858422.83 \N \N 0.00 \N 0.90391853347010791145 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 7140 21 77 jsmith 11 3 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 7141 21 77 jsmith 63 2 T -1 \N 4249890.47 \N \N 0.00 \N 0.99562824768248316703 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 7142 21 77 jsmith 27 3 T -1 \N 324128.90 \N \N 0.00 \N 0.07593416607046129784 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 7143 21 77 jsmith 28 2 T -1 \N 4182551.73 \N \N 0.00 \N 0.97985269954056920929 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 7144 21 77 jsmith 31 2 T -1 \N 85999.79 \N \N 0.00 \N 0.02014730045943079071 \N \N 0.00000000000000000000 157 \N \N \N \N Total Fixed Assets \N M 7145 21 77 jsmith 32 1 T -1 \N 4268551.52 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 7146 21 77 jsmith 37 3 T -1 \N 1260.50 \N \N 0.00 \N 0.00029529923537153418 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 7147 21 77 jsmith 49 3 T -1 \N 12400.55 \N \N 0.00 \N 0.00290509554397975264 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 7148 21 77 jsmith 52 3 T -1 \N 5000.00 \N \N 0.00 \N 0.00117135753816554614 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 7149 21 77 jsmith 53 2 T -1 \N 18661.05 \N \N 0.00 \N 0.00437175231751683297 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 7150 21 77 jsmith 58 3 T -1 \N 1519999.99 \N \N 0.00 \N 0.35609268925961095112 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 7151 21 77 jsmith 62 3 T -1 \N 2243332.22 \N \N 0.00 \N 0.52554882130132987126 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 7152 21 77 jsmith 64 1 T -1 \N 4268551.52 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 7153 21 77 jsmith 65 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 7154 24 78 jsmith 55 3 I 304 \N \N 0.00 0.00 0 \N \N \N \N \N 192 0.00 \N \N \N \N 116 M 7155 20 76 jsmith 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 86578.00 0.93597837837837837838 0.00 \N \N \N M 7156 20 76 jsmith 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 92500.00 1.00000000000000000000 0.00 \N \N \N M 7157 20 76 jsmith 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 92500.00 1.00000000000000000000 \N \N \N 103 M 7158 20 76 jsmith 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 141 M 7159 20 76 jsmith 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 140 M 7160 20 76 jsmith 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 7161 20 76 jsmith 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 142 M 7162 20 76 jsmith 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 7163 20 76 jsmith 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 7164 20 76 jsmith 11 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 19712.00 0.21310270270270270270 0.00 \N \N \N M 7165 20 76 jsmith 12 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 7166 20 76 jsmith 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 18750.00 0.20270270270270270270 \N \N \N 122 M 7167 20 76 jsmith 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 7168 20 76 jsmith 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 962.00 0.01040000000000000000 \N \N \N 101 M 7169 20 76 jsmith 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 7170 20 76 jsmith 18 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 25634.00 0.27712432432432432432 0.00 \N \N \N M 7171 20 76 jsmith 19 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 25634.00 0.27712432432432432432 \N \N \N 108 M 7172 20 76 jsmith 20 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 7173 20 76 jsmith 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 7174 20 76 jsmith 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 148 M 7175 20 76 jsmith 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 7176 20 76 jsmith 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 7177 20 76 jsmith 27 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.000000000000000000000000 0.00 \N \N \N M 7178 20 76 jsmith 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 7179 20 76 jsmith 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 7180 20 76 jsmith 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 139 M 7181 20 76 jsmith 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 7182 20 76 jsmith 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 7183 20 76 jsmith 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 7184 20 76 jsmith 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 7185 20 76 jsmith 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 7186 20 76 jsmith 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 7187 20 76 jsmith 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 7188 20 76 jsmith 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 7189 20 76 jsmith 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 7190 20 76 jsmith 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 7191 20 76 jsmith 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 145 M 7192 20 76 jsmith 44 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 7193 20 76 jsmith 10 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 92500.00 1.00000000000000000000 \N \N Total Sales \N M 7194 20 76 jsmith 17 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 19712.00 0.21310270270270270270 \N \N Total Other Revenue \N M 7195 20 76 jsmith 25 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 25634.00 0.27712432432432432432 \N \N Total Cost Of Sales \N M 7196 20 76 jsmith 26 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 86578.00 0.93597837837837837838 \N \N GROSS PROFIT \N M 7197 20 76 jsmith 45 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N Total Expenses \N M 7198 20 76 jsmith 46 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 86578.00 \N \N \N NET INCOME \N M 7199 24 78 jsmith 1 0 G 170 0.00 0.00 7920.00 14656.33 0.00 \N \N 1.00000000000000000000 0.64281472475728325667 0.00000000000000000000 -1 -8143.91 0.50000000000000000000 0.00 \N \N \N M 7200 24 78 jsmith 2 1 G 172 0.00 0.00 7920.00 14656.33 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 170 -8143.91 1.00000000000000000000 0.00 \N \N \N M 7201 24 78 jsmith 3 2 G 173 0.00 0.00 -670.00 166.21 0.00 \N \N -0.03122052689065919114 0.01134049246980656140 0.00000000000000000000 172 -503.79 -0.09335789323484664578 0.00 \N \N \N M 7202 24 78 jsmith 4 3 G 175 \N \N -670.00 166.21 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 173 -503.79 1.00000000000000000000 \N \N \N \N M 7203 24 78 jsmith 6 2 G 174 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 172 0.00 0.00000000000000000000 0.00 \N \N \N M 7204 24 78 jsmith 7 3 I 295 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 174 0.00 0.00000000000000000000 \N \N \N 112 M 7205 24 78 jsmith 9 2 G 176 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 172 0.00 0.00000000000000000000 0.00 \N \N \N M 7206 24 78 jsmith 10 3 I 300 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 176 0.00 0.00000000000000000000 \N \N \N 100 M 7207 24 78 jsmith 12 2 G 179 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 172 0.00 0.00000000000000000000 0.00 \N \N \N M 7208 24 78 jsmith 13 3 I 298 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 179 0.00 0.00000000000000000000 \N \N \N 106 M 7209 24 78 jsmith 15 2 G 180 0.00 0.00 6770.12 0.00 0.00 \N \N 0.31547270673580537776 0.000000000000000000000000 0.00000000000000000000 172 6770.12 1.2545785746979892 0.00 \N \N \N M 7210 24 78 jsmith 16 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 85 M 7211 24 78 jsmith 17 3 I 299 \N \N 6180.00 0.00 0 \N \N 0.91283463217786390788 0.00000000000000000000 0.00000000000000000000 180 6180.00 0.91283463217786390788 \N \N \N 138 M 7212 24 78 jsmith 18 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 128 M 7213 24 78 jsmith 19 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 134 M 7214 24 78 jsmith 20 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 86 M 7215 24 78 jsmith 21 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 96 M 7216 24 78 jsmith 22 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 130 M 7217 24 78 jsmith 23 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 87 M 7218 24 78 jsmith 24 3 I 299 \N \N 590.12 0.00 0 \N \N 0.08716536782213609212 0.00000000000000000000 0.00000000000000000000 180 590.12 0.08716536782213609212 \N \N \N 90 M 7219 24 78 jsmith 25 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 88 M 7220 24 78 jsmith 26 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 89 M 7221 24 78 jsmith 27 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 83 M 7222 24 78 jsmith 28 3 I 299 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 146 M 7223 24 78 jsmith 30 2 G 183 0.00 0.00 7050.00 6180.00 0.00 \N \N 0.32851449937186163808 0.42166081140367336161 0.00000000000000000000 172 -870.00 -0.16122068146314254317 0.00 \N \N \N M 7224 24 78 jsmith 31 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 133 M 7225 24 78 jsmith 32 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 94 M 7226 24 78 jsmith 33 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 102 M 7227 24 78 jsmith 34 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 129 M 7228 24 78 jsmith 35 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 155 M 7229 24 78 jsmith 36 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 104 M 7230 24 78 jsmith 37 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 107 M 7231 24 78 jsmith 38 3 I 301 \N \N 7050.00 6180.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 183 -870.00 1.00000000000000000000 \N \N \N 95 M 7232 24 78 jsmith 39 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 105 M 7233 24 78 jsmith 40 3 I 301 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 132 M 7234 24 78 jsmith 42 2 G 194 0.00 0.00 8310.12 8310.12 0.00 \N \N 0.38723332078299217530 0.56699869612652007699 0.00000000000000000000 172 0.00 0.00000000000000000000 0.00 \N \N \N M 7235 24 78 jsmith 43 3 I 302 \N \N 8310.12 8310.12 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 194 0.00 0.00000000000000000000 \N \N \N 99 M 7236 24 78 jsmith 46 1 G 188 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.000000000000000000000000 0.00000000000000000000 170 0.00 0.00000000000000000000 0.00 \N \N \N M 7237 24 78 jsmith 47 2 G 189 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 188 0.00 0.00000000000000000000 0.00 \N \N \N M 7238 24 78 jsmith 48 3 I 303 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 189 0.00 0.00000000000000000000 \N \N \N 111 M 7239 24 78 jsmith 50 2 G 190 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 188 0.00 0.00000000000000000000 0.00 \N \N \N M 7240 24 78 jsmith 53 1 G 191 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.000000000000000000000000 0.00000000000000000000 170 0.00 0.00000000000000000000 0.00 \N \N \N M 7241 24 78 jsmith 54 2 G 192 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 191 0.00 0.00000000000000000000 0.00 \N \N \N M 7242 24 78 jsmith 57 2 G 193 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 191 0.00 0.00000000000000000000 0.00 \N \N \N M 7243 24 78 jsmith 58 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 113 M 7244 24 78 jsmith 59 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 84 M 7245 24 78 jsmith 60 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 114 M 7246 24 78 jsmith 64 0 G 171 0.00 0.00 0.00 8143.91 0.00 \N \N 0.00000000000000000000 0.35718527524271674333 0.00000000000000000000 -1 -8143.91 0.50000000000000000000 0.00 \N \N \N M 7247 24 78 jsmith 65 1 I 291 \N \N 0.00 6272.00 0 \N \N 0.00000000000000000000 0.77014603550383046964 0.00000000000000000000 171 -6272.00 0.77014603550383046964 \N \N \N 109 M 7248 24 78 jsmith 66 1 I 291 \N \N 0.00 1871.91 0 \N \N 0.00000000000000000000 0.22985396449616953036 0.00000000000000000000 171 -1871.91 0.22985396449616953036 \N \N \N 126 M 7249 24 78 jsmith 67 1 I 291 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 171 0.00 0.00000000000000000000 \N \N \N 127 M 7250 24 78 jsmith 68 1 I 291 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 171 0.00 0.00000000000000000000 \N \N \N 143 M 7251 24 78 jsmith 5 3 T -1 \N \N -670.00 166.21 0.00 \N \N -0.03122052689065919114 0.01134049246980656140 0.00000000000000000000 173 -503.79 -0.09335789323484664578 \N \N Total Cash Flow From Operating Activities \N M 7252 24 78 jsmith 8 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 174 0.00 0.00000000000000000000 \N \N Total Charges Not Using Cash \N M 7253 24 78 jsmith 11 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 176 0.00 0.00000000000000000000 \N \N Total Changes in Current Assets \N M 7254 24 78 jsmith 14 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 179 0.00 0.00000000000000000000 \N \N Total Net Receivables \N M 7255 24 78 jsmith 29 3 T -1 \N \N 6770.12 0.00 0.00 \N \N 0.31547270673580537776 0.000000000000000000000000 0.00000000000000000000 180 6770.12 1.2545785746979892 \N \N Total Inventory \N M 7256 24 78 jsmith 41 3 T -1 \N \N 7050.00 6180.00 0.00 \N \N 0.32851449937186163808 0.42166081140367336161 0.00000000000000000000 183 -870.00 -0.16122068146314254317 \N \N Total Change in Current Liability \N M 7257 24 78 jsmith 44 3 T -1 \N \N 8310.12 8310.12 0.00 \N \N 0.38723332078299217530 0.56699869612652007699 0.00000000000000000000 194 0.00 0.00000000000000000000 \N \N Total Accounts Payable \N M 7258 24 78 jsmith 70 0 T -1 \N \N 7920.00 6512.42 0.00 \N \N \N \N \N \N 0.00 \N \N \N CHECKSUM (TOTAL STA. OF CASH FLOWS - TOTAL CASH) \N M 7259 24 78 jsmith 45 2 T -1 \N \N 7920.00 14656.33 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 172 -8143.91 1.00000000000000000000 \N \N Total Cash Flow From Operating Activities \N M 7260 24 78 jsmith 49 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 189 0.00 0.00000000000000000000 \N \N Total Property Plant and Equipment \N M 7261 24 78 jsmith 51 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 190 0.00 0.00000000000000000000 \N \N Total Other Assets \N M 7262 13 77 admin 25 3 I 282 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 89 M 7334 24 78 jsmith 52 2 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.000000000000000000000000 0.00000000000000000000 188 0.00 0.00000000000000000000 \N \N Total Cash Flow From Investing Activities \N M 7263 24 78 jsmith 56 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 192 0.00 0.00000000000000000000 \N \N Total Long Term Debt \N M 7264 24 78 jsmith 61 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N Total Common Stock and Equity \N M 7265 24 78 jsmith 62 2 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.000000000000000000000000 0.00000000000000000000 191 0.00 0.00000000000000000000 \N \N Total Cash Flow from Financing Activities \N M 7266 24 78 jsmith 63 1 T -1 \N \N 7920.00 14656.33 0.00 \N \N 1.00000000000000000000 0.64281472475728325667 0.00000000000000000000 170 -8143.91 0.50000000000000000000 \N \N TOTAL STATEMENT OF CASH FLOWS \N M 7267 24 78 jsmith 69 1 T -1 \N \N 0.00 8143.91 0.00 \N \N 0.00000000000000000000 0.35718527524271674333 0.00000000000000000000 171 -8143.91 0.50000000000000000000 \N \N TOTAL CASH POSITION \N M 7268 18 77 jsmith 2 0 G 132 0.00 4297800.63 0.00 0.00 0.00 \N \N \N \N \N -1 145513.60 \N 0.00 \N \N \N M 7269 18 77 jsmith 3 1 I 249 \N 3233748.69 \N \N 0 \N 0.75241942760848820481 \N \N 0.00000000000000000000 132 38978.34 \N \N \N \N 109 M 7270 18 77 jsmith 4 1 I 249 \N 6611.60 \N \N 0 \N 0.00153836824208385860 \N \N 0.00000000000000000000 132 -1500.10 \N \N \N \N 126 M 7271 18 77 jsmith 5 1 I 249 \N 601943.87 \N \N 0 \N 0.14005858387153710292 \N \N 0.00000000000000000000 132 70402.84 \N \N \N \N 127 M 7272 18 77 jsmith 6 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 106 M 7273 18 77 jsmith 7 1 I 249 \N 274843.14 \N \N 0 \N 0.06394971839352166506 \N \N 0.00000000000000000000 132 705.35 \N \N \N \N 85 M 7274 18 77 jsmith 8 1 I 249 \N 48623.70 \N \N 0 \N 0.01131362391745007492 \N \N 0.00000000000000000000 132 -9244.67 \N \N \N \N 138 M 7275 18 77 jsmith 9 1 I 249 \N 3844.72 \N \N 0 \N 0.00089457849048712155 \N \N 0.00000000000000000000 132 1257.56 \N \N \N \N 128 M 7276 18 77 jsmith 10 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 134 M 7277 18 77 jsmith 11 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 86 M 7278 18 77 jsmith 12 1 I 249 \N 12.82 \N \N 0 \N 0.000002982921057461895342 \N \N 0.00000000000000000000 132 12.82 \N \N \N \N 96 M 7279 18 77 jsmith 13 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 130 M 7280 18 77 jsmith 14 1 I 249 \N -100.00 \N \N 0 \N -0.000023267714956801055706 \N \N 0.00000000000000000000 132 -100.00 \N \N \N \N 100 M 7281 18 77 jsmith 15 1 I 249 \N -4606.07 \N \N 0 \N -0.00107172723831072639 \N \N 0.00000000000000000000 132 -1876.91 \N \N \N \N 87 M 7282 18 77 jsmith 16 1 I 249 \N 1134.60 \N \N 0 \N 0.00026399549389986478 \N \N 0.00000000000000000000 132 1134.60 \N \N \N \N 90 M 7283 18 77 jsmith 17 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 88 M 7284 18 77 jsmith 18 1 I 249 \N 145999.79 \N \N 0 \N 0.03397081497472813205 \N \N 0.00000000000000000000 132 60000.00 \N \N \N \N 111 M 7285 18 77 jsmith 19 1 I 249 \N -15000.00 \N \N 0 \N -0.00349015724352015836 \N \N 0.00000000000000000000 132 -15000.00 \N \N \N \N 156 M 7286 18 77 jsmith 20 1 I 249 \N -0.57 \N \N 0 \N -0.000000132625975253766018 \N \N 0.00000000000000000000 132 -0.57 \N \N \N \N 89 M 7287 18 77 jsmith 21 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 83 M 7288 18 77 jsmith 22 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 143 M 7289 18 77 jsmith 23 1 I 249 \N 744.34 \N \N 0 \N 0.00017319090950945298 \N \N 0.00000000000000000000 132 744.34 \N \N \N \N 146 M 7290 18 77 jsmith 25 0 G 133 0.00 4297800.63 0.00 0.00 0.00 \N \N \N \N \N -1 47456.53 \N 0.00 \N \N \N M 7291 18 77 jsmith 26 1 G 134 0.00 52451.98 0.00 0.00 0.00 \N 0.01220437719559829838 \N \N 0.00000000000000000000 133 37456.53 \N 0.00 \N \N \N M 7292 18 77 jsmith 27 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 99 M 7293 18 77 jsmith 28 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 133 M 7294 18 77 jsmith 29 2 I 250 \N 6965.64 \N \N 0 \N 0.13280032517361594357 \N \N 0.00000000000000000000 134 2431.00 \N \N \N \N 94 M 7295 18 77 jsmith 30 2 I 250 \N 4647.21 \N \N 0 \N 0.08859932456315281139 \N \N 0.00000000000000000000 134 17.75 \N \N \N \N 102 M 7296 18 77 jsmith 31 2 I 250 \N 7.78 \N \N 0 \N 0.00014832614517125950 \N \N 0.00000000000000000000 134 7.78 \N \N \N \N 129 M 7297 18 77 jsmith 32 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 155 M 7298 18 77 jsmith 33 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 104 M 7299 18 77 jsmith 34 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 107 M 7300 18 77 jsmith 35 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 95 M 7301 18 77 jsmith 36 2 I 250 \N 631.35 \N \N 0 \N 0.01203672387581936850 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 105 M 7302 18 77 jsmith 37 2 I 250 \N 200.00 \N \N 0 \N 0.00381301144399124685 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 132 M 7303 18 77 jsmith 38 2 I 250 \N 40000.00 \N \N 0 \N 0.76260228879824937019 \N \N 0.00000000000000000000 134 35000.00 \N \N \N \N 116 M 7304 18 77 jsmith 40 1 G 135 0.00 4245348.65 0.00 0.00 0.00 \N 0.98779562280440170162 \N \N 0.00000000000000000000 133 10000.00 \N 0.00 \N \N \N M 7305 18 77 jsmith 41 2 I 251 \N 1419999.99 \N \N 0 \N 0.33448371548942158143 \N \N 0.00000000000000000000 135 0.00 \N \N \N \N 113 M 7306 18 77 jsmith 42 2 I 251 \N 2243332.22 \N \N 0 \N 0.52842119810348203086 \N \N 0.00000000000000000000 135 0.00 \N \N \N \N 84 M 7307 18 77 jsmith 43 2 I 251 \N 110000.00 \N \N 0 \N 0.02591071053728414037 \N \N 0.00000000000000000000 135 10000.00 \N \N \N \N 114 M 7308 18 77 jsmith 44 2 G 136 \N 472016.44 \N \N 0.00 \N 0.11118437586981224734 \N \N 0.00000000000000000000 135 \N \N \N \N \N \N M 7309 18 77 jsmith 24 1 T -1 \N 4297800.63 \N \N 0.00 \N \N \N \N \N 132 \N \N \N \N Total Assets \N M 7310 18 77 jsmith 39 2 T -1 \N 52451.98 \N \N 0.00 \N 0.01220437719559829838 \N \N 0.00000000000000000000 134 \N \N \N \N Total Liabilities \N M 7311 18 77 jsmith 45 2 T -1 \N 4245348.65 \N \N 0.00 \N 0.98779562280440170162 \N \N 0.00000000000000000000 135 \N \N \N \N Total Owners Equity \N M 7312 18 77 jsmith 46 1 T -1 \N 4297800.63 \N \N 0.00 \N \N \N \N \N 133 \N \N \N \N Total Liabilities and Owners Equity \N M 7313 13 77 admin 1 0 G 60 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 8850.75 \N 8850.75 \N \N \N M 7314 13 77 admin 2 1 G 61 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 8850.75 \N 8850.75 \N \N \N M 7315 13 77 admin 3 2 G 62 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 5942.42 \N 5942.42 \N \N \N M 7316 13 77 admin 4 3 G 63 \N \N \N \N \N \N \N \N \N \N 62 5942.42 \N 5942.42 \N \N \N M 7317 13 77 admin 6 2 G 65 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7318 13 77 admin 7 3 I 119 \N \N \N \N 0 \N \N \N \N \N 65 0.00 \N 0.00 \N \N 112 M 7319 13 77 admin 9 2 G 66 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7320 13 77 admin 10 2 G 67 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7321 13 77 admin 12 2 G 68 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7322 13 77 admin 13 3 I 120 \N \N \N \N 0 \N \N \N \N \N 68 0.00 \N 0.00 \N \N 106 M 7323 13 77 admin 15 2 G 69 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 759.41 \N 759.41 \N \N \N M 7324 13 77 admin 16 3 I 121 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 85 M 7325 13 77 admin 17 3 I 256 \N \N \N \N 0 \N \N \N \N \N 69 1171.81 \N 1171.81 \N \N 128 M 7326 13 77 admin 18 3 I 122 \N \N \N \N 0 \N \N \N \N \N 69 -1547.00 \N -1547.00 \N \N 87 M 7327 13 77 admin 19 3 I 123 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 88 M 7328 13 77 admin 20 3 I 124 \N \N \N \N 0 \N \N \N \N \N 69 1134.60 \N 1134.60 \N \N 90 M 7329 13 77 admin 26 3 I 283 \N \N \N \N 0 \N \N \N \N \N 69 0.00 \N 0.00 \N \N 83 M 7335 13 77 admin 28 2 G 72 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7336 13 77 admin 29 3 I 125 \N \N \N \N 0 \N \N \N \N \N 72 0.00 \N 0.00 \N \N 100 M 7337 13 77 admin 31 2 G 70 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7338 13 77 admin 32 2 G 71 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 3662.46 \N 3662.46 \N \N \N M 7339 13 77 admin 33 3 I 126 \N \N \N \N 0 \N \N \N \N \N 71 1260.50 \N 1260.50 \N \N 99 M 7340 13 77 admin 34 3 I 127 \N \N \N \N 0 \N \N \N \N \N 71 2401.96 \N 2401.96 \N \N 94 M 7341 13 77 admin 35 3 I 129 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 104 M 7342 13 77 admin 36 3 I 130 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 105 M 7343 13 77 admin 37 3 I 131 \N \N \N \N 0 \N \N \N \N \N 71 0.00 \N 0.00 \N \N 95 M 7344 13 77 admin 38 3 I 240 \N \N \N \N 0 \N \N \N \N \N 71 0.00 0.00000000000000000000 0.00 \N \N 107 M 7345 13 77 admin 40 2 G 73 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7346 13 77 admin 42 2 G 74 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7347 13 77 admin 44 2 G 75 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 5.28 \N 5.28 \N \N \N M 7348 13 77 admin 45 3 I 132 \N \N \N \N 0 \N \N \N \N \N 75 -2.50 \N -2.50 \N \N 102 M 7349 13 77 admin 46 3 I 278 \N \N \N \N 0 \N \N \N \N \N 75 7.78 \N 7.78 \N \N 129 M 7350 13 77 admin 48 2 G 76 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7351 13 77 admin 49 3 I 284 \N \N \N \N 0 \N \N \N \N \N 76 0.00 \N 0.00 \N \N 133 M 7352 13 77 admin 50 3 I 285 \N \N \N \N 0 \N \N \N \N \N 76 0.00 \N 0.00 \N \N 132 M 7353 13 77 admin 52 2 G 77 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 61 0.00 \N 0.00 \N \N \N M 7354 13 77 admin 54 1 G 78 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 7355 13 77 admin 55 2 G 79 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 7356 13 77 admin 56 3 I 133 \N \N \N \N 0 \N \N \N \N \N 79 0.00 \N 0.00 \N \N 111 M 7357 13 77 admin 58 2 G 80 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 7358 13 77 admin 60 2 G 81 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 7359 13 77 admin 62 1 G 82 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 60 0.00 \N 0.00 \N \N \N M 7360 13 77 admin 63 2 G 83 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 7361 13 77 admin 64 3 I 139 \N \N \N \N 0 \N \N \N \N \N 83 0.00 \N 0.00 \N \N 116 M 7362 13 77 admin 66 2 G 84 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 7363 13 77 admin 67 3 I 134 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 113 M 7364 13 77 admin 68 3 I 135 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 114 M 7365 13 77 admin 69 3 I 136 \N \N \N \N 0 \N \N \N \N \N 84 0.00 \N 0.00 \N \N 84 M 7366 13 77 admin 71 2 G 85 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 7367 13 77 admin 74 0 G 86 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 -124023.87 \N -124023.87 \N \N \N M 7368 13 77 admin 75 1 I 108 \N \N \N \N 0 \N \N \N \N \N 86 55121.13 \N 55121.13 \N \N 109 M 7369 13 77 admin 76 1 I 244 \N \N \N \N 0 \N \N \N \N \N 86 -1500.10 \N -1500.10 \N \N 126 M 7370 13 77 admin 77 1 I 245 \N \N \N \N 0 \N \N \N \N \N 86 70402.84 \N 70402.84 \N \N 127 M 7371 13 77 admin 5 3 T -1 \N \N \N \N \N \N \N \N \N \N 62 5942.42 \N 5942.42 \N \N \N M 7372 13 77 admin 8 3 T -1 \N \N \N \N \N \N \N \N \N \N 65 0.00 \N 0.00 \N \N \N M 7373 13 77 admin 11 3 T -1 \N \N \N \N \N \N \N \N \N \N 67 0.00 \N 0.00 \N \N \N M 7374 13 77 admin 14 3 T -1 \N \N \N \N \N \N \N \N \N \N 68 0.00 \N 0.00 \N \N \N M 7375 13 77 admin 27 3 T -1 \N \N \N \N \N \N \N \N \N \N 69 759.41 \N 759.41 \N \N \N M 7376 13 77 admin 30 3 T -1 \N \N \N \N \N \N \N \N \N \N 72 0.00 \N 0.00 \N \N \N M 7377 13 77 admin 39 3 T -1 \N \N \N \N \N \N \N \N \N \N 71 3662.46 \N 3662.46 \N \N \N M 7378 13 77 admin 41 3 T -1 \N \N \N \N \N \N \N \N \N \N 73 0.00 \N 0.00 \N \N \N M 7379 13 77 admin 43 3 T -1 \N \N \N \N \N \N \N \N \N \N 74 0.00 \N 0.00 \N \N \N M 7380 13 77 admin 47 3 T -1 \N \N \N \N \N \N \N \N \N \N 75 5.28 \N 5.28 \N \N \N M 7381 13 77 admin 51 3 T -1 \N \N \N \N \N \N \N \N \N \N 76 0.00 \N 0.00 \N \N \N M 7382 13 77 admin 53 2 T -1 \N \N \N \N \N \N \N \N \N \N 61 8850.75 \N 8850.75 \N \N \N M 7383 13 77 admin 57 3 T -1 \N \N \N \N \N \N \N \N \N \N 79 0.00 \N 0.00 \N \N \N M 7384 13 77 admin 59 3 T -1 \N \N \N \N \N \N \N \N \N \N 80 0.00 \N 0.00 \N \N \N M 7385 13 77 admin 61 2 T -1 \N \N \N \N \N \N \N \N \N \N 78 0.00 \N 0.00 \N \N \N M 7386 13 77 admin 65 3 T -1 \N \N \N \N \N \N \N \N \N \N 83 0.00 \N 0.00 \N \N \N M 7387 13 77 admin 70 3 T -1 \N \N \N \N \N \N \N \N \N \N 84 0.00 \N 0.00 \N \N \N M 7388 13 77 admin 72 2 T -1 \N \N \N \N \N \N \N \N \N \N 82 0.00 \N 0.00 \N \N \N M 7389 13 77 admin 73 1 T -1 \N \N \N \N \N \N \N \N \N \N 60 8850.75 \N 8850.75 \N \N \N M 7390 13 77 admin 78 0 T -1 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N \N -115173.12 \N -115173.12 \N \N \N M 7391 25 76 admin 1 0 G 195 0.00 0.00 -186731.00 -13644.32 0.00 \N \N 2.6353590380490008 -0.40736998741255066627 0.00000000000000000000 -1 68737.00 0.50000000000000000000 0.00 \N \N \N M 7392 25 76 admin 2 1 G 196 0.00 0.00 -186731.00 -13644.32 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 195 68737.00 1.00000000000000000000 0.00 \N \N \N M 7393 25 76 admin 3 2 G 198 0.00 0.00 -25634.00 112212.00 0.00 \N \N -0.07818509560395653062 0.25054703618030312503 0.00000000000000000000 196 86578.00 0.71071201887920637459 0.00 \N \N \N M 7394 25 76 admin 4 3 G 199 \N \N -25634.00 112212.00 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 198 86578.00 1.00000000000000000000 \N \N \N \N M 7395 25 76 admin 6 2 G 197 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 196 0.00 0.000000000000000000000000 0.00 \N \N \N M 7396 25 76 admin 7 3 I 309 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 197 0.00 0.00000000000000000000 \N \N \N 112 M 7397 25 76 admin 9 2 G 200 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 196 0.00 0.000000000000000000000000 0.00 \N \N \N M 7398 25 76 admin 10 3 I 312 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 200 0.00 0.00000000000000000000 \N \N \N 134 M 7399 25 76 admin 11 3 I 312 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 200 0.00 0.00000000000000000000 \N \N \N 130 M 7400 25 76 admin 12 3 I 312 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 200 0.00 0.00000000000000000000 \N \N \N 100 M 7401 25 76 admin 14 2 G 201 0.00 0.00 115875.00 115875.00 0.00 \N \N 0.35342505863729667575 0.25872578527601882698 0.00000000000000000000 196 0.00 0.000000000000000000000000 0.00 \N \N \N M 7402 25 76 admin 15 3 I 313 \N \N 115875.00 115875.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 201 0.00 0.00000000000000000000 \N \N \N 106 M 7403 25 76 admin 17 2 G 202 0.00 0.00 141422.00 114881.16 0.00 \N \N 0.43134479950467115838 0.25650673859262104013 0.00000000000000000000 196 26540.84 0.21787167616657806504 0.00 \N \N \N M 7404 25 76 admin 46 1 G 205 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 195 0.00 0.000000000000000000000000 0.00 \N \N \N M 7405 25 76 admin 18 3 I 314 \N \N 25634.00 25634.00 0 \N \N 0.18125892718247514531 0.22313493352608904715 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 85 M 7406 25 76 admin 19 3 I 314 \N \N 56310.00 27040.00 0 \N \N 0.39817001598054050996 0.23537366788427275630 0.00000000000000000000 202 29270.00 1.10282869720777488580 \N \N \N 138 M 7407 25 76 admin 20 3 I 314 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 128 M 7408 25 76 admin 21 3 I 314 \N \N 33844.00 33844.00 0 \N \N 0.23931212965450919942 0.29460008934450174424 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 86 M 7409 25 76 admin 22 3 I 314 \N \N 25634.00 25634.00 0 \N \N 0.18125892718247514531 0.22313493352608904715 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 96 M 7410 25 76 admin 23 3 I 314 \N \N 0.00 2729.16 0 \N \N 0.000000000000000000000000 0.02375637571904740516 0.00000000000000000000 202 -2729.16 -0.10282869720777488580 \N \N \N 87 M 7411 25 76 admin 24 3 I 314 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 90 M 7412 25 76 admin 25 3 I 314 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 88 M 7413 25 76 admin 26 3 I 314 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 89 M 7414 25 76 admin 27 3 I 314 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 83 M 7415 25 76 admin 28 3 I 314 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 202 0.00 0.000000000000000000000000 \N \N \N 146 M 7416 25 76 admin 30 2 G 203 0.00 0.00 48100.00 56799.84 0.00 \N \N 0.14670761873099434825 0.12682272455277001259 0.00000000000000000000 196 8699.84 0.07141630495421556037 0.00 \N \N \N M 7417 25 76 admin 31 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 133 M 7418 25 76 admin 32 3 I 315 \N \N 0.00 4074.84 0 \N \N 0.000000000000000000000000 0.07174034293054346632 0.00000000000000000000 203 4074.84 0.46838102769706109538 \N \N \N 94 M 7419 25 76 admin 33 3 I 315 \N \N 0.00 4625.00 0 \N \N 0.000000000000000000000000 0.08142628570784706436 0.00000000000000000000 203 4625.00 0.53161897230293890462 \N \N \N 102 M 7420 25 76 admin 34 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 129 M 7421 25 76 admin 35 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 155 M 7422 25 76 admin 36 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 104 M 7423 25 76 admin 37 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 107 M 7424 25 76 admin 38 3 I 315 \N \N 48100.00 48100.00 0 \N \N 1.00000000000000000000 0.84683337136160946932 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 95 M 7425 25 76 admin 39 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 105 M 7426 25 76 admin 40 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 132 M 7427 25 76 admin 42 2 G 204 0.00 0.00 48100.00 48100.00 0.00 \N \N 0.14670761873099434825 0.10739771539828699528 0.00000000000000000000 196 0.00 0.000000000000000000000000 0.00 \N \N \N M 7428 25 76 admin 43 3 I 316 \N \N 48100.00 48100.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 204 0.00 0.00000000000000000000 \N \N \N 99 M 7429 25 76 admin 47 2 G 206 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 205 0.00 0.00000000000000000000 0.00 \N \N \N M 7430 25 76 admin 48 3 I 317 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 206 0.00 0.00000000000000000000 \N \N \N 111 M 7431 25 76 admin 50 2 G 207 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 205 0.00 0.00000000000000000000 0.00 \N \N \N M 7432 25 76 admin 53 1 G 208 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 195 0.00 0.000000000000000000000000 0.00 \N \N \N M 7433 25 76 admin 54 2 G 209 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 208 0.00 0.00000000000000000000 0.00 \N \N \N M 7434 25 76 admin 55 3 I 318 \N \N 0.00 0.00 0 \N \N \N \N \N 209 0.00 \N \N \N \N 116 M 7435 25 76 admin 57 2 G 210 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 208 0.00 0.00000000000000000000 0.00 \N \N \N M 7436 25 76 admin 58 3 I 319 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 210 0.00 0.00000000000000000000 \N \N \N 113 M 7437 25 76 admin 59 3 I 319 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 210 0.00 0.00000000000000000000 \N \N \N 84 M 7438 25 76 admin 60 3 I 319 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 210 0.00 0.00000000000000000000 \N \N \N 114 M 7439 25 76 admin 64 0 G 211 0.00 0.00 115875.00 47138.00 0.00 \N \N -1.6353590380490008 1.4073699874125507 0.00000000000000000000 -1 68737.00 0.50000000000000000000 0.00 \N \N \N M 7440 25 76 admin 65 1 I 320 \N \N 115875.00 47138.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 211 68737.00 1.00000000000000000000 \N \N \N 109 M 7441 25 76 admin 66 1 I 320 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 211 0.00 0.000000000000000000000000 \N \N \N 126 M 7442 25 76 admin 67 1 I 320 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 211 0.00 0.000000000000000000000000 \N \N \N 127 M 7443 25 76 admin 68 1 I 320 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 211 0.00 0.000000000000000000000000 \N \N \N 143 M 7444 25 76 admin 5 3 T -1 \N \N -25634.00 112212.00 0.00 \N \N -0.07818509560395653062 0.25054703618030312503 0.00000000000000000000 198 86578.00 0.71071201887920637459 \N \N Total Cash Flow From Operating Activities \N M 7445 25 76 admin 8 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 197 0.00 0.000000000000000000000000 \N \N Total Charges Not Using Cash \N M 7446 25 76 admin 13 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 200 0.00 0.000000000000000000000000 \N \N Total Changes in Current Assets \N M 7447 25 76 admin 16 3 T -1 \N \N 115875.00 115875.00 0.00 \N \N 0.35342505863729667575 0.25872578527601882698 0.00000000000000000000 201 0.00 0.000000000000000000000000 \N \N Total Net Receivables \N M 7448 25 76 admin 29 3 T -1 \N \N 141422.00 114881.16 0.00 \N \N 0.43134479950467115838 0.25650673859262104013 0.00000000000000000000 202 26540.84 0.21787167616657806504 \N \N Total Inventory \N M 7449 25 76 admin 41 3 T -1 \N \N 48100.00 56799.84 0.00 \N \N 0.14670761873099434825 0.12682272455277001259 0.00000000000000000000 203 8699.84 0.07141630495421556037 \N \N Total Change in Current Liability \N M 7450 25 76 admin 44 3 T -1 \N \N 48100.00 48100.00 0.00 \N \N 0.14670761873099434825 0.10739771539828699528 0.00000000000000000000 204 0.00 0.000000000000000000000000 \N \N Total Accounts Payable \N M 7451 25 76 admin 45 2 T -1 \N \N -186731.00 -13644.32 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 196 68737.00 1.00000000000000000000 \N \N Total Cash Flow From Operating Activities \N M 7452 25 76 admin 49 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 206 0.00 0.00000000000000000000 \N \N Total Property Plant and Equipment \N M 7453 25 76 admin 51 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 207 0.00 0.00000000000000000000 \N \N Total Other Assets \N M 7454 25 76 admin 52 2 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 205 0.00 0.000000000000000000000000 \N \N Total Cash Flow From Investing Activities \N M 7455 25 76 admin 56 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 209 0.00 0.00000000000000000000 \N \N Total Long Term Debt \N M 7456 25 76 admin 61 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 210 0.00 0.00000000000000000000 \N \N Total Common Stock and Equity \N M 7457 25 76 admin 62 2 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 208 0.00 0.000000000000000000000000 \N \N Total Cash Flow from Financing Activities \N M 7458 25 76 admin 63 1 T -1 \N \N -186731.00 -13644.32 0.00 \N \N 2.6353590380490008 -0.40736998741255066627 0.00000000000000000000 195 68737.00 0.50000000000000000000 \N \N TOTAL STATEMENT OF CASH FLOWS \N M 7459 25 76 admin 69 1 T -1 \N \N 115875.00 47138.00 0.00 \N \N -1.6353590380490008 1.4073699874125507 0.00000000000000000000 211 68737.00 0.50000000000000000000 \N \N TOTAL CASH POSITION \N M 7460 25 76 admin 70 0 T -1 \N \N -302606.00 -60782.32 0.00 \N \N \N \N \N \N 0.00 \N \N \N CHECKSUM (TOTAL STA. OF CASH FLOWS - TOTAL CASH) \N M 7461 25 77 admin 1 0 G 195 0.00 0.00 -230801.18 10427.90 0.00 \N \N -8.7786976937018491 0.06532173675551188760 0.00000000000000000000 -1 107881.08 0.50000000000000000000 0.00 \N \N \N M 7462 25 77 admin 2 1 G 196 0.00 0.00 -170801.18 -34572.10 0.00 \N \N 1.5415104784985142 -3.3153463305171703 0.00000000000000000000 195 122881.08 0.53923335803042534290 0.00 \N \N \N M 7463 25 77 admin 3 2 G 198 0.00 0.00 -8792.04 147347.99 0.00 \N \N -0.02276080117034305953 0.27426645333589058259 0.00000000000000000000 196 98057.07 0.90670908951703491535 0.00 \N \N \N M 7464 25 77 admin 4 3 G 199 \N \N -8792.04 147347.99 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 198 98057.07 1.00000000000000000000 \N \N \N \N M 7465 25 77 admin 6 2 G 197 0.00 0.00 15000.00 0.00 0.00 \N \N 0.03883194543645682833 0.000000000000000000000000 0.00000000000000000000 196 15000.00 0.13870123126007664445 0.00 \N \N \N M 7466 25 77 admin 7 3 I 309 \N \N 15000.00 0.00 0 \N \N 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 197 15000.00 1.00000000000000000000 \N \N \N 112 M 7467 25 77 admin 9 2 G 200 0.00 0.00 4035.71 4135.71 0.00 \N \N 0.01044763136782421244 0.00769801144709049673 0.00000000000000000000 196 -100.00 -0.00092467487506717763 0.00 \N \N \N M 7468 25 77 admin 10 3 I 312 \N \N 3214.16 3214.16 0 \N \N 0.79642987231490865300 0.77717248066232883834 0.00000000000000000000 200 0.00 0.00000000000000000000 \N \N \N 134 M 7469 25 77 admin 11 3 I 312 \N \N 821.55 821.55 0 \N \N 0.20357012768509134700 0.19864787424650180985 0.00000000000000000000 200 0.00 0.00000000000000000000 \N \N \N 130 M 7470 25 77 admin 12 3 I 312 \N \N 0.00 100.00 0 \N \N 0.00000000000000000000 0.02417964509116935182 0.00000000000000000000 200 -100.00 1.00000000000000000000 \N \N \N 100 M 7471 25 77 admin 14 2 G 201 0.00 0.00 208740.93 208740.93 0.00 \N \N 0.54038776027435028330 0.38854031559667290058 0.00000000000000000000 196 0.00 0.000000000000000000000000 0.00 \N \N \N M 7472 25 77 admin 15 3 I 313 \N \N 208740.93 208740.93 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 201 0.00 0.00000000000000000000 \N \N \N 106 M 7473 25 77 admin 17 2 G 202 0.00 0.00 65763.90 73031.38 0.00 \N \N 0.17024934509924021416 0.13593709405079562182 0.00000000000000000000 196 -7267.48 -0.06720056161053212080 0.00 \N \N \N M 7474 25 77 admin 18 3 I 314 \N \N 17390.17 16684.82 0 \N \N 0.26443337454135171424 0.22846097116061616253 0.00000000000000000000 202 705.35 -0.09705565065194537859 \N \N \N 85 M 7475 25 77 admin 19 3 I 314 \N \N 6930.20 16174.87 0 \N \N 0.10538000331488856348 0.22147835629013172146 0.00000000000000000000 202 -9244.67 1.2720599162295596 \N \N \N 138 M 7476 25 77 admin 20 3 I 314 \N \N 2139.11 881.55 0 \N \N 0.03252711594050839442 0.01207083859020601829 0.00000000000000000000 202 1257.56 -0.17303934788950227589 \N \N \N 128 M 7477 25 77 admin 21 3 I 314 \N \N 20472.37 20472.37 0 \N \N 0.31130103293752347412 0.28032292420052859469 0.00000000000000000000 202 0.00 0.00000000000000000000 \N \N \N 86 M 7478 25 77 admin 22 3 I 314 \N \N 16845.38 16832.56 0 \N \N 0.25614934637392247114 0.23048393717878533858 0.00000000000000000000 202 12.82 -0.00176402274240864784 \N \N \N 96 M 7479 25 77 admin 23 3 I 314 \N \N 0.00 1876.91 0 \N \N 0.000000000000000000000000 0.02570004839015776506 0.00000000000000000000 202 -1876.91 0.25826146064385454105 \N \N \N 87 M 7480 25 77 admin 24 3 I 314 \N \N 1134.60 0.00 0 \N \N 0.01725262644095012613 0.000000000000000000000000 0.00000000000000000000 202 1134.60 -0.15612014068150170348 \N \N \N 90 M 7481 25 77 admin 25 3 I 314 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 202 0.00 0.00000000000000000000 \N \N \N 88 M 7482 25 77 admin 26 3 I 314 \N \N 25.63 26.20 0 \N \N 0.00038972749487180657 0.00035874989627746319 0.00000000000000000000 202 -0.57 0.000078431588391024123905 \N \N \N 89 M 7483 25 77 admin 27 3 I 314 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 202 0.00 0.00000000000000000000 \N \N \N 83 M 7484 25 77 admin 28 3 I 314 \N \N 826.44 82.10 0 \N \N 0.01256677295598344989 0.00112417429329693619 0.00000000000000000000 202 744.34 -0.10242064649644718665 \N \N \N 146 M 7485 25 77 admin 30 2 G 203 0.00 0.00 37185.90 39642.43 0.00 \N \N 0.09626672265370266483 0.07378851029943678844 0.00000000000000000000 196 2456.53 0.02271491570848773863 0.00 \N \N \N M 7486 25 77 admin 31 3 I 315 \N \N 10075.00 10075.00 0 \N \N 0.27093602682737274074 0.25414688251956300358 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 133 M 7487 25 77 admin 32 3 I 315 \N \N 0.00 2431.00 0 \N \N 0.000000000000000000000000 0.06132318326601068603 0.00000000000000000000 203 2431.00 0.98960729158609909099 \N \N \N 94 M 7488 25 77 admin 33 3 I 315 \N \N 2.50 20.25 0 \N \N 0.000067229783331854278100 0.00051081631474155343 0.00000000000000000000 203 17.75 0.00722563941820372639 \N \N \N 102 M 7489 25 77 admin 34 3 I 315 \N \N 0.00 7.78 0 \N \N 0.000000000000000000000000 0.00019625436684885361 0.00000000000000000000 203 7.78 0.00316706899569718261 \N \N \N 129 M 7490 25 77 admin 35 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 155 M 7491 25 77 admin 36 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 104 M 7492 25 77 admin 37 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 107 M 7493 25 77 admin 38 3 I 315 \N \N 27108.40 27108.40 0 \N \N 0.72899674338929540498 0.68382286353283590335 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 95 M 7494 25 77 admin 39 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 105 M 7495 25 77 admin 40 3 I 315 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 203 0.00 0.00000000000000000000 \N \N \N 132 M 7496 25 77 admin 42 2 G 204 0.00 0.00 64345.50 64345.50 0.00 \N \N 0.16657739633876885647 0.11976961527011360984 0.00000000000000000000 196 0.00 0.000000000000000000000000 0.00 \N \N \N M 7497 25 77 admin 43 3 I 316 \N \N 64345.50 64345.50 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 204 0.00 0.00000000000000000000 \N \N \N 99 M 7498 25 77 admin 46 1 G 205 0.00 0.00 60000.00 0.00 0.00 \N \N -0.54151047849851418550 0.000000000000000000000000 0.00000000000000000000 195 60000.00 0.26329522398261408977 0.00 \N \N \N M 7499 25 77 admin 47 2 G 206 0.00 0.00 60000.00 0.00 0.00 \N \N 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 205 60000.00 1.00000000000000000000 0.00 \N \N \N M 7500 25 77 admin 48 3 I 317 \N \N 60000.00 0.00 0 \N \N 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 206 60000.00 1.00000000000000000000 \N \N \N 111 M 7501 25 77 admin 50 2 G 207 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 205 0.00 0.000000000000000000000000 0.00 \N \N \N M 7502 25 77 admin 53 1 G 208 0.00 0.00 0.00 45000.00 0.00 \N \N 0.000000000000000000000000 4.3153463305171703 0.00000000000000000000 195 45000.00 0.19747141798696056733 0.00 \N \N \N M 7503 25 77 admin 54 2 G 209 0.00 0.00 0.00 35000.00 0.00 \N \N 0.00000000000000000000 0.77777777777777777778 0.00000000000000000000 208 35000.00 0.77777777777777777778 0.00 \N \N \N M 7504 25 77 admin 55 3 I 318 \N \N 0.00 35000.00 0 \N \N \N \N \N 209 35000.00 \N \N \N \N 116 M 7505 25 77 admin 57 2 G 210 0.00 0.00 0.00 10000.00 0.00 \N \N 0.00000000000000000000 0.22222222222222222222 0.00000000000000000000 208 10000.00 0.22222222222222222222 0.00 \N \N \N M 7506 25 77 admin 58 3 I 319 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.000000000000000000000000 0.00000000000000000000 210 0.00 0.000000000000000000000000 \N \N \N 113 M 7507 25 77 admin 59 3 I 319 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.000000000000000000000000 0.00000000000000000000 210 0.00 0.000000000000000000000000 \N \N \N 84 M 7508 25 77 admin 60 3 I 319 \N \N 0.00 10000.00 0 \N \N 0.00000000000000000000 1.00000000000000000000 0.00000000000000000000 210 10000.00 1.00000000000000000000 \N \N \N 114 M 7509 25 77 admin 64 0 G 211 0.00 0.00 257092.23 149211.15 0.00 \N \N 9.7786976937018491 0.93467826324448811240 0.00000000000000000000 -1 107881.08 0.50000000000000000000 0.00 \N \N \N M 7510 25 77 admin 65 1 I 320 \N \N 114588.88 75610.54 0 \N \N 0.44571117532412395349 0.50673518701517949563 0.00000000000000000000 211 38978.34 0.36130839624519888010 \N \N \N 109 M 7511 25 77 admin 66 1 I 320 \N \N 0.00 1500.10 0 \N \N 0.000000000000000000000000 0.01005353822418766962 0.00000000000000000000 211 -1500.10 -0.01390512590344850089 \N \N \N 126 M 7512 25 77 admin 67 1 I 320 \N \N 140805.68 70402.84 0 \N \N 0.54768547458629924366 0.47183363977826053884 0.00000000000000000000 211 70402.84 0.65259672965824962079 \N \N \N 127 M 7513 25 77 admin 68 1 I 320 \N \N 1697.67 1697.67 0 \N \N 0.00660335008957680285 0.01137763498237229590 0.00000000000000000000 211 0.00 0.000000000000000000000000 \N \N \N 143 M 7514 25 77 admin 5 3 T -1 \N \N -8792.04 147347.99 0.00 \N \N -0.02276080117034305953 0.27426645333589058259 0.00000000000000000000 198 98057.07 0.90670908951703491535 \N \N Total Cash Flow From Operating Activities \N M 7515 25 77 admin 8 3 T -1 \N \N 15000.00 0.00 0.00 \N \N 0.03883194543645682833 0.000000000000000000000000 0.00000000000000000000 197 15000.00 0.13870123126007664445 \N \N Total Charges Not Using Cash \N M 7516 19 80 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -119.00 -0.00012991909588536943 \N \N \N 123 Y 7582 25 77 admin 13 3 T -1 \N \N 4035.71 4135.71 0.00 \N \N 0.01044763136782421244 0.00769801144709049673 0.00000000000000000000 200 -100.00 -0.00092467487506717763 \N \N Total Changes in Current Assets \N M 7517 25 77 admin 16 3 T -1 \N \N 208740.93 208740.93 0.00 \N \N 0.54038776027435028330 0.38854031559667290058 0.00000000000000000000 201 0.00 0.000000000000000000000000 \N \N Total Net Receivables \N M 7518 25 77 admin 29 3 T -1 \N \N 65763.90 73031.38 0.00 \N \N 0.17024934509924021416 0.13593709405079562182 0.00000000000000000000 202 -7267.48 -0.06720056161053212080 \N \N Total Inventory \N M 7519 25 77 admin 41 3 T -1 \N \N 37185.90 39642.43 0.00 \N \N 0.09626672265370266483 0.07378851029943678844 0.00000000000000000000 203 2456.53 0.02271491570848773863 \N \N Total Change in Current Liability \N M 7520 25 77 admin 44 3 T -1 \N \N 64345.50 64345.50 0.00 \N \N 0.16657739633876885647 0.11976961527011360984 0.00000000000000000000 204 0.00 0.000000000000000000000000 \N \N Total Accounts Payable \N M 7521 25 77 admin 45 2 T -1 \N \N -170801.18 -34572.10 0.00 \N \N 1.5415104784985142 -3.3153463305171703 0.00000000000000000000 196 122881.08 0.53923335803042534290 \N \N Total Cash Flow From Operating Activities \N M 7522 25 77 admin 49 3 T -1 \N \N 60000.00 0.00 0.00 \N \N 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 206 60000.00 1.00000000000000000000 \N \N Total Property Plant and Equipment \N M 7523 25 77 admin 51 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 207 0.00 0.000000000000000000000000 \N \N Total Other Assets \N M 7524 25 77 admin 52 2 T -1 \N \N 60000.00 0.00 0.00 \N \N -0.54151047849851418550 0.000000000000000000000000 0.00000000000000000000 205 60000.00 0.26329522398261408977 \N \N Total Cash Flow From Investing Activities \N M 7525 25 77 admin 56 3 T -1 \N \N 0.00 35000.00 0.00 \N \N 0.00000000000000000000 0.77777777777777777778 0.00000000000000000000 209 35000.00 0.77777777777777777778 \N \N Total Long Term Debt \N M 7526 25 77 admin 61 3 T -1 \N \N 0.00 10000.00 0.00 \N \N 0.00000000000000000000 0.22222222222222222222 0.00000000000000000000 210 10000.00 0.22222222222222222222 \N \N Total Common Stock and Equity \N M 7527 25 77 admin 62 2 T -1 \N \N 0.00 45000.00 0.00 \N \N 0.000000000000000000000000 4.3153463305171703 0.00000000000000000000 208 45000.00 0.19747141798696056733 \N \N Total Cash Flow from Financing Activities \N M 7528 25 77 admin 63 1 T -1 \N \N -230801.18 10427.90 0.00 \N \N -8.7786976937018491 0.06532173675551188760 0.00000000000000000000 195 107881.08 0.50000000000000000000 \N \N TOTAL STATEMENT OF CASH FLOWS \N M 7529 25 77 admin 69 1 T -1 \N \N 257092.23 149211.15 0.00 \N \N 9.7786976937018491 0.93467826324448811240 0.00000000000000000000 211 107881.08 0.50000000000000000000 \N \N TOTAL CASH POSITION \N M 7530 25 77 admin 70 0 T -1 \N \N -487893.41 -138783.25 0.00 \N \N \N \N \N \N 0.00 \N \N \N CHECKSUM (TOTAL STA. OF CASH FLOWS - TOTAL CASH) \N M 7531 19 68 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 623408.94 \N 0.00 \N \N \N Y 7532 19 68 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 1103772.68 \N 0.00 \N \N \N Y 7533 19 68 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 1074199.98 0.97320761735106543858 \N \N \N 103 Y 7534 19 68 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 141 Y 7535 19 68 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 25000.00 0.02264959121836572364 \N \N \N 140 Y 7536 19 68 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 Y 7537 19 68 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 1559.60 0.00141297209856652730 \N \N \N 122 Y 7538 19 68 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 Y 7539 19 68 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -253.35 -0.00022953095740691824 \N \N \N 123 Y 7540 19 68 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 3266.45 0.00295935028940922872 \N \N \N 101 Y 7541 19 68 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 Y 7542 19 68 admin 13 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 142 Y 7543 19 68 admin 14 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 144 Y 7544 19 68 admin 15 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 147 Y 7545 19 68 admin 16 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 154 Y 7546 19 68 admin 18 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 480363.74 \N 0.00 \N \N \N Y 7547 19 68 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 477791.64 0.99464551591675091879 \N \N \N 108 Y 7548 19 68 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 Y 7549 19 68 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 Y 7550 19 68 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 Y 7551 19 68 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 Y 7552 19 68 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 Y 7553 19 68 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 22.85 0.000047568119941775788489 \N \N \N 120 Y 7554 19 68 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 2259.60 0.00470393539695564865 \N \N \N 139 Y 7555 19 68 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 Y 7556 19 68 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 Y 7557 19 68 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 Y 7558 19 68 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -603.54 -0.00125642289320172251 \N \N \N 91 Y 7559 19 68 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 890.94 0.00185471950901206656 \N \N \N 92 Y 7560 19 68 admin 32 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 2.25 0.000004683950541312714403 \N \N \N 93 Y 7561 19 68 admin 33 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 Y 7562 19 68 admin 34 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 Y 7563 19 68 admin 35 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 Y 7564 19 68 admin 36 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 148 Y 7565 19 68 admin 37 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 152 Y 7566 19 68 admin 38 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 153 Y 7567 19 68 admin 39 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 150 Y 7568 19 68 admin 40 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 149 Y 7569 19 68 admin 41 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 145 Y 7570 19 68 admin 17 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 1103772.68 \N \N \N Total Net Revenue \N Y 7571 19 68 admin 42 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 480363.74 \N \N \N Total Net Expenses \N Y 7572 19 68 admin 43 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 623408.94 \N \N \N Net Income \N Y 7573 19 80 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 548669.53 \N 0.00 \N \N \N Y 7574 19 80 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 915954.65 \N 0.00 \N \N \N Y 7575 19 80 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 670505.09 0.73202869814569968066 \N \N \N 103 Y 7576 19 80 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 135368.43 0.14778944568925983399 \N \N \N 141 Y 7577 19 80 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 55000.00 0.06004664095542284763 \N \N \N 140 Y 7578 19 80 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 Y 7579 19 80 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 51380.00 0.05609448022344774384 \N \N \N 122 Y 7580 19 80 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 Y 7581 19 80 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 3226.67 0.00352273990857516800 \N \N \N 101 Y 7583 19 80 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 Y 7584 19 80 admin 13 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 593.46 0.00064791417348009533 \N \N \N 142 Y 7585 19 80 admin 14 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 144 Y 7586 19 80 admin 15 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 147 Y 7587 19 80 admin 16 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 154 Y 7588 19 80 admin 18 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 367285.12 \N 0.00 \N \N \N Y 7589 19 80 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 347777.22 0.94688622288863757944 \N \N \N 108 Y 7590 19 80 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 Y 7591 19 80 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 Y 7592 19 80 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 Y 7593 19 80 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 799.00 0.00217542164517854685 \N \N \N 131 Y 7594 19 80 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 Y 7595 19 80 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 1500.00 0.00408402061047286642 \N \N \N 120 Y 7596 19 80 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 1570.00 0.00427460823896160019 \N \N \N 139 Y 7597 19 80 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 15000.00 0.04084020610472866421 \N \N \N 112 Y 7598 19 80 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 Y 7599 19 80 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 Y 7600 19 80 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -66.94 -0.00018225622644336912 \N \N \N 91 Y 7601 19 80 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 26.20 0.000071334226662926066812 \N \N \N 92 Y 7602 19 80 admin 32 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 10.39 0.000028288649428542054739 \N \N \N 93 Y 7603 19 80 admin 33 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 500.00 0.00136134020349095547 \N \N \N 125 Y 7604 19 80 admin 34 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 Y 7605 19 80 admin 35 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.01 0.000000027226804069819109 \N \N \N 118 Y 7606 19 80 admin 36 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 135.93 0.00037009394772105116 \N \N \N 148 Y 7607 19 80 admin 37 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 152 Y 7608 19 80 admin 38 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 153 Y 7609 19 80 admin 39 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 33.32 0.000090719711160637272754 \N \N \N 150 Y 7610 19 80 admin 40 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 149 Y 7611 19 80 admin 41 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 -0.01 -0.000000027226804069819109 \N \N \N 145 Y 7612 19 80 admin 17 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 915954.65 \N \N \N Total Net Revenue \N Y 7613 19 80 admin 42 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 367285.12 \N \N \N Total Net Expenses \N Y 7614 19 80 admin 43 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 548669.53 \N \N \N Net Income \N Y 7615 19 92 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N Y 7616 19 92 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N Y 7617 19 92 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 103 Y 7618 19 92 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 141 Y 7619 19 92 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 140 Y 7620 19 92 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 121 Y 7621 19 92 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 122 Y 7622 19 92 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 135 Y 7623 19 92 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 123 Y 7624 19 92 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 101 Y 7625 19 92 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 115 Y 7626 19 92 admin 13 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 142 Y 7627 19 92 admin 14 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 144 Y 7628 19 92 admin 15 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 147 Y 7629 19 92 admin 16 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.00000000000000000000 \N \N \N 154 Y 7630 19 92 admin 18 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 0.00 \N 0.00 \N \N \N Y 7631 19 92 admin 19 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 108 Y 7632 19 92 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 136 Y 7633 19 92 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 137 Y 7634 19 92 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 97 Y 7635 19 92 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 131 Y 7636 19 92 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 119 Y 7637 19 92 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 120 Y 7638 19 92 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 139 Y 7639 19 92 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 112 Y 7640 19 92 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 98 Y 7641 19 92 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 110 Y 7642 19 92 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 91 Y 7643 19 92 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 92 Y 7644 19 92 admin 32 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 93 Y 7645 19 92 admin 33 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 125 Y 7646 19 92 admin 34 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 117 Y 7647 19 92 admin 35 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 118 Y 7648 19 92 admin 36 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 148 Y 7649 19 92 admin 37 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 152 Y 7650 19 92 admin 38 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 153 Y 7651 19 92 admin 39 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 150 Y 7652 19 92 admin 40 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 149 Y 7653 19 92 admin 41 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.00000000000000000000 \N \N \N 145 Y 7654 19 92 admin 17 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 0.00 \N \N \N Total Net Revenue \N Y 7655 19 92 admin 42 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 0.00 \N \N \N Total Net Expenses \N Y 7656 19 92 admin 43 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 0.00 \N \N \N Net Income \N Y 7657 20 92 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 42770.05 0.66033683778227745694 0.00 \N \N \N M 7658 20 92 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 64770.05 1.00000000000000000000 0.00 \N \N \N M 7659 20 92 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 49500.00 0.76424211498987572188 \N \N \N 103 M 7660 20 92 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 141 M 7661 20 92 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 15270.05 0.23575788501012427812 \N \N \N 140 M 7662 20 92 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 7663 20 92 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 115 M 7664 20 92 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 142 M 7665 20 92 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 7666 20 92 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 7667 20 92 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.000000000000000000000000 0.00 \N \N \N M 7668 20 92 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 7669 20 92 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 122 M 7670 20 92 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 7671 20 92 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 157 M 7672 20 92 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 M 7673 20 92 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 7674 20 92 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 22000.00 0.33966316221772254306 0.00 \N \N \N M 7675 20 92 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 22000.00 0.33966316221772254306 \N \N \N 108 M 7676 20 92 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 7677 20 92 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 7678 20 92 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 148 M 7679 20 92 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 7680 20 92 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 7681 20 92 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 956.05 0.01476068028355698351 0.00 \N \N \N M 7682 20 92 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 7683 20 92 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 7684 20 92 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 7685 20 92 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 7686 20 92 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 500.00 0.00771961732313005780 \N \N \N 139 M 7687 20 92 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 158 M 7688 20 92 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 160 M 7689 20 92 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 456.05 0.00704106296042692572 \N \N \N 159 M 7690 20 92 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 7691 20 92 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 7692 20 92 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 7693 20 92 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 7694 20 92 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 7695 20 92 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 7696 20 92 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 7697 20 92 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 7698 20 92 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 7699 20 92 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 7700 20 92 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 145 M 7701 20 92 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 7702 20 92 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 64770.05 1.00000000000000000000 \N \N Total Sales \N M 7703 20 92 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N Total Other Revenue \N M 7704 20 92 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 22000.00 0.33966316221772254306 \N \N Total Cost Of Sales \N M 7705 20 92 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 42770.05 0.66033683778227745694 \N \N GROSS PROFIT \N M 7706 20 92 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 956.05 0.01476068028355698351 \N \N Total Expenses \N M 7707 20 92 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 41814.00 \N \N \N NET INCOME \N M 7708 19 83 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 33751.20 \N 0.00 \N \N \N M 7709 19 83 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 59352.42 \N 0.00 \N \N \N M 7710 19 83 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 58799.00 0.99067569612157347586 \N \N \N 103 M 7711 19 83 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 141 M 7712 19 83 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 140 M 7713 19 83 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 7714 19 83 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 1758.75 0.02963232164754191994 \N \N \N 122 M 7715 19 83 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 7716 19 83 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 7717 19 83 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1211.15 -0.02040607611281898868 \N \N \N 157 M 7718 19 83 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 5.82 0.000098058343703592877932 \N \N \N 101 M 7719 19 83 admin 13 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 7720 19 83 admin 14 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 142 M 7721 19 83 admin 15 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 144 M 7722 19 83 admin 16 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 147 M 7723 19 83 admin 17 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 154 M 7724 19 83 admin 19 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 25601.22 \N 0.00 \N \N \N M 7725 19 83 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 24576.22 0.95996284552064315685 \N \N \N 108 M 7726 19 83 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 7727 19 83 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 7728 19 83 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 7729 19 83 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 7730 19 83 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 7731 19 83 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 700.00 0.02734244696151199044 \N \N \N 120 M 7732 19 83 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 325.00 0.01269470751784485271 \N \N \N 139 M 7733 19 83 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 158 M 7734 19 83 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 7735 19 83 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 7736 19 83 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 7737 19 83 admin 32 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 7738 19 83 admin 33 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 M 7739 19 83 admin 34 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 7740 19 83 admin 35 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 7741 19 83 admin 36 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 7742 19 83 admin 37 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 7743 19 83 admin 38 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 148 M 7744 19 83 admin 39 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 152 M 7745 19 83 admin 40 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 153 M 7746 19 83 admin 41 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 150 M 7747 19 83 admin 42 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 149 M 7748 19 83 admin 43 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 145 M 7749 19 83 admin 18 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 59352.42 \N \N \N Total Net Revenue \N M 7750 19 83 admin 44 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 25601.22 \N \N \N Total Net Expenses \N M 7751 19 83 admin 45 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 33751.20 \N \N \N Net Income \N M 7752 19 84 admin 2 0 G 137 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N -1 28666.03 \N 0.00 \N \N \N M 7753 19 84 admin 3 1 G 138 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 50666.03 \N 0.00 \N \N \N M 7754 19 84 admin 4 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 103 M 7755 19 84 admin 5 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 51700.03 1.02040815118137339752 \N \N \N 141 M 7756 19 84 admin 6 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 140 M 7757 19 84 admin 7 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 121 M 7758 19 84 admin 8 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 122 M 7759 19 84 admin 9 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 135 M 7760 19 84 admin 10 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 123 M 7761 19 84 admin 11 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 -1034.00 -0.02040815118137339752 \N \N \N 157 M 7762 19 84 admin 12 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 101 M 7763 19 84 admin 13 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 115 M 7764 19 84 admin 14 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 142 M 7765 19 84 admin 15 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 144 M 7766 19 84 admin 16 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 147 M 7767 19 84 admin 17 2 I 254 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 138 0.00 0.000000000000000000000000 \N \N \N 154 M 7768 19 84 admin 19 1 G 139 0.00 0.00 0.00 0.00 0.00 \N \N \N \N \N 137 22000.00 \N 0.00 \N \N \N M 7769 19 84 admin 20 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 22000.00 1.00000000000000000000 \N \N \N 108 M 7770 19 84 admin 21 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 136 M 7771 19 84 admin 22 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 137 M 7772 19 84 admin 23 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 97 M 7773 19 84 admin 24 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 131 M 7774 19 84 admin 25 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 119 M 7775 19 84 admin 26 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 120 M 7776 19 84 admin 27 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 139 M 7777 19 84 admin 28 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 158 M 7778 19 84 admin 29 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 112 M 7779 19 84 admin 30 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 98 M 7780 19 84 admin 31 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 110 M 7781 19 84 admin 32 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 91 M 7782 19 84 admin 33 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 92 M 7783 19 84 admin 34 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 93 M 7784 19 84 admin 35 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 125 M 7785 19 84 admin 36 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 117 M 7786 19 84 admin 37 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 118 M 7787 19 84 admin 38 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 148 M 7788 19 84 admin 39 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 152 M 7789 19 84 admin 40 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 153 M 7790 19 84 admin 41 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 150 M 7791 19 84 admin 42 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 149 M 7792 19 84 admin 43 2 I 255 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 139 0.00 0.000000000000000000000000 \N \N \N 145 M 7793 19 84 admin 18 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 138 50666.03 \N \N \N Total Net Revenue \N M 7794 19 84 admin 44 2 T -1 \N \N \N \N 0.00 \N \N \N \N \N 139 22000.00 \N \N \N Total Net Expenses \N M 7795 19 84 admin 45 1 T -1 \N \N \N \N 0.00 \N \N \N \N \N 137 28666.03 \N \N \N Net Income \N M 7796 18 90 admin 2 0 G 132 0.00 5230534.49 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 7797 18 90 admin 3 1 I 249 \N 3816012.24 \N \N 0 \N 0.72956449236605645631 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 109 M 7798 18 90 admin 4 1 I 249 \N 4739.69 \N \N 0 \N 0.00090615787144919486 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 126 M 7799 18 90 admin 5 1 I 249 \N 830459.59 \N \N 0 \N 0.15877145855508927157 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 127 M 7800 18 90 admin 6 1 I 249 \N 98999.99 \N \N 0 \N 0.01892731807605382983 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 106 M 7801 20 107 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 139 M 7802 18 90 admin 7 1 I 249 \N 311417.52 \N \N 0 \N 0.05953837425130906650 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 85 M 7803 18 90 admin 8 1 I 249 \N 76560.22 \N \N 0 \N 0.01463716951802376892 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 138 M 7804 18 90 admin 9 1 I 249 \N 3959.81 \N \N 0 \N 0.00075705647435660060 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 128 M 7805 18 90 admin 10 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 134 M 7806 18 90 admin 11 1 I 249 \N -1969.99 \N \N 0 \N -0.00037663263740375412 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 86 M 7807 18 90 admin 12 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 96 M 7808 18 90 admin 13 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 130 M 7809 18 90 admin 14 1 I 249 \N -100.00 \N \N 0 \N -0.000019118505038287205712 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 100 M 7810 18 90 admin 15 1 I 249 \N -45313.98 \N \N 0 \N -0.00866335554934845674 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 87 M 7811 18 90 admin 16 1 I 249 \N 3979.69 \N \N 0 \N 0.00076085723315821210 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 90 M 7812 18 90 admin 17 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 88 M 7813 18 90 admin 18 1 I 249 \N 145999.79 \N \N 0 \N 0.02791297720703873994 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 111 M 7814 18 90 admin 19 1 I 249 \N -15000.00 \N \N 0 \N -0.00286777575574308086 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 156 M 7815 18 90 admin 20 1 I 249 \N -0.57 \N \N 0 \N -0.000000108975478718237073 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 89 M 7816 18 90 admin 21 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 83 M 7817 18 90 admin 22 1 I 249 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 143 M 7818 18 90 admin 23 1 I 249 \N 790.49 \N \N 0 \N 0.00015112987047715653 \N \N 0.00000000000000000000 132 0.00 \N \N \N \N 146 M 7819 18 90 admin 25 0 G 133 0.00 5230534.49 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 7820 18 90 admin 26 1 G 134 0.00 115828.46 0.00 0.00 0.00 \N 0.02214466996087048075 \N \N 0.00000000000000000000 133 0.00 \N 0.00 \N \N \N M 7821 18 90 admin 27 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 99 M 7822 18 90 admin 28 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 133 M 7823 18 90 admin 29 2 I 250 \N 19299.24 \N \N 0 \N 0.16661915387634438030 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 94 M 7824 18 90 admin 30 2 I 250 \N 14087.73 \N \N 0 \N 0.12162580768146274240 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 102 M 7825 18 90 admin 31 2 I 250 \N -505.22 \N \N 0 \N -0.00436179501998040896 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 129 M 7826 18 90 admin 32 2 I 250 \N -1014.64 \N \N 0 \N -0.00875985055831701466 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 155 M 7827 18 90 admin 33 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 104 M 7828 18 90 admin 34 2 I 250 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 107 M 7829 18 90 admin 35 2 I 250 \N 43130.00 \N \N 0 \N 0.37236098969113463133 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 95 M 7830 18 90 admin 36 2 I 250 \N 631.35 \N \N 0 \N 0.00545073292004400300 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 105 M 7831 18 90 admin 37 2 I 250 \N 200.00 \N \N 0 \N 0.00172669135029508292 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 132 M 7832 18 90 admin 38 2 I 250 \N 40000.00 \N \N 0 \N 0.34533827005901658366 \N \N 0.00000000000000000000 134 0.00 \N \N \N \N 116 M 7833 18 90 admin 40 1 G 135 0.00 5114706.03 0.00 0.00 0.00 \N 0.97785533003912951925 \N \N 0.00000000000000000000 133 0.00 \N 0.00 \N \N \N M 7834 18 90 admin 41 2 I 251 \N 1419999.99 \N \N 0 \N 0.27763081234211226016 \N \N 0.00000000000000000000 135 0.00 \N \N \N \N 113 M 7835 18 90 admin 42 2 I 251 \N 2943883.17 \N \N 0 \N 0.57557231104443357422 \N \N 0.00000000000000000000 135 0.00 \N \N \N \N 84 M 7836 18 90 admin 43 2 I 251 \N 110000.00 \N \N 0 \N 0.02150661237513976927 \N \N 0.00000000000000000000 135 0.00 \N \N \N \N 114 M 7837 18 90 admin 44 2 G 136 \N 640822.87 \N \N 0.00 \N 0.12529026423831439634 \N \N 0.00000000000000000000 135 \N \N \N \N \N \N M 7838 18 90 admin 24 1 T -1 \N 5230534.49 \N \N 0.00 \N \N \N \N \N 132 \N \N \N \N Total Assets \N M 7839 18 90 admin 39 2 T -1 \N 115828.46 \N \N 0.00 \N 0.02214466996087048075 \N \N 0.00000000000000000000 134 \N \N \N \N Total Liabilities \N M 7840 18 90 admin 45 2 T -1 \N 5114706.03 \N \N 0.00 \N 0.97785533003912951925 \N \N 0.00000000000000000000 135 \N \N \N \N Total Owners Equity \N M 7841 18 90 admin 46 1 T -1 \N 5230534.49 \N \N 0.00 \N \N \N \N \N 133 \N \N \N \N Total Liabilities and Owners Equity \N M 7842 27 91 admin 1 0 G 229 5230534.49 5230534.49 0.00 0.00 0.00 0.45525807141300657562 0.45525807141300657562 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 7843 27 91 admin 2 1 I 333 3816012.24 3816012.24 0.00 0.00 0 0.72956449236605645631 0.72956449236605645631 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 109 M 7844 27 91 admin 3 1 I 333 4739.69 4739.69 0.00 0.00 0 0.00090615787144919486 0.00090615787144919486 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 126 M 7845 27 91 admin 4 1 I 333 830459.59 830459.59 0.00 0.00 0 0.15877145855508927157 0.15877145855508927157 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 127 M 7846 27 91 admin 5 1 I 333 98999.99 98999.99 0.00 0.00 0 0.01892731807605382983 0.01892731807605382983 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 106 M 7847 27 91 admin 6 1 I 333 311417.52 311417.52 0.00 0.00 0 0.05953837425130906650 0.05953837425130906650 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 85 M 7848 27 91 admin 7 1 I 333 76560.22 76560.22 0.00 0.00 0 0.01463716951802376892 0.01463716951802376892 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 138 M 7849 27 91 admin 8 1 I 333 3959.81 3959.81 0.00 0.00 0 0.00075705647435660060 0.00075705647435660060 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 128 M 7850 27 91 admin 9 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 134 M 7851 27 91 admin 10 1 I 333 -1969.99 -1969.99 0.00 0.00 0 -0.00037663263740375412 -0.00037663263740375412 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 86 M 7852 27 91 admin 11 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 96 M 7853 27 91 admin 12 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 130 M 7854 27 91 admin 13 1 I 333 -100.00 -100.00 0.00 0.00 0 -0.000019118505038287205712 -0.000019118505038287205712 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 100 M 7855 27 91 admin 14 1 I 333 -45313.98 -45313.98 0.00 0.00 0 -0.00866335554934845674 -0.00866335554934845674 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 87 M 7856 27 91 admin 15 1 I 333 3979.69 3979.69 0.00 0.00 0 0.00076085723315821210 0.00076085723315821210 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 90 M 7857 27 91 admin 16 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 88 M 7858 27 91 admin 17 1 I 333 145999.79 145999.79 0.00 0.00 0 0.02791297720703873994 0.02791297720703873994 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 111 M 7859 27 91 admin 18 1 I 333 -15000.00 -15000.00 0.00 0.00 0 -0.00286777575574308086 -0.00286777575574308086 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 156 M 7860 27 91 admin 19 1 I 333 -0.57 -0.57 0.00 0.00 0 -0.000000108975478718237073 -0.000000108975478718237073 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 89 M 7861 27 91 admin 20 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 83 M 7862 27 91 admin 21 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 143 M 7863 27 91 admin 22 1 I 333 790.49 790.49 0.00 0.00 0 0.00015112987047715653 0.00015112987047715653 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 146 M 7864 27 91 admin 24 0 G 230 115828.46 115828.46 0.00 0.00 0.00 0.01008153973846343486 0.01008153973846343486 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 7865 27 91 admin 25 1 I 335 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 99 M 7866 27 91 admin 26 1 I 335 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 133 M 7867 27 91 admin 27 1 I 335 19299.24 19299.24 0.00 0.00 0 0.16661915387634438030 0.16661915387634438030 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 94 M 7868 27 91 admin 28 1 I 335 14087.73 14087.73 0.00 0.00 0 0.12162580768146274240 0.12162580768146274240 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 102 M 7869 27 91 admin 29 1 I 335 -505.22 -505.22 0.00 0.00 0 -0.00436179501998040896 -0.00436179501998040896 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 129 M 7870 27 91 admin 30 1 I 335 -1014.64 -1014.64 0.00 0.00 0 -0.00875985055831701466 -0.00875985055831701466 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 155 M 7871 27 91 admin 31 1 I 335 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 104 M 7872 27 91 admin 32 1 I 335 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 107 M 7873 27 91 admin 33 1 I 335 43130.00 43130.00 0.00 0.00 0 0.37236098969113463133 0.37236098969113463133 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 95 M 7874 27 91 admin 34 1 I 335 631.35 631.35 0.00 0.00 0 0.00545073292004400300 0.00545073292004400300 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 105 M 7875 27 91 admin 35 1 I 335 200.00 200.00 0.00 0.00 0 0.00172669135029508292 0.00172669135029508292 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 132 M 7876 27 91 admin 36 1 I 335 40000.00 40000.00 0.00 0.00 0 0.34533827005901658366 0.34533827005901658366 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 116 M 7877 27 91 admin 38 0 G 231 4473883.16 4473883.16 0.00 0.00 0.00 0.38940024638834329217 0.38940024638834329217 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 7878 27 91 admin 39 1 I 336 1419999.99 1419999.99 0.00 0.00 0 0.31739764746113754120 0.31739764746113754120 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 231 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 113 M 7879 27 91 admin 40 1 I 336 2943883.17 2943883.17 0.00 0.00 0 0.65801521066097756563 0.65801521066097756563 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 231 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 84 M 7880 27 91 admin 41 1 I 336 110000.00 110000.00 0.00 0.00 0 0.02458714187788489318 0.02458714187788489318 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 231 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 114 M 7881 27 91 admin 43 0 G 232 1154870.21 1154870.21 0.00 0.00 0.00 0.10051821387319327297 0.10051821387319327297 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 7882 27 91 admin 44 1 I 337 961299.00 961299.00 0.00 0.00 0 0.83238704373541681363 0.83238704373541681363 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 103 M 7883 27 91 admin 45 1 I 337 155005.81 155005.81 0.00 0.00 0 0.13421924702690183687 0.13421924702690183687 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 141 M 7884 27 91 admin 46 1 I 337 2025.00 2025.00 0.00 0.00 0 0.00175344379174868490 0.00175344379174868490 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 140 M 7885 27 91 admin 47 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 121 M 7886 27 91 admin 48 1 I 337 41133.75 41133.75 0.00 0.00 0 0.03561763879942837906 0.03561763879942837906 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 122 M 7887 27 91 admin 49 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 135 M 7888 27 91 admin 50 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 123 M 7889 27 91 admin 51 1 I 337 -5011.27 -5011.27 0.00 0.00 0 -0.00433924951618589244 -0.00433924951618589244 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 157 M 7890 27 91 admin 52 1 I 337 395.94 395.94 0.00 0.00 0 0.00034284372094072805 0.00034284372094072805 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 101 M 7891 27 91 admin 53 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 115 M 7892 27 91 admin 54 1 I 337 21.98 21.98 0.00 0.00 0 0.000019032441749449923035 0.000019032441749449923035 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 142 M 7893 27 91 admin 55 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 144 M 7894 27 91 admin 56 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 147 M 7895 27 91 admin 57 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 154 M 7896 27 91 admin 59 0 G 233 514047.34 514047.34 0.00 0.00 0.00 0.04474192858699342438 0.04474192858699342438 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N \N M 7897 27 91 admin 60 1 I 338 508027.22 508027.22 0.00 0.00 0 0.98828878289692151699 0.98828878289692151699 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 108 M 7898 27 91 admin 61 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 136 M 7899 27 91 admin 62 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 137 M 7900 27 91 admin 63 1 I 338 125.00 125.00 0.00 0.00 0 0.00024316826539750211 0.00024316826539750211 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 97 M 7901 27 91 admin 64 1 I 338 100.00 100.00 0.00 0.00 0 0.00019453461231800168 0.00019453461231800168 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 131 M 7902 27 91 admin 65 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 119 M 7903 27 91 admin 66 1 I 338 2630.00 2630.00 0.00 0.00 0 0.00511626030396344430 0.00511626030396344430 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 120 M 7904 27 91 admin 67 1 I 338 3960.00 3960.00 0.00 0.00 0 0.00770357064779286670 0.00770357064779286670 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 139 M 7905 27 91 admin 68 1 I 338 1100.00 1100.00 0.00 0.00 0 0.00213988073549801853 0.00213988073549801853 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 158 M 7906 27 91 admin 69 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 159 M 7907 27 91 admin 70 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 112 M 7908 27 91 admin 71 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 98 M 7909 27 91 admin 72 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 110 M 7910 27 91 admin 73 1 I 338 -1900.00 -1900.00 0.00 0.00 0 -0.00369615763404203200 -0.00369615763404203200 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 91 M 7911 27 91 admin 74 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 92 M 7912 27 91 admin 75 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 93 M 7913 27 91 admin 76 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 125 M 7914 27 91 admin 77 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 117 M 7915 27 91 admin 78 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 118 M 7916 27 91 admin 79 1 I 338 5.12 5.12 0.00 0.00 0 0.000009960172150681686243 0.000009960172150681686243 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 148 M 7917 27 91 admin 80 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 152 M 7918 27 91 admin 81 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 153 M 7919 27 91 admin 82 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 150 M 7920 27 91 admin 83 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 149 M 7921 27 91 admin 84 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 145 M 7922 27 91 admin 23 1 T -1 5230534.49 5230534.49 0.00 0.00 0.00 0.45525807141300657562 0.45525807141300657562 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 229 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Assets \N M 7923 27 91 admin 37 1 T -1 115828.46 115828.46 0.00 0.00 0.00 0.01008153973846343486 0.01008153973846343486 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 230 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Liabilities \N M 7924 27 91 admin 42 1 T -1 4473883.16 4473883.16 0.00 0.00 0.00 0.38940024638834329217 0.38940024638834329217 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 231 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Equity \N M 7925 27 91 admin 58 1 T -1 1154870.21 1154870.21 0.00 0.00 0.00 0.10051821387319327297 0.10051821387319327297 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 232 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Revenue \N M 7926 27 91 admin 85 1 T -1 514047.34 514047.34 0.00 0.00 0.00 0.04474192858699342438 0.04474192858699342438 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 Total Expense \N M 7927 27 91 admin 86 0 T -1 11489163.66 11489163.66 0.00 0.00 0.00 \N \N \N \N \N \N 0.00 \N 0.00 \N \N \N M 7928 27 88 admin 1 0 G 229 5296760.25 5689434.75 474029.00 81354.50 0.00 0.47456650634229727274 0.47572807126102433119 0.67004874518431927424 0.11499608808764379900 0.00000000000000000000 -1 392674.50 0.49197096844516053052 392674.50 0.49197096844516053052 \N \N M 7929 27 88 admin 2 1 I 333 3670820.12 3906157.62 250937.50 15600.00 0 0.69303120147829987208 0.68656339190813287735 0.52937162072362661356 0.19175337565838398613 0.00000000000000000000 229 235337.50 0.59931953819257425680 235337.50 0.59931953819257425680 \N 109 M 7930 27 88 admin 3 1 I 333 4739.69 4739.69 0.00 0.00 0 0.00089482811686634297 0.00083306869808112309 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 126 M 7931 27 88 admin 4 1 I 333 694919.92 694919.92 0.00 0.00 0 0.13119716339813568115 0.12214217238364496579 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 127 M 7932 27 88 admin 5 1 I 333 349937.50 445500.00 148500.00 52937.50 0 0.06606632799738292856 0.07830303353070355539 0.31327197281178999597 0.65070155922536552987 0.00000000000000000000 229 95562.50 0.24336314173698572227 95562.50 0.24336314173698572227 \N 106 M 7933 27 88 admin 6 1 I 333 404996.20 464587.70 66000.00 6408.50 0 0.07646111601898537885 0.08165797138283376921 0.13923198791635110932 0.07877253255812524200 0.00000000000000000000 229 59591.50 0.15175800822309571923 59591.50 0.15175800822309571923 \N 85 M 7934 27 88 admin 7 1 I 333 78465.60 78465.60 0.00 0.00 0 0.01481388552559085528 0.01379145792998153288 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 138 M 7935 27 88 admin 8 1 I 333 3959.81 3959.81 0.00 0.00 0 0.00074759094486105917 0.00069599356948420931 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 128 M 7936 27 88 admin 9 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 134 M 7937 27 88 admin 10 1 I 333 -1869.99 -1869.99 0.00 0.00 0 -0.00035304410842457897 -0.00032867764236157203 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 86 M 7938 27 88 admin 11 1 I 333 0.00 0.00 6408.50 6408.50 0 0.000000000000000000000000 0.000000000000000000000000 0.01351921506912024370 0.07877253255812524200 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 96 M 7939 27 88 admin 12 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 130 M 7940 27 88 admin 13 1 I 333 -100.00 -100.00 0.00 0.00 0 -0.000018879465046582012089 -0.000017576438502963761031 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 100 M 7941 27 88 admin 14 1 I 333 -42695.00 -42695.00 0.00 0.00 0 -0.00806058760163819006 -0.00750426041884037777 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 87 M 7942 27 88 admin 15 1 I 333 1796.69 3979.69 2183.00 0.00 0 0.00033920546054543435 0.00069948776545859850 0.00460520347911203745 0.000000000000000000000000 0.00000000000000000000 229 2183.00 0.00555931184734430171 2183.00 0.00555931184734430171 \N 90 M 7943 27 88 admin 16 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 88 M 7944 27 88 admin 17 1 I 333 145999.79 145999.79 0.00 0.00 0 0.02756397932113313983 0.02566156330380623488 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 111 M 7945 27 88 admin 18 1 I 333 -15000.00 -15000.00 0.00 0.00 0 -0.00283191975698730181 -0.00263646577544456415 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 156 M 7946 27 88 admin 19 1 I 333 -0.57 -0.57 0.00 0.00 0 -0.000000107612950765517469 -0.000000100185699466893438 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 89 M 7947 27 88 admin 20 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 83 M 7948 27 88 admin 21 1 I 333 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 143 M 7949 27 88 admin 22 1 I 333 790.49 790.49 0.00 0.00 0 0.00014924028324672615 0.00013893998872207823 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 229 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 146 M 7950 27 88 admin 24 0 G 230 335282.00 585865.00 29017.00 279600.00 0.00 0.03003979788956053169 0.04898771823850164022 0.04101606534413167207 0.39521976324979203610 0.00000000000000000000 -1 250583.00 0.31394847688325486177 250583.00 0.31394847688325486177 \N \N M 7951 27 88 admin 25 1 I 335 171230.00 171230.00 15600.00 15600.00 0 0.51070442194928448291 0.29226869671340667219 0.53761588034600406658 0.05579399141630901288 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 99 M 7952 27 88 admin 26 1 I 335 148500.00 346500.00 0.00 198000.00 0 0.44291074379179317709 0.59143317999880518549 0.000000000000000000000000 0.70815450643776824034 0.00000000000000000000 230 198000.00 0.79015735305268114756 198000.00 0.79015735305268114756 \N 133 M 7953 27 88 admin 27 1 I 335 15047.78 15047.78 0.00 0.00 0 0.04488096587350349855 0.02568472258967509580 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 94 M 7954 27 88 admin 28 1 I 335 14087.73 14087.73 0.00 0.00 0 0.04201755537129938380 0.02404603449600163860 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 102 M 7955 27 88 admin 29 1 I 335 52.78 52.78 0.00 0.00 0 0.00015741972429179019 0.000090089013680626082801 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 129 M 7956 27 88 admin 30 1 I 335 -414.64 -1014.64 600.00 0.00 0 -0.00123669030845676177 -0.00173186655628856477 0.02067753385946169487 0.000000000000000000000000 0.00000000000000000000 230 -600.00 -0.00239441622137176105 -600.00 -0.00239441622137176105 \N 155 M 7957 27 88 admin 31 1 I 335 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 104 M 7958 27 88 admin 32 1 I 335 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 107 M 7959 27 88 admin 33 1 I 335 -54053.00 -870.00 12817.00 66000.00 0 -0.16121652817628145859 -0.00148498374198834202 0.44170658579453423855 0.23605150214592274678 0.00000000000000000000 230 53183.00 0.21223706316869061349 53183.00 0.21223706316869061349 \N 95 M 7960 27 88 admin 34 1 I 335 631.35 631.35 0.00 0.00 0 0.00188304173799965402 0.00107763733966016062 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 105 M 7961 27 88 admin 35 1 I 335 200.00 200.00 0.00 0.00 0 0.00059651278625157330 0.00034137557287088322 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 132 M 7962 27 88 admin 36 1 I 335 40000.00 40000.00 0.00 0.00 0 0.11930255725031466049 0.06827511457417664479 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 230 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 116 M 7963 27 88 admin 38 0 G 231 4473883.16 4473883.16 0.00 0.00 0.00 0.40084032518270710181 0.37408844644083082588 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 -1 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N \N M 7964 27 88 admin 39 1 I 336 1419999.99 1419999.99 0.00 0.00 0 0.31739764746113754120 0.31739764746113754120 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 231 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 113 M 7965 27 88 admin 40 1 I 336 2943883.17 2943883.17 0.00 0.00 0 0.65801521066097756563 0.65801521066097756563 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 231 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 84 M 7966 27 88 admin 41 1 I 336 110000.00 110000.00 0.00 0.00 0 0.02458714187788489318 0.02458714187788489318 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 231 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 114 M 7967 27 88 admin 43 0 G 232 771464.93 919964.93 198000.00 346500.00 0.00 0.06911987692773236651 0.07692383532066753390 0.27987665637860809423 0.48978414866256416490 0.00000000000000000000 -1 148500.00 0.18605152311674513823 148500.00 0.18605152311674513823 \N \N M 7968 27 88 admin 44 1 I 337 713799.00 862299.00 0.00 148500.00 0 0.92525139153117433349 0.93731725186524229788 0.000000000000000000000000 0.42857142857142857143 0.00000000000000000000 232 148500.00 1.00000000000000000000 148500.00 1.00000000000000000000 \N 103 M 7969 27 88 admin 45 1 I 337 51700.03 51700.03 0.00 0.00 0 0.06701539887237647990 0.05619782701934083509 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 141 M 7970 27 88 admin 46 1 I 337 2025.00 2025.00 0.00 0.00 0 0.00262487628569194973 0.00220117086419805155 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 140 M 7971 27 88 admin 47 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 121 M 7972 27 88 admin 48 1 I 337 6133.75 6133.75 0.00 0.00 0 0.00795078267524098600 0.00666737372260483886 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 122 M 7973 27 88 admin 49 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 135 M 7974 27 88 admin 50 1 I 337 0.00 0.00 198000.00 198000.00 0 0.000000000000000000000000 0.000000000000000000000000 1.00000000000000000000 0.57142857142857142857 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 123 M 7975 27 88 admin 51 1 I 337 -2245.15 -2245.15 0.00 0.00 0 -0.00291024246559075602 -0.00244047346457000268 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 157 M 7976 27 88 admin 52 1 I 337 30.32 30.32 0.00 0.00 0 0.000039301851349224649784 0.000032957778075301196536 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 101 M 7977 27 88 admin 53 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 115 M 7978 27 88 admin 54 1 I 337 21.98 21.98 0.00 0.00 0 0.000028491249757782249415 0.000023892215108678110154 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 142 M 7979 27 88 admin 55 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 144 M 7980 27 88 admin 56 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 147 M 7981 27 88 admin 57 1 I 337 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 232 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 \N 154 M 7982 27 88 admin 59 0 G 233 283869.84 290278.34 6408.50 0.00 0.00 0.02543349365770272726 0.02427192873897566881 0.00905853309294095945 0.000000000000000000000000 0.00000000000000000000 -1 6408.50 0.00802903155483946948 6408.50 0.00802903155483946948 \N \N M 7983 27 88 admin 60 1 I 338 277984.72 284393.22 6408.50 0.00 0 0.97926824491111841962 0.97972594165999433509 1.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 6408.50 1.00000000000000000000 6408.50 1.00000000000000000000 \N 108 M 7984 27 88 admin 61 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 136 M 7985 27 88 admin 62 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 137 M 7986 27 88 admin 63 1 I 338 125.00 125.00 0.00 0.00 0 0.00044034265845219767 0.00043062117552415382 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 97 M 7987 27 88 admin 64 1 I 338 100.00 100.00 0.00 0.00 0 0.00035227412676175814 0.00034449694041932305 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 131 M 7988 27 88 admin 65 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 119 M 7989 27 88 admin 66 1 I 338 2630.00 2630.00 0.00 0.00 0 0.00926480953383423896 0.00906026953302819632 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 120 M 7990 27 88 admin 67 1 I 338 3925.00 3925.00 0.00 0.00 0 0.01382675947539900681 0.01352150491145842986 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 139 M 7991 27 88 admin 68 1 I 338 1000.00 1000.00 0.00 0.00 0 0.00352274126761758135 0.00344496940419323054 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 158 M 7992 27 88 admin 69 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 159 M 7993 27 88 admin 70 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 112 M 7994 27 88 admin 71 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 98 M 7995 27 88 admin 72 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 110 M 7996 27 88 admin 73 1 I 338 -1900.00 -1900.00 0.00 0.00 0 -0.00669320840847340457 -0.00654544186796713802 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 91 M 7997 27 88 admin 74 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 92 M 7998 27 88 admin 75 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 93 M 7999 27 88 admin 76 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 125 M 8000 27 88 admin 77 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 117 M 8001 27 88 admin 78 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 118 M 8002 27 88 admin 79 1 I 338 5.12 5.12 0.00 0.00 0 0.000018036435290202016530 0.000017638243349469340358 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 148 M 8003 27 88 admin 80 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 152 M 8004 24 92 admin 60 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 114 M 8062 27 88 admin 81 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 153 M 8005 27 88 admin 82 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 150 M 8006 27 88 admin 83 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 149 M 8007 27 88 admin 84 1 I 338 0.00 0.00 0.00 0.00 0 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 233 0.00 0.00000000000000000000 0.00 0.00000000000000000000 \N 145 M 8008 27 88 admin 23 1 T -1 5296760.25 5689434.75 474029.00 81354.50 0.00 0.47456650634229727274 0.47572807126102433119 0.67004874518431927424 0.11499608808764379900 0.00000000000000000000 229 392674.50 0.49197096844516053052 392674.50 0.49197096844516053052 Total Assets \N M 8009 27 88 admin 37 1 T -1 335282.00 585865.00 29017.00 279600.00 0.00 0.03003979788956053169 0.04898771823850164022 0.04101606534413167207 0.39521976324979203610 0.00000000000000000000 230 250583.00 0.31394847688325486177 250583.00 0.31394847688325486177 Total Liabilities \N M 8010 27 88 admin 42 1 T -1 4473883.16 4473883.16 0.00 0.00 0.00 0.40084032518270710181 0.37408844644083082588 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 231 0.00 0.000000000000000000000000 0.00 0.000000000000000000000000 Total Equity \N M 8011 27 88 admin 58 1 T -1 771464.93 919964.93 198000.00 346500.00 0.00 0.06911987692773236651 0.07692383532066753390 0.27987665637860809423 0.48978414866256416490 0.00000000000000000000 232 148500.00 0.18605152311674513823 148500.00 0.18605152311674513823 Total Revenue \N M 8012 27 88 admin 85 1 T -1 283869.84 290278.34 6408.50 0.00 0.00 0.02543349365770272726 0.02427192873897566881 0.00905853309294095945 0.000000000000000000000000 0.00000000000000000000 233 6408.50 0.00802903155483946948 6408.50 0.00802903155483946948 Total Expense \N M 8013 27 88 admin 86 0 T -1 11161260.18 11959426.18 707454.50 707454.50 0.00 \N \N \N \N \N \N 798166.00 \N 798166.00 \N \N \N M 8014 24 92 admin 1 0 G 170 0.00 0.00 -105664.00 -102136.00 0.00 \N \N -1.8175313059033989 1.00000000000000000000 0.00000000000000000000 -1 163800.00 0.50000000000000000000 0.00 \N \N \N M 8015 24 92 admin 2 1 G 172 0.00 0.00 -105664.00 -102136.00 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 170 163800.00 1.00000000000000000000 0.00 \N \N \N M 8016 24 92 admin 3 2 G 173 0.00 0.00 -22500.00 61164.00 0.00 \N \N -0.21497362990139876175 0.19512288492458464130 0.00000000000000000000 172 38664.00 -0.93229166666666666667 0.00 \N \N \N M 8017 24 92 admin 4 3 G 175 \N \N -22500.00 61164.00 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 173 38664.00 1.00000000000000000000 \N \N \N \N M 8018 24 92 admin 6 2 G 174 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 8019 24 92 admin 7 3 I 295 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 174 0.00 0.00000000000000000000 \N \N \N 112 M 8020 24 92 admin 9 2 G 176 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 8021 24 92 admin 10 3 I 300 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 176 0.00 0.00000000000000000000 \N \N \N 100 M 8022 24 92 admin 12 2 G 179 0.00 0.00 61164.00 163800.00 0.00 \N \N 0.58438431552396239395 0.52254804379450271802 0.00000000000000000000 172 -102636.00 2.4748263888888889 0.00 \N \N \N M 8023 24 92 admin 13 3 I 298 \N \N 61164.00 163800.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 179 -102636.00 1.00000000000000000000 \N \N \N 106 M 8024 24 92 admin 15 2 G 180 0.00 0.00 44000.00 44000.00 0.00 \N \N 0.42039287625162424520 0.14036699589107521119 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 8025 24 92 admin 16 3 I 299 \N \N 22000.00 22000.00 0 \N \N 0.50000000000000000000 0.50000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 85 M 8026 24 92 admin 17 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 138 M 8027 24 92 admin 18 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 128 M 8028 24 92 admin 19 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 134 M 8029 24 92 admin 20 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 86 M 8030 24 92 admin 21 3 I 299 \N \N 22000.00 22000.00 0 \N \N 0.50000000000000000000 0.50000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 96 M 8031 24 92 admin 22 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 130 M 8032 24 92 admin 23 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 87 M 8033 24 92 admin 24 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 90 M 8034 24 92 admin 25 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 88 M 8035 24 92 admin 26 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 89 M 8036 24 92 admin 27 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 83 M 8037 24 92 admin 28 3 I 299 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 180 0.00 0.00000000000000000000 \N \N \N 146 M 8038 24 92 admin 30 2 G 183 0.00 0.00 22000.00 22000.00 0.00 \N \N 0.21019643812581212260 0.07018349794553760559 0.00000000000000000000 172 0.00 0.000000000000000000000000 0.00 \N \N \N M 8039 24 92 admin 31 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 133 M 8040 24 92 admin 32 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 94 M 8041 24 92 admin 33 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 102 M 8042 24 92 admin 34 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 129 M 8043 24 92 admin 35 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 155 M 8044 24 92 admin 36 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 104 M 8045 24 92 admin 37 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 107 M 8046 24 92 admin 38 3 I 301 \N \N 22000.00 22000.00 0 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 95 M 8047 24 92 admin 39 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 105 M 8048 24 92 admin 40 3 I 301 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 183 0.00 0.00000000000000000000 \N \N \N 132 M 8049 24 92 admin 42 2 G 194 0.00 0.00 0.00 22500.00 0.00 \N \N 0.000000000000000000000000 0.07177857744429982390 0.00000000000000000000 172 22500.00 -0.54253472222222222222 0.00 \N \N \N M 8050 24 92 admin 43 3 I 302 \N \N 0.00 22500.00 0 \N \N 0.00000000000000000000 1.00000000000000000000 0.00000000000000000000 194 22500.00 1.00000000000000000000 \N \N \N 99 M 8051 24 92 admin 46 1 G 188 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 170 0.00 0.000000000000000000000000 0.00 \N \N \N M 8052 24 92 admin 47 2 G 189 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 188 0.00 0.00000000000000000000 0.00 \N \N \N M 8053 24 92 admin 48 3 I 303 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 189 0.00 0.00000000000000000000 \N \N \N 111 M 8054 24 92 admin 50 2 G 190 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 188 0.00 0.00000000000000000000 0.00 \N \N \N M 8055 24 92 admin 53 1 G 191 0.00 0.00 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 170 0.00 0.000000000000000000000000 0.00 \N \N \N M 8056 24 92 admin 54 2 G 192 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 191 0.00 0.00000000000000000000 0.00 \N \N \N M 8057 24 92 admin 55 3 I 304 \N \N 0.00 0.00 0 \N \N \N \N \N 192 0.00 \N \N \N \N 116 M 8058 24 92 admin 57 2 G 193 0.00 0.00 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 191 0.00 0.00000000000000000000 0.00 \N \N \N M 8059 24 92 admin 58 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 113 M 8060 24 92 admin 59 3 I 305 \N \N 0.00 0.00 0 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N \N 84 M 8061 24 92 admin 64 0 G 171 0.00 0.00 163800.00 0.00 0.00 \N \N 2.8175313059033989 0.000000000000000000000000 0.00000000000000000000 -1 163800.00 0.50000000000000000000 0.00 \N \N \N M 8063 24 92 admin 65 1 I 291 \N \N 99000.00 0.00 0 \N \N 0.60439560439560439560 0.00000000000000000000 0.00000000000000000000 171 99000.00 0.60439560439560439560 \N \N \N 109 M 8064 24 92 admin 66 1 I 291 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 171 0.00 0.000000000000000000000000 \N \N \N 126 M 8065 24 92 admin 67 1 I 291 \N \N 64800.00 0.00 0 \N \N 0.39560439560439560440 0.00000000000000000000 0.00000000000000000000 171 64800.00 0.39560439560439560440 \N \N \N 127 M 8066 24 92 admin 68 1 I 291 \N \N 0.00 0.00 0 \N \N 0.000000000000000000000000 0.00000000000000000000 0.00000000000000000000 171 0.00 0.000000000000000000000000 \N \N \N 143 M 8067 24 92 admin 69 1 T -1 \N \N 163800.00 0.00 0.00 \N \N 2.8175313059033989 0.000000000000000000000000 0.00000000000000000000 171 163800.00 0.50000000000000000000 \N \N TOTAL CASH POSITION \N M 8068 24 92 admin 5 3 T -1 \N \N -22500.00 61164.00 0.00 \N \N -0.21497362990139876175 0.19512288492458464130 0.00000000000000000000 173 38664.00 -0.93229166666666666667 \N \N Total Cash Flow From Operating Activities \N M 8069 24 92 admin 8 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 174 0.00 0.000000000000000000000000 \N \N Total Charges Not Using Cash \N M 8070 24 92 admin 11 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 176 0.00 0.000000000000000000000000 \N \N Total Changes in Current Assets \N M 8071 24 92 admin 14 3 T -1 \N \N 61164.00 163800.00 0.00 \N \N 0.58438431552396239395 0.52254804379450271802 0.00000000000000000000 179 -102636.00 2.4748263888888889 \N \N Total Net Receivables \N M 8072 24 92 admin 29 3 T -1 \N \N 44000.00 44000.00 0.00 \N \N 0.42039287625162424520 0.14036699589107521119 0.00000000000000000000 180 0.00 0.000000000000000000000000 \N \N Total Inventory \N M 8073 24 92 admin 41 3 T -1 \N \N 22000.00 22000.00 0.00 \N \N 0.21019643812581212260 0.07018349794553760559 0.00000000000000000000 183 0.00 0.000000000000000000000000 \N \N Total Change in Current Liability \N M 8074 24 92 admin 44 3 T -1 \N \N 0.00 22500.00 0.00 \N \N 0.000000000000000000000000 0.07177857744429982390 0.00000000000000000000 194 22500.00 -0.54253472222222222222 \N \N Total Accounts Payable \N M 8075 24 92 admin 45 2 T -1 \N \N -105664.00 -102136.00 0.00 \N \N 1.00000000000000000000 1.00000000000000000000 0.00000000000000000000 172 163800.00 1.00000000000000000000 \N \N Total Cash Flow From Operating Activities \N M 8076 24 92 admin 49 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 189 0.00 0.00000000000000000000 \N \N Total Property Plant and Equipment \N M 8077 24 92 admin 51 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 190 0.00 0.00000000000000000000 \N \N Total Other Assets \N M 8078 24 92 admin 52 2 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 188 0.00 0.000000000000000000000000 \N \N Total Cash Flow From Investing Activities \N M 8079 24 92 admin 56 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 192 0.00 0.00000000000000000000 \N \N Total Long Term Debt \N M 8080 24 92 admin 61 3 T -1 \N \N 0.00 0.00 0.00 \N \N 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 193 0.00 0.00000000000000000000 \N \N Total Common Stock and Equity \N M 8081 24 92 admin 62 2 T -1 \N \N 0.00 0.00 0.00 \N \N 0.000000000000000000000000 0.000000000000000000000000 0.00000000000000000000 191 0.00 0.000000000000000000000000 \N \N Total Cash Flow from Financing Activities \N M 8082 24 92 admin 63 1 T -1 \N \N -105664.00 -102136.00 0.00 \N \N -1.8175313059033989 1.00000000000000000000 0.00000000000000000000 170 163800.00 0.50000000000000000000 \N \N TOTAL STATEMENT OF CASH FLOWS \N M 8083 24 92 admin 70 0 T -1 \N \N -269464.00 -102136.00 0.00 \N \N \N \N \N \N 0.00 \N \N \N CHECKSUM (TOTAL STA. OF CASH FLOWS - TOTAL CASH) \N M 8084 20 105 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8085 20 105 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8086 20 105 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 103 M 8087 20 105 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 141 M 8088 20 105 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 140 M 8089 20 105 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 135 M 8090 20 105 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 115 M 8091 20 105 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 142 M 8092 20 105 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 144 M 8093 20 105 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 147 M 8094 20 105 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8095 20 105 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 121 M 8096 20 105 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 122 M 8097 20 105 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 123 M 8098 20 105 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 157 M 8099 20 105 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 101 M 8100 20 105 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 154 M 8101 20 105 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8102 20 105 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 108 M 8103 20 105 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 136 M 8104 20 105 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 137 M 8105 20 105 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 148 M 8106 20 105 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 152 M 8107 20 105 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 153 M 8108 20 105 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8109 20 105 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 97 M 8110 20 105 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 131 M 8111 20 105 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 119 M 8112 20 105 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 120 M 8113 20 105 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 139 M 8114 20 105 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 158 M 8115 20 105 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 160 M 8116 20 105 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 159 M 8117 20 105 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 98 M 8118 20 105 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 110 M 8119 20 105 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 91 M 8120 20 105 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 92 M 8121 20 105 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 93 M 8122 20 105 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 125 M 8123 20 105 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 117 M 8124 20 105 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 118 M 8125 20 105 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 150 M 8126 20 105 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 149 M 8127 20 105 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 145 M 8128 20 105 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 112 M 8129 20 105 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N Total Sales \N M 8130 20 105 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N Total Other Revenue \N M 8131 20 105 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N Total Cost Of Sales \N M 8132 20 105 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 \N \N GROSS PROFIT \N M 8133 20 105 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N Total Expenses \N M 8134 20 105 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 0.00 \N \N \N NET INCOME \N M 8135 20 106 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8136 20 106 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8137 20 106 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 103 M 8138 20 106 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 141 M 8139 20 106 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 140 M 8140 20 106 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 135 M 8141 20 106 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 115 M 8142 20 106 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 142 M 8143 20 106 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 144 M 8144 20 106 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 147 M 8145 20 106 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8146 20 106 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 121 M 8147 20 106 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 122 M 8148 20 106 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 123 M 8149 20 106 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 157 M 8150 20 106 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 101 M 8151 20 106 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 154 M 8152 20 106 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8153 20 106 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 108 M 8154 20 106 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 136 M 8155 20 106 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 137 M 8156 20 106 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 148 M 8157 20 106 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 152 M 8158 20 106 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 153 M 8159 20 106 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8160 20 106 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 97 M 8161 20 106 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 131 M 8162 20 106 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 119 M 8163 20 106 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 120 M 8164 20 106 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 139 M 8165 20 106 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 158 M 8166 20 106 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 160 M 8167 20 106 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 159 M 8168 20 106 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 98 M 8169 20 106 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 110 M 8170 20 106 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 91 M 8171 20 106 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 92 M 8172 20 106 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 93 M 8173 20 106 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 125 M 8174 20 106 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 117 M 8175 20 106 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 118 M 8176 20 106 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 150 M 8177 20 106 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 149 M 8178 20 106 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 145 M 8179 20 106 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 112 M 8180 20 106 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N Total Sales \N M 8181 20 106 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N Total Other Revenue \N M 8182 20 106 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N Total Cost Of Sales \N M 8183 20 106 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 \N \N GROSS PROFIT \N M 8184 20 106 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N Total Expenses \N M 8185 20 106 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 0.00 \N \N \N NET INCOME \N M 8186 20 107 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8187 20 107 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8188 20 107 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 103 M 8189 20 107 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 141 M 8190 20 107 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 140 M 8191 20 107 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 135 M 8192 20 107 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 115 M 8193 20 107 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 142 M 8194 20 107 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 144 M 8195 20 107 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 147 M 8196 20 107 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8197 20 107 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 121 M 8198 20 107 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 122 M 8199 20 107 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 123 M 8200 20 107 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 157 M 8201 20 107 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 101 M 8202 20 107 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 154 M 8203 20 107 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8204 20 107 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 108 M 8205 20 107 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 136 M 8206 20 107 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 137 M 8207 20 107 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 148 M 8208 20 107 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 152 M 8209 20 107 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 153 M 8210 20 107 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8211 20 107 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 97 M 8212 20 107 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 131 M 8213 20 107 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 119 M 8214 20 107 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 120 M 8215 20 107 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 158 M 8216 20 107 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 160 M 8217 20 107 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 159 M 8218 20 107 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 98 M 8219 20 107 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 110 M 8220 20 107 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 91 M 8221 20 107 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 92 M 8222 20 107 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 93 M 8223 20 107 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 125 M 8224 20 107 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 117 M 8225 20 107 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 118 M 8226 20 107 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 150 M 8227 20 107 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 149 M 8228 20 107 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 145 M 8229 20 107 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 112 M 8230 20 107 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N Total Sales \N M 8231 20 107 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N Total Other Revenue \N M 8232 20 107 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N Total Cost Of Sales \N M 8233 20 107 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 \N \N GROSS PROFIT \N M 8234 20 107 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N Total Expenses \N M 8235 20 107 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 0.00 \N \N \N NET INCOME \N M 8236 20 108 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8237 20 108 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8238 20 108 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 103 M 8239 20 108 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 141 M 8240 20 108 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 140 M 8241 20 108 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 135 M 8242 20 108 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 115 M 8243 20 108 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 142 M 8244 20 108 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 144 M 8245 20 108 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 147 M 8246 20 108 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8247 20 108 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 121 M 8248 20 108 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 0.00 \N \N \N NET INCOME \N M 8249 20 108 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 122 M 8250 20 108 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 123 M 8251 20 108 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 157 M 8252 20 108 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 101 M 8253 20 108 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 154 M 8254 20 108 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8255 20 108 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 108 M 8256 20 108 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 136 M 8257 20 108 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 137 M 8258 20 108 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 148 M 8259 20 108 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 152 M 8260 20 108 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 153 M 8261 20 108 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8262 20 108 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 97 M 8263 20 108 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 131 M 8264 20 108 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 119 M 8265 20 108 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 120 M 8266 20 108 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 139 M 8267 20 108 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 158 M 8268 20 108 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 160 M 8269 20 108 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 159 M 8270 20 108 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 98 M 8271 20 108 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 110 M 8272 20 108 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 91 M 8273 20 108 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 92 M 8274 20 108 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 93 M 8275 20 108 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 125 M 8276 20 108 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 117 M 8277 20 108 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 118 M 8278 20 108 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 150 M 8279 20 108 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 149 M 8280 20 108 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 145 M 8281 20 108 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 112 M 8282 20 108 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N Total Sales \N M 8283 20 108 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N Total Other Revenue \N M 8284 20 108 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N Total Cost Of Sales \N M 8285 20 108 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 \N \N GROSS PROFIT \N M 8286 20 108 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N Total Expenses \N M 8287 20 109 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8288 20 109 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8289 20 109 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 103 M 8290 20 109 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 141 M 8291 20 109 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 140 M 8292 20 109 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 135 M 8293 20 109 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 115 M 8294 20 109 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 142 M 8295 20 109 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 144 M 8296 20 109 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N \N 147 M 8297 20 109 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8298 20 109 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 121 M 8299 20 109 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 122 M 8300 20 109 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 123 M 8301 20 109 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 157 M 8302 20 109 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 101 M 8303 20 109 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N \N 154 M 8304 20 109 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 0.00 \N \N \N M 8305 20 109 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 108 M 8306 20 109 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 136 M 8307 20 109 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 137 M 8308 20 109 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 148 M 8309 20 109 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 152 M 8310 20 109 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N \N 153 M 8311 20 109 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.00000000000000000000 0.00 \N \N \N M 8312 20 109 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 97 M 8313 20 109 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 131 M 8314 20 109 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 119 M 8315 20 109 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 120 M 8316 20 109 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 139 M 8317 20 109 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 158 M 8318 20 109 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 160 M 8319 20 109 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 159 M 8320 20 109 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 98 M 8321 20 109 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 110 M 8322 20 109 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 91 M 8323 20 109 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 92 M 8324 20 109 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 93 M 8325 20 109 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 125 M 8326 20 109 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 117 M 8327 20 109 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 118 M 8328 20 109 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 150 M 8329 20 109 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 149 M 8330 20 109 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 145 M 8331 20 109 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N \N 112 M 8332 20 109 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 0.00 0.00000000000000000000 \N \N Total Sales \N M 8333 20 109 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.00000000000000000000 \N \N Total Other Revenue \N M 8334 20 109 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 0.00 0.00000000000000000000 \N \N Total Cost Of Sales \N M 8335 20 109 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.00000000000000000000 \N \N GROSS PROFIT \N M 8336 20 109 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.00000000000000000000 \N \N Total Expenses \N M 8337 20 109 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 0.00 \N \N \N NET INCOME \N M 8338 20 93 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 100000.00 1.00000000000000000000 0.00 \N \N \N M 8339 20 93 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 100000.00 1.00000000000000000000 0.00 \N \N \N M 8340 20 93 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 100000.00 1.00000000000000000000 \N \N \N 103 M 8341 20 93 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 141 M 8342 20 93 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 140 M 8343 20 93 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 8344 20 93 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 115 M 8345 20 93 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 142 M 8346 20 93 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 8347 20 93 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 8348 20 93 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.000000000000000000000000 0.00 \N \N \N M 8349 20 93 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 8350 20 93 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 122 M 8351 20 93 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 8352 20 93 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 157 M 8353 20 93 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 M 8354 20 93 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 8355 20 93 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.000000000000000000000000 0.00 \N \N \N M 8356 20 93 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 108 M 8357 20 93 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 8358 20 93 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 8359 20 93 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 148 M 8360 20 93 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 8361 20 93 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 8362 20 93 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.000000000000000000000000 0.00 \N \N \N M 8363 20 93 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 8364 20 93 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 8365 20 93 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 8366 20 93 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 8367 20 93 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 139 M 8368 20 93 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 158 M 8369 20 93 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 160 M 8370 20 93 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 159 M 8371 20 93 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 8372 20 93 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 8373 20 93 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 8374 20 93 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 8375 20 93 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 8376 20 93 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 8377 20 93 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 8378 20 93 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 8379 20 93 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 8380 20 93 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 8381 20 93 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 145 M 8382 20 93 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 8383 20 93 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 100000.00 1.00000000000000000000 \N \N Total Sales \N M 8384 20 93 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N Total Other Revenue \N M 8385 20 93 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N Total Cost Of Sales \N M 8386 20 93 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 100000.00 1.00000000000000000000 \N \N GROSS PROFIT \N M 8387 20 93 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N Total Expenses \N M 8388 20 93 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 100000.00 \N \N \N NET INCOME \N M 8389 20 94 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 103350.00 1.00000000000000000000 0.00 \N \N \N M 8390 20 94 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 103350.00 1.00000000000000000000 0.00 \N \N \N M 8391 20 94 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 103 M 8392 20 94 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 141 M 8393 20 94 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 103350.00 1.00000000000000000000 \N \N \N 140 M 8394 20 94 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 8395 20 94 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 115 M 8396 20 94 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 142 M 8397 20 94 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 8398 20 94 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 8399 20 94 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.000000000000000000000000 0.00 \N \N \N M 8400 20 94 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 8401 20 94 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 122 M 8402 20 94 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 8403 20 94 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 157 M 8404 20 94 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 M 8405 20 94 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 8406 20 94 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.000000000000000000000000 0.00 \N \N \N M 8407 20 94 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 108 M 8408 20 94 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 8409 20 94 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 8410 20 94 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 148 M 8411 20 94 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 8412 20 94 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 8413 20 94 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 0.00 0.000000000000000000000000 0.00 \N \N \N M 8414 20 94 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 8415 20 94 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 8416 20 94 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 8417 20 94 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 8418 20 94 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 139 M 8419 20 94 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 158 M 8420 20 94 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 160 M 8421 20 94 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 159 M 8422 20 94 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 8423 20 94 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 8424 20 94 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 8425 20 94 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 8426 20 94 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 8427 20 94 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 8428 20 94 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 8429 20 94 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 8430 20 94 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 8431 20 94 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 8432 20 94 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 145 M 8433 20 94 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 8434 20 94 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 103350.00 1.00000000000000000000 \N \N Total Sales \N M 8435 20 94 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N Total Other Revenue \N M 8436 20 94 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N Total Cost Of Sales \N M 8437 20 94 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 103350.00 1.00000000000000000000 \N \N GROSS PROFIT \N M 8438 20 94 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N Total Expenses \N M 8439 20 94 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 103350.00 \N \N \N NET INCOME \N M 8440 20 95 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 138671.55 0.56028909090909090909 0.00 \N \N \N M 8441 20 95 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 247500.00 1.00000000000000000000 0.00 \N \N \N M 8442 20 95 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 247500.00 1.00000000000000000000 \N \N \N 103 M 8443 20 95 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 141 M 8444 20 95 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 140 M 8445 20 95 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 8446 20 95 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 115 M 8447 20 95 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 142 M 8448 20 95 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 8449 20 95 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 8450 20 95 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 1171.55 0.00473353535353535354 0.00 \N \N \N M 8451 20 95 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 8452 20 95 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 1500.00 0.00606060606060606061 \N \N \N 122 M 8453 20 95 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 8454 20 95 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -328.45 -0.00132707070707070707 \N \N \N 157 M 8455 20 95 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 M 8456 20 95 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 8457 20 95 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 110000.00 0.44444444444444444444 0.00 \N \N \N M 8458 20 95 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 110000.00 0.44444444444444444444 \N \N \N 108 M 8459 20 95 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 8460 20 95 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 8461 20 95 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 148 M 8462 20 95 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 8463 20 95 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 8464 20 95 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 289.49 0.00116965656565656566 0.00 \N \N \N M 8465 20 95 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 8466 20 95 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 8467 20 95 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 8468 20 95 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 989.00 0.00399595959595959596 \N \N \N 120 M 8469 20 95 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 85.00 0.00034343434343434343 \N \N \N 139 M 8470 20 95 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 158 M 8471 20 95 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 160 M 8472 20 95 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 159 M 8473 20 95 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 8474 20 95 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 8475 20 95 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 8476 20 95 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 8477 20 95 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 8478 20 95 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 8479 20 95 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -784.51 -0.00316973737373737374 \N \N \N 117 M 8480 20 95 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 8481 20 95 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 8482 20 95 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 8483 20 95 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 145 M 8484 20 95 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 8485 20 95 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 247500.00 1.00000000000000000000 \N \N Total Sales \N M 8486 20 95 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 1171.55 0.00473353535353535354 \N \N Total Other Revenue \N M 8487 20 95 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 110000.00 0.44444444444444444444 \N \N Total Cost Of Sales \N M 8488 20 95 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 138671.55 0.56028909090909090909 \N \N GROSS PROFIT \N M 8489 20 95 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 289.49 0.00116965656565656566 \N \N Total Expenses \N M 8490 20 95 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 138382.06 \N \N \N NET INCOME \N M 8491 20 96 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 121901.32 1.0822355139151430 0.00 \N \N \N M 8492 20 96 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 112638.44 1.00000000000000000000 0.00 \N \N \N M 8493 20 96 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 103 M 8494 20 96 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 112638.44 1.00000000000000000000 \N \N \N 141 M 8495 20 96 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 140 M 8496 20 96 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 8497 20 96 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 115 M 8498 20 96 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 142 M 8499 20 96 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 8500 20 96 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 8501 20 96 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 -1083.02 -0.00961501242382263107 0.00 \N \N \N M 8502 20 96 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 8503 20 96 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 1012.00 0.00898449943021227922 \N \N \N 122 M 8504 20 96 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 8505 20 96 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -2123.02 -0.01884809484222260180 \N \N \N 157 M 8506 20 96 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 28.00 0.00024858298818769152 \N \N \N 101 M 8507 20 96 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 8508 20 96 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 -10345.90 -0.09185052633896563198 0.00 \N \N \N M 8509 20 96 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 -10345.90 -0.09185052633896563198 \N \N \N 108 M 8510 20 96 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 8511 20 96 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 8512 20 96 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 148 M 8513 20 96 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 8514 20 96 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 8515 20 96 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 5111.34 0.04537829181583125619 0.00 \N \N \N M 8516 20 96 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 8517 20 96 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 8518 20 96 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 8519 20 96 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 355.00 0.00315167717166537463 \N \N \N 120 M 8520 20 96 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 400.00 0.00355118554553845028 \N \N \N 139 M 8521 20 96 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 1400.00 0.01242914940938457599 \N \N \N 158 M 8522 20 96 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 3400.00 0.03018507713707682741 \N \N \N 160 M 8523 20 96 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 159 M 8524 20 96 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 8525 20 96 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 8526 20 96 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 8527 20 96 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 8528 20 96 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 8529 20 96 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 8530 20 96 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -443.66 -0.00393879744783397213 \N \N \N 117 M 8531 20 96 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 8532 20 96 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 8533 20 96 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 8534 20 96 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 145 M 8535 20 96 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 8536 20 96 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 112638.44 1.00000000000000000000 \N \N Total Sales \N M 8537 20 96 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 -1083.02 -0.00961501242382263107 \N \N Total Other Revenue \N M 8538 20 96 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 -10345.90 -0.09185052633896563198 \N \N Total Cost Of Sales \N M 8539 20 96 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 121901.32 1.0822355139151430 \N \N GROSS PROFIT \N M 8540 20 96 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 5111.34 0.04537829181583125619 \N \N Total Expenses \N M 8541 20 96 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 116789.98 \N \N \N NET INCOME \N M 8542 20 97 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 253329.99 0.97999999922630557935 0.00 \N \N \N M 8543 20 97 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 258499.99 1.00000000000000000000 0.00 \N \N \N M 8544 20 97 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 103 M 8545 20 97 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 258499.99 1.00000000000000000000 \N \N \N 141 M 8546 20 97 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 140 M 8547 20 97 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 8548 20 97 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 115 M 8549 20 97 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 142 M 8550 20 97 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 8551 20 97 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 8552 20 97 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 -5170.00 -0.02000000077369442065 0.00 \N \N \N M 8553 20 97 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 8554 20 97 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 122 M 8555 20 97 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 123 M 8556 20 97 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -5170.00 -0.02000000077369442065 \N \N \N 157 M 8557 20 97 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 M 8558 20 97 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 8559 20 97 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 0.00 0.000000000000000000000000 0.00 \N \N \N M 8560 20 97 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 108 M 8561 20 97 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 8562 20 97 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 8563 20 97 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 148 M 8564 20 97 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 8565 20 97 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 8566 20 97 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 3000.00 0.01160541630968728471 0.00 \N \N \N M 8567 20 97 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 8568 20 97 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 8569 20 97 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 8570 20 97 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 8571 20 97 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 3000.00 0.01160541630968728471 \N \N \N 139 M 8572 20 97 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 158 M 8573 20 97 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 160 M 8574 20 97 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 159 M 8575 20 97 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 8576 20 97 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 8577 20 97 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 91 M 8578 20 97 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 8579 20 97 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 8580 20 97 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 8581 20 97 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 8582 20 97 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 8583 20 97 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 8584 20 97 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 8585 20 97 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 145 M 8586 20 97 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 8587 20 97 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 258499.99 1.00000000000000000000 \N \N Total Sales \N M 8588 20 97 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 -5170.00 -0.02000000077369442065 \N \N Total Other Revenue \N M 8589 20 97 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N Total Cost Of Sales \N M 8590 20 97 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 253329.99 0.97999999922630557935 \N \N GROSS PROFIT \N M 8591 20 97 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 3000.00 0.01160541630968728471 \N \N Total Expenses \N M 8592 20 97 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 250329.99 \N \N \N NET INCOME \N M 8593 20 98 admin 1 0 G 148 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 329.99 0.00064653214432860784 0.00 \N \N \N M 8594 20 98 admin 2 1 G 149 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 510399.99 1.00000000000000000000 0.00 \N \N \N M 8595 20 98 admin 3 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 148500.00 0.29094828156246633155 \N \N \N 103 M 8596 20 98 admin 4 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 361899.99 0.70905171843753366845 \N \N \N 141 M 8597 20 98 admin 5 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 140 M 8598 20 98 admin 6 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 135 M 8599 20 98 admin 7 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 115 M 8600 20 98 admin 8 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 142 M 8601 20 98 admin 9 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 144 M 8602 20 98 admin 10 2 I 264 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 149 0.00 0.000000000000000000000000 \N \N \N 147 M 8603 20 98 admin 12 1 G 151 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 -180070.00 -0.35280173105019065537 0.00 \N \N \N M 8604 20 98 admin 13 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 121 M 8605 20 98 admin 14 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 8050.00 0.01577194388267915131 \N \N \N 122 M 8606 20 98 admin 15 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -185150.00 -0.36275470930162048005 \N \N \N 123 M 8607 20 98 admin 16 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 -2970.00 -0.00581896563124932663 \N \N \N 157 M 8608 20 98 admin 17 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 101 M 8609 20 98 admin 18 2 I 265 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 151 0.00 0.000000000000000000000000 \N \N \N 154 M 8610 20 98 admin 20 1 G 152 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 148 330000.00 0.64655173680548073678 0.00 \N \N \N M 8611 20 98 admin 21 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 330000.00 0.64655173680548073678 \N \N \N 108 M 8612 20 98 admin 22 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 136 M 8613 20 98 admin 23 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 137 M 8614 20 98 admin 24 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 148 M 8615 20 98 admin 25 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 152 M 8616 20 98 admin 26 2 I 266 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 152 0.00 0.000000000000000000000000 \N \N \N 153 M 8617 20 98 admin 29 0 G 153 0.00 0.00 0.00 0.00 0.00 \N \N \N \N 0.00000000000000000000 -1 -74000.00 -0.14498432885941083189 0.00 \N \N \N M 8618 20 98 admin 30 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 97 M 8619 20 98 admin 31 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 131 M 8620 20 98 admin 32 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 119 M 8621 20 98 admin 33 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 120 M 8622 20 98 admin 34 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 3000.00 0.00587774306186800670 \N \N \N 139 M 8623 20 98 admin 35 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 158 M 8624 20 98 admin 36 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 160 M 8625 20 98 admin 37 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 159 M 8626 20 98 admin 38 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 98 M 8627 20 98 admin 39 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 110 M 8628 20 98 admin 40 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 -77000.00 -0.15086207192127883858 \N \N \N 91 M 8629 20 98 admin 41 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 92 M 8630 20 98 admin 42 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 93 M 8631 20 98 admin 43 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 125 M 8632 20 98 admin 44 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 117 M 8633 20 98 admin 45 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 118 M 8634 20 98 admin 46 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 150 M 8635 20 98 admin 47 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 149 M 8636 20 98 admin 48 1 I 267 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 145 M 8637 20 98 admin 49 1 I 294 \N \N \N \N 0 \N \N \N \N 0.00000000000000000000 153 0.00 0.000000000000000000000000 \N \N \N 112 M 8638 20 98 admin 11 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 149 510399.99 1.00000000000000000000 \N \N Total Sales \N M 8639 20 98 admin 19 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 151 -180070.00 -0.35280173105019065537 \N \N Total Other Revenue \N M 8640 20 98 admin 27 2 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 152 330000.00 0.64655173680548073678 \N \N Total Cost Of Sales \N M 8641 20 98 admin 28 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 148 329.99 0.00064653214432860784 \N \N GROSS PROFIT \N M 8642 20 98 admin 50 1 T -1 \N \N \N \N 0.00 \N \N \N \N 0.00000000000000000000 153 -74000.00 -0.14498432885941083189 \N \N Total Expenses \N M 8643 20 98 admin 51 0 T -1 \N \N \N \N 0.00 \N \N \N \N \N \N 74329.99 \N \N \N NET INCOME \N M 8644 21 94 admin 1 0 G 143 0.00 5687863.48 0.00 0.00 0.00 \N \N \N \N \N -1 103350.00 \N 0.00 \N \N \N M 8645 21 94 admin 2 1 G 154 0.00 5556863.69 0.00 0.00 0.00 \N 0.97696854179770151586 \N \N 0.00000000000000000000 143 103350.00 \N 0.00 \N \N \N M 8646 21 94 admin 3 2 G 155 0.00 4851351.26 0.00 0.00 0.00 \N 0.85293032736432696518 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 8647 21 94 admin 4 3 I 268 \N 3950012.24 \N \N 0 \N 0.69446326443826672155 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 109 M 8648 21 94 admin 5 3 I 268 \N 4696.37 \N \N 0 \N 0.00082568261641891588 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 8649 21 94 admin 6 3 I 268 \N 896642.65 \N \N 0 \N 0.15764138030964132775 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 127 M 8650 21 94 admin 7 3 I 268 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 143 M 8651 21 94 admin 9 2 G 163 0.00 396870.04 0.00 0.00 0.00 \N 0.06977488847886342026 \N \N 0.00000000000000000000 154 103350.00 \N 0.00 \N \N \N M 8652 21 94 admin 10 3 I 269 \N 396870.04 \N \N 0 \N 0.06977488847886342026 \N \N 0.00000000000000000000 163 103350.00 \N \N \N \N 106 M 8653 21 94 admin 12 2 G 156 0.00 308642.39 0.00 0.00 0.00 \N 0.05426332595451113043 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 8654 21 94 admin 13 3 I 270 \N 268947.52 \N \N 0 \N 0.04728445416203976823 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 85 M 8655 21 94 admin 14 3 I 270 \N 76391.92 \N \N 0 \N 0.01343068803754059160 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 138 M 8656 21 94 admin 15 3 I 270 \N 3959.81 \N \N 0 \N 0.00069618583742801084 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 8657 21 94 admin 16 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 8658 21 94 admin 17 3 I 270 \N 0.01 \N \N 0 \N 0.0000000017581293987035005278 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 86 M 8659 21 94 admin 18 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 8660 21 94 admin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 8661 21 94 admin 20 3 I 270 \N -45336.48 \N \N 0 \N -0.00797073983217332776 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 87 M 8662 21 94 admin 21 3 I 270 \N 3989.69 \N \N 0 \N 0.00070143912807133690 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 90 M 8663 21 94 admin 22 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 8664 21 94 admin 23 3 I 270 \N -0.57 \N \N 0 \N -0.000000100213375726099530 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 8665 21 94 admin 24 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 8666 21 94 admin 25 3 I 270 \N 790.49 \N \N 0 \N 0.00013897837083811301 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 146 M 8667 21 94 admin 26 3 I 272 \N -100.00 \N \N 0 \N -0.000017581293987035005278 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 8668 21 94 admin 29 1 G 157 0.00 130999.79 0.00 0.00 0.00 \N 0.02303145820229848414 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 8669 21 94 admin 30 2 I 271 \N 145999.79 \N \N 0 \N 0.02566865230035373493 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 8670 21 94 admin 31 2 I 308 \N -15000.00 \N \N 0 \N \N \N \N \N 157 0.00 \N \N \N \N 156 M 8671 21 94 admin 34 0 G 144 0.00 5687863.48 0.00 0.00 0.00 \N \N \N \N \N -1 0.00 \N 0.00 \N \N \N M 8672 21 94 admin 35 1 G 145 0.00 120057.70 0.00 0.00 0.00 \N 0.02110769719107252553 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 8673 21 94 admin 36 2 G 164 0.00 22956.05 0.00 0.00 0.00 \N 0.00403597063831074933 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 8674 21 94 admin 37 3 I 274 \N 22956.05 \N \N 0 \N 0.00403597063831074933 \N \N 0.00000000000000000000 164 0.00 \N \N \N \N 99 M 8675 21 99 admin 42 3 I 273 \N 3400.00 \N \N 0 \N 0.00054485941154459211 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 161 M 8676 21 94 admin 39 2 G 158 0.00 57101.65 0.00 0.00 0.00 \N 0.01003920895794777409 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 8677 21 94 admin 40 3 I 273 \N 20227.65 \N \N 0 \N 0.00355628261316848625 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 8678 21 94 admin 41 3 I 273 \N 19344.78 \N \N 0 \N 0.00340106264294515029 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 94 M 8679 21 94 admin 42 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 161 M 8680 21 94 admin 43 3 I 273 \N 19087.73 \N \N 0 \N 0.00335586992675147681 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 8681 21 94 admin 44 3 I 273 \N -505.22 \N \N 0 \N -0.000088824213481298253663 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 8682 21 94 admin 45 3 I 273 \N -1014.64 \N \N 0 \N -0.00017838684131005198 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 155 M 8683 21 94 admin 46 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 8684 21 94 admin 47 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 8685 21 94 admin 48 3 I 273 \N -870.00 \N \N 0 \N -0.00015295725768720455 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 95 M 8686 21 94 admin 49 3 I 273 \N 631.35 \N \N 0 \N 0.00011099949958714551 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 8687 21 94 admin 50 3 I 273 \N 200.00 \N \N 0 \N 0.000035162587974070010555 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 8688 21 94 admin 52 2 G 159 0.00 40000.00 0.00 0.00 0.00 \N 0.00703251759481400211 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 8689 21 94 admin 53 3 I 275 \N 40000.00 \N \N 0 \N 0.00703251759481400211 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 8690 21 94 admin 56 1 G 146 0.00 5567805.78 0.00 0.00 0.00 \N 0.97889230280892747447 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 8691 21 94 admin 57 2 G 160 0.00 1529999.99 0.00 0.00 0.00 \N 0.26899379624350618204 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8692 21 94 admin 58 3 I 276 \N 1419999.99 \N \N 0 \N 0.24965437285776767624 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 8693 21 94 admin 59 3 I 276 \N 110000.00 \N \N 0 \N 0.01933942338573850581 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 8694 21 94 admin 61 2 G 147 \N 203350.00 \N \N 0.00 \N 0.03652246648589096439 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 8695 21 94 admin 62 2 G 162 0.00 3834455.79 0.00 0.00 0.00 \N 0.67414694524278560919 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8696 21 94 admin 63 3 I 277 \N 3834455.79 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 8697 21 94 admin 8 3 T -1 \N 4851351.26 \N \N 0.00 \N 0.85293032736432696518 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 8698 21 94 admin 11 3 T -1 \N 396870.04 \N \N 0.00 \N 0.06977488847886342026 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 8699 21 94 admin 27 3 T -1 \N 308642.39 \N \N 0.00 \N 0.05426332595451113043 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 8700 21 94 admin 28 2 T -1 \N 5556863.69 \N \N 0.00 \N 0.97696854179770151586 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 8701 21 94 admin 32 2 T -1 \N 130999.79 \N \N 0.00 \N 0.02303145820229848414 \N \N 0.00000000000000000000 157 \N \N \N \N Net Fixed Assets \N M 8702 21 94 admin 33 1 T -1 \N 5687863.48 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 8703 21 94 admin 38 3 T -1 \N 22956.05 \N \N 0.00 \N 0.00403597063831074933 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 8704 21 94 admin 51 3 T -1 \N 57101.65 \N \N 0.00 \N 0.01003920895794777409 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 8705 21 94 admin 54 3 T -1 \N 40000.00 \N \N 0.00 \N 0.00703251759481400211 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 8706 21 94 admin 55 2 T -1 \N 120057.70 \N \N 0.00 \N 0.02110769719107252553 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 8707 21 94 admin 60 3 T -1 \N 1529999.99 \N \N 0.00 \N 0.26899379624350618204 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 8708 21 94 admin 64 3 T -1 \N 3834455.79 \N \N 0.00 \N 0.67414694524278560919 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 8709 21 94 admin 65 2 T -1 \N 5567805.78 \N \N 0.00 \N 0.97889230280892747447 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 8710 21 94 admin 66 1 T -1 \N 5687863.48 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 8711 21 94 admin 67 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 8712 21 95 admin 1 0 G 143 0.00 5816870.52 0.00 0.00 0.00 \N \N \N \N \N -1 129007.04 \N 0.00 \N \N \N M 8713 21 95 admin 2 1 G 154 0.00 5685870.73 0.00 0.00 0.00 \N 0.97747933540043796608 \N \N 0.00000000000000000000 143 129007.04 \N 0.00 \N \N \N M 8714 21 95 admin 3 2 G 155 0.00 5097821.21 0.00 0.00 0.00 \N 0.87638553969394525907 \N \N 0.00000000000000000000 154 246469.95 \N 0.00 \N \N \N M 8715 21 95 admin 4 3 I 268 \N 4115982.19 \N \N 0 \N 0.70759391598078755241 \N \N 0.00000000000000000000 155 165969.95 \N \N \N \N 109 M 8716 21 95 admin 5 3 I 268 \N 4696.37 \N \N 0 \N 0.00080737055842185052 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 8717 21 95 admin 6 3 I 268 \N 977142.65 \N \N 0 \N 0.16798425315473585615 \N \N 0.00000000000000000000 155 80500.00 \N \N \N \N 127 M 8718 21 95 admin 7 3 I 268 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 143 M 8719 21 95 admin 9 2 G 163 0.00 279407.13 0.00 0.00 0.00 \N 0.04803392632504393445 \N \N 0.00000000000000000000 154 -117462.91 \N 0.00 \N \N \N M 8720 21 95 admin 10 3 I 269 \N 279407.13 \N \N 0 \N 0.04803392632504393445 \N \N 0.00000000000000000000 163 -117462.91 \N \N \N \N 106 M 8721 21 95 admin 12 2 G 156 0.00 308642.39 0.00 0.00 0.00 \N 0.05305986938144877256 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 8722 21 95 admin 13 3 I 270 \N 268947.52 \N \N 0 \N 0.04623577559020516070 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 85 M 8723 21 95 admin 14 3 I 270 \N 76391.92 \N \N 0 \N 0.01313282111701533972 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 138 M 8724 21 95 admin 15 3 I 270 \N 3959.81 \N \N 0 \N 0.00068074576980613280 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 8725 21 95 admin 16 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 8726 21 95 admin 17 3 I 270 \N 0.01 \N \N 0 \N 0.0000000017191374581258514931 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 86 M 8727 21 95 admin 18 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 8728 21 95 admin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 8729 21 95 admin 20 3 I 270 \N -45336.48 \N \N 0 \N -0.00779396409875735037 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 87 M 8730 21 95 admin 21 3 I 270 \N 3989.69 \N \N 0 \N 0.00068588255253101284 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 90 M 8731 21 95 admin 22 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 8732 21 95 admin 23 3 I 270 \N -0.57 \N \N 0 \N -0.000000097990835113173535 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 8733 21 95 admin 24 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 8734 21 95 admin 25 3 I 270 \N 790.49 \N \N 0 \N 0.00013589609692739043 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 146 M 8735 21 95 admin 26 3 I 272 \N -100.00 \N \N 0 \N -0.000017191374581258514931 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 8736 21 95 admin 29 1 G 157 0.00 130999.79 0.00 0.00 0.00 \N 0.02252066459956203392 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 8737 21 95 admin 30 2 I 271 \N 145999.79 \N \N 0 \N 0.02509937078675081116 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 8738 21 95 admin 31 2 I 308 \N -15000.00 \N \N 0 \N \N \N \N \N 157 0.00 \N \N \N \N 156 M 8739 21 95 admin 34 0 G 144 0.00 5816870.52 0.00 0.00 0.00 \N \N \N \N \N -1 -9375.02 \N 0.00 \N \N \N M 8740 21 95 admin 35 1 G 145 0.00 110682.68 0.00 0.00 0.00 \N 0.01902787411537570205 \N \N 0.00000000000000000000 144 -9375.02 \N 0.00 \N \N \N M 8741 21 95 admin 36 2 G 164 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 145 -22956.05 \N 0.00 \N \N \N M 8742 21 95 admin 37 3 I 274 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 164 -22956.05 \N \N \N \N 99 M 8743 21 95 admin 39 2 G 158 0.00 70682.68 0.00 0.00 0.00 \N 0.01215132428287229608 \N \N 0.00000000000000000000 145 13581.03 \N 0.00 \N \N \N M 8744 21 95 admin 40 3 I 273 \N 21450.00 \N \N 0 \N 0.00368754984767995145 \N \N 0.00000000000000000000 158 1222.35 \N \N \N \N 133 M 8745 21 95 admin 41 3 I 273 \N 19344.78 \N \N 0 \N 0.00332563359172038094 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 94 M 8746 21 95 admin 42 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 161 M 8747 21 95 admin 43 3 I 273 \N 31446.41 \N \N 0 \N 0.00540607013545833577 \N \N 0.00000000000000000000 158 12358.68 \N \N \N \N 102 M 8748 21 95 admin 44 3 I 273 \N -505.22 \N \N 0 \N -0.000086854262659434269133 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 8749 21 95 admin 45 3 I 273 \N -1014.64 \N \N 0 \N -0.00017443056305128140 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 155 M 8750 21 95 admin 46 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 8751 21 95 admin 47 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 8752 21 95 admin 48 3 I 273 \N -870.00 \N \N 0 \N -0.00014956495885694908 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 95 M 8753 21 95 admin 49 3 I 273 \N 631.35 \N \N 0 \N 0.00010853774341877563 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 8754 21 95 admin 50 3 I 273 \N 200.00 \N \N 0 \N 0.000034382749162517029862 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 8755 21 95 admin 52 2 G 159 0.00 40000.00 0.00 0.00 0.00 \N 0.00687654983250340597 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 8756 21 95 admin 53 3 I 275 \N 40000.00 \N \N 0 \N 0.00687654983250340597 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 8757 21 95 admin 56 1 G 146 0.00 5706187.84 0.00 0.00 0.00 \N 0.98097212588462429795 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 8758 21 95 admin 57 2 G 160 0.00 1529999.99 0.00 0.00 0.00 \N 0.26302802937411782032 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8759 21 95 admin 58 3 I 276 \N 1419999.99 \N \N 0 \N 0.24411751733473345389 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 8760 21 95 admin 59 3 I 276 \N 110000.00 \N \N 0 \N 0.01891051203938436642 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 8761 21 95 admin 61 2 G 147 \N 341732.06 \N \N 0.00 \N 0.05988797943251724430 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 8762 21 95 admin 62 2 G 162 0.00 3834455.79 0.00 0.00 0.00 \N 0.65919565801165538063 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8763 21 95 admin 63 3 I 277 \N 3834455.79 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 8764 21 95 admin 8 3 T -1 \N 5097821.21 \N \N 0.00 \N 0.87638553969394525907 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 8765 21 95 admin 11 3 T -1 \N 279407.13 \N \N 0.00 \N 0.04803392632504393445 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 8766 21 95 admin 27 3 T -1 \N 308642.39 \N \N 0.00 \N 0.05305986938144877256 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 8767 21 95 admin 28 2 T -1 \N 5685870.73 \N \N 0.00 \N 0.97747933540043796608 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 8768 21 95 admin 32 2 T -1 \N 130999.79 \N \N 0.00 \N 0.02252066459956203392 \N \N 0.00000000000000000000 157 \N \N \N \N Net Fixed Assets \N M 8769 21 95 admin 33 1 T -1 \N 5816870.52 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 8770 21 95 admin 38 3 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 8771 21 95 admin 51 3 T -1 \N 70682.68 \N \N 0.00 \N 0.01215132428287229608 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 8772 21 95 admin 54 3 T -1 \N 40000.00 \N \N 0.00 \N 0.00687654983250340597 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 8773 21 95 admin 55 2 T -1 \N 110682.68 \N \N 0.00 \N 0.01902787411537570205 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 8774 21 95 admin 60 3 T -1 \N 1529999.99 \N \N 0.00 \N 0.26302802937411782032 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 8775 21 95 admin 64 3 T -1 \N 3834455.79 \N \N 0.00 \N 0.65919565801165538063 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 8776 21 95 admin 65 2 T -1 \N 5706187.84 \N \N 0.00 \N 0.98097212588462429795 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 8777 21 95 admin 66 1 T -1 \N 5816870.52 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 8778 21 95 admin 67 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 8779 21 96 admin 1 0 G 143 0.00 5916998.34 0.00 0.00 0.00 \N \N \N \N \N -1 100127.82 \N 0.00 \N \N \N M 8780 21 96 admin 2 1 G 154 0.00 5785998.55 0.00 0.00 0.00 \N 0.97786043151061624263 \N \N 0.00000000000000000000 143 100127.82 \N 0.00 \N \N \N M 8781 21 96 admin 3 2 G 155 0.00 5434477.13 0.00 0.00 0.00 \N 0.91845169082808970333 \N \N 0.00000000000000000000 154 336655.92 \N 0.00 \N \N \N M 8782 21 96 admin 4 3 I 268 \N 4312896.47 \N \N 0 \N 0.72889938819891573605 \N \N 0.00000000000000000000 155 196914.28 \N \N \N \N 109 M 8783 21 96 admin 5 3 I 268 \N 103372.61 \N \N 0 \N 0.01747044769324711354 \N \N 0.00000000000000000000 155 98676.24 \N \N \N \N 126 M 8784 21 96 admin 6 3 I 268 \N 1018208.05 \N \N 0 \N 0.17208185493592685375 \N \N 0.00000000000000000000 155 41065.40 \N \N \N \N 127 M 8785 21 96 admin 7 3 I 268 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 143 M 8786 21 96 admin 9 2 G 163 0.00 7500.29 0.00 0.00 0.00 \N 0.00126758359036484029 \N \N 0.00000000000000000000 154 -271906.84 \N 0.00 \N \N \N M 8787 21 96 admin 10 3 I 269 \N 7500.29 \N \N 0 \N 0.00126758359036484029 \N \N 0.00000000000000000000 163 -271906.84 \N \N \N \N 106 M 8788 21 96 admin 12 2 G 156 0.00 344021.13 0.00 0.00 0.00 \N 0.05814115709216169900 \N \N 0.00000000000000000000 154 35378.74 \N 0.00 \N \N \N M 8789 21 96 admin 13 3 I 270 \N 272266.80 \N \N 0 \N 0.04601434449616560143 \N \N 0.00000000000000000000 156 3319.28 \N \N \N \N 85 M 8790 21 96 admin 14 3 I 270 \N 67104.60 \N \N 0 \N 0.01134098678824371615 \N \N 0.00000000000000000000 156 -9287.32 \N \N \N \N 138 M 8791 21 96 admin 15 3 I 270 \N 3959.81 \N \N 0 \N 0.00066922614685066821 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 8792 21 96 admin 16 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 8793 21 96 admin 17 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 -0.01 \N \N \N \N 86 M 8794 21 96 admin 18 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 8795 21 96 admin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 8796 21 96 admin 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 45336.48 \N \N \N \N 87 M 8797 21 96 admin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 -3989.69 \N \N \N \N 90 M 8798 21 96 admin 22 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 8799 21 96 admin 23 3 I 270 \N -0.57 \N \N 0 \N -0.000000096332628006111626 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 8800 21 96 admin 24 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 8801 21 96 admin 25 3 I 270 \N 790.49 \N \N 0 \N 0.00013359645458342312 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 146 M 8802 21 96 admin 26 3 I 272 \N -100.00 \N \N 0 \N -0.000016900461053703794009 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 8803 21 96 admin 29 1 G 157 0.00 130999.79 0.00 0.00 0.00 \N 0.02213956848938375737 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 8804 21 96 admin 30 2 I 271 \N 145999.79 \N \N 0 \N 0.02467463764743932647 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 8805 21 96 admin 31 2 I 308 \N -15000.00 \N \N 0 \N \N \N \N \N 157 0.00 \N \N \N \N 156 M 8806 21 96 admin 34 0 G 144 0.00 5916998.34 0.00 0.00 0.00 \N \N \N \N \N -1 -16662.16 \N 0.00 \N \N \N M 8807 21 96 admin 35 1 G 145 0.00 94020.52 0.00 0.00 0.00 \N 0.01588990136508978639 \N \N 0.00000000000000000000 144 -16662.16 \N 0.00 \N \N \N M 8808 21 96 admin 36 2 G 164 0.00 555.00 0.00 0.00 0.00 \N 0.000093797558848056056747 \N \N 0.00000000000000000000 145 555.00 \N 0.00 \N \N \N M 8809 21 96 admin 37 3 I 274 \N 555.00 \N \N 0 \N 0.000093797558848056056747 \N \N 0.00000000000000000000 164 555.00 \N \N \N \N 99 M 8810 21 96 admin 39 2 G 158 0.00 53465.52 0.00 0.00 0.00 \N 0.00903591938476021273 \N \N 0.00000000000000000000 145 -17217.16 \N 0.00 \N \N \N M 8811 21 96 admin 40 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 -21450.00 \N \N \N \N 133 M 8812 21 96 admin 41 3 I 273 \N 20177.62 \N \N 0 \N 0.00341011080966434748 \N \N 0.00000000000000000000 158 832.84 \N \N \N \N 94 M 8813 21 96 admin 42 3 I 273 \N 3400.00 \N \N 0 \N 0.00057461567582592900 \N \N 0.00000000000000000000 158 3400.00 \N \N \N \N 161 M 8814 21 96 admin 43 3 I 273 \N 31446.41 \N \N 0 \N 0.00531458827483801525 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 8815 21 96 admin 44 3 I 273 \N -505.22 \N \N 0 \N -0.000085384509335522308090 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 8816 21 96 admin 45 3 I 273 \N -1014.64 \N \N 0 \N -0.00017147883803530018 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 155 M 8817 21 96 admin 46 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 8818 21 96 admin 47 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 8819 21 96 admin 48 3 I 273 \N -870.00 \N \N 0 \N -0.00014703401116722301 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 95 M 8820 21 96 admin 49 3 I 273 \N 631.35 \N \N 0 \N 0.00010670106086255890 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 8821 21 96 admin 50 3 I 273 \N 200.00 \N \N 0 \N 0.000033800922107407588017 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 8822 21 96 admin 52 2 G 159 0.00 40000.00 0.00 0.00 0.00 \N 0.00676018442148151760 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 8823 21 96 admin 53 3 I 275 \N 40000.00 \N \N 0 \N 0.00676018442148151760 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 8824 21 96 admin 56 1 G 146 0.00 5822977.82 0.00 0.00 0.00 \N 0.98411009863491021361 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 8825 21 96 admin 57 2 G 160 0.00 1529999.99 0.00 0.00 0.00 \N 0.25857705243162194296 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8826 21 96 admin 58 3 I 276 \N 1419999.99 \N \N 0 \N 0.23998654527254776955 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 8827 21 96 admin 59 3 I 276 \N 110000.00 \N \N 0 \N 0.01859050715907417341 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 8828 21 96 admin 61 2 G 147 \N 458522.04 \N \N 0.00 \N 0.07874356629440158163 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 8829 21 96 admin 62 2 G 162 0.00 3834455.79 0.00 0.00 0.00 \N 0.64804070741044013881 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8830 21 96 admin 63 3 I 277 \N 3834455.79 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 8831 21 96 admin 8 3 T -1 \N 5434477.13 \N \N 0.00 \N 0.91845169082808970333 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 8832 21 96 admin 11 3 T -1 \N 7500.29 \N \N 0.00 \N 0.00126758359036484029 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 8833 21 96 admin 27 3 T -1 \N 344021.13 \N \N 0.00 \N 0.05814115709216169900 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 8834 21 96 admin 28 2 T -1 \N 5785998.55 \N \N 0.00 \N 0.97786043151061624263 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 8835 21 96 admin 32 2 T -1 \N 130999.79 \N \N 0.00 \N 0.02213956848938375737 \N \N 0.00000000000000000000 157 \N \N \N \N Net Fixed Assets \N M 8836 21 96 admin 33 1 T -1 \N 5916998.34 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 8837 21 96 admin 38 3 T -1 \N 555.00 \N \N 0.00 \N 0.000093797558848056056747 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 8838 21 96 admin 51 3 T -1 \N 53465.52 \N \N 0.00 \N 0.00903591938476021273 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 8839 21 96 admin 54 3 T -1 \N 40000.00 \N \N 0.00 \N 0.00676018442148151760 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 8840 21 96 admin 55 2 T -1 \N 94020.52 \N \N 0.00 \N 0.01588990136508978639 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 8841 21 96 admin 60 3 T -1 \N 1529999.99 \N \N 0.00 \N 0.25857705243162194296 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 8842 21 96 admin 64 3 T -1 \N 3834455.79 \N \N 0.00 \N 0.64804070741044013881 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 8843 21 96 admin 65 2 T -1 \N 5822977.82 \N \N 0.00 \N 0.98411009863491021361 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 8844 21 96 admin 66 1 T -1 \N 5916998.34 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 8845 21 96 admin 67 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 8846 21 97 admin 1 0 G 143 0.00 6244328.33 0.00 0.00 0.00 \N \N \N \N \N -1 327329.99 \N 0.00 \N \N \N M 8847 21 97 admin 2 1 G 154 0.00 6113328.54 0.00 0.00 0.00 \N 0.97902099584183780420 \N \N 0.00000000000000000000 143 327329.99 \N 0.00 \N \N \N M 8848 21 97 admin 3 2 G 155 0.00 5579977.12 0.00 0.00 0.00 \N 0.89360725847674957220 \N \N 0.00000000000000000000 154 145499.99 \N 0.00 \N \N \N M 8849 21 97 admin 4 3 I 268 \N 4199896.47 \N \N 0 \N 0.67259379200516831247 \N \N 0.00000000000000000000 155 -113000.00 \N \N \N \N 109 M 8850 21 97 admin 5 3 I 268 \N 103372.61 \N \N 0 \N 0.01655464039316459197 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 8851 21 97 admin 6 3 I 268 \N 1276708.04 \N \N 0 \N 0.20445882607841666775 \N \N 0.00000000000000000000 155 258499.99 \N \N \N \N 127 M 8852 21 97 admin 7 3 I 268 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 143 M 8853 21 97 admin 9 2 G 163 0.00 2330.29 0.00 0.00 0.00 \N 0.00037318505319530499 \N \N 0.00000000000000000000 154 -5170.00 \N 0.00 \N \N \N M 8854 21 97 admin 10 3 I 269 \N 2330.29 \N \N 0 \N 0.00037318505319530499 \N \N 0.00000000000000000000 163 -5170.00 \N \N \N \N 106 M 8855 21 97 admin 12 2 G 156 0.00 531021.13 0.00 0.00 0.00 \N 0.08504055231189292700 \N \N 0.00000000000000000000 154 187000.00 \N 0.00 \N \N \N M 8856 21 97 admin 13 3 I 270 \N 459266.80 \N \N 0 \N 0.07354943169684352584 \N \N 0.00000000000000000000 156 187000.00 \N \N \N \N 85 M 8857 21 97 admin 14 3 I 270 \N 67104.60 \N \N 0 \N 0.01074648808545273916 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 138 M 8858 21 97 admin 15 3 I 270 \N 3959.81 \N \N 0 \N 0.00063414506584729826 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 8859 21 97 admin 16 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 8860 21 97 admin 17 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 86 M 8861 21 97 admin 18 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 8862 21 97 admin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 8863 21 97 admin 20 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 87 M 8864 21 97 admin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 90 M 8865 21 97 admin 22 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 8866 21 97 admin 23 3 I 270 \N -0.57 \N \N 0 \N -0.000000091282836179756102 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 8867 21 97 admin 24 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 8868 21 97 admin 25 3 I 270 \N 790.49 \N \N 0 \N 0.00012659327924865860 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 146 M 8869 21 97 admin 26 3 I 272 \N -100.00 \N \N 0 \N -0.000016014532663115105608 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 8870 21 97 admin 29 1 G 157 0.00 130999.79 0.00 0.00 0.00 \N 0.02097900415816219580 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 8871 21 97 admin 30 2 I 271 \N 145999.79 \N \N 0 \N 0.02338118405762946165 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 8872 21 97 admin 31 2 I 308 \N -15000.00 \N \N 0 \N \N \N \N \N 157 0.00 \N \N \N \N 156 M 8873 21 97 admin 34 0 G 144 0.00 6244328.33 0.00 0.00 0.00 \N \N \N \N \N -1 77000.00 \N 0.00 \N \N \N M 8874 21 97 admin 35 1 G 145 0.00 171020.52 0.00 0.00 0.00 \N 0.02738813703602930181 \N \N 0.00000000000000000000 144 77000.00 \N 0.00 \N \N \N M 8875 21 97 admin 36 2 G 164 0.00 555.00 0.00 0.00 0.00 \N 0.000088880656280288836125 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 8876 21 97 admin 37 3 I 274 \N 555.00 \N \N 0 \N 0.000088880656280288836125 \N \N 0.00000000000000000000 164 0.00 \N \N \N \N 99 M 8877 21 97 admin 39 2 G 158 0.00 130465.52 0.00 0.00 0.00 \N 0.02089344331450297073 \N \N 0.00000000000000000000 145 77000.00 \N 0.00 \N \N \N M 8878 21 97 admin 40 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 8879 21 97 admin 41 3 I 273 \N 20177.62 \N \N 0 \N 0.00323135154553924617 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 94 M 8880 21 97 admin 42 3 I 273 \N 3400.00 \N \N 0 \N 0.00054449411054591359 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 161 M 8881 21 97 admin 43 3 I 273 \N 31446.41 \N \N 0 \N 0.00503599560082709488 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 8882 21 97 admin 44 3 I 273 \N -505.22 \N \N 0 \N -0.000080908621920590136554 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 8883 21 97 admin 45 3 I 273 \N -1014.64 \N \N 0 \N -0.00016248985421303111 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 155 M 8884 21 97 admin 46 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 8885 21 97 admin 47 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 8886 21 97 admin 48 3 I 273 \N 76130.00 \N \N 0 \N 0.01219186371642952990 \N \N 0.00000000000000000000 158 77000.00 \N \N \N \N 95 M 8887 21 97 admin 49 3 I 273 \N 631.35 \N \N 0 \N 0.00010110775196857722 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 8888 21 97 admin 50 3 I 273 \N 200.00 \N \N 0 \N 0.000032029065326230211216 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 8889 21 97 admin 52 2 G 159 0.00 40000.00 0.00 0.00 0.00 \N 0.00640581306524604224 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 8890 21 97 admin 53 3 I 275 \N 40000.00 \N \N 0 \N 0.00640581306524604224 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 8891 21 97 admin 56 1 G 146 0.00 6073307.81 0.00 0.00 0.00 \N 0.97261186296397069819 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 8892 21 97 admin 57 2 G 160 0.00 1529999.99 0.00 0.00 0.00 \N 0.24502234814420784949 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8893 21 97 admin 58 3 I 276 \N 1419999.99 \N \N 0 \N 0.22740636221478123332 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 8894 21 97 admin 59 3 I 276 \N 110000.00 \N \N 0 \N 0.01761598592942661617 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 8895 21 97 admin 61 2 G 147 \N 708852.03 \N \N 0.00 \N 0.11671597293864148802 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 8896 21 97 admin 62 2 G 162 0.00 3834455.79 0.00 0.00 0.00 \N 0.61407017494225836136 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8897 21 97 admin 63 3 I 277 \N 3834455.79 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 8898 21 97 admin 8 3 T -1 \N 5579977.12 \N \N 0.00 \N 0.89360725847674957220 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 8899 21 97 admin 11 3 T -1 \N 2330.29 \N \N 0.00 \N 0.00037318505319530499 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 8900 21 97 admin 27 3 T -1 \N 531021.13 \N \N 0.00 \N 0.08504055231189292700 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 8901 21 97 admin 28 2 T -1 \N 6113328.54 \N \N 0.00 \N 0.97902099584183780420 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 8902 21 97 admin 32 2 T -1 \N 130999.79 \N \N 0.00 \N 0.02097900415816219580 \N \N 0.00000000000000000000 157 \N \N \N \N Net Fixed Assets \N M 8903 21 97 admin 33 1 T -1 \N 6244328.33 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 8904 21 97 admin 38 3 T -1 \N 555.00 \N \N 0.00 \N 0.000088880656280288836125 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 8905 21 97 admin 51 3 T -1 \N 130465.52 \N \N 0.00 \N 0.02089344331450297073 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 8906 21 97 admin 54 3 T -1 \N 40000.00 \N \N 0.00 \N 0.00640581306524604224 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 8907 21 97 admin 55 2 T -1 \N 171020.52 \N \N 0.00 \N 0.02738813703602930181 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 8908 21 97 admin 60 3 T -1 \N 1529999.99 \N \N 0.00 \N 0.24502234814420784949 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 8909 21 97 admin 64 3 T -1 \N 3834455.79 \N \N 0.00 \N 0.61407017494225836136 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 8910 21 97 admin 65 2 T -1 \N 6073307.81 \N \N 0.00 \N 0.97261186296397069819 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 8911 21 97 admin 66 1 T -1 \N 6244328.33 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 8912 21 97 admin 67 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 8913 21 98 admin 1 0 G 143 0.00 6241141.82 0.00 0.00 0.00 \N \N \N \N \N -1 -3186.51 \N 0.00 \N \N \N M 8914 21 98 admin 2 1 G 154 0.00 6110142.03 0.00 0.00 0.00 \N 0.97901028469178417099 \N \N 0.00000000000000000000 143 -3186.51 \N 0.00 \N \N \N M 8915 21 98 admin 3 2 G 155 0.00 5761552.11 0.00 0.00 0.00 \N 0.92315673576537954717 \N \N 0.00000000000000000000 154 181574.99 \N 0.00 \N \N \N M 8916 21 98 admin 4 3 I 268 \N 4201841.47 \N \N 0 \N 0.67324883670084587182 \N \N 0.00000000000000000000 155 1945.00 \N \N \N \N 109 M 8917 21 98 admin 5 3 I 268 \N 103372.61 \N \N 0 \N 0.01656309261692117741 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 8918 21 98 admin 6 3 I 268 \N 1456338.03 \N \N 0 \N 0.23334480644761249793 \N \N 0.00000000000000000000 155 179629.99 \N \N \N \N 127 M 8919 21 98 admin 7 3 I 268 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 143 M 8920 21 98 admin 9 2 G 163 0.00 4530.29 0.00 0.00 0.00 \N 0.00072587518929348733 \N \N 0.00000000000000000000 154 2200.00 \N 0.00 \N \N \N M 8921 21 98 admin 10 3 I 269 \N 4530.29 \N \N 0 \N 0.00072587518929348733 \N \N 0.00000000000000000000 163 2200.00 \N \N \N \N 106 M 8922 21 98 admin 12 2 G 156 0.00 344059.63 0.00 0.00 0.00 \N 0.05512767373711113650 \N \N 0.00000000000000000000 154 -186961.50 \N 0.00 \N \N \N M 8923 21 98 admin 13 3 I 270 \N 272266.80 \N \N 0 \N 0.04362451741242438231 \N \N 0.00000000000000000000 156 -187000.00 \N \N \N \N 85 M 8924 21 98 admin 14 3 I 270 \N 70129.40 \N \N 0 \N 0.01123662977426140270 \N \N 0.00000000000000000000 156 3024.80 \N \N \N \N 138 M 8925 21 98 admin 15 3 I 270 \N 3959.81 \N \N 0 \N 0.00063446883826780273 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 8926 21 98 admin 16 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 8927 21 98 admin 17 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 86 M 8928 21 98 admin 18 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 8929 21 98 admin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 8930 21 98 admin 20 3 I 270 \N -2986.30 \N \N 0 \N -0.00047848616264900066 \N \N 0.00000000000000000000 156 -2986.30 \N \N \N \N 87 M 8931 21 98 admin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 90 M 8932 21 98 admin 22 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 8933 21 98 admin 23 3 I 270 \N -0.57 \N \N 0 \N -0.000000091329442021876696 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 8934 21 98 admin 24 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 8935 21 98 admin 25 3 I 270 \N 790.49 \N \N 0 \N 0.00012665791337521633 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 146 M 8936 21 98 admin 26 3 I 272 \N -100.00 \N \N 0 \N -0.000016022709126645034322 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 100 M 8937 21 98 admin 29 1 G 157 0.00 130999.79 0.00 0.00 0.00 \N 0.02098971530821582901 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 8938 21 98 admin 30 2 I 271 \N 145999.79 \N \N 0 \N 0.02339312167721258415 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 8939 21 98 admin 31 2 I 308 \N -15000.00 \N \N 0 \N \N \N \N \N 157 0.00 \N \N \N \N 156 M 8940 21 98 admin 61 2 G 147 \N 783182.02 \N \N 0.00 \N 0.12739560225880581319 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 8941 21 98 admin 34 0 G 144 0.00 6241141.82 0.00 0.00 0.00 \N \N \N \N \N -1 -77516.50 \N 0.00 \N \N \N M 8942 21 98 admin 35 1 G 145 0.00 93504.02 0.00 0.00 0.00 \N 0.01498187714631999822 \N \N 0.00000000000000000000 144 -77516.50 \N 0.00 \N \N \N M 8943 21 98 admin 36 2 G 164 0.00 0.00 0.00 0.00 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 145 -555.00 \N 0.00 \N \N \N M 8944 21 98 admin 37 3 I 274 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 164 -555.00 \N \N \N \N 99 M 8945 21 98 admin 39 2 G 158 0.00 53504.02 0.00 0.00 0.00 \N 0.00857279349566198449 \N \N 0.00000000000000000000 145 -76961.50 \N 0.00 \N \N \N M 8946 21 98 admin 40 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 8947 21 98 admin 41 3 I 273 \N 20216.12 \N \N 0 \N 0.00323917010429351211 \N \N 0.00000000000000000000 158 38.50 \N \N \N \N 94 M 8948 21 98 admin 42 3 I 273 \N 3400.00 \N \N 0 \N 0.00054477211030593117 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 161 M 8949 21 98 admin 43 3 I 273 \N 31446.41 \N \N 0 \N 0.00503856680507221674 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 8950 21 98 admin 44 3 I 273 \N -505.22 \N \N 0 \N -0.000080949931049636042400 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 8951 21 98 admin 45 3 I 273 \N -1014.64 \N \N 0 \N -0.00016257281588259118 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 155 M 8952 21 98 admin 46 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 8953 21 98 admin 47 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 8954 21 98 admin 48 3 I 273 \N -870.00 \N \N 0 \N -0.00013939756940181180 \N \N 0.00000000000000000000 158 -77000.00 \N \N \N \N 95 M 8955 21 98 admin 49 3 I 273 \N 631.35 \N \N 0 \N 0.00010115937407107342 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 8956 21 98 admin 50 3 I 273 \N 200.00 \N \N 0 \N 0.000032045418253290068643 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 8957 21 98 admin 52 2 G 159 0.00 40000.00 0.00 0.00 0.00 \N 0.00640908365065801373 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 8958 21 98 admin 53 3 I 275 \N 40000.00 \N \N 0 \N 0.00640908365065801373 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 8959 21 98 admin 56 1 G 146 0.00 6147637.80 0.00 0.00 0.00 \N 0.98501812285368000178 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 8960 21 98 admin 57 2 G 160 0.00 1529999.99 0.00 0.00 0.00 \N 0.24514744803539811246 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8961 21 98 admin 58 3 I 276 \N 1419999.99 \N \N 0 \N 0.22752246799608857470 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 8962 21 98 admin 59 3 I 276 \N 110000.00 \N \N 0 \N 0.01762498003930953775 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 8963 21 98 admin 62 2 G 162 0.00 3834455.79 0.00 0.00 0.00 \N 0.61438369782149895129 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 8964 21 98 admin 63 3 I 277 \N 3834455.79 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 8965 21 98 admin 8 3 T -1 \N 5761552.11 \N \N 0.00 \N 0.92315673576537954717 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 8966 21 98 admin 11 3 T -1 \N 4530.29 \N \N 0.00 \N 0.00072587518929348733 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 8967 21 98 admin 27 3 T -1 \N 344059.63 \N \N 0.00 \N 0.05512767373711113650 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 8968 21 98 admin 28 2 T -1 \N 6110142.03 \N \N 0.00 \N 0.97901028469178417099 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 8969 21 98 admin 32 2 T -1 \N 130999.79 \N \N 0.00 \N 0.02098971530821582901 \N \N 0.00000000000000000000 157 \N \N \N \N Net Fixed Assets \N M 8970 21 98 admin 33 1 T -1 \N 6241141.82 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 8971 21 98 admin 38 3 T -1 \N 0.00 \N \N 0.00 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 8972 21 98 admin 51 3 T -1 \N 53504.02 \N \N 0.00 \N 0.00857279349566198449 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 8973 21 98 admin 54 3 T -1 \N 40000.00 \N \N 0.00 \N 0.00640908365065801373 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 8974 21 98 admin 55 2 T -1 \N 93504.02 \N \N 0.00 \N 0.01498187714631999822 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 8975 21 98 admin 60 3 T -1 \N 1529999.99 \N \N 0.00 \N 0.24514744803539811246 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 8976 21 98 admin 64 3 T -1 \N 3834455.79 \N \N 0.00 \N 0.61438369782149895129 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 8977 21 98 admin 65 2 T -1 \N 6147637.80 \N \N 0.00 \N 0.98501812285368000178 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 8978 21 98 admin 66 1 T -1 \N 6241141.82 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 8979 21 98 admin 67 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 8980 21 99 admin 1 0 G 143 0.00 6240141.82 0.00 0.00 0.00 \N \N \N \N \N -1 -1000.00 \N 0.00 \N \N \N M 8981 21 99 admin 2 1 G 154 0.00 6109142.03 0.00 0.00 0.00 \N 0.97900692103180437011 \N \N 0.00000000000000000000 143 -1000.00 \N 0.00 \N \N \N M 8982 21 99 admin 3 2 G 155 0.00 5761552.11 0.00 0.00 0.00 \N 0.92330467418767735635 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 8983 21 99 admin 4 3 I 268 \N 4201841.47 \N \N 0 \N 0.67335672669054819655 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 109 M 8984 21 99 admin 5 3 I 268 \N 103372.61 \N \N 0 \N 0.01656574689836135808 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 126 M 8985 21 99 admin 6 3 I 268 \N 1456338.03 \N \N 0 \N 0.23338220059876780172 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 127 M 8986 21 99 admin 7 3 I 268 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 155 0.00 \N \N \N \N 143 M 8987 21 99 admin 9 2 G 163 0.00 4530.29 0.00 0.00 0.00 \N 0.00072599151280186770 \N \N 0.00000000000000000000 154 0.00 \N 0.00 \N \N \N M 8988 21 99 admin 10 3 I 269 \N 4530.29 \N \N 0 \N 0.00072599151280186770 \N \N 0.00000000000000000000 163 0.00 \N \N \N \N 106 M 8989 21 99 admin 12 2 G 156 0.00 343059.63 0.00 0.00 0.00 \N 0.05497625533132514607 \N \N 0.00000000000000000000 154 -1000.00 \N 0.00 \N \N \N M 8990 21 99 admin 13 3 I 270 \N 272266.80 \N \N 0 \N 0.04363150836209680888 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 85 M 8991 21 99 admin 14 3 I 270 \N 70129.40 \N \N 0 \N 0.01123843047528685814 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 138 M 8992 21 99 admin 15 3 I 270 \N 3959.81 \N \N 0 \N 0.00063457051365540920 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 128 M 8993 21 99 admin 16 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 134 M 8994 21 99 admin 17 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 86 M 8995 21 99 admin 18 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 96 M 8996 21 99 admin 19 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 130 M 8997 21 99 admin 20 3 I 270 \N -2986.30 \N \N 0 \N -0.00047856284138106336 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 87 M 8998 21 99 admin 21 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 90 M 8999 21 99 admin 22 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 88 M 9000 21 99 admin 23 3 I 270 \N -0.57 \N \N 0 \N -0.000000091344077817769853 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 89 M 9001 21 99 admin 24 3 I 270 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 83 M 9002 21 99 admin 25 3 I 270 \N 790.49 \N \N 0 \N 0.00012667821065643665 \N \N 0.00000000000000000000 156 0.00 \N \N \N \N 146 M 9003 21 99 admin 26 3 I 272 \N -1100.00 \N \N 0 \N -0.00017627804491148568 \N \N 0.00000000000000000000 156 -1000.00 \N \N \N \N 100 M 9004 21 99 admin 29 1 G 157 0.00 130999.79 0.00 0.00 0.00 \N 0.02099307896819562989 \N \N 0.00000000000000000000 143 0.00 \N 0.00 \N \N \N M 9005 21 99 admin 30 2 I 271 \N 145999.79 \N \N 0 \N 0.02339687048971588918 \N \N 0.00000000000000000000 157 0.00 \N \N \N \N 111 M 9006 21 99 admin 31 2 I 308 \N -15000.00 \N \N 0 \N \N \N \N \N 157 0.00 \N \N \N \N 156 M 9007 21 99 admin 34 0 G 144 0.00 6240141.82 0.00 0.00 0.00 \N \N \N \N \N -1 -1000.00 \N 0.00 \N \N \N M 9008 21 99 admin 35 1 G 145 0.00 92504.02 0.00 0.00 0.00 \N 0.01482402526550269974 \N \N 0.00000000000000000000 144 -1000.00 \N 0.00 \N \N \N M 9009 21 99 admin 36 2 G 164 0.00 -1000.00 0.00 0.00 0.00 \N -0.00016025276810135062 \N \N 0.00000000000000000000 145 -1000.00 \N 0.00 \N \N \N M 9010 21 99 admin 37 3 I 274 \N -1000.00 \N \N 0 \N -0.00016025276810135062 \N \N 0.00000000000000000000 164 -1000.00 \N \N \N \N 99 M 9011 21 99 admin 39 2 G 158 0.00 53504.02 0.00 0.00 0.00 \N 0.00857416730955002558 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 9012 21 99 admin 40 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 133 M 9013 21 99 admin 41 3 I 273 \N 20216.12 \N \N 0 \N 0.00323968919026907629 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 94 M 9014 21 99 admin 43 3 I 273 \N 31446.41 \N \N 0 \N 0.00503937424934999314 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 102 M 9015 21 99 admin 44 3 I 273 \N -505.22 \N \N 0 \N -0.000080962903500164360047 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 129 M 9016 21 99 admin 45 3 I 273 \N -1014.64 \N \N 0 \N -0.00016259886862635439 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 155 M 9017 21 99 admin 46 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 104 M 9018 21 99 admin 47 3 I 273 \N 0.00 \N \N 0 \N 0.000000000000000000000000 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 107 M 9019 21 99 admin 48 3 I 273 \N -870.00 \N \N 0 \N -0.00013941990824817504 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 95 M 9020 21 99 admin 49 3 I 273 \N 631.35 \N \N 0 \N 0.00010117558514078771 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 105 M 9021 21 99 admin 50 3 I 273 \N 200.00 \N \N 0 \N 0.000032050553620270123925 \N \N 0.00000000000000000000 158 0.00 \N \N \N \N 132 M 9022 21 99 admin 52 2 G 159 0.00 40000.00 0.00 0.00 0.00 \N 0.00641011072405402478 \N \N 0.00000000000000000000 145 0.00 \N 0.00 \N \N \N M 9023 21 99 admin 53 3 I 275 \N 40000.00 \N \N 0 \N 0.00641011072405402478 \N \N 0.00000000000000000000 159 0.00 \N \N \N \N 116 M 9024 21 99 admin 56 1 G 146 0.00 6147637.80 0.00 0.00 0.00 \N 0.98517597473449730026 \N \N 0.00000000000000000000 144 0.00 \N 0.00 \N \N \N M 9025 21 99 admin 57 2 G 160 0.00 1529999.99 0.00 0.00 0.00 \N 0.24518673359253876701 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 9026 21 99 admin 58 3 I 276 \N 1419999.99 \N \N 0 \N 0.22755892910139019885 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 113 M 9027 21 99 admin 59 3 I 276 \N 110000.00 \N \N 0 \N 0.01762780449114856816 \N \N 0.00000000000000000000 160 0.00 \N \N \N \N 114 M 9028 21 99 admin 61 2 G 147 \N 783182.02 \N \N 0.00 \N 0.12739560225880581319 \N \N 0.00000000000000000000 146 \N \N \N \N \N \N M 9029 21 99 admin 62 2 G 162 0.00 3834455.79 0.00 0.00 0.00 \N 0.61448215450975119024 \N \N 0.00000000000000000000 146 0.00 \N 0.00 \N \N \N M 9030 21 99 admin 63 3 I 277 \N 3834455.79 \N \N 0 \N \N \N \N \N 162 0.00 \N \N \N \N 84 M 9031 21 99 admin 8 3 T -1 \N 5761552.11 \N \N 0.00 \N 0.92330467418767735635 \N \N 0.00000000000000000000 155 \N \N \N \N Total Cash Assets \N M 9032 21 99 admin 11 3 T -1 \N 4530.29 \N \N 0.00 \N 0.00072599151280186770 \N \N 0.00000000000000000000 163 \N \N \N \N Total Accounts Receivable \N M 9033 21 99 admin 27 3 T -1 \N 343059.63 \N \N 0.00 \N 0.05497625533132514607 \N \N 0.00000000000000000000 156 \N \N \N \N Total Inventory Assets \N M 9034 21 99 admin 28 2 T -1 \N 6109142.03 \N \N 0.00 \N 0.97900692103180437011 \N \N 0.00000000000000000000 154 \N \N \N \N Total Current Assets \N M 9035 21 99 admin 32 2 T -1 \N 130999.79 \N \N 0.00 \N 0.02099307896819562989 \N \N 0.00000000000000000000 157 \N \N \N \N Net Fixed Assets \N M 9036 21 99 admin 33 1 T -1 \N 6240141.82 \N \N 0.00 \N \N \N \N \N 143 \N \N \N \N Total Assets \N M 9037 21 99 admin 38 3 T -1 \N -1000.00 \N \N 0.00 \N -0.00016025276810135062 \N \N 0.00000000000000000000 164 \N \N \N \N Total Accounts Payable \N M 9038 21 99 admin 51 3 T -1 \N 53504.02 \N \N 0.00 \N 0.00857416730955002558 \N \N 0.00000000000000000000 158 \N \N \N \N Total Current Liabilities \N M 9039 21 99 admin 54 3 T -1 \N 40000.00 \N \N 0.00 \N 0.00641011072405402478 \N \N 0.00000000000000000000 159 \N \N \N \N Total Long Term Liabilities \N M 9040 21 99 admin 55 2 T -1 \N 92504.02 \N \N 0.00 \N 0.01482402526550269974 \N \N 0.00000000000000000000 145 \N \N \N \N Total Liabilities \N M 9041 21 99 admin 60 3 T -1 \N 1529999.99 \N \N 0.00 \N 0.24518673359253876701 \N \N 0.00000000000000000000 160 \N \N \N \N Total Shareholder's Equity \N M 9042 21 99 admin 64 3 T -1 \N 3834455.79 \N \N 0.00 \N 0.61448215450975119024 \N \N 0.00000000000000000000 162 \N \N \N \N Total Retained Earnings \N M 9043 21 99 admin 65 2 T -1 \N 6147637.80 \N \N 0.00 \N 0.98517597473449730026 \N \N 0.00000000000000000000 146 \N \N \N \N Total Owners Equity \N M 9044 21 99 admin 66 1 T -1 \N 6240141.82 \N \N 0.00 \N \N \N \N \N 144 \N \N \N \N Total Liabilities and Owners Equity \N M 9045 21 99 admin 67 0 T -1 \N 0.00 \N \N 0.00 \N \N \N \N \N \N \N \N \N \N BALANCE SHEET CHECK TOTAL \N M 9046 \. -- -- Data for Name: flspec; Type: TABLE DATA; Schema: public; Owner: admin -- COPY flspec (flspec_id, flspec_flhead_id, flspec_flgrp_id, flspec_order, flspec_name, flspec_type, flspec_showstart, flspec_showend, flspec_showdelta, flspec_showbudget, flspec_subtract, flspec_showstartprcnt, flspec_showendprcnt, flspec_showdeltaprcnt, flspec_showbudgetprcnt, flspec_showdiff, flspec_showdiffprcnt, flspec_prcnt_flgrp_id, flspec_showcustom, flspec_showcustomprcnt, flspec_custom_source) FROM stdin; \. -- -- Data for Name: form; Type: TABLE DATA; Schema: public; Owner: admin -- COPY form (form_id, form_name, form_descrip, form_report_id, form_key, form_report_name) FROM stdin; 23 RETURN Return Authorization 414 RA ReturnAuthorizationForm 19 EBANKCHECK eBank Check Format 413 Chck CheckMultiPage 20 EuroBankCheck EuroBankCheck 413 Chck CheckMultiPage 22 SO-Acknowledgement SO-Acknowledgement 416 SO CustOrderAcknowledgement \. -- -- Data for Name: freightclass; Type: TABLE DATA; Schema: public; Owner: admin -- COPY freightclass (freightclass_id, freightclass_code, freightclass_descrip) FROM stdin; 1 BULK Bulk Freight 2 TYPE1 Freight Type 1 3 TYPE2 Freight Type 2 \. -- -- Data for Name: glseries; Type: TABLE DATA; Schema: public; Owner: admin -- COPY glseries (glseries_id, glseries_sequence, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_amount, glseries_source, glseries_distdate, glseries_notes, glseries_misc_id) FROM stdin; 3165 5953 ST Receive Product 85 -50000.00 G/L 2010-01-15 FG Inv \N 3166 5953 ST Receive Product 95 50000.00 G/L 2010-01-15 Liab Clear \N 3167 5953 ST Receive Product 95 -50000.00 G/L 2010-01-15 Clear PO Liab Clear \N 3168 5953 ST Receive Product 99 50000.00 G/L 2010-01-15 Accrue Payable \N 3169 5953 ST Receive Product 109 50000.00 G/L 2010-01-15 Cash Payment \N 3170 5953 ST Receive Product 99 -50000.00 G/L 2010-01-15 Clear A/P \N \. -- -- Data for Name: gltrans; Type: TABLE DATA; Schema: public; Owner: admin -- COPY gltrans (gltrans_id, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_docnumber, gltrans_misc_id, gltrans_amount, gltrans_notes, gltrans_journalnumber, gltrans_posted, gltrans_doctype, gltrans_rec, gltrans_username, gltrans_deleted) FROM stdin; 7194 f 2005-12-28 16:41:09.793479-05 2005-11-15 3668 97 G/L OF-01 -1 -500.00 Office Supplies Entry 2366 t JE f jsmith f 7193 f 2005-12-28 16:41:09.793479-05 2005-11-15 3668 109 G/L OF-01 -1 500.00 Office Supplies Entry 2366 t JE t jsmith f 7196 f 2005-12-28 16:44:11.393517-05 2005-11-15 3669 109 G/L REV-01 -1 -500.00 Revenue Rec. 2367 t JE t jsmith f 7195 f 2005-12-28 16:44:11.393517-05 2005-11-15 3669 103 G/L REV-01 -1 500.00 Revenue Rec. 2367 t JE f jsmith f 7724 f 2006-01-12 09:13:39.45029-05 2005-11-01 3731 114 G/L PERIOD_END \N -10000.00 Change to new procedure 2440 t ST f jsmith f 7320 f 2005-12-29 10:50:20.080031-05 2005-11-01 3731 114 G/L PERIOD_END \N 10000.00 2440 t ST f jsmith f 7725 f 2006-01-12 09:13:39.45029-05 2005-11-01 3731 115 G/L PERIOD_END \N 10000.00 Change to new procedure 2440 t ST f jsmith f 7319 f 2005-12-29 10:50:20.080031-05 2005-11-01 3731 115 G/L PERIOD_END \N -10000.00 2440 t ST f jsmith f 7866 f 2006-01-13 10:34:03.962745-05 2005-11-15 3977 108 G/L Ship Order \N -1000.00 3201 t ST f jsmith f 7864 f 2006-01-13 10:34:03.962745-05 2005-11-15 3977 109 G/L Ship Order \N -2000.00 3201 t ST t jsmith f 7863 f 2006-01-13 10:34:03.962745-05 2005-11-15 3977 85 G/L Ship Order \N 1000.00 3201 t ST f jsmith f 7865 f 2006-01-13 10:34:03.962745-05 2005-11-15 3977 103 G/L Ship Order \N 2000.00 3201 t ST f jsmith f 7738 f 2006-01-12 10:13:13.369715-05 2005-02-02 3924 109 G/L Ship Order \N 2000.00 Wrong Date 3146 t ST t jsmith f 7763 f 2006-01-12 12:21:16.479622-05 2005-01-02 3931 108 G/L Ship Order \N -1000.00 3153 t ST f jsmith f 7761 f 2006-01-12 12:21:16.479622-05 2005-01-02 3931 109 G/L Ship Order \N -2000.00 3153 t ST t jsmith f 7760 f 2006-01-12 12:21:16.479622-05 2005-01-02 3931 85 G/L Ship Order \N 1000.00 3153 t ST f jsmith f 7762 f 2006-01-12 12:21:16.479622-05 2005-01-02 3931 103 G/L Ship Order \N 2000.00 3153 t ST f jsmith f 7767 f 2006-01-12 12:21:55.418011-05 2005-01-02 3932 108 G/L Ship Order \N -1000.00 3154 t ST f jsmith f 7765 f 2006-01-12 12:21:55.418011-05 2005-01-02 3932 109 G/L Ship Order \N -2000.00 3154 t ST t jsmith f 7764 f 2006-01-12 12:21:55.418011-05 2005-01-02 3932 85 G/L Ship Order \N 1000.00 3154 t ST f jsmith f 7766 f 2006-01-12 12:21:55.418011-05 2005-01-02 3932 103 G/L Ship Order \N 2000.00 3154 t ST f jsmith f 7774 f 2006-01-12 12:57:39.498845-05 2005-01-03 3935 85 G/L Ship Order \N 1000.00 3157 t ST f jsmith f 7776 f 2006-01-12 12:57:39.498845-05 2005-01-03 3935 103 G/L Ship Order \N 2000.00 3157 t ST f jsmith f 7751 f 2006-01-12 11:33:08.577848-05 2004-01-02 3928 109 G/L Ship Order \N -5000.00 3150 t ST t jsmith f 7748 f 2006-01-12 11:33:08.577848-05 2004-01-02 3928 85 G/L Ship Order \N 1000.00 3150 t ST f jsmith f 7750 f 2006-01-12 11:33:08.577848-05 2004-01-02 3928 103 G/L Ship Order \N 5000.00 3150 t ST f jsmith f 7768 f 2006-01-12 12:28:25.69646-05 2004-01-02 3933 109 G/L INV-01 -1 10000.00 Load INV 3155 t JE t jsmith f 7769 f 2006-01-12 12:28:25.69646-05 2004-01-02 3933 85 G/L INV-01 -1 -10000.00 Load INV 3155 t JE f jsmith f 7773 f 2006-01-12 12:42:19.892426-05 2004-02-02 3934 108 G/L Ship Order \N -1000.00 3156 t ST f jsmith f 7771 f 2006-01-12 12:42:19.892426-05 2004-02-02 3934 109 G/L Ship Order \N -2000.00 3156 t ST t jsmith f 7770 f 2006-01-12 12:42:19.892426-05 2004-02-02 3934 85 G/L Ship Order \N 1000.00 3156 t ST f jsmith f 7772 f 2006-01-12 12:42:19.892426-05 2004-02-02 3934 103 G/L Ship Order \N 2000.00 3156 t ST f jsmith f 7008 f 2005-12-23 16:56:06.198149-05 2005-12-23 3584 113 G/L MA-EQ-1 -1 1000000.00 Initial Sale of Stock - Par Value - .10 2274 t JE f jsmith f 7009 f 2005-12-23 16:56:06.198149-05 2005-12-23 3584 109 G/L MA-EQ-1 -1 -1000000.00 Initial Sale of Stock - Par Value - .10 2274 t JE t jsmith f 7010 f 2005-12-27 10:44:25.064464-05 2005-12-27 3585 95 S/R 20001 2860 100.00 Receive Inventory from P/O 2275 t PO f jsmith f 7011 f 2005-12-27 10:44:25.064464-05 2005-12-27 3585 85 S/R 20001 2860 -100.00 Receive Inventory from P/O 2275 t PO f jsmith f 7012 f 2005-12-27 10:44:25.064464-05 2005-12-27 3586 95 S/R 20001 2861 25.00 Receive Inventory from P/O 2277 t PO f jsmith f 7013 f 2005-12-27 10:44:25.064464-05 2005-12-27 3586 85 S/R 20001 2861 -25.00 Receive Inventory from P/O 2277 t PO f jsmith f 7014 f 2005-12-27 10:44:25.064464-05 2005-12-27 3587 95 S/R 20001 2862 40.00 Receive Inventory from P/O 2279 t PO f jsmith f 7015 f 2005-12-27 10:44:25.064464-05 2005-12-27 3587 85 S/R 20001 2862 -40.00 Receive Inventory from P/O 2279 t PO f jsmith f 7016 f 2005-12-27 10:44:25.064464-05 2005-12-27 3588 95 S/R 20001 2863 0.88 Receive Inventory from P/O 2281 t PO f jsmith f 7017 f 2005-12-27 10:44:25.064464-05 2005-12-27 3588 85 S/R 20001 2863 -0.88 Receive Inventory from P/O 2281 t PO f jsmith f 7018 f 2005-12-27 10:44:25.064464-05 2005-12-27 3589 95 S/R 20001 2864 100.00 Receive Inventory from P/O 2283 t PO f jsmith f 7019 f 2005-12-27 10:44:25.064464-05 2005-12-27 3589 85 S/R 20001 2864 -100.00 Receive Inventory from P/O 2283 t PO f jsmith f 7021 f 2005-12-27 10:44:25.064464-05 2005-12-27 3590 98 S/R 20001 -1 -9.99 Receive Inventory Freight from P/O 2284 t PO f jsmith f 7020 f 2005-12-27 10:44:25.064464-05 2005-12-27 3590 95 S/R 20001 -1 9.99 Receive Inventory Freight from P/O 2284 t PO f jsmith f 7023 f 2005-12-27 10:52:08.918744-05 2005-12-27 3591 90 A/P 30000 \N 29.99 RF-MDA201 2285 t VO f jsmith f 7024 f 2005-12-27 10:52:08.918744-05 2005-12-27 3591 99 A/P 30000 \N 252.00 RF-MDA201 2285 t VO f jsmith f 7022 f 2005-12-27 10:52:08.918744-05 2005-12-27 3591 95 A/P 30000 \N -281.99 RF-MDA201 2285 t VO f jsmith f 7025 f 2005-12-27 10:55:50.26967-05 2005-12-27 3592 95 S/R 20002 2865 0.70 Receive Inventory from P/O 2286 t PO f jsmith f 7026 f 2005-12-27 10:55:50.26967-05 2005-12-27 3592 85 S/R 20002 2865 -0.70 Receive Inventory from P/O 2286 t PO f jsmith f 7028 f 2005-12-27 10:59:27.845595-05 2005-12-27 3593 90 A/P 30001 \N 4.60 RF-MDA202 2288 t VO f jsmith f 7029 f 2005-12-27 10:59:27.845595-05 2005-12-27 3593 99 A/P 30001 \N 1.00 RF-MDA202 2288 t VO f jsmith f 7027 f 2005-12-27 10:59:27.845595-05 2005-12-27 3593 95 A/P 30001 \N -5.60 RF-MDA202 2288 t VO f jsmith f 7030 f 2005-12-27 11:00:08.51116-05 2005-12-27 3594 101 A/P 30000 73 5.04 Discount for V 30000 2289 t CM f jsmith f 7031 f 2005-12-27 11:00:08.51116-05 2005-12-27 3594 99 A/P 30000 73 -5.04 Discount for V 30000 2289 t CM f jsmith f 7032 f 2005-12-27 11:00:18.621397-05 2005-12-27 3595 101 A/P 30001 74 0.02 Discount for V 30001 2290 t CM f jsmith f 7033 f 2005-12-27 11:00:18.621397-05 2005-12-27 3595 99 A/P 30001 74 -0.02 Discount for V 30001 2290 t CM f jsmith f 7035 f 2005-12-27 11:02:38.349576-05 2005-12-27 3596 109 A/P 3001 101 247.94 TPARTS-Toy Parts Inc. 2291 t CK t jsmith f 7034 f 2005-12-27 11:02:38.349576-05 2005-12-27 3596 99 A/P 3001 101 -247.94 TPARTS-Toy Parts Inc. 2291 t CK f jsmith f 7037 f 2005-12-27 11:10:51.495092-05 2005-12-27 3597 86 W/O 10000-1 2866 -25.00 Material Issue to Work Order 2292 t WO f jsmith f 7036 f 2005-12-27 11:10:51.495092-05 2005-12-27 3597 85 W/O 10000-1 2866 25.00 Material Issue to Work Order 2292 t WO f jsmith f 7039 f 2005-12-27 11:10:51.495092-05 2005-12-27 3598 86 W/O 10000-1 2867 -55.00 Material Issue to Work Order 2293 t WO f jsmith f 7038 f 2005-12-27 11:10:51.495092-05 2005-12-27 3598 85 W/O 10000-1 2867 55.00 Material Issue to Work Order 2293 t WO f jsmith f 7040 f 2005-12-27 11:10:51.495092-05 2005-12-27 3599 86 W/O 10000-1 2868 92.10 Receive Inventory from Manufacturing 2294 t WO f jsmith f 7041 f 2005-12-27 11:10:51.495092-05 2005-12-27 3599 85 W/O 10000-1 2868 -92.10 Receive Inventory from Manufacturing 2294 t WO f jsmith f 7043 f 2005-12-27 11:10:51.495092-05 2005-12-27 3600 86 W/O 10000-1 -1 -0.92 Post Setup Time to Work Order 2295 t WO f jsmith f 7042 f 2005-12-27 11:10:51.495092-05 2005-12-27 3600 94 W/O 10000-1 -1 0.92 Post Setup Time to Work Order 2295 t WO f jsmith f 7045 f 2005-12-27 11:10:51.495092-05 2005-12-27 3601 86 W/O 10000-1 -1 -9.17 Post Run Time to Work Order 2296 t WO f jsmith f 7044 f 2005-12-27 11:10:51.495092-05 2005-12-27 3601 94 W/O 10000-1 -1 9.17 Post Run Time to Work Order 2296 t WO f jsmith f 7046 f 2005-12-27 11:11:07.810441-05 2005-12-27 3602 86 W/O 10000-1 -1 -2.02 Manufacturing Inventory Cost Variance 2297 t WO f jsmith f 7047 f 2005-12-27 11:11:07.810441-05 2005-12-27 3602 87 W/O 10000-1 -1 2.02 Manufacturing Inventory Cost Variance 2297 t WO f jsmith f 7048 f 2005-12-27 11:11:38.59791-05 2005-12-27 3603 86 W/O 50001-1 2869 266.68 Receive Inventory from Manufacturing 2299 t WO f jsmith f 7049 f 2005-12-27 11:11:38.59791-05 2005-12-27 3603 85 W/O 50001-1 2869 -266.68 Receive Inventory from Manufacturing 2299 t WO f jsmith f 7051 f 2005-12-27 11:11:38.59791-05 2005-12-27 3604 86 W/O 50001-1 2870 -92.10 Material Issue to Work Order 2300 t WO f jsmith f 7050 f 2005-12-27 11:11:38.59791-05 2005-12-27 3604 85 W/O 50001-1 2870 92.10 Material Issue to Work Order 2300 t WO f jsmith f 7053 f 2005-12-27 11:11:38.59791-05 2005-12-27 3605 86 W/O 50001-1 2871 -40.00 Material Issue to Work Order 2301 t WO f jsmith f 7052 f 2005-12-27 11:11:38.59791-05 2005-12-27 3605 85 W/O 50001-1 2871 40.00 Material Issue to Work Order 2301 t WO f jsmith f 7055 f 2005-12-27 11:11:38.59791-05 2005-12-27 3606 86 W/O 50001-1 2872 -0.70 Material Issue to Work Order 2302 t WO f jsmith f 7054 f 2005-12-27 11:11:38.59791-05 2005-12-27 3606 85 W/O 50001-1 2872 0.70 Material Issue to Work Order 2302 t WO f jsmith f 7057 f 2005-12-27 11:11:38.59791-05 2005-12-27 3607 86 W/O 50001-1 2873 -100.00 Material Issue to Work Order 2303 t WO f jsmith f 7056 f 2005-12-27 11:11:38.59791-05 2005-12-27 3607 85 W/O 50001-1 2873 100.00 Material Issue to Work Order 2303 t WO f jsmith f 7059 f 2005-12-27 11:11:38.59791-05 2005-12-27 3608 86 W/O 50001-1 -1 -1.10 Post Setup Time to Work Order 2304 t WO f jsmith f 7058 f 2005-12-27 11:11:38.59791-05 2005-12-27 3608 94 W/O 50001-1 -1 1.10 Post Setup Time to Work Order 2304 t WO f jsmith f 7061 f 2005-12-27 11:11:38.59791-05 2005-12-27 3609 86 W/O 50001-1 -1 -11.00 Post Run Time to Work Order 2305 t WO f jsmith f 7060 f 2005-12-27 11:11:38.59791-05 2005-12-27 3609 94 W/O 50001-1 -1 11.00 Post Run Time to Work Order 2305 t WO f jsmith f 7063 f 2005-12-27 11:11:38.59791-05 2005-12-27 3610 86 W/O 50001-1 -1 -1.10 Post Setup Time to Work Order 2306 t WO f jsmith f 7062 f 2005-12-27 11:11:38.59791-05 2005-12-27 3610 94 W/O 50001-1 -1 1.10 Post Setup Time to Work Order 2306 t WO f jsmith f 7065 f 2005-12-27 11:11:38.59791-05 2005-12-27 3611 86 W/O 50001-1 -1 -11.00 Post Run Time to Work Order 2307 t WO f jsmith f 7064 f 2005-12-27 11:11:38.59791-05 2005-12-27 3611 94 W/O 50001-1 -1 11.00 Post Run Time to Work Order 2307 t WO f jsmith f 7067 f 2005-12-27 11:11:38.59791-05 2005-12-27 3612 86 W/O 50001-1 -1 -0.88 Post Setup Time to Work Order 2308 t WO f jsmith f 7066 f 2005-12-27 11:11:38.59791-05 2005-12-27 3612 94 W/O 50001-1 -1 0.88 Post Setup Time to Work Order 2308 t WO f jsmith f 7069 f 2005-12-27 11:11:38.59791-05 2005-12-27 3613 86 W/O 50001-1 -1 -8.80 Post Run Time to Work Order 2309 t WO f jsmith f 7068 f 2005-12-27 11:11:38.59791-05 2005-12-27 3613 94 W/O 50001-1 -1 8.80 Post Run Time to Work Order 2309 t WO f jsmith f 7071 f 2005-12-27 11:16:03.293252-05 2005-12-27 3614 96 S/R 50001-1 2874 -266.68 Issue to Shipping 2312 t SO f jsmith f 7070 f 2005-12-27 11:16:03.293252-05 2005-12-27 3614 85 S/R 50001-1 2874 266.68 Issue to Shipping 2312 t SO f jsmith f 7073 f 2005-12-27 11:17:21.536011-05 2005-12-27 3615 108 S/R 50001 -1 -266.68 Ship Shipment 2313 t SO f jsmith f 7072 f 2005-12-27 11:17:21.536011-05 2005-12-27 3615 96 S/R 50001 -1 266.68 Ship Shipment 2313 t SO f jsmith f 7077 f 2005-12-27 11:17:39.202545-05 2005-12-27 3616 106 A/R 60000 \N -1096.50 2314 t IN f jsmith f 7075 f 2005-12-27 11:17:39.202545-05 2005-12-27 3616 105 A/R 60000 \N 99.00 2314 t IN f jsmith f 7074 f 2005-12-27 11:17:39.202545-05 2005-12-27 3616 103 A/R 60000 \N 950.00 2314 t IN f jsmith f 7079 f 2005-12-27 11:36:13.526499-05 2005-12-27 3617 109 A/R C-43221 \N -1096.50 TTOYS-Tremendous Toys Inc. 2315 t CR t jsmith f 7078 f 2005-12-27 11:36:13.526499-05 2005-12-27 3617 106 A/R I-60000 \N 1096.50 TTOYS-Tremendous Toys Inc. 2315 t CR f jsmith f 7080 f 2005-12-27 11:39:05.775637-05 2005-12-27 3618 97 A/P 30002 \N -200.00 RF-200 2316 t VO f jsmith f 7081 f 2005-12-27 11:39:05.775637-05 2005-12-27 3618 99 A/P 30002 \N 200.00 RF-200 2316 t VO f jsmith f 7083 f 2005-12-27 11:40:04.183672-05 2005-12-27 3619 109 A/P 3002 102 200.00 TPARTS-Toy Parts Inc. 2317 t CK t jsmith f 7082 f 2005-12-27 11:40:04.183672-05 2005-12-27 3619 99 A/P 3002 102 -200.00 TPARTS-Toy Parts Inc. 2317 t CK f jsmith f 7085 f 2005-12-27 11:40:41.93143-05 2005-12-27 3620 92 I/M MA-101SCR 2875 -5.00 Material Scrap\n 2318 t f jsmith f 7084 f 2005-12-27 11:40:41.93143-05 2005-12-27 3620 85 I/M MA-101SCR 2875 5.00 Material Scrap\n 2318 t f jsmith f 7086 f 2005-12-27 11:41:15.301527-05 2005-12-27 3621 91 I/M MA-RC1 2876 15.00 Miscellaneous Adjustment\n 2319 t f jsmith f 7087 f 2005-12-27 11:41:15.301527-05 2005-12-27 3621 85 I/M MA-RC1 2876 -15.00 Miscellaneous Adjustment\n 2319 t f jsmith f 7088 f 2005-12-27 11:45:56.652105-05 2005-12-27 3622 91 I/M MA-ADJ-1 2877 -25.00 Miscellaneous Adjustment\n 2320 t f jsmith f 7089 f 2005-12-27 11:45:56.652105-05 2005-12-27 3622 85 I/M MA-ADJ-1 2877 25.00 Miscellaneous Adjustment\n 2320 t f jsmith f 7090 f 2005-12-27 15:44:34.294467-05 2005-12-27 3623 86 W/O Misc. 2878 26.67 Receive from Misc. Production for Item Number YTRUCK1\n 2321 t WO f jsmith f 7091 f 2005-12-27 15:44:34.294467-05 2005-12-27 3623 85 W/O Misc. 2878 -26.67 Receive from Misc. Production for Item Number YTRUCK1\n 2321 t WO f jsmith f 7093 f 2005-12-27 15:44:34.294467-05 2005-12-27 3624 86 W/O Misc. 2879 -10.00 Receive from Misc. Production for Item Number YTRUCK1\n 2322 t WO f jsmith f 7092 f 2005-12-27 15:44:34.294467-05 2005-12-27 3624 85 W/O Misc. 2879 10.00 Receive from Misc. Production for Item Number YTRUCK1\n 2322 t WO f jsmith f 7095 f 2005-12-27 15:44:34.294467-05 2005-12-27 3625 86 W/O Misc. 2880 -0.07 Receive from Misc. Production for Item Number YTRUCK1\n 2323 t WO f jsmith f 7094 f 2005-12-27 15:44:34.294467-05 2005-12-27 3625 85 W/O Misc. 2880 0.07 Receive from Misc. Production for Item Number YTRUCK1\n 2323 t WO f jsmith f 7097 f 2005-12-27 15:44:34.294467-05 2005-12-27 3626 86 W/O Misc. 2881 -4.00 Receive from Misc. Production for Item Number YTRUCK1\n 2324 t WO f jsmith f 7096 f 2005-12-27 15:44:34.294467-05 2005-12-27 3626 85 W/O Misc. 2881 4.00 Receive from Misc. Production for Item Number YTRUCK1\n 2324 t WO f jsmith f 7099 f 2005-12-27 15:44:34.294467-05 2005-12-27 3627 86 W/O Misc. 2882 -9.21 Receive from Misc. Production for Item Number YTRUCK1\n 2325 t WO f jsmith f 7098 f 2005-12-27 15:44:34.294467-05 2005-12-27 3627 85 W/O Misc. 2882 9.21 Receive from Misc. Production for Item Number YTRUCK1\n 2325 t WO f jsmith f 7101 f 2005-12-27 15:44:34.294467-05 2005-12-27 3628 86 W/O Misc. 2878 -3.39 Cost Variance of Post to Misc. Production for Item Number YTRUCK1 2326 t WO f jsmith f 7100 f 2005-12-27 15:44:34.294467-05 2005-12-27 3628 87 W/O Misc. 2878 3.39 Cost Variance of Post to Misc. Production for Item Number YTRUCK1 2326 t WO f jsmith f 7102 f 2005-12-27 15:45:33.284417-05 2005-12-27 3629 86 W/O Misc. 2883 9.21 Receive from Misc. Production for Item Number TKIT1\n 2327 t WO f jsmith f 7103 f 2005-12-27 15:45:33.284417-05 2005-12-27 3629 85 W/O Misc. 2883 -9.21 Receive from Misc. Production for Item Number TKIT1\n 2327 t WO f jsmith f 7105 f 2005-12-27 15:45:33.284417-05 2005-12-27 3630 86 W/O Misc. 2884 -2.50 Receive from Misc. Production for Item Number TKIT1\n 2328 t WO f jsmith f 7104 f 2005-12-27 15:45:33.284417-05 2005-12-27 3630 85 W/O Misc. 2884 2.50 Receive from Misc. Production for Item Number TKIT1\n 2328 t WO f jsmith f 7175 f 2005-12-27 16:28:35.327813-05 2005-12-27 3659 102 A/R 60006 \N 5.00 2357 t IN f jsmith f 7107 f 2005-12-27 15:45:33.284417-05 2005-12-27 3631 86 W/O Misc. 2885 -5.50 Receive from Misc. Production for Item Number TKIT1\n 2329 t WO f jsmith f 7106 f 2005-12-27 15:45:33.284417-05 2005-12-27 3631 85 W/O Misc. 2885 5.50 Receive from Misc. Production for Item Number TKIT1\n 2329 t WO f jsmith f 7109 f 2005-12-27 15:45:33.284417-05 2005-12-27 3632 86 W/O Misc. 2883 -1.21 Cost Variance of Post to Misc. Production for Item Number TKIT1 2330 t WO f jsmith f 7108 f 2005-12-27 15:45:33.284417-05 2005-12-27 3632 87 W/O Misc. 2883 1.21 Cost Variance of Post to Misc. Production for Item Number TKIT1 2330 t WO f jsmith f 7111 f 2005-12-27 15:51:45.575155-05 2005-12-27 3633 96 S/R 50002-1 2886 -13.33 Issue to Shipping 2331 t SO f jsmith f 7110 f 2005-12-27 15:51:45.575155-05 2005-12-27 3633 85 S/R 50002-1 2886 13.33 Issue to Shipping 2331 t SO f jsmith f 7112 f 2005-12-27 15:51:59.429125-05 2005-12-27 3634 96 S/R 50002-1 2887 13.33 Return from Shipping 2332 t SO f jsmith f 7113 f 2005-12-27 15:51:59.429125-05 2005-12-27 3634 85 S/R 50002-1 2887 -13.33 Return from Shipping 2332 t SO f jsmith f 7115 f 2005-12-27 15:53:47.770886-05 2005-12-27 3635 96 S/R 50002-1 2888 -2.67 Issue to Shipping 2333 t SO f jsmith f 7114 f 2005-12-27 15:53:47.770886-05 2005-12-27 3635 85 S/R 50002-1 2888 2.67 Issue to Shipping 2333 t SO f jsmith f 7117 f 2005-12-27 15:53:53.083837-05 2005-12-27 3636 96 S/R 50002-1 2889 -2.67 Issue to Shipping 2334 t SO f jsmith f 7116 f 2005-12-27 15:53:53.083837-05 2005-12-27 3636 85 S/R 50002-1 2889 2.67 Issue to Shipping 2334 t SO f jsmith f 7119 f 2005-12-27 15:54:06.16052-05 2005-12-27 3637 96 S/R 50002-1 2890 -8.00 Issue to Shipping 2335 t SO f jsmith f 7118 f 2005-12-27 15:54:06.16052-05 2005-12-27 3637 85 S/R 50002-1 2890 8.00 Issue to Shipping 2335 t SO f jsmith f 7121 f 2005-12-27 15:54:25.744465-05 2005-12-27 3638 108 S/R 50002 -1 -13.33 Ship Shipment 2336 t SO f jsmith f 7120 f 2005-12-27 15:54:25.744465-05 2005-12-27 3638 96 S/R 50002 -1 13.33 Ship Shipment 2336 t SO f jsmith f 7125 f 2005-12-27 15:59:24.758434-05 2005-12-27 3639 106 A/R 60001 \N -60.19 2337 t IN f jsmith f 7124 f 2005-12-27 15:59:24.758434-05 2005-12-27 3639 102 A/R 60001 \N 2.50 2337 t IN f jsmith f 7123 f 2005-12-27 15:59:24.758434-05 2005-12-27 3639 105 A/R 60001 \N 7.74 2337 t IN f jsmith f 7122 f 2005-12-27 15:59:24.758434-05 2005-12-27 3639 103 A/R 60001 \N 49.95 2337 t IN f jsmith f 7127 f 2005-12-27 16:02:19.702592-05 2005-12-27 3640 96 S/R 50003-1 2891 -2.67 Issue to Shipping 2338 t SO f jsmith f 7126 f 2005-12-27 16:02:19.702592-05 2005-12-27 3640 85 S/R 50003-1 2891 2.67 Issue to Shipping 2338 t SO f jsmith f 7129 f 2005-12-27 16:03:09.64492-05 2005-12-27 3641 108 S/R 50003 -1 -2.67 Ship Shipment 2339 t SO f jsmith f 7128 f 2005-12-27 16:03:09.64492-05 2005-12-27 3641 96 S/R 50003 -1 2.67 Ship Shipment 2339 t SO f jsmith f 7132 f 2005-12-27 16:07:03.164514-05 2005-12-27 3642 106 A/R 60002 \N -5.50 2340 t IN f jsmith f 7131 f 2005-12-27 16:07:03.164514-05 2005-12-27 3642 102 A/R 60002 \N 0.50 2340 t IN f jsmith f 7130 f 2005-12-27 16:07:03.164514-05 2005-12-27 3642 105 A/R 60002 \N 5.00 2340 t IN f jsmith f 7134 f 2005-12-27 16:07:59.597566-05 2005-12-27 3643 96 S/R 50003-1 2892 -2.67 Issue to Shipping 2341 t SO f jsmith f 7133 f 2005-12-27 16:07:59.597566-05 2005-12-27 3643 85 S/R 50003-1 2892 2.67 Issue to Shipping 2341 t SO f jsmith f 7136 f 2005-12-27 16:08:11.23218-05 2005-12-27 3644 108 S/R 50003 -1 -2.67 Ship Shipment 2342 t SO f jsmith f 7135 f 2005-12-27 16:08:11.23218-05 2005-12-27 3644 96 S/R 50003 -1 2.67 Ship Shipment 2342 t SO f jsmith f 7140 f 2005-12-27 16:08:34.247456-05 2005-12-27 3645 106 A/R 60003 \N -15.99 2343 t IN f jsmith f 7139 f 2005-12-27 16:08:34.247456-05 2005-12-27 3645 102 A/R 60003 \N 1.00 2343 t IN f jsmith f 7138 f 2005-12-27 16:08:34.247456-05 2005-12-27 3645 105 A/R 60003 \N 5.00 2343 t IN f jsmith f 7137 f 2005-12-27 16:08:34.247456-05 2005-12-27 3645 103 A/R 60003 \N 9.99 2343 t IN f jsmith f 7142 f 2005-12-27 16:09:00.552107-05 2005-12-27 3646 96 S/R 50003-1 2893 -2.67 Issue to Shipping 2344 t SO f jsmith f 7141 f 2005-12-27 16:09:00.552107-05 2005-12-27 3646 85 S/R 50003-1 2893 2.67 Issue to Shipping 2344 t SO f jsmith f 7144 f 2005-12-27 16:09:29.612486-05 2005-12-27 3647 96 S/R 50003-1 2894 -2.67 Issue to Shipping 2345 t SO f jsmith f 7143 f 2005-12-27 16:09:29.612486-05 2005-12-27 3647 85 S/R 50003-1 2894 2.67 Issue to Shipping 2345 t SO f jsmith f 7145 f 2005-12-27 16:09:57.800617-05 2005-12-27 3648 96 S/R 50003-1 2895 5.33 Return from Shipping 2346 t SO f jsmith f 7146 f 2005-12-27 16:09:57.800617-05 2005-12-27 3648 85 S/R 50003-1 2895 -5.33 Return from Shipping 2346 t SO f jsmith f 7148 f 2005-12-27 16:10:03.036548-05 2005-12-27 3649 96 S/R 50003-1 2896 -2.67 Issue to Shipping 2347 t SO f jsmith f 7147 f 2005-12-27 16:10:03.036548-05 2005-12-27 3649 85 S/R 50003-1 2896 2.67 Issue to Shipping 2347 t SO f jsmith f 7150 f 2005-12-27 16:10:07.867672-05 2005-12-27 3650 108 S/R 50003 -1 -2.67 Ship Shipment 2348 t SO f jsmith f 7149 f 2005-12-27 16:10:07.867672-05 2005-12-27 3650 96 S/R 50003 -1 2.67 Ship Shipment 2348 t SO f jsmith f 7153 f 2005-12-27 16:21:46.92537-05 2005-12-27 3651 106 A/R 60004 \N -10.49 2349 t IN f jsmith f 7152 f 2005-12-27 16:21:46.92537-05 2005-12-27 3651 102 A/R 60004 \N 0.50 2349 t IN f jsmith f 7151 f 2005-12-27 16:21:46.92537-05 2005-12-27 3651 103 A/R 60004 \N 9.99 2349 t IN f jsmith f 7155 f 2005-12-27 16:22:09.923092-05 2005-12-27 3652 96 S/R 50003-1 2897 -5.33 Issue to Shipping 2350 t SO f jsmith f 7154 f 2005-12-27 16:22:09.923092-05 2005-12-27 3652 85 S/R 50003-1 2897 5.33 Issue to Shipping 2350 t SO f jsmith f 7157 f 2005-12-27 16:22:17.658442-05 2005-12-27 3653 108 S/R 50003 -1 -5.33 Ship Shipment 2351 t SO f jsmith f 7156 f 2005-12-27 16:22:17.658442-05 2005-12-27 3653 96 S/R 50003 -1 5.33 Ship Shipment 2351 t SO f jsmith f 7160 f 2005-12-27 16:22:32.140196-05 2005-12-27 3654 106 A/R 60005 \N -20.98 2352 t IN f jsmith f 7159 f 2005-12-27 16:22:32.140196-05 2005-12-27 3654 102 A/R 60005 \N 1.00 2352 t IN f jsmith f 7158 f 2005-12-27 16:22:32.140196-05 2005-12-27 3654 103 A/R 60005 \N 19.98 2352 t IN f jsmith f 7168 f 2005-12-27 16:24:18.908292-05 2005-12-27 3655 104 A/R Unapplied from C-CK2701 \N 86.85 TTOYS-Tremendous Toys Inc. 2353 t CR f jsmith f 7169 f 2005-12-27 16:24:18.908292-05 2005-12-27 3655 109 A/R C-CK2701 \N -200.00 TTOYS-Tremendous Toys Inc. 2353 t CR t jsmith f 7163 f 2005-12-27 16:24:18.908292-05 2005-12-27 3655 106 A/R I-60004 \N 10.49 TTOYS-Tremendous Toys Inc. 2353 t CR f jsmith f 7164 f 2005-12-27 16:24:18.908292-05 2005-12-27 3655 106 A/R I-60001 \N 60.19 TTOYS-Tremendous Toys Inc. 2353 t CR f jsmith f 7165 f 2005-12-27 16:24:18.908292-05 2005-12-27 3655 106 A/R I-60002 \N 5.50 TTOYS-Tremendous Toys Inc. 2353 t CR f jsmith f 7166 f 2005-12-27 16:24:18.908292-05 2005-12-27 3655 106 A/R I-60003 \N 15.99 TTOYS-Tremendous Toys Inc. 2353 t CR f jsmith f 7167 f 2005-12-27 16:24:18.908292-05 2005-12-27 3655 106 A/R I-60005 \N 20.98 TTOYS-Tremendous Toys Inc. 2353 t CR f jsmith f 7162 f 2005-12-27 16:24:18.908292-05 2005-12-27 3656 104 A/R 20000 299 -86.85 Unapplied from C-CK2701 2354 t CM f jsmith f 7161 f 2005-12-27 16:24:18.908292-05 2005-12-27 3656 106 A/R 20000 299 86.85 Unapplied from C-CK2701 2354 t CM f jsmith f 7171 f 2005-12-27 16:27:44.026945-05 2005-12-27 3657 96 S/R 50004-1 2898 -26.67 Issue to Shipping 2355 t SO f jsmith f 7170 f 2005-12-27 16:27:44.026945-05 2005-12-27 3657 85 S/R 50004-1 2898 26.67 Issue to Shipping 2355 t SO f jsmith f 7173 f 2005-12-27 16:28:28.25883-05 2005-12-27 3658 108 S/R 50004 -1 -26.67 Ship Shipment 2356 t SO f jsmith f 7172 f 2005-12-27 16:28:28.25883-05 2005-12-27 3658 96 S/R 50004 -1 26.67 Ship Shipment 2356 t SO f jsmith f 7176 f 2005-12-27 16:28:35.327813-05 2005-12-27 3659 106 A/R 60006 \N -104.90 2357 t IN f jsmith f 7174 f 2005-12-27 16:28:35.327813-05 2005-12-27 3659 103 A/R 60006 \N 99.90 2357 t IN f jsmith f 7177 f 2005-12-27 16:31:18.983709-05 2005-12-27 3660 109 A/R C-MDA-011 \N -18.05 TTOYS-Tremendous Toys Inc. 2358 t CR t jsmith f 7178 f 2005-12-27 16:31:18.983709-05 2005-12-27 3660 106 A/R I-60006 \N 18.05 TTOYS-Tremendous Toys Inc. 2358 t CR f jsmith f 7180 f 2005-12-27 16:40:43.670411-05 2005-12-27 3661 96 S/R 40000-1 2899 -26.67 Issue to Shipping 2359 t SO f jsmith f 7179 f 2005-12-27 16:40:43.670411-05 2005-12-27 3661 85 S/R 40000-1 2899 26.67 Issue to Shipping 2359 t SO f jsmith f 7182 f 2005-12-28 16:25:11.707602-05 2005-12-28 3662 86 W/O 40000-1 2900 -9.21 Material Issue to Work Order 2360 t WO f jsmith f 7181 f 2005-12-28 16:25:11.707602-05 2005-12-28 3662 85 W/O 40000-1 2900 9.21 Material Issue to Work Order 2360 t WO f jsmith f 7184 f 2005-12-28 16:25:11.707602-05 2005-12-28 3663 86 W/O 40000-1 2901 -4.00 Material Issue to Work Order 2361 t WO f jsmith f 7183 f 2005-12-28 16:25:11.707602-05 2005-12-28 3663 85 W/O 40000-1 2901 4.00 Material Issue to Work Order 2361 t WO f jsmith f 7186 f 2005-12-28 16:25:11.707602-05 2005-12-28 3664 86 W/O 40000-1 2902 -0.07 Material Issue to Work Order 2362 t WO f jsmith f 7185 f 2005-12-28 16:25:11.707602-05 2005-12-28 3664 85 W/O 40000-1 2902 0.07 Material Issue to Work Order 2362 t WO f jsmith f 7188 f 2005-12-28 16:25:11.707602-05 2005-12-28 3665 86 W/O 40000-1 2903 -10.00 Material Issue to Work Order 2363 t WO f jsmith f 7187 f 2005-12-28 16:25:11.707602-05 2005-12-28 3665 85 W/O 40000-1 2903 10.00 Material Issue to Work Order 2363 t WO f jsmith f 7190 f 2005-12-28 16:25:44.267849-05 2005-12-28 3666 93 W/O 40000-1 -1 -0.07 Scrap Material from Work Order 2364 t WO f jsmith f 7189 f 2005-12-28 16:25:44.267849-05 2005-12-28 3666 86 W/O 40000-1 -1 0.07 Scrap Material from Work Order 2364 t WO f jsmith f 7192 f 2005-12-28 16:26:24.661058-05 2005-12-28 3667 93 W/O 40000-1 -1 -1.00 Scrap Material from Work Order 2365 t WO f jsmith f 7191 f 2005-12-28 16:26:24.661058-05 2005-12-28 3667 86 W/O 40000-1 -1 1.00 Scrap Material from Work Order 2365 t WO f jsmith f 7200 f 2005-12-28 17:02:37.391127-05 2005-12-28 3670 104 A/R Unapplied from V-40000-4 \N 114.89 Cash Receipt from Credit Card 2368 t CR f jsmith f 7199 f 2005-12-28 17:02:37.391127-05 2005-12-28 3670 109 A/R V-40000-4 \N -114.89 Cash Receipt from Credit Card 2368 t CR t jsmith f 7198 f 2005-12-28 17:02:37.391127-05 2005-12-28 3671 104 A/R 20001 301 -114.89 Unapplied from V-40000-4 2369 t CM f jsmith f 7197 f 2005-12-28 17:02:37.391127-05 2005-12-28 3671 106 A/R 20001 301 114.89 Unapplied from V-40000-4 2369 t CM f jsmith f 7203 f 2005-12-29 09:20:59.992817-05 2005-12-29 3673 109 G/L SLS-001 -1 10000.00 Sale - 001 2371 t JE t jsmith f 7205 f 2005-12-29 09:24:33.667828-05 2005-12-29 3673 109 G/L SLS-001 -1 -10000.00 Posted into wrong period 2371 t JE t jsmith f 7206 f 2005-12-29 09:24:33.667828-05 2005-12-29 3673 103 G/L SLS-001 -1 10000.00 Posted into wrong period 2371 t JE f jsmith f 7204 f 2005-12-29 09:20:59.992817-05 2005-12-29 3673 103 G/L SLS-001 -1 -10000.00 Sale - 001 2371 t JE f jsmith f 7210 f 2005-12-29 09:27:37.006847-05 2005-12-29 3675 96 S/R 40000-2 2904 -2.67 Issue to Shipping 2373 t SO f jsmith f 7209 f 2005-12-29 09:27:37.006847-05 2005-12-29 3675 85 S/R 40000-2 2904 2.67 Issue to Shipping 2373 t SO f jsmith f 7212 f 2005-12-29 09:28:05.811298-05 2005-12-29 3676 108 S/R 40000 -1 -2.67 Ship Shipment 2374 t SO f jsmith f 7211 f 2005-12-29 09:28:05.811298-05 2005-12-29 3676 96 S/R 40000 -1 2.67 Ship Shipment 2374 t SO f jsmith f 7214 f 2005-12-29 09:28:05.811298-05 2005-12-29 3677 108 S/R 40000 -1 -26.67 Ship Shipment 2375 t SO f jsmith f 7213 f 2005-12-29 09:28:05.811298-05 2005-12-29 3677 96 S/R 40000 -1 26.67 Ship Shipment 2375 t SO f jsmith f 7217 f 2005-12-29 09:28:20.070651-05 2005-12-29 3678 106 A/R 60007 \N -115.38 2376 t IN f jsmith f 7216 f 2005-12-29 09:28:20.070651-05 2005-12-29 3678 102 A/R 60007 \N 5.49 2376 t IN f jsmith f 7215 f 2005-12-29 09:28:20.070651-05 2005-12-29 3678 103 A/R 60007 \N 109.89 2376 t IN f jsmith f 7220 f 2005-12-29 09:48:33.014636-05 2005-12-28 3679 104 A/R Unapplied from V-40000-2 \N 104.90 TTOYS-Tremendous Toys Inc. 2377 t CR f jsmith f 7221 f 2005-12-29 09:48:33.014636-05 2005-12-28 3679 109 A/R V-40000-2 \N -104.90 TTOYS-Tremendous Toys Inc. 2377 t CR t jsmith f 7219 f 2005-12-29 09:48:33.014636-05 2005-12-28 3680 104 A/R 20002 303 -104.90 Unapplied from V-40000-2 2378 t CM f jsmith f 7218 f 2005-12-29 09:48:33.014636-05 2005-12-28 3680 106 A/R 20002 303 104.90 Unapplied from V-40000-2 2378 t CM f jsmith f 7222 f 2005-12-29 09:54:11.546387-05 2005-12-29 3681 95 S/R 20003 2905 40.00 Receive Inventory from P/O 2379 t PO f jsmith f 7223 f 2005-12-29 09:54:11.546387-05 2005-12-29 3681 85 S/R 20003 2905 -40.00 Receive Inventory from P/O 2379 t PO f jsmith f 7224 f 2005-12-29 09:54:11.546387-05 2005-12-29 3682 95 S/R 20003 2906 40.00 Receive Inventory from P/O 2381 t PO f jsmith f 7225 f 2005-12-29 09:54:11.546387-05 2005-12-29 3682 85 S/R 20003 2906 -40.00 Receive Inventory from P/O 2381 t PO f jsmith f 7226 f 2005-12-29 09:54:11.546387-05 2005-12-29 3683 95 S/R 20003 2907 300.00 Receive Inventory from P/O 2383 t PO f jsmith f 7227 f 2005-12-29 09:54:11.546387-05 2005-12-29 3683 85 S/R 20003 2907 -300.00 Receive Inventory from P/O 2383 t PO f jsmith f 7228 f 2005-12-29 09:54:11.546387-05 2005-12-29 3684 95 S/R 20003 2908 0.88 Receive Inventory from P/O 2385 t PO f jsmith f 7229 f 2005-12-29 09:54:11.546387-05 2005-12-29 3684 85 S/R 20003 2908 -0.88 Receive Inventory from P/O 2385 t PO f jsmith f 7230 f 2005-12-29 09:54:11.546387-05 2005-12-29 3685 95 S/R 20003 2909 49.20 Receive Inventory from P/O 2387 t PO f jsmith f 7231 f 2005-12-29 09:54:11.546387-05 2005-12-29 3685 85 S/R 20003 2909 -49.20 Receive Inventory from P/O 2387 t PO f jsmith f 7232 f 2005-12-29 09:54:11.546387-05 2005-12-29 3686 95 S/R 20003 2910 150.00 Receive Inventory from P/O 2389 t PO f jsmith f 7233 f 2005-12-29 09:54:11.546387-05 2005-12-29 3686 85 S/R 20003 2910 -150.00 Receive Inventory from P/O 2389 t PO f jsmith f 7234 f 2005-12-29 09:54:11.546387-05 2005-12-29 3687 95 S/R 20003 2911 100.00 Receive Inventory from P/O 2391 t PO f jsmith f 7235 f 2005-12-29 09:54:11.546387-05 2005-12-29 3687 85 S/R 20003 2911 -100.00 Receive Inventory from P/O 2391 t PO f jsmith f 7236 f 2005-12-29 10:01:19.939306-05 2005-12-29 3688 86 W/O 10002-1 2912 276.30 Receive Inventory from Manufacturing 2393 t WO f jsmith f 7237 f 2005-12-29 10:01:19.939306-05 2005-12-29 3688 85 W/O 10002-1 2912 -276.30 Receive Inventory from Manufacturing 2393 t WO f jsmith f 7239 f 2005-12-29 10:01:19.939306-05 2005-12-29 3689 86 W/O 10002-1 2913 -165.00 Material Issue to Work Order 2394 t WO f jsmith f 7238 f 2005-12-29 10:01:19.939306-05 2005-12-29 3689 85 W/O 10002-1 2913 165.00 Material Issue to Work Order 2394 t WO f jsmith f 7241 f 2005-12-29 10:01:19.939306-05 2005-12-29 3690 86 W/O 10002-1 2914 -75.00 Material Issue to Work Order 2395 t WO f jsmith f 7240 f 2005-12-29 10:01:19.939306-05 2005-12-29 3690 85 W/O 10002-1 2914 75.00 Material Issue to Work Order 2395 t WO f jsmith f 7243 f 2005-12-29 10:01:19.939306-05 2005-12-29 3691 86 W/O 10002-1 -1 -1.10 Post Setup Time to Work Order 2396 t WO f jsmith f 7242 f 2005-12-29 10:01:19.939306-05 2005-12-29 3691 94 W/O 10002-1 -1 1.10 Post Setup Time to Work Order 2396 t WO f jsmith f 7245 f 2005-12-29 10:01:19.939306-05 2005-12-29 3692 86 W/O 10002-1 -1 -33.00 Post Run Time to Work Order 2397 t WO f jsmith f 7244 f 2005-12-29 10:01:19.939306-05 2005-12-29 3692 94 W/O 10002-1 -1 33.00 Post Run Time to Work Order 2397 t WO f jsmith f 7246 f 2005-12-29 10:01:23.341554-05 2005-12-29 3693 86 W/O 10002-1 -1 -2.20 Manufacturing Inventory Cost Variance 2398 t WO f jsmith f 7247 f 2005-12-29 10:01:23.341554-05 2005-12-29 3693 87 W/O 10002-1 -1 2.20 Manufacturing Inventory Cost Variance 2398 t WO f jsmith f 7248 f 2005-12-29 10:11:42.058351-05 2005-12-29 3694 86 W/O 40000-1 2915 26.67 Receive Inventory from Manufacturing 2400 t WO f jsmith f 7249 f 2005-12-29 10:11:42.058351-05 2005-12-29 3694 85 W/O 40000-1 2915 -26.67 Receive Inventory from Manufacturing 2400 t WO f jsmith f 7251 f 2005-12-29 10:11:42.058351-05 2005-12-29 3695 86 W/O 40000-1 -1 -1.10 Post Setup Time to Work Order 2401 t WO f jsmith f 7250 f 2005-12-29 10:11:42.058351-05 2005-12-29 3695 94 W/O 40000-1 -1 1.10 Post Setup Time to Work Order 2401 t WO f jsmith f 7253 f 2005-12-29 10:11:42.058351-05 2005-12-29 3696 86 W/O 40000-1 -1 -1.10 Post Run Time to Work Order 2402 t WO f jsmith f 7252 f 2005-12-29 10:11:42.058351-05 2005-12-29 3696 94 W/O 40000-1 -1 1.10 Post Run Time to Work Order 2402 t WO f jsmith f 7255 f 2005-12-29 10:11:42.058351-05 2005-12-29 3697 86 W/O 40000-1 -1 -1.10 Post Setup Time to Work Order 2403 t WO f jsmith f 7254 f 2005-12-29 10:11:42.058351-05 2005-12-29 3697 94 W/O 40000-1 -1 1.10 Post Setup Time to Work Order 2403 t WO f jsmith f 7257 f 2005-12-29 10:11:42.058351-05 2005-12-29 3698 86 W/O 40000-1 -1 -1.10 Post Run Time to Work Order 2404 t WO f jsmith f 7256 f 2005-12-29 10:11:42.058351-05 2005-12-29 3698 94 W/O 40000-1 -1 1.10 Post Run Time to Work Order 2404 t WO f jsmith f 7259 f 2005-12-29 10:11:42.058351-05 2005-12-29 3699 86 W/O 40000-1 -1 -0.88 Post Setup Time to Work Order 2405 t WO f jsmith f 7258 f 2005-12-29 10:11:42.058351-05 2005-12-29 3699 94 W/O 40000-1 -1 0.88 Post Setup Time to Work Order 2405 t WO f jsmith f 7261 f 2005-12-29 10:11:42.058351-05 2005-12-29 3700 86 W/O 40000-1 -1 -0.88 Post Run Time to Work Order 2406 t WO f jsmith f 7260 f 2005-12-29 10:11:42.058351-05 2005-12-29 3700 94 W/O 40000-1 -1 0.88 Post Run Time to Work Order 2406 t WO f jsmith f 7262 f 2005-12-29 10:12:08.029586-05 2005-12-29 3701 86 W/O 40000-2 2916 266.68 Receive Inventory from Manufacturing 2407 t WO f jsmith f 7263 f 2005-12-29 10:12:08.029586-05 2005-12-29 3701 85 W/O 40000-2 2916 -266.68 Receive Inventory from Manufacturing 2407 t WO f jsmith f 7265 f 2005-12-29 10:12:08.029586-05 2005-12-29 3702 86 W/O 40000-2 2917 -92.10 Material Issue to Work Order 2408 t WO f jsmith f 7264 f 2005-12-29 10:12:08.029586-05 2005-12-29 3702 85 W/O 40000-2 2917 92.10 Material Issue to Work Order 2408 t WO f jsmith f 7267 f 2005-12-29 10:12:08.029586-05 2005-12-29 3703 86 W/O 40000-2 2918 -40.00 Material Issue to Work Order 2409 t WO f jsmith f 7266 f 2005-12-29 10:12:08.029586-05 2005-12-29 3703 85 W/O 40000-2 2918 40.00 Material Issue to Work Order 2409 t WO f jsmith f 7269 f 2005-12-29 10:12:08.029586-05 2005-12-29 3704 86 W/O 40000-2 2919 -0.70 Material Issue to Work Order 2410 t WO f jsmith f 7268 f 2005-12-29 10:12:08.029586-05 2005-12-29 3704 85 W/O 40000-2 2919 0.70 Material Issue to Work Order 2410 t WO f jsmith f 7271 f 2005-12-29 10:12:08.029586-05 2005-12-29 3705 86 W/O 40000-2 2920 -100.00 Material Issue to Work Order 2411 t WO f jsmith f 7270 f 2005-12-29 10:12:08.029586-05 2005-12-29 3705 85 W/O 40000-2 2920 100.00 Material Issue to Work Order 2411 t WO f jsmith f 7273 f 2005-12-29 10:12:08.029586-05 2005-12-29 3706 86 W/O 40000-2 -1 -1.10 Post Setup Time to Work Order 2412 t WO f jsmith f 7272 f 2005-12-29 10:12:08.029586-05 2005-12-29 3706 94 W/O 40000-2 -1 1.10 Post Setup Time to Work Order 2412 t WO f jsmith f 7275 f 2005-12-29 10:12:08.029586-05 2005-12-29 3707 86 W/O 40000-2 -1 -11.00 Post Run Time to Work Order 2413 t WO f jsmith f 7274 f 2005-12-29 10:12:08.029586-05 2005-12-29 3707 94 W/O 40000-2 -1 11.00 Post Run Time to Work Order 2413 t WO f jsmith f 7277 f 2005-12-29 10:12:08.029586-05 2005-12-29 3708 86 W/O 40000-2 -1 -1.10 Post Setup Time to Work Order 2414 t WO f jsmith f 7276 f 2005-12-29 10:12:08.029586-05 2005-12-29 3708 94 W/O 40000-2 -1 1.10 Post Setup Time to Work Order 2414 t WO f jsmith f 7279 f 2005-12-29 10:12:08.029586-05 2005-12-29 3709 86 W/O 40000-2 -1 -11.00 Post Run Time to Work Order 2415 t WO f jsmith f 7278 f 2005-12-29 10:12:08.029586-05 2005-12-29 3709 94 W/O 40000-2 -1 11.00 Post Run Time to Work Order 2415 t WO f jsmith f 7287 f 2005-12-29 10:12:34.705365-05 2005-12-29 3713 86 W/O 10001-1 2922 -92.10 Material Issue to Work Order 2421 t WO f jsmith f 7286 f 2005-12-29 10:12:34.705365-05 2005-12-29 3713 85 W/O 10001-1 2922 92.10 Material Issue to Work Order 2421 t WO f jsmith f 7289 f 2005-12-29 10:12:34.705365-05 2005-12-29 3714 86 W/O 10001-1 2923 -40.00 Material Issue to Work Order 2422 t WO f jsmith f 7288 f 2005-12-29 10:12:34.705365-05 2005-12-29 3714 85 W/O 10001-1 2923 40.00 Material Issue to Work Order 2422 t WO f jsmith f 7291 f 2005-12-29 10:12:34.705365-05 2005-12-29 3715 86 W/O 10001-1 2924 -0.70 Material Issue to Work Order 2423 t WO f jsmith f 7290 f 2005-12-29 10:12:34.705365-05 2005-12-29 3715 85 W/O 10001-1 2924 0.70 Material Issue to Work Order 2423 t WO f jsmith f 7293 f 2005-12-29 10:12:34.705365-05 2005-12-29 3716 86 W/O 10001-1 2925 -100.00 Material Issue to Work Order 2424 t WO f jsmith f 7292 f 2005-12-29 10:12:34.705365-05 2005-12-29 3716 85 W/O 10001-1 2925 100.00 Material Issue to Work Order 2424 t WO f jsmith f 7295 f 2005-12-29 10:12:34.705365-05 2005-12-29 3717 86 W/O 10001-1 -1 -1.10 Post Setup Time to Work Order 2425 t WO f jsmith f 7294 f 2005-12-29 10:12:34.705365-05 2005-12-29 3717 94 W/O 10001-1 -1 1.10 Post Setup Time to Work Order 2425 t WO f jsmith f 7297 f 2005-12-29 10:12:34.705365-05 2005-12-29 3718 86 W/O 10001-1 -1 -11.00 Post Run Time to Work Order 2426 t WO f jsmith f 7296 f 2005-12-29 10:12:34.705365-05 2005-12-29 3718 94 W/O 10001-1 -1 11.00 Post Run Time to Work Order 2426 t WO f jsmith f 7299 f 2005-12-29 10:12:34.705365-05 2005-12-29 3719 86 W/O 10001-1 -1 -1.10 Post Setup Time to Work Order 2427 t WO f jsmith f 7298 f 2005-12-29 10:12:34.705365-05 2005-12-29 3719 94 W/O 10001-1 -1 1.10 Post Setup Time to Work Order 2427 t WO f jsmith f 7301 f 2005-12-29 10:12:34.705365-05 2005-12-29 3720 86 W/O 10001-1 -1 -11.00 Post Run Time to Work Order 2428 t WO f jsmith f 7300 f 2005-12-29 10:12:34.705365-05 2005-12-29 3720 94 W/O 10001-1 -1 11.00 Post Run Time to Work Order 2428 t WO f jsmith f 7303 f 2005-12-29 10:12:34.705365-05 2005-12-29 3721 86 W/O 10001-1 -1 -0.88 Post Setup Time to Work Order 2429 t WO f jsmith f 7302 f 2005-12-29 10:12:34.705365-05 2005-12-29 3721 94 W/O 10001-1 -1 0.88 Post Setup Time to Work Order 2429 t WO f jsmith f 7305 f 2005-12-29 10:12:34.705365-05 2005-12-29 3722 86 W/O 10001-1 -1 -8.80 Post Run Time to Work Order 2430 t WO f jsmith f 7304 f 2005-12-29 10:12:34.705365-05 2005-12-29 3722 94 W/O 10001-1 -1 8.80 Post Run Time to Work Order 2430 t WO f jsmith f 7307 f 2005-12-29 10:13:37.4137-05 2005-12-29 3723 86 W/O 40000-1 2926 -1.00 Material Issue to Work Order 2433 t WO f jsmith f 7306 f 2005-12-29 10:13:37.4137-05 2005-12-29 3723 85 W/O 40000-1 2926 1.00 Material Issue to Work Order 2433 t WO f jsmith f 7309 f 2005-12-29 10:13:37.4137-05 2005-12-29 3724 86 W/O 40000-1 2927 -0.07 Material Issue to Work Order 2434 t WO f jsmith f 7308 f 2005-12-29 10:13:37.4137-05 2005-12-29 3724 85 W/O 40000-1 2927 0.07 Material Issue to Work Order 2434 t WO f jsmith f 7310 f 2005-12-29 10:14:00.880556-05 2005-12-29 3725 86 W/O 40000-1 -1 3.84 Manufacturing Inventory Cost Variance 2435 t WO f jsmith f 7311 f 2005-12-29 10:14:00.880556-05 2005-12-29 3725 87 W/O 40000-1 -1 -3.84 Manufacturing Inventory Cost Variance 2435 t WO f jsmith f 7313 f 2005-12-29 10:21:04.772038-05 2005-12-29 3726 90 A/P 30003 \N -30.80 RF-01 2437 t VO f jsmith f 7314 f 2005-12-29 10:21:04.772038-05 2005-12-29 3726 99 A/P 30003 \N 717.00 RF-01 2437 t VO f jsmith f 7312 f 2005-12-29 10:21:04.772038-05 2005-12-29 3726 95 A/P 30003 \N -686.20 RF-01 2437 t VO f jsmith f 7315 f 2005-12-29 10:21:42.088999-05 2005-12-29 3727 101 A/P 30003 77 14.34 Discount for V 30003 2438 t CM f jsmith f 7316 f 2005-12-29 10:21:42.088999-05 2005-12-29 3727 99 A/P 30003 77 -14.34 Discount for V 30003 2438 t CM f jsmith f 7318 f 2005-12-29 10:24:11.38751-05 2005-12-29 3728 109 A/P 3003 103 702.66 TPARTS-Toy Parts Inc. 2439 t CK t jsmith f 7317 f 2005-12-29 10:24:11.38751-05 2005-12-29 3728 99 A/P 3003 103 -702.66 TPARTS-Toy Parts Inc. 2439 t CK f jsmith f 7321 f 2005-12-29 12:00:38.208935-05 2005-12-29 3732 95 S/R 20004 2928 10000.00 Receive Inventory from P/O 2441 t PO f jsmith f 7322 f 2005-12-29 12:00:38.208935-05 2005-12-29 3732 85 S/R 20004 2928 -10000.00 Receive Inventory from P/O 2441 t PO f jsmith f 7323 f 2005-12-29 12:00:38.208935-05 2005-12-29 3733 95 S/R 20004 2929 5000.00 Receive Inventory from P/O 2443 t PO f jsmith f 7324 f 2005-12-29 12:00:38.208935-05 2005-12-29 3733 85 S/R 20004 2929 -5000.00 Receive Inventory from P/O 2443 t PO f jsmith f 7325 f 2005-12-29 12:00:38.208935-05 2005-12-29 3734 95 S/R 20004 2930 4000.00 Receive Inventory from P/O 2445 t PO f jsmith f 7326 f 2005-12-29 12:00:38.208935-05 2005-12-29 3734 85 S/R 20004 2930 -4000.00 Receive Inventory from P/O 2445 t PO f jsmith f 7327 f 2005-12-29 12:00:38.208935-05 2005-12-29 3735 95 S/R 20004 2931 8.75 Receive Inventory from P/O 2447 t PO f jsmith f 7328 f 2005-12-29 12:00:38.208935-05 2005-12-29 3735 85 S/R 20004 2931 -8.75 Receive Inventory from P/O 2447 t PO f jsmith f 7329 f 2005-12-29 12:02:08.616234-05 2005-12-29 3736 86 W/O Misc. 2932 82.89 Receive from Misc. Production for Item Number TKIT1\n 2449 t WO f jsmith f 7330 f 2005-12-29 12:02:08.616234-05 2005-12-29 3736 85 W/O Misc. 2932 -82.89 Receive from Misc. Production for Item Number TKIT1\n 2449 t WO f jsmith f 7334 f 2005-12-29 12:02:08.616234-05 2005-12-29 3738 86 W/O Misc. 2934 -49.50 Receive from Misc. Production for Item Number TKIT1\n 2451 t WO f jsmith f 7333 f 2005-12-29 12:02:08.616234-05 2005-12-29 3738 85 W/O Misc. 2934 49.50 Receive from Misc. Production for Item Number TKIT1\n 2451 t WO f jsmith f 7336 f 2005-12-29 12:02:08.616234-05 2005-12-29 3739 86 W/O Misc. 2932 -10.89 Cost Variance of Post to Misc. Production for Item Number TKIT1 2452 t WO f jsmith f 7335 f 2005-12-29 12:02:08.616234-05 2005-12-29 3739 87 W/O Misc. 2932 10.89 Cost Variance of Post to Misc. Production for Item Number TKIT1 2452 t WO f jsmith f 7337 f 2005-12-29 12:02:48.89463-05 2005-12-29 3740 86 W/O Misc. 2935 480.02 Receive from Misc. Production for Item Number YTRUCK1\n 2453 t WO f jsmith f 7338 f 2005-12-29 12:02:48.89463-05 2005-12-29 3740 85 W/O Misc. 2935 -480.02 Receive from Misc. Production for Item Number YTRUCK1\n 2453 t WO f jsmith f 7340 f 2005-12-29 12:02:48.89463-05 2005-12-29 3741 86 W/O Misc. 2936 -180.00 Receive from Misc. Production for Item Number YTRUCK1\n 2454 t WO f jsmith f 7339 f 2005-12-29 12:02:48.89463-05 2005-12-29 3741 85 W/O Misc. 2936 180.00 Receive from Misc. Production for Item Number YTRUCK1\n 2454 t WO f jsmith f 7342 f 2005-12-29 12:02:48.89463-05 2005-12-29 3742 86 W/O Misc. 2937 -1.26 Receive from Misc. Production for Item Number YTRUCK1\n 2455 t WO f jsmith f 7341 f 2005-12-29 12:02:48.89463-05 2005-12-29 3742 85 W/O Misc. 2937 1.26 Receive from Misc. Production for Item Number YTRUCK1\n 2455 t WO f jsmith f 7344 f 2005-12-29 12:02:48.89463-05 2005-12-29 3743 86 W/O Misc. 2938 -72.00 Receive from Misc. Production for Item Number YTRUCK1\n 2456 t WO f jsmith f 7343 f 2005-12-29 12:02:48.89463-05 2005-12-29 3743 85 W/O Misc. 2938 72.00 Receive from Misc. Production for Item Number YTRUCK1\n 2456 t WO f jsmith f 7346 f 2005-12-29 12:02:48.89463-05 2005-12-29 3744 86 W/O Misc. 2939 -165.78 Receive from Misc. Production for Item Number YTRUCK1\n 2457 t WO f jsmith f 7345 f 2005-12-29 12:02:48.89463-05 2005-12-29 3744 85 W/O Misc. 2939 165.78 Receive from Misc. Production for Item Number YTRUCK1\n 2457 t WO f jsmith f 7348 f 2005-12-29 12:02:48.89463-05 2005-12-29 3745 86 W/O Misc. 2935 -60.98 Cost Variance of Post to Misc. Production for Item Number YTRUCK1 2458 t WO f jsmith f 7347 f 2005-12-29 12:02:48.89463-05 2005-12-29 3745 87 W/O Misc. 2935 60.98 Cost Variance of Post to Misc. Production for Item Number YTRUCK1 2458 t WO f jsmith f 7350 f 2005-12-29 12:07:32.143853-05 2005-12-29 3746 96 S/R 50005-1 2940 -984.05 Issue to Shipping 2459 t SO f jsmith f 7349 f 2005-12-29 12:07:32.143853-05 2005-12-29 3746 85 S/R 50005-1 2940 984.05 Issue to Shipping 2459 t SO f jsmith f 7352 f 2005-12-29 12:09:45.54536-05 2005-12-29 3747 108 S/R 50005 -1 -984.05 Ship Shipment 2460 t SO f jsmith f 7351 f 2005-12-29 12:09:45.54536-05 2005-12-29 3747 96 S/R 50005 -1 984.05 Ship Shipment 2460 t SO f jsmith f 7356 f 2005-12-29 12:22:23.380397-05 2005-12-29 3748 106 A/R 60008 \N -3780.78 2461 t IN f jsmith f 7355 f 2005-12-29 12:22:23.380397-05 2005-12-29 3748 102 A/R 60008 \N 175.28 2461 t IN f jsmith f 7354 f 2005-12-29 12:22:23.380397-05 2005-12-29 3748 105 A/R 60008 \N 100.00 2461 t IN f jsmith f 7353 f 2005-12-29 12:22:23.380397-05 2005-12-29 3748 103 A/R 60008 \N 3505.50 2461 t IN f jsmith f 7357 f 2005-12-29 12:25:16.460902-05 2005-12-29 3749 109 A/R C-10001 \N -3676.37 TTOYS-Tremendous Toys Inc. 2462 t CR t jsmith f 7358 f 2005-12-29 12:25:16.460902-05 2005-12-29 3749 106 A/R I-60008 \N 3676.37 TTOYS-Tremendous Toys Inc. 2462 t CR f jsmith f 7360 f 2005-12-29 12:28:14.419745-05 2005-12-29 3750 90 A/P 30004 \N 6020.00 RF-002 2463 t VO f jsmith f 7361 f 2005-12-29 12:28:14.419745-05 2005-12-29 3750 99 A/P 30004 \N 13050.00 RF-002 2463 t VO f jsmith f 7359 f 2005-12-29 12:28:14.419745-05 2005-12-29 3750 95 A/P 30004 \N -19070.00 RF-002 2463 t VO f jsmith f 7362 f 2005-12-29 12:28:34.179493-05 2005-12-29 3751 101 A/P 30004 79 261.00 Discount for V 30004 2464 t CM f jsmith f 7363 f 2005-12-29 12:28:34.179493-05 2005-12-29 3751 99 A/P 30004 79 -261.00 Discount for V 30004 2464 t CM f jsmith f 7365 f 2005-12-29 12:29:30.880455-05 2005-12-29 3752 109 A/P 3004 104 12789.00 TPARTS-Toy Parts Inc. 2465 t CK t jsmith f 7364 f 2005-12-29 12:29:30.880455-05 2005-12-29 3752 99 A/P 3004 104 -12789.00 TPARTS-Toy Parts Inc. 2465 t CK f jsmith f 7366 f 2005-12-29 17:57:14.865318-05 2005-12-29 3753 95 S/R 20005 2941 50.00 Receive Inventory from P/O 2466 t PO f jsmith f 7367 f 2005-12-29 17:57:14.865318-05 2005-12-29 3753 85 S/R 20005 2941 -50.00 Receive Inventory from P/O 2466 t PO f jsmith f 7369 f 2005-12-29 17:59:17.382043-05 2005-12-29 3754 99 A/P 30005 \N 50.00 RF-01 2468 t VO f jsmith f 7368 f 2005-12-29 17:59:17.382043-05 2005-12-29 3754 95 A/P 30005 \N -50.00 RF-01 2468 t VO f jsmith f 7370 f 2005-12-29 17:59:58.880444-05 2005-12-29 3755 101 A/P 30005 81 1.00 Discount for V 30005 2469 t CM f jsmith f 7371 f 2005-12-29 17:59:58.880444-05 2005-12-29 3755 99 A/P 30005 81 -1.00 Discount for V 30005 2469 t CM f jsmith f 7373 f 2005-12-29 18:00:37.757972-05 2005-12-29 3756 109 A/P 3005 105 49.00 TPARTS-Toy Parts Inc. 2470 t CK t jsmith f 7372 f 2005-12-29 18:00:37.757972-05 2005-12-29 3756 99 A/P 3005 105 -49.00 TPARTS-Toy Parts Inc. 2470 t CK f jsmith f 7374 f 2005-12-29 18:01:52.460451-05 2005-12-29 3757 95 S/R 20006 2942 50.00 Receive Inventory from P/O 2471 t PO f jsmith f 7375 f 2005-12-29 18:01:52.460451-05 2005-12-29 3757 85 S/R 20006 2942 -50.00 Receive Inventory from P/O 2471 t PO f jsmith f 7377 f 2005-12-29 18:03:11.971842-05 2005-12-29 3758 90 A/P 30006 \N 10.00 RF-1 2473 t VO f jsmith f 7378 f 2005-12-29 18:03:11.971842-05 2005-12-29 3758 99 A/P 30006 \N 40.00 RF-1 2473 t VO f jsmith f 7376 f 2005-12-29 18:03:11.971842-05 2005-12-29 3758 95 A/P 30006 \N -50.00 RF-1 2473 t VO f jsmith f 7380 f 2005-12-29 18:05:06.53047-05 2005-12-29 3759 85 S/R 20007 2943 -50.00 Receive Inventory from P/O 2474 t PO f jsmith f 7394 f 2005-12-30 15:06:11.174343-05 2005-12-30 3765 85 S/R 20009 2945 -100.00 Receive Inventory from P/O 2480 t PO f jsmith f 7396 f 2005-12-30 15:07:00.153887-05 2005-12-30 3766 90 A/P 30009 \N 50.00 50 2482 t VO f jsmith f 7397 f 2005-12-30 15:07:00.153887-05 2005-12-30 3766 99 A/P 30009 \N 50.00 50 2482 t VO f jsmith f 7395 f 2005-12-30 15:07:00.153887-05 2005-12-30 3766 95 A/P 30009 \N -100.00 50 2482 t VO f jsmith f 7398 f 2005-12-30 15:08:18.361723-05 2005-12-30 3767 95 S/R 20010 2946 100.00 Receive Inventory from P/O 2483 t PO f jsmith f 7399 f 2005-12-30 15:08:18.361723-05 2005-12-30 3767 85 S/R 20010 2946 -100.00 Receive Inventory from P/O 2483 t PO f jsmith f 7401 f 2005-12-30 15:09:19.170385-05 2005-12-30 3768 90 A/P 30010 \N -50.00 RF 2485 t VO f jsmith f 7402 f 2005-12-30 15:09:19.170385-05 2005-12-30 3768 99 A/P 30010 \N 100.00 RF 2485 t VO f jsmith f 7400 f 2005-12-30 15:09:19.170385-05 2005-12-30 3768 95 A/P 30010 \N -50.00 RF 2485 t VO f jsmith f 7406 f 2006-01-09 09:54:02.867175-05 2006-01-09 3769 104 A/R Unapplied from V-50008-1 \N 997.50 Cash Receipt from Credit Card 2486 t CR f jsmith f 7405 f 2006-01-09 09:54:02.867175-05 2006-01-09 3769 109 A/R V-50008-1 \N -997.50 Cash Receipt from Credit Card 2486 t CR t jsmith f 7404 f 2006-01-09 09:54:02.867175-05 2006-01-09 3770 104 A/R 20003 305 -997.50 Unapplied from V-50008-1 2487 t CM f jsmith f 7403 f 2006-01-09 09:54:02.867175-05 2006-01-09 3770 106 A/R 20003 305 997.50 Unapplied from V-50008-1 2487 t CM f jsmith f 7407 f 2006-01-09 10:05:08.722536-05 2006-01-09 3771 95 S/R 20011 2947 2.50 Receive Inventory from P/O 2488 t PO f jsmith f 7408 f 2006-01-09 10:05:08.722536-05 2006-01-09 3771 85 S/R 20011 2947 -2.50 Receive Inventory from P/O 2488 t PO f jsmith f 7410 f 2006-01-09 10:08:24.06783-05 2006-01-09 3772 99 A/P 30011 \N 25.00 RF-01 2490 t VO f jsmith f 7409 f 2006-01-09 10:08:24.06783-05 2006-01-09 3772 95 A/P 30011 \N -25.00 RF-01 2490 t VO f jsmith f 7411 f 2006-01-09 10:09:24.734802-05 2006-01-09 3773 101 A/P 30009 88 1.00 Discount for V 30009 2491 t CM f jsmith f 7412 f 2006-01-09 10:09:24.734802-05 2006-01-09 3773 99 A/P 30009 88 -1.00 Discount for V 30009 2491 t CM f jsmith f 7414 f 2006-01-09 10:10:39.79604-05 2006-01-09 3774 109 A/P 3006 106 274.00 TPARTS-Toy Parts Inc. 2492 t CK t jsmith f 7413 f 2006-01-09 10:10:39.79604-05 2006-01-09 3774 99 A/P 3006 106 -274.00 TPARTS-Toy Parts Inc. 2492 t CK f jsmith f 7416 f 2006-01-09 10:11:59.284841-05 2006-01-09 3775 86 W/O 10003-1 2948 -55.00 Material Issue to Work Order 2493 t WO f jsmith f 7415 f 2006-01-09 10:11:59.284841-05 2006-01-09 3775 85 W/O 10003-1 2948 55.00 Material Issue to Work Order 2493 t WO f jsmith f 7418 f 2006-01-09 10:11:59.284841-05 2006-01-09 3776 86 W/O 10003-1 2949 -25.00 Material Issue to Work Order 2494 t WO f jsmith f 7417 f 2006-01-09 10:11:59.284841-05 2006-01-09 3776 85 W/O 10003-1 2949 25.00 Material Issue to Work Order 2494 t WO f jsmith f 7419 f 2006-01-09 10:11:59.284841-05 2006-01-09 3777 86 W/O 10003-1 2950 92.10 Receive Inventory from Manufacturing 2495 t WO f jsmith f 7420 f 2006-01-09 10:11:59.284841-05 2006-01-09 3777 85 W/O 10003-1 2950 -92.10 Receive Inventory from Manufacturing 2495 t WO f jsmith f 7422 f 2006-01-09 10:11:59.284841-05 2006-01-09 3778 86 W/O 10003-1 -1 -0.92 Post Setup Time to Work Order 2496 t WO f jsmith f 7421 f 2006-01-09 10:11:59.284841-05 2006-01-09 3778 94 W/O 10003-1 -1 0.92 Post Setup Time to Work Order 2496 t WO f jsmith f 7424 f 2006-01-09 10:11:59.284841-05 2006-01-09 3779 86 W/O 10003-1 -1 -10.82 Post Run Time to Work Order 2497 t WO f jsmith f 7423 f 2006-01-09 10:11:59.284841-05 2006-01-09 3779 94 W/O 10003-1 -1 10.82 Post Run Time to Work Order 2497 t WO f jsmith f 7425 f 2006-01-09 10:12:31.867381-05 2006-01-09 3780 86 W/O 10003-1 -1 -0.37 Manufacturing Inventory Cost Variance 2498 t WO f jsmith f 7426 f 2006-01-09 10:12:31.867381-05 2006-01-09 3780 87 W/O 10003-1 -1 0.37 Manufacturing Inventory Cost Variance 2498 t WO f jsmith f 7427 f 2006-01-09 10:12:58.424348-05 2006-01-09 3781 86 W/O 50008-1 2951 266.68 Receive Inventory from Manufacturing 2500 t WO f jsmith f 7428 f 2006-01-09 10:12:58.424348-05 2006-01-09 3781 85 W/O 50008-1 2951 -266.68 Receive Inventory from Manufacturing 2500 t WO f jsmith f 7430 f 2006-01-09 10:12:58.424348-05 2006-01-09 3782 86 W/O 50008-1 2952 -40.00 Material Issue to Work Order 2501 t WO f jsmith f 7429 f 2006-01-09 10:12:58.424348-05 2006-01-09 3782 85 W/O 50008-1 2952 40.00 Material Issue to Work Order 2501 t WO f jsmith f 7432 f 2006-01-09 10:12:58.424348-05 2006-01-09 3783 86 W/O 50008-1 2953 -92.10 Material Issue to Work Order 2502 t WO f jsmith f 7431 f 2006-01-09 10:12:58.424348-05 2006-01-09 3783 85 W/O 50008-1 2953 92.10 Material Issue to Work Order 2502 t WO f jsmith f 7434 f 2006-01-09 10:12:58.424348-05 2006-01-09 3784 86 W/O 50008-1 2954 -100.00 Material Issue to Work Order 2503 t WO f jsmith f 7433 f 2006-01-09 10:12:58.424348-05 2006-01-09 3784 85 W/O 50008-1 2954 100.00 Material Issue to Work Order 2503 t WO f jsmith f 7436 f 2006-01-09 10:12:58.424348-05 2006-01-09 3785 86 W/O 50008-1 2955 -0.70 Material Issue to Work Order 2504 t WO f jsmith f 7435 f 2006-01-09 10:12:58.424348-05 2006-01-09 3785 85 W/O 50008-1 2955 0.70 Material Issue to Work Order 2504 t WO f jsmith f 7438 f 2006-01-09 10:12:58.424348-05 2006-01-09 3786 86 W/O 50008-1 -1 -1.10 Post Setup Time to Work Order 2505 t WO f jsmith f 7437 f 2006-01-09 10:12:58.424348-05 2006-01-09 3786 94 W/O 50008-1 -1 1.10 Post Setup Time to Work Order 2505 t WO f jsmith f 7440 f 2006-01-09 10:12:58.424348-05 2006-01-09 3787 86 W/O 50008-1 -1 -11.00 Post Run Time to Work Order 2506 t WO f jsmith f 7439 f 2006-01-09 10:12:58.424348-05 2006-01-09 3787 94 W/O 50008-1 -1 11.00 Post Run Time to Work Order 2506 t WO f jsmith f 7442 f 2006-01-09 10:12:58.424348-05 2006-01-09 3788 86 W/O 50008-1 -1 -1.10 Post Setup Time to Work Order 2507 t WO f jsmith f 7441 f 2006-01-09 10:12:58.424348-05 2006-01-09 3788 94 W/O 50008-1 -1 1.10 Post Setup Time to Work Order 2507 t WO f jsmith f 7444 f 2006-01-09 10:12:58.424348-05 2006-01-09 3789 86 W/O 50008-1 -1 -11.00 Post Run Time to Work Order 2508 t WO f jsmith f 7443 f 2006-01-09 10:12:58.424348-05 2006-01-09 3789 94 W/O 50008-1 -1 11.00 Post Run Time to Work Order 2508 t WO f jsmith f 7446 f 2006-01-09 10:12:58.424348-05 2006-01-09 3790 86 W/O 50008-1 -1 -0.88 Post Setup Time to Work Order 2509 t WO f jsmith f 7445 f 2006-01-09 10:12:58.424348-05 2006-01-09 3790 94 W/O 50008-1 -1 0.88 Post Setup Time to Work Order 2509 t WO f jsmith f 7448 f 2006-01-09 10:12:58.424348-05 2006-01-09 3791 86 W/O 50008-1 -1 -8.80 Post Run Time to Work Order 2510 t WO f jsmith f 7447 f 2006-01-09 10:12:58.424348-05 2006-01-09 3791 94 W/O 50008-1 -1 8.80 Post Run Time to Work Order 2510 t WO f jsmith f 7450 f 2006-01-09 10:18:03.89857-05 2006-01-09 3792 96 S/R 50008-1 2956 -266.68 Issue to Shipping 2513 t SO f jsmith f 7449 f 2006-01-09 10:18:03.89857-05 2006-01-09 3792 85 S/R 50008-1 2956 266.68 Issue to Shipping 2513 t SO f jsmith f 7451 f 2006-01-09 10:19:26.941862-05 2006-01-09 3793 96 S/R 50008 -1 266.68 Ship Shipment 2514 t SO f jsmith f 7454 f 2006-01-09 10:29:45.388301-05 2006-01-09 3794 106 A/R 60009 \N -1096.50 2515 t IN f jsmith f 7453 f 2006-01-09 10:29:45.388301-05 2006-01-09 3794 102 A/R 60009 \N 47.50 2515 t IN f jsmith f 7456 f 2006-01-09 10:29:45.388301-05 2006-01-09 3794 105 A/R 60009 \N 99.00 2515 t IN f jsmith f 7455 f 2006-01-09 10:29:45.388301-05 2006-01-09 3794 103 A/R 60009 \N 950.00 2515 t IN f jsmith f 7458 f 2006-01-09 10:30:54.899792-05 2006-01-09 3795 109 A/R V-757332 \N -99.00 TTOYS-Tremendous Toys Inc. 2516 t CR t jsmith f 7457 f 2006-01-09 10:30:54.899792-05 2006-01-09 3795 106 A/R I-60009 \N 99.00 TTOYS-Tremendous Toys Inc. 2516 t CR f jsmith f 7459 f 2006-01-09 10:33:08.967829-05 2006-01-09 3796 95 S/R 20012 2957 25.00 Receive Inventory from P/O 2517 t PO f jsmith f 7460 f 2006-01-09 10:33:08.967829-05 2006-01-09 3796 85 S/R 20012 2957 -25.00 Receive Inventory from P/O 2517 t PO f jsmith f 7461 f 2006-01-09 10:34:28.15672-05 2006-01-09 3797 95 S/R 20012 2958 -2.50 Receive Inventory from P/O 2519 t PO f jsmith f 7462 f 2006-01-09 10:34:28.15672-05 2006-01-09 3797 85 S/R 20012 2958 2.50 Receive Inventory from P/O 2519 t PO f jsmith f 7464 f 2006-01-09 10:35:38.141745-05 2006-01-29 3798 90 A/P 30012 \N 2.50 RF-101 2520 t VO f jsmith f 7465 f 2006-01-09 10:35:38.141745-05 2006-01-29 3798 99 A/P 30012 \N 20.00 RF-101 2520 t VO f jsmith f 7463 f 2006-01-09 10:35:38.141745-05 2006-01-29 3798 95 A/P 30012 \N -22.50 RF-101 2520 t VO f jsmith f 7466 f 2006-01-09 10:36:05.829981-05 2006-01-09 3799 101 A/P 30012 90 0.40 Discount for V 30012 2521 t CM f jsmith f 7467 f 2006-01-09 10:36:05.829981-05 2006-01-09 3799 99 A/P 30012 90 -0.40 Discount for V 30012 2521 t CM f jsmith f 7469 f 2006-01-09 10:37:31.706754-05 2006-01-09 3800 109 A/P 3007 107 20.00 TPARTS-Toy Parts Inc. 2522 t CK t jsmith f 7468 f 2006-01-09 10:37:31.706754-05 2006-01-09 3800 99 A/P 3007 107 -20.00 TPARTS-Toy Parts Inc. 2522 t CK f jsmith f 7470 f 2006-01-09 10:42:08.678827-05 2006-01-09 3801 91 I/M MDA-001 2959 266.68 Miscellaneous Adjustment\n 2523 t f jsmith f 7471 f 2006-01-09 10:42:08.678827-05 2006-01-09 3801 85 I/M MDA-001 2959 -266.68 Miscellaneous Adjustment\n 2523 t f jsmith f 7473 f 2006-01-09 10:42:36.316136-05 2006-01-09 3802 96 S/R 50009-1 2960 -26.67 Issue to Shipping 2524 t SO f jsmith f 7472 f 2006-01-09 10:42:36.316136-05 2006-01-09 3802 85 S/R 50009-1 2960 26.67 Issue to Shipping 2524 t SO f jsmith f 7475 f 2006-01-09 10:48:42.257492-05 2006-01-09 3803 108 S/R 50009 -1 -26.67 Ship Shipment 2525 t SO f jsmith f 7474 f 2006-01-09 10:48:42.257492-05 2006-01-09 3803 96 S/R 50009 -1 26.67 Ship Shipment 2525 t SO f jsmith f 7478 f 2006-01-09 10:49:15.486258-05 2006-01-09 3804 106 A/R 60010 \N -104.90 2526 t IN f jsmith f 7477 f 2006-01-09 10:49:15.486258-05 2006-01-09 3804 102 A/R 60010 \N 5.00 2526 t IN f jsmith f 7476 f 2006-01-09 10:49:15.486258-05 2006-01-09 3804 103 A/R 60010 \N 99.90 2526 t IN f jsmith f 7481 f 2006-01-09 10:49:58.684292-05 2006-01-09 3805 104 A/R Unapplied from C-33211 \N 104.90 TTOYS-Tremendous Toys Inc. 2527 t CR f jsmith f 7482 f 2006-01-09 10:49:58.684292-05 2006-01-09 3805 109 A/R C-33211 \N -104.90 TTOYS-Tremendous Toys Inc. 2527 t CR t jsmith f 7480 f 2006-01-09 10:49:58.684292-05 2006-01-09 3806 104 A/R 20004 308 -104.90 Unapplied from C-33211 2528 t CM f jsmith f 7479 f 2006-01-09 10:49:58.684292-05 2006-01-09 3806 106 A/R 20004 308 104.90 Unapplied from C-33211 2528 t CM f jsmith f 7485 f 2006-01-09 10:52:56.019772-05 2006-01-09 3807 104 A/R Unapplied from V-50031-1 \N 104.90 Cash Receipt from Credit Card 2529 t CR f jsmith f 7486 f 2006-01-09 10:52:56.019772-05 2006-01-09 3807 109 A/R V-50031-1 \N -104.90 Cash Receipt from Credit Card 2529 t CR t jsmith f 7484 f 2006-01-09 10:52:56.019772-05 2006-01-09 3808 104 A/R 20005 309 -104.90 Unapplied from V-50031-1 2530 t CM f jsmith f 7483 f 2006-01-09 10:52:56.019772-05 2006-01-09 3808 106 A/R 20005 309 104.90 Unapplied from V-50031-1 2530 t CM f jsmith f 7490 f 2006-01-09 10:53:30.709594-05 2006-01-09 3810 108 S/R 50030 -1 -26.67 Ship Shipment 2532 t SO f jsmith f 7489 f 2006-01-09 10:53:30.709594-05 2006-01-09 3810 96 S/R 50030 -1 26.67 Ship Shipment 2532 t SO f jsmith f 7494 f 2006-01-09 10:53:40.365115-05 2006-01-09 3811 106 A/R 60011 \N -112.90 2533 t IN f jsmith f 7493 f 2006-01-09 10:53:40.365115-05 2006-01-09 3811 102 A/R 60011 \N 5.00 2533 t IN f jsmith f 7492 f 2006-01-09 10:53:40.365115-05 2006-01-09 3811 105 A/R 60011 \N 8.00 2533 t IN f jsmith f 7491 f 2006-01-09 10:53:40.365115-05 2006-01-09 3811 103 A/R 60011 \N 99.90 2533 t IN f jsmith f 7496 f 2006-01-09 10:53:53.966653-05 2006-01-09 3812 96 S/R 50031-1 2962 -26.67 Issue to Shipping 2534 t SO f jsmith f 7495 f 2006-01-09 10:53:53.966653-05 2006-01-09 3812 85 S/R 50031-1 2962 26.67 Issue to Shipping 2534 t SO f jsmith f 7498 f 2006-01-09 10:54:04.256755-05 2006-01-09 3813 108 S/R 50031 -1 -26.67 Ship Shipment 2535 t SO f jsmith f 7497 f 2006-01-09 10:54:04.256755-05 2006-01-09 3813 96 S/R 50031 -1 26.67 Ship Shipment 2535 t SO f jsmith f 7502 f 2006-01-09 10:54:10.720081-05 2006-01-09 3814 106 A/R 60012 \N -108.90 2536 t IN f jsmith f 7501 f 2006-01-09 10:54:10.720081-05 2006-01-09 3814 102 A/R 60012 \N 5.00 2536 t IN f jsmith f 7500 f 2006-01-09 10:54:10.720081-05 2006-01-09 3814 105 A/R 60012 \N 4.00 2536 t IN f jsmith f 7499 f 2006-01-09 10:54:10.720081-05 2006-01-09 3814 103 A/R 60012 \N 99.90 2536 t IN f jsmith f 7504 f 2006-01-09 10:55:13.638735-05 2006-01-09 3815 109 A/R C-CK-101 \N -116.90 TTOYS-Tremendous Toys Inc. 2537 t CR t jsmith f 7506 f 2006-01-09 10:55:13.638735-05 2006-01-09 3815 106 A/R I-60012 \N 4.00 TTOYS-Tremendous Toys Inc. 2537 t CR f jsmith f 7505 f 2006-01-09 10:55:13.638735-05 2006-01-09 3815 106 A/R I-60010 \N 104.90 TTOYS-Tremendous Toys Inc. 2537 t CR f jsmith f 7503 f 2006-01-09 10:55:13.638735-05 2006-01-09 3815 106 A/R I-60011 \N 8.00 TTOYS-Tremendous Toys Inc. 2537 t CR f jsmith f 7507 f 2006-01-09 11:06:38.102402-05 2006-01-09 3816 87 P/D Post Cost 298 -2452.50 Post Actual Cost to Standard 2538 t f jsmith f 7508 f 2006-01-09 11:06:38.102402-05 2006-01-09 3816 85 P/D Post Cost 298 2452.50 Post Actual Cost to Standard 2538 t f jsmith f 7509 f 2006-01-09 11:06:38.102402-05 2006-01-09 3817 87 P/D Post Cost 299 4288.20 Post Actual Cost to Standard 2547 t f jsmith f 7510 f 2006-01-09 11:06:38.102402-05 2006-01-09 3817 85 P/D Post Cost 299 -4288.20 Post Actual Cost to Standard 2547 t f jsmith f 7511 f 2006-01-09 11:06:38.102402-05 2006-01-09 3818 87 P/D Post Cost 294 -7350.00 Post Actual Cost to Standard 2552 t f jsmith f 7512 f 2006-01-09 11:06:38.102402-05 2006-01-09 3818 85 P/D Post Cost 294 7350.00 Post Actual Cost to Standard 2552 t f jsmith f 7513 f 2006-01-09 11:09:16.170598-05 2006-01-09 3819 87 P/D Post Cost 293 -45.70 Post Actual Cost to Standard 2680 t f jsmith f 7514 f 2006-01-09 11:09:16.170598-05 2006-01-09 3819 85 P/D Post Cost 293 45.70 Post Actual Cost to Standard 2680 t f jsmith f 7515 f 2006-01-10 12:49:21.459381-05 2006-01-10 3820 91 I/M MA-1 2963 61.82 Miscellaneous Adjustment\n 2748 t f jsmith f 7516 f 2006-01-10 12:49:21.459381-05 2006-01-10 3820 85 I/M MA-1 2963 -61.82 Miscellaneous Adjustment\n 2748 t f jsmith f 7518 f 2006-01-10 12:49:56.229598-05 2006-01-10 3821 86 W/O 10005-1 2964 -0.07 Material Issue to Work Order 2749 t WO f jsmith f 7517 f 2006-01-10 12:49:56.229598-05 2006-01-10 3821 85 W/O 10005-1 2964 0.07 Material Issue to Work Order 2749 t WO f jsmith f 7520 f 2006-01-10 12:49:56.229598-05 2006-01-10 3822 86 W/O 10005-1 2965 -2.50 Material Issue to Work Order 2750 t WO f jsmith f 7519 f 2006-01-10 12:49:56.229598-05 2006-01-10 3822 85 W/O 10005-1 2965 2.50 Material Issue to Work Order 2750 t WO f jsmith f 7521 f 2006-01-10 12:49:56.229598-05 2006-01-10 3823 86 W/O 10005-1 2966 20.14 Receive Inventory from Manufacturing 2751 t WO f jsmith f 7522 f 2006-01-10 12:49:56.229598-05 2006-01-10 3823 85 W/O 10005-1 2966 -20.14 Receive Inventory from Manufacturing 2751 t WO f jsmith f 7524 f 2006-01-10 12:49:56.229598-05 2006-01-10 3824 86 W/O 10005-1 -1 -0.92 Post Setup Time to Work Order 2752 t WO f jsmith f 7523 f 2006-01-10 12:49:56.229598-05 2006-01-10 3824 94 W/O 10005-1 -1 0.92 Post Setup Time to Work Order 2752 t WO f jsmith f 7526 f 2006-01-10 12:49:56.229598-05 2006-01-10 3825 86 W/O 10005-1 -1 -0.92 Post Run Time to Work Order 2753 t WO f jsmith f 7525 f 2006-01-10 12:49:56.229598-05 2006-01-10 3825 94 W/O 10005-1 -1 0.92 Post Run Time to Work Order 2753 t WO f jsmith f 7528 f 2006-01-10 12:52:36.633031-05 2006-01-10 3826 86 W/O 10005-1 2968 -8.00 Material Issue to Work Order 2754 t WO f jsmith f 7527 f 2006-01-10 12:52:36.633031-05 2006-01-10 3826 85 W/O 10005-1 2968 8.00 Material Issue to Work Order 2754 t WO f jsmith f 7530 f 2006-01-10 12:52:36.633031-05 2006-01-10 3827 86 W/O 10005-1 -1 -1.10 Post Setup Time to Work Order 2755 t WO f jsmith f 7529 f 2006-01-10 12:52:36.633031-05 2006-01-10 3827 94 W/O 10005-1 -1 1.10 Post Setup Time to Work Order 2755 t WO f jsmith f 7532 f 2006-01-10 12:52:36.633031-05 2006-01-10 3828 86 W/O 10005-1 -1 -1.10 Post Run Time to Work Order 2756 t WO f jsmith f 9035 f 2007-05-30 11:39:48.948144-04 2007-05-30 4523 106 A/R 60040 \N -5286.44 3911 t IN f mfgadmin f 7531 f 2006-01-10 12:52:36.633031-05 2006-01-10 3828 94 W/O 10005-1 -1 1.10 Post Run Time to Work Order 2756 t WO f jsmith f 7534 f 2006-01-10 12:52:51.553445-05 2006-01-10 3829 86 W/O 10005-1 2969 -6.18 Material Issue to Work Order 2757 t WO f jsmith f 7533 f 2006-01-10 12:52:51.553445-05 2006-01-10 3829 85 W/O 10005-1 2969 6.18 Material Issue to Work Order 2757 t WO f jsmith f 7536 f 2006-01-10 12:52:51.553445-05 2006-01-10 3830 86 W/O 10005-1 -1 -0.88 Post Setup Time to Work Order 2758 t WO f jsmith f 7535 f 2006-01-10 12:52:51.553445-05 2006-01-10 3830 94 W/O 10005-1 -1 0.88 Post Setup Time to Work Order 2758 t WO f jsmith f 7538 f 2006-01-10 12:52:51.553445-05 2006-01-10 3831 86 W/O 10005-1 -1 -0.88 Post Run Time to Work Order 2759 t WO f jsmith f 7537 f 2006-01-10 12:52:51.553445-05 2006-01-10 3831 94 W/O 10005-1 -1 0.88 Post Run Time to Work Order 2759 t WO f jsmith f 7540 f 2006-01-10 14:24:59.311032-05 2006-01-10 3832 86 W/O 10006-1 2970 -0.04 Material Issue to Work Order 2760 t WO f jsmith f 7539 f 2006-01-10 14:24:59.311032-05 2006-01-10 3832 85 W/O 10006-1 2970 0.04 Material Issue to Work Order 2760 t WO f jsmith f 7542 f 2006-01-10 14:24:59.311032-05 2006-01-10 3833 86 W/O 10006-1 2971 -1.25 Material Issue to Work Order 2761 t WO f jsmith f 7541 f 2006-01-10 14:24:59.311032-05 2006-01-10 3833 85 W/O 10006-1 2971 1.25 Material Issue to Work Order 2761 t WO f jsmith f 7543 f 2006-01-10 14:24:59.311032-05 2006-01-10 3834 86 W/O 10006-1 2972 10.07 Receive Inventory from Manufacturing 2762 t WO f jsmith f 7544 f 2006-01-10 14:24:59.311032-05 2006-01-10 3834 85 W/O 10006-1 2972 -10.07 Receive Inventory from Manufacturing 2762 t WO f jsmith f 7546 f 2006-01-10 14:24:59.311032-05 2006-01-10 3835 86 W/O 10006-1 -1 -1.10 Post Setup Time to Work Order 2763 t WO f jsmith f 7545 f 2006-01-10 14:24:59.311032-05 2006-01-10 3835 94 W/O 10006-1 -1 1.10 Post Setup Time to Work Order 2763 t WO f jsmith f 7548 f 2006-01-10 14:24:59.311032-05 2006-01-10 3836 86 W/O 10006-1 -1 -0.55 Post Run Time to Work Order 2764 t WO f jsmith f 7547 f 2006-01-10 14:24:59.311032-05 2006-01-10 3836 94 W/O 10006-1 -1 0.55 Post Run Time to Work Order 2764 t WO f jsmith f 7550 f 2006-01-10 14:26:07.002195-05 2006-01-10 3837 86 W/O 10006-1 2974 -4.00 Material Issue to Work Order 2765 t WO f jsmith f 7549 f 2006-01-10 14:26:07.002195-05 2006-01-10 3837 85 W/O 10006-1 2974 4.00 Material Issue to Work Order 2765 t WO f jsmith f 7552 f 2006-01-10 14:26:07.002195-05 2006-01-10 3838 86 W/O 10006-1 -1 -1.10 Post Setup Time to Work Order 2766 t WO f jsmith f 7551 f 2006-01-10 14:26:07.002195-05 2006-01-10 3838 94 W/O 10006-1 -1 1.10 Post Setup Time to Work Order 2766 t WO f jsmith f 7554 f 2006-01-10 14:26:07.002195-05 2006-01-10 3839 86 W/O 10006-1 -1 -0.55 Post Run Time to Work Order 2767 t WO f jsmith f 7553 f 2006-01-10 14:26:07.002195-05 2006-01-10 3839 94 W/O 10006-1 -1 0.55 Post Run Time to Work Order 2767 t WO f jsmith f 7556 f 2006-01-10 14:26:23.770144-05 2006-01-10 3840 86 W/O 10006-1 2976 -3.09 Material Issue to Work Order 2768 t WO f jsmith f 7555 f 2006-01-10 14:26:23.770144-05 2006-01-10 3840 85 W/O 10006-1 2976 3.09 Material Issue to Work Order 2768 t WO f jsmith f 7558 f 2006-01-10 14:26:23.770144-05 2006-01-10 3841 86 W/O 10006-1 -1 -0.88 Post Setup Time to Work Order 2769 t WO f jsmith f 7557 f 2006-01-10 14:26:23.770144-05 2006-01-10 3841 94 W/O 10006-1 -1 0.88 Post Setup Time to Work Order 2769 t WO f jsmith f 7560 f 2006-01-10 14:26:23.770144-05 2006-01-10 3842 86 W/O 10006-1 -1 -0.44 Post Run Time to Work Order 2770 t WO f jsmith f 7559 f 2006-01-10 14:26:23.770144-05 2006-01-10 3842 94 W/O 10006-1 -1 0.44 Post Run Time to Work Order 2770 t WO f jsmith f 7562 f 2006-01-10 14:26:41.26114-05 2006-01-10 3843 86 W/O 10006-1 2977 -0.04 Material Issue to Work Order 2771 t WO f jsmith f 7561 f 2006-01-10 14:26:41.26114-05 2006-01-10 3843 85 W/O 10006-1 2977 0.04 Material Issue to Work Order 2771 t WO f jsmith f 7564 f 2006-01-10 14:26:41.26114-05 2006-01-10 3844 86 W/O 10006-1 2978 -1.25 Material Issue to Work Order 2772 t WO f jsmith f 7563 f 2006-01-10 14:26:41.26114-05 2006-01-10 3844 85 W/O 10006-1 2978 1.25 Material Issue to Work Order 2772 t WO f jsmith f 7565 f 2006-01-10 14:26:41.26114-05 2006-01-10 3845 86 W/O 10006-1 2979 10.07 Receive Inventory from Manufacturing 2773 t WO f jsmith f 7566 f 2006-01-10 14:26:41.26114-05 2006-01-10 3845 85 W/O 10006-1 2979 -10.07 Receive Inventory from Manufacturing 2773 t WO f jsmith f 7568 f 2006-01-10 14:26:41.26114-05 2006-01-10 3846 86 W/O 10006-1 -1 -0.55 Post Run Time to Work Order 2775 t WO f jsmith f 7567 f 2006-01-10 14:26:41.26114-05 2006-01-10 3846 94 W/O 10006-1 -1 0.55 Post Run Time to Work Order 2775 t WO f jsmith f 7570 f 2006-01-10 14:36:29.531898-05 2006-01-10 3847 86 W/O 10006-1 2981 -4.00 Material Issue to Work Order 2776 t WO f jsmith f 7569 f 2006-01-10 14:36:29.531898-05 2006-01-10 3847 85 W/O 10006-1 2981 4.00 Material Issue to Work Order 2776 t WO f jsmith f 7572 f 2006-01-10 14:36:29.531898-05 2006-01-10 3848 86 W/O 10006-1 -1 -0.55 Post Run Time to Work Order 2778 t WO f jsmith f 7571 f 2006-01-10 14:36:29.531898-05 2006-01-10 3848 94 W/O 10006-1 -1 0.55 Post Run Time to Work Order 2778 t WO f jsmith f 7574 f 2006-01-10 14:36:47.561613-05 2006-01-10 3849 86 W/O 10006-1 2983 -3.09 Material Issue to Work Order 2779 t WO f jsmith f 7573 f 2006-01-10 14:36:47.561613-05 2006-01-10 3849 85 W/O 10006-1 2983 3.09 Material Issue to Work Order 2779 t WO f jsmith f 7576 f 2006-01-10 14:36:47.561613-05 2006-01-10 3850 86 W/O 10006-1 -1 -0.44 Post Run Time to Work Order 2781 t WO f jsmith f 7575 f 2006-01-10 14:36:47.561613-05 2006-01-10 3850 94 W/O 10006-1 -1 0.44 Post Run Time to Work Order 2781 t WO f jsmith f 7577 f 2006-01-10 14:38:40.816736-05 2006-01-10 3851 86 W/O 10005-1 -1 2.41 Manufacturing Inventory Cost Variance 2782 t WO f jsmith f 7578 f 2006-01-10 14:38:40.816736-05 2006-01-10 3851 87 W/O 10005-1 -1 -2.41 Manufacturing Inventory Cost Variance 2782 t WO f jsmith f 7579 f 2006-01-10 14:45:24.740735-05 2006-01-10 3852 91 I/M MIKE 2986 -40.28 Miscellaneous Adjustment\n 2784 t f jsmith f 7580 f 2006-01-10 14:45:24.740735-05 2006-01-10 3852 85 I/M MIKE 2986 40.28 Miscellaneous Adjustment\n 2784 t f jsmith f 7581 f 2006-01-10 14:49:55.032635-05 2006-01-10 3853 86 W/O 10006-1 -1 2.77 Manufacturing Inventory Cost Variance 2785 t WO f jsmith f 7582 f 2006-01-10 14:49:55.032635-05 2006-01-10 3853 87 W/O 10006-1 -1 -2.77 Manufacturing Inventory Cost Variance 2785 t WO f jsmith f 7584 f 2006-01-10 15:03:57.529181-05 2006-01-10 3854 86 W/O 10007-1 2987 -0.04 Material Issue to Work Order 2787 t WO f jsmith f 7583 f 2006-01-10 15:03:57.529181-05 2006-01-10 3854 85 W/O 10007-1 2987 0.04 Material Issue to Work Order 2787 t WO f jsmith f 7586 f 2006-01-10 15:03:57.529181-05 2006-01-10 3855 86 W/O 10007-1 2988 -1.25 Material Issue to Work Order 2788 t WO f jsmith f 7585 f 2006-01-10 15:03:57.529181-05 2006-01-10 3855 85 W/O 10007-1 2988 1.25 Material Issue to Work Order 2788 t WO f jsmith f 7587 f 2006-01-10 15:03:57.529181-05 2006-01-10 3856 86 W/O 10007-1 2989 10.07 Receive Inventory from Manufacturing 2789 t WO f jsmith f 7588 f 2006-01-10 15:03:57.529181-05 2006-01-10 3856 85 W/O 10007-1 2989 -10.07 Receive Inventory from Manufacturing 2789 t WO f jsmith f 7590 f 2006-01-10 15:03:57.529181-05 2006-01-10 3857 86 W/O 10007-1 -1 -1.10 Post Setup Time to Work Order 2790 t WO f jsmith f 7589 f 2006-01-10 15:03:57.529181-05 2006-01-10 3857 94 W/O 10007-1 -1 1.10 Post Setup Time to Work Order 2790 t WO f jsmith f 7592 f 2006-01-10 15:03:57.529181-05 2006-01-10 3858 86 W/O 10007-1 -1 -0.55 Post Run Time to Work Order 2791 t WO f jsmith f 7591 f 2006-01-10 15:03:57.529181-05 2006-01-10 3858 94 W/O 10007-1 -1 0.55 Post Run Time to Work Order 2791 t WO f jsmith f 7594 f 2006-01-10 15:07:23.888614-05 2006-01-10 3859 86 W/O 10007-1 2991 -4.00 Material Issue to Work Order 2792 t WO f jsmith f 7593 f 2006-01-10 15:07:23.888614-05 2006-01-10 3859 85 W/O 10007-1 2991 4.00 Material Issue to Work Order 2792 t WO f jsmith f 7596 f 2006-01-10 15:07:23.888614-05 2006-01-10 3860 86 W/O 10007-1 -1 -1.10 Post Setup Time to Work Order 2793 t WO f jsmith f 7595 f 2006-01-10 15:07:23.888614-05 2006-01-10 3860 94 W/O 10007-1 -1 1.10 Post Setup Time to Work Order 2793 t WO f jsmith f 7598 f 2006-01-10 15:07:23.888614-05 2006-01-10 3861 86 W/O 10007-1 -1 -0.55 Post Run Time to Work Order 2794 t WO f jsmith f 7597 f 2006-01-10 15:07:23.888614-05 2006-01-10 3861 94 W/O 10007-1 -1 0.55 Post Run Time to Work Order 2794 t WO f jsmith f 7600 f 2006-01-10 15:36:58.451639-05 2006-01-10 3862 86 W/O 10007-1 2993 -3.09 Material Issue to Work Order 2795 t WO f jsmith f 7599 f 2006-01-10 15:36:58.451639-05 2006-01-10 3862 85 W/O 10007-1 2993 3.09 Material Issue to Work Order 2795 t WO f jsmith f 7602 f 2006-01-10 15:36:58.451639-05 2006-01-10 3863 86 W/O 10007-1 -1 -0.88 Post Setup Time to Work Order 2796 t WO f jsmith f 7601 f 2006-01-10 15:36:58.451639-05 2006-01-10 3863 94 W/O 10007-1 -1 0.88 Post Setup Time to Work Order 2796 t WO f jsmith f 7604 f 2006-01-10 15:36:58.451639-05 2006-01-10 3864 86 W/O 10007-1 -1 -0.44 Post Run Time to Work Order 2797 t WO f jsmith f 7603 f 2006-01-10 15:36:58.451639-05 2006-01-10 3864 94 W/O 10007-1 -1 0.44 Post Run Time to Work Order 2797 t WO f jsmith f 7606 f 2006-01-10 15:45:19.916794-05 2006-01-10 3865 86 W/O 10007-1 2994 -0.04 Material Issue to Work Order 2798 t WO f jsmith f 7605 f 2006-01-10 15:45:19.916794-05 2006-01-10 3865 85 W/O 10007-1 2994 0.04 Material Issue to Work Order 2798 t WO f jsmith f 7608 f 2006-01-10 15:45:19.916794-05 2006-01-10 3866 86 W/O 10007-1 2995 -1.25 Material Issue to Work Order 2799 t WO f jsmith f 7607 f 2006-01-10 15:45:19.916794-05 2006-01-10 3866 85 W/O 10007-1 2995 1.25 Material Issue to Work Order 2799 t WO f jsmith f 7609 f 2006-01-10 15:45:19.916794-05 2006-01-10 3867 86 W/O 10007-1 2996 10.07 Receive Inventory from Manufacturing 2800 t WO f jsmith f 7610 f 2006-01-10 15:45:19.916794-05 2006-01-10 3867 85 W/O 10007-1 2996 -10.07 Receive Inventory from Manufacturing 2800 t WO f jsmith f 7612 f 2006-01-10 15:45:19.916794-05 2006-01-10 3868 86 W/O 10007-1 -1 -0.55 Post Run Time to Work Order 2802 t WO f jsmith f 7611 f 2006-01-10 15:45:19.916794-05 2006-01-10 3868 94 W/O 10007-1 -1 0.55 Post Run Time to Work Order 2802 t WO f jsmith f 7614 f 2006-01-10 15:46:22.423533-05 2006-01-10 3869 86 W/O 10007-1 2998 -4.00 Material Issue to Work Order 2803 t WO f jsmith f 7613 f 2006-01-10 15:46:22.423533-05 2006-01-10 3869 85 W/O 10007-1 2998 4.00 Material Issue to Work Order 2803 t WO f jsmith f 7616 f 2006-01-10 15:46:22.423533-05 2006-01-10 3870 86 W/O 10007-1 -1 -0.55 Post Run Time to Work Order 2805 t WO f jsmith f 7615 f 2006-01-10 15:46:22.423533-05 2006-01-10 3870 94 W/O 10007-1 -1 0.55 Post Run Time to Work Order 2805 t WO f jsmith f 7618 f 2006-01-10 15:46:48.352376-05 2006-01-10 3871 86 W/O 10007-1 3000 -3.09 Material Issue to Work Order 2806 t WO f jsmith f 7617 f 2006-01-10 15:46:48.352376-05 2006-01-10 3871 85 W/O 10007-1 3000 3.09 Material Issue to Work Order 2806 t WO f jsmith f 7620 f 2006-01-10 15:46:48.352376-05 2006-01-10 3872 86 W/O 10007-1 -1 -0.44 Post Run Time to Work Order 2808 t WO f jsmith f 7619 f 2006-01-10 15:46:48.352376-05 2006-01-10 3872 94 W/O 10007-1 -1 0.44 Post Run Time to Work Order 2808 t WO f jsmith f 7621 f 2006-01-10 15:47:22.609629-05 2006-01-10 3873 86 W/O 10007-1 -1 2.77 Manufacturing Inventory Cost Variance 2809 t WO f jsmith f 7622 f 2006-01-10 15:47:22.609629-05 2006-01-10 3873 87 W/O 10007-1 -1 -2.77 Manufacturing Inventory Cost Variance 2809 t WO f jsmith f 7623 f 2006-01-11 09:54:13.901373-05 2006-01-11 3874 91 I/M MDA-001 3001 100.70 Miscellaneous Adjustment\n 2811 t f jsmith f 7624 f 2006-01-11 09:54:13.901373-05 2006-01-11 3874 85 I/M MDA-001 3001 -100.70 Miscellaneous Adjustment\n 2811 t f jsmith f 7626 f 2006-01-11 09:59:54.469474-05 2006-01-11 3875 96 S/R 50037-2 3002 -20.14 Issue to Shipping 2812 t SO f jsmith f 7625 f 2006-01-11 09:59:54.469474-05 2006-01-11 3875 85 S/R 50037-2 3002 20.14 Issue to Shipping 2812 t SO f jsmith f 7628 f 2006-01-11 10:00:16.138938-05 2006-01-11 3876 96 S/R 50037-4 3003 -20.14 Issue to Shipping 2813 t SO f jsmith f 7627 f 2006-01-11 10:00:16.138938-05 2006-01-11 3876 85 S/R 50037-4 3003 20.14 Issue to Shipping 2813 t SO f jsmith f 7629 f 2006-01-11 10:00:30.64328-05 2006-01-11 3877 96 S/R 50037-4 3004 20.14 Return from Shipping 2814 t SO f jsmith f 7630 f 2006-01-11 10:00:30.64328-05 2006-01-11 3877 85 S/R 50037-4 3004 -20.14 Return from Shipping 2814 t SO f jsmith f 7631 f 2006-01-11 10:00:42.121344-05 2006-01-11 3878 96 S/R 50037-2 3005 20.14 Return from Shipping 2815 t SO f jsmith f 7632 f 2006-01-11 10:00:42.121344-05 2006-01-11 3878 85 S/R 50037-2 3005 -20.14 Return from Shipping 2815 t SO f jsmith f 7633 f 2006-01-11 10:06:13.415672-05 2006-01-11 3879 91 I/M MA-3804 3006 20.14 Miscellaneous Adjustment\nNote-3804 2816 t f jsmith f 7634 f 2006-01-11 10:06:13.415672-05 2006-01-11 3879 85 I/M MA-3804 3006 -20.14 Miscellaneous Adjustment\nNote-3804 2816 t f jsmith f 7635 f 2006-01-11 10:17:04.317928-05 2006-01-11 3880 91 I/M PT-100 3007 20.14 Miscellaneous Adjustment\nNotes-PT 2817 t f jsmith f 7636 f 2006-01-11 10:17:04.317928-05 2006-01-11 3880 85 I/M PT-100 3007 -20.14 Miscellaneous Adjustment\nNotes-PT 2817 t f jsmith f 7637 f 2006-01-11 10:18:26.647873-05 2006-01-11 3881 91 I/M MA-TW-1 3008 20.00 Miscellaneous Adjustment\nNotes-100 2818 t f jsmith f 7638 f 2006-01-11 10:18:26.647873-05 2006-01-11 3881 85 I/M MA-TW-1 3008 -20.00 Miscellaneous Adjustment\nNotes-100 2818 t f jsmith f 7639 f 2006-01-11 10:43:25.050102-05 2006-01-11 3882 91 I/M MDA-3804-TEST-LOT 3009 700.00 Miscellaneous Adjustment\nNote--- 2819 t f jsmith f 7640 f 2006-01-11 10:43:25.050102-05 2006-01-11 3882 85 I/M MDA-3804-TEST-LOT 3009 -700.00 Miscellaneous Adjustment\nNote--- 2819 t f jsmith f 7641 f 2006-01-11 10:54:07.761482-05 2006-01-11 3883 91 I/M TW-100 3010 80.00 Miscellaneous Adjustment\n 2820 t f jsmith f 7642 f 2006-01-11 10:54:07.761482-05 2006-01-11 3883 85 I/M TW-100 3010 -80.00 Miscellaneous Adjustment\n 2820 t f jsmith f 7643 f 2006-01-11 12:47:12.620353-05 2006-01-11 3884 87 P/D Post Cost 299 43262.00 Post Actual Cost to Standard 2821 t f jsmith f 7644 f 2006-01-11 12:47:12.620353-05 2006-01-11 3884 85 P/D Post Cost 299 -43262.00 Post Actual Cost to Standard 2821 t f jsmith f 7645 f 2006-01-11 12:49:16.098077-05 2006-01-11 3885 87 P/D Post Cost 293 225.95 Post Actual Cost to Standard 2825 t f jsmith f 7646 f 2006-01-11 12:49:16.098077-05 2006-01-11 3885 85 P/D Post Cost 293 -225.95 Post Actual Cost to Standard 2825 t f jsmith f 7647 f 2006-01-11 12:49:52.026843-05 2006-01-11 3886 87 P/D Post Cost 299 10815.50 Post Actual Cost to Standard 2828 t f jsmith f 7648 f 2006-01-11 12:49:52.026843-05 2006-01-11 3886 85 P/D Post Cost 299 -10815.50 Post Actual Cost to Standard 2828 t f jsmith f 7649 f 2006-01-11 12:52:21.332214-05 2006-01-11 3887 87 P/D Post Cost 293 -210.00 Post Actual Cost to Standard 2832 t f jsmith f 7650 f 2006-01-11 12:52:21.332214-05 2006-01-11 3887 85 P/D Post Cost 293 210.00 Post Actual Cost to Standard 2832 t f jsmith f 7651 f 2006-01-11 12:54:07.767454-05 2006-01-11 3888 87 P/D Post Cost 300 18.22 Post Actual Cost to Standard 2841 t f jsmith f 7652 f 2006-01-11 12:54:07.767454-05 2006-01-11 3888 85 P/D Post Cost 300 -18.22 Post Actual Cost to Standard 2841 t f jsmith f 7653 f 2006-01-11 12:54:07.767454-05 2006-01-11 3889 87 P/D Post Cost 295 1.95 Post Actual Cost to Standard 2844 t f jsmith f 7654 f 2006-01-11 12:54:07.767454-05 2006-01-11 3889 85 P/D Post Cost 295 -1.95 Post Actual Cost to Standard 2844 t f jsmith f 7655 f 2006-01-11 13:14:21.026722-05 2006-01-11 3890 87 P/D Post Cost 293 15.40 Post Actual Cost to Standard 2977 t f jsmith f 9033 f 2007-05-30 11:39:48.948144-04 2007-05-30 4523 129 A/R 60040 \N 211.44 3911 t IN f mfgadmin f 7656 f 2006-01-11 13:14:21.026722-05 2006-01-11 3890 85 P/D Post Cost 293 -15.40 Post Actual Cost to Standard 2977 t f jsmith f 7657 f 2006-01-11 13:14:21.026722-05 2006-01-11 3891 87 P/D Post Cost 300 17.60 Post Actual Cost to Standard 2981 t f jsmith f 7658 f 2006-01-11 13:14:21.026722-05 2006-01-11 3891 85 P/D Post Cost 300 -17.60 Post Actual Cost to Standard 2981 t f jsmith f 7659 f 2006-01-11 13:14:21.026722-05 2006-01-11 3892 87 P/D Post Cost 295 15.40 Post Actual Cost to Standard 2984 t f jsmith f 7660 f 2006-01-11 13:14:21.026722-05 2006-01-11 3892 85 P/D Post Cost 295 -15.40 Post Actual Cost to Standard 2984 t f jsmith f 7662 f 2006-01-11 14:29:27.4484-05 2006-01-11 3893 96 S/R 50037-2 3011 -2.46 Issue to Shipping 3115 t SO f jsmith f 7661 f 2006-01-11 14:29:27.4484-05 2006-01-11 3893 85 S/R 50037-2 3011 2.46 Issue to Shipping 3115 t SO f jsmith f 7664 f 2006-01-11 14:29:39.244866-05 2006-01-11 3894 96 S/R 50037-3 3012 -2.46 Issue to Shipping 3116 t SO f jsmith f 7663 f 2006-01-11 14:29:39.244866-05 2006-01-11 3894 85 S/R 50037-3 3012 2.46 Issue to Shipping 3116 t SO f jsmith f 7666 f 2006-01-11 14:29:53.348902-05 2006-01-11 3895 96 S/R 50037-4 3013 -2.46 Issue to Shipping 3117 t SO f jsmith f 7665 f 2006-01-11 14:29:53.348902-05 2006-01-11 3895 85 S/R 50037-4 3013 2.46 Issue to Shipping 3117 t SO f jsmith f 7668 f 2006-01-11 14:30:13.847178-05 2006-01-11 3896 108 S/R 50037 -1 -2.46 Ship Shipment 3118 t SO f jsmith f 7667 f 2006-01-11 14:30:13.847178-05 2006-01-11 3896 96 S/R 50037 -1 2.46 Ship Shipment 3118 t SO f jsmith f 7670 f 2006-01-11 14:30:13.847178-05 2006-01-11 3897 108 S/R 50037 -1 -2.46 Ship Shipment 3119 t SO f jsmith f 7669 f 2006-01-11 14:30:13.847178-05 2006-01-11 3897 96 S/R 50037 -1 2.46 Ship Shipment 3119 t SO f jsmith f 7672 f 2006-01-11 14:30:13.847178-05 2006-01-11 3898 108 S/R 50037 -1 -2.46 Ship Shipment 3120 t SO f jsmith f 7671 f 2006-01-11 14:30:13.847178-05 2006-01-11 3898 96 S/R 50037 -1 2.46 Ship Shipment 3120 t SO f jsmith f 7673 f 2006-01-11 14:30:31.673955-05 2006-01-11 3899 108 S/R 50037 -1 2.46 Recall Shipment 3121 t SO f jsmith f 7674 f 2006-01-11 14:30:31.673955-05 2006-01-11 3899 96 S/R 50037 -1 -2.46 Recall Shipment 3121 t SO f jsmith f 7675 f 2006-01-11 14:30:31.673955-05 2006-01-11 3900 108 S/R 50037 -1 2.46 Recall Shipment 3122 t SO f jsmith f 7676 f 2006-01-11 14:30:31.673955-05 2006-01-11 3900 96 S/R 50037 -1 -2.46 Recall Shipment 3122 t SO f jsmith f 7677 f 2006-01-11 14:30:31.673955-05 2006-01-11 3901 108 S/R 50037 -1 2.46 Recall Shipment 3123 t SO f jsmith f 7678 f 2006-01-11 14:30:31.673955-05 2006-01-11 3901 96 S/R 50037 -1 -2.46 Recall Shipment 3123 t SO f jsmith f 7680 f 2006-01-11 14:31:44.746753-05 2006-01-11 3902 96 S/R 50037-2 3014 -2.46 Issue to Shipping 3124 t SO f jsmith f 7679 f 2006-01-11 14:31:44.746753-05 2006-01-11 3902 85 S/R 50037-2 3014 2.46 Issue to Shipping 3124 t SO f jsmith f 7682 f 2006-01-11 14:31:57.792661-05 2006-01-11 3903 96 S/R 50037-3 3015 -2.46 Issue to Shipping 3125 t SO f jsmith f 7681 f 2006-01-11 14:31:57.792661-05 2006-01-11 3903 85 S/R 50037-3 3015 2.46 Issue to Shipping 3125 t SO f jsmith f 7684 f 2006-01-11 14:32:02.775311-05 2006-01-11 3904 96 S/R 50037-4 3016 -2.46 Issue to Shipping 3126 t SO f jsmith f 7683 f 2006-01-11 14:32:02.775311-05 2006-01-11 3904 85 S/R 50037-4 3016 2.46 Issue to Shipping 3126 t SO f jsmith f 7686 f 2006-01-11 14:32:13.232028-05 2006-01-11 3905 108 S/R 50037 -1 -4.92 Ship Shipment 3127 t SO f jsmith f 7685 f 2006-01-11 14:32:13.232028-05 2006-01-11 3905 96 S/R 50037 -1 4.92 Ship Shipment 3127 t SO f jsmith f 7688 f 2006-01-11 14:32:13.232028-05 2006-01-11 3906 108 S/R 50037 -1 -4.92 Ship Shipment 3128 t SO f jsmith f 7687 f 2006-01-11 14:32:13.232028-05 2006-01-11 3906 96 S/R 50037 -1 4.92 Ship Shipment 3128 t SO f jsmith f 7690 f 2006-01-11 14:32:13.232028-05 2006-01-11 3907 108 S/R 50037 -1 -4.92 Ship Shipment 3129 t SO f jsmith f 7689 f 2006-01-11 14:32:13.232028-05 2006-01-11 3907 96 S/R 50037 -1 4.92 Ship Shipment 3129 t SO f jsmith f 7693 f 2006-01-11 14:34:16.486685-05 2006-01-11 3908 106 A/R 60013 \N -93.78 3130 t IN f jsmith f 7692 f 2006-01-11 14:34:16.486685-05 2006-01-11 3908 102 A/R 60013 \N 4.47 3130 t IN f jsmith f 7691 f 2006-01-11 14:34:16.486685-05 2006-01-11 3908 103 A/R 60013 \N 89.31 3130 t IN f jsmith f 7695 f 2006-01-11 15:11:55.001364-05 2006-01-11 3909 104 A/R 20006 313 -50.00 3131 t CM f jsmith f 7694 f 2006-01-11 15:11:55.001364-05 2006-01-11 3909 106 A/R 20006 313 50.00 3131 t CM f jsmith f 7697 f 2006-01-11 15:13:53.676035-05 2006-01-11 3910 96 S/R 50039-1 3017 -123.09 Issue to Shipping 3132 t SO f jsmith f 7696 f 2006-01-11 15:13:53.676035-05 2006-01-11 3910 85 S/R 50039-1 3017 123.09 Issue to Shipping 3132 t SO f jsmith f 7699 f 2006-01-11 15:14:03.417241-05 2006-01-11 3911 108 S/R 50039 -1 -123.09 Ship Shipment 3133 t SO f jsmith f 7698 f 2006-01-11 15:14:03.417241-05 2006-01-11 3911 96 S/R 50039 -1 123.09 Ship Shipment 3133 t SO f jsmith f 7701 f 2006-01-11 15:15:42.713353-05 2006-01-11 3912 104 A/R 20007 314 -75.00 3134 t CM f jsmith f 7700 f 2006-01-11 15:15:42.713353-05 2006-01-11 3912 106 A/R 20007 314 75.00 3134 t CM f jsmith f 7704 f 2006-01-11 15:17:33.84561-05 2006-01-11 3913 106 A/R 60014 \N -524.48 3135 t IN f jsmith f 7703 f 2006-01-11 15:17:33.84561-05 2006-01-11 3913 102 A/R 60014 \N 24.98 3135 t IN f jsmith f 7702 f 2006-01-11 15:17:33.84561-05 2006-01-11 3913 103 A/R 60014 \N 499.50 3135 t IN f jsmith f 7706 f 2006-01-11 15:21:25.961869-05 2006-01-11 3914 109 A/R V-50009-2 \N -104.90 TTOYS-Tremendous Toys Inc. 3136 t CR t jsmith f 7705 f 2006-01-11 15:21:25.961869-05 2006-01-11 3914 106 A/R I-60014 \N 104.90 TTOYS-Tremendous Toys Inc. 3136 t CR f jsmith f 7708 f 2006-01-11 15:42:25.88454-05 2006-01-11 3915 96 S/R 50040-1 3018 -24.62 Issue to Shipping 3137 t SO f jsmith f 7707 f 2006-01-11 15:42:25.88454-05 2006-01-11 3915 85 S/R 50040-1 3018 24.62 Issue to Shipping 3137 t SO f jsmith f 7710 f 2006-01-11 15:51:53.960791-05 2006-01-11 3916 108 S/R 50040 -1 -24.62 Ship Shipment 3138 t SO f jsmith f 7709 f 2006-01-11 15:51:53.960791-05 2006-01-11 3916 96 S/R 50040 -1 24.62 Ship Shipment 3138 t SO f jsmith f 7714 f 2006-01-11 15:52:58.366806-05 2006-01-11 3917 106 A/R 60015 \N -112.64 3139 t IN f jsmith f 7713 f 2006-01-11 15:52:58.366806-05 2006-01-11 3917 102 A/R 60015 \N 5.00 3139 t IN f jsmith f 7712 f 2006-01-11 15:52:58.366806-05 2006-01-11 3917 105 A/R 60015 \N 7.74 3139 t IN f jsmith f 7711 f 2006-01-11 15:52:58.366806-05 2006-01-11 3917 103 A/R 60015 \N 99.90 3139 t IN f jsmith f 7716 f 2006-01-11 16:00:15.552143-05 2006-01-11 3918 96 S/R 50041-1 3019 -24.62 Issue to Shipping 3140 t SO f jsmith f 7715 f 2006-01-11 16:00:15.552143-05 2006-01-11 3918 85 S/R 50041-1 3019 24.62 Issue to Shipping 3140 t SO f jsmith f 7718 f 2006-01-11 16:03:28.126626-05 2006-01-11 3919 96 S/R 50041-1 3020 -24.62 Issue to Shipping 3141 t SO f jsmith f 7717 f 2006-01-11 16:03:28.126626-05 2006-01-11 3919 85 S/R 50041-1 3020 24.62 Issue to Shipping 3141 t SO f jsmith f 7720 f 2006-01-11 16:03:57.642002-05 2006-01-11 3920 108 S/R 50041 -1 -24.62 Ship Shipment 3142 t SO f jsmith f 7719 f 2006-01-11 16:03:57.642002-05 2006-01-11 3920 96 S/R 50041 -1 24.62 Ship Shipment 3142 t SO f jsmith f 7723 f 2006-01-11 16:04:09.180656-05 2006-01-11 3921 106 A/R 60016 \N -104.90 3143 t IN f jsmith f 7722 f 2006-01-11 16:04:09.180656-05 2006-01-11 3921 102 A/R 60016 \N 5.00 3143 t IN f jsmith f 7721 f 2006-01-11 16:04:09.180656-05 2006-01-11 3921 103 A/R 60016 \N 99.90 3143 t IN f jsmith f 7727 f 2006-01-12 09:36:09.814356-05 2006-01-12 3922 97 G/L EXP -1 -1000.00 Expe-001 3144 t JE f jsmith f 7726 f 2006-01-12 09:36:09.814356-05 2006-01-12 3922 109 G/L EXP -1 1000.00 Expe-001 3144 t JE t jsmith f 7755 f 2006-01-12 11:57:05.645307-05 2006-01-12 3929 108 G/L Ship Order \N -1000.00 3151 t ST f jsmith f 7753 f 2006-01-12 11:57:05.645307-05 2006-01-12 3929 109 G/L Ship Order \N -2000.00 3151 t ST t jsmith f 7752 f 2006-01-12 11:57:05.645307-05 2006-01-12 3929 85 G/L Ship Order \N 1000.00 3151 t ST f jsmith f 7754 f 2006-01-12 11:57:05.645307-05 2006-01-12 3929 103 G/L Ship Order \N 2000.00 3151 t ST f jsmith f 7779 f 2006-01-12 13:46:04.75092-05 2006-01-12 3936 96 S/R 50037-2 3021 -19.69 Issue to Shipping 3158 t SO f jsmith f 7778 f 2006-01-12 13:46:04.75092-05 2006-01-12 3936 85 S/R 50037-2 3021 19.69 Issue to Shipping 3158 t SO f jsmith f 7781 f 2006-01-12 13:46:17.528594-05 2006-01-12 3937 96 S/R 50037-3 3022 -19.69 Issue to Shipping 3159 t SO f jsmith f 7780 f 2006-01-12 13:46:17.528594-05 2006-01-12 3937 85 S/R 50037-3 3022 19.69 Issue to Shipping 3159 t SO f jsmith f 7783 f 2006-01-12 13:46:23.304596-05 2006-01-12 3938 96 S/R 50037-4 3023 -19.69 Issue to Shipping 3160 t SO f jsmith f 7782 f 2006-01-12 13:46:23.304596-05 2006-01-12 3938 85 S/R 50037-4 3023 19.69 Issue to Shipping 3160 t SO f jsmith f 7785 f 2006-01-12 13:47:13.07889-05 2006-01-12 3939 108 S/R 50037 -1 -19.69 Ship Shipment 3161 t SO f jsmith f 7784 f 2006-01-12 13:47:13.07889-05 2006-01-12 3939 96 S/R 50037 -1 19.69 Ship Shipment 3161 t SO f jsmith f 7787 f 2006-01-12 13:47:13.07889-05 2006-01-12 3940 108 S/R 50037 -1 -19.69 Ship Shipment 3162 t SO f jsmith f 7786 f 2006-01-12 13:47:13.07889-05 2006-01-12 3940 96 S/R 50037 -1 19.69 Ship Shipment 3162 t SO f jsmith f 7789 f 2006-01-12 13:47:13.07889-05 2006-01-12 3941 108 S/R 50037 -1 -19.69 Ship Shipment 3163 t SO f jsmith f 7788 f 2006-01-12 13:47:13.07889-05 2006-01-12 3941 96 S/R 50037 -1 19.69 Ship Shipment 3163 t SO f jsmith f 7792 f 2006-01-12 13:47:42.800259-05 2006-01-12 3942 106 A/R 60017 \N -218.83 3164 t IN f jsmith f 7790 f 2006-01-12 13:47:42.800259-05 2006-01-12 3942 103 A/R 60017 \N 208.41 3164 t IN f jsmith f 7793 f 2006-01-12 13:49:28.970355-05 2006-01-12 3943 86 W/O Misc. 3024 49.24 Receive from Misc. Production for Item Number YTRUCK1\n 3165 t WO f jsmith f 7794 f 2006-01-12 13:49:28.970355-05 2006-01-12 3943 85 W/O Misc. 3024 -49.24 Receive from Misc. Production for Item Number YTRUCK1\n 3165 t WO f jsmith f 7796 f 2006-01-12 13:49:28.970355-05 2006-01-12 3944 86 W/O Misc. 3025 -5.00 Receive from Misc. Production for Item Number YTRUCK1\n 3166 t WO f jsmith f 7791 f 2006-01-12 13:47:42.800259-05 2006-01-12 3942 102 A/R 60017 \N 10.42 3164 t IN f jsmith f 7795 f 2006-01-12 13:49:28.970355-05 2006-01-12 3944 85 W/O Misc. 3025 5.00 Receive from Misc. Production for Item Number YTRUCK1\n 3166 t WO f jsmith f 7798 f 2006-01-12 13:49:28.970355-05 2006-01-12 3945 86 W/O Misc. 3026 -0.14 Receive from Misc. Production for Item Number YTRUCK1\n 3167 t WO f jsmith f 7797 f 2006-01-12 13:49:28.970355-05 2006-01-12 3945 85 W/O Misc. 3026 0.14 Receive from Misc. Production for Item Number YTRUCK1\n 3167 t WO f jsmith f 7800 f 2006-01-12 13:49:28.970355-05 2006-01-12 3946 86 W/O Misc. 3027 -20.00 Receive from Misc. Production for Item Number YTRUCK1\n 3168 t WO f jsmith f 7799 f 2006-01-12 13:49:28.970355-05 2006-01-12 3946 85 W/O Misc. 3027 20.00 Receive from Misc. Production for Item Number YTRUCK1\n 3168 t WO f jsmith f 7802 f 2006-01-12 13:49:28.970355-05 2006-01-12 3947 86 W/O Misc. 3028 -17.32 Receive from Misc. Production for Item Number YTRUCK1\n 3169 t WO f jsmith f 7801 f 2006-01-12 13:49:28.970355-05 2006-01-12 3947 85 W/O Misc. 3028 17.32 Receive from Misc. Production for Item Number YTRUCK1\n 3169 t WO f jsmith f 7804 f 2006-01-12 13:49:28.970355-05 2006-01-12 3948 86 W/O Misc. 3024 -6.78 Cost Variance of Post to Misc. Production for Item Number YTRUCK1 3170 t WO f jsmith f 7803 f 2006-01-12 13:49:28.970355-05 2006-01-12 3948 87 W/O Misc. 3024 6.78 Cost Variance of Post to Misc. Production for Item Number YTRUCK1 3170 t WO f jsmith f 7805 f 2006-01-12 13:50:12.642582-05 2006-01-12 3949 86 W/O Misc. 3029 123.09 Receive from Misc. Production for Item Number WTRUCK1\n 3171 t WO f jsmith f 7806 f 2006-01-12 13:50:12.642582-05 2006-01-12 3949 85 W/O Misc. 3029 -123.09 Receive from Misc. Production for Item Number WTRUCK1\n 3171 t WO f jsmith f 7808 f 2006-01-12 13:50:12.642582-05 2006-01-12 3950 86 W/O Misc. 3030 -12.50 Receive from Misc. Production for Item Number WTRUCK1\n 3172 t WO f jsmith f 7807 f 2006-01-12 13:50:12.642582-05 2006-01-12 3950 85 W/O Misc. 3030 12.50 Receive from Misc. Production for Item Number WTRUCK1\n 3172 t WO f jsmith f 7810 f 2006-01-12 13:50:12.642582-05 2006-01-12 3951 86 W/O Misc. 3031 -0.35 Receive from Misc. Production for Item Number WTRUCK1\n 3173 t WO f jsmith f 7809 f 2006-01-12 13:50:12.642582-05 2006-01-12 3951 85 W/O Misc. 3031 0.35 Receive from Misc. Production for Item Number WTRUCK1\n 3173 t WO f jsmith f 7812 f 2006-01-12 13:50:12.642582-05 2006-01-12 3952 86 W/O Misc. 3032 -50.00 Receive from Misc. Production for Item Number WTRUCK1\n 3174 t WO f jsmith f 7811 f 2006-01-12 13:50:12.642582-05 2006-01-12 3952 85 W/O Misc. 3032 50.00 Receive from Misc. Production for Item Number WTRUCK1\n 3174 t WO f jsmith f 7814 f 2006-01-12 13:50:12.642582-05 2006-01-12 3953 86 W/O Misc. 3033 -43.30 Receive from Misc. Production for Item Number WTRUCK1\n 3175 t WO f jsmith f 7813 f 2006-01-12 13:50:12.642582-05 2006-01-12 3953 85 W/O Misc. 3033 43.30 Receive from Misc. Production for Item Number WTRUCK1\n 3175 t WO f jsmith f 7816 f 2006-01-12 13:50:12.642582-05 2006-01-12 3954 86 W/O Misc. 3029 -16.94 Cost Variance of Post to Misc. Production for Item Number WTRUCK1 3176 t WO f jsmith f 7815 f 2006-01-12 13:50:12.642582-05 2006-01-12 3954 87 W/O Misc. 3029 16.94 Cost Variance of Post to Misc. Production for Item Number WTRUCK1 3176 t WO f jsmith f 7817 f 2006-01-12 13:52:38.951513-05 2006-01-12 3955 95 S/R 20015 3034 2.50 Receive Inventory from P/O 3177 t PO f jsmith f 7818 f 2006-01-12 13:52:38.951513-05 2006-01-12 3955 85 S/R 20015 3034 -2.50 Receive Inventory from P/O 3177 t PO f jsmith f 7820 f 2006-01-12 13:52:38.951513-05 2006-01-12 3956 97 S/R 20015 -1 -10.00 Receive Non-Inventory from P/O 3179 t PO f jsmith f 7819 f 2006-01-12 13:52:38.951513-05 2006-01-12 3956 95 S/R 20015 -1 10.00 Receive Non-Inventory from P/O 3179 t PO f jsmith f 7822 f 2006-01-12 13:54:19.301839-05 2006-01-12 3957 90 A/P 30013 \N -187.50 RF-01 3181 t VO f jsmith f 7823 f 2006-01-12 13:54:19.301839-05 2006-01-12 3957 99 A/P 30013 \N 200.00 RF-01 3181 t VO f jsmith f 7821 f 2006-01-12 13:54:19.301839-05 2006-01-12 3957 95 A/P 30013 \N -12.50 RF-01 3181 t VO f jsmith f 7825 f 2006-01-12 13:57:53.54875-05 2006-01-12 3958 109 A/P 3008 108 200.00 TPARTS-Toy Parts Inc. 3182 t CK t jsmith f 7824 f 2006-01-12 13:57:53.54875-05 2006-01-12 3958 99 A/P 3008 108 -200.00 TPARTS-Toy Parts Inc. 3182 t CK f jsmith f 7830 f 2006-01-12 13:59:04.399482-05 2006-01-12 3959 109 A/R C-MDA0111 \N -824.73 TTOYS-Tremendous Toys Inc. 3183 t CR t jsmith f 7826 f 2006-01-12 13:59:04.399482-05 2006-01-12 3959 106 A/R I-60015 \N 112.64 TTOYS-Tremendous Toys Inc. 3183 t CR f jsmith f 7827 f 2006-01-12 13:59:04.399482-05 2006-01-12 3959 106 A/R I-60014 \N 388.36 TTOYS-Tremendous Toys Inc. 3183 t CR f jsmith f 7828 f 2006-01-12 13:59:04.399482-05 2006-01-12 3959 106 A/R I-60016 \N 104.90 TTOYS-Tremendous Toys Inc. 3183 t CR f jsmith f 7829 f 2006-01-12 13:59:04.399482-05 2006-01-12 3959 106 A/R I-60017 \N 218.83 TTOYS-Tremendous Toys Inc. 3183 t CR f jsmith f 7832 f 2006-01-12 15:56:25.114801-05 2006-01-12 3960 111 G/L Copier-1 -1 -1000.00 Bought Used Copier 3184 t JE f jsmith f 7831 f 2006-01-12 15:56:25.114801-05 2006-01-12 3960 109 G/L Copier-1 -1 1000.00 Bought Used Copier 3184 t JE t jsmith f 7833 f 2006-01-12 15:59:36.993175-05 2006-01-12 3961 116 G/L LT-Note-1 -1 5000.00 Long Term Note - eBank 3185 t JE f jsmith f 7834 f 2006-01-12 15:59:36.993175-05 2006-01-12 3961 109 G/L LT-Note-1 -1 -5000.00 Long Term Note - eBank 3185 t JE t jsmith f 9032 f 2007-05-30 11:39:48.948144-04 2007-05-30 4523 103 A/R 60040 \N 4975.00 3911 t IN f mfgadmin f 7836 f 2006-01-12 16:16:51.263622-05 2006-01-12 3962 86 W/O 10008-1 3035 -2.50 Material Issue to Work Order 3186 t WO f jsmith f 7835 f 2006-01-12 16:16:51.263622-05 2006-01-12 3962 85 W/O 10008-1 3035 2.50 Material Issue to Work Order 3186 t WO f jsmith f 7838 f 2006-01-12 16:16:51.263622-05 2006-01-12 3963 86 W/O 10008-1 3036 -0.07 Material Issue to Work Order 3187 t WO f jsmith f 7837 f 2006-01-12 16:16:51.263622-05 2006-01-12 3963 85 W/O 10008-1 3036 0.07 Material Issue to Work Order 3187 t WO f jsmith f 7840 f 2006-01-12 16:16:51.263622-05 2006-01-12 3964 86 W/O 10008-1 3037 -10.00 Material Issue to Work Order 3188 t WO f jsmith f 7839 f 2006-01-12 16:16:51.263622-05 2006-01-12 3964 85 W/O 10008-1 3037 10.00 Material Issue to Work Order 3188 t WO f jsmith f 7842 f 2006-01-12 16:16:51.263622-05 2006-01-12 3965 86 W/O 10008-1 3038 -8.66 Material Issue to Work Order 3189 t WO f jsmith f 7841 f 2006-01-12 16:16:51.263622-05 2006-01-12 3965 85 W/O 10008-1 3038 8.66 Material Issue to Work Order 3189 t WO f jsmith f 7844 f 2006-01-12 16:19:51.380825-05 2006-01-12 3966 93 W/O 10008-1 -1 -5.00 Scrap Material from Work Order 3190 t WO f jsmith f 7843 f 2006-01-12 16:19:51.380825-05 2006-01-12 3966 86 W/O 10008-1 -1 5.00 Scrap Material from Work Order 3190 t WO f jsmith f 7845 f 2006-01-12 16:20:45.3236-05 2006-01-12 3967 86 W/O 10008-1 3039 24.62 Receive Inventory from Manufacturing 3191 t WO f jsmith f 7846 f 2006-01-12 16:20:45.3236-05 2006-01-12 3967 85 W/O 10008-1 3039 -24.62 Receive Inventory from Manufacturing 3191 t WO f jsmith f 7848 f 2006-01-12 16:20:45.3236-05 2006-01-12 3968 86 W/O 10008-1 -1 -1.10 Post Setup Time to Work Order 3192 t WO f jsmith f 7847 f 2006-01-12 16:20:45.3236-05 2006-01-12 3968 94 W/O 10008-1 -1 1.10 Post Setup Time to Work Order 3192 t WO f jsmith f 7850 f 2006-01-12 16:20:45.3236-05 2006-01-12 3969 86 W/O 10008-1 -1 -1.10 Post Run Time to Work Order 3193 t WO f jsmith f 7849 f 2006-01-12 16:20:45.3236-05 2006-01-12 3969 94 W/O 10008-1 -1 1.10 Post Run Time to Work Order 3193 t WO f jsmith f 7852 f 2006-01-12 16:20:45.3236-05 2006-01-12 3970 86 W/O 10008-1 -1 -1.10 Post Setup Time to Work Order 3194 t WO f jsmith f 7851 f 2006-01-12 16:20:45.3236-05 2006-01-12 3970 94 W/O 10008-1 -1 1.10 Post Setup Time to Work Order 3194 t WO f jsmith f 7854 f 2006-01-12 16:20:45.3236-05 2006-01-12 3971 86 W/O 10008-1 -1 -1.10 Post Run Time to Work Order 3195 t WO f jsmith f 7853 f 2006-01-12 16:20:45.3236-05 2006-01-12 3971 94 W/O 10008-1 -1 1.10 Post Run Time to Work Order 3195 t WO f jsmith f 7856 f 2006-01-12 16:20:45.3236-05 2006-01-12 3972 86 W/O 10008-1 -1 -0.88 Post Setup Time to Work Order 3196 t WO f jsmith f 7855 f 2006-01-12 16:20:45.3236-05 2006-01-12 3972 94 W/O 10008-1 -1 0.88 Post Setup Time to Work Order 3196 t WO f jsmith f 7858 f 2006-01-12 16:20:45.3236-05 2006-01-12 3973 86 W/O 10008-1 -1 -0.88 Post Run Time to Work Order 3197 t WO f jsmith f 7857 f 2006-01-12 16:20:45.3236-05 2006-01-12 3973 94 W/O 10008-1 -1 0.88 Post Run Time to Work Order 3197 t WO f jsmith f 7859 f 2006-01-12 16:20:53.121931-05 2006-01-12 3974 86 W/O 10008-1 -1 2.77 Manufacturing Inventory Cost Variance 3198 t WO f jsmith f 7860 f 2006-01-12 16:20:53.121931-05 2006-01-12 3974 87 W/O 10008-1 -1 -2.77 Manufacturing Inventory Cost Variance 3198 t WO f jsmith f 7861 f 2006-01-12 16:24:09.129658-05 2006-01-12 3975 91 I/M MDA-001 3040 8.66 Miscellaneous Adjustment\n 3200 t f jsmith f 7862 f 2006-01-12 16:24:09.129658-05 2006-01-12 3975 85 I/M MDA-001 3040 -8.66 Miscellaneous Adjustment\n 3200 t f jsmith f 7867 f 2006-01-13 10:54:38.98854-05 2006-01-13 3978 87 P/D Post Cost 299 10738.00 Post Actual Cost to Standard 3202 t f jsmith f 7868 f 2006-01-13 10:54:38.98854-05 2006-01-13 3978 85 P/D Post Cost 299 -10738.00 Post Actual Cost to Standard 3202 t f jsmith f 7869 f 2006-01-13 11:41:00.309379-05 2006-01-13 3979 95 S/R 20016 3041 47.00 Receive Inventory from P/O 3273 t PO f jsmith f 7870 f 2006-01-13 11:41:00.309379-05 2006-01-13 3979 85 S/R 20016 3041 -47.00 Receive Inventory from P/O 3273 t PO f jsmith f 7872 f 2006-01-13 11:42:26.339065-05 2006-01-13 3980 90 A/P 30014 \N 22.00 RF-9891 3275 t VO f jsmith f 7873 f 2006-01-13 11:42:26.339065-05 2006-01-13 3980 99 A/P 30014 \N 25.00 RF-9891 3275 t VO f jsmith f 7871 f 2006-01-13 11:42:26.339065-05 2006-01-13 3980 95 A/P 30014 \N -47.00 RF-9891 3275 t VO f jsmith f 7874 f 2006-01-13 11:43:09.614756-05 2006-01-13 3981 101 A/P 30014 93 0.50 Discount for V 30014 3276 t CM f jsmith f 7875 f 2006-01-13 11:43:09.614756-05 2006-01-13 3981 99 A/P 30014 93 -0.50 Discount for V 30014 3276 t CM f jsmith f 7877 f 2006-01-13 11:48:39.07477-05 2006-01-13 3982 109 A/P 3009 109 24.50 TPARTS-Toy Parts Inc. 3277 t CK t jsmith f 7876 f 2006-01-13 11:48:39.07477-05 2006-01-13 3982 99 A/P 3009 109 -24.50 TPARTS-Toy Parts Inc. 3277 t CK f jsmith f 7879 f 2006-01-13 11:50:07.020591-05 2006-01-13 3983 86 W/O 10009-1 3042 -47.00 Material Issue to Work Order 3278 t WO f jsmith f 7878 f 2006-01-13 11:50:07.020591-05 2006-01-13 3983 85 W/O 10009-1 3042 47.00 Material Issue to Work Order 3278 t WO f jsmith f 7881 f 2006-01-13 11:50:07.020591-05 2006-01-13 3984 86 W/O 10009-1 3043 -27.50 Material Issue to Work Order 3279 t WO f jsmith f 7880 f 2006-01-13 11:50:07.020591-05 2006-01-13 3984 85 W/O 10009-1 3043 27.50 Material Issue to Work Order 3279 t WO f jsmith f 7882 f 2006-01-13 11:50:07.020591-05 2006-01-13 3985 86 W/O 10009-1 3044 86.60 Receive Inventory from Manufacturing 3280 t WO f jsmith f 7883 f 2006-01-13 11:50:07.020591-05 2006-01-13 3985 85 W/O 10009-1 3044 -86.60 Receive Inventory from Manufacturing 3280 t WO f jsmith f 7885 f 2006-01-13 11:50:07.020591-05 2006-01-13 3986 86 W/O 10009-1 -1 -0.92 Post Setup Time to Work Order 3281 t WO f jsmith f 7884 f 2006-01-13 11:50:07.020591-05 2006-01-13 3986 94 W/O 10009-1 -1 0.92 Post Setup Time to Work Order 3281 t WO f jsmith f 7887 f 2006-01-13 11:50:07.020591-05 2006-01-13 3987 86 W/O 10009-1 -1 -10.82 Post Run Time to Work Order 3282 t WO f jsmith f 7886 f 2006-01-13 11:50:07.020591-05 2006-01-13 3987 94 W/O 10009-1 -1 10.82 Post Run Time to Work Order 3282 t WO f jsmith f 7888 f 2006-01-13 11:50:25.175319-05 2006-01-13 3988 86 W/O 10009-1 -1 -0.37 Manufacturing Inventory Cost Variance 3283 t WO f jsmith f 7889 f 2006-01-13 11:50:25.175319-05 2006-01-13 3988 87 W/O 10009-1 -1 0.37 Manufacturing Inventory Cost Variance 3283 t WO f jsmith f 7890 f 2006-01-13 11:51:00.636398-05 2006-01-13 3989 86 W/O 50043-1 3045 246.18 Receive Inventory from Manufacturing 3285 t WO f jsmith f 7891 f 2006-01-13 11:51:00.636398-05 2006-01-13 3989 85 W/O 50043-1 3045 -246.18 Receive Inventory from Manufacturing 3285 t WO f jsmith f 7892 f 2006-01-13 11:51:00.636398-05 2006-01-13 3990 85 W/O 50043-1 3046 100.00 Material Issue to Work Order 3286 t WO f jsmith f 7895 f 2006-01-13 11:51:00.636398-05 2006-01-13 3991 86 W/O 50043-1 3047 -86.60 Material Issue to Work Order 3287 t WO f jsmith f 7894 f 2006-01-13 11:51:00.636398-05 2006-01-13 3991 85 W/O 50043-1 3047 86.60 Material Issue to Work Order 3287 t WO f jsmith f 7897 f 2006-01-13 11:51:00.636398-05 2006-01-13 3992 86 W/O 50043-1 3048 -25.00 Material Issue to Work Order 3288 t WO f jsmith f 7896 f 2006-01-13 11:51:00.636398-05 2006-01-13 3992 85 W/O 50043-1 3048 25.00 Material Issue to Work Order 3288 t WO f jsmith f 7899 f 2006-01-13 11:51:00.636398-05 2006-01-13 3993 86 W/O 50043-1 3049 -0.70 Material Issue to Work Order 3289 t WO f jsmith f 7898 f 2006-01-13 11:51:00.636398-05 2006-01-13 3993 85 W/O 50043-1 3049 0.70 Material Issue to Work Order 3289 t WO f jsmith f 7901 f 2006-01-13 11:51:00.636398-05 2006-01-13 3994 86 W/O 50043-1 -1 -1.10 Post Setup Time to Work Order 3290 t WO f jsmith f 7900 f 2006-01-13 11:51:00.636398-05 2006-01-13 3994 94 W/O 50043-1 -1 1.10 Post Setup Time to Work Order 3290 t WO f jsmith f 7903 f 2006-01-13 11:51:00.636398-05 2006-01-13 3995 86 W/O 50043-1 -1 -11.00 Post Run Time to Work Order 3291 t WO f jsmith f 7902 f 2006-01-13 11:51:00.636398-05 2006-01-13 3995 94 W/O 50043-1 -1 11.00 Post Run Time to Work Order 3291 t WO f jsmith f 7905 f 2006-01-13 11:51:00.636398-05 2006-01-13 3996 86 W/O 50043-1 -1 -1.10 Post Setup Time to Work Order 3292 t WO f jsmith f 7904 f 2006-01-13 11:51:00.636398-05 2006-01-13 3996 94 W/O 50043-1 -1 1.10 Post Setup Time to Work Order 3292 t WO f jsmith f 7907 f 2006-01-13 11:51:00.636398-05 2006-01-13 3997 86 W/O 50043-1 -1 -11.00 Post Run Time to Work Order 3293 t WO f jsmith f 7906 f 2006-01-13 11:51:00.636398-05 2006-01-13 3997 94 W/O 50043-1 -1 11.00 Post Run Time to Work Order 3293 t WO f jsmith f 7909 f 2006-01-13 11:51:00.636398-05 2006-01-13 3998 86 W/O 50043-1 -1 -0.88 Post Setup Time to Work Order 3294 t WO f jsmith f 7908 f 2006-01-13 11:51:00.636398-05 2006-01-13 3998 94 W/O 50043-1 -1 0.88 Post Setup Time to Work Order 3294 t WO f jsmith f 7911 f 2006-01-13 11:51:00.636398-05 2006-01-13 3999 86 W/O 50043-1 -1 -8.80 Post Run Time to Work Order 3295 t WO f jsmith f 7910 f 2006-01-13 11:51:00.636398-05 2006-01-13 3999 94 W/O 50043-1 -1 8.80 Post Run Time to Work Order 3295 t WO f jsmith f 7913 f 2006-01-13 11:53:06.038317-05 2006-01-13 4000 96 S/R 50043-1 3050 -246.18 Issue to Shipping 3298 t SO f jsmith f 7912 f 2006-01-13 11:53:06.038317-05 2006-01-13 4000 85 S/R 50043-1 3050 246.18 Issue to Shipping 3298 t SO f jsmith f 7914 f 2006-01-13 11:53:19.69192-05 2006-01-13 4001 96 S/R 50043 -1 246.18 Ship Shipment 3299 t SO f jsmith f 7918 f 2006-01-13 11:54:28.50807-05 2006-01-13 4002 106 A/R 60018 \N -997.50 3300 t IN f jsmith f 7917 f 2006-01-13 11:54:28.50807-05 2006-01-13 4002 102 A/R 60018 \N 47.50 3300 t IN f jsmith f 7916 f 2006-01-13 11:54:28.50807-05 2006-01-13 4002 103 A/R 60018 \N 950.00 3300 t IN f jsmith f 7921 f 2006-01-13 11:54:49.834539-05 2006-01-13 4003 104 A/R Unapplied from V-50043-4 \N 997.50 TTOYS-Tremendous Toys Inc. 3301 t CR f jsmith f 7922 f 2006-01-13 11:54:49.834539-05 2006-01-13 4003 109 A/R V-50043-4 \N -997.50 TTOYS-Tremendous Toys Inc. 3301 t CR t jsmith f 7920 f 2006-01-13 11:54:49.834539-05 2006-01-13 4004 104 A/R 20008 320 -997.50 Unapplied from V-50043-4 3302 t CM f jsmith f 7919 f 2006-01-13 11:54:49.834539-05 2006-01-13 4004 106 A/R 20008 320 997.50 Unapplied from V-50043-4 3302 t CM f jsmith f 7923 f 2006-01-13 12:34:40.665-05 2006-01-13 4005 91 I/M 3830-MLC 3051 24.62 Miscellaneous Adjustment\nNote--3830-MLC 3303 t f jsmith f 7924 f 2006-01-13 12:34:40.665-05 2006-01-13 4005 85 I/M 3830-MLC 3051 -24.62 Miscellaneous Adjustment\nNote--3830-MLC 3303 t f jsmith f 7925 f 2006-01-13 12:35:15.405-05 2006-01-13 4006 91 I/M 3830-LOT-1 3052 7.00 Miscellaneous Adjustment\nNotes-3830-LOT-1 3304 t f jsmith f 7926 f 2006-01-13 12:35:15.405-05 2006-01-13 4006 85 I/M 3830-LOT-1 3052 -7.00 Miscellaneous Adjustment\nNotes-3830-LOT-1 3304 t f jsmith f 7927 f 2006-01-13 12:36:15.762-05 2006-01-13 4007 91 I/M 3820-REG-1 3053 2.50 Miscellaneous Adjustment\nNotes-3820-REG-1 3305 t f jsmith f 7928 f 2006-01-13 12:36:15.762-05 2006-01-13 4007 85 I/M 3820-REG-1 3053 -2.50 Miscellaneous Adjustment\nNotes-3820-REG-1 3305 t f jsmith f 7930 f 2006-01-13 12:48:21.366-05 2006-01-13 4008 96 S/R 40005-1 3054 -24.62 Issue to Shipping 3306 t SO f jsmith f 7929 f 2006-01-13 12:48:21.366-05 2006-01-13 4008 85 S/R 40005-1 3054 24.62 Issue to Shipping 3306 t SO f jsmith f 7932 f 2006-01-13 12:57:42.613-05 2006-01-13 4009 108 S/R 40005 -1 -24.62 Ship Shipment 3307 t SO f jsmith f 7931 f 2006-01-13 12:57:42.613-05 2006-01-13 4009 96 S/R 40005 -1 24.62 Ship Shipment 3307 t SO f jsmith f 7936 f 2006-01-13 12:58:39.815-05 2006-01-13 4010 106 A/R 60019 \N -111.60 3308 t IN f jsmith f 7935 f 2006-01-13 12:58:39.815-05 2006-01-13 4010 102 A/R 60019 \N 4.95 3308 t IN f jsmith f 7934 f 2006-01-13 12:58:39.815-05 2006-01-13 4010 105 A/R 60019 \N 7.74 3308 t IN f jsmith f 7933 f 2006-01-13 12:58:39.815-05 2006-01-13 4010 103 A/R 60019 \N 98.91 3308 t IN f jsmith f 7938 f 2006-01-13 13:01:30.931-05 2006-01-13 4011 109 A/R V-40005-1 \N -103.86 TTOYS-Tremendous Toys Inc. 3309 t CR t jsmith f 7937 f 2006-01-13 13:01:30.931-05 2006-01-13 4011 106 A/R I-60019 \N 103.86 TTOYS-Tremendous Toys Inc. 3309 t CR f jsmith f 7940 f 2006-01-13 13:02:07.283-05 2006-01-13 4012 109 A/R C-774 \N -7.74 TTOYS-Tremendous Toys Inc. 3310 t CR t jsmith f 7939 f 2006-01-13 13:02:07.283-05 2006-01-13 4012 106 A/R I-60019 \N 7.74 TTOYS-Tremendous Toys Inc. 3310 t CR f jsmith f 7943 f 2006-01-13 13:36:28.397-05 2006-01-13 4013 104 A/R Unapplied from V-50045-1 \N 103.86 Cash Receipt from Credit Card 3311 t CR f jsmith f 7944 f 2006-01-13 13:36:28.397-05 2006-01-13 4013 109 A/R V-50045-1 \N -103.86 Cash Receipt from Credit Card 3311 t CR t jsmith f 7942 f 2006-01-13 13:36:28.397-05 2006-01-13 4014 104 A/R 20009 322 -103.86 Unapplied from V-50045-1 3312 t CM f jsmith f 7941 f 2006-01-13 13:36:28.397-05 2006-01-13 4014 106 A/R 20009 322 103.86 Unapplied from V-50045-1 3312 t CM f jsmith f 7946 f 2006-01-13 13:42:12.762-05 2006-01-13 4015 96 S/R 50045-1 3055 -24.62 Issue to Shipping 3313 t SO f jsmith f 7945 f 2006-01-13 13:42:12.762-05 2006-01-13 4015 85 S/R 50045-1 3055 24.62 Issue to Shipping 3313 t SO f jsmith f 7948 f 2006-01-13 13:42:27.944-05 2006-01-13 4016 108 S/R 50045 -1 -24.62 Ship Shipment 3314 t SO f jsmith f 7947 f 2006-01-13 13:42:27.944-05 2006-01-13 4016 96 S/R 50045 -1 24.62 Ship Shipment 3314 t SO f jsmith f 7950 f 2006-01-13 13:42:37.257-05 2006-01-13 4017 102 A/R 60020 \N 4.95 3315 t IN f jsmith f 7949 f 2006-01-13 13:42:37.257-05 2006-01-13 4017 103 A/R 60020 \N 98.91 3315 t IN f jsmith f 7954 f 2006-01-13 15:09:30.383-05 2006-01-13 4018 104 A/R Unapplied from V-50046-1 \N 997.50 Cash Receipt from Credit Card 3316 t CR f jsmith f 7955 f 2006-01-13 15:09:30.383-05 2006-01-13 4018 109 A/R V-50046-1 \N -997.50 Cash Receipt from Credit Card 3316 t CR t jsmith f 7953 f 2006-01-13 15:09:30.383-05 2006-01-13 4019 104 A/R 20010 324 -997.50 Unapplied from V-50046-1 3317 t CM f jsmith f 7952 f 2006-01-13 15:09:30.383-05 2006-01-13 4019 106 A/R 20010 324 997.50 Unapplied from V-50046-1 3317 t CM f jsmith f 7956 f 2006-01-13 15:26:09.059-05 2006-01-13 4020 95 S/R 20017 3056 47.00 Receive Inventory from P/O 3318 t PO f jsmith f 7957 f 2006-01-13 15:26:09.059-05 2006-01-13 4020 85 S/R 20017 3056 -47.00 Receive Inventory from P/O 3318 t PO f jsmith f 7959 f 2006-01-13 15:27:19.701-05 2006-01-13 4021 90 A/P 30015 \N 22.00 5433 3320 t VO f jsmith f 7960 f 2006-01-13 15:27:19.701-05 2006-01-13 4021 99 A/P 30015 \N 25.00 5433 3320 t VO f jsmith f 7958 f 2006-01-13 15:27:19.701-05 2006-01-13 4021 95 A/P 30015 \N -47.00 5433 3320 t VO f jsmith f 7961 f 2006-01-13 15:27:32.489-05 2006-01-13 4022 101 A/P 30015 95 0.50 Discount for V 30015 3321 t CM f jsmith f 7962 f 2006-01-13 15:27:32.489-05 2006-01-13 4022 99 A/P 30015 95 -0.50 Discount for V 30015 3321 t CM f jsmith f 7964 f 2006-01-13 15:28:13.719-05 2006-01-13 4023 109 A/P 3010 110 24.50 TPARTS-Toy Parts Inc. 3322 t CK t jsmith f 7966 f 2006-01-13 15:29:01.838-05 2006-01-13 4024 86 W/O 10010-1 3057 -27.50 Material Issue to Work Order 3323 t WO f jsmith f 7965 f 2006-01-13 15:29:01.838-05 2006-01-13 4024 85 W/O 10010-1 3057 27.50 Material Issue to Work Order 3323 t WO f jsmith f 7968 f 2006-01-13 15:29:01.838-05 2006-01-13 4025 86 W/O 10010-1 3058 -47.00 Material Issue to Work Order 3324 t WO f jsmith f 7967 f 2006-01-13 15:29:01.838-05 2006-01-13 4025 85 W/O 10010-1 3058 47.00 Material Issue to Work Order 3324 t WO f jsmith f 7969 f 2006-01-13 15:29:01.838-05 2006-01-13 4026 86 W/O 10010-1 3059 86.60 Receive Inventory from Manufacturing 3325 t WO f jsmith f 7970 f 2006-01-13 15:29:01.838-05 2006-01-13 4026 85 W/O 10010-1 3059 -86.60 Receive Inventory from Manufacturing 3325 t WO f jsmith f 7972 f 2006-01-13 15:29:01.838-05 2006-01-13 4027 86 W/O 10010-1 -1 -0.92 Post Setup Time to Work Order 3326 t WO f jsmith f 7971 f 2006-01-13 15:29:01.838-05 2006-01-13 4027 94 W/O 10010-1 -1 0.92 Post Setup Time to Work Order 3326 t WO f jsmith f 7974 f 2006-01-13 15:29:01.838-05 2006-01-13 4028 86 W/O 10010-1 -1 -10.82 Post Run Time to Work Order 3327 t WO f jsmith f 7973 f 2006-01-13 15:29:01.838-05 2006-01-13 4028 94 W/O 10010-1 -1 10.82 Post Run Time to Work Order 3327 t WO f jsmith f 7975 f 2006-01-13 15:29:15.227-05 2006-01-13 4029 86 W/O 10010-1 -1 -0.37 Manufacturing Inventory Cost Variance 3328 t WO f jsmith f 7976 f 2006-01-13 15:29:15.227-05 2006-01-13 4029 87 W/O 10010-1 -1 0.37 Manufacturing Inventory Cost Variance 3328 t WO f jsmith f 7977 f 2006-01-13 15:29:42.106-05 2006-01-13 4030 86 W/O 50046-1 3060 246.18 Receive Inventory from Manufacturing 3330 t WO f jsmith f 7978 f 2006-01-13 15:29:42.106-05 2006-01-13 4030 85 W/O 50046-1 3060 -246.18 Receive Inventory from Manufacturing 3330 t WO f jsmith f 7980 f 2006-01-13 15:29:42.106-05 2006-01-13 4031 86 W/O 50046-1 3061 -86.60 Material Issue to Work Order 3331 t WO f jsmith f 7979 f 2006-01-13 15:29:42.106-05 2006-01-13 4031 85 W/O 50046-1 3061 86.60 Material Issue to Work Order 3331 t WO f jsmith f 7982 f 2006-01-13 15:29:42.106-05 2006-01-13 4032 86 W/O 50046-1 3062 -100.00 Material Issue to Work Order 3332 t WO f jsmith f 7981 f 2006-01-13 15:29:42.106-05 2006-01-13 4032 85 W/O 50046-1 3062 100.00 Material Issue to Work Order 3332 t WO f jsmith f 7984 f 2006-01-13 15:29:42.106-05 2006-01-13 4033 86 W/O 50046-1 3063 -25.00 Material Issue to Work Order 3333 t WO f jsmith f 7983 f 2006-01-13 15:29:42.106-05 2006-01-13 4033 85 W/O 50046-1 3063 25.00 Material Issue to Work Order 3333 t WO f jsmith f 7986 f 2006-01-13 15:29:42.106-05 2006-01-13 4034 86 W/O 50046-1 3064 -0.70 Material Issue to Work Order 3334 t WO f jsmith f 7985 f 2006-01-13 15:29:42.106-05 2006-01-13 4034 85 W/O 50046-1 3064 0.70 Material Issue to Work Order 3334 t WO f jsmith f 7988 f 2006-01-13 15:29:42.106-05 2006-01-13 4035 86 W/O 50046-1 -1 -1.10 Post Setup Time to Work Order 3335 t WO f jsmith f 7987 f 2006-01-13 15:29:42.106-05 2006-01-13 4035 94 W/O 50046-1 -1 1.10 Post Setup Time to Work Order 3335 t WO f jsmith f 7990 f 2006-01-13 15:29:42.106-05 2006-01-13 4036 86 W/O 50046-1 -1 -11.00 Post Run Time to Work Order 3336 t WO f jsmith f 7989 f 2006-01-13 15:29:42.106-05 2006-01-13 4036 94 W/O 50046-1 -1 11.00 Post Run Time to Work Order 3336 t WO f jsmith f 7992 f 2006-01-13 15:29:42.106-05 2006-01-13 4037 86 W/O 50046-1 -1 -1.10 Post Setup Time to Work Order 3337 t WO f jsmith f 7991 f 2006-01-13 15:29:42.106-05 2006-01-13 4037 94 W/O 50046-1 -1 1.10 Post Setup Time to Work Order 3337 t WO f jsmith f 7994 f 2006-01-13 15:29:42.106-05 2006-01-13 4038 86 W/O 50046-1 -1 -11.00 Post Run Time to Work Order 3338 t WO f jsmith f 7993 f 2006-01-13 15:29:42.106-05 2006-01-13 4038 94 W/O 50046-1 -1 11.00 Post Run Time to Work Order 3338 t WO f jsmith f 7996 f 2006-01-13 15:29:42.106-05 2006-01-13 4039 86 W/O 50046-1 -1 -0.88 Post Setup Time to Work Order 3339 t WO f jsmith f 7995 f 2006-01-13 15:29:42.106-05 2006-01-13 4039 94 W/O 50046-1 -1 0.88 Post Setup Time to Work Order 3339 t WO f jsmith f 7998 f 2006-01-13 15:29:42.106-05 2006-01-13 4040 86 W/O 50046-1 -1 -8.80 Post Run Time to Work Order 3340 t WO f jsmith f 7997 f 2006-01-13 15:29:42.106-05 2006-01-13 4040 94 W/O 50046-1 -1 8.80 Post Run Time to Work Order 3340 t WO f jsmith f 8000 f 2006-01-13 15:30:06.521-05 2006-01-13 4041 96 S/R 50046-1 3065 -246.18 Issue to Shipping 3343 t SO f jsmith f 7999 f 2006-01-13 15:30:06.521-05 2006-01-13 4041 85 S/R 50046-1 3065 246.18 Issue to Shipping 3343 t SO f jsmith f 8002 f 2006-01-13 15:30:48.331-05 2006-01-13 4042 108 S/R 50046 -1 -246.18 Ship Shipment 3344 t SO f jsmith f 8001 f 2006-01-13 15:30:48.331-05 2006-01-13 4042 96 S/R 50046 -1 246.18 Ship Shipment 3344 t SO f jsmith f 8006 f 2006-01-13 15:31:17.813-05 2006-01-13 4043 106 A/R 60021 \N -1051.50 3345 t IN f jsmith f 8005 f 2006-01-13 15:31:17.813-05 2006-01-13 4043 102 A/R 60021 \N 47.50 3345 t IN f jsmith f 8004 f 2006-01-13 15:31:17.813-05 2006-01-13 4043 105 A/R 60021 \N 54.00 3345 t IN f jsmith f 8003 f 2006-01-13 15:31:17.813-05 2006-01-13 4043 103 A/R 60021 \N 950.00 3345 t IN f jsmith f 8007 f 2006-01-13 15:42:10.542-05 2006-01-13 4044 109 A/R V- \N -54.00 TTOYS-Tremendous Toys Inc. 3346 t CR t jsmith f 8008 f 2006-01-13 15:42:10.542-05 2006-01-13 4044 106 A/R I-60021 \N 54.00 TTOYS-Tremendous Toys Inc. 3346 t CR f jsmith f 8011 f 2006-01-30 12:06:01.609338-05 2006-01-30 4045 104 A/R Unapplied from V-50148-1 \N 500.00 Cash Receipt from Credit Card 3347 t CR f jsmith f 8012 f 2006-01-30 12:06:01.609338-05 2006-01-30 4045 109 A/R V-50148-1 \N -500.00 Cash Receipt from Credit Card 3347 t CR t jsmith f 8010 f 2006-01-30 12:06:01.609338-05 2006-01-30 4046 104 A/R 20011 326 -500.00 Unapplied from V-50148-1 3348 t CM f jsmith f 8009 f 2006-01-30 12:06:01.609338-05 2006-01-30 4046 106 A/R 20011 326 500.00 Unapplied from V-50148-1 3348 t CM f jsmith f 8014 f 2006-01-30 12:16:16.734143-05 2006-01-30 4047 86 W/O 10011-1 3066 -47.00 Material Issue to Work Order 3349 t WO f jsmith f 8013 f 2006-01-30 12:16:16.734143-05 2006-01-30 4047 85 W/O 10011-1 3066 47.00 Material Issue to Work Order 3349 t WO f jsmith f 8016 f 2006-01-30 12:16:16.734143-05 2006-01-30 4048 86 W/O 10011-1 3067 -27.50 Material Issue to Work Order 3350 t WO f jsmith f 8015 f 2006-01-30 12:16:16.734143-05 2006-01-30 4048 85 W/O 10011-1 3067 27.50 Material Issue to Work Order 3350 t WO f jsmith f 8017 f 2006-01-30 12:16:16.734143-05 2006-01-30 4049 86 W/O 10011-1 3068 86.60 Receive Inventory from Manufacturing 3351 t WO f jsmith f 8018 f 2006-01-30 12:16:16.734143-05 2006-01-30 4049 85 W/O 10011-1 3068 -86.60 Receive Inventory from Manufacturing 3351 t WO f jsmith f 8020 f 2006-01-30 12:16:16.734143-05 2006-01-30 4050 86 W/O 10011-1 -1 -0.92 Post Setup Time to Work Order 3352 t WO f jsmith f 8019 f 2006-01-30 12:16:16.734143-05 2006-01-30 4050 94 W/O 10011-1 -1 0.92 Post Setup Time to Work Order 3352 t WO f jsmith f 8022 f 2006-01-30 12:16:16.734143-05 2006-01-30 4051 86 W/O 10011-1 -1 -10.08 Post Run Time to Work Order 3353 t WO f jsmith f 8021 f 2006-01-30 12:16:16.734143-05 2006-01-30 4051 94 W/O 10011-1 -1 10.08 Post Run Time to Work Order 3353 t WO f jsmith f 8023 f 2006-01-30 12:16:25.49459-05 2006-01-30 4052 86 W/O 10011-1 -1 -1.10 Manufacturing Inventory Cost Variance 3354 t WO f jsmith f 8024 f 2006-01-30 12:16:25.49459-05 2006-01-30 4052 87 W/O 10011-1 -1 1.10 Manufacturing Inventory Cost Variance 3354 t WO f jsmith f 8025 f 2006-01-30 12:16:46.435991-05 2006-01-30 4053 86 W/O 50148-1 3069 246.18 Receive Inventory from Manufacturing 3356 t WO f jsmith f 8026 f 2006-01-30 12:16:46.435991-05 2006-01-30 4053 85 W/O 50148-1 3069 -246.18 Receive Inventory from Manufacturing 3356 t WO f jsmith f 8028 f 2006-01-30 12:16:46.435991-05 2006-01-30 4054 86 W/O 50148-1 3070 -86.60 Material Issue to Work Order 3357 t WO f jsmith f 8027 f 2006-01-30 12:16:46.435991-05 2006-01-30 4054 85 W/O 50148-1 3070 86.60 Material Issue to Work Order 3357 t WO f jsmith f 8030 f 2006-01-30 12:16:46.435991-05 2006-01-30 4055 86 W/O 50148-1 3071 -100.00 Material Issue to Work Order 3358 t WO f jsmith f 8029 f 2006-01-30 12:16:46.435991-05 2006-01-30 4055 85 W/O 50148-1 3071 100.00 Material Issue to Work Order 3358 t WO f jsmith f 8032 f 2006-01-30 12:16:46.435991-05 2006-01-30 4056 86 W/O 50148-1 3072 -25.00 Material Issue to Work Order 3359 t WO f jsmith f 8031 f 2006-01-30 12:16:46.435991-05 2006-01-30 4056 85 W/O 50148-1 3072 25.00 Material Issue to Work Order 3359 t WO f jsmith f 8034 f 2006-01-30 12:16:46.435991-05 2006-01-30 4057 86 W/O 50148-1 3073 -0.70 Material Issue to Work Order 3360 t WO f jsmith f 8033 f 2006-01-30 12:16:46.435991-05 2006-01-30 4057 85 W/O 50148-1 3073 0.70 Material Issue to Work Order 3360 t WO f jsmith f 8036 f 2006-01-30 12:16:46.435991-05 2006-01-30 4058 86 W/O 50148-1 -1 -1.10 Post Setup Time to Work Order 3361 t WO f jsmith f 8035 f 2006-01-30 12:16:46.435991-05 2006-01-30 4058 94 W/O 50148-1 -1 1.10 Post Setup Time to Work Order 3361 t WO f jsmith f 8038 f 2006-01-30 12:16:46.435991-05 2006-01-30 4059 86 W/O 50148-1 -1 -11.00 Post Run Time to Work Order 3362 t WO f jsmith f 8037 f 2006-01-30 12:16:46.435991-05 2006-01-30 4059 94 W/O 50148-1 -1 11.00 Post Run Time to Work Order 3362 t WO f jsmith f 8040 f 2006-01-30 12:16:46.435991-05 2006-01-30 4060 86 W/O 50148-1 -1 -1.10 Post Setup Time to Work Order 3363 t WO f jsmith f 8039 f 2006-01-30 12:16:46.435991-05 2006-01-30 4060 94 W/O 50148-1 -1 1.10 Post Setup Time to Work Order 3363 t WO f jsmith f 8042 f 2006-01-30 12:16:46.435991-05 2006-01-30 4061 86 W/O 50148-1 -1 -11.00 Post Run Time to Work Order 3364 t WO f jsmith f 8041 f 2006-01-30 12:16:46.435991-05 2006-01-30 4061 94 W/O 50148-1 -1 11.00 Post Run Time to Work Order 3364 t WO f jsmith f 8049 f 2006-01-30 12:21:12.398617-05 2006-01-30 4065 95 A/P 30016 \N -47.00 RF-901221 3371 t VO f jsmith f 8052 f 2006-01-30 12:23:48.698417-05 2006-01-30 4066 101 A/P 30016 97 0.50 Discount for V 30016 3372 t CM f jsmith f 8053 f 2006-01-30 12:23:48.698417-05 2006-01-30 4066 99 A/P 30016 97 -0.50 Discount for V 30016 3372 t CM f jsmith f 8055 f 2006-01-30 12:25:22.587723-05 2006-01-30 4067 109 A/P 3011 111 24.50 TPARTS-Toy Parts Inc. 3373 t CK t jsmith f 8054 f 2006-01-30 12:25:22.587723-05 2006-01-30 4067 99 A/P 3011 111 -24.50 TPARTS-Toy Parts Inc. 3373 t CK f jsmith f 8057 f 2006-01-30 12:41:05.59221-05 2006-01-30 4068 96 S/R 50148-1 3075 -246.18 Issue to Shipping 3374 t SO f jsmith f 8056 f 2006-01-30 12:41:05.59221-05 2006-01-30 4068 85 S/R 50148-1 3075 246.18 Issue to Shipping 3374 t SO f jsmith f 8059 f 2006-01-30 12:41:46.479345-05 2006-01-30 4069 108 S/R 50148 -1 -246.18 Ship Shipment 3375 t SO f jsmith f 8058 f 2006-01-30 12:41:46.479345-05 2006-01-30 4069 96 S/R 50148 -1 246.18 Ship Shipment 3375 t SO f jsmith f 8063 f 2006-01-30 12:43:00.377257-05 2006-01-30 4070 106 A/R 60022 \N -1087.50 3376 t IN f jsmith f 8062 f 2006-01-30 12:43:00.377257-05 2006-01-30 4070 102 A/R 60022 \N 47.50 3376 t IN f jsmith f 8061 f 2006-01-30 12:43:00.377257-05 2006-01-30 4070 105 A/R 60022 \N 90.00 3376 t IN f jsmith f 8060 f 2006-01-30 12:43:00.377257-05 2006-01-30 4070 103 A/R 60022 \N 950.00 3376 t IN f jsmith f 8065 f 2006-01-30 12:46:08.111871-05 2006-01-30 4071 109 A/R C-123112 \N -587.50 TTOYS-Tremendous Toys Incorporated 3377 t CR t jsmith f 8064 f 2006-01-30 12:46:08.111871-05 2006-01-30 4071 106 A/R I-60022 \N 587.50 TTOYS-Tremendous Toys Incorporated 3377 t CR f jsmith f 8066 f 2006-01-30 16:51:09.705773-05 2006-01-30 4072 95 S/R 20019 3076 47.00 Receive Inventory from P/O 3378 t PO f jsmith f 8067 f 2006-01-30 16:51:09.705773-05 2006-01-30 4072 85 S/R 20019 3076 -47.00 Receive Inventory from P/O 3378 t PO f jsmith f 8069 f 2006-01-30 16:58:10.153362-05 2006-01-30 4073 86 W/O 10012-1 3077 -47.00 Material Issue to Work Order 3380 t WO f jsmith f 7487 f 2006-01-09 10:53:14.730945-05 2006-01-09 3809 85 S/R 50030-1 2961 26.67 Issue to Shipping 2531 t SO f jsmith f 8068 f 2006-01-30 16:58:10.153362-05 2006-01-30 4073 85 W/O 10012-1 3077 47.00 Material Issue to Work Order 3380 t WO f jsmith f 8071 f 2006-01-30 16:58:10.153362-05 2006-01-30 4074 86 W/O 10012-1 3078 -27.50 Material Issue to Work Order 3381 t WO f jsmith f 8070 f 2006-01-30 16:58:10.153362-05 2006-01-30 4074 85 W/O 10012-1 3078 27.50 Material Issue to Work Order 3381 t WO f jsmith f 8072 f 2006-01-30 16:58:10.153362-05 2006-01-30 4075 86 W/O 10012-1 3079 86.60 Receive Inventory from Manufacturing 3382 t WO f jsmith f 8073 f 2006-01-30 16:58:10.153362-05 2006-01-30 4075 85 W/O 10012-1 3079 -86.60 Receive Inventory from Manufacturing 3382 t WO f jsmith f 8075 f 2006-01-30 16:58:10.153362-05 2006-01-30 4076 86 W/O 10012-1 -1 -0.92 Post Setup Time to Work Order 3383 t WO f jsmith f 8074 f 2006-01-30 16:58:10.153362-05 2006-01-30 4076 94 W/O 10012-1 -1 0.92 Post Setup Time to Work Order 3383 t WO f jsmith f 8077 f 2006-01-30 16:58:10.153362-05 2006-01-30 4077 86 W/O 10012-1 -1 -11.18 Post Run Time to Work Order 3384 t WO f jsmith f 8076 f 2006-01-30 16:58:10.153362-05 2006-01-30 4077 94 W/O 10012-1 -1 11.18 Post Run Time to Work Order 3384 t WO f jsmith f 8078 f 2006-01-30 17:00:37.702398-05 2006-01-30 4078 86 W/O 50149-1 3080 246.18 Receive Inventory from Manufacturing 3387 t WO f jsmith f 8079 f 2006-01-30 17:00:37.702398-05 2006-01-30 4078 85 W/O 50149-1 3080 -246.18 Receive Inventory from Manufacturing 3387 t WO f jsmith f 8081 f 2006-01-30 17:00:37.702398-05 2006-01-30 4079 86 W/O 50149-1 3081 -86.60 Material Issue to Work Order 3388 t WO f jsmith f 8080 f 2006-01-30 17:00:37.702398-05 2006-01-30 4079 85 W/O 50149-1 3081 86.60 Material Issue to Work Order 3388 t WO f jsmith f 8083 f 2006-01-30 17:00:37.702398-05 2006-01-30 4080 86 W/O 50149-1 3082 -100.00 Material Issue to Work Order 3389 t WO f jsmith f 8082 f 2006-01-30 17:00:37.702398-05 2006-01-30 4080 85 W/O 50149-1 3082 100.00 Material Issue to Work Order 3389 t WO f jsmith f 8085 f 2006-01-30 17:00:37.702398-05 2006-01-30 4081 86 W/O 50149-1 3083 -25.00 Material Issue to Work Order 3390 t WO f jsmith f 8084 f 2006-01-30 17:00:37.702398-05 2006-01-30 4081 85 W/O 50149-1 3083 25.00 Material Issue to Work Order 3390 t WO f jsmith f 8087 f 2006-01-30 17:00:37.702398-05 2006-01-30 4082 86 W/O 50149-1 3084 -0.70 Material Issue to Work Order 3391 t WO f jsmith f 8086 f 2006-01-30 17:00:37.702398-05 2006-01-30 4082 85 W/O 50149-1 3084 0.70 Material Issue to Work Order 3391 t WO f jsmith f 8089 f 2006-01-30 17:00:37.702398-05 2006-01-30 4083 86 W/O 50149-1 -1 -1.10 Post Setup Time to Work Order 3392 t WO f jsmith f 8088 f 2006-01-30 17:00:37.702398-05 2006-01-30 4083 94 W/O 50149-1 -1 1.10 Post Setup Time to Work Order 3392 t WO f jsmith f 8091 f 2006-01-30 17:00:37.702398-05 2006-01-30 4084 86 W/O 50149-1 -1 -11.00 Post Run Time to Work Order 3393 t WO f jsmith f 8090 f 2006-01-30 17:00:37.702398-05 2006-01-30 4084 94 W/O 50149-1 -1 11.00 Post Run Time to Work Order 3393 t WO f jsmith f 8093 f 2006-01-30 17:00:37.702398-05 2006-01-30 4085 86 W/O 50149-1 -1 -1.10 Post Setup Time to Work Order 3394 t WO f jsmith f 8092 f 2006-01-30 17:00:37.702398-05 2006-01-30 4085 94 W/O 50149-1 -1 1.10 Post Setup Time to Work Order 3394 t WO f jsmith f 8127 f 2006-01-31 13:20:25.673-05 2006-01-02 4102 99 G/L MDA-004 -1 -15.64 Demo Setup Entry - MDA 3411 t JE f jsmith f 8126 f 2006-01-31 13:20:25.673-05 2006-01-02 4102 95 G/L MDA-004 -1 15.64 Demo Setup Entry - MDA 3411 t JE f jsmith f 8129 f 2006-01-31 13:21:52.859-05 2006-01-02 4103 94 G/L MDA-005 -1 -403.99 Demo Setup Entry - MDA 3412 t JE f jsmith f 8128 f 2006-01-31 13:21:52.859-05 2006-01-02 4103 99 G/L MDA-005 -1 403.99 Demo Setup Entry - MDA 3412 t JE f jsmith f 8130 f 2006-01-31 15:41:01.704-05 2006-01-31 4104 95 S/R 20020 3086 47.00 Receive Inventory from P/O 3413 t PO f jsmith f 8131 f 2006-01-31 15:41:01.704-05 2006-01-31 4104 85 S/R 20020 3086 -47.00 Receive Inventory from P/O 3413 t PO f jsmith f 8133 f 2006-01-31 16:22:28.64-05 2006-01-31 4105 90 A/P 30018 \N 22.00 RF-01-2006 3415 t VO f jsmith f 8134 f 2006-01-31 16:22:28.64-05 2006-01-31 4105 99 A/P 30018 \N 25.00 RF-01-2006 3415 t VO f jsmith f 8132 f 2006-01-31 16:22:28.64-05 2006-01-31 4105 95 A/P 30018 \N -47.00 RF-01-2006 3415 t VO f jsmith f 8136 f 2006-01-31 16:44:57.279-05 2006-01-31 4106 109 A/P 3013 113 25.00 TPARTS-Toy Parts Inc. 3416 t CK t jsmith f 8135 f 2006-01-31 16:44:57.279-05 2006-01-31 4106 99 A/P 3013 113 -25.00 TPARTS-Toy Parts Inc. 3416 t CK f jsmith f 8149 f 2006-02-01 08:34:02.132-05 2006-02-01 4113 85 W/O 50150-1 3091 86.60 Material Issue to Work Order 3425 t WO f jsmith f 8152 f 2006-02-01 08:34:02.132-05 2006-02-01 4114 86 W/O 50150-1 3092 -100.00 Material Issue to Work Order 3426 t WO f jsmith f 8151 f 2006-02-01 08:34:02.132-05 2006-02-01 4114 85 W/O 50150-1 3092 100.00 Material Issue to Work Order 3426 t WO f jsmith f 8154 f 2006-02-01 08:34:02.132-05 2006-02-01 4115 86 W/O 50150-1 3093 -25.00 Material Issue to Work Order 3427 t WO f jsmith f 8153 f 2006-02-01 08:34:02.132-05 2006-02-01 4115 85 W/O 50150-1 3093 25.00 Material Issue to Work Order 3427 t WO f jsmith f 8156 f 2006-02-01 08:34:02.132-05 2006-02-01 4116 86 W/O 50150-1 3094 -0.70 Material Issue to Work Order 3428 t WO f jsmith f 8155 f 2006-02-01 08:34:02.132-05 2006-02-01 4116 85 W/O 50150-1 3094 0.70 Material Issue to Work Order 3428 t WO f jsmith f 8320 f 2006-08-30 16:44:54.941-04 2006-08-30 4188 85 I/M \N 3116 -94.00 \N 3511 t CT f jsmith f 8521 f 2006-12-28 11:52:14.546-05 2006-12-28 4279 103 A/R 60030 \N 950.00 3618 t IN f mfgadmin f 8559 f 2007-01-08 16:35:03.105-05 2007-01-08 4294 103 A/R 60032 \N 494.55 3634 t IN f jsmith f 8911 f 2007-05-30 09:26:36.703-04 2007-05-30 4464 103 A/R 60037 \N 7017.30 3835 t IN f mfgadmin f 8202 f 2006-07-05 09:04:55.16-04 2006-07-05 4134 90 A/P 30019 \N -3.00 RF-1012 3449 t VO f jsmith f 8203 f 2006-07-05 09:04:55.16-04 2006-07-05 4134 99 A/P 30019 \N 50.00 RF-1012 3449 t VO f jsmith f 8201 f 2006-07-05 09:04:55.16-04 2006-07-05 4134 95 A/P 30019 \N -47.00 RF-1012 3449 t VO f jsmith f 8205 f 2006-07-05 09:05:13.645-04 2006-07-05 4135 101 A/P 30019 \N 1.00 Discount for V 30019 3450 t CM f jsmith f 8204 f 2006-07-05 09:05:13.645-04 2006-07-05 4135 99 A/P 30019 \N -1.00 Discount for V 30019 3450 t CM f jsmith f 8207 f 2006-07-05 09:06:24.676-04 2006-07-05 4136 109 A/P 3014 114 49.00 TPARTS-Toy Parts Inc. 3452 t CK t jsmith f 8206 f 2006-07-05 09:06:24.676-04 2006-07-05 4136 99 A/P 3014 114 -49.00 TPARTS-Toy Parts Inc. 3452 t CK f jsmith f 8209 f 2006-07-05 09:16:56.52-04 2006-07-05 4137 86 W/O 10014-1 3097 -47.00 Material Issue to Work Order 3453 t WO f jsmith f 8208 f 2006-07-05 09:16:56.52-04 2006-07-05 4137 85 W/O 10014-1 3097 47.00 Material Issue to Work Order 3453 t WO f jsmith f 8211 f 2006-07-05 09:16:56.52-04 2006-07-05 4138 86 W/O 10014-1 3098 -27.50 Material Issue to Work Order 3454 t WO f jsmith f 8210 f 2006-07-05 09:16:56.52-04 2006-07-05 4138 85 W/O 10014-1 3098 27.50 Material Issue to Work Order 3454 t WO f jsmith f 8212 f 2006-07-05 09:16:56.52-04 2006-07-05 4139 86 W/O 10014-1 3099 86.60 Receive Inventory from Manufacturing 3455 t WO f jsmith f 8213 f 2006-07-05 09:16:56.52-04 2006-07-05 4139 85 W/O 10014-1 3099 -86.60 Receive Inventory from Manufacturing 3455 t WO f jsmith f 8215 f 2006-07-05 09:16:56.52-04 2006-07-05 4140 86 W/O 10014-1 -1 -0.18 Post Setup Time to Work Order 3456 t WO f jsmith f 8214 f 2006-07-05 09:16:56.52-04 2006-07-05 4140 94 W/O 10014-1 -1 0.18 Post Setup Time to Work Order 3456 t WO f jsmith f 8217 f 2006-07-05 09:16:56.52-04 2006-07-05 4141 86 W/O 10014-1 -1 -0.85 Post Run Time to Work Order 3457 t WO f jsmith f 8216 f 2006-07-05 09:16:56.52-04 2006-07-05 4141 94 W/O 10014-1 -1 0.85 Post Run Time to Work Order 3457 t WO f jsmith f 8218 f 2006-07-05 09:17:18.113-04 2006-07-05 4142 86 W/O 10014-1 -1 -11.07 Manufacturing Inventory Cost Variance 3458 t WO f jsmith f 8219 f 2006-07-05 09:17:18.113-04 2006-07-05 4142 87 W/O 10014-1 -1 11.07 Manufacturing Inventory Cost Variance 3458 t WO f jsmith f 8220 f 2006-07-05 09:17:35.41-04 2006-07-05 4143 86 W/O 50151-1 3100 246.18 Receive Inventory from Manufacturing 3460 t WO f jsmith f 8221 f 2006-07-05 09:17:35.41-04 2006-07-05 4143 85 W/O 50151-1 3100 -246.18 Receive Inventory from Manufacturing 3460 t WO f jsmith f 8223 f 2006-07-05 09:17:35.41-04 2006-07-05 4144 86 W/O 50151-1 3101 -25.00 Material Issue to Work Order 3461 t WO f jsmith f 8222 f 2006-07-05 09:17:35.41-04 2006-07-05 4144 85 W/O 50151-1 3101 25.00 Material Issue to Work Order 3461 t WO f jsmith f 8225 f 2006-07-05 09:17:35.41-04 2006-07-05 4145 86 W/O 50151-1 3102 -0.70 Material Issue to Work Order 3462 t WO f jsmith f 8224 f 2006-07-05 09:17:35.41-04 2006-07-05 4145 85 W/O 50151-1 3102 0.70 Material Issue to Work Order 3462 t WO f jsmith f 8227 f 2006-07-05 09:17:35.41-04 2006-07-05 4146 86 W/O 50151-1 3103 -100.00 Material Issue to Work Order 3463 t WO f jsmith f 8226 f 2006-07-05 09:17:35.41-04 2006-07-05 4146 85 W/O 50151-1 3103 100.00 Material Issue to Work Order 3463 t WO f jsmith f 8229 f 2006-07-05 09:17:35.41-04 2006-07-05 4147 86 W/O 50151-1 3104 -86.60 Material Issue to Work Order 3464 t WO f jsmith f 8228 f 2006-07-05 09:17:35.41-04 2006-07-05 4147 85 W/O 50151-1 3104 86.60 Material Issue to Work Order 3464 t WO f jsmith f 8231 f 2006-07-05 09:17:35.41-04 2006-07-05 4148 86 W/O 50151-1 -1 -1.10 Post Setup Time to Work Order 3465 t WO f jsmith f 8230 f 2006-07-05 09:17:35.41-04 2006-07-05 4148 94 W/O 50151-1 -1 1.10 Post Setup Time to Work Order 3465 t WO f jsmith f 8233 f 2006-07-05 09:17:35.41-04 2006-07-05 4149 86 W/O 50151-1 -1 -11.00 Post Run Time to Work Order 3466 t WO f jsmith f 8232 f 2006-07-05 09:17:35.41-04 2006-07-05 4149 94 W/O 50151-1 -1 11.00 Post Run Time to Work Order 3466 t WO f jsmith f 8235 f 2006-07-05 09:17:35.41-04 2006-07-05 4150 86 W/O 50151-1 -1 -1.10 Post Setup Time to Work Order 3467 t WO f jsmith f 8234 f 2006-07-05 09:17:35.41-04 2006-07-05 4150 94 W/O 50151-1 -1 1.10 Post Setup Time to Work Order 3467 t WO f jsmith f 8237 f 2006-07-05 09:17:35.41-04 2006-07-05 4151 86 W/O 50151-1 -1 -11.00 Post Run Time to Work Order 3468 t WO f jsmith f 8236 f 2006-07-05 09:17:35.41-04 2006-07-05 4151 94 W/O 50151-1 -1 11.00 Post Run Time to Work Order 3468 t WO f jsmith f 8239 f 2006-07-05 09:17:35.41-04 2006-07-05 4152 86 W/O 50151-1 -1 -0.88 Post Setup Time to Work Order 3469 t WO f jsmith f 8238 f 2006-07-05 09:17:35.41-04 2006-07-05 4152 94 W/O 50151-1 -1 0.88 Post Setup Time to Work Order 3469 t WO f jsmith f 8241 f 2006-07-05 09:17:35.41-04 2006-07-05 4153 86 W/O 50151-1 -1 -8.80 Post Run Time to Work Order 3470 t WO f jsmith f 8240 f 2006-07-05 09:17:35.41-04 2006-07-05 4153 94 W/O 50151-1 -1 8.80 Post Run Time to Work Order 3470 t WO f jsmith f 8243 f 2006-07-05 09:18:56.598-04 2006-07-05 4154 96 S/R 50151-1 3105 -246.18 Issue to Shipping 3473 t SO f jsmith f 8242 f 2006-07-05 09:18:56.598-04 2006-07-05 4154 85 S/R 50151-1 3105 246.18 Issue to Shipping 3473 t SO f jsmith f 8245 f 2006-07-05 09:21:52.129-04 2006-07-05 4155 108 S/R 50151 -1 -246.18 Ship Shipment 3474 t SO f jsmith f 8244 f 2006-07-05 09:21:52.129-04 2006-07-05 4155 96 S/R 50151 -1 246.18 Ship Shipment 3474 t SO f jsmith f 8247 f 2006-07-05 09:22:08.254-04 2006-07-05 4156 122 A/R 60025 \N 99.00 3475 t IN f jsmith f 8249 f 2006-07-05 09:22:08.254-04 2006-07-05 4156 106 A/R 60025 \N -1096.50 3475 t IN f jsmith f 8248 f 2006-07-05 09:22:08.254-04 2006-07-05 4156 121 A/R 60025 \N 47.50 3475 t IN f jsmith f 8246 f 2006-07-05 09:22:08.254-04 2006-07-05 4156 103 A/R 60025 \N 950.00 3475 t IN f jsmith f 8251 f 2006-07-05 09:26:21.723-04 2006-07-05 4157 109 A/R C-7655 \N -1096.50 TTOYS-Tremendous Toys Incorporated 3476 t CR t jsmith f 8250 f 2006-07-05 09:26:21.723-04 2006-07-05 4157 106 A/R I-60025 \N 1096.50 TTOYS-Tremendous Toys Incorporated 3476 t CR f jsmith f 8260 f 2006-07-05 11:43:22.113-04 2006-07-05 4161 95 S/R 20022 3106 47.00 Receive Inventory from P/O 3480 t PO f jsmith f 8261 f 2006-07-05 11:43:22.113-04 2006-07-05 4161 85 S/R 20022 3106 -47.00 Receive Inventory from P/O 3480 t PO f jsmith f 8263 f 2006-07-05 13:11:06.113-04 2006-07-05 4162 90 A/P 30020 \N 22.00 15378 3482 t VO f jsmith f 8264 f 2006-07-05 13:11:06.113-04 2006-07-05 4162 99 A/P 30020 \N 25.00 15378 3482 t VO f jsmith f 8262 f 2006-07-05 13:11:06.113-04 2006-07-05 4162 95 A/P 30020 \N -47.00 15378 3482 t VO f jsmith f 8266 f 2006-07-05 13:28:20.957-04 2006-07-05 4163 109 A/P 3015 115 25.00 TPARTS-Toy Parts Inc. 3483 t CK t jsmith f 8265 f 2006-07-05 13:28:20.957-04 2006-07-05 4163 99 A/P 3015 115 -25.00 TPARTS-Toy Parts Inc. 3483 t CK f jsmith f 8268 f 2006-07-05 13:34:55.301-04 2006-07-05 4164 86 W/O 10015-1 3107 -27.50 Material Issue to Work Order 3484 t WO f jsmith f 8267 f 2006-07-05 13:34:55.301-04 2006-07-05 4164 85 W/O 10015-1 3107 27.50 Material Issue to Work Order 3484 t WO f jsmith f 8270 f 2006-07-05 13:34:55.301-04 2006-07-05 4165 86 W/O 10015-1 3108 -47.00 Material Issue to Work Order 3485 t WO f jsmith f 8269 f 2006-07-05 13:34:55.301-04 2006-07-05 4165 85 W/O 10015-1 3108 47.00 Material Issue to Work Order 3485 t WO f jsmith f 8271 f 2006-07-05 13:39:44.926-04 2006-07-05 4166 86 W/O 10015-1 3109 86.60 Receive Inventory from Manufacturing 3486 t WO f jsmith f 8272 f 2006-07-05 13:39:44.926-04 2006-07-05 4166 85 W/O 10015-1 3109 -86.60 Receive Inventory from Manufacturing 3486 t WO f jsmith f 8274 f 2006-07-05 13:39:44.926-04 2006-07-05 4167 86 W/O 10015-1 -1 -1.10 Post Setup Time to Work Order 3487 t WO f jsmith f 8273 f 2006-07-05 13:39:44.926-04 2006-07-05 4167 94 W/O 10015-1 -1 1.10 Post Setup Time to Work Order 3487 t WO f jsmith f 8276 f 2006-07-05 13:39:44.926-04 2006-07-05 4168 86 W/O 10015-1 -1 -11.00 Post Run Time to Work Order 3488 t WO f jsmith f 8275 f 2006-07-05 13:39:44.926-04 2006-07-05 4168 94 W/O 10015-1 -1 11.00 Post Run Time to Work Order 3488 t WO f jsmith f 8277 f 2006-07-05 13:47:13.863-04 2006-07-05 4169 86 W/O 50152-1 3110 246.18 Receive Inventory from Manufacturing 3491 t WO f jsmith f 8278 f 2006-07-05 13:47:13.863-04 2006-07-05 4169 85 W/O 50152-1 3110 -246.18 Receive Inventory from Manufacturing 3491 t WO f jsmith f 8280 f 2006-07-05 13:47:13.863-04 2006-07-05 4170 86 W/O 50152-1 3111 -25.00 Material Issue to Work Order 3492 t WO f jsmith f 8279 f 2006-07-05 13:47:13.863-04 2006-07-05 4170 85 W/O 50152-1 3111 25.00 Material Issue to Work Order 3492 t WO f jsmith f 8282 f 2006-07-05 13:47:13.863-04 2006-07-05 4171 86 W/O 50152-1 3112 -0.70 Material Issue to Work Order 3493 t WO f jsmith f 8281 f 2006-07-05 13:47:13.863-04 2006-07-05 4171 85 W/O 50152-1 3112 0.70 Material Issue to Work Order 3493 t WO f jsmith f 8284 f 2006-07-05 13:47:13.863-04 2006-07-05 4172 86 W/O 50152-1 3113 -100.00 Material Issue to Work Order 3494 t WO f jsmith f 8283 f 2006-07-05 13:47:13.863-04 2006-07-05 4172 85 W/O 50152-1 3113 100.00 Material Issue to Work Order 3494 t WO f jsmith f 8286 f 2006-07-05 13:47:13.863-04 2006-07-05 4173 86 W/O 50152-1 3114 -86.60 Material Issue to Work Order 3495 t WO f jsmith f 8285 f 2006-07-05 13:47:13.863-04 2006-07-05 4173 85 W/O 50152-1 3114 86.60 Material Issue to Work Order 3495 t WO f jsmith f 8288 f 2006-07-05 13:47:13.863-04 2006-07-05 4174 86 W/O 50152-1 -1 -1.10 Post Setup Time to Work Order 3496 t WO f jsmith f 8287 f 2006-07-05 13:47:13.863-04 2006-07-05 4174 94 W/O 50152-1 -1 1.10 Post Setup Time to Work Order 3496 t WO f jsmith f 8290 f 2006-07-05 13:47:13.863-04 2006-07-05 4175 86 W/O 50152-1 -1 -11.00 Post Run Time to Work Order 3497 t WO f jsmith f 8289 f 2006-07-05 13:47:13.863-04 2006-07-05 4175 94 W/O 50152-1 -1 11.00 Post Run Time to Work Order 3497 t WO f jsmith f 8292 f 2006-07-05 13:47:13.863-04 2006-07-05 4176 86 W/O 50152-1 -1 -1.10 Post Setup Time to Work Order 3498 t WO f jsmith f 8291 f 2006-07-05 13:47:13.863-04 2006-07-05 4176 94 W/O 50152-1 -1 1.10 Post Setup Time to Work Order 3498 t WO f jsmith f 8294 f 2006-07-05 13:47:13.863-04 2006-07-05 4177 86 W/O 50152-1 -1 -11.00 Post Run Time to Work Order 3499 t WO f jsmith f 8293 f 2006-07-05 13:47:13.863-04 2006-07-05 4177 94 W/O 50152-1 -1 11.00 Post Run Time to Work Order 3499 t WO f jsmith f 8296 f 2006-07-05 13:47:13.863-04 2006-07-05 4178 86 W/O 50152-1 -1 -0.88 Post Setup Time to Work Order 3500 t WO f jsmith f 8295 f 2006-07-05 13:47:13.863-04 2006-07-05 4178 94 W/O 50152-1 -1 0.88 Post Setup Time to Work Order 3500 t WO f jsmith f 8298 f 2006-07-05 13:47:13.863-04 2006-07-05 4179 86 W/O 50152-1 -1 -8.80 Post Run Time to Work Order 3501 t WO f jsmith f 8297 f 2006-07-05 13:47:13.863-04 2006-07-05 4179 94 W/O 50152-1 -1 8.80 Post Run Time to Work Order 3501 t WO f jsmith f 8300 f 2006-07-05 14:05:26.567-04 2006-07-05 4180 96 S/R 50152-1 3115 -246.18 Issue to Shipping 3504 t SO f jsmith f 8299 f 2006-07-05 14:05:26.567-04 2006-07-05 4180 85 S/R 50152-1 3115 246.18 Issue to Shipping 3504 t SO f jsmith f 8302 f 2006-07-05 14:08:07.02-04 2006-07-05 4181 108 S/R 50152 -1 -246.18 Ship Shipment 3505 t SO f jsmith f 8301 f 2006-07-05 14:08:07.02-04 2006-07-05 4181 96 S/R 50152 -1 246.18 Ship Shipment 3505 t SO f jsmith f 8304 f 2006-07-05 14:26:25.551-04 2006-07-05 4182 122 A/R 60026 \N 37.00 3506 t IN f jsmith f 8306 f 2006-07-05 14:26:25.551-04 2006-07-05 4182 106 A/R 60026 \N -1034.50 3506 t IN f jsmith f 8305 f 2006-07-05 14:26:25.551-04 2006-07-05 4182 121 A/R 60026 \N 47.50 3506 t IN f jsmith f 8303 f 2006-07-05 14:26:25.551-04 2006-07-05 4182 103 A/R 60026 \N 950.00 3506 t IN f jsmith f 8308 f 2006-07-05 14:34:31.035-04 2006-07-05 4183 109 A/R C-13201 \N -1034.50 TTOYS-Tremendous Toys Incorporated 3507 t CR t jsmith f 8307 f 2006-07-05 14:34:31.035-04 2006-07-05 4183 106 A/R I-60026 \N 1034.50 TTOYS-Tremendous Toys Incorporated 3507 t CR f jsmith f 8315 f 2006-08-30 16:40:47.159-04 2006-08-29 4185 108 G/L Ship Order \N -150000.00 3509 t ST f jsmith f 8316 f 2006-08-30 16:40:47.159-04 2006-08-29 4185 109 G/L Ship Order \N -500000.00 3509 t ST t jsmith f 8313 f 2006-08-30 16:40:47.159-04 2006-08-29 4185 85 G/L Ship Order \N 150000.00 3509 t ST f jsmith f 8314 f 2006-08-30 16:40:47.159-04 2006-08-29 4185 103 G/L Ship Order \N 500000.00 3509 t ST f jsmith f 8319 f 2006-08-30 16:44:54.941-04 2006-08-30 4188 91 I/M \N 3116 94.00 \N 3511 t CT f jsmith f 8321 f 2006-08-31 08:24:13.628-04 2006-08-31 4189 97 A/P 3016 116 -2488.78 PPI-Packaging Pros Inc. 3512 t CK f jsmith f 8322 f 2006-08-31 08:24:13.628-04 2006-08-31 4189 109 A/P 3016 116 2488.78 PPI-Packaging Pros Inc. 3512 t CK t jsmith f 8324 f 2006-08-31 08:32:28.597-04 2006-08-31 4190 106 A/R 60027 \N -3500.00 3513 t IN f jsmith f 8323 f 2006-08-31 08:32:28.597-04 2006-08-31 4190 103 A/R 60027 \N 3500.00 3513 t IN f jsmith f 8325 f 2006-08-31 08:32:55.753-04 2006-08-31 4191 109 A/R C-12311 \N -3500.00 TTOYS-Tremendous Toys Incorporated 3514 t CR t jsmith f 8326 f 2006-08-31 08:32:55.753-04 2006-08-31 4191 106 A/R I-60027 \N 3500.00 TTOYS-Tremendous Toys Incorporated 3514 t CR f jsmith f 8331 f 2006-10-09 08:41:27.546-04 2006-10-09 4193 109 G/L INV-001 -1 50000.00 Receive Inv 3516 t JE t mfgadmin f 8332 f 2006-10-09 08:41:27.546-04 2006-10-09 4193 85 G/L INV-001 -1 -50000.00 Receive Inv 3516 t JE f mfgadmin f 8333 f 2006-10-09 08:42:10.343-04 2006-10-09 4194 109 G/L INV-001 -1 150000.00 Receive Inv. 3517 t JE t mfgadmin f 8334 f 2006-10-09 08:42:10.343-04 2006-10-09 4194 85 G/L INV-001 -1 -150000.00 Receive Inv. 3517 t JE f mfgadmin f 8338 f 2006-10-09 08:43:13.828-04 2006-10-09 4195 108 G/L Ship Order \N -15000.00 3518 t ST f mfgadmin f 8335 f 2006-10-09 08:43:13.828-04 2006-10-09 4195 109 G/L Ship Order \N -50000.00 3518 t ST t mfgadmin f 8337 f 2006-10-09 08:43:13.828-04 2006-10-09 4195 85 G/L Ship Order \N 15000.00 3518 t ST f mfgadmin f 8336 f 2006-10-09 08:43:13.828-04 2006-10-09 4195 103 G/L Ship Order \N 50000.00 3518 t ST f mfgadmin f 8341 f 2006-10-09 08:43:21.109-04 2006-10-09 4196 85 G/L Ship Order \N 15000.00 3519 t ST f mfgadmin f 8340 f 2006-10-09 08:43:21.109-04 2006-10-09 4196 103 G/L Ship Order \N 50000.00 3519 t ST f mfgadmin f 8351 f 2006-10-11 10:47:15.738-04 2006-10-11 4200 101 A/P 30021 \N 2.57 Discount for V 30021 3524 t CM f jsmith f 8350 f 2006-10-11 10:47:15.738-04 2006-10-11 4200 99 A/P 30021 \N -2.57 Discount for V 30021 3524 t CM f jsmith f 8353 f 2006-10-11 10:48:29.847-04 2006-10-11 4201 109 A/P 5000 117 125.93 XPPI-Packaging Pros LTD 3526 t CK t jsmith f 8352 f 2006-10-11 10:48:29.847-04 2006-10-11 4201 99 A/P 5000 117 -125.93 XPPI-Packaging Pros LTD 3526 t CK f jsmith f 8355 f 2006-10-11 10:58:09.472-04 2006-10-11 4202 126 G/L \N -25000.00 Open Deposit 3527 t JE t jsmith f 8356 f 2006-10-11 10:58:09.472-04 2006-10-11 4202 127 G/L \N -25000.00 Open Deposit 3527 t JE t jsmith f 8357 f 2006-10-13 14:51:22.05-04 2006-10-13 4204 91 I/M Reset-001 3119 -270.80 Miscellaneous Adjustment\n 3528 t f jsmith f 8358 f 2006-10-13 14:51:22.05-04 2006-10-13 4204 85 I/M Reset-001 3119 270.80 Miscellaneous Adjustment\n 3528 t f jsmith f 8359 f 2006-10-13 14:55:52.613-04 2006-10-13 4205 87 P/D Post Cost 299 41671.17 Post Actual Cost to Standard for item TWHEEL1 3530 t f jsmith f 8360 f 2006-10-13 14:55:52.613-04 2006-10-13 4205 85 P/D Post Cost 299 -41671.17 Post Actual Cost to Standard for item TWHEEL1 3530 t f jsmith f 8361 f 2006-10-13 15:29:36.972-04 2006-10-13 4206 95 S/R 20026 3120 25.00 Receive Inventory from P/O 3534 t PO f jsmith f 8362 f 2006-10-13 15:29:36.972-04 2006-10-13 4206 85 S/R 20026 3120 -25.00 Receive Inventory from P/O 3534 t PO f jsmith f 8365 f 2006-10-13 15:30:35.066-04 2006-10-13 4207 99 A/P 30022 \N 33.00 RF-001 3536 t VO f jsmith f 8363 f 2006-10-13 15:30:35.066-04 2006-10-13 4207 95 A/P 30022 \N -25.00 RF-001 3536 t VO f jsmith f 8367 f 2006-10-13 15:31:01.738-04 2006-10-13 4208 101 A/P 30022 \N 0.66 Discount for V 30022 3537 t CM f jsmith f 8366 f 2006-10-13 15:31:01.738-04 2006-10-13 4208 99 A/P 30022 \N -0.66 Discount for V 30022 3537 t CM f jsmith f 8369 f 2006-10-13 15:32:01.035-04 2006-10-13 4209 109 A/P 3017 118 32.34 TPARTS-Toy Parts Inc. 3539 t CK t jsmith f 8368 f 2006-10-13 15:32:01.035-04 2006-10-13 4209 99 A/P 3017 118 -32.34 TPARTS-Toy Parts Inc. 3539 t CK f jsmith f 8371 f 2006-10-13 15:33:17.816-04 2006-10-13 4210 86 W/O 10020-1 3121 -27.50 Material Issue to Work Order 3540 t WO f jsmith f 8370 f 2006-10-13 15:33:17.816-04 2006-10-13 4210 85 W/O 10020-1 3121 27.50 Material Issue to Work Order 3540 t WO f jsmith f 8373 f 2006-10-13 15:33:17.816-04 2006-10-13 4211 86 W/O 10020-1 3122 -25.00 Material Issue to Work Order 3541 t WO f jsmith f 8372 f 2006-10-13 15:33:17.816-04 2006-10-13 4211 85 W/O 10020-1 3122 25.00 Material Issue to Work Order 3541 t WO f jsmith f 8374 f 2006-10-13 15:33:17.816-04 2006-10-13 4212 86 W/O 10020-1 3123 64.60 Receive Inventory from Manufacturing 3542 t WO f jsmith f 8375 f 2006-10-13 15:33:17.816-04 2006-10-13 4212 85 W/O 10020-1 3123 -64.60 Receive Inventory from Manufacturing 3542 t WO f jsmith f 8377 f 2006-10-13 15:33:17.816-04 2006-10-13 4213 86 W/O 10020-1 -1 -1.47 Post Setup Time to Work Order 3543 t WO f jsmith f 8376 f 2006-10-13 15:33:17.816-04 2006-10-13 4213 94 W/O 10020-1 -1 1.47 Post Setup Time to Work Order 3543 t WO f jsmith f 8379 f 2006-10-13 15:33:17.816-04 2006-10-13 4214 86 W/O 10020-1 -1 -10.08 Post Run Time to Work Order 3544 t WO f jsmith f 8378 f 2006-10-13 15:33:17.816-04 2006-10-13 4214 94 W/O 10020-1 -1 10.08 Post Run Time to Work Order 3544 t WO f jsmith f 8380 f 2006-10-13 15:33:31.191-04 2006-10-13 4215 86 W/O 10020-1 -1 -0.55 Manufacturing Inventory Cost Variance 3545 t WO f jsmith f 8381 f 2006-10-13 15:33:31.191-04 2006-10-13 4215 87 W/O 10020-1 -1 0.55 Manufacturing Inventory Cost Variance 3545 t WO f jsmith f 8382 f 2006-10-13 15:35:24.378-04 2006-10-13 4216 86 W/O 50155-1 3124 638.18 Receive Inventory from Manufacturing 3547 t WO f jsmith f 8383 f 2006-10-13 15:35:24.378-04 2006-10-13 4216 85 W/O 50155-1 3124 -638.18 Receive Inventory from Manufacturing 3547 t WO f jsmith f 8385 f 2006-10-13 15:35:24.378-04 2006-10-13 4217 86 W/O 50155-1 3125 -514.00 Material Issue to Work Order 3548 t WO f jsmith f 8384 f 2006-10-13 15:35:24.378-04 2006-10-13 4217 85 W/O 50155-1 3125 514.00 Material Issue to Work Order 3548 t WO f jsmith f 8387 f 2006-10-13 15:35:24.378-04 2006-10-13 4218 86 W/O 50155-1 3126 -64.60 Material Issue to Work Order 3549 t WO f jsmith f 8386 f 2006-10-13 15:35:24.378-04 2006-10-13 4218 85 W/O 50155-1 3126 64.60 Material Issue to Work Order 3549 t WO f jsmith f 8389 f 2006-10-13 15:35:24.378-04 2006-10-13 4219 86 W/O 50155-1 3127 -25.00 Material Issue to Work Order 3550 t WO f jsmith f 8388 f 2006-10-13 15:35:24.378-04 2006-10-13 4219 85 W/O 50155-1 3127 25.00 Material Issue to Work Order 3550 t WO f jsmith f 8391 f 2006-10-13 15:35:24.378-04 2006-10-13 4220 86 W/O 50155-1 3128 -0.70 Material Issue to Work Order 3551 t WO f jsmith f 8390 f 2006-10-13 15:35:24.378-04 2006-10-13 4220 85 W/O 50155-1 3128 0.70 Material Issue to Work Order 3551 t WO f jsmith f 8413 f 2006-10-13 15:59:46.191-04 2006-10-13 4230 109 A/R C-321112 \N -1042.50 TTOYS-Tremendous Toys Incorporated 3563 t CR t jsmith f 8420 f 2006-10-30 14:51:37.887-05 2006-10-30 4234 91 I/M STS-500 3140 -210.00 Miscellaneous Adjustment\n 3567 t f jsmith f 8422 f 2006-10-30 14:52:19.73-05 2006-10-30 4235 91 I/M STS-900 3141 -693.84 Miscellaneous Adjustment\n 3568 t f jsmith f 8423 f 2006-10-30 14:52:19.73-05 2006-10-30 4235 85 I/M STS-900 3141 693.84 Miscellaneous Adjustment\n 3568 t f jsmith f 8424 f 2006-10-30 14:52:53.996-05 2006-10-30 4236 91 I/M STS-9001 3142 -693.84 Miscellaneous Adjustment\n 3569 t f jsmith f 8425 f 2006-10-30 14:52:53.996-05 2006-10-30 4236 85 I/M STS-9001 3142 693.84 Miscellaneous Adjustment\n 3569 t f jsmith f 8428 f 2006-11-17 15:02:24.468-05 2006-10-18 4238 97 G/L -1 100.00 Special Posting 3571 t JE f jsmith f 8429 f 2006-11-17 15:02:24.468-05 2006-10-18 4238 109 G/L -1 -100.00 Special Posting 3571 t JE t jsmith f 8449 f 2006-12-27 13:36:59.812-05 2006-10-28 4248 113 G/L MA-CASH2 -1 200000.00 Sell Stock 3581 t JE f mfgadmin f 8450 f 2006-12-27 13:36:59.812-05 2006-10-28 4248 109 G/L MA-CASH2 -1 -200000.00 Sell Stock 3581 t JE t mfgadmin f 8447 f 2006-12-27 13:34:13.703-05 2006-11-15 4247 126 G/L MA-CASH-1 -1 200000.00 Sell Stock 3580 t JE t mfgadmin f 8451 f 2006-12-27 13:39:06.281-05 2006-11-15 4249 126 G/L CASH-2 -1 200000.00 Sell Stock 3582 t JE t mfgadmin f 8454 f 2006-12-27 13:43:11-05 2006-11-15 4250 126 G/L FIX -1 -400000.00 Fix 3583 t JE t mfgadmin f 8446 f 2006-12-05 18:52:52.703-05 2006-12-05 4246 99 A/P 30024 \N 5423.00 MDA-001 3579 t VO f mfgadmin f 8462 f 2006-12-27 13:44:41.515-05 2006-12-02 4252 108 G/L Ship Order \N -15000.00 3585 t ST f mfgadmin f 8461 f 2006-12-27 13:44:41.515-05 2006-12-02 4252 85 G/L Ship Order \N 15000.00 3585 t ST f mfgadmin f 8460 f 2006-12-27 13:44:41.515-05 2006-12-02 4252 103 G/L Ship Order \N 50000.00 3585 t ST f mfgadmin f 8466 f 2006-12-27 13:44:59.093-05 2006-12-04 4253 108 G/L Ship Order \N -15000.00 3586 t ST f mfgadmin f 8465 f 2006-12-27 13:44:59.093-05 2006-12-04 4253 85 G/L Ship Order \N 15000.00 3586 t ST f mfgadmin f 8464 f 2006-12-27 13:44:59.093-05 2006-12-04 4253 103 G/L Ship Order \N 50000.00 3586 t ST f mfgadmin f 8467 f 2006-12-28 11:19:38.812-05 2006-12-28 4254 95 S/R 20028 3146 25.00 Receive Inventory from P/O 3587 t PO f mfgadmin f 8468 f 2006-12-28 11:19:38.812-05 2006-12-28 4254 85 S/R 20028 3146 -25.00 Receive Inventory from P/O 3587 t PO f mfgadmin f 8469 f 2006-12-28 11:19:50.687-05 2006-12-28 4255 95 S/R 20029 3147 514.00 Receive Inventory from P/O 3589 t PO f mfgadmin f 8470 f 2006-12-28 11:19:50.687-05 2006-12-28 4255 85 S/R 20029 3147 -514.00 Receive Inventory from P/O 3589 t PO f mfgadmin f 8472 f 2006-12-28 11:23:35.312-05 2006-12-28 4256 90 A/P 30025 \N -75.00 RE-11231 3591 t VO f mfgadmin f 9893 f 2008-06-18 16:03:56.39774-04 2008-06-18 4936 103 A/R 60060 \N 3105.00 4629 t IN f jsmith f 8473 f 2006-12-28 11:23:35.312-05 2006-12-28 4256 99 A/P 30025 \N 100.00 RE-11231 3591 t VO f mfgadmin f 8471 f 2006-12-28 11:23:35.312-05 2006-12-28 4256 95 A/P 30025 \N -25.00 RE-11231 3591 t VO f mfgadmin f 8475 f 2006-12-28 11:23:39.39-05 2006-12-28 4257 90 A/P 30026 \N 385.50 REF-986 3592 t VO f mfgadmin f 8476 f 2006-12-28 11:23:39.39-05 2006-12-28 4257 99 A/P 30026 \N 128.50 REF-986 3592 t VO f mfgadmin f 8474 f 2006-12-28 11:23:39.39-05 2006-12-28 4257 95 A/P 30026 \N -514.00 REF-986 3592 t VO f mfgadmin f 8477 f 2006-12-28 11:35:54.25-05 2006-12-28 4258 99 A/P 5001 122 -128.50 XPPI-Packaging Pros LTD 3593 t CK f mfgadmin f 8479 f 2006-12-28 11:36:18.937-05 2006-12-28 4259 99 A/P 3020 121 -100.00 TPARTS-Toy Parts Inc. 3594 t CK f mfgadmin f 8482 f 2006-12-28 11:36:22.359-05 2006-12-05 4260 109 A/P 3019 120 8840.00 TPARTS-Toy Parts Inc. 3595 t CK t mfgadmin f 8481 f 2006-12-28 11:36:22.359-05 2006-12-05 4260 99 A/P 3019 120 -8840.00 TPARTS-Toy Parts Inc. 3595 t CK f mfgadmin f 8484 f 2006-12-28 11:41:11.5-05 2006-12-28 4261 86 W/O 50158-1 3148 -0.70 Material Issue to Work Order 3596 t WO f mfgadmin f 8483 f 2006-12-28 11:41:11.5-05 2006-12-28 4261 85 W/O 50158-1 3148 0.70 Material Issue to Work Order 3596 t WO f mfgadmin f 8486 f 2006-12-28 11:41:29.484-05 2006-12-28 4262 86 W/O 50158-1 3149 -25.00 Material Issue to Work Order 3597 t WO f mfgadmin f 8485 f 2006-12-28 11:41:29.484-05 2006-12-28 4262 85 W/O 50158-1 3149 25.00 Material Issue to Work Order 3597 t WO f mfgadmin f 8488 f 2006-12-28 11:41:33.781-05 2006-12-28 4263 86 W/O 50158-1 3150 -514.00 Material Issue to Work Order 3598 t WO f mfgadmin f 8487 f 2006-12-28 11:41:33.781-05 2006-12-28 4263 85 W/O 50158-1 3150 514.00 Material Issue to Work Order 3598 t WO f mfgadmin f 8490 f 2006-12-28 11:41:44.859-05 2006-12-28 4264 86 W/O 50158-1 3151 -64.60 Material Issue to Work Order 3599 t WO f mfgadmin f 8489 f 2006-12-28 11:41:44.859-05 2006-12-28 4264 85 W/O 50158-1 3151 64.60 Material Issue to Work Order 3599 t WO f mfgadmin f 8492 f 2006-12-28 11:43:07.156-05 2006-12-28 4265 86 W/O 50158-1 -1 -0.03 Post Run Time to Work Order 3601 t WO f mfgadmin f 8491 f 2006-12-28 11:43:07.156-05 2006-12-28 4265 94 W/O 50158-1 -1 0.03 Post Run Time to Work Order 3601 t WO f mfgadmin f 8493 f 2006-12-28 11:43:32.171-05 2006-12-28 4266 86 W/O 10022-1 3152 64.60 Receive Inventory from Manufacturing 3602 t WO f mfgadmin f 8494 f 2006-12-28 11:43:32.171-05 2006-12-28 4266 85 W/O 10022-1 3152 -64.60 Receive Inventory from Manufacturing 3602 t WO f mfgadmin f 8495 f 2006-12-28 11:43:32.171-05 2006-12-28 4267 85 W/O 10022-1 3153 27.50 Material Issue to Work Order 3603 t WO f mfgadmin f 8499 f 2006-12-28 11:43:32.171-05 2006-12-28 4269 94 W/O 10022-1 -1 1.10 Post Setup Time to Work Order 3605 t WO f mfgadmin f 8502 f 2006-12-28 11:43:32.171-05 2006-12-28 4270 86 W/O 10022-1 -1 -11.00 Post Run Time to Work Order 3606 t WO f mfgadmin f 8501 f 2006-12-28 11:43:32.171-05 2006-12-28 4270 94 W/O 10022-1 -1 11.00 Post Run Time to Work Order 3606 t WO f mfgadmin f 8504 f 2006-12-28 11:43:57.343-05 2006-12-28 4271 86 W/O 50158-1 -1 -2.20 Post Setup Time to Work Order 3609 t WO f mfgadmin f 8503 f 2006-12-28 11:43:57.343-05 2006-12-28 4271 94 W/O 50158-1 -1 2.20 Post Setup Time to Work Order 3609 t WO f mfgadmin f 8506 f 2006-12-28 11:43:57.343-05 2006-12-28 4272 86 W/O 50158-1 -1 -5.50 Post Run Time to Work Order 3610 t WO f mfgadmin f 8505 f 2006-12-28 11:43:57.343-05 2006-12-28 4272 94 W/O 50158-1 -1 5.50 Post Run Time to Work Order 3610 t WO f mfgadmin f 8507 f 2006-12-28 11:44:03.578-05 2006-12-28 4273 86 W/O 50158-1 3155 638.18 Receive Inventory from Manufacturing 3611 t WO f mfgadmin f 8508 f 2006-12-28 11:44:03.578-05 2006-12-28 4273 85 W/O 50158-1 3155 -638.18 Receive Inventory from Manufacturing 3611 t WO f mfgadmin f 8510 f 2006-12-28 11:44:03.578-05 2006-12-28 4274 86 W/O 50158-1 -1 -0.44 Post Setup Time to Work Order 3612 t WO f mfgadmin f 8509 f 2006-12-28 11:44:03.578-05 2006-12-28 4274 94 W/O 50158-1 -1 0.44 Post Setup Time to Work Order 3612 t WO f mfgadmin f 8512 f 2006-12-28 11:44:03.578-05 2006-12-28 4275 86 W/O 50158-1 -1 -2.20 Post Run Time to Work Order 3613 t WO f mfgadmin f 8511 f 2006-12-28 11:44:03.578-05 2006-12-28 4275 94 W/O 50158-1 -1 2.20 Post Run Time to Work Order 3613 t WO f mfgadmin f 8513 f 2006-12-28 11:44:36-05 2006-12-28 4276 86 W/O 50158-1 -1 -23.51 Manufacturing Inventory Cost Variance 3614 t WO f mfgadmin f 8514 f 2006-12-28 11:44:36-05 2006-12-28 4276 87 W/O 50158-1 -1 23.51 Manufacturing Inventory Cost Variance 3614 t WO f mfgadmin f 8516 f 2006-12-28 11:45:16.421-05 2006-12-28 4277 96 S/R 50158-1 3156 -638.18 Issue to Shipping 3616 t SO f mfgadmin f 8515 f 2006-12-28 11:45:16.421-05 2006-12-28 4277 85 S/R 50158-1 3156 638.18 Issue to Shipping 3616 t SO f mfgadmin f 8518 f 2006-12-28 11:52:01.39-05 2006-12-28 4278 108 S/R 50158 -1 -638.18 Ship Shipment 3617 t SO f mfgadmin f 8517 f 2006-12-28 11:52:01.39-05 2006-12-28 4278 96 S/R 50158 -1 638.18 Ship Shipment 3617 t SO f mfgadmin f 8519 f 2006-12-28 11:52:14.546-05 2006-12-28 4279 122 A/R 60030 \N 32.00 3618 t IN f mfgadmin f 8520 f 2006-12-28 11:52:14.546-05 2006-12-28 4279 106 A/R 60030 \N -1029.50 3618 t IN f mfgadmin f 8522 f 2006-12-28 11:52:14.546-05 2006-12-28 4279 121 A/R 60030 \N 47.50 3618 t IN f mfgadmin f 8523 f 2006-12-28 14:02:55.343-05 2006-12-28 4280 91 I/M \N 3157 25.00 \N 3619 t CT f mfgadmin f 8524 f 2006-12-28 14:02:55.343-05 2006-12-28 4280 85 I/M \N 3157 -25.00 \N 3619 t CT f mfgadmin f 8525 f 2006-12-28 14:03:15.531-05 2006-12-28 4281 91 I/M \N 3158 27.50 \N 3620 t CT f mfgadmin f 8526 f 2006-12-28 14:03:15.531-05 2006-12-28 4281 85 I/M \N 3158 -27.50 \N 3620 t CT f mfgadmin f 8527 f 2006-12-28 14:04:40.921-05 2006-12-28 4282 91 I/M MDA-ADJ-1 3159 0.70 Miscellaneous Adjustment\nADJ 3621 t f mfgadmin f 8528 f 2006-12-28 14:04:40.921-05 2006-12-28 4282 85 I/M MDA-ADJ-1 3159 -0.70 Miscellaneous Adjustment\nADJ 3621 t f mfgadmin f 8563 f 2007-01-09 16:07:28.433-05 2007-01-09 4295 86 W/O Misc. 3163 638.18 Receive from Misc. Production for Item Number YTRUCK1\n 3635 t WO f mfgadmin f 8564 f 2007-01-09 16:07:28.433-05 2007-01-09 4295 85 W/O Misc. 3163 -638.18 Receive from Misc. Production for Item Number YTRUCK1\n 3635 t WO f mfgadmin f 8566 f 2007-01-09 16:07:28.433-05 2007-01-09 4296 86 W/O Misc. 3164 -25.00 Consumed during Misc. Production of Item Number YTRUCK1\n 3636 t WO f mfgadmin f 8565 f 2007-01-09 16:07:28.433-05 2007-01-09 4296 85 W/O Misc. 3164 25.00 Consumed during Misc. Production of Item Number YTRUCK1\n 3636 t WO f mfgadmin f 8568 f 2007-01-09 16:07:28.433-05 2007-01-09 4297 86 W/O Misc. 3165 -0.70 Consumed during Misc. Production of Item Number YTRUCK1\n 3637 t WO f mfgadmin f 8567 f 2007-01-09 16:07:28.433-05 2007-01-09 4297 85 W/O Misc. 3165 0.70 Consumed during Misc. Production of Item Number YTRUCK1\n 3637 t WO f mfgadmin f 8570 f 2007-01-09 16:07:28.433-05 2007-01-09 4298 86 W/O Misc. 3166 -514.00 Consumed during Misc. Production of Item Number YTRUCK1\n 3638 t WO f mfgadmin f 8569 f 2007-01-09 16:07:28.433-05 2007-01-09 4298 85 W/O Misc. 3166 514.00 Consumed during Misc. Production of Item Number YTRUCK1\n 3638 t WO f mfgadmin f 8572 f 2007-01-09 16:07:28.433-05 2007-01-09 4299 86 W/O Misc. 3167 -64.60 Consumed during Misc. Production of Item Number YTRUCK1\n 3639 t WO f mfgadmin f 8571 f 2007-01-09 16:07:28.433-05 2007-01-09 4299 85 W/O Misc. 3167 64.60 Consumed during Misc. Production of Item Number YTRUCK1\n 3639 t WO f mfgadmin f 8574 f 2007-01-09 16:07:28.433-05 2007-01-09 4300 86 W/O Misc. 3163 -33.88 Cost Variance of Post to Misc. Production for Item Number YTRUCK1 3640 t WO f mfgadmin f 8573 f 2007-01-09 16:07:28.433-05 2007-01-09 4300 87 W/O Misc. 3163 33.88 Cost Variance of Post to Misc. Production for Item Number YTRUCK1 3640 t WO f mfgadmin f 9592 f 2008-04-04 08:30:04.953274-04 2007-01-01 4790 96 G/L MDA -1 -2000.00 Adjust For Shipping 4228 t JE f mfgadmin f 9591 f 2008-04-04 08:30:04.953274-04 2007-01-01 4790 85 G/L MDA -1 2000.00 Adjust For Shipping 4228 t JE f mfgadmin f 8593 f 2007-02-20 08:34:45.673-05 2007-02-20 4310 86 W/O 10024-1 3172 64.60 Receive Inventory from Manufacturing 3652 t WO f mfgadmin f 8594 f 2007-02-20 08:34:45.673-05 2007-02-20 4310 85 W/O 10024-1 3172 -64.60 Receive Inventory from Manufacturing 3652 t WO f mfgadmin f 8596 f 2007-02-20 08:34:45.673-05 2007-02-20 4311 86 W/O 10024-1 3173 -27.50 Material Issue to Work Order 3653 t WO f mfgadmin f 8595 f 2007-02-20 08:34:45.673-05 2007-02-20 4311 85 W/O 10024-1 3173 27.50 Material Issue to Work Order 3653 t WO f mfgadmin f 8598 f 2007-02-20 08:34:45.673-05 2007-02-20 4312 86 W/O 10024-1 3174 -25.00 Material Issue to Work Order 3654 t WO f mfgadmin f 8597 f 2007-02-20 08:34:45.673-05 2007-02-20 4312 85 W/O 10024-1 3174 25.00 Material Issue to Work Order 3654 t WO f mfgadmin f 8600 f 2007-02-20 08:34:45.673-05 2007-02-20 4313 86 W/O 10024-1 -1 -1.10 Post Setup Time to Work Order 3655 t WO f mfgadmin f 8599 f 2007-02-20 08:34:45.673-05 2007-02-20 4313 94 W/O 10024-1 -1 1.10 Post Setup Time to Work Order 3655 t WO f mfgadmin f 8602 f 2007-02-20 08:34:45.673-05 2007-02-20 4314 86 W/O 10024-1 -1 -11.00 Post Run Time to Work Order 3656 t WO f mfgadmin f 8601 f 2007-02-20 08:34:45.673-05 2007-02-20 4314 94 W/O 10024-1 -1 11.00 Post Run Time to Work Order 3656 t WO f mfgadmin f 8603 f 2007-02-20 08:34:53.094-05 2007-02-20 4315 86 W/O 50160-1 3175 638.18 Receive Inventory from Manufacturing 3657 t WO f mfgadmin f 8604 f 2007-02-20 08:34:53.094-05 2007-02-20 4315 85 W/O 50160-1 3175 -638.18 Receive Inventory from Manufacturing 3657 t WO f mfgadmin f 8606 f 2007-02-20 08:34:53.094-05 2007-02-20 4316 86 W/O 50160-1 3176 -25.00 Material Issue to Work Order 3658 t WO f mfgadmin f 8605 f 2007-02-20 08:34:53.094-05 2007-02-20 4316 85 W/O 50160-1 3176 25.00 Material Issue to Work Order 3658 t WO f mfgadmin f 8608 f 2007-02-20 08:34:53.094-05 2007-02-20 4317 86 W/O 50160-1 3177 -0.70 Material Issue to Work Order 3659 t WO f mfgadmin f 8607 f 2007-02-20 08:34:53.094-05 2007-02-20 4317 85 W/O 50160-1 3177 0.70 Material Issue to Work Order 3659 t WO f mfgadmin f 8610 f 2007-02-20 08:34:53.094-05 2007-02-20 4318 86 W/O 50160-1 3178 -514.00 Material Issue to Work Order 3660 t WO f mfgadmin f 8609 f 2007-02-20 08:34:53.094-05 2007-02-20 4318 85 W/O 50160-1 3178 514.00 Material Issue to Work Order 3660 t WO f mfgadmin f 8612 f 2007-02-20 08:34:53.094-05 2007-02-20 4319 86 W/O 50160-1 3179 -64.60 Material Issue to Work Order 3661 t WO f mfgadmin f 8611 f 2007-02-20 08:34:53.094-05 2007-02-20 4319 85 W/O 50160-1 3179 64.60 Material Issue to Work Order 3661 t WO f mfgadmin f 8614 f 2007-02-20 08:34:53.094-05 2007-02-20 4320 86 W/O 50160-1 -1 -1.10 Post Setup Time to Work Order 3662 t WO f mfgadmin f 8613 f 2007-02-20 08:34:53.094-05 2007-02-20 4320 94 W/O 50160-1 -1 1.10 Post Setup Time to Work Order 3662 t WO f mfgadmin f 8616 f 2007-02-20 08:34:53.094-05 2007-02-20 4321 86 W/O 50160-1 -1 -22.00 Post Run Time to Work Order 3663 t WO f mfgadmin f 8615 f 2007-02-20 08:34:53.094-05 2007-02-20 4321 94 W/O 50160-1 -1 22.00 Post Run Time to Work Order 3663 t WO f mfgadmin f 8618 f 2007-02-20 08:34:53.094-05 2007-02-20 4322 86 W/O 50160-1 -1 -2.20 Post Setup Time to Work Order 3664 t WO f mfgadmin f 8617 f 2007-02-20 08:34:53.094-05 2007-02-20 4322 94 W/O 50160-1 -1 2.20 Post Setup Time to Work Order 3664 t WO f mfgadmin f 8620 f 2007-02-20 08:34:53.094-05 2007-02-20 4323 86 W/O 50160-1 -1 -5.50 Post Run Time to Work Order 3665 t WO f mfgadmin f 8619 f 2007-02-20 08:34:53.094-05 2007-02-20 4323 94 W/O 50160-1 -1 5.50 Post Run Time to Work Order 3665 t WO f mfgadmin f 8622 f 2007-02-20 08:34:53.094-05 2007-02-20 4324 86 W/O 50160-1 -1 -0.44 Post Setup Time to Work Order 3666 t WO f mfgadmin f 8621 f 2007-02-20 08:34:53.094-05 2007-02-20 4324 94 W/O 50160-1 -1 0.44 Post Setup Time to Work Order 3666 t WO f mfgadmin f 8624 f 2007-02-20 08:34:53.094-05 2007-02-20 4325 86 W/O 50160-1 -1 -2.20 Post Run Time to Work Order 3667 t WO f mfgadmin f 8623 f 2007-02-20 08:34:53.094-05 2007-02-20 4325 94 W/O 50160-1 -1 2.20 Post Run Time to Work Order 3667 t WO f mfgadmin f 8625 f 2007-02-20 08:35:12.407-05 2007-02-20 4326 86 W/O 50160-1 -1 -0.44 Manufacturing Inventory Cost Variance 3672 t WO f mfgadmin f 8626 f 2007-02-20 08:35:12.407-05 2007-02-20 4326 87 W/O 50160-1 -1 0.44 Manufacturing Inventory Cost Variance 3672 t WO f mfgadmin f 8628 f 2007-02-20 08:35:30.485-05 2007-02-20 4327 96 S/R 50160-1 3180 -638.18 Issue to Shipping 3674 t SO f mfgadmin f 8627 f 2007-02-20 08:35:30.485-05 2007-02-20 4327 85 S/R 50160-1 3180 638.18 Issue to Shipping 3674 t SO f mfgadmin f 8630 f 2007-02-20 08:36:07.313-05 2007-02-20 4328 108 S/R 50160 -1 -638.18 Ship Shipment 3675 t SO f mfgadmin f 8629 f 2007-02-20 08:36:07.313-05 2007-02-20 4328 96 S/R 50160 -1 638.18 Ship Shipment 3675 t SO f mfgadmin f 8632 f 2007-02-20 08:36:49.641-05 2007-02-20 4329 122 A/R 60033 \N 102.03 3676 t IN f mfgadmin f 8633 f 2007-02-20 08:36:49.641-05 2007-02-20 4329 106 A/R 60033 \N -1052.04 3676 t IN f mfgadmin f 8631 f 2007-02-20 08:36:49.641-05 2007-02-20 4329 103 A/R 60033 \N 950.01 3676 t IN f mfgadmin f 8637 f 2007-02-20 08:39:40.813-05 2007-02-20 4330 123 A/R Unapplied from C-123111 \N 1236.56 TTOYS-Tremendous Toys Incorporated 3677 t CR f mfgadmin f 8634 f 2007-02-20 08:39:40.813-05 2007-02-20 4331 106 A/R 20012 339 1236.56 Unapplied from C-123111 3678 t CM f mfgadmin f 8635 f 2007-02-20 08:39:40.813-05 2007-02-20 4331 123 A/R 20012 339 -1236.56 Unapplied from C-123111 3678 t CM f mfgadmin f 8639 f 2007-02-20 08:40:28.735-05 2007-02-20 4332 106 A/R I-60033 \N 1052.03 XTRM-Xtreme Toys LTD 3679 t CR f mfgadmin f 8641 f 2007-02-20 08:42:10.673-05 2007-02-20 4333 96 S/R 50161-1 3181 -638.18 Issue to Shipping 3680 t SO f mfgadmin f 8640 f 2007-02-20 08:42:10.673-05 2007-02-20 4333 85 S/R 50161-1 3181 638.18 Issue to Shipping 3680 t SO f mfgadmin f 8645 f 2007-02-20 08:42:41.235-05 2007-02-20 4335 122 A/R 60034 \N 45.00 3682 t IN f mfgadmin f 8647 f 2007-02-20 08:42:41.235-05 2007-02-20 4335 106 A/R 60034 \N -1042.50 3682 t IN f mfgadmin f 8646 f 2007-02-20 08:42:41.235-05 2007-02-20 4335 121 A/R 60034 \N 47.50 3682 t IN f mfgadmin f 8644 f 2007-02-20 08:42:41.235-05 2007-02-20 4335 103 A/R 60034 \N 950.00 3682 t IN f mfgadmin f 8649 f 2007-02-20 08:44:13.673-05 2007-02-20 4336 106 A/R I-60034 \N 1042.50 TTOYS-Tremendous Toys Incorporated 3683 t CR f mfgadmin f 8653 f 2007-02-20 08:46:57.688-05 2007-02-20 4337 108 G/L Ship Order \N -15000.00 3684 t ST f mfgadmin f 8652 f 2007-02-20 08:46:57.688-05 2007-02-20 4337 85 G/L Ship Order \N 15000.00 3684 t ST f mfgadmin f 8651 f 2007-02-20 08:46:57.688-05 2007-02-20 4337 103 G/L Ship Order \N 50000.00 3684 t ST f mfgadmin f 8654 f 2007-02-20 08:55:42.079-05 2007-02-20 4338 97 A/P 3023 125 -3000.00 VOFFP-Office Plus 3685 t CK f mfgadmin f 8655 f 2007-02-20 08:55:42.079-05 2007-02-20 4338 109 A/P 3023 125 3000.00 VOFFP-Office Plus 3685 t CK t mfgadmin f 8656 f 2007-02-20 15:02:56.61-05 2007-02-20 4339 120 A/P 5002 126 -128.50 XPPI-Packaging Pros LTD 3686 t CK f mfgadmin f 8658 f 2007-02-23 13:47:59.031-05 2007-02-23 4340 95 S/R 20031 3182 0.25 Receive Inventory from P/O 3687 t PO f mfgadmin f 8659 f 2007-02-23 13:47:59.031-05 2007-02-23 4340 85 S/R 20031 3182 -0.25 Receive Inventory from P/O 3687 t PO f mfgadmin f 8660 f 2007-02-23 13:49:02.343-05 2007-02-23 4341 95 S/R 20031 3183 1.00 Receive Inventory from P/O 3689 t PO f mfgadmin f 8661 f 2007-02-23 13:49:02.343-05 2007-02-23 4341 85 S/R 20031 3183 -1.00 Receive Inventory from P/O 3689 t PO f mfgadmin f 8662 f 2007-03-12 10:18:17.031-04 2007-03-12 4342 109 G/L Ship Order \N -50000.00 3691 t ST t mfgadmin f 8680 f 2007-04-05 15:32:13.687-04 2007-04-05 4350 94 W/O 10025-1 -1 55.92 Post Run Time to Work Order 3699 t WO f jsmith f 8683 f 2007-04-05 15:32:38.953-04 2007-04-05 4351 86 W/O 10025-1 3188 -646.00 Material Issue to Work Order 3700 t WO f jsmith f 8682 f 2007-04-05 15:32:38.953-04 2007-04-05 4351 85 W/O 10025-1 3188 646.00 Material Issue to Work Order 3700 t WO f jsmith f 8684 f 2007-04-05 15:32:38.953-04 2007-04-05 4352 86 W/O 10025-1 3189 6381.80 Receive Inventory from Manufacturing 3701 t WO f jsmith f 8685 f 2007-04-05 15:32:38.953-04 2007-04-05 4352 85 W/O 10025-1 3189 -6381.80 Receive Inventory from Manufacturing 3701 t WO f jsmith f 8687 f 2007-04-05 15:32:38.953-04 2007-04-05 4353 86 W/O 10025-1 -1 -0.29 Post Setup Time to Work Order 3702 t WO f jsmith f 8686 f 2007-04-05 15:32:38.953-04 2007-04-05 4353 94 W/O 10025-1 -1 0.29 Post Setup Time to Work Order 3702 t WO f jsmith f 8705 f 2007-04-05 15:51:32.593-04 2007-04-05 4361 106 A/R I-60036 \N 35000.00 TTOYS-Tremendous Toys Incorporated 3711 t CR f jsmith f 8706 f 2007-04-05 15:53:55.453-04 2007-04-06 4362 97 A/P 3024 127 -1200.00 VOFFP-Office Plus 3712 t CK f jsmith f 8708 f 2007-04-05 15:54:01.468-04 2007-04-06 4363 120 A/P 3025 128 -500.00 VOFFP-Office Plus 3713 t CK f jsmith f 8720 f 2007-05-30 08:42:03.75-04 2007-05-30 4369 95 S/R 20032 3195 200.00 Receive Inventory from P/O 3723 t PO f mfgadmin f 8721 f 2007-05-30 08:42:03.75-04 2007-05-30 4369 85 S/R 20032 3195 -200.00 Receive Inventory from P/O 3723 t PO f mfgadmin f 8722 f 2007-05-30 08:42:03.75-04 2007-05-30 4370 95 S/R 20032 3196 200.00 Receive Inventory from P/O 3725 t PO f mfgadmin f 8723 f 2007-05-30 08:42:03.75-04 2007-05-30 4370 85 S/R 20032 3196 -200.00 Receive Inventory from P/O 3725 t PO f mfgadmin f 8724 f 2007-05-30 08:42:03.75-04 2007-05-30 4371 95 S/R 20032 3197 200.00 Receive Inventory from P/O 3727 t PO f mfgadmin f 8725 f 2007-05-30 08:42:03.75-04 2007-05-30 4371 85 S/R 20032 3197 -200.00 Receive Inventory from P/O 3727 t PO f mfgadmin f 8726 f 2007-05-30 08:45:51.75-04 2007-05-30 4372 95 S/R 20033 3198 25.00 Receive Inventory from P/O 3729 t PO f mfgadmin f 8727 f 2007-05-30 08:45:51.75-04 2007-05-30 4372 85 S/R 20033 3198 -25.00 Receive Inventory from P/O 3729 t PO f mfgadmin f 8729 f 2007-05-30 08:47:42.218-04 2007-05-30 4373 90 A/P 30029 \N -1.25 2.100101 3731 t VO f mfgadmin f 8730 f 2007-05-30 08:47:42.218-04 2007-05-30 4373 99 A/P 30029 \N 2.50 2.100101 3731 t VO f mfgadmin f 8728 f 2007-05-30 08:47:42.218-04 2007-05-30 4373 95 A/P 30029 \N -1.25 2.100101 3731 t VO f mfgadmin f 8732 f 2007-05-30 08:47:46.078-04 2007-05-30 4374 90 A/P 30030 \N -30.00 2.101001 3732 t VO f mfgadmin f 8733 f 2007-05-30 08:47:46.078-04 2007-05-30 4374 99 A/P 30030 \N 3840.00 2.101001 3732 t VO f mfgadmin f 8731 f 2007-05-30 08:47:46.078-04 2007-05-30 4374 95 A/P 30030 \N -3810.00 2.101001 3732 t VO f mfgadmin f 8735 f 2007-05-30 08:47:48.406-04 2007-05-30 4375 90 A/P 30031 \N 31.00 2.1 3733 t VO f mfgadmin f 8736 f 2007-05-30 08:47:48.406-04 2007-05-30 4375 99 A/P 30031 \N 1.13 2.1 3733 t VO f mfgadmin f 8734 f 2007-05-30 08:47:48.406-04 2007-05-30 4375 95 A/P 30031 \N -32.13 2.1 3733 t VO f mfgadmin f 8737 f 2007-05-30 08:48:02.359-04 2007-05-30 4377 97 A/P 30032 \N -399.00 12311121 3734 t VO f mfgadmin f 8738 f 2007-05-30 08:48:02.359-04 2007-05-30 4377 99 A/P 30032 \N 399.00 12311121 3734 t VO f mfgadmin f 8739 f 2007-05-30 08:56:10.39-04 2007-05-30 4378 99 A/P 3027 130 -399.00 VOFFP-Office Plus 3735 t CK f mfgadmin f 8741 f 2007-05-30 08:56:13.921-04 2007-05-30 4379 99 A/P 3026 129 -3842.50 TPARTS-Toy Parts Inc. 3736 t CK f mfgadmin f 8743 f 2007-05-30 08:57:02.609-04 2007-05-30 4380 99 A/P 5003 131 -1.13 XPPI-Packaging Pros LTD 3737 t CK f mfgadmin f 8745 f 2007-05-30 08:57:50.718-04 2007-05-30 4381 86 W/O 10029-2 3199 266.00 Receive Inventory from Manufacturing 3738 t WO f mfgadmin f 8746 f 2007-05-30 08:57:50.718-04 2007-05-30 4381 85 W/O 10029-2 3199 -266.00 Receive Inventory from Manufacturing 3738 t WO f mfgadmin f 8748 f 2007-05-30 08:57:50.718-04 2007-05-30 4382 86 W/O 10029-2 3200 -200.00 Material Issue to Work Order 3739 t WO f mfgadmin f 8747 f 2007-05-30 08:57:50.718-04 2007-05-30 4382 85 W/O 10029-2 3200 200.00 Material Issue to Work Order 3739 t WO f mfgadmin f 8750 f 2007-05-30 08:57:50.718-04 2007-05-30 4383 86 W/O 10029-2 -1 -29.33 Post Run Time to Work Order 3740 t WO f mfgadmin f 8749 f 2007-05-30 08:57:50.718-04 2007-05-30 4383 94 W/O 10029-2 -1 29.33 Post Run Time to Work Order 3740 t WO f mfgadmin f 8752 f 2007-05-30 08:57:50.718-04 2007-05-30 4384 86 W/O 10029-2 -1 -36.67 Post Run Time to Work Order 3741 t WO f mfgadmin f 8751 f 2007-05-30 08:57:50.718-04 2007-05-30 4384 94 W/O 10029-2 -1 36.67 Post Run Time to Work Order 3741 t WO f mfgadmin f 8754 f 2007-05-30 08:58:12.296-04 2007-05-30 4385 86 W/O 10030-2 3201 -200.00 Material Issue to Work Order 3744 t WO f mfgadmin f 8753 f 2007-05-30 08:58:12.296-04 2007-05-30 4385 85 W/O 10030-2 3201 200.00 Material Issue to Work Order 3744 t WO f mfgadmin f 8756 f 2007-05-30 08:58:12.296-04 2007-05-30 4386 86 W/O 10030-2 -1 -29.33 Post Run Time to Work Order 3746 t WO f mfgadmin f 8755 f 2007-05-30 08:58:12.296-04 2007-05-30 4386 94 W/O 10030-2 -1 29.33 Post Run Time to Work Order 3746 t WO f mfgadmin f 8757 f 2007-05-30 08:58:33.234-04 2007-05-30 4387 86 W/O 10030-2 3202 266.00 Receive Inventory from Manufacturing 3747 t WO f mfgadmin f 8758 f 2007-05-30 08:58:33.234-04 2007-05-30 4387 85 W/O 10030-2 3202 -266.00 Receive Inventory from Manufacturing 3747 t WO f mfgadmin f 8760 f 2007-05-30 08:58:33.234-04 2007-05-30 4388 86 W/O 10030-2 -1 -36.67 Post Run Time to Work Order 3749 t WO f mfgadmin f 8759 f 2007-05-30 08:58:33.234-04 2007-05-30 4388 94 W/O 10030-2 -1 36.67 Post Run Time to Work Order 3749 t WO f mfgadmin f 8761 f 2007-05-30 08:58:56.531-04 2007-05-30 4389 86 W/O 10031-2 3203 266.00 Receive Inventory from Manufacturing 3752 t WO f mfgadmin f 8762 f 2007-05-30 08:58:56.531-04 2007-05-30 4389 85 W/O 10031-2 3203 -266.00 Receive Inventory from Manufacturing 3752 t WO f mfgadmin f 8764 f 2007-05-30 08:58:56.531-04 2007-05-30 4390 86 W/O 10031-2 3204 -200.00 Material Issue to Work Order 3753 t WO f mfgadmin f 8763 f 2007-05-30 08:58:56.531-04 2007-05-30 4390 85 W/O 10031-2 3204 200.00 Material Issue to Work Order 3753 t WO f mfgadmin f 8766 f 2007-05-30 08:58:56.531-04 2007-05-30 4391 86 W/O 10031-2 -1 -29.33 Post Run Time to Work Order 3754 t WO f mfgadmin f 8765 f 2007-05-30 08:58:56.531-04 2007-05-30 4391 94 W/O 10031-2 -1 29.33 Post Run Time to Work Order 3754 t WO f mfgadmin f 8768 f 2007-05-30 08:58:56.531-04 2007-05-30 4392 86 W/O 10031-2 -1 -36.67 Post Run Time to Work Order 3755 t WO f mfgadmin f 8767 f 2007-05-30 08:58:56.531-04 2007-05-30 4392 94 W/O 10031-2 -1 36.67 Post Run Time to Work Order 3755 t WO f mfgadmin f 8769 f 2007-05-30 09:02:02.578-04 2007-05-30 4393 91 I/M \N 3205 175.00 \N 3758 t CT f mfgadmin f 8770 f 2007-05-30 09:02:02.578-04 2007-05-30 4393 85 I/M \N 3205 -175.00 \N 3758 t CT f mfgadmin f 8771 f 2007-05-30 09:02:46.062-04 2007-05-30 4394 91 I/M \N 3206 125.00 \N 3759 t CT f mfgadmin f 8772 f 2007-05-30 09:02:46.062-04 2007-05-30 4394 85 I/M \N 3206 -125.00 \N 3759 t CT f mfgadmin f 8773 f 2007-05-30 09:03:09.265-04 2007-05-30 4395 91 I/M \N 3207 2000.00 \N 3760 t CT f mfgadmin f 8774 f 2007-05-30 09:03:09.265-04 2007-05-30 4395 85 I/M \N 3207 -2000.00 \N 3760 t CT f mfgadmin f 8775 f 2007-05-30 09:03:32.578-04 2007-05-30 4396 86 W/O 10026-1 3208 516.80 Receive Inventory from Manufacturing 3761 t WO f mfgadmin f 8776 f 2007-05-30 09:03:32.578-04 2007-05-30 4396 85 W/O 10026-1 3208 -516.80 Receive Inventory from Manufacturing 3761 t WO f mfgadmin f 8778 f 2007-05-30 09:03:32.578-04 2007-05-30 4397 86 W/O 10026-1 3209 -220.00 Material Issue to Work Order 3762 t WO f mfgadmin f 8777 f 2007-05-30 09:03:32.578-04 2007-05-30 4397 85 W/O 10026-1 3209 220.00 Material Issue to Work Order 3762 t WO f mfgadmin f 8780 f 2007-05-30 09:03:32.578-04 2007-05-30 4398 86 W/O 10026-1 3210 -200.00 Material Issue to Work Order 3763 t WO f mfgadmin f 8779 f 2007-05-30 09:03:32.578-04 2007-05-30 4398 85 W/O 10026-1 3210 200.00 Material Issue to Work Order 3763 t WO f mfgadmin f 8782 f 2007-05-30 09:03:32.578-04 2007-05-30 4399 86 W/O 10026-1 -1 -1.10 Post Setup Time to Work Order 3764 t WO f mfgadmin f 8781 f 2007-05-30 09:03:32.578-04 2007-05-30 4399 94 W/O 10026-1 -1 1.10 Post Setup Time to Work Order 3764 t WO f mfgadmin f 8784 f 2007-05-30 09:03:32.578-04 2007-05-30 4400 86 W/O 10026-1 -1 -88.00 Post Run Time to Work Order 3765 t WO f mfgadmin f 8783 f 2007-05-30 09:03:32.578-04 2007-05-30 4400 94 W/O 10026-1 -1 88.00 Post Run Time to Work Order 3765 t WO f mfgadmin f 8785 f 2007-05-30 09:03:35.718-04 2007-05-30 4401 86 W/O 10026-1 -1 -7.70 Manufacturing Inventory Cost Variance 3766 t WO f mfgadmin f 8786 f 2007-05-30 09:03:35.718-04 2007-05-30 4401 87 W/O 10026-1 -1 7.70 Manufacturing Inventory Cost Variance 3766 t WO f mfgadmin f 8788 f 2007-05-30 09:04:07.625-04 2007-05-30 4402 86 W/O 10027-1 3212 -2500.00 Material Issue to Work Order 3769 t WO f mfgadmin f 8787 f 2007-05-30 09:04:07.625-04 2007-05-30 4402 85 W/O 10027-1 3212 2500.00 Material Issue to Work Order 3769 t WO f mfgadmin f 8790 f 2007-05-30 09:04:07.625-04 2007-05-30 4403 86 W/O 10027-1 -1 -27.50 Post Setup Time to Work Order 3770 t WO f mfgadmin f 8789 f 2007-05-30 09:04:07.625-04 2007-05-30 4403 94 W/O 10027-1 -1 27.50 Post Setup Time to Work Order 3770 t WO f mfgadmin f 8792 f 2007-05-30 09:04:07.625-04 2007-05-30 4404 86 W/O 10027-1 -1 -11.00 Post Run Time to Work Order 3771 t WO f mfgadmin f 8791 f 2007-05-30 09:04:07.625-04 2007-05-30 4404 94 W/O 10027-1 -1 11.00 Post Run Time to Work Order 3771 t WO f mfgadmin f 8793 f 2007-05-30 09:04:26.328-04 2007-05-30 4405 86 W/O 10027-1 3215 937.50 Receive Inventory from Breeder Manufacturing 3774 t WO f mfgadmin f 8794 f 2007-05-30 09:04:26.328-04 2007-05-30 4405 85 W/O 10027-1 3215 -937.50 Receive Inventory from Breeder Manufacturing 3774 t WO f mfgadmin f 8795 f 2007-05-30 09:04:37.156-04 2007-05-30 4406 86 W/O 10027-1 -1 2538.50 Manufacturing Inventory Cost Variance 3776 t WO f mfgadmin f 8796 f 2007-05-30 09:04:37.156-04 2007-05-30 4406 87 W/O 10027-1 -1 -2538.50 Manufacturing Inventory Cost Variance 3776 t WO f mfgadmin f 8797 f 2007-05-30 09:04:37.156-04 2007-05-30 4407 86 W/O 10027-1 -1 -937.50 Breeder Inventory Cost Variance 3777 t WO f mfgadmin f 8798 f 2007-05-30 09:04:37.156-04 2007-05-30 4407 87 W/O 10027-1 -1 937.50 Breeder Inventory Cost Variance 3777 t WO f mfgadmin f 8799 f 2007-05-30 09:04:52.671-04 2007-05-30 4408 86 W/O 10029-1 3217 638.18 Receive Inventory from Manufacturing 3778 t WO f mfgadmin f 8800 f 2007-05-30 09:04:52.671-04 2007-05-30 4408 85 W/O 10029-1 3217 -638.18 Receive Inventory from Manufacturing 3778 t WO f mfgadmin f 8802 f 2007-05-30 09:04:52.671-04 2007-05-30 4409 86 W/O 10029-1 3218 -25.00 Material Issue to Work Order 3779 t WO f mfgadmin f 8801 f 2007-05-30 09:04:52.671-04 2007-05-30 4409 85 W/O 10029-1 3218 25.00 Material Issue to Work Order 3779 t WO f mfgadmin f 8804 f 2007-05-30 09:04:52.671-04 2007-05-30 4410 86 W/O 10029-1 3219 -514.00 Material Issue to Work Order 3780 t WO f mfgadmin f 8803 f 2007-05-30 09:04:52.671-04 2007-05-30 4410 85 W/O 10029-1 3219 514.00 Material Issue to Work Order 3780 t WO f mfgadmin f 8806 f 2007-05-30 09:04:52.671-04 2007-05-30 4411 86 W/O 10029-1 3220 -64.60 Material Issue to Work Order 3781 t WO f mfgadmin f 8805 f 2007-05-30 09:04:52.671-04 2007-05-30 4411 85 W/O 10029-1 3220 64.60 Material Issue to Work Order 3781 t WO f mfgadmin f 8808 f 2007-05-30 09:04:52.671-04 2007-05-30 4412 86 W/O 10029-1 3221 -1.70 Material Issue to Work Order 3782 t WO f mfgadmin f 8807 f 2007-05-30 09:04:52.671-04 2007-05-30 4412 85 W/O 10029-1 3221 1.70 Material Issue to Work Order 3782 t WO f mfgadmin f 8810 f 2007-05-30 09:04:52.671-04 2007-05-30 4413 86 W/O 10029-1 3222 -266.00 Material Issue to Work Order 3783 t WO f mfgadmin f 8809 f 2007-05-30 09:04:52.671-04 2007-05-30 4413 85 W/O 10029-1 3222 266.00 Material Issue to Work Order 3783 t WO f mfgadmin f 8812 f 2007-05-30 09:04:52.671-04 2007-05-30 4414 86 W/O 10029-1 -1 -1.10 Post Setup Time to Work Order 3784 t WO f mfgadmin f 8811 f 2007-05-30 09:04:52.671-04 2007-05-30 4414 94 W/O 10029-1 -1 1.10 Post Setup Time to Work Order 3784 t WO f mfgadmin f 8814 f 2007-05-30 09:04:52.671-04 2007-05-30 4415 86 W/O 10029-1 -1 -11.00 Post Run Time to Work Order 3785 t WO f mfgadmin f 8813 f 2007-05-30 09:04:52.671-04 2007-05-30 4415 94 W/O 10029-1 -1 11.00 Post Run Time to Work Order 3785 t WO f mfgadmin f 8816 f 2007-05-30 09:04:52.671-04 2007-05-30 4416 86 W/O 10029-1 -1 -1.10 Post Setup Time to Work Order 3786 t WO f mfgadmin f 8815 f 2007-05-30 09:04:52.671-04 2007-05-30 4416 94 W/O 10029-1 -1 1.10 Post Setup Time to Work Order 3786 t WO f mfgadmin f 8818 f 2007-05-30 09:04:52.671-04 2007-05-30 4417 86 W/O 10029-1 -1 -11.00 Post Run Time to Work Order 3787 t WO f mfgadmin f 8817 f 2007-05-30 09:04:52.671-04 2007-05-30 4417 94 W/O 10029-1 -1 11.00 Post Run Time to Work Order 3787 t WO f mfgadmin f 8820 f 2007-05-30 09:04:52.671-04 2007-05-30 4418 86 W/O 10029-1 -1 -0.88 Post Setup Time to Work Order 3788 t WO f mfgadmin f 8819 f 2007-05-30 09:04:52.671-04 2007-05-30 4418 94 W/O 10029-1 -1 0.88 Post Setup Time to Work Order 3788 t WO f mfgadmin f 8822 f 2007-05-30 09:04:52.671-04 2007-05-30 4419 86 W/O 10029-1 -1 -8.80 Post Run Time to Work Order 3789 t WO f mfgadmin f 8821 f 2007-05-30 09:04:52.671-04 2007-05-30 4419 94 W/O 10029-1 -1 8.80 Post Run Time to Work Order 3789 t WO f mfgadmin f 8823 f 2007-05-30 09:05:12.656-04 2007-05-30 4420 86 W/O 10030-1 3223 638.18 Receive Inventory from Manufacturing 3790 t WO f mfgadmin f 8824 f 2007-05-30 09:05:12.656-04 2007-05-30 4420 85 W/O 10030-1 3223 -638.18 Receive Inventory from Manufacturing 3790 t WO f mfgadmin f 8826 f 2007-05-30 09:05:12.656-04 2007-05-30 4421 86 W/O 10030-1 3224 -25.00 Material Issue to Work Order 3791 t WO f mfgadmin f 8825 f 2007-05-30 09:05:12.656-04 2007-05-30 4421 85 W/O 10030-1 3224 25.00 Material Issue to Work Order 3791 t WO f mfgadmin f 8828 f 2007-05-30 09:05:12.656-04 2007-05-30 4422 86 W/O 10030-1 3225 -514.00 Material Issue to Work Order 3792 t WO f mfgadmin f 8827 f 2007-05-30 09:05:12.656-04 2007-05-30 4422 85 W/O 10030-1 3225 514.00 Material Issue to Work Order 3792 t WO f mfgadmin f 8830 f 2007-05-30 09:05:12.656-04 2007-05-30 4423 86 W/O 10030-1 3226 -64.60 Material Issue to Work Order 3793 t WO f mfgadmin f 8829 f 2007-05-30 09:05:12.656-04 2007-05-30 4423 85 W/O 10030-1 3226 64.60 Material Issue to Work Order 3793 t WO f mfgadmin f 8832 f 2007-05-30 09:05:12.656-04 2007-05-30 4424 86 W/O 10030-1 3227 -1.70 Material Issue to Work Order 3794 t WO f mfgadmin f 8831 f 2007-05-30 09:05:12.656-04 2007-05-30 4424 85 W/O 10030-1 3227 1.70 Material Issue to Work Order 3794 t WO f mfgadmin f 8834 f 2007-05-30 09:05:12.656-04 2007-05-30 4425 86 W/O 10030-1 3228 -266.00 Material Issue to Work Order 3795 t WO f mfgadmin f 8833 f 2007-05-30 09:05:12.656-04 2007-05-30 4425 85 W/O 10030-1 3228 266.00 Material Issue to Work Order 3795 t WO f mfgadmin f 8836 f 2007-05-30 09:05:12.656-04 2007-05-30 4426 86 W/O 10030-1 -1 -1.10 Post Setup Time to Work Order 3796 t WO f mfgadmin f 8835 f 2007-05-30 09:05:12.656-04 2007-05-30 4426 94 W/O 10030-1 -1 1.10 Post Setup Time to Work Order 3796 t WO f mfgadmin f 8838 f 2007-05-30 09:05:12.656-04 2007-05-30 4427 86 W/O 10030-1 -1 -11.00 Post Run Time to Work Order 3797 t WO f mfgadmin f 8837 f 2007-05-30 09:05:12.656-04 2007-05-30 4427 94 W/O 10030-1 -1 11.00 Post Run Time to Work Order 3797 t WO f mfgadmin f 8840 f 2007-05-30 09:05:12.656-04 2007-05-30 4428 86 W/O 10030-1 -1 -1.10 Post Setup Time to Work Order 3798 t WO f mfgadmin f 8839 f 2007-05-30 09:05:12.656-04 2007-05-30 4428 94 W/O 10030-1 -1 1.10 Post Setup Time to Work Order 3798 t WO f mfgadmin f 8842 f 2007-05-30 09:05:12.656-04 2007-05-30 4429 86 W/O 10030-1 -1 -11.00 Post Run Time to Work Order 3799 t WO f mfgadmin f 8841 f 2007-05-30 09:05:12.656-04 2007-05-30 4429 94 W/O 10030-1 -1 11.00 Post Run Time to Work Order 3799 t WO f mfgadmin f 8844 f 2007-05-30 09:05:12.656-04 2007-05-30 4430 86 W/O 10030-1 -1 -0.88 Post Setup Time to Work Order 3800 t WO f mfgadmin f 8843 f 2007-05-30 09:05:12.656-04 2007-05-30 4430 94 W/O 10030-1 -1 0.88 Post Setup Time to Work Order 3800 t WO f mfgadmin f 8846 f 2007-05-30 09:05:12.656-04 2007-05-30 4431 86 W/O 10030-1 -1 -8.80 Post Run Time to Work Order 3801 t WO f mfgadmin f 8845 f 2007-05-30 09:05:12.656-04 2007-05-30 4431 94 W/O 10030-1 -1 8.80 Post Run Time to Work Order 3801 t WO f mfgadmin f 8847 f 2007-05-30 09:05:32.796-04 2007-05-30 4432 86 W/O 10031-1 3229 638.18 Receive Inventory from Manufacturing 3802 t WO f mfgadmin f 8848 f 2007-05-30 09:05:32.796-04 2007-05-30 4432 85 W/O 10031-1 3229 -638.18 Receive Inventory from Manufacturing 3802 t WO f mfgadmin f 8850 f 2007-05-30 09:05:32.796-04 2007-05-30 4433 86 W/O 10031-1 3230 -25.00 Material Issue to Work Order 3803 t WO f mfgadmin f 8849 f 2007-05-30 09:05:32.796-04 2007-05-30 4433 85 W/O 10031-1 3230 25.00 Material Issue to Work Order 3803 t WO f mfgadmin f 8852 f 2007-05-30 09:05:32.796-04 2007-05-30 4434 86 W/O 10031-1 3231 -514.00 Material Issue to Work Order 3804 t WO f mfgadmin f 8851 f 2007-05-30 09:05:32.796-04 2007-05-30 4434 85 W/O 10031-1 3231 514.00 Material Issue to Work Order 3804 t WO f mfgadmin f 8854 f 2007-05-30 09:05:32.796-04 2007-05-30 4435 86 W/O 10031-1 3232 -64.60 Material Issue to Work Order 3805 t WO f mfgadmin f 8853 f 2007-05-30 09:05:32.796-04 2007-05-30 4435 85 W/O 10031-1 3232 64.60 Material Issue to Work Order 3805 t WO f mfgadmin f 8856 f 2007-05-30 09:05:32.796-04 2007-05-30 4436 86 W/O 10031-1 3233 -1.70 Material Issue to Work Order 3806 t WO f mfgadmin f 8855 f 2007-05-30 09:05:32.796-04 2007-05-30 4436 85 W/O 10031-1 3233 1.70 Material Issue to Work Order 3806 t WO f mfgadmin f 8858 f 2007-05-30 09:05:32.796-04 2007-05-30 4437 86 W/O 10031-1 3234 -266.00 Material Issue to Work Order 3807 t WO f mfgadmin f 8857 f 2007-05-30 09:05:32.796-04 2007-05-30 4437 85 W/O 10031-1 3234 266.00 Material Issue to Work Order 3807 t WO f mfgadmin f 8860 f 2007-05-30 09:05:32.796-04 2007-05-30 4438 86 W/O 10031-1 -1 -1.10 Post Setup Time to Work Order 3808 t WO f mfgadmin f 8859 f 2007-05-30 09:05:32.796-04 2007-05-30 4438 94 W/O 10031-1 -1 1.10 Post Setup Time to Work Order 3808 t WO f mfgadmin f 8862 f 2007-05-30 09:05:32.796-04 2007-05-30 4439 86 W/O 10031-1 -1 -11.00 Post Run Time to Work Order 3809 t WO f mfgadmin f 8861 f 2007-05-30 09:05:32.796-04 2007-05-30 4439 94 W/O 10031-1 -1 11.00 Post Run Time to Work Order 3809 t WO f mfgadmin f 8864 f 2007-05-30 09:05:32.796-04 2007-05-30 4440 86 W/O 10031-1 -1 -1.10 Post Setup Time to Work Order 3810 t WO f mfgadmin f 8863 f 2007-05-30 09:05:32.796-04 2007-05-30 4440 94 W/O 10031-1 -1 1.10 Post Setup Time to Work Order 3810 t WO f mfgadmin f 8866 f 2007-05-30 09:05:32.796-04 2007-05-30 4441 86 W/O 10031-1 -1 -11.00 Post Run Time to Work Order 3811 t WO f mfgadmin f 8865 f 2007-05-30 09:05:32.796-04 2007-05-30 4441 94 W/O 10031-1 -1 11.00 Post Run Time to Work Order 3811 t WO f mfgadmin f 8868 f 2007-05-30 09:05:32.796-04 2007-05-30 4442 86 W/O 10031-1 -1 -0.88 Post Setup Time to Work Order 3812 t WO f mfgadmin f 8867 f 2007-05-30 09:05:32.796-04 2007-05-30 4442 94 W/O 10031-1 -1 0.88 Post Setup Time to Work Order 3812 t WO f mfgadmin f 8870 f 2007-05-30 09:05:32.796-04 2007-05-30 4443 86 W/O 10031-1 -1 -8.80 Post Run Time to Work Order 3813 t WO f mfgadmin f 8869 f 2007-05-30 09:05:32.796-04 2007-05-30 4443 94 W/O 10031-1 -1 8.80 Post Run Time to Work Order 3813 t WO f mfgadmin f 8871 f 2007-05-30 09:05:59.843-04 2007-05-30 4444 86 W/O 10028-1 3235 3190.90 Receive Inventory from Manufacturing 3814 t WO f mfgadmin f 8872 f 2007-05-30 09:05:59.843-04 2007-05-30 4444 85 W/O 10028-1 3235 -3190.90 Receive Inventory from Manufacturing 3814 t WO f mfgadmin f 8874 f 2007-05-30 09:05:59.843-04 2007-05-30 4445 86 W/O 10028-1 3236 -2570.00 Material Issue to Work Order 3815 t WO f mfgadmin f 8873 f 2007-05-30 09:05:59.843-04 2007-05-30 4445 85 W/O 10028-1 3236 2570.00 Material Issue to Work Order 3815 t WO f mfgadmin f 8876 f 2007-05-30 09:05:59.843-04 2007-05-30 4446 86 W/O 10028-1 3237 -323.00 Material Issue to Work Order 3816 t WO f mfgadmin f 8875 f 2007-05-30 09:05:59.843-04 2007-05-30 4446 85 W/O 10028-1 3237 323.00 Material Issue to Work Order 3816 t WO f mfgadmin f 8878 f 2007-05-30 09:05:59.843-04 2007-05-30 4447 86 W/O 10028-1 3239 -125.00 Material Issue to Work Order 3818 t WO f mfgadmin f 8877 f 2007-05-30 09:05:59.843-04 2007-05-30 4447 85 W/O 10028-1 3239 125.00 Material Issue to Work Order 3818 t WO f mfgadmin f 8880 f 2007-05-30 09:05:59.843-04 2007-05-30 4448 86 W/O 10028-1 3240 -8.50 Material Issue to Work Order 3819 t WO f mfgadmin f 8879 f 2007-05-30 09:05:59.843-04 2007-05-30 4448 85 W/O 10028-1 3240 8.50 Material Issue to Work Order 3819 t WO f mfgadmin f 8882 f 2007-05-30 09:05:59.843-04 2007-05-30 4449 86 W/O 10028-1 -1 -1.10 Post Setup Time to Work Order 3820 t WO f mfgadmin f 8881 f 2007-05-30 09:05:59.843-04 2007-05-30 4449 94 W/O 10028-1 -1 1.10 Post Setup Time to Work Order 3820 t WO f mfgadmin f 8884 f 2007-05-30 09:05:59.843-04 2007-05-30 4450 86 W/O 10028-1 -1 -110.00 Post Run Time to Work Order 3821 t WO f mfgadmin f 8883 f 2007-05-30 09:05:59.843-04 2007-05-30 4450 94 W/O 10028-1 -1 110.00 Post Run Time to Work Order 3821 t WO f mfgadmin f 8886 f 2007-05-30 09:05:59.843-04 2007-05-30 4451 86 W/O 10028-1 -1 -2.20 Post Setup Time to Work Order 3822 t WO f mfgadmin f 8885 f 2007-05-30 09:05:59.843-04 2007-05-30 4451 94 W/O 10028-1 -1 2.20 Post Setup Time to Work Order 3822 t WO f mfgadmin f 8888 f 2007-05-30 09:05:59.843-04 2007-05-30 4452 86 W/O 10028-1 -1 -27.50 Post Run Time to Work Order 3823 t WO f mfgadmin f 8887 f 2007-05-30 09:05:59.843-04 2007-05-30 4452 94 W/O 10028-1 -1 27.50 Post Run Time to Work Order 3823 t WO f mfgadmin f 8890 f 2007-05-30 09:05:59.843-04 2007-05-30 4453 86 W/O 10028-1 -1 -0.44 Post Setup Time to Work Order 3824 t WO f mfgadmin f 8889 f 2007-05-30 09:05:59.843-04 2007-05-30 4453 94 W/O 10028-1 -1 0.44 Post Setup Time to Work Order 3824 t WO f mfgadmin f 8892 f 2007-05-30 09:05:59.843-04 2007-05-30 4454 86 W/O 10028-1 -1 -11.00 Post Run Time to Work Order 3825 t WO f mfgadmin f 8891 f 2007-05-30 09:05:59.843-04 2007-05-30 4454 94 W/O 10028-1 -1 11.00 Post Run Time to Work Order 3825 t WO f mfgadmin f 8894 f 2007-05-30 09:22:59.437-04 2007-05-30 4455 128 I/M MA2.1-01 \N -2552.72 Inter-Warehouse Transfer 3826 t f mfgadmin f 8893 f 2007-05-30 09:22:59.437-04 2007-05-30 4455 85 I/M MA2.1-01 \N 2552.72 Inter-Warehouse Transfer 3826 t f mfgadmin f 8895 f 2007-05-30 09:24:46.765-04 2007-05-30 4456 85 S/R 50163-1 3243 638.18 Issue to Shipping 3827 t SO f mfgadmin f 8898 f 2007-05-30 09:24:46.765-04 2007-05-30 4457 96 S/R 50163-2 3244 -638.18 Issue to Shipping 3828 t SO f mfgadmin f 8897 f 2007-05-30 09:24:46.765-04 2007-05-30 4457 85 S/R 50163-2 3244 638.18 Issue to Shipping 3828 t SO f mfgadmin f 8900 f 2007-05-30 09:24:46.765-04 2007-05-30 4458 96 S/R 50163-3 3245 -638.18 Issue to Shipping 3829 t SO f mfgadmin f 8899 f 2007-05-30 09:24:46.765-04 2007-05-30 4458 85 S/R 50163-3 3245 638.18 Issue to Shipping 3829 t SO f mfgadmin f 8902 f 2007-05-30 09:24:46.765-04 2007-05-30 4459 96 S/R 50163-4 3246 -638.18 Issue to Shipping 3830 t SO f mfgadmin f 8901 f 2007-05-30 09:24:46.765-04 2007-05-30 4459 85 S/R 50163-4 3246 638.18 Issue to Shipping 3830 t SO f mfgadmin f 8904 f 2007-05-30 09:25:27.156-04 2007-05-30 4460 108 S/R 50163 -1 -638.18 Ship Shipment 3831 t SO f mfgadmin f 8903 f 2007-05-30 09:25:27.156-04 2007-05-30 4460 96 S/R 50163 -1 638.18 Ship Shipment 3831 t SO f mfgadmin f 8906 f 2007-05-30 09:25:27.156-04 2007-05-30 4461 108 S/R 50163 -1 -638.18 Ship Shipment 3832 t SO f mfgadmin f 8905 f 2007-05-30 09:25:27.156-04 2007-05-30 4461 96 S/R 50163 -1 638.18 Ship Shipment 3832 t SO f mfgadmin f 8908 f 2007-05-30 09:25:27.156-04 2007-05-30 4462 108 S/R 50163 -1 -638.18 Ship Shipment 3833 t SO f mfgadmin f 8907 f 2007-05-30 09:25:27.156-04 2007-05-30 4462 96 S/R 50163 -1 638.18 Ship Shipment 3833 t SO f mfgadmin f 8910 f 2007-05-30 09:25:27.156-04 2007-05-30 4463 108 S/R 50163 -1 -638.18 Ship Shipment 3834 t SO f mfgadmin f 8909 f 2007-05-30 09:25:27.156-04 2007-05-30 4463 96 S/R 50163 -1 638.18 Ship Shipment 3834 t SO f mfgadmin f 8912 f 2007-05-30 09:26:36.703-04 2007-05-30 4464 122 A/R 60037 \N 100.00 3835 t IN f mfgadmin f 8914 f 2007-05-30 09:26:36.703-04 2007-05-30 4464 106 A/R 60037 \N -7468.17 3835 t IN f mfgadmin f 8913 f 2007-05-30 09:26:36.703-04 2007-05-30 4464 121 A/R 60037 \N 350.87 3835 t IN f mfgadmin f 8915 f 2007-05-30 09:42:31.078-04 2007-05-30 4465 106 A/R I-60037 \N 7468.17 TTOYS-Tremendous Toys Incorporated 3836 t CR f mfgadmin f 8917 f 2007-05-30 09:45:22.921-04 2007-05-30 4466 91 I/M \N 3247 500.00 \N 3837 t CT f mfgadmin f 8918 f 2007-05-30 09:45:22.921-04 2007-05-30 4466 85 I/M \N 3247 -500.00 \N 3837 t CT f mfgadmin f 8920 f 2007-05-30 09:51:05.671-04 2007-05-30 4467 106 A/R 60038 \N -27825.18 3838 t IN f mfgadmin f 8919 f 2007-05-30 09:51:05.671-04 2007-05-30 4467 103 A/R 60038 \N 27825.18 3838 t IN f mfgadmin f 8921 f 2007-05-30 09:51:58.109-04 2007-05-30 4468 106 A/R I-60038 \N 27825.18 XTRM-Xtreme Toys LTD 3839 t CR f mfgadmin f 8923 f 2007-05-30 09:57:15.109-04 2007-05-30 4469 105 G/L MA21Clear -1 7.13 MA21 3840 t JE f mfgadmin f 8924 f 2007-05-30 09:57:15.109-04 2007-05-30 4469 85 G/L MA21Clear -1 -7.13 MA21 3840 t JE f mfgadmin f 8926 f 2007-05-30 10:47:10.125-04 2007-05-30 4470 86 W/O 10033-1 3249 -50.00 Material Issue to Work Order 3842 t WO f mfgadmin f 8925 f 2007-05-30 10:47:10.125-04 2007-05-30 4470 85 W/O 10033-1 3249 50.00 Material Issue to Work Order 3842 t WO f mfgadmin f 8928 f 2007-05-30 10:47:10.125-04 2007-05-30 4471 86 W/O 10033-1 -1 -27.50 Post Setup Time to Work Order 3843 t WO f mfgadmin f 8927 f 2007-05-30 10:47:10.125-04 2007-05-30 4471 94 W/O 10033-1 -1 27.50 Post Setup Time to Work Order 3843 t WO f mfgadmin f 8930 f 2007-05-30 10:47:10.125-04 2007-05-30 4472 86 W/O 10033-1 -1 -0.22 Post Run Time to Work Order 3844 t WO f mfgadmin f 8929 f 2007-05-30 10:47:10.125-04 2007-05-30 4472 94 W/O 10033-1 -1 0.22 Post Run Time to Work Order 3844 t WO f mfgadmin f 8931 f 2007-05-30 10:47:42.312-04 2007-05-30 4473 86 W/O 10033-1 3251 18.75 Receive Inventory from Breeder Manufacturing 3846 t WO f mfgadmin f 8932 f 2007-05-30 10:47:42.312-04 2007-05-30 4473 85 W/O 10033-1 3251 -18.75 Receive Inventory from Breeder Manufacturing 3846 t WO f mfgadmin f 8933 f 2007-05-30 10:47:47.953-04 2007-05-30 4474 86 W/O 10033-1 -1 77.72 Manufacturing Inventory Cost Variance 3849 t WO f mfgadmin f 8934 f 2007-05-30 10:47:47.953-04 2007-05-30 4474 87 W/O 10033-1 -1 -77.72 Manufacturing Inventory Cost Variance 3849 t WO f mfgadmin f 8935 f 2007-05-30 10:47:47.953-04 2007-05-30 4475 86 W/O 10033-1 -1 -18.75 Breeder Inventory Cost Variance 3850 t WO f mfgadmin f 8936 f 2007-05-30 10:47:47.953-04 2007-05-30 4475 87 W/O 10033-1 -1 18.75 Breeder Inventory Cost Variance 3850 t WO f mfgadmin f 8937 f 2007-05-30 10:57:22.109-04 2007-05-30 4476 86 W/O 10029-1 -1 267.00 Manufacturing Inventory Cost Variance 3851 t WO f mfgadmin f 8938 f 2007-05-30 10:57:22.109-04 2007-05-30 4476 87 W/O 10029-1 -1 -267.00 Manufacturing Inventory Cost Variance 3851 t WO f mfgadmin f 8939 f 2007-05-30 10:57:27.718-04 2007-05-30 4477 86 W/O 10030-1 -1 267.00 Manufacturing Inventory Cost Variance 3853 t WO f mfgadmin f 8940 f 2007-05-30 10:57:27.718-04 2007-05-30 4477 87 W/O 10030-1 -1 -267.00 Manufacturing Inventory Cost Variance 3853 t WO f mfgadmin f 8941 f 2007-05-30 10:57:33.546-04 2007-05-30 4478 86 W/O 10031-1 -1 267.00 Manufacturing Inventory Cost Variance 3855 t WO f mfgadmin f 8942 f 2007-05-30 10:57:33.546-04 2007-05-30 4478 87 W/O 10031-1 -1 -267.00 Manufacturing Inventory Cost Variance 3855 t WO f mfgadmin f 8943 f 2007-05-30 10:58:00.093-04 2007-05-30 4479 86 W/O 10028-1 -1 -12.16 Manufacturing Inventory Cost Variance 3857 t WO f mfgadmin f 8944 f 2007-05-30 10:58:00.093-04 2007-05-30 4479 87 W/O 10028-1 -1 12.16 Manufacturing Inventory Cost Variance 3857 t WO f mfgadmin f 8946 f 2007-05-30 09:32:51.910273-04 2007-05-30 4480 106 A/R 60039 \N -18550.12 3859 t IN f mfgadmin f 8945 f 2007-05-30 09:32:51.910273-04 2007-05-30 4480 103 A/R 60039 \N 18550.12 3859 t IN f mfgadmin f 8947 f 2007-05-30 09:45:55.343335-04 2007-05-30 4481 95 G/L MA21ADJ -1 8.38 Small adjustment. 3860 t JE f mfgadmin f 8948 f 2007-05-30 09:45:55.343335-04 2007-05-30 4481 85 G/L MA21ADJ -1 -8.38 Small adjustment. 3860 t JE f mfgadmin f 8950 f 2007-05-30 09:47:08.390105-04 2007-05-30 4482 95 G/L MA21Adj2 -1 -1.25 Small Adjustment 3861 t JE f mfgadmin f 8949 f 2007-05-30 09:47:08.390105-04 2007-05-30 4482 85 G/L MA21Adj2 -1 1.25 Small Adjustment 3861 t JE f mfgadmin f 8951 f 2007-05-30 10:25:32.097925-04 2007-05-30 4483 128 I/M MA-MOVE1 \N 638.18 Inter-Warehouse Transfer 3862 t f mfgadmin f 8952 f 2007-05-30 10:25:32.097925-04 2007-05-30 4483 85 I/M MA-MOVE1 \N -638.18 Inter-Warehouse Transfer 3862 t f mfgadmin f 8953 f 2007-05-30 11:21:25.811624-04 2007-05-30 4484 95 S/R 20034 3256 25.00 Receive Inventory from P/O 3863 t PO f mfgadmin f 8954 f 2007-05-30 11:21:25.811624-04 2007-05-30 4484 85 S/R 20034 3256 -25.00 Receive Inventory from P/O 3863 t PO f mfgadmin f 8956 f 2007-05-30 11:22:42.726706-04 2007-05-30 4485 90 A/P 30033 \N -5.00 XPPI-Packaging Pros LTD RF01991 3865 t VO f mfgadmin f 8957 f 2007-05-30 11:22:42.726706-04 2007-05-30 4485 99 A/P 30033 \N 30.00 XPPI-Packaging Pros LTD RF01991 3865 t VO f mfgadmin f 8955 f 2007-05-30 11:22:42.726706-04 2007-05-30 4485 95 A/P 30033 \N -25.00 XPPI-Packaging Pros LTD RF01991 3865 t VO f mfgadmin f 8958 f 2007-05-30 11:31:07.026135-04 2007-05-30 4486 95 S/R 20035 3257 10.00 Receive Inventory from P/O 3866 t PO f mfgadmin f 8959 f 2007-05-30 11:31:07.026135-04 2007-05-30 4486 85 S/R 20035 3257 -10.00 Receive Inventory from P/O 3866 t PO f mfgadmin f 8960 f 2007-05-30 11:31:29.479549-04 2007-05-30 4487 86 W/O 10036-1 3258 13.30 Receive Inventory from Manufacturing 3868 t WO f mfgadmin f 8961 f 2007-05-30 11:31:29.479549-04 2007-05-30 4487 85 W/O 10036-1 3258 -13.30 Receive Inventory from Manufacturing 3868 t WO f mfgadmin f 8963 f 2007-05-30 11:31:29.479549-04 2007-05-30 4488 86 W/O 10036-1 3259 -10.00 Material Issue to Work Order 3869 t WO f mfgadmin f 8962 f 2007-05-30 11:31:29.479549-04 2007-05-30 4488 85 W/O 10036-1 3259 10.00 Material Issue to Work Order 3869 t WO f mfgadmin f 8965 f 2007-05-30 11:31:29.479549-04 2007-05-30 4489 86 W/O 10036-1 3260 -10.00 Material Issue to Work Order 3870 t WO f mfgadmin f 8964 f 2007-05-30 11:31:29.479549-04 2007-05-30 4489 85 W/O 10036-1 3260 10.00 Material Issue to Work Order 3870 t WO f mfgadmin f 8967 f 2007-05-30 11:31:29.479549-04 2007-05-30 4490 86 W/O 10036-1 -1 -1.47 Post Run Time to Work Order 3871 t WO f mfgadmin f 8966 f 2007-05-30 11:31:29.479549-04 2007-05-30 4490 94 W/O 10036-1 -1 1.47 Post Run Time to Work Order 3871 t WO f mfgadmin f 8969 f 2007-05-30 11:31:29.479549-04 2007-05-30 4491 86 W/O 10036-1 -1 -1.83 Post Run Time to Work Order 3872 t WO f mfgadmin f 8968 f 2007-05-30 11:31:29.479549-04 2007-05-30 4491 94 W/O 10036-1 -1 1.83 Post Run Time to Work Order 3872 t WO f mfgadmin f 8970 f 2007-05-30 11:31:33.421967-04 2007-05-30 4492 86 W/O 10036-1 -1 10.00 Manufacturing Inventory Cost Variance 3873 t WO f mfgadmin f 8971 f 2007-05-30 11:31:33.421967-04 2007-05-30 4492 87 W/O 10036-1 -1 -10.00 Manufacturing Inventory Cost Variance 3873 t WO f mfgadmin f 8973 f 2007-05-30 11:32:36.219628-04 2007-05-30 4493 86 W/O 10037-1 3262 -50.00 Material Issue to Work Order 3876 t WO f mfgadmin f 8972 f 2007-05-30 11:32:36.219628-04 2007-05-30 4493 85 W/O 10037-1 3262 50.00 Material Issue to Work Order 3876 t WO f mfgadmin f 8975 f 2007-05-30 11:32:36.219628-04 2007-05-30 4494 86 W/O 10037-1 -1 -27.50 Post Setup Time to Work Order 3877 t WO f mfgadmin f 8974 f 2007-05-30 11:32:36.219628-04 2007-05-30 4494 94 W/O 10037-1 -1 27.50 Post Setup Time to Work Order 3877 t WO f mfgadmin f 8977 f 2007-05-30 11:32:36.219628-04 2007-05-30 4495 86 W/O 10037-1 -1 -0.22 Post Run Time to Work Order 3878 t WO f mfgadmin f 8976 f 2007-05-30 11:32:36.219628-04 2007-05-30 4495 94 W/O 10037-1 -1 0.22 Post Run Time to Work Order 3878 t WO f mfgadmin f 8978 f 2007-05-30 11:32:54.874951-04 2007-05-30 4496 86 W/O 10037-1 3265 15.00 Receive Inventory from Breeder Manufacturing 3881 t WO f mfgadmin f 8979 f 2007-05-30 11:32:54.874951-04 2007-05-30 4496 85 W/O 10037-1 3265 -15.00 Receive Inventory from Breeder Manufacturing 3881 t WO f mfgadmin f 8980 f 2007-05-30 11:33:01.452914-04 2007-05-30 4497 86 W/O 10037-1 -1 77.72 Manufacturing Inventory Cost Variance 3883 t WO f mfgadmin f 8981 f 2007-05-30 11:33:01.452914-04 2007-05-30 4497 87 W/O 10037-1 -1 -77.72 Manufacturing Inventory Cost Variance 3883 t WO f mfgadmin f 8982 f 2007-05-30 11:33:01.452914-04 2007-05-30 4498 86 W/O 10037-1 -1 -15.00 Breeder Inventory Cost Variance 3884 t WO f mfgadmin f 8983 f 2007-05-30 11:33:01.452914-04 2007-05-30 4498 87 W/O 10037-1 -1 15.00 Breeder Inventory Cost Variance 3884 t WO f mfgadmin f 8985 f 2007-05-30 11:33:24.73485-04 2007-05-30 4499 86 W/O 10034-1 3267 -27.50 Material Issue to Work Order 3885 t WO f mfgadmin f 8984 f 2007-05-30 11:33:24.73485-04 2007-05-30 4499 85 W/O 10034-1 3267 27.50 Material Issue to Work Order 3885 t WO f mfgadmin f 8987 f 2007-05-30 11:33:24.73485-04 2007-05-30 4500 86 W/O 10034-1 3268 -25.00 Material Issue to Work Order 3886 t WO f mfgadmin f 8986 f 2007-05-30 11:33:24.73485-04 2007-05-30 4500 85 W/O 10034-1 3268 25.00 Material Issue to Work Order 3886 t WO f mfgadmin f 8988 f 2007-05-30 11:33:24.73485-04 2007-05-30 4501 86 W/O 10034-1 3269 64.60 Receive Inventory from Manufacturing 3887 t WO f mfgadmin f 8989 f 2007-05-30 11:33:24.73485-04 2007-05-30 4501 85 W/O 10034-1 3269 -64.60 Receive Inventory from Manufacturing 3887 t WO f mfgadmin f 8991 f 2007-05-30 11:33:24.73485-04 2007-05-30 4502 86 W/O 10034-1 -1 -0.92 Post Setup Time to Work Order 3888 t WO f mfgadmin f 8990 f 2007-05-30 11:33:24.73485-04 2007-05-30 4502 94 W/O 10034-1 -1 0.92 Post Setup Time to Work Order 3888 t WO f mfgadmin f 8993 f 2007-05-30 11:33:24.73485-04 2007-05-30 4503 86 W/O 10034-1 -1 -12.10 Post Run Time to Work Order 3889 t WO f mfgadmin f 8992 f 2007-05-30 11:33:24.73485-04 2007-05-30 4503 94 W/O 10034-1 -1 12.10 Post Run Time to Work Order 3889 t WO f mfgadmin f 8994 f 2007-05-30 11:33:37.241578-04 2007-05-30 4504 86 W/O 10034-1 -1 0.92 Manufacturing Inventory Cost Variance 3890 t WO f mfgadmin f 8995 f 2007-05-30 11:33:37.241578-04 2007-05-30 4504 87 W/O 10034-1 -1 -0.92 Manufacturing Inventory Cost Variance 3890 t WO f mfgadmin f 8996 f 2007-05-30 11:33:47.228336-04 2007-05-30 4505 86 W/O 50164-1 3270 638.18 Receive Inventory from Manufacturing 3892 t WO f mfgadmin f 8997 f 2007-05-30 11:33:47.228336-04 2007-05-30 4505 85 W/O 50164-1 3270 -638.18 Receive Inventory from Manufacturing 3892 t WO f mfgadmin f 8999 f 2007-05-30 11:33:47.228336-04 2007-05-30 4506 86 W/O 50164-1 3271 -25.00 Material Issue to Work Order 3893 t WO f mfgadmin f 8998 f 2007-05-30 11:33:47.228336-04 2007-05-30 4506 85 W/O 50164-1 3271 25.00 Material Issue to Work Order 3893 t WO f mfgadmin f 9001 f 2007-05-30 11:33:47.228336-04 2007-05-30 4507 86 W/O 50164-1 3272 -514.00 Material Issue to Work Order 3894 t WO f mfgadmin f 9000 f 2007-05-30 11:33:47.228336-04 2007-05-30 4507 85 W/O 50164-1 3272 514.00 Material Issue to Work Order 3894 t WO f mfgadmin f 9003 f 2007-05-30 11:33:47.228336-04 2007-05-30 4508 86 W/O 50164-1 3273 -64.60 Material Issue to Work Order 3895 t WO f mfgadmin f 9002 f 2007-05-30 11:33:47.228336-04 2007-05-30 4508 85 W/O 50164-1 3273 64.60 Material Issue to Work Order 3895 t WO f mfgadmin f 9005 f 2007-05-30 11:33:47.228336-04 2007-05-30 4509 86 W/O 50164-1 3274 -1.70 Material Issue to Work Order 3896 t WO f mfgadmin f 9004 f 2007-05-30 11:33:47.228336-04 2007-05-30 4509 85 W/O 50164-1 3274 1.70 Material Issue to Work Order 3896 t WO f mfgadmin f 9007 f 2007-05-30 11:33:47.228336-04 2007-05-30 4510 86 W/O 50164-1 -1 -1.10 Post Setup Time to Work Order 3897 t WO f mfgadmin f 9006 f 2007-05-30 11:33:47.228336-04 2007-05-30 4510 94 W/O 50164-1 -1 1.10 Post Setup Time to Work Order 3897 t WO f mfgadmin f 9009 f 2007-05-30 11:33:47.228336-04 2007-05-30 4511 86 W/O 50164-1 -1 -22.00 Post Run Time to Work Order 3898 t WO f mfgadmin f 9008 f 2007-05-30 11:33:47.228336-04 2007-05-30 4511 94 W/O 50164-1 -1 22.00 Post Run Time to Work Order 3898 t WO f mfgadmin f 9011 f 2007-05-30 11:33:47.228336-04 2007-05-30 4512 86 W/O 50164-1 -1 -2.20 Post Setup Time to Work Order 3899 t WO f mfgadmin f 9010 f 2007-05-30 11:33:47.228336-04 2007-05-30 4512 94 W/O 50164-1 -1 2.20 Post Setup Time to Work Order 3899 t WO f mfgadmin f 9013 f 2007-05-30 11:33:47.228336-04 2007-05-30 4513 86 W/O 50164-1 -1 -5.50 Post Run Time to Work Order 3900 t WO f mfgadmin f 9012 f 2007-05-30 11:33:47.228336-04 2007-05-30 4513 94 W/O 50164-1 -1 5.50 Post Run Time to Work Order 3900 t WO f mfgadmin f 9015 f 2007-05-30 11:33:47.228336-04 2007-05-30 4514 86 W/O 50164-1 -1 -0.44 Post Setup Time to Work Order 3901 t WO f mfgadmin f 9014 f 2007-05-30 11:33:47.228336-04 2007-05-30 4514 94 W/O 50164-1 -1 0.44 Post Setup Time to Work Order 3901 t WO f mfgadmin f 9017 f 2007-05-30 11:33:47.228336-04 2007-05-30 4515 86 W/O 50164-1 -1 -2.20 Post Run Time to Work Order 3902 t WO f mfgadmin f 9016 f 2007-05-30 11:33:47.228336-04 2007-05-30 4515 94 W/O 50164-1 -1 2.20 Post Run Time to Work Order 3902 t WO f mfgadmin f 9018 f 2007-05-30 11:34:01.639193-04 2007-05-30 4516 86 W/O 50164-1 -1 0.56 Manufacturing Inventory Cost Variance 3903 t WO f mfgadmin f 9019 f 2007-05-30 11:34:01.639193-04 2007-05-30 4516 87 W/O 50164-1 -1 -0.56 Manufacturing Inventory Cost Variance 3903 t WO f mfgadmin f 9021 f 2007-05-30 11:38:48.327255-04 2007-05-30 4517 99 A/P 30034 \N 10.00 ICHROME-International Chrome Technologies RF989898 3905 t VO f mfgadmin f 9020 f 2007-05-30 11:38:48.327255-04 2007-05-30 4517 95 A/P 30034 \N -10.00 ICHROME-International Chrome Technologies RF989898 3905 t VO f mfgadmin f 9023 f 2007-05-30 11:38:51.5359-04 2007-05-30 4518 99 A/P 30035 \N 25.00 NC TAX-North Carolina IRS RF09090 3906 t VO f mfgadmin f 9022 f 2007-05-30 11:38:51.5359-04 2007-05-30 4518 129 A/P 30035 \N -25.00 NC TAX-North Carolina IRS RF09090 3906 t VO f mfgadmin f 9025 f 2007-05-30 11:39:06.664661-04 2007-05-30 4519 96 S/R 50164-1 3275 -638.18 Issue to Shipping 3907 t SO f mfgadmin f 9024 f 2007-05-30 11:39:06.664661-04 2007-05-30 4519 85 S/R 50164-1 3275 638.18 Issue to Shipping 3907 t SO f mfgadmin f 9027 f 2007-05-30 11:39:06.664661-04 2007-05-30 4520 96 S/R 50164-2 3276 -638.18 Issue to Shipping 3908 t SO f mfgadmin f 9026 f 2007-05-30 11:39:06.664661-04 2007-05-30 4520 85 S/R 50164-2 3276 638.18 Issue to Shipping 3908 t SO f mfgadmin f 9029 f 2007-05-30 11:39:18.094088-04 2007-05-30 4521 108 S/R 50164 -1 -638.18 Ship Shipment 3909 t SO f mfgadmin f 9028 f 2007-05-30 11:39:18.094088-04 2007-05-30 4521 96 S/R 50164 -1 638.18 Ship Shipment 3909 t SO f mfgadmin f 9031 f 2007-05-30 11:39:18.094088-04 2007-05-30 4522 108 S/R 50164 -1 -638.18 Ship Shipment 3910 t SO f mfgadmin f 9030 f 2007-05-30 11:39:18.094088-04 2007-05-30 4522 96 S/R 50164 -1 638.18 Ship Shipment 3910 t SO f mfgadmin f 9034 f 2007-05-30 11:39:48.948144-04 2007-05-30 4523 122 A/R 60040 \N 100.00 3911 t IN f mfgadmin f 9036 f 2007-05-30 11:42:12.346362-04 2007-05-30 4524 106 A/R I-60040 \N 5286.44 TTOYS-Tremendous Toys Incorporated 3912 t CR f mfgadmin f 9039 f 2007-05-30 11:43:58.034475-04 2007-05-30 4525 109 A/P 3029 134 25.00 NC TAX-North Carolina IRS 3913 t CK t mfgadmin f 9038 f 2007-05-30 11:43:58.034475-04 2007-05-30 4525 99 A/P 3029 134 -25.00 NC TAX-North Carolina IRS 3913 t CK f mfgadmin f 9041 f 2007-05-30 11:44:01.035395-04 2007-05-30 4526 109 A/P 3028 133 10.00 ICHROME-International Chrome Technologies 3914 t CK t mfgadmin f 9040 f 2007-05-30 11:44:01.035395-04 2007-05-30 4526 99 A/P 3028 133 -10.00 ICHROME-International Chrome Technologies 3914 t CK f mfgadmin f 9250 f 2007-12-14 12:48:12.484-05 2007-05-30 4622 126 A/P 5004 132 29.40 XPPI-Packaging Pros LTD 4022 t CK t mfgadmin f 9249 f 2007-12-14 12:48:12.484-05 2007-05-30 4622 99 A/P 5004 132 -29.40 XPPI-Packaging Pros LTD 4022 t CK f mfgadmin f 9070 f 2007-08-31 10:13:14.281-04 2007-08-31 4540 123 A/R 20013 348 -500.00 Unapplied from C-12311 3926 t CD f mfgadmin f 9074 f 2007-08-31 10:23:28.718-04 2007-08-31 4541 87 G/L MA-01001 -1 -40000.00 Adjusting entry to inventory - MA 3927 t JE f mfgadmin f 9073 f 2007-08-31 10:23:28.718-04 2007-08-31 4541 85 G/L MA-01001 -1 40000.00 Adjusting entry to inventory - MA 3927 t JE f mfgadmin f 9075 f 2007-08-31 10:40:03.703-04 2007-08-31 4542 95 S/R 20036 3277 25.00 Receive Inventory from P/O 3928 t PO f mfgadmin f 9076 f 2007-08-31 10:40:03.703-04 2007-08-31 4542 85 S/R 20036 3277 -25.00 Receive Inventory from P/O 3928 t PO f mfgadmin f 9078 f 2007-08-31 10:45:56.484-04 2007-08-31 4543 96 S/R 99000 3278 -128.50 Issue to Shipping 3930 t TO f mfgadmin f 9077 f 2007-08-31 10:45:56.484-04 2007-08-31 4543 85 S/R 99000 3278 128.50 Issue to Shipping 3930 t TO f mfgadmin f 9079 f 2007-08-31 10:46:38.343-04 2007-08-31 4544 96 I/M 99000 3279 128.50 Ship from Src to Transit Warehouse 3931 t TO f mfgadmin f 9080 f 2007-08-31 10:46:38.343-04 2007-08-31 4544 134 I/M 99000 3279 -128.50 Ship from Src to Transit Warehouse 3931 t TO f mfgadmin f 9082 f 2007-08-31 10:48:19.359-04 2007-08-31 4545 128 I/M 99000 3281 -128.50 Receive from Transit To Dest Warehouse 3932 t TO f mfgadmin f 9081 f 2007-08-31 10:48:19.359-04 2007-08-31 4545 134 I/M 99000 3281 128.50 Receive from Transit To Dest Warehouse 3932 t TO f mfgadmin f 9084 f 2007-08-31 10:48:19.359-04 2007-08-31 4546 98 S/R 99000 -1 -100.00 Receive Inventory Freight from 99000 3933 t TO f mfgadmin f 9083 f 2007-08-31 10:48:19.359-04 2007-08-31 4546 132 S/R 99000 -1 100.00 Receive Inventory Freight from 99000 3933 t TO f mfgadmin f 9086 f 2007-08-31 10:53:38.343-04 2007-08-31 4547 99 A/P 30038 \N 25.00 TPARTS-Toy Parts Inc. MA22 3934 t VO f mfgadmin f 9085 f 2007-08-31 10:53:38.343-04 2007-08-31 4547 95 A/P 30038 \N -25.00 TPARTS-Toy Parts Inc. MA22 3934 t VO f mfgadmin f 9102 f 2007-08-31 11:03:44.609-04 2007-08-31 4555 85 W/O 40006-1 3286 -638.18 Receive Inventory from Manufacturing 3945 t WO f mfgadmin f 9104 f 2007-08-31 11:03:44.609-04 2007-08-31 4556 86 W/O 40006-1 3287 -25.00 Material Issue to Work Order 3946 t WO f mfgadmin f 9103 f 2007-08-31 11:03:44.609-04 2007-08-31 4556 85 W/O 40006-1 3287 25.00 Material Issue to Work Order 3946 t WO f mfgadmin f 9106 f 2007-08-31 11:03:44.609-04 2007-08-31 4557 86 W/O 40006-1 3288 -514.00 Material Issue to Work Order 3947 t WO f mfgadmin f 9105 f 2007-08-31 11:03:44.609-04 2007-08-31 4557 85 W/O 40006-1 3288 514.00 Material Issue to Work Order 3947 t WO f mfgadmin f 9108 f 2007-08-31 11:03:44.609-04 2007-08-31 4558 86 W/O 40006-1 3289 -64.60 Material Issue to Work Order 3948 t WO f mfgadmin f 9107 f 2007-08-31 11:03:44.609-04 2007-08-31 4558 85 W/O 40006-1 3289 64.60 Material Issue to Work Order 3948 t WO f mfgadmin f 9110 f 2007-08-31 11:03:44.609-04 2007-08-31 4559 86 W/O 40006-1 3290 -1.70 Material Issue to Work Order 3949 t WO f mfgadmin f 9109 f 2007-08-31 11:03:44.609-04 2007-08-31 4559 85 W/O 40006-1 3290 1.70 Material Issue to Work Order 3949 t WO f mfgadmin f 9136 f 2007-08-31 11:13:17.234-04 2007-08-31 4571 109 A/R C-41231 \N -534.50 TTOYS-Tremendous Toys Incorporated 3962 t CR t mfgadmin f 9135 f 2007-08-31 11:13:17.234-04 2007-08-31 4571 106 A/R I-60042 \N 534.50 TTOYS-Tremendous Toys Incorporated 3962 t CR f mfgadmin f 9138 f 2007-08-31 11:23:55.218-04 2007-08-31 4572 109 A/P 3034 139 100.00 TPARTS-Toy Parts Inc. 3963 t CK t mfgadmin f 9158 f 2007-09-21 14:51:13.093-04 2007-09-21 4582 85 W/O 10042-1 3298 27.50 Material Issue to Work Order 3976 t WO f mfgadmin f 9161 f 2007-09-21 14:51:13.093-04 2007-09-21 4583 86 W/O 10042-1 3299 -25.00 Material Issue to Work Order 3977 t WO f mfgadmin f 9160 f 2007-09-21 14:51:13.093-04 2007-09-21 4583 85 W/O 10042-1 3299 25.00 Material Issue to Work Order 3977 t WO f mfgadmin f 9162 f 2007-09-21 14:51:13.093-04 2007-09-21 4584 86 W/O 10042-1 3300 64.60 Receive Inventory from Manufacturing 3978 t WO f mfgadmin f 9163 f 2007-09-21 14:51:13.093-04 2007-09-21 4584 85 W/O 10042-1 3300 -64.60 Receive Inventory from Manufacturing 3978 t WO f mfgadmin f 9165 f 2007-09-21 14:51:13.093-04 2007-09-21 4585 86 W/O 10042-1 -1 -1.28 Post Setup Time to Work Order 3979 t WO f mfgadmin f 9164 f 2007-09-21 14:51:13.093-04 2007-09-21 4585 94 W/O 10042-1 -1 1.28 Post Setup Time to Work Order 3979 t WO f mfgadmin f 9167 f 2007-09-21 14:51:13.093-04 2007-09-21 4586 86 W/O 10042-1 -1 -12.10 Post Run Time to Work Order 3980 t WO f mfgadmin f 9166 f 2007-09-21 14:51:13.093-04 2007-09-21 4586 94 W/O 10042-1 -1 12.10 Post Run Time to Work Order 3980 t WO f mfgadmin f 9168 f 2007-09-21 14:51:22.203-04 2007-09-21 4587 86 W/O 10042-1 -1 1.28 Manufacturing Inventory Cost Variance 3981 t WO f mfgadmin f 9169 f 2007-09-21 14:51:22.203-04 2007-09-21 4587 87 W/O 10042-1 -1 -1.28 Manufacturing Inventory Cost Variance 3981 t WO f mfgadmin f 9171 f 2007-09-21 14:51:32.156-04 2007-09-21 4588 86 W/O 50165-1 3301 -25.00 Material Issue to Work Order 3983 t WO f mfgadmin f 9170 f 2007-09-21 14:51:32.156-04 2007-09-21 4588 85 W/O 50165-1 3301 25.00 Material Issue to Work Order 3983 t WO f mfgadmin f 9173 f 2007-09-21 14:51:32.156-04 2007-09-21 4589 86 W/O 50165-1 3302 -1.70 Material Issue to Work Order 3984 t WO f mfgadmin f 9172 f 2007-09-21 14:51:32.156-04 2007-09-21 4589 85 W/O 50165-1 3302 1.70 Material Issue to Work Order 3984 t WO f mfgadmin f 9175 f 2007-09-21 14:51:32.156-04 2007-09-21 4590 86 W/O 50165-1 -1 -1.10 Post Setup Time to Work Order 3985 t WO f mfgadmin f 9174 f 2007-09-21 14:51:32.156-04 2007-09-21 4590 94 W/O 50165-1 -1 1.10 Post Setup Time to Work Order 3985 t WO f mfgadmin f 9177 f 2007-09-21 14:51:32.156-04 2007-09-21 4591 86 W/O 50165-1 -1 -22.00 Post Run Time to Work Order 3986 t WO f mfgadmin f 9176 f 2007-09-21 14:51:32.156-04 2007-09-21 4591 94 W/O 50165-1 -1 22.00 Post Run Time to Work Order 3986 t WO f mfgadmin f 9181 f 2007-09-21 14:51:50.062-04 2007-09-21 4593 86 W/O 50165-1 -1 -2.02 Post Setup Time to Work Order 3988 t WO f mfgadmin f 9180 f 2007-09-21 14:51:50.062-04 2007-09-21 4593 94 W/O 50165-1 -1 2.02 Post Setup Time to Work Order 3988 t WO f mfgadmin f 9183 f 2007-09-21 14:51:50.062-04 2007-09-21 4594 86 W/O 50165-1 -1 -5.68 Post Run Time to Work Order 3989 t WO f mfgadmin f 9182 f 2007-09-21 14:51:50.062-04 2007-09-21 4594 94 W/O 50165-1 -1 5.68 Post Run Time to Work Order 3989 t WO f mfgadmin f 9185 f 2007-09-21 14:52:01.89-04 2007-09-21 4595 86 W/O 50165-1 3304 -64.60 Material Issue to Work Order 3990 t WO f mfgadmin f 9184 f 2007-09-21 14:52:01.89-04 2007-09-21 4595 85 W/O 50165-1 3304 64.60 Material Issue to Work Order 3990 t WO f mfgadmin f 9186 f 2007-09-21 14:52:01.89-04 2007-09-21 4596 86 W/O 50165-1 3305 638.18 Receive Inventory from Manufacturing 3991 t WO f mfgadmin f 9187 f 2007-09-21 14:52:01.89-04 2007-09-21 4596 85 W/O 50165-1 3305 -638.18 Receive Inventory from Manufacturing 3991 t WO f mfgadmin f 9189 f 2007-09-21 14:52:01.89-04 2007-09-21 4597 86 W/O 50165-1 -1 -0.73 Post Setup Time to Work Order 3992 t WO f mfgadmin f 9188 f 2007-09-21 14:52:01.89-04 2007-09-21 4597 94 W/O 50165-1 -1 0.73 Post Setup Time to Work Order 3992 t WO f mfgadmin f 9191 f 2007-09-21 14:52:01.89-04 2007-09-21 4598 86 W/O 50165-1 -1 -1.47 Post Run Time to Work Order 3993 t WO f mfgadmin f 9190 f 2007-09-21 14:52:01.89-04 2007-09-21 4598 94 W/O 50165-1 -1 1.47 Post Run Time to Work Order 3993 t WO f mfgadmin f 9192 f 2007-09-21 14:52:09.39-04 2007-09-21 4599 86 W/O 50165-1 -1 0.12 Manufacturing Inventory Cost Variance 3994 t WO f mfgadmin f 9193 f 2007-09-21 14:52:09.39-04 2007-09-21 4599 87 W/O 50165-1 -1 -0.12 Manufacturing Inventory Cost Variance 3994 t WO f mfgadmin f 9195 f 2007-09-21 14:52:31.734-04 2007-09-21 4600 96 S/R 50165-1 3306 -638.18 Issue to Shipping 3996 t SO f mfgadmin f 9194 f 2007-09-21 14:52:31.734-04 2007-09-21 4600 85 S/R 50165-1 3306 638.18 Issue to Shipping 3996 t SO f mfgadmin f 9197 f 2007-09-21 14:53:18.546-04 2007-09-21 4601 108 S/R 50165 -1 -638.18 Ship Shipment 3997 t SO f mfgadmin f 9196 f 2007-09-21 14:53:18.546-04 2007-09-21 4601 96 S/R 50165 -1 638.18 Ship Shipment 3997 t SO f mfgadmin f 9199 f 2007-09-21 14:56:29.468-04 2007-09-21 4602 106 A/R 60044 \N -1000.00 3998 t IN f mfgadmin f 9198 f 2007-09-21 14:56:29.468-04 2007-09-21 4602 103 A/R 60044 \N 1000.00 3998 t IN f mfgadmin f 9202 f 2007-09-21 14:56:58.14-04 2007-09-21 4603 122 A/R 60043 \N 100.00 3999 t IN f mfgadmin f 9203 f 2007-09-21 14:56:58.14-04 2007-09-21 4603 106 A/R 60043 \N -1097.50 3999 t IN f mfgadmin f 9201 f 2007-09-21 14:56:58.14-04 2007-09-21 4603 102 A/R 60043 \N 47.50 3999 t IN f mfgadmin f 9200 f 2007-09-21 14:56:58.14-04 2007-09-21 4603 103 A/R 60043 \N 950.00 3999 t IN f mfgadmin f 9207 f 2007-09-21 14:58:02.015-04 2007-09-21 4604 123 A/R Unapplied from C-121111 \N 1500.00 TTOYS-Tremendous Toys Incorporated 4000 t CR f mfgadmin f 9204 f 2007-09-21 14:58:02.015-04 2007-09-21 4605 133 A/R 20014 352 1500.00 Unapplied from C-121111 4000 t CD f mfgadmin f 9205 f 2007-09-21 14:58:02.015-04 2007-09-21 4605 123 A/R 20014 352 -1500.00 Unapplied from C-121111 4000 t CD f mfgadmin f 9209 f 2007-09-21 14:58:38.015-04 2007-09-21 4606 133 A/R R -1 -1500.00 20014 4001 t CD f mfgadmin f 9208 f 2007-09-21 14:58:38.015-04 2007-09-21 4606 106 A/R R -1 1500.00 20014 4001 t CD f mfgadmin f 9210 f 2007-09-21 14:58:59.75-04 2007-09-21 4607 106 A/R I-60043 \N 597.50 TTOYS-Tremendous Toys Incorporated 4002 t CR f mfgadmin f 9218 f 2007-12-14 12:16:24.734-05 2007-09-01 4609 85 G/L Ship Order \N 45250.00 4004 t ST f mfgadmin f 9217 f 2007-12-14 12:16:24.734-05 2007-09-01 4609 103 G/L Ship Order \N 75250.00 4004 t ST f mfgadmin f 9228 f 2007-12-14 12:39:54.078-05 2007-12-14 4613 85 S/R 99002 3307 128.50 Issue to Shipping 4008 t TO f mfgadmin f 9230 f 2007-12-14 12:40:16.656-05 2007-12-14 4614 96 I/M 99002 3308 128.50 Ship from Src to Transit Warehouse 4009 t TO f mfgadmin f 9231 f 2007-12-14 12:40:16.656-05 2007-12-14 4614 134 I/M 99002 3308 -128.50 Ship from Src to Transit Warehouse 4009 t TO f mfgadmin f 9233 f 2007-12-14 12:40:56.843-05 2007-12-14 4615 128 I/M 99002 3310 -128.50 Receive from Transit To Dest Warehouse 4010 t TO f mfgadmin f 9232 f 2007-12-14 12:40:56.843-05 2007-12-14 4615 134 I/M 99002 3310 128.50 Receive from Transit To Dest Warehouse 4010 t TO f mfgadmin f 9234 f 2007-12-14 12:42:22.031-05 2007-12-14 4616 95 S/R 20038 3312 1375.00 Receive Inventory from P/O 4012 t PO f mfgadmin f 9235 f 2007-12-14 12:42:22.031-05 2007-12-14 4616 85 S/R 20038 3312 -1375.00 Receive Inventory from P/O 4012 t PO f mfgadmin f 9236 f 2007-12-14 12:42:22.437-05 2007-12-14 4617 95 S/R 20039 3313 1250.00 Receive Inventory from P/O 4014 t PO f mfgadmin f 9237 f 2007-12-14 12:42:22.437-05 2007-12-14 4617 85 S/R 20039 3313 -1250.00 Receive Inventory from P/O 4014 t PO f mfgadmin f 9239 f 2007-12-14 12:44:31.218-05 2007-12-14 4618 99 A/P 30040 \N 1250.00 TPARTS-Toy Parts Inc. RF01001 4016 t VO f mfgadmin f 9238 f 2007-12-14 12:44:31.218-05 2007-12-14 4618 95 A/P 30040 \N -1250.00 TPARTS-Toy Parts Inc. RF01001 4016 t VO f mfgadmin f 9241 f 2007-12-14 12:44:32.234-05 2007-12-14 4619 90 A/P 30041 \N -275.26 XPPI-Packaging Pros LTD RF010001 4016 t VO f mfgadmin f 9242 f 2007-12-14 12:44:32.234-05 2007-12-14 4619 99 A/P 30041 \N 1650.26 XPPI-Packaging Pros LTD RF010001 4016 t VO f mfgadmin f 9240 f 2007-12-14 12:44:32.234-05 2007-12-14 4619 95 A/P 30041 \N -1375.00 XPPI-Packaging Pros LTD RF010001 4016 t VO f mfgadmin f 9245 f 2007-12-14 12:47:46.312-05 2007-12-14 4620 99 A/P 3036 141 -1225.00 TPARTS-Toy Parts Inc. 4019 t CK f mfgadmin f 9244 f 2007-12-14 12:47:46.312-05 2007-12-14 4621 101 A/P 30040 \N 25.00 Discount for V 30040 4020 t DS f mfgadmin f 9243 f 2007-12-14 12:47:46.312-05 2007-12-14 4621 99 A/P 30040 \N -25.00 Discount for V 30040 4020 t DS f mfgadmin f 9248 f 2007-12-14 12:48:12.484-05 2007-12-14 4623 101 A/P 30033 \N 0.60 Discount for V 30033 4023 t DS f mfgadmin f 9247 f 2007-12-14 12:48:12.484-05 2007-12-14 4623 99 A/P 30033 \N -0.60 Discount for V 30033 4023 t DS f mfgadmin f 9253 f 2007-12-14 12:48:12.484-05 2007-12-14 4624 99 A/P 5005 142 -1617.25 XPPI-Packaging Pros LTD 4022 t CK f mfgadmin f 9252 f 2007-12-14 12:48:12.484-05 2007-12-14 4625 101 A/P 30041 \N 33.01 Discount for V 30041 4025 t DS f mfgadmin f 9251 f 2007-12-14 12:48:12.484-05 2007-12-14 4625 99 A/P 30041 \N -33.01 Discount for V 30041 4025 t DS f mfgadmin f 9256 f 2007-12-14 12:54:24.125-05 2007-12-14 4626 86 W/O 10043-1 3314 -1375.00 Material Issue to Work Order 4027 t WO f mfgadmin f 9255 f 2007-12-14 12:54:24.125-05 2007-12-14 4626 85 W/O 10043-1 3314 1375.00 Material Issue to Work Order 4027 t WO f mfgadmin f 9258 f 2007-12-14 12:54:24.125-05 2007-12-14 4627 86 W/O 10043-1 3315 -1512.50 Material Issue to Work Order 4028 t WO f mfgadmin f 9257 f 2007-12-14 12:54:24.125-05 2007-12-14 4627 85 W/O 10043-1 3315 1512.50 Material Issue to Work Order 4028 t WO f mfgadmin f 9259 f 2007-12-14 12:54:24.125-05 2007-12-14 4628 86 W/O 10043-1 3316 3553.00 Receive Inventory from Manufacturing 4029 t WO f mfgadmin f 9260 f 2007-12-14 12:54:24.125-05 2007-12-14 4628 85 W/O 10043-1 3316 -3553.00 Receive Inventory from Manufacturing 4029 t WO f mfgadmin f 9262 f 2007-12-14 12:54:24.125-05 2007-12-14 4629 86 W/O 10043-1 -1 -1.47 Post Setup Time to Work Order 4030 t WO f mfgadmin f 9261 f 2007-12-14 12:54:24.125-05 2007-12-14 4629 94 W/O 10043-1 -1 1.47 Post Setup Time to Work Order 4030 t WO f mfgadmin f 9264 f 2007-12-14 12:54:24.125-05 2007-12-14 4630 86 W/O 10043-1 -1 -586.67 Post Run Time to Work Order 4031 t WO f mfgadmin f 9263 f 2007-12-14 12:54:24.125-05 2007-12-14 4630 94 W/O 10043-1 -1 586.67 Post Run Time to Work Order 4031 t WO f mfgadmin f 9265 f 2007-12-14 12:54:44.265-05 2007-12-14 4631 86 W/O 10043-1 -1 -77.37 Manufacturing Inventory Cost Variance 4032 t WO f mfgadmin f 9266 f 2007-12-14 12:54:44.265-05 2007-12-14 4631 87 W/O 10043-1 -1 77.37 Manufacturing Inventory Cost Variance 4032 t WO f mfgadmin f 9268 f 2007-12-14 12:58:51.468-05 2007-12-14 4632 86 W/O 40007-1 -1 -0.50 Post Run Time to Work Order 4037 t WO f mfgadmin f 9267 f 2007-12-14 12:58:51.468-05 2007-12-14 4632 94 W/O 40007-1 -1 0.50 Post Run Time to Work Order 4037 t WO f mfgadmin f 9270 f 2007-12-14 12:59:10.765-05 2007-12-14 4633 86 W/O 40007-1 3319 -1250.00 Material Issue to Work Order 4038 t WO f mfgadmin f 9269 f 2007-12-14 12:59:10.765-05 2007-12-14 4633 85 W/O 40007-1 3319 1250.00 Material Issue to Work Order 4038 t WO f mfgadmin f 9272 f 2007-12-14 12:59:10.765-05 2007-12-14 4634 86 W/O 40007-1 3320 -85.00 Material Issue to Work Order 4039 t WO f mfgadmin f 9271 f 2007-12-14 12:59:10.765-05 2007-12-14 4634 85 W/O 40007-1 3320 85.00 Material Issue to Work Order 4039 t WO f mfgadmin f 9274 f 2007-12-14 12:59:41.218-05 2007-12-14 4635 86 W/O 40007-1 3321 -25700.00 Material Issue to Work Order 4042 t WO f mfgadmin f 9273 f 2007-12-14 12:59:41.218-05 2007-12-14 4635 85 W/O 40007-1 3321 25700.00 Material Issue to Work Order 4042 t WO f mfgadmin f 9276 f 2007-12-14 12:59:41.218-05 2007-12-14 4636 86 W/O 40007-1 -1 -2.20 Post Setup Time to Work Order 4043 t WO f mfgadmin f 9275 f 2007-12-14 12:59:41.218-05 2007-12-14 4636 94 W/O 40007-1 -1 2.20 Post Setup Time to Work Order 4043 t WO f mfgadmin f 9278 f 2007-12-14 12:59:41.218-05 2007-12-14 4637 86 W/O 40007-1 -1 -275.00 Post Run Time to Work Order 4044 t WO f mfgadmin f 9277 f 2007-12-14 12:59:41.218-05 2007-12-14 4637 94 W/O 40007-1 -1 275.00 Post Run Time to Work Order 4044 t WO f mfgadmin f 9280 f 2007-12-14 12:59:57.046-05 2007-12-14 4638 86 W/O 40007-1 3322 -3230.00 Material Issue to Work Order 4045 t WO f mfgadmin f 9279 f 2007-12-14 12:59:57.046-05 2007-12-14 4638 85 W/O 40007-1 3322 3230.00 Material Issue to Work Order 4045 t WO f mfgadmin f 9281 f 2007-12-14 12:59:57.046-05 2007-12-14 4639 86 W/O 40007-1 3323 31909.00 Receive Inventory from Manufacturing 4046 t WO f mfgadmin f 9282 f 2007-12-14 12:59:57.046-05 2007-12-14 4639 85 W/O 40007-1 3323 -31909.00 Receive Inventory from Manufacturing 4046 t WO f mfgadmin f 9284 f 2007-12-14 12:59:57.046-05 2007-12-14 4640 86 W/O 40007-1 -1 -0.44 Post Setup Time to Work Order 4047 t WO f mfgadmin f 9283 f 2007-12-14 12:59:57.046-05 2007-12-14 4640 94 W/O 40007-1 -1 0.44 Post Setup Time to Work Order 4047 t WO f mfgadmin f 9286 f 2007-12-14 12:59:57.046-05 2007-12-14 4641 86 W/O 40007-1 -1 -220.00 Post Run Time to Work Order 4048 t WO f mfgadmin f 9285 f 2007-12-14 12:59:57.046-05 2007-12-14 4641 94 W/O 40007-1 -1 220.00 Post Run Time to Work Order 4048 t WO f mfgadmin f 9287 f 2007-12-14 13:00:40.359-05 2007-12-14 4642 85 W/O 40007-1 3324 64.25 Material Issue to Work Order 4049 t WO f mfgadmin f 9290 f 2007-12-14 13:00:47.765-05 2007-12-14 4643 87 W/O 40007-1 -1 1081.61 Manufacturing Inventory Cost Variance 4050 t WO f mfgadmin f 9291 f 2007-12-14 13:01:02.421-05 2007-12-14 4644 86 W/O 40007-2 3325 3190.90 Receive Inventory from Manufacturing 4052 t WO f mfgadmin f 9292 f 2007-12-14 13:01:02.421-05 2007-12-14 4644 85 W/O 40007-2 3325 -3190.90 Receive Inventory from Manufacturing 4052 t WO f mfgadmin f 9294 f 2007-12-14 13:01:02.421-05 2007-12-14 4645 86 W/O 40007-2 3326 -125.00 Material Issue to Work Order 4053 t WO f mfgadmin f 9293 f 2007-12-14 13:01:02.421-05 2007-12-14 4645 85 W/O 40007-2 3326 125.00 Material Issue to Work Order 4053 t WO f mfgadmin f 9296 f 2007-12-14 13:01:02.421-05 2007-12-14 4646 86 W/O 40007-2 3327 -2570.00 Material Issue to Work Order 4054 t WO f mfgadmin f 9295 f 2007-12-14 13:01:02.421-05 2007-12-14 4646 85 W/O 40007-2 3327 2570.00 Material Issue to Work Order 4054 t WO f mfgadmin f 9298 f 2007-12-14 13:01:02.421-05 2007-12-14 4647 86 W/O 40007-2 3328 -323.00 Material Issue to Work Order 4055 t WO f mfgadmin f 9297 f 2007-12-14 13:01:02.421-05 2007-12-14 4647 85 W/O 40007-2 3328 323.00 Material Issue to Work Order 4055 t WO f mfgadmin f 9300 f 2007-12-14 13:01:02.421-05 2007-12-14 4648 86 W/O 40007-2 3329 -8.50 Material Issue to Work Order 4056 t WO f mfgadmin f 9299 f 2007-12-14 13:01:02.421-05 2007-12-14 4648 85 W/O 40007-2 3329 8.50 Material Issue to Work Order 4056 t WO f mfgadmin f 9302 f 2007-12-14 13:01:02.421-05 2007-12-14 4649 86 W/O 40007-2 -1 -1.10 Post Setup Time to Work Order 4057 t WO f mfgadmin f 9301 f 2007-12-14 13:01:02.421-05 2007-12-14 4649 94 W/O 40007-2 -1 1.10 Post Setup Time to Work Order 4057 t WO f mfgadmin f 9304 f 2007-12-14 13:01:02.421-05 2007-12-14 4650 86 W/O 40007-2 -1 -55.00 Post Run Time to Work Order 4058 t WO f mfgadmin f 9303 f 2007-12-14 13:01:02.421-05 2007-12-14 4650 94 W/O 40007-2 -1 55.00 Post Run Time to Work Order 4058 t WO f mfgadmin f 9306 f 2007-12-14 13:01:02.421-05 2007-12-14 4651 86 W/O 40007-2 -1 -1.10 Post Setup Time to Work Order 4059 t WO f mfgadmin f 9305 f 2007-12-14 13:01:02.421-05 2007-12-14 4651 94 W/O 40007-2 -1 1.10 Post Setup Time to Work Order 4059 t WO f mfgadmin f 9308 f 2007-12-14 13:01:02.421-05 2007-12-14 4652 86 W/O 40007-2 -1 -55.00 Post Run Time to Work Order 4060 t WO f mfgadmin f 9307 f 2007-12-14 13:01:02.421-05 2007-12-14 4652 94 W/O 40007-2 -1 55.00 Post Run Time to Work Order 4060 t WO f mfgadmin f 9310 f 2007-12-14 13:01:02.421-05 2007-12-14 4653 86 W/O 40007-2 -1 -0.88 Post Setup Time to Work Order 4061 t WO f mfgadmin f 9309 f 2007-12-14 13:01:02.421-05 2007-12-14 4653 94 W/O 40007-2 -1 0.88 Post Setup Time to Work Order 4061 t WO f mfgadmin f 9312 f 2007-12-14 13:01:02.421-05 2007-12-14 4654 86 W/O 40007-2 -1 -44.00 Post Run Time to Work Order 4062 t WO f mfgadmin f 9311 f 2007-12-14 13:01:02.421-05 2007-12-14 4654 94 W/O 40007-2 -1 44.00 Post Run Time to Work Order 4062 t WO f mfgadmin f 9313 f 2007-12-14 13:01:17.109-05 2007-12-14 4655 86 W/O 40007-2 -1 -7.32 Manufacturing Inventory Cost Variance 4063 t WO f mfgadmin f 9314 f 2007-12-14 13:01:17.109-05 2007-12-14 4655 87 W/O 40007-2 -1 7.32 Manufacturing Inventory Cost Variance 4063 t WO f mfgadmin f 9316 f 2007-12-14 13:04:17.796-05 2007-12-14 4656 96 S/R 40007-2 3330 -3190.90 Issue to Shipping 4065 t SO f mfgadmin f 9315 f 2007-12-14 13:04:17.796-05 2007-12-14 4656 85 S/R 40007-2 3330 3190.90 Issue to Shipping 4065 t SO f mfgadmin f 9318 f 2007-12-14 13:04:17.796-05 2007-12-14 4657 96 S/R 40007-1 3331 -31909.00 Issue to Shipping 4066 t SO f mfgadmin f 9317 f 2007-12-14 13:04:17.796-05 2007-12-14 4657 85 S/R 40007-1 3331 31909.00 Issue to Shipping 4066 t SO f mfgadmin f 9320 f 2007-12-14 13:04:29.437-05 2007-12-14 4658 108 S/R 40007 -1 -31909.00 Ship Shipment 4067 t SO f mfgadmin f 9319 f 2007-12-14 13:04:29.437-05 2007-12-14 4658 96 S/R 40007 -1 31909.00 Ship Shipment 4067 t SO f mfgadmin f 9322 f 2007-12-14 13:04:29.437-05 2007-12-14 4659 108 S/R 40007 -1 -3190.90 Ship Shipment 4068 t SO f mfgadmin f 9321 f 2007-12-14 13:04:29.437-05 2007-12-14 4659 96 S/R 40007 -1 3190.90 Ship Shipment 4068 t SO f mfgadmin f 9325 f 2007-12-14 13:06:56.453-05 2007-12-14 4660 122 A/R 60045 \N 185.50 4069 t IN f mfgadmin f 9326 f 2007-12-14 13:06:56.453-05 2007-12-14 4660 106 A/R 60045 \N -53851.24 4069 t IN f mfgadmin f 9324 f 2007-12-14 13:06:56.453-05 2007-12-14 4660 129 A/R 60045 \N 2195.37 4069 t IN f mfgadmin f 9323 f 2007-12-14 13:06:56.453-05 2007-12-14 4660 103 A/R 60045 \N 51470.37 4069 t IN f mfgadmin f 9329 f 2007-12-14 13:13:04.281-05 2007-12-14 4661 118 A/R 70000 \N 0.01 G/L Series Discrepancy 4070 t CM f mfgadmin f 9328 f 2007-12-14 13:13:04.281-05 2007-12-14 4661 106 A/R 70000 \N 9.79 4070 t CM f mfgadmin f 9327 f 2007-12-14 13:13:04.281-05 2007-12-14 4661 135 A/R 70000 \N -9.80 4070 t CM f mfgadmin f 9330 f 2007-12-14 13:20:21.218-05 2007-12-14 4662 136 S/R 80002 3332 63.82 Receive Inventory from R/A 4071 t RA f mfgadmin f 9331 f 2007-12-14 13:20:21.218-05 2007-12-14 4662 85 S/R 80002 3332 -63.82 Receive Inventory from R/A 4071 t RA f mfgadmin f 9332 f 2007-12-14 13:20:21.218-05 2007-12-14 4663 136 S/R 80002 3333 6.38 Receive Inventory from R/A 4073 t RA f mfgadmin f 9333 f 2007-12-14 13:20:21.218-05 2007-12-14 4663 85 S/R 80002 3333 -6.38 Receive Inventory from R/A 4073 t RA f mfgadmin f 9335 f 2007-12-14 13:22:14.218-05 2007-12-14 4664 96 S/R 50167-2 3334 -6.38 Issue to Shipping 4075 t SO f mfgadmin f 9334 f 2007-12-14 13:22:14.218-05 2007-12-14 4664 85 S/R 50167-2 3334 6.38 Issue to Shipping 4075 t SO f mfgadmin f 9337 f 2007-12-14 13:22:14.218-05 2007-12-14 4665 96 S/R 50167-1 3335 -63.82 Issue to Shipping 4076 t SO f mfgadmin f 9336 f 2007-12-14 13:22:14.218-05 2007-12-14 4665 85 S/R 50167-1 3335 63.82 Issue to Shipping 4076 t SO f mfgadmin f 9339 f 2007-12-14 13:22:22.203-05 2007-12-14 4666 108 S/R 50167 -1 -63.82 Ship Shipment 4077 t SO f mfgadmin f 9338 f 2007-12-14 13:22:22.203-05 2007-12-14 4666 96 S/R 50167 -1 63.82 Ship Shipment 4077 t SO f mfgadmin f 9341 f 2007-12-14 13:22:22.203-05 2007-12-14 4667 108 S/R 50167 -1 -6.38 Ship Shipment 4078 t SO f mfgadmin f 9340 f 2007-12-14 13:22:22.203-05 2007-12-14 4667 96 S/R 50167 -1 6.38 Ship Shipment 4078 t SO f mfgadmin f 9347 f 2007-12-14 13:33:21.937-05 2007-12-14 4671 127 A/R C-712787 \N -53841.45 XTRM-Xtreme Toys LTD 4082 t CR t mfgadmin f 9346 f 2007-12-14 13:33:21.937-05 2007-12-14 4671 106 A/R I-60045 \N 53841.45 XTRM-Xtreme Toys LTD 4082 t CR f mfgadmin f 9349 f 2007-12-14 13:34:53.031-05 2007-12-14 4672 108 S/R 50168 -1 -12.76 Ship Shipment 4083 t SO f mfgadmin f 9348 f 2007-12-14 13:34:53.031-05 2007-12-14 4672 96 S/R 50168 -1 12.76 Ship Shipment 4083 t SO f mfgadmin f 9351 f 2007-12-14 13:35:04.562-05 2007-12-14 4673 106 A/R 60047 \N -85.50 4084 t IN f mfgadmin f 9350 f 2007-12-14 13:35:04.562-05 2007-12-14 4673 103 A/R 60047 \N 85.50 4084 t IN f mfgadmin f 9353 f 2007-12-14 13:35:51.406-05 2007-12-14 4674 127 A/R C-1231123 \N -85.50 XTRM-Xtreme Toys LTD 4085 t CR t mfgadmin f 9352 f 2007-12-14 13:35:51.406-05 2007-12-14 4674 106 A/R I-60047 \N 85.50 XTRM-Xtreme Toys LTD 4085 t CR f mfgadmin f 9355 f 2007-12-20 11:40:50.499-05 2007-12-20 4675 86 W/O 40008-1 -1 -8.80 Post Run Time to Work Order 4087 t WO f mfgadmin f 9354 f 2007-12-20 11:40:50.499-05 2007-12-20 4675 94 W/O 40008-1 -1 8.80 Post Run Time to Work Order 4087 t WO f mfgadmin f 9357 f 2007-12-20 11:43:14.859-05 2007-12-20 4676 86 W/O 40008-1 3339 -51.40 Material Issue to Work Order 4089 t WO f mfgadmin f 9356 f 2007-12-20 11:43:14.859-05 2007-12-20 4676 85 W/O 40008-1 3339 51.40 Material Issue to Work Order 4089 t WO f mfgadmin f 9359 f 2007-12-20 11:43:35.265-05 2007-12-20 4677 86 W/O 40008-1 -1 -70.83 Post Run Time to Work Order 4091 t WO f mfgadmin f 9358 f 2007-12-20 11:43:35.265-05 2007-12-20 4677 94 W/O 40008-1 -1 70.83 Post Run Time to Work Order 4091 t WO f mfgadmin f 9361 f 2007-12-20 11:44:18.921-05 2007-12-20 4678 86 W/O 40008-1 -1 -8.25 Post Run Time to Work Order 4093 t WO f mfgadmin f 9360 f 2007-12-20 11:44:18.921-05 2007-12-20 4678 94 W/O 40008-1 -1 8.25 Post Run Time to Work Order 4093 t WO f mfgadmin f 9362 f 2007-12-20 11:46:03.249-05 2007-12-20 4679 86 S/R 40008-1 -1 139.28 Issue to Shipping 4094 t SO f mfgadmin f 9363 f 2007-12-20 11:46:03.249-05 2007-12-20 4679 96 S/R 40008-1 -1 -139.28 Issue to Shipping 4094 t SO f mfgadmin f 9365 f 2007-12-20 11:46:19.249-05 2007-12-20 4680 108 S/R 40008 -1 -139.28 Ship Shipment 4095 t SO f mfgadmin f 9364 f 2007-12-20 11:46:19.249-05 2007-12-20 4680 96 S/R 40008 -1 139.28 Ship Shipment 4095 t SO f mfgadmin f 9367 f 2007-12-20 11:58:07.109-05 2007-12-20 4681 122 A/R 60048 \N 185.50 4096 t IN f mfgadmin f 9368 f 2007-12-20 11:58:07.109-05 2007-12-20 4681 106 A/R 60048 \N -742.00 4096 t IN f mfgadmin f 9366 f 2007-12-20 11:58:07.109-05 2007-12-20 4681 103 A/R 60048 \N 556.50 4096 t IN f mfgadmin f 9370 f 2007-12-20 11:58:43.374-05 2007-12-20 4682 127 A/R C-12123 \N -742.00 XTRM-Xtreme Toys LTD 4097 t CR t mfgadmin f 9369 f 2007-12-20 11:58:43.374-05 2007-12-20 4682 106 A/R I-60048 \N 742.00 XTRM-Xtreme Toys LTD 4097 t CR f mfgadmin f 9488 f 2008-03-04 14:50:42.018531-05 2008-01-15 4740 108 G/L Ship Order \N -45250.00 4167 t ST f jsmith f 9489 f 2008-03-04 14:50:42.018531-05 2008-01-15 4740 109 G/L Ship Order \N -77250.00 4167 t ST t jsmith f 9487 f 2008-03-04 14:50:42.018531-05 2008-01-15 4740 85 G/L Ship Order \N 45250.00 4167 t ST f jsmith f 9490 f 2008-03-04 14:50:42.018531-05 2008-01-15 4740 103 G/L Ship Order \N 77250.00 4167 t ST f jsmith f 10633 f 2008-12-31 15:41:18.751794-05 2008-01-01 5283 86 G/L Adjustment \N 19.77 Adjustment 5333 t JE f jsmith f 10634 f 2008-12-31 15:41:18.751794-05 2008-01-01 5283 99 G/L Adjustment \N -262.97 Adjustment 5333 t JE f jsmith f 10635 f 2008-12-31 15:41:18.751794-05 2008-01-01 5283 95 G/L Adjustment \N 91.00 Adjustment 5333 t JE f jsmith f 10637 f 2008-12-31 15:44:33.486643-05 2008-01-01 5285 91 G/L Adjustment -1 91.00 Adjustment 5334 t JE f jsmith f 10638 f 2008-12-31 15:44:33.486643-05 2008-01-01 5285 86 G/L Adjustment -1 -91.00 Adjustment 5334 t JE f jsmith f 9967 f 2008-06-19 16:15:51.460829-04 2008-02-15 4967 86 G/L MA-01001 \N -2.23 Demo corrections for release. 4674 t JE f jsmith f 9968 f 2008-06-19 16:15:51.460829-04 2008-02-15 4967 109 G/L MA-01001 \N 275002.23 Demo corrections for release. 4674 t JE t jsmith f 9966 f 2008-06-19 16:15:51.460829-04 2008-02-15 4967 138 G/L MA-01001 \N -25000.00 Demo corrections for release. 4674 t JE f jsmith f 9965 f 2008-06-19 16:15:51.460829-04 2008-02-15 4967 85 G/L MA-01001 \N -250000.00 Demo corrections for release. 4674 t JE f jsmith f 9371 f 2008-03-04 13:32:50.580975-05 2008-03-04 4683 95 S/R 20040 3340 25.00 Receive Inventory from P/O 4099 t PO f jsmith f 9372 f 2008-03-04 13:32:50.580975-05 2008-03-04 4683 138 S/R 20040 3340 -25.00 Receive Inventory from P/O 4099 t PO f jsmith f 9373 f 2008-03-04 13:32:50.580975-05 2008-03-04 4684 95 S/R 20040 3341 250.00 Receive Inventory from P/O 4101 t PO f jsmith f 9374 f 2008-03-04 13:32:50.580975-05 2008-03-04 4684 138 S/R 20040 3341 -250.00 Receive Inventory from P/O 4101 t PO f jsmith f 9381 f 2008-03-04 13:50:55.481281-05 2008-03-04 4688 86 W/O 10044-1 3342 64.60 Receive Inventory from Manufacturing 4108 t WO f jsmith f 9382 f 2008-03-04 13:50:55.481281-05 2008-03-04 4688 138 W/O 10044-1 3342 -64.60 Receive Inventory from Manufacturing 4108 t WO f jsmith f 9384 f 2008-03-04 13:50:55.481281-05 2008-03-04 4689 86 W/O 10044-1 3343 -27.50 Material Issue to Work Order 4109 t WO f jsmith f 9383 f 2008-03-04 13:50:55.481281-05 2008-03-04 4689 138 W/O 10044-1 3343 27.50 Material Issue to Work Order 4109 t WO f jsmith f 9386 f 2008-03-04 13:50:55.481281-05 2008-03-04 4690 86 W/O 10044-1 3344 -25.00 Material Issue to Work Order 4110 t WO f jsmith f 9385 f 2008-03-04 13:50:55.481281-05 2008-03-04 4690 138 W/O 10044-1 3344 25.00 Material Issue to Work Order 4110 t WO f jsmith f 9394 f 2008-03-04 13:51:21.731285-05 2008-03-04 4694 86 W/O 10045-1 3346 -2.50 Material Issue to Work Order 4116 t WO f jsmith f 9393 f 2008-03-04 13:51:21.731285-05 2008-03-04 4694 138 W/O 10045-1 3346 2.50 Material Issue to Work Order 4116 t WO f jsmith f 9396 f 2008-03-04 13:51:21.731285-05 2008-03-04 4695 86 W/O 10045-1 3347 -6.46 Material Issue to Work Order 4117 t WO f jsmith f 9395 f 2008-03-04 13:51:21.731285-05 2008-03-04 4695 138 W/O 10045-1 3347 6.46 Material Issue to Work Order 4117 t WO f jsmith f 9400 f 2008-03-04 13:51:21.731285-05 2008-03-04 4697 86 W/O 10045-1 3349 -51.40 Material Issue to Work Order 4119 t WO f jsmith f 9399 f 2008-03-04 13:51:21.731285-05 2008-03-04 4697 138 W/O 10045-1 3349 51.40 Material Issue to Work Order 4119 t WO f jsmith f 9401 f 2008-03-04 13:51:21.731285-05 2008-03-04 4698 94 W/O 10045-1 -1 1.10 Post Setup Time to Work Order 4120 t WO f jsmith f 9404 f 2008-03-04 13:51:21.731285-05 2008-03-04 4699 86 W/O 10045-1 -1 -2.20 Post Run Time to Work Order 4121 t WO f jsmith f 9403 f 2008-03-04 13:51:21.731285-05 2008-03-04 4699 94 W/O 10045-1 -1 2.20 Post Run Time to Work Order 4121 t WO f jsmith f 9406 f 2008-03-04 13:51:21.731285-05 2008-03-04 4700 86 W/O 10045-1 -1 -2.20 Post Setup Time to Work Order 4122 t WO f jsmith f 9407 f 2008-03-04 13:51:21.731285-05 2008-03-04 4701 94 W/O 10045-1 -1 0.55 Post Run Time to Work Order 4123 t WO f jsmith f 9410 f 2008-03-04 13:51:21.731285-05 2008-03-04 4702 86 W/O 10045-1 -1 -0.44 Post Setup Time to Work Order 4124 t WO f jsmith f 9409 f 2008-03-04 13:51:21.731285-05 2008-03-04 4702 94 W/O 10045-1 -1 0.44 Post Setup Time to Work Order 4124 t WO f jsmith f 9412 f 2008-03-04 13:51:21.731285-05 2008-03-04 4703 86 W/O 10045-1 -1 -0.22 Post Run Time to Work Order 4125 t WO f jsmith f 9411 f 2008-03-04 13:51:21.731285-05 2008-03-04 4703 94 W/O 10045-1 -1 0.22 Post Run Time to Work Order 4125 t WO f jsmith f 9413 f 2008-03-04 13:52:47.476609-05 2008-03-04 4704 86 W/O 10045-1 -1 -96.58 Manufacturing Inventory Cost Variance 4126 t WO f jsmith f 9414 f 2008-03-04 13:52:47.476609-05 2008-03-04 4704 87 W/O 10045-1 -1 96.58 Manufacturing Inventory Cost Variance 4126 t WO f jsmith f 9415 f 2008-03-04 14:12:42.842887-05 2008-03-04 4705 86 W/O 10046-1 3350 64.60 Receive Inventory from Manufacturing 4128 t WO f jsmith f 9416 f 2008-03-04 14:12:42.842887-05 2008-03-04 4705 138 W/O 10046-1 3350 -64.60 Receive Inventory from Manufacturing 4128 t WO f jsmith f 9418 f 2008-03-04 14:12:42.842887-05 2008-03-04 4706 86 W/O 10046-1 3351 -27.50 Material Issue to Work Order 4129 t WO f jsmith f 9417 f 2008-03-04 14:12:42.842887-05 2008-03-04 4706 138 W/O 10046-1 3351 27.50 Material Issue to Work Order 4129 t WO f jsmith f 9420 f 2008-03-04 14:12:42.842887-05 2008-03-04 4707 86 W/O 10046-1 3352 -25.00 Material Issue to Work Order 4130 t WO f jsmith f 9419 f 2008-03-04 14:12:42.842887-05 2008-03-04 4707 138 W/O 10046-1 3352 25.00 Material Issue to Work Order 4130 t WO f jsmith f 9422 f 2008-03-04 14:12:42.842887-05 2008-03-04 4708 86 W/O 10046-1 -1 -1.10 Post Setup Time to Work Order 4131 t WO f jsmith f 9421 f 2008-03-04 14:12:42.842887-05 2008-03-04 4708 94 W/O 10046-1 -1 1.10 Post Setup Time to Work Order 4131 t WO f jsmith f 9424 f 2008-03-04 14:12:42.842887-05 2008-03-04 4709 86 W/O 10046-1 -1 -11.00 Post Run Time to Work Order 4132 t WO f jsmith f 9423 f 2008-03-04 14:12:42.842887-05 2008-03-04 4709 94 W/O 10046-1 -1 11.00 Post Run Time to Work Order 4132 t WO f jsmith f 9425 f 2008-03-04 14:12:56.581783-05 2008-03-04 4710 86 W/O 10048-1 3353 638.18 Receive Inventory from Manufacturing 4135 t WO f jsmith f 9426 f 2008-03-04 14:12:56.581783-05 2008-03-04 4710 85 W/O 10048-1 3353 -638.18 Receive Inventory from Manufacturing 4135 t WO f jsmith f 9428 f 2008-03-04 14:12:56.581783-05 2008-03-04 4711 86 W/O 10048-1 3354 -25.00 Material Issue to Work Order 4136 t WO f jsmith f 9427 f 2008-03-04 14:12:56.581783-05 2008-03-04 4711 138 W/O 10048-1 3354 25.00 Material Issue to Work Order 4136 t WO f jsmith f 9430 f 2008-03-04 14:12:56.581783-05 2008-03-04 4712 86 W/O 10048-1 3355 -1.70 Material Issue to Work Order 4137 t WO f jsmith f 9429 f 2008-03-04 14:12:56.581783-05 2008-03-04 4712 138 W/O 10048-1 3355 1.70 Material Issue to Work Order 4137 t WO f jsmith f 9434 f 2008-03-04 14:12:56.581783-05 2008-03-04 4714 86 W/O 10048-1 3357 -64.60 Material Issue to Work Order 4139 t WO f jsmith f 9433 f 2008-03-04 14:12:56.581783-05 2008-03-04 4714 138 W/O 10048-1 3357 64.60 Material Issue to Work Order 4139 t WO f jsmith f 9436 f 2008-03-04 14:12:56.581783-05 2008-03-04 4715 86 W/O 10048-1 -1 -1.10 Post Setup Time to Work Order 4140 t WO f jsmith f 9435 f 2008-03-04 14:12:56.581783-05 2008-03-04 4715 94 W/O 10048-1 -1 1.10 Post Setup Time to Work Order 4140 t WO f jsmith f 9438 f 2008-03-04 14:12:56.581783-05 2008-03-04 4716 86 W/O 10048-1 -1 -22.00 Post Run Time to Work Order 4141 t WO f jsmith f 9437 f 2008-03-04 14:12:56.581783-05 2008-03-04 4716 94 W/O 10048-1 -1 22.00 Post Run Time to Work Order 4141 t WO f jsmith f 9440 f 2008-03-04 14:12:56.581783-05 2008-03-04 4717 86 W/O 10048-1 -1 -2.20 Post Setup Time to Work Order 4142 t WO f jsmith f 9439 f 2008-03-04 14:12:56.581783-05 2008-03-04 4717 94 W/O 10048-1 -1 2.20 Post Setup Time to Work Order 4142 t WO f jsmith f 9442 f 2008-03-04 14:12:56.581783-05 2008-03-04 4718 86 W/O 10048-1 -1 -5.50 Post Run Time to Work Order 4143 t WO f jsmith f 9441 f 2008-03-04 14:12:56.581783-05 2008-03-04 4718 94 W/O 10048-1 -1 5.50 Post Run Time to Work Order 4143 t WO f jsmith f 9444 f 2008-03-04 14:12:56.581783-05 2008-03-04 4719 86 W/O 10048-1 -1 -0.44 Post Setup Time to Work Order 4144 t WO f jsmith f 9443 f 2008-03-04 14:12:56.581783-05 2008-03-04 4719 94 W/O 10048-1 -1 0.44 Post Setup Time to Work Order 4144 t WO f jsmith f 9446 f 2008-03-04 14:12:56.581783-05 2008-03-04 4720 86 W/O 10048-1 -1 -2.20 Post Run Time to Work Order 4145 t WO f jsmith f 9445 f 2008-03-04 14:12:56.581783-05 2008-03-04 4720 94 W/O 10048-1 -1 2.20 Post Run Time to Work Order 4145 t WO f jsmith f 9447 f 2008-03-04 14:13:56.021518-05 2008-03-04 4721 86 W/O 10048-1 -1 0.56 Manufacturing Inventory Cost Variance 4146 t WO f jsmith f 9448 f 2008-03-04 14:13:56.021518-05 2008-03-04 4721 87 W/O 10048-1 -1 -0.56 Manufacturing Inventory Cost Variance 4146 t WO f jsmith f 9449 f 2008-03-04 14:14:07.002445-05 2008-03-04 4722 86 W/O 10047-1 3358 49.15 Receive Inventory from Manufacturing 4148 t WO f jsmith f 9450 f 2008-03-04 14:14:07.002445-05 2008-03-04 4722 85 W/O 10047-1 3358 -49.15 Receive Inventory from Manufacturing 4148 t WO f jsmith f 9452 f 2008-03-04 14:14:07.002445-05 2008-03-04 4723 86 W/O 10047-1 3359 -0.75 Material Issue to Work Order 4149 t WO f jsmith f 9451 f 2008-03-04 14:14:07.002445-05 2008-03-04 4723 138 W/O 10047-1 3359 0.75 Material Issue to Work Order 4149 t WO f jsmith f 9454 f 2008-03-04 14:14:07.002445-05 2008-03-04 4724 86 W/O 10047-1 3360 -0.05 Material Issue to Work Order 4150 t WO f jsmith f 9453 f 2008-03-04 14:14:07.002445-05 2008-03-04 4724 138 W/O 10047-1 3360 0.05 Material Issue to Work Order 4150 t WO f jsmith f 9456 f 2008-03-04 14:14:07.002445-05 2008-03-04 4725 86 W/O 10047-1 3361 -15.42 Material Issue to Work Order 4151 t WO f jsmith f 9455 f 2008-03-04 14:14:07.002445-05 2008-03-04 4725 138 W/O 10047-1 3361 15.42 Material Issue to Work Order 4151 t WO f jsmith f 9458 f 2008-03-04 14:14:07.002445-05 2008-03-04 4726 86 W/O 10047-1 3362 -1.94 Material Issue to Work Order 4152 t WO f jsmith f 9457 f 2008-03-04 14:14:07.002445-05 2008-03-04 4726 138 W/O 10047-1 3362 1.94 Material Issue to Work Order 4152 t WO f jsmith f 9460 f 2008-03-04 14:14:07.002445-05 2008-03-04 4727 86 W/O 10047-1 -1 -1.10 Post Setup Time to Work Order 4153 t WO f jsmith f 9459 f 2008-03-04 14:14:07.002445-05 2008-03-04 4727 94 W/O 10047-1 -1 1.10 Post Setup Time to Work Order 4153 t WO f jsmith f 9462 f 2008-03-04 14:14:07.002445-05 2008-03-04 4728 86 W/O 10047-1 -1 -0.66 Post Run Time to Work Order 4154 t WO f jsmith f 9461 f 2008-03-04 14:14:07.002445-05 2008-03-04 4728 94 W/O 10047-1 -1 0.66 Post Run Time to Work Order 4154 t WO f jsmith f 9464 f 2008-03-04 14:14:07.002445-05 2008-03-04 4729 86 W/O 10047-1 -1 -2.20 Post Setup Time to Work Order 4155 t WO f jsmith f 9463 f 2008-03-04 14:14:07.002445-05 2008-03-04 4729 94 W/O 10047-1 -1 2.20 Post Setup Time to Work Order 4155 t WO f jsmith f 9466 f 2008-03-04 14:14:07.002445-05 2008-03-04 4730 86 W/O 10047-1 -1 -0.17 Post Run Time to Work Order 4156 t WO f jsmith f 9465 f 2008-03-04 14:14:07.002445-05 2008-03-04 4730 94 W/O 10047-1 -1 0.17 Post Run Time to Work Order 4156 t WO f jsmith f 9470 f 2008-03-04 14:14:07.002445-05 2008-03-04 4732 86 W/O 10047-1 -1 -0.07 Post Run Time to Work Order 4158 t WO f jsmith f 9469 f 2008-03-04 14:14:07.002445-05 2008-03-04 4732 94 W/O 10047-1 -1 0.07 Post Run Time to Work Order 4158 t WO f jsmith f 9471 f 2008-03-04 14:14:42.493533-05 2008-03-04 4733 86 W/O 10047-1 -1 -26.36 Manufacturing Inventory Cost Variance 4159 t WO f jsmith f 9472 f 2008-03-04 14:14:42.493533-05 2008-03-04 4733 87 W/O 10047-1 -1 26.36 Manufacturing Inventory Cost Variance 4159 t WO f jsmith f 9474 f 2008-03-04 14:14:57.827315-05 2008-03-04 4734 96 S/R 50169-1 3363 -49.15 Issue to Shipping 4161 t SO f jsmith f 9473 f 2008-03-04 14:14:57.827315-05 2008-03-04 4734 85 S/R 50169-1 3363 49.15 Issue to Shipping 4161 t SO f jsmith f 9476 f 2008-03-04 14:14:57.827315-05 2008-03-04 4735 96 S/R 50169-2 3364 -638.18 Issue to Shipping 4162 t SO f jsmith f 9475 f 2008-03-04 14:14:57.827315-05 2008-03-04 4735 85 S/R 50169-2 3364 638.18 Issue to Shipping 4162 t SO f jsmith f 9478 f 2008-03-04 14:22:17.337822-05 2008-03-04 4736 108 S/R 50169 -1 -49.15 Ship Shipment 4163 t SO f jsmith f 9477 f 2008-03-04 14:22:17.337822-05 2008-03-04 4736 96 S/R 50169 -1 49.15 Ship Shipment 4163 t SO f jsmith f 9480 f 2008-03-04 14:22:17.337822-05 2008-03-04 4737 108 S/R 50169 -1 -638.18 Ship Shipment 4164 t SO f jsmith f 9479 f 2008-03-04 14:22:17.337822-05 2008-03-04 4737 96 S/R 50169 -1 638.18 Ship Shipment 4164 t SO f jsmith f 9483 f 2008-03-04 14:22:51.268176-05 2008-03-04 4738 122 A/R 60049 \N 59.00 4165 t IN f jsmith f 9484 f 2008-03-04 14:22:51.268176-05 2008-03-04 4738 106 A/R 60049 \N -1337.17 4165 t IN f jsmith f 9482 f 2008-03-04 14:22:51.268176-05 2008-03-04 4738 102 A/R 60049 \N 60.87 4165 t IN f jsmith f 9481 f 2008-03-04 14:22:51.268176-05 2008-03-04 4738 103 A/R 60049 \N 1217.30 4165 t IN f jsmith f 9485 f 2008-03-04 14:48:50.799029-05 2008-03-04 4739 106 A/R I-60049 \N 1337.17 TTOYS-Tremendous Toys Incorporated 4166 t CR f jsmith f 9496 f 2008-03-04 14:58:41.775501-05 2008-03-04 4742 92 I/M Rain Damage 3365 -56.20 Material Scrap\nRain Damage 4169 t f jsmith f 9495 f 2008-03-04 14:58:41.775501-05 2008-03-04 4742 138 I/M Rain Damage 3365 56.20 Material Scrap\nRain Damage 4169 t f jsmith f 9497 f 2008-03-04 15:00:49.342762-05 2008-03-04 4743 95 S/R 20041 3366 25.00 Receive Inventory from P/O 4170 t PO f jsmith f 9498 f 2008-03-04 15:00:49.342762-05 2008-03-04 4743 138 S/R 20041 3366 -25.00 Receive Inventory from P/O 4170 t PO f jsmith f 9500 f 2008-03-04 15:02:11.642193-05 2008-03-04 4744 90 A/P 30043 \N -5.00 XPPI-Packaging Pros LTD MA10001 4172 t VO f jsmith f 9502 f 2008-03-04 15:02:11.642193-05 2008-03-04 4744 99 A/P 30043 \N 42.85 XPPI-Packaging Pros LTD MA10001 4172 t VO f jsmith f 9499 f 2008-03-04 15:02:11.642193-05 2008-03-04 4744 95 A/P 30043 \N -25.00 XPPI-Packaging Pros LTD MA10001 4172 t VO f jsmith f 9501 f 2008-03-04 15:02:11.642193-05 2008-03-04 4744 120 A/P 30043 \N -12.85 XPPI-Packaging Pros LTD MA10001 4172 t VO f jsmith f 9506 f 2008-03-04 15:03:14.291081-05 2008-03-04 4745 126 A/P 5006 144 41.99 XPPI-Packaging Pros LTD 4174 t CK t jsmith f 9505 f 2008-03-04 15:03:14.291081-05 2008-03-04 4745 99 A/P 5006 144 -41.99 XPPI-Packaging Pros LTD 4174 t CK f jsmith f 9504 f 2008-03-04 15:03:14.291081-05 2008-03-04 4746 101 A/P 30043 \N 0.86 Discount for V 30043 4175 t DS f jsmith f 9503 f 2008-03-04 15:03:14.291081-05 2008-03-04 4746 99 A/P 30043 \N -0.86 Discount for V 30043 4175 t DS f jsmith f 9507 f 2008-03-04 16:24:15.174532-05 2008-03-04 4747 137 S/R 80007 3367 16.38 Receive Inventory from R/A 4177 t RA f jsmith f 9508 f 2008-03-04 16:24:15.174532-05 2008-03-04 4747 128 S/R 80007 3367 -16.38 Receive Inventory from R/A 4177 t RA f jsmith f 9510 f 2008-03-04 16:28:09.617709-05 2008-03-04 4748 128 I/M MA09001 \N -16.38 Inter-Warehouse Transfer 4179 t Misc f jsmith f 9509 f 2008-03-04 16:28:09.617709-05 2008-03-04 4748 85 I/M MA09001 \N 16.38 Inter-Warehouse Transfer 4179 t Misc f jsmith f 9511 f 2008-03-04 16:28:48.025446-05 2008-03-04 4749 128 S/R 50170-1 3370 16.38 Issue to Shipping 4180 t SO f jsmith f 9512 f 2008-03-04 16:28:48.025446-05 2008-03-04 4749 130 S/R 50170-1 3370 -16.38 Issue to Shipping 4180 t SO f jsmith f 9514 f 2008-03-04 16:28:57.604454-05 2008-03-04 4750 137 S/R 50170 -1 -16.38 Ship Shipment 4181 t SO f jsmith f 9513 f 2008-03-04 16:28:57.604454-05 2008-03-04 4750 130 S/R 50170 -1 16.38 Ship Shipment 4181 t SO f jsmith f 9515 f 2008-03-04 16:35:37.5038-05 2008-03-04 4752 137 S/R 80008 3371 16.38 Receive Inventory from R/A 4183 t RA f jsmith f 9516 f 2008-03-04 16:35:37.5038-05 2008-03-04 4752 128 S/R 80008 3371 -16.38 Receive Inventory from R/A 4183 t RA f jsmith f 9518 f 2008-03-04 16:36:38.714943-05 2008-03-04 4753 96 S/R 50171-2 3372 -16.38 Issue to Shipping 4185 t SO f jsmith f 9517 f 2008-03-04 16:36:38.714943-05 2008-03-04 4753 85 S/R 50171-2 3372 16.38 Issue to Shipping 4185 t SO f jsmith f 9520 f 2008-03-04 16:36:50.739787-05 2008-03-04 4754 137 S/R 50171 -1 -16.38 Ship Shipment 4186 t SO f jsmith f 9521 f 2008-03-05 13:45:29.502058-05 2008-03-05 4755 95 S/R 20042 3373 25.00 Receive Inventory from P/O 4187 t PO f jsmith f 9522 f 2008-03-05 13:45:29.502058-05 2008-03-05 4755 138 S/R 20042 3373 -25.00 Receive Inventory from P/O 4187 t PO f jsmith f 9525 f 2008-03-05 13:45:49.678937-05 2008-03-05 4756 99 A/P 30044 \N 35.00 TPARTS-Toy Parts Inc. RF10001 4189 t VO f jsmith f 9523 f 2008-03-05 13:45:49.678937-05 2008-03-05 4756 95 A/P 30044 \N -25.00 TPARTS-Toy Parts Inc. RF10001 4189 t VO f jsmith f 9524 f 2008-03-05 13:45:49.678937-05 2008-03-05 4756 120 A/P 30044 \N -10.00 TPARTS-Toy Parts Inc. RF10001 4189 t VO f jsmith f 9529 f 2008-03-05 13:46:29.52948-05 2008-03-05 4757 109 A/P 3038 145 34.30 TPARTS-Toy Parts Inc. 4191 t CK t jsmith f 9528 f 2008-03-05 13:46:29.52948-05 2008-03-05 4757 99 A/P 3038 145 -34.30 TPARTS-Toy Parts Inc. 4191 t CK f jsmith f 9527 f 2008-03-05 13:46:29.52948-05 2008-03-05 4758 101 A/P 30044 \N 0.70 Discount for V 30044 4192 t DS f jsmith f 9526 f 2008-03-05 13:46:29.52948-05 2008-03-05 4758 99 A/P 30044 \N -0.70 Discount for V 30044 4192 t DS f jsmith f 9531 f 2008-03-05 13:47:57.845732-05 2008-03-05 4759 86 W/O 10049-1 3374 -25.00 Material Issue to Work Order 4194 t WO f jsmith f 9530 f 2008-03-05 13:47:57.845732-05 2008-03-05 4759 138 W/O 10049-1 3374 25.00 Material Issue to Work Order 4194 t WO f jsmith f 9533 f 2008-03-05 13:47:57.845732-05 2008-03-05 4760 86 W/O 10049-1 3375 -27.50 Material Issue to Work Order 4195 t WO f jsmith f 9532 f 2008-03-05 13:47:57.845732-05 2008-03-05 4760 138 W/O 10049-1 3375 27.50 Material Issue to Work Order 4195 t WO f jsmith f 9534 f 2008-03-05 13:47:57.845732-05 2008-03-05 4761 86 W/O 10049-1 3376 64.60 Receive Inventory from Manufacturing 4196 t WO f jsmith f 9535 f 2008-03-05 13:47:57.845732-05 2008-03-05 4761 138 W/O 10049-1 3376 -64.60 Receive Inventory from Manufacturing 4196 t WO f jsmith f 9537 f 2008-03-05 13:47:57.845732-05 2008-03-05 4762 86 W/O 10049-1 -1 -0.92 Post Setup Time to Work Order 4197 t WO f jsmith f 9536 f 2008-03-05 13:47:57.845732-05 2008-03-05 4762 94 W/O 10049-1 -1 0.92 Post Setup Time to Work Order 4197 t WO f jsmith f 9539 f 2008-03-05 13:47:57.845732-05 2008-03-05 4763 86 W/O 10049-1 -1 -10.82 Post Run Time to Work Order 4198 t WO f jsmith f 9538 f 2008-03-05 13:47:57.845732-05 2008-03-05 4763 94 W/O 10049-1 -1 10.82 Post Run Time to Work Order 4198 t WO f jsmith f 9541 f 2008-03-05 13:48:23.073216-05 2008-03-05 4764 93 W/O 10049-1 -1 -0.50 Scrap Material from Work Order 4199 t WO f jsmith f 9540 f 2008-03-05 13:48:23.073216-05 2008-03-05 4764 86 W/O 10049-1 -1 0.50 Scrap Material from Work Order 4199 t WO f jsmith f 9543 f 2008-03-05 13:48:50.70616-05 2008-03-05 4765 93 W/O 10049-1 -1 -1.75 Scrap Material from Work Order 4200 t WO f jsmith f 9542 f 2008-03-05 13:48:50.70616-05 2008-03-05 4765 86 W/O 10049-1 -1 1.75 Scrap Material from Work Order 4200 t WO f jsmith f 9544 f 2008-03-05 13:48:59.472888-05 2008-03-05 4766 86 W/O 10049-1 -1 -0.37 Manufacturing Inventory Cost Variance 4201 t WO f jsmith f 9545 f 2008-03-05 13:48:59.472888-05 2008-03-05 4766 87 W/O 10049-1 -1 0.37 Manufacturing Inventory Cost Variance 4201 t WO f jsmith f 9546 f 2008-03-05 13:49:15.295821-05 2008-03-05 4767 86 W/O 50172-1 3377 638.18 Receive Inventory from Manufacturing 4203 t WO f jsmith f 9547 f 2008-03-05 13:49:15.295821-05 2008-03-05 4767 85 W/O 50172-1 3377 -638.18 Receive Inventory from Manufacturing 4203 t WO f jsmith f 9549 f 2008-03-05 13:49:15.295821-05 2008-03-05 4768 86 W/O 50172-1 3378 -25.00 Material Issue to Work Order 4204 t WO f jsmith f 9548 f 2008-03-05 13:49:15.295821-05 2008-03-05 4768 138 W/O 50172-1 3378 25.00 Material Issue to Work Order 4204 t WO f jsmith f 9551 f 2008-03-05 13:49:15.295821-05 2008-03-05 4769 86 W/O 50172-1 3379 -64.60 Material Issue to Work Order 4205 t WO f jsmith f 9550 f 2008-03-05 13:49:15.295821-05 2008-03-05 4769 138 W/O 50172-1 3379 64.60 Material Issue to Work Order 4205 t WO f jsmith f 9553 f 2008-03-05 13:49:15.295821-05 2008-03-05 4770 86 W/O 50172-1 3380 -1.70 Material Issue to Work Order 4206 t WO f jsmith f 9552 f 2008-03-05 13:49:15.295821-05 2008-03-05 4770 138 W/O 50172-1 3380 1.70 Material Issue to Work Order 4206 t WO f jsmith f 9555 f 2008-03-05 13:49:15.295821-05 2008-03-05 4771 86 W/O 50172-1 3381 -514.00 Material Issue to Work Order 4207 t WO f jsmith f 9554 f 2008-03-05 13:49:15.295821-05 2008-03-05 4771 138 W/O 50172-1 3381 514.00 Material Issue to Work Order 4207 t WO f jsmith f 9557 f 2008-03-05 13:49:15.295821-05 2008-03-05 4772 86 W/O 50172-1 -1 -1.10 Post Setup Time to Work Order 4208 t WO f jsmith f 9556 f 2008-03-05 13:49:15.295821-05 2008-03-05 4772 94 W/O 50172-1 -1 1.10 Post Setup Time to Work Order 4208 t WO f jsmith f 9559 f 2008-03-05 13:49:15.295821-05 2008-03-05 4773 86 W/O 50172-1 -1 -22.00 Post Run Time to Work Order 4209 t WO f jsmith f 9558 f 2008-03-05 13:49:15.295821-05 2008-03-05 4773 94 W/O 50172-1 -1 22.00 Post Run Time to Work Order 4209 t WO f jsmith f 9561 f 2008-03-05 13:49:15.295821-05 2008-03-05 4774 86 W/O 50172-1 -1 -2.20 Post Setup Time to Work Order 4210 t WO f jsmith f 9560 f 2008-03-05 13:49:15.295821-05 2008-03-05 4774 94 W/O 50172-1 -1 2.20 Post Setup Time to Work Order 4210 t WO f jsmith f 9563 f 2008-03-05 13:49:15.295821-05 2008-03-05 4775 86 W/O 50172-1 -1 -5.50 Post Run Time to Work Order 4211 t WO f jsmith f 9562 f 2008-03-05 13:49:15.295821-05 2008-03-05 4775 94 W/O 50172-1 -1 5.50 Post Run Time to Work Order 4211 t WO f jsmith f 9565 f 2008-03-05 13:49:15.295821-05 2008-03-05 4776 86 W/O 50172-1 -1 -0.44 Post Setup Time to Work Order 4212 t WO f jsmith f 9564 f 2008-03-05 13:49:15.295821-05 2008-03-05 4776 94 W/O 50172-1 -1 0.44 Post Setup Time to Work Order 4212 t WO f jsmith f 9567 f 2008-03-05 13:49:15.295821-05 2008-03-05 4777 86 W/O 50172-1 -1 -2.20 Post Run Time to Work Order 4213 t WO f jsmith f 9566 f 2008-03-05 13:49:15.295821-05 2008-03-05 4777 94 W/O 50172-1 -1 2.20 Post Run Time to Work Order 4213 t WO f jsmith f 9568 f 2008-03-05 13:49:26.767851-05 2008-03-05 4778 86 W/O 50172-1 -1 0.56 Manufacturing Inventory Cost Variance 4214 t WO f jsmith f 9569 f 2008-03-05 13:49:26.767851-05 2008-03-05 4778 87 W/O 50172-1 -1 -0.56 Manufacturing Inventory Cost Variance 4214 t WO f jsmith f 9571 f 2008-03-05 13:49:55.908928-05 2008-03-05 4779 96 S/R 50172-1 3382 -638.18 Issue to Shipping 4216 t SO f jsmith f 9570 f 2008-03-05 13:49:55.908928-05 2008-03-05 4779 85 S/R 50172-1 3382 638.18 Issue to Shipping 4216 t SO f jsmith f 9573 f 2008-03-05 13:50:01.927414-05 2008-03-05 4780 108 S/R 50172 -1 -638.18 Ship Shipment 4217 t SO f jsmith f 9572 f 2008-03-05 13:50:01.927414-05 2008-03-05 4780 96 S/R 50172 -1 638.18 Ship Shipment 4217 t SO f jsmith f 9576 f 2008-03-05 13:50:21.043998-05 2008-03-05 4781 106 A/R 60052 \N -997.50 4218 t IN f jsmith f 9575 f 2008-03-05 13:50:21.043998-05 2008-03-05 4781 102 A/R 60052 \N 47.50 4218 t IN f jsmith f 9574 f 2008-03-05 13:50:21.043998-05 2008-03-05 4781 103 A/R 60052 \N 950.00 4218 t IN f jsmith f 9577 f 2008-03-05 13:53:41.360466-05 2008-03-05 4782 106 A/R I-60052 \N 997.50 TTOYS-Tremendous Toys Incorporated 4219 t CR f jsmith f 9579 f 2008-03-05 13:57:29.476095-05 2008-03-05 4783 137 S/R 80009 3383 16.38 Receive Inventory from R/A 4220 t RA f jsmith f 9580 f 2008-03-05 13:57:29.476095-05 2008-03-05 4783 128 S/R 80009 3383 -16.38 Receive Inventory from R/A 4220 t RA f jsmith f 9582 f 2008-03-05 13:59:02.754616-05 2008-03-05 4784 96 S/R 50173-1 3384 -16.38 Issue to Shipping 4222 t SO f jsmith f 9581 f 2008-03-05 13:59:02.754616-05 2008-03-05 4784 85 S/R 50173-1 3384 16.38 Issue to Shipping 4222 t SO f jsmith f 9583 f 2008-03-05 13:59:16.887841-05 2008-03-05 4785 96 S/R 50173 -1 16.38 Ship Shipment 4223 t SO f jsmith f 9584 f 2008-03-05 13:59:16.887841-05 2008-03-05 4785 137 S/R 50173 -1 -16.38 Ship Shipment 4223 t SO f jsmith f 9586 f 2008-03-05 14:15:32.220233-05 2008-03-05 4787 113 G/L MA01001 -1 -0.01 Rounding Correction 4225 t JE f jsmith f 9585 f 2008-03-05 14:15:32.220233-05 2008-03-05 4787 106 G/L MA01001 -1 0.01 Rounding Correction 4225 t JE f jsmith f 9953 f 2008-06-19 15:55:12.080553-04 2008-03-15 4964 85 G/L Ship Order \N 45250.00 4671 t ST f jsmith f 9956 f 2008-06-19 15:55:12.080553-04 2008-03-15 4964 103 G/L Ship Order \N 77250.00 4671 t ST f jsmith f 9658 f 2008-06-12 11:56:16.215653-04 2008-06-12 4821 127 A/R C-123111 \N -1980.00 XTRM-Xtreme Toys LTD 4266 t CR t jsmith f 9665 f 2008-06-12 13:20:44.562889-04 2008-06-12 4825 128 P/D Post Cost 309 -90.00 Set Standard Cost - Direct Labor for item STOCKCAR1 4269 t f jsmith f 9666 f 2008-06-12 13:20:44.562889-04 2008-06-12 4826 87 P/D Post Cost 308 2.10 Set Standard Cost - Direct Labor for item STOCKCAR1 4270 t f jsmith f 9667 f 2008-06-12 13:20:44.562889-04 2008-06-12 4826 85 P/D Post Cost 308 -2.10 Set Standard Cost - Direct Labor for item STOCKCAR1 4270 t f jsmith f 9668 f 2008-06-12 13:20:44.562889-04 2008-06-12 4827 87 P/D Post Cost 309 9.00 Set Standard Cost - Overhead for item STOCKCAR1 4271 t f jsmith f 9669 f 2008-06-12 13:20:44.562889-04 2008-06-12 4827 128 P/D Post Cost 309 -9.00 Set Standard Cost - Overhead for item STOCKCAR1 4271 t f jsmith f 9670 f 2008-06-12 13:20:44.562889-04 2008-06-12 4828 87 P/D Post Cost 308 0.21 Set Standard Cost - Overhead for item STOCKCAR1 4272 t f jsmith f 9671 f 2008-06-12 13:20:44.562889-04 2008-06-12 4828 85 P/D Post Cost 308 -0.21 Set Standard Cost - Overhead for item STOCKCAR1 4272 t f jsmith f 9672 f 2008-06-12 13:20:44.562889-04 2008-06-12 4829 87 P/D Post Cost 325 0.71 Set Standard Cost - Material for item STRUCK1 4281 t f jsmith f 9673 f 2008-06-12 13:20:44.562889-04 2008-06-12 4829 128 P/D Post Cost 325 -0.71 Set Standard Cost - Material for item STRUCK1 4281 t f jsmith f 9674 f 2008-06-12 13:20:44.562889-04 2008-06-12 4830 87 P/D Post Cost 323 1.65 Set Standard Cost - Material for item STRUCK1 4282 t f jsmith f 9675 f 2008-06-12 13:20:44.562889-04 2008-06-12 4830 85 P/D Post Cost 323 -1.65 Set Standard Cost - Material for item STRUCK1 4282 t f jsmith f 9676 f 2008-06-12 13:20:44.562889-04 2008-06-12 4831 87 P/D Post Cost 305 10.00 Set Standard Cost - Material for item CBUMP 4324 t f jsmith f 9677 f 2008-06-12 13:20:44.562889-04 2008-06-12 4831 138 P/D Post Cost 305 -10.00 Set Standard Cost - Material for item CBUMP 4324 t f jsmith f 9678 f 2008-06-12 13:20:44.562889-04 2008-06-12 4832 87 P/D Post Cost 309 300.00 Set Standard Cost - Material for item STOCKCAR1 4326 t f jsmith f 9679 f 2008-06-12 13:20:44.562889-04 2008-06-12 4832 128 P/D Post Cost 309 -300.00 Set Standard Cost - Material for item STOCKCAR1 4326 t f jsmith f 9680 f 2008-06-12 13:20:44.562889-04 2008-06-12 4833 87 P/D Post Cost 308 7.00 Set Standard Cost - Material for item STOCKCAR1 4327 t f jsmith f 9681 f 2008-06-12 13:20:44.562889-04 2008-06-12 4833 85 P/D Post Cost 308 -7.00 Set Standard Cost - Material for item STOCKCAR1 4327 t f jsmith f 9682 f 2008-06-12 13:20:44.562889-04 2008-06-12 4834 87 P/D Post Cost 321 -711.00 Post Actual Cost to Standard for item TWHEEL1 4414 t f jsmith f 9683 f 2008-06-12 13:20:44.562889-04 2008-06-12 4834 128 P/D Post Cost 321 711.00 Post Actual Cost to Standard for item TWHEEL1 4414 t f jsmith f 9684 f 2008-06-12 13:20:44.562889-04 2008-06-12 4835 87 P/D Post Cost 299 -4882.20 Post Actual Cost to Standard for item TWHEEL1 4415 t f jsmith f 9685 f 2008-06-12 13:20:44.562889-04 2008-06-12 4835 138 P/D Post Cost 299 4882.20 Post Actual Cost to Standard for item TWHEEL1 4415 t f jsmith f 9686 f 2008-06-12 13:20:44.562889-04 2008-06-12 4836 87 P/D Post Cost 309 -1422.00 Set Standard Cost - Material for item STOCKCAR1 4416 t f jsmith f 9687 f 2008-06-12 13:20:44.562889-04 2008-06-12 4836 128 P/D Post Cost 309 1422.00 Set Standard Cost - Material for item STOCKCAR1 4416 t f jsmith f 9688 f 2008-06-12 13:20:44.562889-04 2008-06-12 4837 87 P/D Post Cost 308 -33.18 Set Standard Cost - Material for item STOCKCAR1 4417 t f jsmith f 9689 f 2008-06-12 13:20:44.562889-04 2008-06-12 4837 85 P/D Post Cost 308 33.18 Set Standard Cost - Material for item STOCKCAR1 4417 t f jsmith f 9690 f 2008-06-12 13:20:44.562889-04 2008-06-12 4838 87 P/D Post Cost 325 -14.22 Set Standard Cost - Material for item STRUCK1 4430 t f jsmith f 9691 f 2008-06-12 13:20:44.562889-04 2008-06-12 4838 128 P/D Post Cost 325 14.22 Set Standard Cost - Material for item STRUCK1 4430 t f jsmith f 9692 f 2008-06-12 13:20:44.562889-04 2008-06-12 4839 87 P/D Post Cost 323 -33.18 Set Standard Cost - Material for item STRUCK1 4431 t f jsmith f 9693 f 2008-06-12 13:20:44.562889-04 2008-06-12 4839 85 P/D Post Cost 323 33.18 Set Standard Cost - Material for item STRUCK1 4431 t f jsmith f 9694 f 2008-06-12 13:20:44.562889-04 2008-06-12 4840 87 P/D Post Cost 297 -735.63 Post Actual Cost to Standard for item YPAINT1 4444 t f jsmith f 9695 f 2008-06-12 13:20:44.562889-04 2008-06-12 4840 138 P/D Post Cost 297 735.63 Post Actual Cost to Standard for item YPAINT1 4444 t f jsmith f 9696 f 2008-06-12 13:20:44.562889-04 2008-06-12 4841 87 P/D Post Cost 297 -113.17 Post Actual Cost to Standard for item YPAINT1 4445 t f jsmith f 9697 f 2008-06-12 13:20:44.562889-04 2008-06-12 4841 138 P/D Post Cost 297 113.17 Post Actual Cost to Standard for item YPAINT1 4445 t f jsmith f 9698 f 2008-06-12 13:20:44.562889-04 2008-06-12 4842 87 P/D Post Cost 309 -2.34 Set Standard Cost - Material for item STOCKCAR1 4446 t f jsmith f 9699 f 2008-06-12 13:20:44.562889-04 2008-06-12 4842 128 P/D Post Cost 309 2.34 Set Standard Cost - Material for item STOCKCAR1 4446 t f jsmith f 9700 f 2008-06-12 13:20:44.562889-04 2008-06-12 4843 87 P/D Post Cost 308 -0.05 Set Standard Cost - Material for item STOCKCAR1 4447 t f jsmith f 9701 f 2008-06-12 13:20:44.562889-04 2008-06-12 4843 85 P/D Post Cost 308 0.05 Set Standard Cost - Material for item STOCKCAR1 4447 t f jsmith f 9702 f 2008-06-12 13:20:44.562889-04 2008-06-12 4844 87 P/D Post Cost 309 -0.36 Set Standard Cost - Special Handling for item STOCKCAR1 4458 t f jsmith f 9703 f 2008-06-12 13:20:44.562889-04 2008-06-12 4844 128 P/D Post Cost 309 0.36 Set Standard Cost - Special Handling for item STOCKCAR1 4458 t f jsmith f 9704 f 2008-06-12 13:20:44.562889-04 2008-06-12 4845 87 P/D Post Cost 308 -0.01 Set Standard Cost - Special Handling for item STOCKCAR1 4459 t f jsmith f 9705 f 2008-06-12 13:20:44.562889-04 2008-06-12 4845 85 P/D Post Cost 308 0.01 Set Standard Cost - Special Handling for item STOCKCAR1 4459 t f jsmith f 9706 f 2008-06-12 13:20:44.562889-04 2008-06-12 4846 87 P/D Post Cost 325 -0.02 Set Standard Cost - Material for item STRUCK1 4460 t f jsmith f 9707 f 2008-06-12 13:20:44.562889-04 2008-06-12 4846 128 P/D Post Cost 325 0.02 Set Standard Cost - Material for item STRUCK1 4460 t f jsmith f 9708 f 2008-06-12 13:20:44.562889-04 2008-06-12 4847 87 P/D Post Cost 323 -0.05 Set Standard Cost - Material for item STRUCK1 4461 t f jsmith f 9709 f 2008-06-12 13:20:44.562889-04 2008-06-12 4847 85 P/D Post Cost 323 0.05 Set Standard Cost - Material for item STRUCK1 4461 t f jsmith f 9710 f 2008-06-12 13:20:44.562889-04 2008-06-12 4848 87 P/D Post Cost 323 -0.01 Set Standard Cost - Special Handling for item STRUCK1 4473 t f jsmith f 9711 f 2008-06-12 13:20:44.562889-04 2008-06-12 4848 85 P/D Post Cost 323 0.01 Set Standard Cost - Special Handling for item STRUCK1 4473 t f jsmith f 9712 f 2008-06-12 13:20:44.562889-04 2008-06-12 4849 87 P/D Post Cost 312 28.50 Post Actual Cost to Standard for item HUB1 4474 t f jsmith f 9713 f 2008-06-12 13:20:44.562889-04 2008-06-12 4849 138 P/D Post Cost 312 -28.50 Post Actual Cost to Standard for item HUB1 4474 t f jsmith f 9714 f 2008-06-12 13:20:44.562889-04 2008-06-12 4850 87 P/D Post Cost 312 0.11 Post Actual Cost to Standard for item HUB1 4475 t f jsmith f 9715 f 2008-06-12 13:20:44.562889-04 2008-06-12 4850 138 P/D Post Cost 312 -0.11 Post Actual Cost to Standard for item HUB1 4475 t f jsmith f 9716 f 2008-06-12 13:20:44.562889-04 2008-06-12 4851 87 P/D Post Cost 312 0.17 Post Actual Cost to Standard for item HUB1 4476 t f jsmith f 9717 f 2008-06-12 13:20:44.562889-04 2008-06-12 4851 138 P/D Post Cost 312 -0.17 Post Actual Cost to Standard for item HUB1 4476 t f jsmith f 9718 f 2008-06-12 13:20:44.562889-04 2008-06-12 4852 87 P/D Post Cost 312 10.69 Post Actual Cost to Standard for item HUB1 4477 t f jsmith f 9719 f 2008-06-12 13:20:44.562889-04 2008-06-12 4852 138 P/D Post Cost 312 -10.69 Post Actual Cost to Standard for item HUB1 4477 t f jsmith f 9720 f 2008-06-12 13:20:44.562889-04 2008-06-12 4853 87 P/D Post Cost 309 900.00 Set Standard Cost - Material for item STOCKCAR1 4478 t f jsmith f 9721 f 2008-06-12 13:20:44.562889-04 2008-06-12 4853 128 P/D Post Cost 309 -900.00 Set Standard Cost - Material for item STOCKCAR1 4478 t f jsmith f 9722 f 2008-06-12 13:20:44.562889-04 2008-06-12 4854 87 P/D Post Cost 308 21.00 Set Standard Cost - Material for item STOCKCAR1 4479 t f jsmith f 9723 f 2008-06-12 13:20:44.562889-04 2008-06-12 4854 85 P/D Post Cost 308 -21.00 Set Standard Cost - Material for item STOCKCAR1 4479 t f jsmith f 9724 f 2008-06-12 13:20:44.562889-04 2008-06-12 4855 87 P/D Post Cost 309 3.60 Set Standard Cost - Direct Labor for item STOCKCAR1 4480 t f jsmith f 9725 f 2008-06-12 13:20:44.562889-04 2008-06-12 4855 128 P/D Post Cost 309 -3.60 Set Standard Cost - Direct Labor for item STOCKCAR1 4480 t f jsmith f 9726 f 2008-06-12 13:20:44.562889-04 2008-06-12 4856 87 P/D Post Cost 308 0.08 Set Standard Cost - Direct Labor for item STOCKCAR1 4481 t f jsmith f 9727 f 2008-06-12 13:20:44.562889-04 2008-06-12 4856 85 P/D Post Cost 308 -0.08 Set Standard Cost - Direct Labor for item STOCKCAR1 4481 t f jsmith f 9728 f 2008-06-12 13:20:44.562889-04 2008-06-12 4857 87 P/D Post Cost 309 5.28 Set Standard Cost - Overhead for item STOCKCAR1 4482 t f jsmith f 9729 f 2008-06-12 13:20:44.562889-04 2008-06-12 4857 128 P/D Post Cost 309 -5.28 Set Standard Cost - Overhead for item STOCKCAR1 4482 t f jsmith f 9730 f 2008-06-12 13:20:44.562889-04 2008-06-12 4858 87 P/D Post Cost 308 0.12 Set Standard Cost - Overhead for item STOCKCAR1 4483 t f jsmith f 9731 f 2008-06-12 13:20:44.562889-04 2008-06-12 4858 85 P/D Post Cost 308 -0.12 Set Standard Cost - Overhead for item STOCKCAR1 4483 t f jsmith f 9732 f 2008-06-12 13:20:44.562889-04 2008-06-12 4859 87 P/D Post Cost 309 337.56 Set Standard Cost - Special Handling for item STOCKCAR1 4490 t f jsmith f 9733 f 2008-06-12 13:20:44.562889-04 2008-06-12 4859 128 P/D Post Cost 309 -337.56 Set Standard Cost - Special Handling for item STOCKCAR1 4490 t f jsmith f 9734 f 2008-06-12 13:20:44.562889-04 2008-06-12 4860 87 P/D Post Cost 308 7.88 Set Standard Cost - Special Handling for item STOCKCAR1 4491 t f jsmith f 9735 f 2008-06-12 13:20:44.562889-04 2008-06-12 4860 85 P/D Post Cost 308 -7.88 Set Standard Cost - Special Handling for item STOCKCAR1 4491 t f jsmith f 9736 f 2008-06-12 13:20:44.562889-04 2008-06-12 4861 87 P/D Post Cost 318 627.55 Post Actual Cost to Standard for item YPAINT2 4525 t f jsmith f 9737 f 2008-06-12 13:20:44.562889-04 2008-06-12 4861 138 P/D Post Cost 318 -627.55 Post Actual Cost to Standard for item YPAINT2 4525 t f jsmith f 9738 f 2008-06-12 13:20:44.562889-04 2008-06-12 4862 87 P/D Post Cost 318 70.95 Post Actual Cost to Standard for item YPAINT2 4526 t f jsmith f 9739 f 2008-06-12 13:20:44.562889-04 2008-06-12 4862 138 P/D Post Cost 318 -70.95 Post Actual Cost to Standard for item YPAINT2 4526 t f jsmith f 9740 f 2008-06-12 13:20:44.562889-04 2008-06-12 4863 87 P/D Post Cost 309 -1.20 Post Actual Cost to Standard for item STOCKCAR1 4531 t f jsmith f 9741 f 2008-06-12 13:20:44.562889-04 2008-06-12 4863 128 P/D Post Cost 309 1.20 Post Actual Cost to Standard for item STOCKCAR1 4531 t f jsmith f 9742 f 2008-06-12 13:20:44.562889-04 2008-06-12 4864 87 P/D Post Cost 308 -0.03 Post Actual Cost to Standard for item STOCKCAR1 4532 t f jsmith f 9743 f 2008-06-12 13:20:44.562889-04 2008-06-12 4864 85 P/D Post Cost 308 0.03 Post Actual Cost to Standard for item STOCKCAR1 4532 t f jsmith f 9744 f 2008-06-12 13:20:44.562889-04 2008-06-12 4865 87 P/D Post Cost 309 -0.12 Post Actual Cost to Standard for item STOCKCAR1 4535 t f jsmith f 9745 f 2008-06-12 13:20:44.562889-04 2008-06-12 4865 128 P/D Post Cost 309 0.12 Post Actual Cost to Standard for item STOCKCAR1 4535 t f jsmith f 9746 f 2008-06-12 13:20:44.562889-04 2008-06-12 4866 87 P/D Post Cost 325 -0.01 Post Actual Cost to Standard for item STRUCK1 4543 t f jsmith f 9747 f 2008-06-12 13:20:44.562889-04 2008-06-12 4866 128 P/D Post Cost 325 0.01 Post Actual Cost to Standard for item STRUCK1 4543 t f jsmith f 9748 f 2008-06-12 13:20:44.562889-04 2008-06-12 4867 87 P/D Post Cost 323 -0.03 Post Actual Cost to Standard for item STRUCK1 4544 t f jsmith f 9749 f 2008-06-12 13:20:44.562889-04 2008-06-12 4867 85 P/D Post Cost 323 0.03 Post Actual Cost to Standard for item STRUCK1 4544 t f jsmith f 9750 f 2008-06-12 13:20:44.562889-04 2008-06-12 4868 87 P/D Post Cost 313 1042.00 Post Actual Cost to Standard for item FEN1 4553 t f jsmith f 9751 f 2008-06-12 13:20:44.562889-04 2008-06-12 4868 138 P/D Post Cost 313 -1042.00 Post Actual Cost to Standard for item FEN1 4553 t f jsmith f 9752 f 2008-06-12 13:20:44.562889-04 2008-06-12 4869 87 P/D Post Cost 313 4.17 Post Actual Cost to Standard for item FEN1 4554 t f jsmith f 9753 f 2008-06-12 13:20:44.562889-04 2008-06-12 4869 138 P/D Post Cost 313 -4.17 Post Actual Cost to Standard for item FEN1 4554 t f jsmith f 9754 f 2008-06-12 13:20:44.562889-04 2008-06-12 4870 87 P/D Post Cost 313 6.15 Post Actual Cost to Standard for item FEN1 4555 t f jsmith f 9755 f 2008-06-12 13:20:44.562889-04 2008-06-12 4870 138 P/D Post Cost 313 -6.15 Post Actual Cost to Standard for item FEN1 4555 t f jsmith f 9756 f 2008-06-12 13:20:44.562889-04 2008-06-12 4871 87 P/D Post Cost 313 390.75 Post Actual Cost to Standard for item FEN1 4556 t f jsmith f 9757 f 2008-06-12 13:20:44.562889-04 2008-06-12 4871 138 P/D Post Cost 313 -390.75 Post Actual Cost to Standard for item FEN1 4556 t f jsmith f 9758 f 2008-06-12 13:41:42.025527-04 2008-06-12 4872 95 S/R 20045 3399 25.00 Receive Inventory from P/O 4558 t PO f jsmith f 9759 f 2008-06-12 13:41:42.025527-04 2008-06-12 4872 138 S/R 20045 3399 -25.00 Receive Inventory from P/O 4558 t PO f jsmith f 9760 f 2008-06-12 13:41:42.025527-04 2008-06-12 4873 95 S/R 20045 3400 50.00 Receive Inventory from P/O 4560 t PO f jsmith f 9761 f 2008-06-12 13:41:42.025527-04 2008-06-12 4873 138 S/R 20045 3400 -50.00 Receive Inventory from P/O 4560 t PO f jsmith f 9762 f 2008-06-12 13:42:31.474517-04 2008-06-12 4874 95 S/R 20046 3401 2000.00 Receive Inventory from P/O 4562 t PO f jsmith f 9763 f 2008-06-12 13:42:31.474517-04 2008-06-12 4874 138 S/R 20046 3401 -2000.00 Receive Inventory from P/O 4562 t PO f jsmith f 9764 f 2008-06-12 13:44:52.924492-04 2008-06-12 4875 95 S/R 20045 3402 -2.50 Receive Inventory from PO 4564 t PO f jsmith f 9765 f 2008-06-12 13:44:52.924492-04 2008-06-12 4875 138 S/R 20045 3402 2.50 Receive Inventory from PO 4564 t PO f jsmith f 9766 f 2008-06-12 13:56:06.107925-04 2008-06-12 4876 95 S/R 20047 3403 2000.00 Receive Inventory from P/O 4565 t PO f jsmith f 9767 f 2008-06-12 13:56:06.107925-04 2008-06-12 4876 138 S/R 20047 3403 -2000.00 Receive Inventory from P/O 4565 t PO f jsmith f 9769 f 2008-06-12 14:28:26.6468-04 2008-06-12 4877 90 A/P 30048 \N 800.00 WCHEM-World Chem, Inc. RF10001 4567 t VO f jsmith f 9771 f 2008-06-12 14:28:26.6468-04 2008-06-12 4877 99 A/P 30048 \N 1300.00 WCHEM-World Chem, Inc. RF10001 4567 t VO f jsmith f 9768 f 2008-06-12 14:28:26.6468-04 2008-06-12 4877 95 A/P 30048 \N -2000.00 WCHEM-World Chem, Inc. RF10001 4567 t VO f jsmith f 9770 f 2008-06-12 14:28:26.6468-04 2008-06-12 4877 139 A/P 30048 \N -100.00 WCHEM-World Chem, Inc. RF10001 4567 t VO f jsmith f 9773 f 2008-06-12 14:30:56.739019-04 2008-06-12 4878 90 A/P 30049 \N 800.00 WCHEM-World Chem, Inc. RF10001 4568 t VO f jsmith f 9775 f 2008-06-12 14:30:56.739019-04 2008-06-12 4878 99 A/P 30049 \N 1300.00 WCHEM-World Chem, Inc. RF10001 4568 t VO f jsmith f 9772 f 2008-06-12 14:30:56.739019-04 2008-06-12 4878 95 A/P 30049 \N -2000.00 WCHEM-World Chem, Inc. RF10001 4568 t VO f jsmith f 9774 f 2008-06-12 14:30:56.739019-04 2008-06-12 4878 139 A/P 30049 \N -100.00 WCHEM-World Chem, Inc. RF10001 4568 t VO f jsmith f 9776 f 2008-06-12 14:36:16.448766-04 2008-06-12 4879 95 S/R 20048 3404 25.00 Receive Inventory from P/O 4569 t PO f jsmith f 9777 f 2008-06-12 14:36:16.448766-04 2008-06-12 4879 138 S/R 20048 3404 -25.00 Receive Inventory from P/O 4569 t PO f jsmith f 9778 f 2008-06-12 14:36:42.310623-04 2008-06-12 4880 86 W/O 10051-1 3405 87.10 Receive Inventory from Manufacturing 4571 t WO f jsmith f 9779 f 2008-06-12 14:36:42.310623-04 2008-06-12 4880 138 W/O 10051-1 3405 -87.10 Receive Inventory from Manufacturing 4571 t WO f jsmith f 9781 f 2008-06-12 14:36:42.310623-04 2008-06-12 4881 86 W/O 10051-1 3406 -25.00 Material Issue to Work Order 4572 t WO f jsmith f 9780 f 2008-06-12 14:36:42.310623-04 2008-06-12 4881 138 W/O 10051-1 3406 25.00 Material Issue to Work Order 4572 t WO f jsmith f 9783 f 2008-06-12 14:36:42.310623-04 2008-06-12 4882 86 W/O 10051-1 3407 -27.50 Material Issue to Work Order 4573 t WO f jsmith f 9782 f 2008-06-12 14:36:42.310623-04 2008-06-12 4882 138 W/O 10051-1 3407 27.50 Material Issue to Work Order 4573 t WO f jsmith f 9785 f 2008-06-12 14:36:42.310623-04 2008-06-12 4883 86 W/O 10051-1 -1 -1.10 Post Setup Time to Work Order 4574 t WO f jsmith f 9784 f 2008-06-12 14:36:42.310623-04 2008-06-12 4883 94 W/O 10051-1 -1 1.10 Post Setup Time to Work Order 4574 t WO f jsmith f 9787 f 2008-06-12 14:36:42.310623-04 2008-06-12 4884 86 W/O 10051-1 -1 -11.00 Post Run Time to Work Order 4575 t WO f jsmith f 9786 f 2008-06-12 14:36:42.310623-04 2008-06-12 4884 94 W/O 10051-1 -1 11.00 Post Run Time to Work Order 4575 t WO f jsmith f 9788 f 2008-06-12 14:36:47.100347-04 2008-06-12 4885 86 W/O 10051-1 -1 -22.50 Manufacturing Inventory Cost Variance 4576 t WO f jsmith f 9789 f 2008-06-12 14:36:47.100347-04 2008-06-12 4885 87 W/O 10051-1 -1 22.50 Manufacturing Inventory Cost Variance 4576 t WO f jsmith f 9801 f 2008-06-12 14:40:48.275013-04 2008-06-12 4891 86 W/O 50176-1 -1 -0.92 Post Setup Time to Work Order 4583 t WO f jsmith f 9800 f 2008-06-12 14:40:48.275013-04 2008-06-12 4891 94 W/O 50176-1 -1 0.92 Post Setup Time to Work Order 4583 t WO f jsmith f 9803 f 2008-06-12 14:40:48.275013-04 2008-06-12 4892 86 W/O 50176-1 -1 -0.20 Post Run Time to Work Order 4584 t WO f jsmith f 9802 f 2008-06-12 14:40:48.275013-04 2008-06-12 4892 94 W/O 50176-1 -1 0.20 Post Run Time to Work Order 4584 t WO f jsmith f 9805 f 2008-06-12 14:41:08.863585-04 2008-06-12 4893 86 W/O 50176-1 -1 -0.55 Post Setup Time to Work Order 4585 t WO f jsmith f 9804 f 2008-06-12 14:41:08.863585-04 2008-06-12 4893 94 W/O 50176-1 -1 0.55 Post Setup Time to Work Order 4585 t WO f jsmith f 9807 f 2008-06-12 14:41:08.863585-04 2008-06-12 4894 86 W/O 50176-1 -1 -0.02 Post Run Time to Work Order 4586 t WO f jsmith f 9806 f 2008-06-12 14:41:08.863585-04 2008-06-12 4894 94 W/O 50176-1 -1 0.02 Post Run Time to Work Order 4586 t WO f jsmith f 9809 f 2008-06-12 14:41:29.975571-04 2008-06-12 4895 86 W/O 50176-1 -1 -0.29 Post Setup Time to Work Order 4587 t WO f jsmith f 9808 f 2008-06-12 14:41:29.975571-04 2008-06-12 4895 94 W/O 50176-1 -1 0.29 Post Setup Time to Work Order 4587 t WO f jsmith f 9811 f 2008-06-12 14:41:29.975571-04 2008-06-12 4896 86 W/O 50176-1 -1 -0.03 Post Run Time to Work Order 4588 t WO f jsmith f 9810 f 2008-06-12 14:41:29.975571-04 2008-06-12 4896 94 W/O 50176-1 -1 0.03 Post Run Time to Work Order 4588 t WO f jsmith f 9813 f 2008-06-12 14:41:41.29455-04 2008-06-12 4897 86 W/O 50176-1 3411 -0.25 Material Issue to Work Order 4589 t WO f jsmith f 9812 f 2008-06-12 14:41:41.29455-04 2008-06-12 4897 138 W/O 50176-1 3411 0.25 Material Issue to Work Order 4589 t WO f jsmith f 9815 f 2008-06-12 14:41:41.29455-04 2008-06-12 4898 86 W/O 50176-1 3412 -20.00 Material Issue to Work Order 4590 t WO f jsmith f 9814 f 2008-06-12 14:41:41.29455-04 2008-06-12 4898 138 W/O 50176-1 3412 20.00 Material Issue to Work Order 4590 t WO f jsmith f 9817 f 2008-06-12 14:41:41.29455-04 2008-06-12 4899 86 W/O 50176-1 3413 -0.01 Material Issue to Work Order 4591 t WO f jsmith f 9816 f 2008-06-12 14:41:41.29455-04 2008-06-12 4899 138 W/O 50176-1 3413 0.01 Material Issue to Work Order 4591 t WO f jsmith f 9819 f 2008-06-12 14:41:41.29455-04 2008-06-12 4900 86 W/O 50176-1 3414 -0.87 Material Issue to Work Order 4592 t WO f jsmith f 9818 f 2008-06-12 14:41:41.29455-04 2008-06-12 4900 138 W/O 50176-1 3414 0.87 Material Issue to Work Order 4592 t WO f jsmith f 9821 f 2008-06-12 14:41:41.29455-04 2008-06-12 4901 86 W/O 50176-1 3415 -0.40 Material Issue to Work Order 4593 t WO f jsmith f 9820 f 2008-06-12 14:41:41.29455-04 2008-06-12 4901 138 W/O 50176-1 3415 0.40 Material Issue to Work Order 4593 t WO f jsmith f 9823 f 2008-06-12 14:41:41.29455-04 2008-06-12 4902 86 W/O 50176-1 3416 -0.15 Material Issue to Work Order 4594 t WO f jsmith f 9822 f 2008-06-12 14:41:41.29455-04 2008-06-12 4902 138 W/O 50176-1 3416 0.15 Material Issue to Work Order 4594 t WO f jsmith f 9824 f 2008-06-12 14:41:41.29455-04 2008-06-12 4903 86 S/R 50176-1 -1 23.69 Issue to Shipping 4595 t SO f jsmith f 9825 f 2008-06-12 14:41:41.29455-04 2008-06-12 4903 96 S/R 50176-1 -1 -23.69 Issue to Shipping 4595 t SO f jsmith f 9826 f 2008-06-12 14:43:38.079305-04 2008-06-12 4904 91 I/M ST-10 3417 149.00 Miscellaneous Adjustment\n 4596 t f jsmith f 9827 f 2008-06-12 14:43:38.079305-04 2008-06-12 4904 138 I/M ST-10 3417 -149.00 Miscellaneous Adjustment\n 4596 t f jsmith f 9828 f 2008-06-12 14:47:43.550047-04 2008-06-12 4905 96 S/R 60022 -1 23.69 Ship Shipment 4597 t SH f jsmith f 9831 f 2008-06-12 14:48:12.588787-04 2008-06-12 4906 106 A/R 60057 \N -32.77 4598 t IN f jsmith f 9830 f 2008-06-12 14:48:12.588787-04 2008-06-12 4906 103 A/R 60057 \N 32.77 4598 t IN f jsmith f 9833 f 2008-06-12 14:48:12.588787-04 2008-06-12 4907 133 A/R R -1 -32.77 20015 4599 t CD f jsmith f 9832 f 2008-06-12 14:48:12.588787-04 2008-06-12 4907 106 A/R R -1 32.77 20015 4599 t CD f jsmith f 9834 f 2008-06-12 14:54:18.189836-04 2008-06-12 4908 91 I/M MA-01001 3421 186.34 Miscellaneous Adjustment\n 4600 t f jsmith f 9835 f 2008-06-12 14:54:18.189836-04 2008-06-12 4908 85 I/M MA-01001 3421 -186.34 Miscellaneous Adjustment\n 4600 t f jsmith f 9837 f 2008-06-12 14:58:14.248517-04 2008-06-12 4909 96 S/R 50177-1 3422 -93.17 Issue to Shipping 4601 t SO f jsmith f 9836 f 2008-06-12 14:58:14.248517-04 2008-06-12 4909 85 S/R 50177-1 3422 93.17 Issue to Shipping 4601 t SO f jsmith f 9839 f 2008-06-12 14:59:47.420026-04 2008-06-12 4910 108 S/R 60023 -1 -93.17 Ship Shipment 4602 t SH f jsmith f 9838 f 2008-06-12 14:59:47.420026-04 2008-06-12 4910 96 S/R 60023 -1 93.17 Ship Shipment 4602 t SH f jsmith f 9841 f 2008-06-12 15:00:10.546175-04 2008-06-12 4911 106 A/R 60058 \N -489.99 4603 t IN f jsmith f 9840 f 2008-06-12 15:00:10.546175-04 2008-06-12 4911 103 A/R 60058 \N 489.99 4603 t IN f jsmith f 9843 f 2008-06-12 15:00:10.546175-04 2008-06-12 4912 133 A/R R -1 -489.99 20015 4604 t CD f jsmith f 9842 f 2008-06-12 15:00:10.546175-04 2008-06-12 4912 106 A/R R -1 489.99 20015 4604 t CD f jsmith f 9845 f 2008-06-12 15:20:54.223879-04 2008-06-12 4913 96 S/R 40009-1 3423 -93.17 Issue to Shipping 4605 t SO f jsmith f 9844 f 2008-06-12 15:20:54.223879-04 2008-06-12 4913 85 S/R 40009-1 3423 93.17 Issue to Shipping 4605 t SO f jsmith f 9847 f 2008-06-12 15:25:33.449825-04 2008-06-12 4914 108 S/R 60024 -1 -93.17 Ship Shipment 4606 t SH f jsmith f 9846 f 2008-06-12 15:25:33.449825-04 2008-06-12 4914 96 S/R 60024 -1 93.17 Ship Shipment 4606 t SH f jsmith f 9850 f 2008-06-12 15:26:01.021805-04 2008-06-12 4915 106 A/R 60059 \N -514.50 4607 t IN f jsmith f 9849 f 2008-06-12 15:26:01.021805-04 2008-06-12 4915 102 A/R 60059 \N 24.50 4607 t IN f jsmith f 9848 f 2008-06-12 15:26:01.021805-04 2008-06-12 4915 103 A/R 60059 \N 490.00 4607 t IN f jsmith f 9852 f 2008-06-12 15:34:57.86443-04 2008-06-05 4916 90 A/P 30047 \N 18.48 XPPI-Packaging Pros LTD 6873 4608 t VO f jsmith f 9854 f 2008-06-12 15:34:57.86443-04 2008-06-05 4916 99 A/P 30047 \N 83.82 XPPI-Packaging Pros LTD 6873 4608 t VO f jsmith f 9851 f 2008-06-12 15:34:57.86443-04 2008-06-05 4916 95 A/P 30047 \N -72.50 XPPI-Packaging Pros LTD 6873 4608 t VO f jsmith f 9853 f 2008-06-12 15:34:57.86443-04 2008-06-05 4916 139 A/P 30047 \N -29.80 XPPI-Packaging Pros LTD 6873 4608 t VO f jsmith f 9855 f 2008-06-18 15:57:11.488257-04 2008-06-18 4917 91 I/M MA-01 3426 25.00 Miscellaneous Adjustment\nMA Adjustment 4609 t f jsmith f 9856 f 2008-06-18 15:57:11.488257-04 2008-06-18 4917 138 I/M MA-01 3426 -25.00 Miscellaneous Adjustment\nMA Adjustment 4609 t f jsmith f 9857 f 2008-06-18 15:57:55.358421-04 2008-06-18 4918 86 W/O Misc. 3427 87.10 Receive from Misc. Production for Item Number TKIT1\nMA Misc Prod 4610 t WO f jsmith f 9858 f 2008-06-18 15:57:55.358421-04 2008-06-18 4918 138 W/O Misc. 3427 -87.10 Receive from Misc. Production for Item Number TKIT1\nMA Misc Prod 4610 t WO f jsmith f 9860 f 2008-06-18 15:57:55.358421-04 2008-06-18 4919 86 W/O Misc. 3427 -12.10 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TKIT1 4611 t WO f jsmith f 9859 f 2008-06-18 15:57:55.358421-04 2008-06-18 4919 94 W/O Misc. 3427 12.10 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TKIT1 4611 t WO f jsmith f 9862 f 2008-06-18 15:57:55.358421-04 2008-06-18 4920 86 W/O Misc. 3427 -75.00 Cost Variance of Post to Misc. Production for Item Number TKIT1 4613 t WO f jsmith f 9861 f 2008-06-18 15:57:55.358421-04 2008-06-18 4920 87 W/O Misc. 3427 75.00 Cost Variance of Post to Misc. Production for Item Number TKIT1 4613 t WO f jsmith f 9878 f 2008-06-18 16:01:40.903562-04 2008-06-18 4928 86 W/O 50178-1 3436 -25.00 Material Issue to Work Order 4621 t WO f jsmith f 9877 f 2008-06-18 16:01:40.903562-04 2008-06-18 4928 138 W/O 50178-1 3436 25.00 Material Issue to Work Order 4621 t WO f jsmith f 9880 f 2008-06-18 16:01:40.903562-04 2008-06-18 4929 86 W/O 50178-1 3437 -20.00 Material Issue to Work Order 4622 t WO f jsmith f 9879 f 2008-06-18 16:01:40.903562-04 2008-06-18 4929 138 W/O 50178-1 3437 20.00 Material Issue to Work Order 4622 t WO f jsmith f 9882 f 2008-06-18 16:01:40.903562-04 2008-06-18 4930 86 W/O 50178-1 3438 -87.10 Material Issue to Work Order 4623 t WO f jsmith f 9881 f 2008-06-18 16:01:40.903562-04 2008-06-18 4930 138 W/O 50178-1 3438 87.10 Material Issue to Work Order 4623 t WO f jsmith f 9884 f 2008-06-18 16:01:40.903562-04 2008-06-18 4931 86 W/O 50178-1 3439 -40.00 Material Issue to Work Order 4624 t WO f jsmith f 9883 f 2008-06-18 16:01:40.903562-04 2008-06-18 4931 138 W/O 50178-1 3439 40.00 Material Issue to Work Order 4624 t WO f jsmith f 9886 f 2008-06-18 16:01:40.903562-04 2008-06-18 4932 86 W/O 50178-1 3440 -1.00 Material Issue to Work Order 4625 t WO f jsmith f 9885 f 2008-06-18 16:01:40.903562-04 2008-06-18 4932 138 W/O 50178-1 3440 1.00 Material Issue to Work Order 4625 t WO f jsmith f 9888 f 2008-06-18 16:01:40.903562-04 2008-06-18 4933 86 W/O 50178-1 3441 -14.90 Material Issue to Work Order 4626 t WO f jsmith f 9887 f 2008-06-18 16:01:40.903562-04 2008-06-18 4933 138 W/O 50178-1 3441 14.90 Material Issue to Work Order 4626 t WO f jsmith f 9889 f 2008-06-18 16:01:40.903562-04 2008-06-18 4934 86 S/R 50178-1 -1 188.00 Issue to Shipping 4627 t SO f jsmith f 9890 f 2008-06-18 16:01:40.903562-04 2008-06-18 4934 96 S/R 50178-1 -1 -188.00 Issue to Shipping 4627 t SO f jsmith f 9892 f 2008-06-18 16:03:32.526111-04 2008-06-18 4935 108 S/R 60026 -1 -188.00 Ship Shipment 4628 t SH f jsmith f 9891 f 2008-06-18 16:03:32.526111-04 2008-06-18 4935 96 S/R 60026 -1 188.00 Ship Shipment 4628 t SH f jsmith f 9895 f 2008-06-18 16:03:56.39774-04 2008-06-18 4936 106 A/R 60060 \N -3260.25 4629 t IN f jsmith f 9894 f 2008-06-18 16:03:56.39774-04 2008-06-18 4936 102 A/R 60060 \N 155.25 4629 t IN f jsmith f 9896 f 2008-06-18 16:05:36.099699-04 2008-06-18 4937 86 W/O Misc. 3442 87.10 Receive from Misc. Production for Item Number TKIT1\nMISC PROD-MA2 4630 t WO f jsmith f 9897 f 2008-06-18 16:05:36.099699-04 2008-06-18 4937 138 W/O Misc. 3442 -87.10 Receive from Misc. Production for Item Number TKIT1\nMISC PROD-MA2 4630 t WO f jsmith f 9899 f 2008-06-18 16:05:36.099699-04 2008-06-18 4938 86 W/O Misc. 3442 -12.10 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TKIT1 4631 t WO f jsmith f 9898 f 2008-06-18 16:05:36.099699-04 2008-06-18 4938 94 W/O Misc. 3442 12.10 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TKIT1 4631 t WO f jsmith f 9901 f 2008-06-18 16:05:36.099699-04 2008-06-18 4939 86 W/O Misc. 3442 -75.00 Cost Variance of Post to Misc. Production for Item Number TKIT1 4633 t WO f jsmith f 9900 f 2008-06-18 16:05:36.099699-04 2008-06-18 4939 87 W/O Misc. 3442 75.00 Cost Variance of Post to Misc. Production for Item Number TKIT1 4633 t WO f jsmith f 9902 f 2008-06-18 16:08:53.884521-04 2008-06-18 4940 86 W/O 10052-1 3443 87.10 Receive Inventory from Manufacturing 4634 t WO f jsmith f 9903 f 2008-06-18 16:08:53.884521-04 2008-06-18 4940 138 W/O 10052-1 3443 -87.10 Receive Inventory from Manufacturing 4634 t WO f jsmith f 9905 f 2008-06-18 16:08:53.884521-04 2008-06-18 4941 86 W/O 10052-1 3444 -25.00 Material Issue to Work Order 4635 t WO f jsmith f 9904 f 2008-06-18 16:08:53.884521-04 2008-06-18 4941 138 W/O 10052-1 3444 25.00 Material Issue to Work Order 4635 t WO f jsmith f 9907 f 2008-06-18 16:08:53.884521-04 2008-06-18 4942 86 W/O 10052-1 3445 -27.50 Material Issue to Work Order 4636 t WO f jsmith f 9906 f 2008-06-18 16:08:53.884521-04 2008-06-18 4942 138 W/O 10052-1 3445 27.50 Material Issue to Work Order 4636 t WO f jsmith f 9909 f 2008-06-18 16:08:53.884521-04 2008-06-18 4943 86 W/O 10052-1 -1 -1.10 Post Setup Time to Work Order 4637 t WO f jsmith f 9908 f 2008-06-18 16:08:53.884521-04 2008-06-18 4943 94 W/O 10052-1 -1 1.10 Post Setup Time to Work Order 4637 t WO f jsmith f 9911 f 2008-06-18 16:08:53.884521-04 2008-06-18 4944 86 W/O 10052-1 -1 -11.00 Post Run Time to Work Order 4638 t WO f jsmith f 9910 f 2008-06-18 16:08:53.884521-04 2008-06-18 4944 94 W/O 10052-1 -1 11.00 Post Run Time to Work Order 4638 t WO f jsmith f 9912 f 2008-06-18 16:08:58.970125-04 2008-06-18 4945 86 W/O 10052-1 -1 -22.50 Manufacturing Inventory Cost Variance 4639 t WO f jsmith f 9913 f 2008-06-18 16:08:58.970125-04 2008-06-18 4945 87 W/O 10052-1 -1 22.50 Manufacturing Inventory Cost Variance 4639 t WO f jsmith f 9914 f 2008-06-18 16:12:09.090071-04 2008-06-18 4946 86 W/O Misc. 3446 87.10 Receive from Misc. Production for Item Number TKIT1\nMA-Misc Prod 3 4641 t WO f jsmith f 9915 f 2008-06-18 16:12:09.090071-04 2008-06-18 4946 138 W/O Misc. 3446 -87.10 Receive from Misc. Production for Item Number TKIT1\nMA-Misc Prod 3 4641 t WO f jsmith f 9917 f 2008-06-18 16:12:09.090071-04 2008-06-18 4947 86 W/O Misc. 3447 -25.00 Consumed during Misc. Production of Item Number TKIT1\nMA-Misc Prod 3 4642 t WO f jsmith f 9916 f 2008-06-18 16:12:09.090071-04 2008-06-18 4947 138 W/O Misc. 3447 25.00 Consumed during Misc. Production of Item Number TKIT1\nMA-Misc Prod 3 4642 t WO f jsmith f 9919 f 2008-06-18 16:12:09.090071-04 2008-06-18 4948 86 W/O Misc. 3448 -50.00 Consumed during Misc. Production of Item Number TKIT1\nMA-Misc Prod 3 4643 t WO f jsmith f 9918 f 2008-06-18 16:12:09.090071-04 2008-06-18 4948 138 W/O Misc. 3448 50.00 Consumed during Misc. Production of Item Number TKIT1\nMA-Misc Prod 3 4643 t WO f jsmith f 9921 f 2008-06-18 16:12:09.090071-04 2008-06-18 4949 86 W/O Misc. 3446 -12.10 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TKIT1 4644 t WO f jsmith f 9920 f 2008-06-18 16:12:09.090071-04 2008-06-18 4949 94 W/O Misc. 3446 12.10 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TKIT1 4644 t WO f jsmith f 9922 f 2008-06-18 16:35:10.374611-04 2008-06-18 4950 95 S/R 20048 3449 25.00 Receive Inventory from P/O 4647 t PO f jsmith f 9923 f 2008-06-18 16:35:10.374611-04 2008-06-18 4950 138 S/R 20048 3449 -25.00 Receive Inventory from P/O 4647 t PO f jsmith f 9924 f 2008-06-18 16:35:22.571076-04 2008-06-18 4951 95 S/R 20049 3450 10.00 Receive Inventory from P/O 4649 t PO f jsmith f 9925 f 2008-06-18 16:35:22.571076-04 2008-06-18 4951 138 S/R 20049 3450 -10.00 Receive Inventory from P/O 4649 t PO f jsmith f 9926 f 2008-06-18 16:35:22.571076-04 2008-06-18 4952 95 S/R 20049 3451 15.00 Receive Inventory from P/O 4651 t PO f jsmith f 9927 f 2008-06-18 16:35:22.571076-04 2008-06-18 4952 138 S/R 20049 3451 -15.00 Receive Inventory from P/O 4651 t PO f jsmith f 9929 f 2008-06-18 16:44:56.241848-04 2008-06-18 4953 90 A/P 30050 \N 6.37 XPPI-Packaging Pros LTD MA12311 4653 t VO f jsmith f 9931 f 2008-06-18 16:44:56.241848-04 2008-06-18 4953 99 A/P 30050 \N 48.43 XPPI-Packaging Pros LTD MA12311 4653 t VO f jsmith f 9928 f 2008-06-18 16:44:56.241848-04 2008-06-18 4953 95 A/P 30050 \N -25.00 XPPI-Packaging Pros LTD MA12311 4653 t VO f jsmith f 9930 f 2008-06-18 16:44:56.241848-04 2008-06-18 4953 139 A/P 30050 \N -29.80 XPPI-Packaging Pros LTD MA12311 4653 t VO f jsmith f 9943 f 2008-06-18 16:48:02.670988-04 2008-06-18 4957 109 A/P 3041 148 2548.00 WCHEM-World Chem, Inc. 4661 t CK t jsmith f 9942 f 2008-06-18 16:48:02.670988-04 2008-06-18 4957 99 A/P 3041 148 -2548.00 WCHEM-World Chem, Inc. 4661 t CK f jsmith f 9939 f 2008-06-18 16:48:02.670988-04 2008-06-18 4958 101 A/P 30049 \N 26.00 Discount for V 30049 4662 t DS f jsmith f 9938 f 2008-06-18 16:48:02.670988-04 2008-06-18 4958 99 A/P 30049 \N -26.00 Discount for V 30049 4662 t DS f jsmith f 9941 f 2008-06-18 16:48:02.670988-04 2008-06-18 4959 101 A/P 30048 \N 26.00 Discount for V 30048 4664 t DS f jsmith f 9940 f 2008-06-18 16:48:02.670988-04 2008-06-18 4959 99 A/P 30048 \N -26.00 Discount for V 30048 4664 t DS f jsmith f 9947 f 2008-06-18 16:50:02.705119-04 2008-06-18 4960 126 A/P 5007 149 205.77 XPPI-Packaging Pros LTD 4666 t CK t jsmith f 9946 f 2008-06-18 16:50:02.705119-04 2008-06-18 4960 99 A/P 5007 149 -205.77 XPPI-Packaging Pros LTD 4666 t CK f jsmith f 9945 f 2008-06-18 16:50:02.705119-04 2008-06-18 4961 101 A/P 30050 \N 0.97 Discount for V 30050 4667 t DS f jsmith f 9944 f 2008-06-18 16:50:02.705119-04 2008-06-18 4961 99 A/P 30050 \N -0.97 Discount for V 30050 4667 t DS f jsmith f 9949 f 2008-06-18 16:55:57.859077-04 2008-06-18 4962 109 A/R C-36001 \N -3654.75 TTOYS-Tremendous Toys Incorporated 4669 t CR t jsmith f 9950 f 2008-06-18 16:55:57.859077-04 2008-06-18 4962 106 A/R I-60059 \N 394.50 TTOYS-Tremendous Toys Incorporated 4669 t CR f jsmith f 9948 f 2008-06-18 16:55:57.859077-04 2008-06-18 4962 106 A/R I-60060 \N 3260.25 TTOYS-Tremendous Toys Incorporated 4669 t CR f jsmith f 9951 f 2008-06-18 16:56:59.119547-04 2008-06-18 4963 109 A/R C-11102 \N -120.00 TTOYS-Tremendous Toys Incorporated 4670 t CR t jsmith f 9952 f 2008-06-18 16:56:59.119547-04 2008-06-18 4963 106 A/R I-60059 \N 120.00 TTOYS-Tremendous Toys Incorporated 4670 t CR f jsmith f 9969 f 2008-06-19 16:36:13.437438-04 2008-06-19 4969 95 S/R 20050 3452 1250.00 Receive Inventory from P/O 4675 t PO f jsmith f 9970 f 2008-06-19 16:36:13.437438-04 2008-06-19 4969 138 S/R 20050 3452 -1250.00 Receive Inventory from P/O 4675 t PO f jsmith f 9971 f 2008-06-19 16:36:13.437438-04 2008-06-19 4970 95 S/R 20050 3453 425.00 Receive Inventory from P/O 4677 t PO f jsmith f 9972 f 2008-06-19 16:36:13.437438-04 2008-06-19 4970 138 S/R 20050 3453 -425.00 Receive Inventory from P/O 4677 t PO f jsmith f 9973 f 2008-06-19 16:36:13.437438-04 2008-06-19 4971 95 S/R 20050 3454 1600.00 Receive Inventory from P/O 4679 t PO f jsmith f 9974 f 2008-06-19 16:36:13.437438-04 2008-06-19 4971 138 S/R 20050 3454 -1600.00 Receive Inventory from P/O 4679 t PO f jsmith f 9976 f 2008-06-19 16:37:24.836039-04 2008-06-19 4972 90 A/P 30052 \N -3665.00 TPARTS-Toy Parts Inc. RF01001 4681 t VO f jsmith f 9978 f 2008-06-19 16:37:24.836039-04 2008-06-19 4972 99 A/P 30052 \N 7000.00 TPARTS-Toy Parts Inc. RF01001 4681 t VO f jsmith f 9975 f 2008-06-19 16:37:24.836039-04 2008-06-19 4972 95 A/P 30052 \N -3275.00 TPARTS-Toy Parts Inc. RF01001 4681 t VO f jsmith f 9977 f 2008-06-19 16:37:24.836039-04 2008-06-19 4972 139 A/P 30052 \N -60.00 TPARTS-Toy Parts Inc. RF01001 4681 t VO f jsmith f 9982 f 2008-06-19 16:38:47.480981-04 2008-06-19 4973 109 A/P 3042 150 6860.00 TPARTS-Toy Parts Inc. 4683 t CK t jsmith f 9981 f 2008-06-19 16:38:47.480981-04 2008-06-19 4973 99 A/P 3042 150 -6860.00 TPARTS-Toy Parts Inc. 4683 t CK f jsmith f 9980 f 2008-06-19 16:38:47.480981-04 2008-06-19 4974 101 A/P 30052 \N 140.00 Discount for V 30052 4684 t DS f jsmith f 9979 f 2008-06-19 16:38:47.480981-04 2008-06-19 4974 99 A/P 30052 \N -140.00 Discount for V 30052 4684 t DS f jsmith f 9984 f 2008-06-19 16:48:14.776648-04 2008-06-19 4975 99 A/P 30053 \N 1100.00 ICHROME-International Chrome Technologies RF010012 4687 t VO f jsmith f 9983 f 2008-06-19 16:48:14.776648-04 2008-06-19 4975 95 A/P 30053 \N -1100.00 ICHROME-International Chrome Technologies RF010012 4687 t VO f jsmith f 9988 f 2008-06-19 16:49:13.318264-04 2008-06-19 4976 109 A/P 3043 151 1078.00 ICHROME-International Chrome Technologies 4689 t CK t jsmith f 9987 f 2008-06-19 16:49:13.318264-04 2008-06-19 4976 99 A/P 3043 151 -1078.00 ICHROME-International Chrome Technologies 4689 t CK f jsmith f 9986 f 2008-06-19 16:49:13.318264-04 2008-06-19 4977 101 A/P 30053 \N 22.00 Discount for V 30053 4690 t DS f jsmith f 9985 f 2008-06-19 16:49:13.318264-04 2008-06-19 4977 99 A/P 30053 \N -22.00 Discount for V 30053 4690 t DS f jsmith f 9989 f 2008-06-19 16:52:50.65578-04 2008-06-19 4978 86 W/O 10054-2 3455 2563.00 Receive Inventory from Manufacturing 4692 t WO f jsmith f 9990 f 2008-06-19 16:52:50.65578-04 2008-06-19 4978 138 W/O 10054-2 3455 -2563.00 Receive Inventory from Manufacturing 4692 t WO f jsmith f 9992 f 2008-06-19 16:52:50.65578-04 2008-06-19 4979 86 W/O 10054-2 3456 -1100.00 Material Issue to Work Order 4693 t WO f jsmith f 9991 f 2008-06-19 16:52:50.65578-04 2008-06-19 4979 138 W/O 10054-2 3456 1100.00 Material Issue to Work Order 4693 t WO f jsmith f 9994 f 2008-06-19 16:52:50.65578-04 2008-06-19 4980 86 W/O 10054-2 -1 -161.33 Post Run Time to Work Order 4694 t WO f jsmith f 9993 f 2008-06-19 16:52:50.65578-04 2008-06-19 4980 94 W/O 10054-2 -1 161.33 Post Run Time to Work Order 4694 t WO f jsmith f 9996 f 2008-06-19 16:52:50.65578-04 2008-06-19 4981 86 W/O 10054-2 -1 -201.67 Post Run Time to Work Order 4695 t WO f jsmith f 9995 f 2008-06-19 16:52:50.65578-04 2008-06-19 4981 94 W/O 10054-2 -1 201.67 Post Run Time to Work Order 4695 t WO f jsmith f 9997 f 2008-06-19 16:53:08.961417-04 2008-06-19 4982 86 W/O 10055-1 3457 2438.80 Receive Inventory from Manufacturing 4698 t WO f jsmith f 9998 f 2008-06-19 16:53:08.961417-04 2008-06-19 4982 138 W/O 10055-1 3457 -2438.80 Receive Inventory from Manufacturing 4698 t WO f jsmith f 10000 f 2008-06-19 16:53:08.961417-04 2008-06-19 4983 86 W/O 10055-1 3458 -700.00 Material Issue to Work Order 4699 t WO f jsmith f 9999 f 2008-06-19 16:53:08.961417-04 2008-06-19 4983 138 W/O 10055-1 3458 700.00 Material Issue to Work Order 4699 t WO f jsmith f 10002 f 2008-06-19 16:53:08.961417-04 2008-06-19 4984 86 W/O 10055-1 3459 -770.00 Material Issue to Work Order 4700 t WO f jsmith f 10001 f 2008-06-19 16:53:08.961417-04 2008-06-19 4984 138 W/O 10055-1 3459 770.00 Material Issue to Work Order 4700 t WO f jsmith f 10004 f 2008-06-19 16:53:08.961417-04 2008-06-19 4985 86 W/O 10055-1 -1 -1.10 Post Setup Time to Work Order 4701 t WO f jsmith f 10003 f 2008-06-19 16:53:08.961417-04 2008-06-19 4985 94 W/O 10055-1 -1 1.10 Post Setup Time to Work Order 4701 t WO f jsmith f 10006 f 2008-06-19 16:53:08.961417-04 2008-06-19 4986 86 W/O 10055-1 -1 -308.00 Post Run Time to Work Order 4702 t WO f jsmith f 10005 f 2008-06-19 16:53:08.961417-04 2008-06-19 4986 94 W/O 10055-1 -1 308.00 Post Run Time to Work Order 4702 t WO f jsmith f 10007 f 2008-06-19 16:53:11.840328-04 2008-06-19 4987 86 W/O 10055-1 -1 -659.70 Manufacturing Inventory Cost Variance 4703 t WO f jsmith f 10008 f 2008-06-19 16:53:11.840328-04 2008-06-19 4987 87 W/O 10055-1 -1 659.70 Manufacturing Inventory Cost Variance 4703 t WO f jsmith f 10009 f 2008-06-19 16:53:23.06988-04 2008-06-19 4988 86 W/O 10054-1 3460 9183.02 Receive Inventory from Manufacturing 4705 t WO f jsmith f 10010 f 2008-06-19 16:53:23.06988-04 2008-06-19 4988 85 W/O 10054-1 3460 -9183.02 Receive Inventory from Manufacturing 4705 t WO f jsmith f 10012 f 2008-06-19 16:53:23.06988-04 2008-06-19 4989 86 W/O 10054-1 3461 -4570.28 Material Issue to Work Order 4706 t WO f jsmith f 10011 f 2008-06-19 16:53:23.06988-04 2008-06-19 4989 138 W/O 10054-1 3461 4570.28 Material Issue to Work Order 4706 t WO f jsmith f 10014 f 2008-06-19 16:53:23.06988-04 2008-06-19 4990 86 W/O 10054-1 3462 -275.00 Material Issue to Work Order 4707 t WO f jsmith f 10013 f 2008-06-19 16:53:23.06988-04 2008-06-19 4990 138 W/O 10054-1 3462 275.00 Material Issue to Work Order 4707 t WO f jsmith f 10016 f 2008-06-19 16:53:23.06988-04 2008-06-19 4991 86 W/O 10054-1 3463 -2563.00 Material Issue to Work Order 4708 t WO f jsmith f 10015 f 2008-06-19 16:53:23.06988-04 2008-06-19 4991 138 W/O 10054-1 3463 2563.00 Material Issue to Work Order 4708 t WO f jsmith f 10018 f 2008-06-19 16:53:23.06988-04 2008-06-19 4992 86 W/O 10054-1 3464 -958.10 Material Issue to Work Order 4709 t WO f jsmith f 10017 f 2008-06-19 16:53:23.06988-04 2008-06-19 4992 138 W/O 10054-1 3464 958.10 Material Issue to Work Order 4709 t WO f jsmith f 10020 f 2008-06-19 16:53:23.06988-04 2008-06-19 4993 86 W/O 10054-1 3465 -440.00 Material Issue to Work Order 4710 t WO f jsmith f 10019 f 2008-06-19 16:53:23.06988-04 2008-06-19 4993 138 W/O 10054-1 3465 440.00 Material Issue to Work Order 4710 t WO f jsmith f 10022 f 2008-06-19 16:53:23.06988-04 2008-06-19 4994 86 W/O 10054-1 3466 -8.80 Material Issue to Work Order 4711 t WO f jsmith f 10021 f 2008-06-19 16:53:23.06988-04 2008-06-19 4994 138 W/O 10054-1 3466 8.80 Material Issue to Work Order 4711 t WO f jsmith f 10024 f 2008-06-19 16:53:23.06988-04 2008-06-19 4995 86 W/O 10054-1 -1 -1.10 Post Setup Time to Work Order 4712 t WO f jsmith f 10023 f 2008-06-19 16:53:23.06988-04 2008-06-19 4995 94 W/O 10054-1 -1 1.10 Post Setup Time to Work Order 4712 t WO f jsmith f 10026 f 2008-06-19 16:53:23.06988-04 2008-06-19 4996 86 W/O 10054-1 -1 -242.00 Post Run Time to Work Order 4713 t WO f jsmith f 10025 f 2008-06-19 16:53:23.06988-04 2008-06-19 4996 94 W/O 10054-1 -1 242.00 Post Run Time to Work Order 4713 t WO f jsmith f 10028 f 2008-06-19 16:53:23.06988-04 2008-06-19 4997 86 W/O 10054-1 -1 -2.20 Post Setup Time to Work Order 4714 t WO f jsmith f 10027 f 2008-06-19 16:53:23.06988-04 2008-06-19 4997 94 W/O 10054-1 -1 2.20 Post Setup Time to Work Order 4714 t WO f jsmith f 10030 f 2008-06-19 16:53:23.06988-04 2008-06-19 4998 86 W/O 10054-1 -1 -60.50 Post Run Time to Work Order 4715 t WO f jsmith f 10029 f 2008-06-19 16:53:23.06988-04 2008-06-19 4998 94 W/O 10054-1 -1 60.50 Post Run Time to Work Order 4715 t WO f jsmith f 10032 f 2008-06-19 16:53:23.06988-04 2008-06-19 4999 86 W/O 10054-1 -1 -0.44 Post Setup Time to Work Order 4716 t WO f jsmith f 10031 f 2008-06-19 16:53:23.06988-04 2008-06-19 4999 94 W/O 10054-1 -1 0.44 Post Setup Time to Work Order 4716 t WO f jsmith f 10034 f 2008-06-19 16:53:23.06988-04 2008-06-19 5000 86 W/O 10054-1 -1 -24.20 Post Run Time to Work Order 4717 t WO f jsmith f 10033 f 2008-06-19 16:53:23.06988-04 2008-06-19 5000 94 W/O 10054-1 -1 24.20 Post Run Time to Work Order 4717 t WO f jsmith f 10035 f 2008-06-19 16:53:37.390334-04 2008-06-19 5001 86 W/O 10054-1 -1 -37.40 Manufacturing Inventory Cost Variance 4718 t WO f jsmith f 10036 f 2008-06-19 16:53:37.390334-04 2008-06-19 5001 87 W/O 10054-1 -1 37.40 Manufacturing Inventory Cost Variance 4718 t WO f jsmith f 10037 f 2008-06-19 16:53:47.841836-04 2008-06-19 5002 86 W/O 50179-2 3467 1863.40 Receive Inventory from Manufacturing 4720 t WO f jsmith f 10038 f 2008-06-19 16:53:47.841836-04 2008-06-19 5002 85 W/O 50179-2 3467 -1863.40 Receive Inventory from Manufacturing 4720 t WO f jsmith f 10040 f 2008-06-19 16:53:47.841836-04 2008-06-19 5003 86 W/O 50179-2 3468 -250.00 Material Issue to Work Order 4721 t WO f jsmith f 10039 f 2008-06-19 16:53:47.841836-04 2008-06-19 5003 138 W/O 50179-2 3468 250.00 Material Issue to Work Order 4721 t WO f jsmith f 10042 f 2008-06-19 16:53:47.841836-04 2008-06-19 5004 86 W/O 50179-2 3469 -871.00 Material Issue to Work Order 4722 t WO f jsmith f 10041 f 2008-06-19 16:53:47.841836-04 2008-06-19 5004 138 W/O 50179-2 3469 871.00 Material Issue to Work Order 4722 t WO f jsmith f 10044 f 2008-06-19 16:53:47.841836-04 2008-06-19 5005 86 W/O 50179-2 3470 -400.00 Material Issue to Work Order 4723 t WO f jsmith f 10043 f 2008-06-19 16:53:47.841836-04 2008-06-19 5005 138 W/O 50179-2 3470 400.00 Material Issue to Work Order 4723 t WO f jsmith f 10046 f 2008-06-19 16:53:47.841836-04 2008-06-19 5006 86 W/O 50179-2 3471 -8.00 Material Issue to Work Order 4724 t WO f jsmith f 10045 f 2008-06-19 16:53:47.841836-04 2008-06-19 5006 138 W/O 50179-2 3471 8.00 Material Issue to Work Order 4724 t WO f jsmith f 10048 f 2008-06-19 16:53:47.841836-04 2008-06-19 5007 86 W/O 50179-2 -1 -1.10 Post Setup Time to Work Order 4725 t WO f jsmith f 10047 f 2008-06-19 16:53:47.841836-04 2008-06-19 5007 94 W/O 50179-2 -1 1.10 Post Setup Time to Work Order 4725 t WO f jsmith f 10050 f 2008-06-19 16:53:47.841836-04 2008-06-19 5008 86 W/O 50179-2 -1 -220.00 Post Run Time to Work Order 4726 t WO f jsmith f 10049 f 2008-06-19 16:53:47.841836-04 2008-06-19 5008 94 W/O 50179-2 -1 220.00 Post Run Time to Work Order 4726 t WO f jsmith f 10052 f 2008-06-19 16:53:47.841836-04 2008-06-19 5009 86 W/O 50179-2 -1 -2.20 Post Setup Time to Work Order 4727 t WO f jsmith f 10051 f 2008-06-19 16:53:47.841836-04 2008-06-19 5009 94 W/O 50179-2 -1 2.20 Post Setup Time to Work Order 4727 t WO f jsmith f 10054 f 2008-06-19 16:53:47.841836-04 2008-06-19 5010 86 W/O 50179-2 -1 -55.00 Post Run Time to Work Order 4728 t WO f jsmith f 10053 f 2008-06-19 16:53:47.841836-04 2008-06-19 5010 94 W/O 50179-2 -1 55.00 Post Run Time to Work Order 4728 t WO f jsmith f 10056 f 2008-06-19 16:53:47.841836-04 2008-06-19 5011 86 W/O 50179-2 -1 -0.44 Post Setup Time to Work Order 4729 t WO f jsmith f 10055 f 2008-06-19 16:53:47.841836-04 2008-06-19 5011 94 W/O 50179-2 -1 0.44 Post Setup Time to Work Order 4729 t WO f jsmith f 10058 f 2008-06-19 16:53:47.841836-04 2008-06-19 5012 86 W/O 50179-2 -1 -22.00 Post Run Time to Work Order 4730 t WO f jsmith f 10057 f 2008-06-19 16:53:47.841836-04 2008-06-19 5012 94 W/O 50179-2 -1 22.00 Post Run Time to Work Order 4730 t WO f jsmith f 10059 f 2008-06-19 16:54:00.305723-04 2008-06-19 5013 86 W/O 50179-2 -1 -33.66 Manufacturing Inventory Cost Variance 4731 t WO f jsmith f 10060 f 2008-06-19 16:54:00.305723-04 2008-06-19 5013 87 W/O 50179-2 -1 33.66 Manufacturing Inventory Cost Variance 4731 t WO f jsmith f 10062 f 2008-06-19 16:54:18.965876-04 2008-06-19 5014 96 S/R 50179-3 3472 -8348.20 Issue to Shipping 4733 t SO f jsmith f 10061 f 2008-06-19 16:54:18.965876-04 2008-06-19 5014 85 S/R 50179-3 3472 8348.20 Issue to Shipping 4733 t SO f jsmith f 10064 f 2008-06-19 16:54:18.965876-04 2008-06-19 5015 96 S/R 50179-2 3473 -1863.40 Issue to Shipping 4734 t SO f jsmith f 10063 f 2008-06-19 16:54:18.965876-04 2008-06-19 5015 85 S/R 50179-2 3473 1863.40 Issue to Shipping 4734 t SO f jsmith f 10066 f 2008-06-19 16:54:18.965876-04 2008-06-19 5016 86 W/O 50179-1 3474 -250.00 Material Issue to Work Order 4735 t WO f jsmith f 10065 f 2008-06-19 16:54:18.965876-04 2008-06-19 5016 138 W/O 50179-1 3474 250.00 Material Issue to Work Order 4735 t WO f jsmith f 10068 f 2008-06-19 16:54:18.965876-04 2008-06-19 5017 86 W/O 50179-1 3475 -20.00 Material Issue to Work Order 4736 t WO f jsmith f 10067 f 2008-06-19 16:54:18.965876-04 2008-06-19 5017 138 W/O 50179-1 3475 20.00 Material Issue to Work Order 4736 t WO f jsmith f 10070 f 2008-06-19 16:54:18.965876-04 2008-06-19 5018 86 W/O 50179-1 3476 -871.00 Material Issue to Work Order 4737 t WO f jsmith f 10069 f 2008-06-19 16:54:18.965876-04 2008-06-19 5018 138 W/O 50179-1 3476 871.00 Material Issue to Work Order 4737 t WO f jsmith f 10072 f 2008-06-19 16:54:18.965876-04 2008-06-19 5019 86 W/O 50179-1 3477 -400.00 Material Issue to Work Order 4738 t WO f jsmith f 10071 f 2008-06-19 16:54:18.965876-04 2008-06-19 5019 138 W/O 50179-1 3477 400.00 Material Issue to Work Order 4738 t WO f jsmith f 10074 f 2008-06-19 16:54:18.965876-04 2008-06-19 5020 86 W/O 50179-1 3478 -10.00 Material Issue to Work Order 4739 t WO f jsmith f 10073 f 2008-06-19 16:54:18.965876-04 2008-06-19 5020 138 W/O 50179-1 3478 10.00 Material Issue to Work Order 4739 t WO f jsmith f 10076 f 2008-06-19 16:54:18.965876-04 2008-06-19 5021 86 W/O 50179-1 3479 -149.00 Material Issue to Work Order 4740 t WO f jsmith f 10075 f 2008-06-19 16:54:18.965876-04 2008-06-19 5021 138 W/O 50179-1 3479 149.00 Material Issue to Work Order 4740 t WO f jsmith f 10077 f 2008-06-19 16:54:18.965876-04 2008-06-19 5022 86 S/R 50179-1 -1 1700.00 Issue to Shipping 4741 t SO f jsmith f 10078 f 2008-06-19 16:54:18.965876-04 2008-06-19 5022 96 S/R 50179-1 -1 -1700.00 Issue to Shipping 4741 t SO f jsmith f 10080 f 2008-06-19 16:55:58.81412-04 2008-06-19 5023 108 S/R 60027 -1 -1700.00 Ship Shipment 4742 t SH f jsmith f 10079 f 2008-06-19 16:55:58.81412-04 2008-06-19 5023 96 S/R 60027 -1 1700.00 Ship Shipment 4742 t SH f jsmith f 10082 f 2008-06-19 16:55:58.81412-04 2008-06-19 5024 108 S/R 60027 -1 -1863.40 Ship Shipment 4743 t SH f jsmith f 10081 f 2008-06-19 16:55:58.81412-04 2008-06-19 5024 96 S/R 60027 -1 1863.40 Ship Shipment 4743 t SH f jsmith f 10084 f 2008-06-19 16:55:58.81412-04 2008-06-19 5025 108 S/R 60027 -1 -8348.20 Ship Shipment 4744 t SH f jsmith f 10083 f 2008-06-19 16:55:58.81412-04 2008-06-19 5025 96 S/R 60027 -1 8348.20 Ship Shipment 4744 t SH f jsmith f 10086 f 2008-06-19 16:56:40.490726-04 2008-06-19 5026 122 A/R 60061 \N 297.00 4745 t IN f jsmith f 10087 f 2008-06-19 16:56:40.490726-04 2008-06-19 5026 106 A/R 60061 \N -84276.81 4745 t IN f jsmith f 10085 f 2008-06-19 16:56:40.490726-04 2008-06-19 5026 103 A/R 60061 \N 83979.81 4745 t IN f jsmith f 10089 f 2008-06-19 16:56:40.490726-04 2008-06-19 5027 133 A/R R -1 -934.48 20015 4746 t CD f jsmith f 10088 f 2008-06-19 16:56:40.490726-04 2008-06-19 5027 106 A/R R -1 934.48 20015 4746 t CD f jsmith f 10091 f 2008-06-19 16:57:38.894546-04 2008-06-19 5028 133 A/R R -1 -522.76 20015 4747 t CD f jsmith f 10090 f 2008-06-19 16:57:38.894546-04 2008-06-19 5028 106 A/R R -1 522.76 20015 4747 t CD f jsmith f 10093 f 2008-06-19 16:58:29.488837-04 2008-06-19 5029 127 A/R C-123111 \N -82819.56 XTRM-Xtreme Toys LTD 4748 t CR t jsmith f 10092 f 2008-06-19 16:58:29.488837-04 2008-06-19 5029 106 A/R I-60061 \N 82819.56 XTRM-Xtreme Toys LTD 4748 t CR f jsmith f 10094 f 2008-06-19 17:03:07.67209-04 2008-06-19 5030 95 S/R 20052 3480 299.75 Receive Inventory from P/O 4749 t PO f jsmith f 10095 f 2008-06-19 17:03:07.67209-04 2008-06-19 5030 138 S/R 20052 3480 -299.75 Receive Inventory from P/O 4749 t PO f jsmith f 10096 f 2008-06-19 17:03:07.67209-04 2008-06-19 5031 95 S/R 20052 3481 5000.00 Receive Inventory from P/O 4751 t PO f jsmith f 10097 f 2008-06-19 17:03:07.67209-04 2008-06-19 5031 138 S/R 20052 3481 -5000.00 Receive Inventory from P/O 4751 t PO f jsmith f 10098 f 2008-06-19 17:04:14.814705-04 2008-06-19 5032 86 W/O 10056-1 3482 10099.00 Receive Inventory from Manufacturing 4753 t WO f jsmith f 10099 f 2008-06-19 17:04:14.814705-04 2008-06-19 5032 85 W/O 10056-1 3482 -10099.00 Receive Inventory from Manufacturing 4753 t WO f jsmith f 10101 f 2008-06-19 17:04:14.814705-04 2008-06-19 5033 86 W/O 10056-1 3483 -10000.00 Material Issue to Work Order 4754 t WO f jsmith f 10100 f 2008-06-19 17:04:14.814705-04 2008-06-19 5033 138 W/O 10056-1 3483 10000.00 Material Issue to Work Order 4754 t WO f jsmith f 10103 f 2008-06-19 17:04:14.814705-04 2008-06-19 5034 86 W/O 10056-1 -1 -27.50 Post Setup Time to Work Order 4755 t WO f jsmith f 10102 f 2008-06-19 17:04:14.814705-04 2008-06-19 5034 94 W/O 10056-1 -1 27.50 Post Setup Time to Work Order 4755 t WO f jsmith f 10105 f 2008-06-19 17:04:14.814705-04 2008-06-19 5035 86 W/O 10056-1 -1 -44.00 Post Run Time to Work Order 4756 t WO f jsmith f 10104 f 2008-06-19 17:04:14.814705-04 2008-06-19 5035 94 W/O 10056-1 -1 44.00 Post Run Time to Work Order 4756 t WO f jsmith f 10106 f 2008-06-19 17:04:27.358545-04 2008-06-19 5036 86 W/O 10056-1 3484 5539.60 Receive Inventory from Breeder Manufacturing 4757 t WO f jsmith f 10107 f 2008-06-19 17:04:27.358545-04 2008-06-19 5036 138 W/O 10056-1 3484 -5539.60 Receive Inventory from Breeder Manufacturing 4757 t WO f jsmith f 10108 f 2008-06-19 17:04:27.358545-04 2008-06-19 5037 86 W/O 10056-1 3485 3750.00 Receive Inventory from Breeder Manufacturing 4758 t WO f jsmith f 10109 f 2008-06-19 17:04:27.358545-04 2008-06-19 5037 138 W/O 10056-1 3485 -3750.00 Receive Inventory from Breeder Manufacturing 4758 t WO f jsmith f 10110 f 2008-06-19 17:04:27.358545-04 2008-06-19 5038 86 W/O 10056-1 3486 8309.60 Receive Inventory from Breeder Manufacturing 4759 t WO f jsmith f 10111 f 2008-06-19 17:04:27.358545-04 2008-06-19 5038 138 W/O 10056-1 3486 -8309.60 Receive Inventory from Breeder Manufacturing 4759 t WO f jsmith f 10113 f 2008-06-19 17:04:27.358545-04 2008-06-19 5039 86 W/O 10056-1 3487 -10099.00 Issue Breeder Inventory by Breeder Distribution 4760 t WO f jsmith f 10112 f 2008-06-19 17:04:27.358545-04 2008-06-19 5039 85 W/O 10056-1 3487 10099.00 Issue Breeder Inventory by Breeder Distribution 4760 t WO f jsmith f 10114 f 2008-06-19 17:04:48.569093-04 2008-06-19 5040 86 W/O 10056-1 -1 -27.50 Manufacturing Inventory Cost Variance 4761 t WO f jsmith f 10115 f 2008-06-19 17:04:48.569093-04 2008-06-19 5040 87 W/O 10056-1 -1 27.50 Manufacturing Inventory Cost Variance 4761 t WO f jsmith f 10116 f 2008-06-19 17:04:48.569093-04 2008-06-19 5041 86 W/O 10056-1 -1 -7500.20 Breeder Inventory Cost Variance 4762 t WO f jsmith f 10117 f 2008-06-19 17:04:48.569093-04 2008-06-19 5041 87 W/O 10056-1 -1 7500.20 Breeder Inventory Cost Variance 4762 t WO f jsmith f 10118 f 2008-06-19 17:06:03.069859-04 2008-06-19 5042 95 S/R 20053 3488 10000.00 Receive Inventory from P/O 4763 t PO f jsmith f 10119 f 2008-06-19 17:06:03.069859-04 2008-06-19 5042 138 S/R 20053 3488 -10000.00 Receive Inventory from P/O 4763 t PO f jsmith f 10121 f 2008-06-19 17:07:52.576615-04 2008-06-19 5043 86 W/O 50180-1 3489 -24.75 Material Issue to Work Order 4765 t WO f jsmith f 10120 f 2008-06-19 17:07:52.576615-04 2008-06-19 5043 138 W/O 50180-1 3489 24.75 Material Issue to Work Order 4765 t WO f jsmith f 10123 f 2008-06-19 17:07:52.576615-04 2008-06-19 5044 86 W/O 50180-1 3490 -86.23 Material Issue to Work Order 4766 t WO f jsmith f 10122 f 2008-06-19 17:07:52.576615-04 2008-06-19 5044 138 W/O 50180-1 3490 86.23 Material Issue to Work Order 4766 t WO f jsmith f 10125 f 2008-06-19 17:07:52.576615-04 2008-06-19 5045 86 W/O 50180-1 3491 -39.60 Material Issue to Work Order 4767 t WO f jsmith f 10124 f 2008-06-19 17:07:52.576615-04 2008-06-19 5045 138 W/O 50180-1 3491 39.60 Material Issue to Work Order 4767 t WO f jsmith f 10127 f 2008-06-19 17:07:52.576615-04 2008-06-19 5046 86 W/O 50180-1 3492 -0.79 Material Issue to Work Order 4768 t WO f jsmith f 10126 f 2008-06-19 17:07:52.576615-04 2008-06-19 5046 138 W/O 50180-1 3492 0.79 Material Issue to Work Order 4768 t WO f jsmith f 10129 f 2008-06-19 17:07:52.576615-04 2008-06-19 5047 86 W/O 50180-1 3493 -1.49 Material Issue to Work Order 4769 t WO f jsmith f 10128 f 2008-06-19 17:07:52.576615-04 2008-06-19 5047 138 W/O 50180-1 3493 1.49 Material Issue to Work Order 4769 t WO f jsmith f 10130 f 2008-06-19 17:07:52.576615-04 2008-06-19 5048 86 S/R 50180-1 -1 152.86 Issue to Shipping 4770 t SO f jsmith f 10131 f 2008-06-19 17:07:52.576615-04 2008-06-19 5048 96 S/R 50180-1 -1 -152.86 Issue to Shipping 4770 t SO f jsmith f 10133 f 2008-06-19 17:08:12.096062-04 2008-06-19 5049 108 S/R 60028 -1 -152.86 Ship Shipment 4771 t SH f jsmith f 10132 f 2008-06-19 17:08:12.096062-04 2008-06-19 5049 96 S/R 60028 -1 152.86 Ship Shipment 4771 t SH f jsmith f 10136 f 2008-06-19 17:08:25.693678-04 2008-06-19 5050 106 A/R 60062 \N -2993.76 4772 t IN f jsmith f 10135 f 2008-06-19 17:08:25.693678-04 2008-06-19 5050 102 A/R 60062 \N 142.56 4772 t IN f jsmith f 10134 f 2008-06-19 17:08:25.693678-04 2008-06-19 5050 103 A/R 60062 \N 2851.20 4772 t IN f jsmith f 10138 f 2008-06-19 17:09:28.285755-04 2008-06-19 5051 92 I/M Water Damage 3494 -24.75 Material Scrap\nMA - Water DMG 4773 t f jsmith f 10137 f 2008-06-19 17:09:28.285755-04 2008-06-19 5051 138 I/M Water Damage 3494 24.75 Material Scrap\nMA - Water DMG 4773 t f jsmith f 10139 f 2008-06-19 17:10:09.403254-04 2008-06-19 5052 109 A/R C-12311 \N -2993.76 TTOYS-Tremendous Toys Incorporated 4774 t CR t jsmith f 10140 f 2008-06-19 17:10:09.403254-04 2008-06-19 5052 106 A/R I-60062 \N 2993.76 TTOYS-Tremendous Toys Incorporated 4774 t CR f jsmith f 10142 f 2008-06-19 17:11:17.478443-04 2008-06-19 5053 90 A/P 30054 \N 3809.95 TPARTS-Toy Parts Inc. R762772 4775 t VO f jsmith f 10143 f 2008-06-19 17:11:17.478443-04 2008-06-19 5053 99 A/P 30054 \N 1489.80 TPARTS-Toy Parts Inc. R762772 4775 t VO f jsmith f 10141 f 2008-06-19 17:11:17.478443-04 2008-06-19 5053 95 A/P 30054 \N -5299.75 TPARTS-Toy Parts Inc. R762772 4775 t VO f jsmith f 10145 f 2008-06-19 17:11:20.380012-04 2008-06-19 5054 90 A/P 30055 \N 7500.00 TPARTS-Toy Parts Inc. RF19991 4776 t VO f jsmith f 10146 f 2008-06-19 17:11:20.380012-04 2008-06-19 5054 99 A/P 30055 \N 2500.00 TPARTS-Toy Parts Inc. RF19991 4776 t VO f jsmith f 10144 f 2008-06-19 17:11:20.380012-04 2008-06-19 5054 95 A/P 30055 \N -10000.00 TPARTS-Toy Parts Inc. RF19991 4776 t VO f jsmith f 10152 f 2008-06-19 17:11:56.42893-04 2008-06-19 5055 109 A/P 3044 152 3910.00 TPARTS-Toy Parts Inc. 4778 t CK t jsmith f 10151 f 2008-06-19 17:11:56.42893-04 2008-06-19 5055 99 A/P 3044 152 -3910.00 TPARTS-Toy Parts Inc. 4778 t CK f jsmith f 10148 f 2008-06-19 17:11:56.42893-04 2008-06-19 5056 101 A/P 30055 \N 50.00 Discount for V 30055 4779 t DS f jsmith f 10147 f 2008-06-19 17:11:56.42893-04 2008-06-19 5056 99 A/P 30055 \N -50.00 Discount for V 30055 4779 t DS f jsmith f 10150 f 2008-06-19 17:11:56.42893-04 2008-06-19 5057 101 A/P 30054 \N 29.80 Discount for V 30054 4781 t DS f jsmith f 10149 f 2008-06-19 17:11:56.42893-04 2008-06-19 5057 99 A/P 30054 \N -29.80 Discount for V 30054 4781 t DS f jsmith f 10154 f 2008-06-20 09:33:35.232685-04 2008-06-20 5058 96 S/R 50181-1 3495 -11.86 Issue to Shipping 4783 t SO f jsmith f 10153 f 2008-06-20 09:33:35.232685-04 2008-06-20 5058 85 S/R 50181-1 3495 11.86 Issue to Shipping 4783 t SO f jsmith f 10156 f 2008-06-20 09:34:04.880812-04 2008-06-20 5059 108 S/R 60029 -1 -11.86 Ship Shipment 4784 t SH f jsmith f 10155 f 2008-06-20 09:34:04.880812-04 2008-06-20 5059 96 S/R 60029 -1 11.86 Ship Shipment 4784 t SH f jsmith f 10159 f 2008-06-20 09:34:18.78581-04 2008-06-20 5060 122 A/R 60063 \N 15.00 4785 t IN f jsmith f 10160 f 2008-06-20 09:34:18.78581-04 2008-06-20 5060 106 A/R 60063 \N -108.56 4785 t IN f jsmith f 10158 f 2008-06-20 09:34:18.78581-04 2008-06-20 5060 102 A/R 60063 \N 4.46 4785 t IN f jsmith f 10157 f 2008-06-20 09:34:18.78581-04 2008-06-20 5060 103 A/R 60063 \N 89.10 4785 t IN f jsmith f 10162 f 2008-06-20 09:38:17.52427-04 2008-06-20 5061 109 A/R C-421231 \N -108.56 TTOYS-Tremendous Toys Incorporated 4786 t CR t jsmith f 10161 f 2008-06-20 09:38:17.52427-04 2008-06-20 5061 106 A/R I-60063 \N 108.56 TTOYS-Tremendous Toys Incorporated 4786 t CR f jsmith f 10163 f 2008-06-20 09:39:08.545014-04 2008-06-20 5062 87 P/D Post Cost 308 -5.35 Set Standard Cost - Material for item STOCKCAR1 4787 t f jsmith f 10164 f 2008-06-20 09:39:08.545014-04 2008-06-20 5062 85 P/D Post Cost 308 5.35 Set Standard Cost - Material for item STOCKCAR1 4787 t f jsmith f 10165 f 2008-06-20 09:39:08.545014-04 2008-06-20 5063 87 P/D Post Cost 309 -15.00 Set Standard Cost - Material for item STOCKCAR1 4788 t f jsmith f 10166 f 2008-06-20 09:39:08.545014-04 2008-06-20 5063 128 P/D Post Cost 309 15.00 Set Standard Cost - Material for item STOCKCAR1 4788 t f jsmith f 10167 f 2008-06-20 09:39:08.545014-04 2008-06-20 5064 87 P/D Post Cost 323 -0.30 Set Standard Cost - Material for item STRUCK1 4801 t f jsmith f 10168 f 2008-06-20 09:39:08.545014-04 2008-06-20 5064 85 P/D Post Cost 323 0.30 Set Standard Cost - Material for item STRUCK1 4801 t f jsmith f 10169 f 2008-06-20 09:39:08.545014-04 2008-06-20 5065 87 P/D Post Cost 325 -0.15 Set Standard Cost - Material for item STRUCK1 4802 t f jsmith f 10170 f 2008-06-20 09:39:08.545014-04 2008-06-20 5065 128 P/D Post Cost 325 0.15 Set Standard Cost - Material for item STRUCK1 4802 t f jsmith f 10171 f 2008-06-20 09:39:08.545014-04 2008-06-20 5066 87 P/D Post Cost 294 2382.75 Post Actual Cost to Standard for item TBODY1 4877 t f jsmith f 10172 f 2008-06-20 09:39:08.545014-04 2008-06-20 5066 138 P/D Post Cost 294 -2382.75 Post Actual Cost to Standard for item TBODY1 4877 t f jsmith f 10173 f 2008-06-20 09:39:08.545014-04 2008-06-20 5067 87 P/D Post Cost 323 4.50 Set Standard Cost - Material for item STRUCK1 4892 t f jsmith f 10174 f 2008-06-20 09:39:08.545014-04 2008-06-20 5067 85 P/D Post Cost 323 -4.50 Set Standard Cost - Material for item STRUCK1 4892 t f jsmith f 10175 f 2008-06-20 09:39:08.545014-04 2008-06-20 5068 87 P/D Post Cost 325 2.25 Set Standard Cost - Material for item STRUCK1 4893 t f jsmith f 10176 f 2008-06-20 09:39:08.545014-04 2008-06-20 5068 128 P/D Post Cost 325 -2.25 Set Standard Cost - Material for item STRUCK1 4893 t f jsmith f 10177 f 2008-06-20 09:39:08.545014-04 2008-06-20 5069 87 P/D Post Cost 314 -4050.00 Post Actual Cost to Standard for item SHEET1 5012 t f jsmith f 10178 f 2008-06-20 09:39:08.545014-04 2008-06-20 5069 138 P/D Post Cost 314 4050.00 Post Actual Cost to Standard for item SHEET1 5012 t f jsmith f 10179 f 2008-06-20 09:39:08.545014-04 2008-06-20 5070 87 P/D Post Cost 329 -1576.00 Post Actual Cost to Standard for item TCOAT-G 5045 t f jsmith f 10180 f 2008-06-20 09:39:08.545014-04 2008-06-20 5070 138 P/D Post Cost 329 1576.00 Post Actual Cost to Standard for item TCOAT-G 5045 t f jsmith f 10181 f 2008-06-20 09:39:08.545014-04 2008-06-20 5071 87 P/D Post Cost 326 -12.09 Post Actual Cost to Standard for item TDECAL-F 5046 t f jsmith f 10182 f 2008-06-20 09:39:08.545014-04 2008-06-20 5071 138 P/D Post Cost 326 12.09 Post Actual Cost to Standard for item TDECAL-F 5046 t f jsmith f 10183 f 2008-06-20 09:39:08.545014-04 2008-06-20 5072 87 P/D Post Cost 327 -10.01 Post Actual Cost to Standard for item TDECAL-P 5049 t f jsmith f 10184 f 2008-06-20 09:39:08.545014-04 2008-06-20 5072 138 P/D Post Cost 327 10.01 Post Actual Cost to Standard for item TDECAL-P 5049 t f jsmith f 10185 f 2008-06-20 09:39:08.545014-04 2008-06-20 5073 87 P/D Post Cost 313 -3781.50 Post Actual Cost to Standard for item FEN1 5050 t f jsmith f 10186 f 2008-06-20 09:39:08.545014-04 2008-06-20 5073 138 P/D Post Cost 313 3781.50 Post Actual Cost to Standard for item FEN1 5050 t f jsmith f 10187 f 2008-06-20 12:32:33.459856-04 2008-06-20 5074 95 S/R 20054 3496 20.00 Receive Inventory from P/O 5081 t PO f jsmith f 10188 f 2008-06-20 12:32:33.459856-04 2008-06-20 5074 138 S/R 20054 3496 -20.00 Receive Inventory from P/O 5081 t PO f jsmith f 10190 f 2008-06-20 12:33:31.399563-04 2008-06-20 5075 90 A/P 30056 \N -5.00 TPARTS-Toy Parts Inc. RF3001 5083 t VO f jsmith f 10192 f 2008-06-20 12:33:31.399563-04 2008-06-20 5075 99 A/P 30056 \N 35.00 TPARTS-Toy Parts Inc. RF3001 5083 t VO f jsmith f 10189 f 2008-06-20 12:33:31.399563-04 2008-06-20 5075 95 A/P 30056 \N -20.00 TPARTS-Toy Parts Inc. RF3001 5083 t VO f jsmith f 10191 f 2008-06-20 12:33:31.399563-04 2008-06-20 5075 139 A/P 30056 \N -10.00 TPARTS-Toy Parts Inc. RF3001 5083 t VO f jsmith f 10196 f 2008-06-20 12:34:26.15507-04 2008-06-20 5076 109 A/P 3045 153 34.30 TPARTS-Toy Parts Inc. 5085 t CK t jsmith f 10195 f 2008-06-20 12:34:26.15507-04 2008-06-20 5076 99 A/P 3045 153 -34.30 TPARTS-Toy Parts Inc. 5085 t CK f jsmith f 10194 f 2008-06-20 12:34:26.15507-04 2008-06-20 5077 101 A/P 30056 \N 0.70 Discount for V 30056 5086 t DS f jsmith f 10193 f 2008-06-20 12:34:26.15507-04 2008-06-20 5077 99 A/P 30056 \N -0.70 Discount for V 30056 5086 t DS f jsmith f 10198 f 2008-06-20 12:34:59.329988-04 2008-06-20 5078 86 W/O 10057-1 3497 -20.00 Material Issue to Work Order 5088 t WO f jsmith f 10197 f 2008-06-20 12:34:59.329988-04 2008-06-20 5078 138 W/O 10057-1 3497 20.00 Material Issue to Work Order 5088 t WO f jsmith f 10200 f 2008-06-20 12:34:59.329988-04 2008-06-20 5079 86 W/O 10057-1 3498 -27.50 Material Issue to Work Order 5089 t WO f jsmith f 10199 f 2008-06-20 12:34:59.329988-04 2008-06-20 5079 138 W/O 10057-1 3498 27.50 Material Issue to Work Order 5089 t WO f jsmith f 10201 f 2008-06-20 12:34:59.329988-04 2008-06-20 5080 86 W/O 10057-1 3499 82.10 Receive Inventory from Manufacturing 5090 t WO f jsmith f 10202 f 2008-06-20 12:34:59.329988-04 2008-06-20 5080 138 W/O 10057-1 3499 -82.10 Receive Inventory from Manufacturing 5090 t WO f jsmith f 10204 f 2008-06-20 12:34:59.329988-04 2008-06-20 5081 86 W/O 10057-1 -1 -0.92 Post Setup Time to Work Order 5091 t WO f jsmith f 10203 f 2008-06-20 12:34:59.329988-04 2008-06-20 5081 94 W/O 10057-1 -1 0.92 Post Setup Time to Work Order 5091 t WO f jsmith f 10206 f 2008-06-20 12:34:59.329988-04 2008-06-20 5082 86 W/O 10057-1 -1 -11.92 Post Run Time to Work Order 5092 t WO f jsmith f 10205 f 2008-06-20 12:34:59.329988-04 2008-06-20 5082 94 W/O 10057-1 -1 11.92 Post Run Time to Work Order 5092 t WO f jsmith f 10207 f 2008-06-20 12:35:08.196767-04 2008-06-20 5083 86 W/O 10057-1 -1 -21.77 Manufacturing Inventory Cost Variance 5093 t WO f jsmith f 10208 f 2008-06-20 12:35:08.196767-04 2008-06-20 5083 87 W/O 10057-1 -1 21.77 Manufacturing Inventory Cost Variance 5093 t WO f jsmith f 10209 f 2008-06-20 12:35:16.941089-04 2008-06-20 5084 86 W/O 50182-1 3500 256.34 Receive Inventory from Manufacturing 5095 t WO f jsmith f 10210 f 2008-06-20 12:35:16.941089-04 2008-06-20 5084 85 W/O 50182-1 3500 -256.34 Receive Inventory from Manufacturing 5095 t WO f jsmith f 10212 f 2008-06-20 12:35:16.941089-04 2008-06-20 5085 86 W/O 50182-1 3501 -100.00 Material Issue to Work Order 5096 t WO f jsmith f 10211 f 2008-06-20 12:35:16.941089-04 2008-06-20 5085 138 W/O 50182-1 3501 100.00 Material Issue to Work Order 5096 t WO f jsmith f 10214 f 2008-06-20 12:35:16.941089-04 2008-06-20 5086 86 W/O 50182-1 3502 -82.10 Material Issue to Work Order 5097 t WO f jsmith f 10213 f 2008-06-20 12:35:16.941089-04 2008-06-20 5086 138 W/O 50182-1 3502 82.10 Material Issue to Work Order 5097 t WO f jsmith f 10216 f 2008-06-20 12:35:16.941089-04 2008-06-20 5087 86 W/O 50182-1 3503 -40.00 Material Issue to Work Order 5098 t WO f jsmith f 10215 f 2008-06-20 12:35:16.941089-04 2008-06-20 5087 138 W/O 50182-1 3503 40.00 Material Issue to Work Order 5098 t WO f jsmith f 10218 f 2008-06-20 12:35:16.941089-04 2008-06-20 5088 86 W/O 50182-1 3504 -0.80 Material Issue to Work Order 5099 t WO f jsmith f 10217 f 2008-06-20 12:35:16.941089-04 2008-06-20 5088 138 W/O 50182-1 3504 0.80 Material Issue to Work Order 5099 t WO f jsmith f 10220 f 2008-06-20 12:35:16.941089-04 2008-06-20 5089 86 W/O 50182-1 -1 -1.10 Post Setup Time to Work Order 5100 t WO f jsmith f 10219 f 2008-06-20 12:35:16.941089-04 2008-06-20 5089 94 W/O 50182-1 -1 1.10 Post Setup Time to Work Order 5100 t WO f jsmith f 10222 f 2008-06-20 12:35:16.941089-04 2008-06-20 5090 86 W/O 50182-1 -1 -22.00 Post Run Time to Work Order 5101 t WO f jsmith f 10221 f 2008-06-20 12:35:16.941089-04 2008-06-20 5090 94 W/O 50182-1 -1 22.00 Post Run Time to Work Order 5101 t WO f jsmith f 10224 f 2008-06-20 12:35:16.941089-04 2008-06-20 5091 86 W/O 50182-1 -1 -2.20 Post Setup Time to Work Order 5102 t WO f jsmith f 10223 f 2008-06-20 12:35:16.941089-04 2008-06-20 5091 94 W/O 50182-1 -1 2.20 Post Setup Time to Work Order 5102 t WO f jsmith f 10226 f 2008-06-20 12:35:16.941089-04 2008-06-20 5092 86 W/O 50182-1 -1 -5.50 Post Run Time to Work Order 5103 t WO f jsmith f 10225 f 2008-06-20 12:35:16.941089-04 2008-06-20 5092 94 W/O 50182-1 -1 5.50 Post Run Time to Work Order 5103 t WO f jsmith f 10228 f 2008-06-20 12:35:16.941089-04 2008-06-20 5093 86 W/O 50182-1 -1 -0.44 Post Setup Time to Work Order 5104 t WO f jsmith f 10227 f 2008-06-20 12:35:16.941089-04 2008-06-20 5093 94 W/O 50182-1 -1 0.44 Post Setup Time to Work Order 5104 t WO f jsmith f 10230 f 2008-06-20 12:35:16.941089-04 2008-06-20 5094 86 W/O 50182-1 -1 -2.20 Post Run Time to Work Order 5105 t WO f jsmith f 10229 f 2008-06-20 12:35:16.941089-04 2008-06-20 5094 94 W/O 50182-1 -1 2.20 Post Run Time to Work Order 5105 t WO f jsmith f 10232 f 2008-06-20 12:35:46.397893-04 2008-06-20 5095 96 S/R 50182-1 3505 -256.34 Issue to Shipping 5108 t SO f jsmith f 10231 f 2008-06-20 12:35:46.397893-04 2008-06-20 5095 85 S/R 50182-1 3505 256.34 Issue to Shipping 5108 t SO f jsmith f 10234 f 2008-06-20 12:36:05.720664-04 2008-06-20 5096 108 S/R 60030 -1 -256.34 Ship Shipment 5109 t SH f jsmith f 10233 f 2008-06-20 12:36:05.720664-04 2008-06-20 5096 96 S/R 60030 -1 256.34 Ship Shipment 5109 t SH f jsmith f 10236 f 2008-06-20 12:36:37.646629-04 2008-06-20 5097 122 A/R 60064 \N 27.00 5110 t IN f jsmith f 10237 f 2008-06-20 12:36:37.646629-04 2008-06-20 5097 106 A/R 60064 \N -1024.50 5110 t IN f jsmith f 10235 f 2008-06-20 12:36:37.646629-04 2008-06-20 5097 102 A/R 60064 \N 47.50 5110 t IN f jsmith f 10238 f 2008-06-20 12:36:37.646629-04 2008-06-20 5097 103 A/R 60064 \N 950.00 5110 t IN f jsmith f 10240 f 2008-06-20 12:37:44.606687-04 2008-06-20 5098 109 A/R C-12311 \N -1024.00 TTOYS-Tremendous Toys Incorporated 5111 t CR t jsmith f 10239 f 2008-06-20 12:37:44.606687-04 2008-06-20 5098 106 A/R I-60064 \N 1024.00 TTOYS-Tremendous Toys Incorporated 5111 t CR f jsmith f 10242 f 2008-06-20 12:38:06.580773-04 2008-06-20 5099 109 A/R C-1231 \N -0.50 TTOYS-Tremendous Toys Incorporated 5112 t CR t jsmith f 10241 f 2008-06-20 12:38:06.580773-04 2008-06-20 5099 106 A/R I-60064 \N 0.50 TTOYS-Tremendous Toys Incorporated 5112 t CR f jsmith f 10314 f 2008-09-08 18:31:14.870211-04 2008-06-15 5130 86 G/L COR-31MA -1 1100.00 Correction 5150 t JE f jsmith f 10315 f 2008-09-08 18:31:14.870211-04 2008-06-15 5130 95 G/L COR-31MA -1 -1100.00 Correction 5150 t JE f jsmith f 10316 f 2008-09-08 18:35:52.303611-04 2008-06-15 5131 95 G/L MA-COR -1 2200.00 Correction 5151 t JE f jsmith f 10317 f 2008-09-08 18:35:52.303611-04 2008-06-15 5131 138 G/L MA-COR -1 -2200.00 Correction 5151 t JE f jsmith f 10545 f 2008-10-02 11:22:17.596569-04 2008-06-01 5239 86 G/L MA-0601 -1 -2219.74 Correct posting. 5276 t JE f jsmith f 10544 f 2008-10-02 11:22:17.596569-04 2008-06-01 5239 138 G/L MA-0601 -1 2219.74 Correct posting. 5276 t JE f jsmith f 10293 f 2008-09-08 18:00:33.605668-04 2008-07-15 5121 106 A/R I-60065 \N 47250.00 TTOYS-Tremendous Toys Incorporated 5140 t CR f jsmith f 10319 f 2008-09-08 18:37:13.752361-04 2008-07-15 5132 95 G/L Cor-MA-1 -1 -8558.48 Correciton for timing 5152 t JE f jsmith f 10318 f 2008-09-08 18:37:13.752361-04 2008-07-15 5132 138 G/L Cor-MA-1 -1 8558.48 Correciton for timing 5152 t JE f jsmith f 10922 f 2009-08-13 08:50:25.065315-04 2009-08-13 5401 94 W/O 10061-1 -1 1.10 \N 5488 t WO f admin f 11677 f 2009-10-13 13:36:44.045243-04 2009-10-13 5773 94 W/O 10067-2 -1 159.50 \N 5934 t WO f jsmith f 11700 f 2009-10-13 13:37:14.252675-04 2009-10-13 5784 86 W/O 10069-1 -1 -550.00 \N 5948 t WO f jsmith f 11924 f 2009-12-03 16:38:32.769241-05 2009-12-03 5887 86 W/O 50200-1 -1 -550.00 \N 6068 t WO f admin f 7777 f 2006-01-12 12:57:39.498845-05 2005-01-03 3935 108 G/L Ship Order \N -1000.00 3157 t ST f jsmith f 7775 f 2006-01-12 12:57:39.498845-05 2005-01-03 3935 109 G/L Ship Order \N -2000.00 3157 t ST t jsmith f 8179 f 2006-06-23 16:12:19.031-04 2005-02-15 4127 109 G/L MA-INV-1 -1 20000.00 Special entry 3441 t JE t jsmith f 8180 f 2006-06-23 16:12:19.031-04 2005-02-15 4127 85 G/L MA-INV-1 -1 -20000.00 Special entry 3441 t JE f jsmith f 7729 f 2006-01-12 09:39:23.773683-05 2004-01-01 3923 97 G/L EXP-INIT -1 -1000.00 Init-2004 3145 t JE f jsmith f 8529 f 2007-01-03 14:46:20.062-05 2007-01-03 4283 110 A/P 30027 \N -1000.00 RF-0111 3622 t VO f mfgadmin f 8531 f 2007-01-03 14:46:20.062-05 2007-01-03 4283 97 A/P 30027 \N -2000.00 RF-0111 3622 t VO f mfgadmin f 8532 f 2007-01-03 14:46:20.062-05 2007-01-03 4283 119 A/P 30027 \N -1000.00 RF-0111 3622 t VO f mfgadmin f 8533 f 2007-01-03 14:46:20.062-05 2007-01-03 4283 99 A/P 30027 \N 9000.00 RF-0111 3622 t VO f mfgadmin f 8530 f 2007-01-03 14:46:20.062-05 2007-01-03 4283 120 A/P 30027 \N -5000.00 RF-0111 3622 t VO f mfgadmin f 8535 f 2007-01-03 14:47:29.031-05 2007-01-03 4284 101 A/P 30027 \N 180.00 Discount for V 30027 3623 t CM f mfgadmin f 8534 f 2007-01-03 14:47:29.031-05 2007-01-03 4284 99 A/P 30027 \N -180.00 Discount for V 30027 3623 t CM f mfgadmin f 8536 f 2007-01-03 14:48:30.703-05 2007-01-03 4285 99 A/P 3021 123 -8820.00 TPARTS-Toy Parts Inc. 3625 t CK f mfgadmin f 8541 f 2007-01-03 14:49:20.421-05 2007-01-03 4286 108 G/L Ship Order \N -15000.00 3626 t ST f mfgadmin f 8540 f 2007-01-03 14:49:20.421-05 2007-01-03 4286 85 G/L Ship Order \N 15000.00 3626 t ST f mfgadmin f 8539 f 2007-01-03 14:49:20.421-05 2007-01-03 4286 103 G/L Ship Order \N 50000.00 3626 t ST f mfgadmin f 9137 f 2007-08-31 11:23:55.218-04 2007-08-31 4572 131 A/P 3034 139 -100.00 TPARTS-Toy Parts Inc. 3963 t CK f mfgadmin f 7201 f 2005-12-29 09:20:05.083493-05 2005-10-01 3672 113 G/L STOCK-1 -1 10000.00 Stock Cert- 001 2370 t JE f jsmith f 7202 f 2005-12-29 09:20:05.083493-05 2005-10-01 3672 109 G/L STOCK-1 -1 -10000.00 Stock Cert- 001 2370 t JE t jsmith f 7208 f 2005-12-29 09:25:54.533608-05 2005-10-02 3674 109 G/L SLS-001 -1 -10000.00 Initial sale 2372 t JE t jsmith f 7207 f 2005-12-29 09:25:54.533608-05 2005-10-02 3674 103 G/L SLS-001 -1 10000.00 Initial sale 2372 t JE f jsmith f 7759 f 2006-01-12 12:00:16.701938-05 2005-10-01 3930 108 G/L Ship Order \N -1000.00 3152 t ST f jsmith f 7757 f 2006-01-12 12:00:16.701938-05 2005-10-01 3930 109 G/L Ship Order \N -2000.00 3152 t ST t jsmith f 7756 f 2006-01-12 12:00:16.701938-05 2005-10-01 3930 85 G/L Ship Order \N 1000.00 3152 t ST f jsmith f 7758 f 2006-01-12 12:00:16.701938-05 2005-10-01 3930 103 G/L Ship Order \N 2000.00 3152 t ST f jsmith f 7739 f 2006-01-12 10:13:13.369715-05 2005-02-02 3924 108 G/L Ship Order \N 1000.00 Wrong Date 3146 t ST f jsmith f 7733 f 2006-01-12 10:04:11.072158-05 2005-02-02 3924 108 G/L Ship Order \N -1000.00 3146 t ST f jsmith f 7731 f 2006-01-12 10:04:11.072158-05 2005-02-02 3924 109 G/L Ship Order \N -2000.00 3146 t ST t jsmith f 7741 f 2006-01-12 10:13:13.369715-05 2005-02-02 3924 85 G/L Ship Order \N -1000.00 Wrong Date 3146 t ST f jsmith f 7730 f 2006-01-12 10:04:11.072158-05 2005-02-02 3924 85 G/L Ship Order \N 1000.00 3146 t ST f jsmith f 7740 f 2006-01-12 10:13:13.369715-05 2005-02-02 3924 103 G/L Ship Order \N -2000.00 Wrong Date 3146 t ST f jsmith f 7732 f 2006-01-12 10:04:11.072158-05 2005-02-02 3924 103 G/L Ship Order \N 2000.00 3146 t ST f jsmith f 7728 f 2006-01-12 09:39:23.773683-05 2004-01-01 3923 109 G/L EXP-INIT -1 1000.00 Init-2004 3145 t JE t jsmith f 7742 f 2006-01-12 11:25:12.008773-05 2004-01-01 3926 113 G/L STK-001 -1 10000.00 CERT-001 3148 t JE f jsmith f 7743 f 2006-01-12 11:25:12.008773-05 2004-01-01 3926 109 G/L STK-001 -1 -10000.00 CERT-001 3148 t JE t jsmith f 7747 f 2006-01-12 11:26:49.042589-05 2004-01-02 3927 108 G/L Ship Order \N -1000.00 3149 t ST f jsmith f 7745 f 2006-01-12 11:26:49.042589-05 2004-01-02 3927 109 G/L Ship Order \N -2000.00 3149 t ST t jsmith f 7744 f 2006-01-12 11:26:49.042589-05 2004-01-02 3927 85 G/L Ship Order \N 1000.00 3149 t ST f jsmith f 7746 f 2006-01-12 11:26:49.042589-05 2004-01-02 3927 103 G/L Ship Order \N 2000.00 3149 t ST f jsmith f 7749 f 2006-01-12 11:33:08.577848-05 2004-01-02 3928 108 G/L Ship Order \N -1000.00 3150 t ST f jsmith f 7379 f 2005-12-29 18:05:06.53047-05 2005-12-29 3759 95 S/R 20007 2943 50.00 Receive Inventory from P/O 2474 t PO f jsmith f 7382 f 2005-12-29 18:05:06.53047-05 2005-12-29 3760 98 S/R 20007 -1 -10.00 Receive Inventory Freight from P/O 2475 t PO f jsmith f 7381 f 2005-12-29 18:05:06.53047-05 2005-12-29 3760 95 S/R 20007 -1 10.00 Receive Inventory Freight from P/O 2475 t PO f jsmith f 7384 f 2005-12-29 18:06:35.831496-05 2005-12-29 3761 90 A/P 30007 \N 10.00 RF-3 2476 t VO f jsmith f 7385 f 2005-12-29 18:06:35.831496-05 2005-12-29 3761 99 A/P 30007 \N 50.00 RF-3 2476 t VO f jsmith f 7383 f 2005-12-29 18:06:35.831496-05 2005-12-29 3761 95 A/P 30007 \N -60.00 RF-3 2476 t VO f jsmith f 7386 f 2005-12-30 14:55:21.954437-05 2005-12-30 3762 95 S/R 20008 2944 10.00 Receive Inventory from P/O 2477 t PO f jsmith f 7387 f 2005-12-30 14:55:21.954437-05 2005-12-30 3762 85 S/R 20008 2944 -10.00 Receive Inventory from P/O 2477 t PO f jsmith f 7389 f 2005-12-30 14:55:21.954437-05 2005-12-30 3763 98 S/R 20008 -1 -10.00 Receive Inventory Freight from P/O 2478 t PO f jsmith f 7388 f 2005-12-30 14:55:21.954437-05 2005-12-30 3763 95 S/R 20008 -1 10.00 Receive Inventory Freight from P/O 2478 t PO f jsmith f 7391 f 2005-12-30 14:57:57.713172-05 2005-12-30 3764 90 A/P 30008 \N 10.00 55 2479 t VO f jsmith f 7392 f 2005-12-30 14:57:57.713172-05 2005-12-30 3764 99 A/P 30008 \N 10.00 55 2479 t VO f jsmith f 7390 f 2005-12-30 14:57:57.713172-05 2005-12-30 3764 95 A/P 30008 \N -20.00 55 2479 t VO f jsmith f 7393 f 2005-12-30 15:06:11.174343-05 2005-12-30 3765 95 S/R 20009 2945 100.00 Receive Inventory from P/O 2480 t PO f jsmith f 7281 f 2005-12-29 10:12:08.029586-05 2005-12-29 3710 86 W/O 40000-2 -1 -0.88 Post Setup Time to Work Order 2416 t WO f jsmith f 7280 f 2005-12-29 10:12:08.029586-05 2005-12-29 3710 94 W/O 40000-2 -1 0.88 Post Setup Time to Work Order 2416 t WO f jsmith f 7283 f 2005-12-29 10:12:08.029586-05 2005-12-29 3711 86 W/O 40000-2 -1 -8.80 Post Run Time to Work Order 2417 t WO f jsmith f 7282 f 2005-12-29 10:12:08.029586-05 2005-12-29 3711 94 W/O 40000-2 -1 8.80 Post Run Time to Work Order 2417 t WO f jsmith f 7284 f 2005-12-29 10:12:34.705365-05 2005-12-29 3712 86 W/O 10001-1 2921 266.68 Receive Inventory from Manufacturing 2420 t WO f jsmith f 7285 f 2005-12-29 10:12:34.705365-05 2005-12-29 3712 85 W/O 10001-1 2921 -266.68 Receive Inventory from Manufacturing 2420 t WO f jsmith f 7332 f 2005-12-29 12:02:08.616234-05 2005-12-29 3737 86 W/O Misc. 2933 -22.50 Receive from Misc. Production for Item Number TKIT1\n 2450 t WO f jsmith f 7331 f 2005-12-29 12:02:08.616234-05 2005-12-29 3737 85 W/O Misc. 2933 22.50 Receive from Misc. Production for Item Number TKIT1\n 2450 t WO f jsmith f 10308 f 2008-09-08 18:23:22.265604-04 2008-08-08 5128 138 G/L COR-01 -1 1100.00 Setup correction entry 5148 t JE f jsmith f 10310 f 2008-09-08 18:27:11.871348-04 2008-08-08 5128 138 G/L COR-01 -1 -1100.00 correction = wrong date 5148 t JE f jsmith f 10274 f 2008-09-08 17:49:44.498604-04 2008-09-08 5113 85 S/R 50183-2 3512 10271.20 Issue to Shipping 5132 t SO f admin f 10276 f 2008-09-08 17:49:52.30474-04 2008-09-08 5114 96 S/R 50183-2 3513 10271.20 Return from Shipping 5133 t SO f admin f 10277 f 2008-09-08 17:49:52.30474-04 2008-09-08 5114 85 S/R 50183-2 3513 -10271.20 Return from Shipping 5133 t SO f admin f 10280 f 2008-09-08 17:50:11.487338-04 2008-09-08 5116 96 S/R 60032 -1 10271.20 Ship Shipment 5135 t SH f admin f 10284 f 2008-09-08 17:50:22.824305-04 2008-09-08 5117 122 A/R 60066 \N 150.00 5136 t IN f admin f 10285 f 2008-09-08 17:50:22.824305-04 2008-09-08 5117 106 A/R 60066 \N -41692.20 5136 t IN f admin f 10283 f 2008-09-08 17:50:22.824305-04 2008-09-08 5117 102 A/R 60066 \N 1978.20 5136 t IN f admin f 10282 f 2008-09-08 17:50:22.824305-04 2008-09-08 5117 103 A/R 60066 \N 39564.00 5136 t IN f admin f 10287 f 2008-09-08 17:50:53.703238-04 2008-09-08 5118 96 S/R 50183-1 3515 -7703.40 Issue to Shipping 5137 t SO f admin f 10286 f 2008-09-08 17:50:53.703238-04 2008-09-08 5118 85 S/R 50183-1 3515 7703.40 Issue to Shipping 5137 t SO f admin f 10289 f 2008-09-08 17:51:01.035317-04 2008-09-08 5119 108 S/R 60033 -1 -7703.40 Ship Shipment 5138 t SH f admin f 10288 f 2008-09-08 17:51:01.035317-04 2008-09-08 5119 96 S/R 60033 -1 7703.40 Ship Shipment 5138 t SH f admin f 10292 f 2008-09-08 17:51:13.790925-04 2008-09-08 5120 106 A/R 60067 \N -47250.00 5139 t IN f admin f 10291 f 2008-09-08 17:51:13.790925-04 2008-09-08 5120 102 A/R 60067 \N 2250.00 5139 t IN f admin f 10290 f 2008-09-08 17:51:13.790925-04 2008-09-08 5120 103 A/R 60067 \N 45000.00 5139 t IN f admin f 10295 f 2008-09-08 18:00:35.835742-04 2008-09-08 5122 106 A/R I-60066 \N 41692.20 TTOYS-Tremendous Toys Incorporated 5141 t CR f jsmith f 10298 f 2008-09-08 18:00:38.405404-04 2008-09-08 5123 106 A/R I-60067 \N 47250.00 TTOYS-Tremendous Toys Incorporated 5142 t CR f jsmith f 10299 f 2008-09-08 18:00:38.405404-04 2008-09-08 5123 123 A/R \N -250.00 TTOYS-Tremendous Toys Incorporated 5142 t CR f jsmith f 10304 f 2008-09-08 18:13:44.620865-04 2008-09-08 5126 129 G/L 3048 157 -300.00 NC TAX-North Carolina IRS 5146 t CK f jsmith f 10306 f 2008-09-08 18:13:48.37063-04 2008-09-08 5127 102 G/L 3049 156 -200.00 VA TAX-Virginia Sales Tax 5147 t CK f jsmith f 10313 f 2008-09-08 18:29:23.625272-04 2008-09-08 5129 95 G/L COR-31 -1 -1100.00 Correction entry 5149 t JE f jsmith f 10312 f 2008-09-08 18:29:23.625272-04 2008-09-08 5129 138 G/L COR-31 -1 1100.00 Correction entry 5149 t JE f jsmith f 10320 f 2008-09-08 18:39:13.156532-04 2008-09-01 5133 95 G/L MA-Correct -1 9656.48 Timing correction. 5153 t JE f jsmith f 10321 f 2008-09-08 18:39:13.156532-04 2008-09-01 5133 138 G/L MA-Correct -1 -9656.48 Timing correction. 5153 t JE f jsmith f 10322 f 2008-09-08 18:40:01.743567-04 2008-09-01 5134 95 G/L Cor-MA-3 -1 2.00 Correct amount 5154 t JE f jsmith f 10323 f 2008-09-08 18:40:01.743567-04 2008-09-01 5134 138 G/L Cor-MA-3 -1 -2.00 Correct amount 5154 t JE f jsmith f 10325 f 2008-09-09 16:54:16.812243-04 2008-09-09 5135 96 S/R 50184-1.1 3516 -0.75 Issue to Shipping 5155 t SO f jsmith f 10324 f 2008-09-09 16:54:16.812243-04 2008-09-09 5135 138 S/R 50184-1.1 3516 0.75 Issue to Shipping 5155 t SO f jsmith f 10327 f 2008-09-09 16:54:16.812243-04 2008-09-09 5136 96 S/R 50184-1.2 3517 -0.40 Issue to Shipping 5156 t SO f jsmith f 10326 f 2008-09-09 16:54:16.812243-04 2008-09-09 5136 138 S/R 50184-1.2 3517 0.40 Issue to Shipping 5156 t SO f jsmith f 10329 f 2008-09-09 16:54:16.812243-04 2008-09-09 5137 96 S/R 50184-1.3 3518 -0.25 Issue to Shipping 5157 t SO f jsmith f 10328 f 2008-09-09 16:54:16.812243-04 2008-09-09 5137 138 S/R 50184-1.3 3518 0.25 Issue to Shipping 5157 t SO f jsmith f 10331 f 2008-09-09 16:54:16.812243-04 2008-09-09 5138 96 S/R 50184-1.4 3519 -4.15 Issue to Shipping 5158 t SO f jsmith f 10330 f 2008-09-09 16:54:16.812243-04 2008-09-09 5138 138 S/R 50184-1.4 3519 4.15 Issue to Shipping 5158 t SO f jsmith f 10333 f 2008-09-09 16:54:16.812243-04 2008-09-09 5139 96 S/R 50184-1.5 3520 -2.33 Issue to Shipping 5159 t SO f jsmith f 10332 f 2008-09-09 16:54:16.812243-04 2008-09-09 5139 138 S/R 50184-1.5 3520 2.33 Issue to Shipping 5159 t SO f jsmith f 10334 f 2008-09-09 16:55:37.747755-04 2008-09-09 5140 96 S/R 50184-1.1 3521 0.75 Return from Shipping 5160 t SO f jsmith f 10335 f 2008-09-09 16:55:37.747755-04 2008-09-09 5140 138 S/R 50184-1.1 3521 -0.75 Return from Shipping 5160 t SO f jsmith f 10337 f 2008-09-09 16:55:49.386918-04 2008-09-09 5141 96 S/R 50184-1.1 3522 -0.75 Issue to Shipping 5161 t SO f jsmith f 10336 f 2008-09-09 16:55:49.386918-04 2008-09-09 5141 138 S/R 50184-1.1 3522 0.75 Issue to Shipping 5161 t SO f jsmith f 10339 f 2008-09-09 17:04:00.995768-04 2008-09-09 5142 108 S/R 60034 -1 -0.75 Ship Shipment 5162 t SH f jsmith f 10338 f 2008-09-09 17:04:00.995768-04 2008-09-09 5142 96 S/R 60034 -1 0.75 Ship Shipment 5162 t SH f jsmith f 10341 f 2008-09-09 17:04:00.995768-04 2008-09-09 5143 108 S/R 60034 -1 -0.40 Ship Shipment 5163 t SH f jsmith f 10340 f 2008-09-09 17:04:00.995768-04 2008-09-09 5143 96 S/R 60034 -1 0.40 Ship Shipment 5163 t SH f jsmith f 10343 f 2008-09-09 17:04:00.995768-04 2008-09-09 5144 108 S/R 60034 -1 -0.25 Ship Shipment 5164 t SH f jsmith f 10342 f 2008-09-09 17:04:00.995768-04 2008-09-09 5144 96 S/R 60034 -1 0.25 Ship Shipment 5164 t SH f jsmith f 10345 f 2008-09-09 17:04:00.995768-04 2008-09-09 5145 108 S/R 60034 -1 -4.15 Ship Shipment 5165 t SH f jsmith f 10344 f 2008-09-09 17:04:00.995768-04 2008-09-09 5145 96 S/R 60034 -1 4.15 Ship Shipment 5165 t SH f jsmith f 10347 f 2008-09-09 17:04:00.995768-04 2008-09-09 5146 108 S/R 60034 -1 -2.33 Ship Shipment 5166 t SH f jsmith f 10346 f 2008-09-09 17:04:00.995768-04 2008-09-09 5146 96 S/R 60034 -1 2.33 Ship Shipment 5166 t SH f jsmith f 10350 f 2008-09-09 17:07:12.410895-04 2008-09-09 5147 122 A/R 60068 \N 10.00 5167 t IN f jsmith f 10351 f 2008-09-09 17:07:12.410895-04 2008-09-09 5147 106 A/R 60068 \N -38.35 5167 t IN f jsmith f 10349 f 2008-09-09 17:07:12.410895-04 2008-09-09 5147 102 A/R 60068 \N 1.35 5167 t IN f jsmith f 10348 f 2008-09-09 17:07:12.410895-04 2008-09-09 5147 103 A/R 60068 \N 27.00 5167 t IN f jsmith f 10354 f 2008-09-09 17:23:26.315642-04 2008-09-09 5148 106 A/R I-60068 \N 38.35 TTOYS-Tremendous Toys Incorporated 5168 t CR f jsmith f 10352 f 2008-09-09 17:23:26.315642-04 2008-09-09 5148 123 A/R Discount Taken \N -3.35 TTOYS-Tremendous Toys Incorporated 5168 t CR f jsmith f 10356 f 2008-09-24 16:23:10.052774-04 2008-09-24 5149 92 I/M SCRAP-Paint 3523 -560.00 Material Scrap\nOld and Damaged Paint 5169 t f jsmith f 10355 f 2008-09-24 16:23:10.052774-04 2008-09-24 5149 138 I/M SCRAP-Paint 3523 560.00 Material Scrap\nOld and Damaged Paint 5169 t f jsmith f 10358 f 2008-09-24 16:24:12.070752-04 2008-09-24 5150 92 I/M SCRAP Paint2 3524 -176.10 Material Scrap\nMore old and damaged Paint 5170 t f jsmith f 10357 f 2008-09-24 16:24:12.070752-04 2008-09-24 5150 138 I/M SCRAP Paint2 3524 176.10 Material Scrap\nMore old and damaged Paint 5170 t f jsmith f 10359 f 2008-09-24 16:28:51.272858-04 2008-09-24 5151 95 S/R 20056 3527 80.00 Receive Inventory from P/O 5171 t PO f jsmith f 10360 f 2008-09-24 16:28:51.272858-04 2008-09-24 5151 138 S/R 20056 3527 -80.00 Receive Inventory from P/O 5171 t PO f jsmith f 10361 f 2008-09-24 16:33:28.624459-04 2008-09-24 5152 95 S/R 20057 3528 64.20 Receive Inventory from P/O 5173 t PO f jsmith f 10362 f 2008-09-24 16:33:28.624459-04 2008-09-24 5152 85 S/R 20057 3528 -64.20 Receive Inventory from P/O 5173 t PO f jsmith f 10363 f 2008-09-24 16:34:02.049554-04 2008-09-24 5153 95 S/R 20057 3529 192.59 Receive Inventory from P/O 5175 t PO f jsmith f 10364 f 2008-09-24 16:34:02.049554-04 2008-09-24 5153 85 S/R 20057 3529 -192.59 Receive Inventory from P/O 5175 t PO f jsmith f 10366 f 2008-09-24 16:35:56.675593-04 2008-09-24 5154 90 A/P 30060 \N -293.21 TPARTS-Toy Parts Inc. RF10019 5177 t VO f jsmith f 10367 f 2008-09-24 16:35:56.675593-04 2008-09-24 5154 99 A/P 30060 \N 550.00 TPARTS-Toy Parts Inc. RF10019 5177 t VO f jsmith f 10365 f 2008-09-24 16:35:56.675593-04 2008-09-24 5154 95 A/P 30060 \N -256.79 TPARTS-Toy Parts Inc. RF10019 5177 t VO f jsmith f 10369 f 2008-09-24 16:36:14.080239-04 2008-09-24 5156 90 A/P 30059 \N -1020.00 WCHEM-World Chem, Inc. RF100191 5179 t VO f jsmith f 10370 f 2008-09-24 16:36:14.080239-04 2008-09-24 5156 99 A/P 30059 \N 1100.00 WCHEM-World Chem, Inc. RF100191 5179 t VO f jsmith f 10368 f 2008-09-24 16:36:14.080239-04 2008-09-24 5156 95 A/P 30059 \N -80.00 WCHEM-World Chem, Inc. RF100191 5179 t VO f jsmith f 10373 f 2008-09-24 16:37:13.387861-04 2008-09-24 5157 99 A/P 3052 158 -539.00 TPARTS-Toy Parts Inc. 5182 t CK f jsmith f 10372 f 2008-09-24 16:37:13.387861-04 2008-09-24 5158 101 A/P 30060 \N 11.00 Discount for V 30060 5183 t DS f jsmith f 10371 f 2008-09-24 16:37:13.387861-04 2008-09-24 5158 99 A/P 30060 \N -11.00 Discount for V 30060 5183 t DS f jsmith f 10377 f 2008-09-24 16:37:16.553023-04 2008-09-24 5159 99 A/P 3053 159 -1078.00 WCHEM-World Chem, Inc. 5185 t CK f jsmith f 10376 f 2008-09-24 16:37:16.553023-04 2008-09-24 5160 101 A/P 30059 \N 22.00 Discount for V 30059 5186 t DS f jsmith f 10375 f 2008-09-24 16:37:16.553023-04 2008-09-24 5160 99 A/P 30059 \N -22.00 Discount for V 30059 5186 t DS f jsmith f 10563 f 2008-12-31 13:56:13.359747-05 2008-09-01 5248 106 G/L ADJ-AR -1 0.01 Fix manual mistake 5289 t JE f jsmith f 10564 f 2008-12-31 13:56:13.359747-05 2008-09-01 5248 103 G/L ADJ-AR -1 -0.01 Fix manual mistake 5289 t JE f jsmith f 10413 f 2008-10-02 09:59:48.655574-04 2008-10-02 5178 138 W/O 50185-1 3539 1.49 Material Issue to Work Order 5206 t WO f jsmith f 10420 f 2008-10-02 10:01:44.855331-04 2008-10-02 5181 86 W/O 50185-1 3540 -0.11 Material Issue to Work Order 5209 t WO f jsmith f 10419 f 2008-10-02 10:01:44.855331-04 2008-10-02 5181 138 W/O 50185-1 3540 0.11 Material Issue to Work Order 5209 t WO f jsmith f 10422 f 2008-10-02 10:01:57.611219-04 2008-10-02 5182 86 W/O 50185-1 3541 -4.00 Material Issue to Work Order 5210 t WO f jsmith f 10421 f 2008-10-02 10:01:57.611219-04 2008-10-02 5182 138 W/O 50185-1 3541 4.00 Material Issue to Work Order 5210 t WO f jsmith f 10424 f 2008-10-02 10:02:20.251521-04 2008-10-02 5183 86 W/O 50185-1 3542 -8.21 Material Issue to Work Order 5211 t WO f jsmith f 10423 f 2008-10-02 10:02:20.251521-04 2008-10-02 5183 138 W/O 50185-1 3542 8.21 Material Issue to Work Order 5211 t WO f jsmith f 10426 f 2008-10-02 10:02:29.241588-04 2008-10-02 5184 86 W/O 40010-1 3543 -100.00 Material Issue to Work Order 5212 t WO f jsmith f 10425 f 2008-10-02 10:02:29.241588-04 2008-10-02 5184 138 W/O 40010-1 3543 100.00 Material Issue to Work Order 5212 t WO f jsmith f 10428 f 2008-10-02 10:02:29.241588-04 2008-10-02 5185 86 W/O 40010-1 3544 -40.00 Material Issue to Work Order 5213 t WO f jsmith f 10427 f 2008-10-02 10:02:29.241588-04 2008-10-02 5185 138 W/O 40010-1 3544 40.00 Material Issue to Work Order 5213 t WO f jsmith f 10430 f 2008-10-02 10:02:29.241588-04 2008-10-02 5186 86 W/O 40010-1 3545 -0.80 Material Issue to Work Order 5214 t WO f jsmith f 10429 f 2008-10-02 10:02:29.241588-04 2008-10-02 5186 138 W/O 40010-1 3545 0.80 Material Issue to Work Order 5214 t WO f jsmith f 10432 f 2008-10-02 10:02:29.241588-04 2008-10-02 5187 86 W/O 40010-1 3546 -82.10 Material Issue to Work Order 5215 t WO f jsmith f 10431 f 2008-10-02 10:02:29.241588-04 2008-10-02 5187 138 W/O 40010-1 3546 82.10 Material Issue to Work Order 5215 t WO f jsmith f 10434 f 2008-10-02 10:02:29.241588-04 2008-10-02 5188 86 W/O 40010-1 -1 -1.10 Post Setup Time to Work Order 5216 t WO f jsmith f 10433 f 2008-10-02 10:02:29.241588-04 2008-10-02 5188 94 W/O 40010-1 -1 1.10 Post Setup Time to Work Order 5216 t WO f jsmith f 10436 f 2008-10-02 10:02:29.241588-04 2008-10-02 5189 86 W/O 40010-1 -1 -22.00 Post Run Time to Work Order 5217 t WO f jsmith f 10435 f 2008-10-02 10:02:29.241588-04 2008-10-02 5189 94 W/O 40010-1 -1 22.00 Post Run Time to Work Order 5217 t WO f jsmith f 10438 f 2008-10-02 10:02:29.241588-04 2008-10-02 5190 86 W/O 40010-1 -1 -2.20 Post Setup Time to Work Order 5218 t WO f jsmith f 10437 f 2008-10-02 10:02:29.241588-04 2008-10-02 5190 94 W/O 40010-1 -1 2.20 Post Setup Time to Work Order 5218 t WO f jsmith f 10440 f 2008-10-02 10:02:29.241588-04 2008-10-02 5191 86 W/O 40010-1 -1 -5.50 Post Run Time to Work Order 5219 t WO f jsmith f 10439 f 2008-10-02 10:02:29.241588-04 2008-10-02 5191 94 W/O 40010-1 -1 5.50 Post Run Time to Work Order 5219 t WO f jsmith f 10442 f 2008-10-02 10:02:29.241588-04 2008-10-02 5192 86 W/O 40010-1 -1 -0.44 Post Setup Time to Work Order 5220 t WO f jsmith f 10441 f 2008-10-02 10:02:29.241588-04 2008-10-02 5192 94 W/O 40010-1 -1 0.44 Post Setup Time to Work Order 5220 t WO f jsmith f 10444 f 2008-10-02 10:02:29.241588-04 2008-10-02 5193 86 W/O 40010-1 -1 -2.20 Post Run Time to Work Order 5221 t WO f jsmith f 10443 f 2008-10-02 10:02:29.241588-04 2008-10-02 5193 94 W/O 40010-1 -1 2.20 Post Run Time to Work Order 5221 t WO f jsmith f 10445 f 2008-10-02 10:02:29.241588-04 2008-10-02 5194 86 W/O 40010-1 3547 256.34 Receive Inventory from Manufacturing 5222 t WO f jsmith f 10446 f 2008-10-02 10:02:29.241588-04 2008-10-02 5194 85 W/O 40010-1 3547 -256.34 Receive Inventory from Manufacturing 5222 t WO f jsmith f 10448 f 2008-10-02 10:02:52.119267-04 2008-10-02 5195 96 S/R 40010-1 3548 -256.34 Issue to Shipping 5223 t SO f jsmith f 10447 f 2008-10-02 10:02:52.119267-04 2008-10-02 5195 85 S/R 40010-1 3548 256.34 Issue to Shipping 5223 t SO f jsmith f 10450 f 2008-10-02 10:02:52.119267-04 2008-10-02 5196 96 S/R 40010-2 3549 -37.69 Issue to Shipping 5224 t SO f jsmith f 10449 f 2008-10-02 10:02:52.119267-04 2008-10-02 5196 85 S/R 40010-2 3549 37.69 Issue to Shipping 5224 t SO f jsmith f 10452 f 2008-10-02 10:02:52.119267-04 2008-10-02 5197 96 S/R 40010-3.1 3550 -74.50 Issue to Shipping 5225 t SO f jsmith f 10451 f 2008-10-02 10:02:52.119267-04 2008-10-02 5197 138 S/R 40010-3.1 3550 74.50 Issue to Shipping 5225 t SO f jsmith f 10454 f 2008-10-02 10:02:52.119267-04 2008-10-02 5198 96 S/R 40010-3.2 3551 -40.00 Issue to Shipping 5226 t SO f jsmith f 10453 f 2008-10-02 10:02:52.119267-04 2008-10-02 5198 138 S/R 40010-3.2 3551 40.00 Issue to Shipping 5226 t SO f jsmith f 10456 f 2008-10-02 10:02:52.119267-04 2008-10-02 5199 96 S/R 40010-3.3 3552 -25.00 Issue to Shipping 5227 t SO f jsmith f 10455 f 2008-10-02 10:02:52.119267-04 2008-10-02 5199 138 S/R 40010-3.3 3552 25.00 Issue to Shipping 5227 t SO f jsmith f 10458 f 2008-10-02 10:02:52.119267-04 2008-10-02 5200 96 S/R 40010-3.4 3553 -415.48 Issue to Shipping 5228 t SO f jsmith f 10457 f 2008-10-02 10:02:52.119267-04 2008-10-02 5200 138 S/R 40010-3.4 3553 415.48 Issue to Shipping 5228 t SO f jsmith f 10460 f 2008-10-02 10:02:52.119267-04 2008-10-02 5201 96 S/R 40010-3.5 3554 -233.00 Issue to Shipping 5229 t SO f jsmith f 10459 f 2008-10-02 10:02:52.119267-04 2008-10-02 5201 138 S/R 40010-3.5 3554 233.00 Issue to Shipping 5229 t SO f jsmith f 10462 f 2008-10-02 10:14:05.050163-04 2008-10-02 5202 108 S/R 60035 -1 -256.34 Ship Shipment 5230 t SH f jsmith f 10461 f 2008-10-02 10:14:05.050163-04 2008-10-02 5202 96 S/R 60035 -1 256.34 Ship Shipment 5230 t SH f jsmith f 10464 f 2008-10-02 10:14:05.050163-04 2008-10-02 5203 108 S/R 60035 -1 -37.69 Ship Shipment 5231 t SH f jsmith f 10463 f 2008-10-02 10:14:05.050163-04 2008-10-02 5203 96 S/R 60035 -1 37.69 Ship Shipment 5231 t SH f jsmith f 10466 f 2008-10-02 10:14:05.050163-04 2008-10-02 5204 108 S/R 60035 -1 -74.50 Ship Shipment 5232 t SH f jsmith f 10465 f 2008-10-02 10:14:05.050163-04 2008-10-02 5204 96 S/R 60035 -1 74.50 Ship Shipment 5232 t SH f jsmith f 10468 f 2008-10-02 10:14:05.050163-04 2008-10-02 5205 108 S/R 60035 -1 -40.00 Ship Shipment 5233 t SH f jsmith f 10467 f 2008-10-02 10:14:05.050163-04 2008-10-02 5205 96 S/R 60035 -1 40.00 Ship Shipment 5233 t SH f jsmith f 10470 f 2008-10-02 10:14:05.050163-04 2008-10-02 5206 108 S/R 60035 -1 -25.00 Ship Shipment 5234 t SH f jsmith f 10469 f 2008-10-02 10:14:05.050163-04 2008-10-02 5206 96 S/R 60035 -1 25.00 Ship Shipment 5234 t SH f jsmith f 10472 f 2008-10-02 10:14:05.050163-04 2008-10-02 5207 108 S/R 60035 -1 -415.48 Ship Shipment 5235 t SH f jsmith f 10471 f 2008-10-02 10:14:05.050163-04 2008-10-02 5207 96 S/R 60035 -1 415.48 Ship Shipment 5235 t SH f jsmith f 10474 f 2008-10-02 10:14:05.050163-04 2008-10-02 5208 108 S/R 60035 -1 -233.00 Ship Shipment 5236 t SH f jsmith f 10473 f 2008-10-02 10:14:05.050163-04 2008-10-02 5208 96 S/R 60035 -1 233.00 Ship Shipment 5236 t SH f jsmith f 10477 f 2008-10-02 10:18:38.996087-04 2008-10-02 5209 122 A/R 60069 \N 100.00 5237 t IN f jsmith f 10478 f 2008-10-02 10:18:38.996087-04 2008-10-02 5209 106 A/R 60069 \N -4213.17 5237 t IN f jsmith f 10476 f 2008-10-02 10:18:38.996087-04 2008-10-02 5209 102 A/R 60069 \N 195.87 5237 t IN f jsmith f 10475 f 2008-10-02 10:18:38.996087-04 2008-10-02 5209 103 A/R 60069 \N 3917.30 5237 t IN f jsmith f 10480 f 2008-10-02 10:19:09.270232-04 2008-10-02 5210 133 A/R R -1 -1000.00 20016 5238 t CD f jsmith f 10479 f 2008-10-02 10:19:09.270232-04 2008-10-02 5210 106 A/R R -1 1000.00 20016 5238 t CD f jsmith f 10481 f 2008-10-02 10:20:20.101955-04 2008-10-02 5211 106 A/R I-60069 \N 3213.17 TTOYS-Tremendous Toys Incorporated 5239 t CR f jsmith f 10484 f 2008-10-02 10:21:09.352899-04 2008-10-02 5212 86 W/O 50185-1 3555 -10.00 Material Issue to Work Order 5242 t WO f jsmith f 10483 f 2008-10-02 10:21:09.352899-04 2008-10-02 5212 138 W/O 50185-1 3555 10.00 Material Issue to Work Order 5242 t WO f jsmith f 10488 f 2008-10-02 10:21:09.352899-04 2008-10-02 5214 86 W/O 50185-1 3557 -1.49 Material Issue to Work Order 5244 t WO f jsmith f 10487 f 2008-10-02 10:21:09.352899-04 2008-10-02 5214 138 W/O 50185-1 3557 1.49 Material Issue to Work Order 5244 t WO f jsmith f 10489 f 2008-10-02 10:21:09.352899-04 2008-10-02 5215 86 S/R 50185-1 -1 62.60 Issue to Shipping 5245 t SO f jsmith f 10490 f 2008-10-02 10:21:09.352899-04 2008-10-02 5215 96 S/R 50185-1 -1 -62.60 Issue to Shipping 5245 t SO f jsmith f 10492 f 2008-10-02 10:21:45.808217-04 2008-10-02 5216 108 S/R 60036 -1 -62.60 Ship Shipment 5246 t SH f jsmith f 10491 f 2008-10-02 10:21:45.808217-04 2008-10-02 5216 96 S/R 60036 -1 62.60 Ship Shipment 5246 t SH f jsmith f 10494 f 2008-10-02 10:22:00.531041-04 2008-10-02 5217 122 A/R 60070 \N 61.60 5247 t IN f jsmith f 10495 f 2008-10-02 10:22:00.531041-04 2008-10-02 5217 106 A/R 60070 \N -376.50 5247 t IN f jsmith f 10493 f 2008-10-02 10:22:00.531041-04 2008-10-02 5217 103 A/R 60070 \N 314.90 5247 t IN f jsmith f 10496 f 2008-10-02 10:23:43.657652-04 2008-10-02 5218 106 A/R I-60070 \N 376.50 XTRM-Xtreme Toys LTD 5248 t CR f jsmith f 10498 f 2008-10-02 10:29:14.019723-04 2008-10-02 5219 95 S/R 20059 3558 2567.80 Receive Inventory from P/O 5249 t PO f jsmith f 10499 f 2008-10-02 10:29:14.019723-04 2008-10-02 5219 85 S/R 20059 3558 -2567.80 Receive Inventory from P/O 5249 t PO f jsmith f 10500 f 2008-10-02 10:29:14.019723-04 2008-10-02 5220 95 S/R 20059 3559 2567.80 Receive Inventory from P/O 5251 t PO f jsmith f 10501 f 2008-10-02 10:29:14.019723-04 2008-10-02 5220 85 S/R 20059 3559 -2567.80 Receive Inventory from P/O 5251 t PO f jsmith f 10502 f 2008-10-02 10:29:14.019723-04 2008-10-02 5221 95 S/R 20059 3560 2567.80 Receive Inventory from P/O 5253 t PO f jsmith f 10503 f 2008-10-02 10:29:14.019723-04 2008-10-02 5221 85 S/R 20059 3560 -2567.80 Receive Inventory from P/O 5253 t PO f jsmith f 10505 f 2008-10-02 10:31:05.816992-04 2008-10-02 5222 90 A/P 30061 \N -10.00 TPARTS-Toy Parts Inc. RF100191 5255 t VO f jsmith f 10507 f 2008-10-02 10:31:05.816992-04 2008-10-02 5222 99 A/P 30061 \N 70.00 TPARTS-Toy Parts Inc. RF100191 5255 t VO f jsmith f 10504 f 2008-10-02 10:31:05.816992-04 2008-10-02 5222 95 A/P 30061 \N -40.00 TPARTS-Toy Parts Inc. RF100191 5255 t VO f jsmith f 10506 f 2008-10-02 10:31:05.816992-04 2008-10-02 5222 139 A/P 30061 \N -20.00 TPARTS-Toy Parts Inc. RF100191 5255 t VO f jsmith f 10508 f 2008-10-02 10:32:29.745834-04 2008-10-02 5223 90 A/P 30062 \N -19086.60 XPPI-Packaging Pros LTD RF10001 5256 t VO f jsmith f 10511 f 2008-10-02 10:32:29.745834-04 2008-10-02 5223 99 A/P 30062 \N 28200.00 XPPI-Packaging Pros LTD RF10001 5256 t VO f jsmith f 7452 f 2006-01-09 10:19:26.941862-05 2006-01-09 3793 108 S/R 50008 -1 -266.68 Ship Shipment 2514 t SO f jsmith f 8095 f 2006-01-30 17:00:37.702398-05 2006-01-30 4086 86 W/O 50149-1 -1 -11.00 Post Run Time to Work Order 3395 t WO f jsmith f 8094 f 2006-01-30 17:00:37.702398-05 2006-01-30 4086 94 W/O 50149-1 -1 11.00 Post Run Time to Work Order 3395 t WO f jsmith f 8097 f 2006-01-30 17:00:37.702398-05 2006-01-30 4087 86 W/O 50149-1 -1 -0.88 Post Setup Time to Work Order 3396 t WO f jsmith f 8096 f 2006-01-30 17:00:37.702398-05 2006-01-30 4087 94 W/O 50149-1 -1 0.88 Post Setup Time to Work Order 3396 t WO f jsmith f 8099 f 2006-01-30 17:00:37.702398-05 2006-01-30 4088 86 W/O 50149-1 -1 -8.80 Post Run Time to Work Order 3397 t WO f jsmith f 8098 f 2006-01-30 17:00:37.702398-05 2006-01-30 4088 94 W/O 50149-1 -1 8.80 Post Run Time to Work Order 3397 t WO f jsmith f 8101 f 2006-01-30 17:02:47.212738-05 2006-01-30 4089 96 S/R 50149-1 3085 -246.18 Issue to Shipping 3400 t SO f jsmith f 8100 f 2006-01-30 17:02:47.212738-05 2006-01-30 4089 85 S/R 50149-1 3085 246.18 Issue to Shipping 3400 t SO f jsmith f 8103 f 2006-01-30 17:04:33.018017-05 2006-01-30 4090 108 S/R 50149 -1 -246.18 Ship Shipment 3401 t SO f jsmith f 8102 f 2006-01-30 17:04:33.018017-05 2006-01-30 4090 96 S/R 50149 -1 246.18 Ship Shipment 3401 t SO f jsmith f 8107 f 2006-01-30 17:04:49.79794-05 2006-01-30 4091 106 A/R 60023 \N -1097.50 3402 t IN f jsmith f 8106 f 2006-01-30 17:04:49.79794-05 2006-01-30 4091 102 A/R 60023 \N 47.50 3402 t IN f jsmith f 8105 f 2006-01-30 17:04:49.79794-05 2006-01-30 4091 105 A/R 60023 \N 100.00 3402 t IN f jsmith f 8104 f 2006-01-30 17:04:49.79794-05 2006-01-30 4091 103 A/R 60023 \N 950.00 3402 t IN f jsmith f 8109 f 2006-01-30 17:07:15.53704-05 2006-01-30 4092 109 A/R C-12311 \N -1097.50 TTOYS-Tremendous Toys Incorporated 3403 t CR t jsmith f 8108 f 2006-01-30 17:07:15.53704-05 2006-01-30 4092 106 A/R I-60023 \N 1097.50 TTOYS-Tremendous Toys Incorporated 3403 t CR f jsmith f 8111 f 2006-01-30 17:19:21.491066-05 2006-01-30 4093 90 A/P 30017 \N -13.25 RF-01221 3404 t VO f jsmith f 8112 f 2006-01-30 17:19:21.491066-05 2006-01-30 4093 99 A/P 30017 \N 25.00 RF-01221 3404 t VO f jsmith f 8110 f 2006-01-30 17:19:21.491066-05 2006-01-30 4093 95 A/P 30017 \N -11.75 RF-01221 3404 t VO f jsmith f 8114 f 2006-01-30 17:21:03.690537-05 2006-01-30 4094 109 A/P 3012 112 25.00 TPARTS-Toy Parts Inc. 3405 t CK t jsmith f 8113 f 2006-01-30 17:21:03.690537-05 2006-01-30 4094 99 A/P 3012 112 -25.00 TPARTS-Toy Parts Inc. 3405 t CK f jsmith f 8116 f 2006-01-31 13:08:38.486-05 2006-01-01 4095 91 G/L MA-001 -1 -1271.98 Special Adjustment - MDA 3406 t JE f jsmith f 8115 f 2006-01-31 13:08:38.486-05 2006-01-01 4095 85 G/L MA-001 -1 1271.98 Special Adjustment - MDA 3406 t JE f jsmith f 8118 f 2006-01-31 13:13:23.246-05 2006-01-02 4097 87 G/L MDA-SETUP1 -1 -59432.08 Demo Setup Entry - MDA 3407 t JE f jsmith f 8117 f 2006-01-31 13:13:23.246-05 2006-01-02 4097 85 G/L MDA-SETUP1 -1 59432.08 Demo Setup Entry - MDA 3407 t JE f jsmith f 8119 f 2006-01-31 13:15:16.639-05 2006-01-02 4098 86 G/L \N -6.01 Demo Setup Entry - MDA 3408 t JE f jsmith f 8120 f 2006-01-31 13:15:16.639-05 2006-01-02 4098 90 G/L \N -5921.54 Demo Setup Entry - MDA 3408 t JE f jsmith f 8121 f 2006-01-31 13:15:16.639-05 2006-01-02 4098 85 G/L \N 5927.55 Demo Setup Entry - MDA 3408 t JE f jsmith f 8122 f 2006-01-31 13:16:27.721-05 2006-01-02 4100 96 G/L DEMO-02 -1 24.64 Demo Setup Entry 3409 t JE f jsmith f 8123 f 2006-01-31 13:16:27.721-05 2006-01-02 4100 85 G/L DEMO-02 -1 -24.64 Demo Setup Entry 3409 t JE f jsmith f 8124 f 2006-01-31 13:19:16.764-05 2006-01-02 4101 104 G/L MDA-003 -1 125.00 Demo Setup - MDA 3410 t JE f jsmith f 8125 f 2006-01-31 13:19:16.764-05 2006-01-02 4101 99 G/L MDA-003 -1 -125.00 Demo Setup - MDA 3410 t JE f jsmith f 10509 f 2008-10-02 10:32:29.745834-04 2008-10-02 5223 95 A/P 30062 \N -7703.40 XPPI-Packaging Pros LTD RF10001 5256 t VO f jsmith f 10510 f 2008-10-02 10:32:29.745834-04 2008-10-02 5223 139 A/P 30062 \N -1410.00 XPPI-Packaging Pros LTD RF10001 5256 t VO f jsmith f 10514 f 2008-10-02 10:34:43.577196-04 2008-10-02 5224 99 A/P 4001 161 -68.60 TPARTS-Toy Parts Inc. 5259 t CK f jsmith f 10513 f 2008-10-02 10:34:43.577196-04 2008-10-02 5225 101 A/P 30061 \N 1.40 Discount for V 30061 5260 t DS f jsmith f 10512 f 2008-10-02 10:34:43.577196-04 2008-10-02 5225 99 A/P 30061 \N -1.40 Discount for V 30061 5260 t DS f jsmith f 10518 f 2008-10-02 10:35:25.946912-04 2008-10-02 5226 99 A/P 5010 160 -27635.99 XPPI-Packaging Pros LTD 5262 t CK f jsmith f 10517 f 2008-10-02 10:35:25.946912-04 2008-10-02 5227 101 A/P 30062 \N 564.00 Discount for V 30062 5263 t DS f jsmith f 10516 f 2008-10-02 10:35:25.946912-04 2008-10-02 5227 99 A/P 30062 \N -564.00 Discount for V 30062 5263 t DS f jsmith f 10523 f 2008-10-02 11:04:13.810864-04 2008-10-02 5229 96 S/R 50186-3 3561 -2567.80 Issue to Shipping 5266 t SO f jsmith f 10522 f 2008-10-02 11:04:13.810864-04 2008-10-02 5229 85 S/R 50186-3 3561 2567.80 Issue to Shipping 5266 t SO f jsmith f 10525 f 2008-10-02 11:04:13.810864-04 2008-10-02 5230 96 S/R 50186-1 3562 -2824.58 Issue to Shipping 5267 t SO f jsmith f 10524 f 2008-10-02 11:04:13.810864-04 2008-10-02 5230 85 S/R 50186-1 3562 2824.58 Issue to Shipping 5267 t SO f jsmith f 10527 f 2008-10-02 11:04:13.810864-04 2008-10-02 5231 96 S/R 50186-2 3563 -2567.80 Issue to Shipping 5268 t SO f jsmith f 10526 f 2008-10-02 11:04:13.810864-04 2008-10-02 5231 85 S/R 50186-2 3563 2567.80 Issue to Shipping 5268 t SO f jsmith f 10529 f 2008-10-02 11:04:35.032418-04 2008-10-02 5232 108 S/R 60037 -1 -2824.58 Ship Shipment 5269 t SH f jsmith f 10528 f 2008-10-02 11:04:35.032418-04 2008-10-02 5232 96 S/R 60037 -1 2824.58 Ship Shipment 5269 t SH f jsmith f 10531 f 2008-10-02 11:04:35.032418-04 2008-10-02 5233 108 S/R 60037 -1 -2567.80 Ship Shipment 5270 t SH f jsmith f 10530 f 2008-10-02 11:04:35.032418-04 2008-10-02 5233 96 S/R 60037 -1 2567.80 Ship Shipment 5270 t SH f jsmith f 10533 f 2008-10-02 11:04:35.032418-04 2008-10-02 5234 108 S/R 60037 -1 -2567.80 Ship Shipment 5271 t SH f jsmith f 10532 f 2008-10-02 11:04:35.032418-04 2008-10-02 5234 96 S/R 60037 -1 2567.80 Ship Shipment 5271 t SH f jsmith f 10536 f 2008-10-02 11:05:05.838595-04 2008-10-02 5235 122 A/R 60071 \N 300.00 5272 t IN f jsmith f 10537 f 2008-10-02 11:05:05.838595-04 2008-10-02 5235 106 A/R 60071 \N -46590.37 5272 t IN f jsmith f 10535 f 2008-10-02 11:05:05.838595-04 2008-10-02 5235 129 A/R 60071 \N 1899.37 5272 t IN f jsmith f 10534 f 2008-10-02 11:05:05.838595-04 2008-10-02 5235 103 A/R 60071 \N 44391.00 5272 t IN f jsmith f 10539 f 2008-10-02 11:07:07.084035-04 2008-10-02 5236 106 A/R 60072 \N -44000.14 5273 t IN f jsmith f 10538 f 2008-10-02 11:07:07.084035-04 2008-10-02 5236 103 A/R 60072 \N 44000.14 5273 t IN f jsmith f 10541 f 2008-10-02 11:07:45.349413-04 2008-10-02 5237 106 A/R I-60071 \N 46590.37 TTOYS-Tremendous Toys Incorporated 5274 t CR f jsmith f 10543 f 2008-10-02 11:08:16.289661-04 2008-10-02 5238 106 A/R I-60072 \N 44000.14 XTRM-Xtreme Toys LTD 5275 t CR f jsmith f 10657 f 2008-12-31 16:11:25.450118-05 2008-11-01 5295 111 A/P 30066 \N -50000.00 WCHEM-World Chem, Inc. Purchase Paint Machine 5345 t VO f jsmith f 10658 f 2008-12-31 16:11:25.450118-05 2008-11-01 5295 99 A/P 30066 \N 50000.00 WCHEM-World Chem, Inc. Purchase Paint Machine 5345 t VO f jsmith f 10566 f 2008-12-31 14:12:39.353591-05 2008-12-31 5250 101 A/P 30064 \N 1.82 Discount for V 30064 5293 t DS f jsmith f 10565 f 2008-12-31 14:12:39.353591-05 2008-12-31 5250 99 A/P 30064 \N -1.82 Discount for V 30064 5293 t DS f jsmith f 10571 f 2008-12-31 14:12:43.10223-05 2008-12-31 5251 99 A/P 4003 162 -24.50 TPARTS-Toy Parts Inc. 5295 t CK f jsmith f 10570 f 2008-12-31 14:12:43.10223-05 2008-12-31 5252 101 A/P 30063 \N 0.50 Discount for V 30063 5296 t DS f jsmith f 10569 f 2008-12-31 14:12:43.10223-05 2008-12-31 5252 99 A/P 30063 \N -0.50 Discount for V 30063 5296 t DS f jsmith f 10574 f 2008-12-31 14:13:35.261849-05 2008-12-31 5253 86 W/O 10060-1 3568 -27.50 Material TINSERT1 Issue to Work Order 5298 t WO f jsmith f 10573 f 2008-12-31 14:13:35.261849-05 2008-12-31 5253 138 W/O 10060-1 3568 27.50 Material TINSERT1 Issue to Work Order 5298 t WO f jsmith f 10576 f 2008-12-31 14:13:35.261849-05 2008-12-31 5254 86 W/O 10060-1 3569 -20.00 Material TBOX1 Issue to Work Order 5299 t WO f jsmith f 10575 f 2008-12-31 14:13:35.261849-05 2008-12-31 5254 138 W/O 10060-1 3569 20.00 Material TBOX1 Issue to Work Order 5299 t WO f jsmith f 10578 f 2008-12-31 14:13:35.261849-05 2008-12-31 5255 86 W/O 10060-1 -1 -1.10 \N 5300 t WO f jsmith f 10577 f 2008-12-31 14:13:35.261849-05 2008-12-31 5255 94 W/O 10060-1 -1 1.10 \N 5300 t WO f jsmith f 10580 f 2008-12-31 14:13:35.261849-05 2008-12-31 5256 86 W/O 10060-1 -1 -11.00 \N 5301 t WO f jsmith f 10579 f 2008-12-31 14:13:35.261849-05 2008-12-31 5256 94 W/O 10060-1 -1 11.00 \N 5301 t WO f jsmith f 10581 f 2008-12-31 14:13:35.261849-05 2008-12-31 5257 86 W/O 10060-1 3570 82.10 Receive Inventory TKIT1 from Manufacturing 5302 t WO f jsmith f 10582 f 2008-12-31 14:13:35.261849-05 2008-12-31 5257 138 W/O 10060-1 3570 -82.10 Receive Inventory TKIT1 from Manufacturing 5302 t WO f jsmith f 10583 f 2008-12-31 14:13:38.654946-05 2008-12-31 5258 86 W/O 10060-1 -1 -22.50 Manufacturing Inventory Cost Variance for TKIT1 5303 t WO f jsmith f 10584 f 2008-12-31 14:13:38.654946-05 2008-12-31 5258 87 W/O 10060-1 -1 22.50 Manufacturing Inventory Cost Variance for TKIT1 5303 t WO f jsmith f 10586 f 2008-12-31 14:13:47.92547-05 2008-12-31 5259 86 W/O 50189-1 3571 -0.80 Material YPAINT1 Issue to Work Order 5305 t WO f jsmith f 10585 f 2008-12-31 14:13:47.92547-05 2008-12-31 5259 138 W/O 50189-1 3571 0.80 Material YPAINT1 Issue to Work Order 5305 t WO f jsmith f 10588 f 2008-12-31 14:13:47.92547-05 2008-12-31 5260 86 W/O 50189-1 3572 -40.00 Material TWHEEL1 Issue to Work Order 5306 t WO f jsmith f 10587 f 2008-12-31 14:13:47.92547-05 2008-12-31 5260 138 W/O 50189-1 3572 40.00 Material TWHEEL1 Issue to Work Order 5306 t WO f jsmith f 10590 f 2008-12-31 14:13:47.92547-05 2008-12-31 5261 86 W/O 50189-1 3573 -100.00 Material TBODY1 Issue to Work Order 5307 t WO f jsmith f 10589 f 2008-12-31 14:13:47.92547-05 2008-12-31 5261 138 W/O 50189-1 3573 100.00 Material TBODY1 Issue to Work Order 5307 t WO f jsmith f 10592 f 2008-12-31 14:13:47.92547-05 2008-12-31 5262 86 W/O 50189-1 3574 -82.10 Material TKIT1 Issue to Work Order 5308 t WO f jsmith f 10591 f 2008-12-31 14:13:47.92547-05 2008-12-31 5262 138 W/O 50189-1 3574 82.10 Material TKIT1 Issue to Work Order 5308 t WO f jsmith f 10594 f 2008-12-31 14:13:47.92547-05 2008-12-31 5263 86 W/O 50189-1 -1 -1.10 \N 5309 t WO f jsmith f 10593 f 2008-12-31 14:13:47.92547-05 2008-12-31 5263 94 W/O 50189-1 -1 1.10 \N 5309 t WO f jsmith f 10596 f 2008-12-31 14:13:47.92547-05 2008-12-31 5264 86 W/O 50189-1 -1 -22.00 \N 5310 t WO f jsmith f 10595 f 2008-12-31 14:13:47.92547-05 2008-12-31 5264 94 W/O 50189-1 -1 22.00 \N 5310 t WO f jsmith f 10598 f 2008-12-31 14:13:47.92547-05 2008-12-31 5265 86 W/O 50189-1 -1 -2.20 \N 5311 t WO f jsmith f 7963 f 2006-01-13 15:28:13.719-05 2006-01-13 4023 99 A/P 3010 110 -24.50 TPARTS-Toy Parts Inc. 3322 t CK f jsmith f 8044 f 2006-01-30 12:16:46.435991-05 2006-01-30 4062 86 W/O 50148-1 -1 -0.88 Post Setup Time to Work Order 3365 t WO f jsmith f 8043 f 2006-01-30 12:16:46.435991-05 2006-01-30 4062 94 W/O 50148-1 -1 0.88 Post Setup Time to Work Order 3365 t WO f jsmith f 8046 f 2006-01-30 12:16:46.435991-05 2006-01-30 4063 86 W/O 50148-1 -1 -8.80 Post Run Time to Work Order 3366 t WO f jsmith f 8045 f 2006-01-30 12:16:46.435991-05 2006-01-30 4063 94 W/O 50148-1 -1 8.80 Post Run Time to Work Order 3366 t WO f jsmith f 8047 f 2006-01-30 12:19:28.277472-05 2006-01-30 4064 95 S/R 20018 3074 47.00 Receive Inventory from P/O 3369 t PO f jsmith f 8048 f 2006-01-30 12:19:28.277472-05 2006-01-30 4064 85 S/R 20018 3074 -47.00 Receive Inventory from P/O 3369 t PO f jsmith f 8050 f 2006-01-30 12:21:12.398617-05 2006-01-30 4065 90 A/P 30016 \N 22.00 RF-901221 3371 t VO f jsmith f 8051 f 2006-01-30 12:21:12.398617-05 2006-01-30 4065 99 A/P 30016 \N 25.00 RF-901221 3371 t VO f jsmith f 10597 f 2008-12-31 14:13:47.92547-05 2008-12-31 5265 94 W/O 50189-1 -1 2.20 \N 5311 t WO f jsmith f 8562 f 2007-01-08 16:35:03.105-05 2007-01-08 4294 106 A/R 60032 \N -618.28 3634 t IN f jsmith f 10600 f 2008-12-31 14:13:47.92547-05 2008-12-31 5266 86 W/O 50189-1 -1 -5.50 \N 5312 t WO f jsmith f 10599 f 2008-12-31 14:13:47.92547-05 2008-12-31 5266 94 W/O 50189-1 -1 5.50 \N 5312 t WO f jsmith f 10602 f 2008-12-31 14:13:47.92547-05 2008-12-31 5267 86 W/O 50189-1 -1 -0.44 \N 5313 t WO f jsmith f 10601 f 2008-12-31 14:13:47.92547-05 2008-12-31 5267 94 W/O 50189-1 -1 0.44 \N 5313 t WO f jsmith f 10604 f 2008-12-31 14:13:47.92547-05 2008-12-31 5268 86 W/O 50189-1 -1 -2.20 \N 5314 t WO f jsmith f 10603 f 2008-12-31 14:13:47.92547-05 2008-12-31 5268 94 W/O 50189-1 -1 2.20 \N 5314 t WO f jsmith f 10605 f 2008-12-31 14:13:47.92547-05 2008-12-31 5269 86 W/O 50189-1 3575 256.34 Receive Inventory YTRUCK1 from Manufacturing 5315 t WO f jsmith f 10606 f 2008-12-31 14:13:47.92547-05 2008-12-31 5269 85 W/O 50189-1 3575 -256.34 Receive Inventory YTRUCK1 from Manufacturing 5315 t WO f jsmith f 10608 f 2008-12-31 14:14:17.697236-05 2008-12-31 5270 96 S/R 50189-1 3576 -256.34 Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD 5318 t SO f jsmith f 10607 f 2008-12-31 14:14:17.697236-05 2008-12-31 5270 85 S/R 50189-1 3576 256.34 Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD 5318 t SO f jsmith f 10610 f 2008-12-31 14:14:39.685698-05 2008-12-31 5271 108 S/R 60038 -1 -256.34 Ship Shipment to Customer Xtreme Toys LTD 5319 t SH f jsmith f 10609 f 2008-12-31 14:14:39.685698-05 2008-12-31 5271 96 S/R 60038 -1 256.34 Ship Shipment to Customer Xtreme Toys LTD 5319 t SH f jsmith f 10612 f 2008-12-31 14:14:56.786839-05 2008-12-31 5272 122 A/R 60073 \N 144.00 Xtreme Toys LTD 5320 t IN f jsmith f 10613 f 2008-12-31 14:14:56.786839-05 2008-12-31 5272 106 A/R 60073 \N -921.27 Xtreme Toys LTD 5320 t IN f jsmith f 10611 f 2008-12-31 14:14:56.786839-05 2008-12-31 5272 103 A/R 60073 \N 777.27 Xtreme Toys LTD 5320 t IN f jsmith f 10614 f 2008-12-31 14:57:46.561632-05 2008-12-31 5273 106 A/R I-60073 \N 921.27 XTRM-Xtreme Toys LTD 5321 t CR f jsmith f 10616 f 2008-12-31 14:59:40.514158-05 2008-12-31 5274 95 S/R 20062 3577 41491.00 Receive Inventory from P/O for Toy Parts Inc. 5322 t PO f jsmith f 10617 f 2008-12-31 14:59:40.514158-05 2008-12-31 5274 85 S/R 20062 3577 -41491.00 Receive Inventory from P/O for Toy Parts Inc. 5322 t PO f jsmith f 10619 f 2008-12-31 15:00:40.220306-05 2008-12-31 5275 90 A/P 30065 \N -8509.00 TPARTS-Toy Parts Inc. RF0101 5324 t VO f jsmith f 10620 f 2008-12-31 15:00:40.220306-05 2008-12-31 5275 99 A/P 30065 \N 50000.00 TPARTS-Toy Parts Inc. RF0101 5324 t VO f jsmith f 10618 f 2008-12-31 15:00:40.220306-05 2008-12-31 5275 95 A/P 30065 \N -41491.00 TPARTS-Toy Parts Inc. RF0101 5324 t VO f jsmith f 10623 f 2008-12-31 15:02:09.298362-05 2008-12-31 5276 99 A/P 4004 164 -49000.00 TPARTS-Toy Parts Inc. 5326 t CK f jsmith f 10622 f 2008-12-31 15:02:09.298362-05 2008-12-31 5277 101 A/P 30065 \N 1000.00 Discount for V 30065 5327 t DS f jsmith f 10621 f 2008-12-31 15:02:09.298362-05 2008-12-31 5277 99 A/P 30065 \N -1000.00 Discount for V 30065 5327 t DS f jsmith f 10626 f 2008-12-31 15:27:17.498292-05 2008-12-31 5278 96 S/R 50190-1 3578 -41905.91 Issue STOCKCAR1 to Shipping for customer Xtreme Toys LTD 5329 t SO f jsmith f 10625 f 2008-12-31 15:27:17.498292-05 2008-12-31 5278 85 S/R 50190-1 3578 41905.91 Issue STOCKCAR1 to Shipping for customer Xtreme Toys LTD 5329 t SO f jsmith f 10628 f 2008-12-31 15:27:25.597607-05 2008-12-31 5279 108 S/R 60039 -1 -41905.91 Ship Shipment to Customer Xtreme Toys LTD 5330 t SH f jsmith f 10627 f 2008-12-31 15:27:25.597607-05 2008-12-31 5279 96 S/R 60039 -1 41905.91 Ship Shipment to Customer Xtreme Toys LTD 5330 t SH f jsmith f 10630 f 2008-12-31 15:30:22.664203-05 2008-12-31 5280 106 A/R 60074 \N -213614.91 Xtreme Toys LTD 5331 t IN f jsmith f 10629 f 2008-12-31 15:30:22.664203-05 2008-12-31 5280 103 A/R 60074 \N 213614.91 Xtreme Toys LTD 5331 t IN f jsmith f 10631 f 2008-12-31 15:31:31.197979-05 2008-12-31 5281 127 A/R C- \N -213614.91 XTRM-Xtreme Toys LTD 5332 t CR t jsmith f 10646 f 2008-12-31 15:56:42.551961-05 2008-12-31 5290 129 G/L 4005 165 -3881.18 NC TAX-North Carolina IRS 5340 t CK f jsmith f 10648 f 2008-12-31 15:56:51.176365-05 2008-12-31 5291 102 G/L 4006 166 -8796.60 VA TAX-Virginia Sales Tax 5341 t CK f jsmith f 10659 f 2008-12-31 16:12:12.036109-05 2008-12-31 5296 99 A/P 4007 167 -50000.00 WCHEM-World Chem, Inc. 5347 t CK f jsmith f 11861 f 2009-12-03 15:07:17.053122-05 2009-12-03 5861 106 A/R 60088 \N -2025.00 Tremendous Toys Incorporated 6036 t IN f admin f 11862 f 2009-12-03 15:07:17.053122-05 2009-12-03 5861 140 A/R 60088 \N 2025.00 Tremendous Toys Incorporated 6036 t IN f admin f 11863 f 2009-12-03 15:10:00.861344-05 2009-12-03 5862 106 A/R I-60088 \N 2025.00 TTOYS-Tremendous Toys Incorporated 6037 t CR f admin f 11865 f 2009-12-03 15:22:55.296337-05 2009-12-03 5863 95 S/R 20079 3959 2000.00 Receive Inventory from P/O for Toy Parts Inc. 6038 t PO f admin f 11866 f 2009-12-03 15:22:55.296337-05 2009-12-03 5863 138 S/R 20079 3959 -2000.00 Receive Inventory from P/O for Toy Parts Inc. 6038 t PO f admin f 11867 f 2009-12-03 15:22:55.488707-05 2009-12-03 5864 95 S/R 20079 3960 2500.00 Receive Inventory from P/O for Toy Parts Inc. 6040 t PO f admin f 11868 f 2009-12-03 15:22:55.488707-05 2009-12-03 5864 138 S/R 20079 3960 -2500.00 Receive Inventory from P/O for Toy Parts Inc. 6040 t PO f admin f 11869 f 2009-12-03 15:22:55.66131-05 2009-12-03 5865 95 S/R 20079 3961 2.50 Receive Inventory from P/O for Toy Parts Inc. 6042 t PO f admin f 11870 f 2009-12-03 15:22:55.66131-05 2009-12-03 5865 138 S/R 20079 3961 -2.50 Receive Inventory from P/O for Toy Parts Inc. 6042 t PO f admin f 11876 f 2009-12-03 15:28:54.250883-05 2009-12-03 5867 99 A/P 30087 \N 4727.63 TPARTS-Toy Parts Inc. RF103991 6045 t VO f admin f 11875 f 2009-12-03 15:28:54.250883-05 2009-12-03 5867 102 A/P 30087 \N -225.13 TPARTS-Toy Parts Inc. RF103991 6045 t VO f admin f 11877 f 2009-12-03 15:28:54.250883-05 2009-12-03 5867 95 A/P 30087 \N -4502.50 TPARTS-Toy Parts Inc. RF103991 6045 t VO f admin f 11888 f 2009-12-03 16:32:53.955955-05 2009-12-03 5870 95 S/R 20080 3962 8000.00 Receive Inventory from P/O for Toy Parts Inc. 6048 t PO f admin f 11889 f 2009-12-03 16:32:53.955955-05 2009-12-03 5870 138 S/R 20080 3962 -8000.00 Receive Inventory from P/O for Toy Parts Inc. 6048 t PO f admin f 11890 f 2009-12-03 16:32:54.191451-05 2009-12-03 5871 95 S/R 20080 3963 1800.00 Receive Inventory from P/O for Toy Parts Inc. 6050 t PO f admin f 11891 f 2009-12-03 16:32:54.191451-05 2009-12-03 5871 138 S/R 20080 3963 -1800.00 Receive Inventory from P/O for Toy Parts Inc. 6050 t PO f admin f 11892 f 2009-12-03 16:32:54.369614-05 2009-12-03 5872 95 S/R 20080 3964 200.00 Receive Inventory from P/O for Toy Parts Inc. 6052 t PO f admin f 11893 f 2009-12-03 16:32:54.369614-05 2009-12-03 5872 138 S/R 20080 3964 -200.00 Receive Inventory from P/O for Toy Parts Inc. 6052 t PO f admin f 11896 f 2009-12-03 16:36:55.554566-05 2009-12-03 5873 99 A/P 30088 \N 10392.00 TPARTS-Toy Parts Inc. RF19823 6054 t VO f admin f 11894 f 2009-12-03 16:36:55.554566-05 2009-12-03 5873 95 A/P 30088 \N -10000.00 TPARTS-Toy Parts Inc. RF19823 6054 t VO f admin f 11895 f 2009-12-03 16:36:55.554566-05 2009-12-03 5873 155 A/P 30088 \N -392.00 TPARTS-Toy Parts Inc. RF19823 6054 t VO f admin f 11898 f 2009-12-03 16:38:19.24024-05 2009-12-03 5874 86 W/O 10071-1 3965 -2000.00 Material TBOX1 Issue to Work Order 6055 t WO f admin f 11897 f 2009-12-03 16:38:19.24024-05 2009-12-03 5874 138 W/O 10071-1 3965 2000.00 Material TBOX1 Issue to Work Order 6055 t WO f admin f 11900 f 2009-12-03 16:38:19.24024-05 2009-12-03 5875 86 W/O 10071-1 3966 -2750.00 Material TINSERT1 Issue to Work Order 6056 t WO f admin f 11899 f 2009-12-03 16:38:19.24024-05 2009-12-03 5875 138 W/O 10071-1 3966 2750.00 Material TINSERT1 Issue to Work Order 6056 t WO f admin f 11901 f 2009-12-03 16:38:19.24024-05 2009-12-03 5876 86 W/O 10071-1 3967 8210.00 Receive Inventory TSUB1 from Manufacturing 6057 t WO f admin f 11902 f 2009-12-03 16:38:19.24024-05 2009-12-03 5876 138 W/O 10071-1 3967 -8210.00 Receive Inventory TSUB1 from Manufacturing 6057 t WO f admin f 7951 f 2006-01-13 13:42:37.257-05 2006-01-13 4017 106 A/R 60020 \N -103.86 3315 t IN f jsmith f 11904 f 2009-12-03 16:38:19.24024-05 2009-12-03 5877 86 W/O 10071-1 -1 -1.10 \N 6058 t WO f admin f 11903 f 2009-12-03 16:38:19.24024-05 2009-12-03 5877 94 W/O 10071-1 -1 1.10 \N 6058 t WO f admin f 11906 f 2009-12-03 16:38:19.24024-05 2009-12-03 5878 86 W/O 10071-1 -1 -1100.00 \N 6059 t WO f admin f 11905 f 2009-12-03 16:38:19.24024-05 2009-12-03 5878 94 W/O 10071-1 -1 1100.00 \N 6059 t WO f admin f 11908 f 2009-12-03 16:38:32.769241-05 2009-12-03 5879 86 W/O 50200-1 3968 -8210.00 Material TSUB1 Issue to Work Order 6060 t WO f admin f 11907 f 2009-12-03 16:38:32.769241-05 2009-12-03 5879 138 W/O 50200-1 3968 8210.00 Material TSUB1 Issue to Work Order 6060 t WO f admin f 11910 f 2009-12-03 16:38:32.769241-05 2009-12-03 5880 86 W/O 50200-1 3969 -80.00 Material YPAINT1 Issue to Work Order 6061 t WO f admin f 11909 f 2009-12-03 16:38:32.769241-05 2009-12-03 5880 138 W/O 50200-1 3969 80.00 Material YPAINT1 Issue to Work Order 6061 t WO f admin f 11912 f 2009-12-03 16:38:32.769241-05 2009-12-03 5881 86 W/O 50200-1 3970 -10000.00 Material TBODY1 Issue to Work Order 6062 t WO f admin f 11911 f 2009-12-03 16:38:32.769241-05 2009-12-03 5881 138 W/O 50200-1 3970 10000.00 Material TBODY1 Issue to Work Order 6062 t WO f admin f 11914 f 2009-12-03 16:38:32.769241-05 2009-12-03 5882 86 W/O 50200-1 3971 -4000.00 Material TWHEEL1 Issue to Work Order 6063 t WO f admin f 11913 f 2009-12-03 16:38:32.769241-05 2009-12-03 5882 138 W/O 50200-1 3971 4000.00 Material TWHEEL1 Issue to Work Order 6063 t WO f admin f 11915 f 2009-12-03 16:38:32.769241-05 2009-12-03 5883 86 W/O 50200-1 3972 25634.00 Receive Inventory YTRUCK1 from Manufacturing 6064 t WO f admin f 11916 f 2009-12-03 16:38:32.769241-05 2009-12-03 5883 85 W/O 50200-1 3972 -25634.00 Receive Inventory YTRUCK1 from Manufacturing 6064 t WO f admin f 11918 f 2009-12-03 16:38:32.769241-05 2009-12-03 5884 86 W/O 50200-1 -1 -1.10 \N 6065 t WO f admin f 11917 f 2009-12-03 16:38:32.769241-05 2009-12-03 5884 94 W/O 50200-1 -1 1.10 \N 6065 t WO f admin f 11920 f 2009-12-03 16:38:32.769241-05 2009-12-03 5885 86 W/O 50200-1 -1 -2200.00 \N 6066 t WO f admin f 11919 f 2009-12-03 16:38:32.769241-05 2009-12-03 5885 94 W/O 50200-1 -1 2200.00 \N 6066 t WO f admin f 11922 f 2009-12-03 16:38:32.769241-05 2009-12-03 5886 86 W/O 50200-1 -1 -2.20 \N 6067 t WO f admin f 11921 f 2009-12-03 16:38:32.769241-05 2009-12-03 5886 94 W/O 50200-1 -1 2.20 \N 6067 t WO f admin f 11923 f 2009-12-03 16:38:32.769241-05 2009-12-03 5887 94 W/O 50200-1 -1 550.00 \N 6068 t WO f admin f 11926 f 2009-12-03 16:38:32.769241-05 2009-12-03 5888 86 W/O 50200-1 -1 -0.44 \N 6069 t WO f admin f 11925 f 2009-12-03 16:38:32.769241-05 2009-12-03 5888 94 W/O 50200-1 -1 0.44 \N 6069 t WO f admin f 11928 f 2009-12-03 16:38:32.769241-05 2009-12-03 5889 86 W/O 50200-1 -1 -220.00 \N 6070 t WO f admin f 11927 f 2009-12-03 16:38:32.769241-05 2009-12-03 5889 94 W/O 50200-1 -1 220.00 \N 6070 t WO f admin f 11930 f 2009-12-03 16:39:30.18973-05 2009-12-03 5890 93 W/O 10071-1 -1 -25.00 Scrap TINSERT1 from Work Order 6071 t WO f admin f 11929 f 2009-12-03 16:39:30.18973-05 2009-12-03 5890 86 W/O 10071-1 -1 25.00 Scrap TINSERT1 from Work Order 6071 t WO f admin f 11931 f 2009-12-03 16:40:59.751498-05 2009-12-03 5891 86 W/O 10071-1 -1 -2383.90 Manufacturing Inventory Cost Variance for TSUB1 6072 t WO f admin f 11932 f 2009-12-03 16:40:59.751498-05 2009-12-03 5891 87 W/O 10071-1 -1 2383.90 Manufacturing Inventory Cost Variance for TSUB1 6072 t WO f admin f 11933 f 2009-12-03 16:41:12.589341-05 2009-12-03 5892 86 W/O 50200-1 -1 -370.26 Manufacturing Inventory Cost Variance for YTRUCK1 6074 t WO f admin f 11934 f 2009-12-03 16:41:12.589341-05 2009-12-03 5892 87 W/O 50200-1 -1 370.26 Manufacturing Inventory Cost Variance for YTRUCK1 6074 t WO f admin f 11939 f 2009-12-03 16:46:39.021809-05 2009-12-03 5893 99 A/P 4051 195 -15541.58 TPARTS-Toy Parts Inc. 6077 t CK f admin f 11936 f 2009-12-03 16:46:39.021809-05 2009-12-03 5894 101 A/P 30087 \N 90.05 Discount for V 30087 6078 t DS f admin f 11935 f 2009-12-03 16:46:39.021809-05 2009-12-03 5894 99 A/P 30087 \N -90.05 Discount for V 30087 6078 t DS f admin f 11938 f 2009-12-03 16:46:39.021809-05 2009-12-03 5895 101 A/P 30088 \N 200.00 Discount for V 30088 6080 t DS f admin f 11937 f 2009-12-03 16:46:39.021809-05 2009-12-03 5895 99 A/P 30088 \N -200.00 Discount for V 30088 6080 t DS f admin f 11942 f 2009-12-03 17:04:49.973715-05 2009-12-03 5896 96 S/R 50200-1 3973 -25634.00 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6082 t SO f admin f 11941 f 2009-12-03 17:04:49.973715-05 2009-12-03 5896 85 S/R 50200-1 3973 25634.00 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6082 t SO f admin f 11944 f 2009-12-03 17:05:15.790137-05 2009-12-03 5897 108 S/R 60062 -1 -25634.00 Ship Shipment to Customer Tremendous Toys Incorporated 6083 t SH f admin f 11943 f 2009-12-03 17:05:15.790137-05 2009-12-03 5897 96 S/R 60062 -1 25634.00 Ship Shipment to Customer Tremendous Toys Incorporated 6083 t SH f admin f 11945 f 2009-12-03 17:06:07.31686-05 2009-12-03 5898 122 A/R 60089 \N 18750.00 Tremendous Toys Incorporated 6084 t IN f admin f 11947 f 2009-12-03 17:06:07.31686-05 2009-12-03 5898 106 A/R 60089 \N -115875.00 Tremendous Toys Incorporated 6084 t IN f admin f 11946 f 2009-12-03 17:06:07.31686-05 2009-12-03 5898 102 A/R 60089 \N 4625.00 Tremendous Toys Incorporated 6084 t IN f admin f 11948 f 2009-12-03 17:06:07.31686-05 2009-12-03 5898 103 A/R 60089 \N 92500.00 Tremendous Toys Incorporated 6084 t IN f admin f 11949 f 2009-12-03 17:07:42.188568-05 2009-12-03 5899 106 A/R I-60089 \N 115875.00 TTOYS-Tremendous Toys Incorporated 6085 t CR f admin f 11952 f 2009-12-04 13:56:03.986896-05 2009-12-04 5900 92 I/M Rain Damage 3974 -24.63 Material Scrap for item TSUB1\nRain Damage 6086 t SI f admin f 11951 f 2009-12-04 13:56:03.986896-05 2009-12-04 5900 138 I/M Rain Damage 3974 24.63 Material Scrap for item TSUB1\nRain Damage 6086 t SI f admin f 11647 f 2009-10-13 13:29:46.360576-04 2009-10-13 5760 95 S/R 20076 3891 1180.00 Receive Inventory from P/O for Packaging Pros LTD 5914 t PO f jsmith f 11648 f 2009-10-13 13:29:46.360576-04 2009-10-13 5760 138 S/R 20076 3891 -1180.00 Receive Inventory from P/O for Packaging Pros LTD 5914 t PO f jsmith f 11649 f 2009-10-13 13:30:05.859373-04 2009-10-13 5761 95 S/R 20077 3892 5000.00 Receive Inventory from P/O for Toy Parts Inc. 5917 t PO f jsmith f 11650 f 2009-10-13 13:30:05.859373-04 2009-10-13 5761 138 S/R 20077 3892 -5000.00 Receive Inventory from P/O for Toy Parts Inc. 5917 t PO f jsmith f 11652 f 2009-10-13 13:32:31.987268-04 2009-10-13 5762 99 A/P 30083 \N 900.00 ICHROME-International Chrome Technologies 5919 t VO f jsmith f 11653 f 2009-10-13 13:32:31.987268-04 2009-10-13 5762 95 A/P 30083 \N -870.00 ICHROME-International Chrome Technologies 5919 t VO f jsmith f 11651 f 2009-10-13 13:32:31.987268-04 2009-10-13 5762 139 A/P 30083 \N -30.00 ICHROME-International Chrome Technologies 5919 t VO f jsmith f 11655 f 2009-10-13 13:32:32.732005-04 2009-10-13 5763 90 A/P 30084 \N -590.12 XPPI-Packaging Pros LTD 5919 t VO f jsmith f 11657 f 2009-10-13 13:32:32.732005-04 2009-10-13 5763 99 A/P 30084 \N 1910.12 XPPI-Packaging Pros LTD 5919 t VO f jsmith f 11654 f 2009-10-13 13:32:32.732005-04 2009-10-13 5763 95 A/P 30084 \N -1180.00 XPPI-Packaging Pros LTD 5919 t VO f jsmith f 11656 f 2009-10-13 13:32:32.732005-04 2009-10-13 5763 139 A/P 30084 \N -140.00 XPPI-Packaging Pros LTD 5919 t VO f jsmith f 11658 f 2009-10-13 13:32:32.949445-04 2009-10-13 5764 99 A/P 30085 \N 5500.00 TPARTS-Toy Parts Inc. 5919 t VO f jsmith f 11660 f 2009-10-13 13:32:32.949445-04 2009-10-13 5764 95 A/P 30085 \N -5000.00 TPARTS-Toy Parts Inc. 5919 t VO f jsmith f 11659 f 2009-10-13 13:32:32.949445-04 2009-10-13 5764 139 A/P 30085 \N -500.00 TPARTS-Toy Parts Inc. 5919 t VO f jsmith f 11663 f 2009-10-13 13:34:22.938533-04 2009-10-13 5765 126 A/P 5014 194 1871.91 XPPI-Packaging Pros LTD 5923 t CK f jsmith f 11664 f 2009-10-13 13:34:22.938533-04 2009-10-13 5765 99 A/P 5014 194 -1871.91 XPPI-Packaging Pros LTD 5923 t CK f jsmith f 7893 f 2006-01-13 11:51:00.636398-05 2006-01-13 3990 86 W/O 50043-1 3046 -100.00 Material Issue to Work Order 3286 t WO f jsmith f 11662 f 2009-10-13 13:34:22.938533-04 2009-10-13 5766 101 A/P 30084 \N 38.21 Discount for V 30084 5924 t DS f jsmith f 11661 f 2009-10-13 13:34:22.938533-04 2009-10-13 5766 99 A/P 30084 \N -38.21 Discount for V 30084 5924 t DS f jsmith f 11668 f 2009-10-13 13:34:32.185743-04 2009-10-13 5767 99 A/P 4049 193 -882.00 ICHROME-International Chrome Technologies 5926 t CK f jsmith f 11666 f 2009-10-13 13:34:32.185743-04 2009-10-13 5768 101 A/P 30083 \N 18.00 Discount for V 30083 5927 t DS f jsmith f 11665 f 2009-10-13 13:34:32.185743-04 2009-10-13 5768 99 A/P 30083 \N -18.00 Discount for V 30083 5927 t DS f jsmith f 11672 f 2009-10-13 13:34:35.280612-04 2009-10-13 5769 99 A/P 4050 192 -5390.00 TPARTS-Toy Parts Inc. 5929 t CK f jsmith f 11670 f 2009-10-13 13:34:35.280612-04 2009-10-13 5770 101 A/P 30085 \N 110.00 Discount for V 30085 5930 t DS f jsmith f 11669 f 2009-10-13 13:34:35.280612-04 2009-10-13 5770 99 A/P 30085 \N -110.00 Discount for V 30085 5930 t DS f jsmith f 11674 f 2009-10-13 13:36:44.045243-04 2009-10-13 5771 86 W/O 10067-2 3893 -870.00 Material RBUMP1 Issue to Work Order 5932 t WO f jsmith f 11673 f 2009-10-13 13:36:44.045243-04 2009-10-13 5771 138 W/O 10067-2 3893 870.00 Material RBUMP1 Issue to Work Order 5932 t WO f jsmith f 11676 f 2009-10-13 13:36:44.045243-04 2009-10-13 5772 86 W/O 10067-2 -1 -127.60 \N 5933 t WO f jsmith f 11675 f 2009-10-13 13:36:44.045243-04 2009-10-13 5772 94 W/O 10067-2 -1 127.60 \N 5933 t WO f jsmith f 11678 f 2009-10-13 13:36:44.045243-04 2009-10-13 5773 86 W/O 10067-2 -1 -159.50 \N 5934 t WO f jsmith f 11679 f 2009-10-13 13:36:44.045243-04 2009-10-13 5774 86 W/O 10067-2 3894 2027.10 Receive Inventory CBUMP from Manufacturing 5935 t WO f jsmith f 11680 f 2009-10-13 13:36:44.045243-04 2009-10-13 5774 138 W/O 10067-2 3894 -2027.10 Receive Inventory CBUMP from Manufacturing 5935 t WO f jsmith f 11682 f 2009-10-13 13:37:01.52835-04 2009-10-13 5775 86 W/O 10068-1 3895 -180.00 Material TBOX1 Issue to Work Order 5938 t WO f jsmith f 11681 f 2009-10-13 13:37:01.52835-04 2009-10-13 5775 138 W/O 10068-1 3895 180.00 Material TBOX1 Issue to Work Order 5938 t WO f jsmith f 11684 f 2009-10-13 13:37:01.52835-04 2009-10-13 5776 86 W/O 10068-1 3896 -247.50 Material TINSERT1 Issue to Work Order 5939 t WO f jsmith f 11683 f 2009-10-13 13:37:01.52835-04 2009-10-13 5776 138 W/O 10068-1 3896 247.50 Material TINSERT1 Issue to Work Order 5939 t WO f jsmith f 11686 f 2009-10-13 13:37:01.52835-04 2009-10-13 5777 86 W/O 10068-1 -1 -1.10 \N 5940 t WO f jsmith f 11685 f 2009-10-13 13:37:01.52835-04 2009-10-13 5777 94 W/O 10068-1 -1 1.10 \N 5940 t WO f jsmith f 11688 f 2009-10-13 13:37:01.52835-04 2009-10-13 5778 86 W/O 10068-1 -1 -99.00 \N 5941 t WO f jsmith f 11687 f 2009-10-13 13:37:01.52835-04 2009-10-13 5778 94 W/O 10068-1 -1 99.00 \N 5941 t WO f jsmith f 11689 f 2009-10-13 13:37:01.52835-04 2009-10-13 5779 86 W/O 10068-1 3897 738.90 Receive Inventory TSUB1 from Manufacturing 5942 t WO f jsmith f 11690 f 2009-10-13 13:37:01.52835-04 2009-10-13 5779 138 W/O 10068-1 3897 -738.90 Receive Inventory TSUB1 from Manufacturing 5942 t WO f jsmith f 11691 f 2009-10-13 13:37:06.105587-04 2009-10-13 5780 86 W/O 10068-1 -1 -211.30 Manufacturing Inventory Cost Variance for TSUB1 5943 t WO f jsmith f 11692 f 2009-10-13 13:37:06.105587-04 2009-10-13 5780 87 W/O 10068-1 -1 211.30 Manufacturing Inventory Cost Variance for TSUB1 5943 t WO f jsmith f 11694 f 2009-10-13 13:37:14.252675-04 2009-10-13 5781 86 W/O 10069-1 3898 -1000.00 Material TBOX1 Issue to Work Order 5945 t WO f jsmith f 11693 f 2009-10-13 13:37:14.252675-04 2009-10-13 5781 138 W/O 10069-1 3898 1000.00 Material TBOX1 Issue to Work Order 5945 t WO f jsmith f 11696 f 2009-10-13 13:37:14.252675-04 2009-10-13 5782 86 W/O 10069-1 3899 -1375.00 Material TINSERT1 Issue to Work Order 5946 t WO f jsmith f 11695 f 2009-10-13 13:37:14.252675-04 2009-10-13 5782 138 W/O 10069-1 3899 1375.00 Material TINSERT1 Issue to Work Order 5946 t WO f jsmith f 11698 f 2009-10-13 13:37:14.252675-04 2009-10-13 5783 86 W/O 10069-1 -1 -1.10 \N 5947 t WO f jsmith f 11697 f 2009-10-13 13:37:14.252675-04 2009-10-13 5783 94 W/O 10069-1 -1 1.10 \N 5947 t WO f jsmith f 11699 f 2009-10-13 13:37:14.252675-04 2009-10-13 5784 94 W/O 10069-1 -1 550.00 \N 5948 t WO f jsmith f 11701 f 2009-10-13 13:37:14.252675-04 2009-10-13 5785 86 W/O 10069-1 3900 4105.00 Receive Inventory TSUB1 from Manufacturing 5949 t WO f jsmith f 11702 f 2009-10-13 13:37:14.252675-04 2009-10-13 5785 138 W/O 10069-1 3900 -4105.00 Receive Inventory TSUB1 from Manufacturing 5949 t WO f jsmith f 11703 f 2009-10-13 13:37:17.242638-04 2009-10-13 5786 86 W/O 10069-1 -1 -1178.90 Manufacturing Inventory Cost Variance for TSUB1 5950 t WO f jsmith f 11704 f 2009-10-13 13:37:17.242638-04 2009-10-13 5786 87 W/O 10069-1 -1 1178.90 Manufacturing Inventory Cost Variance for TSUB1 5950 t WO f jsmith f 11706 f 2009-10-13 13:37:26.971918-04 2009-10-13 5787 86 W/O 10067-1 3901 -714.27 Material TSUB1 Issue to Work Order 5952 t WO f jsmith f 11705 f 2009-10-13 13:37:26.971918-04 2009-10-13 5787 138 W/O 10067-1 3901 714.27 Material TSUB1 Issue to Work Order 5952 t WO f jsmith f 11708 f 2009-10-13 13:37:26.971918-04 2009-10-13 5788 86 W/O 10067-1 3902 -6.96 Material YPAINT1 Issue to Work Order 5953 t WO f jsmith f 11707 f 2009-10-13 13:37:26.971918-04 2009-10-13 5788 138 W/O 10067-1 3902 6.96 Material YPAINT1 Issue to Work Order 5953 t WO f jsmith f 11709 f 2009-10-13 13:37:26.971918-04 2009-10-13 5789 138 W/O 10067-1 3903 3614.68 Material HUB1 Issue to Work Order 5954 t WO f jsmith f 11712 f 2009-10-13 13:37:26.971918-04 2009-10-13 5790 86 W/O 10067-1 3904 -217.50 Material CBODY1 Issue to Work Order 5955 t WO f jsmith f 11711 f 2009-10-13 13:37:26.971918-04 2009-10-13 5790 138 W/O 10067-1 3904 217.50 Material CBODY1 Issue to Work Order 5955 t WO f jsmith f 11714 f 2009-10-13 13:37:26.971918-04 2009-10-13 5791 86 W/O 10067-1 3905 -2027.10 Material CBUMP Issue to Work Order 5956 t WO f jsmith f 11713 f 2009-10-13 13:37:26.971918-04 2009-10-13 5791 138 W/O 10067-1 3905 2027.10 Material CBUMP Issue to Work Order 5956 t WO f jsmith f 11716 f 2009-10-13 13:37:26.971918-04 2009-10-13 5792 86 W/O 10067-1 3906 -348.00 Material TWHEEL1 Issue to Work Order 5957 t WO f jsmith f 11715 f 2009-10-13 13:37:26.971918-04 2009-10-13 5792 138 W/O 10067-1 3906 348.00 Material TWHEEL1 Issue to Work Order 5957 t WO f jsmith f 11718 f 2009-10-13 13:37:26.971918-04 2009-10-13 5793 86 W/O 10067-1 -1 -1.10 \N 5958 t WO f jsmith f 11720 f 2009-10-13 13:37:26.971918-04 2009-10-13 5794 86 W/O 10067-1 -1 -191.40 \N 5959 t WO f jsmith f 11719 f 2009-10-13 13:37:26.971918-04 2009-10-13 5794 94 W/O 10067-1 -1 191.40 \N 5959 t WO f jsmith f 11722 f 2009-10-13 13:37:26.971918-04 2009-10-13 5795 86 W/O 10067-1 -1 -2.20 \N 5960 t WO f jsmith f 11721 f 2009-10-13 13:37:26.971918-04 2009-10-13 5795 94 W/O 10067-1 -1 2.20 \N 5960 t WO f jsmith f 11723 f 2009-10-13 13:37:26.971918-04 2009-10-13 5796 94 W/O 10067-1 -1 47.85 \N 5961 t WO f jsmith f 11726 f 2009-10-13 13:37:26.971918-04 2009-10-13 5797 86 W/O 10067-1 -1 -0.44 \N 5962 t WO f jsmith f 11725 f 2009-10-13 13:37:26.971918-04 2009-10-13 5797 94 W/O 10067-1 -1 0.44 \N 5962 t WO f jsmith f 11728 f 2009-10-13 13:37:26.971918-04 2009-10-13 5798 86 W/O 10067-1 -1 -19.14 \N 5963 t WO f jsmith f 11727 f 2009-10-13 13:37:26.971918-04 2009-10-13 5798 94 W/O 10067-1 -1 19.14 \N 5963 t WO f jsmith f 11729 f 2009-10-13 13:37:26.971918-04 2009-10-13 5799 86 W/O 10067-1 3907 7219.43 Receive Inventory STOCKCAR1 from Manufacturing 5964 t WO f jsmith f 11730 f 2009-10-13 13:37:26.971918-04 2009-10-13 5799 85 W/O 10067-1 3907 -7219.43 Receive Inventory STOCKCAR1 from Manufacturing 5964 t WO f jsmith f 11731 f 2009-10-13 13:37:52.16287-04 2009-10-13 5800 86 W/O 10067-1 -1 -28.80 Manufacturing Inventory Cost Variance for STOCKCAR1 5965 t WO f jsmith f 11732 f 2009-10-13 13:37:52.16287-04 2009-10-13 5800 87 W/O 10067-1 -1 28.80 Manufacturing Inventory Cost Variance for STOCKCAR1 5965 t WO f jsmith f 11734 f 2009-10-13 13:37:59.957039-04 2009-10-13 5801 86 W/O 50198-1 3908 -5000.00 Material TBODY1 Issue to Work Order 5967 t WO f jsmith f 11733 f 2009-10-13 13:37:59.957039-04 2009-10-13 5801 138 W/O 50198-1 3908 5000.00 Material TBODY1 Issue to Work Order 5967 t WO f jsmith f 11736 f 2009-10-13 13:37:59.957039-04 2009-10-13 5802 86 W/O 50198-1 3909 -4105.00 Material TSUB1 Issue to Work Order 5968 t WO f jsmith f 11735 f 2009-10-13 13:37:59.957039-04 2009-10-13 5802 138 W/O 50198-1 3909 4105.00 Material TSUB1 Issue to Work Order 5968 t WO f jsmith f 11738 f 2009-10-13 13:37:59.957039-04 2009-10-13 5803 86 W/O 50198-1 3910 -40.00 Material YPAINT1 Issue to Work Order 5969 t WO f jsmith f 11737 f 2009-10-13 13:37:59.957039-04 2009-10-13 5803 138 W/O 50198-1 3910 40.00 Material YPAINT1 Issue to Work Order 5969 t WO f jsmith f 11740 f 2009-10-13 13:37:59.957039-04 2009-10-13 5804 86 W/O 50198-1 3911 -2000.00 Material TWHEEL1 Issue to Work Order 5970 t WO f jsmith f 11739 f 2009-10-13 13:37:59.957039-04 2009-10-13 5804 138 W/O 50198-1 3911 2000.00 Material TWHEEL1 Issue to Work Order 5970 t WO f jsmith f 11742 f 2009-10-13 13:37:59.957039-04 2009-10-13 5805 86 W/O 50198-1 -1 -1.10 \N 5971 t WO f jsmith f 11741 f 2009-10-13 13:37:59.957039-04 2009-10-13 5805 94 W/O 50198-1 -1 1.10 \N 5971 t WO f jsmith f 11744 f 2009-10-13 13:37:59.957039-04 2009-10-13 5806 86 W/O 50198-1 -1 -1100.00 \N 5972 t WO f jsmith f 11743 f 2009-10-13 13:37:59.957039-04 2009-10-13 5806 94 W/O 50198-1 -1 1100.00 \N 5972 t WO f jsmith f 11746 f 2009-10-13 13:37:59.957039-04 2009-10-13 5807 86 W/O 50198-1 -1 -2.20 \N 5973 t WO f jsmith f 11745 f 2009-10-13 13:37:59.957039-04 2009-10-13 5807 94 W/O 50198-1 -1 2.20 \N 5973 t WO f jsmith f 11748 f 2009-10-13 13:37:59.957039-04 2009-10-13 5808 86 W/O 50198-1 -1 -275.00 \N 5974 t WO f jsmith f 11747 f 2009-10-13 13:37:59.957039-04 2009-10-13 5808 94 W/O 50198-1 -1 275.00 \N 5974 t WO f jsmith f 11750 f 2009-10-13 13:37:59.957039-04 2009-10-13 5809 86 W/O 50198-1 -1 -0.44 \N 5975 t WO f jsmith f 11749 f 2009-10-13 13:37:59.957039-04 2009-10-13 5809 94 W/O 50198-1 -1 0.44 \N 5975 t WO f jsmith f 11752 f 2009-10-13 13:37:59.957039-04 2009-10-13 5810 86 W/O 50198-1 -1 -110.00 \N 5976 t WO f jsmith f 11751 f 2009-10-13 13:37:59.957039-04 2009-10-13 5810 94 W/O 50198-1 -1 110.00 \N 5976 t WO f jsmith f 11753 f 2009-10-13 13:37:59.957039-04 2009-10-13 5811 86 W/O 50198-1 3912 12817.00 Receive Inventory YTRUCK1 from Manufacturing 5977 t WO f jsmith f 11754 f 2009-10-13 13:37:59.957039-04 2009-10-13 5811 85 W/O 50198-1 3912 -12817.00 Receive Inventory YTRUCK1 from Manufacturing 5977 t WO f jsmith f 11755 f 2009-10-13 13:38:16.230866-04 2009-10-13 5812 86 W/O 50198-1 -1 -183.26 Manufacturing Inventory Cost Variance for YTRUCK1 5978 t WO f jsmith f 11756 f 2009-10-13 13:38:16.230866-04 2009-10-13 5812 87 W/O 50198-1 -1 183.26 Manufacturing Inventory Cost Variance for YTRUCK1 5978 t WO f jsmith f 11758 f 2009-10-13 13:40:27.302082-04 2009-10-13 5813 86 W/O 10070-1 3913 -500.00 Material SHEET1 Issue to Work Order 5980 t WO f jsmith f 11757 f 2009-10-13 13:40:27.302082-04 2009-10-13 5813 138 W/O 10070-1 3913 500.00 Material SHEET1 Issue to Work Order 5980 t WO f jsmith f 11760 f 2009-10-13 13:40:27.302082-04 2009-10-13 5814 86 W/O 10070-1 -1 -27.50 \N 5981 t WO f jsmith f 11759 f 2009-10-13 13:40:27.302082-04 2009-10-13 5814 94 W/O 10070-1 -1 27.50 \N 5981 t WO f jsmith f 11762 f 2009-10-13 13:40:27.302082-04 2009-10-13 5815 86 W/O 10070-1 -1 -8.80 \N 5982 t WO f jsmith f 11761 f 2009-10-13 13:40:27.302082-04 2009-10-13 5815 94 W/O 10070-1 -1 8.80 \N 5982 t WO f jsmith f 11763 f 2009-10-13 13:40:27.302082-04 2009-10-13 5816 86 W/O 10070-1 3914 519.80 Receive Inventory BRCPFN1 from Manufacturing 5983 t WO f jsmith f 11764 f 2009-10-13 13:40:27.302082-04 2009-10-13 5816 85 W/O 10070-1 3914 -519.80 Receive Inventory BRCPFN1 from Manufacturing 5983 t WO f jsmith f 11765 f 2009-10-13 13:40:39.531523-04 2009-10-13 5817 86 W/O 10070-1 3915 750.00 Receive Inventory from Breeder Manufacturing 5984 t WO f jsmith f 11766 f 2009-10-13 13:40:39.531523-04 2009-10-13 5817 138 W/O 10070-1 3915 -750.00 Receive Inventory from Breeder Manufacturing 5984 t WO f jsmith f 11767 f 2009-10-13 13:40:39.531523-04 2009-10-13 5818 86 W/O 10070-1 3916 507.92 Receive Inventory from Breeder Manufacturing 5985 t WO f jsmith f 11768 f 2009-10-13 13:40:39.531523-04 2009-10-13 5818 138 W/O 10070-1 3916 -507.92 Receive Inventory from Breeder Manufacturing 5985 t WO f jsmith f 11769 f 2009-10-13 13:40:39.531523-04 2009-10-13 5819 86 W/O 10070-1 3917 1661.92 Receive Inventory from Breeder Manufacturing 5986 t WO f jsmith f 11770 f 2009-10-13 13:40:39.531523-04 2009-10-13 5819 138 W/O 10070-1 3917 -1661.92 Receive Inventory from Breeder Manufacturing 5986 t WO f jsmith f 11772 f 2009-10-13 13:40:39.531523-04 2009-10-13 5820 86 W/O 10070-1 3918 -519.80 Issue Breeder Inventory by Breeder Distribution 5987 t WO f jsmith f 11771 f 2009-10-13 13:40:39.531523-04 2009-10-13 5820 85 W/O 10070-1 3918 519.80 Issue Breeder Inventory by Breeder Distribution 5987 t WO f jsmith f 11773 f 2009-10-13 13:40:57.52482-04 2009-10-13 5821 86 W/O 10070-1 -1 16.50 Manufacturing Inventory Cost Variance for BRCPFN1 5988 t WO f jsmith f 11774 f 2009-10-13 13:40:57.52482-04 2009-10-13 5821 87 W/O 10070-1 -1 -16.50 Manufacturing Inventory Cost Variance for BRCPFN1 5988 t WO f jsmith f 11775 f 2009-10-13 13:40:57.52482-04 2009-10-13 5822 86 W/O 10070-1 -1 -2400.04 Breeder Inventory Cost Variance for BRCPFN1 5989 t WO f jsmith f 11776 f 2009-10-13 13:40:57.52482-04 2009-10-13 5822 87 W/O 10070-1 -1 2400.04 Breeder Inventory Cost Variance for BRCPFN1 5989 t WO f jsmith f 11777 f 2009-10-13 13:42:04.980174-04 2009-10-13 5823 128 S/R 99010 3919 51.27 Issue to Shipping 5990 t TO f jsmith f 11778 f 2009-10-13 13:42:04.980174-04 2009-10-13 5823 130 S/R 99010 3919 -51.27 Issue to Shipping 5990 t TO f jsmith f 11779 f 2009-10-13 13:42:14.03955-04 2009-10-13 5824 130 I/M 99010 3920 51.27 Ship from Src to Transit Warehouse 5991 t TO f jsmith f 11780 f 2009-10-13 13:42:14.03955-04 2009-10-13 5824 134 I/M 99010 3920 -51.27 Ship from Src to Transit Warehouse 5991 t TO f jsmith f 11788 f 2009-10-13 13:44:19.076001-04 2009-10-13 5828 130 I/M 99010 3928 -51.27 Recall Shipment from Transit To Src Warehouse 5998 t TO f jsmith f 11787 f 2009-10-13 13:44:19.076001-04 2009-10-13 5828 134 I/M 99010 3928 51.27 Recall Shipment from Transit To Src Warehouse 5998 t TO f jsmith f 11792 f 2009-10-13 13:47:14.595953-04 2009-10-13 5830 130 S/R 99010 3931 -25.63 Issue to Shipping 6000 t TO f jsmith f 11793 f 2009-10-13 13:47:21.099072-04 2009-10-13 5831 130 I/M 99010 3932 25.63 Ship from Src to Transit Warehouse 6001 t TO f jsmith f 11794 f 2009-10-13 13:47:21.099072-04 2009-10-13 5831 134 I/M 99010 3932 -25.63 Ship from Src to Transit Warehouse 6001 t TO f jsmith f 11800 f 2009-10-13 14:23:13.027902-04 2009-10-13 5834 130 I/M 99010 3938 -25.63 Recall Shipment from Transit To Src Warehouse 6006 t TO f jsmith f 11799 f 2009-10-13 14:23:13.027902-04 2009-10-13 5834 134 I/M 99010 3938 25.63 Recall Shipment from Transit To Src Warehouse 6006 t TO f jsmith f 11802 f 2009-10-13 14:23:25.824697-04 2009-10-13 5835 128 S/R 99010 3940 -25.63 Return from Shipping 6007 t TO f jsmith f 11801 f 2009-10-13 14:23:25.824697-04 2009-10-13 5835 130 S/R 99010 3940 25.63 Return from Shipping 6007 t TO f jsmith f 11803 f 2009-10-13 14:24:16.915529-04 2009-10-13 5836 128 I/M TRN-Product \N 51.27 Inter-Warehouse Transfer for item YTRUCK1\n 6008 t Misc f jsmith f 11804 f 2009-10-13 14:24:16.915529-04 2009-10-13 5836 146 I/M TRN-Product \N -51.27 Inter-Warehouse Transfer for item YTRUCK1\n 6008 t Misc f jsmith f 11806 f 2009-10-13 14:24:51.918254-04 2009-10-13 5837 96 S/R 50199-1 3943 -8298.20 Issue STOCKCAR1 to Shipping for customer Xtreme Toys LTD 6009 t SO f jsmith f 11805 f 2009-10-13 14:24:51.918254-04 2009-10-13 5837 85 S/R 50199-1 3943 8298.20 Issue STOCKCAR1 to Shipping for customer Xtreme Toys LTD 6009 t SO f jsmith f 11808 f 2009-10-13 14:25:04.515138-04 2009-10-13 5838 108 S/R 60058 -1 -8298.20 Ship Shipment to Customer Xtreme Toys LTD 6010 t SH f jsmith f 11807 f 2009-10-13 14:25:04.515138-04 2009-10-13 5838 96 S/R 60058 -1 8298.20 Ship Shipment to Customer Xtreme Toys LTD 6010 t SH f jsmith f 11809 f 2009-10-13 14:25:15.101797-04 2009-10-13 5839 122 A/R 60086 \N 9.99 Xtreme Toys LTD 6011 t IN f jsmith f 11811 f 2009-10-13 14:25:15.101797-04 2009-10-13 5839 106 A/R 60086 \N -42310.02 Xtreme Toys LTD 6011 t IN f jsmith f 11810 f 2009-10-13 14:25:15.101797-04 2009-10-13 5839 141 A/R 60086 \N 42300.03 Xtreme Toys LTD 6011 t IN f jsmith f 11813 f 2009-10-13 14:25:20.846471-04 2009-10-13 5840 96 S/R 50198-1 3944 -12817.00 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6012 t SO f jsmith f 11812 f 2009-10-13 14:25:20.846471-04 2009-10-13 5840 85 S/R 50198-1 3944 12817.00 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6012 t SO f jsmith f 11815 f 2009-10-13 14:25:25.463572-04 2009-10-13 5841 108 S/R 60059 -1 -12817.00 Ship Shipment to Customer Tremendous Toys Incorporated 6013 t SH f jsmith f 11814 f 2009-10-13 14:25:25.463572-04 2009-10-13 5841 96 S/R 60059 -1 12817.00 Ship Shipment to Customer Tremendous Toys Incorporated 6013 t SH f jsmith f 11817 f 2009-10-13 14:25:34.297924-04 2009-10-13 5842 122 A/R 60087 \N 9375.00 Tremendous Toys Incorporated 6014 t IN f jsmith f 11818 f 2009-10-13 14:25:34.297924-04 2009-10-13 5842 106 A/R 60087 \N -57937.50 Tremendous Toys Incorporated 6014 t IN f jsmith f 11819 f 2009-10-13 14:25:34.297924-04 2009-10-13 5842 102 A/R 60087 \N 2312.50 Tremendous Toys Incorporated 6014 t IN f jsmith f 11816 f 2009-10-13 14:25:34.297924-04 2009-10-13 5842 103 A/R 60087 \N 46250.00 Tremendous Toys Incorporated 6014 t IN f jsmith f 11820 f 2009-10-13 14:27:10.978501-04 2009-10-13 5843 106 A/R I-60087 \N 57937.50 TTOYS-Tremendous Toys Incorporated 6015 t CR f jsmith f 11822 f 2009-10-13 14:27:44.463572-04 2009-10-13 5844 127 A/R W-23432423 \N -42310.02 XTRM-Xtreme Toys LTD 6016 t CR f jsmith f 11823 f 2009-10-13 14:27:44.463572-04 2009-10-13 5844 106 A/R I-60086 \N 42310.02 XTRM-Xtreme Toys LTD 6016 t CR f jsmith f 11824 f 2009-10-13 14:32:36.839299-04 2009-10-13 5845 128 S/R 99010 3945 51.27 Issue to Shipping 6017 t TO f jsmith f 11825 f 2009-10-13 14:32:36.839299-04 2009-10-13 5845 130 S/R 99010 3945 -51.27 Issue to Shipping 6017 t TO f jsmith f 11826 f 2009-10-13 14:32:41.031211-04 2009-10-13 5846 130 I/M 99010 3946 51.27 Ship from Src to Transit Warehouse 6018 t TO f jsmith f 11827 f 2009-10-13 14:32:41.031211-04 2009-10-13 5846 134 I/M 99010 3946 -51.27 Ship from Src to Transit Warehouse 6018 t TO f jsmith f 11829 f 2009-10-13 14:32:41.678363-04 2009-10-13 5847 146 I/M 99010 \N -51.27 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 6019 t TO f jsmith f 11828 f 2009-10-13 14:32:41.678363-04 2009-10-13 5847 134 I/M 99010 \N 51.27 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 6019 t TO f jsmith f 11831 f 2009-10-13 14:34:13.627003-04 2009-10-13 5848 143 S/O TERMINAL 1A \N -100.00 Open posting for terminal TERMINAL 1A 6021 t MR f jsmith f 11833 f 2009-10-13 14:35:04.420718-04 2009-10-13 5849 146 S/O 100014 3950 102.54 Item Sale: YTRUCK1 6022 t RS f jsmith f 11832 f 2009-10-13 14:35:04.420718-04 2009-10-13 5849 148 S/O 100014 3950 -102.54 Item Sale: YTRUCK1 6022 t RS f jsmith f 11835 f 2009-10-13 14:36:17.116972-04 2009-10-13 5850 129 S/O TERMINAL 1A \N 42.86 Sales posting for terminal TERMINAL 1A 6023 t RS f jsmith f 11834 f 2009-10-13 14:36:17.116972-04 2009-10-13 5850 142 S/O TERMINAL 1A \N 439.60 Sales posting for terminal TERMINAL 1A 6023 t RS f jsmith f 11836 f 2009-10-13 14:36:17.116972-04 2009-10-13 5850 143 S/O TERMINAL 1A \N -482.46 Sales posting for terminal TERMINAL 1A 6023 t RS f jsmith f 11837 f 2009-10-13 14:36:17.116972-04 2009-10-13 5851 143 S/O TERMINAL 1A \N 582.46 Close terminal TERMINAL 1A 6023 t MR f jsmith f 11839 f 2009-10-13 14:37:40.830135-04 2009-10-13 5853 128 S/R 99011 3951 51.27 Issue to Shipping 6024 t TO f jsmith f 11840 f 2009-10-13 14:37:40.830135-04 2009-10-13 5853 130 S/R 99011 3951 -51.27 Issue to Shipping 6024 t TO f jsmith f 11841 f 2009-10-13 14:37:44.980566-04 2009-10-13 5854 130 I/M 99011 3952 51.27 Ship from Src to Transit Warehouse 6025 t TO f jsmith f 11842 f 2009-10-13 14:37:44.980566-04 2009-10-13 5854 134 I/M 99011 3952 -51.27 Ship from Src to Transit Warehouse 6025 t TO f jsmith f 11844 f 2009-10-13 14:37:59.437742-04 2009-10-13 5855 146 I/M 99011 \N -51.27 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 6026 t TO f jsmith f 11843 f 2009-10-13 14:37:59.437742-04 2009-10-13 5855 134 I/M 99011 \N 51.27 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 6026 t TO f jsmith f 11847 f 2009-10-13 14:45:47.060933-04 2009-10-13 5857 95 S/R 20078 3957 256.34 Receive Inventory from P/O for Toy Parts Inc. 6030 t PO f jsmith f 11848 f 2009-10-13 14:45:47.060933-04 2009-10-13 5857 128 S/R 20078 3957 -256.34 Receive Inventory from P/O for Toy Parts Inc. 6030 t PO f jsmith f 11849 f 2009-10-13 14:45:47.396454-04 2009-10-13 5858 95 S/R 20078 3958 400.00 Receive Inventory from P/O for Toy Parts Inc. 6032 t PO f jsmith f 11850 f 2009-10-13 14:45:47.396454-04 2009-10-13 5858 138 S/R 20078 3958 -400.00 Receive Inventory from P/O for Toy Parts Inc. 6032 t PO f jsmith f 10964 f 2009-09-16 13:53:52.094642-04 2009-09-16 5421 128 I/M Relocate \N 60.00 Inter-Warehouse Transfer for item TWHEEL1\n 5510 t Misc f jsmith f 10965 f 2009-09-16 13:53:52.094642-04 2009-09-16 5421 138 I/M Relocate \N -60.00 Inter-Warehouse Transfer for item TWHEEL1\n 5510 t Misc f jsmith f 10966 f 2009-09-16 14:01:41.564999-04 2009-09-16 5422 95 S/R 20067 3632 40.00 Receive Inventory from P/O for Toy Parts Inc. 5511 t PO f jsmith f 10967 f 2009-09-16 14:01:41.564999-04 2009-09-16 5422 138 S/R 20067 3632 -40.00 Receive Inventory from P/O for Toy Parts Inc. 5511 t PO f jsmith f 10969 f 2009-09-16 14:02:06.670672-04 2009-09-16 5423 86 W/O 10063-1 3633 -55.00 Material TINSERT1 Issue to Work Order 5513 t WO f jsmith f 10968 f 2009-09-16 14:02:06.670672-04 2009-09-16 5423 138 W/O 10063-1 3633 55.00 Material TINSERT1 Issue to Work Order 5513 t WO f jsmith f 10971 f 2009-09-16 14:02:06.670672-04 2009-09-16 5424 86 W/O 10063-1 3634 -40.00 Material TBOX1 Issue to Work Order 5514 t WO f jsmith f 10970 f 2009-09-16 14:02:06.670672-04 2009-09-16 5424 138 W/O 10063-1 3634 40.00 Material TBOX1 Issue to Work Order 5514 t WO f jsmith f 10973 f 2009-09-16 14:02:06.670672-04 2009-09-16 5425 86 W/O 10063-1 -1 -1.10 Post Setup Time Standard Operation - Assembly/jsmith to Work Order 5515 t WO f jsmith f 10972 f 2009-09-16 14:02:06.670672-04 2009-09-16 5425 94 W/O 10063-1 -1 1.10 Post Setup Time Standard Operation - Assembly/jsmith to Work Order 5515 t WO f jsmith f 10975 f 2009-09-16 14:02:06.670672-04 2009-09-16 5426 86 W/O 10063-1 -1 -22.00 Post Run Time Standard Operation - Assembly/jsmith to Work Order 5516 t WO f jsmith f 10974 f 2009-09-16 14:02:06.670672-04 2009-09-16 5426 94 W/O 10063-1 -1 22.00 Post Run Time Standard Operation - Assembly/jsmith to Work Order 5516 t WO f jsmith f 10976 f 2009-09-16 14:02:06.670672-04 2009-09-16 5427 86 W/O 10063-1 3635 164.20 Receive Inventory TSUB1 from Manufacturing 5517 t WO f jsmith f 10977 f 2009-09-16 14:02:06.670672-04 2009-09-16 5427 138 W/O 10063-1 3635 -164.20 Receive Inventory TSUB1 from Manufacturing 5517 t WO f jsmith f 10979 f 2009-09-16 14:02:29.104421-04 2009-09-16 5428 86 W/O 10062-1 3636 -200.00 Material TBODY1 Issue to Work Order 5518 t WO f jsmith f 10978 f 2009-09-16 14:02:29.104421-04 2009-09-16 5428 138 W/O 10062-1 3636 200.00 Material TBODY1 Issue to Work Order 5518 t WO f jsmith f 10983 f 2009-09-16 14:02:29.104421-04 2009-09-16 5430 86 W/O 10062-1 3638 -164.20 Material TSUB1 Issue to Work Order 5520 t WO f jsmith f 10982 f 2009-09-16 14:02:29.104421-04 2009-09-16 5430 138 W/O 10062-1 3638 164.20 Material TSUB1 Issue to Work Order 5520 t WO f jsmith f 10985 f 2009-09-16 14:02:29.104421-04 2009-09-16 5431 86 W/O 10062-1 3639 -80.00 Material TWHEEL1 Issue to Work Order 5521 t WO f jsmith f 10984 f 2009-09-16 14:02:29.104421-04 2009-09-16 5431 138 W/O 10062-1 3639 80.00 Material TWHEEL1 Issue to Work Order 5521 t WO f jsmith f 10987 f 2009-09-16 14:02:29.104421-04 2009-09-16 5432 86 W/O 10062-1 -1 -1.10 Post Setup Time Standard Paint Operation/jsmith to Work Order 5522 t WO f jsmith f 10986 f 2009-09-16 14:02:29.104421-04 2009-09-16 5432 94 W/O 10062-1 -1 1.10 Post Setup Time Standard Paint Operation/jsmith to Work Order 5522 t WO f jsmith f 10989 f 2009-09-16 14:02:29.104421-04 2009-09-16 5433 86 W/O 10062-1 -1 -44.00 Post Run Time Standard Paint Operation/jsmith to Work Order 5523 t WO f jsmith f 10988 f 2009-09-16 14:02:29.104421-04 2009-09-16 5433 94 W/O 10062-1 -1 44.00 Post Run Time Standard Paint Operation/jsmith to Work Order 5523 t WO f jsmith f 10991 f 2009-09-16 14:02:29.104421-04 2009-09-16 5434 86 W/O 10062-1 -1 -2.20 Post Setup Time Standard Operation - Assembly/jsmith to Work Order 5524 t WO f jsmith f 10990 f 2009-09-16 14:02:29.104421-04 2009-09-16 5434 94 W/O 10062-1 -1 2.20 Post Setup Time Standard Operation - Assembly/jsmith to Work Order 5524 t WO f jsmith f 10993 f 2009-09-16 14:02:29.104421-04 2009-09-16 5435 86 W/O 10062-1 -1 -11.00 Post Run Time Standard Operation - Assembly/jsmith to Work Order 5525 t WO f jsmith f 10992 f 2009-09-16 14:02:29.104421-04 2009-09-16 5435 94 W/O 10062-1 -1 11.00 Post Run Time Standard Operation - Assembly/jsmith to Work Order 5525 t WO f jsmith f 10995 f 2009-09-16 14:02:29.104421-04 2009-09-16 5436 86 W/O 10062-1 -1 -0.44 Post Setup Time SHIPPING/jsmith to Work Order 5526 t WO f jsmith f 10994 f 2009-09-16 14:02:29.104421-04 2009-09-16 5436 94 W/O 10062-1 -1 0.44 Post Setup Time SHIPPING/jsmith to Work Order 5526 t WO f jsmith f 11023 f 2009-09-16 14:08:49.028423-04 2009-09-16 5449 86 W/O Misc. 3646 -120.00 Consumed during Misc. Production of Item Number TSUB1\n 5544 t WO f jsmith f 11022 f 2009-09-16 14:08:49.028423-04 2009-09-16 5449 138 W/O Misc. 3646 120.00 Consumed during Misc. Production of Item Number TSUB1\n 5544 t WO f jsmith f 11025 f 2009-09-16 14:08:49.028423-04 2009-09-16 5450 86 W/O Misc. 3647 -165.00 Consumed during Misc. Production of Item Number TSUB1\n 5545 t WO f jsmith f 11024 f 2009-09-16 14:08:49.028423-04 2009-09-16 5450 138 W/O Misc. 3647 165.00 Consumed during Misc. Production of Item Number TSUB1\n 5545 t WO f jsmith f 11027 f 2009-09-16 14:08:49.028423-04 2009-09-16 5451 86 W/O Misc. 3645 -72.60 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TSUB1 5546 t WO f jsmith f 11026 f 2009-09-16 14:08:49.028423-04 2009-09-16 5451 94 W/O Misc. 3645 72.60 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TSUB1 5546 t WO f jsmith f 11029 f 2009-09-16 14:08:49.028423-04 2009-09-16 5452 86 W/O Misc. 3645 -135.00 Cost Variance of Post to Misc. Production for Item Number TSUB1 5548 t WO f jsmith f 11028 f 2009-09-16 14:08:49.028423-04 2009-09-16 5452 87 W/O Misc. 3645 135.00 Cost Variance of Post to Misc. Production for Item Number TSUB1 5548 t WO f jsmith f 11093 f 2009-09-16 14:43:38.956601-04 2009-09-16 5484 86 W/O Misc. 3674 -200.00 Consumed during Misc. Production of Item Number BTRUCK1\n 5589 t WO f jsmith f 11092 f 2009-09-16 14:43:38.956601-04 2009-09-16 5484 138 W/O Misc. 3674 200.00 Consumed during Misc. Production of Item Number BTRUCK1\n 5589 t WO f jsmith f 11095 f 2009-09-16 14:43:38.956601-04 2009-09-16 5485 86 W/O Misc. 3675 -80.00 Consumed during Misc. Production of Item Number BTRUCK1\n 5590 t WO f jsmith f 11094 f 2009-09-16 14:43:38.956601-04 2009-09-16 5485 138 W/O Misc. 3675 80.00 Consumed during Misc. Production of Item Number BTRUCK1\n 5590 t WO f jsmith f 11097 f 2009-09-16 14:43:38.956601-04 2009-09-16 5486 86 W/O Misc. 3676 -164.20 Consumed during Misc. Production of Item Number BTRUCK1\n 5591 t WO f jsmith f 11096 f 2009-09-16 14:43:38.956601-04 2009-09-16 5486 138 W/O Misc. 3676 164.20 Consumed during Misc. Production of Item Number BTRUCK1\n 5591 t WO f jsmith f 11099 f 2009-09-16 14:43:38.956601-04 2009-09-16 5487 86 W/O Misc. 3672 -67.76 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number BTRUCK1 5592 t WO f jsmith f 11098 f 2009-09-16 14:43:38.956601-04 2009-09-16 5487 94 W/O Misc. 3672 67.76 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number BTRUCK1 5592 t WO f jsmith f 11100 f 2009-09-16 14:44:42.947646-04 2009-09-16 5488 86 W/O Misc. 3677 513.56 Receive from Misc. Production for Item Number WTRUCK1\n 5595 t WO f jsmith f 11101 f 2009-09-16 14:44:42.947646-04 2009-09-16 5488 85 W/O Misc. 3677 -513.56 Receive from Misc. Production for Item Number WTRUCK1\n 5595 t WO f jsmith f 11105 f 2009-09-16 14:44:42.947646-04 2009-09-16 5490 86 W/O Misc. 3679 -200.00 Consumed during Misc. Production of Item Number WTRUCK1\n 5597 t WO f jsmith f 11104 f 2009-09-16 14:44:42.947646-04 2009-09-16 5490 138 W/O Misc. 3679 200.00 Consumed during Misc. Production of Item Number WTRUCK1\n 5597 t WO f jsmith f 11107 f 2009-09-16 14:44:42.947646-04 2009-09-16 5491 86 W/O Misc. 3680 -80.00 Consumed during Misc. Production of Item Number WTRUCK1\n 5598 t WO f jsmith f 11106 f 2009-09-16 14:44:42.947646-04 2009-09-16 5491 138 W/O Misc. 3680 80.00 Consumed during Misc. Production of Item Number WTRUCK1\n 5598 t WO f jsmith f 11109 f 2009-09-16 14:44:42.947646-04 2009-09-16 5492 86 W/O Misc. 3681 -164.20 Consumed during Misc. Production of Item Number WTRUCK1\n 5599 t WO f jsmith f 11108 f 2009-09-16 14:44:42.947646-04 2009-09-16 5492 138 W/O Misc. 3681 164.20 Consumed during Misc. Production of Item Number WTRUCK1\n 5599 t WO f jsmith f 11111 f 2009-09-16 14:44:42.947646-04 2009-09-16 5493 86 W/O Misc. 3677 -67.76 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number WTRUCK1 5600 t WO f jsmith f 11110 f 2009-09-16 14:44:42.947646-04 2009-09-16 5493 94 W/O Misc. 3677 67.76 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number WTRUCK1 5600 t WO f jsmith f 11129 f 2009-09-16 14:47:11.457164-04 2009-09-16 5502 85 W/O Misc. 3688 -513.56 Receive from Misc. Production for Item Number RTRUCK1\n 5612 t WO f jsmith f 11131 f 2009-09-16 14:47:11.457164-04 2009-09-16 5503 86 W/O Misc. 3689 -1.60 Consumed during Misc. Production of Item Number RTRUCK1\n 5613 t WO f jsmith f 11130 f 2009-09-16 14:47:11.457164-04 2009-09-16 5503 138 W/O Misc. 3689 1.60 Consumed during Misc. Production of Item Number RTRUCK1\n 5613 t WO f jsmith f 11133 f 2009-09-16 14:47:11.457164-04 2009-09-16 5504 86 W/O Misc. 3690 -200.00 Consumed during Misc. Production of Item Number RTRUCK1\n 5614 t WO f jsmith f 11132 f 2009-09-16 14:47:11.457164-04 2009-09-16 5504 138 W/O Misc. 3690 200.00 Consumed during Misc. Production of Item Number RTRUCK1\n 5614 t WO f jsmith f 11135 f 2009-09-16 14:47:11.457164-04 2009-09-16 5505 86 W/O Misc. 3691 -80.00 Consumed during Misc. Production of Item Number RTRUCK1\n 5615 t WO f jsmith f 11134 f 2009-09-16 14:47:11.457164-04 2009-09-16 5505 138 W/O Misc. 3691 80.00 Consumed during Misc. Production of Item Number RTRUCK1\n 5615 t WO f jsmith f 11137 f 2009-09-16 14:47:11.457164-04 2009-09-16 5506 86 W/O Misc. 3692 -164.20 Consumed during Misc. Production of Item Number RTRUCK1\n 5616 t WO f jsmith f 11136 f 2009-09-16 14:47:11.457164-04 2009-09-16 5506 138 W/O Misc. 3692 164.20 Consumed during Misc. Production of Item Number RTRUCK1\n 5616 t WO f jsmith f 11139 f 2009-09-16 14:47:11.457164-04 2009-09-16 5507 86 W/O Misc. 3688 -67.76 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number RTRUCK1 5617 t WO f jsmith f 11138 f 2009-09-16 14:47:11.457164-04 2009-09-16 5507 94 W/O Misc. 3688 67.76 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number RTRUCK1 5617 t WO f jsmith f 11141 f 2009-09-21 09:20:10.215504-04 2009-09-21 5508 96 S/R 99005 3693 -513.56 Issue to Shipping 5620 t TO f jsmith f 11140 f 2009-09-21 09:20:10.215504-04 2009-09-21 5508 85 S/R 99005 3693 513.56 Issue to Shipping 5620 t TO f jsmith f 11143 f 2009-09-21 09:20:10.540645-04 2009-09-21 5509 96 S/R 99005 3694 -513.56 Issue to Shipping 5621 t TO f jsmith f 11142 f 2009-09-21 09:20:10.540645-04 2009-09-21 5509 85 S/R 99005 3694 513.56 Issue to Shipping 5621 t TO f jsmith f 11145 f 2009-09-21 09:20:10.73089-04 2009-09-21 5510 96 S/R 99005 3695 -513.56 Issue to Shipping 5622 t TO f jsmith f 11144 f 2009-09-21 09:20:10.73089-04 2009-09-21 5510 85 S/R 99005 3695 513.56 Issue to Shipping 5622 t TO f jsmith f 11147 f 2009-09-21 09:20:16.182737-04 2009-09-21 5511 96 S/R 99005 3696 -512.68 Issue to Shipping 5623 t TO f jsmith f 11146 f 2009-09-21 09:20:16.182737-04 2009-09-21 5511 85 S/R 99005 3696 512.68 Issue to Shipping 5623 t TO f jsmith f 8561 f 2007-01-08 16:35:03.105-05 2007-01-08 4294 121 A/R 60032 \N 24.73 3634 t IN f jsmith f 11148 f 2009-09-21 09:20:37.141647-04 2009-09-21 5512 96 I/M 99005 3697 513.56 Ship from Src to Transit Warehouse 5624 t TO f jsmith f 11149 f 2009-09-21 09:20:37.141647-04 2009-09-21 5512 134 I/M 99005 3697 -513.56 Ship from Src to Transit Warehouse 5624 t TO f jsmith f 11150 f 2009-09-21 09:20:37.141647-04 2009-09-21 5513 96 I/M 99005 3699 513.56 Ship from Src to Transit Warehouse 5625 t TO f jsmith f 11151 f 2009-09-21 09:20:37.141647-04 2009-09-21 5513 134 I/M 99005 3699 -513.56 Ship from Src to Transit Warehouse 5625 t TO f jsmith f 11152 f 2009-09-21 09:20:37.141647-04 2009-09-21 5514 96 I/M 99005 3701 513.56 Ship from Src to Transit Warehouse 5626 t TO f jsmith f 11153 f 2009-09-21 09:20:37.141647-04 2009-09-21 5514 134 I/M 99005 3701 -513.56 Ship from Src to Transit Warehouse 5626 t TO f jsmith f 11154 f 2009-09-21 09:20:37.141647-04 2009-09-21 5515 96 I/M 99005 3703 512.68 Ship from Src to Transit Warehouse 5627 t TO f jsmith f 11155 f 2009-09-21 09:20:37.141647-04 2009-09-21 5515 134 I/M 99005 3703 -512.68 Ship from Src to Transit Warehouse 5627 t TO f jsmith f 11157 f 2009-09-21 09:21:52.193661-04 2009-09-21 5516 128 I/M 99005 \N -512.68 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5628 t TO f jsmith f 11156 f 2009-09-21 09:21:52.193661-04 2009-09-21 5516 134 I/M 99005 \N 512.68 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5628 t TO f jsmith f 11159 f 2009-09-21 09:21:52.53347-04 2009-09-21 5517 128 I/M 99005 \N -513.56 Inter-Warehouse Transfer for item RTRUCK1\nReceive from Transit To Dest Warehouse 5630 t TO f jsmith f 11158 f 2009-09-21 09:21:52.53347-04 2009-09-21 5517 134 I/M 99005 \N 513.56 Inter-Warehouse Transfer for item RTRUCK1\nReceive from Transit To Dest Warehouse 5630 t TO f jsmith f 11161 f 2009-09-21 09:21:52.920137-04 2009-09-21 5518 128 I/M 99005 \N -513.56 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5632 t TO f jsmith f 11160 f 2009-09-21 09:21:52.920137-04 2009-09-21 5518 134 I/M 99005 \N 513.56 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5632 t TO f jsmith f 11163 f 2009-09-21 09:21:53.128839-04 2009-09-21 5519 128 I/M 99005 \N -513.56 Inter-Warehouse Transfer for item WTRUCK1\nReceive from Transit To Dest Warehouse 5634 t TO f jsmith f 11162 f 2009-09-21 09:21:53.128839-04 2009-09-21 5519 134 I/M 99005 \N 513.56 Inter-Warehouse Transfer for item WTRUCK1\nReceive from Transit To Dest Warehouse 5634 t TO f jsmith f 11164 f 2009-09-21 09:25:22.136436-04 2009-09-21 5520 128 S/R 99003 3713 51.36 Issue to Shipping 5636 t TO f jsmith f 11165 f 2009-09-21 09:25:22.136436-04 2009-09-21 5520 130 S/R 99003 3713 -51.36 Issue to Shipping 5636 t TO f jsmith f 11166 f 2009-09-21 09:25:22.339291-04 2009-09-21 5521 128 S/R 99003 3714 51.36 Issue to Shipping 5637 t TO f jsmith f 11167 f 2009-09-21 09:25:22.339291-04 2009-09-21 5521 130 S/R 99003 3714 -51.36 Issue to Shipping 5637 t TO f jsmith f 11168 f 2009-09-21 09:25:22.539195-04 2009-09-21 5522 128 S/R 99003 3715 51.36 Issue to Shipping 5638 t TO f jsmith f 11169 f 2009-09-21 09:25:22.539195-04 2009-09-21 5522 130 S/R 99003 3715 -51.36 Issue to Shipping 5638 t TO f jsmith f 11170 f 2009-09-21 09:25:22.726848-04 2009-09-21 5523 128 S/R 99003 3716 51.27 Issue to Shipping 5639 t TO f jsmith f 11171 f 2009-09-21 09:25:22.726848-04 2009-09-21 5523 130 S/R 99003 3716 -51.27 Issue to Shipping 5639 t TO f jsmith f 11172 f 2009-09-21 09:25:30.672088-04 2009-09-21 5524 130 I/M 99003 3717 51.36 Ship from Src to Transit Warehouse 5640 t TO f jsmith f 11173 f 2009-09-21 09:25:30.672088-04 2009-09-21 5524 134 I/M 99003 3717 -51.36 Ship from Src to Transit Warehouse 5640 t TO f jsmith f 11174 f 2009-09-21 09:25:30.672088-04 2009-09-21 5525 130 I/M 99003 3719 51.36 Ship from Src to Transit Warehouse 5641 t TO f jsmith f 11175 f 2009-09-21 09:25:30.672088-04 2009-09-21 5525 134 I/M 99003 3719 -51.36 Ship from Src to Transit Warehouse 5641 t TO f jsmith f 11176 f 2009-09-21 09:25:30.672088-04 2009-09-21 5526 130 I/M 99003 3721 51.36 Ship from Src to Transit Warehouse 5642 t TO f jsmith f 11177 f 2009-09-21 09:25:30.672088-04 2009-09-21 5526 134 I/M 99003 3721 -51.36 Ship from Src to Transit Warehouse 5642 t TO f jsmith f 11178 f 2009-09-21 09:25:30.672088-04 2009-09-21 5527 130 I/M 99003 3723 51.27 Ship from Src to Transit Warehouse 5643 t TO f jsmith f 11179 f 2009-09-21 09:25:30.672088-04 2009-09-21 5527 134 I/M 99003 3723 -51.27 Ship from Src to Transit Warehouse 5643 t TO f jsmith f 11183 f 2009-09-21 09:25:31.671052-04 2009-09-21 5529 146 I/M 99003 \N -51.36 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5646 t TO f jsmith f 11182 f 2009-09-21 09:25:31.671052-04 2009-09-21 5529 134 I/M 99003 \N 51.36 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5646 t TO f jsmith f 11185 f 2009-09-21 09:25:31.878395-04 2009-09-21 5530 146 I/M 99003 \N -51.36 Inter-Warehouse Transfer for item RTRUCK1\nReceive from Transit To Dest Warehouse 5648 t TO f jsmith f 11184 f 2009-09-21 09:25:31.878395-04 2009-09-21 5530 134 I/M 99003 \N 51.36 Inter-Warehouse Transfer for item RTRUCK1\nReceive from Transit To Dest Warehouse 5648 t TO f jsmith f 11187 f 2009-09-21 09:25:32.121072-04 2009-09-21 5531 146 I/M 99003 \N -51.27 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5650 t TO f jsmith f 11186 f 2009-09-21 09:25:32.121072-04 2009-09-21 5531 134 I/M 99003 \N 51.27 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5650 t TO f jsmith f 11188 f 2009-09-21 09:25:38.400236-04 2009-09-21 5532 128 S/R 99004 3733 51.36 Issue to Shipping 5652 t TO f jsmith f 11189 f 2009-09-21 09:25:38.400236-04 2009-09-21 5532 130 S/R 99004 3733 -51.36 Issue to Shipping 5652 t TO f jsmith f 11190 f 2009-09-21 09:25:38.763348-04 2009-09-21 5533 128 S/R 99004 3734 51.36 Issue to Shipping 5653 t TO f jsmith f 11191 f 2009-09-21 09:25:38.763348-04 2009-09-21 5533 130 S/R 99004 3734 -51.36 Issue to Shipping 5653 t TO f jsmith f 11192 f 2009-09-21 09:25:38.95296-04 2009-09-21 5534 128 S/R 99004 3735 51.36 Issue to Shipping 5654 t TO f jsmith f 11193 f 2009-09-21 09:25:38.95296-04 2009-09-21 5534 130 S/R 99004 3735 -51.36 Issue to Shipping 5654 t TO f jsmith f 11194 f 2009-09-21 09:25:39.143007-04 2009-09-21 5535 128 S/R 99004 3736 51.27 Issue to Shipping 5655 t TO f jsmith f 11195 f 2009-09-21 09:25:39.143007-04 2009-09-21 5535 130 S/R 99004 3736 -51.27 Issue to Shipping 5655 t TO f jsmith f 11196 f 2009-09-21 09:25:44.237909-04 2009-09-21 5536 130 I/M 99004 3737 51.36 Ship from Src to Transit Warehouse 5656 t TO f jsmith f 11197 f 2009-09-21 09:25:44.237909-04 2009-09-21 5536 134 I/M 99004 3737 -51.36 Ship from Src to Transit Warehouse 5656 t TO f jsmith f 11198 f 2009-09-21 09:25:44.237909-04 2009-09-21 5537 130 I/M 99004 3739 51.36 Ship from Src to Transit Warehouse 5657 t TO f jsmith f 11199 f 2009-09-21 09:25:44.237909-04 2009-09-21 5537 134 I/M 99004 3739 -51.36 Ship from Src to Transit Warehouse 5657 t TO f jsmith f 11200 f 2009-09-21 09:25:44.237909-04 2009-09-21 5538 130 I/M 99004 3741 51.27 Ship from Src to Transit Warehouse 5658 t TO f jsmith f 11201 f 2009-09-21 09:25:44.237909-04 2009-09-21 5538 134 I/M 99004 3741 -51.27 Ship from Src to Transit Warehouse 5658 t TO f jsmith f 11202 f 2009-09-21 09:25:44.237909-04 2009-09-21 5539 130 I/M 99004 3743 51.36 Ship from Src to Transit Warehouse 5659 t TO f jsmith f 11203 f 2009-09-21 09:25:44.237909-04 2009-09-21 5539 134 I/M 99004 3743 -51.36 Ship from Src to Transit Warehouse 5659 t TO f jsmith f 11205 f 2009-09-21 09:25:44.997847-04 2009-09-21 5540 146 I/M 99004 \N -51.36 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5660 t TO f jsmith f 11204 f 2009-09-21 09:25:44.997847-04 2009-09-21 5540 134 I/M 99004 \N 51.36 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5660 t TO f jsmith f 11207 f 2009-09-21 09:25:45.594884-04 2009-09-21 5541 146 I/M 99004 \N -51.36 Inter-Warehouse Transfer for item WTRUCK1\nReceive from Transit To Dest Warehouse 5662 t TO f jsmith f 11206 f 2009-09-21 09:25:45.594884-04 2009-09-21 5541 134 I/M 99004 \N 51.36 Inter-Warehouse Transfer for item WTRUCK1\nReceive from Transit To Dest Warehouse 5662 t TO f jsmith f 11209 f 2009-09-21 09:25:45.802683-04 2009-09-21 5542 146 I/M 99004 \N -51.36 Inter-Warehouse Transfer for item RTRUCK1\nReceive from Transit To Dest Warehouse 5664 t TO f jsmith f 11208 f 2009-09-21 09:25:45.802683-04 2009-09-21 5542 134 I/M 99004 \N 51.36 Inter-Warehouse Transfer for item RTRUCK1\nReceive from Transit To Dest Warehouse 5664 t TO f jsmith f 11211 f 2009-09-21 09:25:46.017657-04 2009-09-21 5543 146 I/M 99004 \N -51.27 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5666 t TO f jsmith f 11210 f 2009-09-21 09:25:46.017657-04 2009-09-21 5543 134 I/M 99004 \N 51.27 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5666 t TO f jsmith f 11212 f 2009-09-21 09:30:46.575722-04 2009-09-21 5544 143 S/O TERMINAL 1A \N -100.00 Open posting for terminal TERMINAL 1A 5668 t MR f jsmith f 11215 f 2009-09-21 09:59:21.066544-04 2009-09-21 5546 143 S/O TERMINAL 1A \N 100.00 Close terminal TERMINAL 1A 5669 t MR f jsmith f 11216 f 2009-09-21 10:02:49.913979-04 2009-09-21 5548 143 S/O TERMINAL 1A \N -100.00 Open posting for terminal TERMINAL 1A 5670 t MR f admin f 11218 f 2009-09-21 13:25:48.658055-04 2009-09-21 5549 108 S/O 100001 3753 -2.57 Item Sale: RTRUCK1 5671 t RS f jsmith f 11219 f 2009-09-21 13:25:48.658055-04 2009-09-21 5549 85 S/O 100001 3753 2.57 Item Sale: RTRUCK1 5671 t RS f jsmith f 11221 f 2009-09-21 14:05:25.912491-04 2009-09-21 5550 146 S/O 100002 3754 2.57 Item Sale: RTRUCK1 5672 t RS f jsmith f 11220 f 2009-09-21 14:05:25.912491-04 2009-09-21 5550 148 S/O 100002 3754 -2.57 Item Sale: RTRUCK1 5672 t RS f jsmith f 11222 f 2009-09-21 14:15:39.704831-04 2009-09-21 5551 108 S/O 100003 3755 -2.57 Item Sale: RTRUCK1 5673 t RS f jsmith f 11223 f 2009-09-21 14:15:39.704831-04 2009-09-21 5551 146 S/O 100003 3755 2.57 Item Sale: RTRUCK1 5673 t RS f jsmith f 11225 f 2009-09-21 14:19:15.920814-04 2009-09-21 5552 146 S/O 100004 3756 2.57 Item Sale: RTRUCK1 5674 t RS f jsmith f 11224 f 2009-09-21 14:19:15.920814-04 2009-09-21 5552 148 S/O 100004 3756 -2.57 Item Sale: RTRUCK1 5674 t RS f jsmith f 11227 f 2009-09-21 14:23:45.383677-04 2009-09-21 5553 146 S/O 100005 3757 2.57 Item Sale: RTRUCK1 5675 t RS f jsmith f 11226 f 2009-09-21 14:23:45.383677-04 2009-09-21 5553 148 S/O 100005 3757 -2.57 Item Sale: RTRUCK1 5675 t RS f jsmith f 11231 f 2009-09-21 14:25:06.40069-04 2009-09-21 5554 129 S/O TERMINAL 1A \N 1.88 Sales posting for terminal TERMINAL 1A 5676 t RS f jsmith f 11230 f 2009-09-21 14:25:06.40069-04 2009-09-21 5554 103 S/O TERMINAL 1A \N 10.99 Sales posting for terminal TERMINAL 1A 5676 t RS f jsmith f 11228 f 2009-09-21 14:25:06.40069-04 2009-09-21 5554 142 S/O TERMINAL 1A \N 43.96 Sales posting for terminal TERMINAL 1A 5676 t RS f jsmith f 11229 f 2009-09-21 14:25:06.40069-04 2009-09-21 5554 143 S/O TERMINAL 1A \N -56.83 Sales posting for terminal TERMINAL 1A 5676 t RS f jsmith f 11233 f 2009-09-21 14:25:06.40069-04 2009-09-21 5555 143 S/O TERMINAL 1A \N 156.83 Close terminal TERMINAL 1A 5676 t MR f jsmith f 11234 f 2009-09-21 14:29:38.09104-04 2009-09-21 5557 143 S/O TERMINAL 1A \N -100.00 Open posting for terminal TERMINAL 1A 5677 t MR f jsmith f 11237 f 2009-09-21 14:48:26.830118-04 2009-09-21 5558 146 S/O 100007 3758 2.56 Item Sale: YTRUCK1 5678 t RS f admin f 11236 f 2009-09-21 14:48:26.830118-04 2009-09-21 5558 148 S/O 100007 3758 -2.56 Item Sale: YTRUCK1 5678 t RS f admin f 11239 f 2009-09-21 14:50:59.861613-04 2009-09-21 5559 146 S/O 100008 3759 2.57 Item Sale: RTRUCK1 5679 t RS f admin f 11238 f 2009-09-21 14:50:59.861613-04 2009-09-21 5559 148 S/O 100008 3759 -2.57 Item Sale: RTRUCK1 5679 t RS f admin f 11241 f 2009-09-21 14:53:57.886571-04 2009-09-21 5560 130 S/R 99006 3760 -128.39 Issue to Shipping 5680 t TO f admin f 11243 f 2009-09-21 14:53:58.191934-04 2009-09-21 5561 130 S/R 99006 3761 -141.23 Issue to Shipping 5681 t TO f admin f 11244 f 2009-09-21 14:53:58.396963-04 2009-09-21 5562 128 S/R 99006 3762 141.23 Issue to Shipping 5682 t TO f admin f 11245 f 2009-09-21 14:53:58.396963-04 2009-09-21 5562 130 S/R 99006 3762 -141.23 Issue to Shipping 5682 t TO f admin f 11246 f 2009-09-21 14:54:05.78596-04 2009-09-21 5563 130 I/M 99006 3763 141.23 Ship from Src to Transit Warehouse 5683 t TO f admin f 11247 f 2009-09-21 14:54:05.78596-04 2009-09-21 5563 134 I/M 99006 3763 -141.23 Ship from Src to Transit Warehouse 5683 t TO f admin f 11248 f 2009-09-21 14:54:05.78596-04 2009-09-21 5564 130 I/M 99006 3765 128.39 Ship from Src to Transit Warehouse 5684 t TO f admin f 11249 f 2009-09-21 14:54:05.78596-04 2009-09-21 5564 134 I/M 99006 3765 -128.39 Ship from Src to Transit Warehouse 5684 t TO f admin f 11250 f 2009-09-21 14:54:05.78596-04 2009-09-21 5565 130 I/M 99006 3767 141.23 Ship from Src to Transit Warehouse 5685 t TO f admin f 11251 f 2009-09-21 14:54:05.78596-04 2009-09-21 5565 134 I/M 99006 3767 -141.23 Ship from Src to Transit Warehouse 5685 t TO f admin f 11253 f 2009-09-21 14:54:06.608549-04 2009-09-21 5566 146 I/M 99006 \N -141.23 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5686 t TO f admin f 11252 f 2009-09-21 14:54:06.608549-04 2009-09-21 5566 134 I/M 99006 \N 141.23 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5686 t TO f admin f 11255 f 2009-09-21 14:54:06.986139-04 2009-09-21 5567 146 I/M 99006 \N -128.39 Inter-Warehouse Transfer for item RTRUCK1\nReceive from Transit To Dest Warehouse 5688 t TO f admin f 11254 f 2009-09-21 14:54:06.986139-04 2009-09-21 5567 134 I/M 99006 \N 128.39 Inter-Warehouse Transfer for item RTRUCK1\nReceive from Transit To Dest Warehouse 5688 t TO f admin f 11257 f 2009-09-21 14:54:07.251803-04 2009-09-21 5568 146 I/M 99006 \N -141.23 Inter-Warehouse Transfer for item WTRUCK1\nReceive from Transit To Dest Warehouse 5690 t TO f admin f 11256 f 2009-09-21 14:54:07.251803-04 2009-09-21 5568 134 I/M 99006 \N 141.23 Inter-Warehouse Transfer for item WTRUCK1\nReceive from Transit To Dest Warehouse 5690 t TO f admin f 11258 f 2009-09-21 14:55:13.941435-04 2009-09-21 5569 91 I/M \N 3775 5.14 \N 5692 t CT f admin f 11259 f 2009-09-21 14:55:13.941435-04 2009-09-21 5569 85 I/M \N 3775 -5.14 \N 5692 t CT f admin f 11260 f 2009-09-21 14:56:05.431212-04 2009-09-21 5570 91 I/M \N 3776 -2.57 \N 5693 t CT f admin f 11261 f 2009-09-21 14:56:05.431212-04 2009-09-21 5570 85 I/M \N 3776 2.57 \N 5693 t CT f admin f 11263 f 2009-09-21 15:12:46.208715-04 2009-09-21 5571 146 S/O 100009 3777 2.56 Item Sale: YTRUCK1 5694 t RS f jsmith f 11262 f 2009-09-21 15:12:46.208715-04 2009-09-21 5571 148 S/O 100009 3777 -2.56 Item Sale: YTRUCK1 5694 t RS f jsmith f 11265 f 2009-09-21 15:12:46.208715-04 2009-09-21 5572 146 S/O 100009 3778 2.57 Item Sale: BTRUCK1 5695 t RS f jsmith f 11264 f 2009-09-21 15:12:46.208715-04 2009-09-21 5572 148 S/O 100009 3778 -2.57 Item Sale: BTRUCK1 5695 t RS f jsmith f 11267 f 2009-09-21 15:12:46.208715-04 2009-09-21 5573 146 S/O 100009 3779 2.57 Item Sale: RTRUCK1 5696 t RS f jsmith f 11266 f 2009-09-21 15:12:46.208715-04 2009-09-21 5573 148 S/O 100009 3779 -2.57 Item Sale: RTRUCK1 5696 t RS f jsmith f 11269 f 2009-09-21 15:12:46.208715-04 2009-09-21 5574 146 S/O 100009 3780 2.57 Item Sale: WTRUCK1 5697 t RS f jsmith f 11268 f 2009-09-21 15:12:46.208715-04 2009-09-21 5574 148 S/O 100009 3780 -2.57 Item Sale: WTRUCK1 5697 t RS f jsmith f 11274 f 2009-09-21 15:16:43.671732-04 2009-09-21 5575 118 S/O TERMINAL 1A \N -0.01 G/L Series Discrepancy 5698 t RS f jsmith f 11275 f 2009-09-21 15:16:43.671732-04 2009-09-21 5575 129 S/O TERMINAL 1A \N 2.82 Sales posting for terminal TERMINAL 1A 5698 t RS f jsmith f 11272 f 2009-09-21 15:16:43.671732-04 2009-09-21 5575 142 S/O TERMINAL 1A \N 65.94 Sales posting for terminal TERMINAL 1A 5698 t RS f jsmith f 11273 f 2009-09-21 15:16:43.671732-04 2009-09-21 5575 143 S/O TERMINAL 1A \N -17.31 Sales posting for terminal TERMINAL 1A 5698 t RS f jsmith f 7488 f 2006-01-09 10:53:14.730945-05 2006-01-09 3809 96 S/R 50030-1 2961 -26.67 Issue to Shipping 2531 t SO f jsmith f 11276 f 2009-09-21 15:16:43.671732-04 2009-09-21 5575 144 S/O TERMINAL 1A \N -51.44 Sales posting for terminal TERMINAL 1A 5698 t RS f jsmith f 11278 f 2009-09-21 15:16:43.671732-04 2009-09-21 5576 143 S/O TERMINAL 1A \N 117.31 Close terminal TERMINAL 1A 5698 t MR f jsmith f 11271 f 2009-09-21 15:16:43.671732-04 2009-09-21 5577 144 S/O TERMINAL 1A \N 51.44 Check deposit for terminal TERMINAL 1A 5698 t RS f jsmith f 11279 f 2009-09-21 15:18:43.803214-04 2009-09-21 5578 143 S/O TERMINAL 1A \N -100.00 Open posting for terminal TERMINAL 1A 5699 t MR f jsmith f 11282 f 2009-09-21 15:21:37.177112-04 2009-09-21 5579 146 S/O 100010 3781 2.57 Item Sale: RTRUCK1 5700 t RS f jsmith f 11281 f 2009-09-21 15:21:37.177112-04 2009-09-21 5579 148 S/O 100010 3781 -2.57 Item Sale: RTRUCK1 5700 t RS f jsmith f 11283 f 2009-09-21 15:24:21.864743-04 2009-09-21 5580 143 S/O TERMINAL 1A \N 11.46 Cash register adjustment transaction 5701 t MR f jsmith f 11285 f 2009-09-21 15:25:15.698812-04 2009-09-21 5581 143 S/O TERMINAL 1A \N 11.46 Cash register adjustment transaction 5702 t MR f jsmith f 11288 f 2009-09-21 15:25:50.948554-04 2009-09-21 5582 143 S/O TERMINAL 1A \N 11.46 Cash register adjustment transaction 5703 t MR f jsmith f 11287 f 2009-09-21 15:25:50.948554-04 2009-09-21 5582 145 S/O TERMINAL 1A \N -11.46 Cash register adjustment 5703 t MR f jsmith f 11292 f 2009-09-21 15:26:21.32366-04 2009-09-21 5583 129 S/O TERMINAL 1A \N 0.47 Sales posting for terminal TERMINAL 1A 5704 t RS f jsmith f 11291 f 2009-09-21 15:26:21.32366-04 2009-09-21 5583 142 S/O TERMINAL 1A \N 10.99 Sales posting for terminal TERMINAL 1A 5704 t RS f jsmith f 11293 f 2009-09-21 15:26:21.32366-04 2009-09-21 5583 144 S/O TERMINAL 1A \N -11.46 Sales posting for terminal TERMINAL 1A 5704 t RS f jsmith f 11295 f 2009-09-21 15:26:21.32366-04 2009-09-21 5584 143 S/O TERMINAL 1A \N 65.62 Close terminal TERMINAL 1A 5704 t MR f jsmith f 11289 f 2009-09-21 15:26:21.32366-04 2009-09-21 5585 144 S/O TERMINAL 1A \N 11.46 Check deposit for terminal TERMINAL 1A 5704 t RS f jsmith f 11297 f 2009-09-21 15:27:41.65371-04 2009-09-21 5586 146 S/O 100011 3782 2.57 Item Sale: RTRUCK1 5705 t RS f jsmith f 11296 f 2009-09-21 15:27:41.65371-04 2009-09-21 5586 148 S/O 100011 3782 -2.57 Item Sale: RTRUCK1 5705 t RS f jsmith f 11299 f 2009-09-21 15:33:38.471317-04 2009-09-21 5587 143 S/O TERMINAL 1A \N -11.47 Cash register adjustment transaction 5706 t MR f jsmith f 11298 f 2009-09-21 15:33:38.471317-04 2009-09-21 5587 145 S/O TERMINAL 1A \N 11.47 Cash register adjustment 5706 t MR f jsmith f 11303 f 2009-09-21 15:44:36.270928-04 2009-09-21 5588 129 S/O TERMINAL 1A \N 0.47 Sales posting for terminal TERMINAL 1A 5707 t RS f jsmith f 11302 f 2009-09-21 15:44:36.270928-04 2009-09-21 5588 142 S/O TERMINAL 1A \N 10.99 Sales posting for terminal TERMINAL 1A 5707 t RS f jsmith f 11304 f 2009-09-21 15:44:36.270928-04 2009-09-21 5588 144 S/O TERMINAL 1A \N -11.46 Sales posting for terminal TERMINAL 1A 5707 t RS f jsmith f 11301 f 2009-09-21 15:44:36.270928-04 2009-09-21 5590 144 S/O TERMINAL 1A \N 11.46 Check deposit for terminal TERMINAL 1A 5707 t RS f jsmith f 11306 f 2009-09-21 15:46:11.836465-04 2009-09-21 5592 143 S/O TERMINAL 1A \N 11.47 Close terminal TERMINAL 1A 5708 t MR f jsmith f 11307 f 2009-09-21 16:57:42.627442-04 2009-09-21 5594 95 S/R 20071 3783 1000.00 Receive Inventory from P/O for Packaging Pros LTD 5709 t PO f admin f 11308 f 2009-09-21 16:57:42.627442-04 2009-09-21 5594 138 S/R 20071 3783 -1000.00 Receive Inventory from P/O for Packaging Pros LTD 5709 t PO f admin f 11310 f 2009-09-21 16:58:18.356578-04 2009-09-21 5595 86 W/O 10064-1 3784 -1375.00 Material TINSERT1 Issue to Work Order 5711 t WO f admin f 11315 f 2009-09-21 16:58:18.356578-04 2009-09-21 5598 94 W/O 10064-1 -1 550.00 \N 5714 t WO f admin f 11317 f 2009-09-21 16:58:18.356578-04 2009-09-21 5599 86 W/O 10064-1 3786 4105.00 Receive Inventory TSUB1 from Manufacturing 5715 t WO f admin f 11318 f 2009-09-21 16:58:18.356578-04 2009-09-21 5599 138 W/O 10064-1 3786 -4105.00 Receive Inventory TSUB1 from Manufacturing 5715 t WO f admin f 11319 f 2009-09-21 16:58:22.741897-04 2009-09-21 5600 86 W/O 10064-1 -1 -1178.90 Manufacturing Inventory Cost Variance for TSUB1 5716 t WO f admin f 11320 f 2009-09-21 16:58:22.741897-04 2009-09-21 5600 87 W/O 10064-1 -1 1178.90 Manufacturing Inventory Cost Variance for TSUB1 5716 t WO f admin f 11322 f 2009-09-21 16:58:32.138356-04 2009-09-21 5601 86 W/O 50196-1 3787 -40.00 Material YPAINT1 Issue to Work Order 5718 t WO f admin f 11321 f 2009-09-21 16:58:32.138356-04 2009-09-21 5601 138 W/O 50196-1 3787 40.00 Material YPAINT1 Issue to Work Order 5718 t WO f admin f 11324 f 2009-09-21 16:58:32.138356-04 2009-09-21 5602 86 W/O 50196-1 3788 -5000.00 Material TBODY1 Issue to Work Order 5719 t WO f admin f 11323 f 2009-09-21 16:58:32.138356-04 2009-09-21 5602 138 W/O 50196-1 3788 5000.00 Material TBODY1 Issue to Work Order 5719 t WO f admin f 11326 f 2009-09-21 16:58:32.138356-04 2009-09-21 5603 86 W/O 50196-1 3789 -4105.00 Material TSUB1 Issue to Work Order 5720 t WO f admin f 11325 f 2009-09-21 16:58:32.138356-04 2009-09-21 5603 138 W/O 50196-1 3789 4105.00 Material TSUB1 Issue to Work Order 5720 t WO f admin f 11328 f 2009-09-21 16:58:32.138356-04 2009-09-21 5604 86 W/O 50196-1 3790 -2000.00 Material TWHEEL1 Issue to Work Order 5721 t WO f admin f 11327 f 2009-09-21 16:58:32.138356-04 2009-09-21 5604 138 W/O 50196-1 3790 2000.00 Material TWHEEL1 Issue to Work Order 5721 t WO f admin f 8158 f 2006-02-01 08:34:02.132-05 2006-02-01 4117 86 W/O 50150-1 -1 -1.10 Post Setup Time to Work Order 3429 t WO f jsmith f 8157 f 2006-02-01 08:34:02.132-05 2006-02-01 4117 94 W/O 50150-1 -1 1.10 Post Setup Time to Work Order 3429 t WO f jsmith f 8160 f 2006-02-01 08:34:02.132-05 2006-02-01 4118 86 W/O 50150-1 -1 -11.00 Post Run Time to Work Order 3430 t WO f jsmith f 8159 f 2006-02-01 08:34:02.132-05 2006-02-01 4118 94 W/O 50150-1 -1 11.00 Post Run Time to Work Order 3430 t WO f jsmith f 8162 f 2006-02-01 08:34:02.132-05 2006-02-01 4119 86 W/O 50150-1 -1 -1.10 Post Setup Time to Work Order 3431 t WO f jsmith f 8161 f 2006-02-01 08:34:02.132-05 2006-02-01 4119 94 W/O 50150-1 -1 1.10 Post Setup Time to Work Order 3431 t WO f jsmith f 8164 f 2006-02-01 08:34:02.132-05 2006-02-01 4120 86 W/O 50150-1 -1 -11.00 Post Run Time to Work Order 3432 t WO f jsmith f 8163 f 2006-02-01 08:34:02.132-05 2006-02-01 4120 94 W/O 50150-1 -1 11.00 Post Run Time to Work Order 3432 t WO f jsmith f 8166 f 2006-02-01 08:34:02.132-05 2006-02-01 4121 86 W/O 50150-1 -1 -0.88 Post Setup Time to Work Order 3433 t WO f jsmith f 8165 f 2006-02-01 08:34:02.132-05 2006-02-01 4121 94 W/O 50150-1 -1 0.88 Post Setup Time to Work Order 3433 t WO f jsmith f 8168 f 2006-02-01 08:34:02.132-05 2006-02-01 4122 86 W/O 50150-1 -1 -8.80 Post Run Time to Work Order 3434 t WO f jsmith f 8167 f 2006-02-01 08:34:02.132-05 2006-02-01 4122 94 W/O 50150-1 -1 8.80 Post Run Time to Work Order 3434 t WO f jsmith f 8170 f 2006-02-01 09:26:49.877-05 2006-02-01 4123 96 S/R 50150-1 3095 -246.18 Issue to Shipping 3437 t SO f jsmith f 8169 f 2006-02-01 09:26:49.877-05 2006-02-01 4123 85 S/R 50150-1 3095 246.18 Issue to Shipping 3437 t SO f jsmith f 8172 f 2006-02-01 09:32:41.713-05 2006-02-01 4124 108 S/R 50150 -1 -246.18 Ship Shipment 3438 t SO f jsmith f 8171 f 2006-02-01 09:32:41.713-05 2006-02-01 4124 96 S/R 50150 -1 246.18 Ship Shipment 3438 t SO f jsmith f 8176 f 2006-02-01 10:27:05.906-05 2006-02-01 4125 106 A/R 60024 \N -1034.50 3439 t IN f jsmith f 8175 f 2006-02-01 10:27:05.906-05 2006-02-01 4125 102 A/R 60024 \N 47.50 3439 t IN f jsmith f 8174 f 2006-02-01 10:27:05.906-05 2006-02-01 4125 105 A/R 60024 \N 37.00 3439 t IN f jsmith f 8173 f 2006-02-01 10:27:05.906-05 2006-02-01 4125 103 A/R 60024 \N 950.00 3439 t IN f jsmith f 8178 f 2006-02-01 10:43:08.4-05 2006-02-01 4126 109 A/R C-12031 \N -1034.50 TTOYS-Tremendous Toys Incorporated 3440 t CR t jsmith f 8177 f 2006-02-01 10:43:08.4-05 2006-02-01 4126 106 A/R I-60024 \N 1034.50 TTOYS-Tremendous Toys Incorporated 3440 t CR f jsmith f 8194 f 2006-06-23 16:15:36.453-04 2006-06-02 4131 108 G/L Ship Order \N -15000.00 3445 t ST f jsmith f 8196 f 2006-06-23 16:15:36.453-04 2006-06-02 4131 109 G/L Ship Order \N -100000.00 3445 t ST t jsmith f 8193 f 2006-06-23 16:15:36.453-04 2006-06-02 4131 85 G/L Ship Order \N 15000.00 3445 t ST f jsmith f 8195 f 2006-06-23 16:15:36.453-04 2006-06-02 4131 103 G/L Ship Order \N 100000.00 3445 t ST f jsmith f 8254 f 2006-07-05 09:37:19.723-04 2006-06-28 4158 108 G/L Ship Order \N -200000.00 3477 t ST f jsmith f 8253 f 2006-07-05 09:37:19.723-04 2006-06-28 4158 109 G/L Ship Order \N -300000.00 3477 t ST t jsmith f 8255 f 2006-07-05 09:37:19.723-04 2006-06-28 4158 85 G/L Ship Order \N 200000.00 3477 t ST f jsmith f 8252 f 2006-07-05 09:37:19.723-04 2006-06-28 4158 103 G/L Ship Order \N 300000.00 3477 t ST f jsmith f 8256 f 2006-07-05 09:38:51.66-04 2006-06-28 4159 109 G/L MA-0101 -1 3000.00 MA- Adjust 3478 t JE t jsmith f 8257 f 2006-07-05 09:38:51.66-04 2006-06-28 4159 85 G/L MA-0101 -1 -3000.00 MA- Adjust 3478 t JE f jsmith f 8258 f 2006-07-05 09:40:11.113-04 2006-06-28 4160 109 G/L MA-ADJ3 -1 300000.00 MA-Adjust 3 3479 t JE t jsmith f 8259 f 2006-07-05 09:40:11.113-04 2006-06-28 4160 85 G/L MA-ADJ3 -1 -300000.00 MA-Adjust 3 3479 t JE f jsmith f 8311 f 2006-08-30 16:40:15.316-04 2006-07-29 4184 108 G/L Ship Order \N -150000.00 3508 t ST f jsmith f 8312 f 2006-08-30 16:40:15.316-04 2006-07-29 4184 109 G/L Ship Order \N -451000.00 3508 t ST t jsmith f 8309 f 2006-08-30 16:40:15.316-04 2006-07-29 4184 85 G/L Ship Order \N 150000.00 3508 t ST f jsmith f 8310 f 2006-08-30 16:40:15.316-04 2006-07-29 4184 103 G/L Ship Order \N 451000.00 3508 t ST f jsmith f 8317 f 2006-08-30 16:42:12.863-04 2006-07-28 4186 109 G/L \N 250000.00 MDA 3510 t JE t jsmith f 8318 f 2006-08-30 16:42:12.863-04 2006-07-28 4186 85 G/L \N -250000.00 MDA 3510 t JE f jsmith f 11330 f 2009-09-21 16:58:32.138356-04 2009-09-21 5605 86 W/O 50196-1 -1 -1.10 \N 5722 t WO f admin f 11329 f 2009-09-21 16:58:32.138356-04 2009-09-21 5605 94 W/O 50196-1 -1 1.10 \N 5722 t WO f admin f 11332 f 2009-09-21 16:58:32.138356-04 2009-09-21 5606 86 W/O 50196-1 -1 -1100.00 \N 5723 t WO f admin f 7737 f 2006-01-12 10:10:04.152256-05 2006-02-02 3925 108 G/L Ship Order \N -1000.00 3147 t ST f jsmith f 7735 f 2006-01-12 10:10:04.152256-05 2006-02-02 3925 109 G/L Ship Order \N -2000.00 3147 t ST t jsmith f 7734 f 2006-01-12 10:10:04.152256-05 2006-02-02 3925 85 G/L Ship Order \N 1000.00 3147 t ST f jsmith f 7736 f 2006-01-12 10:10:04.152256-05 2006-02-02 3925 103 G/L Ship Order \N 2000.00 3147 t ST f jsmith f 8138 f 2006-02-01 08:16:05.143-05 2006-02-01 4107 86 W/O 10013-1 3087 -27.50 Material Issue to Work Order 3417 t WO f jsmith f 8137 f 2006-02-01 08:16:05.143-05 2006-02-01 4107 85 W/O 10013-1 3087 27.50 Material Issue to Work Order 3417 t WO f jsmith f 8140 f 2006-02-01 08:16:05.143-05 2006-02-01 4108 86 W/O 10013-1 3088 -47.00 Material Issue to Work Order 3418 t WO f jsmith f 8139 f 2006-02-01 08:16:05.143-05 2006-02-01 4108 85 W/O 10013-1 3088 47.00 Material Issue to Work Order 3418 t WO f jsmith f 8141 f 2006-02-01 08:23:10.344-05 2006-02-01 4109 86 W/O 10013-1 3089 86.60 Receive Inventory from Manufacturing 3419 t WO f jsmith f 8142 f 2006-02-01 08:23:10.344-05 2006-02-01 4109 85 W/O 10013-1 3089 -86.60 Receive Inventory from Manufacturing 3419 t WO f jsmith f 8144 f 2006-02-01 08:23:10.344-05 2006-02-01 4110 86 W/O 10013-1 -1 -1.10 Post Setup Time to Work Order 3420 t WO f jsmith f 8143 f 2006-02-01 08:23:10.344-05 2006-02-01 4110 94 W/O 10013-1 -1 1.10 Post Setup Time to Work Order 3420 t WO f jsmith f 8146 f 2006-02-01 08:23:10.344-05 2006-02-01 4111 86 W/O 10013-1 -1 -11.00 Post Run Time to Work Order 3421 t WO f jsmith f 8145 f 2006-02-01 08:23:10.344-05 2006-02-01 4111 94 W/O 10013-1 -1 11.00 Post Run Time to Work Order 3421 t WO f jsmith f 8147 f 2006-02-01 08:34:02.132-05 2006-02-01 4112 86 W/O 50150-1 3090 246.18 Receive Inventory from Manufacturing 3424 t WO f jsmith f 8148 f 2006-02-01 08:34:02.132-05 2006-02-01 4112 85 W/O 50150-1 3090 -246.18 Receive Inventory from Manufacturing 3424 t WO f jsmith f 8150 f 2006-02-01 08:34:02.132-05 2006-02-01 4113 86 W/O 50150-1 3091 -86.60 Material Issue to Work Order 3425 t WO f jsmith f 8184 f 2006-06-23 16:12:56.828-04 2006-03-02 4128 108 G/L Ship Order \N -15000.00 3442 t ST f jsmith f 8181 f 2006-06-23 16:12:56.828-04 2006-03-02 4128 109 G/L Ship Order \N -50000.00 3442 t ST t jsmith f 8183 f 2006-06-23 16:12:56.828-04 2006-03-02 4128 85 G/L Ship Order \N 15000.00 3442 t ST f jsmith f 8182 f 2006-06-23 16:12:56.828-04 2006-03-02 4128 103 G/L Ship Order \N 50000.00 3442 t ST f jsmith f 8186 f 2006-06-23 16:13:28.234-04 2006-04-02 4129 108 G/L Ship Order \N -15000.00 3443 t ST f jsmith f 8188 f 2006-06-23 16:13:28.234-04 2006-04-02 4129 109 G/L Ship Order \N -55000.00 3443 t ST t jsmith f 8185 f 2006-06-23 16:13:28.234-04 2006-04-02 4129 85 G/L Ship Order \N 15000.00 3443 t ST f jsmith f 8187 f 2006-06-23 16:13:28.234-04 2006-04-02 4129 103 G/L Ship Order \N 55000.00 3443 t ST f jsmith f 8190 f 2006-06-23 16:14:17.625-04 2006-05-02 4130 108 G/L Ship Order \N -15000.00 3444 t ST f jsmith f 8192 f 2006-06-23 16:14:17.625-04 2006-05-02 4130 109 G/L Ship Order \N -75000.00 3444 t ST t jsmith f 8189 f 2006-06-23 16:14:17.625-04 2006-05-02 4130 85 G/L Ship Order \N 15000.00 3444 t ST f jsmith f 8191 f 2006-06-23 16:14:17.625-04 2006-05-02 4130 103 G/L Ship Order \N 75000.00 3444 t ST f jsmith f 8197 f 2006-06-23 16:16:31.531-04 2006-05-03 4132 109 G/L -1 50000.00 Special 2 3446 t JE t jsmith f 8198 f 2006-06-23 16:16:31.531-04 2006-05-03 4132 85 G/L -1 -50000.00 Special 2 3446 t JE f jsmith f 11331 f 2009-09-21 16:58:32.138356-04 2009-09-21 5606 94 W/O 50196-1 -1 1100.00 \N 5723 t WO f admin f 11334 f 2009-09-21 16:58:32.138356-04 2009-09-21 5607 86 W/O 50196-1 -1 -2.20 \N 5724 t WO f admin f 11333 f 2009-09-21 16:58:32.138356-04 2009-09-21 5607 94 W/O 50196-1 -1 2.20 \N 5724 t WO f admin f 11336 f 2009-09-21 16:58:32.138356-04 2009-09-21 5608 86 W/O 50196-1 -1 -275.00 \N 5725 t WO f admin f 11335 f 2009-09-21 16:58:32.138356-04 2009-09-21 5608 94 W/O 50196-1 -1 275.00 \N 5725 t WO f admin f 11338 f 2009-09-21 16:58:32.138356-04 2009-09-21 5609 86 W/O 50196-1 -1 -0.44 \N 5726 t WO f admin f 11337 f 2009-09-21 16:58:32.138356-04 2009-09-21 5609 94 W/O 50196-1 -1 0.44 \N 5726 t WO f admin f 11340 f 2009-09-21 16:58:32.138356-04 2009-09-21 5610 86 W/O 50196-1 -1 -110.00 \N 5727 t WO f admin f 11339 f 2009-09-21 16:58:32.138356-04 2009-09-21 5610 94 W/O 50196-1 -1 110.00 \N 5727 t WO f admin f 11341 f 2009-09-21 16:58:32.138356-04 2009-09-21 5611 86 W/O 50196-1 3791 12817.00 Receive Inventory YTRUCK1 from Manufacturing 5728 t WO f admin f 11342 f 2009-09-21 16:58:32.138356-04 2009-09-21 5611 85 W/O 50196-1 3791 -12817.00 Receive Inventory YTRUCK1 from Manufacturing 5728 t WO f admin f 11343 f 2009-09-21 16:58:44.427418-04 2009-09-21 5612 86 W/O 50196-1 -1 -183.26 Manufacturing Inventory Cost Variance for YTRUCK1 5729 t WO f admin f 11344 f 2009-09-21 16:58:44.427418-04 2009-09-21 5612 87 W/O 50196-1 -1 183.26 Manufacturing Inventory Cost Variance for YTRUCK1 5729 t WO f admin f 11347 f 2009-09-21 17:02:23.925141-04 2009-09-21 5613 90 A/P 30075 \N -30.00 TPARTS-Toy Parts Inc. 5731 t VO f admin f 11345 f 2009-09-21 17:02:23.925141-04 2009-09-21 5613 99 A/P 30075 \N 150.00 TPARTS-Toy Parts Inc. 5731 t VO f admin f 11346 f 2009-09-21 17:02:23.925141-04 2009-09-21 5613 95 A/P 30075 \N -120.00 TPARTS-Toy Parts Inc. 5731 t VO f admin f 11350 f 2009-09-21 17:02:24.292967-04 2009-09-21 5614 90 A/P 30076 \N -54.00 WCHEM-World Chem, Inc. 5731 t VO f admin f 11348 f 2009-09-21 17:02:24.292967-04 2009-09-21 5614 99 A/P 30076 \N 294.00 WCHEM-World Chem, Inc. 5731 t VO f admin f 11349 f 2009-09-21 17:02:24.292967-04 2009-09-21 5614 95 A/P 30076 \N -240.00 WCHEM-World Chem, Inc. 5731 t VO f admin f 8199 f 2006-07-05 09:03:55.488-04 2006-07-05 4133 95 S/R 20021 3096 47.00 Receive Inventory from P/O 3447 t PO f jsmith f 8200 f 2006-07-05 09:03:55.488-04 2006-07-05 4133 85 S/R 20021 3096 -47.00 Receive Inventory from P/O 3447 t PO f jsmith f 11353 f 2009-09-21 17:02:24.799938-04 2009-09-21 5615 90 A/P 30077 \N -3.50 WCHEM-World Chem, Inc. 5731 t VO f admin f 11351 f 2009-09-21 17:02:24.799938-04 2009-09-21 5615 99 A/P 30077 \N 19.50 WCHEM-World Chem, Inc. 5731 t VO f admin f 11352 f 2009-09-21 17:02:24.799938-04 2009-09-21 5615 95 A/P 30077 \N -16.00 WCHEM-World Chem, Inc. 5731 t VO f admin f 11356 f 2009-09-21 17:02:25.027666-04 2009-09-21 5616 90 A/P 30078 \N -500.10 XPPI-Packaging Pros LTD 5731 t VO f admin f 11354 f 2009-09-21 17:02:25.027666-04 2009-09-21 5616 99 A/P 30078 \N 1500.10 XPPI-Packaging Pros LTD 5731 t VO f admin f 11355 f 2009-09-21 17:02:25.027666-04 2009-09-21 5616 95 A/P 30078 \N -1000.00 XPPI-Packaging Pros LTD 5731 t VO f admin f 11358 f 2009-09-21 17:09:53.966125-04 2009-09-21 5617 126 A/P 5013 182 1500.10 XPPI-Packaging Pros LTD 5736 t CK f admin f 11357 f 2009-09-21 17:09:53.966125-04 2009-09-21 5617 99 A/P 5013 182 -1500.10 XPPI-Packaging Pros LTD 5736 t CK f admin f 11360 f 2009-09-21 17:10:05.68371-04 2009-09-21 5618 96 S/R 50196-1 3792 -12817.00 Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD 5737 t SO f admin f 11359 f 2009-09-21 17:10:05.68371-04 2009-09-21 5618 85 S/R 50196-1 3792 12817.00 Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD 5737 t SO f admin f 11362 f 2009-09-21 17:10:16.913459-04 2009-09-21 5619 108 S/R 60049 -1 -12817.00 Ship Shipment to Customer Xtreme Toys LTD 5738 t SH f admin f 11361 f 2009-09-21 17:10:16.913459-04 2009-09-21 5619 96 S/R 60049 -1 12817.00 Ship Shipment to Customer Xtreme Toys LTD 5738 t SH f admin f 11363 f 2009-09-21 17:10:30.306899-04 2009-09-21 5620 122 A/R 60082 \N 18750.01 Xtreme Toys LTD 5739 t IN f admin f 11365 f 2009-09-21 17:10:30.306899-04 2009-09-21 5620 106 A/R 60082 \N -70402.84 Xtreme Toys LTD 5739 t IN f admin f 11364 f 2009-09-21 17:10:30.306899-04 2009-09-21 5620 141 A/R 60082 \N 51652.83 Xtreme Toys LTD 5739 t IN f admin f 11367 f 2009-09-21 17:11:58.337968-04 2009-09-21 5621 127 A/R C-1231123 \N -70402.84 XTRM-Xtreme Toys LTD 5740 t CR f admin f 11366 f 2009-09-21 17:11:58.337968-04 2009-09-21 5621 106 A/R I-60082 \N 70402.84 XTRM-Xtreme Toys LTD 5740 t CR f admin f 11368 f 2009-09-22 08:14:21.175107-04 2009-09-22 5622 95 S/R 20072 3793 0.80 Receive Inventory from P/O for World Chem, Inc. 5741 t PO f admin f 11370 f 2009-09-22 08:14:21.805394-04 2009-09-22 5623 95 S/R 20072 3794 0.80 Receive Inventory from P/O for World Chem, Inc. 5743 t PO f admin f 11371 f 2009-09-22 08:14:21.805394-04 2009-09-22 5623 138 S/R 20072 3794 -0.80 Receive Inventory from P/O for World Chem, Inc. 5743 t PO f admin f 11372 f 2009-09-22 08:18:51.419203-04 2009-09-22 5624 95 S/R 20072 3795 0.80 Receive Inventory from P/O for World Chem, Inc. 5745 t PO f admin f 11373 f 2009-09-22 08:18:51.419203-04 2009-09-22 5624 138 S/R 20072 3795 -0.80 Receive Inventory from P/O for World Chem, Inc. 5745 t PO f admin f 11374 f 2009-09-22 08:18:51.774134-04 2009-09-22 5625 95 S/R 20072 3796 0.80 Receive Inventory from P/O for World Chem, Inc. 5747 t PO f admin f 11375 f 2009-09-22 08:18:51.774134-04 2009-09-22 5625 138 S/R 20072 3796 -0.80 Receive Inventory from P/O for World Chem, Inc. 5747 t PO f admin f 11376 f 2009-09-22 08:25:26.741647-04 2009-09-22 5626 95 S/R 20072 3797 8.00 Receive Inventory from P/O for World Chem, Inc. 5749 t PO f admin f 11377 f 2009-09-22 08:25:26.741647-04 2009-09-22 5626 138 S/R 20072 3797 -8.00 Receive Inventory from P/O for World Chem, Inc. 5749 t PO f admin f 11378 f 2009-09-22 08:25:27.072249-04 2009-09-22 5627 95 S/R 20072 3798 8.00 Receive Inventory from P/O for World Chem, Inc. 5751 t PO f admin f 11379 f 2009-09-22 08:25:27.072249-04 2009-09-22 5627 138 S/R 20072 3798 -8.00 Receive Inventory from P/O for World Chem, Inc. 5751 t PO f admin f 11381 f 2009-09-22 08:36:31.412804-04 2009-09-21 5628 127 A/R C-1231123 \N 70402.84 Reverse Cash Receipt posting for XTRM-Xtreme Toys LTD 5753 t CR f admin f 11380 f 2009-09-22 08:36:31.412804-04 2009-09-21 5628 106 A/R I-60082 \N -70402.84 Reverse Cash Receipt posting for XTRM-Xtreme Toys LTD 5753 t CR f admin f 11383 f 2009-09-22 08:45:21.882188-04 2009-09-21 5629 127 A/R C-1231123 \N -70402.84 XTRM-Xtreme Toys LTD 5754 t CR f admin f 11382 f 2009-09-22 08:45:21.882188-04 2009-09-21 5629 106 A/R I-60082 \N 70402.84 XTRM-Xtreme Toys LTD 5754 t CR f admin f 11386 f 2009-09-22 08:54:40.416059-04 2009-09-22 5630 123 A/R Unapplied from C-32334 \N 10000.00 TTOYS-Tremendous Toys Incorporated 5755 t CR f admin f 11384 f 2009-09-22 08:54:40.416059-04 2009-09-22 5631 133 A/R 20017 394 10000.00 Unapplied from C-32334 5755 t CD f admin f 11385 f 2009-09-22 08:54:40.416059-04 2009-09-22 5631 123 A/R 20017 394 -10000.00 Unapplied from C-32334 5755 t CD f admin f 11391 f 2009-09-22 08:55:58.678979-04 2009-09-22 5632 123 A/R Unapplied from C-43234 \N 5000.00 TTOYS-Tremendous Toys Incorporated 5756 t CR f admin f 11388 f 2009-09-22 08:55:58.678979-04 2009-09-22 5633 106 A/R 20018 395 5000.00 Tremendous Toys Incorporated Unapplied from C-43234 5756 t CM f admin f 11389 f 2009-09-22 08:55:58.678979-04 2009-09-22 5633 123 A/R 20018 395 -5000.00 Tremendous Toys Incorporated Unapplied from C-43234 5756 t CM f admin f 11392 f 2009-09-22 09:11:48.834521-04 2009-09-22 5634 106 A/R 60083 \N -10000.00 Tremendous Toys Incorporated 5757 t IN f admin f 11393 f 2009-09-22 09:11:48.834521-04 2009-09-22 5634 140 A/R 60083 \N 10000.00 Tremendous Toys Incorporated 5757 t IN f admin f 11397 f 2009-09-22 09:12:48.363874-04 2009-09-22 5635 106 A/R I-60083 \N 10000.00 TTOYS-Tremendous Toys Incorporated 5758 t CR f admin f 11398 f 2009-09-22 09:12:48.363874-04 2009-09-22 5635 123 A/R Unapplied from C-32422 \N 2500.00 TTOYS-Tremendous Toys Incorporated 5758 t CR f admin f 11394 f 2009-09-22 09:12:48.363874-04 2009-09-22 5636 106 A/R 20019 397 2500.00 Tremendous Toys Incorporated Unapplied from C-32422 5758 t CM f admin f 11395 f 2009-09-22 09:12:48.363874-04 2009-09-22 5636 123 A/R 20019 397 -2500.00 Tremendous Toys Incorporated Unapplied from C-32422 5758 t CM f admin f 11402 f 2009-09-22 09:14:15.809075-04 2009-09-22 5637 106 A/R I-60083 \N -10000.00 Reverse Cash Receipt posting for TTOYS-Tremendous Toys Incorporated 5759 t CR f admin f 11403 f 2009-09-22 09:14:15.809075-04 2009-09-22 5637 123 A/R Unapplied from C-32422 \N -2500.00 Reverse Cash Receipt posting for TTOYS-Tremendous Toys Incorporated 5759 t CR f admin f 11399 f 2009-09-22 09:14:15.809075-04 2009-09-22 5638 106 A/R 20020 \N -2500.00 Tremendous Toys Incorporated Unapplied from C-32422 5759 t DM f admin f 11400 f 2009-09-22 09:14:15.809075-04 2009-09-22 5638 123 A/R 20020 \N 2500.00 Tremendous Toys Incorporated Unapplied from C-32422 5759 t DM f admin f 11405 f 2009-09-22 09:16:32.095767-04 2009-09-22 5639 106 A/R I-60083 \N 10000.00 TTOYS-Tremendous Toys Incorporated 5760 t CR f admin f 11406 f 2009-09-22 09:16:32.095767-04 2009-09-22 5639 106 A/R D-20020 \N 2500.00 TTOYS-Tremendous Toys Incorporated 5760 t CR f admin f 11407 f 2009-09-22 10:30:13.635685-04 2009-09-22 5640 95 S/R 20072 3799 31.20 Receive Inventory from P/O for World Chem, Inc. 5761 t PO f jsmith f 11408 f 2009-09-22 10:30:13.635685-04 2009-09-22 5640 138 S/R 20072 3799 -31.20 Receive Inventory from P/O for World Chem, Inc. 5761 t PO f jsmith f 11409 f 2009-09-22 10:30:14.126116-04 2009-09-22 5641 95 S/R 20072 3800 31.20 Receive Inventory from P/O for World Chem, Inc. 5763 t PO f jsmith f 11410 f 2009-09-22 10:30:14.126116-04 2009-09-22 5641 138 S/R 20072 3800 -31.20 Receive Inventory from P/O for World Chem, Inc. 5763 t PO f jsmith f 11411 f 2009-09-22 10:30:14.448509-04 2009-09-22 5642 95 S/R 20072 3801 39.20 Receive Inventory from P/O for World Chem, Inc. 5765 t PO f jsmith f 11412 f 2009-09-22 10:30:14.448509-04 2009-09-22 5642 138 S/R 20072 3801 -39.20 Receive Inventory from P/O for World Chem, Inc. 5765 t PO f jsmith f 11413 f 2009-09-22 10:30:14.790954-04 2009-09-22 5643 95 S/R 20072 3802 39.20 Receive Inventory from P/O for World Chem, Inc. 5767 t PO f jsmith f 11414 f 2009-09-22 10:30:14.790954-04 2009-09-22 5643 138 S/R 20072 3802 -39.20 Receive Inventory from P/O for World Chem, Inc. 5767 t PO f jsmith f 11415 f 2009-09-22 11:04:10.626332-04 2009-09-22 5644 106 A/R 60084 \N -45000.00 Tremendous Toys Incorporated 5769 t IN f jsmith f 11416 f 2009-09-22 11:04:10.626332-04 2009-09-22 5644 140 A/R 60084 \N 45000.00 Tremendous Toys Incorporated 5769 t IN f jsmith f 11418 f 2009-09-22 11:04:50.91252-04 2009-09-22 5645 133 A/R R -1 -10000.00 20017 5770 t CD f jsmith f 11417 f 2009-09-22 11:04:50.91252-04 2009-09-22 5645 106 A/R R -1 10000.00 20017 5770 t CD f jsmith f 11419 f 2009-09-22 11:05:21.930612-04 2009-09-22 5646 106 A/R I-60084 \N 27500.00 TTOYS-Tremendous Toys Incorporated 5771 t CR f jsmith f 11423 f 2009-09-22 11:06:16.58104-04 2009-09-22 5647 90 A/P 30079 \N -537.00 WCHEM-World Chem, Inc. 5772 t VO f jsmith f 11421 f 2009-09-22 11:06:16.58104-04 2009-09-22 5647 99 A/P 30079 \N 797.00 WCHEM-World Chem, Inc. 5772 t VO f jsmith f 11422 f 2009-09-22 11:06:16.58104-04 2009-09-22 5647 95 A/P 30079 \N -160.00 WCHEM-World Chem, Inc. 5772 t VO f jsmith f 11424 f 2009-09-22 11:06:16.58104-04 2009-09-22 5647 139 A/P 30079 \N -100.00 WCHEM-World Chem, Inc. 5772 t VO f jsmith f 11425 f 2009-09-23 08:03:50.074838-04 2009-09-23 5648 143 S/O TERMINAL 1A \N -100.00 Open posting for terminal TERMINAL 1A 5774 t MR f jsmith f 11428 f 2009-09-23 09:08:41.256921-04 2009-09-23 5649 143 S/O TERMINAL 1B \N -1000.00 Open posting for terminal TERMINAL 1B 5775 t MR f admin f 11430 f 2009-09-23 09:12:09.827633-04 2009-09-23 5651 143 S/O TERMINAL 1B \N 1000.00 Close terminal TERMINAL 1B 5776 t MR f admin f 11432 f 2009-09-23 09:17:49.668275-04 2009-09-23 5653 146 S/O 100012 3803 2.57 Item Sale: BTRUCK1 5777 t RS f jsmith f 11431 f 2009-09-23 09:17:49.668275-04 2009-09-23 5653 148 S/O 100012 3803 -2.57 Item Sale: BTRUCK1 5777 t RS f jsmith f 11434 f 2009-09-23 09:18:56.487349-04 2009-09-23 5654 146 S/O 100013 3804 2.57 Item Sale: RTRUCK1 5778 t RS f jsmith f 11433 f 2009-09-23 09:18:56.487349-04 2009-09-23 5654 148 S/O 100013 3804 -2.57 Item Sale: RTRUCK1 5778 t RS f jsmith f 11440 f 2009-09-23 09:20:06.733057-04 2009-09-23 5655 142 S/O TERMINAL 1A \N 21.98 Sales posting for terminal TERMINAL 1A 5779 t RS f jsmith f 11438 f 2009-09-23 09:20:06.733057-04 2009-09-23 5655 143 S/O TERMINAL 1A \N -12.06 Sales posting for terminal TERMINAL 1A 5779 t RS f jsmith f 11439 f 2009-09-23 09:20:06.733057-04 2009-09-23 5655 144 S/O TERMINAL 1A \N -12.06 Sales posting for terminal TERMINAL 1A 5779 t RS f jsmith f 11442 f 2009-09-23 09:20:06.733057-04 2009-09-23 5656 143 S/O TERMINAL 1A \N 112.06 Close terminal TERMINAL 1A 5779 t MR f jsmith f 11436 f 2009-09-23 09:20:06.733057-04 2009-09-23 5657 144 S/O TERMINAL 1A \N 12.06 Check deposit for terminal TERMINAL 1A 5779 t RS f jsmith f 11480 f 2009-09-25 08:59:06.340805-04 2009-09-25 5677 100 A/P 39000 \N 100.00 Toy Parts Inc. Damaged Shipment 5801 t CM f jsmith f 11443 f 2009-09-23 09:27:39.106284-04 2009-09-23 5658 143 S/O TERMINAL 1A \N -100.00 Open posting for terminal TERMINAL 1A 5780 t MR f jsmith f 11445 f 2009-09-23 09:28:55.811473-04 2009-09-23 5660 109 S/O TERMINAL 1A \N -100.00 Close terminal TERMINAL 1A 5781 t MR t jsmith f 11446 f 2009-09-23 09:28:55.811473-04 2009-09-23 5660 143 S/O TERMINAL 1A \N 100.00 Close terminal TERMINAL 1A 5781 t MR f jsmith f 11448 f 2009-09-24 16:02:36.120522-04 2009-09-24 5662 111 S/R 20073 -1 -25000.00 Receive Non-Inventory from P/O for Toy Parts Inc. 5782 t PO f admin f 11447 f 2009-09-24 16:02:36.120522-04 2009-09-24 5662 95 S/R 20073 -1 25000.00 Receive Non-Inventory from P/O for Toy Parts Inc. 5782 t PO f admin f 11449 f 2009-09-24 16:09:07.408645-04 2009-09-24 5663 111 A/P 30080 \N -35000.00 WCHEM-World Chem, Inc. ColorCraft Paint Center 5784 t VO f admin f 11451 f 2009-09-24 16:09:07.408645-04 2009-09-24 5663 99 A/P 30080 \N 35500.00 WCHEM-World Chem, Inc. ColorCraft Paint Center 5784 t VO f admin f 11450 f 2009-09-24 16:09:07.408645-04 2009-09-24 5663 139 A/P 30080 \N -500.00 WCHEM-World Chem, Inc. ColorCraft Paint Center 5784 t VO f admin f 11452 f 2009-09-24 16:09:07.678201-04 2009-09-24 5664 125 A/P 30081 \N -500.00 TPARTS-Toy Parts Inc. 5784 t VO f admin f 11453 f 2009-09-24 16:09:07.678201-04 2009-09-24 5664 99 A/P 30081 \N 25500.00 TPARTS-Toy Parts Inc. 5784 t VO f admin f 11454 f 2009-09-24 16:09:07.678201-04 2009-09-24 5664 95 A/P 30081 \N -25000.00 TPARTS-Toy Parts Inc. 5784 t VO f admin f 11458 f 2009-09-24 16:12:59.707149-04 2009-09-21 5665 109 A/P 4043 186 147.00 TPARTS-Toy Parts Inc. 5787 t CK t admin f 8364 f 2006-10-13 15:30:35.066-04 2006-10-13 4207 90 A/P 30022 \N -8.00 RF-001 3536 t VO f jsmith f 8393 f 2006-10-13 15:35:24.378-04 2006-10-13 4221 86 W/O 50155-1 -1 -1.10 Post Setup Time to Work Order 3552 t WO f jsmith f 8392 f 2006-10-13 15:35:24.378-04 2006-10-13 4221 94 W/O 50155-1 -1 1.10 Post Setup Time to Work Order 3552 t WO f jsmith f 8395 f 2006-10-13 15:35:24.378-04 2006-10-13 4222 86 W/O 50155-1 -1 -11.00 Post Run Time to Work Order 3553 t WO f jsmith f 8394 f 2006-10-13 15:35:24.378-04 2006-10-13 4222 94 W/O 50155-1 -1 11.00 Post Run Time to Work Order 3553 t WO f jsmith f 8397 f 2006-10-13 15:35:24.378-04 2006-10-13 4223 86 W/O 50155-1 -1 -1.10 Post Setup Time to Work Order 3554 t WO f jsmith f 8396 f 2006-10-13 15:35:24.378-04 2006-10-13 4223 94 W/O 50155-1 -1 1.10 Post Setup Time to Work Order 3554 t WO f jsmith f 8399 f 2006-10-13 15:35:24.378-04 2006-10-13 4224 86 W/O 50155-1 -1 -11.00 Post Run Time to Work Order 3555 t WO f jsmith f 8398 f 2006-10-13 15:35:24.378-04 2006-10-13 4224 94 W/O 50155-1 -1 11.00 Post Run Time to Work Order 3555 t WO f jsmith f 8401 f 2006-10-13 15:35:24.378-04 2006-10-13 4225 86 W/O 50155-1 -1 -0.88 Post Setup Time to Work Order 3556 t WO f jsmith f 8400 f 2006-10-13 15:35:24.378-04 2006-10-13 4225 94 W/O 50155-1 -1 0.88 Post Setup Time to Work Order 3556 t WO f jsmith f 8403 f 2006-10-13 15:35:24.378-04 2006-10-13 4226 86 W/O 50155-1 -1 -8.80 Post Run Time to Work Order 3557 t WO f jsmith f 8402 f 2006-10-13 15:35:24.378-04 2006-10-13 4226 94 W/O 50155-1 -1 8.80 Post Run Time to Work Order 3557 t WO f jsmith f 8405 f 2006-10-13 15:45:32.519-04 2006-10-13 4227 96 S/R 50155-1 3129 -638.18 Issue to Shipping 3560 t SO f jsmith f 8404 f 2006-10-13 15:45:32.519-04 2006-10-13 4227 85 S/R 50155-1 3129 638.18 Issue to Shipping 3560 t SO f jsmith f 8407 f 2006-10-13 15:50:55.378-04 2006-10-13 4228 108 S/R 50155 -1 -638.18 Ship Shipment 3561 t SO f jsmith f 8406 f 2006-10-13 15:50:55.378-04 2006-10-13 4228 96 S/R 50155 -1 638.18 Ship Shipment 3561 t SO f jsmith f 8409 f 2006-10-13 15:51:56.3-04 2006-10-13 4229 122 A/R 60028 \N 45.00 3562 t IN f jsmith f 8411 f 2006-10-13 15:51:56.3-04 2006-10-13 4229 106 A/R 60028 \N -1042.50 3562 t IN f jsmith f 8410 f 2006-10-13 15:51:56.3-04 2006-10-13 4229 121 A/R 60028 \N 47.50 3562 t IN f jsmith f 8408 f 2006-10-13 15:51:56.3-04 2006-10-13 4229 103 A/R 60028 \N 950.00 3562 t IN f jsmith f 8412 f 2006-10-13 15:59:46.191-04 2006-10-13 4230 106 A/R I-60028 \N 1042.50 TTOYS-Tremendous Toys Incorporated 3563 t CR f jsmith f 8414 f 2006-10-30 14:48:21.558-05 2006-10-30 4231 91 I/M STS-100 3137 2081.49 Miscellaneous Adjustment\n 3564 t f jsmith f 8415 f 2006-10-30 14:48:21.558-05 2006-10-30 4231 85 I/M STS-100 3137 -2081.49 Miscellaneous Adjustment\n 3564 t f jsmith f 8416 f 2006-10-30 14:49:43.933-05 2006-10-30 4232 91 I/M STS-200 3138 2081.49 Miscellaneous Adjustment\n 3565 t f jsmith f 8417 f 2006-10-30 14:49:43.933-05 2006-10-30 4232 85 I/M STS-200 3138 -2081.49 Miscellaneous Adjustment\n 3565 t f jsmith f 8418 f 2006-10-30 14:51:05.543-05 2006-10-30 4233 91 I/M STS-400 3139 -2558.33 Miscellaneous Adjustment\n 3566 t f jsmith f 8419 f 2006-10-30 14:51:05.543-05 2006-10-30 4233 85 I/M STS-400 3139 2558.33 Miscellaneous Adjustment\n 3566 t f jsmith f 8421 f 2006-10-30 14:51:37.887-05 2006-10-30 4234 85 I/M STS-500 3140 210.00 Miscellaneous Adjustment\n 3567 t f jsmith f 9111 f 2007-08-31 11:03:44.609-04 2007-08-31 4560 94 W/O 40006-1 -1 1.10 Post Setup Time to Work Order 3950 t WO f mfgadmin f 11457 f 2009-09-24 16:12:59.707149-04 2009-09-21 5665 99 A/P 4043 186 -147.00 TPARTS-Toy Parts Inc. 5787 t CK f admin f 11456 f 2009-09-24 16:12:59.707149-04 2009-09-24 5666 101 A/P 30075 \N 3.00 Discount for V 30075 5788 t DS f admin f 11455 f 2009-09-24 16:12:59.707149-04 2009-09-24 5666 99 A/P 30075 \N -3.00 Discount for V 30075 5788 t DS f admin f 11462 f 2009-09-24 16:12:59.707149-04 2009-09-24 5667 109 A/P 4044 189 25000.00 TPARTS-Toy Parts Inc. 5787 t CK t admin f 11461 f 2009-09-24 16:12:59.707149-04 2009-09-24 5667 99 A/P 4044 189 -25000.00 TPARTS-Toy Parts Inc. 5787 t CK f admin f 11460 f 2009-09-24 16:12:59.707149-04 2009-09-24 5668 101 A/P 30081 \N 500.00 Discount for V 30081 5790 t DS f admin f 11459 f 2009-09-24 16:12:59.707149-04 2009-09-24 5668 99 A/P 30081 \N -500.00 Discount for V 30081 5790 t DS f admin f 11466 f 2009-09-24 16:12:59.707149-04 2009-09-22 5669 109 A/P 4045 187 783.06 WCHEM-World Chem, Inc. 5787 t CK t admin f 11465 f 2009-09-24 16:12:59.707149-04 2009-09-22 5669 99 A/P 4045 187 -783.06 WCHEM-World Chem, Inc. 5787 t CK f admin f 11464 f 2009-09-24 16:12:59.707149-04 2009-09-24 5670 101 A/P 30079 \N 13.94 Discount for V 30079 5792 t DS f admin f 11463 f 2009-09-24 16:12:59.707149-04 2009-09-24 5670 99 A/P 30079 \N -13.94 Discount for V 30079 5792 t DS f admin f 11472 f 2009-09-24 16:12:59.707149-04 2009-09-21 5671 109 A/P 4046 188 307.23 WCHEM-World Chem, Inc. 5787 t CK t admin f 11471 f 2009-09-24 16:12:59.707149-04 2009-09-21 5671 99 A/P 4046 188 -307.23 WCHEM-World Chem, Inc. 5787 t CK f admin f 11468 f 2009-09-24 16:12:59.707149-04 2009-09-24 5672 101 A/P 30076 \N 5.88 Discount for V 30076 5794 t DS f admin f 11467 f 2009-09-24 16:12:59.707149-04 2009-09-24 5672 99 A/P 30076 \N -5.88 Discount for V 30076 5794 t DS f admin f 11470 f 2009-09-24 16:12:59.707149-04 2009-09-24 5673 101 A/P 30077 \N 0.39 Discount for V 30077 5796 t DS f admin f 11469 f 2009-09-24 16:12:59.707149-04 2009-09-24 5673 99 A/P 30077 \N -0.39 Discount for V 30077 5796 t DS f admin f 11475 f 2009-09-24 16:12:59.707149-04 2009-09-24 5674 109 A/P 4047 190 34800.00 WCHEM-World Chem, Inc. 5787 t CK t admin f 11476 f 2009-09-24 16:12:59.707149-04 2009-09-24 5674 99 A/P 4047 190 -34800.00 WCHEM-World Chem, Inc. 5787 t CK f admin f 11474 f 2009-09-24 16:12:59.707149-04 2009-09-24 5675 101 A/P 30080 \N 700.00 Discount for V 30080 5798 t DS f admin f 11473 f 2009-09-24 16:12:59.707149-04 2009-09-24 5675 99 A/P 30080 \N -700.00 Discount for V 30080 5798 t DS f admin f 11478 f 2009-09-24 16:25:54.415988-04 2009-09-24 5676 112 G/L Depreciation -1 -15000.00 Depreciation on Paint Center - SprayPro 100 SRN# 482772 5800 t JE f admin f 11477 f 2009-09-24 16:25:54.415988-04 2009-09-24 5676 156 G/L Depreciation -1 15000.00 Depreciation on Paint Center - SprayPro 100 SRN# 482772 5800 t JE f admin f 11479 f 2009-09-25 08:59:06.340805-04 2009-09-25 5677 99 A/P 39000 \N -100.00 Toy Parts Inc. Damaged Shipment 5801 t CM f jsmith f 11481 f 2009-09-25 09:03:29.861828-04 2009-09-25 5678 87 P/D Post Cost 335 3.84 Post Actual Cost to Standard for item BTRUCK1 5811 t f jsmith f 11482 f 2009-09-25 09:03:29.861828-04 2009-09-25 5678 146 P/D Post Cost 335 -3.84 Post Actual Cost to Standard for item BTRUCK1 5811 t f jsmith f 11483 f 2009-09-25 09:03:29.861828-04 2009-09-25 5679 87 P/D Post Cost 341 1.05 Post Actual Cost to Standard for item BTRUCK1 5812 t f jsmith f 11484 f 2009-09-25 09:03:29.861828-04 2009-09-25 5679 146 P/D Post Cost 341 -1.05 Post Actual Cost to Standard for item BTRUCK1 5812 t f jsmith f 11485 f 2009-09-25 09:03:29.861828-04 2009-09-25 5680 87 P/D Post Cost 366 5.52 Post Actual Cost to Standard for item BTRUCK1 5813 t f jsmith f 11486 f 2009-09-25 09:03:29.861828-04 2009-09-25 5680 128 P/D Post Cost 366 -5.52 Post Actual Cost to Standard for item BTRUCK1 5813 t f jsmith f 11487 f 2009-09-25 09:04:37.657884-04 2009-09-25 5681 91 I/M Adjustment 3805 25.63 Miscellaneous Adjustment for item YTRUCK1\n 5820 t AD f jsmith f 11488 f 2009-09-25 09:04:37.657884-04 2009-09-25 5681 85 I/M Adjustment 3805 -25.63 Miscellaneous Adjustment for item YTRUCK1\n 5820 t AD f jsmith f 11490 f 2009-09-25 09:05:30.891943-04 2009-09-25 5682 89 I/M Transform 3806 -25.63 Transform Issue for item YTRUCK1\n 5821 t IT f admin f 11489 f 2009-09-25 09:05:30.891943-04 2009-09-25 5682 85 I/M Transform 3806 25.63 Transform Issue for item YTRUCK1\n 5821 t IT f admin f 11491 f 2009-09-25 09:05:30.891943-04 2009-09-25 5683 89 I/M Transform 3807 26.20 Transform Receipt for item BTRUCK1\n 5822 t RT f admin f 11492 f 2009-09-25 09:05:30.891943-04 2009-09-25 5683 85 I/M Transform 3807 -26.20 Transform Receipt for item BTRUCK1\n 5822 t RT f admin f 11494 f 2009-09-25 09:06:18.026142-04 2009-09-25 5684 92 I/M Damaged in Warehous 3808 -26.20 Material Scrap for item BTRUCK1\n 5823 t SI f jsmith f 11493 f 2009-09-25 09:06:18.026142-04 2009-09-25 5684 85 I/M Damaged in Warehous 3808 26.20 Material Scrap for item BTRUCK1\n 5823 t SI f jsmith f 11495 f 2009-09-25 09:14:18.561497-04 2009-09-25 5685 95 S/R 20074 3809 532.40 Receive Inventory from P/O for Toy Parts Inc. 5824 t PO f jsmith f 11496 f 2009-09-25 09:14:18.561497-04 2009-09-25 5685 138 S/R 20074 3809 -532.40 Receive Inventory from P/O for Toy Parts Inc. 5824 t PO f jsmith f 11497 f 2009-09-25 09:16:37.611665-04 2009-09-25 5686 99 A/P 30082 \N 532.40 TPARTS-Toy Parts Inc. 5826 t VO f jsmith f 11498 f 2009-09-25 09:16:37.611665-04 2009-09-25 5686 95 A/P 30082 \N -532.40 TPARTS-Toy Parts Inc. 5826 t VO f jsmith f 11501 f 2009-09-25 09:19:09.610601-04 2009-09-25 5687 109 A/P 4048 191 421.75 TPARTS-Toy Parts Inc. 5829 t CK t jsmith f 11502 f 2009-09-25 09:19:09.610601-04 2009-09-25 5687 99 A/P 4048 191 -421.75 TPARTS-Toy Parts Inc. 5829 t CK f jsmith f 11500 f 2009-09-25 09:19:09.610601-04 2009-09-25 5688 101 A/P 30082 \N 10.65 Discount for V 30082 5830 t DS f jsmith f 11499 f 2009-09-25 09:19:09.610601-04 2009-09-25 5688 99 A/P 30082 \N -10.65 Discount for V 30082 5830 t DS f jsmith f 8330 f 2006-09-28 09:33:26.984-04 2006-09-28 4192 108 G/L Ship Order \N -15000.00 3515 t ST f mfgadmin f 8327 f 2006-09-28 09:33:26.984-04 2006-09-28 4192 109 G/L Ship Order \N -50000.00 3515 t ST t mfgadmin f 8329 f 2006-09-28 09:33:26.984-04 2006-09-28 4192 85 G/L Ship Order \N 15000.00 3515 t ST f mfgadmin f 8328 f 2006-09-28 09:33:26.984-04 2006-09-28 4192 103 G/L Ship Order \N 50000.00 3515 t ST f mfgadmin f 8342 f 2006-10-09 08:43:21.109-04 2006-10-09 4196 108 G/L Ship Order \N -15000.00 3519 t ST f mfgadmin f 8339 f 2006-10-09 08:43:21.109-04 2006-10-09 4196 109 G/L Ship Order \N -50000.00 3519 t ST t mfgadmin f 8344 f 2006-10-09 10:37:28.187-04 2006-10-09 4197 92 I/M WATERDMG-MDA 3117 -94.00 Material Scrap\r\nMDA Found Water Damage 3520 t f mfgadmin f 8343 f 2006-10-09 10:37:28.187-04 2006-10-09 4197 85 I/M WATERDMG-MDA 3117 94.00 Material Scrap\r\nMDA Found Water Damage 3520 t f mfgadmin f 8345 f 2006-10-11 10:15:11.16-04 2006-10-11 4198 95 S/R 20025 3118 25.00 Receive Inventory from P/O 3521 t PO f jsmith f 8346 f 2006-10-11 10:15:11.16-04 2006-10-11 4198 85 S/R 20025 3118 -25.00 Receive Inventory from P/O 3521 t PO f jsmith f 8348 f 2006-10-11 10:46:51.597-04 2006-10-11 4199 90 A/P 30021 \N -103.50 RF-0101 3523 t VO f jsmith f 8349 f 2006-10-11 10:46:51.597-04 2006-10-11 4199 99 A/P 30021 \N 128.50 RF-0101 3523 t VO f jsmith f 8347 f 2006-10-11 10:46:51.597-04 2006-10-11 4199 95 A/P 30021 \N -25.00 RF-0101 3523 t VO f jsmith f 8354 f 2006-10-11 10:58:09.472-04 2006-10-11 4202 109 G/L \N 50000.00 Open Deposit 3527 t JE t jsmith f 9112 f 2007-08-31 11:03:44.609-04 2007-08-31 4560 86 W/O 40006-1 -1 -1.10 Post Setup Time to Work Order 3950 t WO f mfgadmin f 9113 f 2007-08-31 11:03:44.609-04 2007-08-31 4561 94 W/O 40006-1 -1 22.00 Post Run Time to Work Order 3951 t WO f mfgadmin f 9128 f 2007-08-31 11:06:05.406-04 2007-08-31 4568 108 S/R 40006 -1 -638.18 Ship Shipment 3959 t SO f mfgadmin f 11504 f 2009-09-25 09:24:27.293829-04 2009-09-25 5689 86 W/O 10066-1 3810 -0.80 Material YPAINT1 Issue to Work Order 5832 t WO f jsmith f 11503 f 2009-09-25 09:24:27.293829-04 2009-09-25 5689 138 W/O 10066-1 3810 0.80 Material YPAINT1 Issue to Work Order 5832 t WO f jsmith f 11505 f 2009-09-25 09:24:27.293829-04 2009-09-25 5690 94 W/O 10066-1 -1 2.20 Post Setup Time Standard Paint Operation/ to Work Order 5833 t WO f jsmith f 11510 f 2009-09-25 09:26:01.294518-04 2009-09-25 5692 86 W/O 10066-1 3811 -425.87 Material HUB1 Issue to Work Order 5835 t WO f jsmith f 11509 f 2009-09-25 09:26:01.294518-04 2009-09-25 5692 138 W/O 10066-1 3811 425.87 Material HUB1 Issue to Work Order 5835 t WO f jsmith f 11512 f 2009-09-25 09:26:15.173834-04 2009-09-25 5693 86 W/O 10066-1 3812 -25.00 Material CBODY1 Issue to Work Order 5836 t WO f jsmith f 11511 f 2009-09-25 09:26:15.173834-04 2009-09-25 5693 138 W/O 10066-1 3812 25.00 Material CBODY1 Issue to Work Order 5836 t WO f jsmith f 11514 f 2009-09-25 09:26:15.173834-04 2009-09-25 5694 86 W/O 10066-1 3813 -40.00 Material TWHEEL1 Issue to Work Order 5837 t WO f jsmith f 11513 f 2009-09-25 09:26:15.173834-04 2009-09-25 5694 138 W/O 10066-1 3813 40.00 Material TWHEEL1 Issue to Work Order 5837 t WO f jsmith f 11516 f 2009-09-25 09:26:15.173834-04 2009-09-25 5695 86 W/O 10066-1 -1 -2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 5838 t WO f jsmith f 11515 f 2009-09-25 09:26:15.173834-04 2009-09-25 5695 94 W/O 10066-1 -1 2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 5838 t WO f jsmith f 11518 f 2009-09-25 09:26:15.173834-04 2009-09-25 5696 86 W/O 10066-1 -1 -5.50 Post Run Time Standard Operation - Assembly/ to Work Order 5839 t WO f jsmith f 11517 f 2009-09-25 09:26:15.173834-04 2009-09-25 5696 94 W/O 10066-1 -1 5.50 Post Run Time Standard Operation - Assembly/ to Work Order 5839 t WO f jsmith f 11520 f 2009-09-25 09:26:51.668585-04 2009-09-25 5697 93 W/O 10066-1 -1 -10.39 Scrap HUB1 from Work Order 5840 t WO f jsmith f 11519 f 2009-09-25 09:26:51.668585-04 2009-09-25 5697 86 W/O 10066-1 -1 10.39 Scrap HUB1 from Work Order 5840 t WO f jsmith f 11522 f 2009-09-25 09:26:59.813165-04 2009-09-25 5698 86 W/O 10066-1 -1 -0.44 Post Setup Time SHIPPING/ to Work Order 5841 t WO f jsmith f 11521 f 2009-09-25 09:26:59.813165-04 2009-09-25 5698 94 W/O 10066-1 -1 0.44 Post Setup Time SHIPPING/ to Work Order 5841 t WO f jsmith f 11524 f 2009-09-25 09:26:59.813165-04 2009-09-25 5699 86 W/O 10066-1 -1 -2.20 Post Run Time SHIPPING/ to Work Order 5842 t WO f jsmith f 11523 f 2009-09-25 09:26:59.813165-04 2009-09-25 5699 94 W/O 10066-1 -1 2.20 Post Run Time SHIPPING/ to Work Order 5842 t WO f jsmith f 11525 f 2009-09-25 09:26:59.813165-04 2009-09-25 5700 86 W/O 10066-1 3814 829.82 Receive Inventory STOCKCAR1 from Manufacturing 5843 t WO f jsmith f 12230 f 2010-06-07 11:45:35.286708-04 2010-06-07 6023 86 W/O 10075-1 -1 -110.00 \N 6235 t WO f admin f 11526 f 2009-09-25 09:26:59.813165-04 2009-09-25 5700 85 W/O 10066-1 3814 -829.82 Receive Inventory STOCKCAR1 from Manufacturing 5843 t WO f jsmith f 11527 f 2009-09-25 09:27:35.684101-04 2009-09-25 5701 86 W/O 10066-1 -1 -319.50 Manufacturing Inventory Cost Variance for STOCKCAR1 5844 t WO f jsmith f 11528 f 2009-09-25 09:27:35.684101-04 2009-09-25 5701 87 W/O 10066-1 -1 319.50 Manufacturing Inventory Cost Variance for STOCKCAR1 5844 t WO f jsmith f 11530 f 2009-09-25 09:30:24.444215-04 2009-09-25 5702 106 A/R 20021 \N 119.00 Tremendous Toys Incorporated 5846 t CM f jsmith f 11529 f 2009-09-25 09:30:24.444215-04 2009-09-25 5702 123 A/R 20021 \N -119.00 Tremendous Toys Incorporated 5846 t CM f jsmith f 11533 f 2009-09-25 09:34:26.105368-04 2009-09-25 5703 123 A/R Unapplied from C-101002 \N 50.00 TTOYS-Tremendous Toys Incorporated 5847 t CR f jsmith f 11531 f 2009-09-25 09:34:26.105368-04 2009-09-25 5704 106 A/R 20022 401 50.00 Tremendous Toys Incorporated Unapplied from C-101002 5847 t CM f jsmith f 11532 f 2009-09-25 09:34:26.105368-04 2009-09-25 5704 123 A/R 20022 401 -50.00 Tremendous Toys Incorporated Unapplied from C-101002 5847 t CM f jsmith f 11538 f 2009-09-25 09:35:20.736595-04 2009-09-25 5705 109 A/R C-42123 \N -75.00 TTOYS-Tremendous Toys Incorporated 5848 t CR t jsmith f 11537 f 2009-09-25 09:35:20.736595-04 2009-09-25 5705 123 A/R Unapplied from C-42123 \N 75.00 TTOYS-Tremendous Toys Incorporated 5848 t CR f jsmith f 11535 f 2009-09-25 09:35:20.736595-04 2009-09-25 5706 133 A/R 20023 402 75.00 Unapplied from C-42123 5848 t CD f jsmith f 11536 f 2009-09-25 09:35:20.736595-04 2009-09-25 5706 123 A/R 20023 402 -75.00 Unapplied from C-42123 5848 t CD f jsmith f 11540 f 2009-09-25 09:46:27.073604-04 2009-09-25 5707 96 S/R 99007 3815 -207.46 Issue to Shipping 5849 t TO f jsmith f 11539 f 2009-09-25 09:46:27.073604-04 2009-09-25 5707 85 S/R 99007 3815 207.46 Issue to Shipping 5849 t TO f jsmith f 11541 f 2009-09-25 09:56:04.395986-04 2009-09-25 5708 96 I/M 99007 3816 207.46 Ship from Src to Transit Warehouse 5850 t TO f jsmith f 11542 f 2009-09-25 09:56:04.395986-04 2009-09-25 5708 134 I/M 99007 3816 -207.46 Ship from Src to Transit Warehouse 5850 t TO f jsmith f 11552 f 2009-09-25 10:10:40.338553-04 2009-09-25 5713 96 I/M 99007 3826 -207.46 Recall Shipment from Transit To Src Warehouse 5859 t TO f jsmith f 8427 f 2006-11-17 14:45:40.781-05 2006-11-17 4237 97 G/L -1 -100.00 Special Entry 3570 t JE f jsmith f 8452 f 2006-12-27 13:39:06.281-05 2006-11-15 4249 113 G/L CASH-2 -1 -200000.00 Sell Stock 3582 t JE f mfgadmin f 8453 f 2006-12-27 13:43:11-05 2006-11-15 4250 113 G/L FIX -1 400000.00 Fix 3583 t JE f mfgadmin f 8458 f 2006-12-27 13:44:14.421-05 2006-11-30 4251 108 G/L Ship Order \N -15000.00 3584 t ST f mfgadmin f 8457 f 2006-12-27 13:44:14.421-05 2006-11-30 4251 85 G/L Ship Order \N 15000.00 3584 t ST f mfgadmin f 8456 f 2006-12-27 13:44:14.421-05 2006-11-30 4251 103 G/L Ship Order \N 50000.00 3584 t ST f mfgadmin f 8430 f 2006-12-05 12:06:22.416-05 2006-12-05 4239 91 I/M MDA-001 3143 638.18 Miscellaneous Adjustment\n 3572 t f mfgadmin f 8431 f 2006-12-05 12:06:22.416-05 2006-12-05 4239 85 I/M MDA-001 3143 -638.18 Miscellaneous Adjustment\n 3572 t f mfgadmin f 8433 f 2006-12-05 12:16:44.541-05 2006-12-05 4240 96 S/R 50157-1 3144 -63.82 Issue to Shipping 3573 t SO f mfgadmin f 8432 f 2006-12-05 12:16:44.541-05 2006-12-05 4240 85 S/R 50157-1 3144 63.82 Issue to Shipping 3573 t SO f mfgadmin f 8435 f 2006-12-05 12:23:34.228-05 2006-12-05 4241 96 S/R 50157-1 3145 -574.36 Issue to Shipping 3574 t SO f mfgadmin f 8434 f 2006-12-05 12:23:34.228-05 2006-12-05 4241 85 S/R 50157-1 3145 574.36 Issue to Shipping 3574 t SO f mfgadmin f 8437 f 2006-12-05 12:23:59.01-05 2006-12-05 4242 108 S/R 50157 -1 -638.18 Ship Shipment 3575 t SO f mfgadmin f 8436 f 2006-12-05 12:23:59.01-05 2006-12-05 4242 96 S/R 50157 -1 638.18 Ship Shipment 3575 t SO f mfgadmin f 8440 f 2006-12-05 12:24:15.275-05 2006-12-05 4243 106 A/R 60029 \N -1038.56 3576 t IN f mfgadmin f 8439 f 2006-12-05 12:24:15.275-05 2006-12-05 4243 121 A/R 60029 \N 49.46 3576 t IN f mfgadmin f 8438 f 2006-12-05 12:24:15.275-05 2006-12-05 4243 103 A/R 60029 \N 989.10 3576 t IN f mfgadmin f 8496 f 2006-12-28 11:43:32.171-05 2006-12-28 4267 86 W/O 10022-1 3153 -27.50 Material Issue to Work Order 3603 t WO f mfgadmin f 8498 f 2006-12-28 11:43:32.171-05 2006-12-28 4268 86 W/O 10022-1 3154 -25.00 Material Issue to Work Order 3604 t WO f mfgadmin f 8497 f 2006-12-28 11:43:32.171-05 2006-12-28 4268 85 W/O 10022-1 3154 25.00 Material Issue to Work Order 3604 t WO f mfgadmin f 8500 f 2006-12-28 11:43:32.171-05 2006-12-28 4269 86 W/O 10022-1 -1 -1.10 Post Setup Time to Work Order 3605 t WO f mfgadmin f 9114 f 2007-08-31 11:03:44.609-04 2007-08-31 4561 86 W/O 40006-1 -1 -22.00 Post Run Time to Work Order 3951 t WO f mfgadmin f 9116 f 2007-08-31 11:03:44.609-04 2007-08-31 4562 86 W/O 40006-1 -1 -2.20 Post Setup Time to Work Order 3952 t WO f mfgadmin f 9115 f 2007-08-31 11:03:44.609-04 2007-08-31 4562 94 W/O 40006-1 -1 2.20 Post Setup Time to Work Order 3952 t WO f mfgadmin f 11551 f 2009-09-25 10:10:40.338553-04 2009-09-25 5713 134 I/M 99007 3826 207.46 Recall Shipment from Transit To Src Warehouse 5859 t TO f jsmith f 11553 f 2009-09-25 10:10:58.446895-04 2009-09-25 5714 96 S/R 99007 3828 207.46 Return from Shipping 5860 t TO f jsmith f 11554 f 2009-09-25 10:10:58.446895-04 2009-09-25 5714 85 S/R 99007 3828 -207.46 Return from Shipping 5860 t TO f jsmith f 11555 f 2009-09-25 10:18:46.722202-04 2009-09-25 5715 85 I/M Transfer \N 41.49 Inter-Warehouse Transfer for item STOCKCAR1\n 5861 t Misc f jsmith f 11556 f 2009-09-25 10:18:46.722202-04 2009-09-25 5715 134 I/M Transfer \N -41.49 Inter-Warehouse Transfer for item STOCKCAR1\n 5861 t Misc f jsmith f 11558 f 2009-09-25 10:19:06.39027-04 2009-09-25 5716 128 I/M Transfer \N -41.49 Inter-Warehouse Transfer for item STOCKCAR1\n 5862 t Misc f jsmith f 11557 f 2009-09-25 10:19:06.39027-04 2009-09-25 5716 134 I/M Transfer \N 41.49 Inter-Warehouse Transfer for item STOCKCAR1\n 5862 t Misc f jsmith f 11559 f 2009-09-25 10:21:49.80949-04 2009-09-25 5717 91 I/M Special Count 3833 12.82 Miscellaneous Adjustment for item YTRUCK1\n 5863 t AD f jsmith f 11560 f 2009-09-25 10:21:49.80949-04 2009-09-25 5717 85 I/M Special Count 3833 -12.82 Miscellaneous Adjustment for item YTRUCK1\n 5863 t AD f jsmith f 11562 f 2009-09-25 10:23:58.941212-04 2009-09-25 5718 96 S/R 99007 3834 -12.82 Issue to Shipping 5864 t TO f jsmith f 11561 f 2009-09-25 10:23:58.941212-04 2009-09-25 5718 85 S/R 99007 3834 12.82 Issue to Shipping 5864 t TO f jsmith f 11563 f 2009-09-25 10:24:04.705472-04 2009-09-25 5719 96 I/M 99007 3835 12.82 Ship from Src to Transit Warehouse 5865 t TO f jsmith f 11564 f 2009-09-25 10:24:04.705472-04 2009-09-25 5719 134 I/M 99007 3835 -12.82 Ship from Src to Transit Warehouse 5865 t TO f jsmith f 11568 f 2009-09-25 10:31:29.501399-04 2009-09-25 5721 96 S/R 50197-1 3839 -82.98 Issue STOCKCAR1 to Shipping for customer Tremendous Toys Incorporated 5868 t SO f jsmith f 11567 f 2009-09-25 10:31:29.501399-04 2009-09-25 5721 85 S/R 50197-1 3839 82.98 Issue STOCKCAR1 to Shipping for customer Tremendous Toys Incorporated 5868 t SO f jsmith f 11570 f 2009-09-25 10:32:11.348886-04 2009-09-25 5722 108 S/R 60052 -1 -82.98 Ship Shipment to Customer Tremendous Toys Incorporated 5869 t SH f jsmith f 11569 f 2009-09-25 10:32:11.348886-04 2009-09-25 5722 96 S/R 60052 -1 82.98 Ship Shipment to Customer Tremendous Toys Incorporated 5869 t SH f jsmith f 11573 f 2009-09-25 10:32:41.650078-04 2009-09-25 5723 106 A/R 60085 \N -435.25 Tremendous Toys Incorporated 5870 t IN f jsmith f 11572 f 2009-09-25 10:32:41.650078-04 2009-09-25 5723 102 A/R 60085 \N 20.25 Tremendous Toys Incorporated 5870 t IN f jsmith f 11571 f 2009-09-25 10:32:41.650078-04 2009-09-25 5723 103 A/R 60085 \N 405.00 Tremendous Toys Incorporated 5870 t IN f jsmith f 11577 f 2009-09-25 10:36:05.882969-04 2009-09-25 5725 106 A/R R -1 75.00 20023 5873 t CD f jsmith f 11580 f 2009-09-25 10:42:44.745809-04 2009-09-25 5726 96 I/M 99007 3842 -12.82 Recall Shipment from Transit To Src Warehouse 5874 t TO f jsmith f 11579 f 2009-09-25 10:42:44.745809-04 2009-09-25 5726 134 I/M 99007 3842 12.82 Recall Shipment from Transit To Src Warehouse 5874 t TO f jsmith f 11581 f 2009-09-25 10:42:52.160988-04 2009-09-25 5727 96 S/R 99007 3844 12.82 Return from Shipping 5875 t TO f jsmith f 11582 f 2009-09-25 10:42:52.160988-04 2009-09-25 5727 85 S/R 99007 3844 -12.82 Return from Shipping 5875 t TO f jsmith f 11584 f 2009-09-25 10:42:57.982312-04 2009-09-25 5728 96 S/R 99007 3845 -12.82 Issue to Shipping 5876 t TO f jsmith f 11583 f 2009-09-25 10:42:57.982312-04 2009-09-25 5728 85 S/R 99007 3845 12.82 Issue to Shipping 5876 t TO f jsmith f 11585 f 2009-09-25 10:43:04.216905-04 2009-09-25 5729 96 I/M 99007 3846 12.82 Ship from Src to Transit Warehouse 5877 t TO f jsmith f 11586 f 2009-09-25 10:43:04.216905-04 2009-09-25 5729 134 I/M 99007 3846 -12.82 Ship from Src to Transit Warehouse 5877 t TO f jsmith f 11590 f 2009-09-25 10:43:36.882185-04 2009-09-25 5731 96 I/M 99007 3850 -12.82 Recall Shipment from Transit To Src Warehouse 5880 t TO f jsmith f 11589 f 2009-09-25 10:43:36.882185-04 2009-09-25 5731 134 I/M 99007 3850 12.82 Recall Shipment from Transit To Src Warehouse 5880 t TO f jsmith f 11591 f 2009-09-25 10:43:56.693142-04 2009-09-25 5732 96 S/R 99007 3852 12.82 Return from Shipping 5881 t TO f jsmith f 8441 f 2006-12-05 18:51:26.75-05 2006-12-05 4244 120 A/P 3018 119 -3417.00 TPARTS-Toy Parts Inc. 3577 t CK f mfgadmin f 8443 f 2006-12-05 18:52:50.265-05 2006-12-05 4245 97 A/P 30023 \N -3417.00 MDA-001 3578 t VO f mfgadmin f 8444 f 2006-12-05 18:52:50.265-05 2006-12-05 4245 99 A/P 30023 \N 3417.00 MDA-001 3578 t VO f mfgadmin f 8445 f 2006-12-05 18:52:52.703-05 2006-12-05 4246 97 A/P 30024 \N -5423.00 MDA-001 3579 t VO f mfgadmin f 7076 f 2005-12-27 11:17:39.202545-05 2005-12-27 3616 102 A/R 60000 \N 47.50 2314 t IN f jsmith f 7915 f 2006-01-13 11:53:19.69192-05 2006-01-13 4001 108 S/R 50043 -1 -246.18 Ship Shipment 3299 t SO f jsmith f 8542 f 2007-01-08 13:56:04.168-05 2007-01-08 4287 106 A/R I-60029 \N 1038.56 TTOYS-Tremendous Toys Incorporated 3627 t CR f jsmith f 8543 f 2007-01-08 13:56:04.168-05 2007-01-08 4287 106 A/R I-60030 \N 1029.50 TTOYS-Tremendous Toys Incorporated 3627 t CR f jsmith f 8545 f 2007-01-08 16:25:11.824-05 2007-01-08 4288 91 I/M MDA-2007-8 3160 638.18 Miscellaneous Adjustment\n 3628 t f jsmith f 8546 f 2007-01-08 16:25:11.824-05 2007-01-08 4288 85 I/M MDA-2007-8 3160 -638.18 Miscellaneous Adjustment\n 3628 t f jsmith f 8548 f 2007-01-08 16:27:48.746-05 2007-01-08 4289 96 S/R 50159-1 3161 -319.09 Issue to Shipping 3629 t SO f jsmith f 8547 f 2007-01-08 16:27:48.746-05 2007-01-08 4289 85 S/R 50159-1 3161 319.09 Issue to Shipping 3629 t SO f jsmith f 8550 f 2007-01-08 16:31:19.261-05 2007-01-08 4290 108 S/R 50159 -1 -319.09 Ship Shipment 3630 t SO f jsmith f 8549 f 2007-01-08 16:31:19.261-05 2007-01-08 4290 96 S/R 50159 -1 319.09 Ship Shipment 3630 t SO f jsmith f 8552 f 2007-01-08 16:31:57.511-05 2007-01-08 4291 122 A/R 60031 \N 99.00 3631 t IN f jsmith f 8554 f 2007-01-08 16:31:57.511-05 2007-01-08 4291 106 A/R 60031 \N -618.28 3631 t IN f jsmith f 8553 f 2007-01-08 16:31:57.511-05 2007-01-08 4291 121 A/R 60031 \N 24.73 3631 t IN f jsmith f 8551 f 2007-01-08 16:31:57.511-05 2007-01-08 4291 103 A/R 60031 \N 494.55 3631 t IN f jsmith f 8556 f 2007-01-08 16:34:13.105-05 2007-01-08 4292 96 S/R 50159-1 3162 -319.09 Issue to Shipping 3632 t SO f jsmith f 8555 f 2007-01-08 16:34:13.105-05 2007-01-08 4292 85 S/R 50159-1 3162 319.09 Issue to Shipping 3632 t SO f jsmith f 8558 f 2007-01-08 16:34:24.371-05 2007-01-08 4293 108 S/R 50159 -1 -319.09 Ship Shipment 3633 t SO f jsmith f 8557 f 2007-01-08 16:34:24.371-05 2007-01-08 4293 96 S/R 50159 -1 319.09 Ship Shipment 3633 t SO f jsmith f 8560 f 2007-01-08 16:35:03.105-05 2007-01-08 4294 122 A/R 60032 \N 99.00 3634 t IN f jsmith f 8575 f 2007-02-20 08:27:33.079-05 2007-02-20 4301 95 S/R 20030 3168 50.00 Receive Inventory from P/O 3641 t PO f mfgadmin f 8576 f 2007-02-20 08:27:33.079-05 2007-02-20 4301 85 S/R 20030 3168 -50.00 Receive Inventory from P/O 3641 t PO f mfgadmin f 8643 f 2007-02-20 08:42:31.516-05 2007-02-20 4334 108 S/R 50161 -1 -638.18 Ship Shipment 3681 t SO f mfgadmin f 8642 f 2007-02-20 08:42:31.516-05 2007-02-20 4334 96 S/R 50161 -1 638.18 Ship Shipment 3681 t SO f mfgadmin f 9118 f 2007-08-31 11:03:44.609-04 2007-08-31 4563 86 W/O 40006-1 -1 -5.50 Post Run Time to Work Order 3953 t WO f mfgadmin f 9117 f 2007-08-31 11:03:44.609-04 2007-08-31 4563 94 W/O 40006-1 -1 5.50 Post Run Time to Work Order 3953 t WO f mfgadmin f 9120 f 2007-08-31 11:03:44.609-04 2007-08-31 4564 86 W/O 40006-1 -1 -0.44 Post Setup Time to Work Order 3954 t WO f mfgadmin f 9119 f 2007-08-31 11:03:44.609-04 2007-08-31 4564 94 W/O 40006-1 -1 0.44 Post Setup Time to Work Order 3954 t WO f mfgadmin f 9121 f 2007-08-31 11:03:44.609-04 2007-08-31 4565 94 W/O 40006-1 -1 2.20 Post Run Time to Work Order 3955 t WO f mfgadmin f 11592 f 2009-09-25 10:43:56.693142-04 2009-09-25 5732 85 S/R 99007 3852 -12.82 Return from Shipping 5881 t TO f jsmith f 11593 f 2009-09-25 10:44:38.329216-04 2009-09-25 5733 91 I/M Special Count 3853 13.10 Miscellaneous Adjustment for item BTRUCK1\n 5882 t AD f jsmith f 11594 f 2009-09-25 10:44:38.329216-04 2009-09-25 5733 85 I/M Special Count 3853 -13.10 Miscellaneous Adjustment for item BTRUCK1\n 5882 t AD f jsmith f 11596 f 2009-09-25 10:49:47.453889-04 2009-09-25 5734 96 S/R 99007 3854 -13.10 Issue to Shipping 5883 t TO f jsmith f 11595 f 2009-09-25 10:49:47.453889-04 2009-09-25 5734 85 S/R 99007 3854 13.10 Issue to Shipping 5883 t TO f jsmith f 11597 f 2009-09-25 10:49:53.56885-04 2009-09-25 5735 96 I/M 99007 3855 13.10 Ship from Src to Transit Warehouse 5884 t TO f jsmith f 11598 f 2009-09-25 10:49:53.56885-04 2009-09-25 5735 134 I/M 99007 3855 -13.10 Ship from Src to Transit Warehouse 5884 t TO f jsmith f 11602 f 2009-09-25 10:50:07.125305-04 2009-09-25 5737 96 I/M 99007 3859 -13.10 Recall Shipment from Transit To Src Warehouse 5887 t TO f jsmith f 11601 f 2009-09-25 10:50:07.125305-04 2009-09-25 5737 134 I/M 99007 3859 13.10 Recall Shipment from Transit To Src Warehouse 5887 t TO f jsmith f 11603 f 2009-09-25 10:50:39.665449-04 2009-09-25 5738 96 S/R 99007 3861 13.10 Return from Shipping 5888 t TO f jsmith f 11604 f 2009-09-25 10:50:39.665449-04 2009-09-25 5738 85 S/R 99007 3861 -13.10 Return from Shipping 5888 t TO f jsmith f 11606 f 2009-09-25 10:53:27.223786-04 2009-09-25 5739 109 A/R C-1231244 \N -191.25 TTOYS-Tremendous Toys Incorporated 5889 t CR t jsmith f 11605 f 2009-09-25 10:53:27.223786-04 2009-09-25 5739 106 A/R I-60085 \N 191.25 TTOYS-Tremendous Toys Incorporated 5889 t CR f jsmith f 11608 f 2009-09-25 11:01:50.164113-04 2009-09-25 5740 96 S/R 99007 3862 -12.82 Issue to Shipping 5890 t TO f jsmith f 11607 f 2009-09-25 11:01:50.164113-04 2009-09-25 5740 85 S/R 99007 3862 12.82 Issue to Shipping 5890 t TO f jsmith f 11609 f 2009-09-25 11:01:57.148563-04 2009-09-25 5741 96 I/M 99007 3863 12.82 Ship from Src to Transit Warehouse 5891 t TO f jsmith f 11610 f 2009-09-25 11:01:57.148563-04 2009-09-25 5741 134 I/M 99007 3863 -12.82 Ship from Src to Transit Warehouse 5891 t TO f jsmith f 11614 f 2009-09-25 11:02:54.312572-04 2009-09-25 5743 96 I/M 99007 3867 -12.82 Recall Shipment from Transit To Src Warehouse 5894 t TO f jsmith f 11613 f 2009-09-25 11:02:54.312572-04 2009-09-25 5743 134 I/M 99007 3867 12.82 Recall Shipment from Transit To Src Warehouse 5894 t TO f jsmith f 11616 f 2009-09-25 11:07:26.448473-04 2009-09-25 5744 109 G/L Stock Sale - Doc# 231817 -1 -10000.00 Issue stock: Stock Sale - Doc# 231817 5895 t JE t jsmith f 11615 f 2009-09-25 11:07:26.448473-04 2009-09-25 5744 114 G/L Stock Sale - Doc# 231817 -1 10000.00 Issue stock: Stock Sale - Doc# 231817 5895 t JE f jsmith f 11617 f 2009-09-25 11:10:20.971352-04 2009-09-25 5745 116 G/L Note Payable: 12/31/2020 -1 35000.00 Note Payable: 12/31/2020 5896 t JE f jsmith f 11618 f 2009-09-25 11:10:20.971352-04 2009-09-25 5745 109 G/L Note Payable: 12/31/2020 -1 -35000.00 Note Payable: 12/31/2020 5896 t JE t jsmith f 11620 f 2009-09-25 12:38:12.110556-04 2009-09-25 5746 128 I/M 99007 \N -12.82 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5897 t TO f jsmith f 11619 f 2009-09-25 12:38:12.110556-04 2009-09-25 5746 134 I/M 99007 \N 12.82 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5897 t TO f jsmith f 11623 f 2009-09-25 12:40:32.869483-04 2009-09-25 5748 96 S/R 99007 3873 12.82 Return from Shipping 5900 t TO f jsmith f 11624 f 2009-09-25 12:40:32.869483-04 2009-09-25 5748 85 S/R 99007 3873 -12.82 Return from Shipping 5900 t TO f jsmith f 11626 f 2009-09-25 12:40:38.069364-04 2009-09-25 5749 96 S/R 99007 3874 -12.82 Issue to Shipping 5901 t TO f jsmith f 11625 f 2009-09-25 12:40:38.069364-04 2009-09-25 5749 85 S/R 99007 3874 12.82 Issue to Shipping 5901 t TO f jsmith f 11629 f 2009-09-25 12:47:08.620928-04 2009-09-25 5751 91 I/M \N 3877 12.82 \N 5903 t CT f jsmith f 11630 f 2009-09-25 12:47:08.620928-04 2009-09-25 5751 134 I/M \N 3877 -12.82 \N 5903 t CT f jsmith f 11632 f 2009-09-25 12:47:45.353122-04 2009-09-25 5752 146 I/M \N 3878 33.32 \N 5904 t CT f jsmith f 11631 f 2009-09-25 12:47:45.353122-04 2009-09-25 5752 150 I/M \N 3878 -33.32 \N 5904 t CT f jsmith f 11634 f 2009-09-25 12:48:20.251017-04 2009-09-25 5753 85 I/M Return to plant \N -12.82 Inter-Warehouse Transfer for item YTRUCK1\n 5905 t Misc f jsmith f 11633 f 2009-09-25 12:48:20.251017-04 2009-09-25 5753 146 I/M Return to plant \N 12.82 Inter-Warehouse Transfer for item YTRUCK1\n 5905 t Misc f jsmith f 11636 f 2009-09-25 12:49:41.171164-04 2009-09-25 5754 96 S/R 99008 3881 -12.82 Issue to Shipping 5906 t TO f jsmith f 11635 f 2009-09-25 12:49:41.171164-04 2009-09-25 5754 85 S/R 99008 3881 12.82 Issue to Shipping 5906 t TO f jsmith f 11637 f 2009-09-25 12:49:45.76827-04 2009-09-25 5755 96 I/M 99008 3882 12.82 Ship from Src to Transit Warehouse 5907 t TO f jsmith f 11638 f 2009-09-25 12:49:45.76827-04 2009-09-25 5755 134 I/M 99008 3882 -12.82 Ship from Src to Transit Warehouse 5907 t TO f jsmith f 11640 f 2009-09-25 12:50:02.427694-04 2009-09-25 5756 128 I/M 99008 \N -12.82 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5908 t TO f jsmith f 11639 f 2009-09-25 12:50:02.427694-04 2009-09-25 5756 134 I/M 99008 \N 12.82 Inter-Warehouse Transfer for item YTRUCK1\nReceive from Transit To Dest Warehouse 5908 t TO f jsmith f 11642 f 2009-09-25 12:52:07.667942-04 2009-09-25 5757 96 S/R 99009 3886 -13.10 Issue to Shipping 5910 t TO f jsmith f 8578 f 2007-02-20 08:28:31.907-05 2007-02-20 4302 99 A/P 30028 \N 50.00 RF-1010 3643 t VO f mfgadmin f 8577 f 2007-02-20 08:28:31.907-05 2007-02-20 4302 95 A/P 30028 \N -50.00 RF-1010 3643 t VO f mfgadmin f 8580 f 2007-02-20 08:28:57.423-05 2007-02-20 4303 101 A/P 30028 \N 1.00 Discount for V 30028 3644 t CM f mfgadmin f 8579 f 2007-02-20 08:28:57.423-05 2007-02-20 4303 99 A/P 30028 \N -1.00 Discount for V 30028 3644 t CM f mfgadmin f 8581 f 2007-02-20 08:30:17.454-05 2007-02-20 4304 99 A/P 3022 124 -49.00 TPARTS-Toy Parts Inc. 3646 t CK f mfgadmin f 8583 f 2007-02-20 08:34:35.173-05 2007-02-20 4305 86 W/O 10023-1 3169 64.60 Receive Inventory from Manufacturing 3647 t WO f mfgadmin f 8584 f 2007-02-20 08:34:35.173-05 2007-02-20 4305 85 W/O 10023-1 3169 -64.60 Receive Inventory from Manufacturing 3647 t WO f mfgadmin f 8586 f 2007-02-20 08:34:35.173-05 2007-02-20 4306 86 W/O 10023-1 3170 -27.50 Material Issue to Work Order 3648 t WO f mfgadmin f 8585 f 2007-02-20 08:34:35.173-05 2007-02-20 4306 85 W/O 10023-1 3170 27.50 Material Issue to Work Order 3648 t WO f mfgadmin f 8588 f 2007-02-20 08:34:35.173-05 2007-02-20 4307 86 W/O 10023-1 3171 -25.00 Material Issue to Work Order 3649 t WO f mfgadmin f 8587 f 2007-02-20 08:34:35.173-05 2007-02-20 4307 85 W/O 10023-1 3171 25.00 Material Issue to Work Order 3649 t WO f mfgadmin f 8590 f 2007-02-20 08:34:35.173-05 2007-02-20 4308 86 W/O 10023-1 -1 -1.10 Post Setup Time to Work Order 3650 t WO f mfgadmin f 8589 f 2007-02-20 08:34:35.173-05 2007-02-20 4308 94 W/O 10023-1 -1 1.10 Post Setup Time to Work Order 3650 t WO f mfgadmin f 8592 f 2007-02-20 08:34:35.173-05 2007-02-20 4309 86 W/O 10023-1 -1 -11.00 Post Run Time to Work Order 3651 t WO f mfgadmin f 8591 f 2007-02-20 08:34:35.173-05 2007-02-20 4309 94 W/O 10023-1 -1 11.00 Post Run Time to Work Order 3651 t WO f mfgadmin f 9122 f 2007-08-31 11:03:44.609-04 2007-08-31 4565 86 W/O 40006-1 -1 -2.20 Post Run Time to Work Order 3955 t WO f mfgadmin f 9123 f 2007-08-31 11:04:08.515-04 2007-08-31 4566 86 W/O 40006-1 -1 0.56 Manufacturing Inventory Cost Variance 3956 t WO f mfgadmin f 9124 f 2007-08-31 11:04:08.515-04 2007-08-31 4566 87 W/O 40006-1 -1 -0.56 Manufacturing Inventory Cost Variance 3956 t WO f mfgadmin f 9125 f 2007-08-31 11:05:32.687-04 2007-08-31 4567 85 S/R 40006-1 3291 638.18 Issue to Shipping 3958 t SO f mfgadmin f 11641 f 2009-09-25 12:52:07.667942-04 2009-09-25 5757 85 S/R 99009 3886 13.10 Issue to Shipping 5910 t TO f jsmith f 11643 f 2009-09-25 12:52:18.933228-04 2009-09-25 5758 96 I/M 99009 3887 13.10 Ship from Src to Transit Warehouse 5911 t TO f jsmith f 11644 f 2009-09-25 12:52:18.933228-04 2009-09-25 5758 134 I/M 99009 3887 -13.10 Ship from Src to Transit Warehouse 5911 t TO f jsmith f 11645 f 2009-09-25 12:52:41.825928-04 2009-09-25 5759 134 I/M 99009 \N 13.10 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5912 t TO f jsmith f 11853 f 2009-12-03 14:56:23.910523-05 2009-09-01 5859 109 G/L Ship Order \N -77250.00 6034 t ST t admin f 11859 f 2009-12-03 14:56:41.838571-05 2009-09-01 5860 109 G/L Receive Product \N 50000.00 Cash Payment 6035 t ST t admin f 10902 f 2009-08-13 08:45:52.119528-04 2009-08-13 5391 95 S/R 20066 3616 2000.00 Receive Inventory from P/O for Toy Parts Inc. 5471 t PO f admin f 10903 f 2009-08-13 08:45:52.119528-04 2009-08-13 5391 138 S/R 20066 3616 -2000.00 Receive Inventory from P/O for Toy Parts Inc. 5471 t PO f admin f 10904 f 2009-08-13 08:45:52.119528-04 2009-08-13 5392 95 S/R 20066 3617 15000.00 Receive Inventory from P/O for Toy Parts Inc. 5473 t PO f admin f 10905 f 2009-08-13 08:45:52.119528-04 2009-08-13 5392 138 S/R 20066 3617 -15000.00 Receive Inventory from P/O for Toy Parts Inc. 5473 t PO f admin f 10906 f 2009-08-13 08:45:52.119528-04 2009-08-13 5393 95 S/R 20066 3618 25000.00 Receive Inventory from P/O for Toy Parts Inc. 5475 t PO f admin f 10907 f 2009-08-13 08:45:52.119528-04 2009-08-13 5393 138 S/R 20066 3618 -25000.00 Receive Inventory from P/O for Toy Parts Inc. 5475 t PO f admin f 10908 f 2009-08-13 08:45:52.119528-04 2009-08-13 5394 95 S/R 20066 3619 100.00 Receive Inventory from P/O for Toy Parts Inc. 5477 t PO f admin f 10909 f 2009-08-13 08:45:52.119528-04 2009-08-13 5394 138 S/R 20066 3619 -100.00 Receive Inventory from P/O for Toy Parts Inc. 5477 t PO f admin f 10910 f 2009-08-13 08:45:52.119528-04 2009-08-13 5395 95 S/R 20066 3620 6000.00 Receive Inventory from P/O for Toy Parts Inc. 5479 t PO f admin f 10911 f 2009-08-13 08:45:52.119528-04 2009-08-13 5395 138 S/R 20066 3620 -6000.00 Receive Inventory from P/O for Toy Parts Inc. 5479 t PO f admin f 10912 f 2009-08-13 08:47:32.10043-04 2009-08-13 5396 99 A/P 30073 \N 48100.00 TPARTS-Toy Parts Inc. RF1001 5481 t VO f admin f 10913 f 2009-08-13 08:47:32.10043-04 2009-08-13 5396 95 A/P 30073 \N -48100.00 TPARTS-Toy Parts Inc. RF1001 5481 t VO f admin f 10917 f 2009-08-13 08:48:50.436372-04 2009-08-13 5397 99 A/P 4015 177 -47138.00 TPARTS-Toy Parts Inc. 5483 t CK f admin f 10915 f 2009-08-13 08:48:50.436372-04 2009-08-13 5398 101 A/P 30073 \N 962.00 Discount for V 30073 5484 t DS f admin f 10914 f 2009-08-13 08:48:50.436372-04 2009-08-13 5398 99 A/P 30073 \N -962.00 Discount for V 30073 5484 t DS f admin f 10919 f 2009-08-13 08:50:25.065315-04 2009-08-13 5399 86 W/O 10061-1 3621 -2750.00 Material TINSERT1 Issue to Work Order 5486 t WO f admin f 10918 f 2009-08-13 08:50:25.065315-04 2009-08-13 5399 138 W/O 10061-1 3621 2750.00 Material TINSERT1 Issue to Work Order 5486 t WO f admin f 10921 f 2009-08-13 08:50:25.065315-04 2009-08-13 5400 86 W/O 10061-1 3622 -2000.00 Material TBOX1 Issue to Work Order 5487 t WO f admin f 10920 f 2009-08-13 08:50:25.065315-04 2009-08-13 5400 138 W/O 10061-1 3622 2000.00 Material TBOX1 Issue to Work Order 5487 t WO f admin f 10923 f 2009-08-13 08:50:25.065315-04 2009-08-13 5401 86 W/O 10061-1 -1 -1.10 \N 5488 t WO f admin f 10925 f 2009-08-13 08:50:25.065315-04 2009-08-13 5402 86 W/O 10061-1 -1 -1100.00 \N 5489 t WO f admin f 10924 f 2009-08-13 08:50:25.065315-04 2009-08-13 5402 94 W/O 10061-1 -1 1100.00 \N 5489 t WO f admin f 8665 f 2007-03-12 10:18:17.031-04 2007-03-12 4342 108 G/L Ship Order \N -15000.00 3691 t ST f mfgadmin f 8664 f 2007-03-12 10:18:17.031-04 2007-03-12 4342 85 G/L Ship Order \N 15000.00 3691 t ST f mfgadmin f 8663 f 2007-03-12 10:18:17.031-04 2007-03-12 4342 103 G/L Ship Order \N 50000.00 3691 t ST f mfgadmin f 8666 f 2007-04-05 15:29:46.062-04 2007-04-05 4343 91 I/M MDA-001-TKIT1 3184 646.00 Miscellaneous Adjustment\n 3692 t f jsmith f 8667 f 2007-04-05 15:29:46.062-04 2007-04-05 4343 85 I/M MDA-001-TKIT1 3184 -646.00 Miscellaneous Adjustment\n 3692 t f jsmith f 8669 f 2007-04-05 15:31:35.406-04 2007-04-05 4344 86 W/O 10025-1 3185 -250.00 Material Issue to Work Order 3693 t WO f jsmith f 8668 f 2007-04-05 15:31:35.406-04 2007-04-05 4344 85 W/O 10025-1 3185 250.00 Material Issue to Work Order 3693 t WO f jsmith f 8671 f 2007-04-05 15:31:35.406-04 2007-04-05 4345 86 W/O 10025-1 3186 -7.00 Material Issue to Work Order 3694 t WO f jsmith f 8670 f 2007-04-05 15:31:35.406-04 2007-04-05 4345 85 W/O 10025-1 3186 7.00 Material Issue to Work Order 3694 t WO f jsmith f 8673 f 2007-04-05 15:31:35.406-04 2007-04-05 4346 86 W/O 10025-1 -1 -3.30 Post Setup Time to Work Order 3695 t WO f jsmith f 8672 f 2007-04-05 15:31:35.406-04 2007-04-05 4346 94 W/O 10025-1 -1 3.30 Post Setup Time to Work Order 3695 t WO f jsmith f 8675 f 2007-04-05 15:31:35.406-04 2007-04-05 4347 86 W/O 10025-1 -1 -201.67 Post Run Time to Work Order 3696 t WO f jsmith f 8674 f 2007-04-05 15:31:35.406-04 2007-04-05 4347 94 W/O 10025-1 -1 201.67 Post Run Time to Work Order 3696 t WO f jsmith f 8677 f 2007-04-05 15:32:13.687-04 2007-04-05 4348 86 W/O 10025-1 3187 -5140.00 Material Issue to Work Order 3697 t WO f jsmith f 8676 f 2007-04-05 15:32:13.687-04 2007-04-05 4348 85 W/O 10025-1 3187 5140.00 Material Issue to Work Order 3697 t WO f jsmith f 8679 f 2007-04-05 15:32:13.687-04 2007-04-05 4349 86 W/O 10025-1 -1 -2.02 Post Setup Time to Work Order 3698 t WO f jsmith f 8678 f 2007-04-05 15:32:13.687-04 2007-04-05 4349 94 W/O 10025-1 -1 2.02 Post Setup Time to Work Order 3698 t WO f jsmith f 8681 f 2007-04-05 15:32:13.687-04 2007-04-05 4350 86 W/O 10025-1 -1 -55.92 Post Run Time to Work Order 3699 t WO f jsmith f 8689 f 2007-04-05 15:32:38.953-04 2007-04-05 4354 86 W/O 10025-1 -1 -11.00 Post Run Time to Work Order 3703 t WO f jsmith f 8688 f 2007-04-05 15:32:38.953-04 2007-04-05 4354 94 W/O 10025-1 -1 11.00 Post Run Time to Work Order 3703 t WO f jsmith f 8690 f 2007-04-05 15:33:00.171-04 2007-04-05 4355 86 W/O 10025-1 -1 -64.61 Manufacturing Inventory Cost Variance 3704 t WO f jsmith f 8691 f 2007-04-05 15:33:00.171-04 2007-04-05 4355 87 W/O 10025-1 -1 64.61 Manufacturing Inventory Cost Variance 3704 t WO f jsmith f 8693 f 2007-04-05 15:39:03.921-04 2007-04-05 4356 96 S/R 50162-1 3190 -6381.80 Issue to Shipping 3706 t SO f jsmith f 8692 f 2007-04-05 15:39:03.921-04 2007-04-05 4356 85 S/R 50162-1 3190 6381.80 Issue to Shipping 3706 t SO f jsmith f 8695 f 2007-04-05 15:43:47.156-04 2007-04-05 4357 108 S/R 50162 -1 -6381.80 Ship Shipment 3707 t SO f jsmith f 8694 f 2007-04-05 15:43:47.156-04 2007-04-05 4357 96 S/R 50162 -1 6381.80 Ship Shipment 3707 t SO f jsmith f 8697 f 2007-04-05 15:45:07.093-04 2007-04-05 4358 122 A/R 60035 \N 99.00 3708 t IN f jsmith f 8699 f 2007-04-05 15:45:07.093-04 2007-04-05 4358 106 A/R 60035 \N -9811.50 3708 t IN f jsmith f 8698 f 2007-04-05 15:45:07.093-04 2007-04-05 4358 121 A/R 60035 \N 462.50 3708 t IN f jsmith f 8696 f 2007-04-05 15:45:07.093-04 2007-04-05 4358 103 A/R 60035 \N 9250.00 3708 t IN f jsmith f 8700 f 2007-04-05 15:50:01.515-04 2007-04-05 4359 106 A/R I-60035 \N 9811.50 TTOYS-Tremendous Toys Incorporated 3709 t CR f jsmith f 8703 f 2007-04-05 15:51:14.968-04 2007-04-05 4360 106 A/R 60036 \N -35000.00 3710 t IN f jsmith f 8702 f 2007-04-05 15:51:14.968-04 2007-04-05 4360 103 A/R 60036 \N 35000.00 3710 t IN f jsmith f 9126 f 2007-08-31 11:05:32.687-04 2007-08-31 4567 96 S/R 40006-1 3291 -638.18 Issue to Shipping 3958 t SO f mfgadmin f 9127 f 2007-08-31 11:06:05.406-04 2007-08-31 4568 96 S/R 40006 -1 638.18 Ship Shipment 3959 t SO f mfgadmin f 9129 f 2007-08-31 11:11:48.046-04 2007-08-31 4569 103 A/R 60042 \N 950.00 3960 t IN f mfgadmin f 10926 f 2009-08-13 08:50:25.065315-04 2009-08-13 5403 86 W/O 10061-1 3623 8210.00 Receive Inventory TKIT1 from Manufacturing 5490 t WO f admin f 10927 f 2009-08-13 08:50:25.065315-04 2009-08-13 5403 138 W/O 10061-1 3623 -8210.00 Receive Inventory TKIT1 from Manufacturing 5490 t WO f admin f 10928 f 2009-08-13 08:50:29.387888-04 2009-08-13 5404 86 W/O 10061-1 -1 -2358.90 Manufacturing Inventory Cost Variance for TKIT1 5491 t WO f admin f 10929 f 2009-08-13 08:50:29.387888-04 2009-08-13 5404 87 W/O 10061-1 -1 2358.90 Manufacturing Inventory Cost Variance for TKIT1 5491 t WO f admin f 10931 f 2009-08-13 08:52:34.091695-04 2009-08-13 5405 86 W/O 50195-1 3624 -4000.00 Material TWHEEL1 Issue to Work Order 5493 t WO f admin f 10930 f 2009-08-13 08:52:34.091695-04 2009-08-13 5405 138 W/O 50195-1 3624 4000.00 Material TWHEEL1 Issue to Work Order 5493 t WO f admin f 10933 f 2009-08-13 08:52:34.091695-04 2009-08-13 5406 86 W/O 50195-1 3625 -8210.00 Material TKIT1 Issue to Work Order 5494 t WO f admin f 10737 f 2009-06-26 16:04:41.310155-04 2009-06-26 5332 86 W/O Misc. 3589 821.00 Receive from Misc. Production for Item Number TKIT1\n 5395 t WO f admin f 10738 f 2009-06-26 16:04:41.310155-04 2009-06-26 5332 138 W/O Misc. 3589 -821.00 Receive from Misc. Production for Item Number TKIT1\n 5395 t WO f admin f 10740 f 2009-06-26 16:04:41.310155-04 2009-06-26 5333 86 W/O Misc. 3590 -200.00 Consumed during Misc. Production of Item Number TKIT1\n 5396 t WO f admin f 10739 f 2009-06-26 16:04:41.310155-04 2009-06-26 5333 138 W/O Misc. 3590 200.00 Consumed during Misc. Production of Item Number TKIT1\n 5396 t WO f admin f 10742 f 2009-06-26 16:04:41.310155-04 2009-06-26 5334 86 W/O Misc. 3591 -500.00 Consumed during Misc. Production of Item Number TKIT1\n 5397 t WO f admin f 10741 f 2009-06-26 16:04:41.310155-04 2009-06-26 5334 138 W/O Misc. 3591 500.00 Consumed during Misc. Production of Item Number TKIT1\n 5397 t WO f admin f 10744 f 2009-06-26 16:04:41.310155-04 2009-06-26 5335 86 W/O Misc. 3589 -121.00 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TKIT1 5398 t WO f admin f 10743 f 2009-06-26 16:04:41.310155-04 2009-06-26 5335 94 W/O Misc. 3589 121.00 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number TKIT1 5398 t WO f admin f 10745 f 2009-06-26 16:06:00.949558-04 2009-06-26 5336 95 S/R 20065 3592 200.00 Receive Inventory from P/O for Toy Parts Inc. 5401 t PO f admin f 10746 f 2009-06-26 16:06:00.949558-04 2009-06-26 5336 138 S/R 20065 3592 -200.00 Receive Inventory from P/O for Toy Parts Inc. 5401 t PO f admin f 10747 f 2009-06-26 16:06:32.570333-04 2009-06-26 5337 99 A/P 30071 \N 200.00 TPARTS-Toy Parts Inc. 311231 5403 t VO f admin f 10748 f 2009-06-26 16:06:32.570333-04 2009-06-26 5337 95 A/P 30071 \N -200.00 TPARTS-Toy Parts Inc. 311231 5403 t VO f admin f 10751 f 2009-06-26 16:07:06.495372-04 2009-06-26 5338 99 A/P 4014 175 -196.00 TPARTS-Toy Parts Inc. 5405 t CK f admin f 10750 f 2009-06-26 16:07:06.495372-04 2009-06-26 5339 101 A/P 30071 \N 4.00 Discount for V 30071 5406 t DS f admin f 10749 f 2009-06-26 16:07:06.495372-04 2009-06-26 5339 99 A/P 30071 \N -4.00 Discount for V 30071 5406 t DS f admin f 10753 f 2009-06-26 16:07:52.029442-04 2009-06-26 5340 86 W/O Misc. 3593 770.34 Receive from Misc. Production for Item Number BTRUCK1\n 5408 t WO f admin f 10754 f 2009-06-26 16:07:52.029442-04 2009-06-26 5340 85 W/O Misc. 3593 -770.34 Receive from Misc. Production for Item Number BTRUCK1\n 5408 t WO f admin f 10756 f 2009-06-26 16:07:52.029442-04 2009-06-26 5341 86 W/O Misc. 3594 -300.00 Consumed during Misc. Production of Item Number BTRUCK1\n 5409 t WO f admin f 10755 f 2009-06-26 16:07:52.029442-04 2009-06-26 5341 138 W/O Misc. 3594 300.00 Consumed during Misc. Production of Item Number BTRUCK1\n 5409 t WO f admin f 10758 f 2009-06-26 16:07:52.029442-04 2009-06-26 5342 86 W/O Misc. 3595 -2.40 Consumed during Misc. Production of Item Number BTRUCK1\n 5410 t WO f admin f 10757 f 2009-06-26 16:07:52.029442-04 2009-06-26 5342 138 W/O Misc. 3595 2.40 Consumed during Misc. Production of Item Number BTRUCK1\n 5410 t WO f admin f 10760 f 2009-06-26 16:07:52.029442-04 2009-06-26 5343 86 W/O Misc. 3596 -120.00 Consumed during Misc. Production of Item Number BTRUCK1\n 5411 t WO f admin f 10759 f 2009-06-26 16:07:52.029442-04 2009-06-26 5343 138 W/O Misc. 3596 120.00 Consumed during Misc. Production of Item Number BTRUCK1\n 5411 t WO f admin f 10762 f 2009-06-26 16:07:52.029442-04 2009-06-26 5344 86 W/O Misc. 3597 -246.30 Consumed during Misc. Production of Item Number BTRUCK1\n 5412 t WO f admin f 10761 f 2009-06-26 16:07:52.029442-04 2009-06-26 5344 138 W/O Misc. 3597 246.30 Consumed during Misc. Production of Item Number BTRUCK1\n 5412 t WO f admin f 10764 f 2009-06-26 16:07:52.029442-04 2009-06-26 5345 86 W/O Misc. 3593 -101.64 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number BTRUCK1 5413 t WO f admin f 10763 f 2009-06-26 16:07:52.029442-04 2009-06-26 5345 94 W/O Misc. 3593 101.64 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number BTRUCK1 5413 t WO f admin f 10765 f 2009-06-26 16:08:11.32276-04 2009-06-26 5346 86 W/O Misc. 3598 770.34 Receive from Misc. Production for Item Number WTRUCK1\n 5416 t WO f admin f 10766 f 2009-06-26 16:08:11.32276-04 2009-06-26 5346 85 W/O Misc. 3598 -770.34 Receive from Misc. Production for Item Number WTRUCK1\n 5416 t WO f admin f 10768 f 2009-06-26 16:08:11.32276-04 2009-06-26 5347 86 W/O Misc. 3599 -300.00 Consumed during Misc. Production of Item Number WTRUCK1\n 5417 t WO f admin f 10767 f 2009-06-26 16:08:11.32276-04 2009-06-26 5347 138 W/O Misc. 3599 300.00 Consumed during Misc. Production of Item Number WTRUCK1\n 5417 t WO f admin f 10770 f 2009-06-26 16:08:11.32276-04 2009-06-26 5348 86 W/O Misc. 3600 -2.40 Consumed during Misc. Production of Item Number WTRUCK1\n 5418 t WO f admin f 10769 f 2009-06-26 16:08:11.32276-04 2009-06-26 5348 138 W/O Misc. 3600 2.40 Consumed during Misc. Production of Item Number WTRUCK1\n 5418 t WO f admin f 10772 f 2009-06-26 16:08:11.32276-04 2009-06-26 5349 86 W/O Misc. 3601 -120.00 Consumed during Misc. Production of Item Number WTRUCK1\n 5419 t WO f admin f 8710 f 2007-05-26 21:19:38.796-04 2007-05-26 4364 87 P/D Post Cost 297 1008.75 Post Actual Cost to Standard for item YPAINT1 3714 t f mfgadmin f 8711 f 2007-05-26 21:19:38.796-04 2007-05-26 4364 85 P/D Post Cost 297 -1008.75 Post Actual Cost to Standard for item YPAINT1 3714 t f mfgadmin f 8712 f 2007-05-30 08:42:03.75-04 2007-05-30 4365 95 S/R 20032 3191 110.00 Receive Inventory from P/O 3715 t PO f mfgadmin f 8713 f 2007-05-30 08:42:03.75-04 2007-05-30 4365 85 S/R 20032 3191 -110.00 Receive Inventory from P/O 3715 t PO f mfgadmin f 8714 f 2007-05-30 08:42:03.75-04 2007-05-30 4366 95 S/R 20032 3192 1000.00 Receive Inventory from P/O 3717 t PO f mfgadmin f 8715 f 2007-05-30 08:42:03.75-04 2007-05-30 4366 85 S/R 20032 3192 -1000.00 Receive Inventory from P/O 3717 t PO f mfgadmin f 8716 f 2007-05-30 08:42:03.75-04 2007-05-30 4367 95 S/R 20032 3193 1600.00 Receive Inventory from P/O 3719 t PO f mfgadmin f 8717 f 2007-05-30 08:42:03.75-04 2007-05-30 4367 85 S/R 20032 3193 -1600.00 Receive Inventory from P/O 3719 t PO f mfgadmin f 8718 f 2007-05-30 08:42:03.75-04 2007-05-30 4368 95 S/R 20032 3194 500.00 Receive Inventory from P/O 3721 t PO f mfgadmin f 8719 f 2007-05-30 08:42:03.75-04 2007-05-30 4368 85 S/R 20032 3194 -500.00 Receive Inventory from P/O 3721 t PO f mfgadmin f 9131 f 2007-08-31 11:11:48.046-04 2007-08-31 4569 122 A/R 60042 \N 37.00 3960 t IN f mfgadmin f 9132 f 2007-08-31 11:11:48.046-04 2007-08-31 4569 106 A/R 60042 \N -1034.50 3960 t IN f mfgadmin f 9130 f 2007-08-31 11:11:48.046-04 2007-08-31 4569 102 A/R 60042 \N 47.50 3960 t IN f mfgadmin f 9134 f 2007-08-31 11:12:12.265-04 2007-08-31 4570 133 A/R R -1 -500.00 20013 3961 t CD f mfgadmin f 9133 f 2007-08-31 11:12:12.265-04 2007-08-31 4570 106 A/R R -1 500.00 20013 3961 t CD f mfgadmin f 10771 f 2009-06-26 16:08:11.32276-04 2009-06-26 5349 138 W/O Misc. 3601 120.00 Consumed during Misc. Production of Item Number WTRUCK1\n 5419 t WO f admin f 10774 f 2009-06-26 16:08:11.32276-04 2009-06-26 5350 86 W/O Misc. 3602 -246.30 Consumed during Misc. Production of Item Number WTRUCK1\n 5420 t WO f admin f 10773 f 2009-06-26 16:08:11.32276-04 2009-06-26 5350 138 W/O Misc. 3602 246.30 Consumed during Misc. Production of Item Number WTRUCK1\n 5420 t WO f admin f 10776 f 2009-06-26 16:08:11.32276-04 2009-06-26 5351 86 W/O Misc. 3598 -101.64 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number WTRUCK1 5421 t WO f admin f 10775 f 2009-06-26 16:08:11.32276-04 2009-06-26 5351 94 W/O Misc. 3598 101.64 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number WTRUCK1 5421 t WO f admin f 10777 f 2009-06-26 16:08:38.016253-04 2009-06-26 5352 86 W/O Misc. 3603 1027.12 Receive from Misc. Production for Item Number RTRUCK1\n 5424 t WO f admin f 10778 f 2009-06-26 16:08:38.016253-04 2009-06-26 5352 85 W/O Misc. 3603 -1027.12 Receive from Misc. Production for Item Number RTRUCK1\n 5424 t WO f admin f 10780 f 2009-06-26 16:08:38.016253-04 2009-06-26 5353 86 W/O Misc. 3604 -400.00 Consumed during Misc. Production of Item Number RTRUCK1\n 5425 t WO f admin f 10779 f 2009-06-26 16:08:38.016253-04 2009-06-26 5353 138 W/O Misc. 3604 400.00 Consumed during Misc. Production of Item Number RTRUCK1\n 5425 t WO f admin f 10782 f 2009-06-26 16:08:38.016253-04 2009-06-26 5354 86 W/O Misc. 3605 -3.20 Consumed during Misc. Production of Item Number RTRUCK1\n 5426 t WO f admin f 10781 f 2009-06-26 16:08:38.016253-04 2009-06-26 5354 138 W/O Misc. 3605 3.20 Consumed during Misc. Production of Item Number RTRUCK1\n 5426 t WO f admin f 10784 f 2009-06-26 16:08:38.016253-04 2009-06-26 5355 86 W/O Misc. 3606 -160.00 Consumed during Misc. Production of Item Number RTRUCK1\n 5427 t WO f admin f 10783 f 2009-06-26 16:08:38.016253-04 2009-06-26 5355 138 W/O Misc. 3606 160.00 Consumed during Misc. Production of Item Number RTRUCK1\n 5427 t WO f admin f 10786 f 2009-06-26 16:08:38.016253-04 2009-06-26 5356 86 W/O Misc. 3607 -328.40 Consumed during Misc. Production of Item Number RTRUCK1\n 5428 t WO f admin f 10785 f 2009-06-26 16:08:38.016253-04 2009-06-26 5356 138 W/O Misc. 3607 328.40 Consumed during Misc. Production of Item Number RTRUCK1\n 5428 t WO f admin f 10788 f 2009-06-26 16:08:38.016253-04 2009-06-26 5357 86 W/O Misc. 3603 -135.52 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number RTRUCK1 5429 t WO f admin f 10787 f 2009-06-26 16:08:38.016253-04 2009-06-26 5357 94 W/O Misc. 3603 135.52 Direct Labor And Overhead Costs of Post to Misc. Production for Item Number RTRUCK1 5429 t WO f admin f 10790 f 2009-06-26 16:11:32.419021-04 2009-06-26 5358 96 S/R 50194-3 3608 -1027.12 Issue RTRUCK1 to Shipping for customer Xtreme Toys LTD 5432 t SO f admin f 10789 f 2009-06-26 16:11:32.419021-04 2009-06-26 5358 85 S/R 50194-3 3608 1027.12 Issue RTRUCK1 to Shipping for customer Xtreme Toys LTD 5432 t SO f admin f 10792 f 2009-06-26 16:11:35.256986-04 2009-06-26 5359 96 S/R 50194-2 3609 -770.34 Issue WTRUCK1 to Shipping for customer Xtreme Toys LTD 5433 t SO f admin f 10791 f 2009-06-26 16:11:35.256986-04 2009-06-26 5359 85 S/R 50194-2 3609 770.34 Issue WTRUCK1 to Shipping for customer Xtreme Toys LTD 5433 t SO f admin f 10794 f 2009-06-26 16:11:42.700487-04 2009-06-26 5360 96 S/R 50194-1 3610 -770.34 Issue BTRUCK1 to Shipping for customer Xtreme Toys LTD 5434 t SO f admin f 10793 f 2009-06-26 16:11:42.700487-04 2009-06-26 5360 85 S/R 50194-1 3610 770.34 Issue BTRUCK1 to Shipping for customer Xtreme Toys LTD 5434 t SO f admin f 10796 f 2009-06-26 16:12:00.002025-04 2009-06-26 5361 108 S/R 60043 -1 -770.34 Ship Shipment to Customer Xtreme Toys LTD 5435 t SH f admin f 10795 f 2009-06-26 16:12:00.002025-04 2009-06-26 5361 96 S/R 60043 -1 770.34 Ship Shipment to Customer Xtreme Toys LTD 5435 t SH f admin f 10798 f 2009-06-26 16:12:00.002025-04 2009-06-26 5362 108 S/R 60043 -1 -1027.12 Ship Shipment to Customer Xtreme Toys LTD 5436 t SH f admin f 10797 f 2009-06-26 16:12:00.002025-04 2009-06-26 5362 96 S/R 60043 -1 1027.12 Ship Shipment to Customer Xtreme Toys LTD 5436 t SH f admin f 10800 f 2009-06-26 16:12:00.002025-04 2009-06-26 5363 108 S/R 60043 -1 -770.34 Ship Shipment to Customer Xtreme Toys LTD 5437 t SH f admin f 10799 f 2009-06-26 16:12:00.002025-04 2009-06-26 5363 96 S/R 60043 -1 770.34 Ship Shipment to Customer Xtreme Toys LTD 5437 t SH f admin f 10801 f 2009-06-26 16:12:10.106442-04 2009-06-26 5364 122 A/R 60080 \N 3750.00 Xtreme Toys LTD 5438 t IN f admin f 10803 f 2009-06-26 16:12:10.106442-04 2009-06-26 5364 106 A/R 60080 \N -14080.63 Xtreme Toys LTD 5438 t IN f admin f 10802 f 2009-06-26 16:12:10.106442-04 2009-06-26 5364 141 A/R 60080 \N 10330.63 Xtreme Toys LTD 5438 t IN f admin f 10804 f 2009-06-26 16:13:26.006581-04 2009-06-26 5365 127 A/R C- \N -14080.63 XTRM-Xtreme Toys LTD 5439 t CR f admin f 10805 f 2009-06-26 16:13:26.006581-04 2009-06-26 5365 106 A/R I-60080 \N 14080.63 XTRM-Xtreme Toys LTD 5439 t CR f admin f 10823 f 2009-06-26 16:19:29.648604-04 2009-06-26 5370 108 G/L Ship Order \N -45250.00 5444 t ST f admin f 10822 f 2009-06-26 16:19:29.648604-04 2009-06-26 5370 85 G/L Ship Order \N 45250.00 5444 t ST f admin f 10825 f 2009-06-26 16:19:29.648604-04 2009-06-26 5370 103 G/L Ship Order \N 77250.00 5444 t ST f admin f 10828 f 2009-06-26 16:23:40.731159-04 2009-06-26 5372 111 A/P 30072 \N -34999.79 WCHEM-World Chem, Inc. Machine SRN#123101 5446 t VO f admin f 10829 f 2009-06-26 16:23:40.731159-04 2009-06-26 5372 99 A/P 30072 \N 34999.79 WCHEM-World Chem, Inc. Machine SRN#123101 5446 t VO f admin f 10832 f 2009-06-26 16:25:10.553859-04 2009-06-26 5373 126 A/P 5012 176 34299.79 WCHEM-World Chem, Inc. 5448 t CK f admin f 10833 f 2009-06-26 16:25:10.553859-04 2009-06-26 5373 99 A/P 5012 176 -34299.79 WCHEM-World Chem, Inc. 5448 t CK f admin f 10831 f 2009-06-26 16:25:10.553859-04 2009-06-26 5374 101 A/P 30072 \N 700.00 Discount for V 30072 5449 t DS f admin f 10830 f 2009-06-26 16:25:10.553859-04 2009-06-26 5374 99 A/P 30072 \N -700.00 Discount for V 30072 5449 t DS f admin f 10671 f 2009-01-12 13:16:07.741834-05 2009-01-12 5301 99 A/P 30067 \N 7980.00 TPARTS-Toy Parts Inc. RF101991 5356 t VO f jsmith f 10669 f 2009-01-12 13:16:07.741834-05 2009-01-12 5301 95 A/P 30067 \N -7703.40 TPARTS-Toy Parts Inc. RF101991 5356 t VO f jsmith f 10674 f 2009-01-12 13:18:59.949285-05 2009-01-12 5302 99 A/P 4010 170 -7820.40 TPARTS-Toy Parts Inc. 5358 t CK f jsmith f 10673 f 2009-01-12 13:18:59.949285-05 2009-01-12 5303 101 A/P 30067 \N 159.60 Discount for V 30067 5359 t DS f jsmith f 10672 f 2009-01-12 13:18:59.949285-05 2009-01-12 5303 99 A/P 30067 \N -159.60 Discount for V 30067 5359 t DS f jsmith f 10676 f 2009-01-12 13:24:44.992694-05 2009-01-12 5304 131 A/P 4011 171 -100.00 TPARTS-Toy Parts Inc. 5362 t CK f jsmith f 10679 f 2009-01-12 13:37:23.336834-05 2009-01-12 5305 96 S/R 50191-1 3582 -2567.80 Issue BTRUCK1 to Shipping for customer Xtreme Toys LTD 5363 t SO f jsmith f 10678 f 2009-01-12 13:37:23.336834-05 2009-01-12 5305 85 S/R 50191-1 3582 2567.80 Issue BTRUCK1 to Shipping for customer Xtreme Toys LTD 5363 t SO f jsmith f 10681 f 2009-01-12 13:37:23.336834-05 2009-01-12 5306 96 S/R 50191-2 3583 -2567.80 Issue RTRUCK1 to Shipping for customer Xtreme Toys LTD 5364 t SO f jsmith f 10680 f 2009-01-12 13:37:23.336834-05 2009-01-12 5306 85 S/R 50191-2 3583 2567.80 Issue RTRUCK1 to Shipping for customer Xtreme Toys LTD 5364 t SO f jsmith f 10683 f 2009-01-12 13:37:23.336834-05 2009-01-12 5307 96 S/R 50191-3 3584 -2567.80 Issue WTRUCK1 to Shipping for customer Xtreme Toys LTD 5365 t SO f jsmith f 10682 f 2009-01-12 13:37:23.336834-05 2009-01-12 5307 85 S/R 50191-3 3584 2567.80 Issue WTRUCK1 to Shipping for customer Xtreme Toys LTD 5365 t SO f jsmith f 10685 f 2009-01-12 13:38:18.764259-05 2009-01-12 5308 108 S/R 60040 -1 -2567.80 Ship Shipment to Customer Xtreme Toys LTD 5366 t SH f jsmith f 10684 f 2009-01-12 13:38:18.764259-05 2009-01-12 5308 96 S/R 60040 -1 2567.80 Ship Shipment to Customer Xtreme Toys LTD 5366 t SH f jsmith f 10687 f 2009-01-12 13:38:18.764259-05 2009-01-12 5309 108 S/R 60040 -1 -2567.80 Ship Shipment to Customer Xtreme Toys LTD 5367 t SH f jsmith f 10686 f 2009-01-12 13:38:18.764259-05 2009-01-12 5309 96 S/R 60040 -1 2567.80 Ship Shipment to Customer Xtreme Toys LTD 5367 t SH f jsmith f 10689 f 2009-01-12 13:38:18.764259-05 2009-01-12 5310 108 S/R 60040 -1 -2567.80 Ship Shipment to Customer Xtreme Toys LTD 5368 t SH f jsmith f 10688 f 2009-01-12 13:38:18.764259-05 2009-01-12 5310 96 S/R 60040 -1 2567.80 Ship Shipment to Customer Xtreme Toys LTD 5368 t SH f jsmith f 10691 f 2009-01-12 13:38:36.11506-05 2009-01-12 5311 122 A/R 60076 \N 720.00 Xtreme Toys LTD 5369 t IN f jsmith f 10692 f 2009-01-12 13:38:36.11506-05 2009-01-12 5311 106 A/R 60076 \N -31711.89 Xtreme Toys LTD 5369 t IN f jsmith f 10690 f 2009-01-12 13:38:36.11506-05 2009-01-12 5311 103 A/R 60076 \N 30991.89 Xtreme Toys LTD 5369 t IN f jsmith f 10694 f 2009-01-12 13:51:21.410148-05 2009-01-12 5312 103 G/L AdjRev -1 -30991.89 Adjust revenue after creating new customer type and mapping for international revenue 5370 t JE f jsmith f 10693 f 2009-01-12 13:51:21.410148-05 2009-01-12 5312 141 G/L AdjRev -1 30991.89 Adjust revenue after creating new customer type and mapping for international revenue 5370 t JE f jsmith f 10696 f 2009-01-12 13:53:23.947611-05 2009-01-12 5313 96 S/R 50192-1 3585 -12.56 Issue STRUCK1 to Shipping for customer Tremendous Toys Incorporated 5371 t SO f jsmith f 10695 f 2009-01-12 13:53:23.947611-05 2009-01-12 5313 85 S/R 50192-1 3585 12.56 Issue STRUCK1 to Shipping for customer Tremendous Toys Incorporated 5371 t SO f jsmith f 10698 f 2009-01-12 13:53:52.654529-05 2009-01-12 5314 108 S/R 60041 -1 -12.56 Ship Shipment to Customer Tremendous Toys Incorporated 5372 t SH f jsmith f 10697 f 2009-01-12 13:53:52.654529-05 2009-01-12 5314 96 S/R 60041 -1 12.56 Ship Shipment to Customer Tremendous Toys Incorporated 5372 t SH f jsmith f 10701 f 2009-01-12 13:54:19.007811-05 2009-01-12 5315 122 A/R 60077 \N 7.50 Tremendous Toys Incorporated 5373 t IN f jsmith f 10705 f 2009-01-12 13:54:59.572221-05 2009-01-12 5317 96 S/R 60042 -1 12.56 Ship Shipment to Customer Xtreme Toys LTD 5375 t SH f jsmith f 10708 f 2009-01-12 13:56:06.265882-05 2009-01-12 5319 122 A/R 60078 \N 7.50 Xtreme Toys LTD 5377 t IN f jsmith f 10709 f 2009-01-12 13:56:06.265882-05 2009-01-12 5319 106 A/R 60078 \N -100.55 Xtreme Toys LTD 5377 t IN f jsmith f 10707 f 2009-01-12 13:56:06.265882-05 2009-01-12 5319 141 A/R 60078 \N 93.05 Xtreme Toys LTD 5377 t IN f jsmith f 10711 f 2009-01-12 14:00:32.343057-05 2009-01-12 5320 106 A/R I-60076 \N 31711.88 XTRM-Xtreme Toys LTD 5378 t CR f jsmith f 10712 f 2009-01-12 14:00:32.343057-05 2009-01-12 5320 106 A/R I-60078 \N 100.56 XTRM-Xtreme Toys LTD 5378 t CR f jsmith f 10713 f 2009-01-12 14:00:46.322138-05 2009-01-12 5321 109 A/R C-123123 \N -101.06 TTOYS-Tremendous Toys Incorporated 5379 t CR t jsmith f 12229 f 2010-06-07 11:45:35.286708-04 2010-06-07 6023 94 W/O 10075-1 -1 110.00 \N 6235 t WO f admin f 10714 f 2009-01-12 14:00:46.322138-05 2009-01-12 5321 106 A/R I-60077 \N 101.06 TTOYS-Tremendous Toys Incorporated 5379 t CR f jsmith f 10716 f 2009-01-12 14:08:42.607999-05 2009-01-12 5322 99 A/P 30068 \N 500.00 VOFFP-Office Plus RF10001 5380 t VO f jsmith f 10715 f 2009-01-12 14:08:42.607999-05 2009-01-12 5322 131 A/P 30068 \N -500.00 VOFFP-Office Plus RF10001 5380 t VO f jsmith f 10719 f 2009-01-12 14:08:46.729325-05 2009-01-12 5323 99 A/P 30069 \N 1800.00 UPS-United Parcel Service Jan09 5381 t VO f jsmith f 10718 f 2009-01-12 14:08:46.729325-05 2009-01-12 5323 139 A/P 30069 \N -300.00 UPS-United Parcel Service Jan09 5381 t VO f jsmith f 10717 f 2009-01-12 14:08:46.729325-05 2009-01-12 5323 120 A/P 30069 \N -1500.00 UPS-United Parcel Service Jan09 5381 t VO f jsmith f 10721 f 2009-01-12 14:10:33.471248-05 2009-01-12 5324 109 A/P 4012 173 1800.00 UPS-United Parcel Service 5384 t CK t jsmith f 10720 f 2009-01-12 14:10:33.471248-05 2009-01-12 5324 99 A/P 4012 173 -1800.00 UPS-United Parcel Service 5384 t CK f jsmith f 10723 f 2009-01-12 14:10:39.480439-05 2009-01-12 5325 109 A/P 4013 172 500.00 VOFFP-Office Plus 5385 t CK t jsmith f 10722 f 2009-01-12 14:10:39.480439-05 2009-01-12 5325 99 A/P 4013 172 -500.00 VOFFP-Office Plus 5385 t CK f jsmith f 8896 f 2007-05-30 09:24:46.765-04 2007-05-30 4456 96 S/R 50163-1 3243 -638.18 Issue to Shipping 3827 t SO f mfgadmin f 9043 f 2007-08-03 03:54:41.39-04 2007-06-04 4527 99 A/P 30036 \N 100.00 NC TAX-North Carolina IRS MA_22 3915 t VO f mfgadmin f 9042 f 2007-08-03 03:54:41.39-04 2007-06-04 4527 129 A/P 30036 \N -100.00 NC TAX-North Carolina IRS MA_22 3915 t VO f mfgadmin f 9049 f 2007-08-03 03:57:24.296-04 2007-06-04 4530 108 G/L Ship Order \N -15000.00 3917 t ST f mfgadmin f 9046 f 2007-08-03 03:57:24.296-04 2007-06-04 4530 109 G/L Ship Order \N -50000.00 3917 t ST t mfgadmin f 9048 f 2007-08-03 03:57:24.296-04 2007-06-04 4530 85 G/L Ship Order \N 15000.00 3917 t ST f mfgadmin f 9047 f 2007-08-03 03:57:24.296-04 2007-06-04 4530 103 G/L Ship Order \N 50000.00 3917 t ST f mfgadmin f 9045 f 2007-08-03 03:54:53.453-04 2007-07-04 4528 99 A/P 30037 \N 1200.00 VOFFP-Office Plus RF-01001 3916 t VO f mfgadmin f 9044 f 2007-08-03 03:54:53.453-04 2007-07-04 4528 131 A/P 30037 \N -1200.00 VOFFP-Office Plus RF-01001 3916 t VO f mfgadmin f 9053 f 2007-08-03 03:58:24.812-04 2007-07-04 4531 108 G/L Ship Order \N -15000.00 3918 t ST f mfgadmin f 9050 f 2007-08-03 03:58:24.812-04 2007-07-04 4531 109 G/L Ship Order \N -50000.00 3918 t ST t mfgadmin f 9052 f 2007-08-03 03:58:24.812-04 2007-07-04 4531 85 G/L Ship Order \N 15000.00 3918 t ST f mfgadmin f 9051 f 2007-08-03 03:58:24.812-04 2007-07-04 4531 103 G/L Ship Order \N 50000.00 3918 t ST f mfgadmin f 9056 f 2007-08-03 03:59:55.156-04 2007-07-04 4532 106 A/R 60041 \N -13545.00 3919 t IN f mfgadmin f 9055 f 2007-08-03 03:59:55.156-04 2007-07-04 4532 102 A/R 60041 \N 645.00 3919 t IN f mfgadmin f 9054 f 2007-08-03 03:59:55.156-04 2007-07-04 4532 103 A/R 60041 \N 12900.00 3919 t IN f mfgadmin f 9058 f 2007-08-03 04:04:05.062-04 2007-08-03 4533 109 A/P 3032 137 100.00 NC TAX-North Carolina IRS 3920 t CK t mfgadmin f 9057 f 2007-08-03 04:04:05.062-04 2007-08-03 4533 99 A/P 3032 137 -100.00 NC TAX-North Carolina IRS 3920 t CK f mfgadmin f 9060 f 2007-08-03 04:04:10.14-04 2007-08-03 4534 109 A/P 3031 136 1200.00 VOFFP-Office Plus 3921 t CK t mfgadmin f 9059 f 2007-08-03 04:04:10.14-04 2007-08-03 4534 99 A/P 3031 136 -1200.00 VOFFP-Office Plus 3921 t CK f mfgadmin f 9061 f 2007-08-03 04:06:53.515-04 2007-08-03 4536 109 A/R C-123111 \N -13545.00 TTOYS-Tremendous Toys Incorporated 3923 t CR t mfgadmin f 9089 f 2007-08-31 10:58:22.421-04 2007-08-31 4548 99 A/P 3033 138 -24.50 TPARTS-Toy Parts Inc. 3935 t CK f mfgadmin f 9088 f 2007-08-31 10:58:22.421-04 2007-08-31 4549 101 A/P 30038 \N 0.50 Discount for V 30038 3936 t DS f mfgadmin f 9087 f 2007-08-31 10:58:22.421-04 2007-08-31 4549 99 A/P 30038 \N -0.50 Discount for V 30038 3936 t DS f mfgadmin f 9092 f 2007-08-31 10:59:55.343-04 2007-08-31 4550 86 W/O 10039-1 3283 -27.50 Material Issue to Work Order 3938 t WO f mfgadmin f 9091 f 2007-08-31 10:59:55.343-04 2007-08-31 4550 85 W/O 10039-1 3283 27.50 Material Issue to Work Order 3938 t WO f mfgadmin f 9094 f 2007-08-31 10:59:55.343-04 2007-08-31 4551 86 W/O 10039-1 3284 -25.00 Material Issue to Work Order 3939 t WO f mfgadmin f 9093 f 2007-08-31 10:59:55.343-04 2007-08-31 4551 85 W/O 10039-1 3284 25.00 Material Issue to Work Order 3939 t WO f mfgadmin f 9095 f 2007-08-31 11:00:21.625-04 2007-08-31 4552 86 W/O 10039-1 3285 64.60 Receive Inventory from Manufacturing 3940 t WO f mfgadmin f 9096 f 2007-08-31 11:00:21.625-04 2007-08-31 4552 85 W/O 10039-1 3285 -64.60 Receive Inventory from Manufacturing 3940 t WO f mfgadmin f 9098 f 2007-08-31 11:00:21.625-04 2007-08-31 4553 86 W/O 10039-1 -1 -1.10 Post Setup Time to Work Order 3941 t WO f mfgadmin f 9097 f 2007-08-31 11:00:21.625-04 2007-08-31 4553 94 W/O 10039-1 -1 1.10 Post Setup Time to Work Order 3941 t WO f mfgadmin f 9100 f 2007-08-31 11:00:21.625-04 2007-08-31 4554 86 W/O 10039-1 -1 -11.00 Post Run Time to Work Order 3942 t WO f mfgadmin f 9099 f 2007-08-31 11:00:21.625-04 2007-08-31 4554 94 W/O 10039-1 -1 11.00 Post Run Time to Work Order 3942 t WO f mfgadmin f 9101 f 2007-08-31 11:03:44.609-04 2007-08-31 4555 86 W/O 40006-1 3286 638.18 Receive Inventory from Manufacturing 3945 t WO f mfgadmin f 8426 f 2006-11-17 14:45:40.781-05 2006-11-17 4237 109 G/L -1 100.00 Special Entry 3570 t JE t jsmith f 8448 f 2006-12-27 13:34:13.703-05 2006-11-15 4247 109 G/L MA-CASH-1 -1 -200000.00 Sell Stock 3580 t JE t mfgadmin f 8455 f 2006-12-27 13:44:14.421-05 2006-11-30 4251 109 G/L Ship Order \N -50000.00 3584 t ST t mfgadmin f 8442 f 2006-12-05 18:51:26.75-05 2006-12-05 4244 109 A/P 3018 119 3417.00 TPARTS-Toy Parts Inc. 3577 t CK t mfgadmin f 8459 f 2006-12-27 13:44:41.515-05 2006-12-02 4252 109 G/L Ship Order \N -50000.00 3585 t ST t mfgadmin f 8463 f 2006-12-27 13:44:59.093-05 2006-12-04 4253 109 G/L Ship Order \N -50000.00 3586 t ST t mfgadmin f 8480 f 2006-12-28 11:36:18.937-05 2006-12-28 4259 109 A/P 3020 121 100.00 TPARTS-Toy Parts Inc. 3594 t CK t mfgadmin f 8537 f 2007-01-03 14:48:30.703-05 2007-01-03 4285 109 A/P 3021 123 8820.00 TPARTS-Toy Parts Inc. 3625 t CK t mfgadmin f 8538 f 2007-01-03 14:49:20.421-05 2007-01-03 4286 109 G/L Ship Order \N -50000.00 3626 t ST t mfgadmin f 8544 f 2007-01-08 13:56:04.168-05 2007-01-08 4287 109 A/R C-20134 \N -2068.06 TTOYS-Tremendous Toys Incorporated 3627 t CR t jsmith f 8582 f 2007-02-20 08:30:17.454-05 2007-02-20 4304 109 A/P 3022 124 49.00 TPARTS-Toy Parts Inc. 3646 t CK t mfgadmin f 8636 f 2007-02-20 08:39:40.813-05 2007-02-20 4330 109 A/R C-123111 \N -1236.56 TTOYS-Tremendous Toys Incorporated 3677 t CR t mfgadmin f 8648 f 2007-02-20 08:44:13.673-05 2007-02-20 4336 109 A/R C-10112 \N -1042.50 TTOYS-Tremendous Toys Incorporated 3683 t CR t mfgadmin f 8650 f 2007-02-20 08:46:57.688-05 2007-02-20 4337 109 G/L Ship Order \N -50000.00 3684 t ST t mfgadmin f 8701 f 2007-04-05 15:50:01.515-04 2007-04-05 4359 109 A/R C-1882 \N -9811.50 TTOYS-Tremendous Toys Incorporated 3709 t CR t jsmith f 8704 f 2007-04-05 15:51:32.593-04 2007-04-05 4361 109 A/R C-35112 \N -35000.00 TTOYS-Tremendous Toys Incorporated 3711 t CR t jsmith f 8707 f 2007-04-05 15:53:55.453-04 2007-04-06 4362 109 A/P 3024 127 1200.00 VOFFP-Office Plus 3712 t CK t jsmith f 8709 f 2007-04-05 15:54:01.468-04 2007-04-06 4363 109 A/P 3025 128 500.00 VOFFP-Office Plus 3713 t CK t jsmith f 8740 f 2007-05-30 08:56:10.39-04 2007-05-30 4378 109 A/P 3027 130 399.00 VOFFP-Office Plus 3735 t CK t mfgadmin f 8742 f 2007-05-30 08:56:13.921-04 2007-05-30 4379 109 A/P 3026 129 3842.50 TPARTS-Toy Parts Inc. 3736 t CK t mfgadmin f 8916 f 2007-05-30 09:42:31.078-04 2007-05-30 4465 109 A/R C-123111 \N -7468.17 TTOYS-Tremendous Toys Incorporated 3836 t CR t mfgadmin f 9037 f 2007-05-30 11:42:12.346362-04 2007-05-30 4524 109 A/R C-MDA-001021 \N -5286.44 TTOYS-Tremendous Toys Incorporated 3912 t CR t mfgadmin f 9062 f 2007-08-03 04:06:53.515-04 2007-08-03 4536 106 A/R I-60041 \N 13545.00 TTOYS-Tremendous Toys Incorporated 3923 t CR f mfgadmin f 9063 f 2007-08-03 04:07:42.906-04 2007-08-03 4537 106 A/R I-60039 \N 18550.12 XTRM-Xtreme Toys LTD 3924 t CR f mfgadmin f 9068 f 2007-08-03 04:12:46.937-04 2007-08-03 4538 108 G/L Ship Order \N -15000.00 3925 t ST f mfgadmin f 9067 f 2007-08-03 04:12:46.937-04 2007-08-03 4538 85 G/L Ship Order \N 15000.00 3925 t ST f mfgadmin f 9066 f 2007-08-03 04:12:46.937-04 2007-08-03 4538 103 G/L Ship Order \N 50000.00 3925 t ST f mfgadmin f 9071 f 2007-08-31 10:13:14.281-04 2007-08-31 4539 123 A/R Unapplied from C-12311 \N 500.00 TTOYS-Tremendous Toys Incorporated 3926 t CR f mfgadmin f 9069 f 2007-08-31 10:13:14.281-04 2007-08-31 4540 133 A/R 20013 348 500.00 Unapplied from C-12311 3926 t CD f mfgadmin f 9140 f 2007-09-21 14:11:05.484-04 2007-09-21 4573 96 S/R 99001 3292 -514.00 Issue to Shipping 3964 t TO f mfgadmin f 9139 f 2007-09-21 14:11:05.484-04 2007-09-21 4573 85 S/R 99001 3292 514.00 Issue to Shipping 3964 t TO f mfgadmin f 9141 f 2007-09-21 14:15:09-04 2007-09-21 4574 96 I/M 99001 3293 514.00 Ship from Src to Transit Warehouse 3965 t TO f mfgadmin f 9142 f 2007-09-21 14:15:09-04 2007-09-21 4574 134 I/M 99001 3293 -514.00 Ship from Src to Transit Warehouse 3965 t TO f mfgadmin f 9144 f 2007-09-21 14:16:04.671-04 2007-09-21 4575 128 I/M 99001 3295 -514.00 Receive from Transit To Dest Warehouse 3966 t TO f mfgadmin f 9143 f 2007-09-21 14:16:04.671-04 2007-09-21 4575 134 I/M 99001 3295 514.00 Receive from Transit To Dest Warehouse 3966 t TO f mfgadmin f 9146 f 2007-09-21 14:16:04.671-04 2007-09-21 4576 98 S/R 99001 -1 -100.00 Receive Inventory Freight from 99001 3967 t TO f mfgadmin f 9145 f 2007-09-21 14:16:04.671-04 2007-09-21 4576 132 S/R 99001 -1 100.00 Receive Inventory Freight from 99001 3967 t TO f mfgadmin f 9148 f 2007-09-21 14:35:19.39-04 2007-09-21 4577 131 S/R 20037 -1 -300.00 Receive Non-Inventory from P/O 3968 t PO f mfgadmin f 9147 f 2007-09-21 14:35:19.39-04 2007-09-21 4577 95 S/R 20037 -1 300.00 Receive Non-Inventory from P/O 3968 t PO f mfgadmin f 9150 f 2007-09-21 14:35:19.39-04 2007-09-21 4578 85 S/R 20037 3297 -25.00 Receive Inventory from P/O 3970 t PO f mfgadmin f 9179 f 2007-09-21 14:51:50.062-04 2007-09-21 4592 86 W/O 50165-1 3303 -514.00 Material Issue to Work Order 3987 t WO f mfgadmin f 9178 f 2007-09-21 14:51:50.062-04 2007-09-21 4592 85 W/O 50165-1 3303 514.00 Material Issue to Work Order 3987 t WO f mfgadmin f 9149 f 2007-09-21 14:35:19.39-04 2007-09-21 4578 95 S/R 20037 3297 25.00 Receive Inventory from P/O 3970 t PO f mfgadmin f 9153 f 2007-09-21 14:38:37.484-04 2007-09-21 4579 99 A/P 30039 \N 375.00 TPARTS-Toy Parts Inc. MA-1001 3972 t VO f mfgadmin f 9151 f 2007-09-21 14:38:37.484-04 2007-09-21 4579 95 A/P 30039 \N -325.00 TPARTS-Toy Parts Inc. MA-1001 3972 t VO f mfgadmin f 9152 f 2007-09-21 14:38:37.484-04 2007-09-21 4579 120 A/P 30039 \N -50.00 TPARTS-Toy Parts Inc. MA-1001 3972 t VO f mfgadmin f 9156 f 2007-09-21 14:40:57.734-04 2007-09-21 4580 99 A/P 3035 140 -367.50 TPARTS-Toy Parts Inc. 3973 t CK f mfgadmin f 9155 f 2007-09-21 14:40:57.734-04 2007-09-21 4581 101 A/P 30039 \N 7.50 Discount for V 30039 3974 t DS f mfgadmin f 9154 f 2007-09-21 14:40:57.734-04 2007-09-21 4581 99 A/P 30039 \N -7.50 Discount for V 30039 3974 t DS f mfgadmin f 9159 f 2007-09-21 14:51:13.093-04 2007-09-21 4582 86 W/O 10042-1 3298 -27.50 Material Issue to Work Order 3976 t WO f mfgadmin f 9215 f 2007-12-14 12:15:31.25-05 2007-10-01 4608 108 G/L Ship Order \N -45250.00 4003 t ST f mfgadmin f 9214 f 2007-12-14 12:15:31.25-05 2007-10-01 4608 85 G/L Ship Order \N 45250.00 4003 t ST f mfgadmin f 9213 f 2007-12-14 12:15:31.25-05 2007-10-01 4608 103 G/L Ship Order \N 75250.00 4003 t ST f mfgadmin f 9342 f 2007-12-14 13:28:55.109-05 2007-12-14 4669 91 I/M Special1 3336 63.82 Miscellaneous Adjustment\n 4080 t f mfgadmin f 9343 f 2007-12-14 13:28:55.109-05 2007-12-14 4669 85 I/M Special1 3336 -63.82 Miscellaneous Adjustment\n 4080 t f mfgadmin f 9345 f 2007-12-14 13:29:29.015-05 2007-12-14 4670 96 S/R 50168-1 3337 -12.76 Issue to Shipping 4081 t SO f mfgadmin f 9344 f 2007-12-14 13:29:29.015-05 2007-12-14 4670 85 S/R 50168-1 3337 12.76 Issue to Shipping 4081 t SO f mfgadmin f 9219 f 2007-12-14 12:16:24.734-05 2007-09-01 4609 108 G/L Ship Order \N -45250.00 4004 t ST f mfgadmin f 9227 f 2007-12-14 12:27:05.453-05 2007-10-01 4612 85 G/L ADJ23b -1 -50000.00 Adjustment 4007 t JE f mfgadmin f 9221 f 2007-12-14 12:17:14.109-05 2007-11-01 4610 108 G/L Ship Order \N -45250.00 4005 t ST f mfgadmin f 9220 f 2007-12-14 12:17:14.109-05 2007-11-01 4610 85 G/L Ship Order \N 45250.00 4005 t ST f mfgadmin f 9223 f 2007-12-14 12:17:14.109-05 2007-11-01 4610 103 G/L Ship Order \N 77250.00 4005 t ST f mfgadmin f 9225 f 2007-12-14 12:22:29.796-05 2007-12-14 4611 85 G/L ADJ-23 -1 -50000.00 Special Adj. 4006 t JE f mfgadmin f 9229 f 2007-12-14 12:39:54.078-05 2007-12-14 4613 96 S/R 99002 3307 -128.50 Issue to Shipping 4008 t TO f mfgadmin f 8478 f 2006-12-28 11:35:54.25-05 2006-12-28 4258 126 A/P 5001 122 128.50 XPPI-Packaging Pros LTD 3593 t CK t mfgadmin f 9590 f 2008-04-04 08:28:03.483859-04 2007-01-01 4789 138 G/L MDA -1 -100.00 Reclass Inventory 4227 t JE f mfgadmin f 9589 f 2008-04-04 08:28:03.483859-04 2007-01-01 4789 85 G/L MDA -1 100.00 Reclass Inventory 4227 t JE f mfgadmin f 8638 f 2007-02-20 08:40:28.735-05 2007-02-20 4332 127 A/R C-123112 \N -1052.03 XTRM-Xtreme Toys LTD 3679 t CR t mfgadmin f 8657 f 2007-02-20 15:02:56.61-05 2007-02-20 4339 126 A/P 5002 126 128.50 XPPI-Packaging Pros LTD 3686 t CK t mfgadmin f 8744 f 2007-05-30 08:57:02.609-04 2007-05-30 4380 126 A/P 5003 131 1.13 XPPI-Packaging Pros LTD 3737 t CK t mfgadmin f 8922 f 2007-05-30 09:51:58.109-04 2007-05-30 4468 127 A/R C-1500011 \N -27825.18 XTRM-Xtreme Toys LTD 3839 t CR t mfgadmin f 9064 f 2007-08-03 04:07:42.906-04 2007-08-03 4537 127 A/R C-10010 \N -18550.12 XTRM-Xtreme Toys LTD 3924 t CR t mfgadmin f 9065 f 2007-08-03 04:12:46.937-04 2007-08-03 4538 109 G/L Ship Order \N -50000.00 3925 t ST t mfgadmin f 9072 f 2007-08-31 10:13:14.281-04 2007-08-31 4539 109 A/R C-12311 \N -500.00 TTOYS-Tremendous Toys Incorporated 3926 t CR t mfgadmin f 9090 f 2007-08-31 10:58:22.421-04 2007-08-31 4548 109 A/P 3033 138 24.50 TPARTS-Toy Parts Inc. 3935 t CK t mfgadmin f 9157 f 2007-09-21 14:40:57.734-04 2007-09-21 4580 109 A/P 3035 140 367.50 TPARTS-Toy Parts Inc. 3973 t CK t mfgadmin f 9206 f 2007-09-21 14:58:02.015-04 2007-09-21 4604 109 A/R C-121111 \N -1500.00 TTOYS-Tremendous Toys Incorporated 4000 t CR t mfgadmin f 9211 f 2007-09-21 14:58:59.75-04 2007-09-21 4607 109 A/R C-123111 \N -597.50 TTOYS-Tremendous Toys Incorporated 4002 t CR t mfgadmin f 9216 f 2007-12-14 12:16:24.734-05 2007-09-01 4609 109 G/L Ship Order \N -75250.00 4004 t ST t mfgadmin f 9212 f 2007-12-14 12:15:31.25-05 2007-10-01 4608 109 G/L Ship Order \N -75250.00 4003 t ST t mfgadmin f 9226 f 2007-12-14 12:27:05.453-05 2007-10-01 4612 109 G/L ADJ23b -1 50000.00 Adjustment 4007 t JE t mfgadmin f 9222 f 2007-12-14 12:17:14.109-05 2007-11-01 4610 109 G/L Ship Order \N -77250.00 4005 t ST t mfgadmin f 9224 f 2007-12-14 12:22:29.796-05 2007-12-14 4611 109 G/L ADJ-23 -1 50000.00 Special Adj. 4006 t JE t mfgadmin f 9246 f 2007-12-14 12:47:46.312-05 2007-12-14 4620 109 A/P 3036 141 1225.00 TPARTS-Toy Parts Inc. 4019 t CK t mfgadmin f 9254 f 2007-12-14 12:48:12.484-05 2007-12-14 4624 126 A/P 5005 142 1617.25 XPPI-Packaging Pros LTD 4022 t CK t mfgadmin f 9288 f 2007-12-14 13:00:40.359-05 2007-12-14 4642 86 W/O 40007-1 3324 -64.25 Material Issue to Work Order 4049 t WO f mfgadmin f 9289 f 2007-12-14 13:00:47.765-05 2007-12-14 4643 86 W/O 40007-1 -1 -1081.61 Manufacturing Inventory Cost Variance 4050 t WO f mfgadmin f 9587 f 2008-04-04 08:25:39.01014-04 2008-01-01 4788 114 G/L MDA-Adj -1 100000.00 Receive inventory for Stock B 4226 t JE f mfgadmin f 9588 f 2008-04-04 08:25:39.01014-04 2008-01-01 4788 85 G/L MDA-Adj -1 -100000.00 Receive inventory for Stock B 4226 t JE f mfgadmin f 9376 f 2008-03-04 13:47:46.151101-05 2008-03-04 4685 99 A/P 30042 \N 275.00 TPARTS-Toy Parts Inc. RF1020011 4103 t VO f jsmith f 9375 f 2008-03-04 13:47:46.151101-05 2008-03-04 4685 95 A/P 30042 \N -275.00 TPARTS-Toy Parts Inc. RF1020011 4103 t VO f jsmith f 9379 f 2008-03-04 13:49:58.224897-05 2008-03-04 4686 99 A/P 3037 143 -269.50 TPARTS-Toy Parts Inc. 4105 t CK f jsmith f 9378 f 2008-03-04 13:49:58.224897-05 2008-03-04 4687 101 A/P 30042 \N 5.50 Discount for V 30042 4106 t DS f jsmith f 9377 f 2008-03-04 13:49:58.224897-05 2008-03-04 4687 99 A/P 30042 \N -5.50 Discount for V 30042 4106 t DS f jsmith f 9388 f 2008-03-04 13:50:55.481281-05 2008-03-04 4691 86 W/O 10044-1 -1 -1.10 Post Setup Time to Work Order 4111 t WO f jsmith f 9387 f 2008-03-04 13:50:55.481281-05 2008-03-04 4691 94 W/O 10044-1 -1 1.10 Post Setup Time to Work Order 4111 t WO f jsmith f 9390 f 2008-03-04 13:50:55.481281-05 2008-03-04 4692 86 W/O 10044-1 -1 -11.00 Post Run Time to Work Order 4112 t WO f jsmith f 9389 f 2008-03-04 13:50:55.481281-05 2008-03-04 4692 94 W/O 10044-1 -1 11.00 Post Run Time to Work Order 4112 t WO f jsmith f 9391 f 2008-03-04 13:51:21.731285-05 2008-03-04 4693 86 W/O 10045-1 3345 163.82 Receive Inventory from Manufacturing 4115 t WO f jsmith f 9392 f 2008-03-04 13:51:21.731285-05 2008-03-04 4693 85 W/O 10045-1 3345 -163.82 Receive Inventory from Manufacturing 4115 t WO f jsmith f 9398 f 2008-03-04 13:51:21.731285-05 2008-03-04 4696 86 W/O 10045-1 3348 -0.17 Material Issue to Work Order 4118 t WO f jsmith f 9397 f 2008-03-04 13:51:21.731285-05 2008-03-04 4696 138 W/O 10045-1 3348 0.17 Material Issue to Work Order 4118 t WO f jsmith f 9402 f 2008-03-04 13:51:21.731285-05 2008-03-04 4698 86 W/O 10045-1 -1 -1.10 Post Setup Time to Work Order 4120 t WO f jsmith f 9405 f 2008-03-04 13:51:21.731285-05 2008-03-04 4700 94 W/O 10045-1 -1 2.20 Post Setup Time to Work Order 4122 t WO f jsmith f 9408 f 2008-03-04 13:51:21.731285-05 2008-03-04 4701 86 W/O 10045-1 -1 -0.55 Post Run Time to Work Order 4123 t WO f jsmith f 9593 f 2008-04-04 08:43:12.508474-04 2008-04-04 4792 86 W/O 10050-1 3385 6381.80 Receive Inventory from Manufacturing 4230 t WO f mfgadmin f 9594 f 2008-04-04 08:43:12.508474-04 2008-04-04 4792 85 W/O 10050-1 3385 -6381.80 Receive Inventory from Manufacturing 4230 t WO f mfgadmin f 9598 f 2008-04-04 08:43:12.508474-04 2008-04-04 4794 86 W/O 10050-1 3387 -17.00 Material Issue to Work Order 4232 t WO f mfgadmin f 9597 f 2008-04-04 08:43:12.508474-04 2008-04-04 4794 138 W/O 10050-1 3387 17.00 Material Issue to Work Order 4232 t WO f mfgadmin f 9492 f 2008-03-04 14:51:14.947621-05 2008-02-15 4741 108 G/L Ship Order \N -45250.00 4168 t ST f jsmith f 9491 f 2008-03-04 14:51:14.947621-05 2008-02-15 4741 85 G/L Ship Order \N 45250.00 4168 t ST f jsmith f 9494 f 2008-03-04 14:51:14.947621-05 2008-02-15 4741 103 G/L Ship Order \N 87250.00 4168 t ST f jsmith f 9468 f 2008-03-04 14:14:07.002445-05 2008-03-04 4731 86 W/O 10047-1 -1 -0.44 Post Setup Time to Work Order 4157 t WO f jsmith f 9467 f 2008-03-04 14:14:07.002445-05 2008-03-04 4731 94 W/O 10047-1 -1 0.44 Post Setup Time to Work Order 4157 t WO f jsmith f 9602 f 2008-04-04 08:43:12.508474-04 2008-04-04 4796 86 W/O 10050-1 -1 -1.10 Post Setup Time to Work Order 4234 t WO f mfgadmin f 9601 f 2008-04-04 08:43:12.508474-04 2008-04-04 4796 94 W/O 10050-1 -1 1.10 Post Setup Time to Work Order 4234 t WO f mfgadmin f 9604 f 2008-04-04 08:43:12.508474-04 2008-04-04 4797 86 W/O 10050-1 -1 -110.00 Post Run Time to Work Order 4235 t WO f mfgadmin f 9603 f 2008-04-04 08:43:12.508474-04 2008-04-04 4797 94 W/O 10050-1 -1 110.00 Post Run Time to Work Order 4235 t WO f mfgadmin f 9606 f 2008-04-04 08:43:12.508474-04 2008-04-04 4798 86 W/O 10050-1 -1 -1.10 Post Setup Time to Work Order 4236 t WO f mfgadmin f 9605 f 2008-04-04 08:43:12.508474-04 2008-04-04 4798 94 W/O 10050-1 -1 1.10 Post Setup Time to Work Order 4236 t WO f mfgadmin f 9608 f 2008-04-04 08:43:12.508474-04 2008-04-04 4799 86 W/O 10050-1 -1 -110.00 Post Run Time to Work Order 4237 t WO f mfgadmin f 9607 f 2008-04-04 08:43:12.508474-04 2008-04-04 4799 94 W/O 10050-1 -1 110.00 Post Run Time to Work Order 4237 t WO f mfgadmin f 9610 f 2008-04-04 08:43:12.508474-04 2008-04-04 4800 86 W/O 10050-1 -1 -0.88 Post Setup Time to Work Order 4238 t WO f mfgadmin f 9609 f 2008-04-04 08:43:12.508474-04 2008-04-04 4800 94 W/O 10050-1 -1 0.88 Post Setup Time to Work Order 4238 t WO f mfgadmin f 9519 f 2008-03-04 16:36:50.739787-05 2008-03-04 4754 96 S/R 50171 -1 16.38 Ship Shipment 4186 t SO f jsmith f 9612 f 2008-04-04 08:43:12.508474-04 2008-04-04 4801 86 W/O 10050-1 -1 -88.00 Post Run Time to Work Order 4239 t WO f mfgadmin f 9611 f 2008-04-04 08:43:12.508474-04 2008-04-04 4801 94 W/O 10050-1 -1 88.00 Post Run Time to Work Order 4239 t WO f mfgadmin f 9613 f 2008-04-04 08:43:27.715534-04 2008-04-04 4802 86 W/O 10050-1 -1 -663.72 Manufacturing Inventory Cost Variance 4240 t WO f mfgadmin f 9614 f 2008-04-04 08:43:27.715534-04 2008-04-04 4802 87 W/O 10050-1 -1 663.72 Manufacturing Inventory Cost Variance 4240 t WO f mfgadmin f 9619 f 2008-04-04 08:45:05.342734-04 2008-04-04 4805 95 S/R 20043 3391 21.25 Receive Inventory from P/O 4246 t PO f mfgadmin f 9620 f 2008-04-04 08:45:05.342734-04 2008-04-04 4805 138 S/R 20043 3391 -21.25 Receive Inventory from P/O 4246 t PO f mfgadmin f 9622 f 2008-04-04 08:46:00.842417-04 2008-04-04 4806 96 S/R 50174-1 3392 -6381.80 Issue to Shipping 4248 t SO f mfgadmin f 9621 f 2008-04-04 08:46:00.842417-04 2008-04-04 4806 85 S/R 50174-1 3392 6381.80 Issue to Shipping 4248 t SO f mfgadmin f 9624 f 2008-04-04 08:47:14.918988-04 2008-04-04 4807 108 S/R 50174 -1 -6381.80 Ship Shipment 4249 t SO f mfgadmin f 9623 f 2008-04-04 08:47:14.918988-04 2008-04-04 4807 96 S/R 50174 -1 6381.80 Ship Shipment 4249 t SO f mfgadmin f 9627 f 2008-04-04 08:48:54.708584-04 2008-04-04 4808 108 A/R 60054 \N 3960.00 4250 t IN f mfgadmin f 9626 f 2008-04-04 08:48:54.708584-04 2008-04-04 4808 122 A/R 60054 \N 396.00 4250 t IN f mfgadmin f 9628 f 2008-04-04 08:48:54.708584-04 2008-04-04 4808 106 A/R 60054 \N -14796.55 4250 t IN f mfgadmin f 9625 f 2008-04-04 08:48:54.708584-04 2008-04-04 4808 103 A/R 60054 \N 10440.55 4250 t IN f mfgadmin f 9630 f 2008-04-04 08:50:44.342929-04 2008-04-04 4809 106 A/R I-60054 \N 14796.55 XTRM-Xtreme Toys LTD 4251 t CR f mfgadmin f 9632 f 2008-04-04 08:54:16.448766-04 2008-04-04 4810 90 A/P 30045 \N 1196.25 TPARTS-Toy Parts Inc. MF1010 4252 t VO f mfgadmin f 9633 f 2008-04-04 08:54:16.448766-04 2008-04-04 4810 99 A/P 30045 \N 1110.00 TPARTS-Toy Parts Inc. MF1010 4252 t VO f mfgadmin f 9631 f 2008-04-04 08:54:16.448766-04 2008-04-04 4810 95 A/P 30045 \N -2306.25 TPARTS-Toy Parts Inc. MF1010 4252 t VO f mfgadmin f 9636 f 2008-04-04 08:56:30.323975-04 2008-04-04 4811 99 A/P 3039 146 -1087.80 TPARTS-Toy Parts Inc. 4254 t CK f mfgadmin f 9635 f 2008-04-04 08:56:30.323975-04 2008-04-04 4812 101 A/P 30045 \N 22.20 Discount for V 30045 4255 t DS f mfgadmin f 9634 f 2008-04-04 08:56:30.323975-04 2008-04-04 4812 99 A/P 30045 \N -22.20 Discount for V 30045 4255 t DS f mfgadmin f 9432 f 2008-03-04 14:12:56.581783-05 2008-03-04 4713 86 W/O 10048-1 3356 -514.00 Material Issue to Work Order 4138 t WO f jsmith f 9431 f 2008-03-04 14:12:56.581783-05 2008-03-04 4713 138 W/O 10048-1 3356 514.00 Material Issue to Work Order 4138 t WO f jsmith f 9596 f 2008-04-04 08:43:12.508474-04 2008-04-04 4793 86 W/O 10050-1 3386 -250.00 Material Issue to Work Order 4231 t WO f mfgadmin f 9595 f 2008-04-04 08:43:12.508474-04 2008-04-04 4793 138 W/O 10050-1 3386 250.00 Material Issue to Work Order 4231 t WO f mfgadmin f 9600 f 2008-04-04 08:43:12.508474-04 2008-04-04 4795 86 W/O 10050-1 3388 -5140.00 Material Issue to Work Order 4233 t WO f mfgadmin f 9599 f 2008-04-04 08:43:12.508474-04 2008-04-04 4795 138 W/O 10050-1 3388 5140.00 Material Issue to Work Order 4233 t WO f mfgadmin f 9615 f 2008-04-04 08:45:05.342734-04 2008-04-04 4803 95 S/R 20043 3389 1000.00 Receive Inventory from P/O 4242 t PO f mfgadmin f 9616 f 2008-04-04 08:45:05.342734-04 2008-04-04 4803 138 S/R 20043 3389 -1000.00 Receive Inventory from P/O 4242 t PO f mfgadmin f 9617 f 2008-04-04 08:45:05.342734-04 2008-04-04 4804 95 S/R 20043 3390 1285.00 Receive Inventory from P/O 4244 t PO f mfgadmin f 9618 f 2008-04-04 08:45:05.342734-04 2008-04-04 4804 138 S/R 20043 3390 -1285.00 Receive Inventory from P/O 4244 t PO f mfgadmin f 9639 f 2008-06-12 08:53:45.773684-04 2008-06-12 4813 96 S/R 50175-1 3393 -6.38 Issue to Shipping 4257 t SO f jsmith f 9638 f 2008-06-12 08:53:45.773684-04 2008-06-12 4813 85 S/R 50175-1 3393 6.38 Issue to Shipping 4257 t SO f jsmith f 9641 f 2008-06-12 08:53:58.987996-04 2008-06-12 4814 108 S/R 60021 -1 -6.38 Ship Shipment 4258 t SH f jsmith f 9640 f 2008-06-12 08:53:58.987996-04 2008-06-12 4814 96 S/R 60021 -1 6.38 Ship Shipment 4258 t SH f jsmith f 9643 f 2008-06-12 09:43:12.111527-04 2008-06-12 4815 106 A/R 60055 \N -42.75 4259 t IN f jsmith f 9642 f 2008-06-12 09:43:12.111527-04 2008-06-12 4815 103 A/R 60055 \N 42.75 4259 t IN f jsmith f 9644 f 2008-06-12 09:47:43.556837-04 2008-06-12 4816 106 A/R I-60055 \N 42.75 XTRM-Xtreme Toys LTD 4260 t CR f jsmith f 9648 f 2008-06-12 10:22:29.749952-04 2008-06-12 4817 106 A/R 60056 \N -10500.00 4261 t IN f jsmith f 9647 f 2008-06-12 10:22:29.749952-04 2008-06-12 4817 102 A/R 60056 \N 500.00 4261 t IN f jsmith f 9646 f 2008-06-12 10:22:29.749952-04 2008-06-12 4817 103 A/R 60056 \N 10000.00 4261 t IN f jsmith f 9650 f 2008-06-12 10:23:15.736283-04 2008-06-12 4818 109 A/R C-12311 \N -10500.00 TTOYS-Tremendous Toys Incorporated 4262 t CR t jsmith f 9649 f 2008-06-12 10:23:15.736283-04 2008-06-12 4818 106 A/R I-60056 \N 10500.00 TTOYS-Tremendous Toys Incorporated 4262 t CR f jsmith f 9651 f 2008-06-12 10:37:18.668254-04 2008-06-12 4819 95 S/R 20044 3394 11.00 Receive Inventory from P/O 4263 t PO f jsmith f 9652 f 2008-06-12 10:37:18.668254-04 2008-06-12 4819 138 S/R 20044 3394 -11.00 Receive Inventory from P/O 4263 t PO f jsmith f 9654 f 2008-06-12 11:04:13.254999-04 2008-06-12 4820 90 A/P 30046 \N -63.50 XPPI-Packaging Pros LTD 0DD 4265 t VO f jsmith f 9655 f 2008-06-12 11:04:13.254999-04 2008-06-12 4820 99 A/P 30046 \N 74.50 XPPI-Packaging Pros LTD 0DD 4265 t VO f jsmith f 9653 f 2008-06-12 11:04:13.254999-04 2008-06-12 4820 95 A/P 30046 \N -11.00 XPPI-Packaging Pros LTD 0DD 4265 t VO f jsmith f 9659 f 2008-06-12 11:56:16.215653-04 2008-06-12 4821 123 A/R Unapplied from C-123111 \N 1980.00 XTRM-Xtreme Toys LTD 4266 t CR f jsmith f 9656 f 2008-06-12 11:56:16.215653-04 2008-06-12 4822 133 A/R 20015 362 1980.00 Unapplied from C-123111 4266 t CD f jsmith f 9657 f 2008-06-12 11:56:16.215653-04 2008-06-12 4822 123 A/R 20015 362 -1980.00 Unapplied from C-123111 4266 t CD f jsmith f 9660 f 2008-06-12 13:20:44.562889-04 2008-06-12 4823 87 P/D Post Cost 309 370.50 Set Standard Cost - Material for item STOCKCAR1 4267 t f jsmith f 9661 f 2008-06-12 13:20:44.562889-04 2008-06-12 4823 128 P/D Post Cost 309 -370.50 Set Standard Cost - Material for item STOCKCAR1 4267 t f jsmith f 9662 f 2008-06-12 13:20:44.562889-04 2008-06-12 4824 87 P/D Post Cost 308 8.65 Set Standard Cost - Material for item STOCKCAR1 4268 t f jsmith f 9663 f 2008-06-12 13:20:44.562889-04 2008-06-12 4824 85 P/D Post Cost 308 -8.65 Set Standard Cost - Material for item STOCKCAR1 4268 t f jsmith f 9664 f 2008-06-12 13:20:44.562889-04 2008-06-12 4825 87 P/D Post Cost 309 90.00 Set Standard Cost - Direct Labor for item STOCKCAR1 4269 t f jsmith f 9829 f 2008-06-12 14:47:43.550047-04 2008-06-12 4905 108 S/R 60022 -1 -23.69 Ship Shipment 4597 t SH f jsmith f 9493 f 2008-03-04 14:51:14.947621-05 2008-02-15 4741 109 G/L Ship Order \N -87250.00 4168 t ST t jsmith f 9380 f 2008-03-04 13:49:58.224897-05 2008-03-04 4686 109 A/P 3037 143 269.50 TPARTS-Toy Parts Inc. 4105 t CK t jsmith f 9486 f 2008-03-04 14:48:50.799029-05 2008-03-04 4739 109 A/R C-123111 \N -1337.17 TTOYS-Tremendous Toys Incorporated 4166 t CR t jsmith f 9578 f 2008-03-05 13:53:41.360466-05 2008-03-05 4782 109 A/R C-12312311 \N -997.50 TTOYS-Tremendous Toys Incorporated 4219 t CR t jsmith f 9954 f 2008-06-19 15:55:12.080553-04 2008-03-15 4964 108 G/L Ship Order \N -45250.00 4671 t ST f jsmith f 9955 f 2008-06-19 15:55:12.080553-04 2008-03-15 4964 109 G/L Ship Order \N -77250.00 4671 t ST t jsmith f 9637 f 2008-04-04 08:56:30.323975-04 2008-04-04 4811 109 A/P 3039 146 1087.80 TPARTS-Toy Parts Inc. 4254 t CK t mfgadmin f 9958 f 2008-06-19 15:56:27.462759-04 2008-04-15 4965 108 G/L Ship Order \N -45250.00 4672 t ST f jsmith f 9959 f 2008-06-19 15:56:27.462759-04 2008-04-15 4965 109 G/L Ship Order \N -77250.00 4672 t ST t jsmith f 9957 f 2008-06-19 15:56:27.462759-04 2008-04-15 4965 85 G/L Ship Order \N 45250.00 4672 t ST f jsmith f 9960 f 2008-06-19 15:56:27.462759-04 2008-04-15 4965 103 G/L Ship Order \N 77250.00 4672 t ST f jsmith f 9962 f 2008-06-19 15:59:39.142588-04 2008-05-15 4966 108 G/L Ship Order \N -45250.00 4673 t ST f jsmith f 9963 f 2008-06-19 15:59:39.142588-04 2008-05-15 4966 109 G/L Ship Order \N -77250.00 4673 t ST t jsmith f 9961 f 2008-06-19 15:59:39.142588-04 2008-05-15 4966 85 G/L Ship Order \N 45250.00 4673 t ST f jsmith f 9964 f 2008-06-19 15:59:39.142588-04 2008-05-15 4966 103 G/L Ship Order \N 77250.00 4673 t ST f jsmith f 9933 f 2008-06-18 16:44:59.349149-04 2008-06-18 4954 99 A/P 30051 \N 50.00 TPARTS-Toy Parts Inc. MA002 4654 t VO f jsmith f 9932 f 2008-06-18 16:44:59.349149-04 2008-06-18 4954 95 A/P 30051 \N -50.00 TPARTS-Toy Parts Inc. MA002 4654 t VO f jsmith f 9937 f 2008-06-18 16:47:57.249049-04 2008-06-18 4955 109 A/P 3040 147 49.00 TPARTS-Toy Parts Inc. 4658 t CK t jsmith f 9936 f 2008-06-18 16:47:57.249049-04 2008-06-18 4955 99 A/P 3040 147 -49.00 TPARTS-Toy Parts Inc. 4658 t CK f jsmith f 9935 f 2008-06-18 16:47:57.249049-04 2008-06-18 4956 101 A/P 30051 \N 1.00 Discount for V 30051 4659 t DS f jsmith f 9934 f 2008-06-18 16:47:57.249049-04 2008-06-18 4956 99 A/P 30051 \N -1.00 Discount for V 30051 4659 t DS f jsmith f 10245 f 2008-09-08 17:04:02.812213-04 2008-08-01 5101 95 S/R 20055 3507 8558.48 Receive Inventory from P/O 5115 t PO f admin f 10246 f 2008-09-08 17:04:02.812213-04 2008-08-01 5101 85 S/R 20055 3507 -8558.48 Receive Inventory from P/O 5115 t PO f admin f 10249 f 2008-09-08 17:07:31.833994-04 2008-08-01 5103 90 A/P 30057 \N -24771.52 TPARTS-Toy Parts Inc. RF109981 5119 t VO f admin f 10252 f 2008-09-08 17:07:31.833994-04 2008-08-01 5103 99 A/P 30057 \N 33500.00 TPARTS-Toy Parts Inc. RF109981 5119 t VO f admin f 10250 f 2008-09-08 17:07:31.833994-04 2008-08-01 5103 95 A/P 30057 \N -8558.48 TPARTS-Toy Parts Inc. RF109981 5119 t VO f admin f 10251 f 2008-09-08 17:07:31.833994-04 2008-08-01 5103 139 A/P 30057 \N -170.00 TPARTS-Toy Parts Inc. RF109981 5119 t VO f admin f 10247 f 2008-09-08 17:04:19.920653-04 2008-09-08 5102 95 S/R 20055 3508 8561.05 Receive Inventory from P/O 5117 t PO f admin f 10248 f 2008-09-08 17:04:19.920653-04 2008-09-08 5102 85 S/R 20055 3508 -8561.05 Receive Inventory from P/O 5117 t PO f admin f 10253 f 2008-09-08 17:09:13.957547-04 2008-09-08 5104 99 A/P 3046 154 -33500.00 TPARTS-Toy Parts Inc. 5121 t CK f admin f 10264 f 2008-09-08 17:29:06.995462-04 2008-09-08 5108 96 S/R 50183-3 3509 -7703.40 Issue to Shipping 5127 t SO f admin f 10263 f 2008-09-08 17:29:06.995462-04 2008-09-08 5108 85 S/R 50183-3 3509 7703.40 Issue to Shipping 5127 t SO f admin f 10265 f 2008-09-08 17:30:20.148641-04 2008-09-08 5109 96 S/R 50183-3 3510 7703.40 Return from Shipping 5128 t SO f admin f 10266 f 2008-09-08 17:30:20.148641-04 2008-09-08 5109 85 S/R 50183-3 3510 -7703.40 Return from Shipping 5128 t SO f admin f 10243 f 2008-09-08 17:03:10.424312-04 2008-07-01 5100 95 S/R 20055 3506 8558.48 Receive Inventory from P/O 5113 t PO f admin f 10244 f 2008-09-08 17:03:10.424312-04 2008-07-01 5100 85 S/R 20055 3506 -8558.48 Receive Inventory from P/O 5113 t PO f admin f 10268 f 2008-09-08 17:31:14.742595-04 2008-07-15 5110 96 S/R 50183-3 3511 -7703.40 Issue to Shipping 5129 t SO f admin f 10267 f 2008-09-08 17:31:14.742595-04 2008-07-15 5110 85 S/R 50183-3 3511 7703.40 Issue to Shipping 5129 t SO f admin f 10279 f 2008-09-08 17:49:58.697085-04 2008-08-09 5115 96 S/R 50183-2 3514 -10271.20 Issue to Shipping 5134 t SO f admin f 10278 f 2008-09-08 17:49:58.697085-04 2008-08-09 5115 85 S/R 50183-2 3514 10271.20 Issue to Shipping 5134 t SO f admin f 10301 f 2008-09-08 18:04:30.709205-04 2008-08-15 5125 108 G/L Ship Order \N -45250.00 5143 t ST f jsmith f 10300 f 2008-09-08 18:04:30.709205-04 2008-08-15 5125 85 G/L Ship Order \N 45250.00 5143 t ST f jsmith f 10303 f 2008-09-08 18:04:30.709205-04 2008-08-15 5125 103 G/L Ship Order \N 77250.00 5143 t ST f jsmith f 10309 f 2008-09-08 18:23:22.265604-04 2008-08-08 5128 95 G/L COR-01 -1 -1100.00 Setup correction entry 5148 t JE f jsmith f 10311 f 2008-09-08 18:27:11.871348-04 2008-08-08 5128 95 G/L COR-01 -1 1100.00 correction = wrong date 5148 t JE f jsmith f 10270 f 2008-09-08 17:31:40.808667-04 2008-07-15 5111 108 S/R 60031 -1 -7703.40 Ship Shipment 5130 t SH f admin f 10269 f 2008-09-08 17:31:40.808667-04 2008-07-15 5111 96 S/R 60031 -1 7703.40 Ship Shipment 5130 t SH f admin f 10273 f 2008-09-08 17:32:07.298926-04 2008-07-15 5112 106 A/R 60065 \N -47250.00 5131 t IN f admin f 10272 f 2008-09-08 17:32:07.298926-04 2008-07-15 5112 102 A/R 60065 \N 2250.00 5131 t IN f admin f 10271 f 2008-09-08 17:32:07.298926-04 2008-07-15 5112 103 A/R 60065 \N 45000.00 5131 t IN f admin f 10256 f 2008-09-08 17:18:47.023141-04 2008-09-08 5105 90 A/P 30058 \N -49550.47 TPARTS-Toy Parts Inc. RF1001 5122 t VO f admin f 10258 f 2008-09-08 17:18:47.023141-04 2008-09-08 5105 99 A/P 30058 \N 67000.00 TPARTS-Toy Parts Inc. RF1001 5122 t VO f admin f 10255 f 2008-09-08 17:18:47.023141-04 2008-09-08 5105 95 A/P 30058 \N -17119.53 TPARTS-Toy Parts Inc. RF1001 5122 t VO f admin f 10257 f 2008-09-08 17:18:47.023141-04 2008-09-08 5105 139 A/P 30058 \N -330.00 TPARTS-Toy Parts Inc. RF1001 5122 t VO f admin f 10261 f 2008-09-08 17:19:36.136499-04 2008-09-08 5106 99 A/P 3047 155 -65660.00 TPARTS-Toy Parts Inc. 5124 t CK f admin f 10260 f 2008-09-08 17:19:36.136499-04 2008-09-08 5107 101 A/P 30058 \N 1340.00 Discount for V 30058 5125 t DS f admin f 10259 f 2008-09-08 17:19:36.136499-04 2008-09-08 5107 99 A/P 30058 \N -1340.00 Discount for V 30058 5125 t DS f admin f 10275 f 2008-09-08 17:49:44.498604-04 2008-09-08 5113 96 S/R 50183-2 3512 -10271.20 Issue to Shipping 5132 t SO f admin f 10281 f 2008-09-08 17:50:11.487338-04 2008-09-08 5116 108 S/R 60032 -1 -10271.20 Ship Shipment 5135 t SH f admin f 10379 f 2008-10-02 09:13:21.632915-04 2008-10-02 5161 123 A/R V-199-1 \N 1000.00 Cash Receipt from Credit Card 5188 t CR f jsmith f 10383 f 2008-10-02 09:13:30.887403-04 2008-10-02 5162 123 A/R Unapplied from V- \N 1000.00 TTOYS-Tremendous Toys Incorporated 5189 t CR f jsmith f 10384 f 2008-10-02 09:13:30.887403-04 2008-10-02 5162 123 A/R V- \N -1000.00 TTOYS-Tremendous Toys Incorporated 5189 t CR f jsmith f 10381 f 2008-10-02 09:13:30.887403-04 2008-10-02 5163 133 A/R 20016 375 1000.00 Unapplied from V- 5189 t CD f jsmith f 10382 f 2008-10-02 09:13:30.887403-04 2008-10-02 5163 123 A/R 20016 375 -1000.00 Unapplied from V- 5189 t CD f jsmith f 10385 f 2008-10-02 09:44:20.788494-04 2008-10-02 5164 95 S/R 20058 3530 40.00 Receive Inventory from P/O 5190 t PO f jsmith f 10386 f 2008-10-02 09:44:20.788494-04 2008-10-02 5164 138 S/R 20058 3530 -40.00 Receive Inventory from P/O 5190 t PO f jsmith f 10388 f 2008-10-02 09:56:01.068303-04 2008-10-02 5165 86 W/O 10058-1 3531 -55.00 Material Issue to Work Order 5192 t WO f jsmith f 10387 f 2008-10-02 09:56:01.068303-04 2008-10-02 5165 138 W/O 10058-1 3531 55.00 Material Issue to Work Order 5192 t WO f jsmith f 10390 f 2008-10-02 09:56:01.068303-04 2008-10-02 5166 86 W/O 10058-1 3532 -40.00 Material Issue to Work Order 5193 t WO f jsmith f 10389 f 2008-10-02 09:56:01.068303-04 2008-10-02 5166 138 W/O 10058-1 3532 40.00 Material Issue to Work Order 5193 t WO f jsmith f 10392 f 2008-10-02 09:56:01.068303-04 2008-10-02 5167 86 W/O 10058-1 -1 -1.10 Post Setup Time to Work Order 5194 t WO f jsmith f 10391 f 2008-10-02 09:56:01.068303-04 2008-10-02 5167 94 W/O 10058-1 -1 1.10 Post Setup Time to Work Order 5194 t WO f jsmith f 10394 f 2008-10-02 09:56:01.068303-04 2008-10-02 5168 86 W/O 10058-1 -1 -22.00 Post Run Time to Work Order 5195 t WO f jsmith f 10393 f 2008-10-02 09:56:01.068303-04 2008-10-02 5168 94 W/O 10058-1 -1 22.00 Post Run Time to Work Order 5195 t WO f jsmith f 10395 f 2008-10-02 09:56:01.068303-04 2008-10-02 5169 86 W/O 10058-1 3533 164.20 Receive Inventory from Manufacturing 5196 t WO f jsmith f 10396 f 2008-10-02 09:56:01.068303-04 2008-10-02 5169 138 W/O 10058-1 3533 -164.20 Receive Inventory from Manufacturing 5196 t WO f jsmith f 10397 f 2008-10-02 09:56:03.862618-04 2008-10-02 5170 86 W/O 10058-1 -1 -46.10 Manufacturing Inventory Cost Variance 5197 t WO f jsmith f 10398 f 2008-10-02 09:56:03.862618-04 2008-10-02 5170 87 W/O 10058-1 -1 46.10 Manufacturing Inventory Cost Variance 5197 t WO f jsmith f 10410 f 2008-10-02 09:59:48.655574-04 2008-10-02 5176 86 W/O 50185-1 3537 -10.00 Material Issue to Work Order 5204 t WO f jsmith f 10409 f 2008-10-02 09:59:48.655574-04 2008-10-02 5176 138 W/O 50185-1 3537 10.00 Material Issue to Work Order 5204 t WO f jsmith f 10412 f 2008-10-02 09:59:48.655574-04 2008-10-02 5177 86 W/O 50185-1 3538 -12.00 Material Issue to Work Order 5205 t WO f jsmith f 10411 f 2008-10-02 09:59:48.655574-04 2008-10-02 5177 138 W/O 50185-1 3538 12.00 Material Issue to Work Order 5205 t WO f jsmith f 10414 f 2008-10-02 09:59:48.655574-04 2008-10-02 5178 86 W/O 50185-1 3539 -1.49 Material Issue to Work Order 5206 t WO f jsmith f 10416 f 2008-10-02 09:59:48.655574-04 2008-10-02 5179 86 W/O 50185-1 -1 -1.10 Post Setup Time to Work Order 5207 t WO f jsmith f 10415 f 2008-10-02 09:59:48.655574-04 2008-10-02 5179 94 W/O 50185-1 -1 1.10 Post Setup Time to Work Order 5207 t WO f jsmith f 10418 f 2008-10-02 09:59:48.655574-04 2008-10-02 5180 86 W/O 50185-1 -1 -2.20 Post Run Time to Work Order 5208 t WO f jsmith f 10417 f 2008-10-02 09:59:48.655574-04 2008-10-02 5180 94 W/O 50185-1 -1 2.20 Post Run Time to Work Order 5208 t WO f jsmith f 11977 f 2010-03-10 16:37:44.35516-05 2010-03-10 5912 95 S/R 20082-1 3979 22000.00 Receive Inventory from P/O for Diamond Manufacturing 6100 t PO f admin f 11978 f 2010-03-10 16:37:44.35516-05 2010-03-10 5912 85 S/R 20082-1 3979 -22000.00 Receive Inventory from P/O for Diamond Manufacturing 6100 t PO f admin f 11980 f 2010-03-10 16:37:44.35516-05 2010-03-10 5913 96 S/R 50201-1 3980 -22000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6102 t SO f admin f 11979 f 2010-03-10 16:37:44.35516-05 2010-03-10 5913 85 S/R 50201-1 3980 22000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6102 t SO f admin f 11982 f 2010-03-10 16:37:44.35516-05 2010-03-10 5914 108 S/R 60063 -1 -22000.00 Ship Shipment to Customer Tremendous Toys Incorporated 6103 t SH f admin f 11981 f 2010-03-10 16:37:44.35516-05 2010-03-10 5914 96 S/R 60063 -1 22000.00 Ship Shipment to Customer Tremendous Toys Incorporated 6103 t SH f admin f 11983 f 2010-03-10 16:38:54.018804-05 2010-03-10 5915 106 A/R 60090 \N -49500.00 Tremendous Toys Incorporated 6104 t IN f admin f 11984 f 2010-03-10 16:38:54.018804-05 2010-03-10 5915 103 A/R 60090 \N 49500.00 Tremendous Toys Incorporated 6104 t IN f admin f 11985 f 2010-03-10 16:40:26.082405-05 2010-03-10 5917 106 A/R 20024 \N 990.00 Tremendous Toys Incorporated Discount Credit from C-12343388 6105 t CM f admin f 11986 f 2010-03-10 16:40:26.082405-05 2010-03-10 5917 157 A/R 20024 \N -990.00 Tremendous Toys Incorporated Discount Credit from C-12343388 6105 t CM f admin f 11987 f 2010-03-10 16:40:26.082405-05 2010-03-10 5916 106 A/R I-60090 \N 48510.00 TTOYS-Tremendous Toys Incorporated 6105 t CR f admin f 11990 f 2010-03-10 16:43:31.303145-05 2010-03-10 5918 99 A/P 30090 \N 22000.00 DMFG-Diamond Manufacturing 6106 t VO f admin f 11989 f 2010-03-10 16:43:31.303145-05 2010-03-10 5918 95 A/P 30090 \N -22000.00 DMFG-Diamond Manufacturing 6106 t VO f admin f 11991 f 2010-03-10 16:44:50.433817-05 2010-03-10 5919 99 A/P 4052 197 -22000.00 DMFG-Diamond Manufacturing 6108 t CK f admin f 11993 f 2010-03-12 15:03:05.591481-05 2010-03-12 5920 95 S/R 20083-1 3981 200.00 Receive Inventory from P/O for Toy Parts Inc. 6109 t PO f admin f 11994 f 2010-03-12 15:03:05.591481-05 2010-03-12 5920 138 S/R 20083-1 3981 -200.00 Receive Inventory from P/O for Toy Parts Inc. 6109 t PO f admin f 12000 f 2010-03-12 15:03:40.677631-05 2010-03-12 5923 86 W/O 10072-1 -1 -0.92 Post Setup Time Standard Operation - Assembly/ to Work Order 6113 t WO f admin f 11999 f 2010-03-12 15:03:40.677631-05 2010-03-12 5923 94 W/O 10072-1 -1 0.92 Post Setup Time Standard Operation - Assembly/ to Work Order 6113 t WO f admin f 12002 f 2010-03-12 15:03:40.677631-05 2010-03-12 5924 86 W/O 10072-1 -1 -100.83 Post Run Time Standard Operation - Assembly/ to Work Order 6114 t WO f admin f 12001 f 2010-03-12 15:03:40.677631-05 2010-03-12 5924 94 W/O 10072-1 -1 100.83 Post Run Time Standard Operation - Assembly/ to Work Order 6114 t WO f admin f 11996 f 2010-03-12 15:03:40.677631-05 2010-03-12 5921 86 W/O 10072-1 3982 -200.00 Material TBOX1 Issue to Work Order 6111 t WO f admin f 11995 f 2010-03-12 15:03:40.677631-05 2010-03-12 5921 138 W/O 10072-1 3982 200.00 Material TBOX1 Issue to Work Order 6111 t WO f admin f 11998 f 2010-03-12 15:03:40.677631-05 2010-03-12 5922 86 W/O 10072-1 3983 -275.00 Material TINSERT1 Issue to Work Order 6112 t WO f admin f 11997 f 2010-03-12 15:03:40.677631-05 2010-03-12 5922 138 W/O 10072-1 3983 275.00 Material TINSERT1 Issue to Work Order 6112 t WO f admin f 12003 f 2010-03-12 15:03:40.677631-05 2010-03-12 5925 86 W/O 10072-1 3984 821.00 Receive Inventory TSUB1 from Manufacturing 6115 t WO f admin f 12004 f 2010-03-12 15:03:40.677631-05 2010-03-12 5925 138 W/O 10072-1 3984 -821.00 Receive Inventory TSUB1 from Manufacturing 6115 t WO f admin f 12005 f 2010-03-12 15:03:51.167111-05 2010-03-12 5926 86 W/O 10072-1 -1 -244.25 Manufacturing Inventory Cost Variance for TSUB1 6116 t WO f admin f 12006 f 2010-03-12 15:03:51.167111-05 2010-03-12 5926 87 W/O 10072-1 -1 244.25 Manufacturing Inventory Cost Variance for TSUB1 6116 t WO f admin f 12018 f 2010-03-12 15:04:01.080913-05 2010-03-12 5932 86 W/O 50202-1 -1 -1.10 \N 6123 t WO f admin f 12017 f 2010-03-12 15:04:01.080913-05 2010-03-12 5932 94 W/O 50202-1 -1 1.10 \N 6123 t WO f admin f 12020 f 2010-03-12 15:04:01.080913-05 2010-03-12 5933 86 W/O 50202-1 -1 -220.00 \N 6124 t WO f admin f 12019 f 2010-03-12 15:04:01.080913-05 2010-03-12 5933 94 W/O 50202-1 -1 220.00 \N 6124 t WO f admin f 10486 f 2008-10-02 10:21:09.352899-04 2008-10-02 5213 86 W/O 50185-1 3556 -12.00 Material Issue to Work Order 5243 t WO f jsmith f 10485 f 2008-10-02 10:21:09.352899-04 2008-10-02 5213 138 W/O 50185-1 3556 12.00 Material Issue to Work Order 5243 t WO f jsmith f 10547 f 2008-12-30 16:35:02.681079-05 2008-12-30 5240 86 W/O 10059-1 3564 -91.00 Material RBUMP1 Issue to Work Order 5278 t WO f admin f 10546 f 2008-12-30 16:35:02.681079-05 2008-12-30 5240 138 W/O 10059-1 3564 91.00 Material RBUMP1 Issue to Work Order 5278 t WO f admin f 10549 f 2008-12-30 16:35:02.681079-05 2008-12-30 5241 86 W/O 10059-1 -1 -13.35 \N 5279 t WO f admin f 10548 f 2008-12-30 16:35:02.681079-05 2008-12-30 5241 94 W/O 10059-1 -1 13.35 \N 5279 t WO f admin f 10551 f 2008-12-30 16:35:02.681079-05 2008-12-30 5242 86 W/O 10059-1 -1 -16.68 \N 5280 t WO f admin f 10550 f 2008-12-30 16:35:02.681079-05 2008-12-30 5242 94 W/O 10059-1 -1 16.68 \N 5280 t WO f admin f 10552 f 2008-12-30 16:35:02.681079-05 2008-12-30 5243 86 W/O 10059-1 3565 212.03 Receive Inventory CBUMP from Manufacturing 5281 t WO f admin f 10553 f 2008-12-30 16:35:02.681079-05 2008-12-30 5243 138 W/O 10059-1 3565 -212.03 Receive Inventory CBUMP from Manufacturing 5281 t WO f admin f 10555 f 2008-12-30 16:41:17.968721-05 2008-12-30 5244 92 I/M MA-SCRP 3566 -73.89 Material Scrap for item TKIT1\nWater Damage Due to Storm 5284 t SI f admin f 10554 f 2008-12-30 16:41:17.968721-05 2008-12-30 5244 138 I/M MA-SCRP 3566 73.89 Material Scrap for item TKIT1\nWater Damage Due to Storm 5284 t SI f admin f 10556 f 2008-12-31 13:48:48.2886-05 2008-12-31 5245 95 S/R 20061 3567 20.00 Receive Inventory from P/O for Toy Parts Inc. 5285 t PO f jsmith f 10557 f 2008-12-31 13:48:48.2886-05 2008-12-31 5245 138 S/R 20061 3567 -20.00 Receive Inventory from P/O for Toy Parts Inc. 5285 t PO f jsmith f 10559 f 2008-12-31 13:50:05.780921-05 2008-12-31 5246 90 A/P 30063 \N -5.00 TPARTS-Toy Parts Inc. RF10001 5287 t VO f jsmith f 10560 f 2008-12-31 13:50:05.780921-05 2008-12-31 5246 99 A/P 30063 \N 25.00 TPARTS-Toy Parts Inc. RF10001 5287 t VO f jsmith f 10558 f 2008-12-31 13:50:05.780921-05 2008-12-31 5246 95 A/P 30063 \N -20.00 TPARTS-Toy Parts Inc. RF10001 5287 t VO f jsmith f 10562 f 2008-12-31 13:50:08.988406-05 2008-12-31 5247 99 A/P 30064 \N 91.00 ICHROME-International Chrome Technologies RF01991 5288 t VO f jsmith f 12022 f 2010-03-12 15:04:01.080913-05 2010-03-12 5934 86 W/O 50202-1 -1 -2.20 \N 6125 t WO f admin f 12021 f 2010-03-12 15:04:01.080913-05 2010-03-12 5934 94 W/O 50202-1 -1 2.20 \N 6125 t WO f admin f 12024 f 2010-03-12 15:04:01.080913-05 2010-03-12 5935 86 W/O 50202-1 -1 -55.00 \N 6126 t WO f admin f 12023 f 2010-03-12 15:04:01.080913-05 2010-03-12 5935 94 W/O 50202-1 -1 55.00 \N 6126 t WO f admin f 12026 f 2010-03-12 15:04:01.080913-05 2010-03-12 5936 86 W/O 50202-1 -1 -0.44 \N 6127 t WO f admin f 12025 f 2010-03-12 15:04:01.080913-05 2010-03-12 5936 94 W/O 50202-1 -1 0.44 \N 6127 t WO f admin f 12028 f 2010-03-12 15:04:01.080913-05 2010-03-12 5937 86 W/O 50202-1 -1 -22.00 \N 6128 t WO f admin f 12027 f 2010-03-12 15:04:01.080913-05 2010-03-12 5937 94 W/O 50202-1 -1 22.00 \N 6128 t WO f admin f 12008 f 2010-03-12 15:04:01.080913-05 2010-03-12 5927 86 W/O 50202-1 3985 -1000.00 Material TBODY1 Issue to Work Order 6118 t WO f admin f 12007 f 2010-03-12 15:04:01.080913-05 2010-03-12 5927 138 W/O 50202-1 3985 1000.00 Material TBODY1 Issue to Work Order 6118 t WO f admin f 12010 f 2010-03-12 15:04:01.080913-05 2010-03-12 5928 86 W/O 50202-1 3986 -400.00 Material TWHEEL1 Issue to Work Order 6119 t WO f admin f 12009 f 2010-03-12 15:04:01.080913-05 2010-03-12 5928 138 W/O 50202-1 3986 400.00 Material TWHEEL1 Issue to Work Order 6119 t WO f admin f 12012 f 2010-03-12 15:04:01.080913-05 2010-03-12 5929 86 W/O 50202-1 3987 -8.00 Material YPAINT1 Issue to Work Order 6120 t WO f admin f 12011 f 2010-03-12 15:04:01.080913-05 2010-03-12 5929 138 W/O 50202-1 3987 8.00 Material YPAINT1 Issue to Work Order 6120 t WO f admin f 12014 f 2010-03-12 15:04:01.080913-05 2010-03-12 5930 86 W/O 50202-1 3988 -821.00 Material TSUB1 Issue to Work Order 6121 t WO f admin f 12013 f 2010-03-12 15:04:01.080913-05 2010-03-12 5930 138 W/O 50202-1 3988 821.00 Material TSUB1 Issue to Work Order 6121 t WO f admin f 12015 f 2010-03-12 15:04:01.080913-05 2010-03-12 5931 86 W/O 50202-1 3989 2563.40 Receive Inventory YTRUCK1 from Manufacturing 6122 t WO f admin f 12016 f 2010-03-12 15:04:01.080913-05 2010-03-12 5931 85 W/O 50202-1 3989 -2563.40 Receive Inventory YTRUCK1 from Manufacturing 6122 t WO f admin f 12029 f 2010-03-12 15:04:40.445197-05 2010-03-12 5938 86 W/O 50202-1 -1 -33.66 Manufacturing Inventory Cost Variance for YTRUCK1 6129 t WO f admin f 12030 f 2010-03-12 15:04:40.445197-05 2010-03-12 5938 87 W/O 50202-1 -1 33.66 Manufacturing Inventory Cost Variance for YTRUCK1 6129 t WO f admin f 12033 f 2010-03-12 15:06:00.380639-05 2010-03-12 5939 99 A/P 30091 \N 208.00 TPARTS-Toy Parts Inc. 6131 t VO f admin f 12031 f 2010-03-12 15:06:00.380639-05 2010-03-12 5939 95 A/P 30091 \N -200.00 TPARTS-Toy Parts Inc. 6131 t VO f admin f 12032 f 2010-03-12 15:06:00.380639-05 2010-03-12 5939 155 A/P 30091 \N -8.00 TPARTS-Toy Parts Inc. 6131 t VO f admin f 12036 f 2010-03-12 15:08:34.132878-05 2010-03-12 5940 99 A/P 30092 \N 1040.00 UPS-United Parcel Service 6133 t VO f admin f 12035 f 2010-03-12 15:08:34.132878-05 2010-03-12 5940 102 A/P 30092 \N -40.00 UPS-United Parcel Service 6133 t VO f admin f 12034 f 2010-03-12 15:08:34.132878-05 2010-03-12 5940 139 A/P 30092 \N -300.00 UPS-United Parcel Service 6133 t VO f admin f 12037 f 2010-03-12 15:08:34.132878-05 2010-03-12 5940 120 A/P 30092 \N -700.00 UPS-United Parcel Service 6133 t VO f admin f 12039 f 2010-03-12 15:09:47.012598-05 2010-03-12 5942 101 A/P 30091 \N 4.00 Discount for V 30091 6136 t DS f admin f 12038 f 2010-03-12 15:09:47.012598-05 2010-03-12 5942 99 A/P 30091 \N -4.00 Discount for V 30091 6136 t DS f admin f 12049 f 2010-03-12 15:10:28.651023-05 2010-03-12 5946 108 S/R 60064 -1 -12.82 Ship Shipment to Customer Tremendous Toys Incorporated 6140 t SH f admin f 12048 f 2010-03-12 15:10:28.651023-05 2010-03-12 5946 96 S/R 60064 -1 12.82 Ship Shipment to Customer Tremendous Toys Incorporated 6140 t SH f admin f 12041 f 2010-03-12 15:09:47.012598-05 2010-03-12 5941 99 A/P -1 198 -204.00 TPARTS-Toy Parts Inc. 6135 t CK f admin f 12043 f 2010-03-12 15:09:47.012598-05 2010-03-12 5943 99 A/P 4053 199 -1040.00 UPS-United Parcel Service 6135 t CK f admin f 12045 f 2010-03-12 15:10:17.738066-05 2010-03-12 5944 96 S/R 50202-1 3990 -2563.40 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6138 t SO f admin f 12044 f 2010-03-12 15:10:17.738066-05 2010-03-12 5944 85 S/R 50202-1 3990 2563.40 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6138 t SO f admin f 12047 f 2010-03-12 15:10:18.074981-05 2010-03-12 5945 96 S/R 50202-2 3991 -12.82 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6139 t SO f admin f 12046 f 2010-03-12 15:10:18.074981-05 2010-03-12 5945 85 S/R 50202-2 3991 12.82 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6139 t SO f admin f 12051 f 2010-03-12 15:10:28.651023-05 2010-03-12 5947 108 S/R 60064 -1 -2563.40 Ship Shipment to Customer Tremendous Toys Incorporated 6141 t SH f admin f 12050 f 2010-03-12 15:10:28.651023-05 2010-03-12 5947 96 S/R 60064 -1 2563.40 Ship Shipment to Customer Tremendous Toys Incorporated 6141 t SH f admin f 12055 f 2010-03-12 15:10:52.3412-05 2010-03-12 5948 122 A/R 60091 \N 1758.75 Tremendous Toys Incorporated 6142 t IN f admin f 12053 f 2010-03-12 15:10:52.3412-05 2010-03-12 5948 106 A/R 60091 \N -11522.70 Tremendous Toys Incorporated 6142 t IN f admin f 10561 f 2008-12-31 13:50:08.988406-05 2008-12-31 5247 95 A/P 30064 \N -91.00 ICHROME-International Chrome Technologies RF01991 5288 t VO f jsmith f 10567 f 2008-12-31 14:12:39.353591-05 2008-12-31 5249 99 A/P 4002 163 -89.18 ICHROME-International Chrome Technologies 5292 t CK f jsmith f 12052 f 2010-03-12 15:10:52.3412-05 2010-03-12 5948 102 A/R 60091 \N 464.95 Tremendous Toys Incorporated 6142 t IN f admin f 12054 f 2010-03-12 15:10:52.3412-05 2010-03-12 5948 103 A/R 60091 \N 9299.00 Tremendous Toys Incorporated 6142 t IN f admin f 12057 f 2010-03-12 15:12:43.625553-05 2010-03-12 5950 106 A/R 20025 \N 230.45 Tremendous Toys Incorporated Discount Credit from C-3423423 6143 t CM f admin f 12056 f 2010-03-12 15:12:43.625553-05 2010-03-12 5950 102 A/R 20025 \N -9.30 Tremendous Toys Incorporated Discount Credit from C-3423423 6143 t CM f admin f 12058 f 2010-03-12 15:12:43.625553-05 2010-03-12 5950 157 A/R 20025 \N -221.15 Tremendous Toys Incorporated Discount Credit from C-3423423 6143 t CM f admin f 12059 f 2010-03-12 15:12:43.625553-05 2010-03-12 5949 106 A/R I-60091 \N 11292.25 TTOYS-Tremendous Toys Incorporated 6143 t CR f admin f 12064 f 2010-03-12 15:16:24.722428-05 2010-02-10 5951 99 G/L Receive Product \N 50000.00 Accrue Payable 6144 t ST f admin f 12066 f 2010-03-12 15:16:24.722428-05 2010-02-10 5951 99 G/L Receive Product \N -50000.00 Clear A/P 6144 t ST f admin f 12062 f 2010-03-12 15:16:24.722428-05 2010-02-10 5951 95 G/L Receive Product \N 50000.00 Liab Clear 6144 t ST f admin f 12063 f 2010-03-12 15:16:24.722428-05 2010-02-10 5951 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 6144 t ST f admin f 12061 f 2010-03-12 15:16:24.722428-05 2010-02-10 5951 85 G/L Receive Product \N -50000.00 FG Inv 6144 t ST f admin f 12068 f 2010-03-12 15:16:37.619518-05 2010-02-10 5952 108 G/L Ship Order \N -45250.00 6145 t ST f admin f 12067 f 2010-03-12 15:16:37.619518-05 2010-02-10 5952 85 G/L Ship Order \N 45250.00 6145 t ST f admin f 12070 f 2010-03-12 15:16:37.619518-05 2010-02-10 5952 103 G/L Ship Order \N 77250.00 6145 t ST f admin f 12072 f 2010-03-12 15:18:05.292854-05 2010-01-15 5954 95 G/L Receive Product \N 50000.00 Liab Clear 6148 t ST f admin f 12073 f 2010-03-12 15:18:05.292854-05 2010-01-15 5954 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 6148 t ST f admin f 12071 f 2010-03-12 15:18:05.292854-05 2010-01-15 5954 85 G/L Receive Product \N -50000.00 FG Inv 6148 t ST f admin f 10652 f 2008-12-31 16:04:47.561455-05 2008-11-01 5292 106 A/R 60075 \N -74455.00 Tremendous Toys Incorporated 5342 t IN f jsmith f 10651 f 2008-12-31 16:04:47.561455-05 2008-11-01 5292 140 A/R 60075 \N 25000.00 Tremendous Toys Incorporated 5342 t IN f jsmith f 10650 f 2008-12-31 16:04:47.561455-05 2008-11-01 5292 103 A/R 60075 \N 49455.00 Tremendous Toys Incorporated 5342 t IN f jsmith f 10653 f 2008-12-31 16:07:28.552171-05 2008-11-15 5293 106 A/R I-60075 \N 74455.00 TTOYS-Tremendous Toys Incorporated 5343 t CR f jsmith f 10656 f 2008-12-31 16:08:57.5974-05 2008-11-30 5294 108 G/L Payroll -1 -20000.00 Cost of Services Provided 5344 t JE f jsmith f 12074 f 2010-03-12 15:18:05.292854-05 2010-01-15 5954 99 G/L Receive Product \N 50000.00 Accrue Payable 6148 t ST f admin f 12076 f 2010-03-12 15:18:05.292854-05 2010-01-15 5954 99 G/L Receive Product \N -50000.00 Clear A/P 6148 t ST f admin f 12078 f 2010-03-12 15:18:16.323198-05 2010-01-15 5955 108 G/L Ship Order \N -45250.00 6149 t ST f admin f 12077 f 2010-03-12 15:18:16.323198-05 2010-01-15 5955 85 G/L Ship Order \N 45250.00 6149 t ST f admin f 12080 f 2010-03-12 15:18:16.323198-05 2010-01-15 5955 103 G/L Ship Order \N 77250.00 6149 t ST f admin f 12081 f 2010-03-12 15:20:58.141729-05 2010-01-01 5956 106 A/R 60092 \N -2025.00 Tremendous Toys Incorporated 6150 t IN f admin f 12082 f 2010-03-12 15:20:58.141729-05 2010-01-01 5956 140 A/R 60092 \N 2025.00 Tremendous Toys Incorporated 6150 t IN f admin f 12083 f 2010-03-12 15:21:22.084915-05 2010-03-12 5957 106 A/R I-60092 \N 2025.00 TTOYS-Tremendous Toys Incorporated 6151 t CR f admin f 12085 f 2010-03-12 15:25:43.591309-05 2010-03-12 5958 137 S/R 80010-1 3992 12.56 Receive Inventory from R/A 6152 t RA f admin f 12086 f 2010-03-12 15:25:43.591309-05 2010-03-12 5958 128 S/R 80010-1 3992 -12.56 Receive Inventory from R/A 6152 t RA f admin f 12088 f 2010-03-12 15:26:28.506053-05 2010-03-12 5959 96 S/R 50204-1 3993 -12.56 Issue STRUCK1 to Shipping for customer Tremendous Toys Incorporated 6154 t SO f admin f 12087 f 2010-03-12 15:26:28.506053-05 2010-03-12 5959 85 S/R 50204-1 3993 12.56 Issue STRUCK1 to Shipping for customer Tremendous Toys Incorporated 6154 t SO f admin f 12089 f 2010-03-12 15:26:43.433632-05 2010-03-12 5960 96 S/R 60065 -1 12.56 Ship Shipment to Customer Tremendous Toys Incorporated 6155 t SH f admin f 10636 f 2008-12-31 15:41:18.751794-05 2008-01-01 5283 91 G/L Adjustment \N 152.20 Adjustment 5333 t JE f jsmith f 10632 f 2008-12-31 15:31:31.197979-05 2008-12-31 5281 106 A/R I-60074 \N 213614.91 XTRM-Xtreme Toys LTD 5332 t CR f jsmith f 10641 f 2008-12-31 15:49:04.028879-05 2008-12-31 5286 108 G/L Clear Variance To COGS \N -92854.34 Clear Variances 5335 t JE f jsmith f 10640 f 2008-12-31 15:49:04.028879-05 2008-12-31 5286 87 G/L Clear Variance To COGS \N -39.42 Clear Variances 5335 t JE f jsmith f 10639 f 2008-12-31 15:49:04.028879-05 2008-12-31 5286 90 G/L Clear Variance To COGS \N 92893.76 Clear Variances 5335 t JE f jsmith f 10642 f 2008-12-31 15:50:36.930747-05 2008-12-31 5288 96 G/L Return Stock -1 2000.00 Return shipping assets to stock 5336 t JE f jsmith f 10643 f 2008-12-31 15:50:36.930747-05 2008-12-31 5288 85 G/L Return Stock -1 -2000.00 Return shipping assets to stock 5336 t JE f jsmith f 10645 f 2008-12-31 15:52:59.090396-05 2008-12-31 5289 94 G/L Payroll -1 -4678.68 Payroll - Clear Accrued Liab 5337 t JE f jsmith f 10662 f 2009-01-06 16:24:22.853482-05 2009-01-06 5297 109 A/P 4008 168 199.00 TPARTS-Toy Parts Inc. 5349 t CK t jsmith f 10661 f 2009-01-06 16:24:22.853482-05 2009-01-06 5297 131 A/P 4008 168 -199.00 TPARTS-Toy Parts Inc. 5349 t CK f jsmith f 10663 f 2009-01-12 13:14:35.396128-05 2009-01-12 5298 95 S/R 20063 3579 2567.80 Receive Inventory from P/O for Toy Parts Inc. 5350 t PO f jsmith f 10664 f 2009-01-12 13:14:35.396128-05 2009-01-12 5298 85 S/R 20063 3579 -2567.80 Receive Inventory from P/O for Toy Parts Inc. 5350 t PO f jsmith f 10665 f 2009-01-12 13:14:35.396128-05 2009-01-12 5299 95 S/R 20063 3580 2567.80 Receive Inventory from P/O for Toy Parts Inc. 5352 t PO f jsmith f 10666 f 2009-01-12 13:14:35.396128-05 2009-01-12 5299 85 S/R 20063 3580 -2567.80 Receive Inventory from P/O for Toy Parts Inc. 5352 t PO f jsmith f 10667 f 2009-01-12 13:14:35.396128-05 2009-01-12 5300 95 S/R 20063 3581 2567.80 Receive Inventory from P/O for Toy Parts Inc. 5354 t PO f jsmith f 10668 f 2009-01-12 13:14:35.396128-05 2009-01-12 5300 85 S/R 20063 3581 -2567.80 Receive Inventory from P/O for Toy Parts Inc. 5354 t PO f jsmith f 10670 f 2009-01-12 13:16:07.741834-05 2009-01-12 5301 90 A/P 30067 \N -276.60 TPARTS-Toy Parts Inc. RF101991 5356 t VO f jsmith f 12090 f 2010-03-12 15:26:43.433632-05 2010-03-12 5960 137 S/R 60065 -1 -12.56 Ship Shipment to Customer Tremendous Toys Incorporated 6155 t SH f admin f 12091 f 2010-03-12 15:33:59.235438-05 2010-03-12 5962 95 S/R 20084-1 3994 37.69 Receive Inventory from P/O for Toy Parts Inc. 6157 t PO f admin f 12092 f 2010-03-12 15:33:59.235438-05 2010-03-12 5962 85 S/R 20084-1 3994 -37.69 Receive Inventory from P/O for Toy Parts Inc. 6157 t PO f admin f 12096 f 2010-03-12 15:36:03.632315-05 2010-03-12 5963 90 A/P 30093 \N -28.31 TPARTS-Toy Parts Inc. STRUCK Buy 6159 t VO f admin f 12095 f 2010-03-12 15:36:03.632315-05 2010-03-12 5963 99 A/P 30093 \N 93.64 TPARTS-Toy Parts Inc. STRUCK Buy 6159 t VO f admin f 12093 f 2010-03-12 15:36:03.632315-05 2010-03-12 5963 95 A/P 30093 \N -37.69 TPARTS-Toy Parts Inc. STRUCK Buy 6159 t VO f admin f 12097 f 2010-03-12 15:36:03.632315-05 2010-03-12 5963 139 A/P 30093 \N -25.00 TPARTS-Toy Parts Inc. STRUCK Buy 6159 t VO f admin f 12094 f 2010-03-12 15:36:03.632315-05 2010-03-12 5963 155 A/P 30093 \N -2.64 TPARTS-Toy Parts Inc. STRUCK Buy 6159 t VO f admin f 10302 f 2008-09-08 18:04:30.709205-04 2008-08-15 5125 109 G/L Ship Order \N -77250.00 5143 t ST t jsmith f 10254 f 2008-09-08 17:09:13.957547-04 2008-09-08 5104 109 A/P 3046 154 33500.00 TPARTS-Toy Parts Inc. 5121 t CK t admin f 10262 f 2008-09-08 17:19:36.136499-04 2008-09-08 5106 109 A/P 3047 155 65660.00 TPARTS-Toy Parts Inc. 5124 t CK t admin f 12099 f 2010-03-12 15:37:44.606151-05 2010-03-12 5965 101 A/P 30093 \N 1.82 Discount for V 30093 6162 t DS f admin f 10296 f 2008-09-08 18:00:35.835742-04 2008-09-08 5122 109 A/R C-1231112 \N -41692.20 TTOYS-Tremendous Toys Incorporated 5141 t CR t jsmith f 10297 f 2008-09-08 18:00:38.405404-04 2008-09-08 5123 109 A/R C-121143 \N -47000.00 TTOYS-Tremendous Toys Incorporated 5142 t CR t jsmith f 10305 f 2008-09-08 18:13:44.620865-04 2008-09-08 5126 109 G/L 3048 157 300.00 NC TAX-North Carolina IRS 5146 t CK t jsmith f 10307 f 2008-09-08 18:13:48.37063-04 2008-09-08 5127 109 G/L 3049 156 200.00 VA TAX-Virginia Sales Tax 5147 t CK t jsmith f 10353 f 2008-09-09 17:23:26.315642-04 2008-09-09 5148 109 A/R C-1231112 \N -35.00 TTOYS-Tremendous Toys Incorporated 5168 t CR t jsmith f 10374 f 2008-09-24 16:37:13.387861-04 2008-09-24 5157 109 A/P 3052 158 539.00 TPARTS-Toy Parts Inc. 5182 t CK t jsmith f 9629 f 2008-04-04 08:50:44.342929-04 2008-04-04 4809 127 A/R C-123111 \N -14796.55 XTRM-Xtreme Toys LTD 4251 t CR t mfgadmin f 9645 f 2008-06-12 09:47:43.556837-04 2008-06-12 4816 127 A/R C-121121 \N -42.75 XTRM-Xtreme Toys LTD 4260 t CR t jsmith f 10294 f 2008-09-08 18:00:33.605668-04 2008-07-15 5121 109 A/R C-123123 \N -47250.00 TTOYS-Tremendous Toys Incorporated 5140 t CR t jsmith f 10378 f 2008-09-24 16:37:16.553023-04 2008-09-24 5159 109 A/P 3053 159 1078.00 WCHEM-World Chem, Inc. 5185 t CK t jsmith f 10380 f 2008-10-02 09:13:21.632915-04 2008-10-02 5161 109 A/R V-199-1 \N -1000.00 Cash Receipt from Credit Card 5188 t CR t jsmith f 10482 f 2008-10-02 10:20:20.101955-04 2008-10-02 5211 109 A/R C-12311 \N -3213.17 TTOYS-Tremendous Toys Incorporated 5239 t CR t jsmith f 10515 f 2008-10-02 10:34:43.577196-04 2008-10-02 5224 109 A/P 4001 161 68.60 TPARTS-Toy Parts Inc. 5259 t CK t jsmith f 10519 f 2008-10-02 10:35:25.946912-04 2008-10-02 5226 126 A/P 5010 160 27635.99 XPPI-Packaging Pros LTD 5262 t CK t jsmith f 10520 f 2008-10-02 10:37:32.020396-04 2008-10-02 5228 109 G/L TrnEuros-190001 -1 50000.00 Transfer to Euro Account 5265 t JE t jsmith f 10521 f 2008-10-02 10:37:32.020396-04 2008-10-02 5228 126 G/L TrnEuros-190001 -1 -50000.00 Transfer to Euro Account 5265 t JE t jsmith f 10540 f 2008-10-02 11:07:45.349413-04 2008-10-02 5237 109 A/R C-3211 \N -46590.37 TTOYS-Tremendous Toys Incorporated 5274 t CR t jsmith f 10542 f 2008-10-02 11:08:16.289661-04 2008-10-02 5238 127 A/R C-121 \N -44000.14 XTRM-Xtreme Toys LTD 5275 t CR t jsmith f 10654 f 2008-12-31 16:07:28.552171-05 2008-11-15 5293 109 A/R C-23123 \N -74455.00 TTOYS-Tremendous Toys Incorporated 5343 t CR t jsmith f 10655 f 2008-12-31 16:08:57.5974-05 2008-11-30 5294 109 G/L Payroll -1 20000.00 Cost of Services Provided 5344 t JE t jsmith f 10568 f 2008-12-31 14:12:39.353591-05 2008-12-31 5249 109 A/P 4002 163 89.18 ICHROME-International Chrome Technologies 5292 t CK t jsmith f 10572 f 2008-12-31 14:12:43.10223-05 2008-12-31 5251 109 A/P 4003 162 24.50 TPARTS-Toy Parts Inc. 5295 t CK t jsmith f 10624 f 2008-12-31 15:02:09.298362-05 2008-12-31 5276 109 A/P 4004 164 49000.00 TPARTS-Toy Parts Inc. 5326 t CK t jsmith f 10644 f 2008-12-31 15:52:59.090396-05 2008-12-31 5289 109 G/L Payroll -1 4678.68 Payroll - Clear Accrued Liab 5337 t JE t jsmith f 10647 f 2008-12-31 15:56:42.551961-05 2008-12-31 5290 109 G/L 4005 165 3881.18 NC TAX-North Carolina IRS 5340 t CK t jsmith f 10649 f 2008-12-31 15:56:51.176365-05 2008-12-31 5291 109 G/L 4006 166 8796.60 VA TAX-Virginia Sales Tax 5341 t CK t jsmith f 10660 f 2008-12-31 16:12:12.036109-05 2008-12-31 5296 109 A/P 4007 167 50000.00 WCHEM-World Chem, Inc. 5347 t CK t jsmith f 10675 f 2009-01-12 13:18:59.949285-05 2009-01-12 5302 109 A/P 4010 170 7820.40 TPARTS-Toy Parts Inc. 5358 t CK t jsmith f 10677 f 2009-01-12 13:24:44.992694-05 2009-01-12 5304 109 A/P 4011 171 100.00 TPARTS-Toy Parts Inc. 5362 t CK t jsmith f 10702 f 2009-01-12 13:54:19.007811-05 2009-01-12 5315 106 A/R 60077 \N -101.06 Tremendous Toys Incorporated 5373 t IN f jsmith f 10699 f 2009-01-12 13:54:19.007811-05 2009-01-12 5315 102 A/R 60077 \N 4.46 Tax liability for Tremendous Toys Incorporated 5373 t IN f jsmith f 10700 f 2009-01-12 13:54:19.007811-05 2009-01-12 5315 103 A/R 60077 \N 89.10 Tremendous Toys Incorporated 5373 t IN f jsmith f 10704 f 2009-01-12 13:54:42.900138-05 2009-01-12 5316 96 S/R 50193-1 3586 -12.56 Issue STRUCK1 to Shipping for customer Xtreme Toys LTD 5374 t SO f jsmith f 10703 f 2009-01-12 13:54:42.900138-05 2009-01-12 5316 85 S/R 50193-1 3586 12.56 Issue STRUCK1 to Shipping for customer Xtreme Toys LTD 5374 t SO f jsmith f 10706 f 2009-01-12 13:54:59.572221-05 2009-01-12 5317 108 S/R 60042 -1 -12.56 Ship Shipment to Customer Xtreme Toys LTD 5375 t SH f jsmith f 12098 f 2010-03-12 15:37:44.606151-05 2010-03-12 5965 99 A/P 30093 \N -1.82 Discount for V 30093 6162 t DS f admin f 12101 f 2010-03-12 15:37:44.606151-05 2010-03-12 5964 99 A/P -1 200 -91.82 TPARTS-Toy Parts Inc. 6161 t CK f admin f 10497 f 2008-10-02 10:23:43.657652-04 2008-10-02 5218 127 A/R C-4311 \N -376.50 XTRM-Xtreme Toys LTD 5248 t CR t jsmith f 10615 f 2008-12-31 14:57:46.561632-05 2008-12-31 5273 127 A/R C-639-1001 \N -921.27 XTRM-Xtreme Toys LTD 5321 t CR t jsmith f 10727 f 2009-06-26 15:43:40.856545-04 2009-06-26 5327 106 A/R I-60079 \N 50000.00 TTOYS-Tremendous Toys Incorporated 5387 t CR f admin f 10736 f 2009-06-26 15:49:46.740099-04 2009-05-12 5331 126 A/P 5011 174 2799.98 XPPI-Packaging Pros LTD 5394 t CK f admin f 10735 f 2009-06-26 15:49:46.740099-04 2009-05-12 5331 99 A/P 5011 174 -2799.98 XPPI-Packaging Pros LTD 5394 t CK f admin f 10710 f 2009-01-12 14:00:32.343057-05 2009-01-12 5320 127 A/R C- \N -31812.44 XTRM-Xtreme Toys LTD 5378 t CR t jsmith f 10725 f 2009-06-26 15:43:06.073749-04 2009-01-01 5326 106 A/R 60079 \N -50000.00 Tremendous Toys Incorporated 5386 t IN f admin f 10724 f 2009-06-26 15:43:06.073749-04 2009-01-01 5326 103 A/R 60079 \N 50000.00 Tremendous Toys Incorporated 5386 t IN f admin f 10728 f 2009-06-26 15:46:19.62724-04 2009-01-01 5328 95 S/R 20064 3587 1000.00 Receive Inventory from P/O for Packaging Pros LTD 5388 t PO f admin f 10729 f 2009-06-26 15:46:19.62724-04 2009-01-01 5328 138 S/R 20064 3587 -1000.00 Receive Inventory from P/O for Packaging Pros LTD 5388 t PO f admin f 10730 f 2009-06-26 15:46:20.322255-04 2009-01-01 5329 95 S/R 20064 3588 250.00 Receive Inventory from P/O for Packaging Pros LTD 5390 t PO f admin f 10731 f 2009-06-26 15:46:20.322255-04 2009-01-01 5329 138 S/R 20064 3588 -250.00 Receive Inventory from P/O for Packaging Pros LTD 5390 t PO f admin f 10734 f 2009-06-26 15:47:39.989708-04 2009-01-30 5330 90 A/P 30070 \N -1549.98 XPPI-Packaging Pros LTD RF0101 5392 t VO f admin f 10732 f 2009-06-26 15:47:39.989708-04 2009-01-30 5330 99 A/P 30070 \N 2799.98 XPPI-Packaging Pros LTD RF0101 5392 t VO f admin f 10733 f 2009-06-26 15:47:39.989708-04 2009-01-30 5330 95 A/P 30070 \N -1250.00 XPPI-Packaging Pros LTD RF0101 5392 t VO f admin f 10818 f 2009-06-26 16:19:12.18568-04 2009-05-01 5369 108 G/L Ship Order \N -51000.00 5443 t ST f admin f 10820 f 2009-06-26 16:19:12.18568-04 2009-05-01 5369 85 G/L Ship Order \N 51000.00 5443 t ST f admin f 10821 f 2009-06-26 16:19:12.18568-04 2009-05-01 5369 103 G/L Ship Order \N 91000.00 5443 t ST f admin f 10843 f 2009-06-26 16:34:35.597741-04 2009-05-01 5377 99 G/L Receive Product \N 50000.00 Accrue Payable 5452 t ST f admin f 10845 f 2009-06-26 16:34:35.597741-04 2009-05-01 5377 99 G/L Receive Product \N -50000.00 Clear A/P 5452 t ST f admin f 10841 f 2009-06-26 16:34:35.597741-04 2009-05-01 5377 95 G/L Receive Product \N 50000.00 Liab Clear 5452 t ST f admin f 10842 f 2009-06-26 16:34:35.597741-04 2009-05-01 5377 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5452 t ST f admin f 10840 f 2009-06-26 16:34:35.597741-04 2009-05-01 5377 85 G/L Receive Product \N -50000.00 FG Inv 5452 t ST f admin f 10815 f 2009-06-26 16:18:27.125184-04 2009-04-01 5368 108 G/L Ship Order \N -45250.00 5442 t ST f admin f 10814 f 2009-06-26 16:18:27.125184-04 2009-04-01 5368 85 G/L Ship Order \N 45250.00 5442 t ST f admin f 10817 f 2009-06-26 16:18:27.125184-04 2009-04-01 5368 103 G/L Ship Order \N 81250.00 5442 t ST f admin f 10849 f 2009-06-26 16:51:25.844564-04 2009-04-01 5378 99 G/L Receive Product \N 50000.00 Accrue Payable 5453 t ST f admin f 10812 f 2009-06-26 16:17:25.687284-04 2009-03-01 5367 108 G/L Ship Order \N -44000.00 5441 t ST f admin f 10813 f 2009-06-26 16:17:25.687284-04 2009-03-01 5367 85 G/L Ship Order \N 44000.00 5441 t ST f admin f 10811 f 2009-06-26 16:17:25.687284-04 2009-03-01 5367 103 G/L Ship Order \N 77250.00 5441 t ST f admin f 10827 f 2009-06-26 16:21:56.600999-04 2009-03-31 5371 108 G/L Clear PPV to COGS -1 -1826.58 Clear PPV to COGS 5445 t JE f admin f 10826 f 2009-06-26 16:21:56.600999-04 2009-03-31 5371 90 G/L Clear PPV to COGS -1 1826.58 Clear PPV to COGS 5445 t JE f admin f 10807 f 2009-06-26 16:16:51.261895-04 2009-02-01 5366 108 G/L Ship Order \N -45250.00 5440 t ST f admin f 10806 f 2009-06-26 16:16:51.261895-04 2009-02-01 5366 85 G/L Ship Order \N 45250.00 5440 t ST f admin f 10809 f 2009-06-26 16:16:51.261895-04 2009-02-01 5366 103 G/L Ship Order \N 77250.00 5440 t ST f admin f 10837 f 2009-06-26 16:34:05.287072-04 2009-02-01 5376 99 G/L Receive Product \N 50000.00 Accrue Payable 5451 t ST f admin f 10839 f 2009-06-26 16:34:05.287072-04 2009-02-01 5376 99 G/L Receive Product \N -50000.00 Clear A/P 5451 t ST f admin f 10835 f 2009-06-26 16:34:05.287072-04 2009-02-01 5376 95 G/L Receive Product \N 50000.00 Liab Clear 5451 t ST f admin f 10836 f 2009-06-26 16:34:05.287072-04 2009-02-01 5376 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5451 t ST f admin f 10834 f 2009-06-26 16:34:05.287072-04 2009-02-01 5376 85 G/L Receive Product \N -50000.00 FG Inv 5451 t ST f admin f 10885 f 2009-08-13 08:36:05.792569-04 2009-07-31 5384 99 G/L Receive Product \N 50000.00 Accrue Payable 5459 t ST f admin f 10887 f 2009-08-13 08:36:05.792569-04 2009-07-31 5384 99 G/L Receive Product \N -50000.00 Clear A/P 5459 t ST f admin f 10883 f 2009-08-13 08:36:05.792569-04 2009-07-31 5384 95 G/L Receive Product \N 50000.00 Liab Clear 5459 t ST f admin f 10884 f 2009-08-13 08:36:05.792569-04 2009-07-31 5384 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5459 t ST f admin f 10882 f 2009-08-13 08:36:05.792569-04 2009-07-31 5384 85 G/L Receive Product \N -50000.00 FG Inv 5459 t ST f admin f 10889 f 2009-08-13 08:36:20.129025-04 2009-07-31 5385 108 G/L Ship Order \N -45250.00 5460 t ST f admin f 10888 f 2009-08-13 08:36:20.129025-04 2009-07-31 5385 85 G/L Ship Order \N 45250.00 5460 t ST f admin f 10891 f 2009-08-13 08:36:20.129025-04 2009-07-31 5385 103 G/L Ship Order \N 77250.00 5460 t ST f admin f 10867 f 2009-06-26 16:54:55.707084-04 2009-06-01 5381 99 G/L Receive Product \N 50000.00 Accrue Payable 5456 t ST f admin f 10869 f 2009-06-26 16:54:55.707084-04 2009-06-01 5381 99 G/L Receive Product \N -50000.00 Clear A/P 5456 t ST f admin f 10865 f 2009-06-26 16:54:55.707084-04 2009-06-01 5381 95 G/L Receive Product \N 50000.00 Liab Clear 5456 t ST f admin f 10866 f 2009-06-26 16:54:55.707084-04 2009-06-01 5381 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5456 t ST f admin f 10864 f 2009-06-26 16:54:55.707084-04 2009-06-01 5381 85 G/L Receive Product \N -50000.00 FG Inv 5456 t ST f admin f 10873 f 2009-06-26 16:55:03.106742-04 2009-06-01 5382 99 G/L Receive Product \N 50000.00 Accrue Payable 5457 t ST f admin f 10875 f 2009-06-26 16:55:03.106742-04 2009-06-01 5382 99 G/L Receive Product \N -50000.00 Clear A/P 5457 t ST f admin f 10871 f 2009-06-26 16:55:03.106742-04 2009-06-01 5382 95 G/L Receive Product \N 50000.00 Liab Clear 5457 t ST f admin f 10872 f 2009-06-26 16:55:03.106742-04 2009-06-01 5382 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5457 t ST f admin f 10870 f 2009-06-26 16:55:03.106742-04 2009-06-01 5382 85 G/L Receive Product \N -50000.00 FG Inv 5457 t ST f admin f 10879 f 2009-06-26 16:55:09.488571-04 2009-06-01 5383 99 G/L Receive Product \N 50000.00 Accrue Payable 5458 t ST f admin f 10881 f 2009-06-26 16:55:09.488571-04 2009-06-01 5383 99 G/L Receive Product \N -50000.00 Clear A/P 5458 t ST f admin f 10877 f 2009-06-26 16:55:09.488571-04 2009-06-01 5383 95 G/L Receive Product \N 50000.00 Liab Clear 5458 t ST f admin f 10878 f 2009-06-26 16:55:09.488571-04 2009-06-01 5383 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5458 t ST f admin f 10876 f 2009-06-26 16:55:09.488571-04 2009-06-01 5383 85 G/L Receive Product \N -50000.00 FG Inv 5458 t ST f admin f 10855 f 2009-06-26 16:53:13.471565-04 2009-05-01 5379 99 G/L Receive Product \N 50000.00 Accrue Payable 5454 t ST f admin f 10857 f 2009-06-26 16:53:13.471565-04 2009-05-01 5379 99 G/L Receive Product \N -50000.00 Clear A/P 5454 t ST f admin f 10853 f 2009-06-26 16:53:13.471565-04 2009-05-01 5379 95 G/L Receive Product \N 50000.00 Liab Clear 5454 t ST f admin f 10854 f 2009-06-26 16:53:13.471565-04 2009-05-01 5379 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5454 t ST f admin f 10852 f 2009-06-26 16:53:13.471565-04 2009-05-01 5379 85 G/L Receive Product \N -50000.00 FG Inv 5454 t ST f admin f 10861 f 2009-06-26 16:53:31.94526-04 2009-05-01 5380 99 G/L Receive Product \N 50000.00 Accrue Payable 5455 t ST f admin f 10863 f 2009-06-26 16:53:31.94526-04 2009-05-01 5380 99 G/L Receive Product \N -50000.00 Clear A/P 5455 t ST f admin f 10859 f 2009-06-26 16:53:31.94526-04 2009-05-01 5380 95 G/L Receive Product \N 50000.00 Liab Clear 5455 t ST f admin f 10860 f 2009-06-26 16:53:31.94526-04 2009-05-01 5380 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5455 t ST f admin f 10858 f 2009-06-26 16:53:31.94526-04 2009-05-01 5380 85 G/L Receive Product \N -50000.00 FG Inv 5455 t ST f admin f 10851 f 2009-06-26 16:51:25.844564-04 2009-04-01 5378 99 G/L Receive Product \N -50000.00 Clear A/P 5453 t ST f admin f 10847 f 2009-06-26 16:51:25.844564-04 2009-04-01 5378 95 G/L Receive Product \N 50000.00 Liab Clear 5453 t ST f admin f 10848 f 2009-06-26 16:51:25.844564-04 2009-04-01 5378 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 5453 t ST f admin f 10846 f 2009-06-26 16:51:25.844564-04 2009-04-01 5378 85 G/L Receive Product \N -50000.00 FG Inv 5453 t ST f admin f 10932 f 2009-08-13 08:52:34.091695-04 2009-08-13 5406 138 W/O 50195-1 3625 8210.00 Material TKIT1 Issue to Work Order 5494 t WO f admin f 10935 f 2009-08-13 08:52:34.091695-04 2009-08-13 5407 86 W/O 50195-1 3626 -80.00 Material YPAINT1 Issue to Work Order 5495 t WO f admin f 10934 f 2009-08-13 08:52:34.091695-04 2009-08-13 5407 138 W/O 50195-1 3626 80.00 Material YPAINT1 Issue to Work Order 5495 t WO f admin f 10937 f 2009-08-13 08:52:34.091695-04 2009-08-13 5408 86 W/O 50195-1 3627 -10000.00 Material TBODY1 Issue to Work Order 5496 t WO f admin f 10936 f 2009-08-13 08:52:34.091695-04 2009-08-13 5408 138 W/O 50195-1 3627 10000.00 Material TBODY1 Issue to Work Order 5496 t WO f admin f 10939 f 2009-08-13 08:52:34.091695-04 2009-08-13 5409 86 W/O 50195-1 -1 -1.10 \N 5497 t WO f admin f 10938 f 2009-08-13 08:52:34.091695-04 2009-08-13 5409 94 W/O 50195-1 -1 1.10 \N 5497 t WO f admin f 10941 f 2009-08-13 08:52:34.091695-04 2009-08-13 5410 86 W/O 50195-1 -1 -2200.00 \N 5498 t WO f admin f 10940 f 2009-08-13 08:52:34.091695-04 2009-08-13 5410 94 W/O 50195-1 -1 2200.00 \N 5498 t WO f admin f 10943 f 2009-08-13 08:52:34.091695-04 2009-08-13 5411 86 W/O 50195-1 -1 -2.20 \N 5499 t WO f admin f 10942 f 2009-08-13 08:52:34.091695-04 2009-08-13 5411 94 W/O 50195-1 -1 2.20 \N 5499 t WO f admin f 10945 f 2009-08-13 08:52:34.091695-04 2009-08-13 5412 86 W/O 50195-1 -1 -550.00 \N 5500 t WO f admin f 10944 f 2009-08-13 08:52:34.091695-04 2009-08-13 5412 94 W/O 50195-1 -1 550.00 \N 5500 t WO f admin f 10947 f 2009-08-13 08:52:34.091695-04 2009-08-13 5413 86 W/O 50195-1 -1 -0.44 \N 5501 t WO f admin f 10946 f 2009-08-13 08:52:34.091695-04 2009-08-13 5413 94 W/O 50195-1 -1 0.44 \N 5501 t WO f admin f 10949 f 2009-08-13 08:52:34.091695-04 2009-08-13 5414 86 W/O 50195-1 -1 -220.00 \N 5502 t WO f admin f 10948 f 2009-08-13 08:52:34.091695-04 2009-08-13 5414 94 W/O 50195-1 -1 220.00 \N 5502 t WO f admin f 10950 f 2009-08-13 08:52:34.091695-04 2009-08-13 5415 86 W/O 50195-1 3628 25634.00 Receive Inventory YTRUCK1 from Manufacturing 5503 t WO f admin f 10951 f 2009-08-13 08:52:34.091695-04 2009-08-13 5415 85 W/O 50195-1 3628 -25634.00 Receive Inventory YTRUCK1 from Manufacturing 5503 t WO f admin f 10952 f 2009-08-13 08:52:50.213608-04 2009-08-13 5416 86 W/O 50195-1 -1 -370.26 Manufacturing Inventory Cost Variance for YTRUCK1 5504 t WO f admin f 10953 f 2009-08-13 08:52:50.213608-04 2009-08-13 5416 87 W/O 50195-1 -1 370.26 Manufacturing Inventory Cost Variance for YTRUCK1 5504 t WO f admin f 10955 f 2009-08-13 08:53:01.761218-04 2009-08-13 5417 96 S/R 50195-1 3629 -25634.00 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 5506 t SO f admin f 10954 f 2009-08-13 08:53:01.761218-04 2009-08-13 5417 85 S/R 50195-1 3629 25634.00 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 5506 t SO f admin f 10957 f 2009-08-13 08:53:09.819257-04 2009-08-13 5418 108 S/R 60044 -1 -25634.00 Ship Shipment to Customer Tremendous Toys Incorporated 5507 t SH f admin f 10956 f 2009-08-13 08:53:09.819257-04 2009-08-13 5418 96 S/R 60044 -1 25634.00 Ship Shipment to Customer Tremendous Toys Incorporated 5507 t SH f admin f 10961 f 2009-08-13 08:53:23.799561-04 2009-08-13 5419 122 A/R 60081 \N 18750.00 Tremendous Toys Incorporated 5508 t IN f admin f 10959 f 2009-08-13 08:53:23.799561-04 2009-08-13 5419 106 A/R 60081 \N -115875.00 Tremendous Toys Incorporated 5508 t IN f admin f 10958 f 2009-08-13 08:53:23.799561-04 2009-08-13 5419 102 A/R 60081 \N 4625.00 Tax liability for Tremendous Toys Incorporated 5508 t IN f admin f 10960 f 2009-08-13 08:53:23.799561-04 2009-08-13 5419 103 A/R 60081 \N 92500.00 Tremendous Toys Incorporated 5508 t IN f admin f 10962 f 2009-08-13 08:54:32.088319-04 2009-08-13 5420 106 A/R I-60081 \N 115875.00 TTOYS-Tremendous Toys Incorporated 5509 t CR f admin f 10981 f 2009-09-16 14:02:29.104421-04 2009-09-16 5429 86 W/O 10062-1 3637 -1.60 Material YPAINT1 Issue to Work Order 5519 t WO f jsmith f 10980 f 2009-09-16 14:02:29.104421-04 2009-09-16 5429 138 W/O 10062-1 3637 1.60 Material YPAINT1 Issue to Work Order 5519 t WO f jsmith f 10997 f 2009-09-16 14:02:29.104421-04 2009-09-16 5437 86 W/O 10062-1 -1 -4.40 Post Run Time SHIPPING/jsmith to Work Order 5527 t WO f jsmith f 10996 f 2009-09-16 14:02:29.104421-04 2009-09-16 5437 94 W/O 10062-1 -1 4.40 Post Run Time SHIPPING/jsmith to Work Order 5527 t WO f jsmith f 10998 f 2009-09-16 14:02:29.104421-04 2009-09-16 5438 86 W/O 10062-1 3640 512.68 Receive Inventory YTRUCK1 from Manufacturing 5528 t WO f jsmith f 10999 f 2009-09-16 14:02:29.104421-04 2009-09-16 5438 85 W/O 10062-1 3640 -512.68 Receive Inventory YTRUCK1 from Manufacturing 5528 t WO f jsmith f 11000 f 2009-09-16 14:02:41.633349-04 2009-09-16 5439 86 W/O 10062-1 -1 -3.74 Manufacturing Inventory Cost Variance for YTRUCK1 5529 t WO f jsmith f 11001 f 2009-09-16 14:02:41.633349-04 2009-09-16 5439 87 W/O 10062-1 -1 3.74 Manufacturing Inventory Cost Variance for YTRUCK1 5529 t WO f jsmith f 11002 f 2009-09-16 14:02:47.407802-04 2009-09-16 5440 86 W/O 10063-1 -1 -46.10 Manufacturing Inventory Cost Variance for TSUB1 5531 t WO f jsmith f 11003 f 2009-09-16 14:02:47.407802-04 2009-09-16 5440 87 W/O 10063-1 -1 46.10 Manufacturing Inventory Cost Variance for TSUB1 5531 t WO f jsmith f 11004 f 2009-09-16 14:04:15.939989-04 2009-09-16 5441 90 A/P 30074 \N -10.00 TPARTS-Toy Parts Inc. RF01019 5533 t VO f jsmith f 11006 f 2009-09-16 14:04:15.939989-04 2009-09-16 5441 99 A/P 30074 \N 52.50 TPARTS-Toy Parts Inc. RF01019 5533 t VO f jsmith f 11005 f 2009-09-16 14:04:15.939989-04 2009-09-16 5441 102 A/P 30074 \N -2.50 TPARTS-Toy Parts Inc. RF01019 5533 t VO f jsmith f 11007 f 2009-09-16 14:04:15.939989-04 2009-09-16 5441 95 A/P 30074 \N -40.00 TPARTS-Toy Parts Inc. RF01019 5533 t VO f jsmith f 11010 f 2009-09-16 14:05:14.337109-04 2009-09-16 5442 99 A/P 4016 178 -51.50 TPARTS-Toy Parts Inc. 5535 t CK f jsmith f 11009 f 2009-09-16 14:05:14.337109-04 2009-09-16 5443 101 A/P 30074 \N 1.00 Discount for V 30074 5536 t DS f jsmith f 11008 f 2009-09-16 14:05:14.337109-04 2009-09-16 5443 99 A/P 30074 \N -1.00 Discount for V 30074 5536 t DS f jsmith f 11013 f 2009-09-16 14:06:01.207031-04 2009-09-16 5444 96 S/R 99005 3641 -564.92 Issue to Shipping 5538 t TO f jsmith f 11012 f 2009-09-16 14:06:01.207031-04 2009-09-16 5444 85 S/R 99005 3641 564.92 Issue to Shipping 5538 t TO f jsmith f 11015 f 2009-09-16 14:06:01.489398-04 2009-09-16 5445 96 S/R 99005 3642 -770.34 Issue to Shipping 5539 t TO f jsmith f 11014 f 2009-09-16 14:06:01.489398-04 2009-09-16 5445 85 S/R 99005 3642 770.34 Issue to Shipping 5539 t TO f jsmith f 11018 f 2009-09-16 14:08:16.025412-04 2009-09-16 5447 95 S/R 20068 3644 120.00 Receive Inventory from P/O for Toy Parts Inc. 5541 t PO f jsmith f 11019 f 2009-09-16 14:08:16.025412-04 2009-09-16 5447 138 S/R 20068 3644 -120.00 Receive Inventory from P/O for Toy Parts Inc. 5541 t PO f jsmith f 11020 f 2009-09-16 14:08:49.028423-04 2009-09-16 5448 86 W/O Misc. 3645 492.60 Receive from Misc. Production for Item Number TSUB1\n 5543 t WO f jsmith f 11021 f 2009-09-16 14:08:49.028423-04 2009-09-16 5448 138 W/O Misc. 3645 -492.60 Receive from Misc. Production for Item Number TSUB1\n 5543 t WO f jsmith f 11058 f 2009-09-16 14:20:53.202603-04 2009-09-16 5467 96 S/R 99005 3659 564.92 Return from Shipping 5566 t TO f jsmith f 11059 f 2009-09-16 14:20:53.202603-04 2009-09-16 5467 85 S/R 99005 3659 -564.92 Return from Shipping 5566 t TO f jsmith f 11060 f 2009-09-16 14:20:55.312698-04 2009-09-16 5468 96 S/R 99005 3660 770.34 Return from Shipping 5567 t TO f jsmith f 11061 f 2009-09-16 14:20:55.312698-04 2009-09-16 5468 85 S/R 99005 3660 -770.34 Return from Shipping 5567 t TO f jsmith f 11062 f 2009-09-16 14:35:09.991769-04 2009-09-16 5469 95 S/R 20069 3661 80.00 Receive Inventory from P/O for World Chem, Inc. 5568 t PO f jsmith f 11063 f 2009-09-16 14:35:09.991769-04 2009-09-16 5469 138 S/R 20069 3661 -80.00 Receive Inventory from P/O for World Chem, Inc. 5568 t PO f jsmith f 11064 f 2009-09-16 14:35:10.409384-04 2009-09-16 5470 95 S/R 20069 3662 80.00 Receive Inventory from P/O for World Chem, Inc. 5570 t PO f jsmith f 11065 f 2009-09-16 14:35:10.409384-04 2009-09-16 5470 138 S/R 20069 3662 -80.00 Receive Inventory from P/O for World Chem, Inc. 5570 t PO f jsmith f 11066 f 2009-09-16 14:35:10.826688-04 2009-09-16 5471 95 S/R 20069 3663 80.00 Receive Inventory from P/O for World Chem, Inc. 5572 t PO f jsmith f 11067 f 2009-09-16 14:35:10.826688-04 2009-09-16 5471 138 S/R 20069 3663 -80.00 Receive Inventory from P/O for World Chem, Inc. 5572 t PO f jsmith f 11068 f 2009-09-16 14:38:50.441297-04 2009-09-16 5472 95 S/R 20070 3664 8.00 Receive Inventory from P/O for World Chem, Inc. 5574 t PO f jsmith f 11069 f 2009-09-16 14:38:50.441297-04 2009-09-16 5472 138 S/R 20070 3664 -8.00 Receive Inventory from P/O for World Chem, Inc. 5574 t PO f jsmith f 11070 f 2009-09-16 14:38:50.768926-04 2009-09-16 5473 95 S/R 20070 3665 8.00 Receive Inventory from P/O for World Chem, Inc. 5576 t PO f jsmith f 11071 f 2009-09-16 14:38:50.768926-04 2009-09-16 5473 138 S/R 20070 3665 -8.00 Receive Inventory from P/O for World Chem, Inc. 5576 t PO f jsmith f 11088 f 2009-09-16 14:43:38.956601-04 2009-09-16 5482 86 W/O Misc. 3672 513.56 Receive from Misc. Production for Item Number BTRUCK1\n 5587 t WO f jsmith f 11089 f 2009-09-16 14:43:38.956601-04 2009-09-16 5482 85 W/O Misc. 3672 -513.56 Receive from Misc. Production for Item Number BTRUCK1\n 5587 t WO f jsmith f 11091 f 2009-09-16 14:43:38.956601-04 2009-09-16 5483 86 W/O Misc. 3673 -1.60 Consumed during Misc. Production of Item Number BTRUCK1\n 5588 t WO f jsmith f 11090 f 2009-09-16 14:43:38.956601-04 2009-09-16 5483 138 W/O Misc. 3673 1.60 Consumed during Misc. Production of Item Number BTRUCK1\n 5588 t WO f jsmith f 11103 f 2009-09-16 14:44:42.947646-04 2009-09-16 5489 86 W/O Misc. 3678 -1.60 Consumed during Misc. Production of Item Number WTRUCK1\n 5596 t WO f jsmith f 11102 f 2009-09-16 14:44:42.947646-04 2009-09-16 5489 138 W/O Misc. 3678 1.60 Consumed during Misc. Production of Item Number WTRUCK1\n 5596 t WO f jsmith f 11128 f 2009-09-16 14:47:11.457164-04 2009-09-16 5502 86 W/O Misc. 3688 513.56 Receive from Misc. Production for Item Number RTRUCK1\n 5612 t WO f jsmith f 11181 f 2009-09-21 09:25:31.424429-04 2009-09-21 5528 146 I/M 99003 \N -51.36 Inter-Warehouse Transfer for item WTRUCK1\nReceive from Transit To Dest Warehouse 5644 t TO f jsmith f 11180 f 2009-09-21 09:25:31.424429-04 2009-09-21 5528 134 I/M 99003 \N 51.36 Inter-Warehouse Transfer for item WTRUCK1\nReceive from Transit To Dest Warehouse 5644 t TO f jsmith f 11240 f 2009-09-21 14:53:57.886571-04 2009-09-21 5560 128 S/R 99006 3760 128.39 Issue to Shipping 5680 t TO f admin f 11242 f 2009-09-21 14:53:58.191934-04 2009-09-21 5561 128 S/R 99006 3761 141.23 Issue to Shipping 5681 t TO f admin f 11710 f 2009-10-13 13:37:26.971918-04 2009-10-13 5789 86 W/O 10067-1 3903 -3614.68 Material HUB1 Issue to Work Order 5954 t WO f jsmith f 11309 f 2009-09-21 16:58:18.356578-04 2009-09-21 5595 138 W/O 10064-1 3784 1375.00 Material TINSERT1 Issue to Work Order 5711 t WO f admin f 11312 f 2009-09-21 16:58:18.356578-04 2009-09-21 5596 86 W/O 10064-1 3785 -1000.00 Material TBOX1 Issue to Work Order 5712 t WO f admin f 11311 f 2009-09-21 16:58:18.356578-04 2009-09-21 5596 138 W/O 10064-1 3785 1000.00 Material TBOX1 Issue to Work Order 5712 t WO f admin f 11314 f 2009-09-21 16:58:18.356578-04 2009-09-21 5597 86 W/O 10064-1 -1 -1.10 \N 5713 t WO f admin f 11313 f 2009-09-21 16:58:18.356578-04 2009-09-21 5597 94 W/O 10064-1 -1 1.10 \N 5713 t WO f admin f 11316 f 2009-09-21 16:58:18.356578-04 2009-09-21 5598 86 W/O 10064-1 -1 -550.00 \N 5714 t WO f admin f 11369 f 2009-09-22 08:14:21.175107-04 2009-09-22 5622 138 S/R 20072 3793 -0.80 Receive Inventory from P/O for World Chem, Inc. 5741 t PO f admin f 11437 f 2009-09-23 09:20:06.733057-04 2009-09-23 5655 129 S/O TERMINAL 1A \N 2.14 Sales posting for terminal TERMINAL 1A 5779 t RS f jsmith f 11717 f 2009-10-13 13:37:26.971918-04 2009-10-13 5793 94 W/O 10067-1 -1 1.10 \N 5958 t WO f jsmith f 11506 f 2009-09-25 09:24:27.293829-04 2009-09-25 5690 86 W/O 10066-1 -1 -2.20 Post Setup Time Standard Paint Operation/ to Work Order 5833 t WO f jsmith f 11508 f 2009-09-25 09:24:27.293829-04 2009-09-25 5691 86 W/O 10066-1 -1 -16.50 Post Run Time Standard Paint Operation/ to Work Order 5834 t WO f jsmith f 11507 f 2009-09-25 09:24:27.293829-04 2009-09-25 5691 94 W/O 10066-1 -1 16.50 Post Run Time Standard Paint Operation/ to Work Order 5834 t WO f jsmith f 11724 f 2009-10-13 13:37:26.971918-04 2009-10-13 5796 86 W/O 10067-1 -1 -47.85 \N 5961 t WO f jsmith f 11574 f 2009-09-25 10:32:41.650078-04 2009-09-25 5723 122 A/R 60085 \N 10.00 Tremendous Toys Incorporated 5870 t IN f jsmith f 11578 f 2009-09-25 10:36:05.882969-04 2009-09-25 5725 133 A/R R -1 -75.00 20023 5873 t CD f jsmith f 11646 f 2009-09-25 12:52:41.825928-04 2009-09-25 5759 128 I/M 99009 \N -13.10 Inter-Warehouse Transfer for item BTRUCK1\nReceive from Transit To Dest Warehouse 5912 t TO f jsmith f 11790 f 2009-10-13 13:44:51.607186-04 2009-10-13 5829 128 S/R 99010 3930 -51.27 Return from Shipping 5999 t TO f jsmith f 11789 f 2009-10-13 13:44:51.607186-04 2009-10-13 5829 130 S/R 99010 3930 51.27 Return from Shipping 5999 t TO f jsmith f 11791 f 2009-10-13 13:47:14.595953-04 2009-10-13 5830 128 S/R 99010 3931 25.63 Issue to Shipping 6000 t TO f jsmith f 11852 f 2009-12-03 14:56:23.910523-05 2009-09-01 5859 108 G/L Ship Order \N -45250.00 6034 t ST f admin f 11851 f 2009-12-03 14:56:23.910523-05 2009-09-01 5859 85 G/L Ship Order \N 45250.00 6034 t ST f admin f 11854 f 2009-12-03 14:56:23.910523-05 2009-09-01 5859 103 G/L Ship Order \N 77250.00 6034 t ST f admin f 11858 f 2009-12-03 14:56:41.838571-05 2009-09-01 5860 99 G/L Receive Product \N 50000.00 Accrue Payable 6035 t ST f admin f 11860 f 2009-12-03 14:56:41.838571-05 2009-09-01 5860 99 G/L Receive Product \N -50000.00 Clear A/P 6035 t ST f admin f 11856 f 2009-12-03 14:56:41.838571-05 2009-09-01 5860 95 G/L Receive Product \N 50000.00 Liab Clear 6035 t ST f admin f 11857 f 2009-12-03 14:56:41.838571-05 2009-09-01 5860 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 6035 t ST f admin f 11855 f 2009-12-03 14:56:41.838571-05 2009-09-01 5860 85 G/L Receive Product \N -50000.00 FG Inv 6035 t ST f admin f 11874 f 2009-12-03 15:28:51.176031-05 2009-11-03 5866 90 A/P 30086 \N -43.66 TPARTS-Toy Parts Inc. RF103291 6044 t VO f admin f 11872 f 2009-12-03 15:28:51.176031-05 2009-11-03 5866 99 A/P 30086 \N 712.00 TPARTS-Toy Parts Inc. RF103291 6044 t VO f admin f 11873 f 2009-12-03 15:28:51.176031-05 2009-11-03 5866 95 A/P 30086 \N -656.34 TPARTS-Toy Parts Inc. RF103291 6044 t VO f admin f 11871 f 2009-12-03 15:28:51.176031-05 2009-11-03 5866 155 A/P 30086 \N -12.00 TPARTS-Toy Parts Inc. RF103291 6044 t VO f admin f 11879 f 2009-12-03 16:03:10.198553-05 2009-11-03 5868 108 G/L Ship Order \N -45250.00 6046 t ST f admin f 11878 f 2009-12-03 16:03:10.198553-05 2009-11-03 5868 85 G/L Ship Order \N 45250.00 6046 t ST f admin f 11881 f 2009-12-03 16:03:10.198553-05 2009-11-03 5868 103 G/L Ship Order \N 77250.00 6046 t ST f admin f 11885 f 2009-12-03 16:03:19.668184-05 2009-11-03 5869 99 G/L Receive Product \N 50000.00 Accrue Payable 6047 t ST f admin f 11887 f 2009-12-03 16:03:19.668184-05 2009-11-03 5869 99 G/L Receive Product \N -50000.00 Clear A/P 6047 t ST f admin f 11883 f 2009-12-03 16:03:19.668184-05 2009-11-03 5869 95 G/L Receive Product \N 50000.00 Liab Clear 6047 t ST f admin f 11884 f 2009-12-03 16:03:19.668184-05 2009-11-03 5869 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 6047 t ST f admin f 11882 f 2009-12-03 16:03:19.668184-05 2009-11-03 5869 85 G/L Receive Product \N -50000.00 FG Inv 6047 t ST f admin f 11953 f 2010-01-05 16:41:19.43222-05 2010-01-05 5901 96 S/R 99007 3975 12.82 Return from Shipping 6087 t TO f admin f 11954 f 2010-01-05 16:41:19.43222-05 2010-01-05 5901 85 S/R 99007 3975 -12.82 Return from Shipping 6087 t TO f admin f 11956 f 2010-01-05 17:02:34.671114-05 2010-01-05 5902 146 S/O ST1-TERM1 \N -100.00 Open posting for terminal ST1-TERM1 6088 t MR f admin f 11958 f 2010-01-05 17:03:41.19046-05 2010-01-05 5903 146 S/O 100001 3976 2.56 Item Sale: YTRUCK1 6089 t RS f admin f 11957 f 2010-01-05 17:03:41.19046-05 2010-01-05 5903 148 S/O 100001 3976 -2.56 Item Sale: YTRUCK1 6089 t RS f admin f 11960 f 2010-01-05 17:06:14.721859-05 2010-01-05 5904 146 S/O 100002 3977 2.56 Item Sale: YTRUCK1 6090 t RS f admin f 11959 f 2010-01-05 17:06:14.721859-05 2010-01-05 5904 148 S/O 100002 3977 -2.56 Item Sale: YTRUCK1 6090 t RS f admin f 11966 f 2010-01-05 17:07:00.415083-05 2010-01-05 5905 129 S/O ST1-TERM1 \N 2.14 Sales posting for terminal ST1-TERM1 6091 t RS f admin f 11965 f 2010-01-05 17:07:00.415083-05 2010-01-05 5905 142 S/O ST1-TERM1 \N 21.98 Sales posting for terminal ST1-TERM1 6091 t RS f admin f 11963 f 2010-01-05 17:07:00.415083-05 2010-01-05 5905 146 S/O ST1-TERM1 \N -12.06 Sales posting for terminal ST1-TERM1 6091 t RS f admin f 11964 f 2010-01-05 17:07:00.415083-05 2010-01-05 5905 115 S/O ST1-TERM1 \N -12.06 Sales posting for terminal ST1-TERM1 6091 t RS f admin f 11968 f 2010-01-05 17:07:00.415083-05 2010-01-05 5906 146 S/O ST1-TERM1 \N 112.06 Close terminal ST1-TERM1 6091 t MR f admin f 11962 f 2010-01-05 17:07:00.415083-05 2010-01-05 5907 115 S/O ST1-TERM1 \N 12.06 Check deposit for terminal ST1-TERM1 6091 t RS f admin f 11667 f 2009-10-13 13:34:32.185743-04 2009-10-13 5767 109 A/P 4049 193 882.00 ICHROME-International Chrome Technologies 5926 t CK t jsmith f 11671 f 2009-10-13 13:34:35.280612-04 2009-10-13 5769 109 A/P 4050 192 5390.00 TPARTS-Toy Parts Inc. 5929 t CK t jsmith f 11011 f 2009-09-16 14:05:14.337109-04 2009-09-16 5442 109 A/P 4016 178 51.50 TPARTS-Toy Parts Inc. 5535 t CK t jsmith f 11213 f 2009-09-21 09:30:46.575722-04 2009-09-21 5544 109 S/O TERMINAL 1A \N 100.00 Open posting for terminal TERMINAL 1A 5668 t MR t jsmith f 11214 f 2009-09-21 09:59:21.066544-04 2009-09-21 5546 109 S/O TERMINAL 1A \N -100.00 Close terminal TERMINAL 1A 5669 t MR t jsmith f 11217 f 2009-09-21 10:02:49.913979-04 2009-09-21 5548 109 S/O TERMINAL 1A \N 100.00 Open posting for terminal TERMINAL 1A 5670 t MR t admin f 11232 f 2009-09-21 14:25:06.40069-04 2009-09-21 5555 109 S/O TERMINAL 1A \N -156.83 Close terminal TERMINAL 1A 5676 t MR t jsmith f 11235 f 2009-09-21 14:29:38.09104-04 2009-09-21 5557 109 S/O TERMINAL 1A \N 100.00 Open posting for terminal TERMINAL 1A 5677 t MR t jsmith f 11277 f 2009-09-21 15:16:43.671732-04 2009-09-21 5576 109 S/O TERMINAL 1A \N -117.31 Close terminal TERMINAL 1A 5698 t MR t jsmith f 11270 f 2009-09-21 15:16:43.671732-04 2009-09-21 5577 109 S/O C-10998 \N -51.44 Check deposit for terminal TERMINAL 1A 5698 t RS t jsmith f 11280 f 2009-09-21 15:18:43.803214-04 2009-09-21 5578 109 S/O TERMINAL 1A \N 100.00 Open posting for terminal TERMINAL 1A 5699 t MR t jsmith f 11284 f 2009-09-21 15:24:21.864743-04 2009-09-21 5580 109 S/O TERMINAL 1A \N -11.46 Cash register bank transfer 5701 t MR t jsmith f 11286 f 2009-09-21 15:25:15.698812-04 2009-09-21 5581 109 S/O TERMINAL 1A \N -11.46 Cash register bank transfer 5702 t MR t jsmith f 11290 f 2009-09-21 15:26:21.32366-04 2009-09-21 5585 109 S/O C-21011 \N -11.46 Check deposit for terminal TERMINAL 1A 5704 t RS t jsmith f 10916 f 2009-08-13 08:48:50.436372-04 2009-08-13 5397 109 A/P 4015 177 47138.00 TPARTS-Toy Parts Inc. 5483 t CK t admin f 10963 f 2009-08-13 08:54:32.088319-04 2009-08-13 5420 109 A/R C-12311 \N -115875.00 TTOYS-Tremendous Toys Incorporated 5509 t CR t admin f 10886 f 2009-08-13 08:36:05.792569-04 2009-07-31 5384 109 G/L Receive Product \N 50000.00 Cash Payment 5459 t ST t admin f 10890 f 2009-08-13 08:36:20.129025-04 2009-07-31 5385 109 G/L Ship Order \N -77250.00 5460 t ST t admin f 10726 f 2009-06-26 15:43:40.856545-04 2009-06-26 5327 109 A/R C-123123 \N -50000.00 TTOYS-Tremendous Toys Incorporated 5387 t CR t admin f 10752 f 2009-06-26 16:07:06.495372-04 2009-06-26 5338 109 A/P 4014 175 196.00 TPARTS-Toy Parts Inc. 5405 t CK t admin f 10824 f 2009-06-26 16:19:29.648604-04 2009-06-26 5370 109 G/L Ship Order \N -77250.00 5444 t ST t admin f 10868 f 2009-06-26 16:54:55.707084-04 2009-06-01 5381 109 G/L Receive Product \N 50000.00 Cash Payment 5456 t ST t admin f 10874 f 2009-06-26 16:55:03.106742-04 2009-06-01 5382 109 G/L Receive Product \N 50000.00 Cash Payment 5457 t ST t admin f 10880 f 2009-06-26 16:55:09.488571-04 2009-06-01 5383 109 G/L Receive Product \N 50000.00 Cash Payment 5458 t ST t admin f 10819 f 2009-06-26 16:19:12.18568-04 2009-05-01 5369 109 G/L Ship Order \N -91000.00 5443 t ST t admin f 10844 f 2009-06-26 16:34:35.597741-04 2009-05-01 5377 109 G/L Receive Product \N 50000.00 Cash Payment 5452 t ST t admin f 10856 f 2009-06-26 16:53:13.471565-04 2009-05-01 5379 109 G/L Receive Product \N 50000.00 Cash Payment 5454 t ST t admin f 10862 f 2009-06-26 16:53:31.94526-04 2009-05-01 5380 109 G/L Receive Product \N 50000.00 Cash Payment 5455 t ST t admin f 10816 f 2009-06-26 16:18:27.125184-04 2009-04-01 5368 109 G/L Ship Order \N -81250.00 5442 t ST t admin f 10850 f 2009-06-26 16:51:25.844564-04 2009-04-01 5378 109 G/L Receive Product \N 50000.00 Cash Payment 5453 t ST t admin f 10810 f 2009-06-26 16:17:25.687284-04 2009-03-01 5367 109 G/L Ship Order \N -77250.00 5441 t ST t admin f 10808 f 2009-06-26 16:16:51.261895-04 2009-02-01 5366 109 G/L Ship Order \N -77250.00 5440 t ST t admin f 10838 f 2009-06-26 16:34:05.287072-04 2009-02-01 5376 109 G/L Receive Product \N 50000.00 Cash Payment 5451 t ST t admin f 11955 f 2010-01-05 17:02:34.671114-05 2010-01-05 5902 109 S/O ST1-TERM1 \N 100.00 Open posting for terminal ST1-TERM1 6088 t MR t admin f 11967 f 2010-01-05 17:07:00.415083-05 2010-01-05 5906 109 S/O ST1-TERM1 \N -112.06 Close terminal ST1-TERM1 6091 t MR t admin f 11961 f 2010-01-05 17:07:00.415083-05 2010-01-05 5907 109 S/O C-32122 \N -12.06 Check deposit for terminal ST1-TERM1 6091 t RS t admin f 11970 f 2010-01-06 14:54:40.269884-05 2010-01-06 5908 97 S/R 20081 -1 -125.00 Receive Non-Inventory from P/O for Toy Parts Inc. 6092 t PO f admin f 11969 f 2010-01-06 14:54:40.269884-05 2010-01-06 5908 95 S/R 20081 -1 125.00 Receive Non-Inventory from P/O for Toy Parts Inc. 6092 t PO f admin f 11972 f 2010-01-06 15:01:12.741832-05 2010-01-06 5909 99 A/P 30089 \N 125.00 TPARTS-Toy Parts Inc. 6094 t VO f admin f 11971 f 2010-01-06 15:01:12.741832-05 2010-01-06 5909 95 A/P 30089 \N -125.00 TPARTS-Toy Parts Inc. 6094 t VO f admin f 11976 f 2010-01-06 15:02:04.06481-05 2010-01-06 5910 99 A/P -1 196 -122.50 TPARTS-Toy Parts Inc. 6096 t CK f admin f 11974 f 2010-01-06 15:02:04.06481-05 2010-01-06 5911 101 A/P 30089 \N 2.50 Discount for V 30089 6097 t DS f admin f 11973 f 2010-01-06 15:02:04.06481-05 2010-01-06 5911 99 A/P 30089 \N -2.50 Discount for V 30089 6097 t DS f admin f 11864 f 2009-12-03 15:10:00.861344-05 2009-12-03 5862 109 A/R W-12311266 \N -2025.00 TTOYS-Tremendous Toys Incorporated 6037 t CR t admin f 11940 f 2009-12-03 16:46:39.021809-05 2009-12-03 5893 109 A/P 4051 195 15541.58 TPARTS-Toy Parts Inc. 6077 t CK t admin f 11950 f 2009-12-03 17:07:42.188568-05 2009-12-03 5899 109 A/R W-1238818 \N -115875.00 TTOYS-Tremendous Toys Incorporated 6085 t CR t admin f 11880 f 2009-12-03 16:03:10.198553-05 2009-11-03 5868 109 G/L Ship Order \N -77250.00 6046 t ST t admin f 11886 f 2009-12-03 16:03:19.668184-05 2009-11-03 5869 109 G/L Receive Product \N 50000.00 Cash Payment 6047 t ST t admin f 11821 f 2009-10-13 14:27:10.978501-04 2009-10-13 5843 109 A/R W-123553 \N -57937.50 TTOYS-Tremendous Toys Incorporated 6015 t CR t jsmith f 11830 f 2009-10-13 14:34:13.627003-04 2009-10-13 5848 109 S/O TERMINAL 1A \N 100.00 Open posting for terminal TERMINAL 1A 6021 t MR t jsmith f 11838 f 2009-10-13 14:36:17.116972-04 2009-10-13 5851 109 S/O TERMINAL 1A \N -582.46 Close terminal TERMINAL 1A 6023 t MR t jsmith f 11294 f 2009-09-21 15:26:21.32366-04 2009-09-21 5584 109 S/O TERMINAL 1A \N -65.62 Close terminal TERMINAL 1A 5704 t MR t jsmith f 11300 f 2009-09-21 15:44:36.270928-04 2009-09-21 5590 109 S/O C-6411 \N -11.46 Check deposit for terminal TERMINAL 1A 5707 t RS t jsmith f 11305 f 2009-09-21 15:46:11.836465-04 2009-09-21 5592 109 S/O TERMINAL 1A \N -11.47 Close terminal TERMINAL 1A 5708 t MR t jsmith f 11387 f 2009-09-22 08:54:40.416059-04 2009-09-22 5630 109 A/R C-32334 \N -10000.00 TTOYS-Tremendous Toys Incorporated 5755 t CR t admin f 11390 f 2009-09-22 08:55:58.678979-04 2009-09-22 5632 109 A/R C-43234 \N -5000.00 TTOYS-Tremendous Toys Incorporated 5756 t CR t admin f 11396 f 2009-09-22 09:12:48.363874-04 2009-09-22 5635 109 A/R C-32422 \N -12500.00 TTOYS-Tremendous Toys Incorporated 5758 t CR t admin f 11401 f 2009-09-22 09:14:15.809075-04 2009-09-22 5637 109 A/R C-32422 \N 12500.00 Reverse Cash Receipt posting for TTOYS-Tremendous Toys Incorporated 5759 t CR t admin f 11404 f 2009-09-22 09:16:32.095767-04 2009-09-22 5639 109 A/R C-32422 \N -12500.00 TTOYS-Tremendous Toys Incorporated 5760 t CR t admin f 11420 f 2009-09-22 11:05:21.930612-04 2009-09-22 5646 109 A/R W-12311231 \N -27500.00 TTOYS-Tremendous Toys Incorporated 5771 t CR t jsmith f 11426 f 2009-09-23 08:03:50.074838-04 2009-09-23 5648 109 S/O TERMINAL 1A \N 100.00 Open posting for terminal TERMINAL 1A 5774 t MR t jsmith f 11427 f 2009-09-23 09:08:41.256921-04 2009-09-23 5649 109 S/O TERMINAL 1B \N 1000.00 Open posting for terminal TERMINAL 1B 5775 t MR t admin f 11429 f 2009-09-23 09:12:09.827633-04 2009-09-23 5651 109 S/O TERMINAL 1B \N -1000.00 Close terminal TERMINAL 1B 5776 t MR t admin f 11441 f 2009-09-23 09:20:06.733057-04 2009-09-23 5656 109 S/O TERMINAL 1A \N -112.06 Close terminal TERMINAL 1A 5779 t MR t jsmith f 11435 f 2009-09-23 09:20:06.733057-04 2009-09-23 5657 109 S/O C-1231242 \N -12.06 Check deposit for terminal TERMINAL 1A 5779 t RS t jsmith f 11444 f 2009-09-23 09:27:39.106284-04 2009-09-23 5658 109 S/O TERMINAL 1A \N 100.00 Open posting for terminal TERMINAL 1A 5780 t MR t jsmith f 12102 f 2010-04-02 10:32:32.826485-04 2010-04-02 5966 95 S/R 20085-1 3995 22000.00 Receive Inventory from P/O for Diamond Manufacturing 6164 t PO f admin f 12103 f 2010-04-02 10:32:32.826485-04 2010-04-02 5966 85 S/R 20085-1 3995 -22000.00 Receive Inventory from P/O for Diamond Manufacturing 6164 t PO f admin f 12105 f 2010-04-02 10:32:32.826485-04 2010-04-02 5967 96 S/R 40011-2 3996 -22000.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6166 t SO f admin f 12104 f 2010-04-02 10:32:32.826485-04 2010-04-02 5967 85 S/R 40011-2 3996 22000.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6166 t SO f admin f 12107 f 2010-04-02 10:32:32.826485-04 2010-04-02 5968 108 S/R 60066 -1 -22000.00 Ship Shipment to Customer Xtreme Toys LTD 6167 t SH f admin f 12106 f 2010-04-02 10:32:32.826485-04 2010-04-02 5968 96 S/R 60066 -1 22000.00 Ship Shipment to Customer Xtreme Toys LTD 6167 t SH f admin f 12109 f 2010-04-02 10:33:37.201875-04 2010-04-02 5969 106 A/R 60094 \N -51700.03 Xtreme Toys LTD 6168 t IN f admin f 12108 f 2010-04-02 10:33:37.201875-04 2010-04-02 5969 141 A/R 60094 \N 51700.03 Xtreme Toys LTD 6168 t IN f admin f 12110 f 2010-04-02 10:34:51.481188-04 2010-04-02 5970 99 A/P 30094 \N 22000.00 DMFG-Diamond Manufacturing 6169 t VO f admin f 12111 f 2010-04-02 10:34:51.481188-04 2010-04-02 5970 95 A/P 30094 \N -22000.00 DMFG-Diamond Manufacturing 6169 t VO f admin f 12117 f 2010-04-02 10:38:21.72804-04 2010-04-02 5972 127 A/R C-12311 \N -50666.03 XTRM-Xtreme Toys LTD 6172 t CR f admin f 12116 f 2010-04-02 10:38:21.72804-04 2010-04-02 5972 106 A/R I-60094 \N 50666.03 XTRM-Xtreme Toys LTD 6172 t CR f admin f 12113 f 2010-04-02 10:36:25.985539-04 2010-04-02 5971 99 A/P 4054 201 -22000.00 DMFG-Diamond Manufacturing 6171 t CK f admin f 12115 f 2010-04-02 10:38:21.72804-04 2010-04-02 5973 106 A/R 20026 \N 1034.00 Xtreme Toys LTD Discount Credit from C-12311 6172 t CM f admin f 12114 f 2010-04-02 10:38:21.72804-04 2010-04-02 5973 157 A/R 20026 \N -1034.00 Xtreme Toys LTD Discount Credit from C-12311 6172 t CM f admin f 12121 f 2010-05-03 13:25:49.913457-04 2010-04-03 5974 99 G/L Receive Product \N 50000.00 Accrue Payable 6173 t ST f admin f 12123 f 2010-05-03 13:25:49.913457-04 2010-04-03 5974 99 G/L Receive Product \N -50000.00 Clear A/P 6173 t ST f admin f 12119 f 2010-05-03 13:25:49.913457-04 2010-04-03 5974 95 G/L Receive Product \N 50000.00 Liab Clear 6173 t ST f admin f 12120 f 2010-05-03 13:25:49.913457-04 2010-04-03 5974 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 6173 t ST f admin f 12118 f 2010-05-03 13:25:49.913457-04 2010-04-03 5974 85 G/L Receive Product \N -50000.00 FG Inv 6173 t ST f admin f 12125 f 2010-05-03 13:26:17.456656-04 2010-04-03 5975 108 G/L Ship Order \N -45250.00 6174 t ST f admin f 12124 f 2010-05-03 13:26:17.456656-04 2010-04-03 5975 85 G/L Ship Order \N 45250.00 6174 t ST f admin f 12127 f 2010-05-03 13:26:17.456656-04 2010-04-03 5975 103 G/L Ship Order \N 77250.00 6174 t ST f admin f 12131 f 2010-05-03 13:26:43.299174-04 2010-05-03 5976 99 G/L Receive Product \N 50000.00 Accrue Payable 6175 t ST f admin f 12133 f 2010-05-03 13:26:43.299174-04 2010-05-03 5976 99 G/L Receive Product \N -50000.00 Clear A/P 6175 t ST f admin f 12129 f 2010-05-03 13:26:43.299174-04 2010-05-03 5976 95 G/L Receive Product \N 50000.00 Liab Clear 6175 t ST f admin f 12130 f 2010-05-03 13:26:43.299174-04 2010-05-03 5976 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 6175 t ST f admin f 12128 f 2010-05-03 13:26:43.299174-04 2010-05-03 5976 85 G/L Receive Product \N -50000.00 FG Inv 6175 t ST f admin f 12135 f 2010-05-03 13:28:17.34719-04 2010-05-03 5977 108 G/L Ship Order \N -45250.00 6176 t ST f admin f 12134 f 2010-05-03 13:28:17.34719-04 2010-05-03 5977 85 G/L Ship Order \N 45250.00 6176 t ST f admin f 12136 f 2010-05-03 13:28:17.34719-04 2010-05-03 5977 103 G/L Ship Order \N 80000.00 6176 t ST f admin f 12138 f 2010-06-07 10:17:56.128144-04 2010-06-07 5978 95 S/R 20086-1 3997 44000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6177 t PO f admin f 12139 f 2010-06-07 10:17:56.128144-04 2010-06-07 5978 85 S/R 20086-1 3997 -44000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6177 t PO f admin f 12141 f 2010-06-07 10:17:56.128144-04 2010-06-07 5979 96 S/R 40012-1 3998 -44000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6179 t SO f admin f 12140 f 2010-06-07 10:17:56.128144-04 2010-06-07 5979 85 S/R 40012-1 3998 44000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6179 t SO f admin f 12143 f 2010-06-07 10:17:56.128144-04 2010-06-07 5980 108 S/R 60067 -1 -44000.00 Ship Order 40012 for Customer Tremendous Toys Incorporated 6180 t SH f admin f 12142 f 2010-06-07 10:17:56.128144-04 2010-06-07 5980 96 S/R 60067 -1 44000.00 Ship Order 40012 for Customer Tremendous Toys Incorporated 6180 t SH f admin f 12144 f 2010-06-07 10:20:19.336441-04 2010-06-07 5981 106 A/R 60095 \N -99000.00 Tremendous Toys Incorporated 6181 t IN f admin f 12145 f 2010-06-07 10:20:19.336441-04 2010-06-07 5981 103 A/R 60095 \N 99000.00 Tremendous Toys Incorporated 6181 t IN f admin f 12147 f 2010-06-07 10:25:56.37968-04 2010-06-07 5982 99 A/P 30096 \N 1000.00 WCHEM-World Chem, Inc. W-101 6182 t VO f admin f 12146 f 2010-06-07 10:25:56.37968-04 2010-06-07 5982 131 A/P 30096 \N -1000.00 WCHEM-World Chem, Inc. W-101 6182 t VO f admin f 12150 f 2010-06-07 10:26:01.058502-04 2010-06-07 5983 99 A/P 30095 \N 47500.00 DMFG-Diamond Manufacturing MA-101 6183 t VO f admin f 12149 f 2010-06-07 10:26:01.058502-04 2010-06-07 5983 95 A/P 30095 \N -44000.00 DMFG-Diamond Manufacturing MA-101 6183 t VO f admin f 12148 f 2010-06-07 10:26:01.058502-04 2010-06-07 5983 139 A/P 30095 \N -3500.00 DMFG-Diamond Manufacturing MA-101 6183 t VO f admin f 12152 f 2010-06-07 10:45:20.568301-04 2010-06-07 5984 99 A/P 30097 \N 100.00 TPARTS-Toy Parts Inc. REF001 6186 t VO f admin f 12151 f 2010-06-07 10:45:20.568301-04 2010-06-07 5984 131 A/P 30097 \N -100.00 TPARTS-Toy Parts Inc. REF001 6186 t VO f admin f 12154 f 2010-06-07 11:01:34.008031-04 2010-06-07 5986 101 A/P 30097 \N 2.00 Discount for V 30097 6189 t DS f admin f 12153 f 2010-06-07 11:01:34.008031-04 2010-06-07 5986 99 A/P 30097 \N -2.00 Discount for V 30097 6189 t DS f admin f 12169 f 2010-06-07 11:39:54.351982-04 2010-06-07 5993 95 S/R 20089-2 4002 200.00 Receive Inventory from P/O for Toy Parts Inc. for item TBOX1 6199 t PO f admin f 12155 f 2010-06-07 11:01:34.008031-04 2010-06-07 5985 99 A/P -1 205 -98.00 TPARTS-Toy Parts Inc. 6188 t CK f admin f 12170 f 2010-06-07 11:39:54.351982-04 2010-06-07 5993 138 S/R 20089-2 4002 -200.00 Receive Inventory from P/O for Toy Parts Inc. for item TBOX1 6199 t PO f admin f 12157 f 2010-06-07 11:01:34.008031-04 2010-06-07 5987 99 A/P 4055 203 -47500.00 DMFG-Diamond Manufacturing 6188 t CK f admin f 12160 f 2010-06-07 11:01:34.008031-04 2010-06-07 5989 101 A/P 30096 \N 20.00 Discount for V 30096 6191 t DS f admin f 12159 f 2010-06-07 11:01:34.008031-04 2010-06-07 5989 99 A/P 30096 \N -20.00 Discount for V 30096 6191 t DS f admin f 12162 f 2010-06-07 11:01:34.008031-04 2010-06-07 5988 99 A/P 4056 202 -980.00 WCHEM-World Chem, Inc. 6188 t CK f admin f 12167 f 2010-06-07 11:39:54.351982-04 2010-06-07 5992 95 S/R 20089-1 4001 1500.00 Receive Inventory from P/O for Toy Parts Inc. for item RBUMP1 6197 t PO f admin f 12168 f 2010-06-07 11:39:54.351982-04 2010-06-07 5992 138 S/R 20089-1 4001 -1500.00 Receive Inventory from P/O for Toy Parts Inc. for item RBUMP1 6197 t PO f admin f 12171 f 2010-06-07 11:40:07.129579-04 2010-06-07 5994 95 S/R 20088 -1 1000.00 Receive Non-Controlled Inventory from P/O for International Chrome Technologies for item CHROMING 6201 t PO f admin f 12172 f 2010-06-07 11:40:07.129579-04 2010-06-07 5994 158 S/R 20088 -1 -1000.00 Receive Non-Controlled Inventory from P/O for International Chrome Technologies for item CHROMING 6201 t PO f admin f 12178 f 2010-06-07 11:41:01.512124-04 2010-06-07 5997 86 W/O 10073-2 -1 -146.67 \N 6204 t WO f admin f 12177 f 2010-06-07 11:41:01.512124-04 2010-06-07 5997 94 W/O 10073-2 -1 146.67 \N 6204 t WO f admin f 12180 f 2010-06-07 11:41:01.512124-04 2010-06-07 5998 86 W/O 10073-2 -1 -183.33 \N 6205 t WO f admin f 12179 f 2010-06-07 11:41:01.512124-04 2010-06-07 5998 94 W/O 10073-2 -1 183.33 \N 6205 t WO f admin f 12174 f 2010-06-07 11:41:01.512124-04 2010-06-07 5995 86 W/O 10073-2 4003 -1000.00 Material RBUMP1 Issue to Work Order 6202 t WO f admin f 12173 f 2010-06-07 11:41:01.512124-04 2010-06-07 5995 138 W/O 10073-2 4003 1000.00 Material RBUMP1 Issue to Work Order 6202 t WO f admin f 12175 f 2010-06-07 11:41:01.512124-04 2010-06-07 5996 86 W/O 10073-2 4004 2330.00 Receive Inventory CBUMP from Manufacturing 6203 t WO f admin f 12176 f 2010-06-07 11:41:01.512124-04 2010-06-07 5996 138 W/O 10073-2 4004 -2330.00 Receive Inventory CBUMP from Manufacturing 6203 t WO f admin f 12188 f 2010-06-07 11:41:22.353372-04 2010-06-07 6002 86 W/O 10074-1 -1 -1.10 \N 6211 t WO f admin f 12187 f 2010-06-07 11:41:22.353372-04 2010-06-07 6002 94 W/O 10074-1 -1 1.10 \N 6211 t WO f admin f 12190 f 2010-06-07 11:41:22.353372-04 2010-06-07 6003 86 W/O 10074-1 -1 -110.00 \N 6212 t WO f admin f 12189 f 2010-06-07 11:41:22.353372-04 2010-06-07 6003 94 W/O 10074-1 -1 110.00 \N 6212 t WO f admin f 12182 f 2010-06-07 11:41:22.353372-04 2010-06-07 5999 86 W/O 10074-1 4005 -275.00 Material TINSERT1 Issue to Work Order 6208 t WO f admin f 12181 f 2010-06-07 11:41:22.353372-04 2010-06-07 5999 138 W/O 10074-1 4005 275.00 Material TINSERT1 Issue to Work Order 6208 t WO f admin f 12184 f 2010-06-07 11:41:22.353372-04 2010-06-07 6000 86 W/O 10074-1 4006 -200.00 Material TBOX1 Issue to Work Order 6209 t WO f admin f 12183 f 2010-06-07 11:41:22.353372-04 2010-06-07 6000 138 W/O 10074-1 4006 200.00 Material TBOX1 Issue to Work Order 6209 t WO f admin f 12185 f 2010-06-07 11:41:22.353372-04 2010-06-07 6001 86 W/O 10074-1 4007 821.00 Receive Inventory TSUB1 from Manufacturing 6210 t WO f admin f 12186 f 2010-06-07 11:41:22.353372-04 2010-06-07 6001 138 W/O 10074-1 4007 -821.00 Receive Inventory TSUB1 from Manufacturing 6210 t WO f admin f 12191 f 2010-06-07 11:41:25.411251-04 2010-06-07 6004 86 W/O 10074-1 -1 -234.90 Manufacturing Inventory Cost Variance for TSUB1 6213 t WO f admin f 12192 f 2010-06-07 11:41:25.411251-04 2010-06-07 6004 87 W/O 10074-1 -1 234.90 Manufacturing Inventory Cost Variance for TSUB1 6213 t WO f admin f 12208 f 2010-06-07 11:41:36.21013-04 2010-06-07 6012 86 W/O 10073-1 -1 -1.10 \N 6222 t WO f admin f 12207 f 2010-06-07 11:41:36.21013-04 2010-06-07 6012 94 W/O 10073-1 -1 1.10 \N 6222 t WO f admin f 12210 f 2010-06-07 11:41:36.21013-04 2010-06-07 6013 86 W/O 10073-1 -1 -220.00 \N 6223 t WO f admin f 12209 f 2010-06-07 11:41:36.21013-04 2010-06-07 6013 94 W/O 10073-1 -1 220.00 \N 6223 t WO f admin f 12212 f 2010-06-07 11:41:36.21013-04 2010-06-07 6014 86 W/O 10073-1 -1 -2.20 \N 6224 t WO f admin f 12211 f 2010-06-07 11:41:36.21013-04 2010-06-07 6014 94 W/O 10073-1 -1 2.20 \N 6224 t WO f admin f 12214 f 2010-06-07 11:41:36.21013-04 2010-06-07 6015 86 W/O 10073-1 -1 -55.00 \N 6225 t WO f admin f 12213 f 2010-06-07 11:41:36.21013-04 2010-06-07 6015 94 W/O 10073-1 -1 55.00 \N 6225 t WO f admin f 12216 f 2010-06-07 11:41:36.21013-04 2010-06-07 6016 86 W/O 10073-1 -1 -0.44 \N 6226 t WO f admin f 12215 f 2010-06-07 11:41:36.21013-04 2010-06-07 6016 94 W/O 10073-1 -1 0.44 \N 6226 t WO f admin f 12218 f 2010-06-07 11:41:36.21013-04 2010-06-07 6017 86 W/O 10073-1 -1 -22.00 \N 6227 t WO f admin f 12217 f 2010-06-07 11:41:36.21013-04 2010-06-07 6017 94 W/O 10073-1 -1 22.00 \N 6227 t WO f admin f 12194 f 2010-06-07 11:41:36.21013-04 2010-06-07 6005 86 W/O 10073-1 4008 -4154.80 Material HUB1 Issue to Work Order 6215 t WO f admin f 12193 f 2010-06-07 11:41:36.21013-04 2010-06-07 6005 138 W/O 10073-1 4008 4154.80 Material HUB1 Issue to Work Order 6215 t WO f admin f 12196 f 2010-06-07 11:41:36.21013-04 2010-06-07 6006 86 W/O 10073-1 4009 -250.00 Material CBODY1 Issue to Work Order 6216 t WO f admin f 12195 f 2010-06-07 11:41:36.21013-04 2010-06-07 6006 138 W/O 10073-1 4009 250.00 Material CBODY1 Issue to Work Order 6216 t WO f admin f 12198 f 2010-06-07 11:41:36.21013-04 2010-06-07 6007 86 W/O 10073-1 4010 -8.00 Material YPAINT1 Issue to Work Order 6217 t WO f admin f 12197 f 2010-06-07 11:41:36.21013-04 2010-06-07 6007 138 W/O 10073-1 4010 8.00 Material YPAINT1 Issue to Work Order 6217 t WO f admin f 12200 f 2010-06-07 11:41:36.21013-04 2010-06-07 6008 86 W/O 10073-1 4011 -2330.00 Material CBUMP Issue to Work Order 6218 t WO f admin f 12199 f 2010-06-07 11:41:36.21013-04 2010-06-07 6008 138 W/O 10073-1 4011 2330.00 Material CBUMP Issue to Work Order 6218 t WO f admin f 12202 f 2010-06-07 11:41:36.21013-04 2010-06-07 6009 86 W/O 10073-1 4012 -400.00 Material TWHEEL1 Issue to Work Order 6219 t WO f admin f 12201 f 2010-06-07 11:41:36.21013-04 2010-06-07 6009 138 W/O 10073-1 4012 400.00 Material TWHEEL1 Issue to Work Order 6219 t WO f admin f 12204 f 2010-06-07 11:41:36.21013-04 2010-06-07 6010 86 W/O 10073-1 4013 -821.00 Material TSUB1 Issue to Work Order 6220 t WO f admin f 12203 f 2010-06-07 11:41:36.21013-04 2010-06-07 6010 138 W/O 10073-1 4013 821.00 Material TSUB1 Issue to Work Order 6220 t WO f admin f 12205 f 2010-06-07 11:41:36.21013-04 2010-06-07 6011 86 W/O 10073-1 4014 8298.20 Receive Inventory STOCKCAR1 from Manufacturing 6221 t WO f admin f 12206 f 2010-06-07 11:41:36.21013-04 2010-06-07 6011 85 W/O 10073-1 4014 -8298.20 Receive Inventory STOCKCAR1 from Manufacturing 6221 t WO f admin f 12219 f 2010-06-07 11:41:49.491523-04 2010-06-07 6018 86 W/O 10073-1 -1 -33.66 Manufacturing Inventory Cost Variance for STOCKCAR1 6228 t WO f admin f 12220 f 2010-06-07 11:41:49.491523-04 2010-06-07 6018 87 W/O 10073-1 -1 33.66 Manufacturing Inventory Cost Variance for STOCKCAR1 6228 t WO f admin f 12221 f 2010-06-07 11:45:16.11516-04 2010-06-07 6019 95 S/R 20091-1 4015 12500.00 Receive Inventory from P/O for Toy Parts Inc. for item SHEET1 6230 t PO f admin f 12222 f 2010-06-07 11:45:16.11516-04 2010-06-07 6019 138 S/R 20091-1 4015 -12500.00 Receive Inventory from P/O for Toy Parts Inc. for item SHEET1 6230 t PO f admin f 12228 f 2010-06-07 11:45:35.286708-04 2010-06-07 6022 86 W/O 10075-1 -1 -27.50 \N 6234 t WO f admin f 12227 f 2010-06-07 11:45:35.286708-04 2010-06-07 6022 94 W/O 10075-1 -1 27.50 \N 6234 t WO f admin f 12224 f 2010-06-07 11:45:35.286708-04 2010-06-07 6020 86 W/O 10075-1 4016 -6250.00 Material SHEET1 Issue to Work Order 6232 t WO f admin f 12223 f 2010-06-07 11:45:35.286708-04 2010-06-07 6020 138 W/O 10075-1 4016 6250.00 Material SHEET1 Issue to Work Order 6232 t WO f admin f 12225 f 2010-06-07 11:45:35.286708-04 2010-06-07 6021 86 W/O 10075-1 4017 6497.50 Receive Inventory BRCPFN1 from Manufacturing 6233 t WO f admin f 12226 f 2010-06-07 11:45:35.286708-04 2010-06-07 6021 85 W/O 10075-1 4017 -6497.50 Receive Inventory BRCPFN1 from Manufacturing 6233 t WO f admin f 12231 f 2010-06-07 11:45:35.286708-04 2010-06-07 6024 86 W/O 10075-1 4018 9375.00 Receive Inventory from Breeder Manufacturing 6236 t WO f admin f 12232 f 2010-06-07 11:45:35.286708-04 2010-06-07 6024 138 W/O 10075-1 4018 -9375.00 Receive Inventory from Breeder Manufacturing 6236 t WO f admin f 12233 f 2010-06-07 11:45:35.286708-04 2010-06-07 6025 86 W/O 10075-1 4019 6349.00 Receive Inventory from Breeder Manufacturing 6237 t WO f admin f 12234 f 2010-06-07 11:45:35.286708-04 2010-06-07 6025 138 W/O 10075-1 4019 -6349.00 Receive Inventory from Breeder Manufacturing 6237 t WO f admin f 12235 f 2010-06-07 11:45:35.286708-04 2010-06-07 6026 86 W/O 10075-1 4020 20774.00 Receive Inventory from Breeder Manufacturing 6238 t WO f admin f 12236 f 2010-06-07 11:45:35.286708-04 2010-06-07 6026 138 W/O 10075-1 4020 -20774.00 Receive Inventory from Breeder Manufacturing 6238 t WO f admin f 12238 f 2010-06-07 11:45:35.286708-04 2010-06-07 6027 86 W/O 10075-1 4021 -6497.50 Issue Breeder Inventory by Breeder Distribution 6239 t WO f admin f 12237 f 2010-06-07 11:45:35.286708-04 2010-06-07 6027 85 W/O 10075-1 4021 6497.50 Issue Breeder Inventory by Breeder Distribution 6239 t WO f admin f 12239 f 2010-06-07 11:46:06.911475-04 2010-06-07 6028 86 W/O 10075-1 -1 -110.00 Manufacturing Inventory Cost Variance for BRCPFN1 6240 t WO f admin f 12240 f 2010-06-07 11:46:06.911475-04 2010-06-07 6028 87 W/O 10075-1 -1 110.00 Manufacturing Inventory Cost Variance for BRCPFN1 6240 t WO f admin f 12241 f 2010-06-07 11:46:06.911475-04 2010-06-07 6029 86 W/O 10075-1 -1 -30000.50 Breeder Inventory Cost Variance for BRCPFN1 6241 t WO f admin f 12242 f 2010-06-07 11:46:06.911475-04 2010-06-07 6029 87 W/O 10075-1 -1 30000.50 Breeder Inventory Cost Variance for BRCPFN1 6241 t WO f admin f 12244 f 2010-06-07 11:50:24.853218-04 2010-06-07 6030 99 A/P 30102 \N 1930.00 UPS-United Parcel Service UPS-6 6242 t VO f admin f 12243 f 2010-06-07 11:50:24.853218-04 2010-06-07 6030 120 A/P 30102 \N -1930.00 UPS-United Parcel Service UPS-6 6242 t VO f admin f 12245 f 2010-06-07 11:50:24.886934-04 2010-06-07 6031 99 A/P 30101 \N 1000.00 ICHROME-International Chrome Technologies 6242 t VO f admin f 12246 f 2010-06-07 11:50:24.886934-04 2010-06-07 6031 95 A/P 30101 \N -1000.00 ICHROME-International Chrome Technologies 6242 t VO f admin f 12247 f 2010-06-07 11:50:24.929177-04 2010-06-07 6032 99 A/P 30100 \N 1700.00 TPARTS-Toy Parts Inc. 6242 t VO f admin f 12248 f 2010-06-07 11:50:24.929177-04 2010-06-07 6032 95 A/P 30100 \N -1700.00 TPARTS-Toy Parts Inc. 6242 t VO f admin f 12250 f 2010-06-07 11:50:29.182347-04 2010-06-07 6034 99 A/P 30098 \N 12600.00 TPARTS-Toy Parts Inc. 6242 t VO f admin f 12249 f 2010-06-07 11:50:29.182347-04 2010-06-07 6034 95 A/P 30098 \N -12500.00 TPARTS-Toy Parts Inc. 6242 t VO f admin f 12251 f 2010-06-07 11:50:29.182347-04 2010-06-07 6034 139 A/P 30098 \N -100.00 TPARTS-Toy Parts Inc. 6242 t VO f admin f 12259 f 2010-06-07 12:21:08.762121-04 2010-06-07 6040 86 W/O Misc. 4022 -692.00 Cost Variance of Post to Misc. Production for Item Number TSUB2 6250 t WO f admin f 12258 f 2010-06-07 12:21:08.762121-04 2010-06-07 6040 87 W/O Misc. 4022 692.00 Cost Variance of Post to Misc. Production for Item Number TSUB2 6250 t WO f admin f 12252 f 2010-06-07 12:21:08.762121-04 2010-06-07 6037 86 W/O Misc. 4022 1642.00 Receive from Misc. Production for Item Number TSUB2\n 6245 t WO f admin f 12253 f 2010-06-07 12:21:08.762121-04 2010-06-07 6037 138 W/O Misc. 4022 -1642.00 Receive from Misc. Production for Item Number TSUB2\n 6245 t WO f admin f 12255 f 2010-06-07 12:21:08.762121-04 2010-06-07 6038 86 W/O Misc. 4023 -400.00 Consumed during Misc. Production of Item Number TSUB2\n 6246 t WO f admin f 12254 f 2010-06-07 12:21:08.762121-04 2010-06-07 6038 138 W/O Misc. 4023 400.00 Consumed during Misc. Production of Item Number TSUB2\n 6246 t WO f admin f 12257 f 2010-06-07 12:21:08.762121-04 2010-06-07 6039 86 W/O Misc. 4024 -550.00 Consumed during Misc. Production of Item Number TSUB2\n 6247 t WO f admin f 12256 f 2010-06-07 12:21:08.762121-04 2010-06-07 6039 138 W/O Misc. 4024 550.00 Consumed during Misc. Production of Item Number TSUB2\n 6247 t WO f admin f 12260 f 2010-06-07 12:25:12.371156-04 2010-06-07 6041 91 I/M Correct Transaction 4025 400.00 Miscellaneous Adjustment for item TBOX1\n 6251 t AD f admin f 12261 f 2010-06-07 12:25:12.371156-04 2010-06-07 6041 138 I/M Correct Transaction 4025 -400.00 Miscellaneous Adjustment for item TBOX1\n 6251 t AD f admin f 12263 f 2010-06-07 12:26:42.736332-04 2010-06-07 6042 131 I/M Shop Transaction 4026 1000.00 Reverse Material Expense for item TWHEEL1\n 6252 t EX f admin f 12262 f 2010-06-07 12:26:42.736332-04 2010-06-07 6042 138 I/M Shop Transaction 4026 -1000.00 Reverse Material Expense for item TWHEEL1\n 6252 t EX f admin f 12264 f 2010-06-07 12:28:50.083118-04 2010-06-07 6043 91 I/M Found at outside processor and returned 4027 1500.00 Miscellaneous Adjustment for item RBUMP1\n 6253 t AD f admin f 12265 f 2010-06-07 12:28:50.083118-04 2010-06-07 6043 138 I/M Found at outside processor and returned 4027 -1500.00 Miscellaneous Adjustment for item RBUMP1\n 6253 t AD f admin f 12267 f 2010-09-07 16:15:36.062578-04 2010-09-07 6044 106 A/R I-60095 \N 99000.00 TTOYS-Tremendous Toys Incorporated 6254 t CR f admin f 12268 f 2010-09-07 16:18:18.630866-04 2010-09-07 6045 95 S/R 20092-1 4028 44000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6255 t PO f admin f 12269 f 2010-09-07 16:18:18.630866-04 2010-09-07 6045 85 S/R 20092-1 4028 -44000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6255 t PO f admin f 12271 f 2010-09-07 16:18:18.630866-04 2010-09-07 6046 96 S/R 50206-1 4029 -44000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6257 t SO f admin f 12270 f 2010-09-07 16:18:18.630866-04 2010-09-07 6046 85 S/R 50206-1 4029 44000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6257 t SO f admin f 12273 f 2010-09-07 16:18:18.630866-04 2010-09-07 6047 108 S/R 60070 -1 -44000.00 Ship Order 50206 for Customer Tremendous Toys Incorporated 6258 t SH f admin f 12272 f 2010-09-07 16:18:18.630866-04 2010-09-07 6047 96 S/R 60070 -1 44000.00 Ship Order 50206 for Customer Tremendous Toys Incorporated 6258 t SH f admin f 12275 f 2010-09-07 16:24:13.762337-04 2010-09-07 6048 99 A/P -1 206 -14300.00 TPARTS-Toy Parts Inc. 6262 t CK f admin f 12276 f 2010-09-07 16:24:13.762337-04 2010-09-07 6049 99 A/P 4057 207 -1000.00 ICHROME-International Chrome Technologies 6262 t CK f admin f 12302 f 2010-09-07 16:46:21.229877-04 2010-07-29 6063 133 A/R 20027 420 148500.00 Unapplied from C-543433 6276 t CD f admin f 12303 f 2010-09-07 16:46:21.229877-04 2010-07-29 6063 123 A/R 20027 420 -148500.00 Unapplied from C-543433 6276 t CD f admin f 12278 f 2010-09-07 16:24:13.762337-04 2010-09-07 6050 99 A/P 4058 208 -1930.00 UPS-United Parcel Service 6262 t CK f admin f 12281 f 2010-09-07 16:40:33.100966-04 2010-09-07 6051 96 S/R 50207-1 4030 -88000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6263 t SO f admin f 12280 f 2010-09-07 16:40:33.100966-04 2010-09-07 6051 85 S/R 50207-1 4030 88000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6263 t SO f admin f 12282 f 2010-09-07 16:40:42.851418-04 2010-09-07 6052 96 S/R 50207-1 4031 88000.00 Return from Shipping 6264 t SO f admin f 12283 f 2010-09-07 16:40:42.851418-04 2010-09-07 6052 85 S/R 50207-1 4031 -88000.00 Return from Shipping 6264 t SO f admin f 12412 f 2010-09-13 11:45:18.636025-04 2010-09-13 6114 101 A/P 30108 \N 2.70 Discount for V 30108 6337 t DS f admin f 12284 f 2010-09-07 16:41:51.385685-04 2010-07-10 6053 95 S/R 20093-1 4032 88000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6265 t PO f admin f 12285 f 2010-09-07 16:41:51.385685-04 2010-07-10 6053 85 S/R 20093-1 4032 -88000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6265 t PO f admin f 12287 f 2010-09-07 16:41:51.385685-04 2010-09-07 6054 96 S/R 50207-1 4033 -88000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6267 t SO f admin f 12286 f 2010-09-07 16:41:51.385685-04 2010-09-07 6054 85 S/R 50207-1 4033 88000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6267 t SO f admin f 12289 f 2010-09-07 16:41:51.385685-04 2010-09-07 6055 108 S/R 60071 -1 -88000.00 Ship Order 50207 for Customer Tremendous Toys Incorporated 6268 t SH f admin f 12288 f 2010-09-07 16:41:51.385685-04 2010-09-07 6055 96 S/R 60071 -1 88000.00 Ship Order 50207 for Customer Tremendous Toys Incorporated 6268 t SH f admin f 12290 f 2010-09-07 16:42:11.568275-04 2010-08-04 6056 95 S/R 20094-1 4034 66000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6269 t PO f admin f 12291 f 2010-09-07 16:42:11.568275-04 2010-08-04 6056 85 S/R 20094-1 4034 -66000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6269 t PO f admin f 12293 f 2010-09-07 16:42:11.568275-04 2010-09-07 6057 96 S/R 50208-1 4035 -66000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6271 t SO f admin f 12292 f 2010-09-07 16:42:11.568275-04 2010-09-07 6057 85 S/R 50208-1 4035 66000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6271 t SO f admin f 12295 f 2010-09-07 16:42:11.568275-04 2010-09-07 6058 108 S/R 60072 -1 -66000.00 Ship Order 50208 for Customer Tremendous Toys Incorporated 6272 t SH f admin f 12294 f 2010-09-07 16:42:11.568275-04 2010-09-07 6058 96 S/R 60072 -1 66000.00 Ship Order 50208 for Customer Tremendous Toys Incorporated 6272 t SH f admin f 12296 f 2010-09-07 16:43:15.601712-04 2010-09-07 6059 106 A/R 60096 \N -99000.00 Tremendous Toys Incorporated 6273 t IN f admin f 12297 f 2010-09-07 16:43:15.601712-04 2010-09-07 6059 103 A/R 60096 \N 99000.00 Tremendous Toys Incorporated 6273 t IN f admin f 12299 f 2010-09-07 16:43:34.506819-04 2010-07-12 6060 106 A/R 60097 \N -198000.00 Tremendous Toys Incorporated 6274 t IN f admin f 12298 f 2010-09-07 16:43:34.506819-04 2010-07-12 6060 103 A/R 60097 \N 198000.00 Tremendous Toys Incorporated 6274 t IN f admin f 12300 f 2010-09-07 16:43:47.297495-04 2010-08-10 6061 106 A/R 60098 \N -148500.00 Tremendous Toys Incorporated 6275 t IN f admin f 12301 f 2010-09-07 16:43:47.297495-04 2010-08-10 6061 103 A/R 60098 \N 148500.00 Tremendous Toys Incorporated 6275 t IN f admin f 12304 f 2010-09-07 16:46:21.229877-04 2010-07-29 6062 123 A/R Unapplied from C-543433 \N 148500.00 TTOYS-Tremendous Toys Incorporated 6276 t CR f admin f 12307 f 2010-09-07 16:46:21.229877-04 2010-09-07 6064 133 A/R R -1 -148500.00 20027 6277 t CD f admin f 12306 f 2010-09-07 16:46:21.229877-04 2010-09-07 6064 106 A/R R -1 148500.00 20027 6277 t CD f admin f 12308 f 2010-09-07 16:47:32.014347-04 2010-08-30 6066 133 A/R 20028 421 198000.00 Unapplied from C-321322 6278 t CD f admin f 12309 f 2010-09-07 16:47:32.014347-04 2010-08-30 6066 123 A/R 20028 421 -198000.00 Unapplied from C-321322 6278 t CD f admin f 12310 f 2010-09-07 16:47:32.014347-04 2010-08-30 6065 123 A/R Unapplied from C-321322 \N 198000.00 TTOYS-Tremendous Toys Incorporated 6278 t CR f admin f 12313 f 2010-09-07 16:47:32.014347-04 2010-09-07 6067 133 A/R R -1 -198000.00 20028 6279 t CD f admin f 12312 f 2010-09-07 16:47:32.014347-04 2010-09-07 6067 106 A/R R -1 198000.00 20028 6279 t CD f admin f 12314 f 2010-09-07 16:49:48.240973-04 2010-07-31 6068 99 A/P 30104 \N 88000.00 DMFG-Diamond Manufacturing 6280 t VO f admin f 12315 f 2010-09-07 16:49:48.240973-04 2010-07-31 6068 95 A/P 30104 \N -88000.00 DMFG-Diamond Manufacturing 6280 t VO f admin f 12317 f 2010-09-07 16:49:58.48709-04 2010-07-31 6069 99 A/P 30105 \N 66000.00 DMFG-Diamond Manufacturing 6281 t VO f admin f 12316 f 2010-09-07 16:49:58.48709-04 2010-07-31 6069 95 A/P 30105 \N -66000.00 DMFG-Diamond Manufacturing 6281 t VO f admin f 12323 f 2010-09-08 13:16:48.523325-04 2010-09-08 6072 96 S/R 50209-1 4037 -12817.00 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6286 t SO f admin f 12322 f 2010-09-08 13:16:48.523325-04 2010-09-08 6072 85 S/R 50209-1 4037 12817.00 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6286 t SO f admin f 12319 f 2010-09-07 16:51:04.601423-04 2010-09-07 6070 99 A/P 4059 209 -154000.00 DMFG-Diamond Manufacturing 6283 t CK f admin f 12320 f 2010-09-08 13:15:43.960054-04 2010-07-30 6071 95 S/R 20095-1 4036 12817.00 Receive Inventory from P/O for Toy Parts Inc. for item YTRUCK1 6284 t PO f admin f 12321 f 2010-09-08 13:15:43.960054-04 2010-07-30 6071 85 S/R 20095-1 4036 -12817.00 Receive Inventory from P/O for Toy Parts Inc. for item YTRUCK1 6284 t PO f admin f 12324 f 2010-09-08 13:16:55.708375-04 2010-09-08 6073 96 S/R 50209-1 4038 12817.00 Return from Shipping 6287 t SO f admin f 12325 f 2010-09-08 13:16:55.708375-04 2010-09-08 6073 85 S/R 50209-1 4038 -12817.00 Return from Shipping 6287 t SO f admin f 12327 f 2010-09-08 13:17:17.760528-04 2010-07-30 6074 96 S/R 50209-1 4039 -6408.50 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6288 t SO f admin f 12326 f 2010-09-08 13:17:17.760528-04 2010-07-30 6074 85 S/R 50209-1 4039 6408.50 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6288 t SO f admin f 12329 f 2010-09-08 13:17:40.249487-04 2010-07-30 6075 108 S/R 60073 -1 -6408.50 Ship Order 50209 for Customer Tremendous Toys Incorporated 6289 t SH f admin f 12328 f 2010-09-08 13:17:40.249487-04 2010-07-30 6075 96 S/R 60073 -1 6408.50 Ship Order 50209 for Customer Tremendous Toys Incorporated 6289 t SH f admin f 12331 f 2010-09-08 13:17:57.20414-04 2010-08-01 6076 96 S/R 50209-1 4040 -6408.50 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6290 t SO f admin f 12330 f 2010-09-08 13:17:57.20414-04 2010-08-01 6076 85 S/R 50209-1 4040 6408.50 Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6290 t SO f admin f 12333 f 2010-09-08 13:18:09.997473-04 2010-08-01 6077 108 S/R 60074 -1 -6408.50 Ship Order 50209 for Customer Tremendous Toys Incorporated 6291 t SH f admin f 12332 f 2010-09-08 13:18:09.997473-04 2010-08-01 6077 96 S/R 60074 -1 6408.50 Ship Order 50209 for Customer Tremendous Toys Incorporated 6291 t SH f admin f 12334 f 2010-09-08 13:22:22.258271-04 2010-07-30 6078 122 A/R 60099 \N 4375.00 Tremendous Toys Incorporated 6292 t IN f admin f 12335 f 2010-09-08 13:22:22.258271-04 2010-07-30 6078 106 A/R 60099 \N -52937.50 Tremendous Toys Incorporated 6292 t IN f admin f 12337 f 2010-09-08 13:22:22.258271-04 2010-07-30 6078 102 A/R 60099 \N 2312.50 Tremendous Toys Incorporated 6292 t IN f admin f 12336 f 2010-09-08 13:22:22.258271-04 2010-07-30 6078 103 A/R 60099 \N 46250.00 Tremendous Toys Incorporated 6292 t IN f admin f 12338 f 2010-09-08 13:23:22.509549-04 2010-08-15 6079 106 A/R I-60099 \N 52937.50 TTOYS-Tremendous Toys Incorporated 6293 t CR f admin f 12340 f 2010-09-08 13:25:31.224661-04 2010-08-15 6080 90 A/P 30106 \N -2183.00 TPARTS-Toy Parts Inc. 6294 t VO f admin f 12343 f 2010-09-08 13:25:31.224661-04 2010-08-15 6080 99 A/P 30106 \N 15600.00 TPARTS-Toy Parts Inc. 6294 t VO f admin f 12341 f 2010-09-08 13:25:31.224661-04 2010-08-15 6080 95 A/P 30106 \N -12817.00 TPARTS-Toy Parts Inc. 6294 t VO f admin f 12342 f 2010-09-08 13:25:31.224661-04 2010-08-15 6080 155 A/P 30106 \N -600.00 TPARTS-Toy Parts Inc. 6294 t VO f admin f 12358 f 2010-09-08 13:40:20.763711-04 2010-09-08 6086 99 A/P -1 211 -17783.08 TPARTS-Toy Parts Inc. 6306 t CK f admin f 12345 f 2010-09-08 13:27:27.759862-04 2010-08-30 6081 99 A/P -1 210 -15600.00 TPARTS-Toy Parts Inc. 6297 t CK f admin f 12346 f 2010-09-08 13:38:38.870768-04 2010-09-08 6082 95 S/R 20096-3 4041 2000.00 Receive Inventory from P/O for Toy Parts Inc. for item TBOX1 6298 t PO f admin f 12347 f 2010-09-08 13:38:38.870768-04 2010-09-08 6082 138 S/R 20096-3 4041 -2000.00 Receive Inventory from P/O for Toy Parts Inc. for item TBOX1 6298 t PO f admin f 12348 f 2010-09-08 13:38:38.870768-04 2010-09-08 6083 95 S/R 20096-1 4042 10000.00 Receive Inventory from P/O for Toy Parts Inc. for item TBODY1 6300 t PO f admin f 12349 f 2010-09-08 13:38:38.870768-04 2010-09-08 6083 138 S/R 20096-1 4042 -10000.00 Receive Inventory from P/O for Toy Parts Inc. for item TBODY1 6300 t PO f admin f 12350 f 2010-09-08 13:38:38.870768-04 2010-09-08 6084 95 S/R 20096-2 4043 5588.00 Receive Inventory from P/O for Toy Parts Inc. for item TWHEEL1 6302 t PO f admin f 12351 f 2010-09-08 13:38:38.870768-04 2010-09-08 6084 138 S/R 20096-2 4043 -5588.00 Receive Inventory from P/O for Toy Parts Inc. for item TWHEEL1 6302 t PO f admin f 12354 f 2010-09-08 13:39:52.056693-04 2010-09-08 6085 99 A/P 30107 \N 18146.00 TPARTS-Toy Parts Inc. 6304 t VO f admin f 12353 f 2010-09-08 13:39:52.056693-04 2010-09-08 6085 129 A/P 30107 \N -558.00 TPARTS-Toy Parts Inc. 6304 t VO f admin f 12352 f 2010-09-08 13:39:52.056693-04 2010-09-08 6085 95 A/P 30107 \N -17588.00 TPARTS-Toy Parts Inc. 6304 t VO f admin f 12356 f 2010-09-08 13:40:20.763711-04 2010-09-08 6087 101 A/P 30107 \N 362.92 Discount for V 30107 6307 t DS f admin f 12355 f 2010-09-08 13:40:20.763711-04 2010-09-08 6087 99 A/P 30107 \N -362.92 Discount for V 30107 6307 t DS f admin f 12369 f 2010-09-08 13:42:12.788162-04 2010-09-08 6093 86 W/O 10078-1 -1 -2248.72 Manufacturing Inventory Cost Variance for TSUB1 6314 t WO f admin f 12370 f 2010-09-08 13:42:12.788162-04 2010-09-08 6093 87 W/O 10078-1 -1 2248.72 Manufacturing Inventory Cost Variance for TSUB1 6314 t WO f admin f 12364 f 2010-09-08 13:42:04.133297-04 2010-09-08 6090 86 W/O 10078-1 -1 -1.28 Post Setup Time Standard Operation - Assembly/ to Work Order 6311 t WO f admin f 12363 f 2010-09-08 13:42:04.133297-04 2010-09-08 6090 94 W/O 10078-1 -1 1.28 Post Setup Time Standard Operation - Assembly/ to Work Order 6311 t WO f admin f 12366 f 2010-09-08 13:42:04.133297-04 2010-09-08 6091 86 W/O 10078-1 -1 -1210.00 Post Run Time Standard Operation - Assembly/ to Work Order 6312 t WO f admin f 12365 f 2010-09-08 13:42:04.133297-04 2010-09-08 6091 94 W/O 10078-1 -1 1210.00 Post Run Time Standard Operation - Assembly/ to Work Order 6312 t WO f admin f 12360 f 2010-09-08 13:42:04.133297-04 2010-09-08 6088 86 W/O 10078-1 4044 -2000.00 Material TBOX1 Issue to Work Order 6309 t WO f admin f 12359 f 2010-09-08 13:42:04.133297-04 2010-09-08 6088 138 W/O 10078-1 4044 2000.00 Material TBOX1 Issue to Work Order 6309 t WO f admin f 12362 f 2010-09-08 13:42:04.133297-04 2010-09-08 6089 86 W/O 10078-1 4045 -2750.00 Material TINSERT1 Issue to Work Order 6310 t WO f admin f 12361 f 2010-09-08 13:42:04.133297-04 2010-09-08 6089 138 W/O 10078-1 4045 2750.00 Material TINSERT1 Issue to Work Order 6310 t WO f admin f 12367 f 2010-09-08 13:42:04.133297-04 2010-09-08 6092 86 W/O 10078-1 4046 8210.00 Receive Inventory TSUB1 from Manufacturing 6313 t WO f admin f 12368 f 2010-09-08 13:42:04.133297-04 2010-09-08 6092 138 W/O 10078-1 4046 -8210.00 Receive Inventory TSUB1 from Manufacturing 6313 t WO f admin f 12372 f 2010-09-08 13:42:25.477028-04 2010-09-08 6094 86 W/O 50210-1 -1 -1.10 \N 6316 t WO f admin f 12371 f 2010-09-08 13:42:25.477028-04 2010-09-08 6094 94 W/O 50210-1 -1 1.10 \N 6316 t WO f admin f 12374 f 2010-09-08 13:42:25.477028-04 2010-09-08 6095 86 W/O 50210-1 -1 -2200.00 \N 6317 t WO f admin f 12373 f 2010-09-08 13:42:25.477028-04 2010-09-08 6095 94 W/O 50210-1 -1 2200.00 \N 6317 t WO f admin f 12376 f 2010-09-08 13:42:25.477028-04 2010-09-08 6096 86 W/O 50210-1 -1 -2.20 \N 6318 t WO f admin f 12375 f 2010-09-08 13:42:25.477028-04 2010-09-08 6096 94 W/O 50210-1 -1 2.20 \N 6318 t WO f admin f 12378 f 2010-09-08 13:42:25.477028-04 2010-09-08 6097 86 W/O 50210-1 -1 -550.00 \N 6319 t WO f admin f 12377 f 2010-09-08 13:42:25.477028-04 2010-09-08 6097 94 W/O 50210-1 -1 550.00 \N 6319 t WO f admin f 12380 f 2010-09-08 13:42:25.477028-04 2010-09-08 6098 86 W/O 50210-1 -1 -0.44 \N 6320 t WO f admin f 12379 f 2010-09-08 13:42:25.477028-04 2010-09-08 6098 94 W/O 50210-1 -1 0.44 \N 6320 t WO f admin f 12382 f 2010-09-08 13:42:25.477028-04 2010-09-08 6099 86 W/O 50210-1 -1 -220.00 \N 6321 t WO f admin f 12381 f 2010-09-08 13:42:25.477028-04 2010-09-08 6099 94 W/O 50210-1 -1 220.00 \N 6321 t WO f admin f 12384 f 2010-09-08 13:42:25.477028-04 2010-09-08 6100 86 W/O 50210-1 4047 -80.00 Material YPAINT1 Issue to Work Order 6322 t WO f admin f 12383 f 2010-09-08 13:42:25.477028-04 2010-09-08 6100 138 W/O 50210-1 4047 80.00 Material YPAINT1 Issue to Work Order 6322 t WO f admin f 12386 f 2010-09-08 13:42:25.477028-04 2010-09-08 6101 86 W/O 50210-1 4048 -10000.00 Material TBODY1 Issue to Work Order 6323 t WO f admin f 12385 f 2010-09-08 13:42:25.477028-04 2010-09-08 6101 138 W/O 50210-1 4048 10000.00 Material TBODY1 Issue to Work Order 6323 t WO f admin f 12388 f 2010-09-08 13:42:25.477028-04 2010-09-08 6102 86 W/O 50210-1 4049 -4000.00 Material TWHEEL1 Issue to Work Order 6324 t WO f admin f 12387 f 2010-09-08 13:42:25.477028-04 2010-09-08 6102 138 W/O 50210-1 4049 4000.00 Material TWHEEL1 Issue to Work Order 6324 t WO f admin f 12390 f 2010-09-08 13:42:25.477028-04 2010-09-08 6103 86 W/O 50210-1 4050 -8210.00 Material TSUB1 Issue to Work Order 6325 t WO f admin f 12389 f 2010-09-08 13:42:25.477028-04 2010-09-08 6103 138 W/O 50210-1 4050 8210.00 Material TSUB1 Issue to Work Order 6325 t WO f admin f 12391 f 2010-09-08 13:42:25.477028-04 2010-09-08 6104 86 W/O 50210-1 4051 25634.00 Receive Inventory YTRUCK1 from Manufacturing 6326 t WO f admin f 12392 f 2010-09-08 13:42:25.477028-04 2010-09-08 6104 85 W/O 50210-1 4051 -25634.00 Receive Inventory YTRUCK1 from Manufacturing 6326 t WO f admin f 12393 f 2010-09-08 13:42:49.511842-04 2010-09-08 6105 86 W/O 50210-1 -1 -370.26 Manufacturing Inventory Cost Variance for YTRUCK1 6327 t WO f admin f 12394 f 2010-09-08 13:42:49.511842-04 2010-09-08 6105 87 W/O 50210-1 -1 370.26 Manufacturing Inventory Cost Variance for YTRUCK1 6327 t WO f admin f 12396 f 2010-09-08 13:43:15.446926-04 2010-09-08 6106 96 S/R 50210-1 4052 -25634.00 Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD 6329 t SO f admin f 12395 f 2010-09-08 13:43:15.446926-04 2010-09-08 6106 85 S/R 50210-1 4052 25634.00 Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD 6329 t SO f admin f 12398 f 2010-09-08 13:43:20.490416-04 2010-09-08 6107 108 S/R 60075 -1 -25634.00 Ship Order 50210 for Customer Xtreme Toys LTD 6330 t SH f admin f 12397 f 2010-09-08 13:43:20.490416-04 2010-09-08 6107 96 S/R 60075 -1 25634.00 Ship Order 50210 for Customer Xtreme Toys LTD 6330 t SH f admin f 12399 f 2010-09-08 13:43:45.676374-04 2010-09-08 6108 122 A/R 60100 \N 35000.00 Xtreme Toys LTD 6331 t IN f admin f 12400 f 2010-09-08 13:43:45.676374-04 2010-09-08 6108 106 A/R 60100 \N -138305.78 Xtreme Toys LTD 6331 t IN f admin f 12401 f 2010-09-08 13:43:45.676374-04 2010-09-08 6108 141 A/R 60100 \N 103305.78 Xtreme Toys LTD 6331 t IN f admin f 12403 f 2010-09-08 13:45:19.987299-04 2010-09-08 6110 106 A/R 20029 \N 2766.12 Xtreme Toys LTD Discount Credit from C-43341 6332 t CM f admin f 12402 f 2010-09-08 13:45:19.987299-04 2010-09-08 6110 157 A/R 20029 \N -2766.12 Xtreme Toys LTD Discount Credit from C-43341 6332 t CM f admin f 12404 f 2010-09-08 13:45:19.987299-04 2010-09-08 6109 127 A/R C-43341 \N -135539.67 XTRM-Xtreme Toys LTD 6332 t CR f admin f 12405 f 2010-09-08 13:45:19.987299-04 2010-09-08 6109 106 A/R I-60100 \N 135539.67 XTRM-Xtreme Toys LTD 6332 t CR f admin f 12406 f 2010-09-13 11:40:31.75183-04 2010-09-13 6111 95 S/R 20098 -1 100.00 Receive Non-Controlled Inventory from P/O for International Chrome Technologies for item CHROMING 6333 t PO f admin f 12407 f 2010-09-13 11:40:31.75183-04 2010-09-13 6111 158 S/R 20098 -1 -100.00 Receive Non-Controlled Inventory from P/O for International Chrome Technologies for item CHROMING 6333 t PO f admin f 12409 f 2010-09-13 11:41:44.016846-04 2010-09-13 6112 99 A/P 30108 \N 135.00 ICHROME-International Chrome Technologies MDA 6334 t VO f admin f 12410 f 2010-09-13 11:41:44.016846-04 2010-09-13 6112 95 A/P 30108 \N -100.00 ICHROME-International Chrome Technologies MDA 6334 t VO f admin f 12408 f 2010-09-13 11:41:44.016846-04 2010-09-13 6112 139 A/P 30108 \N -35.00 ICHROME-International Chrome Technologies MDA 6334 t VO f admin f 12411 f 2010-09-13 11:45:18.636025-04 2010-09-13 6114 99 A/P 30108 \N -2.70 Discount for V 30108 6337 t DS f admin f 12418 f 2010-09-13 11:47:00.153359-04 2010-09-13 6116 86 W/O 10079-2 -1 -18.33 Post Run Time Receive From Outside Processing/ to Work Order 6340 t WO f admin f 12417 f 2010-09-13 11:47:00.153359-04 2010-09-13 6116 94 W/O 10079-2 -1 18.33 Post Run Time Receive From Outside Processing/ to Work Order 6340 t WO f admin f 12414 f 2010-09-13 11:45:18.636025-04 2010-09-13 6113 99 A/P 4060 212 -132.30 ICHROME-International Chrome Technologies 6336 t CK f admin f 12416 f 2010-09-13 11:47:00.153359-04 2010-09-13 6115 86 W/O 10079-2 -1 -14.67 Post Run Time Prepare for Outside Processing/ to Work Order 6339 t WO f admin f 12415 f 2010-09-13 11:47:00.153359-04 2010-09-13 6115 94 W/O 10079-2 -1 14.67 Post Run Time Prepare for Outside Processing/ to Work Order 6339 t WO f admin f 12420 f 2010-09-13 11:47:00.153359-04 2010-09-13 6117 86 W/O 10079-2 4053 -100.00 Material RBUMP1 Issue to Work Order 6341 t WO f admin f 12419 f 2010-09-13 11:47:00.153359-04 2010-09-13 6117 138 W/O 10079-2 4053 100.00 Material RBUMP1 Issue to Work Order 6341 t WO f admin f 12421 f 2010-09-13 11:47:00.153359-04 2010-09-13 6118 86 W/O 10079-2 4054 233.00 Receive Inventory CBUMP from Manufacturing 6342 t WO f admin f 12422 f 2010-09-13 11:47:00.153359-04 2010-09-13 6118 138 W/O 10079-2 4054 -233.00 Receive Inventory CBUMP from Manufacturing 6342 t WO f admin f 12424 f 2010-09-13 11:47:49.99169-04 2010-09-13 6119 86 W/O 10079-1 -1 -1.10 Post Setup Time Standard Paint Operation/ to Work Order 6345 t WO f admin f 12423 f 2010-09-13 11:47:49.99169-04 2010-09-13 6119 94 W/O 10079-1 -1 1.10 Post Setup Time Standard Paint Operation/ to Work Order 6345 t WO f admin f 12426 f 2010-09-13 11:47:49.99169-04 2010-09-13 6120 86 W/O 10079-1 -1 -22.00 Post Run Time Standard Paint Operation/ to Work Order 6346 t WO f admin f 12425 f 2010-09-13 11:47:49.99169-04 2010-09-13 6120 94 W/O 10079-1 -1 22.00 Post Run Time Standard Paint Operation/ to Work Order 6346 t WO f admin f 12428 f 2010-09-13 11:47:49.99169-04 2010-09-13 6121 86 W/O 10079-1 -1 -2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 6347 t WO f admin f 12413 f 2010-09-13 11:45:18.636025-04 2010-09-13 6113 109 A/P 4060 212 132.30 ICHROME-International Chrome Technologies 6336 t CK t admin f 12427 f 2010-09-13 11:47:49.99169-04 2010-09-13 6121 94 W/O 10079-1 -1 2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 6347 t WO f admin f 12430 f 2010-09-13 11:47:49.99169-04 2010-09-13 6122 86 W/O 10079-1 -1 -5.50 Post Run Time Standard Operation - Assembly/ to Work Order 6348 t WO f admin f 12429 f 2010-09-13 11:47:49.99169-04 2010-09-13 6122 94 W/O 10079-1 -1 5.50 Post Run Time Standard Operation - Assembly/ to Work Order 6348 t WO f admin f 12432 f 2010-09-13 11:47:49.99169-04 2010-09-13 6123 86 W/O 10079-1 -1 -0.44 Post Setup Time SHIPPING/ to Work Order 6349 t WO f admin f 12431 f 2010-09-13 11:47:49.99169-04 2010-09-13 6123 94 W/O 10079-1 -1 0.44 Post Setup Time SHIPPING/ to Work Order 6349 t WO f admin f 12434 f 2010-09-13 11:47:49.99169-04 2010-09-13 6124 86 W/O 10079-1 -1 -2.20 Post Run Time SHIPPING/ to Work Order 6350 t WO f admin f 12433 f 2010-09-13 11:47:49.99169-04 2010-09-13 6124 94 W/O 10079-1 -1 2.20 Post Run Time SHIPPING/ to Work Order 6350 t WO f admin f 12436 f 2010-09-13 11:47:49.99169-04 2010-09-13 6125 86 W/O 10079-1 4055 -0.80 Material YPAINT1 Issue to Work Order 6351 t WO f admin f 12435 f 2010-09-13 11:47:49.99169-04 2010-09-13 6125 138 W/O 10079-1 4055 0.80 Material YPAINT1 Issue to Work Order 6351 t WO f admin f 12438 f 2010-09-13 11:47:49.99169-04 2010-09-13 6126 86 W/O 10079-1 4056 -25.00 Material CBODY1 Issue to Work Order 6352 t WO f admin f 12437 f 2010-09-13 11:47:49.99169-04 2010-09-13 6126 138 W/O 10079-1 4056 25.00 Material CBODY1 Issue to Work Order 6352 t WO f admin f 12440 f 2010-09-13 11:47:49.99169-04 2010-09-13 6127 86 W/O 10079-1 4057 -40.00 Material TWHEEL1 Issue to Work Order 6353 t WO f admin f 12439 f 2010-09-13 11:47:49.99169-04 2010-09-13 6127 138 W/O 10079-1 4057 40.00 Material TWHEEL1 Issue to Work Order 6353 t WO f admin f 12442 f 2010-09-13 11:47:49.99169-04 2010-09-13 6128 86 W/O 10079-1 4058 -82.10 Material TSUB2 Issue to Work Order 6354 t WO f admin f 12441 f 2010-09-13 11:47:49.99169-04 2010-09-13 6128 138 W/O 10079-1 4058 82.10 Material TSUB2 Issue to Work Order 6354 t WO f admin f 12444 f 2010-09-13 11:47:49.99169-04 2010-09-13 6129 86 W/O 10079-1 4059 -233.00 Material CBUMP Issue to Work Order 6355 t WO f admin f 12443 f 2010-09-13 11:47:49.99169-04 2010-09-13 6129 138 W/O 10079-1 4059 233.00 Material CBUMP Issue to Work Order 6355 t WO f admin f 12446 f 2010-09-13 11:47:49.99169-04 2010-09-13 6130 86 W/O 10079-1 4060 -415.48 Material HUB1 Issue to Work Order 6356 t WO f admin f 12445 f 2010-09-13 11:47:49.99169-04 2010-09-13 6130 138 W/O 10079-1 4060 415.48 Material HUB1 Issue to Work Order 6356 t WO f admin f 12447 f 2010-09-13 11:47:49.99169-04 2010-09-13 6131 86 W/O 10079-1 4061 829.82 Receive Inventory STOCKCAR1 from Manufacturing 6357 t WO f admin f 12448 f 2010-09-13 11:47:49.99169-04 2010-09-13 6131 85 W/O 10079-1 4061 -829.82 Receive Inventory STOCKCAR1 from Manufacturing 6357 t WO f admin f 12449 f 2010-11-04 15:40:15.391492-04 2010-11-04 6132 99 A/P 30109 \N 44500.00 DMFG-Diamond Manufacturing 6360 t VO f admin f 12450 f 2010-11-04 15:40:15.391492-04 2010-11-04 6132 95 A/P 30109 \N -44000.00 DMFG-Diamond Manufacturing 6360 t VO f admin f 12451 f 2010-11-04 15:40:15.391492-04 2010-11-04 6132 139 A/P 30109 \N -500.00 DMFG-Diamond Manufacturing 6360 t VO f admin f 12455 f 2010-11-04 15:43:23.428823-04 2010-10-15 6134 99 G/L Receive Product \N 50000.00 Accrue Payable 6361 t ST f admin f 12457 f 2010-11-04 15:43:23.428823-04 2010-10-15 6134 99 G/L Receive Product \N -50000.00 Clear A/P 6361 t ST f admin f 12453 f 2010-11-04 15:43:23.428823-04 2010-10-15 6134 95 G/L Receive Product \N 50000.00 Liab Clear 6361 t ST f admin f 12454 f 2010-11-04 15:43:23.428823-04 2010-10-15 6134 95 G/L Receive Product \N -50000.00 Clear PO Liab Clear 6361 t ST f admin f 12452 f 2010-11-04 15:43:23.428823-04 2010-10-15 6134 85 G/L Receive Product \N -50000.00 FG Inv 6361 t ST f admin f 12459 f 2010-11-04 15:43:37.112261-04 2010-10-15 6135 108 G/L Ship Order \N -45250.00 6362 t ST f admin f 12458 f 2010-11-04 15:43:37.112261-04 2010-10-15 6135 85 G/L Ship Order \N 45250.00 6362 t ST f admin f 12461 f 2010-11-04 15:43:37.112261-04 2010-10-15 6135 103 G/L Ship Order \N 77250.00 6362 t ST f admin f 12463 f 2010-11-04 15:43:48.418032-04 2010-10-15 6136 108 G/L Ship Order \N -45250.00 6363 t ST f admin f 12462 f 2010-11-04 15:43:48.418032-04 2010-10-15 6136 85 G/L Ship Order \N 45250.00 6363 t ST f admin f 12465 f 2010-11-04 15:43:48.418032-04 2010-10-15 6136 103 G/L Ship Order \N 77250.00 6363 t ST f admin f 12466 f 2010-11-04 15:46:09.303015-04 2010-11-04 6137 95 S/R 20099-1 4062 55000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6364 t PO f admin f 12467 f 2010-11-04 15:46:09.303015-04 2010-11-04 6137 85 S/R 20099-1 4062 -55000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6364 t PO f admin f 12469 f 2010-11-04 15:46:09.303015-04 2010-11-04 6138 96 S/R 50212-1 4063 -55000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6366 t SO f admin f 12468 f 2010-11-04 15:46:09.303015-04 2010-11-04 6138 85 S/R 50212-1 4063 55000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6366 t SO f admin f 12471 f 2010-11-04 15:46:09.303015-04 2010-11-04 6139 108 S/R 60076 -1 -55000.00 Ship Order 50212 for Customer Tremendous Toys Incorporated 6367 t SH f admin f 12470 f 2010-11-04 15:46:09.303015-04 2010-11-04 6139 96 S/R 60076 -1 55000.00 Ship Order 50212 for Customer Tremendous Toys Incorporated 6367 t SH f admin f 12472 f 2010-11-04 15:53:28.640849-04 2010-11-04 6140 95 S/R 20100-1 4064 20.00 Receive Inventory from P/O for Packaging Pros LTD for item TBOX1 6368 t PO f admin f 12473 f 2010-11-04 15:53:28.640849-04 2010-11-04 6140 138 S/R 20100-1 4064 -20.00 Receive Inventory from P/O for Packaging Pros LTD for item TBOX1 6368 t PO f admin f 12474 f 2010-11-04 15:54:23.741121-04 2010-11-04 6141 99 A/P 30110 \N 55000.00 DMFG-Diamond Manufacturing 6370 t VO f admin f 12475 f 2010-11-04 15:54:23.741121-04 2010-11-04 6141 95 A/P 30110 \N -55000.00 DMFG-Diamond Manufacturing 6370 t VO f admin f 12477 f 2010-11-04 15:55:21.703133-04 2010-11-04 6142 90 A/P 30111 \N -10.00 XPPI-Packaging Pros LTD 6371 t VO f admin f 12478 f 2010-11-04 15:55:21.703133-04 2010-11-04 6142 99 A/P 30111 \N 44.20 XPPI-Packaging Pros LTD 6371 t VO f admin f 12479 f 2010-11-04 15:55:21.703133-04 2010-11-04 6142 95 A/P 30111 \N -20.00 XPPI-Packaging Pros LTD 6371 t VO f admin f 12476 f 2010-11-04 15:55:21.703133-04 2010-11-04 6142 139 A/P 30111 \N -14.20 XPPI-Packaging Pros LTD 6371 t VO f admin f 12483 f 2010-11-04 15:57:52.842785-04 2010-11-04 6145 101 A/P 30111 \N 0.88 Discount for V 30111 6376 t DS f admin f 12482 f 2010-11-04 15:57:52.842785-04 2010-11-04 6145 99 A/P 30111 \N -0.88 Discount for V 30111 6376 t DS f admin f 12481 f 2010-11-04 15:57:11.246998-04 2010-11-04 6143 99 A/P 4061 213 -99500.00 DMFG-Diamond Manufacturing 6373 t CK f admin f 12456 f 2010-11-04 15:43:23.428823-04 2010-10-15 6134 109 G/L Receive Product \N 50000.00 Cash Payment 6361 t ST t admin f 12460 f 2010-11-04 15:43:37.112261-04 2010-10-15 6135 109 G/L Ship Order \N -77250.00 6362 t ST t admin f 12464 f 2010-11-04 15:43:48.418032-04 2010-10-15 6136 109 G/L Ship Order \N -77250.00 6363 t ST t admin f 12480 f 2010-11-04 15:57:11.246998-04 2010-11-04 6143 109 A/P 4061 213 99500.00 DMFG-Diamond Manufacturing 6373 t CK t admin f 12484 f 2010-11-04 15:57:52.842785-04 2010-11-04 6144 99 A/P 5015 214 -43.32 XPPI-Packaging Pros LTD 6375 t CK f admin f 12485 f 2010-11-04 15:57:52.842785-04 2010-11-04 6144 126 A/P 5015 214 43.32 XPPI-Packaging Pros LTD 6375 t CK f admin f 12487 f 2010-11-04 15:58:26.865018-04 2010-11-04 6146 86 W/O 10081-1 -1 -1.10 Post Setup Time Standard Operation - Assembly/ to Work Order 6378 t WO f admin f 12486 f 2010-11-04 15:58:26.865018-04 2010-11-04 6146 94 W/O 10081-1 -1 1.10 Post Setup Time Standard Operation - Assembly/ to Work Order 6378 t WO f admin f 12489 f 2010-11-04 15:58:26.865018-04 2010-11-04 6147 86 W/O 10081-1 -1 -11.00 Post Run Time Standard Operation - Assembly/ to Work Order 6379 t WO f admin f 12488 f 2010-11-04 15:58:26.865018-04 2010-11-04 6147 94 W/O 10081-1 -1 11.00 Post Run Time Standard Operation - Assembly/ to Work Order 6379 t WO f admin f 12491 f 2010-11-04 15:58:26.865018-04 2010-11-04 6148 86 W/O 10081-1 4065 -27.50 Material TINSERT1 Issue to Work Order 6380 t WO f admin f 12490 f 2010-11-04 15:58:26.865018-04 2010-11-04 6148 138 W/O 10081-1 4065 27.50 Material TINSERT1 Issue to Work Order 6380 t WO f admin f 12493 f 2010-11-04 15:58:26.865018-04 2010-11-04 6149 86 W/O 10081-1 4066 -20.00 Material TBOX1 Issue to Work Order 6381 t WO f admin f 12492 f 2010-11-04 15:58:26.865018-04 2010-11-04 6149 138 W/O 10081-1 4066 20.00 Material TBOX1 Issue to Work Order 6381 t WO f admin f 12494 f 2010-11-04 15:58:26.865018-04 2010-11-04 6150 86 W/O 10081-1 4067 82.10 Receive Inventory TSUB1 from Manufacturing 6382 t WO f admin f 12495 f 2010-11-04 15:58:26.865018-04 2010-11-04 6150 138 W/O 10081-1 4067 -82.10 Receive Inventory TSUB1 from Manufacturing 6382 t WO f admin f 12496 f 2010-11-04 15:58:33.370756-04 2010-11-04 6151 86 W/O 10081-1 -1 -22.50 Manufacturing Inventory Cost Variance for TSUB1 6383 t WO f admin f 12497 f 2010-11-04 15:58:33.370756-04 2010-11-04 6151 87 W/O 10081-1 -1 22.50 Manufacturing Inventory Cost Variance for TSUB1 6383 t WO f admin f 12499 f 2010-11-04 15:58:40.633268-04 2010-11-04 6152 86 W/O 50213-1 -1 -1.10 Post Setup Time Standard Paint Operation/ to Work Order 6385 t WO f admin f 12498 f 2010-11-04 15:58:40.633268-04 2010-11-04 6152 94 W/O 50213-1 -1 1.10 Post Setup Time Standard Paint Operation/ to Work Order 6385 t WO f admin f 12501 f 2010-11-04 15:58:40.633268-04 2010-11-04 6153 86 W/O 50213-1 -1 -22.00 Post Run Time Standard Paint Operation/ to Work Order 6386 t WO f admin f 12500 f 2010-11-04 15:58:40.633268-04 2010-11-04 6153 94 W/O 50213-1 -1 22.00 Post Run Time Standard Paint Operation/ to Work Order 6386 t WO f admin f 12503 f 2010-11-04 15:58:40.633268-04 2010-11-04 6154 86 W/O 50213-1 -1 -2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 6387 t WO f admin f 12502 f 2010-11-04 15:58:40.633268-04 2010-11-04 6154 94 W/O 50213-1 -1 2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 6387 t WO f admin f 12505 f 2010-11-04 15:58:40.633268-04 2010-11-04 6155 86 W/O 50213-1 -1 -5.50 Post Run Time Standard Operation - Assembly/ to Work Order 6388 t WO f admin f 12504 f 2010-11-04 15:58:40.633268-04 2010-11-04 6155 94 W/O 50213-1 -1 5.50 Post Run Time Standard Operation - Assembly/ to Work Order 6388 t WO f admin f 12507 f 2010-11-04 15:58:40.633268-04 2010-11-04 6156 86 W/O 50213-1 -1 -0.44 Post Setup Time SHIPPING/ to Work Order 6389 t WO f admin f 12506 f 2010-11-04 15:58:40.633268-04 2010-11-04 6156 94 W/O 50213-1 -1 0.44 Post Setup Time SHIPPING/ to Work Order 6389 t WO f admin f 12509 f 2010-11-04 15:58:40.633268-04 2010-11-04 6157 86 W/O 50213-1 -1 -2.20 Post Run Time SHIPPING/ to Work Order 6390 t WO f admin f 12508 f 2010-11-04 15:58:40.633268-04 2010-11-04 6157 94 W/O 50213-1 -1 2.20 Post Run Time SHIPPING/ to Work Order 6390 t WO f admin f 12511 f 2010-11-04 15:58:40.633268-04 2010-11-04 6158 86 W/O 50213-1 4068 -100.00 Material TBODY1 Issue to Work Order 6391 t WO f admin f 12510 f 2010-11-04 15:58:40.633268-04 2010-11-04 6158 138 W/O 50213-1 4068 100.00 Material TBODY1 Issue to Work Order 6391 t WO f admin f 12513 f 2010-11-04 15:58:40.633268-04 2010-11-04 6159 86 W/O 50213-1 4069 -0.80 Material YPAINT1 Issue to Work Order 6392 t WO f admin f 12512 f 2010-11-04 15:58:40.633268-04 2010-11-04 6159 138 W/O 50213-1 4069 0.80 Material YPAINT1 Issue to Work Order 6392 t WO f admin f 12514 f 2010-11-04 15:58:40.633268-04 2010-11-04 6160 138 W/O 50213-1 4070 40.00 Material TWHEEL1 Issue to Work Order 6393 t WO f admin f 12518 f 2010-11-04 15:58:40.633268-04 2010-11-04 6162 86 W/O 50213-1 4072 256.34 Receive Inventory YTRUCK1 from Manufacturing 6395 t WO f admin f 12519 f 2010-11-04 15:58:40.633268-04 2010-11-04 6162 85 W/O 50213-1 4072 -256.34 Receive Inventory YTRUCK1 from Manufacturing 6395 t WO f admin f 12515 f 2010-11-04 15:58:40.633268-04 2010-11-04 6160 86 W/O 50213-1 4070 -40.00 Material TWHEEL1 Issue to Work Order 6393 t WO f admin f 12517 f 2010-11-04 15:58:40.633268-04 2010-11-04 6161 86 W/O 50213-1 4071 -82.10 Material TSUB1 Issue to Work Order 6394 t WO f admin f 12516 f 2010-11-04 15:58:40.633268-04 2010-11-04 6161 138 W/O 50213-1 4071 82.10 Material TSUB1 Issue to Work Order 6394 t WO f admin f 12521 f 2010-11-04 16:22:27.467294-04 2010-11-04 6163 96 S/R 50213-1 4074 -256.34 Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD 6398 t SO f admin f 12520 f 2010-11-04 16:22:27.467294-04 2010-11-04 6163 85 S/R 50213-1 4074 256.34 Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD 6398 t SO f admin f 12523 f 2010-11-04 16:25:21.096253-04 2010-11-04 6164 108 S/R 60077 -1 -256.34 Ship Order 50213 for Customer Xtreme Toys LTD 6399 t SH f admin f 12522 f 2010-11-04 16:25:21.096253-04 2010-11-04 6164 96 S/R 60077 -1 256.34 Ship Order 50213 for Customer Xtreme Toys LTD 6399 t SH f admin f 12525 f 2010-11-04 16:26:33.020254-04 2010-11-04 6165 122 A/R 60101 \N 350.00 Xtreme Toys LTD 6400 t IN f admin f 12524 f 2010-11-04 16:26:33.020254-04 2010-11-04 6165 106 A/R 60101 \N -1383.06 Xtreme Toys LTD 6400 t IN f admin f 12526 f 2010-11-04 16:26:33.020254-04 2010-11-04 6165 141 A/R 60101 \N 1033.06 Xtreme Toys LTD 6400 t IN f admin f 12528 f 2010-11-04 16:40:51.558991-04 2010-11-04 6166 106 A/R 60102 \N -10000.00 Tremendous Toys Incorporated 6401 t IN f admin f 12527 f 2010-11-04 16:40:51.558991-04 2010-11-04 6166 103 A/R 60102 \N 10000.00 Tremendous Toys Incorporated 6401 t IN f admin f 12530 f 2010-11-04 16:42:44.344781-04 2010-11-04 6168 106 A/R 20030 \N 200.00 Tremendous Toys Incorporated Discount Credit from C-32123 6402 t CM f admin f 12529 f 2010-11-04 16:42:44.344781-04 2010-11-04 6168 157 A/R 20030 \N -200.00 Tremendous Toys Incorporated Discount Credit from C-32123 6402 t CM f admin f 12531 f 2010-11-04 16:42:44.344781-04 2010-11-04 6169 133 A/R 20031 428 20200.00 Unapplied from C-32123 6402 t CD f admin f 12532 f 2010-11-04 16:42:44.344781-04 2010-11-04 6169 123 A/R 20031 428 -20200.00 Unapplied from C-32123 6402 t CD f admin f 12535 f 2010-11-04 16:42:44.344781-04 2010-11-04 6167 106 A/R I-60102 \N 9800.00 TTOYS-Tremendous Toys Incorporated 6402 t CR f admin f 12533 f 2010-11-04 16:42:44.344781-04 2010-11-04 6167 123 A/R Unapplied from C-32123 \N 20200.00 TTOYS-Tremendous Toys Incorporated 6402 t CR f admin f 12536 f 2010-11-04 16:49:28.278933-04 2010-11-04 6171 106 A/R 20032 \N 27.65 Xtreme Toys LTD Discount Credit from C-12311 6403 t CM f admin f 12537 f 2010-11-04 16:49:28.278933-04 2010-11-04 6171 157 A/R 20032 \N -27.65 Xtreme Toys LTD Discount Credit from C-12311 6403 t CM f admin f 12538 f 2010-11-04 16:49:28.278933-04 2010-11-04 6172 133 A/R 20033 430 27.65 Unapplied from C-12311 6403 t CD f admin f 12539 f 2010-11-04 16:49:28.278933-04 2010-11-04 6172 123 A/R 20033 430 -27.65 Unapplied from C-12311 6403 t CD f admin f 12541 f 2010-11-04 16:49:28.278933-04 2010-11-04 6170 127 A/R C-12311 \N -1383.06 XTRM-Xtreme Toys LTD 6403 t CR f admin f 12540 f 2010-11-04 16:49:28.278933-04 2010-11-04 6170 106 A/R I-60101 \N 1355.41 XTRM-Xtreme Toys LTD 6403 t CR f admin f 12542 f 2010-11-04 16:49:28.278933-04 2010-11-04 6170 123 A/R Unapplied from C-12311 \N 27.65 XTRM-Xtreme Toys LTD 6403 t CR f admin f 12544 f 2010-11-12 16:18:16.143669-05 2010-11-12 6173 106 A/R 60103 \N -64800.00 Xtreme Toys LTD 6404 t IN f admin f 12543 f 2010-11-12 16:18:16.143669-05 2010-11-12 6173 140 A/R 60103 \N 64800.00 Xtreme Toys LTD 6404 t IN f admin f 12545 f 2010-12-30 16:16:48.482665-05 2010-12-30 6174 106 A/R I-60096 \N 99000.00 TTOYS-Tremendous Toys Incorporated 6405 t CR f admin f 12548 f 2010-12-30 16:17:43.470439-05 2010-12-30 6175 127 A/R C- \N -64800.00 XTRM-Xtreme Toys LTD 6406 t CR f admin f 12547 f 2010-12-30 16:17:43.470439-05 2010-12-30 6175 106 A/R I-60103 \N 64800.00 XTRM-Xtreme Toys LTD 6406 t CR f admin f 12550 f 2010-12-30 16:23:42.534182-05 2010-12-30 6176 106 A/R 60104 \N -11664.00 Xtreme Toys LTD 6407 t IN f admin f 12549 f 2010-12-30 16:23:42.534182-05 2010-12-30 6176 140 A/R 60104 \N 11664.00 Xtreme Toys LTD 6407 t IN f admin f 12551 f 2010-12-30 16:26:20.151456-05 2010-12-30 6177 95 S/R 20102-1 4075 22000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6408 t PO f admin f 12552 f 2010-12-30 16:26:20.151456-05 2010-12-30 6177 85 S/R 20102-1 4075 -22000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6408 t PO f admin f 12554 f 2010-12-30 16:26:20.151456-05 2010-12-30 6178 96 S/R 50214-1 4076 -22000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6410 t SO f admin f 12553 f 2010-12-30 16:26:20.151456-05 2010-12-30 6178 85 S/R 50214-1 4076 22000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6410 t SO f admin f 12556 f 2010-12-30 16:26:20.151456-05 2010-12-30 6179 108 S/R 60078 -1 -22000.00 Ship Order 50214 for Customer Tremendous Toys Incorporated 6411 t SH f admin f 12555 f 2010-12-30 16:26:20.151456-05 2010-12-30 6179 96 S/R 60078 -1 22000.00 Ship Order 50214 for Customer Tremendous Toys Incorporated 6411 t SH f admin f 12558 f 2010-12-30 16:28:06.006258-05 2010-11-04 6180 106 A/R 60106 \N -123750.00 Tremendous Toys Incorporated 6412 t IN f admin f 12557 f 2010-12-30 16:28:06.006258-05 2010-11-04 6180 103 A/R 60106 \N 123750.00 Tremendous Toys Incorporated 6412 t IN f admin f 12560 f 2010-12-30 16:28:26.778775-05 2010-12-30 6181 106 A/R 60105 \N -49500.00 Tremendous Toys Incorporated 6413 t IN f admin f 12559 f 2010-12-30 16:28:26.778775-05 2010-12-30 6181 103 A/R 60105 \N 49500.00 Tremendous Toys Incorporated 6413 t IN f admin f 12562 f 2010-12-30 16:31:23.589783-05 2010-12-30 6182 99 A/P 30112 \N 22500.00 DMFG-Diamond Manufacturing MA1001 6414 t VO f admin f 12563 f 2010-12-30 16:31:23.589783-05 2010-12-30 6182 95 A/P 30112 \N -22000.00 DMFG-Diamond Manufacturing MA1001 6414 t VO f admin f 12561 f 2010-12-30 16:31:23.589783-05 2010-12-30 6182 139 A/P 30112 \N -500.00 DMFG-Diamond Manufacturing MA1001 6414 t VO f admin f 12564 f 2010-12-30 16:41:28.105481-05 2010-12-30 6183 99 A/P 30113 \N 456.05 ADMIN-Admin T&E Sheet 1000 6415 t VO f admin f 12565 f 2010-12-30 16:41:28.105481-05 2010-12-30 6183 159 A/P 30113 \N -456.05 ADMIN-Admin T&E Sheet 1000 6415 t VO f admin f 12566 f 2010-12-30 16:42:20.823459-05 2010-12-30 6184 106 A/R 60107 \N -3606.05 Tremendous Toys Incorporated 6416 t IN f admin f 12567 f 2010-12-30 16:42:20.823459-05 2010-12-30 6184 140 A/R 60107 \N 3606.05 Tremendous Toys Incorporated 6416 t IN f admin f 11534 f 2009-09-25 09:34:26.105368-04 2009-09-25 5703 109 A/R C-101002 \N -50.00 TTOYS-Tremendous Toys Incorporated 5847 t CR t jsmith f 11988 f 2010-03-10 16:40:26.082405-05 2010-03-10 5916 109 A/R C-12343388 \N -48510.00 TTOYS-Tremendous Toys Incorporated 6105 t CR t admin f 11992 f 2010-03-10 16:44:50.433817-05 2010-03-10 5919 109 A/P 4052 197 22000.00 DMFG-Diamond Manufacturing 6108 t CK t admin f 12040 f 2010-03-12 15:09:47.012598-05 2010-03-12 5941 109 A/P -1 198 204.00 TPARTS-Toy Parts Inc. 6135 t CK t admin f 12042 f 2010-03-12 15:09:47.012598-05 2010-03-12 5943 109 A/P 4053 199 1040.00 UPS-United Parcel Service 6135 t CK t admin f 12060 f 2010-03-12 15:12:43.625553-05 2010-03-12 5949 109 A/R C-3423423 \N -11292.25 TTOYS-Tremendous Toys Incorporated 6143 t CR t admin f 12065 f 2010-03-12 15:16:24.722428-05 2010-02-10 5951 109 G/L Receive Product \N 50000.00 Cash Payment 6144 t ST t admin f 12069 f 2010-03-12 15:16:37.619518-05 2010-02-10 5952 109 G/L Ship Order \N -77250.00 6145 t ST t admin f 12075 f 2010-03-12 15:18:05.292854-05 2010-01-15 5954 109 G/L Receive Product \N 50000.00 Cash Payment 6148 t ST t admin f 12079 f 2010-03-12 15:18:16.323198-05 2010-01-15 5955 109 G/L Ship Order \N -77250.00 6149 t ST t admin f 12084 f 2010-03-12 15:21:22.084915-05 2010-03-12 5957 109 A/R C-4234 \N -2025.00 TTOYS-Tremendous Toys Incorporated 6151 t CR t admin f 12100 f 2010-03-12 15:37:44.606151-05 2010-03-12 5964 109 A/P -1 200 91.82 TPARTS-Toy Parts Inc. 6161 t CK t admin f 11975 f 2010-01-06 15:02:04.06481-05 2010-01-06 5910 109 A/P -1 196 122.50 TPARTS-Toy Parts Inc. 6096 t CK t admin f 12112 f 2010-04-02 10:36:25.985539-04 2010-04-02 5971 109 A/P 4054 201 22000.00 DMFG-Diamond Manufacturing 6171 t CK t admin f 12122 f 2010-05-03 13:25:49.913457-04 2010-04-03 5974 109 G/L Receive Product \N 50000.00 Cash Payment 6173 t ST t admin f 12126 f 2010-05-03 13:26:17.456656-04 2010-04-03 5975 109 G/L Ship Order \N -77250.00 6174 t ST t admin f 12132 f 2010-05-03 13:26:43.299174-04 2010-05-03 5976 109 G/L Receive Product \N 50000.00 Cash Payment 6175 t ST t admin f 12137 f 2010-05-03 13:28:17.34719-04 2010-05-03 5977 109 G/L Ship Order \N -80000.00 6176 t ST t admin f 12156 f 2010-06-07 11:01:34.008031-04 2010-06-07 5985 109 A/P -1 205 98.00 TPARTS-Toy Parts Inc. 6188 t CK t admin f 12158 f 2010-06-07 11:01:34.008031-04 2010-06-07 5987 109 A/P 4055 203 47500.00 DMFG-Diamond Manufacturing 6188 t CK t admin f 12161 f 2010-06-07 11:01:34.008031-04 2010-06-07 5988 109 A/P 4056 202 980.00 WCHEM-World Chem, Inc. 6188 t CK t admin f 12266 f 2010-09-07 16:15:36.062578-04 2010-09-07 6044 109 A/R C-123112 \N -99000.00 TTOYS-Tremendous Toys Incorporated 6254 t CR t admin f 12274 f 2010-09-07 16:24:13.762337-04 2010-09-07 6048 109 A/P -1 206 14300.00 TPARTS-Toy Parts Inc. 6262 t CK t admin f 12277 f 2010-09-07 16:24:13.762337-04 2010-09-07 6049 109 A/P 4057 207 1000.00 ICHROME-International Chrome Technologies 6262 t CK t admin f 12279 f 2010-09-07 16:24:13.762337-04 2010-09-07 6050 109 A/P 4058 208 1930.00 UPS-United Parcel Service 6262 t CK t admin f 12305 f 2010-09-07 16:46:21.229877-04 2010-07-29 6062 109 A/R C-543433 \N -148500.00 TTOYS-Tremendous Toys Incorporated 6276 t CR t admin f 12311 f 2010-09-07 16:47:32.014347-04 2010-08-30 6065 109 A/R C-321322 \N -198000.00 TTOYS-Tremendous Toys Incorporated 6278 t CR t admin f 12318 f 2010-09-07 16:51:04.601423-04 2010-09-07 6070 109 A/P 4059 209 154000.00 DMFG-Diamond Manufacturing 6283 t CK t admin f 12339 f 2010-09-08 13:23:22.509549-04 2010-08-15 6079 109 A/R C-1231231 \N -52937.50 TTOYS-Tremendous Toys Incorporated 6293 t CR t admin f 12357 f 2010-09-08 13:40:20.763711-04 2010-09-08 6086 109 A/P -1 211 17783.08 TPARTS-Toy Parts Inc. 6306 t CK t admin f 12344 f 2010-09-08 13:27:27.759862-04 2010-08-30 6081 109 A/P -1 210 15600.00 TPARTS-Toy Parts Inc. 6297 t CK t admin f 12534 f 2010-11-04 16:42:44.344781-04 2010-11-04 6167 109 A/R C-32123 \N -30000.00 TTOYS-Tremendous Toys Incorporated 6402 t CR t admin f 12546 f 2010-12-30 16:16:48.482665-05 2010-12-30 6174 109 A/R W-423433 \N -99000.00 TTOYS-Tremendous Toys Incorporated 6405 t CR t admin f 12569 f 2011-03-07 15:10:05.571549-05 2011-03-07 6185 133 A/R R -1 -20200.00 20031 6417 t CD f admin f 12568 f 2011-03-07 15:10:05.571549-05 2011-03-07 6185 106 A/R R -1 20200.00 20031 6417 t CD f admin f 12571 f 2011-03-07 15:10:57.799551-05 2011-03-07 6186 133 A/R R -1 -27.65 20033 6418 t CD f admin f 12570 f 2011-03-07 15:10:57.799551-05 2011-03-07 6186 106 A/R R -1 27.65 20033 6418 t CD f admin f 12574 f 2011-03-07 15:21:13.298798-05 2011-01-01 6187 106 A/R 60108 \N -105000.00 Tremendous Toys Incorporated 6419 t IN f admin f 12573 f 2011-03-07 15:21:13.298798-05 2011-01-01 6187 102 A/R 60108 \N 5000.00 Tremendous Toys Incorporated 6419 t IN f admin f 12572 f 2011-03-07 15:21:13.298798-05 2011-01-01 6187 103 A/R 60108 \N 100000.00 Tremendous Toys Incorporated 6419 t IN f admin f 12576 f 2011-03-07 15:22:39.989779-05 2011-02-01 6188 106 A/R 60109 \N -103350.00 Xtreme Toys LTD 6420 t IN f admin f 12575 f 2011-03-07 15:22:39.989779-05 2011-02-01 6188 140 A/R 60109 \N 103350.00 Xtreme Toys LTD 6420 t IN f admin f 12577 f 2011-03-07 15:24:33.671441-05 2011-03-07 6190 133 A/R 20034 438 21450.00 Unapplied from W-123112 6421 t CD f admin f 12578 f 2011-03-07 15:24:33.671441-05 2011-03-07 6190 123 A/R 20034 438 -21450.00 Unapplied from W-123112 6421 t CD f admin f 12581 f 2011-03-07 15:24:33.671441-05 2011-03-07 6189 109 A/R W-123112 \N -125000.00 TTOYS-Tremendous Toys Incorporated 6421 t CR f admin f 12579 f 2011-03-07 15:24:33.671441-05 2011-03-07 6189 106 A/R I-60106 \N 103550.00 TTOYS-Tremendous Toys Incorporated 6421 t CR f admin f 12580 f 2011-03-07 15:24:33.671441-05 2011-03-07 6189 123 A/R Unapplied from W-123112 \N 21450.00 TTOYS-Tremendous Toys Incorporated 6421 t CR f admin f 12582 f 2011-03-07 15:27:57.479016-05 2011-03-07 6191 117 A/R I-60104 \N -71.83 XTRM-Xtreme Toys LTD 6422 t CR f admin f 12584 f 2011-03-07 15:27:57.479016-05 2011-03-07 6191 117 A/R I-60109 \N 856.34 XTRM-Xtreme Toys LTD 6422 t CR f admin f 12583 f 2011-03-07 15:27:57.479016-05 2011-03-07 6191 127 A/R W-123112 \N -80500.00 XTRM-Xtreme Toys LTD 6422 t CR f admin f 12585 f 2011-03-07 15:27:57.479016-05 2011-03-07 6191 106 A/R I-60104 \N 11636.35 XTRM-Xtreme Toys LTD 6422 t CR f admin f 12586 f 2011-03-07 15:27:57.479016-05 2011-03-07 6191 106 A/R I-60109 \N 68079.14 XTRM-Xtreme Toys LTD 6422 t CR f admin f 12589 f 2011-03-07 15:31:59.358339-05 2011-03-07 6193 95 S/R 20103-1 4078 110000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6425 t PO f admin f 12590 f 2011-03-07 15:31:59.358339-05 2011-03-07 6193 85 S/R 20103-1 4078 -110000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6425 t PO f admin f 12592 f 2011-03-07 15:31:59.358339-05 2011-03-07 6194 96 S/R 50215-1 4079 -110000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6427 t SO f admin f 12591 f 2011-03-07 15:31:59.358339-05 2011-03-07 6194 85 S/R 50215-1 4079 110000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6427 t SO f admin f 12594 f 2011-03-07 15:31:59.358339-05 2011-03-07 6195 108 S/R 60080 -1 -110000.00 Ship Order 50215 for Customer Tremendous Toys Incorporated 6428 t SH f admin f 12593 f 2011-03-07 15:31:59.358339-05 2011-03-07 6195 96 S/R 60080 -1 110000.00 Ship Order 50215 for Customer Tremendous Toys Incorporated 6428 t SH f admin f 12595 f 2011-03-07 15:36:01.283334-05 2011-03-07 6196 122 A/R 60110 \N 1500.00 Tremendous Toys Incorporated 6429 t IN f admin f 12596 f 2011-03-07 15:36:01.283334-05 2011-03-07 6196 106 A/R 60110 \N -261375.00 Tremendous Toys Incorporated 6429 t IN f admin f 12598 f 2011-03-07 15:36:01.283334-05 2011-03-07 6196 102 A/R 60110 \N 12375.00 Tremendous Toys Incorporated 6429 t IN f admin f 12597 f 2011-03-07 15:36:01.283334-05 2011-03-07 6196 103 A/R 60110 \N 247500.00 Tremendous Toys Incorporated 6429 t IN f admin f 12601 f 2011-03-07 15:38:01.421892-05 2011-03-07 6198 106 A/R 20035 \N 344.77 Tremendous Toys Incorporated Discount Credit from W-989182 6430 t CM f admin f 12599 f 2011-03-07 15:38:01.421892-05 2011-03-07 6198 102 A/R 20035 \N -16.32 Tremendous Toys Incorporated Discount Credit from W-989182 6430 t CM f admin f 12600 f 2011-03-07 15:38:01.421892-05 2011-03-07 6198 157 A/R 20035 \N -328.45 Tremendous Toys Incorporated Discount Credit from W-989182 6430 t CM f admin f 12606 f 2011-03-07 15:38:01.421892-05 2011-03-07 6197 109 A/R W-989182 \N -175000.00 TTOYS-Tremendous Toys Incorporated 6430 t CR f admin f 12602 f 2011-03-07 15:38:01.421892-05 2011-03-07 6197 106 A/R I-60107 \N 3606.05 TTOYS-Tremendous Toys Incorporated 6430 t CR f admin f 12603 f 2011-03-07 15:38:01.421892-05 2011-03-07 6197 106 A/R I-60105 \N 49500.00 TTOYS-Tremendous Toys Incorporated 6430 t CR f admin f 12604 f 2011-03-07 15:38:01.421892-05 2011-03-07 6197 106 A/R I-60108 \N 105000.00 TTOYS-Tremendous Toys Incorporated 6430 t CR f admin f 12605 f 2011-03-07 15:38:01.421892-05 2011-03-07 6197 106 A/R I-60110 \N 16893.95 TTOYS-Tremendous Toys Incorporated 6430 t CR f admin f 12609 f 2011-03-07 15:49:20.523186-05 2011-03-07 6199 99 A/P 30116 \N 1074.00 UPS-United Parcel Service 6431 t VO f admin f 12607 f 2011-03-07 15:49:20.523186-05 2011-03-07 6199 139 A/P 30116 \N -85.00 UPS-United Parcel Service 6431 t VO f admin f 12608 f 2011-03-07 15:49:20.523186-05 2011-03-07 6199 120 A/P 30116 \N -989.00 UPS-United Parcel Service 6431 t VO f admin f 12611 f 2011-03-07 15:49:25.252721-05 2011-03-07 6200 99 A/P 30114 \N 110000.00 DMFG-Diamond Manufacturing 6432 t VO f admin f 12610 f 2011-03-07 15:49:25.252721-05 2011-03-07 6200 95 A/P 30114 \N -110000.00 DMFG-Diamond Manufacturing 6432 t VO f admin f 12613 f 2011-03-07 15:53:04.36273-05 2011-03-07 6201 99 A/P 4062 217 -456.05 ADMIN-Admin 6436 t CK f admin f 12612 f 2011-03-07 15:53:04.36273-05 2011-03-07 6201 109 A/P 4062 217 456.05 ADMIN-Admin 6436 t CK f admin f 12630 f 2011-04-18 07:44:56.364535-04 2011-04-18 6209 108 S/R 60081 -1 -2200.00 Ship Order 50211 for Customer Xtreme Toys LTD 6443 t SH f admin f 12629 f 2011-04-18 07:44:56.364535-04 2011-04-18 6209 96 S/R 60081 -1 2200.00 Ship Order 50211 for Customer Xtreme Toys LTD 6443 t SH f admin f 12615 f 2011-03-07 15:53:04.36273-05 2011-03-07 6202 109 A/P 4063 216 132500.00 DMFG-Diamond Manufacturing 6436 t CK f admin f 12614 f 2011-03-07 15:53:04.36273-05 2011-03-07 6202 99 A/P 4063 216 -132500.00 DMFG-Diamond Manufacturing 6436 t CK f admin f 12617 f 2011-03-07 15:53:04.36273-05 2011-03-07 6203 99 A/P 4064 215 -1074.00 UPS-United Parcel Service 6436 t CK f admin f 12616 f 2011-03-07 15:53:04.36273-05 2011-03-07 6203 109 A/P 4064 215 1074.00 UPS-United Parcel Service 6436 t CK f admin f 12619 f 2011-04-18 07:19:25.721838-04 2011-04-18 6204 133 A/R R -1 -21450.00 20034 6437 t CD f admin f 12618 f 2011-04-18 07:19:25.721838-04 2011-04-18 6204 106 A/R R -1 21450.00 20034 6437 t CD f admin f 12620 f 2011-04-18 07:20:22.179731-04 2011-04-18 6205 109 A/R W-387871 \N -222686.28 TTOYS-Tremendous Toys Incorporated 6438 t CR f admin f 12621 f 2011-04-18 07:20:22.179731-04 2011-04-18 6205 106 A/R I-60110 \N 222686.28 TTOYS-Tremendous Toys Incorporated 6438 t CR f admin f 12622 f 2011-04-18 07:21:22.808598-04 2011-04-18 6206 117 A/R I-60109 \N 443.66 XTRM-Xtreme Toys LTD 6439 t CR f admin f 12623 f 2011-04-18 07:21:22.808598-04 2011-04-18 6206 127 A/R W-42323 \N -35714.52 XTRM-Xtreme Toys LTD 6439 t CR f admin f 12624 f 2011-04-18 07:21:22.808598-04 2011-04-18 6206 106 A/R I-60109 \N 35270.86 XTRM-Xtreme Toys LTD 6439 t CR f admin f 12625 f 2011-04-18 07:44:56.364535-04 2011-04-18 6207 95 S/R 20097-1 4080 2200.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6440 t PO f admin f 12626 f 2011-04-18 07:44:56.364535-04 2011-04-18 6207 85 S/R 20097-1 4080 -2200.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6440 t PO f admin f 12628 f 2011-04-18 07:44:56.364535-04 2011-04-18 6208 96 S/R 50211-1 4081 -2200.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6442 t SO f admin f 12627 f 2011-04-18 07:44:56.364535-04 2011-04-18 6208 85 S/R 50211-1 4081 2200.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6442 t SO f admin f 12640 f 2011-04-18 07:57:06.867873-04 2011-04-18 6214 86 W/O 10080-2 -1 -58.67 Post Run Time Prepare for Outside Processing/ to Work Order 6449 t WO f admin f 12639 f 2011-04-18 07:57:06.867873-04 2011-04-18 6214 94 W/O 10080-2 -1 58.67 Post Run Time Prepare for Outside Processing/ to Work Order 6449 t WO f admin f 12637 f 2011-04-18 07:56:05.973694-04 2011-04-18 6213 95 S/R 20106 -1 400.00 Receive Non-Controlled Inventory from P/O for International Chrome Technologies for item CHROMING 6448 t PO f admin f 12638 f 2011-04-18 07:56:05.973694-04 2011-04-18 6213 158 S/R 20106 -1 -400.00 Receive Non-Controlled Inventory from P/O for International Chrome Technologies for item CHROMING 6448 t PO f admin f 12642 f 2011-04-18 07:57:06.867873-04 2011-04-18 6215 86 W/O 10080-2 -1 -73.33 Post Run Time Receive From Outside Processing/ to Work Order 6450 t WO f admin f 12641 f 2011-04-18 07:57:06.867873-04 2011-04-18 6215 94 W/O 10080-2 -1 73.33 Post Run Time Receive From Outside Processing/ to Work Order 6450 t WO f admin f 12644 f 2011-04-18 07:57:06.867873-04 2011-04-18 6216 86 W/O 10080-2 4084 -400.00 Material RBUMP1 Issue to Work Order 6451 t WO f admin f 12643 f 2011-04-18 07:57:06.867873-04 2011-04-18 6216 138 W/O 10080-2 4084 400.00 Material RBUMP1 Issue to Work Order 6451 t WO f admin f 12645 f 2011-04-18 07:57:06.867873-04 2011-04-18 6217 86 W/O 10080-2 4085 932.00 Receive Inventory CBUMP from Manufacturing 6452 t WO f admin f 12646 f 2011-04-18 07:57:06.867873-04 2011-04-18 6217 138 W/O 10080-2 4085 -932.00 Receive Inventory CBUMP from Manufacturing 6452 t WO f admin f 12647 f 2011-04-18 07:57:20.790729-04 2011-04-18 6218 86 W/O 10080-2 -1 -400.00 Manufacturing Inventory Cost Variance for CBUMP 6453 t WO f admin f 12648 f 2011-04-18 07:57:20.790729-04 2011-04-18 6218 87 W/O 10080-2 -1 400.00 Manufacturing Inventory Cost Variance for CBUMP 6453 t WO f admin f 12650 f 2011-04-18 07:57:33.949275-04 2011-04-18 6219 86 W/O 10082-1 -1 -1.10 Post Setup Time Standard Paint Operation/ to Work Order 6455 t WO f admin f 12649 f 2011-04-18 07:57:33.949275-04 2011-04-18 6219 94 W/O 10082-1 -1 1.10 Post Setup Time Standard Paint Operation/ to Work Order 6455 t WO f admin f 12652 f 2011-04-18 07:57:33.949275-04 2011-04-18 6220 86 W/O 10082-1 -1 -220.00 Post Run Time Standard Paint Operation/ to Work Order 6456 t WO f admin f 12651 f 2011-04-18 07:57:33.949275-04 2011-04-18 6220 94 W/O 10082-1 -1 220.00 Post Run Time Standard Paint Operation/ to Work Order 6456 t WO f admin f 12654 f 2011-04-18 07:57:33.949275-04 2011-04-18 6221 86 W/O 10082-1 -1 -2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 6457 t WO f admin f 12653 f 2011-04-18 07:57:33.949275-04 2011-04-18 6221 94 W/O 10082-1 -1 2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 6457 t WO f admin f 12656 f 2011-04-18 07:57:33.949275-04 2011-04-18 6222 86 W/O 10082-1 -1 -55.00 Post Run Time Standard Operation - Assembly/ to Work Order 6458 t WO f admin f 12655 f 2011-04-18 07:57:33.949275-04 2011-04-18 6222 94 W/O 10082-1 -1 55.00 Post Run Time Standard Operation - Assembly/ to Work Order 6458 t WO f admin f 12658 f 2011-04-18 07:57:33.949275-04 2011-04-18 6223 86 W/O 10082-1 -1 -0.44 Post Setup Time SHIPPING/ to Work Order 6459 t WO f admin f 12657 f 2011-04-18 07:57:33.949275-04 2011-04-18 6223 94 W/O 10082-1 -1 0.44 Post Setup Time SHIPPING/ to Work Order 6459 t WO f admin f 12660 f 2011-04-18 07:57:33.949275-04 2011-04-18 6224 86 W/O 10082-1 -1 -22.00 Post Run Time SHIPPING/ to Work Order 6460 t WO f admin f 12659 f 2011-04-18 07:57:33.949275-04 2011-04-18 6224 94 W/O 10082-1 -1 22.00 Post Run Time SHIPPING/ to Work Order 6460 t WO f admin f 12673 f 2011-04-18 07:57:33.949275-04 2011-04-18 6231 86 W/O 10082-1 4092 8298.20 Receive Inventory STOCKCAR1 from Manufacturing 6467 t WO f admin f 12674 f 2011-04-18 07:57:33.949275-04 2011-04-18 6231 85 W/O 10082-1 4092 -8298.20 Receive Inventory STOCKCAR1 from Manufacturing 6467 t WO f admin f 12662 f 2011-04-18 07:57:33.949275-04 2011-04-18 6225 86 W/O 10082-1 4086 -8.00 Material YPAINT1 Issue to Work Order 6461 t WO f admin f 12661 f 2011-04-18 07:57:33.949275-04 2011-04-18 6225 138 W/O 10082-1 4086 8.00 Material YPAINT1 Issue to Work Order 6461 t WO f admin f 12664 f 2011-04-18 07:57:33.949275-04 2011-04-18 6226 86 W/O 10082-1 4087 -250.00 Material CBODY1 Issue to Work Order 6462 t WO f admin f 12663 f 2011-04-18 07:57:33.949275-04 2011-04-18 6226 138 W/O 10082-1 4087 250.00 Material CBODY1 Issue to Work Order 6462 t WO f admin f 12666 f 2011-04-18 07:57:33.949275-04 2011-04-18 6227 86 W/O 10082-1 4088 -400.00 Material TWHEEL1 Issue to Work Order 6463 t WO f admin f 12665 f 2011-04-18 07:57:33.949275-04 2011-04-18 6227 138 W/O 10082-1 4088 400.00 Material TWHEEL1 Issue to Work Order 6463 t WO f admin f 12668 f 2011-04-18 07:57:33.949275-04 2011-04-18 6228 86 W/O 10082-1 4089 -2330.00 Material CBUMP Issue to Work Order 6464 t WO f admin f 12667 f 2011-04-18 07:57:33.949275-04 2011-04-18 6228 138 W/O 10082-1 4089 2330.00 Material CBUMP Issue to Work Order 6464 t WO f admin f 12670 f 2011-04-18 07:57:33.949275-04 2011-04-18 6229 86 W/O 10082-1 4090 -821.00 Material TSUB2 Issue to Work Order 6465 t WO f admin f 12669 f 2011-04-18 07:57:33.949275-04 2011-04-18 6229 138 W/O 10082-1 4090 821.00 Material TSUB2 Issue to Work Order 6465 t WO f admin f 12672 f 2011-04-18 07:57:33.949275-04 2011-04-18 6230 86 W/O 10082-1 4091 -4154.80 Material HUB1 Issue to Work Order 6466 t WO f admin f 12671 f 2011-04-18 07:57:33.949275-04 2011-04-18 6230 138 W/O 10082-1 4091 4154.80 Material HUB1 Issue to Work Order 6466 t WO f admin f 12676 f 2011-04-18 07:59:26.856376-04 2011-04-18 6232 86 W/O 10082-2 -1 -146.67 Post Run Time Prepare for Outside Processing/ to Work Order 6468 t WO f admin f 12675 f 2011-04-18 07:59:26.856376-04 2011-04-18 6232 94 W/O 10082-2 -1 146.67 Post Run Time Prepare for Outside Processing/ to Work Order 6468 t WO f admin f 12678 f 2011-04-18 07:59:26.856376-04 2011-04-18 6233 86 W/O 10082-2 -1 -183.33 Post Run Time Receive From Outside Processing/ to Work Order 6469 t WO f admin f 12677 f 2011-04-18 07:59:26.856376-04 2011-04-18 6233 94 W/O 10082-2 -1 183.33 Post Run Time Receive From Outside Processing/ to Work Order 6469 t WO f admin f 12680 f 2011-04-18 07:59:26.856376-04 2011-04-18 6234 86 W/O 10082-2 4093 -1000.00 Material RBUMP1 Issue to Work Order 6470 t WO f admin f 12679 f 2011-04-18 07:59:26.856376-04 2011-04-18 6234 138 W/O 10082-2 4093 1000.00 Material RBUMP1 Issue to Work Order 6470 t WO f admin f 12681 f 2011-04-18 07:59:26.856376-04 2011-04-18 6235 86 W/O 10082-2 4094 2330.00 Receive Inventory CBUMP from Manufacturing 6471 t WO f admin f 12682 f 2011-04-18 07:59:26.856376-04 2011-04-18 6235 138 W/O 10082-2 4094 -2330.00 Receive Inventory CBUMP from Manufacturing 6471 t WO f admin f 12683 f 2011-04-18 07:59:37.156541-04 2011-04-18 6236 86 W/O 10082-2 -1 -1000.00 Manufacturing Inventory Cost Variance for CBUMP 6472 t WO f admin f 12684 f 2011-04-18 07:59:37.156541-04 2011-04-18 6236 87 W/O 10082-2 -1 1000.00 Manufacturing Inventory Cost Variance for CBUMP 6472 t WO f admin f 12685 f 2011-04-18 07:59:44.951178-04 2011-04-18 6237 86 W/O 10082-1 -1 -33.66 Manufacturing Inventory Cost Variance for STOCKCAR1 6474 t WO f admin f 12686 f 2011-04-18 07:59:44.951178-04 2011-04-18 6237 87 W/O 10082-1 -1 33.66 Manufacturing Inventory Cost Variance for STOCKCAR1 6474 t WO f admin f 12687 f 2011-04-18 08:24:17.311443-04 2011-04-18 6238 95 S/R 20104-1 4095 22000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6476 t PO f admin f 12688 f 2011-04-18 08:24:17.311443-04 2011-04-18 6238 85 S/R 20104-1 4095 -22000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6476 t PO f admin f 12690 f 2011-04-18 08:24:17.311443-04 2011-04-18 6239 96 S/R 50217-2 4096 -22000.00 Issue DTRUCK1 to Shipping for customer Vienna Collectables 6478 t SO f admin f 12689 f 2011-04-18 08:24:17.311443-04 2011-04-18 6239 85 S/R 50217-2 4096 22000.00 Issue DTRUCK1 to Shipping for customer Vienna Collectables 6478 t SO f admin f 12692 f 2011-04-18 08:24:17.311443-04 2011-04-18 6240 108 S/R 60083 -1 -22000.00 Ship Order 50217 for Customer Vienna Collectables 6479 t SH f admin f 12691 f 2011-04-18 08:24:17.311443-04 2011-04-18 6240 96 S/R 60083 -1 22000.00 Ship Order 50217 for Customer Vienna Collectables 6479 t SH f admin f 12694 f 2011-04-18 08:25:45.170942-04 2011-04-18 6241 96 S/R 50217-1 4097 -8298.20 Issue STOCKCAR1 to Shipping for customer Vienna Collectables 6480 t SO f admin f 12693 f 2011-04-18 08:25:45.170942-04 2011-04-18 6241 85 S/R 50217-1 4097 8298.20 Issue STOCKCAR1 to Shipping for customer Vienna Collectables 6480 t SO f admin f 12696 f 2011-04-18 08:26:08.828905-04 2011-04-18 6242 108 S/R 60084 -1 -8298.20 Ship Order 50217 for Customer Vienna Collectables 6481 t SH f admin f 12695 f 2011-04-18 08:26:08.828905-04 2011-04-18 6242 96 S/R 60084 -1 8298.20 Ship Order 50217 for Customer Vienna Collectables 6481 t SH f admin f 12697 f 2011-04-18 08:27:59.276572-04 2011-04-18 6243 122 A/R 60111 \N 690.00 Vienna Collectables 6482 t IN f admin f 12698 f 2011-04-18 08:27:59.276572-04 2011-04-18 6243 106 A/R 60111 \N -100690.05 Vienna Collectables 6482 t IN f admin f 12699 f 2011-04-18 08:27:59.276572-04 2011-04-18 6243 141 A/R 60111 \N 100000.05 Vienna Collectables 6482 t IN f admin f 12702 f 2011-04-18 08:28:02.888369-04 2011-04-18 6244 122 A/R 60112 \N 322.00 Xtreme Toys LTD 6483 t IN f admin f 12701 f 2011-04-18 08:28:02.888369-04 2011-04-18 6244 106 A/R 60112 \N -5460.09 Xtreme Toys LTD 6483 t IN f admin f 12700 f 2011-04-18 08:28:02.888369-04 2011-04-18 6244 141 A/R 60112 \N 5138.09 Xtreme Toys LTD 6483 t IN f admin f 12704 f 2011-04-18 08:29:37.263089-04 2011-04-18 6246 106 A/R 20036 \N 2013.81 Vienna Collectables Discount Credit from W-45233 6484 t CM f admin f 12703 f 2011-04-18 08:29:37.263089-04 2011-04-18 6246 157 A/R 20036 \N -2013.81 Vienna Collectables Discount Credit from W-45233 6484 t CM f admin f 12706 f 2011-04-18 08:29:37.263089-04 2011-04-18 6245 126 A/R W-45233 \N -98676.24 VCOL-Vienna Collectables 6484 t CR f admin f 12705 f 2011-04-18 08:29:37.263089-04 2011-04-18 6245 106 A/R I-60111 \N 98676.24 VCOL-Vienna Collectables 6484 t CR f admin f 12708 f 2011-04-18 08:30:45.693977-04 2011-04-18 6248 106 A/R 20037 \N 109.21 Xtreme Toys LTD Discount Credit from W-23433 6485 t CM f admin f 12707 f 2011-04-18 08:30:45.693977-04 2011-04-18 6248 157 A/R 20037 \N -109.21 Xtreme Toys LTD Discount Credit from W-23433 6485 t CM f admin f 12709 f 2011-04-18 08:30:45.693977-04 2011-04-18 6247 127 A/R W-23433 \N -5350.88 XTRM-Xtreme Toys LTD 6485 t CR f admin f 12710 f 2011-04-18 08:30:45.693977-04 2011-04-18 6247 106 A/R I-60112 \N 5350.88 XTRM-Xtreme Toys LTD 6485 t CR f admin f 12713 f 2011-04-18 08:34:27.781732-04 2011-04-18 6249 99 A/P 30117 \N 2400.00 DMFG-Diamond Manufacturing MA-01001 6486 t VO f admin f 12712 f 2011-04-18 08:34:27.781732-04 2011-04-18 6249 95 A/P 30117 \N -2200.00 DMFG-Diamond Manufacturing MA-01001 6486 t VO f admin f 12711 f 2011-04-18 08:34:27.781732-04 2011-04-18 6249 139 A/P 30117 \N -200.00 DMFG-Diamond Manufacturing MA-01001 6486 t VO f admin f 12715 f 2011-04-18 08:34:32.260847-04 2011-04-18 6250 99 A/P 30118 \N 400.00 ICHROME-International Chrome Technologies MA-1001 6487 t VO f admin f 12714 f 2011-04-18 08:34:32.260847-04 2011-04-18 6250 95 A/P 30118 \N -400.00 ICHROME-International Chrome Technologies MA-1001 6487 t VO f admin f 12737 f 2011-04-18 13:29:34.810123-04 2011-04-18 6261 86 W/O 10080-1 -1 -1.83 Post Setup Time Standard Paint Operation/ to Work Order 6499 t WO f admin f 12736 f 2011-04-18 13:29:34.810123-04 2011-04-18 6261 94 W/O 10080-1 -1 1.83 Post Setup Time Standard Paint Operation/ to Work Order 6499 t WO f admin f 12717 f 2011-04-18 08:35:54.767363-04 2011-04-18 6251 99 A/P 4065 219 -2400.00 DMFG-Diamond Manufacturing 6488 t CK f admin f 12716 f 2011-04-18 08:35:54.767363-04 2011-04-18 6251 109 A/P 4065 219 2400.00 DMFG-Diamond Manufacturing 6488 t CK f admin f 12719 f 2011-04-18 08:35:54.767363-04 2011-04-18 6253 101 A/P 30118 \N 8.00 Discount for V 30118 6489 t DS f admin f 12718 f 2011-04-18 08:35:54.767363-04 2011-04-18 6253 99 A/P 30118 \N -8.00 Discount for V 30118 6489 t DS f admin f 12721 f 2011-04-18 08:35:54.767363-04 2011-04-18 6252 109 A/P 4066 218 392.00 ICHROME-International Chrome Technologies 6488 t CK f admin f 12720 f 2011-04-18 08:35:54.767363-04 2011-04-18 6252 99 A/P 4066 218 -392.00 ICHROME-International Chrome Technologies 6488 t CK f admin f 12723 f 2011-04-18 08:37:37.831147-04 2011-04-18 6254 99 A/P 30119 \N 22000.00 DMFG-Diamond Manufacturing MA-100101 6491 t VO f admin f 12722 f 2011-04-18 08:37:37.831147-04 2011-04-18 6254 95 A/P 30119 \N -22000.00 DMFG-Diamond Manufacturing MA-100101 6491 t VO f admin f 12739 f 2011-04-18 13:29:34.810123-04 2011-04-18 6262 86 W/O 10080-1 -1 -34.83 Post Run Time Standard Paint Operation/ to Work Order 6500 t WO f admin f 12738 f 2011-04-18 13:29:34.810123-04 2011-04-18 6262 94 W/O 10080-1 -1 34.83 Post Run Time Standard Paint Operation/ to Work Order 6500 t WO f admin f 12725 f 2011-04-18 08:38:14.806877-04 2011-04-18 6255 109 A/P 4068 220 22000.00 DMFG-Diamond Manufacturing 6492 t CK f admin f 12724 f 2011-04-18 08:38:14.806877-04 2011-04-18 6255 99 A/P 4068 220 -22000.00 DMFG-Diamond Manufacturing 6492 t CK f admin f 12726 f 2011-04-18 13:27:15.266208-04 2011-04-18 6256 95 S/R 20105 -1 1000.00 Receive Non-Controlled Inventory from P/O for International Chrome Technologies for item CHROMING 6493 t PO f admin f 12727 f 2011-04-18 13:27:15.266208-04 2011-04-18 6256 158 S/R 20105 -1 -1000.00 Receive Non-Controlled Inventory from P/O for International Chrome Technologies for item CHROMING 6493 t PO f admin f 12728 f 2011-04-18 13:27:58.563487-04 2011-04-18 6257 99 A/P 30120 \N 1000.00 ICHROME-International Chrome Technologies 6494 t VO f admin f 12729 f 2011-04-18 13:27:58.563487-04 2011-04-18 6257 95 A/P 30120 \N -1000.00 ICHROME-International Chrome Technologies 6494 t VO f admin f 12731 f 2011-04-18 13:28:49.724898-04 2011-04-18 6259 101 A/P 30120 \N 20.00 Discount for V 30120 6496 t DS f admin f 12730 f 2011-04-18 13:28:49.724898-04 2011-04-18 6259 99 A/P 30120 \N -20.00 Discount for V 30120 6496 t DS f admin f 12735 f 2011-04-18 13:29:34.810123-04 2011-04-18 6260 86 W/O 10080-1 4098 -3.20 Material YPAINT1 Issue to Work Order 6498 t WO f admin f 12734 f 2011-04-18 13:29:34.810123-04 2011-04-18 6260 138 W/O 10080-1 4098 3.20 Material YPAINT1 Issue to Work Order 6498 t WO f admin f 12733 f 2011-04-18 13:28:49.724898-04 2011-04-18 6258 99 A/P 4069 221 -980.00 ICHROME-International Chrome Technologies 6495 t CK f admin f 12732 f 2011-04-18 13:28:49.724898-04 2011-04-18 6258 109 A/P 4069 221 980.00 ICHROME-International Chrome Technologies 6495 t CK f admin f 12751 f 2011-04-18 13:29:48.048132-04 2011-04-18 6268 86 W/O 10080-1 -1 -2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 6506 t WO f admin f 12750 f 2011-04-18 13:29:48.048132-04 2011-04-18 6268 94 W/O 10080-1 -1 2.20 Post Setup Time Standard Operation - Assembly/ to Work Order 6506 t WO f admin f 12753 f 2011-04-18 13:29:48.048132-04 2011-04-18 6269 86 W/O 10080-1 -1 -22.00 Post Run Time Standard Operation - Assembly/ to Work Order 6507 t WO f admin f 12752 f 2011-04-18 13:29:48.048132-04 2011-04-18 6269 94 W/O 10080-1 -1 22.00 Post Run Time Standard Operation - Assembly/ to Work Order 6507 t WO f admin f 12741 f 2011-04-18 13:29:48.048132-04 2011-04-18 6263 86 W/O 10080-1 4099 -932.00 Material CBUMP Issue to Work Order 6501 t WO f admin f 12740 f 2011-04-18 13:29:48.048132-04 2011-04-18 6263 138 W/O 10080-1 4099 932.00 Material CBUMP Issue to Work Order 6501 t WO f admin f 12743 f 2011-04-18 13:29:48.048132-04 2011-04-18 6264 86 W/O 10080-1 4100 -1661.92 Material HUB1 Issue to Work Order 6502 t WO f admin f 12742 f 2011-04-18 13:29:48.048132-04 2011-04-18 6264 138 W/O 10080-1 4100 1661.92 Material HUB1 Issue to Work Order 6502 t WO f admin f 12745 f 2011-04-18 13:29:48.048132-04 2011-04-18 6265 86 W/O 10080-1 4101 -328.40 Material TSUB2 Issue to Work Order 6503 t WO f admin f 12744 f 2011-04-18 13:29:48.048132-04 2011-04-18 6265 138 W/O 10080-1 4101 328.40 Material TSUB2 Issue to Work Order 6503 t WO f admin f 12747 f 2011-04-18 13:29:48.048132-04 2011-04-18 6266 86 W/O 10080-1 4102 -160.00 Material TWHEEL1 Issue to Work Order 6504 t WO f admin f 12746 f 2011-04-18 13:29:48.048132-04 2011-04-18 6266 138 W/O 10080-1 4102 160.00 Material TWHEEL1 Issue to Work Order 6504 t WO f admin f 12749 f 2011-04-18 13:29:48.048132-04 2011-04-18 6267 86 W/O 10080-1 4103 -100.00 Material CBODY1 Issue to Work Order 6505 t WO f admin f 12748 f 2011-04-18 13:29:48.048132-04 2011-04-18 6267 138 W/O 10080-1 4103 100.00 Material CBODY1 Issue to Work Order 6505 t WO f admin f 12755 f 2011-04-18 13:30:01.943607-04 2011-04-18 6270 86 W/O 10080-1 -1 -0.44 Post Setup Time SHIPPING/ to Work Order 6508 t WO f admin f 12754 f 2011-04-18 13:30:01.943607-04 2011-04-18 6270 94 W/O 10080-1 -1 0.44 Post Setup Time SHIPPING/ to Work Order 6508 t WO f admin f 12757 f 2011-04-18 13:30:01.943607-04 2011-04-18 6271 86 W/O 10080-1 -1 -8.80 Post Run Time SHIPPING/ to Work Order 6509 t WO f admin f 12756 f 2011-04-18 13:30:01.943607-04 2011-04-18 6271 94 W/O 10080-1 -1 8.80 Post Run Time SHIPPING/ to Work Order 6509 t WO f admin f 12758 f 2011-04-18 13:30:01.943607-04 2011-04-18 6272 86 W/O 10080-1 4104 3319.28 Receive Inventory STOCKCAR1 from Manufacturing 6510 t WO f admin f 12759 f 2011-04-18 13:30:01.943607-04 2011-04-18 6272 85 W/O 10080-1 4104 -3319.28 Receive Inventory STOCKCAR1 from Manufacturing 6510 t WO f admin f 12760 f 2011-04-18 13:30:12.956417-04 2011-04-18 6273 86 W/O 10080-1 -1 -63.65 Manufacturing Inventory Cost Variance for STOCKCAR1 6511 t WO f admin f 12761 f 2011-04-18 13:30:12.956417-04 2011-04-18 6273 87 W/O 10080-1 -1 63.65 Manufacturing Inventory Cost Variance for STOCKCAR1 6511 t WO f admin f 12763 f 2011-04-18 13:35:20.290995-04 2011-01-01 6274 86 G/L Correction -1 -1970.00 Correct wrong G/L trans. 6513 t JE f admin f 12762 f 2011-04-18 13:35:20.290995-04 2011-01-01 6274 85 G/L Correction -1 1970.00 Correct wrong G/L trans. 6513 t JE f admin f 12766 f 2011-04-18 13:40:24.574901-04 2011-04-30 6275 108 G/L Clear MFG Var to COGS \N 42844.10 Clear variances to COGS 6514 t JE f admin f 12764 f 2011-04-18 13:40:24.574901-04 2011-04-30 6275 87 G/L Clear MFG Var to COGS \N -46833.79 Clear variances to COGS 6514 t JE f admin f 12765 f 2011-04-18 13:40:24.574901-04 2011-04-30 6275 90 G/L Clear MFG Var to COGS \N 3989.69 Clear variances to COGS 6514 t JE f admin f 12768 f 2011-04-18 13:54:47.67733-04 2011-04-18 6277 160 T/E 1000 -1 -900.00 Post Time Sheet for Professional Services/admin to Project GREENLEAF 6515 t TE f admin f 12767 f 2011-04-18 13:54:47.67733-04 2011-04-18 6277 161 T/E 1000 -1 900.00 Post Time Sheet for Professional Services/admin to Project GREENLEAF 6515 t TE f admin f 12770 f 2011-04-18 13:54:54.12386-04 2011-04-18 6278 160 T/E 1001 -1 -2500.00 Post Time Sheet for Professional Services/admin to Project TRELLIS 6516 t TE f admin f 12769 f 2011-04-18 13:54:54.12386-04 2011-04-18 6278 161 T/E 1001 -1 2500.00 Post Time Sheet for Professional Services/admin to Project TRELLIS 6516 t TE f admin f 12772 f 2011-04-18 13:56:30.118336-04 2011-04-18 6279 106 A/R 60113 \N -7500.30 Vienna Collectables 6517 t IN f admin f 12771 f 2011-04-18 13:56:30.118336-04 2011-04-18 6279 141 A/R 60113 \N 7500.30 Vienna Collectables 6517 t IN f admin f 12773 f 2011-04-18 14:05:32.052841-04 2011-04-30 6280 99 A/P 30121 \N 555.00 UPS-United Parcel Service MA9091 6518 t VO f admin f 12775 f 2011-04-18 14:05:32.052841-04 2011-04-30 6280 139 A/P 30121 \N -200.00 UPS-United Parcel Service MA9091 6518 t VO f admin f 12774 f 2011-04-18 14:05:32.052841-04 2011-04-30 6280 120 A/P 30121 \N -355.00 UPS-United Parcel Service MA9091 6518 t VO f admin f 12776 f 2011-06-03 16:14:35.243541-04 2011-06-03 6281 95 S/R 20107-1 4105 66000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6519 t PO f admin f 12777 f 2011-06-03 16:14:35.243541-04 2011-06-03 6281 85 S/R 20107-1 4105 -66000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6519 t PO f admin f 12779 f 2011-06-03 16:14:35.243541-04 2011-06-03 6282 96 S/R 50219-1 4106 -66000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6521 t SO f admin f 12778 f 2011-06-03 16:14:35.243541-04 2011-06-03 6282 85 S/R 50219-1 4106 66000.00 Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated 6521 t SO f admin f 12781 f 2011-06-03 16:14:35.243541-04 2011-06-03 6283 108 S/R 60085 -1 -66000.00 Ship Order 50219 for Customer Tremendous Toys Incorporated 6522 t SH f admin f 12780 f 2011-06-03 16:14:35.243541-04 2011-06-03 6283 96 S/R 60085 -1 66000.00 Ship Order 50219 for Customer Tremendous Toys Incorporated 6522 t SH f admin f 12782 f 2011-06-03 16:16:18.646269-04 2011-06-03 6284 99 A/P 30122 \N 69000.00 DMFG-Diamond Manufacturing 6523 t VO f admin f 12783 f 2011-06-03 16:16:18.646269-04 2011-06-03 6284 95 A/P 30122 \N -66000.00 DMFG-Diamond Manufacturing 6523 t VO f admin f 12784 f 2011-06-03 16:16:18.646269-04 2011-06-03 6284 139 A/P 30122 \N -3000.00 DMFG-Diamond Manufacturing 6523 t VO f admin f 12786 f 2011-06-03 16:20:24.02733-04 2011-06-03 6285 109 A/P 4070 223 69000.00 DMFG-Diamond Manufacturing 6524 t CK f admin f 12785 f 2011-06-03 16:20:24.02733-04 2011-06-03 6285 99 A/P 4070 223 -69000.00 DMFG-Diamond Manufacturing 6524 t CK f admin f 12790 f 2011-06-03 16:22:28.774521-04 2011-06-03 6287 106 A/R 60114 \N -148500.00 Tremendous Toys Incorporated 6525 t IN f admin f 12789 f 2011-06-03 16:22:28.774521-04 2011-06-03 6287 103 A/R 60114 \N 148500.00 Tremendous Toys Incorporated 6525 t IN f admin f 12788 f 2011-06-03 16:20:24.02733-04 2011-06-03 6286 99 A/P 4071 222 -555.00 UPS-United Parcel Service 6524 t CK f admin f 12787 f 2011-06-03 16:20:24.02733-04 2011-06-03 6286 109 A/P 4071 222 555.00 UPS-United Parcel Service 6524 t CK f admin f 12792 f 2011-06-03 16:23:47.068677-04 2011-06-03 6289 106 A/R 20038 \N 2970.00 Tremendous Toys Incorporated Discount Credit from W-123112 6526 t CM f admin f 12791 f 2011-06-03 16:23:47.068677-04 2011-06-03 6289 157 A/R 20038 \N -2970.00 Tremendous Toys Incorporated Discount Credit from W-123112 6526 t CM f admin f 12793 f 2011-06-03 16:23:47.068677-04 2011-06-03 6290 106 A/R 20039 \N 2970.00 Tremendous Toys Incorporated Unapplied from W-123112 6526 t CM f admin f 12794 f 2011-06-03 16:23:47.068677-04 2011-06-03 6290 123 A/R 20039 \N -2970.00 Tremendous Toys Incorporated Unapplied from W-123112 6526 t CM f admin f 12797 f 2011-06-03 16:23:47.068677-04 2011-06-03 6288 109 A/R W-123112 \N -148500.00 TTOYS-Tremendous Toys Incorporated 6526 t CR f admin f 12795 f 2011-06-03 16:23:47.068677-04 2011-06-03 6288 106 A/R I-60114 \N 145530.00 TTOYS-Tremendous Toys Incorporated 6526 t CR f admin f 12796 f 2011-06-03 16:23:47.068677-04 2011-06-03 6288 123 A/R Unapplied from W-123112 \N 2970.00 TTOYS-Tremendous Toys Incorporated 6526 t CR f admin f 12798 f 2011-06-03 16:26:54.335808-04 2011-06-03 6291 95 S/R 20108-1 4107 77000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6527 t PO f admin f 12799 f 2011-06-03 16:26:54.335808-04 2011-06-03 6291 85 S/R 20108-1 4107 -77000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6527 t PO f admin f 12801 f 2011-06-03 16:26:54.335808-04 2011-06-03 6292 96 S/R 50220-1 4108 -77000.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6529 t SO f admin f 12800 f 2011-06-03 16:26:54.335808-04 2011-06-03 6292 85 S/R 50220-1 4108 77000.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6529 t SO f admin f 12803 f 2011-06-03 16:26:54.335808-04 2011-06-03 6293 108 S/R 60086 -1 -77000.00 Ship Order 50220 for Customer Xtreme Toys LTD 6530 t SH f admin f 12802 f 2011-06-03 16:26:54.335808-04 2011-06-03 6293 96 S/R 60086 -1 77000.00 Ship Order 50220 for Customer Xtreme Toys LTD 6530 t SH f admin f 12804 f 2011-06-03 16:28:42.031003-04 2011-06-03 6294 95 S/R 20108 4109 -77000.00 Return Inventory to P/O 6531 t PO f admin f 12805 f 2011-06-03 16:28:42.031003-04 2011-06-03 6294 85 S/R 20108 4109 77000.00 Return Inventory to P/O 6531 t PO f admin f 12806 f 2011-06-03 16:30:08.321477-04 2011-05-14 6295 95 S/R 20108-1 4110 77000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6532 t PO f admin f 12807 f 2011-06-03 16:30:08.321477-04 2011-05-14 6295 85 S/R 20108-1 4110 -77000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6532 t PO f admin f 12809 f 2011-06-03 16:30:08.321477-04 2011-06-03 6296 96 S/R 50220-1 4111 -77000.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6534 t SO f admin f 12808 f 2011-06-03 16:30:08.321477-04 2011-06-03 6296 85 S/R 50220-1 4111 77000.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6534 t SO f admin f 12811 f 2011-06-03 16:30:08.321477-04 2011-06-03 6297 108 S/R 60087 -1 -77000.00 Ship Order 50220 for Customer Xtreme Toys LTD 6535 t SH f admin f 12810 f 2011-06-03 16:30:08.321477-04 2011-06-03 6297 96 S/R 60087 -1 77000.00 Ship Order 50220 for Customer Xtreme Toys LTD 6535 t SH f admin f 12814 f 2011-06-03 16:33:40.760646-04 2011-06-03 6298 122 A/R 60115 \N 8050.00 Xtreme Toys LTD 6536 t IN f admin f 12813 f 2011-06-03 16:33:40.760646-04 2011-06-03 6298 106 A/R 60115 \N -184799.99 Xtreme Toys LTD 6536 t IN f admin f 12812 f 2011-06-03 16:33:40.760646-04 2011-06-03 6298 141 A/R 60115 \N 361899.99 Xtreme Toys LTD 6536 t IN f admin f 12815 f 2011-06-03 16:33:40.760646-04 2011-06-03 6298 123 A/R 60115 \N -185150.00 Xtreme Toys LTD 6536 t IN f admin f 12816 f 2011-06-03 16:36:34.56468-04 2011-05-19 6299 95 S/R 20109-1 4112 110000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6537 t PO f admin f 12817 f 2011-06-03 16:36:34.56468-04 2011-05-19 6299 85 S/R 20109-1 4112 -110000.00 Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 6537 t PO f admin f 12819 f 2011-06-03 16:36:34.56468-04 2011-06-03 6300 96 S/R 50221-1 4113 -110000.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6539 t SO f admin f 12818 f 2011-06-03 16:36:34.56468-04 2011-06-03 6300 85 S/R 50221-1 4113 110000.00 Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD 6539 t SO f admin f 12821 f 2011-06-03 16:36:34.56468-04 2011-06-03 6301 108 S/R 60088 -1 -110000.00 Ship Order 50221 for Customer Xtreme Toys LTD 6540 t SH f admin f 12820 f 2011-06-03 16:36:34.56468-04 2011-06-03 6301 96 S/R 60088 -1 110000.00 Ship Order 50221 for Customer Xtreme Toys LTD 6540 t SH f admin f 12824 f 2011-06-03 16:39:01.479742-04 2011-05-19 6302 99 A/P 30124 \N 113000.00 DMFG-Diamond Manufacturing 6541 t VO f admin f 12823 f 2011-06-03 16:39:01.479742-04 2011-05-19 6302 95 A/P 30124 \N -110000.00 DMFG-Diamond Manufacturing 6541 t VO f admin f 12822 f 2011-06-03 16:39:01.479742-04 2011-05-19 6302 139 A/P 30124 \N -3000.00 DMFG-Diamond Manufacturing 6541 t VO f admin f 12826 f 2011-06-03 16:40:30.558225-04 2011-06-03 6303 99 A/P 30126 \N 77000.00 DMFG-Diamond Manufacturing 6542 t VO f admin f 12825 f 2011-06-03 16:40:30.558225-04 2011-06-03 6303 95 A/P 30126 \N -77000.00 DMFG-Diamond Manufacturing 6542 t VO f admin f 12827 f 2011-06-03 16:41:10.132256-04 2011-07-03 6304 100 A/P 39001 \N 1000.00 World Chem, Inc. For damaged product. 6543 t CM f admin f 12828 f 2011-06-03 16:41:10.132256-04 2011-07-03 6304 99 A/P 39001 \N -1000.00 World Chem, Inc. For damaged product. 6543 t CM f admin f 12839 f 2011-06-03 16:49:15.208794-04 2011-05-31 6308 106 A/R I-60116 \N 253329.99 XTRM-Xtreme Toys LTD 6547 t CR f admin f 12840 f 2011-06-03 16:49:15.208794-04 2011-05-31 6308 123 A/R Unapplied from W-12311 \N 5170.00 XTRM-Xtreme Toys LTD 6547 t CR f admin f 12830 f 2011-06-03 16:43:05.163233-04 2011-05-27 6305 109 A/P 4072 224 113000.00 DMFG-Diamond Manufacturing 6544 t CK f admin f 12829 f 2011-06-03 16:43:05.163233-04 2011-05-27 6305 99 A/P 4072 224 -113000.00 DMFG-Diamond Manufacturing 6544 t CK f admin f 12832 f 2011-06-03 16:43:41.733564-04 2011-06-03 6306 109 A/P 4073 225 77000.00 DMFG-Diamond Manufacturing 6545 t CK f admin f 12831 f 2011-06-03 16:43:41.733564-04 2011-06-03 6306 99 A/P 4073 225 -77000.00 DMFG-Diamond Manufacturing 6545 t CK f admin f 12834 f 2011-06-03 16:47:04.486944-04 2011-05-31 6307 106 A/R 60116 \N -258499.99 Xtreme Toys LTD 6546 t IN f admin f 12833 f 2011-06-03 16:47:04.486944-04 2011-05-31 6307 141 A/R 60116 \N 258499.99 Xtreme Toys LTD 6546 t IN f admin f 12835 f 2011-06-03 16:49:15.208794-04 2011-05-31 6309 106 A/R 20040 \N 5170.00 Xtreme Toys LTD Discount Credit from W-12311 6547 t CM f admin f 12836 f 2011-06-03 16:49:15.208794-04 2011-05-31 6309 157 A/R 20040 \N -5170.00 Xtreme Toys LTD Discount Credit from W-12311 6547 t CM f admin f 12837 f 2011-06-03 16:49:15.208794-04 2011-05-31 6310 106 A/R 20041 \N 5170.00 Xtreme Toys LTD Unapplied from W-12311 6547 t CM f admin f 12838 f 2011-06-03 16:49:15.208794-04 2011-05-31 6310 123 A/R 20041 \N -5170.00 Xtreme Toys LTD Unapplied from W-12311 6547 t CM f admin f 12841 f 2011-06-03 16:49:15.208794-04 2011-05-31 6308 127 A/R W-12311 \N -258499.99 XTRM-Xtreme Toys LTD 6547 t CR f admin f 12843 f 2011-06-03 16:50:57.019944-04 2011-06-03 6311 127 A/R W-123111 \N -179629.99 XTRM-Xtreme Toys LTD 6548 t CR f admin f 12842 f 2011-06-03 16:50:57.019944-04 2011-06-03 6311 106 A/R I-60115 \N 179629.99 XTRM-Xtreme Toys LTD 6548 t CR f admin f 12844 f 2011-06-03 16:53:11.213952-04 2011-06-03 6312 91 I/M Adjust for return 4114 77000.00 Miscellaneous Adjustment for item DTRUCK1\n 6549 t AD f admin f 12845 f 2011-06-03 16:53:11.213952-04 2011-06-03 6312 85 I/M Adjust for return 4114 -77000.00 Miscellaneous Adjustment for item DTRUCK1\n 6549 t AD f admin f 12847 f 2011-06-03 16:55:14.612479-04 2011-06-03 6313 86 W/O 10084-1 -1 -27.50 Post Setup Time Breeder - Stamping Work Center/ to Work Order 6550 t WO f admin f 12846 f 2011-06-03 16:55:14.612479-04 2011-06-03 6313 94 W/O 10084-1 -1 27.50 Post Setup Time Breeder - Stamping Work Center/ to Work Order 6550 t WO f admin f 12849 f 2011-06-03 16:55:14.612479-04 2011-06-03 6314 86 W/O 10084-1 -1 -11.00 Post Run Time Breeder - Stamping Work Center/ to Work Order 6551 t WO f admin f 12848 f 2011-06-03 16:55:14.612479-04 2011-06-03 6314 94 W/O 10084-1 -1 11.00 Post Run Time Breeder - Stamping Work Center/ to Work Order 6551 t WO f admin f 12852 f 2011-06-03 16:55:14.612479-04 2011-06-03 6316 86 W/O 10084-1 4116 649.75 Receive Inventory BRCPFN1 from Manufacturing 6553 t WO f admin f 12853 f 2011-06-03 16:55:14.612479-04 2011-06-03 6316 85 W/O 10084-1 4116 -649.75 Receive Inventory BRCPFN1 from Manufacturing 6553 t WO f admin f 12851 f 2011-06-03 16:55:14.612479-04 2011-06-03 6315 86 W/O 10084-1 4115 -625.00 Material SHEET1 Issue to Work Order 6552 t WO f admin f 12850 f 2011-06-03 16:55:14.612479-04 2011-06-03 6315 138 W/O 10084-1 4115 625.00 Material SHEET1 Issue to Work Order 6552 t WO f admin f 12861 f 2011-06-03 16:55:14.612479-04 2011-06-03 6320 86 W/O 10084-1 4120 -649.75 Issue Breeder Inventory by Breeder Distribution 6557 t WO f admin f 12860 f 2011-06-03 16:55:14.612479-04 2011-06-03 6320 85 W/O 10084-1 4120 649.75 Issue Breeder Inventory by Breeder Distribution 6557 t WO f admin f 12854 f 2011-06-03 16:55:14.612479-04 2011-06-03 6317 86 W/O 10084-1 4117 937.50 Receive Inventory from Breeder Manufacturing 6554 t WO f admin f 12855 f 2011-06-03 16:55:14.612479-04 2011-06-03 6317 138 W/O 10084-1 4117 -937.50 Receive Inventory from Breeder Manufacturing 6554 t WO f admin f 12856 f 2011-06-03 16:55:14.612479-04 2011-06-03 6318 86 W/O 10084-1 4118 634.90 Receive Inventory from Breeder Manufacturing 6555 t WO f admin f 12857 f 2011-06-03 16:55:14.612479-04 2011-06-03 6318 138 W/O 10084-1 4118 -634.90 Receive Inventory from Breeder Manufacturing 6555 t WO f admin f 12858 f 2011-06-03 16:55:14.612479-04 2011-06-03 6319 86 W/O 10084-1 4119 2077.40 Receive Inventory from Breeder Manufacturing 6556 t WO f admin f 12859 f 2011-06-03 16:55:14.612479-04 2011-06-03 6319 138 W/O 10084-1 4119 -2077.40 Receive Inventory from Breeder Manufacturing 6556 t WO f admin f 12862 f 2011-06-03 16:55:32.604097-04 2011-06-03 6321 86 W/O 10084-1 -1 13.75 Manufacturing Inventory Cost Variance for BRCPFN1 6558 t WO f admin f 12863 f 2011-06-03 16:55:32.604097-04 2011-06-03 6321 87 W/O 10084-1 -1 -13.75 Manufacturing Inventory Cost Variance for BRCPFN1 6558 t WO f admin f 12864 f 2011-06-03 16:55:32.604097-04 2011-06-03 6322 86 W/O 10084-1 -1 -3000.05 Breeder Inventory Cost Variance for BRCPFN1 6559 t WO f admin f 12865 f 2011-06-03 16:55:32.604097-04 2011-06-03 6322 87 W/O 10084-1 -1 3000.05 Breeder Inventory Cost Variance for BRCPFN1 6559 t WO f admin f 12866 f 2011-06-15 11:18:41.853161-04 2011-06-15 6323 87 P/D Post Cost 309 810.45 Set Standard Cost - Material for item STOCKCAR1 6564 t f admin f 12867 f 2011-06-15 11:18:41.853161-04 2011-06-15 6323 128 P/D Post Cost 309 -810.45 Set Standard Cost - Material for item STOCKCAR1 6564 t f admin f 12868 f 2011-06-15 11:18:41.853161-04 2011-06-15 6324 87 P/D Post Cost 308 4017.69 Set Standard Cost - Material for item STOCKCAR1 6565 t f admin f 12869 f 2011-06-15 11:18:41.853161-04 2011-06-15 6324 85 P/D Post Cost 308 -4017.69 Set Standard Cost - Material for item STOCKCAR1 6565 t f admin f 12870 f 2011-06-15 11:18:41.853161-04 2011-06-15 6325 87 P/D Post Cost 309 0.24 Set Standard Cost - Special Handling for item STOCKCAR1 6566 t f admin f 12871 f 2011-06-15 11:18:41.853161-04 2011-06-15 6325 128 P/D Post Cost 309 -0.24 Set Standard Cost - Special Handling for item STOCKCAR1 6566 t f admin f 12872 f 2011-06-15 11:18:41.853161-04 2011-06-15 6326 87 P/D Post Cost 308 1.21 Set Standard Cost - Special Handling for item STOCKCAR1 6567 t f admin f 12873 f 2011-06-15 11:18:41.853161-04 2011-06-15 6326 85 P/D Post Cost 308 -1.21 Set Standard Cost - Special Handling for item STOCKCAR1 6567 t f admin f 12874 f 2011-06-15 11:18:41.853161-04 2011-06-15 6327 87 P/D Post Cost 385 350.00 Set Standard Cost - Material for item TSUB2 6572 t f admin f 12875 f 2011-06-15 11:18:41.853161-04 2011-06-15 6327 138 P/D Post Cost 385 -350.00 Set Standard Cost - Material for item TSUB2 6572 t f admin f 12876 f 2011-06-15 11:18:41.853161-04 2011-06-15 6328 87 P/D Post Cost 336 128.54 Set Standard Cost - Material for item RTRUCK1 6573 t f admin f 12877 f 2011-06-15 11:18:41.853161-04 2011-06-15 6328 146 P/D Post Cost 336 -128.54 Set Standard Cost - Material for item RTRUCK1 6573 t f admin f 12878 f 2011-06-15 11:18:41.853161-04 2011-06-15 6329 87 P/D Post Cost 342 42.14 Set Standard Cost - Material for item RTRUCK1 6574 t f admin f 12879 f 2011-06-15 11:18:41.853161-04 2011-06-15 6329 146 P/D Post Cost 342 -42.14 Set Standard Cost - Material for item RTRUCK1 6574 t f admin f 12880 f 2011-06-15 11:18:41.853161-04 2011-06-15 6330 87 P/D Post Cost 368 231.79 Set Standard Cost - Material for item RTRUCK1 6575 t f admin f 12881 f 2011-06-15 11:18:41.853161-04 2011-06-15 6330 128 P/D Post Cost 368 -231.79 Set Standard Cost - Material for item RTRUCK1 6575 t f admin f 12882 f 2011-06-15 11:18:41.853161-04 2011-06-15 6331 87 P/D Post Cost 336 0.05 Set Standard Cost - Special Handling for item RTRUCK1 6576 t f admin f 12883 f 2011-06-15 11:18:41.853161-04 2011-06-15 6331 146 P/D Post Cost 336 -0.05 Set Standard Cost - Special Handling for item RTRUCK1 6576 t f admin f 12884 f 2011-06-15 11:18:41.853161-04 2011-06-15 6332 87 P/D Post Cost 342 0.02 Set Standard Cost - Special Handling for item RTRUCK1 6577 t f admin f 12885 f 2011-06-15 11:18:41.853161-04 2011-06-15 6332 146 P/D Post Cost 342 -0.02 Set Standard Cost - Special Handling for item RTRUCK1 6577 t f admin f 12886 f 2011-06-15 11:18:41.853161-04 2011-06-15 6333 87 P/D Post Cost 368 0.09 Set Standard Cost - Special Handling for item RTRUCK1 6578 t f admin f 12887 f 2011-06-15 11:18:41.853161-04 2011-06-15 6333 128 P/D Post Cost 368 -0.09 Set Standard Cost - Special Handling for item RTRUCK1 6578 t f admin f 12888 f 2011-06-15 11:18:41.853161-04 2011-06-15 6334 87 P/D Post Cost 338 155.93 Set Standard Cost - Material for item WTRUCK1 6579 t f admin f 12889 f 2011-06-15 11:18:41.853161-04 2011-06-15 6334 146 P/D Post Cost 338 -155.93 Set Standard Cost - Material for item WTRUCK1 6579 t f admin f 12890 f 2011-06-15 11:18:41.853161-04 2011-06-15 6335 87 P/D Post Cost 344 42.14 Set Standard Cost - Material for item WTRUCK1 6580 t f admin f 12891 f 2011-06-15 11:18:41.853161-04 2011-06-15 6335 146 P/D Post Cost 344 -42.14 Set Standard Cost - Material for item WTRUCK1 6580 t f admin f 12892 f 2011-06-15 11:18:41.853161-04 2011-06-15 6336 87 P/D Post Cost 370 221.26 Set Standard Cost - Material for item WTRUCK1 6581 t f admin f 12893 f 2011-06-15 11:18:41.853161-04 2011-06-15 6336 128 P/D Post Cost 370 -221.26 Set Standard Cost - Material for item WTRUCK1 6581 t f admin f 12894 f 2011-06-15 11:18:41.853161-04 2011-06-15 6337 87 P/D Post Cost 338 0.06 Set Standard Cost - Special Handling for item WTRUCK1 6582 t f admin f 12895 f 2011-06-15 11:18:41.853161-04 2011-06-15 6337 146 P/D Post Cost 338 -0.06 Set Standard Cost - Special Handling for item WTRUCK1 6582 t f admin f 12896 f 2011-06-15 11:18:41.853161-04 2011-06-15 6338 87 P/D Post Cost 344 0.02 Set Standard Cost - Special Handling for item WTRUCK1 6583 t f admin f 12897 f 2011-06-15 11:18:41.853161-04 2011-06-15 6338 146 P/D Post Cost 344 -0.02 Set Standard Cost - Special Handling for item WTRUCK1 6583 t f admin f 12898 f 2011-06-15 11:18:41.853161-04 2011-06-15 6339 87 P/D Post Cost 370 0.08 Set Standard Cost - Special Handling for item WTRUCK1 6584 t f admin f 12899 f 2011-06-15 11:18:41.853161-04 2011-06-15 6339 128 P/D Post Cost 370 -0.08 Set Standard Cost - Special Handling for item WTRUCK1 6584 t f admin f 12900 f 2011-06-15 11:18:41.853161-04 2011-06-15 6340 87 P/D Post Cost 325 8.43 Set Standard Cost - Material for item STRUCK1 6585 t f admin f 12901 f 2011-06-15 11:18:41.853161-04 2011-06-15 6340 128 P/D Post Cost 325 -8.43 Set Standard Cost - Material for item STRUCK1 6585 t f admin f 12902 f 2011-06-15 11:18:41.853161-04 2011-06-15 6341 87 P/D Post Cost 323 6.32 Set Standard Cost - Material for item STRUCK1 6586 t f admin f 12903 f 2011-06-15 11:18:41.853161-04 2011-06-15 6341 85 P/D Post Cost 323 -6.32 Set Standard Cost - Material for item STRUCK1 6586 t f admin f 12904 f 2011-06-15 11:18:41.853161-04 2011-06-15 6342 87 P/D Post Cost 335 153.83 Set Standard Cost - Material for item BTRUCK1 6589 t f admin f 12905 f 2011-06-15 11:18:41.853161-04 2011-06-15 6342 146 P/D Post Cost 335 -153.83 Set Standard Cost - Material for item BTRUCK1 6589 t f admin f 12906 f 2011-06-15 11:18:41.853161-04 2011-06-15 6343 87 P/D Post Cost 341 42.14 Set Standard Cost - Material for item BTRUCK1 6590 t f admin f 12907 f 2011-06-15 11:18:41.853161-04 2011-06-15 6343 146 P/D Post Cost 341 -42.14 Set Standard Cost - Material for item BTRUCK1 6590 t f admin f 12908 f 2011-06-15 11:18:41.853161-04 2011-06-15 6344 87 P/D Post Cost 366 231.79 Set Standard Cost - Material for item BTRUCK1 6591 t f admin f 12909 f 2011-06-15 11:18:41.853161-04 2011-06-15 6344 128 P/D Post Cost 366 -231.79 Set Standard Cost - Material for item BTRUCK1 6591 t f admin f 12910 f 2011-06-15 11:18:41.853161-04 2011-06-15 6345 87 P/D Post Cost 335 0.06 Set Standard Cost - Special Handling for item BTRUCK1 6592 t f admin f 12911 f 2011-06-15 11:18:41.853161-04 2011-06-15 6345 146 P/D Post Cost 335 -0.06 Set Standard Cost - Special Handling for item BTRUCK1 6592 t f admin f 12912 f 2011-06-15 11:18:41.853161-04 2011-06-15 6346 87 P/D Post Cost 341 0.02 Set Standard Cost - Special Handling for item BTRUCK1 6593 t f admin f 12913 f 2011-06-15 11:18:41.853161-04 2011-06-15 6346 146 P/D Post Cost 341 -0.02 Set Standard Cost - Special Handling for item BTRUCK1 6593 t f admin f 12914 f 2011-06-15 11:18:41.853161-04 2011-06-15 6347 87 P/D Post Cost 366 0.09 Set Standard Cost - Special Handling for item BTRUCK1 6594 t f admin f 12915 f 2011-06-15 11:18:41.853161-04 2011-06-15 6347 128 P/D Post Cost 366 -0.09 Set Standard Cost - Special Handling for item BTRUCK1 6594 t f admin f 12916 f 2011-06-15 11:18:41.853161-04 2011-06-15 6348 87 P/D Post Cost 333 442.51 Set Standard Cost - Material for item YTRUCK1 6595 t f admin f 12917 f 2011-06-15 11:18:41.853161-04 2011-06-15 6348 128 P/D Post Cost 333 -442.51 Set Standard Cost - Material for item YTRUCK1 6595 t f admin f 12918 f 2011-06-15 11:18:41.853161-04 2011-06-15 6349 87 P/D Post Cost 332 37.93 Set Standard Cost - Material for item YTRUCK1 6596 t f admin f 12919 f 2011-06-15 11:18:41.853161-04 2011-06-15 6349 146 P/D Post Cost 332 -37.93 Set Standard Cost - Material for item YTRUCK1 6596 t f admin f 12920 f 2011-06-15 11:18:41.853161-04 2011-06-15 6350 87 P/D Post Cost 346 42.14 Set Standard Cost - Material for item YTRUCK1 6597 t f admin f 12921 f 2011-06-15 11:18:41.853161-04 2011-06-15 6350 146 P/D Post Cost 346 -42.14 Set Standard Cost - Material for item YTRUCK1 6597 t f admin f 12922 f 2011-06-15 11:18:41.853161-04 2011-06-15 6351 87 P/D Post Cost 333 0.17 Set Standard Cost - Special Handling for item YTRUCK1 6598 t f admin f 12923 f 2011-06-15 11:18:41.853161-04 2011-06-15 6351 128 P/D Post Cost 333 -0.17 Set Standard Cost - Special Handling for item YTRUCK1 6598 t f admin f 12924 f 2011-06-15 11:18:41.853161-04 2011-06-15 6352 87 P/D Post Cost 332 0.01 Set Standard Cost - Special Handling for item YTRUCK1 6599 t f admin f 12925 f 2011-06-15 11:18:41.853161-04 2011-06-15 6352 146 P/D Post Cost 332 -0.01 Set Standard Cost - Special Handling for item YTRUCK1 6599 t f admin f 12926 f 2011-06-15 11:18:41.853161-04 2011-06-15 6353 87 P/D Post Cost 346 0.02 Set Standard Cost - Special Handling for item YTRUCK1 6600 t f admin f 12927 f 2011-06-15 11:18:41.853161-04 2011-06-15 6353 146 P/D Post Cost 346 -0.02 Set Standard Cost - Special Handling for item YTRUCK1 6600 t f admin f 12928 f 2011-06-15 11:18:41.853161-04 2011-06-15 6354 87 P/D Post Cost 309 213.50 Set Standard Cost - Material for item STOCKCAR1 6601 t f admin f 12929 f 2011-06-15 11:18:41.853161-04 2011-06-15 6354 128 P/D Post Cost 309 -213.50 Set Standard Cost - Material for item STOCKCAR1 6601 t f admin f 12930 f 2011-06-15 11:18:41.853161-04 2011-06-15 6355 87 P/D Post Cost 308 1058.40 Set Standard Cost - Material for item STOCKCAR1 6602 t f admin f 12931 f 2011-06-15 11:18:41.853161-04 2011-06-15 6355 85 P/D Post Cost 308 -1058.40 Set Standard Cost - Material for item STOCKCAR1 6602 t f admin f 12932 f 2011-06-15 11:18:41.853161-04 2011-06-15 6356 87 P/D Post Cost 326 -11.16 Post Actual Cost to Standard for item TDECAL-F 6605 t f admin f 12933 f 2011-06-15 11:18:41.853161-04 2011-06-15 6356 138 P/D Post Cost 326 11.16 Post Actual Cost to Standard for item TDECAL-F 6605 t f admin f 12934 f 2011-06-15 11:18:41.853161-04 2011-06-15 6357 87 P/D Post Cost 327 -9.21 Post Actual Cost to Standard for item TDECAL-P 6607 t f admin f 12935 f 2011-06-15 11:18:41.853161-04 2011-06-15 6357 138 P/D Post Cost 327 9.21 Post Actual Cost to Standard for item TDECAL-P 6607 t f admin f 12936 f 2011-06-15 11:18:41.853161-04 2011-06-15 6358 87 P/D Post Cost 318 -214.94 Post Actual Cost to Standard for item YPAINT2 6609 t f admin f 12937 f 2011-06-15 11:18:41.853161-04 2011-06-15 6358 138 P/D Post Cost 318 214.94 Post Actual Cost to Standard for item YPAINT2 6609 t f admin f 12938 f 2011-06-15 11:18:41.853161-04 2011-06-15 6359 87 P/D Post Cost 318 -23.88 Post Actual Cost to Standard for item YPAINT2 6611 t f admin f 12939 f 2011-06-15 11:18:41.853161-04 2011-06-15 6359 138 P/D Post Cost 318 23.88 Post Actual Cost to Standard for item YPAINT2 6611 t f admin f 12940 f 2011-06-15 11:18:41.853161-04 2011-06-15 6360 87 P/D Post Cost 336 0.69 Set Standard Cost - Material for item RTRUCK1 6612 t f admin f 12941 f 2011-06-15 11:18:41.853161-04 2011-06-15 6360 146 P/D Post Cost 336 -0.69 Set Standard Cost - Material for item RTRUCK1 6612 t f admin f 12942 f 2011-06-15 11:18:41.853161-04 2011-06-15 6361 87 P/D Post Cost 342 0.23 Set Standard Cost - Material for item RTRUCK1 6613 t f admin f 12943 f 2011-06-15 11:18:41.853161-04 2011-06-15 6361 146 P/D Post Cost 342 -0.23 Set Standard Cost - Material for item RTRUCK1 6613 t f admin f 12944 f 2011-06-15 11:18:41.853161-04 2011-06-15 6362 87 P/D Post Cost 368 1.24 Set Standard Cost - Material for item RTRUCK1 6614 t f admin f 12945 f 2011-06-15 11:18:41.853161-04 2011-06-15 6362 128 P/D Post Cost 368 -1.24 Set Standard Cost - Material for item RTRUCK1 6614 t f admin f 12946 f 2011-06-15 11:18:41.853161-04 2011-06-15 6363 87 P/D Post Cost 338 0.84 Set Standard Cost - Material for item WTRUCK1 6618 t f admin f 12947 f 2011-06-15 11:18:41.853161-04 2011-06-15 6363 146 P/D Post Cost 338 -0.84 Set Standard Cost - Material for item WTRUCK1 6618 t f admin f 12948 f 2011-06-15 11:18:41.853161-04 2011-06-15 6364 87 P/D Post Cost 344 0.23 Set Standard Cost - Material for item WTRUCK1 6619 t f admin f 12949 f 2011-06-15 11:18:41.853161-04 2011-06-15 6364 146 P/D Post Cost 344 -0.23 Set Standard Cost - Material for item WTRUCK1 6619 t f admin f 12950 f 2011-06-15 11:18:41.853161-04 2011-06-15 6365 87 P/D Post Cost 370 1.19 Set Standard Cost - Material for item WTRUCK1 6620 t f admin f 12951 f 2011-06-15 11:18:41.853161-04 2011-06-15 6365 128 P/D Post Cost 370 -1.19 Set Standard Cost - Material for item WTRUCK1 6620 t f admin f 12952 f 2011-06-15 11:18:41.853161-04 2011-06-15 6366 87 P/D Post Cost 325 0.05 Set Standard Cost - Material for item STRUCK1 6624 t f admin f 12953 f 2011-06-15 11:18:41.853161-04 2011-06-15 6366 128 P/D Post Cost 325 -0.05 Set Standard Cost - Material for item STRUCK1 6624 t f admin f 12954 f 2011-06-15 11:18:41.853161-04 2011-06-15 6367 87 P/D Post Cost 323 0.03 Set Standard Cost - Material for item STRUCK1 6625 t f admin f 12955 f 2011-06-15 11:18:41.853161-04 2011-06-15 6367 85 P/D Post Cost 323 -0.03 Set Standard Cost - Material for item STRUCK1 6625 t f admin f 12956 f 2011-06-15 11:18:41.853161-04 2011-06-15 6368 87 P/D Post Cost 335 0.82 Set Standard Cost - Material for item BTRUCK1 6628 t f admin f 12957 f 2011-06-15 11:18:41.853161-04 2011-06-15 6368 146 P/D Post Cost 335 -0.82 Set Standard Cost - Material for item BTRUCK1 6628 t f admin f 12958 f 2011-06-15 11:18:41.853161-04 2011-06-15 6369 87 P/D Post Cost 341 0.23 Set Standard Cost - Material for item BTRUCK1 6629 t f admin f 12959 f 2011-06-15 11:18:41.853161-04 2011-06-15 6369 146 P/D Post Cost 341 -0.23 Set Standard Cost - Material for item BTRUCK1 6629 t f admin f 12960 f 2011-06-15 11:18:41.853161-04 2011-06-15 6370 87 P/D Post Cost 366 1.24 Set Standard Cost - Material for item BTRUCK1 6630 t f admin f 12961 f 2011-06-15 11:18:41.853161-04 2011-06-15 6370 128 P/D Post Cost 366 -1.24 Set Standard Cost - Material for item BTRUCK1 6630 t f admin f 12962 f 2011-06-15 11:18:41.853161-04 2011-06-15 6371 87 P/D Post Cost 333 2.37 Set Standard Cost - Material for item YTRUCK1 6634 t f admin f 12963 f 2011-06-15 11:18:41.853161-04 2011-06-15 6371 128 P/D Post Cost 333 -2.37 Set Standard Cost - Material for item YTRUCK1 6634 t f admin f 12964 f 2011-06-15 11:18:41.853161-04 2011-06-15 6372 87 P/D Post Cost 332 0.20 Set Standard Cost - Material for item YTRUCK1 6635 t f admin f 12965 f 2011-06-15 11:18:41.853161-04 2011-06-15 6372 146 P/D Post Cost 332 -0.20 Set Standard Cost - Material for item YTRUCK1 6635 t f admin f 12966 f 2011-06-15 11:18:41.853161-04 2011-06-15 6373 87 P/D Post Cost 346 0.23 Set Standard Cost - Material for item YTRUCK1 6636 t f admin f 12967 f 2011-06-15 11:18:41.853161-04 2011-06-15 6373 146 P/D Post Cost 346 -0.23 Set Standard Cost - Material for item YTRUCK1 6636 t f admin f 12968 f 2011-06-15 11:18:41.853161-04 2011-06-15 6374 87 P/D Post Cost 297 -8.21 Post Actual Cost to Standard for item YPAINT1 6644 t f admin f 12969 f 2011-06-15 11:18:41.853161-04 2011-06-15 6374 138 P/D Post Cost 297 8.21 Post Actual Cost to Standard for item YPAINT1 6644 t f admin f 12970 f 2011-06-15 11:18:41.853161-04 2011-06-15 6375 87 P/D Post Cost 297 8.21 Post Actual Cost to Standard for item YPAINT1 6646 t f admin f 12971 f 2011-06-15 11:18:41.853161-04 2011-06-15 6375 138 P/D Post Cost 297 -8.21 Post Actual Cost to Standard for item YPAINT1 6646 t f admin f 12972 f 2011-06-15 11:18:41.853161-04 2011-06-15 6376 87 P/D Post Cost 333 -0.25 Set Standard Cost - Material for item YTRUCK1 6651 t f admin f 12973 f 2011-06-15 11:18:41.853161-04 2011-06-15 6376 128 P/D Post Cost 333 0.25 Set Standard Cost - Material for item YTRUCK1 6651 t f admin f 12974 f 2011-06-15 11:18:41.853161-04 2011-06-15 6377 87 P/D Post Cost 332 -0.02 Set Standard Cost - Material for item YTRUCK1 6652 t f admin f 12975 f 2011-06-15 11:18:41.853161-04 2011-06-15 6377 146 P/D Post Cost 332 0.02 Set Standard Cost - Material for item YTRUCK1 6652 t f admin f 12976 f 2011-06-15 11:18:41.853161-04 2011-06-15 6378 87 P/D Post Cost 346 -0.02 Set Standard Cost - Material for item YTRUCK1 6653 t f admin f 12977 f 2011-06-15 11:18:41.853161-04 2011-06-15 6378 146 P/D Post Cost 346 0.02 Set Standard Cost - Material for item YTRUCK1 6653 t f admin f 12978 f 2011-06-15 11:18:41.853161-04 2011-06-15 6379 87 P/D Post Cost 333 0.25 Set Standard Cost - Special Handling for item YTRUCK1 6654 t f admin f 12979 f 2011-06-15 11:18:41.853161-04 2011-06-15 6379 128 P/D Post Cost 333 -0.25 Set Standard Cost - Special Handling for item YTRUCK1 6654 t f admin f 12980 f 2011-06-15 11:18:41.853161-04 2011-06-15 6380 87 P/D Post Cost 332 0.02 Set Standard Cost - Special Handling for item YTRUCK1 6655 t f admin f 12981 f 2011-06-15 11:18:41.853161-04 2011-06-15 6380 146 P/D Post Cost 332 -0.02 Set Standard Cost - Special Handling for item YTRUCK1 6655 t f admin f 12982 f 2011-06-15 11:18:41.853161-04 2011-06-15 6381 87 P/D Post Cost 346 0.02 Set Standard Cost - Special Handling for item YTRUCK1 6656 t f admin f 12983 f 2011-06-15 11:18:41.853161-04 2011-06-15 6381 146 P/D Post Cost 346 -0.02 Set Standard Cost - Special Handling for item YTRUCK1 6656 t f admin f 12984 f 2011-06-15 11:18:41.853161-04 2011-06-15 6382 87 P/D Post Cost 309 -0.37 Set Standard Cost - Material for item STOCKCAR1 6657 t f admin f 12985 f 2011-06-15 11:18:41.853161-04 2011-06-15 6382 128 P/D Post Cost 309 0.37 Set Standard Cost - Material for item STOCKCAR1 6657 t f admin f 12986 f 2011-06-15 11:18:41.853161-04 2011-06-15 6383 87 P/D Post Cost 308 -1.81 Set Standard Cost - Material for item STOCKCAR1 6658 t f admin f 12987 f 2011-06-15 11:18:41.853161-04 2011-06-15 6383 85 P/D Post Cost 308 1.81 Set Standard Cost - Material for item STOCKCAR1 6658 t f admin f 12988 f 2011-06-15 11:18:41.853161-04 2011-06-15 6384 87 P/D Post Cost 309 0.37 Set Standard Cost - Special Handling for item STOCKCAR1 6659 t f admin f 12989 f 2011-06-15 11:18:41.853161-04 2011-06-15 6384 128 P/D Post Cost 309 -0.37 Set Standard Cost - Special Handling for item STOCKCAR1 6659 t f admin f 12990 f 2011-06-15 11:18:41.853161-04 2011-06-15 6385 87 P/D Post Cost 308 1.81 Set Standard Cost - Special Handling for item STOCKCAR1 6660 t f admin f 12991 f 2011-06-15 11:18:41.853161-04 2011-06-15 6385 85 P/D Post Cost 308 -1.81 Set Standard Cost - Special Handling for item STOCKCAR1 6660 t f admin f 12992 f 2011-06-15 11:18:41.853161-04 2011-06-15 6386 87 P/D Post Cost 336 0.15 Post Actual Cost to Standard for item RTRUCK1 6691 t f admin f 12993 f 2011-06-15 11:18:41.853161-04 2011-06-15 6386 146 P/D Post Cost 336 -0.15 Post Actual Cost to Standard for item RTRUCK1 6691 t f admin f 12994 f 2011-06-15 11:18:41.853161-04 2011-06-15 6387 87 P/D Post Cost 342 0.05 Post Actual Cost to Standard for item RTRUCK1 6692 t f admin f 12995 f 2011-06-15 11:18:41.853161-04 2011-06-15 6387 146 P/D Post Cost 342 -0.05 Post Actual Cost to Standard for item RTRUCK1 6692 t f admin f 12996 f 2011-06-15 11:18:41.853161-04 2011-06-15 6388 87 P/D Post Cost 368 0.28 Post Actual Cost to Standard for item RTRUCK1 6693 t f admin f 12997 f 2011-06-15 11:18:41.853161-04 2011-06-15 6388 128 P/D Post Cost 368 -0.28 Post Actual Cost to Standard for item RTRUCK1 6693 t f admin f 12998 f 2011-06-15 11:18:41.853161-04 2011-06-15 6389 87 P/D Post Cost 338 0.20 Post Actual Cost to Standard for item WTRUCK1 6700 t f admin f 12999 f 2011-06-15 11:18:41.853161-04 2011-06-15 6389 146 P/D Post Cost 338 -0.20 Post Actual Cost to Standard for item WTRUCK1 6700 t f admin f 13000 f 2011-06-15 11:18:41.853161-04 2011-06-15 6390 87 P/D Post Cost 344 0.05 Post Actual Cost to Standard for item WTRUCK1 6701 t f admin f 13001 f 2011-06-15 11:18:41.853161-04 2011-06-15 6390 146 P/D Post Cost 344 -0.05 Post Actual Cost to Standard for item WTRUCK1 6701 t f admin f 13002 f 2011-06-15 11:18:41.853161-04 2011-06-15 6391 87 P/D Post Cost 370 0.28 Post Actual Cost to Standard for item WTRUCK1 6702 t f admin f 13003 f 2011-06-15 11:18:41.853161-04 2011-06-15 6391 128 P/D Post Cost 370 -0.28 Post Actual Cost to Standard for item WTRUCK1 6702 t f admin f 13004 f 2011-06-15 11:18:41.853161-04 2011-06-15 6392 87 P/D Post Cost 336 -0.15 Set Standard Cost - Material for item RTRUCK1 6717 t f admin f 13005 f 2011-06-15 11:18:41.853161-04 2011-06-15 6392 146 P/D Post Cost 336 0.15 Set Standard Cost - Material for item RTRUCK1 6717 t f admin f 13006 f 2011-06-15 11:18:41.853161-04 2011-06-15 6393 87 P/D Post Cost 342 -0.05 Set Standard Cost - Material for item RTRUCK1 6718 t f admin f 13007 f 2011-06-15 11:18:41.853161-04 2011-06-15 6393 146 P/D Post Cost 342 0.05 Set Standard Cost - Material for item RTRUCK1 6718 t f admin f 13008 f 2011-06-15 11:18:41.853161-04 2011-06-15 6394 87 P/D Post Cost 368 -0.28 Set Standard Cost - Material for item RTRUCK1 6719 t f admin f 13009 f 2011-06-15 11:18:41.853161-04 2011-06-15 6394 128 P/D Post Cost 368 0.28 Set Standard Cost - Material for item RTRUCK1 6719 t f admin f 13010 f 2011-06-15 11:18:41.853161-04 2011-06-15 6395 87 P/D Post Cost 338 -0.20 Set Standard Cost - Material for item WTRUCK1 6723 t f admin f 13011 f 2011-06-15 11:18:41.853161-04 2011-06-15 6395 146 P/D Post Cost 338 0.20 Set Standard Cost - Material for item WTRUCK1 6723 t f admin f 13012 f 2011-06-15 11:18:41.853161-04 2011-06-15 6396 87 P/D Post Cost 344 -0.05 Set Standard Cost - Material for item WTRUCK1 6724 t f admin f 13013 f 2011-06-15 11:18:41.853161-04 2011-06-15 6396 146 P/D Post Cost 344 0.05 Set Standard Cost - Material for item WTRUCK1 6724 t f admin f 13014 f 2011-06-15 11:18:41.853161-04 2011-06-15 6397 87 P/D Post Cost 370 -0.28 Set Standard Cost - Material for item WTRUCK1 6725 t f admin f 13015 f 2011-06-15 11:18:41.853161-04 2011-06-15 6397 128 P/D Post Cost 370 0.28 Set Standard Cost - Material for item WTRUCK1 6725 t f admin f 13016 f 2011-06-15 11:18:41.853161-04 2011-06-15 6398 87 P/D Post Cost 377 41.08 Post Actual Cost to Standard for item BPAINT1 6780 t f admin f 13017 f 2011-06-15 11:18:41.853161-04 2011-06-15 6398 138 P/D Post Cost 377 -41.08 Post Actual Cost to Standard for item BPAINT1 6780 t f admin f 13018 f 2011-06-15 11:18:41.853161-04 2011-06-15 6399 87 P/D Post Cost 335 0.19 Set Standard Cost - Material for item BTRUCK1 6782 t f admin f 13019 f 2011-06-15 11:18:41.853161-04 2011-06-15 6399 146 P/D Post Cost 335 -0.19 Set Standard Cost - Material for item BTRUCK1 6782 t f admin f 13020 f 2011-06-15 11:18:41.853161-04 2011-06-15 6400 87 P/D Post Cost 341 0.05 Set Standard Cost - Material for item BTRUCK1 6783 t f admin f 13021 f 2011-06-15 11:18:41.853161-04 2011-06-15 6400 146 P/D Post Cost 341 -0.05 Set Standard Cost - Material for item BTRUCK1 6783 t f admin f 13022 f 2011-06-15 11:18:41.853161-04 2011-06-15 6401 87 P/D Post Cost 366 0.29 Set Standard Cost - Material for item BTRUCK1 6784 t f admin f 13023 f 2011-06-15 11:18:41.853161-04 2011-06-15 6401 128 P/D Post Cost 366 -0.29 Set Standard Cost - Material for item BTRUCK1 6784 t f admin f 13024 f 2011-06-15 11:18:41.853161-04 2011-06-15 6402 87 P/D Post Cost 376 39.50 Post Actual Cost to Standard for item RPAINT1 6789 t f admin f 13025 f 2011-06-15 11:18:41.853161-04 2011-06-15 6402 138 P/D Post Cost 376 -39.50 Post Actual Cost to Standard for item RPAINT1 6789 t f admin f 13026 f 2011-06-15 11:18:41.853161-04 2011-06-15 6403 87 P/D Post Cost 336 0.15 Set Standard Cost - Material for item RTRUCK1 6791 t f admin f 13027 f 2011-06-15 11:18:41.853161-04 2011-06-15 6403 146 P/D Post Cost 336 -0.15 Set Standard Cost - Material for item RTRUCK1 6791 t f admin f 13028 f 2011-06-15 11:18:41.853161-04 2011-06-15 6404 87 P/D Post Cost 342 0.05 Set Standard Cost - Material for item RTRUCK1 6792 t f admin f 13029 f 2011-06-15 11:18:41.853161-04 2011-06-15 6404 146 P/D Post Cost 342 -0.05 Set Standard Cost - Material for item RTRUCK1 6792 t f admin f 13030 f 2011-06-15 11:18:41.853161-04 2011-06-15 6405 87 P/D Post Cost 368 0.28 Set Standard Cost - Material for item RTRUCK1 6793 t f admin f 13031 f 2011-06-15 11:18:41.853161-04 2011-06-15 6405 128 P/D Post Cost 368 -0.28 Set Standard Cost - Material for item RTRUCK1 6793 t f admin f 13032 f 2011-06-15 11:18:41.853161-04 2011-06-15 6406 87 P/D Post Cost 378 39.96 Post Actual Cost to Standard for item WPAINT1 6798 t f admin f 13033 f 2011-06-15 11:18:41.853161-04 2011-06-15 6406 138 P/D Post Cost 378 -39.96 Post Actual Cost to Standard for item WPAINT1 6798 t f admin f 13034 f 2011-06-15 11:18:41.853161-04 2011-06-15 6407 87 P/D Post Cost 338 0.20 Set Standard Cost - Material for item WTRUCK1 6800 t f admin f 13035 f 2011-06-15 11:18:41.853161-04 2011-06-15 6407 146 P/D Post Cost 338 -0.20 Set Standard Cost - Material for item WTRUCK1 6800 t f admin f 13036 f 2011-06-15 11:18:41.853161-04 2011-06-15 6408 87 P/D Post Cost 344 0.05 Set Standard Cost - Material for item WTRUCK1 6801 t f admin f 13037 f 2011-06-15 11:18:41.853161-04 2011-06-15 6408 146 P/D Post Cost 344 -0.05 Set Standard Cost - Material for item WTRUCK1 6801 t f admin f 13038 f 2011-06-15 11:18:41.853161-04 2011-06-15 6409 87 P/D Post Cost 370 0.28 Set Standard Cost - Material for item WTRUCK1 6802 t f admin f 13039 f 2011-06-15 11:18:41.853161-04 2011-06-15 6409 128 P/D Post Cost 370 -0.28 Set Standard Cost - Material for item WTRUCK1 6802 t f admin f 13040 f 2011-06-15 11:19:19.192094-04 2011-06-15 6410 87 P/D Post Cost 385 350.00 Set Standard Cost - Material for item TSUB2 6859 t f admin f 13041 f 2011-06-15 11:19:19.192094-04 2011-06-15 6410 138 P/D Post Cost 385 -350.00 Set Standard Cost - Material for item TSUB2 6859 t f admin f 13042 f 2011-06-15 11:19:19.192094-04 2011-06-15 6411 87 P/D Post Cost 323 6.35 Set Standard Cost - Material for item STRUCK1 6860 t f admin f 13043 f 2011-06-15 11:19:19.192094-04 2011-06-15 6411 85 P/D Post Cost 323 -6.35 Set Standard Cost - Material for item STRUCK1 6860 t f admin f 13044 f 2011-06-15 11:19:19.192094-04 2011-06-15 6412 87 P/D Post Cost 325 8.47 Set Standard Cost - Material for item STRUCK1 6861 t f admin f 13045 f 2011-06-15 11:19:19.192094-04 2011-06-15 6412 128 P/D Post Cost 325 -8.47 Set Standard Cost - Material for item STRUCK1 6861 t f admin f 13046 f 2011-06-15 11:19:19.192094-04 2011-06-15 6413 87 P/D Post Cost 323 0.01 Set Standard Cost - Special Handling for item STRUCK1 6862 t f admin f 13047 f 2011-06-15 11:19:19.192094-04 2011-06-15 6413 85 P/D Post Cost 323 -0.01 Set Standard Cost - Special Handling for item STRUCK1 6862 t f admin f 13048 f 2011-06-15 11:19:19.192094-04 2011-06-15 6414 87 P/D Post Cost 325 0.01 Set Standard Cost - Special Handling for item STRUCK1 6863 t f admin f 13049 f 2011-06-15 11:19:19.192094-04 2011-06-15 6414 128 P/D Post Cost 325 -0.01 Set Standard Cost - Special Handling for item STRUCK1 6863 t f admin f 13050 f 2011-06-15 11:19:19.192094-04 2011-06-15 6415 87 P/D Post Cost 333 444.63 Set Standard Cost - Material for item YTRUCK1 6864 t f admin f 13051 f 2011-06-15 11:19:19.192094-04 2011-06-15 6415 128 P/D Post Cost 333 -444.63 Set Standard Cost - Material for item YTRUCK1 6864 t f admin f 13052 f 2011-06-15 11:19:19.192094-04 2011-06-15 6416 87 P/D Post Cost 332 38.11 Set Standard Cost - Material for item YTRUCK1 6865 t f admin f 13053 f 2011-06-15 11:19:19.192094-04 2011-06-15 6416 146 P/D Post Cost 332 -38.11 Set Standard Cost - Material for item YTRUCK1 6865 t f admin f 13054 f 2011-06-15 11:19:19.192094-04 2011-06-15 6417 87 P/D Post Cost 346 42.35 Set Standard Cost - Material for item YTRUCK1 6866 t f admin f 13055 f 2011-06-15 11:19:19.192094-04 2011-06-15 6417 146 P/D Post Cost 346 -42.35 Set Standard Cost - Material for item YTRUCK1 6866 t f admin f 13056 f 2011-06-15 11:19:19.192094-04 2011-06-15 6418 87 P/D Post Cost 332 0.04 Set Standard Cost - Special Handling for item YTRUCK1 6867 t f admin f 13057 f 2011-06-15 11:19:19.192094-04 2011-06-15 6418 146 P/D Post Cost 332 -0.04 Set Standard Cost - Special Handling for item YTRUCK1 6867 t f admin f 13058 f 2011-06-15 11:19:19.192094-04 2011-06-15 6419 87 P/D Post Cost 346 0.04 Set Standard Cost - Special Handling for item YTRUCK1 6868 t f admin f 13059 f 2011-06-15 11:19:19.192094-04 2011-06-15 6419 146 P/D Post Cost 346 -0.04 Set Standard Cost - Special Handling for item YTRUCK1 6868 t f admin f 13060 f 2011-06-15 11:19:19.192094-04 2011-06-15 6420 87 P/D Post Cost 333 0.42 Set Standard Cost - Special Handling for item YTRUCK1 6869 t f admin f 13061 f 2011-06-15 11:19:19.192094-04 2011-06-15 6420 128 P/D Post Cost 333 -0.42 Set Standard Cost - Special Handling for item YTRUCK1 6869 t f admin f \. -- -- Data for Name: grp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY grp (grp_id, grp_name, grp_descrip) FROM stdin; 1 ADMIN Admin Users \. -- -- Data for Name: grppriv; Type: TABLE DATA; Schema: public; Owner: admin -- COPY grppriv (grppriv_id, grppriv_grp_id, grppriv_priv_id) FROM stdin; 1 1 487 2 1 488 3 1 489 4 1 267 5 1 268 6 1 271 7 1 272 8 1 275 9 1 276 10 1 277 11 1 278 12 1 279 13 1 280 14 1 294 15 1 297 16 1 298 17 1 302 18 1 303 19 1 369 20 1 370 21 1 313 22 1 314 23 1 315 24 1 371 25 1 372 26 1 334 27 1 335 28 1 373 29 1 374 30 1 375 31 1 376 32 1 377 33 1 378 34 1 356 35 1 357 36 1 358 37 1 379 38 1 380 39 1 382 40 1 395 41 1 396 42 1 397 43 1 398 44 1 407 45 1 455 46 1 456 47 1 457 48 1 458 49 1 461 50 1 462 51 1 463 52 1 464 53 1 465 54 1 466 55 1 467 56 1 468 57 1 469 58 1 475 59 1 476 60 1 305 61 1 179 62 1 251 63 1 252 64 1 254 65 1 260 66 1 261 67 1 262 68 1 263 69 1 266 70 1 187 71 1 188 72 1 259 73 1 497 74 1 483 75 1 484 76 1 391 77 1 392 78 1 415 79 1 416 81 1 418 82 1 420 84 1 422 85 1 423 86 1 424 87 1 425 88 1 426 89 1 427 90 1 428 91 1 429 92 1 430 93 1 431 94 1 433 96 1 435 97 1 436 98 1 437 99 1 438 100 1 439 101 1 440 102 1 441 103 1 442 104 1 443 105 1 444 106 1 419 107 1 432 108 1 446 109 1 447 110 1 448 111 1 449 112 1 450 113 1 451 114 1 480 115 1 481 116 1 482 117 1 214 118 1 86 119 1 90 120 1 116 121 1 117 122 1 118 123 1 119 124 1 14 125 1 15 126 1 128 127 1 129 128 1 131 129 1 130 130 1 132 131 1 133 132 1 147 133 1 81 134 1 148 135 1 19 136 1 149 137 1 150 138 1 151 139 1 152 140 1 154 141 1 153 142 1 35 143 1 36 144 1 164 145 1 215 146 1 217 147 1 218 148 1 219 149 1 220 150 1 223 151 1 224 152 1 225 153 1 216 154 1 222 155 1 221 156 1 226 157 1 227 158 1 241 159 1 238 160 1 255 161 1 256 162 1 264 163 1 265 164 1 350 165 1 351 166 1 367 167 1 413 168 1 454 169 1 470 170 1 472 171 1 473 172 1 474 173 1 10 174 1 30 175 1 29 176 1 37 177 1 42 178 1 84 179 1 82 180 1 83 181 1 85 182 1 501 183 1 508 184 1 17 185 1 16 186 1 91 187 1 27 188 1 11 189 1 93 190 1 12 191 1 13 192 1 26 193 1 75 194 1 76 195 1 94 196 1 125 197 1 135 198 1 136 199 1 139 200 1 140 201 1 173 202 1 174 203 1 175 204 1 176 205 1 177 206 1 178 207 1 182 208 1 228 209 1 352 210 1 400 211 1 401 212 1 402 213 1 408 214 1 409 215 1 410 216 1 306 217 1 307 218 1 269 219 1 270 220 1 362 221 1 363 222 1 390 223 1 492 224 1 493 225 1 494 226 1 5 227 1 20 228 1 21 229 1 4 230 1 103 231 1 104 232 1 105 233 1 106 234 1 107 235 1 1 236 1 2 237 1 113 238 1 114 239 1 6 240 1 7 241 1 134 242 1 143 243 1 144 244 1 155 245 1 156 246 1 157 247 1 158 248 1 159 249 1 160 250 1 31 251 1 115 252 1 112 253 1 161 254 1 162 255 1 163 256 1 316 257 1 317 258 1 349 259 1 45 260 1 44 261 1 48 262 1 49 263 1 53 264 1 54 265 1 46 266 1 47 267 1 120 268 1 137 269 1 189 270 1 204 271 1 205 272 1 207 273 1 208 274 1 209 275 1 213 276 1 231 277 1 244 278 1 245 279 1 246 280 1 249 281 1 250 282 1 353 283 1 354 284 1 368 285 1 383 286 1 452 287 1 23 288 1 51 289 1 55 290 1 56 291 1 57 292 1 58 293 1 61 294 1 62 295 1 59 296 1 60 297 1 50 298 1 88 299 1 89 300 1 111 301 1 126 302 1 127 303 1 141 304 1 142 305 1 180 306 1 181 307 1 190 308 1 191 309 1 192 310 1 193 311 1 194 312 1 195 313 1 196 314 1 197 315 1 198 316 1 199 317 1 200 318 1 201 319 1 202 320 1 232 321 1 203 322 1 233 323 1 70 324 1 234 325 1 235 326 1 211 327 1 212 328 1 239 329 1 242 330 1 257 331 1 258 332 1 273 333 1 274 334 1 281 335 1 336 336 1 337 337 1 346 338 1 347 339 1 348 340 1 355 341 1 385 342 1 386 343 1 389 344 1 393 345 1 459 346 1 460 347 1 22 348 1 490 349 1 491 350 1 498 351 1 477 352 1 478 353 1 479 354 1 285 355 1 286 356 1 282 357 1 283 358 1 284 359 1 287 360 1 288 361 1 289 362 1 290 363 1 291 364 1 292 365 1 293 366 1 411 367 1 412 368 1 414 369 1 123 370 1 124 371 1 68 372 1 165 373 1 166 374 1 167 375 1 168 376 1 169 377 1 170 378 1 236 379 1 247 380 1 248 381 1 253 382 1 3 383 1 345 384 1 359 385 1 364 386 1 365 387 1 366 388 1 387 389 1 388 390 1 394 391 1 399 392 1 403 393 1 404 394 1 405 395 1 406 396 1 445 397 1 453 398 1 471 399 1 485 400 1 486 401 1 100 402 1 63 403 1 64 404 1 65 405 1 73 406 1 121 407 1 122 408 1 101 409 1 87 410 1 495 411 1 496 412 1 499 413 1 502 414 1 503 415 1 504 416 1 505 417 1 506 418 1 500 419 1 509 420 1 513 421 1 514 422 1 515 423 1 510 425 1 512 426 1 519 427 1 516 428 1 517 429 1 518 430 1 520 431 1 521 432 1 522 433 1 523 434 1 524 435 1 525 436 1 531 437 1 536 438 1 537 439 1 538 440 1 539 441 1 526 442 1 527 443 1 532 444 1 533 445 1 534 446 1 535 447 1 549 448 1 550 449 1 541 450 1 542 451 1 543 452 1 544 453 1 540 454 1 546 455 1 547 456 1 548 457 1 551 458 1 581 459 1 582 460 1 583 461 1 584 462 1 585 463 1 586 464 1 587 465 1 588 466 1 589 467 1 590 468 1 591 469 1 592 470 1 593 471 1 594 472 1 595 473 1 596 474 1 597 475 1 598 476 1 599 477 1 600 478 1 601 479 1 602 480 1 603 481 1 604 482 1 629 483 1 630 484 1 631 485 1 632 486 1 605 487 1 606 488 1 607 489 1 608 490 1 609 491 1 610 492 1 611 493 1 612 494 1 613 495 1 614 496 1 615 497 1 616 498 1 617 499 1 618 500 1 619 501 1 620 502 1 621 503 1 622 504 1 623 505 1 624 506 1 625 507 1 626 508 1 627 509 1 628 510 1 633 511 1 561 512 1 562 513 1 563 514 1 564 515 1 565 516 1 566 517 1 567 518 1 645 519 1 646 520 1 647 521 1 648 \. -- -- Data for Name: hnfc; Type: TABLE DATA; Schema: public; Owner: admin -- COPY hnfc (hnfc_id, hnfc_code) FROM stdin; 1 Dr 2 Miss 3 Mr 4 Mrs 5 Ms \. -- -- Data for Name: image; Type: TABLE DATA; Schema: public; Owner: admin -- COPY image (image_id, image_name, image_descrip, image_data) FROM stdin; 16 mfgadmin mfgadmin begin 644 internal\nMB5!.1PT*&@H````-24A$4@```)P```!R"`(````IE"_H````"7!(67,```[#\nM```.PP'';ZAD```@`$E$051XG.V]::QM6W;7]YO-ZM?N3G_NO>^^KNJYJEP.\nMAA!%B`3',DTL2P[8!98@(679<>+$(7*JWK=;4Z[N]6OV>3#VOO<<]^K4_?5X?QUSM;6\nMVG/.M>88?Q1CD(L&,`62%K1(@<1&`,.`1#J_PV9.40]T)@>WW://D%*@5\nMHD8X7(3=@0@4M(CMD[@,IB`$"VAYIM!;00P8Q"$`O$18D'BWO<[F^M5W89_*\nMZ]FVANL8LOLG%[S`-"!VSZPW.02\nM!GIP"(T'U*8Z0[M$0OO4O39MB^VGVSZDP`N$P"L86OR5!!S"XQV8;:YG#RV&\nM1NK9/.@3G4G\\5H;"7=/$@"O1L,DUV/%&1AXQM'T+=I/>#TJ47@PW$B#=U;UP\nM$H4?\\HIK1B]`@P+`;!]2;:+CV`$&J\\W+L$'6[T.%7<(@P`A\\>6V_&>,:P^QD=0UI6X^\nM'5X\\G<5M)>Z>.&?DM=I:?+_5ZS5/X.76KV_"$.!1%F!H]8#99A\\L3S]=\nME-S^Y,3&/C0N0NAM`K/-&.,'3QML#5'@U::OD69;YC:C'XROW[0&9W$):'RP\nM2>F#:^Z=C1!P2+`:@J?J^XR@$4/]U?99KVQ1;.WCJM<93//*^;BM/:FMDM0U\nM?SYX)`3FZJ+GRO<*_^0N5]IED]&;K><$#UYO&]S6-PQJ%CVRQU_@%23X!`]T\nMB`K1;_O1"6B08&`)'B((\\4"+,`B/5_BM!,3U]MHAQ-8?7+DB_92[8EL;;Y`M\nM?G!I[^V#OJK0"/NDO]EH$3:>]TI_6_O#/^5>O-AF'/"T,7F]&48]Z6S>6UN_\nM^7_2Q:J-;Q\\Z;*^V#>ZJG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%B!DL@`ADP4(F2Q`R&0!0B8+$#)9@)#)`H1,%B!D\nML@`ADP4(F2Q`R&0!0B8+$#)9@)#)`H1,%B!DL@`ADP4(F2Q`R&0!0B8+$#)9\nM@)#)`H1,%B!DL@`ADP4(F2Q`R&0!0B8+$#)9@)#)`H1,%B!DL@`ADP4(F2Q`\nMR&0!0B8+$#)9@)#)`H1,%B!DL@`ADP4(F2Q`R&0!0B8+$#)9@)#)`H1,%B!D\nML@`ADP4(F2Q`R&0!0B8+$#)9@)#)`H1,%B!DL@`ADP4(F2Q`R&0!0B8+$#)9\nM@)#)`H1,%B!DL@`ADP4(F2Q`R&0!0B8+$#)9@)#)`H1,%B!DL@`ADP4(F2Q`\nMR&0!0B8+$#)9@)#)`H1,%B!DL@`ADP4(F2Q`R&0!0B8+$#)9@)#)`H1,%B!D\nML@`ADP4(F2Q`R&0!0B8+$#)9@)#)`H1,%B!DL@`ADP4(F2Q`R&0!0B8+$#)9\nD@)#)`H1,%B!DL@`ADP4(7<0S!:]@=&6M`````$E%3D2N0F""\n`\nend\n 23 pinstripe pinstripe begin 644 internal\nMB5!.1PT*&@H````-24A$4@````(````""`(```#]U)IS````"7!(67,```L2\nM```+$@'2W7[\\````%DE$050(F6-DLNUD8&!@\\?+R8F!@```-9P&L)F@250``\n*``!)14Y$KD)@@@``\n`\nend\n 24 NoAssemblyDiagram No Assembly Diagram begin 644 internal\nMB5!.1PT*&@H````-24A$4@```*T```"U"`,````:](^'````,%!,5$4```"`\nM````@`"`@````("``(``@("`@(#`P,#_````_P#__P```/__`/\\`______][\nM'['$````"7!(67,```[$```.Q`&5*PX;```%64E$051XG.V_$6\nMD5)2_O]OG[H@GAVH`@-I^6Z:SG@JF$PF_/R;23]W`WRD&6E?DRAIXY2T<4K:\nM.*VTK5*M<85@BC]JL$/Z!?D%X72\nMR@8D=KN:)Q@)_KI^Q6]$L>H*H_5&!VTD+]+8R\\UI<8W[TU.VGY-,&;.A2=YAY:1",]/Y*MPVP+A]U)BS-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MEN5@"\\6N`(0*:J!C6A\nM`Z@54R,)"!$?IMU;V[_W@\\N73VZEQNL$\nM.YMOWUY,Y\\O5Y_^%57#0G5G2B!H9LAN(*"FQL#HHL;\nM5+/*".#,-ZZ6FYM5!TS)B=$%W(T4O02WZ(@8'9"(,E"E60[3]F!_!".7DLT#\nMF0))<%?SS7:]NL-A<7R^N+6K*A1@DGKYZ7OAO+6,J`C.O-:MVOY'YWG6MUY,Z:\nM?AF?G&Q^]LE7@[.'&;@,%@$9P0P!D0&CDSF@P^@*6(F``1&0W0@O8#C0]W=G+.:3(=>O#@5\\OXVL;&/D+N+J?"_G3=>1@,]BVFK;H.6C7_S/KW[Y\nM2$%']^I<$`$S8+ZQW#)B1O0;4@K("!T);C:#_'?XGX("N8@`8>X'1F#,A`I@\nM``1`!E`)*E=@N"D$8'3Q]/$""P%16I@ZHMC0DZG$*"Q>2A2ZNCP#,2(H900)\nMFWZ`W-O8^VJ)U7HD;:>7ZW%K;^_6]LQJ7_I>P+WV;CFE-C8SI*`&AM#G?A@&\nM1&S:)*-)#3O__O')Q\\_/US#7N',#1AFX`:@0.2`0N!,8_L[U0V,&`$!T=[I)\nM#G!%!T)SQ!"D:A[Z*,G@9NX```:`;FPD#`A:7:NP!UD-IQ\\^\\/SJ;Z\nM9;]Z>YF]K#,J7VS&#G4KQ39$H`D@HQD1`H&!`1'_Y-W[CW[QT6^>GV5IE<4<\nM"!%-'`A!'&Z$,D`M-JQK7A(#4*AFG!I2\nM';N-N#>A(:!QZ![NM0=^=&L>QG9R='0XI;P_#=-`23@U#7@49#%RA!B3!+D!\nM&_FLO/;XV#J9#`HU4A4 Closed 4 1 P 3 2006-10-25 15:00:07.531 mfgadmin Priority Changed: -> Normal 5 1 E 1 2006-10-25 15:00:07.531 mfgadmin Resolution Changed: -> Fixed 6 2 N \N 2006-10-25 15:20:05.437 mfgadmin Incident Added 7 2 S \N 2006-10-30 10:47:47.293 jsmith Status Changed: New -> Closed 8 2 E 1 2006-10-30 10:47:47.293 jsmith Resolution Changed: -> Fixed 9 1 L 2 2007-07-03 16:25:02.725 mfgadmin Note #2 Added 10 1 L 3 2007-07-03 16:25:40.522 mfgadmin Note #3 Added 11 1 S \N 2010-06-07 11:22:44.6323 admin Status Changed: Closed -> New 12 1 S \N 2010-06-07 11:22:53.292123 admin Status Changed: New -> Feedback 13 1 S \N 2010-06-07 11:23:01.228219 admin Status Changed: Feedback -> Confirmed 14 1 S \N 2010-06-07 11:23:09.010404 admin Status Changed: Confirmed -> Assigned 15 2 S \N 2010-06-07 11:23:17.215685 admin Status Changed: Closed -> Resolved 16 3 N \N 2010-06-07 11:30:26.837344 admin Incident Added 17 3 V 3 2010-06-07 11:33:47.379517 admin Severity Changed: -> Normal 18 3 P 3 2010-06-07 11:33:47.379517 admin Priority Changed: -> Normal 19 3 \N \N 2010-06-07 11:35:43.103974 admin Summary Updated: "Proposed Paint Change" -> "Proposed Paint Change for Stockcar1" 20 3 S \N 2010-06-07 11:35:43.103974 admin Status Changed: New -> Resolved 21 3 A \N 2010-06-07 11:35:43.103974 admin Assigned to: "" -> "admin" 22 3 S \N 2010-06-07 11:36:24.768493 admin Status Changed: Resolved -> Confirmed 23 4 N \N 2010-06-07 14:04:31.791776 admin Incident Added 24 3 \N \N 2010-06-07 14:06:56.987653 admin Summary Updated: "Proposed Paint Change for Stockcar1" -> "ECO-Proposed Paint Change for Stockcar1" 25 3 \N \N 2010-06-07 14:06:56.987653 admin Description Updated: "Changing paint to Ne..." -> "ECO-Changing paint t..." 26 4 \N \N 2010-06-07 14:07:21.239723 admin Description Updated: "..." -> "ECO-Change TSUBS..." \. -- -- Data for Name: incdtpriority; Type: TABLE DATA; Schema: public; Owner: admin -- COPY incdtpriority (incdtpriority_id, incdtpriority_name, incdtpriority_order, incdtpriority_descrip) FROM stdin; 1 Very High 0 Very High 2 High 1 High 3 Normal 2 Normal 4 Low 3 Low 5 Very Low 4 Very Low \. -- -- Data for Name: incdtresolution; Type: TABLE DATA; Schema: public; Owner: admin -- COPY incdtresolution (incdtresolution_id, incdtresolution_name, incdtresolution_order, incdtresolution_descrip) FROM stdin; 1 Fixed 0 Fixed 2 Duplicate 1 Duplicate 3 Not Fixable 2 Not Fixable 4 Won't Fix 3 Won't Fix \. -- -- Data for Name: incdtseverity; Type: TABLE DATA; Schema: public; Owner: admin -- COPY incdtseverity (incdtseverity_id, incdtseverity_name, incdtseverity_order, incdtseverity_descrip) FROM stdin; 1 Trivial 0 Trivial 2 Minor 1 Minor 3 Normal 2 Normal 4 Severe 3 Severe 5 Critical 4 Critical \. -- -- Data for Name: invbal; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invbal (invbal_id, invbal_period_id, invbal_itemsite_id, invbal_qoh_beginning, invbal_qoh_ending, invbal_qty_in, invbal_qty_out, invbal_value_beginning, invbal_value_ending, invbal_value_in, invbal_value_out, invbal_nn_beginning, invbal_nn_ending, invbal_nn_in, invbal_nn_out, invbal_nnval_beginning, invbal_nnval_ending, invbal_nnval_in, invbal_nnval_out, invbal_dirty) FROM stdin; \. -- -- Data for Name: invchead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invchead (invchead_id, invchead_cust_id, invchead_shipto_id, invchead_ordernumber, invchead_orderdate, invchead_posted, invchead_printed, invchead_invcnumber, invchead_invcdate, invchead_shipdate, invchead_ponumber, invchead_shipvia, invchead_fob, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_phone, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_phone, invchead_salesrep_id, invchead_commission, invchead_terms_id, invchead_freight, invchead_misc_amount, invchead_misc_descrip, invchead_misc_accnt_id, invchead_payment, invchead_paymentref, invchead_notes, invchead_billto_country, invchead_shipto_country, invchead_prj_id, invchead_curr_id, invchead_gldistdate, invchead_recurring, invchead_recurring_interval, invchead_recurring_type, invchead_recurring_until, invchead_recurring_invchead_id, invchead_shipchrg_id, invchead_taxzone_id, invchead_void, invchead_saletype_id, invchead_shipzone_id) FROM stdin; 90 97 \N 50196 2009-09-21 t t 60082 2009-09-21 2009-09-21 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 13020.83 0.00 \N 0.00 \N United Kingdom \N 3 2009-09-21 f \N \N \N \N 4 \N f \N \N 46 97 -1 \N 2007-05-30 t f 60038 2007-05-30 2007-05-30 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United Kingdom -1 3 \N f \N \N \N \N \N 1 f \N \N 105 95 31 40012 2010-06-07 t f 60095 2010-06-07 2010-06-07 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2010-06-07 f \N \N \N \N 4 2 f \N 35 34 95 -1 99001 2006-08-31 t t 60027 2006-08-31 2006-08-31 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 \N f \N \N \N \N \N 2 f \N \N 44 95 31 99001 2007-04-05 t f 60036 2007-04-05 2007-04-05 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 \N f \N \N \N \N \N 2 f \N 35 47 97 -1 \N 2007-05-30 t f 60039 2007-05-30 2007-05-30 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United Kingdom -1 3 2007-05-30 f \N \N \N \N \N 1 f \N \N 49 95 31 \N 2007-07-04 t f 60041 2007-07-04 2007-07-04 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2007-07-04 f \N \N \N \N \N 2 f \N 35 52 95 31 \N 2007-09-21 t t 60044 2007-09-21 2007-09-21 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States 4 1 2007-09-21 f \N \N \N \N \N 2 f \N 35 64 95 -1 \N 2008-06-12 t t 60056 2008-06-12 2008-06-12 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2008-06-12 f \N \N \N \N \N 2 f \N \N 80 97 -1 \N 2008-10-02 t f 60072 2008-10-02 2008-10-02 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2008-10-02 f \N \N \N \N -1 \N f \N \N 83 95 31 \N 2008-12-31 t f 60075 2008-12-31 2008-12-31 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2008-11-01 f \N \N \N \N -1 \N f \N 35 87 95 31 \N 2009-01-01 t f 60079 2009-01-01 2009-01-01 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2009-01-01 f \N \N \N \N -1 2 f \N 35 91 95 31 \N 2009-09-22 t f 60083 2009-09-22 2009-09-22 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2009-09-22 f \N \N \N \N -1 2 f \N 35 92 95 -1 \N 2009-09-22 t f 60084 2009-09-22 2009-09-22 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States -1 1 2009-09-22 f \N \N \N \N -1 2 f \N \N 98 95 31 \N 2009-12-03 t t 60088 2009-12-03 2009-12-03 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2009-12-03 f \N \N \N \N -1 2 f \N 35 99 95 31 50200 2009-12-03 t t 60089 2009-12-03 2009-12-03 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 18750.00 0.00 \N 0.00 \N United States United States \N 1 2009-12-03 f \N \N \N \N 4 2 f \N 35 55 97 -1 50168 2007-12-14 t t 60047 2007-12-14 2007-12-14 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N United Kingdom -1 3 2007-12-14 f \N \N \N \N 4 \N f \N \N 100 95 31 50201 2010-03-10 t t 60090 2010-03-10 2010-03-10 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2010-03-10 f \N \N \N \N 4 2 f \N 35 101 95 31 50202 2010-03-12 t t 60091 2010-03-12 2010-03-12 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 1758.75 0.00 \N 0.00 \N United States United States \N 1 2010-03-12 f \N \N \N \N 4 2 f \N 35 103 95 31 50204 2010-03-12 t t 60093 2010-03-12 2010-03-12 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 \N 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2010-03-12 f \N \N \N \N 4 2 f \N 35 104 97 34 40011 2010-04-02 t f 60094 2010-04-02 2010-04-02 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 0.00 0.00 \N 0.00 \N United Kingdom United Kingdom \N 3 2010-04-02 f \N \N \N \N 4 1 f \N \N 102 95 31 \N 2010-01-01 t f 60092 2010-01-01 2010-01-01 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2010-01-01 f \N \N \N \N -1 2 f \N 35 41 97 -1 50160 2007-01-10 t t 60033 2007-02-20 2007-02-20 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 55.00 0.00 -1 0.00 \N \N United Kingdom -1 3 \N f \N \N \N \N 4 1 f \N \N 3 95 31 50002 2005-12-27 t t 60001 2005-12-27 2005-12-27 UPS - Prepaid Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 800-321-5433 29 0.0750000000 42 7.74 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 8 95 31 50003 2005-12-27 t t 60004 2005-12-27 2005-12-27 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 79 95 33 50186 2008-10-02 t t 60071 2008-10-02 2008-10-02 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 336-321-9857 29 0.0007000000 42 300.00 0.00 \N 0.00 \N United States United States \N 1 2008-10-02 f \N \N \N \N 4 1 f \N 36 1 95 31 50001 2005-12-27 t t 60000 2005-12-27 2005-12-27 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 800-321-5433 29 0.0750000000 42 99.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 5 95 31 50003 2005-12-27 t t 60002 2005-12-27 2005-12-27 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 800-321-5433 29 0.0750000000 42 5.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 6 95 31 50003 2005-12-27 t t 60003 2005-12-27 2005-12-27 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 800-321-5433 29 0.0750000000 42 5.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 9 95 31 50003 2005-12-27 t t 60005 2005-12-27 2005-12-27 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 10 95 -1 50004 2005-12-27 t t 60006 2005-12-27 2005-12-27 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N \N 15 95 31 50008 2006-01-09 t t 60009 2006-01-09 2006-01-09 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 99.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 12 95 -1 40000 2005-12-27 t t 60007 2005-12-29 2005-12-29 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills Virginia 22209 USA Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 USA 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N \N 13 95 31 50005 2005-12-29 t t 60008 2005-12-29 2005-12-29 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 100.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 16 95 31 50009 2006-01-09 t t 60010 2006-01-09 2006-01-09 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 17 95 31 50030 2006-01-09 t t 60011 2006-01-09 2006-01-09 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 8.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 18 95 31 50031 2006-01-09 t t 60012 2006-01-09 2006-01-09 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 4.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 19 95 -1 50037 2006-01-11 t f 60013 2006-01-11 2006-01-11 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N \N 20 95 31 50039 2006-01-11 t t 60014 2006-01-11 2006-01-11 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 21 95 31 50040 2006-01-11 t t 60015 2006-01-11 2006-01-11 UPS - Prepaid Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 7.74 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 22 95 31 50041 2006-01-11 t t 60016 2006-01-11 2006-01-11 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N 35 23 95 -1 50037 2006-01-11 t t 60017 2006-01-12 2006-01-12 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N \N \N \N 1 \N f \N \N \N \N 4 2 f \N \N 24 95 31 50043 2006-01-13 t t 60018 2006-01-13 2006-01-13 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N United States United States \N 1 \N f \N \N \N \N 4 2 f \N 35 25 95 31 40005 2006-01-13 t t 60019 2006-01-13 2006-01-13 UPS - Prepaid Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 29 0.0750000000 42 7.74 0.00 -1 0.00 \N \N United States United States \N 1 \N f \N \N \N \N 4 2 f \N 35 26 95 31 50045 2006-01-13 t t 60020 2006-01-13 2006-01-13 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N United States United States \N 1 \N f \N \N \N \N 4 2 f \N 35 27 95 31 50046 2006-01-13 t t 60021 2006-01-13 2006-01-13 UPS-GROUND-UPS Ground Tremendous Toys Inc. Tremendous Toys Inc. 100 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 54.00 0.00 -1 0.00 \N \N United States United States \N 1 \N f \N \N \N \N 4 2 f \N 35 28 95 31 50148 2006-01-30 t t 60022 2006-01-30 2006-01-30 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 90.00 0.00 -1 0.00 \N \N United States United States \N 1 \N f \N \N \N \N 4 2 f \N 35 29 95 31 50149 2006-01-30 t t 60023 2006-01-30 2006-01-30 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 100.00 0.00 -1 0.00 \N \N United States United States \N 1 \N f \N \N \N \N 4 2 f \N 35 30 95 31 50150 2006-01-31 t t 60024 2006-02-01 2006-02-01 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 37.00 0.00 -1 0.00 \N United States United States \N 1 \N f \N \N \N \N 4 2 f \N 35 32 95 31 50151 2006-07-05 t t 60025 2006-07-05 2006-07-05 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 99.00 0.00 -1 0.00 \N \N United States United States -1 1 \N f \N \N \N \N 4 2 f \N 35 33 95 31 50152 2006-07-05 t t 60026 2006-07-05 2006-07-05 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 37.00 0.00 -1 0.00 \N United States United States -1 1 \N f \N \N \N \N 4 2 f \N 35 35 95 31 50155 2006-10-13 t t 60028 2006-10-13 2006-10-13 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 45.00 0.00 -1 0.00 \N \N UNITED STATES UNITED STATES -1 1 \N f \N \N \N \N 4 2 f \N 35 37 95 31 50157 2006-12-05 t t 60029 2006-12-05 2006-12-05 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N UNITED STATES UNITED STATES -1 1 \N f \N \N \N \N 4 2 f \N 35 38 95 31 50158 2006-12-28 t t 60030 2006-12-28 2006-12-28 FEDX-Ground-Fedex Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 32.00 0.00 -1 0.00 \N \N United States United States -1 1 \N f \N \N \N \N 4 2 f \N 35 39 95 31 50159 2007-01-08 t t 60031 2007-01-08 2007-01-08 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 99.00 0.00 -1 0.00 \N \N United States United States -1 1 \N f \N \N \N \N 4 2 f \N 35 40 95 31 50159 2007-01-08 t t 60032 2007-01-08 2007-01-08 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 99.00 0.00 -1 0.00 \N \N United States United States -1 1 \N f \N \N \N \N 4 2 f \N 35 43 95 31 50162 2007-04-05 t t 60035 2007-04-05 2007-04-05 FEDEX - Ground-FEDEX Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 99.00 0.00 -1 0.00 \N \N United States United States -1 1 \N f \N \N \N \N 4 2 f \N 35 45 95 31 50163 2007-05-26 t t 60037 2007-05-30 2007-05-30 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 100.00 0.00 -1 0.00 \N \N United States United States -1 1 \N f \N \N \N \N 4 2 f \N 35 42 95 31 50161 2007-02-20 t t 60034 2007-02-20 2007-02-20 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 45.00 0.00 -1 0.00 \N \N United States United States -1 1 \N f \N \N \N \N 4 2 f \N 35 48 95 33 50164 2007-05-30 t t 60040 2007-05-30 2007-05-30 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 336-321-9857 29 0.0750000000 42 100.00 0.00 -1 0.00 \N \N United States United States -1 1 2007-05-30 f \N \N \N \N 4 1 f \N 36 54 97 -1 50167 2007-12-14 t t 60046 2007-12-14 2007-12-14 UPS-GROUND-UPS Ground \N Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N United Kingdom United Kingdom \N 3 2007-12-14 f \N \N \N \N 4 \N f \N \N 53 97 -1 40007 2007-12-14 t t 60045 2007-12-14 2007-12-14 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 100.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2007-12-14 f \N \N \N \N 4 1 f \N \N 56 97 -1 40008 2007-12-20 t t 60048 2007-12-20 2007-12-20 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 100.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2007-12-20 f \N \N \N \N 4 \N f \N \N 50 95 31 40006 2007-08-31 t t 60042 2007-08-31 2007-08-31 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 29 0.0750000000 42 37.00 0.00 -1 0.00 \N United States United States -1 1 2007-08-31 f \N \N \N \N 4 2 f \N 35 51 95 31 50165 2007-09-21 t t 60043 2007-09-21 2007-09-21 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 100.00 0.00 -1 0.00 \N \N United States United States 4 1 2007-09-21 f \N \N \N \N 4 2 f \N 35 62 97 -1 50174 2008-04-04 t t 60054 2008-04-04 2008-04-04 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 200.00 2000.00 Setup Charge 108 0.00 \N \N United Kingdom -1 3 2008-04-04 f \N \N \N \N 4 \N f \N \N 60 95 31 50172 2008-03-05 t t 60052 2008-03-05 2008-03-05 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N United States United States -1 1 2008-03-05 f \N \N \N \N 4 2 f \N 35 57 95 31 50169 2008-03-04 t t 60049 2008-03-04 2008-03-04 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 59.00 0.00 -1 0.00 \N \N United States United States -1 1 2008-03-04 f \N \N \N \N 4 2 f \N 35 59 97 -1 50171 2008-03-04 t f 60051 2008-03-04 2008-03-04 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N United Kingdom -1 3 2008-03-04 f \N \N \N \N 4 \N f \N \N 58 95 31 50170 2008-03-04 t t 60050 2008-03-04 2008-03-04 UPS-GROUND-UPS Ground \N Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N United States United States \N 1 2008-03-04 f \N \N \N \N 4 2 f \N 35 61 95 31 50173 2008-03-05 t t 60053 2008-03-05 2008-03-05 UPS-GROUND-UPS Ground \N Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 29 0.0750000000 42 0.00 0.00 -1 0.00 \N \N United States United States \N 1 2008-03-05 f \N \N \N \N 4 2 f \N 35 63 97 -1 50175 2008-06-12 t t 60055 2008-06-12 2008-06-12 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2008-06-12 f \N \N \N \N 4 \N f \N \N 65 97 -1 50176 2008-06-12 t t 60057 2008-06-12 2008-06-12 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United Kingdom -1 3 2008-06-12 f \N \N \N \N 4 \N f \N \N 66 97 -1 50177 2008-06-12 t t 60058 2008-06-12 2008-06-12 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2008-06-12 f \N \N \N \N 4 \N f \N \N 67 95 31 40009 2008-06-12 t t 60059 2008-06-12 2008-06-12 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2008-06-12 f \N \N \N \N 4 2 f \N 35 68 95 31 50178 2008-06-18 t t 60060 2008-06-18 2008-06-18 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2008-06-18 f \N \N \N \N 4 2 f \N 35 69 97 -1 50179 2008-06-19 t t 60061 2008-06-19 2008-06-19 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 150.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2008-06-19 f \N \N \N \N 4 \N f \N \N 70 95 31 50180 2008-06-19 t t 60062 2008-06-19 2008-06-19 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2008-06-19 f \N \N \N \N 4 2 f \N 35 71 95 31 50181 2008-06-20 t t 60063 2008-06-20 2008-06-20 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 15.00 0.00 -1 0.00 \N United States United States -1 1 2008-06-20 f \N \N \N \N 4 2 f \N 35 72 95 31 50182 2008-06-20 t t 60064 2008-06-20 2008-06-20 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 27.00 0.00 -1 0.00 \N United States United States -1 1 2008-06-20 f \N \N \N \N 4 2 f \N 35 73 95 31 50183 2008-09-08 t t 60065 2008-07-15 2008-07-15 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2008-07-15 f \N \N \N \N 4 2 f \N 35 74 95 31 50183 2008-09-08 t t 60066 2008-09-08 2008-09-08 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 150.00 0.00 \N 0.00 \N United States United States \N 1 2008-09-08 f \N \N \N \N 4 2 f \N 35 75 95 31 50183 2008-09-08 t t 60067 2008-09-08 2008-09-08 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2008-09-08 f \N \N \N \N 4 2 f \N 35 76 95 31 50184 2008-09-09 t t 60068 2008-09-09 2008-09-09 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 10.00 0.00 \N 0.00 \N United States United States \N 1 2008-09-09 f \N \N \N \N 4 2 f \N 35 77 95 31 40010 2008-10-02 t t 60069 2008-10-02 2008-10-02 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 29 0.0007000000 42 100.00 0.00 -1 0.00 \N United States United States \N 1 2008-10-02 f \N \N \N \N 4 2 f \N 35 78 97 \N 50185 2008-10-02 t t 60070 2008-10-02 2008-10-02 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0007000000 42 35.00 0.00 \N 0.00 \N United Kingdom United Kingdom \N 3 2008-10-02 f \N \N \N \N 4 \N f \N \N 81 97 \N 50189 2008-12-30 t t 60073 2008-12-31 2008-12-31 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 100.00 0.00 \N 0.00 \N United Kingdom \N 3 2008-12-31 f \N \N \N \N 4 \N f \N \N 82 97 \N 50190 2008-12-31 t t 60074 2008-12-31 2008-12-31 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United Kingdom \N 3 2008-12-31 f \N \N \N \N 4 \N f \N \N 84 97 \N 50191 2009-01-12 t t 60076 2009-01-12 2009-01-12 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 500.00 0.00 \N 0.00 \N United Kingdom United Kingdom \N 3 2009-01-12 f \N \N \N \N 4 \N f \N \N 85 95 31 50192 2009-01-12 t t 60077 2009-01-12 2009-01-12 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 29 0.0750000000 42 7.50 0.00 \N 0.00 \N United States United States \N 1 2009-01-12 f \N \N \N \N 4 2 f \N 35 86 97 \N 50193 2009-01-12 t f 60078 2009-01-12 2009-01-12 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 29 0.0750000000 42 5.21 0.00 \N 0.00 \N United Kingdom United Kingdom \N 3 2009-01-12 f \N \N \N \N 4 \N f \N \N 89 95 31 50195 2009-08-13 t t 60081 2009-08-13 2009-08-13 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 29 0.0750000000 42 18750.00 0.00 \N 0.00 \N United States United States \N 1 2009-08-13 f \N \N \N \N 4 2 f \N 35 88 97 \N 50194 2009-06-26 t t 60080 2009-06-26 2009-06-26 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 Xtreme Toys Corporate Headquarters 1 Extra Way Suite 200 Reading Berkshire RG6 1RA 29 0.0750000000 42 2604.15 0.00 \N 0.00 \N United Kingdom United Kingdom \N 3 2009-06-26 f \N \N \N \N 4 \N f \N \N 93 95 31 50197 2009-09-25 t t 60085 2009-09-25 2009-09-25 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 10.00 0.00 \N 0.00 \N United States United States \N 1 2009-09-25 f \N \N \N \N 4 2 f \N 35 94 97 \N 50199 2009-10-13 t t 60086 2009-10-13 2009-10-13 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 29 0.0750000000 42 6.94 0.00 \N 0.00 \N United Kingdom \N 3 2009-10-13 f \N \N \N \N 4 \N f \N \N 95 95 31 50198 2009-10-13 t t 60087 2009-10-13 2009-10-13 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 9375.00 0.00 \N 0.00 \N United States United States \N 1 2009-10-13 f \N \N \N \N 4 2 f \N 35 106 95 33 50206 2010-09-07 t f 60096 2010-09-07 2010-09-07 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 3 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 336-321-9857 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2010-09-07 f \N \N \N \N 4 1 f \N 36 115 97 34 \N 2010-12-30 t f 60104 2010-12-30 2010-12-30 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 0.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2010-12-30 f \N \N \N \N 4 \N f \N \N 107 95 31 50207 2010-07-06 t f 60097 2010-09-07 2010-09-07 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2010-07-12 f \N \N \N \N 4 2 f \N 35 110 97 34 50210 2010-09-08 t t 60100 2010-09-08 2010-09-08 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 21604.94 0.00 \N 0.00 \N United Kingdom United Kingdom \N 3 2010-09-08 f \N \N \N \N 4 \N f \N \N 108 95 31 50208 2010-08-01 t f 60098 2010-09-07 2010-09-07 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2010-08-10 f \N \N \N \N 4 2 f \N 35 109 95 31 50209 2010-09-08 t f 60099 2010-07-30 2010-07-30 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 4375.00 0.00 \N 0.00 \N United States United States \N 1 2010-07-30 f \N \N \N \N 4 2 f \N 35 113 95 31 \N 2010-11-04 t f 60102 2010-11-04 2010-11-04 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2010-11-04 f \N \N \N \N 4 2 f \N 35 111 97 34 50213 2010-11-04 t t 60101 2010-11-04 2010-11-04 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 216.05 0.00 \N 0.00 \N United Kingdom United Kingdom \N 3 2010-11-04 f \N \N \N \N 4 \N f \N \N 112 -1 \N \N 2010-11-04 f f TEMPミ 2010-11-04 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 0.0000000000 \N 0.00 0.00 \N \N \N \N \N \N \N \N 1 \N f \N \N \N \N -1 \N f \N \N 114 97 34 \N 2010-11-12 t f 60103 2010-11-12 2010-11-12 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 0.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2010-11-12 f \N \N \N \N 4 \N f \N \N 117 95 31 50212 2010-12-30 t f 60106 2010-11-04 2010-11-04 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2010-11-04 f \N \N \N \N 4 2 f \N 35 116 95 31 50214 2010-12-30 t f 60105 2010-12-30 2010-12-30 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2010-12-30 f \N \N \N \N 4 2 f \N 35 118 95 -1 2010-12-30 t f 60107 2010-12-30 2010-12-30 Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 29 0.0750000000 42 0.00 0.00 -1 0.00 United States 5 1 2010-12-30 f \N \N \N \N \N 2 f \N \N 119 95 31 \N 2011-03-07 t f 60108 2011-01-01 2011-03-07 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 -1 0.00 \N United States United States -1 1 2011-01-01 f \N \N \N \N 4 2 f \N 35 120 97 34 \N 2011-03-07 t f 60109 2011-02-01 2011-03-07 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 0.00 0.00 -1 0.00 \N United Kingdom United Kingdom -1 3 2011-02-01 f \N \N \N \N 4 \N f \N \N 121 95 31 50215 2011-03-07 t f 60110 2011-03-07 2011-03-07 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 1500.00 0.00 -1 0.00 \N United States United States \N 1 2011-03-07 f \N \N \N \N 4 2 f \N 35 122 123 35 50217 2011-04-18 t f 60111 2011-04-18 2011-04-18 123012 FEDEX - Ground-FEDEX Ground Vienna Collectables Ungargasse 60 Vienna Austria 1030 43 1-515180 Vienna Collectibles Headquarters Ungargasse 60 Vienna Austria 1030 43 1-515180 29 0.0000000000 42 500.00 0.00 -1 0.00 \N Austria Austria \N 2 2011-04-18 f \N \N \N \N 4 \N f \N \N 123 97 34 50211 2011-04-06 t f 60112 2011-04-18 2011-04-18 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 200.00 0.00 -1 0.00 \N United Kingdom United Kingdom \N 3 2011-04-18 f \N \N \N \N 4 \N f \N \N 124 123 -1 2011-04-18 t f 60113 2011-04-18 2011-04-18 Vienna Collectables Ungargasse 60 Vienna Austria 1030 43 1-515180 29 0.0750000000 42 0.00 0.00 -1 0.00 Austria 6 2 2011-04-18 f \N \N \N \N \N \N f \N \N 125 95 31 50219 2011-05-04 t f 60114 2011-06-03 2011-06-03 UPS-GROUND-UPS Ground Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 703-931-4269 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 800-321-5433 29 0.0750000000 42 0.00 0.00 \N 0.00 \N United States United States \N 1 2011-06-03 f \N \N \N \N 4 2 f \N 35 126 97 34 50220 2011-06-03 t f 60115 2011-06-03 2011-06-03 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 5000.00 -115000.00 Adjustment For Initial Order 123 0.00 \N United Kingdom United Kingdom \N 3 2011-06-03 f \N \N \N \N 4 \N f \N \N 127 97 34 50221 2011-05-04 t f 60116 2011-05-30 2011-05-30 UPS-GROUND-UPS Ground Xtreme Toys LTD Xtreme Toys, Accounts Receivable 1 Extra Way Suite 100 Reading Berkshire RG6 1RA 44-336-712-9857 XTRM Toys Distribution Center 1 1 Extra Way Building 10 Reading Berkshire RG6 1RA 55-44-336-712-9855 29 0.0000000000 42 0.00 0.00 -1 0.00 \N United Kingdom United Kingdom \N 3 2011-05-31 f \N \N \N \N 4 \N f \N \N \. -- -- Data for Name: invcheadtax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invcheadtax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; 368 5 3 16 0.00 \N 0 0.050000 0.00 0.500000 2005-12-27 \N \N \N \N 369 6 3 16 0.00 \N 0 0.050000 0.00 0.500000 2005-12-27 \N \N \N \N 370 19 3 16 0.00 \N 0 0.050000 0.00 0.010000 2006-01-11 \N \N \N \N 375 79 1 17 300.00 \N 0 0.042500 0.00 12.750000 2008-10-02 2008-10-02 \N \N \N 376 53 1 17 100.00 \N 0 0.000000 0.00 4.250000 2007-12-14 2007-12-14 \N \N \N \. -- -- Data for Name: invcitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invcitem (invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_custprice, invcitem_price, invcitem_notes, invcitem_salescat_id, invcitem_taxtype_id, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_coitem_id, invcitem_updateinv, invcitem_rev_accnt_id) FROM stdin; 28 29 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 29 30 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 30 32 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 31 33 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 33 35 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 34 37 1 307 35 \N 100.000000 100.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 35 38 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 36 39 1 307 35 \N 100.000000 50.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 37 40 1 307 35 \N 100.000000 50.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 40 43 1 300 35 \N 1000.000000 1000.000000 9.2500 9.2500 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 44 45 3 307 35 \N 100.000000 100.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 43 45 2 311 35 \N 100.000000 100.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 45 45 4 310 35 \N 100.000000 100.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 42 45 1 316 35 \N 100.000000 100.000000 40.5000 40.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 39 42 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 48 48 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 49 48 2 316 35 \N 100.000000 100.000000 40.5000 40.2500 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 51 50 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 52 51 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 54 53 2 310 35 \N 500.000000 500.000000 5.6283 5.6283 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 55 53 1 300 35 \N 5000.000000 5000.000000 4.9865 4.9865 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 56 54 2 310 35 \N 1.000000 1.000000 0.0000 0.0000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 57 54 1 300 35 \N 10.000000 10.000000 0.0000 0.0000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 58 55 1 316 35 \N 2.000000 2.000000 23.0457 23.0457 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 38 41 1 300 35 \N 100.000000 100.000000 5.1213 5.1213 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 2 3 1 300 35 5.000000 5.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 4 8 1 300 35 5.000000 1.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 1 1 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 3 6 1 300 35 5.000000 1.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 5 9 1 300 35 5.000000 2.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 6 10 1 300 35 10.000000 10.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 10 15 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 8 12 2 300 35 1.000000 1.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 7 12 1 300 35 10.000000 10.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 9 13 1 300 35 369.000000 369.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 11 16 1 300 35 10.000000 10.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 12 17 1 300 35 10.000000 10.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 13 18 1 300 35 10.000000 10.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 16 19 4 307 35 10.000000 3.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 14 19 2 307 35 10.000000 3.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 15 19 3 300 35 10.000000 3.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 17 20 1 300 35 50.000000 50.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 18 21 1 300 35 10.000000 10.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 19 22 1 300 35 10.000000 10.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 22 23 4 307 35 10.000000 7.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 20 23 2 307 35 10.000000 7.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 21 23 3 300 35 10.000000 7.000000 9.9900 9.9900 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 23 24 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 24 25 1 307 35 10.000000 10.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 25 26 1 307 35 10.000000 10.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 26 27 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 27 28 1 300 35 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 \N \N \N 32 34 1 -1 -1 Bob Wilson Special Design Work Special promo product design.\t 1.000000 1.000000 0.0000 3500.0000 1 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 41 44 1 -1 -1 Speical Product Devel. Srvcs. Speical Product Devel. Srvcs. 1.000000 1.000000 0.0000 35000.0000 1 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 47 47 1 -1 -1 Design Services Design Services For Private Label Product\t 1.000000 1.000000 0.0000 10000.0000 1 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 50 49 1 -1 -1 123111 Engineering Services Engineering Services\t 1.000000 1.000000 0.0000 12900.0000 1 2 \N 1.0000000000 \N 1.0000000000 \N \N \N 53 52 1 -1 -1 Engineering Services Engineering Services\t 1.000000 1.000000 0.0000 1000.0000 1 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 46 46 1 -1 -1 Design Services Design Services\t 1.000000 1.000000 0.0000 15000.0000 1 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 59 56 1 327 35 \N 10.000000 10.000000 25.6063 30.0000 \N \N 4 1.0000000000 4 1.0000000000 \N \N \N 60 57 1 328 35 \N 3.000000 3.000000 89.1000 89.1000 \N 2 4 1.0000000000 4 1.0000000000 629 \N \N 61 57 2 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 630 \N \N 62 58 1 328 36 \N 1.000000 1.000000 0.0000 0.0000 \N 2 4 1.0000000000 4 1.0000000000 633 \N \N 63 59 2 328 35 \N 1.000000 1.000000 47.9843 0.0000 \N 2 4 1.0000000000 4 1.0000000000 635 \N \N 64 60 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 636 \N \N 65 61 1 328 35 \N 1.000000 1.000000 0.0000 0.0000 \N 2 4 1.0000000000 4 1.0000000000 637 \N \N 66 62 1 307 35 \N 1000.000000 1000.000000 5.2730 5.2730 \N 2 4 1.0000000000 4 1.0000000000 638 \N \N 67 63 1 316 35 \N 1.000000 1.000000 21.5909 21.5909 \N 2 4 1.0000000000 4 1.0000000000 639 \N \N 68 64 1 -1 -1 SDS Special Design Services Special Design Services\t 1.000000 1.000000 0.0000 10000.0000 1 2 \N 1.0000000000 \N 1.0000000000 \N \N \N 69 65 1 331 35 \N 1.000000 1.000000 16.5530 16.5530 \N 2 4 1.0000000000 4 1.0000000000 640 \N \N 70 66 1 300 35 \N 0.500000 0.500000 494.9490 494.9490 \N 2 6 100.0000000000 6 100.0000000000 641 \N \N 71 67 1 300 35 \N 0.500000 0.500000 980.0000 980.0000 \N 2 6 100.0000000000 6 100.0000000000 642 \N \N 72 68 1 331 35 \N 100.000000 100.000000 31.0500 31.0500 \N 2 4 1.0000000000 4 1.0000000000 643 \N \N 73 69 1 331 35 \N 1000.000000 1000.000000 16.3787 16.3787 \N 2 4 1.0000000000 4 1.0000000000 644 \N \N 74 69 2 300 35 \N 1000.000000 1000.000000 4.6717 4.6717 \N 2 4 1.0000000000 4 1.0000000000 645 \N \N 75 69 3 316 35 \N 1000.000000 1000.000000 21.3636 21.3636 \N 2 4 1.0000000000 4 1.0000000000 646 \N \N 76 70 1 331 35 \N 99.000000 99.000000 28.8000 28.8000 \N 2 4 1.0000000000 4 1.0000000000 647 \N \N 77 71 1 328 35 \N 1.000000 1.000000 89.1000 89.1000 \N 2 4 1.0000000000 4 1.0000000000 649 \N \N 78 72 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 650 \N \N 79 73 3 307 35 \N 3000.000000 3000.000000 9.8910 15.0000 \N 2 4 1.0000000000 4 1.0000000000 655 \N \N 80 74 2 307 35 \N 4000.000000 4000.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 653 \N \N 81 75 1 307 35 \N 3000.000000 3000.000000 9.8910 15.0000 \N 2 4 1.0000000000 4 1.0000000000 652 \N \N 82 76 1 333 35 \N 1.000000 1.000000 27.0000 27.0000 \N 2 4 1.0000000000 4 1.0000000000 659 \N \N 83 76 1002 303 35 4.000000 4.000000 0.0000 0.0000 \N \N 4 1.0000000000 4 1.0000000000 661 \N \N 84 76 1003 317 35 1.000000 1.000000 0.0000 0.0000 \N \N 4 1.0000000000 4 1.0000000000 662 \N \N 85 76 1004 321 35 4.000000 4.000000 0.0000 0.0000 \N \N 4 1.0000000000 4 1.0000000000 663 \N \N 86 76 1005 313 35 1.000000 1.000000 0.0000 0.0000 \N \N 4 1.0000000000 4 1.0000000000 664 \N \N 87 76 1001 325 35 0.050000 0.050000 0.0000 0.0000 \N \N 8 1.0000000000 8 1.0000000000 660 \N \N 88 77 3 333 35 \N 100.000000 100.000000 27.0000 27.0000 \N 2 4 1.0000000000 4 1.0000000000 673 \N \N 89 77 1 300 35 \N 100.000000 100.000000 9.5000 9.5000 \N 2 4 1.0000000000 4 1.0000000000 671 \N \N 90 77 3002 303 35 400.000000 400.000000 0.0000 0.0000 \N \N 4 1.0000000000 4 1.0000000000 675 \N \N 91 77 3003 317 35 100.000000 100.000000 0.0000 0.0000 \N \N 4 1.0000000000 4 1.0000000000 676 \N \N 92 77 3004 321 35 400.000000 400.000000 0.0000 0.0000 \N \N 4 1.0000000000 4 1.0000000000 677 \N \N 93 77 3005 313 35 100.000000 100.000000 0.0000 0.0000 \N \N 4 1.0000000000 4 1.0000000000 678 \N \N 94 77 2 328 35 \N 3.000000 3.000000 89.1000 89.1000 \N 2 4 1.0000000000 4 1.0000000000 672 \N \N 95 77 3001 325 35 5.000000 5.000000 0.0000 0.0000 \N \N 8 1.0000000000 8 1.0000000000 674 \N \N 96 78 1 331 35 \N 10.000000 10.000000 17.8920 17.8920 \N 2 4 1.0000000000 4 1.0000000000 668 \N \N 97 79 3 311 35 \N 1000.000000 1000.000000 9.8910 18.0000 \N 2 4 1.0000000000 4 1.0000000000 681 \N \N 98 79 2 310 35 \N 1000.000000 1000.000000 9.8910 9.8910 \N 2 4 1.0000000000 4 1.0000000000 680 \N \N 99 79 1 307 35 \N 1100.000000 1100.000000 9.8910 15.0000 \N 2 4 1.0000000000 4 1.0000000000 679 \N \N 100 80 1 -1 -1 Pruduct Design Services Pruduct Design Services 1.000000 1.000000 0.0000 25000.0000 1 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 101 81 1 300 35 \N 100.000000 100.000000 5.3977 5.3977 \N 2 4 1.0000000000 4 1.0000000000 685 \N \N 102 82 1 316 35 \N 5050.000000 5050.000000 29.3748 29.3748 \N 2 4 1.0000000000 4 1.0000000000 687 \N \N 103 83 1 311 35 5000.000000 5000.000000 9.8910 9.8910 -1 2 4 1.0000000000 4 1.0000000000 \N \N \N 104 83 2 -1 -1 Design Services Design Services 1.000000 1.000000 0.0000 25000.0000 2 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 105 84 3 307 35 \N 1000.000000 1000.000000 7.1740 7.1740 \N 2 4 1.0000000000 4 1.0000000000 711 \N \N 106 84 2 310 35 \N 1000.000000 1000.000000 7.1740 7.1740 \N 2 4 1.0000000000 4 1.0000000000 710 \N \N 107 84 1 311 35 \N 1000.000000 1000.000000 7.1740 7.1740 \N 2 4 1.0000000000 4 1.0000000000 709 \N \N 108 85 1 328 35 \N 1.000000 1.000000 89.1000 89.1000 \N 2 4 1.0000000000 4 1.0000000000 715 \N \N 109 86 1 328 35 \N 1.000000 1.000000 64.6246 64.6246 \N 2 4 1.0000000000 4 1.0000000000 717 \N \N 110 87 1 -1 -1 Design Services Design Services 1.000000 1.000000 0.0000 50000.0000 1 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 111 88 2 307 35 \N 300.000000 300.000000 7.1740 7.1740 \N 2 4 1.0000000000 4 1.0000000000 721 \N \N 112 88 3 310 35 \N 400.000000 400.000000 7.1740 7.1740 \N 2 4 1.0000000000 4 1.0000000000 722 \N \N 113 88 1 311 35 \N 300.000000 300.000000 7.1740 7.1740 \N 2 4 1.0000000000 4 1.0000000000 720 \N \N 114 89 1 300 35 \N 10000.000000 10000.000000 9.2500 9.2500 \N 2 4 1.0000000000 4 1.0000000000 724 \N \N 115 90 1 300 35 \N 5000.000000 5000.000000 7.1740 7.1740 \N 2 4 1.0000000000 4 1.0000000000 732 \N \N 116 91 1 -1 -1 Product Design Product Design 1.000000 1.000000 0.0000 10000.0000 2 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 117 92 1 -1 -1 Product Design Private Label Product Design\t 1.000000 1.000000 0.0000 45000.0000 2 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 118 93 1 316 35 \N 10.000000 10.000000 40.5000 40.5000 \N 2 4 1.0000000000 4 1.0000000000 735 \N \N 119 94 1 316 35 \N 1000.000000 1000.000000 29.3750 29.3750 \N 2 4 1.0000000000 4 1.0000000000 739 \N \N 120 95 1 300 35 \N 5000.000000 5000.000000 9.2500 9.2500 \N 2 4 1.0000000000 4 1.0000000000 737 \N \N 121 98 1 340 35 10.000000 10.000000 202.5000 202.5000 -1 \N 11 1.0000000000 11 1.0000000000 \N \N \N 122 99 1 300 35 \N 10000.000000 10000.000000 9.2500 9.2500 \N 2 4 1.0000000000 4 1.0000000000 743 \N \N 123 100 1 341 35 \N 1000.000000 1000.000000 49.5000 49.5000 \N \N 4 1.0000000000 4 1.0000000000 747 \N \N 124 101 2 300 35 \N 5.000000 5.000000 9.8000 9.8000 \N 2 4 1.0000000000 4 1.0000000000 751 \N \N 125 101 1 300 35 \N 1000.000000 1000.000000 9.2500 9.2500 \N 2 4 1.0000000000 4 1.0000000000 749 \N \N 126 102 1 340 35 10.000000 10.000000 202.5000 202.5000 -1 \N 11 1.0000000000 11 1.0000000000 \N \N \N 127 103 1 328 35 \N 1.000000 1.000000 0.0000 0.0000 \N 2 4 1.0000000000 4 1.0000000000 754 \N \N 128 104 2 341 35 \N 1000.000000 1000.000000 31.9136 31.9136 \N \N 4 1.0000000000 4 1.0000000000 756 \N \N 129 105 1 341 35 2000.000000 2000.000000 49.5000 49.5000 -1 \N 4 1.0000000000 4 1.0000000000 758 \N \N 130 106 1 341 35 \N 2000.000000 2000.000000 49.5000 49.5000 \N \N 4 1.0000000000 4 1.0000000000 765 \N \N 131 107 1 341 35 \N 4000.000000 4000.000000 49.5000 49.5000 \N \N 4 1.0000000000 4 1.0000000000 767 \N \N 132 108 1 341 35 \N 3000.000000 3000.000000 49.5000 49.5000 \N \N 4 1.0000000000 4 1.0000000000 769 \N \N 133 109 1 300 35 \N 5000.000000 5000.000000 9.2500 9.2500 \N 2 4 1.0000000000 4 1.0000000000 771 \N \N 134 110 1 300 35 \N 10000.000000 10000.000000 6.3769 6.3769 \N 2 4 1.0000000000 4 1.0000000000 773 \N \N 135 111 1 300 35 \N 100.000000 100.000000 6.3769 6.3769 \N 2 4 1.0000000000 4 1.0000000000 781 \N \N 136 113 1 -1 -1 Product Design Services Product Design Services 1.000000 1.000000 0.0000 10000.0000 1 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 137 114 1 -1 -1 Product Development Product Development 1.000000 1.000000 0.0000 40000.0000 2 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 138 115 1 -1 -1 Design Services Design Services 40.000000 40.000000 0.0000 180.0000 2 \N \N 1.0000000000 \N 1.0000000000 \N \N \N 139 116 1 341 35 \N 1000.000000 1000.000000 49.5000 49.5000 \N \N 4 1.0000000000 4 1.0000000000 783 \N \N 140 117 1 341 35 \N 2500.000000 2500.000000 49.5000 49.5000 \N \N 4 1.0000000000 4 1.0000000000 779 \N \N 141 118 1 340 35 18.000000 18.000000 175.0000 175.0000 -1 \N 11 1.0000000000 11 1.0000000000 \N \N \N 142 118 2 342 35 1.000000 1.000000 275.0000 275.0000 -1 \N 4 1.0000000000 4 1.0000000000 \N \N \N 143 118 3 343 35 355.000000 355.000000 0.5100 0.5100 -1 \N 12 1.0000000000 12 1.0000000000 \N \N \N 144 119 1 -1 -1 Special Services Services\t 1.000000 1.000000 0.0000 100000.0000 1 2 \N 1.0000000000 \N 1.0000000000 \N f \N 145 120 1 -1 -1 Design Services Design Services\t 1.000000 1.000000 0.0000 65000.0000 2 \N \N 1.0000000000 \N 1.0000000000 \N f \N 146 121 1 341 35 \N 5000.000000 5000.000000 49.5000 49.5000 \N 2 4 1.0000000000 4 1.0000000000 785 f \N 147 122 1 316 35 \N 1000.000000 1000.000000 32.6087 32.6087 \N 2 4 1.0000000000 4 1.0000000000 789 f \N 148 122 2 341 35 \N 1000.000000 1000.000000 39.8551 39.8551 \N \N 4 1.0000000000 4 1.0000000000 791 f \N 149 123 1 341 35 \N 100.000000 100.000000 31.9136 31.9136 \N \N 4 1.0000000000 4 1.0000000000 775 f \N 150 124 1 340 35 50.000000 50.000000 108.7000 108.7000 -1 \N 11 1.0000000000 11 1.0000000000 \N f \N 151 125 1 341 35 \N 3000.000000 3000.000000 49.5000 49.5000 \N \N 4 1.0000000000 4 1.0000000000 797 f \N 152 126 1 341 35 \N 3500.000000 7000.000000 32.1118 32.1118 \N \N 4 1.0000000000 4 1.0000000000 799 f \N 153 127 1 341 35 \N 5000.000000 5000.000000 32.1118 32.1118 \N \N 4 1.0000000000 4 1.0000000000 801 f \N \. -- -- Data for Name: invcitemtax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invcitemtax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; 263 28 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-30 \N 1 1.000000 \N 264 29 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-02-01 \N 1 1.000000 \N 265 30 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-07-05 \N 1 1.000000 \N 266 31 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-07-05 \N 1 1.000000 \N 267 33 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-10-13 \N 1 1.000000 \N 268 34 2 16 989.10 \N 0 0.050000 0.00 49.460000 2006-12-05 \N 1 1.000000 \N 269 35 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-12-28 \N 1 1.000000 \N 270 36 2 16 494.55 \N 0 0.050000 0.00 24.730000 2007-01-08 \N 1 1.000000 \N 271 37 2 16 494.55 \N 0 0.050000 0.00 24.730000 2007-01-08 \N 1 1.000000 \N 272 40 2 16 9250.00 \N 0 0.050000 0.00 462.500000 2007-04-05 \N 1 1.000000 \N 273 44 2 16 989.10 \N 0 0.050000 0.00 49.460000 2007-05-30 \N 1 1.000000 \N 274 43 2 16 989.10 \N 0 0.050000 0.00 49.460000 2007-05-30 \N 1 1.000000 \N 275 45 2 16 989.10 \N 0 0.050000 0.00 49.460000 2007-05-30 \N 1 1.000000 \N 276 42 2 16 4050.00 \N 0 0.050000 0.00 202.500000 2007-05-30 \N 1 1.000000 \N 277 39 2 16 950.00 \N 0 0.050000 0.00 47.500000 2007-02-20 \N 1 1.000000 \N 278 51 2 16 950.00 \N 0 0.050000 0.00 47.500000 2007-08-31 2007-08-31 1 1.000000 \N 279 52 2 16 950.00 \N 0 0.050000 0.00 47.500000 2007-09-21 2007-09-21 1 1.000000 \N 280 2 2 16 49.95 \N 0 0.050000 0.00 2.500000 2005-12-27 \N 1 1.000000 \N 281 4 2 16 9.99 \N 0 0.050000 0.00 0.500000 2005-12-27 \N 1 1.000000 \N 282 1 2 16 950.00 \N 0 0.050000 0.00 47.500000 2005-12-27 \N 1 1.000000 \N 283 3 2 16 9.99 \N 0 0.050000 0.00 0.500000 2005-12-27 \N 1 1.000000 \N 284 5 2 16 19.98 \N 0 0.050000 0.00 1.000000 2005-12-27 \N 1 1.000000 \N 285 6 2 16 99.90 \N 0 0.050000 0.00 5.000000 2005-12-27 \N 1 1.000000 \N 286 10 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-09 \N 1 1.000000 \N 287 8 2 16 9.99 \N 0 0.050000 0.00 0.500000 2005-12-29 \N 1 1.000000 \N 288 7 2 16 99.90 \N 0 0.050000 0.00 5.000000 2005-12-29 \N 1 1.000000 \N 289 9 2 16 3505.50 \N 0 0.050000 0.00 175.280000 2005-12-29 \N 1 1.000000 \N 290 11 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-09 \N 1 1.000000 \N 291 12 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-09 \N 1 1.000000 \N 292 13 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-09 \N 1 1.000000 \N 293 16 2 16 29.67 \N 0 0.050000 0.00 1.480000 2006-01-11 \N 1 1.000000 \N 294 14 2 16 29.67 \N 0 0.050000 0.00 1.480000 2006-01-11 \N 1 1.000000 \N 295 15 2 16 29.97 \N 0 0.050000 0.00 1.500000 2006-01-11 \N 1 1.000000 \N 296 17 2 16 499.50 \N 0 0.050000 0.00 24.980000 2006-01-11 \N 1 1.000000 \N 297 18 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-11 \N 1 1.000000 \N 298 19 2 16 99.90 \N 0 0.050000 0.00 5.000000 2006-01-11 \N 1 1.000000 \N 299 22 2 16 69.24 \N 0 0.050000 0.00 3.460000 2006-01-12 \N 1 1.000000 \N 300 20 2 16 69.24 \N 0 0.050000 0.00 3.460000 2006-01-12 \N 1 1.000000 \N 301 21 2 16 69.93 \N 0 0.050000 0.00 3.500000 2006-01-12 \N 1 1.000000 \N 302 23 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-13 \N 1 1.000000 \N 303 24 2 16 98.91 \N 0 0.050000 0.00 4.950000 2006-01-13 \N 1 1.000000 \N 304 25 2 16 98.91 \N 0 0.050000 0.00 4.950000 2006-01-13 \N 1 1.000000 \N 305 26 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-13 \N 1 1.000000 \N 306 27 2 16 950.00 \N 0 0.050000 0.00 47.500000 2006-01-30 \N 1 1.000000 \N 307 50 2 16 12900.00 \N 0 0.050000 0.00 645.000000 2007-07-04 2007-07-04 1 1.000000 \N 308 60 2 16 267.30 \N 0 0.050000 0.00 13.370000 2008-03-04 2008-03-04 1 1.000000 \N 309 61 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-03-04 2008-03-04 1 1.000000 \N 311 64 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-03-05 2008-03-05 1 1.000000 \N 313 68 2 16 10000.00 \N 0 0.050000 0.00 500.000000 2008-06-12 2008-06-12 1 1.000000 \N 314 71 2 16 490.00 \N 0 0.050000 0.00 24.500000 2008-06-12 2008-06-12 1 1.000000 \N 315 72 2 16 3105.00 \N 0 0.050000 0.00 155.250000 2008-06-18 2008-06-18 1 1.000000 \N 316 76 2 16 2851.20 \N 0 0.050000 0.00 142.560000 2008-06-19 2008-06-19 1 1.000000 \N 317 77 2 16 89.10 \N 0 0.050000 0.00 4.460000 2008-06-20 2008-06-20 1 1.000000 \N 318 78 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-06-20 2008-06-20 1 1.000000 \N 319 79 2 16 45000.00 \N 0 0.050000 0.00 2250.000000 2008-07-15 2008-07-15 1 1.000000 \N 320 80 2 16 39564.00 \N 0 0.050000 0.00 1978.200000 2008-09-08 2008-09-08 1 1.000000 \N 321 81 2 16 45000.00 \N 0 0.050000 0.00 2250.000000 2008-09-08 2008-09-08 1 1.000000 \N 322 82 2 16 27.00 \N 0 0.050000 0.00 1.350000 2008-09-09 2008-09-09 1 1.000000 \N 323 88 2 16 2700.00 \N 0 0.050000 0.00 135.000000 2008-10-02 2008-10-02 1 1.000000 \N 324 89 2 16 950.00 \N 0 0.050000 0.00 47.500000 2008-10-02 2008-10-02 1 1.000000 \N 325 94 2 16 267.30 \N 0 0.050000 0.00 13.370000 2008-10-02 2008-10-02 1 1.000000 \N 326 108 2 16 89.10 \N 0 0.050000 0.00 4.460000 2009-01-12 2009-01-12 1 1.000000 \N 327 114 2 16 92500.00 \N 0 0.050000 0.00 4625.000000 2009-08-13 2009-08-13 1 1.000000 \N 353 48 2 17 950.00 \N 0 0.042500 0.00 40.380000 2007-05-30 2007-05-30 1 1.000000 \N 354 49 2 17 4025.00 \N 0 0.042500 0.00 171.060000 2007-05-30 2007-05-30 1 1.000000 \N 355 54 2 17 2814.15 \N 0 0.042500 0.00 119.600000 2007-12-14 2007-12-14 3 0.537630 \N 356 55 2 17 24932.50 \N 0 0.042500 0.00 1059.630000 2007-12-14 2007-12-14 3 0.537630 \N 358 97 2 17 18000.00 \N 0 0.042500 0.00 765.000000 2008-10-02 2008-10-02 1 1.000000 \N 359 98 2 17 9891.00 \N 0 0.042500 0.00 420.370000 2008-10-02 2008-10-02 1 1.000000 \N 360 99 2 17 16500.00 \N 0 0.042500 0.00 701.250000 2008-10-02 2008-10-02 1 1.000000 \N 448 118 2 16 405.00 \N 0 0.050000 0.00 20.250000 2009-09-25 2009-09-25 1 1.000000 5870 459 120 2 16 46250.00 \N 0 0.050000 0.00 2312.500000 2009-10-13 2009-10-13 1 1.000000 6014 481 122 2 16 92500.00 \N 0 0.050000 0.00 4625.000000 2009-12-03 2009-12-03 1 1.000000 6084 499 124 2 16 49.00 \N 0 0.050000 0.00 2.450000 2010-03-12 2010-03-12 1 1.000000 6142 500 125 2 16 9250.00 \N 0 0.050000 0.00 462.500000 2010-03-12 2010-03-12 1 1.000000 6142 506 127 2 16 0.00 \N 0 0.050000 0.00 0.000000 2010-03-12 2010-03-12 1 1.000000 6156 511 133 2 16 46250.00 \N 0 0.050000 0.00 2312.500000 2010-07-30 2010-07-30 1 1.000000 6292 514 144 2 16 100000.00 \N 0 0.050000 0.00 5000.000000 2011-01-01 2011-01-01 1 1.000000 6419 525 146 2 16 247500.00 \N 0 0.050000 0.00 12375.000000 2011-03-07 2011-03-07 1 1.000000 6429 \. -- -- Data for Name: invcnt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invcnt (invcnt_id, invcnt_itemsite_id, invcnt_tagdate, invcnt_cntdate, invcnt_qoh_before, invcnt_qoh_after, invcnt_matcost, invcnt_posted, invcnt_postdate, invcnt_comments, invcnt_priority, invcnt_tagnumber, invcnt_invhist_id, invcnt_location_id, invcnt_cnt_username, invcnt_post_username, invcnt_tag_username) FROM stdin; 214 296 2006-08-30 16:44:54.941-04 2006-08-30 16:44:54.941-04 0.000000 200.000000 \N t 2006-08-30 16:44:54.941-04 MA-Count f \N 3116 \N \N \N \N 216 294 2006-12-28 14:02:55.343-05 2006-12-28 14:02:55.343-05 8790.000000 8890.000000 \N t 2006-12-28 14:02:55.343-05 MDA-Count1 f \N 3157 \N \N \N \N 217 298 2006-12-28 14:03:15.531-05 2006-12-28 14:03:15.531-05 8820.000000 8930.000000 \N t 2006-12-28 14:03:15.531-05 MDA-Count2 f \N 3158 \N \N \N \N 218 296 2007-05-30 09:02:02.578-04 2007-05-30 09:02:02.578-04 100.000000 800.000000 \N t 2007-05-30 09:02:02.578-04 Special count f \N 3205 \N \N \N \N 219 310 2007-05-30 09:02:46.062-04 2007-05-30 09:02:46.062-04 0.000000 500.000000 \N t 2007-05-30 09:02:46.062-04 Special Count f \N 3206 \N \N \N \N 220 314 2007-05-30 09:03:09.265-04 2007-05-30 09:03:09.265-04 100.000000 500.000000 \N t 2007-05-30 09:03:09.265-04 f \N 3207 \N \N \N \N 221 314 2007-05-30 09:45:22.921-04 2007-05-30 09:45:22.921-04 0.000000 100.000000 \N t 2007-05-30 09:45:22.921-04 Special count f \N 3247 \N \N \N \N 222 302 2009-09-21 14:55:13.941435-04 2009-09-21 14:55:13.941435-04 -1.000000 1.000000 \N t 2009-09-21 14:55:13.941435-04 Misc Count f \N 3775 \N admin admin admin 223 302 2009-09-21 14:56:05.431212-04 2009-09-21 14:56:05.431212-04 1.000000 0.000000 \N t 2009-09-21 14:56:05.431212-04 Count Correction f \N 3776 \N admin admin admin 224 375 2009-09-25 12:47:08.620928-04 2009-09-25 12:47:08.620928-04 -5.000000 0.000000 \N t 2009-09-25 12:47:08.620928-04 Spot Check f \N 3877 \N jsmith jsmith jsmith 225 332 2009-09-25 12:47:45.353122-04 2009-09-25 12:47:45.353122-04 18.000000 5.000000 \N t 2009-09-25 12:47:45.353122-04 f \N 3878 \N jsmith jsmith jsmith \. -- -- Data for Name: invdetail; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invdetail (invdetail_id, invdetail_transtype, invdetail_invhist_id, invdetail_location_id, invdetail_qty, invdetail_comments, invdetail_qty_before, invdetail_qty_after, invdetail_invcitem_id, invdetail_expiration, invdetail_warrpurc, invdetail_ls_id) FROM stdin; 1341 \N 2966 128 10.000000 \N 0.000000 10.000000 \N \N \N \N 1342 \N 2967 128 -10.000000 \N 10.000000 0.000000 \N \N \N \N 1343 \N 2967 130 10.000000 \N 0.000000 10.000000 \N \N \N \N 1345 \N 2972 128 5.000000 \N 0.000000 5.000000 \N \N \N \N 1346 \N 2973 128 -5.000000 \N 5.000000 0.000000 \N \N \N \N 1347 \N 2973 130 5.000000 \N 10.000000 15.000000 \N \N \N \N 1348 \N 2975 130 -5.000000 \N 15.000000 10.000000 \N \N \N \N 1349 \N 2975 131 5.000000 \N 0.000000 5.000000 \N \N \N \N 1351 \N 2979 128 5.000000 \N 0.000000 5.000000 \N \N \N \N 1352 \N 2980 128 -5.000000 \N 5.000000 0.000000 \N \N \N \N 1353 \N 2980 130 5.000000 \N 10.000000 15.000000 \N \N \N \N 1354 \N 2982 130 -5.000000 \N 15.000000 10.000000 \N \N \N \N 1355 \N 2982 131 5.000000 \N 5.000000 10.000000 \N \N \N \N 1356 \N 2984 130 -10.000000 \N 10.000000 0.000000 \N \N \N \N 1357 \N 2984 123 10.000000 \N 0.000000 10.000000 \N \N \N \N 1358 \N 2985 131 -10.000000 \N 10.000000 0.000000 \N \N \N \N 1359 \N 2985 123 10.000000 \N 10.000000 20.000000 \N \N \N \N 1360 \N 2986 123 -20.000000 \N 20.000000 0.000000 \N \N \N \N 1362 \N 2989 125 5.000000 \N 0.000000 5.000000 \N \N \N \N 1363 \N 2990 125 -5.000000 \N 5.000000 0.000000 \N \N \N \N 1364 \N 2990 130 5.000000 \N 0.000000 5.000000 \N \N \N \N 1365 \N 2992 130 -5.000000 \N 5.000000 0.000000 \N \N \N \N 1366 \N 2992 131 5.000000 \N 0.000000 5.000000 \N \N \N \N 1368 \N 2996 128 5.000000 \N 0.000000 5.000000 \N \N \N \N 1369 \N 2997 128 -5.000000 \N 5.000000 0.000000 \N \N \N \N 1370 \N 2997 130 5.000000 \N 0.000000 5.000000 \N \N \N \N 1371 \N 2999 130 -5.000000 \N 5.000000 0.000000 \N \N \N \N 1372 \N 2999 131 5.000000 \N 5.000000 10.000000 \N \N \N \N 1373 \N 3001 122 50.000000 \N 0.000000 50.000000 \N \N \N \N 1378 \N 3006 122 10.000000 \N 50.000000 60.000000 \N \N \N \N 1379 \N 3007 122 10.000000 \N 60.000000 70.000000 \N \N \N \N 1374 \N 3002 122 -10.000000 \N 50.000000 40.000000 14 \N \N \N 1377 \N 3005 122 10.000000 \N 40.000000 50.000000 14 \N \N \N 1382 \N 3011 122 -1.000000 \N 70.000000 69.000000 14 \N \N \N 1384 \N 3014 122 -1.000000 \N 68.000000 67.000000 14 \N \N \N 1375 \N 3003 122 -10.000000 \N 40.000000 30.000000 16 \N \N \N 1376 \N 3004 122 10.000000 \N 30.000000 40.000000 16 \N \N \N 1383 \N 3013 122 -1.000000 \N 69.000000 68.000000 16 \N \N \N 1385 \N 3016 122 -1.000000 \N 67.000000 66.000000 16 \N \N \N 1386 \N 3021 122 -8.000000 \N 66.000000 58.000000 20 \N \N \N 1387 \N 3023 122 -8.000000 \N 58.000000 50.000000 22 \N \N \N 1389 \N 3029 122 50.000000 \N 50.000000 100.000000 \N \N \N \N 1392 \N 3039 122 10.000000 \N 100.000000 110.000000 \N \N \N \N 1394 \N 3051 122 10.000000 \N 110.000000 120.000000 \N \N \N \N 1396 \N 3054 122 -10.000000 \N 120.000000 110.000000 24 \N \N \N 1397 \N 3055 122 -10.000000 \N 110.000000 100.000000 25 \N \N \N 1404 \N 3119 122 -100.000000 \N 100.000000 0.000000 \N \N \N \N 1405 \N 3119 131 -10.000000 \N 10.000000 0.000000 \N \N \N \N 1427 \N 3143 122 100.000000 \N 0.000000 100.000000 \N \N \N \N 1428 \N 3144 122 -10.000000 \N 100.000000 90.000000 34 \N \N \N 1429 \N 3145 122 -90.000000 \N 90.000000 0.000000 34 \N \N \N 1432 \N 3160 122 100.000000 \N 0.000000 100.000000 \N \N \N \N 1433 \N 3161 122 -50.000000 \N 100.000000 50.000000 36 \N \N \N 1434 \N 3162 122 -50.000000 \N 50.000000 0.000000 37 \N \N \N 1439 \N 3217 122 100.000000 \N 0.000000 100.000000 \N \N \N \N 1444 \N 3245 122 -100.000000 \N 100.000000 0.000000 44 \N \N \N 1480 \N 3385 122 1000.000000 \N 0.000000 1000.000000 \N 2100-01-01 \N \N 1484 \N 3392 122 -1000.000000 \N 1000.000000 0.000000 66 2100-01-01 \N \N 1481 \N 3387 -1 -10.000000 \N 920.720000 910.720000 \N 2008-09-29 \N 1 1477 \N 3380 -1 -1.000000 \N 921.720000 920.720000 64 2008-09-29 \N 1 1467 \N 3360 -1 -0.030000 \N 921.750000 921.720000 \N 2008-09-29 \N 1 1463 \N 3355 -1 -0.100000 \N 10.000000 9.900000 \N 2009-01-07 \N 1 1449 \N 3320 -1 -40.450000 \N 967.200000 926.750000 55 \N \N 1 1450 \N 3329 -1 -5.000000 \N 926.750000 921.750000 54 \N \N 1 1447 \N 3302 -1 -1.000000 \N 968.200000 967.200000 52 \N \N 1 1446 \N 3290 -1 -1.000000 \N 969.200000 968.200000 51 \N \N 1 1445 \N 3274 -1 -1.000000 \N 970.200000 969.200000 48 \N \N 1 1443 \N 3240 -1 -5.000000 \N 975.200000 970.200000 \N \N \N 1 1442 \N 3233 -1 -1.000000 \N 976.200000 975.200000 \N \N \N 1 1441 \N 3227 -1 -1.000000 \N 977.200000 976.200000 \N \N \N 1 1440 \N 3221 -1 -1.000000 \N 978.200000 977.200000 \N \N \N 1 1436 \N 3177 -1 -1.000000 \N 989.200000 988.200000 38 \N \N 1 1437 \N 3186 -1 -10.000000 \N 988.200000 978.200000 \N \N \N 1 1435 \N 3165 -1 -1.000000 \N 990.200000 989.200000 \N \N \N 1 1430 \N 3148 -1 -1.000000 \N 991.200000 990.200000 35 \N \N 1 1424 \N 3140 -1 -300.000000 \N 310.000000 10.000000 \N \N \N 1 1423 \N 3139 -1 -3654.750000 \N 3964.750000 310.000000 \N \N \N 1 1422 \N 3138 -1 2973.550000 \N -2973.550000 0.000000 \N \N \N 1 1421 \N 3137 -1 2973.550000 \N 991.200000 3964.750000 \N \N \N 1 1420 \N 3136 -1 991.200000 \N 0.000000 991.200000 \N \N \N 1 1419 \N 3136 -1 -991.200000 \N -1982.350000 -2973.550000 \N \N \N 1 1418 \N 3135 -1 991.200000 \N 0.000000 991.200000 \N \N \N 1 1417 \N 3135 -1 -991.200000 \N -991.150000 -1982.350000 \N \N \N 1 1416 \N 3134 -1 991.150000 \N -1982.300000 -991.150000 \N \N \N 1 1415 \N 3134 -1 -991.150000 \N -991.150000 -1982.300000 \N \N \N 1 1413 \N 3133 -1 -991.200000 \N 0.050000 -991.150000 \N \N \N 1 1412 \N 3132 -1 0.050000 \N 0.000000 0.050000 \N \N \N 1 1411 \N 3132 -1 -0.050000 \N 0.050000 0.000000 \N \N \N 2 1333 \N 2919 -1 -1.000000 \N 1.050000 0.050000 \N \N \N 2 1331 \N 2902 -1 -0.100000 \N 1.150000 1.050000 7 \N \N 2 1330 \N 2880 -1 -0.100000 \N 1.250000 1.150000 \N \N \N 2 1329 \N 2872 -1 -1.000000 \N 2.250000 1.250000 1 \N \N 2 1328 \N 2865 -1 1.000000 \N 1.250000 2.250000 \N \N \N 2 1327 \N 2863 -1 1.250000 \N 0.000000 1.250000 \N \N \N 2 1448 \N 3320 -1 -9.550000 \N 9.550000 0.000000 55 \N \N 3 1410 \N 3131 -1 9.550000 \N 0.000000 9.550000 \N \N \N 3 1337 \N 2937 -1 -0.150000 \N 0.150000 0.000000 \N \N \N 3 1335 \N 2927 -1 -0.100000 \N 0.250000 0.150000 \N \N \N 3 1334 \N 2924 -1 -1.000000 \N 1.250000 0.250000 \N \N \N 3 1332 \N 2908 -1 1.250000 \N 0.000000 1.250000 \N \N \N 3 1409 \N 3131 -1 -9.550000 \N 9.550000 0.000000 \N \N \N 4 1367 \N 2994 -1 -0.050000 \N 9.600000 9.550000 \N \N \N 4 1361 \N 2987 -1 -0.050000 \N 9.650000 9.600000 \N \N \N 4 1350 \N 2977 -1 -0.050000 \N 9.700000 9.650000 \N \N \N 4 1344 \N 2970 -1 -0.050000 \N 9.750000 9.700000 \N \N \N 4 1340 \N 2964 -1 -0.100000 \N 9.850000 9.750000 \N \N \N 4 1338 \N 2937 -1 -1.650000 \N 12.500000 10.850000 \N \N \N 4 1336 \N 2931 -1 12.500000 \N 0.000000 12.500000 \N \N \N 4 1339 \N 2955 -1 -1.000000 \N 10.850000 9.850000 10 \N \N 4 1426 \N 3142 -1 -991.200000 \N 991.200000 0.000000 \N \N \N 5 1425 \N 3141 -1 -991.200000 \N 991.200000 0.000000 \N \N \N 5 1414 \N 3133 -1 991.200000 \N 0.000000 991.200000 \N \N \N 5 1406 \N 3128 -1 -1.000000 \N 992.200000 991.200000 33 \N \N 5 1403 \N 3112 -1 -1.000000 \N 993.200000 992.200000 31 \N \N 5 1402 \N 3102 -1 -1.000000 \N 994.200000 993.200000 30 \N \N 5 1401 \N 3094 -1 -1.000000 \N 995.200000 994.200000 29 \N \N 5 1400 \N 3084 -1 -1.000000 \N 996.200000 995.200000 28 \N \N 5 1399 \N 3073 -1 -1.000000 \N 997.200000 996.200000 27 \N \N 5 1398 \N 3064 -1 -1.000000 \N 998.200000 997.200000 26 \N \N 5 1393 \N 3049 -1 -1.000000 \N 999.200000 998.200000 23 \N \N 5 1391 \N 3036 -1 -0.100000 \N 999.300000 999.200000 \N \N \N 5 1390 \N 3031 -1 -0.500000 \N 999.800000 999.300000 \N \N \N 5 1388 \N 3026 -1 -0.200000 \N 1000.000000 999.800000 \N \N \N 5 1381 \N 3009 -1 100.000000 \N 900.000000 1000.000000 \N \N \N 5 1380 \N 3009 -1 900.000000 \N 0.000000 900.000000 \N \N \N 5 1408 \N 3130 -1 10.000000 \N 0.000000 10.000000 \N \N \N 6 1407 \N 3130 -1 -10.000000 \N 10.000000 0.000000 \N \N \N 6 1395 \N 3052 -1 10.000000 \N 0.000000 10.000000 \N \N \N 6 1462 \N 3355 -1 -0.900000 \N 0.900000 0.000000 \N 2007-12-28 \N 7 1461 \N 3348 -1 -0.100000 \N 1.000000 0.900000 \N 2007-12-28 \N 7 1431 \N 3159 -1 1.000000 \N 0.000000 1.000000 \N \N \N 7 1483 \N 3391 -1 10.000000 \N 0.000000 10.000000 \N 2010-06-13 \N 8 1482 \N 3391 -1 2.500000 \N 0.000000 2.500000 \N 2010-03-05 \N 8 1438 \N 3191 -1 50.000000 \N 0.000000 50.000000 \N \N \N 9 1471 \N 3367 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 10 1468 \N 3363 124 -1.000000 \N 1.000000 0.000000 60 1970-01-01 \N 10 1451 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 10 1460 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 11 1464 \N 3358 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 12 1465 \N 3358 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 13 1466 \N 3358 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 14 1469 \N 3363 124 -1.000000 \N 1.000000 0.000000 60 1970-01-01 \N 15 1452 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 15 1475 \N 3371 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 16 1478 \N 3383 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 17 1470 \N 3363 124 -1.000000 \N 1.000000 0.000000 60 1970-01-01 \N 18 1453 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 18 1474 \N 3370 -1 -1.000000 \N 1.000000 0.000000 62 1970-01-01 \N 19 1473 \N 3369 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 19 1472 \N 3368 124 -1.000000 \N 1.000000 0.000000 \N 1970-01-01 \N 19 1454 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 19 1476 \N 3372 124 -1.000000 \N 1.000000 0.000000 63 1970-01-01 \N 20 1455 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 20 1456 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 21 1457 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 22 1458 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 23 1479 \N 3384 124 -1.000000 \N 1.000000 0.000000 65 1970-01-01 \N 24 1459 \N 3345 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 24 1485 \N 3394 -1 5.000000 \N 0.000000 5.000000 \N 1970-01-01 \N 25 1486 \N 3395 -1 -5.000000 \N 5.000000 0.000000 \N \N \N 25 1487 \N 3395 -1 5.000000 \N 0.000000 5.000000 \N \N \N 26 1488 \N 3396 -1 -50.000000 \N 50.000000 0.000000 \N \N \N 9 1489 \N 3396 -1 50.000000 \N 0.000000 50.000000 \N \N \N 9 1490 \N 3397 -1 -50.000000 \N 50.000000 0.000000 \N \N \N 9 1491 \N 3397 -1 50.000000 \N 0.000000 50.000000 \N \N \N 27 1492 \N 3398 -1 -25.000000 \N 50.000000 25.000000 \N \N \N 27 1493 \N 3398 -1 25.000000 \N 0.000000 25.000000 \N \N \N 28 1494 \N 3401 -1 100.000000 \N 0.000000 100.000000 \N 2009-06-12 \N 29 1495 \N 3403 -1 100.000000 \N 0.000000 100.000000 \N 2009-06-12 \N 30 1498 \N 3417 -1 10.000000 \N 0.000000 10.000000 \N 2009-06-12 \N 31 1499 \N 3418 -1 -5.000000 \N 5.000000 0.000000 \N \N \N 26 1500 \N 3418 -1 5.000000 \N 0.000000 5.000000 \N \N \N 32 1501 \N 3419 -1 -24.990000 \N 24.990000 0.000000 \N \N \N 28 1502 \N 3419 -1 24.990000 \N 0.000000 24.990000 \N \N \N 33 1503 \N 3420 -1 -25.000000 \N 25.000000 0.000000 \N \N \N 27 1504 \N 3420 -1 25.000000 \N 0.000000 25.000000 \N \N \N 33 1496 \N 3412 -1 -1.000000 \N 100.000000 99.000000 69 2009-06-12 \N 29 1497 \N 3416 -1 -0.010000 \N 25.000000 24.990000 69 1970-01-01 \N 28 1505 \N 3424 124 9498.000000 \N 0.000000 9498.000000 \N \N \N \N 1506 \N 3425 123 5000.000000 \N 0.000000 5000.000000 \N \N \N \N 1508 \N 3434 124 -500.000000 \N 9498.000000 8998.000000 \N 2100-01-01 \N \N 1509 \N 3434 122 500.000000 \N 0.000000 500.000000 \N 2100-01-01 \N \N 1510 \N 3435 123 -500.000000 \N 5000.000000 4500.000000 \N 2100-01-01 \N \N 1511 \N 3435 122 500.000000 \N 0.000000 500.000000 \N 2100-01-01 \N \N 1514 \N 3441 -1 -1.000000 \N 24.990000 23.990000 72 2009-06-14 \N 33 1513 \N 3440 124 -200.000000 \N 8998.000000 8798.000000 72 2100-01-01 \N \N 1512 \N 3437 -1 -1.000000 \N 99.000000 98.000000 72 2009-06-12 \N 29 1515 \N 3450 122 2000.000000 \N 0.000000 2000.000000 \N 2100-01-01 \N \N 1516 \N 3451 123 3000.000000 \N 0.000000 3000.000000 \N 2100-01-01 \N \N 1517 \N 3466 -1 -11.000000 \N 910.720000 899.720000 \N 2008-09-29 \N 1 1519 \N 3475 -1 -1.000000 \N 100.000000 99.000000 73 2009-06-12 \N 30 1522 \N 3479 -1 -5.000000 \N 23.990000 18.990000 73 2009-06-14 \N 33 1521 \N 3479 -1 -5.000000 \N 10.000000 5.000000 73 2009-06-12 \N 31 1520 \N 3478 124 -2000.000000 \N 8798.000000 6798.000000 73 2100-01-01 \N \N 1518 \N 3471 -1 -10.000000 \N 899.720000 889.720000 74 2008-09-29 \N 1 1523 \N 3492 -1 -0.990000 \N 889.720000 888.730000 76 2008-09-29 \N 1 1524 \N 3493 123 -297.000000 \N 4500.000000 4203.000000 76 2100-01-01 \N \N 1525 \N 3495 124 -1.000000 \N 1.000000 0.000000 77 1970-01-01 \N 21 1526 \N 3504 -1 -1.000000 \N 888.730000 887.730000 78 2008-09-29 \N 1 1527 \N 3506 122 3333.000000 \N 0.000000 3333.000000 \N 2100-01-01 \N \N 1528 \N 3507 122 3333.000000 \N 3333.000000 6666.000000 \N 2100-01-01 \N \N 1529 \N 3508 122 3334.000000 \N 6666.000000 10000.000000 \N 2100-01-01 \N \N 1531 \N 3510 122 3000.000000 \N 7000.000000 10000.000000 79 2100-01-01 \N \N 1530 \N 3509 122 -3000.000000 \N 10000.000000 7000.000000 79 2100-01-01 \N \N 1532 \N 3511 122 -3000.000000 \N 10000.000000 7000.000000 79 2100-01-01 \N \N 1535 \N 3514 122 -4000.000000 \N 7000.000000 3000.000000 80 2100-01-01 \N \N 1534 \N 3513 122 4000.000000 \N 3000.000000 7000.000000 80 2100-01-01 \N \N 1533 \N 3512 122 -4000.000000 \N 7000.000000 3000.000000 80 2100-01-01 \N \N 1536 \N 3515 122 -3000.000000 \N 3000.000000 0.000000 81 2100-01-01 \N \N 1539 \N 3522 -1 -0.050000 \N 5.000000 4.950000 87 2009-06-12 \N 31 1538 \N 3521 -1 0.050000 \N 4.950000 5.000000 87 2009-06-13 \N 32 1537 \N 3516 -1 -0.050000 \N 5.000000 4.950000 87 2009-06-13 \N 32 1540 \N 3523 -1 -700.000000 \N 887.730000 187.730000 \N 2008-09-29 \N 1 1541 \N 3524 -1 -187.730000 \N 187.730000 0.000000 \N 2008-09-29 \N 1 1542 \N 3524 -1 -10.000000 \N 10.000000 0.000000 \N 2008-10-30 \N 6 1543 \N 3524 -1 -2.500000 \N 2.500000 0.000000 \N 2010-03-05 \N 8 1544 \N 3524 -1 -10.000000 \N 10.000000 0.000000 \N 2010-06-13 \N 8 1545 \N 3524 -1 -9.900000 \N 9.900000 0.000000 \N 2009-01-07 \N 1 1546 \N 3525 -1 -25.000000 \N 25.000000 0.000000 \N \N \N 33 1547 \N 3525 -1 25.000000 \N 0.000000 25.000000 \N \N \N 34 1548 \N 3526 -1 -5.000000 \N 5.000000 0.000000 \N \N \N 32 1549 \N 3526 -1 5.000000 \N 0.000000 5.000000 \N \N \N 35 1550 \N 3527 -1 50.000000 \N 0.000000 50.000000 \N 2011-06-20 \N 37 1551 \N 3527 -1 50.000000 \N 0.000000 50.000000 \N 2011-06-20 \N 36 1552 \N 3528 122 25.000000 \N 0.000000 25.000000 \N 2100-01-01 \N \N 1553 \N 3529 122 75.000000 \N 25.000000 100.000000 \N 2100-01-01 \N \N 1557 \N 3545 -1 -1.000000 \N 50.000000 49.000000 89 2011-06-20 \N 36 1559 \N 3549 124 -1.000000 \N 1.000000 0.000000 94 1970-01-01 \N 12 1558 \N 3549 124 -1.000000 \N 1.000000 0.000000 94 1970-01-01 \N 13 1560 \N 3549 124 -1.000000 \N 1.000000 0.000000 94 1970-01-01 \N 11 1561 \N 3550 -1 -5.000000 \N 24.900000 19.900000 95 2010-10-24 \N 34 1556 \N 3540 123 -30.000000 \N 7203.000000 7173.000000 96 2100-01-01 \N \N 1555 \N 3539 -1 -0.100000 \N 25.000000 24.900000 96 2010-10-24 \N 34 1563 \N 3557 -1 -0.100000 \N 19.900000 19.800000 96 2010-10-24 \N 34 1554 \N 3538 -1 -1.000000 \N 99.000000 98.000000 96 2009-06-12 \N 30 1562 \N 3556 -1 -1.000000 \N 98.000000 97.000000 96 2009-06-12 \N 29 1564 \N 3558 122 1000.000000 \N 100.000000 1100.000000 \N 2100-01-01 \N \N 1565 \N 3562 122 -1100.000000 \N 1100.000000 0.000000 99 2100-01-01 \N \N 1566 \N 3571 -1 -1.000000 \N 49.000000 48.000000 101 2011-06-20 \N 36 1567 \N 3581 122 1000.000000 \N 0.000000 1000.000000 \N 2100-01-01 \N \N 1568 \N 3584 122 -1000.000000 \N 1000.000000 0.000000 105 2100-01-01 \N \N 1569 \N 3585 124 -1.000000 \N 1.000000 0.000000 108 1970-01-01 \N 14 1570 \N 3586 124 -1.000000 \N 1.000000 0.000000 109 1970-01-01 \N 22 1571 \N 3595 -1 -3.000000 \N 48.000000 45.000000 \N 2011-06-20 \N 36 1572 \N 3598 122 300.000000 \N 0.000000 300.000000 \N 2100-01-01 \N \N 1573 \N 3600 -1 -3.000000 \N 45.000000 42.000000 \N 2011-06-20 \N 36 1574 \N 3605 -1 -4.000000 \N 42.000000 38.000000 \N 2011-06-20 \N 36 1575 \N 3609 122 -300.000000 \N 300.000000 0.000000 \N 2100-01-01 \N \N 1576 \N 3619 -1 125.000000 \N 0.000000 125.000000 \N 2010-08-13 \N 38 1577 \N 3626 -1 -50.000000 \N 50.000000 0.000000 \N 2011-06-20 \N 37 1578 \N 3626 -1 -38.000000 \N 38.000000 0.000000 \N 2011-06-20 \N 36 1579 \N 3626 -1 -12.000000 \N 125.000000 113.000000 \N 2010-08-13 \N 38 1580 \N 3637 -1 -2.000000 \N 113.000000 111.000000 \N 2010-08-13 \N 38 1581 \N 3661 -1 100.000000 \N 0.000000 100.000000 \N 1970-01-01 \N 39 1582 \N 3662 -1 100.000000 \N 0.000000 100.000000 \N 1970-01-01 \N 40 1583 \N 3663 -1 100.000000 \N 0.000000 100.000000 \N 1970-01-01 \N 41 1584 \N 3664 -1 10.000000 \N 0.000000 10.000000 \N 1970-01-01 \N 42 1585 \N 3665 -1 10.000000 \N 0.000000 10.000000 \N 1970-01-01 \N 43 1605 \N 3902 -1 -8.700000 \N 48.000000 39.300000 \N 1970-01-01 \N 53 1587 \N 3673 -1 -2.000000 \N 100.000000 98.000000 \N 1970-01-01 \N 39 1588 \N 3677 122 200.000000 \N 0.000000 200.000000 \N 2100-01-01 \N \N 1589 \N 3678 -1 -2.000000 \N 100.000000 98.000000 \N 1970-01-01 \N 41 1591 \N 3689 -1 -2.000000 \N 100.000000 98.000000 \N 1970-01-01 \N 40 1592 \N 3695 122 -200.000000 \N 200.000000 0.000000 \N 2100-01-01 \N \N 1593 \N 3787 -1 -50.000000 \N 111.000000 61.000000 115 2010-08-13 \N 38 1594 \N 3793 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 44 1595 \N 3794 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 45 1596 \N 3795 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 46 1597 \N 3796 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 47 1598 \N 3797 -1 10.000000 \N 0.000000 10.000000 \N 1970-01-01 \N 48 1599 \N 3798 -1 10.000000 \N 0.000000 10.000000 \N 1970-01-01 \N 49 1600 \N 3799 -1 39.000000 \N 0.000000 39.000000 \N 1970-01-01 \N 50 1601 \N 3800 -1 39.000000 \N 0.000000 39.000000 \N 1970-01-01 \N 51 1602 \N 3801 -1 49.000000 \N 0.000000 49.000000 \N 1970-01-01 \N 52 1603 \N 3802 -1 49.000000 \N 0.000000 49.000000 \N 1970-01-01 \N 53 1604 \N 3810 -1 -1.000000 \N 49.000000 48.000000 \N 1970-01-01 \N 53 1606 \N 3910 -1 -39.300000 \N 39.300000 0.000000 120 1970-01-01 \N 53 1607 \N 3910 -1 -1.000000 \N 1.000000 0.000000 120 1970-01-01 \N 47 1608 \N 3910 -1 -9.700000 \N 61.000000 51.300000 120 2010-08-13 \N 38 1609 \N 3961 -1 3.120000 \N 0.000000 3.120000 \N 2010-12-03 \N 54 1610 \N 3964 -1 100.000000 \N 0.000000 100.000000 \N 2010-12-03 \N 56 1611 \N 3964 -1 150.000000 \N 0.000000 150.000000 \N 2010-12-03 \N 55 1612 \N 3969 -1 -51.300000 \N 51.300000 0.000000 122 2010-08-13 \N 38 1613 \N 3969 -1 -48.700000 \N 150.000000 101.300000 122 2010-12-03 \N 55 1614 \N 3987 -1 -10.000000 \N 100.000000 90.000000 125 2010-12-03 \N 56 1615 \N 3992 -1 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 57 1616 \N 3993 124 -1.000000 \N 1.000000 0.000000 127 1970-01-01 \N 23 1617 \N 3994 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 58 1618 \N 3994 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 59 1619 \N 3994 124 1.000000 \N 0.000000 1.000000 \N 1970-01-01 \N 60 1620 \N 4010 -1 -10.000000 \N 90.000000 80.000000 \N 2010-12-03 \N 56 1621 \N 4047 -1 -100.000000 \N 101.300000 1.300000 134 2010-12-03 \N 55 1622 \N 4055 -1 -1.000000 \N 80.000000 79.000000 \N 2010-12-03 \N 56 1624 \N 4073 -1 -79.000000 \N 79.000000 0.000000 \N \N \N 56 1625 \N 4073 -1 79.000000 \N 0.000000 79.000000 \N \N \N 61 1623 \N 4069 -1 -1.000000 \N 1.300000 0.300000 135 2010-12-03 \N 55 1626 \N 4086 -1 -3.120000 \N 3.120000 0.000000 \N 2010-12-03 \N 54 1627 \N 4086 -1 -0.300000 \N 0.300000 0.000000 \N 2010-12-03 \N 55 1628 \N 4086 -1 -6.580000 \N 79.000000 72.420000 \N 2011-11-04 \N 61 1629 \N 4098 -1 -4.000000 \N 72.420000 68.420000 \N 2011-11-04 \N 61 \. -- -- Data for Name: invhist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invhist (invhist_id, invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_invuom, invhist_ordnumber, invhist_docnumber, invhist_qoh_before, invhist_qoh_after, invhist_unitcost, invhist_acct_id, invhist_xfer_warehous_id, invhist_comments, invhist_posted, invhist_imported, invhist_hasdetail, invhist_ordtype, invhist_analyze, invhist_user, invhist_created, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series) FROM stdin; 3403 329 2008-06-12 13:56:06.107925-04 RP 100.000000 GL 20047 100.000000 200.000000 20.000000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-06-12 13:56:06.107925-04 S 2000.00 4000.00 \N 3422 293 2008-06-12 14:58:14.248517-04 SH 50.000000 EA 50177-1 60023 100.000000 50.000000 1.863400 \N \N Issue to Shipping t \N f SO t jsmith 2008-06-12 14:58:14.248517-04 S 186.34 93.17 \N 3423 293 2008-06-12 15:20:54.223879-04 SH 50.000000 EA 40009-1 60024 50.000000 0.000000 1.863400 \N \N Issue to Shipping t \N f SO t jsmith 2008-06-12 15:20:54.223879-04 S 93.17 0.00 \N 2860 298 2005-12-27 10:44:25.064464-05 RP 200.000000 EA 20001 0.000000 200.000000 0.500000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-27 10:44:25.064464-05 S 0.00 100.00 \N 2861 296 2005-12-27 10:44:25.064464-05 RP 100.000000 EA 20001 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-27 10:44:25.064464-05 S 0.00 25.00 \N 2862 299 2005-12-27 10:44:25.064464-05 RP 400.000000 EA 20001 0.000000 400.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-27 10:44:25.064464-05 S 0.00 40.00 \N 2864 294 2005-12-27 10:44:25.064464-05 RP 100.000000 EA 20001 0.000000 100.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-27 10:44:25.064464-05 S 0.00 100.00 \N 2863 297 2005-12-27 10:44:25.064464-05 RP 1.250000 GL 20001 0.000000 1.250000 0.700000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2005-12-27 10:44:25.064464-05 S 0.00 0.88 \N 2865 297 2005-12-27 10:55:50.26967-05 RP 1.000000 GL 20002 1.250000 2.250000 0.700000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2005-12-27 10:55:50.26967-05 S 0.88 1.58 \N 2866 296 2005-12-27 11:10:51.495092-05 IM 100.000000 EA 10000-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-27 11:10:51.495092-05 S 25.00 0.00 \N 2867 298 2005-12-27 11:10:51.495092-05 IM 110.000000 EA 10000-1 200.000000 90.000000 0.500000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-27 11:10:51.495092-05 S 100.00 45.00 \N 2868 295 2005-12-27 11:10:51.495092-05 RM 100.000000 EA 10000-1 0.000000 100.000000 0.921000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2005-12-27 11:10:51.495092-05 S 0.00 92.10 \N 2869 293 2005-12-27 11:11:38.59791-05 RM 100.000000 EA 50001-1 0.000000 100.000000 2.666800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2005-12-27 11:11:38.59791-05 S 0.00 266.68 \N 2870 295 2005-12-27 11:11:38.59791-05 IM 100.000000 EA 50001-1 100.000000 0.000000 0.921000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-27 11:11:38.59791-05 S 92.10 0.00 \N 2871 299 2005-12-27 11:11:38.59791-05 IM 400.000000 EA 50001-1 400.000000 0.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-27 11:11:38.59791-05 S 40.00 0.00 \N 2873 294 2005-12-27 11:11:38.59791-05 IM 100.000000 EA 50001-1 100.000000 0.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-27 11:11:38.59791-05 S 100.00 0.00 \N 2872 297 2005-12-27 11:11:38.59791-05 IM 1.000000 GL 50001-1 2.250000 1.250000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2005-12-27 11:11:38.59791-05 S 1.58 0.88 \N 2874 293 2005-12-27 11:16:03.293252-05 SH 100.000000 EA 50001-1 100.000000 0.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 11:16:03.293252-05 S 266.68 0.00 \N 2875 298 2005-12-27 11:40:41.93143-05 SI 10.000000 EA MA-101SCR 90.000000 80.000000 0.500000 \N \N Material Scrap\n t \N f t jsmith 2005-12-27 11:40:41.93143-05 S 45.00 40.00 \N 2876 298 2005-12-27 11:41:15.301527-05 AD 30.000000 EA MA-RC1 80.000000 110.000000 0.500000 \N \N Miscellaneous Adjustment\n t \N f t jsmith 2005-12-27 11:41:15.301527-05 S 40.00 55.00 \N 2877 298 2005-12-27 11:45:56.652105-05 AD -50.000000 EA MA-ADJ-1 110.000000 60.000000 0.500000 \N \N Miscellaneous Adjustment\n t \N f t jsmith 2005-12-27 11:45:56.652105-05 S 55.00 30.00 \N 2878 293 2005-12-27 15:44:34.294467-05 RM 10.000000 EA Misc. MDA-UPS1 0.000000 10.000000 2.666800 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2005-12-27 15:44:34.294467-05 S 0.00 26.67 \N 2879 294 2005-12-27 15:44:34.294467-05 IM 10.000000 EA Misc. MDA-UPS1 0.000000 -10.000000 1.000000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2005-12-27 15:44:34.294467-05 S 0.00 -10.00 \N 2881 299 2005-12-27 15:44:34.294467-05 IM 40.000000 EA Misc. MDA-UPS1 0.000000 -40.000000 0.100000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2005-12-27 15:44:34.294467-05 S 0.00 -4.00 \N 2882 295 2005-12-27 15:44:34.294467-05 IM 10.000000 EA Misc. MDA-UPS1 0.000000 -10.000000 0.921000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2005-12-27 15:44:34.294467-05 S 0.00 -9.21 \N 2880 297 2005-12-27 15:44:34.294467-05 IM 0.100000 GL Misc. MDA-UPS1 1.250000 1.150000 0.700000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N t WO t jsmith 2005-12-27 15:44:34.294467-05 S 0.88 0.81 \N 2883 295 2005-12-27 15:45:33.284417-05 RM 10.000000 EA Misc. MDA-PROD1 -10.000000 0.000000 0.921000 \N \N Receive from Misc. Production for Item Number TKIT1\n t \N f WO t jsmith 2005-12-27 15:45:33.284417-05 S -9.21 0.00 \N 2884 296 2005-12-27 15:45:33.284417-05 IM 10.000000 EA Misc. MDA-PROD1 0.000000 -10.000000 0.250000 \N \N Receive from Misc. Production for Item Number TKIT1\n t \N f WO t jsmith 2005-12-27 15:45:33.284417-05 S 0.00 -2.50 \N 2885 298 2005-12-27 15:45:33.284417-05 IM 11.000000 EA Misc. MDA-PROD1 60.000000 49.000000 0.500000 \N \N Receive from Misc. Production for Item Number TKIT1\n t \N f WO t jsmith 2005-12-27 15:45:33.284417-05 S 30.00 24.50 \N 2886 293 2005-12-27 15:51:45.575155-05 SH 5.000000 EA 50002-1 10.000000 5.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 15:51:45.575155-05 S 26.67 13.33 \N 2887 293 2005-12-27 15:51:59.429125-05 RS 5.000000 EA 50002-1 5.000000 10.000000 2.666800 \N \N Return from Shipping t \N f SO t jsmith 2005-12-27 15:51:59.429125-05 S 13.33 26.67 \N 2888 293 2005-12-27 15:53:47.770886-05 SH 1.000000 EA 50002-1 10.000000 9.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 15:53:47.770886-05 S 26.67 24.00 \N 2889 293 2005-12-27 15:53:53.083837-05 SH 1.000000 EA 50002-1 9.000000 8.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 15:53:53.083837-05 S 24.00 21.33 \N 2890 293 2005-12-27 15:54:06.16052-05 SH 3.000000 EA 50002-1 8.000000 5.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 15:54:06.16052-05 S 21.33 13.33 \N 2891 293 2005-12-27 16:02:19.702592-05 SH 1.000000 EA 50003-1 5.000000 4.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 16:02:19.702592-05 S 13.33 10.67 \N 2892 293 2005-12-27 16:07:59.597566-05 SH 1.000000 EA 50003-1 4.000000 3.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 16:07:59.597566-05 S 10.67 8.00 \N 2893 293 2005-12-27 16:09:00.552107-05 SH 1.000000 EA 50003-1 3.000000 2.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 16:09:00.552107-05 S 8.00 5.33 \N 2894 293 2005-12-27 16:09:29.612486-05 SH 1.000000 EA 50003-1 2.000000 1.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 16:09:29.612486-05 S 5.33 2.67 \N 2895 293 2005-12-27 16:09:57.800617-05 RS 2.000000 EA 50003-1 1.000000 3.000000 2.666800 \N \N Return from Shipping t \N f SO t jsmith 2005-12-27 16:09:57.800617-05 S 2.67 8.00 \N 2896 293 2005-12-27 16:10:03.036548-05 SH 1.000000 EA 50003-1 3.000000 2.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 16:10:03.036548-05 S 8.00 5.33 \N 2897 293 2005-12-27 16:22:09.923092-05 SH 2.000000 EA 50003-1 2.000000 0.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 16:22:09.923092-05 S 5.33 0.00 \N 2898 293 2005-12-27 16:27:44.026945-05 SH 10.000000 EA 50004-1 0.000000 -10.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 16:27:44.026945-05 S 0.00 -26.67 \N 2899 293 2005-12-27 16:40:43.670411-05 SH 10.000000 EA 40000-1 -10.000000 -20.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-27 16:40:43.670411-05 S -26.67 -53.34 \N 2900 295 2005-12-28 16:25:11.707602-05 IM 10.000000 EA 40000-1 0.000000 -10.000000 0.921000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-28 16:25:11.707602-05 S 0.00 -9.21 \N 2901 299 2005-12-28 16:25:11.707602-05 IM 40.000000 EA 40000-1 -40.000000 -80.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-28 16:25:11.707602-05 S -4.00 -8.00 \N 2903 294 2005-12-28 16:25:11.707602-05 IM 10.000000 EA 40000-1 -10.000000 -20.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-28 16:25:11.707602-05 S -10.00 -20.00 \N 2902 297 2005-12-28 16:25:11.707602-05 IM 0.100000 GL 40000-1 1.150000 1.050000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2005-12-28 16:25:11.707602-05 S 0.81 0.74 \N 2904 293 2005-12-29 09:27:37.006847-05 SH 1.000000 EA 40000-2 -20.000000 -21.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-29 09:27:37.006847-05 S -53.34 -56.00 \N 2905 299 2005-12-29 09:54:11.546387-05 RP 400.000000 EA 20003 -80.000000 320.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 09:54:11.546387-05 S -8.00 32.00 \N 2906 299 2005-12-29 09:54:11.546387-05 RP 400.000000 EA 20003 320.000000 720.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 09:54:11.546387-05 S 32.00 72.00 \N 3207 314 2007-05-30 09:03:09.265-04 CC 400.000000 SH \N \N 100.000000 500.000000 5.000000 \N \N t \N f \N t mfgadmin 2007-05-30 09:03:09.265-04 S 500.00 2500.00 \N 2907 294 2005-12-29 09:54:11.546387-05 RP 300.000000 EA 20003 -20.000000 280.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 09:54:11.546387-05 S -20.00 280.00 \N 2909 299 2005-12-29 09:54:11.546387-05 RP 492.000000 EA 20003 720.000000 1212.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 09:54:11.546387-05 S 72.00 121.20 \N 2910 298 2005-12-29 09:54:11.546387-05 RP 300.000000 EA 20003 49.000000 349.000000 0.500000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 09:54:11.546387-05 S 24.50 174.50 \N 2911 296 2005-12-29 09:54:11.546387-05 RP 400.000000 EA 20003 -10.000000 390.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 09:54:11.546387-05 S -2.50 97.50 \N 2908 297 2005-12-29 09:54:11.546387-05 RP 1.250000 GL 20003 1.050000 2.300000 0.700000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2005-12-29 09:54:11.546387-05 S 0.74 1.61 \N 2912 295 2005-12-29 10:01:19.939306-05 RM 300.000000 EA 10002-1 -10.000000 290.000000 0.921000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2005-12-29 10:01:19.939306-05 S -9.21 267.09 \N 2913 298 2005-12-29 10:01:19.939306-05 IM 330.000000 EA 10002-1 349.000000 19.000000 0.500000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:01:19.939306-05 S 174.50 9.50 \N 2914 296 2005-12-29 10:01:19.939306-05 IM 300.000000 EA 10002-1 390.000000 90.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:01:19.939306-05 S 97.50 22.50 \N 2915 293 2005-12-29 10:11:42.058351-05 RM 10.000000 EA 40000-1 -21.000000 -11.000000 2.666800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2005-12-29 10:11:42.058351-05 S -56.00 -29.33 \N 2916 293 2005-12-29 10:12:08.029586-05 RM 100.000000 EA 40000-2 -11.000000 89.000000 2.666800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2005-12-29 10:12:08.029586-05 S -29.33 237.35 \N 2917 295 2005-12-29 10:12:08.029586-05 IM 100.000000 EA 40000-2 290.000000 190.000000 0.921000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:12:08.029586-05 S 267.09 174.99 \N 2918 299 2005-12-29 10:12:08.029586-05 IM 400.000000 EA 40000-2 1212.000000 812.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:12:08.029586-05 S 121.20 81.20 \N 2920 294 2005-12-29 10:12:08.029586-05 IM 100.000000 EA 40000-2 280.000000 180.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:12:08.029586-05 S 280.00 180.00 \N 2919 297 2005-12-29 10:12:08.029586-05 IM 1.000000 GL 40000-2 2.300000 1.300000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2005-12-29 10:12:08.029586-05 S 1.61 0.91 \N 2921 293 2005-12-29 10:12:34.705365-05 RM 100.000000 EA 10001-1 89.000000 189.000000 2.666800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2005-12-29 10:12:34.705365-05 S 237.35 504.03 \N 2922 295 2005-12-29 10:12:34.705365-05 IM 100.000000 EA 10001-1 190.000000 90.000000 0.921000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:12:34.705365-05 S 174.99 82.89 \N 2923 299 2005-12-29 10:12:34.705365-05 IM 400.000000 EA 10001-1 812.000000 412.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:12:34.705365-05 S 81.20 41.20 \N 2925 294 2005-12-29 10:12:34.705365-05 IM 100.000000 EA 10001-1 180.000000 80.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:12:34.705365-05 S 180.00 80.00 \N 2924 297 2005-12-29 10:12:34.705365-05 IM 1.000000 GL 10001-1 1.300000 0.300000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2005-12-29 10:12:34.705365-05 S 0.91 0.21 \N 2926 299 2005-12-29 10:13:37.4137-05 IM 10.000000 EA 40000-1 412.000000 402.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2005-12-29 10:13:37.4137-05 S 41.20 40.20 \N 2927 297 2005-12-29 10:13:37.4137-05 IM 0.100000 GL 40000-1 0.300000 0.200000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2005-12-29 10:13:37.4137-05 S 0.21 0.14 \N 2928 294 2005-12-29 12:00:38.208935-05 RP 10000.000000 EA 20004 80.000000 10080.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 12:00:38.208935-05 S 80.00 10080.00 \N 2929 298 2005-12-29 12:00:38.208935-05 RP 10000.000000 EA 20004 19.000000 10019.000000 0.500000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 12:00:38.208935-05 S 9.50 5009.50 \N 2930 299 2005-12-29 12:00:38.208935-05 RP 40000.000000 EA 20004 402.000000 40402.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 12:00:38.208935-05 S 40.20 4040.20 \N 2931 297 2005-12-29 12:00:38.208935-05 RP 12.500000 GL 20004 0.200000 12.700000 0.700000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2005-12-29 12:00:38.208935-05 S 0.14 8.89 \N 2932 295 2005-12-29 12:02:08.616234-05 RM 90.000000 EA Misc. MA-1229 90.000000 180.000000 0.921000 \N \N Receive from Misc. Production for Item Number TKIT1\n t \N f WO t jsmith 2005-12-29 12:02:08.616234-05 S 82.89 165.78 \N 2933 296 2005-12-29 12:02:08.616234-05 IM 90.000000 EA Misc. MA-1229 90.000000 0.000000 0.250000 \N \N Receive from Misc. Production for Item Number TKIT1\n t \N f WO t jsmith 2005-12-29 12:02:08.616234-05 S 22.50 0.00 \N 2934 298 2005-12-29 12:02:08.616234-05 IM 99.000000 EA Misc. MA-1229 10019.000000 9920.000000 0.500000 \N \N Receive from Misc. Production for Item Number TKIT1\n t \N f WO t jsmith 2005-12-29 12:02:08.616234-05 S 5009.50 4960.00 \N 2935 293 2005-12-29 12:02:48.89463-05 RM 180.000000 EA Misc. MA_200 189.000000 369.000000 2.666800 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2005-12-29 12:02:48.89463-05 S 504.03 984.05 \N 2936 294 2005-12-29 12:02:48.89463-05 IM 180.000000 EA Misc. MA_200 10080.000000 9900.000000 1.000000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2005-12-29 12:02:48.89463-05 S 10080.00 9900.00 \N 2941 299 2005-12-29 17:57:14.865318-05 RP 500.000000 EA 20005 39682.000000 40182.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 17:57:14.865318-05 S 3968.20 4018.20 \N 2938 299 2005-12-29 12:02:48.89463-05 IM 720.000000 EA Misc. MA_200 40402.000000 39682.000000 0.100000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2005-12-29 12:02:48.89463-05 S 4040.20 3968.20 \N 2939 295 2005-12-29 12:02:48.89463-05 IM 180.000000 EA Misc. MA_200 180.000000 0.000000 0.921000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2005-12-29 12:02:48.89463-05 S 165.78 0.00 \N 2937 297 2005-12-29 12:02:48.89463-05 IM 1.800000 GL Misc. MA_200 12.700000 10.900000 0.700000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N t WO t jsmith 2005-12-29 12:02:48.89463-05 S 8.89 7.63 \N 2940 293 2005-12-29 12:07:32.143853-05 SH 369.000000 EA 50005-1 369.000000 0.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2005-12-29 12:07:32.143853-05 S 984.05 0.00 \N 2942 299 2005-12-29 18:01:52.460451-05 RP 500.000000 EA 20006 40182.000000 40682.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 18:01:52.460451-05 S 4018.20 4068.20 \N 2943 299 2005-12-29 18:05:06.53047-05 RP 500.000000 EA 20007 40682.000000 41182.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-29 18:05:06.53047-05 S 4068.20 4118.20 \N 2944 299 2005-12-30 14:55:21.954437-05 RP 100.000000 EA 20008 41182.000000 41282.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-30 14:55:21.954437-05 S 4118.20 4128.20 \N 2945 299 2005-12-30 15:06:11.174343-05 RP 1000.000000 EA 20009 41282.000000 42282.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-30 15:06:11.174343-05 S 4128.20 4228.20 \N 2946 299 2005-12-30 15:08:18.361723-05 RP 1000.000000 EA 20010 42282.000000 43282.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2005-12-30 15:08:18.361723-05 S 4228.20 4328.20 \N 2947 296 2006-01-09 10:05:08.722536-05 RP 10.000000 EA 20011 0.000000 10.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-09 10:05:08.722536-05 S 0.00 2.50 \N 2948 298 2006-01-09 10:11:59.284841-05 IM 110.000000 EA 10003-1 9920.000000 9810.000000 0.500000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-09 10:11:59.284841-05 S 4960.00 4905.00 \N 2949 296 2006-01-09 10:11:59.284841-05 IM 100.000000 EA 10003-1 10.000000 -90.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-09 10:11:59.284841-05 S 2.50 -22.50 \N 2950 295 2006-01-09 10:11:59.284841-05 RM 100.000000 EA 10003-1 0.000000 100.000000 0.921000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-09 10:11:59.284841-05 S 0.00 92.10 \N 2951 293 2006-01-09 10:12:58.424348-05 RM 100.000000 EA 50008-1 0.000000 100.000000 2.666800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-09 10:12:58.424348-05 S 0.00 266.68 \N 2952 299 2006-01-09 10:12:58.424348-05 IM 400.000000 EA 50008-1 43282.000000 42882.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-09 10:12:58.424348-05 S 4328.20 4288.20 \N 2953 295 2006-01-09 10:12:58.424348-05 IM 100.000000 EA 50008-1 100.000000 0.000000 0.921000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-09 10:12:58.424348-05 S 92.10 0.00 \N 2954 294 2006-01-09 10:12:58.424348-05 IM 100.000000 EA 50008-1 9900.000000 9800.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-09 10:12:58.424348-05 S 9900.00 9800.00 \N 2955 297 2006-01-09 10:12:58.424348-05 IM 1.000000 GL 50008-1 10.900000 9.900000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-09 10:12:58.424348-05 S 7.63 6.93 \N 2956 293 2006-01-09 10:18:03.89857-05 SH 100.000000 EA 50008-1 100.000000 0.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-09 10:18:03.89857-05 S 266.68 0.00 \N 2957 296 2006-01-09 10:33:08.967829-05 RP 100.000000 EA 20012 -90.000000 10.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-09 10:33:08.967829-05 S -22.50 2.50 \N 2958 296 2006-01-09 10:34:28.15672-05 RP -10.000000 EA 20012 10.000000 0.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-09 10:34:28.15672-05 S 2.50 0.00 \N 2959 293 2006-01-09 10:42:08.678827-05 AD 100.000000 EA MDA-001 0.000000 100.000000 2.666800 \N \N Miscellaneous Adjustment\n t \N f t jsmith 2006-01-09 10:42:08.678827-05 S 0.00 266.68 \N 2960 293 2006-01-09 10:42:36.316136-05 SH 10.000000 EA 50009-1 100.000000 90.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-09 10:42:36.316136-05 S 266.68 240.01 \N 2961 293 2006-01-09 10:53:14.730945-05 SH 10.000000 EA 50030-1 90.000000 80.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-09 10:53:14.730945-05 S 240.01 213.34 \N 2962 293 2006-01-09 10:53:53.966653-05 SH 10.000000 EA 50031-1 80.000000 70.000000 2.666800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-09 10:53:53.966653-05 S 213.34 186.68 \N 2963 295 2006-01-10 12:49:21.459381-05 AD 100.000000 EA MA-1 0.000000 100.000000 0.618200 \N \N Miscellaneous Adjustment\n t \N f t jsmith 2006-01-10 12:49:21.459381-05 S 0.00 61.82 \N 2965 294 2006-01-10 12:49:56.229598-05 IM 10.000000 EA 10005-1 9800.000000 9790.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 12:49:56.229598-05 S 2450.00 2447.50 \N 3007 300 2006-01-11 10:17:04.317928-05 AD 10.000000 EA PT-100 70.000000 80.000000 2.014000 \N \N Miscellaneous Adjustment\nNotes-PT t \N t t jsmith 2006-01-11 10:17:04.317928-05 S 140.98 161.12 \N 2964 297 2006-01-10 12:49:56.229598-05 IM 0.100000 GL 10005-1 9.900000 9.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-10 12:49:56.229598-05 S 6.93 6.86 \N 2966 300 2006-01-10 12:49:56.229598-05 RM 10.000000 EA 10005-1 0.000000 10.000000 2.014000 \N \N Receive Inventory from Manufacturing t \N t WO t jsmith 2006-01-10 12:49:56.229598-05 S 0.00 20.14 \N 3008 299 2006-01-11 10:18:26.647873-05 AD 100.000000 EA MA-TW-1 42762.000000 42862.000000 0.200000 \N \N Miscellaneous Adjustment\nNotes-100 t \N f t jsmith 2006-01-11 10:18:26.647873-05 S 8552.40 8572.40 \N 2967 300 2006-01-10 12:52:36.105185-05 RL 0.000000 EA \N \N 10.000000 10.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 12:52:36.105185-05 S 20.14 20.14 \N 2968 299 2006-01-10 12:52:36.633031-05 IM 40.000000 EA 10005-1 42882.000000 42842.000000 0.200000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 12:52:36.633031-05 S 8576.40 8568.40 \N 2969 295 2006-01-10 12:52:51.553445-05 IM 10.000000 EA 10005-1 100.000000 90.000000 0.618200 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 12:52:51.553445-05 S 61.82 55.64 \N 2971 294 2006-01-10 14:24:59.311032-05 IM 5.000000 EA 10006-1 9790.000000 9785.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 14:24:59.311032-05 S 2447.50 2446.25 \N 3009 297 2006-01-11 10:43:25.050102-05 AD 1000.000000 GL MDA-3804-TEST-LOT 9.600000 1009.600000 0.700000 \N \N Miscellaneous Adjustment\nNote--- t \N t t jsmith 2006-01-11 10:43:25.050102-05 S 6.72 706.72 \N 2970 297 2006-01-10 14:24:59.311032-05 IM 0.050000 GL 10006-1 9.800000 9.750000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-10 14:24:59.311032-05 S 6.86 6.83 \N 2972 300 2006-01-10 14:24:59.311032-05 RM 5.000000 EA 10006-1 10.000000 15.000000 2.014000 \N \N Receive Inventory from Manufacturing t \N t WO t jsmith 2006-01-10 14:24:59.311032-05 S 20.14 30.21 \N 3010 299 2006-01-11 10:54:07.761482-05 AD 400.000000 EA TW-100 42862.000000 43262.000000 0.200000 \N \N Miscellaneous Adjustment\n t \N f t jsmith 2006-01-11 10:54:07.761482-05 S 8572.40 8652.40 \N 2973 300 2006-01-10 14:26:06.893812-05 RL 0.000000 EA \N \N 15.000000 15.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 14:26:06.893812-05 S 30.21 30.21 \N 2974 299 2006-01-10 14:26:07.002195-05 IM 20.000000 EA 10006-1 42842.000000 42822.000000 0.200000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 14:26:07.002195-05 S 8568.40 8564.40 \N 2975 300 2006-01-10 14:26:23.706395-05 RL 0.000000 EA \N \N 15.000000 15.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 14:26:23.706395-05 S 30.21 30.21 \N 2976 295 2006-01-10 14:26:23.770144-05 IM 5.000000 EA 10006-1 90.000000 85.000000 0.618200 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 14:26:23.770144-05 S 55.64 52.55 \N 3011 300 2006-01-11 14:29:27.4484-05 SH 1.000000 EA 50037-2 80.000000 79.000000 2.461800 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-11 14:29:27.4484-05 S 196.94 194.48 \N 2978 294 2006-01-10 14:26:41.26114-05 IM 5.000000 EA 10006-1 9785.000000 9780.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 14:26:41.26114-05 S 2446.25 2445.00 \N 3012 293 2006-01-11 14:29:39.244866-05 SH 1.000000 EA 50037-3 70.000000 69.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-11 14:29:39.244866-05 S 172.33 169.86 \N 2977 297 2006-01-10 14:26:41.26114-05 IM 0.050000 GL 10006-1 9.750000 9.700000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-10 14:26:41.26114-05 S 6.83 6.79 \N 2979 300 2006-01-10 14:26:41.26114-05 RM 5.000000 EA 10006-1 15.000000 20.000000 2.014000 \N \N Receive Inventory from Manufacturing t \N t WO t jsmith 2006-01-10 14:26:41.26114-05 S 30.21 40.28 \N 2980 300 2006-01-10 14:36:29.459788-05 RL 0.000000 EA \N \N 20.000000 20.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 14:36:29.459788-05 S 40.28 40.28 \N 2981 299 2006-01-10 14:36:29.531898-05 IM 20.000000 EA 10006-1 42822.000000 42802.000000 0.200000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 14:36:29.531898-05 S 8564.40 8560.40 \N 2982 300 2006-01-10 14:36:47.501573-05 RL 0.000000 EA \N \N 20.000000 20.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 14:36:47.501573-05 S 40.28 40.28 \N 2983 295 2006-01-10 14:36:47.561613-05 IM 5.000000 EA 10006-1 85.000000 80.000000 0.618200 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 14:36:47.561613-05 S 52.55 49.46 \N 3013 300 2006-01-11 14:29:53.348902-05 SH 1.000000 EA 50037-4 79.000000 78.000000 2.461800 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-11 14:29:53.348902-05 S 194.48 192.02 \N 2984 300 2006-01-10 14:37:47.18892-05 RL 0.000000 EA \N \N 20.000000 20.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 14:37:47.18892-05 S 40.28 40.28 \N 2985 300 2006-01-10 14:38:14.294789-05 RL 0.000000 EA \N \N 20.000000 20.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 14:38:14.294789-05 S 40.28 40.28 \N 3014 300 2006-01-11 14:31:44.746753-05 SH 1.000000 EA 50037-2 78.000000 77.000000 2.461800 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-11 14:31:44.746753-05 S 192.02 189.56 \N 2986 300 2006-01-10 14:45:24.740735-05 AD -20.000000 EA MIKE 20.000000 0.000000 2.014000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-01-10 14:45:24.740735-05 S 40.28 0.00 \N 3015 293 2006-01-11 14:31:57.792661-05 SH 1.000000 EA 50037-3 69.000000 68.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-11 14:31:57.792661-05 S 169.86 167.40 \N 2988 294 2006-01-10 15:03:57.529181-05 IM 5.000000 EA 10007-1 9780.000000 9775.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 15:03:57.529181-05 S 2445.00 2443.75 \N 2987 297 2006-01-10 15:03:57.529181-05 IM 0.050000 GL 10007-1 9.700000 9.650000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-10 15:03:57.529181-05 S 6.79 6.76 \N 2989 300 2006-01-10 15:03:57.529181-05 RM 5.000000 EA 10007-1 0.000000 5.000000 2.014000 \N \N Receive Inventory from Manufacturing t \N t WO t jsmith 2006-01-10 15:03:57.529181-05 S 0.00 10.07 \N 3016 300 2006-01-11 14:32:02.775311-05 SH 1.000000 EA 50037-4 77.000000 76.000000 2.461800 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-11 14:32:02.775311-05 S 189.56 187.10 \N 2990 300 2006-01-10 15:07:23.798208-05 RL 0.000000 EA \N \N 5.000000 5.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 15:07:23.798208-05 S 10.07 10.07 \N 2991 299 2006-01-10 15:07:23.888614-05 IM 20.000000 EA 10007-1 42802.000000 42782.000000 0.200000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 15:07:23.888614-05 S 8560.40 8556.40 \N 3017 293 2006-01-11 15:13:53.676035-05 SH 50.000000 EA 50039-1 68.000000 18.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-11 15:13:53.676035-05 S 167.40 44.31 \N 2992 300 2006-01-10 15:36:58.383235-05 RL 0.000000 EA \N \N 5.000000 5.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 15:36:58.383235-05 S 10.07 10.07 \N 2993 295 2006-01-10 15:36:58.451639-05 IM 5.000000 EA 10007-1 80.000000 75.000000 0.618200 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 15:36:58.451639-05 S 49.46 46.37 \N 3018 293 2006-01-11 15:42:25.88454-05 SH 10.000000 EA 50040-1 18.000000 8.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-11 15:42:25.88454-05 S 44.31 19.69 \N 2995 294 2006-01-10 15:45:19.916794-05 IM 5.000000 EA 10007-1 9775.000000 9770.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 15:45:19.916794-05 S 2443.75 2442.50 \N 3019 293 2006-01-11 16:00:15.552143-05 SH 10.000000 EA 50041-1 8.000000 -2.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-11 16:00:15.552143-05 S 19.69 -4.92 \N 2994 297 2006-01-10 15:45:19.916794-05 IM 0.050000 GL 10007-1 9.650000 9.600000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-10 15:45:19.916794-05 S 6.76 6.72 \N 2996 300 2006-01-10 15:45:19.916794-05 RM 5.000000 EA 10007-1 5.000000 10.000000 2.014000 \N \N Receive Inventory from Manufacturing t \N t WO t jsmith 2006-01-10 15:45:19.916794-05 S 10.07 20.14 \N 3020 293 2006-01-11 16:03:28.126626-05 SH 10.000000 EA 50041-1 -2.000000 -12.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-11 16:03:28.126626-05 S -4.92 -29.54 \N 2997 300 2006-01-10 15:46:22.349755-05 RL 0.000000 EA \N \N 10.000000 10.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 15:46:22.349755-05 S 20.14 20.14 \N 2998 299 2006-01-10 15:46:22.423533-05 IM 20.000000 EA 10007-1 42782.000000 42762.000000 0.200000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 15:46:22.423533-05 S 8556.40 8552.40 \N 2999 300 2006-01-10 15:46:48.272232-05 RL 0.000000 EA \N \N 10.000000 10.000000 2.014000 \N \N t \N t \N t jsmith 2006-01-10 15:46:48.272232-05 S 20.14 20.14 \N 3000 295 2006-01-10 15:46:48.352376-05 IM 5.000000 EA 10007-1 75.000000 70.000000 0.618200 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-10 15:46:48.352376-05 S 46.37 43.27 \N 3001 300 2006-01-11 09:54:13.901373-05 AD 50.000000 EA MDA-001 10.000000 60.000000 2.014000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-01-11 09:54:13.901373-05 S 20.14 120.84 \N 3002 300 2006-01-11 09:59:54.469474-05 SH 10.000000 EA 50037-2 60.000000 50.000000 2.014000 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-11 09:59:54.469474-05 S 120.84 100.70 \N 3003 300 2006-01-11 10:00:16.138938-05 SH 10.000000 EA 50037-4 50.000000 40.000000 2.014000 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-11 10:00:16.138938-05 S 100.70 80.56 \N 3004 300 2006-01-11 10:00:30.64328-05 RS 10.000000 EA 50037-4 40.000000 50.000000 2.014000 \N \N Return from Shipping t \N t SO t jsmith 2006-01-11 10:00:30.64328-05 S 80.56 100.70 \N 3005 300 2006-01-11 10:00:42.121344-05 RS 10.000000 EA 50037-2 50.000000 60.000000 2.014000 \N \N Return from Shipping t \N t SO t jsmith 2006-01-11 10:00:42.121344-05 S 100.70 120.84 \N 3006 300 2006-01-11 10:06:13.415672-05 AD 10.000000 EA MA-3804 60.000000 70.000000 2.014000 \N \N Miscellaneous Adjustment\nNote-3804 t \N t t jsmith 2006-01-11 10:06:13.415672-05 S 120.84 140.98 \N 3021 300 2006-01-12 13:46:04.75092-05 SH 8.000000 EA 50037-2 76.000000 68.000000 2.461800 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-12 13:46:04.75092-05 S 187.10 167.40 \N 3022 293 2006-01-12 13:46:17.528594-05 SH 8.000000 EA 50037-3 -12.000000 -20.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-12 13:46:17.528594-05 S -29.54 -49.24 \N 3023 300 2006-01-12 13:46:23.304596-05 SH 8.000000 EA 50037-4 68.000000 60.000000 2.461800 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-12 13:46:23.304596-05 S 167.40 147.71 \N 3024 293 2006-01-12 13:49:28.970355-05 RM 20.000000 EA Misc. MA-MISC-1 -20.000000 0.000000 2.461800 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2006-01-12 13:49:28.970355-05 S -49.24 0.00 \N 3025 294 2006-01-12 13:49:28.970355-05 IM 20.000000 EA Misc. MA-MISC-1 9770.000000 9750.000000 0.250000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2006-01-12 13:49:28.970355-05 S 2442.50 2437.50 \N 3027 299 2006-01-12 13:49:28.970355-05 IM 80.000000 EA Misc. MA-MISC-1 43262.000000 43182.000000 0.250000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2006-01-12 13:49:28.970355-05 S 10815.50 10795.50 \N 3028 295 2006-01-12 13:49:28.970355-05 IM 20.000000 EA Misc. MA-MISC-1 70.000000 50.000000 0.866000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t jsmith 2006-01-12 13:49:28.970355-05 S 60.62 43.30 \N 3026 297 2006-01-12 13:49:28.970355-05 IM 0.200000 GL Misc. MA-MISC-1 1009.600000 1009.400000 0.700000 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N t WO t jsmith 2006-01-12 13:49:28.970355-05 S 706.72 706.58 \N 3030 294 2006-01-12 13:50:12.642582-05 IM 50.000000 EA Misc. MDA-MISC-2 9750.000000 9700.000000 0.250000 \N \N Receive from Misc. Production for Item Number WTRUCK1\n t \N f WO t jsmith 2006-01-12 13:50:12.642582-05 S 2437.50 2425.00 \N 3032 299 2006-01-12 13:50:12.642582-05 IM 200.000000 EA Misc. MDA-MISC-2 43182.000000 42982.000000 0.250000 \N \N Receive from Misc. Production for Item Number WTRUCK1\n t \N f WO t jsmith 2006-01-12 13:50:12.642582-05 S 10795.50 10745.50 \N 3033 295 2006-01-12 13:50:12.642582-05 IM 50.000000 EA Misc. MDA-MISC-2 50.000000 0.000000 0.866000 \N \N Receive from Misc. Production for Item Number WTRUCK1\n t \N f WO t jsmith 2006-01-12 13:50:12.642582-05 S 43.30 0.00 \N 3029 300 2006-01-12 13:50:12.642582-05 RM 50.000000 EA Misc. MDA-MISC-2 60.000000 110.000000 2.461800 \N \N Receive from Misc. Production for Item Number WTRUCK1\n t \N t WO t jsmith 2006-01-12 13:50:12.642582-05 S 147.71 270.80 \N 3076 296 2006-01-30 16:51:09.705773-05 RP 100.000000 EA 20019 0.000000 100.000000 0.470000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-30 16:51:09.705773-05 S 0.00 47.00 \N 3031 297 2006-01-12 13:50:12.642582-05 IM 0.500000 GL Misc. MDA-MISC-2 1009.400000 1008.900000 0.700000 \N \N Receive from Misc. Production for Item Number WTRUCK1\n t \N t WO t jsmith 2006-01-12 13:50:12.642582-05 S 706.58 706.23 \N 3034 299 2006-01-12 13:52:38.951513-05 RP 10.000000 EA 20015 42982.000000 42992.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-12 13:52:38.951513-05 S 10745.50 10748.00 \N 3035 294 2006-01-12 16:16:51.263622-05 IM 10.000000 EA 10008-1 9700.000000 9690.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-12 16:16:51.263622-05 S 2425.00 2422.50 \N 3037 299 2006-01-12 16:16:51.263622-05 IM 40.000000 EA 10008-1 42992.000000 42952.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-12 16:16:51.263622-05 S 10748.00 10738.00 \N 3038 295 2006-01-12 16:16:51.263622-05 IM 10.000000 EA 10008-1 0.000000 -10.000000 0.866000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-12 16:16:51.263622-05 S 0.00 -8.66 \N 3036 297 2006-01-12 16:16:51.263622-05 IM 0.100000 GL 10008-1 1008.900000 1008.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-12 16:16:51.263622-05 S 706.23 706.16 \N 3039 300 2006-01-12 16:20:45.3236-05 RM 10.000000 EA 10008-1 110.000000 120.000000 2.461800 \N \N Receive Inventory from Manufacturing t \N t WO t jsmith 2006-01-12 16:20:45.3236-05 S 270.80 295.42 \N 3040 295 2006-01-12 16:24:09.129658-05 AD 10.000000 EA MDA-001 -10.000000 0.000000 0.866000 \N \N Miscellaneous Adjustment\n t \N f t jsmith 2006-01-12 16:24:09.129658-05 S -8.66 0.00 \N 3041 296 2006-01-13 11:41:00.309379-05 RP 100.000000 EA 20016 0.000000 100.000000 0.470000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-13 11:41:00.309379-05 S 0.00 47.00 \N 3042 296 2006-01-13 11:50:07.020591-05 IM 100.000000 EA 10009-1 100.000000 0.000000 0.470000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 11:50:07.020591-05 S 47.00 0.00 \N 3043 298 2006-01-13 11:50:07.020591-05 IM 110.000000 EA 10009-1 9810.000000 9700.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 11:50:07.020591-05 S 2452.50 2425.00 \N 3044 295 2006-01-13 11:50:07.020591-05 RM 100.000000 EA 10009-1 0.000000 100.000000 0.866000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-13 11:50:07.020591-05 S 0.00 86.60 \N 3045 293 2006-01-13 11:51:00.636398-05 RM 100.000000 EA 50043-1 0.000000 100.000000 2.461800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-13 11:51:00.636398-05 S 0.00 246.18 \N 3046 299 2006-01-13 11:51:00.636398-05 IM 400.000000 EA 50043-1 42952.000000 42552.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 11:51:00.636398-05 S 10738.00 10638.00 \N 3047 295 2006-01-13 11:51:00.636398-05 IM 100.000000 EA 50043-1 100.000000 0.000000 0.866000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 11:51:00.636398-05 S 86.60 0.00 \N 3048 294 2006-01-13 11:51:00.636398-05 IM 100.000000 EA 50043-1 9690.000000 9590.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 11:51:00.636398-05 S 2422.50 2397.50 \N 3049 297 2006-01-13 11:51:00.636398-05 IM 1.000000 GL 50043-1 1008.800000 1007.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-13 11:51:00.636398-05 S 706.16 705.46 \N 3050 293 2006-01-13 11:53:06.038317-05 SH 100.000000 EA 50043-1 100.000000 0.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-13 11:53:06.038317-05 S 246.18 0.00 \N 3051 300 2006-01-13 12:34:40.665-05 AD 10.000000 EA 3830-MLC 120.000000 130.000000 2.461800 \N \N Miscellaneous Adjustment\nNote--3830-MLC t \N t t jsmith 2006-01-13 12:34:40.665-05 S 295.42 320.03 \N 3052 297 2006-01-13 12:35:15.405-05 AD 10.000000 GL 3830-LOT-1 1007.800000 1017.800000 0.700000 \N \N Miscellaneous Adjustment\nNotes-3830-LOT-1 t \N t t jsmith 2006-01-13 12:35:15.405-05 S 705.46 712.46 \N 3053 299 2006-01-13 12:36:15.762-05 AD 10.000000 EA 3820-REG-1 42552.000000 42562.000000 0.250000 \N \N Miscellaneous Adjustment\nNotes-3820-REG-1 t \N f t jsmith 2006-01-13 12:36:15.762-05 S 10638.00 10640.50 \N 3054 300 2006-01-13 12:48:21.366-05 SH 10.000000 EA 40005-1 130.000000 120.000000 2.461800 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-13 12:48:21.366-05 S 320.03 295.42 \N 3055 300 2006-01-13 13:42:12.762-05 SH 10.000000 EA 50045-1 120.000000 110.000000 2.461800 \N \N Issue to Shipping t \N t SO t jsmith 2006-01-13 13:42:12.762-05 S 295.42 270.80 \N 3056 296 2006-01-13 15:26:09.059-05 RP 100.000000 EA 20017 0.000000 100.000000 0.470000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-13 15:26:09.059-05 S 0.00 47.00 \N 3057 298 2006-01-13 15:29:01.838-05 IM 110.000000 EA 10010-1 9700.000000 9590.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 15:29:01.838-05 S 2425.00 2397.50 \N 3058 296 2006-01-13 15:29:01.838-05 IM 100.000000 EA 10010-1 100.000000 0.000000 0.470000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 15:29:01.838-05 S 47.00 0.00 \N 3059 295 2006-01-13 15:29:01.838-05 RM 100.000000 EA 10010-1 0.000000 100.000000 0.866000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-13 15:29:01.838-05 S 0.00 86.60 \N 3060 293 2006-01-13 15:29:42.106-05 RM 100.000000 EA 50046-1 0.000000 100.000000 2.461800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-13 15:29:42.106-05 S 0.00 246.18 \N 3061 295 2006-01-13 15:29:42.106-05 IM 100.000000 EA 50046-1 100.000000 0.000000 0.866000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 15:29:42.106-05 S 86.60 0.00 \N 3062 299 2006-01-13 15:29:42.106-05 IM 400.000000 EA 50046-1 42562.000000 42162.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 15:29:42.106-05 S 10640.50 10540.50 \N 3063 294 2006-01-13 15:29:42.106-05 IM 100.000000 EA 50046-1 9590.000000 9490.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-13 15:29:42.106-05 S 2397.50 2372.50 \N 3064 297 2006-01-13 15:29:42.106-05 IM 1.000000 GL 50046-1 1017.800000 1016.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-13 15:29:42.106-05 S 712.46 711.76 \N 3065 293 2006-01-13 15:30:06.521-05 SH 100.000000 EA 50046-1 100.000000 0.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-13 15:30:06.521-05 S 246.18 0.00 \N 3066 296 2006-01-30 12:16:16.734143-05 IM 100.000000 EA 10011-1 0.000000 -100.000000 0.470000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 12:16:16.734143-05 S 0.00 -47.00 \N 3067 298 2006-01-30 12:16:16.734143-05 IM 110.000000 EA 10011-1 9590.000000 9480.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 12:16:16.734143-05 S 2397.50 2370.00 \N 3068 295 2006-01-30 12:16:16.734143-05 RM 100.000000 EA 10011-1 0.000000 100.000000 0.866000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-30 12:16:16.734143-05 S 0.00 86.60 \N 3069 293 2006-01-30 12:16:46.435991-05 RM 100.000000 EA 50148-1 0.000000 100.000000 2.461800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-30 12:16:46.435991-05 S 0.00 246.18 \N 3070 295 2006-01-30 12:16:46.435991-05 IM 100.000000 EA 50148-1 100.000000 0.000000 0.866000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 12:16:46.435991-05 S 86.60 0.00 \N 3071 299 2006-01-30 12:16:46.435991-05 IM 400.000000 EA 50148-1 42162.000000 41762.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 12:16:46.435991-05 S 10540.50 10440.50 \N 3072 294 2006-01-30 12:16:46.435991-05 IM 100.000000 EA 50148-1 9490.000000 9390.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 12:16:46.435991-05 S 2372.50 2347.50 \N 3073 297 2006-01-30 12:16:46.435991-05 IM 1.000000 GL 50148-1 1016.800000 1015.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-30 12:16:46.435991-05 S 711.76 711.06 \N 3074 296 2006-01-30 12:19:28.277472-05 RP 100.000000 EA 20018 -100.000000 0.000000 0.470000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-30 12:19:28.277472-05 S -47.00 0.00 \N 3075 293 2006-01-30 12:41:05.59221-05 SH 100.000000 EA 50148-1 100.000000 0.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-30 12:41:05.59221-05 S 246.18 0.00 \N 3077 296 2006-01-30 16:58:10.153362-05 IM 100.000000 EA 10012-1 100.000000 0.000000 0.470000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 16:58:10.153362-05 S 47.00 0.00 \N 3078 298 2006-01-30 16:58:10.153362-05 IM 110.000000 EA 10012-1 9480.000000 9370.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 16:58:10.153362-05 S 2370.00 2342.50 \N 3079 295 2006-01-30 16:58:10.153362-05 RM 100.000000 EA 10012-1 0.000000 100.000000 0.866000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-30 16:58:10.153362-05 S 0.00 86.60 \N 3080 293 2006-01-30 17:00:37.702398-05 RM 100.000000 EA 50149-1 0.000000 100.000000 2.461800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-01-30 17:00:37.702398-05 S 0.00 246.18 \N 3081 295 2006-01-30 17:00:37.702398-05 IM 100.000000 EA 50149-1 100.000000 0.000000 0.866000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 17:00:37.702398-05 S 86.60 0.00 \N 3082 299 2006-01-30 17:00:37.702398-05 IM 400.000000 EA 50149-1 41762.000000 41362.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 17:00:37.702398-05 S 10440.50 10340.50 \N 3083 294 2006-01-30 17:00:37.702398-05 IM 100.000000 EA 50149-1 9390.000000 9290.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-01-30 17:00:37.702398-05 S 2347.50 2322.50 \N 3084 297 2006-01-30 17:00:37.702398-05 IM 1.000000 GL 50149-1 1015.800000 1014.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-01-30 17:00:37.702398-05 S 711.06 710.36 \N 3085 293 2006-01-30 17:02:47.212738-05 SH 100.000000 EA 50149-1 100.000000 0.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-01-30 17:02:47.212738-05 S 246.18 0.00 \N 3086 296 2006-01-31 15:41:01.704-05 RP 100.000000 EA 20020 0.000000 100.000000 0.470000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-01-31 15:41:01.704-05 S 0.00 47.00 \N 3087 298 2006-02-01 08:16:05.143-05 IM 110.000000 EA 10013-1 9370.000000 9260.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-02-01 08:16:05.143-05 S 2342.50 2315.00 \N 3088 296 2006-02-01 08:16:05.143-05 IM 100.000000 EA 10013-1 100.000000 0.000000 0.470000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-02-01 08:16:05.143-05 S 47.00 0.00 \N 3089 295 2006-02-01 08:23:10.344-05 RM 100.000000 EA 10013-1 0.000000 100.000000 0.866000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-02-01 08:23:10.344-05 S 0.00 86.60 \N 3090 293 2006-02-01 08:34:02.132-05 RM 100.000000 EA 50150-1 0.000000 100.000000 2.461800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-02-01 08:34:02.132-05 S 0.00 246.18 \N 3091 295 2006-02-01 08:34:02.132-05 IM 100.000000 EA 50150-1 100.000000 0.000000 0.866000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-02-01 08:34:02.132-05 S 86.60 0.00 \N 3092 299 2006-02-01 08:34:02.132-05 IM 400.000000 EA 50150-1 41362.000000 40962.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-02-01 08:34:02.132-05 S 10340.50 10240.50 \N 3093 294 2006-02-01 08:34:02.132-05 IM 100.000000 EA 50150-1 9290.000000 9190.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-02-01 08:34:02.132-05 S 2322.50 2297.50 \N 3094 297 2006-02-01 08:34:02.132-05 IM 1.000000 GL 50150-1 1014.800000 1013.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-02-01 08:34:02.132-05 S 710.36 709.66 \N 3095 293 2006-02-01 09:26:49.877-05 SH 100.000000 EA 50150-1 100.000000 0.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-02-01 09:26:49.877-05 S 246.18 0.00 \N 3096 296 2006-07-05 09:03:55.488-04 RP 100.000000 EA 20021 0.000000 100.000000 0.470000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-07-05 09:03:55.488-04 S 0.00 47.00 \N 3097 296 2006-07-05 09:16:56.52-04 IM 100.000000 EA 10014-1 100.000000 0.000000 0.470000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 09:16:56.52-04 S 47.00 0.00 \N 3098 298 2006-07-05 09:16:56.52-04 IM 110.000000 EA 10014-1 9260.000000 9150.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 09:16:56.52-04 S 2315.00 2287.50 \N 3099 295 2006-07-05 09:16:56.52-04 RM 100.000000 EA 10014-1 0.000000 100.000000 0.866000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-07-05 09:16:56.52-04 S 0.00 86.60 \N 3100 293 2006-07-05 09:17:35.41-04 RM 100.000000 EA 50151-1 0.000000 100.000000 2.461800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-07-05 09:17:35.41-04 S 0.00 246.18 \N 3101 294 2006-07-05 09:17:35.41-04 IM 100.000000 EA 50151-1 9190.000000 9090.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 09:17:35.41-04 S 2297.50 2272.50 \N 3116 296 2006-08-30 16:44:54.941-04 CC 200.000000 EA \N \N 0.000000 200.000000 0.470000 \N \N MA-Count t \N f \N t jsmith 2006-08-30 16:44:54.941-04 S 0.00 94.00 \N 3103 299 2006-07-05 09:17:35.41-04 IM 400.000000 EA 50151-1 40962.000000 40562.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 09:17:35.41-04 S 10240.50 10140.50 \N 3104 295 2006-07-05 09:17:35.41-04 IM 100.000000 EA 50151-1 100.000000 0.000000 0.866000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 09:17:35.41-04 S 86.60 0.00 \N 3102 297 2006-07-05 09:17:35.41-04 IM 1.000000 GL 50151-1 1013.800000 1012.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-07-05 09:17:35.41-04 S 709.66 708.96 \N 3105 293 2006-07-05 09:18:56.598-04 SH 100.000000 EA 50151-1 100.000000 0.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-07-05 09:18:56.598-04 S 246.18 0.00 \N 3106 296 2006-07-05 11:43:22.113-04 RP 100.000000 EA 20022 0.000000 100.000000 0.470000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-07-05 11:43:22.113-04 S 0.00 47.00 \N 3107 298 2006-07-05 13:34:55.301-04 IM 110.000000 EA 10015-1 9150.000000 9040.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 13:34:55.301-04 S 2287.50 2260.00 \N 3108 296 2006-07-05 13:34:55.301-04 IM 100.000000 EA 10015-1 100.000000 0.000000 0.470000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 13:34:55.301-04 S 47.00 0.00 \N 3109 295 2006-07-05 13:39:44.926-04 RM 100.000000 EA 10015-1 0.000000 100.000000 0.866000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-07-05 13:39:44.926-04 S 0.00 86.60 \N 3110 293 2006-07-05 13:47:13.863-04 RM 100.000000 EA 50152-1 0.000000 100.000000 2.461800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-07-05 13:47:13.863-04 S 0.00 246.18 \N 3111 294 2006-07-05 13:47:13.863-04 IM 100.000000 EA 50152-1 9090.000000 8990.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 13:47:13.863-04 S 2272.50 2247.50 \N 3117 296 2006-10-09 10:37:28.187-04 SI 200.000000 EA WATERDMG-MDA 200.000000 0.000000 0.470000 \N \N Material Scrap\r\nMDA Found Water Damage t \N f t mfgadmin 2006-10-09 10:37:28.187-04 S 94.00 0.00 \N 3113 299 2006-07-05 13:47:13.863-04 IM 400.000000 EA 50152-1 40562.000000 40162.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 13:47:13.863-04 S 10140.50 10040.50 \N 3114 295 2006-07-05 13:47:13.863-04 IM 100.000000 EA 50152-1 100.000000 0.000000 0.866000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-07-05 13:47:13.863-04 S 86.60 0.00 \N 3112 297 2006-07-05 13:47:13.863-04 IM 1.000000 GL 50152-1 1012.800000 1011.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-07-05 13:47:13.863-04 S 708.96 708.26 \N 3115 293 2006-07-05 14:05:26.567-04 SH 100.000000 EA 50152-1 100.000000 0.000000 2.461800 \N \N Issue to Shipping t \N f SO t jsmith 2006-07-05 14:05:26.567-04 S 246.18 0.00 \N 3118 299 2006-10-11 10:15:11.16-04 RP 100.000000 EA 20025 40162.000000 40262.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-10-11 10:15:11.16-04 S 10040.50 10065.50 \N 3119 300 2006-10-13 14:51:22.05-04 AD -110.000000 EA Reset-001 110.000000 0.000000 2.461800 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-10-13 14:51:22.05-04 S 270.80 0.00 \N 3120 296 2006-10-13 15:29:36.972-04 RP 100.000000 EA 20026 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2006-10-13 15:29:36.972-04 S 0.00 25.00 \N 3121 298 2006-10-13 15:33:17.816-04 IM 110.000000 EA 10020-1 9040.000000 8930.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-10-13 15:33:17.816-04 S 2260.00 2232.50 \N 3122 296 2006-10-13 15:33:17.816-04 IM 100.000000 EA 10020-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-10-13 15:33:17.816-04 S 25.00 0.00 \N 3123 295 2006-10-13 15:33:17.816-04 RM 100.000000 EA 10020-1 0.000000 100.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-10-13 15:33:17.816-04 S 0.00 64.60 \N 3124 293 2006-10-13 15:35:24.378-04 RM 100.000000 EA 50155-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2006-10-13 15:35:24.378-04 S 0.00 638.18 \N 3125 299 2006-10-13 15:35:24.378-04 IM 400.000000 EA 50155-1 40262.000000 39862.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-10-13 15:35:24.378-04 S 51736.67 51222.67 \N 3126 295 2006-10-13 15:35:24.378-04 IM 100.000000 EA 50155-1 100.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-10-13 15:35:24.378-04 S 64.60 0.00 \N 3127 294 2006-10-13 15:35:24.378-04 IM 100.000000 EA 50155-1 8990.000000 8890.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2006-10-13 15:35:24.378-04 S 2247.50 2222.50 \N 3128 297 2006-10-13 15:35:24.378-04 IM 1.000000 GL 50155-1 1011.800000 1010.800000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2006-10-13 15:35:24.378-04 S 708.26 707.56 \N 3129 293 2006-10-13 15:45:32.519-04 SH 100.000000 EA 50155-1 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t jsmith 2006-10-13 15:45:32.519-04 S 638.18 0.00 \N 3130 297 2006-10-30 14:43:16.121-05 RL 0.000000 GL \N \N 1010.800000 1010.800000 0.700000 \N \N \N t \N t \N t jsmith 2006-10-30 14:43:16.121-05 S 707.56 707.56 \N 3143 300 2006-12-05 12:06:22.416-05 AD 100.000000 EA MDA-001 0.000000 100.000000 6.381800 \N \N Miscellaneous Adjustment\n t \N t t mfgadmin 2006-12-05 12:06:22.416-05 S 0.00 638.18 \N 3131 297 2006-10-30 14:44:00.715-05 RL 0.000000 GL \N \N 1010.800000 1010.800000 0.700000 \N \N \N t \N t \N t jsmith 2006-10-30 14:44:00.715-05 S 707.56 707.56 \N 3132 297 2006-10-30 14:44:22.808-05 RL 0.000000 GL \N \N 1010.800000 1010.800000 0.700000 \N \N \N t \N t \N t jsmith 2006-10-30 14:44:22.808-05 S 707.56 707.56 \N 3144 300 2006-12-05 12:16:44.541-05 SH 10.000000 EA 50157-1 100.000000 90.000000 6.381800 \N \N Issue to Shipping t \N t SO t mfgadmin 2006-12-05 12:16:44.541-05 S 638.18 574.36 \N 3133 297 2006-10-30 14:44:48.887-05 RL 0.000000 GL \N \N 1010.800000 1010.800000 0.700000 \N \N \N t \N t \N t jsmith 2006-10-30 14:44:48.887-05 S 707.56 707.56 \N 3134 297 2006-10-30 14:45:42.058-05 RL 0.000000 GL \N \N 1010.800000 1010.800000 0.700000 \N \N \N t \N t \N t jsmith 2006-10-30 14:45:42.058-05 S 707.56 707.56 \N 3145 300 2006-12-05 12:23:34.228-05 SH 90.000000 EA 50157-1 90.000000 0.000000 6.381800 \N \N Issue to Shipping t \N t SO t mfgadmin 2006-12-05 12:23:34.228-05 S 574.36 0.00 \N 3135 297 2006-10-30 14:46:26.996-05 RL 0.000000 GL \N \N 1010.800000 1010.800000 0.700000 \N \N \N t \N t \N t jsmith 2006-10-30 14:46:26.996-05 S 707.56 707.56 \N 3136 297 2006-10-30 14:47:06.183-05 RL 0.000000 GL \N \N 1010.800000 1010.800000 0.700000 \N \N \N t \N t \N t jsmith 2006-10-30 14:47:06.183-05 S 707.56 707.56 \N 3137 297 2006-10-30 14:48:21.558-05 AD 2973.550000 GL STS-100 1010.800000 3984.350000 0.700000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-10-30 14:48:21.558-05 S 707.56 2789.05 \N 3138 297 2006-10-30 14:49:43.933-05 AD 2973.550000 GL STS-200 3984.350000 6957.900000 0.700000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-10-30 14:49:43.933-05 S 2789.05 4870.53 \N 3139 297 2006-10-30 14:51:05.543-05 AD -3654.750000 GL STS-400 6957.900000 3303.150000 0.700000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-10-30 14:51:05.543-05 S 4870.53 2312.21 \N 3140 297 2006-10-30 14:51:37.887-05 AD -300.000000 GL STS-500 3303.150000 3003.150000 0.700000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-10-30 14:51:37.887-05 S 2312.21 2102.21 \N 3141 297 2006-10-30 14:52:19.73-05 AD -991.200000 GL STS-900 3003.150000 2011.950000 0.700000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-10-30 14:52:19.73-05 S 2102.21 1408.37 \N 3142 297 2006-10-30 14:52:53.996-05 AD -991.200000 GL STS-9001 2011.950000 1020.750000 0.700000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2006-10-30 14:52:53.996-05 S 1408.37 714.53 \N 3146 296 2006-12-28 11:19:38.812-05 RP 100.000000 EA 20028 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2006-12-28 11:19:38.812-05 S 0.00 25.00 \N 3147 299 2006-12-28 11:19:50.687-05 RP 400.000000 EA 20029 39862.000000 40262.000000 1.285000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2006-12-28 11:19:50.687-05 S 51222.67 51736.67 \N 3148 297 2006-12-28 11:41:11.5-05 IM 1.000000 GL 50158-1 1020.750000 1019.750000 0.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2006-12-28 11:41:11.5-05 S 714.53 713.83 \N 3149 294 2006-12-28 11:41:29.484-05 IM 100.000000 EA 50158-1 8890.000000 8790.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2006-12-28 11:41:29.484-05 S 2222.50 2197.50 \N 3150 299 2006-12-28 11:41:33.781-05 IM 400.000000 EA 50158-1 40262.000000 39862.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2006-12-28 11:41:33.781-05 S 51736.67 51222.67 \N 3151 295 2006-12-28 11:41:44.859-05 IM 100.000000 EA 50158-1 0.000000 -100.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2006-12-28 11:41:44.859-05 S 0.00 -64.60 \N 3152 295 2006-12-28 11:43:32.171-05 RM 100.000000 EA 10022-1 -100.000000 0.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2006-12-28 11:43:32.171-05 S -64.60 0.00 \N 3153 298 2006-12-28 11:43:32.171-05 IM 110.000000 EA 10022-1 8930.000000 8820.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2006-12-28 11:43:32.171-05 S 2232.50 2205.00 \N 3154 296 2006-12-28 11:43:32.171-05 IM 100.000000 EA 10022-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2006-12-28 11:43:32.171-05 S 25.00 0.00 \N 3155 293 2006-12-28 11:44:03.578-05 RM 100.000000 EA 50158-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2006-12-28 11:44:03.578-05 S 0.00 638.18 \N 3156 293 2006-12-28 11:45:16.421-05 SH 100.000000 EA 50158-1 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2006-12-28 11:45:16.421-05 S 638.18 0.00 \N 3157 294 2006-12-28 14:02:55.343-05 CC 100.000000 EA \N \N 8790.000000 8890.000000 0.250000 \N \N MDA-Count1 t \N f \N t mfgadmin 2006-12-28 14:02:55.343-05 S 2197.50 2222.50 \N 3158 298 2006-12-28 14:03:15.531-05 CC 110.000000 EA \N \N 8820.000000 8930.000000 0.250000 \N \N MDA-Count2 t \N f \N t mfgadmin 2006-12-28 14:03:15.531-05 S 2205.00 2232.50 \N 3159 297 2006-12-28 14:04:40.921-05 AD 1.000000 GL MDA-ADJ-1 1019.750000 1020.750000 0.700000 \N \N Miscellaneous Adjustment\nADJ t \N t t mfgadmin 2006-12-28 14:04:40.921-05 S 713.83 714.53 \N 3160 300 2007-01-08 16:25:11.824-05 AD 100.000000 EA MDA-2007-8 0.000000 100.000000 6.381800 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2007-01-08 16:25:11.824-05 S 0.00 638.18 \N 3161 300 2007-01-08 16:27:48.746-05 SH 50.000000 EA 50159-1 100.000000 50.000000 6.381800 \N \N Issue to Shipping t \N t SO t jsmith 2007-01-08 16:27:48.746-05 S 638.18 319.09 \N 3162 300 2007-01-08 16:34:13.105-05 SH 50.000000 EA 50159-1 50.000000 0.000000 6.381800 \N \N Issue to Shipping t \N t SO t jsmith 2007-01-08 16:34:13.105-05 S 319.09 0.00 \N 3163 293 2007-01-09 16:07:28.433-05 RM 100.000000 EA Misc. MISC-100-6.38 0.000000 100.000000 6.381800 \N \N Receive from Misc. Production for Item Number YTRUCK1\n t \N f WO t mfgadmin 2007-01-09 16:07:28.433-05 S 0.00 638.18 \N 3164 294 2007-01-09 16:07:28.433-05 IM 100.000000 EA Misc. MISC-100-6.38 8890.000000 8790.000000 0.250000 \N \N Consumed during Misc. Production of Item Number YTRUCK1\n t \N f WO t mfgadmin 2007-01-09 16:07:28.433-05 S 2222.50 2197.50 \N 3168 296 2007-02-20 08:27:33.079-05 RP 200.000000 EA 20030 0.000000 200.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-02-20 08:27:33.079-05 S 0.00 50.00 \N 3166 299 2007-01-09 16:07:28.433-05 IM 400.000000 EA Misc. MISC-100-6.38 39862.000000 39462.000000 1.285000 \N \N Consumed during Misc. Production of Item Number YTRUCK1\n t \N f WO t mfgadmin 2007-01-09 16:07:28.433-05 S 51222.67 50708.67 \N 3167 295 2007-01-09 16:07:28.433-05 IM 100.000000 EA Misc. MISC-100-6.38 0.000000 -100.000000 0.646000 \N \N Consumed during Misc. Production of Item Number YTRUCK1\n t \N f WO t mfgadmin 2007-01-09 16:07:28.433-05 S 0.00 -64.60 \N 3165 297 2007-01-09 16:07:28.433-05 IM 1.000000 GL Misc. MISC-100-6.38 1020.750000 1019.750000 0.700000 \N \N Consumed during Misc. Production of Item Number YTRUCK1\n t \N t WO t mfgadmin 2007-01-09 16:07:28.433-05 S 714.53 713.83 \N 3169 295 2007-02-20 08:34:35.173-05 RM 100.000000 EA 10023-1 -100.000000 0.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-02-20 08:34:35.173-05 S -64.60 0.00 \N 3170 298 2007-02-20 08:34:35.173-05 IM 110.000000 EA 10023-1 8930.000000 8820.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-02-20 08:34:35.173-05 S 2232.50 2205.00 \N 3171 296 2007-02-20 08:34:35.173-05 IM 100.000000 EA 10023-1 200.000000 100.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-02-20 08:34:35.173-05 S 50.00 25.00 \N 3172 295 2007-02-20 08:34:45.673-05 RM 100.000000 EA 10024-1 0.000000 100.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-02-20 08:34:45.673-05 S 0.00 64.60 \N 3173 298 2007-02-20 08:34:45.673-05 IM 110.000000 EA 10024-1 8820.000000 8710.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-02-20 08:34:45.673-05 S 2205.00 2177.50 \N 3174 296 2007-02-20 08:34:45.673-05 IM 100.000000 EA 10024-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-02-20 08:34:45.673-05 S 25.00 0.00 \N 3175 293 2007-02-20 08:34:53.094-05 RM 100.000000 EA 50160-1 100.000000 200.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-02-20 08:34:53.094-05 S 638.18 1276.36 \N 3176 294 2007-02-20 08:34:53.094-05 IM 100.000000 EA 50160-1 8790.000000 8690.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-02-20 08:34:53.094-05 S 2197.50 2172.50 \N 3182 298 2007-02-23 13:47:59.031-05 RP 1.000000 EA 20031 8710.000000 8711.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-02-23 13:47:59.031-05 S 2177.50 2177.75 \N 3178 299 2007-02-20 08:34:53.094-05 IM 400.000000 EA 50160-1 39462.000000 39062.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-02-20 08:34:53.094-05 S 50708.67 50194.67 \N 3179 295 2007-02-20 08:34:53.094-05 IM 100.000000 EA 50160-1 100.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-02-20 08:34:53.094-05 S 64.60 0.00 \N 3177 297 2007-02-20 08:34:53.094-05 IM 1.000000 GL 50160-1 1019.750000 1018.750000 0.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-02-20 08:34:53.094-05 S 713.83 713.13 \N 3180 293 2007-02-20 08:35:30.485-05 SH 100.000000 EA 50160-1 200.000000 100.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-02-20 08:35:30.485-05 S 1276.36 638.18 \N 3181 293 2007-02-20 08:42:10.673-05 SH 100.000000 EA 50161-1 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-02-20 08:42:10.673-05 S 638.18 0.00 \N 3183 298 2007-02-23 13:49:02.343-05 RP 4.000000 EA 20031 8711.000000 8715.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-02-23 13:49:02.343-05 S 2177.75 2178.75 \N 3184 295 2007-04-05 15:29:46.062-04 AD 1000.000000 EA MDA-001-TKIT1 0.000000 1000.000000 0.646000 \N \N Miscellaneous Adjustment\n t \N f t jsmith 2007-04-05 15:29:46.062-04 S 0.00 646.00 \N 3185 294 2007-04-05 15:31:35.406-04 IM 1000.000000 EA 10025-1 8690.000000 7690.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2007-04-05 15:31:35.406-04 S 2172.50 1922.50 \N 3186 297 2007-04-05 15:31:35.406-04 IM 10.000000 GL 10025-1 1018.750000 1008.750000 0.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2007-04-05 15:31:35.406-04 S 713.13 706.13 \N 3187 299 2007-04-05 15:32:13.687-04 IM 4000.000000 EA 10025-1 39062.000000 35062.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t jsmith 2007-04-05 15:32:13.687-04 S 50194.67 45054.67 \N 3188 295 2007-04-05 15:32:38.953-04 IM 1000.000000 EA 10025-1 1000.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t jsmith 2007-04-05 15:32:38.953-04 S 646.00 0.00 \N 3189 293 2007-04-05 15:32:38.953-04 RM 1000.000000 EA 10025-1 0.000000 1000.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2007-04-05 15:32:38.953-04 S 0.00 6381.80 \N 3190 293 2007-04-05 15:39:03.921-04 SH 1000.000000 EA 50162-1 1000.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t jsmith 2007-04-05 15:39:03.921-04 S 6381.80 0.00 \N 3192 306 2007-05-30 08:42:03.75-04 RP 1000.000000 EA 20032 0.000000 1000.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 08:42:03.75-04 S 0.00 1000.00 \N 3193 306 2007-05-30 08:42:03.75-04 RP 1600.000000 EA 20032 1000.000000 2600.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 08:42:03.75-04 S 1000.00 2600.00 \N 3194 314 2007-05-30 08:42:03.75-04 RP 100.000000 SH 20032 0.000000 100.000000 5.000000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 08:42:03.75-04 S 0.00 500.00 \N 3195 306 2007-05-30 08:42:03.75-04 RP 200.000000 EA 20032 2600.000000 2800.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 08:42:03.75-04 S 2600.00 2800.00 \N 3196 306 2007-05-30 08:42:03.75-04 RP 200.000000 EA 20032 2800.000000 3000.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 08:42:03.75-04 S 2800.00 3000.00 \N 3197 306 2007-05-30 08:42:03.75-04 RP 200.000000 EA 20032 3000.000000 3200.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 08:42:03.75-04 S 3000.00 3200.00 \N 3191 318 2007-05-30 08:42:03.75-04 RP 50.000000 GL 20032 0.000000 50.000000 2.200000 \N \N Receive Inventory from P/O t \N t PO t mfgadmin 2007-05-30 08:42:03.75-04 S 0.00 110.00 \N 3198 296 2007-05-30 08:45:51.75-04 RP 100.000000 EA 20033 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 08:45:51.75-04 S 0.00 25.00 \N 3199 305 2007-05-30 08:57:50.718-04 RM 200.000000 EA 10029-2 0.000000 200.000000 1.330000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 08:57:50.718-04 S 0.00 266.00 \N 3200 306 2007-05-30 08:57:50.718-04 IM 200.000000 EA 10029-2 3200.000000 3000.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 08:57:50.718-04 S 3200.00 3000.00 \N 3201 306 2007-05-30 08:58:12.296-04 IM 200.000000 EA 10030-2 3000.000000 2800.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 08:58:12.296-04 S 3000.00 2800.00 \N 3202 305 2007-05-30 08:58:33.234-04 RM 200.000000 EA 10030-2 200.000000 400.000000 1.330000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 08:58:33.234-04 S 266.00 532.00 \N 3203 305 2007-05-30 08:58:56.531-04 RM 200.000000 EA 10031-2 400.000000 600.000000 1.330000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 08:58:56.531-04 S 532.00 798.00 \N 3204 306 2007-05-30 08:58:56.531-04 IM 200.000000 EA 10031-2 2800.000000 2600.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 08:58:56.531-04 S 2800.00 2600.00 \N 3205 296 2007-05-30 09:02:02.578-04 CC 700.000000 EA \N \N 100.000000 800.000000 0.250000 \N \N Special count t \N f \N t mfgadmin 2007-05-30 09:02:02.578-04 S 25.00 200.00 \N 3206 310 2007-05-30 09:02:46.062-04 CC 500.000000 EA \N \N 0.000000 500.000000 0.250000 \N \N Special Count t \N f \N t mfgadmin 2007-05-30 09:02:46.062-04 S 0.00 125.00 \N 3208 295 2007-05-30 09:03:32.578-04 RM 800.000000 EA 10026-1 0.000000 800.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 09:03:32.578-04 S 0.00 516.80 \N 3209 298 2007-05-30 09:03:32.578-04 IM 880.000000 EA 10026-1 8715.000000 7835.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:03:32.578-04 S 2178.75 1958.75 \N 3210 296 2007-05-30 09:03:32.578-04 IM 800.000000 EA 10026-1 800.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:03:32.578-04 S 200.00 0.00 \N 3211 311 2007-05-30 09:04:07.625-04 RM 500.000000 EA 10027-1 0.000000 500.000000 0.000000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 09:04:07.625-04 S 0.00 0.00 \N 3212 314 2007-05-30 09:04:07.625-04 IM 500.000000 SH 10027-1 500.000000 0.000000 5.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:04:07.625-04 S 2500.00 0.00 \N 3213 312 2007-05-30 09:04:26.328-04 RB 2000.000000 EA 10027-1 0.000000 2000.000000 0.000000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 09:04:26.328-04 S 0.00 0.00 \N 3214 313 2007-05-30 09:04:26.328-04 RB 1000.000000 EA 10027-1 0.000000 1000.000000 0.000000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 09:04:26.328-04 S 0.00 0.00 \N 3215 316 2007-05-30 09:04:26.328-04 RB 750.000000 LB 10027-1 0.000000 750.000000 1.250000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 09:04:26.328-04 S 0.00 937.50 \N 3216 311 2007-05-30 09:04:26.328-04 IB 500.000000 EA 10027-1 500.000000 0.000000 0.000000 \N \N Issue Breeder Inventory by Breeder Distribution t \N f WO t mfgadmin 2007-05-30 09:04:26.328-04 S 0.00 0.00 \N 3218 294 2007-05-30 09:04:52.671-04 IM 100.000000 EA 10029-1 7690.000000 7590.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:04:52.671-04 S 1922.50 1897.50 \N 3219 299 2007-05-30 09:04:52.671-04 IM 400.000000 EA 10029-1 35062.000000 34662.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:04:52.671-04 S 45054.67 44540.67 \N 3220 295 2007-05-30 09:04:52.671-04 IM 100.000000 EA 10029-1 800.000000 700.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:04:52.671-04 S 516.80 452.20 \N 3222 305 2007-05-30 09:04:52.671-04 IM 200.000000 EA 10029-1 600.000000 400.000000 1.330000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:04:52.671-04 S 798.00 532.00 \N 3217 300 2007-05-30 09:04:52.671-04 RM 100.000000 EA 10029-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N t WO t mfgadmin 2007-05-30 09:04:52.671-04 S 0.00 638.18 \N 3221 297 2007-05-30 09:04:52.671-04 IM 1.000000 GL 10029-1 1008.750000 1007.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-05-30 09:04:52.671-04 S 1714.88 1713.18 \N 3223 303 2007-05-30 09:05:12.656-04 RM 100.000000 EA 10030-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 09:05:12.656-04 S 0.00 638.18 \N 3224 294 2007-05-30 09:05:12.656-04 IM 100.000000 EA 10030-1 7590.000000 7490.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:12.656-04 S 1897.50 1872.50 \N 3225 299 2007-05-30 09:05:12.656-04 IM 400.000000 EA 10030-1 34662.000000 34262.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:12.656-04 S 44540.67 44026.67 \N 3226 295 2007-05-30 09:05:12.656-04 IM 100.000000 EA 10030-1 700.000000 600.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:12.656-04 S 452.20 387.60 \N 3228 305 2007-05-30 09:05:12.656-04 IM 200.000000 EA 10030-1 400.000000 200.000000 1.330000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:12.656-04 S 532.00 266.00 \N 3227 297 2007-05-30 09:05:12.656-04 IM 1.000000 GL 10030-1 1007.750000 1006.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-05-30 09:05:12.656-04 S 1713.18 1711.48 \N 3229 302 2007-05-30 09:05:32.796-04 RM 100.000000 EA 10031-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 09:05:32.796-04 S 0.00 638.18 \N 3230 294 2007-05-30 09:05:32.796-04 IM 100.000000 EA 10031-1 7490.000000 7390.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:32.796-04 S 1872.50 1847.50 \N 3231 299 2007-05-30 09:05:32.796-04 IM 400.000000 EA 10031-1 34262.000000 33862.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:32.796-04 S 44026.67 43512.67 \N 3232 295 2007-05-30 09:05:32.796-04 IM 100.000000 EA 10031-1 600.000000 500.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:32.796-04 S 387.60 323.00 \N 3234 305 2007-05-30 09:05:32.796-04 IM 200.000000 EA 10031-1 200.000000 0.000000 1.330000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:32.796-04 S 266.00 0.00 \N 3233 297 2007-05-30 09:05:32.796-04 IM 1.000000 GL 10031-1 1006.750000 1005.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-05-30 09:05:32.796-04 S 1711.48 1709.78 \N 3235 308 2007-05-30 09:05:59.843-04 RM 500.000000 EA 10028-1 0.000000 500.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 09:05:59.843-04 S 0.00 3190.90 \N 3236 299 2007-05-30 09:05:59.843-04 IM 2000.000000 EA 10028-1 33862.000000 31862.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:59.843-04 S 43512.67 40942.67 \N 3237 295 2007-05-30 09:05:59.843-04 IM 500.000000 EA 10028-1 500.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:59.843-04 S 323.00 0.00 \N 3238 312 2007-05-30 09:05:59.843-04 IM 2000.000000 EA 10028-1 2000.000000 0.000000 0.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:59.843-04 S 0.00 0.00 \N 3239 310 2007-05-30 09:05:59.843-04 IM 500.000000 EA 10028-1 500.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 09:05:59.843-04 S 125.00 0.00 \N 3240 297 2007-05-30 09:05:59.843-04 IM 5.000000 GL 10028-1 1005.750000 1000.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-05-30 09:05:59.843-04 S 1709.78 1701.28 \N 3241 308 2007-05-30 09:22:59.437-04 TW -400.000000 EA \N MA2.1-01 500.000000 100.000000 6.381800 \N 36 Move to offsite storage. t \N f \N t mfgadmin 2007-05-30 09:22:59.437-04 S 3190.90 638.18 \N 3242 309 2007-05-30 09:22:59.437-04 TW 400.000000 EA \N MA2.1-01 0.000000 400.000000 6.381800 \N 35 Move to offsite storage. t \N f \N t mfgadmin 2007-05-30 09:22:59.437-04 S 0.00 2552.72 \N 3243 308 2007-05-30 09:24:46.765-04 SH 100.000000 EA 50163-1 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-05-30 09:24:46.765-04 S 638.18 0.00 \N 3244 303 2007-05-30 09:24:46.765-04 SH 100.000000 EA 50163-2 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-05-30 09:24:46.765-04 S 638.18 0.00 \N 3246 302 2007-05-30 09:24:46.765-04 SH 100.000000 EA 50163-4 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-05-30 09:24:46.765-04 S 638.18 0.00 \N 3245 300 2007-05-30 09:24:46.765-04 SH 100.000000 EA 50163-3 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N t SO t mfgadmin 2007-05-30 09:24:46.765-04 S 638.18 0.00 \N 3247 314 2007-05-30 09:45:22.921-04 CC 100.000000 SH \N \N 0.000000 100.000000 5.000000 \N \N Special count t \N f \N t mfgadmin 2007-05-30 09:45:22.921-04 S 0.00 500.00 \N 3248 311 2007-05-30 10:47:10.125-04 RM 10.000000 EA 10033-1 0.000000 10.000000 0.000000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 10:47:10.125-04 S 0.00 0.00 \N 3249 314 2007-05-30 10:47:10.125-04 IM 10.000000 SH 10033-1 100.000000 90.000000 5.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 10:47:10.125-04 S 500.00 450.00 \N 3250 313 2007-05-30 10:47:42.312-04 RB 20.000000 EA 10033-1 1000.000000 1020.000000 0.000000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 10:47:42.312-04 S 0.00 0.00 \N 3251 316 2007-05-30 10:47:42.312-04 RB 15.000000 LB 10033-1 750.000000 765.000000 1.250000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 10:47:42.312-04 S 937.50 956.25 \N 3252 312 2007-05-30 10:47:42.312-04 RB 40.000000 EA 10033-1 0.000000 40.000000 0.000000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 10:47:42.312-04 S 0.00 0.00 \N 3253 311 2007-05-30 10:47:42.312-04 IB 10.000000 EA 10033-1 10.000000 0.000000 0.000000 \N \N Issue Breeder Inventory by Breeder Distribution t \N f WO t mfgadmin 2007-05-30 10:47:42.312-04 S 0.00 0.00 \N 3254 309 2007-05-30 10:25:32.097925-04 TW -100.000000 EA \N MA-MOVE1 400.000000 300.000000 6.381800 \N 35 For special order t \N f \N t mfgadmin 2007-05-30 10:25:32.097925-04 S 2552.72 1914.54 \N 3255 308 2007-05-30 10:25:32.097925-04 TW 100.000000 EA \N MA-MOVE1 0.000000 100.000000 6.381800 \N 36 For special order t \N f \N t mfgadmin 2007-05-30 10:25:32.097925-04 S 0.00 638.18 \N 3256 296 2007-05-30 00:00:00-04 RP 100.000000 EA 20034 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 00:00:00-04 S 0.00 25.00 \N 3257 307 2007-05-30 00:00:00-04 RP 10.000000 EA 20035 0.000000 10.000000 1.000000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-05-30 00:00:00-04 S 0.00 10.00 \N 3258 305 2007-05-30 11:31:29.479549-04 RM 10.000000 EA 10036-1 0.000000 10.000000 1.330000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 11:31:29.479549-04 S 0.00 13.30 \N 3259 306 2007-05-30 11:31:29.479549-04 IM 10.000000 EA 10036-1 2600.000000 2590.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 11:31:29.479549-04 S 2600.00 2590.00 \N 3260 307 2007-05-30 11:31:29.479549-04 IM 10.000000 EA 10036-1 10.000000 0.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 11:31:29.479549-04 S 10.00 0.00 \N 3261 311 2007-05-30 11:32:36.219628-04 RM 10.000000 EA 10037-1 0.000000 10.000000 0.000000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 11:32:36.219628-04 S 0.00 0.00 \N 3262 314 2007-05-30 11:32:36.219628-04 IM 10.000000 SH 10037-1 90.000000 80.000000 5.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 11:32:36.219628-04 S 450.00 400.00 \N 3263 313 2007-05-30 11:32:54.874951-04 RB 22.000000 EA 10037-1 1020.000000 1042.000000 0.000000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 11:32:54.874951-04 S 0.00 0.00 \N 3264 312 2007-05-30 11:32:54.874951-04 RB 38.000000 EA 10037-1 40.000000 78.000000 0.000000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 11:32:54.874951-04 S 0.00 0.00 \N 3265 316 2007-05-30 11:32:54.874951-04 RB 12.000000 LB 10037-1 765.000000 777.000000 1.250000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t mfgadmin 2007-05-30 11:32:54.874951-04 S 956.25 971.25 \N 3266 311 2007-05-30 11:32:54.874951-04 IB 10.000000 EA 10037-1 10.000000 0.000000 0.000000 \N \N Issue Breeder Inventory by Breeder Distribution t \N f WO t mfgadmin 2007-05-30 11:32:54.874951-04 S 0.00 0.00 \N 3267 298 2007-05-30 11:33:24.73485-04 IM 110.000000 EA 10034-1 7835.000000 7725.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 11:33:24.73485-04 S 1958.75 1931.25 \N 3268 296 2007-05-30 11:33:24.73485-04 IM 100.000000 EA 10034-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 11:33:24.73485-04 S 25.00 0.00 \N 3269 295 2007-05-30 11:33:24.73485-04 RM 100.000000 EA 10034-1 0.000000 100.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 11:33:24.73485-04 S 0.00 64.60 \N 3270 293 2007-05-30 11:33:47.228336-04 RM 100.000000 EA 50164-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-05-30 11:33:47.228336-04 S 0.00 638.18 \N 3271 294 2007-05-30 11:33:47.228336-04 IM 100.000000 EA 50164-1 7390.000000 7290.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 11:33:47.228336-04 S 1847.50 1822.50 \N 3272 299 2007-05-30 11:33:47.228336-04 IM 400.000000 EA 50164-1 31862.000000 31462.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 11:33:47.228336-04 S 40942.67 40428.67 \N 3273 295 2007-05-30 11:33:47.228336-04 IM 100.000000 EA 50164-1 100.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-05-30 11:33:47.228336-04 S 64.60 0.00 \N 3274 297 2007-05-30 11:33:47.228336-04 IM 1.000000 GL 50164-1 1000.750000 999.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-05-30 11:33:47.228336-04 S 1701.28 1699.58 \N 3275 293 2007-05-30 11:39:06.664661-04 SH 100.000000 EA 50164-1 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-05-30 11:39:06.664661-04 S 638.18 0.00 \N 3276 308 2007-05-30 11:39:06.664661-04 SH 100.000000 EA 50164-2 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-05-30 11:39:06.664661-04 S 638.18 0.00 \N 3277 296 2007-08-31 00:00:00-04 RP 100.000000 EA 20036 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-08-31 00:00:00-04 S 0.00 25.00 \N 3278 299 2007-08-31 10:45:56.484-04 SH 100.000000 EA 99000 31462.000000 31362.000000 1.285000 \N \N Issue to Shipping t \N f TO t mfgadmin 2007-08-31 10:45:56.484-04 S 40428.67 40300.17 \N 3283 298 2007-08-31 10:59:55.343-04 IM 110.000000 EA 10039-1 7725.000000 7615.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-08-31 10:59:55.343-04 S 1931.25 1903.75 \N 3284 296 2007-08-31 10:59:55.343-04 IM 100.000000 EA 10039-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-08-31 10:59:55.343-04 S 25.00 0.00 \N 3285 295 2007-08-31 11:00:21.625-04 RM 100.000000 EA 10039-1 0.000000 100.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-08-31 11:00:21.625-04 S 0.00 64.60 \N 3286 293 2007-08-31 11:03:44.609-04 RM 100.000000 EA 40006-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-08-31 11:03:44.609-04 S 0.00 638.18 \N 3287 294 2007-08-31 11:03:44.609-04 IM 100.000000 EA 40006-1 7290.000000 7190.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-08-31 11:03:44.609-04 S 1822.50 1797.50 \N 3288 299 2007-08-31 11:03:44.609-04 IM 400.000000 EA 40006-1 31362.000000 30962.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-08-31 11:03:44.609-04 S 40300.17 39786.17 \N 3289 295 2007-08-31 11:03:44.609-04 IM 100.000000 EA 40006-1 100.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-08-31 11:03:44.609-04 S 64.60 0.00 \N 3292 299 2007-09-21 14:11:05.484-04 SH 400.000000 EA 99001 30962.000000 30562.000000 1.285000 \N \N Issue to Shipping t \N f TO t mfgadmin 2007-09-21 14:11:05.484-04 S 39786.17 39272.17 \N 3290 297 2007-08-31 11:03:44.609-04 IM 1.000000 GL 40006-1 999.750000 998.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-08-31 11:03:44.609-04 S 1699.58 1697.88 \N 3291 293 2007-08-31 11:05:32.687-04 SH 100.000000 EA 40006-1 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-08-31 11:05:32.687-04 S 638.18 0.00 \N 3333 302 2007-12-14 13:20:14.593-05 RR 1.000000 EA 80002 80002 0.000000 1.000000 6.381800 \N \N Receive Inventory from R/A t \N f RA t mfgadmin 2007-12-14 13:20:14.593-05 S 0.00 6.38 \N 3297 296 2007-09-21 14:35:15.312-04 RP 100.000000 EA 20037 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-09-21 14:35:15.312-04 S 0.00 25.00 \N 3298 298 2007-09-21 14:51:13.093-04 IM 110.000000 EA 10042-1 7615.000000 7505.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-09-21 14:51:13.093-04 S 1903.75 1876.25 \N 3299 296 2007-09-21 14:51:13.093-04 IM 100.000000 EA 10042-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-09-21 14:51:13.093-04 S 25.00 0.00 \N 3300 295 2007-09-21 14:51:13.093-04 RM 100.000000 EA 10042-1 0.000000 100.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-09-21 14:51:13.093-04 S 0.00 64.60 \N 3301 294 2007-09-21 14:51:32.156-04 IM 100.000000 EA 50165-1 7190.000000 7090.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-09-21 14:51:32.156-04 S 1797.50 1772.50 \N 3307 299 2007-12-14 12:39:54.078-05 SH 100.000000 EA 99002 30162.000000 30062.000000 1.285000 \N \N Issue to Shipping t \N f TO t mfgadmin 2007-12-14 12:39:54.078-05 S 38758.17 38629.67 \N 3302 297 2007-09-21 14:51:32.156-04 IM 1.000000 GL 50165-1 998.750000 997.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-09-21 14:51:32.156-04 S 1697.88 1696.18 \N 3352 296 2008-03-04 14:12:42.842887-05 IM 100.000000 EA 10046-1 0.000000 -100.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 14:12:42.842887-05 S 0.00 -25.00 \N 3303 299 2007-09-21 14:51:50.062-04 IM 400.000000 EA 50165-1 30562.000000 30162.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-09-21 14:51:50.062-04 S 39272.17 38758.17 \N 3304 295 2007-09-21 14:52:01.89-04 IM 100.000000 EA 50165-1 100.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-09-21 14:52:01.89-04 S 64.60 0.00 \N 3305 293 2007-09-21 14:52:01.89-04 RM 100.000000 EA 50165-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-09-21 14:52:01.89-04 S 0.00 638.18 \N 3306 293 2007-09-21 14:52:31.734-04 SH 100.000000 EA 50165-1 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-09-21 14:52:31.734-04 S 638.18 0.00 \N 3312 296 2007-12-14 12:42:12.14-05 RP 5500.000000 EA 20038 0.000000 5500.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-12-14 12:42:12.14-05 S 0.00 1375.00 \N 3313 298 2007-12-14 12:42:01.875-05 RP 5000.000000 EA 20039 7505.000000 12505.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2007-12-14 12:42:01.875-05 S 1876.25 3126.25 \N 3314 296 2007-12-14 12:54:24.125-05 IM 5500.000000 EA 10043-1 5500.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 12:54:24.125-05 S 1375.00 0.00 \N 3315 298 2007-12-14 12:54:24.125-05 IM 6050.000000 EA 10043-1 12505.000000 6455.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 12:54:24.125-05 S 3126.25 1613.75 \N 3316 295 2007-12-14 12:54:24.125-05 RM 5500.000000 EA 10043-1 0.000000 5500.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-12-14 12:54:24.125-05 S 0.00 3553.00 \N 3317 294 2007-12-14 12:58:51.468-05 IM 0.000000 EA 40007-1 7090.000000 7090.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 12:58:51.468-05 S 1772.50 1772.50 \N 3318 297 2007-12-14 12:58:51.468-05 IM 0.000000 GL 40007-1 997.750000 997.750000 1.700000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 12:58:51.468-05 S 1696.18 1696.18 \N 3319 294 2007-12-14 12:59:10.765-05 IM 5000.000000 EA 40007-1 7090.000000 2090.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 12:59:10.765-05 S 1772.50 522.50 \N 3334 302 2007-12-14 13:22:14.218-05 SH 1.000000 EA 50167-2 1.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-12-14 13:22:14.218-05 S 6.38 0.00 \N 3320 297 2007-12-14 12:59:10.765-05 IM 50.000000 GL 40007-1 997.750000 947.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-12-14 12:59:10.765-05 S 1696.18 1611.18 \N 3321 299 2007-12-14 12:59:41.218-05 IM 20000.000000 EA 40007-1 30062.000000 10062.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 12:59:41.218-05 S 38629.67 12929.67 \N 3322 295 2007-12-14 12:59:57.046-05 IM 5000.000000 EA 40007-1 5500.000000 500.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 12:59:57.046-05 S 3553.00 323.00 \N 3323 293 2007-12-14 12:59:57.046-05 RM 5000.000000 EA 40007-1 0.000000 5000.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-12-14 12:59:57.046-05 S 0.00 31909.00 \N 3324 299 2007-12-14 13:00:40.359-05 IM 50.000000 EA 40007-1 10062.000000 10012.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 13:00:40.359-05 S 12929.67 12865.42 \N 3325 302 2007-12-14 13:01:02.421-05 RM 500.000000 EA 40007-2 0.000000 500.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t mfgadmin 2007-12-14 13:01:02.421-05 S 0.00 3190.90 \N 3326 294 2007-12-14 13:01:02.421-05 IM 500.000000 EA 40007-2 2090.000000 1590.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 13:01:02.421-05 S 522.50 397.50 \N 3327 299 2007-12-14 13:01:02.421-05 IM 2000.000000 EA 40007-2 10012.000000 8012.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 13:01:02.421-05 S 12865.42 10295.42 \N 3328 295 2007-12-14 13:01:02.421-05 IM 500.000000 EA 40007-2 500.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-14 13:01:02.421-05 S 323.00 0.00 \N 3335 293 2007-12-14 13:22:14.218-05 SH 10.000000 EA 50167-1 10.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-12-14 13:22:14.218-05 S 63.82 0.00 \N 3329 297 2007-12-14 13:01:02.421-05 IM 5.000000 GL 40007-2 947.750000 942.750000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2007-12-14 13:01:02.421-05 S 1611.18 1602.68 \N 3330 302 2007-12-14 13:04:17.796-05 SH 500.000000 EA 40007-2 500.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-12-14 13:04:17.796-05 S 3190.90 0.00 \N 3331 293 2007-12-14 13:04:17.796-05 SH 5000.000000 EA 40007-1 5000.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-12-14 13:04:17.796-05 S 31909.00 0.00 \N 3332 293 2007-12-14 13:20:14.593-05 RR 10.000000 EA 80002 80002 0.000000 10.000000 6.381800 \N \N Receive Inventory from R/A t \N f RA t mfgadmin 2007-12-14 13:20:14.593-05 S 0.00 63.82 \N 3336 308 2007-12-14 13:28:55.109-05 AD 10.000000 EA Special1 0.000000 10.000000 6.381800 \N \N Miscellaneous Adjustment\n t \N f t mfgadmin 2007-12-14 13:28:55.109-05 S 0.00 63.82 \N 3338 312 2007-12-20 11:42:54.937-05 IM 40.000000 EA 40008-1 78.000000 38.000000 0.000000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-20 11:42:54.937-05 S 0.00 0.00 \N 3339 299 2007-12-20 11:43:14.859-05 IM 40.000000 EA 40008-1 8012.000000 7972.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2007-12-20 11:43:14.859-05 S 10295.42 10244.02 \N 3337 308 2007-12-14 13:29:29.015-05 SH 2.000000 EA 50168-1 10.000000 8.000000 6.381800 \N \N Issue to Shipping t \N f SO t mfgadmin 2007-12-14 13:29:29.015-05 S 63.82 51.05 \N 3340 296 2008-03-04 13:32:47.291575-05 RP 100.000000 EA 20040 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-03-04 13:32:47.291575-05 S 0.00 25.00 \N 3341 310 2008-03-04 13:32:47.291575-05 RP 1000.000000 EA 20040 0.000000 1000.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-03-04 13:32:47.291575-05 S 0.00 250.00 \N 3342 295 2008-03-04 13:50:55.481281-05 RM 100.000000 EA 10044-1 0.000000 100.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-03-04 13:50:55.481281-05 S 0.00 64.60 \N 3343 298 2008-03-04 13:50:55.481281-05 IM 110.000000 EA 10044-1 6455.000000 6345.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 13:50:55.481281-05 S 1613.75 1586.25 \N 3344 296 2008-03-04 13:50:55.481281-05 IM 100.000000 EA 10044-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 13:50:55.481281-05 S 25.00 0.00 \N 3373 296 2008-03-05 13:45:26.531732-05 RP 100.000000 EA 20042 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-03-05 13:45:26.531732-05 S 0.00 25.00 \N 3346 294 2008-03-04 13:51:21.731285-05 IM 10.000000 EA 10045-1 1590.000000 1580.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 13:51:21.731285-05 S 397.50 395.00 \N 3347 295 2008-03-04 13:51:21.731285-05 IM 10.000000 EA 10045-1 100.000000 90.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 13:51:21.731285-05 S 64.60 58.14 \N 3374 296 2008-03-05 13:47:57.845732-05 IM 100.000000 EA 10049-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-05 13:47:57.845732-05 S 25.00 0.00 \N 3349 299 2008-03-04 13:51:21.731285-05 IM 40.000000 EA 10045-1 7972.000000 7932.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 13:51:21.731285-05 S 10244.02 10192.62 \N 3345 323 2008-03-04 13:51:21.731285-05 RM 10.000000 EA 10045-1 0.000000 10.000000 16.381800 \N \N Receive Inventory from Manufacturing t \N t WO t jsmith 2008-03-04 13:51:21.731285-05 S 0.00 163.82 \N 3348 297 2008-03-04 13:51:21.731285-05 IM 0.100000 GL 10045-1 942.750000 942.650000 1.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-03-04 13:51:21.731285-05 S 1602.68 1602.51 \N 3350 295 2008-03-04 14:12:42.842887-05 RM 100.000000 EA 10046-1 90.000000 190.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-03-04 14:12:42.842887-05 S 58.14 122.74 \N 3351 298 2008-03-04 14:12:42.842887-05 IM 110.000000 EA 10046-1 6345.000000 6235.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 14:12:42.842887-05 S 1586.25 1558.75 \N 3353 293 2008-03-04 14:12:56.581783-05 RM 100.000000 EA 10048-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-03-04 14:12:56.581783-05 S 0.00 638.18 \N 3354 294 2008-03-04 14:12:56.581783-05 IM 100.000000 EA 10048-1 1580.000000 1480.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 14:12:56.581783-05 S 395.00 370.00 \N 3375 298 2008-03-05 13:47:57.845732-05 IM 110.000000 EA 10049-1 6235.000000 6125.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-05 13:47:57.845732-05 S 1558.75 1531.25 \N 3356 299 2008-03-04 14:12:56.581783-05 IM 400.000000 EA 10048-1 7932.000000 7532.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 14:12:56.581783-05 S 10192.62 9678.62 \N 3357 295 2008-03-04 14:12:56.581783-05 IM 100.000000 EA 10048-1 190.000000 90.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 14:12:56.581783-05 S 122.74 58.14 \N 3355 297 2008-03-04 14:12:56.581783-05 IM 1.000000 GL 10048-1 942.650000 941.650000 1.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-03-04 14:12:56.581783-05 S 1602.51 1600.81 \N 3376 295 2008-03-05 13:47:57.845732-05 RM 100.000000 EA 10049-1 0.000000 100.000000 0.646000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-03-05 13:47:57.845732-05 S 0.00 64.60 \N 3359 294 2008-03-04 14:14:07.002445-05 IM 3.000000 EA 10047-1 1480.000000 1477.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 14:14:07.002445-05 S 370.00 369.25 \N 3377 293 2008-03-05 13:49:15.295821-05 RM 100.000000 EA 50172-1 0.000000 100.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-03-05 13:49:15.295821-05 S 0.00 638.18 \N 3361 299 2008-03-04 14:14:07.002445-05 IM 12.000000 EA 10047-1 7532.000000 7520.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 14:14:07.002445-05 S 9678.62 9663.20 \N 3362 295 2008-03-04 14:14:07.002445-05 IM 3.000000 EA 10047-1 90.000000 87.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-04 14:14:07.002445-05 S 58.14 56.20 \N 3358 323 2008-03-04 14:14:07.002445-05 RM 3.000000 EA 10047-1 10.000000 13.000000 16.381800 \N \N Receive Inventory from Manufacturing t \N t WO t jsmith 2008-03-04 14:14:07.002445-05 S 163.82 212.96 \N 3360 297 2008-03-04 14:14:07.002445-05 IM 0.030000 GL 10047-1 941.650000 941.620000 1.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-03-04 14:14:07.002445-05 S 1600.81 1600.75 \N 3378 294 2008-03-05 13:49:15.295821-05 IM 100.000000 EA 50172-1 1477.000000 1377.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-05 13:49:15.295821-05 S 369.25 344.25 \N 3364 293 2008-03-04 14:14:57.827315-05 SH 100.000000 EA 50169-2 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t jsmith 2008-03-04 14:14:57.827315-05 S 638.18 0.00 \N 3363 323 2008-03-04 14:14:57.827315-05 SH 3.000000 EA 50169-1 13.000000 10.000000 16.381800 \N \N Issue to Shipping t \N t SO t jsmith 2008-03-04 14:14:57.827315-05 S 212.96 163.82 \N 3365 295 2008-03-04 14:58:41.775501-05 SI 87.000000 EA Rain Damage 87.000000 0.000000 0.646000 \N \N Material Scrap\nRain Damage t \N f t jsmith 2008-03-04 14:58:41.775501-05 S 56.20 0.00 \N 3366 296 2008-03-04 15:00:48.377499-05 RP 100.000000 EA 20041 -100.000000 0.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-03-04 15:00:48.377499-05 S -25.00 0.00 \N 3379 295 2008-03-05 13:49:15.295821-05 IM 100.000000 EA 50172-1 100.000000 0.000000 0.646000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-05 13:49:15.295821-05 S 64.60 0.00 \N 3367 325 2008-03-04 16:24:13.047632-05 RR 1.000000 EA 80007 80007 0.000000 1.000000 16.381800 \N \N Receive Inventory from R/A t \N t RA t jsmith 2008-03-04 16:24:13.047632-05 S 0.00 16.38 \N 3381 299 2008-03-05 13:49:15.295821-05 IM 400.000000 EA 50172-1 7520.000000 7120.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-03-05 13:49:15.295821-05 S 9663.20 9149.20 \N 3368 323 2008-03-04 16:28:09.617709-05 TW -1.000000 EA \N MA09001 10.000000 9.000000 16.381800 \N 36 t \N t \N t jsmith 2008-03-04 16:28:09.617709-05 S 163.82 147.44 \N 3369 325 2008-03-04 16:28:09.617709-05 TW 1.000000 4 \N MA09001 1.000000 2.000000 16.381800 \N 35 t \N t \N t jsmith 2008-03-04 16:28:09.617709-05 S 16.38 32.76 \N 3380 297 2008-03-05 13:49:15.295821-05 IM 1.000000 GL 50172-1 941.620000 940.620000 1.700000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-03-05 13:49:15.295821-05 S 1600.75 1599.05 \N 3370 325 2008-03-04 16:28:48.025446-05 SH 1.000000 EA 50170-1 2.000000 1.000000 16.381800 \N \N Issue to Shipping t \N t SO t jsmith 2008-03-04 16:28:48.025446-05 S 32.76 16.38 \N 3382 293 2008-03-05 13:49:55.908928-05 SH 100.000000 EA 50172-1 100.000000 0.000000 6.381800 \N \N Issue to Shipping t \N f SO t jsmith 2008-03-05 13:49:55.908928-05 S 638.18 0.00 \N 3371 325 2008-03-04 16:35:33.992871-05 RR 1.000000 EA 80008 80008 1.000000 2.000000 16.381800 \N \N Receive Inventory from R/A t \N t RA t jsmith 2008-03-04 16:35:33.992871-05 S 16.38 32.76 \N 3386 294 2008-04-04 08:43:12.508474-04 IM 1000.000000 EA 10050-1 1377.000000 377.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2008-04-04 08:43:12.508474-04 S 344.25 94.25 \N 3372 323 2008-03-04 16:36:38.714943-05 SH 1.000000 EA 50171-2 9.000000 8.000000 16.381800 \N \N Issue to Shipping t \N t SO t jsmith 2008-03-04 16:36:38.714943-05 S 147.44 131.05 \N 3383 325 2008-03-05 13:57:22.650968-05 RR 1.000000 EA 80009 80009 2.000000 3.000000 16.381800 \N \N Receive Inventory from R/A t \N t RA t jsmith 2008-03-05 13:57:22.650968-05 S 32.76 49.15 \N 3384 323 2008-03-05 13:59:02.754616-05 SH 1.000000 EA 50173-1 8.000000 7.000000 16.381800 \N \N Issue to Shipping t \N t SO t jsmith 2008-03-05 13:59:02.754616-05 S 131.05 114.67 \N 3388 299 2008-04-04 08:43:12.508474-04 IM 4000.000000 EA 10050-1 7120.000000 3120.000000 1.285000 \N \N Material Issue to Work Order t \N f WO t mfgadmin 2008-04-04 08:43:12.508474-04 S 9149.20 4009.20 \N 3385 300 2008-04-04 08:43:12.508474-04 RM 1000.000000 EA 10050-1 0.000000 1000.000000 6.381800 \N \N Receive Inventory from Manufacturing t \N t WO t mfgadmin 2008-04-04 08:43:12.508474-04 S 0.00 6381.80 \N 3387 297 2008-04-04 08:43:12.508474-04 IM 10.000000 GL 10050-1 940.620000 930.620000 1.700000 \N \N Material Issue to Work Order t \N t WO t mfgadmin 2008-04-04 08:43:12.508474-04 S 1599.05 1582.05 \N 3389 310 2008-04-04 08:45:00.620791-04 RP 4000.000000 EA 20043 1000.000000 5000.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2008-04-04 08:45:00.620791-04 S 250.00 1250.00 \N 3390 299 2008-04-04 08:45:00.620791-04 RP 1000.000000 EA 20043 3120.000000 4120.000000 1.285000 \N \N Receive Inventory from P/O t \N f PO t mfgadmin 2008-04-04 08:45:00.620791-04 S 4009.20 5294.20 \N 3391 297 2008-04-04 08:45:00.620791-04 RP 12.500000 GL 20043 930.620000 943.120000 1.700000 \N \N Receive Inventory from P/O t \N t PO t mfgadmin 2008-04-04 08:45:00.620791-04 S 1582.05 1603.30 \N 3392 300 2008-04-04 08:46:00.842417-04 SH 1000.000000 EA 50174-1 1000.000000 0.000000 6.381800 \N \N Issue to Shipping t \N t SO t mfgadmin 2008-04-04 08:46:00.842417-04 S 6381.80 0.00 \N 3393 308 2008-06-12 08:53:45.773684-04 SH 1.000000 EA 50175-1 60021 8.000000 7.000000 6.381800 \N \N Issue to Shipping t \N f SO t jsmith 2008-06-12 08:53:45.773684-04 S 51.05 44.67 \N 3394 318 2008-06-12 10:37:18.668254-04 RP 5.000000 GL 20044 50.000000 55.000000 2.200000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-06-12 10:37:18.668254-04 S 110.00 121.00 \N 3395 318 2008-06-12 10:45:11.156443-04 RL 0.000000 GL \N \N 55.000000 55.000000 2.200000 \N \N \N t \N t \N t jsmith 2008-06-12 10:45:11.156443-04 S 121.00 121.00 \N 3396 318 2008-06-12 10:53:19.262037-04 RL 0.000000 GL \N \N 55.000000 55.000000 2.200000 \N \N \N t \N t \N t jsmith 2008-06-12 10:53:19.262037-04 S 121.00 121.00 \N 3397 318 2008-06-12 10:54:33.898596-04 RL 0.000000 GL \N \N 55.000000 55.000000 2.200000 \N \N \N t \N t \N t jsmith 2008-06-12 10:54:33.898596-04 S 121.00 121.00 \N 3398 318 2008-06-12 10:55:50.151158-04 RL 0.000000 GL \N \N 55.000000 55.000000 2.200000 \N \N \N t \N t \N t jsmith 2008-06-12 10:55:50.151158-04 S 121.00 121.00 \N 3399 327 2008-06-12 13:41:42.025527-04 RP 5000.000000 EA 20045 0.000000 5000.000000 0.005000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-12 13:41:42.025527-04 S 0.00 25.00 \N 3400 326 2008-06-12 13:41:42.025527-04 RP 10000.000000 EA 20045 0.000000 10000.000000 0.005000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-12 13:41:42.025527-04 S 0.00 50.00 \N 3401 329 2008-06-12 13:42:31.474517-04 RP 100.000000 GL 20046 0.000000 100.000000 20.000000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-06-12 13:42:31.474517-04 S 0.00 2000.00 \N 3402 326 2008-06-12 13:44:52.924492-04 RP -500.000000 EA 20045 10000.000000 9500.000000 0.005000 \N \N Receive Inventory from PO t \N f PO t jsmith 2008-06-12 13:44:52.924492-04 S 50.00 47.50 \N 3404 296 2008-06-12 14:36:16.448766-04 RP 100.000000 EA 20048 0.000000 100.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-12 14:36:16.448766-04 S 0.00 25.00 \N 3405 295 2008-06-12 14:36:42.310623-04 RM 100.000000 EA 10051-1 0.000000 100.000000 0.871000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-12 14:36:42.310623-04 S 0.00 87.10 \N 3406 296 2008-06-12 14:36:42.310623-04 IM 100.000000 EA 10051-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-12 14:36:42.310623-04 S 25.00 0.00 \N 3407 298 2008-06-12 14:36:42.310623-04 IM 110.000000 EA 10051-1 6125.000000 6015.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-12 14:36:42.310623-04 S 1531.25 1503.75 \N 3411 294 2008-06-12 14:41:41.29455-04 IM 1.000000 EA 50176-1 377.000000 376.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-12 14:41:41.29455-04 S 94.25 94.00 \N 3413 326 2008-06-12 14:41:41.29455-04 IM 2.000000 EA 50176-1 9500.000000 9498.000000 0.005000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-12 14:41:41.29455-04 S 47.50 47.49 \N 3414 295 2008-06-12 14:41:41.29455-04 IM 1.000000 EA 50176-1 100.000000 99.000000 0.871000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-12 14:41:41.29455-04 S 87.10 86.23 \N 3415 299 2008-06-12 14:41:41.29455-04 IM 4.000000 EA 50176-1 4120.000000 4116.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-12 14:41:41.29455-04 S 412.00 411.60 \N 3412 329 2008-06-12 14:41:41.29455-04 IM 1.000000 GL 50176-1 200.000000 199.000000 20.000000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-12 14:41:41.29455-04 S 4000.00 3980.00 \N 3416 318 2008-06-12 14:41:41.29455-04 IM 0.010000 GL 50176-1 55.000000 54.990000 14.900000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-12 14:41:41.29455-04 S 819.50 819.35 \N 3417 318 2008-06-12 14:43:38.079305-04 AD 10.000000 GL ST-10 54.990000 64.990000 14.900000 \N \N Miscellaneous Adjustment\n t \N t t jsmith 2008-06-12 14:43:38.079305-04 S 819.35 968.35 \N 3418 318 2008-06-12 14:45:08.909111-04 RL 0.000000 GL \N \N 64.990000 64.990000 14.900000 \N \N \N t \N t \N t jsmith 2008-06-12 14:45:08.909111-04 S 968.35 968.35 \N 3419 318 2008-06-12 14:45:53.808753-04 RL 0.000000 GL \N \N 64.990000 64.990000 14.900000 \N \N \N t \N t \N t jsmith 2008-06-12 14:45:53.808753-04 S 968.35 968.35 \N 3420 318 2008-06-12 14:46:15.294586-04 RL 0.000000 GL \N \N 64.990000 64.990000 14.900000 \N \N \N t \N t \N t jsmith 2008-06-12 14:46:15.294586-04 S 968.35 968.35 \N 3421 293 2008-06-12 14:54:18.189836-04 AD 100.000000 EA MA-01001 0.000000 100.000000 1.863400 \N \N Miscellaneous Adjustment\n t \N f t jsmith 2008-06-12 14:54:18.189836-04 S 0.00 186.34 \N 3426 296 2008-06-18 15:57:11.488257-04 AD 100.000000 EA MA-01 0.000000 100.000000 0.250000 \N \N Miscellaneous Adjustment\nMA Adjustment t \N f t jsmith 2008-06-18 15:57:11.488257-04 S 0.00 25.00 \N 3427 295 2008-06-18 15:57:55.358421-04 RM 100.000000 EA Misc. MA-MISC1 99.000000 199.000000 0.871000 \N \N Receive from Misc. Production for Item Number TKIT1\nMA Misc Prod t \N f WO t jsmith 2008-06-18 15:57:55.358421-04 S 86.23 173.33 \N 3436 294 2008-06-18 16:01:40.903562-04 IM 100.000000 EA 50178-1 376.000000 276.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-18 16:01:40.903562-04 S 94.00 69.00 \N 3438 295 2008-06-18 16:01:40.903562-04 IM 100.000000 EA 50178-1 199.000000 99.000000 0.871000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-18 16:01:40.903562-04 S 173.33 86.23 \N 3439 299 2008-06-18 16:01:40.903562-04 IM 400.000000 EA 50178-1 4116.000000 3716.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-18 16:01:40.903562-04 S 411.60 371.60 \N 3437 329 2008-06-18 16:01:40.903562-04 IM 1.000000 GL 50178-1 199.000000 198.000000 20.000000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-18 16:01:40.903562-04 S 3980.00 3960.00 \N 3441 318 2008-06-18 16:01:40.903562-04 IM 1.000000 GL 50178-1 64.990000 63.990000 14.900000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-18 16:01:40.903562-04 S 968.35 953.45 \N 3442 295 2008-06-18 16:05:36.099699-04 RM 100.000000 EA Misc. MA-2 99.000000 199.000000 0.871000 \N \N Receive from Misc. Production for Item Number TKIT1\nMISC PROD-MA2 t \N f WO t jsmith 2008-06-18 16:05:36.099699-04 S 86.23 173.33 \N 3443 295 2008-06-18 16:08:53.884521-04 RM 100.000000 EA 10052-1 199.000000 299.000000 0.871000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-18 16:08:53.884521-04 S 173.33 260.43 \N 3444 296 2008-06-18 16:08:53.884521-04 IM 100.000000 EA 10052-1 100.000000 0.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-18 16:08:53.884521-04 S 25.00 0.00 \N 3445 298 2008-06-18 16:08:53.884521-04 IM 110.000000 EA 10052-1 6015.000000 5905.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-18 16:08:53.884521-04 S 1503.75 1476.25 \N 3446 295 2008-06-18 16:12:09.090071-04 RM 100.000000 EA Misc. MA-MISC-3 299.000000 399.000000 0.871000 \N \N Receive from Misc. Production for Item Number TKIT1\nMA-Misc Prod 3 t \N f WO t jsmith 2008-06-18 16:12:09.090071-04 S 260.43 347.53 \N 3447 296 2008-06-18 16:12:09.090071-04 IM 100.000000 EA Misc. MA-MISC-3 0.000000 -100.000000 0.250000 \N \N Consumed during Misc. Production of Item Number TKIT1\nMA-Misc Prod 3 t \N f WO t jsmith 2008-06-18 16:12:09.090071-04 S 0.00 -25.00 \N 3448 298 2008-06-18 16:12:09.090071-04 IM 200.000000 EA Misc. MA-MISC-3 5905.000000 5705.000000 0.250000 \N \N Consumed during Misc. Production of Item Number TKIT1\nMA-Misc Prod 3 t \N f WO t jsmith 2008-06-18 16:12:09.090071-04 S 1476.25 1426.25 \N 3449 296 2008-06-18 16:35:10.374611-04 RP 100.000000 EA 20048 -100.000000 0.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-18 16:35:10.374611-04 S -25.00 0.00 \N 3452 294 2008-06-19 16:36:13.437438-04 RP 5000.000000 EA 20050 276.000000 5276.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-19 16:36:13.437438-04 S 69.00 1319.00 \N 3453 296 2008-06-19 16:36:13.437438-04 RP 1700.000000 EA 20050 0.000000 1700.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-19 16:36:13.437438-04 S 0.00 425.00 \N 3454 299 2008-06-19 16:36:13.437438-04 RP 16000.000000 EA 20050 3716.000000 19716.000000 0.100000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-19 16:36:13.437438-04 S 371.60 1971.60 \N 3455 305 2008-06-19 16:52:50.65578-04 RM 1100.000000 EA 10054-2 10.000000 1110.000000 2.330000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-19 16:52:50.65578-04 S 23.30 2586.30 \N 3456 306 2008-06-19 16:52:50.65578-04 IM 1100.000000 EA 10054-2 2590.000000 1490.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:52:50.65578-04 S 2590.00 1490.00 \N 3457 295 2008-06-19 16:53:08.961417-04 RM 2800.000000 EA 10055-1 399.000000 3199.000000 0.871000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-19 16:53:08.961417-04 S 347.53 2786.33 \N 3458 296 2008-06-19 16:53:08.961417-04 IM 2800.000000 EA 10055-1 1700.000000 -1100.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:08.961417-04 S 425.00 -275.00 \N 3459 298 2008-06-19 16:53:08.961417-04 IM 3080.000000 EA 10055-1 5705.000000 2625.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:08.961417-04 S 1426.25 656.25 \N 3460 308 2008-06-19 16:53:23.06988-04 RM 1100.000000 EA 10054-1 7.000000 1107.000000 8.348200 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-19 16:53:23.06988-04 S 58.44 9241.46 \N 3461 312 2008-06-19 16:53:23.06988-04 IM 4400.000000 EA 10054-1 38.000000 -4362.000000 1.038700 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:23.06988-04 S 39.47 -4530.81 \N 3462 310 2008-06-19 16:53:23.06988-04 IM 1100.000000 EA 10054-1 5000.000000 3900.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:23.06988-04 S 1250.00 975.00 \N 3463 305 2008-06-19 16:53:23.06988-04 IM 1100.000000 EA 10054-1 1110.000000 10.000000 2.330000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:23.06988-04 S 2586.30 23.30 \N 3464 295 2008-06-19 16:53:23.06988-04 IM 1100.000000 EA 10054-1 3199.000000 2099.000000 0.871000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:23.06988-04 S 2786.33 1828.23 \N 3465 299 2008-06-19 16:53:23.06988-04 IM 4400.000000 EA 10054-1 19716.000000 15316.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:23.06988-04 S 1971.60 1531.60 \N 3466 297 2008-06-19 16:53:23.06988-04 IM 11.000000 GL 10054-1 943.120000 932.120000 0.800000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-19 16:53:23.06988-04 S 754.50 745.70 \N 3467 293 2008-06-19 16:53:47.841836-04 RM 1000.000000 EA 50179-2 0.000000 1000.000000 1.863400 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-19 16:53:47.841836-04 S 0.00 1863.40 \N 3468 294 2008-06-19 16:53:47.841836-04 IM 1000.000000 EA 50179-2 5276.000000 4276.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:47.841836-04 S 1319.00 1069.00 \N 3469 295 2008-06-19 16:53:47.841836-04 IM 1000.000000 EA 50179-2 2099.000000 1099.000000 0.871000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:47.841836-04 S 1828.23 957.23 \N 3470 299 2008-06-19 16:53:47.841836-04 IM 4000.000000 EA 50179-2 15316.000000 11316.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:53:47.841836-04 S 1531.60 1131.60 \N 3471 297 2008-06-19 16:53:47.841836-04 IM 10.000000 GL 50179-2 932.120000 922.120000 0.800000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-19 16:53:47.841836-04 S 745.70 737.70 \N 3472 308 2008-06-19 16:54:18.965876-04 SH 1000.000000 EA 50179-3 60027 1107.000000 107.000000 8.348200 \N \N Issue to Shipping t \N f SO t jsmith 2008-06-19 16:54:18.965876-04 S 9241.46 893.26 \N 3473 293 2008-06-19 16:54:18.965876-04 SH 1000.000000 EA 50179-2 60027 1000.000000 0.000000 1.863400 \N \N Issue to Shipping t \N f SO t jsmith 2008-06-19 16:54:18.965876-04 S 1863.40 0.00 \N 3474 294 2008-06-19 16:54:18.965876-04 IM 1000.000000 EA 50179-1 4276.000000 3276.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:54:18.965876-04 S 1069.00 819.00 \N 3476 295 2008-06-19 16:54:18.965876-04 IM 1000.000000 EA 50179-1 1099.000000 99.000000 0.871000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:54:18.965876-04 S 957.23 86.23 \N 3477 299 2008-06-19 16:54:18.965876-04 IM 4000.000000 EA 50179-1 11316.000000 7316.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 16:54:18.965876-04 S 1131.60 731.60 \N 3475 329 2008-06-19 16:54:18.965876-04 IM 1.000000 GL 50179-1 198.000000 197.000000 20.000000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-19 16:54:18.965876-04 S 3960.00 3940.00 \N 3479 318 2008-06-19 16:54:18.965876-04 IM 10.000000 GL 50179-1 63.990000 53.990000 14.900000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-19 16:54:18.965876-04 S 953.45 804.45 \N 3480 296 2008-06-19 17:03:07.67209-04 RP 1199.000000 EA 20052 -1100.000000 99.000000 0.250000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-19 17:03:07.67209-04 S -275.00 24.75 \N 3481 314 2008-06-19 17:03:07.67209-04 RP 1000.000000 SH 20052 80.000000 1080.000000 5.000000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-19 17:03:07.67209-04 S 400.00 5400.00 \N 3482 311 2008-06-19 17:04:14.814705-04 RM 2000.000000 EA 10056-1 0.000000 2000.000000 5.049500 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-19 17:04:14.814705-04 S 0.00 10099.00 \N 3483 314 2008-06-19 17:04:14.814705-04 IM 2000.000000 SH 10056-1 1080.000000 -920.000000 5.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 17:04:14.814705-04 S 5400.00 -4600.00 \N 3484 313 2008-06-19 17:04:27.358545-04 RB 4000.000000 EA 10056-1 1042.000000 5042.000000 1.384900 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t jsmith 2008-06-19 17:04:27.358545-04 S 1443.07 6982.67 \N 3485 316 2008-06-19 17:04:27.358545-04 RB 3000.000000 LB 10056-1 777.000000 3777.000000 1.250000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t jsmith 2008-06-19 17:04:27.358545-04 S 971.25 4721.25 \N 3486 312 2008-06-19 17:04:27.358545-04 RB 8000.000000 EA 10056-1 -4362.000000 3638.000000 1.038700 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t jsmith 2008-06-19 17:04:27.358545-04 S -4530.81 3778.79 \N 3487 311 2008-06-19 17:04:27.358545-04 IB 2000.000000 EA 10056-1 2000.000000 0.000000 5.049500 \N \N Issue Breeder Inventory by Breeder Distribution t \N f WO t jsmith 2008-06-19 17:04:27.358545-04 S 10099.00 0.00 \N 3488 314 2008-06-19 17:06:03.069859-04 RP 2000.000000 SH 20053 -920.000000 1080.000000 5.000000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-19 17:06:03.069859-04 S -4600.00 5400.00 \N 3489 294 2008-06-19 17:07:52.576615-04 IM 99.000000 EA 50180-1 3276.000000 3177.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 17:07:52.576615-04 S 819.00 794.25 \N 3490 295 2008-06-19 17:07:52.576615-04 IM 99.000000 EA 50180-1 99.000000 0.000000 0.871000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 17:07:52.576615-04 S 86.23 0.00 \N 3491 299 2008-06-19 17:07:52.576615-04 IM 396.000000 EA 50180-1 7316.000000 6920.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-19 17:07:52.576615-04 S 731.60 692.00 \N 3492 297 2008-06-19 17:07:52.576615-04 IM 0.990000 GL 50180-1 922.120000 921.130000 0.800000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-19 17:07:52.576615-04 S 737.70 736.90 \N 3494 296 2008-06-19 17:09:28.285755-04 SI 99.000000 EA Water Damage 99.000000 0.000000 0.250000 \N \N Material Scrap\nMA - Water DMG t \N f t jsmith 2008-06-19 17:09:28.285755-04 S 24.75 0.00 \N 3495 323 2008-06-20 09:33:35.232685-04 SH 1.000000 EA 50181-1 60029 7.000000 6.000000 11.863400 \N \N Issue to Shipping t \N t SO t jsmith 2008-06-20 09:33:35.232685-04 S 83.04 71.18 \N 3496 296 2008-06-20 12:32:33.459856-04 RP 100.000000 EA 20054 0.000000 100.000000 0.200000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-06-20 12:32:33.459856-04 S 0.00 20.00 \N 3497 296 2008-06-20 12:34:59.329988-04 IM 100.000000 EA 10057-1 100.000000 0.000000 0.200000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-20 12:34:59.329988-04 S 20.00 0.00 \N 3498 298 2008-06-20 12:34:59.329988-04 IM 110.000000 EA 10057-1 2625.000000 2515.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-20 12:34:59.329988-04 S 656.25 628.75 \N 3499 295 2008-06-20 12:34:59.329988-04 RM 100.000000 EA 10057-1 0.000000 100.000000 0.821000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-20 12:34:59.329988-04 S 0.00 82.10 \N 3500 293 2008-06-20 12:35:16.941089-04 RM 100.000000 EA 50182-1 0.000000 100.000000 2.563400 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-06-20 12:35:16.941089-04 S 0.00 256.34 \N 3501 294 2008-06-20 12:35:16.941089-04 IM 100.000000 EA 50182-1 3177.000000 3077.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-20 12:35:16.941089-04 S 3177.00 3077.00 \N 3502 295 2008-06-20 12:35:16.941089-04 IM 100.000000 EA 50182-1 100.000000 0.000000 0.821000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-20 12:35:16.941089-04 S 82.10 0.00 \N 3503 299 2008-06-20 12:35:16.941089-04 IM 400.000000 EA 50182-1 6920.000000 6520.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-06-20 12:35:16.941089-04 S 692.00 652.00 \N 3504 297 2008-06-20 12:35:16.941089-04 IM 1.000000 GL 50182-1 921.130000 920.130000 0.800000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-20 12:35:16.941089-04 S 736.90 736.10 \N 3505 293 2008-06-20 12:35:46.397893-04 SH 100.000000 EA 50182-1 60030 100.000000 0.000000 2.563400 \N \N Issue to Shipping t \N f SO t jsmith 2008-06-20 12:35:46.397893-04 S 256.34 0.00 \N 3517 299 2008-09-09 16:54:16.812243-04 SH 4.000000 EA 50184-1.2 60034 6520.000000 6516.000000 0.100000 \N \N Issue to Shipping t \N f SO t jsmith 2008-09-09 16:54:16.812243-04 S 652.00 651.60 \N 3518 310 2008-09-09 16:54:16.812243-04 SH 1.000000 EA 50184-1.3 60034 3900.000000 3899.000000 0.250000 \N \N Issue to Shipping t \N f SO t jsmith 2008-09-09 16:54:16.812243-04 S 975.00 974.75 \N 3519 312 2008-09-09 16:54:16.812243-04 SH 4.000000 EA 50184-1.4 60034 3638.000000 3634.000000 1.038700 \N \N Issue to Shipping t \N f SO t jsmith 2008-09-09 16:54:16.812243-04 S 3778.79 3774.64 \N 3520 305 2008-09-09 16:54:16.812243-04 SH 1.000000 EA 50184-1.5 60034 10.000000 9.000000 2.330000 \N \N Issue to Shipping t \N f SO t jsmith 2008-09-09 16:54:16.812243-04 S 23.30 20.97 \N 3516 318 2008-09-09 16:54:16.812243-04 SH 0.050000 GL 50184-1.1 60034 53.990000 53.940000 14.900000 \N \N Issue to Shipping t \N t SO t jsmith 2008-09-09 16:54:16.812243-04 S 804.45 803.71 \N 3521 318 2008-09-09 16:55:37.747755-04 RS 0.050000 GL 50184-1.1 60034 53.940000 53.990000 14.900000 \N \N Return from Shipping t \N t SO t jsmith 2008-09-09 16:55:37.747755-04 S 803.71 804.46 \N 3522 318 2008-09-09 16:55:49.386918-04 SH 0.050000 GL 50184-1.1 60034 53.990000 53.940000 14.900000 \N \N Issue to Shipping t \N t SO t jsmith 2008-09-09 16:55:49.386918-04 S 804.46 803.72 \N 3523 297 2008-09-24 16:23:10.052774-04 SI 700.000000 GL SCRAP-Paint 920.130000 220.130000 0.800000 \N \N Material Scrap\nOld and Damaged Paint t \N t t jsmith 2008-09-24 16:23:10.052774-04 S 736.10 176.10 \N 3524 297 2008-09-24 16:24:12.070752-04 SI 220.130000 GL SCRAP Paint2 220.130000 0.000000 0.800000 \N \N Material Scrap\nMore old and damaged Paint t \N t t jsmith 2008-09-24 16:24:12.070752-04 S 176.10 0.00 \N 3525 318 2008-09-24 16:26:46.573412-04 RL 0.000000 GL \N \N 53.940000 53.940000 14.900000 \N \N \N t \N t \N t jsmith 2008-09-24 16:26:46.573412-04 S 803.72 803.72 \N 3526 318 2008-09-24 16:27:22.878188-04 RL 0.000000 GL \N \N 53.940000 53.940000 14.900000 \N \N \N t \N t \N t jsmith 2008-09-24 16:27:22.878188-04 S 803.72 803.72 \N 3527 297 2008-09-24 16:28:51.272858-04 RP 100.000000 GL 20056 0.000000 100.000000 0.800000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-09-24 16:28:51.272858-04 S 0.00 80.00 \N 3530 296 2008-10-02 09:44:20.788494-04 RP 200.000000 EA 20058 0.000000 200.000000 0.200000 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-10-02 09:44:20.788494-04 S 0.00 40.00 \N 3531 298 2008-10-02 09:56:01.068303-04 IM 220.000000 EA 10058-1 2515.000000 2295.000000 0.250000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 09:56:01.068303-04 S 628.75 573.75 \N 3532 296 2008-10-02 09:56:01.068303-04 IM 200.000000 EA 10058-1 200.000000 0.000000 0.200000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 09:56:01.068303-04 S 40.00 0.00 \N 3533 295 2008-10-02 09:56:01.068303-04 RM 200.000000 EA 10058-1 0.000000 200.000000 0.821000 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-10-02 09:56:01.068303-04 S 0.00 164.20 \N 3537 294 2008-10-02 09:59:48.655574-04 IM 10.000000 EA 50185-1 3077.000000 3067.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 09:59:48.655574-04 S 3077.00 3067.00 \N 3538 329 2008-10-02 09:59:48.655574-04 IM 1.000000 GL 50185-1 197.000000 196.000000 12.000000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-10-02 09:59:48.655574-04 S 2364.00 2352.00 \N 3539 318 2008-10-02 09:59:48.655574-04 IM 0.100000 GL 50185-1 53.940000 53.840000 14.900000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-10-02 09:59:48.655574-04 S 803.72 802.23 \N 3541 299 2008-10-02 10:01:57.611219-04 IM 40.000000 EA 50185-1 6516.000000 6476.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 10:01:57.611219-04 S 651.60 647.60 \N 3542 295 2008-10-02 10:02:20.251521-04 IM 10.000000 EA 50185-1 200.000000 190.000000 0.821000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 10:02:20.251521-04 S 164.20 155.99 \N 3543 294 2008-10-02 10:02:29.241588-04 IM 100.000000 EA 40010-1 3067.000000 2967.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 10:02:29.241588-04 S 3067.00 2967.00 \N 3544 299 2008-10-02 10:02:29.241588-04 IM 400.000000 EA 40010-1 6476.000000 6076.000000 0.100000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 10:02:29.241588-04 S 647.60 607.60 \N 3546 295 2008-10-02 10:02:29.241588-04 IM 100.000000 EA 40010-1 190.000000 90.000000 0.821000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 10:02:29.241588-04 S 155.99 73.89 \N 3547 293 2008-10-02 10:02:29.241588-04 RM 100.000000 EA 40010-1 0.000000 100.000000 2.563400 \N \N Receive Inventory from Manufacturing t \N f WO t jsmith 2008-10-02 10:02:29.241588-04 S 0.00 256.34 \N 3545 297 2008-10-02 10:02:29.241588-04 IM 1.000000 GL 40010-1 100.000000 99.000000 0.800000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-10-02 10:02:29.241588-04 S 80.00 79.20 \N 3548 293 2008-10-02 10:02:52.119267-04 SH 100.000000 EA 40010-1 60035 100.000000 0.000000 2.563400 \N \N Issue to Shipping t \N f SO t jsmith 2008-10-02 10:02:52.119267-04 S 256.34 0.00 \N 3551 299 2008-10-02 10:02:52.119267-04 SH 400.000000 EA 40010-3.2 60035 6076.000000 5676.000000 0.100000 \N \N Issue to Shipping t \N f SO t jsmith 2008-10-02 10:02:52.119267-04 S 607.60 567.60 \N 3552 310 2008-10-02 10:02:52.119267-04 SH 100.000000 EA 40010-3.3 60035 3899.000000 3799.000000 0.250000 \N \N Issue to Shipping t \N f SO t jsmith 2008-10-02 10:02:52.119267-04 S 974.75 949.75 \N 3553 312 2008-10-02 10:02:52.119267-04 SH 400.000000 EA 40010-3.4 60035 3634.000000 3234.000000 1.038700 \N \N Issue to Shipping t \N f SO t jsmith 2008-10-02 10:02:52.119267-04 S 3774.64 3359.16 \N 3554 305 2008-10-02 10:02:52.119267-04 SH 100.000000 EA 40010-3.5 60035 9.000000 -91.000000 2.330000 \N \N Issue to Shipping t \N f SO t jsmith 2008-10-02 10:02:52.119267-04 S 20.97 -212.03 \N 3549 323 2008-10-02 10:02:52.119267-04 SH 3.000000 EA 40010-2 60035 6.000000 3.000000 12.563400 \N \N Issue to Shipping t \N t SO t jsmith 2008-10-02 10:02:52.119267-04 S 75.38 37.69 \N 3550 318 2008-10-02 10:02:52.119267-04 SH 5.000000 GL 40010-3.1 60035 53.840000 48.840000 14.900000 \N \N Issue to Shipping t \N t SO t jsmith 2008-10-02 10:02:52.119267-04 S 802.23 727.73 \N 3555 294 2008-10-02 10:21:09.352899-04 IM 10.000000 EA 50185-1 2967.000000 2957.000000 1.000000 \N \N Material Issue to Work Order t \N f WO t jsmith 2008-10-02 10:21:09.352899-04 S 2967.00 2957.00 \N 3556 329 2008-10-02 10:21:09.352899-04 IM 1.000000 GL 50185-1 196.000000 195.000000 12.000000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-10-02 10:21:09.352899-04 S 2352.00 2340.00 \N 3557 318 2008-10-02 10:21:09.352899-04 IM 0.100000 GL 50185-1 48.840000 48.740000 14.900000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-10-02 10:21:09.352899-04 S 727.73 726.24 \N 3559 302 2008-10-02 10:29:14.019723-04 RP 1000.000000 EA 20059 0.000000 1000.000000 2.567800 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-10-02 10:29:14.019723-04 S 0.00 2567.80 \N 3560 303 2008-10-02 10:29:14.019723-04 RP 1000.000000 EA 20059 0.000000 1000.000000 2.567800 \N \N Receive Inventory from P/O t \N f PO t jsmith 2008-10-02 10:29:14.019723-04 S 0.00 2567.80 \N 3561 303 2008-10-02 11:04:13.810864-04 SH 1000.000000 EA 50186-3 60037 1000.000000 0.000000 2.567800 \N \N Issue to Shipping t \N f SO t jsmith 2008-10-02 11:04:13.810864-04 S 2567.80 0.00 \N 3563 302 2008-10-02 11:04:13.810864-04 SH 1000.000000 EA 50186-2 60037 1000.000000 0.000000 2.567800 \N \N Issue to Shipping t \N f SO t jsmith 2008-10-02 11:04:13.810864-04 S 2567.80 0.00 \N 3564 306 2008-12-30 16:35:02.681079-05 IM 91.000000 EA 10059-1 1490.000000 1399.000000 1.000000 \N \N Material RBUMP1 Issue to Work Order t \N f WO t admin 2008-12-30 16:35:02.681079-05 S 1490.00 1399.00 \N 3565 305 2008-12-30 16:35:02.681079-05 RM 91.000000 EA 10059-1 -91.000000 0.000000 2.330000 \N \N Receive Inventory CBUMP from Manufacturing t \N f WO t admin 2008-12-30 16:35:02.681079-05 S -212.03 0.00 \N 3566 295 2008-12-30 16:41:17.968721-05 SI 90.000000 EA MA-SCRP 90.000000 0.000000 0.821000 \N \N Material Scrap for item TKIT1\nWater Damage Due to Storm t \N f SI t admin 2008-12-30 16:41:17.968721-05 S 73.89 0.00 \N 3567 296 2008-12-31 13:48:48.2886-05 RP 100.000000 EA 20061 0.000000 100.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2008-12-31 13:48:48.2886-05 S 0.00 20.00 \N 3568 298 2008-12-31 14:13:35.261849-05 IM 110.000000 EA 10060-1 2295.000000 2185.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t jsmith 2008-12-31 14:13:35.261849-05 S 573.75 546.25 \N 3569 296 2008-12-31 14:13:35.261849-05 IM 100.000000 EA 10060-1 100.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t jsmith 2008-12-31 14:13:35.261849-05 S 20.00 0.00 \N 3570 295 2008-12-31 14:13:35.261849-05 RM 100.000000 EA 10060-1 0.000000 100.000000 0.821000 \N \N Receive Inventory TKIT1 from Manufacturing t \N f WO t jsmith 2008-12-31 14:13:35.261849-05 S 0.00 82.10 \N 3572 299 2008-12-31 14:13:47.92547-05 IM 400.000000 EA 50189-1 5676.000000 5276.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t jsmith 2008-12-31 14:13:47.92547-05 S 567.60 527.60 \N 3573 294 2008-12-31 14:13:47.92547-05 IM 100.000000 EA 50189-1 2957.000000 2857.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t jsmith 2008-12-31 14:13:47.92547-05 S 2957.00 2857.00 \N 3574 295 2008-12-31 14:13:47.92547-05 IM 100.000000 EA 50189-1 100.000000 0.000000 0.821000 \N \N Material TKIT1 Issue to Work Order t \N f WO t jsmith 2008-12-31 14:13:47.92547-05 S 82.10 0.00 \N 3575 293 2008-12-31 14:13:47.92547-05 RM 100.000000 EA 50189-1 0.000000 100.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t jsmith 2008-12-31 14:13:47.92547-05 S 0.00 256.34 \N 3571 297 2008-12-31 14:13:47.92547-05 IM 1.000000 GL 50189-1 99.000000 98.000000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t jsmith 2008-12-31 14:13:47.92547-05 S 79.20 78.40 \N 3576 293 2008-12-31 14:14:17.697236-05 SH 100.000000 EA 50189-1 60038 100.000000 0.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t jsmith 2008-12-31 14:14:17.697236-05 S 256.34 0.00 \N 3577 308 2008-12-31 14:59:40.514158-05 RP 5000.000000 EA 20062 107.000000 5107.000000 8.298200 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2008-12-31 14:59:40.514158-05 S 887.91 42378.91 \N 3578 308 2008-12-31 15:27:17.498292-05 SH 5050.000000 EA 50190-1 60039 5107.000000 57.000000 8.298200 \N \N Issue STOCKCAR1 to Shipping for customer Xtreme Toys LTD t \N f SO t jsmith 2008-12-31 15:27:17.498292-05 S 42378.91 473.00 \N 3579 303 2009-01-12 13:14:35.396128-05 RP 1000.000000 EA 20063 0.000000 1000.000000 2.567800 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2009-01-12 13:14:35.396128-05 S 0.00 2567.80 \N 3580 302 2009-01-12 13:14:35.396128-05 RP 1000.000000 EA 20063 0.000000 1000.000000 2.567800 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2009-01-12 13:14:35.396128-05 S 0.00 2567.80 \N 3582 303 2009-01-12 13:37:23.336834-05 SH 1000.000000 EA 50191-1 60040 1000.000000 0.000000 2.567800 \N \N Issue BTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t jsmith 2009-01-12 13:37:23.336834-05 S 2567.80 0.00 \N 3583 302 2009-01-12 13:37:23.336834-05 SH 1000.000000 EA 50191-2 60040 1000.000000 0.000000 2.567800 \N \N Issue RTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t jsmith 2009-01-12 13:37:23.336834-05 S 2567.80 0.00 \N 3585 323 2009-01-12 13:53:23.947611-05 SH 1.000000 EA 50192-1 60041 3.000000 2.000000 12.563400 \N \N Issue STRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N t SO t jsmith 2009-01-12 13:53:23.947611-05 S 37.69 25.13 \N 3586 323 2009-01-12 13:54:42.900138-05 SH 1.000000 EA 50193-1 60042 2.000000 1.000000 12.563400 \N \N Issue STRUCK1 to Shipping for customer Xtreme Toys LTD t \N t SO t jsmith 2009-01-12 13:54:42.900138-05 S 25.13 12.57 \N 3589 295 2009-06-26 16:04:41.310155-04 RM 1000.000000 EA Misc. Special Build 0.000000 1000.000000 0.821000 \N \N Receive from Misc. Production for Item Number TKIT1\n t \N f WO t admin 2009-06-26 16:04:41.310155-04 S 0.00 821.00 \N 3590 296 2009-06-26 16:04:41.310155-04 IM 1000.000000 EA Misc. Special Build 0.000000 -1000.000000 0.200000 \N \N Consumed during Misc. Production of Item Number TKIT1\n t \N f WO t admin 2009-06-26 16:04:41.310155-04 S 0.00 -200.00 \N 3592 296 2009-06-26 16:06:00.949558-04 RP 1000.000000 EA 20065 -1000.000000 0.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-06-26 16:06:00.949558-04 S -200.00 0.00 \N 3593 303 2009-06-26 16:07:52.029442-04 RM 300.000000 EA Misc. Special 0.000000 300.000000 2.567800 \N \N Receive from Misc. Production for Item Number BTRUCK1\n t \N f WO t admin 2009-06-26 16:07:52.029442-04 S 0.00 770.34 \N 3596 299 2009-06-26 16:07:52.029442-04 IM 1200.000000 EA Misc. Special 5276.000000 4076.000000 0.100000 \N \N Consumed during Misc. Production of Item Number BTRUCK1\n t \N f WO t admin 2009-06-26 16:07:52.029442-04 S 527.60 407.60 \N 3597 295 2009-06-26 16:07:52.029442-04 IM 300.000000 EA Misc. Special 1000.000000 700.000000 0.821000 \N \N Consumed during Misc. Production of Item Number BTRUCK1\n t \N f WO t admin 2009-06-26 16:07:52.029442-04 S 821.00 574.70 \N 3595 297 2009-06-26 16:07:52.029442-04 IM 3.000000 GL Misc. Special 98.000000 95.000000 0.800000 \N \N Consumed during Misc. Production of Item Number BTRUCK1\n t \N t WO t admin 2009-06-26 16:07:52.029442-04 S 78.40 76.00 \N 3601 299 2009-06-26 16:08:11.32276-04 IM 1200.000000 EA Misc. Special 4076.000000 2876.000000 0.100000 \N \N Consumed during Misc. Production of Item Number WTRUCK1\n t \N f WO t admin 2009-06-26 16:08:11.32276-04 S 407.60 287.60 \N 3602 295 2009-06-26 16:08:11.32276-04 IM 300.000000 EA Misc. Special 700.000000 400.000000 0.821000 \N \N Consumed during Misc. Production of Item Number WTRUCK1\n t \N f WO t admin 2009-06-26 16:08:11.32276-04 S 574.70 328.40 \N 3600 297 2009-06-26 16:08:11.32276-04 IM 3.000000 GL Misc. Special 95.000000 92.000000 0.800000 \N \N Consumed during Misc. Production of Item Number WTRUCK1\n t \N t WO t admin 2009-06-26 16:08:11.32276-04 S 76.00 73.60 \N 3603 302 2009-06-26 16:08:38.016253-04 RM 400.000000 EA Misc. Special 0.000000 400.000000 2.567800 \N \N Receive from Misc. Production for Item Number RTRUCK1\n t \N f WO t admin 2009-06-26 16:08:38.016253-04 S 0.00 1027.12 \N 3606 299 2009-06-26 16:08:38.016253-04 IM 1600.000000 EA Misc. Special 2876.000000 1276.000000 0.100000 \N \N Consumed during Misc. Production of Item Number RTRUCK1\n t \N f WO t admin 2009-06-26 16:08:38.016253-04 S 287.60 127.60 \N 3607 295 2009-06-26 16:08:38.016253-04 IM 400.000000 EA Misc. Special 400.000000 0.000000 0.821000 \N \N Consumed during Misc. Production of Item Number RTRUCK1\n t \N f WO t admin 2009-06-26 16:08:38.016253-04 S 328.40 0.00 \N 3605 297 2009-06-26 16:08:38.016253-04 IM 4.000000 GL Misc. Special 92.000000 88.000000 0.800000 \N \N Consumed during Misc. Production of Item Number RTRUCK1\n t \N t WO t admin 2009-06-26 16:08:38.016253-04 S 73.60 70.40 \N 3608 302 2009-06-26 16:11:32.419021-04 SH 400.000000 EA 50194-3 60043 400.000000 0.000000 2.567800 \N \N Issue RTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2009-06-26 16:11:32.419021-04 S 1027.12 0.00 \N 3610 303 2009-06-26 16:11:42.700487-04 SH 300.000000 EA 50194-1 60043 300.000000 0.000000 2.567800 \N \N Issue BTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2009-06-26 16:11:42.700487-04 S 770.34 0.00 \N 3626 297 2009-08-13 08:52:34.091695-04 IM 100.000000 GL 50195-1 213.000000 113.000000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2009-08-13 08:52:34.091695-04 S 170.40 90.40 \N 3629 293 2009-08-13 08:53:01.761218-04 SH 10000.000000 EA 50195-1 60044 10000.000000 0.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2009-08-13 08:53:01.761218-04 S 25634.00 0.00 \N 3616 296 2009-08-13 08:45:52.119528-04 RP 10000.000000 EA 20066 0.000000 10000.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-08-13 08:45:52.119528-04 S 0.00 2000.00 \N 3620 299 2009-08-13 08:45:52.119528-04 RP 60000.000000 EA 20066 1276.000000 61276.000000 0.100000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-08-13 08:45:52.119528-04 S 127.60 6127.60 \N 3619 297 2009-08-13 08:45:52.119528-04 RP 125.000000 GL 20066 88.000000 213.000000 0.800000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N t PO t admin 2009-08-13 08:45:52.119528-04 S 70.40 170.40 \N 3622 296 2009-08-13 08:50:25.065315-04 IM 10000.000000 EA 10061-1 10000.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t admin 2009-08-13 08:50:25.065315-04 S 2000.00 0.00 \N 3623 295 2009-08-13 08:50:25.065315-04 RM 10000.000000 EA 10061-1 0.000000 10000.000000 0.821000 \N \N Receive Inventory TKIT1 from Manufacturing t \N f WO t admin 2009-08-13 08:50:25.065315-04 S 0.00 8210.00 \N 3624 299 2009-08-13 08:52:34.091695-04 IM 40000.000000 EA 50195-1 61276.000000 21276.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2009-08-13 08:52:34.091695-04 S 6127.60 2127.60 \N 3625 295 2009-08-13 08:52:34.091695-04 IM 10000.000000 EA 50195-1 10000.000000 0.000000 0.821000 \N \N Material TKIT1 Issue to Work Order t \N f WO t admin 2009-08-13 08:52:34.091695-04 S 8210.00 0.00 \N 3628 293 2009-08-13 08:52:34.091695-04 RM 10000.000000 EA 50195-1 0.000000 10000.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t admin 2009-08-13 08:52:34.091695-04 S 0.00 25634.00 \N 3630 321 2009-09-16 13:53:52.094642-04 TW -600.000000 EA Relocate 600.000000 0.000000 0.100000 \N 35 t \N f t jsmith 2009-09-16 13:53:52.094642-04 S 60.00 0.00 \N 3631 299 2009-09-16 13:53:52.094642-04 TW 600.000000 EA Relocate 21276.000000 21876.000000 0.100000 \N 36 t \N f t jsmith 2009-09-16 13:53:52.094642-04 S 2127.60 2187.60 \N 3632 296 2009-09-16 14:01:41.564999-04 RP 200.000000 EA 20067 0.000000 200.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2009-09-16 14:01:41.564999-04 S 0.00 40.00 \N 3634 296 2009-09-16 14:02:06.670672-04 IM 200.000000 EA 10063-1 200.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t jsmith 2009-09-16 14:02:06.670672-04 S 40.00 0.00 \N 3635 331 2009-09-16 14:02:06.670672-04 RM 200.000000 EA 10063-1 0.000000 200.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t jsmith 2009-09-16 14:02:06.670672-04 S 0.00 164.20 \N 3638 331 2009-09-16 14:02:29.104421-04 IM 200.000000 EA 10062-1 200.000000 0.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t jsmith 2009-09-16 14:02:29.104421-04 S 164.20 0.00 \N 3639 299 2009-09-16 14:02:29.104421-04 IM 800.000000 EA 10062-1 21876.000000 21076.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t jsmith 2009-09-16 14:02:29.104421-04 S 2187.60 2107.60 \N 3640 293 2009-09-16 14:02:29.104421-04 RM 200.000000 EA 10062-1 0.000000 200.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t jsmith 2009-09-16 14:02:29.104421-04 S 0.00 512.68 \N 3637 297 2009-09-16 14:02:29.104421-04 IM 2.000000 GL 10062-1 113.000000 111.000000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t jsmith 2009-09-16 14:02:29.104421-04 S 90.40 88.80 \N 3641 303 2009-09-16 14:06:01.207031-04 SH 220.000000 EA 99005 0.000000 -220.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-16 14:06:01.207031-04 S 0.00 -564.92 \N 3642 302 2009-09-16 14:06:01.489398-04 SH 300.000000 EA 99005 0.000000 -300.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-16 14:06:01.489398-04 S 0.00 -770.34 \N 3891 296 2009-10-13 13:29:46.360576-04 RP 5900.000000 EA 20076 0.000000 5900.000000 0.200000 \N \N Receive Inventory from P/O for Packaging Pros LTD t \N f PO t jsmith 2009-10-13 13:29:46.360576-04 S 0.00 1180.00 \N 3644 296 2009-09-16 14:08:16.025412-04 RP 600.000000 EA 20068 0.000000 600.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2009-09-16 14:08:16.025412-04 S 0.00 120.00 \N 3645 331 2009-09-16 14:08:49.028423-04 RM 600.000000 EA Misc. Special Build 0.000000 600.000000 0.821000 \N \N Receive from Misc. Production for Item Number TSUB1\n t \N f WO t jsmith 2009-09-16 14:08:49.028423-04 S 0.00 492.60 \N 3646 296 2009-09-16 14:08:49.028423-04 IM 600.000000 EA Misc. Special Build 600.000000 0.000000 0.200000 \N \N Consumed during Misc. Production of Item Number TSUB1\n t \N f WO t jsmith 2009-09-16 14:08:49.028423-04 S 120.00 0.00 \N 3892 299 2009-10-13 13:30:05.859373-04 RP 50000.000000 EA 20077 3600.000000 53600.000000 0.100000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2009-10-13 13:30:05.859373-04 S 360.00 5360.00 \N 3893 306 2009-10-13 13:36:44.045243-04 IM 870.000000 EA 10067-2 1399.000000 529.000000 1.000000 \N \N Material RBUMP1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:36:44.045243-04 S 1399.00 529.00 \N 3894 305 2009-10-13 13:36:44.045243-04 RM 870.000000 EA 10067-2 0.000000 870.000000 2.330000 \N \N Receive Inventory CBUMP from Manufacturing t \N f WO t jsmith 2009-10-13 13:36:44.045243-04 S 0.00 2027.10 \N 3895 296 2009-10-13 13:37:01.52835-04 IM 900.000000 EA 10068-1 5900.000000 5000.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:01.52835-04 S 1180.00 1000.00 \N 3661 377 2009-09-16 14:35:09.991769-04 RP 100.000000 GL 20069 0.000000 100.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-16 14:35:09.991769-04 S 0.00 80.00 \N 3897 331 2009-10-13 13:37:01.52835-04 RM 900.000000 EA 10068-1 0.000000 900.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t jsmith 2009-10-13 13:37:01.52835-04 S 0.00 738.90 \N 3665 376 2009-09-16 14:38:50.768926-04 RP 10.000000 GL 20070 100.000000 110.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-16 14:38:50.768926-04 S 80.00 88.00 \N 3659 303 2009-09-16 14:20:53.202603-04 RS 220.000000 EA 99005 -220.000000 0.000000 2.567800 \N \N Return from Shipping t \N f TO t jsmith 2009-09-16 14:20:53.202603-04 S -564.92 0.00 \N 3660 302 2009-09-16 14:20:55.312698-04 RS 300.000000 EA 99005 -300.000000 0.000000 2.567800 \N \N Return from Shipping t \N f TO t jsmith 2009-09-16 14:20:55.312698-04 S -770.34 0.00 \N 3898 296 2009-10-13 13:37:14.252675-04 IM 5000.000000 EA 10069-1 5000.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:14.252675-04 S 1000.00 0.00 \N 3662 376 2009-09-16 14:35:10.409384-04 RP 100.000000 GL 20069 0.000000 100.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-16 14:35:10.409384-04 S 0.00 80.00 \N 3663 378 2009-09-16 14:35:10.826688-04 RP 100.000000 GL 20069 0.000000 100.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-16 14:35:10.826688-04 S 0.00 80.00 \N 3664 377 2009-09-16 14:38:50.441297-04 RP 10.000000 GL 20070 100.000000 110.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-16 14:38:50.441297-04 S 80.00 88.00 \N 3900 331 2009-10-13 13:37:14.252675-04 RM 5000.000000 EA 10069-1 900.000000 5900.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t jsmith 2009-10-13 13:37:14.252675-04 S 738.90 4843.90 \N 3688 302 2009-09-16 14:47:11.457164-04 RM 200.000000 EA Misc. Special 0.000000 200.000000 2.567800 \N \N Receive from Misc. Production for Item Number RTRUCK1\n t \N f WO t jsmith 2009-09-16 14:47:11.457164-04 S 0.00 513.56 \N 3672 303 2009-09-16 14:43:38.956601-04 RM 200.000000 EA Misc. Special 0.000000 200.000000 2.567800 \N \N Receive from Misc. Production for Item Number BTRUCK1\n t \N f WO t jsmith 2009-09-16 14:43:38.956601-04 S 0.00 513.56 \N 3675 299 2009-09-16 14:43:38.956601-04 IM 800.000000 EA Misc. Special 21076.000000 20276.000000 0.100000 \N \N Consumed during Misc. Production of Item Number BTRUCK1\n t \N f WO t jsmith 2009-09-16 14:43:38.956601-04 S 2107.60 2027.60 \N 3676 331 2009-09-16 14:43:38.956601-04 IM 200.000000 EA Misc. Special 600.000000 400.000000 0.821000 \N \N Consumed during Misc. Production of Item Number BTRUCK1\n t \N f WO t jsmith 2009-09-16 14:43:38.956601-04 S 492.60 328.40 \N 3673 377 2009-09-16 14:43:38.956601-04 IM 2.000000 GL Misc. Special 110.000000 108.000000 0.800000 \N \N Consumed during Misc. Production of Item Number BTRUCK1\n t \N t WO t jsmith 2009-09-16 14:43:38.956601-04 S 88.00 86.40 \N 3901 331 2009-10-13 13:37:26.971918-04 IM 870.000000 EA 10067-1 5900.000000 5030.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:26.971918-04 S 4843.90 4129.63 \N 3680 299 2009-09-16 14:44:42.947646-04 IM 800.000000 EA Misc. Special 20276.000000 19476.000000 0.100000 \N \N Consumed during Misc. Production of Item Number WTRUCK1\n t \N f WO t jsmith 2009-09-16 14:44:42.947646-04 S 2027.60 1947.60 \N 3681 331 2009-09-16 14:44:42.947646-04 IM 200.000000 EA Misc. Special 400.000000 200.000000 0.821000 \N \N Consumed during Misc. Production of Item Number WTRUCK1\n t \N f WO t jsmith 2009-09-16 14:44:42.947646-04 S 328.40 164.20 \N 3678 378 2009-09-16 14:44:42.947646-04 IM 2.000000 GL Misc. Special 100.000000 98.000000 0.800000 \N \N Consumed during Misc. Production of Item Number WTRUCK1\n t \N t WO t jsmith 2009-09-16 14:44:42.947646-04 S 80.00 78.40 \N 3691 299 2009-09-16 14:47:11.457164-04 IM 800.000000 EA Misc. Special 19476.000000 18676.000000 0.100000 \N \N Consumed during Misc. Production of Item Number RTRUCK1\n t \N f WO t jsmith 2009-09-16 14:47:11.457164-04 S 1947.60 1867.60 \N 3692 331 2009-09-16 14:47:11.457164-04 IM 200.000000 EA Misc. Special 200.000000 0.000000 0.821000 \N \N Consumed during Misc. Production of Item Number RTRUCK1\n t \N f WO t jsmith 2009-09-16 14:47:11.457164-04 S 164.20 0.00 \N 3689 376 2009-09-16 14:47:11.457164-04 IM 2.000000 GL Misc. Special 110.000000 108.000000 0.800000 \N \N Consumed during Misc. Production of Item Number RTRUCK1\n t \N t WO t jsmith 2009-09-16 14:47:11.457164-04 S 88.00 86.40 \N 3693 303 2009-09-21 09:20:10.215504-04 SH 200.000000 EA 99005 200.000000 0.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:20:10.215504-04 S 513.56 0.00 \N 3694 302 2009-09-21 09:20:10.540645-04 SH 200.000000 EA 99005 200.000000 0.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:20:10.540645-04 S 513.56 0.00 \N 3696 293 2009-09-21 09:20:16.182737-04 SH 200.000000 EA 99005 200.000000 0.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:20:16.182737-04 S 512.68 0.00 \N 3713 366 2009-09-21 09:25:22.136436-04 SH 20.000000 EA 99003 200.000000 180.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:25:22.136436-04 S 513.56 462.20 \N 3714 368 2009-09-21 09:25:22.339291-04 SH 20.000000 EA 99003 200.000000 180.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:25:22.339291-04 S 513.56 462.20 \N 3715 370 2009-09-21 09:25:22.539195-04 SH 20.000000 EA 99003 200.000000 180.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:25:22.539195-04 S 513.56 462.20 \N 3716 333 2009-09-21 09:25:22.726848-04 SH 20.000000 EA 99003 200.000000 180.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:25:22.726848-04 S 512.68 461.41 \N 3733 366 2009-09-21 09:25:38.400236-04 SH 20.000000 EA 99004 180.000000 160.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:25:38.400236-04 S 462.20 410.84 \N 3734 368 2009-09-21 09:25:38.763348-04 SH 20.000000 EA 99004 180.000000 160.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:25:38.763348-04 S 462.20 410.84 \N 3735 370 2009-09-21 09:25:38.95296-04 SH 20.000000 EA 99004 180.000000 160.000000 2.567800 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:25:38.95296-04 S 462.20 410.84 \N 3736 333 2009-09-21 09:25:39.143007-04 SH 20.000000 EA 99004 180.000000 160.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-21 09:25:39.143007-04 S 461.41 410.14 \N 3903 312 2009-10-13 13:37:26.971918-04 IM 3480.000000 EA 10067-1 2824.000000 -656.000000 1.038700 \N \N Material HUB1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:26.971918-04 S 2933.29 -681.39 \N 3904 310 2009-10-13 13:37:26.971918-04 IM 870.000000 EA 10067-1 3699.000000 2829.000000 0.250000 \N \N Material CBODY1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:26.971918-04 S 924.75 707.25 \N 3905 305 2009-10-13 13:37:26.971918-04 IM 870.000000 EA 10067-1 870.000000 0.000000 2.330000 \N \N Material CBUMP Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:26.971918-04 S 2027.10 0.00 \N 3906 299 2009-10-13 13:37:26.971918-04 IM 3480.000000 EA 10067-1 53600.000000 50120.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:26.971918-04 S 5360.00 5012.00 \N 3907 308 2009-10-13 13:37:26.971918-04 RM 870.000000 EA 10067-1 142.000000 1012.000000 8.298200 \N \N Receive Inventory STOCKCAR1 from Manufacturing t \N f WO t jsmith 2009-10-13 13:37:26.971918-04 S 1178.36 8397.79 \N 3902 297 2009-10-13 13:37:26.971918-04 IM 8.700000 GL 10067-1 110.000000 101.300000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t jsmith 2009-10-13 13:37:26.971918-04 S 88.00 81.04 \N 3909 331 2009-10-13 13:37:59.957039-04 IM 5000.000000 EA 50198-1 5030.000000 30.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:59.957039-04 S 4129.63 24.63 \N 3911 299 2009-10-13 13:37:59.957039-04 IM 20000.000000 EA 50198-1 50120.000000 30120.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:59.957039-04 S 5012.00 3012.00 \N 3912 293 2009-10-13 13:37:59.957039-04 RM 5000.000000 EA 50198-1 0.000000 5000.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t jsmith 2009-10-13 13:37:59.957039-04 S 0.00 12817.00 \N 3753 302 2009-09-21 13:25:48.658055-04 RS -1.000000 EA 100001 100001 0.000000 -1.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-21 13:25:48.658055-04 S 0.00 -2.57 \N 3754 336 2009-09-21 14:05:25.912491-04 RS -1.000000 EA 100002 100002 20.000000 19.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-21 14:05:25.912491-04 S 51.36 48.79 \N 3755 336 2009-09-21 14:15:39.704831-04 RS -1.000000 EA 100003 100003 19.000000 18.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-21 14:15:39.704831-04 S 48.79 46.22 \N 3756 336 2009-09-21 14:19:15.920814-04 RS -1.000000 EA 100004 100004 18.000000 17.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-21 14:19:15.920814-04 S 46.22 43.65 \N 3757 336 2009-09-21 14:23:45.383677-04 RS -1.000000 EA 100005 100005 17.000000 16.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-21 14:23:45.383677-04 S 43.65 41.08 \N 3758 332 2009-09-21 14:48:26.830118-04 RS -1.000000 EA 100007 100007 20.000000 19.000000 2.563400 \N \N Item Sale: YTRUCK1 t \N f RS t admin 2009-09-21 14:48:26.830118-04 S 51.27 48.71 \N 3759 336 2009-09-21 14:50:59.861613-04 RS -1.000000 EA 100008 100008 16.000000 15.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t admin 2009-09-21 14:50:59.861613-04 S 41.08 38.51 \N 3760 368 2009-09-21 14:53:57.886571-04 SH 50.000000 EA 99006 160.000000 110.000000 2.567800 \N \N Issue to Shipping t \N f TO t admin 2009-09-21 14:53:57.886571-04 S 410.84 282.45 \N 3761 370 2009-09-21 14:53:58.191934-04 SH 55.000000 EA 99006 160.000000 105.000000 2.567800 \N \N Issue to Shipping t \N f TO t admin 2009-09-21 14:53:58.191934-04 S 410.84 269.61 \N 3762 366 2009-09-21 14:53:58.396963-04 SH 55.000000 EA 99006 160.000000 105.000000 2.567800 \N \N Issue to Shipping t \N f TO t admin 2009-09-21 14:53:58.396963-04 S 410.84 269.61 \N 3775 302 2009-09-21 14:55:13.941435-04 CC 2.000000 EA \N \N -1.000000 1.000000 2.567800 \N \N Misc Count t \N f \N t admin 2009-09-21 14:55:13.941435-04 S -2.57 2.57 \N 3776 302 2009-09-21 14:56:05.431212-04 CC -1.000000 EA \N \N 1.000000 0.000000 2.567800 \N \N Count Correction t \N f \N t admin 2009-09-21 14:56:05.431212-04 S 2.57 0.00 \N 3777 332 2009-09-21 15:12:46.208715-04 RS -1.000000 EA 100009 100009 19.000000 18.000000 2.563400 \N \N Item Sale: YTRUCK1 t \N f RS t jsmith 2009-09-21 15:12:46.208715-04 S 48.71 46.15 \N 3778 335 2009-09-21 15:12:46.208715-04 RS -1.000000 EA 100009 100009 75.000000 74.000000 2.567800 \N \N Item Sale: BTRUCK1 t \N f RS t jsmith 2009-09-21 15:12:46.208715-04 S 192.59 190.02 \N 3779 336 2009-09-21 15:12:46.208715-04 RS -1.000000 EA 100009 100009 65.000000 64.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-21 15:12:46.208715-04 S 166.90 164.33 \N 3780 338 2009-09-21 15:12:46.208715-04 RS -1.000000 EA 100009 100009 75.000000 74.000000 2.567800 \N \N Item Sale: WTRUCK1 t \N f RS t jsmith 2009-09-21 15:12:46.208715-04 S 192.59 190.02 \N 3781 336 2009-09-21 15:21:37.177112-04 RS -1.000000 EA 100010 100010 64.000000 63.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-21 15:21:37.177112-04 S 164.33 161.76 \N 3782 336 2009-09-21 15:27:41.65371-04 RS -1.000000 EA 100011 100011 63.000000 62.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-21 15:27:41.65371-04 S 161.76 159.19 \N 3783 296 2009-09-21 16:57:42.627442-04 RP 5000.000000 EA 20071 0.000000 5000.000000 0.200000 \N \N Receive Inventory from P/O for Packaging Pros LTD t \N f PO t admin 2009-09-21 16:57:42.627442-04 S 0.00 1000.00 \N 3785 296 2009-09-21 16:58:18.356578-04 IM 5000.000000 EA 10064-1 5000.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t admin 2009-09-21 16:58:18.356578-04 S 1000.00 0.00 \N 3786 331 2009-09-21 16:58:18.356578-04 RM 5000.000000 EA 10064-1 0.000000 5000.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t admin 2009-09-21 16:58:18.356578-04 S 0.00 4105.00 \N 3910 297 2009-10-13 13:37:59.957039-04 IM 50.000000 GL 50198-1 101.300000 51.300000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t jsmith 2009-10-13 13:37:59.957039-04 S 81.04 41.04 \N 3789 331 2009-09-21 16:58:32.138356-04 IM 5000.000000 EA 50196-1 5000.000000 0.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t admin 2009-09-21 16:58:32.138356-04 S 4105.00 0.00 \N 3790 299 2009-09-21 16:58:32.138356-04 IM 20000.000000 EA 50196-1 18676.000000 -1324.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2009-09-21 16:58:32.138356-04 S 1867.60 -132.40 \N 3791 293 2009-09-21 16:58:32.138356-04 RM 5000.000000 EA 50196-1 0.000000 5000.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t admin 2009-09-21 16:58:32.138356-04 S 0.00 12817.00 \N 3787 297 2009-09-21 16:58:32.138356-04 IM 50.000000 GL 50196-1 111.000000 61.000000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2009-09-21 16:58:32.138356-04 S 88.80 48.80 \N 3913 314 2009-10-13 13:40:27.302082-04 IM 400.000000 SH 10070-1 1080.000000 680.000000 1.250000 \N \N Material SHEET1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:40:27.302082-04 S 1350.00 850.00 \N 3914 311 2009-10-13 13:40:27.302082-04 RM 400.000000 EA 10070-1 0.000000 400.000000 1.299500 \N \N Receive Inventory BRCPFN1 from Manufacturing t \N f WO t jsmith 2009-10-13 13:40:27.302082-04 S 0.00 519.80 \N 3915 316 2009-10-13 13:40:39.531523-04 RB 600.000000 LB 10070-1 3777.000000 4377.000000 1.250000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t jsmith 2009-10-13 13:40:39.531523-04 S 4721.25 5471.25 \N 3792 293 2009-09-21 17:10:05.68371-04 SH 5000.000000 EA 50196-1 60049 5000.000000 0.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2009-09-21 17:10:05.68371-04 S 12817.00 0.00 \N 3916 313 2009-10-13 13:40:39.531523-04 RB 800.000000 EA 10070-1 5042.000000 5842.000000 0.634900 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t jsmith 2009-10-13 13:40:39.531523-04 S 3201.17 3709.09 \N 3793 376 2009-09-22 08:14:21.175107-04 RP 1.000000 GL 20072 108.000000 109.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t admin 2009-09-22 08:14:21.175107-04 S 86.40 87.20 \N 3808 303 2009-09-25 09:06:18.026142-04 SI 10.000000 EA Damaged in Warehous 10.000000 0.000000 2.620400 \N \N Material Scrap for item BTRUCK1\n t \N f SI t jsmith 2009-09-25 09:06:18.026142-04 S 26.20 0.00 \N 3794 378 2009-09-22 08:14:21.805394-04 RP 1.000000 GL 20072 98.000000 99.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t admin 2009-09-22 08:14:21.805394-04 S 78.40 79.20 \N 3917 312 2009-10-13 13:40:39.531523-04 RB 1600.000000 EA 10070-1 -656.000000 944.000000 1.038700 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t jsmith 2009-10-13 13:40:39.531523-04 S -681.39 980.53 \N 3795 377 2009-09-22 08:18:51.419203-04 RP 1.000000 GL 20072 108.000000 109.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t admin 2009-09-22 08:18:51.419203-04 S 86.40 87.20 \N 3809 299 2009-09-25 09:14:18.561497-04 RP 5324.000000 EA 20074 -1324.000000 4000.000000 0.100000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2009-09-25 09:14:18.561497-04 S -132.40 400.00 \N 3796 297 2009-09-22 08:18:51.774134-04 RP 1.000000 GL 20072 61.000000 62.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t admin 2009-09-22 08:18:51.774134-04 S 48.80 49.60 \N 3918 311 2009-10-13 13:40:39.531523-04 IB 400.000000 EA 10070-1 400.000000 0.000000 1.299500 \N \N Issue Breeder Inventory by Breeder Distribution t \N f WO t jsmith 2009-10-13 13:40:39.531523-04 S 519.80 0.00 \N 3797 376 2009-09-22 08:25:26.741647-04 RP 10.000000 GL 20072 109.000000 119.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t admin 2009-09-22 08:25:26.741647-04 S 87.20 95.20 \N 3919 333 2009-10-13 13:42:04.980174-04 SH 20.000000 EA 99010 170.000000 150.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-10-13 13:42:04.980174-04 S 435.78 384.51 \N 3798 378 2009-09-22 08:25:27.072249-04 RP 10.000000 GL 20072 99.000000 109.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t admin 2009-09-22 08:25:27.072249-04 S 79.20 87.20 \N 3810 297 2009-09-25 09:24:27.293829-04 IM 1.000000 GL 10066-1 111.000000 110.000000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t jsmith 2009-09-25 09:24:27.293829-04 S 88.80 88.00 \N 3799 376 2009-09-22 10:30:13.635685-04 RP 39.000000 GL 20072 119.000000 158.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-22 10:30:13.635685-04 S 95.20 126.40 \N 3800 378 2009-09-22 10:30:14.126116-04 RP 39.000000 GL 20072 109.000000 148.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-22 10:30:14.126116-04 S 87.20 118.40 \N 3811 312 2009-09-25 09:26:01.294518-04 IM 410.000000 EA 10066-1 3234.000000 2824.000000 1.038700 \N \N Material HUB1 Issue to Work Order t \N f WO t jsmith 2009-09-25 09:26:01.294518-04 S 3359.16 2933.29 \N 3801 377 2009-09-22 10:30:14.448509-04 RP 49.000000 GL 20072 109.000000 158.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-22 10:30:14.448509-04 S 87.20 126.40 \N 3802 297 2009-09-22 10:30:14.790954-04 RP 49.000000 GL 20072 62.000000 111.000000 0.800000 \N \N Receive Inventory from P/O for World Chem, Inc. t \N t PO t jsmith 2009-09-22 10:30:14.790954-04 S 49.60 88.80 \N 3803 335 2009-09-23 09:17:49.668275-04 RS -1.000000 EA 100012 100012 74.000000 73.000000 2.567800 \N \N Item Sale: BTRUCK1 t \N f RS t jsmith 2009-09-23 09:17:49.668275-04 S 190.02 187.45 \N 3804 336 2009-09-23 09:18:56.487349-04 RS -1.000000 EA 100013 100013 62.000000 61.000000 2.567800 \N \N Item Sale: RTRUCK1 t \N f RS t jsmith 2009-09-23 09:18:56.487349-04 S 159.19 156.62 \N 3805 293 2009-09-25 09:04:37.657884-04 AD 10.000000 EA Adjustment 0.000000 10.000000 2.563400 \N \N Miscellaneous Adjustment for item YTRUCK1\n t \N f AD t jsmith 2009-09-25 09:04:37.657884-04 S 0.00 25.63 \N 3806 293 2009-09-25 09:05:30.891943-04 IT 10.000000 EA Transform 10.000000 0.000000 2.563400 \N \N Transform Issue for item YTRUCK1\n t \N f IT t admin 2009-09-25 09:05:30.891943-04 S 25.63 0.00 \N 3807 303 2009-09-25 09:05:30.891943-04 RT 10.000000 EA Transform 0.000000 10.000000 2.620400 \N \N Transform Receipt for item BTRUCK1\n t \N f RT t admin 2009-09-25 09:05:30.891943-04 S 0.00 26.20 \N 3812 310 2009-09-25 09:26:15.173834-04 IM 100.000000 EA 10066-1 3799.000000 3699.000000 0.250000 \N \N Material CBODY1 Issue to Work Order t \N f WO t jsmith 2009-09-25 09:26:15.173834-04 S 949.75 924.75 \N 3813 299 2009-09-25 09:26:15.173834-04 IM 400.000000 EA 10066-1 4000.000000 3600.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t jsmith 2009-09-25 09:26:15.173834-04 S 400.00 360.00 \N 3814 308 2009-09-25 09:26:59.813165-04 RM 100.000000 EA 10066-1 57.000000 157.000000 8.298200 \N \N Receive Inventory STOCKCAR1 from Manufacturing t \N f WO t jsmith 2009-09-25 09:26:59.813165-04 S 473.00 1302.82 \N 3815 308 2009-09-25 09:46:27.073604-04 SH 25.000000 EA 99007 157.000000 132.000000 8.298200 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-25 09:46:27.073604-04 S 1302.82 1095.37 \N 3930 333 2009-10-13 13:44:51.607186-04 RS 20.000000 EA 99010 150.000000 170.000000 2.563400 \N \N Return from Shipping t \N f TO t jsmith 2009-10-13 13:44:51.607186-04 S 384.51 435.78 \N 3931 333 2009-10-13 13:47:14.595953-04 SH 10.000000 EA 99010 170.000000 160.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-10-13 13:47:14.595953-04 S 435.78 410.15 \N 3957 333 2009-10-13 14:45:47.060933-04 RP 100.000000 EA 20078 110.000000 210.000000 2.563400 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2009-10-13 14:45:47.060933-04 S 281.97 538.31 \N 3958 299 2009-10-13 14:45:47.396454-04 RP 4000.000000 EA 20078 30120.000000 34120.000000 0.100000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t jsmith 2009-10-13 14:45:47.396454-04 S 3012.00 3412.00 \N 3828 308 2009-09-25 10:10:58.446895-04 RS 25.000000 EA 99007 132.000000 157.000000 8.298200 \N \N Return from Shipping t \N f TO t jsmith 2009-09-25 10:10:58.446895-04 S 1095.37 1302.83 \N 3829 308 2009-09-25 10:18:46.722202-04 TW -5.000000 EA Transfer 157.000000 152.000000 8.298200 \N 37 t \N f t jsmith 2009-09-25 10:18:46.722202-04 S 1302.83 1261.34 \N 3830 379 2009-09-25 10:18:46.722202-04 TW 5.000000 EA Transfer 0.000000 5.000000 8.298200 \N 35 t \N f t jsmith 2009-09-25 10:18:46.722202-04 S 0.01 41.50 \N 3831 379 2009-09-25 10:19:06.39027-04 TW -5.000000 EA Transfer 5.000000 0.000000 8.298200 \N 36 t \N f t jsmith 2009-09-25 10:19:06.39027-04 S 41.50 0.01 \N 3832 309 2009-09-25 10:19:06.39027-04 TW 5.000000 EA Transfer 300.000000 305.000000 8.298200 \N 37 t \N f t jsmith 2009-09-25 10:19:06.39027-04 S 2489.46 2530.95 \N 3833 293 2009-09-25 10:21:49.80949-04 AD 5.000000 EA Special Count 0.000000 5.000000 2.563400 \N \N Miscellaneous Adjustment for item YTRUCK1\n t \N f AD t jsmith 2009-09-25 10:21:49.80949-04 S 0.00 12.82 \N 3834 293 2009-09-25 10:23:58.941212-04 SH 5.000000 EA 99007 5.000000 0.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-25 10:23:58.941212-04 S 12.82 0.00 \N 3839 308 2009-09-25 10:31:29.501399-04 SH 10.000000 EA 50197-1 60052 152.000000 142.000000 8.298200 \N \N Issue STOCKCAR1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t jsmith 2009-09-25 10:31:29.501399-04 S 1261.34 1178.36 \N 3844 293 2009-09-25 10:42:52.160988-04 RS 5.000000 EA 99007 0.000000 5.000000 2.563400 \N \N Return from Shipping t \N f TO t jsmith 2009-09-25 10:42:52.160988-04 S 0.00 12.82 \N 3845 293 2009-09-25 10:42:57.982312-04 SH 5.000000 EA 99007 5.000000 0.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-25 10:42:57.982312-04 S 12.82 0.00 \N 3852 293 2009-09-25 10:43:56.693142-04 RS 5.000000 EA 99007 0.000000 5.000000 2.563400 \N \N Return from Shipping t \N f TO t jsmith 2009-09-25 10:43:56.693142-04 S 0.00 12.82 \N 3853 303 2009-09-25 10:44:38.329216-04 AD 5.000000 EA Special Count 0.000000 5.000000 2.620400 \N \N Miscellaneous Adjustment for item BTRUCK1\n t \N f AD t jsmith 2009-09-25 10:44:38.329216-04 S 0.00 13.10 \N 3854 303 2009-09-25 10:49:47.453889-04 SH 5.000000 EA 99007 5.000000 0.000000 2.620400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-25 10:49:47.453889-04 S 13.10 0.00 \N 3861 303 2009-09-25 10:50:39.665449-04 RS 5.000000 EA 99007 0.000000 5.000000 2.620400 \N \N Return from Shipping t \N f TO t jsmith 2009-09-25 10:50:39.665449-04 S 0.00 13.10 \N 3862 293 2009-09-25 11:01:50.164113-04 SH 5.000000 EA 99007 5.000000 0.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-25 11:01:50.164113-04 S 12.82 0.00 \N 3874 293 2009-09-25 12:40:38.069364-04 SH 5.000000 EA 99007 5.000000 0.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-25 12:40:38.069364-04 S 12.82 0.00 \N 3873 293 2009-09-25 12:40:32.869483-04 RS 5.000000 EA 99007 0.000000 5.000000 2.563400 \N \N Return from Shipping t \N f TO t jsmith 2009-09-25 12:40:32.869483-04 S 0.00 12.82 \N 3881 293 2009-09-25 12:49:41.171164-04 SH 5.000000 EA 99008 5.000000 0.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-25 12:49:41.171164-04 S 12.82 0.00 \N 3877 375 2009-09-25 12:47:08.620928-04 CC 5.000000 EA \N \N -5.000000 0.000000 2.563400 \N \N Spot Check t \N f \N t jsmith 2009-09-25 12:47:08.620928-04 S -12.82 0.00 \N 3878 332 2009-09-25 12:47:45.353122-04 CC -13.000000 EA \N \N 18.000000 5.000000 2.563400 \N \N t \N f \N t jsmith 2009-09-25 12:47:45.353122-04 S 46.15 12.83 \N 3879 332 2009-09-25 12:48:20.251017-04 TW -5.000000 EA Return to plant 5.000000 0.000000 2.563400 \N 35 t \N f t jsmith 2009-09-25 12:48:20.251017-04 S 12.83 0.01 \N 3880 293 2009-09-25 12:48:20.251017-04 TW 5.000000 EA Return to plant 0.000000 5.000000 2.563400 \N 39 t \N f t jsmith 2009-09-25 12:48:20.251017-04 S 0.00 12.82 \N 3886 303 2009-09-25 12:52:07.667942-04 SH 5.000000 EA 99009 5.000000 0.000000 2.620400 \N \N Issue to Shipping t \N f TO t jsmith 2009-09-25 12:52:07.667942-04 S 13.10 0.00 \N 3940 333 2009-10-13 14:23:25.824697-04 RS 10.000000 EA 99010 160.000000 170.000000 2.563400 \N \N Return from Shipping t \N f TO t jsmith 2009-10-13 14:23:25.824697-04 S 410.15 435.78 \N 3941 333 2009-10-13 14:24:16.915529-04 TW -20.000000 EA TRN-Product 170.000000 150.000000 2.563400 \N 39 t \N f t jsmith 2009-10-13 14:24:16.915529-04 S 435.78 384.51 \N 3942 332 2009-10-13 14:24:16.915529-04 TW 20.000000 EA TRN-Product 0.000000 20.000000 2.563400 \N 36 t \N f t jsmith 2009-10-13 14:24:16.915529-04 S 0.01 51.28 \N 3943 308 2009-10-13 14:24:51.918254-04 SH 1000.000000 EA 50199-1 60058 1012.000000 12.000000 8.298200 \N \N Issue STOCKCAR1 to Shipping for customer Xtreme Toys LTD t \N f SO t jsmith 2009-10-13 14:24:51.918254-04 S 8397.79 99.59 \N 3944 293 2009-10-13 14:25:20.846471-04 SH 5000.000000 EA 50198-1 60059 5000.000000 0.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t jsmith 2009-10-13 14:25:20.846471-04 S 12817.00 0.00 \N 3945 333 2009-10-13 14:32:36.839299-04 SH 20.000000 EA 99010 150.000000 130.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-10-13 14:32:36.839299-04 S 384.51 333.24 \N 3950 332 2009-10-13 14:35:04.420718-04 RS -40.000000 EA 100014 100014 40.000000 0.000000 2.563400 \N \N Item Sale: YTRUCK1 t \N f RS t jsmith 2009-10-13 14:35:04.420718-04 S 102.55 0.01 \N 3951 333 2009-10-13 14:37:40.830135-04 SH 20.000000 EA 99011 130.000000 110.000000 2.563400 \N \N Issue to Shipping t \N f TO t jsmith 2009-10-13 14:37:40.830135-04 S 333.24 281.97 \N 3959 296 2009-12-03 15:22:55.296337-05 RP 10000.000000 EA 20079 0.000000 10000.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-12-03 15:22:55.296337-05 S 0.00 2000.00 \N 3961 297 2009-12-03 15:22:55.66131-05 RP 3.125000 GL 20079 51.300000 54.425000 0.800000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N t PO t admin 2009-12-03 15:22:55.66131-05 S 41.04 43.54 \N 3963 299 2009-12-03 16:32:54.191451-05 RP 18000.000000 EA 20080 34120.000000 52120.000000 0.100000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-12-03 16:32:54.191451-05 S 3412.00 5212.00 \N 3964 297 2009-12-03 16:32:54.369614-05 RP 250.000000 GL 20080 54.425000 304.425000 0.800000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N t PO t admin 2009-12-03 16:32:54.369614-05 S 43.54 243.54 \N 3965 296 2009-12-03 16:38:19.24024-05 IM 10000.000000 EA 10071-1 10000.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t admin 2009-12-03 16:38:19.24024-05 S 2000.00 0.00 \N 3967 331 2009-12-03 16:38:19.24024-05 RM 10000.000000 EA 10071-1 30.000000 10030.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t admin 2009-12-03 16:38:19.24024-05 S 24.63 8234.63 \N 3968 331 2009-12-03 16:38:32.769241-05 IM 10000.000000 EA 50200-1 10030.000000 30.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t admin 2009-12-03 16:38:32.769241-05 S 8234.63 24.63 \N 3971 299 2009-12-03 16:38:32.769241-05 IM 40000.000000 EA 50200-1 52120.000000 12120.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2009-12-03 16:38:32.769241-05 S 5212.00 1212.00 \N 3972 293 2009-12-03 16:38:32.769241-05 RM 10000.000000 EA 50200-1 0.000000 10000.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t admin 2009-12-03 16:38:32.769241-05 S 0.00 25634.00 \N 3969 297 2009-12-03 16:38:32.769241-05 IM 100.000000 GL 50200-1 304.425000 204.425000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2009-12-03 16:38:32.769241-05 S 243.54 163.54 \N 3973 293 2009-12-03 17:04:49.973715-05 SH 10000.000000 EA 50200-1 60062 10000.000000 0.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2009-12-03 17:04:49.973715-05 S 25634.00 0.00 \N 3974 331 2009-12-04 13:56:03.986896-05 SI 30.000000 EA Rain Damage 30.000000 0.000000 0.821000 \N \N Material Scrap for item TSUB1\nRain Damage t \N f SI t admin 2009-12-04 13:56:03.986896-05 S 24.63 0.00 \N 3975 293 2010-01-05 16:41:19.43222-05 RS 5.000000 EA 99007 0.000000 5.000000 2.563400 \N \N Return from Shipping t \N f TO t admin 2010-01-05 16:41:19.43222-05 S 0.00 12.82 \N 3976 332 2010-01-05 17:03:41.19046-05 RS -1.000000 EA 100001 100001 20.000000 19.000000 2.563400 \N \N Item Sale: YTRUCK1 t \N f RS t admin 2010-01-05 17:03:41.19046-05 S 51.28 48.72 \N 3977 332 2010-01-05 17:06:14.721859-05 RS -1.000000 EA 100002 100002 19.000000 18.000000 2.563400 \N \N Item Sale: YTRUCK1 t \N f RS t admin 2010-01-05 17:06:14.721859-05 S 48.72 46.16 \N 3978 297 2010-03-10 15:53:13.474857-05 AD -0.005000 GL Balance 204.425000 204.420000 0.800000 \N \N Miscellaneous Adjustment for item YPAINT1\nInventory Balance t \N f AD t admin 2010-03-10 15:53:13.474857-05 S 163.54 163.54 1575 3979 381 2010-03-10 16:37:44.35516-05 RP 1000.000000 EA 20082-1 0.000000 1000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing t \N f PO t admin 2010-03-10 16:37:44.35516-05 S 0.00 22000.00 1576 3980 381 2010-03-10 16:37:44.35516-05 SH 1000.000000 EA 50201-1 60063 1000.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-03-10 16:37:44.35516-05 S 22000.00 0.00 1576 3981 296 2010-03-12 15:03:05.591481-05 RP 1000.000000 EA 20083-1 0.000000 1000.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2010-03-12 15:03:05.591481-05 S 0.00 200.00 1577 3984 331 2010-03-12 15:03:40.677631-05 RM 1000.000000 EA 10072-1 0.000000 1000.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t admin 2010-03-12 15:03:40.677631-05 S 0.00 821.00 1578 3982 296 2010-03-12 15:03:40.677631-05 IM 1000.000000 EA 10072-1 1000.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t admin 2010-03-12 15:03:40.677631-05 S 200.00 0.00 1578 3987 297 2010-03-12 15:04:01.080913-05 IM 10.000000 GL 50202-1 204.420000 194.420000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2010-03-12 15:04:01.080913-05 S 163.54 155.54 1579 3986 299 2010-03-12 15:04:01.080913-05 IM 4000.000000 EA 50202-1 12120.000000 8120.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2010-03-12 15:04:01.080913-05 S 1212.00 812.00 1579 3988 331 2010-03-12 15:04:01.080913-05 IM 1000.000000 EA 50202-1 1000.000000 0.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t admin 2010-03-12 15:04:01.080913-05 S 821.00 0.00 1579 3989 293 2010-03-12 15:04:01.080913-05 RM 1000.000000 EA 50202-1 5.000000 1005.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t admin 2010-03-12 15:04:01.080913-05 S 12.82 2576.22 1579 3990 293 2010-03-12 15:10:17.738066-05 SH 1000.000000 EA 50202-1 60064 1005.000000 5.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-03-12 15:10:17.738066-05 S 2576.22 12.82 1580 3991 293 2010-03-12 15:10:18.074981-05 SH 5.000000 EA 50202-2 60064 5.000000 0.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-03-12 15:10:18.074981-05 S 12.82 0.00 1581 3994 323 2010-03-12 15:33:59.235438-05 RP 3.000000 EA 20084-1 0.000000 3.000000 12.563400 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N t PO t admin 2010-03-12 15:33:59.235438-05 S 0.00 37.69 1585 3992 325 2010-03-12 15:25:43.591309-05 RR 1.000000 EA 80010-1 3.000000 4.000000 12.563400 \N \N Receive Inventory from R/A t \N t RA t admin 2010-03-12 15:25:43.591309-05 S 37.69 50.25 1582 3993 323 2010-03-12 15:26:28.506053-05 SH 1.000000 EA 50204-1 60065 1.000000 0.000000 12.563400 \N \N Issue STRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N t SO t admin 2010-03-12 15:26:28.506053-05 S 12.56 0.00 1584 3995 381 2010-04-02 10:32:32.826485-04 RP 1000.000000 EA 20085-1 0.000000 1000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing t \N f PO t admin 2010-04-02 10:32:32.826485-04 S 0.00 22000.00 1587 3996 381 2010-04-02 10:32:32.826485-04 SH 1000.000000 EA 40011-2 60066 1000.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2010-04-02 10:32:32.826485-04 S 22000.00 0.00 1587 3997 381 2010-06-07 10:17:56.128144-04 RP 2000.000000 EA 20086-1 0.000000 2000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2010-06-07 10:17:56.128144-04 S 0.00 44000.00 1588 3998 381 2010-06-07 10:17:56.128144-04 SH 2000.000000 EA 40012-1 60067 2000.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-06-07 10:17:56.128144-04 S 44000.00 0.00 1588 4001 306 2010-06-07 11:39:54.351982-04 RP 1500.000000 EA 20089-1 529.000000 2029.000000 1.000000 \N \N Receive Inventory from P/O for Toy Parts Inc. for item RBUMP1 t \N f PO t admin 2010-06-07 11:39:54.351982-04 S 529.00 2029.00 1591 4002 296 2010-06-07 11:39:54.351982-04 RP 1000.000000 EA 20089-2 0.000000 1000.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. for item TBOX1 t \N f PO t admin 2010-06-07 11:39:54.351982-04 S 0.00 200.00 1592 4004 305 2010-06-07 11:41:01.512124-04 RM 1000.000000 EA 10073-2 0.000000 1000.000000 2.330000 \N \N Receive Inventory CBUMP from Manufacturing t \N f WO t admin 2010-06-07 11:41:01.512124-04 S 0.00 2330.00 1594 4003 306 2010-06-07 11:41:01.512124-04 IM 1000.000000 EA 10073-2 2029.000000 1029.000000 1.000000 \N \N Material RBUMP1 Issue to Work Order t \N f WO t admin 2010-06-07 11:41:01.512124-04 S 2029.00 1029.00 1594 3970 294 2009-12-03 16:38:32.769241-05 IM 10000.000000 EA 50200-1 15057.000000 5057.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t admin 2009-12-03 16:38:32.769241-05 S 15057.00 5057.00 \N 3985 294 2010-03-12 15:04:01.080913-05 IM 1000.000000 EA 50202-1 5057.000000 4057.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t admin 2010-03-12 15:04:01.080913-05 S 5057.00 4057.00 1579 4006 296 2010-06-07 11:41:22.353372-04 IM 1000.000000 EA 10074-1 1000.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t admin 2010-06-07 11:41:22.353372-04 S 200.00 0.00 1595 4007 331 2010-06-07 11:41:22.353372-04 RM 1000.000000 EA 10074-1 0.000000 1000.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t admin 2010-06-07 11:41:22.353372-04 S 0.00 821.00 1595 4010 297 2010-06-07 11:41:36.21013-04 IM 10.000000 GL 10073-1 194.420000 184.420000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2010-06-07 11:41:36.21013-04 S 155.54 147.54 1596 4008 312 2010-06-07 11:41:36.21013-04 IM 4000.000000 EA 10073-1 944.000000 -3056.000000 1.038700 \N \N Material HUB1 Issue to Work Order t \N f WO t admin 2010-06-07 11:41:36.21013-04 S 980.53 -3174.27 1596 4009 310 2010-06-07 11:41:36.21013-04 IM 1000.000000 EA 10073-1 2829.000000 1829.000000 0.250000 \N \N Material CBODY1 Issue to Work Order t \N f WO t admin 2010-06-07 11:41:36.21013-04 S 707.25 457.25 1596 4014 308 2010-06-07 11:41:36.21013-04 RM 1000.000000 EA 10073-1 12.000000 1012.000000 8.298200 \N \N Receive Inventory STOCKCAR1 from Manufacturing t \N f WO t admin 2010-06-07 11:41:36.21013-04 S 99.59 8397.79 1596 4011 305 2010-06-07 11:41:36.21013-04 IM 1000.000000 EA 10073-1 1000.000000 0.000000 2.330000 \N \N Material CBUMP Issue to Work Order t \N f WO t admin 2010-06-07 11:41:36.21013-04 S 2330.00 0.00 1596 4012 299 2010-06-07 11:41:36.21013-04 IM 4000.000000 EA 10073-1 8120.000000 4120.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2010-06-07 11:41:36.21013-04 S 812.00 412.00 1596 4013 331 2010-06-07 11:41:36.21013-04 IM 1000.000000 EA 10073-1 1000.000000 0.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t admin 2010-06-07 11:41:36.21013-04 S 821.00 0.00 1596 4015 314 2010-06-07 11:45:16.11516-04 RP 10000.000000 SH 20091-1 680.000000 10680.000000 1.250000 \N \N Receive Inventory from P/O for Toy Parts Inc. for item SHEET1 t \N f PO t admin 2010-06-07 11:45:16.11516-04 S 850.00 13350.00 1597 4017 311 2010-06-07 11:45:35.286708-04 RM 5000.000000 EA 10075-1 0.000000 5000.000000 1.299500 \N \N Receive Inventory BRCPFN1 from Manufacturing t \N f WO t admin 2010-06-07 11:45:35.286708-04 S 0.00 6497.50 1598 4016 314 2010-06-07 11:45:35.286708-04 IM 5000.000000 SH 10075-1 10680.000000 5680.000000 1.250000 \N \N Material SHEET1 Issue to Work Order t \N f WO t admin 2010-06-07 11:45:35.286708-04 S 13350.00 7100.00 1598 4018 316 2010-06-07 11:45:35.286708-04 RB 7500.000000 LB 10075-1 4377.000000 11877.000000 1.250000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t admin 2010-06-07 11:45:35.286708-04 S 5471.25 14846.25 1599 4019 313 2010-06-07 11:45:35.286708-04 RB 10000.000000 EA 10075-1 5842.000000 15842.000000 0.634900 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t admin 2010-06-07 11:45:35.286708-04 S 3709.09 10058.09 1599 4021 311 2010-06-07 11:45:35.286708-04 IB 5000.000000 EA 10075-1 5000.000000 0.000000 1.299500 \N \N Issue Breeder Inventory by Breeder Distribution t \N f WO t admin 2010-06-07 11:45:35.286708-04 S 6497.50 0.00 1599 4020 312 2010-06-07 11:45:35.286708-04 RB 20000.000000 EA 10075-1 -3056.000000 16944.000000 1.038700 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t admin 2010-06-07 11:45:35.286708-04 S -3174.27 17599.73 1599 4022 385 2010-06-07 12:21:08.762121-04 RM 2000.000000 EA Misc. MA099089 0.000000 2000.000000 0.821000 \N \N Receive from Misc. Production for Item Number TSUB2\n t \N f WO t admin 2010-06-07 12:21:08.762121-04 S 0.00 1642.00 1600 4023 296 2010-06-07 12:21:08.762121-04 IM 2000.000000 EA Misc. MA099089 0.000000 -2000.000000 0.200000 \N \N Consumed during Misc. Production of Item Number TSUB2\n t \N f WO t admin 2010-06-07 12:21:08.762121-04 S 0.00 -400.00 1600 4025 296 2010-06-07 12:25:12.371156-04 AD 2000.000000 EA Correct Transaction -2000.000000 0.000000 0.200000 \N \N Miscellaneous Adjustment for item TBOX1\n t \N f AD t admin 2010-06-07 12:25:12.371156-04 S -400.00 0.00 1601 4026 299 2010-06-07 12:26:42.736332-04 EX -10000.000000 EA Shop Transaction 4120.000000 14120.000000 0.100000 \N \N Reverse Material Expense for item TWHEEL1\n t \N f EX t admin 2010-06-07 12:26:42.736332-04 S 412.00 1412.00 1602 4027 306 2010-06-07 12:28:50.083118-04 AD 1500.000000 EA Found at outside processor and returned 1029.000000 2529.000000 1.000000 \N \N Miscellaneous Adjustment for item RBUMP1\n t \N f AD t admin 2010-06-07 12:28:50.083118-04 S 1029.00 2529.00 1603 4041 296 2010-09-08 13:38:38.870768-04 RP 10000.000000 EA 20096-3 0.000000 10000.000000 0.200000 \N \N Receive Inventory from P/O for Toy Parts Inc. for item TBOX1 t \N f PO t admin 2010-09-08 13:38:38.870768-04 S 0.00 2000.00 1614 4043 299 2010-09-08 13:38:38.870768-04 RP 55880.000000 EA 20096-2 14120.000000 70000.000000 0.100000 \N \N Receive Inventory from P/O for Toy Parts Inc. for item TWHEEL1 t \N f PO t admin 2010-09-08 13:38:38.870768-04 S 1412.00 7000.00 1616 4042 294 2010-09-08 13:38:38.870768-04 RP 10000.000000 EA 20096-1 4057.000000 14057.000000 1.000000 \N \N Receive Inventory from P/O for Toy Parts Inc. for item TBODY1 t \N f PO t admin 2010-09-08 13:38:38.870768-04 S 4057.00 14057.00 1615 4005 298 2010-06-07 11:41:22.353372-04 IM 1100.000000 EA 10074-1 35215.000000 34115.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t admin 2010-06-07 11:41:22.353372-04 S 8803.75 8528.75 1595 4024 298 2010-06-07 12:21:08.762121-04 IM 2200.000000 EA Misc. MA099089 34115.000000 31915.000000 0.250000 \N \N Consumed during Misc. Production of Item Number TSUB2\n t \N f WO t admin 2010-06-07 12:21:08.762121-04 S 8528.75 7978.75 1600 4044 296 2010-09-08 13:42:04.133297-04 IM 10000.000000 EA 10078-1 10000.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t admin 2010-09-08 13:42:04.133297-04 S 2000.00 0.00 1617 4046 331 2010-09-08 13:42:04.133297-04 RM 10000.000000 EA 10078-1 0.000000 10000.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t admin 2010-09-08 13:42:04.133297-04 S 0.00 8210.00 1617 4047 297 2010-09-08 13:42:25.477028-04 IM 100.000000 GL 50210-1 184.420000 84.420000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2010-09-08 13:42:25.477028-04 S 147.54 67.54 1618 4049 299 2010-09-08 13:42:25.477028-04 IM 40000.000000 EA 50210-1 70000.000000 30000.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2010-09-08 13:42:25.477028-04 S 7000.00 3000.00 1618 4050 331 2010-09-08 13:42:25.477028-04 IM 10000.000000 EA 50210-1 10000.000000 0.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t admin 2010-09-08 13:42:25.477028-04 S 8210.00 0.00 1618 3434 326 2008-06-18 00:00:00-04 RL 0.000000 EA \N \N 9498.000000 9498.000000 0.005000 \N \N t \N t \N t jsmith 2008-06-18 16:01:20.652744-04 S 47.49 47.49 \N 3424 326 2008-06-18 15:53:34.66677-04 RL 0.000000 EA \N \N 9498.000000 9498.000000 0.005000 \N \N Initial Distribution t \N t \N t jsmith 2008-06-18 15:53:34.66677-04 S 47.49 47.49 \N 3440 326 2008-06-18 16:01:40.903562-04 IM 200.000000 EA 50178-1 9498.000000 9298.000000 0.005000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-18 16:01:40.903562-04 S 47.49 46.49 \N 3450 326 2008-06-18 16:35:22.571076-04 RP 2000.000000 EA 20049 9298.000000 11298.000000 0.005000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-06-18 16:35:22.571076-04 S 46.49 56.49 \N 3478 326 2008-06-19 16:54:18.965876-04 IM 2000.000000 EA 50179-1 11298.000000 9298.000000 0.005000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-19 16:54:18.965876-04 S 56.49 46.49 \N 3435 327 2008-06-18 00:00:00-04 RL 0.000000 EA \N \N 5000.000000 5000.000000 0.005000 \N \N t \N t \N t jsmith 2008-06-18 16:01:36.47812-04 S 25.00 25.00 \N 3425 327 2008-06-18 15:54:00.63398-04 RL 0.000000 EA \N \N 5000.000000 5000.000000 0.005000 \N \N Initial Distribution t \N t \N t jsmith 2008-06-18 15:54:00.63398-04 S 25.00 25.00 \N 3451 327 2008-06-18 16:35:22.571076-04 RP 3000.000000 EA 20049 5000.000000 8000.000000 0.005000 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-06-18 16:35:22.571076-04 S 25.00 40.00 \N 3493 327 2008-06-19 17:07:52.576615-04 IM 297.000000 EA 50180-1 8000.000000 7703.000000 0.005000 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-06-19 17:07:52.576615-04 S 40.00 38.52 \N 3540 327 2008-10-02 10:01:44.855331-04 IM 30.000000 EA 50185-1 7703.000000 7673.000000 0.003700 \N \N Material Issue to Work Order t \N t WO t jsmith 2008-10-02 10:01:44.855331-04 S 28.50 28.39 \N 3506 300 2008-07-01 00:00:00-04 RP 3333.000000 EA 20055 0.000000 3333.000000 2.567800 \N \N Receive Inventory from P/O t \N t PO t admin 2008-09-08 17:03:10.424312-04 S 0.00 8558.48 \N 3511 300 2008-07-15 00:00:00-04 SH 3000.000000 EA 50183-3 60031 3333.000000 333.000000 2.567800 \N \N Issue to Shipping t \N t SO t admin 2008-09-08 17:31:14.742595-04 S 8558.48 855.08 \N 3507 300 2008-08-01 00:00:00-04 RP 3333.000000 EA 20055 333.000000 3666.000000 2.567800 \N \N Receive Inventory from P/O t \N t PO t admin 2008-09-08 17:04:02.812213-04 S 855.08 9413.55 \N 3514 300 2008-08-09 00:00:00-04 SH 4000.000000 EA 50183-2 60032 3666.000000 -334.000000 2.567800 \N \N Issue to Shipping t \N t SO t admin 2008-09-08 17:49:58.697085-04 S 9413.55 -857.65 \N 3508 300 2008-09-08 17:04:19.920653-04 RP 3334.000000 EA 20055 -334.000000 3000.000000 2.567800 \N \N Receive Inventory from P/O t \N t PO t admin 2008-09-08 17:04:19.920653-04 S -857.65 7703.40 \N 3509 300 2008-09-08 17:29:06.995462-04 SH 3000.000000 EA 50183-3 60031 3000.000000 0.000000 2.567800 \N \N Issue to Shipping t \N t SO t admin 2008-09-08 17:29:06.995462-04 S 7703.40 0.00 \N 3510 300 2008-09-08 17:30:20.148641-04 RS 3000.000000 EA 50183-3 60031 0.000000 3000.000000 2.567800 \N \N Return from Shipping t \N t SO t admin 2008-09-08 17:30:20.148641-04 S 0.00 7703.40 \N 3512 300 2008-09-08 17:49:44.498604-04 SH 4000.000000 EA 50183-2 60032 3000.000000 -1000.000000 2.567800 \N \N Issue to Shipping t \N t SO t admin 2008-09-08 17:49:44.498604-04 S 7703.40 -2567.80 \N 3513 300 2008-09-08 17:49:52.30474-04 RS 4000.000000 EA 50183-2 60032 -1000.000000 3000.000000 2.567800 \N \N Return from Shipping t \N t SO t admin 2008-09-08 17:49:52.30474-04 S -2567.80 7703.40 \N 3515 300 2008-09-08 17:50:53.703238-04 SH 3000.000000 EA 50183-1 60033 3000.000000 0.000000 2.567800 \N \N Issue to Shipping t \N t SO t admin 2008-09-08 17:50:53.703238-04 S 7703.40 0.00 \N 3528 300 2008-09-24 16:33:28.624459-04 RP 25.000000 EA 20057 0.000000 25.000000 2.567800 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-09-24 16:33:28.624459-04 S 0.00 64.20 \N 3529 300 2008-09-24 16:34:02.049554-04 RP 75.000000 EA 20057 25.000000 100.000000 2.567800 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-09-24 16:34:02.049554-04 S 64.20 256.78 \N 3558 300 2008-10-02 10:29:14.019723-04 RP 1000.000000 EA 20059 100.000000 1100.000000 2.567800 \N \N Receive Inventory from P/O t \N t PO t jsmith 2008-10-02 10:29:14.019723-04 S 256.78 2824.58 \N 3562 300 2008-10-02 11:04:13.810864-04 SH 1100.000000 EA 50186-1 60037 1100.000000 0.000000 2.567800 \N \N Issue to Shipping t \N t SO t jsmith 2008-10-02 11:04:13.810864-04 S 2824.58 0.00 \N 3581 300 2009-01-12 13:14:35.396128-05 RP 1000.000000 EA 20063 0.000000 1000.000000 2.567800 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N t PO t jsmith 2009-01-12 13:14:35.396128-05 S 0.00 2567.80 \N 3584 300 2009-01-12 13:37:23.336834-05 SH 1000.000000 EA 50191-3 60040 1000.000000 0.000000 2.567800 \N \N Issue WTRUCK1 to Shipping for customer Xtreme Toys LTD t \N t SO t jsmith 2009-01-12 13:37:23.336834-05 S 2567.80 0.00 \N 3598 300 2009-06-26 16:08:11.32276-04 RM 300.000000 EA Misc. Special 0.000000 300.000000 2.567800 \N \N Receive from Misc. Production for Item Number WTRUCK1\n t \N t WO t admin 2009-06-26 16:08:11.32276-04 S 0.00 770.34 \N 3609 300 2009-06-26 16:11:35.256986-04 SH 300.000000 EA 50194-2 60043 300.000000 0.000000 2.567800 \N \N Issue WTRUCK1 to Shipping for customer Xtreme Toys LTD t \N t SO t admin 2009-06-26 16:11:35.256986-04 S 770.34 0.00 \N 3677 300 2009-09-16 14:44:42.947646-04 RM 200.000000 EA Misc. Special 0.000000 200.000000 2.567800 \N \N Receive from Misc. Production for Item Number WTRUCK1\n t \N t WO t jsmith 2009-09-16 14:44:42.947646-04 S 0.00 513.56 \N 3695 300 2009-09-21 09:20:10.73089-04 SH 200.000000 EA 99005 200.000000 0.000000 2.567800 \N \N Issue to Shipping t \N t TO t jsmith 2009-09-21 09:20:10.73089-04 S 513.56 0.00 \N 3587 294 2009-01-01 00:00:00-05 RP 1000.000000 EA 20064 2857.000000 3857.000000 1.000000 \N \N Receive Inventory from P/O for Packaging Pros LTD t \N f PO t admin 2009-06-26 15:46:19.62724-04 S 2857.00 3857.00 \N 3594 294 2009-06-26 16:07:52.029442-04 IM 300.000000 EA Misc. Special 3857.000000 3557.000000 1.000000 \N \N Consumed during Misc. Production of Item Number BTRUCK1\n t \N f WO t admin 2009-06-26 16:07:52.029442-04 S 3857.00 3557.00 \N 3599 294 2009-06-26 16:08:11.32276-04 IM 300.000000 EA Misc. Special 3557.000000 3257.000000 1.000000 \N \N Consumed during Misc. Production of Item Number WTRUCK1\n t \N f WO t admin 2009-06-26 16:08:11.32276-04 S 3557.00 3257.00 \N 3604 294 2009-06-26 16:08:38.016253-04 IM 400.000000 EA Misc. Special 3257.000000 2857.000000 1.000000 \N \N Consumed during Misc. Production of Item Number RTRUCK1\n t \N f WO t admin 2009-06-26 16:08:38.016253-04 S 3257.00 2857.00 \N 3618 294 2009-08-13 08:45:52.119528-04 RP 25000.000000 EA 20066 2857.000000 27857.000000 1.000000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-08-13 08:45:52.119528-04 S 2857.00 27857.00 \N 3627 294 2009-08-13 08:52:34.091695-04 IM 10000.000000 EA 50195-1 27857.000000 17857.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t admin 2009-08-13 08:52:34.091695-04 S 27857.00 17857.00 \N 3636 294 2009-09-16 14:02:29.104421-04 IM 200.000000 EA 10062-1 17857.000000 17657.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t jsmith 2009-09-16 14:02:29.104421-04 S 17857.00 17657.00 \N 3674 294 2009-09-16 14:43:38.956601-04 IM 200.000000 EA Misc. Special 17657.000000 17457.000000 1.000000 \N \N Consumed during Misc. Production of Item Number BTRUCK1\n t \N f WO t jsmith 2009-09-16 14:43:38.956601-04 S 17657.00 17457.00 \N 3679 294 2009-09-16 14:44:42.947646-04 IM 200.000000 EA Misc. Special 17457.000000 17257.000000 1.000000 \N \N Consumed during Misc. Production of Item Number WTRUCK1\n t \N f WO t jsmith 2009-09-16 14:44:42.947646-04 S 17457.00 17257.00 \N 3690 294 2009-09-16 14:47:11.457164-04 IM 200.000000 EA Misc. Special 17257.000000 17057.000000 1.000000 \N \N Consumed during Misc. Production of Item Number RTRUCK1\n t \N f WO t jsmith 2009-09-16 14:47:11.457164-04 S 17257.00 17057.00 \N 3788 294 2009-09-21 16:58:32.138356-04 IM 5000.000000 EA 50196-1 17057.000000 12057.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t admin 2009-09-21 16:58:32.138356-04 S 17057.00 12057.00 \N 3908 294 2009-10-13 13:37:59.957039-04 IM 5000.000000 EA 50198-1 12057.000000 7057.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:59.957039-04 S 12057.00 7057.00 \N 3962 294 2009-12-03 16:32:53.955955-05 RP 8000.000000 EA 20080 7057.000000 15057.000000 1.000000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-12-03 16:32:53.955955-05 S 7057.00 15057.00 \N 4048 294 2010-09-08 13:42:25.477028-04 IM 10000.000000 EA 50210-1 14057.000000 4057.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t admin 2010-09-08 13:42:25.477028-04 S 14057.00 4057.00 1618 3588 298 2009-01-01 00:00:00-05 RP 1000.000000 EA 20064 2185.000000 3185.000000 0.250000 \N \N Receive Inventory from P/O for Packaging Pros LTD t \N f PO t admin 2009-06-26 15:46:20.322255-04 S 546.25 796.25 \N 3591 298 2009-06-26 16:04:41.310155-04 IM 2000.000000 EA Misc. Special Build 3185.000000 1185.000000 0.250000 \N \N Consumed during Misc. Production of Item Number TKIT1\n t \N f WO t admin 2009-06-26 16:04:41.310155-04 S 796.25 296.25 \N 3617 298 2009-08-13 08:45:52.119528-04 RP 60000.000000 EA 20066 1185.000000 61185.000000 0.250000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-08-13 08:45:52.119528-04 S 296.25 15296.25 \N 3621 298 2009-08-13 08:50:25.065315-04 IM 11000.000000 EA 10061-1 61185.000000 50185.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t admin 2009-08-13 08:50:25.065315-04 S 15296.25 12546.25 \N 3633 298 2009-09-16 14:02:06.670672-04 IM 220.000000 EA 10063-1 50185.000000 49965.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t jsmith 2009-09-16 14:02:06.670672-04 S 12546.25 12491.25 \N 3647 298 2009-09-16 14:08:49.028423-04 IM 660.000000 EA Misc. Special Build 49965.000000 49305.000000 0.250000 \N \N Consumed during Misc. Production of Item Number TSUB1\n t \N f WO t jsmith 2009-09-16 14:08:49.028423-04 S 12491.25 12326.25 \N 3784 298 2009-09-21 16:58:18.356578-04 IM 5500.000000 EA 10064-1 49305.000000 43805.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t admin 2009-09-21 16:58:18.356578-04 S 12326.25 10951.25 \N 3896 298 2009-10-13 13:37:01.52835-04 IM 990.000000 EA 10068-1 43805.000000 42815.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:01.52835-04 S 10951.25 10703.75 \N 3899 298 2009-10-13 13:37:14.252675-04 IM 5500.000000 EA 10069-1 42815.000000 37315.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t jsmith 2009-10-13 13:37:14.252675-04 S 10703.75 9328.75 \N 3960 298 2009-12-03 15:22:55.488707-05 RP 10000.000000 EA 20079 37315.000000 47315.000000 0.250000 \N \N Receive Inventory from P/O for Toy Parts Inc. t \N f PO t admin 2009-12-03 15:22:55.488707-05 S 9328.75 11828.75 \N 3966 298 2009-12-03 16:38:19.24024-05 IM 11000.000000 EA 10071-1 47315.000000 36315.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t admin 2009-12-03 16:38:19.24024-05 S 11828.75 9078.75 \N 3983 298 2010-03-12 15:03:40.677631-05 IM 1100.000000 EA 10072-1 36315.000000 35215.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t admin 2010-03-12 15:03:40.677631-05 S 9078.75 8803.75 1578 4045 298 2010-09-08 13:42:04.133297-04 IM 11000.000000 EA 10078-1 31915.000000 20915.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t admin 2010-09-08 13:42:04.133297-04 S 7978.75 5228.75 1617 4032 381 2010-07-10 00:00:00-04 RP 4000.000000 EA 20093-1 2000.000000 6000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2010-09-07 16:41:51.385685-04 S 44000.00 132000.00 1607 4034 381 2010-08-04 00:00:00-04 RP 3000.000000 EA 20094-1 6000.000000 9000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2010-09-07 16:42:11.568275-04 S 132000.00 198000.00 1608 4028 381 2010-09-07 16:18:18.630866-04 RP 2000.000000 EA 20092-1 9000.000000 11000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2010-09-07 16:18:18.630866-04 S 198000.00 242000.00 1604 4029 381 2010-09-07 16:18:18.630866-04 SH 2000.000000 EA 50206-1 60070 11000.000000 9000.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-09-07 16:18:18.630866-04 S 242000.00 198000.00 1604 4030 381 2010-09-07 16:40:33.100966-04 SH 4000.000000 EA 50207-1 60071 9000.000000 5000.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-09-07 16:40:33.100966-04 S 198000.00 110000.00 1605 4031 381 2010-09-07 16:40:42.851418-04 RS 4000.000000 EA 50207-1 60071 5000.000000 9000.000000 22.000000 \N \N Return from Shipping t \N f SO t admin 2010-09-07 16:40:42.851418-04 S 110000.00 198000.00 1606 4033 381 2010-09-07 16:41:51.385685-04 SH 4000.000000 EA 50207-1 60071 9000.000000 5000.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-09-07 16:41:51.385685-04 S 198000.00 110000.00 1607 4035 381 2010-09-07 16:42:11.568275-04 SH 3000.000000 EA 50208-1 60072 5000.000000 2000.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-09-07 16:42:11.568275-04 S 110000.00 44000.00 1608 4036 293 2010-07-30 00:00:00-04 RP 5000.000000 EA 20095-1 0.000000 5000.000000 2.563400 \N \N Receive Inventory from P/O for Toy Parts Inc. for item YTRUCK1 t \N f PO t admin 2010-09-08 13:15:43.960054-04 S 0.00 12817.00 1609 4039 293 2010-07-30 00:00:00-04 SH 2500.000000 EA 50209-1 60073 5000.000000 2500.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-09-08 13:17:17.760528-04 S 12817.00 6408.50 1612 4064 296 2010-11-04 15:53:28.640849-04 RP 100.000000 EA 20100-1 0.000000 100.000000 0.200000 \N \N Receive Inventory from P/O for Packaging Pros LTD for item TBOX1 t \N f PO t admin 2010-11-04 15:53:28.640849-04 S 0.00 20.00 1624 4040 293 2010-08-01 00:00:00-04 SH 2500.000000 EA 50209-1 60074 5000.000000 2500.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-09-08 13:17:57.20414-04 S 12817.00 6408.50 1613 4037 293 2010-09-08 13:16:48.523325-04 SH 5000.000000 EA 50209-1 60073 2500.000000 -2500.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-09-08 13:16:48.523325-04 S 6408.50 -6408.50 1610 4038 293 2010-09-08 13:16:55.708375-04 RS 5000.000000 EA 50209-1 60073 -2500.000000 2500.000000 2.563400 \N \N Return from Shipping t \N f SO t admin 2010-09-08 13:16:55.708375-04 S -6408.50 6408.50 1611 4051 293 2010-09-08 13:42:25.477028-04 RM 10000.000000 EA 50210-1 2500.000000 12500.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t admin 2010-09-08 13:42:25.477028-04 S 6408.50 32042.50 1618 4052 293 2010-09-08 13:43:15.446926-04 SH 10000.000000 EA 50210-1 60075 12500.000000 2500.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2010-09-08 13:43:15.446926-04 S 32042.50 6408.50 1619 4053 306 2010-09-13 11:47:00.153359-04 IM 100.000000 EA 10079-2 2529.000000 2429.000000 1.000000 \N \N Material RBUMP1 Issue to Work Order t \N f WO t admin 2010-09-13 11:47:00.153359-04 S 2529.00 2429.00 1621 4054 305 2010-09-13 11:47:00.153359-04 RM 100.000000 EA 10079-2 0.000000 100.000000 2.330000 \N \N Receive Inventory CBUMP from Manufacturing t \N f WO t admin 2010-09-13 11:47:00.153359-04 S 0.00 233.00 1621 4055 297 2010-09-13 11:47:49.99169-04 IM 1.000000 GL 10079-1 84.420000 83.420000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2010-09-13 11:47:49.99169-04 S 67.54 66.74 1622 4056 310 2010-09-13 11:47:49.99169-04 IM 100.000000 EA 10079-1 1829.000000 1729.000000 0.250000 \N \N Material CBODY1 Issue to Work Order t \N f WO t admin 2010-09-13 11:47:49.99169-04 S 457.25 432.25 1622 4061 308 2010-09-13 11:47:49.99169-04 RM 100.000000 EA 10079-1 1012.000000 1112.000000 8.298200 \N \N Receive Inventory STOCKCAR1 from Manufacturing t \N f WO t admin 2010-09-13 11:47:49.99169-04 S 8397.79 9227.61 1622 4057 299 2010-09-13 11:47:49.99169-04 IM 400.000000 EA 10079-1 30000.000000 29600.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2010-09-13 11:47:49.99169-04 S 3000.00 2960.00 1622 4058 385 2010-09-13 11:47:49.99169-04 IM 100.000000 EA 10079-1 2000.000000 1900.000000 0.821000 \N \N Material TSUB2 Issue to Work Order t \N f WO t admin 2010-09-13 11:47:49.99169-04 S 1642.00 1559.90 1622 4059 305 2010-09-13 11:47:49.99169-04 IM 100.000000 EA 10079-1 100.000000 0.000000 2.330000 \N \N Material CBUMP Issue to Work Order t \N f WO t admin 2010-09-13 11:47:49.99169-04 S 233.00 0.00 1622 4060 312 2010-09-13 11:47:49.99169-04 IM 400.000000 EA 10079-1 16944.000000 16544.000000 1.038700 \N \N Material HUB1 Issue to Work Order t \N f WO t admin 2010-09-13 11:47:49.99169-04 S 17599.73 17184.25 1622 4062 381 2010-11-04 15:46:09.303015-04 RP 2500.000000 EA 20099-1 0.000000 2500.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2010-11-04 15:46:09.303015-04 S 0.00 55000.00 1623 4063 381 2010-11-04 15:46:09.303015-04 SH 2500.000000 EA 50212-1 60076 2500.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-11-04 15:46:09.303015-04 S 55000.00 0.00 1623 4065 298 2010-11-04 15:58:26.865018-04 IM 110.000000 EA 10081-1 20915.000000 20805.000000 0.250000 \N \N Material TINSERT1 Issue to Work Order t \N f WO t admin 2010-11-04 15:58:26.865018-04 S 5228.75 5201.25 1625 4067 331 2010-11-04 15:58:26.865018-04 RM 100.000000 EA 10081-1 0.000000 100.000000 0.821000 \N \N Receive Inventory TSUB1 from Manufacturing t \N f WO t admin 2010-11-04 15:58:26.865018-04 S 0.00 82.10 1625 4066 296 2010-11-04 15:58:26.865018-04 IM 100.000000 EA 10081-1 100.000000 0.000000 0.200000 \N \N Material TBOX1 Issue to Work Order t \N f WO t admin 2010-11-04 15:58:26.865018-04 S 20.00 0.00 1625 4069 297 2010-11-04 15:58:40.633268-04 IM 1.000000 GL 50213-1 83.420000 82.420000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2010-11-04 15:58:40.633268-04 S 66.74 65.94 1626 4068 294 2010-11-04 15:58:40.633268-04 IM 100.000000 EA 50213-1 4057.000000 3957.000000 1.000000 \N \N Material TBODY1 Issue to Work Order t \N f WO t admin 2010-11-04 15:58:40.633268-04 S 4057.00 3957.00 1626 4072 293 2010-11-04 15:58:40.633268-04 RM 100.000000 EA 50213-1 0.000000 100.000000 2.563400 \N \N Receive Inventory YTRUCK1 from Manufacturing t \N f WO t admin 2010-11-04 15:58:40.633268-04 S 0.00 256.34 1626 4070 299 2010-11-04 15:58:40.633268-04 IM 400.000000 EA 50213-1 29600.000000 29200.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2010-11-04 15:58:40.633268-04 S 2960.00 2920.00 1626 4071 331 2010-11-04 15:58:40.633268-04 IM 100.000000 EA 50213-1 100.000000 0.000000 0.821000 \N \N Material TSUB1 Issue to Work Order t \N f WO t admin 2010-11-04 15:58:40.633268-04 S 82.10 0.00 1626 4073 297 2010-11-04 16:21:01.537518-04 RL 0.000000 GL \N \N 82.420000 82.420000 0.800000 \N \N \N t \N t \N t admin 2010-11-04 16:21:01.537518-04 S 65.94 65.94 1627 4074 293 2010-11-04 16:22:27.467294-04 SH 100.000000 EA 50213-1 60077 100.000000 0.000000 2.563400 \N \N Issue YTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2010-11-04 16:22:27.467294-04 S 256.34 0.00 1628 4075 381 2010-12-30 16:26:20.151456-05 RP 1000.000000 EA 20102-1 0.000000 1000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2010-12-30 16:26:20.151456-05 S 0.00 22000.00 1629 4076 381 2010-12-30 16:26:20.151456-05 SH 1000.000000 EA 50214-1 60078 1000.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2010-12-30 16:26:20.151456-05 S 22000.00 0.00 1629 4078 381 2011-03-07 15:31:59.358339-05 RP 5000.000000 EA 20103-1 0.000000 5000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2011-03-07 15:31:59.358339-05 S 0.00 110000.00 1633 4079 381 2011-03-07 15:31:59.358339-05 SH 5000.000000 EA 50215-1 60080 5000.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2011-03-07 15:31:59.358339-05 S 110000.00 0.00 1633 4080 381 2011-04-18 07:44:56.364535-04 RP 100.000000 EA 20097-1 0.000000 100.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2011-04-18 07:44:56.364535-04 S 0.00 2200.00 1635 4081 381 2011-04-18 07:44:56.364535-04 SH 100.000000 EA 50211-1 60081 100.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2011-04-18 07:44:56.364535-04 S 2200.00 0.00 1635 4084 306 2011-04-18 07:57:06.867873-04 IM 400.000000 EA 10080-2 2429.000000 2029.000000 1.000000 \N \N Material RBUMP1 Issue to Work Order t \N f WO t admin 2011-04-18 07:57:06.867873-04 S 2429.00 2029.00 1638 4085 305 2011-04-18 07:57:06.867873-04 RM 400.000000 EA 10080-2 0.000000 400.000000 2.330000 \N \N Receive Inventory CBUMP from Manufacturing t \N f WO t admin 2011-04-18 07:57:06.867873-04 S 0.00 932.00 1638 4086 297 2011-04-18 07:57:33.949275-04 IM 10.000000 GL 10082-1 82.420000 72.420000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2011-04-18 07:57:33.949275-04 S 65.94 57.94 1639 4087 310 2011-04-18 07:57:33.949275-04 IM 1000.000000 EA 10082-1 1729.000000 729.000000 0.250000 \N \N Material CBODY1 Issue to Work Order t \N f WO t admin 2011-04-18 07:57:33.949275-04 S 432.25 182.25 1639 4092 308 2011-04-18 07:57:33.949275-04 RM 1000.000000 EA 10082-1 1112.000000 2112.000000 8.298200 \N \N Receive Inventory STOCKCAR1 from Manufacturing t \N f WO t admin 2011-04-18 07:57:33.949275-04 S 9227.61 17525.81 1639 4088 299 2011-04-18 07:57:33.949275-04 IM 4000.000000 EA 10082-1 29200.000000 25200.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2011-04-18 07:57:33.949275-04 S 2920.00 2520.00 1639 4089 305 2011-04-18 07:57:33.949275-04 IM 1000.000000 EA 10082-1 400.000000 -600.000000 2.330000 \N \N Material CBUMP Issue to Work Order t \N f WO t admin 2011-04-18 07:57:33.949275-04 S 932.00 -1398.00 1639 4090 385 2011-04-18 07:57:33.949275-04 IM 1000.000000 EA 10082-1 1900.000000 900.000000 0.821000 \N \N Material TSUB2 Issue to Work Order t \N f WO t admin 2011-04-18 07:57:33.949275-04 S 1559.90 738.90 1639 4091 312 2011-04-18 07:57:33.949275-04 IM 4000.000000 EA 10082-1 16544.000000 12544.000000 1.038700 \N \N Material HUB1 Issue to Work Order t \N f WO t admin 2011-04-18 07:57:33.949275-04 S 17184.25 13029.45 1639 4093 306 2011-04-18 07:59:26.856376-04 IM 1000.000000 EA 10082-2 2029.000000 1029.000000 1.000000 \N \N Material RBUMP1 Issue to Work Order t \N f WO t admin 2011-04-18 07:59:26.856376-04 S 2029.00 1029.00 1640 4094 305 2011-04-18 07:59:26.856376-04 RM 1000.000000 EA 10082-2 -600.000000 400.000000 2.330000 \N \N Receive Inventory CBUMP from Manufacturing t \N f WO t admin 2011-04-18 07:59:26.856376-04 S -1398.00 932.00 1640 4095 381 2011-04-18 08:24:17.311443-04 RP 1000.000000 EA 20104-1 0.000000 1000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2011-04-18 08:24:17.311443-04 S 0.00 22000.00 1641 4096 381 2011-04-18 08:24:17.311443-04 SH 1000.000000 EA 50217-2 60083 1000.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Vienna Collectables t \N f SO t admin 2011-04-18 08:24:17.311443-04 S 22000.00 0.00 1641 4097 308 2011-04-18 08:25:45.170942-04 SH 1000.000000 EA 50217-1 60084 2112.000000 1112.000000 8.298200 \N \N Issue STOCKCAR1 to Shipping for customer Vienna Collectables t \N f SO t admin 2011-04-18 08:25:45.170942-04 S 17525.81 9227.61 1642 4098 297 2011-04-18 13:29:34.810123-04 IM 4.000000 GL 10080-1 72.420000 68.420000 0.800000 \N \N Material YPAINT1 Issue to Work Order t \N t WO t admin 2011-04-18 13:29:34.810123-04 S 57.94 54.74 1646 4103 310 2011-04-18 13:29:48.048132-04 IM 400.000000 EA 10080-1 729.000000 329.000000 0.250000 \N \N Material CBODY1 Issue to Work Order t \N f WO t admin 2011-04-18 13:29:48.048132-04 S 182.25 82.25 1647 4102 299 2011-04-18 13:29:48.048132-04 IM 1600.000000 EA 10080-1 25200.000000 23600.000000 0.100000 \N \N Material TWHEEL1 Issue to Work Order t \N f WO t admin 2011-04-18 13:29:48.048132-04 S 2520.00 2360.00 1647 4101 385 2011-04-18 13:29:48.048132-04 IM 400.000000 EA 10080-1 900.000000 500.000000 0.821000 \N \N Material TSUB2 Issue to Work Order t \N f WO t admin 2011-04-18 13:29:48.048132-04 S 738.90 410.50 1647 4100 312 2011-04-18 13:29:48.048132-04 IM 1600.000000 EA 10080-1 12544.000000 10944.000000 1.038700 \N \N Material HUB1 Issue to Work Order t \N f WO t admin 2011-04-18 13:29:48.048132-04 S 13029.45 11367.53 1647 4099 305 2011-04-18 13:29:48.048132-04 IM 400.000000 EA 10080-1 400.000000 0.000000 2.330000 \N \N Material CBUMP Issue to Work Order t \N f WO t admin 2011-04-18 13:29:48.048132-04 S 932.00 0.00 1647 4104 308 2011-04-18 13:30:01.943607-04 RM 400.000000 EA 10080-1 1112.000000 1512.000000 8.298200 \N \N Receive Inventory STOCKCAR1 from Manufacturing t \N f WO t admin 2011-04-18 13:30:01.943607-04 S 9227.61 12546.89 1648 4105 381 2011-06-03 16:14:35.243541-04 RP 3000.000000 EA 20107-1 0.000000 3000.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2011-06-03 16:14:35.243541-04 S 0.00 66000.00 1650 4106 381 2011-06-03 16:14:35.243541-04 SH 3000.000000 EA 50219-1 60085 3000.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Tremendous Toys Incorporated t \N f SO t admin 2011-06-03 16:14:35.243541-04 S 66000.00 0.00 1650 4107 381 2011-06-03 16:26:54.335808-04 RP 3500.000000 EA 20108-1 0.000000 3500.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2011-06-03 16:26:54.335808-04 S 0.00 77000.00 1652 4108 381 2011-06-03 16:26:54.335808-04 SH 3500.000000 EA 50220-1 60086 3500.000000 0.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2011-06-03 16:26:54.335808-04 S 77000.00 0.00 1652 4109 381 2011-06-03 16:28:42.031003-04 RP -3500.000000 EA 20108 0.000000 -3500.000000 22.000000 \N \N Return Inventory to P/O t \N f PO t admin 2011-06-03 16:28:42.031003-04 S 0.00 -77000.00 1653 4110 381 2011-05-14 00:00:00-04 RP 3500.000000 EA 20108-1 -3500.000000 0.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2011-06-03 16:30:08.321477-04 S -77000.00 0.00 1654 4111 381 2011-06-03 16:30:08.321477-04 SH 3500.000000 EA 50220-1 60087 0.000000 -3500.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2011-06-03 16:30:08.321477-04 S 0.00 -77000.00 1654 4112 381 2011-05-19 00:00:00-04 RP 5000.000000 EA 20109-1 -3500.000000 1500.000000 22.000000 \N \N Receive Inventory from P/O for Diamond Manufacturing for item DTRUCK1 t \N f PO t admin 2011-06-03 16:36:34.56468-04 S -77000.00 33000.00 1656 4113 381 2011-06-03 16:36:34.56468-04 SH 5000.000000 EA 50221-1 60088 1500.000000 -3500.000000 22.000000 \N \N Issue DTRUCK1 to Shipping for customer Xtreme Toys LTD t \N f SO t admin 2011-06-03 16:36:34.56468-04 S 33000.00 -77000.00 1656 4114 381 2011-06-03 16:53:11.213952-04 AD 3500.000000 EA Adjust for return -3500.000000 0.000000 22.000000 \N \N Miscellaneous Adjustment for item DTRUCK1\n t \N f AD t admin 2011-06-03 16:53:11.213952-04 S -77000.00 0.00 1658 4115 314 2011-06-03 16:55:14.612479-04 IM 500.000000 SH 10084-1 5680.000000 5180.000000 1.250000 \N \N Material SHEET1 Issue to Work Order t \N f WO t admin 2011-06-03 16:55:14.612479-04 S 7100.00 6475.00 1659 4116 311 2011-06-03 16:55:14.612479-04 RM 500.000000 EA 10084-1 0.000000 500.000000 1.299500 \N \N Receive Inventory BRCPFN1 from Manufacturing t \N f WO t admin 2011-06-03 16:55:14.612479-04 S 0.00 649.75 1659 4120 311 2011-06-03 16:55:14.612479-04 IB 500.000000 EA 10084-1 500.000000 0.000000 1.299500 \N \N Issue Breeder Inventory by Breeder Distribution t \N f WO t admin 2011-06-03 16:55:14.612479-04 S 649.75 0.00 1660 4117 316 2011-06-03 16:55:14.612479-04 RB 750.000000 LB 10084-1 11877.000000 12627.000000 1.250000 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t admin 2011-06-03 16:55:14.612479-04 S 14846.25 15783.75 1660 4118 313 2011-06-03 16:55:14.612479-04 RB 1000.000000 EA 10084-1 15842.000000 16842.000000 0.634900 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t admin 2011-06-03 16:55:14.612479-04 S 10058.09 10692.99 1660 4119 312 2011-06-03 16:55:14.612479-04 RB 2000.000000 EA 10084-1 10944.000000 12944.000000 1.038700 \N \N Receive Inventory from Breeder Manufacturing t \N f WO t admin 2011-06-03 16:55:14.612479-04 S 11367.53 13444.93 1660 \. -- -- Data for Name: invhistexpcat; Type: TABLE DATA; Schema: public; Owner: admin -- COPY invhistexpcat (invhistexpcat_id, invhistexpcat_invhist_id, invhistexpcat_expcat_id) FROM stdin; \. -- -- Data for Name: ipsass; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ipsass (ipsass_id, ipsass_ipshead_id, ipsass_cust_id, ipsass_custtype_id, ipsass_custtype_pattern, ipsass_shipto_id, ipsass_shipto_pattern) FROM stdin; 1 59 -1 18 -1 \N 2 62 -1 -1 .* -1 3 63 -1 -1 .* -1 4 64 -1 -1 .* -1 5 65 97 -1 -1 \. -- -- Data for Name: ipsfreight; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ipsfreight (ipsfreight_id, ipsfreight_ipshead_id, ipsfreight_qtybreak, ipsfreight_price, ipsfreight_type, ipsfreight_warehous_id, ipsfreight_shipzone_id, ipsfreight_freightclass_id, ipsfreight_shipvia) FROM stdin; 4 65 0 1 P \N \N 1 \N 2 63 0 10 F \N \N 2 \N 3 64 0 7.5 F \N \N 3 \N 1 62 0 0.5 P \N \N 1 \N \. -- -- Data for Name: ipshead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ipshead (ipshead_id, ipshead_name, ipshead_descrip, ipshead_effective, ipshead_expires, ipshead_curr_id, ipshead_updated) FROM stdin; 59 BASE Base Price Schedule 1970-01-01 2100-01-01 1 2006-05-01 65 FREIGHT-BULK-XTRM Freight, Bulk Rate for XTRM 1970-01-01 2100-01-01 1 2009-01-05 63 FREIGHT-FLAT1 Flat Freight Type 1 1970-01-01 2100-01-01 1 2009-01-05 64 FREIGHT-FLAT2 Flat Freight Type 2 1970-01-01 2100-01-01 1 2009-01-05 62 FREIGHT-BULK Freight Pricing for Bulk Items 1970-01-01 2100-01-01 1 2009-01-05 \. -- -- Data for Name: ipsitemchar; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ipsitemchar (ipsitemchar_id, ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value, ipsitemchar_price) FROM stdin; \. -- -- Data for Name: ipsiteminfo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ipsiteminfo (ipsitem_id, ipsitem_ipshead_id, ipsitem_item_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_prodcat_id, ipsitem_type, ipsitem_warehous_id) FROM stdin; 76 59 300 0.000000 9.8000 4 4 0.000000 0.0000 \N N \N 77 59 300 100.000000 9.5000 4 4 0.000000 0.0000 \N N \N 78 59 300 500.000000 9.2500 4 4 0.000000 0.0000 \N N \N \. -- -- Data for Name: ipsprodcat_bak; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ipsprodcat_bak (ipsprodcat_id, ipsprodcat_ipshead_id, ipsprodcat_prodcat_id, ipsprodcat_qtybreak, ipsprodcat_discntprcnt, ipsprodcat_fixedamtdiscount) FROM stdin; \. -- -- Data for Name: item; Type: TABLE DATA; Schema: public; Owner: admin -- COPY item (item_id, item_number, item_descrip1, item_descrip2, item_classcode_id, item_picklist, item_comments, item_sold, item_fractional, item_active, item_type, item_prodweight, item_packweight, item_prodcat_id, item_exclusive, item_listprice, item_config, item_extdescrip, item_upccode, item_maxcost, item_inv_uom_id, item_price_uom_id, item_warrdays, item_freightclass_id, item_tax_recoverable, item_listcost) FROM stdin; 309 PHKIT Truck Kit Type 1 Truck Kit 35 f f f f F 0.00 0.00 -1 f 0.0000 f 2.000000 4 4 0 \N t 2.000000 323 SHEET1 Sheet Metal Type 1 Cars - Bumpers and Fenders 37 t f t t P 0.00 0.00 -1 f 0.0000 f 0.000000 9 9 0 \N t 0.000000 314 RBUMP1 Tough Truck Body Type 1 Tough Truck Body Type 1 37 t f f t P 0.75 0.12 28 t 0.0000 f 1.500000 4 4 0 \N t 1.500000 332 TCOAT-G Gloss Coat Finish 37 t f f t P 0.00 0.00 -1 f 0.0000 f 15.000000 8 8 0 \N t 15.000000 306 TINSERT1 Packaging Insert Type 1 Insert Type 1 37 t f f t P 0.02 0.01 28 t 0.0000 f 0.100000 4 4 0 \N t 0.100000 329 TDECAL-F FASCAR Racing Decal 37 t f f t P 0.00 0.00 -1 f 0.0000 f 0.000000 4 4 0 \N t 0.000000 330 TDECAL-P PUSCH Racing Decal 37 t f f t P 0.00 0.00 -1 f 0.0000 f 0.000000 4 4 0 \N t 0.000000 325 YPAINT2 Yellow Neon Paint 2 Yellow Paint Type 2 37 t t t t P 8.00 0.50 28 t 0.0000 f 2.000000 8 8 0 \N t 2.000000 305 TBOX1 Product Box Type 1 Product Box 37 t t f t P 0.20 0.00 28 t 0.0000 f 0.100000 4 4 0 \N t 0.100000 333 KCAR1 Kit Car Type 1 Buld Your Own 33 f t f t K 3.50 0.25 28 f 30.0000 f 1234-4567 5.000000 4 4 0 \N t 5.000000 313 CBUMP Chromed Bumper Chromed Through Outside Processor 37 t This item is the result of sending an RBUMP outside for Chroming. t f t M 0.20 0.08 28 t 0.0000 f 0.000000 4 4 0 \N t 0.000000 301 YPAINT1 Yellow Paint 1 Yellow Paint Type 1 37 t t t t P 8.00 0.50 28 t 0.0000 f 2.000000 8 8 0 1 t 2.000000 302 TBODY1 Tough Truck Body Type 1 Tough Truck Body Type 1 37 t f f t P 0.75 0.12 28 t 0.0000 f 1.500000 4 4 0 1 t 1.500000 304 TKIT1 Truck Kit Type 1 Truck Kit 37 t f f f M 0.25 0.10 -1 t 0.0000 f 2.000000 4 4 0 \N t 2.000000 342 HOTEL Hotel travel expense 39 f t f t R 0.00 0.00 33 f 0.0000 f 0.000000 4 4 0 \N f 0.000000 310 RTRUCK1 Red Tough Truck Collectors 35 t t f t M 3.50 0.25 28 f 10.9900 f 1234-4567 5.000000 4 4 0 1 t 5.000000 307 WTRUCK1 White Tough Truck Collectors 35 t t f t M 3.50 0.25 28 f 10.9900 f 8765-4321 5.000000 4 4 0 1 t 5.000000 328 STRUCK1 Collectors Autographed Signed Truck Type 2 35 t t f t M 3.50 0.25 28 f 99.0000 f 1234-4567 5.000000 4 4 365 3 t 5.000000 334 TSUB1 Packaging Subassembly Type 1 Truck Kit 37 t f f t M 0.25 0.10 -1 t 0.0000 f 2.000000 4 4 0 \N t 2.000000 303 TWHEEL1 Truck Wheel Type 1 Truck Wheel Type 1 37 t t f t P 0.10 0.01 28 t 0.0000 f 0.500000 4 4 0 \N t 0.500000 336 BPAINT1 Blue Paint Type Paint 1 Blue Paint Type 1 37 t t t t P 8.00 0.50 28 t 0.0000 f 2.000000 8 8 0 \N t 2.000000 335 RPAINT1 Red Paint Type Paint 1 Red Paint Type 1 37 t t t t P 8.00 0.50 28 t 0.0000 f 2.000000 8 8 0 \N t 2.000000 337 WPAINT1 White Paint Type Paint 1 White Paint Type 1 37 t t t t P 8.00 0.50 28 t 0.0000 f 2.000000 8 8 0 \N t 2.000000 311 BTRUCK1 Blue Tough Truck Collectors 35 t t f t M 3.50 0.25 28 f 10.9900 f 1234-4567 5.000000 4 4 0 1 t 5.000000 317 CBODY1 Car Body Type 1 Car Metal Body 37 t t f t P 0.75 0.12 28 t 0.0000 f 1.500000 4 4 0 \N t 1.500000 327 REPAIRT1 Repair Type 1 - Truck Job Item 36 f t f t M 1.00 0.25 28 f 50.0000 f 0.000000 4 4 0 \N t 0.000000 331 CTRUCK1 Custom Tough Truck Type 1 35 f t f t M 3.50 0.25 28 f 30.0000 t 1234-4567 15.000000 4 4 0 3 t 15.000000 341 DTRUCK1 Diamond Special Edition Truck 35 t t f t P 3.00 0.00 28 f 55.0000 f 0.000000 4 4 0 \N f 0.000000 300 YTRUCK1 Yellow Tough Truck Truck Type 1 35 t t f t M 3.50 0.25 28 f 10.9900 f 1234-4567 5.000000 4 4 0 1 t 5.000000 344 TBOX2 Product Box Type 2 Product Box 37 t t f t P 0.30 0.00 28 t 0.0000 f 0.100000 4 4 0 \N t 0.100000 316 STOCKCAR1 Classic Race Car With Logo Car Type 1 33 t t f t M 3.50 0.25 28 f 45.0000 f 1234-4567 5.000000 4 4 0 2 t 5.000000 345 TSUB2 Packaging Subassembly Type 2 Truck Kit 37 t f f t M 0.25 0.10 -1 t 0.0000 f 2.000000 4 4 0 \N t 2.000000 315 CHROMING Outside Process - Chroming Chrome Plating 38 f Outside Process to plate items such as the RBUMP1 and other unfinished metal items. f f t O 0.00 0.00 -1 f 0.0000 f 0.000000 4 4 0 \N t 0.000000 340 PROFSVCS Professional Services 39 f t t t R 0.00 0.00 33 f 225.0000 f 0.000000 11 11 0 \N f 0.000000 324 SHSCRAP1 Scrap Sheet Metal Breeder - By-Product 38 t t f f P 1.00 0.05 28 f 1.2500 f 0.000000 7 7 0 \N t 0.000000 343 MILEAGE Automobile mileage - travel expense 39 f t t t R 0.00 0.00 33 f 0.5100 f 0.000000 12 12 0 \N t 0.000000 322 FEN1 Fender Type 1 Cars 37 t t f t P 0.10 0.01 28 t 0.0000 f 0.000000 4 4 0 \N t 0.000000 321 HUB1 Hubcap Type 1 Cars 37 t t f t P 0.10 0.01 28 t 0.0000 f 0.000000 4 4 0 \N t 0.000000 319 BRCPFN1 Inactive Item Type 1 - Cars 38 f f f f P 0.00 0.00 -1 f 0.0000 f 0.000000 4 4 0 \N t 0.000000 312 COLLECTORS-LINE Collectors Product Family 38 f f f f P 0.00 0.00 -1 f 0.0000 f 0.000000 4 4 0 \N t 0.000000 \. -- -- Data for Name: itemalias; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemalias (itemalias_id, itemalias_item_id, itemalias_number, itemalias_comments, itemalias_usedescrip, itemalias_descrip1, itemalias_descrip2) FROM stdin; \. -- -- Data for Name: itemcost; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemcost (itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id) FROM stdin; 362 324 21 f 1.250000 2008-06-20 0.000000 2011-06-15 1 353 323 3 f 1.250000 2011-06-15 1.250000 2010-06-07 1 341 314 3 f 1.000000 2011-06-15 1.000000 2010-06-07 1 383 332 3 f 12.000000 2011-06-15 12.000000 2008-06-12 1 302 306 3 f 0.250000 2011-06-15 0.250000 2009-12-03 1 375 329 3 f 0.002500 2011-06-15 0.002500 2008-06-18 1 376 330 3 f 0.002500 2011-06-15 0.002500 2008-06-18 1 354 325 3 f 9.000000 2011-06-15 9.000000 2008-06-12 1 355 325 21 f 1.000000 2011-06-15 1.000000 2008-06-12 1 324 305 3 f 0.211300 2011-06-15 0.211300 2010-11-04 1 304 301 3 f 0.600000 2011-06-15 0.600000 2009-12-03 1 305 301 21 f 0.200000 2011-06-15 0.200000 2009-12-03 1 300 302 3 f 1.000000 2011-06-15 1.000000 2010-09-08 1 418 309 3 t 0.711300 2011-06-15 0.711300 2011-06-15 1 422 304 3 t 0.711300 2011-06-15 0.711300 2011-06-15 1 374 328 21 f 10.000000 2011-06-15 10.000000 2008-03-04 1 423 334 3 t 0.711300 2011-06-15 0.711300 2011-06-15 1 325 303 3 f 0.100000 2011-06-15 0.100000 2010-09-08 1 425 328 3 t 2.117300 2011-06-15 2.117300 2011-06-15 1 426 328 21 t 0.002000 2011-06-15 0.002000 2011-06-15 1 390 336 21 f 0.080000 2011-06-15 0.080000 2009-09-16 1 389 336 3 f 0.980000 2011-06-15 0.980000 2009-09-22 1 388 335 21 f 0.080000 2011-06-15 0.080000 2009-09-16 1 387 335 3 f 0.970000 2011-06-15 0.970000 2009-09-22 1 392 337 21 f 0.080000 2011-06-15 0.080000 2009-09-16 1 391 337 3 f 0.990000 2011-06-15 0.990000 2009-09-22 1 352 317 3 f 0.250000 2011-06-15 0.250000 2008-04-04 1 429 327 3 t 0.400000 2011-06-15 0.400000 2011-06-15 1 420 331 3 t 14.219800 2011-06-15 14.219800 2011-06-15 1 421 331 21 t 0.012000 2011-06-15 0.012000 2011-06-15 1 393 341 3 f 22.000000 2011-06-15 22.000000 2011-06-03 1 427 300 3 t 2.117300 2011-06-15 2.117300 2011-06-15 1 428 300 21 t 0.002000 2011-06-15 0.002000 2011-06-15 1 394 344 3 f 0.200000 2011-06-15 0.200000 2010-06-07 1 424 345 3 t 0.700000 2011-06-15 0.700000 2011-06-15 1 351 315 3 f 1.000000 2011-06-15 1.000000 2011-04-18 1 419 313 3 t 2.000000 2011-06-15 2.000000 2011-06-15 1 \. -- -- Data for Name: itemgrp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemgrp (itemgrp_id, itemgrp_name, itemgrp_descrip) FROM stdin; 22 Collectors Line (MPS) Collectors Line Items (MPS) 23 Make To Order Make To Order Products 21 Breeder Items Breeder Items and Parents 20 Outside Processing Outside Process Items And Parents 24 YTRUCK1 YTRUCK1 ITEMS \. -- -- Data for Name: itemgrpitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemgrpitem (itemgrpitem_id, itemgrpitem_itemgrp_id, itemgrpitem_item_id) FROM stdin; 113 20 314 114 20 313 115 20 315 116 20 -1 120 21 319 121 21 323 122 21 322 123 21 321 124 21 316 125 22 -1 126 22 311 127 22 310 128 22 307 129 23 300 130 21 324 131 24 302 135 24 -1 136 24 301 137 24 303 139 24 305 140 24 306 141 20 316 142 24 334 143 24 300 \. -- -- Data for Name: itemloc; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemloc (itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_qty, itemloc_expiration, itemloc_consolflag, itemloc_ls_id, itemloc_warrpurc) FROM stdin; 614 326 122 2500.000000 2100-01-01 f \N \N 615 327 122 500.000000 2100-01-01 f \N \N 617 326 124 6798.000000 2100-01-01 f \N \N 605 327 123 7173.000000 2100-01-01 f \N \N 667 323 124 3.000000 2100-01-01 f \N \N \. -- -- Data for Name: itemlocdist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemlocdist (itemlocdist_id, itemlocdist_itemlocdist_id, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_qty, itemlocdist_series, itemlocdist_invhist_id, itemlocdist_itemsite_id, itemlocdist_reqlotserial, itemlocdist_flush, itemlocdist_expiration, itemlocdist_distlotserial, itemlocdist_warranty, itemlocdist_ls_id, itemlocdist_order_type, itemlocdist_order_id) FROM stdin; \. -- -- Data for Name: itemlocpost; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemlocpost (itemlocpost_id, itemlocpost_itemlocseries, itemlocpost_glseq) FROM stdin; 120 1575 -3 \. -- -- Data for Name: itemsite; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemsite (itemsite_id, itemsite_item_id, itemsite_warehous_id, itemsite_qtyonhand, itemsite_reorderlevel, itemsite_ordertoqty, itemsite_cyclecountfreq, itemsite_datelastcount, itemsite_datelastused, itemsite_loccntrl, itemsite_safetystock, itemsite_minordqty, itemsite_multordqty, itemsite_leadtime, itemsite_abcclass, itemsite_issuemethod, itemsite_controlmethod, itemsite_active, itemsite_plancode_id, itemsite_costcat_id, itemsite_eventfence, itemsite_sold, itemsite_stocked, itemsite_freeze, itemsite_location_id, itemsite_useparams, itemsite_useparamsmanual, itemsite_soldranking, itemsite_createpr, itemsite_location, itemsite_location_comments, itemsite_notes, itemsite_perishable, itemsite_nnqoh, itemsite_autoabcclass, itemsite_ordergroup, itemsite_disallowblankwip, itemsite_maxordqty, itemsite_mps_timefence, itemsite_createwo, itemsite_warrpurc, itemsite_autoreg, itemsite_costmethod, itemsite_value, itemsite_ordergroup_first, itemsite_supply_itemsite_id, itemsite_planning_type, itemsite_wosupply, itemsite_posupply, itemsite_lsseq_id, itemsite_cosdefault, itemsite_createsopr, itemsite_createsopo, itemsite_dropship, itemsite_recvlocation_id, itemsite_issuelocation_id, itemsite_location_dist, itemsite_recvlocation_dist, itemsite_issuelocation_dist) FROM stdin; 330 333 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 0 A \N N t 27 30 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f N 0.00 t \N N f f \N \N f f f -1 -1 f f f 301 309 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 0 A \N R f 26 30 10 f f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 0.00 t \N M t t \N \N f f f -1 -1 f f f 295 304 35 0.000000 0.000000 0.000000 30 \N 2009-08-13 f 0.000000 100.000000 100.000000 1 A \N R f 26 33 10 f f f -1 t t 1 f KT-01-01-01 f 0.000000 t 7 f 10000.000000 0 f f f S 0.00 t \N M t t \N \N f f f -1 -1 f f f 302 310 35 0.000000 0.000000 0.000000 0 2009-09-21 2009-09-21 f 0.000000 0.000000 0.000000 5 A \N R t 25 30 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 0.00 t \N S t t \N \N f f f -1 -1 f f f 303 311 35 0.000000 0.000000 0.000000 0 \N 2009-09-25 f 0.000000 0.000000 0.000000 5 A \N R t 25 30 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 0.00 t \N S t t \N \N f f f -1 -1 f f f 300 307 35 0.000000 0.000000 0.000000 30 \N 2009-09-21 t 0.000000 0.000000 0.000000 5 A \N R t 25 30 10 t f f 122 t t 1 f 01-01-01-01 f 0.000000 f 7 f 0.000000 0 f f f S 0.00 t \N S t t \N \N f f f -1 -1 f f f 307 315 35 0.000000 0.000000 0.000000 0 \N 2007-05-30 f 0.000000 0.000000 0.000000 3 A \N N t 27 33 10 f f f -1 f f 1 t f 0.000000 f 1 f 0.000000 0 f f f N 0.00 t \N N f t \N \N t f f -1 -1 f f f 380 340 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 0 A \N N t 27 30 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f N 0.00 f \N N t t \N \N f f f -1 -1 f f f 322 327 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 5 A \N R t 27 30 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 t f f J 0.00 t \N N t t \N \N f f f -1 -1 f f f 383 343 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 0 A \N N t 27 35 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f N 0.00 f \N N t t \N \N f f f -1 -1 f f f 328 331 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 0 A \N R t 27 30 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 t f f J 0.00 t \N N t t \N \N f f f -1 -1 f f f 331 334 35 0.000000 0.000000 0.000000 0 \N 2010-11-04 f 0.000000 100.000000 100.000000 1 A \N R t 26 33 10 f f f -1 t f 1 f f 0.000000 f 7 f 10000.000000 0 f f f S 0.00 t \N M t f \N \N f f f -1 -1 f f f 293 300 35 0.000000 0.000000 0.000000 30 \N 2010-11-04 f 0.000000 100.000000 100.000000 4 A \N R t 26 30 10 t f f -1 t t 1 f FG-01-01-01 f 0.000000 t 7 f 10000.000000 0 t f f S 0.00 t \N M t t \N \N f f f -1 -1 f f f 316 324 35 12627.000000 0.000000 0.000000 30 \N 2011-06-03 f 0.000000 0.000000 0.000000 1 A \N R f 27 33 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 7 f f f S 15783.75 t \N N t t \N \N f f f -1 -1 f f f 311 319 35 0.000000 0.000000 0.000000 0 \N 2011-06-03 f 0.000000 0.000000 0.000000 0 A \N R f 27 30 10 f f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 0.00 t \N N t t \N \N f f f -1 -1 f f f 381 341 35 0.000000 0.000000 0.000000 0 \N 2011-06-03 f 0.000000 0.000000 0.000000 4 A \N R t 27 30 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 0.00 t \N N f t \N \N f t t -1 -1 f f f 382 342 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 0 A \N N t 27 35 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f N 0.00 f \N N t t \N \N f f f -1 -1 f f f 384 344 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 3 A \N R t 26 33 10 f f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 0.00 t \N N f t \N \N f f f -1 -1 f f f 314 323 35 5180.000000 25.000000 100.000000 30 2007-05-30 2011-06-03 f 0.000000 0.000000 10.000000 10 A \N R t 26 33 10 f t f -1 t t 1 f f 0.000000 t 7 f 0.000000 0 f f f S 6475.00 t \N M t t \N \N f f f -1 -1 f f f 305 313 35 0.000000 0.000000 0.000000 30 \N 2011-04-18 f 0.000000 0.000000 0.000000 3 A \N R t 28 33 10 t f f -1 f f 1 f f 0.000000 f 7 f 0.000000 7 f f f S 0.00 t \N N t t \N \N f f f -1 -1 f f f 296 305 35 0.000000 0.000000 0.000000 30 2007-05-30 2010-11-04 f 0.000000 100.000000 100.000000 1 A \N R t 26 33 10 t f f -1 t t 1 f RM-01-01-03 f 0.000000 t 7 f 10000.000000 0 f f f S 0.00 t \N M t t \N \N f f f -1 -1 f f f 306 314 35 1029.000000 100.000000 1000.000000 30 \N 2011-04-18 f 0.000000 0.000000 0.000000 3 A \N R t 26 33 10 f f f -1 t t 1 f f 0.000000 f 7 f 0.000000 0 f f f S 1029.00 t \N M t t \N \N f f f -1 -1 f f f 313 322 35 16842.000000 0.000000 0.000000 0 \N 2011-06-03 f 0.000000 0.000000 0.000000 1 A \N R t 27 33 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 10692.99 t \N N t t \N \N f f f -1 -1 f f f 312 321 35 12944.000000 0.000000 0.000000 0 \N 2011-06-03 f 0.000000 0.000000 0.000000 1 A \N R t 26 33 10 t f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 13444.93 t \N N t t \N \N f f f -1 -1 f f f 298 306 35 20805.000000 100.000000 0.000000 30 2006-12-28 2010-11-04 f 0.000000 100.000000 100.000000 1 A \N R t 26 33 10 f t f -1 t t 1 f RM-01-01-03 f 0.000000 t 7 f 10000.000000 0 f f f S 5201.25 t \N M t t \N \N f f f -1 -1 f f f 329 332 35 195.000000 10.000000 100.000000 0 \N 2008-10-02 f 0.000000 0.000000 5.000000 5 A \N R t 26 33 10 f t f -1 t t 1 f f 0.000000 f 7 f 0.000000 0 f f f S 2340.00 t \N M t t \N \N f f f -1 -1 f f f 326 329 35 9298.000000 1000.000000 10000.000000 0 \N 2008-06-19 t 0.000000 0.000000 100.000000 7 A \N R t 26 33 10 f t f 124 t t 1 f 01-01-01-03 f 0.000000 f 7 f 0.000000 0 f f f S 23.25 t \N M t t \N \N f f f -1 -1 f f f 327 330 35 7673.000000 500.000000 5000.000000 0 \N 2008-10-02 t 0.000000 0.000000 100.000000 7 A \N R t 26 33 10 t t f 123 t t 1 f 01-01-01-02 f 0.000000 f 1 f 0.000000 0 f f f S 19.18 t \N M t t \N \N f f f -1 -1 f f f 318 325 35 48.740000 10.000000 50.000000 30 \N 2008-10-02 f 0.000000 20.000000 10.000000 7 A \N R t 26 33 10 t t f -1 t t 1 f f 0.000000 f 7 f 0.000000 7 f f f S 487.40 t \N M t t \N \N f f f -1 -1 f f f 297 301 35 68.420000 10.000000 100.000000 30 \N 2011-04-18 f 0.000000 10.000000 1.000000 1 A \N R t 26 33 10 t t f -1 t t 1 f RM-01-01-02 f 0.000000 t 7 f 1000.000000 0 f f f S 54.74 t \N M t t \N \N f f f -1 -1 f f f 294 302 35 3957.000000 100.000000 1000.000000 30 2006-12-28 2010-11-04 f 0.000000 100.000000 100.000000 1 A \N R t 26 33 10 f t f -1 t t 1 f RM-01-01-02 f 0.000000 f 7 f 10000.000000 0 f f f S 3957.00 t \N M t t \N \N f f f -1 -1 f f f 299 303 35 23600.000000 400.000000 4000.000000 30 \N 2011-04-18 f 0.000000 100.000000 4.000000 1 A \N R t 26 33 10 t t f -1 t t 1 f RM-01-01-03 f 0.000000 t 7 f 10000.000000 0 f f f S 2360.00 t \N M f t \N \N f f f -1 -1 f f f 308 316 35 1512.000000 10.000000 0.000000 0 \N 2011-04-18 f 0.000000 0.000000 10.000000 1 A \N R t 26 30 10 t f f -1 t f 1 f f 0.000000 f 7 f 0.000000 14 f f f S 5077.30 t \N M t t \N \N f f f -1 -1 f f f 310 317 35 329.000000 100.000000 1000.000000 0 2007-05-30 2011-04-18 f 0.000000 0.000000 0.000000 5 A \N R t 26 33 10 t t f -1 t t 1 f f 0.000000 f 7 f 0.000000 0 f f f S 82.25 t \N M t t \N \N f f f -1 -1 f f f 385 345 35 500.000000 0.000000 0.000000 0 \N 2011-04-18 f 0.000000 0.000000 0.000000 2 A \N R t 26 33 10 f f f -1 f f 1 f f 0.000000 f 7 f 0.000000 0 f f f S 350.00 t \N M t f \N \N f f f -1 -1 f f f 324 328 \N 0.000000 10.000000 0.000000 30 \N \N t 0.000000 0.000000 0.000000 7 A \N R t 26 30 10 t t f 124 t t 1 f 01-01-01-03 f 0.000000 f 7 f 0.000000 7 f f f S 0.00 t \N M t t \N \N f f f -1 -1 f f f 323 328 35 3.000000 1.000000 0.000000 30 \N 2010-03-12 t 0.000000 0.000000 0.000000 7 A \N R t 26 30 10 t t f 124 t t 1 f 01-01-01-03 f 0.000000 f 7 f 0.000000 0 f f f S 36.36 t \N M t t \N \N f f f -1 -1 f f f 377 336 35 158.000000 50.000000 0.000000 0 \N 2009-09-22 f 0.000000 0.000000 1.000000 7 A \N R t 26 33 10 t f f -1 t f 1 f f 0.000000 f 7 f 0.000000 0 f f f S 167.48 t \N M f t \N \N f f f -1 -1 f f f 376 335 35 158.000000 50.000000 0.000000 0 \N 2009-09-22 f 0.000000 0.000000 1.000000 7 A \N R t 26 33 10 t f f -1 t f 1 f f 0.000000 f 7 f 0.000000 0 f f f S 165.90 t \N M f t \N \N f f f -1 -1 f f f 378 337 35 148.000000 50.000000 0.000000 0 \N 2009-09-22 f 0.000000 0.000000 1.000000 7 A \N R t 26 33 10 t f f -1 t t 1 f f 0.000000 f 7 f 0.000000 0 f f f S 158.36 t \N M f t \N \N f f f -1 -1 f f f 304 312 35 0.000000 0.000000 0.000000 0 \N 1970-01-01 f 0.000000 0.000000 0.000000 0 A \N R f 25 30 10 f f f -1 f f 1 f f 0.000000 f 1 f 0.000000 0 f f f S 0.00 t \N S f f \N \N f f f -1 -1 f f f \. -- -- Data for Name: itemsrc; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemsrc (itemsrc_id, itemsrc_item_id, itemsrc_vend_id, itemsrc_vend_item_number, itemsrc_vend_item_descrip, itemsrc_comments, itemsrc_vend_uom, itemsrc_invvendoruomratio, itemsrc_minordqty, itemsrc_multordqty, itemsrc_leadtime, itemsrc_ranking, itemsrc_active, itemsrc_manuf_name, itemsrc_manuf_item_number, itemsrc_manuf_item_descrip, itemsrc_default, itemsrc_upccode, itemsrc_effective, itemsrc_expires, itemsrc_contrct_id) FROM stdin; 85 305 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 1.0000000000 0.000000 1.000000 1 1 t \N \N \N 1970-01-01 2100-01-01 \N 86 302 78 TPBODY1 EA 1.0000000000 0.000000 1.000000 1 1 t \N \N \N 1970-01-01 2100-01-01 \N 87 306 78 TPINS-1 EA 1.0000000000 0.000000 1.000000 1 1 t \N \N \N 1970-01-01 2100-01-01 \N 88 303 78 TPWHL01 EA 1.0000000000 1.000000 1.000000 1 1 t \N \N \N 1970-01-01 2100-01-01 \N 89 301 78 TP-PNT-100 LB 0.1250000000 1.000000 1.000000 1 1 t \N \N \N 1970-01-01 2100-01-01 \N 90 305 79 PPTBOX100 PCS 1.0000000000 10.000000 10.000000 4 2 t \N \N \N 1970-01-01 2100-01-01 \N 92 315 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 100.000000 100.000000 3 1 t \N \N \N 1970-01-01 2100-01-01 \N 93 314 78 RB100 Raw bumper for type 1 trucks PCS 1.0000000000 100.000000 100.000000 4 1 t \N \N \N 1970-01-01 2100-01-01 \N 94 323 78 SHT-100 Sheet Type 1 SH 1.0000000000 1.000000 1.000000 3 1 t \N \N \N 1970-01-01 2100-01-01 \N 95 317 78 CB027 BOX 4.0000000000 1.000000 1.000000 4 1 t \N \N \N 1970-01-01 2100-01-01 \N 96 301 88 YP127 GL 1.0000000000 10.000000 10.000000 4 3 t \N \N \N 1970-01-01 2100-01-01 \N 98 332 88 GL100 PL 1.0000000000 1.000000 5.000000 5 1 t \N \N \N 1970-01-01 2100-01-01 \N 100 329 79 FAS100 EA 1.0000000000 500.000000 100.000000 5 1 t \N \N \N 1970-01-01 2100-01-01 \N 101 330 79 BUS100 EA 1.0000000000 100.000000 100.000000 5 1 t \N \N \N 1970-01-01 2100-01-01 \N 97 325 88 YP128 Yellow Paint Type 2/128 GL 1.0000000000 5.000000 5.000000 5 2 t AmeriChem AC2128 AmeriChem Yellow - 2128 \N \N 1970-01-01 2100-01-01 \N 102 325 88 YP128 Yellow Paint Type 2/128 GL 1.0000000000 10.000000 10.000000 5 1 t EuroChem EC2128 EuroChem Yellow EC2128 \N \N 1970-01-01 2100-01-01 \N 105 337 88 W7P1 GL 1.0000000000 1.000000 1.000000 7 1 t \N \N 1970-01-01 2100-01-01 \N 104 335 88 R7P1 GL 1.0000000000 1.000000 1.000000 0 1 t \N \N 1970-01-01 2100-01-01 \N 103 336 88 B7P1 GL 1.0000000000 1.000000 1.000000 7 1 t \N \N 1970-01-01 2100-01-01 \N 107 341 94 DM100 EA 1.0000000000 10.000000 1.000000 4 1 t t 1970-01-01 2100-01-01 \N \. -- -- Data for Name: itemsrcp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemsrcp (itemsrcp_id, itemsrcp_itemsrc_id, itemsrcp_qtybreak, itemsrcp_price, itemsrcp_updated, itemsrcp_curr_id, itemsrcp_dropship, itemsrcp_warehous_id, itemsrcp_type, itemsrcp_discntprcnt, itemsrcp_fixedamtdiscount) FROM stdin; 85 85 0.000000 0.250000 \N 1 f -1 N \N \N 86 85 1000.000000 0.200000 \N 1 f -1 N \N \N 87 86 0.000000 1.000000 \N 1 f -1 N \N \N 88 87 0.000000 0.250000 \N 1 f -1 N \N \N 89 88 0.000000 0.100000 \N 1 f -1 N \N \N 90 89 0.000000 0.100000 \N 1 f -1 N \N \N 91 90 0.000000 0.300000 \N 1 f -1 N \N \N 92 92 0.000000 1.000000 2007-05-26 1 f -1 N \N \N 93 93 0.000000 1.000000 2007-05-26 1 f -1 N \N \N 94 94 0.000000 1.250000 2007-05-26 1 f -1 N \N \N 95 95 0.000000 1.000000 2008-03-04 1 f -1 N \N \N 96 96 0.000000 11.000000 2008-06-12 1 f -1 N \N \N 97 97 0.000000 11.000000 2008-06-12 1 f -1 N \N \N 98 98 0.000000 12.000000 2008-06-12 1 f -1 N \N \N 99 100 0.000000 0.002500 2008-06-12 2 f -1 N \N \N 100 101 0.000000 0.002500 2008-06-12 2 f -1 N \N \N 101 102 0.000000 10.000000 2009-01-06 1 f -1 N \N \N 102 103 0.000000 0.980000 2009-09-16 1 f -1 N \N \N 103 104 0.000000 0.970000 2009-09-16 1 f -1 N \N \N 104 105 0.000000 0.990000 2009-09-16 1 f -1 N \N \N 105 107 0.000000 22.000000 2010-03-10 1 f -1 N \N \N \. -- -- Data for Name: itemsub; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemsub (itemsub_id, itemsub_parent_item_id, itemsub_sub_item_id, itemsub_uomratio, itemsub_rank) FROM stdin; 17 301 325 1.1000000000 1 18 325 301 0.9000000000 1 \. -- -- Data for Name: itemtax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemtax (itemtax_id, itemtax_item_id, itemtax_taxtype_id, itemtax_taxzone_id) FROM stdin; 1 324 2 \N 2 307 2 \N 3 311 2 \N 4 310 2 \N 5 316 2 \N 6 300 2 \N 7 328 2 \N 8 331 2 \N 9 333 2 \N \. -- -- Data for Name: itemtrans; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemtrans (itemtrans_id, itemtrans_source_item_id, itemtrans_target_item_id) FROM stdin; 2 300 311 \. -- -- Data for Name: itemuom; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemuom (itemuom_id, itemuom_itemuomconv_id, itemuom_uomtype_id) FROM stdin; 1 1 4 2 2 1 \. -- -- Data for Name: itemuomconv; Type: TABLE DATA; Schema: public; Owner: admin -- COPY itemuomconv (itemuomconv_id, itemuomconv_item_id, itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional) FROM stdin; 2 300 6 1.0000000000 4 100.0000000000 t 1 303 10 1.0000000000 4 4.0000000000 t \. -- -- Data for Name: jrnluse; Type: TABLE DATA; Schema: public; Owner: admin -- COPY jrnluse (jrnluse_id, jrnluse_date, jrnluse_number, jrnluse_use) FROM stdin; 281 2005-12-23 16:56:06.198149 2274 GL-MISC 282 2005-12-27 10:44:25.064464 2275 GL-MISC 283 2005-12-27 10:44:25.064464 2276 GL-MISC 284 2005-12-27 10:44:25.064464 2277 GL-MISC 285 2005-12-27 10:44:25.064464 2278 GL-MISC 286 2005-12-27 10:44:25.064464 2279 GL-MISC 287 2005-12-27 10:44:25.064464 2280 GL-MISC 288 2005-12-27 10:44:25.064464 2281 GL-MISC 289 2005-12-27 10:44:25.064464 2282 GL-MISC 290 2005-12-27 10:44:25.064464 2283 GL-MISC 291 2005-12-27 10:44:25.064464 2284 GL-MISC 292 2005-12-27 10:52:08.918744 2285 AP-VO 293 2005-12-27 10:55:50.26967 2286 GL-MISC 294 2005-12-27 10:55:50.26967 2287 GL-MISC 295 2005-12-27 10:59:27.845595 2288 AP-VO 296 2005-12-27 11:00:08.51116 2289 AP-MISC 297 2005-12-27 11:00:18.621397 2290 AP-MISC 298 2005-12-27 11:02:38.349576 2291 AP-CK 299 2005-12-27 11:10:51.495092 2292 GL-MISC 300 2005-12-27 11:10:51.495092 2293 GL-MISC 301 2005-12-27 11:10:51.495092 2294 GL-MISC 302 2005-12-27 11:10:51.495092 2295 GL-MISC 303 2005-12-27 11:10:51.495092 2296 GL-MISC 304 2005-12-27 11:11:07.810441 2297 GL-MISC 305 2005-12-27 11:11:07.810441 2298 GL-MISC 306 2005-12-27 11:11:38.59791 2299 GL-MISC 307 2005-12-27 11:11:38.59791 2300 GL-MISC 308 2005-12-27 11:11:38.59791 2301 GL-MISC 309 2005-12-27 11:11:38.59791 2302 GL-MISC 310 2005-12-27 11:11:38.59791 2303 GL-MISC 311 2005-12-27 11:11:38.59791 2304 GL-MISC 312 2005-12-27 11:11:38.59791 2305 GL-MISC 313 2005-12-27 11:11:38.59791 2306 GL-MISC 314 2005-12-27 11:11:38.59791 2307 GL-MISC 315 2005-12-27 11:11:38.59791 2308 GL-MISC 316 2005-12-27 11:11:38.59791 2309 GL-MISC 317 2005-12-27 11:11:46.247601 2310 GL-MISC 318 2005-12-27 11:11:46.247601 2311 GL-MISC 319 2005-12-27 11:16:03.293252 2312 GL-MISC 320 2005-12-27 11:17:21.536011 2313 GL-MISC 321 2005-12-27 11:17:39.202545 2314 AR-IN 322 2005-12-27 11:36:13.494878 2315 C/R 323 2005-12-27 11:39:05.775637 2316 AP-VO 324 2005-12-27 11:40:04.183672 2317 AP-CK 325 2005-12-27 11:40:41.93143 2318 GL-MISC 326 2005-12-27 11:41:15.301527 2319 GL-MISC 327 2005-12-27 11:45:56.652105 2320 GL-MISC 328 2005-12-27 15:44:34.294467 2321 GL-MISC 329 2005-12-27 15:44:34.294467 2322 GL-MISC 330 2005-12-27 15:44:34.294467 2323 GL-MISC 331 2005-12-27 15:44:34.294467 2324 GL-MISC 332 2005-12-27 15:44:34.294467 2325 GL-MISC 333 2005-12-27 15:44:34.294467 2326 GL-MISC 334 2005-12-27 15:45:33.284417 2327 GL-MISC 335 2005-12-27 15:45:33.284417 2328 GL-MISC 336 2005-12-27 15:45:33.284417 2329 GL-MISC 337 2005-12-27 15:45:33.284417 2330 GL-MISC 338 2005-12-27 15:51:45.575155 2331 GL-MISC 339 2005-12-27 15:51:59.429125 2332 GL-MISC 340 2005-12-27 15:53:47.770886 2333 GL-MISC 341 2005-12-27 15:53:53.083837 2334 GL-MISC 342 2005-12-27 15:54:06.16052 2335 GL-MISC 343 2005-12-27 15:54:25.744465 2336 GL-MISC 344 2005-12-27 15:59:24.758434 2337 AR-IN 345 2005-12-27 16:02:19.702592 2338 GL-MISC 346 2005-12-27 16:03:09.64492 2339 GL-MISC 347 2005-12-27 16:07:03.164514 2340 AR-IN 348 2005-12-27 16:07:59.597566 2341 GL-MISC 349 2005-12-27 16:08:11.23218 2342 GL-MISC 350 2005-12-27 16:08:34.247456 2343 AR-IN 351 2005-12-27 16:09:00.552107 2344 GL-MISC 352 2005-12-27 16:09:29.612486 2345 GL-MISC 353 2005-12-27 16:09:57.800617 2346 GL-MISC 354 2005-12-27 16:10:03.036548 2347 GL-MISC 355 2005-12-27 16:10:07.867672 2348 GL-MISC 356 2005-12-27 16:21:46.92537 2349 AR-IN 357 2005-12-27 16:22:09.923092 2350 GL-MISC 358 2005-12-27 16:22:17.658442 2351 GL-MISC 359 2005-12-27 16:22:32.140196 2352 AR-IN 360 2005-12-27 16:24:18.863696 2353 C/R 361 2005-12-27 16:24:18.908292 2354 AR-MISC 362 2005-12-27 16:27:44.026945 2355 GL-MISC 363 2005-12-27 16:28:28.25883 2356 GL-MISC 364 2005-12-27 16:28:35.327813 2357 AR-IN 365 2005-12-27 16:31:18.939587 2358 C/R 366 2005-12-27 16:40:43.670411 2359 GL-MISC 367 2005-12-28 16:25:11.707602 2360 GL-MISC 368 2005-12-28 16:25:11.707602 2361 GL-MISC 369 2005-12-28 16:25:11.707602 2362 GL-MISC 370 2005-12-28 16:25:11.707602 2363 GL-MISC 371 2005-12-28 16:25:44.267849 2364 GL-MISC 372 2005-12-28 16:26:24.661058 2365 GL-MISC 373 2005-12-28 16:41:09.793479 2366 GL-MISC 374 2005-12-28 16:44:11.393517 2367 GL-MISC 375 2005-12-28 17:02:37.391127 2368 C/R 376 2005-12-28 17:02:37.391127 2369 AR-MISC 377 2005-12-29 09:20:05.083493 2370 GL-MISC 378 2005-12-29 09:20:59.992817 2371 GL-MISC 379 2005-12-29 09:25:54.533608 2372 GL-MISC 380 2005-12-29 09:27:37.006847 2373 GL-MISC 381 2005-12-29 09:28:05.811298 2374 GL-MISC 382 2005-12-29 09:28:05.811298 2375 GL-MISC 383 2005-12-29 09:28:20.070651 2376 AR-IN 384 2005-12-29 09:48:33.006376 2377 C/R 385 2005-12-29 09:48:33.014636 2378 AR-MISC 386 2005-12-29 09:54:11.546387 2379 GL-MISC 387 2005-12-29 09:54:11.546387 2380 GL-MISC 388 2005-12-29 09:54:11.546387 2381 GL-MISC 389 2005-12-29 09:54:11.546387 2382 GL-MISC 390 2005-12-29 09:54:11.546387 2383 GL-MISC 391 2005-12-29 09:54:11.546387 2384 GL-MISC 392 2005-12-29 09:54:11.546387 2385 GL-MISC 393 2005-12-29 09:54:11.546387 2386 GL-MISC 394 2005-12-29 09:54:11.546387 2387 GL-MISC 395 2005-12-29 09:54:11.546387 2388 GL-MISC 396 2005-12-29 09:54:11.546387 2389 GL-MISC 397 2005-12-29 09:54:11.546387 2390 GL-MISC 398 2005-12-29 09:54:11.546387 2391 GL-MISC 399 2005-12-29 09:54:11.546387 2392 GL-MISC 400 2005-12-29 10:01:19.939306 2393 GL-MISC 401 2005-12-29 10:01:19.939306 2394 GL-MISC 402 2005-12-29 10:01:19.939306 2395 GL-MISC 403 2005-12-29 10:01:19.939306 2396 GL-MISC 404 2005-12-29 10:01:19.939306 2397 GL-MISC 405 2005-12-29 10:01:23.341554 2398 GL-MISC 406 2005-12-29 10:01:23.341554 2399 GL-MISC 407 2005-12-29 10:11:42.058351 2400 GL-MISC 408 2005-12-29 10:11:42.058351 2401 GL-MISC 409 2005-12-29 10:11:42.058351 2402 GL-MISC 410 2005-12-29 10:11:42.058351 2403 GL-MISC 411 2005-12-29 10:11:42.058351 2404 GL-MISC 412 2005-12-29 10:11:42.058351 2405 GL-MISC 413 2005-12-29 10:11:42.058351 2406 GL-MISC 414 2005-12-29 10:12:08.029586 2407 GL-MISC 415 2005-12-29 10:12:08.029586 2408 GL-MISC 416 2005-12-29 10:12:08.029586 2409 GL-MISC 417 2005-12-29 10:12:08.029586 2410 GL-MISC 418 2005-12-29 10:12:08.029586 2411 GL-MISC 419 2005-12-29 10:12:08.029586 2412 GL-MISC 420 2005-12-29 10:12:08.029586 2413 GL-MISC 421 2005-12-29 10:12:08.029586 2414 GL-MISC 422 2005-12-29 10:12:08.029586 2415 GL-MISC 423 2005-12-29 10:12:08.029586 2416 GL-MISC 424 2005-12-29 10:12:08.029586 2417 GL-MISC 425 2005-12-29 10:12:25.87401 2418 GL-MISC 426 2005-12-29 10:12:25.87401 2419 GL-MISC 427 2005-12-29 10:12:34.705365 2420 GL-MISC 428 2005-12-29 10:12:34.705365 2421 GL-MISC 429 2005-12-29 10:12:34.705365 2422 GL-MISC 430 2005-12-29 10:12:34.705365 2423 GL-MISC 431 2005-12-29 10:12:34.705365 2424 GL-MISC 432 2005-12-29 10:12:34.705365 2425 GL-MISC 433 2005-12-29 10:12:34.705365 2426 GL-MISC 434 2005-12-29 10:12:34.705365 2427 GL-MISC 435 2005-12-29 10:12:34.705365 2428 GL-MISC 436 2005-12-29 10:12:34.705365 2429 GL-MISC 437 2005-12-29 10:12:34.705365 2430 GL-MISC 438 2005-12-29 10:12:50.430673 2431 GL-MISC 439 2005-12-29 10:12:50.430673 2432 GL-MISC 440 2005-12-29 10:13:37.4137 2433 GL-MISC 441 2005-12-29 10:13:37.4137 2434 GL-MISC 442 2005-12-29 10:14:00.880556 2435 GL-MISC 443 2005-12-29 10:14:00.880556 2436 GL-MISC 444 2005-12-29 10:21:04.772038 2437 AP-VO 445 2005-12-29 10:21:42.088999 2438 AP-MISC 446 2005-12-29 10:24:11.38751 2439 AP-CK 448 2005-12-29 12:00:38.208935 2441 GL-MISC 449 2005-12-29 12:00:38.208935 2442 GL-MISC 450 2005-12-29 12:00:38.208935 2443 GL-MISC 451 2005-12-29 12:00:38.208935 2444 GL-MISC 452 2005-12-29 12:00:38.208935 2445 GL-MISC 453 2005-12-29 12:00:38.208935 2446 GL-MISC 454 2005-12-29 12:00:38.208935 2447 GL-MISC 455 2005-12-29 12:00:38.208935 2448 GL-MISC 456 2005-12-29 12:02:08.616234 2449 GL-MISC 457 2005-12-29 12:02:08.616234 2450 GL-MISC 458 2005-12-29 12:02:08.616234 2451 GL-MISC 459 2005-12-29 12:02:08.616234 2452 GL-MISC 460 2005-12-29 12:02:48.89463 2453 GL-MISC 461 2005-12-29 12:02:48.89463 2454 GL-MISC 462 2005-12-29 12:02:48.89463 2455 GL-MISC 463 2005-12-29 12:02:48.89463 2456 GL-MISC 464 2005-12-29 12:02:48.89463 2457 GL-MISC 465 2005-12-29 12:02:48.89463 2458 GL-MISC 466 2005-12-29 12:07:32.143853 2459 GL-MISC 467 2005-12-29 12:09:45.54536 2460 GL-MISC 468 2005-12-29 12:22:23.380397 2461 AR-IN 469 2005-12-29 12:25:16.454735 2462 C/R 470 2005-12-29 12:28:14.419745 2463 AP-VO 471 2005-12-29 12:28:34.179493 2464 AP-MISC 472 2005-12-29 12:29:30.880455 2465 AP-CK 447 2005-12-29 10:50:20.080031 2440 G/L 473 2005-12-29 17:57:14.865318 2466 GL-MISC 474 2005-12-29 17:57:14.865318 2467 GL-MISC 475 2005-12-29 17:59:17.382043 2468 AP-VO 476 2005-12-29 17:59:58.880444 2469 AP-MISC 477 2005-12-29 18:00:37.757972 2470 AP-CK 478 2005-12-29 18:01:52.460451 2471 GL-MISC 479 2005-12-29 18:01:52.460451 2472 GL-MISC 480 2005-12-29 18:03:11.971842 2473 AP-VO 481 2005-12-29 18:05:06.53047 2474 GL-MISC 482 2005-12-29 18:05:06.53047 2475 GL-MISC 483 2005-12-29 18:06:35.831496 2476 AP-VO 484 2005-12-30 14:55:21.954437 2477 GL-MISC 485 2005-12-30 14:55:21.954437 2478 GL-MISC 486 2005-12-30 14:57:57.713172 2479 AP-VO 487 2005-12-30 15:06:11.174343 2480 GL-MISC 488 2005-12-30 15:06:11.174343 2481 GL-MISC 489 2005-12-30 15:07:00.153887 2482 AP-VO 490 2005-12-30 15:08:18.361723 2483 GL-MISC 491 2005-12-30 15:08:18.361723 2484 GL-MISC 492 2005-12-30 15:09:19.170385 2485 AP-VO 493 2006-01-09 09:54:02.867175 2486 C/R 494 2006-01-09 09:54:02.867175 2487 AR-MISC 495 2006-01-09 10:05:08.722536 2488 GL-MISC 496 2006-01-09 10:05:08.722536 2489 GL-MISC 497 2006-01-09 10:08:24.06783 2490 AP-VO 498 2006-01-09 10:09:24.734802 2491 AP-MISC 499 2006-01-09 10:10:39.79604 2492 AP-CK 500 2006-01-09 10:11:59.284841 2493 GL-MISC 501 2006-01-09 10:11:59.284841 2494 GL-MISC 502 2006-01-09 10:11:59.284841 2495 GL-MISC 503 2006-01-09 10:11:59.284841 2496 GL-MISC 504 2006-01-09 10:11:59.284841 2497 GL-MISC 505 2006-01-09 10:12:31.867381 2498 GL-MISC 506 2006-01-09 10:12:31.867381 2499 GL-MISC 507 2006-01-09 10:12:58.424348 2500 GL-MISC 508 2006-01-09 10:12:58.424348 2501 GL-MISC 509 2006-01-09 10:12:58.424348 2502 GL-MISC 510 2006-01-09 10:12:58.424348 2503 GL-MISC 511 2006-01-09 10:12:58.424348 2504 GL-MISC 512 2006-01-09 10:12:58.424348 2505 GL-MISC 513 2006-01-09 10:12:58.424348 2506 GL-MISC 514 2006-01-09 10:12:58.424348 2507 GL-MISC 515 2006-01-09 10:12:58.424348 2508 GL-MISC 516 2006-01-09 10:12:58.424348 2509 GL-MISC 517 2006-01-09 10:12:58.424348 2510 GL-MISC 518 2006-01-09 10:13:07.582026 2511 GL-MISC 519 2006-01-09 10:13:07.582026 2512 GL-MISC 520 2006-01-09 10:18:03.89857 2513 GL-MISC 521 2006-01-09 10:19:26.941862 2514 GL-MISC 522 2006-01-09 10:29:45.388301 2515 AR-IN 523 2006-01-09 10:30:54.894888 2516 C/R 524 2006-01-09 10:33:08.967829 2517 GL-MISC 525 2006-01-09 10:33:08.967829 2518 GL-MISC 526 2006-01-09 10:34:28.15672 2519 GL-MISC 527 2006-01-09 10:35:38.141745 2520 AP-VO 528 2006-01-09 10:36:05.829981 2521 AP-MISC 529 2006-01-09 10:37:31.706754 2522 AP-CK 530 2006-01-09 10:42:08.678827 2523 GL-MISC 531 2006-01-09 10:42:36.316136 2524 GL-MISC 532 2006-01-09 10:48:42.257492 2525 GL-MISC 533 2006-01-09 10:49:15.486258 2526 AR-IN 534 2006-01-09 10:49:58.679012 2527 C/R 535 2006-01-09 10:49:58.684292 2528 AR-MISC 536 2006-01-09 10:52:56.019772 2529 C/R 537 2006-01-09 10:52:56.019772 2530 AR-MISC 538 2006-01-09 10:53:14.730945 2531 GL-MISC 539 2006-01-09 10:53:30.709594 2532 GL-MISC 540 2006-01-09 10:53:40.365115 2533 AR-IN 541 2006-01-09 10:53:53.966653 2534 GL-MISC 542 2006-01-09 10:54:04.256755 2535 GL-MISC 543 2006-01-09 10:54:10.720081 2536 AR-IN 544 2006-01-09 10:55:13.632709 2537 C/R 545 2006-01-09 11:06:38.102402 2538 GL-MISC 546 2006-01-09 11:06:38.102402 2539 GL-MISC 547 2006-01-09 11:06:38.102402 2540 GL-MISC 548 2006-01-09 11:06:38.102402 2541 GL-MISC 549 2006-01-09 11:06:38.102402 2542 GL-MISC 550 2006-01-09 11:06:38.102402 2543 GL-MISC 551 2006-01-09 11:06:38.102402 2544 GL-MISC 552 2006-01-09 11:06:38.102402 2545 GL-MISC 553 2006-01-09 11:06:38.102402 2546 GL-MISC 554 2006-01-09 11:06:38.102402 2547 GL-MISC 555 2006-01-09 11:06:38.102402 2548 GL-MISC 556 2006-01-09 11:06:38.102402 2549 GL-MISC 557 2006-01-09 11:06:38.102402 2550 GL-MISC 558 2006-01-09 11:06:38.102402 2551 GL-MISC 559 2006-01-09 11:06:38.102402 2552 GL-MISC 560 2006-01-09 11:06:38.102402 2553 GL-MISC 561 2006-01-09 11:06:38.102402 2554 GL-MISC 562 2006-01-09 11:06:38.102402 2555 GL-MISC 563 2006-01-09 11:06:38.102402 2556 GL-MISC 564 2006-01-09 11:06:38.102402 2557 GL-MISC 565 2006-01-09 11:06:38.102402 2558 GL-MISC 566 2006-01-09 11:06:38.102402 2559 GL-MISC 567 2006-01-09 11:06:38.102402 2560 GL-MISC 568 2006-01-09 11:06:38.102402 2561 GL-MISC 569 2006-01-09 11:06:38.102402 2562 GL-MISC 570 2006-01-09 11:06:38.102402 2563 GL-MISC 571 2006-01-09 11:06:38.102402 2564 GL-MISC 572 2006-01-09 11:06:38.102402 2565 GL-MISC 573 2006-01-09 11:06:38.102402 2566 GL-MISC 574 2006-01-09 11:06:38.102402 2567 GL-MISC 575 2006-01-09 11:06:38.102402 2568 GL-MISC 576 2006-01-09 11:06:38.102402 2569 GL-MISC 577 2006-01-09 11:06:38.102402 2570 GL-MISC 578 2006-01-09 11:06:38.102402 2571 GL-MISC 579 2006-01-09 11:06:38.102402 2572 GL-MISC 580 2006-01-09 11:06:38.434762 2573 GL-MISC 581 2006-01-09 11:06:38.434762 2574 GL-MISC 582 2006-01-09 11:06:38.434762 2575 GL-MISC 583 2006-01-09 11:06:38.434762 2576 GL-MISC 584 2006-01-09 11:06:38.434762 2577 GL-MISC 585 2006-01-09 11:06:38.434762 2578 GL-MISC 586 2006-01-09 11:06:38.434762 2579 GL-MISC 587 2006-01-09 11:06:38.434762 2580 GL-MISC 588 2006-01-09 11:06:38.434762 2581 GL-MISC 589 2006-01-09 11:06:38.434762 2582 GL-MISC 590 2006-01-09 11:06:38.434762 2583 GL-MISC 591 2006-01-09 11:06:38.434762 2584 GL-MISC 592 2006-01-09 11:06:38.434762 2585 GL-MISC 593 2006-01-09 11:06:38.434762 2586 GL-MISC 594 2006-01-09 11:06:38.434762 2587 GL-MISC 595 2006-01-09 11:06:38.434762 2588 GL-MISC 596 2006-01-09 11:06:38.434762 2589 GL-MISC 597 2006-01-09 11:06:38.434762 2590 GL-MISC 598 2006-01-09 11:06:38.434762 2591 GL-MISC 599 2006-01-09 11:06:38.434762 2592 GL-MISC 600 2006-01-09 11:06:38.434762 2593 GL-MISC 601 2006-01-09 11:06:38.434762 2594 GL-MISC 602 2006-01-09 11:06:38.434762 2595 GL-MISC 603 2006-01-09 11:06:38.434762 2596 GL-MISC 604 2006-01-09 11:06:38.434762 2597 GL-MISC 605 2006-01-09 11:06:38.434762 2598 GL-MISC 606 2006-01-09 11:06:38.434762 2599 GL-MISC 607 2006-01-09 11:06:38.434762 2600 GL-MISC 608 2006-01-09 11:06:38.434762 2601 GL-MISC 609 2006-01-09 11:06:38.434762 2602 GL-MISC 610 2006-01-09 11:06:38.434762 2603 GL-MISC 611 2006-01-09 11:06:38.434762 2604 GL-MISC 612 2006-01-09 11:06:38.434762 2605 GL-MISC 613 2006-01-09 11:06:38.434762 2606 GL-MISC 614 2006-01-09 11:06:38.434762 2607 GL-MISC 615 2006-01-09 11:08:04.319309 2608 GL-MISC 616 2006-01-09 11:08:04.319309 2609 GL-MISC 617 2006-01-09 11:08:04.319309 2610 GL-MISC 618 2006-01-09 11:08:04.319309 2611 GL-MISC 619 2006-01-09 11:08:04.319309 2612 GL-MISC 620 2006-01-09 11:08:04.319309 2613 GL-MISC 621 2006-01-09 11:08:04.319309 2614 GL-MISC 622 2006-01-09 11:08:04.319309 2615 GL-MISC 623 2006-01-09 11:08:04.319309 2616 GL-MISC 624 2006-01-09 11:08:04.319309 2617 GL-MISC 625 2006-01-09 11:08:04.319309 2618 GL-MISC 626 2006-01-09 11:08:04.319309 2619 GL-MISC 627 2006-01-09 11:08:04.319309 2620 GL-MISC 628 2006-01-09 11:08:04.319309 2621 GL-MISC 629 2006-01-09 11:08:04.319309 2622 GL-MISC 630 2006-01-09 11:08:04.319309 2623 GL-MISC 631 2006-01-09 11:08:04.319309 2624 GL-MISC 632 2006-01-09 11:08:04.319309 2625 GL-MISC 633 2006-01-09 11:08:04.319309 2626 GL-MISC 634 2006-01-09 11:08:04.319309 2627 GL-MISC 635 2006-01-09 11:08:04.319309 2628 GL-MISC 636 2006-01-09 11:08:04.319309 2629 GL-MISC 637 2006-01-09 11:08:04.319309 2630 GL-MISC 638 2006-01-09 11:08:04.319309 2631 GL-MISC 639 2006-01-09 11:08:04.319309 2632 GL-MISC 640 2006-01-09 11:08:04.319309 2633 GL-MISC 641 2006-01-09 11:08:04.319309 2634 GL-MISC 642 2006-01-09 11:08:04.319309 2635 GL-MISC 643 2006-01-09 11:08:04.319309 2636 GL-MISC 644 2006-01-09 11:08:04.319309 2637 GL-MISC 645 2006-01-09 11:08:04.319309 2638 GL-MISC 646 2006-01-09 11:08:04.319309 2639 GL-MISC 647 2006-01-09 11:08:04.319309 2640 GL-MISC 648 2006-01-09 11:08:04.319309 2641 GL-MISC 649 2006-01-09 11:08:04.319309 2642 GL-MISC 650 2006-01-09 11:08:04.506762 2643 GL-MISC 651 2006-01-09 11:08:04.506762 2644 GL-MISC 652 2006-01-09 11:08:04.506762 2645 GL-MISC 653 2006-01-09 11:08:04.506762 2646 GL-MISC 654 2006-01-09 11:08:04.506762 2647 GL-MISC 655 2006-01-09 11:08:04.506762 2648 GL-MISC 656 2006-01-09 11:08:04.506762 2649 GL-MISC 657 2006-01-09 11:08:04.506762 2650 GL-MISC 658 2006-01-09 11:08:04.506762 2651 GL-MISC 659 2006-01-09 11:08:04.506762 2652 GL-MISC 660 2006-01-09 11:08:04.506762 2653 GL-MISC 661 2006-01-09 11:08:04.506762 2654 GL-MISC 662 2006-01-09 11:08:04.506762 2655 GL-MISC 663 2006-01-09 11:08:04.506762 2656 GL-MISC 664 2006-01-09 11:08:04.506762 2657 GL-MISC 665 2006-01-09 11:08:04.506762 2658 GL-MISC 666 2006-01-09 11:08:04.506762 2659 GL-MISC 667 2006-01-09 11:08:04.506762 2660 GL-MISC 668 2006-01-09 11:08:04.506762 2661 GL-MISC 669 2006-01-09 11:08:04.506762 2662 GL-MISC 670 2006-01-09 11:08:04.506762 2663 GL-MISC 671 2006-01-09 11:08:04.506762 2664 GL-MISC 672 2006-01-09 11:08:04.506762 2665 GL-MISC 673 2006-01-09 11:08:04.506762 2666 GL-MISC 674 2006-01-09 11:08:04.506762 2667 GL-MISC 675 2006-01-09 11:08:04.506762 2668 GL-MISC 676 2006-01-09 11:08:04.506762 2669 GL-MISC 677 2006-01-09 11:08:04.506762 2670 GL-MISC 678 2006-01-09 11:08:04.506762 2671 GL-MISC 679 2006-01-09 11:08:04.506762 2672 GL-MISC 680 2006-01-09 11:08:04.506762 2673 GL-MISC 681 2006-01-09 11:08:04.506762 2674 GL-MISC 682 2006-01-09 11:08:04.506762 2675 GL-MISC 683 2006-01-09 11:08:04.506762 2676 GL-MISC 684 2006-01-09 11:08:04.506762 2677 GL-MISC 685 2006-01-09 11:09:16.170598 2678 GL-MISC 686 2006-01-09 11:09:16.170598 2679 GL-MISC 687 2006-01-09 11:09:16.170598 2680 GL-MISC 688 2006-01-09 11:09:16.170598 2681 GL-MISC 689 2006-01-09 11:09:16.170598 2682 GL-MISC 690 2006-01-09 11:09:16.170598 2683 GL-MISC 691 2006-01-09 11:09:16.170598 2684 GL-MISC 692 2006-01-09 11:09:16.170598 2685 GL-MISC 693 2006-01-09 11:09:16.170598 2686 GL-MISC 694 2006-01-09 11:09:16.170598 2687 GL-MISC 695 2006-01-09 11:09:16.170598 2688 GL-MISC 696 2006-01-09 11:09:16.170598 2689 GL-MISC 697 2006-01-09 11:09:16.170598 2690 GL-MISC 698 2006-01-09 11:09:16.170598 2691 GL-MISC 699 2006-01-09 11:09:16.170598 2692 GL-MISC 700 2006-01-09 11:09:16.170598 2693 GL-MISC 701 2006-01-09 11:09:16.170598 2694 GL-MISC 702 2006-01-09 11:09:16.170598 2695 GL-MISC 703 2006-01-09 11:09:16.170598 2696 GL-MISC 704 2006-01-09 11:09:16.170598 2697 GL-MISC 705 2006-01-09 11:09:16.170598 2698 GL-MISC 706 2006-01-09 11:09:16.170598 2699 GL-MISC 707 2006-01-09 11:09:16.170598 2700 GL-MISC 708 2006-01-09 11:09:16.170598 2701 GL-MISC 709 2006-01-09 11:09:16.170598 2702 GL-MISC 710 2006-01-09 11:09:16.170598 2703 GL-MISC 711 2006-01-09 11:09:16.170598 2704 GL-MISC 712 2006-01-09 11:09:16.170598 2705 GL-MISC 713 2006-01-09 11:09:16.170598 2706 GL-MISC 714 2006-01-09 11:09:16.170598 2707 GL-MISC 715 2006-01-09 11:09:16.170598 2708 GL-MISC 716 2006-01-09 11:09:16.170598 2709 GL-MISC 717 2006-01-09 11:09:16.170598 2710 GL-MISC 718 2006-01-09 11:09:16.170598 2711 GL-MISC 719 2006-01-09 11:09:16.170598 2712 GL-MISC 720 2006-01-09 11:09:16.37777 2713 GL-MISC 721 2006-01-09 11:09:16.37777 2714 GL-MISC 722 2006-01-09 11:09:16.37777 2715 GL-MISC 723 2006-01-09 11:09:16.37777 2716 GL-MISC 724 2006-01-09 11:09:16.37777 2717 GL-MISC 725 2006-01-09 11:09:16.37777 2718 GL-MISC 726 2006-01-09 11:09:16.37777 2719 GL-MISC 727 2006-01-09 11:09:16.37777 2720 GL-MISC 728 2006-01-09 11:09:16.37777 2721 GL-MISC 729 2006-01-09 11:09:16.37777 2722 GL-MISC 730 2006-01-09 11:09:16.37777 2723 GL-MISC 731 2006-01-09 11:09:16.37777 2724 GL-MISC 732 2006-01-09 11:09:16.37777 2725 GL-MISC 733 2006-01-09 11:09:16.37777 2726 GL-MISC 734 2006-01-09 11:09:16.37777 2727 GL-MISC 735 2006-01-09 11:09:16.37777 2728 GL-MISC 736 2006-01-09 11:09:16.37777 2729 GL-MISC 737 2006-01-09 11:09:16.37777 2730 GL-MISC 738 2006-01-09 11:09:16.37777 2731 GL-MISC 739 2006-01-09 11:09:16.37777 2732 GL-MISC 740 2006-01-09 11:09:16.37777 2733 GL-MISC 741 2006-01-09 11:09:16.37777 2734 GL-MISC 742 2006-01-09 11:09:16.37777 2735 GL-MISC 743 2006-01-09 11:09:16.37777 2736 GL-MISC 744 2006-01-09 11:09:16.37777 2737 GL-MISC 745 2006-01-09 11:09:16.37777 2738 GL-MISC 746 2006-01-09 11:09:16.37777 2739 GL-MISC 747 2006-01-09 11:09:16.37777 2740 GL-MISC 748 2006-01-09 11:09:16.37777 2741 GL-MISC 749 2006-01-09 11:09:16.37777 2742 GL-MISC 750 2006-01-09 11:09:16.37777 2743 GL-MISC 751 2006-01-09 11:09:16.37777 2744 GL-MISC 752 2006-01-09 11:09:16.37777 2745 GL-MISC 753 2006-01-09 11:09:16.37777 2746 GL-MISC 754 2006-01-09 11:09:16.37777 2747 GL-MISC 755 2006-01-10 12:49:21.459381 2748 GL-MISC 756 2006-01-10 12:49:56.229598 2749 GL-MISC 757 2006-01-10 12:49:56.229598 2750 GL-MISC 758 2006-01-10 12:49:56.229598 2751 GL-MISC 759 2006-01-10 12:49:56.229598 2752 GL-MISC 760 2006-01-10 12:49:56.229598 2753 GL-MISC 761 2006-01-10 12:52:36.633031 2754 GL-MISC 762 2006-01-10 12:52:36.633031 2755 GL-MISC 763 2006-01-10 12:52:36.633031 2756 GL-MISC 764 2006-01-10 12:52:51.553445 2757 GL-MISC 765 2006-01-10 12:52:51.553445 2758 GL-MISC 766 2006-01-10 12:52:51.553445 2759 GL-MISC 767 2006-01-10 14:24:59.311032 2760 GL-MISC 768 2006-01-10 14:24:59.311032 2761 GL-MISC 769 2006-01-10 14:24:59.311032 2762 GL-MISC 770 2006-01-10 14:24:59.311032 2763 GL-MISC 771 2006-01-10 14:24:59.311032 2764 GL-MISC 772 2006-01-10 14:26:07.002195 2765 GL-MISC 773 2006-01-10 14:26:07.002195 2766 GL-MISC 774 2006-01-10 14:26:07.002195 2767 GL-MISC 775 2006-01-10 14:26:23.770144 2768 GL-MISC 776 2006-01-10 14:26:23.770144 2769 GL-MISC 777 2006-01-10 14:26:23.770144 2770 GL-MISC 778 2006-01-10 14:26:41.26114 2771 GL-MISC 779 2006-01-10 14:26:41.26114 2772 GL-MISC 780 2006-01-10 14:26:41.26114 2773 GL-MISC 781 2006-01-10 14:26:41.26114 2774 GL-MISC 782 2006-01-10 14:26:41.26114 2775 GL-MISC 783 2006-01-10 14:36:29.531898 2776 GL-MISC 784 2006-01-10 14:36:29.531898 2777 GL-MISC 785 2006-01-10 14:36:29.531898 2778 GL-MISC 786 2006-01-10 14:36:47.561613 2779 GL-MISC 787 2006-01-10 14:36:47.561613 2780 GL-MISC 788 2006-01-10 14:36:47.561613 2781 GL-MISC 789 2006-01-10 14:38:40.816736 2782 GL-MISC 790 2006-01-10 14:38:40.816736 2783 GL-MISC 791 2006-01-10 14:45:24.740735 2784 GL-MISC 792 2006-01-10 14:49:55.032635 2785 GL-MISC 793 2006-01-10 14:49:55.032635 2786 GL-MISC 794 2006-01-10 15:03:57.529181 2787 GL-MISC 795 2006-01-10 15:03:57.529181 2788 GL-MISC 796 2006-01-10 15:03:57.529181 2789 GL-MISC 797 2006-01-10 15:03:57.529181 2790 GL-MISC 798 2006-01-10 15:03:57.529181 2791 GL-MISC 799 2006-01-10 15:07:23.888614 2792 GL-MISC 800 2006-01-10 15:07:23.888614 2793 GL-MISC 801 2006-01-10 15:07:23.888614 2794 GL-MISC 802 2006-01-10 15:36:58.451639 2795 GL-MISC 803 2006-01-10 15:36:58.451639 2796 GL-MISC 804 2006-01-10 15:36:58.451639 2797 GL-MISC 805 2006-01-10 15:45:19.916794 2798 GL-MISC 806 2006-01-10 15:45:19.916794 2799 GL-MISC 807 2006-01-10 15:45:19.916794 2800 GL-MISC 808 2006-01-10 15:45:19.916794 2801 GL-MISC 809 2006-01-10 15:45:19.916794 2802 GL-MISC 810 2006-01-10 15:46:22.423533 2803 GL-MISC 811 2006-01-10 15:46:22.423533 2804 GL-MISC 812 2006-01-10 15:46:22.423533 2805 GL-MISC 813 2006-01-10 15:46:48.352376 2806 GL-MISC 814 2006-01-10 15:46:48.352376 2807 GL-MISC 815 2006-01-10 15:46:48.352376 2808 GL-MISC 816 2006-01-10 15:47:22.609629 2809 GL-MISC 817 2006-01-10 15:47:22.609629 2810 GL-MISC 818 2006-01-11 09:54:13.901373 2811 GL-MISC 819 2006-01-11 09:59:54.469474 2812 GL-MISC 820 2006-01-11 10:00:16.138938 2813 GL-MISC 821 2006-01-11 10:00:30.64328 2814 GL-MISC 822 2006-01-11 10:00:42.121344 2815 GL-MISC 823 2006-01-11 10:06:13.415672 2816 GL-MISC 824 2006-01-11 10:17:04.317928 2817 GL-MISC 825 2006-01-11 10:18:26.647873 2818 GL-MISC 826 2006-01-11 10:43:25.050102 2819 GL-MISC 827 2006-01-11 10:54:07.761482 2820 GL-MISC 828 2006-01-11 12:47:12.620353 2821 GL-MISC 829 2006-01-11 12:49:16.098077 2822 GL-MISC 830 2006-01-11 12:49:16.098077 2823 GL-MISC 831 2006-01-11 12:49:16.098077 2824 GL-MISC 832 2006-01-11 12:49:16.098077 2825 GL-MISC 833 2006-01-11 12:49:16.098077 2826 GL-MISC 834 2006-01-11 12:49:16.098077 2827 GL-MISC 835 2006-01-11 12:49:52.026843 2828 GL-MISC 836 2006-01-11 12:52:21.332214 2829 GL-MISC 837 2006-01-11 12:52:21.332214 2830 GL-MISC 838 2006-01-11 12:52:21.332214 2831 GL-MISC 839 2006-01-11 12:52:21.332214 2832 GL-MISC 840 2006-01-11 12:52:21.332214 2833 GL-MISC 841 2006-01-11 12:52:21.332214 2834 GL-MISC 842 2006-01-11 12:54:07.767454 2835 GL-MISC 843 2006-01-11 12:54:07.767454 2836 GL-MISC 844 2006-01-11 12:54:07.767454 2837 GL-MISC 845 2006-01-11 12:54:07.767454 2838 GL-MISC 846 2006-01-11 12:54:07.767454 2839 GL-MISC 847 2006-01-11 12:54:07.767454 2840 GL-MISC 848 2006-01-11 12:54:07.767454 2841 GL-MISC 849 2006-01-11 12:54:07.767454 2842 GL-MISC 850 2006-01-11 12:54:07.767454 2843 GL-MISC 851 2006-01-11 12:54:07.767454 2844 GL-MISC 852 2006-01-11 12:54:07.767454 2845 GL-MISC 853 2006-01-11 12:54:07.767454 2846 GL-MISC 854 2006-01-11 12:54:07.767454 2847 GL-MISC 855 2006-01-11 12:54:07.767454 2848 GL-MISC 856 2006-01-11 12:54:07.767454 2849 GL-MISC 857 2006-01-11 12:54:07.767454 2850 GL-MISC 858 2006-01-11 12:54:07.767454 2851 GL-MISC 859 2006-01-11 12:54:07.767454 2852 GL-MISC 860 2006-01-11 12:54:07.767454 2853 GL-MISC 861 2006-01-11 12:54:07.767454 2854 GL-MISC 862 2006-01-11 12:54:07.767454 2855 GL-MISC 863 2006-01-11 12:54:07.767454 2856 GL-MISC 864 2006-01-11 12:54:07.767454 2857 GL-MISC 865 2006-01-11 12:54:07.767454 2858 GL-MISC 866 2006-01-11 12:54:07.767454 2859 GL-MISC 867 2006-01-11 12:54:07.767454 2860 GL-MISC 868 2006-01-11 12:54:07.767454 2861 GL-MISC 869 2006-01-11 12:54:07.767454 2862 GL-MISC 870 2006-01-11 12:54:07.767454 2863 GL-MISC 871 2006-01-11 12:54:07.767454 2864 GL-MISC 872 2006-01-11 12:54:07.767454 2865 GL-MISC 873 2006-01-11 12:54:07.767454 2866 GL-MISC 874 2006-01-11 12:54:07.767454 2867 GL-MISC 875 2006-01-11 12:54:07.767454 2868 GL-MISC 876 2006-01-11 12:54:07.767454 2869 GL-MISC 877 2006-01-11 12:54:07.767454 2870 GL-MISC 878 2006-01-11 12:54:07.767454 2871 GL-MISC 879 2006-01-11 12:54:07.767454 2872 GL-MISC 880 2006-01-11 12:54:07.767454 2873 GL-MISC 881 2006-01-11 12:54:07.767454 2874 GL-MISC 882 2006-01-11 12:54:07.767454 2875 GL-MISC 883 2006-01-11 12:54:07.767454 2876 GL-MISC 884 2006-01-11 12:54:07.767454 2877 GL-MISC 885 2006-01-11 12:54:07.767454 2878 GL-MISC 886 2006-01-11 12:54:07.767454 2879 GL-MISC 887 2006-01-11 12:54:07.767454 2880 GL-MISC 888 2006-01-11 12:54:07.767454 2881 GL-MISC 889 2006-01-11 12:54:07.767454 2882 GL-MISC 890 2006-01-11 12:54:07.767454 2883 GL-MISC 891 2006-01-11 12:54:07.767454 2884 GL-MISC 892 2006-01-11 12:54:07.767454 2885 GL-MISC 893 2006-01-11 12:54:07.767454 2886 GL-MISC 894 2006-01-11 12:54:07.767454 2887 GL-MISC 895 2006-01-11 12:54:07.767454 2888 GL-MISC 896 2006-01-11 12:54:07.767454 2889 GL-MISC 897 2006-01-11 12:54:07.767454 2890 GL-MISC 898 2006-01-11 12:54:07.767454 2891 GL-MISC 899 2006-01-11 12:54:07.767454 2892 GL-MISC 900 2006-01-11 12:54:07.767454 2893 GL-MISC 901 2006-01-11 12:54:07.767454 2894 GL-MISC 902 2006-01-11 12:54:07.767454 2895 GL-MISC 903 2006-01-11 12:54:07.767454 2896 GL-MISC 904 2006-01-11 12:54:07.767454 2897 GL-MISC 905 2006-01-11 12:54:07.767454 2898 GL-MISC 906 2006-01-11 12:54:07.767454 2899 GL-MISC 907 2006-01-11 12:54:07.767454 2900 GL-MISC 908 2006-01-11 12:54:07.767454 2901 GL-MISC 909 2006-01-11 12:54:07.767454 2902 GL-MISC 910 2006-01-11 12:54:07.767454 2903 GL-MISC 911 2006-01-11 12:54:07.767454 2904 GL-MISC 912 2006-01-11 12:54:08.117193 2905 GL-MISC 913 2006-01-11 12:54:08.117193 2906 GL-MISC 914 2006-01-11 12:54:08.117193 2907 GL-MISC 915 2006-01-11 12:54:08.117193 2908 GL-MISC 916 2006-01-11 12:54:08.117193 2909 GL-MISC 917 2006-01-11 12:54:08.117193 2910 GL-MISC 918 2006-01-11 12:54:08.117193 2911 GL-MISC 919 2006-01-11 12:54:08.117193 2912 GL-MISC 920 2006-01-11 12:54:08.117193 2913 GL-MISC 921 2006-01-11 12:54:08.117193 2914 GL-MISC 922 2006-01-11 12:54:08.117193 2915 GL-MISC 923 2006-01-11 12:54:08.117193 2916 GL-MISC 924 2006-01-11 12:54:08.117193 2917 GL-MISC 925 2006-01-11 12:54:08.117193 2918 GL-MISC 926 2006-01-11 12:54:08.117193 2919 GL-MISC 927 2006-01-11 12:54:08.117193 2920 GL-MISC 928 2006-01-11 12:54:08.117193 2921 GL-MISC 929 2006-01-11 12:54:08.117193 2922 GL-MISC 930 2006-01-11 12:54:08.117193 2923 GL-MISC 931 2006-01-11 12:54:08.117193 2924 GL-MISC 932 2006-01-11 12:54:08.117193 2925 GL-MISC 933 2006-01-11 12:54:08.117193 2926 GL-MISC 934 2006-01-11 12:54:08.117193 2927 GL-MISC 935 2006-01-11 12:54:08.117193 2928 GL-MISC 936 2006-01-11 12:54:08.117193 2929 GL-MISC 937 2006-01-11 12:54:08.117193 2930 GL-MISC 938 2006-01-11 12:54:08.117193 2931 GL-MISC 939 2006-01-11 12:54:08.117193 2932 GL-MISC 940 2006-01-11 12:54:08.117193 2933 GL-MISC 941 2006-01-11 12:54:08.117193 2934 GL-MISC 942 2006-01-11 12:54:08.117193 2935 GL-MISC 943 2006-01-11 12:54:08.117193 2936 GL-MISC 944 2006-01-11 12:54:08.117193 2937 GL-MISC 945 2006-01-11 12:54:08.117193 2938 GL-MISC 946 2006-01-11 12:54:08.117193 2939 GL-MISC 947 2006-01-11 12:54:08.117193 2940 GL-MISC 948 2006-01-11 12:54:08.117193 2941 GL-MISC 949 2006-01-11 12:54:08.117193 2942 GL-MISC 950 2006-01-11 12:54:08.117193 2943 GL-MISC 951 2006-01-11 12:54:08.117193 2944 GL-MISC 952 2006-01-11 12:54:08.117193 2945 GL-MISC 953 2006-01-11 12:54:08.117193 2946 GL-MISC 954 2006-01-11 12:54:08.117193 2947 GL-MISC 955 2006-01-11 12:54:08.117193 2948 GL-MISC 956 2006-01-11 12:54:08.117193 2949 GL-MISC 957 2006-01-11 12:54:08.117193 2950 GL-MISC 958 2006-01-11 12:54:08.117193 2951 GL-MISC 959 2006-01-11 12:54:08.117193 2952 GL-MISC 960 2006-01-11 12:54:08.117193 2953 GL-MISC 961 2006-01-11 12:54:08.117193 2954 GL-MISC 962 2006-01-11 12:54:08.117193 2955 GL-MISC 963 2006-01-11 12:54:08.117193 2956 GL-MISC 964 2006-01-11 12:54:08.117193 2957 GL-MISC 965 2006-01-11 12:54:08.117193 2958 GL-MISC 966 2006-01-11 12:54:08.117193 2959 GL-MISC 967 2006-01-11 12:54:08.117193 2960 GL-MISC 968 2006-01-11 12:54:08.117193 2961 GL-MISC 969 2006-01-11 12:54:08.117193 2962 GL-MISC 970 2006-01-11 12:54:08.117193 2963 GL-MISC 971 2006-01-11 12:54:08.117193 2964 GL-MISC 972 2006-01-11 12:54:08.117193 2965 GL-MISC 973 2006-01-11 12:54:08.117193 2966 GL-MISC 974 2006-01-11 12:54:08.117193 2967 GL-MISC 975 2006-01-11 12:54:08.117193 2968 GL-MISC 976 2006-01-11 12:54:08.117193 2969 GL-MISC 977 2006-01-11 12:54:08.117193 2970 GL-MISC 978 2006-01-11 12:54:08.117193 2971 GL-MISC 979 2006-01-11 12:54:08.117193 2972 GL-MISC 980 2006-01-11 12:54:08.117193 2973 GL-MISC 981 2006-01-11 12:54:08.117193 2974 GL-MISC 982 2006-01-11 13:14:21.026722 2975 GL-MISC 983 2006-01-11 13:14:21.026722 2976 GL-MISC 984 2006-01-11 13:14:21.026722 2977 GL-MISC 985 2006-01-11 13:14:21.026722 2978 GL-MISC 986 2006-01-11 13:14:21.026722 2979 GL-MISC 987 2006-01-11 13:14:21.026722 2980 GL-MISC 988 2006-01-11 13:14:21.026722 2981 GL-MISC 989 2006-01-11 13:14:21.026722 2982 GL-MISC 990 2006-01-11 13:14:21.026722 2983 GL-MISC 991 2006-01-11 13:14:21.026722 2984 GL-MISC 992 2006-01-11 13:14:21.026722 2985 GL-MISC 993 2006-01-11 13:14:21.026722 2986 GL-MISC 994 2006-01-11 13:14:21.026722 2987 GL-MISC 995 2006-01-11 13:14:21.026722 2988 GL-MISC 996 2006-01-11 13:14:21.026722 2989 GL-MISC 997 2006-01-11 13:14:21.026722 2990 GL-MISC 998 2006-01-11 13:14:21.026722 2991 GL-MISC 999 2006-01-11 13:14:21.026722 2992 GL-MISC 1000 2006-01-11 13:14:21.026722 2993 GL-MISC 1001 2006-01-11 13:14:21.026722 2994 GL-MISC 1002 2006-01-11 13:14:21.026722 2995 GL-MISC 1003 2006-01-11 13:14:21.026722 2996 GL-MISC 1004 2006-01-11 13:14:21.026722 2997 GL-MISC 1005 2006-01-11 13:14:21.026722 2998 GL-MISC 1006 2006-01-11 13:14:21.026722 2999 GL-MISC 1007 2006-01-11 13:14:21.026722 3000 GL-MISC 1008 2006-01-11 13:14:21.026722 3001 GL-MISC 1009 2006-01-11 13:14:21.026722 3002 GL-MISC 1010 2006-01-11 13:14:21.026722 3003 GL-MISC 1011 2006-01-11 13:14:21.026722 3004 GL-MISC 1012 2006-01-11 13:14:21.026722 3005 GL-MISC 1013 2006-01-11 13:14:21.026722 3006 GL-MISC 1014 2006-01-11 13:14:21.026722 3007 GL-MISC 1015 2006-01-11 13:14:21.026722 3008 GL-MISC 1016 2006-01-11 13:14:21.026722 3009 GL-MISC 1017 2006-01-11 13:14:21.026722 3010 GL-MISC 1018 2006-01-11 13:14:21.026722 3011 GL-MISC 1019 2006-01-11 13:14:21.026722 3012 GL-MISC 1020 2006-01-11 13:14:21.026722 3013 GL-MISC 1021 2006-01-11 13:14:21.026722 3014 GL-MISC 1022 2006-01-11 13:14:21.026722 3015 GL-MISC 1023 2006-01-11 13:14:21.026722 3016 GL-MISC 1024 2006-01-11 13:14:21.026722 3017 GL-MISC 1025 2006-01-11 13:14:21.026722 3018 GL-MISC 1026 2006-01-11 13:14:21.026722 3019 GL-MISC 1027 2006-01-11 13:14:21.026722 3020 GL-MISC 1028 2006-01-11 13:14:21.026722 3021 GL-MISC 1029 2006-01-11 13:14:21.026722 3022 GL-MISC 1030 2006-01-11 13:14:21.026722 3023 GL-MISC 1031 2006-01-11 13:14:21.026722 3024 GL-MISC 1032 2006-01-11 13:14:21.026722 3025 GL-MISC 1033 2006-01-11 13:14:21.026722 3026 GL-MISC 1034 2006-01-11 13:14:21.026722 3027 GL-MISC 1035 2006-01-11 13:14:21.026722 3028 GL-MISC 1036 2006-01-11 13:14:21.026722 3029 GL-MISC 1037 2006-01-11 13:14:21.026722 3030 GL-MISC 1038 2006-01-11 13:14:21.026722 3031 GL-MISC 1039 2006-01-11 13:14:21.026722 3032 GL-MISC 1040 2006-01-11 13:14:21.026722 3033 GL-MISC 1041 2006-01-11 13:14:21.026722 3034 GL-MISC 1042 2006-01-11 13:14:21.026722 3035 GL-MISC 1043 2006-01-11 13:14:21.026722 3036 GL-MISC 1044 2006-01-11 13:14:21.026722 3037 GL-MISC 1045 2006-01-11 13:14:21.026722 3038 GL-MISC 1046 2006-01-11 13:14:21.026722 3039 GL-MISC 1047 2006-01-11 13:14:21.026722 3040 GL-MISC 1048 2006-01-11 13:14:21.026722 3041 GL-MISC 1049 2006-01-11 13:14:21.026722 3042 GL-MISC 1050 2006-01-11 13:14:21.026722 3043 GL-MISC 1051 2006-01-11 13:14:21.026722 3044 GL-MISC 1052 2006-01-11 13:14:21.412187 3045 GL-MISC 1053 2006-01-11 13:14:21.412187 3046 GL-MISC 1054 2006-01-11 13:14:21.412187 3047 GL-MISC 1055 2006-01-11 13:14:21.412187 3048 GL-MISC 1056 2006-01-11 13:14:21.412187 3049 GL-MISC 1057 2006-01-11 13:14:21.412187 3050 GL-MISC 1058 2006-01-11 13:14:21.412187 3051 GL-MISC 1059 2006-01-11 13:14:21.412187 3052 GL-MISC 1060 2006-01-11 13:14:21.412187 3053 GL-MISC 1061 2006-01-11 13:14:21.412187 3054 GL-MISC 1062 2006-01-11 13:14:21.412187 3055 GL-MISC 1063 2006-01-11 13:14:21.412187 3056 GL-MISC 1064 2006-01-11 13:14:21.412187 3057 GL-MISC 1065 2006-01-11 13:14:21.412187 3058 GL-MISC 1066 2006-01-11 13:14:21.412187 3059 GL-MISC 1067 2006-01-11 13:14:21.412187 3060 GL-MISC 1068 2006-01-11 13:14:21.412187 3061 GL-MISC 1069 2006-01-11 13:14:21.412187 3062 GL-MISC 1070 2006-01-11 13:14:21.412187 3063 GL-MISC 1071 2006-01-11 13:14:21.412187 3064 GL-MISC 1072 2006-01-11 13:14:21.412187 3065 GL-MISC 1073 2006-01-11 13:14:21.412187 3066 GL-MISC 1074 2006-01-11 13:14:21.412187 3067 GL-MISC 1075 2006-01-11 13:14:21.412187 3068 GL-MISC 1076 2006-01-11 13:14:21.412187 3069 GL-MISC 1077 2006-01-11 13:14:21.412187 3070 GL-MISC 1078 2006-01-11 13:14:21.412187 3071 GL-MISC 1079 2006-01-11 13:14:21.412187 3072 GL-MISC 1080 2006-01-11 13:14:21.412187 3073 GL-MISC 1081 2006-01-11 13:14:21.412187 3074 GL-MISC 1082 2006-01-11 13:14:21.412187 3075 GL-MISC 1083 2006-01-11 13:14:21.412187 3076 GL-MISC 1084 2006-01-11 13:14:21.412187 3077 GL-MISC 1085 2006-01-11 13:14:21.412187 3078 GL-MISC 1086 2006-01-11 13:14:21.412187 3079 GL-MISC 1087 2006-01-11 13:14:21.412187 3080 GL-MISC 1088 2006-01-11 13:14:21.412187 3081 GL-MISC 1089 2006-01-11 13:14:21.412187 3082 GL-MISC 1090 2006-01-11 13:14:21.412187 3083 GL-MISC 1091 2006-01-11 13:14:21.412187 3084 GL-MISC 1092 2006-01-11 13:14:21.412187 3085 GL-MISC 1093 2006-01-11 13:14:21.412187 3086 GL-MISC 1094 2006-01-11 13:14:21.412187 3087 GL-MISC 1095 2006-01-11 13:14:21.412187 3088 GL-MISC 1096 2006-01-11 13:14:21.412187 3089 GL-MISC 1097 2006-01-11 13:14:21.412187 3090 GL-MISC 1098 2006-01-11 13:14:21.412187 3091 GL-MISC 1099 2006-01-11 13:14:21.412187 3092 GL-MISC 1100 2006-01-11 13:14:21.412187 3093 GL-MISC 1101 2006-01-11 13:14:21.412187 3094 GL-MISC 1102 2006-01-11 13:14:21.412187 3095 GL-MISC 1103 2006-01-11 13:14:21.412187 3096 GL-MISC 1104 2006-01-11 13:14:21.412187 3097 GL-MISC 1105 2006-01-11 13:14:21.412187 3098 GL-MISC 1106 2006-01-11 13:14:21.412187 3099 GL-MISC 1107 2006-01-11 13:14:21.412187 3100 GL-MISC 1108 2006-01-11 13:14:21.412187 3101 GL-MISC 1109 2006-01-11 13:14:21.412187 3102 GL-MISC 1110 2006-01-11 13:14:21.412187 3103 GL-MISC 1111 2006-01-11 13:14:21.412187 3104 GL-MISC 1112 2006-01-11 13:14:21.412187 3105 GL-MISC 1113 2006-01-11 13:14:21.412187 3106 GL-MISC 1114 2006-01-11 13:14:21.412187 3107 GL-MISC 1115 2006-01-11 13:14:21.412187 3108 GL-MISC 1116 2006-01-11 13:14:21.412187 3109 GL-MISC 1117 2006-01-11 13:14:21.412187 3110 GL-MISC 1118 2006-01-11 13:14:21.412187 3111 GL-MISC 1119 2006-01-11 13:14:21.412187 3112 GL-MISC 1120 2006-01-11 13:14:21.412187 3113 GL-MISC 1121 2006-01-11 13:14:21.412187 3114 GL-MISC 1122 2006-01-11 14:29:27.4484 3115 GL-MISC 1123 2006-01-11 14:29:39.244866 3116 GL-MISC 1124 2006-01-11 14:29:53.348902 3117 GL-MISC 1125 2006-01-11 14:30:13.847178 3118 GL-MISC 1126 2006-01-11 14:30:13.847178 3119 GL-MISC 1127 2006-01-11 14:30:13.847178 3120 GL-MISC 1128 2006-01-11 14:30:31.673955 3121 GL-MISC 1129 2006-01-11 14:30:31.673955 3122 GL-MISC 1130 2006-01-11 14:30:31.673955 3123 GL-MISC 1131 2006-01-11 14:31:44.746753 3124 GL-MISC 1132 2006-01-11 14:31:57.792661 3125 GL-MISC 1133 2006-01-11 14:32:02.775311 3126 GL-MISC 1134 2006-01-11 14:32:13.232028 3127 GL-MISC 1135 2006-01-11 14:32:13.232028 3128 GL-MISC 1136 2006-01-11 14:32:13.232028 3129 GL-MISC 1137 2006-01-11 14:34:16.486685 3130 AR-IN 1138 2006-01-11 15:11:55.001364 3131 AR-MISC 1139 2006-01-11 15:13:53.676035 3132 GL-MISC 1140 2006-01-11 15:14:03.417241 3133 GL-MISC 1141 2006-01-11 15:15:42.713353 3134 AR-MISC 1142 2006-01-11 15:17:33.84561 3135 AR-IN 1143 2006-01-11 15:21:25.949606 3136 C/R 1144 2006-01-11 15:42:25.88454 3137 GL-MISC 1145 2006-01-11 15:51:53.960791 3138 GL-MISC 1146 2006-01-11 15:52:58.366806 3139 AR-IN 1147 2006-01-11 16:00:15.552143 3140 GL-MISC 1148 2006-01-11 16:03:28.126626 3141 GL-MISC 1149 2006-01-11 16:03:57.642002 3142 GL-MISC 1150 2006-01-11 16:04:09.180656 3143 AR-IN 1151 2006-01-12 09:36:09.814356 3144 GL-MISC 1152 2006-01-12 09:39:23.773683 3145 GL-MISC 1153 2006-01-12 10:04:11.072158 3146 G/L 1154 2006-01-12 10:10:04.152256 3147 G/L 1155 2006-01-12 11:25:12.008773 3148 GL-MISC 1156 2006-01-12 11:26:49.042589 3149 G/L 1157 2006-01-12 11:33:08.577848 3150 G/L 1158 2006-01-12 11:57:05.645307 3151 G/L 1159 2006-01-12 12:00:16.701938 3152 G/L 1160 2006-01-12 12:21:16.479622 3153 G/L 1161 2006-01-12 12:21:55.418011 3154 G/L 1162 2006-01-12 12:28:25.69646 3155 GL-MISC 1163 2006-01-12 12:42:19.892426 3156 G/L 1164 2006-01-12 12:57:39.498845 3157 G/L 1165 2006-01-12 13:46:04.75092 3158 GL-MISC 1166 2006-01-12 13:46:17.528594 3159 GL-MISC 1167 2006-01-12 13:46:23.304596 3160 GL-MISC 1168 2006-01-12 13:47:13.07889 3161 GL-MISC 1169 2006-01-12 13:47:13.07889 3162 GL-MISC 1170 2006-01-12 13:47:13.07889 3163 GL-MISC 1171 2006-01-12 13:47:42.800259 3164 AR-IN 1172 2006-01-12 13:49:28.970355 3165 GL-MISC 1173 2006-01-12 13:49:28.970355 3166 GL-MISC 1174 2006-01-12 13:49:28.970355 3167 GL-MISC 1175 2006-01-12 13:49:28.970355 3168 GL-MISC 1176 2006-01-12 13:49:28.970355 3169 GL-MISC 1177 2006-01-12 13:49:28.970355 3170 GL-MISC 1178 2006-01-12 13:50:12.642582 3171 GL-MISC 1179 2006-01-12 13:50:12.642582 3172 GL-MISC 1180 2006-01-12 13:50:12.642582 3173 GL-MISC 1181 2006-01-12 13:50:12.642582 3174 GL-MISC 1182 2006-01-12 13:50:12.642582 3175 GL-MISC 1183 2006-01-12 13:50:12.642582 3176 GL-MISC 1184 2006-01-12 13:52:38.951513 3177 GL-MISC 1185 2006-01-12 13:52:38.951513 3178 GL-MISC 1186 2006-01-12 13:52:38.951513 3179 GL-MISC 1187 2006-01-12 13:52:38.951513 3180 GL-MISC 1188 2006-01-12 13:54:19.301839 3181 AP-VO 1189 2006-01-12 13:57:53.54875 3182 AP-CK 1190 2006-01-12 13:59:04.393348 3183 C/R 1191 2006-01-12 15:56:25.114801 3184 GL-MISC 1192 2006-01-12 15:59:36.993175 3185 GL-MISC 1193 2006-01-12 16:16:51.263622 3186 GL-MISC 1194 2006-01-12 16:16:51.263622 3187 GL-MISC 1195 2006-01-12 16:16:51.263622 3188 GL-MISC 1196 2006-01-12 16:16:51.263622 3189 GL-MISC 1197 2006-01-12 16:19:51.380825 3190 GL-MISC 1198 2006-01-12 16:20:45.3236 3191 GL-MISC 1199 2006-01-12 16:20:45.3236 3192 GL-MISC 1200 2006-01-12 16:20:45.3236 3193 GL-MISC 1201 2006-01-12 16:20:45.3236 3194 GL-MISC 1202 2006-01-12 16:20:45.3236 3195 GL-MISC 1203 2006-01-12 16:20:45.3236 3196 GL-MISC 1204 2006-01-12 16:20:45.3236 3197 GL-MISC 1205 2006-01-12 16:20:53.121931 3198 GL-MISC 1206 2006-01-12 16:20:53.121931 3199 GL-MISC 1207 2006-01-12 16:24:09.129658 3200 GL-MISC 1208 2006-01-13 10:34:03.962745 3201 G/L 1209 2006-01-13 10:54:38.98854 3202 GL-MISC 1210 2006-01-13 10:55:07.183874 3203 GL-MISC 1211 2006-01-13 10:55:07.183874 3204 GL-MISC 1212 2006-01-13 10:55:07.183874 3205 GL-MISC 1213 2006-01-13 10:55:07.183874 3206 GL-MISC 1214 2006-01-13 10:55:07.183874 3207 GL-MISC 1215 2006-01-13 10:55:07.183874 3208 GL-MISC 1216 2006-01-13 10:55:07.183874 3209 GL-MISC 1217 2006-01-13 10:55:07.183874 3210 GL-MISC 1218 2006-01-13 10:55:07.183874 3211 GL-MISC 1219 2006-01-13 10:55:07.183874 3212 GL-MISC 1220 2006-01-13 10:55:07.183874 3213 GL-MISC 1221 2006-01-13 10:55:07.183874 3214 GL-MISC 1222 2006-01-13 10:55:07.183874 3215 GL-MISC 1223 2006-01-13 10:55:07.183874 3216 GL-MISC 1224 2006-01-13 10:55:07.183874 3217 GL-MISC 1225 2006-01-13 10:55:07.183874 3218 GL-MISC 1226 2006-01-13 10:55:07.183874 3219 GL-MISC 1227 2006-01-13 10:55:07.183874 3220 GL-MISC 1228 2006-01-13 10:55:07.183874 3221 GL-MISC 1229 2006-01-13 10:55:07.183874 3222 GL-MISC 1230 2006-01-13 10:55:07.183874 3223 GL-MISC 1231 2006-01-13 10:55:07.183874 3224 GL-MISC 1232 2006-01-13 10:55:07.183874 3225 GL-MISC 1233 2006-01-13 10:55:07.183874 3226 GL-MISC 1234 2006-01-13 10:55:07.183874 3227 GL-MISC 1235 2006-01-13 10:55:07.183874 3228 GL-MISC 1236 2006-01-13 10:55:07.183874 3229 GL-MISC 1237 2006-01-13 10:55:07.183874 3230 GL-MISC 1238 2006-01-13 10:55:07.183874 3231 GL-MISC 1239 2006-01-13 10:55:07.183874 3232 GL-MISC 1240 2006-01-13 10:55:07.183874 3233 GL-MISC 1241 2006-01-13 10:55:07.183874 3234 GL-MISC 1242 2006-01-13 10:55:07.183874 3235 GL-MISC 1243 2006-01-13 10:55:07.183874 3236 GL-MISC 1244 2006-01-13 10:55:07.183874 3237 GL-MISC 1245 2006-01-13 10:55:07.434248 3238 GL-MISC 1246 2006-01-13 10:55:07.434248 3239 GL-MISC 1247 2006-01-13 10:55:07.434248 3240 GL-MISC 1248 2006-01-13 10:55:07.434248 3241 GL-MISC 1249 2006-01-13 10:55:07.434248 3242 GL-MISC 1250 2006-01-13 10:55:07.434248 3243 GL-MISC 1251 2006-01-13 10:55:07.434248 3244 GL-MISC 1252 2006-01-13 10:55:07.434248 3245 GL-MISC 1253 2006-01-13 10:55:07.434248 3246 GL-MISC 1254 2006-01-13 10:55:07.434248 3247 GL-MISC 1255 2006-01-13 10:55:07.434248 3248 GL-MISC 1256 2006-01-13 10:55:07.434248 3249 GL-MISC 1257 2006-01-13 10:55:07.434248 3250 GL-MISC 1258 2006-01-13 10:55:07.434248 3251 GL-MISC 1259 2006-01-13 10:55:07.434248 3252 GL-MISC 1260 2006-01-13 10:55:07.434248 3253 GL-MISC 1261 2006-01-13 10:55:07.434248 3254 GL-MISC 1262 2006-01-13 10:55:07.434248 3255 GL-MISC 1263 2006-01-13 10:55:07.434248 3256 GL-MISC 1264 2006-01-13 10:55:07.434248 3257 GL-MISC 1265 2006-01-13 10:55:07.434248 3258 GL-MISC 1266 2006-01-13 10:55:07.434248 3259 GL-MISC 1267 2006-01-13 10:55:07.434248 3260 GL-MISC 1268 2006-01-13 10:55:07.434248 3261 GL-MISC 1269 2006-01-13 10:55:07.434248 3262 GL-MISC 1270 2006-01-13 10:55:07.434248 3263 GL-MISC 1271 2006-01-13 10:55:07.434248 3264 GL-MISC 1272 2006-01-13 10:55:07.434248 3265 GL-MISC 1273 2006-01-13 10:55:07.434248 3266 GL-MISC 1274 2006-01-13 10:55:07.434248 3267 GL-MISC 1275 2006-01-13 10:55:07.434248 3268 GL-MISC 1276 2006-01-13 10:55:07.434248 3269 GL-MISC 1277 2006-01-13 10:55:07.434248 3270 GL-MISC 1278 2006-01-13 10:55:07.434248 3271 GL-MISC 1279 2006-01-13 10:55:07.434248 3272 GL-MISC 1280 2006-01-13 11:41:00.309379 3273 GL-MISC 1281 2006-01-13 11:41:00.309379 3274 GL-MISC 1282 2006-01-13 11:42:26.339065 3275 AP-VO 1283 2006-01-13 11:43:09.614756 3276 AP-MISC 1284 2006-01-13 11:48:39.07477 3277 AP-CK 1285 2006-01-13 11:50:07.020591 3278 GL-MISC 1286 2006-01-13 11:50:07.020591 3279 GL-MISC 1287 2006-01-13 11:50:07.020591 3280 GL-MISC 1288 2006-01-13 11:50:07.020591 3281 GL-MISC 1289 2006-01-13 11:50:07.020591 3282 GL-MISC 1290 2006-01-13 11:50:25.175319 3283 GL-MISC 1291 2006-01-13 11:50:25.175319 3284 GL-MISC 1292 2006-01-13 11:51:00.636398 3285 GL-MISC 1293 2006-01-13 11:51:00.636398 3286 GL-MISC 1294 2006-01-13 11:51:00.636398 3287 GL-MISC 1295 2006-01-13 11:51:00.636398 3288 GL-MISC 1296 2006-01-13 11:51:00.636398 3289 GL-MISC 1297 2006-01-13 11:51:00.636398 3290 GL-MISC 1298 2006-01-13 11:51:00.636398 3291 GL-MISC 1299 2006-01-13 11:51:00.636398 3292 GL-MISC 1300 2006-01-13 11:51:00.636398 3293 GL-MISC 1301 2006-01-13 11:51:00.636398 3294 GL-MISC 1302 2006-01-13 11:51:00.636398 3295 GL-MISC 1303 2006-01-13 11:51:09.367063 3296 GL-MISC 1304 2006-01-13 11:51:09.367063 3297 GL-MISC 1305 2006-01-13 11:53:06.038317 3298 GL-MISC 1306 2006-01-13 11:53:19.69192 3299 GL-MISC 1307 2006-01-13 11:54:28.50807 3300 AR-IN 1308 2006-01-13 11:54:49.828469 3301 C/R 1309 2006-01-13 11:54:49.834539 3302 AR-MISC 1310 2006-01-13 12:34:40.665 3303 GL-MISC 1311 2006-01-13 12:35:15.405 3304 GL-MISC 1312 2006-01-13 12:36:15.762 3305 GL-MISC 1313 2006-01-13 12:48:21.366 3306 GL-MISC 1314 2006-01-13 12:57:42.613 3307 GL-MISC 1315 2006-01-13 12:58:39.815 3308 AR-IN 1316 2006-01-13 13:01:30.921 3309 C/R 1317 2006-01-13 13:02:07.273 3310 C/R 1318 2006-01-13 13:36:28.397 3311 C/R 1319 2006-01-13 13:36:28.397 3312 AR-MISC 1320 2006-01-13 13:42:12.762 3313 GL-MISC 1321 2006-01-13 13:42:27.944 3314 GL-MISC 1322 2006-01-13 13:42:37.257 3315 AR-IN 1323 2006-01-13 15:09:30.383 3316 C/R 1324 2006-01-13 15:09:30.383 3317 AR-MISC 1325 2006-01-13 15:26:09.059 3318 GL-MISC 1326 2006-01-13 15:26:09.059 3319 GL-MISC 1327 2006-01-13 15:27:19.701 3320 AP-VO 1328 2006-01-13 15:27:32.489 3321 AP-MISC 1329 2006-01-13 15:28:13.719 3322 AP-CK 1330 2006-01-13 15:29:01.838 3323 GL-MISC 1331 2006-01-13 15:29:01.838 3324 GL-MISC 1332 2006-01-13 15:29:01.838 3325 GL-MISC 1333 2006-01-13 15:29:01.838 3326 GL-MISC 1334 2006-01-13 15:29:01.838 3327 GL-MISC 1335 2006-01-13 15:29:15.227 3328 GL-MISC 1336 2006-01-13 15:29:15.227 3329 GL-MISC 1337 2006-01-13 15:29:42.106 3330 GL-MISC 1338 2006-01-13 15:29:42.106 3331 GL-MISC 1339 2006-01-13 15:29:42.106 3332 GL-MISC 1340 2006-01-13 15:29:42.106 3333 GL-MISC 1341 2006-01-13 15:29:42.106 3334 GL-MISC 1342 2006-01-13 15:29:42.106 3335 GL-MISC 1343 2006-01-13 15:29:42.106 3336 GL-MISC 1344 2006-01-13 15:29:42.106 3337 GL-MISC 1345 2006-01-13 15:29:42.106 3338 GL-MISC 1346 2006-01-13 15:29:42.106 3339 GL-MISC 1347 2006-01-13 15:29:42.106 3340 GL-MISC 1348 2006-01-13 15:29:50.027 3341 GL-MISC 1349 2006-01-13 15:29:50.027 3342 GL-MISC 1350 2006-01-13 15:30:06.521 3343 GL-MISC 1351 2006-01-13 15:30:48.331 3344 GL-MISC 1352 2006-01-13 15:31:17.813 3345 AR-IN 1353 2006-01-13 15:42:10.532 3346 C/R 1354 2006-01-30 12:06:01.609338 3347 C/R 1355 2006-01-30 12:06:01.609338 3348 AR-MISC 1356 2006-01-30 12:16:16.734143 3349 GL-MISC 1357 2006-01-30 12:16:16.734143 3350 GL-MISC 1358 2006-01-30 12:16:16.734143 3351 GL-MISC 1359 2006-01-30 12:16:16.734143 3352 GL-MISC 1360 2006-01-30 12:16:16.734143 3353 GL-MISC 1361 2006-01-30 12:16:25.49459 3354 GL-MISC 1362 2006-01-30 12:16:25.49459 3355 GL-MISC 1363 2006-01-30 12:16:46.435991 3356 GL-MISC 1364 2006-01-30 12:16:46.435991 3357 GL-MISC 1365 2006-01-30 12:16:46.435991 3358 GL-MISC 1366 2006-01-30 12:16:46.435991 3359 GL-MISC 1367 2006-01-30 12:16:46.435991 3360 GL-MISC 1368 2006-01-30 12:16:46.435991 3361 GL-MISC 1369 2006-01-30 12:16:46.435991 3362 GL-MISC 1370 2006-01-30 12:16:46.435991 3363 GL-MISC 1371 2006-01-30 12:16:46.435991 3364 GL-MISC 1372 2006-01-30 12:16:46.435991 3365 GL-MISC 1373 2006-01-30 12:16:46.435991 3366 GL-MISC 1374 2006-01-30 12:16:58.06761 3367 GL-MISC 1375 2006-01-30 12:16:58.06761 3368 GL-MISC 1376 2006-01-30 12:19:28.277472 3369 GL-MISC 1377 2006-01-30 12:19:28.277472 3370 GL-MISC 1378 2006-01-30 12:21:12.398617 3371 AP-VO 1379 2006-01-30 12:23:48.698417 3372 AP-MISC 1380 2006-01-30 12:25:22.587723 3373 AP-CK 1381 2006-01-30 12:41:05.59221 3374 GL-MISC 1382 2006-01-30 12:41:46.479345 3375 GL-MISC 1383 2006-01-30 12:43:00.377257 3376 AR-IN 1384 2006-01-30 12:46:08.106372 3377 C/R 1385 2006-01-30 16:51:09.705773 3378 GL-MISC 1386 2006-01-30 16:51:09.705773 3379 GL-MISC 1387 2006-01-30 16:58:10.153362 3380 GL-MISC 1388 2006-01-30 16:58:10.153362 3381 GL-MISC 1389 2006-01-30 16:58:10.153362 3382 GL-MISC 1390 2006-01-30 16:58:10.153362 3383 GL-MISC 1391 2006-01-30 16:58:10.153362 3384 GL-MISC 1392 2006-01-30 16:58:17.581518 3385 GL-MISC 1393 2006-01-30 16:58:17.581518 3386 GL-MISC 1394 2006-01-30 17:00:37.702398 3387 GL-MISC 1395 2006-01-30 17:00:37.702398 3388 GL-MISC 1396 2006-01-30 17:00:37.702398 3389 GL-MISC 1397 2006-01-30 17:00:37.702398 3390 GL-MISC 1398 2006-01-30 17:00:37.702398 3391 GL-MISC 1399 2006-01-30 17:00:37.702398 3392 GL-MISC 1400 2006-01-30 17:00:37.702398 3393 GL-MISC 1401 2006-01-30 17:00:37.702398 3394 GL-MISC 1402 2006-01-30 17:00:37.702398 3395 GL-MISC 1403 2006-01-30 17:00:37.702398 3396 GL-MISC 1404 2006-01-30 17:00:37.702398 3397 GL-MISC 1405 2006-01-30 17:01:28.109709 3398 GL-MISC 1406 2006-01-30 17:01:28.109709 3399 GL-MISC 1407 2006-01-30 17:02:47.212738 3400 GL-MISC 1408 2006-01-30 17:04:33.018017 3401 GL-MISC 1409 2006-01-30 17:04:49.79794 3402 AR-IN 1410 2006-01-30 17:07:15.529754 3403 C/R 1411 2006-01-30 17:19:21.491066 3404 AP-VO 1412 2006-01-30 17:21:03.690537 3405 AP-CK 1413 2006-01-31 13:08:38.486 3406 GL-MISC 1414 2006-01-31 13:13:23.246 3407 GL-MISC 1415 2006-01-31 13:15:16.639 3408 G/L 1416 2006-01-31 13:16:27.721 3409 GL-MISC 1417 2006-01-31 13:19:16.764 3410 GL-MISC 1418 2006-01-31 13:20:25.673 3411 GL-MISC 1419 2006-01-31 13:21:52.859 3412 GL-MISC 1420 2006-01-31 15:41:01.704 3413 GL-MISC 1421 2006-01-31 15:41:01.704 3414 GL-MISC 1422 2006-01-31 16:22:28.64 3415 AP-VO 1423 2006-01-31 16:44:57.279 3416 AP-CK 1424 2006-02-01 08:16:05.143 3417 GL-MISC 1425 2006-02-01 08:16:05.143 3418 GL-MISC 1426 2006-02-01 08:23:10.344 3419 GL-MISC 1427 2006-02-01 08:23:10.344 3420 GL-MISC 1428 2006-02-01 08:23:10.344 3421 GL-MISC 1429 2006-02-01 08:24:08.017 3422 GL-MISC 1430 2006-02-01 08:24:08.017 3423 GL-MISC 1431 2006-02-01 08:34:02.132 3424 GL-MISC 1432 2006-02-01 08:34:02.132 3425 GL-MISC 1433 2006-02-01 08:34:02.132 3426 GL-MISC 1434 2006-02-01 08:34:02.132 3427 GL-MISC 1435 2006-02-01 08:34:02.132 3428 GL-MISC 1436 2006-02-01 08:34:02.132 3429 GL-MISC 1437 2006-02-01 08:34:02.132 3430 GL-MISC 1438 2006-02-01 08:34:02.132 3431 GL-MISC 1439 2006-02-01 08:34:02.132 3432 GL-MISC 1440 2006-02-01 08:34:02.132 3433 GL-MISC 1441 2006-02-01 08:34:02.132 3434 GL-MISC 1442 2006-02-01 08:38:05.732 3435 GL-MISC 1443 2006-02-01 08:38:05.732 3436 GL-MISC 1444 2006-02-01 09:26:49.877 3437 GL-MISC 1445 2006-02-01 09:32:41.713 3438 GL-MISC 1446 2006-02-01 10:27:05.906 3439 AR-IN 1447 2006-02-01 10:43:08.4 3440 C/R 1448 2006-06-23 16:12:19.031 3441 GL-MISC 1449 2006-06-23 16:12:56.828 3442 G/L 1450 2006-06-23 16:13:28.234 3443 G/L 1451 2006-06-23 16:14:17.625 3444 G/L 1452 2006-06-23 16:15:36.453 3445 G/L 1453 2006-06-23 16:16:31.531 3446 GL-MISC 1454 2006-07-05 09:03:55.488 3447 GL-MISC 1455 2006-07-05 09:03:55.488 3448 GL-MISC 1456 2006-07-05 09:04:55.16 3449 AP-VO 1457 2006-07-05 09:05:13.645 3450 AP-MISC 1458 2006-07-05 09:05:13.645 3451 AP-MISC 1459 2006-07-05 09:06:24.676 3452 AP-CK 1460 2006-07-05 09:16:56.52 3453 GL-MISC 1461 2006-07-05 09:16:56.52 3454 GL-MISC 1462 2006-07-05 09:16:56.52 3455 GL-MISC 1463 2006-07-05 09:16:56.52 3456 GL-MISC 1464 2006-07-05 09:16:56.52 3457 GL-MISC 1465 2006-07-05 09:17:18.113 3458 GL-MISC 1466 2006-07-05 09:17:18.113 3459 GL-MISC 1467 2006-07-05 09:17:35.41 3460 GL-MISC 1468 2006-07-05 09:17:35.41 3461 GL-MISC 1469 2006-07-05 09:17:35.41 3462 GL-MISC 1470 2006-07-05 09:17:35.41 3463 GL-MISC 1471 2006-07-05 09:17:35.41 3464 GL-MISC 1472 2006-07-05 09:17:35.41 3465 GL-MISC 1473 2006-07-05 09:17:35.41 3466 GL-MISC 1474 2006-07-05 09:17:35.41 3467 GL-MISC 1475 2006-07-05 09:17:35.41 3468 GL-MISC 1476 2006-07-05 09:17:35.41 3469 GL-MISC 1477 2006-07-05 09:17:35.41 3470 GL-MISC 1478 2006-07-05 09:18:04.098 3471 GL-MISC 1479 2006-07-05 09:18:04.098 3472 GL-MISC 1480 2006-07-05 09:18:56.598 3473 GL-MISC 1481 2006-07-05 09:21:52.129 3474 GL-MISC 1482 2006-07-05 09:22:08.254 3475 AR-IN 1483 2006-07-05 09:26:21.692 3476 C/R 1484 2006-07-05 09:37:19.723 3477 G/L 1485 2006-07-05 09:38:51.66 3478 GL-MISC 1486 2006-07-05 09:40:11.113 3479 GL-MISC 1487 2006-07-05 11:43:22.113 3480 GL-MISC 1488 2006-07-05 11:43:22.113 3481 GL-MISC 1489 2006-07-05 13:11:06.113 3482 AP-VO 1490 2006-07-05 13:28:20.957 3483 AP-CK 1491 2006-07-05 13:34:55.301 3484 GL-MISC 1492 2006-07-05 13:34:55.301 3485 GL-MISC 1493 2006-07-05 13:39:44.926 3486 GL-MISC 1494 2006-07-05 13:39:44.926 3487 GL-MISC 1495 2006-07-05 13:39:44.926 3488 GL-MISC 1496 2006-07-05 13:42:08.832 3489 GL-MISC 1497 2006-07-05 13:42:08.832 3490 GL-MISC 1498 2006-07-05 13:47:13.863 3491 GL-MISC 1499 2006-07-05 13:47:13.863 3492 GL-MISC 1500 2006-07-05 13:47:13.863 3493 GL-MISC 1501 2006-07-05 13:47:13.863 3494 GL-MISC 1502 2006-07-05 13:47:13.863 3495 GL-MISC 1503 2006-07-05 13:47:13.863 3496 GL-MISC 1504 2006-07-05 13:47:13.863 3497 GL-MISC 1505 2006-07-05 13:47:13.863 3498 GL-MISC 1506 2006-07-05 13:47:13.863 3499 GL-MISC 1507 2006-07-05 13:47:13.863 3500 GL-MISC 1508 2006-07-05 13:47:13.863 3501 GL-MISC 1509 2006-07-05 13:58:14.051 3502 GL-MISC 1510 2006-07-05 13:58:14.051 3503 GL-MISC 1511 2006-07-05 14:05:26.567 3504 GL-MISC 1512 2006-07-05 14:08:07.02 3505 GL-MISC 1513 2006-07-05 14:26:25.551 3506 AR-IN 1514 2006-07-05 14:34:30.988 3507 C/R 1515 2006-08-30 16:40:15.316 3508 G/L 1516 2006-08-30 16:40:47.159 3509 G/L 1517 2006-08-30 16:42:12.863 3510 G/L 1518 2006-08-30 16:44:54.941 3511 GL-MISC 1519 2006-08-31 08:24:13.628 3512 AP-CK 1520 2006-08-31 08:32:28.597 3513 AR-IN 1521 2006-08-31 08:32:55.738 3514 C/R 1522 2006-09-28 09:33:26.984 3515 G/L 1523 2006-10-09 08:41:27.546 3516 GL-MISC 1524 2006-10-09 08:42:10.343 3517 GL-MISC 1525 2006-10-09 08:43:13.828 3518 G/L 1526 2006-10-09 08:43:21.109 3519 G/L 1527 2006-10-09 10:37:28.187 3520 GL-MISC 1528 2006-10-11 10:15:11.16 3521 GL-MISC 1529 2006-10-11 10:15:11.16 3522 GL-MISC 1530 2006-10-11 10:46:51.597 3523 AP-VO 1531 2006-10-11 10:47:15.738 3524 AP-MISC 1532 2006-10-11 10:47:15.738 3525 AP-MISC 1533 2006-10-11 10:48:29.847 3526 AP-CK 1534 2006-10-11 10:58:09.472 3527 G/L 1535 2006-10-13 14:51:22.05 3528 GL-MISC 1536 2006-10-13 14:55:52.613 3529 GL-MISC 1537 2006-10-13 14:55:52.613 3530 GL-MISC 1538 2006-10-13 14:55:52.613 3531 GL-MISC 1539 2006-10-13 14:55:52.613 3532 GL-MISC 1540 2006-10-13 14:55:52.613 3533 GL-MISC 1541 2006-10-13 15:29:36.972 3534 GL-MISC 1542 2006-10-13 15:29:36.972 3535 GL-MISC 1543 2006-10-13 15:30:35.066 3536 AP-VO 1544 2006-10-13 15:31:01.738 3537 AP-MISC 1545 2006-10-13 15:31:01.738 3538 AP-MISC 1546 2006-10-13 15:32:01.035 3539 AP-CK 1547 2006-10-13 15:33:17.816 3540 GL-MISC 1548 2006-10-13 15:33:17.816 3541 GL-MISC 1549 2006-10-13 15:33:17.816 3542 GL-MISC 1550 2006-10-13 15:33:17.816 3543 GL-MISC 1551 2006-10-13 15:33:17.816 3544 GL-MISC 1552 2006-10-13 15:33:31.191 3545 GL-MISC 1553 2006-10-13 15:33:31.191 3546 GL-MISC 1554 2006-10-13 15:35:24.378 3547 GL-MISC 1555 2006-10-13 15:35:24.378 3548 GL-MISC 1556 2006-10-13 15:35:24.378 3549 GL-MISC 1557 2006-10-13 15:35:24.378 3550 GL-MISC 1558 2006-10-13 15:35:24.378 3551 GL-MISC 1559 2006-10-13 15:35:24.378 3552 GL-MISC 1560 2006-10-13 15:35:24.378 3553 GL-MISC 1561 2006-10-13 15:35:24.378 3554 GL-MISC 1562 2006-10-13 15:35:24.378 3555 GL-MISC 1563 2006-10-13 15:35:24.378 3556 GL-MISC 1564 2006-10-13 15:35:24.378 3557 GL-MISC 1565 2006-10-13 15:35:34.878 3558 GL-MISC 1566 2006-10-13 15:35:34.878 3559 GL-MISC 1567 2006-10-13 15:45:32.519 3560 GL-MISC 1568 2006-10-13 15:50:55.378 3561 GL-MISC 1569 2006-10-13 15:51:56.3 3562 AR-IN 1570 2006-10-13 15:59:46.113 3563 C/R 1571 2006-10-30 14:48:21.558 3564 GL-MISC 1572 2006-10-30 14:49:43.933 3565 GL-MISC 1573 2006-10-30 14:51:05.543 3566 GL-MISC 1574 2006-10-30 14:51:37.887 3567 GL-MISC 1575 2006-10-30 14:52:19.73 3568 GL-MISC 1576 2006-10-30 14:52:53.996 3569 GL-MISC 1577 2006-11-17 14:45:40.781 3570 GL-MISC 1578 2006-11-17 15:02:24.468 3571 GL-MISC 1579 2006-12-05 12:06:22.416 3572 GL-MISC 1580 2006-12-05 12:16:44.541 3573 GL-MISC 1581 2006-12-05 12:23:34.228 3574 GL-MISC 1582 2006-12-05 12:23:59.01 3575 GL-MISC 1583 2006-12-05 12:24:15.275 3576 AR-IN 1584 2006-12-05 18:51:26.75 3577 AP-CK 1585 2006-12-05 18:52:50.265 3578 AP-VO 1586 2006-12-05 18:52:52.703 3579 AP-VO 1587 2006-12-27 13:34:13.703 3580 GL-MISC 1588 2006-12-27 13:36:59.812 3581 GL-MISC 1589 2006-12-27 13:39:06.281 3582 GL-MISC 1601 2006-12-28 11:19:50.687 3590 GL-MISC 1602 2006-12-28 11:23:35.312 3591 AP-VO 1603 2006-12-28 11:23:39.39 3592 AP-VO 1604 2006-12-28 11:35:54.25 3593 AP-CK 1594 2006-12-27 13:43:11 3583 GL-MISC 1595 2006-12-27 13:44:14.421 3584 G/L 1596 2006-12-27 13:44:41.515 3585 G/L 1597 2006-12-27 13:44:59.093 3586 G/L 1598 2006-12-28 11:19:38.812 3587 GL-MISC 1599 2006-12-28 11:19:38.812 3588 GL-MISC 1600 2006-12-28 11:19:50.687 3589 GL-MISC 1633 2007-01-03 14:46:20.062 3622 AP-VO 1634 2007-01-03 14:47:29.031 3623 AP-MISC 1635 2007-01-03 14:47:29.031 3624 AP-MISC 1636 2007-01-03 14:48:30.703 3625 AP-CK 1605 2006-12-28 11:36:18.937 3594 AP-CK 1606 2006-12-28 11:36:22.359 3595 AP-CK 1607 2006-12-28 11:41:11.5 3596 GL-MISC 1608 2006-12-28 11:41:29.484 3597 GL-MISC 1609 2006-12-28 11:41:33.781 3598 GL-MISC 1610 2006-12-28 11:41:44.859 3599 GL-MISC 1611 2006-12-28 11:43:07.156 3600 GL-MISC 1612 2006-12-28 11:43:07.156 3601 GL-MISC 1613 2006-12-28 11:43:32.171 3602 GL-MISC 1614 2006-12-28 11:43:32.171 3603 GL-MISC 1615 2006-12-28 11:43:32.171 3604 GL-MISC 1616 2006-12-28 11:43:32.171 3605 GL-MISC 1617 2006-12-28 11:43:32.171 3606 GL-MISC 1618 2006-12-28 11:43:35.187 3607 GL-MISC 1619 2006-12-28 11:43:35.187 3608 GL-MISC 1620 2006-12-28 11:43:57.343 3609 GL-MISC 1621 2006-12-28 11:43:57.343 3610 GL-MISC 1622 2006-12-28 11:44:03.578 3611 GL-MISC 1623 2006-12-28 11:44:03.578 3612 GL-MISC 1624 2006-12-28 11:44:03.578 3613 GL-MISC 1625 2006-12-28 11:44:36 3614 GL-MISC 1626 2006-12-28 11:44:36 3615 GL-MISC 1627 2006-12-28 11:45:16.421 3616 GL-MISC 1628 2006-12-28 11:52:01.39 3617 GL-MISC 1629 2006-12-28 11:52:14.546 3618 AR-IN 1630 2006-12-28 14:02:55.343 3619 GL-MISC 1631 2006-12-28 14:03:15.531 3620 GL-MISC 1632 2006-12-28 14:04:40.921 3621 GL-MISC 1637 2007-01-03 14:49:20.421 3626 G/L 1638 2007-01-08 13:56:03.855 3627 C/R 1639 2007-01-08 16:25:11.824 3628 GL-MISC 1640 2007-01-08 16:27:48.746 3629 GL-MISC 1641 2007-01-08 16:31:19.261 3630 GL-MISC 1642 2007-01-08 16:31:57.511 3631 AR-IN 1643 2007-01-08 16:34:13.105 3632 GL-MISC 1644 2007-01-08 16:34:24.371 3633 GL-MISC 1645 2007-01-08 16:35:03.105 3634 AR-IN 1646 2007-01-09 16:07:28.433 3635 GL-MISC 1647 2007-01-09 16:07:28.433 3636 GL-MISC 1648 2007-01-09 16:07:28.433 3637 GL-MISC 1649 2007-01-09 16:07:28.433 3638 GL-MISC 1650 2007-01-09 16:07:28.433 3639 GL-MISC 1651 2007-01-09 16:07:28.433 3640 GL-MISC 1652 2007-02-20 08:27:33.079 3641 GL-MISC 1653 2007-02-20 08:27:33.079 3642 GL-MISC 1654 2007-02-20 08:28:31.907 3643 AP-VO 1655 2007-02-20 08:28:57.423 3644 AP-MISC 1656 2007-02-20 08:28:57.423 3645 AP-MISC 1657 2007-02-20 08:30:17.454 3646 AP-CK 1658 2007-02-20 08:34:35.173 3647 GL-MISC 1659 2007-02-20 08:34:35.173 3648 GL-MISC 1660 2007-02-20 08:34:35.173 3649 GL-MISC 1661 2007-02-20 08:34:35.173 3650 GL-MISC 1662 2007-02-20 08:34:35.173 3651 GL-MISC 1663 2007-02-20 08:34:45.673 3652 GL-MISC 1664 2007-02-20 08:34:45.673 3653 GL-MISC 1665 2007-02-20 08:34:45.673 3654 GL-MISC 1666 2007-02-20 08:34:45.673 3655 GL-MISC 1667 2007-02-20 08:34:45.673 3656 GL-MISC 1668 2007-02-20 08:34:53.094 3657 GL-MISC 1669 2007-02-20 08:34:53.094 3658 GL-MISC 1670 2007-02-20 08:34:53.094 3659 GL-MISC 1671 2007-02-20 08:34:53.094 3660 GL-MISC 1672 2007-02-20 08:34:53.094 3661 GL-MISC 1673 2007-02-20 08:34:53.094 3662 GL-MISC 1674 2007-02-20 08:34:53.094 3663 GL-MISC 1675 2007-02-20 08:34:53.094 3664 GL-MISC 1676 2007-02-20 08:34:53.094 3665 GL-MISC 1677 2007-02-20 08:34:53.094 3666 GL-MISC 1678 2007-02-20 08:34:53.094 3667 GL-MISC 1679 2007-02-20 08:35:03.266 3668 GL-MISC 1680 2007-02-20 08:35:03.266 3669 GL-MISC 1681 2007-02-20 08:35:07.923 3670 GL-MISC 1682 2007-02-20 08:35:07.923 3671 GL-MISC 1683 2007-02-20 08:35:12.407 3672 GL-MISC 1684 2007-02-20 08:35:12.407 3673 GL-MISC 1685 2007-02-20 08:35:30.485 3674 GL-MISC 1686 2007-02-20 08:36:07.313 3675 GL-MISC 1687 2007-02-20 08:36:49.641 3676 AR-IN 1688 2007-02-20 08:39:40.798 3677 C/R 1689 2007-02-20 08:39:40.813 3678 AR-MISC 1690 2007-02-20 08:40:28.735 3679 C/R 1691 2007-02-20 08:42:10.673 3680 GL-MISC 1692 2007-02-20 08:42:31.516 3681 GL-MISC 1693 2007-02-20 08:42:41.235 3682 AR-IN 1694 2007-02-20 08:44:13.657 3683 C/R 1695 2007-02-20 08:46:57.688 3684 G/L 1696 2007-02-20 08:55:42.079 3685 AP-CK 1697 2007-02-20 15:02:56.61 3686 AP-CK 1698 2007-02-23 13:47:59.031 3687 GL-MISC 1699 2007-02-23 13:47:59.031 3688 GL-MISC 1700 2007-02-23 13:49:02.343 3689 GL-MISC 1701 2007-02-23 13:49:02.343 3690 GL-MISC 1702 2007-03-12 10:18:17.031 3691 G/L 1703 2007-04-05 15:29:46.062 3692 GL-MISC 1704 2007-04-05 15:31:35.406 3693 GL-MISC 1705 2007-04-05 15:31:35.406 3694 GL-MISC 1706 2007-04-05 15:31:35.406 3695 GL-MISC 1707 2007-04-05 15:31:35.406 3696 GL-MISC 1708 2007-04-05 15:32:13.687 3697 GL-MISC 1709 2007-04-05 15:32:13.687 3698 GL-MISC 1710 2007-04-05 15:32:13.687 3699 GL-MISC 1711 2007-04-05 15:32:38.953 3700 GL-MISC 1712 2007-04-05 15:32:38.953 3701 GL-MISC 1713 2007-04-05 15:32:38.953 3702 GL-MISC 1714 2007-04-05 15:32:38.953 3703 GL-MISC 1715 2007-04-05 15:33:00.171 3704 GL-MISC 1716 2007-04-05 15:33:00.171 3705 GL-MISC 1717 2007-04-05 15:39:03.921 3706 GL-MISC 1718 2007-04-05 15:43:47.156 3707 GL-MISC 1719 2007-04-05 15:45:07.093 3708 AR-IN 1720 2007-04-05 15:50:01.5 3709 C/R 1721 2007-04-05 15:51:14.968 3710 AR-IN 1722 2007-04-05 15:51:32.578 3711 C/R 1723 2007-04-05 15:53:55.453 3712 AP-CK 1724 2007-04-05 15:54:01.468 3713 AP-CK 1725 2007-05-26 21:19:38.796 3714 GL-MISC 1726 2007-05-30 08:42:03.75 3715 GL-MISC 1727 2007-05-30 08:42:03.75 3716 GL-MISC 1728 2007-05-30 08:42:03.75 3717 GL-MISC 1729 2007-05-30 08:42:03.75 3718 GL-MISC 1730 2007-05-30 08:42:03.75 3719 GL-MISC 1731 2007-05-30 08:42:03.75 3720 GL-MISC 1732 2007-05-30 08:42:03.75 3721 GL-MISC 1733 2007-05-30 08:42:03.75 3722 GL-MISC 1734 2007-05-30 08:42:03.75 3723 GL-MISC 1735 2007-05-30 08:42:03.75 3724 GL-MISC 1736 2007-05-30 08:42:03.75 3725 GL-MISC 1737 2007-05-30 08:42:03.75 3726 GL-MISC 1738 2007-05-30 08:42:03.75 3727 GL-MISC 1739 2007-05-30 08:42:03.75 3728 GL-MISC 1740 2007-05-30 08:45:51.75 3729 GL-MISC 1741 2007-05-30 08:45:51.75 3730 GL-MISC 1742 2007-05-30 08:47:42.218 3731 AP-VO 1743 2007-05-30 08:47:46.078 3732 AP-VO 1744 2007-05-30 08:47:48.406 3733 AP-VO 1746 2007-05-30 08:48:02.359 3734 AP-VO 1747 2007-05-30 08:56:10.39 3735 AP-CK 1748 2007-05-30 08:56:13.921 3736 AP-CK 1749 2007-05-30 08:57:02.609 3737 AP-CK 1750 2007-05-30 08:57:50.718 3738 GL-MISC 1751 2007-05-30 08:57:50.718 3739 GL-MISC 1752 2007-05-30 08:57:50.718 3740 GL-MISC 1753 2007-05-30 08:57:50.718 3741 GL-MISC 1754 2007-05-30 08:57:55.218 3742 GL-MISC 1755 2007-05-30 08:57:55.218 3743 GL-MISC 1756 2007-05-30 08:58:12.296 3744 GL-MISC 1757 2007-05-30 08:58:12.296 3745 GL-MISC 1758 2007-05-30 08:58:12.296 3746 GL-MISC 1759 2007-05-30 08:58:33.234 3747 GL-MISC 1760 2007-05-30 08:58:33.234 3748 GL-MISC 1761 2007-05-30 08:58:33.234 3749 GL-MISC 1762 2007-05-30 08:58:42.296 3750 GL-MISC 1763 2007-05-30 08:58:42.296 3751 GL-MISC 1764 2007-05-30 08:58:56.531 3752 GL-MISC 1765 2007-05-30 08:58:56.531 3753 GL-MISC 1766 2007-05-30 08:58:56.531 3754 GL-MISC 1767 2007-05-30 08:58:56.531 3755 GL-MISC 1768 2007-05-30 08:59:00.234 3756 GL-MISC 1769 2007-05-30 08:59:00.234 3757 GL-MISC 1770 2007-05-30 09:02:02.578 3758 GL-MISC 1771 2007-05-30 09:02:46.062 3759 GL-MISC 1772 2007-05-30 09:03:09.265 3760 GL-MISC 1773 2007-05-30 09:03:32.578 3761 GL-MISC 1774 2007-05-30 09:03:32.578 3762 GL-MISC 1775 2007-05-30 09:03:32.578 3763 GL-MISC 1776 2007-05-30 09:03:32.578 3764 GL-MISC 1777 2007-05-30 09:03:32.578 3765 GL-MISC 1778 2007-05-30 09:03:35.718 3766 GL-MISC 1779 2007-05-30 09:03:35.718 3767 GL-MISC 1780 2007-05-30 09:04:07.625 3768 GL-MISC 1781 2007-05-30 09:04:07.625 3769 GL-MISC 1782 2007-05-30 09:04:07.625 3770 GL-MISC 1783 2007-05-30 09:04:07.625 3771 GL-MISC 1784 2007-05-30 09:04:26.328 3772 GL-MISC 1785 2007-05-30 09:04:26.328 3773 GL-MISC 1786 2007-05-30 09:04:26.328 3774 GL-MISC 1787 2007-05-30 09:04:26.328 3775 GL-MISC 1788 2007-05-30 09:04:37.156 3776 GL-MISC 1789 2007-05-30 09:04:37.156 3777 GL-MISC 1790 2007-05-30 09:04:52.671 3778 GL-MISC 1791 2007-05-30 09:04:52.671 3779 GL-MISC 1792 2007-05-30 09:04:52.671 3780 GL-MISC 1793 2007-05-30 09:04:52.671 3781 GL-MISC 1794 2007-05-30 09:04:52.671 3782 GL-MISC 1795 2007-05-30 09:04:52.671 3783 GL-MISC 1796 2007-05-30 09:04:52.671 3784 GL-MISC 1797 2007-05-30 09:04:52.671 3785 GL-MISC 1798 2007-05-30 09:04:52.671 3786 GL-MISC 1799 2007-05-30 09:04:52.671 3787 GL-MISC 1800 2007-05-30 09:04:52.671 3788 GL-MISC 1801 2007-05-30 09:04:52.671 3789 GL-MISC 1802 2007-05-30 09:05:12.656 3790 GL-MISC 1803 2007-05-30 09:05:12.656 3791 GL-MISC 1804 2007-05-30 09:05:12.656 3792 GL-MISC 1805 2007-05-30 09:05:12.656 3793 GL-MISC 1806 2007-05-30 09:05:12.656 3794 GL-MISC 1807 2007-05-30 09:05:12.656 3795 GL-MISC 1808 2007-05-30 09:05:12.656 3796 GL-MISC 1809 2007-05-30 09:05:12.656 3797 GL-MISC 1810 2007-05-30 09:05:12.656 3798 GL-MISC 1811 2007-05-30 09:05:12.656 3799 GL-MISC 1812 2007-05-30 09:05:12.656 3800 GL-MISC 1813 2007-05-30 09:05:12.656 3801 GL-MISC 1814 2007-05-30 09:05:32.796 3802 GL-MISC 1815 2007-05-30 09:05:32.796 3803 GL-MISC 1816 2007-05-30 09:05:32.796 3804 GL-MISC 1817 2007-05-30 09:05:32.796 3805 GL-MISC 1818 2007-05-30 09:05:32.796 3806 GL-MISC 1819 2007-05-30 09:05:32.796 3807 GL-MISC 1820 2007-05-30 09:05:32.796 3808 GL-MISC 1821 2007-05-30 09:05:32.796 3809 GL-MISC 1822 2007-05-30 09:05:32.796 3810 GL-MISC 1823 2007-05-30 09:05:32.796 3811 GL-MISC 1824 2007-05-30 09:05:32.796 3812 GL-MISC 1825 2007-05-30 09:05:32.796 3813 GL-MISC 1826 2007-05-30 09:05:59.843 3814 GL-MISC 1827 2007-05-30 09:05:59.843 3815 GL-MISC 1828 2007-05-30 09:05:59.843 3816 GL-MISC 1829 2007-05-30 09:05:59.843 3817 GL-MISC 1830 2007-05-30 09:05:59.843 3818 GL-MISC 1831 2007-05-30 09:05:59.843 3819 GL-MISC 1832 2007-05-30 09:05:59.843 3820 GL-MISC 1833 2007-05-30 09:05:59.843 3821 GL-MISC 1834 2007-05-30 09:05:59.843 3822 GL-MISC 1835 2007-05-30 09:05:59.843 3823 GL-MISC 1836 2007-05-30 09:05:59.843 3824 GL-MISC 1837 2007-05-30 09:05:59.843 3825 GL-MISC 1838 2007-05-30 09:22:59.437 3826 GL-MISC 1839 2007-05-30 09:24:46.765 3827 GL-MISC 1840 2007-05-30 09:24:46.765 3828 GL-MISC 1841 2007-05-30 09:24:46.765 3829 GL-MISC 1842 2007-05-30 09:24:46.765 3830 GL-MISC 1843 2007-05-30 09:25:27.156 3831 GL-MISC 1844 2007-05-30 09:25:27.156 3832 GL-MISC 1845 2007-05-30 09:25:27.156 3833 GL-MISC 1846 2007-05-30 09:25:27.156 3834 GL-MISC 1847 2007-05-30 09:26:36.703 3835 AR-IN 1848 2007-05-30 09:42:31.046 3836 C/R 1849 2007-05-30 09:45:22.921 3837 GL-MISC 1850 2007-05-30 09:51:05.671 3838 AR-IN 1851 2007-05-30 09:51:58.093 3839 C/R 1852 2007-05-30 09:57:15.109 3840 GL-MISC 1853 2007-05-30 10:47:10.125 3841 GL-MISC 1854 2007-05-30 10:47:10.125 3842 GL-MISC 1855 2007-05-30 10:47:10.125 3843 GL-MISC 1856 2007-05-30 10:47:10.125 3844 GL-MISC 1857 2007-05-30 10:47:42.312 3845 GL-MISC 1858 2007-05-30 10:47:42.312 3846 GL-MISC 1859 2007-05-30 10:47:42.312 3847 GL-MISC 1860 2007-05-30 10:47:42.312 3848 GL-MISC 1861 2007-05-30 10:47:47.953 3849 GL-MISC 1862 2007-05-30 10:47:47.953 3850 GL-MISC 1863 2007-05-30 10:57:22.109 3851 GL-MISC 1864 2007-05-30 10:57:22.109 3852 GL-MISC 1865 2007-05-30 10:57:27.718 3853 GL-MISC 1866 2007-05-30 10:57:27.718 3854 GL-MISC 1867 2007-05-30 10:57:33.546 3855 GL-MISC 1868 2007-05-30 10:57:33.546 3856 GL-MISC 1869 2007-05-30 10:58:00.093 3857 GL-MISC 1870 2007-05-30 10:58:00.093 3858 GL-MISC 1871 2007-05-30 09:32:51.910273 3859 AR-IN 1872 2007-05-30 09:45:55.343335 3860 GL-MISC 1873 2007-05-30 09:47:08.390105 3861 GL-MISC 1874 2007-05-30 10:25:32.097925 3862 GL-MISC 1875 2007-05-30 11:21:25.811624 3863 GL-MISC 1876 2007-05-30 11:21:25.811624 3864 GL-MISC 1877 2007-05-30 11:22:42.726706 3865 AP-VO 1878 2007-05-30 11:31:07.026135 3866 GL-MISC 1879 2007-05-30 11:31:07.026135 3867 GL-MISC 1880 2007-05-30 11:31:29.479549 3868 GL-MISC 1881 2007-05-30 11:31:29.479549 3869 GL-MISC 1882 2007-05-30 11:31:29.479549 3870 GL-MISC 1883 2007-05-30 11:31:29.479549 3871 GL-MISC 1884 2007-05-30 11:31:29.479549 3872 GL-MISC 1885 2007-05-30 11:31:33.421967 3873 GL-MISC 1886 2007-05-30 11:31:33.421967 3874 GL-MISC 1887 2007-05-30 11:32:36.219628 3875 GL-MISC 1888 2007-05-30 11:32:36.219628 3876 GL-MISC 1889 2007-05-30 11:32:36.219628 3877 GL-MISC 1890 2007-05-30 11:32:36.219628 3878 GL-MISC 1891 2007-05-30 11:32:54.874951 3879 GL-MISC 1892 2007-05-30 11:32:54.874951 3880 GL-MISC 1893 2007-05-30 11:32:54.874951 3881 GL-MISC 1894 2007-05-30 11:32:54.874951 3882 GL-MISC 1895 2007-05-30 11:33:01.452914 3883 GL-MISC 1896 2007-05-30 11:33:01.452914 3884 GL-MISC 1897 2007-05-30 11:33:24.73485 3885 GL-MISC 1898 2007-05-30 11:33:24.73485 3886 GL-MISC 1899 2007-05-30 11:33:24.73485 3887 GL-MISC 1900 2007-05-30 11:33:24.73485 3888 GL-MISC 1901 2007-05-30 11:33:24.73485 3889 GL-MISC 1902 2007-05-30 11:33:37.241578 3890 GL-MISC 1903 2007-05-30 11:33:37.241578 3891 GL-MISC 1904 2007-05-30 11:33:47.228336 3892 GL-MISC 1905 2007-05-30 11:33:47.228336 3893 GL-MISC 1906 2007-05-30 11:33:47.228336 3894 GL-MISC 1907 2007-05-30 11:33:47.228336 3895 GL-MISC 1908 2007-05-30 11:33:47.228336 3896 GL-MISC 1909 2007-05-30 11:33:47.228336 3897 GL-MISC 1910 2007-05-30 11:33:47.228336 3898 GL-MISC 1911 2007-05-30 11:33:47.228336 3899 GL-MISC 1912 2007-05-30 11:33:47.228336 3900 GL-MISC 1913 2007-05-30 11:33:47.228336 3901 GL-MISC 1914 2007-05-30 11:33:47.228336 3902 GL-MISC 1915 2007-05-30 11:34:01.639193 3903 GL-MISC 1916 2007-05-30 11:34:01.639193 3904 GL-MISC 1917 2007-05-30 11:38:48.327255 3905 AP-VO 1918 2007-05-30 11:38:51.5359 3906 AP-VO 1919 2007-05-30 11:39:06.664661 3907 GL-MISC 1920 2007-05-30 11:39:06.664661 3908 GL-MISC 1921 2007-05-30 11:39:18.094088 3909 GL-MISC 1922 2007-05-30 11:39:18.094088 3910 GL-MISC 1923 2007-05-30 11:39:48.948144 3911 AR-IN 1924 2007-05-30 11:42:12.31779 3912 C/R 1925 2007-05-30 11:43:58.034475 3913 AP-CK 1926 2007-05-30 11:44:01.035395 3914 AP-CK 1927 2007-08-03 03:54:41.39 3915 AP-VO 1928 2007-08-03 03:54:53.453 3916 AP-VO 1929 2007-08-03 03:57:24.296 3917 G/L 1930 2007-08-03 03:58:24.812 3918 G/L 1931 2007-08-03 03:59:55.156 3919 AR-IN 1932 2007-08-03 04:04:05.062 3920 AP-CK 1933 2007-08-03 04:04:10.14 3921 AP-CK 1934 2007-08-03 04:04:35.562 3922 AP-CK 1935 2007-08-03 04:06:53.5 3923 C/R 1936 2007-08-03 04:07:42.875 3924 C/R 1937 2007-08-03 04:12:46.937 3925 G/L 1938 2007-08-31 10:13:13.765 3926 C/R 1939 2007-08-31 10:23:28.718 3927 GL-MISC 1940 2007-08-31 10:40:03.703 3928 GL-MISC 1941 2007-08-31 10:40:03.703 3929 GL-MISC 1942 2007-08-31 10:45:56.484 3930 GL-MISC 1943 2007-08-31 10:46:38.343 3931 GL-MISC 1944 2007-08-31 10:48:19.359 3932 GL-MISC 1945 2007-08-31 10:48:19.359 3933 GL-MISC 1946 2007-08-31 10:53:38.312 3934 AP-VO 1947 2007-08-31 10:58:22.421 3935 AP-CK 1948 2007-08-31 10:58:22.421 3936 AP-MISC 1949 2007-08-31 10:58:22.421 3937 AP-MISC 1950 2007-08-31 10:59:55.343 3938 GL-MISC 1951 2007-08-31 10:59:55.343 3939 GL-MISC 1952 2007-08-31 11:00:21.625 3940 GL-MISC 1953 2007-08-31 11:00:21.625 3941 GL-MISC 1954 2007-08-31 11:00:21.625 3942 GL-MISC 1955 2007-08-31 11:00:26.421 3943 GL-MISC 1956 2007-08-31 11:00:26.421 3944 GL-MISC 1957 2007-08-31 11:03:44.609 3945 GL-MISC 1958 2007-08-31 11:03:44.609 3946 GL-MISC 1959 2007-08-31 11:03:44.609 3947 GL-MISC 1960 2007-08-31 11:03:44.609 3948 GL-MISC 1961 2007-08-31 11:03:44.609 3949 GL-MISC 1962 2007-08-31 11:03:44.609 3950 GL-MISC 1963 2007-08-31 11:03:44.609 3951 GL-MISC 1964 2007-08-31 11:03:44.609 3952 GL-MISC 1965 2007-08-31 11:03:44.609 3953 GL-MISC 1966 2007-08-31 11:03:44.609 3954 GL-MISC 1967 2007-08-31 11:03:44.609 3955 GL-MISC 1968 2007-08-31 11:04:08.515 3956 GL-MISC 1969 2007-08-31 11:04:08.515 3957 GL-MISC 1970 2007-08-31 11:05:32.687 3958 GL-MISC 1971 2007-08-31 11:06:05.406 3959 GL-MISC 1972 2007-08-31 11:11:48.046 3960 AR-IN 1973 2007-08-31 11:12:12.265 3961 AR-MISC 1974 2007-08-31 11:13:17.234 3962 C/R 1975 2007-08-31 11:23:55.218 3963 AP-CK 1976 2007-09-21 14:11:05.484 3964 GL-MISC 1977 2007-09-21 14:15:09 3965 GL-MISC 1978 2007-09-21 14:16:04.671 3966 GL-MISC 1979 2007-09-21 14:16:04.671 3967 GL-MISC 1980 2007-09-21 14:35:19.39 3968 GL-MISC 1981 2007-09-21 14:35:19.39 3969 GL-MISC 1982 2007-09-21 14:35:19.39 3970 GL-MISC 1983 2007-09-21 14:35:19.39 3971 GL-MISC 1984 2007-09-21 14:38:37.406 3972 AP-VO 1985 2007-09-21 14:40:57.734 3973 AP-CK 1986 2007-09-21 14:40:57.734 3974 AP-MISC 1987 2007-09-21 14:40:57.734 3975 AP-MISC 1988 2007-09-21 14:51:13.093 3976 GL-MISC 1989 2007-09-21 14:51:13.093 3977 GL-MISC 1990 2007-09-21 14:51:13.093 3978 GL-MISC 1991 2007-09-21 14:51:13.093 3979 GL-MISC 1992 2007-09-21 14:51:13.093 3980 GL-MISC 1993 2007-09-21 14:51:22.203 3981 GL-MISC 1994 2007-09-21 14:51:22.203 3982 GL-MISC 1995 2007-09-21 14:51:32.156 3983 GL-MISC 1996 2007-09-21 14:51:32.156 3984 GL-MISC 1997 2007-09-21 14:51:32.156 3985 GL-MISC 1998 2007-09-21 14:51:32.156 3986 GL-MISC 1999 2007-09-21 14:51:50.062 3987 GL-MISC 2000 2007-09-21 14:51:50.062 3988 GL-MISC 2001 2007-09-21 14:51:50.062 3989 GL-MISC 2002 2007-09-21 14:52:01.89 3990 GL-MISC 2003 2007-09-21 14:52:01.89 3991 GL-MISC 2004 2007-09-21 14:52:01.89 3992 GL-MISC 2005 2007-09-21 14:52:01.89 3993 GL-MISC 2006 2007-09-21 14:52:09.39 3994 GL-MISC 2007 2007-09-21 14:52:09.39 3995 GL-MISC 2008 2007-09-21 14:52:31.734 3996 GL-MISC 2009 2007-09-21 14:53:18.546 3997 GL-MISC 2010 2007-09-21 14:56:29.468 3998 AR-IN 2011 2007-09-21 14:56:58.14 3999 AR-IN 2012 2007-09-21 14:58:02 4000 C/R 2013 2007-09-21 14:58:38.015 4001 AR-MISC 2014 2007-09-21 14:58:59.734 4002 C/R 2015 2007-12-14 12:15:31.25 4003 G/L 2016 2007-12-14 12:16:24.734 4004 G/L 2017 2007-12-14 12:17:14.109 4005 G/L 2018 2007-12-14 12:22:29.796 4006 GL-MISC 2019 2007-12-14 12:27:05.453 4007 GL-MISC 2020 2007-12-14 12:39:54.078 4008 GL-MISC 2021 2007-12-14 12:40:16.656 4009 GL-MISC 2022 2007-12-14 12:40:56.843 4010 GL-MISC 2023 2007-12-14 12:40:56.843 4011 GL-MISC 2024 2007-12-14 12:42:22.031 4012 GL-MISC 2025 2007-12-14 12:42:22.031 4013 GL-MISC 2026 2007-12-14 12:42:22.437 4014 GL-MISC 2027 2007-12-14 12:42:22.437 4015 GL-MISC 2028 2007-12-14 12:44:31.203 4016 AP-VO 2029 2007-12-14 12:46:00.625 4017 AP-CK 2030 2007-12-14 12:46:10.64 4018 AP-CK 2031 2007-12-14 12:47:46.312 4019 AP-CK 2032 2007-12-14 12:47:46.312 4020 AP-MISC 2033 2007-12-14 12:47:46.312 4021 AP-MISC 2034 2007-12-14 12:48:12.484 4022 AP-CK 2035 2007-12-14 12:48:12.484 4023 AP-MISC 2036 2007-12-14 12:48:12.484 4024 AP-MISC 2037 2007-12-14 12:48:12.484 4025 AP-MISC 2038 2007-12-14 12:48:12.484 4026 AP-MISC 2039 2007-12-14 12:54:24.125 4027 GL-MISC 2040 2007-12-14 12:54:24.125 4028 GL-MISC 2041 2007-12-14 12:54:24.125 4029 GL-MISC 2042 2007-12-14 12:54:24.125 4030 GL-MISC 2043 2007-12-14 12:54:24.125 4031 GL-MISC 2044 2007-12-14 12:54:44.265 4032 GL-MISC 2045 2007-12-14 12:54:44.265 4033 GL-MISC 2046 2007-12-14 12:58:51.468 4034 GL-MISC 2047 2007-12-14 12:58:51.468 4035 GL-MISC 2048 2007-12-14 12:58:51.468 4036 GL-MISC 2049 2007-12-14 12:58:51.468 4037 GL-MISC 2050 2007-12-14 12:59:10.765 4038 GL-MISC 2051 2007-12-14 12:59:10.765 4039 GL-MISC 2052 2007-12-14 12:59:10.765 4040 GL-MISC 2053 2007-12-14 12:59:10.765 4041 GL-MISC 2054 2007-12-14 12:59:41.218 4042 GL-MISC 2055 2007-12-14 12:59:41.218 4043 GL-MISC 2056 2007-12-14 12:59:41.218 4044 GL-MISC 2057 2007-12-14 12:59:57.046 4045 GL-MISC 2058 2007-12-14 12:59:57.046 4046 GL-MISC 2059 2007-12-14 12:59:57.046 4047 GL-MISC 2060 2007-12-14 12:59:57.046 4048 GL-MISC 2061 2007-12-14 13:00:40.359 4049 GL-MISC 2062 2007-12-14 13:00:47.765 4050 GL-MISC 2063 2007-12-14 13:00:47.765 4051 GL-MISC 2064 2007-12-14 13:01:02.421 4052 GL-MISC 2065 2007-12-14 13:01:02.421 4053 GL-MISC 2066 2007-12-14 13:01:02.421 4054 GL-MISC 2067 2007-12-14 13:01:02.421 4055 GL-MISC 2068 2007-12-14 13:01:02.421 4056 GL-MISC 2069 2007-12-14 13:01:02.421 4057 GL-MISC 2070 2007-12-14 13:01:02.421 4058 GL-MISC 2071 2007-12-14 13:01:02.421 4059 GL-MISC 2072 2007-12-14 13:01:02.421 4060 GL-MISC 2073 2007-12-14 13:01:02.421 4061 GL-MISC 2074 2007-12-14 13:01:02.421 4062 GL-MISC 2075 2007-12-14 13:01:17.109 4063 GL-MISC 2076 2007-12-14 13:01:17.109 4064 GL-MISC 2077 2007-12-14 13:04:17.796 4065 GL-MISC 2078 2007-12-14 13:04:17.796 4066 GL-MISC 2079 2007-12-14 13:04:29.437 4067 GL-MISC 2080 2007-12-14 13:04:29.437 4068 GL-MISC 2081 2007-12-14 13:06:56.453 4069 AR-IN 2082 2007-12-14 13:13:04.281 4070 AR-CM 2083 2007-12-14 13:20:21.218 4071 GL-MISC 2084 2007-12-14 13:20:21.218 4072 GL-MISC 2085 2007-12-14 13:20:21.218 4073 GL-MISC 2086 2007-12-14 13:20:21.218 4074 GL-MISC 2087 2007-12-14 13:22:14.218 4075 GL-MISC 2088 2007-12-14 13:22:14.218 4076 GL-MISC 2089 2007-12-14 13:22:22.203 4077 GL-MISC 2090 2007-12-14 13:22:22.203 4078 GL-MISC 2091 2007-12-14 13:22:43.234 4079 AR-IN 2092 2007-12-14 13:28:55.109 4080 GL-MISC 2093 2007-12-14 13:29:29.015 4081 GL-MISC 2094 2007-12-14 13:33:21.921 4082 C/R 2095 2007-12-14 13:34:53.031 4083 GL-MISC 2096 2007-12-14 13:35:04.562 4084 AR-IN 2097 2007-12-14 13:35:51.39 4085 C/R 2098 2007-12-20 11:40:50.499 4086 GL-MISC 2099 2007-12-20 11:40:50.499 4087 GL-MISC 2100 2007-12-20 11:42:54.937 4088 GL-MISC 2101 2007-12-20 11:43:14.859 4089 GL-MISC 2102 2007-12-20 11:43:35.265 4090 GL-MISC 2103 2007-12-20 11:43:35.265 4091 GL-MISC 2104 2007-12-20 11:44:18.921 4092 GL-MISC 2105 2007-12-20 11:44:18.921 4093 GL-MISC 2106 2007-12-20 11:46:03.249 4094 GL-MISC 2107 2007-12-20 11:46:19.249 4095 GL-MISC 2108 2007-12-20 11:58:07.109 4096 AR-IN 2109 2007-12-20 11:58:43.359 4097 C/R 2110 2008-03-04 13:32:50.580975 4099 GL-MISC 2111 2008-03-04 13:32:50.580975 4100 GL-MISC 2112 2008-03-04 13:32:50.580975 4101 GL-MISC 2113 2008-03-04 13:32:50.580975 4102 GL-MISC 2114 2008-03-04 13:47:46.067965 4103 AP-VO 2115 2008-03-04 13:48:16.915193 4104 AP-CK 2116 2008-03-04 13:49:58.224897 4105 AP-CK 2117 2008-03-04 13:49:58.224897 4106 AP-MISC 2118 2008-03-04 13:49:58.224897 4107 AP-MISC 2119 2008-03-04 13:50:55.481281 4108 GL-MISC 2120 2008-03-04 13:50:55.481281 4109 GL-MISC 2121 2008-03-04 13:50:55.481281 4110 GL-MISC 2122 2008-03-04 13:50:55.481281 4111 GL-MISC 2123 2008-03-04 13:50:55.481281 4112 GL-MISC 2124 2008-03-04 13:50:59.076414 4113 GL-MISC 2125 2008-03-04 13:50:59.076414 4114 GL-MISC 2126 2008-03-04 13:51:21.731285 4115 GL-MISC 2127 2008-03-04 13:51:21.731285 4116 GL-MISC 2128 2008-03-04 13:51:21.731285 4117 GL-MISC 2129 2008-03-04 13:51:21.731285 4118 GL-MISC 2130 2008-03-04 13:51:21.731285 4119 GL-MISC 2131 2008-03-04 13:51:21.731285 4120 GL-MISC 2132 2008-03-04 13:51:21.731285 4121 GL-MISC 2133 2008-03-04 13:51:21.731285 4122 GL-MISC 2134 2008-03-04 13:51:21.731285 4123 GL-MISC 2135 2008-03-04 13:51:21.731285 4124 GL-MISC 2136 2008-03-04 13:51:21.731285 4125 GL-MISC 2137 2008-03-04 13:52:47.476609 4126 GL-MISC 2138 2008-03-04 13:52:47.476609 4127 GL-MISC 2139 2008-03-04 14:12:42.842887 4128 GL-MISC 2140 2008-03-04 14:12:42.842887 4129 GL-MISC 2141 2008-03-04 14:12:42.842887 4130 GL-MISC 2142 2008-03-04 14:12:42.842887 4131 GL-MISC 2143 2008-03-04 14:12:42.842887 4132 GL-MISC 2144 2008-03-04 14:12:46.171624 4133 GL-MISC 2145 2008-03-04 14:12:46.171624 4134 GL-MISC 2146 2008-03-04 14:12:56.581783 4135 GL-MISC 2147 2008-03-04 14:12:56.581783 4136 GL-MISC 2148 2008-03-04 14:12:56.581783 4137 GL-MISC 2149 2008-03-04 14:12:56.581783 4138 GL-MISC 2150 2008-03-04 14:12:56.581783 4139 GL-MISC 2151 2008-03-04 14:12:56.581783 4140 GL-MISC 2152 2008-03-04 14:12:56.581783 4141 GL-MISC 2153 2008-03-04 14:12:56.581783 4142 GL-MISC 2154 2008-03-04 14:12:56.581783 4143 GL-MISC 2155 2008-03-04 14:12:56.581783 4144 GL-MISC 2156 2008-03-04 14:12:56.581783 4145 GL-MISC 2157 2008-03-04 14:13:56.021518 4146 GL-MISC 2158 2008-03-04 14:13:56.021518 4147 GL-MISC 2159 2008-03-04 14:14:07.002445 4148 GL-MISC 2160 2008-03-04 14:14:07.002445 4149 GL-MISC 2161 2008-03-04 14:14:07.002445 4150 GL-MISC 2162 2008-03-04 14:14:07.002445 4151 GL-MISC 2163 2008-03-04 14:14:07.002445 4152 GL-MISC 2164 2008-03-04 14:14:07.002445 4153 GL-MISC 2165 2008-03-04 14:14:07.002445 4154 GL-MISC 2166 2008-03-04 14:14:07.002445 4155 GL-MISC 2167 2008-03-04 14:14:07.002445 4156 GL-MISC 2168 2008-03-04 14:14:07.002445 4157 GL-MISC 2169 2008-03-04 14:14:07.002445 4158 GL-MISC 2170 2008-03-04 14:14:42.493533 4159 GL-MISC 2171 2008-03-04 14:14:42.493533 4160 GL-MISC 2172 2008-03-04 14:14:57.827315 4161 GL-MISC 2173 2008-03-04 14:14:57.827315 4162 GL-MISC 2174 2008-03-04 14:22:17.337822 4163 GL-MISC 2175 2008-03-04 14:22:17.337822 4164 GL-MISC 2176 2008-03-04 14:22:51.268176 4165 AR-IN 2177 2008-03-04 14:48:50.540491 4166 C/R 2178 2008-03-04 14:50:42.018531 4167 G/L 2179 2008-03-04 14:51:14.947621 4168 G/L 2180 2008-03-04 14:58:41.775501 4169 GL-MISC 2181 2008-03-04 15:00:49.342762 4170 GL-MISC 2182 2008-03-04 15:00:49.342762 4171 GL-MISC 2183 2008-03-04 15:02:11.531401 4172 AP-VO 2184 2008-03-04 15:02:35.553117 4173 AP-CK 2185 2008-03-04 15:03:14.291081 4174 AP-CK 2186 2008-03-04 15:03:14.291081 4175 AP-MISC 2187 2008-03-04 15:03:14.291081 4176 AP-MISC 2188 2008-03-04 16:24:15.174532 4177 GL-MISC 2189 2008-03-04 16:24:15.174532 4178 GL-MISC 2190 2008-03-04 16:28:09.617709 4179 GL-MISC 2191 2008-03-04 16:28:48.025446 4180 GL-MISC 2192 2008-03-04 16:28:57.604454 4181 GL-MISC 2193 2008-03-04 16:29:31.915105 4182 AR-IN 2194 2008-03-04 16:35:37.5038 4183 GL-MISC 2195 2008-03-04 16:35:37.5038 4184 GL-MISC 2196 2008-03-04 16:36:38.714943 4185 GL-MISC 2197 2008-03-04 16:36:50.739787 4186 GL-MISC 2198 2008-03-05 13:45:29.502058 4187 GL-MISC 2199 2008-03-05 13:45:29.502058 4188 GL-MISC 2200 2008-03-05 13:45:49.616164 4189 AP-VO 2201 2008-03-05 13:46:06.482173 4190 AP-CK 2202 2008-03-05 13:46:29.52948 4191 AP-CK 2203 2008-03-05 13:46:29.52948 4192 AP-MISC 2204 2008-03-05 13:46:29.52948 4193 AP-MISC 2205 2008-03-05 13:47:57.845732 4194 GL-MISC 2206 2008-03-05 13:47:57.845732 4195 GL-MISC 2207 2008-03-05 13:47:57.845732 4196 GL-MISC 2208 2008-03-05 13:47:57.845732 4197 GL-MISC 2209 2008-03-05 13:47:57.845732 4198 GL-MISC 2210 2008-03-05 13:48:23.073216 4199 GL-MISC 2211 2008-03-05 13:48:50.70616 4200 GL-MISC 2212 2008-03-05 13:48:59.472888 4201 GL-MISC 2213 2008-03-05 13:48:59.472888 4202 GL-MISC 2214 2008-03-05 13:49:15.295821 4203 GL-MISC 2215 2008-03-05 13:49:15.295821 4204 GL-MISC 2216 2008-03-05 13:49:15.295821 4205 GL-MISC 2217 2008-03-05 13:49:15.295821 4206 GL-MISC 2218 2008-03-05 13:49:15.295821 4207 GL-MISC 2219 2008-03-05 13:49:15.295821 4208 GL-MISC 2220 2008-03-05 13:49:15.295821 4209 GL-MISC 2221 2008-03-05 13:49:15.295821 4210 GL-MISC 2222 2008-03-05 13:49:15.295821 4211 GL-MISC 2223 2008-03-05 13:49:15.295821 4212 GL-MISC 2224 2008-03-05 13:49:15.295821 4213 GL-MISC 2225 2008-03-05 13:49:26.767851 4214 GL-MISC 2226 2008-03-05 13:49:26.767851 4215 GL-MISC 2227 2008-03-05 13:49:55.908928 4216 GL-MISC 2228 2008-03-05 13:50:01.927414 4217 GL-MISC 2229 2008-03-05 13:50:21.043998 4218 AR-IN 2230 2008-03-05 13:53:41.272998 4219 C/R 2231 2008-03-05 13:57:29.476095 4220 GL-MISC 2232 2008-03-05 13:57:29.476095 4221 GL-MISC 2233 2008-03-05 13:59:02.754616 4222 GL-MISC 2234 2008-03-05 13:59:16.887841 4223 GL-MISC 2235 2008-03-05 13:59:33.203182 4224 AR-IN 2236 2008-03-05 14:15:32.220233 4225 GL-MISC 2237 2008-04-04 08:25:39.01014 4226 GL-MISC 2238 2008-04-04 08:28:03.483859 4227 GL-MISC 2239 2008-04-04 08:30:04.953274 4228 GL-MISC 2240 2008-04-04 08:34:33.508501 4229 AR-IN 2241 2008-04-04 08:43:12.508474 4230 GL-MISC 2242 2008-04-04 08:43:12.508474 4231 GL-MISC 2243 2008-04-04 08:43:12.508474 4232 GL-MISC 2244 2008-04-04 08:43:12.508474 4233 GL-MISC 2245 2008-04-04 08:43:12.508474 4234 GL-MISC 2246 2008-04-04 08:43:12.508474 4235 GL-MISC 2247 2008-04-04 08:43:12.508474 4236 GL-MISC 2248 2008-04-04 08:43:12.508474 4237 GL-MISC 2249 2008-04-04 08:43:12.508474 4238 GL-MISC 2250 2008-04-04 08:43:12.508474 4239 GL-MISC 2251 2008-04-04 08:43:27.715534 4240 GL-MISC 2252 2008-04-04 08:43:27.715534 4241 GL-MISC 2253 2008-04-04 08:45:05.342734 4242 GL-MISC 2254 2008-04-04 08:45:05.342734 4243 GL-MISC 2255 2008-04-04 08:45:05.342734 4244 GL-MISC 2256 2008-04-04 08:45:05.342734 4245 GL-MISC 2257 2008-04-04 08:45:05.342734 4246 GL-MISC 2258 2008-04-04 08:45:05.342734 4247 GL-MISC 2259 2008-04-04 08:46:00.842417 4248 GL-MISC 2260 2008-04-04 08:47:14.918988 4249 GL-MISC 2261 2008-04-04 08:48:54.708584 4250 AR-IN 2262 2008-04-04 08:50:44.011463 4251 C/R 2263 2008-04-04 08:54:16.263064 4252 AP-VO 2264 2008-04-04 08:55:12.541329 4253 AP-CK 2265 2008-04-04 08:56:30.323975 4254 AP-CK 2266 2008-04-04 08:56:30.323975 4255 AP-MISC 2267 2008-04-04 08:56:30.323975 4256 AP-MISC 2268 2008-06-12 08:53:45.773684 4257 GL-MISC 2269 2008-06-12 08:53:58.987996 4258 GL-MISC 2270 2008-06-12 09:43:11.974418 4259 AR-IN 2271 2008-06-12 09:47:43.462893 4260 C/R 2272 2008-06-12 10:22:29.749952 4261 AR-IN 2273 2008-06-12 10:23:15.690661 4262 C/R 2274 2008-06-12 10:37:18.668254 4263 GL-MISC 2275 2008-06-12 10:37:18.668254 4264 GL-MISC 2276 2008-06-12 11:04:13.200615 4265 AP-VO 2277 2008-06-12 11:56:15.971837 4266 C/R 2278 2008-06-12 13:20:44.562889 4267 GL-MISC 2279 2008-06-12 13:20:44.562889 4268 GL-MISC 2280 2008-06-12 13:20:44.562889 4269 GL-MISC 2281 2008-06-12 13:20:44.562889 4270 GL-MISC 2282 2008-06-12 13:20:44.562889 4271 GL-MISC 2283 2008-06-12 13:20:44.562889 4272 GL-MISC 2284 2008-06-12 13:20:44.562889 4273 GL-MISC 2285 2008-06-12 13:20:44.562889 4274 GL-MISC 2286 2008-06-12 13:20:44.562889 4275 GL-MISC 2287 2008-06-12 13:20:44.562889 4276 GL-MISC 2288 2008-06-12 13:20:44.562889 4277 GL-MISC 2289 2008-06-12 13:20:44.562889 4278 GL-MISC 2290 2008-06-12 13:20:44.562889 4279 GL-MISC 2291 2008-06-12 13:20:44.562889 4280 GL-MISC 2292 2008-06-12 13:20:44.562889 4281 GL-MISC 2293 2008-06-12 13:20:44.562889 4282 GL-MISC 2294 2008-06-12 13:20:44.562889 4283 GL-MISC 2295 2008-06-12 13:20:44.562889 4284 GL-MISC 2296 2008-06-12 13:20:44.562889 4285 GL-MISC 2297 2008-06-12 13:20:44.562889 4286 GL-MISC 2298 2008-06-12 13:20:44.562889 4287 GL-MISC 2299 2008-06-12 13:20:44.562889 4288 GL-MISC 2300 2008-06-12 13:20:44.562889 4289 GL-MISC 2301 2008-06-12 13:20:44.562889 4290 GL-MISC 2302 2008-06-12 13:20:44.562889 4291 GL-MISC 2303 2008-06-12 13:20:44.562889 4292 GL-MISC 2304 2008-06-12 13:20:44.562889 4293 GL-MISC 2305 2008-06-12 13:20:44.562889 4294 GL-MISC 2306 2008-06-12 13:20:44.562889 4295 GL-MISC 2307 2008-06-12 13:20:44.562889 4296 GL-MISC 2308 2008-06-12 13:20:44.562889 4297 GL-MISC 2309 2008-06-12 13:20:44.562889 4298 GL-MISC 2310 2008-06-12 13:20:44.562889 4299 GL-MISC 2311 2008-06-12 13:20:44.562889 4300 GL-MISC 2312 2008-06-12 13:20:44.562889 4301 GL-MISC 2313 2008-06-12 13:20:44.562889 4302 GL-MISC 2314 2008-06-12 13:20:44.562889 4303 GL-MISC 2315 2008-06-12 13:20:44.562889 4304 GL-MISC 2316 2008-06-12 13:20:44.562889 4305 GL-MISC 2317 2008-06-12 13:20:44.562889 4306 GL-MISC 2318 2008-06-12 13:20:44.562889 4307 GL-MISC 2319 2008-06-12 13:20:44.562889 4308 GL-MISC 2320 2008-06-12 13:20:44.562889 4309 GL-MISC 2321 2008-06-12 13:20:44.562889 4310 GL-MISC 2322 2008-06-12 13:20:44.562889 4311 GL-MISC 2323 2008-06-12 13:20:44.562889 4312 GL-MISC 2324 2008-06-12 13:20:44.562889 4313 GL-MISC 2325 2008-06-12 13:20:44.562889 4314 GL-MISC 2326 2008-06-12 13:20:44.562889 4315 GL-MISC 2327 2008-06-12 13:20:44.562889 4316 GL-MISC 2328 2008-06-12 13:20:44.562889 4317 GL-MISC 2329 2008-06-12 13:20:44.562889 4318 GL-MISC 2330 2008-06-12 13:20:44.562889 4319 GL-MISC 2331 2008-06-12 13:20:44.562889 4320 GL-MISC 2332 2008-06-12 13:20:44.562889 4321 GL-MISC 2333 2008-06-12 13:20:44.562889 4322 GL-MISC 2334 2008-06-12 13:20:44.562889 4323 GL-MISC 2335 2008-06-12 13:20:44.562889 4324 GL-MISC 2336 2008-06-12 13:20:44.562889 4325 GL-MISC 2337 2008-06-12 13:20:44.562889 4326 GL-MISC 2338 2008-06-12 13:20:44.562889 4327 GL-MISC 2339 2008-06-12 13:20:44.562889 4328 GL-MISC 2340 2008-06-12 13:20:44.562889 4329 GL-MISC 2341 2008-06-12 13:20:44.562889 4330 GL-MISC 2342 2008-06-12 13:20:44.562889 4331 GL-MISC 2343 2008-06-12 13:20:44.562889 4332 GL-MISC 2344 2008-06-12 13:20:44.562889 4333 GL-MISC 2345 2008-06-12 13:20:44.562889 4334 GL-MISC 2346 2008-06-12 13:20:44.562889 4335 GL-MISC 2347 2008-06-12 13:20:44.562889 4336 GL-MISC 2348 2008-06-12 13:20:44.562889 4337 GL-MISC 2349 2008-06-12 13:20:44.562889 4338 GL-MISC 2350 2008-06-12 13:20:44.562889 4339 GL-MISC 2351 2008-06-12 13:20:44.562889 4340 GL-MISC 2352 2008-06-12 13:20:44.562889 4341 GL-MISC 2353 2008-06-12 13:20:44.562889 4342 GL-MISC 2354 2008-06-12 13:20:44.562889 4343 GL-MISC 2355 2008-06-12 13:20:44.562889 4344 GL-MISC 2356 2008-06-12 13:20:44.562889 4345 GL-MISC 2357 2008-06-12 13:20:44.562889 4346 GL-MISC 2358 2008-06-12 13:20:44.562889 4347 GL-MISC 2359 2008-06-12 13:20:44.562889 4348 GL-MISC 2360 2008-06-12 13:20:44.562889 4349 GL-MISC 2361 2008-06-12 13:20:44.562889 4350 GL-MISC 2362 2008-06-12 13:20:44.562889 4351 GL-MISC 2363 2008-06-12 13:20:44.562889 4352 GL-MISC 2364 2008-06-12 13:20:44.562889 4353 GL-MISC 2365 2008-06-12 13:20:44.562889 4354 GL-MISC 2366 2008-06-12 13:20:44.562889 4355 GL-MISC 2367 2008-06-12 13:20:44.562889 4356 GL-MISC 2368 2008-06-12 13:20:44.562889 4357 GL-MISC 2369 2008-06-12 13:20:44.562889 4358 GL-MISC 2370 2008-06-12 13:20:44.562889 4359 GL-MISC 2371 2008-06-12 13:20:44.562889 4360 GL-MISC 2372 2008-06-12 13:20:44.562889 4361 GL-MISC 2373 2008-06-12 13:20:44.562889 4362 GL-MISC 2374 2008-06-12 13:20:44.562889 4363 GL-MISC 2375 2008-06-12 13:20:44.562889 4364 GL-MISC 2376 2008-06-12 13:20:44.562889 4365 GL-MISC 2377 2008-06-12 13:20:44.562889 4366 GL-MISC 2378 2008-06-12 13:20:44.562889 4367 GL-MISC 2379 2008-06-12 13:20:44.562889 4368 GL-MISC 2380 2008-06-12 13:20:44.562889 4369 GL-MISC 2381 2008-06-12 13:20:44.562889 4370 GL-MISC 2382 2008-06-12 13:20:44.562889 4371 GL-MISC 2383 2008-06-12 13:20:44.562889 4372 GL-MISC 2384 2008-06-12 13:20:44.562889 4373 GL-MISC 2385 2008-06-12 13:20:44.562889 4374 GL-MISC 2386 2008-06-12 13:20:44.562889 4375 GL-MISC 2387 2008-06-12 13:20:44.562889 4376 GL-MISC 2388 2008-06-12 13:20:44.562889 4377 GL-MISC 2389 2008-06-12 13:20:44.562889 4378 GL-MISC 2390 2008-06-12 13:20:44.562889 4379 GL-MISC 2391 2008-06-12 13:20:44.562889 4380 GL-MISC 2392 2008-06-12 13:20:44.562889 4381 GL-MISC 2393 2008-06-12 13:20:44.562889 4382 GL-MISC 2394 2008-06-12 13:20:44.562889 4383 GL-MISC 2395 2008-06-12 13:20:44.562889 4384 GL-MISC 2396 2008-06-12 13:20:44.562889 4385 GL-MISC 2397 2008-06-12 13:20:44.562889 4386 GL-MISC 2398 2008-06-12 13:20:44.562889 4387 GL-MISC 2399 2008-06-12 13:20:44.562889 4388 GL-MISC 2400 2008-06-12 13:20:44.562889 4389 GL-MISC 2401 2008-06-12 13:20:44.562889 4390 GL-MISC 2402 2008-06-12 13:20:44.562889 4391 GL-MISC 2403 2008-06-12 13:20:44.562889 4392 GL-MISC 2404 2008-06-12 13:20:44.562889 4393 GL-MISC 2405 2008-06-12 13:20:44.562889 4394 GL-MISC 2406 2008-06-12 13:20:44.562889 4395 GL-MISC 2407 2008-06-12 13:20:44.562889 4396 GL-MISC 2408 2008-06-12 13:20:44.562889 4397 GL-MISC 2409 2008-06-12 13:20:44.562889 4398 GL-MISC 2410 2008-06-12 13:20:44.562889 4399 GL-MISC 2411 2008-06-12 13:20:44.562889 4400 GL-MISC 2412 2008-06-12 13:20:44.562889 4401 GL-MISC 2413 2008-06-12 13:20:44.562889 4402 GL-MISC 2414 2008-06-12 13:20:44.562889 4403 GL-MISC 2415 2008-06-12 13:20:44.562889 4404 GL-MISC 2416 2008-06-12 13:20:44.562889 4405 GL-MISC 2417 2008-06-12 13:20:44.562889 4406 GL-MISC 2418 2008-06-12 13:20:44.562889 4407 GL-MISC 2419 2008-06-12 13:20:44.562889 4408 GL-MISC 2420 2008-06-12 13:20:44.562889 4409 GL-MISC 2421 2008-06-12 13:20:44.562889 4410 GL-MISC 2422 2008-06-12 13:20:44.562889 4411 GL-MISC 2423 2008-06-12 13:20:44.562889 4412 GL-MISC 2424 2008-06-12 13:20:44.562889 4413 GL-MISC 2425 2008-06-12 13:20:44.562889 4414 GL-MISC 2426 2008-06-12 13:20:44.562889 4415 GL-MISC 2427 2008-06-12 13:20:44.562889 4416 GL-MISC 2428 2008-06-12 13:20:44.562889 4417 GL-MISC 2429 2008-06-12 13:20:44.562889 4418 GL-MISC 2430 2008-06-12 13:20:44.562889 4419 GL-MISC 2431 2008-06-12 13:20:44.562889 4420 GL-MISC 2432 2008-06-12 13:20:44.562889 4421 GL-MISC 2433 2008-06-12 13:20:44.562889 4422 GL-MISC 2434 2008-06-12 13:20:44.562889 4423 GL-MISC 2435 2008-06-12 13:20:44.562889 4424 GL-MISC 2436 2008-06-12 13:20:44.562889 4425 GL-MISC 2437 2008-06-12 13:20:44.562889 4426 GL-MISC 2438 2008-06-12 13:20:44.562889 4427 GL-MISC 2439 2008-06-12 13:20:44.562889 4428 GL-MISC 2440 2008-06-12 13:20:44.562889 4429 GL-MISC 2441 2008-06-12 13:20:44.562889 4430 GL-MISC 2442 2008-06-12 13:20:44.562889 4431 GL-MISC 2443 2008-06-12 13:20:44.562889 4432 GL-MISC 2444 2008-06-12 13:20:44.562889 4433 GL-MISC 2445 2008-06-12 13:20:44.562889 4434 GL-MISC 2446 2008-06-12 13:20:44.562889 4435 GL-MISC 2447 2008-06-12 13:20:44.562889 4436 GL-MISC 2448 2008-06-12 13:20:44.562889 4437 GL-MISC 2449 2008-06-12 13:20:44.562889 4438 GL-MISC 2450 2008-06-12 13:20:44.562889 4439 GL-MISC 2451 2008-06-12 13:20:44.562889 4440 GL-MISC 2452 2008-06-12 13:20:44.562889 4441 GL-MISC 2453 2008-06-12 13:20:44.562889 4442 GL-MISC 2454 2008-06-12 13:20:44.562889 4443 GL-MISC 2455 2008-06-12 13:20:44.562889 4444 GL-MISC 2456 2008-06-12 13:20:44.562889 4445 GL-MISC 2457 2008-06-12 13:20:44.562889 4446 GL-MISC 2458 2008-06-12 13:20:44.562889 4447 GL-MISC 2459 2008-06-12 13:20:44.562889 4448 GL-MISC 2460 2008-06-12 13:20:44.562889 4449 GL-MISC 2461 2008-06-12 13:20:44.562889 4450 GL-MISC 2462 2008-06-12 13:20:44.562889 4451 GL-MISC 2463 2008-06-12 13:20:44.562889 4452 GL-MISC 2464 2008-06-12 13:20:44.562889 4453 GL-MISC 2465 2008-06-12 13:20:44.562889 4454 GL-MISC 2466 2008-06-12 13:20:44.562889 4455 GL-MISC 2467 2008-06-12 13:20:44.562889 4456 GL-MISC 2468 2008-06-12 13:20:44.562889 4457 GL-MISC 2469 2008-06-12 13:20:44.562889 4458 GL-MISC 2470 2008-06-12 13:20:44.562889 4459 GL-MISC 2471 2008-06-12 13:20:44.562889 4460 GL-MISC 2472 2008-06-12 13:20:44.562889 4461 GL-MISC 2473 2008-06-12 13:20:44.562889 4462 GL-MISC 2474 2008-06-12 13:20:44.562889 4463 GL-MISC 2475 2008-06-12 13:20:44.562889 4464 GL-MISC 2476 2008-06-12 13:20:44.562889 4465 GL-MISC 2477 2008-06-12 13:20:44.562889 4466 GL-MISC 2478 2008-06-12 13:20:44.562889 4467 GL-MISC 2479 2008-06-12 13:20:44.562889 4468 GL-MISC 2480 2008-06-12 13:20:44.562889 4469 GL-MISC 2481 2008-06-12 13:20:44.562889 4470 GL-MISC 2482 2008-06-12 13:20:44.562889 4471 GL-MISC 2483 2008-06-12 13:20:44.562889 4472 GL-MISC 2484 2008-06-12 13:20:44.562889 4473 GL-MISC 2485 2008-06-12 13:20:44.562889 4474 GL-MISC 2486 2008-06-12 13:20:44.562889 4475 GL-MISC 2487 2008-06-12 13:20:44.562889 4476 GL-MISC 2488 2008-06-12 13:20:44.562889 4477 GL-MISC 2489 2008-06-12 13:20:44.562889 4478 GL-MISC 2490 2008-06-12 13:20:44.562889 4479 GL-MISC 2491 2008-06-12 13:20:44.562889 4480 GL-MISC 2492 2008-06-12 13:20:44.562889 4481 GL-MISC 2493 2008-06-12 13:20:44.562889 4482 GL-MISC 2494 2008-06-12 13:20:44.562889 4483 GL-MISC 2495 2008-06-12 13:20:44.562889 4484 GL-MISC 2496 2008-06-12 13:20:44.562889 4485 GL-MISC 2497 2008-06-12 13:20:44.562889 4486 GL-MISC 2498 2008-06-12 13:20:44.562889 4487 GL-MISC 2499 2008-06-12 13:20:44.562889 4488 GL-MISC 2500 2008-06-12 13:20:44.562889 4489 GL-MISC 2501 2008-06-12 13:20:44.562889 4490 GL-MISC 2502 2008-06-12 13:20:44.562889 4491 GL-MISC 2503 2008-06-12 13:20:44.562889 4492 GL-MISC 2504 2008-06-12 13:20:44.562889 4493 GL-MISC 2505 2008-06-12 13:20:44.562889 4494 GL-MISC 2506 2008-06-12 13:20:44.562889 4495 GL-MISC 2507 2008-06-12 13:20:44.562889 4496 GL-MISC 2508 2008-06-12 13:20:44.562889 4497 GL-MISC 2509 2008-06-12 13:20:44.562889 4498 GL-MISC 2510 2008-06-12 13:20:44.562889 4499 GL-MISC 2511 2008-06-12 13:20:44.562889 4500 GL-MISC 2512 2008-06-12 13:20:44.562889 4501 GL-MISC 2513 2008-06-12 13:20:44.562889 4502 GL-MISC 2514 2008-06-12 13:20:44.562889 4503 GL-MISC 2515 2008-06-12 13:20:44.562889 4504 GL-MISC 2516 2008-06-12 13:20:44.562889 4505 GL-MISC 2517 2008-06-12 13:20:44.562889 4506 GL-MISC 2518 2008-06-12 13:20:44.562889 4507 GL-MISC 2519 2008-06-12 13:20:44.562889 4508 GL-MISC 2520 2008-06-12 13:20:44.562889 4509 GL-MISC 2521 2008-06-12 13:20:44.562889 4510 GL-MISC 2522 2008-06-12 13:20:44.562889 4511 GL-MISC 2523 2008-06-12 13:20:44.562889 4512 GL-MISC 2524 2008-06-12 13:20:44.562889 4513 GL-MISC 2525 2008-06-12 13:20:44.562889 4514 GL-MISC 2526 2008-06-12 13:20:44.562889 4515 GL-MISC 2527 2008-06-12 13:20:44.562889 4516 GL-MISC 2528 2008-06-12 13:20:44.562889 4517 GL-MISC 2529 2008-06-12 13:20:44.562889 4518 GL-MISC 2530 2008-06-12 13:20:44.562889 4519 GL-MISC 2531 2008-06-12 13:20:44.562889 4520 GL-MISC 2532 2008-06-12 13:20:44.562889 4521 GL-MISC 2533 2008-06-12 13:20:44.562889 4522 GL-MISC 2534 2008-06-12 13:20:44.562889 4523 GL-MISC 2535 2008-06-12 13:20:44.562889 4524 GL-MISC 2536 2008-06-12 13:20:44.562889 4525 GL-MISC 2537 2008-06-12 13:20:44.562889 4526 GL-MISC 2538 2008-06-12 13:20:44.562889 4527 GL-MISC 2539 2008-06-12 13:20:44.562889 4528 GL-MISC 2540 2008-06-12 13:20:44.562889 4529 GL-MISC 2541 2008-06-12 13:20:44.562889 4530 GL-MISC 2542 2008-06-12 13:20:44.562889 4531 GL-MISC 2543 2008-06-12 13:20:44.562889 4532 GL-MISC 2544 2008-06-12 13:20:44.562889 4533 GL-MISC 2545 2008-06-12 13:20:44.562889 4534 GL-MISC 2546 2008-06-12 13:20:44.562889 4535 GL-MISC 2547 2008-06-12 13:20:44.562889 4536 GL-MISC 2548 2008-06-12 13:20:44.562889 4537 GL-MISC 2549 2008-06-12 13:20:44.562889 4538 GL-MISC 2550 2008-06-12 13:20:44.562889 4539 GL-MISC 2551 2008-06-12 13:20:44.562889 4540 GL-MISC 2552 2008-06-12 13:20:44.562889 4541 GL-MISC 2553 2008-06-12 13:20:44.562889 4542 GL-MISC 2554 2008-06-12 13:20:44.562889 4543 GL-MISC 2555 2008-06-12 13:20:44.562889 4544 GL-MISC 2556 2008-06-12 13:20:44.562889 4545 GL-MISC 2557 2008-06-12 13:20:44.562889 4546 GL-MISC 2558 2008-06-12 13:20:44.562889 4547 GL-MISC 2559 2008-06-12 13:20:44.562889 4548 GL-MISC 2560 2008-06-12 13:20:44.562889 4549 GL-MISC 2561 2008-06-12 13:20:44.562889 4550 GL-MISC 2562 2008-06-12 13:20:44.562889 4551 GL-MISC 2563 2008-06-12 13:20:44.562889 4552 GL-MISC 2564 2008-06-12 13:20:44.562889 4553 GL-MISC 2565 2008-06-12 13:20:44.562889 4554 GL-MISC 2566 2008-06-12 13:20:44.562889 4555 GL-MISC 2567 2008-06-12 13:20:44.562889 4556 GL-MISC 2568 2008-06-12 13:20:44.562889 4557 GL-MISC 2569 2008-06-12 13:41:42.025527 4558 GL-MISC 2570 2008-06-12 13:41:42.025527 4559 GL-MISC 2571 2008-06-12 13:41:42.025527 4560 GL-MISC 2572 2008-06-12 13:41:42.025527 4561 GL-MISC 2573 2008-06-12 13:42:31.474517 4562 GL-MISC 2574 2008-06-12 13:42:31.474517 4563 GL-MISC 2575 2008-06-12 13:44:52.924492 4564 GL-MISC 2576 2008-06-12 13:56:06.107925 4565 GL-MISC 2577 2008-06-12 13:56:06.107925 4566 GL-MISC 2578 2008-06-12 14:28:26.578228 4567 AP-VO 2579 2008-06-12 14:30:56.600198 4568 AP-VO 2580 2008-06-12 14:36:16.448766 4569 GL-MISC 2581 2008-06-12 14:36:16.448766 4570 GL-MISC 2582 2008-06-12 14:36:42.310623 4571 GL-MISC 2583 2008-06-12 14:36:42.310623 4572 GL-MISC 2584 2008-06-12 14:36:42.310623 4573 GL-MISC 2585 2008-06-12 14:36:42.310623 4574 GL-MISC 2586 2008-06-12 14:36:42.310623 4575 GL-MISC 2587 2008-06-12 14:36:47.100347 4576 GL-MISC 2588 2008-06-12 14:36:47.100347 4577 GL-MISC 2594 2008-06-12 14:40:48.275013 4583 GL-MISC 2595 2008-06-12 14:40:48.275013 4584 GL-MISC 2596 2008-06-12 14:41:08.863585 4585 GL-MISC 2597 2008-06-12 14:41:08.863585 4586 GL-MISC 2598 2008-06-12 14:41:29.975571 4587 GL-MISC 2599 2008-06-12 14:41:29.975571 4588 GL-MISC 2600 2008-06-12 14:41:41.29455 4589 GL-MISC 2601 2008-06-12 14:41:41.29455 4590 GL-MISC 2602 2008-06-12 14:41:41.29455 4591 GL-MISC 2603 2008-06-12 14:41:41.29455 4592 GL-MISC 2604 2008-06-12 14:41:41.29455 4593 GL-MISC 2605 2008-06-12 14:41:41.29455 4594 GL-MISC 2606 2008-06-12 14:41:41.29455 4595 GL-MISC 2607 2008-06-12 14:43:38.079305 4596 GL-MISC 2611 2008-06-12 14:54:18.189836 4600 GL-MISC 2608 2008-06-12 14:47:43.550047 4597 GL-MISC 2609 2008-06-12 14:48:12.588787 4598 AR-IN 2610 2008-06-12 14:48:12.588787 4599 AR-MISC 2612 2008-06-12 14:58:14.248517 4601 GL-MISC 2613 2008-06-12 14:59:47.420026 4602 GL-MISC 2614 2008-06-12 15:00:10.546175 4603 AR-IN 2615 2008-06-12 15:00:10.546175 4604 AR-MISC 2616 2008-06-12 15:20:54.223879 4605 GL-MISC 2617 2008-06-12 15:25:33.449825 4606 GL-MISC 2618 2008-06-12 15:26:01.021805 4607 AR-IN 2619 2008-06-12 15:34:57.797868 4608 AP-VO 2620 2008-06-18 15:57:11.488257 4609 GL-MISC 2621 2008-06-18 15:57:55.358421 4610 GL-MISC 2622 2008-06-18 15:57:55.358421 4611 GL-MISC 2623 2008-06-18 15:57:55.358421 4612 GL-MISC 2624 2008-06-18 15:57:55.358421 4613 GL-MISC 2632 2008-06-18 16:01:40.903562 4621 GL-MISC 2633 2008-06-18 16:01:40.903562 4622 GL-MISC 2634 2008-06-18 16:01:40.903562 4623 GL-MISC 2635 2008-06-18 16:01:40.903562 4624 GL-MISC 2636 2008-06-18 16:01:40.903562 4625 GL-MISC 2637 2008-06-18 16:01:40.903562 4626 GL-MISC 2638 2008-06-18 16:01:40.903562 4627 GL-MISC 2639 2008-06-18 16:03:32.526111 4628 GL-MISC 2640 2008-06-18 16:03:56.39774 4629 AR-IN 2641 2008-06-18 16:05:36.099699 4630 GL-MISC 2642 2008-06-18 16:05:36.099699 4631 GL-MISC 2643 2008-06-18 16:05:36.099699 4632 GL-MISC 2644 2008-06-18 16:05:36.099699 4633 GL-MISC 2645 2008-06-18 16:08:53.884521 4634 GL-MISC 2646 2008-06-18 16:08:53.884521 4635 GL-MISC 2647 2008-06-18 16:08:53.884521 4636 GL-MISC 2648 2008-06-18 16:08:53.884521 4637 GL-MISC 2649 2008-06-18 16:08:53.884521 4638 GL-MISC 2650 2008-06-18 16:08:58.970125 4639 GL-MISC 2651 2008-06-18 16:08:58.970125 4640 GL-MISC 2652 2008-06-18 16:12:09.090071 4641 GL-MISC 2653 2008-06-18 16:12:09.090071 4642 GL-MISC 2654 2008-06-18 16:12:09.090071 4643 GL-MISC 2655 2008-06-18 16:12:09.090071 4644 GL-MISC 2656 2008-06-18 16:12:09.090071 4645 GL-MISC 2657 2008-06-18 16:12:09.090071 4646 GL-MISC 2658 2008-06-18 16:35:10.374611 4647 GL-MISC 2659 2008-06-18 16:35:10.374611 4648 GL-MISC 2660 2008-06-18 16:35:22.571076 4649 GL-MISC 2661 2008-06-18 16:35:22.571076 4650 GL-MISC 2662 2008-06-18 16:35:22.571076 4651 GL-MISC 2663 2008-06-18 16:35:22.571076 4652 GL-MISC 2664 2008-06-18 16:44:56.170419 4653 AP-VO 2665 2008-06-18 16:44:59.307754 4654 AP-VO 2666 2008-06-18 16:46:47.355235 4655 AP-CK 2667 2008-06-18 16:46:47.355235 4656 AP-CK 2668 2008-06-18 16:46:51.795013 4657 AP-CK 2669 2008-06-18 16:47:57.249049 4658 AP-CK 2670 2008-06-18 16:47:57.249049 4659 AP-MISC 2671 2008-06-18 16:47:57.249049 4660 AP-MISC 2672 2008-06-18 16:48:02.670988 4661 AP-CK 2673 2008-06-18 16:48:02.670988 4662 AP-MISC 2674 2008-06-18 16:48:02.670988 4663 AP-MISC 2675 2008-06-18 16:48:02.670988 4664 AP-MISC 2676 2008-06-18 16:48:02.670988 4665 AP-MISC 2677 2008-06-18 16:50:02.705119 4666 AP-CK 2678 2008-06-18 16:50:02.705119 4667 AP-MISC 2679 2008-06-18 16:50:02.705119 4668 AP-MISC 2680 2008-06-18 16:55:57.807862 4669 C/R 2681 2008-06-18 16:56:59.070496 4670 C/R 2682 2008-06-19 15:55:12.080553 4671 G/L 2683 2008-06-19 15:56:27.462759 4672 G/L 2684 2008-06-19 15:59:39.142588 4673 G/L 2685 2008-06-19 16:15:51.460829 4674 G/L 2686 2008-06-19 16:36:13.437438 4675 GL-MISC 2687 2008-06-19 16:36:13.437438 4676 GL-MISC 2688 2008-06-19 16:36:13.437438 4677 GL-MISC 2689 2008-06-19 16:36:13.437438 4678 GL-MISC 2690 2008-06-19 16:36:13.437438 4679 GL-MISC 2691 2008-06-19 16:36:13.437438 4680 GL-MISC 2692 2008-06-19 16:37:24.795663 4681 AP-VO 2693 2008-06-19 16:37:45.050381 4682 AP-CK 2694 2008-06-19 16:38:47.480981 4683 AP-CK 2695 2008-06-19 16:38:47.480981 4684 AP-MISC 2696 2008-06-19 16:38:47.480981 4685 AP-MISC 2697 2008-06-19 16:47:31.927379 4686 GL-MISC 2698 2008-06-19 16:48:14.736192 4687 AP-VO 2699 2008-06-19 16:48:40.749791 4688 AP-CK 2700 2008-06-19 16:49:13.318264 4689 AP-CK 2701 2008-06-19 16:49:13.318264 4690 AP-MISC 2702 2008-06-19 16:49:13.318264 4691 AP-MISC 2703 2008-06-19 16:52:50.65578 4692 GL-MISC 2704 2008-06-19 16:52:50.65578 4693 GL-MISC 2705 2008-06-19 16:52:50.65578 4694 GL-MISC 2706 2008-06-19 16:52:50.65578 4695 GL-MISC 2707 2008-06-19 16:52:54.173276 4696 GL-MISC 2708 2008-06-19 16:52:54.173276 4697 GL-MISC 2709 2008-06-19 16:53:08.961417 4698 GL-MISC 2710 2008-06-19 16:53:08.961417 4699 GL-MISC 2711 2008-06-19 16:53:08.961417 4700 GL-MISC 2712 2008-06-19 16:53:08.961417 4701 GL-MISC 2713 2008-06-19 16:53:08.961417 4702 GL-MISC 2714 2008-06-19 16:53:11.840328 4703 GL-MISC 2715 2008-06-19 16:53:11.840328 4704 GL-MISC 2716 2008-06-19 16:53:23.06988 4705 GL-MISC 2717 2008-06-19 16:53:23.06988 4706 GL-MISC 2718 2008-06-19 16:53:23.06988 4707 GL-MISC 2719 2008-06-19 16:53:23.06988 4708 GL-MISC 2720 2008-06-19 16:53:23.06988 4709 GL-MISC 2721 2008-06-19 16:53:23.06988 4710 GL-MISC 2722 2008-06-19 16:53:23.06988 4711 GL-MISC 2723 2008-06-19 16:53:23.06988 4712 GL-MISC 2724 2008-06-19 16:53:23.06988 4713 GL-MISC 2725 2008-06-19 16:53:23.06988 4714 GL-MISC 2726 2008-06-19 16:53:23.06988 4715 GL-MISC 2727 2008-06-19 16:53:23.06988 4716 GL-MISC 2728 2008-06-19 16:53:23.06988 4717 GL-MISC 2729 2008-06-19 16:53:37.390334 4718 GL-MISC 2730 2008-06-19 16:53:37.390334 4719 GL-MISC 2731 2008-06-19 16:53:47.841836 4720 GL-MISC 2732 2008-06-19 16:53:47.841836 4721 GL-MISC 2733 2008-06-19 16:53:47.841836 4722 GL-MISC 2734 2008-06-19 16:53:47.841836 4723 GL-MISC 2735 2008-06-19 16:53:47.841836 4724 GL-MISC 2736 2008-06-19 16:53:47.841836 4725 GL-MISC 2737 2008-06-19 16:53:47.841836 4726 GL-MISC 2738 2008-06-19 16:53:47.841836 4727 GL-MISC 2739 2008-06-19 16:53:47.841836 4728 GL-MISC 2740 2008-06-19 16:53:47.841836 4729 GL-MISC 2741 2008-06-19 16:53:47.841836 4730 GL-MISC 2742 2008-06-19 16:54:00.305723 4731 GL-MISC 2743 2008-06-19 16:54:00.305723 4732 GL-MISC 2744 2008-06-19 16:54:18.965876 4733 GL-MISC 2745 2008-06-19 16:54:18.965876 4734 GL-MISC 2746 2008-06-19 16:54:18.965876 4735 GL-MISC 2747 2008-06-19 16:54:18.965876 4736 GL-MISC 2748 2008-06-19 16:54:18.965876 4737 GL-MISC 2749 2008-06-19 16:54:18.965876 4738 GL-MISC 2750 2008-06-19 16:54:18.965876 4739 GL-MISC 2751 2008-06-19 16:54:18.965876 4740 GL-MISC 2752 2008-06-19 16:54:18.965876 4741 GL-MISC 2753 2008-06-19 16:55:58.81412 4742 GL-MISC 2754 2008-06-19 16:55:58.81412 4743 GL-MISC 2755 2008-06-19 16:55:58.81412 4744 GL-MISC 2756 2008-06-19 16:56:40.490726 4745 AR-IN 2757 2008-06-19 16:56:40.490726 4746 AR-MISC 2758 2008-06-19 16:57:38.894546 4747 AR-MISC 2759 2008-06-19 16:58:29.447353 4748 C/R 2760 2008-06-19 17:03:07.67209 4749 GL-MISC 2761 2008-06-19 17:03:07.67209 4750 GL-MISC 2762 2008-06-19 17:03:07.67209 4751 GL-MISC 2763 2008-06-19 17:03:07.67209 4752 GL-MISC 2764 2008-06-19 17:04:14.814705 4753 GL-MISC 2765 2008-06-19 17:04:14.814705 4754 GL-MISC 2766 2008-06-19 17:04:14.814705 4755 GL-MISC 2767 2008-06-19 17:04:14.814705 4756 GL-MISC 2768 2008-06-19 17:04:27.358545 4757 GL-MISC 2769 2008-06-19 17:04:27.358545 4758 GL-MISC 2770 2008-06-19 17:04:27.358545 4759 GL-MISC 2771 2008-06-19 17:04:27.358545 4760 GL-MISC 2772 2008-06-19 17:04:48.569093 4761 GL-MISC 2773 2008-06-19 17:04:48.569093 4762 GL-MISC 2774 2008-06-19 17:06:03.069859 4763 GL-MISC 2775 2008-06-19 17:06:03.069859 4764 GL-MISC 2776 2008-06-19 17:07:52.576615 4765 GL-MISC 2777 2008-06-19 17:07:52.576615 4766 GL-MISC 2778 2008-06-19 17:07:52.576615 4767 GL-MISC 2779 2008-06-19 17:07:52.576615 4768 GL-MISC 2780 2008-06-19 17:07:52.576615 4769 GL-MISC 2781 2008-06-19 17:07:52.576615 4770 GL-MISC 2782 2008-06-19 17:08:12.096062 4771 GL-MISC 2783 2008-06-19 17:08:25.693678 4772 AR-IN 2784 2008-06-19 17:09:28.285755 4773 GL-MISC 2785 2008-06-19 17:10:09.343196 4774 C/R 2786 2008-06-19 17:11:17.433319 4775 AP-VO 2787 2008-06-19 17:11:20.304685 4776 AP-VO 2788 2008-06-19 17:11:32.168234 4777 AP-CK 2789 2008-06-19 17:11:56.42893 4778 AP-CK 2790 2008-06-19 17:11:56.42893 4779 AP-MISC 2791 2008-06-19 17:11:56.42893 4780 AP-MISC 2792 2008-06-19 17:11:56.42893 4781 AP-MISC 2793 2008-06-19 17:11:56.42893 4782 AP-MISC 2794 2008-06-20 09:33:35.232685 4783 GL-MISC 2795 2008-06-20 09:34:04.880812 4784 GL-MISC 2796 2008-06-20 09:34:18.78581 4785 AR-IN 2797 2008-06-20 09:38:17.450954 4786 C/R 2798 2008-06-20 09:39:08.545014 4787 GL-MISC 2799 2008-06-20 09:39:08.545014 4788 GL-MISC 2800 2008-06-20 09:39:08.545014 4789 GL-MISC 2801 2008-06-20 09:39:08.545014 4790 GL-MISC 2802 2008-06-20 09:39:08.545014 4791 GL-MISC 2803 2008-06-20 09:39:08.545014 4792 GL-MISC 2804 2008-06-20 09:39:08.545014 4793 GL-MISC 2805 2008-06-20 09:39:08.545014 4794 GL-MISC 2806 2008-06-20 09:39:08.545014 4795 GL-MISC 2807 2008-06-20 09:39:08.545014 4796 GL-MISC 2808 2008-06-20 09:39:08.545014 4797 GL-MISC 2809 2008-06-20 09:39:08.545014 4798 GL-MISC 2810 2008-06-20 09:39:08.545014 4799 GL-MISC 2811 2008-06-20 09:39:08.545014 4800 GL-MISC 2812 2008-06-20 09:39:08.545014 4801 GL-MISC 2813 2008-06-20 09:39:08.545014 4802 GL-MISC 2814 2008-06-20 09:39:08.545014 4803 GL-MISC 2815 2008-06-20 09:39:08.545014 4804 GL-MISC 2816 2008-06-20 09:39:08.545014 4805 GL-MISC 2817 2008-06-20 09:39:08.545014 4806 GL-MISC 2818 2008-06-20 09:39:08.545014 4807 GL-MISC 2819 2008-06-20 09:39:08.545014 4808 GL-MISC 2820 2008-06-20 09:39:08.545014 4809 GL-MISC 2821 2008-06-20 09:39:08.545014 4810 GL-MISC 2822 2008-06-20 09:39:08.545014 4811 GL-MISC 2823 2008-06-20 09:39:08.545014 4812 GL-MISC 2824 2008-06-20 09:39:08.545014 4813 GL-MISC 2825 2008-06-20 09:39:08.545014 4814 GL-MISC 2826 2008-06-20 09:39:08.545014 4815 GL-MISC 2827 2008-06-20 09:39:08.545014 4816 GL-MISC 2828 2008-06-20 09:39:08.545014 4817 GL-MISC 2829 2008-06-20 09:39:08.545014 4818 GL-MISC 2830 2008-06-20 09:39:08.545014 4819 GL-MISC 2831 2008-06-20 09:39:08.545014 4820 GL-MISC 2832 2008-06-20 09:39:08.545014 4821 GL-MISC 2833 2008-06-20 09:39:08.545014 4822 GL-MISC 2834 2008-06-20 09:39:08.545014 4823 GL-MISC 2835 2008-06-20 09:39:08.545014 4824 GL-MISC 2836 2008-06-20 09:39:08.545014 4825 GL-MISC 2837 2008-06-20 09:39:08.545014 4826 GL-MISC 2838 2008-06-20 09:39:08.545014 4827 GL-MISC 2839 2008-06-20 09:39:08.545014 4828 GL-MISC 2840 2008-06-20 09:39:08.545014 4829 GL-MISC 2841 2008-06-20 09:39:08.545014 4830 GL-MISC 2842 2008-06-20 09:39:08.545014 4831 GL-MISC 2843 2008-06-20 09:39:08.545014 4832 GL-MISC 2844 2008-06-20 09:39:08.545014 4833 GL-MISC 2845 2008-06-20 09:39:08.545014 4834 GL-MISC 2846 2008-06-20 09:39:08.545014 4835 GL-MISC 2847 2008-06-20 09:39:08.545014 4836 GL-MISC 2848 2008-06-20 09:39:08.545014 4837 GL-MISC 2849 2008-06-20 09:39:08.545014 4838 GL-MISC 2850 2008-06-20 09:39:08.545014 4839 GL-MISC 2851 2008-06-20 09:39:08.545014 4840 GL-MISC 2852 2008-06-20 09:39:08.545014 4841 GL-MISC 2853 2008-06-20 09:39:08.545014 4842 GL-MISC 2854 2008-06-20 09:39:08.545014 4843 GL-MISC 2855 2008-06-20 09:39:08.545014 4844 GL-MISC 2856 2008-06-20 09:39:08.545014 4845 GL-MISC 2857 2008-06-20 09:39:08.545014 4846 GL-MISC 2858 2008-06-20 09:39:08.545014 4847 GL-MISC 2859 2008-06-20 09:39:08.545014 4848 GL-MISC 2860 2008-06-20 09:39:08.545014 4849 GL-MISC 2861 2008-06-20 09:39:08.545014 4850 GL-MISC 2862 2008-06-20 09:39:08.545014 4851 GL-MISC 2863 2008-06-20 09:39:08.545014 4852 GL-MISC 2864 2008-06-20 09:39:08.545014 4853 GL-MISC 2865 2008-06-20 09:39:08.545014 4854 GL-MISC 2866 2008-06-20 09:39:08.545014 4855 GL-MISC 2867 2008-06-20 09:39:08.545014 4856 GL-MISC 2868 2008-06-20 09:39:08.545014 4857 GL-MISC 2869 2008-06-20 09:39:08.545014 4858 GL-MISC 2870 2008-06-20 09:39:08.545014 4859 GL-MISC 2871 2008-06-20 09:39:08.545014 4860 GL-MISC 2872 2008-06-20 09:39:08.545014 4861 GL-MISC 2873 2008-06-20 09:39:08.545014 4862 GL-MISC 2874 2008-06-20 09:39:08.545014 4863 GL-MISC 2875 2008-06-20 09:39:08.545014 4864 GL-MISC 2876 2008-06-20 09:39:08.545014 4865 GL-MISC 2877 2008-06-20 09:39:08.545014 4866 GL-MISC 2878 2008-06-20 09:39:08.545014 4867 GL-MISC 2879 2008-06-20 09:39:08.545014 4868 GL-MISC 2880 2008-06-20 09:39:08.545014 4869 GL-MISC 2881 2008-06-20 09:39:08.545014 4870 GL-MISC 2882 2008-06-20 09:39:08.545014 4871 GL-MISC 2883 2008-06-20 09:39:08.545014 4872 GL-MISC 2884 2008-06-20 09:39:08.545014 4873 GL-MISC 2885 2008-06-20 09:39:08.545014 4874 GL-MISC 2886 2008-06-20 09:39:08.545014 4875 GL-MISC 2887 2008-06-20 09:39:08.545014 4876 GL-MISC 2888 2008-06-20 09:39:08.545014 4877 GL-MISC 2889 2008-06-20 09:39:08.545014 4878 GL-MISC 2890 2008-06-20 09:39:08.545014 4879 GL-MISC 2891 2008-06-20 09:39:08.545014 4880 GL-MISC 2892 2008-06-20 09:39:08.545014 4881 GL-MISC 2893 2008-06-20 09:39:08.545014 4882 GL-MISC 2894 2008-06-20 09:39:08.545014 4883 GL-MISC 2895 2008-06-20 09:39:08.545014 4884 GL-MISC 2896 2008-06-20 09:39:08.545014 4885 GL-MISC 2897 2008-06-20 09:39:08.545014 4886 GL-MISC 2898 2008-06-20 09:39:08.545014 4887 GL-MISC 2899 2008-06-20 09:39:08.545014 4888 GL-MISC 2900 2008-06-20 09:39:08.545014 4889 GL-MISC 2901 2008-06-20 09:39:08.545014 4890 GL-MISC 2902 2008-06-20 09:39:08.545014 4891 GL-MISC 2903 2008-06-20 09:39:08.545014 4892 GL-MISC 2904 2008-06-20 09:39:08.545014 4893 GL-MISC 2905 2008-06-20 09:39:08.545014 4894 GL-MISC 2906 2008-06-20 09:39:08.545014 4895 GL-MISC 2907 2008-06-20 09:39:08.545014 4896 GL-MISC 2908 2008-06-20 09:39:08.545014 4897 GL-MISC 2909 2008-06-20 09:39:08.545014 4898 GL-MISC 2910 2008-06-20 09:39:08.545014 4899 GL-MISC 2911 2008-06-20 09:39:08.545014 4900 GL-MISC 2912 2008-06-20 09:39:08.545014 4901 GL-MISC 2913 2008-06-20 09:39:08.545014 4902 GL-MISC 2914 2008-06-20 09:39:08.545014 4903 GL-MISC 2915 2008-06-20 09:39:08.545014 4904 GL-MISC 2916 2008-06-20 09:39:08.545014 4905 GL-MISC 2917 2008-06-20 09:39:08.545014 4906 GL-MISC 2918 2008-06-20 09:39:08.545014 4907 GL-MISC 2919 2008-06-20 09:39:08.545014 4908 GL-MISC 2920 2008-06-20 09:39:08.545014 4909 GL-MISC 2921 2008-06-20 09:39:08.545014 4910 GL-MISC 2922 2008-06-20 09:39:08.545014 4911 GL-MISC 2923 2008-06-20 09:39:08.545014 4912 GL-MISC 2924 2008-06-20 09:39:08.545014 4913 GL-MISC 2925 2008-06-20 09:39:08.545014 4914 GL-MISC 2926 2008-06-20 09:39:08.545014 4915 GL-MISC 2927 2008-06-20 09:39:08.545014 4916 GL-MISC 2928 2008-06-20 09:39:08.545014 4917 GL-MISC 2929 2008-06-20 09:39:08.545014 4918 GL-MISC 2930 2008-06-20 09:39:08.545014 4919 GL-MISC 2931 2008-06-20 09:39:08.545014 4920 GL-MISC 2932 2008-06-20 09:39:08.545014 4921 GL-MISC 2933 2008-06-20 09:39:08.545014 4922 GL-MISC 2934 2008-06-20 09:39:08.545014 4923 GL-MISC 2935 2008-06-20 09:39:08.545014 4924 GL-MISC 2936 2008-06-20 09:39:08.545014 4925 GL-MISC 2937 2008-06-20 09:39:08.545014 4926 GL-MISC 2938 2008-06-20 09:39:08.545014 4927 GL-MISC 2939 2008-06-20 09:39:08.545014 4928 GL-MISC 2940 2008-06-20 09:39:08.545014 4929 GL-MISC 2941 2008-06-20 09:39:08.545014 4930 GL-MISC 2942 2008-06-20 09:39:08.545014 4931 GL-MISC 2943 2008-06-20 09:39:08.545014 4932 GL-MISC 2944 2008-06-20 09:39:08.545014 4933 GL-MISC 2945 2008-06-20 09:39:08.545014 4934 GL-MISC 2946 2008-06-20 09:39:08.545014 4935 GL-MISC 2947 2008-06-20 09:39:08.545014 4936 GL-MISC 2948 2008-06-20 09:39:08.545014 4937 GL-MISC 2949 2008-06-20 09:39:08.545014 4938 GL-MISC 2950 2008-06-20 09:39:08.545014 4939 GL-MISC 2951 2008-06-20 09:39:08.545014 4940 GL-MISC 2952 2008-06-20 09:39:08.545014 4941 GL-MISC 2953 2008-06-20 09:39:08.545014 4942 GL-MISC 2954 2008-06-20 09:39:08.545014 4943 GL-MISC 2955 2008-06-20 09:39:08.545014 4944 GL-MISC 2956 2008-06-20 09:39:08.545014 4945 GL-MISC 2957 2008-06-20 09:39:08.545014 4946 GL-MISC 2958 2008-06-20 09:39:08.545014 4947 GL-MISC 2959 2008-06-20 09:39:08.545014 4948 GL-MISC 2960 2008-06-20 09:39:08.545014 4949 GL-MISC 2961 2008-06-20 09:39:08.545014 4950 GL-MISC 2962 2008-06-20 09:39:08.545014 4951 GL-MISC 2963 2008-06-20 09:39:08.545014 4952 GL-MISC 2964 2008-06-20 09:39:08.545014 4953 GL-MISC 2965 2008-06-20 09:39:08.545014 4954 GL-MISC 2966 2008-06-20 09:39:08.545014 4955 GL-MISC 2967 2008-06-20 09:39:08.545014 4956 GL-MISC 2968 2008-06-20 09:39:08.545014 4957 GL-MISC 2969 2008-06-20 09:39:08.545014 4958 GL-MISC 2970 2008-06-20 09:39:08.545014 4959 GL-MISC 2971 2008-06-20 09:39:08.545014 4960 GL-MISC 2972 2008-06-20 09:39:08.545014 4961 GL-MISC 2973 2008-06-20 09:39:08.545014 4962 GL-MISC 2974 2008-06-20 09:39:08.545014 4963 GL-MISC 2975 2008-06-20 09:39:08.545014 4964 GL-MISC 2976 2008-06-20 09:39:08.545014 4965 GL-MISC 2977 2008-06-20 09:39:08.545014 4966 GL-MISC 2978 2008-06-20 09:39:08.545014 4967 GL-MISC 2979 2008-06-20 09:39:08.545014 4968 GL-MISC 2980 2008-06-20 09:39:08.545014 4969 GL-MISC 2981 2008-06-20 09:39:08.545014 4970 GL-MISC 2982 2008-06-20 09:39:08.545014 4971 GL-MISC 2983 2008-06-20 09:39:08.545014 4972 GL-MISC 2984 2008-06-20 09:39:08.545014 4973 GL-MISC 2985 2008-06-20 09:39:08.545014 4974 GL-MISC 2986 2008-06-20 09:39:08.545014 4975 GL-MISC 2987 2008-06-20 09:39:08.545014 4976 GL-MISC 2988 2008-06-20 09:39:08.545014 4977 GL-MISC 2989 2008-06-20 09:39:08.545014 4978 GL-MISC 2990 2008-06-20 09:39:08.545014 4979 GL-MISC 2991 2008-06-20 09:39:08.545014 4980 GL-MISC 2992 2008-06-20 09:39:08.545014 4981 GL-MISC 2993 2008-06-20 09:39:08.545014 4982 GL-MISC 2994 2008-06-20 09:39:08.545014 4983 GL-MISC 2995 2008-06-20 09:39:08.545014 4984 GL-MISC 2996 2008-06-20 09:39:08.545014 4985 GL-MISC 2997 2008-06-20 09:39:08.545014 4986 GL-MISC 2998 2008-06-20 09:39:08.545014 4987 GL-MISC 2999 2008-06-20 09:39:08.545014 4988 GL-MISC 3000 2008-06-20 09:39:08.545014 4989 GL-MISC 3001 2008-06-20 09:39:08.545014 4990 GL-MISC 3002 2008-06-20 09:39:08.545014 4991 GL-MISC 3003 2008-06-20 09:39:08.545014 4992 GL-MISC 3004 2008-06-20 09:39:08.545014 4993 GL-MISC 3005 2008-06-20 09:39:08.545014 4994 GL-MISC 3006 2008-06-20 09:39:08.545014 4995 GL-MISC 3007 2008-06-20 09:39:08.545014 4996 GL-MISC 3008 2008-06-20 09:39:08.545014 4997 GL-MISC 3009 2008-06-20 09:39:08.545014 4998 GL-MISC 3010 2008-06-20 09:39:08.545014 4999 GL-MISC 3011 2008-06-20 09:39:08.545014 5000 GL-MISC 3012 2008-06-20 09:39:08.545014 5001 GL-MISC 3013 2008-06-20 09:39:08.545014 5002 GL-MISC 3014 2008-06-20 09:39:08.545014 5003 GL-MISC 3015 2008-06-20 09:39:08.545014 5004 GL-MISC 3016 2008-06-20 09:39:08.545014 5005 GL-MISC 3017 2008-06-20 09:39:08.545014 5006 GL-MISC 3018 2008-06-20 09:39:08.545014 5007 GL-MISC 3019 2008-06-20 09:39:08.545014 5008 GL-MISC 3020 2008-06-20 09:39:08.545014 5009 GL-MISC 3021 2008-06-20 09:39:08.545014 5010 GL-MISC 3022 2008-06-20 09:39:08.545014 5011 GL-MISC 3023 2008-06-20 09:39:08.545014 5012 GL-MISC 3024 2008-06-20 09:39:08.545014 5013 GL-MISC 3025 2008-06-20 09:39:08.545014 5014 GL-MISC 3026 2008-06-20 09:39:08.545014 5015 GL-MISC 3027 2008-06-20 09:39:08.545014 5016 GL-MISC 3028 2008-06-20 09:39:08.545014 5017 GL-MISC 3029 2008-06-20 09:39:08.545014 5018 GL-MISC 3030 2008-06-20 09:39:08.545014 5019 GL-MISC 3031 2008-06-20 09:39:08.545014 5020 GL-MISC 3032 2008-06-20 09:39:08.545014 5021 GL-MISC 3033 2008-06-20 09:39:08.545014 5022 GL-MISC 3034 2008-06-20 09:39:08.545014 5023 GL-MISC 3035 2008-06-20 09:39:08.545014 5024 GL-MISC 3036 2008-06-20 09:39:08.545014 5025 GL-MISC 3037 2008-06-20 09:39:08.545014 5026 GL-MISC 3038 2008-06-20 09:39:08.545014 5027 GL-MISC 3039 2008-06-20 09:39:08.545014 5028 GL-MISC 3040 2008-06-20 09:39:08.545014 5029 GL-MISC 3041 2008-06-20 09:39:08.545014 5030 GL-MISC 3042 2008-06-20 09:39:08.545014 5031 GL-MISC 3043 2008-06-20 09:39:08.545014 5032 GL-MISC 3044 2008-06-20 09:39:08.545014 5033 GL-MISC 3045 2008-06-20 09:39:08.545014 5034 GL-MISC 3046 2008-06-20 09:39:08.545014 5035 GL-MISC 3047 2008-06-20 09:39:08.545014 5036 GL-MISC 3048 2008-06-20 09:39:08.545014 5037 GL-MISC 3049 2008-06-20 09:39:08.545014 5038 GL-MISC 3050 2008-06-20 09:39:08.545014 5039 GL-MISC 3051 2008-06-20 09:39:08.545014 5040 GL-MISC 3052 2008-06-20 09:39:08.545014 5041 GL-MISC 3053 2008-06-20 09:39:08.545014 5042 GL-MISC 3054 2008-06-20 09:39:08.545014 5043 GL-MISC 3055 2008-06-20 09:39:08.545014 5044 GL-MISC 3056 2008-06-20 09:39:08.545014 5045 GL-MISC 3057 2008-06-20 09:39:08.545014 5046 GL-MISC 3058 2008-06-20 09:39:08.545014 5047 GL-MISC 3059 2008-06-20 09:39:08.545014 5048 GL-MISC 3060 2008-06-20 09:39:08.545014 5049 GL-MISC 3061 2008-06-20 09:39:08.545014 5050 GL-MISC 3062 2008-06-20 09:39:08.545014 5051 GL-MISC 3063 2008-06-20 09:39:08.545014 5052 GL-MISC 3064 2008-06-20 09:39:08.545014 5053 GL-MISC 3065 2008-06-20 09:39:08.545014 5054 GL-MISC 3066 2008-06-20 09:39:08.545014 5055 GL-MISC 3067 2008-06-20 09:39:08.545014 5056 GL-MISC 3068 2008-06-20 09:39:08.545014 5057 GL-MISC 3069 2008-06-20 09:39:08.545014 5058 GL-MISC 3070 2008-06-20 09:39:08.545014 5059 GL-MISC 3071 2008-06-20 09:39:08.545014 5060 GL-MISC 3072 2008-06-20 09:39:08.545014 5061 GL-MISC 3073 2008-06-20 09:39:08.545014 5062 GL-MISC 3074 2008-06-20 09:39:08.545014 5063 GL-MISC 3075 2008-06-20 09:39:08.545014 5064 GL-MISC 3076 2008-06-20 09:39:08.545014 5065 GL-MISC 3077 2008-06-20 09:39:08.545014 5066 GL-MISC 3078 2008-06-20 09:39:08.545014 5067 GL-MISC 3079 2008-06-20 09:39:08.545014 5068 GL-MISC 3080 2008-06-20 09:39:08.545014 5069 GL-MISC 3081 2008-06-20 09:39:08.545014 5070 GL-MISC 3082 2008-06-20 09:39:08.545014 5071 GL-MISC 3083 2008-06-20 09:39:08.545014 5072 GL-MISC 3084 2008-06-20 09:39:08.545014 5073 GL-MISC 3085 2008-06-20 09:39:08.545014 5074 GL-MISC 3086 2008-06-20 09:39:08.545014 5075 GL-MISC 3087 2008-06-20 09:39:08.545014 5076 GL-MISC 3088 2008-06-20 09:39:08.545014 5077 GL-MISC 3089 2008-06-20 09:39:08.545014 5078 GL-MISC 3090 2008-06-20 09:39:08.545014 5079 GL-MISC 3091 2008-06-20 09:39:08.545014 5080 GL-MISC 3092 2008-06-20 12:32:33.459856 5081 GL-MISC 3093 2008-06-20 12:32:33.459856 5082 GL-MISC 3094 2008-06-20 12:33:31.339494 5083 AP-VO 3095 2008-06-20 12:33:51.171085 5084 AP-CK 3096 2008-06-20 12:34:26.15507 5085 AP-CK 3097 2008-06-20 12:34:26.15507 5086 AP-MISC 3098 2008-06-20 12:34:26.15507 5087 AP-MISC 3099 2008-06-20 12:34:59.329988 5088 GL-MISC 3100 2008-06-20 12:34:59.329988 5089 GL-MISC 3101 2008-06-20 12:34:59.329988 5090 GL-MISC 3102 2008-06-20 12:34:59.329988 5091 GL-MISC 3103 2008-06-20 12:34:59.329988 5092 GL-MISC 3104 2008-06-20 12:35:08.196767 5093 GL-MISC 3105 2008-06-20 12:35:08.196767 5094 GL-MISC 3106 2008-06-20 12:35:16.941089 5095 GL-MISC 3107 2008-06-20 12:35:16.941089 5096 GL-MISC 3108 2008-06-20 12:35:16.941089 5097 GL-MISC 3109 2008-06-20 12:35:16.941089 5098 GL-MISC 3110 2008-06-20 12:35:16.941089 5099 GL-MISC 3111 2008-06-20 12:35:16.941089 5100 GL-MISC 3112 2008-06-20 12:35:16.941089 5101 GL-MISC 3113 2008-06-20 12:35:16.941089 5102 GL-MISC 3114 2008-06-20 12:35:16.941089 5103 GL-MISC 3115 2008-06-20 12:35:16.941089 5104 GL-MISC 3116 2008-06-20 12:35:16.941089 5105 GL-MISC 3117 2008-06-20 12:35:31.462922 5106 GL-MISC 3118 2008-06-20 12:35:31.462922 5107 GL-MISC 3119 2008-06-20 12:35:46.397893 5108 GL-MISC 3120 2008-06-20 12:36:05.720664 5109 GL-MISC 3121 2008-06-20 12:36:37.646629 5110 AR-IN 3122 2008-06-20 12:37:44.567705 5111 C/R 3123 2008-06-20 12:38:06.517522 5112 C/R 3124 2008-09-08 17:03:10.424312 5113 GL-MISC 3125 2008-09-08 17:03:10.424312 5114 GL-MISC 3126 2008-09-08 17:04:02.812213 5115 GL-MISC 3127 2008-09-08 17:04:02.812213 5116 GL-MISC 3128 2008-09-08 17:04:19.920653 5117 GL-MISC 3129 2008-09-08 17:04:19.920653 5118 GL-MISC 3130 2008-09-08 17:07:31.466856 5119 AP-VO 3131 2008-09-08 17:08:22.02869 5120 AP-CK 3132 2008-09-08 17:09:13.957547 5121 AP-CK 3133 2008-09-08 17:18:46.990886 5122 AP-VO 3134 2008-09-08 17:19:21.523783 5123 AP-CK 3135 2008-09-08 17:19:36.136499 5124 AP-CK 3136 2008-09-08 17:19:36.136499 5125 AP-MISC 3137 2008-09-08 17:19:36.136499 5126 AP-MISC 3138 2008-09-08 17:29:06.995462 5127 GL-MISC 3139 2008-09-08 17:30:20.148641 5128 GL-MISC 3140 2008-09-08 17:31:14.742595 5129 GL-MISC 3141 2008-09-08 17:31:40.808667 5130 GL-MISC 3142 2008-09-08 17:32:07.298926 5131 AR-IN 3143 2008-09-08 17:49:44.498604 5132 GL-MISC 3144 2008-09-08 17:49:52.30474 5133 GL-MISC 3145 2008-09-08 17:49:58.697085 5134 GL-MISC 3146 2008-09-08 17:50:11.487338 5135 GL-MISC 3147 2008-09-08 17:50:22.824305 5136 AR-IN 3148 2008-09-08 17:50:53.703238 5137 GL-MISC 3149 2008-09-08 17:51:01.035317 5138 GL-MISC 3150 2008-09-08 17:51:13.790925 5139 AR-IN 3151 2008-09-08 18:00:33.572868 5140 C/R 3152 2008-09-08 18:00:35.788246 5141 C/R 3153 2008-09-08 18:00:38.362729 5142 C/R 3154 2008-09-08 18:04:30.709205 5143 G/L 3155 2008-09-08 18:09:51.292363 5144 AP-CK 3156 2008-09-08 18:10:44.626013 5145 AP-CK 3157 2008-09-08 18:13:44.620865 5146 AP-CK 3158 2008-09-08 18:13:48.37063 5147 AP-CK 3159 2008-09-08 18:23:22.265604 5148 GL-MISC 3160 2008-09-08 18:29:23.625272 5149 GL-MISC 3161 2008-09-08 18:31:14.870211 5150 GL-MISC 3162 2008-09-08 18:35:52.303611 5151 GL-MISC 3163 2008-09-08 18:37:13.752361 5152 GL-MISC 3164 2008-09-08 18:39:13.156532 5153 GL-MISC 3165 2008-09-08 18:40:01.743567 5154 GL-MISC 3166 2008-09-09 16:54:16.812243 5155 GL-MISC 3167 2008-09-09 16:54:16.812243 5156 GL-MISC 3168 2008-09-09 16:54:16.812243 5157 GL-MISC 3169 2008-09-09 16:54:16.812243 5158 GL-MISC 3170 2008-09-09 16:54:16.812243 5159 GL-MISC 3171 2008-09-09 16:55:37.747755 5160 GL-MISC 3172 2008-09-09 16:55:49.386918 5161 GL-MISC 3173 2008-09-09 17:04:00.995768 5162 GL-MISC 3174 2008-09-09 17:04:00.995768 5163 GL-MISC 3175 2008-09-09 17:04:00.995768 5164 GL-MISC 3176 2008-09-09 17:04:00.995768 5165 GL-MISC 3177 2008-09-09 17:04:00.995768 5166 GL-MISC 3178 2008-09-09 17:07:12.410895 5167 AR-IN 3179 2008-09-09 17:23:26.279368 5168 C/R 3180 2008-09-24 16:23:10.052774 5169 GL-MISC 3181 2008-09-24 16:24:12.070752 5170 GL-MISC 3182 2008-09-24 16:28:51.272858 5171 GL-MISC 3183 2008-09-24 16:28:51.272858 5172 GL-MISC 3184 2008-09-24 16:33:28.624459 5173 GL-MISC 3185 2008-09-24 16:33:28.624459 5174 GL-MISC 3186 2008-09-24 16:34:02.049554 5175 GL-MISC 3187 2008-09-24 16:34:02.049554 5176 GL-MISC 3188 2008-09-24 16:35:56.617636 5177 AP-VO 3189 2008-09-24 16:36:00.834903 5178 AP-VO 3190 2008-09-24 16:36:14.039207 5179 AP-VO 3191 2008-09-24 16:36:35.887889 5180 AP-CK 3192 2008-09-24 16:36:35.887889 5181 AP-CK 3193 2008-09-24 16:37:13.387861 5182 AP-CK 3194 2008-09-24 16:37:13.387861 5183 AP-MISC 3195 2008-09-24 16:37:13.387861 5184 AP-MISC 3196 2008-09-24 16:37:16.553023 5185 AP-CK 3197 2008-09-24 16:37:16.553023 5186 AP-MISC 3198 2008-09-24 16:37:16.553023 5187 AP-MISC 3199 2008-10-02 09:13:21.632915 5188 C/R 3200 2008-10-02 09:13:30.832107 5189 C/R 3201 2008-10-02 09:44:20.788494 5190 GL-MISC 3202 2008-10-02 09:44:20.788494 5191 GL-MISC 3203 2008-10-02 09:56:01.068303 5192 GL-MISC 3204 2008-10-02 09:56:01.068303 5193 GL-MISC 3205 2008-10-02 09:56:01.068303 5194 GL-MISC 3206 2008-10-02 09:56:01.068303 5195 GL-MISC 3207 2008-10-02 09:56:01.068303 5196 GL-MISC 3208 2008-10-02 09:56:03.862618 5197 GL-MISC 3209 2008-10-02 09:56:03.862618 5198 GL-MISC 3215 2008-10-02 09:59:48.655574 5204 GL-MISC 3216 2008-10-02 09:59:48.655574 5205 GL-MISC 3217 2008-10-02 09:59:48.655574 5206 GL-MISC 3218 2008-10-02 09:59:48.655574 5207 GL-MISC 3219 2008-10-02 09:59:48.655574 5208 GL-MISC 3220 2008-10-02 10:01:44.855331 5209 GL-MISC 3221 2008-10-02 10:01:57.611219 5210 GL-MISC 3222 2008-10-02 10:02:20.251521 5211 GL-MISC 3223 2008-10-02 10:02:29.241588 5212 GL-MISC 3224 2008-10-02 10:02:29.241588 5213 GL-MISC 3225 2008-10-02 10:02:29.241588 5214 GL-MISC 3226 2008-10-02 10:02:29.241588 5215 GL-MISC 3227 2008-10-02 10:02:29.241588 5216 GL-MISC 3228 2008-10-02 10:02:29.241588 5217 GL-MISC 3229 2008-10-02 10:02:29.241588 5218 GL-MISC 3230 2008-10-02 10:02:29.241588 5219 GL-MISC 3231 2008-10-02 10:02:29.241588 5220 GL-MISC 3232 2008-10-02 10:02:29.241588 5221 GL-MISC 3233 2008-10-02 10:02:29.241588 5222 GL-MISC 3234 2008-10-02 10:02:52.119267 5223 GL-MISC 3235 2008-10-02 10:02:52.119267 5224 GL-MISC 3236 2008-10-02 10:02:52.119267 5225 GL-MISC 3237 2008-10-02 10:02:52.119267 5226 GL-MISC 3238 2008-10-02 10:02:52.119267 5227 GL-MISC 3239 2008-10-02 10:02:52.119267 5228 GL-MISC 3240 2008-10-02 10:02:52.119267 5229 GL-MISC 3241 2008-10-02 10:14:05.050163 5230 GL-MISC 3242 2008-10-02 10:14:05.050163 5231 GL-MISC 3243 2008-10-02 10:14:05.050163 5232 GL-MISC 3244 2008-10-02 10:14:05.050163 5233 GL-MISC 3245 2008-10-02 10:14:05.050163 5234 GL-MISC 3246 2008-10-02 10:14:05.050163 5235 GL-MISC 3247 2008-10-02 10:14:05.050163 5236 GL-MISC 3248 2008-10-02 10:18:38.886189 5237 AR-IN 3249 2008-10-02 10:19:09.270232 5238 AR-MISC 3250 2008-10-02 10:20:20.048959 5239 C/R 3251 2008-10-02 10:20:33.199395 5240 GL-MISC 3252 2008-10-02 10:20:33.199395 5241 GL-MISC 3253 2008-10-02 10:21:09.352899 5242 GL-MISC 3254 2008-10-02 10:21:09.352899 5243 GL-MISC 3255 2008-10-02 10:21:09.352899 5244 GL-MISC 3256 2008-10-02 10:21:09.352899 5245 GL-MISC 3257 2008-10-02 10:21:45.808217 5246 GL-MISC 3258 2008-10-02 10:22:00.531041 5247 AR-IN 3259 2008-10-02 10:23:43.607548 5248 C/R 3260 2008-10-02 10:29:14.019723 5249 GL-MISC 3261 2008-10-02 10:29:14.019723 5250 GL-MISC 3262 2008-10-02 10:29:14.019723 5251 GL-MISC 3263 2008-10-02 10:29:14.019723 5252 GL-MISC 3264 2008-10-02 10:29:14.019723 5253 GL-MISC 3265 2008-10-02 10:29:14.019723 5254 GL-MISC 3266 2008-10-02 10:31:05.761735 5255 AP-VO 3267 2008-10-02 10:32:29.698376 5256 AP-VO 3268 2008-10-02 10:33:42.618383 5257 AP-CK 3269 2008-10-02 10:33:52.417714 5258 AP-CK 3270 2008-10-02 10:34:43.577196 5259 AP-CK 3271 2008-10-02 10:34:43.577196 5260 AP-MISC 3272 2008-10-02 10:34:43.577196 5261 AP-MISC 3273 2008-10-02 10:35:25.946912 5262 AP-CK 3274 2008-10-02 10:35:25.946912 5263 AP-MISC 3275 2008-10-02 10:35:25.946912 5264 AP-MISC 3276 2008-10-02 10:37:32.020396 5265 GL-MISC 3277 2008-10-02 11:04:13.810864 5266 GL-MISC 3278 2008-10-02 11:04:13.810864 5267 GL-MISC 3279 2008-10-02 11:04:13.810864 5268 GL-MISC 3280 2008-10-02 11:04:35.032418 5269 GL-MISC 3281 2008-10-02 11:04:35.032418 5270 GL-MISC 3282 2008-10-02 11:04:35.032418 5271 GL-MISC 3283 2008-10-02 11:05:05.838595 5272 AR-IN 3284 2008-10-02 11:07:06.991616 5273 AR-IN 3285 2008-10-02 11:07:45.296667 5274 C/R 3286 2008-10-02 11:08:16.258536 5275 C/R 3287 2008-10-02 11:22:17.596569 5276 GL-MISC 3288 2008-12-30 16:34:12.654645 5277 GL-MISC 3289 2008-12-30 16:35:02.681079 5278 GL-MISC 3290 2008-12-30 16:35:02.681079 5279 GL-MISC 3291 2008-12-30 16:35:02.681079 5280 GL-MISC 3292 2008-12-30 16:35:02.681079 5281 GL-MISC 3293 2008-12-30 16:35:26.383119 5282 GL-MISC 3294 2008-12-30 16:35:26.383119 5283 GL-MISC 3295 2008-12-30 16:41:17.968721 5284 GL-MISC 3296 2008-12-31 13:48:48.2886 5285 GL-MISC 3297 2008-12-31 13:48:48.2886 5286 GL-MISC 3298 2008-12-31 13:50:05.752083 5287 AP-VO 3299 2008-12-31 13:50:08.941727 5288 AP-VO 3300 2008-12-31 13:56:13.359747 5289 GL-MISC 3301 2008-12-31 13:58:58.277117 5290 AP-CK 3302 2008-12-31 13:58:58.277117 5291 AP-CK 3303 2008-12-31 14:12:39.353591 5292 AP-CK 3304 2008-12-31 14:12:39.353591 5293 AP-MISC 3305 2008-12-31 14:12:39.353591 5294 AP-MISC 3306 2008-12-31 14:12:43.10223 5295 AP-CK 3307 2008-12-31 14:12:43.10223 5296 AP-MISC 3308 2008-12-31 14:12:43.10223 5297 AP-MISC 3309 2008-12-31 14:13:35.261849 5298 GL-MISC 3310 2008-12-31 14:13:35.261849 5299 GL-MISC 3311 2008-12-31 14:13:35.261849 5300 GL-MISC 3312 2008-12-31 14:13:35.261849 5301 GL-MISC 3313 2008-12-31 14:13:35.261849 5302 GL-MISC 3314 2008-12-31 14:13:38.654946 5303 GL-MISC 3315 2008-12-31 14:13:38.654946 5304 GL-MISC 3316 2008-12-31 14:13:47.92547 5305 GL-MISC 3317 2008-12-31 14:13:47.92547 5306 GL-MISC 3318 2008-12-31 14:13:47.92547 5307 GL-MISC 3319 2008-12-31 14:13:47.92547 5308 GL-MISC 3320 2008-12-31 14:13:47.92547 5309 GL-MISC 3321 2008-12-31 14:13:47.92547 5310 GL-MISC 3322 2008-12-31 14:13:47.92547 5311 GL-MISC 3323 2008-12-31 14:13:47.92547 5312 GL-MISC 3324 2008-12-31 14:13:47.92547 5313 GL-MISC 3325 2008-12-31 14:13:47.92547 5314 GL-MISC 3326 2008-12-31 14:13:47.92547 5315 GL-MISC 3327 2008-12-31 14:14:01.266206 5316 GL-MISC 3328 2008-12-31 14:14:01.266206 5317 GL-MISC 3329 2008-12-31 14:14:17.697236 5318 GL-MISC 3330 2008-12-31 14:14:39.685698 5319 GL-MISC 3331 2008-12-31 14:14:56.786839 5320 AR-IN 3332 2008-12-31 14:57:46.561632 5321 C/R 3333 2008-12-31 14:59:40.514158 5322 GL-MISC 3334 2008-12-31 14:59:40.514158 5323 GL-MISC 3335 2008-12-31 15:00:40.186298 5324 AP-VO 3336 2008-12-31 15:01:27.125605 5325 AP-CK 3337 2008-12-31 15:02:09.298362 5326 AP-CK 3338 2008-12-31 15:02:09.298362 5327 AP-MISC 3339 2008-12-31 15:02:09.298362 5328 AP-MISC 3340 2008-12-31 15:27:17.498292 5329 GL-MISC 3341 2008-12-31 15:27:25.597607 5330 GL-MISC 3342 2008-12-31 15:30:22.664203 5331 AR-IN 3343 2008-12-31 15:31:31.197979 5332 C/R 3344 2008-12-31 15:41:18.751794 5333 G/L 3345 2008-12-31 15:44:33.486643 5334 GL-MISC 3346 2008-12-31 15:49:04.028879 5335 G/L 3347 2008-12-31 15:50:36.930747 5336 GL-MISC 3348 2008-12-31 15:52:59.090396 5337 GL-MISC 3349 2008-12-31 15:55:22.281037 5338 AP-CK 3350 2008-12-31 15:55:55.383305 5339 AP-CK 3351 2008-12-31 15:56:42.551961 5340 AP-CK 3352 2008-12-31 15:56:51.176365 5341 AP-CK 3353 2008-12-31 16:04:46.931937 5342 AR-IN 3354 2008-12-31 16:07:28.552171 5343 C/R 3355 2008-12-31 16:08:57.5974 5344 GL-MISC 3356 2008-12-31 16:11:25.406317 5345 AP-VO 3357 2008-12-31 16:11:44.842445 5346 AP-CK 3358 2008-12-31 16:12:12.036109 5347 AP-CK 3359 2009-01-06 16:22:33.918186 5348 AP-CK 3360 2009-01-06 16:24:22.853482 5349 AP-CK 3361 2009-01-12 13:14:35.396128 5350 GL-MISC 3362 2009-01-12 13:14:35.396128 5351 GL-MISC 3363 2009-01-12 13:14:35.396128 5352 GL-MISC 3364 2009-01-12 13:14:35.396128 5353 GL-MISC 3365 2009-01-12 13:14:35.396128 5354 GL-MISC 3366 2009-01-12 13:14:35.396128 5355 GL-MISC 3367 2009-01-12 13:16:07.705503 5356 AP-VO 3368 2009-01-12 13:16:36.79837 5357 AP-CK 3369 2009-01-12 13:18:59.949285 5358 AP-CK 3370 2009-01-12 13:18:59.949285 5359 AP-MISC 3371 2009-01-12 13:18:59.949285 5360 AP-MISC 3372 2009-01-12 13:21:18.612197 5361 AP-CK 3373 2009-01-12 13:24:44.992694 5362 AP-CK 3374 2009-01-12 13:37:23.336834 5363 GL-MISC 3375 2009-01-12 13:37:23.336834 5364 GL-MISC 3376 2009-01-12 13:37:23.336834 5365 GL-MISC 3377 2009-01-12 13:38:18.764259 5366 GL-MISC 3378 2009-01-12 13:38:18.764259 5367 GL-MISC 3379 2009-01-12 13:38:18.764259 5368 GL-MISC 3380 2009-01-12 13:38:36.11506 5369 AR-IN 3381 2009-01-12 13:51:21.410148 5370 GL-MISC 3382 2009-01-12 13:53:23.947611 5371 GL-MISC 3383 2009-01-12 13:53:52.654529 5372 GL-MISC 3384 2009-01-12 13:54:19.007811 5373 AR-IN 3385 2009-01-12 13:54:42.900138 5374 GL-MISC 3386 2009-01-12 13:54:59.572221 5375 GL-MISC 3387 2009-01-12 13:55:36.791611 5376 AR-IN 3388 2009-01-12 13:56:06.101794 5377 AR-IN 3389 2009-01-12 14:00:32.343057 5378 C/R 3390 2009-01-12 14:00:46.322138 5379 C/R 3391 2009-01-12 14:08:42.366173 5380 AP-VO 3392 2009-01-12 14:08:46.521845 5381 AP-VO 3393 2009-01-12 14:09:42.346427 5382 AP-CK 3394 2009-01-12 14:09:42.346427 5383 AP-CK 3395 2009-01-12 14:10:33.471248 5384 AP-CK 3396 2009-01-12 14:10:39.480439 5385 AP-CK 3397 2009-06-26 15:43:05.816705 5386 AR-IN 3398 2009-06-26 15:43:40.856545 5387 C/R 3399 2009-06-26 15:46:19.62724 5388 GL-MISC 3400 2009-06-26 15:46:19.62724 5389 GL-MISC 3401 2009-06-26 15:46:20.322255 5390 GL-MISC 3402 2009-06-26 15:46:20.322255 5391 GL-MISC 3403 2009-06-26 15:47:39.954534 5392 AP-VO 3404 2009-06-26 15:49:25.57001 5393 AP-CK 3405 2009-06-26 15:49:46.740099 5394 AP-CK 3406 2009-06-26 16:04:41.310155 5395 GL-MISC 3407 2009-06-26 16:04:41.310155 5396 GL-MISC 3408 2009-06-26 16:04:41.310155 5397 GL-MISC 3409 2009-06-26 16:04:41.310155 5398 GL-MISC 3410 2009-06-26 16:04:41.310155 5399 GL-MISC 3411 2009-06-26 16:04:41.310155 5400 GL-MISC 3412 2009-06-26 16:06:00.949558 5401 GL-MISC 3413 2009-06-26 16:06:00.949558 5402 GL-MISC 3414 2009-06-26 16:06:32.492519 5403 AP-VO 3415 2009-06-26 16:06:48.479165 5404 AP-CK 3416 2009-06-26 16:07:06.495372 5405 AP-CK 3417 2009-06-26 16:07:06.495372 5406 AP-MISC 3418 2009-06-26 16:07:06.495372 5407 AP-MISC 3419 2009-06-26 16:07:52.029442 5408 GL-MISC 3420 2009-06-26 16:07:52.029442 5409 GL-MISC 3421 2009-06-26 16:07:52.029442 5410 GL-MISC 3422 2009-06-26 16:07:52.029442 5411 GL-MISC 3423 2009-06-26 16:07:52.029442 5412 GL-MISC 3424 2009-06-26 16:07:52.029442 5413 GL-MISC 3425 2009-06-26 16:07:52.029442 5414 GL-MISC 3426 2009-06-26 16:07:52.029442 5415 GL-MISC 3427 2009-06-26 16:08:11.32276 5416 GL-MISC 3428 2009-06-26 16:08:11.32276 5417 GL-MISC 3429 2009-06-26 16:08:11.32276 5418 GL-MISC 3430 2009-06-26 16:08:11.32276 5419 GL-MISC 3431 2009-06-26 16:08:11.32276 5420 GL-MISC 3432 2009-06-26 16:08:11.32276 5421 GL-MISC 3433 2009-06-26 16:08:11.32276 5422 GL-MISC 3434 2009-06-26 16:08:11.32276 5423 GL-MISC 3435 2009-06-26 16:08:38.016253 5424 GL-MISC 3436 2009-06-26 16:08:38.016253 5425 GL-MISC 3437 2009-06-26 16:08:38.016253 5426 GL-MISC 3438 2009-06-26 16:08:38.016253 5427 GL-MISC 3439 2009-06-26 16:08:38.016253 5428 GL-MISC 3440 2009-06-26 16:08:38.016253 5429 GL-MISC 3441 2009-06-26 16:08:38.016253 5430 GL-MISC 3442 2009-06-26 16:08:38.016253 5431 GL-MISC 3443 2009-06-26 16:11:32.419021 5432 GL-MISC 3444 2009-06-26 16:11:35.256986 5433 GL-MISC 3445 2009-06-26 16:11:42.700487 5434 GL-MISC 3446 2009-06-26 16:12:00.002025 5435 GL-MISC 3447 2009-06-26 16:12:00.002025 5436 GL-MISC 3448 2009-06-26 16:12:00.002025 5437 GL-MISC 3449 2009-06-26 16:12:10.106442 5438 AR-IN 3450 2009-06-26 16:13:26.006581 5439 C/R 3451 2009-06-26 16:16:51.261895 5440 G/L 3452 2009-06-26 16:17:25.687284 5441 G/L 3453 2009-06-26 16:18:27.125184 5442 G/L 3454 2009-06-26 16:19:12.18568 5443 G/L 3455 2009-06-26 16:19:29.648604 5444 G/L 3456 2009-06-26 16:21:56.600999 5445 GL-MISC 3457 2009-06-26 16:23:40.650857 5446 AP-VO 3458 2009-06-26 16:24:50.393552 5447 AP-CK 3459 2009-06-26 16:25:10.553859 5448 AP-CK 3460 2009-06-26 16:25:10.553859 5449 AP-MISC 3461 2009-06-26 16:25:10.553859 5450 AP-MISC 3462 2009-06-26 16:34:05.287072 5451 G/L 3463 2009-06-26 16:34:35.597741 5452 G/L 3464 2009-06-26 16:51:25.844564 5453 G/L 3465 2009-06-26 16:53:13.471565 5454 G/L 3466 2009-06-26 16:53:31.94526 5455 G/L 3467 2009-06-26 16:54:55.707084 5456 G/L 3468 2009-06-26 16:55:03.106742 5457 G/L 3469 2009-06-26 16:55:09.488571 5458 G/L 3470 2009-08-13 08:36:05.792569 5459 G/L 3471 2009-08-13 08:36:20.129025 5460 G/L 3482 2009-08-13 08:45:52.119528 5471 GL-MISC 3483 2009-08-13 08:45:52.119528 5472 GL-MISC 3484 2009-08-13 08:45:52.119528 5473 GL-MISC 3485 2009-08-13 08:45:52.119528 5474 GL-MISC 3486 2009-08-13 08:45:52.119528 5475 GL-MISC 3487 2009-08-13 08:45:52.119528 5476 GL-MISC 3488 2009-08-13 08:45:52.119528 5477 GL-MISC 3489 2009-08-13 08:45:52.119528 5478 GL-MISC 3490 2009-08-13 08:45:52.119528 5479 GL-MISC 3491 2009-08-13 08:45:52.119528 5480 GL-MISC 3492 2009-08-13 08:47:32.065035 5481 AP-VO 3493 2009-08-13 08:48:29.184159 5482 AP-CK 3494 2009-08-13 08:48:50.436372 5483 AP-CK 3495 2009-08-13 08:48:50.436372 5484 AP-MISC 3496 2009-08-13 08:48:50.436372 5485 AP-MISC 3497 2009-08-13 08:50:25.065315 5486 GL-MISC 3498 2009-08-13 08:50:25.065315 5487 GL-MISC 3499 2009-08-13 08:50:25.065315 5488 GL-MISC 3500 2009-08-13 08:50:25.065315 5489 GL-MISC 3501 2009-08-13 08:50:25.065315 5490 GL-MISC 3502 2009-08-13 08:50:29.387888 5491 GL-MISC 3503 2009-08-13 08:50:29.387888 5492 GL-MISC 3504 2009-08-13 08:52:34.091695 5493 GL-MISC 3505 2009-08-13 08:52:34.091695 5494 GL-MISC 3506 2009-08-13 08:52:34.091695 5495 GL-MISC 3507 2009-08-13 08:52:34.091695 5496 GL-MISC 3508 2009-08-13 08:52:34.091695 5497 GL-MISC 3509 2009-08-13 08:52:34.091695 5498 GL-MISC 3510 2009-08-13 08:52:34.091695 5499 GL-MISC 3511 2009-08-13 08:52:34.091695 5500 GL-MISC 3512 2009-08-13 08:52:34.091695 5501 GL-MISC 3513 2009-08-13 08:52:34.091695 5502 GL-MISC 3514 2009-08-13 08:52:34.091695 5503 GL-MISC 3515 2009-08-13 08:52:50.213608 5504 GL-MISC 3516 2009-08-13 08:52:50.213608 5505 GL-MISC 3517 2009-08-13 08:53:01.761218 5506 GL-MISC 3518 2009-08-13 08:53:09.819257 5507 GL-MISC 3519 2009-08-13 08:53:23.799561 5508 AR-IN 3520 2009-08-13 08:54:32.088319 5509 C/R 3521 2009-09-16 13:53:52.094642 5510 GL-MISC 3522 2009-09-16 14:01:41.564999 5511 GL-MISC 3523 2009-09-16 14:01:41.564999 5512 GL-MISC 3524 2009-09-16 14:02:06.670672 5513 GL-MISC 3525 2009-09-16 14:02:06.670672 5514 GL-MISC 3526 2009-09-16 14:02:06.670672 5515 GL-MISC 3527 2009-09-16 14:02:06.670672 5516 GL-MISC 3528 2009-09-16 14:02:06.670672 5517 GL-MISC 3529 2009-09-16 14:02:29.104421 5518 GL-MISC 3530 2009-09-16 14:02:29.104421 5519 GL-MISC 3531 2009-09-16 14:02:29.104421 5520 GL-MISC 3532 2009-09-16 14:02:29.104421 5521 GL-MISC 3533 2009-09-16 14:02:29.104421 5522 GL-MISC 3534 2009-09-16 14:02:29.104421 5523 GL-MISC 3535 2009-09-16 14:02:29.104421 5524 GL-MISC 3536 2009-09-16 14:02:29.104421 5525 GL-MISC 3537 2009-09-16 14:02:29.104421 5526 GL-MISC 3538 2009-09-16 14:02:29.104421 5527 GL-MISC 3539 2009-09-16 14:02:29.104421 5528 GL-MISC 3540 2009-09-16 14:02:41.633349 5529 GL-MISC 3541 2009-09-16 14:02:41.633349 5530 GL-MISC 3542 2009-09-16 14:02:47.407802 5531 GL-MISC 3543 2009-09-16 14:02:47.407802 5532 GL-MISC 3544 2009-09-16 14:04:15.90467 5533 AP-VO 3545 2009-09-16 14:04:47.04972 5534 AP-CK 3546 2009-09-16 14:05:14.337109 5535 AP-CK 3547 2009-09-16 14:05:14.337109 5536 AP-MISC 3548 2009-09-16 14:05:14.337109 5537 AP-MISC 3549 2009-09-16 14:06:01.207031 5538 GL-MISC 3550 2009-09-16 14:06:01.489398 5539 GL-MISC 3925 2009-10-13 13:29:46.360576 5914 GL-MISC 3552 2009-09-16 14:08:16.025412 5541 GL-MISC 3553 2009-09-16 14:08:16.025412 5542 GL-MISC 3554 2009-09-16 14:08:49.028423 5543 GL-MISC 3555 2009-09-16 14:08:49.028423 5544 GL-MISC 3556 2009-09-16 14:08:49.028423 5545 GL-MISC 3557 2009-09-16 14:08:49.028423 5546 GL-MISC 3558 2009-09-16 14:08:49.028423 5547 GL-MISC 3559 2009-09-16 14:08:49.028423 5548 GL-MISC 3926 2009-10-13 13:29:46.360576 5915 GL-MISC 3927 2009-10-13 13:29:54.477629 5916 GL-MISC 3928 2009-10-13 13:30:05.859373 5917 GL-MISC 3929 2009-10-13 13:30:05.859373 5918 GL-MISC 3930 2009-10-13 13:32:31.894721 5919 AP-VO 3931 2009-10-13 13:33:22.676149 5920 AP-CK 3932 2009-10-13 13:33:22.676149 5921 AP-CK 3933 2009-10-13 13:34:01.955903 5922 AP-CK 3934 2009-10-13 13:34:22.938533 5923 AP-CK 3935 2009-10-13 13:34:22.938533 5924 AP-MISC 3936 2009-10-13 13:34:22.938533 5925 AP-MISC 3937 2009-10-13 13:34:32.185743 5926 AP-CK 3938 2009-10-13 13:34:32.185743 5927 AP-MISC 3939 2009-10-13 13:34:32.185743 5928 AP-MISC 3940 2009-10-13 13:34:35.280612 5929 AP-CK 3941 2009-10-13 13:34:35.280612 5930 AP-MISC 3942 2009-10-13 13:34:35.280612 5931 AP-MISC 3577 2009-09-16 14:20:53.202603 5566 GL-MISC 3578 2009-09-16 14:20:55.312698 5567 GL-MISC 3579 2009-09-16 14:35:09.991769 5568 GL-MISC 3580 2009-09-16 14:35:09.991769 5569 GL-MISC 3581 2009-09-16 14:35:10.409384 5570 GL-MISC 3582 2009-09-16 14:35:10.409384 5571 GL-MISC 3583 2009-09-16 14:35:10.826688 5572 GL-MISC 3584 2009-09-16 14:35:10.826688 5573 GL-MISC 3585 2009-09-16 14:38:50.441297 5574 GL-MISC 3586 2009-09-16 14:38:50.441297 5575 GL-MISC 3587 2009-09-16 14:38:50.768926 5576 GL-MISC 3588 2009-09-16 14:38:50.768926 5577 GL-MISC 3943 2009-10-13 13:36:44.045243 5932 GL-MISC 3944 2009-10-13 13:36:44.045243 5933 GL-MISC 3945 2009-10-13 13:36:44.045243 5934 GL-MISC 3946 2009-10-13 13:36:44.045243 5935 GL-MISC 3947 2009-10-13 13:36:47.494291 5936 GL-MISC 3948 2009-10-13 13:36:47.494291 5937 GL-MISC 3949 2009-10-13 13:37:01.52835 5938 GL-MISC 3950 2009-10-13 13:37:01.52835 5939 GL-MISC 3951 2009-10-13 13:37:01.52835 5940 GL-MISC 3598 2009-09-16 14:43:38.956601 5587 GL-MISC 3599 2009-09-16 14:43:38.956601 5588 GL-MISC 3600 2009-09-16 14:43:38.956601 5589 GL-MISC 3601 2009-09-16 14:43:38.956601 5590 GL-MISC 3602 2009-09-16 14:43:38.956601 5591 GL-MISC 3603 2009-09-16 14:43:38.956601 5592 GL-MISC 3604 2009-09-16 14:43:38.956601 5593 GL-MISC 3605 2009-09-16 14:43:38.956601 5594 GL-MISC 3606 2009-09-16 14:44:42.947646 5595 GL-MISC 3607 2009-09-16 14:44:42.947646 5596 GL-MISC 3608 2009-09-16 14:44:42.947646 5597 GL-MISC 3609 2009-09-16 14:44:42.947646 5598 GL-MISC 3610 2009-09-16 14:44:42.947646 5599 GL-MISC 3611 2009-09-16 14:44:42.947646 5600 GL-MISC 3612 2009-09-16 14:44:42.947646 5601 GL-MISC 3613 2009-09-16 14:44:42.947646 5602 GL-MISC 3952 2009-10-13 13:37:01.52835 5941 GL-MISC 3953 2009-10-13 13:37:01.52835 5942 GL-MISC 3954 2009-10-13 13:37:06.105587 5943 GL-MISC 3955 2009-10-13 13:37:06.105587 5944 GL-MISC 3956 2009-10-13 13:37:14.252675 5945 GL-MISC 3957 2009-10-13 13:37:14.252675 5946 GL-MISC 3958 2009-10-13 13:37:14.252675 5947 GL-MISC 3959 2009-10-13 13:37:14.252675 5948 GL-MISC 3960 2009-10-13 13:37:14.252675 5949 GL-MISC 3623 2009-09-16 14:47:11.457164 5612 GL-MISC 3624 2009-09-16 14:47:11.457164 5613 GL-MISC 3625 2009-09-16 14:47:11.457164 5614 GL-MISC 3626 2009-09-16 14:47:11.457164 5615 GL-MISC 3627 2009-09-16 14:47:11.457164 5616 GL-MISC 3628 2009-09-16 14:47:11.457164 5617 GL-MISC 3629 2009-09-16 14:47:11.457164 5618 GL-MISC 3630 2009-09-16 14:47:11.457164 5619 GL-MISC 3631 2009-09-21 09:20:10.215504 5620 GL-MISC 3632 2009-09-21 09:20:10.540645 5621 GL-MISC 3633 2009-09-21 09:20:10.73089 5622 GL-MISC 3634 2009-09-21 09:20:16.182737 5623 GL-MISC 3635 2009-09-21 09:20:37.141647 5624 GL-MISC 3636 2009-09-21 09:20:37.141647 5625 GL-MISC 3637 2009-09-21 09:20:37.141647 5626 GL-MISC 3638 2009-09-21 09:20:37.141647 5627 GL-MISC 3639 2009-09-21 09:21:52.193661 5628 GL-MISC 3640 2009-09-21 09:21:52.193661 5629 GL-MISC 3641 2009-09-21 09:21:52.53347 5630 GL-MISC 3642 2009-09-21 09:21:52.53347 5631 GL-MISC 3643 2009-09-21 09:21:52.920137 5632 GL-MISC 3644 2009-09-21 09:21:52.920137 5633 GL-MISC 3645 2009-09-21 09:21:53.128839 5634 GL-MISC 3646 2009-09-21 09:21:53.128839 5635 GL-MISC 3647 2009-09-21 09:25:22.136436 5636 GL-MISC 3648 2009-09-21 09:25:22.339291 5637 GL-MISC 3649 2009-09-21 09:25:22.539195 5638 GL-MISC 3650 2009-09-21 09:25:22.726848 5639 GL-MISC 3651 2009-09-21 09:25:30.672088 5640 GL-MISC 3652 2009-09-21 09:25:30.672088 5641 GL-MISC 3653 2009-09-21 09:25:30.672088 5642 GL-MISC 3654 2009-09-21 09:25:30.672088 5643 GL-MISC 3655 2009-09-21 09:25:31.424429 5644 GL-MISC 3656 2009-09-21 09:25:31.424429 5645 GL-MISC 3657 2009-09-21 09:25:31.671052 5646 GL-MISC 3658 2009-09-21 09:25:31.671052 5647 GL-MISC 3659 2009-09-21 09:25:31.878395 5648 GL-MISC 3660 2009-09-21 09:25:31.878395 5649 GL-MISC 3661 2009-09-21 09:25:32.121072 5650 GL-MISC 3662 2009-09-21 09:25:32.121072 5651 GL-MISC 3663 2009-09-21 09:25:38.400236 5652 GL-MISC 3664 2009-09-21 09:25:38.763348 5653 GL-MISC 3665 2009-09-21 09:25:38.95296 5654 GL-MISC 3666 2009-09-21 09:25:39.143007 5655 GL-MISC 3667 2009-09-21 09:25:44.237909 5656 GL-MISC 3668 2009-09-21 09:25:44.237909 5657 GL-MISC 3669 2009-09-21 09:25:44.237909 5658 GL-MISC 3670 2009-09-21 09:25:44.237909 5659 GL-MISC 3671 2009-09-21 09:25:44.997847 5660 GL-MISC 3672 2009-09-21 09:25:44.997847 5661 GL-MISC 3673 2009-09-21 09:25:45.594884 5662 GL-MISC 3674 2009-09-21 09:25:45.594884 5663 GL-MISC 3675 2009-09-21 09:25:45.802683 5664 GL-MISC 3676 2009-09-21 09:25:45.802683 5665 GL-MISC 3677 2009-09-21 09:25:46.017657 5666 GL-MISC 3678 2009-09-21 09:25:46.017657 5667 GL-MISC 3679 2009-09-21 09:30:46.575722 5668 S/O 3680 2009-09-21 09:59:21.066544 5669 C/R 3681 2009-09-21 10:02:49.913979 5670 S/O 3682 2009-09-21 13:25:48.658055 5671 GL-MISC 3683 2009-09-21 14:05:25.912491 5672 GL-MISC 3684 2009-09-21 14:15:39.704831 5673 GL-MISC 3685 2009-09-21 14:19:15.920814 5674 GL-MISC 3686 2009-09-21 14:23:45.383677 5675 GL-MISC 3687 2009-09-21 14:25:06.40069 5676 C/R 3688 2009-09-21 14:29:38.09104 5677 S/O 3689 2009-09-21 14:48:26.830118 5678 GL-MISC 3690 2009-09-21 14:50:59.861613 5679 GL-MISC 3691 2009-09-21 14:53:57.886571 5680 GL-MISC 3692 2009-09-21 14:53:58.191934 5681 GL-MISC 3693 2009-09-21 14:53:58.396963 5682 GL-MISC 3694 2009-09-21 14:54:05.78596 5683 GL-MISC 3695 2009-09-21 14:54:05.78596 5684 GL-MISC 3696 2009-09-21 14:54:05.78596 5685 GL-MISC 3697 2009-09-21 14:54:06.608549 5686 GL-MISC 3698 2009-09-21 14:54:06.608549 5687 GL-MISC 3699 2009-09-21 14:54:06.986139 5688 GL-MISC 3700 2009-09-21 14:54:06.986139 5689 GL-MISC 3701 2009-09-21 14:54:07.251803 5690 GL-MISC 3702 2009-09-21 14:54:07.251803 5691 GL-MISC 3703 2009-09-21 14:55:13.941435 5692 GL-MISC 3704 2009-09-21 14:56:05.431212 5693 GL-MISC 3705 2009-09-21 15:12:46.208715 5694 GL-MISC 3706 2009-09-21 15:12:46.208715 5695 GL-MISC 3707 2009-09-21 15:12:46.208715 5696 GL-MISC 3708 2009-09-21 15:12:46.208715 5697 GL-MISC 3709 2009-09-21 15:16:43.671732 5698 C/R 3710 2009-09-21 15:18:43.803214 5699 S/O 3711 2009-09-21 15:21:37.177112 5700 GL-MISC 3712 2009-09-21 15:24:21.864743 5701 S/O 3713 2009-09-21 15:25:15.698812 5702 S/O 3714 2009-09-21 15:25:50.948554 5703 S/O 3715 2009-09-21 15:26:21.32366 5704 C/R 3716 2009-09-21 15:27:41.65371 5705 GL-MISC 3717 2009-09-21 15:33:38.471317 5706 S/O 3718 2009-09-21 15:44:36.270928 5707 C/R 3719 2009-09-21 15:46:11.836465 5708 C/R 3720 2009-09-21 16:57:42.627442 5709 GL-MISC 3721 2009-09-21 16:57:42.627442 5710 GL-MISC 3722 2009-09-21 16:58:18.356578 5711 GL-MISC 3723 2009-09-21 16:58:18.356578 5712 GL-MISC 3724 2009-09-21 16:58:18.356578 5713 GL-MISC 3725 2009-09-21 16:58:18.356578 5714 GL-MISC 3726 2009-09-21 16:58:18.356578 5715 GL-MISC 3727 2009-09-21 16:58:22.741897 5716 GL-MISC 3728 2009-09-21 16:58:22.741897 5717 GL-MISC 3729 2009-09-21 16:58:32.138356 5718 GL-MISC 3730 2009-09-21 16:58:32.138356 5719 GL-MISC 3731 2009-09-21 16:58:32.138356 5720 GL-MISC 3732 2009-09-21 16:58:32.138356 5721 GL-MISC 3733 2009-09-21 16:58:32.138356 5722 GL-MISC 3734 2009-09-21 16:58:32.138356 5723 GL-MISC 3735 2009-09-21 16:58:32.138356 5724 GL-MISC 3736 2009-09-21 16:58:32.138356 5725 GL-MISC 3737 2009-09-21 16:58:32.138356 5726 GL-MISC 3738 2009-09-21 16:58:32.138356 5727 GL-MISC 3739 2009-09-21 16:58:32.138356 5728 GL-MISC 3740 2009-09-21 16:58:44.427418 5729 GL-MISC 3741 2009-09-21 16:58:44.427418 5730 GL-MISC 3742 2009-09-21 17:02:23.786259 5731 AP-VO 3743 2009-09-21 17:03:22.875693 5732 AP-CK 3744 2009-09-21 17:03:22.875693 5733 AP-CK 3745 2009-09-21 17:08:08.74506 5734 AP-CK 3746 2009-09-21 17:09:34.705919 5735 AP-CK 3747 2009-09-21 17:09:53.966125 5736 AP-CK 3748 2009-09-21 17:10:05.68371 5737 GL-MISC 3749 2009-09-21 17:10:16.913459 5738 GL-MISC 3750 2009-09-21 17:10:30.306899 5739 AR-IN 3751 2009-09-21 17:11:58.337968 5740 C/R 3752 2009-09-22 08:14:21.175107 5741 GL-MISC 3753 2009-09-22 08:14:21.175107 5742 GL-MISC 3754 2009-09-22 08:14:21.805394 5743 GL-MISC 3755 2009-09-22 08:14:21.805394 5744 GL-MISC 3756 2009-09-22 08:18:51.419203 5745 GL-MISC 3757 2009-09-22 08:18:51.419203 5746 GL-MISC 3758 2009-09-22 08:18:51.774134 5747 GL-MISC 3759 2009-09-22 08:18:51.774134 5748 GL-MISC 3760 2009-09-22 08:25:26.741647 5749 GL-MISC 3761 2009-09-22 08:25:26.741647 5750 GL-MISC 3762 2009-09-22 08:25:27.072249 5751 GL-MISC 3763 2009-09-22 08:25:27.072249 5752 GL-MISC 3764 2009-09-22 08:36:31.412804 5753 C/R 3765 2009-09-22 08:45:21.882188 5754 C/R 3766 2009-09-22 08:54:40.416059 5755 C/R 3767 2009-09-22 08:55:58.678979 5756 C/R 3768 2009-09-22 09:11:48.465506 5757 AR-IN 3769 2009-09-22 09:12:48.363874 5758 C/R 3770 2009-09-22 09:14:15.809075 5759 C/R 3771 2009-09-22 09:16:32.095767 5760 C/R 3772 2009-09-22 10:30:13.635685 5761 GL-MISC 3773 2009-09-22 10:30:13.635685 5762 GL-MISC 3774 2009-09-22 10:30:14.126116 5763 GL-MISC 3775 2009-09-22 10:30:14.126116 5764 GL-MISC 3776 2009-09-22 10:30:14.448509 5765 GL-MISC 3777 2009-09-22 10:30:14.448509 5766 GL-MISC 3778 2009-09-22 10:30:14.790954 5767 GL-MISC 3779 2009-09-22 10:30:14.790954 5768 GL-MISC 3780 2009-09-22 11:04:10.443933 5769 AR-IN 3781 2009-09-22 11:04:50.91252 5770 AR-MISC 3782 2009-09-22 11:05:21.930612 5771 C/R 3783 2009-09-22 11:06:16.121945 5772 AP-VO 3784 2009-09-22 11:07:05.438559 5773 AP-CK 3785 2009-09-23 08:03:50.074838 5774 S/O 3786 2009-09-23 09:08:41.256921 5775 S/O 3787 2009-09-23 09:12:09.827633 5776 C/R 3788 2009-09-23 09:17:49.668275 5777 GL-MISC 3789 2009-09-23 09:18:56.487349 5778 GL-MISC 3790 2009-09-23 09:20:06.733057 5779 C/R 3791 2009-09-23 09:27:39.106284 5780 S/O 3792 2009-09-23 09:28:55.811473 5781 C/R 3793 2009-09-24 16:02:36.120522 5782 GL-MISC 3794 2009-09-24 16:02:36.120522 5783 GL-MISC 3795 2009-09-24 16:09:07.369988 5784 AP-VO 3796 2009-09-24 16:09:39.228515 5785 AP-CK 3797 2009-09-24 16:09:39.228515 5786 AP-CK 3798 2009-09-24 16:12:59.707149 5787 AP-CK 3799 2009-09-24 16:12:59.707149 5788 AP-MISC 3800 2009-09-24 16:12:59.707149 5789 AP-MISC 3801 2009-09-24 16:12:59.707149 5790 AP-MISC 3802 2009-09-24 16:12:59.707149 5791 AP-MISC 3803 2009-09-24 16:12:59.707149 5792 AP-MISC 3804 2009-09-24 16:12:59.707149 5793 AP-MISC 3805 2009-09-24 16:12:59.707149 5794 AP-MISC 3806 2009-09-24 16:12:59.707149 5795 AP-MISC 3807 2009-09-24 16:12:59.707149 5796 AP-MISC 3808 2009-09-24 16:12:59.707149 5797 AP-MISC 3809 2009-09-24 16:12:59.707149 5798 AP-MISC 3810 2009-09-24 16:12:59.707149 5799 AP-MISC 3811 2009-09-24 16:25:54.415988 5800 GL-MISC 3812 2009-09-25 08:59:06.340805 5801 AP-MISC 3813 2009-09-25 09:03:29.861828 5802 GL-MISC 3814 2009-09-25 09:03:29.861828 5803 GL-MISC 3815 2009-09-25 09:03:29.861828 5804 GL-MISC 3816 2009-09-25 09:03:29.861828 5805 GL-MISC 3817 2009-09-25 09:03:29.861828 5806 GL-MISC 3818 2009-09-25 09:03:29.861828 5807 GL-MISC 3819 2009-09-25 09:03:29.861828 5808 GL-MISC 3820 2009-09-25 09:03:29.861828 5809 GL-MISC 3821 2009-09-25 09:03:29.861828 5810 GL-MISC 3822 2009-09-25 09:03:29.861828 5811 GL-MISC 3823 2009-09-25 09:03:29.861828 5812 GL-MISC 3824 2009-09-25 09:03:29.861828 5813 GL-MISC 3825 2009-09-25 09:03:29.861828 5814 GL-MISC 3826 2009-09-25 09:03:29.861828 5815 GL-MISC 3827 2009-09-25 09:03:29.861828 5816 GL-MISC 3828 2009-09-25 09:03:29.861828 5817 GL-MISC 3829 2009-09-25 09:03:29.861828 5818 GL-MISC 3830 2009-09-25 09:03:29.861828 5819 GL-MISC 3831 2009-09-25 09:04:37.657884 5820 GL-MISC 3832 2009-09-25 09:05:30.891943 5821 GL-MISC 3833 2009-09-25 09:05:30.891943 5822 GL-MISC 3834 2009-09-25 09:06:18.026142 5823 GL-MISC 3835 2009-09-25 09:14:18.561497 5824 GL-MISC 3836 2009-09-25 09:14:18.561497 5825 GL-MISC 3837 2009-09-25 09:16:37.207748 5826 AP-VO 3838 2009-09-25 09:17:53.068315 5827 AP-MISC 3839 2009-09-25 09:18:45.006052 5828 AP-CK 3840 2009-09-25 09:19:09.610601 5829 AP-CK 3841 2009-09-25 09:19:09.610601 5830 AP-MISC 3842 2009-09-25 09:19:09.610601 5831 AP-MISC 3843 2009-09-25 09:24:27.293829 5832 GL-MISC 3844 2009-09-25 09:24:27.293829 5833 GL-MISC 3845 2009-09-25 09:24:27.293829 5834 GL-MISC 3846 2009-09-25 09:26:01.294518 5835 GL-MISC 3847 2009-09-25 09:26:15.173834 5836 GL-MISC 3848 2009-09-25 09:26:15.173834 5837 GL-MISC 3849 2009-09-25 09:26:15.173834 5838 GL-MISC 3850 2009-09-25 09:26:15.173834 5839 GL-MISC 3851 2009-09-25 09:26:51.668585 5840 GL-MISC 3852 2009-09-25 09:26:59.813165 5841 GL-MISC 3853 2009-09-25 09:26:59.813165 5842 GL-MISC 3854 2009-09-25 09:26:59.813165 5843 GL-MISC 3855 2009-09-25 09:27:35.684101 5844 GL-MISC 3856 2009-09-25 09:27:35.684101 5845 GL-MISC 3857 2009-09-25 09:30:24.444215 5846 AR-MISC 3858 2009-09-25 09:34:26.105368 5847 C/R 3859 2009-09-25 09:35:20.736595 5848 C/R 3860 2009-09-25 09:46:27.073604 5849 GL-MISC 3861 2009-09-25 09:56:04.395986 5850 GL-MISC 3961 2009-10-13 13:37:17.242638 5950 GL-MISC 3962 2009-10-13 13:37:17.242638 5951 GL-MISC 3963 2009-10-13 13:37:26.971918 5952 GL-MISC 3964 2009-10-13 13:37:26.971918 5953 GL-MISC 3965 2009-10-13 13:37:26.971918 5954 GL-MISC 3966 2009-10-13 13:37:26.971918 5955 GL-MISC 3967 2009-10-13 13:37:26.971918 5956 GL-MISC 3968 2009-10-13 13:37:26.971918 5957 GL-MISC 3870 2009-09-25 10:10:40.338553 5859 GL-MISC 3871 2009-09-25 10:10:58.446895 5860 GL-MISC 3872 2009-09-25 10:18:46.722202 5861 GL-MISC 3873 2009-09-25 10:19:06.39027 5862 GL-MISC 3874 2009-09-25 10:21:49.80949 5863 GL-MISC 3875 2009-09-25 10:23:58.941212 5864 GL-MISC 3876 2009-09-25 10:24:04.705472 5865 GL-MISC 3969 2009-10-13 13:37:26.971918 5958 GL-MISC 3970 2009-10-13 13:37:26.971918 5959 GL-MISC 3879 2009-09-25 10:31:29.501399 5868 GL-MISC 3880 2009-09-25 10:32:11.348886 5869 GL-MISC 3881 2009-09-25 10:32:41.650078 5870 AR-IN 3971 2009-10-13 13:37:26.971918 5960 GL-MISC 3972 2009-10-13 13:37:26.971918 5961 GL-MISC 3884 2009-09-25 10:36:05.882969 5873 AR-MISC 3885 2009-09-25 10:42:44.745809 5874 GL-MISC 3886 2009-09-25 10:42:52.160988 5875 GL-MISC 3887 2009-09-25 10:42:57.982312 5876 GL-MISC 3888 2009-09-25 10:43:04.216905 5877 GL-MISC 3973 2009-10-13 13:37:26.971918 5962 GL-MISC 3974 2009-10-13 13:37:26.971918 5963 GL-MISC 3891 2009-09-25 10:43:36.882185 5880 GL-MISC 3892 2009-09-25 10:43:56.693142 5881 GL-MISC 3893 2009-09-25 10:44:38.329216 5882 GL-MISC 3894 2009-09-25 10:49:47.453889 5883 GL-MISC 3895 2009-09-25 10:49:53.56885 5884 GL-MISC 3975 2009-10-13 13:37:26.971918 5964 GL-MISC 3976 2009-10-13 13:37:52.16287 5965 GL-MISC 3898 2009-09-25 10:50:07.125305 5887 GL-MISC 3899 2009-09-25 10:50:39.665449 5888 GL-MISC 3900 2009-09-25 10:53:27.223786 5889 C/R 3901 2009-09-25 11:01:50.164113 5890 GL-MISC 3902 2009-09-25 11:01:57.148563 5891 GL-MISC 3977 2009-10-13 13:37:52.16287 5966 GL-MISC 3978 2009-10-13 13:37:59.957039 5967 GL-MISC 3905 2009-09-25 11:02:54.312572 5894 GL-MISC 3906 2009-09-25 11:07:26.448473 5895 GL-MISC 3907 2009-09-25 11:10:20.971352 5896 GL-MISC 3908 2009-09-25 12:38:12.110556 5897 GL-MISC 3909 2009-09-25 12:38:12.110556 5898 GL-MISC 3979 2009-10-13 13:37:59.957039 5968 GL-MISC 3911 2009-09-25 12:40:32.869483 5900 GL-MISC 3912 2009-09-25 12:40:38.069364 5901 GL-MISC 3980 2009-10-13 13:37:59.957039 5969 GL-MISC 3914 2009-09-25 12:47:08.620928 5903 GL-MISC 3915 2009-09-25 12:47:45.353122 5904 GL-MISC 3916 2009-09-25 12:48:20.251017 5905 GL-MISC 3917 2009-09-25 12:49:41.171164 5906 GL-MISC 3918 2009-09-25 12:49:45.76827 5907 GL-MISC 3919 2009-09-25 12:50:02.427694 5908 GL-MISC 3920 2009-09-25 12:50:02.427694 5909 GL-MISC 3921 2009-09-25 12:52:07.667942 5910 GL-MISC 3922 2009-09-25 12:52:18.933228 5911 GL-MISC 3923 2009-09-25 12:52:41.825928 5912 GL-MISC 3924 2009-09-25 12:52:41.825928 5913 GL-MISC 3981 2009-10-13 13:37:59.957039 5970 GL-MISC 3982 2009-10-13 13:37:59.957039 5971 GL-MISC 3983 2009-10-13 13:37:59.957039 5972 GL-MISC 3984 2009-10-13 13:37:59.957039 5973 GL-MISC 3985 2009-10-13 13:37:59.957039 5974 GL-MISC 3986 2009-10-13 13:37:59.957039 5975 GL-MISC 3987 2009-10-13 13:37:59.957039 5976 GL-MISC 3988 2009-10-13 13:37:59.957039 5977 GL-MISC 3989 2009-10-13 13:38:16.230866 5978 GL-MISC 3990 2009-10-13 13:38:16.230866 5979 GL-MISC 3991 2009-10-13 13:40:27.302082 5980 GL-MISC 3992 2009-10-13 13:40:27.302082 5981 GL-MISC 3993 2009-10-13 13:40:27.302082 5982 GL-MISC 3994 2009-10-13 13:40:27.302082 5983 GL-MISC 3995 2009-10-13 13:40:39.531523 5984 GL-MISC 3996 2009-10-13 13:40:39.531523 5985 GL-MISC 3997 2009-10-13 13:40:39.531523 5986 GL-MISC 3998 2009-10-13 13:40:39.531523 5987 GL-MISC 3999 2009-10-13 13:40:57.52482 5988 GL-MISC 4000 2009-10-13 13:40:57.52482 5989 GL-MISC 4001 2009-10-13 13:42:04.980174 5990 GL-MISC 4002 2009-10-13 13:42:14.03955 5991 GL-MISC 4009 2009-10-13 13:44:19.076001 5998 GL-MISC 4010 2009-10-13 13:44:51.607186 5999 GL-MISC 4011 2009-10-13 13:47:14.595953 6000 GL-MISC 4012 2009-10-13 13:47:21.099072 6001 GL-MISC 4017 2009-10-13 14:23:13.027902 6006 GL-MISC 4018 2009-10-13 14:23:25.824697 6007 GL-MISC 4019 2009-10-13 14:24:16.915529 6008 GL-MISC 4020 2009-10-13 14:24:51.918254 6009 GL-MISC 4021 2009-10-13 14:25:04.515138 6010 GL-MISC 4022 2009-10-13 14:25:15.101797 6011 AR-IN 4023 2009-10-13 14:25:20.846471 6012 GL-MISC 4024 2009-10-13 14:25:25.463572 6013 GL-MISC 4025 2009-10-13 14:25:34.297924 6014 AR-IN 4026 2009-10-13 14:27:10.978501 6015 C/R 4027 2009-10-13 14:27:44.463572 6016 C/R 4028 2009-10-13 14:32:36.839299 6017 GL-MISC 4029 2009-10-13 14:32:41.031211 6018 GL-MISC 4030 2009-10-13 14:32:41.678363 6019 GL-MISC 4031 2009-10-13 14:32:41.678363 6020 GL-MISC 4032 2009-10-13 14:34:13.627003 6021 S/O 4033 2009-10-13 14:35:04.420718 6022 GL-MISC 4034 2009-10-13 14:36:17.116972 6023 C/R 4035 2009-10-13 14:37:40.830135 6024 GL-MISC 4036 2009-10-13 14:37:44.980566 6025 GL-MISC 4037 2009-10-13 14:37:59.437742 6026 GL-MISC 4038 2009-10-13 14:37:59.437742 6027 GL-MISC 4041 2009-10-13 14:45:47.060933 6030 GL-MISC 4042 2009-10-13 14:45:47.060933 6031 GL-MISC 4043 2009-10-13 14:45:47.396454 6032 GL-MISC 4044 2009-10-13 14:45:47.396454 6033 GL-MISC 4045 2009-12-03 14:56:23.910523 6034 G/L 4046 2009-12-03 14:56:41.838571 6035 G/L 4047 2009-12-03 15:07:16.943231 6036 AR-IN 4048 2009-12-03 15:10:00.861344 6037 C/R 4049 2009-12-03 15:22:55.296337 6038 GL-MISC 4050 2009-12-03 15:22:55.296337 6039 GL-MISC 4051 2009-12-03 15:22:55.488707 6040 GL-MISC 4052 2009-12-03 15:22:55.488707 6041 GL-MISC 4053 2009-12-03 15:22:55.66131 6042 GL-MISC 4054 2009-12-03 15:22:55.66131 6043 GL-MISC 4055 2009-12-03 15:28:51.146333 6044 AP-VO 4056 2009-12-03 15:28:54.22121 6045 AP-VO 4057 2009-12-03 16:03:10.198553 6046 G/L 4058 2009-12-03 16:03:19.668184 6047 G/L 4059 2009-12-03 16:32:53.955955 6048 GL-MISC 4060 2009-12-03 16:32:53.955955 6049 GL-MISC 4061 2009-12-03 16:32:54.191451 6050 GL-MISC 4062 2009-12-03 16:32:54.191451 6051 GL-MISC 4063 2009-12-03 16:32:54.369614 6052 GL-MISC 4064 2009-12-03 16:32:54.369614 6053 GL-MISC 4065 2009-12-03 16:36:55.516388 6054 AP-VO 4066 2009-12-03 16:38:19.24024 6055 GL-MISC 4067 2009-12-03 16:38:19.24024 6056 GL-MISC 4068 2009-12-03 16:38:19.24024 6057 GL-MISC 4069 2009-12-03 16:38:19.24024 6058 GL-MISC 4070 2009-12-03 16:38:19.24024 6059 GL-MISC 4071 2009-12-03 16:38:32.769241 6060 GL-MISC 4072 2009-12-03 16:38:32.769241 6061 GL-MISC 4073 2009-12-03 16:38:32.769241 6062 GL-MISC 4074 2009-12-03 16:38:32.769241 6063 GL-MISC 4075 2009-12-03 16:38:32.769241 6064 GL-MISC 4076 2009-12-03 16:38:32.769241 6065 GL-MISC 4077 2009-12-03 16:38:32.769241 6066 GL-MISC 4078 2009-12-03 16:38:32.769241 6067 GL-MISC 4079 2009-12-03 16:38:32.769241 6068 GL-MISC 4080 2009-12-03 16:38:32.769241 6069 GL-MISC 4081 2009-12-03 16:38:32.769241 6070 GL-MISC 4082 2009-12-03 16:39:30.18973 6071 GL-MISC 4083 2009-12-03 16:40:59.751498 6072 GL-MISC 4084 2009-12-03 16:40:59.751498 6073 GL-MISC 4085 2009-12-03 16:41:12.589341 6074 GL-MISC 4086 2009-12-03 16:41:12.589341 6075 GL-MISC 4087 2009-12-03 16:42:06.470223 6076 AP-CK 4088 2009-12-03 16:46:39.021809 6077 AP-CK 4089 2009-12-03 16:46:39.021809 6078 AP-MISC 4090 2009-12-03 16:46:39.021809 6079 AP-MISC 4091 2009-12-03 16:46:39.021809 6080 AP-MISC 4092 2009-12-03 16:46:39.021809 6081 AP-MISC 4093 2009-12-03 17:04:49.973715 6082 GL-MISC 4094 2009-12-03 17:05:15.790137 6083 GL-MISC 4095 2009-12-03 17:06:07.215807 6084 AR-IN 4096 2009-12-03 17:07:42.188568 6085 C/R 4097 2009-12-04 13:56:03.986896 6086 GL-MISC 4098 2010-01-05 16:41:19.43222 6087 GL-MISC 4099 2010-01-05 17:02:34.671114 6088 S/O 4100 2010-01-05 17:03:41.19046 6089 GL-MISC 4101 2010-01-05 17:06:14.721859 6090 GL-MISC 4102 2010-01-05 17:07:00.415083 6091 C/R 4103 2010-01-06 14:54:40.269884 6092 GL-MISC 4104 2010-01-06 14:54:40.269884 6093 GL-MISC 4105 2010-01-06 15:01:12.509995 6094 AP-VO 4106 2010-01-06 15:01:33.605897 6095 AP-CK 4107 2010-01-06 15:02:04.06481 6096 AP-CK 4108 2010-01-06 15:02:04.06481 6097 AP-MISC 4109 2010-01-06 15:02:04.06481 6098 AP-MISC 4110 2010-03-10 15:53:13.474857 6099 GL-MISC 4111 2010-03-10 16:37:44.35516 6100 GL-MISC 4112 2010-03-10 16:37:44.35516 6101 GL-MISC 4113 2010-03-10 16:37:44.35516 6102 GL-MISC 4114 2010-03-10 16:37:44.35516 6103 GL-MISC 4115 2010-03-10 16:38:53.748469 6104 AR-IN 4116 2010-03-10 16:40:26.082405 6105 C/R 4117 2010-03-10 16:43:31.223365 6106 AP-VO 4118 2010-03-10 16:44:26.304775 6107 AP-CK 4119 2010-03-10 16:44:50.433817 6108 AP-CK 4120 2010-03-12 15:03:05.591481 6109 GL-MISC 4121 2010-03-12 15:03:05.591481 6110 GL-MISC 4122 2010-03-12 15:03:40.677631 6111 GL-MISC 4123 2010-03-12 15:03:40.677631 6112 GL-MISC 4124 2010-03-12 15:03:40.677631 6113 GL-MISC 4125 2010-03-12 15:03:40.677631 6114 GL-MISC 4126 2010-03-12 15:03:40.677631 6115 GL-MISC 4127 2010-03-12 15:03:51.167111 6116 GL-MISC 4128 2010-03-12 15:03:51.167111 6117 GL-MISC 4129 2010-03-12 15:04:01.080913 6118 GL-MISC 4130 2010-03-12 15:04:01.080913 6119 GL-MISC 4131 2010-03-12 15:04:01.080913 6120 GL-MISC 4132 2010-03-12 15:04:01.080913 6121 GL-MISC 4133 2010-03-12 15:04:01.080913 6122 GL-MISC 4134 2010-03-12 15:04:01.080913 6123 GL-MISC 4135 2010-03-12 15:04:01.080913 6124 GL-MISC 4136 2010-03-12 15:04:01.080913 6125 GL-MISC 4137 2010-03-12 15:04:01.080913 6126 GL-MISC 4138 2010-03-12 15:04:01.080913 6127 GL-MISC 4139 2010-03-12 15:04:01.080913 6128 GL-MISC 4140 2010-03-12 15:04:40.445197 6129 GL-MISC 4141 2010-03-12 15:04:40.445197 6130 GL-MISC 4142 2010-03-12 15:06:00.183042 6131 AP-VO 4143 2010-03-12 15:06:31.03432 6132 AP-CK 4144 2010-03-12 15:08:33.970538 6133 AP-VO 4145 2010-03-12 15:09:14.634622 6134 AP-CK 4146 2010-03-12 15:09:47.012598 6135 AP-CK 4147 2010-03-12 15:09:47.012598 6136 AP-MISC 4148 2010-03-12 15:09:47.012598 6137 AP-MISC 4149 2010-03-12 15:10:17.738066 6138 GL-MISC 4150 2010-03-12 15:10:18.074981 6139 GL-MISC 4151 2010-03-12 15:10:28.651023 6140 GL-MISC 4152 2010-03-12 15:10:28.651023 6141 GL-MISC 4153 2010-03-12 15:10:52.3412 6142 AR-IN 4154 2010-03-12 15:12:43.625553 6143 C/R 4155 2010-03-12 15:16:24.722428 6144 G/L 4156 2010-03-12 15:16:37.619518 6145 G/L 4159 2010-03-12 15:18:05.292854 6148 G/L 4160 2010-03-12 15:18:16.323198 6149 G/L 4161 2010-03-12 15:20:57.908475 6150 AR-IN 4162 2010-03-12 15:21:22.084915 6151 C/R 4163 2010-03-12 15:25:43.591309 6152 GL-MISC 4164 2010-03-12 15:25:43.591309 6153 GL-MISC 4165 2010-03-12 15:26:28.506053 6154 GL-MISC 4166 2010-03-12 15:26:43.433632 6155 GL-MISC 4167 2010-03-12 15:27:05.591351 6156 AR-IN 4168 2010-03-12 15:33:59.235438 6157 GL-MISC 4169 2010-03-12 15:33:59.235438 6158 GL-MISC 4170 2010-03-12 15:36:03.533862 6159 AP-VO 4171 2010-03-12 15:36:25.803742 6160 AP-CK 4172 2010-03-12 15:37:44.606151 6161 AP-CK 4173 2010-03-12 15:37:44.606151 6162 AP-MISC 4174 2010-03-12 15:37:44.606151 6163 AP-MISC 4175 2010-04-02 10:32:32.826485 6164 GL-MISC 4176 2010-04-02 10:32:32.826485 6165 GL-MISC 4177 2010-04-02 10:32:32.826485 6166 GL-MISC 4178 2010-04-02 10:32:32.826485 6167 GL-MISC 4179 2010-04-02 10:33:37.051475 6168 AR-IN 4180 2010-04-02 10:34:51.443459 6169 AP-VO 4181 2010-04-02 10:36:01.583172 6170 AP-CK 4182 2010-04-02 10:36:25.985539 6171 AP-CK 4183 2010-04-02 10:38:21.72804 6172 C/R 4184 2010-05-03 13:25:49.913457 6173 G/L 4185 2010-05-03 13:26:17.456656 6174 G/L 4186 2010-05-03 13:26:43.299174 6175 G/L 4187 2010-05-03 13:28:17.34719 6176 G/L 4188 2010-06-07 10:17:56.128144 6177 GL-MISC 4189 2010-06-07 10:17:56.128144 6178 GL-MISC 4190 2010-06-07 10:17:56.128144 6179 GL-MISC 4191 2010-06-07 10:17:56.128144 6180 GL-MISC 4192 2010-06-07 10:20:19.297686 6181 AR-IN 4193 2010-06-07 10:25:56.335649 6182 AP-VO 4194 2010-06-07 10:26:01.027509 6183 AP-VO 4195 2010-06-07 10:27:18.005831 6184 AP-CK 4196 2010-06-07 10:27:43.239502 6185 AP-CK 4197 2010-06-07 10:45:20.566032 6186 AP-VO 4198 2010-06-07 10:46:00.600344 6187 AP-CK 4199 2010-06-07 11:01:34.008031 6188 AP-CK 4200 2010-06-07 11:01:34.008031 6189 AP-MISC 4201 2010-06-07 11:01:34.008031 6190 AP-MISC 4202 2010-06-07 11:01:34.008031 6191 AP-MISC 4203 2010-06-07 11:01:34.008031 6192 AP-MISC 4208 2010-06-07 11:39:54.351982 6197 GL-MISC 4209 2010-06-07 11:39:54.351982 6198 GL-MISC 4210 2010-06-07 11:39:54.351982 6199 GL-MISC 4211 2010-06-07 11:39:54.351982 6200 GL-MISC 4212 2010-06-07 11:40:07.129579 6201 GL-MISC 4213 2010-06-07 11:41:01.512124 6202 GL-MISC 4214 2010-06-07 11:41:01.512124 6203 GL-MISC 4215 2010-06-07 11:41:01.512124 6204 GL-MISC 4216 2010-06-07 11:41:01.512124 6205 GL-MISC 4217 2010-06-07 11:41:12.347187 6206 GL-MISC 4218 2010-06-07 11:41:12.347187 6207 GL-MISC 4219 2010-06-07 11:41:22.353372 6208 GL-MISC 4220 2010-06-07 11:41:22.353372 6209 GL-MISC 4221 2010-06-07 11:41:22.353372 6210 GL-MISC 4222 2010-06-07 11:41:22.353372 6211 GL-MISC 4223 2010-06-07 11:41:22.353372 6212 GL-MISC 4224 2010-06-07 11:41:25.411251 6213 GL-MISC 4225 2010-06-07 11:41:25.411251 6214 GL-MISC 4226 2010-06-07 11:41:36.21013 6215 GL-MISC 4227 2010-06-07 11:41:36.21013 6216 GL-MISC 4228 2010-06-07 11:41:36.21013 6217 GL-MISC 4229 2010-06-07 11:41:36.21013 6218 GL-MISC 4230 2010-06-07 11:41:36.21013 6219 GL-MISC 4231 2010-06-07 11:41:36.21013 6220 GL-MISC 4232 2010-06-07 11:41:36.21013 6221 GL-MISC 4233 2010-06-07 11:41:36.21013 6222 GL-MISC 4234 2010-06-07 11:41:36.21013 6223 GL-MISC 4235 2010-06-07 11:41:36.21013 6224 GL-MISC 4236 2010-06-07 11:41:36.21013 6225 GL-MISC 4237 2010-06-07 11:41:36.21013 6226 GL-MISC 4238 2010-06-07 11:41:36.21013 6227 GL-MISC 4239 2010-06-07 11:41:49.491523 6228 GL-MISC 4240 2010-06-07 11:41:49.491523 6229 GL-MISC 4241 2010-06-07 11:45:16.11516 6230 GL-MISC 4242 2010-06-07 11:45:16.11516 6231 GL-MISC 4243 2010-06-07 11:45:35.286708 6232 GL-MISC 4244 2010-06-07 11:45:35.286708 6233 GL-MISC 4245 2010-06-07 11:45:35.286708 6234 GL-MISC 4246 2010-06-07 11:45:35.286708 6235 GL-MISC 4247 2010-06-07 11:45:35.286708 6236 GL-MISC 4248 2010-06-07 11:45:35.286708 6237 GL-MISC 4249 2010-06-07 11:45:35.286708 6238 GL-MISC 4250 2010-06-07 11:45:35.286708 6239 GL-MISC 4251 2010-06-07 11:46:06.911475 6240 GL-MISC 4252 2010-06-07 11:46:06.911475 6241 GL-MISC 4253 2010-06-07 11:50:24.848287 6242 AP-VO 4254 2010-06-07 11:51:14.739283 6243 AP-VO 4255 2010-06-07 11:51:49.16467 6244 AP-VO 4256 2010-06-07 12:21:08.762121 6245 GL-MISC 4257 2010-06-07 12:21:08.762121 6246 GL-MISC 4258 2010-06-07 12:21:08.762121 6247 GL-MISC 4259 2010-06-07 12:21:08.762121 6248 GL-MISC 4260 2010-06-07 12:21:08.762121 6249 GL-MISC 4261 2010-06-07 12:21:08.762121 6250 GL-MISC 4262 2010-06-07 12:25:12.371156 6251 GL-MISC 4263 2010-06-07 12:26:42.736332 6252 GL-MISC 4264 2010-06-07 12:28:50.083118 6253 GL-MISC 4265 2010-09-07 16:15:36.062578 6254 C/R 4266 2010-09-07 16:18:18.630866 6255 GL-MISC 4267 2010-09-07 16:18:18.630866 6256 GL-MISC 4268 2010-09-07 16:18:18.630866 6257 GL-MISC 4269 2010-09-07 16:18:18.630866 6258 GL-MISC 4270 2010-09-07 16:22:49.780253 6259 AP-CK 4271 2010-09-07 16:22:49.780253 6260 AP-CK 4272 2010-09-07 16:22:49.780253 6261 AP-CK 4273 2010-09-07 16:24:13.762337 6262 AP-CK 4274 2010-09-07 16:40:33.100966 6263 GL-MISC 4275 2010-09-07 16:40:42.851418 6264 GL-MISC 4276 2010-09-07 16:41:51.385685 6265 GL-MISC 4277 2010-09-07 16:41:51.385685 6266 GL-MISC 4278 2010-09-07 16:41:51.385685 6267 GL-MISC 4279 2010-09-07 16:41:51.385685 6268 GL-MISC 4280 2010-09-07 16:42:11.568275 6269 GL-MISC 4281 2010-09-07 16:42:11.568275 6270 GL-MISC 4282 2010-09-07 16:42:11.568275 6271 GL-MISC 4283 2010-09-07 16:42:11.568275 6272 GL-MISC 4284 2010-09-07 16:43:14.887785 6273 AR-IN 4285 2010-09-07 16:43:33.897242 6274 AR-IN 4286 2010-09-07 16:43:46.683757 6275 AR-IN 4287 2010-09-07 16:46:21.229877 6276 C/R 4288 2010-09-07 16:46:21.229877 6277 AR-MISC 4289 2010-09-07 16:47:32.014347 6278 C/R 4290 2010-09-07 16:47:32.014347 6279 AR-MISC 4291 2010-09-07 16:49:48.199237 6280 AP-VO 4292 2010-09-07 16:49:58.465987 6281 AP-VO 4293 2010-09-07 16:50:39.387811 6282 AP-CK 4294 2010-09-07 16:51:04.601423 6283 AP-CK 4295 2010-09-08 13:15:43.960054 6284 GL-MISC 4296 2010-09-08 13:15:43.960054 6285 GL-MISC 4297 2010-09-08 13:16:48.523325 6286 GL-MISC 4298 2010-09-08 13:16:55.708375 6287 GL-MISC 4299 2010-09-08 13:17:17.760528 6288 GL-MISC 4300 2010-09-08 13:17:40.249487 6289 GL-MISC 4301 2010-09-08 13:17:57.20414 6290 GL-MISC 4302 2010-09-08 13:18:09.997473 6291 GL-MISC 4303 2010-09-08 13:22:22.013169 6292 AR-IN 4304 2010-09-08 13:23:22.509549 6293 C/R 4305 2010-09-08 13:25:31.208268 6294 AP-VO 4306 2010-09-08 13:26:03.692576 6295 AP-CK 4307 2010-09-08 13:26:50.541575 6296 AP-CK 4308 2010-09-08 13:27:27.759862 6297 AP-CK 4309 2010-09-08 13:38:38.870768 6298 GL-MISC 4310 2010-09-08 13:38:38.870768 6299 GL-MISC 4311 2010-09-08 13:38:38.870768 6300 GL-MISC 4312 2010-09-08 13:38:38.870768 6301 GL-MISC 4313 2010-09-08 13:38:38.870768 6302 GL-MISC 4314 2010-09-08 13:38:38.870768 6303 GL-MISC 4315 2010-09-08 13:39:51.981955 6304 AP-VO 4316 2010-09-08 13:40:02.761085 6305 AP-CK 4317 2010-09-08 13:40:20.763711 6306 AP-CK 4318 2010-09-08 13:40:20.763711 6307 AP-MISC 4319 2010-09-08 13:40:20.763711 6308 AP-MISC 4320 2010-09-08 13:42:04.133297 6309 GL-MISC 4321 2010-09-08 13:42:04.133297 6310 GL-MISC 4322 2010-09-08 13:42:04.133297 6311 GL-MISC 4323 2010-09-08 13:42:04.133297 6312 GL-MISC 4324 2010-09-08 13:42:04.133297 6313 GL-MISC 4325 2010-09-08 13:42:12.788162 6314 GL-MISC 4326 2010-09-08 13:42:12.788162 6315 GL-MISC 4327 2010-09-08 13:42:25.477028 6316 GL-MISC 4328 2010-09-08 13:42:25.477028 6317 GL-MISC 4329 2010-09-08 13:42:25.477028 6318 GL-MISC 4330 2010-09-08 13:42:25.477028 6319 GL-MISC 4331 2010-09-08 13:42:25.477028 6320 GL-MISC 4332 2010-09-08 13:42:25.477028 6321 GL-MISC 4333 2010-09-08 13:42:25.477028 6322 GL-MISC 4334 2010-09-08 13:42:25.477028 6323 GL-MISC 4335 2010-09-08 13:42:25.477028 6324 GL-MISC 4336 2010-09-08 13:42:25.477028 6325 GL-MISC 4337 2010-09-08 13:42:25.477028 6326 GL-MISC 4338 2010-09-08 13:42:49.511842 6327 GL-MISC 4339 2010-09-08 13:42:49.511842 6328 GL-MISC 4340 2010-09-08 13:43:15.446926 6329 GL-MISC 4341 2010-09-08 13:43:20.490416 6330 GL-MISC 4342 2010-09-08 13:43:45.676374 6331 AR-IN 4343 2010-09-08 13:45:19.987299 6332 C/R 4344 2010-09-13 11:40:31.75183 6333 GL-MISC 4345 2010-09-13 11:41:43.996923 6334 AP-VO 4346 2010-09-13 11:44:48.221074 6335 AP-CK 4347 2010-09-13 11:45:18.636025 6336 AP-CK 4348 2010-09-13 11:45:18.636025 6337 AP-MISC 4349 2010-09-13 11:45:18.636025 6338 AP-MISC 4350 2010-09-13 11:47:00.153359 6339 GL-MISC 4351 2010-09-13 11:47:00.153359 6340 GL-MISC 4352 2010-09-13 11:47:00.153359 6341 GL-MISC 4353 2010-09-13 11:47:00.153359 6342 GL-MISC 4354 2010-09-13 11:47:17.36558 6343 GL-MISC 4355 2010-09-13 11:47:17.36558 6344 GL-MISC 4356 2010-09-13 11:47:49.99169 6345 GL-MISC 4357 2010-09-13 11:47:49.99169 6346 GL-MISC 4358 2010-09-13 11:47:49.99169 6347 GL-MISC 4359 2010-09-13 11:47:49.99169 6348 GL-MISC 4360 2010-09-13 11:47:49.99169 6349 GL-MISC 4361 2010-09-13 11:47:49.99169 6350 GL-MISC 4362 2010-09-13 11:47:49.99169 6351 GL-MISC 4363 2010-09-13 11:47:49.99169 6352 GL-MISC 4364 2010-09-13 11:47:49.99169 6353 GL-MISC 4365 2010-09-13 11:47:49.99169 6354 GL-MISC 4366 2010-09-13 11:47:49.99169 6355 GL-MISC 4367 2010-09-13 11:47:49.99169 6356 GL-MISC 4368 2010-09-13 11:47:49.99169 6357 GL-MISC 4369 2010-09-13 11:48:14.890274 6358 GL-MISC 4370 2010-09-13 11:48:14.890274 6359 GL-MISC 4371 2010-11-04 15:40:15.229746 6360 AP-VO 4372 2010-11-04 15:43:23.428823 6361 G/L 4373 2010-11-04 15:43:37.112261 6362 G/L 4374 2010-11-04 15:43:48.418032 6363 G/L 4375 2010-11-04 15:46:09.303015 6364 GL-MISC 4376 2010-11-04 15:46:09.303015 6365 GL-MISC 4377 2010-11-04 15:46:09.303015 6366 GL-MISC 4378 2010-11-04 15:46:09.303015 6367 GL-MISC 4379 2010-11-04 15:53:28.640849 6368 GL-MISC 4380 2010-11-04 15:53:28.640849 6369 GL-MISC 4381 2010-11-04 15:54:23.678882 6370 AP-VO 4382 2010-11-04 15:55:21.63806 6371 AP-VO 4383 2010-11-04 15:56:24.265361 6372 AP-CK 4384 2010-11-04 15:57:11.246998 6373 AP-CK 4385 2010-11-04 15:57:27.718703 6374 AP-CK 4386 2010-11-04 15:57:52.842785 6375 AP-CK 4387 2010-11-04 15:57:52.842785 6376 AP-MISC 4388 2010-11-04 15:57:52.842785 6377 AP-MISC 4389 2010-11-04 15:58:26.865018 6378 GL-MISC 4390 2010-11-04 15:58:26.865018 6379 GL-MISC 4391 2010-11-04 15:58:26.865018 6380 GL-MISC 4392 2010-11-04 15:58:26.865018 6381 GL-MISC 4393 2010-11-04 15:58:26.865018 6382 GL-MISC 4394 2010-11-04 15:58:33.370756 6383 GL-MISC 4395 2010-11-04 15:58:33.370756 6384 GL-MISC 4396 2010-11-04 15:58:40.633268 6385 GL-MISC 4397 2010-11-04 15:58:40.633268 6386 GL-MISC 4398 2010-11-04 15:58:40.633268 6387 GL-MISC 4399 2010-11-04 15:58:40.633268 6388 GL-MISC 4400 2010-11-04 15:58:40.633268 6389 GL-MISC 4401 2010-11-04 15:58:40.633268 6390 GL-MISC 4402 2010-11-04 15:58:40.633268 6391 GL-MISC 4403 2010-11-04 15:58:40.633268 6392 GL-MISC 4404 2010-11-04 15:58:40.633268 6393 GL-MISC 4405 2010-11-04 15:58:40.633268 6394 GL-MISC 4406 2010-11-04 15:58:40.633268 6395 GL-MISC 4407 2010-11-04 16:20:02.429652 6396 GL-MISC 4408 2010-11-04 16:20:02.429652 6397 GL-MISC 4409 2010-11-04 16:22:27.467294 6398 GL-MISC 4410 2010-11-04 16:25:21.096253 6399 GL-MISC 4411 2010-11-04 16:26:33.020254 6400 AR-IN 4412 2010-11-04 16:40:50.153752 6401 AR-IN 4413 2010-11-04 16:42:44.344781 6402 C/R 4414 2010-11-04 16:49:28.278933 6403 C/R 4415 2010-11-12 16:18:15.96226 6404 AR-IN 4416 2010-12-30 16:16:48.482665 6405 C/R 4417 2010-12-30 16:17:43.470439 6406 C/R 4418 2010-12-30 16:23:41.482763 6407 AR-IN 4419 2010-12-30 16:26:20.151456 6408 GL-MISC 4420 2010-12-30 16:26:20.151456 6409 GL-MISC 4421 2010-12-30 16:26:20.151456 6410 GL-MISC 4422 2010-12-30 16:26:20.151456 6411 GL-MISC 4423 2010-12-30 16:28:05.866734 6412 AR-IN 4424 2010-12-30 16:28:26.666085 6413 AR-IN 4425 2010-12-30 16:31:23.52315 6414 AP-VO 4426 2010-12-30 16:41:28.026245 6415 AP-VO 4427 2010-12-30 16:42:20.683595 6416 AR-IN 4428 2011-03-07 15:10:05.571549 6417 AR-MISC 4429 2011-03-07 15:10:57.799551 6418 AR-MISC 4430 2011-03-07 15:21:13.169237 6419 AR-IN 4431 2011-03-07 15:22:39.862524 6420 AR-IN 4432 2011-03-07 15:24:33.671441 6421 C/R 4433 2011-03-07 15:27:57.479016 6422 C/R 4436 2011-03-07 15:31:59.358339 6425 GL-MISC 4437 2011-03-07 15:31:59.358339 6426 GL-MISC 4438 2011-03-07 15:31:59.358339 6427 GL-MISC 4439 2011-03-07 15:31:59.358339 6428 GL-MISC 4440 2011-03-07 15:36:01.169181 6429 AR-IN 4441 2011-03-07 15:38:01.421892 6430 C/R 4442 2011-03-07 15:49:20.500433 6431 AP-VO 4443 2011-03-07 15:49:25.181528 6432 AP-VO 4444 2011-03-07 15:52:19.633529 6433 AP-CK 4445 2011-03-07 15:52:19.633529 6434 AP-CK 4446 2011-03-07 15:52:19.633529 6435 AP-CK 4447 2011-03-07 15:53:04.36273 6436 AP-CK 4448 2011-04-18 07:19:25.721838 6437 AR-MISC 4449 2011-04-18 07:20:22.179731 6438 C/R 4450 2011-04-18 07:21:22.808598 6439 C/R 4451 2011-04-18 07:44:56.364535 6440 GL-MISC 4452 2011-04-18 07:44:56.364535 6441 GL-MISC 4453 2011-04-18 07:44:56.364535 6442 GL-MISC 4454 2011-04-18 07:44:56.364535 6443 GL-MISC 4459 2011-04-18 07:56:05.973694 6448 GL-MISC 4460 2011-04-18 07:57:06.867873 6449 GL-MISC 4461 2011-04-18 07:57:06.867873 6450 GL-MISC 4462 2011-04-18 07:57:06.867873 6451 GL-MISC 4463 2011-04-18 07:57:06.867873 6452 GL-MISC 4464 2011-04-18 07:57:20.790729 6453 GL-MISC 4465 2011-04-18 07:57:20.790729 6454 GL-MISC 4466 2011-04-18 07:57:33.949275 6455 GL-MISC 4467 2011-04-18 07:57:33.949275 6456 GL-MISC 4468 2011-04-18 07:57:33.949275 6457 GL-MISC 4469 2011-04-18 07:57:33.949275 6458 GL-MISC 4470 2011-04-18 07:57:33.949275 6459 GL-MISC 4471 2011-04-18 07:57:33.949275 6460 GL-MISC 4472 2011-04-18 07:57:33.949275 6461 GL-MISC 4473 2011-04-18 07:57:33.949275 6462 GL-MISC 4474 2011-04-18 07:57:33.949275 6463 GL-MISC 4475 2011-04-18 07:57:33.949275 6464 GL-MISC 4476 2011-04-18 07:57:33.949275 6465 GL-MISC 4477 2011-04-18 07:57:33.949275 6466 GL-MISC 4478 2011-04-18 07:57:33.949275 6467 GL-MISC 4479 2011-04-18 07:59:26.856376 6468 GL-MISC 4480 2011-04-18 07:59:26.856376 6469 GL-MISC 4481 2011-04-18 07:59:26.856376 6470 GL-MISC 4482 2011-04-18 07:59:26.856376 6471 GL-MISC 4483 2011-04-18 07:59:37.156541 6472 GL-MISC 4484 2011-04-18 07:59:37.156541 6473 GL-MISC 4485 2011-04-18 07:59:44.951178 6474 GL-MISC 4486 2011-04-18 07:59:44.951178 6475 GL-MISC 4487 2011-04-18 08:24:17.311443 6476 GL-MISC 4488 2011-04-18 08:24:17.311443 6477 GL-MISC 4489 2011-04-18 08:24:17.311443 6478 GL-MISC 4490 2011-04-18 08:24:17.311443 6479 GL-MISC 4491 2011-04-18 08:25:45.170942 6480 GL-MISC 4492 2011-04-18 08:26:08.828905 6481 GL-MISC 4493 2011-04-18 08:27:59.156121 6482 AR-IN 4494 2011-04-18 08:28:02.746731 6483 AR-IN 4495 2011-04-18 08:29:37.263089 6484 C/R 4496 2011-04-18 08:30:45.693977 6485 C/R 4497 2011-04-18 08:34:27.716778 6486 AP-VO 4498 2011-04-18 08:34:32.200855 6487 AP-VO 4499 2011-04-18 08:35:54.767363 6488 AP-CK 4500 2011-04-18 08:35:54.767363 6489 AP-MISC 4501 2011-04-18 08:35:54.767363 6490 AP-MISC 4502 2011-04-18 08:37:37.768782 6491 AP-VO 4503 2011-04-18 08:38:14.806877 6492 AP-CK 4504 2011-04-18 13:27:15.266208 6493 GL-MISC 4505 2011-04-18 13:27:58.535952 6494 AP-VO 4506 2011-04-18 13:28:49.724898 6495 AP-CK 4507 2011-04-18 13:28:49.724898 6496 AP-MISC 4508 2011-04-18 13:28:49.724898 6497 AP-MISC 4509 2011-04-18 13:29:34.810123 6498 GL-MISC 4510 2011-04-18 13:29:34.810123 6499 GL-MISC 4511 2011-04-18 13:29:34.810123 6500 GL-MISC 4512 2011-04-18 13:29:48.048132 6501 GL-MISC 4513 2011-04-18 13:29:48.048132 6502 GL-MISC 4514 2011-04-18 13:29:48.048132 6503 GL-MISC 4515 2011-04-18 13:29:48.048132 6504 GL-MISC 4516 2011-04-18 13:29:48.048132 6505 GL-MISC 4517 2011-04-18 13:29:48.048132 6506 GL-MISC 4518 2011-04-18 13:29:48.048132 6507 GL-MISC 4519 2011-04-18 13:30:01.943607 6508 GL-MISC 4520 2011-04-18 13:30:01.943607 6509 GL-MISC 4521 2011-04-18 13:30:01.943607 6510 GL-MISC 4522 2011-04-18 13:30:12.956417 6511 GL-MISC 4523 2011-04-18 13:30:12.956417 6512 GL-MISC 4524 2011-04-18 13:35:20.290995 6513 GL-MISC 4525 2011-04-18 13:40:24.574901 6514 G/L 4526 2011-04-18 13:54:47.67733 6515 GL-MISC 4527 2011-04-18 13:54:54.12386 6516 GL-MISC 4528 2011-04-18 13:56:29.699 6517 AR-IN 4529 2011-04-18 14:05:31.997375 6518 AP-VO 4530 2011-06-03 16:14:35.243541 6519 GL-MISC 4531 2011-06-03 16:14:35.243541 6520 GL-MISC 4532 2011-06-03 16:14:35.243541 6521 GL-MISC 4533 2011-06-03 16:14:35.243541 6522 GL-MISC 4534 2011-06-03 16:16:18.61318 6523 AP-VO 4535 2011-06-03 16:20:24.02733 6524 AP-CK 4536 2011-06-03 16:22:28.645153 6525 AR-IN 4537 2011-06-03 16:23:47.068677 6526 C/R 4538 2011-06-03 16:26:54.335808 6527 GL-MISC 4539 2011-06-03 16:26:54.335808 6528 GL-MISC 4540 2011-06-03 16:26:54.335808 6529 GL-MISC 4541 2011-06-03 16:26:54.335808 6530 GL-MISC 4542 2011-06-03 16:28:42.031003 6531 GL-MISC 4543 2011-06-03 16:30:08.321477 6532 GL-MISC 4544 2011-06-03 16:30:08.321477 6533 GL-MISC 4545 2011-06-03 16:30:08.321477 6534 GL-MISC 4546 2011-06-03 16:30:08.321477 6535 GL-MISC 4547 2011-06-03 16:33:40.603734 6536 AR-IN 4548 2011-06-03 16:36:34.56468 6537 GL-MISC 4549 2011-06-03 16:36:34.56468 6538 GL-MISC 4550 2011-06-03 16:36:34.56468 6539 GL-MISC 4551 2011-06-03 16:36:34.56468 6540 GL-MISC 4552 2011-06-03 16:39:00.986828 6541 AP-VO 4553 2011-06-03 16:40:30.505931 6542 AP-VO 4554 2011-06-03 16:41:10.132256 6543 AP-MISC 4555 2011-06-03 16:43:05.163233 6544 AP-CK 4556 2011-06-03 16:43:41.733564 6545 AP-CK 4557 2011-06-03 16:47:04.367165 6546 AR-IN 4558 2011-06-03 16:49:15.208794 6547 C/R 4559 2011-06-03 16:50:57.019944 6548 C/R 4560 2011-06-03 16:53:11.213952 6549 GL-MISC 4561 2011-06-03 16:55:14.612479 6550 GL-MISC 4562 2011-06-03 16:55:14.612479 6551 GL-MISC 4563 2011-06-03 16:55:14.612479 6552 GL-MISC 4564 2011-06-03 16:55:14.612479 6553 GL-MISC 4565 2011-06-03 16:55:14.612479 6554 GL-MISC 4566 2011-06-03 16:55:14.612479 6555 GL-MISC 4567 2011-06-03 16:55:14.612479 6556 GL-MISC 4568 2011-06-03 16:55:14.612479 6557 GL-MISC 4569 2011-06-03 16:55:32.604097 6558 GL-MISC 4570 2011-06-03 16:55:32.604097 6559 GL-MISC 4571 2011-06-15 11:18:41.853161 6560 GL-MISC 4572 2011-06-15 11:18:41.853161 6561 GL-MISC 4573 2011-06-15 11:18:41.853161 6562 GL-MISC 4574 2011-06-15 11:18:41.853161 6563 GL-MISC 4575 2011-06-15 11:18:41.853161 6564 GL-MISC 4576 2011-06-15 11:18:41.853161 6565 GL-MISC 4577 2011-06-15 11:18:41.853161 6566 GL-MISC 4578 2011-06-15 11:18:41.853161 6567 GL-MISC 4579 2011-06-15 11:18:41.853161 6568 GL-MISC 4580 2011-06-15 11:18:41.853161 6569 GL-MISC 4581 2011-06-15 11:18:41.853161 6570 GL-MISC 4582 2011-06-15 11:18:41.853161 6571 GL-MISC 4583 2011-06-15 11:18:41.853161 6572 GL-MISC 4584 2011-06-15 11:18:41.853161 6573 GL-MISC 4585 2011-06-15 11:18:41.853161 6574 GL-MISC 4586 2011-06-15 11:18:41.853161 6575 GL-MISC 4587 2011-06-15 11:18:41.853161 6576 GL-MISC 4588 2011-06-15 11:18:41.853161 6577 GL-MISC 4589 2011-06-15 11:18:41.853161 6578 GL-MISC 4590 2011-06-15 11:18:41.853161 6579 GL-MISC 4591 2011-06-15 11:18:41.853161 6580 GL-MISC 4592 2011-06-15 11:18:41.853161 6581 GL-MISC 4593 2011-06-15 11:18:41.853161 6582 GL-MISC 4594 2011-06-15 11:18:41.853161 6583 GL-MISC 4595 2011-06-15 11:18:41.853161 6584 GL-MISC 4596 2011-06-15 11:18:41.853161 6585 GL-MISC 4597 2011-06-15 11:18:41.853161 6586 GL-MISC 4598 2011-06-15 11:18:41.853161 6587 GL-MISC 4599 2011-06-15 11:18:41.853161 6588 GL-MISC 4600 2011-06-15 11:18:41.853161 6589 GL-MISC 4601 2011-06-15 11:18:41.853161 6590 GL-MISC 4602 2011-06-15 11:18:41.853161 6591 GL-MISC 4603 2011-06-15 11:18:41.853161 6592 GL-MISC 4604 2011-06-15 11:18:41.853161 6593 GL-MISC 4605 2011-06-15 11:18:41.853161 6594 GL-MISC 4606 2011-06-15 11:18:41.853161 6595 GL-MISC 4607 2011-06-15 11:18:41.853161 6596 GL-MISC 4608 2011-06-15 11:18:41.853161 6597 GL-MISC 4609 2011-06-15 11:18:41.853161 6598 GL-MISC 4610 2011-06-15 11:18:41.853161 6599 GL-MISC 4611 2011-06-15 11:18:41.853161 6600 GL-MISC 4612 2011-06-15 11:18:41.853161 6601 GL-MISC 4613 2011-06-15 11:18:41.853161 6602 GL-MISC 4614 2011-06-15 11:18:41.853161 6603 GL-MISC 4615 2011-06-15 11:18:41.853161 6604 GL-MISC 4616 2011-06-15 11:18:41.853161 6605 GL-MISC 4617 2011-06-15 11:18:41.853161 6606 GL-MISC 4618 2011-06-15 11:18:41.853161 6607 GL-MISC 4619 2011-06-15 11:18:41.853161 6608 GL-MISC 4620 2011-06-15 11:18:41.853161 6609 GL-MISC 4621 2011-06-15 11:18:41.853161 6610 GL-MISC 4622 2011-06-15 11:18:41.853161 6611 GL-MISC 4623 2011-06-15 11:18:41.853161 6612 GL-MISC 4624 2011-06-15 11:18:41.853161 6613 GL-MISC 4625 2011-06-15 11:18:41.853161 6614 GL-MISC 4626 2011-06-15 11:18:41.853161 6615 GL-MISC 4627 2011-06-15 11:18:41.853161 6616 GL-MISC 4628 2011-06-15 11:18:41.853161 6617 GL-MISC 4629 2011-06-15 11:18:41.853161 6618 GL-MISC 4630 2011-06-15 11:18:41.853161 6619 GL-MISC 4631 2011-06-15 11:18:41.853161 6620 GL-MISC 4632 2011-06-15 11:18:41.853161 6621 GL-MISC 4633 2011-06-15 11:18:41.853161 6622 GL-MISC 4634 2011-06-15 11:18:41.853161 6623 GL-MISC 4635 2011-06-15 11:18:41.853161 6624 GL-MISC 4636 2011-06-15 11:18:41.853161 6625 GL-MISC 4637 2011-06-15 11:18:41.853161 6626 GL-MISC 4638 2011-06-15 11:18:41.853161 6627 GL-MISC 4639 2011-06-15 11:18:41.853161 6628 GL-MISC 4640 2011-06-15 11:18:41.853161 6629 GL-MISC 4641 2011-06-15 11:18:41.853161 6630 GL-MISC 4642 2011-06-15 11:18:41.853161 6631 GL-MISC 4643 2011-06-15 11:18:41.853161 6632 GL-MISC 4644 2011-06-15 11:18:41.853161 6633 GL-MISC 4645 2011-06-15 11:18:41.853161 6634 GL-MISC 4646 2011-06-15 11:18:41.853161 6635 GL-MISC 4647 2011-06-15 11:18:41.853161 6636 GL-MISC 4648 2011-06-15 11:18:41.853161 6637 GL-MISC 4649 2011-06-15 11:18:41.853161 6638 GL-MISC 4650 2011-06-15 11:18:41.853161 6639 GL-MISC 4651 2011-06-15 11:18:41.853161 6640 GL-MISC 4652 2011-06-15 11:18:41.853161 6641 GL-MISC 4653 2011-06-15 11:18:41.853161 6642 GL-MISC 4654 2011-06-15 11:18:41.853161 6643 GL-MISC 4655 2011-06-15 11:18:41.853161 6644 GL-MISC 4656 2011-06-15 11:18:41.853161 6645 GL-MISC 4657 2011-06-15 11:18:41.853161 6646 GL-MISC 4658 2011-06-15 11:18:41.853161 6647 GL-MISC 4659 2011-06-15 11:18:41.853161 6648 GL-MISC 4660 2011-06-15 11:18:41.853161 6649 GL-MISC 4661 2011-06-15 11:18:41.853161 6650 GL-MISC 4662 2011-06-15 11:18:41.853161 6651 GL-MISC 4663 2011-06-15 11:18:41.853161 6652 GL-MISC 4664 2011-06-15 11:18:41.853161 6653 GL-MISC 4665 2011-06-15 11:18:41.853161 6654 GL-MISC 4666 2011-06-15 11:18:41.853161 6655 GL-MISC 4667 2011-06-15 11:18:41.853161 6656 GL-MISC 4668 2011-06-15 11:18:41.853161 6657 GL-MISC 4669 2011-06-15 11:18:41.853161 6658 GL-MISC 4670 2011-06-15 11:18:41.853161 6659 GL-MISC 4671 2011-06-15 11:18:41.853161 6660 GL-MISC 4672 2011-06-15 11:18:41.853161 6661 GL-MISC 4673 2011-06-15 11:18:41.853161 6662 GL-MISC 4674 2011-06-15 11:18:41.853161 6663 GL-MISC 4675 2011-06-15 11:18:41.853161 6664 GL-MISC 4676 2011-06-15 11:18:41.853161 6665 GL-MISC 4677 2011-06-15 11:18:41.853161 6666 GL-MISC 4678 2011-06-15 11:18:41.853161 6667 GL-MISC 4679 2011-06-15 11:18:41.853161 6668 GL-MISC 4680 2011-06-15 11:18:41.853161 6669 GL-MISC 4681 2011-06-15 11:18:41.853161 6670 GL-MISC 4682 2011-06-15 11:18:41.853161 6671 GL-MISC 4683 2011-06-15 11:18:41.853161 6672 GL-MISC 4684 2011-06-15 11:18:41.853161 6673 GL-MISC 4685 2011-06-15 11:18:41.853161 6674 GL-MISC 4686 2011-06-15 11:18:41.853161 6675 GL-MISC 4687 2011-06-15 11:18:41.853161 6676 GL-MISC 4688 2011-06-15 11:18:41.853161 6677 GL-MISC 4689 2011-06-15 11:18:41.853161 6678 GL-MISC 4690 2011-06-15 11:18:41.853161 6679 GL-MISC 4691 2011-06-15 11:18:41.853161 6680 GL-MISC 4692 2011-06-15 11:18:41.853161 6681 GL-MISC 4693 2011-06-15 11:18:41.853161 6682 GL-MISC 4694 2011-06-15 11:18:41.853161 6683 GL-MISC 4695 2011-06-15 11:18:41.853161 6684 GL-MISC 4696 2011-06-15 11:18:41.853161 6685 GL-MISC 4697 2011-06-15 11:18:41.853161 6686 GL-MISC 4698 2011-06-15 11:18:41.853161 6687 GL-MISC 4699 2011-06-15 11:18:41.853161 6688 GL-MISC 4700 2011-06-15 11:18:41.853161 6689 GL-MISC 4701 2011-06-15 11:18:41.853161 6690 GL-MISC 4702 2011-06-15 11:18:41.853161 6691 GL-MISC 4703 2011-06-15 11:18:41.853161 6692 GL-MISC 4704 2011-06-15 11:18:41.853161 6693 GL-MISC 4705 2011-06-15 11:18:41.853161 6694 GL-MISC 4706 2011-06-15 11:18:41.853161 6695 GL-MISC 4707 2011-06-15 11:18:41.853161 6696 GL-MISC 4708 2011-06-15 11:18:41.853161 6697 GL-MISC 4709 2011-06-15 11:18:41.853161 6698 GL-MISC 4710 2011-06-15 11:18:41.853161 6699 GL-MISC 4711 2011-06-15 11:18:41.853161 6700 GL-MISC 4712 2011-06-15 11:18:41.853161 6701 GL-MISC 4713 2011-06-15 11:18:41.853161 6702 GL-MISC 4714 2011-06-15 11:18:41.853161 6703 GL-MISC 4715 2011-06-15 11:18:41.853161 6704 GL-MISC 4716 2011-06-15 11:18:41.853161 6705 GL-MISC 4717 2011-06-15 11:18:41.853161 6706 GL-MISC 4718 2011-06-15 11:18:41.853161 6707 GL-MISC 4719 2011-06-15 11:18:41.853161 6708 GL-MISC 4720 2011-06-15 11:18:41.853161 6709 GL-MISC 4721 2011-06-15 11:18:41.853161 6710 GL-MISC 4722 2011-06-15 11:18:41.853161 6711 GL-MISC 4723 2011-06-15 11:18:41.853161 6712 GL-MISC 4724 2011-06-15 11:18:41.853161 6713 GL-MISC 4725 2011-06-15 11:18:41.853161 6714 GL-MISC 4726 2011-06-15 11:18:41.853161 6715 GL-MISC 4727 2011-06-15 11:18:41.853161 6716 GL-MISC 4728 2011-06-15 11:18:41.853161 6717 GL-MISC 4729 2011-06-15 11:18:41.853161 6718 GL-MISC 4730 2011-06-15 11:18:41.853161 6719 GL-MISC 4731 2011-06-15 11:18:41.853161 6720 GL-MISC 4732 2011-06-15 11:18:41.853161 6721 GL-MISC 4733 2011-06-15 11:18:41.853161 6722 GL-MISC 4734 2011-06-15 11:18:41.853161 6723 GL-MISC 4735 2011-06-15 11:18:41.853161 6724 GL-MISC 4736 2011-06-15 11:18:41.853161 6725 GL-MISC 4737 2011-06-15 11:18:41.853161 6726 GL-MISC 4738 2011-06-15 11:18:41.853161 6727 GL-MISC 4739 2011-06-15 11:18:41.853161 6728 GL-MISC 4740 2011-06-15 11:18:41.853161 6729 GL-MISC 4741 2011-06-15 11:18:41.853161 6730 GL-MISC 4742 2011-06-15 11:18:41.853161 6731 GL-MISC 4743 2011-06-15 11:18:41.853161 6732 GL-MISC 4744 2011-06-15 11:18:41.853161 6733 GL-MISC 4745 2011-06-15 11:18:41.853161 6734 GL-MISC 4746 2011-06-15 11:18:41.853161 6735 GL-MISC 4747 2011-06-15 11:18:41.853161 6736 GL-MISC 4748 2011-06-15 11:18:41.853161 6737 GL-MISC 4749 2011-06-15 11:18:41.853161 6738 GL-MISC 4750 2011-06-15 11:18:41.853161 6739 GL-MISC 4751 2011-06-15 11:18:41.853161 6740 GL-MISC 4752 2011-06-15 11:18:41.853161 6741 GL-MISC 4753 2011-06-15 11:18:41.853161 6742 GL-MISC 4754 2011-06-15 11:18:41.853161 6743 GL-MISC 4755 2011-06-15 11:18:41.853161 6744 GL-MISC 4756 2011-06-15 11:18:41.853161 6745 GL-MISC 4757 2011-06-15 11:18:41.853161 6746 GL-MISC 4758 2011-06-15 11:18:41.853161 6747 GL-MISC 4759 2011-06-15 11:18:41.853161 6748 GL-MISC 4760 2011-06-15 11:18:41.853161 6749 GL-MISC 4761 2011-06-15 11:18:41.853161 6750 GL-MISC 4762 2011-06-15 11:18:41.853161 6751 GL-MISC 4763 2011-06-15 11:18:41.853161 6752 GL-MISC 4764 2011-06-15 11:18:41.853161 6753 GL-MISC 4765 2011-06-15 11:18:41.853161 6754 GL-MISC 4766 2011-06-15 11:18:41.853161 6755 GL-MISC 4767 2011-06-15 11:18:41.853161 6756 GL-MISC 4768 2011-06-15 11:18:41.853161 6757 GL-MISC 4769 2011-06-15 11:18:41.853161 6758 GL-MISC 4770 2011-06-15 11:18:41.853161 6759 GL-MISC 4771 2011-06-15 11:18:41.853161 6760 GL-MISC 4772 2011-06-15 11:18:41.853161 6761 GL-MISC 4773 2011-06-15 11:18:41.853161 6762 GL-MISC 4774 2011-06-15 11:18:41.853161 6763 GL-MISC 4775 2011-06-15 11:18:41.853161 6764 GL-MISC 4776 2011-06-15 11:18:41.853161 6765 GL-MISC 4777 2011-06-15 11:18:41.853161 6766 GL-MISC 4778 2011-06-15 11:18:41.853161 6767 GL-MISC 4779 2011-06-15 11:18:41.853161 6768 GL-MISC 4780 2011-06-15 11:18:41.853161 6769 GL-MISC 4781 2011-06-15 11:18:41.853161 6770 GL-MISC 4782 2011-06-15 11:18:41.853161 6771 GL-MISC 4783 2011-06-15 11:18:41.853161 6772 GL-MISC 4784 2011-06-15 11:18:41.853161 6773 GL-MISC 4785 2011-06-15 11:18:41.853161 6774 GL-MISC 4786 2011-06-15 11:18:41.853161 6775 GL-MISC 4787 2011-06-15 11:18:41.853161 6776 GL-MISC 4788 2011-06-15 11:18:41.853161 6777 GL-MISC 4789 2011-06-15 11:18:41.853161 6778 GL-MISC 4790 2011-06-15 11:18:41.853161 6779 GL-MISC 4791 2011-06-15 11:18:41.853161 6780 GL-MISC 4792 2011-06-15 11:18:41.853161 6781 GL-MISC 4793 2011-06-15 11:18:41.853161 6782 GL-MISC 4794 2011-06-15 11:18:41.853161 6783 GL-MISC 4795 2011-06-15 11:18:41.853161 6784 GL-MISC 4796 2011-06-15 11:18:41.853161 6785 GL-MISC 4797 2011-06-15 11:18:41.853161 6786 GL-MISC 4798 2011-06-15 11:18:41.853161 6787 GL-MISC 4799 2011-06-15 11:18:41.853161 6788 GL-MISC 4800 2011-06-15 11:18:41.853161 6789 GL-MISC 4801 2011-06-15 11:18:41.853161 6790 GL-MISC 4802 2011-06-15 11:18:41.853161 6791 GL-MISC 4803 2011-06-15 11:18:41.853161 6792 GL-MISC 4804 2011-06-15 11:18:41.853161 6793 GL-MISC 4805 2011-06-15 11:18:41.853161 6794 GL-MISC 4806 2011-06-15 11:18:41.853161 6795 GL-MISC 4807 2011-06-15 11:18:41.853161 6796 GL-MISC 4808 2011-06-15 11:18:41.853161 6797 GL-MISC 4809 2011-06-15 11:18:41.853161 6798 GL-MISC 4810 2011-06-15 11:18:41.853161 6799 GL-MISC 4811 2011-06-15 11:18:41.853161 6800 GL-MISC 4812 2011-06-15 11:18:41.853161 6801 GL-MISC 4813 2011-06-15 11:18:41.853161 6802 GL-MISC 4814 2011-06-15 11:18:41.853161 6803 GL-MISC 4815 2011-06-15 11:18:41.853161 6804 GL-MISC 4816 2011-06-15 11:18:41.853161 6805 GL-MISC 4817 2011-06-15 11:18:41.853161 6806 GL-MISC 4818 2011-06-15 11:18:41.853161 6807 GL-MISC 4819 2011-06-15 11:18:41.853161 6808 GL-MISC 4820 2011-06-15 11:18:41.853161 6809 GL-MISC 4821 2011-06-15 11:18:41.853161 6810 GL-MISC 4822 2011-06-15 11:18:41.853161 6811 GL-MISC 4823 2011-06-15 11:18:41.853161 6812 GL-MISC 4824 2011-06-15 11:18:41.853161 6813 GL-MISC 4825 2011-06-15 11:18:41.853161 6814 GL-MISC 4826 2011-06-15 11:18:41.853161 6815 GL-MISC 4827 2011-06-15 11:18:41.853161 6816 GL-MISC 4828 2011-06-15 11:18:41.853161 6817 GL-MISC 4829 2011-06-15 11:18:41.853161 6818 GL-MISC 4830 2011-06-15 11:18:41.853161 6819 GL-MISC 4831 2011-06-15 11:18:41.853161 6820 GL-MISC 4832 2011-06-15 11:18:41.853161 6821 GL-MISC 4833 2011-06-15 11:18:41.853161 6822 GL-MISC 4834 2011-06-15 11:18:41.853161 6823 GL-MISC 4835 2011-06-15 11:18:41.853161 6824 GL-MISC 4836 2011-06-15 11:18:41.853161 6825 GL-MISC 4837 2011-06-15 11:18:41.853161 6826 GL-MISC 4838 2011-06-15 11:18:41.853161 6827 GL-MISC 4839 2011-06-15 11:18:41.853161 6828 GL-MISC 4840 2011-06-15 11:18:41.853161 6829 GL-MISC 4841 2011-06-15 11:18:41.853161 6830 GL-MISC 4842 2011-06-15 11:18:41.853161 6831 GL-MISC 4843 2011-06-15 11:18:41.853161 6832 GL-MISC 4844 2011-06-15 11:18:41.853161 6833 GL-MISC 4845 2011-06-15 11:18:41.853161 6834 GL-MISC 4846 2011-06-15 11:18:41.853161 6835 GL-MISC 4847 2011-06-15 11:18:41.853161 6836 GL-MISC 4848 2011-06-15 11:18:41.853161 6837 GL-MISC 4849 2011-06-15 11:18:41.853161 6838 GL-MISC 4850 2011-06-15 11:18:41.853161 6839 GL-MISC 4851 2011-06-15 11:18:41.853161 6840 GL-MISC 4852 2011-06-15 11:18:41.853161 6841 GL-MISC 4853 2011-06-15 11:18:41.853161 6842 GL-MISC 4854 2011-06-15 11:18:41.853161 6843 GL-MISC 4855 2011-06-15 11:18:41.853161 6844 GL-MISC 4856 2011-06-15 11:18:41.853161 6845 GL-MISC 4857 2011-06-15 11:18:41.853161 6846 GL-MISC 4858 2011-06-15 11:18:41.853161 6847 GL-MISC 4859 2011-06-15 11:18:41.853161 6848 GL-MISC 4860 2011-06-15 11:18:41.853161 6849 GL-MISC 4861 2011-06-15 11:18:41.853161 6850 GL-MISC 4862 2011-06-15 11:19:19.192094 6851 GL-MISC 4863 2011-06-15 11:19:19.192094 6852 GL-MISC 4864 2011-06-15 11:19:19.192094 6853 GL-MISC 4865 2011-06-15 11:19:19.192094 6854 GL-MISC 4866 2011-06-15 11:19:19.192094 6855 GL-MISC 4867 2011-06-15 11:19:19.192094 6856 GL-MISC 4868 2011-06-15 11:19:19.192094 6857 GL-MISC 4869 2011-06-15 11:19:19.192094 6858 GL-MISC 4870 2011-06-15 11:19:19.192094 6859 GL-MISC 4871 2011-06-15 11:19:19.192094 6860 GL-MISC 4872 2011-06-15 11:19:19.192094 6861 GL-MISC 4873 2011-06-15 11:19:19.192094 6862 GL-MISC 4874 2011-06-15 11:19:19.192094 6863 GL-MISC 4875 2011-06-15 11:19:19.192094 6864 GL-MISC 4876 2011-06-15 11:19:19.192094 6865 GL-MISC 4877 2011-06-15 11:19:19.192094 6866 GL-MISC 4878 2011-06-15 11:19:19.192094 6867 GL-MISC 4879 2011-06-15 11:19:19.192094 6868 GL-MISC 4880 2011-06-15 11:19:19.192094 6869 GL-MISC 4881 2011-06-15 11:19:19.192094 6870 GL-MISC 4882 2011-06-15 11:19:19.192094 6871 GL-MISC 4883 2011-06-15 11:19:19.192094 6872 GL-MISC 4884 2011-06-15 11:19:19.192094 6873 GL-MISC 4885 2011-06-15 11:19:19.192094 6874 GL-MISC 4886 2011-06-15 11:19:19.192094 6875 GL-MISC 4887 2011-06-15 11:19:19.192094 6876 GL-MISC 4888 2011-06-15 11:19:19.192094 6877 GL-MISC 4889 2011-06-15 11:19:19.192094 6878 GL-MISC 4890 2011-06-15 11:19:19.192094 6879 GL-MISC 4891 2011-06-15 11:19:19.192094 6880 GL-MISC 4892 2011-06-15 11:19:19.192094 6881 GL-MISC 4893 2011-06-15 11:19:19.192094 6882 GL-MISC 4894 2011-06-15 11:19:19.192094 6883 GL-MISC 4895 2011-06-15 11:19:19.192094 6884 GL-MISC 4896 2011-06-15 11:19:19.192094 6885 GL-MISC 4897 2011-06-15 11:19:19.192094 6886 GL-MISC 4898 2011-06-15 11:19:19.192094 6887 GL-MISC 4899 2011-06-15 11:19:19.192094 6888 GL-MISC 4900 2011-06-15 11:19:19.192094 6889 GL-MISC 4901 2011-06-15 11:19:19.192094 6890 GL-MISC 4902 2011-06-15 11:19:19.192094 6891 GL-MISC 4903 2011-06-15 11:19:19.192094 6892 GL-MISC 4904 2011-06-15 11:19:19.192094 6893 GL-MISC 4905 2011-06-15 11:19:19.192094 6894 GL-MISC 4906 2011-06-15 11:19:19.192094 6895 GL-MISC 4907 2011-06-15 11:19:19.192094 6896 GL-MISC 4908 2011-06-15 11:19:19.192094 6897 GL-MISC 4909 2011-06-15 11:19:19.192094 6898 GL-MISC 4910 2011-06-15 11:19:19.192094 6899 GL-MISC 4911 2011-06-15 11:19:19.192094 6900 GL-MISC 4912 2011-06-15 11:19:19.192094 6901 GL-MISC 4913 2011-06-15 11:19:19.192094 6902 GL-MISC 4914 2011-06-15 11:19:19.192094 6903 GL-MISC 4915 2011-06-15 11:19:19.192094 6904 GL-MISC 4916 2011-06-15 11:19:19.192094 6905 GL-MISC 4917 2011-06-15 11:19:19.192094 6906 GL-MISC 4918 2011-06-15 11:19:19.192094 6907 GL-MISC 4919 2011-06-15 11:19:19.192094 6908 GL-MISC 4920 2011-06-15 11:19:19.192094 6909 GL-MISC 4921 2011-06-15 11:19:19.192094 6910 GL-MISC 4922 2011-06-15 11:19:19.192094 6911 GL-MISC 4923 2011-06-15 11:19:19.192094 6912 GL-MISC 4924 2011-06-15 11:19:19.192094 6913 GL-MISC 4925 2011-06-15 11:19:19.192094 6914 GL-MISC 4926 2011-06-15 11:19:19.192094 6915 GL-MISC 4927 2011-06-15 11:19:19.192094 6916 GL-MISC 4928 2011-06-15 11:19:19.192094 6917 GL-MISC 4929 2011-06-15 11:19:19.192094 6918 GL-MISC 4930 2011-06-15 11:19:19.192094 6919 GL-MISC 4931 2011-06-15 11:19:19.192094 6920 GL-MISC 4932 2011-06-15 11:19:19.192094 6921 GL-MISC 4933 2011-06-15 11:19:19.192094 6922 GL-MISC 4934 2011-06-15 11:19:19.192094 6923 GL-MISC 4935 2011-06-15 11:19:19.192094 6924 GL-MISC 4936 2011-06-15 11:19:19.192094 6925 GL-MISC 4937 2011-06-15 11:19:19.192094 6926 GL-MISC 4938 2011-06-15 11:19:19.192094 6927 GL-MISC 4939 2011-06-15 11:19:19.192094 6928 GL-MISC 4940 2011-06-15 11:19:19.192094 6929 GL-MISC 4941 2011-06-15 11:19:19.192094 6930 GL-MISC 4942 2011-06-15 11:19:19.192094 6931 GL-MISC 4943 2011-06-15 11:19:19.192094 6932 GL-MISC 4944 2011-06-15 11:19:19.192094 6933 GL-MISC 4945 2011-06-15 11:19:19.192094 6934 GL-MISC 4946 2011-06-15 11:19:19.192094 6935 GL-MISC 4947 2011-06-15 11:19:19.192094 6936 GL-MISC 4948 2011-06-15 11:19:19.192094 6937 GL-MISC 4949 2011-06-15 11:19:19.192094 6938 GL-MISC 4950 2011-06-15 11:19:19.192094 6939 GL-MISC 4951 2011-06-15 11:19:19.192094 6940 GL-MISC 4952 2011-06-15 11:19:19.192094 6941 GL-MISC 4953 2011-06-15 11:19:19.192094 6942 GL-MISC 4954 2011-06-15 11:19:19.192094 6943 GL-MISC 4955 2011-06-15 11:19:19.192094 6944 GL-MISC 4956 2011-06-15 11:19:19.192094 6945 GL-MISC 4957 2011-06-15 11:19:19.192094 6946 GL-MISC 4958 2011-06-15 11:19:19.192094 6947 GL-MISC 4959 2011-06-15 11:19:19.192094 6948 GL-MISC 4960 2011-06-15 11:19:19.192094 6949 GL-MISC 4961 2011-06-15 11:19:19.192094 6950 GL-MISC 4962 2011-06-15 11:19:19.192094 6951 GL-MISC 4963 2011-06-15 11:19:19.192094 6952 GL-MISC 4964 2011-06-15 11:19:19.192094 6953 GL-MISC 4965 2011-06-15 11:19:19.192094 6954 GL-MISC 4966 2011-06-15 11:19:19.192094 6955 GL-MISC 4967 2011-06-15 11:19:19.192094 6956 GL-MISC 4968 2011-06-15 11:19:19.192094 6957 GL-MISC 4969 2011-06-15 11:19:19.192094 6958 GL-MISC 4970 2011-06-15 11:19:19.192094 6959 GL-MISC 4971 2011-06-15 11:19:19.192094 6960 GL-MISC 4972 2011-06-15 11:19:19.192094 6961 GL-MISC 4973 2011-06-15 11:19:19.192094 6962 GL-MISC 4974 2011-06-15 11:19:19.192094 6963 GL-MISC 4975 2011-06-15 11:19:19.192094 6964 GL-MISC \. -- -- Data for Name: labeldef; Type: TABLE DATA; Schema: public; Owner: admin -- COPY labeldef (labeldef_id, labeldef_name, labeldef_papersize, labeldef_columns, labeldef_rows, labeldef_width, labeldef_height, labeldef_start_offset_x, labeldef_start_offset_y, labeldef_horizontal_gap, labeldef_vertical_gap) FROM stdin; 1 Avery 5263 Letter 2 5 400 200 25 50 0 0 2 Avery 5264 Letter 2 3 400 333 25 75 0 0 3 Avery 8460 Letter 3 10 262 100 32 50 0 0 4 CILS ALP1-9200-1 Letter 3 7 200 100 62 62 81 50 \. -- -- Data for Name: labelform; Type: TABLE DATA; Schema: public; Owner: admin -- COPY labelform (labelform_id, labelform_name, labelform_report_id, labelform_perpage, labelform_report_name) FROM stdin; \. -- -- Data for Name: lang; Type: TABLE DATA; Schema: public; Owner: admin -- COPY lang (lang_id, lang_qt_number, lang_abbr3, lang_abbr2, lang_name) FROM stdin; 1 3 \N \N Afan 2 156 \N \N Atsam 3 16 \N \N Bhutani 4 22 \N \N Byelorussian 5 23 \N \N Cambodian 6 158 \N \N Jju 7 154 \N \N Koro 8 68 \N \N Kurundi 9 69 \N \N Laothian 10 101 \N \N SerboCroatian 11 102 \N \N Sesotho 12 103 \N \N Setswana 13 107 \N \N Siswati 14 164 \N \N Tyap 15 \N ace \N Achinese 16 \N ach \N Acoli 17 \N ada \N Adangme 18 \N ady \N Adyghe; Adygei 19 \N afa \N Afro-Asiatic.(Other) 20 \N afh \N Afrihili 21 \N ain \N Ainu 22 \N akk \N Akkadian 23 \N ale \N Aleut 24 \N alg \N Algonquian languages 25 \N alt \N Southern Altai 26 \N ang \N English, Old (ca.450-1100) 27 \N anp \N Angika 28 \N apa \N Apache languages 29 \N arc \N Official Aramaic (700-300 BCE); Imperial Aramaic (700-300 BCE) 30 \N arn \N Mapudungun; Mapuche 31 \N arp \N Arapaho 32 \N art \N Artificial (Other) 33 \N arw \N Arawak 34 \N ast \N Asturian; Bable; Leonese; Asturleonese 35 \N ath \N Athapascan languages 36 \N aus \N Australian languages 37 \N awa \N Awadhi 38 \N bad \N Banda languages 39 \N bai \N Bamileke languages 40 \N bal \N Baluchi 41 \N ban \N Balinese 42 \N bas \N Basa 43 \N bat \N Baltic (Other) 44 \N bej \N Beja; Bedawiyet 45 \N bem \N Bemba 46 \N ber \N Berber (Other) 47 \N bho \N Bhojpuri 48 \N bik \N Bikol 49 \N bin \N Bini; Edo 50 \N bla \N Siksika 51 \N bnt \N Bantu (Other) 52 \N bra \N Braj 53 \N btk \N Batak languages 54 \N bua \N Buriat 55 \N bug \N Buginese 56 152 byn \N Blin; Bilin 57 \N cad \N Caddo 58 \N cai \N Central American Indian (Other) 59 \N car \N Galibi Carib 60 \N cau \N Caucasian (Other) 61 \N ceb \N Cebuano 62 \N cel \N Celtic (Other) 63 \N chb \N Chibcha 64 \N chg \N Chagatai 65 \N chk \N Chuukese 66 \N chm \N Mari 67 \N chn \N Chinook jargon 68 \N cho \N Choctaw 69 \N chp \N Chipewyan; Dene Suline 70 \N chr \N Cherokee 71 \N chy \N Cheyenne 72 \N cmc \N Chamic languages 73 \N cop \N Coptic 74 \N cpe \N Creoles and pidgins, English-based (Other) 75 \N cpf \N Creoles and pidgins, French-based (Other) 76 \N cpp \N Creoles and pidgins, Portuguese-based (Other) 77 \N crh \N Crimean Tatar; Crimean Turkish 78 \N crp \N Creoles and pidgins (Other) 79 \N csb \N Kashubian 80 \N cus \N Cushitic (Other) 81 \N dak \N Dakota 82 \N dar \N Dargwa 83 \N day \N Land Dayak languages 84 \N del \N Delaware 85 \N den \N Slave (Athapascan) 86 \N dgr \N Dogrib 87 \N din \N Dinka 88 \N doi \N Dogri 89 \N dra \N Dravidian (Other) 90 \N dsb \N Lower Sorbian 91 \N dua \N Duala 92 \N dum \N Dutch, Middle (ca.1050-1350) 93 \N dyu \N Dyula 94 \N efi \N Efik 95 \N egy \N Egyptian (Ancient) 96 \N eka \N Ekajuk 97 \N elx \N Elamite 98 \N enm \N English, Middle (1100-1500) 99 \N ewo \N Ewondo 100 \N fan \N Fang 101 \N fat \N Fanti 102 \N fil \N Filipino; Pilipino 103 \N fiu \N Finno-Ugrian (Other) 104 \N fon \N Fon 105 \N frm \N French, Middle (ca.1400-1600) 106 \N fro \N French, Old (842-ca.1400) 107 38 frr \N Northern Frisian 108 38 frs \N Eastern Frisian 109 159 fur \N Friulian 110 148 gaa \N Ga 111 \N gay \N Gayo 112 \N gba \N Gbaya 113 \N gem \N Germanic (Other) 114 153 gez \N Geez 115 \N gil \N Gilbertese 116 \N gmh \N German, Middle High (ca.1050-1500) 117 \N goh \N German, Old High (ca.750-1050) 118 \N gon \N Gondi 119 \N gor \N Gorontalo 120 \N got \N Gothic 121 \N grb \N Grebo 122 \N grc \N Greek, Ancient (to 1453) 123 \N gsw \N Swiss German; Alemannic; Alsatian 124 \N gwi \N Gwich'in 125 \N hai \N Haida 126 163 haw \N Hawaiian 127 \N hil \N Hiligaynon 128 \N him \N Himachali 129 \N hit \N Hittite 130 \N hmn \N Hmong 131 \N hsb \N Upper Sorbian 132 \N hup \N Hupa hupa 133 \N iba \N Iban 134 \N ijo \N Ijo languages 135 \N ilo \N Iloko 136 \N inc \N Indic (Other) 137 \N ine \N Indo-European (Other) 138 \N inh \N Ingush 139 \N ira \N Iranian (Other) 140 \N iro \N Iroquoian languages 141 \N jbo \N Lojban 142 \N jpr \N Judeo-Persian 143 \N jrb \N Judeo-Arabic 144 \N kaa \N Kara-Kalpak 145 \N kab \N Kabyle 146 \N kac \N Kachin; Jingpho 147 150 kam \N Kamba 148 \N kar \N Karen languages 149 \N kaw \N Kawi 150 \N kbd \N Kabardian 151 \N kha \N Khasi 152 \N khi \N Khoisan (Other) 153 \N kho \N Khotanese 154 \N kmb \N Kimbundu 155 147 kok \N Konkani 156 \N kos \N Kosraean 157 \N kpe \N Kpelle 158 \N krc \N Karachay-Balkar 159 \N krl \N Karelian 160 \N kro \N Kru languages 161 \N kru \N Kurukh 162 \N kum \N Kumyk 163 \N kut \N Kutenai 164 \N lad \N Ladino 165 \N lah \N Lahnda 166 \N lam \N Lamba 167 \N lez \N Lezghian 168 \N lol \N Mongo 169 \N loz \N Lozi 170 \N lua \N Luba-Lulua 171 \N lui \N Luiseno 172 \N lun \N Lunda 173 \N luo \N Luo (Kenya and Tanzania) 174 \N lus \N Lushai 175 \N mad \N Madurese 176 \N mag \N Magahi 177 \N mai \N Maithili 178 \N mak \N Makasar 179 \N man \N Mandingo 180 \N map \N Austronesian (Other) 181 \N mas \N Masai 182 \N mdf \N Moksha 183 \N mdr \N Mandar 184 \N men \N Mende 185 \N mga \N Irish, Middle (900-1200) 186 \N mic \N Mi'kmaq; Micmac 187 \N min \N Minangkabau 188 \N mis \N Uncoded languages 189 \N mkh \N Mon-Khmer (Other) 190 \N mnc \N Manchu 191 \N mni \N Manipuri 192 \N mno \N Manobo languages 193 \N moh \N Mohawk 194 \N mos \N Mossi 195 \N mul \N Multiple languages 196 \N mun \N Munda languages 197 \N mus \N Creek 198 \N mwl \N Mirandese 199 \N mwr \N Marwari 200 \N myn \N Mayan languages 201 \N myv \N Erzya 202 \N nah \N Nahuatl languages 203 \N nai \N North American Indian 204 \N nap \N Neapolitan 205 \N nds \N Low German; Low Saxon; German, Low; Saxon, Low 206 \N new \N Nepal Bhasa; Newari 207 \N nia \N Nias 208 \N nic \N Niger-Kordofanian (Other) 209 \N niu \N Niuean 210 \N nog \N Nogai 211 \N non \N Norse, Old 212 \N nqo \N N'Ko 213 \N nso \N Pedi; Sepedi; Northern Sotho 214 \N nub \N Nubian languages 215 \N nwc \N Classical Newari; Old Newari; Classical Nepal Bhasa 216 \N nym \N Nyamwezi 217 \N nyn \N Nyankole 218 \N nyo \N Nyoro 219 \N nzi \N Nzima 220 \N osa \N Osage 221 \N ota \N Turkish, Ottoman (1500-1928) 222 \N oto \N Otomian languages 223 \N paa \N Papuan (Other) 224 \N pag \N Pangasinan 225 \N pal \N Pahlavi 226 \N pam \N Pampanga; Kapampangan 227 \N pap \N Papiamento 228 \N pau \N Palauan 229 \N peo \N Persian, Old (ca.600-400 B.C.) 230 \N phi \N Philippine (Other) 231 \N phn \N Phoenician 232 \N pon \N Pohnpeian 233 \N pra \N Prakrit languages 234 \N pro \N Provencal, Old (to 1500) 235 \N raj \N Rajasthani 236 \N rap \N Rapanui 237 \N rar \N Rarotongan; Cook Islands Maori 238 \N roa \N Romance (Other) 239 \N rom \N Romany 240 \N rup \N Aromanian; Arumanian; Macedo-Romanian 241 \N sad \N Sandawe 242 \N sah \N Yakut 243 \N sai \N South American Indian (Other) 244 \N sal \N Salishan languages 245 \N sam \N Samaritan Aramaic 246 \N sas \N Sasak 247 \N sat \N Santali 248 \N scn \N Sicilian 249 \N sco \N Scots 250 \N sel \N Selkup 251 \N sem \N Semitic (Other) 252 \N sga \N Irish, Old (to 900) 253 \N sgn \N Sign languages 254 \N shn \N Shan 255 155 sid \N Sidamo 256 \N sio \N Siouan languages 257 \N sit \N Sino-Tibetan (Other) 258 \N sla \N Slavic (Other) 259 \N sma \N Southern Sami 260 \N smi \N Sami languages (Other) 261 \N smj \N Lule Sami 262 \N smn \N Inari Sami 263 \N sms \N Skolt Sami 264 \N snk \N Soninke 265 \N sog \N Sogdian 266 \N son \N Songhai languages 267 \N srn \N Sranan Tongo 268 \N srr \N Serer 269 \N ssa \N Nilo-Saharan (Other) 270 \N suk \N Sukuma 271 \N sus \N Susu 272 \N sux \N Sumerian 273 \N syc \N Classical Syriac 274 151 syr \N Syriac 275 \N tai \N Tai (Other) 276 \N tem \N Timne 277 \N ter \N Tereno 278 \N tet \N Tetum 279 157 tig \N Tigre 280 \N tiv \N Tiv 281 \N tkl \N Tokelau 282 \N tlh \N Klingon 283 \N tli \N Tlingit 284 \N tmh \N Tamashek 285 \N tog \N Tonga (Nyasa) 286 \N tpi \N Tok Pisin 287 \N tsi \N Tsimshian 288 \N tum \N Tumbuka 289 \N tup \N Tupi languages 290 \N tut \N Altaic (Other) 291 \N tvl \N Tuvalu 292 \N tyv \N Tuvinian 293 \N udm \N Udmurt 294 \N uga \N Ugaritic 295 \N umb \N Umbundu 296 \N und \N Undetermined 297 \N vai \N Vai 298 \N vot \N Votic 299 \N wak \N Wakashan languages 300 162 wal \N Walamo 301 \N war \N Waray 302 \N was \N Washo 303 \N wen \N Sorbian languages 304 \N xal \N Kalmyk; Oirat 305 \N yao \N Yao 306 \N yap \N Yapese 307 \N ypk \N Yupik languages 308 \N zap \N Zapotec 309 \N zbl \N Blissymbols; Blissymbolics; Bliss 310 \N zen \N Zenaga 311 \N znd \N Zande languages 312 \N zun \N Zuni 313 \N zxx \N No linguistic content 314 \N zza \N Zaza; Dimili; Dimli; Kirdki; Kirmanjki; Zazaki 315 4 aar aa Afar 316 2 abk ab Abkhazian 317 \N ave ae Avestan 318 5 afr af Afrikaans 319 146 aka ak Akan 320 7 amh am Amharic 321 \N arg an Aragonese 322 8 ara ar Arabic 323 10 asm as Assamese 324 \N ava av Avaric 325 11 aym ay Aymara 326 12 aze az Azerbaijani 327 13 bak ba Bashkir 328 \N bel be Belarusian 329 20 bul bg Bulgarian 330 17 bih bh Bihari 331 18 bis bi Bislama 332 \N bam bm Bambara 333 15 ben bn Bengali 334 121 bod bo Tibetan 335 19 bre br Breton 336 142 bos bs Bosnian 337 24 cat ca Catalan; Valencian 338 \N che ce Chechen 339 \N cha ch Chamorro 340 26 cos co Corsican 341 \N cre cr Cree 342 28 ces cs Czech 343 \N chu cu Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic 344 \N chv cv Chuvash 345 134 cym cy Welsh 346 29 dan da Danish 347 42 deu de German 348 143 div dv Divehi; Dhivehi; Maldivian 349 \N dzo dz Dzongkha 350 161 ewe ee Ewe 351 42 ell el Greek, Modern (1453-) 352 31 eng en English 353 32 epo eo Esperanto 354 111 spa es Spanish; Castilian 355 33 est et Estonian 356 14 eus eu Basque 357 89 fas fa Persian 358 \N ful ff Fulah 359 36 fin fi Finnish 360 35 fij fj Fijian 361 34 fao fo Faroese 362 37 fra fr French 363 38 fry fy Western Frisian 364 57 gle ga Irish 365 39 gla gd Gaelic; Scottish Gaelic 366 40 glg gl Galician 367 45 grn gn Guarani 368 46 guj gu Gujarati 369 144 glv gv Manx 370 47 hau ha Hausa 371 48 heb he Hebrew 372 49 hin hi Hindi 373 \N hmo ho Hiri Motu 374 27 hrv hr Croatian 375 \N hat ht Haitian; Haitian Creole 376 50 hun hu Hungarian 377 9 hye hy Armenian 378 \N her hz Herero 379 53 ina ia Interlingua (International Auxiliary language Association) 380 52 ind id Indonesian 381 54 ile ie Interlingue; Occidental 382 149 ibo ig Igbo 383 \N iii ii Sichuan Yi; Nuosu 384 56 ipk ik Inupiaq 385 \N ido io Ido 386 51 isl is Icelandic 387 58 ita it Italian 388 55 iku iu Inuktitut 389 59 jpn ja Japanese 390 60 jav jv Javanese 391 41 kat ka Georgian 392 \N kon kg Kongo 393 \N kik ki Kikuyu; Gikuyu 394 \N kua kj Kuanyama; Kwanyama 395 63 kaz kk Kazakh 396 44 kal kl Kalaallisut; Greenlandic 397 \N khm km Central Khmer 398 61 kan kn Kannada 399 66 kor ko Korean 400 \N kau kr Kanuri 401 62 kas ks Kashmiri 402 67 kur ku Kurdish 403 \N kom kv Komi 404 145 cor kw Cornish 405 65 kir ky Kirghiz; Kyrgyz 406 70 lat la Latin 407 \N ltz lb Luxembourgish; Letzeburgesch 408 \N lug lg Ganda 409 \N lim li Limburgan; Limburger; Limburgish 410 72 lin ln Lingala 411 \N lao lo Lao 412 73 lit lt Lithuanian 413 \N lub lu Luba-Katanga 414 71 lav lv Latvian 415 75 mlg mg Malagasy 416 \N mah mh Marshallese 417 79 mri mi Maori 418 74 mkd mk Macedonian 419 77 mal ml Malayalam 420 82 mon mn Mongolian 421 81 mol mo Moldavian 422 80 mar mr Marathi 423 76 msa ms Malay 424 78 mlt mt Maltese 425 21 mya my Burmese 426 83 nau na Nauru 427 85 nob nb Bokmal, Norwegian; Norwegian Bokmal 428 \N nde nd Ndebele, North; North Ndebele 429 84 nep ne Nepali 430 \N ndo ng Ndonga 431 30 nld nl Dutch; Flemish 432 141 nno nn Norwegian Nynorsk; Nynorsk, Norwegian 433 141 nor no Norwegian 434 \N nbl nr Ndebele, South; South Ndebele 435 \N nav nv Navajo; Navaho 436 165 nya ny Chichewa; Chewa; Nyanja 437 86 oci oc Occitan (post 1500); Provencal 438 \N oji oj Ojibwa 439 \N orm om Oromo 440 87 ori or Oriya 441 \N oss os Ossetian; Ossetic 442 92 pan pa Panjabi; Punjabi 443 \N pli pi Pali 444 90 pol pl Polish 445 88 pus ps Pushto; Pashto 446 91 por pt Portuguese 447 93 que qu Quechua 448 94 roh rm Romansh 449 \N run rn Rundi 450 95 ron ro Romanian 451 96 rus ru Russian 452 64 kin rw Kinyarwanda 453 99 san sa Sanskrit 454 \N srd sc Sardinian 455 105 snd sd Sindhi 456 \N sme se Northern Sami 457 98 sag sg Sango 458 106 sin si Sinhala; Sinhalese 459 108 slk sk Slovak 460 109 slv sl Slovenian 461 97 smo sm Samoan 462 104 sna sn Shona 463 110 som so Somali 464 6 sqi sq Albanian 465 100 srp sr Serbian 466 \N ssw ss Swati 467 \N sot st Sotho, Southern 468 112 sun su Sundanese 469 114 swe sv Swedish 470 113 swa sw Swahili 471 117 tam ta Tamil 472 119 tel te Telugu 473 116 tgk tg Tajik 474 120 tha th Thai 475 122 tir ti Tigrinya 476 126 tuk tk Turkmen 477 115 tgl tl Tagalog 478 \N tsn tn Tswana 479 123 ton to Tonga (Tonga Islands) 480 125 tur tr Turkish 481 124 tso ts Tsonga 482 118 tat tt Tatar 483 127 twi tw Twi 484 \N tah ty Tahitian 485 128 uig ug Uighur; Uyghur 486 129 ukr uk Ukrainian 487 130 urd ur Urdu 488 131 uzb uz Uzbek 489 160 ven ve Venda 490 132 vie vi Vietnamese 491 133 vol vo Volapak 492 \N wln wa Walloon 493 135 wol wo Wolof 494 136 xho xh Xhosa 495 137 yid yi Yiddish 496 138 yor yo Yoruba 497 139 zha za Zhuang; Chuang 498 25 zho zh Chinese 499 140 zul zu Zulu \. -- -- Data for Name: locale; Type: TABLE DATA; Schema: public; Owner: admin -- COPY locale (locale_id, locale_code, locale_descrip, locale_lang_file, locale_dateformat, locale_currformat, locale_qtyformat, locale_comments, locale_qtyperformat, locale_salespriceformat, locale_extpriceformat, locale_timeformat, locale_timestampformat, local_costformat, locale_costformat, locale_purchpriceformat, locale_uomratioformat, locale_intervalformat, locale_lang_id, locale_country_id, locale_error_color, locale_warning_color, locale_emphasis_color, locale_altemphasis_color, locale_expired_color, locale_future_color, locale_curr_scale, locale_salesprice_scale, locale_purchprice_scale, locale_extprice_scale, locale_cost_scale, locale_qty_scale, locale_qtyper_scale, locale_uomratio_scale, locale_percent_scale, locale_weight_scale) FROM stdin; 30 Germany Germany (dd.mm.yyyy and 1.000,99) DD.MM.YY 999,999,990.00 ,-. Note: If you do not have the .qm file for the German translaton loaded in the client's directory you receive and warning that it is absent and see all screens in English. The date and numbers will be formatted for Germany however. 999,999,990.0000 999,999,990.0000 999,999,990.00 HH:MI DD.MM.YY HH:MI \N 999,999,990.0000 999,999,990.0000 999,999,990.00000 HH24:MI 347 81 2 4 4 2 4 2 4 5 2 2 3 Default Default Locale MM/DD/YY 999,999,990.00 .-, 999,999,990.0000 999,999,990.0000 999,999,990.00 HH12:MI AM MM/DD/YY HH12:MI AM \N 999,999,990.0000 999,999,990.0000 999,999,990.00000 HH2424:MI 352 230 2 4 4 2 4 2 4 5 2 2 28 Finance Finance MM/DD/YY 999,999,990 .-, 999,999,990.0000 999,999,990.0000 999,999,990.00 HH12:MI AM MM/DD/YY HH12:MI AM \N 999,999,990.0000 999,999,990.0000 HH2424:MI 352 230 0 4 4 2 4 2 4 0 2 2 4 Spanish Locale for Mexican Spanish OpenMFG.mx.sp DD/MM/YY 999999990.00 .-, 999999990.0000 999999990.0000 999999990.00 HH:MI DD/MM/YY HH:MI \N 999999990.0000 HH24:MI 354 140 2 4 0 2 4 2 4 0 2 2 29 UK United Kingdom DD/MM/YYYY 999,999,990.00 .-, 999,999,990.0000 999,999,990.0000 999,999,990.00 HH:MI DD/MM/YYYY HH:MI \N 999,999,990.0000 999,999,990.0000 999,999,990.00000 HH24:MI 352 229 2 4 4 2 4 2 4 5 2 2 \. -- -- Data for Name: location; Type: TABLE DATA; Schema: public; Owner: admin -- COPY location (location_id, location_warehous_id, location_name, location_descrip, location_restrict, location_netable, location_whsezone_id, location_aisle, location_rack, location_bin) FROM stdin; 122 35 01 01-01-01-01 in RM1 f t 8 01 01 01 124 35 03 01-01-01-03 in RM1 f t 8 01 01 01 123 35 02 01-01-01-02 in RM1 f t 8 01 01 01 126 35 02 99-01-01-02 in FG1 f t 7 99 01 01 127 35 03 99-01-01-03 in FG1 f t \N 99 01 01 125 35 01 99-01-01-01 in FG1 f t 7 99 01 01 129 35 01 Wip Paint Location 1 f t \N WP PT 01 130 35 01 Wip Shipping Location 1 f t \N WP SH 01 128 35 01 Wip Assembly Location 1 f t 7 WP AS 01 131 35 99 Wip Final Inspection Location f t \N WP IN 99 \. -- -- Data for Name: locitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY locitem (locitem_id, locitem_location_id, locitem_item_id) FROM stdin; \. -- -- Data for Name: metasql; Type: TABLE DATA; Schema: public; Owner: admin -- COPY metasql (metasql_id, metasql_group, metasql_name, metasql_notes, metasql_query, metasql_lastuser, metasql_lastupdate, metasql_grade) FROM stdin; 2 enterPoReceipt poItemReceivingsFillList -- Group:enterPoReceipt\n-- Name:poItemReceivingsFillList\n-- Notes:\n\n\nSELECT poitem_id, poitem_linenumber,\n formatDate(poitem_duedate),\n COALESCE(item_number, ),\n COALESCE(uom_name, ),\n warehous_code,\n poitem_vend_item_number,\n poitem_vend_uom,\n formatQty(poitem_qty_ordered),\n formatQty(poitem_qty_received),\n formatQty(qtyToReceive(, poitem_id))\nFROM poitem \n LEFT OUTER JOIN \n ( itemsite \n\n JOIN usrsite ON (itemsite_warehous_id=usrsite_warehous_id) \n\n JOIN item ON (itemsite_item_id=item_id) \n JOIN uom ON (item_inv_uom_id=uom_id)\n JOIN whsinfo ON (itemsite_warehous_id=warehous_id)\n ) ON (poitem_itemsite_id=itemsite_id) \nWHERE ( (poitem_status <> 'C')\n\n AND (usrsite_username=current_user) \n\n AND (poitem_pohead_id=) )\nORDER BY poitem_linenumber;\n\nSELECT raitem_id, raitem_linenumber,\n formatDate(rahead_expiredate),\n COALESCE(item_number, ),\n COALESCE(iu.uom_name, ),\n warehous_code,\n '' AS vend_item_number,\n ru.uom_name,\n formatQty(raitem_qtyauthorized),\n formatQty(raitem_qtyreceived),\n formatQty(qtyToReceive(, raitem_id))\nFROM rahead, raitem \n LEFT OUTER JOIN \n ( itemsite \n\n JOIN usrsite ON (itemsite_warehous_id=usrsite_warehous_id) \n\n JOIN item ON (itemsite_item_id=item_id) \n JOIN uom iu ON (item_inv_uom_id=uom_id)\n JOIN whsinfo ON (itemsite_warehous_id=warehous_id)\n ) ON (raitem_itemsite_id=itemsite_id), uom ru\nWHERE ( (raitem_status <> 'C')\n AND (raitem_qtyauthorized > 0)\n AND (raitem_disposition IN ('R','P','V'))\n AND (raitem_rahead_id=rahead_id)\n AND (raitem_qty_uom_id=ru.uom_id)\n\n AND (usrsite_username=current_user) \n\n AND (rahead_id=) )\nORDER BY raitem_linenumber;\n\nSELECT toitem_id, toitem_linenumber,\n formatDate(toitem_duedate),\n COALESCE(item_number, ),\n COALESCE(uom_name, ),\n warehous_code,\n '',\n toitem_uom,\n formatQty(toitem_qty_ordered),\n formatQty(toitem_qty_received),\n formatQty(qtyToReceive(, toitem_id))\nFROM tohead, itemsite\n\n JOIN usrsite ON (itemsite_warehous_id=usrsite_warehous_id) \n\n, whsinfo, toitem, item JOIN uom ON (item_inv_uom_id=uom_id)\nWHERE ((toitem_item_id=item_id)\n AND (tohead_id=toitem_tohead_id)\n AND (tohead_dest_warehous_id=itemsite_warehous_id)\n AND (tohead_dest_warehous_id=warehous_id)\n AND (toitem_item_id=itemsite_item_id)\n AND (toitem_status <> 'C')\n\n AND (usrsite_username=current_user) \n\n AND (toitem_tohead_id=) )\nORDER BY toitem_linenumber;\n\n admin 2008-09-03 0 71 schedule create used by createPlannedOrdersByPlannerCode -- Group: schedule\n-- Name: create\n-- Notes: used by createPlannedOrdersByPlannerCode\n\nSELECT createPlannedOrders(,\n \n CURRENT_DATE + \n \n \n ,\n ,\n ,\n \n \n \n FALSE\n );\n admin 2011-01-31 0 72 schedule expedite used by dspExpediteExceptionsByPlannerCode -- Group: schedule\n-- Name: expedite\n-- Notes: used by dspExpediteExceptionsByPlannerCode\nSELECT planord_id AS order_id, 1 AS order_code,\n CASE WHEN (planord_type='W') THEN ('PW/O-' || formatPloNumber(planord_id))\n WHEN (planord_type='P') THEN ('PP/O-' || formatPloNumber(planord_id))\n WHEN (planord_type='T') THEN ('PT/O-' || formatPloNumber(planord_id))\n ELSE TEXT(planord_number)\n END AS order_number,\n whsinfo.warehous_code AS to_warehous, fromwhs.warehous_code AS from_warehous,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS item_descrip,\n CASE WHEN (planord_type='W') THEN formatDate(planord_startdate)\n ELSE formatDate(planord_duedate)\n END AS f_keydate,\n CASE WHEN (planord_type='W') THEN planord_startdate\n ELSE planord_duedate\n END AS keydate, AS exception\nFROM planord JOIN itemsite ON (itemsite.itemsite_id=planord_itemsite_id)\n JOIN whsinfo ON (whsinfo.warehous_id=itemsite.itemsite_warehous_id)\n JOIN item ON (item_id=itemsite.itemsite_item_id)\n JOIN itemsite fromsite ON (fromsite.itemsite_id=planord_supply_itemsite_id)\n JOIN whsinfo fromwhs ON (fromwhs.warehous_id=fromsite.itemsite_warehous_id)\nWHERE ( ( ( (planord_type='W') AND (planord_startdate <= (CURRENT_DATE + )) )\n OR ( (planord_type='P') AND (planord_duedate <= (CURRENT_DATE + )) )\n OR ( (planord_type='T') AND (planord_duedate <= (CURRENT_DATE + )) ) )\n\n\n AND (itemsite.itemsite_warehous_id=)\n\n\n\n AND (itemsite.itemsite_plancode_id=)\n\n AND (itemsite.itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n\n\n )\n\nUNION\nSELECT wo_id AS order_id, 2 AS order_code, ('W/O-' || formatWoNumber(wo_id)) AS order_number,\n warehous_code AS to_warehous, '' AS from_warehous,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS item_descrip,\n formatDate(wo_startdate) AS f_keydate, wo_startdate AS keydate, AS exception\nFROM wo, itemsite, item, warehous\nWHERE ( (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_status IN ('O', 'E', 'R'))\n AND (wo_startdate <= (CURRENT_DATE + ))\n\n\n AND (itemsite.itemsite_warehous_id=)\n\n\n\n AND (itemsite.itemsite_plancode_id=)\n\n AND (itemsite.itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n\n\n )\n\nUNION\nSELECT wo_id AS order_id, 2 AS order_code, ('W/O-' || formatWoNumber(wo_id)) AS order_number,\n warehous_code AS to_warehous, '' AS from_warehous,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS item_descrip,\n formatDate(wo_startdate) AS f_keydate, wo_startdate AS keydate, AS exception\nFROM wo, itemsite, item, warehous\nWHERE ( (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_status='I')\n AND (wo_startdate <= (CURRENT_DATE + ))\n\n\n AND (itemsite.itemsite_warehous_id=)\n\n\n\n AND (itemsite.itemsite_plancode_id=)\n\n AND (itemsite.itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n\n\n )\n\nORDER BY keydate; admin 2009-08-13 0 73 transferOrders detail used by transferOrders -- Group: transferOrders\n-- Name: detail\n-- Notes: used by transferOrders\n\nSELECT DISTINCT tohead_id AS id,\n CASE WHEN (tohead_status='U') THEN 1\n WHEN (tohead_status='O') THEN 2\n WHEN (tohead_status='C') THEN 3\n ELSE 4\n END AS altId,\n tohead.*,\n CASE WHEN (tohead_status='U') THEN \n WHEN (tohead_status='O') THEN \n WHEN (tohead_status='C') THEN \n ELSE '?'\n END AS f_status,\n src.warehous_code AS srcWhs,\n dest.warehous_code AS destWhs,\n (SELECT MIN(toitem_schedshipdate)\n FROM toitem\n WHERE (toitem_tohead_id=tohead_id)) AS scheduled\nFROM tohead LEFT OUTER JOIN whsinfo src ON (src.warehous_id=tohead_src_warehous_id)\n LEFT OUTER JOIN whsinfo dest ON (dest.warehous_id=tohead_dest_warehous_id)\nWHERE ( TRUE\n\n AND (tohead_status = )\n\n AND (tohead_status <> 'C')\n\n\n AND (tohead_src_warehous_id=)\n\n\n AND (tohead_dest_warehous_id=)\n\n )\nORDER BY tohead_number;\n\n admin 2009-08-13 0 309 gleries checkeditable -- Group: gleries\n-- Name: checkeditable\n-- Notes: \nSELECT gltrans_id \nFROM accnt, gltrans \n LEFT OUTER JOIN period ON (gltrans_date BETWEEN period_start AND period_end) \nWHERE ( (gltrans_accnt_id=accnt_id) \n AND (gltrans_sequence=) \n AND ( (gltrans_deleted) \n OR (period_freeze) \n OR (gltrans_rec) \n OR (period_closed AND NOT accnt_closedpost) ) )\nLIMIT 1; admin 2010-09-10 0 11 breederDistributionVariance detail used by dspBreederDistributionVarianceByItem, dspBreederDistributionVarianceByWarehouse -- Group: breederDistributionVariance\n-- Name: detail\n-- Notes: used by dspBreederDistributionVarianceByItem, dspBreederDistributionVarianceByWarehouse\n\nSELECT brdvar_id, brdvar_postdate,\n \n (SELECT item_number\n FROM item\n WHERE item_id=) AS pitem_number,\n \n pi.item_number AS pitem_number,\n \n ci.item_number AS citem_number,\n brdvar_stdqtyper,\n brdvar_stdqtyper * brdvar_wo_qty AS stdqty,\n brdvar_actqtyper,\n brdvar_actqtyper * brdvar_wo_qty AS actqty,\n brdvar_actqtyper-brdvar_stdqtyper AS qtypervariance,\n (brdvar_actqtyper-brdvar_stdqtyper) / brdvar_stdqtyper AS percentvariance,\n 'qtyper' AS brdvar_stdqtyper_xtnumericrole,\n 'qty' AS stdqty_xtnumericrole,\n 'qtyper' AS brdvar_actqtyper_xtnumericrole,\n 'qty' AS actqty_xtnumericrole,\n 'qtyper' AS qtypervariance_xtnumericrole,\n 'percent' AS percentvariance_xtnumericrole \nFROM xtmfg.brdvar, itemsite AS ps, itemsite AS cs, item AS ci, item AS pi\nWHERE ( (brdvar_parent_itemsite_id=ps.itemsite_id)\n AND (brdvar_itemsite_id=cs.itemsite_id)\n\n AND (ps.itemsite_item_id=)\n AND (pi.item_id=ci.item_id)\n\n AND (ps.itemsite_item_id=pi.item_id)\n\n AND (cs.itemsite_item_id=ci.item_id)\n AND (brdvar_postdate BETWEEN \n AND )\n\n AND (ps.itemsite_warehous_id=)\n\n) \nORDER BY brdvar_postdate, pitem_number\n\n , citem_number \n\n;\n admin 2009-12-03 0 29 manufacture laborvariance shared by dspLaborVarianceBy* -- Group: manufacture\n-- Name: laborvariance\n-- Notes: shared by dspLaborVarianceBy*\n\nSELECT woopervar.*,\n item_number, wrkcnt_code,\n (woopervar_sutime - woopervar_stdsutime) AS suvar,\n (woopervar_rntime - woopervar_stdrntime) AS rnvar,\n 'qty' AS woopervar_qtyord_xtnumericrole,\n 'qty' AS woopervar_qtyrcv_xtnumericrole,\n '1' AS woopervar_stdsutime_xtnumericrole,\n '1' AS woopervar_stdrntime_xtnumericrole,\n '1' AS woopervar_sutime_xtnumericrole,\n '1' AS woopervar_rntime_xtnumericrole,\n '1' AS suvar_xtnumericrole,\n '1' AS rnvar_xtnumericrole\nFROM xtmfg.woopervar\n\n JOIN wo ON ((woopervar_number=wo_number)\n AND (woopervar_subnumber=wo_subnumber))\n\n JOIN itemsite ON (woopervar_parent_itemsite_id=itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN xtmfg.wrkcnt ON (woopervar_wrkcnt_id=wrkcnt_id)\nWHERE (true\n\n AND (woopervar_posted BETWEEN \n AND )\n\n\n AND (itemsite_item_id=)\n\n\n AND (woopervar_booitem_id=)\n\n\n AND (wrkcnt_id=)\n\n\n AND (wo_id=)\n\n\n AND (itemsite_warehous_id=)\n\n)\nORDER BY woopervar_posted DESC, woopervar_seqnumber;\n admin 2009-12-03 0 204 lotserial detail -- Group: lotserial\n-- Name: detail\n-- Notes: \n\nSELECT ls_number, ls_notes, \n formatlotserialnumberbarcode(ls_number) AS lotserial_barcode,\n item_number, item_descrip1, item_descrip2\nFROM ls\n JOIN item ON (item_id=ls_item_id)\nWHERE (ls_id=); admin 2010-02-25 0 205 lotserial label -- Group: lotserial\n-- Name: label\n-- Notes: \n\nSELECT AS label; admin 2010-02-25 0 207 returnauthorizationworkbench duecredit -- Group: returnauthorizationworkbench\n-- Name: duecredit\n-- Notes: \n\nSELECT DISTINCT rahead_id, \n\t\t CASE \n\t\t WHEN rahead_creditmethod = 'M' THEN \n\t\t 1 \n\t\t WHEN rahead_creditmethod = 'K' THEN \n\t\t 2 \n\t\t WHEN rahead_creditmethod = 'C' THEN \n\t\t 3 \n\t\t END, \n\t\t rahead_number, cust_name, \n\t\t rahead_authdate, \n\t\t calcradueamt(rahead_id) AS amount, \n\t\t currConcat(rahead_curr_id) AS currency, \n\t\t currtobase(rahead_curr_id,\n\t\t calcradueamt(rahead_id), current_date) AS baseamount, \n\t\t CASE \n\t\t WHEN rahead_creditmethod = 'M' THEN \n\t\t \n\t\t WHEN rahead_creditmethod = 'K' THEN \n\t\t \n\t\t WHEN rahead_creditmethod = 'C' THEN \n\t\t \n\t\t END AS creditmethod, \n 'curr' AS amount_xtnumericrole, \n 'curr' AS baseamount_xtnumericrole \n\t\t FROM rahead,raitem,custtype,custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id) \n\t\t WHERE ( (rahead_id=raitem_rahead_id) \n\t\t AND (rahead_cust_id=cust_id) \n\t\t AND (cust_custtype_id=custtype_id) \n\t\t AND ((raitem_disposition IN ('R','P') AND rahead_timing = 'R' AND raitem_qtyreceived > raitem_qtycredited) \n OR (raitem_disposition IN ('R','P') AND rahead_timing = 'I' AND raitem_qtyauthorized > raitem_qtycredited) \n\t\t OR (raitem_disposition = 'C' AND raitem_qtyauthorized > raitem_qtycredited)) \n\t\t AND (raitem_status = 'O') \n\t\t AND (rahead_creditmethod != 'N') \n\t\t AND (calcradueamt(rahead_id) > 0) \n\t\t AND (raitem_disposition IN ('C','R','P')) \n\t\t \n\t\t AND (cust_id=) \n\t\t \n\t\t AND (custtype_id=) \n\t\t \n AND (custgrpitem_custgrp_id=) \n\t\t \n\t\t AND (custtype_code ~ ) \n\t\t \n\t\t AND (rahead_creditmethod IN ('$'\t-- avoid stress over commas\n\t\t , 'M'\n\t\t , 'K'\n\t\t , 'C'\n\t\t ))\n AND ((SELECT COUNT(*)\n FROM raitem JOIN itemsite ON (itemsite_id=raitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n WHERE (raitem_rahead_id=rahead_id)) > 0)\n ) \n\t\t ORDER BY rahead_authdate,rahead_number; admin 2010-03-02 0 208 DisplayItemLocations DisplayItemLocations MetaSQL for the sample script and report called Display Item Locations. -- Group: DisplayItemLocations\n-- Name: DisplayItemLocations\n-- Notes: MetaSQL for the sample script and report called Display Item Locations.\nSELECT\n location_id, \n warehous_code, \n item_number, \n CASE WHEN (location_aisle || '-' || location_rack || '-' || location_bin || '-' || location_name) IS NULL THEN\n itemsite_location_comments\n ELSE location_aisle || '-' || location_rack || '-' || location_bin || '-' || location_name\n END AS location_name,\n formatlotserialnumber(itemloc_ls_id) AS lsnumber,\n \n CASE WHEN itemloc_qty IS NULL THEN formatqty(itemsite_qtyonhand)\n ELSE formatqty(itemloc_qty) END AS itemloc_qty, \n \n CASE WHEN ((itemloc_expiration<=startOfTime()) OR (itemloc_expiration >= endOfTime())) THEN text('N/A')\n WHEN (itemloc_expiration < CURRENT_DATE) THEN text('expired')\n \t ELSE CAST(formatdate(itemloc_expiration) AS text)\n END AS itemloc_expiration\nFROM item, warehous, itemsite\n LEFT OUTER JOIN itemloc ON (itemloc_itemsite_id = itemsite_id)\n LEFT OUTER JOIN location ON (itemloc_location_id = location_id)\nWHERE ((itemsite_item_id = item_id)\n \n and (itemsite_warehous_id = )\n \n and (itemsite_warehous_id = warehous_id)\n and (itemsite_loccntrl = 't' or itemsite_controlmethod = 'L')\n and (itemloc_expiration BETWEEN AND )) \nORDER BY warehous_code, item_number, itemloc_expiration, location_name, itemloc_qty; admin 2010-03-23 10 510 schedule load used by createPlannedOrdersByPlannerCode -- Group: schedule\n-- Name: load\n-- Notes: used by createPlannedOrdersByPlannerCode\n\nSELECT itemsite_id, item_number, item_descrip1, warehous_code\nFROM (SELECT CASE WHEN(item_type='L') THEN 0\n WHEN(item_type='M') THEN 1\n WHEN(item_type='F') THEN 2\n ELSE 3\n END AS orderid,\n bomLevelByItem(item_id) AS levelid,\n warehous_sequence, itemsite_id,\n item_number, item_descrip1, warehous_code\n FROM itemsite, item, plancode, whsinfo\n WHERE ( (itemsite_plancode_id=plancode_id)\n AND (itemsite_active)\n AND (item_active)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_planning_type=)\n\n AND (plancode_id=)\n\n AND (plancode_code ~ )\n\n\n AND (itemsite_warehous_id=)\n\n )\n ORDER BY warehous_sequence, warehous_code, orderid, levelid) AS data;\n admin 2011-01-31 0 518 PopulateProjectAccountingData poulate_project_accounting Run with Test Mode UNCHECKED, post transactions after enabling Project Accounting -- Group: PopulateProjectAccountingData\n-- Name: poulate_project_accounting\n-- Notes: Run with Test Mode UNCHECKED, post transactions after enabling Project Accounting\n\nSET search_path = 'xtmfg', 'xtbatch', 'te', 'xtprjaccnt', 'public', 'xtpos';\n\n--SELECT enablepackage(pkghead_id) \n-- FROM pkghead WHERE pkghead_name = 'xtprjaccnt';\n\nINSERT INTO metric\n (metric_name, metric_value, metric_module)\n VALUES\n ('PrjLaborAndOverhead','94','');\n\nINSERT INTO metric\n (metric_name, metric_value, metric_module)\n VALUES\n ('EnableProjectAccounting','t','');\n\nINSERT INTO api.project \n (number,name,description,owner,assigned_to,sales_orders,\n work_orders,purchase_orders,status,due,assigned,started)\n VALUES\n ('BLUEROSE','Project Bluerose','TTOYS special product initiative',\n 'admin','admin','t','t','t','In-Process',\n current_date + 365,current_date - 30,current_date);\n\nINSERT INTO api.salesorder\n (order_number,project_number,customer_number)\n VALUES\n ('80003','BLUEROSE','TTOYS'); \n\nINSERT INTO api.salesline\n (order_number,item_number,qty_ordered)\n VALUES\n ('80003','STOCKCAR1',100); \n\nUPDATE cohead set cohead_holdtype = 'N' WHERE cohead_number = '80003';\n\nSELECT issuelinebalancetoshipping('SO', coitem_id, current_date, 0, 0) FROM cohead, coitem \n WHERE coitem_cohead_id = cohead_id AND cohead_number = '80003';\n\nSELECT shipshipment(shiphead_id,current_date) FROM cohead, shiphead \n WHERE shiphead_order_id = cohead_id AND cohead_number = '80003';\n\nSELECT createbillingheader(cohead_id) FROM cohead WHERE cohead_number = '80003';\n\nSELECT selectbalanceforbilling(cohead_id) FROM cohead WHERE cohead_number = '80003';\n\nSELECT postbillingselection(cobmisc_id) FROM cobmisc, cohead \n WHERE cobmisc_cohead_id = cohead_id AND cohead_number = '80003';\n\nSELECT postinvoice(invchead_id) FROM cohead, invchead \n WHERE invchead_ordernumber = cohead_number AND cohead_number = '80003';\n admin 2011-04-06 10 4 apAging detail used by dspTimePhasedOpenAPItems Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: apAging\n-- Name: detail\n-- Notes: used by dspTimePhasedOpenAPItems\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT apaging_vend_id, apaging_vend_number, apaging_vend_name,\n SUM(apaging_total_val) AS apaging_total_val_sum,\n SUM(apaging_cur_val) AS apaging_cur_val_sum,\n SUM(apaging_thirty_val) AS apaging_thirty_val_sum,\n SUM(apaging_sixty_val) AS apaging_sixty_val_sum,\n SUM(apaging_ninety_val) AS apaging_ninety_val_sum,\n SUM(apaging_plus_val) AS apaging_plus_val_sum,\n 'curr' AS apaging_total_val_sum_xtnumericrole,\n 'curr' AS apaging_cur_val_sum_xtnumericrole,\n 'curr' AS apaging_thirty_val_sum_xtnumericrole,\n 'curr' AS apaging_sixty_val_sum_xtnumericrole,\n 'curr' AS apaging_ninety_val_sum_xtnumericrole,\n 'curr' AS apaging_plus_val_sum_xtnumericrole,\n 0 AS apaging_total_val_sum_xttotalrole,\n 0 AS apaging_cur_val_sum_xttotalrole,\n 0 AS apaging_thirty_val_sum_xttotalrole,\n 0 AS apaging_sixty_val_sum_xttotalrole,\n 0 AS apaging_ninety_val_sum_xttotalrole,\n 0 AS apaging_plus_val_sum_xttotalrole\n\nFROM apaging(, )\n\nWHERE (apaging_vend_id=)\n\nWHERE (apaging_vend_vendtype_id=)\n\nWHERE (apaging_vendtype_code ~ )\n\nGROUP BY apaging_vend_number,apaging_vend_id,apaging_vend_name\nORDER BY apaging_vend_number;\n admin 2013-07-26 0 62 apApplications detail used by dspAPApplications Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: apApplications\n-- Name: detail\n-- Notes: used by dspAPApplications\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT apapply.*,\n vend_number, vend_name,\n CASE \n WHEN apapply_source_doctype = 'K' THEN\n apapply_checkhead_id\n ELSE\n apapply_source_apopen_id \n END AS apapply_source_docnumber_xtidrole,\n CASE WHEN (apapply_source_doctype='C') THEN \n WHEN (apapply_source_doctype='K') THEN \n ELSE apapply_source_doctype\n END AS apapply_source_doctype_qtdisplayrole,\n CASE WHEN (apapply_target_doctype='D') THEN apapply_target_apopen_id\n WHEN (apapply_target_doctype='V') THEN (SELECT vohead_id\n FROM vohead\n WHERE (vohead_number=apapply_target_docnumber))\n END AS apapply_target_docnumber_xtidrole,\n CASE WHEN (apapply_target_doctype='C') THEN \n WHEN (apapply_target_doctype='D') THEN \n WHEN (apapply_target_doctype='V') THEN \n WHEN (apapply_target_doctype='K') THEN \n ELSE apapply_target_doctype\n END AS apapply_target_doctype_qtdisplayrole,\n formatDate(apapply_postdate) AS f_postdate,-- for openrpt\n formatMoney(apapply_amount) AS f_amount, -- for openrpt\n currConcat(apapply_curr_id) AS currAbbr,\n currtobase(apapply_curr_id,apapply_amount,apapply_postdate) AS base_applied,\n 'curr' AS apapply_amount_xtnumericrole,\n 'curr' AS base_applied_xtnumericrole,\n 0 AS base_applied_xttotalrole\nFROM apapply, vendinfo\nWHERE ( (apapply_vend_id=vend_id)\n AND (apapply_postdate BETWEEN AND )\n\n AND (apapply_source_doctype IN ())\n\n\n AND (vend_id=)\n\n AND (vend_vendtype_id=)\n\n AND (vend_vendtype_id IN (SELECT vendtype_id FROM vendtype\n WHERE (vendtype_code ~ )))\n\n )\nORDER BY apapply_postdate, apapply_source_docnumber;\n admin 2013-07-26 0 225 apOpenItems detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: apOpenItems\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT apopen_id, apopen_ponumber, apopen_docnumber,\n CASE WHEN (apopen_doctype='C') THEN \n WHEN (apopen_doctype='D') THEN \n WHEN (apopen_doctype='V') THEN \n ELSE \n END AS f_doctype,\n vend_number, vend_name,\n apopen_invcnumber AS invoicenumber,\n apopen_docdate, apopen_duedate, apopen_amount, apopen_status, \n\n formatDate(apopen_docdate) AS f_docdate, \n formatDate(apopen_duedate) AS f_duedate, \n formatMoney(apopen_amount) AS f_amount,\n formatMoney(apopen_paid - COALESCE(SUM(apapply_target_paid),0)) AS f_paid,\n formatMoney((apopen_amount - apopen_paid + COALESCE(SUM(apapply_target_paid),0)) * \n CASE WHEN apopen_doctype IN ('D', 'V') THEN 1 ELSE -1 \n END) AS f_balance,\n formatMoney((apopen_amount - apopen_paid + COALESCE(SUM(apapply_target_paid),0)) \n / apopen_curr_rate * (CASE WHEN apopen_doctype IN ('D', 'V') THEN 1 ELSE -1 \n END)) AS f_base_balance,\n\n apopen_paid - COALESCE(SUM(apapply_target_paid),0) AS paid,\n (apopen_amount - apopen_paid + COALESCE(SUM(apapply_target_paid),0)) * \n CASE WHEN apopen_doctype IN ('D', 'V') THEN 1 ELSE -1 \n END AS balance,\n currConcat(apopen_curr_id) AS currAbbr,\n (apopen_amount - apopen_paid + COALESCE(SUM(apapply_target_paid),0)) \n / apopen_curr_rate * (CASE WHEN apopen_doctype IN ('D', 'V') THEN 1 ELSE -1 \n END) AS base_balance,\n 'curr' AS apopen_amount_xtnumericrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole \n FROM apopen \n JOIN vendinfo ON (vend_id=apopen_vend_id)\n JOIN vendtype ON (vendtype_id=vend_vendtype_id)\n LEFT OUTER JOIN apapply ON (((apopen_id=apapply_target_apopen_id) \n OR (apopen_id=apapply_source_apopen_id)) \n AND (apapply_postdate > )) \n WHERE ( (COALESCE(apopen_closedate,date + integer '1')>) \n AND (CASE WHEN () THEN apopen_docdate ELSE apopen_distdate END<=)\n\n AND (apopen_vend_id=)\n\n\n AND (vendtype_id=)\n\n\n AND (vendtype_code~)\n\n AND (apopen_duedate BETWEEN AND ) ) \n GROUP BY apopen_id, apopen_ponumber, apopen_docnumber,apopen_doctype, apopen_invcnumber, apopen_docdate, \n apopen_duedate, apopen_docdate, apopen_amount, apopen_paid, apopen_curr_id, apopen_curr_rate,\n apopen.apopen_status, vend_number, vend_name\n ORDER BY apopen_docdate;\n admin 2013-07-26 0 3 allocations detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: allocations\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT source_id, type, order_number, item_number, totalqty, relievedqty, balanceqty, duedate,\n balanceqty AS runningbal,\n 'qty' AS totalqty_xtnumericrole,\n 'qty' AS relievedqty_xtnumericrole,\n 'qty' AS balanceqty_xtnumericrole,\n 0 AS runningbal_xtrunningrole,\n 'qty' AS runningbal_xtnumericrole,\n CASE WHEN (duedate < CURRENT_DATE) THEN 'error'\n END AS duedate_qtforegroundrole\nFROM\n(\nSELECT womatl_id AS source_id, TEXT('W/O') AS type,\n formatWoNumber(wo_id) AS order_number,\n paritem.item_number,\n itemuomtouom(component.itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) AS totalqty,\n itemuomtouom(component.itemsite_item_id, womatl_uom_id, NULL, womatl_qtyiss) AS relievedqty,\n itemuomtouom(component.itemsite_item_id, womatl_uom_id, NULL, noNeg(womatl_qtyreq - womatl_qtyiss)) AS balanceqty,\n womatl_duedate AS duedate\n\nFROM womatl, wo, itemsite AS parent, itemsite AS component, item AS paritem, item AS compitem\nWHERE ((womatl_wo_id=wo_id)\n AND (wo_status<>'C')\n AND (wo_itemsite_id=parent.itemsite_id)\n AND (womatl_itemsite_id=component.itemsite_id)\n AND (parent.itemsite_item_id=paritem.item_id)\n AND (component.itemsite_item_id=compitem.item_id)\n AND (compitem.item_type != 'T')\n AND (component.itemsite_warehous_id=)\n AND (component.itemsite_item_id=)\n\n AND (womatl_duedate <= (CURRENT_DATE + component.itemsite_leadtime))\n\n AND (womatl_duedate <= (CURRENT_DATE + ))\n\n AND (womatl_duedate <= )\n\n AND (womatl_duedate BETWEEN AND )\n\n)\n\nUNION \n\n-- Special handling for tools\nSELECT womatl_id AS source_id, TEXT('W/O') AS type,\n formatWoNumber(wo_id) AS order_number,\n paritem.item_number,\n itemuomtouom(component.itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) AS totalqty,\n COALESCE(sum(invhist_invqty),0) AS relievedqty,\n noNeg(itemuomtouom(component.itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) - COALESCE(sum(invhist_invqty),0)) AS balanceqty,\n womatl_duedate AS duedate\n\nFROM itemsite AS parent, itemsite AS component, item paritem, item AS compitem, wo, womatl\n LEFT OUTER JOIN womatlpost ON (womatl_id=womatlpost_womatl_id)\n LEFT OUTER JOIN invhist ON ((womatlpost_invhist_id=invhist_id)\n AND (invhist_invqty > 0))\nWHERE ((womatl_wo_id=wo_id)\n AND (wo_status<>'C')\n AND (wo_itemsite_id=parent.itemsite_id)\n AND (womatl_itemsite_id=component.itemsite_id)\n AND (parent.itemsite_item_id=paritem.item_id)\n AND (component.itemsite_item_id=compitem.item_id)\n AND (compitem.item_type='T')\n AND (component.itemsite_warehous_id=)\n AND (component.itemsite_item_id=)\n\n AND (womatl_duedate <= (CURRENT_DATE + component.itemsite_leadtime))\n\n AND (womatl_duedate <= (CURRENT_DATE + ))\n\n AND (womatl_duedate <= )\n\n AND (womatl_duedate BETWEEN AND )\n\n)\nGROUP BY womatl_id, wo_id, paritem.item_number, womatl_uom_id, womatl_qtyreq, womatl_duedate, component.itemsite_item_id\n\nUNION \nSELECT coitem_id AS source_id, TEXT('S/O') AS type,\n formatSoNumber(coitem_id) AS order_number,\n item_number,\n itemuomtouom(itemsite_item_id, coitem_qty_uom_id, NULL, coitem_qtyord) AS totalqty,\n itemuomtouom(itemsite_item_id, coitem_qty_uom_id, NULL, (coitem_qtyshipped + qtyAtShipping(coitem_id)) - coitem_qtyreturned) as relievedqty,\n itemuomtouom(itemsite_item_id, coitem_qty_uom_id, NULL, noNeg(coitem_qtyord - (coitem_qtyshipped + qtyAtShipping(coitem_id)) + coitem_qtyreturned)) AS balanceqty,\n coitem_scheddate as duedate\nFROM cohead, coitem, itemsite, item \nWHERE ( (coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_sold)\n AND (coitem_status NOT IN ('C','X'))\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=)\n\n AND (coitem_scheddate <= (CURRENT_DATE + itemsite_leadtime))\n\n AND (coitem_scheddate <= (CURRENT_DATE + ))\n\n AND (coitem_scheddate <= )\n\n AND (coitem_scheddate BETWEEN AND )\n\n)\n\n\nUNION \nSELECT toitem_id AS source_id, TEXT('T/O') AS type,\n TEXT(tohead_number) AS order_number,\n item_number,\n toitem_qty_ordered AS totalqty,\n (toitem_qty_shipped + qtyAtShipping(toitem_id)) as relievedqty,\n noNeg(toitem_qty_ordered - (toitem_qty_shipped + qtyAtShipping(toitem_id))) AS balanceqty,\n toitem_schedshipdate as duedate\nFROM tohead, toitem, itemsite, item \nWHERE ((toitem_tohead_id=tohead_id)\n AND (toitem_item_id=itemsite_item_id)\n AND (tohead_src_warehous_id=)\n AND (itemsite_item_id=item_id)\n AND (toitem_status NOT IN ('C','X'))\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=)\n\n AND (toitem_schedshipdate <= (CURRENT_DATE + itemsite_leadtime))\n\n AND (toitem_schedshipdate <= (CURRENT_DATE + ))\n\n AND (toitem_schedshipdate <= )\n\n AND (toitem_schedshipdate BETWEEN AND )\n\n)\n\n) AS dummy\n\nORDER BY duedate;\n admin 2013-07-26 0 291 addresses detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: addresses\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT ON (addr_country, addr_state, addr_city, addr_line1, addr_number) \n addr_id, addr_line1, addr_line2, addr_line3, \n addr_city, addr_state, addr_country, addr_postalcode \n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value::date AS char\n\nFROM addr \n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='ADDR') \n AND (charass_alias.charass_target_id=addr_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='ADDR') \n AND (charass_alias.charass_target_id=addr_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='ADDR') \n AND (charass_alias.charass_target_id=addr_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\nWHERE true\n \n AND addr_active \n\n\nORDER BY addr_country, addr_state, addr_city, addr_line1, addr_number;\n admin 2013-07-26 0 6 arApplications detail used by dspARApplications Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: arApplications\n-- Name: detail\n-- Notes: used by dspARApplications\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT arapply.*,\n cust_number, cust_name,\n CASE WHEN (arapply_source_doctype='C') THEN \n WHEN (arapply_source_doctype='R') THEN \n WHEN (arapply_fundstype='C') THEN \n WHEN (arapply_fundstype='T') THEN \n WHEN (arapply_fundstype='M') THEN \n WHEN (arapply_fundstype='V') THEN \n WHEN (arapply_fundstype='A') THEN \n WHEN (arapply_fundstype='D') THEN \n WHEN (arapply_fundstype='R') THEN \n WHEN (arapply_fundstype='K') THEN \n WHEN (arapply_fundstype='W') THEN \n WHEN (arapply_fundstype='O') THEN \n END AS doctype,\n CASE WHEN (arapply_source_doctype='C') THEN \n WHEN (arapply_source_doctype='R') THEN \n WHEN (arapply_source_doctype='K') THEN \n ELSE \n END AS sourcedoctype,\n CASE WHEN (arapply_target_doctype='D') THEN \n WHEN (arapply_target_doctype='I') THEN \n WHEN (arapply_target_doctype='K') THEN \n ELSE \n END AS targetdoctype,\n CASE WHEN (arapply_source_doctype IN ('C','R')) THEN TEXT(arapply_source_docnumber)\n ELSE arapply_refnumber\n END AS source,\n TEXT(arapply_target_docnumber) AS target,\n currConcat(arapply_curr_id) AS currAbbr,\n currtobase(arapply_curr_id,arapply_applied,arapply_postdate) AS base_applied,\n 'curr' AS arapply_applied_xtnumericrole,\n 'curr' AS base_applied_xtnumericrole,\n 0 AS base_applied_xttotalrole\nFROM arapply, custinfo\nWHERE ( (arapply_cust_id=cust_id)\n AND (arapply_postdate BETWEEN AND )\n AND (arapply_source_doctype IN (\n\n \n 'K', 'C', 'R'\n \n 'C', 'R'\n \n\n 'K'\n ))\n\n AND (cust_id=)\n\n AND (cust_custtype_id=)\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype\n WHERE (custtype_code ~ )))\n\n )\nORDER BY arapply_postdate, source;\n admin 2013-07-26 0 7 arHistory detail used by dspCustomerARHistory, dspCustomerInformation Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: arHistory\n-- Name: detail\n-- Notes: used by dspCustomerARHistory, dspCustomerInformation\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT aropen_id, applyid,\n sortdate, sortnumber, type,\n docnumber, open, documenttype,\n docdate, duedate, amount, balance, base_balance, currAbbr,\n formatBoolYN(open) AS f_open,\n formatDate(docdate) AS f_docdate, formatDate(duedate) AS f_duedate,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n type AS xtindentrole\n FROM (\n SELECT 0 AS type, aropen_id, -1 AS applyid,\n aropen_docdate AS sortdate, (aropen_docnumber || aropen_doctype) AS sortnumber,\n aropen_docnumber AS docnumber,\n aropen_open AS open,\n CASE WHEN (aropen_doctype='I') THEN \n WHEN (aropen_doctype='C') THEN \n WHEN (aropen_doctype='D') THEN \n WHEN (aropen_doctype='R') then \n ELSE \n END AS documenttype,\n aropen_docdate AS docdate,\n aropen_duedate AS duedate,\n aropen_amount AS amount,\n (aropen_amount - aropen_paid) AS balance,\n CASE WHEN (aropen_doctype IN ('C', 'R')) THEN\n (currtobase(aropen_curr_id,(aropen_amount - aropen_paid),aropen_docdate) * -1.0)\n ELSE currtobase(aropen_curr_id,(aropen_amount - aropen_paid),aropen_docdate)\n END AS base_balance,\n currConcat(aropen_curr_id) AS currAbbr\n FROM aropen\n WHERE ( (aropen_cust_id=) \n \n AND (aropen_docdate BETWEEN AND )\n )\n\n UNION\n SELECT 1 AS type, -1 AS aropen_id, arapply_source_aropen_id AS applyid,\n aropen_docdate AS sortdate, (aropen_docnumber || aropen_doctype) AS sortnumber,\n CASE WHEN (arapply_source_doctype IN ('C','R')) THEN arapply_source_docnumber\n WHEN (arapply_source_doctype='K') THEN arapply_refnumber\n ELSE \n END AS docnumber,\n NULL AS open,\n CASE WHEN (arapply_source_doctype='C') THEN \n WHEN (arapply_source_doctype='R') THEN \n WHEN (arapply_fundstype='C') THEN \n WHEN (arapply_fundstype='T') THEN \n WHEN (arapply_fundstype='M') THEN \n WHEN (arapply_fundstype='V') THEN \n WHEN (arapply_fundstype='A') THEN \n WHEN (arapply_fundstype='D') THEN \n WHEN (arapply_fundstype='R') THEN \n WHEN (arapply_fundstype='K') THEN \n WHEN (arapply_fundstype='W') THEN \n WHEN (arapply_fundstype='O') THEN \n END AS documenttype,\n COALESCE(cashrcpt_docdate, arapply_postdate) AS docdate,\n arapply_distdate AS duedate,\n arapply_applied AS amount,\n 0 AS balance,\n 0 AS base_balance,\n currConcat(arapply_curr_id) AS currAbbr\n FROM arapply JOIN aropen ON (arapply_target_aropen_id=aropen_id)\n LEFT OUTER JOIN cashrcptitem ON ( (arapply_reftype='CR') AND\n (arapply_ref_id=cashrcptitem_id) )\n LEFT OUTER JOIN cashrcpt ON (cashrcpt_id=cashrcptitem_cashrcpt_id)\n WHERE ( (arapply_target_doctype IN ('I', 'D'))\n AND (arapply_cust_id=)\n AND (aropen_cust_id=)\n \n AND (aropen_docdate BETWEEN AND )\n )\n\n UNION\n SELECT 2 AS type, -1 AS aropen_id, arapply_target_aropen_id AS applyid,\n aropen_docdate AS sortdate, (aropen_docnumber || aropen_doctype) AS sortnumber,\n arapply_target_docnumber AS docnumber,\n NULL AS open,\n CASE WHEN (arapply_target_doctype='I') THEN \n WHEN (arapply_target_doctype='D') THEN \n ELSE \n END AS documenttype,\n arapply_postdate AS docdate,\n arapply_distdate AS duedate,\n arapply_applied AS amount,\n 0 AS balance,\n 0 AS base_balance,\n currConcat(arapply_curr_id) AS currAbbr\n FROM arapply, aropen\n WHERE ( (arapply_source_doctype IN ('K', 'C', 'R'))\n AND (arapply_source_aropen_id=aropen_id)\n AND (arapply_cust_id=)\n AND (aropen_cust_id=)\n \n AND (aropen_docdate BETWEEN AND )\n )\n\n UNION\n SELECT 0 AS type, -1 AS aropen_id, -1 AS applyid,\n invchead_invcdate AS sortdate, (invchead_invcnumber || 'I') AS sortnumber,\n invchead_invcnumber AS docnumber,\n false AS open,\n AS documenttype,\n invchead_invcdate AS docdate,\n invchead_invcdate AS duedate,\n 0 AS amount,\n 0 AS balance,\n 0 AS base_balance,\n currConcat(invchead_curr_id) AS currAbbr\n FROM invchead\n WHERE ( (invchead_cust_id=) \n \n AND (invchead_invcdate BETWEEN AND )\n \n AND (invchead_posted)\n AND ((SELECT SUM(invcitem_price)\n FROM invcitem\n WHERE (invcitem_invchead_id=invchead_id))=0) )\n ) AS data\n ORDER BY sortdate, sortnumber, type;\n admin 2013-07-26 0 8 arOpenApplications detail used by applyARCreditMemo, cashReceipt Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: arOpenApplications\n-- Name: detail\n-- Notes: used by applyARCreditMemo, cashReceipt\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS applied_xtnumericrole,\n 'curr' AS pending_xtnumericrole,\n currConcat(balance_curr) AS balance_curr_qtdisplayrole,\n CASE WHEN (doctype='D') THEN \n WHEN (doctype='I') THEN \n WHEN (doctype='C') THEN \n WHEN (doctype='R') THEN \n END AS doctype_qtdisplayrole,\n CASE WHEN (doctype='C') THEN 'emphasis'\n WHEN (doctype='R') THEN 'altemphasis'\n END AS doctype_qtforegroundrole,\n\n CASE WHEN (pending - currtobase(cashrcpt_curr_id, applied, cashrcpt_distdate) - discount > balance) \n AND doctype IN ('I','D')\n AND NOT cashrcpt_posted\n\n CASE WHEN (pending - applied - discount > balance)\n \n THEN 'error' END AS qtforegroundrole\nFROM (SELECT\n aropen_id,\n\n COALESCE(s.cashrcptitem_id, -1) AS alt_id,\n COALESCE(cashrcpt_posted,FALSE) AS cashrcpt_posted,\n cashrcpt_curr_id,\n cashrcpt_distdate,\n\n aropen_doctype AS doctype,\n aropen_docnumber, aropen_ordernumber,\n aropen_docdate, aropen_duedate,\n (aropen_amount - aropen_paid - calcpendingarapplications(aropen_id)) *\n (CASE WHEN aropen_doctype IN ('C','R') THEN -1 ELSE 1 END ) AS balance,\n aropen_curr_id AS balance_curr,\n\n (SELECT COALESCE(SUM(p.cashrcptitem_amount), 0)\n FROM cashrcptitem p\n WHERE (p.cashrcptitem_aropen_id=aropen_id)\n AND (p.cashrcptitem_cashrcpt_id=))\n AS applied,\n (SELECT COALESCE(SUM(p.cashrcptitem_discount), 0)\n FROM cashrcptitem p\n WHERE (p.cashrcptitem_aropen_id=aropen_id)\n AND (p.cashrcptitem_cashrcpt_id=))\n AS discount,\n currConcat(cashrcpt_curr_id) AS applied_curr,\n\n COALESCE(arcreditapply_amount, 0) AS applied,\n 0 AS discount,\n currConcat(arcreditapply_curr_id) AS applied_curr,\n\n calcpendingarapplications(aropen_id) AS pending,\n currConcat(aropen_curr_id) AS pending_curr\n FROM aropen LEFT OUTER JOIN\n \n cashrcptitem s ON (s.cashrcptitem_aropen_id=aropen_id\n AND cashrcptitem_cashrcpt_id=)\n LEFT OUTER JOIN\n cashrcpt ON (cashrcptitem_cashrcpt_id = cashrcpt_id\n AND cashrcpt_id=)\n\n arcreditapply ON ((arcreditapply_source_aropen_id=)\n AND (arcreditapply_target_aropen_id=aropen_id) )\n\n WHERE (\n \n (s.cashrcptitem_aropen_id=aropen_id)\n\n (aropen_open)\n\n\n AND (aropen_doctype IN ('D', 'I'))\n\n\n AND (aropen_doctype IN ('D', 'I'))\n\n AND (aropen_cust_id=) )\n ) AS dummy\n ORDER BY aropen_duedate, balance;\n admin 2013-07-26 0 495 contactmerge delete Delete a contact Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: delete\n-- Notes: Delete a contact\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM cntct WHERE (cntct_id=);\n admin 2013-07-26 0 537 bankrec checks used by reconcileBankaccount Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: bankrec\n-- Name: checks\n-- Notes: used by reconcileBankaccount\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT COALESCE(SUM(amount),0.0) AS cleared_amount\n FROM ( SELECT COALESCE( bankrecitem_amount,\n currToLocal(bankaccnt_curr_id, gltrans_amount, gltrans_date) ) AS amount\n FROM (bankaccnt CROSS JOIN gltrans)\n JOIN bankrecitem ON ((bankrecitem_source='GL')\n AND (bankrecitem_source_id=gltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n WHERE ((gltrans_accnt_id=bankaccnt_accnt_id)\n AND (NOT gltrans_deleted)\n AND (NOT gltrans_rec)\n AND (gltrans_amount > 0)\n AND (gltrans_doctype != 'JP')\n AND (bankaccnt_id=) )\n UNION ALL\n SELECT COALESCE( bankrecitem_amount,\n currToLocal(bankaccnt_curr_id, sltrans_amount, sltrans_date) ) AS amount\n FROM (bankaccnt CROSS JOIN sltrans)\n JOIN bankrecitem ON ((bankrecitem_source='SL')\n AND (bankrecitem_source_id=sltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n WHERE ((sltrans_accnt_id=bankaccnt_accnt_id)\n AND (NOT sltrans_rec)\n AND (sltrans_amount > 0)\n AND (bankaccnt_id=) )\n UNION ALL\n SELECT CASE WHEN(bankadjtype_iscredit=false) THEN (bankadj_amount * -1) ELSE bankadj_amount END AS amount\n FROM bankadj, bankadjtype, bankrecitem\n WHERE ( (bankrecitem_source='AD')\n AND (bankrecitem_source_id=bankadj_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared)\n AND (bankadj_bankadjtype_id=bankadjtype_id)\n AND (NOT bankadj_posted)\n AND (((bankadjtype_iscredit=true) AND (bankadj_amount > 0)) OR ((bankadjtype_iscredit=false) AND (bankadj_amount < 0)))\n AND (bankadj_bankaccnt_id=) ) ) AS data;\n\nSELECT gltrans_id AS id, 1 AS altid,\n COALESCE(bankrecitem_cleared, FALSE) AS cleared,\n gltrans_date AS transdate,\n gltrans_doctype AS doc_type,\n gltrans_docnumber AS doc_number,\n gltrans_notes AS notes,\n (SELECT currConcat(COALESCE(checkhead_curr_id, baseCurrId()))) AS doc_curr,\n COALESCE(bankrecitem_curr_rate, checkhead_curr_rate, currRate(bankaccnt_curr_id, gltrans_date)) AS doc_exchrate,\n gltrans_amount AS base_amount,\n CASE WHEN (bankaccnt_curr_id=checkhead_curr_id) THEN\n COALESCE( bankrecitem_amount,\n checkhead_amount,\n currToLocal(bankaccnt_curr_id, gltrans_amount, gltrans_date) )\n ELSE\n COALESCE( bankrecitem_amount,\n currToLocal(bankaccnt_curr_id, gltrans_amount, gltrans_date) )\n END AS amount,\n gltrans_date AS sortdate,\n 'uomratio' AS doc_exchrate_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 'curr' AS amount_xtnumericrole\n FROM (bankaccnt CROSS JOIN gltrans)\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='GL')\n AND (bankrecitem_source_id=gltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n LEFT OUTER JOIN checkhead ON ((gltrans_doctype='CK')\n AND (gltrans_misc_id=checkhead_id))\n WHERE ((gltrans_accnt_id=bankaccnt_accnt_id)\n AND (NOT gltrans_deleted)\n AND (NOT gltrans_rec)\n AND (NOT COALESCE(checkhead_void, false))\n AND (gltrans_amount > 0)\n AND (gltrans_doctype != 'JP')\n AND (bankaccnt_id=) )\n UNION ALL\nSELECT sltrans_id AS id, 2 AS altid,\n COALESCE(bankrecitem_cleared, FALSE) AS cleared,\n sltrans_date AS transdate,\n sltrans_doctype AS doc_type,\n sltrans_docnumber AS doc_number,\n sltrans_notes AS notes,\n (SELECT currConcat(COALESCE(checkhead_curr_id, baseCurrId()))) AS doc_curr,\n COALESCE(bankrecitem_curr_rate, checkhead_curr_rate, currRate(bankaccnt_curr_id, sltrans_date)) AS doc_exchrate,\n sltrans_amount AS base_amount,\n CASE WHEN (bankaccnt_curr_id=checkhead_curr_id) THEN\n COALESCE( bankrecitem_amount,\n checkhead_amount,\n currToLocal(bankaccnt_curr_id, sltrans_amount, sltrans_date) )\n ELSE\n COALESCE( bankrecitem_amount,\n currToLocal(bankaccnt_curr_id, sltrans_amount, sltrans_date) )\n END AS amount,\n sltrans_date AS sortdate,\n 'uomratio' AS doc_exchrate_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 'curr' AS amount_xtnumericrole\n FROM (bankaccnt CROSS JOIN sltrans)\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='SL')\n AND (bankrecitem_source_id=sltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n LEFT OUTER JOIN checkhead ON ((sltrans_doctype='CK')\n AND (sltrans_misc_id=checkhead_id))\n WHERE ((sltrans_accnt_id=bankaccnt_accnt_id)\n AND (NOT sltrans_rec)\n AND (NOT COALESCE(checkhead_void, false))\n AND (sltrans_amount > 0)\n AND (bankaccnt_id=) )\n UNION ALL\nSELECT bankadj_id AS id, 3 AS altid,\n COALESCE(bankrecitem_cleared, FALSE) AS cleared,\n bankadj_date AS transdate,\n 'ADJ' AS doc_type,\n bankadj_docnumber AS doc_number,\n bankadjtype_name AS notes,\n (SELECT currConcat(bankadj_curr_id)) AS doc_curr,\n 1.0 AS doc_exchrate,\n CASE WHEN(bankadjtype_iscredit=false) THEN (bankadj_amount * -1.0) ELSE bankadj_amount END AS base_amount,\n CASE WHEN(bankadjtype_iscredit=false) THEN (bankadj_amount * -1.0) ELSE bankadj_amount END AS amount,\n bankadj_date AS sortdate,\n 'uomratio' AS doc_exchrate_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 'curr' AS amount_xtnumericrole\n FROM (bankadjtype CROSS JOIN bankadj)\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='AD')\n AND (bankrecitem_source_id=bankadj_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n WHERE ( (((bankadjtype_iscredit=true) AND (bankadj_amount > 0)) OR ((bankadjtype_iscredit=false) AND (bankadj_amount < 0)))\n AND (bankadj_bankadjtype_id=bankadjtype_id)\n AND (NOT bankadj_posted)\n AND (bankadj_bankaccnt_id=) )\nORDER BY sortdate;\n\n admin 2013-07-26 0 371 apOpenItems selectedpayments Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: apOpenItems\n-- Name: selectedpayments\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT apopen_id, apselect_id,\n (bankaccnt_name || '-' || bankaccnt_descrip) AS f_bank,\n (vend_number || '-' || vend_name) AS f_vendor,\n CASE WHEN (apopen_doctype='V') THEN \n WHEN (apopen_doctype='D') THEN \n END AS doctype,\n apopen_docnumber, apopen_ponumber, apselect_amount,\n apopen_invcnumber,\n currToBase(apselect_curr_id, apselect_amount, CURRENT_DATE) AS apselect_amount_base,\n currToBase(apselect_curr_id, apselect_amount, CURRENT_DATE) AS apselect_running_base,\n currConcat(apselect_curr_id) AS currAbbr,\n 'curr' AS apselect_amount_xtnumericrole,\n 'curr' AS apselect_amount_base_xtnumericrole,\n 'curr' AS apselect_running_base_xtnumericrole,\n 0 AS apselect_running_base_xtrunninginit,\n 1 AS apselect_running_base_xtrunningrole\nFROM apopen, apselect, vendinfo, bankaccnt\nWHERE ( (apopen_vend_id=vend_id)\n AND (apselect_apopen_id=apopen_id)\n AND (apselect_bankaccnt_id=bankaccnt_id) \n\n AND (bankaccnt_id=)\n\n\n AND (vend_id=)\n\n AND (vend_vendtype_id=)\n\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ )))\n\n )\nORDER BY bankaccnt_name, vend_number, apopen_docnumber;\n admin 2013-07-26 0 372 apOpenItems selectpayments Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: apOpenItems\n-- Name: selectpayments\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT * FROM (\nSELECT apopen_id, COALESCE(apselect_id, -1) AS apselectid,\n (vend_number || '-' || vend_name) AS vendor,\n CASE WHEN (apopen_doctype='V') THEN \n When (apopen_doctype='D') THEN \n END AS doctype,\n apopen_docnumber, apopen_ponumber,\n apopen_duedate,\n apopen_docdate, apopen_status,\n CASE WHEN (apopen_status = 'H') THEN 'error' END AS qtforegroundrole,\n (apopen_amount - apopen_paid - apCheckPending(apopen_id)) AS amount,\n ((apopen_amount - apopen_paid - apCheckPending(apopen_id)) / apopen_curr_rate) AS base_amount,\n ((apopen_amount - apopen_paid - apCheckPending(apopen_id)) / apopen_curr_rate) AS running_amount,\n COALESCE(apselect_amount, 0.0) AS selected,\n (COALESCE(apselect_amount, 0.0) / apopen_curr_rate) AS base_selected,\n (COALESCE(apselect_amount, 0.0) / apopen_curr_rate) AS running_selected,\n COALESCE(apselect_discount,0.0) AS discount,\n (COALESCE(apselect_discount,0.0) / apopen_curr_rate)AS base_discount,\n CASE WHEN (apopen_duedate < CURRENT_DATE) THEN 'error'\n WHEN(apopen_duedate > CURRENT_DATE) THEN 'emphasis'\n WHEN(CURRENT_DATE <= determineDiscountDate(apopen_terms_id, apopen_docdate)) THEN 'altemphasis'\n END AS apopen_duedate_qtforegroundrole, \n apopen_invcnumber,\n currConcat(apopen_curr_id) AS curr_concat,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS selected_xtnumericrole,\n 'curr' AS running_selected_xtnumericrole,\n 'curr' AS running_amount_xtnumericrole,\n 'curr' AS discount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 'curr' AS base_selected_xtnumericrole,\n 'curr' AS base_discount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 0 AS base_selected_xttotalrole,\n 0 AS base_discount_xttotalrole,\n 0 AS running_selected_xtrunninginit,\n 0 AS running_amount_xtrunninginit,\n 1 AS running_selected_xtrunningrole,\n 1 AS running_amount_xtrunningrole\nFROM vendinfo JOIN apopen ON (apopen_vend_id=vend_id)\n LEFT OUTER JOIN apselect ON (apselect_apopen_id=apopen_id)\nWHERE ( (apopen_open)\n AND (apopen_doctype IN ('V', 'D'))\n\n AND (vend_id=)\n\n AND (vend_vendtype_id=)\n\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ )))\n\n\n AND (apopen_duedate <= )\n\n AND (apopen_duedate BETWEEN AND )\n\n\n AND (apopen_curr_id=)\n\n)\nORDER BY apopen_duedate, (apopen_amount - apopen_paid) DESC) AS data\nWHERE (amount != 0);\n admin 2013-07-26 0 538 bankrec clearedbalance used by reconcileBankaccount Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: bankrec\n-- Name: clearedbalance\n-- Notes: used by reconcileBankaccount\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT (COALESCE(SUM(amount),0.0) + ) AS cleared_amount,\n AS end_amount,\n ( - ( + (COALESCE(SUM(amount),0.0)))) AS diff_amount,\n round( - ( + COALESCE(SUM(amount),0.0)), 2) AS diff_value\n FROM ( SELECT CASE WHEN (gltrans_amount > 0) THEN bankrecitem_amount * -1.0\n ELSE bankrecitem_amount END AS amount\n FROM bankaccnt, gltrans, bankrecitem\n WHERE ((gltrans_accnt_id=bankaccnt_accnt_id)\n AND (bankrecitem_source='GL')\n AND (bankrecitem_source_id=gltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared)\n AND (NOT gltrans_rec)\n AND (bankaccnt_id=) ) \n UNION ALL\n SELECT CASE WHEN (sltrans_amount > 0) THEN bankrecitem_amount * -1.0\n ELSE bankrecitem_amount END AS amount\n FROM bankaccnt, sltrans, bankrecitem\n WHERE ((sltrans_accnt_id=bankaccnt_accnt_id)\n AND (bankrecitem_source='SL')\n AND (bankrecitem_source_id=sltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared)\n AND (NOT sltrans_rec)\n AND (bankaccnt_id=) )\n UNION ALL\n SELECT CASE WHEN(bankadjtype_iscredit=true) THEN (bankadj_amount * -1) ELSE bankadj_amount END AS amount\n FROM bankadj, bankadjtype, bankrecitem\n WHERE ( (bankrecitem_source='AD')\n AND (bankrecitem_source_id=bankadj_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared)\n AND (bankadj_bankadjtype_id=bankadjtype_id)\n AND (NOT bankadj_posted)\n AND (bankadj_bankaccnt_id=) ) ) AS data;\n admin 2013-07-26 0 539 bankrec receipts used by reconcileBankaccount Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: bankrec\n-- Name: receipts\n-- Notes: used by reconcileBankaccount\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT COALESCE(SUM(amount),0.0) AS cleared_amount\n FROM ( SELECT COALESCE( bankrecitem_amount,\n (currToLocal(bankaccnt_curr_id, gltrans_amount, gltrans_date) * -1.0) ) AS amount\n FROM (bankaccnt CROSS JOIN gltrans)\n JOIN bankrecitem ON ((bankrecitem_source='GL')\n AND (bankrecitem_source_id=gltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n WHERE ((gltrans_accnt_id=bankaccnt_accnt_id)\n AND (NOT gltrans_deleted)\n AND (NOT gltrans_rec)\n AND (gltrans_amount < 0)\n AND (gltrans_doctype != 'JP')\n AND (bankaccnt_id=) )\n UNION ALL\n SELECT COALESCE( bankrecitem_amount,\n (currToLocal(bankaccnt_curr_id, sltrans_amount, sltrans_date) * -1.0) ) AS amount\n FROM (bankaccnt CROSS JOIN sltrans)\n JOIN bankrecitem ON ((bankrecitem_source='SL')\n AND (bankrecitem_source_id=sltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n WHERE ((sltrans_accnt_id=bankaccnt_accnt_id)\n AND (NOT sltrans_rec)\n AND (sltrans_amount < 0)\n AND (bankaccnt_id=) )\n UNION ALL\n SELECT CASE WHEN(bankadjtype_iscredit=true) THEN (bankadj_amount * -1) ELSE bankadj_amount END AS amount\n FROM bankrecitem, bankadj, bankadjtype\n WHERE ( (bankrecitem_source='AD')\n AND (bankrecitem_source_id=bankadj_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared)\n AND (bankadj_bankadjtype_id=bankadjtype_id)\n AND (NOT bankadj_posted)\n AND (((bankadjtype_iscredit=false) AND (bankadj_amount > 0)) OR (bankadjtype_iscredit=true AND (bankadj_amount < 0)))\n AND (bankadj_bankaccnt_id=) ) ) AS data;\n\nSELECT gltrans_id AS id, 1 AS altid,\n jrnluse_use AS use, gltrans_journalnumber AS jrnlnum,\n COALESCE(date(jrnluse_date), gltrans_date) AS f_jrnldate,\n COALESCE(bankrecitem_cleared, FALSE) AS cleared,\n gltrans_date AS f_date,\n gltrans_doctype AS doc_type,\n gltrans_docnumber AS docnumber,\n gltrans_notes AS notes,\n currConcat(COALESCE(cashrcpt_curr_id, baseCurrId())) AS doc_curr,\n COALESCE(bankrecitem_curr_rate, cashrcpt_curr_rate, currRate(bankaccnt_curr_id, gltrans_date)) AS doc_exchrate,\n (gltrans_amount * -1.0) AS base_amount,\n CASE WHEN (bankaccnt_curr_id=cashrcpt_curr_id) THEN\n COALESCE( bankrecitem_amount,\n cashrcpt_amount,\n (currToLocal(bankaccnt_curr_id, gltrans_amount, gltrans_date) * -1.0) )\n ELSE\n COALESCE( bankrecitem_amount,\n (currToLocal(bankaccnt_curr_id, gltrans_amount, gltrans_date) * -1.0) )\n END AS amount,\n COALESCE(date(jrnluse_date), gltrans_date) AS jrnldate,\n gltrans_date AS sortdate,\n 'uomratio' AS doc_exchrate_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 'curr' AS amount_xtnumericrole\n FROM bankaccnt\n JOIN gltrans ON (bankaccnt_accnt_id=gltrans_accnt_id)\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='GL')\n AND (bankrecitem_source_id=gltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n LEFT OUTER JOIN jrnluse ON (jrnluse_number=gltrans_journalnumber AND jrnluse_use='C/R')\n LEFT OUTER JOIN cashrcpt ON ((gltrans_source='A/R')\n AND (gltrans_doctype='CR')\n AND (gltrans_misc_id=cashrcpt_id))\n LEFT OUTER JOIN checkhead ON ((gltrans_doctype='CK')\n AND (gltrans_misc_id=checkhead_id))\n WHERE ((NOT gltrans_deleted)\n AND (NOT gltrans_rec)\n AND (NOT COALESCE(checkhead_void, false))\n AND (gltrans_amount < 0)\n AND (gltrans_doctype != 'JP')\n AND (bankaccnt_id=) )\n UNION ALL\nSELECT sltrans_id AS id, 2 AS altid,\n jrnluse_use AS use, sltrans_journalnumber AS jrnlnum,\n COALESCE(date(jrnluse_date), sltrans_date) AS f_jrnldate,\n COALESCE(bankrecitem_cleared, FALSE) AS cleared,\n sltrans_date AS f_date,\n sltrans_doctype AS doc_type,\n sltrans_docnumber AS docnumber,\n sltrans_notes AS notes,\n currConcat(COALESCE(cashrcpt_curr_id, baseCurrId())) AS doc_curr,\n COALESCE(bankrecitem_curr_rate, cashrcpt_curr_rate, currRate(bankaccnt_curr_id, sltrans_date)) AS doc_exchrate,\n (sltrans_amount * -1.0) AS base_amount,\n CASE WHEN (bankaccnt_curr_id=cashrcpt_curr_id) THEN\n COALESCE( bankrecitem_amount,\n cashrcpt_amount,\n (currToLocal(bankaccnt_curr_id, sltrans_amount, sltrans_date) * -1.0) )\n ELSE\n COALESCE( bankrecitem_amount,\n (currToLocal(bankaccnt_curr_id, sltrans_amount, sltrans_date) * -1.0) )\n END AS amount,\n COALESCE(date(jrnluse_date), sltrans_date) AS jrnldate,\n sltrans_date AS sortdate,\n 'uomratio' AS doc_exchrate_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 'curr' AS amount_xtnumericrole\n FROM bankaccnt\n JOIN sltrans ON (bankaccnt_accnt_id=sltrans_accnt_id)\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='SL')\n AND (bankrecitem_source_id=sltrans_id)\n AND (bankrecitem_bankrec_id=)\n AND (bankrecitem_cleared))\n LEFT OUTER JOIN jrnluse ON (jrnluse_number=sltrans_journalnumber AND jrnluse_use='C/R')\n LEFT OUTER JOIN cashrcpt ON ((sltrans_source='A/R')\n AND (sltrans_doctype='CR')\n AND (sltrans_misc_id=cashrcpt_id))\n LEFT OUTER JOIN checkhead ON ((sltrans_doctype='CK')\n AND (sltrans_misc_id=checkhead_id))\n WHERE ((NOT sltrans_rec)\n AND (NOT COALESCE(checkhead_void, false))\n AND (sltrans_amount < 0)\n AND (bankaccnt_id=) )\n UNION ALL\nSELECT bankadj_id AS id, 3 AS altid,\n '' AS use, NULL AS jrnlnum, bankadj_date AS f_jrnldate,\n COALESCE(bankrecitem_cleared, FALSE) AS cleared,\n bankadj_date AS f_date,\n 'ADJ' AS doc_type,\n bankadj_docnumber AS docnumber,\n bankadjtype_name AS notes,\n currConcat(bankadj_curr_id) AS doc_curr,\n 1.0 AS doc_exchrate,\n CASE WHEN(bankadjtype_iscredit=true) THEN (bankadj_amount * -1.0) ELSE bankadj_amount END AS base_amount,\n CASE WHEN(bankadjtype_iscredit=true) THEN (bankadj_amount * -1.0) ELSE bankadj_amount END AS amount,\n bankadj_date AS jrnldate,\n bankadj_date AS sortdate,\n 'uomratio' AS doc_exchrate_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 'curr' AS amount_xtnumericrole\n FROM (bankadjtype CROSS JOIN bankadj)\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='AD')\n AND (bankrecitem_source_id=bankadj_id)\n AND (bankrecitem_bankrec_id=))\n WHERE ( (((bankadjtype_iscredit=false) AND (bankadj_amount > 0)) OR ((bankadjtype_iscredit=true) AND (bankadj_amount < 0)))\n AND (bankadj_bankadjtype_id=bankadjtype_id)\n AND (NOT bankadj_posted)\n AND (bankadj_bankaccnt_id=) )\nORDER BY jrnldate, jrnlnum, sortdate;\n\n admin 2013-07-26 0 77 bankrecHistory reconciled Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: bankrecHistory\n-- Name: reconciled\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT -1 AS gltrans_id, bankrec_opendate AS gltrans_date, formatDate(bankrec_opendate) AS f_date,\n AS gltrans_docnumber, AS type, 0 AS sort, NULL AS gltrans_notes, \n bankrec_openbal AS amount, formatMoney(bankrec_openbal) AS f_amount,\n 'curr' AS amount_xtnumericrole,\n 0 AS xtindentrole\n FROM bankrec\n WHERE (bankrec_id=)\n \nUNION\n\n\nSELECT gltrans_id, gltrans_date, formatDate(gltrans_date) AS f_date,\n gltrans_docnumber,\n CASE WHEN gltrans_doctype = 'CK' THEN \n WHEN gltrans_doctype = 'CR' THEN \n ELSE END AS type,\n CASE WHEN gltrans_doctype = 'CK' THEN 1\n WHEN gltrans_doctype = 'CR' THEN 2\n ELSE '3' END AS sort,\n gltrans_notes AS notes,\n COALESCE( bankrecitem_amount,\n (currtolocal(bankaccnt_curr_id, gltrans_amount, gltrans_date) * -1.0) ) AS amount,\n formatMoney(COALESCE( bankrecitem_amount,\n (currtolocal(bankaccnt_curr_id, gltrans_amount, gltrans_date) * -1.0) ) ) AS f_amount,\n 'curr' AS amount_xtnumericrole,\n 1 AS xtindentrole\n FROM gltrans, bankrecitem \n JOIN bankrec ON (bankrecitem_bankrec_id=bankrec_id)\n JOIN bankaccnt ON (bankaccnt_id=bankrec_bankaccnt_id)\n WHERE ((bankrecitem_bankrec_id=)\n AND (bankrecitem_source='GL')\n AND (bankrecitem_source_id=gltrans_id) ) \n\nUNION\n\nSELECT sltrans_id, sltrans_date, formatDate(sltrans_date) AS f_date,\n sltrans_docnumber,\n CASE WHEN sltrans_doctype = 'CK' THEN \n WHEN sltrans_doctype = 'CR' THEN \n ELSE END AS type,\n CASE WHEN sltrans_doctype = 'CK' THEN 1\n WHEN sltrans_doctype = 'CR' THEN 2\n ELSE '3' END AS sort,\n sltrans_notes AS notes,\n COALESCE( bankrecitem_amount,\n (currtolocal(bankaccnt_curr_id, sltrans_amount, sltrans_date) * -1.0) ) AS amount,\n formatMoney(COALESCE( bankrecitem_amount,\n (currtolocal(bankaccnt_curr_id, sltrans_amount, sltrans_date) * -1.0) ) ) AS f_amount,\n 'curr' AS amount_xtnumericrole,\n 1 AS xtindentrole\n FROM sltrans, bankrecitem \n JOIN bankrec ON (bankrecitem_bankrec_id=bankrec_id)\n JOIN bankaccnt ON (bankaccnt_id=bankrec_bankaccnt_id)\n WHERE ((bankrecitem_bankrec_id=)\n AND (bankrecitem_source='SL')\n AND (bankrecitem_source_id=sltrans_id) ) \n\n\nUNION\n\nSELECT -1 AS gltrans_id, bankrec_enddate, formatDate(bankrec_enddate) AS f_date,\n , AS type, 7 AS sort, NULL, \n bankrec_endbal AS amount, formatMoney(bankrec_endbal) AS f_amount,\n 'curr' AS amount_xtnumericrole,\n 0 AS xtindentrole\n FROM bankrec\n WHERE (bankrec_id=)\n\nUNION\nSELECT -1, NULL, NULL, , NULL, 1, NULL, NULL, NULL, 'curr', 0 \nUNION\nSELECT -1, NULL, NULL, , NULL, 2, NULL, NULL, NULL, 'curr', 0 \nUNION\nSELECT -1, NULL, NULL, , NULL, 3, NULL, NULL, NULL, 'curr', 0 \n\n\nORDER BY sort, xtindentrole, type, f_date, gltrans_id\n admin 2013-07-26 0 78 bankrecHistory unreconciled Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: bankrecHistory\n-- Name: unreconciled\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT gltrans_id, gltrans_date, formatDate(gltrans_date) AS f_date,\n gltrans_docnumber,\n CASE WHEN gltrans_doctype = 'CK' THEN \n WHEN gltrans_doctype = 'CR' THEN \n ELSE END AS type,\n CASE WHEN gltrans_doctype = 'CK' THEN 1\n WHEN gltrans_doctype = 'CR' THEN 2\n ELSE '3' END AS sort,\n gltrans_notes AS notes,\n currtolocal(bankaccnt_curr_id,gltrans_amount,gltrans_date) * -1 AS amount,\n formatMoney(currtolocal(bankaccnt_curr_id,gltrans_amount,gltrans_date) * -1) AS f_amount,\n CASE WHEN gltrans_doctype = 'CK' THEN \n currtolocal(bankaccnt_curr_id,gltrans_amount,gltrans_date) * -1\n ELSE 0 END AS rtcheck,\n CASE WHEN gltrans_doctype = 'CR' THEN \n currtolocal(bankaccnt_curr_id,gltrans_amount,gltrans_date) * -1\n ELSE 0 END AS rtdep,\n CASE WHEN gltrans_doctype NOT IN ('CK','CR') THEN \n currtolocal(bankaccnt_curr_id,gltrans_amount,gltrans_date) * -1\n ELSE 0 END AS rtadj,\n 'curr' AS amount_xtnumericrole,\n 1 AS xtindentrole\n FROM gltrans\n JOIN bankaccnt ON (bankaccnt_accnt_id = gltrans_accnt_id)\n JOIN bankrec selrec ON ((selrec.bankrec_bankaccnt_id = bankaccnt_id)\n AND (selrec.bankrec_id=))\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='GL')\n\n AND (bankrecitem_source_id=gltrans_id))\n LEFT OUTER JOIN bankrec actrec ON (actrec.bankrec_id = bankrecitem_bankrec_id)\n LEFT OUTER JOIN checkhead ON ((gltrans_doctype='CK')\n AND (gltrans_misc_id=checkhead_id))\n\n WHERE ((COALESCE(actrec.bankrec_postdate,endoftime()) > COALESCE(selrec.bankrec_postdate,now()))\n AND (NOT gltrans_deleted)\n AND (NOT COALESCE(checkhead_void, false)))\n AND (gltrans_doctype != 'JP')\n\n WHERE (false)\n\n\nUNION\n\nSELECT sltrans_id, sltrans_date, formatDate(sltrans_date) AS f_date,\n sltrans_docnumber,\n CASE WHEN sltrans_doctype = 'CK' THEN \n WHEN sltrans_doctype = 'CR' THEN \n ELSE END AS type,\n CASE WHEN sltrans_doctype = 'CK' THEN 1\n WHEN sltrans_doctype = 'CR' THEN 2\n ELSE '3' END AS sort,\n sltrans_notes AS notes,\n currtolocal(bankaccnt_curr_id,sltrans_amount,sltrans_date) * -1 AS amount,\n formatMoney(currtolocal(bankaccnt_curr_id,sltrans_amount,sltrans_date) * -1) AS f_amount,\n CASE WHEN sltrans_doctype = 'CK' THEN \n currtolocal(bankaccnt_curr_id,sltrans_amount,sltrans_date) * -1\n ELSE 0 END AS rtcheck,\n CASE WHEN sltrans_doctype = 'CR' THEN \n currtolocal(bankaccnt_curr_id,sltrans_amount,sltrans_date) * -1\n ELSE 0 END AS rtdep,\n CASE WHEN sltrans_doctype NOT IN ('CK','CR') THEN \n currtolocal(bankaccnt_curr_id,sltrans_amount,sltrans_date) * -1\n ELSE 0 END AS rtadj,\n 'curr' AS amount_xtnumericrole,\n 1 AS xtindentrole\n FROM sltrans\n JOIN bankaccnt ON (bankaccnt_accnt_id = sltrans_accnt_id)\n JOIN bankrec selrec ON ((selrec.bankrec_bankaccnt_id = bankaccnt_id)\n AND (selrec.bankrec_id=))\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='SL')\n\n AND (bankrecitem_source_id=sltrans_id))\n LEFT OUTER JOIN bankrec actrec ON (actrec.bankrec_id = bankrecitem_bankrec_id)\n LEFT OUTER JOIN checkhead ON ((sltrans_doctype='CK')\n AND (sltrans_misc_id=checkhead_id))\n\n WHERE ((COALESCE(actrec.bankrec_postdate,endoftime()) > COALESCE(selrec.bankrec_postdate,now()))\n AND (NOT COALESCE(checkhead_void, false)))\n\nUNION\nSELECT -1, NULL, NULL, , NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL,'curr', 0 \nUNION\nSELECT -1, NULL, NULL, , NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, 'curr', 0 \nUNION\nSELECT -1, NULL, NULL, , NULL, 3, NULL, NULL, NULL, NULL, NULL, NULL, 'curr', 0\n\n\nORDER BY sort, xtindentrole, type, f_date, gltrans_id\n\n WHERE (false)\n\n admin 2013-07-26 0 498 contactmerge merge Merge contact selections Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: merge\n-- Notes: Merge contact selections\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntctmerge(\n src.cntctsel_cntct_id, \n trgt.cntctsel_cntct_id,\n ::boolean) AS result\nFROM cntctsel src, cntctsel trgt\nWHERE ((trgt.cntctsel_target)\nAND (NOT src.cntctsel_target));\n admin 2013-07-26 0 505 invoices print used by printInvoices Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: invoices\n-- Name: print\n-- Notes: used by printInvoices\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT invchead_id, invchead_id AS docid,\n invchead_invcnumber, invchead_invcnumber AS docnumber,\n invchead_ordernumber, invchead_posted AS posted,\n findCustomerForm(invchead_cust_id, 'I') AS reportname\n FROM invchead\n WHERE (NOT invchead_printed)\n AND (NOT invchead_posted)\n AND (checkInvoiceSitePrivs(invchead_id))\n\n AND (invchead_shipvia=) \n\nORDER BY invchead_ordernumber;\n admin 2013-07-26 0 294 bom detail used by dspIndentedBOM, dspSingleLevelBOM, dspSummarizedBOM Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: bom\n-- Name: detail\n-- Notes: used by dspIndentedBOM, dspSingleLevelBOM, dspSummarizedBOM\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n bomitem_item_id AS itemid, bomitem.*, item_number,\n invuom.uom_name AS invuomname, issueuom.uom_name AS issueuomname,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS invqtyfxd,\n (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS invqtyper,\n 'qty' AS bomitem_qtyfxd_xtnumericrole,\n 'qty' AS invqtyfxd_xtnumericrole,\n 'qtyper' AS bomitem_qtyper_xtnumericrole,\n 'qtyper' AS invqtyper_xtnumericrole,\n 'percent' AS bomitem_scrap_xtnumericrole,\n CASE WHEN COALESCE(bomitem_effective, startOfTime()) = startOfTime() \n THEN \n END AS bomitem_effective_qtdisplayrole,\n CASE WHEN COALESCE(bomitem_expires, endOfTime()) = endOfTime() \n THEN \n END AS bomitem_expires_qtdisplayrole,\n CASE WHEN (bomitem_expires < CURRENT_DATE) THEN 'expired'\n WHEN (bomitem_effective >= CURRENT_DATE) THEN 'future'\n WHEN (item_type='M') THEN 'altemphasis'\n END AS qtforegroundrole\n \n \n item_id AS itemid,\n \n bomdata_item_id AS itemid,\n \n *,'percent' AS bomdata_scrap_xtnumericrole,\n 'qtyper' AS bomdata_qtyreq_xtnumericrole,\n CASE WHEN COALESCE(bomdata_effective, startOfTime()) <=\n startOfTime() THEN \n END AS bomdata_effective_qtdisplayrole,\n CASE WHEN COALESCE(bomdata_expires, endOfTime()) >=\n endOfTime() THEN \n END AS bomdata_expires_qtdisplayrole,\n CASE WHEN (bomdata_expired) THEN 'expired'\n WHEN (bomdata_future) THEN 'future'\n END AS qtforegroundrole\n \n , bomdata_bomwork_level - 1 AS xtindentrole\n \n \nFROM \n bomitem(,),\n item, uom AS issueuom, uom AS invuom\n \n indentedBOM(,\n ,\n ,\n )\n \n summarizedBOM(,\n ,\n ,\n )\n JOIN item ON (bomdata_item_number=item_number)\n \nWHERE ((TRUE)\n\n AND (bomdata_item_id > 0)\n\n AND (bomitem_item_id=item_id)\n AND (item_inv_uom_id=invuom.uom_id)\n AND (bomitem_uom_id=issueuom.uom_id)\n \n AND (bomitem_expires > (CURRENT_DATE - ))\n \n AND (bomitem_expires > CURRENT_DATE)\n \n \n AND (bomitem_effective <= (CURRENT_DATE + ))\n \n AND (bomitem_effective <= CURRENT_DATE)\n \n\n )\n\n ORDER BY bomitem_seqnumber, bomitem_effective\n\n;\n admin 2013-07-26 0 192 bomItems detail used by bom, booItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: bomItems\n-- Name: detail\n-- Notes: used by bom, booItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT bomitem_id, item_id, *,\n (item_descrip1 || ' ' || item_descrip2) AS item_description,\n CASE WHEN (item_type='P') THEN text()\n WHEN (item_type='M') THEN text()\n WHEN (item_type='J') THEN text()\n WHEN (item_type='F') THEN text()\n WHEN (item_type='B') THEN text()\n WHEN (item_type='C') THEN text()\n WHEN (item_type='Y') THEN text()\n WHEN (item_type='R') THEN text()\n WHEN (item_type='S') THEN text()\n WHEN (item_type='T') THEN text()\n WHEN (item_type='A') THEN text()\n WHEN (item_type='O') THEN text()\n WHEN (item_type='L') THEN text()\n WHEN (item_type='K') THEN text()\n ELSE text()\n END AS itemtype,\n uom_name AS issueuom,\n CASE WHEN (bomitem_issuemethod = 'S') THEN \n WHEN (bomitem_issuemethod = 'L') THEN \n WHEN (bomitem_issuemethod = 'M') THEN \n ELSE \n END AS issuemethod,\n 'qty' AS bomitem_qtyfxd_xtnumericrole,\n 'qtyper' AS bomitem_qtyper_xtnumericrole,\n 'percent' AS bomitem_scrap_xtnumericrole,\n CASE WHEN (bomitem_effective = startOfTime()) THEN NULL\n ELSE bomitem_effective END AS effective,\n CASE WHEN (bomitem_expires = endOfTime()) THEN NULL\n ELSE bomitem_expires END AS expires,\n AS effective_xtnullrole,\n AS expires_xtnullrole,\n CASE WHEN (bomitem_expires <= CURRENT_DATE) THEN 'expired'\n WHEN (bomitem_effective > CURRENT_DATE) THEN 'future'\n WHEN (item_type='M') THEN 'altemphasis'\n END AS qtforegroundrole\n\nFROM bomitem(), item, uom, xtmfg.booitem\n\nFROM bomitem(, ), item, uom\n\nWHERE ((bomitem_item_id=item_id)\n AND (bomitem_uom_id=uom_id)\n\n AND (bomitem_expires > CURRENT_DATE)\n\n\n AND (bomitem_effective <= CURRENT_DATE)\n\n\n AND (booitem_id = )\n AND (bomitem_booitem_seq_id = booitem_seq_id)\n\n )\nORDER BY bomitem_seqnumber, bomitem_effective;\n admin 2013-07-26 0 327 orderActivityByProject detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: orderActivityByProject\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *, \n formatQty(qty) AS f_qty,\n formatMoney(value) AS f_value,\n 'curr' AS qty_xtnumericrole,\n 'curr' AS value_xtnumericrole\nFROM (\n\n----- QUOTES -----\nSELECT DISTINCT -1 AS id, \n 10 AS type,\n '0' AS subtype,\n 1 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL::text AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL::numeric AS qty,\n NULL::text AS uom,\n NULL::numeric AS value,\n 0 AS xtindentrole\n FROM quhead\n\n JOIN prj ON (prj_id=quhead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (quhead_prj_id = )\n\n AND (quhead_owner_username=)\n\n\nUNION ALL\n\nSELECT quhead_id AS id, \n 15 AS type,\n quhead_number AS subtype,\n 1 AS section,\n AS section_qtdisplayrole,\n quhead_number AS name,\n CASE WHEN (quhead_status = 'C') THEN \n \n WHEN (quhead_status = 'X') THEN\n \n WHEN (COALESCE(quhead_expire, current_date + 1) > current_date) THEN\n \n ELSE\n \n END AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n NULL AS value,\n 1 AS xtindentrole\n FROM quhead\n\n JOIN prj ON (prj_id=quhead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN quitem ON (quitem_quhead_id = quhead_id)\n WHERE (quhead_prj_id = )\n\n AND (quhead_owner_username=)\n\nGROUP BY quhead_id, quhead_number, quhead_status, quhead_expire, quhead_freight, quhead_misc\n\nUNION ALL\n\nSELECT quitem_id AS id, \n 17 AS type,\n quhead_number AS subtype,\n 1 AS section,\n AS section_qtdisplayrole,\n quitem_linenumber::text AS name, \n CASE WHEN (quhead_status = 'C') THEN \n \n WHEN (quhead_status = 'X') THEN\n \n WHEN (COALESCE(quhead_expire, current_date + 1) > current_date) THEN\n \n ELSE\n \n END AS status,\n item_number AS item,\n item_descrip1 || ' ' || item_descrip2 AS descrip,\n quitem_qtyord,\n uom_name AS uom,\n (quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio) AS value,\n 2 AS xtindentrole\n FROM quhead\n\n JOIN prj ON (prj_id=quhead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN quitem ON (quitem_quhead_id = quhead_id)\n JOIN uom ON (quitem_qty_uom_id = uom_id)\n JOIN itemsite ON (quitem_itemsite_id = itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\n WHERE (quhead_prj_id = )\n\n AND (quhead_owner_username=)\n\n\nUNION ALL\n\nSELECT quhead_id AS id, \n 18 AS type,\n quhead_number AS subtype,\n 1 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio)) AS value,\n 1 AS xtindentrole\n FROM quhead\n\n JOIN prj ON (prj_id=quhead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN quitem ON (quitem_quhead_id = quhead_id)\n WHERE (quhead_prj_id = )\n\n AND (quhead_owner_username=)\n\nGROUP BY quhead_id, quhead_number\n\nUNION ALL\n\nSELECT -1 AS id, \n 19 AS type,\n MAX(quhead_number) AS subtype,\n 1 AS section,\n AS section_qtdisplayrole,\n || ' ' || AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio)) AS value,\n 1 AS xtindentrole\n FROM quhead\n\n JOIN prj ON (prj_id=quhead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN quitem ON (quitem_quhead_id = quhead_id)\n WHERE (quhead_prj_id = )\n\n AND (quhead_owner_username=)\n\n\nUNION ALL\n\n------ SALES ORDERS ------\nSELECT DISTINCT -1 AS id, \n 20 AS type,\n '0' AS subtype,\n 2 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL::text AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL::numeric AS qty,\n NULL::text AS uom,\n NULL::numeric AS value,\n 0 AS xtindentrole\n FROM cohead\n\n JOIN prj ON (prj_id=cohead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (cohead_prj_id = )\n\nUNION ALL\n\nSELECT cohead_id AS id, \n 25 AS type,\n cohead_number::text AS subtype,\n 2 AS section,\n AS section_qtdisplayrole,\n cohead_number::text AS name,\n COALESCE((SELECT \n CASE WHEN (coitem_status = 'O') THEN\n \n WHEN (coitem_status = 'C') THEN\n \n ELSE\n \n END\n FROM \n (SELECT coitem_status,\n CASE \n WHEN (coitem_status = 'O') THEN 1\n WHEN (coitem_status = 'C') then 2\n ELSE 3\n END AS type\n FROM coitem\n WHERE (coitem_cohead_id=cohead_id)\n ORDER BY type\n LIMIT 1) AS sts) ,'O')\n AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n NULL AS value,\n 1 AS xtindentrole\n FROM cohead\n\n JOIN prj ON (prj_id=cohead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN coitem ON (coitem_cohead_id = cohead_id)\n WHERE (cohead_prj_id = )\nGROUP BY cohead_id, cohead_number\n\nUNION ALL\n\nSELECT coitem_id AS id, \n 27 AS type,\n cohead_number::text AS subtype,\n 2 AS section,\n AS section_qtdisplayrole,\n coitem_linenumber::text AS name, \n CASE WHEN (coitem_status = 'O') THEN\n \n WHEN (coitem_status = 'C') THEN\n \n WHEN (coitem_status = 'X') THEN\n \n END AS status,\n item_number AS item,\n item_descrip1 || ' ' || item_descrip2 AS descrip,\n coitem_qtyord,\n uom_name AS uom,\n (coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) AS value,\n 2 AS xtindentrole\n FROM cohead\n\n JOIN prj ON (prj_id=cohead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN coitem ON (coitem_cohead_id = cohead_id)\n JOIN uom ON (coitem_qty_uom_id = uom_id)\n JOIN itemsite ON (coitem_itemsite_id = itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\n WHERE (cohead_prj_id = )\n\nUNION ALL\n\nSELECT cohead_id AS id, \n 28 AS type,\n cohead_number::text AS subtype,\n 2 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio)) AS value,\n 1 AS xtindentrole\n FROM cohead\n\n JOIN prj ON (prj_id=cohead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN coitem ON (coitem_cohead_id = cohead_id)\n WHERE (cohead_prj_id = )\nGROUP BY cohead_id, cohead_number\n\nUNION ALL\n\nSELECT -1 AS id, \n 29 AS type,\n MAX(cohead_number::text) AS subtype,\n 2 AS section,\n AS section_qtdisplayrole,\n || ' ' || AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio)) AS value,\n 1 AS xtindentrole\n FROM cohead\n\n JOIN prj ON (prj_id=cohead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN coitem ON (coitem_cohead_id = cohead_id)\n WHERE (cohead_prj_id = )\n\nUNION ALL\n\n------ INVOICES -------\nSELECT DISTINCT -1 AS id, \n 30 AS type,\n '0' AS subtype,\n 3 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL::text AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL::numeric AS qty,\n NULL::text AS uom,\n NULL::numeric AS value,\n 0 AS xtindentrole\n FROM invchead\n\n JOIN prj ON (prj_id=invchead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (invchead_prj_id = )\n\nUNION ALL\n\nSELECT invchead_id AS id,\n 35 AS type,\n invchead_invcnumber::text AS subtype,\n 3 AS section,\n AS section_qtdisplayrole,\n invchead_invcnumber::text AS name,\n CASE WHEN (invchead_posted) THEN\n \n ELSE \n END AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n NULL AS value,\n 1 AS xtindentrole\n FROM invchead\n\n JOIN prj ON (prj_id=invchead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n WHERE (invchead_prj_id = )\nGROUP BY invchead_id, invchead_invcnumber, invchead_freight, invchead_misc_amount, invchead_posted\n\nUNION ALL\n\nSELECT invcitem_id AS id, \n 37 AS type,\n invchead_invcnumber::text AS subtype,\n 3 AS section,\n AS section_qtdisplayrole,\n invcitem_linenumber::text AS name, \n CASE WHEN (invchead_posted) THEN\n \n ELSE \n END AS status,\n COALESCE(item_number,invcitem_number) AS item,\n COALESCE(item_descrip1 || ' ' || item_descrip2,invcitem_descrip) AS descrip,\n invcitem_billed AS qty,\n uom_name AS uom,\n (invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio) AS value,\n 2 AS xtindentrole\n FROM invchead\n\n JOIN prj ON (prj_id=invchead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n LEFT OUTER JOIN item ON (invcitem_item_id = item_id)\n LEFT OUTER JOIN uom ON (invcitem_qty_uom_id = uom_id)\n WHERE (invchead_prj_id = )\n\nUNION ALL\n\nSELECT invchead_id AS id, \n 38 AS type,\n invchead_invcnumber::text AS subtype,\n 3 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio)) AS value,\n 1 AS xtindentrole\n FROM invchead\n\n JOIN prj ON (prj_id=invchead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n WHERE (invchead_prj_id = )\nGROUP BY invchead_id, invchead_invcnumber\n\nUNION ALL\n\nSELECT -1 AS id, \n 39 AS type,\n MAX(invchead_invcnumber::text) AS subtype,\n 3 AS section,\n AS section_qtdisplayrole,\n || ' ' || AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio)) AS value,\n 1 AS xtindentrole\n FROM invchead\n\n JOIN prj ON (prj_id=invchead_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n WHERE (invchead_prj_id = )\n\n\n\n\n\n\n\n\nUNION ALL\n\n\n\n------ WORK ORDERS -------\nSELECT DISTINCT -1 AS id, \n 40 AS type,\n '0' AS subtype,\n 4 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL::text AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL::numeric AS qty,\n NULL::text AS uom,\n NULL::numeric AS value,\n 0 AS xtindentrole\n FROM wo\n\n JOIN prj ON (prj_id=wo_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (wo_prj_id = )\n\nUNION ALL\n\nSELECT wo_id AS id, \n 45 AS type,\n formatWoNumber(wo_id) AS subtype,\n 4 AS section,\n AS section_qtdisplayrole,\n formatWoNumber(wo_id) AS name,\n CASE WHEN (wo_status = 'O') THEN\n \n WHEN (wo_status = 'E') THEN\n \n WHEN (wo_status = 'R') THEN\n \n WHEN (wo_status = 'I') THEN\n \n WHEN (wo_status = 'C') THEN\n \n END AS status,\n item_number AS item,\n item_descrip1 || ' ' || item_descrip2 AS descrip,\n wo_qtyord AS qty,\n uom_name AS uom,\n wo_postedvalue AS value,\n 1 AS xtindentrole\n FROM wo\n\n JOIN prj ON (prj_id=wo_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN itemsite ON (itemsite_id=wo_itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (wo_prj_id = )\n\nUNION ALL\n\nSELECT -1 AS id, \n 49 AS type,\n MAX(formatWoNumber(wo_id)) AS subtype,\n 4 AS section,\n AS section_qtdisplayrole,\n || ' ' || AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM(wo_postedvalue) AS value,\n 1 AS xtindentrole\n FROM wo\n\n JOIN prj ON (prj_id=wo_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (wo_prj_id = )\n\n\n\n\n\n\n UNION ALL\n\n UNION ALL\n\n\n------ PURCHASE REQUESTS ------\nSELECT DISTINCT -1 AS id, \n 50 AS type,\n '0' AS subtype,\n 5 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL::text AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL::numeric AS qty,\n NULL::text AS uom,\n NULL::numeric AS value,\n 0 AS xtindentrole\n FROM pr\n\n JOIN prj ON (prj_id=pr_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (pr_prj_id = )\n\nUNION ALL\n\nSELECT pr_id AS id, \n 55 AS type,\n pr_number::text || '-' || pr_subnumber::text AS subtype,\n 5 AS section,\n AS section_qtdisplayrole,\n pr_number::text || '-' || pr_subnumber::text AS name,\n AS status, \n item_number AS item,\n (item_descrip1 || ' ' || item_descrip2) AS descrip,\n pr_qtyreq AS qty,\n uom_name AS uom,\n stdcost(item_id) * pr_qtyreq AS value,\n 1 AS xtindentrole\n FROM pr\n\n JOIN prj ON (prj_id=pr_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN itemsite ON (itemsite_id = pr_itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\n JOIN uom ON (item_inv_uom_id = uom_id)\n WHERE (pr_prj_id=)\n\nUNION ALL\n\nSELECT -1 AS id, \n 59 AS type,\n MAX(pr_number::text || '-' || pr_subnumber::text) AS subtype,\n 5 AS section,\n AS section_qtdisplayrole,\n || ' ' || AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM(stdcost(item_id) * pr_qtyreq) AS value,\n 1 AS xtindentrole\n FROM pr\n\n JOIN prj ON (prj_id=pr_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n JOIN itemsite ON (itemsite_id = pr_itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\n WHERE (pr_prj_id = )\n\nUNION ALL\n\n------ PURCHASE ORDERS ------\nSELECT DISTINCT -1 AS id, \n 60 AS type,\n '0' AS subtype,\n 6 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL::text AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL::numeric AS qty,\n NULL::text AS uom,\n NULL::numeric AS value,\n 0 AS xtindentrole\n FROM poitem\n\n JOIN prj ON (prj_id=poitem_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (poitem_prj_id = )\n\nUNION ALL\n\nSELECT pohead_id AS id,\n 65 AS type,\n pohead_number::text AS subtype,\n 6 AS section,\n AS section_qtdisplayrole,\n pohead_number::text AS name,\n CASE WHEN (pohead_status = 'U') THEN\n \n WHEN (pohead_status = 'O') THEN\n \n WHEN (pohead_status = 'C') THEN\n \n END AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL AS uom,\n NULL AS value,\n 1 AS xtindentrole\n FROM pohead\n JOIN poitem ON (poitem_pohead_id = pohead_id)\n\n JOIN prj ON (prj_id=poitem_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (poitem_prj_id = )\nGROUP BY pohead_id, pohead_number, pohead_freight, pohead_status\n\nUNION ALL\n\nSELECT poitem_id AS id, \n 67 AS type,\n pohead_number::text AS subtype,\n 6 AS section,\n AS section_qtdisplayrole,\n poitem_linenumber::text AS name, \n CASE WHEN (poitem_status = 'U') THEN\n \n WHEN (poitem_status = 'O') THEN\n \n WHEN (poitem_status = 'C') THEN\n \n END AS status,\n COALESCE(item_number,poitem_vend_item_number) AS item,\n COALESCE((item_descrip1 || ' ' || item_descrip2),poitem_vend_item_descrip) AS descrip,\n poitem_qty_ordered,\n poitem_vend_uom AS uom,\n (poitem_qty_ordered * poitem_unitprice) AS value,\n 2 AS xtindentrole\n FROM pohead\n JOIN poitem ON (poitem_pohead_id = pohead_id)\n\n JOIN prj ON (prj_id=poitem_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id = item_id)\n WHERE (poitem_prj_id = )\n\nUNION ALL\n\nSELECT pohead_id AS id, \n 68 AS type,\n pohead_number::text AS subtype,\n 6 AS section,\n AS section_qtdisplayrole,\n AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM(poitem_qty_ordered * poitem_unitprice) AS value,\n 1 AS xtindentrole\n FROM pohead\n JOIN poitem ON (poitem_pohead_id = pohead_id)\n\n JOIN prj ON (prj_id=poitem_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (poitem_prj_id = )\nGROUP BY pohead_id, pohead_number\n\nUNION ALL\n\nSELECT -1 AS id, \n 69 AS type,\n MAX(pohead_number::text) AS subtype,\n 6 AS section,\n AS section_qtdisplayrole,\n || ' ' || AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM(poitem_qty_ordered * poitem_unitprice) AS value,\n 1 AS xtindentrole\n FROM pohead\n JOIN poitem ON (poitem_pohead_id = pohead_id)\n\n JOIN prj ON (prj_id=poitem_prj_id\n AND ((prj_owner_username=) OR (prj_username=)))\n\n WHERE (poitem_prj_id = )\n\n\n\n) data\nORDER BY section, subtype, type, id;\n admin 2013-07-26 0 332 poHistory detail used by dspPoHistory Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: poHistory\n-- Name: detail\n-- Notes: used by dspPoHistory\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT poitem_id, poitem.*,\n COALESCE(item_number, ) AS itemnumber,\n COALESCE(uom_name, ) AS uomname,\n CASE WHEN (LENGTH(TRIM(BOTH ' ' FROM poitem_vend_item_descrip)) <= 0)\n THEN(item_descrip1 || ' ' || item_descrip2)\n ELSE poitem_vend_item_descrip\n END AS itemdescription,\n 'qty' AS poitem_qty_ordered_xtnumericrole,\n 'qty' AS poitem_qty_received_xtnumericrole,\n 'qty' AS poitem_qty_returned_xtnumericrole\nFROM poitem LEFT OUTER JOIN\n ( itemsite JOIN item\n ON (itemsite_item_id=item_id) JOIN uom ON (item_inv_uom_id=uom_id))\n ON (poitem_itemsite_id=itemsite_id)\nWHERE (poitem_pohead_id=)\nORDER BY poitem_linenumber;\n admin 2013-07-26 0 290 pricelist detail This query displays price lists and the data used to perform price calculations. It avoids price calculations where possible. The UNION sets the sourcecode column to show how the price list entry was derived: customer vs customer type vs customer type regex ..., etc. Then the outer query modifies the sourcecode to indicate item vs product category. TODO: possible improvements include removing OUTER JOINs with uom table Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: pricelist\n-- Name: detail\n-- Notes: This query displays price lists and the data used to perform\n-- price calculations. It avoids price calculations where possible.\n-- The UNION sets the sourcecode column to show how the price list entry\n-- was derived: customer vs customer type vs customer type regex ..., etc.\n-- Then the outer query modifies the sourcecode to indicate\n-- item vs product category.\n-- TODO: possible improvements include removing OUTER JOINs with uom table\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT sourcecode + CASE WHEN source='P' THEN 10 ELSE 0 END AS source,\n sourceid, schedulename, type,\n invqty AS qty_break,\n CASE WHEN (qtybreak = -1) THEN \n END AS qty_break_qtdisplayrole,\n invuom.uom_name AS qty_uom,\n price,\n currConcat(curr_id) AS currency,\n priceuom.uom_name AS price_uom,\n currToCurr(curr_id, ,\n price, ) AS base_price,\n discountpercent,\n discountfixed,\n CASE WHEN (price_type='N') THEN \n WHEN (price_type='D') THEN \n WHEN (price_type='M') THEN \n END AS price_type,\n 'qty' AS qty_break_xtnumericrole,\n 'salesprice' AS price_xtnumericrole,\n 'salesprice' AS base_price_xtnumericrole,\n 'percent' AS discountpercent_xtnumericrole,\n 'salesprice' AS discountfixed_xtnumericrole\nFROM ( \n\n SELECT 4 AS sourcecode,\n ipsitem_id AS sourceid,\n CASE WHEN (ipsitem_item_id=) THEN 'I'\n WHEN (ipsitem_prodcat_id=) THEN 'P'\n ELSE 'Error'\n END AS source,\n ipshead_id,\n ipshead_name AS schedulename,\n ( || '-' || sale_name) AS type,\n CASE WHEN (ipsitem_item_id=) THEN itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak)\n ELSE ipsitem_qtybreak\n END AS invqty,\n ipsitem_qtybreak AS qtybreak,\n CASE WHEN (ipsitem_type = 'N') THEN\n (ipsitem_price * itemuomtouomratio(, NULL, ipsitem_price_uom_id)) * iteminvpricerat(ipsitem_item_id)\n WHEN (ipsitem_type = 'D') THEN\n noNeg( - ( * ipsitem_discntprcnt) - ipsitem_fixedamtdiscount)\n WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND fetchMetricBool('Long30Markups')) THEN\n ( / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount)\n WHEN (ipsitem_type = 'M') THEN\n ( + ( * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount)\n ELSE 0.00\n END AS price,\n ipsitem_qty_uom_id AS qtybreak_uom_id,\n ipsitem_price_uom_id AS price_uom_id,\n ipsitem_discntprcnt AS discountpercent,\n ipsitem_fixedamtdiscount AS discountfixed,\n ipshead_curr_id AS curr_id,\n ipsitem_type AS price_type\n FROM sale JOIN ipshead ON (ipshead_id=sale_ipshead_id)\n JOIN ipsiteminfo ON (ipsitem_ipshead_id=ipshead_id)\n JOIN ipsass ON (ipsass_ipshead_id=ipshead_id)\n WHERE ((ipsitem_item_id=) OR (ipsitem_prodcat_id=))\n AND ( BETWEEN sale_startdate AND sale_enddate)\n AND ( ((COALESCE(ipsass_shipto_id, -1) > 0) AND (ipsass_shipto_id=))\n OR ((COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND ( ~ ipsass_shipto_pattern))\n OR (ipsass_cust_id=)\n OR (ipsass_custtype_id=)\n OR ((COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND ( ~ ipsass_custtype_pattern)) )\n\n UNION\n\n SELECT CASE WHEN (COALESCE(ipsass_shipto_id, -1) > 0) THEN 6\n WHEN (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) THEN 7\n WHEN (COALESCE(ipsass_cust_id, -1) > 0) THEN 1\n WHEN (COALESCE(ipsass_custtype_id, -1) > 0) THEN 2\n WHEN (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) THEN 3\n ELSE 99\n END AS sourcecode,\n ipsitem_id AS sourceid,\n CASE WHEN (ipsitem_item_id=) THEN 'I'\n WHEN (ipsitem_prodcat_id=) THEN 'P'\n ELSE 'Error'\n END AS source,\n ipshead_id,\n ipshead_name AS schedulename,\n CASE WHEN (COALESCE(ipsass_shipto_id, -1) > 0) THEN \n WHEN (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) THEN \n WHEN (COALESCE(ipsass_cust_id, -1) > 0) THEN \n WHEN (COALESCE(ipsass_custtype_id, -1) > 0) THEN \n WHEN (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) THEN \n ELSE 'Error'\n END AS type,\n CASE WHEN (ipsitem_item_id=) THEN itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak)\n ELSE ipsitem_qtybreak\n END AS invqty,\n ipsitem_qtybreak AS qtybreak,\n CASE WHEN ipsitem_type = 'N' THEN (ipsitem_price * itemuomtouomratio(, NULL, ipsitem_price_uom_id)) *\n iteminvpricerat(ipsitem_item_id)\n WHEN ipsitem_type = 'D' THEN noNeg( - ( * ipsitem_discntprcnt) - ipsitem_fixedamtdiscount)\n WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND fetchMetricBool('Long30Markups')) THEN\n ( / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount)\n WHEN (ipsitem_type = 'M') THEN\n ( + ( * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount)\n ELSE 0.00\n END AS price,\n ipsitem_qty_uom_id AS qtybreak_uom_id,\n ipsitem_price_uom_id AS price_uom_id,\n ipsitem_discntprcnt AS discountpercent,\n ipsitem_fixedamtdiscount AS discountfixed,\n ipshead_curr_id AS curr_id,\n ipsitem_type AS price_type\n FROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n JOIN ipsiteminfo ON (ipsitem_ipshead_id=ipshead_id)\n WHERE ((ipsitem_item_id=) OR (ipsitem_prodcat_id=))\n AND ( BETWEEN ipshead_effective AND ipshead_expires)\n AND ( ((COALESCE(ipsass_shipto_id, -1) > 0) AND (ipsass_shipto_id=))\n OR ((COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND ( ~ ipsass_shipto_pattern))\n OR (ipsass_cust_id=)\n OR (ipsass_custtype_id=)\n OR ((COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND ( ~ ipsass_custtype_pattern))\n )\n\n UNION\n\n SELECT 5 AS sourcecode,\n item_id AS sourceid,\n NULL AS source,\n NULL AS ipshead_id,\n '' AS schedulename,\n AS type,\n -1 AS invqty,\n -1 AS qtybreak,\n (item_listprice - (item_listprice * cust_discntprcnt)) AS price,\n item_inv_uom_id AS qtybreak_uom_id,\n item_price_uom_id AS price_uom_id,\n cust_discntprcnt AS discountpercent,\n NULL AS discountfixed,\n baseCurrId() AS curr_id,\n NULL AS price_type\n FROM item, custinfo\n WHERE (item_sold\n AND (NOT item_exclusive)\n AND (item_id=)\n AND (cust_id=) ) ) AS data\n\n LEFT OUTER JOIN uom AS invuom ON (invuom.uom_id=qtybreak_uom_id)\n LEFT OUTER JOIN uom AS priceuom ON (priceuom.uom_id=price_uom_id)\n\n ORDER BY price_uom_id, price;\n admin 2013-07-26 0 481 postJournals post Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: postJournals\n-- Name: post\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT * \nFROM postJournals(\nARRAY[\n\n \n,\n \n \n\n], \n, \n, \n) AS result;\n admin 2013-07-26 0 493 bookings detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: bookings\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT coitem_id AS id, coitem_cohead_id AS altId,\n formatSoLineNumber(coitem_id) AS f_linenumber,\n getSoSchedDate(cohead_id) AS sort_scheddate,\n coitem.*, cohead.*,\n cust_number, cust_name,\n item_number, item_descrip1, (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n uom_name,\n warehous_code,\n qtyAtShipping(coitem_id) AS qtyatshipping,\n-- TODO - not needed, remove? (very slow)\n-- qtyAvailable(itemsite_id, coitem_scheddate) AS qtyavailable,\n-- (qtyAvailable(itemsite_id, coitem_scheddate) < 0.0) AS stockout,\n-- CASE WHEN (itemsite_useparams) THEN (qtyAvailable(itemsite_id, coitem_scheddate) <= itemsite_reorderlevel)\n-- ELSE (qtyAvailable(itemsite_id, coitem_scheddate) <= 0.0)\n-- END AS reorder,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS qtybalance,\n currtobase(cohead_curr_id, coitem_price, cohead_orderdate) AS baseunitprice,\n round((coitem_qtyord * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio), 2) AS extprice,\n round((coitem_qtyord * coitem_qty_invuomratio) *\n (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) AS baseextprice,\n round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio), 2) AS extpricebalance,\n round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) AS baseextpricebalance,\n curr_abbr AS currAbbr,\n-- TODO - not needed, remove? (very slow)\n-- CASE WHEN (qtyAvailable(itemsite_id, coitem_scheddate) < 0.0) THEN 'error'\n-- WHEN itemsite_useparams AND (qtyAvailable(itemsite_id, coitem_scheddate) <= itemsite_reorderlevel) THEN 'warning'\n-- WHEN NOT itemsite_useparams AND (qtyAvailable(itemsite_id, coitem_scheddate) <= 0.0) THEN 'warning'\n-- END AS qtyavailable_qtforegroundrole,\n 'qty' AS coitem_qtyord_xtnumericrole,\n 'qty' AS coitem_qtyshipped_xtnumericrole,\n 'qty' AS coitem_qtyreturned_xtnumericrole,\n 'qty' AS qtyatshipping_xtnumericrole,\n 'qty' AS qtybalance_xtnumericrole,\n 'qty' AS qtyavailable_xtnumericrole,\n 'salesprice' AS coitem_price_xtnumericrole,\n 'salesprice' AS baseunitprice_xtnumericrole,\n 'curr' AS extprice_xtnumericrole,\n 'curr' AS baseextprice_xtnumericrole,\n 'curr' AS extpricebalance_xtnumericrole,\n 'curr' AS baseextpricebalance_xtnumericrole,\n 0 AS coitem_qtyord_xttotalrole,\n 0 AS coitem_qtyshipped_xttotalrole,\n 0 AS coitem_qtyreturned_xttotalrole,\n 0 AS qtybalance_xttotalrole,\n 0 AS baseextprice_xttotalrole,\n 0 AS baseextpricebalance_xttotalrole\n FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=coitem_qty_uom_id)\n JOIN curr_symbol ON (curr_id=cohead_curr_id)\n WHERE ( (coitem_status<>'X')\n \n AND (coitem_cohead_id=)\n \n \n AND (coitem_status<>'C')\n \n \n AND (cohead_orderdate BETWEEN AND )\n \n\n \n AND (cohead_salesrep_id=)\n \n \n AND (cohead_shipto_id=)\n \n \n AND (cohead_cust_id=)\n \n AND (cust_custtype_id=)\n \n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ )))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=)))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ ) )) )\n \n\n \n AND (itemsite_item_id=)\n \n AND (item_prodcat_id=)\n \n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ )))\n \n\n \n AND (itemsite_warehous_id=)\n \n )\n\n\n ORDER BY sort_scheddate, cohead_number, coitem_linenumber, coitem_subnumber\n\n ORDER BY cohead_orderdate, cohead_number, coitem_linenumber, coitem_subnumber\n\n ORDER BY cohead_number, coitem_linenumber, coitem_subnumber\n\n;\n admin 2013-07-26 0 43 quotes detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: quotes\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT quhead.*, firstline(quhead_ordercomments) AS notes, quhead_id AS id,\n CASE WHEN quhead_status = 'O' THEN \n WHEN quhead_status = 'C' THEN \n ELSE END AS quhead_status_qtdisplayrole,\n\n cust_id, cust_number, cust_name,\n\n ( SELECT MIN(quitem_scheddate)\n FROM quitem\n WHERE (quitem_quhead_id=quhead_id) ) AS min_scheddate,\n CASE WHEN (quhead_expire < current_date) THEN\n 'error'\n END AS quhead_expire_qtforegroundrole\nFROM quhead\n\n LEFT OUTER \n\n JOIN custinfo ON (quhead_cust_id=cust_id)\nWHERE (checkQuoteSitePrivs(quhead_id, ))\n \n AND (quhead_owner_username=) \n\n AND (quhead_owner_username ~ ) \n\n\n AND (quhead_status IN ('C','O'))\n\n AND (quhead_status NOT IN ('C','X'))\n\n\n AND ((quhead_expire IS NULL) OR (quhead_expire >= CURRENT_DATE))\n\n\n AND (quhead_cust_id=)\n\n\n AND (cust_custtype_id=)\n\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ )))\n\n\n AND (quhead_custponumber=)\n\n\n AND (quhead_quotedate >= )\n\n\n AND (quhead_quotedate <= )\n\n\n AND (quhead_salesrep_id = )\n\n\n AND (quhead_id = )\n\n\nORDER BY cust_number, quhead_number;\n\nORDER BY quhead_number;\n\n\n admin 2013-07-26 0 571 salesAccounts detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: salesAccounts\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT salesaccnt_id,\n CASE WHEN (salesaccnt_warehous_id=-1) THEN \n ELSE (SELECT warehous_code FROM whsinfo WHERE (warehous_id=salesaccnt_warehous_id))\n END AS warehouscode,\n CASE WHEN ((salesaccnt_custtype_id=-1) AND (salesaccnt_custtype='.*')) THEN \n WHEN (salesaccnt_custtype_id=-1) THEN salesaccnt_custtype\n ELSE (SELECT custtype_code FROM custtype WHERE (custtype_id=salesaccnt_custtype_id))\n END AS custtypecode,\n CASE WHEN (salesaccnt_shipzone_id=-1) THEN \n ELSE (SELECT shipzone_name FROM shipzone WHERE (shipzone_id=salesaccnt_shipzone_id))\n END AS shipzonecode,\n CASE WHEN (salesaccnt_saletype_id=-1) THEN \n ELSE (SELECT saletype_code FROM saletype WHERE (saletype_id=salesaccnt_saletype_id))\n END AS saletypecode,\n CASE WHEN ((salesaccnt_custtype_id=-1) AND (salesaccnt_custtype='.*')) THEN \n WHEN (salesaccnt_custtype_id=-1) THEN salesaccnt_custtype\n ELSE (SELECT custtype_code FROM custtype WHERE (custtype_id=salesaccnt_custtype_id))\n END AS custtypecode,\n CASE WHEN ((salesaccnt_prodcat_id=-1) AND (salesaccnt_prodcat='.*')) THEN \n WHEN (salesaccnt_prodcat_id=-1) THEN salesaccnt_prodcat\n ELSE (SELECT prodcat_code FROM prodcat WHERE (prodcat_id=salesaccnt_prodcat_id))\n END AS prodcatcode,\n CASE WHEN (salesaccnt_sales_accnt_id IS NULL) THEN \n WHEN (salesaccnt_sales_accnt_id = -1) THEN \n ELSE formatGLAccount(salesaccnt_sales_accnt_id) END AS salesaccount,\n CASE WHEN (salesaccnt_credit_accnt_id IS NULL) THEN \n WHEN (salesaccnt_credit_accnt_id = -1) THEN \n ELSE formatGLAccount(salesaccnt_credit_accnt_id) END AS creditaccount,\n CASE WHEN (salesaccnt_cos_accnt_id IS NULL) THEN \n WHEN (salesaccnt_cos_accnt_id = -1) THEN \n ELSE formatGLAccount(salesaccnt_cos_accnt_id) END AS cosaccount,\n CASE WHEN (salesaccnt_returns_accnt_id IS NULL) THEN \n WHEN (salesaccnt_returns_accnt_id = -1) THEN \n ELSE formatGLAccount(salesaccnt_returns_accnt_id) END AS returnsaccount,\n CASE WHEN (salesaccnt_cor_accnt_id IS NULL) THEN \n WHEN (salesaccnt_cor_accnt_id = -1) THEN \n ELSE formatGLAccount(salesaccnt_cor_accnt_id) END AS coraccount,\n CASE WHEN (salesaccnt_cow_accnt_id IS NULL) THEN \n WHEN (salesaccnt_cow_accnt_id = -1) THEN \n ELSE formatGLAccount(salesaccnt_cow_accnt_id) END AS cowaccount\nFROM salesaccnt\nORDER BY warehouscode, custtypecode, prodcatcode\n;\n admin 2013-07-26 0 5 arAging detail used by dspTimePhasedOpenARItems Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: arAging\n-- Name: detail\n-- Notes: used by dspTimePhasedOpenARItems\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT araging_cust_id, araging_cust_number, araging_cust_name,\n SUM(araging_total_val) AS araging_total_val_sum,\n SUM(araging_cur_val) AS araging_cur_val_sum,\n SUM(araging_thirty_val) AS araging_thirty_val_sum,\n SUM(araging_sixty_val) AS araging_sixty_val_sum,\n SUM(araging_ninety_val) AS araging_ninety_val_sum,\n SUM(araging_plus_val) AS araging_plus_val_sum,\n 'curr' AS araging_total_val_sum_xtnumericrole,\n 'curr' AS araging_cur_val_sum_xtnumericrole,\n 'curr' AS araging_thirty_val_sum_xtnumericrole,\n 'curr' AS araging_sixty_val_sum_xtnumericrole,\n 'curr' AS araging_ninety_val_sum_xtnumericrole,\n 'curr' AS araging_plus_val_sum_xtnumericrole,\n 0 AS araging_total_val_sum_xttotalrole,\n 0 AS araging_cur_val_sum_xttotalrole,\n 0 AS araging_thirty_val_sum_xttotalrole,\n 0 AS araging_sixty_val_sum_xttotalrole,\n 0 AS araging_ninety_val_sum_xttotalrole,\n 0 AS araging_plus_val_sum_xttotalrole\n\nFROM araging(, ) \n\nWHERE (araging_cust_id=)\n\nWHERE (araging_cust_custtype_id=)\n\nLEFT OUTER JOIN custgrpitem ON (araging_cust_id = custgrpitem_cust_id)\nWHERE (custgrpitem_custgrp_id=)\n\nWHERE (araging_custtype_code ~ )\n\nGROUP BY araging_cust_number,araging_cust_id,araging_cust_name\nORDER BY araging_cust_number;\n admin 2013-07-26 0 76 taxHistory detail ---------BEGIN SUMMARY---------- Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: taxHistory\n-- Name: detail\n-- Notes:\n-----------BEGIN SUMMARY----------\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT , \n _descrip AS description, \n SUM(salesbase) AS salesbase,\n SUM(freightbase) AS freightbase, \n CASE WHEN (SUM(freighttax) > 0) THEN true ELSE false END AS freighttax, \n SUM(salestaxbase) AS salestaxbase,\n SUM(purchasebase) AS purchasebase,\n SUM(purchasetaxbase) * -1 AS purchasetaxbase, \n SUM(salestaxbase) + SUM(purchasetaxbase) AS nettaxbase,\n 'curr' AS salesbase_xtnumericrole,\n 'curr' AS freightbase_xtnumericrole,\n 'curr' AS salestaxbase_xtnumericrole,\n 'curr' AS purchasebase_xtnumericrole,\n 'curr' AS purchasetaxbase_xtnumericrole,\n 'curr' AS nettaxbase_xtnumericrole,\n 0 AS salestaxbase_xttotalrole,\n 0 AS purchasetaxbase_xttotalrole,\n 0 AS nettaxbase_xttotalrole\nFROM (\n\n------------END SUMMARY--------------\n\n------------BEGIN SALES--------------\n-- All sales tax history including memos \nSELECT \n taxhist_distdate, taxhist_journalnumber,\n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,) AS taxzone, taxzone_descrip, curr_abbr, \n cohist_invcnumber AS docnumber, \n AS source,\n CASE\n WHEN (cohist_doctype='I') THEN\n \n WHEN (cohist_doctype='C') THEN\n \n WHEN (cohist_doctype='D') THEN\n \n ELSE\n \n END AS doctype,\n item_number, COALESCE(item_descrip1,cohist_misc_descrip) AS description,\n CASE\n WHEN (cohist_doctype != 'C') THEN\n cohist_ordernumber \n END AS ordernumber, cohist_invcdate AS docdate,\n cohist_billtoname AS name, \n cohist_qtyshipped AS qty, \n cohist_unitprice AS unitprice, (cohist_qtyshipped * cohist_unitprice) AS amount,\n CASE\n WHEN (cohist_misc_type IS NULL OR cohist_misc_type IN ('M','F')) THEN\n currToBase(cohist_curr_id, cohist_qtyshipped * cohist_unitprice, cohist_invcdate) \n ELSE 0\n END AS salesbase,\n CASE\n WHEN (cohist_misc_type = 'F') THEN\n currToBase(cohist_curr_id, cohist_qtyshipped * cohist_unitprice, cohist_invcdate) \n ELSE 0\n END AS freightbase,\n CASE\n WHEN (cohist_misc_type = 'F') THEN\n taxhist_tax / taxhist_curr_rate\n ELSE 0\n END AS freighttax,\n 0 AS purchasebase,\n taxhist_tax AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n taxhist_tax / taxhist_curr_rate AS salestaxbase,\n 0 AS purchasetaxbase,\n 'qty' AS qty_xtnumericrole,\n 'saleprice' AS unitprice_xtnumericrole,\n 'extprice' AS amount_xtnumericrole,\n 'curr' AS taxhist_tax_xtnumericrole,\n 'curr' AS taxbase_xtnumericrole,\n 0 AS taxbase_xttotalrole\nFROM cohisttax\n JOIN cohist ON (cohist_id=taxhist_parent_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (cohist_taxzone_id=taxzone_id)\n LEFT OUTER JOIN itemsite ON (cohist_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n\nWHERE ((taxhist_distdate BETWEEN \n AND )\n\nWHERE ((taxhist_docdate BETWEEN \n AND )\n\n\n AND (taxhist_tax_id=)\n\n\n AND (taxhist_taxtype_id=)\n\n\n AND (taxclass_id=)\n\n\n AND (taxauth_id=)\n\n\n AND (taxzone_id=)\n\n)\n\n--------------END SALES--------------------\n\n\n-- Union because sales and purchase shown together\nUNION ALL\n\n\n------------BEGIN PURCHASE----------------\n\n-- A/P Memo history\nSELECT \n taxhist_distdate, taxhist_journalnumber,\n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,) AS taxauth, taxauth_name AS taxauth_descrip,\n AS taxzone,'' AS taxzone_descrip, curr_abbr, \n apopen_docnumber AS docnumber, \n AS source,\n CASE\n WHEN (apopen_doctype='C') THEN\n \n WHEN (apopen_doctype='D') THEN\n \n ELSE\n \n END AS doctype,\n '' AS item_number, apopen_notes AS description,\n apopen_ponumber AS ordernumber, apopen_docdate AS docdate,\n vend_name AS name, \n 1 AS qty, \n apopen_amount AS unitprice, apopen_amount AS amount,\n 0 AS salesbase,\n 0 AS freightbase,\n 0 AS freighttax,\n apopen_amount / apopen_curr_rate AS purchasebase,\n taxhist_tax AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n 0 AS salestaxbase,\n taxhist_tax / taxhist_curr_rate AS purchasetaxbase,\n 'qty' AS qty_xtnumericrole,\n 'purchaseprice' AS unitprice_xtnumericrole,\n 'extprice' AS extension_xtnumericrole,\n 'curr' AS taxhist_tax_xtnumericrole,\n 'curr' AS taxbase_xtnumericrole,\n 0 AS taxbase_xttotalrole\nFROM apopentax\n JOIN apopen ON (apopen_id=taxhist_parent_id)\n JOIN vendinfo ON (apopen_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n\nWHERE ((taxhist_distdate BETWEEN \n AND )\n\nWHERE ((taxhist_docdate BETWEEN \n AND )\n\n\n AND (taxhist_tax_id=)\n\n\n AND (taxhist_taxtype_id=)\n\n\n AND (taxclass_id=)\n\n\n AND (taxauth_id=)\n\n\n AND (false)\n\n AND (taxhist_distdate IS NOT NULL)\n)\nUNION ALL\n--Voucher Header History\nSELECT \n taxhist_distdate, taxhist_journalnumber,\n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,) AS taxzone, taxzone_descrip, curr_abbr, \n vohead_number AS docnumber, \n AS source,\n AS doctype,\n '', vohead_notes AS description,\n pohead_number AS ordernumber, vohead_docdate AS docdate,\n vend_name AS name, \n 1 AS qty, \n 0 AS unitprice, 0 AS amount,\n 0 AS salesbase,\n 0 AS freightbase,\n 0 AS freighttax,\n 0 AS purchasebase,\n taxhist_tax AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n 0 AS salestaxbase,\n taxhist_tax / taxhist_curr_rate AS purchasetaxbase,\n 'qty' AS qty_xtnumericrole,\n 'purchaseprice' AS unitprice_xtnumericrole,\n 'extprice' AS amount_xtnumericrole,\n 'curr' AS taxhist_tax_xtnumericrole,\n 'curr' AS taxbase_xtnumericrole,\n 0 AS taxbase_xttotalrole\nFROM voheadtax\n JOIN vohead ON (vohead_id=taxhist_parent_id)\n LEFT OUTER JOIN pohead ON (vohead_pohead_id=pohead_id)\n JOIN vendinfo ON (vohead_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)\n\nWHERE ((taxhist_distdate BETWEEN \n AND )\n\nWHERE ((taxhist_docdate BETWEEN \n AND )\n\n\n AND (taxhist_tax_id=)\n\n\n AND (taxhist_taxtype_id=)\n\n\n AND (taxclass_id=)\n\n\n AND (taxauth_id=)\n\n\n AND (taxzone_id=)\n\n AND (taxhist_distdate IS NOT NULL)\n)\nUNION ALL\n--Voucher Line Item\nSELECT \n taxhist_distdate, taxhist_journalnumber,\n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,) AS taxzone, taxzone_descrip, curr_abbr, \n vohead_number AS docnumber, \n AS source,\n AS doctype,\n COALESCE(item_number,expcat_code), COALESCE(item_descrip1,expcat_descrip) AS description,\n pohead_number AS ordernumber, vohead_docdate AS docdate,\n vend_name AS name, \n voitem_qty AS qty, \n COALESCE(SUM(vodist_amount),0)/voitem_qty AS unitprice, COALESCE(SUM(vodist_amount),0) AS amount,\n 0 AS salesbase,\n 0 AS freightbase,\n 0 AS freighttax,\n currToBase(vohead_curr_id, COALESCE(SUM(vodist_amount),0), vohead_distdate) AS purchasebase,\n taxhist_tax AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n 0 AS salestaxbase,\n taxhist_tax / taxhist_curr_rate AS purchasetaxbase,\n 'qty' AS qty_xtnumericrole,\n 'purchaseprice' AS unitprice_xtnumericrole,\n 'extprice' AS amount_xtnumericrole,\n 'curr' AS taxhist_tax_xtnumericrole,\n 'curr' AS taxbase_xtnumericrole,\n 0 AS taxbase_xttotalrole\nFROM voitemtax\n JOIN voitem ON (voitem_id=taxhist_parent_id)\n JOIN vohead ON (vohead_id=voitem_vohead_id)\n JOIN pohead ON (vohead_pohead_id=pohead_id)\n JOIN poitem ON (voitem_poitem_id=poitem_id)\n JOIN vodist ON ((vodist_poitem_id=poitem_id)\n AND (vodist_vohead_id=vohead_id))\n JOIN vendinfo ON (vohead_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN expcat ON (expcat_id=poitem_expcat_id)\n\nWHERE ((taxhist_distdate BETWEEN \n AND )\n\nWHERE ((taxhist_docdate BETWEEN \n AND )\n\n\n AND (taxhist_tax_id=)\n\n\n AND (taxhist_taxtype_id=)\n\n\n AND (taxclass_id=)\n\n\n AND (taxauth_id=)\n\n\n AND (taxzone_id=)\n\n AND (taxhist_distdate IS NOT NULL)\n)\nGROUP BY taxhist_id,taxhist_distdate,tax_code,tax_descrip,\n taxtype_name,taxtype_descrip,taxclass_code,taxclass_descrip,\n taxauth_code,taxauth_descrip,taxzone,taxzone_descrip,curr_abbr,\n vohead_number,pohead_number,item_number,item_descrip1,\n vohead_curr_id,vohead_distdate,vohead_docdate,vend_name,\n expcat_code,expcat_descrip,taxhist_tax,taxhist_curr_rate,\n voitem_qty, taxhist_journalnumber\n\n-------------END PURCHASE--------------\nORDER BY docdate DESC, docnumber DESC\n\n\n) AS data\nGROUP BY , _descrip\nORDER BY \n\n\n admin 2013-07-26 0 351 timePhasedAvailability detail used by dspTimePhasedAvailability Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timePhasedAvailability\n-- Name: detail\n-- Notes: used by dspTimePhasedAvailability\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, itemtype,\n item_number, uom_name, warehous_code,\n reorderlevel \n \n , bucket_,\n 'qty' AS bucket__xtnumericrole,\n CASE WHEN (bucket_ < reorderlevel) THEN 'error' END AS bucket__qtforegroundrole \n \n FROM (SELECT itemsite_id,\n CASE WHEN (item_type IN ('F', 'B', 'C', 'Y', 'R')) THEN 0\n WHEN (item_type IN ('M')) THEN 1\n WHEN (item_type IN ('P', 'O')) THEN 2\n ELSE 0\n END AS itemtype,\n item_number, uom_name, warehous_code,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel \n\n \n , qtyAvailable(itemsite_id, findPeriodStart()) AS bucket_ \n \n FROM itemsite, item, whsinfo, uom\n WHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id) \n AND (itemsite_warehous_id=warehous_id) \n \n AND (itemsite_warehous_id=) \n \n \n AND (itemsite_plancode_id=)\n \n AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ )))\n \n )) AS data\n ORDER BY item_number;\n admin 2013-07-26 0 356 timePhasedUsageStatisticsByItem detail used by dspTimePhasedUsageStatisticsByItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timePhasedUsageStatisticsByItem\n-- Name: detail\n-- Notes: used by dspTimePhasedUsageStatisticsByItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT itemsite_id, AS label, warehous_code\n \n , summTransR(itemsite_id, ) AS bucket_\n \nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n\n AND (itemsite_item_id=)\n\n\n AND (itemsite_warehous_id=)\n\n )\nUNION ALL\nSELECT itemsite_id, AS label, warehous_code\n \n , summTransI(itemsite_id, ) AS bucket_\n \nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n\n AND (itemsite_item_id=)\n\n\n AND (itemsite_warehous_id=)\n\n )\nUNION ALL\nSELECT itemsite_id, AS label, warehous_code\n \n , summTransS(itemsite_id, ) AS bucket_\n \nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n\n AND (itemsite_item_id=)\n\n\n AND (itemsite_warehous_id=)\n\n )\nUNION ALL\nSELECT itemsite_id, AS label, warehous_code\n \n , summTransC(itemsite_id, ) AS bucket_\n \nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n\n AND (itemsite_item_id=)\n\n\n AND (itemsite_warehous_id=)\n\n )\nUNION ALL\nSELECT itemsite_id, AS label, warehous_code\n \n , summTransA(itemsite_id, ) AS bucket_\n \nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n\n AND (itemsite_item_id=)\n\n\n AND (itemsite_warehous_id=)\n\n )\nORDER BY warehous_code;\n admin 2013-07-26 0 513 accountNumbers detail used by accountNumbers Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: accountNumbers\n-- Name: detail\n-- Notes: used by accountNumbers\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT accnt_id, *,\n CASE WHEN(accnt_type='A') THEN \n WHEN(accnt_type='E') THEN \n WHEN(accnt_type='L') THEN \n WHEN(accnt_type='Q') THEN \n WHEN(accnt_type='R') THEN \n ELSE accnt_type\n END AS accnt_type_qtdisplayrole,\n accnt_active \n FROM (ONLY accnt LEFT OUTER JOIN\n company ON (accnt_company=company_number)) \n LEFT OUTER JOIN subaccnttype ON (accnt_type=subaccnttype_accnt_type AND accnt_subaccnttype_code=subaccnttype_code)\n WHERE true\n\n AND (NOT COALESCE(company_external, false)) \n\n\n AND COALESCE(accnt_active, false)\n\nORDER BY accnt_number, accnt_sub, accnt_profit;\n\n admin 2013-07-26 0 295 briefEarnedCommission detail used by dspBriefEarnedCommissions Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: briefEarnedCommission\n-- Name: detail\n-- Notes: used by dspBriefEarnedCommissions\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cohist_salesrep_id, salesrep_number, salesrep_name, cust_number, cust_name,\n cohist_ordernumber, cohist_invcnumber, cohist_invcdate, currAbbr,\n SUM(extprice) AS sumextprice,\n SUM(cohist_commission) AS sumcommission,\n SUM(baseextprice) AS sumbaseextprice,\n SUM(basecommission) AS sumbasecommission,\n 'curr' AS sumextprice_xtnumericrole,\n 'curr' AS sumcommission_xtnumericrole,\n 'curr' AS sumbaseextprice_xtnumericrole,\n 'curr' AS sumbasecommission_xtnumericrole,\n 0 AS sumbaseextprice_xttotalrole,\n 0 AS sumbasecommission_xttotalrole\n\nFROM saleshistorymisc\n\nFROM saleshistory\n\nWHERE ((cohist_commission <> 0)\n AND(cohist_invcdate BETWEEN AND )\n \n AND (COALESCE(cohist_misc_type, '') <> 'T')\n AND (COALESCE(cohist_misc_type, '') <> 'F')\n \n \n AND (cohist_salesrep_id=)\n \n )\nGROUP BY cohist_salesrep_id, salesrep_number, salesrep_name, cust_number, cust_name,\n cohist_ordernumber, cohist_invcnumber, cohist_invcdate, currAbbr\nORDER BY salesrep_number, cust_number, cohist_invcdate;\n admin 2013-07-26 0 13 cashReceipts detail used by dspCashReceipts There are 2 display modes for this query: 1) Legacy mode which uses A/R Application information 2) Version 3.3.0 upgrade mode which uses Cash Receipt information Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: cashReceipts\n-- Name: detail\n-- Notes: used by dspCashReceipts\n-- There are 2 display modes for this query:\n-- 1) Legacy mode which uses A/R Application information\n-- 2) Version 3.3.0 upgrade mode which uses Cash Receipt information\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\n\n-- Posted cash receipts\nSELECT arapply_id, 1 AS type, '' AS cashrcpt_number, cust_number, cust_name,\n false AS voided, true AS posted, arapply_postdate AS postdate,\n ( CASE WHEN (arapply_source_doctype='C') THEN \n WHEN (arapply_source_doctype='R') THEN \n WHEN (arapply_fundstype='C') THEN \n WHEN (arapply_fundstype='T') THEN \n WHEN (arapply_fundstype='M') THEN \n WHEN (arapply_fundstype='V') THEN \n WHEN (arapply_fundstype='A') THEN \n WHEN (arapply_fundstype='D') THEN \n WHEN (arapply_fundstype='R') THEN \n WHEN (arapply_fundstype='K') THEN \n WHEN (arapply_fundstype='W') THEN \n WHEN (arapply_fundstype='O') THEN \n END || ' ' ||\n CASE WHEN (arapply_source_doctype IN ('C','R')) THEN TEXT(arapply_source_docnumber)\n ELSE arapply_refnumber\n END ) AS source,\n COALESCE(cashrcptitem_cashrcpt_id,cashrcptmisc_cashrcpt_id,-1) AS source_xtidrole,\n ( CASE WHEN (arapply_target_doctype='D') THEN \n WHEN (arapply_target_doctype='I') THEN \n ELSE \n END || ' ' || TEXT(arapply_target_docnumber) ) AS target,\n COALESCE(arapply_target_aropen_id,-1) AS target_xtidrole,\n arapply_applied AS applied,\n 'curr' AS applied_xtnumericrole,\n currtobase(arapply_curr_id,arapply_applied,arapply_postdate) AS base_applied,\n\n formatDate(arapply_postdate) AS f_postdate,\n formatMoney(arapply_applied) AS f_applied,\n formatMoney(currtobase(arapply_curr_id,arapply_applied,arapply_postdate)) AS f_base_applied,\n\n 'curr' AS base_applied_xtnumericrole,\n 0 AS base_applied_xttotalrole,\n currConcat(arapply_curr_id) AS currAbbr,\n arapply_postdate AS sortdate\nFROM custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id), arapply\n LEFT OUTER JOIN cashrcptitem ON ((arapply_reftype='CRA')\n AND (arapply_ref_id=cashrcptitem_id))\n LEFT OUTER JOIN cashrcptmisc ON ((arapply_reftype='CRD')\n AND (arapply_ref_id=cashrcptmisc_id))\nWHERE ( (arapply_cust_id=cust_id)\n AND (arapply_postdate BETWEEN AND )\n AND (arapply_source_doctype ='K')\n\n AND (cust_id=)\n\n AND (cust_custtype_id=)\n\n AND (custgrpitem_custgrp_id=)\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ )))\n\n )\n\n-- Unposted cash receipts\nUNION\nSELECT cashrcpt_id, 2 AS type, '' AS cashrcpt_number, cust_number, cust_name,\n false AS voided, false AS posted, cashrcpt_distdate AS postdate,\n ( CASE WHEN (cashrcpt_fundstype='C') THEN \n WHEN (cashrcpt_fundstype='T') THEN \n WHEN (cashrcpt_fundstype='M') THEN \n WHEN (cashrcpt_fundstype='V') THEN \n WHEN (cashrcpt_fundstype='A') THEN \n WHEN (cashrcpt_fundstype='D') THEN \n WHEN (cashrcpt_fundstype='R') THEN \n WHEN (cashrcpt_fundstype='K') THEN \n WHEN (cashrcpt_fundstype='W') THEN \n WHEN (cashrcpt_fundstype='O') THEN \n END || ' ' || cashrcpt_docnumber ) AS source,\n cashrcpt_id AS source_xtidrole,\n AS target,\n -1 AS target_xtidrole,\n cashrcpt_amount AS applied,\n 'curr' AS applied_xtnumericrole,\n (cashrcpt_amount / cashrcpt_curr_rate) AS base_applied,\n\n formatDate(cashrcpt_distdate) AS f_postdate,\n formatMoney(cashrcpt_amount) AS f_applied,\n formatMoney(cashrcpt_amount / cashrcpt_curr_rate) AS f_base_applied,\n\n 'curr' AS base_applied_xtnumericrole,\n 0 AS base_applied_xttotalrole,\n currConcat(cashrcpt_curr_id) AS currAbbr,\n cashrcpt_distdate AS sortdate\nFROM cashrcpt, custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ( (NOT cashrcpt_posted)\n AND (cashrcpt_cust_id=cust_id)\n AND (cashrcpt_distdate BETWEEN AND )\n\n AND (cust_id=)\n\n AND (cust_custtype_id=)\n\n AND (custgrpitem_custgrp_id=)\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ )))\n\n )\n\n-- Cash Advance\nUNION\nSELECT aropen_id, 3 AS type, '' AS cashrcpt_number, cust_number, cust_name,\n false AS voided, true AS posted, aropen_docdate AS postdate,\n ( CASE WHEN (substr(aropen_notes, 16, 1)='C') THEN \n WHEN (substr(aropen_notes, 16, 1)='T') THEN \n WHEN (substr(aropen_notes, 16, 1)='M') THEN \n WHEN (substr(aropen_notes, 16, 1)='V') THEN \n WHEN (substr(aropen_notes, 16, 1)='A') THEN \n WHEN (substr(aropen_notes, 16, 1)='D') THEN \n WHEN (substr(aropen_notes, 16, 1)='R') THEN \n WHEN (substr(aropen_notes, 16, 1)='K') THEN \n WHEN (substr(aropen_notes, 16, 1)='W') THEN \n WHEN (substr(aropen_notes, 16, 1)='O') THEN \n END || ' ' ||\n substr(aropen_notes, 18) ) AS source,\n cashrcptitem_cashrcpt_id AS source_xtidrole,\n CASE WHEN aropen_doctype = 'R' THEN\n \n ELSE \n END AS target,\n aropen_id AS target_xtidrole,\n aropen_amount AS applied,\n 'curr' AS applied_xtnumericrole,\n aropen_amount / aropen_curr_rate AS base_applied,\n\n formatDate(aropen_docdate) AS f_postdate,\n formatMoney(aropen_amount) AS f_applied,\n formatMoney(aropen_amount / aropen_curr_rate) AS f_base_applied,\n\n 'curr' AS base_applied_xtnumericrole,\n 0 AS base_applied_xttotalrole,\n currConcat(aropen_curr_id) AS currAbbr,\n aropen_duedate AS sortdate\nFROM custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id), aropen\n JOIN cashrcptitem ON (aropen_id=cashrcptitem_aropen_id)\nWHERE ( (aropen_cust_id=cust_id)\n AND (aropen_doctype IN ('R','C'))\n AND (aropen_docdate BETWEEN AND )\n\n AND (cust_id=)\n\n AND (cust_custtype_id=)\n\n AND (custgrpitem_custgrp_id=)\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ )))\n\n )\nORDER BY sortdate, source;\n\n\n\n-- New Display Mode\n\nSELECT id, type, cashrcpt_number, cust_number, cust_name,\n postdate, posted, voided,\n source, source_xtidrole,\n posted,\n target, target_xtidrole,\n applied,\n base_applied,\n\n formatDate(postdate) AS f_postdate,\n formatMoney(applied) AS f_applied,\n formatMoney(base_applied) AS f_base_applied,\n\n currAbbr,\n sortdate,\n 'curr' AS applied_xtnumericrole,\n 'curr' AS base_applied_xtnumericrole,\n base_applied_xttotalrole,\n type AS xtindentrole\nFROM (\n\n-- Cash Receipt headers\nSELECT cashrcpt_id AS id, 0 AS type, cashrcpt_number, cust_number, cust_name,\n cashrcpt_distdate AS postdate, cashrcpt_posted AS posted, cashrcpt_void AS voided,\n ( CASE WHEN (cashrcpt_fundstype='C') THEN \n WHEN (cashrcpt_fundstype='T') THEN \n WHEN (cashrcpt_fundstype='M') THEN \n WHEN (cashrcpt_fundstype='V') THEN \n WHEN (cashrcpt_fundstype='A') THEN \n WHEN (cashrcpt_fundstype='D') THEN \n WHEN (cashrcpt_fundstype='R') THEN \n WHEN (cashrcpt_fundstype='K') THEN \n WHEN (cashrcpt_fundstype='W') THEN \n WHEN (cashrcpt_fundstype='O') THEN \n END || ' ' || cashrcpt_docnumber ) AS source,\n cashrcpt_id AS source_xtidrole,\n CASE WHEN (cashrcpt_void) THEN \n WHEN (NOT cashrcpt_posted) THEN \n ELSE ''\n END AS target,\n -1 AS target_xtidrole,\n cashrcpt_amount AS applied,\n (cashrcpt_amount / cashrcpt_curr_rate) AS base_applied,\n currConcat(cashrcpt_curr_id) AS currAbbr,\n cashrcpt_distdate AS sortdate,\n 0 AS base_applied_xttotalrole,\n -1 AS arapply_id\nFROM cashrcpt JOIN custinfo ON (cust_id=cashrcpt_cust_id) LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ( (cashrcpt_distdate BETWEEN AND )\n\n AND (cust_id=)\n\n AND (cust_custtype_id=)\n\n AND (custgrpitem_custgrp_id=)\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ )))\n\n )\n\n-- Cash Receipt items\nUNION\nSELECT cashrcpt_id AS id, 1 AS type, '', '', '',\n cashrcpt_distdate AS postdate, cashrcpt_posted AS posted, cashrcpt_void AS voided,\n '' AS source,\n cashrcpt_id AS source_xtidrole,\n ( CASE WHEN (aropen_doctype='D') THEN \n WHEN (aropen_doctype='I') THEN \n WHEN (aropen_doctype='C') THEN \n WHEN (aropen_doctype='R') THEN \n ELSE \n END || ' ' || TEXT(aropen_docnumber) ) AS target,\n aropen_id AS target_xtidrole,\n COALESCE(arapply_applied, cashrcptitem_amount) AS applied,\n (COALESCE(arapply_applied,cashrcptitem_amount) / cashrcpt_curr_rate) AS base_applied,\n currConcat(cashrcpt_curr_id) AS currAbbr,\n cashrcpt_distdate AS sortdate,\n -1 AS base_applied_xttotalrole,\n arapply_id\nFROM cashrcpt JOIN custinfo ON (cust_id=cashrcpt_cust_id)\n LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)\n JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)\n LEFT OUTER JOIN arapply ON ((arapply_target_aropen_id=aropen_id OR\n arapply_source_aropen_id=aropen_id) AND\n arapply_reftype='CRA' AND\n arapply_ref_id=cashrcptitem_id)\nWHERE ( (cashrcpt_distdate BETWEEN AND )\n\n AND (cust_id=)\n\n AND (cust_custtype_id=)\n\n AND (custgrpitem_custgrp_id=)\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ )))\n\n )\n\n-- Cash Receipt misc\nUNION\nSELECT cashrcpt_id AS id, 1 AS type, '', '', '',\n cashrcpt_distdate AS postdate, cashrcpt_posted AS posted, cashrcpt_void AS voided,\n '' AS source,\n cashrcpt_id AS source_xtidrole,\n formatGLAccount(cashrcptmisc_accnt_id) AS target,\n -1 AS target_xtidrole,\n COALESCE(arapply_applied, cashrcptmisc_amount) AS applied,\n (COALESCE(arapply_applied, cashrcptmisc_amount) / cashrcpt_curr_rate) AS base_applied,\n currConcat(cashrcpt_curr_id) AS currAbbr,\n cashrcpt_distdate AS sortdate,\n -1 AS base_applied_xttotalrole,\n arapply_id\nFROM cashrcpt JOIN custinfo ON (cust_id=cashrcpt_cust_id)\n LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n JOIN cashrcptmisc ON (cashrcptmisc_cashrcpt_id=cashrcpt_id)\n LEFT OUTER JOIN arapply ON (arapply_reftype='CRD' AND\n arapply_ref_id=cashrcptmisc_id)\nWHERE ( (cashrcpt_distdate BETWEEN AND )\n\n AND (cust_id=)\n\n AND (cust_custtype_id=)\n\n AND (custgrpitem_custgrp_id=)\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ )))\n\n )\n ) AS data\nORDER BY sortdate, id, type, target;\n\n\n\n admin 2013-07-26 0 197 updateprices createselsched Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateprices\n-- Name: createselsched\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nCREATE TEMPORARY TABLE selsched (\n selsched_ipshead_id INTEGER PRIMARY KEY );\n admin 2013-07-26 0 64 ccpayments list list credit card payments, optionally by customer Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: ccpayments\n-- Name: list\n-- Notes: list credit card payments, optionally by customer\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT ccpay_id AS id, \n CASE WHEN ((ccpay_status = 'A') AND \n (date_part('day', CURRENT_TIMESTAMP - ccpay_transaction_datetime) < COALESCE(,0))) THEN\n 1\n ELSE 0\n END AS altid, cohead_id,\n ccpay.*,\n cust_number, cust_name, \n ccpay_type AS type, \n CASE WHEN (ccpay_type='A') THEN \n WHEN (ccpay_type='C') THEN \n WHEN (ccpay_type='R') THEN \n ELSE ccpay_type\n END AS type_qtdisplayrole,\n ccpay_status AS status,\n CASE WHEN (ccpay_status='A') THEN \n WHEN (ccpay_status='C') THEN \n WHEN (ccpay_status='D') THEN \n WHEN (ccpay_status='V') THEN \n WHEN (ccpay_status='X') THEN \n ELSE ccpay_status\n END AS status_qtdisplayrole,\n currConcat(ccpay_curr_id) AS currAbbr,\n COALESCE(cohead_number, ccpay_order_number) AS docnumber,\n ABS(COALESCE(payco_amount, ccpay_amount)) AS allocated,\n currConcat(COALESCE(payco_curr_id, ccpay_curr_id)) AS payco_currAbbr,\n cust_number, cust_name,\n 'curr' AS ccpay_amount_xtnumericrole,\n 'curr' AS allocated_xtnumericrole,\n CASE WHEN ((ccpay_status = 'A')\n AND (date_part('day', CURRENT_TIMESTAMP - ccpay_transaction_datetime) >= COALESCE(,0))) THEN\n 'error'\n END AS qtforegroundrole\n FROM ccpay LEFT OUTER JOIN \n (payco JOIN cohead ON (payco_cohead_id=cohead_id))\n ON (payco_ccpay_id=ccpay_id)\n JOIN custinfo ON (ccpay_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n WHERE ((true)\n\n AND (ccpay_status != 'A')\n\n AND (ccpay_status = 'A')\n\n\n AND ((ccpay_status != 'A')\n OR (date_part('day', CURRENT_TIMESTAMP - ccpay_transaction_datetime) < ))\n\n\n AND (ccpay_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n)\n ORDER BY ccpay_transaction_datetime;\n admin 2013-07-26 0 548 charass populate Populate characteristic assignments combobox Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: charass\n-- Name: populate\n-- Notes: Populate characteristic assignments combobox\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT -1 AS charass_char_id, '' AS char_name\nUNION\nSELECT DISTINCT charass_char_id, char_name\n\nSELECT -1 AS charass_id, '' AS charass_value\nUNION\nSELECT DISTINCT charass_id, charass_value\n\nFROM charass, char\nWHERE ((charass_char_id=char_id)\n AND (charass_target_type=)\n AND (charass_target_id= ))\n\n AND (charass_char_id= )\n AND (COALESCE(charass_value,'')!='')\n\n\nORDER BY char_name;\n\nORDER BY charass_value;\n\n admin 2013-07-26 0 14 checkRegister detail used by dspCheckRegister and viewCheckRun; shows all the checks for a given date range, bank account, check number(optional), and recipient(optional), optionally restricted to 'new' (un-posted/replaced/deleted) checks for viewing check runs. fills in the check item detail if showDetail is passed. Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: checkRegister\n-- Name: detail\n-- Notes: used by dspCheckRegister and viewCheckRun;\n-- shows all the checks for a given date range, bank account, \n-- check number(optional), and recipient(optional), optionally restricted\n-- to 'new' (un-posted/replaced/deleted) checks for viewing check runs.\n-- fills in the check item detail if showDetail is passed.\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT checkhead_id AS checkid,\n CASE WHEN(checkhead_void) THEN -1\n WHEN(checkhead_posted) THEN 1\n ELSE 0\n END AS extra,\n -1 AS checkitem_id,\n checkhead_void, checkhead_misc,\n checkhead_printed, checkhead_posted,\n CASE when checkhead_number = -1 THEN\n 'Unspecified'\n ELSE TEXT(checkhead_number) END AS number,\n COALESCE((SELECT checkrecip_number || '-' || checkrecip_name\n FROM checkrecip\n WHERE ((checkhead_recip_id=checkrecip_id)\n\t\t AND (checkhead_recip_type=checkrecip_type)))\n ,\n\t\tcheckhead_recip_type || '-' || checkhead_recip_id ) AS description,\n checkhead_checkdate AS checkdate,\n checkhead_amount AS amount, \n checkhead_amount / checkhead_curr_rate AS base_amount, \n currConcat(checkhead_curr_id) AS currAbbr,\n checkhead_number,\n checkhead_ach_batch,\n 1 AS orderby,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n NULL AS checkhead_void_qtdisplayrole, NULL AS checkhead_misc_qtdisplayrole,\n NULL AS checkhead_printed_qtdisplayrole, NULL AS checkhead_posted_qtdisplayrole,\n 0 AS xtindentrole\n FROM checkhead\n WHERE ((checkhead_bankaccnt_id=)\n \n AND (checkhead_checkdate BETWEEN AND )\n \n AND (NOT checkhead_posted)\n AND (NOT checkhead_replaced)\n AND (NOT checkhead_deleted)\n \n \n AND (CAST(checkhead_number AS text) ~ )\n \n \n \n AND (checkhead_recip_type = 'V' )\n \n \n AND (checkhead_recip_type = 'C' )\n \n \n AND (checkhead_recip_type = 'T' )\n \n \n AND (checkhead_recip_id = )\n \n \n \n AND (checkhead_recip_type = 'V')\n AND (checkhead_recip_id = )\n \n AND (checkhead_recip_type = 'V')\n AND (checkhead_recip_id IN (SELECT vend_id\n FROM vendinfo\n WHERE (vend_vendtype_id=)))\n \n AND (checkhead_recip_type = 'V')\n AND (checkhead_recip_id IN (SELECT vend_id\n FROM vendinfo, vendtype\n WHERE (vend_vendtype_id=vendtype_id)\n AND (vendtype_code ~ )))\n \n)\n\nUNION\nSELECT checkitem_checkhead_id AS checkid, 0 AS extra, checkitem_id,\n checkhead_void, checkhead_misc,\n checkhead_printed, checkhead_posted,\n CAST(COALESCE(checkitem_ranumber, checkitem_vouchernumber) AS TEXT) AS number,\n CAST(COALESCE(checkitem_invcnumber, checkitem_cmnumber) AS TEXT) AS description,\n CAST(NULL AS DATE) AS checkdate,\n checkitem_amount AS amount,\n currtobase(checkhead_curr_id,checkitem_amount,checkhead_checkdate) AS base_amount, \n currConcat(checkitem_curr_id) AS currAbbr, \n checkhead_number, \n NULL AS checkhead_ach_batch,\n 2 AS orderby,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n '' AS checkhead_void_qtdisplayrole, '' AS checkhead_misc_qtdisplayrole,\n '' AS checkhead_printed_qtdisplayrole, '' AS checkhead_posted_qtdisplayrole,\n 1 AS xtindentrole\n FROM checkitem, checkhead \n WHERE ((checkitem_checkhead_id=checkhead_id)\n AND (checkhead_bankaccnt_id=)\n \n AND (checkhead_checkdate BETWEEN AND )\n \n AND (NOT checkhead_posted)\n AND (NOT checkhead_replaced)\n AND (NOT checkhead_deleted)\n \n \n AND (CAST(checkhead_number AS text) ~ )\n \n \n \n AND (checkhead_recip_type = 'V' )\n \n \n AND (checkhead_recip_type = 'C' )\n \n \n AND (checkhead_recip_type = 'T' )\n \n \n AND (checkhead_recip_id = )\n \n \n \n AND (checkhead_recip_type = 'V')\n AND (checkhead_recip_id = )\n \n AND (checkhead_recip_type = 'V')\n AND (checkhead_recip_id IN (SELECT vend_id\n FROM vendinfo\n WHERE (vend_vendtype_id=)))\n \n AND (checkhead_recip_type = 'V')\n AND (checkhead_recip_id IN (SELECT vend_id\n FROM vendinfo, vendtype\n WHERE (vend_vendtype_id=vendtype_id)\n AND (vendtype_code ~ )))\n \n )\n\n ORDER BY checkhead_number, checkid, orderby;\n admin 2013-07-26 0 542 contact muststayactive This query determines whether a given contact should be kept active because other active records depend on it. Todo - should this be moved to the cntctAfterTrigger? Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contact\n-- Name: muststayactive\n-- Notes: This query determines whether a given contact should be kept\n-- active because other active records depend on it.\n-- Todo - should this be moved to the cntctAfterTrigger?\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT EXISTS(\n SELECT 1\n FROM crmacct\n WHERE(crmacct_active\n AND ( IN (crmacct_cntct_id_1, crmacct_cntct_id_2)))\n UNION SELECT 3\n FROM custinfo\n WHERE (cust_active\n AND ( IN (cust_cntct_id, cust_corrcntct_id)))\n UNION SELECT 5\n FROM vendinfo\n WHERE (vend_active\n AND ( IN (vend_cntct1_id, vend_cntct2_id)))\n UNION SELECT 7\n FROM prospect\n WHERE (prospect_active AND (prospect_cntct_id=))\n UNION SELECT 8\n FROM shiptoinfo\n WHERE (shipto_active AND (shipto_cntct_id=))\n UNION SELECT 9\n FROM vendaddrinfo\n JOIN vendinfo ON (vendaddr_vend_id=vend_id)\n WHERE (vend_active AND (vendaddr_cntct_id=))\n UNION SELECT 10\n FROM whsinfo\n WHERE (warehous_active AND (warehous_cntct_id=))\n UNION SELECT 11\n FROM emp\n WHERE (emp_active AND (emp_cntct_id=))\n UNION SELECT 21\n FROM todoitem\n WHERE (todoitem_completed_date IS NOT NULL\n AND (todoitem_cntct_id=))\n) AS inuse;\n admin 2013-07-26 0 157 workOrderSchedule parameterlist used by dspWoScheduleByParameterList Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: workOrderSchedule\n-- Name: parameterlist\n-- Notes: used by dspWoScheduleByParameterList\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT wo_id,\n CASE WHEN (wo_ordid IS NULL) THEN -1\n ELSE wo_ordid\n END AS orderid,\n wo.*, warehous_code, uom_name,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n item_descrip1, item_descrip2,\n formatQty(wo_qtyord) AS ordered,\n formatQty(wo_qtyrcv) AS received,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate,\n formatWONumber(wo_id) AS wonumber,\n 'qty' AS wo_qtyord_xtnumericrole,\n 'qty' AS wo_qtyrcv_xtnumericrole,\n CASE WHEN ((wo_startdate<=CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) THEN 'error'\n END AS wo_startdate_qtforegroundrole,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error'\n END AS wo_duedate_qtforegroundrole,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'Overdue'\n ELSE 'On Time'\n END AS condition,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error' END AS condition_qtforegroundrole\nFROM wo, itemsite, whsinfo, item, uom\nWHERE ( (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_startdate BETWEEN AND )\n\n AND (itemsite_warehous_id=)\n\n\n AND (itemsite_item_id=)\n\n\n AND (wo_number IN (SELECT wo_number\n FROM wo\n WHERE (wo_id=)))\n\n\n AND (wo_status IN (\n\n \n ,\n \n \n ))\n\n AND (wo_status IN ('R','I'))\n\n AND (wo_status<>'C')\n\n\n AND (wo_ordtype<>'W')\n\n\n AND (item_classcode_id=)\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem\n WHERE (itemgrpitem_itemgrp_id=)))\n\n AND (itemsite_plancode_id=)\n\n AND (wo_id IN (SELECT wooper_wo_id\n FROM wooper\n WHERE (wooper_wrkcnt_id=)))\n\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ )))\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) AND (itemgrp_name ~ ) ) ))\n\n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n\n AND (wo_id IN (SELECT wooper_wo_id\n FROM wooper, wrkcnt\n WHERE ((wooper_wrkcnt_id=wrkcnt_id) AND (wrkcnt_code ~ ))))\n\n\n AND (wo_username=)\n\n )\nORDER BY \n\n wo_startdate,\n\n wo_duedate,\n\n item_number,\n\n wo_number, wo_subnumber;\n admin 2013-07-26 0 531 contact uses Find and report uses of the contact Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contact\n-- Name: uses\n-- Notes: Find and report uses of the contact\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT ::text || '.' || type_id::text || '.' || type_code::text,\n AS contact,\n *\nFROM (\n\n SELECT crmacct_id AS type_id, 1 AS type_code, AS type,\n crmacct_number AS number,\n crmacct_name AS name, AS role,\n (crmacct_active) AS active,\n crmacct_owner_username AS owner\n FROM crmacct WHERE (crmacct_cntct_id_1=)\n \n UNION ALL\n SELECT crmacct_id AS type_id, 2 AS type_code, AS type,\n crmacct_number AS number,\n crmacct_name AS name, AS role,\n (crmacct_active) AS active,\n crmacct_owner_username AS owner\n FROM crmacct WHERE (crmacct_cntct_id_2=)\n \n UNION ALL\n SELECT cust_id AS type_id, 3 AS type_code, AS type,\n cust_number AS number,\n cust_name AS name, AS role,\n (cust_active) AS active,\n '' AS owner\n FROM custinfo WHERE (cust_cntct_id=)\n \n UNION ALL\n SELECT cust_id AS type_id, 4 AS type_code, AS type,\n cust_number AS number,\n cust_name AS name, AS role,\n (cust_active) AS active,\n '' AS owner\n FROM custinfo WHERE (cust_corrcntct_id=)\n \n UNION ALL\n SELECT vend_id AS type_id, 5 AS type_code, AS type,\n vend_number AS number,\n vend_name AS name, AS role,\n (vend_active) AS active,\n '' AS owner\n FROM vendinfo WHERE (vend_cntct1_id=)\n \n UNION ALL\n SELECT vend_id AS type_id, 6 AS type_code, AS type,\n vend_number AS number,\n vend_name AS name, AS role,\n (vend_active) AS active,\n '' AS owner\n FROM vendinfo WHERE (vend_cntct2_id=)\n \n UNION ALL\n SELECT prospect_id AS type_id, 7 AS type_code, AS type,\n prospect_number AS number,\n prospect_name AS name, '' AS role,\n (prospect_active) AS active,\n '' AS owner\n FROM prospect WHERE (prospect_cntct_id=)\n \n UNION ALL\n SELECT shipto_id AS type_id, 8 AS type_code, AS type,\n shipto_num AS number,\n shipto_name AS name, AS role,\n (shipto_active) AS active,\n '' AS owner\n FROM shiptoinfo WHERE (shipto_cntct_id=)\n \n UNION ALL\n SELECT vendaddr_id AS type_id, 9 AS type_code, AS type,\n vendaddr_code AS number,\n vendaddr_name AS name, '' AS role,\n (true) AS active,\n '' AS owner\n FROM vendaddrinfo WHERE (vendaddr_cntct_id=)\n \n UNION ALL\n SELECT warehous_id AS type_id, 10 AS type_code, AS type,\n warehous_code AS number,\n warehous_descrip AS name, '' AS role,\n (warehous_active) AS active,\n '' AS owner\n FROM whsinfo WHERE (warehous_cntct_id=)\n \n UNION ALL\n SELECT emp_id AS type_id, 11 AS type_code, AS type,\n emp_code AS number,\n emp_number AS name, '' AS role,\n (emp_active) AS active,\n '' AS owner\n FROM emp WHERE (emp_cntct_id=)\n\n\n UNION ALL\n SELECT cohead_id AS id, 12 AS altId, AS type,\n cohead_number AS number,\n cust_number AS name, AS role,\n (cohead_status = 'O') AS active,\n '' AS owner\n FROM cohead JOIN custinfo ON (cohead_cust_id=cust_id)\n WHERE (=cohead_billto_cntct_id)\n\n UNION ALL\n SELECT cohead_id AS id, 13 AS altId, AS type,\n cohead_number AS number,\n cust_number AS name, AS role,\n (cohead_status = 'O') AS active,\n '' AS owner\n FROM cohead JOIN custinfo ON (cohead_cust_id=cust_id)\n WHERE (=cohead_shipto_cntct_id)\n\n\n UNION ALL\n SELECT incdt_id AS id, 14 AS altId, AS type,\n incdt_number::TEXT AS number,\n incdt_summary AS name, '' AS role,\n (incdt_status NOT IN ('R', 'L')) AS active,\n incdt_owner_username AS owner\n FROM incdt\n WHERE (incdt_cntct_id=)\n\n\n UNION ALL\n SELECT lsreg_id AS id, 15 AS altId, AS type,\n ls_number AS number,\n item_number AS name, '' AS role,\n (lsreg_expiredate > current_date) AS active,\n '' AS owner\n FROM lsreg JOIN ls ON (lsreg_ls_id=ls_id) JOIN item ON (ls_item_id=item_id)\n WHERE (lsreg_cntct_id=)\n\n\n UNION ALL\n SELECT ophead_id AS id, 16 AS altId, AS type,\n ophead_number AS number,\n ophead_name AS name, '' AS role,\n ophead_active AS active,\n ophead_owner_username AS owner\n FROM ophead\n WHERE (ophead_cntct_id=)\n\n\n UNION ALL\n SELECT pohead_id AS id, 17 AS altId, AS type,\n pohead_number AS number,\n vend_number AS name, AS role,\n (pohead_status != 'C') AS active,\n '' AS owner\n FROM pohead JOIN vendinfo ON (pohead_vend_id=vend_id)\n WHERE (=pohead_vend_cntct_id)\n\n UNION ALL\n SELECT pohead_id AS id, 18 AS altId, AS type,\n pohead_number AS number,\n vend_number AS name, AS role,\n (pohead_status != 'C') AS active,\n '' AS owner\n FROM pohead JOIN vendinfo ON (pohead_vend_id=vend_id)\n WHERE (=pohead_shipto_cntct_id)\n\n UNION ALL\n SELECT quhead_id AS id, 19 AS altId, AS type,\n quhead_number AS number,\n COALESCE(cust_number, prospect_number) AS name,\n AS role,\n (quhead_status = 'O') AS active,\n '' AS owner\n FROM quhead LEFT OUTER JOIN custinfo ON (quhead_cust_id=cust_id)\n LEFT OUTER JOIN prospect ON (quhead_cust_id=prospect_id)\n WHERE (=quhead_billto_cntct_id)\n\n UNION ALL\n SELECT quhead_id AS id, 20 AS altId, AS type,\n quhead_number AS number,\n COALESCE(cust_number, prospect_number) AS name,\n AS role,\n (quhead_status = 'O') AS active,\n '' AS owner\n FROM quhead LEFT OUTER JOIN custinfo ON (quhead_cust_id=cust_id)\n LEFT OUTER JOIN prospect ON (quhead_cust_id=prospect_id)\n WHERE (=quhead_shipto_cntct_id)\n\n\n UNION ALL\n SELECT todoitem_id, 21 AS altId, AS type,\n todoitem_seq::TEXT AS number,\n todoitem_name AS name, '' AS role,\n (todoitem_completed_date IS NULL) AS active,\n todoitem_owner_username AS owner\n FROM todoitem\n WHERE todoitem_cntct_id=\n\n\n \n UNION ALL\n SELECT tohead_id, 22 AS altId, AS type,\n tohead_number AS number,\n tohead_srcname || ' -> ' || tohead_destname AS name,\n AS role,\n (tohead_status = 'O') AS active,\n '' AS owner\n FROM tohead\n WHERE (=tohead_srccntct_id)\n UNION ALL\n SELECT tohead_id, 23 AS altId, AS type,\n tohead_number AS number,\n tohead_srcname || ' -> ' || tohead_destname AS name,\n AS role,\n (tohead_status = 'O') AS active,\n '' AS owner\n FROM tohead\n WHERE (=tohead_destcntct_id)\n \n\n\n\n) AS innerq\n\n ORDER BY type, number;\n admin 2013-07-26 0 496 contactmerge deselect Removes contact selection Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: deselect\n-- Notes: Removes contact selection\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM cntctsel\nWHERE (cntctsel_cntct_id=);\n admin 2013-07-26 0 500 contactmerge purge Purge contact(s) that was/were previously merged Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: purge\n-- Notes: Purge contact(s) that was/were previously merged\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM cntct WHERE cntct_id IN\n(SELECT cntctmrgd_cntct_id\n FROM cntctmrgd\n WHERE (NOT cntctmrgd_error)\n\nAND (cntctmrgd_cntct_id=)\n)\nAND (NOT cntctUsed(cntct_id));\n admin 2013-07-26 0 501 contactmerge restore Restore a contact that was previously merged Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: restore\n-- Notes: Restore a contact that was previously merged\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntctrestore(cntctmrgd_cntct_id) AS result\nFROM cntctmrgd\n\nWHERE (cntctmrgd_cntct_id=)\n\n;\n admin 2013-07-26 0 502 contactmerge search Search for contacts Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: search\n-- Notes: Search for contacts\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntct_id,\n CASE\n WHEN (cntctsel_cntct_id IS NOT NULL AND cntctsel_target) THEN\n 1 -- Selected as target contact\n WHEN (cntctsel_cntct_id IS NOT NULL AND NOT cntctsel_target) THEN\n 2 -- Selected as contact to merge\n WHEN (cntctmrgd_cntct_id IS NOT NULL AND cntctUsed(cntctmrgd_cntct_id)=false) THEN\n 3 -- Already merged contact\n WHEN (cntctmrgd_cntct_id IS NOT NULL) THEN\n 4 -- Already merged contact, but still has relationships\n ELSE\n 0 -- No status\n END AS status,\n cntctdups.*, \n cntctdup_level AS xtindentrole,\n CASE\n WHEN (cntctsel_cntct_id IS NOT NULL AND cntctsel_target) THEN\n 'altemphasis' -- Selected as target contact\n WHEN (cntctsel_cntct_id IS NOT NULL AND NOT cntctsel_target) THEN\n 'emphasis' -- Selected as contact to merge\n WHEN (cntctmrgd_cntct_id IS NOT NULL AND cntctUsed(cntctmrgd_cntct_id)=false) THEN\n 'warning' -- Already merged contact\n WHEN (cntctmrgd_cntct_id IS NOT NULL) THEN\n 'error' -- Already merged contact, but still has relationships\n END AS qtforegroundrole\nFROM cntctdups(\n , \n , \n , \n , \n , \n , \n , \n ,\n , \n , \n , \n , \n , \n , \n , \n )\n LEFT OUTER JOIN cntctsel ON (cntct_id=cntctsel_cntct_id)\n LEFT OUTER JOIN cntctmrgd ON (cntct_id=cntctmrgd_cntct_id);\n admin 2013-07-26 0 504 contactmerge select Processes contact selections Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: select\n-- Notes: Processes contact selections\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntctselect(\n , \n ) AS result;\n admin 2013-07-26 0 503 contactmerge selectcol Selects a specific column Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: selectcol\n-- Notes: Selects a specific column\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntctselectcol(, );\n admin 2013-07-26 0 67 contacts detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contacts\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT ON (length(cntct_last_name)=0, length(cntct_first_name)=0, cntct_last_name, cntct_first_name, cntct_number) \n cntct_id AS id\n \n, addr_id AS altId, addr.*,\n crmacct_id, crmacct_number, crmacct_name,\n cntct.* \n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value::date AS char\n\n\n\nFROM cntct\n\nFROM cntct()\n\n LEFT OUTER JOIN crmacct ON (cntct_crmacct_id=crmacct_id) \n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) \n LEFT OUTER JOIN cntcteml ON (cntcteml_cntct_id=cntct_id)\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='CNTCT') \n AND (charass_alias.charass_target_id=cntct_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='CNTCT') \n AND (charass_alias.charass_target_id=cntct_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='CNTCT') \n AND (charass_alias.charass_target_id=cntct_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\nWHERE true\n \n AND (cntct_owner_username=) \n\n AND (cntct_owner_username ~ ) \n\n \n AND cntct_active\n\n\n AND (\n (crmacct_number ~* )\n OR (crmacct_name ~* )\n OR (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n OR (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n OR (COALESCE(cntcteml_email,'') ~* )\n OR (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n OR (COALESCE(addr_city,'') ~* )\n OR (COALESCE(addr_state,'') ~* )\n OR (COALESCE(addr_postalcode,'') ~* )\n OR (COALESCE(addr_country,'') ~* )\n)\n\n\n AND (cntct_id=)\n\n\n AND (crmacct_id=)\n\n\n AND (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n\n\n AND (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n\n\n AND (COALESCE(cntcteml_email,'') ~* )\n\n\n AND (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n\n\n AND (COALESCE(addr_city,'') ~* )\n\n\n AND (COALESCE(addr_state,'') ~* )\n\n\n AND (COALESCE(addr_postalcode,'') ~* )\n\n\n AND (COALESCE(addr_country,'') ~* )\n\n\n AND (cntct_id=)\n\n\n AND (addr_id=)\n\n\nORDER BY length(cntct_last_name)=0, length(cntct_first_name)=0, cntct_last_name, cntct_first_name, cntct_number, cntcteml_primary desc;\n admin 2013-07-26 0 10 arOpenItems detail used by arWorkBench, dspAROpenItems Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: arOpenItems\n-- Name: detail\n-- Notes: used by arWorkBench, dspAROpenItems\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT SUM(CASE WHEN (aropen_doctype IN ('C', 'R')) THEN\n (aropen_amount - aropen_paid) / aropen_curr_rate * -1\n ELSE (aropen_amount - aropen_paid) / aropen_curr_rate\n END) AS total_balance\nFROM aropen JOIN custinfo ON (aropen_cust_id=cust_id)\n LEFT OUTER JOIN custtype ON (cust_custtype_id=custtype_id)\n LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ( (aropen_open)\n\n AND (aropen_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n\n )\n;\n\n\n-- Get unposted invoices\n\n\nSELECT -1 AS id,\n 0 AS altId,\n invchead_invcnumber AS docnumber,\n invchead_id AS docnumber_xtidrole,\n invchead_posted AS posted,\n invchead_invcdate AS docdate,\n NULL::date AS aropen_duedate,\n invchead_ordernumber AS ordernumber,\n cohead_id AS ordernumber_xtidrole,\n AS doctype,\n NULL AS doctype_qtforegroundrole,\n invoicetotal(invchead_id) AS amount,\n currtobase(invchead_curr_id, invoicetotal(invchead_id), invchead_invcdate) AS base_amount,\n 0 AS paid,\n 0 AS base_paid,\n 0 AS balance,\n currConcat(invchead_curr_id) AS currAbbr,\n 0 AS base_balance,\n\n formatDate(invchead_invcdate) AS f_docdate,\n NULL::text AS f_duedate,\n formatMoney(0) AS f_amount,\n formatMoney(0) AS f_paid,\n formatMoney(0) AS f_balance,\n\n cust_id, cust_number, cust_name,\n (invchead_recurring_invchead_id IS NOT NULL) AS recurring,\n false AS open,\n NULL AS ccard_number,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS base_paid_xtnumericrole,\n 0 AS base_paid_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n NULL::text AS aropen_docnumber_qtdisplayrole,\n NULL::text AS aropen_docdate_qtdisplayrole,\n 0 AS xtindentrole,\n '' AS aropen_duedate_qtforegroundrole,\n NULL::integer AS ccard_number_xtidrole,\n firstLine(invchead_notes) AS notes\nFROM invchead\n LEFT OUTER JOIN cohead ON (invchead_ordernumber=cohead_number)\n JOIN custinfo ON (invchead_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\t LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ((NOT invchead_posted)\n\n AND (invchead_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (invchead_invcdate BETWEEN AND )\n\n )\n GROUP BY id, altId, invchead_id,\n invchead_invcdate, invchead_posted, invchead_curr_id,\n invchead_recurring, invchead_invcnumber, invchead_posted,\n invchead_ordernumber, cohead_id,\n cust_id, cust_number, cust_name,\n invchead_recurring_invchead_id, invchead_notes\n\nUNION\n\n\n\n-- Get unposted credit memos\n\n\nSELECT -1 AS id,\n 1 AS altId,\n cmhead_number AS docnumber,\n cmhead_id AS docnumber_xtidrole,\n cmhead_posted AS posted,\n cmhead_docdate AS docdate,\n NULL::date AS aropen_duedate,\n NULL::text AS ordernumber,\n -1 AS ordernumber_xtidrole,\n AS doctype,\n CASE WHEN (NOT cmhead_posted) THEN 'emphasis'\n END AS doctype_qtforegroundrole,\n creditmemototal(cmhead_id) AS amount,\n currtobase(cmhead_curr_id, creditmemototal(cmhead_id), cmhead_docdate) AS base_amount,\n 0 AS paid,\n 0 AS base_paid,\n 0 AS balance,\n currConcat(cmhead_curr_id) AS currAbbr,\n 0 AS base_balance,\n\n formatDate(cmhead_docdate) AS f_docdate,\n NULL::text AS f_duedate,\n formatMoney(creditmemototal(cmhead_id)) AS f_amount,\n formatMoney(0) AS f_paid,\n formatMoney(0) AS f_balance,\n\n cust_id, cust_number, cust_name,\n false AS recurring,\n false AS open,\n NULL AS ccard_number,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS base_paid_xtnumericrole,\n 0 AS base_paid_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n NULL::text AS aropen_docnumber_qtdisplayrole,\n NULL::text AS aropen_docdate_qtdisplayrole,\n 0 AS xtindentrole,\n '' AS aropen_duedate_qtforegroundrole,\n NULL::integer AS ccard_number_xtidrole,\n firstLine(cmhead_comments) AS notes\nFROM cmhead\n JOIN custinfo ON (cmhead_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\t LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ((NOT cmhead_posted)\n\n AND (cmhead_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (cmhead_docdate BETWEEN AND )\n\n )\n GROUP BY id, altId, cmhead_id,\n cmhead_docdate, cmhead_posted, cmhead_curr_id,\n cmhead_number, cmhead_posted, cmhead_comments,\n cust_id, cust_number, cust_name\n\nUNION\n\n\n\n-- Get Posted AR Open\nSELECT aropen_id AS id,\n CASE WHEN (aropen_doctype='I') THEN 0\n WHEN (aropen_doctype='C') THEN 1\n WHEN (aropen_doctype='D') THEN 2\n WHEN (aropen_doctype='R') THEN 3\n ELSE -1\n END AS altId,\n aropen_docnumber AS docnumber,\n COALESCE(invchead_id,cmhead_id,-1) AS docnumber_xtidrole,\n true AS posted,\n aropen_docdate AS docdate,\n aropen_duedate,\n aropen_ordernumber AS ordernumber,\n COALESCE(cohead_id,-1) AS ordernumber_xtidrole,\n CASE WHEN (aropen_doctype='I') THEN \n WHEN (aropen_doctype='C') THEN \n WHEN (aropen_doctype='D') THEN \n WHEN (aropen_doctype='R') THEN \n ELSE \n END AS doctype,\n CASE WHEN (aropen_doctype='C') THEN 'emphasis' \n ELSE CASE WHEN(aropen_doctype='R')THEN 'altemphasis'\n END\n END AS doctype_qtforegroundrole,\n aropen_amount AS amount,\n aropen_amount/aropen_curr_rate AS base_amount,\n (aropen_paid - (COALESCE(SUM(arapply_target_paid),0))) AS paid,\n (aropen_paid - (COALESCE(SUM(arapply_target_paid),0))/aropen_curr_rate) AS base_paid,\n (((aropen_amount-aropen_paid+COALESCE(SUM(arapply_target_paid),0))) *\n CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1 ELSE 1 END) AS balance,\n currConcat(aropen_curr_id) AS currAbbr,\n (((aropen_amount-aropen_paid+COALESCE(SUM(arapply_target_paid),0)))/aropen_curr_rate *\n CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1 ELSE 1 END) AS base_balance,\n\n formatDate(aropen_docdate) AS f_docdate,\n formatDate(aropen_duedate) AS f_duedate,\n formatMoney(aropen_amount) AS f_amount,\n formatMoney(aropen_paid - (COALESCE(SUM(arapply_target_paid),0))) AS f_paid,\n formatMoney((((aropen_amount-aropen_paid+COALESCE(SUM(arapply_target_paid),0))) *\n CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1 ELSE 1 END)) AS f_balance,\n\n cust_id, cust_number, cust_name,\n COALESCE(invchead_recurring_invchead_id IS NOT NULL, false) AS recurring,\n aropen_open AS open,\n formatccnumber(decrypt(setbytea(ccard_number),\n setbytea(), 'bf')) AS ccard_number,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS base_paid_xtnumericrole,\n 0 AS base_paid_xttotalrole,\n 'curr'AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n NULL AS aropen_docnumber_qtdisplayrole,\n NULL AS aropen_docdate_qtdisplayrole,\n 0 AS xtindentrole,\n CASE WHEN ((COALESCE(aropen_duedate,current_date) < current_date) AND COALESCE(aropen_open,FALSE)) THEN 'error' \n END AS aropen_duedate_qtforegroundrole,\n ccpay_id AS ccard_number_xtidrole,\n firstLine(aropen_notes) AS notes\nFROM aropen \n\n JOIN incdt ON (incdt_aropen_id=aropen_id)\n\n JOIN custinfo ON (aropen_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\t LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n LEFT OUTER JOIN invchead ON ((aropen_docnumber=invchead_invcnumber)\n AND (aropen_doctype='I'))\n LEFT OUTER JOIN cohead ON (invchead_ordernumber=cohead_number)\n LEFT OUTER JOIN cmhead ON ((aropen_docnumber=cmhead_number)\n AND (aropen_doctype='C'))\n LEFT OUTER JOIN arapply ON (((aropen_id=arapply_source_aropen_id)\n OR (aropen_id=arapply_target_aropen_id))\n AND (arapply_distdate>COALESCE(,current_date)))\n LEFT OUTER JOIN payaropen ON (payaropen_aropen_id=aropen_id)\n LEFT OUTER JOIN ccpay ON (payaropen_ccpay_id=ccpay_id)\n LEFT OUTER JOIN ccard ON (ccpay_ccard_id=ccard_id)\nWHERE ((true)\n\n AND (aropen_docdate <= COALESCE(, current_date))\n AND (COALESCE(aropen_closedate, DATE() + 1, current_date + 1) > COALESCE(, current_date)) \n\n\n AND (aropen_doctype IN ('D','I'))\n\n AND (aropen_doctype IN ('C', 'R'))\n\n\n AND (aropen_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (custtype_code~)\n\n\n AND (aropen_docdate BETWEEN AND )\n\n\n AND (aropen_duedate >= )\n\n\n AND (aropen_duedate <= )\n\n )\n GROUP BY id, altId,\t invchead_id,\n aropen_docdate, aropen_duedate, aropen_doctype, \n aropen_docnumber, aropen_amount, \n aropen_notes, aropen_posted, aropen_ordernumber,\n aropen_paid, aropen_open, aropen_curr_id,\n aropen_closedate, aropen_curr_rate, cmhead_id,\n cust_id, \t\t cust_number, cust_name,\n cohead_id, ccpay_id, ccard_number,\n invchead_recurring_invchead_id\nUNION\nSELECT -1,\n 4 AS altId,\n aropen_docnumber AS docnumber,\n -1 AS docnumber_xtidrole,\n NULL AS posted, \n aropen_docdate AS docdate,\n NULL AS aropen_duedate,\n CAST(incdt_number AS text) AS ordernumber,\n incdt_id AS ordernumber_xtidrole,\n NULL AS doctype,\n NULL AS doctype_qtforegroundrole,\n NULL AS amount,\n NULL AS base_amount,\n NULL AS paid,\n NULL AS base_paid,\n NULL AS balance,\n NULL AS currAbbr,\n NULL AS base_balance,\n\n NULL AS f_docdate,\n NULL AS f_duedate,\n NULL AS f_amount,\n NULL AS f_paid,\n NULL AS f_balance,\n\n NULL,incdt_assigned_username, incdt_summary,\n NULL AS recurring, NULL AS open,\n NULL AS ccard_number,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS base_paid_xtnumericrole,\n 0 AS base_paid_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n '' AS aropen_docnumber_qtdisplayrole,\n '' AS aropen_docdate_qtdisplayrole,\n 1 AS xtindentrole,\n CASE WHEN ((COALESCE(aropen_duedate,current_date) < current_date) AND COALESCE(aropen_open,FALSE)) THEN 'error' \n END AS aropen_duedate_qtforegroundrole,\n NULL::integer AS ccard_xtidrole,\n firstLine(incdt_descrip) AS notes\nFROM incdt JOIN aropen ON (aropen_id=incdt_aropen_id)\n JOIN custinfo ON (aropen_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\t LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ((true)\n\n AND (aropen_docdate <= COALESCE(, current_date))\n AND (COALESCE(aropen_closedate, DATE() + 1, current_date + 1) > COALESCE(, current_date)) \n\n\n AND (NOT aropen_doctype IN ('C', 'R'))\n\n\n AND (aropen_doctype IN ('C', 'R'))\n\n\n AND (aropen_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (aropen_docdate BETWEEN AND )\n\n\n AND (aropen_duedate >= )\n\n\n AND (aropen_duedate <= )\n\n )\n\nORDER BY\n docdate DESC, docnumber DESC, xtindentrole\n;\n\n admin 2013-07-26 0 292 arOpenItems f_detail This version for printed reports that need a way to include formatted values since there is no good way to differentiate different printed parameters in display class. Used to be printed version got an extra parameter. Formatted values slow things down considerably on screen version otherwise. This should go away if/when we get OpenRPT to do its own formatting. Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: arOpenItems\n-- Name: f_detail\n-- Notes: This version for printed reports that need a way to include formatted values\n-- since there is no good way to differentiate different printed parameters in \n-- display class. Used to be printed version got an extra parameter. Formatted\n-- values slow things down considerably on screen version otherwise. This\n-- should go away if/when we get OpenRPT to do its own formatting.\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT SUM(CASE WHEN (aropen_doctype IN ('C', 'R')) THEN\n (aropen_amount - aropen_paid) / aropen_curr_rate * -1\n ELSE (aropen_amount - aropen_paid) / aropen_curr_rate\n END) AS total_balance\nFROM aropen JOIN custinfo ON (aropen_cust_id=cust_id)\n LEFT OUTER JOIN custtype ON (cust_custtype_id=custtype_id)\n LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ( (aropen_open)\n\n AND (aropen_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n\n )\n;\n\n\n-- Get unposted invoices\n\n\nSELECT -1 AS id,\n 0 AS altId,\n invchead_invcnumber AS docnumber,\n invchead_id AS docnumber_xtidrole,\n invchead_posted AS posted,\n invchead_invcdate AS docdate,\n NULL::date AS aropen_duedate,\n invchead_ordernumber AS ordernumber,\n cohead_id AS ordernumber_xtidrole,\n AS doctype,\n NULL AS doctype_qtforegroundrole,\n invoicetotal(invchead_id) AS amount,\n currtobase(invchead_curr_id, invoicetotal(invchead_id), invchead_invcdate) AS base_amount,\n 0 AS paid,\n 0 AS base_paid,\n 0 AS balance,\n currConcat(invchead_curr_id) AS currAbbr,\n 0 AS base_balance,\n formatDate(invchead_invcdate) AS f_docdate,\n NULL::text AS f_duedate,\n formatMoney(invoicetotal(invchead_id)) AS f_amount,\n formatMoney(0) AS f_paid,\n formatMoney(0) AS f_balance,\n cust_id, cust_number, cust_name,\n (invchead_recurring_invchead_id IS NOT NULL) AS recurring,\n false AS open,\n NULL AS ccard_number,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS base_paid_xtnumericrole,\n 0 AS base_paid_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n NULL::text AS aropen_docnumber_qtdisplayrole,\n NULL::text AS aropen_docdate_qtdisplayrole,\n 0 AS xtindentrole,\n '' AS aropen_duedate_qtforegroundrole,\n NULL::integer AS ccard_number_xtidrole,\n firstLine(invchead_notes) AS notes\nFROM invchead\n LEFT OUTER JOIN cohead ON (invchead_ordernumber=cohead_number)\n JOIN custinfo ON (invchead_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\t LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ((NOT invchead_posted)\n\n AND (invchead_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (invchead_invcdate BETWEEN AND )\n\n )\n GROUP BY id, altId, invchead_id,\n invchead_invcdate, invchead_posted, invchead_curr_id,\n invchead_recurring, invchead_invcnumber, invchead_posted,\n invchead_ordernumber, cohead_id,\n cust_id, cust_number, cust_name,\n invchead_recurring_invchead_id, invchead_notes\n\nUNION\n\n\n\n-- Get unposted credit memos\n\n\nSELECT -1 AS id,\n 1 AS altId,\n cmhead_number AS docnumber,\n cmhead_id AS docnumber_xtidrole,\n cmhead_posted AS posted,\n cmhead_docdate AS docdate,\n NULL::date AS aropen_duedate,\n NULL::text AS ordernumber,\n -1 AS ordernumber_xtidrole,\n AS doctype,\n CASE WHEN (NOT cmhead_posted) THEN 'emphasis'\n END AS doctype_qtforegroundrole,\n creditmemototal(cmhead_id) AS amount,\n currtobase(cmhead_curr_id, creditmemototal(cmhead_id), cmhead_docdate) AS base_amount,\n 0 AS paid,\n 0 AS base_paid,\n 0 AS balance,\n currConcat(cmhead_curr_id) AS currAbbr,\n 0 AS base_balance,\n formatDate(cmhead_docdate) AS f_docdate,\n NULL::text AS f_duedate,\n formatMoney(creditmemototal(cmhead_id)) AS f_amount,\n formatMoney(0) AS f_paid,\n formatMoney(0) AS f_balance,\n cust_id, cust_number, cust_name,\n false AS recurring,\n false AS open,\n NULL AS ccard_number,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS base_paid_xtnumericrole,\n 0 AS base_paid_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n NULL::text AS aropen_docnumber_qtdisplayrole,\n NULL::text AS aropen_docdate_qtdisplayrole,\n 0 AS xtindentrole,\n '' AS aropen_duedate_qtforegroundrole,\n NULL::integer AS ccard_number_xtidrole,\n firstLine(cmhead_comments) AS notes\nFROM cmhead\n JOIN custinfo ON (cmhead_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\t LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ((NOT cmhead_posted)\n\n AND (cmhead_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (cmhead_docdate BETWEEN AND )\n\n )\n GROUP BY id, altId, cmhead_id,\n cmhead_docdate, cmhead_posted, cmhead_curr_id,\n cmhead_number, cmhead_posted, cmhead_comments,\n cust_id, cust_number, cust_name\n\nUNION\n\n\n\n-- Get Posted AR Open\nSELECT aropen_id AS id,\n CASE WHEN (aropen_doctype='I') THEN 0\n WHEN (aropen_doctype='C') THEN 1\n WHEN (aropen_doctype='D') THEN 2\n WHEN (aropen_doctype='R') THEN 3\n ELSE -1\n END AS altId,\n aropen_docnumber AS docnumber,\n COALESCE(invchead_id,cmhead_id,-1) AS docnumber_xtidrole,\n true AS posted,\n aropen_docdate AS docdate,\n aropen_duedate,\n aropen_ordernumber AS ordernumber,\n COALESCE(cohead_id,-1) AS ordernumber_xtidrole,\n CASE WHEN (aropen_doctype='I') THEN \n WHEN (aropen_doctype='C') THEN \n WHEN (aropen_doctype='D') THEN \n WHEN (aropen_doctype='R') THEN \n ELSE \n END AS doctype,\n CASE WHEN (aropen_doctype='C') THEN 'emphasis' \n ELSE CASE WHEN(aropen_doctype='R')THEN 'altemphasis'\n END\n END AS doctype_qtforegroundrole,\n aropen_amount AS amount,\n aropen_amount/aropen_curr_rate AS base_amount,\n (aropen_paid - (COALESCE(SUM(arapply_target_paid),0))) AS paid,\n (aropen_paid - (COALESCE(SUM(arapply_target_paid),0))/aropen_curr_rate) AS base_paid,\n (((aropen_amount-aropen_paid+COALESCE(SUM(arapply_target_paid),0))) *\n CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1 ELSE 1 END) AS balance,\n currConcat(aropen_curr_id) AS currAbbr,\n (((aropen_amount-aropen_paid+COALESCE(SUM(arapply_target_paid),0)))/aropen_curr_rate *\n CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1 ELSE 1 END) AS base_balance,\n formatDate(aropen_docdate) AS f_docdate,\n formatDate(aropen_duedate) AS f_duedate,\n formatMoney(aropen_amount) AS f_amount,\n formatMoney(aropen_paid - (COALESCE(SUM(arapply_target_paid),0))) AS f_paid,\n formatMoney((((aropen_amount-aropen_paid+COALESCE(SUM(arapply_target_paid),0))) *\n CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1 ELSE 1 END)) AS f_balance,\n cust_id, cust_number, cust_name,\n COALESCE(invchead_recurring_invchead_id IS NOT NULL, false) AS recurring,\n aropen_open AS open,\n formatccnumber(decrypt(setbytea(ccard_number),\n setbytea(), 'bf')) AS ccard_number,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS base_paid_xtnumericrole,\n 0 AS base_paid_xttotalrole,\n 'curr'AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n NULL AS aropen_docnumber_qtdisplayrole,\n NULL AS aropen_docdate_qtdisplayrole,\n 0 AS xtindentrole,\n CASE WHEN ((COALESCE(aropen_duedate,current_date) < current_date) AND COALESCE(aropen_open,FALSE)) THEN 'error' \n END AS aropen_duedate_qtforegroundrole,\n ccpay_id AS ccard_number_xtidrole,\n firstLine(aropen_notes) AS notes\nFROM aropen \n\n JOIN incdt ON (incdt_aropen_id=aropen_id)\n\n JOIN custinfo ON (aropen_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\t LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n LEFT OUTER JOIN invchead ON ((aropen_docnumber=invchead_invcnumber)\n AND (aropen_doctype='I'))\n LEFT OUTER JOIN cohead ON (invchead_ordernumber=cohead_number)\n LEFT OUTER JOIN cmhead ON ((aropen_docnumber=cmhead_number)\n AND (aropen_doctype='C'))\n LEFT OUTER JOIN arapply ON (((aropen_id=arapply_source_aropen_id)\n OR (aropen_id=arapply_target_aropen_id))\n AND (arapply_distdate>COALESCE(,current_date)))\n LEFT OUTER JOIN payaropen ON (payaropen_aropen_id=aropen_id)\n LEFT OUTER JOIN ccpay ON (payaropen_ccpay_id=ccpay_id)\n LEFT OUTER JOIN ccard ON (ccpay_ccard_id=ccard_id)\nWHERE ((true)\n\n AND (aropen_docdate <= COALESCE(, current_date))\n AND (COALESCE(aropen_closedate, DATE() + 1, current_date + 1) > COALESCE(, current_date)) \n\n\n AND (aropen_doctype IN ('D','I'))\n\n AND (aropen_doctype IN ('C', 'R'))\n\n\n AND (aropen_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (custtype_code~)\n\n\n AND (aropen_docdate BETWEEN AND )\n\n\n AND (aropen_duedate >= )\n\n\n AND (aropen_duedate <= )\n\n )\n GROUP BY id, altId,\t invchead_id,\n aropen_docdate, aropen_duedate, aropen_doctype, \n aropen_docnumber, aropen_amount, \n aropen_notes, aropen_posted, aropen_ordernumber,\n aropen_paid, aropen_open, aropen_curr_id,\n aropen_closedate, aropen_curr_rate, cmhead_id,\n cust_id, \t\t cust_number, cust_name,\n cohead_id, ccpay_id, ccard_number,\n invchead_recurring_invchead_id\nUNION\nSELECT -1,\n 4 AS altId,\n aropen_docnumber AS docnumber,\n -1 AS docnumber_xtidrole,\n NULL AS posted, \n aropen_docdate AS docdate,\n NULL AS aropen_duedate,\n CAST(incdt_number AS text) AS ordernumber,\n incdt_id AS ordernumber_xtidrole,\n NULL AS doctype,\n NULL AS doctype_qtforegroundrole,\n NULL AS amount,\n NULL AS base_amount,\n NULL AS paid,\n NULL AS base_paid,\n NULL AS balance,\n NULL AS currAbbr,\n NULL AS base_balance,\n NULL AS f_docdate,\n NULL AS f_duedate,\n NULL AS f_amount,\n NULL AS f_paid,\n NULL AS f_balance,\n NULL,incdt_assigned_username, incdt_summary,\n NULL AS recurring, NULL AS open,\n NULL AS ccard_number,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS paid_xtnumericrole,\n 'curr' AS base_paid_xtnumericrole,\n 0 AS base_paid_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n '' AS aropen_docnumber_qtdisplayrole,\n '' AS aropen_docdate_qtdisplayrole,\n 1 AS xtindentrole,\n CASE WHEN ((COALESCE(aropen_duedate,current_date) < current_date) AND COALESCE(aropen_open,FALSE)) THEN 'error' \n END AS aropen_duedate_qtforegroundrole,\n NULL::integer AS ccard_xtidrole,\n firstLine(incdt_descrip) AS notes\nFROM incdt JOIN aropen ON (aropen_id=incdt_aropen_id)\n JOIN custinfo ON (aropen_cust_id=cust_id)\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\t LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ((true)\n\n AND (aropen_docdate <= COALESCE(, current_date))\n AND (COALESCE(aropen_closedate, DATE() + 1, current_date + 1) > COALESCE(, current_date)) \n\n\n AND (NOT aropen_doctype IN ('C', 'R'))\n\n\n AND (aropen_doctype IN ('C', 'R'))\n\n\n AND (aropen_cust_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (aropen_docdate BETWEEN AND )\n\n\n AND (aropen_duedate >= )\n\n\n AND (aropen_duedate <= )\n\n )\n\nORDER BY\n docdate DESC, docnumber DESC, xtindentrole\n;\n\n admin 2013-07-26 0 514 backlog detail Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: backlog\n-- Name: detail\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n cohead_id, coitem_id, *, currconcat(cohead_curr_id) AS currAbbr,\n CASE WHEN xtindentrole = 0 THEN cohead_number\n END AS coitem_linenumber_qtdisplayrole,\n CASE WHEN xtindentrole = 0 THEN cust_name\n END AS item_number_qtdisplayrole,\n CASE WHEN (coitem_scheddate <= current_date AND qtybalance > 0) THEN 'error' \n WHEN (qtybalance > 0) THEN 'emphasis' \n END AS coitem_scheddate_qtforegroundrole,\n CASE WHEN (xtindentrole = 0) THEN ''\n END AS qtybalance_qtdisplayrole,\n 'qty' AS coitem_qtyord_xtnumericrole,\n 'qty' AS coitem_qtyshipped_xtnumericrole,\n 'qty' AS coitem_qtyreturned_xtnumericrole,\n 'qty' AS qtyatshipping_xtnumericrole,\n 'qty' AS qtybalance_xtnumericrole,\n 'qty' AS qtyavailable_xtnumericrole,\n 'salesprice' AS coitem_price_xtnumericrole,\n 'salesprice' AS baseunitprice_xtnumericrole,\n 'curr' AS extprice_xtnumericrole,\n 'curr' AS baseextprice_xtnumericrole,\n 'curr' AS extpricebalance_xtnumericrole,\n 'curr' AS baseextpricebalance_xtnumericrole,\n 0 AS coitem_qtyord_xttotalrole,\n 0 AS coitem_qtyshipped_xttotalrole,\n 0 AS coitem_qtyreturned_xttotalrole,\n 0 AS qtybalance_xttotalrole,\n 0 AS baseextprice_xttotalrole,\n 0 AS baseextpricebalance_xttotalrole\nFROM (\n SELECT\n 0 AS xtindentrole,\n -- dummy coitem record\n -1 AS coitem_id, NULL::INTEGER AS coitem_cohead_id,\n cohead_number::INTEGER AS coitem_linenumber,NULL::INTEGER AS coitem_itemsite_id,\n NULL::TEXT AS coitem_status, coitem_scheddate,\n getSoSchedDate(cohead_id) AS sort_scheddate,\n NULL::DATE AS coitem_promdate, NULL::NUMERIC AS coitem_qtyord,\n NULL::NUMERIC AS coitem_unitcost, NULL::NUMERIC AS coitem_price,\n NULL::NUMERIC AS coitem_custprice, NULL::NUMERIC AS coitem_qtyshipped,\n NULL::INTEGER AS coitem_order_id, NULL::TEXT AS coitem_memo,\n NULL::BOOLEAN AS coitem_imported, NULL::NUMERIC AS coitem_qtyreturned,\n NULL::TIMESTAMP AS coitem_closedate, NULL::BOOLEAN AS coitem_firm,\n NULL::TEXT AS coitem_custpn, NULL::TEXT AS coitem_order_type,\n NULL::TEXT AS coitem_close_username,\n NULL::TIMESTAMP AS coitem_lastupdated,\n NULL::INTEGER AS coitem_substitute_item_id,\n NULL::TIMESTAMP AS coitem_created, NULL::TEXT AS coitem_creator,\n NULL::NUMERIC AS coitem_prcost,\n NULL::INTEGER AS coitem_qty_uom_id,\n NULL::NUMERIC AS coitem_qty_invuomratio,\n NULL::INTEGER AS coitem_price_uom_id,\n NULL::NUMERIC AS coitem_price_invuomratio,\n NULL::BOOLEAN AS coitem_warranty,\n NULL::INTEGER AS coitem_cos_accnt_id,\n NULL::NUMERIC AS coitem_qtyreserved,\n NULL::INTEGER AS coitem_subnumber,\n cohead.*,\n cust_number, cust_name,\n NULL::TEXT AS item_number, NULL::TEXT AS item_descrip1,\n NULL::TEXT AS itemdescription,\n NULL::TEXT AS uom_name,\n NULL::TEXT AS warehous_code,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS qtybalance,\n NULL::NUMERIC AS baseunitprice,\n NULL::NUMERIC AS extprice,\n NULL::NUMERIC AS baseextprice,\n NULL::NUMERIC AS extpricebalance,\n NULL::NUMERIC AS baseextpricebalance\n\n FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=coitem_qty_uom_id)\n WHERE (coitem_id IN (SELECT coitem_id\n FROM coitem\n WHERE coitem_status = 'O'\n AND coitem_cohead_id=cohead_id\n ORDER BY coitem_scheddate ASC -- TODO: find a better way\n LIMIT 1)\n \n AND (coitem_cohead_id=)\n \n \n AND (cohead_orderdate >= )\n \n \n AND (cohead_orderdate <= )\n \n \n AND (coitem_scheddate >= )\n \n \n AND (coitem_scheddate <= )\n \n \n AND (cohead_salesrep_id=)\n \n \n AND (cohead_shipto_id=)\n \n \n AND (cohead_cust_id=)\n \n \n AND (cust_custtype_id=)\n \n \n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ )))\n \n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n \n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=)))\n \n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ ) )) )\n \n\n \n AND (itemsite_item_id=)\n \n \n AND (item_prodcat_id=)\n \n \n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ )))\n \n\n \n AND (itemsite_warehous_id=)\n \n )\n\n UNION\n\n SELECT \n 1 AS xtindentrole,\n coitem_id, coitem_cohead_id,\n coitem_linenumber,coitem_itemsite_id,\n coitem_status, coitem_scheddate,\n getSoSchedDate(cohead_id) AS sort_scheddate,\n coitem_promdate, coitem_qtyord,\n coitem_unitcost, coitem_price,\n coitem_custprice, coitem_qtyshipped,\n coitem_order_id, coitem_memo,\n coitem_imported, coitem_qtyreturned,\n coitem_closedate, coitem_firm,\n coitem_custpn, coitem_order_type,\n coitem_close_username,\n coitem_lastupdated,\n coitem_substitute_item_id,\n coitem_created, coitem_creator,\n coitem_prcost,\n coitem_qty_uom_id,\n coitem_qty_invuomratio,\n coitem_price_uom_id,\n coitem_price_invuomratio,\n coitem_warranty,\n coitem_cos_accnt_id,\n coitem_qtyreserved,\n coitem_subnumber,\n cohead.*,\n cust_number, cust_name,\n item_number, item_descrip1, (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n uom_name,\n warehous_code,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS qtybalance,\n currtobase(cohead_curr_id, coitem_price, cohead_orderdate) AS baseunitprice,\n round((coitem_qtyord * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio), 2) AS extprice,\n round((coitem_qtyord * coitem_qty_invuomratio) *\n (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) AS baseextprice,\n round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio), 2) AS extpricebalance,\n round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) AS baseextpricebalance\n\n FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=coitem_qty_uom_id)\n WHERE ( (coitem_status='O')\n \n AND (coitem_cohead_id=)\n \n \n AND (cohead_orderdate >= )\n \n \n AND (cohead_orderdate <= )\n \n \n AND (coitem_scheddate >= )\n \n \n AND (coitem_scheddate <= )\n \n \n AND (cohead_salesrep_id=)\n \n \n AND (cohead_shipto_id=)\n \n \n AND (cohead_cust_id=)\n \n \n AND (cust_custtype_id=)\n \n \n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ )))\n \n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n \n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=)))\n \n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ ) )) )\n \n\n \n AND (itemsite_item_id=)\n \n \n AND (item_prodcat_id=)\n \n \n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ )))\n \n\n \n AND (itemsite_warehous_id=)\n \n )\n\n) AS dummy\nORDER BY cohead_number, xtindentrole, coitem_linenumber;\n admin 2013-07-26 0 12 capacityUOMs detail used by dspCapacityUOMsByClassCode, dspCapacityUOMsByProductCategory Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: capacityUOMs\n-- Name: detail\n-- Notes: used by dspCapacityUOMsByClassCode, dspCapacityUOMsByProductCategory\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT item_id, item_number,\n\n classcode_code,\n\n (item_descrip1 || ' ' || item_descrip2) AS descrip,\n uom_name,\n itemcapuom(item_id) AS capuom,\n itemcapinvrat(item_id) AS capinvrat,\n itemaltcapuom(item_id) AS altcapuom,\n itemaltcapinvrat(item_id) AS altcapinvrat,\n 'uomratio' AS capinvrat_xtnumericrole,\n 'uomratio' AS altcapinvrat_xtnumericrole\nFROM item\n JOIN uom ON (item_inv_uom_id=uom_id)\n\n LEFT OUTER JOIN classcode ON (item_classcode_id=classcode_id)\n\nWHERE (\n true item_sold \n\n AND (item_prodcat_id=)\n\n AND (item_prodcat_id IN (SELECT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ )))\n\n AND (classcode_id=)\n\n AND (classcode_code ~ )\n\n)\nORDER BY classcode_code, \n item_number;\n admin 2013-07-26 0 566 contracts detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contracts\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT contrct_id, \n vend_number, vend_name, \n contrct.*,\n CASE WHEN COALESCE(contrct_effective, startOfTime()) <=\n startOfTime() THEN \n END AS contrct_effective_qtdisplayrole,\n CASE WHEN COALESCE(contrct_expires, endOfTime()) >=\n endOfTime() THEN \n END AS contrct_expires_qtdisplayrole,\n CASE WHEN (COALESCE(contrct_expires, endOfTime()) < CURRENT_DATE) THEN 'expired'\n WHEN (COALESCE(contrct_effective, startOfTime()) > CURRENT_DATE) THEN 'future'\n END AS qtforegroundrole,\n (SELECT count(*) FROM itemsrc WHERE (itemsrc_contrct_id=contrct_id)) AS item_count \nFROM contrct JOIN vendinfo ON (vend_id=contrct_vend_id)\nWHERE ((true)\n\n AND (contrct_vend_id=)\n\n\n AND (contrct_effective >= )\n\n\n AND (contrct_effective <= )\n\n\n AND (contrct_expires >= )\n\n\n AND (contrct_expires <= )\n\n\n AND ( (contrct_number ~* )\n OR (COALESCE(contrct_descrip,'') ~* ) )\n\n)\nORDER By vend_number, contrct_number\n;\n admin 2013-07-26 0 293 billingSelections detail used by dspBillingSelections Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: billingSelections\n-- Name: detail\n-- Notes: used by dspBillingSelections\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cobmisc_id, cohead_id,\n cohead_number, cust_number, cust_name,\n sum(round(coitem_price*cobill_qty,2)) AS subtotal,\n cobmisc_misc, cobmisc_freight, calcCobmiscTax(cobmisc_id) AS cobmisc_tax, cobmisc_payment,\n (sum(round(coitem_price * cobill_qty, 2)) +\n cobmisc_misc + cobmisc_freight +\n calcCobmiscTax(cobmisc_id)) AS total,\n 'curr' AS subtotal_xtnumericrole,\n 'curr' AS total_xtnumericrole,\n 'curr' AS cobmisc_misc_xtnumericrole,\n 'curr' AS cobmisc_freight_xtnumericrole,\n 'curr' AS cobmisc_tax_xtnumericrole,\n 'curr' AS cobmisc_payment_xtnumericrole\nFROM cobmisc, cohead, custinfo, coitem, cobill\nWHERE ((cobmisc_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (coitem_cohead_id=cohead_id)\n AND (cobill_coitem_id=coitem_id)\n AND (NOT cobmisc_posted))\nGROUP BY cobmisc_id, cohead_id, cohead_number, cust_number,\n cust_name, cobmisc_misc, cobmisc_freight, cobmisc_tax, cobmisc_payment\nORDER BY cohead_number;\n admin 2013-07-26 0 65 checks detail used by printChecks Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: checks\n-- Name: detail\n-- Notes: used by printChecks\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT checkhead.*, form_report_name AS report_name\nFROM checkhead\nLEFT OUTER JOIN vendinfo ON((checkhead_recip_id = vend_id)\n AND (checkhead_recip_type = 'V'))\nLEFT OUTER JOIN custinfo ON((checkhead_recip_id = cust_id)\n AND (checkhead_recip_type = 'C'))\nLEFT OUTER JOIN taxauth ON((checkhead_recip_id = taxauth_id)\n AND (checkhead_recip_type = 'T')),\n bankaccnt, form\nWHERE ( (checkhead_bankaccnt_id=bankaccnt_id)\n AND (bankaccnt_check_form_id=form_id)\n\n AND (NOT checkhead_printed)\n AND (NOT checkhead_void)\n\n\n AND (bankaccnt_id=)\n\n )\n\nORDER BY checkhead_recip_type DESC, COALESCE(vend_name, cust_name, taxauth_name)\n\nORDER BY checkhead_recip_type DESC, COALESCE(vend_number, cust_number, taxauth_code)\n\n\nLIMIT \n\n;\n admin 2013-07-26 0 297 costedBOM detail used by dspCostedIndentedBOM, dspCostedSingleLevelBOM, dspCostedSummarizedBOM Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: costedBOM\n-- Name: detail\n-- Notes: used by dspCostedIndentedBOM, dspCostedSingleLevelBOM, dspCostedSummarizedBOM\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n\n bomdata_bomwork_id AS id,\n\n bomdata_bomitem_id AS id,\n\n -1,\n\n \n\n CASE WHEN bomdata_bomwork_parent_id = -1 AND bomdata_bomwork_id = -1 THEN -1\n ELSE bomdata_item_id\n END AS altid,\n\n CASE WHEN (bomdata_bomitem_id = -1) THEN -1\n ELSE bomdata_item_id\n END AS altid,\n\n *,\n\n\n bomdata_stdunitcost AS unitcost,\n bomdata_stdextendedcost AS extendedcost,\n\n bomdata_actunitcost AS unitcost,\n bomdata_actextendedcost AS extendedcost,\n\n\n 'qty' AS bomdata_batchsize_xtnumericrole,\n 'qty' AS bomdata_qtyfxd_xtnumericrole,\n 'qtyper' AS bomdata_qtyper_xtnumericrole,\n 'percent' AS bomdata_scrap_xtnumericrole,\n 'qtyper' AS bomdata_qtyreq_xtnumericrole,\n 'cost' AS unitcost_xtnumericrole,\n 'cost' AS extendedcost_xtnumericrole,\n CASE WHEN COALESCE(bomdata_effective, startOfTime()) <= startOfTime() THEN \n END AS bomdata_effective_qtdisplayrole,\n CASE WHEN COALESCE(bomdata_expires, endOfTime()) <= endOfTime() THEN \n END AS bomdata_expires_qtdisplayrole,\n CASE WHEN bomdata_expired THEN 'expired'\n WHEN bomdata_future THEN 'future'\n END AS qtforegroundrole\n\n , bomdata_bomwork_level - 1 AS xtindentrole\n\n , 0 AS extendedcost_xttotalrole\n\nFROM\n\n indentedbom(, , 0, 0);\n\n singlelevelbom(, , 0, 0);\n\n summarizedBOM(, , , );\n\n admin 2013-07-26 0 296 briefSalesHistory detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: briefSalesHistory\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n COALESCE(cohead_id,-1) AS cohead_id, cust_id, cohist_ponumber,\n cust_custtype_id, custtype_code,\n cohist_cust_id, SUM(extcost) AS extcost,\n 'curr' AS extcost_xtnumericrole,\n 0 AS extcost_xttotalrole,\n cohist_ordernumber,\n cust_number, cust_name, invoicenumber,\n cohist_orderdate, cohist_invcdate,\n SUM(baseextprice) AS extended,\n 'curr' AS extended_xtnumericrole,\n 0 AS extended_xttotalrole\nFROM saleshistory\n LEFT OUTER JOIN cohead ON (cohead_number=cohist_ordernumber)\nWHERE ((cohist_invcdate BETWEEN AND )\n\n AND (cohist_cust_id=)\n\n\n AND (cohist_shipto_id=)\n\n\n AND (cust_custtype_id=)\n\n\n AND (custtype_code ~ )\n\n\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=)))\n\n\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ ) )) )\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (itemsite_item_id=)\n\n\n AND (item_prodcat_id=)\n\n\n AND (item_prodcat_id IN (SELECT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ )))\n\n\n AND (cohist_salesrep_id=)\n\n )\nGROUP BY cohead_id, cust_id,cust_number,cust_custtype_id,cohist_cust_id,custtype_code,\n cust_name,cohist_ordernumber, cohist_ponumber,\n invoicenumber,cohist_orderdate, cohist_invcdate\nORDER BY cohist_invcdate, cohist_orderdate;\n admin 2013-07-26 0 494 contactmerge contactused Checks to see if this contact is used anywhere Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: contactused\n-- Notes: Checks to see if this contact is used anywhere\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntctused() AS used;\n admin 2013-07-26 0 298 countSlip detail used by dspCountSlipEditList, dspCountSlipsByWarehouse Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: countSlip\n-- Name: detail\n-- Notes: used by dspCountSlipEditList, dspCountSlipsByWarehouse\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntslip_id,\n CASE WHEN (cntslip_posted) THEN 1\n ELSE 0\n END,\n cntslip_username AS user,\n\n toNumeric(cntslip_number, 0) AS cntslip_number,\n cntslip_number AS cntslip_number_qtdisplayrole,\n\n cntslip_number,\n\n CASE WHEN (cntslip_location_id=-1) THEN ''\n ELSE formatLocationName(cntslip_location_id)\n END AS locname,\n invcnt_tagnumber,\n\n warehous_code,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS descrip,\n\n cntslip_lotserial, cntslip_posted,\n cntslip_entered, cntslip_qty,\n 'qty' AS cntslip_qty_xtnumericrole,\n cntslip_posted AS posted\nFROM cntslip, invcnt\n\n JOIN itemsite ON (invcnt_itemsite_id=itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n JOIN whsinfo ON (itemsite_warehous_id=warehous_id)\n\nWHERE ((cntslip_cnttag_id=invcnt_id)\n\n AND (cntslip_entered BETWEEN AND (::DATE + 1))\n \n AND (cntslip_posted)\n \n \n AND (itemsite_warehous_id=)\n \n\n AND (NOT invcnt_posted)\n AND (invcnt_id=)\n\n )\nORDER BY cntslip_number;\n admin 2013-07-26 0 299 countTag detail used by dspCountTagEditList Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: countTag\n-- Name: detail\n-- Notes: used by dspCountTagEditList\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n CASE WHEN (xtindentrole = 1) THEN NULL\n \n WHEN (ABS(variancecost) > ) THEN 'error'\n \n WHEN (ABS(varianceprcnt * 100.0) > ) THEN 'error'\n \n ELSE NULL\n \n END AS qtforegroundrole,\n CASE WHEN (xtindentrole = 1) THEN NULL\n WHEN (qohafter IS NOT NULL) THEN 'emphasis'\n END AS qohafter_qtforegroundrole,\n CASE WHEN (xtindentrole = 0) THEN NULL ELSE '' END AS invcnt_priority_qtdisplayrole,\n 'qty' AS qoh_xtnumericrole,\n 'qty' AS qohafter_xtnumericrole,\n 'qty' AS variance_xtnumericrole,\n 'percent' AS varianceprcnt_xtnumericrole,\n 'curr' AS variancecost_xtnumericrole\nFROM (\n SELECT invcnt_id, -1 AS cntslip_id, invcnt_priority,\n COALESCE(invcnt_tagnumber, 'Misc.') AS tagnumber,\n invcnt_tagdate AS tagdate,\n item_number, (item_descrip1 || item_descrip2) AS item_descrip, warehous_code,\n\t CASE WHEN (location_id IS NOT NULL) THEN\n location_name\n ELSE END AS loc_specific,\n CASE WHEN (invcnt_location_id IS NOT NULL)\n THEN (SELECT SUM(itemloc_qty)\n FROM itemloc JOIN location ON (location_id=itemloc_location_id)\n WHERE ((itemloc_itemsite_id=itemsite_id)\n AND (itemloc_location_id=invcnt_location_id)\n AND (location_netable)))\n ELSE itemsite_qtyonhand\n END AS qoh,\n CASE WHEN (invcnt_location_id IS NOT NULL)\n THEN (SELECT SUM(itemloc_qty)\n FROM itemloc JOIN location ON (location_id=itemloc_location_id)\n WHERE ((itemloc_itemsite_id=itemsite_id)\n AND (itemloc_location_id=invcnt_location_id)\n AND (NOT location_netable)))\n ELSE itemsite_nnqoh\n END AS nnqoh,\n \n calcTotalSlipQty(invcnt_id) AS qohafter,\n (calcTotalSlipQty(invcnt_id) - (itemsite_qtyonhand + itemsite_nnqoh)) AS variance,\n CASE WHEN (calcTotalSlipQty(invcnt_id) IS NULL) THEN NULL\n WHEN (((itemsite_qtyonhand + itemsite_nnqoh) = 0) AND (calcTotalSlipQty(invcnt_id) > 0)) THEN 1\n WHEN (((itemsite_qtyonhand + itemsite_nnqoh) = 0) AND (calcTotalSlipQty(invcnt_id) < 0)) THEN -1\n WHEN (((itemsite_qtyonhand + itemsite_nnqoh) = 0) AND (calcTotalSlipQty(invcnt_id) = 0)) THEN 0\n ELSE ((1 - (calcTotalSlipQty(invcnt_id) / (itemsite_qtyonhand + itemsite_nnqoh))) * -1)\n END AS varianceprcnt,\n (itemCost(itemsite_id) * (calcTotalSlipQty(invcnt_id) - (itemsite_qtyonhand + itemsite_nnqoh))) AS variancecost,\n \n COALESCE(invcnt_qoh_after, 0.0) AS qohafter,\n (invcnt_qoh_after - (itemsite_qtyonhand + itemsite_nnqoh)) AS variance,\n CASE WHEN (invcnt_qoh_after IS NULL) THEN NULL\n WHEN (((itemsite_qtyonhand + itemsite_nnqoh) = 0) AND (invcnt_qoh_after > 0)) THEN 1\n WHEN (((itemsite_qtyonhand + itemsite_nnqoh) = 0) AND (invcnt_qoh_after < 0)) THEN -1\n WHEN (((itemsite_qtyonhand + itemsite_nnqoh) = 0) AND (invcnt_qoh_after = 0)) THEN 0\n ELSE ((1 - (invcnt_qoh_after / (itemsite_qtyonhand + itemsite_nnqoh))) * -1)\n END AS varianceprcnt,\n (itemCost(itemsite_id) * (invcnt_qoh_after - (itemsite_qtyonhand + itemsite_nnqoh))) AS variancecost,\n \n item_number AS orderby,\n 0 AS xtindentrole\n FROM invcnt LEFT OUTER JOIN location ON (invcnt_location_id=location_id),\n item, whsinfo, itemsite\n WHERE ((invcnt_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (NOT invcnt_posted)\n \n AND (itemsite_warehous_id=)\n \n \n AND (item_classcode_id=)\n \n AND (item_classcode_id IN (SELECT classcode_id FROM classcode WHERE (classcode_code ~ )))\n \n AND (itemsite_plancode_id=)\n \n AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ )))\n \n \n )\n UNION\n SELECT invcnt_id, cntslip_id, invcnt_priority,\n cntslip_number AS tagnumber,\n cntslip_entered AS tagdate,\n CASE WHEN (cntslip_posted) THEN \n ELSE \n END AS item_number,\n '' AS item_descrip,\n '' AS warehous_code,\n '' AS loc_specific,\n NULL AS qoh,\n NULL AS nnqoh,\n cntslip_qty AS qohafter,\n NULL AS variance, NULL AS varianceprcnt, 0 AS variancecost,\n item_number AS orderby,\n 1 AS xtindentrole\n FROM cntslip, invcnt, itemsite, item\n WHERE ((cntslip_cnttag_id=invcnt_id)\n AND (invcnt_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (NOT invcnt_posted)\n \n AND (itemsite_warehous_id=)\n \n \n AND (item_classcode_id=)\n \n AND (item_classcode_id IN (SELECT classcode_id FROM classcode WHERE (classcode_code ~ )))\n \n AND (itemsite_plancode_id=)\n \n AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ )))\n \n \n )\n) AS dummy\nORDER BY invcnt_priority DESC, orderby, invcnt_id, cntslip_id;\n admin 2013-07-26 0 497 contactmerge merged Lists all merged contacts Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: merged\n-- Notes: Lists all merged contacts\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntct_id,\n CASE\n WHEN (cntctUsed(cntctmrgd_cntct_id)=false) THEN\n 3 -- Already merged contact\n ELSE\n 4 -- Already merged contact, but still has relationships\n END AS status,\n cntct.*,crmacct_number,crmacct_name,addr.*, \n 0 AS xtindentrole,\n CASE\n WHEN (cntctUsed(cntctmrgd_cntct_id)=false) THEN\n 'warning' -- Already merged contact\n ELSE\n 'error' -- Already merged contact, but still has relationships\n END AS qtforegroundrole\nFROM cntct\n JOIN cntctmrgd ON (cntct_id=cntctmrgd_cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n LEFT OUTER JOIN crmacct ON (cntct_crmacct_id=crmacct_id);\n admin 2013-07-26 0 515 countTags create used by createCountTagsByParameterList Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: countTags\n-- Name: create\n-- Notes: used by createCountTagsByParameterList\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT createCountTag(itemsite_id, , , , )\nFROM ( SELECT itemsite_id\n FROM itemsite JOIN item ON (item_id=itemsite_item_id)\n\n JOIN itemloc ON ( (itemloc_location_id=)\n AND (itemloc_itemsite_id = itemsite_id)\n AND (validLocation(, itemsite_id)) )\n\n WHERE (itemsite_active)\n AND (item_active)\n\n AND (itemsite_warehous_id=)\n\n\n AND (item_classcode_id=)\n\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ )))\n\n\n AND (itemsite_plancode_id=)\n\n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n\n\n AND (itemsite_qtyonhand <> 0.0)\n\n ORDER BY item_number ) AS data;\n admin 2013-07-26 0 15 countTags detail used by dspCountTagsByClassCode, dspCountTagsByItem, dspCountTagsByWarehouse Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: countTags\n-- Name: detail\n-- Notes: used by dspCountTagsByClassCode, dspCountTagsByItem, dspCountTagsByWarehouse\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT invcnt_id, invcnt_tagnumber, warehous_code,\n item_number, (item_descrip1 || item_descrip2) AS item_descrip,\n invcnt_tagdate,\n CASE WHEN invcnt_tagdate IS NOT NULL THEN invcnt_tag_username\n END AS creator,\n invcnt_cntdate,\n CASE WHEN invcnt_cntdate IS NOT NULL THEN invcnt_cnt_username\n END AS counter,\n invcnt_postdate,\n CASE WHEN invcnt_postdate IS NOT NULL THEN invcnt_post_username\n END AS poster,\n CASE WHEN (NOT invcnt_posted) THEN NULL\n ELSE invcnt_qoh_before\n END AS qohbefore,\n invcnt_qoh_after,\n CASE WHEN (NOT invcnt_posted) THEN NULL\n ELSE (invcnt_qoh_after - invcnt_qoh_before)\n END AS variance,\n CASE WHEN (NOT invcnt_posted) THEN NULL\n WHEN ((invcnt_qoh_before = 0) AND (invcnt_qoh_after = 0)) THEN 0\n WHEN (invcnt_qoh_before = 0) THEN 1\n ELSE ((1 - (invcnt_qoh_after / invcnt_qoh_before)) * -1)\n END AS percent,\n 'qty' AS qohbefore_xtnumericrole,\n 'qty' AS invcnt_qoh_after_xtnumericrole,\n 'qty' AS variance_xtnumericrole,\n 'percent' AS percent_xtnumericrole \nFROM invcnt, itemsite, item, whsinfo\nWHERE ((invcnt_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (DATE(invcnt_tagdate) BETWEEN \n AND )\n\n AND invcnt_posted\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (item_classcode_id=)\n\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ )))\n\n\n AND (item_id=)\n\n)\nORDER BY invcnt_tagdate;\n admin 2013-07-26 0 16 creditCards detail used by cashReceipt, customer, salesOrder Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: creditCards\n-- Name: detail\n-- Notes: used by cashReceipt, customer, salesOrder\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT ccard_id, ccard_seq,\n CASE WHEN (ccard_type='M') THEN \n WHEN (ccard_type='V') THEN \n WHEN (ccard_type='A') THEN \n WHEN (ccard_type='D') THEN \n ELSE \n END AS type,\n formatccnumber(decrypt(setbytea(ccard_number),\n setbytea(), 'bf')) AS f_number,\n ccard_active,\n formatbytea(decrypt(setbytea(ccard_name),\n setbytea(), 'bf')) AS ccard_name,\n formatbytea(decrypt(setbytea(ccard_month_expired),\n setbytea(), 'bf')) ||\n '-' ||\n formatbytea(decrypt(setbytea(ccard_year_expired),\n setbytea(),\n 'bf')) AS expiration \nFROM ccard \nWHERE ((ccard_cust_id=) \n\n AND (ccard_type=)\n\n\n AND (ccard_active)\n\n)\nORDER BY ccard_seq;\n admin 2013-07-26 0 499 contactmerge populate Queries selected contact info Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: contactmerge\n-- Name: populate\n-- Notes: Queries selected contact info\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cntct.*,\n crmacct_number,\n crmacct_name,\n addr.*,\n CASE WHEN cntctsel_mrg_first_name THEN 'emphasis' END AS cntct_first_name_qtforegroundrole,\n CASE WHEN cntctsel_mrg_last_name THEN 'emphasis' END AS cntct_last_name_qtforegroundrole,\n CASE WHEN cntctsel_mrg_honorific THEN 'emphasis' END AS cntct_honorific_qtforegroundrole,\n CASE WHEN cntctsel_mrg_initials THEN 'emphasis' END AS cntct_initials_qtforegroundrole,\n CASE WHEN cntctsel_mrg_phone THEN 'emphasis' END AS cntct_phone_qtforegroundrole,\n CASE WHEN cntctsel_mrg_phone2 THEN 'emphasis' END AS cntct_phone2_qtforegroundrole,\n CASE WHEN cntctsel_mrg_fax THEN 'emphasis' END AS cntct_fax_qtforegroundrole,\n CASE WHEN cntctsel_mrg_email THEN 'emphasis' END AS cntct_email_qtforegroundrole,\n CASE WHEN cntctsel_mrg_webaddr THEN 'emphasis' END AS cntct_webaddr_qtforegroundrole,\n CASE WHEN cntctsel_mrg_notes THEN 'emphasis' END AS cntct_notes_qtforegroundrole,\n CASE WHEN cntctsel_mrg_title THEN 'emphasis' END AS cntct_title_qtforegroundrole,\n CASE WHEN cntctsel_mrg_middle THEN 'emphasis' END AS cntct_middle_qtforegroundrole,\n CASE WHEN cntctsel_mrg_suffix THEN 'emphasis' END AS cntct_suffix_qtforegroundrole,\n CASE WHEN cntctsel_mrg_owner_username THEN 'emphasis' END AS cntct_owner_username_qtforegroundrole,\n CASE WHEN cntctsel_mrg_crmacct_id THEN 'emphasis' END AS crmacct_number_qtforegroundrole,\n CASE WHEN cntctsel_mrg_crmacct_id THEN 'emphasis' END AS crmacct_name_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_line1_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_line2_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_line3_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_city_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_state_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_postalcode_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_country_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_notes_qtforegroundrole,\n CASE WHEN cntctsel_mrg_addr_id THEN 'emphasis' END AS addr_number_qtforegroundrole\nFROM cntctsel\n JOIN cntct ON (cntctsel_cntct_id=cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n LEFT OUTER JOIN crmacct ON (cntct_crmacct_id=crmacct_id)\nWHERE (cntctsel_target=);\n admin 2013-07-26 0 373 creditMemo editlist used by creditMemoEditList Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: creditMemo\n-- Name: editlist\n-- Notes: used by creditMemoEditList\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n ('C/M-' || formatCreditMemoNumber(cmhead_id)) AS docnumber,\n currConcat(curr_id) AS currabbr,\n CASE WHEN seq != 0 THEN ''\n END AS docnumber_qtdisplayrole,\n 'qty' AS qtytobill_xtnumericrole,\n 'price' AS price_xtnumericrole,\n 'curr' AS extprice_xtnumericrole,\n CASE WHEN namedescrip = THEN 'error' END AS qtforegroundrole\nFROM (\n\nSELECT cmhead_id, -1 AS altid,\n cmhead_number AS ordernumber,\n cust_number AS custitemnumber,\n cmhead_billtoname AS namedescrip,\n CAST(NULL AS TEXT) AS uom_name,\n CAST(NULL AS NUMERIC) AS qtytobill,\n CAST(NULL AS NUMERIC) AS price,\n CAST(NULL AS NUMERIC) AS extprice,\n cmhead_curr_id AS curr_id,\n 0 AS cmitem_linenumber, 0 AS xtindentrole, 0 AS seq\nFROM cmhead JOIN custinfo ON (cmhead_cust_id=cust_id)\nWHERE ((NOT cmhead_posted)\n AND (NOT cmhead_hold))\n\nUNION\nSELECT cmhead_id, cmitem_id,\n NULL, item_number,\n item_descrip1,\n uom_name, cmitem_qtycredit * cmitem_qty_invuomratio,\n cmitem_unitprice / cmitem_price_invuomratio,\n cmitem_qtycredit * cmitem_qty_invuomratio * cmitem_unitprice / cmitem_price_invuomratio,\n cmhead_curr_id AS curr_id,\n cmitem_linenumber, 1 AS xtindentrole, 1 AS seq\nFROM cmhead, cmitem, itemsite, item, uom\nWHERE ((NOT cmhead_posted)\n AND (NOT cmhead_hold)\n AND (cmhead_id=cmitem_cmhead_id)\n AND (cmitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id))\n\nUNION\nSELECT cmhead_id, -1,\n NULL, ,\n COALESCE((SELECT formatGLAccountLong(accnt_id)\n FROM accnt, salesaccnt\n WHERE ((salesaccnt_sales_accnt_id=accnt_id)\n AND (salesaccnt_id=findSalesAccnt(itemsite_id, 'IS', cmhead_cust_id,\n cmhead_saletype_id, cmhead_shipzone_id)))), ),\n NULL, NULL, NULL,\n cmitem_qtycredit * cmitem_qty_invuomratio * cmitem_unitprice / cmitem_price_invuomratio,\n cmhead_curr_id AS curr_id,\n cmitem_linenumber, 2 AS xtindentrole, 2 AS seq\nFROM cmhead, cmitem, itemsite, item, uom\nWHERE ((NOT cmhead_posted)\n AND (NOT cmhead_hold)\n AND (cmhead_id=cmitem_cmhead_id)\n AND (cmitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id))\n\nUNION\nSELECT cmhead_id, -1,\n NULL, ,\n CASE WHEN (accnt_id IS NULL) THEN \n ELSE formatGLAccountLong(accnt_id)\n END,\n NULL, NULL, cmhead_freight,\n cmhead_freight,\n cmhead_curr_id AS curr_id,\n 99999, 1 AS xtindentrole, 3 AS seq\nFROM cmhead LEFT OUTER JOIN accnt ON (accnt_id=findFreightAccount(cmhead_cust_id))\nWHERE ((NOT cmhead_posted)\n AND (NOT cmhead_hold)\n AND (cmhead_freight <> 0))\n\nUNION\nSELECT cmhead_id, -1,\n NULL, ,\n formatGLAccountLong(cmhead_misc_accnt_id),\n NULL, NULL, cmhead_misc,\n cmhead_misc,\n cmhead_curr_id AS curr_id,\n 99999, 1 AS xtindentrole, 4 AS seq\nFROM cmhead LEFT OUTER JOIN accnt ON (accnt_id=findFreightAccount(cmhead_cust_id))\nWHERE ((NOT cmhead_posted)\n AND (NOT cmhead_hold)\n AND (cmhead_misc <> 0))\n\nUNION\nSELECT cmhead_id, -1,\n NULL, ,\n CASE WHEN (tax_sales_accnt_id IS NULL) THEN \n ELSE formatGLAccountLong(tax_sales_accnt_id)\n END,\n NULL, NULL, SUM(taxhist_tax * -1.0),\n SUM(taxhist_tax * -1.0),\n cmhead_curr_id AS curr_id,\n 99999, 1 AS xtindentrole, 5 AS seq\nFROM cmhead JOIN cmheadtax ON ((taxhist_parent_id=cmhead_id) AND (taxhist_tax <> 0.0))\n JOIN tax ON (tax_id=taxhist_tax_id)\nWHERE ((NOT cmhead_posted)\n AND (NOT cmhead_hold))\nGROUP BY cmhead_id, tax_sales_accnt_id, cmhead_curr_id\n\nUNION\nSELECT cmhead_id, -1,\n NULL, ,\n CASE WHEN (tax_sales_accnt_id IS NULL) THEN \n ELSE formatGLAccountLong(tax_sales_accnt_id)\n END,\n NULL, NULL, SUM(taxhist_tax * -1.0),\n SUM(taxhist_tax * -1.0),\n cmhead_curr_id AS curr_id,\n 99999, 1 AS xtindentrole, 5 AS seq\nFROM cmhead JOIN cmitem ON (cmitem_cmhead_id=cmhead_id)\n JOIN cmitemtax ON ((taxhist_parent_id=cmitem_id) AND (taxhist_tax <> 0.0))\n JOIN tax ON (tax_id=taxhist_tax_id)\nWHERE ((NOT cmhead_posted)\n AND (NOT cmhead_hold))\nGROUP BY cmhead_id, tax_sales_accnt_id, cmhead_curr_id\n\nUNION\nSELECT cmhead_id, -1,\n NULL, ,\n CASE WHEN (accnt_id IS NULL) THEN \n ELSE formatGLAccountLong(accnt_id)\n END,\n NULL, NULL, NULL,\n SUM((cmitem_qtycredit * cmitem_qty_invuomratio) *\n (cmitem_unitprice / cmitem_price_invuomratio)) +\n cmhead_freight + cmhead_misc +\n (SELECT COALESCE(SUM(taxhist_tax * -1.0), 0.0) FROM cmheadtax WHERE (taxhist_parent_id=cmhead_id)) +\n (SELECT COALESCE(SUM(taxhist_tax * -1.0), 0.0) FROM cmitem JOIN cmitemtax ON (taxhist_parent_id=cmitem_id)\n WHERE (cmitem_cmhead_id=cmhead_id))\n AS extprice,\n cmhead_curr_id AS curr_id,\n 99999, 1 AS xtindentrole, 6 AS seq\nFROM cmhead LEFT OUTER JOIN cmitem ON (cmhead_id=cmitem_cmhead_id)\n LEFT OUTER JOIN accnt ON (accnt_id=findARAccount(cmhead_cust_id))\nWHERE ((NOT cmhead_posted)\n AND (NOT cmhead_hold))\nGROUP BY cmhead_id, cmhead_cust_id, cmhead_freight, cmhead_misc, accnt_id, cmhead_curr_id\n\n) AS dummy\nORDER BY docnumber, cmitem_linenumber, seq;\n admin 2013-07-26 0 17 creditMemoCreditCards detail used by arWorkBench, returnAuthorization, returnAuthorizationWorkbench Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: creditMemoCreditCards\n-- Name: detail\n-- Notes: used by arWorkBench, returnAuthorization, returnAuthorizationWorkbench\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cmhead_number, cmhead_freight, cmhead_curr_id,\n SUM(ROUND((cmitem_qtycredit * cmitem_qty_invuomratio) * \n (cmitem_unitprice / cmitem_price_invuomratio), 2)) +\n cmhead_freight + cmhead_misc +\n COALESCE( (SELECT SUM(tax) * -1 AS tax FROM\n (SELECT ROUND(SUM(taxdetail_tax), 2) AS tax\n FROM tax\n JOIN calculateTaxDetailSummary('CM', , 'T') ON (taxdetail_tax_id=tax_id)\n GROUP BY tax_id) AS data), 0) AS total,\n COALESCE( (SELECT SUM(tax) * -1 AS tax FROM\n (SELECT ROUND(SUM(taxdetail_tax), 2) AS tax\n FROM tax\n JOIN calculateTaxDetailSummary('CM', , 'T') ON (taxdetail_tax_id=tax_id)\n GROUP BY tax_id) AS data), 0) AS tax_in_cmcurr,\n ccard_id, ccard_seq, ccpay_id,\n cohead_number\nFROM ccard, cmitem, cmhead LEFT OUTER JOIN\n rahead ON (cmhead_rahead_id=rahead_id) LEFT OUTER JOIN\n cohead ON (rahead_orig_cohead_id=cohead_id) LEFT OUTER JOIN\n ccpay ON (ccpay_order_number=cohead_number AND ccpay_type='C')\nWHERE ((cmitem_cmhead_id=cmhead_id)\n AND (cmhead_cust_id=ccard_cust_id)\n AND (ccard_active)\n AND (ccpay_ccard_id=ccard_id OR ccpay_ccard_id IS NULL)\n AND (cmhead_id=))\nGROUP BY cmhead_number, cmhead_curr_id, cmhead_freight,\n cmhead_misc, ccard_id, ccard_seq, ccpay_id,\n\t cohead_number\nORDER BY ccpay_id DESC, ccard_seq \nLIMIT 1;\n admin 2013-07-26 0 150 crm strictcountrycheck select details about countries used throughout the database that do not match country.country_name Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: crm\n-- Name: strictcountrycheck\n-- Notes: select details about countries used throughout the database\n-- that do not match country.country_name\n--\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT SUM(counter) AS counter FROM (\n\n SELECT COUNT(*) AS counter\n addr_id, 'Address' AS type, addr_number AS number, addr_country AS country, '' AS detail\n \n FROM addr\n WHERE addr_country != ''\n AND addr_country NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n UNION ALL\n SELECT COUNT(*)\n cmhead_id, 'Credit Memo', cmhead_number, cmhead_billtocountry, 'Bill-To'\n \n FROM cmhead\n WHERE cmhead_billtocountry != ''\n AND cmhead_billtocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (NOT cmhead_posted) \n UNION ALL\n SELECT COUNT(*)\n cmhead_id, 'Credit Memo', cmhead_number, cmhead_billtocountry, 'Ship-To'\n \n FROM cmhead\n WHERE cmhead_shipto_country != ''\n AND cmhead_shipto_country NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (NOT cmhead_posted) \n UNION ALL\n SELECT COUNT(*)\n invchead_id, 'Invoice', invchead_invcnumber, invchead_billto_country, 'Bill-To'\n \n FROM invchead\n WHERE invchead_billto_country != ''\n AND invchead_billto_country NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (NOT invchead_posted) \n UNION ALL\n SELECT COUNT(*)\n invchead_id, 'Invoice', invchead_invcnumber, invchead_shipto_country, 'Ship-To'\n \n FROM invchead\n WHERE invchead_shipto_country != ''\n AND invchead_shipto_country NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (NOT invchead_posted) \n UNION ALL\n SELECT COUNT(*)\n quhead_id, 'Quote', quhead_number, quhead_billtocountry, 'Bill-To'\n \n FROM quhead\n WHERE quhead_billtocountry != ''\n AND quhead_billtocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (quhead_expire>=CURRENT_DATE) \n UNION ALL\n SELECT COUNT(*)\n quhead_id, 'Quote', quhead_number, quhead_shiptocountry, 'Ship-To'\n \n FROM quhead\n WHERE quhead_shiptocountry != ''\n AND quhead_shiptocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n AND (quhead_expire>=CURRENT_DATE) \n UNION ALL\n SELECT COUNT(*)\n cohead_id, 'Sales Order', cohead_number, cohead_billtocountry, 'Bill-To'\n \n FROM cohead\n WHERE cohead_billtocountry != ''\n AND cohead_billtocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n \n AND cohead_id IN (SELECT coitem_cohead_id\n FROM coitem\n WHERE COALESCE(coitem_status, 'O')='O')\n \n UNION ALL\n SELECT COUNT(*)\n cohead_id, 'Sales Order', cohead_number, cohead_shiptocountry, 'Ship-To'\n \n FROM cohead\n WHERE cohead_shiptocountry != ''\n AND cohead_shiptocountry NOT IN (SELECT country_name\n FROM country\n WHERE country_name IS NOT NULL)\n \n AND cohead_id IN (SELECT coitem_cohead_id\n FROM coitem\n WHERE COALESCE(coitem_status, 'O')='O')\n \n\n\n) AS dummy;\n\n admin 2013-07-26 0 540 crmaccountmerge pickdatasources Show the records the user has selected to merge crm accounts. Emphasize the particular fields in each record that s/he has selected. Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: crmaccountmerge\n-- Name: pickdatasources\n-- Notes: Show the records the user has selected to merge crm accounts. Emphasize\n-- the particular fields in each record that s/he has selected.\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT c.crmacct_id,\n crmacctsel_dest_crmacct_id,\n c.crmacct_active,\n formatCntctName(c.crmacct_cntct_id_1) AS primary,\n formatCntctName(c.crmacct_cntct_id_2) AS secondary,\n c.crmacct_competitor_id IS NOT NULL AS competitor,\n c.crmacct_cust_id IS NOT NULL AS cust,\n c.crmacct_emp_id IS NOT NULL AS emp,\n c.crmacct_name,\n c.crmacct_number,\n c.crmacct_owner_username AS owner,\n p.crmacct_number AS parent,\n c.crmacct_partner_id IS NOT NULL AS partner,\n c.crmacct_prospect_id IS NOT NULL AS prospect,\n c.crmacct_salesrep_id IS NOT NULL AS salesrep,\n c.crmacct_taxauth_id IS NOT NULL AS taxauth,\n c.crmacct_type,\n c.crmacct_usr_username IS NOT NULL AS usr,\n c.crmacct_vend_id IS NOT NULL AS vend,\n trim(firstline(c.crmacct_notes)) AS notes,\n\n CASE crmacctsel_src_crmacct_id=crmacctsel_dest_crmacct_id\n WHEN true THEN '#ccc'\n END AS qtbackgroundrole,\n\n CASE WHEN c.crmacct_active IS NULL THEN END AS crmacct_active_qtdisplayrole,\n CASE WHEN COALESCE(formatCntctName(c.crmacct_cntct_id_1), '') = '' THEN END AS primary_qtdisplayrole,\n CASE WHEN COALESCE(formatCntctName(c.crmacct_cntct_id_2), '') = '' THEN END AS secondary_qtdisplayrole,\n CASE WHEN COALESCE(c.crmacct_name, '') = '' THEN END AS crmacct_name_qtdisplayrole,\n CASE WHEN COALESCE(c.crmacct_number, '') = '' THEN END AS crmacct_number_qtdisplayrole,\n CASE WHEN COALESCE(c.crmacct_owner_username, '') = '' THEN END AS owner_qtdisplayrole,\n CASE WHEN COALESCE(p.crmacct_number, '') = '' THEN END AS parent_qtdisplayrole,\n CASE c.crmacct_type WHEN 'I' THEN \n WHEN 'O' THEN \n ELSE END AS crmacct_type_qtdisplayrole,\n CASE WHEN COALESCE(TRIM(firstline(c.crmacct_notes)), '') = '' THEN END AS notes_qtdisplayrole,\n\n CASE WHEN crmacctsel_mrg_crmacct_number THEN 'emphasis' END AS crmacct_number_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_active THEN 'emphasis' END AS crmacct_active_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_cntct_id_1 THEN 'emphasis' END AS primary_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_cntct_id_2 THEN 'emphasis' END AS secondary_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_competitor_id THEN 'emphasis' END AS competitor_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_cust_id THEN 'emphasis' END AS cust_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_emp_id THEN 'emphasis' END AS emp_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_name THEN 'emphasis' END AS crmacct_name_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_owner_username THEN 'emphasis' END AS owner_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_parent_id THEN 'emphasis' END AS parent_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_partner_id THEN 'emphasis' END AS partner_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_prospect_id THEN 'emphasis' END AS prospect_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_salesrep_id THEN 'emphasis' END AS salesrep_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_taxauth_id THEN 'emphasis' END AS taxauth_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_type THEN 'emphasis' END AS crmacct_type_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_usr_username THEN 'emphasis' END AS usr_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_vend_id THEN 'emphasis' END AS vend_qtforegroundrole,\n CASE WHEN crmacctsel_mrg_crmacct_notes THEN 'emphasis' END AS notes_qtforegroundrole,\n\n c.crmacct_cntct_id_1 AS primary_xtidrole,\n c.crmacct_cntct_id_2 AS secondary_xtidrole,\n c.crmacct_cust_id AS cust_xtidrole,\n c.crmacct_emp_id AS emp_xtidrole,\n c.crmacct_parent_id AS parent_xtidrole,\n c.crmacct_prospect_id AS prospect_xtidrole,\n c.crmacct_salesrep_id AS salesrep_xtidrole,\n c.crmacct_taxauth_id AS taxauth_xtidrole,\n c.crmacct_usr_username AS usr_xtidrole,\n c.crmacct_vend_id AS vend_xtidrole,\n\n c.crmacct_notes AS notes_qttooltiprole\n\n FROM crmacct c\n JOIN crmacctsel ON (c.crmacct_id=crmacctsel_src_crmacct_id)\n LEFT OUTER JOIN crmacct p ON (c.crmacct_parent_id=p.crmacct_id)\n WHERE crmacctsel_dest_crmacct_id=\n ORDER BY qtbackgroundrole DESC, c.crmacct_number;\n admin 2013-07-26 0 118 costelem unusedbyitem list the cost elements that can be applied to an item that have not already been applied to that item. takes an item_id and type. Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: costelem\n-- Name: unusedbyitem\n-- Notes: list the cost elements that can be applied to an item that have\n-- not already been applied to that item. takes an item_id and type.\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\n\nSELECT costelem_id, costelem_type\nFROM costelem\nWHERE ((costelem_active)\n AND (NOT costelem_sys\n OR (CASE WHEN fetchMetricBool('Routings') AND\n ( IN ('M', 'F', 'B', 'C', 'T')) THEN\n costelem_type IN ('Direct Labor', 'Overhead', 'Machine Overhead')\n WHEN ( IN ('O', 'P')) THEN\n costelem_type IN ('Material')\n END))\n AND (costelem_id NOT IN (SELECT itemcost_costelem_id\n FROM itemcost\n WHERE ((NOT itemcost_lowlevel)\n AND (itemcost_item_id=))))\n )\nORDER BY costelem_type;\n\n\n\nSELECT costelem_id, costelem_type\nFROM costelem\nWHERE ((costelem_active)\n AND (NOT costelem_sys\n OR (CASE WHEN fetchMetricBool('Routings') AND\n ( IN ('M', 'F', 'B', 'C', 'T')) THEN\n costelem_type IN ('Direct Labor', 'Overhead', 'Machine Overhead')\n WHEN ( IN ('O', 'P')) THEN\n costelem_type IN ('Material')\n END))\n AND (costelem_id NOT IN (SELECT bomitemcost_costelem_id\n FROM bomitemcost\n WHERE ((NOT bomitemcost_lowlevel)\n AND (bomitemcost_bomitem_id=))))\n )\nORDER BY costelem_type;\n\n\n\n admin 2013-07-26 0 541 crmaccountmerge wip show an indented list of crm account merges that have data to purge. this includes those that have been started but not completed as well as those that have been completed but neither purged nor undone. Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: crmaccountmerge\n-- Name: wip\n-- Notes: show an indented list of crm account merges that have\n-- data to purge. this includes those that have been started\n-- but not completed as well as those that have been completed\n-- but neither purged nor undone.\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT\n d.crmacct_id, d.crmacct_id,\n d.crmacct_number, d.crmacct_name,\n d.crmacct_number AS destnumber,\n AS status,\n AS status_qtdisplayrole,\n 0 AS xtindentrole\n FROM crmacct d\n JOIN mrgundo ON (d.crmacct_id=mrgundo_base_id\n AND mrgundo_base_schema='public'\n AND mrgundo_base_table='crmacct')\n\n WHERE d.crmacct_id = \n\nUNION ALL\nSELECT s.crmacct_id, d.crmacct_id,\n s.crmacct_number, s.crmacct_name,\n d.crmacct_number AS destnumber,\n AS status,\n AS status_qtdisplayrole,\n\n 0\n\n 1\n\n FROM crmacct s\n JOIN mrgundo ON (mrgundo_schema='public'\n AND mrgundo_table='crmacct'\n AND mrgundo_pkey_col='crmacct_id'\n AND mrgundo_pkey_id=s.crmacct_id\n AND mrgundo_col IS NULL)\n JOIN crmacct d ON (mrgundo_base_id=d.crmacct_id\n AND mrgundo_base_schema='public')\n\n WHERE d.crmacct_id = \n\nUNION\nSELECT s.crmacct_id, d.crmacct_id,\n s.crmacct_number, s.crmacct_name,\n d.crmacct_number AS destnumber, \n AS status,\n AS status_qtdisplayrole,\n CASE WHEN s.crmacct_id=d.crmacct_id THEN 0\n ELSE 1\n END\n FROM crmacct d\n JOIN crmacctsel ON (d.crmacct_id=crmacctsel_dest_crmacct_id)\n JOIN crmacct s ON (crmacctsel_src_crmacct_id=s.crmacct_id)\n\n WHERE d.crmacct_id = \n\n\nORDER BY destnumber, xtindentrole, crmacct_number;\n admin 2013-07-26 0 300 crmaccounts detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: crmaccounts\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT ON (crmacct_number)\n crmacct_id AS id, crmacct_number, crmacct_name, crmacct_owner_username,\n cntct.*, addr.*,\n (crmacct_cust_id IS NOT NULL) AS cust,\n (crmacct_prospect_id IS NOT NULL) AS prospect,\n (crmacct_vend_id IS NOT NULL) AS vend,\n (crmacct_competitor_id IS NOT NULL) AS competitor,\n (crmacct_partner_id IS NOT NULL) AS partner,\n (crmacct_taxauth_id IS NOT NULL) AS taxauth,\n (crmacct_usr_username IS NOT NULL) AS usr,\n (crmacct_emp_id IS NOT NULL) AS emp,\n (crmacct_salesrep_id IS NOT NULL) AS salesrep\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value::date AS char\n\nFROM crmacct() LEFT OUTER JOIN\n cntct ON (crmacct_cntct_id_1=cntct_id) LEFT OUTER JOIN\n addr ON (cntct_addr_id=addr_id) \n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='CRMACCT') \n AND (charass_alias.charass_target_id=crmacct_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='CRMACCT') \n AND (charass_alias.charass_target_id=crmacct_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='CRMACCT') \n AND (charass_alias.charass_target_id=crmacct_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\nWHERE true\n \n AND (crmacct_owner_username=) \n\n AND (crmacct_owner_username ~ ) \n\n \n AND crmacct_active \n\n\n AND ((crmacct_number ~* )\n OR (crmacct_name ~* )\n OR (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n OR (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n OR (COALESCE(cntct_email,'') ~* )\n OR (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n OR (COALESCE(addr_city,'') ~* )\n OR (COALESCE(addr_state,'') ~* )\n OR (COALESCE(addr_postalcode,'') ~* )\n OR (addr_country ~* ))\n\n\n AND (crmacct_number ~* )\n\n\n AND (crmacct_name ~* )\n\n\n AND (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n\n\n AND (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n\n\n AND (COALESCE(cntct_email,'') ~* )\n\n\n AND (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n\n\n AND (COALESCE(addr_city,'') ~* )\n\n\n AND (COALESCE(addr_state,'') ~* )\n\n\n AND (COALESCE(addr_postalcode,'') ~* )\n\n\n AND (COALESCE(addr_country,'') ~* )\n\n\n AND (crmacct_id=)\n\n\n\n\n AND (crmacct_id NOT IN (SELECT mrgundo_base_id\n FROM mrgundo\n WHERE (mrgundo_base_schema='public')\n AND (mrgundo_base_table='crmacct')\n UNION\n SELECT crmacctsel_src_crmacct_id\n FROM crmacctsel\n UNION\n SELECT crmacctsel_dest_crmacct_id\n FROM crmacctsel))\n\nORDER BY crmacct_number; \n admin 2013-07-26 0 63 currencyConversions detail used by currencyConversions the N in round(curr_rate, N) has to be SCALE - 1 of curr_rates NUMERIC(p, SCALE) type definition Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: currencyConversions\n-- Name: detail\n-- Notes: used by currencyConversions\n-- the N in round(curr_rate, N) has to be SCALE - 1 of curr_rates\n-- NUMERIC(p, SCALE) type definition\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT curr_rate_id, currConcat(curr_id) AS f_curr,\n\n round((1.0 / curr_rate),5) AS rate,\n\n round(curr_rate,5) AS rate,\n\n 'uomratio' AS rate_xtnumericrole,\n curr_effective, curr_expires\nFROM curr_symbol NATURAL JOIN curr_rate\nWHERE ( (curr_base = FALSE)\n AND (curr_expires >= )\n AND (curr_effective <= )\n\n AND (curr_id = )\n\n\n AND (currConcat(curr_id) ~ )\n\n )\nORDER BY f_curr, curr_effective, curr_expires;\n admin 2013-07-26 0 203 workOrderVariance material used by dspMaterialUsageVarianceByBOMItem, dspMaterialUsageVarianceByComponentItem, dspMaterialUsageVarianceByItem, dspMaterialUsageVarianceByWarehouse, dspMaterialUsageVarianceByWorkOrder Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: workOrderVariance\n-- Name: material\n-- Notes: used by dspMaterialUsageVarianceByBOMItem, dspMaterialUsageVarianceByComponentItem,\n-- dspMaterialUsageVarianceByItem, dspMaterialUsageVarianceByWarehouse,\n-- dspMaterialUsageVarianceByWorkOrder\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT womatlvar_id, posted, \n parentitemnumber, parentdescrip,\n componentitemnumber, componentdescrip,\n ordered, received,\n projreq, projqtyper,\n actiss, actqtyper,\n (actqtyper - projqtyper) AS qtypervar,\n CASE WHEN (actqtyper=projqtyper) THEN 0\n WHEN (projqtyper=0) THEN actqtyper\n ELSE ((1 - (actqtyper / projqtyper)) * -1)\n END AS qtypervarpercent,\n womatlvar_notes, womatlvar_ref,\n\n formatDate(posted) AS f_posted,\n formatQty(ordered) AS f_ordered,\n formatQty(received) AS f_received,\n formatQty(projreq) AS f_projreq,\n formatQtyPer(projqtyper) AS f_projqtyper,\n formatQty(actiss) AS f_actiss,\n formatQty(actqtyper) AS f_actqtyper,\n formatQty(actqtyper - projqtyper) AS f_qtypervar,\n CASE WHEN (actqtyper=projqtyper) THEN formatQty(0)\n WHEN (projqtyper=0) THEN formatQty(actqtyper)\n ELSE formatPrcnt((1 - (actqtyper / projqtyper)) * -1)\n END AS f_qtypervarpercent,\n\n 'qty' AS ordered_xtnumericrole,\n 'qty' AS received_xtnumericrole,\n 'qty' AS projreq_xtnumericrole,\n 'qtyper' AS projqtyper_xtnumericrole,\n 'qty' AS actiss_xtnumericrole,\n 'qtyper' AS actqtyper_xtnumericrole,\n 'qtyper' AS qtypervar_xtnumericrole,\n 'percent' AS qtypervarpercent_xtnumericrole\nFROM ( SELECT womatlvar_id, womatlvar_posted AS posted,\n parentitem.item_number AS parentitemnumber,\n parentitem.item_descrip1 || ' ' || parentitem.item_descrip2 as parentdescrip,\n componentitem.item_number AS componentitemnumber,\n componentitem.item_descrip1 || ' ' || componentitem.item_descrip2 as componentdescrip,\n womatlvar_notes, womatlvar_ref,\n womatlvar_qtyord AS ordered, womatlvar_qtyrcv AS received,\n ((womatlvar_qtyfxd + womatlvar_qtyrcv * womatlvar_qtyper) * (1 + womatlvar_scrap)) AS projreq,\n womatlvar_qtyper AS projqtyper,\n (womatlvar_qtyiss) AS actiss, (NONEG(womatlvar_qtyiss - womatlvar_qtyfxd) / (womatlvar_qtyrcv * (1 + womatlvar_scrap))) AS actqtyper\n FROM womatlvar LEFT OUTER JOIN wo ON ( (wo_number=womatlvar_number) AND\n (wo_subnumber=womatlvar_subnumber) )\n LEFT OUTER JOIN itemsite parent ON (parent.itemsite_id=womatlvar_parent_itemsite_id)\n LEFT OUTER JOIN item parentitem ON (parentitem.item_id=parent.itemsite_item_id)\n LEFT OUTER JOIN itemsite component ON (component.itemsite_id=womatlvar_component_itemsite_id)\n LEFT OUTER JOIN item componentitem ON (componentitem.item_id=component.itemsite_item_id)\n WHERE ( (1=1)\n\n AND (womatlvar_posted BETWEEN AND )\n\n\n AND (wo_id=)\n\n\n AND (parent.itemsite_warehous_id=)\n\n\n AND (parent.itemsite_item_id=)\n\n\n AND (womatlvar_bomitem_id=)\n\n\n AND (component.itemsite_item_id=)\n\n ) ) AS data\nORDER BY posted;\n admin 2013-07-26 0 303 customers detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: customers\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT ON ( cust_number ) \n cust_id, cust_custtype_id, \n cust_active, cust_number, cust_name,\n custtype_code,\n bill_cntct.cntct_first_name AS bill_first_name,\n bill_cntct.cntct_last_name AS bill_last_name,\n bill_cntct.cntct_title AS bill_title,\n bill_cntct.cntct_phone AS bill_phone,\n bill_cntct.cntct_fax AS bill_fax,\n bill_cntct.cntct_email AS bill_email,\n bill_addr.addr_line1 AS bill_line1,\n bill_addr.addr_line2 AS bill_line2,\n bill_addr.addr_line3 AS bill_line3,\n bill_addr.addr_city AS bill_city,\n bill_addr.addr_state AS bill_state,\n bill_addr.addr_postalcode AS bill_postalcode,\n bill_addr.addr_country AS bill_country,\n corr_cntct.cntct_first_name AS corr_first_name,\n corr_cntct.cntct_last_name AS corr_last_name,\n corr_cntct.cntct_phone AS corr_phone,\n corr_cntct.cntct_fax AS corr_fax,\n corr_cntct.cntct_email AS corr_email,\n corr_addr.addr_line1 AS corr_line1,\n corr_addr.addr_line2 AS corr_line2,\n corr_addr.addr_line3 AS corr_line3,\n corr_addr.addr_city AS corr_city,\n corr_addr.addr_state AS corr_state,\n corr_addr.addr_postalcode AS corr_postalcode,\n corr_addr.addr_country AS corr_country\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value::date AS char\n\nFROM custinfo\n JOIN custtype ON (cust_custtype_id=custtype_id)\n LEFT OUTER JOIN cntct bill_cntct ON (cust_cntct_id=bill_cntct.cntct_id) \n LEFT OUTER JOIN addr bill_addr ON (bill_cntct.cntct_addr_id=bill_addr.addr_id)\n LEFT OUTER JOIN cntct corr_cntct ON (cust_corrcntct_id=corr_cntct.cntct_id) \n LEFT OUTER JOIN addr corr_addr ON (corr_cntct.cntct_addr_id=corr_addr.addr_id)\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='C') \n AND (charass_alias.charass_target_id=cust_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='C') \n AND (charass_alias.charass_target_id=cust_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='C') \n AND (charass_alias.charass_target_id=cust_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\nWHERE true\n \n AND cust_active \n\n\n AND ((cust_number ~* )\n OR (cust_name ~* )\n OR (custtype_code ~* )\n OR (COALESCE(bill_cntct.cntct_first_name,'') || ' ' || COALESCE(bill_cntct.cntct_last_name,'') ~* )\n OR (COALESCE(bill_cntct.cntct_phone,'') || ' ' || COALESCE(bill_cntct.cntct_phone2,'') || ' ' || COALESCE(bill_cntct.cntct_fax, '') ~* )\n OR (COALESCE(bill_cntct.cntct_email, '') ~* )\n OR (COALESCE(bill_addr.addr_line1,'') || ' ' || COALESCE(bill_addr.addr_line2,'') || ' ' || COALESCE(bill_addr.addr_line3,'') ~* )\n OR (COALESCE(bill_addr.addr_city,'') ~* )\n OR (COALESCE(bill_addr.addr_state,'') ~* )\n OR (COALESCE(bill_addr.addr_postalcode,'') ~* )\n OR (COALESCE(bill_addr.addr_country,'') ~* )\n OR (COALESCE(corr_cntct.cntct_first_name,'') || ' ' || COALESCE(corr_cntct.cntct_last_name,'') ~* )\n OR (COALESCE(corr_cntct.cntct_phone,'') || ' ' || COALESCE(corr_cntct.cntct_phone2,'') || ' ' || COALESCE(corr_cntct.cntct_fax, '') ~* )\n OR (COALESCE(corr_cntct.cntct_email, '') ~* )\n OR (COALESCE(corr_addr.addr_line1,'') || ' ' || COALESCE(corr_addr.addr_line2,'') || ' ' || COALESCE(corr_addr.addr_line3,'') ~* )\n OR (COALESCE(corr_addr.addr_city,'') ~* )\n OR (COALESCE(corr_addr.addr_state,'') ~* )\n OR (COALESCE(corr_addr.addr_postalcode,'') ~* )\n OR (COALESCE(corr_addr.addr_country,'') ~* ))\n\n\n AND (cust_number ~* )\n\n\n AND (cust_name ~* )\n\n\n AND (custtype_code ~* )\n\n\n AND (COALESCE(bill_cntct.cntct_first_name,'') || ' ' || COALESCE(bill_cntct.cntct_last_name, '') ~* \n OR COALESCE(corr_cntct.cntct_first_name,'') || ' ' || COALESCE(corr_cntct.cntct_last_name, '') ~* )\n\n\n AND (COALESCE(bill_cntct.cntct_phone,'') || ' ' || COALESCE(bill_cntct.cntct_phone2,'') || ' ' || COALESCE(bill_cntct.cntct_fax,'') ~* \n OR COALESCE(corr_cntct.cntct_phone,'') || ' ' || COALESCE(corr_cntct.cntct_phone2,'') || ' ' || COALESCE(corr_cntct.cntct_fax,'') ~* )\n\n\n AND (COALESCE(bill_cntct.cntct_email,'') ~* \n OR COALESCE(corr_cntct.cntct_email,'') ~* )\n\n\n AND (COALESCE(bill_addr.addr_line1,'') || ' ' || COALESCE(bill_addr.addr_line2,'') || ' ' || COALESCE(bill_addr.addr_line3,'') ~* \n OR COALESCE(corr_addr.addr_line1,'') || ' ' || COALESCE(corr_addr.addr_line2,'') || ' ' || COALESCE(corr_addr.addr_line3,'') ~* )\n\n\n AND (COALESCE(bill_addr.addr_city,'') ~* \n OR COALESCE(corr_addr.addr_city,'') ~* )\n\n\n AND (COALESCE(bill_addr.addr_state,'') ~* \n OR COALESCE(corr_addr.addr_state,'') ~* )\n\n\n AND (COALESCE(bill_addr.addr_postalcode,'') ~* \n OR COALESCE(corr_addr.addr_postalcode,'') ~* )\n\n\n AND (COALESCE(bill_addr.addr_country,'') ~* \n OR COALESCE(corr_addr.addr_country,'') ~* )\n\n\n AND (cust_salesrep_id = )\n\n\nORDER BY cust_number; \n admin 2013-07-26 0 532 customers statement used by printStatementsByCustomerType SELECT cust_id, (cust_number || '-' || cust_name) AS customer, findCustomerForm(cust_id, 'S') AS reportname FROM (SELECT araging_cust_id FROM araging(, true))AS data, custinfo, custtype, aropen WHERE (cust_custtype_id=custtype_id) AND (aropen_cust_id=cust_id) AND (aropen_open) AND (aropen_duedate < (CURRENT_DATE - )) AND (custtype_id=) AND (custtype_code ~ ) AND (cust_id = araging_cust_id) GROUP BY cust_id, cust_number, cust_name HAVING (SUM((aropen_amount - aropen_paid) * CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1 ELSE 1 END) > 0) ORDER BY cust_number; Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: customers\n-- Name: statement\n-- Notes: used by printStatementsByCustomerType\n--SELECT cust_id, (cust_number || '-' || cust_name) AS customer,\n-- findCustomerForm(cust_id, 'S') AS reportname\n--FROM\n--\n-- (SELECT araging_cust_id FROM araging(, true))AS data,\n--\n-- custinfo, custtype, aropen\n--WHERE (cust_custtype_id=custtype_id)\n-- AND (aropen_cust_id=cust_id)\n-- AND (aropen_open)\n--\n-- AND (aropen_duedate < (CURRENT_DATE - ))\n--\n--\n-- AND (custtype_id=)\n--\n-- AND (custtype_code ~ )\n--\n--\n-- AND (cust_id = araging_cust_id)\n--\n--GROUP BY cust_id, cust_number, cust_name\n--HAVING (SUM((aropen_amount - aropen_paid) *\n-- CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1\n-- ELSE 1 END) > 0)\n--ORDER BY cust_number;\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT araging_cust_id AS cust_id,\n (araging_cust_number || '-' || araging_cust_name) AS customer,\n findCustomerForm(araging_cust_id, 'S') AS reportname\nFROM araging(, true)\nWHERE (true)\n\n AND (COALESCE(araging_duedate, startOfTime()) < (CURRENT_DATE - ))\n\n\n AND (araging_cust_custtype_id=)\n\n AND (araging_custtype_code ~ )\n\nGROUP BY araging_cust_id, araging_cust_number, araging_cust_name\nORDER BY araging_cust_number;\n admin 2013-07-26 0 304 depositesRegister detail used by dspDepositsRegister Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: depositesRegister\n-- Name: detail\n-- Notes: used by dspDepositsRegister\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT trans_id, trans_date, trans_source,\n CASE WHEN (trans_doctype='IN') THEN \n WHEN (trans_doctype='CM') THEN \n ELSE trans_doctype\n END AS doctype,\n trans_docnumber, firstLine(trans_notes) AS f_notes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS f_accnt,\n CASE WHEN (trans_amount < 0) THEN formatMoney(ABS(trans_amount))\n ELSE ''\n END AS f_debit,\n CASE WHEN (trans_amount < 0) THEN ABS(trans_amount)\n ELSE 0\n END AS debit,\n CASE WHEN (trans_amount > 0) THEN trans_amount\n ELSE 0\n END AS credit,\n (aropen_amount - aropen_paid) AS balance,\n currtobase(aropen_curr_id,(aropen_amount - aropen_paid),aropen_docdate) AS base_balance,\n currconcat(aropen_curr_id) AS currAbbr,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS debit_xttotalrole,\n 0 AS credit_xttotalrole,\n 0 AS base_balance_xttotalrole\nFROM (\nSELECT gltrans_id AS trans_id, gltrans_date AS trans_date, gltrans_created AS trans_created,\n gltrans_source AS trans_source, gltrans_doctype AS trans_doctype, gltrans_sequence AS trans_sequence,\n gltrans_docnumber AS trans_docnumber, gltrans_notes AS trans_notes, gltrans_amount AS trans_amount,\n accnt_id, accnt_descrip,\n aropen_amount, aropen_paid, aropen_curr_id, aropen_docdate\nFROM gltrans LEFT OUTER JOIN aropen ON ((text(gltrans_docnumber) = 'I-' || text(aropen_docnumber))\n AND (aropen_doctype='I')), accnt\nWHERE ((gltrans_accnt_id=accnt_id)\n AND (gltrans_doctype = 'CR')\n AND (gltrans_date BETWEEN AND ) )\nUNION\nSELECT sltrans_id AS trans_id, sltrans_date AS trans_date, sltrans_created AS trans_created,\n sltrans_source AS trans_source, sltrans_doctype AS trans_doctype, sltrans_sequence AS trans_sequence,\n sltrans_docnumber AS trans_docnumber, sltrans_notes AS trans_notes, sltrans_amount AS trans_amount,\n accnt_id, accnt_descrip,\n aropen_amount, aropen_paid, aropen_curr_id, aropen_docdate\nFROM sltrans LEFT OUTER JOIN aropen ON ((text(sltrans_docnumber) = 'I-' || text(aropen_docnumber))\n AND (aropen_doctype='I')), accnt\nWHERE ((sltrans_accnt_id=accnt_id)\n AND (sltrans_doctype = 'CR')\n AND (sltrans_date BETWEEN AND ) )\n ) AS data\nORDER BY trans_created DESC, trans_sequence, trans_amount;\n admin 2013-07-26 0 305 detailedInventoryHistory detail used by dspDetailedInventoryHistoryByLocation, dspDetailedInventoryHistoryByLotSerial Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: detailedInventoryHistory\n-- Name: detail\n-- Notes: used by dspDetailedInventoryHistoryByLocation, dspDetailedInventoryHistoryByLotSerial\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n\n invhist_id, invhist_transdate, invhist_transtype,\n (invhist_ordtype || '-' || invhist_ordnumber) AS ordernumber,\n invhist_invuom,\n item_number, formatlotserialnumber(invdetail_ls_id) AS lotserial,\n CASE WHEN invhist_posted THEN invdetail_qty\n END AS transqty,\n CASE WHEN invhist_posted THEN invdetail_qty_before\n END AS qohbefore,\n CASE WHEN invhist_posted THEN invdetail_qty_after\n END AS qohafter,\n invhist_posted,\n 'qty' AS transqty_xtnumericrole,\n 'qty' AS qohbefore_xtnumericrole,\n 'qty' AS qohafter_xtnumericrole,\n CASE WHEN NOT invhist_posted THEN 'warning'\n END AS qtforegroundrole\n\n *\n\nFROM \n invdetail, invhist, itemsite, item\n \n lshist (,,,\n ,,,\n ,,1)\n \nWHERE (\n\n (invdetail_invhist_id=invhist_id)\n AND (invhist_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (invdetail_location_id=)\n AND (DATE(invhist_transdate) BETWEEN AND )\n AND (transType(invhist_transtype, ))\n\n (TRUE)\n\n )\n\nORDER BY invhist_transdate DESC, invhist_transtype\n\n;\n admin 2013-07-26 0 193 distributeInventory locations Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: distributeInventory\n-- Name: locations\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT id, type, locationname, defaultlocation,\n\t\t location_netable, lotserial, f_expiration, expired,\n qty, qtytagged, (qty + qtytagged) AS balance,\n 'qty' AS qty_xtnumericrole,\n 'qty' AS qtytagged_xtnumericrole,\n 'qty' AS balance_xtnumericrole,\n CASE WHEN expired THEN 'error' END AS qtforegroundrole, \n CASE WHEN expired THEN 'error' \n WHEN defaultlocation AND expired = false THEN 'altemphasis' \n ELSE null END AS defaultlocation_qtforegroundrole, \n CASE WHEN expired THEN 'error' \n WHEN qty > 0 AND expired = false THEN 'altemphasis' \n ELSE null END AS qty_qtforegroundrole \n FROM ( \n\t\t \n\t\t SELECT location_id AS id, AS type,\n\t\t formatLocationName(location_id) AS locationname,\n\t\t CASE WHEN ( = 'R' AND location_id=itemsite_recvlocation_id) THEN TRUE\n\t\t WHEN ( = 'I' AND location_id=itemsite_issuelocation_id) THEN TRUE\n\t\t WHEN ( = 'O' AND location_id=itemsite_location_id) THEN TRUE\n ELSE FALSE\n END AS defaultlocation,\n\t\t location_netable,\n\t\t TEXT('') AS lotserial,\n\t\t TEXT() AS f_expiration, FALSE AS expired,\n\t\t qtyLocation(location_id, NULL, NULL, NULL, itemsite_id, itemlocdist_order_type, itemlocdist_order_id, itemlocdist_id) AS qty,\n\t\t itemlocdistQty(location_id, itemlocdist_id) AS qtytagged \n\t\t FROM itemlocdist, location, itemsite \n\t\t WHERE ( (itemlocdist_itemsite_id=itemsite_id)\n\t\t AND (itemsite_loccntrl)\n\t\t AND (itemsite_warehous_id=location_warehous_id)\n\t\t AND (validLocation(location_id, itemsite_id))\n\t\t AND (itemlocdist_id=) ) \n\t\t \n\t\t SELECT itemloc_id AS id, AS type,\n\t\t COALESCE(formatLocationName(location_id),\n\t\t ) AS locationname,\n\t\t (location_id IS NOT NULL AND\n\t\t CASE WHEN ( = 'R' AND location_id=itemsite_recvlocation_id) THEN TRUE\n\t\t WHEN ( = 'I' AND location_id=itemsite_issuelocation_id) THEN TRUE\n \t\t WHEN ( = 'O' AND location_id=itemsite_location_id) THEN TRUE\n ELSE FALSE\n END) AS defaultlocation,\n\t\t COALESCE(location_netable, false) AS location_netable,\n\t\t ls_number AS lotserial,\n\t\t CASE WHEN (itemsite_perishable) THEN formatDate(itemloc_expiration)\n\t\t ELSE \n\t\t END AS f_expiration,\n\t\t CASE WHEN (itemsite_perishable) THEN (itemloc_expiration < CURRENT_DATE)\n\t\t ELSE FALSE \n\t\t END AS expired,\n\t\t qtyLocation(itemloc_location_id, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc, itemsite_id, itemlocdist_order_type, itemlocdist_order_id, itemlocdist_id) AS qty,\n\t\t ( SELECT COALESCE(SUM(target.itemlocdist_qty), 0)\n\t\t FROM itemlocdist AS target\n\t\t WHERE ( (target.itemlocdist_source_type='I')\n\t\t AND (target.itemlocdist_source_id=itemloc_id)\n\t\t AND (target.itemlocdist_itemlocdist_id=source.itemlocdist_id)) ) AS qtytagged \n\t\t FROM itemlocdist AS source, itemsite, itemloc \n LEFT OUTER JOIN location ON (itemloc_location_id=location_id) \n LEFT OUTER JOIN ls ON (itemloc_ls_id=ls_id) \n\t\t WHERE ( (source.itemlocdist_itemsite_id=itemsite_id)\n\t\t AND (itemloc_itemsite_id=itemsite_id)\n\t\t AND (source.itemlocdist_id=) ) \n\t\t UNION \n\t\t SELECT location_id AS id, AS type,\n\t\t formatLocationName(location_id) AS locationname,\n\t\t CASE WHEN ( = 'R' AND location_id=itemsite_recvlocation_id) THEN TRUE\n\t\t WHEN ( = 'I' AND location_id=itemsite_issuelocation_id) THEN TRUE\n\t\t WHEN ( = 'O' AND location_id=itemsite_location_id) THEN TRUE\n ELSE FALSE\n END AS defaultlocation,\n\t\t location_netable,\n\t\t TEXT('') AS lotserial,\n\t\t TEXT() AS f_expiration, FALSE AS expired,\n\t\t qtyLocation(location_id, NULL, NULL, NULL, itemsite_id, itemlocdist_order_type, itemlocdist_order_id, itemlocdist_id) AS qty,\n\t\t itemlocdistQty(location_id, itemlocdist_id) AS qtytagged \n\t\t FROM itemlocdist, location, itemsite \n\t\t WHERE ( (itemlocdist_itemsite_id=itemsite_id)\n\t\t AND (itemsite_loccntrl)\n\t\t AND (itemsite_warehous_id=location_warehous_id)\n\t\t AND (validLocation(location_id, itemsite_id))\n AND (itemsite_id= ) \n\t\t AND (location_id NOT IN (SELECT DISTINCT itemloc_location_id FROM itemloc WHERE (itemloc_itemsite_id=itemsite_id)))\n\t\t AND (itemlocdist_id=) ) \n\t\t \n\t\t ) AS data \n WHERE ((TRUE) \n\t\t \n\t\t AND (qtytagged != 0) \n\t\t \n \n AND (qty > 0) \n \n\t\t ) ORDER BY locationname;\n admin 2013-07-26 0 557 employees detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: employees\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT emp_id, warehous_code, emp_active, emp_code, emp_number,\n cntct_first_name, cntct_last_name\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value::date AS char\n\nFROM emp\n LEFT OUTER JOIN cntct ON (emp_cntct_id=cntct_id)\n LEFT OUTER JOIN whsinfo ON (emp_warehous_id=warehous_id)\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='EMP') \n AND (charass_alias.charass_target_id=emp_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='EMP') \n AND (charass_alias.charass_target_id=emp_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='EMP') \n AND (charass_alias.charass_target_id=emp_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\nWHERE (true)\n\n AND (warehous_id=)\n\n \n AND emp_active \n\n\n AND ((emp_code ~* )\n OR (emp_number ~* )\n OR (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n OR (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n OR (COALESCE(cntct_email,'') ~* ))\n\n\nORDER BY emp_code;\n admin 2013-07-26 0 306 expiredInventory detail used by dspExpiredInventoryByClassCode Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: expiredInventory\n-- Name: detail\n-- Notes: used by dspExpiredInventoryByClassCode\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, itemloc_id, warehous_code, item_number, uom_name,\n ls_number, itemloc_expiration,\n itemloc_qty, costmethod, cost,\n noNeg(cost * itemloc_qty) AS value,\n 'qty' AS itemloc_qty_xtnumericrole,\n 'cost' AS cost_xtnumericrole,\n 'curr' AS value_xtnumericrole,\n 'red' AS qtforegroundrole \nFROM ( SELECT itemsite_id, itemloc_id, warehous_code, item_number,\n uom_name, ls_number,\n CASE WHEN ='Perishability' THEN \n itemloc_expiration\n ELSE itemloc_warrpurc\n END AS itemloc_expiration,\n itemloc_qty,\n CASE WHEN(itemsite_costmethod='A') THEN 'Average'\n WHEN(itemsite_costmethod='S') THEN 'Standard'\n WHEN(itemsite_costmethod='J') THEN 'Job'\n WHEN(itemsite_costmethod='N') THEN 'None'\n ELSE 'UNKNOWN'\n END AS costmethod,\n \n stdcost(itemsite_item_id) AS cost\n \n actcost(itemsite_item_id) AS cost\n \n (itemsite_value / CASE WHEN(itemsite_qtyonhand=0) THEN 1 ELSE itemsite_qtyonhand END) AS cost\n \n FROM itemloc, itemsite, item, whsinfo, uom, ls\n WHERE ((itemloc_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemloc_ls_id=ls_id)\n \n AND (itemsite_perishable)\n AND (itemloc_expiration < (CURRENT_DATE + ))\n \n AND (itemsite_warrpurc)\n AND (itemloc_warrpurc < (CURRENT_DATE + ))\n \n \n AND (itemsite_warehous_id=)\n \n \n AND (item_classcode_id=)\n \n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE classcode_code ~ ))\n \n )\n ) AS data\nORDER BY warehous_code, item_number;\n admin 2013-07-26 0 308 frozenItemSites detail used by dspFrozenItemSites Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: frozenItemSites\n-- Name: detail\n-- Notes: used by dspFrozenItemSites\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, warehous_code, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS descrip,\n COALESCE((SELECT invcnt_tagnumber\n FROM invcnt\n WHERE ((NOT invcnt_posted)\n AND (invcnt_itemsite_id=itemsite_id)) LIMIT 1), '') AS cnttag\nFROM itemsite, item, whsinfo\nWHERE ( (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_freeze)\n\n AND (itemsite_warehous_id=)\n\n )\nORDER BY warehous_code, item_number;\n admin 2013-07-26 0 424 glseries checkeditable Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: glseries\n-- Name: checkeditable\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT gltrans_id \nFROM accnt, gltrans \n LEFT OUTER JOIN period ON (gltrans_date BETWEEN period_start AND period_end) \nWHERE ( (gltrans_accnt_id=accnt_id) \n AND (gltrans_sequence=) \n AND ( (gltrans_deleted) \n OR (period_closed) \n OR (gltrans_rec) \n OR (period_freeze AND NOT checkPrivilege('PostFrozenPeriod')) ) )\nLIMIT 1;\n admin 2013-07-26 0 310 glseries detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: glseries\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *, \n CASE WHEN _id = -1 THEN 0\n ELSE 1 END AS xtindentrole,\n CASE WHEN _id = -1 THEN _date\n END AS transdate, \n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole \n FROM (SELECT DISTINCT \n _sequence AS sequence, \n -1 AS _id, \n _date, \n _source AS source, \n _journalnumber AS journalnumber,\n _doctype AS doctype, '' AS docnumber,\n -1 AS accnt_id, firstLine(_notes) AS accnt_id_qtdisplayrole,\n 0.0 AS amount,\n CAST(NULL AS NUMERIC) AS debit,\n CAST(NULL AS NUMERIC) AS credit,\n _posted AS posted \n FROM \n WHERE ( (true) \n \n AND (NOT gltrans_deleted) \n \n AND (_date BETWEEN \n AND )\n \n AND (_source=)\n \n \n AND (_journalnumber BETWEEN \n AND )\n \n ) \n UNION ALL \n SELECT _sequence AS sequence, \n _id, \n _date, \n NULL, NULL,\n NULL, _docnumber AS docnumber,\n accnt_id, (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS accnt_id_qtdisplayrole,\n _amount,\n CASE WHEN (_amount < 0) THEN (_amount * -1)\n END AS debit,\n CASE WHEN (_amount > 0) THEN _amount \n END AS credit,\n NULL AS posted \n FROM JOIN accnt ON (_accnt_id=accnt_id) \n WHERE ( (true) \n \n AND (NOT gltrans_deleted) \n \n AND (_date BETWEEN \n AND )\n \n AND (_source=)\n \n \n AND (_journalnumber BETWEEN \n AND )\n \n ) \n ) AS dummy \n ORDER BY sequence,\n xtindentrole, amount;\n admin 2013-07-26 0 483 glseries postjournal Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: glseries\n-- Name: postjournal\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT postJournals() AS result;\n admin 2013-07-26 0 229 gltransactions detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: gltransactions\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT gltrans_id, gltrans_accnt_id,gltrans_date,gltrans_created,gltrans_source,\n gltrans_doctype,gltrans_journalnumber,gltrans_posted,gltrans_username,\n CASE WHEN(gltrans_docnumber='Misc.' AND\n invhist_docnumber IS NOT NULL) THEN\n (gltrans_docnumber || ' - ' || invhist_docnumber)\n ELSE gltrans_docnumber\n END AS docnumber,\n firstLine(gltrans_notes) AS notes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n CASE WHEN (gltrans_amount < 0) THEN ABS(gltrans_amount)\n ELSE NULL\n END AS debit,\n CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n ELSE NULL\n END AS credit,\n CASE WHEN accnt_type IN ('A','E') THEN \n gltrans_amount * -1 \n ELSE gltrans_amount END AS running,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole,\n 'curr' AS running_xtnumericrole,\n 0 AS running_xtrunningrole,\n gltrans_deleted AS xtdeletedrole,\n AS running_xtrunninginit \nFROM gltrans JOIN accnt ON (gltrans_accnt_id=accnt_id) \n LEFT OUTER JOIN invhist ON (gltrans_misc_id=invhist_id\n AND gltrans_docnumber='Misc.') \n\n JOIN company ON (accnt_company=company_number) \n\n\n JOIN prftcntr ON (accnt_profit=prftcntr_number) \n\n\n JOIN subaccnt ON (accnt_sub=subaccnt_number) \n\n\n JOIN subaccnttype ON (subaccnttype_code=accnt_subaccnttype_code) \n\nWHERE (\n\n \n (gltrans_date BETWEEN \n AND )\n \n (gltrans_date BETWEEN \n AND endoftime())\n \n\n \n (gltrans_date BETWEEN startoftime()\n AND )\n \n (gltrans_date BETWEEN startoftime()\n AND endoftime())\n \n\n\n AND (NOT gltrans_deleted)\n\n\n AND (company_id=)\n\n\n AND (prftcntr_id=)\n\n\n AND (accnt_number=)\n\n\n AND (subaccnt_id=)\n\n\n AND (subaccnttype_id=)\n\n\n AND (accnt_type= )\n\n\n AND (gltrans_accnt_id=)\n\n\n AND (gltrans_docnumber = case when = '' then \n gltrans_docnumber else \n end ) \n\n\n AND (gltrans_source=)\n\n) \nORDER BY\n\n gltrans_date,\n\n gltrans_created DESC,\n\n gltrans_sequence, gltrans_amount;\n admin 2013-07-26 0 18 events detail used by eventManager Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: events\n-- Name: detail\n-- Notes: used by eventManager\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT evntlog_id, evntlog_ord_id, evntlog_newdate,\n evntlog_newvalue, warehous_code,\n evntlog_evnttime,\n evntlog_dispatched,\n evnttype_name, evntlog_number \n FROM evnttype, evntlog LEFT OUTER JOIN whsinfo ON (evntlog_warehous_id=warehous_id)\nWHERE ( (evntlog_evnttype_id=evnttype_id)\n AND (evntlog_username=)\n\n AND (warehous_id=)\n\n\n AND (evntlog_dispatched IS NULL)\n\n) \nORDER BY evntlog_evnttime;\n admin 2013-07-26 0 68 incidents detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: incidents \n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT ON (incdt_number) incdt_id AS id,\nincdt_number, DATE(incdt_timestamp) AS incdt_timestamp,\ncrmacct_name,\nincdtcat_name, incdtseverity_name, \nincdtpriority_name, crmacct_name, \nCASE WHEN(incdt_status='N') THEN \nWHEN(incdt_status='F') THEN \nWHEN(incdt_status='C') THEN \nWHEN(incdt_status='A') THEN \nWHEN(incdt_status='R') THEN \nWHEN(incdt_status='L') THEN \nELSE incdt_status\nEND,\nincdt_assigned_username, incdt_owner_username,\nincdt_summary, cntct_name, incdt_updated::date AS incdt_updated,\nprj_number, incdt_public,\nitem_number,\n\nls_number,\n\nstatus_color AS qtbackgroundrole \n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value::date AS char\n\nFROM crmacct, status, incdt()\n JOIN cntct ON (incdt_cntct_id=cntct_id)\n LEFT OUTER JOIN incdtcat ON (incdtcat_id=incdt_incdtcat_id) \n LEFT OUTER JOIN incdtseverity ON (incdtseverity_id=incdt_incdtseverity_id) \n LEFT OUTER JOIN incdtpriority ON (incdtpriority_id=incdt_incdtpriority_id) \n LEFT OUTER JOIN prj ON (incdt_prj_id=prj_id)\n LEFT OUTER JOIN item ON (item_id=incdt_item_id)\n\n LEFT OUTER JOIN ls ON (ls_id=incdt_ls_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='INCDT') \n AND (charass_alias.charass_target_id=incdt_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='INCDT') \n AND (charass_alias.charass_target_id=incdt_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='INCDT') \n AND (charass_alias.charass_target_id=incdt_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\nWHERE ((incdt_crmacct_id=crmacct_id)\nAND (status_type='INCDT')\nAND (incdt_status=status_code)\n\nAND (status_seq IN (-1\n , \n ))\n\n \nAND (status_seq = ) \n\n \nAND (status_seq < ) \n\n \nAND (incdt_cntct_id = ) \n\n\nAND ( IN (incdt_assigned_username, incdt_owner_username))\n\n \nAND (incdt_owner_username=) \n\n\nAND (incdt_owner_username ~ ) \n\n \nAND (incdt_assigned_username=) \n\n\nAND (incdt_assigned_username ~ ) \n\n\nAND (incdt_incdtpriority_id IN (-1\n , \n ))\n\n\nAND (incdt_incdtcat_id IN (-1\n , \n ))\n\n \nAND (incdt_incdtcat_id=) \n \n \nAND (incdt_incdtseverity_id=) \n\n \nAND (incdt_crmacct_id=) \n \n \nAND (incdt_prj_id=) \n \n \nAND (incdt_public=) \n \n)\n \n \nAND ((incdt_number::text ~* )\nOR (incdt_summary ~* )\nOR (incdt_descrip ~* )\nOR (incdt_id IN (SELECT comment_source_id\nFROM comment\nWHERE((comment_source='INCDT')\nAND (comment_text ~* )))))\n\n\nAND (incdt_item_id=)\n\n\nAND (ls_number ~* )\n\n\nAND (incdt_id=)\n\nAND (incdt_timestamp BETWEEN COALESCE(, startOfTime()) AND COALESCE(, endOfTime())+1) \n\nORDER BY incdt_number;\n admin 2013-07-26 0 20 inventoryAvailability general Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: inventoryAvailability\n-- Name: general\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, altId,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n uom_name,\n warehous_id, warehous_code, itemsite_leadtime,\n qoh, allocated, noNeg(qoh - allocated) AS unallocated, \n ordered, requests, reorderlevel, outlevel,\n (qoh - allocated + ordered) AS available,\n vend_number,\n 'qty' AS qoh_xtnumericrole,\n 'qty' AS allocated_xtnumericrole,\n 'qty' AS unallocated_xtnumericrole, \n 'qty' AS ordered_xtnumericrole,\n 'qty' AS requests_xtnumericrole,\n 'qty' AS reorderlevel_xtnumericrole,\n 'qty' AS outlevel_xtnumericrole,\n 'qty' AS available_xtnumericrole,\n \n 'grey' AS qoh_qtforegroundrole,\n \n CASE WHEN ((qoh - allocated + ordered) < 0) THEN 'error'\n WHEN ((qoh - allocated + ordered) <= reorderlevel) THEN 'warning'\n END AS available_qtforegroundrole\nFROM (SELECT \n \n DISTINCT\n \n itemsite_id,\n CASE WHEN (item_type IN ('P', 'O')) THEN 1\n WHEN (item_type IN ('M')) THEN 2\n ELSE 0\n END AS altId,\n item_number, item_descrip1, item_descrip2, item_inv_uom_id,\n warehous_id, warehous_code, itemsite_leadtime,\n itemsite_qtyonhand AS qoh,\n CASE WHEN itemsite_useparams THEN itemsite_reorderlevel\n ELSE 0.0\n END AS reorderlevel,\n CASE WHEN itemsite_useparams THEN itemsite_ordertoqty\n ELSE 0.0\n END AS outlevel,\n \n vend_number,\n \n NULL AS vend_number,\n \n \n qtyAllocated(itemsite_id, itemsite_leadtime) AS allocated,\n qtyOrdered(itemsite_id, itemsite_leadtime) AS ordered, \n qtypr(itemsite_id, itemsite_leadtime) AS requests\n \n qtyAllocated(itemsite_id, CAST( AS INTEGER)) AS allocated,\n qtyOrdered(itemsite_id, CAST( AS INTEGER)) AS ordered,\n qtypr(itemsite_id, CAST( AS INTEGER)) AS requests \n \n qtyAllocated(itemsite_id, ( - CURRENT_DATE)) AS allocated,\n qtyOrdered(itemsite_id, ( - CURRENT_DATE)) AS ordered,\n qtypr(itemsite_id, ( - CURRENT_DATE)) AS requests \n \n qtyAllocated(itemsite_id, , ) AS allocated,\n qtyOrdered(itemsite_id, , ) AS ordered,\n qtypr(itemsite_id, , ) AS requests\n \n FROM item, itemsite, whsinfo\n \n , vendinfo JOIN itemsrc ON (itemsrc_vend_id=vend_id)\n \n WHERE ( (itemsite_active)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n \n AND (warehous_id=)\n \n \n AND (item_id=)\n \n AND (item_classcode_id=)\n \n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ )))\n \n AND (itemsite_plancode_id=)\n \n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n \n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem\n WHERE (itemgrpitem_itemgrp_id=)))\n \n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n AND (itemgrp_name ~ ) ) ))\n \n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n \n \n AND (itemsrc_item_id=item_id)\n \n \n AND (vend_id=)\n \n AND (vend_vendtype_id=)\n \n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ )))\n \n ) ) AS data, uom\nWHERE ((item_inv_uom_id=uom_id)\n\n AND ((qoh - allocated + ordered) <= reorderlevel) \n \n AND NOT ( ((qoh - allocated + ordered) = 0) AND (reorderlevel = 0))\n \n\n AND ((qoh - allocated + ordered) < 0) \n\n)\n\nORDER BY\n\n toNumeric(item_number, 999999999999999),\n\n vend_number,\n\n item_number, warehous_code DESC;\n admin 2013-07-26 0 314 inventoryAvailabilitybyWorkorder detail used by dspInventoryAvailabilityByWorkOrder Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: inventoryAvailabilitybyWorkorder\n-- Name: detail\n-- Notes: used by dspInventoryAvailabilityByWorkOrder\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *, 'qty' AS woinvav_qoh_xtnumericrole,\n 'qty' AS woinvav_balance_xtnumericrole,\n 'qty' AS woinvav_allocated_xtnumericrole,\n 'qty' AS woinvav_ordered_xtnumericrole,\n 'qty' AS woinvav_woavail_xtnumericrole,\n 'qty' AS woinvav_totalavail_xtnumericrole,\n CASE WHEN (woinvav_womatl_id) = -1 THEN 'altemphasis'\n WHEN (woinvav_qoh < 0) THEN 'error'\n WHEN (woinvav_qoh < woinvav_reorderlevel) THEN 'warning'\n WHEN ((woinvav_qoh - woinvav_balance) < 0) THEN 'altemphasis'\n WHEN ((woinvav_qoh - woinvav_allocated) < 0) THEN 'altemphasis'\n END AS woinvav_qoh_qtforegroundrole,\n CASE WHEN (woinvav_womatl_id) = -1 THEN 'altemphasis'\n WHEN ((woinvav_qoh + woinvav_ordered - woinvav_balance) < 0) THEN 'error'\n WHEN ((woinvav_qoh + woinvav_ordered - woinvav_balance) < woinvav_reorderlevel) THEN 'warning'\n END AS woinvav_woavail_qtforegroundrole,\n CASE WHEN (woinvav_womatl_id) = -1 THEN 'altemphasis'\n WHEN ((woinvav_qoh + woinvav_ordered - woinvav_allocated) < 0) THEN 'error'\n WHEN ((woinvav_qoh + woinvav_ordered - woinvav_allocated) < woinvav_reorderlevel) THEN 'warning'\n END AS woinvav_totalavail_qtforegroundrole,\n CASE WHEN (woinvav_womatl_id = -1) THEN 'altemphasis'\n ELSE null\n END AS qtforegroundrole,\n woinvav_level AS xtindentrole\nFROM woinvavail(,\n\n true,\n\n false,\n\n\n true,\n\n false,\n\n\n true,\n\n false,\n\n\n true\n\n false\n\n ) AS data;\n admin 2013-07-26 0 22 inventoryHistory detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: inventoryHistory\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT invhist_id, invdetail_id, invhist_transdate AS sortdate,\n formatDateTime(invhist_transdate) AS transdate,\n CASE WHEN (level=0) THEN invhist_transdate END AS invhist_transdate,\n CASE WHEN (level=0) THEN invhist_created END AS invhist_created,\n CASE WHEN (level=0) THEN invhist_user END AS invhist_user,\n CASE WHEN (level=0) THEN invhist_transtype END AS invhist_transtype,\n CASE WHEN (level=0) THEN warehous_code END AS warehous_code,\n CASE WHEN (level=0) THEN ordernumber\n ELSE locationname\n END AS orderlocation,\n CASE WHEN (level=0) THEN item_number END AS item_number,\n CASE WHEN (level=0) THEN invhist_invuom END AS invhist_invuom,\n CASE WHEN (level=0 AND invhist_transtype IN ('EX','IM','SH','SI')) THEN (invhist_invqty * -1.0)\n WHEN (level=0) THEN invhist_invqty\n ELSE invdetail_qty\n END AS transqty,\n CASE WHEN (level=0) THEN invhist_value_after - invhist_value_before\n END AS transvalue,\n CASE WHEN (level=0) THEN locfrom END AS locfrom,\n CASE WHEN (level=0) THEN invhist_qoh_before\n ELSE invdetail_qty_before\n END AS qohbefore,\n CASE WHEN (level=0) THEN locto END AS locto,\n CASE WHEN (level=0) THEN invhist_qoh_after\n ELSE invdetail_qty_after\n END AS qohafter,\n CASE WHEN (level=0) THEN costmethod END AS costmethod,\n CASE WHEN (level=0) THEN invhist_value_before END AS invhist_value_before,\n CASE WHEN (level=0) THEN invhist_value_after END AS invhist_value_after,\n 'qty' AS transqty_xtnumericrole,\n 'curr' AS transvalue_xtnumericrole,\n 0 AS transvalue_xttotalrole,\n 'qty' AS qohbefore_xtnumericrole,\n 'qty' AS qohafter_xtnumericrole,\n 'curr' AS invhist_value_before_xtnumericrole,\n 'curr' AS invhist_value_after_xtnumericrole,\n CASE WHEN (NOT invhist_posted) THEN NULL END AS qohbefore_qtdisplayrole,\n CASE WHEN (NOT invhist_posted) THEN NULL END AS qohafter_qtdisplayrole,\n CASE WHEN (NOT invhist_posted) THEN NULL END AS invhist_value_before_qtdisplayrole,\n CASE WHEN (NOT invhist_posted) THEN NULL END AS invhist_value_after_qtdisplayrole,\n CASE WHEN (NOT invhist_posted) THEN NULL END AS costmethod_qtdisplayrole,\n CASE WHEN (NOT invhist_posted) THEN NULL END AS locto_qtdisplayrole,\n CASE WHEN (NOT invhist_posted) THEN NULL END AS locfrom_qtdisplayrole,\n CASE WHEN (NOT invhist_posted) THEN 'warning' END AS qtforegroundrole,\n level AS xtindentrole\nFROM (\nSELECT invhist.*, 0 AS level,\n whs1.warehous_code AS warehous_code, item_number,\n CASE WHEN (invhist_ordtype NOT LIKE '') THEN (invhist_ordtype || '-' || invhist_ordnumber)\n ELSE invhist_ordnumber\n END AS ordernumber,\n CASE WHEN (invhist_costmethod='A') THEN \n WHEN (invhist_costmethod='S') THEN \n WHEN (invhist_costmethod='J') THEN \n WHEN (invhist_costmethod='N') THEN \n ELSE \n END AS costmethod,\n 0 AS invdetail_id, '' AS locationname,\n 0 AS invdetail_qty, 0 AS invdetail_qty_before, 0 AS invdetail_qty_after,\n CASE WHEN (invhist_transtype='TW' AND invhist_invqty < 0) THEN whs1.warehous_code\n WHEN (invhist_transtype='TW') THEN whs2.warehous_code\n WHEN (invhist_transtype='AD' AND invhist_invqty < 0) THEN whs1.warehous_code\n WHEN (invhist_transtype='AD') THEN 'ADJ'\n WHEN (invhist_transtype='EX') THEN whs1.warehous_code\n WHEN (invhist_transtype='IB') THEN whs1.warehous_code\n WHEN (invhist_transtype='IM' AND invhist_invqty < 0) THEN 'WIP'\n WHEN (invhist_transtype='IM') THEN whs1.warehous_code\n WHEN (invhist_transtype='IT') THEN whs1.warehous_code\n WHEN (invhist_transtype='RB') THEN 'WIP'\n WHEN (invhist_transtype='RM') THEN 'WIP'\n WHEN (invhist_transtype='RP') THEN whs1.warehous_code\n WHEN (invhist_transtype='RR') THEN 'CUST'\n WHEN (invhist_transtype='RS') THEN 'SHIP'\n WHEN (invhist_transtype='SH') THEN whs1.warehous_code\n WHEN (invhist_transtype='SI') THEN whs1.warehous_code\n WHEN (invhist_transtype='SV') THEN whs1.warehous_code\n\t WHEN (invhist_transtype='TR') THEN whs2.warehous_code\n\t WHEN (invhist_transtype='TS') THEN whs1.warehous_code\n\t WHEN (invhist_transtype='RI') THEN whs1.warehous_code\n ELSE ''\n END AS locfrom,\n CASE WHEN (invhist_transtype='TW' AND invhist_invqty < 0) THEN whs2.warehous_code\n WHEN (invhist_transtype='TW') THEN whs1.warehous_code\n WHEN (invhist_transtype='AD' AND invhist_invqty < 0) THEN 'ADJ'\n WHEN (invhist_transtype='AD') THEN whs1.warehous_code\n WHEN (invhist_transtype='CC') THEN whs1.warehous_code\n WHEN (invhist_transtype='EX') THEN 'EXPENSE'\n WHEN (invhist_transtype='IB') THEN 'WIP'\n WHEN (invhist_transtype='IM' AND invhist_invqty < 0) THEN whs1.warehous_code\n WHEN (invhist_transtype='IM') THEN 'WIP'\n WHEN (invhist_transtype='NN') THEN whs1.warehous_code\n WHEN (invhist_transtype='RB') THEN whs1.warehous_code\n WHEN (invhist_transtype='RM') THEN whs1.warehous_code\n WHEN (invhist_transtype='RP') THEN 'PURCH'\n WHEN (invhist_transtype='RR') THEN whs1.warehous_code\n WHEN (invhist_transtype='RS') THEN whs1.warehous_code\n WHEN (invhist_transtype='RT') THEN whs1.warehous_code\n WHEN (invhist_transtype='RX') THEN whs1.warehous_code\n WHEN (invhist_transtype='SH') THEN 'SHIP'\n WHEN (invhist_transtype='SI') THEN 'SCRAP'\n WHEN (invhist_transtype='SV') THEN 'SHIP'\n WHEN (invhist_transtype='TR') THEN whs1.warehous_code\n WHEN (invhist_transtype='TS') THEN whs2.warehous_code\n WHEN (invhist_transtype='RI') THEN 'WIP'\n ELSE ''\n END AS locto \nFROM itemsite, item, whsinfo AS whs1, invhist\n LEFT OUTER JOIN whsinfo AS whs2 ON (invhist_xfer_warehous_id=whs2.warehous_id)\nWHERE ( (invhist_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id) \n AND (itemsite_warehous_id=whs1.warehous_id)\n AND (DATE(invhist_transdate) BETWEEN AND )\n AND (transType(invhist_transtype, ))\n\n AND (invhist_ordnumber ~ )\n\n\n AND (invhist_ordtype='SO')\n AND (invhist_ordnumber ~ (\n SELECT cohead_number \n FROM cohead \n WHERE cohead_id=))\n\n\n AND (invhist_ordtype='PO')\n AND (invhist_ordnumber ~ (\n SELECT pohead_number \n FROM pohead \n WHERE pohead_id=))\n\n\n AND (invhist_ordtype='TO')\n AND (invhist_ordnumber ~ (\n SELECT tohead_number \n FROM tohead \n WHERE tohead_id=))\n\n\n AND (invhist_ordtype='WO')\n AND (invhist_ordnumber ~ formatWoNumber())\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (itemsite_item_id=)\n\n\n AND (item_classcode_id=)\n\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem\n\t\t WHERE (itemgrpitem_itemgrp_id=)))\n\n\n AND (itemsite_plancode_id=)\n\n\n AND (item_classcode_id IN (SELECT classcode_id\n\t\t\t FROM classcode\n\t\t\t WHERE (classcode_code ~ )))\n\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem, itemgrp\n\t\t WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t AND (itemgrp_name ~ ))))\n\n\n AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ )))\n\n\n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n\n) \nUNION SELECT invhist.*, 1 AS level,\n '' AS warehous_code, '' AS item_number,\n '' AS ordernumber,\n '' AS costmethod,\n invdetail_id,\n CASE WHEN (invdetail_location_id=-1) THEN formatlotserialnumber(invdetail_ls_id)\n WHEN (invdetail_ls_id IS NULL) THEN formatLocationName(invdetail_location_id)\n ELSE (formatLocationName(invdetail_location_id) || '-' || formatlotserialnumber(invdetail_ls_id))\n END AS locationname,\n invdetail_qty, invdetail_qty_before, invdetail_qty_after,\n '' AS locfrom,\n '' AS locto \nFROM itemsite, item, whsinfo AS whs1, invdetail, invhist LEFT OUTER JOIN\n whsinfo AS whs2 ON (invhist_xfer_warehous_id=whs2.warehous_id)\nWHERE ((invhist_hasdetail)\n AND (invhist_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=whs1.warehous_id)\n AND (invdetail_invhist_id=invhist_id)\n AND (DATE(invhist_transdate) BETWEEN AND )\n AND (transType(invhist_transtype, ))\n\n AND (invhist_ordtype=)\n\n\n AND (invhist_ordnumber ~ )\n\n\n AND (invhist_ordtype='SO')\n AND (invhist_ordnumber ~ (\n SELECT cohead_number \n FROM cohead \n WHERE cohead_id=))\n\n\n AND (invhist_ordtype='PO')\n AND (invhist_ordnumber ~ (\n SELECT pohead_number \n FROM pohead \n WHERE pohead_id=))\n\n\n AND (invhist_ordtype='TO')\n AND (invhist_ordnumber ~ (\n SELECT tohead_number \n FROM tohead \n WHERE tohead_id=))\n\n\n AND (invhist_ordtype='WO')\n AND (invhist_ordnumber ~ formatWoNumber())\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (itemsite_item_id=)\n\n\n AND (item_classcode_id=)\n\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem\n\t\t WHERE (itemgrpitem_itemgrp_id=)))\n\n\n AND (itemsite_plancode_id=)\n\n\n AND (item_classcode_id IN (SELECT classcode_id\n\t\t\t FROM classcode\n\t\t\t WHERE (classcode_code ~ )))\n\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem, itemgrp\n\t\t WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t AND (itemgrp_name ~ ))))\n\n\n AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ )))\n\n\n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n\n)\n\n ) AS data\nORDER BY sortdate DESC, invhist_id, level;\n admin 2013-07-26 0 307 freightPrices detail used by dspFreightPricesByCustomer, dspFreightPricesByCustomerType Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: freightPrices\n-- Name: detail\n-- Notes: used by dspFreightPricesByCustomer, dspFreightPricesByCustomerType\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemid, sourcetype, ipshead_name, source, ipsfreight_qtybreak, ipsfreight_price,\n CASE WHEN (ipsfreight_type = 'F') THEN \n ELSE \n END AS method,\n currConcat(ipshead_curr_id) AS currConcat,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia,\n 'qty' AS ipsfreight_qtybreak_xtnumericrole,\n AS ipsfreight_qtybreak_xtnullrole,\n 'salesprice' AS ipsfreight_price_xtnumericrole,\n AS warehous_code_xtnullrole,\n AS shipzone_name_xtnullrole,\n AS freightclass_code_xtnullrole,\n AS ipsfreight_shipvia_xtnullrole\nFROM (SELECT ipsfreight_id AS itemid, 1 AS sourcetype,\n ipshead_name,\n\n AS source,\n\n AS source,\n\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\n FROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\n WHERE ((true)\n\n AND (ipsass_cust_id=)\n AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) = 0)\n\n AND (ipsass_custtype_id=)\n\n\n AND (ipshead_expires > CURRENT_DATE)\n\n\n AND (ipshead_effective <= CURRENT_DATE)\n\n )\n\n UNION\n\n SELECT ipsfreight_id AS itemid, 2 AS sourcetype,\n ipshead_name,\n\n AS source,\n\n AS source,\n\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\n FROM ipsass\n\n JOIN custtype ON ((coalesce(length(ipsass_custtype_pattern), 0) > 0) AND\n (custtype_code ~ ipsass_custtype_pattern))\n\n JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n\n JOIN custinfo ON (cust_custtype_id=ipsass_custtype_id)\n\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\n WHERE ((true)\n\n AND (cust_id=)\n\n AND (custtype_id=)\n\n\n AND (ipshead_expires > CURRENT_DATE)\n\n\n AND (ipshead_effective <= CURRENT_DATE)\n\n )\n\n UNION\n\n SELECT ipsfreight_id AS itemid, 3 AS sourcetype,\n ipshead_name,\n\n AS source,\n\n ( || '-' || sale_name) AS source,\n\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\n FROM\n\n custinfo JOIN custtype ON (custtype_id=cust_custtype_id)\n JOIN ipsass ON ((coalesce(length(ipsass_custtype_pattern), 0) > 0) AND\n (custtype_code ~ ipsass_custtype_pattern))\n JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n\n sale JOIN ipshead ON (ipshead_id=sale_ipshead_id)\n\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\n WHERE ((true)\n\n AND (cust_id=)\n\n AND (true)\n\n\n \n AND (ipshead_expires > CURRENT_DATE)\n \n AND (sale_enddate > CURRENT_DATE)\n \n\n\n \n AND (ipshead_effective <= CURRENT_DATE)\n \n AND (sale_startdate <= CURRENT_DATE)\n \n\n )\n\n\n UNION\n\n SELECT ipsfreight_id AS itemid, 4 AS sourcetype,\n ipshead_name, ( || '-' || sale_name) AS source,\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\n FROM sale JOIN ipshead ON (ipshead_id=sale_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\n WHERE ((true)\n \n AND (sale_enddate > CURRENT_DATE)\n \n \n AND (sale_startdate <= CURRENT_DATE)\n \n )\n\n ) AS data\nORDER BY ipsfreight_qtybreak, ipsfreight_price;\n admin 2013-07-26 0 315 inventoryLocator detail used by dspInventoryLocator Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: inventoryLocator\n-- Name: detail\n-- Notes: used by dspInventoryLocator\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n AS locationname_xtnullrole,\n AS netable_xtnullrole,\n AS lotserial_xtnullrole,\n AS expiration_xtnullrole,\n AS warranty_xtnullrole,\n CASE WHEN (itemsite_perishable\n AND itemloc_expiration <= CURRENT_DATE) THEN 'error'\n WHEN (itemsite_warrpurc\n AND itemloc_warrpurc <= CURRENT_DATE) THEN 'error'\n END AS qtforegroundrole,\n 'qty' AS qoh_xtnumericrole\nFROM (SELECT itemloc_id, 1 AS type, warehous_code,\n itemsite_perishable, itemloc_expiration,\n itemsite_warrpurc, itemloc_warrpurc,\n CASE WHEN (location_id IS NOT NULL) THEN\n (formatLocationName(location_id) || '-' || firstLine(location_descrip))\n END AS locationname,\n CASE WHEN (location_id IS NOT NULL) THEN location_netable\n END AS netable,\n CASE WHEN (itemsite_controlmethod IN ('L', 'S')) THEN\n formatlotserialnumber(itemloc_ls_id)\n END AS lotserial,\n CASE WHEN (itemsite_perishable) THEN itemloc_expiration\n END AS expiration,\n CASE WHEN (itemsite_warrpurc) THEN itemloc_warrpurc\n END AS warranty,\n itemloc_qty AS qoh\n FROM itemsite, whsinfo,\n itemloc LEFT OUTER JOIN location ON (itemloc_location_id=location_id)\n WHERE ((itemsite_loccntrl OR (itemsite_controlmethod IN ('L', 'S')))\n AND (itemloc_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=)\n \n AND (itemsite_warehous_id=)\n \n )\n UNION\n SELECT itemsite_id, 2 AS type, warehous_code,\n itemsite_perishable, NULL AS itemloc_expiration,\n itemsite_warrpurc, NULL AS itemloc_warrpurc,\n NULL AS locationname,\n NULL AS netable,\n NULL AS lotserial,\n NULL AS expiration,\n NULL AS warranty,\n itemsite_qtyonhand AS qoh\n FROM itemsite, whsinfo\n WHERE ((NOT itemsite_loccntrl)\n AND (itemsite_controlmethod NOT IN ('L', 'S'))\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=)\n \n AND (itemsite_warehous_id=)\n \n )\n ) AS dummy\nORDER BY warehous_code, locationname, lotserial;\n admin 2013-07-26 0 316 invoiceInformation detail used by dspInvoiceInformation Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: invoiceInformation\n-- Name: detail\n-- Notes: used by dspInvoiceInformation\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT arapply_id,\n CASE WHEN (arapply_source_doctype = 'C') THEN \n WHEN (arapply_source_doctype = 'R') THEN \n WHEN (arapply_fundstype='C') THEN \n WHEN (arapply_fundstype='T') THEN \n WHEN (arapply_fundstype='M') THEN \n WHEN (arapply_fundstype='V') THEN \n WHEN (arapply_fundstype='A') THEN \n WHEN (arapply_fundstype='D') THEN \n WHEN (arapply_fundstype='R') THEN \n WHEN (arapply_fundstype='K') THEN \n WHEN (arapply_fundstype='W') THEN \n WHEN (arapply_fundstype='O') THEN \n END AS doctype,\n CASE WHEN (arapply_source_doctype IN ('C','R')) THEN arapply_source_docnumber\n WHEN (arapply_source_doctype = 'K') THEN arapply_refnumber\n ELSE \n END AS docnumber,\n arapply_postdate, arapply_applied,\n currConcat(arapply_curr_id) AS currabbr,\n currToBase(arapply_curr_id, arapply_applied, arapply_postdate) AS baseapplied,\n 'curr' AS arapply_applied_xtnumericrole,\n 'curr' AS baseapplied_xtnumericrole\nFROM arapply\nWHERE ((arapply_target_doctype='I')\n AND (arapply_target_docnumber=))\nORDER BY arapply_postdate;\n admin 2013-07-26 0 317 invoiceRegister detail used by dspInvoiceRegister Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: invoiceRegister\n-- Name: detail\n-- Notes: used by dspInvoiceRegister\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT *\nFROM (\n-- G/L Transactions\nSELECT DISTINCT\n -1 AS gltrans_id, -1 AS altId,\n gltrans_date, '' AS gltrans_source,\n '' AS doctype, '' AS gltrans_docnumber,\n '' AS notes, '' AS account,\n CAST(NULL AS NUMERIC) AS debit,\n CAST(NULL AS NUMERIC) AS credit,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole,\n 0 AS xtindentrole,\n gltrans_date AS transdate\nFROM gltrans\nWHERE ((gltrans_doctype IN ('IN', 'CM', 'DM', 'CD'))\n AND (gltrans_source = 'A/R')\n AND (gltrans_date BETWEEN AND )\n\n AND (gltrans_accnt_id=)\n\n )\n\nUNION\n-- Journals\nSELECT DISTINCT\n -1 AS gltrans_id, -1 AS altId,\n sltrans_date AS gltrans_date, '' AS gltrans_source,\n '' AS doctype, '' AS gltrans_docnumber,\n '' AS notes, '' AS account,\n CAST(NULL AS NUMERIC) AS debit,\n CAST(NULL AS NUMERIC) AS credit,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole,\n 0 AS xtindentrole,\n sltrans_date AS transdate\nFROM sltrans\nWHERE ((sltrans_doctype IN ('IN', 'CM', 'DM', 'CD'))\n AND (sltrans_source = 'A/R')\n AND (sltrans_date BETWEEN AND )\n\n AND (sltrans_accnt_id=)\n\n )\n) AS data\n\nUNION\n-- G/L Transactions\nSELECT gltrans_id,\n CASE WHEN(gltrans_doctype='IN') THEN 1\n WHEN(gltrans_doctype='CM') THEN 2\n WHEN(gltrans_doctype='DM') THEN 3\n WHEN(gltrans_doctype='CD') THEN 4\n ELSE -1\n END AS altId,\n gltrans_date, gltrans_source,\n CASE WHEN(gltrans_doctype='IN') THEN \n WHEN(gltrans_doctype='CM') THEN \n WHEN(gltrans_doctype='DM') THEN \n WHEN(gltrans_doctype='CD') THEN \n ELSE gltrans_doctype\n END AS doctype,\n gltrans_docnumber,\n CASE WHEN(gltrans_doctype='IN') THEN\n (SELECT invchead_shipto_name\n FROM aropen LEFT OUTER JOIN\n invchead\n ON (invchead_id=aropen_cobmisc_id\n AND invchead_cust_id=aropen_cust_id)\n WHERE ((aropen_docnumber=gltrans_docnumber)\n AND (aropen_doctype='I')))\n ELSE firstLine(gltrans_notes)\n END AS f_notes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS f_accnt,\n CASE WHEN (gltrans_amount < 0) THEN ABS(gltrans_amount)\n ELSE 0\n END AS debit,\n CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n ELSE 0\n END AS credit,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole,\n 1 AS xtindentrole,\n NULL AS transdate\nFROM gltrans, accnt\nWHERE ((gltrans_accnt_id=accnt_id)\n AND (gltrans_doctype IN ('IN', 'CM', 'DM', 'CD'))\n AND (gltrans_source = 'A/R')\n AND (gltrans_date BETWEEN AND )\n\n AND (gltrans_accnt_id=)\n\n )\n\nUNION\n-- Journals\nSELECT sltrans_id,\n CASE WHEN(sltrans_doctype='IN') THEN 1\n WHEN(sltrans_doctype='CM') THEN 2\n WHEN(sltrans_doctype='DM') THEN 3\n WHEN(sltrans_doctype='CD') THEN 4\n ELSE -1\n END AS altId,\n sltrans_date AS gltrans_date, sltrans_source AS gltrans_date,\n CASE WHEN(sltrans_doctype='IN') THEN \n WHEN(sltrans_doctype='CM') THEN \n WHEN(sltrans_doctype='DM') THEN \n WHEN(sltrans_doctype='CD') THEN \n ELSE sltrans_doctype\n END AS doctype,\n sltrans_docnumber AS gltrans_docnumber,\n CASE WHEN(sltrans_doctype='IN') THEN\n (SELECT invchead_shipto_name\n FROM aropen LEFT OUTER JOIN\n invchead\n ON (invchead_id=aropen_cobmisc_id\n AND invchead_cust_id=aropen_cust_id)\n WHERE ((aropen_docnumber=sltrans_docnumber)\n AND (aropen_doctype='I')))\n ELSE firstLine(sltrans_notes)\n END AS f_notes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS f_accnt,\n CASE WHEN (sltrans_amount < 0) THEN ABS(sltrans_amount)\n ELSE 0\n END AS debit,\n CASE WHEN (sltrans_amount > 0) THEN sltrans_amount\n ELSE 0\n END AS credit,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole,\n 1 AS xtindentrole,\n NULL AS transdate\nFROM sltrans, accnt\nWHERE ((sltrans_accnt_id=accnt_id)\n AND (sltrans_doctype IN ('IN', 'CM', 'DM', 'CD'))\n AND (sltrans_source = 'A/R')\n AND (sltrans_date BETWEEN AND )\n\n AND (sltrans_accnt_id=)\n\n )\nORDER BY gltrans_date, gltrans_docnumber, xtindentrole;\n admin 2013-07-26 0 313 invalidBillsofMaterials detail used by dspInvalidBillsOfMaterials Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: invalidBillsofMaterials\n-- Name: detail\n-- Notes: used by dspInvalidBillsOfMaterials\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, parent.item_id AS pitem_id,\n component.item_id AS citem_id,\n warehous_id, warehous_code,\n parent.item_number AS parentitem,\n component.item_number AS componentitem,\n (component.item_descrip1 || ' ' || component.item_descrip2) AS descrip\nFROM bomitem, itemsite, item AS parent, item AS component, whsinfo\nWHERE ((bomitem_parent_item_id=parent.item_id)\n AND (bomitem_item_id=component.item_id)\n AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1))\n AND (itemsite_item_id=parent.item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (parent.item_type='M')\n AND (itemsite_wosupply)\n AND (itemsite_active)\n AND (component.item_id NOT IN ( SELECT itemsite_item_id\n FROM itemsite\n WHERE ((itemsite_warehous_id=warehous_id)\n AND (itemsite_active)) ) ) \n\n AND (warehous_id=)\n\n )\nORDER BY warehous_code, parentitem, componentitem;\n admin 2013-07-26 0 19 inventoryAvailability byCustOrSO query to get item availability by either customer id/type/pattern or by cohead_id Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: inventoryAvailability\n-- Name: byCustOrSO\n-- Notes: query to get item availability by either customer id/type/pattern\n-- or by cohead_id\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT id, altid, cohead_id,\n item_number, descrip, uom_name,\n qoh, sobalance, allocated, ordered,\n atshipping,\n CASE WHEN (xtindentrole=1) THEN\n\n coitem_qtyreserved\n\n (qoh + ordered - sobalance)\n\n WHEN (xtindentrole=2) THEN (qoh + ordered - sobalance)\n END AS orderavail,\n (qoh + ordered - allocated) AS totalavail,\n orderdate, duedate,\n reorderlevel,\n (xtindentrole - 1) AS xtindentrole, \n 'qty' AS qoh_xtnumericrole,\n 'qty' AS sobalance_xtnumericrole,\n 'qty' AS allocated_xtnumericrole,\n 'qty' AS ordered_xtnumericrole,\n 'qty' AS orderavail_xtnumericrole,\n 'qty' AS totalavail_xtnumericrole,\n 'qty' AS atshipping_xtnumericrole,\n CASE WHEN (pack_id IS NOT NULL) THEN 'altemphasis'\n END AS qtforegroundrole,\n CASE WHEN (qoh < 0) THEN 'error'\n WHEN (qoh < reorderlevel) THEN 'warning'\n END AS qoh_qtforegroundrole,\n CASE WHEN (\n\n coitem_qtyreserved < 0\n\n (qoh + ordered - sobalance) < 0\n\n ) THEN 'error'\n WHEN ((qoh + ordered - sobalance) <= reorderlevel) THEN 'warning'\n END AS orderavail_qtforegroundrole,\n CASE WHEN ((qoh + ordered - allocated) < 0) THEN 'error'\n WHEN ((qoh + ordered - allocated) <= reorderlevel) THEN 'warning'\n END AS totalavail_qtforegroundrole,\n CASE WHEN (xtindentrole = 2 AND (orderdate <= CURRENT_DATE)\n AND (descrip IN ('O','E','S','R'))) THEN 'error'\n END AS atshipping_qtforegroundrole,\n CASE WHEN (xtindentrole = 2 AND duedate<=CURRENT_DATE) THEN 'error'\n END AS orderdate_qtforegroundrole,\n CASE WHEN (xtindentrole = 2 AND duedate<=CURRENT_DATE) THEN 'error'\n END AS duedate_qtforegroundrole,\n\n CASE WHEN (coitem_qtyreserved > 0\n AND sobalance > coitem_qtyreserved) THEN 'emphasis'\n WHEN ((sobalance <> 0)\n AND ((sobalance - coitem_qtyreserved) = 0)) THEN 'altemphasis'\n END AS qtforegroundrole,\n\n CASE WHEN (xtindentrole = 2) THEN ''\n END AS sobalance_qtdisplayrole\nFROM (\n\n SELECT cohead_id AS id, -2 AS altid, cohead_id, cohead_number,\n cohead_number AS item_number,\n '' AS trueitem_number,\n (cust_number||'-'||cust_name) AS descrip,\n '' AS uom_name, CAST(NULL AS NUMERIC) AS qoh,\n CAST(NULL AS NUMERIC) AS sobalance,\n CAST(NULL AS NUMERIC) AS allocated,\n CAST(NULL AS NUMERIC) AS ordered,\n CAST(NULL AS NUMERIC) AS atshipping,\n CAST(NULL AS NUMERIC) AS coitem_qtyreserved,\n cohead_orderdate AS orderdate, MIN(coitem_scheddate) AS duedate,\n pack_id,\n CAST(NULL AS NUMERIC) AS reorderlevel,\n 0 AS xtindentrole\n FROM cohead\n LEFT OUTER JOIN pack ON (pack_head_type='SO' AND pack_head_id=cohead_id)\n JOIN custinfo ON (cohead_cust_id=cust_id)\n JOIN coitem ON (coitem_cohead_id=cohead_id)\n JOIN itemsite ON (coitem_itemsite_id=itemsite_id)\n WHERE ((coitem_status NOT IN ('C', 'X'))\n \n AND (cust_custtype_id=)\n \n AND (cust_custtype_id IN (SELECT custtype_id\n FROM custtype\n WHERE(custtype_code ~ )))\n \n )\n GROUP BY cohead_id, item_number, cust_number,\n cust_name, cohead_orderdate, pack_id\n \n HAVING (MIN(noNeg(itemsite_qtyonhand) +\n qtyOrdered(itemsite_id, coitem_scheddate) -\n qtyAllocated(itemsite_id, coitem_scheddate)) < 0\n OR MIN(noNeg(itemsite_qtyonhand) +\n qtyOrdered(itemsite_id, coitem_scheddate) -\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) < 0\n )\n \n UNION\n\n SELECT itemsite_id AS id, coitem_id AS altid, cohead_id, cohead_number,\n item_number,\n item_number AS trueitem_number,\n (item_descrip1 || ' ' || item_descrip2) AS descrip,\n uom_name, noNeg(itemsite_qtyonhand) AS qoh,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS sobalance,\n qtyAllocated(itemsite_id, coitem_scheddate) AS allocated,\n qtyOrdered(itemsite_id, coitem_scheddate) AS ordered,\n qtyatshipping(coitem_id) AS atshipping,\n itemuomtouom(item_id, coitem_qty_uom_id, null, coitem_qtyreserved) AS coitem_qtyreserved,\n CAST(NULL AS DATE) AS orderdate, coitem_scheddate AS duedate,\n CAST(NULL AS INTEGER) AS pack_id,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel\n ELSE 0.0 END AS reorderlevel,\n 1 AS xtindentrole\n FROM cohead\n JOIN custinfo ON (cohead_cust_id=cust_id)\n , itemsite, item, uom, site(), coitem\n WHERE ((coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (coitem_status NOT IN ('C', 'X'))\n\n AND (cohead_id=)\n\n AND (cust_custtype_id=)\n\n AND (cust_custtype_id IN (SELECT custtype_id\n FROM custtype\n WHERE(custtype_code ~ )))\n\n\n AND ((noNeg(itemsite_qtyonhand) + qtyOrdered(itemsite_id, coitem_scheddate) - qtyAllocated(itemsite_id, coitem_scheddate) < 0)\n OR (noNeg(itemsite_qtyonhand) + qtyOrdered(itemsite_id, coitem_scheddate) - noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) < 0))\n\n )\n\n UNION\n SELECT itemsite_id, -1, cohead_id, cohead_number,\n formatwonumber(wo_id),\n item_number AS trueitem_number,\n wo_status,\n NULL, NULL,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS sobalance,\n NULL,\n noNeg((wo_qtyord-wo_qtyrcv)) AS ordered,\n NULL,\n NULL,\n wo_startdate, wo_duedate,\n NULL AS pack_id,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel\n ELSE 0.0 END AS reorderlevel,\n 2 AS xtindentrole\n FROM cohead\n JOIN custinfo ON (cohead_cust_id=cust_id)\n , itemsite, item, uom, site(), coitem\n LEFT OUTER JOIN wo\n ON ((coitem_itemsite_id=wo_itemsite_id)\n AND (wo_status IN ('E','R','I'))\n AND (wo_qtyord-wo_qtyrcv > 0)\n AND (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned-qtyatshipping(coitem_id)) >\n (SELECT itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=coitem_itemsite_id))))\n WHERE ((coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (coitem_status NOT IN ('C', 'X'))\n \n AND (cohead_id=)\n \n AND (cust_custtype_id=)\n \n AND (cust_custtype_id IN (SELECT custtype_id\n FROM custtype\n WHERE(custtype_code ~ )))\n \n \n AND ((noNeg(itemsite_qtyonhand) + qtyOrdered(itemsite_id, coitem_scheddate) - qtyAllocated(itemsite_id, coitem_scheddate) < 0)\n OR (noNeg(itemsite_qtyonhand) + qtyOrdered(itemsite_id, coitem_scheddate) - noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) < 0))\n \n )\n\n) AS data\nORDER BY cohead_number, trueitem_number,\n xtindentrole;\n admin 2013-07-26 0 23 invoices detail used by reprintInvoices, unpostedInvoices, dspRecurringInvoices Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: invoices\n-- Name: detail\n-- Notes: used by reprintInvoices, unpostedInvoices, dspRecurringInvoices\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT invchead_id, cust_id,\n invchead.*,\n cust_number, cust_name,\n (TEXT(cust_number) || ' - ' || cust_name) AS customer,\n COALESCE(invchead_gldistdate, invchead_invcdate) AS gldistdate,\n invoicetotal(invchead_id) AS extprice,\n CASE WHEN (aropen_open) THEN (aropen_amount - aropen_paid)\n ELSE 0\n END AS balance,\n (invchead_recurring_invchead_id IS NOT NULL) AS isRecurring,\n recur_freq,\n recur_period,\n CASE WHEN (recur_period='D') THEN \n WHEN (recur_period='W') THEN \n WHEN (recur_period='M') THEN \n WHEN (recur_period='Y') THEN \n WHEN (recur_period='m') THEN \n WHEN (recur_period='H') THEN \n ELSE \n END AS recur_period_qtdisplayrole,\n recur_end,\n \n invchead_invcnumber AS docnumber,\n findCustomerForm(cust_id, 'I') AS reportname,\n \n 'curr' AS extprice_xtnumericrole,\n 'curr' AS balance_xtnumericrole,\n CASE WHEN (aropen_id IS NULL) THEN 'Unposted' END AS balance_qtdisplayrole\nFROM invchead JOIN custinfo ON (cust_id=invchead_cust_id)\n LEFT OUTER JOIN aropen ON ( (aropen_doctype='I') AND (aropen_docnumber=invchead_invcnumber) )\n LEFT OUTER JOIN recur ON (invchead_recurring_invchead_id=recur_parent_id AND recur_parent_type='I')\nWHERE ( (true)\n\n AND (NOT invchead_posted)\n\n\n AND (invchead_posted)\n\n\n AND (invchead_recurring_invchead_id IS NOT NULL)\n\n\n AND (invchead_cust_id=)\n\n\n AND (invchead_invcdate BETWEEN AND )\n\n\n AND (invchead_invcnumber ~ )\n\n\n AND (aropen_open AND (aropen_amount - aropen_paid > 0))\n\n AND (checkInvoiceSitePrivs(invchead_id)) )\nORDER BY invchead_invcnumber\n;\n admin 2013-07-26 0 567 issueToShipping detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: issueToShipping\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n noNeg(qtyord - qtyshipped + qtyreturned) AS balance,\n 'qty' AS qtyord_xtnumericrole,\n 'qty' AS qtyshipped_xtnumericrole,\n 'qty' AS qtyreturned_xtnumericrole,\n 'qty' AS balance_xtnumericrole,\n 'qty' AS atshipping_xtnumericrole,\n CASE WHEN (scheddate > CURRENT_DATE AND\n noNeg(qtyord - qtyshipped + qtyreturned) <> atshipping) THEN 'future'\n WHEN (noNeg(qtyord - qtyshipped + qtyreturned) <> atshipping) THEN 'expired'\n END AS qtforegroundrole \nFROM (\n\nSELECT coitem_id AS lineitem_id, \n CASE \n WHEN (itemsite_costmethod = 'J') THEN \n 1 \n ELSE \n 0 \n END AS job, \n MIN(s1.shiphead_number) AS shiphead_number, \n formatSoLineNumber(coitem_id) AS linenumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n warehous_code,\n coitem_scheddate AS scheddate,\n uom_name,\n coitem_qtyord AS qtyord,\n coitem_qtyshipped AS qtyshipped,\n coitem_qtyreturned AS qtyreturned,\n COALESCE(SUM(shipitem_qty), 0) AS atshipping, \n coitem_linenumber AS seq1, coitem_subnumber AS seq2 \nFROM itemsite, item, site(), uom,\n coitem LEFT OUTER JOIN\n ( shipitem JOIN shiphead s1\n ON ( (shipitem_shiphead_id=s1.shiphead_id) \n AND (s1.shiphead_order_type='SO') \n AND (NOT s1.shiphead_shipped) )\n ) ON (shipitem_orderitem_id=coitem_id) \n-- TODO - need a facility to select which shipment you are working on\n-- LEFT OUTER JOIN shiphead s2 ON ((s2.shiphead_order_id=coitem_cohead_id) \n-- AND (s2.shiphead_order_type='SO') \n-- AND (NOT s2.shiphead_shipped )) \nWHERE ( (coitem_itemsite_id=itemsite_id)\n AND (coitem_qty_uom_id=uom_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (coitem_status NOT IN ('C','X'))\n AND (item_type != 'K')\n AND (coitem_cohead_id=) ) \nGROUP BY coitem_id, linenumber, item_number,\n item_descrip1, item_descrip2, warehous_code,\n coitem_scheddate, uom_name,\n coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned, \n coitem_linenumber, coitem_subnumber, \n-- s2.shiphead_number, \n itemsite_costmethod, itemsite_controlmethod \n\nSELECT toitem_id AS lineitem_id, \n 0 AS lsJob, \n MIN(s1.shiphead_number) AS shiphead_number, \n toitem_linenumber AS linenumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n tohead_srcname AS warehous_code,\n toitem_schedshipdate AS scheddate,\n uom_name,\n toitem_qty_ordered AS qtyord,\n toitem_qty_shipped AS qtyshipped,\n 0 AS qtyreturned,\n COALESCE(SUM(shipitem_qty), 0) AS atshipping, \n toitem_linenumber AS seq1, 0 AS seq2 \nFROM item, tohead, site(), uom,\n toitem LEFT OUTER JOIN\n ( shipitem JOIN shiphead s1\n ON ( (shipitem_shiphead_id=s1.shiphead_id) \n AND (s1.shiphead_order_type='TO') \n AND (NOT s1.shiphead_shipped) )\n ) ON (shipitem_orderitem_id=toitem_id) \n-- TODO - need a facility to select which shipment you are working on\n-- LEFT OUTER JOIN shiphead s2 ON ((s2.shiphead_order_id=toitem_tohead_id) \n-- AND (s2.shiphead_order_type='TO') \n-- AND (NOT s2.shiphead_shipped )) \nWHERE ( (toitem_item_id=item_id)\n AND (toitem_status NOT IN ('C','X'))\n AND (toitem_tohead_id=tohead_id)\n AND (tohead_src_warehous_id=warehous_id)\n AND (item_inv_uom_id=uom_id)\n AND (tohead_id=) ) \nGROUP BY toitem_id, toitem_linenumber, item_number,\n item_descrip1, item_descrip2, tohead_srcname,\n toitem_schedshipdate, uom_name,\n toitem_qty_ordered, toitem_qty_shipped \n-- s2.shiphead_number \n\n) AS sub \nORDER BY scheddate, seq1, seq2;\n admin 2013-07-26 0 318 itemCost detail used by dspItemCostSummary, dspItemCostsByClassCode, dspItemCostHistory Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemCost\n-- Name: detail\n-- Notes: used by dspItemCostSummary, dspItemCostsByClassCode, dspItemCostHistory\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n \n costhist_id, costelem_type,\n formatBoolYN(costhist_lowlevel) AS lowlevel,\n CASE WHEN costhist_type='A' THEN \n WHEN costhist_type='S' THEN \n WHEN costhist_type='D' THEN \n WHEN costhist_type='N' THEN \n END AS type,\n costhist_date,\n costhist_username AS username,\n costhist_oldcost,\n currConcat(costhist_oldcurr_id) AS oldcurr, \n\tcosthist_newcost,\n currConcat(costhist_newcurr_id) AS newcurr,\n 'cost' AS costhist_oldcost_xtnumericrole,\n 'cost' AS costhist_newcost_xtnumericrole\n \n item_id, item_number, description, item_active, \n uom_name, scost, acost, \n CASE WHEN (scost = 0) THEN NULL \n ELSE ((acost - scost) / scost) \n END AS percent_variance,\n 'percent' AS percent_variance_xtnumericrole, \n CASE WHEN (scost = 0) THEN NULL \n WHEN (((acost - scost) / scost) < 0) THEN 'error' \n ELSE NULL \n END AS percent_variance_qtforegroundrole, \n \n CASE WHEN (scost != acost\n AND ABS(scost - acost) < 10 ^ (-1 * ))\n THEN 'altemphasis' \n END AS qtforegroundrole,\n \n 'cost' AS scost_xtnumericrole,\n 'cost' AS acost_xtnumericrole \n \n itemcost_id,\n CASE WHEN (costelem_sys) THEN 1\n ELSE 0\n END,\n costelem_type, formatBoolYN(itemcost_lowlevel) AS lowlevel,\n itemcost_stdcost,\n currToBase(itemcost_curr_id, itemcost_actcost, NULL) AS itemcost_actcost,\n itemcost_updated, itemcost_posted,\n 'cost' AS itemcost_stdcost_xtnumericrole,\n 'cost' AS itemcost_actcost_xtnumericrole,\n 0 AS itemcost_stdcost_xttotalrole,\n 0 AS itemcost_actcost_xttotalrole,\n CASE WHEN COALESCE(itemcost_posted, endOfTime()) >= endOfTime() \n THEN \n END AS itemcost_posted_qtdisplayrole,\n CASE WHEN COALESCE(itemcost_updated, endOfTime()) >= endOfTime()\n THEN \n END AS itemcost_updated_qtdisplayrole\n \nFROM \n (SELECT item_id, item_number, item_active,\n (item_descrip1 || ' ' || item_descrip2) AS description,\n uom_name, stdcost(item_id) AS scost, actcost(item_id) AS acost\n FROM item, classcode, uom\n WHERE ((item_classcode_id=classcode_id)\n AND (item_inv_uom_id=uom_id)\n \n AND (classcode_id=)\n \n AND (classcode_code ~ )\n \n ) ) AS data \n \n costhist,costelem\n \n itemcost, costelem\n \nWHERE ( \n (costhist_costelem_id=costelem_id)\n AND (costhist_item_id=)\n \n true \n \n AND ((scost=0) OR (acost=0)) \n \n \n AND (scost != acost) \n AND (ABS(scost - acost) > 10 ^ (-1 * ))\n \n \n AND (item_active) \n \n \n (itemcost_costelem_id=costelem_id)\n AND (itemcost_item_id=)\n \n ) \nORDER BY \n costhist_date, costelem_type;\n \n item_number;\n \n itemcost_lowlevel, costelem_type;\n \n admin 2013-07-26 0 549 itemCost list used by maintainItemCosts, bomItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemCost\n-- Name: list\n-- Notes: used by maintainItemCosts, bomItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n-- The order of checking for item_id first is important.\n\n\n\nSELECT itemcost_id,\n CASE WHEN (costelem_sys) THEN 1\n ELSE 0\n END,\n CASE WHEN itemcost_costelem_id = -1 THEN :error\n\t ELSE costelem_type\n END AS costelem_type, itemcost_lowlevel,\n itemcost_stdcost, currConcat(baseCurrID()) AS baseCurr,\n itemcost_posted,\n itemcost_actcost, currConcat(itemcost_curr_id) AS costCurr,\n itemcost_updated,\n currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actcostBase,\n itemcost_curr_id,\n CASE WHEN (COALESCE(itemcost_posted, startOfTime()) <= startOfTime()) THEN :never\n END AS itemcost_posted_qtdisplayrole,\n 'cost' AS itemcost_stdcost_xtnumericrole,\n 'cost' AS itemcost_actcost_xtnumericrole\nFROM itemcost LEFT OUTER JOIN costelem ON (itemcost_costelem_id=costelem_id)\nWHERE (itemcost_item_id=)\nORDER BY itemcost_lowlevel, costelem_type;\n\n\n\nSELECT bomitemcost_id AS itemcost_id,\n CASE WHEN (costelem_sys) THEN 1\n ELSE 0\n END,\n CASE WHEN bomitemcost_costelem_id = -1 THEN :error\n\t ELSE costelem_type\n END AS costelem_type,\n bomitemcost_lowlevel AS itemcost_lowlevel,\n bomitemcost_stdcost AS itemcost_stdcost, currConcat(baseCurrID()) AS baseCurr,\n bomitemcost_posted AS itemcost_posted,\n bomitemcost_actcost AS itemcost_actcost,\n currConcat(bomitemcost_curr_id) AS costCurr,\n bomitemcost_updated AS itemcost_updated,\n currToBase(bomitemcost_curr_id, bomitemcost_actcost, CURRENT_DATE) AS actcostBase,\n bomitemcost_curr_id AS itemcost_curr_id,\n CASE WHEN (COALESCE(bomitemcost_posted, startOfTime()) <= startOfTime()) THEN :never\n END AS itemcost_posted_qtdisplayrole,\n 'cost' AS itemcost_stdcost_xtnumericrole,\n 'cost' AS itemcost_actcost_xtnumericrole\nFROM bomitemcost LEFT OUTER JOIN costelem ON (bomitemcost_costelem_id=costelem_id)\nWHERE (bomitemcost_bomitem_id=)\nORDER BY bomitemcost_lowlevel, costelem_type;\n\n\n admin 2013-07-26 0 506 itemPricingSchedule detail used by itemPricingSchedule Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemPricingSchedule\n-- Name: detail\n-- Notes: used by itemPricingSchedule\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT ipsitem_id AS id, 1 AS altid,\n CASE WHEN (ipsitem_item_id IS NOT NULL) THEN \n ELSE \n END AS target,\n COALESCE(item_number, prodcat_code) AS number,\n COALESCE(item_descrip1 || ' ' || item_descrip2, prodcat_descrip) AS descrip,\n qty.uom_name AS qtyuom, ipsitem_qtybreak AS qtybreak,\n price.uom_name AS priceuom,\n ((COALESCE(ipsitem_discntprcnt, 0.0) * 100) + ipsitem_price) AS price,\n (COALESCE(ipsitem_fixedamtdiscount, 0.0) + 0.00) AS fixedAmt,\n noNeg(CASE WHEN (ipsitem_type='N') THEN\n ipsitem_price\n WHEN (ipsitem_type='D') THEN\n (item_listprice - (item_listprice * COALESCE(ipsitem_discntprcnt, 0.0)) - COALESCE(ipsitem_fixedamtdiscount, 0.0))\n WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND fetchMetricBool('Long30Markups') AND fetchMetricBool('WholesalePriceCosting')) THEN\n (item_listcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount)\n WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND fetchMetricBool('Long30Markups')) THEN\n (itemCost(itemsite_id) / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount)\n WHEN (ipsitem_type = 'M' AND fetchMetricBool('WholesalePriceCosting')) THEN\n (item_listcost + (item_listcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount)\n WHEN (ipsitem_type = 'M') THEN\n (itemCost(itemsite_id) + (itemCost(itemsite_id) * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount)\n ELSE 0.0\n END) AS netPrice,\n CASE WHEN (ipsitem_type='N') THEN \n WHEN (ipsitem_type='D') THEN \n WHEN (ipsitem_type='M') THEN \n ELSE 'error'\n END AS type,\n CASE WHEN (ipsitem_type='N') THEN \n WHEN ((ipsitem_type IN ('D', 'M')) AND (COALESCE(ipsitem_discntprcnt, 0.0)=0.0) AND (COALESCE(ipsitem_fixedamtdiscount, 0.0)<>0.0)) THEN \n WHEN ((ipsitem_type IN ('D', 'M')) AND (COALESCE(ipsitem_discntprcnt, 0.0)<>0.0) AND (COALESCE(ipsitem_fixedamtdiscount, 0.0)=0.0)) THEN \n WHEN (ipsitem_type IN ('D', 'M')) THEN \n ELSE 'error'\n END AS method,\n 'qty' AS qtybreak_xtnumericrole,\n 'salesprice' AS netPrice_xtnumericrole,\n 'salesprice' AS price_xtnumericrole\nFROM ipsiteminfo LEFT OUTER JOIN item ON (item_id=ipsitem_item_id)\n LEFT OUTER JOIN prodcat ON (prodcat_id=ipsitem_prodcat_id)\n LEFT OUTER JOIN uom AS qty ON (qty.uom_id=ipsitem_qty_uom_id)\n LEFT OUTER JOIN uom AS price ON (price.uom_id=ipsitem_price_uom_id)\n LEFT OUTER JOIN itemsite ON (itemsite_item_id=item_id AND itemsite_warehous_id=)\nWHERE (ipsitem_ipshead_id=)\n\nUNION\n\nSELECT ipsfreight_id AS id, 2 AS altid, AS type,\n CASE WHEN (ipsfreight_type='F') THEN \n ELSE \n END AS number,\n ('From ' || COALESCE(warehous_code, ) || ' To ' || COALESCE(shipzone_name, )) AS descrip,\n CASE WHEN (ipsfreight_type='P') THEN uom_name END AS qtyuom,\n CASE WHEN (ipsfreight_type='P') THEN ipsfreight_qtybreak END AS qtybreak,\n uom_name AS priceuom, ipsfreight_price AS price,\n 0.00 AS fixedAmt,\n NULL AS netPrice,\n NULL AS type,\n NULL AS method,\n 'weight' AS qtybreak_xtnumericrole,\n 'salesprice' AS netPrice_xtnumericrole,\n 'salesprice' AS price_xtnumericrole\nFROM ipsfreight LEFT OUTER JOIN uom ON (uom_item_weight)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\nWHERE ( (ipsfreight_ipshead_id=) )\nORDER BY altid, number, qtybreak;\n admin 2013-07-26 0 24 itemReceipt populateEdit used by enterPoitemReceipt, splitReceipt ----PURCHASE ORDER---------- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemReceipt\n-- Name: populateEdit\n-- Notes: used by enterPoitemReceipt, splitReceipt\n------PURCHASE ORDER----------\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pohead_number AS order_number, poitem_linenumber AS orderitem_linenumber,\n (poitem_itemsite_id > 0) AS inventoryitem,\n COALESCE(poitem_itemsite_id, -1) AS itemsiteid,\n COALESCE(poitem_vend_item_number, '') AS vend_item_number,\n COALESCE(poitem_vend_uom, '') AS vend_uom,\n COALESCE(poitem_vend_item_descrip, '') AS vend_item_descrip,\n poitem_invvenduomratio AS orderitem_qty_invuomratio,\n poitem_duedate AS duedate,\n poitem_qty_ordered AS orderitem_qty_ordered,\n recv_qty AS qtyreceived,\n poitem_qty_returned AS qtyreturned,\n qtyToReceive('PO', poitem_id) AS qtytoreceive,\n (poitem_qty_ordered) AS receivable,\n recv_notes AS notes, recv_freight, recv_order_type,\n recv_freight_curr_id AS curr_id, recv_date AS effective,\n recv_purchcost, recv_purchcost_curr_id,\n CASE WHEN (itemsite_costmethod='A' AND NOT(recv_posted)) THEN TRUE\n ELSE FALSE\n END AS costmethod_average,\n 'uomratio' AS orderitem_qty_invuomratio_xtnumericrole,\n 'qty' AS orderitem_qty_ordered_xtnumericrole, \n 'qty' AS qtyreceived_xtnumericrole, \n 'qty' AS qtyreturned_xtnumericrole, \n 'qty' AS qtytoreceive_xtnumericrole, \n 'qty' AS receivable_xtnumericrole,\n 'purchprice' AS recv_purchcost_xtnumericrole \nFROM recv \n JOIN poitem ON ((recv_orderitem_id=poitem_id)\n AND (recv_order_type='PO'))\n JOIN pohead ON (poitem_pohead_id=pohead_id)\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\nWHERE (recv_id=)\n\nUNION\n-------RETURN AUTHORIZATIONS-----------\nSELECT rahead_number AS order_number, raitem_linenumber AS orderitem_linenumber,\n (raitem_itemsite_id > 0) AS inventoryitem,\n COALESCE(raitem_itemsite_id, -1) AS itemsiteid,\n '' AS vend_item_number,\n '' AS vend_uom,\n '' AS vend_item_descrip,\n raitem_qty_invuomratio AS orderitem_qty_invuomratio,\n raitem_scheddate AS duedate,\n raitem_qtyauthorized AS orderitem_qty_ordered,\n recv_qty AS qtyreceived,\n 0 AS qtyreturned,\n qtyToReceive('RA', raitem_id) AS qtytoreceive,\n (raitem_qtyauthorized) AS receivable,\n recv_notes AS notes, recv_freight, recv_order_type,\n recv_freight_curr_id AS curr_id, recv_date AS effective,\n NULL AS recv_purchcost, NULL AS recv_purchcost_curr_id,\n NULL AS costmethod_average,\n 'uomratio' AS orderitem_qty_invuomratio_xtnumericrole,\n 'qty' AS orderitem_qty_ordered_xtnumericrole, \n 'qty' AS qtyreceived_xtnumericrole, \n 'qty' AS qtyreturned_xtnumericrole, \n 'qty' AS qtytoreceive_xtnumericrole, \n 'qty' AS receivable_xtnumericrole,\n 'purchprice' AS recv_purchcost_xtnumericrole \nFROM recv\n JOIN raitem ON ((recv_orderitem_id=raitem_id)\n AND (recv_order_type='RA'))\n JOIN rahead ON (raitem_rahead_id=rahead_id)\nWHERE (recv_id=)\n\n\nUNION\n----------TRANSFER ORDERS---------\nSELECT tohead_number AS order_number, toitem_linenumber AS orderitem_linenumber,\n (itemsite_id > 0) AS inventoryitem,\n itemsite_id AS itemsiteid,\n '' AS vend_item_number,\n '' AS vend_uom,\n '' AS vend_item_descrip,\n 1 AS orderitem_qty_invuomratio,\n toitem_duedate AS duedate,\n toitem_qty_ordered AS orderitem_qty_ordered,\n recv_qty AS qtyreceived,\n 0 AS qtyreturned,\n qtyToReceive('TO', toitem_id) AS qtytoreceive,\n (toitem_qty_ordered) AS receivable,\n recv_notes AS notes, recv_freight, recv_order_type,\n recv_freight_curr_id AS curr_id, recv_date AS effective,\n NULL AS recv_purchcost, NULL AS recv_purchcost_curr_id,\n NULL AS costmethod_average,\n 'uomratio' AS orderitem_qty_invuomratio_xtnumericrole,\n 'qty' AS orderitem_qty_ordered_xtnumericrole, \n 'qty' AS qtyreceived_xtnumericrole, \n 'qty' AS qtyreturned_xtnumericrole, \n 'qty' AS qtytoreceive_xtnumericrole, \n 'qty' AS receivable_xtnumericrole,\n 'purchprice' AS recv_purchcost_xtnumericrole \nFROM itemsite, recv\n JOIN toitem ON ((recv_orderitem_id=toitem_id)\n AND (recv_order_type='TO'))\n JOIN tohead ON (toitem_tohead_id=tohead_id)\nWHERE ((recv_id=)\n AND (tohead_dest_warehous_id=itemsite_warehous_id)\n AND (toitem_item_id=itemsite_item_id))\n;\n admin 2013-07-26 0 25 itemReceipt populateNew used by enterPoitemReceipt -------PURCHASE ORDERS------------- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemReceipt\n-- Name: populateNew\n-- Notes: used by enterPoitemReceipt\n---------PURCHASE ORDERS-------------\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pohead_number AS order_number, poitem_linenumber AS orderitem_linenumber,\n (poitem_itemsite_id > 0) AS inventoryitem,\n COALESCE(poitem_itemsite_id, -1) AS itemsiteid,\n COALESCE(poitem_vend_item_number, '') AS vend_item_number,\n COALESCE(poitem_vend_uom, '') AS vend_uom,\n COALESCE(poitem_vend_item_descrip, '') AS vend_item_descrip,\n poitem_invvenduomratio AS orderitem_qty_invuomratio,\n poitem_duedate AS duedate,\n poitem_qty_ordered AS orderitem_qty_ordered,\n poitem_qty_received AS qtyreceived,\n poitem_qty_returned AS qtyreturned,\n qtyToReceive('PO', poitem_id) AS qtytoreceive,\n (poitem_qty_ordered - poitem_qty_received) AS receivable,\n ( SELECT recv_notes\n FROM recv\n WHERE ((recv_orderitem_id=poitem_id)\n\t AND (recv_order_type='PO')\n AND (NOT recv_posted))\n\t LIMIT 1 ) AS notes,\n COALESCE(freightForRecv('PO', poitem_id, false),\n\t\tpoitem_freight - freightForRecv('PO', poitem_id, true),\n\t\tfreightForRecv('PO', poitem_id, true)) AS recv_freight,\n pohead_curr_id AS curr_id, CURRENT_DATE AS effective, \n poitem_unitprice AS recv_purchcost,\n pohead_curr_id AS recv_purchcost_curr_id,\n CASE WHEN (itemsite_costmethod='A') THEN TRUE \n\t ELSE FALSE \n END AS costmethod_average,\n 'uomratio' AS orderitem_qty_invuomratio_xtnumericrole,\n 'qty' AS orderitem_qty_ordered_xtnumericrole, \n 'qty' AS qtyreceived_xtnumericrole, \n 'qty' AS qtyreturned_xtnumericrole, \n 'qty' AS qtytoreceive_xtnumericrole, \n 'qty' AS receivable_xtnumericrole,\n 'purchprice' AS recv_purchcost_xtnumericrole \nFROM pohead\n JOIN poitem ON (pohead_id=poitem_pohead_id)\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\nWHERE ((poitem_status <> 'C')\n AND (poitem_id=)\n AND ('PO'=) )\n\nUNION\n---------RETURN AUTHORIZATIONS-------------\nSELECT rahead_number AS order_number, raitem_linenumber AS orderitem_linenumber,\n (raitem_itemsite_id > 0) AS inventoryitem,\n COALESCE(raitem_itemsite_id, -1) AS itemsiteid,\n '' AS vend_item_number,\n '' AS vend_uom,\n '' AS vend_item_descrip,\n raitem_qty_invuomratio AS orderitem_qty_invuomratio,\n raitem_scheddate AS duedate,\n raitem_qtyauthorized AS orderitem_qty_ordered,\n raitem_qtyreceived AS qtyreceived,\n 0 AS qtyreturned,\n qtyToReceive('RA', raitem_id) AS qtytoreceive,\n (raitem_qtyauthorized - raitem_qtyreceived) AS receivable,\n ( SELECT recv_notes\n FROM recv\n WHERE ((recv_orderitem_id=raitem_id)\n\t AND (recv_order_type='RA')\n AND (NOT recv_posted))\n\t LIMIT 1 ) AS notes,\n COALESCE(freightForRecv('RA', raitem_id, false),\n\t\tfreightForRecv('RA', raitem_id, true)) AS recv_freight,\n rahead_curr_id AS curr_id, CURRENT_DATE AS effective, \n NULL AS recv_purchcost, NULL AS recv_purchcost_curr_id,\n NULL AS costmethod_average,\n 'uomratio' AS orderitem_qty_invuomratio_xtnumericrole,\n 'qty' AS orderitem_qty_ordered_xtnumericrole, \n 'qty' AS qtyreceived_xtnumericrole, \n 'qty' AS qtyreturned_xtnumericrole, \n 'qty' AS qtytoreceive_xtnumericrole, \n 'qty' AS receivable_xtnumericrole,\n 'purchprice' AS recv_purchcost_xtnumericrole \nFROM rahead\n JOIN raitem ON (rahead_id=raitem_rahead_id)\nWHERE ((raitem_status <> 'C')\n AND (raitem_id=)\n AND ('RA'=) )\n\n\nUNION\n-------------TRANSFER ORDERS--------------\nSELECT tohead_number AS order_number, toitem_linenumber AS orderitem_linenumber,\n (itemsite_id > 0) AS inventoryitem,\n COALESCE(itemsite_id, -1) AS itemsiteid,\n '' AS vend_item_number,\n '' AS vend_uom,\n '' AS vend_item_descrip,\n 1 AS orderitem_qty_invuomratio,\n toitem_duedate AS duedate,\n toitem_qty_ordered AS orderitem_qty_ordered,\n toitem_qty_received AS qtyreceived,\n toitem_qty_shipped AS qtyreturned,\n qtyToReceive('TO', toitem_id) AS qtytoreceive,\n (toitem_qty_ordered - toitem_qty_received) AS receivable,\n ( SELECT recv_notes\n FROM recv\n WHERE ((recv_orderitem_id=toitem_id)\n\t AND (recv_order_type='TO')\n AND (NOT recv_posted))\n\t LIMIT 1 ) AS notes,\n COALESCE(freightForRecv('TO', toitem_id, false),\n\t\tfreightForRecv('TO', toitem_id, true)) AS recv_freight,\n baseCurrId() AS curr_id, CURRENT_DATE AS effective, \n NULL AS recv_purchcost, NULL AS recv_purchcost_curr_id,\n NULL AS costmethod_average,\n 'uomratio' AS orderitem_qty_invuomratio_xtnumericrole,\n 'qty' AS orderitem_qty_ordered_xtnumericrole, \n 'qty' AS qtyreceived_xtnumericrole, \n 'qty' AS qtyreturned_xtnumericrole, \n 'qty' AS qtytoreceive_xtnumericrole, \n 'qty' AS receivable_xtnumericrole,\n 'purchprice' AS recv_purchcost_xtnumericrole \nFROM itemsite, tohead\n JOIN toitem ON (tohead_id=toitem_tohead_id) \nWHERE ((toitem_status NOT IN ('C', 'X'))\n AND (toitem_id=)\n AND ('TO'=)\n AND (tohead_dest_warehous_id=itemsite_warehous_id)\n AND (toitem_item_id=itemsite_item_id))\n;\n admin 2013-07-26 0 320 itemSites detail Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemSites\n-- Name: detail\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id,warehous_code,itemsite_qtyonhand, itemsite_active, \n CASE WHEN ( (itemsite_loccntrl) OR\n (itemsite_controlmethod IN ('L', 'S')) ) THEN 1\n ELSE 0\n END AS altId,\n CASE WHEN itemsite_controlmethod='R' THEN \n WHEN itemsite_controlmethod='N' THEN \n WHEN itemsite_controlmethod='L' THEN \n WHEN itemsite_controlmethod='S' THEN \n END AS controlmethod,\n itemsite_loccntrl,\n item_number,\n (item_descrip1 || ' ' || item_descrip2) AS description, \n uom_name,\n CASE WHEN (itemsite_sold) THEN TEXT(itemsite_soldranking)\n END AS soldranking,\n CASE WHEN (itemsite_datelastcount=startOfTime()) THEN NULL\n ELSE itemsite_datelastcount\n END AS datelastcount,\n CASE WHEN (itemsite_datelastused=startOfTime()) THEN NULL\n ELSE itemsite_datelastused\n END AS datelastused,\n itemsite_abcclass, itemsite_cyclecountfreq,\n 'qty' AS itemsite_qtyonhand_xtnumericrole,\n AS soldranking_xtnullrole,\n AS datelastused_xtnullrole,\n AS datelastcount_xtnullrole \nFROM item, uom, itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=item_id)\n AND(item_inv_uom_id=uom_id)\n \n AND ((item_number ~* )\n OR (COALESCE(item_descrip1,'') || ' ' || COALESCE(item_descrip2,'') ~* )\n OR (warehous_code ~* ))\n \n \n AND (item_id=)\n \n \n AND (item_classcode_id=)\n \n \n AND (item_id IN (SELECT itemgrpitem_item_id \n FROM itemgrpitem \n WHERE (itemgrpitem_itemgrp_id=)))\n \n \n AND (itemsite_plancode_id=)\n \n \n AND (itemsite_costcat_id=)\n \n \n AND (item_classcode_id IN (SELECT classcode_id \n FROM classcode \n WHERE (classcode_code ~ )))\n \n \n AND (item_id IN (SELECT itemgrpitem_item_id \n FROM itemgrpitem, itemgrp \n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) \n AND (itemgrp_name ~ ) ) ))\n \n \n AND (itemsite_plancode_id IN (SELECT plancode_id \n FROM plancode \n WHERE (plancode_code ~ )))\n \n \n AND (itemsite_costcat_id IN (SELECT costcat_id \n FROM costcat \n WHERE (costcat_code ~ )))\n \n \n AND (warehous_id=)\n \n \n AND (itemsite_active)\n \n )\nORDER BY item_number, warehous_code;\n admin 2013-07-26 0 321 itemSources detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemSources\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsrc_id, \n vend_name, \n item_number, uom_name,\n (item_descrip1 || ' ' || item_descrip2) AS item_descrip,\n contrct_number,\n itemsrc.*,\n 'qty' AS itemsrc_invvendoruomratio_xtnumericrole,\n CASE WHEN COALESCE(itemsrc_effective, startOfTime()) <=\n startOfTime() THEN \n END AS itemsrc_effective_qtdisplayrole,\n CASE WHEN COALESCE(itemsrc_expires, endOfTime()) >=\n endOfTime() THEN \n END AS itemsrc_expires_qtdisplayrole,\n CASE WHEN (COALESCE(itemsrc_expires, endOfTime()) < CURRENT_DATE) THEN 'expired'\n WHEN (COALESCE(itemsrc_effective, startOfTime()) > CURRENT_DATE) THEN 'future'\n END AS qtforegroundrole\nFROM itemsrc JOIN vendinfo ON (vend_id=itemsrc_vend_id AND vend_active)\n JOIN item ON (item_id=itemsrc_item_id)\n JOIN uom ON (uom_id=item_inv_uom_id)\n LEFT OUTER JOIN contrct ON (contrct_id=itemsrc_contrct_id) \nWHERE ((true)\n\n AND (itemsrc_active)\n\n\n AND (itemsrc_item_id=)\n\n\n AND (itemsrc_vend_id=)\n\n\n AND (itemsrc_contrct_id=)\n\n\n AND (contrct_number ~* )\n\n\n AND (itemsrc_expires > CURRENT_DATE)\n\n\n AND (itemsrc_effective <= CURRENT_DATE)\n\n)\n\nORDER BY itemsrc_ranking, vend_name,\n itemsrc_vend_item_number, itemsrc_manuf_name,\n itemsrc_manuf_item_number\n\nORDER By item_number, vend_name\n\n;\n admin 2013-07-26 0 568 itemSources prices Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemSources\n-- Name: prices\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsrcp_id, itemsrc_id,\n vend_number, vend_name,\n currConcat(vend_curr_id) AS vend_curr,\n item_number,\n (item_descrip1 || ' ' || item_descrip2) AS item_descrip,\n warehous_code, uom_name,\n contrct_number,\n itemsrc.*,\n (itemsrc_vend_item_number || '/' || itemsrc_manuf_item_number) AS itemsrc_descrip,\n itemsrcp.*,\n currConcat(itemsrcp_curr_id) AS item_curr,\n noNeg(CASE WHEN (itemsrcp_type='N') THEN currToBase(itemsrcp_curr_id, itemsrcp_price, itemsrcp_updated)\n WHEN (itemsrcp_type='D') THEN (item_listcost - (item_listcost * COALESCE(itemsrcp_discntprcnt, 0.0)) - COALESCE(itemsrcp_fixedamtdiscount, 0.0))\n ELSE 0.0\n END) AS price_base,\n noNeg(CASE WHEN (itemsrcp_type='N') THEN itemsrcp_price\n WHEN (itemsrcp_type='D') THEN (item_listcost - (item_listcost * COALESCE(itemsrcp_discntprcnt, 0.0)) - COALESCE(itemsrcp_fixedamtdiscount, 0.0))\n ELSE 0.0\n END) AS price_local,\n CASE WHEN (itemsrcp_type='N') THEN \n WHEN (itemsrcp_type='D') THEN \n ELSE 'error'\n END AS type,\n CASE WHEN (itemsrcp_type='N') THEN \n WHEN ((itemsrcp_type='D') AND (COALESCE(itemsrcp_discntprcnt, 0.0)=0.0) AND (COALESCE(itemsrcp_fixedamtdiscount, 0.0)<>0.0)) THEN \n WHEN ((itemsrcp_type='D') AND (COALESCE(itemsrcp_discntprcnt, 0.0)<>0.0) AND (COALESCE(itemsrcp_fixedamtdiscount, 0.0)=0.0)) THEN \n WHEN (itemsrcp_type='D') THEN \n ELSE 'error'\n END AS method,\n 'qty' AS itemsrc_invvendoruomratio_xtnumericrole,\n 'qty' AS itemsrc_minordqty_xtnumericrole,\n 'qty' AS itemsrc_ordqtymult_xtnumericrole,\n 'qty' AS itemsrcp_qtybreak_xtnumericrole,\n 'purchprice' AS price_local_xtnumericrole,\n 'purchprice' AS price_base_xtnumericrole,\n 'percent' AS itemsrcp_discntprcnt_xtnumericrole,\n CASE WHEN (warehous_code IS NULL) THEN \n END AS warehous_code_qtdisplayrole,\n CASE WHEN (itemsrcp_dropship) THEN \n ELSE \n END AS itemsrcp_dropship_qtdisplayrole,\n CASE WHEN COALESCE(itemsrc_effective, startOfTime()) <=\n startOfTime() THEN \n END AS itemsrc_effective_qtdisplayrole,\n CASE WHEN COALESCE(itemsrc_expires, endOfTime()) >=\n endOfTime() THEN \n END AS itemsrc_expires_qtdisplayrole,\n CASE WHEN (COALESCE(itemsrc_expires, endOfTime()) < CURRENT_DATE) THEN 'expired'\n WHEN (COALESCE(itemsrc_effective, startOfTime()) > CURRENT_DATE) THEN 'future'\n END AS qtforegroundrole\nFROM itemsrc JOIN vendinfo ON (vend_id=itemsrc_vend_id AND vend_active)\n JOIN item ON (item_id=itemsrc_item_id)\n JOIN uom ON (uom_id=item_inv_uom_id)\n JOIN itemsrcp ON (itemsrcp_itemsrc_id=itemsrc_id)\n LEFT OUTER JOIN contrct ON (contrct_id=itemsrc_contrct_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=itemsrcp_warehous_id)\nWHERE ((true)\n\n AND (itemsrc_active)\n\n\n AND (itemsrc_item_id=)\n\n\n AND (itemsrc_vend_id=)\n\n\n AND (itemsrc_id=)\n\n\n AND (itemsrcp_warehous_id=)\n\n\n AND (itemsrcp_dropship)\n\n\n AND ( (item_number ~* )\n OR (COALESCE(item_descrip1,'') || COALESCE(item_descrip2,'') ~* ) )\n\n\n AND (item_number ~* )\n\n\n AND (COALESCE(item_descrip1,'') || COALESCE(item_descrip2,'') ~* )\n\n\n AND (itemsrc_contrct_id=)\n\n\n AND (contrct_number ~* )\n\n\n AND (vend_name ~* )\n\n\n AND (itemsrc_vend_item_number ~* )\n\n\n AND (itemsrc_manuf_name ~* )\n\n\n AND (itemsrc_manuf_item_number ~* )\n\n\n AND (COALESCE(contrct_effective, itemsrc_effective) >= )\n\n\n AND (COALESCE(contrct_effective, itemsrc_effective) <= )\n\n\n AND (COALESCE(contrct_expires, itemsrc_expires) >= )\n\n\n AND (COALESCE(contrct_expires, itemsrc_expires) <= )\n\n)\nORDER By item_number, vend_name, itemsrcp_qtybreak\n;\n admin 2013-07-26 0 569 itemSources search Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemSources\n-- Name: search\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n SELECT itemsrc_id AS id,\n 1 AS altid,\n item_number,\n (item_descrip1 || ' ' || item_descrip2) AS item_descrip,\n vend_name,\n itemsrc_vend_item_number,\n itemsrc_vend_item_descrip,\n itemsrc_manuf_name,\n itemsrc_manuf_item_number,\n itemsrc_manuf_item_descrip\n FROM vendinfo JOIN itemsrc ON (itemsrc_vend_id=vend_id)\n JOIN item ON (item_id=itemsrc_item_id)\n WHERE (vend_id=)\n AND ( (FALSE)\n\n OR (item_number ~* )\n\n\n OR (itemsrc_vend_item_number ~* )\n\n\n OR (item_descrip1 ~* )\n\n\n OR (item_descrip2 ~* )\n\n\n OR (itemsrc_vend_item_descrip ~* )\n\n\n OR (itemsrc_manuf_name ~* )\n\n\n OR (itemsrc_manuf_item_number ~* )\n\n )\n UNION\n SELECT DISTINCT poitem_expcat_id AS id,\n 2 AS altid,\n AS item_number,\n (expcat_code || ' ' || expcat_descrip) AS item_descrip,\n vend_name,\n poitem_vend_item_number,\n poitem_vend_item_descrip,\n poitem_manuf_name,\n poitem_manuf_item_number,\n poitem_manuf_item_descrip\n FROM vendinfo JOIN pohead ON (pohead_vend_id=vend_id)\n JOIN poitem ON (poitem_pohead_id=pohead_id)\n LEFT OUTER JOIN expcat ON (poitem_expcat_id=expcat_id)\n WHERE (vend_id=)\n AND (COALESCE(poitem_vend_item_number, '')!='')\n AND (poitem_itemsite_id IS NULL)\n AND ( (FALSE)\n\n OR (poitem_vend_item_number ~* )\n\n\n OR (expcat_code ~* )\n OR (expcat_descrip ~* )\n\n\n OR (poitem_vend_item_descrip ~* )\n\n\n OR (poitem_manuf_name ~* )\n\n\n OR (poitem_manuf_item_number ~* )\n\n )\n ORDER BY item_number, vend_name;\n admin 2013-07-26 0 149 itemcostdetail detail dspItemCostDetail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemcostdetail\n-- Name: detail\n-- Notes: dspItemCostDetail\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT id, item.item_id, seqnumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip, uom_name,\n qtyper, 'qtyper' AS qtyper_xtnumericrole,\n scrap, 'scrap' AS scrap_xtnumericrole,\n cost, 'cost' AS cost_xtnumericrole,\n extendedcost, 'cost' AS extendedcost_xtnumericrole,\n 0 AS extendedcost_xttotalrole \nFROM uom, item, (\n\n SELECT bomitem_id AS id, bomitem_seqnumber AS seqnumber,\n (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper,\n bomitem_scrap AS scrap,\n bomitem_item_id AS item_id,\n \n itemcost_stdcost AS cost,\n (itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL,\n (bomitem_qtyfxd/bomhead_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * itemcost_stdcost) AS extendedcost\n \n currToBase(itemcost_curr_id, itemcost_actcost, NULL) AS cost,\n (itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL,\n (bomitem_qtyfxd/bomhead_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') *\n currToBase(itemcost_curr_id, itemcost_actcost, NULL)) AS extendedcost \n \n FROM bomitem\n JOIN itemcost ON (itemcost_item_id=bomitem_item_id)\n JOIN costelem ON (itemcost_costelem_id=costelem_id)\n JOIN bomhead ON (bomhead_item_id=bomitem_parent_item_id AND bomhead_rev_id=bomitem_rev_id)\n \n LEFT OUTER JOIN rev ON ((bomitem_rev_id=rev_id) AND (COALESCE(rev_status, 'A')='A')) \n \n WHERE ((CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires-1))\n AND (bomitem_parent_item_id=)\n AND (costelem_id=) ) \n\n SELECT bbomitem_id AS id, bbomitem_seqnumber AS seqnumber,\n bbomitem_qtyper AS qtyper,\n bbomitem_costabsorb AS scrap,\n bbomitem_parent_item_id AS item_id,\n \n itemcost_stdcost AS cost,\n (itemcost_stdcost / bbomitem_qtyper *\n bbomitem_costabsorb) AS extendedcost \n \n currToBase(itemcost_curr_id, itemcost_actcost, NULL) AS cost,\n (currToBase(itemcost_curr_id, itemcost_actcost, NULL) / bbomitem_qtyper *\n bbomitem_costabsorb) AS extendedcost \n \n FROM xtmfg.bbomitem\n JOIN itemcost ON (itemcost_item_id=bbomitem_parent_item_id)\n WHERE ((CURRENT_DATE BETWEEN bbomitem_effective AND (bbomitem_expires-1))\n AND (itemcost_costelem_id=)\n AND (bbomitem_item_id=) )\n UNION\n SELECT source.bbomitem_id, source.bbomitem_seqnumber AS seqnumber,\n source.bbomitem_qtyper, target.bbomitem_costabsorb,\n item_id,\n \n itemcost_stdcost AS cost,\n (itemcost_stdcost * source.bbomitem_qtyper /\n target.bbomitem_qtyper * target.bbomitem_costabsorb) AS extendedcost \n \n currToBase(itemcost_curr_id, itemcost_actcost, NULL) AS cost,\n (currToBase(itemcost_curr_id, itemcost_actcost, NULL) * source.bbomitem_qtyper /\n target.bbomitem_qtyper * target.bbomitem_costabsorb) AS extendedcost \n \n FROM xtmfg.bbomitem AS source\n JOIN item ON (source.bbomitem_item_id=item_id)\n JOIN itemcost ON (source.bbomitem_item_id=itemcost_item_id)\n JOIN xtmfg.bbomitem AS target\n ON (source.bbomitem_parent_item_id=target.bbomitem_parent_item_id)\n WHERE ((CURRENT_DATE BETWEEN source.bbomitem_effective\n AND (source.bbomitem_expires-1))\n AND (CURRENT_DATE BETWEEN target.bbomitem_effective\n AND (target.bbomitem_expires-1))\n AND (item_type='Y')\n AND (target.bbomitem_item_id=)\n AND (itemcost_costelem_id=) )\n\n) AS data \nWHERE ((data.item_id=item.item_id)\n AND (item_inv_uom_id=uom_id)) \nORDER BY seqnumber;\n admin 2013-07-26 0 26 itemReceipt sourceItemSite used by enterPoitemReceipt Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemReceipt\n-- Name: sourceItemSite\n-- Notes: used by enterPoitemReceipt\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\t\t\t-- this should never be called\n SELECT -1 AS itemsite_id, -1 AS warehous_id;\n\n SELECT itemsite_id, tohead_dest_warehous_id AS warehous_id\n FROM tohead, toitem, itemsite \n WHERE ((itemsite_item_id=toitem_item_id)\n AND (itemsite_warehous_id=tohead_src_warehous_id)\n AND (toitem_tohead_id=tohead_id)\n AND (toitem_id=));\n\t\t\t-- this should never be called\n SELECT itemsite_id, tohead_dest_warehous_id AS warehous_id\n FROM tohead, toitem, itemsite, recv\n WHERE ((itemsite_item_id=toitem_item_id)\n AND (itemsite_warehous_id=tohead_src_warehous_id)\n AND (toitem_tohead_id=tohead_id)\n AND (toitem_id=recv_orderitem_id)\n AND (recv_id=));\n\n admin 2013-07-26 0 319 items detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: items\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n SELECT\n \n DISTINCT ON ( toNumeric(item_number, 999999999999999), item_number )\n \n DISTINCT ON ( item_number )\n \n item.*, classcode.*, uom.*, prodcat.*, freightclass.*,\n \n charass_alias.charass_value AS char,\n \n \n charass_alias.charass_value AS char,\n \n \n charass_alias.charass_value::date AS char,\n \n (COALESCE(item_descrip1,'') || ' ' || COALESCE(item_descrip2,'')) as item_descrip,\n CASE WHEN (item_type='P') THEN text()\n WHEN (item_type='M') THEN text()\n WHEN (item_type='F') THEN text()\n WHEN (item_type='B') THEN text()\n WHEN (item_type='C') THEN text()\n WHEN (item_type='Y') THEN text()\n WHEN (item_type='R') THEN text()\n WHEN (item_type='S') THEN text()\n WHEN (item_type='T') THEN text()\n WHEN (item_type='A') THEN text()\n WHEN (item_type='O') THEN text()\n WHEN (item_type='L') THEN text()\n WHEN (item_type='K') THEN text()\n ELSE text()\n END AS f_item_type,\n CASE WHEN (item_type='P') THEN text()\n WHEN (item_type='M') THEN text()\n WHEN (item_type='F') THEN text()\n WHEN (item_type='B') THEN text()\n WHEN (item_type='C') THEN text()\n WHEN (item_type='Y') THEN text()\n WHEN (item_type='R') THEN text()\n WHEN (item_type='S') THEN text()\n WHEN (item_type='T') THEN text()\n WHEN (item_type='A') THEN text()\n WHEN (item_type='O') THEN text()\n WHEN (item_type='L') THEN text()\n WHEN (item_type='K') THEN text()\n ELSE text()\n END AS item_type_qtdisplayrole\n FROM item\n JOIN classcode ON (item_classcode_id=classcode_id)\n JOIN uom ON (item_inv_uom_id=uom_id)\n LEFT OUTER JOIN prodcat ON (item_prodcat_id=prodcat_id)\n LEFT OUTER JOIN freightclass ON (item_freightclass_id=freightclass_id)\n \n JOIN itemgrpitem ON (item_id=itemgrpitem_item_id)\n JOIN itemgrp ON (itemgrp_id=itemgrpitem_itemgrp_id)\n \n \n LEFT OUTER JOIN charass charass_alias \n ON ((charass_alias.charass_target_type='I') \n AND (charass_alias.charass_target_id=item_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias \n ON (charass_alias.charass_char_id=char_alias.char_id)\n \n \n LEFT OUTER JOIN charass charass_alias \n ON ((charass_alias.charass_target_type='I') \n AND (charass_alias.charass_target_id=item_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias \n ON (charass_alias.charass_char_id=char_alias.char_id)\n \n \n LEFT OUTER JOIN charass charass_alias \n ON ((charass_alias.charass_target_type='I') \n AND (charass_alias.charass_target_id=item_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias \n ON (charass_alias.charass_char_id=char_alias.char_id)\n \n WHERE ( true\n \n AND ( (item_number ~* )\n OR (COALESCE(item_descrip1,'') || COALESCE(item_descrip2,'') ~* ) )\n \n \n AND (item_type IN ('P', 'O'))\n \n AND (item_type IN ('M', 'F', 'B','K'))\n \n AND (item_sold)\n \n \n AND (item_type=)\n \n \n AND (item_active)\n \n \n AND (item_classcode_id=)\n \n \n AND (item_prodcat_id=)\n \n \n AND (item_freightclass_id=)\n \n \n AND (itemgrp_id=)\n \n \n AND (item_number ~* )\n \n \n AND (COALESCE(item_descrip1,'') || COALESCE(item_descrip2,'') ~* )\n \n \n AND (classcode_code ~* )\n \n \n AND (prodcat_code ~* )\n \n \n AND (freightclass_code ~* )\n \n \n ) ORDER BY\n \n toNumeric(item_number, 999999999999999),\n \n item_number;\n admin 2013-07-26 0 27 maintainShipping detail used by maintainShipping order header info Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: maintainShipping\n-- Name: detail\n-- Notes: used by maintainShipping\n-- order header info\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT shiphead_id AS parent_id, cohead_id AS child_id,\n shiphead_number, cohead_number AS linenumber,\n 'SO' AS ordertype,\n CASE WHEN (shiphead_sfstatus='N') THEN \n WHEN (shiphead_sfstatus='D') THEN \n WHEN (shiphead_sfstatus='P') THEN \n ELSE \n END AS sfstatus,\n cust_number AS dest, cust_name AS description,\n shiphead_shipvia, NULL AS uom_name,\n NULL AS shipqty, NULL AS shipvalue,\n\n NULL AS f_shipqty, NULL AS f_shipvalue,\n\n cohead_holdtype AS holdtype,\n shiphead_number AS shiphead_number_qtdisplayrole,\n 'SO' AS ordertype_qtdisplayrole,\n 'qty' AS shipqty_xtnumericrole,\n 'cost' AS shipvalue_xtnumericrole,\n 0 AS shipvalue_xttotalrole,\n 0 AS xtindentrole,\n CAST(shiphead_id AS TEXT) AS sort\nFROM shiphead, custinfo, cohead\n \n JOIN coitem ON (coitem_cohead_id=cohead_id)\n JOIN itemsite ON ((coitem_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=))\n \nWHERE ((NOT shiphead_shipped)\n AND (shiphead_order_type='SO')\n AND (shiphead_order_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n) \n-- order line info\nUNION ALL\nSELECT cohead_id AS parent_id, coitem_id AS child_id,\n '' AS shiphead_number, CAST(coitem_linenumber AS TEXT) AS linenumber,\n 'SO' AS ordertype,\n NULL AS sfstatus,\n item_number AS dest, (item_descrip1 || ' ' || item_descrip2) AS description,\n NULL AS shiphead_shipvia, uom_name,\n qtyAtShipping('SO', coitem_id) AS shipqty,\n valueAtShipping('SO', coitem_id) AS shipvalue,\n\n formatQty(qtyAtShipping('SO', coitem_id)) AS f_shipqty,\n formatCost(valueAtShipping('SO', coitem_id)) AS f_shipvalue,\n\n cohead_holdtype AS holdtype,\n NULL AS shiphead_number_qtdisplayrole,\n NULL AS ordertype_qtdisplayrole,\n 'qty' AS shipqty_xtnumericrole,\n 'cost' AS shipvalue_xtnumericrole,\n 0 AS shipvalue_xttotalrole,\n 1 AS xtindentrole,\n CAST(shiphead_id AS TEXT) || CAST(shiphead_order_id AS TEXT) || \n TO_CHAR(coitem_id, '0000000') || '1' AS sort\nFROM shiphead, cohead, coitem, uom, itemsite, item\nWHERE ((NOT shiphead_shipped)\n AND (shiphead_order_type='SO')\n AND (shiphead_order_id=cohead_id)\n AND (cohead_id=coitem_cohead_id)\n AND (coitem_qty_uom_id=uom_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n \n AND (itemsite_warehous_id=)\n \n) \n-- shipitem info\nUNION ALL\nSELECT shiphead_id AS parent_id, shipitem_id AS child_id,\n '' AS shiphead_number, '' AS linenumber,\n 'SO' AS ordertype,\n NULL AS sfstatus,\n '' AS dest,\n formatDate(shipitem_transdate) || ' by ' || shipitem_trans_username AS description,\n '' AS shiphead_shipvia, '' AS uom_name,\n shipitem_qty AS shipqty,\n NULL AS shipvalue,\n\n formatQty(shipitem_qty) AS f_shipqty,\n NULL AS f_shipvalue,\n\n '' AS holdtype,\n NULL AS shiphead_number_qtdisplayrole,\n NULL AS ordertype_qtdisplayrole,\n 'qty' AS shipqty_xtnumericrole,\n 'cost' AS shipvalue_xtnumericrole,\n 0 AS shipvalue_xttotalrole,\n 2 AS xtindentrole,\n CAST(shiphead_id AS TEXT) || CAST(shiphead_order_id AS TEXT) ||\n TO_CHAR(shipitem_orderitem_id, '0000000') || '2' AS sort\nFROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id)\n \n JOIN coitem ON ((shipitem_orderitem_id=coitem_id)\n AND (shiphead_order_type='SO'))\n JOIN itemsite ON ((coitem_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=))\n \nWHERE ((NOT shiphead_shipped)\n AND (shiphead_order_type='SO')\n) \n\n\nUNION ALL\n-- order header info\nSELECT shiphead_id AS parent_id, tohead_id AS child_id,\n shiphead_number, tohead_number AS linenumber,\n 'TO' AS ordertype,\n CASE WHEN (shiphead_sfstatus='N') THEN \n WHEN (shiphead_sfstatus='D') THEN \n WHEN (shiphead_sfstatus='P') THEN \n ELSE \n END AS sfstatus,\n tohead_destname AS dest, tohead_destcntct_name AS description,\n shiphead_shipvia, NULL AS uom_name,\n NULL AS shipqty, NULL AS shipvalue,\n\n NULL AS f_shipqty, NULL AS f_shipvalue,\n\n 'TO' AS holdtype,\n shiphead_number AS shiphead_number_qtdisplayrole,\n 'TO' AS ordertype_qtdisplayrole,\n 'qty' AS shipqty_xtnumericrole,\n 'cost' AS shipvalue_xtnumericrole,\n 0 AS shipvalue_xttotalrole,\n 0 AS xtindentrole,\n CAST(shiphead_id AS TEXT) AS sort\nFROM shiphead, tohead\n \n JOIN toitem ON (toitem_tohead_id=tohead_id)\n JOIN itemsite ON ((toitem_item_id=itemsite_item_id)\n AND (itemsite_warehous_id=))\n \nWHERE ((NOT shiphead_shipped)\n AND (shiphead_order_type='TO')\n AND (shiphead_order_id=tohead_id)\n) \n-- order line info\nUNION ALL\nSELECT tohead_id AS parent_id, toitem_id AS child_id,\n '' AS shiphead_number, CAST(toitem_linenumber AS TEXT) AS linenumber,\n 'TO' AS ordertype,\n NULL AS sfstatus,\n item_number AS dest, (item_descrip1 || ' ' || item_descrip2) AS description,\n NULL AS shiphead_shipvia, toitem_uom AS uom_name,\n qtyAtShipping('TO', toitem_id) AS shipqty,\n valueAtShipping('TO', toitem_id) AS shipvalue,\n\n formatQty(qtyAtShipping('TO', toitem_id)) AS f_shipqty,\n formatCost(valueAtShipping('TO', toitem_id)) AS f_shipvalue,\n\n 'TO' AS holdtype,\n NULL AS shiphead_number_qtdisplayrole,\n NULL AS ordertype_qtdisplayrole,\n 'qty' AS shipqty_xtnumericrole,\n 'cost' AS shipvalue_xtnumericrole,\n 0 AS shipvalue_xttotalrole,\n 1 AS xtindentrole,\n CAST(shiphead_id AS TEXT) || CAST(shiphead_order_id AS TEXT) ||\n TO_CHAR(toitem_id, '0000000') || '1' AS sort\nFROM shiphead, tohead, item, toitem\n \n JOIN itemsite ON ((toitem_item_id=itemsite_item_id)\n AND (itemsite_warehous_id=))\n \nWHERE ((NOT shiphead_shipped)\n AND (shiphead_order_type='TO')\n AND (shiphead_order_id=tohead_id)\n AND (tohead_id=toitem_tohead_id)\n AND (toitem_item_id=item_id)\n) \n-- shipitem info\nUNION\nSELECT shiphead_id AS parent_id, shipitem_id AS child_id,\n '' AS shiphead_number, '' AS linenumber,\n 'TO' AS ordertype,\n NULL AS sfstatus,\n '' AS dest,\n formatDate(shipitem_transdate) || ' by ' || shipitem_trans_username AS description,\n '' AS shiphead_shipvia, '' AS uom_name,\n shipitem_qty AS shipqty,\n NULL AS shipvalue,\n\n formatQty(shipitem_qty) AS f_shipqty,\n NULL AS f_shipvalue,\n\n '' AS holdtype,\n NULL AS shiphead_number_qtdisplayrole,\n NULL AS ordertype_qtdisplayrole,\n 'qty' AS shipqty_xtnumericrole,\n 'cost' AS shipvalue_xtnumericrole,\n 0 AS shipvalue_xttotalrole,\n 2 AS xtindentrole,\n CAST(shiphead_id AS TEXT) || CAST(shiphead_order_id AS TEXT) ||\n TO_CHAR(shipitem_orderitem_id, '0000000') || '2' AS sort\nFROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id)\n \n JOIN toitem ON ((shipitem_orderitem_id=toitem_id)\n AND (shiphead_order_type='TO'))\n JOIN itemsite ON ((toitem_item_id=itemsite_item_id)\n AND (itemsite_warehous_id=))\n \nWHERE ((NOT shiphead_shipped)\n AND (shiphead_order_type='TO')\n) \n\n\nORDER BY sort;\n admin 2013-07-26 0 28 manufacture jobcosting used by dspJobCosting Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: manufacture\n-- Name: jobcosting\n-- Notes: used by dspJobCosting\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *, 0 AS cost_xttotalrole,\n 'qty' AS qty_xtnumericrole,\n 'cost' AS cost_xtnumericrole\nFROM (\n SELECT womatl_id AS id, 3 AS sort,\n AS type, item_number AS code,\n item_descrip1 AS descrip,\n (SUM(COALESCE(invhist_invqty,0))) AS qty,\n uom_name AS uom,\n SUM(COALESCE(invhist_invqty * invhist_unitcost,0)) AS cost,\n NULL as wooper_seqnumber\n FROM womatl\n LEFT OUTER JOIN womatlpost ON (womatl_id=womatlpost_womatl_id)\n LEFT OUTER JOIN invhist ON (womatlpost_invhist_id=invhist_id),\n itemsite, item, uom\n WHERE ((womatl_wo_id=)\n AND (womatl_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id))\n GROUP BY womatl_id, item_number, item_descrip1, uom_name\n ) AS data\nORDER BY sort, code;\n admin 2013-07-26 0 322 itemsWithoutItemSources detail used by dspItemsWithoutItemSources Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: itemsWithoutItemSources\n-- Name: detail\n-- Notes: used by dspItemsWithoutItemSources\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT item_id, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS descrip,\n CASE WHEN (item_type = 'P') THEN \n WHEN (item_type = 'O') THEN \n END AS type \nFROM item \nWHERE ( (item_type IN ('P', 'O'))\n AND (item_active)\n AND (item_id NOT IN (SELECT DISTINCT itemsrc_item_id\n FROM itemsrc \n WHERE (itemsrc_active))) ) \nORDER BY item_number;\n admin 2013-07-26 0 480 journals detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: journals\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT sltrans.*,\n CASE WHEN(sltrans_docnumber='Misc.' AND\n invhist_docnumber IS NOT NULL) THEN\n (sltrans_docnumber || ' - ' || invhist_docnumber)\n ELSE sltrans_docnumber\n END AS docnumber,\n firstLine(sltrans_notes) AS notes,\n sltrans_journalnumber,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n CASE WHEN (sltrans_amount < 0) THEN ABS(sltrans_amount)\n ELSE NULL\n END AS debit,\n CASE WHEN (sltrans_amount > 0) THEN sltrans_amount\n ELSE NULL\n END AS credit,\n sltrans_gltrans_journalnumber,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole\nFROM sltrans JOIN accnt ON (sltrans_accnt_id=accnt_id) \n LEFT OUTER JOIN invhist ON (sltrans_misc_id=invhist_id\n AND sltrans_docnumber='Misc.') \n\n JOIN company ON (accnt_company=company_number) \n\n\n JOIN prftcntr ON (accnt_profit=prftcntr_number) \n\n\n JOIN subaccnt ON (accnt_sub=subaccnt_number) \n\n\n JOIN subaccnttype ON (subaccnttype_code=accnt_subaccnttype_code) \n\nWHERE (\n\n \n (sltrans_date BETWEEN \n AND )\n \n (sltrans_date BETWEEN \n AND endoftime())\n \n\n \n (sltrans_date BETWEEN startoftime()\n AND )\n \n (sltrans_date BETWEEN startoftime()\n AND endoftime())\n \n\n\n AND (company_id=)\n\n\n AND (prftcntr_id=)\n\n\n AND (accnt_number=)\n\n\n AND (subaccnt_id=)\n\n\n AND (subaccnttype_id=)\n\n\n AND (accnt_type= )\n\n\n AND (sltrans_accnt_id=)\n\n\n AND (sltrans_docnumber = case when = '' then \n sltrans_docnumber else \n end ) \n\n\n AND (sltrans_source=)\n\n\n AND (sltrans_source ~* )\n\n\n AND (sltrans_posted=)\n\n\n AND (sltrans_gltrans_journalnumber::text=)\n\n) \nORDER BY sltrans_created,\n sltrans_sequence, sltrans_amount;\n admin 2013-07-26 0 543 metasqls detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: metasqls\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT metasql_id, metasql_group, metasql_name,\n firstline(metasql_notes) AS metasql_notes, metasql_grade,\n CASE nspname WHEN 'public' THEN '' ELSE nspname END AS pkgname,\n CASE nspname WHEN 'public' THEN 0\n ELSE 1 END AS xtindentrole,\n metasql_notes AS metasql_notes_qttooltiprole \n FROM metasql\n JOIN pg_class ON (metasql.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n UNION \nSELECT -1, pkghead_name, NULL,\n firstline(pkghead_descrip), NULL,\n pkghead_name, 0, pkghead_descrip\n FROM metasql, pg_class, pg_namespace\n RIGHT OUTER JOIN pkghead ON (nspname=pkghead_name)\n WHERE ((metasql.tableoid=pg_class.oid)\n AND (relnamespace=pg_namespace.oid))\nORDER BY pkgname, xtindentrole, metasql_group, metasql_name,\n metasql_grade DESC, metasql_id;\n\nSELECT metasql_id, metasql_group, metasql_name,\n firstline(metasql_notes) AS metasql_notes,\n metasql_grade,\n CASE nspname WHEN 'public' THEN '' ELSE nspname END AS pkgname,\n metasql_notes AS metasql_notes_qttooltiprole \n FROM metasql\n JOIN pg_class ON (metasql.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nORDER BY metasql_group, metasql_name,\n metasql_grade DESC, metasql_id;\n \n admin 2013-07-26 0 323 mrpDetail detail used by dspMRPDetail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: mrpDetail\n-- Name: detail\n-- Notes: used by dspMRPDetail\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT formatQty(itemsite_qtyonhand) AS f_qoh,itemsite_qtyonhand\n , qtyAllocated(itemsite_id, findPeriodStart(),\n findPeriodEnd()) AS allocations,\n qtyOrdered(itemsite_id, findPeriodStart(),\n findPeriodEnd()) AS orders,\n qtyFirmedAllocated(itemsite_id, findPeriodStart(),\n findPeriodEnd()) AS firmedallocations,\n qtyFirmed(itemsite_id, findPeriodStart(),\n findPeriodEnd()) AS firmedorders\nFROM itemsite\nWHERE (itemsite_id=);\n admin 2013-07-26 0 48 runningAvailability detail used by dspRunningAvailability, itemAvailabilityWorkbench Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: runningAvailability\n-- Name: detail\n-- Notes: used by dspRunningAvailability, itemAvailabilityWorkbench\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT orderid, altorderid, ordertype, ordernumber, sequence, item_number,\n duedate, qtyordered, qtyreceived, balance,\n balance AS runningavail,\n\n CASE WHEN duedate = startOfTime() THEN ''\n ELSE formatDate(duedate) END AS f_duedate,\n formatQty(qtyordered) AS f_qtyordered,\n formatQty(qtyreceived) AS f_qtyreceived,\n formatQty(balance) AS f_balance,\n\n 1 AS runningavail_xtrunningrole,\n AS runningavail_xtrunninginit,\n CASE WHEN late THEN 'error' END AS duedate_qtforegroundrole,\n CASE WHEN duedate = startOfTime() THEN '' END AS duedate_qtdisplayrole,\n CASE WHEN ordertype ~ OR\n ordertype ~ OR\n ordertype ~ THEN\n 'emphasis' END AS qtforegroundrole,\n 'qty' AS qtyordered_xtnumericrole,\n 'qty' AS qtyreceived_xtnumericrole,\n 'qty' AS balance_xtnumericrole\nFROM (\n\nSELECT -1 AS orderid, -1 AS altorderid, 'QOH' AS ordertype,\n NULL AS ordernumber,\n 0 AS sequence,\n '' AS item_number,\n startOfTime() AS duedate,\n FALSE AS late,\n 0 AS qtyordered,\n 0 AS qtyreceived,\n AS balance\nUNION\n\n\nSELECT tohead_id AS orderid, toitem_id AS altorderid, 'T/O' AS ordertype,\n TEXT(tohead_number) AS ordernumber,\n 1 AS sequence,\n tohead_srcname || '/' || tohead_destname AS item_number,\n toitem_duedate AS duedate,\n (toitem_duedate < CURRENT_DATE) AS late,\n toitem_qty_ordered AS qtyordered,\n toitem_qty_received AS qtyreceived,\n noNeg(toitem_qty_ordered - toitem_qty_received) AS balance\nFROM tohead, toitem\nWHERE ((toitem_tohead_id=tohead_id)\n AND (toitem_status NOT IN ('C', 'X'))\n AND (toitem_item_id=)\n AND (tohead_dest_warehous_id=)\n AND (toitem_qty_ordered > toitem_qty_received) )\n\nUNION\nSELECT tohead_id AS orderid, toitem_id AS altorderid, 'T/O' AS ordertype,\n TEXT(tohead_number) AS ordernumber,\n 1 AS sequence,\n tohead_srcname || '/' || tohead_destname AS item_number,\n toitem_duedate AS duedate,\n (toitem_duedate < CURRENT_DATE) AS late,\n toitem_qty_ordered AS qtyordered,\n toitem_qty_received AS qtyreceived,\n -1 * noNeg(toitem_qty_ordered - toitem_qty_shipped - qtyAtShipping('TO', toitem_id)) AS balance\n -- TODO: old code had ^^^^ for formatted balance and vvvv used to calc running avail! which is right?\n -- -1 * noNeg(toitem_qty_ordered - toitem_qty_received) AS balance\nFROM tohead, toitem\nWHERE ((toitem_tohead_id=tohead_id)\n AND (toitem_status NOT IN ('C', 'X'))\n AND (toitem_item_id=)\n AND (tohead_src_warehous_id=)\n AND (toitem_qty_ordered - toitem_qty_shipped - qtyAtShipping('TO', toitem_id)) > 0 )\n\nUNION\n\nSELECT wo_id AS orderid, -1 AS altorderid,\n 'W/O' AS ordertype,\n formatWoNumber(wo_id) AS ordernumber,\n 1 AS sequence,\n item_number,\n wo_duedate AS duedate,\n (wo_duedate < CURRENT_DATE) AS late,\n wo_qtyord AS qtyordered,\n wo_qtyrcv AS qtyreceived,\n noNeg(wo_qtyord - wo_qtyrcv) AS balance\nFROM wo, itemsite, item\nWHERE ((wo_status<>'C')\n AND (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=)\n AND (item_type NOT IN ('C', 'Y')))\n\nUNION\n\n-- Tools on work orders to be returned\nSELECT wo_id AS orderid, -1 AS altorderid,\n 'W/O' AS ordertype,\n formatWoNumber(wo_id) AS ordernumber,\n 1 AS sequence,\n item_number,\n wo_duedate AS duedate,\n (wo_duedate < CURRENT_DATE) AS late,\n womatl_qtyreq AS qtyordered,\n COALESCE(SUM(abs(invhist_invqty)),0) AS qtyreceived,\n noNeg(womatl_qtyreq - COALESCE(SUM(abs(invhist_invqty)),0)) AS balance\nFROM womatl\n JOIN wo ON (wo_id=womatl_wo_id)\n JOIN itemsite ON (womatl_itemsite_id=itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN womatlpost ON (womatl_id=womatlpost_womatl_id)\n LEFT OUTER JOIN invhist ON ((womatlpost_invhist_id=invhist_id)\n AND (invhist_invqty < 0))\nWHERE ((wo_status<>'C')\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=)\n AND (item_type = 'T'))\nGROUP BY wo_id, wo_duedate, item_number, womatl_qtyreq\n\n\nUNION\nSELECT wo_id AS orderid, -1 AS altorderid,\n 'W/O' AS ordertype,\n formatWoNumber(wo_id) AS ordernumber,\n 1 AS sequence,\n item_number,\n wo_duedate AS duedate,\n (wo_duedate < CURRENT_DATE) AS late,\n (wo_qtyord * brddist_stdqtyper) AS qtyordered,\n (wo_qtyrcv * brddist_stdqtyper) AS qtyreceived,\n noNeg((wo_qtyord - wo_qtyrcv) * brddist_stdqtyper) AS balance\nFROM xtmfg.brddist, wo, itemsite, item\nWHERE ((wo_status<>'C')\n AND (brddist_wo_id=wo_id)\n AND (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (brddist_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=)\n AND (item_type IN ('C', 'Y')) )\n\n\nUNION\nSELECT wo_id AS orderid, womatl_id AS altorderid,\n 'W/O' AS ordertype,\n formatWoNumber(wo_id) AS ordernumber,\n 2 AS sequence,\n woi.item_number,\n womatl_duedate AS duedate,\n FALSE AS late,\n itemuomtouom(womatlis.itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) AS qtyordered,\n itemuomtouom(womatlis.itemsite_item_id, womatl_uom_id, NULL, womatl_qtyiss) AS qtyreceived,\n itemuomtouom(womatlis.itemsite_item_id, womatl_uom_id, NULL, (noNeg(womatl_qtyreq - womatl_qtyiss) * -1)) AS balance\nFROM womatl, wo, itemsite AS wois, item AS woi, itemsite AS womatlis, item AS womatli\nWHERE ((wo_status<>'C')\n AND (wo_itemsite_id=wois.itemsite_id)\n AND (wois.itemsite_item_id=woi.item_id)\n AND (womatlis.itemsite_item_id=womatli.item_id)\n AND (womatli.item_type != 'T')\n AND (womatl_wo_id=wo_id)\n AND (womatlis.itemsite_item_id=)\n AND (womatlis.itemsite_warehous_id=)\n AND (womatl_itemsite_id=womatlis.itemsite_id) )\n\nUNION\n-- Special handling for tools\nSELECT wo_id AS orderid, womatl_id AS altorderid,\n 'W/O' AS ordertype,\n formatWoNumber(wo_id) AS ordernumber,\n 2 AS sequence,\n woi.item_number,\n womatl_duedate AS duedate,\n FALSE AS late,\n itemuomtouom(womatlis.itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) AS qtyordered,\n COALESCE(SUM(invhist_invqty),0) AS qtyreceived,\n (itemuomtouom(womatlis.itemsite_item_id, womatl_uom_id, NULL, (noNeg(womatl_qtyreq))) - COALESCE(SUM(invhist_invqty),0)) * -1 AS balance\nFROM itemsite AS wois, item AS woi, itemsite AS womatlis, item AS womatli, wo, womatl\n LEFT OUTER JOIN womatlpost ON (womatl_id=womatlpost_womatl_id)\n LEFT OUTER JOIN invhist ON ((womatlpost_invhist_id=invhist_id)\n AND (invhist_invqty > 0))\nWHERE ((wo_status<>'C')\n AND (wo_itemsite_id=wois.itemsite_id)\n AND (wois.itemsite_item_id=woi.item_id)\n AND (womatlis.itemsite_item_id=womatli.item_id)\n AND (womatli.item_type = 'T')\n AND (womatl_wo_id=wo_id)\n AND (womatlis.itemsite_item_id=)\n AND (womatlis.itemsite_warehous_id=)\n AND (womatl_itemsite_id=womatlis.itemsite_id) )\nGROUP BY wo_id, woi.item_number, womatl_id, womatl_duedate, womatlis.itemsite_item_id, womatl_uom_id, womatl_qtyreq\n\nUNION\nSELECT pohead_id AS orderid, poitem_id AS altorderid,\n 'P/O' AS ordertype,\n TEXT(pohead_number) AS ordernumber,\n 1 AS sequence,\n '' AS item_number,\n poitem_duedate AS duedate,\n (poitem_duedate < CURRENT_DATE) AS late,\n (poitem_qty_ordered * poitem_invvenduomratio) AS qtyordered,\n (NoNeg(poitem_qty_received - poitem_qty_returned) * poitem_invvenduomratio) AS qtyreceived,\n (noNeg(poitem_qty_ordered - poitem_qty_received) * poitem_invvenduomratio) AS balance\nFROM pohead, poitem, itemsite, item\nWHERE ((poitem_pohead_id=pohead_id)\n AND (poitem_status <> 'C')\n AND (poitem_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=item_id)\n AND (item_id=) )\n\nUNION\nSELECT cohead_id AS orderid, coitem_id AS altorderid,\n 'S/O' AS ordertype,\n TEXT(cohead_number) AS ordernumber,\n 2 AS sequence,\n cust_name AS item_number,\n coitem_scheddate AS duedate,\n (coitem_scheddate < CURRENT_DATE) AS late,\n (coitem_qtyord * coitem_qty_invuomratio) AS qtyordered,\n (coitem_qty_invuomratio * (coitem_qtyshipped - coitem_qtyreturned + qtyAtShipping(coitem_id))) AS qtyreceived,\n (coitem_qty_invuomratio * noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(coitem_id)) * -1) AS balance\nFROM coitem, cohead, custinfo, itemsite, item\nWHERE ((coitem_status='O')\n AND (cohead_cust_id=cust_id)\n AND (coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=item_id)\n AND (item_id=))\n\n\n\nUNION\nSELECT planord_id AS orderid, -1 AS altorderid,\n CASE WHEN (planord_firm) THEN \n \t ELSE \n END AS ordertype,\n CAST(planord_number AS text) AS ordernumber,\n 1 AS sequence,\n '' AS item_number,\n planord_duedate AS duedate,\n FALSE AS late,\n planord_qty AS qtyordered,\n NULL AS qtyreceived,\n planord_qty AS balance\nFROM planord, itemsite\nWHERE ((planord_type='P')\n AND (planord_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=) )\n\nUNION\nSELECT planord_id AS orderid, -1 AS altorderid,\n CASE WHEN (planord_firm) THEN \n\t ELSE \n END AS ordertype,\n CAST(planord_number AS text) AS ordernumber,\n 1 AS sequence,\n '' AS item_number,\n planord_duedate AS duedate,\n FALSE AS late,\n planord_qty AS qtyordered,\n NULL AS qtyreceived,\n planord_qty AS balance\nFROM planord, itemsite\nWHERE ((planord_type='W')\n AND (planord_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=) )\n\nUNION\n-- Tools on Planned Work Orders\nSELECT planord_id AS orderid, -1 AS altorderid,\n CASE WHEN (planord_firm) THEN \n\t ELSE \n END AS ordertype,\n CAST(planord_number AS text) AS ordernumber,\n 1 AS sequence,\n item_number,\n planord_duedate AS duedate,\n FALSE AS late,\n planreq_qty AS qtyordered,\n NULL AS qtyreceived,\n planreq_qty AS balance\nFROM planreq\n JOIN itemsite ON (itemsite_id=planreq_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN planord ON ((planreq_source_id=planord_id)\n AND (planreq_source='P'))\nWHERE ((itemsite_warehous_id=)\n AND (itemsite_item_id=)\n AND (item_type='T') )\n\nUNION\nSELECT planord_id AS orderid, -1 AS altorderid,\n CASE WHEN (planord_firm) THEN \n\t ELSE \n END AS ordertype,\n CAST(planord_number AS text) AS ordernumber,\n 1 AS sequence,\n srcwhsinfo.warehous_code || '/' || whsinfo.warehous_code AS item_number,\n planord_duedate AS duedate,\n FALSE AS late,\n planord_qty AS qtyordered,\n NULL AS qtyreceived,\n planord_qty AS balance\nFROM planord JOIN itemsite ON (itemsite.itemsite_id=planord_itemsite_id)\n JOIN whsinfo ON (whsinfo.warehous_id=itemsite.itemsite_warehous_id)\n JOIN itemsite srcitemsite ON (srcitemsite.itemsite_id=planord_supply_itemsite_id)\n JOIN whsinfo srcwhsinfo ON (srcwhsinfo.warehous_id=srcitemsite.itemsite_warehous_id)\nWHERE ((planord_type='T')\n AND (itemsite.itemsite_warehous_id=)\n AND (itemsite.itemsite_item_id=) )\n\nUNION\nSELECT planord_id AS orderid, -1 AS altorderid,\n CASE WHEN (planord_firm) THEN \n\t ELSE \n END AS ordertype,\n CAST(planord_number AS text) AS ordernumber,\n 1 AS sequence,\n srcwhsinfo.warehous_code || '/' || whsinfo.warehous_code AS item_number,\n planord_duedate AS duedate,\n FALSE AS late,\n planord_qty AS qtyordered,\n NULL AS qtyreceived,\n (planord_qty * -1) AS balance\nFROM planord JOIN itemsite ON (itemsite.itemsite_id=planord_itemsite_id)\n JOIN whsinfo ON (whsinfo.warehous_id=itemsite.itemsite_warehous_id)\n JOIN itemsite srcitemsite ON (srcitemsite.itemsite_id=planord_supply_itemsite_id)\n JOIN whsinfo srcwhsinfo ON (srcwhsinfo.warehous_id=srcitemsite.itemsite_warehous_id)\nWHERE ((planord_type='T')\n AND (srcitemsite.itemsite_warehous_id=)\n AND (srcitemsite.itemsite_item_id=) )\n\nUNION\nSELECT planreq_id AS orderid, -1 AS altorderid,\n CASE WHEN (planord_firm) THEN \n\t ELSE \n END AS ordertype,\n CAST(planord_number AS text) AS ordernumber,\n 1 AS sequence,\n--get the planned order number for the higher level demand\n (SELECT item_number\n FROM item, itemsite\n WHERE((itemsite_item_id=item_id)\n AND (itemsite_id=planord_itemsite_id))\n ) AS item_number,\n planord_startdate AS duedate,\n FALSE AS late,\n planreq_qty AS f_qtyordered,\n NULL AS qtyreceived,\n (planreq_qty * -1) AS balance\nFROM planreq, planord, itemsite, item\nWHERE ((planreq_source='P')\n AND (planreq_source_id=planord_id)\n AND (planreq_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=) )\n\n\nUNION\nSELECT pr_id AS orderid, -1 AS altorderid,\n AS ordertype,\n CAST(pr_number AS text) AS ordernumber, \n 1 AS sequence,\n '' AS item_number,\n pr_duedate AS duedate,\n FALSE AS late,\n pr_qtyreq AS qtyordered,\n NULL AS qtyreceived,\n pr_qtyreq AS balance\nFROM pr, itemsite, item\nWHERE ((pr_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (pr_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=) )\n\n) AS dummy\n\nORDER BY duedate, sequence;\n\n admin 2013-07-26 0 324 mrpDetail item used by dspMRPDetail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: mrpDetail\n-- Name: item\n-- Notes: used by dspMRPDetail\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, item_type, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS descrip,\n warehous_code\nFROM itemsite, item, whsinfo\nWHERE ( (itemsite_active)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_planning_type='M')\n\n AND (itemsite_plancode_id=)\n\n AND (itemsite_plancode_id IN (SELECT plancode_id \n FROM plancode \n WHERE (plancode_code ~ )))\n\n\n AND (warehous_id=)\n\n )\nORDER BY item_number, warehous_code;\n admin 2013-07-26 0 533 openVouchers populate used by openVouchers Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: openVouchers\n-- Name: populate\n-- Notes: used by openVouchers\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT vohead_id, COALESCE(pohead_id, -1), vohead_number,\n COALESCE(TEXT(pohead_number), TEXT()) AS ponumber,\n (vend_number || '-' || vend_name) AS vendor, vendtype_code, vohead_invcnumber,\n vohead_distdate, COALESCE(vohead_gldistdate, vohead_distdate) AS postdate,\n vohead_amount, 'curr' AS vohead_amount_xtnumericrole,\n formatDate(vohead_distdate) AS f_distdate,\n formatDate(COALESCE(vohead_gldistdate, vohead_distdate)) AS f_postdate,\n formatMoney(vohead_amount) AS f_amount\n FROM vendinfo JOIN vendtype ON (vendtype_id=vend_vendtype_id)\n JOIN vohead ON (vohead_vend_id=vend_id)\n LEFT OUTER JOIN pohead ON (vohead_pohead_id=pohead_id) \n WHERE (NOT vohead_posted)\n\n AND (vend_id=)\n\n AND (vend_vendtype_id=)\n\n AND (vendtype_code ~ )\n\n ORDER BY vohead_number;\n \n admin 2013-07-26 0 325 openpurchaseorders detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: openpurchaseorders\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pohead_id, COALESCE(pohead_cohead_id, -1) AS pohead_cohead_id,\n pohead_number, vend_name,\n MIN(poitem_duedate) AS min_duedate, \n pohead_status, pohead_printed,\n vend_number, vendtype_code, pohead_agent_username\n FROM pohead \n JOIN vendinfo ON (pohead_vend_id=vend_id)\n JOIN vendtype ON (vend_vendtype_id=vendtype_id)\n \n JOIN usr ON (pohead_agent_username=usr_username)\n \n \n JOIN poitem ON (poitem_pohead_id=pohead_id) \n JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n \n LEFT OUTER JOIN poitem ON (poitem_pohead_id=pohead_id) \n \n WHERE ( true\n \n AND ((pohead_number::text ~* ) \n OR (vend_number ~* )\n OR (vend_name ~* )\n\n OR (pohead_agent_username ~* )\n OR (vendtype_code ~* )\n\n OR (COALESCE(pohead_vend_cntct_first_name,'') || ' ' || COALESCE(pohead_vend_cntct_last_name,'') ~* )\n OR (COALESCE(pohead_vend_cntct_phone,'') ||' ' || COALESCE(pohead_vend_cntct_fax,'') ~* )\n OR (COALESCE(pohead_vend_cntct_email,'') ~* )\n OR (COALESCE(pohead_vendaddress1,'') || ' ' || COALESCE(pohead_vendaddress2,'') || ' ' || COALESCE(pohead_vendaddress3,'') ~* )\n OR (COALESCE(pohead_vendcity,'') ~* )\n OR (COALESCE(pohead_vendstate,'') ~* )\n OR (COALESCE(pohead_vendzipcode,'') ~* )\n OR (COALESCE(pohead_vendcountry,'') ~* )\n\n OR (COALESCE(pohead_shipto_cntct_first_name,'') || ' ' || COALESCE(pohead_shipto_cntct_last_name,'') ~* )\n OR (COALESCE(pohead_shipto_cntct_phone,'') || ' ' || COALESCE(pohead_shipto_cntct_fax,'') ~* )\n OR (COALESCE(pohead_shipto_cntct_email,'') ~* )\n OR (COALESCE(pohead_shiptoaddress1,'') || ' ' || COALESCE(pohead_vendaddress2,'') || ' ' || COALESCE(pohead_vendaddress3,'') ~* )\n OR (COALESCE(pohead_shiptocity,'') ~* )\n OR (COALESCE(pohead_shiptostate,'') ~* )\n OR (COALESCE(pohead_shiptozipcode,'') ~* )\n OR (COALESCE(pohead_shiptocountry,'') ~* )\n )\n \n \n AND (pohead_status ='U') \n \n \n AND (pohead_status='O' )\n \n \n AND (pohead_status IN ('U', 'O') ) \n \n \n AND (pohead_status NOT IN ('U', 'O', 'C')) \n \n \n AND (vend_id=)\n \n \n AND (vend_vendtype_id=)\n \n \n AND (vendtype_code ~* )\n \n \n AND (usr_id = )\n \n \n AND (itemsite_warehous_id = )\n \n ) \n GROUP BY pohead_number, pohead_id, pohead_cohead_id,\n\t\t vend_name, pohead_status, pohead_printed,\n vendtype_code, pohead_agent_username, vend_number\n ORDER BY pohead_number;\n admin 2013-07-26 0 326 opensalesorders detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: opensalesorders\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT cohead.*,\n COALESCE(cust_number, :error) AS cust_number,\n getSoSchedDate(cohead_id) AS scheddate, \n getSoStatus(cohead_id) AS status,\n firstline(cohead_ordercomments) AS notes \n FROM cohead \n JOIN custinfo ON (cohead_cust_id=cust_id) \n JOIN custtype ON (cust_custtype_id=custtype_id)\n \n JOIN coitem ON (coitem_cohead_id=cohead_id) \n JOIN itemsite ON (coitem_itemsite_id=itemsite_id) \n JOIN site() ON (itemsite_warehous_id=warehous_id) \n \n LEFT OUTER JOIN coitem ON (coitem_cohead_id=cohead_id) \n LEFT OUTER JOIN itemsite ON (coitem_itemsite_id=itemsite_id) \n LEFT OUTER JOIN whsinfo ON (itemsite_warehous_id=warehous_id) \n \n WHERE((true) \n \n AND (cust_id= )\n \n \n AND (cust_custtype_id=)\n \n \n AND (custtype_code ~* )\n \n \n AND (cohead_custponumber~*)\n \n \n AND (cohead_orderdate BETWEEN AND )\n \n \n AND (cohead_status='O')\n \n \n AND (warehous_id=)\n \n \n AND (cohead_salesrep_id=)\n \n ) \n ORDER BY cohead_number;\n admin 2013-07-26 0 31 opportunities detail used by opportunityList Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: opportunities\n-- Name: detail\n-- Notes: used by opportunityList\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT ON (incdtpriority_order, ophead_target_date, ophead_name, ophead_id) \n ophead_id AS id,\n CASE WHEN (ophead_active) THEN 0 ELSE 1 END AS altId,\n ophead_number,\n ophead_name,\n ophead_active,\n crmacct_number,\n ophead_owner_username,\n ophead_username,\n opstage_name,\n incdtpriority_name,\n opsource_name,\n optype_name,\n (ophead_probability_prcnt * .01) AS ophead_probability_prcnt,\n ophead_amount,\n currConcat(ophead_curr_id) As f_currency,\n ophead_target_date,\n ophead_actual_date,\n formatMoney(ophead_amount) AS f_amount,\n formatDate(ophead_target_date) AS f_targetdate,\n formatDate(ophead_actual_date) AS f_actualdate,\n 'extprice' AS ophead_amount_xtnumericrole,\n 'percent' AS ophead_probability_prcnt_xtnumericrole\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value AS char\n\n\n , charass_alias.charass_value::date AS char\n\nFROM ophead()\n LEFT OUTER JOIN incdtpriority ON (ophead_priority_id=incdtpriority_id)\n LEFT OUTER JOIN crmacct ON (ophead_crmacct_id=crmacct_id)\n LEFT OUTER JOIN opstage ON (ophead_opstage_id=opstage_id)\n LEFT OUTER JOIN opsource ON (ophead_opsource_id=opsource_id)\n LEFT OUTER JOIN optype ON (ophead_optype_id=optype_id)\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='OPP') \n AND (charass_alias.charass_target_id=ophead_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='OPP') \n AND (charass_alias.charass_target_id=ophead_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\n\n LEFT OUTER JOIN charass charass_alias ON ((charass_alias.charass_target_type='OPP') \n AND (charass_alias.charass_target_id=ophead_id)\n AND (charass_alias.charass_char_id=))\n LEFT OUTER JOIN char char_alias ON (charass_alias.charass_char_id=char_alias.char_id)\n\nWHERE((true)\n\n AND ((ophead_target_date >= )\n OR ( <= startOfTime()) AND (ophead_target_date IS NULL))\n\n\n AND ((ophead_target_date <= )\n OR ( >= endOfTime()) AND (ophead_target_date IS NULL))\n\n\n AND (ophead_opsource_id=)\n\n\n AND (opsource_name ~ )\n\n\n AND (ophead_opstage_id=)\n\n\n AND (opstage_name ~ )\n\n\n AND (ophead_optype_id=)\n\n\n AND (optype_name ~ )\n\n\n AND ( IN (ophead_username, ophead_owner_username))\n\n\n AND (ophead_username=)\n\n\n AND (ophead_username ~ )\n\n\n AND (ophead_owner_username=)\n\n\n AND (ophead_owner_username ~ )\n\n\n AND (ophead_crmacct_id = )\n\n \n AND (ophead_name ~* )\n\n \n AND (ophead_active)\n\n\n AND (ophead_id=\n\n\n )\nORDER BY incdtpriority_order, ophead_target_date, ophead_name, ophead_id;\n admin 2013-07-26 0 30 opportunitiesByCRM detail used by crmaccount Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: opportunitiesByCRM\n-- Name: detail\n-- Notes: used by crmaccount\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT ophead_id, *,\n currConcat(ophead_curr_id) AS ophead_currabbr,\n 'currval' AS ophead_amount_xtnumericrole\n FROM ophead\n LEFT OUTER JOIN crmacct ON (ophead_crmacct_id=crmacct_id)\n LEFT OUTER JOIN opstage ON (ophead_opstage_id=opstage_id)\n LEFT OUTER JOIN opsource ON (ophead_opsource_id=opsource_id)\n LEFT OUTER JOIN optype ON (ophead_optype_id=optype_id)\n WHERE((crmacct_id=)\n\n AND (ophead_owner_username=)\n\n AND (ophead_owner_username ~ )\n\n )\n ORDER BY ophead_target_date;\n admin 2013-07-26 0 32 orders detail used by dspOrders Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: orders\n-- Name: detail\n-- Notes: used by dspOrders\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT source_id, type, order_type, order_status, order_number, duedate,\n totalqty, relievedqty, balanceqty, balanceqty AS runningbalanceqty,\n 'qty' AS totalqty_xtnumericrole,\n 'qty' AS relievedqty_xtnumericrole,\n 'qty' AS balanceqty_xtnumericrole,\n 0 AS runningbalanceqty_xtrunningrole,\n CASE WHEN (late) THEN 'error' END AS duedate_qtforegroundrole\nFROM\n(\nSELECT poitem_id AS source_id, 1 AS type, TEXT('P/O') AS order_type,\n pohead_status AS order_status,\n TEXT(pohead_number) AS order_number,\n poitem_qty_ordered AS totalqty,\n poitem_qty_received AS relievedqty,\n noNeg(poitem_qty_ordered - poitem_qty_received) AS balanceqty,\n poitem_duedate AS duedate,\n (poitem_duedate < CURRENT_DATE) AS late\nFROM pohead, poitem, itemsite\nWHERE ((poitem_pohead_id=pohead_id)\n AND (poitem_status IN ('O','U'))\n AND (poitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=)\n AND (itemsite_warehous_id=)\n\n AND (poitem_duedate <= (CURRENT_DATE + itemsite_leadtime))\n\n AND (poitem_duedate <= (CURRENT_DATE + ))\n\n AND (poitem_duedate<=)\n\n AND (poitem_duedate BETWEEN AND )\n\n )\n\nUNION\nSELECT wo_id AS source_id, 2 AS type, TEXT('W/O') AS order_type,\n wo_status AS order_status,\n formatWONumber(wo_id) AS order_number,\n wo_qtyord AS totalqty,\n wo_qtyrcv AS relievedqty,\n noNeg(wo_qtyord - wo_qtyrcv) AS balanceqty,\n wo_duedate AS duedate,\n (wo_duedate < CURRENT_DATE) AS late \nFROM wo, itemsite\nWHERE ((wo_status<>'C')\n AND (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=)\n AND (itemsite_warehous_id=)\n AND ( NOT IN ('C', 'Y'))\n\n AND (wo_duedate <= (CURRENT_DATE + itemsite_leadtime))\n\n AND (wo_duedate <= (CURRENT_DATE + ))\n\n AND (wo_duedate<=)\n\n AND (wo_duedate BETWEEN AND )\n\n )\n\n-- Tooling is also supply on Work Orders\nUNION\nSELECT wo_id AS source_id, 2 AS type, TEXT('W/O') AS order_type,\n wo_status AS order_status,\n formatWONumber(wo_id) AS order_number,\n womatl_qtyreq AS totalqty,\n COALESCE(sum(abs(invhist_invqty)),0) AS relievedqty,\n noNeg(womatl_qtyreq - COALESCE(sum(abs(invhist_invqty)),0)) AS balanceqty,\n wo_duedate AS duedate,\n (wo_duedate < CURRENT_DATE) AS late \nFROM womatl\n JOIN wo ON (wo_id=womatl_wo_id)\n JOIN itemsite ON (itemsite_id=womatl_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n LEFT OUTER JOIN womatlpost ON (womatl_id=womatlpost_womatl_id)\n LEFT OUTER JOIN invhist ON ((womatlpost_invhist_id=invhist_id)\n AND (invhist_invqty < 0))\nWHERE ((wo_status<>'C')\n AND (itemsite_item_id=)\n AND (itemsite_warehous_id=)\n AND (item_type = 'T')\n\n AND (wo_duedate <= (CURRENT_DATE + itemsite_leadtime))\n\n AND (wo_duedate <= (CURRENT_DATE + ))\n\n AND (wo_duedate<=)\n\n AND (wo_duedate BETWEEN AND )\n\n )\nGROUP BY wo_id, wo_status, womatl_qtyreq, wo_duedate\n\n\nUNION\nSELECT wo_id AS source_id, 2 AS type, TEXT('W/O') AS order_type,\n wo_status AS order_status,\n formatWONumber(wo_id) AS order_number,\n wo_qtyord AS totalqty,\n wo_qtyrcv AS relievedqty,\n noNeg(wo_qtyord - wo_qtyrcv) AS balanceqty,\n wo_duedate AS duedate,\n (wo_duedate < CURRENT_DATE) AS late\nFROM wo, xtmfg.brddist, itemsite\nWHERE ((brddist_wo_id=wo_id)\n AND (wo_status<>'C')\n AND (brddist_itemsite_id=itemsite_id)\n AND (itemsite_item_id=)\n AND (itemsite_warehous_id=)\n AND ( IN ('C', 'Y'))\n\n AND (wo_duedate <= (CURRENT_DATE + itemsite_leadtime))\n\n AND (wo_duedate <= (CURRENT_DATE + ))\n\n AND (wo_duedate<=)\n\n AND (wo_duedate BETWEEN AND )\n\n )\n\n\n\nUNION\nSELECT toitem_id AS source_id, 3 AS type, TEXT('T/O') AS order_type,\n tohead_status AS order_status,\n TEXT(tohead_number) AS order_number,\n toitem_qty_ordered AS totalqty,\n toitem_qty_received AS relievedqty,\n noNeg(toitem_qty_ordered - toitem_qty_received) AS balanceqty,\n toitem_duedate AS duedate,\n (toitem_duedate < CURRENT_DATE) AS late\nFROM tohead, toitem, itemsite\nWHERE ((toitem_tohead_id=tohead_id)\n AND (toitem_status='O')\n AND (toitem_item_id=itemsite_item_id)\n AND (tohead_dest_warehous_id=itemsite_warehous_id)\n AND (itemsite_item_id=)\n AND (itemsite_warehous_id=)\n\n AND (toitem_duedate <= (CURRENT_DATE + itemsite_leadtime))\n\n AND (toitem_duedate <= (CURRENT_DATE + ))\n\n AND (toitem_duedate<=)\n\n AND (toitem_duedate BETWEEN AND )\n\n )\n\n\n) AS data\n\nORDER BY duedate;\n admin 2013-07-26 0 83 package items replace the not-so-old pkgitem table with direct query of catalogs and tables so we never miss anything and do not have to maintain the data TODO: is there a better sort order? Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: package\n-- Name: items\n-- Notes: replace the not-so-old pkgitem table with direct query of catalogs\n-- and tables so we never miss anything and do not have to maintain the\n-- data\n-- TODO: is there a better sort order?\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n CASE WHEN pkgitem_type='C' THEN \n WHEN pkgitem_type='D' THEN \n WHEN pkgitem_type='F' THEN \n WHEN pkgitem_type='G' THEN \n WHEN pkgitem_type='I' THEN \n WHEN pkgitem_type='M' THEN \n WHEN pkgitem_type='P' THEN \n WHEN pkgitem_type='R' THEN \n WHEN pkgitem_type='S' THEN \n WHEN pkgitem_type='T' THEN \n WHEN pkgitem_type='U' THEN \n WHEN pkgitem_type='V' THEN \n WHEN pkgitem_type='sequence' THEN \n WHEN pkgitem_type='index' THEN \n ELSE pkgitem_type END AS pkgitem_type_qtdisplayrole\nFROM (\nSELECT script_id AS pkgitem_id, 'C' AS pkgitem_type,\n script_id AS pkgitem_item_id,\n script_name AS pkgitem_name,\n script_notes AS pkgitem_descrip\n FROM .pkgscript \nUNION \nSELECT cmd_id AS pkgitem_id, 'D' AS pkgitem_type,\n cmd_id AS pkgitem_item_id,\n cmd_name AS pkgitem_name,\n cmd_descrip AS pkgitem_descrip \n FROM .pkgcmd \nUNION \nSELECT pg_proc.oid AS pkgitem_id, 'F' AS pkgitem_type,\n pg_proc.oid AS pkgitem_item_id,\n proname || '(' || oidvectortypes(proargtypes)\n || ')' AS pkgitem_name,\n pg_catalog.obj_description(pg_proc.oid, 'pg_proc') AS pkgitem_descrip \n FROM pg_proc\n JOIN pg_namespace ON (pronamespace=pg_namespace.oid)\n WHERE (nspname=) \nUNION \nSELECT t.oid AS pkgitem_id, 'G' AS pkgitem_type,\n t.oid AS pkgitem_item_id,\n tgname AS pkgitem_name,\n pg_catalog.obj_description(t.oid, 'pg_trigger') AS pkgitem_descrip \n FROM pg_trigger t\n JOIN pg_class ON (tgrelid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n WHERE ((nspname=) \n\n AND (tgconstraint = 0)\n AND (tgname !~ '^pkg(cmd(arg)?|image|metasql|priv|report|script|uiform)')\n\n )\nUNION \nSELECT image_id AS pkgitem_id, 'I' AS pkgitem_type,\n image_id AS pkgitem_item_id,\n image_name AS pkgitem_name,\n image_descrip AS pkgitem_descrip \n FROM .pkgimage \nUNION \nSELECT metasql_id AS pkgitem_id, 'M' AS pkgitem_type,\n metasql_id AS pkgitem_item_id,\n metasql_group || '-' || metasql_name AS pkgitem_name,\n metasql_notes AS pkgitem_descrip \n FROM .pkgmetasql \nUNION \nSELECT priv_id AS pkgitem_id, 'P' AS pkgitem_type,\n priv_id AS pkgitem_item_id,\n priv_module || '.' || priv_name AS pkgitem_name,\n priv_descrip AS pkgitem_descrip \n FROM .pkgpriv \nUNION \nSELECT report_id AS pkgitem_id, 'R' AS pkgitem_type,\n report_id AS pkgitem_item_id,\n report_name AS pkgitem_name,\n report_descrip AS pkgitem_descrip \n FROM .pkgreport \nUNION \nSELECT n.oid AS pkgitem_id, 'S' AS pkgitem_type,\n n.oid AS pkgitem_item_id,\n nspname AS pkgitem_name,\n pg_catalog.obj_description(n.oid, 'pg_namespace') AS pkgitem_descrip \n FROM pg_namespace n\n WHERE (nspname=) \nUNION \nSELECT c.oid AS pkgitem_id, 'T' AS pkgitem_type,\n c.oid AS pkgitem_item_id,\n relname AS pkgitem_name,\n pg_catalog.obj_description(c.oid, 'pg_class') AS pkgitem_descrip \n FROM pg_class c\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n WHERE ((nspname=)\n AND (relkind='r')\n\n AND (relname !~ '^pkg(cmd(arg)?|image|metasql|priv|report|script|uiform)$')\n\n )\nUNION \nSELECT uiform_id AS pkgitem_id, 'U' AS pkgitem_type,\n uiform_id AS pkgitem_item_id,\n uiform_name AS pkgitem_name,\n uiform_notes AS pkgitem_descrip \n FROM .pkguiform \nUNION \nSELECT c.oid AS pkgitem_id, 'V' AS pkgitem_type,\n c.oid AS pkgitem_item_id,\n relname AS pkgitem_name,\n pg_catalog.obj_description(c.oid, 'pg_class') AS pkgitem_descrip \n FROM pg_class c\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n WHERE ((nspname=)\n AND (relkind='v'))\n\nUNION\nSELECT c.oid AS pkgitem_id, 'sequence' AS pkgitem_type,\n c.oid AS pkgitem_item_id,\n relname AS pkgitem_name,\n pg_catalog.obj_description(c.oid, 'pg_class') AS pkgitem_descrip \n FROM pg_class c\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n WHERE ((nspname=)\n AND (relkind='S'))\nUNION\nSELECT c.oid AS pkgitem_id, 'index' AS pkgitem_type,\n c.oid AS pkgitem_item_id,\n relname AS pkgitem_name,\n pg_catalog.obj_description(c.oid, 'pg_class') AS pkgitem_descrip \n FROM pg_class c\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n WHERE ((nspname=)\n AND (relkind='i'))\n\n) AS pkgitem \nORDER BY pkgitem_type_qtdisplayrole, pkgitem_name;\n admin 2013-07-26 0 550 packingList getreport get the reportname should be used for a packing list or pick list Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: packingList\n-- Name: getreport\n-- Notes: get the reportname should be used for a packing list or pick list\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT findCustomerForm(cohead_cust_id,\n ) AS reportname\n FROM cohead \n WHERE (cohead_id=);\n\nSELECT findTOForm(,\n ) AS reportname;\n\n admin 2013-07-26 0 37 packingList shipment used by printPackingList Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: packingList\n-- Name: shipment\n-- Notes: used by printPackingList\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT shiphead_order_id, shiphead_order_type, shiphead_shipform_id, cohead_number AS number\nFROM shiphead, cohead\nWHERE ((shiphead_id=)\n AND (cohead_id=shiphead_order_id)\n AND (shiphead_order_type='SO'))\n\nUNION\nSELECT shiphead_order_id, shiphead_order_type, shiphead_shipform_id, tohead_number AS number\nFROM shiphead, tohead\nWHERE ((shiphead_id=)\n AND (tohead_id=shiphead_order_id)\n AND (shiphead_order_type='TO'))\n\n;\n admin 2013-07-26 0 35 packingListBatch detail used by packingListBatch Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: packingListBatch\n-- Name: detail\n-- Notes: used by packingListBatch\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cohead_id, pack_shiphead_id, \n cohead_number AS order_number, pack_head_type,\n cohead_shipvia AS shipvia,\n formatShipmentNumber(pack_shiphead_id) AS shipment_number, \n cust_number AS number, cohead_billtoname AS name,\n CASE WHEN (cohead_holdtype='N') THEN \n WHEN (cohead_holdtype='C') THEN \n WHEN (cohead_holdtype='S') THEN \n WHEN (cohead_holdtype='P') THEN \n WHEN (cohead_holdtype='R') THEN \n ELSE \n END AS f_holdtype,\n pack_printed\nFROM pack, cohead, custinfo\nWHERE pack_head_id=cohead_id \n AND cohead_cust_id=cust_id \n AND pack_head_type='SO' \n\n AND checkSOSitePrivs(cohead_id)\nUNION \nSELECT tohead_id, pack_shiphead_id, \n tohead_number AS order_number, pack_head_type,\n tohead_shipvia AS shipvia,\n formatShipmentNumber(pack_shiphead_id) AS shipment_number, \n tohead_destname AS number, tohead_destcntct_name AS name,\n '' AS f_holdtype,\n pack_printed\nFROM pack, tohead \nWHERE ((pack_head_id=tohead_id)\n AND (pack_head_type='TO')) \n\nORDER BY 3;\n admin 2013-07-26 0 36 packingListBatch print used by packingListBatch Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: packingListBatch\n-- Name: print\n-- Notes: used by packingListBatch\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pack_id, pack_head_id, pack_head_type, pack_shiphead_id,\n COALESCE(shipform_report_name, findCustomerForm(cohead_cust_id, 'P')) AS packform,\n findCustomerForm(cohead_cust_id, 'L') AS pickform \nFROM pack JOIN cohead ON (cohead_id=pack_head_id)\n LEFT OUTER JOIN shipform ON (shipform_id=cohead_shipform_id)\nWHERE ((checkSOSitePrivs(cohead_id))\n AND (pack_head_type='SO')\n AND (NOT pack_printed) ) \n\nUNION \nSELECT pack_id, pack_head_id, pack_head_type, pack_shiphead_id,\n COALESCE(shipform_report_name, findTOForm(tohead_id, 'P')) AS packform,\n findTOForm(tohead_id, 'L') AS pickform \nFROM pack JOIN tohead ON (tohead_id=pack_head_id)\n LEFT OUTER JOIN shipform ON (shipform_id=tohead_shipform_id)\nWHERE ((pack_head_type='TO')\n AND (NOT pack_printed))\n\n;\n admin 2013-07-26 0 33 packingListBatchByShipVia print used by printPackingListBatchByShipVia Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: packingListBatchByShipVia\n-- Name: print\n-- Notes: used by printPackingListBatchByShipVia\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT pack_head_id, pack_head_type, pack_shiphead_id, getSoStatus(cohead_id) AS orderhead_status,\n COALESCE(shipform_report_name, findCustomerForm(cohead_cust_id, 'P')) AS packform,\n findCustomerForm(cohead_cust_id, 'L') AS pickform\nFROM pack JOIN cohead ON (cohead_id=pack_head_id)\n JOIN coitem ON (coitem_cohead_id = cohead_id) \n LEFT OUTER JOIN shipform ON (shipform_id=cohead_shipform_id)\nWHERE ( (NOT pack_printed)\n AND (pack_head_type='SO')\n AND (getSoStatus(cohead_id) <> 'C') \n AND (cohead_shipvia=)\n AND (checkSOSitePrivs(cohead_id))\n AND\t(coitem_scheddate BETWEEN AND ) )\n\n\nUNION ALL\nSELECT DISTINCT pack_head_id, pack_head_type, pack_shiphead_id, tohead_status AS orderhead_status,\n COALESCE(shipform_report_name, findTOForm(tohead_id, 'P')) AS packform,\n findTOForm(tohead_id, 'L') AS pickform\nFROM pack JOIN tohead ON (tohead_id=pack_head_id)\n JOIN toitem ON (toitem_tohead_id = tohead_id) \n LEFT OUTER JOIN shipform ON (shipform_id=tohead_shipform_id)\nWHERE ( (NOT pack_printed)\n AND (pack_head_type='TO')\n AND (tohead_status <> 'C') \n AND (tohead_shipvia=)\n AND\t(toitem_duedate BETWEEN AND ) )\n\n\n;\n admin 2013-07-26 0 34 packingListBatchByShipVia shipVia used by printPackingListBatchByShipVia Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: packingListBatchByShipVia\n-- Name: shipVia\n-- Notes: used by printPackingListBatchByShipVia\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT max(id), shipvia\nFROM (\nSELECT max(cohead_id) AS id, cohead_shipvia AS shipvia\nFROM pack, cohead, coitem\nWHERE ( (NOT pack_printed)\n AND (cohead_id=pack_head_id)\n AND (pack_head_type='SO')\n AND (coitem_cohead_id=cohead_id)\n AND (coitem_status='O') )\nGROUP BY cohead_shipvia\n\nUNION\nSELECT max(tohead_id) AS id, tohead_shipvia AS shipvia\nFROM pack, tohead\nWHERE ( (NOT pack_printed)\n AND (tohead_status = 'O')\n AND (tohead_id=pack_head_id)\n AND (pack_head_type='TO') )\nGROUP BY tohead_shipvia\n\n) data\nGROUP BY shipvia\nORDER BY shipvia\n admin 2013-07-26 0 328 partiallyShippedOrders detail used by dspPartiallyShippedOrders Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: partiallyShippedOrders\n-- Name: detail\n-- Notes: used by dspPartiallyShippedOrders\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT CASE WHEN (cohead_holdtype IN ('P', 'C', 'R')) THEN -1\n ELSE cohead_id\n END AS _coheadid, cohead_id,\n cohead_holdtype, cohead_number, cust_name,\n CASE WHEN (cohead_holdtype='N') THEN \n WHEN (cohead_holdtype='C') THEN \n WHEN (cohead_holdtype='S') THEN \n WHEN (cohead_holdtype='P') THEN \n WHEN (cohead_holdtype='R') THEN \n ELSE \n END AS f_holdtype,\n cohead_orderdate,\n (MIN(coitem_scheddate)) AS minscheddate,\n cohead_packdate,\n SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio) ) AS extprice,\n currConcat(cohead_curr_id) AS currAbbr,\n SUM(currToBase(cohead_curr_id,\n (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio),\n CURRENT_DATE)) AS extprice_base,\n 'curr' AS extprice_xtnumericrole,\n 'curr' AS extprice_base_xtnumericrole,\n \n 0 AS extprice_xttotalrole \n \n 0 AS extprice_base_xttotalrole \n \nFROM cohead, itemsite, item, custinfo, coitem\nWHERE ( (coitem_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (coitem_status='O')\n AND (cohead_id IN ( SELECT DISTINCT coitem_cohead_id\n FROM coitem\n WHERE (coitem_qtyshipped > 0) ))\n AND (coitem_qtyshipped < coitem_qtyord)\n AND (coitem_scheddate BETWEEN \n AND )\n \n AND (itemsite_warehous_id=)\n \n ) \nGROUP BY cohead_id, cohead_number, cust_name,\n cohead_holdtype, cohead_orderdate, cohead_packdate,\n cohead_curr_id \nORDER BY minscheddate, cohead_number;\n admin 2013-07-26 0 329 pendingAvailability detail used by dspPendingAvailability Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: pendingAvailability\n-- Name: detail\n-- Notes: used by dspPendingAvailability\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\n\n-- Indented BOM\nSELECT itemsite_id, reorderlevel,\n bomdata_bomwork_level,\n bomdata_bomwork_id,\n bomdata_bomwork_parent_id,\n bomdata_bomwork_seqnumber AS bomitem_seqnumber,\n bomdata_item_number AS item_number,\n bomdata_itemdescription AS item_descrip,\n bomdata_uom_name AS uom_name,\n pendalloc,\n ordered,\n qoh,\n (totalalloc + pendalloc) AS totalalloc,\n (qoh + ordered - (totalalloc + pendalloc)) AS totalavail,\n 'qty' AS pendalloc_xtnumericrole,\n 'qty' AS ordered_xtnumericrole,\n 'qty' AS qoh_xtnumericrole,\n 'qty' AS totalalloc_xtnumericrole,\n 'qty' AS totalavail_xtnumericrole,\n CASE WHEN (qoh < pendalloc) THEN 'error' END AS qoh_qtforegroundrole,\n CASE WHEN ((qoh + ordered - (totalalloc + pendalloc)) < reorderlevel) THEN 'error'\n WHEN ((qoh + ordered - (totalalloc + pendalloc)) = reorderlevel) THEN 'warning'\n END AS totalavail_qtforegroundrole,\n bomdata_bomwork_level - 1 AS xtindentrole\n FROM ( SELECT itemsite_id,\n CASE WHEN(itemsite_useparams)\n THEN itemsite_reorderlevel\n ELSE 0.0\n END AS reorderlevel,\n ib.*,\n ((bomdata_qtyreq::NUMERIC * ) * (1 + bomdata_scrap::NUMERIC)) AS pendalloc,\n qtyAllocated(itemsite_id, DATE()) AS totalalloc,\n noNeg(itemsite_qtyonhand) AS qoh,\n qtyOrdered(itemsite_id, DATE()) AS ordered\n FROM indentedBOM(,\n getActiveRevId('BOM', ),\n 0,0) ib LEFT OUTER JOIN\n itemsite ON ((itemsite_item_id=bomdata_item_id)\n AND (itemsite_warehous_id=))\n WHERE (bomdata_item_id > 0)\n \n AND (CURRENT_DATE BETWEEN bomdata_effective AND (bomdata_expires-1))\n \n AND ( BETWEEN bomdata_effective AND (bomdata_expires-1))\n \n ) AS data\n\n WHERE ((qoh + ordered - (totalalloc + pendalloc)) < 0)\n \nORDER BY bomworkSequence(bomdata_bomwork_id);\n\n\n\n-- Single Level BOM\nSELECT itemsite_id, bomitem_seqnumber, item_number, item_descrip, uom_name,\n pendalloc, (totalalloc + pendalloc) AS totalalloc,\n qoh, (qoh + ordered - (totalalloc + pendalloc)) AS totalavail,\n reorderlevel,\n 'qty' AS pendalloc_xtnumericrole,\n 'qty' AS totalalloc_xtnumericrole,\n 'qty' AS qoh_xtnumericrole,\n 'qty' AS totalavail_xtnumericrole,\n CASE WHEN (qoh < pendalloc) THEN 'error' END AS qoh_qtforegroundrole,\n CASE WHEN ((qoh + ordered - (totalalloc + pendalloc)) < reorderlevel) THEN 'error'\n WHEN ((qoh + ordered - (totalalloc + pendalloc)) = reorderlevel) THEN 'warning'\n END AS totalavail_qtforegroundrole\nFROM ( SELECT itemsite_id, bomitem_seqnumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS item_descrip, uom_name,\n ((itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL,\n (bomitem_qtyfxd + bomitem_qtyper * ) * (1 + bomitem_scrap)))) AS pendalloc,\n qtyAllocated(itemsite_id, DATE()) AS totalalloc,\n noNeg(itemsite_qtyonhand) AS qoh,\n qtyOrdered(itemsite_id, DATE()) AS ordered,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel\n FROM itemsite, item, bomitem(), uom\n WHERE ( (bomitem_item_id=itemsite_item_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=)\n \n AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires-1))\n \n AND ( BETWEEN bomitem_effective AND (bomitem_expires-1))\n \n )\n ) AS data\n\n WHERE ((qoh + ordered - (totalalloc + pendalloc)) < 0)\n \nORDER BY bomitem_seqnumber;\n\n \n admin 2013-07-26 0 330 pendingBOMChanges detail used by dspPendingBOMChanges Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: pendingBOMChanges\n-- Name: detail\n-- Notes: used by dspPendingBOMChanges\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT bomitem_id, actiondate, action,\n bomitem_seqnumber, item_number, description,\n uom_name, qtyfxd, qtyper,\n bomitem_scrap, actiondate,\n 'qty' AS qtyfxd_xtnumericrole,\n 'qtyper' AS qtyper_xtnumericrole,\n 'percent' AS bomitem_scrap_xtnumericrole \nFROM (SELECT bomitem_id, AS action,\n bomitem_seqnumber, item_number, (item_descrip1 || ' ' || item_descrip2) AS description,\n uom_name,\n (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd,\n (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper,\n bomitem_scrap, bomitem_effective AS actiondate \n FROM bomitem(,), item, uom \n WHERE ((bomitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (bomitem_effective BETWEEN CURRENT_DATE AND )) \n UNION \n SELECT bomitem_id, AS action, \n bomitem_seqnumber, item_number, (item_descrip1 || ' ' || item_descrip2) AS description,\n uom_name,\n (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd,\n (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper,\n bomitem_scrap, bomitem_expires AS actiondate \n FROM bomitem(,), item, uom \n WHERE ((bomitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n \n AND (bomitem_expires BETWEEN CURRENT_DATE AND ) )\n \n ) AS data \nORDER BY action, actiondate, bomitem_seqnumber;\n admin 2013-07-26 0 331 poDeliveryDateVariances detail used by dspPoDeliveryDateVariancesByItem, dspPoDeliveryDateVariancesByVendor Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: poDeliveryDateVariances\n-- Name: detail\n-- Notes: used by dspPoDeliveryDateVariancesByItem, dspPoDeliveryDateVariancesByVendor\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n recv.*, vend_name,\n firstLine(recv_vend_item_number) AS itemnumber,\n firstLine(recv_vend_item_descrip) AS itemdescrip,\n DATE(recv_rlsd_duedate) - DATE(COALESCE(pohead_released, pohead_orderdate)) AS req_leadtime,\n DATE(recv_duedate) - DATE(COALESCE(pohead_released, pohead_orderdate)) AS agrd_leadtime,\n DATE(recv_date) - DATE(COALESCE(pohead_released, pohead_orderdate)) AS real_leadtime,\n DATE(recv_date) - DATE(recv_rlsd_duedate) AS req_diff,\n\t DATE(recv_date) - DATE(recv_duedate) AS argd_diff,\n DATE(recv_date) AS receivedate,\n formatDate(COALESCE(pohead_released, pohead_orderdate)) AS orderdate,\n formatDate(recv_date) AS f_recv_date,\n recv_rlsd_duedate AS release_duedate, \n\t recv_duedate AS argd_duedate,\n CASE WHEN (DATE(recv_date) - DATE(recv_rlsd_duedate) > 0) THEN 'error'\n END AS req_diff_qtforegroundrole,\n CASE WHEN (DATE(recv_date) - DATE(recv_duedate) > 0) THEN 'error'\n END AS argd_diff_qtforegroundrole, \n\t CASE WHEN (DATE(recv_date) > DATE(recv_duedate)) THEN 'error'\t\t\t \n END AS receivedate_qtforegroundrole,\t\t\t \n 'qty' AS recv_qty_xtnumericrole\n \n recv_id, recv_order_number, vend_name,\n DATE(recv_date) AS receivedate,\n formatDate(COALESCE(pohead_released, pohead_orderdate)) AS orderdate,\n firstLine(recv_vend_item_number) AS venditemnumber,\n firstLine(recv_vend_item_descrip) AS venditemdescrip,\n recv_qty, recv_duedate, recv_date,\n formatDate(recv_date) AS f_recv_date,\n DATE(recv_rlsd_duedate) - DATE(COALESCE(pohead_released, pohead_orderdate)) AS req_leadtime,\n DATE(recv_duedate) - DATE(COALESCE(pohead_released, pohead_orderdate)) AS agrd_leadtime,\n DATE(recv_date) - DATE(COALESCE(pohead_released, pohead_orderdate)) AS real_leadtime,\n DATE(recv_date) - DATE(recv_rlsd_duedate) AS req_diff,\n DATE(recv_date) - DATE(recv_duedate) AS argd_diff,\n firstLine(item.item_number) AS itemnumber,\n recv_rlsd_duedate AS release_duedate,\n recv_duedate AS argd_duedate,\n CASE WHEN (DATE(recv_date) - DATE(recv_rlsd_duedate) > 0) THEN 'error'\n END AS req_diff_qtforegroundrole,\n CASE WHEN (DATE(recv_date) - DATE(recv_duedate) > 0) THEN 'error'\n END AS argd_diff_qtforegroundrole,\n CASE WHEN (DATE(recv_date) > DATE(recv_duedate)) THEN 'error'\n END AS receivedate_qtforegroundrole,\n 'qty' AS recv_qty_xtnumericrole\n \n\nFROM recv LEFT OUTER JOIN vendinfo ON (vend_id=recv_vend_id)\n LEFT OUTER JOIN pohead ON (pohead_number=recv_order_number AND recv_order_type='PO')\n LEFT OUTER JOIN (itemsite JOIN item ON (item_id=itemsite_item_id)) ON (itemsite_id=recv_itemsite_id)\nWHERE ( TRUE\n\n AND (itemsite_item_id=)\n\n\n AND (DATE(recv_date) BETWEEN AND )\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (recv_agent_username=)\n\n\n AND (vend_id=)\n\n\n AND (recv_agent_username=)\n\n )\nORDER BY\n recv_date DESC;\n admin 2013-07-26 0 333 poItems detail used by dspPoItemsByVendor, dspPoItemsByItem, dspPoItemsByDate Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: poItems\n-- Name: detail\n-- Notes: used by dspPoItemsByVendor, dspPoItemsByItem, dspPoItemsByDate\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pohead_id, poitem_id, pohead_number, poitem_status,\n CASE WHEN(poitem_status='C') THEN \n WHEN(poitem_status='U') THEN \n WHEN(poitem_status='O' AND ((poitem_qty_received-poitem_qty_returned) > 0) \n AND (poitem_qty_ordered>(poitem_qty_received-poitem_qty_returned))) \n THEN \n WHEN(poitem_status='O' AND ((poitem_qty_received-poitem_qty_returned) > 0) \n AND (poitem_qty_ordered<=(poitem_qty_received-poitem_qty_returned))) \n THEN \n WHEN(poitem_status='O') THEN \n ELSE poitem_status\n END AS f_poitem_status,\n vend_name,\n (SELECT warehous_code\n FROM whsinfo\n WHERE (COALESCE(itemsite_warehous_id, pohead_warehous_id)=warehous_id)) AS warehous_code,\n COALESCE(item_number, ) AS itemnumber,\n poitem_vend_item_number, poitem_vend_uom,\n COALESCE(item_descrip1, firstLine(poitem_vend_item_descrip)) AS itemdescrip,\n COALESCE(uom_name, poitem_vend_uom) AS itemuom,\n poitem_duedate, poitem_qty_ordered, poitem_qty_received, poitem_qty_returned,\n CASE WHEN (poitem_duedate < CURRENT_DATE) THEN 'error' END AS poitem_duedate_qtforegroundrole,\n 'qty' AS poitem_qty_ordered_xtnumericrole,\n 'qty' AS poitem_qty_received_xtnumericrole,\n 'qty' AS poitem_qty_returned_xtnumericrole \n FROM pohead\n JOIN poitem ON (pohead_id=poitem_pohead_id)\n JOIN vendinfo ON (pohead_vend_id=vend_id)\n LEFT OUTER JOIN (itemsite\n JOIN item ON (itemsite_item_id=item_id)\n JOIN uom ON (item_inv_uom_id=uom_id))\n ON (poitem_itemsite_id=itemsite_id)\nWHERE (TRUE\n\n AND (poitem_duedate BETWEEN AND )\n\n\n AND (((itemsite_id IS NULL) AND\n (pohead_warehous_id=) )\n OR\n ((itemsite_id IS NOT NULL) AND\n (itemsite_warehous_id=) ) )\n\n\n AND (pohead_agent_username=)\n\n\n AND (poitem_status='O')\n\n\n AND (poitem_status='C')\n\n\n AND (pohead_number=)\n\n\n AND (pohead_vend_id=) \n\n AND (vend_vendtype_id=)\n\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ )))\n\n\n AND (itemsite_item_id=) \n\n )\nORDER BY poitem_duedate, pohead_number, poitem_linenumber\n;\n admin 2013-07-26 0 508 poItems list used by purchaseOrder Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: poItems\n-- Name: list\n-- Notes: used by purchaseOrder\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT poitem.*,\n CASE WHEN(poitem_status='C') THEN \n WHEN(poitem_status='U') THEN \n WHEN(poitem_status='O' AND ((poitem_qty_received-poitem_qty_returned) > 0) AND (poitem_qty_ordered>(poitem_qty_received-poitem_qty_returned))) THEN \n WHEN(poitem_status='O' AND ((poitem_qty_received-poitem_qty_returned) > 0) AND (poitem_qty_ordered<=(poitem_qty_received-poitem_qty_returned))) THEN \n WHEN(poitem_status='O') THEN \n ELSE poitem_status\n END AS poitemstatus,\n CASE WHEN (poitem_order_type='S') THEN \n WHEN (poitem_order_type='W') THEN \n ELSE ''\n END AS demand_type,\n CASE WHEN (poitem_order_type='S') THEN formatSoNumber(coitem_id)\n WHEN (poitem_order_type='W') THEN formatWoNumber(womatl_wo_id)\n ELSE ''\n END AS order_number,\n CASE WHEN (itemsite_id IS NULL) THEN poitem_vend_item_number\n ELSE item_number\n END AS item_number,\n CASE WHEN (itemsite_id IS NULL) THEN firstLine(poitem_vend_item_descrip)\n ELSE (item_descrip1 || ' ' || item_descrip2)\n END AS item_descrip,\n poitem_rlsd_duedate AS orgl_duedate,\n (poitem_unitprice * poitem_qty_ordered) AS extprice,\n CASE WHEN(poitem_status='C') THEN \n WHEN(poitem_status='U') THEN \n WHEN(poitem_status='O' AND ((poitem_qty_received-poitem_qty_returned) > 0) AND (poitem_qty_ordered>(poitem_qty_received-poitem_qty_returned))) THEN \n WHEN(poitem_status='O' AND ((poitem_qty_received-poitem_qty_returned) > 0) AND (poitem_qty_ordered<=(poitem_qty_received-poitem_qty_returned))) THEN \n WHEN(poitem_status='O') THEN \n ELSE poitem_status\n END AS poitem_status_qtdisplayrole,\n 'qty' AS poitem_qty_ordered_xtnumericrole,\n 'qty' AS poitem_qty_received_xtnumericrole,\n 'qty' AS poitem_qty_returned_xtnumericrole,\n 'qty' AS poitem_qty_vouchered_xtnumericrole,\n 'purchprice' AS poitem_unitprice_xtnumericrole,\n 'curr' AS extprice_xtnumericrole,\n 'curr' AS poitem_freight_xtnumericrole,\n 'curr' AS poitem_freight_received_xtnumericrole,\n 'curr' AS poitem_freight_vouchered_xtnumericrole,\n 'curr' AS poitem_stdcost_xtnumericrole\nFROM pohead JOIN poitem ON (poitem_pohead_id=pohead_id)\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN coitem ON (poitem_order_type='S' AND poitem_order_id = coitem_id)\n LEFT OUTER JOIN womatl ON (poitem_order_type='W' AND poitem_order_id = womatl_id)\nWHERE (poitem_pohead_id=)\nORDER BY poitem_linenumber;\n admin 2013-07-26 0 226 poPriceVariances detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: poPriceVariances\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *\n,\n formatDate(distdate) AS f_date,\n formatQty(recv_qty) AS f_qty,\n formatCost(recv_recvcost) AS f_recv_recvcost,\n formatMoney(recv_value) AS f_recv_value,\n formatPrice(vouchercost) AS f_vouchercost,\n formatMoney(voucher_value) AS f_voucher_value,\n formatMoney(variance) AS f_variance, \n formatPrcnt(varprcnt/100) AS f_varprcnt\n\n FROM (\nSELECT recv_id, recv_order_number, recv_date, recv_order_type,\n DATE(recv_date) AS receivedate,\n vohead_distdate AS distdate,\n vend_number, vend_name,\n COALESCE(item_number, ( || recv_vend_item_number)) AS itemnumber,\n firstLine(COALESCE(item_descrip1, recv_vend_item_descrip)) AS itemdescrip,\n recv_qty,\n recv_purchcost,\n currConcat(recv_freight_curr_id) AS poCurrAbbr,\n\n COALESCE((recv_value / CASE WHEN (recv_qty <> 0.0) THEN recv_qty ELSE 1.0 END), 0.0) AS recv_recvcost,\n COALESCE(recv_value, 0.0) AS recv_value,\n COALESCE(currToBase(vohead_curr_id, SUM(vodist_amount) / CASE WHEN (SUM(vodist_qty) <> 0.0) THEN SUM(vodist_qty) ELSE 1.0 END, vohead_distdate), 0.0) AS vouchercost,\n COALESCE(currToBase(vohead_curr_id, SUM(vodist_amount) / CASE WHEN (SUM(vodist_qty) <> 0.0) THEN SUM(vodist_qty) ELSE 1.0 END, vohead_distdate) * recv_qty, 0.0) AS voucher_value,\n COALESCE(currToBase(vohead_curr_id, SUM(vodist_amount) / CASE WHEN (SUM(vodist_qty) <> 0.0) THEN SUM(vodist_qty) ELSE 1.0 END, vohead_distdate) * recv_qty - recv_value, 0.0) AS variance,\n CASE WHEN (COALESCE(recv_value, 0.0) <> 0.0) THEN\n ((currToBase(vohead_curr_id, SUM(vodist_amount) / CASE WHEN (SUM(vodist_qty) <> 0.0) THEN SUM(vodist_qty) ELSE 1.0 END, vohead_distdate) *\n recv_qty / recv_value) -1.0) * 100.0\n ELSE 100.0 END AS varprcnt, \n currConcat(baseCurrId()) AS currAbbr,\n '0' AS recv_value_xttotalrole,\n '0' AS voucher_value_xttotalrole,\n '0' AS variance_xttotalrole,\n -- local Currency\n COALESCE(currToLocal(vohead_curr_id, (recv_value / CASE WHEN (recv_qty <> 0.0) THEN recv_qty ELSE 1.0 END), vohead_distdate), 0.0) AS recv_recvcost,\n COALESCE(currToLocal(vohead_curr_id, recv_value, vohead_distdate), 0.0) AS recv_value,\n COALESCE(SUM(vodist_amount) / CASE WHEN (SUM(vodist_qty) <> 0.0) THEN SUM(vodist_qty) ELSE 1.0 END, 0.0) AS vouchercost,\n COALESCE(SUM(vodist_amount) / CASE WHEN (SUM(vodist_qty) <> 0.0) THEN SUM(vodist_qty) ELSE 1.0 END * recv_qty, 0.0) AS voucher_value,\n COALESCE(SUM(vodist_amount) / CASE WHEN (SUM(vodist_qty) <> 0.0) THEN SUM(vodist_qty) ELSE 1.0 END * recv_qty - currToLocal(vohead_curr_id, recv_value, vohead_distdate), 0.0) AS variance,\n CASE WHEN (COALESCE(recv_value, 0.0) <> 0.0) THEN\n ((SUM(vodist_amount) / CASE WHEN (SUM(vodist_qty) <> 0.0) THEN SUM(vodist_qty) ELSE 1.0 END *\n recv_qty / currToLocal(vohead_curr_id, recv_value, vohead_distdate)) -1.0) * 100.0\n ELSE 100.0 END AS varprcnt, \n currConcat(vohead_curr_id) AS currAbbr,\n\n 'qty' AS recv_qty_xtnumericrole,\n 'purchprice' AS recv_purchcost_xtnumericrole,\n 'curr' AS recv_value_xtnumericrole,\n 'purchprice' AS vouchercost_xtnumericrole,\n 'curr' AS voucher_value_xtnumericrole,\n 'cost' AS recv_recvcost_xtnumericrole,\n 'curr' AS variance_xtnumericrole,\n 'prcnt' AS varprcnt_xtnumericrole\nFROM vendinfo\n JOIN vendtype ON (vend_vendtype_id=vendtype_id), recv\n LEFT OUTER JOIN (\n itemsite JOIN item ON (itemsite_item_id=item_id) )\n ON (recv_itemsite_id=itemsite_id)\n JOIN vodist ON ((vodist_poitem_id=recv_orderitem_id)\n AND (vodist_vohead_id=recv_vohead_id))\n JOIN vohead ON ((vodist_vohead_id=vohead_id) \n AND (vohead_posted))\nWHERE ( (recv_vend_id=vend_id)\nAND (recv_order_type='PO')\n\n AND (vend_id=)\n\n AND (vendtype_id=)\n\n AND (vendtype_code ~ )\n\n AND (DATE(vohead_distdate) BETWEEN AND ) \n\n AND (itemsite_warehous_id=)\n\n\n AND (itemsite_item_id=)\n\n\n AND (recv_agent_username=)\n\n )\nGROUP BY recv_id, recv_order_number, recv_order_type, recv_date, item_number, recv_vend_item_number,\n item_descrip1, recv_vend_item_descrip, recv_qty, recv_purchcost, recv_recvcost,\n vohead_curr_id, recv_freight_curr_id, vohead_docdate, vend_number, vend_name,\n recv_value, vohead_distdate\n) data\n\nWHERE (variance != 0)\n\nORDER BY distdate, recv_order_number DESC;\n admin 2013-07-26 0 334 poReturns detail used by dspPoReturnsByVendor Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: poReturns\n-- Name: detail\n-- Notes: used by dspPoReturnsByVendor\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT poreject_id, poreject_ponumber, vend_name,\n poreject_date, poreject_qty,\n poreject_vend_item_number, poreject_vend_item_descrip,\n rjctcode_code,\n 'qty' AS poreject_qty_xtnumericrole \nFROM poreject, vendinfo, itemsite, rjctcode\nWHERE ((poreject_posted)\n AND (poreject_vend_id=vend_id)\n AND (poreject_rjctcode_id=rjctcode_id)\n AND (poreject_itemsite_id=itemsite_id)\n AND (vend_id=)\n AND (DATE(poreject_date) BETWEEN AND )\n\n AND (itemsite_warehous_id=)\n\n\n AND (poreject_agent_username=)\n\n ) \nORDER BY poreject_date DESC;\n admin 2013-07-26 0 534 postCountTags post Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: postCountTags\n-- Name: post\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT MIN(postCountTag(invcnt_id, )) AS result\n FROM invcnt, itemsite, item\n WHERE ((invcnt_itemsite_id=itemsite_id)\n AND (invcnt_qoh_after IS NOT NULL)\n AND (NOT invcnt_posted)\n AND (itemsite_item_id=item_id)\n\n AND (itemsite_warehous_id=)\n\n\n\n AND (item_classcode_id=)\n\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ )))\n\n AND (itemsite_plancode_id=)\n\n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n\n);\n admin 2013-07-26 0 482 postJournals detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: postJournals\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *\nFROM (\n SELECT 0 AS id,\n sltrans_source,\n 0 AS xtindentrole,\n CASE WHEN sltrans_source = 'A/P' THEN \n WHEN sltrans_source = 'A/R' THEN \n WHEN sltrans_source = 'G/L' THEN \n WHEN sltrans_source = 'I/M' THEN \n WHEN sltrans_source = 'P/D' THEN \n WHEN sltrans_source = 'S/O' THEN \n WHEN sltrans_source = 'S/R' THEN \n WHEN sltrans_source = 'W/O' THEN \n ELSE \n END AS description, \n NULL AS debit, \n NULL AS credit, \n count(sltrans_id) AS journals\n FROM sltrans\n WHERE ((NOT sltrans_posted)\n AND (sltrans_amount > 0)\n AND (sltrans_date BETWEEN AND ))\n GROUP BY sltrans_source\n\nUNION ALL\n SELECT \n sltrans_accnt_id AS id,\n sltrans_source,\n 1 AS xtindentrole,\n formatGLAccountLong(sltrans_accnt_id) AS description,\n CASE WHEN SUM(sltrans_amount) < 0 THEN ABS(SUM(sltrans_amount))\n END AS debit,\n CASE WHEN SUM(sltrans_amount) > 0 THEN SUM(sltrans_amount)\n END AS credit,\n NULL AS journals\n FROM sltrans\n WHERE ((NOT sltrans_posted)\n AND (sltrans_date BETWEEN AND ))\n GROUP BY sltrans_accnt_id, sltrans_source\n\n) data\nORDER BY sltrans_source, xtindentrole\n admin 2013-07-26 0 337 prices detail used by dspPricesByCustomerType, dspPricesByCustomer, dspPricesByItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: prices\n-- Name: detail\n-- Notes: used by dspPricesByCustomerType, dspPricesByCustomer, dspPricesByItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemid, sourcetype, schedulename, type,\n\n itemnumber, itemdescrip, priceuom,\n\n typename,\n\n CASE WHEN (qtybreak <> -1) THEN qtybreak END AS f_qtybreak,\n price,\n currConcat(curr_id) AS currConcat,\n 'qty' AS f_qtybreak_xtnumericrole,\n AS f_qtybreak_xtnullrole,\n 'salesprice' AS price_xtnumericrole\n\n \n , CASE WHEN ( <> 0) THEN END AS f_cost,\n CASE WHEN ((price <> 0) AND ( <> 0)) THEN ((price - ) / price) END AS f_margin,\n \n , CASE WHEN (cost IS NOT NULL) THEN cost END AS f_cost,\n CASE WHEN ((price <> 0) AND (cost <>0)) THEN ((price - cost) / price) END AS f_margin,\n \n 'cost' AS f_cost_xtnumericrole,\n AS f_cost_xtnullrole,\n 'percent' AS f_margin_xtnumericrole,\n AS f_margin_xtnullrole,\n \n CASE WHEN ( > price) THEN 'error' END AS f_margin_qtforegroundrole\n \n CASE WHEN (cost > price) THEN 'error' END AS f_margin_qtforegroundrole\n \n\nFROM (\n\n SELECT\n \n ipsprice_id AS itemid, 1 AS sourcetype,\n ipshead_name AS schedulename, AS type,\n item_number AS itemnumber, uom_name AS priceuom, iteminvpricerat(item_id) AS invpricerat,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price, ipshead_curr_id AS curr_id,\n ipshead_updated AS effective\n \n , (stdcost(item_id) * iteminvpricerat(item_id)) AS cost\n \n , (actcost(item_id) * iteminvpricerat(item_id)) AS cost\n \n \n ipsprice_id AS itemid, 1 AS sourcetype,\n ipshead_name AS schedulename, AS type,\n cust_name AS typename,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price, ipshead_curr_id AS curr_id\n \n FROM ipsass, ipshead, ipsprice, item,\n \n uom\n \n custinfo\n \n WHERE ((ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n \n AND (item_price_uom_id=uom_id)\n AND (ipsass_cust_id=)\n \n AND (ipsass_cust_id=cust_id)\n AND (item_id=)\n \n AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) = 0)\n \n AND (ipshead_expires > CURRENT_DATE)\n \n \n AND (ipshead_effective <= CURRENT_DATE)\n \n )\n\n UNION\n\n\n SELECT\n\n ipsprice_id AS itemid, 2 AS sourcetype,\n ipshead_name AS schedulename, AS type,\n (custtype_code || '-' || custtype_descrip) AS typename,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price, ipshead_curr_id AS curr_id\n\n ipsprice_id AS itemid,\n \n 1 AS sourcetype,\n \n 2 AS sourcetype,\n \n ipshead_name AS schedulename, AS type,\n item_number AS itemnumber, uom_name AS priceuom, iteminvpricerat(item_id) AS invpricerat,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price, ipshead_curr_id AS curr_id,\n ipshead_updated AS effective\n \n \n , (stdcost(\n \n ipsprice_item_id\n \n item_id\n \n ) * iteminvpricerat(item_id)) AS cost\n \n , (actcost(\n \n ipsprice_item_id\n \n item_id\n \n ) * iteminvpricerat(item_id)) AS cost\n \n \n\n FROM ipsass, ipshead, ipsprice, item,\n\n custtype\n\n uom\n\n\n , custinfo\n\n WHERE ((ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n\n AND (item_price_uom_id=uom_id)\n\n\n AND (ipsass_custtype_id=)\n\n AND (ipsass_custtype_id=cust_custtype_id)\n AND (cust_id=)\n\n AND (ipsass_custtype_id=custtype_id)\n AND (item_id=)\n\n\n AND (ipshead_expires > CURRENT_DATE)\n\n\n AND (ipshead_effective <= CURRENT_DATE)\n\n )\n\n UNION\n\n SELECT\n\n ipsprice_id AS itemid, 3 AS sourcetype,\n ipshead_name AS schedulename, AS type,\n (custtype_code || '-' || custtype_descrip) AS typename,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price, ipshead_curr_id AS curr_id\n\n ipsprice_id AS itemid,\n \n 2 AS sourcetype,\n \n 3 AS sourcetype,\n \n ipshead_name AS schedulename, AS type,\n item_number AS itemnumber, uom_name AS priceuom, iteminvpricerat(item_id) AS invpricerat,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price, ipshead_curr_id AS curr_id,\n ipshead_updated AS effective\n \n \n , (stdcost(\n \n ipsprice_item_id\n \n item_id\n \n ) * iteminvpricerat(item_id)) AS cost\n \n , (actcost(\n \n ipsprice_item_id\n \n item_id\n \n ) * iteminvpricerat(item_id)) AS cost\n \n \n\n FROM ipsass, ipshead, ipsprice, item, custtype\n\n , uom\n\n\n , custinfo\n\n WHERE ((ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n\n AND (item_price_uom_id=uom_id)\n\n AND (coalesce(length(ipsass_custtype_pattern), 0) > 0)\n AND (custtype_code ~ ipsass_custtype_pattern)\n\n AND (custtype_id=)\n\n AND (cust_id=)\n\n AND (item_id=)\n\n\n AND (ipshead_expires > CURRENT_DATE)\n\n\n AND (ipshead_effective <= CURRENT_DATE)\n\n )\n\n UNION\n\n SELECT\n\n ipsprice_id AS itemid, 4 AS sourcetype,\n ipshead_name AS schedulename, AS type,\n sale_name AS typename,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price, ipshead_curr_id AS curr_id\n\n ipsprice_id AS itemid,\n\n 3\n\n 4\n AS sourcetype,\n ipshead_name AS schedulename, ( || '-' || sale_name) AS type,\n item_number AS itemnumber, uom_name AS priceuom, iteminvpricerat(item_id) AS invpricerat,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price, ipshead_curr_id AS curr_id,\n ipshead_updated AS effective\n\n \n , (stdcost(\n \n ipsprice_item_id\n \n item_id\n \n ) * iteminvpricerat(item_id)) AS cost\n \n , (actcost(\n \n ipsprice_item_id\n \n item_id\n \n ) * iteminvpricerat(item_id)) AS cost\n \n \n\n FROM sale, ipshead, ipsprice, item\n\n , uom\n\n WHERE ((sale_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n\n AND (item_price_uom_id=uom_id)\n\n\n AND (ipsprice_item_id=)\n \n AND (sale_enddate > CURRENT_DATE)\n \n \n AND (sale_startdate <= CURRENT_DATE)\n \n\n AND (ipsprice_item_id=item_id)\n \n AND (ipshead_expires > CURRENT_DATE)\n \n \n AND (ipshead_effective <= CURRENT_DATE)\n \n\n )\n\n\n\n UNION\n\n SELECT ipsprice_id AS itemid, 5 AS sourcetype,\n ipshead_name AS schedulename, AS type,\n (cust_name || '-' || shipto_num) AS typename,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price, ipshead_curr_id AS curr_id\n FROM ipsass, ipshead, ipsprice, custinfo, shiptoinfo, item\n WHERE ((ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsass_shipto_id=shipto_id)\n AND (shipto_cust_id=cust_id)\n AND (ipsprice_item_id=item_id)\n AND (item_id=)\n \n AND (ipshead_expires > CURRENT_DATE)\n \n \n AND (ipshead_effective <= CURRENT_DATE)\n \n )\n\n UNION\n\n SELECT ipsprice_id AS itemid, 6 AS sourcetype,\n ipshead_name AS schedulename, AS type,\n (cust_name || '-' || shipto_num) AS typename,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price, ipshead_curr_id AS curr_id\n FROM ipsass, ipshead, ipsprice, custinfo, shiptoinfo, item\n WHERE ((ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (COALESCE(LENGTH(ipsass_shipto_pattern),0) > 0)\n AND (shipto_num ~ ipsass_shipto_pattern)\n AND (ipsass_cust_id=cust_id)\n AND (shipto_cust_id=cust_id)\n AND (ipsprice_item_id=item_id)\n AND (item_id=:item_id)\n \n AND (ipshead_expires > CURRENT_DATE)\n \n \n AND (ipshead_effective <= CURRENT_DATE)\n \n )\n\n\n UNION\n\n SELECT\n\n item_id AS itemid, 0 AS sourcetype,\n AS schedulename, AS type,\n '' AS typename,\n -1 AS qtybreak, item_listprice AS price, baseCurrId() AS curr_id\n\n item_id AS itemid, 0 AS sourcetype,\n '' AS schedulename, AS type,\n item_number AS itemnumber, uom_name AS priceuom, iteminvpricerat(item_id) AS invpricerat,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n -1 AS qtybreak,\n \n item_listprice AS price,\n \n (item_listprice - (item_listprice * cust_discntprcnt)) AS price,\n \n baseCurrId() AS curr_id,\n CURRENT_DATE AS effective\n \n , (stdcost(item_id) * iteminvpricerat(item_id)) AS cost\n \n , (actcost(item_id) * iteminvpricerat(item_id)) AS cost\n \n\n\n FROM item JOIN uom ON (item_price_uom_id=uom_id)\n\n FROM custinfo, item JOIN uom ON (item_price_uom_id=uom_id)\n\n FROM item\n\n WHERE (\n\n (item_sold)\n AND (item_active)\n\n (item_id=)\n\n AND (NOT item_exclusive)\n\n AND (cust_id=)\n\n )\n ) AS data\nORDER BY\n\n itemnumber,\n\n price;\n admin 2013-07-26 0 535 pricingFreight detail used by itemPricingScheduleItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: pricingFreight\n-- Name: detail\n-- Notes: used by itemPricingScheduleItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT ipsfreight.*\n FROM ipsfreight\n WHERE ( (true)\n\n \n AND (ipsfreight_ipshead_id=)\n \n \n AND (ipsfreight_warehous_id=)\n \n AND (ipsfreight_warehous_id IS NULL)\n \n \n AND (ipsfreight_shipzone_id=)\n \n AND (ipsfreight_shipzone_id IS NULL)\n \n \n AND (ipsfreight_freightclass_id=)\n \n AND (ipsfreight_freightclass_id IS NULL)\n \n \n AND (ipsfreight_shipvia=)\n \n AND (ipsfreight_shipvia IS NULL)\n \n \n AND (ipsfreight_qtybreak=)\n \n AND (ipsfreight_id <> )\n\n AND (ipsfreight_id=)\n\n );\n admin 2013-07-26 0 551 projectTasks detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: projectTasks\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT prjtask_id, prjtask_number, prjtask_name,\n COALESCE(prjtask_hours_budget - prjtask_hours_actual, 0.0) as prjtaskhrbal,\n COALESCE(prjtask_exp_budget - prjtask_exp_actual, 0.0) as prjtaskexpbal,\n firstLine(prjtask_descrip) AS prjtask_descrip,\n totalhrbud, totalhract, totalhrbal,\n totalexpbud, totalexpact, totalexpbal\nFROM (SELECT COALESCE(SUM(prjtask_hours_budget), 0.0) AS totalhrbud,\n COALESCE(SUM(prjtask_hours_actual), 0.0) AS totalhract,\n COALESCE(SUM(prjtask_hours_budget - prjtask_hours_actual), 0.0) AS totalhrbal,\n COALESCE(SUM(prjtask_exp_budget), 0.0) AS totalexpbud,\n COALESCE(SUM(prjtask_exp_actual), 0.0) AS totalexpact,\n COALESCE(SUM(prjtask_exp_budget - prjtask_exp_actual), 0.0) AS totalexpbal\n FROM prjtask\n WHERE prjtask_prj_id = ) foo, prjtask\nWHERE (prjtask_prj_id=)\nORDER BY prjtask_number;\n admin 2013-07-26 0 338 projects detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: projects\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT prj_id AS id, prj_number, prj_name, prj_descrip,\n prj_start_date, prj_due_date, prj_assigned_date, prj_completed_date, \n CASE WHEN(prj_status='P') THEN \n WHEN(prj_status='O') THEN \n WHEN(prj_status='C') THEN \n ELSE \n END AS prj_status, \n prj_username, prj_owner_username,\n crmacct_number, formatCntctName(prj_cntct_id) AS contact_name,\n COALESCE(SUM(prjtask_hours_budget), 0.0) AS budget_hrs,\n COALESCE(SUM(prjtask_hours_actual), 0.0) AS actual_hrs,\n COALESCE(SUM(prjtask_hours_budget - prjtask_hours_actual), 0.0) AS balance_hrs, \n CASE WHEN COALESCE(SUM(prjtask_hours_budget - prjtask_hours_actual), 0.0) < 0 THEN \n 'error' END AS balance_hrs_qtforegroundrole, \n 'qty' AS budget_hrs_xtnumericrole, \n 'qty' AS actual_hrs_xtnumericrole, \n 'qty' AS balance_hrs_xtnumericrole \nFROM prj()\n LEFT OUTER JOIN prjtask ON (prj_id=prjtask_prj_id)\n LEFT OUTER JOIN crmacct ON (crmacct_id=prj_crmacct_id)\nWHERE (true)\n\n AND ( (prj_number ~* )\n OR (prj_name ~* )\n OR (prj_descrip ~* ) )\n\n\n AND (prj_username= OR prj_owner_username=)\n\n \n AND (prj_username=) \n\n AND (prj_username ~ ) \n\n \n AND (prj_owner_username=) \n\n AND (prj_owner_username ~ ) \n\n\n AND (prj_crmacct_id=)\n\n\n AND (prj_cntct_id=)\n\n\n AND (prj_start_date >= )\n\n\n AND (prj_start_date <= )\n\n\n AND (prj_due_date >= )\n\n\n AND (prj_due_date <= )\n\n\n AND (prj_assigned_date >= )\n\n\n AND (prj_assigned_date <= )\n\n\n AND (prj_completed_date >= )\n\n\n AND (prj_completed_date <= )\n\n\n AND (prj_status <> 'C')\n\n\n AND (prj_id=)\n\nGROUP BY prj_id, prj_number, prj_name, prj_descrip, prj_status, prj_username, prj_owner_username,\n crmacct_number, prj_cntct_id,\n prj_start_date, prj_due_date, prj_assigned_date, prj_completed_date\nORDER BY prj_number;\n admin 2013-07-26 0 339 prospects detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: prospects\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n prospect.*,\n cntct.*, addr.*\nFROM prospect \n LEFT OUTER JOIN cntct ON (prospect_cntct_id=cntct_id) \n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) \nWHERE true\n \n AND prospect_active \n\n \n AND (prospect_owner_username=) \n\n AND (prospect_owner_username ~ ) \n\n\n AND ((prospect_number ~* )\n OR (prospect_name ~* )\n OR (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n OR (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n OR (COALESCE(cntct_email,'') ~* )\n OR (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n OR (COALESCE(addr_city,'') ~* )\n OR (COALESCE(addr_state,'') ~* )\n OR (COALESCE(addr_postalcode,'') ~* )\n OR (COALESCE(addr_country,'') ~* ))\n\n\n AND (prospect_number ~* )\n\n\n AND (prospect_name ~* )\n\n\n AND (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n\n\n AND (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n\n\n AND (COALESCE(cntct_email,'') ~* )\n\n\n AND (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n\n\n AND (COALESCE(addr_city,'') ~* )\n\n\n AND (COALESCE(addr_state,'') ~* )\n\n\n AND (COALESCE(addr_postalcode,'') ~* )\n\n\n AND (COALESCE(addr_country,'') ~* )\n\n\n AND (prospect_id=\n\nORDER BY prospect_number; \n admin 2013-07-26 0 41 purchase purchaserequests Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: purchase\n-- Name: purchaserequests\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pr_id, itemsite_id, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS description,\n pr.*,\n CASE WHEN (pr_order_type='W') THEN ('W/O ' || ( SELECT formatWoNumber(womatl_wo_id)\n FROM womatl\n WHERE (womatl_id=pr_order_id) ) )\n WHEN (pr_order_type='S') THEN ('S/O ' || (SELECT formatSoNumber(pr_order_id)))\n WHEN (pr_order_type='F') THEN ('Planned Order')\n WHEN (pr_order_type='M') THEN \n ELSE \n END AS parent,\n 'qty' AS pr_qtyreq_xtnumericrole \nFROM pr, itemsite, item \nWHERE ((pr_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n\n AND (pr_duedate BETWEEN AND )\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (itemsite_item_id=)\n\n AND (itemsite_plancode_id=)\n\n AND (itemsite_plancode_id IN (SELECT plancode_id FROM\n plancode\n WHERE (plancode_code ~ ) ) )\n\n) \nORDER BY pr_duedate;\n admin 2013-07-26 0 536 purchaseOrderItems detail used by purchaseOrderItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: purchaseOrderItems\n-- Name: detail\n-- Notes: used by purchaseOrderItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pohead_number, pohead_taxzone_id,\n pohead_curr_id, pohead_orderdate,\n COALESCE(pohead_cohead_id, -1) AS pohead_cohead_id,\n poitem_linenumber, poitem_vend_item_number,\n poitem_vend_item_descrip, poitem_vend_uom,\n poitem_invvenduomratio, poitem_status,\n poitem_duedate, poitem_qty_ordered,\n poitem_qty_received, poitem_unitprice,\n poitem_freight, poitem_taxtype_id,\n poitem_tax_recoverable, poitem_comments,\n poitem_prj_id, poitem_bom_rev_id,\n poitem_boo_rev_id, poitem_manuf_name,\n poitem_manuf_item_number, poitem_manuf_item_descrip,\n COALESCE(poitem_itemsite_id, -1) AS poitem_itemsite_id,\n COALESCE(poitem_itemsrc_id, -1) AS poitem_itemsrc_id,\n COALESCE(poitem_expcat_id, -1) AS poitem_expcat_id,\n COALESCE(poitem_order_id, -1) AS poitem_order_id,\n CASE WHEN (poitem_order_type='S') THEN TEXT()\n WHEN (poitem_order_type='W') THEN TEXT()\n ELSE ''\n END AS demand_type,\n CASE WHEN (poitem_order_type='S') THEN formatSoNumber(coitem_id)\n WHEN (poitem_order_type='W') THEN formatWoNumber(womatl_wo_id)\n ELSE ''\n END AS order_number,\n poitem_unitprice * poitem_qty_ordered AS extended_price,\n COALESCE(coitem_prcost, 0.0) AS override_cost,\n itemsrc.*\n FROM poitem JOIN pohead ON (pohead_id=poitem_pohead_id)\n LEFT OUTER JOIN itemsrc ON (itemsrc_id=poitem_itemsrc_id)\n LEFT OUTER JOIN coitem ON (poitem_order_type='S' AND coitem_id=poitem_order_id)\n LEFT OUTER JOIN womatl ON (poitem_order_type='W' AND womatl_id=poitem_order_id)\n WHERE ( (TRUE)\n\n AND (poitem_id=)\n\n);\n admin 2013-07-26 0 40 purchaseOrders detail used by dspPosByVendor, dspPOsByDate Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: purchaseOrders\n-- Name: detail\n-- Notes: used by dspPosByVendor, dspPOsByDate\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pohead_id, pohead_number,\n warehous_code AS warehousecode,\n poitem_status, pohead_orderdate,\n CASE WHEN(poitem_status='C') THEN TEXT()\n WHEN(poitem_status='U') THEN TEXT()\n WHEN(poitem_status='O'\n AND (SUM(poitem_qty_received-poitem_qty_returned) > 0) \n AND (SUM(poitem_qty_ordered)>SUM(poitem_qty_received-poitem_qty_returned))) \n THEN TEXT()\n WHEN(poitem_status='O'\n AND (SUM(poitem_qty_received-poitem_qty_returned) > 0) \n AND (SUM(poitem_qty_ordered)<=SUM(poitem_qty_received-poitem_qty_returned))) \n THEN TEXT()\n WHEN(poitem_status='O') THEN TEXT()\n ELSE poitem_status\n END AS poitem_status_qtdisplayrole,\n\n vend_name,\n MIN(poitem_duedate) AS minDueDate,\n CASE WHEN (MIN(poitem_duedate) < CURRENT_DATE) THEN 'error'\n END AS minDueDate_qtforegroundrole,\n\n vend_number,\n\n\n MIN(date(recv_date)) AS sortDate,\n\n MIN(poitem_duedate) AS sortDate,\n\n pohead_orderdate AS sortDate,\n\n CASE WHEN (MIN(poitem_duedate) < CURRENT_DATE) THEN 'error' END AS sortDate_qtforegroundrole,\n-- Report formatting\n formatDate(pohead_orderdate) AS f_orderdate,\n formatDate(MIN(poitem_duedate)) AS f_duedate, \n CASE WHEN(poitem_status='C') THEN TEXT()\n WHEN(poitem_status='U') THEN TEXT()\n WHEN(poitem_status='O'\n AND (SUM(poitem_qty_received-poitem_qty_returned) > 0) \n AND (SUM(poitem_qty_ordered)>SUM(poitem_qty_received-poitem_qty_returned))) \n THEN TEXT()\n WHEN(poitem_status='O'\n AND (SUM(poitem_qty_received-poitem_qty_returned) > 0) \n AND (SUM(poitem_qty_ordered)<=SUM(poitem_qty_received-poitem_qty_returned))) \n THEN TEXT()\n WHEN(poitem_status='O') THEN TEXT()\n ELSE poitem_status\n END AS f_status\n-- End Report formatting\n FROM vendinfo, poitem,\n\n recv,\n\n pohead LEFT OUTER JOIN whsinfo ON (pohead_warehous_id=warehous_id)\n WHERE ((poitem_pohead_id=pohead_id)\n AND (pohead_vend_id=vend_id)\n\n AND (recv_itemsite_id=poitem_itemsite_id)\n AND (recv_order_number=pohead_number)\n AND (date(recv_date) BETWEEN AND )\n AND (recv_order_type='PO')\n\n AND (poitem_duedate BETWEEN AND )\n\n AND (pohead_orderdate BETWEEN AND )\n\n\n AND (vend_id=)\n\n AND (vend_vendtype_id=)\n\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ )))\n\n\n AND (pohead_warehous_id=)\n\n\n AND (poitem_status!='C')\n\n\n AND (pohead_agent_username=)\n\n\n AND ((poitem_vend_item_descrip ~* )\n OR (poitem_itemsite_id IN (\n SELECT itemsite_id\n FROM itemsite, item\n WHERE ((itemsite_item_id=item_id)\n AND ((item_descrip1 ~* )\n OR (item_descrip2 ~* )))\n )))\n\n\n)\nGROUP BY pohead_id, pohead_number, warehous_code,\n poitem_status, pohead_orderdate,\n\n vend_name \n\n vend_number\n\nORDER BY\n\n minDueDate\n\n sortDate\n;\n admin 2013-07-26 0 340 qoh detail Quantity on Hand By Location Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: qoh\n-- Name: detail\n-- Notes: \n-- Quantity on Hand By Location\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT itemloc_id, warehous_code, item_number,\n f_descrip, f_lotserial, uom_name,\n qoh, reservedqty,\n 'qty' AS qoh_xtnumericrole,\n 'qty' AS reservedqty_xtnumericrole,\n level AS xtindentrole\nFROM (\n SELECT itemloc_id, 0 AS level, item_number AS sortkey, warehous_code, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS f_descrip,\n formatlotserialnumber(itemloc_ls_id) AS f_lotserial, uom_name,\n itemloc_qty AS qoh,\n \n qtyReservedLocation(itemloc_id) AS reservedqty\n \n 0 AS reservedqty\n \n FROM itemloc, itemsite, whsinfo, item, uom\n WHERE ((itemloc_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemloc_location_id=))\n UNION\n SELECT -1 AS itemloc_id, 0 AS level, item_number AS sortkey, warehous_code, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS f_descrip,\n AS f_lotserial, uom_name,\n itemsite_qtyonhand AS qoh,\n 0 AS reservedqty\n FROM itemsite, whsinfo, item, uom\n WHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (NOT itemsite_loccntrl)\n AND (itemsite_location_id=))\n \n UNION\n SELECT itemloc_id, 1 AS level, item_number AS sortkey, '' AS warehous_code, '' AS item_number,\n (itemlocrsrv_source || '-' || formatSOItemNumber(itemlocrsrv_source_id)) AS f_descrip,\n '' AS f_lotserial, '' AS uom_name,\n NULL AS qoh,\n itemlocrsrv_qty AS reservedqty\n FROM itemlocrsrv, itemloc, itemsite, item\n WHERE ((itemlocrsrv_itemloc_id=itemloc_id)\n AND (itemsite_id=itemloc_itemsite_id)\n AND(item_id=itemsite_item_id)\n AND(itemloc_location_id=))\n \n ) AS data\nORDER BY\n sortkey, itemloc_id, level;\n\n\nSELECT forwardupdateinvbalance(invbal_id)\nFROM (\n SELECT DISTINCT ON (itemsite_id) invbal_id\n FROM invbal, itemsite, item, whsinfo, classcode, uom, costcat, period\n WHERE ((invbal_dirty)\n AND (invbal_period_id=period_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_active)\n AND (item_inv_uom_id=uom_id)\n AND (item_classcode_id=classcode_id)\n AND (itemsite_costcat_id=costcat_id)\n \n AND (itemsite_item_id=)\n \n \n AND (classcode_id=)\n \n \n AND (classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE classcode_code ~ ))\n \n \n AND (costcat_id=)\n \n \n AND (costcat_id IN (SELECT costcat_id\n FROM costcat\n WHERE costcat_code ~ ))\n \n \n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem\n WHERE (itemgrpitem_itemgrp_id=)))\n \n \n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ((itemgrpitem_itemgrp_id=itemgrp_id)\n AND (itemgrp_name ~ ))))\n \n \n AND (itemsite_qtyonhand > 0)\n \n AND (itemsite_qtyonhand < 0)\n \n \n AND (itemsite_warehous_id=)\n \n )\n ORDER BY itemsite_id, period_start\n ) AS data\n;\n\n-- Quantity on Hand\nSELECT itemsite_id, detail,warehous_code,\n classcode_code, item_number, uom_name,\n costcat_code,\n item_descrip1, item_descrip2,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n defaultlocation,\n reorderlevel, formatQty(reorderlevel) AS f_reorderlevel,\n qoh, formatQty(qoh) AS f_qoh,\n nnqoh, formatQty(nnqoh) AS f_nnqoh,\n CASE WHEN (itemsite_loccntrl) THEN nnqoh END AS f_nnqoh,\n cost, (cost * qoh) AS value,\n CASE WHEN (itemsite_loccntrl) THEN (cost * nnqoh) END AS nnvalue,\n CASE WHEN(itemsite_costmethod='A') THEN 'Average'\n WHEN(itemsite_costmethod='S') THEN 'Standard'\n WHEN(itemsite_costmethod='J') THEN 'Job'\n WHEN(itemsite_costmethod='N') THEN 'None'\n ELSE 'UNKNOWN'\n END AS costmethod,\n \n formatMoney(cost) AS f_cost, (cost * qoh) AS f_value,\n CASE WHEN (itemsite_loccntrl) THEN (cost * nnqoh) END AS f_nnvalue,\n CASE WHEN(itemsite_costmethod='A') THEN 'Average'\n WHEN(itemsite_costmethod='S') THEN 'Standard'\n WHEN(itemsite_costmethod='J') THEN 'Job'\n WHEN(itemsite_costmethod='N') THEN 'None'\n ELSE 'UNKNOWN'\n END AS f_costmethod,\n \n 'qty' AS reorderlevel_xtnumericrole,\n 'qty' AS qoh_xtnumericrole,\n 'qty' AS f_nnqoh_xtnumericrole,\n 0 AS qoh_xttotalrole,\n 0 AS nnqoh_xttotalrole,\n 'cost' AS cost_xtnumericrole,\n 'curr' AS value_xtnumericrole,\n 'curr' AS nnvalue_xtnumericrole,\n 0 AS value_xttotalrole,\n 0 AS nnvalue_xttotalrole,\n AS nnqoh_xtnullrole,\n AS nnvalue_xtnullrole,\n CASE WHEN (qoh < 0) THEN 'error' END AS qoh_qtforegroundrole,\n CASE WHEN (reorderlevel > qoh) THEN 'warning' END AS qoh_qtforegroundrole\nFROM (\n SELECT itemsite_id, itemsite_loccntrl, itemsite_costmethod,\n ((itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S')) ) AS detail,\n classcode_code, item_number, uom_name, item_descrip1, item_descrip2,\n costcat_code, \n CASE WHEN (NOT useDefaultLocation(itemsite_id)) THEN \n ELSE defaultLocationName(itemsite_id)\n END AS defaultlocation,\n warehous_code,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel,\n \n COALESCE(invbal_qoh_ending,0) AS qoh,\n COALESCE(invbal_nn_ending,0) AS nnqoh,\n \n itemsite_qtyonhand AS qoh,\n itemsite_nnqoh AS nnqoh,\n \n \n stdcost(item_id) AS cost\n \n actcost(item_id) AS cost\n \n \n COALESCE((invbal_value_ending / CASE WHEN(invbal_qoh_ending=0) THEN 1\n ELSE invbal_qoh_ending END),0) AS cost\n \n (itemsite_value / CASE WHEN((itemsite_qtyonhand + itemsite_nnqoh)=0) THEN 1\n ELSE (itemsite_qtyonhand + itemsite_nnqoh) END) AS cost\n \n \n FROM item, whsinfo, classcode, uom, costcat, itemsite\n \n LEFT OUTER JOIN invbal ON ((itemsite_id=invbal_itemsite_id)\n AND (invbal_period_id=))\n \n WHERE ((itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_active)\n AND (item_inv_uom_id=uom_id)\n AND (item_classcode_id=classcode_id)\n AND (itemsite_costcat_id=costcat_id)\n \n AND (itemsite_item_id=)\n \n \n AND (classcode_id=)\n \n \n AND (classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE classcode_code ~ ))\n \n \n AND (costcat_id=)\n \n \n AND (costcat_id IN (SELECT costcat_id\n FROM costcat\n WHERE costcat_code ~ ))\n \n \n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem\n WHERE (itemgrpitem_itemgrp_id=)))\n \n \n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ((itemgrpitem_itemgrp_id=itemgrp_id)\n AND (itemgrp_name ~ ))))\n \n \n \n AND (COALESCE(invbal_qoh_ending,0) > 0)\n \n AND (itemsite_qtyonhand > 0)\n \n \n \n AND (COALESCE(invbal_qoh_ending,0) < 0)\n \n AND (itemsite_qtyonhand < 0)\n \n \n \n AND (itemsite_warehous_id=)\n \n )\n ) AS data\nORDER BY warehous_code, item_number;\n\n admin 2013-07-26 0 42 quoteItems detail used by dspQuotesByItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: quoteItems\n-- Name: detail\n-- Notes: used by dspQuotesByItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT quitem_id, quhead_id,\n quitem.*, quhead.*,\n COALESCE(cust_number, prospect_number) AS cust_number,\n COALESCE(cust_name, prospect_name) AS cust_name,\n 'qty' AS quitem_qtyord_xtnumericrole\nFROM quitem JOIN quhead ON (quhead_id=quitem_quhead_id)\n LEFT OUTER JOIN custinfo ON (cust_id=quhead_cust_id)\n LEFT OUTER JOIN prospect ON (prospect_id=quhead_cust_id)\n JOIN itemsite ON (itemsite_id=quitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\nWHERE ( (1=1)\n\n AND (itemsite_item_id=)\n\n\n AND (quhead_status IN ('C','O'))\n\n AND (quhead_status NOT IN ('C','X'))\n\n\n AND (quhead_quotedate BETWEEN AND )\n\n )\nORDER BY quhead_number;\n\n admin 2013-07-26 0 44 receipt detail used by enterPoReceipt Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: receipt\n-- Name: detail\n-- Notes: used by enterPoReceipt\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT poitem_id AS orderitem_id, COALESCE(poitem_itemsite_id,-1) AS itemsite_id, poitem_linenumber AS linenumber,\n poitem_duedate AS duedate,\n COALESCE(item_number, ) AS item_number,\n CASE WHEN (LENGTH(TRIM(BOTH ' ' FROM poitem_vend_item_descrip)) <= 0) THEN\n (item_descrip1 || ' ' || item_descrip2)\n ELSE poitem_vend_item_descrip\n END AS itemdescription,\n COALESCE(uom_name, ) AS inv_uom,\n warehous_code,\n poitem_vend_item_number AS vend_item_number,\n poitem_vend_uom AS vend_uom,\n poitem_manuf_name AS manuf_name,\n poitem_manuf_item_number AS manuf_item_number,\n poitem_qty_ordered AS qty_ordered,\n poitem_qty_received AS qty_received,\n poitem_qty_returned AS qty_returned,\n qtyToReceive(, poitem_id) AS qty_toreceive,\n 'qty' AS qty_ordered_xtnumericrole,\n 'qty' AS qty_received_xtnumericrole,\n 'qty' AS qty_returned_xtnumericrole,\n 'qty' AS qty_toreceive_xtnumericrole\nFROM poitem \n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) \n\n LEFT OUTER JOIN usrsite ON (itemsite_warehous_id=usrsite_warehous_id) \n\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id) \n LEFT OUTER JOIN uom ON (item_inv_uom_id=uom_id)\n LEFT OUTER JOIN whsinfo ON (itemsite_warehous_id=warehous_id)\n LEFT OUTER JOIN itemsrc ON (itemsrc_id=poitem_itemsrc_id)\nWHERE ( (poitem_status <> 'C')\n\n AND (usrsite_username=getEffectiveXtUser()) \n\n\n AND ( (item_number=) OR\n (item_upccode=) OR \n (poitem_vend_item_number=) OR \n (poitem_manuf_item_number=) OR \n (COALESCE(itemsrc_upccode, '')=) ) \n\n AND (poitem_pohead_id=) )\nORDER BY poitem_linenumber;\n\nSELECT raitem_id AS orderitem_id, itemsite_id, raitem_linenumber AS linenumber,\n rahead_expiredate AS duedate,\n COALESCE(item_number, ) AS item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n COALESCE(iu.uom_name, ) AS inv_uom,\n warehous_code,\n '' AS vend_item_number,\n ru.uom_name AS vend_uom,\n '' AS manuf_name,\n '' AS manuf_item_number,\n raitem_qtyauthorized AS qty_ordered,\n raitem_qtyreceived AS qty_received,\n 0 AS qty_returned,\n qtyToReceive(, raitem_id) AS qty_toreceive,\n 'qty' AS qty_ordered_xtnumericrole,\n 'qty' AS qty_received_xtnumericrole,\n 'qty' AS qty_returned_xtnumericrole,\n 'qty' AS qty_toreceive_xtnumericrole\n\nFROM rahead, raitem \n LEFT OUTER JOIN \n ( itemsite \n\n JOIN usrsite ON (itemsite_warehous_id=usrsite_warehous_id) \n\n JOIN item ON (itemsite_item_id=item_id) \n JOIN uom iu ON (item_inv_uom_id=uom_id)\n JOIN whsinfo ON (itemsite_warehous_id=warehous_id)\n ) ON (raitem_itemsite_id=itemsite_id), uom ru\nWHERE ( (raitem_status <> 'C')\n AND (item_type <> 'K')\n AND (raitem_qtyauthorized > 0)\n AND (raitem_disposition IN ('R','P','V'))\n AND (raitem_rahead_id=rahead_id)\n AND (raitem_qty_uom_id=ru.uom_id)\n\n AND (usrsite_username=getEffectiveXtUser()) \n\n\n AND ( (item_number=) OR\n (item_upccode=) )\n\n AND (rahead_id=) )\nORDER BY raitem_linenumber;\n\nSELECT toitem_id AS orderitem_id, itemsite_id, toitem_linenumber AS linenumber,\n toitem_duedate AS duedate,\n COALESCE(item_number, ) AS item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n COALESCE(uom_name, ) AS inv_uom,\n warehous_code,\n '' AS vend_item_number,\n toitem_uom AS vend_uom,\n '' AS manuf_name,\n '' AS manuf_item_number,\n toitem_qty_ordered AS qty_ordered,\n toitem_qty_received AS qty_received,\n 0 AS qty_returned,\n qtyToReceive(, toitem_id) AS qty_toreceive,\n 'qty' AS qty_ordered_xtnumericrole,\n 'qty' AS qty_received_xtnumericrole,\n 'qty' AS qty_returned_xtnumericrole,\n 'qty' AS qty_toreceive_xtnumericrole\nFROM tohead, itemsite\n\n JOIN usrsite ON (itemsite_warehous_id=usrsite_warehous_id) \n\n, whsinfo, toitem, item JOIN uom ON (item_inv_uom_id=uom_id)\nWHERE ((toitem_item_id=item_id)\n AND (tohead_id=toitem_tohead_id)\n AND (tohead_dest_warehous_id=itemsite_warehous_id)\n AND (tohead_dest_warehous_id=warehous_id)\n AND (toitem_item_id=itemsite_item_id)\n AND (toitem_status NOT IN ('C','X'))\n AND (toitem_qty_shipped > toitem_qty_received)\n\n AND (usrsite_username=getEffectiveXtUser()) \n\n\n AND ( (item_number=) OR\n (item_upccode=) )\n\n AND (toitem_tohead_id=) )\nORDER BY toitem_linenumber;\n\n admin 2013-07-26 0 45 receipt receiveAll used by enterPoReceipt, returnAuthorization, shipOrder Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: receipt\n-- Name: receiveAll\n-- Notes: used by enterPoReceipt, returnAuthorization, shipOrder\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\n SELECT enterReceipt(,\n shipitem_orderitem_id,\n shipitem_qty,\n (orderitem_freight - orderitem_freight_received),\n '',\n orderitem_freight_curr_id,\n CURRENT_DATE) AS result\n FROM shipitem, orderitemData(,\n ,\n NULL) AS orderitem\n LEFT OUTER JOIN recv ON ((recv_orderitem_id=orderitem_id)\n AND (recv_order_type=orderitem_orderhead_type))\n \n LEFT OUTER JOIN raitem ON ((raitem_id=orderitem_id)\n AND ('RA' = orderitem_orderhead_type))\n \n WHERE ( (shipitem_shiphead_id=)\n AND (shipitem_orderitem_id=orderitem_id)\n \n AND ((orderitem_orderhead_type != 'RA') OR (raitem_disposition IN (NULL,'R','V','P')))\n \n )\n\n\n SELECT enterReceipt(orderitem_orderhead_type,\n orderitem_id,\n\n (orderitem_qty_shipped - orderitem_qty_received),\n\n (orderitem_qty_ordered - orderitem_qty_received),\n\n (orderitem_freight - orderitem_freight_received),\n '',\n orderitem_freight_curr_id,\n CURRENT_DATE) AS result\n FROM orderitemData(,\n ,\n NULL) AS orderitem\n LEFT OUTER JOIN recv ON ((recv_orderitem_id=orderitem_id)\n AND (recv_order_type=orderitem_orderhead_type))\n\n LEFT OUTER JOIN raitem ON ((raitem_id=orderitem_id)\n AND ('RA' = orderitem_orderhead_type))\n\n WHERE (orderitem_status NOT IN ('C', 'X'))\n\n AND (orderitem_qty_shipped > orderitem_qty_received)\n\n\n AND (((orderitem_orderhead_type != 'RA') OR (raitem_disposition IN (NULL,'R','V','P'))))\n\n\n admin 2013-07-26 0 46 receivings detail used by dspPoItemReceivingsByDate, dspPoItemReceivingsByItem, dspPoItemReceivingsByVendor Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: receivings\n-- Name: detail\n-- Notes: used by dspPoItemReceivingsByDate, dspPoItemReceivingsByItem, dspPoItemReceivingsByVendor\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT recv_id, 1 AS altid, recv_order_number AS ponumber,\n vend_name,\n recv_duedate AS duedate,\n recv_date AS recvdate,\n recv_vend_item_number AS itemnumber,\n recv_vend_item_descrip AS itemdescrip,\n COALESCE(item_number,\n ( || recv_vend_item_number)) AS venditemnumber,\n COALESCE(item_descrip1, recv_vend_item_descrip) AS venditemdescrip,\n CASE WHEN (recv_vohead_id IS NOT NULL) THEN\n \n ELSE \n END AS sense,\n recv_qty AS qty,\n currToBase(recv_purchcost_curr_id, recv_purchcost, CAST(recv_date AS DATE)) AS purchcost,\n CASE WHEN (recv_qty > 0) THEN\n COALESCE(recv_value,0) / recv_qty\n ELSE 0 END AS recvcost,\n recv_value AS value,\n recv_invoiced AS invoiced,\n recv_date AS sortdate,\n\n formatDate(recv_duedate) AS f_duedate,\n formatDate(recv_date) AS f_recvdate,\n formatQty(recv_qty) AS f_qty,\n \n formatCost(currToBase(recv_purchcost_curr_id, recv_purchcost, CAST(recv_date AS DATE))) AS f_purchcost,\n formatCost(CASE WHEN (recv_qty > 0) THEN COALESCE(recv_value,0) / recv_qty\n ELSE 0\n END) AS f_recvcost,\n formatMoney(recv_value) AS f_value,\n \n NULL AS f_purchcost,\n NULL AS f_recvcost,\n NULL AS f_value,\n \n\n 'qty' AS qty_xtnumericrole,\n 'cost' AS purchcost_xtnumericrole,\n 'cost' AS recvcost_xtnumericrole,\n 'curr' AS value_xtnumericrole,\n AS duedate_xtnullrole,\n AS purchcost_xtnullrole,\n AS recvcost_xtnullrole\nFROM vendinfo, recv LEFT OUTER JOIN\n (itemsite JOIN\n item ON (itemsite_item_id=item_id)) ON (recv_itemsite_id=itemsite_id)\nWHERE ( (recv_vend_id=vend_id)\n AND (recv_order_type='PO')\n AND (recv_posted)\n AND (DATE(recv_date) BETWEEN AND )\n\n AND (vend_id=)\n\n\n AND (itemsite_item_id=)\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (recv_agent_username=)\n\n\n AND (recv_vohead_id IS NOT NULL)\n AND (recv_invoiced)\n\n)\nUNION\nSELECT poreject_id, 2, poreject_ponumber,\n vend_name,\n NULL,\n poreject_date,\n poreject_vend_item_number,\n poreject_vend_item_descrip,\n COALESCE(item_number,\n ( || poreject_vend_item_number)),\n COALESCE(item_descrip1, poreject_vend_item_descrip),\n ,\n poreject_qty,\n NULL,\n NULL,\n poreject_value,\n poreject_invoiced,\n poreject_date,\n\n NULL AS f_duedate,\n formatDate(poreject_date) AS f_recvdate,\n formatQty(poreject_qty) AS f_qty,\n NULL AS f_purchcost,\n NULL AS f_recvcost,\n formatMoney(poreject_value) AS f_value,\n\n 'qty',\n 'cost',\n 'cost',\n 'curr',\n AS duedate_xtnullrole,\n AS purchcost_xtnullrole,\n AS recvcost_xtnullrole\nFROM vendinfo, poreject LEFT OUTER JOIN\n (itemsite JOIN\n item ON (itemsite_item_id=item_id)) ON (poreject_itemsite_id=itemsite_id)\nWHERE ( (poreject_vend_id=vend_id)\n AND (poreject_posted)\n AND (DATE(poreject_date) BETWEEN AND )\n\n AND (vend_id=)\n\n\n AND (itemsite_item_id=)\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (poreject_agent_username=)\n\n\n AND (poreject_vohead_id IS NOT NULL)\n AND (poreject_invoiced)\n\n)\nORDER BY sortdate DESC;\n admin 2013-07-26 0 341 reorderExceptionsByPlannerCode detail used by dspReorderExceptionsByPlannerCode Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: reorderExceptionsByPlannerCode\n-- Name: detail\n-- Notes: used by dspReorderExceptionsByPlannerCode\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, itemtype, warehous_code, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n reorderdate, reorderlevel,\n (itemsite_qtyonhand - qtyAllocated(itemsite_id, reorderdate) +\n qtyOrdered(itemsite_id, reorderdate)) AS projavail,\n 'qty' AS reorderlevel_xtnumericrole,\n 'qty' AS projavail_xtnumericrole\nFROM (SELECT itemsite_id,\n CASE WHEN (item_type IN ('M', 'B', 'T')) THEN 1\n WHEN (item_type IN ('P', 'O')) THEN 2\n ELSE 3\n END AS itemtype,\n warehous_code, item_number, item_descrip1,\n item_descrip2,\n reorderDate(itemsite_id,\n ,\n )\n AS reorderdate,\n itemsite_qtyonhand, reorderlevel\n FROM (SELECT itemsite_id, itemsite_item_id,\n itemsite_warehous_id, itemsite_qtyonhand,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel\n ELSE 0.0\n END AS reorderlevel\n FROM itemsite\n WHERE ((true)\n \n AND (itemsite_warehous_id=)\n \n \n AND (itemsite_plancode_id=)\n \n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n \n )\n ) AS itemsitedata, item, whsinfo\n WHERE ((itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id))\n ) AS data\nWHERE (reorderdate IS NOT NULL)\nORDER BY reorderdate, item_number;\n admin 2013-07-26 0 544 reports detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: reports\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\n SELECT report_id, report_name,\n firstline(report_descrip) AS report_descrip, report_grade,\n CASE nspname WHEN 'public' THEN '' ELSE nspname END AS pkgname,\n CASE nspname WHEN 'public' THEN 0\n ELSE 1 END AS xtindentrole,\n report_descrip AS report_descrip_qttooltiprole\n FROM report\n JOIN pg_class ON (report.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n UNION\n SELECT -1, pkghead_name,\n firstline(pkghead_descrip), NULL,\n pkghead_name, 0, pkghead_descrip\n FROM report, pg_class, pg_namespace\n RIGHT OUTER JOIN pkghead ON (nspname=pkghead_name)\n WHERE ((report.tableoid=pg_class.oid)\n AND (relnamespace=pg_namespace.oid))\n ORDER BY pkgname, xtindentrole, report_name,\n report_grade DESC, report_id;\n\n SELECT report_id, report_name,\n firstline(report_descrip) AS report_descrip,\n report_grade,\n CASE nspname WHEN 'public' THEN '' ELSE nspname END AS pkgname,\n report_descrip AS report_descrip_qttooltiprole\n FROM report\n JOIN pg_class ON (report.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n ORDER BY report_name,\n report_grade DESC, report_id;\n\n admin 2013-07-26 0 47 reservations detail used by dspReservations Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: reservations\n-- Name: detail\n-- Notes: used by dspReservations\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT source_id, order_number, scheddate,\n totalqty, relievedqty, reservedqty, balanceqty,\n CASE WHEN (scheddate < CURRENT_DATE) THEN 'error' END AS scheddate_qtforegroundrold,\n 'qty' AS totalqty_xtnumericrole,\n 'qty' AS relievedqty_xtnumericrole,\n 'qty' AS reservedqty_xtnumericrole,\n 'qty' AS balanceqty_xtnumericrole,\n 0 AS balanceqty_xtrunningrole,\n level AS xtindentrole\nFROM (\nSELECT coitem_scheddate AS sortkey, 0 AS level, coitem_id AS source_id,\n formatSoNumber(coitem_id) AS order_number,\n (coitem_qtyord * coitem_qty_invuomratio) AS totalqty,\n ((coitem_qtyshipped + qtyAtShipping(coitem_id) - coitem_qtyreturned) * coitem_qty_invuomratio) as relievedqty,\n (coitem_qtyreserved * coitem_qty_invuomratio) AS reservedqty,\n (coitem_qtyreserved * coitem_qty_invuomratio) AS balanceqty,\n coitem_scheddate AS scheddate\nFROM cohead, coitem, itemsite, item \nWHERE((coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_qtyreserved > 0)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=))\nUNION\nSELECT coitem_scheddate AS sortkey, 1 AS level, coitem_id AS source_id,\n (formatLocationName(itemloc_location_id) || ' ' || formatLotSerialNumber(itemloc_ls_id)) AS order_number,\n NULL AS totalqty, NULL AS relievedqty,\n (itemlocrsrv_qty * coitem_qty_invuomratio) AS reservedqty,\n NULL AS balanceqty, NULL AS scheddate\nFROM itemlocrsrv, itemloc, coitem, itemsite\nWHERE ( (itemloc_id=itemlocrsrv_itemloc_id)\n AND (coitem_id=itemlocrsrv_source_id)\n AND (itemsite_id=coitem_itemsite_id)\n AND (itemsite_warehous_id=)\n AND (itemsite_item_id=) )\n ) AS data\nORDER BY sortkey, source_id, level;\n admin 2013-07-26 0 69 returnAuthorizations detail Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: returnAuthorizations\n-- Name: detail\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT rahead_id, rahead_number, rahead_billtoname,\n rahead_authdate,rahead_expiredate,\n COALESCE(cust_number, 'Undefined') AS custnumber,\n CASE\n WHEN rahead_disposition = 'C' THEN\n \n WHEN rahead_disposition = 'R' THEN\n \n WHEN rahead_disposition = 'P' THEN\n \n WHEN rahead_disposition = 'V' THEN\n \n WHEN rahead_disposition = 'M' THEN\n \n END AS disposition,\n formatDate(rahead_authdate) AS f_authorized,\n formatDate(rahead_expiredate) AS f_expires,\n CASE WHEN (rahead_expiredate < current_date) THEN\n 'error'\n END AS rahead_expiredate_qtforegroundrole\n FROM rahead LEFT OUTER JOIN custinfo ON (rahead_cust_id=cust_id)\n \n JOIN raitem ON (raitem_rahead_id=rahead_id) \n JOIN itemsite ON (raitem_itemsite_id=itemsite_id) \n JOIN site() ON (itemsite_warehous_id=warehous_id) \n \n LEFT OUTER JOIN raitem ON (raitem_rahead_id=rahead_id) \n LEFT OUTER JOIN itemsite ON (raitem_itemsite_id=itemsite_id) \n LEFT OUTER JOIN whsinfo ON (itemsite_warehous_id=warehous_id) \n \n WHERE ((true)\n \n AND ((raitem_status = 'O') OR (raitem_status IS NULL)) \n\n \n AND (raitem_qtyauthorized > 0) \n\n\n AND (COALESCE(rahead_expiredate,CURRENT_DATE) >= CURRENT_DATE)\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (rahead_cust_id=)\n\n )\n GROUP BY cust_number,rahead_id,rahead_number,rahead_authdate,rahead_expiredate,\n rahead_billtoname,rahead_disposition\n ORDER BY rahead_number\n admin 2013-07-26 0 49 salesHistory detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: salesHistory\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cohist.*,\n CASE WHEN (cohist_invcnumber='-1') THEN \n ELSE cohist_invcnumber\n END AS invoicenumber,\n cust_number, cust_name, salesrep_name,\n saletype_code, shipzone_name,\n item_id, COALESCE(item_number, cohist_misc_descrip) AS item_number,\n item_descrip1, (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n warehous_code,\n currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate) AS baseunitprice,\n round((cohist_qtyshipped * cohist_unitprice), 2) AS extprice,\n round((cohist_qtyshipped * currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate)), 2) AS baseextprice,\n round((cohist_qtyshipped * cohist_unitcost), 4) AS extcost,\n currtobase(cohist_curr_id, cohist_commission, cohist_invcdate) AS basecommission,\n\n formatDate(cohist_invcdate) AS f_invcdate,\n formatQty(cohist_qtyshipped) AS f_qtyshipped,\n formatBoolYN(cohist_commissionpaid) AS f_commissionpaid,\n formatSalesPrice(currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate)) AS f_baseunitprice,\n formatMoney(round((cohist_qtyshipped * cohist_unitprice), 2)) AS f_extprice,\n formatMoney(round((cohist_qtyshipped * currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate)), 2)) AS f_baseextprice,\n formatMoney(round((cohist_qtyshipped * cohist_unitcost), 4)) AS f_extcost,\n formatMoney(currtobase(cohist_curr_id, cohist_commission, cohist_invcdate)) AS f_basecommission,\n\n currConcat(cohist_curr_id) AS currAbbr,\n AS cohist_invcdate_xtnullrole,\n 'qty' AS cohist_qtyshipped_xtnumericrole,\n 'salesprice' AS cohist_unitprice_xtnumericrole,\n 'salesprice' AS baseunitprice_xtnumericrole,\n 'curr' AS extprice_xtnumericrole,\n 'curr' AS baseextprice_xtnumericrole,\n 'cost' AS cohist_unitcost_xtnumericrole,\n 'curr' AS extcost_xtnumericrole,\n 'curr' AS cohist_commission_xtnumericrole,\n 'curr' AS basecommission_xtnumericrole,\n 0 AS cohist_qtyshipped_xttotalrole,\n 0 AS baseextprice_xttotalrole,\n 0 AS extcost_xttotalrole,\n 0 AS basecommission_xttotalrole\n FROM cohist JOIN custinfo ON (cust_id=cohist_cust_id)\n JOIN salesrep ON (salesrep_id=cohist_salesrep_id)\n LEFT OUTER JOIN saletype ON (saletype_id=cohist_saletype_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=cohist_shipzone_id)\n\n LEFT OUTER JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n LEFT OUTER JOIN site() ON (warehous_id=itemsite_warehous_id)\n LEFT OUTER JOIN item ON (item_id=itemsite_item_id)\n\n JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n JOIN item ON (item_id=itemsite_item_id)\n\n\n JOIN cohead ON (cohead_number=cohist_ordernumber)\n\nWHERE ( (true)\n\n AND (COALESCE(cohist_misc_type, '') <> 'F')\n AND (COALESCE(cohist_misc_type, '') <> 'T')\n\n\n AND (cohist_invcdate >= )\n\n\n AND (cohist_invcdate <= )\n\n\n AND (cohist_shipdate >= )\n\n\n AND (cohist_shipdate <= )\n\n\n AND (cohist_salesrep_id=)\n\n\n AND (cohist_shipto_id=)\n\n\n AND (UPPER(cohist_billtoname) ~ UPPER())\n\n\n AND (cohist_cust_id=)\n\n\n AND (cust_custtype_id=)\n\n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ )))\n\n\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n\n\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=)))\n\n\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ ) )) )\n\n\n\n AND (itemsite_item_id=)\n\n\n AND (item_prodcat_id=)\n\n\n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ )))\n\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (cohist_shipzone_id=)\n\n\n AND (cohist_saletype_id=)\n\n\n AND (cohead_id=)\n\n )\nORDER BY cohist_invcdate, item_number;\n\n admin 2013-07-26 0 50 salesOrderItems detail used by dspBacklogByCustomer, dspBacklogByItem, dspBacklogByParameterList, dspBacklogBySalesOrder, dspBookingsByCustomer, dspBookingsByCustomerGroup, dspBookingsByItem, dspBookingsByProductCategory, dspBookingsBySalesRep, dspBookingsByShipTo, dspSalesOrdersByItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: salesOrderItems\n-- Name: detail\n-- Notes: used by dspBacklogByCustomer, dspBacklogByItem, dspBacklogByParameterList, dspBacklogBySalesOrder, dspBookingsByCustomer, dspBookingsByCustomerGroup, dspBookingsByItem, dspBookingsByProductCategory, dspBookingsBySalesRep, dspBookingsByShipTo, dspSalesOrdersByItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n cohead_id, coitem_id, *, currconcat(cohead_curr_id) AS currAbbr,\n\n CASE WHEN xtindentrole = 0 THEN cust_name\n END AS item_number_qtdisplayrole,\n\n-- no alterations to displayroles\n\n CASE WHEN xtindentrole = 0 THEN cohead_number\n END AS coitem_linenumber_qtdisplayrole,\n CASE WHEN xtindentrole = 0 THEN cust_name\n END AS item_number_qtdisplayrole,\n \n 'qty' AS coitem_qtyord_xtnumericrole,\n 'qty' AS coitem_qtyshipped_xtnumericrole,\n 'qty' AS coitem_qtyreturned_xtnumericrole,\n 'qty' AS qtyatshipping_xtnumericrole,\n 'qty' AS qtybalance_xtnumericrole,\n 'qty' AS qtyavailable_xtnumericrole,\n 'salesprice' AS coitem_price_xtnumericrole,\n 'salesprice' AS baseunitprice_xtnumericrole,\n 'curr' AS extprice_xtnumericrole,\n 'curr' AS baseextprice_xtnumericrole,\n 'curr' AS extpricebalance_xtnumericrole,\n 'curr' AS baseextpricebalance_xtnumericrole,\n 0 AS coitem_qtyord_xttotalrole,\n 0 AS coitem_qtyshipped_xttotalrole,\n 0 AS coitem_qtyreturned_xttotalrole,\n 0 AS qtybalance_xttotalrole,\n 0 AS baseextprice_xttotalrole,\n 0 AS baseextpricebalance_xttotalrole\nFROM (\n -- get cohead info\n \n \n SELECT \n 0 AS xtindentrole,\n -- dummy coitem record\n -1 AS coitem_id, NULL::INTEGER AS coitem_cohead_id,\n -1 AS coitem_linenumber,NULL::INTEGER AS coitem_itemsite_id,\n NULL::TEXT AS coitem_status, NULL::DATE AS coitem_scheddate,\n getSoSchedDate(cohead_id) AS sort_scheddate,\n NULL::DATE AS coitem_promdate, NULL::NUMERIC AS coitem_qtyord,\n NULL::NUMERIC AS coitem_unitcost, NULL::NUMERIC AS coitem_price,\n NULL::NUMERIC AS coitem_custprice, NULL::NUMERIC AS coitem_qtyshipped,\n NULL::INTEGER AS coitem_order_id, NULL::TEXT AS coitem_memo,\n NULL::BOOLEAN AS coitem_imported, NULL::NUMERIC AS coitem_qtyreturned,\n NULL::TIMESTAMP AS coitem_closedate,\n NULL::TEXT AS coitem_custpn, NULL::TEXT AS coitem_order_type,\n NULL::TEXT AS coitem_close_username,\n NULL::TIMESTAMP AS coitem_lastupdated,\n NULL::INTEGER AS coitem_substitute_item_id,\n NULL::TIMESTAMP AS coitem_created, NULL::TEXT AS coitem_creator,\n NULL::NUMERIC AS coitem_prcost,\n NULL::INTEGER AS coitem_qty_uom_id,\n NULL::NUMERIC AS coitem_qty_invuomratio,\n NULL::INTEGER AS coitem_price_uom_id,\n NULL::NUMERIC AS coitem_price_invuomratio,\n NULL::BOOLEAN AS coitem_warranty,\n NULL::INTEGER AS coitem_cos_accnt_id,\n NULL::NUMERIC AS coitem_qtyreserved,\n NULL::INTEGER AS coitem_subnumber,\n cohead.*,\n cust_number, cust_name,\n NULL::TEXT AS item_number, NULL::TEXT AS item_descrip1,\n NULL::TEXT AS itemdescription,\n NULL::TEXT AS uom_name,\n NULL::TEXT AS warehous_code,\n NULL::NUMERIC AS qtyatshipping,\n NULL::NUMERIC AS qtyavailable,\n NULL::BOOLEAN AS stockout,\n NULL::BOOLEAN AS reorder,\n NULL::NUMERIC AS qtybalance,\n NULL::NUMERIC AS baseunitprice,\n NULL::NUMERIC AS extprice,\n NULL::NUMERIC AS baseextprice,\n NULL::NUMERIC AS extpricebalance,\n NULL::NUMERIC AS baseextpricebalance,\n NULL::TEXT AS qtyavailable_qtforegroundrole\n\n FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=coitem_qty_uom_id)\n WHERE ( (coitem_status<>'X')\n \n AND (coitem_cohead_id=)\n \n \n AND (coitem_status<>'C')\n \n \n \n AND (cohead_orderdate BETWEEN AND )\n \n AND (coitem_scheddate BETWEEN AND )\n \n \n\n \n AND (cohead_salesrep_id=)\n \n \n AND (cohead_shipto_id=)\n \n \n AND (cohead_cust_id=)\n \n AND (cust_custtype_id=)\n \n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ )))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=)))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ ) )) )\n \n\n \n AND (itemsite_item_id=)\n \n AND (item_prodcat_id=)\n \n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ )))\n \n\n \n AND (itemsite_warehous_id=)\n \n )\n\n UNION\n -- endif not exists "salesrep_id"\n -- endif not exists "item_id"\n -- endif not exists "cohead_id"\n\n SELECT \n 0\n 0\n 0\n 1 AS xtindentrole,\n coitem_id, coitem_cohead_id,\n coitem_linenumber,coitem_itemsite_id,\n coitem_status, coitem_scheddate,\n getSoSchedDate(cohead_id) AS sort_scheddate,\n coitem_promdate, coitem_qtyord,\n coitem_unitcost, coitem_price,\n coitem_custprice, coitem_qtyshipped,\n coitem_order_id, coitem_memo,\n coitem_imported, coitem_qtyreturned,\n coitem_closedate,\n coitem_custpn, coitem_order_type,\n coitem_close_username,\n coitem_lastupdated,\n coitem_substitute_item_id,\n coitem_created, coitem_creator,\n coitem_prcost,\n coitem_qty_uom_id,\n coitem_qty_invuomratio,\n coitem_price_uom_id,\n coitem_price_invuomratio,\n coitem_warranty,\n coitem_cos_accnt_id,\n coitem_qtyreserved,\n coitem_subnumber,\n cohead.*,\n cust_number, cust_name,\n item_number, item_descrip1, (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n uom_name,\n warehous_code,\n ( SELECT SUM(shipitem_qty)\n FROM shipitem JOIN shiphead ON ( (shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type='SO') AND (NOT shiphead_shipped) )\n WHERE (shipitem_orderitem_id=coitem_id) ) AS qtyatshipping,\n qtyAvailable(itemsite_id, coitem_scheddate) AS qtyavailable,\n (qtyAvailable(itemsite_id, coitem_scheddate) < 0.0) AS stockout,\n CASE WHEN (itemsite_useparams) THEN (qtyAvailable(itemsite_id, coitem_scheddate) <= itemsite_reorderlevel)\n ELSE (qtyAvailable(itemsite_id, coitem_scheddate) <= 0.0)\n END AS reorder,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS qtybalance,\n currtobase(cohead_curr_id, coitem_price, cohead_orderdate) AS baseunitprice,\n round((coitem_qtyord * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio), 2) AS extprice,\n round((coitem_qtyord * coitem_qty_invuomratio) *\n (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) AS baseextprice,\n round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio), 2) AS extpricebalance,\n round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) AS baseextpricebalance,\n CASE WHEN (qtyAvailable(itemsite_id, coitem_scheddate) < 0.0) THEN 'error'\n WHEN itemsite_useparams AND (qtyAvailable(itemsite_id, coitem_scheddate) <= itemsite_reorderlevel) THEN 'warning'\n WHEN NOT itemsite_useparams AND (qtyAvailable(itemsite_id, coitem_scheddate) <= 0.0) THEN 'warning'\n END AS qtyavailable_qtforegroundrole\n\n FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=coitem_qty_uom_id)\n WHERE ( (coitem_status<>'X')\n \n AND (coitem_cohead_id=)\n \n \n AND (coitem_status<>'C')\n \n \n \n AND (cohead_orderdate BETWEEN AND )\n \n AND (coitem_scheddate BETWEEN AND )\n \n \n\n \n AND (cohead_salesrep_id=)\n \n \n AND (cohead_shipto_id=)\n \n \n AND (cohead_cust_id=)\n \n AND (cust_custtype_id=)\n \n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ )))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=)))\n \n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ ) )) )\n \n\n \n AND (itemsite_item_id=)\n \n AND (item_prodcat_id=)\n \n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ )))\n \n\n \n AND (itemsite_warehous_id=)\n \n )\n\n) AS dummy\n\n\n ORDER BY sort_scheddate, cohead_number, coitem_linenumber\n\n ORDER BY cohead_orderdate, cohead_number, coitem_linenumber\n\n ORDER BY cohead_number, coitem_linenumber\n\n;\n admin 2013-07-26 0 509 salesOrderItems list used by salesOrder Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: salesOrderItems\n-- Name: list\n-- Notes: used by salesOrder\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT coitem_id, coitem_altid, groupby,\n coitem_linenumber, coitem_subnumber, f_linenumber,\n warehous_code, item_number, item_type, description,\n item_number_cust, item_descrip1_cust, item_descrip2_cust, item_barcode,\n enhanced_status, coitem_firm,\n qty_uom, price_uom, ship_uom,\n coitem_memo,\n-- always create formatted columns for scheduled reports\n formatDate(coitem_scheddate) AS f_scheddate,\n formatSalesPrice(coitem_price) AS f_price,\n formatSalesPrice(coitem_custprice) AS f_custprice,\n formatPrcnt(discountfromcust / 100) AS f_discountfromcust,\n formatQty(coitem_qtyord) AS f_qtyord, \n CASE WHEN (qtyshipped > 0.0) THEN formatQty(qtyshipped) ELSE NULL END AS f_qtyshipped,\n CASE WHEN (qtyshipped > 0.0) THEN formatQty(balance) ELSE NULL END AS f_balance,\n CASE WHEN (qtyatshipping > 0.0) THEN formatQty(qtyatshipping) ELSE NULL END AS f_qtyatshipping,\n formatMoney(extprice) AS f_extprice,\n CASE WHEN (extprice_shipped > 0.0) THEN formatMoney(extprice_shipped) ELSE NULL END AS f_extprice_shipped,\n-- end formatted columns\n coitem_scheddate, coitem_price, coitem_custprice, discountfromcust,\n coitem_qtyord, qtyshipped, balance, qtyatshipping,\n extprice, extprice_shipped,\n CASE WHEN (discountfromcust=100.0) THEN 'N/A' END AS discountfromcust_qtdisplayrole,\n 'qty' AS coitem_qtyord_xtnumericrole,\n 'qty' AS qtyshipped_xtnumericrole,\n 'qty' AS balance_xtnumericrole,\n 'qty' AS qtyatshipping_xtnumericrole,\n 'salesprice' AS coitem_price_xtnumericrole,\n 'salesprice' AS coitem_custprice_xtnumericrole,\n 'curr' AS extprice_xtnumericrole,\n 'curr' AS extprice_shipped_xtnumericrole,\n CASE WHEN fetchMetricBool('EnableSOShipping') AND\n coitem_scheddate > CURRENT_DATE AND\n (noNeg(coitem_qtyord) <> qtyAtShipping('SO', coitem_id)) THEN 'future'\n WHEN fetchMetricBool('EnableSOShipping') AND\n (noNeg(coitem_qtyord) <> qtyAtShipping('SO', coitem_id)) THEN 'expired'\n WHEN (coitem_status NOT IN ('C', 'X') AND\n EXISTS(SELECT coitem_id\n FROM coitem\n WHERE ((coitem_status='C')\n AND (coitem_cohead_id=)))) THEN 'error'\n END AS coitem_scheddate_qtforegroundrole,\n CASE WHEN coitem_subnumber = 0 THEN 0\n ELSE 1\n END AS xtindentrole,\n spplytype, ordrnumbr\nFROM (\nSELECT coitem_id,\n CASE WHEN (coitem_status='C') THEN 1\n WHEN (coitem_status='X') THEN 4\n WHEN ( (coitem_status='O') AND ( (qtyAtShipping('SO', coitem_id) > 0) OR (coitem_qtyshipped > 0) ) ) THEN 2\n ELSE 3\n END AS coitem_altid, 1 AS groupby,\n coitem_linenumber, coitem_subnumber, formatSoLineNumber(coitem_id) AS f_linenumber,\n warehous_code, item_number, item_type,\n (item_descrip1 || ' ' || item_descrip2) AS description,\n CASE WHEN (coitem_custpn != '') THEN coitem_custpn\n ELSE item_number\n END AS item_number_cust,\n CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip1\n ELSE item_descrip1\n END AS item_descrip1_cust,\n CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip2\n ELSE item_descrip2\n END AS item_descrip2_cust,\n formatitemsitebarcode(itemsite_id) AS item_barcode,\n coitem_status, coitem_firm,\n (CASE WHEN (coitem_status='O' AND (SELECT cust_creditstatus FROM custinfo WHERE cust_id=cohead_cust_id)='H') THEN 'H'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((CAST(invchead_ordernumber AS text)=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=warehous_id)\n AND (invcitem_linenumber=coitem_linenumber)\n AND (cohead_id=coitem_cohead_id))) >= coitem_qtyord)) THEN 'I'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((CAST(invchead_ordernumber AS text)=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=warehous_id)\n AND (invcitem_linenumber=coitem_linenumber)\n AND (cohead_id=coitem_cohead_id))) > 0)) THEN 'P'\n WHEN (coitem_status='O' AND (itemsite_qtyonhand - qtyAllocated(itemsite_id, CURRENT_DATE)\n + qtyOrdered(itemsite_id, CURRENT_DATE) - \n ((coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio))\n >= 0) THEN 'R'\n ELSE coitem_status END\n || CASE WHEN (coitem_firm) THEN 'F' ELSE '' END\n ) AS enhanced_status,\n quom.uom_name AS qty_uom, puom.uom_name AS price_uom,\n itemSellingUOM(item_id) AS ship_uom,\n coitem_memo,\n coitem_scheddate, coitem_price, coitem_custprice, coitem_qtyord,\n CASE WHEN (coitem_custprice = 0.0) THEN 100.0\n ELSE ((1.0 - (coitem_price / coitem_custprice)) * 100.0)\n END AS discountfromcust,\n noNeg(coitem_qtyshipped - coitem_qtyreturned) AS qtyshipped,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS balance,\n qtyAtShipping('SO', coitem_id) AS qtyatshipping,\n ROUND((coitem_qtyord * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio),2) AS extprice,\n ROUND(((coitem_qtyshipped - coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio),2) AS extprice_shipped,\n CASE WHEN coitem_order_type='W' THEN TEXT( 'WO')\n WHEN coitem_order_type='P' THEN TEXT('PO' )\n WHEN coitem_order_type='R' THEN TEXT('PR')\n ELSE TEXT (' ')\n END AS spplytype,\n CASE WHEN coitem_order_type='W' THEN (wo_number || '-' || wo_subnumber)\n WHEN coitem_order_type='P' THEN (pohead_number || '-' || poitem_linenumber)\n WHEN coitem_order_type='R' THEN (pr_number || '-' || pr_subnumber)\n ELSE TEXT (' ')\n END AS ordrnumbr\n FROM cohead\n JOIN coitem ON (coitem_cohead_id=cohead_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN whsinfo ON (warehous_id=itemsite_warehous_id)\n JOIN uom AS quom ON (quom.uom_id=coitem_qty_uom_id)\n JOIN uom AS puom ON (puom.uom_id=coitem_price_uom_id)\n LEFT OUTER JOIN itemalias ON ((itemalias_item_id=item_id) AND (itemalias_number=coitem_custpn))\n LEFT OUTER JOIN wo ON (coitem_order_id = wo_id)\n LEFT OUTER JOIN pr ON (coitem_order_id = pr_id)\n LEFT OUTER JOIN (pohead JOIN poitem ON (pohead_id = poitem_pohead_id))\n ON (coitem_order_id = poitem_id)\n WHERE (cohead_id=)\n\n\n AND (coitem_status != 'X')\n\n\n\n AND (coitem_status != 'C')\n\n\n\n AND (item_type != 'K')\n\n\n) AS data\nORDER BY coitem_linenumber, coitem_subnumber;\n admin 2013-07-26 0 342 salesOrderStatus detail used by dspSalesOrderStatus Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: salesOrderStatus\n-- Name: detail\n-- Notes: used by dspSalesOrderStatus\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT coitem_id, coitem_linenumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n warehous_code,\n coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned,\n SUM(COALESCE(cobill_qty, 0)) AS invoiced,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS balance,\n CASE WHEN (coitem_status='C') THEN coitem_closedate END AS closedate,\n CASE WHEN (coitem_status='C') THEN coitem_close_username END AS closeuser,\n CASE WHEN (coitem_order_id=-1) THEN ''\n WHEN (coitem_order_type='W') THEN ( SELECT (formatWoNumber(wo_id) || '/' || wo_status)\n FROM wo\n WHERE (wo_id=coitem_order_id) )\n ELSE ''\n END AS childinfo,\n 'qty' AS coitem_qtyord_xtnumericrole,\n 'qty' AS coitem_qtyshipped_xtnumericrole,\n 'qty' AS coitem_qtyreturned_xtnumericrole,\n 'qty' AS invoiced_xtnumericrole,\n 'qty' AS balance_xtnumericrole \nFROM itemsite, item, whsinfo, coitem LEFT OUTER JOIN\n cobill ON (coitem_id=cobill_coitem_id AND\n cobill_invcitem_id IS NOT NULL)\nWHERE ( (coitem_itemsite_id=itemsite_id)\n AND (coitem_status <> 'X')\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (coitem_cohead_id=) ) \nGROUP BY coitem_id, coitem_linenumber, item_number, \n item_descrip1, item_descrip2, warehous_code, \n coitem_qtyord, coitem_qtyshipped, coitem_status, \n coitem_closedate, coitem_close_username, \n coitem_qtyreturned, coitem_order_id, \n coitem_order_type \nORDER BY coitem_linenumber;\n admin 2013-07-26 0 51 salesOrders detail used by dspSalesOrdersByCustomer, dspSalesOrdersByCustomerPO, dspSalesOrdersByParameterList Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: salesOrders\n-- Name: detail\n-- Notes: used by dspSalesOrdersByCustomer, dspSalesOrdersByCustomerPO, dspSalesOrdersByParameterList\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cohead_id, cust_id,\n cohead.*,\n cust_number, cust_name,\n getSoSchedDate(cohead_id) AS min_scheddate,\n CASE\n WHEN ( (SELECT COUNT(*)\n FROM coitem\n WHERE ((coitem_status<>'X') AND (coitem_cohead_id=cohead_id))) = 0) THEN \n WHEN ( ( (SELECT COUNT(*)\n FROM coitem\n WHERE ((coitem_status='C')\n AND (coitem_cohead_id=cohead_id))) > 0)\n AND ( (SELECT COUNT(*)\n FROM coitem\n WHERE ((coitem_status NOT IN ('C','X'))\n AND (coitem_cohead_id=cohead_id))) = 0) ) THEN \n WHEN ( ( (SELECT COUNT(*)\n FROM coitem\n WHERE ((coitem_status='C')\n AND (coitem_cohead_id=cohead_id))) = 0)\n AND ( (SELECT COUNT(*)\n FROM coitem\n WHERE ((coitem_status NOT IN ('C','X'))\n AND (coitem_cohead_id=cohead_id))) > 0) ) THEN \n ELSE \n END AS order_status\nFROM cohead JOIN custinfo ON (cust_id=cohead_cust_id)\nWHERE ( (1=1)\n\n AND (cohead_cust_id=)\n\n\n AND (cust_custtype_id=)\n\n\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ )))\n\n\n AND (cohead_custponumber~*)\n\n\n AND (cohead_orderdate BETWEEN AND )\n\n AND ((SELECT COUNT(*)\n FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n WHERE (coitem_cohead_id=cohead_id)) > 0) )\n\n ORDER BY cust_number, cohead_number;\n\nORDER BY cohead_number;\n\n\n admin 2013-07-26 0 570 saletype table maintain saletype table Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: saletype\n-- Name: table\n-- Notes: maintain saletype table\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\n SELECT *\n FROM saletype\n WHERE true\n \n AND (saletype_id=) \n \n \n AND (UPPER(saletype_code)=UPPER()) \n \n ORDER BY saletype_code;\n\n\n INSERT INTO saletype\n ( saletype_code,\n saletype_descr,\n saletype_active )\n VALUES\n ( UPPER(),\n ,\n )\n RETURNING saletype_id;\n\n\n UPDATE saletype\n SET saletype_code=UPPER(),\n saletype_descr=,\n saletype_active=\n WHERE (saletype_id=);\n\n\n DELETE FROM saletype WHERE saletype_id=;\n\n\n SELECT deleteUnusedSaleTypes() AS result;\n\n\n RAISE EXCEPTION 'saletype invalid mode';\n\n admin 2013-07-26 0 52 schedule plannedorders used by dpsPlannedOrdersByItem, dspPlannedOrdersByPlannerCode, dspPlannedRevenueExpensesByPlannerCode -- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n -- Group: schedule\n -- Name: plannedorders\n -- Notes: used by dpsPlannedOrdersByItem, dspPlannedOrdersByPlannerCode, dspPlannedRevenueExpensesByPlannerCode\n SELECT *,\n plorevenue - plocost AS profit,\n formatMoney(plorevenue - plocost) AS f_profit,\n CASE WHEN plocost > plorevenue THEN 'error'\n END AS plorevenue_xtforegroundrole,\n CASE WHEN (planord_firm) THEN 'emphasis'\n END AS qtforegroundrole,\n 'qty' AS planord_qty_xtnumericrole,\n 'curr' AS plocost_xtnumericrole,\n 'curr' AS plorevenue_xtnumericrole,\n 'curr' AS profit_xtnumericrole,\n 0 AS plocost_xttotalrole,\n 0 AS plorevenue_xttotalrole,\n 0 AS profit_xttotalrole\n FROM (\n SELECT planord_id, planord_itemsite_id,\n planord.*,\n (select plancode_code from plancode where plancode_id = itemsite.itemsite_plancode_id) as plancode,\n formatPloNumber(planord_id) AS ordernum,\n CASE WHEN (planord_type='P') THEN 'P/O'\n WHEN (planord_type='W') THEN 'W/O'\n WHEN (planord_type='T') THEN 'T/O'\n ELSE '?'\n END AS ordtype,\n formatDate(planord_duedate) AS f_duedate,\n formatDate(planord_startdate) AS f_startdate,\n formatQty(planord_qty) AS f_qty,\n formatboolYN(planord_firm) AS f_firm,\n whsinfo.warehous_code AS warehous_code,\n supplywhsinfo.warehous_code AS supply_warehous_code,\n item_number,\n (item_descrip1 || ' ' || item_descrip2) AS item_descrip,\n firstline(planord_comments) AS comments,\n uom_name,\n (classcode_code || '-' || classcode_descrip) AS f_classcode,\n \n (actcost(item_id) * planord_qty)\n \n (stdcost(item_id) * planord_qty)\n \n 0\n AS plocost,\n \n (item_listprice * planord_qty)\n \n (CASE WHEN(averageSalesPrice(itemsite.itemsite_id,\n ,\n )=0)\n THEN item_listprice\n ELSE averageSalesPrice(itemsite.itemsite_id,\n ,\n )\n END * planord_qty)\n \n 0\n AS plorevenue,\n \n formatMoney(actcost(item_id) * planord_qty)\n \n formatMoney(stdcost(item_id) * planord_qty)\n \n formatMoney(0)\n AS f_plocost,\n \n formatMoney(item_listprice * planord_qty)\n \n formatMoney(CASE WHEN(averageSalesPrice(itemsite.itemsite_id,\n ,\n )=0)\n THEN item_listprice\n ELSE averageSalesPrice(itemsite.itemsite_id,\n ,\n )\n END * planord_qty)\n \n formatMoney(0)\n AS f_plorevenue\n FROM planord JOIN itemsite ON (planord_itemsite_id=itemsite.itemsite_id)\n JOIN whsinfo ON (itemsite.itemsite_warehous_id=whsinfo.warehous_id)\n JOIN item ON (itemsite.itemsite_item_id=item_id)\n JOIN uom ON (item_inv_uom_id=uom_id)\n LEFT OUTER JOIN classcode ON (classcode_id=item_classcode_id)\n LEFT OUTER JOIN itemsite supplyitemsite ON (planord_supply_itemsite_id=supplyitemsite.itemsite_id)\n LEFT OUTER JOIN whsinfo supplywhsinfo ON (supplyitemsite.itemsite_warehous_id=supplywhsinfo.warehous_id)\n \n JOIN itemgrpitem ON (itemgrpitem_item_id=item_id)\n JOIN itemgrp ON (itemgrp_id=itemgrpitem_itemgrp_id AND itemgrp_id=)\n \n WHERE (TRUE\n \n AND (itemsite.itemsite_item_id=)\n \n \n AND (item.item_classcode_id=)\n \n \n AND (itemsite.itemsite_plancode_id=)\n \n AND (itemsite.itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n \n \n AND (itemsite.itemsite_warehous_id=)\n \n \n AND (planord_duedate BETWEEN AND )\n \n \n AND (item_sold)\n \n \n AND (\n \n (planord_type=) OR\n \n FALSE )\n \n ) ) AS data\n ORDER BY planord_duedate, item_number;\n admin 2013-07-26 0 545 scripts detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: scripts\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT script_id, script_name, script_enabled,\n firstline(script_notes) AS script_notes, script_order,\n CASE nspname WHEN 'public' THEN '' ELSE nspname END AS pkgname,\n CASE nspname WHEN 'public' THEN 0\n ELSE 1 END AS xtindentrole,\n script_notes AS script_notes_qttooltiprole\n FROM script\n JOIN pg_class ON (script.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n UNION \nSELECT -1, pkghead_name, NULL,\n firstline(pkghead_descrip), NULL,\n pkghead_name, 0, pkghead_descrip \n FROM script, pg_class, pg_namespace\n RIGHT OUTER JOIN pkghead ON (nspname=pkghead_name)\n WHERE ((script.tableoid=pg_class.oid)\n AND (relnamespace=pg_namespace.oid))\n ORDER BY pkgname, xtindentrole, script_name, script_order, script_id;\n\nSELECT script_id, script_name, script_enabled,\n firstline(script_notes) AS script_notes, script_order,\n CASE nspname WHEN 'public' THEN '' ELSE nspname END AS pkgname,\n script_notes AS script_notes_qttooltiprole\n FROM script\n JOIN pg_class ON (script.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nORDER BY script_name, script_order, script_id;\n\n admin 2013-07-26 0 227 selectPayments applyallcredits used by selectPayments Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: selectPayments\n-- Name: applyallcredits\n-- Notes: used by selectPayments\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT applyapcredits(vend_id) AS result\nFROM vendinfo\nWHERE ((TRUE)\n\n AND (vend_id = )\n\n AND (vend_vendtype_id = )\n\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ )))\n\n );\n admin 2013-07-26 0 53 shipments detail used by dspShipmentsByDate, dspShipmentsBySalesOrder, dspShipmentsByShipment Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: shipments\n-- Name: detail\n-- Notes: used by dspShipmentsByDate, dspShipmentsBySalesOrder, dspShipmentsByShipment\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT shiphead_id, lineitem_id,\n CASE WHEN (level=0) THEN order_number\n ELSE item_number\n END AS order_item,\n CASE WHEN (level=0) THEN customer\n ELSE itemdescription\n END AS cust_desc,\n shiphead_order_type,\n shiphead_number, \n order_number, \n customer,\n shiphead_shipdate,\n formatDate(shiphead_shipdate) AS f_shipdate,\n shiphead_tracknum,\n shiphead_freight,\n freight_curr_abbr,\n linenumber,\n item_number,\n itemdescription,\n warehous_code,\n qtyord,\n formatQty(qtyord) AS f_qtyord,\n qtyshipped,\n formatQty(qtyshipped) AS f_qtyshipped,\n 'qty' AS qtyord_xtnumericrole,\n 'qty' AS qtyshipped_xtnumericrole,\n 'curr' AS shiphead_freight_xtnumericrole,\n CASE WHEN (COALESCE(linenumber, 0) = 0) THEN '' END AS linenumber_qtdisplayrole,\n CASE WHEN (COALESCE(qtyord, 0) = 0) THEN '' END AS qtyord_qtdisplayrole,\n CASE WHEN (COALESCE(qtyshipped, 0) = 0) THEN '' END AS qtyshipped_qtdisplayrole,\n CASE WHEN (COALESCE(shiphead_freight, 0) = 0) THEN '' END AS shiphead_freight_qtdisplayrole,\n level AS xtindentrole\nFROM (\nSELECT shiphead_id, -1 AS lineitem_id, cohead_number AS sortkey1, shiphead_number AS sortkey2, 0 AS level,\n shiphead_order_type,\n shiphead_number,\n cohead_number AS order_number, \n (cust_number || '-' || cust_name) AS customer,\n shiphead_shipdate,\n shiphead_tracknum,\n shiphead_freight,\n currConcat(shiphead_freight_curr_id) AS freight_curr_abbr, \n 0 AS linenumber, '' AS item_number,\n '' AS itemdescription,\n '' AS warehous_code,\n 0 AS qtyord,\n 0 AS qtyshipped\nFROM shiphead, cohead, custinfo\nWHERE ( (shiphead_order_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (shiphead_shipped)\n AND (shiphead_order_type='SO')\n\n AND (shiphead_shipdate BETWEEN and )\n\n\n AND (cohead_id = )\n\n\n AND (shiphead_id = )\n\n ) \nUNION\nSELECT shiphead_id, coitem_id AS lineitem_id, cohead_number AS sortkey1, shiphead_number AS sortkey2, 1 AS level,\n '' AS shiphead_order_type,\n '' AS shiphead_number,\n '' AS order_number, \n '' AS customer,\n CAST(NULL AS DATE) AS shiphead_shipdate,\n '' AS shiphead_tracknum,\n 0 AS shiphead_freight,\n '' AS freight_curr_abbr, \n coitem_linenumber AS linenumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n warehous_code,\n coitem_qtyord AS qtyord,\n SUM(shipitem_qty) AS qtyshipped\nFROM shipitem, shiphead, coitem, cohead, custinfo, itemsite, item, whsinfo\nWHERE ( (shipitem_shiphead_id=shiphead_id)\n AND (shipitem_orderitem_id=coitem_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_status <> 'X')\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (shiphead_order_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (shiphead_shipped)\n AND (shiphead_order_type='SO')\n\n AND (shiphead_shipdate BETWEEN and )\n\n\n AND (cohead_id = )\n\n\n AND (shiphead_id = )\n\n ) \nGROUP BY shiphead_id, coitem_id, shiphead_order_type, shiphead_number,\n cohead_number, cust_number, cust_name, shiphead_shipdate,\n coitem_linenumber, item_number, item_descrip1, item_descrip2,\n warehous_code, shiphead_tracknum, coitem_qtyord, \n shiphead_freight, shiphead_freight_curr_id \n\nUNION\nSELECT shiphead_id, -1 AS lineitem_id, tohead_number AS sortkey1, shiphead_number AS sortkey2, 0 AS level,\n shiphead_order_type,\n shiphead_number,\n tohead_number AS order_number, \n tohead_destname AS customer,\n shiphead_shipdate,\n shiphead_tracknum,\n shiphead_freight,\n currConcat(shiphead_freight_curr_id) AS freight_curr_abbr, \n 0 AS linenumber, '' AS item_number,\n '' AS itemdescription,\n '' AS warehous_code,\n 0 AS qtyord,\n 0 AS qtyshipped\nFROM shiphead, tohead \nWHERE ( (shiphead_order_id=tohead_id)\n AND (shiphead_shipped)\n AND (shiphead_order_type='TO')\n\n AND (shiphead_shipdate BETWEEN and )\n\n\n AND (tohead_id = )\n\n\n AND (shiphead_id = )\n\n ) \nUNION\nSELECT shiphead_id, toitem_id AS lineitem_id, tohead_number AS sortkey1, shiphead_number AS sortkey2, 1 AS level,\n '' AS shiphead_order_type,\n '' AS shiphead_number,\n '' AS order_number, \n '' AS customer,\n CAST(NULL AS DATE) AS shiphead_shipdate,\n '' AS shiphead_tracknum,\n 0 AS shiphead_freight,\n '' AS freight_curr_abbr, \n toitem_linenumber AS linenumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n tohead_srcname AS warehous_code,\n toitem_qty_ordered AS qtyord,\n SUM(shipitem_qty) AS qtyshipped\nFROM shipitem, shiphead, toitem, tohead, item \nWHERE ( (shipitem_shiphead_id=shiphead_id)\n AND (shipitem_orderitem_id=toitem_id)\n AND (toitem_status <> 'X')\n AND (toitem_item_id=item_id)\n AND (shiphead_order_id=tohead_id)\n AND (shiphead_shipped)\n AND (shiphead_order_type='TO')\n\n AND (shiphead_shipdate BETWEEN and )\n\n\n AND (tohead_id = )\n\n\n AND (shiphead_id = )\n\n ) \nGROUP BY shiphead_id, toitem_id, shiphead_order_type, shiphead_number,\n tohead_number, shiphead_shipdate,\n toitem_linenumber, item_number, item_descrip1, item_descrip2,\n tohead_srcname, shiphead_tracknum, toitem_qty_ordered, \n shiphead_freight, shiphead_freight_curr_id \n\n ) AS data\nORDER BY sortkey1, sortkey2, level, linenumber DESC;\n admin 2013-07-26 0 54 shippingForm shipment used by printShippingForm Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: shippingForm\n-- Name: shipment\n-- Notes: used by printShippingForm\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cohead_id AS order_id, cohead_shiptoname AS shipto, \n cohead_shiptoaddress1 AS addr1, shiphead_order_type, \n shiphead_id, shiphead_shipchrg_id, shiphead_shipped, \n\tCOALESCE(shiphead_shipform_id, cohead_shipform_id) AS shipform_id \nFROM cohead, shiphead \nWHERE ((cohead_id=shiphead_order_id)\n AND (shiphead_order_type='SO')\n AND (shiphead_id= )\n\n AND (cohead_id= )\n\n) \n\nUNION \nSELECT tohead_id AS order_id, tohead_destname AS shipto, \n tohead_destaddress1 AS addr1, shiphead_order_type, \n shiphead_id, shiphead_shipchrg_id, shiphead_shipped, \n\tCOALESCE(shiphead_shipform_id, tohead_shipform_id) AS shipform_id \nFROM tohead, shiphead \nWHERE ((tohead_id=shiphead_order_id)\n AND (shiphead_order_type='TO')\n AND (shiphead_id= )\n\n AND (tohead_id= )\n\n) \nORDER BY shiphead_shipped \n\nLIMIT 1;\n admin 2013-07-26 0 343 slowMovingInventoryByClassCode detail used by dspSlowMovingInventoryByClassCode Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: slowMovingInventoryByClassCode\n-- Name: detail\n-- Notes: used by dspSlowMovingInventoryByClassCode\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, warehous_code, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip, uom_name,\n itemsite_qtyonhand, itemsite_datelastused, cost,\n noNeg(cost * itemsite_qtyonhand) AS value,\n CASE WHEN (COALESCE(itemsite_datelastused, startOfTime()) <= startOfTime()) THEN 'N/A'\n END AS itemsite_datelastused_qtdisplayrole,\n 'qty' AS itemsite_qtyonhand_xtnumericrole,\n 'cost' AS cost_xtnumericrole,\n 'curr' AS value_xtnumericrole,\n 0 AS itemsite_qtyonhand_xttotalrole,\n 0 AS value_xttotalrole\nFROM ( SELECT itemsite_id, warehous_code, item_number,\n item_descrip1, item_descrip2, uom_name,\n itemsite_qtyonhand, itemsite_datelastused,\n \n actcost(itemsite_item_id) \n \n stdcost(itemsite_item_id) \n AS cost \n FROM itemsite, item, whsinfo, uom\n WHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_active)\n AND (itemsite_datelastused < )\n \n AND (itemsite_warehous_id=)\n \n \n AND (item_classcode_id=)\n \n AND (item_classcode_id IN (SELECT classcode_id FROM classcode WHERE classcode_code ~ ))\n \n )\n ) AS data \nORDER BY warehous_code, \n \n item_number\n \n itemsite_datelastused\n \n noNeg(cost * itemsite_qtyonhand) DESC\n \n;\n admin 2013-07-26 0 344 standardJournalHistory detail used by dspStandardJournalHistory Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: standardJournalHistory\n-- Name: detail\n-- Notes: used by dspStandardJournalHistory\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT gltrans_sequence, gltrans_id,\n sortdate, sortdoc, level, gltrans_amount,\n gltrans_date, gltrans_journalnumber, gltrans_posted,\n gltrans_docnumber, account,\n debit, credit,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole,\n CASE WHEN (debit = 0) THEN '' END AS debit_qtdisplayrole,\n CASE WHEN (credit = 0) THEN '' END AS credit_qtdisplayrole,\n level AS xtindentrole \nFROM (SELECT DISTINCT gltrans_sequence, -1 AS gltrans_id,\n gltrans_date AS sortdate, gltrans_docnumber AS sortdoc, 0 AS level, 0 AS gltrans_amount,\n gltrans_date, gltrans_journalnumber, gltrans_posted,\n NULL AS gltrans_docnumber,\n NULL AS account,\n 0 AS debit, 0 AS credit\n FROM gltrans, accnt \n WHERE ( (gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted) \n AND (gltrans_date BETWEEN AND )\n AND (gltrans_doctype='ST') ) \n UNION \n SELECT DISTINCT gltrans_sequence, -1 AS gltrans_id,\n gltrans_date AS sortdate, gltrans_docnumber AS sortdoc, 1 AS level, 0 AS gltrans_amount,\n CAST(NULL AS DATE) AS gltrans_date, CAST(NULL AS INTEGER) AS gltrans_journalnumber, \n CAST(NULL AS BOOLEAN) AS gltrans_posted,\n CASE WHEN (COALESCE(gltrans_docnumber, '') = '') THEN 'Unnamed'\n ELSE gltrans_docnumber\n END AS gltrans_docnumber,\n NULL AS account,\n 0 AS debit, 0 AS credit \n FROM gltrans, accnt \n WHERE ( (gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted)\n AND (gltrans_date BETWEEN AND )\n AND (gltrans_doctype='ST') ) \n UNION \n SELECT gltrans_sequence, gltrans_id,\n gltrans_date AS sortdate, gltrans_docnumber AS sortdoc, 2 AS level, gltrans_amount,\n CAST(NULL AS DATE) AS gltrans_date, CAST(NULL AS INTEGER) AS gltrans_journalnumber,\n CAST(NULL AS BOOLEAN) AS gltrans_posted,\n NULL AS gltrans_docnumber,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n CASE WHEN (gltrans_amount < 0) THEN (gltrans_amount * -1)\n END AS debit,\n CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n END AS credit \n FROM gltrans, accnt \n WHERE ( (gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted) \n AND (gltrans_date BETWEEN AND )\n AND (gltrans_doctype='ST') ) \n ) AS data \nORDER BY sortdate, gltrans_sequence, sortdoc, level, gltrans_amount;\n admin 2013-07-26 0 346 substituteAvailability detail used by dspSubstituteAvailabilityByItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: substituteAvailability\n-- Name: detail\n-- Notes: used by dspSubstituteAvailabilityByItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT s_itemsite_id, warehous_code, item_number, itemdescrip,\n qtyonhand, reorderlevel, leadtime, itemsub_rank,\n allocated, ordered, available,\n 'qty' AS qtyonhand_xtnumericrole,\n 'qty' AS allocated_xtnumericrole,\n 'qty' AS ordered_xtnumericrole,\n 'qty' AS reorderlevel_xtnumericrole,\n 'qty' AS available_xtnumericrole,\n CASE WHEN (reorderlevel >= available) THEN 'error' END AS available_qtforegroundrole\nFROM (SELECT sub.itemsite_id AS s_itemsite_id,\n warehous_code, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n\n (sub.itemsite_qtyonhand * itemsub_uomratio) AS qtyonhand,\n (CASE WHEN(sub.itemsite_useparams)\n THEN sub.itemsite_reorderlevel\n ELSE 0.0\n END * itemsub_uomratio) AS reorderlevel,\n sub.itemsite_leadtime AS leadtime, itemsub_rank,\n\n (sub.itemsite_qtyonhand) AS qtyonhand,\n CASE WHEN(sub.itemsite_useparams) THEN sub.itemsite_reorderlevel\n ELSE 0.0\n END AS reorderlevel,\n sub.itemsite_leadtime AS leadtime, itemsub_rank,\n\n\n \n (qtyAllocated(sub.itemsite_id, sub.itemsite_leadtime) * itemsub_uomratio) AS allocated,\n (qtyOrdered(sub.itemsite_id, sub.itemsite_leadtime) * itemsub_uomratio) AS ordered,\n ((sub.itemsite_qtyonhand * itemsub_uomratio)\n + (qtyOrdered(sub.itemsite_id, sub.itemsite_leadtime) * itemsub_uomratio)\n - (qtyAllocated(sub.itemsite_id, sub.itemsite_leadtime) * itemsub_uomratio)) AS available\n \n (qtyAllocated(sub.itemsite_id, sub.itemsite_leadtime)) AS allocated,\n (qtyOrdered(sub.itemsite_id, sub.itemsite_leadtime)) AS ordered,\n (sub.itemsite_qtyonhand + qtyOrdered(sub.itemsite_id, sub.itemsite_leadtime)\n - qtyAllocated(sub.itemsite_id, sub.itemsite_leadtime)) AS available\n \n\n \n (qtyAllocated(sub.itemsite_id, ) * itemsub_uomratio) AS allocated,\n (qtyOrdered(sub.itemsite_id, ) * itemsub_uomratio) AS ordered,\n ((sub.itemsite_qtyonhand * itemsub_uomratio) + (qtyOrdered(sub.itemsite_id, ) * itemsub_uomratio)\n - (qtyAllocated(sub.itemsite_id, ) * itemsub_uomratio)) AS available\n \n (qtyAllocated(sub.itemsite_id, )) AS allocated,\n (qtyOrdered(sub.itemsite_id, )) AS ordered,\n (sub.itemsite_qtyonhand + qtyOrdered(sub.itemsite_id, )\n - qtyAllocated(sub.itemsite_id, )) AS available\n \n\n \n (qtyAllocated(sub.itemsite_id, ( - CURRENT_DATE)) * itemsub_uomratio) AS allocated,\n (qtyOrdered(sub.itemsite_id, ( - CURRENT_DATE)) * itemsub_uomratio) AS ordered,\n ((sub.itemsite_qtyonhand * itemsub_uomratio) + (qtyOrdered(sub.itemsite_id, ( - CURRENT_DATE)) * itemsub_uomratio)\n - (qtyAllocated(sub.itemsite_id, ( - CURRENT_DATE)) * itemsub_uomratio)) AS available\n \n (qtyAllocated(sub.itemsite_id, ( - CURRENT_DATE))) AS allocated,\n (qtyOrdered(sub.itemsite_id, ( - CURRENT_DATE))) AS ordered,\n (sub.itemsite_qtyonhand + qtyOrdered(sub.itemsite_id,\n ( - CURRENT_DATE)) - qtyAllocated(sub.itemsite_id, ( - CURRENT_DATE))) AS available\n \n\n FROM item, itemsite AS sub, itemsite AS root, whsinfo, itemsub\n WHERE ((sub.itemsite_item_id=item_id)\n AND (root.itemsite_item_id=itemsub_parent_item_id)\n AND (sub.itemsite_item_id=itemsub_sub_item_id)\n AND (root.itemsite_warehous_id=sub.itemsite_warehous_id)\n AND (sub.itemsite_warehous_id=warehous_id)\n AND (root.itemsite_item_id=)\n\n AND (root.itemsite_warehous_id=)\n\n )\n ) AS data\nORDER BY itemsub_rank;\n admin 2013-07-26 0 79 summarizedBacklogByWarehouse counts Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: summarizedBacklogByWarehouse\n-- Name: counts\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT COUNT(coitem.*) AS totalitems \n FROM cohead, coitem, itemsite, custinfo\n\t\t WHERE ( (coitem_cohead_id=cohead_id)\n\t\t AND (coitem_itemsite_id=itemsite_id)\n\t\t AND (cohead_cust_id=cust_id)\n\t\t AND (coitem_status NOT IN ('C','X'))\n\t\t AND (coitem_scheddate BETWEEN \n\t\t AND )\n\t\t \n\t\t AND (itemsite_warehous_id=)\n\t\t \n\t\t \n\t\t AND (cust_custtype_id=)\n\t\t \n\t\t AND (cust_custtype_id IN (SELECT custtype_id FROM custtype\n\t\t WHERE (custtype_code ~ )))\n\t\t \n\t\t );\n admin 2013-07-26 0 80 summarizedBacklogByWarehouse detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: summarizedBacklogByWarehouse\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT * FROM (\n(SELECT cohead_id, 0 AS xtindentrole, salesrep_name, cohead_holdtype, cohead_number, \n coheadstatecolor(cohead_id) AS qtforegroundrole, \n cust_name, \n cohead_created, cohead_orderdate, cohead_packdate, pack_head_id, \n CASE WHEN (cohead_holdtype='N') THEN \n WHEN (cohead_holdtype='C') THEN \n WHEN (cohead_holdtype='S') THEN \n WHEN (cohead_holdtype='P') THEN \n WHEN (cohead_holdtype='R') THEN \n ELSE \n END AS f_holdtype, \n MIN(coitem_scheddate) AS scheddate, \n SUM((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * \n (currToBase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio) ) AS sales, \n SUM((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * stdcost(item_id) ) AS cost,\n SUM((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n ((currToBase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio) - stdcost(item_id)) ) AS margin,\n 'curr' AS sales_xtnumericrole,\n 'curr' AS cost_xtnumericrole,\n 'curr' AS margin_xtnumericrole,\n NULL AS shiphead_id, \n NULL AS shiphead_number, \n NULL AS shipstatus,\n NULL AS shipvia,\n CASE WHEN (pack_head_id IS NOT NULL) THEN TRUE\n ELSE FALSE\n END AS packed \n \n , 0 AS sales_xttotalrole, 0 AS cost_xttotalrole, 0 AS margin_xttotalrole \n ,\n cohead_number AS seq\n FROM coitem, itemsite, item, custinfo, cohead\n LEFT OUTER JOIN pack ON (cohead_id = pack_head_id), salesrep \n WHERE ( (coitem_cohead_id=cohead_id)\n AND (salesrep_id = cohead_salesrep_id) \n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (coitem_status NOT IN ('C','X'))\n AND (coitem_scheddate BETWEEN \n AND )\n \n AND (itemsite_warehous_id=)\n \n \n AND (cust_custtype_id=)\n \n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype\n WHERE (custtype_code ~ )))\n \n ) \n GROUP BY cohead_id, salesrep_number, salesrep_name, cohead_number, cust_name,\n cohead_holdtype, cohead_orderdate, cohead_packdate,\n cohead_created, pack_head_id )\n UNION \n (SELECT cohead_id, 1 AS xtindentrole, NULL, NULL, \n shiphead_number AS cohead_number, \n CASE WHEN (shiphead_shipped IS NULL) THEN '' \n WHEN (shiphead_shipped) THEN 'altemphasis' \n WHEN (NOT shiphead_shipped) THEN 'emphasis' \n WHEN ( (COALESCE(cobmisc_cohead_id,0) > 0) \n AND (SUM(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) > 0) \n ) THEN 'error' \n END AS qtforegroundrole, \n COALESCE(shiphead_shipvia, ''), NULL, shiphead_shipdate AS cohead_orderdate, \n NULL, NULL,\n CASE WHEN (shiphead_shipped) THEN \n ELSE \n END AS f_holdtype, MIN(coitem_scheddate), NULL, NULL, NULL, NULL, NULL, NULL, NULL, \n formatShipmentNumber(shiphead_id) AS shiphead_number, \n NULL, \n COALESCE(shiphead_shipvia, '') AS shipvia \n \n , NULL, NULL, NULL \n \n , NULL,\n cohead_number AS seq \n FROM coitem, itemsite, item, custinfo, cohead\n LEFT OUTER JOIN shiphead ON ((shiphead_order_id=cohead_id) \n AND (shiphead_order_type='SO'))\n LEFT OUTER JOIN (SELECT DISTINCT cobmisc_cohead_id FROM cobmisc) AS cobmisc ON (cobmisc_cohead_id=cohead_id) \n LEFT OUTER JOIN pack ON (cohead_id = pack_head_id), salesrep \n WHERE ( (coitem_cohead_id=cohead_id)\n AND (salesrep_id = cohead_salesrep_id) \n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (coitem_status NOT IN ('C','X'))\n AND (coitem_scheddate BETWEEN \n AND )\n \n AND (itemsite_warehous_id=)\n \n \n AND (cust_custtype_id=)\n \n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype\n WHERE (custtype_code ~ )))\n \n AND ((SELECT (count(*)>0) FROM shipitem WHERE ((shipitem_shiphead_id=shiphead_id) AND (NOT shipitem_invoiced))))) \n GROUP BY cohead_id, salesrep_number, salesrep_name, cohead_number, cust_name, \n cohead_holdtype, cohead_orderdate, cohead_packdate, \n shiphead_shipped, shiphead_shipvia, shiphead_shipdate, \n shiphead_id, cobmisc_cohead_id, cohead_created, pack_head_id,\n shiphead_number )) AS data\n ORDER BY seq, cohead_number;\n\n\n admin 2013-07-26 0 81 summarizedBacklogByWarehouse qtys Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: summarizedBacklogByWarehouse\n-- Name: qtys\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT formatQty(COALESCE(SUM(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned), 0)) AS f_totalqty \n FROM cohead, coitem, itemsite, item, custinfo\n\t\t WHERE ( (coitem_cohead_id=cohead_id)\n\t\t AND (coitem_itemsite_id=itemsite_id)\n\t\t AND (itemsite_item_id=item_id)\n\t\t AND (cohead_cust_id=cust_id)\n\t\t AND (coitem_status NOT IN ('C','X'))\n\t\t AND (coitem_scheddate BETWEEN \n\t\t AND )\n\t\t \n\t\t AND (itemsite_warehous_id=)\n\t\t \n\t\t \n\t\t AND (cust_custtype_id=)\n\t\t \n\t\t AND (cust_custtype_id IN (SELECT custtype_id FROM custtype\n\t\t WHERE (custtype_code ~ )))\n\t\t \n\t\t );\n admin 2013-07-26 0 82 summarizedBacklogByWarehouse totals Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: summarizedBacklogByWarehouse\n-- Name: totals\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT COUNT(cohead_id) AS totalorders \n\t\t FROM ( SELECT DISTINCT cohead_id \n FROM cohead, coitem, itemsite, custinfo\n\t\t WHERE ( (coitem_cohead_id=cohead_id)\n\t\t AND (coitem_itemsite_id=itemsite_id)\n\t\t AND (cohead_cust_id=cust_id)\n\t\t AND (coitem_status NOT IN ('C','X'))\n\t\t AND (coitem_scheddate BETWEEN \n\t\t AND )\n\t\t \n\t\t AND (itemsite_warehous_id=)\n\t\t \n\t\t \n\t\t AND (cust_custtype_id=)\n\t\t \n\t\t AND (cust_custtype_id IN (SELECT custtype_id FROM custtype\n\t\t WHERE (custtype_code ~ )))\n\t\t \n\t\t ) ) AS data;\n admin 2013-07-26 0 347 summarizedBankrecHistory detail used by dspSummarizedBankrecHistory Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: summarizedBankrecHistory\n-- Name: detail\n-- Notes: used by dspSummarizedBankrecHistory\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT bankrec_posted, bankrec_postdate,\n bankrec_username, bankrec_opendate,\n bankrec_enddate, bankrec_openbal, bankrec_endbal,\n 'curr' AS bankrec_openbal_xtnumericrole,\n 'curr' AS bankrec_endbal_xtnumericrole\nFROM bankrec\nWHERE (bankrec_bankaccnt_id=)\nORDER BY bankrec_created;\n admin 2013-07-26 0 348 summarizedGLTransactions detail used by dspSummarizedGLTransactions Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: summarizedGLTransactions\n-- Name: detail\n-- Notes: used by dspSummarizedGLTransactions\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT accnt_id, gltrans_id,\n account, accnt_descrip,\n gltrans_date, gltrans_source, gltrans_doctype, gltrans_docnumber,\n f_notes,\n debit, credit,\n gltrans_username, gltrans_created,\n CASE WHEN (level=0) THEN accnt_descrip\n ELSE f_notes \n END AS descrip_notes, \n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole,\n 0 AS debit_xtnumericrole,\n 0 AS credit_xtnumericrole,\n CASE WHEN (debit=0) THEN '' END AS debit_qtdisplayrole,\n CASE WHEN (credit=0) THEN '' END AS credit_qtdisplayrole,\n level AS xtindentrole \nFROM ( \nSELECT DISTINCT accnt_id, -1 AS gltrans_id, 0 AS level,\n accnt_number, accnt_profit, accnt_sub, \n formatGLAccount(accnt_id) AS account, accnt_descrip,\n CAST(NULL AS DATE) AS gltrans_date, '' AS gltrans_source, '' AS gltrans_doctype, '' AS gltrans_docnumber,\n '' AS f_notes,\n SUM( CASE WHEN (gltrans_amount < 0) THEN (gltrans_amount * -1) \n ELSE 0 \n END ) AS debit, \n SUM( CASE WHEN (gltrans_amount > 0) THEN gltrans_amount \n ELSE 0 \n END ) AS credit, \n '' AS gltrans_username, CAST(NULL AS TIMESTAMP) AS gltrans_created \nFROM gltrans, accnt \nWHERE ( (gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted) \n AND (gltrans_date BETWEEN AND ) \n\n \n\n AND (gltrans_source=)\n\n \n\n AND (NOT gltrans_posted)\n\n AND (gltrans_posted)\n\n ) GROUP BY accnt_id, accnt_number, accnt_profit, accnt_sub, accnt_descrip \n UNION \n SELECT accnt_id, gltrans_id, 1 AS level,\n accnt_number, accnt_profit, accnt_sub, \n '' AS account, '' AS accnt_descrip,\n gltrans_date, gltrans_source, gltrans_doctype, gltrans_docnumber,\n firstLine(gltrans_notes) AS f_notes,\n CASE WHEN (gltrans_amount < 0) THEN (gltrans_amount * -1)\n ELSE 0\n END AS debit,\n CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n ELSE 0\n END AS credit,\n gltrans_username, gltrans_created \n FROM gltrans, accnt \n WHERE ((gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted) \n AND (gltrans_date BETWEEN AND ) \n\n\n AND (gltrans_source=)\n\n\n\n AND (NOT gltrans_posted)\n\n AND (gltrans_posted)\n\n\n)) AS data \n ORDER BY accnt_number, accnt_profit, accnt_sub, level, gltrans_date DESC, gltrans_created;\n admin 2013-07-26 0 75 taxBreakdown detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: taxBreakdown\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\n SELECT head.*, linetax.*, freighttax.*, adjtax.* \n FROM\n (SELECT \n invchead_invcnumber AS number, invchead_taxzone_id AS taxzone_id, \n invchead_curr_id AS curr_id, invchead_curr_id AS tax_curr_id, invchead_invcdate AS date, \n SUM(ROUND(((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price) / \n (CASE WHEN(item_id IS NULL) THEN 1 ELSE invcitem_price_invuomratio END)), 2)) AS line, \n invchead_freight AS freight, \n getFreightTaxTypeId() AS freightTax, getAdjustmentTaxTypeId() AS adjTax \n FROM invchead\n LEFT OUTER JOIN invcitem ON (invcitem_invchead_id=invchead_id) \n LEFT OUTER JOIN item ON (invcitem_item_id=item_id) \n WHERE (invchead_id=) \n GROUP BY number, taxzone_id, curr_id, tax_curr_id, date, freight, freightTax, adjTax) head, \n (SELECT ROUND(SUM(group_tax), 2) AS total_tax FROM\n (SELECT ROUND(SUM(invcitemtax.taxhist_tax),2) AS group_tax \n FROM invcitemtax \n LEFT OUTER JOIN invcitem ON (taxhist_parent_id = invcitem_id) \n WHERE (invcitem_invchead_id=)\n GROUP BY taxhist_tax_id) AS data\n ) linetax,\n (SELECT ROUND(SUM(group_tax), 2) AS freighttaxamt FROM\n (SELECT ROUND(SUM(taxhist_tax),2) AS group_tax \n FROM invchead \n LEFT OUTER JOIN invcheadtax ON (taxhist_parent_id = invchead_id \n AND taxhist_taxtype_id = getfreighttaxtypeid()) \n WHERE (invchead_id=)\n GROUP BY taxhist_tax_id) AS data\n ) freighttax, \n (SELECT ROUND(SUM(group_tax), 2) AS adjtaxamt FROM\n (SELECT ROUND(SUM(taxhist_tax),2) AS group_tax \n FROM invchead \n LEFT OUTER JOIN invcheadtax ON (taxhist_parent_id = invchead_id \n AND taxhist_taxtype_id = getadjustmenttaxtypeid()) \n WHERE (invchead_id=)\n GROUP BY taxhist_tax_id) AS data\n ) adjtax;\n\n SELECT head.*, linetax.*, freighttax.*, adjtax.* \n FROM\n (SELECT \n cmhead_number AS number, cmhead_taxzone_id AS taxzone_id, \n cmhead_curr_id AS curr_id, cmhead_curr_id AS tax_curr_id, cmhead_docdate AS date, \n SUM(ROUND(((cmitem_qtycredit * cmitem_qty_invuomratio) * (cmitem_unitprice) / \n cmitem_price_invuomratio), 2)) AS line, \n cmhead_freight AS freight, \n getFreightTaxTypeId() AS freightTax, getAdjustmentTaxTypeId() AS adjTax \n FROM cmhead \n LEFT OUTER JOIN cmitem ON (cmitem_cmhead_id=cmhead_id) \n WHERE (cmhead_id=) \n GROUP BY number, taxzone_id, curr_id, tax_curr_id, date, freight, freightTax, adjTax) head, \n (SELECT ROUND(SUM(group_tax), 2) AS total_tax FROM\n (SELECT ROUND(SUM(cmitemtax.taxhist_tax * -1),2) AS group_tax \n FROM cmitemtax \n LEFT OUTER JOIN cmitem ON (taxhist_parent_id = cmitem_id) \n WHERE (cmitem_cmhead_id=)\n GROUP BY taxhist_tax_id) AS data\n ) linetax,\n (SELECT ROUND(SUM(group_tax), 2) AS freighttaxamt FROM\n (SELECT ROUND(SUM(taxhist_tax * -1),2) AS group_tax \n FROM cmhead \n LEFT OUTER JOIN cmheadtax ON (taxhist_parent_id = cmhead_id \n AND taxhist_taxtype_id = getfreighttaxtypeid()) \n WHERE (cmhead_id=)\n GROUP BY taxhist_tax_id) AS data\n ) freighttax, \n (SELECT ROUND(SUM(group_tax), 2) AS adjtaxamt FROM\n (SELECT ROUND(SUM(taxhist_tax * -1),2) AS group_tax \n FROM cmhead \n LEFT OUTER JOIN cmheadtax ON (taxhist_parent_id = cmhead_id \n AND taxhist_taxtype_id = getadjustmenttaxtypeid()) \n WHERE (cmhead_id=)\n GROUP BY taxhist_tax_id) AS data\n ) adjtax;\n\n SELECT head.*, linetax.*, frighttax.*, adjtax.* \n FROM \n (SELECT cohead_number AS number, cobmisc_taxzone_id AS taxzone_id, \n cobmisc_curr_id AS curr_id, cobmisc_curr_id AS tax_curr_id, \n cobmisc_invcdate AS date, SUM(ROUND((cobill_qty * coitem_price) / \n (CASE WHEN(item_id IS NULL) THEN 1 ELSE coitem_price_invuomratio END), 2)) AS line, \n cobmisc_freight AS freight, \n getFreightTaxTypeId() AS freightTax, getAdjustmentTaxTypeId() AS adjTax \t \n FROM cobmisc\n JOIN cohead ON (cobmisc_cohead_id=cohead_id) \n LEFT OUTER JOIN cobill ON (cobill_cobmisc_id=cobmisc_id) \n LEFT OUTER JOIN coitem ON (cobill_coitem_id=coitem_id) \n LEFT OUTER JOIN itemsite ON (coitem_itemsite_id=itemsite_id) \n LEFT OUTER JOIN item ON (itemsite_item_id=item_id) \n WHERE (cobmisc_id=) \n GROUP BY number, cobmisc_taxzone_id, curr_id, tax_curr_id, \n date, freight, freightTax,adjTax) head, \n (SELECT ROUND(SUM(group_tax), 2) AS total_tax FROM\n (SELECT ROUND(SUM(cobilltax.taxhist_tax),2) AS group_tax\n FROM cobilltax\n LEFT OUTER JOIN cobill ON (cobill_id=taxhist_parent_id) \n WHERE (cobill_cobmisc_id=)\n GROUP BY taxhist_tax_id) AS data\n ) linetax, \n (SELECT ROUND(SUM(group_tax), 2) AS freighttaxamt FROM\n (SELECT ROUND(SUM(taxhist_tax),2) AS group_tax\n FROM cobmisctax\n LEFT OUTER JOIN cobmisc ON (taxhist_parent_id = cobmisc_id AND taxhist_taxtype_id = getfreighttaxtypeid()) \n WHERE (cobmisc_id=)\n GROUP BY taxhist_tax_id) AS data\n ) frighttax, \n (SELECT ROUND(SUM(group_tax), 2) AS adjtaxamt FROM\n (SELECT ROUND(SUM(taxhist_tax),2) AS group_tax\n FROM cobmisctax\n LEFT OUTER JOIN cobmisc ON (taxhist_parent_id = cobmisc_id AND taxhist_taxtype_id = getadjustmenttaxtypeid()) \n WHERE (cobmisc_id=)\n GROUP BY taxhist_tax_id) AS data\n ) adjtax;\n\n SELECT cohead_number AS number,\n cohead_taxzone_id AS taxzone_id,\n cohead_curr_id AS curr_id,\n cohead_curr_id AS tax_curr_id,\n cohead_orderdate AS date,\n SUM(ROUND((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio),\n 2)) AS line,\n ROUND(SUM(calculateTax(cohead_taxzone_id, coitem_taxtype_id, cohead_orderdate, cohead_curr_id, ROUND((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price /\n coitem_price_invuomratio), 2))),2) as total_tax, \n cohead_freight AS freight,\n getFreightTaxTypeId() AS freightTax, \n ROUND(calculateTax(cohead_taxzone_id, getfreighttaxtypeid(), cohead_orderdate, cohead_curr_id, cohead_freight), 2) AS freighttaxamt\n FROM coitem, item, itemsite, cohead \n LEFT OUTER JOIN taxzone ON (cohead_taxzone_id=taxzone_id) \n LEFT OUTER JOIN taxtype ON (taxtype_id=getFreightTaxTypeId())\n WHERE ((coitem_cohead_id=)\n AND (coitem_cohead_id=cohead_id)\n AND (coitem_status != 'X')\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id))\n GROUP BY number, cohead_taxzone_id, curr_id, tax_curr_id,\n date, freight, freightTax,freighttaxamt;\n\n SELECT quhead_number AS number,\n quhead_taxzone_id AS taxzone_id,\n quhead_curr_id AS curr_id,\n quhead_curr_id AS tax_curr_id,\n quhead_quotedate AS date,\n SUM(ROUND((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio),\n 2)) AS line,\n ROUND(SUM(calculateTax(quhead_taxzone_id, quitem_taxtype_id, quhead_quotedate, quhead_curr_id, ROUND((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price /\n quitem_price_invuomratio), 2))),2) as total_tax, \n quhead_freight AS freight,\n taxtype_id AS freightTax,\n ROUND(calculateTax(quhead_taxzone_id, getfreighttaxtypeid(), quhead_quotedate, quhead_curr_id, quhead_freight), 2) AS freighttaxamt\n FROM quitem, item, quhead \n LEFT OUTER JOIN taxzone ON (quhead_taxzone_id=taxzone_id) \n LEFT OUTER JOIN taxtype ON (taxtype_id=getFreightTaxTypeId())\n WHERE ((quitem_quhead_id=)\n AND (quitem_quhead_id=quhead_id)\n AND (quitem_item_id=item_id))\n GROUP BY number, quhead_taxzone_id, curr_id, tax_curr_id,\n date, freight, freightTax,freighttaxamt;\n\n SELECT rahead_number AS number,\n rahead_taxzone_id AS taxzone_id,\n rahead_curr_id AS curr_id,\n rahead_curr_id AS tax_curr_id,\n rahead_authdate AS date,\n COALESCE(SUM(ROUND((raitem_qtyauthorized * raitem_qty_invuomratio) * (raitem_unitprice / raitem_price_invuomratio),\n 2)),0) AS line,\n COALESCE(ROUND(SUM(calculateTax(rahead_taxzone_id, raitem_taxtype_id, rahead_authdate, rahead_curr_id, ROUND((raitem_qtyauthorized * raitem_qty_invuomratio) * (raitem_unitprice /\n raitem_price_invuomratio), 2))),2),0) as total_tax, \n rahead_freight AS freight,\n taxtype_id AS freightTax,\n ROUND(calculateTax(rahead_taxzone_id, getfreighttaxtypeid(), rahead_authdate, rahead_curr_id, rahead_freight), 2) AS freighttaxamt\n FROM rahead \n LEFT OUTER JOIN raitem ON (raitem_rahead_id=rahead_id)\n LEFT OUTER JOIN taxzone ON (rahead_taxzone_id=taxzone_id) \n LEFT OUTER JOIN taxtype ON (taxtype_id=getFreightTaxTypeId())\n WHERE (raitem_rahead_id=)\n GROUP BY number, rahead_taxzone_id, curr_id, tax_curr_id,\n date, freight, freightTax;\n\n SELECT tohead_number AS number,\n tohead_taxzone_id AS taxzone_id,\n tohead_freight_curr_id AS curr_id,\n tohead_freight_curr_id AS tax_curr_id,\n tohead_orderdate AS date,\n-------- SUM(ROUND(toitem_freight, 2)) AS line,\n-------- COALESCE(ROUND(SUM(calculateTax(tohead_taxzone_id, getfreighttaxtypeid(), tohead_orderdate, baseCurrId(), toitem_freight)),2),0) as total_tax,\n 0.0 AS line, 0.0 AS total_tax, \n tohead_freight + SUM(ROUND(toitem_freight, 2)) AS freight,\n getFreightTaxTypeId() AS freightTax,\n COALESCE(ROUND(SUM(calculateTax(tohead_taxzone_id, getfreighttaxtypeid(), tohead_orderdate, baseCurrId(), toitem_freight)),2),0) +\n COALESCE(ROUND(calculateTax(tohead_taxzone_id, getfreighttaxtypeid(), tohead_orderdate, baseCurrId(), tohead_freight),2),0) AS freighttaxamt \n FROM toitem, tohead \n WHERE ((toitem_tohead_id=)\n AND (toitem_tohead_id=tohead_id)\n AND (toitem_status!='X')) \n GROUP BY number, taxzone_id, curr_id, tax_curr_id,\n date,\t\ttohead_freight,\tfreightTax\n\n SELECT pohead_number AS number,\n pohead_taxzone_id AS taxzone_id,\n pohead_curr_id AS curr_id,\n pohead_curr_id AS tax_curr_id,\n pohead_orderdate AS date,\n COALESCE(SUM(ROUND(poitem_unitprice * poitem_qty_ordered, 2)),0) AS line,\n (SELECT SUM(tax) AS tax \n FROM (\n SELECT ROUND(SUM(taxdetail_tax),2) AS tax \n FROM tax \n JOIN calculateTaxDetailSummary('PO', , 'T') ON (taxdetail_tax_id=tax_id)\n GROUP BY tax_id) data\n ) as total_tax,\n (COALESCE(SUM(poitem_freight),0)+COALESCE(pohead_freight,0)) AS freight,\n taxtype_id AS freightTax,\n 0 AS freighttaxamt\n FROM pohead \n LEFT OUTER JOIN poitem ON (poitem_pohead_id=pohead_id)\n LEFT OUTER JOIN taxzone ON (pohead_taxzone_id=taxzone_id) \n LEFT OUTER JOIN taxtype ON (taxtype_id=getFreightTaxTypeId())\n WHERE (poitem_pohead_id=)\n GROUP BY number, pohead_taxzone_id, curr_id, tax_curr_id,\n date, pohead_freight, freightTax;\n\n SELECT head.*, linetax.*, adjtax.* \n FROM\n (SELECT \n vohead_number AS number, vohead_taxzone_id AS taxzone_id, \n vohead_curr_id AS curr_id, vohead_curr_id AS tax_curr_id, vohead_docdate AS date, \n COALESCE(SUM(ROUND(voitem_qty * poitem_unitprice, 2)), 0) AS line, \n COALESCE(SUM(voitem_freight), 0) AS freight, \n getAdjustmentTaxTypeId() AS adjTax \n FROM voitem \n LEFT OUTER JOIN poitem ON (voitem_poitem_id=poitem_id) \n LEFT OUTER JOIN vohead ON (voitem_vohead_id=vohead_id) \n WHERE (voitem_vohead_id=) \n GROUP BY number, taxzone_id, curr_id, tax_curr_id, date, adjTax) head, \n (SELECT SUM(voitemtax.taxhist_tax * -1) AS total_tax \n FROM voitemtax \n LEFT OUTER JOIN voitem ON (taxhist_parent_id = voitem_id) \n WHERE (voitem_vohead_id=)) linetax,\n (SELECT SUM(taxhist_tax * -1) AS adjtaxamt \n FROM vohead \n LEFT OUTER JOIN voheadtax ON (taxhist_parent_id = vohead_id \n AND taxhist_taxtype_id = getadjustmenttaxtypeid()) \n WHERE vohead_id=) adjtax;\n;\n admin 2013-07-26 0 349 summarizedSalesHistory detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: summarizedSalesHistory\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT 1 AS dummy,\n-- Columns added to match columns of Printed Report\n\n \n \n || E'\\n' || \n \n AS groupsLit,\n\n substring( from 1 for 15) \n \n || E'\\n' || \n \n AS groups,\n\n substring( from 1 for 30) \n \n || E'\\n' || \n \n AS groupsDescrip,\n-- End of columns for printed report\n \n cust_number, cohist_cust_id AS cust_number_xtidrole, cust_name,\n \n \n custtype_code, cust_custtype_id AS custtype_code_xtidrole, \n \n \n item_number, item_id AS item_number_xtidrole, itemdescription, \n \n \n salesrep_number, cohist_salesrep_id AS salesrep_number_xtidrole, salesrep_name, \n \n \n shipzone_name, shipzone_id AS shipzone_name_xtidrole,\n \n \n warehous_code, itemsite_warehous_id AS warehous_code_xtidrole,\n \n \n currAbbr,\n MIN(custunitprice) AS minprice, MAX(custunitprice) AS maxprice, \n AVG(custunitprice) AS avgprice,\n SUM(custextprice) AS totalsales, \n CASE WHEN (SUM(cohist_qtyshipped) = 0) THEN 0 \n ELSE SUM(custextprice) / SUM(cohist_qtyshipped) \n END AS wtavgprice,\n \n currConcat(baseCurrId()) AS currAbbr, \n MIN(baseunitprice) AS minprice, MAX(baseunitprice) AS maxprice, \n AVG(baseunitprice) AS avgprice, \n SUM(baseextprice) AS totalsales, \n CASE WHEN (SUM(cohist_qtyshipped) = 0) THEN 0 \n ELSE SUM(baseextprice) / SUM(cohist_qtyshipped) \n END AS wtavgprice,\n \n SUM(cohist_qtyshipped) AS totalunits, \n MIN(cohist_invcdate) AS firstdate, \n MAX(cohist_invcdate) AS lastdate, \n SUM(cohist_qtyshipped) AS qtyshipped, \n 'salesprice' AS minprice_xtnumericrole, \n 'salesprice' AS maxprice_xtnumericrole, \n 'salesprice' AS avgprice_xtnumericrole, \n 'salesprice' AS wtavgprice_xtnumericrole, \n 'qty' AS qtyshipped_xtnumericrole, \n 'curr' AS extprice_xtnumericrole,\n 'qty' AS totalunits_xtnumericrole, \n 'curr' AS totalsales_xtnumericrole, \n 'qty' AS totalunits_xtnumericrole, \n 'curr' AS totalsales_xtnumericrole, \n 0 AS totalunits_xttotalrole, \n 0 AS totalsales_xttotalrole \nFROM saleshistory \nWHERE (cohist_doctype NOT IN ('C')\n\n AND (cohist_invcdate >= )\n\n\n\n AND (cohist_invcdate <= )\n\n\n\n AND (cohist_shipdate >= )\n\n\n\n AND (cohist_shipdate <= )\n\n\n\n AND (itemsite_warehous_id=)\n\n\n\n AND (itemsite_item_id=)\n\n\n\n AND (cohist_cust_id=)\n\n\n\n AND (cohist_shipto_id=)\n\n\n\n AND (cohist_salesrep_id=)\n\n\n\n AND (item_prodcat_id=)\n\n\n\n AND (prodcat_code ~ ) \n\n\n\n AND (cust_custtype_id=)\n\n\n\n AND (custtype_code ~ )\n \n\n\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=)))\n\n\n\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ ) )) )\n\n\n\n AND (shipzone_id=)\n\n\n\n AND cust_curr_id = \n\n\n\n AND (currAbbr ~ ) \n\n) \nGROUP BY dummy\n\n , cohist_salesrep_id, salesrep_number, salesrep_name\n\n\n , shipzone_id, shipzone_name, shipzone_descrip\n\n\n , cohist_cust_id, cust_number, cust_name\n\n\n , cust_custtype_id, custtype_code, custtype_descrip\n\n\n , item_id, item_number, itemdescription\n\n\n , itemsite_warehous_id, warehous_code, warehous_descrip\n\n\n , cust_curr_id, currAbbr\n\n ORDER BY dummy\n\n , salesrep_number\n\n\n , shipzone_name\n\n\n , cust_number\n\n\n , custtype_code\n\n\n , item_number\n\n\n , warehous_code\n\n;\n admin 2013-07-26 0 350 taxAuthorities detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: taxAuthorities\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n taxauth_id, taxauth_code, taxauth_name,\n addr.*\nFROM taxauth\n LEFT OUTER JOIN addr ON (taxauth_addr_id=addr_id) \nWHERE true\n\n AND ((taxauth_code ~* )\n OR (taxauth_name ~* )\n OR (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n OR (COALESCE(addr_city,'') ~* )\n OR (COALESCE(addr_state,'') ~* )\n OR (COALESCE(addr_postalcode,'') ~* )\n OR (COALESCE(addr_country,'') ~* ))\n\n\n AND (taxauth_code ~* )\n\n\n AND (taxauth_name ~* )\n\n\n AND (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n\n\n AND (COALESCE(addr_city,'') ~* )\n\n\n AND (COALESCE(addr_state,'') ~* )\n\n\n AND (COALESCE(addr_postalcode,'') ~* )\n\n\n AND (COALESCE(addr_country,'') ~* )\n\nORDER BY taxauth_code; \n admin 2013-07-26 0 352 timePhasedBookings detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timePhasedBookings\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n\n cust_id, cust_number, cust_name, \n\n prodcat_id, prodcat_code, prodcat_descrip,\n\n item_id, item_number, item_descrip1,\n\n uom, warehous_code\n-- Loop through each period bucket to find bookings for period\n\n , SUM(CASE WHEN (cohead_orderdate BETWEEN findPeriodStart() AND findPeriodEnd()) THEN\n amount ELSE 0 END) AS bucket_,\n \n 'curr' AS bucket__xtnumericrole, \n 0 AS bucket__xttotalrole\n \n 'qty' AS bucket__xtnumericrole, \n 0 AS bucket__xttotalrole \n \n\nFROM ( \n SELECT cohead_orderdate,\n\n cust_id, cust_number, cust_name\n\n prodcat_id, prodcat_code, prodcat_descrip\n\n item_id, item_number, item_descrip1\n\n , warehous_code\n\n , round((coitem_qtyord * coitem_qty_invuomratio) * (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) AS amount\n , ::text AS uom\n\n , coitem_qtyord\n \n * itemcapinvrat(itemsite_item_id)\n \n * itemaltcapinvrat(itemsite_item_id)\n \n AS amount\n \n , uom_name AS uom\n \n , itemcapuom(item_id) AS uom\n \n , itemaltcapuom(item_id) AS uom\n \n\n FROM coitem\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n JOIN itemsite ON (coitem_itemsite_id=itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n\n JOIN uom ON (item_inv_uom_id=uom_id)\n\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n\n JOIN custinfo ON (cohead_cust_id=cust_id)\n \n\n JOIN prodcat ON (item_prodcat_id=prodcat_id)\n\n WHERE ((coitem_status != 'X')\n AND (cohead_orderdate BETWEEN \n\n \n findPeriodStart()\n \n \n AND findPeriodEnd()\n \n)\n \n AND (item_id=)\n\n \n AND (cust_id=)\n\n \n AND (cust_custtype_id=)\n\n\n AND (cust_custtype_id IN (SELECT custtype_id \n FROM custtype \n WHERE (custtype_code ~ )))\n\n \n AND (item_prodcat_id=) \n\n\n AND (item_prodcat_id IN (SELECT prodcat_id \n FROM prodcat \n WHERE (prodcat_code ~ )))\n\n \n AND(itemsite_warehous_id=) \n\n )) data\nGROUP BY\n\n cust_id, cust_number, cust_name, \n\n prodcat_id, prodcat_code, prodcat_descrip,\n\n item_id, item_number, item_descrip1,\n\n uom, warehous_code\nORDER BY \n\n cust_number,\n\n prodcat_code,\n\n item_number,\n\n uom, warehous_code;\n admin 2013-07-26 0 355 timePhasedSales detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timePhasedSales\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n\n cust_id, cust_number, cust_name, \n\n prodcat_id, prodcat_code, prodcat_descrip,\n\n item_id, item_number, item_descrip1,\n\n uom, warehous_code\n-- Loop through each period bucket to find bookings for period\n\n , SUM(CASE WHEN (cohist_invcdate BETWEEN findPeriodStart() AND findPeriodEnd()) THEN\n amount ELSE 0 END) AS bucket_,\n \n 'curr' AS bucket__xtnumericrole, \n 0 AS bucket__xttotalrole\n \n 'qty' AS bucket__xtnumericrole, \n 0 AS bucket__xttotalrole \n \n\nFROM ( \n SELECT cohist_invcdate,\n\n cust_id, cust_number, cust_name\n\n prodcat_id, prodcat_code, prodcat_descrip\n\n item_id, item_number, item_descrip1\n\n , warehous_code\n\n , round((cohist_qtyshipped * currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate)), 2) AS amount\n , ::text AS uom\n\n , cohist_qtyshipped\n \n * itemcapinvrat(itemsite_item_id)\n \n * itemaltcapinvrat(itemsite_item_id)\n \n AS amount\n \n , uom_name AS uom\n \n , itemcapuom(item_id) AS uom\n \n , itemaltcapuom(item_id) AS uom\n \n\n FROM cohist JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n\n JOIN uom ON (item_inv_uom_id=uom_id)\n\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n\n JOIN custinfo ON (cohist_cust_id=cust_id)\n \n\n JOIN custgrpitem ON (cohist_cust_id=custgrpitem_cust_id)\n JOIN custgrp ON (custgrp_id=custgrpitem_custgrp_id)\n \n\n JOIN prodcat ON (item_prodcat_id=prodcat_id)\n\n WHERE ((cohist_invcdate BETWEEN \n\n \n findPeriodStart()\n \n \n AND findPeriodEnd()\n \n)\n \n AND (item_id=)\n\n \n AND (cust_id=)\n\n \n AND (cust_custtype_id=)\n\n\n AND (cust_custtype_id IN (SELECT custtype_id \n FROM custtype \n WHERE (custtype_code ~ )))\n\n \n AND (item_prodcat_id=) \n\n\n AND (item_prodcat_id IN (SELECT prodcat_id \n FROM prodcat \n WHERE (prodcat_code ~ )))\n\n \n AND (custgrp_id=) \n\n\n AND (custgrp_name ~ )\n\n \n AND(itemsite_warehous_id=) \n\n )) data\nGROUP BY\n\n cust_id, cust_number, cust_name, \n\n prodcat_id, prodcat_code, prodcat_descrip,\n\n item_id, item_number, item_descrip1,\n\n uom, warehous_code\nORDER BY \n\n cust_number,\n\n prodcat_code,\n\n item_number,\n\n uom, warehous_code;\n admin 2013-07-26 0 70 todolist detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: todolist\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT * FROM (\n/* ---------TO DO-------------- */\n SELECT todoitem_id AS id, \n 1 AS altId, \n AS type, \n CAST(incdt_number AS text) AS number,\n todoitem_name AS name,\n CASE WHEN (todoitem_active AND todoitem_status != 'C') THEN TRUE\n ELSE FALSE\n END AS active,\n CASE WHEN (todoitem_status='C') THEN \n WHEN (todoitem_status='D') THEN \n WHEN (todoitem_status='P') THEN \n WHEN (todoitem_status='I') THEN \n WHEN (todoitem_status='N') THEN \n ELSE '?'\n END AS stage,\n incdtpriority_name AS priority, \n incdtpriority_order AS seq,\n todoitem_owner_username AS owner, \n todoitem_username AS assigned, \n firstLine(todoitem_description) AS notes, \n todoitem_start_date as start, \n todoitem_due_date AS due, \n formatDate(todoitem_due_date) AS f_due, \n todoitem_start_date is not null AS hasStartDate,\n todoitem_due_date is not null AS hasDueDate,\n crmacct_id,\n crmacct_number, \n crmacct_name, \n CASE WHEN (todoitem_ophead_id IS NOT NULL) THEN\n 'OPP'\n WHEN (todoitem_incdt_id IS NOT NULL) THEN\n 'INCDT'\n END AS parent,\n CASE WHEN (todoitem_ophead_id IS NOT NULL) THEN\n || '-' || ophead_number\n WHEN (todoitem_incdt_id IS NOT NULL) THEN\n || '-' || incdt_number\n END AS parent_qtdisplayrole,\n CASE WHEN (todoitem_ophead_id IS NOT NULL) THEN\n || '-' || ophead_number\n WHEN (todoitem_incdt_id IS NOT NULL) THEN\n || '-' || incdt_number\n END AS f_parent,\n COALESCE(todoitem_ophead_id, todoitem_incdt_id) AS parent_xtidrole,\n COALESCE(crmacct_cust_id,-1) > 0 AS cust_qtdisplayrole,\n crmacct_cust_id AS cust,\n CASE WHEN (todoitem_active AND todoitem_due_date < CURRENT_DATE) THEN 'expired'\n WHEN (todoitem_active AND todoitem_due_date > CURRENT_DATE) THEN 'future'\n END AS due_qtforegroundrole \n\n FROM todoitem\n\n FROM todoitem() \n\n LEFT OUTER JOIN incdt ON (incdt_id=todoitem_incdt_id) \n LEFT OUTER JOIN ophead ON (ophead_id=todoitem_ophead_id)\n LEFT OUTER JOIN crmacct ON (crmacct_id=todoitem_crmacct_id) \n LEFT OUTER JOIN incdtpriority ON (incdtpriority_id=todoitem_priority_id) \n\n WHERE false\n\n WHERE true\n\n\n AND (todoitem_start_date <= )\n\n\n AND (todoitem_start_date >= )\n\n\n AND (todoitem_due_date <= )\n\n\n AND (todoitem_due_date >= )\n\n\n AND (crmacct_id =)\n\n\n AND (todoitem_status = 'C')\t\t\t\n\n AND (todoitem_status != 'C')\t\t\t\n\n\n AND ( IN (todoitem_username, todoitem_owner_username))\n\n \n AND (todoitem_username=) \n\n AND (todoitem_username ~ ) \n\n \n AND (todoitem_owner_username=) \n\n AND (todoitem_owner_username ~ ) \n\nUNION ALL\n/* ---------INCIDENT-------------- */\n SELECT incdt_id AS id, \n 2 AS altId, \n AS type, \n CAST(incdt_number AS text) AS number,\n incdt_summary AS name, \n incdt_status != 'L' AS active,\n CASE WHEN (incdt_status='N') THEN \n WHEN (incdt_status='F') THEN \n WHEN (incdt_status='C') THEN \n WHEN (incdt_status='A') THEN \n WHEN (incdt_status='R') THEN \n WHEN (incdt_status='L') THEN \n ELSE '?'\n END AS stage,\n incdtpriority_name AS priority,\n incdtpriority_order AS seq,\n incdt_owner_username AS owner, \n incdt_assigned_username AS assigned,\n firstLine(incdt_descrip) AS notes, \n CAST(incdt_timestamp AS date) AS start, \n null AS due, \n null AS f_due, \n false AS hasStartDate,\n false AS hasDueDate,\n crmacct_id,\n crmacct_number, \n crmacct_name,\n '' AS parent,\n '' AS parent_qtdisplay_role,\n '' AS f_parent,\n NULL AS parent_xtidrole,\n COALESCE(crmacct_cust_id,-1) > 0 AS cust_qtdisplayrole,\n COALESCE(crmacct_cust_id,-1) AS cust,\n NULL AS due_qtforegroundrole \n\n FROM incdt\n\n FROM incdt()\n\n LEFT OUTER JOIN crmacct ON (crmacct_id=incdt_crmacct_id) \n LEFT OUTER JOIN custinfo ON (cust_id=crmacct_cust_id)\n LEFT OUTER JOIN incdtpriority ON (incdtpriority_id=incdt_incdtpriority_id) \n\n WHERE false\n\n WHERE true\n\n\n AND (incdt_timestamp::date <= )\n\n\n AND (incdt_timestamp::date >= )\n\n\n AND false\n\n\n AND false\n\n\n AND (crmacct_id =)\n\n\n AND (incdt_status = 'L')\t\t\t\n\n AND (incdt_status != 'L')\t\t\t\n\n\n AND ( IN (incdt_assigned_username, incdt_owner_username))\n\n \n AND (incdt_assigned_username=) \n\n AND (incdt_assigned_username ~ ) \n\n \n AND (incdt_owner_username=) \n\n AND (incdt_owner_username ~ ) \n\nUNION ALL\n/* ---------PROJECT TASK-------------- */\n SELECT prjtask_id AS id, \n 3 AS altId, \n AS type,\n prjtask_number AS number,\n prjtask_name AS name, \n prjtask_status != 'C' AS active,\n CASE WHEN (prjtask_status='P') THEN \n WHEN (prjtask_status='O') THEN \n WHEN (prjtask_status='C') THEN \n ELSE '?'\n END AS stage,\n NULL AS priority, \n NULL AS seq, \n prjtask_owner_username AS owner, \n prjtask_username AS assigned, \n firstLine(prjtask_descrip) AS notes, \n prjtask_start_date AS start, \n prjtask_due_date AS due, \n formatDate(prjtask_due_date) AS f_due, \n prjtask_start_date is not null AS hasStartDate,\n prjtask_due_date is not null AS hasDueDate,\n NULL AS crmacct_id,\n '' AS crmacct_number, \n '' AS crmacct_name,\n 'PRJ' AS parent,\n || '-' || prj_number AS parent_qtdisplay_role,\n || '-' || prj_number AS f_parent,\n prjtask_prj_id AS parent_xtidrole,\n false AS cust_qtdisplayrole, \n null AS cust,\n CASE WHEN (prjtask_status != 'C' AND prjtask_due_date < CURRENT_DATE) THEN 'expired'\n WHEN (prjtask_status != 'C' AND prjtask_due_date > CURRENT_DATE) THEN 'future'\n END AS due_qtforegroundrole \n\n FROM prjtask\n\n FROM prjtask()\n\n JOIN prj ON (prj_id=prjtask_prj_id)\n\n WHERE false\n\n WHERE true\n\n\n AND (prjtask_start_date <= )\n\n\n AND (prjtask_start_date >= )\n\n\n AND (prjtask_due_date <= )\n\n\n AND (prjtask_due_date >= )\n\n\n AND (prjtask_status = 'C')\t\t\t\n\n AND (prjtask_status != 'C')\t\t\t\n\n\n AND ( IN (prjtask_username, prjtask_owner_username))\n\n \n AND (prjtask_username=) \n\n AND (prjtask_username ~ ) \n\n \n AND (prjtask_owner_username=) \n\n AND (prjtask_owner_username ~ ) \n\nUNION ALL\n/* ---------PROJECT-------------- */\n SELECT prj_id AS id, \n 4 AS altId, \n AS type,\n prj_number AS number,\n prj_name AS name, \n prj_status != 'C' AS active,\n CASE WHEN (prj_status='P') THEN \n WHEN (prj_status='O') THEN \n WHEN (prj_status='C') THEN \n ELSE '?'\n END AS stage,\n NULL AS priority, \n NULL AS seq,\n prj_owner_username AS owner, \n prj_username AS assigned,\n firstLine(prj_descrip) AS notes, \n prj_start_date AS start, \n prj_due_date AS due, \n formatDate(prj_due_date) AS f_due, \n prj_start_date IS NOT NULL AS hasStartDate,\n prj_due_date IS NOT NULL AS hasDueDate,\n null AS crmacct_id,\n '' AS crmacct_number, \n '' AS crmacct_name,\n '' AS parent,\n '' AS parent_qtdisplayrole,\n '' AS f_parent,\n NULL AS parent_xtidrole,\n false AS cust_qtdisplayrole, \n null AS cust,\n CASE WHEN (prj_status != 'C'AND prj_due_date < CURRENT_DATE) THEN 'expired'\n WHEN (prj_status != 'C'AND prj_due_date > CURRENT_DATE) THEN 'future'\n END AS due_qtforegroundrole \n\n FROM prj\n\n FROM prj()\n\n\n WHERE false\n\n WHERE true\n\n\n AND (prj_start_date <= )\n\n\n AND (prj_start_date >= )\n\n\n AND (prj_due_date <= )\n\n\n AND (prj_due_date >= )\n\n\n AND (prj_status = 'C')\t\t\t\n\n AND (prj_status != 'C')\t\t\t\n\n\n AND ( IN (prj_username, prj_owner_username))\n\n \n AND (prj_username=) \n\n AND (prj_username ~ ) \n\n \n AND (prj_owner_username=) \n\n AND (prj_owner_username ~ ) \n\nUNION ALL\n/* ---------OPPORTUNITY-------------- */\n SELECT ophead_id AS id, \n 5 AS altId, \n AS type, \n ophead_number AS number,\n ophead_name AS name, \n ophead_active AS active,\n opstage_descrip AS stage, \n incdtpriority_name AS priority, \n incdtpriority_order AS seq,\n ophead_owner_username AS owner, \n ophead_username AS assigned, \n firstLine(ophead_notes) AS notes, \n ophead_start_date AS start, \n ophead_target_date AS due, \n formatDate(ophead_target_date) AS f_due,\n ophead_start_date is not null AS hasStartDate,\n ophead_target_date is not null AS hasDueDate,\n crmacct_id,\n crmacct_number, \n crmacct_name, \n '' AS parent,\n '' AS parent_qtdisplayrole,\n '' AS f_parent,\n NULL AS parent_xtidrole,\n COALESCE(crmacct_cust_id,-1) > 0 AS cust_qtdisplayrole,\n crmacct_cust_id AS cust,\n CASE WHEN (ophead_active AND ophead_target_date < CURRENT_DATE) THEN 'expired'\n WHEN (ophead_active AND ophead_target_date > CURRENT_DATE) THEN 'future'\n END AS due_qtforegroundrole \n\n FROM ophead\n\n FROM ophead()\n\n JOIN opstage ON (ophead_opstage_id=opstage_id)\n LEFT OUTER JOIN crmacct ON (crmacct_id=ophead_crmacct_id) \n LEFT OUTER JOIN incdtpriority ON (incdtpriority_id=ophead_priority_id) \n\n WHERE false\n\n WHERE true\n\n\n AND (ophead_start_date <= )\n\n\n AND (ophead_start_date >= )\n\n\n AND (ophead_target_date <= )\n\n\n AND (ophead_target_date >= )\n\n\n AND (crmacct_id =)\n\n\n AND (NOT ophead_active)\t\t\t\n\n AND (ophead_active)\t\t\t\n\n\n AND ( IN (ophead_username, ophead_owner_username))\n\n \n AND (ophead_username=) \n\n AND (ophead_username ~ ) \n\n \n AND (ophead_owner_username=) \n\n AND (ophead_owner_username ~ ) \n\n) AS data\nORDER BY hasDueDate desc, due, hasStartDate desc, start\n admin 2013-07-26 0 358 trialBalances detail used by dspTrialBalances Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: trialBalances\n-- Name: detail\n-- Notes: used by dspTrialBalances\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT accnt_id, period_id, accnt_descrip, trialbal_dirty,\n period_start, period_end,\n formatGLAccount(accnt_id) AS account,\n (trialbal_debits) AS debits,\n (trialbal_credits) AS credits,\n trialbal_beginning AS beginning,\n trialbal_ending AS ending,\n (trialbal_debits - trialbal_credits) AS diff,\n CASE WHEN ((trialbal_beginning*-1.0)<0.0) THEN 'CR' END AS beginningsense,\n CASE WHEN ((trialbal_ending*-1.0)<0.0) THEN 'CR' END AS endingsense,\n CASE WHEN ((trialbal_debits - trialbal_credits)<0.0) THEN 'CR' END AS diffsense,\n 'curr' AS beginning_xtnumericrole,\n 'curr' AS debits_xtnumericrole,\n 'curr' AS credits_xtnumericrole,\n 'curr' AS ending_xtnumericrole,\n 'curr' AS diff_xtnumericrole,\n 0 AS beginning_xttotalrole,\n 0 AS debits_xttotalrole,\n 0 AS credits_xttotalrole,\n 0 AS ending_xttotalrole,\n 0 AS diff_xttotalrole,\n CASE WHEN (trialbal_beginning < 0.0) THEN ABS(trialbal_beginning) END AS beginning_qtdisplayrole,\n CASE WHEN (trialbal_ending < 0.0) THEN ABS(trialbal_ending) END AS ending_qtdisplayrole,\n CASE WHEN ((trialbal_debits - trialbal_credits) < 0.0) THEN ABS(trialbal_debits - trialbal_credits) END AS diff_qtdisplayrole,\n CASE WHEN (trialbal_dirty) THEN 'warning' END AS ending_qtforegroundrole\nFROM trialbal, accnt, period\n\n ,company\n\nWHERE ((trialbal_accnt_id=accnt_id)\n AND (trialbal_period_id=period_id)\n\n AND (trialbal_accnt_id=)\n\n\n AND (accnt_company=company_number)\n AND (company_id=)\n\n\n AND (period_id=)\n\n\n AND (abs(trialbal_beginning)+abs(trialbal_ending)+abs(trialbal_debits)+abs(trialbal_credits) > 0)\n\n )\nORDER BY period_start, formatGLAccount(accnt_id);\n admin 2013-07-26 0 546 uiforms detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: uiforms\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT uiform_id, uiform_name, uiform_enabled,\n firstline(uiform_notes) AS uiform_notes, uiform_order,\n CASE nspname WHEN 'public' THEN '' ELSE nspname END AS pkgname,\n CASE nspname WHEN 'public' THEN 0\n ELSE 1 END AS xtindentrole,\n uiform_notes AS uiform_notes_qttooltiprole\n FROM uiform\n JOIN pg_class ON (uiform.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nUNION \nSELECT -1, pkghead_name, NULL,\n firstline(pkghead_descrip), NULL,\n pkghead_name, 0, pkghead_descrip\n FROM uiform, pg_class, pg_namespace\n RIGHT OUTER JOIN pkghead ON (nspname=pkghead_name) \n WHERE ((uiform.tableoid=pg_class.oid)\n AND (relnamespace=pg_namespace.oid))\n ORDER BY pkgname, xtindentrole, uiform_name,\n uiform_order, uiform_id;\n\nSELECT uiform_id, uiform_name, uiform_enabled,\n firstline(uiform_notes) AS uiform_notes,\n uiform_order,\n CASE nspname WHEN 'public' THEN '' ELSE nspname END AS pkgname,\n uiform_notes AS uiform_notes_qttooltiprole\n FROM uiform\n JOIN pg_class ON (uiform.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nORDER BY uiform_name, uiform_order, uiform_id;\n\n admin 2013-07-26 0 359 unbalancedQOHByClassCode detail used by dspUnbalancedQOHByClassCode Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: unbalancedQOHByClassCode\n-- Name: detail\n-- Notes: used by dspUnbalancedQOHByClassCode\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, warehous_code, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip, uom_name,\n itemsite_qtyonhand,\n detailedQOH(itemsite_id, FALSE) AS detailedqoh,\n itemsite_nnqoh,\n detailedNNQOH(itemsite_id, FALSE) AS detailednnqoh,\n 'qty' AS itemsite_qtyonhand_xtnumericrole,\n 'qty' AS detailedqoh_xtnumericrole,\n 'qty' AS itemsite_nnqoh_xtnumericrole,\n 'qty' AS detailednnqoh_xtnumericrole\nFROM whsinfo, item, itemsite, uom\nWHERE ( (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND ((itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S')))\n AND ((itemsite_qtyonhand <> detailedQOH(itemsite_id, FALSE))\n OR (itemsite_nnqoh <> detailedNNQOH(itemsite_id, FALSE)))\n\n AND (item_classcode_id=)\n\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ )))\n\n\n AND (warehous_id=)\n\n )\nORDER BY item_number;\n admin 2013-07-26 0 360 undefinedManufacturedItems detail used by dspUndefinedManufacturedItems Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: undefinedManufacturedItems\n-- Name: detail\n-- Notes: used by dspUndefinedManufacturedItems\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT item_id, 2, item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n item_type, item_active, AS exception\nFROM item\nWHERE ((item_type IN ('M', 'F'))\n AND (item_id NOT IN (SELECT DISTINCT bomitem_parent_item_id\n FROM bomitem))\n\n AND (item_active)\n\n )\nORDER BY item_number;\n admin 2013-07-26 0 361 uninvoicedReceivings detail used by dspUninvoicedReceivings Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: uninvoicedReceivings\n-- Name: detail\n-- Notes: used by dspUninvoicedReceivings\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT recv_id AS id,\n CASE WHEN(poitem_status='C') THEN 2\n ELSE 1\n END AS doctype,\n recv_date AS thedate,\n recv_trans_usr_name AS f_user,\n recv_order_number AS ponumber, poitem_linenumber,\n vend_name,\n COALESCE(item_number,\n ('Misc. - ' || recv_vend_item_number)) AS itemnumber,\n recv_qty AS qty, 'qty' AS qty_xtnumericrole,\n 'Receipt' AS type,\n recv_value AS value,\n 'curr' AS value_xtnumericrole, 0 AS value_xttotalrole\nFROM recv, vendinfo,\n poitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id))\n ON (poitem_itemsite_id=itemsite_id)\nWHERE ((recv_orderitem_id=poitem_id)\n AND (recv_order_type='PO')\n AND (recv_vend_id=vend_id)\n AND (recv_posted)\n AND (recv_vohead_id IS NULL)\n AND (NOT recv_invoiced)\n\n AND (itemsite_warehous_id=)\n\n\n AND (recv_agent_username=)\n\n )\n\nUNION\n\nSELECT poreject_id AS id,\n 3 AS doctype,\n poreject_date AS thedate,\n poreject_trans_username AS f_user,\n poreject_ponumber AS ponumber, poitem_linenumber,\n vend_name,\n COALESCE(item_number,\n ('Misc. - ' || poreject_vend_item_number)) AS itemnumber,\n poreject_qty, 'qty' AS qty_xtnumericrole,\n 'Return' AS type,\n poreject_value * -1 AS value,\n 'curr' AS value_xtnumericrole, 0 AS value_xtotalrole\nFROM poreject, vendinfo,\n poitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id))\n ON (poitem_itemsite_id=itemsite_id)\nWHERE ((poreject_poitem_id=poitem_id)\n AND (poreject_vend_id=vend_id)\n AND (poreject_posted)\n AND (NOT poreject_invoiced)\n\n AND (itemsite_warehous_id=)\n\n\n AND (poreject_agent_username=)\n\n )\nORDER BY ponumber, poitem_linenumber;\n admin 2013-07-26 0 552 uninvoicedShipments detail used by uninvoicedShipments Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: uninvoicedShipments\n-- Name: detail\n-- Notes: used by uninvoicedShipments\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cohead_id, shipitem_id, cohead_number, coitem_linenumber,\n cust_number, cust_name,\n item_number, description,\n uom_name, shipped, selected,\n CASE WHEN (level=0) THEN cohead_number\n ELSE CAST(coitem_linenumber AS TEXT)\n END AS orderline,\n CASE WHEN (level=0) THEN cust_number\n ELSE item_number\n END AS custitem,\n CASE WHEN (level=0) THEN cust_name\n ELSE description\n END AS custdescrip,\n 'qty' AS shipped_xtnumericrole,\n 'qty' AS selected_xtnumericrole,\n level AS xtindentrole\nFROM (\nSELECT cohead_id, -1 AS shipitem_id, cohead_number, -1 AS coitem_linenumber, 0 AS level,\n cust_number, cust_name,\n '' AS item_number, '' AS description,\n '' AS uom_name,\n COALESCE(SUM(shipitem_qty), 0) AS shipped,\n COALESCE(SUM(cobill_qty), 0) AS selected\nFROM cohead, custinfo, itemsite, item, whsinfo, shipitem, shiphead, uom,\n coitem LEFT OUTER JOIN\n ( cobill JOIN cobmisc\n ON ( (cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) )\n ON (cobill_coitem_id=coitem_id)\nWHERE ( (cohead_cust_id=cust_id)\n AND (shipitem_orderitem_id=coitem_id)\n AND (shipitem_shiphead_id=shiphead_id)\n AND (shiphead_order_type='SO')\n AND (coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_qty_uom_id=uom_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (shiphead_shipped)\n AND (NOT shipitem_invoiced)\n\n AND (itemsite_warehous_id=)\n\n )\nGROUP BY cohead_id, cohead_number, cust_number, cust_name\n\nUNION\nSELECT cohead_id, shipitem_id, cohead_number, coitem_linenumber, 1 AS level,\n cust_number, cust_name,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS description,\n uom_name,\n COALESCE(SUM(shipitem_qty), 0) AS shipped,\n COALESCE(SUM(cobill_qty), 0) AS selected\nFROM cohead, custinfo, itemsite, item, whsinfo, shipitem, shiphead, uom,\n coitem LEFT OUTER JOIN\n ( cobill JOIN cobmisc\n ON ( (cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) )\n ON (cobill_coitem_id=coitem_id)\nWHERE ( (cohead_cust_id=cust_id)\n AND (shipitem_orderitem_id=coitem_id)\n AND (shipitem_shiphead_id=shiphead_id)\n AND (shiphead_order_type='SO')\n AND (coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_qty_uom_id=uom_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (shiphead_shipped)\n AND (NOT shipitem_invoiced)\n\n AND (itemsite_warehous_id=)\n\n )\nGROUP BY cohead_number, cust_number, cust_name,\n coitem_id, coitem_linenumber, item_number,\n item_descrip1, item_descrip2, cohead_id, shipitem_id, uom_name\n \n ) AS data\n\n\n WHERE (selected = 0)\n\n\nORDER BY cohead_number DESC, level, coitem_linenumber DESC;\n admin 2013-07-26 0 56 unpostedCashReceipts detail Used by arWorkBench, cashReceiptsEditList Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: unpostedCashReceipts\n-- Name: detail\n-- Notes: Used by arWorkBench, cashReceiptsEditList\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT\n cashrcpt_id, \n cashrcpt_number,\n cust_number,\n cust_name,\n cashrcpt_docnumber, \n bankaccnt_name,\n cashrcpt_distdate,\n cashrcpt_amount, \n currConcat(cashrcpt_curr_id) AS currabbr,\n CASE\n WHEN (cashrcpt_fundstype ='C') THEN \n WHEN (cashrcpt_fundstype ='T') THEN \n WHEN (cashrcpt_fundstype ='M') THEN \n WHEN (cashrcpt_fundstype ='V') THEN \n WHEN (cashrcpt_fundstype ='A') THEN \n WHEN (cashrcpt_fundstype ='D') THEN \n WHEN (cashrcpt_fundstype ='R') THEN \n WHEN (cashrcpt_fundstype ='K') THEN \n WHEN (cashrcpt_fundstype ='W') THEN \n WHEN (cashrcpt_fundstype ='O') THEN \n END AS cashrcpt_fundstype,\n 'curr' AS cashrcpt_amount_xtnumericrole \nFROM cashrcpt, bankaccnt, custinfo\n\n JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n JOIN custgrp ON (custgrp_id=custgrpitem_custgrp_id)\n\n, custtype\nWHERE ( (NOT cashrcpt_posted)\n AND (NOT cashrcpt_void)\n AND (cashrcpt_bankaccnt_id=bankaccnt_id)\n AND (cashrcpt_cust_id=cust_id)\n AND (cust_custtype_id=custtype_id)\n\n AND (cashrcpt_cust_id=)\n\n\n AND (custgrp_id=)\n\n\n AND (custtype_id=)\n\n\n AND (custtype_code~)\n\n)\nORDER BY cashrcpt_distdate;\n\n admin 2013-07-26 0 57 unpostedReceipts detail used by unpostedPoReceipts -------PURCHASE ORDERS---------- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: unpostedReceipts\n-- Name: detail\n-- Notes: used by unpostedPoReceipts\n---------PURCHASE ORDERS----------\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT recv_id, recv_orderitem_id, recv_order_number, recv_order_type,\n vend_name AS orderhead_from,\n poitem_linenumber AS orderitem_linenumber,\n formatDate(recv_duedate) AS recv_duedate,\n warehous_code,\n COALESCE(item_number, ) AS item_number,\n COALESCE(uom_name, ) AS uom_name,\n recv_vend_item_number,\n recv_vend_uom,\n poitem_qty_ordered AS orderitem_qty_ordered, \n poitem_qty_received AS orderitem_qty_received,\n recv_qty, recv_date,\n COALESCE(recv_gldistdate, recv_date) AS recv_gldistdate,\n 'qty' AS orderitem_qty_ordered_xtnumericrole,\n 'qty' AS orderitem_qty_received_xtnumericrole,\n 'qty' AS recv_qty_xtnumericrole\nFROM pohead JOIN\n poitem ON (poitem_pohead_id=pohead_id) JOIN \n recv ON ((recv_orderitem_id=poitem_id)\n\t AND (recv_order_type='PO')) LEFT OUTER JOIN\n (itemsite JOIN item ON (itemsite_item_id=item_id)\n\t JOIN uom ON (item_inv_uom_id=uom_id)\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n )\n ON (recv_itemsite_id=itemsite_id) JOIN\n vendinfo ON (pohead_vend_id=vend_id)\nWHERE (NOT recv_posted)\n\n-------RETURN AUTHORIZATIONS--------------\nUNION\nSELECT recv_id, recv_orderitem_id, recv_order_number, recv_order_type,\n cust_name AS orderhead_from,\n raitem_linenumber AS orderitem_linenumber,\n formatDate(recv_duedate) AS recv_duedate,\n warehous_code,\n COALESCE(item_number, ) AS item_number,\n COALESCE(uom_name, ) AS uom_name,\n recv_vend_item_number,\n recv_vend_uom,\n raitem_qtyauthorized AS orderitem_qty_ordered, \n raitem_qtyreceived AS orderitem_qty_received,\n recv_qty, recv_date,\n COALESCE(recv_gldistdate, recv_date) AS recv_gldistdate,\n 'qty' AS orderitem_qty_ordered_xtnumericrole,\n 'qty' AS orderitem_qty_received_xtnumericrole,\n 'qty' AS recv_qty_xtnumericrole\nFROM rahead JOIN\n raitem ON (raitem_rahead_id=rahead_id) JOIN \n recv ON ((recv_orderitem_id=raitem_id)\n\t AND (recv_order_type='RA')) LEFT OUTER JOIN\n (itemsite JOIN item ON (itemsite_item_id=item_id)\n\t JOIN uom ON (item_inv_uom_id=uom_id)\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n )\n ON (recv_itemsite_id=itemsite_id) LEFT OUTER JOIN\n custinfo ON (rahead_cust_id=cust_id)\nWHERE (NOT recv_posted)\n\n\n------TRANSFER ORDERS---------\nUNION\nSELECT recv_id, recv_orderitem_id, recv_order_number, recv_order_type,\n tohead_srcname AS orderhead_from,\n toitem_linenumber AS orderitem_linenumber,\n formatDate(recv_duedate) AS recv_duedate,\n warehous_code,\n COALESCE(item_number, ) AS item_number,\n COALESCE(uom_name, ) AS uom_name,\n recv_vend_item_number,\n recv_vend_uom,\n toitem_qty_ordered AS orderitem_qty_ordered, \n toitem_qty_received AS orderitem_qty_received,\n recv_qty, recv_date,\n COALESCE(recv_gldistdate, recv_date) AS recv_gldistdate,\n 'qty' AS orderitem_qty_ordered_xtnumericrole,\n 'qty' AS orderitem_qty_received_xtnumericrole,\n 'qty' AS recv_qty_xtnumericrole\nFROM tohead JOIN\n toitem ON (toitem_tohead_id=tohead_id) JOIN \n recv ON ((recv_orderitem_id=toitem_id)\n\t AND (recv_order_type='TO')) LEFT OUTER JOIN\n (itemsite JOIN item ON (itemsite_item_id=item_id)\n\t JOIN uom ON (item_inv_uom_id=uom_id)\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n )\n ON (recv_itemsite_id=itemsite_id) \nWHERE (NOT recv_posted)\n\nORDER BY recv_order_number, orderitem_linenumber;\n admin 2013-07-26 0 362 unusedPurchasedItems detail used by dspUnusedPurchasedItems.cpp Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: unusedPurchasedItems\n-- Name: detail\n-- Notes: used by dspUnusedPurchasedItems.cpp\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT item_id, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip, uom_name,\n SUM(itemsite_qtyonhand) AS qoh,\n MAX(itemsite_datelastcount) AS lastcount,\n MAX(itemsite_datelastused) AS lastused,\n 'qty' AS qoh_xtnumericrole,\n CASE WHEN (COALESCE(MAX(itemsite_datelastcount), startOfTime()) = startOfTime()) THEN 'Never' END AS lastcount_qtdisplayrole,\n CASE WHEN (COALESCE(MAX(itemsite_datelastused), startOfTime()) = startOfTime()) THEN 'Never' END AS lastused_qtdisplayrole \nFROM item, itemsite, uom \nWHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (item_id NOT IN (SELECT DISTINCT bomitem_item_id FROM bomitem))\n AND (NOT item_sold)\n AND (item_type IN ('P', 'O')) \n\n AND (item_classcode_id=) \n\n AND (item_classcode_id IN (SELECT classcode_id FROM classcode WHERE (classcode_code ~ ))) \n\n\n AND (itemsite_controlmethod <> 'N')\n\n) \nGROUP BY item_id, item_number, uom_name, item_descrip1, item_descrip2 \nORDER BY item_number;\n admin 2013-07-26 0 553 uoms item used by bomItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: uoms\n-- Name: item\n-- Notes: used by bomItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT uom_id, uom_name\n FROM item\n JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE(item_id=)\nUNION\nSELECT uom_id, uom_name\n FROM item\n JOIN itemuomconv ON (itemuomconv_item_id=item_id)\n JOIN uom ON (itemuomconv_to_uom_id=uom_id),\n itemuom, uomtype\n WHERE (itemuomconv_from_uom_id=item_inv_uom_id)\n AND (item_id=)\n AND (itemuom_itemuomconv_id=itemuomconv_id)\n AND (uomtype_id=itemuom_uomtype_id)\n\n AND (uomtype_name=)\n\nUNION\nSELECT uom_id, uom_name\n FROM item\n JOIN itemuomconv ON (itemuomconv_item_id=item_id)\n JOIN uom ON (itemuomconv_from_uom_id=uom_id),\n itemuom, uomtype\n WHERE (itemuomconv_to_uom_id=item_inv_uom_id)\n AND (item_id=)\n AND (itemuom_itemuomconv_id=itemuomconv_id)\n AND (uomtype_id=itemuom_uomtype_id)\n\n AND (uomtype_name=)\n\n ORDER BY uom_name;\n admin 2013-07-26 0 194 updateListPrices update Calculates and immediately updates list prices to the database Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateListPrices\n-- Name: update\n-- Notes: Calculates and immediately updates list prices to the database\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE item SET item_listprice=\n\n item_listprice + \n\n item_listprice * (1.0 + ( / 100.0))\n\nWHERE (item_sold)\n\n AND (item_prodcat_id=)\n\n AND (item_prodcat_id IN (SELECT prodcat_id FROM prodcat WHERE (prodcat_code ~ )))\n\n admin 2013-07-26 0 195 updateprices add Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateprices\n-- Name: add\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n INSERT INTO selsched\n\n VALUES ();\n\n SELECT ipshead_id\n FROM ipshead\n WHERE ( (ipshead_id NOT IN (\n \tSELECT selsched_ipshead_id\n \tFROM selsched\n \tWHERE (selsched_ipshead_id=ipshead_id)))\n\n AND (ipshead_effective <= CURRENT_DATE)\n\n\n AND (ipshead_expires > CURRENT_DATE)\n\n\n AND (CURRENT_DATE NOT BETWEEN ipshead_effective AND ipshead_expires -1)\n\n );\n\n admin 2013-07-26 0 196 updateprices availsched Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateprices\n-- Name: availsched\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT ipshead_id, ipshead_name, ipshead_descrip,\n ipshead_effective, ipshead_expires,\n CASE WHEN COALESCE(ipshead_effective, startOfTime()) <= startOfTime() THEN \n\t'Always' END AS ipshead_effective_qtdisplayrole,\n CASE WHEN COALESCE(ipshead_expires, endOfTime()) >= endOfTime() THEN \n\t'Never' END AS ipshead_expires_qtdisplayrole\nFROM ipshead\nWHERE ( (ipshead_id NOT IN (\n \tSELECT selsched_ipshead_id\n \tFROM selsched\n \tWHERE (selsched_ipshead_id=ipshead_id)))\n\n AND (ipshead_effective <= CURRENT_DATE)\n\n\n AND (ipshead_expires > CURRENT_DATE)\n\n\n AND (CURRENT_DATE NOT BETWEEN ipshead_effective AND ipshead_expires -1)\n\n )\nORDER BY ipshead_effective, ipshead_name;\n admin 2013-07-26 0 198 updateprices dropselsched Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateprices\n-- Name: dropselsched\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDROP TABLE selsched;\n admin 2013-07-26 0 199 updateprices remove Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateprices\n-- Name: remove\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM selsched\n\nWHERE (selsched_ipshead_id=)\n\n;\n admin 2013-07-26 0 200 updateprices selsched Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateprices\n-- Name: selsched\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT selsched_ipshead_id, ipshead_name, ipshead_descrip\nFROM selsched\n JOIN ipshead ON (selsched_ipshead_id=ipshead_id)\nORDER BY ipshead_name\n admin 2013-07-26 0 59 updateReorderLevels query Calculates reorder point levels and returns a proposed result set Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateReorderLevels\n-- Name: query\n-- Notes: Calculates reorder point levels and returns a proposed result set\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n 'qty' AS reordlvl_curr_level_xtnumericrole,\n 'qty' AS reordlvl_total_usage_xtnumericrole\nFROM updateReorderLevel((\n SELECT array(\n SELECT itemsite_id\n FROM itemsite\n JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN plancode ON (itemsite_plancode_id=plancode_id)\n LEFT OUTER JOIN classcode ON (item_classcode_id=classcode_id)\n WHERE ( (itemsite_active)\n\n AND (itemsite_warehous_id=)\n\n\n AND (item_id=)\n\n AND (item_classcode_id=)\n\n AND (classcode_code ~ )\n\n AND (itemsite_plancode_id=)\n\n AND (plancode_code ~ )\n\n )\n )\n),\n, \n\n true,\n\n false,\n\n\nARRAY[\n \n \n ,\n \n \n ]\n)\nORDER BY reordlvl_warehous_code, reordlvl_item_number;\n admin 2013-07-26 0 230 usageStatistics detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: usageStatistics\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n \n formatQty(transfer) AS f_transfer,\n \n formatQty(received) AS f_received,\n formatQty(issued) AS f_issued,\n formatQty(sold) AS f_sold,\n formatQty(scrap) AS f_scrap,\n formatQty(adjust) AS f_adjust,\n 'qty' AS received_xtnumericrole,\n 'qty' AS issued_xtnumericrole,\n 'qty' AS sold_xtnumericrole,\n 'qty' AS scrap_xtnumericrole,\n 'qty' AS adjust_xtnumericrole,\n 'qty' AS transfer_xtnumericrole\nFROM (\nSELECT itemsite_id, item_id, warehous_code,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n \n summTransT(itemsite_id, , ) AS transfer,\n \n summTransR(itemsite_id, , ) AS received,\n summTransI(itemsite_id, , ) AS issued,\n summTransS(itemsite_id, , ) AS sold,\n summTransC(itemsite_id, , ) AS scrap,\n summTransA(itemsite_id, , ) AS adjust\nFROM item JOIN itemsite ON (itemsite_item_id=item_id)\n JOIN whsinfo ON (warehous_id=itemsite_warehous_id)\nWHERE (1=1)\n\n\n AND (item_id=)\n\n\n\n AND (itemsite_warehous_id=)\n\n\n\n AND (item_classcode_id=)\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem\n\t\t WHERE (itemgrpitem_itemgrp_id=)))\n\n AND (itemsite_plancode_id=)\n\n AND (item_classcode_id IN (SELECT classcode_id\n\t\t\t FROM classcode\n\t\t\t WHERE (classcode_code ~ )))\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem, itemgrp\n\t\t WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t AND (itemgrp_name ~ ))))\n\n AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ )))\n\n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n\n) AS data\n\nORDER BY warehous_code, item_number;\n admin 2013-07-26 0 60 updateReorderLevels update Calculates and immediatly updates reorder point levels to the database Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateReorderLevels\n-- Name: update\n-- Notes: Calculates and immediatly updates reorder point levels to the database\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT updateReorderLevel(itemsite_id,, \nARRAY[\n \n \n ,\n \n \n ]\n) AS result\nFROM itemsite\n JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN plancode ON (itemsite_plancode_id=plancode_id)\n LEFT OUTER JOIN classcode ON (item_classcode_id=classcode_id)\nWHERE ( (itemsite_active)\n AND (itemsite_useparams)\n\n AND (itemsite_warehous_id=)\n\n\n AND (item_id=)\n\n AND (item_classcode_id=)\n\n AND (classcode_code ~ )\n\n AND (itemsite_plancode_id=)\n\n AND (plancode_code ~ )\n\n)\n admin 2013-07-26 0 363 validLocationsByItem detail used by dspValidLocationsByItem.cpp Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: validLocationsByItem\n-- Name: detail\n-- Notes: used by dspValidLocationsByItem.cpp\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT location_id, warehous_code,\n formatLocationName(location_id) AS locationname,\n firstLine(location_descrip) AS locationdescrip,\n location_restrict, location_netable\nFROM itemsite, location, whsinfo\nWHERE ((validLocation(location_id, itemsite_id))\n AND ((itemsite_loccntrl) OR (itemsite_location_id=location_id))\n AND (itemsite_item_id=)\n AND (itemsite_warehous_id=warehous_id)\n\n AND (warehous_id=)\n\n )\nORDER BY warehous_code, locationname;\n admin 2013-07-26 0 364 vendorAPHistory detail used by dspVendorAPHistory Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: vendorAPHistory\n-- Name: detail\n-- Notes: used by dspVendorAPHistory\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT apopen_id, -1 AS applyid, 0 AS type,\n apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n apopen_docnumber AS docnumber,\n formatBoolYN(apopen_open) AS f_open,\n CASE WHEN (apopen_doctype='V') THEN \n WHEN (apopen_doctype='C') THEN \n WHEN (apopen_doctype='D') THEN \n ELSE \n END AS documenttype,\n apopen_invcnumber AS invoicenumber,\n apopen_ponumber AS ponumber,\n apopen_docdate AS docdate, apopen_duedate AS duedate, apopen_amount AS amount,\n (apopen_amount - apopen_paid) AS balance,\n currconcat(apopen_curr_id) AS currAbbr,\n CASE WHEN (apopen_doctype='C') THEN apopen_amount / apopen_curr_rate * -1.0\n ELSE apopen_amount / apopen_curr_rate\n END AS base_amount,\n 0 AS base_applied,\n CASE WHEN (apopen_doctype='C') THEN (apopen_amount - apopen_paid) / apopen_curr_rate * -1.0\n ELSE (apopen_amount - apopen_paid) / apopen_curr_rate\n END AS base_balance,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS base_applied_xtnumericrole,\n 0 AS base_applied_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n 0 AS xtindentrole \nFROM apopen \nWHERE ( (apopen_vend_id=) \n AND (apopen_docdate BETWEEN AND ) ) \n\nUNION \nSELECT apopen_id, apapply_source_apopen_id AS applyid, 1 AS type,\n apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n apapply_source_docnumber AS docnumber,\n '' AS f_open,\n CASE WHEN (apapply_source_doctype='C') THEN \n WHEN (apapply_source_doctype='K') THEN \n ELSE \n END AS documenttype,\n ' ' AS invoicenumber,\n '' AS ponumber,\n apapply_postdate AS docdate, CAST(NULL AS DATE) AS duedate,\n apapply_amount AS amount,\n 0 AS balance,\n currconcat(apapply_curr_id) AS currAbbr,\n 0 AS base_amount,\n (apapply_amount / apopen_curr_rate) AS base_applied, \n 0 AS base_balance,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS base_applied_xtnumericrole,\n 0 AS base_applied_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n 1 AS xtindentrole \nFROM apapply, apopen \nWHERE ( (apapply_target_apopen_id=apopen_id)\n AND (apapply_vend_id=)\n AND (apopen_vend_id=)\n AND (apopen_docdate BETWEEN AND ) ) \n\nUNION \nSELECT apopen_id, apapply_target_apopen_id AS applyid, 2 AS type,\n apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n apapply_target_docnumber AS docnumber,\n '' AS f_open,\n CASE WHEN (apapply_target_doctype='V') THEN \n WHEN (apapply_target_doctype='D') THEN \n ELSE \n END AS documenttype,\n apopen_invcnumber AS invoicenumber,\n '' AS ponumber,\n apapply_postdate AS docdate, CAST(NULL AS DATE) AS duedate,\n apapply_amount AS amount,\n 0 AS balance,\n currconcat(apapply_curr_id) AS currAbbr,\n 0 AS base_amount,\n (apapply_amount / apopen_curr_rate) AS base_applied, \n 0 AS base_balance,\n 'curr' AS amount_xtnumericrole,\n 'curr' AS base_amount_xtnumericrole,\n 0 AS base_amount_xttotalrole,\n 'curr' AS base_applied_xtnumericrole,\n 0 AS base_applied_xttotalrole,\n 'curr' AS balance_xtnumericrole,\n 'curr' AS base_balance_xtnumericrole,\n 0 AS base_balance_xttotalrole,\n 1 AS xtindentrole \nFROM apapply, apopen \nWHERE ( (apapply_source_doctype IN ('C', 'K'))\n AND (apapply_source_doctype=apopen_doctype)\n AND (apapply_source_docnumber=apopen_docnumber)\n AND (apapply_vend_id=)\n AND (apopen_vend_id=)\n AND (apopen_docdate BETWEEN AND ) ) \nORDER BY sortdate, apopen_id, type;\n admin 2013-07-26 0 365 vendors detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: vendors\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n vend_id, vend_vendtype_id, \n vend_active, vend_number, vend_name,\n vendtype_code,\n cntct.*, addr.*\nFROM vendinfo \n JOIN vendtype ON (vend_vendtype_id=vendtype_id)\n LEFT OUTER JOIN cntct ON (vend_cntct1_id=cntct_id) \n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) \nWHERE true\n \n AND vend_active \n\n\n AND ((vend_number ~* )\n OR (vend_name ~* )\n OR (vendtype_code ~* )\n OR (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n OR (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n OR (COALESCE(cntct_email,'') ~* )\n OR (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n OR (COALESCE(addr_city,'') ~* )\n OR (COALESCE(addr_state,'') ~* )\n OR (COALESCE(addr_postalcode,'') ~* )\n OR (COALESCE(addr_country,'') ~* ))\n\n\n AND (vend_number ~* )\n\n\n AND (vend_name ~* )\n\n\n AND (vendtype_code ~* )\n\n\n AND (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* )\n\n\n AND (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* )\n\n\n AND (COALESCE(cntct_email,'') ~* )\n\n\n AND (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* )\n\n\n AND (COALESCE(addr_city,'') ~* )\n\n\n AND (COALESCE(addr_state,'') ~* )\n\n\n AND (COALESCE(addr_postalcode,'') ~* )\n\n\n AND (COALESCE(addr_country,'') ~* )\n\nORDER BY vend_number; \n admin 2013-07-26 0 558 voucherItem distributions used by voucherItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: voucherItem\n-- Name: distributions\n-- Notes: used by voucherItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT vodist_id, vodist_amount,\n COALESCE(costelem_type, ) AS costelem_type,\n 'currval' AS vodist_amount_xtnumericrole\nFROM vodist\n LEFT OUTER JOIN costelem ON (vodist_costelem_id=costelem_id)\nWHERE ( (vodist_poitem_id=)\n AND (vodist_vohead_id=) );\n admin 2013-07-26 0 559 voucherItem receipts used by voucherItem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: voucherItem\n-- Name: receipts\n-- Notes: used by voucherItem\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT recv_id AS item_id, 1 AS item_type, 'REC' AS action,\n recv_date AS item_date,\n recv_qty AS qty, 'qty' AS qty_xtnumericrole,\n recv_purchcost AS unitprice, 'curr' AS unitprice_xtnumericrole,\n formatBoolYN(recv_vohead_id=) AS f_tagged,\n AS action_qtdisplayrole,\n 0 AS qty_xttotalrole\nFROM recv\nWHERE ( (NOT recv_invoiced)\n AND (recv_posted)\n AND ((recv_vohead_id IS NULL) OR (recv_vohead_id=))\n AND (recv_orderitem_id=) )\n\nUNION\nSELECT poreject_id AS item_id, 2 AS item_type, 'REJ' AS action,\n poreject_date AS item_date,\n poreject_qty * -1 AS qty, 'qty',\n COALESCE(recv_purchcost, poitem_unitprice) AS unitprice, 'curr' AS unitprice_xtnumericrole,\n formatBoolYN(poreject_vohead_id=) AS f_tagged,\n AS action_qtdisplayrole,\n 0 AS qty_xttotalrole\nFROM poreject LEFT OUTER JOIN recv ON (recv_id=poreject_recv_id)\n LEFT OUTER JOIN poitem ON (poitem_id=poreject_poitem_id)\nWHERE ( (poreject_posted)\n AND (NOT poreject_invoiced)\n AND ((poreject_vohead_id IS NULL) OR (poreject_vohead_id=))\n AND (poreject_poitem_id=) );\n admin 2013-07-26 0 202 updateprices update Notes: Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateprices\n-- Name: update\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE ipsiteminfo SET\n ipsitem_price=\n\n ipsitem_price + \n\n roundSale(ipsitem_price * (1.0 + ( / 100.0)))\n\nFROM selsched, item\n\n JOIN itemgrpitem ON (itemgrpitem_item_id=item_id)\n JOIN itemgrp ON (itemgrpitem_itemgrp_id=itemgrp_id)\n\n JOIN prodcat ON (prodcat_id=item_prodcat_id)\n\nWHERE ( ipsitem_item_id=item_id\n AND selsched_ipshead_id=ipsitem_ipshead_id\n\n AND item_id=\n\n AND itemgrp_id=\n\n AND itemgrp_name ~ \n\n AND prodcat_id=\n\n AND prodcat_code ~ \n\n);\n admin 2013-07-26 0 201 updateprices updatechar used by updatePrices Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateprices\n-- Name: updatechar\n-- Notes: used by updatePrices\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE ipsitemchar SET\n ipsitemchar_price=\n\n ipsitemchar_price + \n\n roundSale(ipsitemchar_price * (1.0 + ( / 100.0)))\n\nFROM selsched, ipsiteminfo, item\n\n JOIN itemgrpitem ON (itemgrpitem_item_id=item_id)\n JOIN itemgrp ON (itemgrpitem_itemgrp_id=itemgrp_id)\n\n JOIN prodcat ON (prodcat_id=item_prodcat_id)\n\nWHERE ( ipsitemchar_ipsitem_id=ipsitem_id\n AND ipsitem_item_id=item_id\n AND selsched_ipshead_id=ipsitem_ipshead_id\n\n AND item_id=\n\n AND itemgrp_id=\n\n AND itemgrp_name ~ \n\n AND prodcat_id=\n\n AND prodcat_code ~ \n\n);\n admin 2013-07-26 0 58 updateReorderLevels post itemsite with new reorder level Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: updateReorderLevels\n-- Name: post\n-- Notes: itemsite with new reorder level\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE itemsite SET\n itemsite_reorderlevel=,\n itemsite_stocked=CASE WHEN ( = 0) THEN false\n ELSE itemsite_stocked END,\n itemsite_useparams=CASE WHEN ( = 0) THEN false\n ELSE itemsite_useparams END\nWHERE (itemsite_id=)\n admin 2013-07-26 0 547 voucher editlist used by voucheringEditList indent: order line item credit account line item credit account debit account for entire order Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: voucher\n-- Name: editlist\n-- Notes: used by voucheringEditList\n-- indent: order\n-- line item\n-- credit account\n-- line item\n-- credit account\n-- debit account for entire order\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT orderid, seq,\n CASE WHEN seq = 0 THEN vouchernumber\n ELSE ''\n END AS vouchernumber, ponumber, itemnumber,\n vendnumber, description, itemtype, iteminvuom, f_qty, cost,\n 'curr' AS cost_xtnumericrole,\n 0 AS cost_xttotalrole,\n CASE WHEN seq = 3 THEN 1\n ELSE seq END AS xtindentrole,\n CASE WHEN findAPAccount(vendid) < 0 THEN 'error'\n END AS qtforegroundrole\nFROM (SELECT orderid,\n CASE WHEN length(ponumber) > 0 THEN 0 ELSE 1 END AS seq,\n vouchernumber, ponumber,\n CASE WHEN (itemid = 1) THEN invoicenumber\n ELSE itemnumber END AS itemnumber,\n CASE WHEN (itemid = 1) THEN itemnumber\n ELSE '' END AS vendnumber,\n vendid, description,\n itemtype, iteminvuom, f_qty, cost\nFROM voucheringEditList\nUNION\n-- pull out the credits\nSELECT DISTINCT orderid, 2 AS seq, vouchernumber, '' AS ponumber,\n AS itemnumber, '' AS vendnumber, vendid,\n account AS description,\n '' AS itemtype, '' AS iteminvuom, NULL as f_qty, cost\nFROM voucheringEditList\nWHERE itemid = 2\nUNION\n-- calculate the debits\nSELECT orderid, 3 AS seq, vouchernumber, '' AS ponumber,\n AS itemnumber, '' AS vendnumber, vendid,\n CASE WHEN findAPAccount(vendid) < 0 THEN \n ELSE formatGLAccountLong(findAPAccount(vendid))\n END AS description,\n '' AS itemtype, '' AS iteminvuom, NULL as f_qty,\n SUM(cost) AS cost\nFROM voucheringEditList\nWHERE itemid = 2\nGROUP BY orderid, vouchernumber, vendid\nORDER BY vouchernumber, ponumber desc, seq) AS sub;\n admin 2013-07-26 0 366 voucherRegister detail used by dspVoucherRegister Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: voucherRegister\n-- Name: detail\n-- Notes: used by dspVoucherRegister\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT gltrans_id, gltrans_date,\n vend_number, vend_name,\n gltrans_doctype, gltrans_docnumber, firstLine(gltrans_notes) AS reference,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n CASE WHEN (gltrans_amount < 0) THEN ABS(gltrans_amount)\n ELSE 0\n END AS debit,\n CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n ELSE 0\n END AS credit,\n gltrans_username,\n 'curr' AS debit_xtnumericrole,\n 'curr' AS credit_xtnumericrole\nFROM accnt, gltrans LEFT OUTER JOIN vohead JOIN vendinfo\n ON (vohead_vend_id=vend_id)\n ON (gltrans_doctype='VO' and gltrans_docnumber=vohead_number)\nWHERE ((gltrans_accnt_id=accnt_id)\n AND (gltrans_date BETWEEN AND )\n AND (gltrans_source='A/P')\n\n AND (gltrans_accnt_id=)\n\n )\nORDER BY gltrans_created DESC, gltrans_sequence, gltrans_amount;\n admin 2013-07-26 0 367 whereUsed detail used by dspSingleLevelWhereUsed, dspIndentedWhereUsed Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: whereUsed\n-- Name: detail\n-- Notes: used by dspSingleLevelWhereUsed, dspIndentedWhereUsed\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n bomwork_id, item_id, bomwork_parent_id,\n bomworkitemsequence(bomwork_id) AS seqord, \n bomwork_seqnumber, item_number,\n bomwork_qtyfxd ,bomwork_qtyper,\n 'qty' AS bomwork_qtyfxd_xtnumericrole,\n 'qtyper' AS bomwork_qtyper_xtnumericrole,\n 'scrap' AS bomwork_scrap_xtnumericrole,\n bomwork_scrap,\n bomwork_effective,\n bomwork_expires,\n CASE WHEN COALESCE(bomwork_effective,startOfTime())=startOfTime() \n THEN 'Always' \n END AS bomwork_effective_qtdisplayrole,\n CASE WHEN COALESCE(bomwork_expires,endOfTime())=endOfTime() \n THEN 'Never' \n END AS bomwork_expires_qtdisplayrole,\n bomwork_level - 1 AS xtindentrole, \n \n bomitem_parent_item_id, item_id, bomitem_seqnumber,\n item_number,\n itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd AS qtyfxd,\n itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper AS qtyper,\n 'qty' AS qtyfxd_xtnumericrole,\n 'qtyper' AS qtyper_xtnumericrole,\n 'scrap' AS bomitem_scrap_xtnumericrole,\n bomitem_scrap,\n bomitem_effective, bomitem_expires,\n CASE WHEN (COALESCE(bomitem_effective, startoftime()) = startoftime()) \n THEN 'Always' \n END AS bomitem_effective_qtdisplayrole,\n CASE WHEN (COALESCE(bomitem_expires, endoftime()) = endoftime()) \n THEN 'Never' \n END AS bomitem_expires_qtdisplayrole,\n-- formatted for report\n item_descrip1, item_descrip2,\n formatQty(itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS f_qtyfxd,\n formatQtyper(itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS f_qtyper,\n formatScrap(bomitem_scrap) AS f_scrap,\n formatDate(bomitem_effective, ) AS f_effective,\n formatDate(bomitem_expires, ) AS f_expires,\n formatBoolYN(bomitem_createwo) AS f_createwo,\n CASE WHEN (bomitem_issuemethod='S') THEN \n WHEN (bomitem_issuemethod='L') THEN \n WHEN (bomitem_issuemethod='M') THEN \n ELSE \n END AS f_issuemethod,\n formatQtyper(itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * (bomitem_qtyfxd + bomitem_qtyper) * (1 + bomitem_scrap)) as f_qtyreq,\n \n (item_descrip1 || ' ' || item_descrip2) AS descrip,\n uom_name\nFROM item, uom, \n \n bomwork\n \n bomitem\n \nWHERE ((item_inv_uom_id=uom_id)\n \n AND (bomwork_item_id=item_id)\n AND (bomwork_set_id=)\n \n AND (bomwork_expires > CURRENT_DATE)\n \n \n AND (bomwork_effective <= CURRENT_DATE)\n \n \n AND (bomitem_parent_item_id=item_id)\n AND (bomitem_item_id=)\n AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id))\n \n AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires-1)) \n \n AND ( BETWEEN bomitem_effective AND (bomitem_expires-1))\n \n \n )\n\nORDER BY seqord\n\nORDER BY item_number\n\n;\n admin 2013-07-26 0 61 workOrderHistory detail used by dspWoHistoryByNumber, dspWoHistoryByItem, dspWoHistoryByClassCode Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: workOrderHistory\n-- Name: detail\n-- Notes: used by dspWoHistoryByNumber, dspWoHistoryByItem, dspWoHistoryByClassCode\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n\n wo_id, formatWoNumber(wo_id) AS wonumber, wo_status,\n wo_qtyord, wo_qtyrcv, wo_postedvalue,\n wo_startdate, wo_duedate,\n\n wo_id, formatWoNumber(wo_id) AS wonumber, wo_status,\n wo_qtyord, wo_qtyrcv, wo_postedvalue,\n wo_startdate, wo_duedate,\n\n wo.*, COALESCE((prj_number || ' ' || prj_name), '') AS project,\n \n COALESCE(bom.rev_number, '') AS bom_rev_number,\n COALESCE(boo.rev_number, '') AS boo_rev_number,\n \n 'cost' AS wo_wipvalue_xtnumericrole,\n\n\n item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n item_descrip1, item_descrip2, uom_name,\n\n warehous_code,\n formatDate(wo_startdate) AS f_wo_startdate,\n formatDate(wo_duedate) AS f_wo_duedate,\n formatQty(wo_qtyord) AS f_wo_qtyord,\n formatQty(wo_qtyrcv) AS f_wo_qtyrcv,\n \n formatCost(wo_postedvalue) AS f_wo_postedvalue,\n \n 'qty' AS wo_qtyord_xtnumericrole,\n 'qty' AS wo_qtyrcv_xtnumericrole,\n 'cost' AS wo_postedvalue_xtnumericrole\nFROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id)\n JOIN whsinfo ON (warehous_id=itemsite_warehous_id)\n\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=item_inv_uom_id)\n\n\n LEFT OUTER JOIN rev bom ON (bom.rev_id=wo_bom_rev_id)\n LEFT OUTER JOIN rev boo ON (boo.rev_id=wo_boo_rev_id)\n\n LEFT OUTER JOIN prj ON (prj_id=wo_prj_id)\nWHERE ((true)\n\n AND (itemsite_item_id=)\n AND (wo_duedate BETWEEN AND )\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (CAST(wo_number AS TEXT) ~ )\n\n\n AND (itemsite_item_id=item_id)\n AND (wo_duedate BETWEEN AND )\n \n AND (item_classcode_id=)\n \n AND (item_classcode_id IN (SELECT classcode_id FROM classcode\n WHERE (classcode_code ~ )))\n \n\n\n AND ((wo_ordtype<>'W') OR (wo_ordtype IS NULL))\n\n )\n\n\n ORDER BY wo_startdate DESC, wo_number, wo_subnumber\n\n ORDER BY item_number\n\n ORDER BY wo_number, wo_subnumber\n\n;\n admin 2013-07-26 0 228 workOrderMaterial detail used by dspWoMaterialsByItem, dspWoMaterialsByWorkOrder Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: workOrderMaterial\n-- Name: detail\n-- Notes: used by dspWoMaterialsByItem, dspWoMaterialsByWorkOrder\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT womatl.*, formatWONumber(wo_id) AS wonumber, item_number,\n item_descrip1, item_descrip2,\n\n formatwooperseq(womatl_wooper_id) AS wooperseq,\n\n CASE WHEN (womatl_issuemethod = 'S') THEN \n WHEN (womatl_issuemethod = 'L') THEN \n WHEN (womatl_issuemethod = 'M') THEN \n ELSE \n END AS issuemethod,\n uom_name,\n noNeg(womatl_qtyreq - womatl_qtyiss) AS balance,\n\n formatDate(womatl_duedate) AS f_duedate,\n formatQty(womatl_qtyfxd) AS f_qtyfxd,\n formatQtyPer(womatl_qtyper) AS f_qtyper,\n formatPrcnt(womatl_scrap) AS f_scrap,\n formatQty(womatl_qtyreq) AS f_qtyreq,\n formatQty(womatl_qtyiss) AS f_qtyiss,\n formatQty(womatl_qtywipscrap) AS f_qtywipscrap,\n formatQty(noNeg(womatl_qtyreq - womatl_qtyiss)) AS f_balance,\n\n CASE WHEN (womatl_duedate <= CURRENT_DATE) THEN 'error' END AS womatl_duedate_qtforegroundrole,\n 'qty' AS womatl_qtyfxd_xtnumericrole,\n 'qtyper' AS womatl_qtyper_xtnumericrole,\n 'percent' AS womatl_scrap_xtnumericrole,\n 'qty' AS womatl_qtyreq_xtnumericrole,\n 'qty' AS womatl_qtyiss_xtnumericrole,\n 'qty' AS womatl_qtywipscrap_xtnumericrole,\n 'qty' AS balance_xtnumericrole,\n 0 AS womatl_qtyreq_xttotalrole,\n 0 AS womatl_qtyiss_xttotalrole,\n 0 AS womatl_qtywipscrap_xttotalrole,\n 0 AS balance_xttotalrole\nFROM wo JOIN womatl ON (womatl_wo_id=wo_id)\n JOIN uom ON (uom_id=womatl_uom_id)\n JOIN itemsite parentsite ON (parentsite.itemsite_id=wo_itemsite_id)\n JOIN itemsite componentsite ON (componentsite.itemsite_id=womatl_itemsite_id)\n\n JOIN item ON (item_id=parentsite.itemsite_item_id)\n\n JOIN item ON (item_id=componentsite.itemsite_item_id)\n\nWHERE (1=1)\n\n AND (componentsite.itemsite_item_id=)\n AND (wo_status <> 'C')\n\n\n AND (componentsite.itemsite_warehous_id=)\n\n\n AND (wo_id=)\n\n\nORDER BY wo_startdate, item_number\n\n\n \n ORDER BY wooperseq, item_number\n \n ORDER BY item_number\n \n\n;\n admin 2013-07-26 0 156 workOrderSchedule detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: workOrderSchedule\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT wo_id,\n CASE WHEN (wo_ordid IS NULL) THEN -1\n ELSE wo_ordid\n END AS orderid,\n wo.*, warehous_code, uom_name,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n item_descrip1, item_descrip2,\n formatQty(wo_qtyord) AS ordered,\n formatQty(wo_qtyrcv) AS received,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate,\n formatWONumber(wo_id) AS wonumber,\n 'qty' AS wo_qtyord_xtnumericrole,\n 'qty' AS wo_qtyrcv_xtnumericrole,\n CASE WHEN ((wo_startdate<=CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) THEN 'error'\n END AS wo_startdate_qtforegroundrole,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error'\n END AS wo_duedate_qtforegroundrole,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'Overdue'\n ELSE 'On Time'\n END AS condition,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error' END AS condition_qtforegroundrole\nFROM itemsite, whsinfo, item, uom, wo\n\n JOIN coitem ON ((coitem_order_id=wo_id)\n AND (coitem_order_type='W'))\n\nWHERE ( (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n\n AND ( (wo_number::TEXT ~* )\n OR (item_number ~* )\n OR (item_descrip1 || item_descrip2 ~* ) )\n\n\n AND (coitem_status <> 'X')\n\n AND (coitem_status='C')\n\n\n AND (wo_startdate >= )\n\n\n AND (wo_startdate <= )\n\n\n AND (itemsite_warehous_id=)\n\n\n AND (itemsite_item_id=)\n\n\n AND (wo_number IN (SELECT wo_number\n FROM wo\n WHERE (wo_id=)))\n\n\n\n \n AND (wo_status=\n \n OR wo_status=\n \n \n )\n \n\n\n AND (wo_status IN ('R','I'))\n\n AND (wo_status<>'C')\n\n\n AND (wo_ordtype<>'W')\n\n\n AND (item_classcode_id=)\n\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem\n WHERE (itemgrpitem_itemgrp_id=)))\n\n\n AND (itemsite_plancode_id=)\n\n\n AND (wo_id IN (SELECT wooper_wo_id\n FROM wooper\n WHERE (wooper_wrkcnt_id=)))\n\n\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ )))\n\n\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) AND (itemgrp_name ~ ) ) ))\n\n\n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ )))\n\n\n AND (wo_id IN (SELECT wooper_wo_id\n FROM wooper, wrkcnt\n WHERE ((wooper_wrkcnt_id=wrkcnt_id) AND (wrkcnt_code ~ ))))\n\n )\nORDER BY \n\n wo_startdate,\n\n wo_duedate,\n\n item_number,\n\n wo_number, wo_subnumber;\n admin 2013-07-26 0 \. -- -- Data for Name: metric; Type: TABLE DATA; Schema: public; Owner: admin -- COPY metric (metric_id, metric_name, metric_value, metric_module) FROM stdin; 22 FreightAccount 1 \N 23 DefaultARAccount 2 \N 44 DefaultAPAccount 3 \N 20 InvoiceCustomer t \N 21 InvoiceBilling 0 \N 51 DatabaseName! Schema Benchmark \N 149 UseProjects t \N 150 AutoCreateProjectsForOrders f \N 70 InvoiceWatermark2 \N 71 InvoiceShowPrices2 102 \N 72 InvoiceWatermark3 \N 73 InvoiceShowPrices3 102 \N 49 AccountingSystemImportPath C:/OpenMFG \N 50 AccountingSystemExportPath C:/OpenMFG \N 3 PostCountTagToDefault f \N 133 CCYPMacPathPEM /Users/openmfg/pemfile/1001157250.pem \N 78 CreditMemoWatermark2 \N 79 CreditMemoShowPrices2 116 \N 80 CreditMemoWatermark3 \N 81 CreditMemoShowPrices3 116 \N 48 AccountingSystem Native \N 2 DefaultEventFence 10 \N 62 MaxLocationNameSize 10 \N 4 CountSlipAuditing B \N 5 TrackMachineOverhead M \N 144 CurrencyExchangeSense 1 \N 14 AllowDiscounts t \N 15 AllowASAPShipSchedules t \N 18 CMNumberGeneration A \N 26 DefaultPartialShipments t \N 27 DefaultBackOrders t \N 28 DefaultFreeFormShiptos t \N 29 SOCreditLimit 20000 \N 30 SOCreditRate No check \N 126 CCDefaultBank 13 \N 31 DefaultBalanceMethod B \N 32 BOLShipper t \N 33 BOLCustomer f \N 34 BOLTraffic f \N 35 BOLBilling f \N 36 BOLMisc 0 \N 55 remitto_address1 Accounts Receivable \N 56 remitto_address2 12100 Playland Way \N 123 CCUseProxyServer f \N 124 CCProxyServer \N 60 remitto_zipcode 23100 \N 38 VoucherNumberGeneration A \N 40 POAllowFFVendorAddresses t \N 43 DefaultPOShipVia UPS \N 53 CustListSerial 30 \N 8 AutoExplodeSO t \N 10 ExplodeSOEffective E \N 11 SOExplosionLevel M \N 84 AutoExplodeWO t \N 86 ExplodeWOEffective S \N 12 PostMaterialVariances t \N 134 CCYPLinkShield f \N 88 GLCompanySize 2 \N 46 GLProfitSize 2 \N 92 MandatoryGLEntryNotes t \N 91 YearEndEquityAccount 84 \N 93 ItemSiteChangeLog t \N 94 WarehouseChangeLog t \N 95 AllowInactiveBomItems t \N 96 ItemChangeLog t \N 7 DefaultWomatlIssueMethod M \N 97 HideApplyToBalance f \N 54 remitto_name ProDiem Toys \N 61 remitto_phone 800-757-4616 \N 85 WorkOrderChangeLog t \N 9 WONumberGeneration A \N 63 DatabaseName Practice Database \N 100 POChangeLog t \N 101 VendorChangeLog t \N 103 ShippingFormWatermark0 ProDiem Inc. \N 104 ShippingFormShowPrices0 t \N 105 DisallowReceiptExcessQty f \N 106 CustomerChangeLog t \N 107 SalesOrderChangeLog t \N 108 RestrictCreditMemos f \N 111 DisableSalesOrderPriceOverride f \N 113 HideSOMiscCharge f \N 114 EnableSOShipping t \N 24 DefaultShipFormId 12 \N 25 DefaultShipViaId 13 \N 116 InvoiceDateSource shipdate \N 131 CCYPWinPathPEM C:\\pemfile\\1001157250.pem \N 132 CCYPLinPathPEM \N 109 AutoSelectForBilling t \N 110 AlwaysShowSaveAndAdd t \N 115 DefaultCustType 18 \N 119 CCValidDays 7 \N 125 CCProxyPort \N 182 UsePromiseDate t \N 184 EnableSOReservations f \N 102 ShippingFormCopies 2 \N 39 PrNumberGeneration O \N 137 CCAvsCheck W \N 185 DefaultRaDisposition P \N 17 QUNumberGeneration O \N 37 PONumberGeneration A \N 52 DatabaseComments Settings for practice database \N 222 CCPrintReceipt f \N 143 CCdiag % Total % Received % Xferd Average Speed Time Time Time Current\r\n Dload Upload Total Spent Left Speed\r\n\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:08 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:10 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:11 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:12 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:13 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:14 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:15 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:16 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:17 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:18 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:19 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:20 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:21 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:22 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:23 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:24 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:25 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:26 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:27 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:28 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:29 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:30 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:31 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:32 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:33 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:34 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:35 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:36 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:37 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:38 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:39 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:40 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:42 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:43 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:44 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:45 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:46 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:47 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:48 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:49 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:50 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:51 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:52 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:53 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:54 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:55 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:56 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:57 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:58 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:00:59 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:01:00 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:01:01 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:01:01 --:--:-- 0\r 0 0 0 0 0 0 0 0 --:--:-- 0:01:01 --:--:-- 0\r\ncurl: (52) SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054\r\n \N 142 CCdiag2 C:/Documents and Settings/Mike/My Documents/Clients/OpenMFG/Clients/1.3beta3\\curl, -k, -d, 1 Playland WayArlington1ArlingtonMike AthertonVA22204010841111111111111111001157250SALELIVE500Olde Towne Toys Store1 Duke StreetAlexandriaOlde Towne Store 1VA2220150149-1, -E, C:\\pemfile\\1001157250.pem \N 145 WOTCPostStyle Operations \N 57 remitto_address3 \N 146 CurrencyGainLossAccount 117 \N 147 GLSeriesDiscrepancyAccount 118 \N 148 remitto_country United States \N 58 remitto_city Norfolk \N 186 DefaultRaTiming R \N 59 remitto_state VA \N 66 InvoiceWatermark0 Customer Copy \N 67 InvoiceShowPrices0 t \N 87 WOExplosionLevel S \N 13 PostLaborVariances f \N 1 InterfaceToGL t \N 68 InvoiceWatermark1 Internal Copy \N 69 InvoiceShowPrices1 t \N 187 DefaultRaCreditMethod N \N 74 CreditMemoWatermark0 Customer Copy \N 75 CreditMemoShowPrices0 t \N 76 CreditMemoWatermark1 Internal Copy \N 77 CreditMemoShowPrices1 t \N 188 ReturnAuthorizationChangeLog t \N 6 DefaultSoldItemsExclusive f \N 152 ShipmentNumberGeneration A \N 140 CCOrder 1 Playland WayArlington1ArlingtonMike AthertonVA22204010841111111111111111001157250SALELIVE1236.56 \N 141 CCTestMe 4111111111111111 Tue Feb 20 06:39:17 2007SGS-000001: D:Declined:NNN:47A3A648-45DAFA04-173-44E7ADECLINED1171978259DECLINED\r\n\r\n \N 153 UseEarliestAvailDateOnPOItem t \N 154 RequireStdCostForPOItem f \N 155 UpdatePriceLineEdit 2 \N 156 WarnIfReceiptQtyDiffers t \N 157 ReceiptQtyTolerancePct 10 \N 158 AllowManualGLAccountEntry t \N 159 DefaultTaxAuthority -1 \N 189 DefaultPrintRAOnSave f \N 190 RANumberGeneration A \N 162 TONumberGeneration A \N 172 EnableTOShipping t \N 179 JobItemCosDefault D \N 173 DefaultTransitWarehouse 37 \N 171 TransferOrderChangeLog t \N 174 DefaultPrintPOOnSave f \N 175 AutoFillPostOperationQty t \N 176 DefaultPrintSOOnSave f \N 64 InvoiceCopies 1 \N 65 CreditMemoCopies 1 \N 177 EnableCustomerDeposits t \N 45 GLMainSize 4 \N 89 GLFFProfitCenters f \N 90 GLFFSubaccounts f \N 16 CONumberGeneration A \N 180 DefaultSalesRep 29 \N 181 DefaultTerms 42 \N 198 ShippingFormWatermark1 Customer \N 98 DefaultBatchFromEmailAddress matherton@openfmg.com \N 191 CCConfirmPreauth f \N 194 CCConfirmCredit f \N 195 CCEnablePreauth t \N 196 CCEnableCharge t \N 197 CCTestResult F \N 199 ShippingFormShowPrices1 t \N 202 RecurringInvoiceBuffer 7 \N 203 EmployeeChangeLog t \N 205 CCANVer 3.1 \N 206 CCANDelim \N 207 CCANEncap \N 208 CCANDuplicateWindow 0 \N 209 CCANMD5HashSetOnGateway f \N 210 CCANCurrency TRANS \N 211 CCANWellsFargoSecureSource f \N 135 CCYPLinkShieldMax 0 \N 212 CCEnableChargePreauth f \N 213 CCEnableCredit f \N 214 CCRequireCVV f \N 215 CCCVVCheck X \N 216 CCCVVErrors \N \N 120 CCCompany External \N 192 CCConfirmCharge f \N 193 CCConfirmChargePreauth f \N 121 CCServer http://www.xtuple.com/demo/video \N 122 CCPort 1129 \N 219 AllowStdCostMethod t \N 221 AutoUpdateLocaleHasRun t \N 117 CCAccept f \N 118 CCTest f \N 227 ACHCompanyIdType O \N 229 ACHDefaultSuffix .dat \N 230 AutoCreditWarnLateCustomers t \N 231 DefaultAutoCreditWarnGraceDays 15 \N 232 DefaultARIncidentStatus -1 \N 233 MultiCompanyFinancialConsolidation f \N 127 CCEncKeyName xTuple.key \N 128 CCWinEncKey c:/crypto \N 129 CCLinEncKey /home/crypto \N 130 CCMacEncKey /Users/crypto \N 151 DefaultMSCalendar 55 \N 218 AllowAvgCostMethod t \N 112 AutoAllocateCreditMemos f \N 235 CalculateFreight t \N 236 EnableSOReservationsByLocation f \N 237 SOReservationLocationMethod 1 \N 226 ACHCompanyId 987654 \N 228 ACHCompanyName ProDiem Inc. \N 238 LegacyCashReceipts t \N 239 VerboseCommentList t \N 244 RetailUseCustTaxZone f \N 241 RetailUseInternalCust t \N 245 AutoCloseARIncident f \N 47 GLSubaccountSize 2 \N 243 RetailOnlyUseInternalCust f \N 242 RetailCustId 102 \N 247 BatchManagerPurgeDays 0 \N 249 updateTickInterval 1 \N 250 AllowedUserLogins ActiveOnly \N 254 ReqInvRegVoucher f \N 220 AllowJobCostMethod t \N 255 ReqInvMiscVoucher f \N 251 EFTRoutingRegex ^\\d{9}$ \N 252 EFTAccountRegex ^\\d{4,17}$ \N 253 EFTFunction formatAchChecks \N 246 ManualForwardUpdate f \N 257 BillDropShip t \N 258 CRMAccountNumberGeneration M \N 260 DefaultAddressCountry \N 261 StrictAddressCountry f \N 259 OpportunityChangeLog t \N 234 FirmSalesOrderPackingList t \N 262 DisableAutoComplete f \N 248 DisallowMismatchClientVersion t \N 166 Transforms f \N 225 ACHEnabled f \N 266 DisplaysUseToolbar t \N 269 IncludePackageWeight f \N 270 soPriceEffective CurrentDate \N 271 IgnoreCustDisc f \N 268 ShowQuotesAfterSO t \N 19 InvcNumberGeneration A \N 267 UseJournals f \N 272 CopyPRtoPOItem f \N 273 AllowBOMItemDelete f \N 274 SetDefaultLocations f \N 275 CountAvgCostMethod STD \N 276 KitComponentInheritCOS f \N 277 RecordPPVonReceipt f \N 278 CCANIgnoreSSLErrors f \N 224 ACHSupported t \N 279 BatchManagerAutoCreateContacts t \N 265 PrjLaborAndOverhead 161 \N 280 EnableProjectAccounting f \N 281 IncidentsPublicPrivate f \N 282 IncidentPublicDefault f \N 283 CRMIncidentEmailProfile -1 \N 284 CRMIncidentEmailCreated f \N 285 CRMIncidentEmailAssigned f \N 286 CRMIncidentEmailStatus f \N 287 CRMIncidentEmailUpdated f \N 288 CRMIncidentEmailComments f \N 163 Application PostBooks \N 165 BBOM f \N 168 BufferMgt f \N 183 EnableReturnAuth f \N 170 MultiWhs f \N 169 LotSerialControl f \N 167 Routings f \N 178 RevControl f \N 256 EnableDropShipments f \N 289 CreditTaxDiscount t \N 290 POCopies 0 \N 291 POWatermark0 Vendor Copy \N 292 NumberIssueResetIntervalDays 1 \N 293 InterfaceAPToGL t \N 294 InterfaceARToGL t \N 263 desktop/welcome http://welcome.xtuple.org/index.html?ServerVersion=4.0.1&Application=PostBooks \N 264 desktop/timer 900000 \N 295 AutoVersionUpdate t \N 296 RegistrationKey 1GEHT-CTWEJ-ZGY8Z-MXJZK-ECVCQ \N 240 ServerVersion 4.1.0 \N \. -- -- Data for Name: metricenc; Type: TABLE DATA; Schema: public; Owner: admin -- COPY metricenc (metricenc_id, metricenc_name, metricenc_value, metricenc_module) FROM stdin; 9 CCYPStoreNum C\\235M\\306\\027\\223C\\320\\333\\306s\\\\\\242\\201_\\244 \N 1 CCLogin +\\351\\263\\360\\006\\020\\305\\375 \N 2 CCPassword +\\351\\263\\360\\006\\020\\305\\375 \N 3 CCProxyLogin +\\351\\263\\360\\006\\020\\305\\375 \N 4 CCProxyPassword +\\351\\263\\360\\006\\020\\305\\375 \N 10 CCANMD5Hash +\\351\\263\\360\\006\\020\\305\\375 \N 11 CCPTDivisionNumber +\\351\\263\\360\\006\\020\\305\\375 \N \. -- -- Data for Name: mrghist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY mrghist (mrghist_cntct_id, mrghist_table, mrghist_pkey_col, mrghist_pkey_id, mrghist_cntct_col) FROM stdin; \. -- -- Data for Name: mrgundo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY mrgundo (mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id, mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type) FROM stdin; \. -- -- Data for Name: msg; Type: TABLE DATA; Schema: public; Owner: admin -- COPY msg (msg_id, msg_posted, msg_scheduled, msg_text, msg_expires, msg_username) FROM stdin; 17 2005-12-27 09:01:06.931709-05 2005-12-27 09:01:06.931709-05 Actual Costs Updated and Rolled up for the following Items:\n\nYTRUCK1\nTBODY1\nYPAINT1\nTWHEEL1\nTKIT1\nTINSERT1\nTBOX1 2100-01-01 00:00:00-05 mfgadmin 18 2005-12-27 09:01:08.185541-05 2005-12-27 09:01:08.185541-05 Actual Costs Posted and Rolled up for the following Items:\n\nTKIT1\nYTRUCK1\nTWHEEL1\nTBOX1\nTBODY1\nYPAINT1\nTINSERT1 2100-01-01 00:00:00-05 mfgadmin 19 2006-01-13 13:08:15.893-05 2006-01-13 13:08:15.893-05 Actual Costs Updated and Rolled up for the following Items:\n\n 2100-01-01 00:00:00-05 jsmith 20 2006-01-13 13:10:17.428-05 2006-01-13 13:10:17.428-05 MRP has Completed 2100-01-01 00:00:00-05 jsmith 21 2006-01-13 13:15:57.537-05 2006-01-13 13:15:57.537-05 MRP has Completed 2100-01-01 00:00:00-05 jsmith 22 2006-01-13 13:20:57.759-05 2006-01-13 13:20:57.759-05 Actual Costs Updated and Rolled up for the following Items:\n\n 2100-01-01 00:00:00-05 jsmith 23 2006-01-13 13:21:59.918-05 2006-01-13 13:21:59.918-05 MRP has Completed 2100-01-01 00:00:00-05 jsmith 24 2006-01-13 15:11:22.304-05 2006-01-13 15:11:22.304-05 MRP has Completed 2100-01-01 00:00:00-05 jsmith 25 2006-01-13 15:19:23.076-05 2006-01-13 15:19:23.076-05 Actual Costs Updated and Rolled up for the following Items:\n\n 2100-01-01 00:00:00-05 jsmith 26 2006-01-13 15:48:54.162-05 2006-01-13 15:48:54.162-05 MRP has Completed 2100-01-01 00:00:00-05 jsmith 27 2007-12-21 09:06:01.921-05 2007-12-21 09:06:01.921-05 MRP has Completed 2100-01-01 00:00:00-05 mfgadmin 28 2007-12-21 09:09:53.999-05 2007-12-21 09:09:53.999-05 MRP has Completed 2100-01-01 00:00:00-05 mfgadmin 29 2010-04-27 15:02:40.878081-04 2010-04-27 15:02:40.878081-04 To-Do Item - Quote-Provide Quote 2100-01-01 00:00:00-05 admin \. -- -- Data for Name: msguser; Type: TABLE DATA; Schema: public; Owner: admin -- COPY msguser (msguser_id, msguser_msg_id, msguser_viewed, msguser_username) FROM stdin; 13 17 2005-12-27 09:01:43.503939-05 jsmith 14 18 2005-12-27 09:01:44.687859-05 jsmith 15 19 2006-01-13 13:09:16.831-05 jsmith 16 20 2006-01-13 13:11:19.317-05 jsmith 17 21 2006-01-13 13:16:24.846-05 jsmith 18 22 2006-01-13 13:22:11.435-05 jsmith 19 23 2006-01-13 13:24:12.859-05 jsmith 20 24 2006-01-13 15:13:25.682-05 jsmith 21 25 2006-01-13 15:19:32.8-05 jsmith 22 26 2006-01-13 15:49:54.479-05 jsmith 23 27 2007-12-21 09:06:46.109-05 mfgadmin 24 28 2007-12-21 09:10:48.702-05 mfgadmin 25 29 2010-04-27 15:03:46.40076-04 admin \. -- -- Data for Name: obsolete_tax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY obsolete_tax (tax_id, tax_code, tax_descrip, tax_ratea, tax_sales_accnt_id, tax_freight, tax_cumulative, tax_rateb, tax_salesb_accnt_id, tax_ratec, tax_salesc_accnt_id) FROM stdin; 12 VATAX Virginia Sales Tax 0.0500 102 f f 0.0000 -1 0.0000 -1 13 NC TAX North Carolina Sales Tax 0.0425 129 f f 0.0000 -1 0.0000 -1 \. -- -- Data for Name: ophead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY ophead (ophead_id, ophead_name, ophead_crmacct_id, ophead_owner_username, ophead_opstage_id, ophead_opsource_id, ophead_optype_id, ophead_probability_prcnt, ophead_amount, ophead_target_date, ophead_actual_date, ophead_notes, ophead_curr_id, ophead_active, ophead_cntct_id, ophead_username, ophead_start_date, ophead_assigned_date, ophead_priority_id, ophead_number) FROM stdin; 2 TTOYS - Private Label 1 mfgadmin 2 1 1 80 100000.0000 2007-11-29 \N TTOYS is interested in a private label version of the Collectors Line of products 1 t \N \N \N \N \N 2 3 DIAMOND-2010 1 admin 3 1 1 80 75000.0000 2010-09-05 \N 1 t \N \N \N \N \N 3 \. -- -- Data for Name: opsource; Type: TABLE DATA; Schema: public; Owner: admin -- COPY opsource (opsource_id, opsource_name, opsource_descrip) FROM stdin; 1 INTERNAL Internal 2 WEB Web Query 3 PARTNER Partner Lead \. -- -- Data for Name: opstage; Type: TABLE DATA; Schema: public; Owner: admin -- COPY opstage (opstage_id, opstage_name, opstage_descrip, opstage_order, opstage_opinactive) FROM stdin; 1 RECEIVED Received Inquiry 0 f 2 INFORMATION Gather Information 0 f 3 QUOTE Provide Quote 0 f 4 CLOSE Placed Order 0 f \. -- -- Data for Name: optype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY optype (optype_id, optype_name, optype_descrip) FROM stdin; 1 PRODUCT Product Sales Lead 2 DESIGN Design Services 3 LOGISTICS Logistics Services \. -- -- Data for Name: orderseq; Type: TABLE DATA; Schema: public; Owner: admin -- COPY orderseq (orderseq_id, orderseq_name, orderseq_number, orderseq_table, orderseq_numcol, orderseq_seqiss) FROM stdin; 19 LsRegNumber 1 lsreg lsreg_number \N 1 WoNumber 10086 wo wo_number \N 10 PlanNumber 90422 planord planord_number \N 23 CRMAccountNumber 0 crmacct crmacct_number \N 8 PrNumber 10085 pr pr_number \N 15 ToNumber 99012 tohead tohead_number \N 20 AlarmNumber 2 alarm alarm_number \N 13 IncidentNumber 15005 incdt incdt_number \N 21 ACHBatch 100008 checkhead checkhead_ach_batch \N 3 QuNumber 40014 quhead quhead_number \N 16 RaNumber 80011 rahead rahead_id \N 18 ContactNumber 35 cntct cntct_number \N 6 PoNumber 20110 pohead pohead_number \N 2 SoNumber 50222 cohead cohead_number \N 7 VcNumber 30127 vohead vohead_number \N 5 InvcNumber 60117 invchead invchead_invcnumber \N 22 CashRcptNumber 10036 cashrcpt cashrcpt_number \N 12 APMemoNumber 39002 apmemo apopen_docnumber \N 11 ARMemoNumber 20042 armemo aropen_docnumber \N 4 CmNumber 70001 armemo aropen_docnumber \N 24 OpportunityNumber 4 ophead ophead_number \N 17 AddressNumber 44 addr addr_number {} \. -- -- Data for Name: pack; Type: TABLE DATA; Schema: public; Owner: admin -- COPY pack (pack_id, pack_head_id, pack_head_type, pack_shiphead_id, pack_printed) FROM stdin; 2 3123 SO 269 f \. -- -- Data for Name: payaropen; Type: TABLE DATA; Schema: public; Owner: admin -- COPY payaropen (payaropen_ccpay_id, payaropen_aropen_id, payaropen_amount, payaropen_curr_id) FROM stdin; 19 301 114.89 1 20 305 997.50 1 24 309 104.90 1 30 322 103.86 1 31 324 997.50 1 34 326 500.00 1 \. -- -- Data for Name: payco; Type: TABLE DATA; Schema: public; Owner: admin -- COPY payco (payco_ccpay_id, payco_cohead_id, payco_amount, payco_curr_id) FROM stdin; 16 2964 0.00 1 17 2964 104.90 1 18 2964 0.00 1 22 2973 0.00 1 23 2973 104.90 1 25 3002 0.00 1 26 3002 0.00 1 27 3002 0.00 1 28 3002 997.50 1 29 3005 103.86 1 35 3023 0.00 1 \. -- -- Data for Name: period; Type: TABLE DATA; Schema: public; Owner: admin -- COPY period (period_id, period_start, period_end, period_closed, period_freeze, period_initial, period_name, period_yearperiod_id, period_quarter, period_number) FROM stdin; 81 2010-01-01 2010-01-31 t f f 2010 - Jan 11 1 1 82 2010-02-01 2010-02-28 t f f 2010 - Feb 11 1 2 66 2008-10-01 2008-10-31 t f f 2008 - Oct 9 4 10 67 2008-11-01 2008-11-30 t f f 2008 - Nov 9 4 11 68 2008-12-01 2008-12-31 t f f 2008 - Dec 9 4 12 47 2004-01-01 2004-12-31 t f t 2004 - History 5 1 1 48 2005-01-01 2005-09-30 t f f 2005 - 01 to 09 History 6 1 1 46 2005-10-01 2005-10-31 t f f 2005 - Oct 6 2 2 29 2005-11-01 2005-11-30 t f f 2005 - Nov 6 3 3 28 2005-12-01 2005-12-31 t f f 2005 - Dec 6 4 4 30 2006-01-01 2006-01-31 t f f 2006 - Jan 7 1 1 31 2006-02-01 2006-02-28 t f f 2006 - Feb 7 1 2 32 2006-03-01 2006-03-31 t f f 2006 - Mar 7 1 3 33 2006-04-01 2006-04-30 t f f 2006 - Apr 7 2 4 34 2006-05-01 2006-05-31 t f f 2006 - May 7 2 5 35 2006-06-01 2006-06-30 t f f 2006 - Jun 7 2 6 36 2006-07-01 2006-07-31 t f f 2006 - Jul 7 3 7 37 2006-08-01 2006-08-31 t f f 2006 - Aug 7 3 8 38 2006-09-01 2006-09-30 t f f 2006 - Sep 7 3 9 39 2006-10-01 2006-10-31 t f f 2006 - Oct 7 4 10 40 2006-11-01 2006-11-30 t f f 2006 - Nov 7 4 11 41 2006-12-01 2006-12-31 t f f 2006 - Dec 7 4 12 42 2007-01-01 2007-01-31 t f f 2007 - Jan 8 1 1 43 2007-02-01 2007-02-28 t f f 2007 - Feb 8 1 2 44 2007-03-01 2007-03-31 t f f 2007 - Mar 8 1 3 45 2007-04-01 2007-04-30 t f f 2007 - Apr 8 2 4 49 2007-05-01 2007-05-31 t f f 2007 - May 8 2 5 50 2007-06-01 2007-06-30 t f f 2007 - Jun 8 2 6 51 2007-07-01 2007-07-31 t f f 2007 - Jul 8 3 7 52 2007-08-01 2007-08-31 t f f 2007 - Aug 8 3 8 53 2007-09-01 2007-09-30 t f f 2007 - Sep 8 3 9 54 2007-10-01 2007-10-31 t f f 2007 - Oct 8 4 10 55 2007-11-01 2007-11-30 t f f 2007 - Nov 8 4 11 56 2007-12-01 2007-12-31 t f f 2007 - Dec 8 4 12 57 2008-01-01 2008-01-31 t f f 2008 - Jan 9 1 1 58 2008-02-01 2008-02-29 t f f 2008 - Feb 9 1 2 59 2008-03-01 2008-03-31 t f f 2008 - Mar 9 1 3 60 2008-04-01 2008-04-30 t f f 2008 - Apr 9 2 4 61 2008-05-01 2008-05-31 t f f 2008 - May 9 2 5 62 2008-06-01 2008-06-30 t f f 2008 - Jun 9 2 6 63 2008-07-01 2008-07-31 t f f 2008 - Jul 9 3 7 64 2008-08-01 2008-08-31 t f f 2008 - Aug 9 3 8 65 2008-09-01 2008-09-30 t f f 2008 - Sep 9 3 9 69 2009-01-01 2009-01-31 t f f 2009 - Jan 10 1 1 70 2009-02-01 2009-02-28 t f f 2009 - Feb 10 1 2 71 2009-03-01 2009-03-31 t f f 2009 - Mar 10 1 3 72 2009-04-01 2009-04-30 t f f 2009 - Apr 10 2 4 73 2009-05-01 2009-05-31 t f f 2009 - May 10 2 5 74 2009-06-01 2009-06-30 t f f 2009 - Jun 10 2 6 75 2009-07-01 2009-07-31 t f f 2009 - Jul 10 3 7 76 2009-08-01 2009-08-31 t f f 2009 - Aug 10 3 8 77 2009-09-01 2009-09-30 t f f 2009 - Sep 10 3 9 78 2009-10-01 2009-10-31 t f f 2009 - Oct 10 4 10 79 2009-11-01 2009-11-30 t f f 2009 - Nov 10 4 11 80 2009-12-01 2009-12-31 t f f 2009 - Dec 10 4 12 83 2010-03-01 2010-03-31 t f f 2010 - Mar 11 1 3 84 2010-04-01 2010-04-30 t f f 2010 - Apr 11 2 4 85 2010-05-01 2010-05-31 t f f 2010 - May 11 2 5 93 2011-01-01 2011-01-31 f f f 2011 - Jan 12 1 1 94 2011-02-01 2011-02-28 f f f 2011 - Feb 12 1 2 95 2011-03-01 2011-03-31 f f f 2011 - Mar 12 1 3 96 2011-04-01 2011-04-30 f f f 2011 - Apr 12 2 4 97 2011-05-01 2011-05-31 f f f 2011 - May 12 2 5 98 2011-06-01 2011-06-30 f f f 2011 - Jun 12 2 6 100 2011-08-01 2011-08-31 f f f 2011 - Aug 12 3 8 101 2011-09-01 2011-09-30 f f f 2011 - Sep 12 3 9 102 2011-10-01 2011-10-31 f f f 2011 - Oct 12 4 10 103 2011-11-01 2011-11-30 f f f 2011 - Nov 12 4 11 104 2011-12-01 2011-12-31 f f f 2011 - Dec 12 4 12 99 2011-07-01 2011-07-31 f f f 2011 - Jul 12 3 7 86 2010-06-01 2010-06-30 t f f 2010 - Jun 11 2 6 87 2010-07-01 2010-07-31 t f f 2010 - Jul 11 3 7 88 2010-08-01 2010-08-31 t f f 2010 - Aug 11 3 8 89 2010-09-01 2010-09-30 t f f 2010 - Sep 11 3 9 90 2010-10-01 2010-10-31 t f f 2010 - Oct 11 4 10 91 2010-11-01 2010-11-30 t f f 2010 - Nov 11 4 11 92 2010-12-01 2010-12-31 t f f 2010 - Dec 11 4 12 105 2012-01-01 2012-01-31 f f f 2012 - Jan 13 1 1 106 2012-02-01 2012-02-29 f f f 2012 - Feb 13 1 2 107 2012-03-01 2012-03-31 f f f 2012 - Mar 13 1 3 108 2012-04-01 2012-04-30 f f f 2012 - Apr 13 2 4 109 2012-05-01 2012-05-31 f f f 2012 - May 13 2 5 110 2012-06-01 2012-06-30 f f f 2012 - Jun 13 2 6 111 2012-07-01 2012-07-31 f f f 2012 - Jul 13 3 7 112 2012-08-01 2012-08-31 f f f 2012 - Aug 13 3 8 113 2012-09-01 2012-09-30 f f f 2012 - Sep 13 3 9 114 2012-10-01 2012-10-31 f f f 2012 - Oct 13 4 10 115 2012-11-01 2012-11-30 f f f 2012 - Nov 13 4 11 116 2012-12-01 2012-12-31 f f f 2012 - Dec 13 4 12 117 2013-01-01 2013-01-31 f f f 2013 - Jan 14 1 1 118 2013-02-01 2013-02-28 f f f 2013 - Feb 14 1 2 119 2013-03-01 2013-03-31 f f f 2013 - Mar 14 1 3 120 2013-04-01 2013-04-30 f f f 2013 - Apr 14 2 4 121 2013-05-01 2013-05-31 f f f 2013 - May 14 2 5 122 2013-06-01 2013-06-30 f f f 2013 - Jun 14 2 6 123 2013-07-01 2013-07-31 f f f 2013 - Jul 14 3 7 124 2013-08-01 2013-08-31 f f f 2013 - Aug 14 3 8 125 2013-09-01 2013-09-30 f f f 2013 - Sep 14 3 9 126 2013-10-01 2013-10-31 f f f 2013 - Oct 14 4 10 127 2013-11-01 2013-11-30 f f f 2013 - Nov 14 4 11 128 2013-12-01 2013-12-31 f f f 2013 - Dec 14 4 12 \. -- -- Data for Name: pkgdep; Type: TABLE DATA; Schema: public; Owner: admin -- COPY pkgdep (pkgdep_id, pkgdep_pkghead_id, pkgdep_parent_pkghead_id) FROM stdin; \. -- -- Data for Name: pkghead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY pkghead (pkghead_id, pkghead_name, pkghead_descrip, pkghead_version, pkghead_developer, pkghead_notes, pkghead_created, pkghead_updated, pkghead_indev) FROM stdin; 5 fixcountry xTuple package to fix non-standard countries 3.4.0 xTuple \n This package contains components to help fix addresses with non-standard countries.\n 2009-12-03 08:59:25.850249-05 2012-07-16 09:52:29.399285-04 f 13 te Time and Expense System 2.1.0 xTuple Time and Expense System add-on package for xTuple ERP.\n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition,\n a free and open source Enterprise Resource Planning software suite,\n Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n It is licensed to you under the Common Public Attribution License\n version 1.0, the full text of which (including xTuple-specific Exhibits)\n is available at www.xtuple.com/CPAL. By using this software, you agree\n to be bound by its terms.\n 2010-10-26 14:18:35.108745-04 2012-10-08 17:35:56.709994-04 f 12 xtdesktop xTuple Desktop 3.8.2 xTuple \n xTuple Desktop navigational interface for the xTuple main window.\n \n This package is an extension for xTuple ERP: PostBooks Edition,\n a free and open source Enterprise Resource Planning software suite,\n Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n It is licensed to you under the Common Public Attribution License\n version 1.0, the full text of which (including xTuple-specific Exhibits)\n is available at www.xtuple.com/CPAL. By using this software, you agree\n to be bound by its terms.\n 2010-06-18 11:47:11.472345-04 2013-01-11 16:21:32.363632-05 f \. -- -- Data for Name: pkgitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY pkgitem (pkgitem_id, pkgitem_pkghead_id, pkgitem_type, pkgitem_item_id, pkgitem_name, pkgitem_descrip) FROM stdin; \. -- -- Data for Name: plancode; Type: TABLE DATA; Schema: public; Owner: admin -- COPY plancode (plancode_id, plancode_code, plancode_name, plancode_mpsexplosion, plancode_consumefcst, plancode_mrpexcp_resched, plancode_mrpexcp_delete) FROM stdin; 27 NONE Not Planned N f \N \N 28 OP Outside Processing Items N f \N \N 26 MRP MRP Items N f \N \N 25 MPS MPS Items N f \N \N \. -- -- Data for Name: pohead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY pohead (pohead_id, pohead_status, pohead_number, pohead_orderdate, pohead_vend_id, pohead_fob, pohead_shipvia, pohead_comments, pohead_freight, pohead_printed, pohead_terms_id, pohead_warehous_id, pohead_vendaddr_id, pohead_agent_username, pohead_curr_id, pohead_saved, pohead_taxzone_id, pohead_taxtype_id, pohead_dropship, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry, pohead_cohead_id, pohead_released) FROM stdin; 359 C 20006 2005-12-29 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 347 C 20001 2005-12-27 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 365 C 20009 2005-12-30 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 349 C 20002 2005-12-27 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 369 C 20011 2006-01-09 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 352 C 20003 2005-12-28 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 355 C 20004 2005-12-29 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 381 C 20015 2006-01-11 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 371 C 20012 2006-01-09 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 367 C 20010 2005-12-30 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 363 C 20008 2005-12-30 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 361 C 20007 2005-12-29 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 519 C 20075 2009-10-13 85 Destination Private 0.00 f 42 35 \N jsmith 1 t \N \N f \N \N \N \N \N \N \N \N \N \N 1 ICT Plaza Newport News VA 23188 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 525 C 20078 2009-10-13 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t 4 \N f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 357 C 20005 2005-12-29 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 383 C 20016 2006-01-13 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 385 C 20017 2006-01-13 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 387 C 20018 2006-01-30 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 389 C 20019 2006-01-30 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 391 C 20020 2006-01-31 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 393 C 20021 2006-07-05 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 395 C 20022 2006-07-05 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 402 C 20025 2006-10-11 79 Destination UPS 0.00 t 42 35 \N jsmith 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 345 C 20000 2005-12-23 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 405 C 20026 2006-10-13 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 412 C 20028 2006-12-28 78 Destination UPS 0.00 t 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 415 C 20029 2006-12-28 79 Destination UPS 0.00 t 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 417 C 20030 2007-02-20 78 Destination UPS 0.00 t 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 419 C 20031 2007-02-23 78 Destination UPS 0.00 f 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 423 C 20033 2007-05-26 79 Destination UPS 0.00 f 42 35 \N mfgadmin 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 421 C 20032 2007-05-26 78 Destination UPS 0.00 f 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 425 C 20034 2007-05-30 79 Destination UPS 0.00 t 42 35 \N mfgadmin 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 427 C 20035 2007-05-30 85 Destination Private 0.00 f 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 1 ICT Plaza Newport News VA 23188 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 527 C 20079 2009-12-03 78 Destination UPS 0.00 t 42 35 \N admin 1 t 2 \N f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 529 C 20080 2009-12-03 78 Destination UPS 0.00 t 42 35 \N admin 1 t 4 \N f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 429 C 20036 2007-08-31 78 Destination UPS 0.00 t 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 432 C 20037 2007-09-21 78 Destination UPS 0.00 t 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 436 C 20039 2007-12-14 78 Destination UPS 0.00 t 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 434 C 20038 2007-12-14 79 Destination UPS 0.00 t 42 35 \N mfgadmin 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 438 C 20040 2008-03-04 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 443 C 20042 2008-03-05 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 445 C 20043 2008-04-04 78 Destination UPS 0.00 f 42 35 \N mfgadmin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 441 C 20041 2008-03-04 79 Destination UPS 0.00 t 42 35 \N jsmith 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 447 C 20044 2008-06-12 79 Destination UPS 0.00 t 42 35 \N jsmith 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 451 C 20046 2008-06-12 88 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 1 World Chem Blvd. Perkins Valley DE 19801 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 449 C 20045 2008-06-12 79 Destination UPS 0.00 t 42 35 \N jsmith 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 453 C 20047 2008-06-12 88 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 1 World Chem Blvd. Perkins Valley DE 19801 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 458 C 20049 2008-06-18 79 Destination UPS 25.00 f 42 35 \N jsmith 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 456 C 20048 2008-06-12 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 460 C 20050 2008-06-19 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 462 C 20051 2008-06-19 85 Destination Private 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 1 ICT Plaza Newport News VA 23188 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 464 C 20052 2008-06-19 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 466 C 20053 2008-06-19 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 468 C 20054 2008-06-20 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 470 C 20055 2008-09-08 78 Destination UPS 0.00 f 42 35 \N admin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 474 C 20057 2008-09-24 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 472 C 20056 2008-09-24 88 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 1 World Chem Blvd. Perkins Valley DE 19801 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 476 C 20058 2008-10-02 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 479 C 20059 2008-10-02 79 Destination UPS 0.00 f 42 35 \N jsmith 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 484 C 20061 2008-12-31 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 481 C 20060 2008-12-30 85 Destination Private 0.00 f 42 35 \N admin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 1 ICT Plaza Newport News VA 23188 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 486 C 20062 2008-12-31 78 Destination UPS 0.00 t 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 491 C 20063 2009-01-12 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 495 C 20065 2009-06-26 78 Destination UPS 0.00 f 42 35 \N admin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 493 C 20064 2009-01-01 79 Destination UPS 0.00 f 42 35 \N admin 2 t \N 1 f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 497 C 20066 2009-08-13 78 Destination UPS 0.00 f 42 35 \N admin 1 t \N 1 f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 505 C 20070 2009-09-16 88 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N \N f \N \N \N \N \N \N \N \N \N \N 1 World Chem Blvd. Perkins Valley DE 19801 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 499 C 20067 2009-09-16 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N \N f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 503 C 20069 2009-09-16 88 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N \N f \N \N \N \N \N \N \N \N \N \N 1 World Chem Blvd. Perkins Valley DE 19801 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 507 C 20071 2009-09-21 79 Destination UPS 0.00 f 42 35 \N admin 2 t \N \N f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 521 C 20076 2009-10-13 79 Destination UPS 0.00 f 42 35 \N jsmith 2 t \N \N f \N \N \N \N \N \N \N \N \N \N Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 501 C 20068 2009-09-16 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t \N \N f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 523 C 20077 2009-10-13 78 Destination UPS 0.00 f 42 35 \N jsmith 1 t 4 \N f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 509 C 20072 2009-09-22 88 Destination UPS 0.00 f 42 35 \N admin 1 t \N \N f \N \N \N \N \N \N \N \N \N \N 1 World Chem Blvd. Perkins Valley DE 19801 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 515 C 20073 2009-09-24 78 Destination UPS 0.00 f 42 35 \N admin 1 t \N \N f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 531 C 20081 2010-01-06 78 Destination UPS 0.00 f 42 35 \N admin 1 t 4 \N f \N \N \N \N \N \N \N \N \N \N 100 Toy Park Place Merryfield GA 21334 United States \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 539 C 20085 2010-04-02 94 \N UPS \N 0.00 t 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 4 Joe \N Stealt \N 55-44-336-712-9855 336-712-9856 36 1 Extra Way Building 10 Reading Berkshire RG6 1RA United Kingdom 3194 \N 534 C 20082 2010-03-10 94 \N UPS \N 0.00 t 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 7 Olde Towne Toys Store 1 1 Duke Street 12120 Harper's Ridge Court Alexandria VA 22201 United States 3187 \N 535 C 20083 2010-03-12 78 Destination UPS 0.00 t 42 35 \N admin 1 t 4 \N f 5 Mr. Joe Tungsten 800-521-3122 AR Service Rep. 800-555-3122 100 Toy Park Place Merryfield GA 21334 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N \N 537 C 20084 2010-03-12 78 Destination UPS 0.00 f 42 35 \N admin 1 t 4 \N f 5 Mr. Joe Tungsten 800-521-3122 AR Service Rep. 800-555-3122 100 Toy Park Place Merryfield GA 21334 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N \N 545 C 20089 2010-06-07 78 Destination UPS 0.00 f 42 35 \N admin 1 t 4 \N f 5 Mr. Joe Tungsten 800-521-3122 AR Service Rep. 800-555-3122 jt@tparts.com 100 Toy Park Place Merryfield GA 21334 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N \N 551 C 20093 2010-09-07 94 UPS 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr. George Framble 480-321-4321 Sales Rep \N gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 7 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 United States 3200 \N 548 C 20091 2010-06-07 78 Destination UPS 0.00 f 42 35 \N admin 1 t 4 \N f 5 Mr. Joe Tungsten 800-521-3122 AR Service Rep. 800-555-3122 jt@tparts.com 100 Toy Park Place Merryfield GA 21334 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N \N 547 C 20090 2010-06-07 94 \N UPS \N 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 703-931-2212 js@ttoys.com 7 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 United States 3196 \N 540 C 20086 2010-06-07 94 UPS 0.00 t 43 35 \N admin 1 t \N \N t 35 Mr. George Framble 480-321-4321 Sales Rep \N gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 sc@ttoys.com 7 Olde Towne Toys Store 1 1 Duke Street 12120 Harper's Ridge Court Alexandria VA 22201 United States 3195 \N 560 C 20099 2010-11-04 94 \N UPS \N 0.00 t 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 703-931-2212 js@ttoys.com 7 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 United States 3211 2010-11-04 552 C 20094 2010-09-07 94 UPS 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr. George Framble 480-321-4321 Sales Rep \N gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 js@ttoys.com 7 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 United States 3201 \N 542 C 20088 2010-06-07 85 Destination Private 0.00 f 42 35 \N admin 1 t \N \N f 16 Mr. Phil \N Tasker \N 757-870-1100 \N \N pt@cti.com 1 ICT Plaza Newport News VA 23188 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N \N 558 C 20098 2010-09-13 85 Destination Private 0.00 t 42 35 \N admin 1 t \N \N f 16 Mr. Phil \N Tasker \N 757-870-1100 \N \N pt@cti.com 1 ICT Plaza Newport News VA 23188 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N \N 555 C 20096 2010-09-08 78 Destination UPS 0.00 f 42 35 \N admin 1 t 4 \N f 5 Mr. Joe Tungsten 800-521-3122 AR Service Rep. 800-555-3122 jt@tparts.com 100 Toy Park Place Merryfield GA 21334 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N \N 553 C 20095 2010-09-08 78 Destination UPS 0.00 f 42 35 \N admin 1 t 4 \N f 5 Mr. Joe Tungsten 800-521-3122 AR Service Rep. 800-555-3122 jt@tparts.com 100 Toy Park Place Merryfield GA 21334 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N \N 550 C 20092 2010-09-07 94 UPS 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr. George Framble 480-321-4321 Sales Rep \N gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 17 Miss. Susie Coltraine 336-321-9857 \N \N sc@ttoys.com 14 Olde Towne Toys Store 3 Receiving Dock 12120 Harper's Ridge Court Clemmons NC 4234 United States 3198 \N 563 C 20102 2010-12-30 94 \N UPS \N 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 703-931-2212 js@ttoys.com 7 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 United States 3215 2010-12-30 561 C 20100 2010-11-04 79 Destination UPS 0.00 f 42 35 \N admin 2 t \N \N f 6 Mr. Joe \N Packet \N 32-703-844-1212 \N \N jp@ppi.net Bedrijvenzone Diegem-Vuurberg Leonardo Da Vincilaan, 15 Building 3 Diegem 1831 Belgium 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N 2010-11-04 564 C 20103 2011-03-07 94 \N UPS \N 0.00 t 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 703-931-2212 js@ttoys.com 7 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 United States 3217 2011-03-07 566 C 20105 2011-04-18 85 Destination Private 0.00 f 42 35 \N admin 1 t \N \N f 16 Mr. Phil \N Tasker \N 757-870-1100 \N \N pt@cti.com 1 ICT Plaza Newport News VA 23188 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N 2011-04-18 568 C 20106 2011-04-18 85 Destination Private 0.00 f 42 35 \N admin 1 t \N \N f 16 Mr. Phil \N Tasker \N 757-870-1100 \N \N pt@cti.com 1 ICT Plaza Newport News VA 23188 United States 12 Mr. Jed Hastings 800-342-5657 \N 800-342-1100 jh@prodiem.com 9 Prodiem Toys Inc. 1 Playland Way Norfolk 23180 United States \N 2011-04-18 565 C 20104 2011-04-18 94 \N UPS \N 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 36 Mr Arnold Waldheim 43 1-515180 General Manager aw@viennacollectibles.at 41 Ungargasse 60 Vienna Austria 1030 Austria 3221 2011-04-18 557 C 20097 2010-09-08 94 \N UPS \N 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 4 Joe Stealt 55-44-336-712-9855 336-712-9856 js@xtrm.com 36 1 Extra Way Building 10 Reading Berkshire RG6 1RA United Kingdom 3207 2011-04-18 570 C 20107 2011-06-03 94 \N UPS \N 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 8 Mr. Jake Sweet 800-321-5433 703-931-2212 js@ttoys.com 7 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 United States 3227 2011-06-03 572 C 20109 2011-06-03 94 \N UPS \N 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 4 Joe Stealt 55-44-336-712-9855 336-712-9856 js@xtrm.com 36 1 Extra Way Building 10 Reading Berkshire RG6 1RA United Kingdom 3231 2011-06-03 571 C 20108 2011-06-03 94 \N UPS \N 0.00 f 43 35 \N admin 1 t \N \N t 35 Mr George Framble 480-321-4321 Sales Rep gf@gmfg.com 474 South Park Lane Pineville IL 79123 United States 4 Joe Stealt 55-44-336-712-9855 336-712-9856 js@xtrm.com 36 1 Extra Way Building 10 Reading Berkshire RG6 1RA United Kingdom 3229 2011-06-03 \. -- -- Data for Name: poitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY poitem (poitem_id, poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_qty_received, poitem_qty_returned, poitem_qty_vouchered, poitem_unitprice, poitem_vend_item_number, poitem_comments, poitem_qty_toreceive, poitem_expcat_id, poitem_itemsrc_id, poitem_freight, poitem_freight_received, poitem_freight_vouchered, poitem_prj_id, poitem_stdcost, poitem_bom_rev_id, poitem_boo_rev_id, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id, poitem_tax_recoverable, poitem_rlsd_duedate, poitem_order_id, poitem_order_type) FROM stdin; 489 C 425 1 2007-05-31 296 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.233500 PPTBOX100 \N \N 90 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 491 C 429 1 2007-09-01 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 495 C 436 1 2007-12-15 298 EA 1.0000000000 5000.000000 5000.000000 0.000000 5000.000000 0.250000 TPINS-1 \N \N 87 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 494 C 434 1 2007-12-15 296 PCS 1.0000000000 5500.000000 5500.000000 0.000000 5500.000000 0.233500 PPTBOX100 \N \N 90 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 497 C 438 2 2008-03-09 310 BOX 4.0000000000 250.000000 250.000000 0.000000 250.000000 1.000000 CB027 \N \N 95 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 544 C 497 2 2009-08-14 298 EA 1.0000000000 60000.000000 60000.000000 0.000000 60000.000000 0.250000 TPINS-1 \N \N 87 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N t \N \N \N 545 C 497 3 2009-08-15 294 EA 1.0000000000 25000.000000 25000.000000 0.000000 25000.000000 1.000000 TPBODY1 \N \N 86 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t \N \N \N 546 C 497 4 2009-08-15 299 EA 1.0000000000 60000.000000 60000.000000 0.000000 60000.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 0.100000 -1 -1 \N t \N \N \N 547 C 497 5 2009-08-15 297 LB 0.1250000000 1000.000000 1000.000000 0.000000 1000.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 443 C 352 6 2005-12-30 298 EA 1.0000000000 300.000000 300.000000 0.000000 300.000000 0.250000 TPINS-1 \N \N 87 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 432 C 347 1 2005-12-28 298 EA 1.0000000000 200.000000 200.000000 0.000000 200.000000 0.250000 TPINS-1 \N \N 87 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 448 C 355 4 2005-12-31 297 LB 0.1250000000 100.000000 100.000000 0.000000 100.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 0.700000 \N \N \N \N \N \N t \N \N \N 441 C 352 4 2005-12-30 297 LB 0.1250000000 10.000000 10.000000 0.000000 10.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 0.700000 \N \N \N \N \N \N t \N \N \N 437 C 349 1 2005-12-30 297 LB 0.1250000000 8.000000 8.000000 0.000000 8.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 0.700000 \N \N \N \N \N \N t \N \N \N 435 C 347 4 2005-12-29 297 LB 0.1250000000 10.000000 10.000000 0.000000 10.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 0.700000 \N \N \N \N \N \N t \N \N \N 430 C 345 4 2005-12-26 297 LB 0.1250000000 100.000000 0.000000 0.000000 0.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 0.700000 \N \N \N \N \N \N t \N \N \N 466 C 391 1 2006-02-01 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 465 C 389 1 2006-01-31 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 25.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 464 C 387 1 2006-01-31 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 463 C 385 1 2006-01-14 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 462 C 383 1 2006-01-14 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 456 C 371 1 2006-01-11 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 90.000000 0.000000 90.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 455 C 369 1 2006-01-10 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 10.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 444 C 352 7 2005-12-30 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 400.000000 400.000000 0.000000 400.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 433 C 347 2 2005-12-28 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 431 C 345 5 2005-12-26 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 1000.000000 0.000000 0.000000 0.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 449 C 357 1 2005-12-30 299 EA 1.0000000000 500.000000 500.000000 0.000000 500.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 451 C 361 1 2005-12-30 299 EA 1.0000000000 500.000000 500.000000 0.000000 500.000000 0.100000 TPWHL01 \N \N 88 10.0000 10.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 452 C 363 1 2006-01-01 299 EA 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.100000 TPWHL01 \N \N 88 10.0000 10.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 454 C 367 1 2005-12-31 299 EA 1.0000000000 1000.000000 1000.000000 0.000000 500.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 460 C 381 1 2006-01-14 299 EA 1.0000000000 10.000000 10.000000 0.000000 10.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 453 C 365 1 2005-12-31 299 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 447 C 355 3 2005-12-31 299 EA 1.0000000000 40000.000000 40000.000000 0.000000 40000.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 4000.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 450 C 359 1 2005-12-30 299 EA 1.0000000000 500.000000 500.000000 0.000000 500.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 442 C 352 5 2005-12-30 299 EA 1.0000000000 492.000000 492.000000 0.000000 492.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 434 C 347 3 2005-12-29 299 EA 1.0000000000 400.000000 400.000000 0.000000 400.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 427 C 345 1 2005-12-26 299 EA 1.0000000000 4000.000000 0.000000 0.000000 0.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 445 C 355 1 2005-12-30 294 EA 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 1.000000 TPBODY1 \N \N 86 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 440 C 352 3 2005-12-30 294 EA 1.0000000000 300.000000 300.000000 0.000000 300.000000 1.000000 TPBODY1 \N \N 86 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 436 C 347 5 2005-12-29 294 EA 1.0000000000 100.000000 100.000000 0.000000 100.000000 1.000000 TPBODY1 \N \N 86 0.0000 9.9900 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 429 C 345 3 2005-12-26 294 EA 1.0000000000 1000.000000 0.000000 0.000000 0.000000 1.000000 TPBODY1 \N \N 86 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 428 C 345 2 2005-12-26 298 EA 1.0000000000 1000.000000 0.000000 0.000000 0.000000 0.250000 TPINS-1 \N \N 87 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 446 C 355 2 2006-01-01 298 EA 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 0.250000 TPINS-1 \N \N 87 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 492 C 432 1 2007-09-22 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 4 0.250000 \N \N \N \N \N \N t \N \N \N 507 C 453 1 2008-06-17 329 PL 1.0000000000 100.000000 100.000000 0.000000 100.000000 12.000000 GL100 \N \N \N 98 0.0000 0.0000 0.0000 \N \N \N \N \N \N \N \N t \N \N \N 480 C 419 1 2007-03-02 298 EA 1.0000000000 5.000000 5.000000 0.000000 5.000000 1.000000 TPINS-1 \N \N 87 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 475 C 412 1 2006-12-29 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 473 C 405 1 2006-10-14 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 468 C 395 1 2006-07-06 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 467 C 393 1 2006-07-06 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 479 C 417 1 2007-02-21 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 200.000000 200.000000 0.000000 200.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 483 C 423 1 2007-06-21 296 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.233500 PPTBOX100 \N \N 90 0.0000 0.0000 0.0000 \N 0.250000 \N \N \N \N \N \N t \N \N \N 482 C 421 2 2007-05-29 306 Raw bumper for type 1 trucks PCS 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 1.000000 RB100 \N \N 93 0.0000 0.0000 0.0000 \N 1.000000 \N \N \N \N \N \N t \N \N \N 484 C 421 3 2007-07-01 306 Raw bumper for type 1 trucks PCS 1.0000000000 1600.000000 1600.000000 0.000000 1600.000000 1.000000 RB100 \N \N 93 0.0000 0.0000 0.0000 \N 1.000000 \N \N \N \N \N \N t \N \N \N 485 C 421 4 2007-06-05 314 Sheet Type 1 SH 1.0000000000 100.000000 100.000000 0.000000 100.000000 1.250000 SHT-100 \N \N 94 0.0000 0.0000 0.0000 \N 5.000000 \N \N \N \N \N \N t \N \N \N 499 C 443 1 2008-03-06 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 496 C 438 1 2008-03-05 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 498 C 441 1 2008-03-08 296 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.233500 PPTBOX100 \N \N 90 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 500 C 445 1 2008-04-08 310 BOX 4.0000000000 1000.000000 1000.000000 0.000000 1000.000000 1.000000 CB027 \N \N 95 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 501 C 445 2 2008-04-05 299 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 -1 -1 \N \N \N \N t \N \N \N 502 C 445 3 2008-04-05 297 LB 0.1250000000 100.000000 100.000000 0.000000 100.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 1.700000 -1 -1 \N \N \N \N t \N \N \N 505 C 451 1 2008-06-19 329 PL 1.0000000000 100.000000 100.000000 0.000000 100.000000 12.000000 GL100 \N \N 98 0.0000 0.0000 0.0000 \N 20.000000 -1 -1 \N \N \N \N t \N \N \N 506 C 449 2 2008-06-19 326 EA 1.0000000000 10000.000000 9500.000000 0.000000 9500.000000 0.002500 FAS100 \N \N 100 0.0000 0.0000 0.0000 \N 0.005000 -1 -1 \N \N \N \N t \N \N \N 504 C 449 1 2008-06-13 327 EA 1.0000000000 5000.000000 5000.000000 0.000000 5000.000000 0.002500 BUS100 \N \N 101 0.0000 0.0000 0.0000 \N 0.005000 -1 -1 \N \N \N \N t \N \N \N 510 C 458 1 2008-06-23 326 EA 1.0000000000 2000.000000 2000.000000 0.000000 2000.000000 0.002500 FAS100 \N \N 100 0.0000 0.0000 0.0000 \N 0.005000 -1 -1 \N \N \N \N t \N \N \N 511 C 458 2 2008-06-23 327 EA 1.0000000000 3000.000000 3000.000000 0.000000 3000.000000 0.002500 BUS100 \N \N 101 0.0000 0.0000 0.0000 \N 0.005000 -1 -1 \N \N \N \N t \N \N \N 508 C 456 1 2008-06-19 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 512 C 456 2 2008-06-19 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 515 C 460 3 2008-06-26 299 EA 1.0000000000 16000.000000 16000.000000 0.000000 16000.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 0.100000 -1 -1 \N \N \N \N t \N \N \N 514 C 460 2 2008-06-26 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 1700.000000 1700.000000 0.000000 1700.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 513 C 460 1 2008-06-26 294 EA 1.0000000000 5000.000000 5000.000000 0.000000 5000.000000 1.000000 TPBODY1 \N \N 86 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 518 C 464 2 2008-06-22 314 Sheet Type 1 SH 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 1.250000 SHT-100 \N \N 94 0.0000 0.0000 0.0000 \N 5.000000 -1 -1 \N \N \N \N t \N \N \N 517 C 464 1 2008-06-20 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 1199.000000 1199.000000 0.000000 1199.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N \N \N \N t \N \N \N 519 C 466 1 2008-06-22 314 Sheet Type 1 SH 1.0000000000 2000.000000 2000.000000 0.000000 2000.000000 1.250000 SHT-100 \N \N 94 0.0000 0.0000 0.0000 \N 5.000000 -1 -1 \N \N \N \N t \N \N \N 520 C 468 1 2008-06-27 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N \N \N \N t \N \N \N 522 C 472 1 2008-09-28 297 GL 1.0000000000 100.000000 100.000000 0.000000 100.000000 11.000000 YP127 \N \N 96 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N \N \N \N t \N \N \N 525 C 476 1 2008-10-09 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 200.000000 200.000000 0.000000 200.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N \N \N \N t \N \N \N 461 C 381 2 2006-01-14 \N VendDesc1\nVendDesc2 1.0000000000 10.000000 10.000000 0.000000 10.000000 1.000000 VendItem Note-1 \N 15 \N 0.0000 0.0000 0.0000 \N \N \N \N \N \N \N \N t \N \N \N 493 C 432 2 2007-09-28 \N Special Test Stand for Paint Box\t \N 1.0000000000 1.000000 1.000000 0.000000 1.000000 300.000000 Special Test Stand \N 15 \N 0.0000 0.0000 0.0000 4 0.000000 \N \N \N \N \N \N t \N \N \N 472 C 402 1 2006-10-11 299 EA 1.0000000000 100.000000 100.000000 0.000000 100.000000 1.000000 \N \N \N 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 478 C 415 1 2006-12-29 299 EA 1.0000000000 400.000000 400.000000 0.000000 400.000000 0.250000 \N \N \N 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N \N 528 C 479 3 2008-10-09 302 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 6.000000 \N \N \N 0.0000 0.0000 0.0000 \N 2.567800 5 -1 \N \N \N 2 t \N \N \N 481 C 421 1 2007-06-02 318 \t GL 1.0000000000 50.000000 50.000000 0.000000 50.000000 2.250000 \N \N \N 0.0000 0.0000 0.0000 \N 2.200000 \N \N \N \N \N \N t \N \N \N 503 C 447 1 2008-06-16 318 GL 1.0000000000 10.000000 5.000000 0.000000 5.000000 10.000000 \N \N \N 0.0000 0.0000 0.0000 \N 2.200000 -1 -1 \N \N \N \N t \N \N \N 521 C 470 1 2008-06-10 300 EA 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 10.000000 \N \N \N 0.0000 0.0000 0.0000 \N 2.567800 4 -1 \N \N \N 2 t \N \N \N 524 C 474 1 2008-09-24 300 EA 1.0000000000 100.000000 100.000000 0.000000 100.000000 5.500000 \N \N \N 0.0000 0.0000 0.0000 \N 2.567800 4 -1 \N \N \N 2 t \N \N \N 527 C 479 2 2008-10-09 303 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 5.000000 \N \N \N 0.0000 0.0000 0.0000 \N 2.567800 2 -1 \N \N \N 2 t \N \N \N 526 C 479 1 2008-10-11 300 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 8.000000 \N \N \N 0.0000 0.0000 0.0000 \N 2.567800 4 -1 \N \N \N 2 t \N \N \N 530 C 484 1 2009-01-07 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 531 C 486 1 2008-12-31 308 EA 1.0000000000 5000.000000 5000.000000 0.000000 5000.000000 10.000000 \N \N \N 0.0000 0.0000 0.0000 \N 8.298200 3 3 2 t \N \N \N 538 C 491 3 2009-01-12 303 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 2.660000 \N \N \N 0.0000 0.0000 0.0000 \N 2.567800 2 2 2 t \N \N \N 537 C 491 2 2009-01-12 302 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 2.660000 \N \N \N 0.0000 0.0000 0.0000 \N 2.567800 5 5 2 t \N \N \N 536 C 491 1 2009-01-12 300 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 2.660000 \N \N \N 0.0000 0.0000 0.0000 \N 2.567800 4 4 2 t \N \N \N 539 C 493 1 2009-01-01 294 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 1.000000 \N \N \N 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t \N \N \N 540 C 493 2 2009-01-01 298 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 1.000000 \N \N \N 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 \N t \N \N \N 542 C 495 1 2009-06-27 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 543 C 497 1 2009-08-14 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 548 C 499 1 2009-09-17 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 200.000000 200.000000 0.000000 200.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 565 C 521 1 2009-10-14 296 PCS 1.0000000000 5900.000000 5900.000000 0.000000 5900.000000 0.214300 PPTBOX100 \N \N 90 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 566 C 523 1 2009-10-14 299 EA 1.0000000000 50000.000000 50000.000000 0.000000 50000.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 0.100000 -1 -1 \N t \N \N \N 549 C 501 1 2009-09-17 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 600.000000 600.000000 0.000000 600.000000 0.250000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 550 C 503 1 2009-09-23 377 GL 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.980000 \N \N 103 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 551 C 503 2 2009-09-23 376 GL 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.970000 7 \N \N 104 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 552 C 503 3 2009-09-23 378 GL 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.990000 \N \N 105 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 553 C 505 1 2009-09-23 377 GL 1.0000000000 10.000000 10.000000 0.000000 10.000000 0.980000 \N \N 103 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 554 C 505 2 2009-09-16 376 GL 1.0000000000 10.000000 10.000000 0.000000 10.000000 0.970000 7 \N \N 104 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 555 C 507 1 2009-09-22 296 PCS 1.0000000000 5000.000000 5000.000000 0.000000 5000.000000 0.214300 PPTBOX100 \N \N 90 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 556 C 509 1 2009-09-22 376 GL 1.0000000000 50.000000 50.000000 0.000000 50.000000 0.970000 7 \N \N 104 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 557 C 509 2 2009-09-29 378 GL 1.0000000000 50.000000 50.000000 0.000000 50.000000 0.990000 \N \N 105 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 558 C 509 3 2009-09-29 377 GL 1.0000000000 50.000000 50.000000 0.000000 50.000000 0.980000 \N \N 103 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 559 C 509 4 2009-09-26 297 GL 1.0000000000 50.000000 50.000000 0.000000 50.000000 11.000000 YP127 \N \N 96 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N \N t \N \N \N 568 C 525 2 2009-10-14 299 EA 1.0000000000 4000.000000 4000.000000 0.000000 4000.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 0.100000 -1 -1 \N t \N \N \N 562 C 515 1 2009-10-01 \N Mazak Vertical Machineing Center - MZ-101\nSRN#1001992 \N 0.0000000000 1.000000 1.000000 0.000000 1.000000 25000.000000 MZ-101 \N 21 \N 500.0000 0.0000 0.0000 \N 0.000000 -1 -1 \N f \N \N \N 569 C 527 1 2009-12-04 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 2 t \N \N \N 570 C 527 2 2009-12-04 298 EA 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 0.250000 TPINS-1 \N \N 87 0.0000 0.0000 0.0000 \N 0.250000 -1 -1 2 t \N \N \N 571 C 527 3 2009-12-04 297 LB 0.1250000000 25.000000 25.000000 0.000000 25.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 2 t \N \N \N 572 C 529 1 2009-12-05 294 EA 1.0000000000 8000.000000 8000.000000 0.000000 8000.000000 1.000000 TPBODY1 \N \N 86 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 2 t \N \N \N 573 C 529 2 2009-12-05 299 EA 1.0000000000 18000.000000 18000.000000 0.000000 18000.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 0.100000 -1 -1 2 t \N \N \N 574 C 529 3 2009-12-05 297 LB 0.1250000000 2000.000000 2000.000000 0.000000 2000.000000 0.100000 TP-PNT-100 \N \N 89 0.0000 0.0000 0.0000 \N 0.800000 -1 -1 \N t \N \N \N 575 C 531 1 2010-01-06 \N Office Supplies \N 0.0000000000 1.000000 1.000000 0.000000 1.000000 125.000000 10291 \N 16 \N 0.0000 0.0000 0.0000 \N 0.000000 -1 -1 \N f \N \N \N 578 C 537 1 2010-03-19 323 EA 1.0000000000 3.000000 3.000000 0.000000 3.000000 22.000000 \N \N \N 0.0000 0.0000 0.0000 \N 12.563400 -1 -1 2 t \N \N \N 577 C 535 1 2010-03-13 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 584 C 545 1 2010-06-10 306 Raw bumper for type 1 trucks PCS 1.0000000000 1500.000000 1500.000000 0.000000 1500.000000 1.000000 RB100 \N \N 93 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t \N \N \N 587 C 548 1 2010-06-17 314 Sheet Type 1 SH 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 1.250000 SHT-100 \N \N 94 0.0000 0.0000 0.0000 \N 1.250000 -1 -1 \N t \N \N \N 585 C 545 2 2010-06-08 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 592 C 553 1 2010-07-30 293 EA 1.0000000000 5000.000000 5000.000000 0.000000 5000.000000 3.000000 \N \N \N 0.0000 0.0000 0.0000 \N 2.563400 -1 -1 2 t \N \N \N 593 C 555 1 2010-09-10 294 EA 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 1.000000 TPBODY1 \N \N 86 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t \N \N \N 594 C 555 2 2010-09-10 299 EA 1.0000000000 55880.000000 55880.000000 0.000000 55880.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 0.100000 -1 -1 \N t \N \N \N 595 C 555 3 2010-09-09 296 ProDiem Box For Truck Type 1 PCS 1.0000000000 10000.000000 10000.000000 0.000000 10000.000000 0.200000 TPBOX01 \N \N 85 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t \N \N \N 599 C 561 1 2010-11-05 296 PCS 1.0000000000 100.000000 100.000000 0.000000 100.000000 0.211300 PPTBOX100 \N \N 90 0.0000 0.0000 0.0000 \N 0.200000 -1 -1 \N t 2010-11-05 \N \N 576 C 534 1 2010-03-14 381 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t \N 747 S 580 C 540 1 2010-06-21 381 EA 1.0000000000 2000.000000 2000.000000 0.000000 2000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t \N 758 S 579 C 539 1 2010-04-11 381 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t \N 756 S 589 C 551 1 2010-07-06 381 EA 1.0000000000 4000.000000 4000.000000 0.000000 4000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t \N 767 S 590 C 552 1 2010-08-01 381 EA 1.0000000000 3000.000000 3000.000000 0.000000 3000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t \N 769 S 586 C 547 1 2010-10-26 381 EA 1.0000000000 100.000000 0.000000 0.000000 0.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t \N 759 S 588 C 550 1 2010-09-07 381 EA 1.0000000000 2000.000000 2000.000000 0.000000 2000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t \N 765 S 601 C 564 1 2011-03-17 381 EA 1.0000000000 5000.000000 5000.000000 0.000000 5000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t 2011-03-17 785 S 598 C 560 1 2010-12-30 381 EA 1.0000000000 2500.000000 2500.000000 0.000000 2500.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t 2010-11-11 779 S 600 C 563 1 2010-12-30 381 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t 2010-12-30 783 S 605 C 570 1 2011-05-04 381 EA 1.0000000000 3000.000000 3000.000000 0.000000 3000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t 2011-05-04 797 S 596 C 557 1 2011-04-11 381 EA 1.0000000000 100.000000 100.000000 0.000000 100.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t 2011-04-11 775 S 602 C 565 1 2011-04-18 381 EA 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t 2011-04-18 791 S 607 C 572 1 2011-05-14 381 EA 1.0000000000 5000.000000 5000.000000 0.000000 5000.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t 2011-05-14 801 S 606 C 571 1 2011-05-04 381 EA 1.0000000000 3500.000000 7000.000000 3500.000000 3500.000000 22.000000 DM100 \N \N 107 0.0000 0.0000 0.0000 \N 22.000000 -1 -1 \N t 2011-05-04 799 S 439 C 352 2 2006-01-01 299 EA 1.0000000000 400.000000 400.000000 0.000000 400.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N W 438 C 352 1 2005-12-30 299 EA 1.0000000000 400.000000 400.000000 0.000000 400.000000 0.100000 TPWHL01 \N \N 88 0.0000 0.0000 0.0000 \N 1.285000 \N \N \N \N \N \N t \N \N W 486 C 421 5 2007-06-01 306 Raw bumper for type 1 trucks PCS 1.0000000000 200.000000 200.000000 0.000000 200.000000 1.000000 RB100 \N \N 93 0.0000 0.0000 0.0000 \N 1.000000 \N \N \N \N \N \N t \N \N W 487 C 421 6 2007-06-01 306 Raw bumper for type 1 trucks PCS 1.0000000000 200.000000 200.000000 0.000000 200.000000 1.000000 RB100 \N \N 93 0.0000 0.0000 0.0000 \N 1.000000 \N \N \N \N \N \N t \N \N W 488 C 421 7 2007-06-01 306 Raw bumper for type 1 trucks PCS 1.0000000000 200.000000 200.000000 0.000000 200.000000 1.000000 RB100 \N \N 93 0.0000 0.0000 0.0000 \N 1.000000 \N \N \N \N \N \N t \N \N W 490 C 427 1 2007-06-03 307 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 10.000000 10.000000 0.000000 10.000000 1.000000 CHROM-TECH1 \N \N 92 0.0000 0.0000 0.0000 \N 1.000000 \N \N \N \N \N \N t \N 1539 W 516 C 462 1 2008-06-22 307 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 1100.000000 1100.000000 0.000000 1100.000000 1.000000 CHROM-TECH1 \N \N 92 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N \N \N \N t \N 1651 W 529 C 481 1 2008-12-27 307 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 91.000000 91.000000 0.000000 91.000000 1.000000 CHROM-TECH1 \N \N 92 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t \N 1696 W 564 C 519 1 2009-10-11 307 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 870.000000 870.000000 0.000000 870.000000 1.000000 CHROM-TECH1 \N \N 92 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t \N 1769 W 582 C 542 1 2010-06-10 307 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 1.000000 CHROM-TECH1 \N \N 92 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t \N 1802 W 597 C 558 1 2010-10-16 307 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 100.000000 100.000000 0.000000 100.000000 1.000000 CHROM-TECH1 \N \N 92 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t \N 1847 W 603 C 566 1 2011-04-15 307 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 1000.000000 1000.000000 0.000000 1000.000000 1.000000 CHROM-TECH1 \N \N 92 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t 2011-04-15 1893 W 604 C 568 1 2011-03-24 307 Chroming service using CTI proprietary technique type 1. UNITS 1.0000000000 400.000000 400.000000 0.000000 400.000000 1.000000 CHROM-TECH1 \N \N 92 0.0000 0.0000 0.0000 \N 1.000000 -1 -1 \N t 2011-03-24 1881 W \. -- -- Data for Name: poreject; Type: TABLE DATA; Schema: public; Owner: admin -- COPY poreject (poreject_id, poreject_date, poreject_ponumber, poreject_itemsite_id, poreject_vend_id, poreject_vend_item_number, poreject_vend_item_descrip, poreject_vend_uom, poreject_qty, poreject_posted, poreject_rjctcode_id, poreject_poitem_id, poreject_invoiced, poreject_vohead_id, poreject_agent_username, poreject_voitem_id, poreject_value, poreject_trans_username, poreject_recv_id) FROM stdin; 42 2011-06-03 16:28:30.290703-04 20108 381 94 DM100 EA 3500.000000 t 21 606 t 451 admin 277 77000.000000 admin \N \. -- -- Data for Name: potype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY potype (potype_id, potype_name, potype_descrip) FROM stdin; \. -- -- Data for Name: pr; Type: TABLE DATA; Schema: public; Owner: admin -- COPY pr (pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_poitem_id, pr_duedate, pr_itemsite_id, pr_qtyreq, pr_prj_id, pr_releasenote, pr_createdate) FROM stdin; 294 10083 1 O W 1901 \N 2011-07-13 307 1000.000000 -1 \N 2011-04-18 13:30:28.48679 \. -- -- Data for Name: prftcntr; Type: TABLE DATA; Schema: public; Owner: admin -- COPY prftcntr (prftcntr_id, prftcntr_number, prftcntr_descrip) FROM stdin; 1 01 Corporate 2 02 Retail \. -- -- Data for Name: priv; Type: TABLE DATA; Schema: public; Owner: admin -- COPY priv (priv_id, priv_module, priv_name, priv_descrip, priv_seq) FROM stdin; 123 System DispatchOwnEvents Can Dispatch Own Events \N 124 System ConfigureSR Configure S/R Module Parameters \N 68 System ConfigureSO Configure S/O Module Parameters \N 166 System MaintainImages Can Add/Edit/Delete Images \N 167 System MaintainReports Can Add/Edit/Delete Reports \N 168 System MaintainForms Can Add/Edit/Delete Forms \N 169 System MaintainCalendars Can Add/Edit/Delete Calendars \N 170 System MaintainLocales Can Add/Edit/Delete Locales \N 236 System ConfigureGL Can Configure the G/L Module \N 247 System ConfigureMS Can Configure the M/S Module \N 248 System ConfigureAR Can Configure the A/R Module \N 253 System MaintainBankAccounts Can Add/Edit/Delete Bank Accounts \N 3 System MaintainUsers Can Add/Edit/List Users \N 345 System MaintainCommentTypes Can Add/Edit/Delete Comment Types \N 359 System ConfigureAP Can Configure the A/P Module \N 388 System ConfigureCC User is allowed to alter the Credit Card Configuration. \N 394 System ConfigurePM Users will be able to view and edit the configuration options for the P/M Module. \N 399 System MaintainCustomCommands User can Create/Edit/View Custom commands \N 403 System MaintainDepartments Can create and modify Department definitions. \N 404 System ViewDepartments Can view Department definitions. \N 406 System ViewShifts Can view Shift definitions. \N 445 System ConfigureCRM Can change the CRM configuration module options. \N 453 System MaintainCountries Can Add/Edit/Delete Country information. \N 471 System FixSerial Can fix problems with serial values used to assign primary keys. \N 485 System MaintainPreferencesSelf Can Maintain the preferences for their own user only. \N 486 System MaintainPreferencesOthers Can Maintain the preferences of other users. \N 390 Products PostStandardCosts Can Post Product Standard Costs \N 487 Accounting PostPayments Can Post Payments/Checks. \N 488 Accounting ViewDepositsRegister Can view the Deposits Register. \N 489 Accounting ViewInvoiceRegister Can view the Invoice Register. \N 267 Accounting ViewStandardJournalGroups Can View Standard Journal Groups \N 268 Accounting PostStandardJournalGroups Can Post Standard Journal Groups \N 271 Accounting MaintainAccountingPeriods Can Add/Edit/Delete Accounting Periods \N 272 Accounting ViewAccountingPeriods Can View Accounting Periods \N 275 Accounting MaintainARMemos Can Add/Edit/Delete A/R Credit/Demo Memos \N 276 Accounting ViewARMemos Can View A/R Credit/Demo Memos \N 277 Accounting ApplyARMemos Can Apply A/R Credit/Demo Memos \N 278 Accounting MaintainMiscInvoices Can Add/Edit/Delete Misc. Invoices \N 279 Accounting ViewMiscInvoices Can View Misc. Invoices \N 280 Accounting PostMiscInvoices Can Post Misc. Invoices \N 294 Accounting PostJournalEntries Can Post Journal Entries \N 297 Accounting ViewGLTransactions Can View G/L Transactions \N 298 Accounting ViewTrialBalances Can View Trial Balances \N 302 Accounting MaintainCashReceipts Can Add/Edit/Delete Cash Receipts \N 303 Accounting ViewCashReceipts Can View Cash Receipts \N 369 Accounting MaintainPayments Can Maintain Payment and Check information. \N 370 Accounting ViewAPOpenItems Can view A/P Open Item infomation and related screens that use that information. \N 313 Accounting MaintainFinancialLayouts Can Add/Edit/Delete Financial Layouts \N 314 Accounting ViewFinancialLayouts Can View Financial Layouts \N 315 Accounting ViewFinancialReports Can View Financial Reports \N 371 Accounting PrintAPJournals Can view A/P Open Item infomation and related screens that use that information. \N 372 Accounting ViewAROpenItems Can view A/R Open Item infomation and related screens that use that information. \N 334 Accounting EditAPOpenItem Can Edit A/P Open Items \N 335 Accounting EditAROpenItem Can Edit A/R Open Items \N 373 Accounting PrintARJournals Can view A/R Open Item infomation and related screens that use that information. \N 374 Accounting MaintainAdjustmentTypes Can Add/Edit/Delete Adjustment Types \N 375 Accounting ViewAdjustmentTypes Can View Adjustment Types \N 376 Accounting MaintainBankAdjustments Can Add/Edit/Delete Bank Adjustments \N 377 Accounting ViewBankAdjustments Can View Bank Adjustments \N 378 Accounting PostBankAdjustments Can Post Bank Adjustments \N 356 Accounting MaintainAPMemos Can Add/Edit/Post A/P Memos \N 357 Accounting ViewAPMemos Can View A/P Memos \N 358 Accounting ApplyAPMemos Can Apply A/P Memos \N 379 Accounting MaintainBankRec Can Maintain Bank Reconciliations \N 380 Accounting ViewBankRec Can View Bank Reconciliation Information \N 382 Accounting MaintainReasonCodes User is allowed to maintain the Reason Codes. \N 395 Accounting CreateNewCurrency Create New Currencies \N 396 Accounting MaintainCurrencies Modify Existing Currencies \N 397 Accounting MaintainCurrencyRates Add and Modify Currency Exchange Rates \N 398 Accounting ViewCurrencyRates View Currency Exchange Rates \N 407 Accounting VoidPostedAPCheck Can void a posted A/P Check. \N 455 Accounting ChangeARInvcDistDate Can distribute an Invoice to the G/L using a date other than the Invoice Date \N 456 Accounting ChangePORecvPostDate Can post a Purchase Order Receipt to the G/L using a date other than the actual Receipt Date \N 457 Accounting ChangeSOMemoPostDate Can post a Sales Order Credit Memo to the G/L using a date other than the Credit Memo Document Date \N 458 Accounting ChangeVOPostDate Can post a Voucher to the G/L using a date other than the Voucher Distribution Date \N 461 Accounting MaintainTaxAuthorities Can Add/Edit/Delete Tax Authorities. \N 462 Accounting ViewTaxAuthorities Can View Tax Authorities. \N 463 Accounting MaintainTaxTypes Can Add/Edit/Delete Tax Types. \N 464 Accounting ViewTaxTypes Can View Tax Types. \N 467 Accounting OverrideTax Can manually override the system-selected Tax Code and/or tax % for individual Invoice line items. \N 468 Accounting MaintainTaxReconciliations Can Add/Edit/Delete unposted Tax Reconciliation records and associated data. \N 469 Accounting ViewTaxReconciliations Can View Tax Reconciliation records and associated data. \N 475 Accounting MaintainBudgets Can maintain budget information \N 476 Accounting ViewBudgets Can view budget information, not affecting FRE ability to view budgets. \N 100 System DispatchOtherEvents Can Dispatch Other User's Events \N 63 System ConfigureIM Configure I/M Module Parameters \N 64 System ConfigurePO Configure P/O Module Parameters \N 65 System ConfigurePD Configure P/D Module Parameters \N 73 System ConfigDatabaseInfo Can Configure the Database Information \N 121 System DeleteOwnEvents Can Delete Own Events \N 122 System DeleteOtherEvents Can Delete Other Users' Events \N 101 System ViewOtherEvents Can View Other User's Events \N 87 System ConfigureWO Configure S/O Module Parameters \N 23 Sales ViewCustomerMasters Can View Customer Masters \N 51 Sales ViewShipVias Can View Ship Via's \N 55 Sales ViewCustomerTypes Can View Customer Types \N 56 Sales MaintainCustomerTypes Can Add/Edit/Delete Customer Types \N 57 Sales ViewSalesReps Can View Sales Reps. \N 58 Sales MaintainSalesReps Can Add/Edit/Delete Sales Reps. \N 61 Sales ViewTerms Can View Terms \N 59 Sales MaintainTaxCodes Can Add/Edit/Delete Tax Codes \N 60 Sales ViewTaxCodes Can View Tax Codes \N 50 Sales MaintainShipVias Can Add/Edit/Delete Ship Via's \N 88 Sales MaintainShiptos Can Add/Edit/Delete Ship-Tos \N 89 Sales ViewShiptos Can View Ship-Tos \N 111 Sales OverridePrice Can Override Item Sales Prices \N 126 Sales MaintainSalesAccount Can Add/Edit/Delete Sales Account Assignments \N 127 Sales ViewSalesAccount Can View Sales Account Assignments \N 141 Sales MaintainSalesOrders Can Add/Edit/Delete Sales Orders \N 142 Sales ViewSalesOrders Can View Sales Orders \N 180 Sales MaintainPricingSchedules Can Add/Edit/Delete Pricing Schedules \N 181 Sales ViewPricingSchedules Can View Pricing Schedules \N 190 Sales SelectBilling Can Select an Order for Billing \N 192 Sales MaintainShippingForms Can Add/Edit/Delete Shipping Forms \N 193 Sales MaintainShippingZones Can Add/Edit/Delete Shipping Zones \N 194 Sales AssignPricingSchedules Can Assign Pricing Schedules \N 195 Sales CreateSales Can Create Sales \N 196 Sales UpdatePricingSchedules Can Update Pricing Schedules \N 197 Sales MaintainCreditMemos Can Add/Edit/Delete Unposted Credit Memos \N 198 Sales ViewCreditMemos Can View Unposted Credit Memos \N 199 Sales PrintCreditMemos Print Credit Memos \N 200 Sales PurgeCreditMemos Purge Credit Memos \N 201 Sales PurgeInvoices Purge Invoices \N 232 Sales MaintainQuotes Can Add/Edit/Delete Quotes \N 203 Sales ViewCommissions Can View Earned Commissions \N 233 Sales ViewQuotes Can View Quotes \N 70 Sales ViewCustomerPrices Can View Customer Type Prices \N 234 Sales ConvertQuotes Can Convert Quotes to Sales Orders \N 235 Sales PrintPackingLists \N \N 211 Sales ViewShippingZones Can View Shipping Zones \N 212 Sales ViewSalesHistory \N \N 239 Sales PrintQuotes Can Print Quotes \N 242 Sales OverrideSODate Can Override S/O Enter Dates \N 62 Accounting MaintainTerms Can Add/Edit/Delete Terms \N 257 Sales MaintainCustomerGroups Can Add/Edit/Delete/Modify Customer Groups \N 258 Sales ViewCustomerGroups Can View Customer Groups \N 273 Sales MaintainListPrices Can Modify List Prices \N 274 Sales ViewListPrices Can View List Prices \N 281 Sales EditSalesHistory Can Edit Posted Sales History \N 336 Sales CreateSOForHoldCustomer Can Create an Sales Order for a Customer on Credit Hold \N 337 Sales CreateSOForWarnCustomer Can Create an Sales Order for a Customer on Credit Warning \N 346 Sales UpdateCustomerCreditStatus Can Update a Customer's Credit Status \N 347 Sales ArchiveSalesHistory Can Archive Sales History \N 348 Sales RestoreSalesHistory Can Restore Sales History \N 355 Sales AlterPackDate Can Alter a Sales Order Pack Date \N 385 Sales MaintainCustomerMastersCustomerType Users are allowed to edit the Customer Type for a customer. \N 386 Sales MaintainCustomerMastersCustomerTypeOnCreate Users are allowed to edit the Customer Type for a customer when creating a new customer. \N 389 Sales AllowSelectOrderEditing Users are allowed to edit some additional information on the Select Order for Billing screen. \N 393 Sales ShowMarginsOnSalesOrder Users will see the margins on the Sales Order and Quote Screens for that older. \N 459 Sales MaintainProspectMasters Can Add/Edit/Delete Prospect information. \N 460 Sales ViewProspectMasters Can View Prospect information. \N 305 Accounting PostCashReceipts Can Post Cash Receipts \N 179 Accounting MaintainChartOfAccounts Can Add/Edit/Delete Accounts in the Chart of Accounts \N 251 Accounting MaintainStandardJournals Can Add/Edit/Delete Standard Journals \N 252 Accounting ViewStandardJournals Can View Standard Journals \N 254 Accounting PostStandardJournals Can Post Standard Journals \N 260 Accounting MaintainVendorAccounts Can Add/Edit/Delete Vendor Account Assignments \N 261 Accounting ViewVendorAccounts Can View Vendor Account Assignments \N 262 Accounting MaintainCheckFormats Can Add/Edit/Delete A/P Check Formats \N 263 Accounting ViewCheckFormats Can View A/P Check Formats \N 266 Accounting MaintainStandardJournalGroups Can Add/Edit/Delete Standard Journal Groups \N 45 Purchase ViewVendors Can View Vendors \N 44 Purchase MaintainVendors Can Add/Edit/Delete Vendors \N 48 Purchase MaintainItemSources Can Add/Edit/Delete P/O Item Sources \N 49 Purchase ViewItemSources Can View P/O Item Sources \N 53 Purchase MaintainPurchaseOrders Can Add/Edit/Delete Purchase Orders \N 54 Purchase ViewPurchaseOrders Can View Orders \N 46 Purchase MaintainPlannerCodes Can Add/Edit/Delete Planner Codes \N 47 Purchase ViewPlannerCodes Can View Planner Codes \N 221 Inventory MaintainCarriers Can Add/Edit/Delete Shippers \N 120 Purchase AssignItemsToPlannerCode Can Assign Items to a Planner Code \N 189 Purchase PrintPurchaseOrders Can Print Purchase Orders \N 204 Purchase MaintainRejectCodes Can Add/Edit/Delete Reject Codes \N 205 Purchase ViewRejectCodes Can View Reject Codes \N 207 Purchase ViewVendorPerformance Can View Vendor Performance \N 208 Purchase ViewCashRequirements Can View Cash Requirements \N 209 Purchase ViewPurchaseRequests Can View Purchase Requests \N 213 Purchase MaintainPurchaseRequests Can Add/Edit/Delete Purchase Requests \N 231 Purchase ViewReceiptsReturns View Receipts and Returns \N 244 Purchase ViewBuyCard Can View Buy Cards \N 245 Purchase ViewVendorAddresses Can View Vendor Addresses \N 246 Purchase MaintainVendorAddresses Can Add/Edit/Delete Vendor Addresses \N 249 Purchase MaintainVendorTypes Can Add/Edit/Delete Vendor Types \N 250 Purchase ViewVendorTypes Can View Vendor Types \N 353 Purchase ReschedulePurchaseOrders Can Reschedule Purchase Orders \N 354 Purchase ChangePurchaseOrderQty Can Change Purchase Order Item Quantities \N 368 Purchase MaintainUninvoicedReceipts Can Mark as invoiced and Correct Receiving on uninvoiced receipts \N 214 Inventory ViewShipping Can View Stock at Shipping \N 383 Purchase ViewUninvoicedReceipts User is allowed to View Uninvoiced Receivings. \N 452 Purchase MaintainPostedPurchaseOrders Can Edit Purchase Orders which have already been Posted \N 17 Manufacture ReturnWoMaterials Can Return Work Order Materials \N 16 Manufacture IssueWoMaterials Can Issue Work Order Materials \N 91 Manufacture MaintainWoMaterials Can Add/Edit/Delete Work Order Materials \N 27 Manufacture PostProduction Can Post Production \N 11 Manufacture ViewWorkOrders Can View Work Orders \N 93 Manufacture ViewWoMaterials Can View Work Order Materials \N 12 Manufacture MaintainWorkOrders Can Add/Edit/Delete Work Orders \N 13 Manufacture ExplodeWorkOrders Can Explode Work Orders \N 26 Manufacture ImplodeWorkOrders Can Implode Work Orders \N 75 Manufacture RescheduleWorkOrders Can Reschedule Work Orders \N 76 Manufacture ChangeWorkOrderQty Can Change Work Order Quantities \N 94 Manufacture CloseWorkOrders Can Close Work Orders \N 306 Misc. MaintainShippingChargeTypes Can Add/Edit/Delete Shipping Charge Types \N 307 Misc. ViewShippingChargeTypes Can View Shipping Charge Types \N 125 Manufacture PostMiscProduction Can Make Miscellaneous Production Postings \N 140 Manufacture PurgeWorkOrders Can Purge Closed Work Orders \N 173 Manufacture ViewMaterialVariances Can View W/O Material Variances \N 176 Manufacture PrintWorkOrderPaperWork Can Print Work Order Paper Work \N 177 Manufacture ReleaseWorkOrders Can Release Work Orders \N 178 Manufacture RecallWorkOrders Can Recall Work Orders \N 182 Manufacture ScrapWoMaterials \N \N 228 Manufacture DeleteWorkOrders Can Delete Open Work Orders \N 352 Manufacture ReprioritizeWorkOrders Can Reprioritize Work Orders \N 408 Manufacture ChangeNonPickItems Can change the Issue Items Not On Pick List flag on Post Production. \N 409 Manufacture ChangeReceiveInventory Can change the Receive Inventory List flag on Post Operations. \N 22 Sales MaintainCustomerMasters Can Add/Edit/Delete Customer Masters \N 86 Inventory ViewLocations Can View Warehouse Locations \N 90 Inventory ViewInventoryAvailability Can View Inventory Availability \N 116 Inventory CreateAdjustmentTrans Can Create an Adjustment Transaction \N 117 Inventory CreateScrapTrans Can Create a Scrap Transaction \N 118 Inventory CreateReceiptTrans Can Create a Misc. Receipt Transaction \N 269 Misc. MaintainExpenseCategories Can Add/Edit/Delete Expense Categories \N 270 Misc. ViewExpenseCategories Can View Expense Categories \N 119 Inventory CreateInterWarehouseTrans Can Create a Inter-Warehouse Transfer Transaction \N 14 Inventory MaintainItemSites Can Add/Edit/Delete Item Sites \N 15 Inventory ViewItemSites Can View Item Sites \N 128 Inventory PostCountSlips Can Post Count Slips \N 129 Inventory EnterCountSlips Can Create and Enter Count Slips \N 131 Inventory DeleteCountTags Delete Count Tags \N 130 Inventory ZeroCountTags Can Zero Uncounted Count Tags \N 132 Inventory ViewCountTags View Count Tags \N 133 Inventory PostCountTags Can Post Count Tags \N 362 Misc. MaintainSalesCategories Can Add/Edit/Delete Sales Categories \N 363 Misc. ViewSalesCategories Can View Sales Categories \N 147 Inventory PurgeCountSlips Can Purge Posted Count Slips \N 81 Inventory PurgeCountTags Cost Purge Posted Count Tags \N 148 Inventory ViewInventoryValue Can View Inventory Values \N 19 Inventory RelocateInventory Can Relocate Inventory \N 149 Inventory ReassignLotSerial Can Reassign Lot/Serial #s \N 150 Inventory ViewQOH Can View QOH \N 151 Inventory UpdateCycleCountFreq Can Update an Item Site's Cycle Count Frequency \N 152 Inventory UpdateLeadTime Can Update an Item Site's Lead Time \N 154 Inventory SummarizeInventoryTransactions Can Summarized Inventory Transactions \N 153 Inventory ThawInventory Can Thaw Inventory \N 35 Inventory MaintainCostCategories Can Add/Edit/Delete Cost Categories \N 36 Inventory ViewCostCategories Can View Cost Categories \N 164 Inventory DeleteCountSlips Can Delete Count Slips \N 215 Inventory PrintBillsOfLading Can Print Bills of Lading \N 217 Inventory ShipOrders Can Ship Orders from Shipping \N 218 Inventory ReturnStockFromShipping Can Return Stock from Shipping \N 219 Inventory IssueStockToShipping Can Issue Stock to Shipping \N 220 Inventory PurgeShippingRecords Can Purge Shipping Records \N 223 Inventory ViewDestinations Can View Destinations \N 224 Inventory MaintainDestinations Can Add/Edit/Delete Destinations \N 225 Inventory EnterShippingInformation Can Enter Shipping Information \N 216 Inventory RecallOrders Can Recall Orders to Shipping \N 222 Inventory ViewCarriers Can View Shippers \N 226 Inventory EnterReceipts Can Enter Receipts \N 227 Inventory EnterReturns Can Enter Returns \N 241 Inventory UpdateOUTLevels Can Update Order Up To Levels \N 238 Inventory UpdateReorderLevels Can Update Reorder Levels \N 255 Inventory MaintainPackingListBatch Can Modify Packing List Batch \N 256 Inventory ViewPackingListBatch Can View Packing List Batch \N 264 Inventory MaintainCharacteristics Can Add/Edit/Delete Characteristics \N 265 Inventory ViewCharacteristics Can View Characteristics \N 350 Inventory DeleteItemSites Can Delete Item Sites \N 351 Inventory CreateExpenseTrans Can Create an Expense Transaction \N 367 Inventory CreateTransformTrans Can Create Transform Transactions \N 420 CRM MaintainAddresses Can Add/Edit/Delete Addresses \N 422 CRM MaintainCompetitorMasters Can Add/Edit/Delete Competitor Masters \N 426 CRM MaintainPartners Can Add/Edit/Delete Partner Masters \N 429 CRM MaintainWarrantyTerms Can Add/Edit/Delete Warranty Terms \N 433 CRM ViewAddresses Can View Addresses \N 435 CRM ViewCommLog Can View the Communications Log \N 436 CRM ViewCompetitorMasters Can View Competitor Masters \N 441 CRM ViewPartners Can View Partner Masters \N 444 CRM ViewWarrantyTerms Can View Warranty Terms \N 454 Inventory RecallInvoicedShipment Can recall shipments that have already been invoiced. \N 446 CRM MaintainTitles Can Add/Edit/Delete Titles (Honorifics). \N 447 CRM ViewTitles Can View Titles (Honorifics). \N 448 CRM MaintainIncidentCategories Can Add/Edit/Delete Incident Categories \N 449 CRM MaintainIncidentPriorities Can Add/Edit/Delete Incident Priorities \N 450 CRM MaintainIncidentSeverities Can Add/Edit/Delete Incident Severities \N 451 CRM MaintainIncidentResolutions Can Add/Edit/Delete Incident Resolutions \N 470 Inventory ViewItemAvailabilityWorkbench Can View Item Availability Workbench. \N 472 Inventory MaintainTransferOrders Can Add/Edit/Delete Transfer Orders \N 473 Inventory ViewTransferOrders Can View Transfer Orders \N 474 Inventory OverrideTODate Can Change the Order Date of existing Transfer Orders \N 490 Sales MaintainReturns Allows users to create Return Authorizations. \N 491 Sales ViewReturns Allows users to view and print Return Authorizations. \N 492 Products MaintainRevisions Allows users to create revisions and change status. \N 493 Products ViewInactiveRevisions Allows users to view and print inactive revisions. \N 494 Products UseInactiveRevisions Allows users to create orders using inactive revisions. \N 495 System ConfigureImportExport Can Change or Create Settings For Importing and Exporting Data \N 496 System ImportXML Can Import Data From XML Sources \N 187 Accounting MaintainVouchers Can Add/Edit/Delete Vouchers \N 188 Accounting PostVouchers Can Post Vouchers \N 259 Accounting ViewVouchers Can View Vouchers \N 497 Accounting ProcessCreditCards Can Process Credit Card Transactions \N 480 CRM MaintainOpportunitySources Can Add/Edit/Delete Opportunity Sources \N 481 CRM MaintainOpportunityStages Can Add/Edit/Delete Opportunity Stages \N 482 CRM MaintainOpportunityTypes Can Add/Edit/Delete Opportunity Types \N 5 Products MaintainBOMs Can Add/Edit/Delete Bills of Materials \N 4 Products ViewBOMs Can View Bills of Materials \N 103 Products EnterActualCosts Can Enter Free Form Actual Costs \N 104 Products UpdateActualCosts Can Update Actual Costs via P/O or P/D \N 105 Products PostActualCosts Can Post Actual Costs to Standard Costs \N 106 Products ViewCosts Can View Actual and Standard Costs \N 107 Products MaintainUserCostingElements Can Add/Edit/Delete User Costing Elements \N 1 Products ViewItemMasters Can View Item Masters \N 2 Products MaintainItemMasters Can Add/Edit/Delete Item Masters \N 134 Products MaintainItemGroups Can Add/Edit/Delete Item Groups \N 143 Products ViewClassCodes Can View Class Codes \N 144 Products MaintainClassCodes Can Add/Edit/Delete Class Codes \N 160 Products ViewItemOptions Can View Item Options \N 31 Products MaintainProductCategories Add/Edit/Delete Product Categories \N 161 Products DeleteCosts Can Delete Item Costs \N 162 Products CreateCosts Can Create User Costs \N 163 Products ViewProductCategories Can View Product Categories \N 316 Products MaintainUOMs Can Add/Edit/Delete Unit of Measures \N 317 Products ViewUOMs Can View Unit of Measures \N 349 Products DeleteItemMasters Can Delete Item Masters \N 498 Sales MaintainReservations Can modify S/O Reservation quantities. \N 10 Inventory ViewInventoryHistory Can View Inventory History \N 30 Inventory ViewWarehouses Can View Warehouses \N 29 Inventory MaintainWarehouses Can Add/Edit/Delete Warehouses \N 37 Inventory UpdateABCClass Can Run Update ABC Class Utility \N 42 Inventory FreezeInventory Can Freeze Inventory \N 84 Inventory EnterMiscCounts Can Enter Misc. Counts \N 82 Inventory IssueCountTags Can Issue Count Tags \N 83 Inventory EnterCountTags Can Enter Count Tags \N 85 Inventory MaintainLocations Can Add/Edit/Delete Warehouse Locations \N 499 System MaintainScripts Can Change or Create Scripts that are executed by windows when they are opened. \N 501 Inventory AlterTransactionDates Can set the Transaction Date written to the G/L and Inventory History tables for inventory transactions. \N 502 System MaintainEmployees Can Change or Create Employee records. \N 503 System ViewEmployees Can view Employee records. \N 504 System MaintainGroups Can Change or Create Settings For Groups \N 505 System MaintainEmployeeGroups Can Change or Create Employee Groups. \N 506 System ViewEmployeeGroups Can view Employee Group records. \N 500 System MaintainScreens Can Change or Create UI Forms that are executed by custom windows when they are opened. \N 508 Inventory MaintainExternalShipping Can Change or Create External Shipping Records. \N 509 Custom CustomDisplayItemLocations Auto Generated Custom Priv. \N 510 System fixACL Can fix Access Control List problems at the database level. \N 512 System ViewPackages Can View installed Packages. \N 513 Accounting SynchronizeCompanies Can run company trial balance synchronization utility. \N 514 Inventory MaintainSiteTypes Can Change or Create Settings For Site Types \N 515 Inventory ViewSiteTypes Can View Settings For Site Types \N 191 Accounting PrintInvoices Can Print Invoices \N 202 Accounting PostARDocuments Can Post Invoices and Credit Memos \N 516 Products MaintainFreightClasses Can Add/Edit/Delete Freight Classes \N 517 Products ViewFreightClasses Can View Freight Classes \N 518 Sales FirmSalesOrder Can Firm a Sales Order line item to prevent editing \N 519 CRM EditOwner Can Edit Owner in CRM documents \N 520 System ConfigureEncryption Allowed to view and change the Encryption Key File \N 521 Accounting ViewTaxZones Can view Tax Zones \N 522 Accounting MaintainTaxZones Can Add/Edit/Delete Tax Zones \N 523 Accounting ViewTaxClasses Can view Tax Classes \N 524 Accounting MaintainTaxClasses Can Add/Edit/Delete Tax Classes \N 526 System EditOwnComments User is allowed to edit comments they have entered that are of an editable comment type. \N 527 System EditOthersComments User is allowed to edit iany comments entered that are of an editable comment type. \N 465 Accounting MaintainTaxAssignments Can Add/Edit/Delete Tax Assignments \N 466 Accounting ViewTaxAssignments Can View Tax Assignments \N 531 Inventory ReleaseTransferOrders Can Release Transfer Orders from status Unreleased to status Open \N 540 System MaintainStates User is allowed to edit the list of States and Provinces \N 545 Custom \N Auto Generated Custom Priv. \N 546 System MaintainMetaSQL User is allowed to edit MetaSQL statements with the MetaSQL editor. \N 547 System ViewMetaSQL User is allowed to view MetaSQL statements with the MetaSQL editor. \N 548 System ExecuteMetaSQL User is allowed to execute MetaSQL statements with the MetaSQL editor that change the database. \N 549 Products MaintainLotSerialSequences Can modify LotSerial Sequences \N 550 Products ViewLotSerialSequences Can view LotSerial Sequences \N 137 Purchase ReleasePurchaseOrders Can Release Purchase Orders \N 551 System ExportXML Can Export XML Files \N 629 Accounting DeletePostedJournals Can delete posted Standard Journals and Journal Entries \N 630 Accounting EditPostedJournals Can edit posted Journal Entries \N 631 Accounting ViewJournals Can view Journals \N 632 Accounting PostJournals Can post Journals \N 651 CRM MergeContacts Can use Contact Merge utility \N 652 System MaintainTranslations User is allowed to maintain/download translations to their local computer. \N 653 System MaintainDictionaries User is allowed to maintain/download spell check dictionaries to their local computer. \N 431 CRM ReassignToDoItems Can Reassign ToDoItems to other people \N 425 CRM MaintainAllToDoItems Can Add/Edit/Delete all ToDoItems 0 416 CRM CloseAllIncidents Can Close all Incidents after confirming that it has been satisfactorily resolved \N 663 CRM ClosePersonalIncidents Can Incidents when Owner or Assigned after confirming that it has been resolved \N 392 CRM MaintainAllProjects Can Add/Edit/Delete all Projects 0 423 CRM MaintainAllContacts Can Add/Edit/Delete all Contacts 0 419 CRM MaintainAllCRMAccounts Can Add/Edit/Delete all CRM Accounts 0 483 CRM MaintainAllOpportunities Can Add/Edit/Delete all Opportunities 0 424 CRM MaintainAllIncidents Can Add/Edit/Delete all Incidents 0 391 CRM ViewAllProjects Can View all Projects 1 440 CRM ViewAllToDoItems Can View all ToDoItems 1 437 CRM ViewAllContacts Can View all Contacts 1 432 CRM ViewAllCRMAccounts Can View all CRM Accounts 1 484 CRM ViewAllOpportunities Can View all Opportunities 1 439 CRM ViewAllIncidents Can View all Incidents 1 427 CRM MaintainPersonalToDoItems Can Add/Edit/Delete ToDoItems when Owner or Assigned 2 655 CRM MaintainPersonalContacts Can Add/Edit/Delete Contacts when Owner or Assigned 2 657 CRM MaintainPersonalCRMAccounts Can Add/Edit/Delete CRM Accounts when Owner or Assigned 2 659 CRM MaintainPersonalOpportunities Can Add/Edit/Delete Opportunities when Owner or Assigned 2 661 CRM MaintainPersonalIncidents Can Add/Edit/Delete Incidents when Owner or Assigned 2 665 CRM MaintainPersonalProjects Can Add/Edit/Delete Projects when Owner or Assigned 2 442 CRM ViewPersonalToDoItems Can View ToDoItems when Owner or Assigned 4 654 CRM ViewPersonalContacts Can View Contacts when Owner or Assigned 4 656 CRM ViewPersonalCRMAccounts Can View CRM Accounts when Owner or Assigned 4 658 CRM ViewPersonalOpportunities Can View Opportunities when Owner or Assigned 4 660 CRM ViewPersonalIncidents Can View Incidents when Owner or Assigned 4 662 CRM ViewPersonalIncidentHistory Can View Incident History when Owner or Assigned 4 664 CRM ViewPersonalProjects Can View Projects when Owner or Assigned 4 666 Accounting VoidPostedVouchers Can void posted A/P Vouchers. \N 667 Accounting VoidPostedARCreditMemos Can void posted A/R Credit Memos. \N 668 Accounting VoidPostedInvoices Can void posted A/R Invoices. \N 525 Accounting VoidPostedCashReceipts Can void posted A/R Cash Receipts. \N 669 Accounting MaintainTaxRegistrations Can Add/Edit/Delete Tax Registrations. \N 670 Accounting ViewTaxRegistrations Can View Tax Registrations. \N 671 Accounting PostFrozenPeriod Can Post into frozen Accounting Period \N 676 Sales MaintainSaleTypes Can Add/Edit/Delete Sale Types. \N 677 Sales ViewSaleTypes Can View Sale Types. \N 680 Sales ConvertQuotesInvoice Can Convert Quote to Invoice. \N 633 System MaintainRegistrationKey Can Configure the Registration Key. \N \. -- -- Data for Name: prj; Type: TABLE DATA; Schema: public; Owner: admin -- COPY prj (prj_id, prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po, prj_owner_username, prj_start_date, prj_due_date, prj_assigned_date, prj_completed_date, prj_username, prj_recurring_prj_id, prj_crmacct_id, prj_cntct_id) FROM stdin; 4 TT2007S TTOYS 2007 Sept Project Special September effort C t t t admin 2007-01-01 2007-12-31 2007-01-01 2007-12-31 admin \N \N \N 5 GREENLEAF Greenleaf Customer product devlopment project O t t t admin 2010-12-20 2011-02-15 2010-12-20 \N admin \N \N \N 6 TRELLIS Trellis Product Design for Vienna Collctibles O t t t admin 2011-04-18 2012-04-17 2011-04-18 \N admin \N \N \N \. -- -- Data for Name: prjtask; Type: TABLE DATA; Schema: public; Owner: admin -- COPY prjtask (prjtask_id, prjtask_number, prjtask_name, prjtask_descrip, prjtask_prj_id, prjtask_anyuser, prjtask_status, prjtask_hours_budget, prjtask_hours_actual, prjtask_exp_budget, prjtask_exp_actual, prjtask_owner_username, prjtask_start_date, prjtask_due_date, prjtask_assigned_date, prjtask_completed_date, prjtask_username) FROM stdin; 2 20-Engineering Engineering Develop and approve design drawings 5 \N O 20.000000 0.000000 1000.0000 0.0000 admin 2011-01-12 2011-01-19 2010-12-29 \N admin 3 30-Tooling & Prototype Tooling & Prototype Procure tooling and build prototype 5 \N O 40.000000 0.000000 5000.0000 0.0000 admin 2011-01-19 2011-01-28 2010-12-20 \N admin 4 40-Pre-Production Pre-Production Build pre-production samples 5 \N O 40.000000 0.000000 5000.0000 0.0000 admin 2011-02-02 2011-02-09 2010-12-20 \N admin 5 50-Marketing Marketing Develop marketing plan and materials 5 \N O 20.000000 0.000000 2000.0000 0.0000 admin 2011-02-12 2011-02-19 2010-12-20 \N admin 1 10-Concept Concept Work with client to develop concept 5 \N O 20.000000 18.000000 500.0000 456.0500 admin 2010-12-20 2011-01-05 2010-12-20 \N admin 7 20-Proto Build Prototypes Build prototypes of each product 6 \N P 100.000000 0.000000 5000.0000 0.0000 admin \N 2012-04-17 \N \N admin 6 10-Drawings Initial Drawings Initial CAD drawings for European collectibles 6 \N O 100.000000 50.000000 5000.0000 0.0000 admin 2011-04-18 2011-10-15 2011-04-18 \N admin \. -- -- Data for Name: prjtaskuser; Type: TABLE DATA; Schema: public; Owner: admin -- COPY prjtaskuser (prjtaskuser_id, prjtaskuser_prjtask_id, prjtaskuser_username) FROM stdin; \. -- -- Data for Name: prodcat; Type: TABLE DATA; Schema: public; Owner: admin -- COPY prodcat (prodcat_id, prodcat_code, prodcat_descrip) FROM stdin; 28 CLASSIC-METAL Classic Metal Product Line 29 CLASSIC-WOOD Classic Wood Product Line 30 COLLECTORS-METAL Collectors Metal Product Line 31 COLLECTORS-WOOD Collectors Wood Product Line 33 SERVICES Services \. -- -- Data for Name: prospect; Type: TABLE DATA; Schema: public; Owner: admin -- COPY prospect (prospect_id, prospect_active, prospect_number, prospect_name, prospect_cntct_id, prospect_comments, prospect_created, prospect_salesrep_id, prospect_warehous_id, prospect_taxzone_id) FROM stdin; 98 t WTOYS World Toys Ltd. 25 2009-06-26 29 35 \N \. -- -- Data for Name: qryhead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY qryhead (qryhead_id, qryhead_name, qryhead_descrip, qryhead_notes, qryhead_username, qryhead_updated) FROM stdin; \. -- -- Data for Name: qryitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY qryitem (qryitem_id, qryitem_qryhead_id, qryitem_name, qryitem_order, qryitem_src, qryitem_group, qryitem_detail, qryitem_notes, qryitem_username, qryitem_updated) FROM stdin; \. -- -- Data for Name: quhead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY quhead (quhead_id, quhead_number, quhead_cust_id, quhead_quotedate, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptophone, quhead_salesrep_id, quhead_terms_id, quhead_freight, quhead_ordercomments, quhead_shipcomments, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_commission, quhead_custponumber, quhead_fob, quhead_shipvia, quhead_warehous_id, quhead_packdate, quhead_prj_id, quhead_misc, quhead_misc_accnt_id, quhead_misc_descrip, quhead_billtocountry, quhead_shiptocountry, quhead_curr_id, quhead_imported, quhead_expire, quhead_calcfreight, quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email, quhead_taxzone_id, quhead_taxtype_id, quhead_ophead_id, quhead_status, quhead_saletype_id, quhead_shipzone_id) FROM stdin; 123 40013 95 2011-04-18 31 Olde Towne Store 1 Olde Towne Toys Store 1 1 Duke Street Alexandria VA 22201 29 42 10.0000 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n Tremendous Toys Incorporated Tremendous Toys Inc. 101 Toys Place Walnut Hills VA 22209 0.0750 UPS-GROUND-UPS Ground 35 2011-06-22 \N 0.0000 \N United States United States 1 f \N t 8 Mr. Jake Sweet 800-321-5433 \N 703-931-2212 \N 1 Mr. Mike Farley 703-931-4269 \N 703-931-2212 703-931-2212 2 \N 3 O 1 35 \. -- -- Data for Name: quitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY quitem (quitem_id, quitem_quhead_id, quitem_linenumber, quitem_itemsite_id, quitem_scheddate, quitem_qtyord, quitem_unitcost, quitem_price, quitem_custprice, quitem_memo, quitem_custpn, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_imported, quitem_qty_uom_id, quitem_qty_invuomratio, quitem_price_uom_id, quitem_price_invuomratio, quitem_promdate, quitem_taxtype_id, quitem_dropship, quitem_itemsrc_id, quitem_pricemode) FROM stdin; 118 123 1 308 2011-06-17 1000.000000 8.298200 40.5000 40.5000 \N f 35 316 0.000000 f 4 1.0000000000 4 1.0000000000 \N 2 f \N D \. -- -- Data for Name: rcalitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY rcalitem (rcalitem_id, rcalitem_calhead_id, rcalitem_offsettype, rcalitem_offsetcount, rcalitem_periodtype, rcalitem_periodcount, rcalitem_name) FROM stdin; 135 47 W 0 W 1 Week1 136 47 W 1 W 1 Week2 137 47 W 2 W 1 Week3 138 47 W 3 W 1 Week4 139 47 W 4 W 1 Week5 140 47 W 5 W 1 Week6 141 47 W 6 W 1 Week7 142 47 W 7 W 1 Week8 143 48 Y -1 Y 1 YR5 144 48 Y -2 Y 1 YR4 145 48 Y -3 Y 1 YR3 146 48 Y -4 Y 1 YR2 147 48 Y -5 Y 1 YR1 149 49 W -2 W 1 Week2 148 49 D -7 D 8 Week1 150 49 W -3 W 1 Week3 151 49 W -4 W 1 Week4 152 49 W -5 W 1 Week5 153 49 W -6 W 1 Week6 154 49 W -7 W 1 Week7 155 49 W -8 W 1 Week8 156 50 D 0 D 1 1 157 50 D -1 D 1 2 163 51 D 0 D 1 1 164 51 D 1 D 1 2 165 51 D 2 D 1 3 166 51 D 3 D 1 4 167 51 D 4 D 1 5 168 51 D 5 D 1 6 169 51 D 6 D 1 7 158 50 D -2 D 1 3 159 50 D -3 D 1 4 160 50 D -4 D 1 5 161 50 D -5 D 1 6 162 50 D -6 D 1 7 \. -- -- Data for Name: recur; Type: TABLE DATA; Schema: public; Owner: admin -- COPY recur (recur_id, recur_parent_id, recur_parent_type, recur_period, recur_freq, recur_start, recur_end, recur_max, recur_data) FROM stdin; \. -- -- Data for Name: recurtype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY recurtype (recurtype_id, recurtype_type, recurtype_table, recurtype_donecheck, recurtype_schedcol, recurtype_limit, recurtype_copyfunc, recurtype_copyargs, recurtype_delfunc) FROM stdin; 4 I invchead invchead_posted invchead_invcdate \N copyinvoice {integer,date} deleteinvoice 3 J prj (prj_completed_date IS NOT NULL OR prj_status = 'C') prj_due_date \N copyprj {int,date} \N 32 ALLOCATERESERVATIONS xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 33 CREATEBUFFERSTATUS xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 34 CREATERECURRINGINVOICES xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 35 EDIBATCH xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 36 EMAIL xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 37 EMAILCSV xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 38 EMAILHTML xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 39 EMAILXML xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 40 FTPCSV xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 41 FTPHTML xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 42 FTPREPORT xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 43 FTPXML xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 44 IMPORTDATA xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 45 POSTACTUALCOST xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 46 POSTGLSERIES xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 47 POSTINVOICES xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 48 RELEASEPLANNEDORDERS xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 49 RUNMPS xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 50 RUNMRP xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 51 RUNREPORT xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 52 SERVERMAINTENANCE xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 53 UPDATEACTUALCOST xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 54 UPDATELATECUSTCREDITSTATUS xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 55 UPDATEOUTLEVEL xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 56 UPDATEREORDERLEVEL xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 57 UPDATESTANDARDCOST xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 58 FTPGET xtbatch.batch batch_completed IS NOT NULL batch_scheduled \N xtbatch.copybatchitem {id,timestamp} xtbatch.cancelBatchItem 59 V vohead vohead_posted vohead_docdate \N copyvoucher {integer,date} \N 2 INCDT incdt incdt_status IN ('R', 'L') incdt_timestamp \N copyincdt {int,timestamp} deleteincident 1 TODO todoitem todoitem_completed_date IS NOT NULL todoitem_due_date checkprivilege('MaintainAllToDoItems') OR (checkprivilege('MaintainPersonalToDoItems') AND CURRENT_USER IN (todoitem_owner_username, todoitem_username)) copytodoitem {int,date,NULL} \N \. -- -- Data for Name: recv; Type: TABLE DATA; Schema: public; Owner: admin -- COPY recv (recv_id, recv_order_type, recv_order_number, recv_orderitem_id, recv_agent_username, recv_itemsite_id, recv_vend_id, recv_vend_item_number, recv_vend_item_descrip, recv_vend_uom, recv_purchcost, recv_purchcost_curr_id, recv_duedate, recv_qty, recv_recvcost, recv_recvcost_curr_id, recv_freight, recv_freight_curr_id, recv_date, recv_value, recv_posted, recv_invoiced, recv_vohead_id, recv_voitem_id, recv_trans_usr_name, recv_notes, recv_gldistdate, recv_splitfrom_id, recv_rlsd_duedate) FROM stdin; 128 PO 20001 432 jsmith 298 78 TPINS-1 EA 0.250000 1 2005-12-28 200.000000 0.500000 1 0.0000 1 2005-12-27 10:43:35.053859-05 \N t t 175 \N 66278 \N \N \N 129 PO 20001 433 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2005-12-28 100.000000 0.250000 1 0.0000 1 2005-12-27 10:43:39.437144-05 \N t t 175 \N 66278 \N \N \N 130 PO 20001 434 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-29 400.000000 0.100000 1 0.0000 1 2005-12-27 10:43:51.556063-05 \N t t 175 \N 66278 \N \N \N 131 PO 20001 435 jsmith 297 78 TP-PNT-100 LB 0.100000 1 2005-12-29 10.000000 0.700000 1 0.0000 1 2005-12-27 10:44:03.736646-05 \N t t 175 \N 66278 \N \N \N 132 PO 20001 436 jsmith 294 78 TPBODY1 EA 1.000000 1 2005-12-29 100.000000 1.000000 1 9.9900 1 2005-12-27 10:44:18.407374-05 \N t t 175 \N 66278 \N \N \N 133 PO 20002 437 jsmith 297 78 TP-PNT-100 LB 0.100000 1 2005-12-30 8.000000 0.700000 1 0.0000 1 2005-12-27 10:55:37.383043-05 \N t t 177 \N 66278 \N \N \N 134 PO 20003 438 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-30 400.000000 0.100000 1 0.0000 1 2005-12-29 09:53:19.259917-05 \N t t 184 \N 66278 \N \N \N 135 PO 20003 439 jsmith 299 78 TPWHL01 EA 0.100000 1 2006-01-01 400.000000 0.100000 1 0.0000 1 2005-12-29 09:53:26.730471-05 \N t t 184 \N 66278 \N \N \N 136 PO 20003 440 jsmith 294 78 TPBODY1 EA 1.000000 1 2005-12-30 300.000000 1.000000 1 0.0000 1 2005-12-29 09:53:32.033494-05 \N t t 184 \N 66278 \N \N \N 137 PO 20003 441 jsmith 297 78 TP-PNT-100 LB 0.100000 1 2005-12-30 10.000000 0.700000 1 0.0000 1 2005-12-29 09:53:38.120507-05 \N t t 184 \N 66278 \N \N \N 138 PO 20003 442 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-30 492.000000 0.100000 1 0.0000 1 2005-12-29 09:53:46.622933-05 \N t t 184 \N 66278 \N \N \N 139 PO 20003 443 jsmith 298 78 TPINS-1 EA 0.250000 1 2005-12-30 300.000000 0.500000 1 0.0000 1 2005-12-29 09:53:52.533932-05 \N t t 184 \N 66278 \N \N \N 140 PO 20003 444 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2005-12-30 400.000000 0.250000 1 0.0000 1 2005-12-29 09:54:06.179503-05 \N t t 184 \N 66278 \N \N \N 145 PO 20005 449 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-30 500.000000 0.100000 1 0.0000 1 2005-12-29 17:57:11.206628-05 \N t t 188 \N 66278 \N \N \N 146 PO 20006 450 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-30 500.000000 0.100000 1 0.0000 1 2005-12-29 18:01:50.24484-05 \N t t 190 \N 66278 \N \N \N 147 PO 20007 451 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-30 500.000000 0.100000 1 10.0000 1 2005-12-29 18:05:04.634925-05 \N t t 192 \N 66278 \N \N \N 141 PO 20004 445 jsmith 294 78 TPBODY1 EA 1.000000 1 2005-12-30 10000.000000 1.000000 1 0.0000 1 2005-12-29 12:00:16.284908-05 \N t t 186 \N 66278 \N \N \N 142 PO 20004 446 jsmith 298 78 TPINS-1 EA 0.250000 1 2006-01-01 10000.000000 0.500000 1 0.0000 1 2005-12-29 12:00:21.955868-05 \N t t 186 \N 66278 \N \N \N 143 PO 20004 447 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-31 40000.000000 0.100000 1 0.0000 1 2005-12-29 12:00:27.827464-05 \N t t 186 \N 66278 \N \N \N 144 PO 20004 448 jsmith 297 78 TP-PNT-100 LB 0.100000 1 2005-12-31 100.000000 0.700000 1 0.0000 1 2005-12-29 12:00:36.425766-05 \N t t 186 \N 66278 \N \N \N 149 PO 20009 453 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-31 1000.000000 0.100000 1 0.0000 1 2005-12-30 15:06:08.848298-05 \N t t 197 \N 66278 \N \N \N 150 PO 20010 454 jsmith 299 78 TPWHL01 EA 0.100000 1 2005-12-31 1000.000000 0.100000 1 0.0000 1 2005-12-30 15:08:10.443139-05 \N t t 199 \N 66278 \N \N \N 152 PO 20012 456 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-01-11 90.000000 0.250000 1 0.0000 1 2006-01-09 10:33:06.90126-05 \N t t 204 \N 66278 \N \N \N 153 PO 20015 460 jsmith 299 78 TPWHL01 EA 0.100000 1 2006-01-14 10.000000 0.250000 1 0.0000 1 2006-01-12 13:52:31.783466-05 \N t t 206 \N 66278 \N \N \N 155 PO 20016 462 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-01-14 100.000000 0.470000 1 0.0000 1 2006-01-13 11:40:56.55825-05 \N t t 209 \N 66278 \N \N \N 156 PO 20017 463 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-01-14 100.000000 0.470000 1 0.0000 1 2006-01-13 15:26:07.958-05 \N t t 211 \N 19681 \N \N \N 157 PO 20018 464 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-01-31 100.000000 0.470000 1 0.0000 1 2006-01-30 12:19:04.350665-05 \N t t 213 \N 66278 \N \N \N 158 PO 20019 465 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-01-31 100.000000 0.470000 1 0.0000 1 2006-01-30 16:50:51.460869-05 \N t t 215 \N 66278 \N \N \N 159 PO 20020 466 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-02-01 100.000000 0.470000 1 0.0000 1 2006-01-31 15:40:44.309-05 \N t t 217 \N 19681 \N \N \N 160 PO 20021 467 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-07-06 100.000000 0.470000 1 0.0000 1 2006-07-05 00:00:00-04 \N t t 219 \N jsmith \N \N \N 162 PO 20025 472 jsmith 299 79 EA 1.000000 2 2006-10-11 100.000000 0.190000 2 0.0000 2 2006-10-11 00:00:00-04 \N t t 226 \N jsmith \N \N \N 161 PO 20022 468 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-07-06 100.000000 0.470000 1 0.0000 1 2006-07-05 00:00:00-04 \N t t 221 \N jsmith \N \N \N 163 PO 20026 473 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-10-14 100.000000 0.250000 1 0.0000 1 2006-10-13 00:00:00-04 \N t t 228 \N jsmith \N \N \N 164 PO 20028 475 mfgadmin 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-12-29 100.000000 0.250000 1 0.0000 1 2006-12-28 00:00:00-05 \N t t 234 \N mfgadmin \N \N \N 165 PO 20029 478 mfgadmin 299 79 EA 0.250000 1 2006-12-29 400.000000 1.290000 1 0.0000 1 2006-12-28 00:00:00-05 \N t t 235 \N mfgadmin \N \N \N 166 PO 20030 479 mfgadmin 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2007-02-21 200.000000 0.250000 1 0.0000 1 2007-02-20 00:00:00-05 \N t t 240 \N mfgadmin \N \N \N 167 PO 20031 480 mfgadmin 298 78 TPINS-1 EA 1.000000 1 2007-03-02 1.000000 0.250000 1 0.0000 1 2007-02-23 00:00:00-05 \N t t 242 \N mfgadmin Wireless \N \N \N 168 PO 20031 480 mfgadmin 298 78 TPINS-1 EA 1.000000 1 2007-03-02 4.000000 0.250000 1 0.0000 1 2007-02-23 00:00:00-05 \N t t 242 \N mfgadmin Wireless \N \N \N 169 PO 20032 481 mfgadmin 318 78 \t GL 2.250000 1 2007-06-02 50.000000 2.200000 1 0.0000 1 2007-05-30 00:00:00-04 \N t t 245 \N mfgadmin \N \N \N 170 PO 20032 482 mfgadmin 306 78 RB100 Raw bumper for type 1 trucks PCS 1.000000 1 2007-05-29 1000.000000 1.000000 1 0.0000 1 2007-05-30 00:00:00-04 \N t t 245 \N mfgadmin \N \N \N 171 PO 20032 484 mfgadmin 306 78 RB100 Raw bumper for type 1 trucks PCS 1.000000 1 2007-07-01 1600.000000 1.000000 1 0.0000 1 2007-05-30 00:00:00-04 \N t t 245 \N mfgadmin \N \N \N 172 PO 20032 485 mfgadmin 314 78 SHT-100 Sheet Type 1 SH 1.250000 1 2007-06-05 100.000000 5.000000 1 0.0000 1 2007-05-30 00:00:00-04 \N t t 245 \N mfgadmin \N \N \N 173 PO 20032 486 mfgadmin 306 78 RB100 Raw bumper for type 1 trucks PCS 1.000000 1 2007-06-01 200.000000 1.000000 1 0.0000 1 2007-05-30 00:00:00-04 \N t t 245 \N mfgadmin \N \N \N 174 PO 20032 487 mfgadmin 306 78 RB100 Raw bumper for type 1 trucks PCS 1.000000 1 2007-06-01 200.000000 1.000000 1 0.0000 1 2007-05-30 00:00:00-04 \N t t 245 \N mfgadmin \N \N \N 175 PO 20032 488 mfgadmin 306 78 RB100 Raw bumper for type 1 trucks PCS 1.000000 1 2007-06-01 200.000000 1.000000 1 0.0000 1 2007-05-30 00:00:00-04 \N t t 245 \N mfgadmin \N \N \N 176 PO 20033 483 mfgadmin 296 79 PPTBOX100 PCS 0.233500 2 2007-06-21 100.000000 0.250000 2 0.0000 2 2007-05-30 00:00:00-04 \N t t 247 \N mfgadmin \N \N \N 177 PO 20034 489 mfgadmin 296 79 PPTBOX100 PCS 0.233500 2 2007-05-31 100.000000 0.250000 2 0.0000 2 2007-05-30 00:00:00-04 25.000000 t t 252 160 16386 2007-05-30 \N \N 179 PO 20035 490 mfgadmin 307 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.000000 1 2007-06-03 10.000000 1.000000 1 0.0000 1 2007-05-30 00:00:00-04 10.000000 t t 254 161 16386 2007-05-30 \N \N 182 PO 20036 491 mfgadmin 296 78 \N \N PCS 0.250000 1 2007-09-01 100.000000 0.250000 1 0.0000 1 2007-08-31 00:00:00-04 25.000000 t t 262 162 mfgadmin 2007-08-31 \N \N 186 PO 20037 492 mfgadmin 296 78 \N \N PCS 0.250000 1 2007-09-22 100.000000 0.250000 1 0.0000 1 2007-09-21 14:35:15.312-04 25.000000 t t 264 163 mfgadmin 2007-09-21 \N \N 185 PO 20037 493 mfgadmin \N 78 \N \N \N 300.000000 1 2007-09-28 1.000000 300.000000 1 0.0000 1 2007-09-21 14:35:15.312-04 300.000000 t t 264 164 mfgadmin 2007-09-21 \N \N 188 PO 20039 495 mfgadmin 298 78 TPINS-1 EA 0.250000 1 \N 5000.000000 0.250000 1 0.0000 1 2007-12-14 12:42:01.875-05 1250.000000 t t 267 165 mfgadmin 2007-12-14 \N \N 189 PO 20038 494 mfgadmin 296 79 PPTBOX100 PCS 0.233500 2 \N 5500.000000 0.250000 1 0.0000 2 2007-12-14 12:42:12.14-05 1375.000000 t t 269 166 mfgadmin 2007-12-14 \N \N 201 PO 20042 499 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 \N 100.000000 0.250000 1 0.0000 1 2008-03-05 13:45:26.531732-05 25.000000 t t 276 170 jsmith 2008-03-05 \N \N 196 PO 20040 496 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 \N 100.000000 0.250000 1 0.0000 1 2008-03-04 13:32:47.291575-05 25.000000 t t 271 167 jsmith 2008-03-04 \N \N 197 PO 20040 497 jsmith 310 78 CB027 BOX 1.000000 1 \N 250.000000 1.000000 1 0.0000 1 2008-03-04 13:32:47.291575-05 250.000000 t t 271 168 jsmith 2008-03-04 \N \N 198 PO 20041 498 jsmith 296 79 PPTBOX100 PCS 0.233500 2 \N 100.000000 0.250000 1 0.0000 2 2008-03-04 15:00:48.377499-05 25.000000 t t 274 169 jsmith 2008-03-04 \N \N 203 PO 20043 500 mfgadmin 310 78 CB027 BOX 1.000000 1 \N 1000.000000 1.000000 1 0.0000 1 2008-04-04 08:45:00.620791-04 1000.000000 t t 278 171 mfgadmin 2008-04-04 \N \N 204 PO 20043 501 mfgadmin 299 78 TPWHL01 EA 0.100000 1 \N 1000.000000 1.290000 1 0.0000 1 2008-04-04 08:45:00.620791-04 1285.000000 t t 278 172 mfgadmin 2008-04-04 \N \N 205 PO 20043 502 mfgadmin 297 78 TP-PNT-100 LB 0.100000 1 \N 100.000000 0.210000 1 0.0000 1 2008-04-04 08:45:00.620791-04 21.250000 t t 278 173 mfgadmin 2008-04-04 \N \N 206 PO 20044 503 jsmith 318 79 GL 10.000000 2 \N 5.000000 2.200000 1 0.0000 2 2008-06-12 10:35:08.526339-04 11.000000 t t 280 174 jsmith 2008-06-12 \N \N 209 PO 20046 505 jsmith 329 88 GL100 PL 12.000000 1 \N 100.000000 20.000000 1 0.0000 1 2008-06-12 13:42:28.443592-04 2000.000000 t t 284 177 jsmith 2008-06-12 \N \N 210 PO 20047 507 jsmith 329 88 GL100 PL 12.000000 1 \N 100.000000 20.000000 1 0.0000 1 2008-06-12 13:56:01.994784-04 2000.000000 t t 288 179 jsmith 2008-06-12 \N \N 208 PO 20045 506 jsmith 326 79 FAS100 EA 0.002500 2 \N 9500.000000 0.010000 1 0.0000 2 2008-06-12 13:41:38.6033-04 47.500000 t t 282 176 jsmith 2008-06-12 \N \N 207 PO 20045 504 jsmith 327 79 BUS100 EA 0.002500 2 \N 5000.000000 0.010000 1 0.0000 2 2008-06-12 13:41:38.6033-04 25.000000 t t 282 175 jsmith 2008-06-12 \N \N 216 PO 20049 510 jsmith 326 79 FAS100 EA 0.002500 2 \N 2000.000000 0.010000 1 0.0000 2 2008-06-18 16:35:19.449433-04 10.000000 t t 290 180 jsmith 2008-06-18 \N \N 217 PO 20049 511 jsmith 327 79 BUS100 EA 0.002500 2 \N 3000.000000 0.010000 1 0.0000 2 2008-06-18 16:35:19.449433-04 15.000000 t t 290 181 jsmith 2008-06-18 \N \N 213 PO 20048 508 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 \N 100.000000 0.250000 1 0.0000 1 2008-06-12 14:36:14.574175-04 25.000000 t t 291 182 jsmith 2008-06-12 \N \N 215 PO 20048 512 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 \N 100.000000 0.250000 1 0.0000 1 2008-06-18 16:35:07.242622-04 25.000000 t t 291 183 jsmith 2008-06-18 \N \N 222 PO 20050 513 jsmith 294 78 TPBODY1 EA 1.000000 1 \N 5000.000000 0.250000 1 0.0000 1 2008-06-19 16:36:08.28082-04 1250.000000 t t 296 184 jsmith 2008-06-19 \N \N 221 PO 20050 514 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.200000 1 \N 1700.000000 0.250000 1 0.0000 1 2008-06-19 16:36:08.28082-04 425.000000 t t 296 185 jsmith 2008-06-19 \N \N 220 PO 20050 515 jsmith 299 78 TPWHL01 EA 0.100000 1 \N 16000.000000 0.100000 1 0.0000 1 2008-06-19 16:36:08.28082-04 1600.000000 t t 296 186 jsmith 2008-06-19 \N \N 223 PO 20051 516 jsmith 307 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.000000 1 \N 1100.000000 1.000000 1 0.0000 1 2008-06-19 16:47:30.297885-04 1100.000000 t t 298 187 jsmith 2008-06-19 \N \N 225 PO 20052 517 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.200000 1 \N 1199.000000 0.250000 1 0.0000 1 2008-06-19 17:03:05.086243-04 299.750000 t t 300 188 jsmith 2008-06-19 \N \N 224 PO 20052 518 jsmith 314 78 SHT-100 Sheet Type 1 SH 1.250000 1 \N 1000.000000 5.000000 1 0.0000 1 2008-06-19 17:03:05.086243-04 5000.000000 t t 300 189 jsmith 2008-06-19 \N \N 230 PO 20053 519 jsmith 314 78 SHT-100 Sheet Type 1 SH 1.250000 1 \N 2000.000000 5.000000 1 0.0000 1 2008-06-19 17:06:00.336533-04 10000.000000 t t 301 190 jsmith 2008-06-19 \N \N 231 PO 20054 520 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 \N 100.000000 0.200000 1 0.0000 1 2008-06-20 12:32:32.321239-04 20.000000 t t 304 191 jsmith 2008-06-20 \N \N 239 PO 20057 524 jsmith 300 78 EA 5.500000 1 \N 75.000000 2.570000 1 0.0000 1 2008-09-24 16:33:59.428577-04 192.590000 t t 314 195 jsmith 2008-09-24 \N \N 238 PO 20057 524 jsmith 300 78 EA 5.500000 1 \N 25.000000 2.570000 1 0.0000 1 2008-09-24 16:33:25.460633-04 64.200000 t t 314 195 jsmith 2008-09-24 \N \N 237 PO 20056 522 jsmith 297 88 YP127 GL 11.000000 1 \N 100.000000 0.800000 1 0.0000 1 2008-09-24 16:28:50.069419-04 80.000000 t t 312 194 jsmith 2008-09-24 \N \N 233 PO 20055 521 admin 300 78 EA 10.000000 1 \N 3333.000000 2.570000 1 0.0000 1 2008-08-01 00:00:00-04 8558.480000 t t 306 192 admin 2008-07-01 \N \N 234 PO 20055 521 admin 300 78 EA 10.000000 1 \N 3333.000000 2.570000 1 0.0000 1 2008-08-01 00:00:00-04 8558.480000 t t 308 193 admin 2008-08-01 \N \N 236 PO 20055 521 admin 300 78 EA 10.000000 1 \N 3334.000000 2.570000 1 0.0000 1 2008-09-08 17:04:16.126269-04 8561.050000 t t 308 193 admin 2008-09-08 \N \N 241 PO 20058 525 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 \N 200.000000 0.200000 1 0.0000 1 2008-10-02 09:44:15.244556-04 40.000000 t t 316 196 jsmith 2008-10-02 \N \N 242 PO 20059 526 jsmith 300 79 EA 8.000000 2 \N 1000.000000 2.570000 1 0.0000 2 2008-10-02 10:29:05.598998-04 2567.800000 t t 318 197 jsmith 2008-10-02 \N \N 244 PO 20059 527 jsmith 303 79 EA 5.000000 2 \N 1000.000000 2.570000 1 0.0000 2 2008-10-02 10:29:05.598998-04 2567.800000 t t 318 198 jsmith 2008-10-02 \N \N 243 PO 20059 528 jsmith 302 79 EA 6.000000 2 \N 1000.000000 2.570000 1 0.0000 2 2008-10-02 10:29:05.598998-04 2567.800000 t t 318 199 jsmith 2008-10-02 \N \N 248 PO 20061 530 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2009-01-07 100.000000 0.200000 1 0.0000 1 2008-12-31 13:48:41.962912-05 20.000000 t t 321 200 jsmith 2008-12-31 \N \N 247 PO 20060 529 admin 307 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.000000 1 2008-12-27 91.000000 1.000000 1 0.0000 1 2008-12-30 16:34:06.681442-05 91.000000 t t 322 201 admin 2008-12-30 \N \N 249 PO 20062 531 jsmith 308 78 EA 10.000000 1 2008-12-31 5000.000000 8.300000 1 0.0000 1 2008-12-31 14:59:37.833245-05 41491.000000 t t 324 202 jsmith 2008-12-31 \N \N 252 PO 20063 536 jsmith 300 78 EA 2.660000 1 2009-01-12 1000.000000 2.570000 1 0.0000 1 2009-01-12 13:14:33.927338-05 2567.800000 t t 328 203 jsmith 2009-01-12 \N \N 251 PO 20063 537 jsmith 302 78 EA 2.660000 1 2009-01-12 1000.000000 2.570000 1 0.0000 1 2009-01-12 13:14:33.927338-05 2567.800000 t t 328 204 jsmith 2009-01-12 \N \N 250 PO 20063 538 jsmith 303 78 EA 2.660000 1 2009-01-12 1000.000000 2.570000 1 0.0000 1 2009-01-12 13:14:33.927338-05 2567.800000 t t 328 205 jsmith 2009-01-12 \N \N 254 PO 20064 539 admin 294 79 EA 1.000000 2 2009-01-01 1000.000000 1.000000 1 0.0000 2 2009-06-26 15:46:04.649835-04 1000.000000 t t 334 206 admin 2009-01-01 \N \N 253 PO 20064 540 admin 298 79 EA 1.000000 2 2009-01-01 1000.000000 0.250000 1 0.0000 2 2009-06-26 15:46:04.649835-04 250.000000 t t 334 207 admin 2009-01-01 \N \N 255 PO 20065 542 admin 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.200000 1 2009-06-27 1000.000000 0.200000 1 0.0000 1 2009-06-26 16:05:59.870694-04 200.000000 t t 336 208 admin 2009-06-26 \N \N 256 PO 20066 543 admin 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.200000 1 2009-08-14 10000.000000 0.200000 1 0.0000 1 2009-08-13 08:45:15.423726-04 2000.000000 t t 340 211 admin 2009-08-13 \N \N 257 PO 20066 544 admin 298 78 TPINS-1 EA 0.250000 1 2009-08-14 60000.000000 0.250000 1 0.0000 1 2009-08-13 08:45:15.423726-04 15000.000000 t t 340 212 admin 2009-08-13 \N \N 258 PO 20066 545 admin 294 78 TPBODY1 EA 1.000000 1 2009-08-15 25000.000000 1.000000 1 0.0000 1 2009-08-13 08:45:15.423726-04 25000.000000 t t 340 209 admin 2009-08-13 \N \N 260 PO 20066 546 admin 299 78 TPWHL01 EA 0.100000 1 2009-08-15 60000.000000 0.100000 1 0.0000 1 2009-08-13 08:45:15.423726-04 6000.000000 t t 340 210 admin 2009-08-13 \N \N 259 PO 20066 547 admin 297 78 TP-PNT-100 LB 0.100000 1 2009-08-15 1000.000000 0.100000 1 0.0000 1 2009-08-13 08:45:15.423726-04 100.000000 t t 340 213 admin 2009-08-13 \N \N 261 PO 20067 548 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2009-09-17 200.000000 0.200000 1 0.0000 1 2009-09-16 14:01:37.708745-04 40.000000 t t 342 214 jsmith 2009-09-16 \N \N 262 PO 20068 549 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2009-09-17 600.000000 0.200000 1 0.0000 1 2009-09-16 14:08:14.193995-04 120.000000 t t 344 215 jsmith 2009-09-16 \N \N 263 PO 20069 550 jsmith 377 88 GL 0.980000 1 2009-09-23 100.000000 0.800000 1 0.0000 1 2009-09-16 14:34:53.947005-04 80.000000 t t 345 216 jsmith 2009-09-16 \N \N 264 PO 20069 551 jsmith 376 88 7 GL 0.970000 1 2009-09-23 100.000000 0.800000 1 0.0000 1 2009-09-16 14:34:53.947005-04 80.000000 t t 345 217 jsmith 2009-09-16 \N \N 265 PO 20069 552 jsmith 378 88 GL 0.990000 1 2009-09-23 100.000000 0.800000 1 0.0000 1 2009-09-16 14:34:53.947005-04 80.000000 t t 345 218 jsmith 2009-09-16 \N \N 313 PO 20075 564 jsmith 307 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.000000 1 2009-10-11 870.000000 1.000000 1 0.0000 1 2009-10-13 13:29:52.154236-04 870.000000 t t 363 229 jsmith 2009-10-13 \N \N 314 PO 20077 566 jsmith 299 78 TPWHL01 EA 0.100000 1 2009-10-14 50000.000000 0.100000 1 0.0000 1 2009-10-13 13:29:59.684082-04 5000.000000 t t 367 231 jsmith 2009-10-13 \N \N 284 PO 20072 556 admin 376 88 7 GL 0.970000 1 2009-09-22 1.000000 0.800000 1 0.0000 1 2009-09-22 08:13:29.649674-04 0.800000 t t 354 223 admin 2009-09-22 \N \N 312 PO 20076 565 jsmith 296 79 PPTBOX100 PCS 0.214300 2 2009-10-14 5900.000000 0.200000 1 0.0000 2 2009-10-13 13:29:45.387362-04 1180.000000 t t 365 230 jsmith 2009-10-13 \N \N 266 PO 20070 553 jsmith 377 88 GL 0.980000 1 2009-09-23 10.000000 0.800000 1 0.0000 1 2009-09-16 14:38:36.43854-04 8.000000 t t 346 219 jsmith 2009-09-16 \N \N 267 PO 20070 554 jsmith 376 88 7 GL 0.970000 1 2009-09-16 10.000000 0.800000 1 0.0000 1 2009-09-16 14:38:36.43854-04 8.000000 t t 346 220 jsmith 2009-09-16 \N \N 283 PO 20071 555 admin 296 79 PPTBOX100 PCS 0.214300 2 2009-09-22 5000.000000 0.200000 1 0.0000 2 2009-09-21 16:57:39.933043-04 1000.000000 t t 348 221 admin 2009-09-21 \N \N 288 PO 20072 556 admin 376 88 7 GL 0.970000 1 2009-09-22 10.000000 0.800000 1 0.0000 1 2009-09-22 08:24:00.006729-04 8.000000 t t 354 223 admin 2009-09-22 \N \N 293 PO 20072 556 admin 376 88 7 GL 0.970000 1 2009-09-22 39.000000 0.800000 1 0.0000 1 2009-09-22 10:30:06.450697-04 31.200000 t t 354 223 jsmith 2009-09-22 \N \N 285 PO 20072 557 admin 378 88 GL 0.990000 1 2009-09-29 1.000000 0.800000 1 0.0000 1 2009-09-22 08:13:39.654285-04 0.800000 t t 354 224 admin 2009-09-22 \N \N 289 PO 20072 557 admin 378 88 GL 0.990000 1 2009-09-29 10.000000 0.800000 1 0.0000 1 2009-09-22 08:24:08.221021-04 8.000000 t t 354 224 admin 2009-09-22 \N \N 295 PO 20072 557 admin 378 88 GL 0.990000 1 2009-09-29 39.000000 0.800000 1 0.0000 1 2009-09-22 10:30:06.450697-04 31.200000 t t 354 224 jsmith 2009-09-22 \N \N 286 PO 20072 558 admin 377 88 GL 0.980000 1 2009-09-29 1.000000 0.800000 1 0.0000 1 2009-09-22 08:18:32.057357-04 0.800000 t t 354 225 admin 2009-09-22 \N \N 290 PO 20072 558 admin 377 88 GL 0.980000 1 2009-09-29 49.000000 0.800000 1 0.0000 1 2009-09-22 10:30:06.450697-04 39.200000 t t 354 225 jsmith 2009-09-22 \N \N 287 PO 20072 559 admin 297 88 YP127 GL 11.000000 1 2009-09-26 1.000000 0.800000 1 0.0000 1 2009-09-22 08:18:39.728908-04 0.800000 t t 354 226 admin 2009-09-22 \N \N 291 PO 20072 559 admin 297 88 YP127 GL 11.000000 1 2009-09-26 49.000000 0.800000 1 0.0000 1 2009-09-22 10:30:06.450697-04 39.200000 t t 354 226 jsmith 2009-09-22 \N \N 296 PO 20073 562 admin \N 78 MZ-101 Mazak Vertical Machineing Center - MZ-101\nSRN#1001992 25000.000000 1 2009-10-01 1.000000 25000.000000 1 0.0000 1 2009-09-24 16:02:34.525006-04 25000.000000 t t 359 227 admin 2009-09-24 \N \N 297 PO 20074 563 jsmith 299 78 TPWHL01 EA 0.100000 1 2009-09-26 5324.000000 0.100000 1 0.0000 1 2009-09-25 09:14:13.152478-04 532.400000 t t 361 228 jsmith 2009-09-25 \N \N 327 PO 20080 572 admin 294 78 TPBODY1 EA 1.000000 1 2009-12-05 8000.000000 1.000000 1 0.0000 1 2009-12-03 16:32:32.467863-05 8000.000000 t t 372 242 admin 2009-12-03 \N \N 328 PO 20080 573 admin 299 78 TPWHL01 EA 0.100000 1 2009-12-05 18000.000000 0.100000 1 0.0000 1 2009-12-03 16:32:32.467863-05 1800.000000 t t 372 243 admin 2009-12-03 \N \N 329 PO 20080 574 admin 297 78 TP-PNT-100 LB 0.100000 1 2009-12-05 2000.000000 0.100000 1 0.0000 1 2009-12-03 16:32:32.467863-05 200.000000 t t 372 244 admin 2009-12-03 \N \N 321 PO 20078 568 jsmith 299 78 TPWHL01 EA 0.100000 1 2009-10-14 4000.000000 0.100000 1 0.0000 1 2009-10-13 14:40:59.73576-04 400.000000 t t 369 235 jsmith 2009-10-13 \N \N 324 PO 20079 569 admin 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.200000 1 2009-12-04 10000.000000 0.200000 1 0.0000 1 2009-12-03 15:22:53.51428-05 2000.000000 t t 370 240 admin 2009-12-03 \N \N 325 PO 20079 570 admin 298 78 TPINS-1 EA 0.250000 1 2009-12-04 10000.000000 0.250000 1 0.0000 1 2009-12-03 15:22:53.51428-05 2500.000000 t t 370 239 admin 2009-12-03 \N \N 326 PO 20079 571 admin 297 78 TP-PNT-100 LB 0.100000 1 2009-12-04 25.000000 0.100000 1 0.0000 1 2009-12-03 15:22:53.51428-05 2.500000 t t 370 238 admin 2009-12-03 \N \N 330 PO 20081 575 admin \N 78 10291 Office Supplies 125.000000 1 2010-01-06 1.000000 125.000000 1 0.0000 1 2010-01-06 14:54:37.810577-05 125.000000 t t 378 245 admin 2010-01-06 \N \N 331 PO 20082 576 admin 381 94 DM100 EA 22.000000 1 2010-03-14 1000.000000 22.000000 1 0.0000 1 2010-03-10 16:37:42.548737-05 22000.000000 t t 380 247 admin 2010-03-10 \N \N 332 PO 20083 577 admin 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.200000 1 2010-03-13 1000.000000 0.200000 1 0.0000 1 2010-03-12 15:03:03.564808-05 200.000000 t t 382 248 admin 2010-03-12 \N \N 334 PO 20084 578 admin 323 78 EA 22.000000 1 2010-03-19 3.000000 12.560000 1 0.0000 1 2010-03-12 15:33:57.74189-05 37.690000 t t 387 249 admin 2010-03-12 \N \N 148 PO 20008 452 jsmith 299 78 TPWHL01 EA 0.100000 1 2006-01-01 100.000000 \N 1 10.0000 1 2005-12-30 14:55:19.289962-05 \N t t \N \N 66278 \N \N \N 151 PO 20011 455 jsmith 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.250000 1 2006-01-10 10.000000 0.250000 1 0.0000 1 2006-01-09 10:05:06.81061-05 2.500000 t t \N \N 66278 \N \N \N 190 RA 80002 3 293 \N 0.000000 1 2007-12-14 10.000000 6.382000 \N \N 3 2007-12-14 13:20:14.593-05 63.820000 t f \N \N mfgadmin 2007-12-14 \N \N 191 RA 80002 4 302 \N 0.000000 1 2007-12-14 1.000000 6.380000 \N \N 3 2007-12-14 13:20:14.593-05 6.380000 t f \N \N mfgadmin 2007-12-14 \N \N 154 PO 20015 461 jsmith \N 78 VendItem VendDesc1\nVendDesc2 1.000000 1 2006-01-14 10.000000 \N 1 0.0000 1 2006-01-12 13:52:37.677392-05 \N t t \N \N 66278 \N \N \N 343 PO 20093 589 admin 381 94 DM100 EA 22.000000 1 2010-07-06 4000.000000 22.000000 1 0.0000 1 2010-09-07 16:41:10.577342-04 88000.000000 t t 410 259 admin 2010-07-10 \N \N 344 PO 20094 590 admin 381 94 DM100 EA 22.000000 1 2010-08-01 3000.000000 22.000000 1 0.0000 1 2010-09-07 16:41:28.436049-04 66000.000000 t t 411 260 admin 2010-08-04 \N \N 335 PO 20085 579 admin 381 94 DM100 EA 22.000000 1 2010-04-11 1000.000000 22.000000 1 0.0000 1 2010-04-02 10:32:30.115461-04 22000.000000 t t 389 250 admin 2010-04-02 \N \N 351 PO 20100 599 admin 296 79 PPTBOX100 PCS 0.211300 2 2010-11-05 100.000000 0.200000 1 0.0000 2 2010-11-04 15:53:24.955097-04 20.000000 t t 424 268 admin 2010-11-04 \N 2010-11-05 336 PO 20086 580 admin 381 94 DM100 EA 22.000000 1 2010-06-21 2000.000000 22.000000 1 0.0000 1 2010-06-07 10:17:52.472205-04 44000.000000 t t 391 251 admin 2010-06-07 \N \N 345 PO 20095 592 admin 293 78 EA 3.000000 1 2010-07-30 5000.000000 2.560000 1 0.0000 1 2010-09-08 13:15:27.621335-04 12817.000000 t t 413 261 admin 2010-07-30 \N \N 352 PO 20102 600 admin 381 94 DM100 EA 22.000000 1 2010-12-30 1000.000000 22.000000 1 0.0000 1 2010-12-30 16:26:17.022752-05 22000.000000 t t 426 269 admin 2010-12-30 \N 2010-12-30 358 PO 20105 603 admin 307 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.000000 1 2011-04-15 1000.000000 1.000000 1 0.0000 1 2011-04-18 13:27:14.002807-04 1000.000000 t t 440 274 admin 2011-04-18 \N 2011-04-15 340 PO 20088 582 admin 307 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.000000 1 2010-06-10 1000.000000 1.000000 1 0.0000 1 2010-06-07 11:40:04.103608-04 1000.000000 t t 402 256 admin 2010-06-07 \N \N 338 PO 20089 584 admin 306 78 RB100 Raw bumper for type 1 trucks PCS 1.000000 1 2010-06-10 1500.000000 1.000000 1 0.0000 1 2010-06-07 11:39:51.679899-04 1500.000000 t t 401 254 admin 2010-06-07 \N \N 339 PO 20089 585 admin 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.200000 1 2010-06-08 1000.000000 0.200000 1 0.0000 1 2010-06-07 11:39:51.679899-04 200.000000 t t 401 255 admin 2010-06-07 \N \N 341 PO 20091 587 admin 314 78 SHT-100 Sheet Type 1 SH 1.250000 1 2010-06-17 10000.000000 1.250000 1 0.0000 1 2010-06-07 11:45:14.455783-04 12500.000000 t t 398 252 admin 2010-06-07 \N \N 347 PO 20096 593 admin 294 78 TPBODY1 EA 1.000000 1 2010-09-10 10000.000000 1.000000 1 0.0000 1 2010-09-08 13:38:37.038373-04 10000.000000 t t 415 262 admin 2010-09-08 \N \N 348 PO 20096 594 admin 299 78 TPWHL01 EA 0.100000 1 2010-09-10 55880.000000 0.100000 1 0.0000 1 2010-09-08 13:38:37.038373-04 5588.000000 t t 415 263 admin 2010-09-08 \N \N 346 PO 20096 595 admin 296 78 TPBOX01 ProDiem Box For Truck Type 1 PCS 0.200000 1 2010-09-09 10000.000000 0.200000 1 0.0000 1 2010-09-08 13:38:37.038373-04 2000.000000 t t 415 264 admin 2010-09-08 \N \N 353 PO 20103 601 admin 381 94 DM100 EA 22.000000 1 2011-03-17 5000.000000 22.000000 1 0.0000 1 2011-03-07 15:31:28.422795-05 110000.000000 t t 429 270 admin 2011-03-07 \N 2011-03-17 362 PO 20108 606 admin 381 94 DM100 EA 22.000000 1 2011-05-04 3500.000000 22.000000 1 0.0000 1 2011-05-14 00:00:00-04 77000.000000 t t 451 277 admin 2011-05-14 \N 2011-05-04 349 PO 20098 597 admin 307 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.000000 1 2010-10-16 100.000000 1.000000 1 0.0000 1 2010-09-13 11:40:28.073486-04 100.000000 t t 417 265 admin 2010-09-13 \N \N 360 PO 20108 606 admin 381 94 DM100 EA 22.000000 1 2011-05-04 3500.000000 22.000000 1 0.0000 1 2011-06-03 16:26:49.078475-04 77000.000000 t t 451 277 admin 2011-06-03 \N 2011-05-04 342 PO 20092 588 admin 381 94 DM100 EA 22.000000 1 2010-09-07 2000.000000 22.000000 1 0.0000 1 2010-09-07 16:18:11.578743-04 44000.000000 t t 420 266 admin 2010-09-07 \N \N 359 PO 20107 605 admin 381 94 DM100 EA 22.000000 1 2011-05-04 3000.000000 22.000000 1 0.0000 1 2011-06-03 16:14:31.229403-04 66000.000000 t t 444 275 admin 2011-06-03 \N 2011-05-04 350 PO 20099 598 admin 381 94 DM100 EA 22.000000 1 2010-11-11 2500.000000 22.000000 1 0.0000 1 2010-11-04 15:46:05.084951-04 55000.000000 t t 422 267 admin 2010-11-04 \N 2010-11-11 354 PO 20097 596 admin 381 94 DM100 EA 22.000000 1 2011-04-11 100.000000 22.000000 1 0.0000 1 2011-04-18 07:44:54.321995-04 2200.000000 t t 433 271 admin 2011-04-18 \N 2011-04-11 356 PO 20106 604 admin 307 85 CHROM-TECH1 Chroming service using CTI proprietary technique type 1. UNITS 1.000000 1 2011-03-24 400.000000 1.000000 1 0.0000 1 2011-04-18 07:56:03.970184-04 400.000000 t t 435 272 admin 2011-04-18 \N 2011-03-24 355 PO 20104 602 admin 381 94 DM100 EA 22.000000 1 2011-04-18 1000.000000 22.000000 1 0.0000 1 2011-04-18 07:45:02.369685-04 22000.000000 t t 438 273 admin 2011-04-18 \N 2011-04-18 363 PO 20109 607 admin 381 94 DM100 EA 22.000000 1 2011-05-14 5000.000000 22.000000 1 0.0000 1 2011-05-19 00:00:00-04 110000.000000 t t 448 276 admin 2011-05-19 \N 2011-05-14 \. -- -- Data for Name: report; Type: TABLE DATA; Schema: public; Owner: admin -- COPY report (report_id, report_name, report_sys, report_source, report_descrip, report_grade, report_loaddate) FROM stdin; 482 BacklogByParameterList \N \n\n Backlog By Parameter List\n BacklogByParameterList\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT CASE WHEN (checkPrivilege('ViewCustomerPrices') \n AND isMultiCurr()) THEN\n text('Amount(base)')\n WHEN (checkPrivilege('ViewCustomerPrices')) THEN\n text('Amount')\n ELSE\n text('')\n END\n AS lbl_baseamount,\n CASE WHEN (checkPrivilege('ViewCustomerPrices') \n AND isMultiCurr()) THEN\n text('Amount(foreign)')\n ELSE\n text('')\n END\n AS lbl_foreignamount;\n \n \n detail\n SELECT cohead_number, coitem_linenumber, cust_name,\n formatDate(cohead_orderdate) AS f_orderdate,\n formatDate(coitem_scheddate) AS f_scheddate,\n item_number, uom_name,\n item_descrip1, item_descrip2,\n formatQty(coitem_qtyord) AS f_qtyord,\n formatQty(coitem_qtyshipped) AS f_qtyship,\n formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) AS f_balance, \n CASE WHEN (checkPrivilege('ViewCustomerPrices')) THEN\nformatMoney(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n * (currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio),2))\n ELSE\n text('')\n END\n AS f_ammount,\n CASE WHEN (checkPrivilege('ViewCustomerPrices') AND isMultiCurr()) THEN\nformatMoney(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n * (coitem_price / coitem_price_invuomratio),2))\n ELSE\n text('')\n END\n AS foreign_ammount,\nround((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n * (currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio),2) AS backlog \n FROM cohead, coitem, itemsite, item, cust, uom\n WHERE ((coitem_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (coitem_status='O')\n <? if exists("cohead_id") ?>\n AND (coitem_cohead_id=<? value("cohead_id") ?>)\n <? endif ?>\n <? if exists("startDate") ?>\n AND (cohead_orderdate >= <? value("startDate") ?>)\n <? endif ?>\n <? if exists("endDate") ?>\n AND (cohead_orderdate <= <? value("endDate") ?>)\n <? endif ?>\n <? if exists("startDateSched") ?>\n AND (coitem_scheddate >= <? value("startDateSched") ?>)\n <? endif ?>\n <? if exists("endDateSched") ?>\n AND (coitem_scheddate >= <? value("endDateSched") ?>)\n <? endif ?>\n <? if exists("salesrep_id") ?>\n AND (cohead_salesrep_id=<? value("salesrep_id") ?>)\n <? endif ?>\n <? if exists("shipto_id") ?>\n AND (cohead_shipto_id=<? value("shipto_id") ?>)\n <? endif ?>\n <? if exists("cust_id") ?>\n AND (cohead_cust_id=<? value("cust_id") ?>)\n <? endif ?>\n <? if exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n <? endif ?>\n <? if exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n <? endif ?>\n <? if exists("custgrp") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n <? endif ?>\n <? if exists("custgrp_id") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)))\n <? endif ?>\n <? if exists("custgrp_pattern") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ <? value("custgrp_pattern") ?>) )) )\n <? endif ?>\n\n <? if exists("item_id") ?>\n AND (itemsite_item_id=<? value("item_id") ?>)\n <? endif ?>\n <? if exists("prodcat_id") ?>\n AND (item_prodcat_id=<? value("prodcat_id") ?>)\n <? endif ?>\n <? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n <? endif ?>\n\n <? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n <? endif ?>\n)\nORDER BY coitem_scheddate, cohead_number, coitem_linenumber;\n \n \n total\n SELECT now()\n WHERE 't' =\nCASE WHEN (checkPrivilege('ViewCustomerPrices') \n 't'\nELSE\n 'f'\nEND\n \n \n 226\n \n \n \n \n \n 660\n 185\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_baseamount\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 660\n 200\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_foreignamount\n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 28\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n \n \n \n 660\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_baseamount\n \n \n \n \n 660\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_foreignamount\n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n

\n detail\n \n \n detail\n \n 52\n \n \n 305\n 30\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 65\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n coitem_linenumber\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 305\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 507\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyship\n \n \n \n \n 671\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n foreign_ammount\n \n \n \n \n 305\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ammount\n \n \n \n \n 450\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 225\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orderdate\n \n \n \n \n 507\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyord\n \n \n \n \n 225\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scheddate\n \n \n \n \n 112\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 5\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n
\n
\n totals\n \n \n total\n \n 18\n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n backlog\n \n money\n \n \n \n
\n \n 18\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n\n \N 0 2011-02-16 10:13:34.891119 202 PurchaseRequestsByPlannerCode \N \n\n Purchase Requests By Planner Code\n PurchaseRequestsByPlannerCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT CASE WHEN('%1'='-1') THEN 'All Planner Codes'\n WHEN((SELECT count(*)\n FROM plancode\n WHERE plancode_code = '%1') = 1) THEN\n (SELECT ()\n FROM plancode\n WHERE plancode_code = '%1')\n ELSE '%1'::text\n END AS plancode,\n CASE WHEN(%2=-1) THEN 'All Warehouses'\n ELSE (SELECT warehous_code\n FROM warehous\n WHERE warehous_id=%2)\n END AS warehouse;\n \n \n detail\n SELECT item_number,\n (item_descrip1 || ' ' || item_descrip2) as item_descrip,\n pr_status,\n CASE WHEN (pr_order_type='W') THEN ('W/O ' || ( SELECT formatWoNumber(womatl_wo_id)\n FROM womatl\n WHERE (womatl_id=pr_order_id) ) )\n WHEN (pr_order_type='S') THEN ('S/O ' || (SELECT formatSoNumber(pr_order_id)))\n WHEN (pr_order_type='F') THEN ('Planned Order')\n WHEN (pr_order_type='M') THEN 'Manual'\n ELSE 'Other'\n END AS f_type,\n formatDate(pr_duedate) AS f_duedate,\n formatQty(pr_qtyreq) AS f_qtyreq\n FROM pr, itemsite, item\n WHERE ( (pr_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=%2)\n AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ '%1') ) )\n)\nORDER BY pr_duedate;\n \n \n 171\n \n \n \n \n \n \n \n 135\n 65\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plancode\n \n \n \n \n 555\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n 3\n \n \n \n \n 135\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n 5\n 165\n 745\n 165\n 2\n \n \n \n \n \n \n \n 555\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n 4\n \n \n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 340\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pr_status\n \n \n \n \n 135\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip\n \n \n \n \n 425\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyreq\n \n \n \n \n 10\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n
\n \n 16\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 105\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n 0 2004-02-10 10:24:16.076157 204 APAssignments Master List \N \n\n A/P Account Assignments Master List\n APAssignments Master List\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT CASE WHEN apaccnt_vendtype_id=-1 THEN apaccnt_vendtype\n ELSE (SELECT vendtype_code FROM vendtype WHERE (vendtype_id=apaccnt_vendtype_id))\n END AS vendtypecode,\n formatGLAccount(apaccnt_ap_accnt_id) AS f_account\nFROM apaccnt\nORDER BY vendtypecode;\n \n \n 77\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n 7\n \n \n 22\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venttypecode\n \n \n \n \n 120\n 0\n 500\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_account\n \n \n \n
\n \n 17\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n 0 2004-02-10 10:24:16.076157 318 UsersMasterList \N \n\n Users Master List\n UsersMasterList\n Updated to show photos - Formatted User Barcode - Logo\n \n Special Report Format\n \n Arial\n 48\n bold\n \n 126\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select usr_username,\n formatuserbarcode(usr_id) AS user_barcode,\n usr_propername,\n usr_initials,\n usr_active,\n formatBoolYN(usr_active) AS f_active,\n formatBoolYN(usr_agent) AS f_pa,\n locale_code,\n 1 AS COUNTER, \n(SELECT image_data FROM image WHERE ((image_name=usr_username))) AS user_image\nFROM usr, locale\nWHERE ((usr_locale_id=locale_id)\n<? if not exists("showInactive") ?>\n AND (usr_active=true)\n<? endif ?>\n)\nORDER BY usr_username;\n \n \n image\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n 197\n \n \n \n \n \n \n \n \n 350\n 10\n 385\n 140\n \n stretch\n \n image\n image_data\n \n \n \n \n \n \n 5\n 190\n 743\n 190\n 2\n \n \n \n \n 17\n \n \n 41\n \n \n \n 5\n 30\n 743\n 30\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 193\n \n \n 168\n 0\n 200\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n usr_propername\n \n \n \n \n 700\n 0\n 36\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n usr_active\n \n \n \n \n 380\n 25\n 163\n 155\n \n stretch\n \n detail\n user_image\n \n \n \n \n 375\n 0\n 50\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n usr_initials\n \n \n \n \n 10\n 33\n 350\n 56\n \n 128\n 26\n \n \n detail\n user_barcode\n \n \n \n \n 112\n 0\n 50\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_active\n \n \n \n \n 500\n 0\n 100\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locale_code\n \n \n \n \n 434\n 0\n 50\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_pa\n \n \n \n \n 10\n 0\n 100\n 25\n \n \n Arial\n 14\n bold\n \n \n \n \n detail\n usr_username\n \n \n \n
\n \n 25\n \n \n 705\n 0\n 38\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 88\n 0\n 100\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 37\n \n 5\n 5\n 743\n 5\n 2\n \n \n \n 168\n 10\n 36\n 16\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n COUNTER\n \n qty\n \n \n \n \n \n 700\n 10\n 36\n 16\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n usr_active\n \n qty\n \n \n
\n Updated to show photos - Formatted User Barcode - Logo 20 2006-08-30 13:47:52.941 359 APCheck-3PartMC \N \n\n Sample Check Format\n CheckFormat\n 3 Part Check Linked to Bank Account\n Letter\n \n 0\n 0\n 0\n 50\n \n Head\n SELECT \nformatAddr(vend_address1, vend_address2, vend_address3, ( vend_city || ', ' || vend_state || ' ' || vend_zip ), vend_country) AS check_address,\n vend_name, vend_address1, \n vend_address2, vend_address3,\n vend_city || ', ' || vend_state || ' ' || vend_zip AS address4,\n formatDate(apchk_checkdate) AS f_checkdate,\n formatMoney(apchk_amount) AS f_amount,\n initcap(spellAmount(apchk_amount, curr_id)) AS f_words,\n CASE WHEN(apchk_void) THEN text('V O I D')\n\t\telse text('')\n END AS f_void,\n apchk_number,\n vend_number,\n apchk_for,\n curr_symbol,\n curr_abbr,\n curr_name\n FROM apchk, vend, bankaccnt, curr_symbol\n WHERE ( (apchk_vend_id=vend_id)\n AND (apchk_curr_id = curr_id)\n AND (apchk_id=<? value("apchk_id") ?>) )\nLIMIT 1;\n \n \n TopDetail2\n \nSELECT\n 1 as sequence_value, \n 1 as ord, \n apchkitem_invcnumber, \n apchkitem_ponumber, \n formatMoney(apchkitem_amount) as f_amount, \n vohead_invcnumber, \n formatDate(vohead_docdate), \n vohead_reference, \n formatMoney(apchkitem_amount),\n apchkitem_vouchernumber AS vouchernumber,\n formatMoney(apopen_amount) as amount\nFROM apchkitem, vohead, apopen \nWHERE (\n(apchkitem_apchk_id= <? value("apchk_id") ?>) \nAND apchkitem_vouchernumber = vohead_number\nAND apopen_docnumber = apchkitem_vouchernumber\nAND apopen_doctype = 'V') \n\nUNION\n\nselect \n 1 as sequence_value, \n 2 as ord, \n apchkitem_invcnumber, \n apchkitem_ponumber, \n formatMoney(apchkitem_amount) as f_amount, \n vohead_invcnumber, \n formatDate(vohead_docdate), \n vohead_reference, \n '' as apchkitem_amount,\n apchkitem_vouchernumber AS vouchernumber,\n formatMoney((apapply_amount * -1)) AS amount\nFROM apchkitem, vohead, apapply \nWHERE (\n(apchkitem_apchk_id=<? value("apchk_id") ?>) \nAND apchkitem_vouchernumber = vohead_number \nAND apapply_target_docnumber = apchkitem_vouchernumber )\n\n\nUNION \n\n\nselect \n sequence_value, \n 3 as ord, \n '' as apchkitem_invcnumber, \n '' as apchkitem_ponumber, \n '' as f_amount, \n '' as vohead_invcnumber, \n '' as vohead_docdate, \n '' as vohead_reference, \n '' as apchkitem_amount,\n '' as vouchernumber,\n '' as amount\nFROM sequence \n\nORDER BY ord \nLIMIT 14;\n\n \n \n 18\n \n
\n Top Detail Header\n \n \n Head\n \n 87\n \n \n \n 290\n 60\n 147\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n 0\n 75\n 750\n 75\n 0\n \n \n \n 630\n 45\n 90\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n apchk_number\n \n \n \n \n 51\n 7\n 51\n 7\n 0\n \n \n \n 290\n 45\n 155\n 20\n \n \n Helvetica\n 8\n normal\n \n \n \n \n Head\n vend_name\n \n \n \n \n \n \n 450\n 45\n 104\n 15\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Head\n vend_number\n \n \n \n
\n
\n Top Detail\n \n \n TopDetail2\n \n 21\n \n \n 515\n 0\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n TopDetail2\n amount\n \n \n \n \n 175\n 0\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n TopDetail2\n vohead_reference\n \n \n \n \n 310\n 0\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n TopDetail2\n vohead_docdate\n \n \n \n \n 30\n 0\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n TopDetail2\n vohead_invcnumber\n \n \n \n
\n
\n Top Detail Amount\n \n \n Head\n \n 21\n \n \n \n 450\n 0\n 56\n 15\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Head\n curr_symbol\n \n \n \n \n 490\n 0\n 125\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n
\n
\n Apchkitem\n \n \n Head\n \n 328\n \n \n 620\n 125\n 125\n 20\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n \n 35\n 80\n 560\n 24\n \n \n Helvetica\n 12\n normal\n \n \n \n \n Head\n f_words\n \n \n \n \n 425\n 125\n 121\n 20\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Head\n f_checkdate\n \n \n \n \n 565\n 125\n 56\n 20\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Head\n curr_symbol\n \n \n \n \n 30\n 160\n 270\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n Head\n check_address\n \n \n \n \n 30\n 145\n 225\n 20\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Head\n vend_name\n \n \n \n
\n
\n Bottom Detail Header\n \n \n Head\n \n 42\n \n \n 0\n 35\n 750\n 35\n 0\n \n \n \n 290\n 5\n 155\n 20\n \n \n Helvetica\n 8\n normal\n \n \n \n \n Head\n vend_name\n \n \n \n \n \n \n 630\n 5\n 90\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n apchk_number\n \n \n \n \n 290\n 15\n 147\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 450\n 5\n 104\n 15\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Head\n vend_number\n \n \n \n \n
\n
\n Bottom Detail\n \n \n TopDetail2\n \n 21\n \n \n 310\n 0\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n TopDetail2\n vohead_docdate\n \n \n \n \n 175\n 0\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n TopDetail2\n vohead_reference\n \n \n \n \n 515\n 0\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n TopDetail2\n amount\n \n \n \n \n 30\n 0\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n TopDetail2\n vohead_invcnumber\n \n \n \n
\n
\n Bottom Detail Amount\n \n \n Head\n \n 21\n \n \n \n 450\n 0\n 56\n 15\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Head\n curr_symbol\n \n \n \n \n 490\n 0\n 125\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n
\n
\n 3 Part Check Linked to Bank Account 0 2007-02-20 09:43:29.313 401 Budget \N \n\n Budget\n Budget\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT formatDate(period_start) AS f_firstperiod,\n formatDate(period_end) AS f_lastperiod,\n formatGLAccountLong(budgitem_accnt_id) AS f_accnt,\n formatMoney(budgitem_amount) AS f_amount\n FROM budgitem \n JOIN period ON (budgitem_period_id=period_id)\n WHERE(budgitem_budghead_id=<? value("budghead_id") ?>)\n ORDER BY period_start, f_accnt;\n \n \n head\n SELECT budghead_name,\n budghead_descrip\n FROM budghead\n WHERE(budghead_id=<? value("budghead_id") ?>);\n \n \n 161\n \n \n \n \n 160\n 80\n 375\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n budghead_descrip\n \n \n \n \n \n 160\n 65\n 375\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n budghead_name\n \n \n \n \n 5\n 155\n 745\n 155\n 2\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 110\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_lastperiod\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_firstperiod\n \n \n \n \n 215\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_accnt\n \n \n \n \n 370\n 0\n 375\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n
\n \n 17\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 160 BuyCard \N \n\n Buy Card\n BuyCard\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT vend_number, vend_name,\n itemsrc_vend_item_number,\n itemsrc_vend_item_descrip\n FROM vendinfo, itemsrc\n WHERE ((vend_id=<? value("vend_id") ?>)\n AND (itemsrc_id=<? value("itemsrc_id") ?>) )\n \n \n detail\n SELECT poitem_id, pohead_number, poitem_linenumber,\n CASE WHEN(poitem_status='C') THEN TEXT('Closed')\n WHEN(poitem_status='U') THEN TEXT('Unposted')\n WHEN(poitem_status='O' AND ((poitem_qty_received-poitem_qty_returned) > 0) AND (poitem_qty_ordered>(poitem_qty_received-poitem_qty_returned))) THEN TEXT('Partial')\n WHEN(poitem_status='O' AND ((poitem_qty_received-poitem_qty_returned) > 0) AND (poitem_qty_ordered=(poitem_qty_received-poitem_qty_returned))) THEN TEXT('Received')\n WHEN(poitem_status='O') THEN TEXT('Open')\n ELSE poitem_status\n END AS poitemstatus,\n formatDate(poitem_duedate) as f_duedate,\n formatQty(poitem_qty_ordered) as f_qtyord,\n formatQty(COALESCE(SUM(recv_qty), 0)) as f_qty,\n formatPrice(poitem_unitprice) as f_unitprice\nFROM pohead, poitem LEFT OUTER JOIN recv ON (recv_orderitem_id=poitem_id)\nWHERE ( (poitem_pohead_id=pohead_id)\n AND (recv_order_type='PO')\n AND (pohead_vend_id=<? value("vend_id") ?>)\n AND (poitem_vend_item_number=(select itemsrc_vend_item_number from itemsrc where itemsrc_id=<? value("itemsrc_id") ?>)) ) \nGROUP BY poitem_id, pohead_number, poitem_linenumber,\n poitem_status, poitem_qty_received, poitem_qty_returned,\n poitem_duedate, poitem_qty_ordered, poitem_unitprice\nORDER BY pohead_number, poitem_linenumber;\n \n \n foot\n SELECT itemsrc_comments\n FROM itemsrc\n WHERE itemsrc_id=<? value("itensrc_id") ?>;\n \n \n 221\n \n \n 135\n 114\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n itemsrc_vend_item_number\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n \n 135\n 65\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_number\n \n \n \n \n \n \n 135\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_name\n \n \n \n \n \n \n 135\n 135\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n itemsrc_vend_item_descrip\n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 260\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyord\n \n \n \n \n 455\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unitprice\n \n \n \n \n 175\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pohead_number\n \n \n \n \n 60\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_linenumber\n \n \n \n \n 370\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 114\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitemstatus\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 104\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 31\n \n \n \n 125\n 5\n 615\n 20\n \n 5\n \n Arial\n 10\n bold\n \n \n \n \n foot\n itemsrc_comments\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 422 CCReceipt \N \n\n Credit Card Receipt\n CCReceipt\n \n Letter\n \n 100\n 100\n 100\n 100\n \n header\n SELECT remitto.*,\n formatAddr(remitto_address1, remitto_address2,\n remitto_address3, remitto_citystatezip,\n remitto_country) AS remitto_addr\nFROM remitto;\n \n \n detail\n SELECT *,\n formatbytea(decrypt(setbytea(ccard_name),\n setbytea(<? value("key") ?>),\n 'bf')) AS holder,\n formatccnumber(decrypt(setbytea(ccard_number),\n setbytea(<? value("key") ?>),\n 'bf')) AS xxxx,\n CASE WHEN (ccpay_type='A') THEN <? value("preauth") ?>\n WHEN (ccpay_type='C') THEN <? value("charge") ?>\n WHEN (ccpay_type='R') THEN <? value("refund") ?>\n ELSE ccpay_type\n END AS type,\n CASE WHEN (ccpay_status='A') THEN <? value("authorized") ?>\n WHEN (ccpay_status='C') THEN <? value("approved") ?>\n WHEN (ccpay_status='D') THEN <? value("declined") ?>\n WHEN (ccpay_status='R') THEN <? value("reversed") ?>\n WHEN (ccpay_status='V') THEN <? value("voided") ?>\n WHEN (ccpay_status='X') THEN <? value("noapproval") ?>\n ELSE ccpay_status\n END AS status\n\nFROM ccpay JOIN\n ccard ON (ccpay_ccard_id=ccard_id) JOIN\n custinfo ON (ccard_cust_id=cust_id)\nWHERE (ccpay_id=<? value("ccpay_id") ?>);\n \n \n 101\n \n \n 0\n 60\n 250\n 15\n \n 40\n \n Arial\n 10\n normal\n \n \n \n \n header\n remitto_addr\n \n \n \n \n \n 0\n 40\n 150\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n header\n remitto_name\n \n \n \n \n \n 160\n 20\n 100\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n Header\n \n \n header\n \n 101\n \n
\n
\n Detail\n \n \n detail\n \n 231\n \n \n 130\n 160\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n ccpay_r_ref\n \n \n \n \n \n 130\n 200\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n ccpay_r_ordernum\n \n \n \n \n \n \n 130\n 60\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n ccpay_transaction_datetime\n \n \n \n \n 130\n 80\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n type\n \n \n \n \n 130\n 100\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n ccpay_amount\n \n \n \n \n \n \n \n \n 130\n 180\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n ccpay_by_username\n \n \n \n \n 130\n 20\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n holder\n \n \n \n \n 130\n 0\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n \n \n 130\n 140\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n status\n \n \n \n \n \n 130\n 40\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n xxxx\n \n \n \n
\n
\n \N 0 2013-07-26 16:14:22.271087 508 CustomerBOL \N \n\n Drop Ship Bill of Lading\n CustomerBOL\n \n \n 850\n 1100\n \n \n 0\n 50\n 0\n 0\n \n head\n SELECT shiphead_shipvia, formatDate(shiphead_shipdate) AS shipdate,\n cust_name, ca.addr_line1 AS cust_address1, ca.addr_line2 AS cust_address2,\n (ca.addr_city || ' ' || ca.addr_state || ' ' || ca.addr_postalcode) AS custcitystatezip,\n cust_number, cohead_number, cohead_fob, cohead_custponumber,\n warehous_descrip, wa.addr_line1 AS warehous_addr1, wa.addr_line2 AS warehous_addr2, wa.addr_line3 AS warehous_addr3, wa.addr_city AS warehous_addr4, warehous_fob,\n cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n cohead_shiptophone\n FROM shiphead, cohead, whsinfo, custinfo\n LEFT OUTER JOIN addr ca ON (cntct_addr_id=ca.addr_id)\n LEFT OUTER JOIN addr wa ON (warehous_addr_id=wa.addr_id);\n WHERE ((shiphead_order_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (cohead_warehous_id=warehous_id)\n AND (shiphead_id=%1));\n \n \n detail\n SELECT coitem_linenumber, formatQty(SUM(shipitem_qty)) AS invqty, uom_name, roundUp(SUM(shipitem_qty) / itemuomratiobytype(item_id, 'Selling'))::integer AS shipqty,\n itemsellinguom(item_id) AS shipuom, item_number, item_descrip1, item_descrip2,\n formatQty(SUM(shipitem_qty) * item_prodweight) AS netweight,\n formatQty(SUM(shipitem_qty) * (item_prodweight + item_packweight)) AS grossweight\n FROM shipitem, coitem, itemsite, item, uom\n WHERE ((shipitem_orderitem_id=coitem_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (shipitem_shiphead_id=%1))\n GROUP BY coitem_linenumber, item_number, uom_name, shipuom\n item_descrip1, item_descrip2, item_prodweight, item_packweight\n ORDER BY coitem_linenumber;\n \n \n \n foot\n SELECT formatQty(SUM(shipitem_qty * item_prodweight)) AS netweight,\n formatQty(SUM(shipitem_qty * (item_prodweight + item_packweight))) AS grossweight,\n CASE\n WHEN ('%3' = 'C') THEN 'X'\n ELSE ' '\n END AS collectflag,\n CASE\n WHEN ('%3' = 'C') THEN 'Therm-O-Rock East, Inc.'\n ELSE ' '\n END AS section7,\n CASE\n WHEN ('%3' = 'C') THEN cust_name\n ELSE ' '\n END AS collect_name,\n CASE\n WHEN ('%3' = 'C') THEN addr_line1\n ELSE ' '\n END AS collect_address1,\n CASE\n WHEN ('%3' = 'C') THEN addr_line2\n ELSE ' '\n END AS collect_address2,\n CASE\n WHEN ('%3' = 'C') THEN (addr_city || ' ' || addr_state || ' ' || addr_postalcode)\n ELSE ' '\n END AS collect_address3\n FROM shipitem, cohead, custinfo, coitem, itemsite, item\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n WHERE ((shipitem_orderitem_id=coitem_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (coitem_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (shipitem_shiphead_id=%1))\n GROUP BY cust_name, addr_line1, addr_line2, addr_city, addr_state, addr_postalcode;\n \n \n notes\n SELECT shiphead_notes\n FROM shiphead\n WHERE (shiphead_id=%1);\n \n \n \n 318\n \n \n 532\n 224\n 300\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n shiptocitystatezip\n \n \n \n \n 532\n 205\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptoaddress3\n \n \n \n \n 93\n 168\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n warehous_addr2\n \n \n \n \n 93\n 205\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n warehous_addr4\n \n \n \n \n 532\n 168\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptoaddress1\n \n \n \n \n 93\n 149\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cust_name\n \n \n \n \n 532\n 149\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptoname\n \n \n \n \n 532\n 242\n 300\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptophone\n \n \n \n \n 578\n 65\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n shipdate\n \n \n \n \n 93\n 186\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n warehous_addr3\n \n \n \n \n \n 121\n 65\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n shiphead_shipvia\n \n \n \n \n 532\n 186\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptoaddress2\n \n \n \n
\n detail\n \n \n detail\n coitem_linenumber\n \n 54\n \n \n 200\n 40\n 300\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 94\n 5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n shipuom\n \n \n \n \n 10\n 30\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n invqty\n \n \n \n \n 200\n 25\n 300\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 94\n 30\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n 10\n 5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n shipqty\n \n \n \n \n 520\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n netweight\n \n \n \n \n 200\n 5\n 300\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n item_number\n \n \n \n \n 520\n 25\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n grossweight\n \n \n \n
\n \n \n 346\n \n \n 614\n 80\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n 230\n 200\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collect_address3\n \n \n \n \n \n 20\n 180\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collect_name\n \n \n \n \n 520\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n netweight\n \n \n \n \n 50\n 10\n 400\n 100\n \n \n Arial\n 10\n normal\n \n \n \n \n notes\n shiphead_notes\n \n \n \n \n 614\n 120\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n 20\n 200\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collect_address1\n \n \n \n \n 438\n 270\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n section7\n \n \n \n \n 520\n 25\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n grossweight\n \n \n \n \n \n 614\n 60\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_fob\n \n \n \n \n 230\n 180\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collect_address2\n \n \n \n \n 728\n 270\n 46\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collectflag\n \n \n \n \n 614\n 100\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 107 AccountNumberMasterList \N \n\n Chart of Accounts Master List\n AccountNumberMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select accnt_company,\n accnt_profit,\n accnt_number,\n accnt_sub,\n accnt_descrip,\n accnt_comments,\n CASE WHEN(accnt_type='A') THEN text('Asset')\n WHEN(accnt_type='L') THEN text('Liability')\n WHEN(accnt_type='E') THEN text('Expense')\n WHEN(accnt_type='R') THEN text('Revenue')\n WHEN(accnt_type='Q') THEN text('Equity')\n ELSE text(accnt_type)\n END AS f_type\n from accnt\nORDER BY accnt_number, accnt_sub, accnt_profit;\n \n \n 77\n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n 10\n 15\n 750\n 15\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 325\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n accnt_sub\n \n \n \n \n 220\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n accnt_number\n \n \n \n \n 115\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n accnt_profit\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n accnt_company\n \n \n \n \n 494\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n accnt_descrip\n \n \n \n \n 430\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n
\n \n 17\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 333 CRMAccountMasterList \N \n\n CRM Accounts Master List\n CRMAccountMasterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n crmaccounts\n detail\n \n \n 160\n \n \n \n \n 4.76465\n 156.293\n 744.765\n 156.293\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 40\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 34\n \n \n \n \n 4.23535\n 30.2931\n 744.235\n 30.2931\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 32\n \n \n 550\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n competitor\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n crmacct_number\n \n \n \n \n 615\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n partner\n \n \n \n \n 418.235\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prospect\n \n \n \n \n 115\n 0\n 234\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n crmacct_name\n \n \n \n \n 680\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n taxauth\n \n \n \n \n 355\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust\n \n \n \n \n 485\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend\n \n \n \n \n 302.941\n 15.3526\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_phone\n \n \n \n \n 115\n 15.3526\n 185\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_name\n \n \n \n \n 417.941\n 15.3526\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_email\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 56 CapacityUOMsByClassCode \N \n\n Capacity UOMs By Class Code\n CapacityUOMsByClassCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("classcode_id") ?>\n ( SELECT (classcode_code || '-' || classcode_descrip)\n FROM classcode\n WHERE (classcode_id=<? value("classcode_id") ?>) )\n <? elseif exists("classcode_pattern") ?>\n text(<? value("classcode_pattern") ?>)\n <? else ?>\n text('All Class Codes')\n <? endif ?>\n AS classcode;\n \n \n detail\n SELECT classcode_code,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n itemcapuom(item_id) AS capuom,\n formatRatio(itemcapinvrat(item_id)) AS capratio,\n itemaltcapuom(item_id) AS altcapuom,\n formatRatio(itemaltcapinvrat(item_id)) AS altcapratio,\n itemsellinguom(item_id) AS shipuom,\n formatRatio(iteminvpricerat(item_id)) AS shipratio\n FROM item, classcode, uom\n WHERE ((item_classcode_id=classcode_id)\n AND (item_inv_uom_id=uom_id)\n<? if exists("classcode_id") ?>\n AND (classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n AND (classcode_code ~ <? value("classcode_pattern") ?>)\n<? endif ?>\n)\nORDER BY classcode_code, item_number;\n \n \n \n 234\n \n \n \n 120\n 120\n 565\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n classcode\n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 600\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipratio\n \n \n \n \n 5\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n classcode_code\n \n \n \n \n 600\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipuom\n \n \n \n \n 300\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 400\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n capuom\n \n \n \n \n 500\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n altcapuom\n \n \n \n \n 500\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n altcapratio\n \n \n \n \n 100\n 15\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 400\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n capratio\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 100\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 100\n 30\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 187 CharacteristicsMasterList \N \n\n Characteristics Master List\n CharacteristicsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT char_id,\n char_name,\n formatBoolYN(char_items) AS f_items,\n formatBoolYN(char_options) AS f_options,\n formatBoolYN(char_attributes) AS f_attributes,\n formatBoolYN(char_lotserial) AS f_lotserial,\n char_notes\n FROM char\nORDER BY char_name;\n \n \n 86\n \n \n \n \n \n \n \n 5\n 80\n 745\n 80\n 2\n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 270\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_options\n \n \n \n \n 220\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_items\n \n \n \n \n 10\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n char_name\n \n \n \n \n 425\n 0\n 320\n 13\n \n 5\n \n Arial\n 8\n bold\n \n \n \n \n detail\n char_notes\n \n \n \n \n 320\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_attributes\n \n \n \n \n 370\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_lotserial\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 455 Incident \N \n\n Incident\n Incident\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n select incdt_number, incdt_summary, \n incdt_assigned_username, incdt_status, \n incdt_owner_username, incdtseverity_name,\n incdtpriority_name, incdtcat_name,\n crmacct_name, cntct_first_name || ' ' ||cntct_last_name as f_name, \n cntct_phone, cntct_email,cntct_title\n from incdt left outer join incdtseverity on \n (incdt_incdtseverity_id = incdtseverity_id)\n left outer join incdtpriority on\n (incdt_incdtpriority_id = incdtpriority_id) \n left outer join incdtcat on\n (incdt_incdtcat_id = incdtcat_id)\n left outer join crmacct on \n (incdt_crmacct_id = crmacct_id) \n left outer join cntct on \n (incdt_cntct_id = cntct_id) \n where incdt_id = <? value("incdt_id") ?>;\n \n \n \n detail\n select incdt_descrip \n from incdt\n where incdt_id = <? value("incdt_id") ?>;\n \n \n detail2\n select comment_date, comment_user, comment_text \n from comment\n where comment_source_id = <? value("incdt_id") ?> and comment_source = 'INCDT'\norder by comment_date desc;\n \n \n detail3\n select url_title, url_url \nfrom url \nwhere url_source_id = <? value("incdt_id") ?>\nand url_source = 'INCDT'\n\n\n \n \n 268\n \n \n 136\n 57\n 598\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n incdt_summary\n \n \n \n \n 128\n 123\n 251\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 370\n 10\n 171\n 35\n \n \n Arial\n 18\n bold\n \n \n \n \n head\n incdt_number\n \n \n \n \n 540\n 144\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n incdtseverity_name\n \n \n \n \n \n 128\n 165\n 342\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cntct_title\n \n \n \n \n \n \n \n \n 540\n 187\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n incdt_owner_username\n \n \n \n \n \n \n 540\n 208\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n incdt_assigned_username\n \n \n \n \n 128\n 208\n 279\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cntct_email\n \n \n \n \n \n \n 540\n 105\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n incdtcat_name\n \n \n \n \n \n 540\n 123\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n incdt_status\n \n \n \n \n 128\n 105\n 263\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n crmacct_name\n \n \n \n \n \n 540\n 165\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n incdtpriority_name\n \n \n \n \n \n \n 128\n 144\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cntct_phone\n \n \n \n \n \n 128\n 187\n 170\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cntct_phone\n \n \n \n \n \n \n 6\n \n \n 36\n \n 5\n 30\n 745\n 30\n 2\n \n \n
\n detail\n \n \n detail\n \n 37\n \n \n 10.9\n 8\n 730\n 17\n \n 14\n \n Helvetica\n 9\n normal\n \n \n \n \n detail\n incdt_descrip\n \n \n \n
\n
\n detail2\n \n labour\n \n \n 33.9041\n \n \n 2.90454\n 3.94806\n 744.812\n 3.62203\n 1\n \n \n \n \n \n detail2\n \n 49.0959\n \n \n 10.9\n 0.621\n 150\n 20\n \n \n Helvetica\n 9\n normal\n \n \n \n \n detail2\n comment_date\n \n \n \n \n 196\n 0.621\n 150\n 20\n \n \n Arial\n 9\n normal\n \n \n \n \n detail2\n comment_user\n \n \n \n \n 10.9\n 23.1\n 730\n 17\n \n 14\n \n Helvetica\n 9\n normal\n \n \n \n \n detail2\n comment_text\n \n \n \n
\n
\n jobcost_head\n \n \n head\n \n 47.4021\n \n 4.90454\n 5.44606\n 746.812\n 5.12003\n 1\n \n \n \n \n \n
\n
\n detail3\n \n detail3_footer\n \n \n 39.6984\n \n \n \n \n detail3\n \n 28.8318\n \n \n 289\n 4.08\n 460\n 18\n \n \n Arial\n 9\n normal\n \n \n \n \n detail3\n url_url\n \n \n \n \n 10.9\n 2.9979\n 274.1\n 20\n \n \n Arial\n 9\n normal\n \n \n \n \n detail3\n url_title\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 27.5186\n \n
\n \N 0 2013-07-26 16:14:22.271087 412 Routing \N \n\n Routing With Items At Operations and Params\n RoutingAndPickList\n Routing with image in header. - Items linked to operations - Shows Params and Values\nPrints image stored in each BOO operation that is stored as Engineering Reference\n Letter\n \n 50\n 50\n 50\n 50\n \n Head\n SELECT \n formatwobarcode(wo_id) AS wobarcode,\n formatWoNumber(wo_id) AS wonumber,\n item_number,\n uom_name AS iteminvuom,\n item_descrip1,\n item_descrip2,\n warehous_code,\n wo_status,\n formatQty(wo_qtyord) AS qtyord,\n formatQty(wo_qtyrcv) AS qtyrcv,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate,\n(SELECT image_data FROM image WHERE ((image_name=item_number)))AS item_image\n FROM wo, itemsite, item, warehous, uom\n WHERE ((wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_id=<? value("wo_id") ?>)\n);\n \n \n \n Detail\n SELECT \n image_data,\n formatwooperbarcode(wooper_id) AS wooperbarcode,\n wooper_id,\n wooper_seqnumber,\n wrkcnt_code,\n COALESCE(stdopn_number, 'None') AS stdopn,\n wooper_descrip1,\n wooper_descrip2,\n wooper_toolref,\n wooper_instruc,\n formatTime(wooper_sutime) AS f_sutime,\n CASE WHEN (wooper_sucomplete) THEN (formatTime(noNeg(wooper_sutime - wooper_suconsumed)) || '/' || text('Complete'))\n ELSE formatTime(noNeg(wooper_sutime - wooper_suconsumed))\n END AS f_suremain,\n formatTime(wooper_rntime) AS f_rntime,\n CASE WHEN (wooper_rncomplete) THEN (formatTime(noNeg(wooper_rntime - wooper_rnconsumed)) || '/' || text('Complete'))\n ELSE formatTime(noNeg(wooper_rntime - wooper_rnconsumed))\n END AS f_rnremain,\n---NEW ITEM INFO\n item_number,\n formatitemsitebarcode(itemsite_id) AS itembarcode,\n item_descrip1,\n item_descrip2,\n uom_name,\n--Material Issue\n womatl_qtyreq,\n womatl_qtyiss\n\n FROM wrkcnt,\n womatl,\n uom,\n itemsite,\n item,\n wooper LEFT OUTER JOIN stdopn ON wooper_stdopn_id=stdopn_id\n-----\n left outer join booitem on (wooper_booitem_id = booitem_id)\n LEFT OUTER JOIN booimage ON (booimage_booitem_id = booitem_id AND booimage_purpose='E')\n left outer join image on (booimage_image_id = image_id)\n-----\n\n \n WHERE ( (wooper_wrkcnt_id=wrkcnt_id)\n AND (womatl_uom_id=uom_id)\n AND (wooper_wo_id= <? value("wo_id") ?>)\n\n--below is the join required to show the operation\n--unfortunately it needs to be an outer or inner join\n--note that currenlty it shows duplicates for each match\n--note also that it also does not show operations that have not materials linked to them\n\n AND (womatl_wooper_id = wooper_id)\n\n--the joins below get the item number and description from a join off off item_site to item\n\n AND (womatl_itemsite_id = itemsite_id)\n AND (itemsite_item_id = item_id) \n)\n\n----------------\n\nUNION\n\n----------------\n\nSELECT \n image_data,\n formatwooperbarcode(wooper_id) AS wooperbarcode,\n wooper_id,\n wooper_seqnumber,\n wrkcnt_code,\n text('') AS stdopn,\n wooper_descrip1,\n wooper_descrip2,\n wooper_toolref,\n wooper_instruc,\n formatTime(wooper_sutime) AS f_sutime,\n CASE WHEN (wooper_sucomplete) THEN (formatTime(noNeg(wooper_sutime - wooper_suconsumed)) || '/' || text('Complete'))\n ELSE formatTime(noNeg(wooper_sutime - wooper_suconsumed))\n END AS f_suremain,\n formatTime(wooper_rntime) AS f_rntime,\n CASE WHEN (wooper_rncomplete) THEN (formatTime(noNeg(wooper_rntime - wooper_rnconsumed)) || '/' || text('Complete'))\n ELSE formatTime(noNeg(wooper_rntime - wooper_rnconsumed))\n END AS f_rnremain,\n --NO ITEM INFO\n text('No Items Linked to Operation') AS item_number,\n text('') AS itembarcode,\n text('') AS item_descrip1,\n text('') AS item_descrip2,\n uom_name,\n--Material Issue\n womatl_qtyreq,\n womatl_qtyiss\n\n FROM \n wrkcnt,\n wooper left outer join (womatl JOIN uom ON (womatl_uom_id=uom_id)) on (womatl_wooper_id = wooper_id)\n left outer join booitem on (wooper_booitem_id = booitem_id)\n LEFT OUTER JOIN booimage ON (booimage_booitem_id = booitem_id AND booimage_purpose='P')\n left outer join image on (booimage_image_id = image_id)\n\n \n WHERE ( \n (wooper_wrkcnt_id=wrkcnt_id)\n AND (wooper_wo_id= <? value("wo_id") ?>)\n AND (womatl_wo_id IS NULL)\n )\n\n\nORDER BY wooper_seqnumber;\n \n \n Params\n SELECT \n wo_number, \n char_name, \n charass_value \nFROM \n charass, \n char, \n wo \nWHERE \n charass_target_id = <? value("wo_id") ?> \n AND wo_id = <? value("wo_id") ?>\n AND charass_char_id = char_id;\n \n \n NoOpItems\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n formatQty(womatl_qtyreq) AS qtyreq,\n formatQty(womatl_qtyiss) AS qtyiss,\n formatQty(noNeg(womatl_qtyreq - womatl_qtyiss)) AS qtybalance,\n itemsite_location_comments,\n formatitemsitebarcode(itemsite_id) AS itembarcode,\n CASE WHEN (womatl_issuemethod='S') THEN text('Push')\n WHEN (womatl_issuemethod='L') THEN text('Pull')\n WHEN (womatl_issuemethod='M') THEN text('Mixed')\n ELSE text(womatl_issuemethod)\n END AS f_issuemethod\n FROM womatl, itemsite, item, uom\n WHERE \n (womatl_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (womatl_uom_id=uom_id)\n AND (womatl_wo_id= (<? value("wo_id") ?> )\n AND (womatl_wooper_id = '-1'))\n \n \n 284\n \n \n 142\n 102\n 200\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n item_number\n \n \n \n \n \n 517\n 202\n 100\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n iteminvuom\n \n \n \n \n \n 5\n 30\n 492\n 35\n \n 128\n 20\n \n \n Head\n wobarcode\n \n \n \n \n 517\n 242\n 100\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n duedate\n \n \n \n \n 142\n 142\n 400\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n item_descrip2\n \n \n \n 0\n 265\n 750\n 265\n 3\n \n \n \n \n \n 142\n 125\n 400\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n item_descrip1\n \n \n \n \n 560\n 30\n 187\n 155\n \n stretch\n \n Head\n item_image\n \n \n \n \n 517\n 185\n 100\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n warehous_code\n \n \n \n \n \n \n 135\n 10\n 150\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n wonumber\n \n \n \n \n 517\n 225\n 100\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n startdate\n \n \n \n \n 142\n 175\n 200\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n wo_status\n \n \n \n \n 142\n 225\n 100\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n qtyrcv\n \n \n \n \n \n \n \n \n 252\n 202\n 167\n 37\n \n 3of9\n 7\n \n \n Head\n qtyord\n \n \n \n \n \n 142\n 202\n 100\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n Head\n qtyord\n \n \n \n \n \n 6\n \n \n 6\n \n
\n Charac\n \n Charac\n wo_id\n \n 35\n \n 5\n 55\n 5\n 5\n 2\n \n \n 745\n 5\n 745\n 5\n 2\n \n \n 5\n 5\n 745\n 5\n 2\n \n \n 5\n 25\n 742\n 25\n 0\n \n \n \n 745\n 50\n 745\n 5\n 2\n \n \n \n \n 29\n \n 5\n 15\n 745\n 15\n 2\n \n \n 745\n 15\n 745\n -5\n 2\n \n \n 5\n 15\n 5\n -5\n 2\n \n \n \n \n \n Params\n \n 24\n \n \n 20\n 0\n 95\n 12\n \n \n Arial\n 10\n normal\n \n \n \n \n Params\n char_name\n \n \n \n 5\n 20\n 5\n 0\n 2\n \n \n \n 150\n 0\n 530\n 12\n \n \n Arial\n 10\n normal\n \n \n \n \n Params\n charass_value\n \n \n \n 745\n 20\n 745\n 0\n 2\n \n \n
\n
\n NoOpItems\n \n \n NoOpItems\n \n 57\n \n \n 290\n 10\n 90\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n NoOpItems\n uom_name\n \n \n \n 130\n 50\n 735\n 50\n 0\n \n \n \n 670\n 35\n 65\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n NoOpItems\n qtyiss\n \n \n \n \n 484\n 35\n 90\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n NoOpItems\n qtyreq\n \n \n \n \n 400\n 15\n 341\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n NoOpItems\n item_descrip2\n \n \n \n \n 5\n 20\n 335\n 25\n \n 128\n 20\n \n \n NoOpItems\n itembarcode\n \n \n \n \n 220\n 0\n 165\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n NoOpItems\n item_number\n \n \n \n \n \n \n 400\n 0\n 341\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n NoOpItems\n item_descrip1\n \n \n \n \n \n
\n
\n sequence\n \n sequence\n wooper_seqnumber\n \n 197\n \n \n \n 65\n 5\n 60\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wooper_seqnumber\n \n \n \n \n 385\n 65\n 365\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wooper_descrip2\n \n \n \n \n \n 350\n 120\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_rntime\n \n \n \n 392\n 11\n 392\n 11\n 0\n \n \n \n \n 385\n 5\n 350\n 40\n \n 128\n 18\n \n \n Detail\n wooperbarcode\n \n \n \n \n \n \n 10\n 30\n 250\n 135\n \n stretch\n \n Detail\n image_data\n \n \n \n \n \n \n 385\n 80\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wrkcnt_code\n \n \n \n \n \n \n 535\n 102\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_suremain\n \n \n \n \n \n 350\n 102\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_sutime\n \n \n \n \n 360\n 140\n 150\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wooper_toolref\n \n \n \n \n \n 254\n 170\n 484\n 12\n \n 10\n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wooper_instruc\n \n \n \n 10\n 0\n 747\n 0\n 0\n \n \n \n 535\n 120\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_rnremain\n \n \n \n \n 385\n 50\n 365\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wooper_descrip1\n \n \n \n \n 29\n \n 0\n 5\n 750\n 5\n 3\n \n \n \n \n \n Detail\n \n 69\n \n \n 15\n 20\n 335\n 25\n \n 128\n 20\n \n \n Detail\n itembarcode\n \n \n \n \n \n 680\n 35\n 65\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n womatl_qtyiss\n \n \n \n \n 492\n 35\n 90\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n womatl_qtyreq\n \n \n \n \n 407\n 16\n 341\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_descrip2\n \n \n \n \n 15\n 5\n 165\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_number\n \n \n \n 140\n 51\n 745\n 51\n 0\n \n \n \n \n 310\n 0\n 90\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n uom_name\n \n \n \n \n \n 407\n 1\n 341\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_descrip1\n \n \n \n
\n \n 24\n \n \n \n \n 92\n 0\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 37\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n Routing with image in header. - Items linked to operations - Shows Params and Values\nPrints image stored in each BOO operation that is stored as Engineering Reference 10 2007-12-21 08:52:01.843 237 AccountingPeriodsMasterList \N \n\n Accounting Periods Master List\n AccountingPeriodsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT period_id,\n formatDate(period_start) AS f_start,\n formatDate(period_end) AS f_end,\n formatBoolYN(period_closed) AS f_closed,\n formatBoolYN(period_freeze) AS f_frozen\n FROM period\nORDER BY period_start;\n \n \n 77\n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n 7\n \n \n 22\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 420\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_closed\n \n \n \n \n 114\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_end\n \n \n \n \n 515\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_frozen\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_start\n \n \n \n
\n \n 17\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 400 BudgetsMasterList \N \n\n Budgets Master List\n BudgetsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT formatDate(min(period_start)) AS f_firstperiod,\n formatDate(max(period_end)) AS f_lastperiod,\n budghead_name,\n budghead_descrip\n FROM budghead LEFT OUTER JOIN budgitem \n JOIN period ON (budgitem_period_id=period_id)\n ON (budgitem_budghead_id=budghead_id)\n GROUP BY budghead_name, budghead_descrip\n ORDER BY budghead_name;\n \n \n 76\n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 215\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n budghead_name\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_firstperiod\n \n \n \n \n 370\n 0\n 375\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n budghead_descrip\n \n \n \n \n 110\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_lastperiod\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 43 ClassCodesMasterList \N \n\n Class Codes Master List\n ClassCodesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select classcode_code, classcode_descrip\n from classcode\norder by classcode_code;\n \n \n 76\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n classcode_code\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n classcode_descrip\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 35 CountTagEditList \N \n\n Count Tag Edit List\n CountTagEditList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("classcode_id") ?>\n ( SELECT (classcode_code ||'-'||classcode_descrip)\n FROM classcode\n WHERE (classcode_id=<? value("classcode_id") ?>) ) AS code,\n\t text('Class Code:') AS codelbl\n <? elseif exists("classcode_pattern") ?>\n text(<? value("classcode_pattern") ?>) AS code,\n text('Class Code:') AS codelbl\n <? elseif exists("plancode_id") ?>\n ( SELECT (plancode_code ||'-'|| plancode_name)\n FROM plancode\n WHERE (plancode_id=<? value("plancode_id") ?>) ) AS code,\n\t text('Planner Code:') AS codelbl\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>) AS code,\n text('Planner Code:') AS codelbl\n <? else ?>\n text('') AS code,\n text('') AS codelbl\n <? endif ?>\n \n \n \n detail\n SELECT formatBoolYN(invcnt_priority) AS f_priority,\n CASE WHEN (invcnt_tagnumber IS NULL) THEN 'Misc.'\n ELSE invcnt_tagnumber\n END AS f_tagnumber, \n formatDate(invcnt_tagdate) AS f_tagdate,\n item_number,\n item_descrip1,\n item_descrip2,\n warehous_code,\n CASE WHEN (invcnt_location_id IS NOT NULL)\n THEN (SELECT formatQty(SUM(itemloc_qty))\n FROM itemloc\n WHERE ((itemloc_itemsite_id=itemsite_id)\n AND (itemloc_location_id=invcnt_location_id)) )\n ELSE formatQty(itemsite_qtyonhand)\n END AS f_qoh,\n CASE WHEN (location_id IS NOT NULL)\n THEN location_name\n ELSE 'All' END AS location_name,\n CASE WHEN (invcnt_qoh_after IS NULL) THEN ''\n ELSE formatQty(invcnt_qoh_after)\n END AS f_cntqty,\n CASE WHEN (invcnt_qoh_after IS NULL) THEN ''\n ELSE formatQty(invcnt_qoh_after - itemsite_qtyonhand)\n END AS f_variance,\n CASE WHEN (invcnt_qoh_after IS NULL) THEN ''\n WHEN ((itemsite_qtyonhand = 0) AND (invcnt_qoh_after > 0)) THEN formatPrcnt(1)\n WHEN ((itemsite_qtyonhand = 0) AND (invcnt_qoh_after < 0)) THEN formatPrcnt(-1)\n WHEN ((itemsite_qtyonhand = 0) AND (invcnt_qoh_after = 0)) THEN formatPrcnt(0)\n ELSE formatPrcnt((1 - (invcnt_qoh_after / itemsite_qtyonhand)) * -1)\n END AS f_percent,\n formatExtPrice(stdcost(item_id) * (invcnt_qoh_after - itemsite_qtyonhand)) AS f_amount\n FROM invcnt LEFT OUTER JOIN location ON (invcnt_location_id=location_id),\n item, whsinfo, itemsite\n WHERE ((invcnt_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (NOT invcnt_posted)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN ( SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n<? elseif exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN ( SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? endif ?>\n)\nORDER BY f_priority DESC, item_number\n<? if exists("maxTags") ?>\n LIMIT <? value("maxTags") ?>\n<? endif ?>\n \n \n 205\n \n \n \n \n 5\n 200\n 745\n 200\n 2\n \n \n \n \n 100\n 100\n 330\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n \n 100\n 80\n 330\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n code\n \n \n \n \n \n 0\n 80\n 95\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n codelbl\n \n \n \n \n \n \n \n \n 8\n \n \n 38\n \n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 55\n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_variance\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 295\n 15\n 104\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_tagdate\n \n \n \n \n 408\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n location_name\n \n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_percent\n \n \n \n \n 494\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cntqty\n \n \n \n \n 60\n 0\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 295\n 0\n 104\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_tagnumber\n \n \n \n \n 408\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 10\n 15\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_priority\n \n \n \n \n 60\n 15\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 60\n 30\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n
\n \n 21\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 24 DetailedInventoryHistoryByLotSerial \N \n\n Detailed Inventory History by Lot/Serial #\n DetailedInventoryHistoryByLotSerial\n \n \n \n \n \n \n \n \n \n \n \n \n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT (REPEAT(' ',(lshist_level-1)*4) || lshist_level) AS level,\n lshist_warehous_code AS warehous_code,\n formatDateTime(lshist_transdate) AS transdate,\n lshist_transtype AS transtype,\n lshist_ordernumber AS ordernumber,\n invhist_invuom,\n item_number,\n item_descrip1,\n item_descrip2,\n lshist_lotserial as lotserial,\n lshist_locationname AS location_name,\n formatQty(lshist_transqty) AS transqty,\n formatQty(lshist_qty_before) AS qohbefore,\n formatQty(lshist_qty_after) AS qohafter,\n invhist_user AS username\nFROM lshist(<? value("itemid") ?>,<? value("warehouseid") ?>,<? value("lotSerial") ?>,\n<? if exists("pattern") ?>\nTRUE\n<? else ?>\nFALSE\n<? endif ?>,\n<? value("transType") ?>,<? value("startDate") ?>,<? value("endDate") ?>,<? value("trace") ?>,1), invhist, itemsite, item\nWHERE ((invhist_id=lshist_id)\nAND (invhist_itemsite_id=itemsite_id)\nAND (itemsite_item_id=item_id));\n \n \n head\n SELECT text(<? value("lotSerial") ?>) AS lotserial,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate\n \n \n 251\n \n 10\n 245\n 745\n 245\n 2\n \n \n \n \n \n 140\n 145\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n \n \n 140\n 100\n 372\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n lotserial\n \n \n \n \n \n \n 140\n 125\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 51\n \n \n \n \n \n \n \n \n \n \n \n \n \n 10\n 45\n 745\n 45\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 57\n \n \n 232\n 15\n 165\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 115\n 0\n 110\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n 10\n 50\n 750\n 50\n 0\n \n \n \n 580\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transqty\n \n \n \n \n 395\n 0\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n lotserial\n \n \n \n \n 232\n 30\n 227\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 80\n 0\n 32\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 395\n 15\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n location_name\n \n \n \n \n 0\n 0\n 62\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n level\n \n \n \n \n 232\n 0\n 125\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 125\n 30\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n username\n \n \n \n \n 660\n 15\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohafter\n \n \n \n \n 525\n 0\n 50\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invhist_invuom\n \n \n \n \n 660\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohbefore\n \n \n \n \n 125\n 15\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordernumber\n \n \n \n \n 80\n 15\n 32\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transtype\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 92\n 0\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2008-10-03 11:26:59.671726 509 Contracts \N \n\n Contracts\n Contracts\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n contracts\n detail\n \n \n 76\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 22\n \n \n 10\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_number\n \n \n \n \n 90\n 2\n 135\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 235\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n contrct_number\n \n \n \n \n 320\n 2\n 135\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n contrct_descrip\n \n \n \n \n 470\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n contrct_effective\n \n \n \n \n 565\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n contrct_expires\n \n \n \n \n 655\n 2\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_count\n \n \n \n
\n \n 25\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 483 Customers \N \n\n Customers\n Customers\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n -- Group: customers\n-- Name: detail\n-- Notes: \n\nSELECT DISTINCT ON ( cust_number )\n cust_id, cust_custtype_id, \n formatBoolYN(cust_active) as f_active,\n formatAddr(bill_addr.addr_id) AS f_bill_addr,\n formatAddr(corr_addr.addr_id) AS f_corr_addr,\n bill_cntct.cntct_name AS bill_cntct_name,\n corr_cntct.cntct_name AS corr_cntct_name,\n cust_active, cust_number, cust_name,\n custtype_code,\n bill_cntct.cntct_first_name AS bill_first_name,\n bill_cntct.cntct_last_name AS bill_last_name,\n bill_cntct.cntct_phone AS bill_phone,\n bill_cntct.cntct_fax AS bill_fax,\n bill_cntct.cntct_email AS bill_email,\n bill_addr.addr_line1 AS bill_line1,\n bill_addr.addr_line2 AS bill_line2,\n bill_addr.addr_line3 AS bill_line3,\n bill_addr.addr_city AS bill_city,\n bill_addr.addr_state AS bill_state,\n bill_addr.addr_postalcode AS bill_postalcode,\n bill_addr.addr_country AS bill_country,\n corr_cntct.cntct_first_name AS corr_first_name,\n corr_cntct.cntct_last_name AS corr_last_name,\n corr_cntct.cntct_phone AS corr_phone,\n corr_cntct.cntct_fax AS corr_fax,\n corr_cntct.cntct_email AS corr_email,\n corr_addr.addr_line1 AS corr_line1,\n corr_addr.addr_line2 AS corr_line2,\n corr_addr.addr_line3 AS corr_line3,\n corr_addr.addr_city AS corr_city,\n corr_addr.addr_state AS corr_state,\n corr_addr.addr_postalcode AS corr_postalcode,\n corr_addr.addr_country AS corr_country\n<? foreach("char_id_list") ?>\n , charass_alias<? literal("char_id_list") ?>.charass_value AS char<? literal("char_id_list") ?>\n<? endforeach ?>\nFROM custinfo\n JOIN custtype ON (cust_custtype_id=custtype_id)\n LEFT OUTER JOIN cntct bill_cntct ON (cust_cntct_id=bill_cntct.cntct_id) \n LEFT OUTER JOIN addr bill_addr ON (bill_cntct.cntct_addr_id=bill_addr.addr_id)\n LEFT OUTER JOIN cntct corr_cntct ON (cust_corrcntct_id=corr_cntct.cntct_id) \n LEFT OUTER JOIN addr corr_addr ON (corr_cntct.cntct_addr_id=corr_addr.addr_id) \n<? foreach("char_id_text_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_text_list") ?> ON ((charass_alias<? literal("char_id_text_list") ?>.charass_target_type='C') \n AND (charass_alias<? literal("char_id_text_list") ?>.charass_target_id=cust_id)\n AND (charass_alias<? literal("char_id_text_list") ?>.charass_char_id=<? value("char_id_text_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_text_list") ?> ON (charass_alias<? literal("char_id_text_list") ?>.charass_char_id=char_alias<? literal("char_id_text_list") ?>.char_id)\n<? endforeach ?>\n<? foreach("char_id_list_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_list_list") ?> ON ((charass_alias<? literal("char_id_list_list") ?>.charass_target_type='C') \n AND (charass_alias<? literal("char_id_list_list") ?>.charass_target_id=cust_id)\n AND (charass_alias<? literal("char_id_list_list") ?>.charass_char_id=<? value("char_id_list_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_list_list") ?> ON (charass_alias<? literal("char_id_list_list") ?>.charass_char_id=char_alias<? literal("char_id_list_list") ?>.char_id)\n<? endforeach ?>\n<? foreach("char_id_date_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_date_list") ?> ON ((charass_alias<? literal("char_id_date_list") ?>.charass_target_type='C') \n AND (charass_alias<? literal("char_id_date_list") ?>.charass_target_id=cust_id)\n AND (charass_alias<? literal("char_id_date_list") ?>.charass_char_id=<? value("char_id_date_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_date_list") ?> ON (charass_alias<? literal("char_id_date_list") ?>.charass_char_id=char_alias<? literal("char_id_date_list") ?>.char_id)\n<? endforeach ?>\nWHERE true\n<? if not exists("showInactive") ?> \n AND cust_active \n<? endif ?>\n<? if exists("search_pattern") ?>\n AND ((cust_number ~* <? value("search_pattern") ?>)\n OR (cust_name ~* <? value("search_pattern") ?>)\n OR (custtype_code ~* <? value("search_pattern") ?>)\n OR (COALESCE(bill_cntct.cntct_first_name || ' ' || bill_cntct.cntct_last_name,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(bill_cntct.cntct_phone || ' ' || bill_cntct.cntct_phone2 || ' ' || bill_cntct.cntct_fax, '') ~* <? value("search_pattern") ?>)\n OR (COALESCE(bill_cntct.cntct_email, '') ~* <? value("search_pattern") ?>)\n OR (COALESCE(bill_addr.addr_line1 || ' ' || bill_addr.addr_line2 || ' ' || bill_addr.addr_line3,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(bill_addr.addr_city,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(bill_addr.addr_state,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(bill_addr.addr_postalcode,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(bill_addr.addr_country,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(corr_cntct.cntct_first_name || ' ' || corr_cntct.cntct_last_name,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(corr_cntct.cntct_phone || ' ' || corr_cntct.cntct_phone2 || ' ' || corr_cntct.cntct_fax, '') ~* <? value("search_pattern") ?>)\n OR (COALESCE(corr_cntct.cntct_email, '') ~* <? value("search_pattern") ?>)\n OR (COALESCE(corr_addr.addr_line1 || ' ' || corr_addr.addr_line2 || ' ' || corr_addr.addr_line3,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(corr_addr.addr_city,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(corr_addr.addr_state,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(corr_addr.addr_postalcode,'') ~* <? value("search_pattern") ?>)\n OR (COALESCE(corr_addr.addr_country,'') ~* <? value("search_pattern") ?>))\n<? endif ?>\n<? if exists("cust_number_pattern") ?>\n AND (cust_number ~* <? value("cust_number_pattern") ?>)\n<? endif ?>\n<? if exists("cust_name_pattern") ?>\n AND (cust_name ~* <? value("cust_name_pattern") ?>)\n<? endif ?>\n<? if exists("custtype_code_pattern") ?>\n AND (custtype_code ~* <? value("custtype_code_pattern") ?>)\n<? endif ?>\n<? if exists("cntct_name_pattern") ?>\n AND (COALESCE(bill_cntct.cntct_first_name || ' ' || bill_cntct.cntct_last_name, '') ~* <? value("cntct_name_pattern") ?> \n OR COALESCE(corr_cntct.cntct_first_name || ' ' || corr_cntct.cntct_last_name, '') ~* <? value("cntct_name_pattern") ?>)\n<? endif ?>\n<? if exists("cntct_phone_pattern") ?>\n AND (COALESCE(bill_cntct.cntct_phone || ' ' || bill_cntct.cntct_phone2 || ' ' || bill_cntct.cntct_fax,'') ~* <? value("cntct_phone_pattern") ?>\n OR COALESCE(corr_cntct.cntct_phone || ' ' || corr_cntct.cntct_phone2 || ' ' || corr_cntct.cntct_fax,'') ~* <? value("cntct_phone_pattern") ?>)\n<? endif ?>\n<? if exists("cntct_email_pattern") ?>\n AND (COALESCE(bill_cntct.cntct_email,'') ~* <? value("cntct_email_pattern") ?>\n OR COALESCE(corr_cntct.cntct_email,'') ~* <? value("cntct_email_pattern") ?>)\n<? endif ?>\n<? if exists("addr_street_pattern") ?>\n AND (COALESCE(bill_addr.addr_line1 || ' ' || bill_addr.addr_line2 || ' ' || bill_addr.addr_line3,'') ~* <? value("addr_street_pattern") ?>\n OR COALESCE(corr_addr.addr_line1 || ' ' || corr_addr.addr_line2 || ' ' || corr_addr.addr_line3,'') ~* <? value("addr_street_pattern") ?>)\n<? endif ?>\n<? if exists("addr_city_pattern") ?>\n AND (COALESCE(bill_addr.addr_city,'') ~* <? value("addr_city_pattern") ?>\n OR COALESCE(corr_addr.addr_city,'') ~* <? value("addr_city_pattern") ?>)\n<? endif ?>\n<? if exists("addr_state_pattern") ?>\n AND (COALESCE(bill_addr.addr_state,'') ~* <? value("addr_state_pattern") ?>\n OR COALESCE(corr_addr.addr_state,'') ~* <? value("addr_state_pattern") ?>)\n<? endif ?>\n<? if exists("addr_postalcode_pattern") ?>\n AND (COALESCE(bill_addr.addr_postalcode,'') ~* <? value("addr_postalcode_pattern") ?>\n OR COALESCE(corr_addr.addr_postalcode,'') ~* <? value("addr_postalcode_pattern") ?>)\n<? endif ?>\n<? if exists("addr_country_pattern") ?>\n AND (COALESCE(bill_addr.addr_country,'') ~* <? value("addr_country_pattern") ?>\n OR COALESCE(corr_addr.addr_country,'') ~* <? value("addr_country_pattern") ?>)\n<? endif ?>\n<? literal("charClause") ?>\nORDER BY cust_number; \n \n \n 146\n \n \n 5\n 140\n 745\n 140\n 2\n \n \n \n \n \n \n \n 5\n 33\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 67\n \n \n 50\n 2\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 5\n 2\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_active\n \n \n \n \n 480\n 2\n 250\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_bill_addr\n \n \n \n \n 155\n 17\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bill_cntct_name\n \n \n \n \n 155\n 32\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bill_phone\n \n \n \n \n 155\n 47\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bill_email\n \n \n \n \n \n \n \n 365\n 2\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custtype_code\n \n \n \n \n 155\n 2\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n
\n \n 16\n \n \n 105\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 309 AccountingYearPeriodsMasterList \N \n\n Accounting Year Periods Master List\n AccountingYearPeriodsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT yearperiod_id,\n formatDate(yearperiod_start) AS f_start,\n formatDate(yearperiod_end) AS f_end,\n formatBoolYN(yearperiod_closed) AS f_closed\n FROM yearperiod\nORDER BY yearperiod_start;\n \n \n 75\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 14\n 745\n 14\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 113\n 0\n 100\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_end\n \n \n \n \n 10\n 0\n 100\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_start\n \n \n \n \n 420\n 0\n 80\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_closed\n \n \n \n
\n \n 15\n \n \n \n 90\n 0\n 100\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 70 CustomerTypesMasterList \N \n\n Customer Types Master List\n CustomerTypesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select custtype_code, custtype_descrip\n from custtype\norder by custtype_code;\n \n \n 76\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custtype_descrip\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custtype_code\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 164 DeliveryDateVariancesByVendor \N \n\n Delivery Date Variances By Vendor\n DeliveryDateVariancesByVendor\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT vend_name,\n vend_number,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS purchagent\n FROM vendinfo\n WHERE (vend_id=<? value("vend_id") ?>);\n \n \n detail\n poDeliveryDateVariances\n detail\n \n \n 171\n \n \n 550\n 69\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 95\n 110\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n purchagent\n \n \n \n \n 95\n 65\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_name\n \n \n \n \n \n \n \n \n \n \n 95\n 90\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 550\n 49\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n 95\n 45\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_number\n \n \n \n \n \n \n \n \n \n 1\n 168\n 741\n 168\n 2\n \n \n \n \n \n \n 4\n -1\n 744\n -1\n 2\n \n \n \n \n 1\n \n \n 35\n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 31\n \n \n 578\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 62\n 14\n 247\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemdescrip\n \n \n \n \n 495\n 1\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n argd_duedate\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recv_date\n \n \n \n \n 319\n 0\n 162\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemnumber\n \n \n \n 5\n 30\n 745\n 30\n 0\n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_order_number\n \n \n \n \n 495\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n release_duedate\n \n \n \n \n 578\n 14\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n real_leadtime\n \n \n \n \n 665\n 14\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orderdate\n \n \n \n \n 62\n 0\n 247\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemnumber\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 25 DetailedInventoryHistoryByLocation \N \n\n Detailed Inventory History by Location\n DetailedInventoryHistoryByLocation\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatLocationName(location_id) AS locationname,\n firstLine(location_descrip) as f_descrip,\n formatBoolYN(location_netable) AS f_netable,\n formatBoolYN(location_restrict) AS f_restrict,\n warehous_code AS warehouse,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate\n FROM location, whsinfo\n WHERE ((location_id=<? value("location_id") ?>)\n AND (location_warehous_id=warehous_id) );\n\n \n \n detail\n SELECT invhist_id,\n formatDateTime(invhist_transdate) AS transdate,\n invhist_transtype,\n (invhist_ordtype || '-' || invhist_ordnumber) AS ordernumber,\n invhist_invuom,\n item_number,\n item_descrip1,\n item_descrip2,\n formatlotserialnumber(invdetail_ls_id) AS invdetail_lotserial,\n formatQty(invdetail_qty) AS transqty,\n formatQty(invdetail_qty_before) AS qohbefore,\n formatQty(invdetail_qty_after) AS qohafter,\n invhist_user AS username,\n (select warehous_code from whsinfo where warehous_id=itemsite_warehous_id) as warehous_code\n FROM invdetail, invhist, itemsite, item\n WHERE ((invdetail_invhist_id=invhist_id)\n AND (invhist_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (invdetail_location_id=<? value("location_id") ?>)\n AND (date(invhist_transdate) BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n AND (transType(invhist_transtype, <? value("transType") ?>))\n)\nORDER BY invhist_transdate DESC, invhist_transtype;\n \n \n 251\n \n \n \n \n 140\n 104\n 375\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_descrip\n \n \n \n \n \n \n 140\n 85\n 375\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n locationname\n \n \n \n \n \n \n 508\n 150\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 140\n 130\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n 508\n 130\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n 600\n 104\n 65\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_restrict\n \n \n \n \n \n \n \n \n \n \n 600\n 85\n 65\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_netable\n \n \n \n 5\n 245\n 745\n 245\n 2\n \n \n \n \n \n \n \n \n 6\n \n \n 51\n \n \n \n \n \n \n 5\n 45\n 745\n 45\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 585\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohbefore\n \n \n \n \n 508\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transqty\n \n \n \n \n 60\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 433\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invhist_invuom\n \n \n \n \n 60\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordernumber\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohafter\n \n \n \n \n 170\n 15\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 10\n 15\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invhist_transtype\n \n \n \n \n 170\n 0\n 125\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 305\n 0\n 125\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invdetail_lotserial\n \n \n \n \n 60\n 30\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n username\n \n \n \n \n 170\n 30\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 66 EarnedCommissions \N \n\n Earned Commissions\n EarnedCommissions\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("salesrep_id") ?>\n ( SELECT salesrep_name\n FROM salesrep\n WHERE (salesrep_id=<? value("salesrep_id") ?>) )\n <? else ?>\n text('All Sales Reps')\n <? endif ?>\n AS salesrep,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate;\n \n \n detail\n salesHistory\n detail\n \n \n 221\n \n \n \n \n \n 140\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n 140\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n 140\n 100\n 385\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n salesrep\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 395\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 565\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_baseextprice\n \n \n \n \n 155\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 103\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohist_ordernumber\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_commissionpaid\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salesrep_name\n \n \n \n \n 315\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_invcdate\n \n \n \n \n 505\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyshipped\n \n \n \n \n 635\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_basecommission\n \n \n \n \n 202\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohist_shiptoname\n \n \n \n
\n \n 16\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 16\n \n \n \n 565\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n baseextprice\n \n qty\n \n \n \n 635\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n basecommission\n \n qty\n \n \n
\n \N 0 2013-07-26 16:14:22.271087 489 PlannedOrders \N \n\n Planned Orders\n PlannedOrders\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n schedule\n plannedorders\n \n \n 222\n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n 10\n 36\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 7\n \n \n 37\n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 495\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 114\n 15\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 114\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordtype\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordernum\n \n \n \n \n 165\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 165\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip\n \n \n \n \n 390\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_startdate\n \n \n \n \n 600\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_firm\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 115\n 29\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n supply_warehous_code\n \n \n \n
\n \n 19\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2011-02-16 10:13:34.891119 59 CustomerInformation \N \n\n Customer Information\n CustomerInformation\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT cust_name, cust_number,\n ba.addr_line1 AS cust_address1, ba.addr_line2 AS cust_address2, ba.addr_line3 AS cust_address3,\n ba.addr_city AS cust_city, ba.addr_state AS cust_state, ba.addr_postalcode AS cust_zipcode,\n (ba.addr_city || ', ' || ba.addr_state || ' ' || ba.addr_postalcode) AS citystatezip,\n trim(bc.cntct_first_name || ' ' || bc.cntct_last_name) AS cust_contact, bc.cntct_phone AS cust_phone, bc.cntct_fax AS cust_fax, bc.cntct_email AS cust_email,\n ca.addr_line1 AS cust_corraddress1, ca.addr_line2 AS cust_corraddress2, ca.addr_line3 AS cust_corraddress3,\n ca.addr_city AS cust_corrcity, ca.addr_state AS cust_corrstate, ca.addr_postalcode AS cust_corrzipcode,\n (ca.addr_city || ', ' || ca.addr_state || ' ' || ca.addr_postalcode) AS corrcitystatezip,\n trim(cc.cntct_first_name || ' ' || cc.cntct_last_name) AS cust_corrcontact, cc.cntct_phone AS cust_corrphone,\n cc.cntct_fax AS cust_corrfax, cc.cntct_email AS cust_corremail,\n CASE WHEN (cust_creditstatus='G') THEN 'In Good Standing'\n WHEN (cust_creditstatus='W') THEN 'On Credit Warning'\n WHEN (cust_creditstatus='H') THEN 'On Credit Hold'\n ELSE ('Unknown Status: ' || cust_creditstatus)\n END AS f_creditstatus,\n cust_comments\n FROM custinfo\n LEFT OUTER JOIN cntct cc ON (cust_corrcntct_id=cc.cntct_id)\n LEFT OUTER JOIN addr ca ON (cc.cntct_addr_id=ca.addr_id)\n LEFT OUTER JOIN cntct bc ON (cust_cntct_id=bc.cntct_id)\n LEFT OUTER JOIN addr ba ON (bc.cntct_addr_id=ba.addr_id)\n WHERE (cust_id=<? value("cust_id") ?>);\n \n \n firstlastorderdate\n SELECT formatDate(MIN(cohist_invcdate)) AS firstdate,\n formatDate(MAX(cohist_invcdate)) AS lastdate\n FROM cohist\nWHERE (cohist_cust_id=<? value("cust_id") ?>);\n \n \n lysales\n SELECT formatMoney(COALESCE(SUM(round(cohist_qtyshipped * cohist_unitprice,2)), 0)) AS lysales FROM cohist WHERE ( (cohist_invcdate BETWEEN (DATE_TRUNC('year', CURRENT_TIMESTAMP) - INTERVAL '1 year') AND (DATE_TRUNC('year', CURRENT_TIMESTAMP) - INTERVAL '1 day')) AND (cohist_cust_id=<? value("cust_id") ?>) );\n \n \n ytdsales\n SELECT formatExtPrice(SUM(round(cohist_qtyshipped * cohist_unitprice,2))) AS ytdsales\n FROM cohist\n WHERE ((cohist_invcdate>=DATE_TRUNC('year', CURRENT_TIMESTAMP))\n AND (cohist_cust_id=<? value("cust_id") ?>) );\n \n \n backlog\n SELECT formatMoney( COALESCE( SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ), 0 ) ) AS backlog FROM cohead, coitem, itemsite, item WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (coitem_status='O') AND (cohead_cust_id=<? value("cust_id") ?>) );\n \n \n OpenBalance\n SELECT formatMoney( COALESCE( SUM( CASE WHEN (aropen_doctype IN ('I', 'D')) THEN (aropen_amount - aropen_paid) ELSE ((aropen_amount - aropen_paid) * -1) END ), 0 ) ) AS f_balance FROM aropen WHERE ( (aropen_open) AND (aropen_cust_id=<? value("cust_id") ?>) );\n \n \n LateBalance\n SELECT formatMoney( noNeg( COALESCE( SUM( CASE WHEN (aropen_doctype IN ('I', 'D')) THEN (aropen_amount - aropen_paid) ELSE ((aropen_amount - aropen_paid) * -1) END ), 0 ) ) ) AS f_balance FROM aropen WHERE ( (aropen_open) AND (aropen_duedate < CURRENT_DATE) AND (aropen_cust_id=<? value("cust_id") ?>) );\n\n \n \n Comments\n SELECT comment_source_id AS cust_id,\n comment_id,\n formatDate(comment_date) AS f_date,\n comment_user,\n comment_text\n FROM comment\n WHERE ( (comment_source='C')\n AND (comment_source_id=<? value("cust_id") ?>) )\nORDER BY comment_date;\n \n \n History\n SELECT aropen_cust_id AS cust_id,\n aropen_id AS aropenid, -1 AS applyid,\n aropen_docnumber AS sortnumber,\n aropen_docnumber AS docnumber,\n formatBoolYN(aropen_open) AS f_open,\n CASE WHEN (aropen_doctype='I') THEN text('Invoice')\n WHEN (aropen_doctype='C') THEN text('C/M')\n WHEN (aropen_doctype='D') THEN text('D/M')\n WHEN (aropen_doctype='R') THEN text('C/D')\n ELSE text('Other')\n END AS documenttype,\n formatDate(aropen_docdate) AS f_docdate,\n formatDate(aropen_duedate) AS f_duedate,\n formatMoney(aropen_amount) AS f_amount,\n formatMoney((aropen_amount - aropen_paid)) AS f_balance\nFROM aropen\nWHERE (aropen_cust_id=<? value("cust_id") ?>)\n\nUNION\nSELECT aropen_cust_id AS cust_id,\n -1 AS aropenid, arapply_source_aropen_id AS applyid,\n aropen_docnumber AS sortnumber,\n CASE WHEN (arapply_source_doctype='C') THEN arapply_source_docnumber\n WHEN (arapply_source_doctype='K') THEN arapply_refnumber\n ELSE :error\n END AS docnumber,\n '' AS f_open,\n CASE WHEN (arapply_source_doctype='C') THEN text('C/M')\n WHEN (arapply_fundstype='C') THEN text('Check')\n WHEN (arapply_fundstype='T') THEN text('Certified Check')\n WHEN (arapply_fundstype='M') THEN text('Master Card')\n WHEN (arapply_fundstype='V') THEN text('Visa')\n WHEN (arapply_fundstype='A') THEN text('American Express')\n WHEN (arapply_fundstype='D') THEN text('Discover Card')\n WHEN (arapply_fundstype='R') THEN text('Other Credit Card')\n WHEN (arapply_fundstype='K') THEN text('Cash')\n WHEN (arapply_fundstype='W') THEN text('Wire Transfer')\n WHEN (arapply_fundstype='O') THEN text('Other')\n END AS documenttype,\n formatDate(arapply_postdate) AS f_docdate,\n '' AS f_duedate,\n formatMoney(arapply_applied) AS f_amount,\n '' AS f_balance\nFROM arapply, aropen\nWHERE ( (arapply_target_doctype IN ('I', 'D'))\n AND (arapply_target_doctype=aropen_doctype)\n AND (arapply_target_docnumber=aropen_docnumber)\n AND (arapply_cust_id=<? value("cust_id") ?>)\n AND (aropen_cust_id=<? value("cust_id") ?>) )\n\nUNION\nSELECT aropen_cust_id AS cust_id,\n -1 AS aropenid, arapply_target_aropen_id AS applyid,\n aropen_docnumber AS sortnumber,\n arapply_target_docnumber AS docnumber,\n '' AS f_open,\n CASE WHEN (arapply_target_doctype='I') THEN text('Invoice')\n WHEN (arapply_target_doctype='D') THEN text('D/M')\n ELSE text('Other')\n END AS documenttype,\n formatDate(arapply_postdate) AS f_docdate,\n '' AS f_duedate,\n formatMoney(arapply_applied) AS f_amount,\n '' AS f_balance\nFROM arapply, aropen\nWHERE ( (arapply_source_doctype IN ('K', 'C'))\n AND (arapply_source_doctype=aropen_doctype)\n AND (arapply_source_docnumber=aropen_docnumber)\n AND (arapply_cust_id=<? value("cust_id") ?>)\n AND (aropen_cust_id=<? value("cust_id") ?>) )\n\nORDER BY sortnumber, applyid;\n \n \n 392\n \n \n \n 105\n 365\n 575\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_comments\n \n \n \n \n 105\n 305\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n firstlastorderdate\n firstdate\n \n \n \n \n 370\n 160\n 370\n 295\n 0\n \n \n 5\n 155\n 360\n 155\n 0\n \n \n \n \n 100\n 229\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_corrcontact\n \n \n \n \n 385\n 160\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_address1\n \n \n \n \n 100\n 260\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_corrfax\n \n \n \n \n \n 385\n 175\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_address2\n \n \n \n \n 10\n 204\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n corrcitystatezip\n \n \n \n \n 475\n 229\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_contact\n \n \n \n \n \n 385\n 190\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_address3\n \n \n \n \n \n 600\n 345\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_creditstatus\n \n \n \n 5\n 295\n 740\n 295\n 2\n \n \n \n \n \n 340\n 305\n 145\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n lysales\n lysales\n \n \n \n \n 600\n 325\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n LateBalance\n f_balance\n \n \n \n \n 475\n 275\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_email\n \n \n \n \n 100\n 275\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_corremail\n \n \n \n \n 475\n 260\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_fax\n \n \n \n \n \n 100\n 75\n 295\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_name\n \n \n \n \n 10\n 190\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_corraddress3\n \n \n \n \n \n 340\n 325\n 145\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n ytdsales\n ytdsales\n \n \n \n \n \n \n 475\n 245\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_phone\n \n \n \n \n 380\n 155\n 735\n 155\n 0\n \n \n \n \n \n \n 10\n 160\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_corraddress1\n \n \n \n \n 340\n 345\n 145\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n backlog\n backlog\n \n \n \n \n \n 10\n 175\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_corraddress2\n \n \n \n \n 100\n 245\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n cust_corrphone\n \n \n \n \n 105\n 325\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n firstlastorderdate\n lastdate\n \n \n \n \n 600\n 305\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n OpenBalance\n f_balance\n \n \n \n \n \n \n 100\n 95\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_number\n \n \n \n \n 385\n 204\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n citystatezip\n \n \n \n \n \n \n
\n Comments\n \n Head\n cust_id\n \n 46\n \n 55\n 40\n 745\n 40\n 0\n \n \n \n \n \n \n \n \n \n Comments\n \n 16\n \n \n 260\n 0\n 484\n 15\n \n 5\n \n Arial\n 8\n bold\n \n \n \n \n Comments\n comment_text\n \n \n \n \n 60\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Comments\n f_date\n \n \n \n \n 160\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Comments\n comment_user\n \n \n \n
\n
\n History\n \n Head\n cust_id\n \n 46\n \n \n \n \n \n \n \n \n \n 55\n 40\n 745\n 40\n 0\n \n \n \n \n \n History\n \n 16\n \n \n 60\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n History\n f_open\n \n \n \n \n 290\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n History\n f_docdate\n \n \n \n \n 210\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n History\n docnumber\n \n \n \n \n 380\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n History\n f_duedate\n \n \n \n \n 470\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n History\n f_amount\n \n \n \n \n 130\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n History\n documenttype\n \n \n \n \n 560\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n History\n f_balance\n \n \n \n
\n \n 18\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 270 CheckFormat \N \n\n Sample Check Format\n CheckFormat\n OpenMFG Sample A/P Check Format\n Letter\n \n 50\n 50\n 50\n 50\n \n Head\n SELECT vend_name,\n vend_address1,\n vend_address3,\n vend_address3,\n vend_city,\n vend_state,\n vend_zip,\n formatDate(apchk_checkdate) AS f_checkdate,\n formatMoney(apchk_amount) AS f_amount,\n spellAmount(apchk_amount) AS f_words,\n CASE WHEN(apchk_void) THEN text('V O I D')\n ELSE text('')\n END AS f_void,\n apchk_for\n FROM apchk, vend\n WHERE ( (apchk_vend_id=vend_id)\n AND (apchk_id=<? value("apchk_id") ?>) );\n \n \n Detail\n SELECT apchkitem_invcnumber, apchkitem_ponumber,\n formatMoney(apchkitem_amount) AS f_amount\nFROM apchkitem\nWHERE (apchkitem_apchk_id=%1)\nORDER BY apchkitem_invcnumber;\n \n \n \n 197\n \n \n \n \n \n \n 300\n 75\n 150\n 40\n \n \n Arial\n 18\n bold\n \n \n \n \n Head\n f_void\n \n \n \n \n 60\n 30\n 150\n 40\n \n \n Arial\n 18\n bold\n \n \n \n \n Head\n f_void\n \n \n \n \n \n 60\n 155\n 325\n 20\n \n \n Helvetica\n 12\n normal\n \n \n \n \n Head\n apchk_for\n \n \n \n \n 555\n 30\n 150\n 40\n \n \n Arial\n 18\n bold\n \n \n \n \n Head\n f_void\n \n \n \n \n 60\n 120\n 150\n 40\n \n \n Arial\n 18\n bold\n \n \n \n \n Head\n f_void\n \n \n \n \n 85\n 75\n 185\n 20\n \n \n Helvetica\n 12\n normal\n \n \n \n \n Head\n vend_name\n \n \n \n \n 555\n 20\n 121\n 20\n \n \n Helvetica\n 12\n normal\n \n \n \n \n Head\n f_checkdate\n \n \n \n \n 45\n 100\n 675\n 20\n \n \n Helvetica\n 12\n normal\n \n \n \n \n Head\n f_words\n \n \n \n \n 555\n 120\n 150\n 40\n \n \n Arial\n 18\n bold\n \n \n \n \n Head\n f_void\n \n \n \n \n 555\n 75\n 150\n 20\n \n \n Helvetica\n 12\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n
\n Apchkitem\n \n \n Detail\n \n 22\n \n \n 509\n 0\n 100\n 20\n \n \n Helvetica [Urw]\n 10\n normal\n \n \n \n \n Detail\n f_amount\n \n \n \n \n 390\n 0\n 100\n 20\n \n \n Helvetica [Urw]\n 10\n normal\n \n \n \n \n Detail\n apchkitem_ponumber\n \n \n \n \n 270\n 0\n 100\n 20\n \n \n Helvetica [Urw]\n 10\n normal\n \n \n \n \n Detail\n apchkitem_invcnumber\n \n \n \n
\n
\n OpenMFG Sample A/P Check Format 0 2004-08-26 10:48:34.979983 215 ExpiredInventoryByClassCode \N \n\n Expired Inventory By Class Code\n ExpiredInventoryByClassCode\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n (SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Warehouses')\n <? endif ?>\n AS warehouse,\n <? if exists("classcode_id") ?>\n (SELECT (classcode_code || '-' || classcode_descrip)\n FROM classcode\n WHERE (classcode_id=<? value("classcode_id") ?>) )\n <? elseif exists("classcode_pattern") ?>\n text(<? value("classcode_pattern") ?>)\n <? else ?>\n text('All Class Codes')\n <? endif ?>\n AS classcode,\n <? if exists("perishability") ?> \n 'Perishability'\n <? else ?>\n 'Warranty'\n <? endif ?> AS expiretype,\n <? if exists("showValue") ?>\n <? if exists("useActualCosts") ?>\n text('Show Inventory Value with Actual Costs')\n <? elseif exists("useStandardCosts") ?>\n text('Show Inventory Value with Standard Costs')\n <? else ?>\n text('Show Inventory Value with Posted Costs')\n <? endif ?>\n AS showvalues,\n text('Unit Cost') AS f_unitcost,\n text('Value') AS f_value,\n <? else ?>\n text('') AS showvalues,\n text('') AS f_unitcost,\n text('') AS f_value,\n <? endif ?>\n int4(<? value("thresholdDays") ?>) AS f_thresholddays;\n \n \n detail\n SELECT warehous_code,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n ls_number AS itemloc_lotserial,\n formatQty(itemloc_qty) AS f_qoh,\n formatDate(itemloc_expiration) AS f_expiration,\n <? if exists("showValue") ?>\n formatCost(cost)\n <? else ?>\n text('')\n <? endif ?>\n AS f_unitcost,\n noNeg(cost * itemloc_qty) AS value,\n <? if exists("showValue") ?>\n formatExtPrice(noNeg(cost * itemloc_qty))\n <? else ?>\n text('')\n <? endif ?>\n AS f_value\n FROM ( SELECT itemsite_id,\n warehous_code,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n ls_number,\n itemloc_qty,\n<? if exists("perishability") ?>\n itemloc_expiration,\n<? elseif exists("warranty") ?>\n itemloc_warrpurc AS itemloc_expiration,\n<? endif ?>\n <? if exists("useActualCosts") ?>\n actcost(itemsite_item_id)\n <? elseif exists("useStandardCosts") ?>\n stdcost(itemsite_item_id)\n <? else ?>\n (itemsite_value / CASE WHEN(itemsite_qtyonhand=0) THEN 1 ELSE itemsite_qtyonhand END)\n <? endif ?>\n AS cost\n FROM itemloc, itemsite, item, whsinfo, uom, ls\n WHERE ((itemloc_itemsite_id=itemsite_id)\n AND (itemloc_ls_id=ls_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n<? if exists("perishability") ?>\n AND (itemsite_perishable)\n AND (itemloc_expiration < (CURRENT_DATE + <? value("thresholdDays") ?>))\n<? elseif exists("warranty") ?>\n AND (itemsite_warrpurc)\n AND (itemloc_warrpurc < (CURRENT_DATE + <? value("thresholdDays") ?>))\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE classcode_code ~ <? value("classcode_pattern") ?>) )\n<? endif ?>\n )\n ) AS data\nORDER BY warehous_code,\n<? if exists("orderByInventoryValue") ?>\n value DESC\n<? elseif exists("orderByExpirationDate") ?>\n itemloc_expiration\n<? else ?>\n item_number\n<? endif ?>\n \n \n 237\n \n \n \n \n 440\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showvalues\n \n \n \n \n 575\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_unitcost\n \n \n \n \n \n \n \n \n \n \n \n 130\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 660\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_value\n \n \n \n 5\n 227\n 745\n 227\n 2\n \n \n \n 130\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n classcode\n \n \n \n \n \n \n 130\n 160\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n expiretype\n \n \n \n \n \n 540\n 120\n 195\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_thresholddays\n \n \n \n \n \n 6\n \n \n 42\n \n 5\n 35\n 745\n 32\n 2\n \n \n \n \n \n \n 660\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_value\n \n \n \n \n \n \n \n \n 575\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_unitcost\n \n \n \n
\n detail\n \n \n detail\n \n 52\n \n \n 350\n 15\n 135\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_expiration\n \n \n \n \n 102\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n \n \n \n 25\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n \n 265\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 575\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unitcost\n \n \n \n \n 102\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 102\n 15\n 240\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 350\n 0\n 135\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemloc_lotserial\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 375 FinancialReportMonth \N \n\n Financial Report Month\n FinancialReportMonth\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n -- Group: financialReport\n-- Name: detail\n-- Notes: \nSELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_month <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 167\n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n 3.55207\n 162.602\n 746.627\n 162.602\n 2\n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n \n \n 590.695\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 590\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 670\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n \n 4\n \n \n 37\n \n \n 590\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 2.82852\n 30.1086\n 747.989\n 30.1086\n 2\n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 390\n 0\n 750\n 0\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_month\n \n \n \n \n 25\n 0\n 550\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthprcnt\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 378 FinancialReportMonthPriorYear \N \n\n Financial Report Month and Prior Year\n FinancialReportMonthPriorYear\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_typedescrip2 || ' Diff.' AS f_diff,\n flstmthead_typedescrip2 || ' % Diff.' AS f_diffprcnt,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_month <> 0) OR (flstmtitem_pryear <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 169\n \n \n \n 660\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n 380\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n 0.998194\n 160\n 750\n 160\n 2\n \n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n \n 500\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 380\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 580\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n 500\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 580\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 660\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 6\n \n \n 39\n \n \n 380\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 660\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n 500\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n 1.55252\n 30\n 751\n 30\n 2\n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 6\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 21\n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_pryeardiffprcnt\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_pryeardiff\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_pryear\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_month\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 24\n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 9\n \n
\n \N 0 2013-07-26 16:14:22.271087 379 FinancialReportMonthQuarter \N \n\n Financial Report Month and Quarter\n FinancialReportMonthQuarter\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_month <> 0) OR (flstmtitem_qtr <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 167\n \n \n 0.00540306\n 162.686\n 749.477\n 162.686\n 2\n \n \n \n 580\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 380\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 380\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 459\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n \n \n 580\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n \n 660\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 4\n \n \n 37\n \n \n 380\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n 0.393337\n 30\n 750\n 30\n 2\n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n 459\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtrprcnt\n \n \n \n \n 459\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthprcnt\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtr\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_month\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 374 FinancialReportMonthYear \N \n\n Financial Report Month and Year\n FinancialReportMonthYear\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_month <> 0) OR (flstmtitem_year <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 166\n \n \n 380\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n 660\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n \n 100\n 80\n 460\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n \n 2.08287\n 160\n 748\n 160\n 2\n \n \n \n 580\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 460\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 380\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 100\n 100\n 460\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n 580\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 3\n \n \n 36\n \n \n 460\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 380\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n 1.43183\n 30.3326\n 748.17\n 30.3326\n 2\n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 3\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 18\n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_yearprcnt\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_year\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_month\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 460\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthprcnt\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 21\n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 6\n \n
\n \N 0 2013-07-26 16:14:22.271087 135 PlannedRevenueExpensesByPlannerCode \N \n\n Planned Revenue/Expenses by Planner Code\n PlannedRevenueExpensesByPlannerCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("plancode_id") ?>\n ( SELECT (plancode_code || '-' || plancode_name)\n FROM plancode\n WHERE (plancode_id=<? value("plancode_id") ?>) )\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plannercode,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM warehous\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Warehouses')\n <? endif ?>\n AS warehouse,\n <? if exists("useActualCost") ?>\n text('Actual Cost')\n <? else ?>\n text('Standard Cost')\n <? endif ?>\n AS costs,\n <? if exists("useAveragePrice") ?>\n text('Average Price from ')||formatDate(<? value("startEvalDate") ?>)||text(' to ')||formatDate(<? value("endEvalDate") ?>)\n <? else ?>\n text('List Price')\n <? endif ?>\n AS salesprice,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate;\n \n \n detail\n schedule\n plannedorders\n \n \n 221\n \n \n \n \n \n \n 140\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n 560\n 60\n 120\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n 135\n 135\n 500\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n salesprice\n \n \n \n \n 140\n 60\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plannercode\n \n \n \n \n \n 560\n 80\n 120\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n 135\n 112\n 120\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n costs\n \n \n \n \n \n \n \n \n 7\n \n \n 42\n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 57\n \n \n 455\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_firm\n \n \n \n \n 285\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_profit\n \n \n \n \n 370\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 500\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_plocost\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_plorevenue\n \n \n \n \n 90\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordtype\n \n \n \n \n 130\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip\n \n \n \n \n 5\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordernum\n \n \n \n \n 90\n 15\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 130\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 90\n 30\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n supply_warehous_code\n \n \n \n
\n \n 17\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 17\n \n \n 500\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n plocost\n \n extprice\n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n plorevenue\n \n extprice\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n profit\n \n qty\n \n \n
\n \N 0 2009-08-13 10:57:41.889738 329 Planning Schedules \N \n\n Planning Schedules\n Planning Schedules\n List of Planning Schedules and the items on them.\n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT \n pschhead_number,\n pschhead_descrip,\n formatdate(pschhead_start_date) AS pschhead_start_date,\n formatdate(pschhead_end_date) AS pschhead_end_date,\n pschhead_status ,\n formatdate(pschhead_created) AS pschhead_created,\n pschhead_creator,\n\n text(pschitem_linenumber) AS pschitem_linenumber,\n text(pschitem_scheddate) AS pschitem_scheddate,\n text(pschitem_qty) AS pschitem_qty,\n pschitem_status,\n text(formatdate(pschitem_created)) AS pschitem_created,\n pschitem_creator,\n\n item_number,\n item_descrip1,\n item_descrip2,\n\n warehous_code\n \nFROM \n item,\n itemsite,\n warehous,\n pschhead LEFT OUTER JOIN pschitem ON pschhead_id = pschitem_pschhead_id \nWHERE \n pschitem_itemsite_id = itemsite_id\n AND itemsite_item_id = item_id\n AND itemsite_warehous_id = warehous_id\n----------------------\nUNION\n----------------------\nSELECT \n pschhead_number,\n pschhead_descrip,\n formatdate(pschhead_start_date) AS pschhead_start_date,\n formatdate(pschhead_end_date) AS pschhead_end_date,\n pschhead_status ,\n formatdate(pschhead_created) AS pschhead_created,\n pschhead_creator,\n\n text(' ') AS pschitem_linenumber,\n text(' ') AS line_date,\n text(' ') AS pschitem_qty,\n text(' ') AS pschitem_status,\n text(' ') AS pschitem_created,\n text(' ') AS pschitem_creator,\n\n text('No Items Assigned') AS item_number,\n text(' ') AS item_descrip1,\n text(' ') AS item_descrip2,\n\n warehous_code\n \nFROM \n warehous,\n pschhead LEFT OUTER JOIN pschitem ON pschhead_id = pschitem_pschhead_id \nWHERE \n pschitem_pschhead_id IS NULL\n AND pschhead_warehous_id = warehous_id\n\nORDER BY warehous_code, pschhead_status DESC, pschhead_number, item_number, pschitem_scheddate ;\n \n \n 82\n \n \n
\n schedule\n \n schedule\n pschhead_number\n \n 114\n \n \n 150\n 10\n 360\n 16\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n pschhead_number\n \n \n \n \n 150\n 40\n 360\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschhead_creator\n \n \n \n \n \n \n \n \n 770\n 55\n 130\n 18\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n warehous_code\n \n \n \n \n \n \n 770\n 25\n 130\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschhead_start_date\n \n \n \n \n 770\n 40\n 130\n 18\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschhead_end_date\n \n \n \n 0\n 110\n 993\n 110\n 0\n \n \n \n \n 0\n 5\n 993\n 5\n 2\n \n \n \n 770\n 10\n 130\n 16\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n pschhead_status\n \n \n \n \n 150\n 55\n 360\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschhead_created\n \n \n \n \n \n \n 150\n 25\n 360\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschhead_descrip\n \n \n \n \n \n \n \n \n \n 47\n \n 0\n 10\n 993\n 10\n 2\n \n \n \n \n \n detail\n \n 21\n \n \n 375\n 0\n 190\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 864\n 0\n 30\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschitem_status\n \n \n \n \n 665\n 0\n 70\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschitem_creator\n \n \n \n \n 570\n 0\n 85\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschitem_created\n \n \n \n \n 150\n 0\n 220\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 5\n 0\n 140\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n item_number\n \n \n \n \n 893\n 0\n 95\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschitem_qty\n \n \n \n \n 765\n 0\n 90\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n pschitem_scheddate\n \n \n \n
\n \n 71\n \n \n \n 935\n 5\n 60\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 110\n 5\n 180\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n List of Planning Schedules and the items on them. 0 2006-10-13 14:38:21.066 297 AdjustmentTypes \N \n\n Adjustment Types\n AdjustmentTypes\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT bankadjtype_name, bankadjtype_descrip,\n formatGLAccountLong(bankadjtype_accnt_id) AS f_accnt,\n CASE WHEN(bankadjtype_iscredit) THEN text('Credit')\n ELSE text('Debit')\n END AS f_type\n FROM bankadjtype;\n \n \n 121\n \n \n \n \n 5\n 115\n 745\n 115\n 2\n \n \n \n \n \n \n 9\n \n \n 36\n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 5\n 0\n 155\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bankadjtype_name\n \n \n \n \n 165\n 0\n 170\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bankadjtype_descrip\n \n \n \n \n 340\n 0\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_accnt\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n
\n \n 18\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 277 CheckRegister \N \n\n Check Register\n CheckRegister\n \n \n \n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT bankaccnt_name,\n bankaccnt_descrip,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n curr_symbol\n FROM bankaccnt, curr_symbol\n WHERE ((bankaccnt_id=<? value("bankaccnt_id") ?>)\n AND (bankaccnt_curr_id = curr_id));\n \n \n detail\n SELECT checkhead_id AS checkid,\n CASE WHEN(checkhead_void) THEN -1\n WHEN(checkhead_posted) THEN 1\n ELSE 0\n END AS extra,\n -1 AS checkitem_id,\n formatBoolYN(checkhead_void) AS f_void,\n formatBoolYN(checkhead_misc) AS f_misc,\n formatBoolYN(checkhead_printed) AS f_printed,\n formatBoolYN(checkhead_posted) AS f_posted,\n CASE when checkhead_number = -1 THEN\n 'Unspecified'\n ELSE TEXT(checkhead_number) END AS number,\n COALESCE(checkrecip_number || '-' || checkrecip_name,\n\t\tcheckhead_recip_type || '-' || checkhead_recip_id ) AS description,\n formatDate(checkhead_checkdate) AS f_checkdate,\n formatMoney(checkhead_amount) AS f_amount, \n currConcat(checkhead_curr_id) AS currAbbr,\n checkhead_number,\n checkhead_ach_batch,\n 1 AS orderby\n FROM checkhead LEFT OUTER JOIN\n checkrecip ON ((checkhead_recip_id=checkrecip_id)\n\t\t AND (checkhead_recip_type=checkrecip_type))\n WHERE ((checkhead_checkdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n AND (checkhead_bankaccnt_id=<? value("bankaccnt_id") ?>)\n <? if exists("check_number") ?>\n AND (CAST(checkhead_number AS text) ~ <? value("check_number") ?>)\n <? endif ?>\n <? if exists("recip") ?>\n <? if exists("recip_type_v") ?>\n\t AND (checkhead_recip_type = 'V' )\n <? endif ?>\n <? if exists("recip_type_c") ?>\n\t AND (checkhead_recip_type = 'C' )\n <? endif ?>\n <? if exists("recip_type_t") ?>\n\t AND (checkhead_recip_type = 'T' )\n <? endif ?>\n <? if exists("recip_id") ?>\n\t AND (checkhead_recip_id = <? value("recip_id") ?> )\n <? endif ?>\n <? endif ?> \n )\n<? if exists("showDetail") ?>\nUNION\nSELECT checkitem_checkhead_id AS checkid, 0 AS extra, checkitem_id,\n '' AS f_void, '' AS f_misc, '' AS f_printed, '' AS f_posted,\n checkitem_vouchernumber AS number,\n checkitem_invcnumber AS description,\n '' AS f_checkdate,\n formatMoney(checkitem_amount) AS f_amount,\n currConcat(checkitem_curr_id) AS currAbbr, \n checkhead_number, \n NULL,\n 2 AS orderby \n FROM checkitem, checkhead \n WHERE ( (checkitem_checkhead_id=checkhead_id)\n AND (checkhead_checkdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n AND (checkhead_bankaccnt_id=<? value("bankaccnt_id") ?>)\n <? if exists("check_number") ?>\n AND (CAST(checkhead_number AS text) ~ <? value("check_number") ?>)\n <? endif ?>\n <? if exists("recip") ?>\n <? if exists("recip_type_v") ?>\n AND (checkhead_recip_type = 'V' )\n <? endif ?>\n <? if exists("recip_type_c") ?>\n AND (checkhead_recip_type = 'C' )\n <? endif ?>\n <? if exists("recip_type_t") ?>\n AND (checkhead_recip_type = 'T' )\n <? endif ?>\n <? if exists("recip_id") ?>\n AND (checkhead_recip_id = <? value("recip_id") ?> )\n <? endif ?>\n <? endif ?> )\n<? endif ?>\n ORDER BY checkhead_number, checkid, orderby;\n \n \n total\n SELECT formatMoney(SUM(currToCurr(checkhead_curr_id, bankaccnt_curr_id, checkhead_amount, checkhead_checkdate))) AS f_amount,\n currConcat(bankaccnt_curr_id) AS currAbbr\n FROM checkhead, checkrecip, bankaccnt\n WHERE ( (checkhead_recip_id=checkrecip_id)\n AND (checkhead_recip_type=checkrecip_type)\n AND (NOT checkhead_void)\n AND (checkhead_checkdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n AND (checkhead_bankaccnt_id=bankaccnt_id)\n AND (checkhead_bankaccnt_id=<? value("bankaccnt_id") ?>)\n <? if exists("check_number") ?>\n AND (CAST(checkhead_number AS text) ~ <? value("check_number") ?>)\n <? endif ?>\n <? if exists("recip") ?>\n <? if exists("recip_type_v") ?>\n AND (checkhead_recip_type = 'V' )\n <? endif ?>\n <? if exists("recip_type_c") ?>\n AND (checkhead_recip_type = 'C' )\n <? endif ?>\n <? if exists("recip_type_t") ?>\n AND (checkhead_recip_type = 'T' )\n <? endif ?>\n <? if exists("recip_id") ?>\n AND (checkhead_recip_id = <? value("recip_id") ?> )\n <? endif ?>\n <? endif ?> )\nGROUP BY bankaccnt_curr_id;\n \n \n 168\n \n \n 550\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n 140\n 65\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n bankaccnt_name\n \n \n \n \n \n \n 550\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 140\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n bankaccnt_descrip\n \n \n \n \n \n 5\n 155\n 745\n 155\n 2\n \n \n \n \n \n \n \n \n \n \n 12\n \n \n 28\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 31\n \n \n 111\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_printed\n \n \n \n \n 560\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_checkdate\n \n \n \n \n 170\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_void\n \n \n \n \n 330\n 0\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n description\n \n \n \n \n 225\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n checkhead_ach_batch\n \n \n \n \n 225\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n number\n \n \n \n \n 750\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currAbbr\n \n \n \n \n 60\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_misc\n \n \n \n \n 655\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n
\n \n 28\n \n \n \n 101\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 28\n \n 565\n 0\n 745\n 0\n 0\n \n \n \n 750\n 0\n 35\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n curr_symbol\n \n \n \n \n 655\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_amount\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 474 InventoryAvailability \N \n\n Inventory Availability\n InventoryAvailability\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("byDays") ?>\n (text('Look ahead ') || text(<? value("byDays") ?>) || text(' days'))\n <? elseif exists("byDate") ?>\n (text('Cutoff date ') || formatDate(<? value("byDate") ?>))\n <? elseif exists("byDates") ?>\n (text('Dates from ') || formatDate(<? value("startDate") ?>) || text(' to ') || formatDate(<? value("endDate") ?>))\n <? else ?>\n text('Item Site Lead Time')\n <? endif ?>\n AS ltcriteria;\n \n \n detail\n SELECT item_number, item_descrip1, item_descrip2,\n warehous_code, itemsite_leadtime,\n formatQty(qtyonhand) AS f_qtyonhand,\n formatQty(noNeg(qtyonhand - allocated)) AS f_unallocated,\n formatQty(noNeg(allocated)) AS f_allocated,\n formatQty(ordered) AS f_ordered,\n formatQty(requests) AS f_requests,\n formatQty(reorderlevel) AS f_reorderlevel,\n (qtyonhand - allocated + ordered) AS available,\n formatQty(qtyonhand - allocated + ordered) AS f_available\n FROM (SELECT \n <? if reExists("[vV]end") ?>\n DISTINCT\n <? endif ?>\n itemsite_id,\n CASE WHEN (item_type IN ('P', 'O')) THEN 1\n WHEN (item_type IN ('M')) THEN 2\n ELSE 0\n END AS altId,\n item_number, item_descrip1, item_descrip2, item_inv_uom_id,\n warehous_id, warehous_code, itemsite_leadtime,\n itemsite_qtyonhand AS qtyonhand,\n CASE WHEN itemsite_useparams THEN itemsite_reorderlevel\n ELSE 0.0\n END AS reorderlevel,\n CASE WHEN itemsite_useparams THEN itemsite_ordertoqty\n ELSE 0.0\n END AS outlevel,\n <? if exists("byVend") ?>\n vend_number,\n <? else ?>\n NULL AS vend_number,\n <? endif ?>\n <? if exists("byLeadTime") ?>\n qtyAllocated(itemsite_id, itemsite_leadtime) AS allocated,\n qtyOrdered(itemsite_id, itemsite_leadtime) AS ordered, \n qtypr(itemsite_id, itemsite_leadtime) AS requests\n <? elseif exists("byDays") ?>\n qtyAllocated(itemsite_id, CAST(<? value("byDays") ?> AS INTEGER)) AS allocated,\n qtyOrdered(itemsite_id, CAST(<? value("byDays") ?> AS INTEGER)) AS ordered,\n qtypr(itemsite_id, CAST(<? value("byDays") ?> AS INTEGER)) AS requests \n <? elseif exists("byDate") ?>\n qtyAllocated(itemsite_id, (<? value("byDate") ?> - CURRENT_DATE)) AS allocated,\n qtyOrdered(itemsite_id, (<? value("byDate") ?> - CURRENT_DATE)) AS ordered,\n qtypr(itemsite_id, (<? value("byDate") ?> - CURRENT_DATE)) AS requests \n <? elseif exists("byDates") ?>\n qtyAllocated(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS allocated,\n qtyOrdered(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS ordered,\n qtypr(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS requests\n <? endif ?>\n FROM item, itemsite, whsinfo\n <? if reExists("[vV]end") ?>\n , vendinfo JOIN itemsrc ON (itemsrc_vend_id=vend_id)\n <? endif ?>\n WHERE ( (itemsite_active)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n <? if exists("warehous_id") ?>\n AND (warehous_id=<? value("warehous_id") ?>)\n <? endif ?>\n <? if exists("item_id") ?>\n AND (item_id=<? value("item_id") ?>)\n <? elseif exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n <? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n <? elseif exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n <? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n <? elseif exists("itemgrp_id") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem\n WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n <? elseif exists("itemgrp_pattern") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n AND (itemgrp_name ~ <? value("itemgrp_pattern") ?>) ) ))\n <? elseif exists("itemgrp") ?>\n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n <? endif ?>\n <? if reExists("[vV]end") ?>\n AND (itemsrc_item_id=item_id)\n <? endif ?>\n <? if exists("vend_id") ?>\n AND (vend_id=<? value("vend_id") ?>)\n <? elseif exists("vendtype_id") ?>\n AND (vend_vendtype_id=<? value("vendtype_id") ?>)\n <? elseif exists("vendtype_pattern") ?>\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ <? value("vendtype_pattern") ?>)))\n <? endif ?>\n ) ) AS data\n<? if exists("showReorder") ?>\n WHERE ( ((qtyonhand - allocated + ordered) <= reorderlevel)\n <? if exists("ignoreReorderAtZero") ?>\n AND (NOT ( ((qtyonhand - allocated + ordered) = 0) AND (reorderlevel = 0)) )\n <? endif ?>\n )\n<? elseif exists("showShortages") ?>\n WHERE ((qtyonhand - allocated + ordered) < 0)\n<? endif ?>\nORDER BY item_number, warehous_code DESC;\n \n \n 221\n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n \n \n \n 140\n 43\n 280\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n ltcriteria\n \n \n \n \n \n 10\n 63\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 330\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyonhand\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_available\n \n \n \n \n 65\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 434\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_allocated\n \n \n \n \n 10\n 15\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_leadtime\n \n \n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 65\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 65\n 30\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 434\n 30\n 100\n 16\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unallocated\n \n \n \n \n 540\n 31\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_reorderlevel\n \n \n \n \n 540\n 14\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_requests\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 406 InventoryAvailabilityByCustomerType \N \n\n Inventory Availability by Customer Type\n InventoryAvailabilityByCustomerType\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? if exists("onlyShowShortages") ?>\n text('Only Showing Shortages')\n <? else ?>\n text('')\n <? endif ?>\n AS f_onlyShowShortages,\n <? if exists("showWoSupply") ?>\n text('Show W/O Supply')\n <? else ?>\n text('')\n <? endif ?>\n AS f_showWoSupply,\n<? if exists("custtype_id") ?>\n (SELECT custtype_code from custtype where (custtype_id=<? value("custtype_id") ?>))\n<? elseif exists("custtype_pattern") ?>\n <? value("custtype_pattern") ?>\n<? else ?>\n text('All Customer Types')\n<? endif ?>\n AS f_custtype;\n \n \n detail\n SELECT itemsite_id, coitem_id,\n cohead_id, cohead_number, (cust_number||'-'||cust_name) AS custname,\n item_number, item_description, uom_name, item_picklist,\n qoh, formatQty(qoh) AS f_qoh,sobalance,\n formatQty(sobalance) AS f_sobalance,\n formatQty(allocated) AS f_allocated,\n ordered, formatQty(ordered) AS f_ordered,\n (qoh + ordered - sobalance) AS woavail,\n<? if exists("useReservationNetting") ?>\n formatQty(coitem_qtyreserved) AS f_soavail,\n<? else ?>\n formatQty(qoh + ordered - sobalance) AS f_soavail,\n<? endif ?>\n (qoh + ordered - allocated) AS totalavail,\n formatQty(qoh + ordered - allocated) AS f_totalavail,\n atshipping,formatQty(atshipping) AS f_atshipping,\n reorderlevel \n<? if exists(showWoSupply) ?>, \n wo_id,\n wo_status,\n wo_number,\n wo_ordered,\n CASE WHEN (wo_id = -1) THEN NULL ELSE formatQty(wo_ordered) END AS f_wo_ordered,\n formatdate(wo_startdate) AS f_wo_startdate, \n formatdate(wo_duedate) AS f_wo_duedate,\n COALESCE(wo_latestart,false) AS wo_latestart,\n COALESCE(wo_latedue,false) AS wo_latedue \n<? endif ?>\n FROM ( SELECT itemsite_id, coitem_id,\n cohead_id, cohead_number, cust_number, cust_name,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS item_description,\n uom_name, item_picklist,\n noNeg(itemsite_qtyonhand) AS qoh,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS sobalance,\n qtyAllocated(itemsite_id, coitem_scheddate) AS allocated,\n qtyOrdered(itemsite_id, coitem_scheddate) AS ordered,\n qtyatshipping(coitem_id) AS atshipping,\n coitem_qtyreserved,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel \n<? if exists(showWoSupply) ?>, \n COALESCE(wo_id,-1) AS wo_id,\n formatwonumber(wo_id) AS wo_number,\n noNeg((wo_qtyord-wo_qtyrcv)) AS wo_ordered,\n wo_status, wo_startdate, wo_duedate,\n ((wo_startdate <= CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) AS wo_latestart,\n (wo_duedate<=CURRENT_DATE) AS wo_latedue \n<? endif ?> \n FROM cohead, itemsite, item, uom, custinfo, coitem\n<? if exists(showWoSupply) ?> \n LEFT OUTER JOIN wo\n ON ((coitem_itemsite_id=wo_itemsite_id)\n AND (wo_status IN ('E','R','I'))\n AND (wo_qtyord-wo_qtyrcv > 0)\n AND (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned-qtyatshipping(coitem_id)) > \n (SELECT itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=coitem_itemsite_id))))\n<? endif ?>\n WHERE((coitem_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (coitem_status NOT IN ('C', 'X'))\n<? if exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id\n FROM custtype\n WHERE(custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n )\n ) AS data \n<? if exists(onlyShowShortages) ?>\n WHERE ( ((qoh + ordered - allocated) < 0)\n OR ((qoh + ordered - sobalance) < 0) ) \n<? endif ?>\n ORDER BY cohead_id, cohead_number, item_number\n<? if exists(showWoSupply) ?> ,\n wo_duedate\n<? endif ?>\n;\n \n \n 251\n \n \n \n 360\n 120\n 380\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showWoSupply\n \n \n \n \n 10\n 245\n 750\n 245\n 2\n \n \n \n \n \n 140\n 100\n 209\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_custtype\n \n \n \n \n \n \n \n 360\n 100\n 380\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_onlyShowShortages\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n cohead\n cohead_id\n \n 26\n \n \n \n 390\n 0\n 209\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n custname\n \n \n \n \n \n 65\n 0\n 209\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n \n 6\n \n 5\n 0\n 745\n 0\n 0\n \n \n \n \n \n detail\n \n 46\n \n \n 640\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_totalavail\n \n \n \n \n 25\n 30\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wo_number\n \n \n \n \n 535\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 10\n 15\n 400\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n Item_description\n \n \n \n \n 640\n 30\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_wo_duedate\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n Item_number\n \n \n \n \n 430\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_sobalance\n \n \n \n \n 185\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 185\n 30\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wo_status\n \n \n \n \n 640\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_soavail\n \n \n \n \n 430\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_allocated\n \n \n \n \n 430\n 30\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_wo_ordered\n \n \n \n \n 325\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n \n 535\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_atshipping\n \n \n \n \n 535\n 30\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_wo_startdate\n \n \n \n
\n \n 18\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 244 InventoryAvailabilityBySalesOrder \N \n\n Inventory Availability by Sales Order\n InventoryAvailabilityBySalesOrder\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT cohead_number,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_custponumber,\n cust_name,\n cntct_phone AS cust_phone,\n <? if exists("onlyShowShortages") ?>\n text('Only Showing Shortages')\n <? else ?>\n text('')\n <? endif ?>\n AS f_onlyShowShortages,\n <? if exists("showWoSupply") ?>\n text('Show W/O Supply')\n <? else ?>\n text('')\n <? endif ?>\n AS f_showWoSupply\n FROM cohead, custinfo\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n WHERE ((cohead_cust_id=cust_id)\n AND (cohead_id=<? value("sohead_id") ?>) );\n \n \n detail\n SELECT itemsite_id, coitem_id,\n item_number, item_description, uom_name, item_picklist,\n qoh, formatQty(qoh) AS f_qoh,sobalance,\n formatQty(sobalance) AS f_sobalance,\n formatQty(allocated) AS f_allocated,\n ordered, formatQty(ordered) AS f_ordered,\n (qoh + ordered - sobalance) AS woavail,\n formatQty(qoh + ordered - sobalance) AS f_soavail,\n (qoh + ordered - allocated) AS totalavail,\n formatQty(qoh + ordered - allocated) AS f_totalavail,\n atshipping,formatQty(atshipping) AS f_atshipping,\n reorderlevel \n <? if exists(showWoSupply) ?>, \n wo_id,\n wo_status,\n wo_number,\n wo_ordered,\n CASE WHEN (wo_id = -1) THEN NULL ELSE formatQty(wo_ordered) END AS f_wo_ordered,\n formatdate(wo_startdate) AS f_wo_startdate, \n formatdate(wo_duedate) AS f_wo_duedate,\n COALESCE(wo_latestart,false) AS wo_latestart,\n COALESCE(wo_latedue,false) AS wo_latedue \n <? endif ?>\n FROM ( SELECT itemsite_id, coitem_id,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS item_description,\n uom_name, item_picklist,\n noNeg(itemsite_qtyonhand) AS qoh,\n noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS sobalance,\n qtyAllocated(itemsite_id, coitem_scheddate) AS allocated,\n qtyOrdered(itemsite_id, coitem_scheddate) AS ordered,\n qtyatshipping(coitem_id) AS atshipping,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel \n <? if exists(showWoSupply) ?>, \n COALESCE(wo_id,-1) AS wo_id,\n formatwonumber(wo_id) AS wo_number,\n noNeg((wo_qtyord-wo_qtyrcv)) AS wo_ordered,\n wo_status, wo_startdate, wo_duedate,\n ((wo_startdate <= CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) AS wo_latestart,\n (wo_duedate<=CURRENT_DATE) AS wo_latedue \n <? endif ?> \n FROM cohead, itemsite, item, uom, coitem \n <? if exists(showWoSupply) ?> \n LEFT OUTER JOIN wo\n ON ((coitem_itemsite_id=wo_itemsite_id)\n AND (wo_status IN ('E','R','I'))\n AND (wo_qtyord-wo_qtyrcv > 0)\n AND (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned-qtyatshipping(coitem_id)) > \n (SELECT itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=coitem_itemsite_id))))\n <? endif ?>\n WHERE ( (coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (coitem_status NOT IN ('C', 'X'))\n AND (cohead_id=<? value(sohead_id) ?>))\n ) AS data \n\t <? if exists(onlyShowShortages) ?>\n WHERE ( ((qoh + ordered - allocated) < 0)\n OR ((qoh + ordered - sobalance) < 0) ) \n <? endif ?>\n ORDER BY item_number\n <? if exists(showWoSupply) ?> ,\n wo_duedate\n <? endif ?>\n ;\n \n \n 251\n \n \n \n \n \n \n \n \n \n \n 385\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n \n \n \n \n 360\n 175\n 380\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showWoSupply\n \n \n \n \n \n 10\n 245\n 750\n 245\n 2\n \n \n \n 140\n 100\n 125\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_number\n \n \n \n \n \n 385\n 100\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_name\n \n \n \n \n \n \n 385\n 120\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_phone\n \n \n \n \n 360\n 160\n 380\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_onlyShowShortages\n \n \n \n \n 140\n 120\n 125\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n orderdate\n \n \n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n
\n detail\n \n coitem\n coitem_id\n \n 31\n \n \n 430\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_allocated\n \n \n \n \n 325\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n \n 185\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 640\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_soavail\n \n \n \n \n 535\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_atshipping\n \n \n \n \n 640\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_totalavail\n \n \n \n \n 535\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n Item_number\n \n \n \n \n 10\n 15\n 400\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n Item_description\n \n \n \n \n 430\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_sobalance\n \n \n \n \n 6\n \n 5\n 0\n 745\n 0\n 0\n \n \n \n \n \n detail\n \n 16\n \n \n 535\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_wo_startdate\n \n \n \n \n 25\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wo_number\n \n \n \n \n 430\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_wo_ordered\n \n \n \n \n 640\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_wo_duedate\n \n \n \n \n 185\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wo_status\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 373 RMlabel \N \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 400\n 300\n \n \n 25\n 25\n 25\n 25\n \n Vendor\n select vend_name from vend inner join pohead on (vend_id = pohead_vend_id) and pohead_number = <? value("pohead_number") ?> \n \n
\n detail\n \n \n Vendor\n \n 240\n \n \n \n 13\n 37\n 310\n 25\n \n 3of9\n 5\n \n \n Parameter Query\n item_number\n \n \n \n \n 257\n 208\n 64\n 17\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Parameter Query\n re_print\n \n \n \n \n \n 71\n 195\n 102\n 19\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Parameter Query\n current_user\n \n \n \n \n 63\n 80\n 109\n 17\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Parameter Query\n lotserial\n \n \n \n \n \n \n \n 78\n 107\n 258\n 25\n \n \n Helvetica\n 12\n normal\n \n \n \n \n Parameter Query\n item_descrip1\n \n \n \n \n \n 257\n 194\n 85\n 18\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Parameter Query\n print_date\n \n \n \n \n \n 243\n 80\n 98\n 18\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Parameter Query\n exp_date\n \n \n \n \n 84\n 151\n 247\n 20\n \n \n Helvetica\n 12\n normal\n \n \n \n \n Vendor\n vend_name\n \n \n \n \n 73\n 6\n 244\n 13\n \n \n Helvetica\n 10\n normal\n \n \n \n \n Parameter Query\n item_number\n \n \n \n \n
\n
\n \N 0 2007-02-23 13:21:48.64 240 BankAccountsMasterList \N \n\n Bank Accounts Master List\n BankAccountsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT bankaccnt_id,\n bankaccnt_name AS f_name,\n bankaccnt_descrip AS f_descrip,\n CASE WHEN (bankaccnt_type='K') THEN text('Checking')\n WHEN (bankaccnt_type='C') THEN text('Cash')\n WHEN (bankaccnt_type='R') THEN text('Credit Card')\n ELSE text('?')\n END AS f_type,\n formatBoolYN(bankaccnt_ap) AS f_ap,\n formatBoolYN(bankaccnt_ar) AS f_ar\n FROM bankaccnt\nORDER BY bankaccnt_name;\n \n \n 77\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n 7\n \n \n 22\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 495\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n \n 95\n 0\n 395\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_descrip\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ap\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_name\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ar\n \n \n \n
\n \n 17\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 332 ContactsMasterList \N \n\n Contacts Master List\n ContactsMasterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n contacts\n detail\n \n \n 143\n \n \n \n \n \n 6\n 137\n 995\n 137\n 2\n \n \n \n \n \n \n \n \n \n 5\n 33\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n 5\n 15\n 994\n 15\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 250\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n crmacct_number\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_first_name\n \n \n \n \n 725\n 0\n 145\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_email\n \n \n \n \n 875\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_webaddr\n \n \n \n \n 545\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_phone2\n \n \n \n \n 450\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_phone\n \n \n \n \n 120\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_last_name\n \n \n \n \n 625\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_fax\n \n \n \n \n 325\n 0\n 100\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n crmacct_name\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 945\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 18 InventoryAvailabilityBySourceVendor \N \n\n Inventory Availability by Source Vendor\n InventoryAvailabilityBySourceVendor\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("byDays") ?>\n (text('Look ahead ') || text(<? value("byDays") ?>) || text(' days'))\n <? elseif exists("byDate") ?>\n (text('Cutoff date ') || formatDate(<? value("byDate") ?>))\n <? elseif exists("byDates") ?>\n (text('Dates from ') || formatDate(<? value("startDate") ?>) || text(' to ') || formatDate(<? value("endDate") ?>))\n <? else ?>\n text('Item Site Lead Time')\n <? endif ?>\n AS ltcriteria\n \n \n detail\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n warehous_code,\n vend_number,\n itemsite_leadtime,\n formatQty(qtyonhand) AS f_qtyonhand,\n formatQty(noNeg(qtyonhand - allocated)) AS f_unallocated,\n formatQty(noNeg(allocated)) AS f_allocated,\n formatQty(ordered) AS f_ordered,\n formatQty(reorderlevel) AS f_reorderlevel,\n formatQty(outlevel) AS f_outlevel,\n (qtyonhand - allocated + ordered) AS available,\n formatQty(qtyonhand - allocated + ordered) AS f_available\n FROM (SELECT \n <? if reExists("[vV]end") ?>\n DISTINCT\n <? endif ?>\n itemsite_id,\n CASE WHEN (item_type IN ('P', 'O')) THEN 1\n WHEN (item_type IN ('M')) THEN 2\n ELSE 0\n END AS altId,\n item_number, item_descrip1, item_descrip2, item_inv_uom_id,\n warehous_id, warehous_code, itemsite_leadtime,\n itemsite_qtyonhand AS qtyonhand,\n CASE WHEN itemsite_useparams THEN itemsite_reorderlevel\n ELSE 0.0\n END AS reorderlevel,\n CASE WHEN itemsite_useparams THEN itemsite_ordertoqty\n ELSE 0.0\n END AS outlevel,\n <? if exists("byVend") ?>\n vend_number,\n <? else ?>\n NULL AS vend_number,\n <? endif ?>\n <? if exists("byLeadTime") ?>\n qtyAllocated(itemsite_id, itemsite_leadtime) AS allocated,\n qtyOrdered(itemsite_id, itemsite_leadtime) AS ordered, \n qtypr(itemsite_id, itemsite_leadtime) AS requests\n <? elseif exists("byDays") ?>\n qtyAllocated(itemsite_id, CAST(<? value("byDays") ?> AS INTEGER)) AS allocated,\n qtyOrdered(itemsite_id, CAST(<? value("byDays") ?> AS INTEGER)) AS ordered,\n qtypr(itemsite_id, CAST(<? value("byDays") ?> AS INTEGER)) AS requests \n <? elseif exists("byDate") ?>\n qtyAllocated(itemsite_id, (<? value("byDate") ?> - CURRENT_DATE)) AS allocated,\n qtyOrdered(itemsite_id, (<? value("byDate") ?> - CURRENT_DATE)) AS ordered,\n qtypr(itemsite_id, (<? value("byDate") ?> - CURRENT_DATE)) AS requests \n <? elseif exists("byDates") ?>\n qtyAllocated(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS allocated,\n qtyOrdered(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS ordered,\n qtypr(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS requests\n <? endif ?>\n FROM item, itemsite, whsinfo\n <? if reExists("[vV]end") ?>\n , vendinfo JOIN itemsrc ON (itemsrc_vend_id=vend_id)\n <? endif ?>\n WHERE ( (itemsite_active)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n <? if exists("warehous_id") ?>\n AND (warehous_id=<? value("warehous_id") ?>)\n <? endif ?>\n <? if exists("item_id") ?>\n AND (item_id=<? value("item_id") ?>)\n <? elseif exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n <? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n <? elseif exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n <? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n <? elseif exists("itemgrp_id") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem\n WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n <? elseif exists("itemgrp_pattern") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n AND (itemgrp_name ~ <? value("itemgrp_pattern") ?>) ) ))\n <? elseif exists("itemgrp") ?>\n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n <? endif ?>\n <? if reExists("[vV]end") ?>\n AND (itemsrc_item_id=item_id)\n <? endif ?>\n <? if exists("vend_id") ?>\n AND (vend_id=<? value("vend_id") ?>)\n <? elseif exists("vendtype_id") ?>\n AND (vend_vendtype_id=<? value("vendtype_id") ?>)\n <? elseif exists("vendtype_pattern") ?>\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ <? value("vendtype_pattern") ?>)))\n <? endif ?>\n ) ) AS data\n<? if exists("showReorder") ?>\n WHERE ( ((qtyonhand - allocated + ordered) <= reorderlevel)\n <? if exists("ignoreReorderAtZero") ?>\n AND (NOT ( ((qtyonhand - allocated + ordered) = 0) AND (reorderlevel = 0)))\n <? endif ?>\n )\n<? elseif exists("showShortages") ?>\n WHERE ((qtyonhand - allocated + ordered) < 0)\n<? endif ?>\nORDER BY vend_number, item_number, warehous_code DESC;\n \n \n 221\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n 135\n 43\n 280\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n ltcriteria\n \n \n \n \n \n \n \n \n \n \n \n \n 10\n 63\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_available\n \n \n \n \n 330\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyonhand\n \n \n \n \n 160\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 55\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_number\n \n \n \n \n 540\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_reorderlevel\n \n \n \n \n 645\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_outlevel\n \n \n \n \n 5\n 15\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_leadtime\n \n \n \n \n 434\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_allocated\n \n \n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 160\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 160\n 30\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 434\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unallocated\n \n \n \n \n 5\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 85\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 460 InventoryHistory \N \n\n Inventory History\n InventoryHistory\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT invhist_id,\n invhist_transdate,\n formatDateTime(invhist_transdate) AS f_transdate,\n invhist_transtype,\n whs1.warehous_code AS warehous_code,\n item_number,\n item_descrip1,\n item_descrip2,\n formatQty(invhist_invqty) AS transqty,\n (invhist_value_after-invhist_value_before) AS transvalue,\n formatMoney(invhist_value_after-invhist_value_before) AS f_transvalue,\n invhist_invuom,\n CASE WHEN (invhist_ordtype NOT LIKE '') THEN (invhist_ordtype || '-' || invhist_ordnumber)\n ELSE invhist_ordnumber\n END AS ordernumber,\n formatQty(invhist_qoh_before) AS qohbefore,\n formatQty(invhist_qoh_after) AS qohafter,\n CASE WHEN (invhist_costmethod='A') THEN <? value("average") ?>\n WHEN (invhist_costmethod='S') THEN <? value("standard") ?>\n WHEN (invhist_costmethod='J') THEN <? value("job") ?>\n WHEN (invhist_costmethod='N') THEN <? value("none") ?>\n ELSE <? value("unknown") ?>\n END AS costmethod,\n formatMoney(invhist_value_before) AS valbefore,\n formatMoney(invhist_value_after) AS valafter,\n invhist_user AS username,\n invhist_posted,\n 0 AS invdetail_id,\n '' AS locationname,\n '' AS detailqty,\n '' AS locationqtybefore,\n '' AS locationqtyafter,\n CASE WHEN (invhist_transtype='TW') THEN whs1.warehous_code\n WHEN (invhist_transtype='IB') THEN whs1.warehous_code\n WHEN (invhist_transtype='IM') THEN whs1.warehous_code\n WHEN (invhist_transtype='IT') THEN whs1.warehous_code\n WHEN (invhist_transtype='RB') THEN 'WIP'\n WHEN (invhist_transtype='RM') THEN 'WIP'\n WHEN (invhist_transtype='RP') THEN 'PURCH'\n WHEN (invhist_transtype='RR') THEN 'CUST'\n WHEN (invhist_transtype='RS') THEN 'SHIP'\n WHEN (invhist_transtype='SH') THEN whs1.warehous_code\n WHEN (invhist_transtype='SI') THEN whs1.warehous_code\n WHEN (invhist_transtype='SV') THEN whs1.warehous_code\n\t WHEN (invhist_transtype='TR') THEN whs2.warehous_code\n\t WHEN (invhist_transtype='TS') THEN whs1.warehous_code\n ELSE ''\n END AS locfrom,\n CASE WHEN (invhist_transtype='TW') THEN whs2.warehous_code\n WHEN (invhist_transtype='AD') THEN whs1.warehous_code\n WHEN (invhist_transtype='CC') THEN whs1.warehous_code\n WHEN (invhist_transtype='IB') THEN 'WIP'\n WHEN (invhist_transtype='IM') THEN 'WIP'\n WHEN (invhist_transtype='NN') THEN whs1.warehous_code\n WHEN (invhist_transtype='RB') THEN whs1.warehous_code\n WHEN (invhist_transtype='RM') THEN whs1.warehous_code\n WHEN (invhist_transtype='RP') THEN whs1.warehous_code\n WHEN (invhist_transtype='RR') THEN whs1.warehous_code\n WHEN (invhist_transtype='RS') THEN whs1.warehous_code\n WHEN (invhist_transtype='RT') THEN whs1.warehous_code\n WHEN (invhist_transtype='RX') THEN whs1.warehous_code\n WHEN (invhist_transtype='SH') THEN 'SHIP'\n WHEN (invhist_transtype='SI') THEN 'SCRAP'\n WHEN (invhist_transtype='SV') THEN 'SHIP'\n\t WHEN (invhist_transtype='TR') THEN whs1.warehous_code\n\t WHEN (invhist_transtype='TS') THEN whs2.warehous_code\n ELSE ''\n END AS locto\n FROM itemsite, item, whsinfo AS whs1, invhist LEFT OUTER JOIN whsinfo AS whs2 ON (invhist_xfer_warehous_id=whs2.warehous_id)\n WHERE ( (NOT invhist_hasdetail)\n AND (invhist_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=whs1.warehous_id)\n AND (DATE(invhist_transdate) BETWEEN <? value("startDate") ?> AND <? value("endDate") ?> )\n AND (transType(invhist_transtype, <? value("transType") ?>))\n<? if exists("orderType") ?>\n AND (invhist_ordtype=<? value("orderType") ?>)\n<? endif ?>\n<? if exists("orderNumber") ?>\n AND (invhist_ordnumber ~ <? value("orderNumber") ?>)\n<? endif ?>\n<? if exists("cohead_id") ?>\n AND (invhist_ordtype='SO')\n AND (invhist_ordnumber ~ (\n SELECT cohead_number \n FROM cohead \n WHERE cohead_id=<? value("cohead_id") ?>))\n<? endif ?>\n<? if exists("pohead_id") ?>\n AND (invhist_ordtype='PO')\n AND (invhist_ordnumber ~ (\n SELECT pohead_number \n FROM pohead \n WHERE pohead_id=<? value("pohead_id") ?>))\n<? endif ?>\n<? if exists("tohead_id") ?>\n AND (invhist_ordtype='TO')\n AND (invhist_ordnumber ~ (\n SELECT tohead_number \n FROM tohead \n WHERE tohead_id=<? value("tohead_id") ?>))\n<? endif ?>\n<? if exists("wo_id") ?>\n AND (invhist_ordtype='WO')\n AND (invhist_ordnumber ~ formatWoNumber(<? value("wo_id") ?>))\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? endif ?>\n<? if exists("itemgrp_id") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem\n\t\t WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? endif ?>\n<? if exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n\t\t\t FROM classcode\n\t\t\t WHERE (classcode_code ~ <? value ("classcode_pattern") ?>)))\n<? endif ?>\n<? if exists("itemgrp_pattern") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem, itemgrp\n\t\t WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t AND (itemgrp_name ~ <? value ("itemgrp_pattern") ?>))))\n<? endif ?>\n<? if exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? endif ?>\n<? if exists("itemgrp") ?>\n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n<? endif ?>\n)\nUNION\nSELECT invhist_id,\n invhist_transdate,\n formatDateTime(invhist_transdate) AS transdate,\n invhist_transtype,\n whs1.warehous_code AS warehous_code,\n item_number,\n item_descrip1,\n item_descrip2,\n formatQty(invhist_invqty) AS transqty,\n 0 AS transvalue,\n formatMoney(invhist_value_after-invhist_value_before) AS f_transvalue,\n invhist_invuom,\n CASE WHEN (invhist_ordtype NOT LIKE '') THEN (invhist_ordtype || '-' || invhist_ordnumber)\n ELSE invhist_ordnumber\n END AS ordernumber,\n formatQty(invhist_qoh_before) AS qohbefore,\n formatQty(invhist_qoh_after) AS qohafter,\n CASE WHEN(invhist_costmethod='A') THEN text('Average')\n WHEN(invhist_costmethod='S') THEN text('Standard')\n WHEN(invhist_costmethod='J') THEN text('Job')\n WHEN(invhist_costmethod='N') THEN text('None')\n ELSE 'UNKNOWN'\n END AS costmethod,\n formatMoney(invhist_value_before) AS valbefore,\n formatMoney(invhist_value_after) AS valafter,\n invhist_user AS username,\n invhist_posted,\n invdetail_id,\n CASE WHEN (invdetail_location_id=-1) THEN formatlotserialnumber(invdetail_ls_id)\n WHEN (invdetail_ls_id IS NULL) THEN formatLocationName(invdetail_location_id)\n ELSE (formatLocationName(invdetail_location_id) || '-' || formatlotserialnumber(invdetail_ls_id))\n END AS locationname,\n formatQty(invdetail_qty) AS detailqty,\n formatQty(invdetail_qty_before) AS locationqtybefore,\n formatQty(invdetail_qty_after) AS locationqtyafter,\n CASE WHEN (invhist_transtype='TW') THEN whs1.warehous_code\n WHEN (invhist_transtype='IB') THEN whs1.warehous_code\n WHEN (invhist_transtype='IM') THEN whs1.warehous_code\n WHEN (invhist_transtype='IT') THEN whs1.warehous_code\n WHEN (invhist_transtype='RB') THEN 'WIP'\n WHEN (invhist_transtype='RM') THEN 'WIP'\n WHEN (invhist_transtype='RP') THEN 'PURCH'\n WHEN (invhist_transtype='RR') THEN 'CUST'\n WHEN (invhist_transtype='RS') THEN 'SHIP'\n WHEN (invhist_transtype='SH') THEN whs1.warehous_code\n WHEN (invhist_transtype='SI') THEN whs1.warehous_code\n WHEN (invhist_transtype='SV') THEN whs1.warehous_code\n\t WHEN (invhist_transtype='TR') THEN whs2.warehous_code\n\t WHEN (invhist_transtype='TS') THEN whs1.warehous_code\n ELSE ''\n END AS locfrom,\n CASE WHEN (invhist_transtype='TW') THEN whs2.warehous_code\n WHEN (invhist_transtype='AD') THEN whs1.warehous_code\n WHEN (invhist_transtype='CC') THEN whs1.warehous_code\n WHEN (invhist_transtype='IB') THEN 'WIP'\n WHEN (invhist_transtype='IM') THEN 'WIP'\n WHEN (invhist_transtype='NN') THEN whs1.warehous_code\n WHEN (invhist_transtype='RB') THEN whs1.warehous_code\n WHEN (invhist_transtype='RM') THEN whs1.warehous_code\n WHEN (invhist_transtype='RP') THEN whs1.warehous_code\n WHEN (invhist_transtype='RR') THEN whs1.warehous_code\n WHEN (invhist_transtype='RS') THEN whs1.warehous_code\n WHEN (invhist_transtype='RT') THEN whs1.warehous_code\n WHEN (invhist_transtype='RX') THEN whs1.warehous_code\n WHEN (invhist_transtype='SH') THEN 'SHIP'\n WHEN (invhist_transtype='SI') THEN 'SCRAP'\n WHEN (invhist_transtype='SV') THEN 'SHIP'\n\t WHEN (invhist_transtype='TR') THEN whs1.warehous_code\n\t WHEN (invhist_transtype='TS') THEN whs2.warehous_code\n ELSE ''\n END AS locto\n FROM itemsite, item, whsinfo AS whs1, invdetail, invhist LEFT OUTER JOIN whsinfo AS whs2 ON (invhist_xfer_warehous_id=whs2.warehous_id)\n WHERE ((invhist_hasdetail)\n AND (invhist_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=whs1.warehous_id)\n AND (invdetail_invhist_id=invhist_id)\n AND (DATE(invhist_transdate) BETWEEN <? value("startDate") ?> AND <? value("endDate") ?> )\n AND (transType(invhist_transtype, <? value("transType") ?>))\n<? if exists("orderType") ?>\n AND (invhist_ordtype=<? value("orderType") ?>)\n<? endif ?>\n<? if exists("orderNumber") ?>\n AND (invhist_ordnumber ~ <? value("orderNumber") ?>)\n<? endif ?>\n<? if exists("cohead_id") ?>\n AND (invhist_ordtype='SO')\n AND (invhist_ordnumber ~ (\n SELECT cohead_number \n FROM cohead \n WHERE cohead_id=<? value("cohead_id") ?>))\n<? endif ?>\n<? if exists("pohead_id") ?>\n AND (invhist_ordtype='PO')\n AND (invhist_ordnumber ~ (\n SELECT pohead_number \n FROM pohead \n WHERE pohead_id=<? value("pohead_id") ?>))\n<? endif ?>\n<? if exists("tohead_id") ?>\n AND (invhist_ordtype='TO')\n AND (invhist_ordnumber ~ (\n SELECT tohead_number \n FROM tohead \n WHERE tohead_id=<? value("tohead_id") ?>))\n<? endif ?>\n<? if exists("wo_id") ?>\n AND (invhist_ordtype='WO')\n AND (invhist_ordnumber ~ formatWoNumber(<? value("wo_id") ?>))\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? endif ?>\n<? if exists("itemgrp_id") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem\n\t\t WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? endif ?>\n<? if exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n\t\t\t FROM classcode\n\t\t\t WHERE (classcode_code ~ <? value ("classcode_pattern") ?>)))\n<? endif ?>\n<? if exists("itemgrp_pattern") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem, itemgrp\n\t\t WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t AND (itemgrp_name ~ <? value ("itemgrp_pattern") ?>))))\n<? endif ?>\n<? if exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? endif ?>\n<? if exists("itemgrp") ?>\n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n<? endif ?>\n);\n \n \n footer\n SELECT formatMoney(sum(invhist_value_after-invhist_value_before)) AS transvalue_total\nFROM itemsite, item, whsinfo AS whs1, invhist LEFT OUTER JOIN\n whsinfo AS whs2 ON (invhist_xfer_warehous_id=whs2.warehous_id)\nWHERE ( (invhist_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id) \n AND (itemsite_warehous_id=whs1.warehous_id)\n AND (DATE(invhist_transdate) BETWEEN <? value("startDate") ?> AND <? value("endDate") ?> )\n AND (transType(invhist_transtype, <? value("transType") ?>))\n<? if exists("orderType") ?>\n AND (invhist_ordtype=<? value("orderType") ?>)\n<? endif ?>\n<? if exists("orderNumber") ?>\n AND (invhist_ordnumber ~ <? value("orderNumber") ?>)\n AND (invhist_ordtype = 'SO')\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("itemgrp_id") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem\n\t\t WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n<? elseif exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n\t\t\t FROM classcode\n\t\t\t WHERE (classcode_code ~ <? value ("classcode_pattern") ?>)))\n<? elseif exists("itemgrp_pattern") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t FROM itemgrpitem, itemgrp\n\t\t WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t AND (itemgrp_name ~ <? value ("itemgrp_pattern") ?>))))\n<? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? elseif exists("itemgrp") ?>\n AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n<? endif ?>\n)\n \n \n 242\n \n \n \n \n \n \n \n \n 5\n 237\n 745\n 237\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 10\n 37\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 2\n \n \n 51\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 45\n 745\n 45\n 2\n \n \n \n \n \n \n
\n detail\n \n invhist_id\n invhist_id\n \n 45\n \n \n 60\n 0\n 132\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_transdate\n \n \n \n \n 200\n 0\n 228\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 200\n 25\n 228\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 660\n 25\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n valafter\n \n \n \n \n 60\n 12\n 132\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordernumber\n \n \n \n \n 585\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohbefore\n \n \n \n \n 5\n 0\n 50\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 432\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invhist_invuom\n \n \n \n \n 60\n 25\n 132\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n username\n \n \n \n \n 585\n 25\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n valbefore\n \n \n \n \n 660\n 12\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locto\n \n \n \n \n 660\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohafter\n \n \n \n \n 5\n 12\n 50\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invhist_transtype\n \n \n \n \n 510\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transqty\n \n \n \n \n 585\n 12\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locfrom\n \n \n \n \n 200\n 12\n 228\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 510\n 12\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n costmethod\n \n \n \n \n 510\n 25\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_transvalue\n \n \n \n \n 9\n \n 5\n 5\n 745\n 5\n 0\n \n \n \n \n \n detail\n \n 16\n \n \n 585\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locationqtybefore\n \n \n \n \n 200\n 0\n 228\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locationname\n \n \n \n \n 508\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n detailqty\n \n \n \n \n 660\n 0\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locationqtyafter\n \n \n \n
\n \n 14\n \n \n \n 705\n 0\n 40\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 20\n \n \n 510\n 5\n 72\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n footer\n transvalue_total\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 362 Invoice \N \n\n Invoice\n Invoice\n With Logo - With Invoice Currency\n \n \n SELECT invchead_id, invchead_invcnumber FROM invchead ORDER BY invchead_invcnumber;\n \n \n \n Parameter Query\n watermark\n \n 25\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n GroupHead\n SELECT \n\n--Due Date\nformatDate(determineDueDate(invchead_terms_id, invchead_invcdate)) AS due_date,\n--Discount Date\nformatDate(determineDiscountDate(invchead_terms_id, invchead_invcdate)) AS dis_date,\n\n --remitto.*,\nremitto_name,\nformatAddr(remitto_address1, remitto_address2, remitto_address3, remitto_citystatezip, remitto_country) AS remitto_adr,\n invchead_invcnumber AS invoicenumber,\n formatDate(invchead_invcdate) AS f_invoicedate,\n cust_number,\n invchead_billto_name,\n formatAddr(invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, ( invchead_billto_city || ' ' || invchead_billto_state || ' ' || invchead_billto_zipcode ), invchead_billto_country) AS f_billtoaddress,\n invchead_billto_phone,\n invchead_shipto_name,\n formatAddr(invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, ( invchead_shipto_city || ' ' || invchead_shipto_state || ' ' || invchead_shipto_zipcode ), invchead_shipto_country) AS f_shiptoaddress,\n invchead_ordernumber AS ordernumber,\n invchead_ponumber,\n formatDate(invchead_orderdate) AS f_orderdate,\n formatDate(invchead_shipdate) AS f_shipdate,\n invchead_fob, terms_descrip, invchead_shipvia\nFROM remitto, custinfo, invchead, terms\nWHERE ( (invchead_cust_id=cust_id)\nAND (invchead_terms_id=terms_id)\nAND (invchead_id=<? value("invchead_id") ?>) )\nORDER BY ordernumber;\n \n \n Detail\n SELECT invcitem_linenumber,\n formatQty(invcitem_billed) AS f_billed,\n (select uom_name from uom where uom_id = invcitem_qty_uom_id) AS invuom,\n CASE WHEN (item_number IS NULL) THEN invcitem_number\n WHEN (invcitem_custpn != '') THEN invcitem_custpn\n else item_number\n END AS number,\n CASE WHEN (item_number IS NULL) THEN invcitem_descrip\n WHEN (invcitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip1\n ELSE item_descrip1\n END AS descrip1,\n CASE WHEN (invcitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip2\n ELSE item_descrip2\n END AS descrip2,\n CASE WHEN (<? value("showcosts") ?>=FALSE) THEN '---'\n ELSE formatPrice(invcitem_qty_invuomratio * invcitem_price / COALESCE(invcitem_price_invuomratio,1))\n END AS f_unitprice,\n CASE WHEN (<? value("showcosts") ?>=FALSE) THEN '---'\n ELSE formatMoney(round((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / COALESCE(invcitem_price_invuomratio,1)),2)) \n END AS f_extprice,\n invcitem_notes,\n getInvcitemLotSerial(invcitem_id) AS lotserial,\n--Sub-select updated for 3.1 to support kitting\n characteristicsToString('SI',invcitem_coitem_id, '=', ', ') \n AS coitem_characteristics\nFROM invcitem LEFT OUTER JOIN (item JOIN uom ON (item_inv_uom_id=uom_id)) ON (invcitem_item_id=item_id) LEFT OUTER JOIN itemalias ON (itemalias_item_id=item_id AND itemalias_number=invcitem_custpn)\nWHERE (invcitem_invchead_id=<? value("invchead_id") ?>)\nORDER BY invcitem_linenumber;\n \n \n foot\n SELECT formatMoney(SUM(round((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / COALESCE(invcitem_price_invuomratio,1)),2))) AS f_extprice \nFROM invcitem LEFT OUTER JOIN item on (invcitem_item_id=item_id) \nWHERE (invcitem_invchead_id=<? value("invchead_id") ?>);\n \n \n GroupExtended\n SELECT *,\n formatMoney(invchead_misc_amount) AS f_misc,\n formatMoney(tax) AS f_tax,\n formatMoney(invchead_freight) AS f_freight,\n formatMoney(invchead_payment) AS f_payment,\n formatMoney(noNeg(invchead_freight + invchead_misc_amount + tax +\n itemtotal - total_allocated)) AS f_totaldue,\n formatMoney(noNeg(invchead_freight + invchead_misc_amount + tax +\n itemtotal - total_allocated)) AS f_netdue,\n formatMoney(total_allocated) AS f_allocated\n FROM (SELECT invchead_misc_amount, invchead_freight,\n invchead_payment, invchead_notes, invchead_misc_descrip,\n (SELECT COALESCE(SUM(tax),0) \n FROM (\n SELECT ROUND(SUM(taxdetail_tax),2) AS tax \n FROM tax \n JOIN calculateTaxDetailSummary('I', <? value("invchead_id") ?>, 'T') ON (taxdetail_tax_id=tax_id)\n\t GROUP BY tax_id) AS data) AS tax,\n SUM(COALESCE(ROUND(invcitem_billed *\n invcitem_qty_invuomratio *\n invcitem_price /\n COALESCE(invcitem_price_invuomratio,1), 2), 0))\n AS itemtotal,\n COALESCE(\n CASE WHEN invchead_posted THEN\n (SELECT SUM(COALESCE(currToCurr(arapply_curr_id, t.aropen_curr_id,\n arapply_applied, t.aropen_docdate), 0))\n FROM arapply, aropen s, aropen t\n WHERE ( (s.aropen_id=arapply_source_aropen_id)\n AND (arapply_target_aropen_id=t.aropen_id)\n AND (arapply_target_doctype='I')\n AND (arapply_target_docnumber=invchead_invcnumber)\n AND (arapply_reftype='S')\n AND (arapply_source_aropen_id=s.aropen_id)))\n ELSE\n (SELECT SUM(COALESCE(CASE WHEN((aropen_amount - aropen_paid) >=\n currToCurr(aropenalloc_curr_id, aropen_curr_id,\n aropenalloc_amount, aropen_docdate))\n THEN currToCurr(aropenalloc_curr_id, invchead_curr_id,\n aropenalloc_amount, aropen_docdate)\n ELSE currToCurr(aropen_curr_id, invchead_curr_id,\n aropen_amount - aropen_paid,\n aropen_docdate)\n END, 0))\n FROM aropenalloc, aropen\n LEFT OUTER JOIN cohead ON (cohead_number=invchead_ordernumber)\n WHERE ( (aropenalloc_aropen_id=aropen_id)\n AND ((aropenalloc_doctype='S' AND aropenalloc_doc_id=cohead_id) OR\n (aropenalloc_doctype='I' AND aropenalloc_doc_id=invchead_id))\n AND ((aropen_amount - aropen_paid) > 0)))\n END, 0) AS total_allocated\n FROM invchead\n LEFT OUTER JOIN invcitem ON (invcitem_invchead_id=invchead_id)\n WHERE (invchead_id=<? value("invchead_id") ?>)\n GROUP BY invchead_freight, invchead_misc_amount, tax,\n invchead_payment, invchead_notes, invchead_misc_descrip,\n total_allocated\n ) AS dummy_outer\n ;\n \n \n allocatedCMs\n SELECT cohead_id,\n aropen_docnumber,\n formatMoney(aropen_amount) AS f_total,\n formatMoney(aropen_paid) AS f_paid,\n formatMoney(aropen_amount - aropen_paid) AS f_balance,\n CASE WHEN((aropen_amount - aropen_paid) >= currToCurr(aropenalloc_curr_id,\n\t\t\t\t\t\t\t aropen_curr_id,\n\t\t\t\t\t\t\t aropenalloc_amount,\n\t\t\t\t\t\t\t aropen_docdate))\n\t THEN currToCurr(aropenalloc_curr_id, aropen_curr_id,\n\t\t\t aropenalloc_amount, aropen_docdate)\n ELSE (aropen_amount - aropen_paid)\n END AS allocated,\n CASE WHEN((aropen_amount - aropen_paid) >= currToCurr(aropenalloc_curr_id,\n\t\t\t\t\t\t\t aropen_curr_id,\n\t\t\t\t\t\t\t aropenalloc_amount,\n\t\t\t\t\t\t\t aropen_docdate))\n\t THEN formatMoney(currToCurr(aropenalloc_curr_id, aropen_curr_id,\n\t\t\t\t\taropenalloc_amount, aropen_docdate))\n ELSE formatMoney(aropen_amount - aropen_paid)\n END AS f_allocated,\n CASE WHEN((aropen_amount - aropen_paid) >= currToCurr(aropenalloc_curr_id,\n\t\t\t\t\t\t\t aropen_curr_id,\n\t\t\t\t\t\t\t aropenalloc_amount,\n\t\t\t\t\t\t\t aropen_docdate))\n\t THEN currToCurr(aropenalloc_curr_id, invchead_curr_id,\n\t\t\t aropenalloc_amount, aropen_docdate)\n ELSE currToCurr(aropen_curr_id, invchead_curr_id,\n aropen_amount - aropen_paid, aropen_docdate)\n END AS allocated_invccurr,\n CASE WHEN((aropen_amount - aropen_paid) >= currToCurr(aropenalloc_curr_id,\n\t\t\t\t\t\t\t aropen_curr_id,\n\t\t\t\t\t\t\t aropenalloc_amount,\n\t\t\t\t\t\t\t aropen_docdate))\n\t THEN formatMoney(currToCurr(aropenalloc_curr_id, invchead_curr_id,\n\t\t\t\t\taropenalloc_amount, aropen_docdate))\n ELSE formatMoney(currToCurr(aropen_curr_id, invchead_curr_id,\n aropen_amount - aropen_paid,\n aropen_docdate))\n END AS f_allocated_invccurr,\n curr_symbol AS aropen_currsymbol\n FROM invchead LEFT OUTER JOIN cohead ON (cohead_number=invchead_ordernumber)\n JOIN aropenalloc ON ((aropenalloc_doctype='S' AND aropenalloc_doc_id=cohead_id) OR\n (aropenalloc_doctype='I' AND aropenalloc_doc_id=invchead_id))\n JOIN aropen ON (aropenalloc_aropen_id=aropen_id)\n JOIN curr_symbol ON (aropen_curr_id=curr_id)\nWHERE ((aropen_amount - aropen_paid) > 0)\n AND (NOT invchead_posted)\n AND (invchead_id=<? value("invchead_id") ?>)\nUNION\nSELECT cohead_id,\n arapply_source_docnumber AS aropen_docnumber,\n formatMoney(s.aropen_amount) AS f_total,\n formatMoney(s.aropen_paid -\n currToCurr(arapply_curr_id, s.aropen_curr_id,\n arapply_applied, arapply_postdate)) AS f_paid,\n formatMoney(s.aropen_amount - s.aropen_paid +\n currToCurr(arapply_curr_id, s.aropen_curr_id,\n arapply_applied, arapply_postdate)) AS f_balance,\n currToCurr(arapply_curr_id, s.aropen_curr_id,\n arapply_applied, arapply_postdate) AS allocated,\n formatMoney(currToCurr(arapply_curr_id, s.aropen_curr_id,\n arapply_applied,\n arapply_postdate)) AS f_allocated,\n currToCurr(arapply_curr_id, invchead_curr_id,\n arapply_applied, t.aropen_docdate) AS allocated_invccurr,\n formatMoney(currToCurr(arapply_curr_id, invchead_curr_id,\n arapply_applied,\n t.aropen_docdate)) AS f_allocated_invccurr,\n curr_symbol AS aropen_currsymbol\n FROM arapply, aropen s, aropen t, cohead, invchead, curr_symbol\nWHERE ( (s.aropen_id=arapply_source_aropen_id)\n AND (arapply_target_aropen_id=t.aropen_id)\n AND (arapply_target_doctype='I')\n AND (arapply_target_docnumber=invchead_invcnumber)\n AND (arapply_source_aropen_id=s.aropen_id)\n AND (arapply_curr_id=curr_id)\n AND (arapply_reftype='S')\n AND (cohead_number=invchead_ordernumber)\n AND (invchead_posted)\n AND (invchead_id=<? value("invchead_id") ?>) )\nORDER BY aropen_docnumber;\n \n \n currency\n SELECT currConcat(curr_id) AS currConcat, curr_symbol\nFROM invchead, curr_symbol\nWHERE (invchead_id = <? value("invchead_id") ?>)\n AND (invchead_curr_id = curr_id);\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n tracknum\n select formatdate(shiphead_shipdate) AS f_shipdate, shiphead_tracknum, shiphead_shipvia from cohead, shiphead, invchead \nwhere \ncohead_id = shiphead_order_id \nand shiphead_order_type = 'SO' \nand cohead_number = invchead_ordernumber \nand invchead_id = <? value("invchead_id") ?> \norder by shiphead_shipdate;\n \n \n \n 360\n \n \n 215\n 5\n 270\n 111\n \n stretch\n \n logo\n image_data\n \n \n \n \n \n 430\n 220\n 300\n 20\n \n 0\n \n Arial\n 12\n normal\n \n \n \n \n GroupHead\n f_shiptoaddress\n \n \n \n \n \n 129\n 140\n 111\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n GroupHead\n invoicenumber\n \n \n \n \n \n 430\n 200\n 300\n 20\n \n \n Luciduxsans\n 12\n 48\n \n \n \n \n GroupHead\n invchead_shipto_name\n \n \n \n \n \n 55\n 200\n 270\n 20\n \n \n Luciduxsans\n 12\n 48\n \n \n \n \n GroupHead\n invchead_billto_name\n \n \n \n \n \n 5\n 5\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n remitto_name\n \n \n \n \n 140\n 125\n 100\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n GroupHead\n ordernumber\n \n \n \n \n 120\n 155\n 120\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n invchead_ponumber\n \n \n \n \n 650\n 100\n 95\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n GroupHead\n f_orderdate\n \n \n \n \n 95\n 170\n 145\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n GroupHead\n cust_number\n \n \n \n \n 5\n 25\n 203\n 16\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n remitto_adr\n \n \n \n \n 55\n 220\n 300\n 20\n \n 0\n \n Arial\n 12\n normal\n \n \n \n \n GroupHead\n f_billtoaddress\n \n \n \n \n \n \n 5\n 350\n 745\n 350\n 2\n \n \n \n 555\n 115\n 190\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n GroupHead\n invchead_fob\n \n \n \n \n \n 620\n 40\n 125\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n GroupHead\n f_invoicedate\n \n \n \n \n \n \n 620\n 55\n 125\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n GroupHead\n due_date\n \n \n \n \n \n 615\n 70\n 130\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n GroupHead\n dis_date\n \n \n \n \n \n 545\n 85\n 200\n 20\n \n \n Sans Serif\n 8\n normal\n \n \n \n \n GroupHead\n terms_descrip\n \n \n \n
\n tracknumber\n \n tracknum\n shiphead_shipdate\n \n 41\n \n 40\n 35\n 745\n 35\n 0\n \n \n \n \n \n \n \n 12\n \n 40\n 5\n 745\n 5\n 0\n \n \n \n \n \n tracknum\n \n 21\n \n \n 160\n 0\n 225\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n tracknum\n shiphead_shipvia\n \n \n \n \n 390\n 0\n 280\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n tracknum\n shiphead_tracknum\n \n \n \n \n 40\n 0\n 100\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n tracknum\n f_shipdate\n \n \n \n
\n
\n ColumnHeadings\n \n \n GroupHead\n \n 41\n \n \n \n \n \n 490\n 10\n 71\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n currConcat\n \n \n \n 40\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n
\n
\n items\n \n \n Detail\n \n 93\n \n \n 25\n 5\n 120\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_billed\n \n \n \n \n 260\n 45\n 480\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n coitem_characteristics\n \n \n \n \n 440\n 70\n 365\n 14\n \n 0\n \n Arial\n 8\n normal\n \n \n \n \n Detail\n lotserial\n \n \n \n \n \n 171\n 5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n invuom\n \n \n \n \n 492\n 5\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 645\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_extprice\n \n \n \n \n 260\n 35\n 300\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n descrip2\n \n \n \n \n \n 540\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_unitprice\n \n \n \n \n 70\n 70\n 365\n 14\n \n 0\n \n Arial\n 8\n normal\n \n \n \n \n Detail\n invcitem_notes\n \n \n \n \n 260\n 5\n 220\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n number\n \n \n \n \n 260\n 25\n 300\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n descrip1\n \n \n \n
\n
\n allocatedCMs\n \n unnamed\n cohead_id\n \n 41\n \n \n 45\n 35\n 750\n 35\n 0\n \n \n \n \n 45\n 0\n 750\n 0\n 0\n \n \n \n \n \n \n \n 21\n \n \n 600\n 0\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n \n 640\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n allocatedCMs\n allocated_invccurr\n \n extprice\n \n \n \n \n \n \n allocatedCMs\n \n 21\n \n \n 140\n 0\n 40\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n allocatedCMs\n aropen_currsymbol\n \n \n \n \n 640\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n allocatedCMs\n f_allocated_invccurr\n \n \n \n 590\n 0\n 590\n 30\n 0\n \n \n \n 280\n 0\n 90\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n allocatedCMs\n f_paid\n \n \n \n \n 180\n 0\n 90\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n allocatedCMs\n f_total\n \n \n \n \n 480\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n allocatedCMs\n f_allocated\n \n \n \n \n 600\n 0\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 40\n 0\n 90\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n allocatedCMs\n aropen_docnumber\n \n \n \n \n 380\n 0\n 90\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n allocatedCMs\n f_balance\n \n \n \n
\n \n \n 167\n \n \n 605\n 5\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 640\n 25\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_freight\n \n \n \n \n 20\n 25\n 540\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n invchead_notes\n \n \n \n \n \n 605\n 85\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n \n 605\n 25\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n \n \n 640\n 103\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_totaldue\n \n \n \n \n 640\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n f_extprice\n \n \n \n \n 605\n 103\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 640\n 45\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_misc\n \n \n \n \n 640\n 85\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_allocated\n \n \n \n \n \n 640\n 65\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_tax\n \n \n \n \n 605\n 45\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 605\n 65\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 5\n 5\n 745\n 5\n 2\n \n \n \n 325\n 145\n 20\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 20\n 45\n 540\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n invchead_misc_descrip\n \n \n \n \n \n 27\n \n \n 330\n 0\n 20\n 20\n \n \n Sans Serif\n 10\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n With Logo - With Invoice Currency 0 2013-07-26 16:14:22.271087 257 InvoiceInformation \N \n\n Invoice Information\n InvoiceInformation\n \n \n \n Parameter Query\n watermark\n \n 25\n \n Letter\n \n 50\n 50\n 50\n 50\n \n GroupHead\n SELECT invchead_id, invchead_ponumber,\n formatDate(invchead_shipdate) AS f_shipdate,\n formatDate(invchead_invcdate) AS f_invcdate,\n formatMoney(invoiceTotal(invchead_id)) AS f_amount,\n invchead_billto_name, invchead_billto_address1,\n invchead_billto_address2, invchead_billto_address3,\n ( invchead_billto_city || ' ' || invchead_billto_state || ', '\n || invchead_billto_zipcode ) AS billtocitystatezip,\n invchead_shipto_name, invchead_shipto_address1,\n invchead_shipto_address2, invchead_shipto_address3,\n ( invchead_shipto_city || ' ' || invchead_shipto_state || ', '\n || invchead_shipto_zipcode ) AS shiptocitystatezip,\n invchead_notes, invchead_invcnumber\nFROM invchead LEFT OUTER JOIN (invcitem LEFT OUTER JOIN item ON (invcitem_item_id=item_id) ) ON (invcitem_invchead_id=invchead_id)\nWHERE (invchead_id=<? value("invchead_id") ?>)\nGROUP BY invchead_id, invchead_ponumber,\n invchead_shipdate, invchead_invcdate,\n invchead_misc_amount, invchead_freight,\n invchead_billto_name, invchead_billto_address1,\n invchead_billto_address2, invchead_billto_address3,\n invchead_billto_city, invchead_billto_state, invchead_billto_zipcode,\n invchead_shipto_name, invchead_shipto_address1,\n invchead_shipto_address2, invchead_shipto_address3,\n invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode,\n invchead_notes, invchead_invcnumber;\n \n \n CustInfo\n SELECT cust_id,\n cust_number,\n cust_name,\n addr_line1 AS cust_address1,\n addr_line2 AS cust_address2,\n addr_line3 AS cust_address3,\n addr_city || ' ' || addr_state || ', ' || addr_postalcode AS custcitystatezip\nFROM invchead, custinfo\nLEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\nLEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\nWHERE ( (invchead_id=<? value("invchead_id") ?>)\n AND (invchead_cust_id=cust_id) );\n \n \n Details\n SELECT 1 as grpnum,\n arapply_id,\n CASE WHEN (arapply_source_doctype = 'C') THEN text('C/M')\n WHEN (arapply_fundstype='C') THEN text('Check')\n WHEN (arapply_fundstype='T') THEN text('Certified Check')\n WHEN (arapply_fundstype='M') THEN text('Master Card')\n WHEN (arapply_fundstype='V') THEN text('Visa')\n WHEN (arapply_fundstype='A') THEN text('American Express')\n WHEN (arapply_fundstype='D') THEN text('Discover Card')\n WHEN (arapply_fundstype='R') THEN text('Other Credit Card')\n WHEN (arapply_fundstype='K') THEN text('Cash')\n WHEN (arapply_fundstype='W') THEN text('Wire Transfer')\n WHEN (arapply_fundstype='O') THEN text('Other')\n END AS documenttype,\n CASE WHEN (arapply_source_doctype = 'C') THEN arapply_source_docnumber\n WHEN (arapply_source_doctype = 'R') THEN arapply_source_docnumber\n WHEN (arapply_source_doctype = 'K') THEN arapply_refnumber\n ELSE text('Error')\n END AS docnumber,\n formatDate(arapply_postdate) AS f_postdate,\n formatMoney(arapply_applied) AS f_amount\n FROM arapply, invchead\n WHERE ( (arapply_target_doctype='I')\n AND (arapply_target_docnumber=invchead_invcnumber)\n AND (invchead_id=<? value("invchead_id") ?>) )\nORDER BY arapply_postdate;\n \n \n \n 389\n \n \n 590\n 80\n 125\n 20\n \n \n Arial\n 12\n bold\n \n \n \n \n GroupHead\n f_invcdate\n \n \n \n \n 155\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n CustInfo\n cust_address2\n \n \n \n \n \n 155\n 80\n 125\n 20\n \n \n Arial\n 12\n bold\n \n \n \n \n CustInfo\n cust_number\n \n \n \n \n 25\n 280\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_billto_address2\n \n \n \n \n 155\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n CustInfo\n cust_address1\n \n \n \n \n 590\n 125\n 125\n 20\n \n \n Arial\n 12\n bold\n \n \n \n \n GroupHead\n f_amount\n \n \n \n \n 25\n 240\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_billto_name\n \n \n \n \n 155\n 25\n 125\n 20\n \n \n Arial\n 12\n bold\n \n \n \n \n GroupHead\n invchead_invcnumber\n \n \n \n \n 155\n 160\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n CustInfo\n cust_address3\n \n \n \n \n 155\n 100\n 300\n 20\n \n \n Arial\n 12\n bold\n \n \n \n \n CustInfo\n cust_name\n \n \n \n \n \n \n 155\n 180\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n CustInfo\n custcitystatezip\n \n \n \n \n \n 25\n 320\n 325\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n billtocitystatezip\n \n \n \n \n \n \n 385\n 320\n 325\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n shiptocitystatezip\n \n \n \n \n \n 385\n 300\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_shipto_address3\n \n \n \n \n \n 385\n 280\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_shipto_address2\n \n \n \n \n 155\n 50\n 125\n 20\n \n \n Arial\n 12\n bold\n \n \n \n \n GroupHead\n invchead_ponumber\n \n \n \n \n \n 385\n 240\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_shipto_name\n \n \n \n \n 20\n 365\n 690\n 20\n \n 0\n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_notes\n \n \n \n \n 25\n 300\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_billto_address3\n \n \n \n \n 385\n 260\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_shipto_address1\n \n \n \n \n \n 25\n 260\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n GroupHead\n invchead_billto_address1\n \n \n \n \n 590\n 100\n 125\n 20\n \n \n Arial\n 12\n bold\n \n \n \n \n GroupHead\n f_shipdate\n \n \n \n
\n details\n \n header\n grpnum\n \n 47\n \n \n \n \n 5\n 40\n 745\n 40\n 2\n \n \n \n \n \n \n \n Details\n \n 17\n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Details\n f_amount\n \n \n \n \n 110\n 0\n 425\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Details\n docnumber\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Details\n documenttype\n \n \n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Details\n f_postdate\n \n \n \n
\n \n 17\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 281 InvoiceRegister \N \n\n Invoice Register\n InvoiceRegister\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("accnt_id") ?>\n ( SELECT (accnt_number || '-' || accnt_descrip)\n FROM accnt\n WHERE (accnt_id=<? value("accnt_id") ?>) )\n <? else ?>\n text('All Accounts')\n <? endif ?>\n AS accnt\n \n \n detail\n SELECT gltrans_id,\n formatDate(gltrans_date) AS transdate,\n gltrans_source,\n CASE WHEN(gltrans_doctype='IN') THEN text('Invoice')\n WHEN(gltrans_doctype='CM') THEN text('Credit Memo')\n WHEN(gltrans_doctype='DM') THEN text('Debit Memo')\n WHEN(gltrans_doctype='CD') THEN text('Customer Deposit')\n ELSE gltrans_doctype\n END AS doctype,\n gltrans_docnumber,\n CASE WHEN(gltrans_doctype='IN') THEN\n (SELECT invchead_shipto_name\n FROM aropen LEFT OUTER JOIN\n invchead\n ON (invchead_id=aropen_cobmisc_id\n AND invchead_cust_id=aropen_cust_id)\n WHERE ((aropen_docnumber=gltrans_docnumber)\n AND (aropen_doctype='I')))\n ELSE firstLine(gltrans_notes)\n END AS transnotes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n CASE WHEN (gltrans_amount < 0) THEN formatMoney(ABS(gltrans_amount))\n ELSE ''\n END AS f_debit,\n CASE WHEN (gltrans_amount < 0) THEN ABS(gltrans_amount)\n ELSE 0\n END AS debit,\n CASE WHEN (gltrans_amount > 0) THEN formatMoney(gltrans_amount)\n ELSE ''\n END AS f_credit,\n CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n ELSE 0\n END AS credit\n FROM gltrans, accnt\n WHERE ((gltrans_accnt_id=accnt_id)\n AND (gltrans_doctype IN ('IN', 'CM', 'DM', 'CD'))\n AND (gltrans_source = 'A/R')\n AND (gltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("accnt_id") ?>\n AND (gltrans_accnt_id=<? value("accnt_id") ?>)\n<? endif ?>\n )\nORDER BY gltrans_date, gltrans_docnumber;\n \n \n 205\n \n \n \n 545\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n \n \n \n 140\n 70\n 290\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n accnt\n \n \n \n \n \n 545\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 5\n 200\n 745\n 200\n 2\n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n
\n detail\n \n bydate\n transdate\n \n 21\n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 21\n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debit\n \n money\n \n \n \n 600\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credit\n \n money\n \n \n 5\n 15\n 745\n 15\n 1\n \n \n \n \n \n detail\n \n 31\n \n \n 95\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_source\n \n \n \n \n 160\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_docnumber\n \n \n \n \n 160\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n doctype\n \n \n \n \n 509\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n \n 245\n 15\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 600\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n \n 245\n 0\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transnotes\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 21\n \n \n 600\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credit\n \n money\n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debit\n \n money\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 423 ItemCostDetail \N \n\n Item Costs Detail\n ItemCostDetail\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n costelem_type,\n<? if exists("standardCost") ?>\n text('Standard Cost')\n<? else ?>\n text('Actual Cost')\n<? endif ?>\n AS costtype\n FROM item, costelem\n WHERE((item_id=<? value("item_id") ?>)\n AND (costelem_id=<? value("costelem_id") ?>));\n\n \n \n detail\n SELECT seqnumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip, uom_name,\n formatQtyper(qtyper) AS f_qtyper,\n formatScrap(bomitem_scrap) AS f_scrap,\n formatCost(cost) AS f_cost,\n formatCost(extendedcost) AS f_extendedcost,\n extendedcost\n FROM ( SELECT bomitem_seqnumber AS seqnumber,\n itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper) AS qtyper, bomitem_scrap,\n item_number, item_descrip1, item_descrip2, uom_name,\n<? if exists("standardCost") ?>\n itemcost_stdcost AS cost,\n (itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper * (1 + bomitem_scrap)) *\n itemcost_stdcost) AS extendedcost\n<? else ?>\n currToBase(itemcost_curr_id, itemcost_actcost, NULL) AS cost,\n (itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper * (1 + bomitem_scrap)) *\n currToBase(itemcost_curr_id, itemcost_actcost, NULL)) AS extendedcost\n<? endif ?>\n FROM bomitem, item, itemcost, costelem, uom\n WHERE((bomitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires-1))\n AND (itemcost_item_id=item_id)\n AND (itemcost_costelem_id=costelem_id)\n AND (SELECT item_type!='C' FROM item WHERE item_id=<? value("item_id") ?>)\n AND (bomitem_parent_item_id=<? value("item_id") ?>)\n AND (costelem_id=<? value("costelem_id") ?>) ) ) AS data\n\nUNION\n\nSELECT seqnumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescrip, uom_name,\n formatQtyPer(bbomitem_qtyper) AS f_qtyper,\n formatScrap(bbomitem_costabsorb) AS f_scrap,\n formatCost(cost) AS f_cost,\n formatCost(extendedcost) AS f_extendedcost,\n extendedcost\n FROM ( SELECT bbomitem_seqnumber AS seqnumber, bbomitem_qtyper, bbomitem_costabsorb,\n item_number, item_descrip1, item_descrip2, uom_name,\n<? if exists("standardCost") ?>\n itemcost_stdcost AS cost,\n (itemcost_stdcost / bbomitem_qtyper * bbomitem_costabsorb) AS extendedcost\n<? else ?>\n currToBase(itemcost_curr_id, itemcost_actcost, NULL) AS cost,\n (currToBase(itemcost_curr_id, itemcost_actcost, NULL) / bbomitem_qtyper * bbomitem_costabsorb) AS extendedcost\n<? endif ?>\n FROM bbomitem, item, itemcost, uom\n WHERE((bbomitem_parent_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (CURRENT_DATE BETWEEN bbomitem_effective AND (bbomitem_expires-1))\n AND (itemcost_item_id=bbomitem_parent_item_id)\n AND (itemcost_costelem_id=<? value("costelem_id") ?>)\n AND (SELECT item_type='C' FROM item WHERE item_id=<? value("item_id") ?>)\n AND (bbomitem_item_id=<? value("item_id") ?>) )\n\n UNION\n\n SELECT source.bbomitem_seqnumber AS seqnumber,\n source.bbomitem_qtyper, target.bbomitem_costabsorb,\n item_number, item_descrip1, item_descrip2, uom_name,\n<? if exists("standardCost") ?>\n itemcost_stdcost AS cost,\n (itemcost_stdcost * source.bbomitem_qtyper / target.bbomitem_qtyper * target.bbomitem_costabsorb) AS extendedcost\n<? else ?>\n currToBase(itemcost_curr_id, itemcost_actcost, NULL) AS cost,\n (currToBase(itemcost_curr_id, itemcost_actcost, NULL) * source.bbomitem_qtyper / target.bbomitem_qtyper * target.bbomitem_costabsorb) AS extendedcost\n<? endif ?>\n FROM item, itemcost, bbomitem AS target, bbomitem AS source, uom\n WHERE ( (source.bbomitem_parent_item_id=target.bbomitem_parent_item_id)\n AND (CURRENT_DATE BETWEEN source.bbomitem_effective AND (source.bbomitem_expires-1))\n AND (CURRENT_DATE BETWEEN target.bbomitem_effective AND (target.bbomitem_expires-1))\n AND (source.bbomitem_item_id=itemcost_item_id)\n AND (source.bbomitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (item_type='Y')\n AND (SELECT item_type='C' FROM item WHERE item_id=<? value("item_id") ?>)\n AND (target.bbomitem_item_id=<? value("item_id") ?>)\n AND (itemcost_costelem_id=<? value("costelem_id") ?>) ) ) AS data\n ORDER BY seqnumber;\n \n \n 223\n \n \n \n \n 490\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n costelem_type\n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 100\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n \n 490\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n costtype\n \n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n 6\n \n \n 28\n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 220\n 0\n 185\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemdescrip\n \n \n \n \n 494\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scrap\n \n \n \n \n 60\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 165\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n seqnumber\n \n \n \n \n 410\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyper\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cost\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_extendedcost\n \n \n \n
\n \n 18\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 18\n \n \n \n 660\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n extendedcost\n \n qty\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 408 ListOpenReturnAuthorizations \N \n\n List Open Return Authorizations\n ListOpenReturnAuthorizations\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM warehous\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Warehouses')\n <? endif ?>\n AS warehouse;\n\n \n \n detail\n returnAuthorizations\n detail\n \n \n 221\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n 100\n 104\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 100\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custnumber\n \n \n \n \n 425\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n disposition\n \n \n \n \n 535\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_authorized\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_expires\n \n \n \n \n 5\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n rahead_number\n \n \n \n \n 195\n 0\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n rahead_billtoname\n \n \n \n
\n \n 18\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2012-11-07 15:33:21.623077 300 OrderActivityByProject \N \n\n Order Activity By Project\n OrderActivityByProject\n Order Activity Report\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT prj_name, prj_number\n FROM prj\n WHERE (prj_id=<? value("prj_id") ?>);\n \n \n detail\n -- Group: orderActivityByProject\n-- Name: detail\n-- Notes: \n\nSELECT *, \n formatQty(qty) AS f_qty,\n formatMoney(value) AS f_value,\n 'curr' AS qty_xtnumericrole,\n 'curr' AS value_xtnumericrole\nFROM (\n<? if exists("showSo") ?>\n----- QUOTES -----\nSELECT quhead_id AS id, \n 15 AS type,\n quhead_number::text AS subtype,\n 1 AS section,\n <? value("quotes") ?> AS section_qtdisplayrole,\n quhead_number::text AS name,\n CASE WHEN (quhead_status = 'C') THEN \n <? value("converted") ?>\n WHEN (quhead_status = 'X') THEN\n <? value("canceled") ?>\n WHEN (COALESCE(quhead_expire, current_date + 1) > current_date) THEN\n <? value("open") ?>\n ELSE\n <? value("expired") ?>\n END AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n NULL AS value,\n 0.0 AS ordertotal,\n 1 AS xtindentrole\n FROM quhead\n JOIN quitem ON (quitem_quhead_id = quhead_id)\n WHERE (quhead_prj_id = <? value("prj_id") ?>)\nGROUP BY quhead_id, quhead_number, quhead_status, quhead_expire, quhead_freight, quhead_misc\n\nUNION ALL\n\nSELECT quitem_id AS id, \n 17 AS type,\n quhead_number::text AS subtype,\n 1 AS section,\n <? value("quotes") ?> AS section_qtdisplayrole,\n quitem_linenumber::text AS name, \n CASE WHEN (quhead_status = 'C') THEN \n <? value("converted") ?>\n WHEN (quhead_status = 'X') THEN\n <? value("canceled") ?>\n WHEN (COALESCE(quhead_expire, current_date + 1) > current_date) THEN\n <? value("open") ?>\n ELSE\n <? value("Expired") ?>\n END AS status,\n item_number AS item,\n item_descrip1 || ' ' || item_descrip2 AS descrip,\n quitem_qtyord,\n uom_name AS uom,\n (quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio) AS value,\n 0.0 AS ordertotal,\n 2 AS xtindentrole\n FROM quhead\n JOIN quitem ON (quitem_quhead_id = quhead_id)\n JOIN uom ON (quitem_qty_uom_id = uom_id)\n JOIN itemsite ON (quitem_itemsite_id = itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\n WHERE (quhead_prj_id = <? value("prj_id") ?>)\n\nUNION ALL\n\nSELECT quhead_id AS id, \n 18 AS type,\n quhead_number::text AS subtype,\n 1 AS section,\n <? value("quotes") ?> AS section_qtdisplayrole,\n <? value("total") ?> AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio)) AS value,\n SUM((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio)) AS ordertotal,\n 1 AS xtindentrole\n FROM quhead\n JOIN quitem ON (quitem_quhead_id = quhead_id)\n WHERE (quhead_prj_id = <? value("prj_id") ?>)\nGROUP BY quhead_id, quhead_number\n\nUNION ALL\n\n------ SALES ORDERS ------\nSELECT cohead_id AS id, \n 25 AS type,\n cohead_number::text AS subtype,\n 2 AS section,\n <? value("sos") ?> AS section_qtdisplayrole,\n cohead_number::text AS name,\n COALESCE((SELECT \n CASE WHEN (coitem_status = 'O') THEN\n <? value("open") ?>\n WHEN (coitem_status = 'C') THEN\n <? value("closed" ?>\n ELSE\n <? value("canceled") ?>\n END\n FROM \n (SELECT coitem_status,\n CASE \n WHEN (coitem_status = 'O') THEN 1\n WHEN (coitem_status = 'C') then 2\n ELSE 3\n END AS type\n FROM coitem\n WHERE (coitem_cohead_id=cohead_id)\n ORDER BY type\n LIMIT 1) AS sts) ,'O')\n AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n NULL AS value,\n 0.0 AS ordertotal,\n 1 AS xtindentrole\n FROM cohead\n JOIN coitem ON (coitem_cohead_id = cohead_id)\n WHERE (cohead_prj_id = <? value("prj_id") ?>)\nGROUP BY cohead_id, cohead_number\n\nUNION ALL\n\nSELECT coitem_id AS id, \n 27 AS type,\n cohead_number::text AS subtype,\n 2 AS section,\n <? value("sos") ?> AS section_qtdisplayrole,\n coitem_linenumber::text AS name, \n CASE WHEN (coitem_status = 'O') THEN\n <? value("open") ?>\n WHEN (coitem_status = 'C') THEN\n <? value("closed") ?>\n WHEN (coitem_status = 'X') THEN\n <? value("canceled") ?>\n END AS status,\n item_number AS item,\n item_descrip1 || ' ' || item_descrip2 AS descrip,\n coitem_qtyord,\n uom_name AS uom,\n (coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) AS value,\n 0.0 AS ordertotal,\n 2 AS xtindentrole\n FROM cohead\n JOIN coitem ON (coitem_cohead_id = cohead_id)\n JOIN uom ON (coitem_qty_uom_id = uom_id)\n JOIN itemsite ON (coitem_itemsite_id = itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\n WHERE (cohead_prj_id = <? value("prj_id") ?>)\n\nUNION ALL\n\nSELECT cohead_id AS id, \n 28 AS type,\n cohead_number::text AS subtype,\n 2 AS section,\n <? value("sos") ?> AS section_qtdisplayrole,\n <? value("total") ?> AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio)) AS value,\n SUM((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio)) AS ordertotal,\n 1 AS xtindentrole\n FROM cohead\n JOIN coitem ON (coitem_cohead_id = cohead_id)\n WHERE (cohead_prj_id = <? value("prj_id") ?>)\nGROUP BY cohead_id, cohead_number\n\nUNION ALL\n\n------ INVOICES -------\nSELECT invchead_id AS id,\n 35 AS type,\n invchead_invcnumber::text AS subtype,\n 3 AS section,\n <? value("invoices") ?> AS section_qtdisplayrole,\n invchead_invcnumber::text AS name,\n CASE WHEN (invchead_posted) THEN\n <? value("posted") ?>\n ELSE <? value("unposted") ?>\n END AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n NULL AS value,\n 0.0 AS ordertotal,\n 1 AS xtindentrole\n FROM invchead\n JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n WHERE (invchead_prj_id = <? value("prj_id") ?>)\nGROUP BY invchead_id, invchead_invcnumber, invchead_freight, invchead_misc_amount, invchead_posted\n\nUNION ALL\n\nSELECT invcitem_id AS id, \n 37 AS type,\n invchead_invcnumber::text AS subtype,\n 3 AS section,\n <? value("invoices") ?> AS section_qtdisplayrole,\n invcitem_linenumber::text AS name, \n CASE WHEN (invchead_posted) THEN\n <? value("posted") ?>\n ELSE <? value("unposted") ?>\n END AS status,\n COALESCE(item_number,invcitem_number) AS item,\n COALESCE(item_descrip1 || ' ' || item_descrip2,invcitem_descrip) AS descrip,\n invcitem_billed AS qty,\n uom_name AS uom,\n (invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio) AS value,\n 0.0 AS ordertotal,\n 2 AS xtindentrole\n FROM invchead\n JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n LEFT OUTER JOIN item ON (invcitem_item_id = item_id)\n LEFT OUTER JOIN uom ON (invcitem_qty_uom_id = uom_id)\n WHERE (invchead_prj_id = <? value("prj_id") ?>)\n\nUNION ALL\n\nSELECT invchead_id AS id, \n 38 AS type,\n invchead_invcnumber::text AS subtype,\n 3 AS section,\n <? value("invoices") ?> AS section_qtdisplayrole,\n <? value("total") ?> AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio)) AS value,\n SUM((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio)) AS ordertotal,\n 1 AS xtindentrole\n FROM invchead\n JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n WHERE (invchead_prj_id = <? value("prj_id") ?>)\nGROUP BY invchead_id, invchead_invcnumber\n\n<? endif ?>\n\n\n<? if exists("showWo") ?>\n\n<? if exists("showSo") ?>\n\nUNION ALL\n\n<? endif ?>\n\n------ WORK ORDERS -------\nSELECT wo_id AS id, \n 45 AS type,\n formatWoNumber(wo_id) AS subtype,\n 4 AS section,\n <? value("wos") ?> AS section_qtdisplayrole,\n formatWoNumber(wo_id) AS name,\n CASE WHEN (wo_status = 'O') THEN\n <? value("open") ?>\n WHEN (wo_status = 'E') THEN\n <? value("exploded") ?>\n WHEN (wo_status = 'R') THEN\n <? value("released") ?>\n WHEN (wo_status = 'I') THEN\n <? value("inprocess") ?>\n WHEN (wo_status = 'C') THEN\n <? value("closed") ?>\n END AS status,\n item_number AS item,\n item_descrip1 || ' ' || item_descrip2 AS descrip,\n wo_qtyord AS qty,\n uom_name AS uom,\n wo_postedvalue AS value,\n wo_postedvalue AS ordertotal,\n 1 AS xtindentrole\n FROM wo\n JOIN itemsite ON (itemsite_id=wo_itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (wo_prj_id = <? value("prj_id") ?>)\n\n<? endif ?>\n\n\n<? if exists("showPo") ?>\n<? if exists("showSo") ?>\n UNION ALL\n<? elseif exists("showWo") ?>\n UNION ALL\n\n<? endif ?>\n------ PURCHASE REQUESTS ------\nSELECT pr_id AS id, \n 55 AS type,\n pr_number::text || '-' || pr_subnumber::text AS subtype,\n 5 AS section,\n <? value("prs") ?> AS section_qtdisplayrole,\n pr_number::text || '-' || pr_subnumber::text AS name,\n <? value("open") ?> AS status, \n item_number AS item,\n (item_descrip1 || ' ' || item_descrip2) AS descrip,\n pr_qtyreq AS qty,\n uom_name AS uom,\n stdcost(item_id) * pr_qtyreq AS value,\n stdcost(item_id) * pr_qtyreq AS ordertotal,\n 1 AS xtindentrole\n FROM pr\n JOIN itemsite ON (itemsite_id = pr_itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\n JOIN uom ON (item_inv_uom_id = uom_id)\n WHERE (pr_prj_id=<? value("prj_id") ?>)\n\nUNION ALL\n\n------ PURCHASE ORDERS ------\nSELECT pohead_id AS id,\n 65 AS type,\n pohead_number::text AS subtype,\n 6 AS section,\n <? value("pos") ?> AS section_qtdisplayrole,\n pohead_number::text AS name,\n CASE WHEN (pohead_status = 'U') THEN\n <? value("unreleased") ?>\n WHEN (pohead_status = 'O') THEN\n <? value("open") ?>\n WHEN (pohead_status = 'C') THEN\n <? value("closed") ?>\n END AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL AS uom,\n NULL AS value,\n 0.0 AS ordertotal,\n 1 AS xtindentrole\n FROM pohead\n JOIN poitem ON (poitem_pohead_id = pohead_id)\n WHERE (poitem_prj_id = <? value("prj_id") ?>)\nGROUP BY pohead_id, pohead_number, pohead_freight, pohead_status\n\nUNION ALL\n\nSELECT poitem_id AS id, \n 67 AS type,\n pohead_number::text AS subtype,\n 6 AS section,\n <? value("pos") ?> AS section_qtdisplayrole,\n poitem_linenumber::text AS name, \n CASE WHEN (poitem_status = 'U') THEN\n <? value("unreleased") ?>\n WHEN (poitem_status = 'O') THEN\n <? value("open") ?>\n WHEN (poitem_status = 'C') THEN\n <? value("closed") ?>\n END AS status,\n COALESCE(item_number,poitem_vend_item_number) AS item,\n COALESCE((item_descrip1 || ' ' || item_descrip2),poitem_vend_item_descrip) AS descrip,\n poitem_qty_ordered,\n poitem_vend_uom AS uom,\n (poitem_qty_ordered * poitem_unitprice) AS value,\n 0.0 AS ordertotal,\n 2 AS xtindentrole\n FROM pohead\n JOIN poitem ON (poitem_pohead_id = pohead_id)\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id = item_id)\n WHERE (poitem_prj_id = <? value("prj_id") ?>)\n\nUNION ALL\n\nSELECT pohead_id AS id, \n 68 AS type,\n pohead_number::text AS subtype,\n 6 AS section,\n <? value("pos") ?> AS section_qtdisplayrole,\n <? value("total") ?> AS name,\n NULL AS status,\n NULL::text AS item,\n NULL::text AS descrip,\n NULL AS qty,\n NULL::text AS uom,\n SUM(poitem_qty_ordered * poitem_unitprice) AS value,\n SUM(poitem_qty_ordered * poitem_unitprice) AS ordertotal,\n 1 AS xtindentrole\n FROM pohead\n JOIN poitem ON (poitem_pohead_id = pohead_id)\n WHERE (poitem_prj_id = <? value("prj_id") ?>)\nGROUP BY pohead_id, pohead_number\n\n<? endif ?>\n\n) data\nORDER BY section, subtype, type, id;\n \n \n 75\n \n \n \n 140\n 25\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_number\n \n \n \n \n \n 140\n 45\n 509\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n
\n section\n \n type\n section\n \n 53\n \n \n 0\n 45\n 750\n 45\n 2\n \n \n \n \n 77\n 45\n 77\n 45\n 0\n \n \n \n \n \n 90\n 5\n 610\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n section_qtdisplayrole\n \n \n \n \n \n 33\n \n \n 305\n 5\n 750\n 5\n 0\n \n \n \n 610\n 10\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordertotal\n \n money\n \n \n \n \n \n \n detail\n \n 18\n \n \n 305\n 0\n 135\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item\n \n \n \n \n 100\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n name\n \n \n \n \n 209\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n status\n \n \n \n \n 444\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 544\n 0\n 165\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n \n \n
\n \n 41\n \n \n \n 700\n 15\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 0\n 5\n 750\n 5\n 2\n \n \n \n 75\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n Order Activity Report 0 2013-07-26 16:14:22.271087 12 LocationLotSerialNumberDetail \N \n\n Location/Lot/Serial # Detail\n LocationLotSerialNumberDetail\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code\n FROM warehous\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Warehouses')\n <? endif ?>\n AS warehouse\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n SELECT itemloc_id,\n 1 as type,\n warehous_code,\n CASE WHEN (location_id IS NULL) THEN text('N/A')\n ELSE formatLocationName(location_id)\n END AS locationname,\n CASE WHEN (location_id IS NULL) THEN text('')\n ELSE firstLine(location_descrip)\n END AS f_descrip,\n CASE WHEN (itemsite_controlmethod NOT IN ('L', 'S')) THEN text('N/A')\n ELSE formatlotserialnumber(itemloc_ls_id)\n END AS lotserial,\n formatQty(itemloc_qty) AS f_qty,\n CASE WHEN (location_id IS NULL) THEN text('N/A')\n WHEN (location_netable) THEN text('Yes')\n ELSE text('No')\n END AS f_netable,\n CASE WHEN (itemsite_perishable) THEN formatDate(itemloc_expiration)\n ELSE text('N/A')\n END AS f_expiration\n FROM itemsite, warehous,\n itemloc LEFT OUTER JOIN location ON (itemloc_location_id=location_id)\n WHERE ( ( (itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S')) )\n AND (itemloc_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if NOT exists("showZeroLevel") ?>\n AND (itemsite_qtyonhand <> 0)\n<? endif ?>\n)\nUNION\nSELECT itemsite_id,\n 2 as type,\n warehous_code,\n text('N/A') AS locationname,\n text('') AS f_descrip,\n text('N/A') AS lotserial,\n formatQty(itemsite_qtyonhand) AS f_qty,\n text('N/A') AS f_netable,\n text('N/A') AS f_expiration\n FROM itemsite, warehous\n WHERE ((NOT itemsite_loccntrl)\n AND (itemsite_controlmethod NOT IN ('L', 'S'))\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if NOT exists("showZeroLevel") ?>\n AND (itemsite_qtyonhand <> 0)\n<? endif ?>\n)\nORDER BY warehous_code, locationname, lotserial;\n \n \n 222\n \n \n \n \n \n 100\n 145\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n 100\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n 7\n \n \n 37\n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 37\n \n \n 70\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_descrip\n \n \n \n \n 640\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n 5\n 30\n 745\n 30\n 0\n \n \n \n 418\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n lotserial\n \n \n \n \n 418\n 15\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_expiration\n \n \n \n \n 10\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 330\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_netable\n \n \n \n \n 70\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locationname\n \n \n \n
\n \n 17\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2008-07-25 16:06:24.132696 414 ReturnAuthorizationForm \N \n\n Return Authorization Form\n ReturnAuthorizationForm\n \n \n \n \n \n \n Parameter Query\n watermark\n \n 25\n \n Letter\n \n 50\n 50\n 50\n 50\n \n GroupHead\n SELECT remitto.*,\n TEXT(rahead_number) AS number,\n formatDate(rahead_authdate) AS f_authdate,\n cust_number,\n rahead_billtoname,\n formatAddr(rahead_billtoaddress1, rahead_billtoaddress2, rahead_billtoaddress3, ( rahead_billtocity || ' ' || rahead_billtostate || ' ' || rahead_billtozip ), rahead_billtocountry) AS f_billtoaddress,\n rahead_shipto_name,\n formatAddr(rahead_shipto_address1, rahead_shipto_address2, rahead_shipto_address3, ( rahead_shipto_city || ' ' || rahead_shipto_state || ' ' || rahead_shipto_zipcode ), rahead_shipto_country) AS f_shiptoaddress\nFROM remitto, cust, rahead\nWHERE ( (rahead_cust_id=cust_id)\n AND (rahead_id=<? value("rahead_id") ?>) );\n \n \n Detail\n SELECT raitem_linenumber,\n formatQty(raitem_qtyauthorized) AS f_qtyauthorized,\n uom_name AS invuom,\n item_number,\n item_descrip1,\n item_descrip2,\n CASE\n WHEN raitem_disposition='C' THEN\n 'Credit'\n WHEN raitem_disposition='R' THEN\n 'Return'\n WHEN raitem_disposition='P' THEN\n 'Replace'\n WHEN raitem_disposition='V' THEN\n 'Service'\n WHEN raitem_disposition='S' THEN\n 'Ship'\n END AS f_disposition,\n formatPrice(raitem_unitprice / COALESCE(raitem_price_invuomratio,1)) AS f_unitprice,\n formatMoney(round((raitem_qtyauthorized * raitem_qty_invuomratio) * (raitem_unitprice / COALESCE(raitem_price_invuomratio,1)),2)) AS f_extprice,\n raitem_notes\nFROM raitem, itemsite, item, uom\nWHERE ((raitem_rahead_id=<? value("rahead_id") ?>)\n AND (raitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (raitem_qty_uom_id=uom_id))\nORDER BY raitem_linenumber;\n \n \n foot\n SELECT formatMoney(SUM(round((raitem_qtyauthorized * raitem_qty_invuomratio) * (raitem_unitprice / COALESCE(raitem_price_invuomratio,1)),2))) AS f_extprice\nFROM raitem\nWHERE (raitem_rahead_id=<? value("rahead_id") ?>);\n \n \n GroupExtended\n SELECT formatMoney(calcRaAmt(<? value("rahead_id") ?>)) AS f_totalcredit,\n formatMoney(rahead_misc) AS f_misc,\n formatMoney(calcRaTaxAmt(<? value("rahead_id") ?>)) AS f_tax,\n formatMoney(rahead_freight) AS f_freight,\n rahead_notes,\n rahead_misc_descrip\nFROM rahead\nWHERE (rahead_id=<? value("rahead_id") ?>);\n \n \n currency\n SELECT\n curr_symbol\nFROM\n rahead,\n curr_symbol\nWHERE (rahead_id = <? value("rahead_id") ?>) AND\n rahead_curr_id = curr_id;\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n \n 386\n \n \n 10\n 45\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n remitto_address2\n \n \n \n 55\n 375\n 850\n 375\n 2\n \n \n \n \n \n 10\n 25\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n remitto_address1\n \n \n \n \n \n \n \n 432\n 207\n 300\n 20\n \n 0\n \n Arial\n 12\n normal\n \n \n \n \n GroupHead\n f_shiptoaddress\n \n \n \n \n 10\n 5\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n remitto_name\n \n \n \n \n \n 55\n 190\n 270\n 20\n \n \n Luciduxsans\n 12\n 48\n \n \n \n \n GroupHead\n rahead_billtoname\n \n \n \n \n 55\n 125\n 100\n 20\n \n \n Luciduxsans\n 12\n 48\n \n \n \n \n GroupHead\n number\n \n \n \n \n \n 10\n 85\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n remitto_phone\n \n \n \n \n 233\n 5\n 136\n 70\n \n stretch\n \n logo\n image_data\n \n \n \n \n 55\n 207\n 300\n 20\n \n 0\n \n Arial\n 12\n normal\n \n \n \n \n GroupHead\n f_billtoaddress\n \n \n \n \n 10\n 65\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n remitto_citystatezip\n \n \n \n \n 467\n 150\n 190\n 20\n \n \n Luciduxsans\n 12\n 48\n \n \n \n \n GroupHead\n cust_number\n \n \n \n \n \n \n \n \n \n \n 432\n 190\n 300\n 20\n \n \n Luciduxsans\n 12\n 48\n \n \n \n \n GroupHead\n rahead_shipto_name\n \n \n \n \n 467\n 125\n 185\n 20\n \n \n Luciduxsans\n 12\n 48\n \n \n \n \n GroupHead\n f_authdate\n \n \n \n
\n items\n \n \n Detail\n \n 96\n \n \n 50\n 5\n 120\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_qtyauthorized\n \n \n \n \n 260\n 35\n 300\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n item_descrip2\n \n \n \n \n \n 385\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_disposition\n \n \n \n \n 171\n 5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n invuom\n \n \n \n \n 540\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_unitprice\n \n \n \n \n 260\n 5\n 120\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n item_number\n \n \n \n \n 492\n 5\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 75\n 60\n 365\n 11\n \n 0\n \n Arial\n 8\n normal\n \n \n \n \n Detail\n raitem_notes\n \n \n \n \n 650\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_extprice\n \n \n \n \n 260\n 25\n 300\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n item_descrip1\n \n \n \n
\n \n \n 126\n \n \n 20\n 25\n 540\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n rahead_notes\n \n \n \n \n 640\n 45\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_misc\n \n \n \n \n 605\n 45\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n \n 640\n 65\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_tax\n \n \n \n \n 605\n 85\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 20\n 45\n 540\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n rahead_misc_descrip\n \n \n \n \n \n 640\n 85\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_totalcredit\n \n \n \n \n 640\n 25\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n GroupExtended\n f_freight\n \n \n \n \n 605\n 65\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n \n \n \n 605\n 5\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n \n 640\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n f_extprice\n \n \n \n \n 605\n 25\n 31\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n currency\n curr_symbol\n \n \n \n
\n \N 0 2008-07-25 16:06:24.132696 94 MaterialUsageVarianceByBOMItem \N \n\n Material Usage Variance By BOM Item\n MaterialUsageVarianceByBOMItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT parent.item_number AS parent_number,\n parent.item_descrip1 AS parent_descrip1,\n parent.item_descrip2 AS parent_descrip2,\n puom.uom_name AS parent_invuom,\n child.item_number AS comp_number,\n child.item_descrip1 AS comp_descrip1,\n child.item_descrip2 AS comp_descrip2,\n cuom.uom_name AS comp_invuom,\n bomitem_seqnumber as comp_seqnumber,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse\n FROM item as parent, item as child, uom AS puom, uom AS cuom, bomitem\n WHERE ((parent.item_id=<? value("item_id") ?>)\n AND (parent.item_inv_uom_id=puom.uom_id)\n AND (bomitem_item_id=child.item_id)\n AND (child.item_inv_uom_id=cuom.uom_id)\n AND (bomitem_id=<? value("bomitem_id") ?>) );\n\n \n \n detail\n SELECT formatDate(posted) AS f_posted,\n formatQty(ordered) AS f_ordered,\n formatQty(received) AS f_produced,\n formatQty(projreq) AS f_projreq,\n formatQtyPer(projqtyper) AS f_projqtyper,\n formatQty(actiss) AS f_actiss, \n formatQtyPer(actqtyper) AS f_actqtyper,\n formatQtyPer(actqtyper - projqtyper) AS f_qtypervar,\n CASE WHEN (actqtyper=projqtyper) THEN formatPrcnt(0)\n WHEN (projqtyper=0) THEN formatPrcnt(actqtyper)\n ELSE formatPrcnt((1 - (actqtyper / projqtyper)) * -1)\n END AS f_percent\n FROM ( SELECT womatlvar_posted AS posted,\n womatlvar_qtyord AS ordered,\n womatlvar_qtyrcv AS received,\n (womatlvar_qtyrcv * (womatlvar_qtyper * (1 + womatlvar_scrap))) AS projreq,\n womatlvar_qtyper AS projqtyper,\n (womatlvar_qtyiss) AS actiss, (womatlvar_qtyiss / (womatlvar_qtyrcv * (1 + womatlvar_scrap))) AS actqtyper \n FROM womatlvar, itemsite AS component,\n itemsite AS parent\n WHERE ((womatlvar_parent_itemsite_id=parent.itemsite_id)\n AND (womatlvar_component_itemsite_id=component.itemsite_id)\n AND (womatlvar_bomitem_id=<? value("bomitem_id") ?>)\n AND (womatlvar_posted BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("warehous_id") ?>\n AND (component.itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n )\n ) AS data\nORDER BY posted;\n \n \n 237\n \n \n 80\n 140\n 50\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n comp_seqnumber\n \n \n \n 5\n 227\n 745\n 227\n 2\n \n \n \n 140\n 180\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 360\n 60\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n parent_invuom\n \n \n \n \n \n \n \n \n 140\n 60\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n parent_number\n \n \n \n \n 360\n 120\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n comp_invuom\n \n \n \n \n \n \n \n 140\n 80\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n parent_descrip1\n \n \n \n \n \n 140\n 120\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n comp_number\n \n \n \n \n 140\n 160\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n comp_descrip2\n \n \n \n \n \n \n \n \n \n \n 140\n 140\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n comp_descrip1\n \n \n \n \n 140\n 100\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n parent_descrip2\n \n \n \n \n \n \n 7\n \n \n 22\n \n \n \n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 250\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projreq\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_percent\n \n \n \n \n 165\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_produced\n \n \n \n \n 85\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 415\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actiss\n \n \n \n \n 5\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 330\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projqtyper\n \n \n \n \n 493\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actqtyper\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervar\n \n \n \n
\n \n 17\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 184 UsageStatisticsByItemGroup \N \n\n Item Usage Statistics by Item Group\n UsageStatisticsByItemGroup\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate,\n <? if exists("itemgrp_id") ?>\n ( SELECT (itemgrp_name || '-' || itemgrp_descrip)\n FROM itemgrp\n WHERE (itemgrp_id=<? value("itemgrp_id") ?>) )\n <? elseif exists("itemgrp_pattern") ?>\n text(<? value("itemgrp_pattern") ?>)\n <? else ?>\n text('All Item Groups')\n <? endif ?>\n AS itemgroup,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM warehous\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n \n \n detail\n usageStatistics\n detail\n \n \n 221\n \n \n \n \n \n \n \n \n \n \n \n \n \n 140\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 140\n 100\n 250\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n itemgroup\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 550\n 120\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 550\n 100\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 665\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_transfer\n \n \n \n \n 65\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 585\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_adjust\n \n \n \n \n 425\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_sold\n \n \n \n \n 65\n 30\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 65\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 505\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scrap\n \n \n \n \n 345\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_issued\n \n \n \n \n 260\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_received\n \n \n \n
\n \n 16\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2010-06-01 10:51:07.944564 96 MaterialUsageVarianceByComponentItem \N \n\n Material Usage Variance By Component Item\n MaterialUsageVarianceByComponentItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate\n FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=<? value("component_item_id") ?>);\n\n \n \n detail\n workOrderVariance\n material\n \n \n 234\n \n \n \n \n \n \n 120\n 120\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n \n 590\n 120\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n \n \n 120\n 80\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 340\n 80\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n 120\n 100\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n 120\n 145\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n 590\n 100\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 580\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actqtyper\n \n \n \n \n 85\n 15\n 400\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n parentdescrip\n \n \n \n \n 5\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 494\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projqtyper\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 494\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projreq\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actiss\n \n \n \n \n 315\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervarpercent\n \n \n \n \n 400\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_received\n \n \n \n \n 85\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n parentitemnumber\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervar\n \n \n \n
\n \n 16\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 453 MetaSQLMasterList \N \n\n List of MetaSQL statements\n MetaSQLMasterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 100\n 100\n 100\n 100\n \n Detail\n metasqls\n detail\n \n \n 100\n \n \n
\n Detail\n \n \n Detail\n \n 27.4992\n \n \n 100\n 0\n 100\n 12.5\n \n \n Arial\n 9\n bold\n \n \n \n \n Detail\n metasql_group\n \n \n \n \n 200\n 0\n 150\n 12.5\n \n \n Arial\n 9\n bold\n \n \n \n \n Detail\n metasql_name\n \n \n \n \n 350\n 0\n 300\n 14\n \n 12\n \n Arial\n 9\n normal\n \n \n \n \n Detail\n metasql_notes_qttooltiprole\n \n \n \n \n 0\n 0\n 100\n 12.5\n \n \n Arial\n 9\n bold\n \n \n \n \n Detail\n pkgname\n \n \n \n
\n \n 65.9806\n \n \n \n 330\n 22.5008\n 100\n 25\n \n \n Arial\n 10\n normal\n \n \n \n \n Context Query\n page_count\n \n \n \n \n 200\n 22.5008\n 100\n 25\n \n \n Arial\n 10\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 431 APApplications \N \n\n A/P Applications\n APApplications\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("showChecks") ?>\n <? if exists("showCreditMemos") ?>\n 'Show Checks and Credit Memos'\n <? else ?>\n 'Show Checks'\n <? endif ?>\n <? elseif exists("showCreditMemos") ?>\n 'Show Credit Memos'\n <? else ?>\n ''\n <? endif ?> AS f_show,\n <? if exists("vend_id") ?>\n 'Vendor:' AS f_label, vend_number AS f_value\n <? elseif exists("vendtype_id") ?>\n 'Vendor Type:' AS f_label, vendtype_code AS f_value\n <? elseif exists("vendtype_pattern") ?>\n 'Vendor Type matches:' AS f_label,\n <? value("vendtype_pattern") ?> AS f_value\n <? else ?>\n 'Vendors:' AS f_label, 'All' AS f_value\n <? endif ?>\n<? if exists("vend_id") ?>\n FROM vendinfo\n WHERE vend_id=<? value("vend_id") ?>\n<? elseif exists("vendtype_id") ?>\n FROM vendtype\n WHERE vendtype_id=<? value("vendtype_id")\n<? endif ?>\n;\n \n \n detail\n apApplications\n detail\n \n \n 146\n \n 5\n 140\n 745\n 140\n 2\n \n \n \n 565\n 63\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n 565\n 83\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n 10\n 63\n 139\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n f_label\n \n \n \n \n 159\n 83\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_show\n \n \n \n \n \n \n \n \n 157\n 63\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_value\n \n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 5\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_number\n \n \n \n \n 620\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 200\n 0\n 81\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_postdate\n \n \n \n \n 500\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apapply_target_docnumber\n \n \n \n \n 700\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currAbbr\n \n \n \n \n 340\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apapply_source_docnumber\n \n \n \n \n 90\n 0\n 115\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 291\n 0\n 40\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apapply_source_doctype_qtdisplayrole\n \n \n \n \n 460\n 0\n 40\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apapply_target_doctype_qtdisplayrole\n \n \n \n
\n \n 16\n \n \n \n 104\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 16\n \n \n 585\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n base_applied\n \n money\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 331 AddressesMasterList \N \n\n Addresses Master List\n AddressesMasterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT * \nFROM (\nSELECT 'Contact' AS type, cntct_first_name AS first,\n cntct_last_name AS last, crmacct_number, cntct_phone AS phone,\n cntct_email AS email, cntct_fax AS fax, addr.*\nFROM addr, cntct LEFT OUTER JOIN crmacct ON (cntct_crmacct_id=crmacct_id)\nWHERE (cntct_addr_id=addr_id)\nUNION\nSELECT 'Ship-To' AS type, shipto_num AS first,\n shipto_name AS last, crmacct_number, '' AS phone,\n '' AS email, '' AS fax, addr.*\nFROM addr, shiptoinfo LEFT OUTER JOIN crmacct ON (shipto_cust_id=crmacct_cust_id\n)\nWHERE (shipto_addr_id=addr_id)\nUNION\nSELECT 'Vendor' AS type, vend_number AS first,\n vend_name AS last, crmacct_number, '' AS phone,\n '' AS email, '' AS fax, addr.*\nFROM addr, vendinfo LEFT OUTER JOIN crmacct ON (vend_id=crmacct_vend_id)\nWHERE (vend_addr_id=addr_id)\nUNION\nSELECT 'Vendor Address' AS type, vendaddr_code AS first,\n vendaddr_name AS last, crmacct_number, '' AS phone,\n '' AS email, '' AS fax, addr.*\nFROM addr, vendaddrinfo LEFT OUTER JOIN crmacct ON (vendaddr_vend_id=crmacct_vend_id)\nWHERE (vendaddr_addr_id=addr_id)\nUNION\nSELECT 'Site' AS type, warehous_code AS first,\n warehous_descrip AS last, '' AS crmacct_number, '' AS phone,\n '' AS email, '' AS fax, addr.*\nFROM addr, whsinfo\nWHERE (warehous_addr_id=addr_id)\n\nUNION\nSELECT '' AS type, '' AS first, '' AS last,\n '' AS crmacct_number, '' AS phone,\n '' AS email,\n '' AS fax, addr.*\nFROM addr\nWHERE addr_id NOT IN (\n SELECT cntct_addr_id FROM cntct WHERE (cntct_addr_id IS NOT NULL)\n UNION SELECT shipto_addr_id FROM shiptoinfo WHERE (shipto_addr_id IS NOT NULL) \n UNION SELECT vend_addr_id FROM vendinfo WHERE (vend_addr_id IS NOT NULL)\n UNION SELECT vendaddr_addr_id FROM vendaddrinfo WHERE (vendaddr_addr_id IS NOT NULL)\n UNION SELECT warehous_addr_id FROM whsinfo WHERE (warehous_addr_id IS NOT NULL))\n) data\n<? foreach("char_id_text_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_text_list") ?> ON ((charass_alias<? literal("char_id_text_list") ?>.charass_target_type='ADDR') \n AND (charass_alias<? literal("char_id_text_list") ?>.charass_target_id=addr_id)\n AND (charass_alias<? literal("char_id_text_list") ?>.charass_char_id=<? value("char_id_text_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_text_list") ?> ON (charass_alias<? literal("char_id_text_list") ?>.charass_char_id=char_alias<? literal("char_id_text_list") ?>.char_id)\n<? endforeach ?>\n<? foreach("char_id_list_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_list_list") ?> ON ((charass_alias<? literal("char_id_list_list") ?>.charass_target_type='ADDR') \n AND (charass_alias<? literal("char_id_list_list") ?>.charass_target_id=addr_id)\n AND (charass_alias<? literal("char_id_list_list") ?>.charass_char_id=<? value("char_id_list_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_list_list") ?> ON (charass_alias<? literal("char_id_list_list") ?>.charass_char_id=char_alias<? literal("char_id_list_list") ?>.char_id)\n<? endforeach ?>\n<? foreach("char_id_date_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_date_list") ?> ON ((charass_alias<? literal("char_id_date_list") ?>.charass_target_type='ADDR') \n AND (charass_alias<? literal("char_id_date_list") ?>.charass_target_id=addr_id)\n AND (charass_alias<? literal("char_id_date_list") ?>.charass_char_id=<? value("char_id_date_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_date_list") ?> ON (charass_alias<? literal("char_id_date_list") ?>.charass_char_id=char_alias<? literal("char_id_date_list") ?>.char_id)\n<? endforeach ?>\nWHERE true\n<? if not exists("showInactive") ?> AND addr_active <? endif ?>\n<? literal("charClause") ?>\nORDER BY addr_country, addr_state, addr_city,\n addr_postalcode, addr_line1, addr_line2,\n addr_line3, type, last, first;\n \n \n 156\n \n \n \n \n \n \n 6.33333\n 150.333\n 995.333\n 150.333\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 36\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 38\n \n \n \n \n \n \n \n \n 5\n 31\n 992\n 31\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n Address\n addr_id\n \n 22\n \n \n 375\n 5\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_city\n \n \n \n \n 750\n 5\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_postalcode\n \n \n \n \n 625\n 5\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_country\n \n \n \n \n 140\n 5\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_line2\n \n \n \n \n 10\n 5\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_line1\n \n \n \n \n 500\n 5\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_state\n \n \n \n \n 270\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_line3\n \n \n \n \n \n \n detail\n \n 12\n \n \n 375\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n last\n \n \n \n \n 750\n 0\n 120\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fax\n \n \n \n \n 500\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n crmacct_number\n \n \n \n \n 625\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n phone\n \n \n \n \n 270\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n first\n \n \n \n \n 875\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n email\n \n \n \n \n 140\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n type\n \n \n \n
\n \n 17\n \n \n 90\n -1\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 945\n -1\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 433 ItemLocationsByWarehouse \N \n\n Item Locations By Warehouse\n ItemLocationsByWarehouse\n Item Locations By Warehouse\n \n \n \n A4\n \n 50\n 50\n 33\n 33\n \n detail\n DisplayItemLocations\n DisplayItemLocations\n \n \n \n 104\n \n \n \n \n \n \n 7\n 85\n 755\n 20\n \n \n \n \n \n 29\n \n \n \n 7\n 6\n 755\n 20\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 29\n \n \n 250\n 5\n 155\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n location_name\n \n \n \n \n 10\n 5\n 60\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 400\n 5\n 125\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n lsnumber\n \n \n \n \n 650\n 5\n 104\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n itemloc_expiration\n \n \n \n \n 100\n 5\n 165\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n item_number\n \n \n \n \n 530\n 5\n 85\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n itemloc_qty\n \n \n \n
\n \n 53\n \n \n 715\n 10\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 10\n 10\n 756\n 10\n 0\n \n \n \n 85\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n Item Locations By Warehouse 10 2010-03-10 16:00:58.15233 418 PackingList-Shipment \N \n\n Packing List (Shipment)\n PackingList-Shipment\n Non-Hybrid version - driven only by shiphead_id parameter - Packing List showing the contents of a particular shipment - Shows RA# if SO is a replacement order for and RA\n \n \n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 25\n 25\n 25\n 25\n \n head\n SELECT shiphead_number, 'S/O #:' AS ordertype,\n cohead_number AS ordernumber,\n formatsobarcode(cohead_id) AS order_barcode,\n COALESCE(shiphead_shipvia, cohead_shipvia) AS shipvia,\n cohead_shiptophone AS shiptophone,\n cohead_custponumber,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_shipcomments AS shipcomments, \n cohead_billtoname AS billtoname,\n formataddr(cohead_billtoaddress1, cohead_billtoaddress2,\n cohead_billtoaddress3,\n (cohead_billtocity || ' ' || cohead_billtostate ||\n ' ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address,\n cohead_shiptoname AS shiptoname,\n formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2,\n cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate ||\n ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n\n cust_number,\n trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n cntct_phone AS cust_phone,\n terms_descrip\n FROM shiphead\n JOIN cohead ON (cohead_id=shiphead_order_id)\n JOIN custinfo ON (cohead_cust_id=cust_id)\n JOIN terms ON (cohead_terms_id=terms_id)\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n WHERE (shiphead_id=<? value("shiphead_id") ?>)\n\n<? if exists("MultiWhs") ?>\nUNION\nSELECT shiphead_number, 'T/O #:' AS ordertype,\n tohead_number AS ordernumber,\n formattobarcode(tohead_id) AS order_barcode,\n shiphead_shipvia AS shipvia,\n tohead_destphone AS shiptophone,\n TEXT(' ') AS cohead_custponumber,\n formatDate(tohead_orderdate) AS orderdate,\n tohead_shipcomments AS shipcomments,\n tohead_srcname AS billtoname,\n formataddr(tohead_srcaddress1, tohead_srcaddress2,\n tohead_srcaddress3,\n (tohead_srccity || ' ' || tohead_srcstate ||\n ' ' || tohead_srcpostalcode), tohead_srccountry) AS billing_address,\n tohead_destname AS shiptoname,\n formataddr(tohead_destaddress1, tohead_destaddress2,\n tohead_destaddress3,\n (tohead_destcity || ' ' || tohead_deststate ||\n ' ' || tohead_destpostalcode), tohead_destcountry) AS shipping_address,\n 'Transfer Order' AS cust_number,\n tohead_destcntct_name AS cust_contact,\n tohead_destphone AS cust_phone,\n '' AS terms_descrip\n FROM shiphead, tohead\n WHERE ((tohead_id=shiphead_order_id)\n AND (shiphead_order_type='TO')\n AND (shiphead_id=<? value("shiphead_id") ?>)\n)\n<? endif ?>;\n \n \n scheddate\n SELECT formatDate(MIN(coitem_scheddate)) AS scheddate\n FROM coitem, shipitem\n WHERE ((coitem_status <> 'X')\n AND (coitem_id=shipitem_orderitem_id)\n AND (shipitem_shiphead_id=<? value("shiphead_id") ?>));\n \n \n detail\n SELECT 1 AS groupby,\n coitem_linenumber AS sortline, coitem_subnumber AS sortsubline,\n formatsolinenumber(coitem_id) AS linenumber,\n coitem_memo AS memo,\n CASE WHEN (coitem_custpn != '') THEN coitem_custpn\n ELSE item_number\n END AS item_number,\n formatitemsitebarcode(itemsite_id) AS item_barcode,\n formatsoitembarcode(coitem_id) AS orderitem_barcode,\n-- In 2.3 replaced the next line:\n-- uom_name,\n-- with:\n (select uom_name from uom where uom_id = coitem_qty_uom_id) AS uom_name,\n itemsellinguom(item_id) AS shipuom,\n CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip1\n ELSE item_descrip1\n END AS item_descrip1,\n CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip2\n ELSE item_descrip2\n END AS item_descrip2,\n\n formatQty(coitem_qtyord) AS ordered,\n (SELECT formatQty(SUM(shipitem_qty)) FROM shipitem WHERE ((shipitem_shiphead_id=<? value("shiphead_id") ?>) AND (shipitem_orderitem_id=coitem_id))) AS shipped,\n\n CASE WHEN (coitem_status='O' AND (SELECT cust_creditstatus\n FROM custinfo,cohead\n WHERE coitem_cohead_id=cohead_id\n AND (cust_id=cohead_cust_id))='H') THEN 'H'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=coitem_linenumber)\n AND (cohead_id=coitem_cohead_id))) >= coitem_qtyord)) THEN 'I'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=coitem_linenumber)\n AND (cohead_id=coitem_cohead_id))) > 0)) THEN 'P'\n WHEN (coitem_status='O' AND (itemsite_qtyonhand - qtyAllocated(itemsite_id, CURRENT_DATE)\n + qtyOrdered(itemsite_id, CURRENT_DATE))\n >= (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) THEN 'R'\n ELSE coitem_status\n END AS f_status,\n CASE\n WHEN (getPacklistItemLotSerial(shipitem_shiphead_id, coitem_id) = '') THEN\n ''\n ELSE\n 'Serial #/Lot Information:'\n END AS lotserial_title,\n getPacklistItemLotSerial(shipitem_shiphead_id, coitem_id) AS lotserial,\n CASE\n WHEN (getPacklistCharName(shipitem_shiphead_id, coitem_id) = '') THEN\n ''\n ELSE\n 'Characteristics:'\n END AS char_title,\n getPacklistCharName(shipitem_shiphead_id, coitem_id) AS char_name,\n getPacklistCharValue(shipitem_shiphead_id, coitem_id) AS char_value\n FROM shipitem\n JOIN coitem ON (coitem_id=shipitem_orderitem_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=item_inv_uom_id)\n LEFT OUTER JOIN itemalias ON (itemalias_item_id=item_id AND itemalias_number=coitem_custpn) \n WHERE ( (coitem_status <> 'X')\n AND (shipitem_shiphead_id=<? value("shiphead_id") ?>)\n)\n<? if exists("MultiWhs") ?>\nUNION\nSELECT 2 AS groupby,\n toitem_linenumber AS sortline, 0 AS sortsubline,\n CAST(toitem_linenumber AS text) AS linenumber,\n toitem_notes AS memo,\n item_number,\n formatitemsitebarcode(itemsite_id) AS item_barcode,\n formattoitembarcode(toitem_id) AS orderitem_barcode,\n uom_name,\n itemsellinguom(item_id) AS shipuom,\n item_descrip1,\n item_descrip2,\n\n formatQty(toitem_qty_ordered) AS ordered,\n\n (SELECT formatQty(SUM(shipitem_qty))\n FROM shipitem\n WHERE ((shipitem_shiphead_id=<? value("shiphead_id") ?>)\n AND (shipitem_orderitem_id=toitem_id))\n ) AS shipped,\n\n toitem_status AS f_status,\n CASE\n WHEN (getPacklistItemLotSerial(shiphead_id, toitem_id) = '') THEN\n ''\n ELSE\n 'Serial #/Lot Information:'\n END AS lotserial_title,\n getPacklistItemLotSerial(shiphead_id, toitem_id) AS lotserial,\n '' AS char_title,\n '' AS char_name,\n '' AS char_value\n FROM itemsite, item, toitem, tohead, shipitem, shiphead, uom\n WHERE ((toitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (item_id=itemsite_item_id)\n AND (toitem_tohead_id=tohead_id)\n AND (toitem_status <> 'X')\n AND (tohead_src_warehous_id=itemsite_warehous_id)\n AND (toitem_id=shipitem_orderitem_id)\n AND (shipitem_shiphead_id=shiphead_id)\n AND (shiphead_order_type='TO')\n AND (shiphead_id=<? value("shiphead_id") ?>)\n)\n<? endif ?>\nORDER BY sortline, sortsubline;\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n so_ra_relation\n --added in 2.3 to show RA link to S/O if the SO\n--was created as the result of a replacement RA\n<? if exists("EnableReturnAuth") ?>\nselect \n'RA #' AS ratext,\nrahead_number\nfrom\nrahead, cohead, shiphead\nwhere \nrahead_new_cohead_id = cohead_id\nand cohead_id = shiphead_order_id\nand shiphead_id = <? value("shiphead_id") ?>;\n<? else ?>\nselect \n'' AS ratext,\n'' AS rahead_number\n<? endif ?>\n \n \n 463\n \n \n 375\n 0\n 425\n 100\n \n stretch\n \n logo\n image_data\n \n \n \n \n 170\n 112\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n ordernumber\n \n \n \n \n \n \n \n \n 170\n 175\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n 375\n 202\n 307\n 25\n \n 3of9\n 20\n \n 0.01\n \n head\n cohead_custponumber\n \n \n \n \n \n 480\n 285\n 300\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n shiptoname\n \n \n \n 0\n 425\n 797\n 425\n 0\n \n \n \n \n \n \n \n 375\n 175\n 177\n 25\n \n 3of9\n 10\n \n 0.01\n \n head\n cust_number\n \n \n \n \n 170\n 85\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n shiphead_number\n \n \n \n \n 10\n 145\n 150\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n so_ra_relation\n ratext\n \n \n \n \n 10\n 112\n 150\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n ordertype\n \n \n \n \n \n 480\n 305\n 300\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n shipping_address\n \n \n \n \n \n 480\n 252\n 300\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n shipvia\n \n \n \n \n 455\n 400\n 320\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n terms_descrip\n \n \n \n \n 170\n 231\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n orderdate\n \n \n \n \n 170\n 202\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n 0\n 455\n 797\n 455\n 0\n \n \n \n \n \n \n 375\n 112\n 231\n 25\n \n 128\n 10\n \n 0.01\n \n head\n order_barcode\n \n \n \n \n 90\n 285\n 300\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n billtoname\n \n \n \n \n 170\n 252\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n scheddate\n scheddate\n \n \n \n \n \n \n 170\n 145\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n so_ra_relation\n rahead_number\n \n \n \n \n \n 112\n 400\n 250\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n cust_contact\n \n \n \n \n 90\n 305\n 300\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n billing_address\n \n \n \n \n
\n detail\n \n characteristic\n linenumber\n \n 35\n \n \n 130\n 5\n 195\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n char_name\n \n \n \n \n 10\n 5\n 103\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n char_title\n \n \n \n \n 370\n 5\n 195\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n char_value\n \n \n \n \n \n lotserial\n linenumber\n \n 29\n \n \n 10\n 5\n 185\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n lotserial_title\n \n \n \n \n 228\n 5\n 550\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n lotserial\n \n \n \n \n \n line\n linenumber\n \n 82\n \n \n \n 430\n 0\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n shipped\n \n \n \n \n 70\n 55\n 665\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n memo\n \n \n \n \n 80\n 0\n 200\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_number\n \n \n \n 545\n 15\n 595\n 15\n 1\n \n \n \n 290\n 0\n 40\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n 340\n 0\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n ordered\n \n \n \n \n 80\n 35\n 300\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 670\n 0\n 50\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n f_status\n \n \n \n \n 415\n 20\n 380\n 30\n \n 128\n 15\n \n 0.01\n \n detail\n item_barcode\n \n \n \n \n 80\n 20\n 300\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 5\n 0\n 42\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n linenumber\n \n \n \n \n \n \n \n detail\n \n 9\n \n
\n
\n packlist\n \n \n head\n \n 41\n \n \n 5\n 10\n 625\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n head\n shipcomments\n \n \n \n 5\n 5\n 842\n 5\n 0\n \n \n
\n \n 57\n \n \n 455\n 7\n 80\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n ordernumber\n \n \n \n \n \n \n 735\n 5\n 45\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 5\n 95\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 365\n 7\n 80\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n ordertype\n \n \n \n \n 94\n \n \n 540\n 70\n 790\n 70\n 0\n \n \n \n 160\n 70\n 407\n 70\n 0\n \n \n
\n Non-Hybrid version - driven only by shiphead_id parameter - Packing List showing the contents of a particular shipment - Shows RA# if SO is a replacement order for and RA 0 2013-07-26 16:14:22.271087 57 CapacityUOMsByProductCategory \N \n\n Capacity UOMs by Product Category\n CapacityUOMsByProductCategory\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT prodcat_code,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n itemcapuom(item_id) AS capuom,\n formatRatio(itemcapinvrat(item_id)) AS capratio,\n itemaltcapuom(item_id) AS altcapuom,\n formatRatio(itemaltcapinvrat(item_id)) AS altcapratio,\n itemsellinguom(item_id) AS shipuom,\n formatRatio(iteminvpricerat(item_id)) AS shipratio\n FROM item, prodcat, uom\n WHERE ((item_sold)\n AND (item_inv_uom_id=uom_id)\n AND (item_prodcat_id=prodcat_id)\n<? if exists("prodcat_id") ?>\n AND (prodcat_id=<? value("prodcat_id") ?>)\n<? elseif exists("prodcat_pattern") ?>\n AND (prodcat_code ~ <? value("prodcat_pattern") ?>)\n<? endif ?>\n)\nORDER BY prodcat_code, item_number;\n \n \n \n head\n SELECT <? if exists("prodcat_id") ?>\n ( SELECT (prodcat_code||'-'||prodcat_descrip)\n FROM prodcat\n WHERE (prodcat_id=<? value("prodcat_id") ?>) )\n <? elseif exists("prodcat_pattern") ?>\n text(<? value("prodcat_pattern") ?>)\n <? else ?>\n text('All Product Categories')\n <? endif ?>\n AS prodcat;\n \n \n 234\n \n \n \n \n \n \n \n \n \n \n \n \n 160\n 120\n 483\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prodcat\n \n \n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n \n \n 6\n \n \n 36\n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 600\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipratio\n \n \n \n \n 5\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prodcat_code\n \n \n \n \n 70\n 15\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 500\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n altcapratio\n \n \n \n \n 70\n 0\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 600\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipuom\n \n \n \n \n 400\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n capratio\n \n \n \n \n 300\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 500\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n altcapuom\n \n \n \n \n 70\n 30\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 400\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n capuom\n \n \n \n
\n \n 16\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 53 PendingBOMChanges \N \n\n Pending Bill of Material Changes\n PendingBOMChanges\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n uom_name,\n item_descrip1,\n item_descrip2,\n CASE WHEN (<? value("cutOffDate") ?> >= date('2099-12-31')) THEN text('Latest')\n ELSE formatDate(<? value("cutOffDate") ?>)\n END AS cutoffdate\n FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n \n \n \n detail\n SELECT formatDate(bomitem_effective) as actiondate,\n 'Effective' AS action,\n bomitem_seqnumber, item_number, uom_name,\n item_descrip1, item_descrip2, uom_name,\n formatQty(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyfxd)) AS qtyfxd,\n formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper)) AS qtyper,\n formatScrap(bomitem_scrap) AS scrap,\n formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd + bomitem_qtyper) * (1 + bomitem_scrap))) AS qtyreq,\n formatDate(bomitem_effective, 'Always') AS effective,\n formatDate(bomitem_expires, 'Never') AS expires,\n formatBoolYN(bomitem_createwo) AS createchild,\n CASE WHEN (bomitem_issuemethod='S') THEN 'Push'\n WHEN (bomitem_issuemethod='L') THEN 'Pull'\n WHEN (bomitem_issuemethod='M') THEN 'Mixed'\n ELSE 'Special'\n END AS issuemethod\n FROM bomitem(<? value("item_id") ?>,<? value("revision_id") ?>), item, uom\n WHERE ((bomitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (bomitem_effective BETWEEN CURRENT_DATE AND <? value("cutOffDate") ?>)\n)\nUNION\nSELECT formatDate(bomitem_expires) as actiondate,\n 'Expires' AS action,\n bomitem_seqnumber, item_number, uom_name,\n item_descrip1, item_descrip2, uom_name,\n formatQty(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyfxd)) AS qtyfxd,\n formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper)) AS qtyper,\n formatScrap(bomitem_scrap) AS scrap,\n formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper + (1 * bomitem_scrap))) AS qtyreq,\n formatDate(bomitem_effective, 'Always') AS effective,\n formatDate(bomitem_expires, 'Never') AS expires,\n formatBoolYN(bomitem_createwo) AS createchild,\n CASE WHEN (bomitem_issuemethod='S') THEN 'Push'\n WHEN (bomitem_issuemethod='L') THEN 'Pull'\n WHEN (bomitem_issuemethod='M') THEN 'Mixed'\n ELSE 'Special'\n END AS issuemethod\nFROM bomitem(<? value("item_id") ?>,<? value("revision_id") ?>), item, uom\nWHERE ((bomitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (bomitem_expires BETWEEN CURRENT_DATE AND <? value("cutOffDate") ?>)\n)\nORDER BY action, actiondate, bomitem_seqnumber;\n \n \n \n bomhead\n SELECT bomhead_docnum, bomhead_revision, formatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=<? value("item_id") ?>)\n AND (bomhead_rev_id=<? value("revision_id") ?>));\n \n \n 234\n \n \n \n \n 120\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n 475\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n f_revisiondate\n \n \n \n \n \n 430\n 55\n 110\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cutoffdate\n \n \n \n \n \n 120\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n \n \n 475\n 160\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_revision\n \n \n \n \n \n 120\n 160\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n \n 475\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_docnum\n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 53\n \n \n 100\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n actiondate\n \n \n \n \n 5\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n action\n \n \n \n \n 600\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n scrap\n \n \n \n \n 600\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createchild\n \n \n \n \n 254\n 30\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 675\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issuemethod\n \n \n \n \n 254\n 0\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 254\n 15\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 675\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyreq\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 560\n 0\n 38\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 484\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyper\n \n \n \n \n 204\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bomitem_seqnumber\n \n \n \n \n 485\n 14\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyfxd\n \n \n \n
\n \n 18\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 299 BankrecHistory \N \n\n Bank Reconciliation History\n BankrecHistory\n \n Letter\n \n 50\n 50\n 50\n 50\n \n reconciled\n bankrecHistory\n reconciled\n \n \n head\n SELECT (bankaccnt_name || '-' || bankaccnt_descrip) AS f_bankaccnt,\n (formatDate(bankrec_opendate) || '-' || formatDate(bankrec_enddate)) AS f_bankrec,\n bankrec_username AS f_username, formatDate(bankrec_created) AS f_created,\n formatDate(bankrec_opendate) AS f_opendate,\n formatDate(bankrec_enddate) AS f_enddate,\n formatMoney(bankrec_openbal) AS f_openbal,\n formatMoney(bankrec_endbal) AS f_endbal,\n text('Opening Balance') AS f_opendescrip,\n text('Ending Balance') AS f_enddescrip\n FROM bankrec, bankaccnt\n WHERE ((bankrec_bankaccnt_id=bankaccnt_id)\n AND (bankrec_id=<? value("bankrec_id") ?>));\n \n \n Subtotal\n SELECT \n formatMoney(COALESCE(MAX(selrec.bankrec_endbal) +\n SUM(currtolocal(bankaccnt_curr_id,gltrans_amount,gltrans_date) * -1),0)) AS amount\n FROM gltrans\n JOIN bankaccnt ON (bankaccnt_accnt_id = gltrans_accnt_id)\n JOIN bankrec selrec ON ((selrec.bankrec_bankaccnt_id = bankaccnt_id)\n AND (selrec.bankrec_id=<? value("bankrec_id") ?>))\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='GL')\n AND (bankrecitem_source_id=gltrans_id))\n LEFT OUTER JOIN bankrec actrec ON (actrec.bankrec_id = bankrecitem_bankrec_id)\n WHERE ((COALESCE(actrec.bankrec_postdate,endoftime()) > COALESCE(selrec.bankrec_postdate,now()))\n AND (gltrans_doctype='CK'))\n \n \n ActualAmount\n SELECT \n formatMoney(COALESCE(MAX(selrec.bankrec_endbal) +\n SUM(currtolocal(bankaccnt_curr_id,gltrans_amount,gltrans_date) * -1),0)) AS amount\n FROM gltrans\n JOIN bankaccnt ON (bankaccnt_accnt_id = gltrans_accnt_id)\n JOIN bankrec selrec ON ((selrec.bankrec_bankaccnt_id = bankaccnt_id)\n AND (selrec.bankrec_id=<? value("bankrec_id") ?>))\n LEFT OUTER JOIN bankrecitem ON ((bankrecitem_source='GL')\n\n AND (bankrecitem_source_id=gltrans_id))\n LEFT OUTER JOIN bankrec actrec ON (actrec.bankrec_id = bankrecitem_bankrec_id)\n WHERE (COALESCE(actrec.bankrec_postdate,endoftime()) > COALESCE(selrec.bankrec_postdate,now()))\n \n \n unreconciled\n bankrecHistory\n unreconciled\n \n \n 166\n \n \n \n \n 100\n 148\n 535\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_opendescrip\n \n \n \n \n \n 145\n 65\n 220\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_bankrec\n \n \n \n 5\n 115\n 745\n 115\n 2\n \n \n \n \n 145\n 50\n 245\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_bankaccnt\n \n \n \n \n 475\n 65\n 220\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_created\n \n \n \n \n \n \n 9\n 148\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_opendate\n \n \n \n \n 475\n 50\n 220\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_username\n \n \n \n \n \n \n 644\n 148\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_openbal\n \n \n \n \n \n \n 0\n \n \n 31\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n reconciled\n \n reconciled-group\n amount_xtnumericrole\n \n 21\n \n \n 645\n 3.28\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_endbal\n \n \n \n \n 10\n 3.28\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_enddate\n \n \n \n \n 100\n 3.28\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_enddescrip\n \n \n \n \n \n reconciled-type\n sort\n \n 27\n \n \n 10\n 6.78\n 94\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n reconciled\n type\n \n \n \n \n 18\n \n \n 645\n 2\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n reconciled\n amount\n \n qty\n \n \n \n 438\n 2\n 168\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n reconciled\n type\n \n \n \n \n \n \n \n reconciled\n \n 18\n \n \n 206\n 0\n 430\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n reconciled\n notes\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n reconciled\n f_amount\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n reconciled\n f_date\n \n \n \n \n 100\n -0.182\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n reconciled\n gltrans_docnumber\n \n \n \n
\n
\n unreconciled\n \n unreconciled-group\n amount_xtnumericrole\n \n 33\n \n \n \n 136.499\n \n \n \n \n \n \n \n 642\n 25.4985\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_endbal\n \n \n \n \n 642\n 41.5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n unreconciled\n rtcheck\n \n money\n \n \n \n \n 641\n 57.5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Subtotal\n amount\n \n \n \n \n 642\n 73.5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n unreconciled\n rtdep\n \n money\n \n \n \n 641\n 89.5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n unreconciled\n rtadj\n \n money\n \n \n \n 641\n 105\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n ActualAmount\n amount\n \n \n \n \n \n \n unreconciled-type\n type\n \n 26.0233\n \n \n 10\n 4.9\n 94\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n unreconciled\n type\n \n \n \n \n \n \n unreconciled\n \n 21.9767\n \n \n 204\n 0.687\n 430\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n unreconciled\n notes\n \n \n \n \n 10\n 0.687\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n unreconciled\n f_date\n \n \n \n \n 98.5\n 0.687\n 94\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n unreconciled\n gltrans_docnumber\n \n \n \n \n 643\n 0.687\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n unreconciled\n f_amount\n \n \n \n
\n \n 15\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 80\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 143\n \n
\n \N 0 2013-07-26 16:14:22.271087 211 CashReceiptsEditList \N \n\n Cash Receipt Edit List\n CashReceiptsEditList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT cashrcpt_id, 1 AS orderBy,\n cust_number, cust_name,\n formatDate(cashrcpt_distdate) AS f_distdate,\n CASE WHEN (cashrcpt_fundstype = 'C') THEN <? value("check") ?>\n WHEN (cashrcpt_fundstype = 'T') THEN <? value("certifiedCheck") ?>\n WHEN (cashrcpt_fundstype = 'M') THEN <? value("masterCard") ?>\n WHEN (cashrcpt_fundstype = 'V') THEN <? value("visa") ?>\n WHEN (cashrcpt_fundstype = 'A') THEN <? value("americanExpress") ?>\n WHEN (cashrcpt_fundstype = 'D') THEN <? value("discoverCard") ?>\n WHEN (cashrcpt_fundstype = 'R') THEN <? value("otherCreditCard") ?>\n WHEN (cashrcpt_fundstype = 'K') THEN <? value("cash") ?>\n WHEN (cashrcpt_fundstype = 'W') THEN <? value("wireTransfer") ?>\n ELSE <? value("other") ?>\n END AS f_fundstype,\n 'C/R' AS doctype,\n cashrcpt_docnumber AS docnumber,\n cashrcpt_amount AS amount,\n formatMoney(cashrcpt_amount) AS f_amount,\n 0 AS detailedamount,\n formatMoney(0) AS f_detailedamount,\n bankaccnt_name\nFROM cashrcpt, bankaccnt, custinfo\nWHERE ( (cashrcpt_bankaccnt_id=bankaccnt_id)\n AND (cashrcpt_cust_id=cust_id)\n AND (NOT cashrcpt_posted)\n AND (NOT cashrcpt_void) )\n\nUNION\nSELECT cashrcpt_id, 2 AS orderBy,\n '' AS cust_number, '' AS cust_name,\n '' AS f_distdate,\n '' AS f_fundstype,\n aropen_doctype AS doctype,\n aropen_docnumber AS docnumber,\n 0 AS amount,\n formatMoney(0) AS f_amount,\n cashrcptitem_amount AS detailedamount,\n formatMoney(cashrcptitem_amount) AS f_detailedamount,\n '' AS bankaccnt_name\nFROM cashrcptitem, cashrcpt, aropen\nWHERE ( (cashrcptitem_cashrcpt_id=cashrcpt_id)\n AND (cashrcptitem_aropen_id=aropen_id)\n AND (NOT cashrcpt_posted)\n AND (NOT cashrcpt_void) )\n\nUNION\nSELECT cashrcpt_id, 3 AS orderBy,\n '' AS cust_number, '' AS cust_name,\n '' AS f_distdate,\n '' AS f_fundstype,\n 'Misc.' AS doctype,\n (formatGLAccount(accnt_id) || '-' || accnt_descrip) AS docnumber,\n 0 AS amount,\n formatMoney(0) AS f_amount,\n cashrcptmisc_amount AS detailedamount,\n formatMoney(cashrcptmisc_amount) AS f_detailedamount,\n '' AS bankaccnt_name\nFROM cashrcptmisc, cashrcpt, accnt\nWHERE ( (cashrcptmisc_cashrcpt_id=cashrcpt_id)\n AND (cashrcptmisc_accnt_id=accnt_id)\n AND (NOT cashrcpt_posted)\n AND (NOT cashrcpt_void) )\n\nORDER BY cashrcpt_id, orderBy;\n\n\n \n \n 145\n \n \n \n \n \n \n \n \n \n 5\n 130\n 745\n 130\n 2\n \n \n \n \n \n
\n detail\n \n detail\n cashrcpt_id\n \n 18\n \n \n 540\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 85\n 0\n 130\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 615\n 0\n 125\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bankaccnt_name\n \n \n \n \n 10\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 315\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_fundstype\n \n \n \n \n 409\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n docnumber\n \n \n \n \n 229\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_distdate\n \n \n \n \n 41\n \n \n 670\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n detailedamount\n \n extprice\n \n \n \n 5\n 25\n 740\n 25\n 2\n \n \n \n \n \n \n detail\n \n 18\n \n \n 85\n 0\n 315\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n docnumber\n \n \n \n \n 15\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n doctype\n \n \n \n \n 540\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_detailedamount\n \n \n \n
\n \n 28\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 43\n \n \n 670\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n amount\n \n extprice\n \n \n \n \n 7\n 28\n 742\n 28\n 2\n \n \n
\n \N 0 2013-07-26 16:14:22.271087 3 CreditMemo \N \n\n Credit Memo\n CreditMemo\n Sales Module Credit Memo with Logo and CM Currency\n \n \n select cmhead_id, cmhead_number from cmhead;\n \n Letter\n \n 28\n 28\n 0\n 0\n \n GroupHead\n SELECT remitto.*,\n cmhead_number,\n formatDate(cmhead_docdate) AS docdate,\n cust_number,\n cust_name,\n formatAddr(cmhead_billtoaddress1, cmhead_billtoaddress2, cmhead_billtoaddress3,\n COALESCE(cmhead_billtocity,'') || ' ' || COALESCE(cmhead_billtostate,'') || ' ' || COALESCE(cmhead_billtozip,''),\n cmhead_billtocountry)\n AS f_custaddr,\n cntct_phone AS cust_phone,\n cmhead_shipto_name,\n formatAddr(cmhead_shipto_address1, cmhead_shipto_address2, cmhead_shipto_address3,\n COALESCE(cmhead_shipto_city,'') ||' '|| COALESCE(cmhead_shipto_state,'') || ' '|| COALESCE(cmhead_shipto_zipcode,''),\n cmhead_shipto_country)\n AS f_shiptoaddr,\n CASE \n WHEN (cmhead_invcnumber='-1') THEN ''\n --note: must now set explicit type for Postgres 8.3+\n --add ' '\n ELSE text(cmhead_invcnumber)\n END AS invcnumber,\n cmhead_custponumber,\n cmhead_comments,\n cmhead_misc_descrip,\n curr_symbol,\n curr_name\n FROM remitto, cmhead, curr_symbol, custinfo\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n WHERE ((cmhead_cust_id=cust_id)\n AND (cmhead_curr_id = curr_id)\n AND (cmhead_id=<? value("cmhead_id") ?>))\nORDER BY cmhead_number;\n \n \n Detail\n SELECT cmitem_linenumber,\n formatQty(cmitem_qtycredit) AS qtycredit,\n formatQty(cmitem_qtyreturned) AS qtyreturned,\n uom_name,\n item_number,\n item_descrip1,\n item_descrip2,\n formatSalesPrice(cmitem_unitprice) AS unitprice,\n formatMoney((cmitem_qtycredit * cmitem_qty_invuomratio) * (cmitem_unitprice / cmitem_price_invuomratio)) AS extprice,\n cmitem_comments\n FROM cmitem, itemsite, item, uom\n WHERE ((cmitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (cmitem_cmhead_id=<? value("cmhead_id") ?>))\nORDER BY cmitem_linenumber;\n \n \n GroupFoot\n SELECT formatExtPrice(SUM((cmitem_qtycredit * cmitem_qty_invuomratio) * cmitem_unitprice / cmitem_price_invuomratio)) AS extprice\n FROM cmhead, cmitem, itemsite, item\n WHERE ((cmitem_cmhead_id=cmhead_id)\n AND (cmitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (cmhead_id=<? value("cmhead_id") ?>));\n \n \n GroupExtended\n SELECT formatExtPrice( COALESCE(cmhead_freight,0.0) +\n ( SELECT COALESCE(SUM(tax * -1.0), 0)\n FROM ( SELECT ROUND(SUM(taxdetail_tax), 2) AS tax\n FROM tax JOIN calculateTaxDetailSummary('CM', cmhead_id, 'T')\n ON (taxdetail_tax_id=tax_id)\n GROUP BY tax_id ) AS data ) +\n COALESCE(cmhead_misc,0.0) +\n ( SELECT COALESCE(SUM((cmitem_qtycredit * cmitem_qty_invuomratio) *\n cmitem_unitprice / cmitem_price_invuomratio), 0.0)\n FROM cmitem\n WHERE (cmitem_cmhead_id=<? value("cmhead_id") ?>) ) \n ) AS totaldue,\n formatExtPrice(COALESCE(cmhead_freight,0.0)) AS freight,\n ( SELECT formatExtPrice(COALESCE(SUM(tax * -1.0), 0))\n FROM ( SELECT ROUND(SUM(taxdetail_tax), 2) AS tax\n FROM tax JOIN calculateTaxDetailSummary('CM', cmhead_id, 'T')\n ON (taxdetail_tax_id=tax_id)\n GROUP BY tax_id ) AS data ) AS tax,\n formatExtPrice(COALESCE(cmhead_misc,0.0)) AS misc\n FROM cmhead\n WHERE (cmhead_id=<? value("cmhead_id") ?>);\n\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n \n 451\n \n \n 50\n 370\n 120\n 20\n \n \n helvetica\n 12\n normal\n \n \n \n \n GroupHead\n cmhead_custponumber\n \n \n \n \n \n \n 660\n 130\n 135\n 20\n \n \n Helvetica\n 10\n normal\n \n \n \n \n GroupHead\n docdate\n \n \n \n 50\n 340\n 800\n 340\n 2\n \n \n \n \n \n 660\n 110\n 145\n 20\n \n \n Helvetica\n 10\n normal\n \n \n \n \n GroupHead\n cmhead_number\n \n \n \n \n 100\n 205\n 290\n 20\n \n \n Helvetica\n 12\n normal\n \n \n \n \n GroupHead\n cust_name\n \n \n \n 50\n 445\n 800\n 445\n 2\n \n \n \n \n 390\n 370\n 50\n 20\n \n \n helvetica\n 12\n normal\n \n \n \n \n GroupHead\n curr_symbol\n \n \n \n \n 50\n 80\n 260\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupHead\n remitto_country\n \n \n \n \n 100\n 225\n 315\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n f_custaddr\n \n \n \n \n \n \n 185\n 370\n 230\n 20\n \n \n helvetica\n 12\n normal\n \n \n \n \n GroupHead\n docdate\n \n \n \n \n 485\n 205\n 300\n 20\n \n \n Helvetica\n 12\n normal\n \n \n \n \n GroupHead\n cmhead_shipto_name\n \n \n \n \n \n \n 444\n 370\n 110\n 20\n \n \n helvetica\n 12\n normal\n \n \n \n \n GroupHead\n curr_name\n \n \n \n \n 50\n 95\n 200\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupHead\n remitto_phone\n \n \n \n \n \n \n 50\n 50\n 200\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupHead\n remitto_address1\n \n \n \n \n 485\n 225\n 315\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n GroupHead\n f_shiptoaddr\n \n \n \n \n 270\n 0\n 355\n 111\n \n stretch\n \n logo\n image_data\n \n \n \n \n \n 660\n 150\n 180\n 20\n \n \n Helvetica\n 10\n normal\n \n \n \n \n GroupHead\n cust_number\n \n \n \n \n 50\n 30\n 200\n 20\n \n \n Helvetica\n 10\n bold\n \n \n \n \n GroupHead\n remitto_name\n \n \n \n \n \n \n 50\n 65\n 260\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupHead\n remitto_citystatezip\n \n \n \n \n \n \n \n 660\n 170\n 150\n 20\n \n \n Helvetica\n 10\n normal\n \n \n \n \n GroupHead\n invcnumber\n \n \n \n
\n detail\n \n \n Detail\n \n 82\n \n \n 160\n 55\n 600\n 17\n \n 14\n \n helvetica\n 10\n normal\n \n \n \n \n Detail\n cmitem_comments\n \n \n \n \n \n 670\n 5\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n Detail\n extprice\n \n \n \n \n 50\n 25\n 120\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n Detail\n qtycredit\n \n \n \n \n 260\n 5\n 300\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n Detail\n item_number\n \n \n \n \n 175\n 5\n 80\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n Detail\n uom_name\n \n \n \n \n 260\n 25\n 300\n 15\n \n \n helvetica\n 8\n normal\n \n \n \n \n Detail\n item_descrip1\n \n \n \n \n 520\n 5\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n Detail\n unitprice\n \n \n \n \n 260\n 40\n 300\n 15\n \n \n helvetica\n 8\n normal\n \n \n \n \n Detail\n item_descrip2\n \n \n \n \n 50\n 5\n 120\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n Detail\n qtyreturned\n \n \n \n
\n \n \n 144\n \n \n \n 670\n 5\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupFoot\n extprice\n \n \n \n \n 60\n 55\n 515\n 17\n \n 14\n \n helvetica\n 10\n normal\n \n \n \n \n GroupHead\n cmhead_comments\n \n \n \n \n \n 670\n 65\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupExtended\n tax\n \n \n \n \n \n 670\n 25\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupExtended\n misc\n \n \n \n \n \n \n 670\n 45\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupExtended\n freight\n \n \n \n \n \n 670\n 85\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupExtended\n totaldue\n \n \n \n \n \n 60\n 25\n 525\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n GroupHead\n cmhead_misc_descrip\n \n \n \n
\n Sales Module Credit Memo with Logo and CM Currency 0 2013-07-26 16:14:22.271087 425 CustOrderAcknowledgement \N \n\n Customer Order Acknowledgement\n CustOrderAcknowledgement\n Customer Order Acknowledgement\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 25\n 25\n 25\n 25\n \n head\n <? if not exists("shiphead_id") ?>\n--Run query if no shiphead_id passed - No Shipment Pack List\nSELECT cust_number,\n formatsobarcode(cohead_id) AS order_barcode,\n formataddr(addr_line1, addr_line2, addr_line3, (addr_city || ' ' || addr_state || ' ' || addr_postalcode), addr_country) AS corr_address,\n formataddr(cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address, \n\n formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n\n trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n cohead_fob,\n cohead_billtoname,\n cohead_billtoaddress1,\n cohead_billtoaddress2,\n cohead_billtoaddress3,\n (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode) AS billtocitystatezip,\n cntct_phone AS cust_phone,\n cohead_shiptoname,\n cohead_shiptoaddress1,\n cohead_shiptoaddress2,\n cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n cohead_number,\n cohead_shipvia,\n cohead_shiptophone,\n cohead_custponumber,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_shipcomments, \n terms_descrip\n FROM cohead JOIN custinfo ON (cohead_cust_id=cust_id)\n JOIN terms ON (cohead_terms_id=terms_id)\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n WHERE (cohead_id=<? value("sohead_id") ?>);\n\n-------------------\n<? else ?>\n--Run New Query for Header with shipment number\n-----------------------------------------------\n\nSELECT shiphead_number,\n\n cohead_number,\n formatsobarcode(cohead_id) AS order_barcode,\n cohead_shipvia,\n cohead_shiptophone,\n cohead_custponumber,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_shipcomments, \n cohead_billtoname,\n formataddr(cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3,\n (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address,\n cohead_shiptoname,\n formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n\n cust_number,\n trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n cntct_phone AS cust_phone,\n cohead_shipchrg_id,\n shipchrg_descrip,\n\n terms_descrip\n FROM shiphead\n JOIN cohead ON (cohead_id=shiphead_order_id)\n JOIN custinfo ON (cohead_cust_id=cust_id)\n JOIN terms ON (cohead_terms_id=terms_id)\n JOIN shipchrg ON (cohead_shipchrg_id = shipchrg_id)\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n WHERE (shiphead_id=<? value("shiphead_id") ?>);\n\n<? endif ?>\n \n \n scheddate\n <? if not exists("shiphead_id") ?>\n--Query without shipment number\n\nSELECT formatDate(MIN(coitem_scheddate)) AS scheddate\n FROM coitem\n WHERE ((coitem_status <> 'X') AND (coitem_cohead_id=<? value("sohead_id") ?>));\n\n--\n<? else ?>\n--------------------------\n\n\nSELECT formatDate(MIN(coitem_scheddate)) AS scheddate\n FROM coitem, shipitem\n WHERE ((coitem_status <> 'X')\n AND (coitem_id=shipitem_orderitem_id)\n AND (shipitem_shiphead_id=<? value("shiphead_id") ?>));\n\n<? endif ?>\n \n \n detail\n salesOrderItems\n list\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n footer\n SELECT formatMoney(calcSalesOrderAmt(cohead_id, 'S')) AS f_subtotal,\n formatMoney(calcSalesOrderAmt(cohead_id, 'T')) AS f_total,\n formatMoney(calcSalesOrderAmt(cohead_id, 'B')) AS f_balance,\n formatMoney(calcSalesOrderAmt(cohead_id, 'X')) AS f_tax,\n formatMoney(calcSalesOrderAmt(cohead_id, 'C')) AS f_credit,\n formatMoney(cohead_freight) AS f_freight,\n formatMoney(cohead_misc) AS f_misc\nFROM cohead\nWHERE (cohead_id=<? value("sohead_id") ?>)\n;\n \n \n lastupdated\n SELECT formatDate(MAX(lastupdated)) AS f_lastupdated\n FROM (SELECT cohead_lastupdated AS lastupdated\n FROM cohead\n WHERE (cohead_id=<? value("sohead_id") ?>)\n UNION\n SELECT coitem_lastupdated AS lastupdated\n FROM coitem\n WHERE (coitem_cohead_id=<? value("sohead_id") ?>) ) AS data;\n \n \n 426\n \n \n 6\n 7\n 426\n 115\n \n stretch\n \n logo\n image_data\n \n \n \n 210\n 330\n 330\n 330\n 0\n \n \n \n \n 40\n 335\n 145\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n 539\n 39\n 250\n 25\n \n \n Times New Roman\n 20\n bold\n \n \n \n \n head\n cohead_number\n \n \n \n \n 470\n 330\n 647\n 330\n 0\n \n \n \n 200\n 335\n 165\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n terms_descrip\n \n \n \n 45\n 330\n 177\n 330\n 0\n \n \n \n 355\n 335\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n scheddate\n scheddate\n \n \n \n 15\n 415\n 785\n 415\n 2\n \n \n \n \n \n \n \n 360\n 330\n 440\n 330\n 0\n \n \n \n 622\n 70\n 110\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n orderdate\n \n \n \n \n 269.976\n 160.037\n 491.976\n 160.037\n 0\n \n \n \n \n 535.987\n 170.037\n 254.338\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n head\n cohead_shiptoname\n \n \n \n \n 455\n 335\n 195\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shipvia\n \n \n \n \n \n 655\n 335\n 95\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_fob\n \n \n \n \n 270.976\n 191.037\n 256\n 22.2821\n \n 10\n \n Arial\n 11\n normal\n \n \n \n \n head\n billing_address\n \n \n \n \n \n 535.987\n 190.037\n 253.562\n 20.2425\n \n 10\n \n Arial\n 11\n normal\n \n \n \n \n head\n shipping_address\n \n \n \n \n 670\n 330\n 750\n 330\n 0\n \n \n \n \n \n \n 271.976\n 170.037\n 256\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n head\n cohead_billtoname\n \n \n \n 535.987\n 160.037\n 766.987\n 160.037\n 0\n \n \n \n 17.6809\n 192.59\n 222\n 21.011\n \n 10\n \n Arial\n 11\n normal\n \n \n \n \n head\n billing_address\n \n \n \n \n 17.6809\n 171.59\n 213\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n head\n cohead_billtoname\n \n \n \n 15.8119\n 162.124\n 224.257\n 162.137\n 0\n \n \n \n
\n detail\n \n detail\n groupby\n \n 36\n \n \n 37\n 7\n 707\n 21\n \n 14\n \n Arial\n 12\n normal\n \n \n \n \n head\n cohead_shipcomments\n \n \n \n \n \n lineitem\n coitem_linenumber\n \n 6\n \n \n \n \n detail\n \n 41\n \n \n 15\n 0\n 85\n 20\n \n \n Arial\n 9\n normal\n \n \n \n \n detail\n item_number_cust\n \n \n \n \n 600\n 5\n 27\n 17\n \n \n Arial\n 9\n normal\n \n \n \n \n detail\n qty_uom\n \n \n \n \n 515\n 0\n 65\n 20\n \n \n Arial\n 9\n normal\n \n \n \n \n detail\n f_balance\n \n \n \n \n 640\n 3\n 56\n 16\n \n \n Arial\n 9\n normal\n \n \n \n \n detail\n f_price\n \n \n \n \n 125\n 25\n 435\n 12\n \n 14\n \n Arial\n 8\n normal\n \n \n \n \n detail\n coitem_memo\n \n \n \n \n 705\n 3\n 82\n 17\n \n \n Arial\n 9\n normal\n \n \n \n \n detail\n f_extprice\n \n \n \n \n 435\n 0\n 65\n 20\n \n \n Arial\n 9\n normal\n \n \n \n \n detail\n f_qtyord\n \n \n \n \n 102\n 0\n 325\n 20\n \n \n Arial\n 9\n normal\n \n \n \n \n detail\n item_descrip1_cust\n \n \n \n
\n \n \n 233\n \n \n \n \n 635\n 28\n 97\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n footer\n f_freight\n \n \n \n \n 635\n 48\n 97\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n footer\n f_misc\n \n \n \n \n \n 605\n 138\n 172\n 32\n \n \n Arial\n 16\n bold\n \n \n \n \n footer\n f_balance\n \n \n \n \n \n 640\n 8\n 92\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n footer\n f_subtotal\n \n \n \n \n \n 635\n 68\n 97\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n footer\n f_tax\n \n \n \n \n 630\n 88\n 102\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n footer\n f_total\n \n \n \n \n \n \n 630\n 108\n 102\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n footer\n f_credit\n \n \n \n \n 28\n \n
\n Customer Order Acknowledgement 0 2013-07-26 16:14:22.271087 81 PickList \N \n\n Pick List\n PickList\n \n Letter\n \n 50\n 28\n 0\n 0\n \n Head\n SELECT formatWoNumber(wo_id) AS wonumber, wo_prodnotes,\n item_number, uom_name, item_descrip1, item_descrip2,\n warehous_code, formatQty(wo_qtyord) AS qtyord,\n formatQty(wo_qtyrcv) AS qtyrcv,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate\n FROM wo, itemsite, item, whsinfo, uom\n WHERE ((wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_id=%1))\n \n \n \n Detail\n SELECT item_number,\n uom_name,\n item_descrip1,\n item_descrip2,\n formatQty(womatl_qtyreq) AS qtyreq,\n formatQty(womatl_qtyiss) AS qtyiss,\n formatQty(noNeg(womatl_qtyreq - womatl_qtyiss)) AS qtybalance,\n itemsite_location,\n CASE WHEN (womatl_issuemethod='S') THEN text('Push')\n WHEN (womatl_issuemethod='L') THEN text('Pull')\n WHEN (womatl_issuemethod='M') THEN text('Mixed')\n ELSE text(womatl_issuemethod)\n END AS f_issuemethod\n FROM womatl, itemsite, item, uom\n WHERE ((item_picklist)\n AND (womatl_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (womatl_uom_id=uom_id)\n AND (womatl_wo_id=%1) );\n \n \n \n 246\n \n \n \n 196\n 140\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n qtyord\n \n \n \n \n 653\n 65\n 150\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n wonumber\n \n \n \n \n 196\n 102\n 300\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n item_descrip2\n \n \n \n \n \n 653\n 102\n 130\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n startdate\n \n \n \n \n 653\n 84\n 130\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 653\n 121\n 130\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n duedate\n \n \n \n \n \n 196\n 65\n 200\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n item_number\n \n \n \n \n \n \n \n \n \n \n \n 196\n 158\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n qtyrcv\n \n \n \n \n 196\n 84\n 300\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n item_descrip1\n \n \n \n \n 195\n 120\n 120\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n warehous_code\n \n \n \n \n \n 10\n 240\n 822\n 240\n 2\n \n \n \n \n \n \n \n \n 6\n \n \n 47\n \n \n \n 10\n 40\n 822\n 40\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n Detail\n \n 61\n \n \n 215\n 0\n 130\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n itemsite_location\n \n \n \n \n 45\n 0\n 160\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n item_number\n \n \n \n 680\n 30\n 780\n 30\n 1\n \n \n \n 350\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n qtyreq\n \n \n \n \n 457\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n qtyiss\n \n \n \n \n 350\n 20\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n uom_name\n \n \n \n \n 46\n 37\n 300\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n item_descrip2\n \n \n \n \n 459\n 20\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_issuemethod\n \n \n \n 10\n 55\n 822\n 55\n 0\n \n \n \n 569\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n qtybalance\n \n \n \n \n 45\n 20\n 300\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n item_descrip1\n \n \n \n
\n \n 57\n \n \n \n 46\n 28\n 746\n 22\n \n 0\n \n Arial\n 12\n 48\n \n \n \n \n Head\n wo_prodnotes\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 421 PickListWOShowLocations \N \n\n Pick List WO Show Locations\n PickListWOShowLocations\n This WO Pick List Shows All Locations and Lots for Each Requirement\n \n \n \n Letter\n \n 50\n 28\n 33\n 33\n \n Head\n SELECT formatWoNumber(wo_id) AS wonumber, wo_prodnotes,\n item_number, uom_name, item_descrip1, item_descrip2,\n warehous_code, formatQty(wo_qtyord) AS qtyord,\n formatQty(wo_qtyrcv) AS qtyrcv,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate\n FROM wo, itemsite, item, whsinfo, uom\n WHERE ((wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_id=%1))\n \n \n \n Detail\n SELECT\n warehous_code, \n wo_number,\n womatl_id,\n item_number,\n item_descrip1,\n item_descrip2, \n uom_name,\n-- itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyreq AS required_qty,\n womatl_qtyreq AS required_qty,\n-- formatqty(itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyreq) AS required_fmt,\n formatqty(womatl_qtyreq) AS required_fmt,\n-- itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyiss AS issued_qty,\n womatl_qtyiss AS issued_qty,\n formatqty(womatl_qtyiss) AS issued_fmt,\n-- (itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyreq) - \n (itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyiss) AS pick_qty,\n womatl_qtyreq - womatl_qtyiss AS pick_qty, \n formatqty(womatl_qtyreq - womatl_qtyiss) AS pick_fmt,\n CASE WHEN (womatl_issuemethod='S') THEN text('Push')\n WHEN (womatl_issuemethod='L') THEN text('Pull')\n WHEN (womatl_issuemethod='M') THEN text('Mixed')\n ELSE text(womatl_issuemethod)\n END AS f_issuemethod,\n location_aisle || '-' || location_rack || '-' || location_bin || '-' || location_name AS location_name,\n formatlotserialnumber(itemloc_ls_id),\n-- itemloc_lotserial,\n itemsite_location_comments AS location_comment,\n itemloc_qty AS location_qty_qty,\n itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * itemloc_qty AS loc_issue_uom_qty,\n formatqty(itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * itemloc_qty) AS loc_issue_uom_fmt,\n CASE WHEN itemloc_expiration = '1970-01-01' THEN text ('N/A')\n WHEN itemloc_expiration = '2100-01-01' THEN text ('N/A')\n ELSE CAST(formatdate(itemloc_expiration) AS text)\n END AS expiration \n\nFROM\n\n item, uom, whsinfo, womatl, wo, itemsite\n LEFT OUTER JOIN itemloc ON (itemloc_itemsite_id = itemsite_id)\n LEFT OUTER JOIN location ON (itemloc_location_id = location_id)\n\n\nWHERE\n itemsite_item_id = item_id\n and \n itemsite_warehous_id = warehous_id\n and\n womatl_uom_id = uom_id\n and\n itemsite_id = womatl_itemsite_id\n and\n womatl_wo_id = wo_id\n and\n wo_id = <? value("wo_id") ?>\nORDER BY wo_number, womatl_id, item_number, itemloc_expiration, location_name;\n \n \n 188\n \n \n 196\n 5\n 150\n 40\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n wonumber\n \n \n \n \n 196\n 140\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n qtyord\n \n \n \n \n \n \n 195\n 120\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n warehous_code\n \n \n \n \n \n 196\n 102\n 300\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n item_descrip2\n \n \n \n \n 649\n 100\n 130\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n startdate\n \n \n \n \n 196\n 65\n 200\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n item_number\n \n \n \n \n 649\n 120\n 130\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n duedate\n \n \n \n \n 649\n 80\n 130\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 196\n 84\n 300\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n item_descrip1\n \n \n \n \n \n 196\n 158\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n Head\n qtyrcv\n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 6\n \n
\n detail_group\n \n detail_group\n womatl_id\n \n 133\n \n \n 208\n 40\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n required_fmt\n \n \n \n \n 330\n 55\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_issuemethod\n \n \n \n \n \n \n 10\n 35\n 822\n 35\n 2\n \n \n \n \n 575\n 40\n 45\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n uom_name\n \n \n \n \n \n 469\n 75\n 300\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n location_comment\n \n \n \n 80\n 100\n 817\n 100\n 1\n \n \n \n \n \n 469\n 40\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n Detail\n pick_fmt\n \n \n \n \n 37\n 60\n 195\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n item_descrip1\n \n \n \n \n 37\n 40\n 160\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n item_number\n \n \n \n \n \n \n \n 208\n 55\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n uom_name\n \n \n \n \n 37\n 75\n 300\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n Detail\n item_descrip2\n \n \n \n \n \n 330\n 40\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n issued_fmt\n \n \n \n 680\n 57\n 780\n 57\n 1\n \n \n \n \n \n \n 36\n \n 75\n 25\n 825\n 25\n 1\n \n \n 75\n 5\n 822\n 5\n 1\n \n \n \n 465\n 5\n 50\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n uom_name\n \n \n \n \n 355\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n loc_issue_uom_qty\n \n qty\n \n \n \n \n \n \n Detail\n \n 21\n \n \n 75\n 0\n 115\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n location_name\n \n \n \n \n 555\n 0\n 75\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n expiration\n \n \n \n \n 465\n 0\n 50\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n uom_name\n \n \n \n 690\n 17\n 790\n 17\n 1\n \n \n \n 215\n 0\n 115\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n formatlotserialnumber\n \n \n \n \n 355\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n loc_issue_uom_fmt\n \n \n \n
\n \n 57\n \n \n 110\n 30\n 480\n 22\n \n 0\n \n Arial\n 12\n 48\n \n \n \n \n Head\n wo_prodnotes\n \n \n \n \n
\n This WO Pick List Shows All Locations and Lots for Each Requirement 0 2013-07-26 16:14:22.271087 420 PickingListSOLocsNoClosedLines \N \n\n Picking List SO With Locations\n PickingListSOLocsNoClosedLines\n This report definition shows location / lot / serial information on an SO Pick List. If the item is not Location Controlled it shows the contents of its Location Comment in the corresponding Item Site record.\n \n \n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 25\n 25\n 25\n 25\n \n head\n SELECT cust_number,\n formatsobarcode(cohead_id) AS order_barcode,\n\n formataddr(cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address, \n\n formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n\n trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n cohead_billtoname,\n cohead_billtoaddress1,\n cohead_billtoaddress2,\n cohead_billtoaddress3,\n (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode) AS billtocitystatezip,\n cntct_phone AS cust_phone,\n cohead_shiptoname,\n cohead_shiptoaddress1,\n cohead_shiptoaddress2,\n cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n cohead_number,\n cohead_shipvia,\n cohead_shiptophone,\n cohead_custponumber,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_shipcomments, \n terms_descrip\n FROM custinfo\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n JOIN cohead ON (cohead_cust_id=cust_id)\n LEFT OUTER JOIN terms ON (cohead_terms_id=terms_id)\n WHERE (cohead_id=<? value("sohead_id") ?>)\n-- AND (cohead_id='9999')\n);\n \n \n scheddate\n SELECT formatDate(MIN(coitem_scheddate)) AS scheddate\n FROM coitem\n WHERE ((coitem_status <> 'X') AND (coitem_cohead_id=<? value("sohead_id") ?>));\n \n \n detail\n SELECT \n coitem_linenumber AS sortline, coitem_subnumber AS sortsubline,\n formatsolinenumber(coitem_id) AS linenumber,\n coitem_memo,\n item_number,\n formatitemsitebarcode(itemsite_id) AS item_barcode,\n CASE WHEN (formatLocationName(location_id) = 'N/A') THEN itemsite_location_comments || ' ' || '(comment)'\n ELSE formatLocationName(location_id)\n END AS location_name,\n itemsite_location_comments AS location_comment,\n formatlotserialnumber(itemloc_ls_id),\n formatDate(itemloc_expiration, 'N/A') AS expiration,\n itemloc_qty AS location_qty_qty,\n CASE WHEN (SELECT metric_value::boolean FROM metric WHERE metric_name = 'EnableSOReservationsByLocation') \n THEN formatQty(qtyReservedLocation(itemloc_id, 'SO', coitem_id)) \n ELSE formatQty(0) \n END AS location_reserved_qty,\n itemuomtouomratio(item_id,item_inv_uom_id, coitem_qty_uom_id) * itemloc_qty AS loc_issue_uom_qty,\n formatqty(itemuomtouomratio(item_id,item_inv_uom_id, coitem_qty_uom_id) * itemloc_qty) AS loc_issue_uom_fmt,\n coitemuom.uom_name AS uom_name,\n item_descrip1,\n item_descrip2,\n formatQty(coitem_qtyord) AS ordered,\n CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0) THEN formatQty(coitem_qtyshipped - coitem_qtyreturned)\n ELSE NULL\n END AS shipped,\n CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0) THEN formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned))\n ELSE NULL\n END AS balance,\n CASE WHEN (qtyAtShipping('SO', coitem_id) > 0.0) THEN formatQty(qtyAtShipping('SO', coitem_id))\n ELSE NULL\n END AS atShipping,\n formatQty(roundUp((coitem_qtyord * coitem_qty_invuomratio))) AS shipordered,\n formatQty(roundUp(((coitem_qtyshipped - coitem_qtyreturned) * coitem_qty_invuomratio))) AS shipshipped,\n formatQty(roundUp((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio))) AS shipbalance,\n CASE WHEN (coitem_status='O' AND cust_creditstatus='H') THEN 'H'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=CASE WHEN(coitem_subnumber > 0) THEN (coitem_linenumber * 1000) + coitem_subnumber ELSE coitem_linenumber END)\n AND (cohead_id=coitem_cohead_id))) >= coitem_qtyord)) THEN 'I'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=CASE WHEN(coitem_subnumber > 0) THEN (coitem_linenumber * 1000) + coitem_subnumber ELSE coitem_linenumber END)\n AND (cohead_id=coitem_cohead_id))) > 0)) THEN 'P'\n WHEN (coitem_status='O' AND (itemsite_qtyonhand - qtyAllocated(itemsite_id, CURRENT_DATE)\n + qtyOrdered(itemsite_id, CURRENT_DATE))\n >= (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) THEN 'R'\n ELSE coitem_status\n END AS f_status\n \n FROM coitem\n JOIN cohead ON (cohead_id = coitem_cohead_id)\n JOIN custinfo ON (cust_id = cohead_cust_id)\n JOIN itemsite ON (itemsite_id = coitem_itemsite_id)\n\t JOIN item ON (item_id = itemsite_item_id)\n\t JOIN whsinfo ON (warehous_id = itemsite_warehous_id)\n\t JOIN uom invuom ON (invuom.uom_id = item_inv_uom_id)\n\t JOIN uom coitemuom ON (coitemuom.uom_id = coitem_qty_uom_id) \n LEFT OUTER JOIN itemloc ON (itemloc_itemsite_id = itemsite_id)\n LEFT OUTER JOIN location ON (itemloc_location_id = location_id)\n WHERE ( (coitem_status <> 'X')\n AND (coitem_status <> 'C')\n AND (item_type != 'K')\n--REMOVE LINE ABOVE AND CLOSED LINES WILL BE DISPLAYED\n AND (coitem_cohead_id=<? value("sohead_id") ?>)\n)\n\nORDER BY sortline, sortsubline, expiration, location_name;\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n 467\n \n \n 375\n 5\n 425\n 85\n \n stretch\n \n logo\n image_data\n \n \n \n \n 170\n 125\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n \n \n \n 75\n 280\n 295\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n billing_address\n \n \n \n \n 5\n 425\n 797\n 425\n 0\n \n \n \n 100\n 400\n 253\n 25\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n cust_contact\n \n \n \n \n 170\n 200\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n scheddate\n scheddate\n \n \n \n \n 475\n 400\n 320\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n terms_descrip\n \n \n \n \n \n 170\n 220\n 390\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_shipvia\n \n \n \n \n 170\n 155\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n \n 170\n 95\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n \n \n \n 375\n 130\n 177\n 25\n \n 3of9\n 10\n \n 0.01\n \n head\n cust_number\n \n \n \n \n 375\n 95\n 233\n 25\n \n 128\n 10\n \n 0.01\n \n head\n order_barcode\n \n \n \n \n 170\n 180\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n orderdate\n \n \n \n \n \n 465\n 260\n 305\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_shiptoname\n \n \n \n \n \n \n \n \n \n \n \n 75\n 260\n 305\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_billtoname\n \n \n \n \n \n \n 465\n 280\n 305\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n shipping_address\n \n \n \n \n \n 375\n 160\n 307\n 25\n \n 3of9\n 20\n \n 0.01\n \n head\n cohead_custponumber\n \n \n \n
\n detail\n \n lineitems\n linenumber\n \n 132\n \n 5\n 5\n 797\n 5\n 2\n \n \n \n \n \n 30\n 25\n 285\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 20\n 10\n 200\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n \n 408\n 35\n 380\n 45\n \n 128\n 15\n \n 0.01\n \n detail\n item_barcode\n \n \n \n \n \n \n \n 225\n 10\n 85\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n \n 620\n 10\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n atshipping\n \n \n \n 135\n 75\n 175\n 75\n 0\n \n \n 75\n 75\n 112\n 75\n 0\n \n \n \n \n 75\n 95\n 112\n 95\n 0\n \n \n 252\n 75\n 295\n 75\n 0\n \n \n \n 515\n 10\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n balance\n \n \n \n 252\n 95\n 295\n 95\n 0\n \n \n 615\n 30\n 535\n 30\n 0\n \n \n 135\n 95\n 175\n 95\n 0\n \n \n \n 415\n 10\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n shipped\n \n \n \n 745\n 25\n 795\n 25\n 1\n \n \n 195\n 95\n 235\n 95\n 0\n \n \n \n 365\n 30\n 25\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n f_status\n \n \n \n \n 30\n 40\n 285\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n 195\n 75\n 235\n 75\n 0\n \n \n 70\n 120\n 793\n 120\n 0\n \n \n \n 305\n 10\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n ordered\n \n \n \n \n 29\n \n \n 490\n 5\n 50\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n 70\n 5\n 793\n 5\n 0\n \n \n \n 415\n 5\n 70\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n loc_issue_uom_qty\n \n qty\n \n \n \n \n 110\n 5\n 135\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n item_number\n \n \n \n \n \n \n \n detail\n \n 29\n \n \n 250\n 0\n 145\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n formatlotserialnumber\n \n \n \n \n 490\n 0\n 70\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n location_reserved_qty\n \n \n \n \n 415\n 0\n 70\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n loc_issue_uom_fmt\n \n \n \n 745\n 15\n 795\n 15\n 1\n \n \n \n 80\n 0\n 155\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n location_name\n \n \n \n \n 565\n 0\n 50\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n 635\n 0\n 85\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n expiration\n \n \n \n
\n \n 29\n \n \n \n \n 750\n 5\n 45\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 430\n 5\n 80\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n \n 70\n 5\n 95\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 94\n \n 0\n 0\n 203\n 0\n 2\n \n \n \n \n 215\n 35\n 580\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shipcomments\n \n \n \n 202\n 0\n 203\n 55\n 2\n \n \n 155\n 25\n 195\n 25\n 0\n \n \n \n \n 155\n 50\n 195\n 50\n 0\n \n \n 0\n 55\n 203\n 55\n 2\n \n \n
\n This report definition shows location / lot / serial information on an SO Pick List. If the item is not Location Controlled it shows the contents of its Location Comment in the corresponding Item Site record. 0 2013-07-26 16:14:22.271087 68 PricesByCustomer \N \n\n Prices By Customer\n PricesByCustomer\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT cust_name,\n addr_line1 AS cust_address1,\n addr_line2 AS cust_address2,\n addr_line3 AS cust_address3,\n <? if exists("showExpired") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showexpired,\n <? if exists("showFuture") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showfuture,\n <? if exists("showCosts") ?>\n <? if exists("actualCosts") ?>\n text('Show Costs and Margins using Actual Costs')\n <? else ?>\n text('Show Costs and Margins using Standard Costs')\n <? endif ?>\n AS f_showcosts,\n text('Cost') AS f_costlabel,\n text('Margin') AS f_marginlabel\n <? else ?>\n text('') AS f_showcosts,\n text('') AS f_costlabel,\n text('') AS f_marginlabel\n <? endif ?>\n FROM custinfo\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\nWHERE (cust_id=<? value("cust_id") ?>);\n\n \n \n detail\n SELECT itemid, sourcetype, schedulename, type, itemnumber,\n item_descrip1, item_descrip2,\n CASE WHEN (qtybreak = -1) THEN 'N/A'\n ELSE formatQty(qtybreak)\n END AS f_qtybreak,\n price, formatPrice(price) AS f_price,\n <? if exists("showCosts") ?>\n cost AS cost,\n formatCost(cost) AS f_cost,\n CASE WHEN ((price = 0) OR (cost = 0)) THEN 'N/A'\n ELSE formatScrap((price - cost) / price)\n END AS f_margin\n <? else ?>\n 0 AS cost,\n text('') AS f_cost,\n text('') AS f_margin\n <? endif ?>\nFROM (\n SELECT ipsprice_id AS itemid, 1 AS sourcetype,\n ipshead_name AS schedulename, 'Customer' AS type,\n item_number AS itemnumber, item_descrip1, item_descrip2,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM ipsass, ipshead, ipsprice, item\n WHERE ((ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n AND (ipsass_cust_id=<? value("cust_id") ?>)\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT ipsprice_id AS itemid, 2 AS sourcetype,\n ipshead_name AS schedulename, 'Cust. Type' AS type,\n item_number AS itemnumber, item_descrip1, item_descrip2,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM ipsass, ipshead, ipsprice, item, custinfo\n WHERE ((ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n AND (ipsass_custtype_id=cust_custtype_id)\n AND (cust_id=<? value("cust_id") ?>)\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT ipsprice_id AS itemid, 3 AS sourcetype,\n ipshead_name AS schedulename, ('Sale' || '-' || sale_name) AS type,\n item_number AS itemnumber, item_descrip1, item_descrip2,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM sale, ipshead, ipsprice, item\n WHERE ((sale_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n<? if not exists("showExpired") ?>\n AND (sale_enddate > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (sale_startdate <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT item_id AS itemid, 0 AS sourcetype,\n '' AS schedulename, 'List Price' AS type,\n item_number AS itemnumber, item_descrip1, item_descrip2,\n -1 AS qtybreak, (item_listprice - (item_listprice * cust_discntprcnt)) AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM item, custinfo\n WHERE ( (item_sold)\n AND (item_active)\n AND (cust_id=<? value("cust_id") ?>)\n AND (NOT item_exclusive) )\n) AS data\nORDER BY itemnumber, price;\n \n \n 236\n \n \n \n \n 565\n 120\n 114\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showfuture\n \n \n \n \n 100\n 80\n 605\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_name\n \n \n \n \n 665\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_marginlabel\n \n \n \n \n 585\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_costlabel\n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n 100\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address3\n \n \n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address1\n \n \n \n \n 405\n 140\n 335\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showcosts\n \n \n \n \n \n 565\n 100\n 114\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showexpired\n \n \n \n \n \n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address2\n \n \n \n \n \n 6\n \n \n 41\n \n \n 665\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_marginlabel\n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n 585\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_costlabel\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 10\n 30\n 240\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemnumber\n \n \n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtybreak\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cost\n \n \n \n \n 195\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n schedulename\n \n \n \n \n 505\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_price\n \n \n \n \n 10\n 15\n 240\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_margin\n \n \n \n \n 320\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n type\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 67 PricesByItem \N \n\n Prices By Item\n PricesByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n <? if exists("showExpired") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showexpired,\n <? if exists("showFuture") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showfuture,\n <? if exists("showCosts") ?>\n <? if exists("actualCosts") ?>\n text('Show Costs and Margins using Actual Costs')\n <? else ?>\n text('Show Costs and Margins using Standard Costs')\n <? endif ?>\n AS f_showcosts,\n text('Cost') AS f_costlabel,\n text('Margin') AS f_marginlabel\n <? else ?>\n text('') AS f_showcosts,\n text('') AS f_costlabel,\n text('') AS f_marginlabel\n <? endif ?>\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n SELECT itemid, sourcetype, schedulename, type, typename,\n CASE WHEN (qtybreak = -1) THEN 'N/A'\n ELSE formatQty(qtybreak)\n END AS f_qtybreak,\n price, formatPrice(price) AS f_price,\n <? if exists("showCosts") ?>\n cost AS cost,\n formatCost(cost) AS f_cost,\n CASE WHEN ((price = 0) OR (cost = 0)) THEN 'N/A'\n ELSE formatScrap((price - cost) / price)\n END AS f_margin\n <? else ?>\n 0 AS cost,\n text('') AS f_cost,\n text('') AS f_margin\n <? endif ?>\nFROM ( SELECT ipsprice_id AS itemid, 1 AS sourcetype,\n ipshead_name AS schedulename, 'Customer' AS type,\n cust_name AS typename,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM ipsass, ipshead, ipsprice, custinfo, item\n WHERE ( (ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsass_cust_id=cust_id)\n AND (ipsprice_item_id=item_id)\n AND (item_id=<? value("item_id") ?>)\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT ipsprice_id AS itemid, 2 AS sourcetype,\n ipshead_name AS schedulename, 'Cust. Type' AS type,\n (custtype_code || '-' || custtype_descrip) AS typename,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM ipsass, ipshead, ipsprice, custtype, item\n WHERE ( (ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsass_custtype_id=custtype_id)\n AND (ipsprice_item_id=item_id)\n AND (item_id=<? value("item_id") ?>)\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT ipsprice_id AS itemid, 3 AS sourcetype,\n ipshead_name AS schedulename, 'Cust. Type Pattern' AS type,\n (custtype_code || '-' || custtype_descrip) AS typename,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM ipsass, ipshead, ipsprice, custtype, item\n WHERE ( (ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0)\n AND (custtype_code ~ ipsass_custtype_pattern)\n AND (ipsprice_item_id=item_id)\n AND (item_id=<? value("item_id") ?>)\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT ipsprice_id AS itemid, 4 AS sourcetype,\n ipshead_name AS schedulename, 'Sale' AS type,\n sale_name AS typename,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM sale, ipshead, ipsprice, item\n WHERE ( (sale_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n AND (item_id=<? value("item_id") ?>)\n<? if not exists("showExpired") ?>\n AND (sale_enddate > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (sale_startdate <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT ipsprice_id AS itemid, 5 AS sourcetype,\n ipshead_name AS schedulename, 'Cust. Ship-To' AS type,\n (cust_name || '-' || shipto_num) AS typename,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM ipsass, ipshead, ipsprice, custinfo, shiptoinfo, item\n WHERE ( (ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsass_shipto_id=shipto_id)\n AND (shipto_cust_id=cust_id)\n AND (ipsprice_item_id=item_id)\n AND (item_id=<? value("item_id") ?>)\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT ipsprice_id AS itemid, 5 AS sourcetype,\n ipshead_name AS schedulename, 'Cust. Ship-To Pattern' AS type,\n (cust_name || '-' || shipto_num) AS typename,\n ipsprice_qtybreak AS qtybreak,\n ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM ipsass, ipshead, ipsprice, custinfo, shiptoinfo, item\n WHERE ( (ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0)\n AND (shipto_num ~ ipsass_shipto_pattern)\n AND (shipto_cust_id=cust_id)\n AND (ipsprice_item_id=item_id)\n AND (item_id=<? value("item_id") ?>)\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT item_id AS itemid, 0 AS sourcetype,\n 'List Price' AS schedulename, 'N/A' AS type,\n '' AS typename,\n -1 AS qtybreak,\n item_listprice AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM item\n WHERE ( (NOT item_exclusive)\n AND (item_id=<? value("item_id") ?>) ) ) AS data\nORDER BY price;\n \n \n 221\n \n \n 565\n 80\n 114\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showexpired\n \n \n \n \n 100\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 665\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_marginlabel\n \n \n \n \n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 585\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_costlabel\n \n \n \n \n \n 405\n 120\n 335\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showcosts\n \n \n \n \n \n 565\n 100\n 114\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showfuture\n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n 6\n \n \n 26\n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n 585\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_costlabel\n \n \n \n \n \n 665\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_costlabel\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 505\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_price\n \n \n \n \n 135\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n type\n \n \n \n \n 10\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n schedulename\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cost\n \n \n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtybreak\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_margin\n \n \n \n \n 240\n 0\n 185\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n typename\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 434 AROpenItem \N \n\n AROpenItem\n AROpenItem\n A report showing details of a single AR Open Item\n \n \n \n \n \n \n \n \n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT aropen_cust_id, aropen_docdate, aropen_duedate, \naropen_doctype,\nCASE WHEN (aropen_doctype = 'C' AND ((SELECT COUNT(*) AS num_rows FROM cmhead, aropen WHERE cmhead_number = aropen_ordernumber AND aropen_id = <? value("aropen_id") ?> ) = 0)) THEN 'Misc. Credit Memo'\n WHEN (aropen_doctype = 'D' AND ((SELECT COUNT(*) AS num_rows FROM cmhead, aropen WHERE cmhead_number = aropen_ordernumber AND aropen_id = <? value("aropen_id") ?> ) = 0)) THEN 'Misc. Debit Memo'\n WHEN (aropen_doctype = 'C' AND ((SELECT COUNT(*) AS num_rows FROM cmhead, aropen WHERE cmhead_number = aropen_ordernumber AND aropen_id = <? value("aropen_id") ?> ) > 0)) THEN 'Credit Memo'\n WHEN (aropen_doctype = 'D' AND ((SELECT COUNT(*) AS num_rows FROM cmhead, aropen WHERE cmhead_number = aropen_ordernumber AND aropen_id = <? value("aropen_id") ?> ) > 0)) THEN 'Debit Memo'\n END AS doc_name, \naropen_docnumber, \naropen_ordernumber, aropen_journalnumber, \naropen_amount, aropen_amount, \naropen_paid, \n(aropen_amount - aropen_paid) AS f_balance, \naropen_terms_id, aropen_salesrep_id, \naropen_commission_due, \naropen_notes, aropen_rsncode_id, aropen_salescat_id, \naropen_accnt_id, aropen_curr_id, cust_name, salesrep_name, terms_code, \nrsncode_code, formatboolyn(aropen_commission_paid) AS commission_paid \nFROM aropen \nJOIN custinfo ON(cust_id = aropen_cust_id)\nLEFT OUTER JOIN salesrep ON(aropen_salesrep_id = salesrep_id)\nLEFT OUTER JOIN terms ON(terms_id = aropen_terms_id)\nLEFT OUTER JOIN rsncode ON(rsncode_id = aropen_rsncode_id)\nWHERE (aropen_id=<? value("aropen_id") ?>)\n \n \n applications\n <? if exists("docTypeID") ?>\nSELECT arapply_id, arapply_source_aropen_id,\n CASE WHEN (arapply_source_doctype = 'C') THEN <? value("creditMemo") ?>\n WHEN (arapply_source_doctype = 'R') THEN <? value("cashdeposit") ?>\n WHEN (arapply_fundstype='C') THEN <? value("check") ?>\n WHEN (arapply_fundstype='T') THEN <? value("certifiedCheck") ?>\n WHEN (arapply_fundstype='M') THEN <? value("masterCard") ?>\n WHEN (arapply_fundstype='V') THEN <? value("visa") ?>\n WHEN (arapply_fundstype='A') THEN <? value("americanExpress") ?>\n WHEN (arapply_fundstype='D') THEN <? value("discoverCard") ?> \n WHEN (arapply_fundstype='R') THEN <? value("otherCreditCard") ?>\n WHEN (arapply_fundstype='K') THEN <? value("cash") ?>\n WHEN (arapply_fundstype='W') THEN <? value("wireTransfer") ?>\n WHEN (arapply_fundstype='O') THEN <? value("other") ?>\n END AS doctype,\n CASE WHEN (arapply_source_doctype IN ('C','R')) THEN arapply_source_docnumber\n WHEN (arapply_source_doctype = 'K') THEN arapply_refnumber\n ELSE 'Other'\n END AS docnumber,\narapply_postdate, arapply_applied, \ncurrConcat(arapply_curr_id) AS currabbr, \ncurrToBase(arapply_curr_id, arapply_applied, arapply_postdate) AS baseapplied, \n'curr' AS arapply_applied_xtnumericrole, \n'curr' AS baseapplied_xtnumericrole \nFROM arapply \nWHERE (arapply_target_aropen_id=<? value("aropen_id") ?> ) \nORDER BY arapply_postdate\n\n<? elseif exists("docTypeRC") ?>\n\nSELECT arapply_id, arapply_target_aropen_id, \n CASE WHEN (arapply_target_doctype = 'I') THEN <? value("invoice") ?>\n WHEN (arapply_target_doctype = 'D') THEN <? value("debitMemo") ?>\n WHEN (arapply_target_doctype = 'K') THEN <? value("apcheck") ?>\n WHEN (arapply_target_doctype = 'R') THEN <? value("cashreceipt") ?>\n ELSE <? value("other") ?>\n END AS doctype, \narapply_target_docnumber AS docnumber, \narapply_postdate, arapply_applied, \ncurrConcat(arapply_curr_id) AS currabbr, \ncurrToBase(arapply_curr_id, arapply_applied, arapply_postdate) AS baseapplied, \n'curr' AS arapply_applied_xtnumericrole, \n'curr' AS baseapplied_xtnumericrole \nFROM arapply \nWHERE (arapply_source_aropen_id=<? value("aropen_id") ?> )\nORDER BY arapply_postdate\n\n<? endif ?>\n \n \n 445\n \n \n 492.06\n 160.717\n 196\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_paid\n \n \n \n \n 491.06\n 184.717\n 195\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n f_balance\n \n \n \n \n 167.902\n 68.2357\n 201\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_docdate\n \n \n \n \n \n \n \n 169.06\n 233\n 175\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n rsncode_code\n \n \n \n \n \n \n 492.06\n 136\n 216\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_amount\n \n \n \n \n 494.06\n 68.8712\n 247.562\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n terms_code\n \n \n \n \n \n \n 169.06\n 160.717\n 176\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_docnumber\n \n \n \n \n 167.902\n 91.1813\n 216\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_duedate\n \n \n \n \n 167.902\n 44.9813\n 432.315\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n cust_name\n \n \n \n \n \n \n \n 169.06\n 136\n 175\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_doctype\n \n \n \n \n 87.7597\n 271.717\n 624\n 127.611\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n \n head\n aropen_notes\n \n \n \n \n 169.06\n 209\n 177\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_journalnumber\n \n \n \n \n \n 490\n 233\n 199\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n commission_paid\n \n \n \n \n \n \n 494.06\n 91.8168\n 242.264\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n salesrep_name\n \n \n \n \n \n 491.06\n 209\n 198\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_commission_due\n \n \n \n \n 169.06\n 184.717\n 176\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n head\n aropen_ordernumber\n \n \n \n \n \n \n \n \n \n \n \n 4\n 434\n 737\n 434\n 2\n \n \n \n 30.7855\n 9.22414\n 698.682\n 37.1\n \n \n Sans Serif\n 20\n bold\n \n \n \n \n head\n doc_name\n \n \n \n
\n applications_detail\n \n \n applications\n \n 23\n \n \n 8\n 1.71311\n 100\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n applications\n doctype\n \n \n \n \n 124\n 1.71311\n 100\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n applications\n docnumber\n \n \n \n \n 241\n 1.71311\n 100\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n applications\n arapply_postdate\n \n \n \n \n 352\n 1.71311\n 100\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n applications\n arapply_applied\n \n \n \n \n 474\n 1.71311\n 100\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n applications\n currabbr\n \n \n \n \n 611\n 1.71311\n 100\n 25\n \n \n Sans Serif\n 12\n normal\n \n \n \n \n applications\n baseapplied\n \n \n \n
\n
\n A report showing details of a single AR Open Item 0 2013-07-26 16:14:22.271087 296 CashReceipts \N \n\n Cash Receipts\n CashReceipts\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("cust_id") ?>\n (SELECT (cust_number || '-' || cust_name)\n FROM custinfo\n WHERE (cust_id=<? value("cust_id") ?>) )\n <? elseif exists("custtype_id") ?>\n (select (custtype_code||'-'||custtype_descrip)\n FROM custtype\n WHERE (custtype_id=<? value("custtype_id") ?>) )\n <? elseif exists("custtype_pattern") ?>\n text(<? value("custtype_pattern") ?>)\n <? else ?>\n text('All Customers')\n <? endif ?>\n AS f_value,\n <? if exists("custtype_id") ?>\n text('Cust. Type:')\n <? elseif exists("custtype_pattern") ?>\n text('Cust. Type Pattern:')\n <? else ?>\n text('Customer:')\n <? endif ?>\n AS f_label,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate;\n \n \n detail\n cashReceipts\n detail\n \n \n foot\n SELECT formatMoney(SUM(base_applied)) AS f_base_applied_total\nFROM (\n<? if exists("LegacyDisplayMode") ?>\n-- Posted cash receipts\nSELECT currtobase(arapply_curr_id,arapply_applied,arapply_postdate) AS base_applied\nFROM custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id), arapply\nWHERE ( (arapply_cust_id=cust_id)\n AND (arapply_postdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n AND (arapply_source_doctype ='K')\n<? if exists("cust_id") ?>\n AND (cust_id=<? value("cust_id") ?>)\n<? elseif exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custgrp_id") ?>\n AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n )\n\n-- Unposted cash receipts\nUNION ALL\nSELECT currtobase(cashrcpt_curr_id,cashrcpt_amount,cashrcpt_distdate) AS base_applied\nFROM cashrcpt, custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ( (NOT cashrcpt_posted)\n AND (cashrcpt_cust_id=cust_id)\n AND (cashrcpt_distdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("cust_id") ?>\n AND (cust_id=<? value("cust_id") ?>)\n<? elseif exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custgrp_id") ?>\n AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n )\n\n-- Cash Advance\nUNION ALL\nSELECT aropen_amount / aropen_curr_rate AS base_applied\nFROM custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id), aropen\n JOIN cashrcptitem ON (aropen_id=cashrcptitem_aropen_id)\nWHERE ( (aropen_cust_id=cust_id)\n AND (aropen_doctype IN ('R','C'))\n AND (aropen_docdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("cust_id") ?>\n AND (cust_id=<? value("cust_id") ?>)\n<? elseif exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custgrp_id") ?>\n AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n )\n<? else ?>\n-- New mode\nSELECT (cashrcpt_amount / cashrcpt_curr_rate) AS base_applied\nFROM cashrcpt JOIN custinfo ON (cust_id=cashrcpt_cust_id)\n<? if exists("custgrp_id") ?>\n LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n<? endif ?>\nWHERE ( (cashrcpt_distdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("cust_id") ?>\n AND (cust_id=<? value("cust_id") ?>)\n<? elseif exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custgrp_id") ?>\n AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n )\n<? endif ?>\n) data\n;\n\n \n \n 146\n \n \n 10\n 65\n 125\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n f_label\n \n \n \n \n \n \n 140\n 65\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_value\n \n \n \n \n 565\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 5\n 140\n 745\n 140\n 2\n \n \n \n 565\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 28\n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 20\n \n \n 55\n 0\n 155\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 215\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_postdate\n \n \n \n \n 600\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currAbbr\n \n \n \n \n 400\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n target\n \n \n \n \n 5\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 285\n 0\n 115\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n source\n \n \n \n \n 645\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_base_applied\n \n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_applied\n \n \n \n
\n \n 18\n \n \n \n 700.755\n 2\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 100\n \n \n \n 646\n 10.7068\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n foot\n f_base_applied_total\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 361 CountTagsByWarehouse \N \n\n Count Tags By Site\n CountTagsByWarehouse\n With Barcoded Count Tag\n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n \n \n detail\n SELECT invcnt_id,\n formatcounttagbarcode(invcnt_id) AS countag_barcode, \n invcnt_tagnumber, \n warehous_code,\n item_number, item_descrip1, item_descrip2,\n formatDate(invcnt_tagdate) AS createddate,\n invcnt_tag_username AS createdby,\n CASE WHEN (invcnt_cntdate IS NULL) THEN ''\n ELSE formatDate(invcnt_cntdate)\n END AS entereddate,\n CASE WHEN (invcnt_cntdate IS NULL) THEN ''\n ELSE invcnt_cnt_username\n END AS enteredby,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatDate(invcnt_postdate)\n END AS posteddate,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE invcnt_post_username\n END AS postedby,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatQty(invcnt_qoh_before)\n END AS qohbefore,\n CASE WHEN (invcnt_qoh_after IS NULL) THEN ''\n ELSE formatQty(invcnt_qoh_after)\n END AS qohafter,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatQty(invcnt_qoh_after - invcnt_qoh_before)\n END AS variance,\n CASE WHEN (NOT invcnt_posted) THEN ''\n WHEN ((invcnt_qoh_before = 0) AND (invcnt_qoh_after = 0)) THEN formatScrap(0)\n WHEN (invcnt_qoh_before=0) THEN formatScrap(1)\n ELSE formatScrap((1 - (invcnt_qoh_after / invcnt_qoh_before)) * -1)\n END AS percentage\n FROM invcnt, itemsite, item, whsinfo\n WHERE ((invcnt_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (DATE(invcnt_tagdate) BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if not exists("showUnposted") ?>\n AND (invcnt_posted)\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nORDER BY invcnt_tagdate;\n \n \n 246\n \n \n \n \n \n \n \n \n 100\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 494\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n 494\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n 5\n 235\n 745\n 235\n 2\n \n \n \n \n \n \n \n \n \n 12\n \n \n 71\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 60\n 745\n 60\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 113\n \n \n 419\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createdby\n \n \n \n \n 45\n 0\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 419\n 45\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohbefore\n \n \n \n \n 419\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createddate\n \n \n \n \n 5\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 5\n 40\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 590\n 45\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n variance\n \n \n \n \n 300\n 70\n 370\n 30\n \n 128\n 12\n \n \n detail\n countag_barcode\n \n \n \n \n 505\n 45\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohafter\n \n \n \n \n 295\n 0\n 104\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invcnt_tagnumber\n \n \n \n 15\n 105\n 750\n 105\n 0\n \n \n \n 505\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n entereddate\n \n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n posteddate\n \n \n \n \n 675\n 45\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n percentage\n \n \n \n \n 505\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n enteredby\n \n \n \n \n 590\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n postedby\n \n \n \n \n 5\n 25\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n
\n \n 24\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n With Barcoded Count Tag 0 2013-07-26 16:14:22.271087 305 DepositsRegister \N \n\n Deposits Register\n DepositsRegister\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("showUsernames") ?>\n text('Username')\n <? else ?>\n text('')\n <? endif ?>\n AS f_username\n \n \n detail\n SELECT trans_id,\n trans_journalnumber,\n formatDate(trans_date) AS transdate,\n trans_source,\n trans_doctype,\n trans_docnumber,\n firstLine(trans_notes) AS transnotes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n trans_username,\n formatBoolYN(trans_posted) AS f_posted,\n-- Debits:\n CASE WHEN (trans_amount < 0) THEN formatMoney(ABS(trans_amount))\n ELSE ''\n END AS f_debit, \n CASE WHEN (trans_amount < 0) THEN ABS(trans_amount)\n ELSE 0\n END AS debit_amt, \n--Credits:\n CASE WHEN (trans_amount > 0) THEN formatMoney(trans_amount)\n ELSE ''\n END AS f_credit,\n CASE WHEN (trans_amount > 0) THEN trans_amount\n ELSE 0\n END AS credit_amt,\n--Balance:\n trans_amount * -1 as balance_amt,\n--AROPEN Amount\n formatMoney(currtobase(aropen_curr_id,(aropen_amount - aropen_paid),aropen_docdate)) AS f_aropen_bal,\n currtobase(aropen_curr_id,(aropen_amount - aropen_paid),aropen_docdate) AS aropen_bal\n\nFROM (\nSELECT gltrans_id AS trans_id, gltrans_date AS trans_date, gltrans_created AS trans_created,\n gltrans_source AS trans_source, gltrans_doctype AS trans_doctype, gltrans_sequence AS trans_sequence,\n gltrans_docnumber AS trans_docnumber, gltrans_notes AS trans_notes, gltrans_amount AS trans_amount,\n gltrans_journalnumber AS trans_journalnumber, gltrans_username AS trans_username,\n gltrans_posted AS trans_posted,\n accnt_id, accnt_descrip,\n aropen_amount, aropen_paid, aropen_curr_id, aropen_docdate\nFROM gltrans LEFT OUTER JOIN aropen ON ((text(gltrans_docnumber) = 'I-' || text(aropen_docnumber))\n AND (aropen_doctype='I')), accnt\nWHERE ((gltrans_accnt_id=accnt_id)\n AND (gltrans_doctype = 'CR')\n AND (gltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) )\nUNION\nSELECT sltrans_id AS trans_id, sltrans_date AS trans_date, sltrans_created AS trans_created,\n sltrans_source AS trans_source, sltrans_doctype AS trans_doctype, sltrans_sequence AS trans_sequence,\n sltrans_docnumber AS trans_docnumber, sltrans_notes AS trans_notes, sltrans_amount AS trans_amount,\n sltrans_journalnumber AS trans_journalnumber, sltrans_username AS trans_username,\n sltrans_posted AS trans_posted,\n accnt_id, accnt_descrip,\n aropen_amount, aropen_paid, aropen_curr_id, aropen_docdate\nFROM sltrans LEFT OUTER JOIN aropen ON ((text(sltrans_docnumber) = 'I-' || text(aropen_docnumber))\n AND (aropen_doctype='I')), accnt\nWHERE ((sltrans_accnt_id=accnt_id)\n AND (sltrans_doctype = 'CR')\n AND (sltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) )\n ) AS data\n\nORDER BY trans_created DESC, trans_sequence, trans_amount;\n \n \n 206\n \n \n 0\n 200\n 1000\n 200\n 2\n \n \n \n \n \n \n \n \n \n 175\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 175\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 6\n \n \n 57\n \n \n \n \n \n \n \n \n \n \n 0\n 50\n 1000\n 50\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 21\n \n \n 12500\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n trans_doctype\n \n \n \n \n 202\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n trans_docnumber\n \n \n \n \n 892\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n trans_username\n \n \n \n \n 55\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 160\n 0\n 25\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n trans_doctype\n \n \n \n \n 310\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 490\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transnotes\n \n \n \n \n 695\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n \n 963\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 600\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n \n 0\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n trans_journalnumber\n \n \n \n \n 790\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_aropen_bal\n \n \n \n \n 120\n 0\n 25\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n trans_source\n \n \n \n
\n \n \n 78\n \n \n \n 695\n 25\n 75\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credit_amt\n \n money\n \n \n \n \n 600\n 25\n 80\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debit_amt\n \n money\n \n \n \n \n 960\n 60\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 60\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 605\n 5\n 1015\n 6\n 2\n \n \n \n 790\n 25\n 75\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n aropen_bal\n \n qty\n \n \n \n \n 21\n \n \n 960\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 487 QOH \N \n\n Quantities on Hand\n QOH\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("onlyShowPositive") ?>\n text('Only Showing Positive Quantities')\n <? elseif exists("onlyShowNegative") ?>\n text('Only Showing Negative Quantities')\n <? else ?>\n text('Showing All Quantities')\n <? endif ?>\n AS showquantities,\n <? if exists("showValue") ?>\n text('Unit Cost') AS lbl_unitcost,\n text('Value') AS lbl_value,\n text('NN Value') AS lbl_nnvalue,\n text('Cost Method') AS lbl_costmethod,\n <? else ?>\n text('') AS lbl_unitcost,\n text('') AS lbl_value,\n text('') AS lbl_nnvalue,\n text('') AS lbl_costmethod,\n <? endif ?>\n <? if exists("showValue") ?>\n <? if exists("useActualCosts") ?>\n text('Showing Actual Costs')\n <? elseif exists("useStandardCosts") ?>\n text('Showing Standard Costs')\n <? else ?>\n text('Showing Posted Costs')\n <? endif ?>\n <? else ?>\n text('')\n <? endif ?>\n AS showvalues;\n\n \n \n detail\n qoh\n detail\n \n \n total\n SELECT SUM(qoh) AS f_qoh,\n SUM(nonnetable) AS f_nonnetable,\n <? if exists("showValue") ?>\n FormatExtPrice(SUM(standardcost * qoh))\n <? else ?>\n ''\n <? endif ?>\n AS f_value,\n <? if exists("showValue") ?>\n FormatExtPrice(SUM(CASE WHEN (itemsite_loccntrl) THEN (standardcost * nonnetable)\n ELSE 0\n END))\n <? else ?>\n ''\n <? endif ?>\n AS f_nonnetvalue\nFROM ( SELECT itemsite_id, itemsite_costmethod,\n item_number,\n item_descrip1, item_descrip2, itemsite_loccntrl,\n warehous_code,\n uom_name,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel,\n itemsite_qtyonhand AS qoh,\n CASE WHEN ((itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S'))) THEN 1\n ELSE 0\n END AS detail,\n itemsite_nnqoh AS nonnetable,\n <? if exists("useActualCosts") ?>\n actcost(itemsite_item_id)\n <? elseif exists("useStandardCosts") ?>\n stdcost(itemsite_item_id)\n <? else ?>\n (itemsite_value / CASE WHEN(itemsite_qtyonhand=0) THEN 1 ELSE itemsite_qtyonhand END)\n <? endif ?>\n AS standardcost\n FROM itemsite, item, uom, whsinfo, costcat\n WHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_costcat_id=costcat_id)\n AND (itemsite_active)\n<? if exists("item_id") ?>\n AND (item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? endif ?>\n<? if exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ <? value("classcode_pattern") ?>) ) )\n<? endif ?>\n<? if exists("costcat_id") ?>\n AND (costcat_id=<? value("costcat_id") ?>)\n<? endif ?>\n<? if exists("costcat_pattern") ?>\n AND (costcat_id IN (SELECT costcat_id\n FROM costcat\n WHERE (costcat_code ~ <? value("costcat_pattern") ?>) ) )\n<? endif ?>\n<? if exists("itemgrp_id") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id FROM itemgrpitem WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n<? endif ?>\n<? if exists("itemgrp_pattern") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n AND (itemgrp_name ~ <? value("itemgrp_pattern") ?>) ) ))\n<? endif ?>\n<? if exists("onlyShowPositive") ?>\n AND (itemsite_qtyonhand > 0)\n<? elseif exists("onlyShowNegative") ?>\n AND (itemsite_qtyonhand < 0)\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n) ) AS data\n;\n\n \n \n 234\n \n \n \n 590\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_value\n \n \n \n \n 509\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unitcost\n \n \n \n \n \n 185\n 43\n 300\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showvalues\n \n \n \n 8\n 231.167\n 748\n 231.167\n 2\n \n \n \n \n \n \n 670\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_nnvalue\n \n \n \n \n \n 10\n 43\n 300\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showquantities\n \n \n \n \n 670\n 215\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_costmethod\n \n \n \n \n \n 10\n 58\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n 590\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_value\n \n \n \n \n \n 670\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_nnvalue\n \n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unitcost\n \n \n \n \n \n \n \n 670\n 15\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_costmethod\n \n \n \n \n \n \n 10\n 33.3333\n 750\n 33.3333\n 2\n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 265\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_reorderlevel\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 104\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 104\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 5\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 10\n 15\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n defaultlocation\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n \n \n \n 345\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n \n 104\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_nnvalue\n \n \n \n \n 580\n 15\n 170\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_costmethod\n \n \n \n \n 505\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cost\n \n \n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_nnqoh\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 16\n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n nnqoh\n \n qty\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n money\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_nnvalue\n \n money\n \n \n \n \n 345\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qoh\n \n qty\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 182 ReceiptsReturnsByItem \N \n\n Receipts and Returns By Item\n ReceiptsReturnsByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername,\n <? if exists("showVariances") ?>\n text('Purch. Cost') AS f_purchcost,\n text('Recv. Cost') AS f_recvcost\n <? else ?>\n text('') AS f_purchcost,\n text('') AS f_recvcost\n <? endif ?>\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n \n \n detail\n receivings\n detail\n \n \n 221\n \n \n 120\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n 455\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 120\n 155\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n 645\n 185\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_purchcost\n \n \n \n \n 645\n 200\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_recvcost\n \n \n \n \n \n 455\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n \n \n 120\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n 120\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 120\n 135\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n 645\n 20\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_recvcost\n \n \n \n \n \n \n \n 645\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_purchcost\n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 37\n \n \n 215\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemnumber\n \n \n \n \n 110\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recvdate\n \n \n \n \n 215\n 15\n 400\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemdescrip\n \n \n \n \n 418\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sense\n \n \n \n \n 5\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 110\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ponumber\n \n \n \n \n 645\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recvcost\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_purchcost\n \n \n \n \n 530\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n 5\n 30\n 745\n 30\n 0\n \n \n
\n \n 17\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 85\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 183 ReceiptsReturnsByVendor \N \n\n Receipts and Returns By Vendor\n ReceiptsReturnsByVendor\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT vend_name,\n vend_number,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername,\n <? if exists("showVariances") ?>\n text('Purch. Cost') AS f_purchcost,\n text('Recv. Cost') AS f_recvcost\n <? else ?>\n text('') AS f_purchcost,\n text('') AS f_recvcost\n <? endif ?>\nFROM vendinfo\nWHERE (vend_id=<? value("vend_id") ?>);\n \n \n detail\n receivings\n detail\n \n \n 221\n \n \n 120\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_number\n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n 455\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 645\n 185\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_purchcost\n \n \n \n \n 645\n 200\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_recvcost\n \n \n \n \n 120\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n 120\n 112\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 120\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_name\n \n \n \n \n \n 455\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n 645\n 20\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_recvcost\n \n \n \n \n \n \n \n 645\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_purchcost\n \n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 530\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_purchcost\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 215\n 15\n 400\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemdescrip\n \n \n \n \n 645\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recvcost\n \n \n \n \n 215\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemnumber\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ponumber\n \n \n \n \n 418\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sense\n \n \n \n \n 110\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recvdate\n \n \n \n \n 110\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n
\n \n 16\n \n \n \n 85\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 140 RejectCodeMasterList \N \n\n Reject Code Master List\n RejectCodeMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT rjctcode_code, rjctcode_descrip\n FROM rjctcode\nORDER BY rjctcode_code;\n \n \n 77\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 7\n \n \n 22\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n rjctcode_code\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n rjctcode_descrip\n \n \n \n
\n \n 17\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 138 ExpediteExceptionsByPlannerCode \N \n\n Expedite Exceptions by Planner Code\n ExpediteExceptionsByPlannerCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("plancode_id") ?>\n ( SELECT (plancode_code || '-' || plancode_name)\n FROM plancode\n WHERE (plancode_id=<? value("plancode_id") ?>) )\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plannercode,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM warehous\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n \n \n detail\n schedule\n expedite\n \n \n 223\n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 140\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n days\n \n \n \n \n \n \n \n \n 140\n 100\n 385\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plannercode\n \n \n \n \n \n 140\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n \n 7\n \n \n 42\n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 43\n \n \n 490\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_keydate\n \n \n \n \n 595\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n exception\n \n \n \n \n 105\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n to_warehous\n \n \n \n 5\n 33\n 745\n 33\n 0\n \n \n \n 150\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip\n \n \n \n \n 150\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 5\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n order_number\n \n \n \n \n 105\n 13\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n from_warehous\n \n \n \n
\n \n 18\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2009-08-13 10:57:41.889738 180 MRPDetail \N \n\n MRP Detail\n MRPDetail\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1, item_descrip2,\n warehous_code\n FROM item, warehous, itemsite\n WHERE ((itemsite_id=<? value("itemsite_id") ?>)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id) );\n \n \n detail\n SELECT formatDate(mpsmrpwork_startdate) || '-' || formatDate(mpsmrpwork_enddate) as period,\n formatQty(mpsmrpwork_qoh) as f_qoh,\n formatQty(mpsmrpwork_allocations) as f_allocations,\n formatQty(mpsmrpwork_orders) as f_orders,\n formatQty(mpsmrpwork_availability) as f_availability,\n formatQty(mpsmrpwork_firmed) as f_firmed,\n formatQty(mpsmrpwork_firmedavailability) as f_firmedavailability\n FROM mpsmrpwork\n WHERE (mpsmrpwork_set_id=<? value("workset_id") ?>)\nORDER BY mpsmrpwork_order;\n \n \n 221\n \n \n 140\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n 140\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n 400\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehous_code\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n 140\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n \n \n 6\n \n \n 26\n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 225\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n \n 310\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_allocations\n \n \n \n \n 10\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n 480\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_availability\n \n \n \n \n 655\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_firmedavailability\n \n \n \n \n 395\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orders\n \n \n \n \n 565\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_firmed\n \n \n \n
\n \n 16\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 690\n 0\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2009-08-13 10:57:41.889738 298 BankAdjustmentEditList \N \n\n Bank Adjustment Edit List\n BankAdjustmentEditList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT bankadj_id, (bankaccnt_name || '-' || bankaccnt_descrip) AS f_bank,\n bankadjtype_name, formatDate(bankadj_date) AS f_date, bankadj_docnumber,\n formatMoney(bankadj_amount) AS f_amount\n FROM bankadj LEFT OUTER JOIN bankaccnt ON (bankadj_bankaccnt_id=bankaccnt_id)\n LEFT OUTER JOIN bankadjtype ON (bankadj_bankadjtype_id=bankadjtype_id)\n WHERE ( (NOT bankadj_posted)\n AND (bankadj_bankaccnt_id=<? value("bankaccnt_id") ?>) );\n \n \n 121\n \n 5\n 115\n 745\n 115\n 2\n \n \n \n \n \n \n \n \n \n \n 9\n \n \n 21\n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 5\n 0\n 155\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_bank\n \n \n \n \n 165\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bankadjtype_name\n \n \n \n \n 340\n 0\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bankadj_docnumber\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 250\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_date\n \n \n \n
\n \n 18\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 454 LotSerialLabel \N \n\n Lot/Serial Label\n LotSerialLabel\n \n \n \n \n \n \n \n \n 300\n 150\n \n \n 12\n 12\n 12\n 12\n \n detail\n lotserial\n detail\n \n \n label\n lotserial\n label\n \n
\n detail\n \n \n detail\n \n 100\n \n \n 73\n 13\n 230\n 25\n \n \n Helvetica\n 12\n normal\n \n \n \n \n detail\n ls_number\n \n \n \n \n 8\n 13\n 60\n 25\n \n \n Helvetica\n 12\n normal\n \n \n \n \n label\n label\n \n \n \n \n 8\n 53\n 287\n 35\n \n 3of9\n 5\n \n 0.01\n \n detail\n lotserial_barcode\n \n \n \n
\n
\n \N 0 2010-02-25 17:06:59.078004 188 APCheck \N \n\n Sample Check Format - 3 Part - MC - Remit\n APCheck\n Sample Check Format - 3 Part - MC - Uses primary Vendor or address with names: REMIT, Remit, or remit if one exists.\n Letter\n \n 0\n 0\n 0\n 50\n \n Head\n SELECT\ncheckhead_id, checkhead_number, checkhead_for AS memo,\nformatDate(checkhead_checkdate) AS f_checkdate,\nformatMoney(checkhead_amount) AS f_amount,\nINITCAP(spellAmount(checkhead_amount, curr_id)) AS f_words,\nCASE WHEN(checkhead_void) THEN TEXT('V O I D')\n ELSE TEXT('')\nEND AS f_void,\nCASE WHEN checkhead_recip_type = 'C' THEN (SELECT cust_number\n FROM custinfo\n WHERE (cust_id=checkhead_recip_id))\n WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_code\n FROM taxauth\n WHERE (taxauth_id=checkhead_recip_id))\n WHEN checkhead_recip_type = 'V' THEN (SELECT vend_number\n FROM vendinfo\n WHERE (vend_id=checkhead_recip_id))\n ELSE 'Unknown Recipient Type'\nEND AS recip_number,\nformatAddr(CASE WHEN checkhead_recip_type = 'C' THEN\n (SELECT cntct_addr_id\n FROM cntct, custinfo\n WHERE ((cust_cntct_id=cntct_id)\n AND (cust_id=checkhead_recip_id)))\n WHEN checkhead_recip_type = 'T' THEN \n (SELECT taxauth_addr_id\n FROM taxauth\n WHERE (taxauth_id=checkhead_recip_id))\n WHEN checkhead_recip_type = 'V' THEN\n COALESCE((SELECT vendaddr_addr_id\n FROM vendaddrinfo\n WHERE ((UPPER(vendaddr_code)='REMIT')\n AND (vendaddr_vend_id=checkhead_recip_id))),\n (SELECT vend_addr_id\n FROM vendinfo\n WHERE (vend_id=checkhead_recip_id)))\n END) AS check_address,\nCASE WHEN checkhead_recip_type = 'C' THEN (SELECT cust_name\n FROM custinfo\n WHERE cust_id=checkhead_recip_id)\n WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_name\n FROM taxauth\n WHERE taxauth_id=checkhead_recip_id)\n WHEN checkhead_recip_type = 'V' THEN\n COALESCE((SELECT vendaddr_name\n FROM vendaddrinfo\n WHERE ((UPPER(vendaddr_code)='REMIT')\n AND (vendaddr_vend_id=checkhead_recip_id))),\n (SELECT vend_name\n FROM vendinfo\n WHERE (vend_id=checkhead_recip_id)))\nEND AS recip_name, \ncurr_symbol, curr_abbr, curr_name\nFROM checkhead, curr_symbol\nWHERE ((checkhead_curr_id = curr_id)\n AND (checkhead_id=<? value("checkhead_id") ?>) );\n\n \n \n TopDetail2\n SELECT --VOUCHER-------------\n 1 AS ord,\n 1 AS sequence_value,\n checkitem_invcnumber,\n checkitem_ponumber,\n formatMoney(checkitem_amount) AS f_amount,\n 'Invoice#: ' || vohead_invcnumber AS doc_number,\n formatDate(vohead_docdate) AS f_docdate,\n vohead_reference AS doc_reference,\n 'Voucher: ' || checkitem_vouchernumber AS vouchernumber,\n formatMoney(apopen_amount) AS amount,\n formatMoney(checkitem_discount) AS disc_cred\nFROM checkitem, vohead, apopen\nWHERE ((checkitem_checkhead_id= <? value("checkhead_id") ?>)\n AND (checkitem_vouchernumber = vohead_number)\n AND (apopen_docnumber = checkitem_vouchernumber)\n AND (apopen_doctype = 'V'))\n\nUNION\n\nSELECT --DEBIT MEMO -------------------------\n 2 AS ord,\n 1 AS sequence_value,\n checkitem_invcnumber,\n checkitem_ponumber,\n formatMoney(checkitem_amount) AS f_amount,\n 'Debit Memo PO#: ' || checkitem_ponumber AS doc_number,\n '' AS f_docdate,\n 'Debit Memo: ' || checkitem_vouchernumber AS doc_reference,\n checkitem_vouchernumber AS vouchernumber,\n formatMoney(apopen_amount) AS amount,\n formatMoney(checkitem_discount) AS disc_cred\nFROM checkitem, apopen\nWHERE ((checkitem_checkhead_id= <? value("checkhead_id") ?>)\n AND (checkitem_vouchernumber = apopen_docnumber)\n AND (apopen_doctype = 'D'))\n\nUNION\n\nSELECT --CREDITs--------------------------\n 3 AS ord,\n 1 AS sequence_value,\n checkitem_invcnumber,\n checkitem_ponumber,\n formatMoney(checkitem_amount) AS f_amount,\n 'Invoice#: ' || vohead_invcnumber AS doc_number,\n formatDate(vohead_docdate) AS f_docdate,\n 'Credit Applied: ' || apapply_source_doctype || ' ' ||\n apapply_source_docnumber AS doc_reference,\n 'Voucher ' || checkitem_vouchernumber AS vouchernumber,\n '' AS amount,\n formatMoney((apapply_amount)) AS disc_cred\nFROM checkitem, vohead, apapply\nWHERE ((checkitem_checkhead_id=<? value("checkhead_id") ?>)\n AND (checkitem_vouchernumber = vohead_number)\n AND (apapply_target_docnumber = checkitem_vouchernumber ))\n\nUNION \n\nSELECT --NON-VENDOR-----------------------\n 4 AS ord,\n 1 AS sequence_value,\n checkitem_invcnumber,\n checkitem_ponumber,\n formatMoney(checkitem_amount) AS f_amount,\n checkitem_invcnumber AS doc_number,\n formatDate(checkitem_docdate) AS f_docdate,\n '' AS doc_reference,\n '' AS vouchernumber,\n '' AS amount,\n '' AS disc_cred\nFROM checkhead LEFT OUTER JOIN\n checkitem ON (checkitem_checkhead_id=checkhead_id)\nWHERE ((checkhead_id=<? value("checkhead_id") ?>) \n AND (checkhead_recip_type != 'V'))\n\nUNION \n\nSELECT --BLANK LINES FOR SPACING------------------\n 5 AS ord,\n sequence_value,\n '' AS checkkitem_invcnumber,\n '' AS checkitem_ponumber,\n '' AS f_amount,\n '' AS vohead_invcnumber,\n '' AS f_docdate,\n '' AS doc_reference,\n '' AS vouchernumber,\n '' AS amount,\n '' AS disc_cred\nFROM sequence\n\nORDER BY ord \nLIMIT 16;\n \n \n 6\n \n
\n Top Detail Header\n \n \n Head\n \n 51\n \n \n 305\n 30\n 147\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 305\n 15\n 155\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n recip_name\n \n \n \n \n 5\n 45\n 805\n 45\n 0\n \n \n 51\n 7\n 51\n 7\n 0\n \n \n \n 705\n 15\n 90\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n checkhead_number\n \n \n \n \n \n \n 494\n 15\n 104\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n recip_number\n \n \n \n \n
\n
\n Top Detail\n \n \n TopDetail2\n \n 16\n \n \n 5\n 0\n 155\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n doc_number\n \n \n \n \n 610\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n disc_cred\n \n \n \n \n 310\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n docdate\n \n \n \n \n 175\n 0\n 120\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n doc_reference\n \n \n \n \n 468\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n amount\n \n \n \n
\n
\n Top Detail Amount\n \n \n Head\n \n 36\n \n \n \n 468\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n \n \n 70\n 15\n 690\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n memo\n \n \n \n \n 395\n 0\n 55\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n curr_symbol\n \n \n \n
\n
\n Apchkitem\n \n \n Head\n \n 301\n \n \n 25\n 120\n 225\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n recip_name\n \n \n \n \n 420\n 100\n 121\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n f_checkdate\n \n \n \n \n 615\n 100\n 125\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n \n 30\n 55\n 560\n 24\n \n \n Arial\n 12\n normal\n \n \n \n \n Head\n f_words\n \n \n \n \n 25\n 135\n 270\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n Head\n check_address\n \n \n \n \n 70\n 280\n 690\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n memo\n \n \n \n \n \n 560\n 100\n 55\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n curr_symbol\n \n \n \n
\n
\n Bottom Detail Header\n \n \n Head\n \n 41\n \n \n \n \n \n 520\n 0\n 104\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n recip_number\n \n \n \n \n \n 320\n 15\n 147\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 710\n 0\n 90\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n checkhead_number\n \n \n \n 0\n 35\n 800\n 35\n 0\n \n \n \n 320\n 0\n 155\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n recip_name\n \n \n \n
\n
\n Bottom Detail\n \n \n TopDetail2\n \n 16\n \n \n 175\n 0\n 155\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n doc_reference\n \n \n \n \n 5\n 0\n 160\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n doc_number\n \n \n \n \n 468\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n amount\n \n \n \n \n 610\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n disc_cred\n \n \n \n \n 340\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n TopDetail2\n docdate\n \n \n \n
\n
\n Bottom Detail Amount\n \n \n Head\n \n 37\n \n \n 70\n 15\n 690\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n memo\n \n \n \n \n 408\n 0\n 55\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n curr_symbol\n \n \n \n \n \n \n 468\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n
\n
\n Sample Check Format - 3 Part - MC - Uses primary Vendor or address with names: REMIT, Remit, or remit if one exists. 0 2013-07-26 16:14:22.271087 263 BillingSelections \N \n\n Billing Selections\n BillingSelections\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT cobmisc_id,\n cohead_id,\n COALESCE(TEXT(cobmisc_invcnumber), '?') AS docnumber,\n cohead_number,\n cust_number,\n cust_name\n FROM cobmisc, cohead, custinfo\n WHERE ((cobmisc_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (NOT cobmisc_posted) )\nORDER BY docnumber;\n \n \n 123\n \n \n \n 5\n 112\n 745\n 112\n 2\n \n \n \n \n \n \n 102\n \n \n 80\n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 110\n 1\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 5\n 1\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n \n 214\n 1\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n
\n \n 18\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 369 PickingListSONoClosedLines \N \n\n Picking List\n PickingListSONoClosedLines\n Omits Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo"\n \n \n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 25\n 25\n 25\n 25\n \n head\n SELECT cust_number,\n formatsobarcode(cohead_id) AS order_barcode,\n\n formataddr(cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address, \n\n formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n\n trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n cohead_billtoname,\n cohead_billtoaddress1,\n cohead_billtoaddress2,\n cohead_billtoaddress3,\n (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode) AS billtocitystatezip,\n cntct_phone AS cust_phone,\n cohead_shiptoname,\n cohead_shiptoaddress1,\n cohead_shiptoaddress2,\n cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n cohead_number,\n cohead_shipvia,\n cohead_shiptophone,\n cohead_custponumber,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_shipcomments, \n terms_descrip\n FROM cohead\n JOIN custinfo ON (cohead_cust_id=cust_id)\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n JOIN terms ON (cohead_terms_id=terms_id)\n WHERE (cohead_id=<? value("sohead_id") ?>);\n \n \n scheddate\n SELECT formatDate(MIN(coitem_scheddate)) AS scheddate\n FROM coitem\n WHERE ((coitem_status <> 'X') AND (coitem_cohead_id=<? value("sohead_id") ?>));\n \n \n detail\n SELECT 1 AS groupby,\n coitem_linenumber AS sortline, coitem_subnumber AS sortsubline,\n formatsolinenumber(coitem_id) AS linenumber,\n coitem_memo,\n item_number,\n formatitemsitebarcode(itemsite_id) AS item_barcode,\n (select uom_name from uom where uom_id = coitem_qty_uom_id) AS item_invuom,\n item_descrip1,\n item_descrip2,\n formatQty(coitem_qtyord) AS ordered,\n CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0) THEN formatQty(coitem_qtyshipped - coitem_qtyreturned)\n ELSE NULL\n END AS shipped,\n CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0) THEN formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned))\n ELSE NULL\n END AS balance,\n CASE WHEN (qtyAtShipping('SO', coitem_id) > 0.0) THEN formatQty(qtyAtShipping('SO', coitem_id))\n ELSE NULL\n END AS atShipping,\n formatQty(roundUp( ( SELECT COALESCE(SUM(shipitem_qty), 0)\n FROM shipitem, shiphead\n WHERE ( (shipitem_orderitem_id=coitem_id)\n AND (shipitem_shiphead_id=shiphead_id)\n AND (NOT shiphead_shipped) ) )/ CASE WHEN(itemuomratiobytype(item_id, 'Selling') = 0) THEN 1 ELSE itemuomratiobytype(item_id, 'Selling') END ) ) AS shipatshipping,\n CASE WHEN (coitem_status='O' AND (SELECT cust_creditstatus FROM custinfo,cohead WHERE coitem_cohead_id=cohead_id AND cust_id=cohead_cust_id)='H') THEN 'H'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=CASE WHEN(coitem_subnumber > 0) THEN (coitem_linenumber * 1000) + coitem_subnumber ELSE coitem_linenumber END)\n AND (cohead_id=coitem_cohead_id))) >= coitem_qtyord)) THEN 'I'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=CASE WHEN(coitem_subnumber > 0) THEN (coitem_linenumber * 1000) + coitem_subnumber ELSE coitem_linenumber END)\n AND (cohead_id=coitem_cohead_id))) > 0)) THEN 'P'\n WHEN (coitem_status='O' AND (itemsite_qtyonhand - qtyAllocated(itemsite_id, CURRENT_DATE)\n + qtyOrdered(itemsite_id, CURRENT_DATE))\n >= (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) THEN 'R'\n ELSE coitem_status\n END AS f_status\n FROM itemsite, item, uom, coitem\n WHERE ( (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (coitem_status <> 'X')\n AND (coitem_status <> 'C')\n AND (item_type != 'K')\n-- 1 REMOVE THIS AND CLOSED LINES WILL NOT DISPLAY ON PACKING LIST \n <? if exists("hide closed") ?>\n AND (coitem_status <> 'C')\n-- 2 REMOVE THIS AND CLOSED LINES WILL NOT DISPLAY ON PACKING LIST \n <? endif ?>\n AND (coitem_cohead_id=<? value("sohead_id") ?>)\n)\nGROUP BY coitem_qty_uom_id, coitem_linenumber, coitem_subnumber, coitem_id, coitem_memo, item_number, item_invuom,\n item_descrip1, item_descrip2, coitem_qtyord, coitem_qty_invuomratio, coitem_qtyshipped,\n coitem_qtyreturned, coitem_status, coitem_cohead_id,\n itemsite_id, itemsite_qtyonhand, itemsite_warehous_id, item_id\nORDER BY sortline, sortsubline;\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n 477\n \n \n 375\n 0\n 425\n 85\n \n stretch\n \n logo\n image_data\n \n \n \n \n 120\n 400\n 253\n 25\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n cust_contact\n \n \n \n \n 375\n 160\n 307\n 25\n \n 3of9\n 20\n \n 0.01\n \n head\n cohead_custponumber\n \n \n \n \n \n \n \n \n 175\n 215\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n scheddate\n scheddate\n \n \n \n \n 465\n 280\n 305\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n shipping_address\n \n \n \n \n \n \n 170\n 125\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n \n 433\n 215\n 331\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_shipvia\n \n \n \n \n \n 468\n 400\n 320\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n terms_descrip\n \n \n \n \n 170\n 155\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n \n 75\n 280\n 295\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n billing_address\n \n \n \n \n \n 375\n 95\n 233\n 25\n \n 128\n 10\n \n 0.01\n \n head\n order_barcode\n \n \n \n \n 175\n 195\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n orderdate\n \n \n \n \n \n \n 170\n 95\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n 25\n 465\n 823\n 465\n 0\n \n \n \n \n 25\n 425\n 823\n 425\n 0\n \n \n \n 465\n 260\n 305\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_shiptoname\n \n \n \n \n \n 375\n 130\n 177\n 25\n \n 3of9\n 10\n \n 0.01\n \n head\n cust_number\n \n \n \n \n \n \n \n 75\n 260\n 305\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_billtoname\n \n \n \n \n
\n detail\n \n detail\n groupby\n \n 68\n \n \n 50\n 5\n 625\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shipcomments\n \n \n \n \n \n lineitem\n linenumber\n \n 23\n \n 5\n 5\n 843\n 5\n 0\n \n \n \n \n \n detail\n \n 148\n \n \n \n 630\n 95\n 85\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n f_status\n \n \n \n \n 25\n 40\n 295\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n 190\n 110\n 280\n 110\n 0\n \n \n \n 635\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n atshipping\n \n \n \n \n 25\n 20\n 295\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n \n 100\n 120\n 700\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n coitem_memo\n \n \n \n 415\n 110\n 500\n 110\n 0\n \n \n \n \n 415\n 80\n 500\n 80\n 0\n \n \n 80\n 110\n 170\n 110\n 0\n \n \n 190\n 80\n 280\n 80\n 0\n \n \n \n 530\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n balance\n \n \n \n 305\n 110\n 395\n 110\n 0\n \n \n 305\n 80\n 395\n 80\n 0\n \n \n \n 25\n 0\n 200\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n \n 425\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n shipped\n \n \n \n \n 228\n 0\n 85\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n item_invuom\n \n \n \n 745\n 15\n 795\n 15\n 1\n \n \n 80\n 80\n 170\n 80\n 0\n \n \n \n 365\n 30\n 468\n 35\n \n 128\n 15\n \n 0.01\n \n detail\n item_barcode\n \n \n \n 632\n 80\n 720\n 80\n 0\n \n \n \n 320\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n ordered\n \n \n \n
\n \n 56\n \n \n \n 455\n 5\n 80\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n 90\n 5\n 95\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 735\n 5\n 45\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 111\n \n 185\n 25\n 363\n 25\n 0\n \n \n \n 186\n 90\n 360\n 90\n 0\n \n \n \n
\n Omits Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo" 0 2013-07-26 16:14:22.271087 476 SalesHistory \N \n\n Sales History\n SalesHistory\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT cohist_ordernumber AS sonumber,\n cohist_invcnumber AS invnumber,\n formatDate(cohist_orderdate) AS orddate,\n formatDate(cohist_invcdate, 'Return') AS invcdate,\n item_number, item_descrip1, item_descrip2,\n formatQty(cohist_qtyshipped) AS shipped,\n <? if exists("showPrices") ?>\n formatPrice(currtobase(cohist_curr_id,cohist_unitprice,cohist_invcdate)) AS unitprice,\n formatMoney(round(cohist_qtyshipped * currtobase(cohist_curr_id,cohist_unitprice,cohist_invcdate),2)) AS f_total,\n <? else ?>\n '' AS unitprice,\n '' AS f_total,\n <? endif ?>\n round(cohist_qtyshipped * currtobase(cohist_curr_id,cohist_unitprice,cohist_invcdate),2) AS total\n FROM cohist JOIN custinfo ON (cust_id=cohist_cust_id)\n JOIN salesrep ON (salesrep_id=cohist_salesrep_id)\n<? if exists("includeMisc") ?>\n LEFT OUTER JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n LEFT OUTER JOIN site() ON (warehous_id=itemsite_warehous_id)\n LEFT OUTER JOIN item ON (item_id=itemsite_item_id)\n<? else ?>\n JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n JOIN item ON (item_id=itemsite_item_id)\n<? endif ?>\n<? if exists("cohead_id") ?>\n JOIN cohead ON (cohead_number=cohist_ordernumber)\n<? endif ?>\nWHERE ( (true)\n<? if exists("includeMisc") ?>\n AND (COALESCE(cohist_misc_type, '') <> 'F')\n AND (COALESCE(cohist_misc_type, '') <> 'T')\n<? endif ?>\n<? if exists("startDate") ?>\n AND (cohist_invcdate >= <? value("startDate") ?>)\n<? endif ?>\n<? if exists("endDate") ?>\n AND (cohist_invcdate <= <? value("endDate") ?>)\n<? endif ?>\n<? if exists("shipStartDate") ?>\n AND (cohist_shipdate >= <? value("shipStartDate") ?>)\n<? endif ?>\n<? if exists("shipEndDate") ?>\n AND (cohist_shipdate <= <? value("shipEndDate") ?>)\n<? endif ?>\n<? if exists("salesrep_id") ?>\n AND (cohist_salesrep_id=<? value("salesrep_id") ?>)\n<? endif ?>\n<? if exists("shipto_id") ?>\n AND (cohist_shipto_id=<? value("shipto_id") ?>)\n<? endif ?>\n<? if exists("billToName") ?>\n AND (UPPER(cohist_billtoname) ~ UPPER(<? value("billToName") ?>))\n<? endif ?>\n<? if exists("cust_id") ?>\n AND (cohist_cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("by_custgrp" ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n<? endif ?>\n<? if exists("custgrp_id") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)))\n<? endif ?>\n<? if exists("custgrp_pattern") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ <? value("custgrp_pattern") ?>) )) )\n<? endif ?>\n\n<? if exists("item_id") ?>\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("prodcat_id") ?>\n AND (item_prodcat_id=<? value("prodcat_id") ?>)\n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n<? endif ?>\n\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("shipzone_id") ?>\n AND (cohist_shipzone_id=<? value("shipzone_id") ?>)\n<? endif ?>\n<? if exists("saletype_id") ?>\n AND (cohist_saletype_id=<? value("saletype_id") ?>)\n<? endif ?>\n<? if exists("cohead_id") ?>\n AND (cohead_id=<? value("cohead_id") ?>)\n<? endif ?>\n )\nORDER BY cohist_invcdate, item_number\n \n \n head\n SELECT <? if exists("showPrices") ?>\n text('Unit Price') AS lbl_unitprice,\n text('Total') AS lbl_total\n <? else ?>\n text('') AS lbl_unitprice,\n text('') AS lbl_total\n <? endif ?>;\n \n \n 233\n \n \n \n 665\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_total\n \n \n \n \n \n \n \n \n \n 5\n 230\n 745\n 230\n 2\n \n \n \n 585\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unitprice\n \n \n \n \n \n 15\n 48\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_total\n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unitprice\n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 355\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sonumber\n \n \n \n \n 355\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n unitprice\n \n \n \n \n 270\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orddate\n \n \n \n \n 505\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipped\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 270\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invcdate\n \n \n \n \n 355\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_total\n \n \n \n \n 110\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invnumber\n \n \n \n
\n
\n total\n \n \n showPrices\n \n 16\n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n total\n \n money\n \n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 219 ShipmentsBySalesOrder \N \n\n Shipments By Sales Order\n ShipmentsBySalesOrder\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT cohead_number AS f_sonumber,\n formatDate(cohead_orderdate) AS f_orderdate,\n cohead_custponumber AS f_ponumber,\n cust_name AS f_custname,\n cntct_phone AS f_custphone\nFROM cohead, custinfo, cntct\nWHERE ((cohead_cust_id=cust_id)\n AND (cust_cntct_id=cntct_id)\n AND (cohead_id=<? value("sohead_id") ?>));\n \n \n detail\n SELECT shiphead_id,\n coitem_id,\n formatShipmentNumber(shiphead_id) AS shiphead_number,\n formatDate(shiphead_shipdate) AS f_shipdate,\n coitem_linenumber,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n warehous_code,\n formatQty(coitem_qtyord) AS f_qtyord,\n formatQty(SUM(shipitem_qty)) AS f_qtyshipped\n FROM shipitem, shiphead, coitem, itemsite, item, uom, whsinfo\n WHERE ( (shipitem_shiphead_id=shiphead_id)\n AND (shiphead_order_type='SO')\n AND (shipitem_orderitem_id=coitem_id)\n AND (shiphead_shipped)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_status<>'X')\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (coitem_cohead_id=<? value("sohead_id") ?>)\n)\nGROUP BY shiphead_id, coitem_id,\n shiphead_shipdate, coitem_linenumber,\n item_number, item_descrip1, item_descrip2,\n uom_name, warehous_code, coitem_qtyord\nORDER BY shiphead_id DESC, coitem_linenumber DESC;\n \n \n 221\n \n \n \n \n \n 140\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_orderdate\n \n \n \n \n 140\n 155\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_ponumber\n \n \n \n \n \n \n \n \n 140\n 135\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_custphone\n \n \n \n \n 140\n 114\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_custname\n \n \n \n \n \n \n \n \n 140\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_sonumber\n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n 5\n \n \n 41\n \n \n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 240\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 185\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n coitem_linenumber\n \n \n \n \n 520\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyord\n \n \n \n \n 105\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipdate\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shiphead_number\n \n \n \n \n 600\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyshipped\n \n \n \n \n 240\n 30\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 385\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 240\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 440\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n
\n \n 15\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 475 QOHByParameterList \N \n\n Quantities on Hand by Parameter List\n QOHByParameterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("onlyShowPositive") ?>\n text('Only Showing Positive Quantities')\n <? elseif exists("onlyShowNegative") ?>\n text('Only Showing Negative Quantities')\n <? else ?>\n text('Showing All Quantities')\n <? endif ?>\n AS showquantities,\n <? if exists("showValue") ?>\n text('Unit Cost') AS lbl_unitcost,\n text('Value') AS lbl_value,\n text('NN Value') AS lbl_nnvalue,\n text('Cost Method') AS lbl_costmethod,\n <? else ?>\n text('') AS lbl_unitcost,\n text('') AS lbl_value,\n text('') AS lbl_nnvalue,\n text('') AS lbl_costmethod,\n <? endif ?>\n <? if exists("showValue") ?>\n <? if exists("useActualCosts") ?>\n text('Showing Actual Costs')\n <? elseif exists("useStandardCosts") ?>\n text('Showing Standard Costs')\n <? else ?>\n text('Showing Posted Costs')\n <? endif ?>\n <? else ?>\n text('')\n <? endif ?>\n AS showvalues;\n\n \n \n detail\n SELECT itemsite_id,\n detail,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n warehous_code,\n formatQty(reorderlevel) AS f_reorderlevel,\n formatQty(qoh) AS f_qoh,\n CASE WHEN (NOT useDefaultLocation(itemsite_id)) THEN 'None'\n ELSE defaultLocationName(itemsite_id)\n END AS defaultlocation,\n formatQty(nonnetable) AS f_nonnetable,\n <? if exists("showValue") ?>\n formatCost(standardcost)\n <? else ?>\n text('')\n <? endif ?>\n AS f_unitcost,\n <? if exists("showValue") ?>\n formatExtPrice((standardcost * qoh))\n <? else ?>\n text('')\n <? endif ?>\n AS f_value,\n <? if exists("showValue") ?>\n CASE WHEN (itemsite_loccntrl) THEN formatExtPrice((standardcost * nonnetable))\n ELSE 'N/A'\n END\n <? else ?>\n text('')\n <? endif ?>\n AS f_nonnetvalue,\n standardcost,\n qoh,\n nonnetable,\n qoh AS r_qoh,\n nonnetable AS r_nonnetable,\n <? if exists("showValue") ?>\n (standardcost * qoh)\n <? else ?>\n 0\n <? endif ?>\n AS r_value,\n <? if exists("showValue") ?>\n CASE WHEN (itemsite_loccntrl) THEN (standardcost * nonnetable)\n ELSE 0\n END\n <? else ?>\n 0\n <? endif ?>\n AS r_nonnetvalue,\n <? if exists("showValue") ?>\n <? if exists("usePostedCosts") ?>\n CASE WHEN(itemsite_costmethod='A') THEN text('Average')\n WHEN(itemsite_costmethod='S') THEN text('Standard')\n WHEN(itemsite_costmethod='J') THEN text('Job')\n WHEN(itemsite_costmethod='N') THEN text('None')\n ELSE text('UNKNOWN')\n END\n <? else ?>\n text('')\n <? endif ?>\n <? else ?>\n text('')\n <? endif ?>\n AS f_costmethod\nFROM ( SELECT itemsite_id, itemsite_costmethod,\n item_number,\n item_descrip1, item_descrip2, itemsite_loccntrl,\n warehous_code,\n uom_name,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel,\n itemsite_qtyonhand AS qoh,\n CASE WHEN ((itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S'))) THEN 1\n ELSE 0\n END AS detail,\n itemsite_nnqoh AS nonnetable,\n <? if exists("useActualCosts") ?>\n actcost(itemsite_item_id)\n <? elseif exists("useStandardCosts") ?>\n stdcost(itemsite_item_id)\n <? else ?>\n (itemsite_value / CASE WHEN(itemsite_qtyonhand=0) THEN 1 ELSE itemsite_qtyonhand END)\n <? endif ?>\n AS standardcost\n FROM itemsite, item, uom, warehous, costcat\n WHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_costcat_id=costcat_id)\n AND (itemsite_active)\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? endif ?>\n<? if exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ <? value("classcode_pattern") ?>) ) )\n<? endif ?>\n<? if exists("costcat_id") ?>\n AND (costcat_id=<? value("costcat_id") ?>)\n<? endif ?>\n<? if exists("costcat_pattern") ?>\n AND (costcat_id IN (SELECT costcat_id\n FROM costcat\n WHERE (costcat_code ~ <? value("costcat_pattern") ?>) ) )\n<? endif ?>\n<? if exists("itemgrp_id") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id FROM itemgrpitem WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n<? endif ?>\n<? if exists("itemgrp_pattern") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id\n FROM itemgrpitem, itemgrp\n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n AND (itemgrp_name ~ <? value("itemgrp_pattern") ?>) ) ))\n<? endif ?>\n<? if exists("onlyShowPositive") ?>\n AND (itemsite_qtyonhand > 0)\n<? elseif exists("onlyShowNegative") ?>\n AND (itemsite_qtyonhand < 0)\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n) ) AS data\nORDER BY warehous_code, item_number;\n\n \n \n 234\n \n \n \n 590\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_value\n \n \n \n \n 509\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unitcost\n \n \n \n \n \n 185\n 43\n 300\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showvalues\n \n \n \n 8\n 231.167\n 748\n 231.167\n 2\n \n \n \n \n \n \n 670\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_nnvalue\n \n \n \n \n \n 10\n 43\n 300\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showquantities\n \n \n \n \n 670\n 215\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_costmethod\n \n \n \n \n \n 10\n 58\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n 590\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_value\n \n \n \n \n \n 670\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_nnvalue\n \n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unitcost\n \n \n \n \n \n \n \n 670\n 15\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_costmethod\n \n \n \n \n \n \n 10\n 33.3333\n 750\n 33.3333\n 2\n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 265\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_reorderlevel\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 104\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 104\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 5\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 10\n 15\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n defaultlocation\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n \n \n \n 345\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n \n 104\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_nonnetvalue\n \n \n \n \n 670\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_costmethod\n \n \n \n \n 505\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unitcost\n \n \n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_nonnetable\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 16\n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n r_nonnetable\n \n %.02f\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n r_value\n \n %.02f\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n r_nonnetvalue\n \n %.02f\n \n \n \n \n 345\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n r_qoh\n \n %.02f\n \n \n \n \n
\n \N 0 2011-01-31 15:05:30.840915 443 SiteTypesMasterList \N \n\n Site Types Master List\n SiteTypesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select sitetype_name, sitetype_descrip\n from sitetype\norder by sitetype_name;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sitetype_name\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sitetype_descrip\n \n \n \n
\n \n 16\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 137 RunningAvailability \N \n\n Running Availability\n RunningAvailability\n Updated in 2.3 to show order number and item code on higherlevel planned work orders.\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n warehous_code AS warehouse,\n <? if exists("showPlanned") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS showplnord\n FROM item, uom, whsinfo\n WHERE ((item_id=<? value("item_id") ?>)\n AND (item_inv_uom_id=uom_id)\n AND (warehous_id=<? value("warehous_id") ?>))\n \n \n detail\n runningAvailability\n detail\n \n \n info\n SELECT\n formatQty(itemsite_qtyonhand) AS qoh,\n formatQty(CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END) AS reorderlevel,\n formatQty(CASE WHEN(itemsite_useparams) THEN itemsite_ordertoqty ELSE 0.0 END) AS ordertoqty,\n formatQty(CASE WHEN(itemsite_useparams) THEN itemsite_multordqty ELSE 0.0 END) AS multorderqty \nFROM itemsite \nWHERE ((itemsite_item_id=<? value("item_id") ?>)\n AND (itemsite_warehous_id=<? value("warehous_id") ?>));\n \n \n 238\n \n \n \n \n 95\n 125\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 95\n 75\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 95\n 95\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n 595\n 145\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n info\n ordertoqty\n \n \n \n \n 365\n 125\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n info\n qoh\n \n \n \n \n \n \n 305\n 55\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n 595\n 125\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n info\n reorderlevel\n \n \n \n \n 595\n 75\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showplnord\n \n \n \n 5\n 228\n 740\n 228\n 2\n \n \n \n 95\n 55\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n 365\n 145\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n info\n multorderqty\n \n \n \n \n \n \n \n \n \n \n 12\n \n \n 28\n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 22\n \n \n 90\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordernumber\n \n \n \n \n 285\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 5\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordertype\n \n \n \n \n 555\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 385\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyordered\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n balance\n \n qty\n \n \n \n \n 467\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyreceived\n \n \n \n \n 150\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n
\n \n 22\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 102\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n Updated in 2.3 to show order number and item code on higherlevel planned work orders. 0 2013-07-26 16:14:22.271087 251 TimePhasedOpenAPItems \N \n\n Time Phased Open A/P Items\n TimePhasedOpenAPItems\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("vend_id") ?>\n ( SELECT vend_name\n FROM vendinfo\n WHERE (vend_id=<? value("vend_id") ?>) )\n <? elseif exists("vendtype_id") ?>\n ( SELECT (vendtype_code || '-' || vendtype_descrip)\n FROM vendtype\n WHERE (vendtype_id=<? value("vendtype_id") ?>) )\n <? elseif exists("vendtype_pattern") ?>\n text(<? value("vendtype_pattern") ?>)\n <? else ?>\n text('All Vendors')\n <? endif ?>\n AS f_value,\n <? if reExists("vendtype_.*") ?>\n text('Vendor Type:')\n <? else ?>\n text('Vendor:')\n <? endif ?>\n AS f_label;\n \n \n \n detail\n SELECT pstart, pend,\n period,\n vend_number, vend_name,\n value,\n formatMoney(value) AS f_value\n FROM (\n SELECT calitem_start AS pstart,\n calitem_end AS pend,\n (formatDate(calitem_start) || '-' || formatDate(calitem_end)) AS period,\n vend_number,\n vend_name,\n openAPItemsValue(vend_id, calitem_id) AS value\n FROM vendinfo,\n ( SELECT rcalitem_id AS calitem_id,\n findPeriodStart(rcalitem_id) AS calitem_start,\n findPeriodEnd(rcalitem_id) AS calitem_end\n FROM rcalitem\n WHERE (rcalitem_id IN (\n <? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n <? endforeach ?>\n )\n )\n UNION\n SELECT acalitem_id AS calitem_id,\n findPeriodStart(acalitem_id) AS calitem_start,\n findPeriodEnd(acalitem_id) AS calitem_end\n FROM acalitem\n WHERE (acalitem_id IN (\n <? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n <? endforeach ?>\n )\n )\n ) AS calitem\n <? if exists("vend_id") ?>\n WHERE (vend_id=<? value("vend_id") ?>)\n <? elseif exists("vendtype_id") ?>\n WHERE (vend_vendtype_id=<? value("vendtype_id") ?>)\n <? elseif exists("vendtype_pattern") ?>\n WHERE (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ <? value("vendtype_pattern") ?>) ))\n <? endif ?>\n ) AS data\n WHERE (value != 0)\nORDER BY pstart, pend, vend_number\n\n \n \n 221\n \n \n \n \n 10\n 100\n 125\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n f_label\n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 140\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_value\n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n detail\n pstart\n \n 6\n \n \n 10\n 5\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n 31\n \n \n 645\n 10\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n value\n \n money\n \n \n 635\n 5\n 745\n 5\n 0\n \n \n \n \n \n \n detail\n \n 16\n \n \n 320\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_number\n \n \n \n \n 430\n 0\n 210\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n \n \n
\n \n 16\n \n \n 690\n 0\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 200 TimePhasedProductionByPlannerCode \N \n\n Time Phased Production By Planner Code\n TimePhasedProductionByPlannerCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("plancode_id") ?>\n ( SELECT (plancode_code||'-'||plancode_name)\n FROM plancode\n WHERE plancode_id=<? value("plancode_id") ?>)\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plancode,\n <? if exists("inventoryUnits") ?>\n text('Qty.')\n <? elseif exists("capacityUnits") ?>\n text('Capacity')\n <? elseif exists("altCapacityUnits") ?>\n text('Alt. Capacity')\n <? else ?>\n text('ERROR')\n <? endif ?>\n AS lbl_unittype,\n <? if exists("showInactive") ?>\n text('Showing Active and Inactive Item Sites')\n <? else ?>\n text('Showing Active Item Sites Only')\n <? endif ?>\n AS lbl_showing ;\n \n \n detail\n SELECT findPeriodStart(calitem_id) AS pstart,\n findPeriodEnd(calitem_id) AS pend,\n (formatDate(findPeriodStart(calitem_id)) || '-' || formatDate(findPeriodEnd(calitem_id))) AS period,\n plancode_code,\n <? if exists("inventoryUnits") ?>\n uom_name\n <? elseif exists("capacityUnits") ?>\n itemcapuom(item_id)\n <? elseif exists("altCapacityUnits") ?>\n itemaltcapuom(item_id)\n <? else ?>\n text('')\n <? endif ?>\n AS f_uom,\n warehous_code,\n <? if exists("inventoryUnits") ?>\n formatQty(SUM(summProd(itemsite_id, calitem_id)))\n <? elseif exists("capacityUnits") ?>\n formatQty(SUM(summProd(itemsite_id, calitem_id) * itemcapinvrat(item_id)))\n <? elseif exists("altCapacityUnits") ?>\n formatQty(SUM(summProd(itemsite_id, calitem_id) * itemaltcapinvrat(item_id)))\n <? else ?>\n formatQty(SUM(summProd(itemsite_id, calitem_id)))\n <? endif ?>\n AS f_unit\n FROM itemsite, item, uom, whsinfo, plancode,\n (SELECT rcalitem_id AS calitem_id\n FROM rcalitem\n WHERE (rcalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n UNION\n SELECT acalitem_id as calitem_id\n FROM acalitem\n WHERE (acalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n ) AS calitem\n WHERE ((itemsite_warehous_id=warehous_id)\n<? if not exists("showInactive") ?>\n AND (itemsite_active)\n<? endif ?>\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_plancode_id=plancode_id)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (plancode_code ~ <? value("plancode_pattern") ?>)\n<? endif ?>\n )\nGROUP BY pstart, pend, period, plancode_code, warehous_code, f_uom\nORDER BY pstart, plancode_code, warehous_code, f_uom;\n \n \n 221\n \n \n \n 140\n 105\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 140\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plancode\n \n \n \n \n \n 660\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unittype\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 360\n 80\n 380\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n lbl_showing\n \n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unittype\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n detail\n pstart\n \n 6\n \n \n 10\n 5\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n \n \n detail\n \n 16\n \n \n 530\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_uom\n \n \n \n \n 615\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unit\n \n \n \n \n 320\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n plancode_code\n \n \n \n
\n \n 16\n \n \n \n 690\n 0\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 479 TimePhasedSalesHistory \N \n\n Time Phased Sales History\n TimePhasedSalesHistory\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("byCust") ?>\n text('Customer')\n <? elseif exists("byProdcat") ?>\n text('Product Category')\n <? else ?>\n text('Item')\n <? endif ?>\n AS groupby,\n <? if exists("byCust") ?>\n text('Name')\n <? else ?>\n text('Description')\n <? endif ?>\n AS groupbyDescrip,\n <? if exists("salesDollars") ?>\n text('')\n <? else ?>\n text('UOM')\n <? endif ?>\n AS lbl_uom,\n <? if exists("inventoryUnits") ?>\n text('Qty.')\n <? elseif exists("capacityUnits") ?>\n text('Capacity')\n <? elseif exists("altCapacityUnits") ?>\n text('Alt. Capacity')\n <? elseif exists("salesDollars") ?>\n text('Sales')\n <? else ?>\n text('ERROR')\n <? endif ?>\n AS lbl_unittype; \n \n \n detail\n SELECT *, \n coalesce(unit,0) AS unit, \n<? if exists("salesDollars") ?>\n formatExtPrice(coalesce(unit,0)) AS f_unit\n<? else ?>\n formatQty(coalesce(unit,0)) AS f_unit\n<? endif ?>\nFROM\n-- Outer Table Query\n(SELECT DISTINCT\n calitem_id,\n findPeriodStart(calitem_id) AS pstart,\n findPeriodEnd(calitem_id) AS pend,\n (formatDate(findPeriodStart(calitem_id)) || '-' || formatDate(findPeriodEnd(calitem_id))) AS period,\n<? if exists("byCust") ?>\n cust_id, cust_number AS f_number, cust_name AS f_description\n<? elseif exists("byProdcat") ?>\n prodcat_id, prodcat_code AS f_number, prodcat_descrip AS f_description\n<? elseif exists("byItem") ?>\n item_id, item_number AS f_number, item_descrip1 AS f_description\n<? endif ?>\n , warehous_id, warehous_code\n<? if exists("salesDollars") ?>\n , <? value("baseCurrAbbr") ?>::text AS f_uom\n<? else ?>\n <? if exists("inventoryUnits") ?>\n , uom_name AS f_uom\n <? elseif exists("capacityUnits") ?>\n , itemcapuom(item_id) AS f_uom\n <? elseif exists("altCapacityUnits") ?>\n , itemaltcapuom(item_id) AS f_uom\n <? endif ?>\n<? endif ?>\nFROM cohist JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n<? if exists("inventoryUnits") ?>\n JOIN uom ON (item_inv_uom_id=uom_id)\n<? endif ?>\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n<? if reExists("[cC]ust") ?>\n JOIN custinfo ON (cohist_cust_id=cust_id)\n<? endif ?> \n<? if reExists("[pP]rodcat") ?>\n JOIN prodcat ON (item_prodcat_id=prodcat_id)\n<? endif ?>\n<? if reExists("custgrp") ?>\n JOIN custgrpitem ON (custgrpitem_cust_id=cohist_cust_id)\n JOIN custgrp ON (custgrpitem_custgrp_id=custgrp_id)\n<? endif ?>\n , ( SELECT rcalitem_id AS calitem_id,\n findPeriodStart(rcalitem_id) AS calitem_start,\n findPeriodEnd(rcalitem_id) AS calitem_end\n FROM rcalitem\n WHERE (rcalitem_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n )\n )\n UNION\n SELECT acalitem_id AS calitem_id,\n findPeriodStart(acalitem_id) AS calitem_start,\n findPeriodEnd(acalitem_id) AS calitem_end\n FROM acalitem\n WHERE (acalitem_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n )\n )\n ) AS calitem\nWHERE ((cohist_invcdate BETWEEN\n<? foreach("period_id_list") ?>\n <? if isfirst("period_id_list") ?>\n findPeriodStart(<? value("period_id_list") ?>)\n <? endif ?>\n <? if isLast("period_id_list") ?>\n AND findPeriodEnd(<? value("period_id_list") ?>)\n <? endif ?>\n<? endforeach ?>\n)\n<? if exists("item_id") ?> \n AND (item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("cust_id") ?> \n AND (cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?> \n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? endif ?>\n<? if exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id \n FROM custtype \n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("custgrp_id") ?> \n AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n<? endif ?>\n<? if exists("custgrp_pattern") ?>\n AND (cust_custgrp_name ~ <? value("custgrp_pattern") ?>)))\n<? endif ?>\n<? if exists("prodcat_id") ?> \n AND (item_prodcat_id=<? value("prodcat_id") ?>) \n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT prodcat_id \n FROM prodcat \n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n<? endif ?>\n<? if exists("warehous_id") ?> \n AND(itemsite_warehous_id=<? value("warehous_id") ?>) \n<? endif ?>\n )\nORDER BY pstart, f_number, f_description, f_uom, warehous_code) list\nLEFT OUTER JOIN\n-- Sales calcuations\n-- Loop through each period bucket to find bookings for period\n(<? foreach("period_id_list") ?>\n SELECT \n <? value("period_id_list") ?> AS calitem_id,\n warehous_id,\n<? if exists("byCust") ?>\n cust_id\n<? elseif exists("byProdcat") ?>\n prodcat_id \n<? elseif exists("byItem") ?>\n item_id\n<? endif ?>\n<? if exists("salesDollars") ?>\n , sum(round(cohist_qtyshipped * currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate), 2)) AS unit\n , <? value("baseCurrAbbr") ?>::text AS f_uom\n<? else ?>\n , sum(cohist_qtyshipped)\n <? if exists("capacityUnits") ?>\n * itemcapinvrat(item_id)\n <? elseif exists("altCapacityUnits") ?>\n * itemaltcapinvrat(item_id)\n <? endif ?>\n AS unit\n <? if exists("inventoryUnits") ?>\n , uom_name AS f_uom\n <? elseif exists("capacityUnits") ?>\n , itemcapuom(item_id) AS f_uom\n <? elseif exists("altCapacityUnits") ?>\n , itemaltcapuom(item_id) AS f_uom\n <? endif ?>\n<? endif ?>\nFROM cohist JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n<? if exists("inventoryUnits") ?>\n JOIN uom ON (item_inv_uom_id=uom_id)\n<? endif ?>\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n<? if reExists("[cC]ust") ?>\n JOIN custinfo ON (cohist_cust_id=cust_id)\n<? endif ?> \n<? if reExists("[pP]rodcat") ?>\n JOIN prodcat ON (item_prodcat_id=prodcat_id)\n<? endif ?>\n<? if reExists("custgrp") ?>\n JOIN custgrpitem ON (custgrpitem_cust_id=cohist_cust_id)\n JOIN custgrp ON (custgrpitem_custgrp_id=custgrp_id)\n<? endif ?>\n WHERE ((cohist_invcdate BETWEEN findPeriodStart(<? value("period_id_list") ?>) AND findPeriodEnd(<? value("period_id_list") ?>))\n<? if exists("item_id") ?> \n AND (item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("cust_id") ?> \n AND (cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?> \n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? endif ?>\n<? if exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id \n FROM custtype \n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("custgrp_id") ?> \n AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n<? endif ?>\n<? if exists("custgrp_pattern") ?>\n AND (cust_custgrp_name ~ <? value("custgrp_pattern") ?>)))\n<? endif ?>\n<? if exists("prodcat_id") ?> \n AND (item_prodcat_id=<? value("prodcat_id") ?>) \n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT prodcat_id \n FROM prodcat \n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n<? endif ?>\n<? if exists("warehous_id") ?> \n AND(itemsite_warehous_id=<? value("warehous_id") ?>) \n<? endif ?>\n )\nGROUP BY\n<? if exists("byCust") ?>\n cust_id, \n <? if exists("capacityUnits") ?>\n item_id,\n <? elseif exists("altCapacityUnits") ?>\n item_id,\n <? endif ?>\n<? elseif exists("byProdcat") ?>\n prodcat_id,\n <? if exists("capacityUnits") ?>\n item_id,\n <? elseif exists("altCapacityUnits") ?>\n item_id,\n <? endif ?>\n<? elseif exists("byItem") ?>\n item_id,\n<? endif ?>\n f_uom, warehous_id\n <? if isLast("period_id_list") ?>\n <? else ?>\nUNION\n <? endif ?>\n<? endforeach ?> \n) sales ON\n<? if exists("byCust") ?>\n (list.cust_id=sales.cust_id)\n<? elseif exists("byProdcat") ?>\n (list.prodcat_id=sales.prodcat_id)\n<? elseif exists("byItem") ?>\n (list.item_id=sales.item_id)\n<? endif ?>\n AND (list.calitem_id=sales.calitem_id)\n AND (list.warehous_id=sales.warehous_id)\n AND (list.f_uom=sales.f_uom)\n \n \n 221\n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 660\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unittype\n \n \n \n \n 530\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_uom\n \n \n \n \n \n 220\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n groupby\n \n \n \n \n 330\n 200\n 200\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n groupbyDescrip\n \n \n \n \n 10\n 33\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n 530\n -1\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_uom\n \n \n \n \n 660\n -1\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unittype\n \n \n \n \n 215\n -1\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n groupby\n \n \n \n \n 330\n -1\n 200\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n groupbyDescrip\n \n \n \n
\n detail\n \n detail\n pstart\n \n 6\n \n \n 10\n 5\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n 31\n \n \n 660\n 5\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n unit\n \n extprice\n \n \n \n 640\n 0\n 745\n 0\n 0\n \n \n \n \n \n \n detail\n \n 16\n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unit\n \n \n \n \n 615\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 530\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_uom\n \n \n \n \n 220\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_number\n \n \n \n \n 330\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_description\n \n \n \n
\n \n 16\n \n \n \n 95\n -1\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 690\n -1\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 104 Alignment \N \n\n Alignment\n Alignment\n \n Letter\n \n 0\n 0\n 0\n 0\n \n 1152\n \n \n \n 0\n 919\n 850\n 919\n 1\n \n \n 580\n 0\n 580\n 1150\n 1\n \n \n 280\n 0\n 280\n 1150\n 1\n \n \n 0\n 470\n 850\n 470\n 1\n \n \n 0\n 869\n 850\n 869\n 1\n \n \n 0\n 800\n 850\n 800\n 1\n \n \n \n 0\n 459\n 850\n 459\n 1\n \n \n 340\n 0\n 340\n 1150\n 1\n \n \n 0\n 690\n 850\n 690\n 1\n \n \n 0\n 960\n 850\n 960\n 1\n \n \n 0\n 1090\n 850\n 1090\n 1\n \n \n 0\n 380\n 850\n 380\n 1\n \n \n 560\n 0\n 560\n 1150\n 1\n \n \n 0\n 300\n 850\n 300\n 1\n \n \n 0\n 1120\n 850\n 1120\n 1\n \n \n 0\n 819\n 850\n 819\n 1\n \n \n 350\n 0\n 350\n 1150\n 1\n \n \n 0\n 30\n 850\n 30\n 1\n \n \n 170\n 0\n 170\n 1150\n 1\n \n \n 0\n 990\n 850\n 990\n 1\n \n \n 0\n 760\n 850\n 760\n 1\n \n \n 0\n 0\n 0\n 1150\n 1\n \n \n 0\n 220\n 850\n 220\n 1\n \n \n \n 360\n 0\n 360\n 1150\n 1\n \n \n 0\n 10\n 850\n 10\n 1\n \n \n 0\n 1150\n 850\n 1150\n 1\n \n \n 0\n 210\n 850\n 210\n 1\n \n \n 0\n 570\n 850\n 570\n 1\n \n \n 70\n 0\n 70\n 1150\n 1\n \n \n 0\n 100\n 850\n 100\n 1\n \n \n 400\n 0\n 400\n 1150\n 1\n \n \n 540\n 0\n 540\n 1150\n 1\n \n \n \n 730\n 0\n 730\n 1150\n 1\n \n \n \n \n 20\n 0\n 20\n 1150\n 1\n \n \n 0\n 900\n 850\n 900\n 1\n \n \n 220\n 0\n 220\n 1150\n 1\n \n \n 200\n 0\n 200\n 1150\n 1\n \n \n 0\n 509\n 850\n 509\n 1\n \n \n 300\n 0\n 300\n 1150\n 1\n \n \n 0\n 740\n 850\n 740\n 1\n \n \n \n 490\n 0\n 490\n 1150\n 1\n \n \n 0\n 530\n 850\n 530\n 1\n \n \n 0\n 930\n 850\n 930\n 1\n \n \n 630\n 0\n 630\n 1150\n 1\n \n \n 0\n 980\n 850\n 980\n 1\n \n \n 0\n 620\n 850\n 620\n 1\n \n \n 780\n 0\n 780\n 1150\n 1\n \n \n 0\n 670\n 850\n 670\n 1\n \n \n 420\n 0\n 420\n 1150\n 1\n \n \n 0\n 180\n 850\n 180\n 1\n \n \n 0\n 150\n 850\n 150\n 1\n \n \n 0\n 730\n 850\n 730\n 1\n \n \n 80\n 0\n 80\n 1150\n 1\n \n \n 0\n 400\n 850\n 400\n 1\n \n \n 0\n 110\n 850\n 110\n 1\n \n \n 0\n 310\n 850\n 310\n 1\n \n \n 0\n 940\n 850\n 940\n 1\n \n \n 0\n 640\n 850\n 640\n 1\n \n \n 0\n 1040\n 850\n 1040\n 1\n \n \n 140\n 0\n 140\n 1150\n 1\n \n \n \n 440\n 0\n 440\n 1150\n 1\n \n \n 0\n 280\n 850\n 280\n 1\n \n \n 0\n 660\n 850\n 660\n 1\n \n \n 30\n 0\n 30\n 1150\n 1\n \n \n 130\n 0\n 130\n 1150\n 1\n \n \n 0\n 950\n 850\n 950\n 1\n \n \n 0\n 40\n 850\n 40\n 1\n \n \n 0\n 650\n 850\n 650\n 1\n \n \n 0\n 700\n 850\n 700\n 1\n \n \n 470\n 0\n 470\n 1150\n 1\n \n \n 0\n 130\n 850\n 130\n 1\n \n \n 0\n 260\n 850\n 260\n 1\n \n \n 0\n 360\n 850\n 360\n 1\n \n \n 0\n 890\n 850\n 890\n 1\n \n \n \n 0\n 350\n 850\n 350\n 1\n \n \n 0\n 480\n 850\n 480\n 1\n \n \n 260\n 0\n 260\n 1150\n 1\n \n \n \n \n \n 0\n 370\n 850\n 370\n 1\n \n \n 550\n 0\n 550\n 1150\n 1\n \n \n 250\n 0\n 250\n 1150\n 1\n \n \n 0\n 600\n 850\n 600\n 1\n \n \n 600\n 0\n 600\n 1150\n 1\n \n \n 0\n 0\n 850\n 0\n 1\n \n \n 509\n 0\n 509\n 1150\n 1\n \n \n 640\n 0\n 640\n 1150\n 1\n \n \n 409\n 0\n 409\n 1150\n 1\n \n \n 0\n 250\n 850\n 250\n 1\n \n \n 480\n 0\n 480\n 1150\n 1\n \n \n 0\n 50\n 850\n 50\n 1\n \n \n 0\n 720\n 850\n 720\n 1\n \n \n 0\n 1070\n 850\n 1070\n 1\n \n \n 819\n 0\n 819\n 1150\n 1\n \n \n 0\n 770\n 850\n 770\n 1\n \n \n 0\n 560\n 850\n 560\n 1\n \n \n 0\n 20\n 850\n 20\n 1\n \n \n 0\n 90\n 850\n 90\n 1\n \n \n 0\n 860\n 850\n 860\n 1\n \n \n 660\n 0\n 660\n 1150\n 1\n \n \n 790\n 0\n 790\n 1150\n 1\n \n \n 0\n 580\n 850\n 580\n 1\n \n \n 459\n 0\n 459\n 1150\n 1\n \n \n 0\n 170\n 850\n 170\n 1\n \n \n 50\n 0\n 50\n 1150\n 1\n \n \n \n 150\n 0\n 150\n 1150\n 1\n \n \n 0\n 1100\n 850\n 1100\n 1\n \n \n 500\n 0\n 500\n 1150\n 1\n \n \n 0\n 70\n 850\n 70\n 1\n \n \n 0\n 610\n 850\n 610\n 1\n \n \n 0\n 1140\n 850\n 1140\n 1\n \n \n 110\n 0\n 110\n 1150\n 1\n \n \n 770\n 0\n 770\n 1150\n 1\n \n \n 0\n 590\n 850\n 590\n 1\n \n \n 740\n 0\n 740\n 1150\n 1\n \n \n 0\n 630\n 850\n 630\n 1\n \n \n 0\n 1030\n 850\n 1030\n 1\n \n \n 690\n 0\n 690\n 1150\n 1\n \n \n \n 0\n 550\n 850\n 550\n 1\n \n \n 0\n 140\n 850\n 140\n 1\n \n \n 0\n 1050\n 850\n 1050\n 1\n \n \n 0\n 1019\n 850\n 1019\n 1\n \n \n 520\n 0\n 520\n 1150\n 1\n \n \n 0\n 1000\n 850\n 1000\n 1\n \n \n 100\n 0\n 100\n 1150\n 1\n \n \n 450\n 0\n 450\n 1150\n 1\n \n \n 720\n 0\n 720\n 1150\n 1\n \n \n 160\n 0\n 160\n 1150\n 1\n \n \n 0\n 60\n 850\n 60\n 1\n \n \n 0\n 450\n 850\n 450\n 1\n \n \n 760\n 0\n 760\n 1150\n 1\n \n \n 0\n 420\n 850\n 420\n 1\n \n \n 680\n 0\n 680\n 1150\n 1\n \n \n 0\n 850\n 850\n 850\n 1\n \n \n 650\n 0\n 650\n 1150\n 1\n \n \n 620\n 0\n 620\n 1150\n 1\n \n \n 0\n 190\n 850\n 190\n 1\n \n \n 0\n 409\n 850\n 409\n 1\n \n \n 40\n 0\n 40\n 1150\n 1\n \n \n 700\n 0\n 700\n 1150\n 1\n \n \n 0\n 1010\n 850\n 1010\n 1\n \n \n 800\n 0\n 800\n 1150\n 1\n \n \n 240\n 0\n 240\n 1150\n 1\n \n \n 310\n 0\n 310\n 1150\n 1\n \n \n 710\n 0\n 710\n 1150\n 1\n \n \n 0\n 540\n 850\n 540\n 1\n \n \n 10\n 0\n 10\n 1150\n 1\n \n \n 570\n 0\n 570\n 1150\n 1\n \n \n 0\n 810\n 850\n 810\n 1\n \n \n 0\n 1130\n 850\n 1130\n 1\n \n \n 390\n 0\n 390\n 1150\n 1\n \n \n 229\n 0\n 229\n 1150\n 1\n \n \n \n 0\n 680\n 850\n 680\n 1\n \n \n 0\n 270\n 850\n 270\n 1\n \n \n 180\n 0\n 180\n 1150\n 1\n \n \n 850\n 0\n 850\n 1150\n 1\n \n \n 0\n 80\n 850\n 80\n 1\n \n \n 0\n 240\n 850\n 240\n 1\n \n \n 0\n 750\n 850\n 750\n 1\n \n \n 0\n 160\n 850\n 160\n 1\n \n \n 0\n 290\n 850\n 290\n 1\n \n \n 0\n 910\n 850\n 910\n 1\n \n \n 840\n 0\n 840\n 1150\n 1\n \n \n 0\n 229\n 850\n 229\n 1\n \n \n 670\n 0\n 670\n 1150\n 1\n \n \n 0\n 330\n 850\n 330\n 1\n \n \n 0\n 710\n 850\n 710\n 1\n \n \n 0\n 840\n 850\n 840\n 1\n \n \n 60\n 0\n 60\n 1150\n 1\n \n \n 0\n 790\n 850\n 790\n 1\n \n \n 0\n 1060\n 850\n 1060\n 1\n \n \n 190\n 0\n 190\n 1150\n 1\n \n \n 590\n 0\n 590\n 1150\n 1\n \n \n 810\n 0\n 810\n 1150\n 1\n \n \n 530\n 0\n 530\n 1150\n 1\n \n \n 0\n 520\n 850\n 520\n 1\n \n \n 0\n 340\n 850\n 340\n 1\n \n \n 0\n 390\n 850\n 390\n 1\n \n \n 90\n 0\n 90\n 1150\n 1\n \n \n 0\n 120\n 850\n 120\n 1\n \n \n \n \n 0\n 830\n 850\n 830\n 1\n \n \n 0\n 880\n 850\n 880\n 1\n \n \n \n 0\n 200\n 850\n 200\n 1\n \n \n 830\n 0\n 830\n 1150\n 1\n \n \n 0\n 780\n 850\n 780\n 1\n \n \n 0\n 500\n 850\n 500\n 1\n \n \n 120\n 0\n 120\n 1150\n 1\n \n \n 0\n 440\n 850\n 440\n 1\n \n \n 320\n 0\n 320\n 1150\n 1\n \n \n 370\n 0\n 370\n 1150\n 1\n \n \n 0\n 430\n 850\n 430\n 1\n \n \n 210\n 0\n 210\n 1150\n 1\n \n \n 610\n 0\n 610\n 1150\n 1\n \n \n 290\n 0\n 290\n 1150\n 1\n \n \n 330\n 0\n 330\n 1150\n 1\n \n \n 0\n 1080\n 850\n 1080\n 1\n \n \n 430\n 0\n 430\n 1150\n 1\n \n \n 380\n 0\n 380\n 1150\n 1\n \n \n 750\n 0\n 750\n 1150\n 1\n \n \n 0\n 969\n 850\n 969\n 1\n \n \n 0\n 490\n 850\n 490\n 1\n \n \n 270\n 0\n 270\n 1150\n 1\n \n \n 0\n 1110\n 850\n 1110\n 1\n \n \n 0\n 320\n 850\n 320\n 1\n \n \n\n \N 0 2013-07-26 16:14:22.271087 472 Bookings \N \n\n Bookings\n Bookings\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT cohead_number AS sonumber,\n formatDate(cohead_orderdate) AS orddate,\n cust_number, cust_name,\n item_number, item_descrip1, item_descrip2,\n formatQty(coitem_qtyord) AS ordered,\nformatPrice(currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio) AS unitprice,\nformatExtPrice(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n * (currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio),2)) AS f_extprice\n FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN site() ON (warehous_id=itemsite_warehous_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=coitem_qty_uom_id)\n JOIN curr_symbol ON (curr_id=cohead_curr_id)\n WHERE ( (coitem_status<>'X')\n <? if exists("cohead_id") ?>\n AND (coitem_cohead_id=<? value("cohead_id") ?>)\n <? endif ?>\n <? if exists("openOnly") ?>\n AND (coitem_status<>'C')\n <? endif ?>\n <? if exists("startDate") ?>\n AND (cohead_orderdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n <? endif ?>\n\n <? if exists("salesrep_id") ?>\n AND (cohead_salesrep_id=<? value("salesrep_id") ?>)\n <? endif ?>\n <? if exists("shipto_id") ?>\n AND (cohead_shipto_id=<? value("shipto_id") ?>)\n <? endif ?>\n <? if exists("cust_id") ?>\n AND (cohead_cust_id=<? value("cust_id") ?>)\n <? endif ?>\n <? if exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n <? endif ?>\n <? if exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n <? endif ?>\n <? if exists("custgrp") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n <? endif ?>\n <? if exists("custgrp_id") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)))\n <? endif ?>\n <? if exists("custgrp_pattern") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ <? value("custgrp_pattern") ?>) )) )\n <? endif ?>\n\n <? if exists("item_id") ?>\n AND (itemsite_item_id=<? value("item_id") ?>)\n <? endif ?>\n <? if exists("prodcat_id") ?>\n AND (item_prodcat_id=<? value("prodcat_id") ?>)\n <? endif ?>\n <? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n <? endif ?>\n\n <? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n <? endif ?>\n)\nORDER BY cohead_orderdate;\n \n \n \n 237\n \n \n \n \n 5\n 233\n 745\n 233\n 2\n \n \n \n \n \n \n \n \n \n \n 10\n 41\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 7\n \n \n 37\n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 52\n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordered\n \n \n \n \n 432\n 15\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sonumber\n \n \n \n \n 432\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_extprice\n \n \n \n \n 200\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n unitprice\n \n \n \n 4\n 47\n 744\n 47\n 0\n \n \n \n 200\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 432\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 110\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orddate\n \n \n \n
\n \n 17\n \n \n \n 102\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 155 BriefEarnedCommissions \N \n\n Brief Earned Commissions\n BriefEarnedCommissions\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("salesrep_id") ?>\n ( SELECT salesrep_name\n FROM salesrep\n WHERE (salesrep_id=<? value("salesrep_id") ?>) )\n <? else ?>\n text('All Sales Reps')\n <? endif ?>\n AS salesrep,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate;\n \n \n detail\n SELECT cohist_salesrep_id, salesrep_number, salesrep_name, cust_number, cust_name,\n cohist_ordernumber, cohist_invcnumber, formatDate(cohist_invcdate) AS f_invcdate, currAbbr,\n formatMoney(SUM(baseextprice)) AS f_extprice,\n formatMoney(SUM(basecommission)) AS f_commission,\n SUM(baseextprice) AS extprice,\n SUM(basecommission) AS commission\n<? if exists("includeMisc") ?>\nFROM saleshistorymisc\n<? else ?>\nFROM saleshistory\n<? endif ?>\nWHERE ( (cohist_commission <> 0)\n AND (cohist_invcdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n\n<? if exists("includeMisc") ?>\n AND (COALESCE(cohist_misc_type, '') <> 'T')\n AND (COALESCE(cohist_misc_type, '') <> 'F')\n<? endif ?>\n\n<? if exists("salesrep_id") ?>\n AND (cohist_salesrep_id=<? value("salesrep_id") ?>)\n<? endif ?>\n)\nGROUP BY cohist_salesrep_id, salesrep_number, salesrep_name, cust_number, cust_name,\n cohist_ordernumber, cohist_invcnumber, cohist_invcdate, currAbbr\nORDER BY salesrep_number, cust_number, cohist_invcdate\n\n \n \n 221\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 140\n 100\n 385\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n salesrep\n \n \n \n \n \n \n \n \n \n \n \n \n 140\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 140\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 345\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohist_ordernumber\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_extprice\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_commission\n \n \n \n \n 165\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 505\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_invcdate\n \n \n \n \n 220\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 60\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salesrep_name\n \n \n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohist_invcnumber\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salesrep_number\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 16\n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n extprice\n \n money\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n commission\n \n money\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 473 BriefSalesHistory \N \n\n Brief Sales History\n BriefSalesHistory\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("startDate") ?>\n formatDate(date(<? value("startDate") ?>))\n <? else ?>\n text('Earliest')\n <? endif ?> AS startDate,\n <? if exists("endDate") ?>\n formatDate(date(<? value("endDate") ?>))\n <? else ?>\n text('Latest')\n <? endif ?> AS endDate,\n <? if exists("showPrices") ?>\n text('Unit Price') AS lbl_unitprice,\n text('Total') AS lbl_total,\n <? else ?>\n text('') AS lbl_unitprice,\n text('') AS lbl_total,\n <? endif ?>\n <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("cust_id") ?>\n (SELECT cust_name FROM custinfo WHERE cust_id=<? value("cust_id") ?>)\n <? else ?>\n text('All Customers')\n <? endif ?>\n AS cust_name,\n <? if exists("custtype_id") ?>\n (SELECT custtype_code FROM custtype WHERE custtype_id=<? value("custtype_id") ?>)\n <? else ?>\n text('All Customer Types')\n <? endif ?>\n AS custtype_code,\n <? if exists("custtype_pattern") ?>\n text(<? value("custtype_pattern") ?>)\n <? else ?>\n text('Not Applicable')\n <? endif ?>\n AS custtype_pattern,\n <? if exists("custgrp_id") ?>\n (SELECT custgrp_name FROM custgrp WHERE custgrp_id=<? value("custgrp_id") ?>)\n <? else ?>\n text('All Customer Groups')\n <? endif ?>\n AS custgrp_name,\n <? if exists("custgrp_pattern") ?>\n text(<? value("custgrp_pattern") ?>)\n <? else ?>\n text('Not Applicable')\n <? endif ?>\n AS custgrp_pattern,\n <? if exists("prodcat_id") ?>\n (SELECT prodcat_code FROM prodcat WHERE prodcat_id=<? value("prodcat_id") ?>)\n <? else ?>\n text('All Product Categories')\n <? endif ?>\n AS prodcat_code,\n <? if exists("prodcat_pattern") ?>\n text(<? value("prodcat_pattern") ?>)\n <? else ?>\n text('Not Applicable')\n <? endif ?>\n AS prodcat_pattern,\n <? if exists("item_id") ?>\n (SELECT item_number FROM item WHERE item_id=<? value("item_id") ?>)\n <? else ?>\n text('All Item Numbers')\n <? endif ?>\n AS item_number,\n <? if exists("cohead_id") ?>\n (SELECT cohead_number FROM cohead WHERE cohead_id=<? value("cohead_id") ?>)\n <? else ?>\n text('All Orders')\n <? endif ?>\n AS docnumber; \n \n \n detail\n SELECT cohist_ordernumber AS sonumber,\n cohist_invcnumber AS invnumber,\n formatDate(cohist_orderdate) AS orddate,\n formatDate(cohist_invcdate, 'Return') AS shipdate,\n SUM(round(cohist_qtyshipped * currtobase(cohist_curr_id,cohist_unitprice,cohist_invcdate),2)) as extended,\n formatMoney(SUM(round(cohist_qtyshipped * currtobase(cohist_curr_id,cohist_unitprice,cohist_invcdate),2))) as f_total,\n SUM(round(cohist_qtyshipped * currtobase(cohist_curr_id,cohist_unitprice,cohist_invcdate),2)) as total\nFROM saleshistory\n LEFT OUTER JOIN cohead ON (cohead_number=cohist_ordernumber)\nWHERE ((cohist_invcdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("cust_id") ?>\n AND (cohist_cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("shipto_id") ?>\n AND (cohist_shipto_id=<? value("shipto_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? endif ?>\n<? if exists("custtype_pattern") ?>\n AND (custtype_code ~ <? value("custtype_pattern") ?>)\n<? endif ?>\n<? if exists("custgrp_id") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)))\n<? endif ?>\n<? if exists("custgrp_pattern") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ <? value("custgrp_pattern") ?>) )) )\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("prodcat_id") ?>\n AND (item_prodcat_id=<? value("prodcat_id") ?>)\n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n<? endif ?>\n<? if exists("salesrep_id") ?>\n AND (cohist_salesrep_id=<? value("salesrep_id") ?>)\n<? endif ?>\n )\nGROUP BY cohead_id, cust_id,cust_number,cust_custtype_id,cohist_cust_id,custtype_code,\n cust_name,cohist_ordernumber, cohist_ponumber,\n cohist_invcnumber,cohist_orderdate, cohist_invcdate\nORDER BY cohist_invcdate, cohist_orderdate;\n \n \n 221\n \n \n \n \n \n \n \n 0\n 218\n 745\n 218\n 2\n \n \n \n 10\n 38\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sonumber\n \n \n \n \n 110\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invnumber\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_total\n \n \n \n \n 355\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipdate\n \n \n \n \n 270\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orddate\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 21\n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n total\n \n money\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 413 CheckMultiPage \N \n\n Sample Check Format - 3 Part - MC - Remit - Multi Page\n CheckMultiPage\n Sample Check Format - 3 Part - MC - Uses primary Vendor or address with names: REMIT, Remit, or remit if one exists. Multi-Page.\n Letter\n \n 50\n 0\n 50\n 50\n \n Head\n SELECT\ncheckhead_id, checkhead_number, checkhead_for AS memo,\nformatDate(checkhead_checkdate) AS f_checkdate,\nformatMoney(checkhead_amount) AS f_amount,\nINITCAP(spellAmount(checkhead_amount, curr_id)) AS f_words,\nCASE WHEN(checkhead_void) THEN TEXT('V O I D')\n ELSE TEXT('')\nEND AS f_void,\nCASE WHEN checkhead_recip_type = 'C' THEN (SELECT cust_number\n FROM custinfo\n WHERE (cust_id=checkhead_recip_id))\n WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_code\n FROM taxauth\n WHERE (taxauth_id=checkhead_recip_id))\n WHEN checkhead_recip_type = 'V' THEN (SELECT vend_number\n FROM vendinfo\n WHERE (vend_id=checkhead_recip_id))\n ELSE 'Unknown Recipient Type'\nEND AS recip_number,\nformatAddr(CASE WHEN checkhead_recip_type = 'C' THEN\n (SELECT cntct_addr_id\n FROM cntct, custinfo\n WHERE ((cust_cntct_id=cntct_id)\n AND (cust_id=checkhead_recip_id)))\n WHEN checkhead_recip_type = 'T' THEN \n (SELECT taxauth_addr_id\n FROM taxauth\n WHERE (taxauth_id=checkhead_recip_id))\n WHEN checkhead_recip_type = 'V' THEN\n COALESCE((SELECT vendaddr_addr_id\n FROM vendaddrinfo\n WHERE ((UPPER(vendaddr_code)='REMIT')\n AND (vendaddr_vend_id=checkhead_recip_id))),\n (SELECT vend_addr_id\n FROM vendinfo\n WHERE (vend_id=checkhead_recip_id)))\n END) AS check_address,\nCASE WHEN checkhead_recip_type = 'C' THEN (SELECT cust_name\n FROM custinfo\n WHERE cust_id=checkhead_recip_id)\n WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_name\n FROM taxauth\n WHERE taxauth_id=checkhead_recip_id)\n WHEN checkhead_recip_type = 'V' THEN\n COALESCE((SELECT vendaddr_name\n FROM vendaddrinfo\n WHERE ((UPPER(vendaddr_code)='REMIT')\n AND (vendaddr_vend_id=checkhead_recip_id))),\n (SELECT vend_name\n FROM vendinfo\n WHERE (vend_id=checkhead_recip_id)))\nEND AS recip_name, \ncurr_symbol, curr_abbr, curr_name\nFROM checkhead, curr_symbol\nWHERE ((checkhead_curr_id = curr_id)\n AND (checkhead_id=<? value("checkhead_id") ?>) );\n\n \n \n CheckDetail\n SELECT checkdata_page,\n checkdata_checknumber,\n checkdata_checkwords,\n checkdata_checkdate,\n checkdata_checkamount,\n checkdata_checkcurrsymbol,\n checkdata_checkcurrabbr,\n checkdata_checkcurrname,\n checkdata_checkpayto,\n checkdata_checkaddress,\n checkdata_checkmemo,\n checkdata_docnumber,\n checkdata_docreference,\n checkdata_docdate,\n checkdata_docamount,\n checkdata_docdiscount,\n checkdata_docnetamount\n FROM checkDetailFormatted(<? value("checkhead_id") ?>, 12);\n \n
\n Check\n \n Line Detail\n checkdata_page\n \n \n 351\n \n \n 175\n 50\n 120\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docreference\n \n \n \n \n \n 555\n 50\n 80\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docdiscount\n \n \n \n \n 85\n 325\n 660\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n memo\n \n \n \n \n 645\n 50\n 100\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docnetamount\n \n \n \n \n 305\n 25\n 147\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n \n 5\n 50\n 155\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docnumber\n \n \n \n \n 145\n 0\n 175\n 25\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n recip_name\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n 450\n 305\n 745\n 305\n 0\n \n \n \n 650\n 0\n 95\n 25\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n checkhead_number\n \n \n \n \n 640\n 305\n 104\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n \n 444\n 50\n 100\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docamount\n \n \n \n \n 10\n 0\n 135\n 25\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n recip_number\n \n \n \n \n 580\n 305\n 55\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n curr_symbol\n \n \n \n \n 310\n 50\n 100\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docdate\n \n \n \n \n \n \n \n \n 351\n \n \n 645\n 0\n 95\n 25\n \n \n Arial\n 10\n normal\n \n \n \n \n Head\n checkhead_number\n \n \n \n \n 5\n 50\n 155\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docnumber\n \n \n \n \n 550\n 50\n 80\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docdiscount\n \n \n \n \n \n \n \n 445\n 305\n 740\n 305\n 0\n \n \n \n 170\n 50\n 120\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docreference\n \n \n \n \n 440\n 50\n 100\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docamount\n \n \n \n \n \n 80\n 325\n 660\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n memo\n \n \n \n \n \n 575\n 305\n 55\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n curr_symbol\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 300\n 25\n 147\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 140\n 0\n 175\n 25\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n recip_name\n \n \n \n \n 640\n 50\n 100\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docnetamount\n \n \n \n \n 305\n 50\n 100\n 250\n \n \n Arial\n 8\n normal\n \n \n \n \n \n CheckDetail\n checkdata_docdate\n \n \n \n \n \n \n 635\n 305\n 104\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n f_amount\n \n \n \n \n 5\n 0\n 135\n 25\n \n \n Arial\n 8\n normal\n \n \n \n \n Head\n recip_number\n \n \n \n \n \n \n CheckDetail\n \n 292\n \n \n 10\n 100\n 225\n 25\n \n \n Arial\n 10\n normal\n \n \n \n \n CheckDetail\n checkdata_checkpayto\n \n \n \n \n 15\n 40\n 560\n 30\n \n \n Arial\n 12\n normal\n \n \n \n \n CheckDetail\n checkdata_checkwords\n \n \n \n \n 405\n 85\n 121\n 25\n \n \n Arial\n 10\n normal\n \n \n \n \n CheckDetail\n checkdata_checkdate\n \n \n \n \n 80\n 260\n 650\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n CheckDetail\n checkdata_checkmemo\n \n \n \n \n \n 10\n 125\n 300\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n CheckDetail\n checkdata_checkaddress\n \n \n \n \n 545\n 85\n 55\n 25\n \n \n Arial\n 10\n normal\n \n \n \n \n CheckDetail\n checkdata_checkcurrsymbol\n \n \n \n \n 600\n 85\n 125\n 25\n \n \n Arial\n 10\n normal\n \n \n \n \n CheckDetail\n checkdata_checkamount\n \n \n \n
\n
\n Sample Check Format - 3 Part - MC - Uses primary Vendor or address with names: REMIT, Remit, or remit if one exists. Multi-Page. 0 2013-07-26 16:14:22.271087 189 CostedIndentedBOM \N \n\n Costed Indented Bill of Materials\n CostedIndentedBOM\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n uom_name AS item_invuom,\n item_descrip1,\n item_descrip2,\n <? if exists("useActualCosts") ?>\n text('Using Actual Costs') AS lbl_usecosts,\n (SELECT formatCost(SUM(bomdata_actextendedcost))\n FROM indentedbom(<? value("item_id") ?>,<? value("revision_id") ?>,0,0)\n WHERE (bomdata_bomwork_level=1)) as t_extendedcost,\n <? else ?>\n text('Using Standard Costs') AS lbl_usecosts,\n (SELECT formatCost(SUM(bomdata_stdextendedcost))\n FROM indentedbom(<? value("item_id") ?>,<? value("revision_id") ?>,0,0)\n WHERE (bomdata_bomwork_level=1)) as t_extendedcost,\n <? endif ?>\n formatCost(actcost(item_id)) AS f_actual,\n formatCost(stdcost(item_id)) AS f_standard\n FROM item JOIN uom ON (uom_id=item_inv_uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n \n \n \n detail\n select (REPEAT(' ',(bomdata_bomwork_level-1)*3) || bomdata_bomwork_seqnumber) AS f_seqnumber,\n 1 AS seq_ord,\n bomdata_item_number AS item_number,\n bomdata_uom_name AS item_invuom,\n bomdata_item_descrip1 AS item_descrip1,\n bomdata_item_descrip2 AS item_descrip2,\n bomdata_createchild as createchild,\n bomdata_issuemethod AS issuemethod,\n formatQtyPer(bomdata_qtyreq) AS qtyreq,\n formatScrap(bomdata_scrap) AS scrap,\n CASE WHEN COALESCE(bomdata_effective, startOfTime()) <= startOfTime() THEN\n <? value("always") ?> \n ELSE formatDate(bomdata_effective)\n END AS effective,\n CASE WHEN COALESCE(bomdata_expires, endOfTime()) <= endOfTime() THEN\n <? value("never") ?>\n ELSE formatDate(bomdata_expires)\n END AS expires,\n<? if exists("useActualCosts") ?>\n formatCost(bomdata_actunitcost) AS f_unitcost,\n formatCost(bomdata_actextendedcost) AS f_extendedcost,\n CASE WHEN(bomdata_bomwork_parent_id=-1) THEN bomdata_actextendedcost\n ELSE 0\n END AS extendedcost,\n<? else ?>\n formatCost(bomdata_stdunitcost) AS f_unitcost,\n formatCost(bomdata_stdextendedcost) AS f_extendedcost,\n CASE WHEN(bomdata_bomwork_parent_id=-1) THEN bomdata_stdextendedcost\n ELSE 0\n END AS extendedcost,\n<? endif ?>\n bomdata_bomwork_level\nFROM indentedBOM(<? value("item_id") ?>,<? value("revision_id") ?>,0,0);\n\n \n \n bomhead\n SELECT bomhead_docnum, bomhead_revision,\nformatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=<? value("item_id") ?>)\nAND (bomhead_rev_id=<? value("revision_id") ?>));\n \n \n 242\n \n \n \n 100\n 104\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n 5\n 235\n 745\n 235\n 2\n \n \n \n 585\n 104\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_docnum\n \n \n \n \n \n \n 100\n 145\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n 585\n 145\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_revision\n \n \n \n \n \n \n 315\n 104\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_invuom\n \n \n \n \n \n \n 350\n 60\n 205\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n lbl_usecosts\n \n \n \n \n \n \n 100\n 125\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n 585\n 125\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n f_revisiondate\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 52\n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n effective\n \n \n \n \n 114\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 114\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 5\n 0\n 104\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_seqnumber\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n expires\n \n \n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_extendedcost\n \n \n \n \n 340\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyreq\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 275\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_invuom\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unitcost\n \n \n \n \n 419\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n scrap\n \n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issuemethod\n \n \n \n \n 500\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createchild\n \n \n \n \n 114\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n
\n \n 18\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 47\n \n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_actual\n \n \n \n \n 665\n 30\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_standard\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n t_extendedcost\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 335 CostedSummarizedBOM \N \n\n Costed Summarized Bill of Materials\n CostedSummarizedBOM\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n uom_name AS item_invuom,\n item_descrip1,\n item_descrip2,\n<? if exists("useActualCosts") ?>\n text('Actual Costs') AS f_costtype\n<? else ?>\n text('Standard Costs') AS f_costtype\n<? endif ?>\n FROM item JOIN uom ON (uom_id=item_inv_uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n \n \n \n detail\n select bomdata_item_number AS item_number,\n bomdata_uom_name AS item_invuom,\n bomdata_item_descrip1 AS item_descrip1,\n bomdata_item_descrip2 AS item_descrip2,\n formatQtyPer(bomdata_qtyreq) AS qtyreq,\n<? if exists("useActualCosts") ?>\n formatCost(bomdata_actunitcost) AS f_cost,\n formatCost(bomdata_actextendedcost) AS f_extcost\n<? else ?>\n formatCost(bomdata_stdunitcost) AS f_cost,\n formatCost(bomdata_stdextendedcost) AS f_extcost\n<? endif ?>\n FROM summarizedBOM(<? value("item_id") ?>,<? value("revision_id") ?>,<? value("expiredDays") ?>,<? value("futureDays") ?>);\n \n \n bomhead\n SELECT bomhead_docnum, bomhead_revision,\nformatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=<? value("item_id") ?>)\nAND (bomhead_rev_id=<? value("revision_id") ?>));\n \n \n 242\n \n \n 100\n 104\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n 315\n 104\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_invuom\n \n \n \n \n 100\n 125\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n 100\n 145\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n 580\n 125\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n f_revisiondate\n \n \n \n \n \n \n 410\n 50\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_costtype\n \n \n \n \n 580\n 145\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_revision\n \n \n \n \n \n 5\n 235\n 745\n 235\n 2\n \n \n \n \n \n 580\n 104\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_docnum\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 52\n \n \n 665\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_extcost\n \n \n \n \n 425\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyreq\n \n \n \n \n 585\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cost\n \n \n \n \n 113\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 113\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 113\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 275\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_invuom\n \n \n \n
\n \n 18\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 283 APAging \N \n\n AP 30 60 90 Aging\n APAging\n Enhanced AP Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date.\n \n Date Relative to Today\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT \n\tapaging_docdate,\n\tapaging_duedate,\n\tapaging_ponumber,\n\tapaging_docnumber,\n apaging_invcnumber,\n\tapaging_doctype,\n\tapaging_vend_id,\n\tapaging_vend_number,\n\tapaging_vend_name,\n\tapaging_vend_vendtype_id,\n\tapaging_vendtype_code,\n\tapaging_terms_descrip,\n\tformatMoney(apaging_apopen_amount) AS apaging_apopen_amount,\n\tapaging_cur_val, formatMoney(apaging_cur_val) AS apaging_cur_amt,\n\tapaging_thirty_val,formatMoney(apaging_thirty_val) AS apaging_thirty_amt,\n\tapaging_sixty_val, formatMoney(apaging_sixty_val) AS apaging_sixty_amt,\n\tapaging_ninety_val,formatMoney(apaging_ninety_val) AS apaging_ninety_amt,\n\tapaging_plus_val, formatMoney(apaging_plus_val) AS apaging_plus_amt,\n\tapaging_total_val, formatMoney(apaging_total_val) AS apaging_total_amt,\n\tapaging_disc_val, formatMoney(apaging_disc_val) AS apaging_disc_amt,\n\tapaging_discdate,\n\tapaging_discdays,\n\tapaging_discprcnt\nFROM apaging(<? value("relDate") ?>, <? value("useDocDate") ?>)\n<? if exists("vend_id") ?>\n WHERE (apaging_vend_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n WHERE (apaging_vend_vendtype_id=<? value("vendtype_id") ?>)\n<? elseif exists("vendtype_pattern") ?>\n WHERE (apaging_vendtype_code ~ <? value("vendtype_pattern") ?>)\n<? endif ?>;\n \n \n 77\n \n \n \n 45\n 40\n 110\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n Parameter Query\n relDate\n \n \n \n \n
\n detail\n \n Vendor\n apaging_vend_number\n \n \n 113\n \n \n \n \n \n \n \n \n \n \n \n 125\n 25\n 220\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_vend_number\n \n \n \n \n \n \n \n \n \n 0\n 105\n 1000\n 105\n 0\n \n \n \n 125\n 40\n 220\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_terms_descrip\n \n \n \n 0\n 5\n 1000\n 5\n 0\n \n \n \n \n \n \n \n 125\n 10\n 220\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_vend_name\n \n \n \n \n \n \n 96\n \n \n \n 0\n 50\n 220\n 12\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 530\n 5\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_thirty_val\n \n qty\n \n \n \n 237\n 32\n 237\n 32\n 0\n \n \n \n 450\n 5\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_cur_val\n \n qty\n \n \n \n 220\n 50\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_total_val\n \n qty\n \n \n \n 938\n 5\n 55\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_disc_val\n \n qty\n \n \n \n \n 620\n 5\n 70\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_sixty_val\n \n qty\n \n \n \n 705\n 5\n 70\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_ninety_val\n \n qty\n \n \n 0\n 0\n 1000\n 0\n 0\n \n \n \n 780\n 5\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_plus_val\n \n qty\n \n \n \n \n \n detail\n \n 18\n \n \n 860\n 0\n 70\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_discdate\n \n \n \n \n 939\n 0\n 55\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_disc_amt\n \n \n \n \n 270\n 0\n 85\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_duedate\n \n \n \n \n 20\n 0\n 80\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_invcnumber\n \n \n \n \n 0\n 0\n 15\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_doctype\n \n \n \n \n 530\n 0\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_thirty_amt\n \n \n \n \n 110\n 0\n 80\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_docnumber\n \n \n \n \n 450\n 0\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_cur_amt\n \n \n \n \n 795\n 0\n 55\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_plus_amt\n \n \n \n \n 355\n 0\n 80\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_apopen_amount\n \n \n \n \n 620\n 0\n 70\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_sixty_amt\n \n \n \n \n 705\n 0\n 70\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_ninety_amt\n \n \n \n \n 200\n 0\n 85\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_docdate\n \n \n \n
\n \n \n 102\n \n \n 220\n 35\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_total_val\n \n qty\n \n \n \n 620\n 5\n 70\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_sixty_val\n \n qty\n \n \n \n 530\n 5\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_thirty_val\n \n qty\n \n \n \n \n 450\n 5\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_cur_val\n \n qty\n \n \n \n \n \n 710\n 5\n 70\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_ninety_val\n \n qty\n \n \n \n 780\n 5\n 75\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_plus_val\n \n qty\n \n \n \n \n 942\n 5\n 55\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n apaging_disc_val\n \n qty\n \n \n \n \n 515\n 80\n 42\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n 1\n 2\n 1000\n 2\n 2\n \n \n \n 47\n \n \n 515\n 25\n 42\n 12\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n Enhanced AP Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date. 0 2013-07-26 16:14:22.271087 205 APAssignmentsMasterList \N \n\n A/P Account Assignments Master List\n APAssignmentsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT CASE WHEN (apaccnt_vendtype_id=-1) THEN apaccnt_vendtype\n ELSE (SELECT vendtype_code FROM vendtype WHERE (vendtype_id=apaccnt_vendtype_id))\n END AS vendtypecode,\n formatGLAccount(apaccnt_ap_accnt_id) AS apaccnt,\n formatGLAccount(apaccnt_prepaid_accnt_id) AS prepaidaccnt,\n formatGLAccount(apaccnt_discount_accnt_id) AS discountaccnt\nFROM apaccnt\nORDER BY vendtypecode;\n \n \n 77\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n \n \n 7\n \n \n 22\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vendtypecode\n \n \n \n \n 120\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apaccnt\n \n \n \n \n 320\n -1\n 190\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prepaidaccnt\n \n \n \n \n 530\n -1\n 195\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n discountaccnt\n \n \n \n
\n \n 17\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 254 APOpenItemsByVendor \N \n\n Open Payables\n APOpenItemsByVendor\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n<? if exists("vend_id") ?>\n (SELECT vend_name FROM vendinfo WHERE vend_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n (SELECT vendtype_code FROM vendtype WHERE vendtype_id=<? value("vendtype_id") ?>)\n<? elseif exists("vendtype_pattern") ?>\n ('Vendor Type pattern = ' || <? value("vendtype_pattern") ?>)\n<? else ?>\n 'All Vendors'\n<? endif ?>\n AS selection,\n currConcat(baseCurrId()) AS baseCurr,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n formatDate(<? value("asofDate") ?>) AS asofDate;\n \n \n detail\n apOpenItems\n detail\n \n \n 166\n \n 5\n 160\n 745\n 160\n 2\n \n \n \n \n \n \n 550\n 108\n 100\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n asofDate\n \n \n \n \n \n \n 550\n 65\n 100\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n 550\n 83\n 100\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n 695\n 143\n 50\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n baseCurr\n \n \n \n \n \n \n 110\n 65\n 250\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n selection\n \n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n 695\n 4\n 50\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n baseCurr\n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 305\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_docdate\n \n \n \n \n 250\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apopen_ponumber\n \n \n \n \n 585\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 530\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_paid\n \n \n \n \n 5\n 2\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_doctype\n \n \n \n \n 390\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 475\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 75\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apopen_docnumber\n \n \n \n \n 695\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_base_balance\n \n \n \n \n 640\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currAbbr\n \n \n \n \n 130\n 2\n 115\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n
\n \n 16\n \n \n 102\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 16\n \n \n \n 642\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n base_balance\n \n qty\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 284 ARAging \N \n\n AR 30 60 90 Aging\n ARAging\n Enhanced AR Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date.\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 100\n 100\n 50\n 50\n \n detail\n SELECT \n\taraging_docdate,\n\taraging_duedate,\n\taraging_ponumber,\n\taraging_docnumber,\n\taraging_doctype,\n\taraging_cust_id,\n\taraging_cust_number,\n\taraging_cust_name,\n\taraging_cust_custtype_id,\n\taraging_custtype_code,\n\taraging_terms_descrip,\n\tformatMoney(araging_aropen_amount) AS araging_aropen_amount,\n\taraging_cur_val, formatMoney(araging_cur_val) AS araging_cur_amt,\n\taraging_thirty_val,formatMoney(araging_thirty_val) AS araging_thirty_amt,\n\taraging_sixty_val, formatMoney(araging_sixty_val) AS araging_sixty_amt,\n\taraging_ninety_val,formatMoney(araging_ninety_val) AS araging_ninety_amt,\n\taraging_plus_val, formatMoney(araging_plus_val) AS araging_plus_amt,\n\taraging_total_val, formatMoney(araging_total_val) AS araging_total_amt\nFROM araging(<? value("relDate") ?>, <? value("useDocDate") ?>)\n<? if exists("cust_id") ?>\n WHERE (araging_cust_id=<? value("cust_id") ?>)\n<? elseif exists("custtype_id") ?>\n WHERE (araging_cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custgrp_id") ?>\n LEFT OUTER JOIN custgrpitem ON (araging_cust_id=custgrpitem_cust_id)\n WHERE (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n WHERE (araging_custtype_code ~ <? value("custtype_pattern") ?>)\n<? endif ?>;\n \n \n 81\n \n \n \n 60\n 40\n 110\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n Parameter Query\n relDate\n \n \n \n \n
\n detail\n \n Customer\n araging_cust_number\n \n \n 113\n \n \n 0\n 100\n 980\n 100\n 0\n \n \n \n \n \n \n 0\n 5\n 967\n 5\n 0\n \n \n \n 125\n 40\n 220\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_terms_descrip\n \n \n \n \n \n \n \n \n \n 125\n 25\n 220\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_cust_number\n \n \n \n \n \n \n 125\n 10\n 220\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_cust_name\n \n \n \n \n \n \n \n \n \n 111\n \n \n 825\n 5\n 70\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_ninety_val\n \n qty\n \n \n \n \n 740\n 5\n 70\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_sixty_val\n \n qty\n \n \n \n \n 250\n 50\n 75\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_total_val\n \n qty\n \n \n \n \n 570\n 5\n 75\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_cur_val\n \n qty\n \n \n \n \n 650\n 5\n 75\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_thirty_val\n \n qty\n \n \n \n \n \n 5\n 50\n 220\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n araging_cust_name\n \n \n \n 0\n 5\n 967\n 5\n 0\n \n \n \n 900\n 5\n 70\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_plus_val\n \n qty\n \n \n \n \n \n 237\n 31\n 237\n 31\n 0\n \n \n \n \n \n \n detail\n \n 18\n \n \n 740\n 0\n 70\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_sixty_amt\n \n \n \n \n 480\n 0\n 80\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_aropen_amount\n \n \n \n \n 0\n 0\n 25\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_doctype\n \n \n \n \n 40\n 0\n 61\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_docnumber\n \n \n \n \n 215\n 0\n 85\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_duedate\n \n \n \n \n 910\n 0\n 55\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_plus_amt\n \n \n \n \n 825\n 0\n 70\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_ninety_amt\n \n \n \n \n 120\n 0\n 85\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_docdate\n \n \n \n \n 340\n 0\n 61\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_ponumber\n \n \n \n \n 570\n 0\n 75\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_cur_amt\n \n \n \n \n 650\n 0\n 75\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_thirty_amt\n \n \n \n
\n \n \n 103\n \n \n \n 650\n 5\n 75\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_thirty_val\n \n qty\n \n \n \n \n 740\n 5\n 70\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_sixty_val\n \n qty\n \n \n \n \n \n \n 570\n 5\n 75\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_cur_val\n \n qty\n \n \n \n \n 910\n 5\n 55\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_plus_val\n \n qty\n \n \n \n 1\n 1\n 967\n 1\n 2\n \n \n \n 440\n 75\n 41\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 250\n 50\n 75\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_total_val\n \n qty\n \n \n \n \n \n \n 825\n 5\n 70\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n araging_ninety_val\n \n qty\n \n \n \n \n 57\n \n \n 440\n 20\n 41\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n Enhanced AR Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date. 0 2013-07-26 16:14:22.271087 262 ARApplications \N \n\n A/R Applications\n ARApplications\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("cust_id") ?>\n (SELECT (cust_number || '-' || cust_name)\n FROM custinfo\n WHERE (cust_id=<? value("cust_id") ?>) )\n <? elseif exists("custtype_id") ?>\n (select (custtype_code||'-'||custtype_descrip)\n FROM custtype\n WHERE (custtype_id=<? value("custtype_id") ?>) )\n <? elseif exists("custtype_pattern") ?>\n text(<? value("custtype_pattern") ?>)\n <? else ?>\n text('All Customers')\n <? endif ?>\n AS f_value,\n <? if exists("custtype_id") ?>\n text('Cust. Type:')\n <? elseif exists("custtype_pattern") ?>\n text('Cust. Type Pattern:')\n <? else ?>\n text('Customer:')\n <? endif ?>\n AS f_label,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("includeCashReceipts") ?>\n <? if exists("includeCreditMemos") ?>\n text('Show Cash Receipts and Credit Memos')\n <? else ?>\n text('Show Cash Receipts')\n <? endif ?>\n <? elseif exists("includeCreditMemos") ?>\n text('Show Credit Memos')\n <? else ?>\n text('Error: No transaction type selected.')\n <? endif ?>\n AS f_show;\n \n \n detail\n SELECT arapply_id,\n formatDate(arapply_postdate) AS f_postdate,\n formatMoney(arapply_applied) AS f_applied,\n cust_number, cust_name,\n (CASE WHEN (arapply_source_doctype='C') THEN <? value("creditMemo") ?>\n WHEN (arapply_source_doctype='R') THEN <? value("cashdeposit") ?>\n WHEN (arapply_fundstype='C') THEN <? value("check") ?>\n WHEN (arapply_fundstype='T') THEN <? value("certifiedCheck") ?>\n WHEN (arapply_fundstype='M') THEN <? value("masterCard") ?>\n WHEN (arapply_fundstype='V') THEN <? value("visa") ?>\n WHEN (arapply_fundstype='A') THEN <? value("americanExpress") ?>\n WHEN (arapply_fundstype='D') THEN <? value("discoverCard") ?>\n WHEN (arapply_fundstype='R') THEN <? value("otherCreditCard") ?>\n WHEN (arapply_fundstype='K') THEN <? value("cash") ?>\n WHEN (arapply_fundstype='W') THEN <? value("wireTransfer") ?>\n WHEN (arapply_fundstype='O') THEN <? value("other") ?>\n END || ' ' ||\n CASE WHEN (arapply_source_doctype IN ('C','R')) THEN TEXT(arapply_source_docnumber)\n ELSE arapply_refnumber\n END) AS source,\n (CASE WHEN (arapply_target_doctype='D') THEN <? value("debitMemo") ?>\n WHEN (arapply_target_doctype='I') THEN <? value("invoice") ?>\n WHEN (arapply_target_doctype='K') THEN <? value("apcheck") ?>\n ELSE <? value("other") ?>\n END || ' ' ||\n TEXT(arapply_target_docnumber)) AS target,\n currConcat(arapply_curr_id) AS currAbbr,\n currtobase(arapply_curr_id,arapply_applied,arapply_postdate) AS base_applied\nFROM arapply, custinfo\nWHERE ( (arapply_cust_id=cust_id)\n AND (arapply_postdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n AND (arapply_source_doctype IN (\n<? if exists("includeCreditMemos") ?>\n <? if exists("includeCashReceipts") ?>\n 'K', 'C', 'R'\n <? else ?>\n 'C', 'R'\n <? endif ?>\n<? else ?>\n 'K'\n<? endif ?> ))\n<? if exists("cust_id") ?>\n AND (cust_id=<? value("cust_id") ?>)\n<? elseif exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id FROM custtype\n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n )\nORDER BY arapply_postdate, source;\n\n \n \n 146\n \n 5\n 140\n 745\n 140\n 2\n \n \n \n 565\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n 565\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n 10\n 65\n 125\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n f_label\n \n \n \n \n 95\n 90\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_show\n \n \n \n \n \n \n \n \n 140\n 65\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_value\n \n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 5\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 620\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_applied\n \n \n \n \n 220\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_postdate\n \n \n \n \n 460\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n target\n \n \n \n \n 700\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currAbbr\n \n \n \n \n 300\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n source\n \n \n \n \n 90\n 0\n 115\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n
\n \n 16\n \n \n \n 104\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 16\n \n \n 585\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n base_applied\n \n qty\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 303 AROpenItems \N \n\n A/R Open Items\n AROpenItems\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \nCASE WHEN (<? value("asofDate") ?> = endOfTime()) THEN 'Latest'\n ELSE formatDate(<? value("asofDate") ?>) END AS asOfDate,\n<? if exists("creditsOnly") ?>\n 'Credits Only' AS type,\n<? elseif exists("debitsOnly") ?>\n 'Debits Only' AS type,\n<? else ?>\n 'Debits and Credits' AS type,\n<? endif ?>\n<? if exists("cust_id") ?>\n (SELECT cust_name FROM custinfo WHERE cust_id=<? value("cust_id") ?>) AS selection,\n<? elseif exists("custtype_id") ?>\n (SELECT custtype_code FROM custtype WHERE custtype_id=<? value("custtype_id") ?>) AS selection,\n<? elseif exists("custtype_pattern") ?>\n ('Customer Type pattern = ' || <? value("custtype_pattern") ?>) AS selection,\n<? elseif exists("custgrp_id") ?>\n (SELECT custgrp_name FROM custgrp WHERE \n custgrp_id=<? value("custgrp_id") ?>) AS selection,\n<? else ?>\n 'All Customers' AS selection,\n<? endif ?>\n<? if exists("startDate") ?>\n 'Start Doc Date:' AS start_label,\n 'End Doc Date:' AS end_label,\n<? else ?>\n 'Start Due Date:' AS start_label, \n 'End Due Date:' AS end_label,\n<? endif ?>\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n currConcat(baseCurrId()) AS baseAbbr,\n<? if exists("incidentsOnly") ?>\n 'Yes' AS incidentsOnly\n<? else ?>\n 'No' AS incidentsOnly\n<? endif ?>;\n \n \n detail\n arOpenItems\n f_detail\n \n \n 178\n \n \n \n \n \n \n \n 514\n 69.7785\n 100\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n \n \n 514\n 52.6662\n 100\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n 5\n 170\n 745\n 170\n 2\n \n \n \n 410\n 52.6662\n 100\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n start_label\n \n \n \n \n 410.317\n 69.7785\n 100\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n end_label\n \n \n \n \n 141.375\n 69.7785\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n type\n \n \n \n \n 142\n 52.6662\n 250\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n selection\n \n \n \n \n 141.375\n 88.4798\n 200\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n incidentsOnly\n \n \n \n \n 514.049\n 88.4798\n 100\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n asOfDate\n \n \n \n \n \n \n \n \n \n 5\n \n \n 52\n \n \n 5\n 45\n 745\n 45\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 350\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 600\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 85\n 0\n 77\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n docnumber\n \n \n \n \n 700\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currAbbr\n \n \n \n \n 440\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 520\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_paid\n \n \n \n \n 5\n 0\n 78.9\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n doctype\n \n \n \n \n 270\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_docdate\n \n \n \n \n 165\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n
\n \n 18\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 104\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 18\n \n \n 700\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n baseAbbr\n \n \n \n \n 600\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n base_balance\n \n qty\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 87 WOHistoryByNumber \N \n\n Work Order History by Number\n WOHistoryByNumber\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n Detail\n SELECT formatWoNumber(wo_id) AS number,\n wo_subnumber AS subnumber,\n wo_status, warehous_code,\n item_number, item_descrip1, item_descrip2, uom_name,\n formatQty(wo_qtyord) AS ordered,\n formatQty(wo_qtyrcv) AS received,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate,\n <? if exists("showCosts") ?>\n text('W/O Cost') AS lbl_value,\n formatCost(wo_postedvalue) AS value\n <? else ?>\n text('') AS lbl_value,\n text('') AS value\n <? endif ?>\n FROM wo, itemsite, whsinfo, item, uom\n WHERE ((wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (CAST(wo_number AS TEXT) ~ <? value("woNumber") ?>)\n<? if exists("showOnlyTopLevel") ?>\n AND ((wo_ordtype<>'W') OR (wo_ordtype IS NULL))\n<? endif ?>\n )\nORDER BY wo_subnumber;\n \n \n \n 172\n \n \n \n \n \n \n \n \n \n \n \n 135\n 85\n 170\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n woNumber\n \n \n \n \n 5\n 165\n 740\n 165\n 2\n \n \n \n \n 670\n 151\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n lbl_value\n \n \n \n \n \n 7\n \n \n 32\n \n \n \n \n \n \n \n 5\n 25\n 740\n 25\n 2\n \n \n \n \n \n \n 665\n 13\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n lbl_value\n \n \n \n
\n detail\n \n \n Detail\n \n 52\n \n \n 125\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_descrip1\n \n \n \n \n 5\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n number\n \n \n \n \n 125\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_descrip2\n \n \n \n \n 270\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n ordered\n \n \n \n \n 350\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n received\n \n \n \n \n 670\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n value\n \n \n \n \n 65\n 0\n 20\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wo_status\n \n \n \n \n 85\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n warehous_code\n \n \n \n \n 430\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n startdate\n \n \n \n 5\n 45\n 740\n 45\n 0\n \n \n \n 508\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n duedate\n \n \n \n \n 228\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n uom_name\n \n \n \n \n 125\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_number\n \n \n \n
\n \n 17\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 112\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 490 Backlog \N \n\n Backlog\n Backlog\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT CASE WHEN (checkPrivilege('ViewCustomerPrices') AND isMultiCurr()) THEN text('Amount(base)')\n WHEN (checkPrivilege('ViewCustomerPrices')) THEN text('Amount')\n ELSE text('')\n END AS lbl_baseamount,\n CASE WHEN (checkPrivilege('ViewCustomerPrices') AND isMultiCurr()) THEN text('Amount(foreign)')\n ELSE text('')\n END AS lbl_foreignamount;\n \n \n detail\n SELECT cohead_number, coitem_linenumber, cust_name,\n formatDate(cohead_orderdate) AS f_orderdate,\n formatDate(coitem_scheddate) AS f_scheddate,\n item_number, uom_name,\n item_descrip1, item_descrip2,\n formatQty(coitem_qtyord) AS f_qtyord,\n formatQty(coitem_qtyshipped) AS f_qtyship,\n formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) AS f_balance, \n CASE WHEN (checkPrivilege('ViewCustomerPrices')) THEN\nformatMoney(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n * (currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio),2))\n ELSE\n text('')\n END\n AS f_ammount,\n CASE WHEN (checkPrivilege('ViewCustomerPrices') AND isMultiCurr()) THEN\nformatMoney(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n * (coitem_price / coitem_price_invuomratio),2))\n ELSE\n text('')\n END\n AS foreign_ammount,\nround((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n * (currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio),2) AS backlog \n FROM cohead, coitem, itemsite, item, custinfo, uom\n WHERE ((coitem_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (coitem_status='O')\n <? if exists("cohead_id") ?>\n AND (coitem_cohead_id=<? value("cohead_id") ?>)\n <? endif ?>\n <? if exists("startDate") ?>\n AND (cohead_orderdate >= <? value("startDate") ?>)\n <? endif ?>\n <? if exists("endDate") ?>\n AND (cohead_orderdate <= <? value("endDate") ?>)\n <? endif ?>\n <? if exists("startDateSched") ?>\n AND (coitem_scheddate >= <? value("startDateSched") ?>)\n <? endif ?>\n <? if exists("endDateSched") ?>\n AND (coitem_scheddate <= <? value("endDateSched") ?>)\n <? endif ?>\n <? if exists("salesrep_id") ?>\n AND (cohead_salesrep_id=<? value("salesrep_id") ?>)\n <? endif ?>\n <? if exists("shipto_id") ?>\n AND (cohead_shipto_id=<? value("shipto_id") ?>)\n <? endif ?>\n <? if exists("cust_id") ?>\n AND (cohead_cust_id=<? value("cust_id") ?>)\n <? endif ?>\n <? if exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n <? endif ?>\n <? if exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT DISTINCT custtype_id\n FROM custtype\n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n <? endif ?>\n <? if exists("custgrp") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem))\n <? endif ?>\n <? if exists("custgrp_id") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrpitem\n WHERE (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)))\n <? endif ?>\n <? if exists("custgrp_pattern") ?>\n AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n FROM custgrp, custgrpitem\n WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n AND (custgrp_name ~ <? value("custgrp_pattern") ?>) )) )\n <? endif ?>\n\n <? if exists("item_id") ?>\n AND (itemsite_item_id=<? value("item_id") ?>)\n <? endif ?>\n <? if exists("prodcat_id") ?>\n AND (item_prodcat_id=<? value("prodcat_id") ?>)\n <? endif ?>\n <? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n FROM prodcat\n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n <? endif ?>\n\n <? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n <? endif ?>\n)\nORDER BY coitem_scheddate, cohead_number, coitem_linenumber;\n \n \n total\n SELECT now()\n WHERE 't' = CASE WHEN (checkPrivilege('ViewCustomerPrices')) THEN 't'\n ELSE 'f'\n END\n;\n \n \n 226\n \n \n \n \n \n 660\n 185\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_baseamount\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 660\n 200\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_foreignamount\n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 28\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n \n \n \n 660\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_baseamount\n \n \n \n \n 660\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_foreignamount\n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 52\n \n \n 305\n 30\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 65\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n coitem_linenumber\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 305\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 507\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyship\n \n \n \n \n 671\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n foreign_ammount\n \n \n \n \n 305\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ammount\n \n \n \n \n 450\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 225\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orderdate\n \n \n \n \n 507\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyord\n \n \n \n \n 225\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scheddate\n \n \n \n \n 112\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 5\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n
\n
\n totals\n \n \n total\n \n 18\n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n backlog\n \n money\n \n \n \n
\n \n 18\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 32 CostCategoriesMasterList \N \n\n Cost Categories Master List\n CostCategoriesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT costcat_code, costcat_descrip,\n CASE WHEN (costcat_asset_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_asset_accnt_id) ELSE '' END AS asset,\n CASE WHEN (costcat_wip_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_wip_accnt_id) ELSE '' END AS wip,\n CASE WHEN (costcat_invcost_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_invcost_accnt_id) ELSE '' END AS invcost,\n CASE WHEN (costcat_purchprice_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_purchprice_accnt_id) ELSE '' END AS purchprice,\n CASE WHEN (costcat_adjustment_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_adjustment_accnt_id) ELSE '' END AS adjustment,\n CASE WHEN (costcat_scrap_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_scrap_accnt_id) ELSE '' END AS scrap,\n CASE WHEN fetchMetricBool('Routings') THEN 'Labor and Overhead Costs:' ELSE '' END AS laboroverheadLit,\n CASE WHEN (fetchMetricBool('Routings') AND\n costcat_laboroverhead_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_laboroverhead_accnt_id) ELSE '' END AS laboroverhead,\n CASE WHEN (costcat_liability_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_liability_accnt_id) ELSE '' END AS liability,\n CASE WHEN fetchMetricBool('MultiWhs') THEN 'Transfer Order Liability Clearing:' ELSE '' END AS toliabilityLit,\n CASE WHEN (fetchMetricBool('MultiWhs') AND\n costcat_toliability_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_toliability_accnt_id) ELSE '' END AS toliability,\n CASE WHEN fetchMetricBool('Transforms') THEN 'Transform Clearing:' ELSE '' END AS transformLit,\n CASE WHEN (fetchMetricBool('Transforms') AND\n costcat_transform_accnt_id IS NOT NULL) THEN formatGlAccountLong(costcat_transform_accnt_id) ELSE '' END AS transform\n FROM costcat\nORDER BY costcat_code;\n \n \n 61\n \n \n 5\n 55\n 745\n 55\n 2\n \n \n
\n detail\n \n \n detail\n \n 161\n \n \n 415\n 55\n 160\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n transformLit\n \n \n \n \n 575\n 55\n 250\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n transform\n \n \n \n \n \n 165\n 55\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wip\n \n \n \n \n 575\n 70\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n toliability\n \n \n \n \n 415\n 70\n 160\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n toliabilityLit\n \n \n \n \n 165\n 100\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n adjustment\n \n \n \n \n \n 120\n 20\n 600\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n costcat_descrip\n \n \n \n \n 165\n 131\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n liability\n \n \n \n \n 165\n 40\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n asset\n \n \n \n \n 20\n 150\n 760\n 150\n 0\n \n \n \n 120\n 5\n 600\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n costcat_code\n \n \n \n \n 415\n 40\n 160\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n laboroverheadLit\n \n \n \n \n 165\n 84\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n purchprice\n \n \n \n \n \n 575\n 40\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n laboroverhead\n \n \n \n \n 165\n 70\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invcost\n \n \n \n \n \n 165\n 115\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n scrap\n \n \n \n \n \n \n \n
\n \n 15\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 34 CountSlipEditList \N \n\n Count Slip Edit List\n CountSlipEditList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n warehous_code as warehouse,\n invcnt_tagnumber\n FROM item, itemsite, invcnt, whsinfo\n WHERE ((itemsite_item_id=item_id)\n AND (invcnt_itemsite_id=itemsite_id)\n AND (invcnt_id=<? value("cnttag_id") ?>)\n AND (itemsite_warehous_id=warehous_id) );\n\n \n \n detail\n SELECT cntslip_username AS f_username,\n cntslip_number,\n formatBoolYN(cntslip_posted) AS f_posted,\n formatDateTime(cntslip_entered) AS f_entered,\n formatQty(cntslip_qty) AS f_qty\n FROM cntslip\n WHERE (cntslip_cnttag_id=<? value("cnttag_id") ?>)\nORDER BY cntslip_number;\n \n \n 221\n \n \n \n \n \n \n 100\n 95\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 100\n 135\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n 100\n 75\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n invcnt_tagnumber\n \n \n \n \n \n \n \n 100\n 114\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 100\n 155\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 165\n 0\n 275\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntslip_number\n \n \n \n \n 540\n 0\n 114\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_entered\n \n \n \n \n 455\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 665\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 50\n 0\n 105\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_username\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 264 CreditMemoEditList \N \n\n Credit Memo Edit List\n CreditMemoEditList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT orderid,\n itemid,\n documentnumber,\n CASE WHEN(documentnumber='') THEN item\n ELSE cust_number\n END AS name,\n CASE WHEN(documentnumber='') THEN itemdescrip\n ELSE billtoname\n END AS descrip,\n ordernumber,\n linenumber,\n iteminvuom,\n qtytobill,\n price,\n extprice,\n sence,\n account\n FROM creditMemoEditList\nORDER BY ordernumber, linenumber;\n \n \n 136\n \n \n \n \n \n \n \n 5\n 130\n 745\n 130\n 2\n \n \n \n \n \n \n \n \n \n 7\n \n \n 36\n \n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 31\n \n \n 340\n 15\n 240\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sence\n \n \n \n \n 75\n 15\n 254\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n descrip\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n extprice\n \n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n price\n \n \n \n \n 90\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordernumber\n \n \n \n \n 285\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n iteminvuom\n \n \n \n \n 180\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n name\n \n \n \n \n 590\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtytobill\n \n \n \n \n 340\n 0\n 240\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 685\n 15\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shiptostate\n \n \n \n \n 5\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n documentnumber\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 424 CurrencyConversionList \N \n\n Currency Exchange Rates\n CurrencyConversionList\n \n Letter\n \n 100\n 100\n 100\n 100\n \n exchangeRates\n currencyConversions\n detail\n \n \n baseCurrency\n SELECT\n\tcurr_name,\n\tcurrConcat(curr_id) AS currConcat\nFROM curr_symbol\nWHERE curr_base = TRUE;\n \n \n knownCurrencies\n SELECT\n\tcurr_name,\n\tcurrConcat(curr_id) AS currConcat,\n\tcurr_base\nFROM curr_symbol\nWHERE curr_base = FALSE\nORDER BY currConcat;\n \n \n 113\n \n \n \n 0\n 60\n 151\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n baseCurrency\n curr_name\n \n \n \n \n \n \n 150\n 60\n 116\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n baseCurrency\n currConcat\n \n \n \n
\n Known Currencies\n \n Known\n curr_base\n \n 61\n \n \n \n \n \n 0\n 50\n 407\n 50\n 2\n \n \n \n \n \n knownCurrencies\n \n 21\n \n \n 150\n 0\n 126\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n knownCurrencies\n currConcat\n \n \n \n \n 0\n 0\n 150\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n knownCurrencies\n curr_name\n \n \n \n
\n
\n Exchange Rates\n \n By Currency\n currConcat\n \n 21\n \n 409\n 10\n 5\n 10\n 0\n \n \n \n \n \n exchangeRates\n \n 21\n \n \n 0\n 0\n 96\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n exchangeRates\n f_curr\n \n \n \n \n 330\n 0\n 80\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n exchangeRates\n curr_expires\n \n \n \n \n 90\n 0\n 120\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n exchangeRates\n rate\n \n \n \n \n 230\n 0\n 90\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n exchangeRates\n curr_effective\n \n \n \n
\n \n 31\n \n \n 100\n 10\n 120\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 241 CustomerARHistory \N \n\n Customer A/R History\n CustomerARHistory\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT cust_name,\n formatDate(date(<? value("startDate") ?>)) AS startDate,\n formatDate(date(<? value("endDate") ?>)) AS endDate\n FROM custinfo\n WHERE (cust_id=<? value("cust_id") ?>);\n \n \n \n detail\n arHistory\n detail\n \n \n 156\n \n \n \n \n 550\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n endDate\n \n \n \n \n \n \n \n \n \n 550\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startDate\n \n \n \n \n \n 135\n 65\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_name\n \n \n \n \n 5\n 150\n 745\n 150\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n amount\n \n extprice\n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n balance\n \n extprice\n \n \n \n 349\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_docdate\n \n \n \n \n 444\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 5\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_open\n \n \n \n \n 175\n 0\n 170\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n docnumber\n \n \n \n \n 70\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n documenttype\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 104\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 419 EmployeeList \N \n\n Employee List\n EmployeeList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT e.emp_id, m.emp_id, warehous_code, e.emp_code, e.emp_number,\n cntct_first_name, cntct_last_name, \n m.emp_code AS mgr_code, dept_number, shift_number,\n CASE WHEN (e.emp_active) THEN 'Yes'\n ELSE 'No'\n END AS f_active \nFROM emp e \n LEFT OUTER JOIN cntct ON (emp_cntct_id=cntct_id) \n LEFT OUTER JOIN whsinfo ON (emp_warehous_id=warehous_id) \n LEFT OUTER JOIN emp m ON (e.emp_mgr_emp_id=m.emp_id) \n LEFT OUTER JOIN shift ON (e.emp_shift_id=shift_id) \n LEFT OUTER JOIN dept ON (e.emp_dept_id=dept_id) \nWHERE ((LENGTH(TRIM(COALESCE(<? value("searchString") ?>,''))) = 0)\n<? if exists("searchCode") ?>\n OR (e.emp_code ~* <? value("searchString") ?>)\n<? endif ?>\n<? if exists("searchDept") ?>\n OR (dept_number ~* <? value("searchString") ?>)\n OR (dept_name ~* <? value("searchString") ?>)\n<? endif ?>\n<? if exists("searchMgr") ?>\n OR (m.emp_code ~* <? value("searchString") ?>)\n OR (m.emp_number ~* <? value("searchString") ?>)\n<? endif ?>\n<? if exists("searchNumber") ?>\n OR (e.emp_number ~* <? value("searchString") ?>)\n<? endif ?>\n<? if exists("searchName") ?>\n OR (cntct_first_name ~* <? value("searchString") ?>)\n OR (cntct_last_name ~* <? value("searchString") ?>)\n<? endif ?>\n<? if exists("searchShift") ?>\n OR (shift_number ~* <? value("searchString") ?>)\n OR (shift_name ~* <? value("searchString") ?>)\n<? endif ?>\n )\n<? if exists("activeOnly") ?>\n AND e.emp_active \n<? endif ?>\n<? if exists("warehouse_id") ?>\n AND (warehous_id=<? value("warehouse_id") ?>)\n<? endif ?>\nORDER BY emp_code; \n \n \n head\n SELECT 'Search for "' || <? value("searchString") ?> ||\n '"' ||\n<? if exists("searchCode") ?> ' in Employee Code,' || <? endif ?>\n<? if exists("searchDept") ?> ' in Department, ' || <? endif ?>\n<? if exists("searchMgr") ?> ' in Manager, ' || <? endif ?>\n<? if exists("searchNumber") ?> ' in Employee Number, ' || <? endif ?>\n<? if exists("searchShift") ?> ' in Shift, ' || <? endif ?>\n<? if exists("activeOnly") ?> ' Among Active Employees'\n<? else ?> ' Among All Employees'\n<? endif ?>\nAS filter;\n \n \n 131\n \n \n 390\n 40\n 360\n 31\n \n 0\n \n Arial\n 8\n normal\n \n \n \n \n head\n filter\n \n \n \n \n \n \n 747\n 65\n 42\n 12\n \n 0\n \n Arial\n 8\n normal\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 10\n 130\n 750\n 130\n 2\n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n
\n detail\n \n \n detail\n \n 31\n \n \n 460\n 0\n 130\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_first_name\n \n \n \n \n 605\n 0\n 130\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cntct_last_name\n \n \n \n \n 170\n 15\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n dept_number\n \n \n \n \n 310\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shift_number\n \n \n \n \n 170\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n emp_number\n \n \n \n \n 375\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n mgr_code\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n emp_code\n \n \n \n \n 112\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_active\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 206 ExpenseCategoriesMasterList \N \n\n Expense Categories Master List\n ExpenseCategoriesMasterList\n \n Letter\n \n 50\n 50\n 28\n 28\n \n detail\n SELECT \n expcat_code,\n expcat_descrip,\n formatGLAccountLong(expcat_exp_accnt_id) AS exp_accnt,\n formatGLAccountLong(expcat_purchprice_accnt_id) AS ppv_accnt,\n formatGLAccountLong(expcat_liability_accnt_id) AS poliab_accnt,\n formatGLAccountLong(expcat_freight_accnt_id) AS polinefrgt_accnt\nFROM \n expcat AS A\nORDER BY expcat_code;\n\n \n \n 90\n \n \n 6\n 85\n 1036\n 85\n 2\n \n \n \n \n \n \n \n \n \n \n 7\n \n \n 33\n \n \n 6\n 30\n 1036\n 30\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 40\n \n \n 260\n -1\n 490\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n expcat_descrip\n \n \n \n \n 5\n 0\n 130\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n expcat_code\n \n \n \n \n 5\n 14\n 230\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n exp_accnt\n \n \n \n \n 260\n 14\n 240\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ppv_accnt\n \n \n \n \n 520\n 14\n 230\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poliab_accnt\n \n \n \n \n 780\n 14\n 230\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n polinefrgt_accnt\n \n \n \n 6\n 30\n 1036\n 30\n 1\n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 945\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 76 FreightAccountAssignmentsMasterList \N \n\n A/R Account Assignments Master List\n FreightAccountAssignmentsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT CASE WHEN araccnt_custtype_id=-1 THEN araccnt_custtype\n ELSE (SELECT custtype_code FROM custtype WHERE (custtype_id=araccnt_custtype_id))\n END AS custtypecode,\n formatGLAccount(araccnt_ar_accnt_id) AS f_araccnt,\n formatGLAccount(araccnt_freight_accnt_id) as f_freightaccnt,\n formatGLAccount(araccnt_prepaid_accnt_id) AS f_prepaidaccnt,\n formatGLAccount(araccnt_deferred_accnt_id) AS f_deferredaccnt\nFROM araccnt \nORDER BY custtypecode;\n \n \n 88\n \n 5\n 80\n 745\n 80\n 2\n \n \n \n \n \n \n \n \n \n \n 8\n \n \n 28\n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 19\n \n \n 290\n 1\n 125\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_freightaccnt\n \n \n \n \n 5\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custtypecode\n \n \n \n \n 130\n 0\n 125\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_araccnt\n \n \n \n \n 610\n 1\n 125\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_deferredaccnt\n \n \n \n \n 450\n 1\n 125\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_prepaidaccnt\n \n \n \n
\n \n 18\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 426 FreightClassesMasterList \N \n\n Freight Classes Master List\n FreightClassesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select freightclass_code, freightclass_descrip\n from freightclass\norder by freightclass_code;\n \n \n 76\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n freightclass_descrip\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n freightclass_code\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 242 GLSeries \N \n\n G/L Series\n GLSeries\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? value("title") ?> AS title,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("sourceLit") ?>\n text(<? value("sourceLit") ?>)\n <? else ?>\n text('All Sources')\n <? endif ?>\n AS sourceLit,\n <? if exists("startJrnlnum") ?>\n text('Start Journal Number:')\n <? else ?>\n text('')\n <? endif ?>\n AS startJrnlnumLit,\n <? if exists("endJrnlnum") ?>\n text('End Journal Number:')\n <? else ?>\n text('')\n <? endif ?>\n AS endJrnlnumLit;\n \n \n detail\n <? if exists("gltrans") ?>\nSELECT gltrans_id,\n gltrans_sequence,\n formatDate(gltrans_date) AS transdate,\n gltrans_journalnumber,\n gltrans_source,\n gltrans_doctype,\n gltrans_docnumber,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n firstLine(gltrans_notes) AS f_notes,\n CASE WHEN (gltrans_amount < 0) THEN formatMoney(gltrans_amount * -1)\n ELSE ''\n END AS f_debit,\n CASE WHEN (gltrans_amount > 0) THEN formatMoney(gltrans_amount)\n ELSE ''\n END AS f_credit,\n CASE WHEN (gltrans_amount < 0) THEN (gltrans_amount * -1)\n ELSE 0.0\n END AS debit,\n CASE WHEN (gltrans_amount > 0) THEN (gltrans_amount)\n ELSE 0.0\n END AS credit,\n formatBoolYN(gltrans_posted) AS f_posted\n FROM gltrans, accnt\n WHERE ((gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted)\n<? if exists("startDate") ?>\n AND (gltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("source") ?>\n AND (gltrans_source=<? value("source") ?>)\n<? endif ?>\n<? if exists("startJrnlnum") ?>\n AND (gltrans_journalnumber BETWEEN <? value("startJrnlnum") ?> AND <? value("endJrnlnum") ?>)\n<? endif ?>\n )\nORDER BY gltrans_date, gltrans_sequence, gltrans_amount DESC;\n<? else ?>\nSELECT sltrans_id AS gltrans_id,\n sltrans_sequence AS gltrans_sequence,\n formatDate(sltrans_date) AS transdate,\n sltrans_journalnumber AS gltrans_journalnumber,\n sltrans_source AS gltrans_source,\n sltrans_doctype AS gltrans_doctype,\n sltrans_docnumber AS gltrans_docnumber,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n firstLine(sltrans_notes) AS f_notes,\n CASE WHEN (sltrans_amount < 0) THEN formatMoney(sltrans_amount * -1)\n ELSE ''\n END AS f_debit,\n CASE WHEN (sltrans_amount > 0) THEN formatMoney(sltrans_amount)\n ELSE ''\n END AS f_credit,\n CASE WHEN (sltrans_amount < 0) THEN (sltrans_amount * -1)\n ELSE 0.0\n END AS debit,\n CASE WHEN (sltrans_amount > 0) THEN (sltrans_amount)\n ELSE 0.0\n END AS credit,\n formatBoolYN(sltrans_posted) AS f_posted\n FROM sltrans, accnt\n WHERE ((sltrans_accnt_id=accnt_id)\n<? if exists("startDate") ?>\n AND (sltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("source") ?>\n AND (sltrans_source=<? value("source") ?>)\n<? endif ?>\n<? if exists("startJrnlnum") ?>\n AND (sltrans_journalnumber BETWEEN <? value("startJrnlnum") ?> AND <? value("endJrnlnum") ?>)\n<? endif ?>\n )\nORDER BY sltrans_date, sltrans_sequence, sltrans_amount DESC;\n<? endif ?>\n \n \n 206\n \n \n \n \n \n 545\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n startJrnlnum\n \n \n \n \n 140\n 70\n 290\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n sourceLit\n \n \n \n \n \n \n \n \n 545\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 340\n 140\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n endJrnlnumLit\n \n \n \n 5\n 200\n 745\n 200\n 2\n \n \n \n \n 545\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 340\n 120\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n startJrnlnumLit\n \n \n \n \n 545\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n endJrnlnum\n \n \n \n \n \n 440\n 7\n 300\n 35\n \n \n Arial\n 18\n bold\n \n \n \n \n head\n title\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n detail\n gltrans_sequence\n \n 16\n \n \n 95\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_journalnumber\n \n \n \n \n 680\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 160\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_doctype\n \n \n \n \n 330\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_notes\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 245\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_docnumber\n \n \n \n \n 95\n 15\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_source\n \n \n \n \n \n \n detail\n \n 16\n \n \n 595\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n \n 330\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n
\n \n 21\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 35\n \n \n 510\n 5\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debit\n \n %0.2f\n \n \n \n \n 595\n 5\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credit\n \n %0.2f\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 243 GLTransactions \N \n\n G/L Transactions\n GLTransactions\n detail query modified to accomodate "Company", "Profit Center", "Account", "Sub", "Type" & "Sub-Type" filters.\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("source") ?>\n text(<? value("source") ?>)\n <? else ?>\n text('All Sources')\n <? endif ?>\n AS source,\n <? if exists("accnt_id") ?>\n ( SELECT (accnt_number || '-' || accnt_descrip)\n FROM accnt\n WHERE (accnt_id=<? value("accnt_id") ?>) )\n <? else ?>\n text('All Accounts')\n <? endif ?>\n AS accnt,\n <? if exists("showUsernames") ?>\n text('Username')\n <? else ?>\n text('')\n <? endif ?>\n AS f_username\n \n \n detail\n <? if exists("beginningBalance") ?>\nSELECT -1 AS gltrans_id,\n <? value("startDate") ?> AS gltrans_created, formatDate(<? value("startDate") ?>) AS transdate,\n '' AS gltrans_source, '' AS gltrans_doctype, '' AS gltrans_docnumber, '' AS invhist_docnumber,\n 'Beginning Balance' AS transnotes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n '' AS f_debit,\n 0.0 AS debit_amt,\n '' AS f_credit,\n 0.0 AS credit_amt,\n <? value("beginningBalance") ?> AS balance_amt,\n <? value("beginningBalance") ?> AS gltrans_amount,\n <? value("beginningBalance") ?> AS running,\n NULL AS f_posted,\n NULL AS f_deleted,\n NULL AS f_username,\n -1 AS gltrans_sequence\n FROM accnt\n WHERE (accnt_id=<? value("accnt_id") ?>)\nUNION\n<? endif ?>\n\nSELECT gltrans_id,\n gltrans_created, formatDate(gltrans_date) AS transdate,\n gltrans_source, gltrans_doctype, gltrans_docnumber, invhist_docnumber,\n firstLine(gltrans_notes) AS transnotes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n-- Debits:\n CASE WHEN (gltrans_amount < 0 AND NOT gltrans_deleted) THEN formatMoney(ABS(gltrans_amount))\n ELSE ''\n END AS f_debit, \n CASE WHEN (gltrans_amount < 0 AND NOT gltrans_deleted) THEN ABS(gltrans_amount)\n ELSE 0\n END AS debit_amt, \n--Credits:\n CASE WHEN (gltrans_amount > 0 AND NOT gltrans_deleted) THEN formatMoney(gltrans_amount)\n ELSE ''\n END AS f_credit,\n CASE WHEN (gltrans_amount > 0 AND NOT gltrans_deleted) THEN gltrans_amount\n ELSE 0\n END AS credit_amt,\n--Balance:\n CASE WHEN (accnt_type IN ('A','E') AND NOT gltrans_deleted) THEN \n gltrans_amount * -1\n WHEN (NOT gltrans_deleted) THEN \n gltrans_amount \n ELSE 0 END AS balance_amt,\n gltrans_amount,\n CASE WHEN (accnt_type IN ('A','E') AND NOT gltrans_deleted) THEN \n gltrans_amount * -1\n WHEN (NOT gltrans_deleted) THEN \n gltrans_amount \n ELSE 0 END AS running,\n formatBoolYN(gltrans_posted) AS f_posted,\n formatBoolYN(gltrans_deleted) AS f_deleted,\n gltrans_username AS f_username,\n gltrans_sequence\nFROM gltrans JOIN accnt ON (gltrans_accnt_id=accnt_id) \n LEFT OUTER JOIN invhist ON (gltrans_misc_id=invhist_id\n AND gltrans_docnumber='Misc.') \n<? if exists("company_id") ?>\n JOIN company ON (accnt_company=company_number) \n<? endif ?>\n<? if exists("prfcntr_id") ?>\n JOIN prftcntr ON (accnt_profit=prftcntr_number) \n<? endif ?>\n<? if exists("subaccnt_id") ?>\n JOIN subaccnt ON (accnt_sub=subaccnt_number) \n<? endif ?>\n<? if exists("subType") ?>\n JOIN subaccnttype ON (subaccnttype_code=accnt_subaccnttype_code) \n<? endif ?>\nWHERE (\n<? if exists("startDate") ?>\n <? if exists("endDate") ?>\n (gltrans_date BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n <? else ?>\n (gltrans_date BETWEEN <? value("startDate") ?>\n AND endoftime())\n <? endif ?>\n<? else ?>\n <? if exists("endDate") ?>\n (gltrans_date BETWEEN startoftime()\n AND <? value("endDate") ?>)\n <? else ?>\n (gltrans_date BETWEEN startoftime()\n AND endoftime())\n <? endif ?>\n<? endif ?>\n<? if not exists("showDeleted") ?>\n AND (NOT gltrans_deleted)\n<? endif ?>\n<? if exists("company_id") ?>\n AND (company_id=<? value("company_id") ?>)\n<? endif ?>\n<? if exists("prfcntr_id") ?>\n AND (prftcntr_id=<? value("prfcntr_id") ?>)\n<? endif ?>\n<? if exists("accnt_number") ?>\n AND (accnt_number=<? value("accnt_number") ?>)\n<? endif ?>\n<? if exists("subaccnt_id") ?>\n AND (subaccnt_id=<? value("subaccnt_id") ?>)\n<? endif ?>\n<? if exists("subType") ?>\n AND (subaccnttype_id=<? value("subType") ?>)\n<? endif ?>\n<? if exists("accntType") ?>\n AND (accnt_type= <? value("accntType") ?>)\n<? endif ?>\n<? if exists("accnt_id") ?>\n AND (gltrans_accnt_id=<? value("accnt_id") ?>)\n<? endif ?>\n<? if exists("docnum") ?>\n AND (gltrans_docnumber = case when <? value("docnum") ?> = '' then \n gltrans_docnumber else \n<? value("docnum") ?> end ) \n<? endif ?>\n<? if exists("source") ?>\n AND (gltrans_source=<? value("source") ?>)\n<? endif ?>\n )\nORDER BY gltrans_created <? if not exists("beginningBalance") ?> DESC <? endif ?>,\n gltrans_sequence, gltrans_amount\n\n;\n \n \n 205\n \n \n \n \n \n \n \n \n 0\n 200\n 1000\n 200\n 2\n \n \n \n \n \n \n 900\n 185\n 50\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_username\n \n \n \n \n \n \n 10\n 50\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 5\n \n \n 45\n \n \n \n \n 0\n 40\n 1000\n 40\n 2\n \n \n \n \n \n \n \n \n 900\n 25\n 50\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_username\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 30\n \n \n 900\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_username\n \n \n \n \n 240\n 15\n 265\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transnotes\n \n \n \n \n 960\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 12500\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_doctype\n \n \n \n \n 125\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_doctype\n \n \n \n \n 0\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 65\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_source\n \n \n \n \n 180\n 15\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invhist_docnumber\n \n \n \n \n 180\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_docnumber\n \n \n \n \n 240\n 0\n 270\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 960\n 15\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_deleted\n \n \n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n \n 780\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n running\n \n qty\n \n \n \n \n 660\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n
\n \n 41\n \n \n 958\n 7\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 87\n 7\n 100\n 20\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 49\n \n 534\n 6\n 999\n 6\n 2\n \n \n \n \n \n 660\n 25\n 100\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credit_amt\n \n money\n \n \n \n \n 540\n 25\n 100\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debit_amt\n \n money\n \n \n \n \n 777\n 25\n 100\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n balance_amt\n \n money\n \n \n \n
\n detail query modified to accomodate "Company", "Profit Center", "Account", "Sub", "Type" & "Sub-Type" filters. 0 2013-07-26 16:14:22.271087 439 Image \N \n\n Image\n Image\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT image_name,\n image_descrip,\n image_data\n FROM image\n WHERE (image_id=<? value("image_id") ?>);\n \n \n 706\n \n \n \n \n 10\n 110\n 730\n 600\n \n stretch\n \n head\n image_data\n \n \n \n \n 130\n 65\n 360\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n head\n image_descrip\n \n \n \n \n 130\n 50\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n image_name\n \n \n \n \n \n 17\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n\n \N 0 2013-07-26 16:14:22.271087 336 IncidentCategoriesList \N \n\n Incident Categories\n IncidentCategoriesList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT incdtcat_name, incdtcat_order, incdtcat_descrip\n FROM incdtcat\nORDER BY incdtcat_order, incdtcat_name;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 250\n 0\n 500\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtcat_descrip\n \n \n \n \n 10\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtcat_order\n \n \n \n \n 100\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtcat_name\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 165 DeliveryDateVariancesByItem \N \n\n Delivery Date Variances By Item\n DeliveryDateVariancesByItem\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number, item_descrip1,\n item_descrip2, uom_name,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername") ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername\n FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n \n \n detail\n poDeliveryDateVariances\n detail\n \n \n 185\n \n \n 310\n 47\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n \n \n 95\n 67\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n \n \n \n 95\n 47\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 95\n 84\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n 95\n 109\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n 5\n 182\n 745\n 182\n 2\n \n \n \n 550\n 47\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 95\n 129\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n 550\n 67\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n \n 6\n \n \n 39\n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 32\n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recv_date\n \n \n \n \n 195\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemnumber\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n argd_duedate\n \n \n \n 7\n 31\n 747\n 31\n 0\n \n \n \n 60\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 195\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemdescrip\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_order_number\n \n \n \n \n 492\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 493\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n real_leadtime\n \n \n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orderdate\n \n \n \n \n 581\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n release_duedate\n \n \n \n
\n \n 16\n \n \n \n 102\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 381 FinancialReportQuarterBudget \N \n\n Financial Report Quarter and Budget\n FinancialReportQuarterBudget\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_qtr <> 0) OR (flstmtitem_qtrbudget <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 167\n \n \n \n 380\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 380\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n 580\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n 1\n 160\n 749\n 160\n 2\n \n \n \n \n 500\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 660\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 4\n \n \n 37\n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n 1.80678\n 30\n 750\n 30\n 2\n \n \n \n 380\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtrbudgetdiffprcnt\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtrbudgetdiff\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtrbudget\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtr\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 385 FinancialReportYearPriorYear \N \n\n Financial Report Year and Prior Year\n FinancialReportYearPriorYear\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_typedescrip2 || 'Diff.' AS f_diff,\n flstmthead_typedescrip2 || ' % Diff.' AS f_diffprcnt,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_year <> 0) OR (flstmtitem_pryear <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 167\n \n \n 650\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 555\n 145\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n \n \n 360\n 145\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 459\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 555\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 650\n 145\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 459\n 145\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 360\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n 0\n 160\n 750\n 160\n 2\n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 4\n \n \n 37\n \n \n 650\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 1\n 30\n 749\n 30\n 2\n \n \n \n 555\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n 555\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 360\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 360\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 459\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_pryear\n \n \n \n \n 650\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n 459\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 360\n 0\n 750\n 0\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 459\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_pryear\n \n \n \n \n 555\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_pryeardiff\n \n \n \n \n 360\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_year\n \n \n \n \n 650\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_pryeardiffprcnt\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 388 FinancialTrend \N \n\n Financial Trend\n FinancialTrend\n Financial Trend Report\n \n Financial Report Layout\n SELECT flhead_id, flhead_name FROM flhead WHERE (flhead_active)\n \n \n Time period buckets\n Month\n Quarter\n Year\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n \n Display account numbers with description\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 25\n 25\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n fltrendhead_username,\n fltrendhead_flhead_name,\n fltrendhead_typedescrip,\n fltrendhead_fld1,\n fltrendhead_fld2,\n fltrendhead_fld3,\n fltrendhead_fld4,\n fltrendhead_fld5,\n fltrendhead_fld6,\n fltrendhead_fld7,\n fltrendhead_fld8,\n fltrendhead_fld9,\n fltrendhead_fld10,\n fltrendhead_fld11,\n fltrendhead_fld12,\n fltrendhead_grndttl\nFROM getfltrendhead(<? value("flhead_id") ?>,ARRAY[\n <? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n <? endforeach ?>\n],<? value("interval") ?>)\n \n \n detail\n SELECT \n fltrenditem_flhead_id,\n fltrenditem_username,\n fltrenditem_order,\n fltrenditem_level,\n fltrenditem_subgrp,\n fltrenditem_type,\n fltrenditem_type_id,\n fltrenditem_parent_id,\n fltrenditem_accnt_id,\n fltrenditem_name,\n fltrenditem_fld1,\n fltrenditem_fld2,\n fltrenditem_fld3,\n fltrenditem_fld4,\n fltrenditem_fld5,\n fltrenditem_fld6,\n fltrenditem_fld7,\n fltrenditem_fld8,\n fltrenditem_fld9,\n fltrenditem_fld10,\n fltrenditem_fld11,\n fltrenditem_fld12,\n fltrenditem_grndttl\nFROM\n financialReport(<? value("flhead_id") ?>, ARRAY[\n <? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n <? endforeach ?>\n],<? value("interval") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((fltrenditem_fld1 <> formatMoney(0) AND fltrenditem_fld1 IS NOT NULL) \n\tOR (fltrenditem_fld1 <> formatMoney(0) AND fltrenditem_fld1 IS NOT NULL)\n\tOR (fltrenditem_fld2 <> formatMoney(0) AND fltrenditem_fld2 IS NOT NULL)\n\tOR (fltrenditem_fld3 <> formatMoney(0) AND fltrenditem_fld3 IS NOT NULL)\n\tOR (fltrenditem_fld4 <> formatMoney(0) AND fltrenditem_fld4 IS NOT NULL)\n\tOR (fltrenditem_fld5 <> formatMoney(0) AND fltrenditem_fld5 IS NOT NULL)\n\tOR (fltrenditem_fld6 <> formatMoney(0) AND fltrenditem_fld6 IS NOT NULL)\n\tOR (fltrenditem_fld7 <> formatMoney(0) AND fltrenditem_fld7 IS NOT NULL)\n\tOR (fltrenditem_fld8 <> formatMoney(0) AND fltrenditem_fld8 IS NOT NULL)\n\tOR (fltrenditem_fld9 <> formatMoney(0) AND fltrenditem_fld9 IS NOT NULL)\n\tOR (fltrenditem_fld10 <> formatMoney(0) AND fltrenditem_fld10 IS NOT NULL)\n\tOR (fltrenditem_fld11 <> formatMoney(0) AND fltrenditem_fld11 IS NOT NULL)\n\tOR (fltrenditem_fld12 <> formatMoney(0) AND fltrenditem_fld12 IS NOT NULL)\n\tOR (fltrenditem_type <> 'I'))\n<? endif ?>\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, text('Notes') AS label, flhead_notes AS notes, \n startOfTime() AS period_end\nFROM flhead\nWHERE ((flhead_id=<? value("flhead_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, period_name AS label, flnotes_notes AS notes, \n period_end\nFROM flnotes\n JOIN period ON (flnotes_period_id=period_id)\nWHERE ((flnotes_flhead_id=<? value("flhead_id") ?>)\n AND (\n <? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n OR \n <? endif ?>\n (flnotes_period_id=<? value("period_id_list") ?>)\n <? endforeach ?>\n )\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq, period_end;\n\n \n \n 149\n \n \n 208\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld1\n \n \n \n \n 100\n 60\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n fltrendhead_flhead_name\n \n \n \n \n 860\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld11\n \n \n \n \n 918\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld12\n \n \n \n \n 469\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld5\n \n \n \n \n 405\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld4\n \n \n \n \n 600\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld7\n \n \n \n \n \n 275\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld2\n \n \n \n \n 795\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld10\n \n \n \n 5\n 135\n 1050\n 135\n 2\n \n \n \n 535\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld6\n \n \n \n \n 665\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld8\n \n \n \n \n 104\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n fltrendhead_typedescrip\n \n \n \n \n \n 989\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_grndttl\n \n \n \n \n \n \n 340\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld3\n \n \n \n \n 730\n 120\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld9\n \n \n \n \n 100\n 40\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 20\n 40\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 10\n \n \n 43\n \n \n 208\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld1\n \n \n \n \n 340\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld3\n \n \n \n \n 665\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld8\n \n \n \n \n 600\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld7\n \n \n \n \n 535\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld6\n \n \n \n 5\n 30\n 1050\n 30\n 2\n \n \n \n 405\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld4\n \n \n \n \n 730\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld9\n \n \n \n \n 795\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld10\n \n \n \n \n 918\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld12\n \n \n \n \n 860\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld11\n \n \n \n \n 280\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld2\n \n \n \n \n 469\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_fld5\n \n \n \n \n 985\n 10\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n fltrendhead_grndttl\n \n \n \n \n
\n detail\n \n subgrp\n fltrenditem_subgrp\n \n 7\n \n 204\n 0\n 1055\n 0\n 1\n \n \n \n \n \n detail\n \n 19\n \n \n 925\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld12\n \n \n \n \n 665\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld8\n \n \n \n \n 340\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld3\n \n \n \n \n 469\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld5\n \n \n \n \n 860\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld11\n \n \n \n \n 600\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld7\n \n \n \n \n 535\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld6\n \n \n \n \n 405\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld4\n \n \n \n \n 730\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld9\n \n \n \n \n 208\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld1\n \n \n \n \n 795\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld10\n \n \n \n \n 989\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n fltrenditem_grndttl\n \n \n \n \n 5\n 0\n 195\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n fltrenditem_name\n \n \n \n \n 275\n 0\n 60\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n fltrenditem_fld2\n \n \n \n
\n
\n notes\n \n \n notes\n \n 32\n \n \n 10\n 17\n 1025\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n \n 5\n 2\n 500\n 15\n \n \n Arial\n 9\n bold\n \n \n \n \n notes\n label\n \n \n \n
\n \n 29\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 930\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n Financial Trend Report 0 2013-07-26 16:14:22.271087 428 FreightPricesByCustomer \N \n\n Freight Prices By Customer\n FreightPricesByCustomer\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT cust_name,\n addr_line1 AS cust_address1,\n addr_line2 AS cust_address2,\n addr_line3 AS cust_address3,\n <? if exists("showExpired") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showexpired,\n <? if exists("showFuture") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showfuture\n FROM custinfo\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\nWHERE (cust_id=<? value("cust_id") ?>);\n\n \n \n detail\n SELECT itemid, sourcetype, ipshead_name, source,\n formatQty(ipsfreight_qtybreak) AS f_qtybreak,\n formatSalesPrice(ipsfreight_price) AS f_price,\n CASE WHEN (ipsfreight_type = 'F') THEN 'Flat Rate'\n ELSE 'Per UOM'\n END AS method,\n currConcat(ipshead_curr_id) AS currConcat,\n CASE WHEN (warehous_code IS NULL) THEN 'Any' ELSE warehous_code END AS f_warehous,\n CASE WHEN (shipzone_name IS NULL) THEN 'Any' ELSE shipzone_name END AS f_shipzone,\n CASE WHEN (freightclass_code IS NULL) THEN 'Any' ELSE freightclass_code END AS f_freightclass,\n CASE WHEN (ipsfreight_shipvia IS NULL) THEN 'Any' ELSE ipsfreight_shipvia END AS f_shipvia\n\nFROM ( SELECT ipsfreight_id AS itemid, 1 AS sourcetype,\n ipshead_name, 'Customer' AS source,\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (ipsass_cust_id=<? value("cust_id") ?>)\n AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) = 0)\n\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 2 AS sourcetype,\n ipshead_name, 'CustType' AS source,\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n JOIN custinfo ON (cust_custtype_id=ipsass_custtype_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (cust_id=<? value("cust_id") ?>)\n \n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 3 AS sourcetype,\n ipshead_name, 'CustTypePattern' AS source,\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM custinfo JOIN custtype ON (custtype_id=cust_custtype_id)\n JOIN ipsass ON ((coalesce(length(ipsass_custtype_pattern), 0) > 0) AND\n (custtype_code ~ ipsass_custtype_pattern))\n JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (cust_id=<? value("cust_id") ?>)\n \n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 4 AS sourcetype,\n ipshead_name, ('Sale' || '-' || sale_name) AS source,\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM sale JOIN ipshead ON (ipshead_id=sale_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ((TRUE)\n \n<? if not exists("showExpired") ?>\n AND (sale_enddate > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (sale_startdate <= CURRENT_DATE)\n<? endif ?>\n\n) ) AS data\nORDER BY ipsfreight_qtybreak, ipsfreight_price;\n \n \n 234\n \n \n 100\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address3\n \n \n \n \n \n \n \n 565\n 100\n 113\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showexpired\n \n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address2\n \n \n \n \n \n \n \n 565\n 120\n 113\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showfuture\n \n \n \n \n \n \n \n 100\n 80\n 605\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_name\n \n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address1\n \n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 150\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_price\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 480\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_freightclass\n \n \n \n \n 245\n 15\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currConcat\n \n \n \n \n 10\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ipshead_name\n \n \n \n \n 10\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n source\n \n \n \n \n 360\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_warehous\n \n \n \n \n 360\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipzone\n \n \n \n \n 245\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n method\n \n \n \n \n 480\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipvia\n \n \n \n \n 150\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtybreak\n \n \n \n
\n \n 16\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 427 FreightPricesByCustomerType \N \n\n Freight Prices By Customer Type\n FreightPricesByCustomerType\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT (custtype_code || '-' || custtype_descrip) as custtype,\n <? if exists("showExpired") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showexpired,\n <? if exists("showFuture") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showfuture\n FROM custtype\n WHERE (custtype_id=<? value("custtype_id") ?>);\n\n \n \n detail\n SELECT itemid, sourcetype, ipshead_name, source,\n formatQty(ipsfreight_qtybreak) AS f_qtybreak,\n formatSalesPrice(ipsfreight_price) AS f_price,\n CASE WHEN (ipsfreight_type = 'F') THEN 'Flat Rate'\n ELSE 'Per UOM'\n END AS method,\n currConcat(ipshead_curr_id) AS currConcat,\n CASE WHEN (warehous_code IS NULL) THEN 'Any' ELSE warehous_code END AS f_warehous,\n CASE WHEN (shipzone_name IS NULL) THEN 'Any' ELSE shipzone_name END AS f_shipzone,\n CASE WHEN (freightclass_code IS NULL) THEN 'Any' ELSE freightclass_code END AS f_freightclass,\n CASE WHEN (ipsfreight_shipvia IS NULL) THEN 'Any' ELSE ipsfreight_shipvia END AS f_shipvia\n\nFROM ( SELECT ipsfreight_id AS itemid, 1 AS sourcetype,\n ipshead_name, 'CustType' AS source,\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (ipsass_custtype_id=<? value("custtype_id") ?>)\n \n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 2 AS sourcetype,\n ipshead_name, 'CustTypePattern' AS source,\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM custtype JOIN ipsass ON ((coalesce(length(ipsass_custtype_pattern), 0) > 0) AND\n (custtype_code ~ ipsass_custtype_pattern))\n JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (custtype_id=<? value("custtype_id") ?>)\n \n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 3 AS sourcetype,\n ipshead_name, ('Sale' || '-' || sale_name) AS source,\n ipsfreight_qtybreak, ipsfreight_price,\n ipsfreight_type, ipshead_curr_id,\n warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM sale JOIN ipshead ON (ipshead_id=sale_ipshead_id)\n JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ((TRUE)\n\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n\n) ) AS data\nORDER BY ipsfreight_qtybreak, ipsfreight_price;\n\n \n \n 233\n \n \n \n \n \n \n \n \n \n 565\n 100\n 112\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showexpired\n \n \n \n \n \n 565\n 120\n 112\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showfuture\n \n \n \n \n 5\n 227\n 745\n 227\n 2\n \n \n \n \n \n 125\n 80\n 535\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n custtype\n \n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 360\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipzone\n \n \n \n \n 245\n 15\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currConcat\n \n \n \n \n 480\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipvia\n \n \n \n \n 150\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_price\n \n \n \n \n 10\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n source\n \n \n \n \n 245\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n method\n \n \n \n \n 360\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_warehous\n \n \n \n \n 10\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ipshead_name\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 150\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtybreak\n \n \n \n \n 480\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_freightclass\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 33 FrozenItemSites \N \n\n Frozen Item Sites\n FrozenItemSites\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n\n \n \n detail\n SELECT warehous_code,\n formatBoolYN(itemsite_active) AS active,\n item_number,\n item_descrip1,\n item_descrip2,\n formatBoolYN(itemsite_wosupply) AS supplied,\n formatBoolYN(itemsite_sold) AS sold,\n itemsite_soldranking,\n formatBoolYN(itemsite_stocked) AS stocked,\n formatBoolYN(itemsite_createpr) AS createpr,\n CASE WHEN (itemsite_controlmethod='N') THEN 'None'\n WHEN (itemsite_controlmethod='R') THEN 'Regular'\n WHEN (itemsite_controlmethod='L') THEN 'Lot #'\n WHEN (itemsite_controlmethod='S') THEN 'Serial #'\n ELSE '?'\n END AS controlmethod,\n formatBoolYN(itemsite_loccntrl) AS locationcontrol,\n CASE WHEN (itemsite_location_id=-1) THEN 'None'\n ELSE formatLocationName(itemsite_location_id)\n END AS defaultlocation,\n formatBoolYN(itemsite_useparams) AS enforceparams,\n formatBoolYN(itemsite_useparamsmanual) AS onmanualorders,\n formatQty(itemsite_reorderlevel) AS reorderlevel,\n formatQty(itemsite_ordertoqty) AS orderupto,\n formatQty(itemsite_multordqty) AS ordermult,\n formatQty(itemsite_safetystock) AS safetystock,\n itemsite_abcclass,\n itemsite_cyclecountfreq,\n itemsite_leadtime,\n itemsite_eventfence,\n formatQty(itemsite_qtyonhand) AS qoh,\n formatDate(itemsite_datelastused, 'Never') AS lastused,\n formatDate(itemsite_datelastcount, 'Never') AS lastcounted,\n COALESCE((SELECT invcnt_tagnumber\n FROM invcnt\n WHERE ((NOT invcnt_posted)\n AND (invcnt_itemsite_id=itemsite_id))), '') AS counttagnum\nFROM itemsite, whsinfo, item\nWHERE ((itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_freeze)\n<? if exists("warehous_id") ?>\n AND (warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nORDER BY item_number;\n \n \n 236\n \n \n \n \n \n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 114\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n \n \n \n \n 7\n \n \n 81\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 75\n 745\n 75\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 81\n \n \n 50\n 15\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 50\n 0\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 280\n 30\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n stocked\n \n \n \n \n 50\n 30\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 670\n 45\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_eventfence\n \n \n \n \n 490\n 15\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n onmanualorders\n \n \n \n \n 430\n 60\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n lastcounted\n \n \n \n \n 670\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_abcclass\n \n \n \n \n 260\n 60\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qoh\n \n \n \n \n 580\n 60\n 145\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n counttagnum\n \n \n \n \n 330\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createpr\n \n \n \n \n 580\n 30\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordermult\n \n \n \n \n 670\n 30\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_leadtime\n \n \n \n \n 409\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locationcontrol\n \n \n \n \n 280\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n supplied\n \n \n \n \n 280\n 15\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sold\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n reorderlevel\n \n \n \n \n 345\n 60\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n lastused\n \n \n \n \n 409\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n controlmethod\n \n \n \n \n 580\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orderupto\n \n \n \n \n 409\n 30\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n defaultlocation\n \n \n \n \n 580\n 45\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n safetystock\n \n \n \n \n 490\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n enforceparams\n \n \n \n \n 10\n 15\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n active\n \n \n \n 5\n 75\n 745\n 75\n 0\n \n \n \n 670\n 15\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_cyclecountfreq\n \n \n \n \n 330\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_soldranking\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 337 IncidentPrioritiesList \N \n\n Incident Priorities\n IncidentPrioritiesList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT incdtpriority_name, incdtpriority_order, incdtpriority_descrip\n FROM incdtpriority\nORDER BY incdtpriority_order, incdtpriority_name;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 100\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtpriority_name\n \n \n \n \n 10\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtpriority_order\n \n \n \n \n 250\n 0\n 500\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtpriority_descrip\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 338 IncidentResolutionsList \N \n\n Incident Resolutions\n IncidentResolutionsList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT incdtresolution_name, incdtresolution_order, incdtresolution_descrip\n FROM incdtresolution\nORDER BY incdtresolution_order, incdtresolution_name;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 250\n 0\n 500\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtresolution_descrip\n \n \n \n \n 10\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtresolution_order\n \n \n \n \n 100\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtresolution_name\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 342 IncidentWorkbenchList \N \n\n Incident List\n IncidentWorkbenchList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n incidents\n detail\n \n \n 144\n \n 2\n 139\n 742\n 139\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n 10\n 39\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 5\n \n \n 21\n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n ByUser\n usr_username\n \n \n \n detail\n \n 28\n \n \n 320\n 0\n 230\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdt_summary\n \n \n \n \n 65\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n crmacct_name\n \n \n \n \n 240\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdt_assigned_username\n \n \n \n \n 180\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdt_status\n \n \n \n \n 690\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtpriority_name\n \n \n \n \n 560\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdt_timestamp\n \n \n \n \n 640\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtseverity_name\n \n \n \n \n 10\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdt_number\n \n \n \n \n 320\n 15\n 430\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdt_descrip\n \n \n \n
\n \n 15\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 170 ItemCostHistory \N \n\n Item Costs History\n ItemCostHistory\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n SELECT costhist_id,\n costelem_type as f_element,\n formatBoolYN(costhist_lowlevel) as f_lower,\n CASE WHEN costhist_type='A' THEN 'Actual'\n WHEN costhist_type='S' THEN 'Standard'\n WHEN costhist_type='D' THEN 'Delete'\n WHEN costhist_type='N' THEN 'New'\n END as f_type,\n formatDateTime(costhist_date) as f_time,\n costhist_username as f_user,\n formatCost(costhist_oldcost) as f_oldcost,\n formatCost(costhist_newcost) as f_newcost\n FROM costhist, costelem \n WHERE ((costhist_costelem_id=costelem_id)\n AND (costhist_item_id=<? value("item_id") ?>)\n)\nORDER BY costhist_date, costelem_type;\n \n \n 221\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n 100\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 50\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_element\n \n \n \n \n 470\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_user\n \n \n \n \n 245\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_lower\n \n \n \n \n 295\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n \n 575\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_oldcost\n \n \n \n \n 365\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_time\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_newcost\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 46 CostedSingleLevelBOM \N \n\n Costed Single Level Bill of Materials\n CostedSingleLevelBOM\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n uom_name AS item_invuom,\n item_descrip1,\n item_descrip2,\n formatCost(stdcost(item_id)) AS standardcost,\n formatCost(actcost(item_id)) AS actualcost,\n <? if exists("useActualCosts") ?>\n text('Actual Cost')\n <? else ?>\n text('Standard Cost')\n <? endif ?>\n AS costtype\n FROM item JOIN uom ON (uom_id=item_inv_uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n \n \n \n detail\n SELECT bomdata_bomwork_seqnumber AS orderby,\n CASE WHEN bomdata_bomwork_seqnumber > 0 THEN\n text(bomdata_bomwork_seqnumber)\n ELSE NULL\n END AS seqnumber,\n bomdata_item_number AS item_number,\n bomdata_uom_name AS item_invuom,\n bomdata_item_descrip1 AS item_descrip1,\n bomdata_item_descrip2 AS item_descrip2,\n bomdata_issuemethod AS issuemethod,\n formatQty(bomdata_qtyfxd) AS qtyfxd,\n formatQtyPer(bomdata_qtyper) AS qtyper,\n formatScrap(bomdata_scrap) AS scrap,\n CASE\n WHEN item_inv_uom_id IS NOT NULL THEN\n formatqtyper((bomitem_qtyfxd + bomitem_qtyper) * (1 + bomitem_scrap) * itemuomtouomratio(bomitem_item_id,bomitem_uom_id,item_inv_uom_id)) \n ELSE\n ''\n END AS qtyreq,\n CASE WHEN COALESCE(bomdata_effective, startOfTime()) <= startOfTime() THEN\n <? value("always") ?>\n ELSE formatDate(bomdata_effective)\n END AS effective,\n CASE WHEN COALESCE(bomdata_expires, endOfTime()) >= endOfTime() THEN\n <? value("never") ?>\n ELSE formatDate(bomdata_expires)\n END AS expires,\n<? if exists("useActualCosts") ?>\n formatCost(bomdata_actunitcost)\n<? else ?>\n formatCost(bomdata_stdunitcost)\n<? endif ?>\n AS unitcost,\n<? if exists("useActualCosts") ?>\n formatCost(bomdata_actextendedcost)\n<? else ?>\n formatCost(bomdata_stdextendedcost)\n<? endif ?>\n AS extcost\nFROM singlelevelbom(<? value("item_id") ?>,<? value("revision_id") ?>,0,0)\n LEFT OUTER JOIN bomitem ON (bomdata_bomitem_id=bomitem_id)\n LEFT OUTER JOIN item ON (bomitem_item_id=item_id)\nORDER BY orderby;\n \n \n \n bomhead\n SELECT bomhead_docnum, bomhead_revision,\nformatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=<? value("item_id") ?>)\nAND (bomhead_rev_id=<? value("revision_id") ?>));\n \n \n 217\n \n \n \n 510\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n f_revisiondate\n \n \n \n \n \n \n \n 125\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n 510\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_revision\n \n \n \n \n \n \n \n \n 125\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n 5\n 210\n 745\n 210\n 2\n \n \n \n \n \n 510\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_docnum\n \n \n \n \n \n \n \n \n \n 430\n 50\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n costtype\n \n \n \n \n \n \n 125\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 53\n \n \n 405\n 0\n 37\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_invuom\n \n \n \n \n 675\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n expires\n \n \n \n \n 315\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyfxd\n \n \n \n \n 70\n 0\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 315\n 31\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n unitcost\n \n \n \n \n 675\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issuemethod\n \n \n \n \n 443\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n extcost\n \n \n \n \n 70\n 15\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 443\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n scrap\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 70\n 30\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 15\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n seqnumber\n \n \n \n \n 600\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n effective\n \n \n \n \n 600\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createchild\n \n \n \n \n 525\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyreq\n \n \n \n \n 315\n 16\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyper\n \n \n \n
\n \n 18\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 53\n \n \n \n \n 443\n 35\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n standardcost\n \n \n \n \n \n 443\n 20\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n actualcost\n \n \n \n \n 443\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n extcost\n \n %9.4f\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 36 CountSlipsByWarehouse \N \n\n Count Slips By Site\n CountSlipsByWarehouse\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate\n\n \n \n detail\n SELECT invcnt_tagnumber AS tagnum,\n <? if exists("asNumeric") ?>\n int4(cntslip_number)\n <? else ?>\n cntslip_number\n <? endif ?>\n AS slipnum,\n warehous_code,\n item_number,\n item_descrip1,\n item_descrip2,\n formatDate(cntslip_entered) AS date_entered,\n ('( ' || cntslip_username || ' )') AS enteredby,\n formatQty(cntslip_qty) AS f_qtycounted,\n formatBoolYN(cntslip_posted) AS f_posted\n FROM cntslip, invcnt, itemsite, item, whsinfo\n WHERE ((cntslip_cnttag_id=invcnt_id)\n AND (invcnt_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (cntslip_entered BETWEEN <? value("startDate") ?> AND (<? value("endDate") ?>::DATE + 1))\n<? if not exists("showUnposted") ?>\n AND (cntslip_posted)\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nORDER BY slipnum;\n \n \n 191\n \n \n 515\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n \n \n 100\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 5\n 185\n 745\n 185\n 2\n \n \n \n \n \n \n \n \n 515\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 300\n 15\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tagnum\n \n \n \n \n 50\n 0\n 245\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtycounted\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 50\n 15\n 245\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 50\n 30\n 245\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 484\n 15\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n enteredby\n \n \n \n \n 300\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n slipnum\n \n \n \n \n 484\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n date_entered\n \n \n \n \n 670\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n
\n \n 16\n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 710\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 39 CountTagsByClassCode \N \n\n Count Tags By Class Code\n CountTagsByClassCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("classcode_id") ?>\n ( SELECT (classcode_code || '-' || classcode_descrip)\n FROM classcode\n WHERE (classcode_id=<? value("classcode_id") ?>) )\n <? elseif exists("classcode_pattern") ?>\n text(<? value("classcode_pattern") ?>)\n <? else ?>\n text('All Class Codes')\n <? endif ?>\n AS classcode,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n \n \n detail\n SELECT invcnt_id, invcnt_tagnumber, warehous_code,\n item_number, item_descrip1, item_descrip2,\n formatDate(invcnt_tagdate) AS createddate,\n invcnt_tag_username AS createdby,\n CASE WHEN (invcnt_cntdate IS NULL) THEN ''\n ELSE formatDate(invcnt_cntdate)\n END AS entereddate,\n CASE WHEN (invcnt_cntdate IS NULL) THEN ''\n ELSE invcnt_cnt_username\n END AS enteredby,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatDate(invcnt_postdate)\n END AS posteddate,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE invcnt_post_username\n END AS postedby,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatQty(invcnt_qoh_before)\n END AS qohbefore,\n CASE WHEN (invcnt_qoh_after IS NULL) THEN ''\n ELSE formatQty(invcnt_qoh_after)\n END AS qohafter,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatQty(invcnt_qoh_after - invcnt_qoh_before)\n END AS variance,\n CASE WHEN (NOT invcnt_posted) THEN ''\n WHEN (invcnt_qoh_before=0) THEN formatScrap(1)\n ELSE formatScrap((1 - (invcnt_qoh_after / invcnt_qoh_before)) * -1)\n END AS percentage\n FROM invcnt, itemsite, item, whsinfo\n WHERE ((invcnt_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (date(invcnt_tagdate) BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if not exists("showUnposted") ?>\n AND (invcnt_posted)\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n<? endif ?>\n)\nORDER BY invcnt_tagdate;\n \n \n 236\n \n \n \n \n \n \n \n \n 100\n 90\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n classcode\n \n \n \n \n \n \n \n \n \n \n \n 500\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 500\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n 100\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n \n \n 6\n \n \n 66\n \n \n \n \n \n \n \n \n 5\n 60\n 745\n 60\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 66\n \n \n 60\n 15\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 295\n 0\n 105\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invcnt_tagnumber\n \n \n \n \n 409\n 45\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohbefore\n \n \n \n \n 409\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createddate\n \n \n \n 5\n 60\n 745\n 60\n 0\n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n postedby\n \n \n \n \n 495\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n enteredby\n \n \n \n \n 60\n 30\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 580\n 45\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n variance\n \n \n \n \n 409\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createdby\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n posteddate\n \n \n \n \n 60\n 0\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 665\n 45\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n percentage\n \n \n \n \n 495\n 45\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohafter\n \n \n \n \n 495\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n entereddate\n \n \n \n
\n \n 17\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 37 CountTagsByItem \N \n\n Count Tags By Item\n CountTagsByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n SELECT invcnt_tagnumber, warehous_code,\n formatDate(invcnt_tagdate) AS createddate,\n invcnt_tag_username AS createdby,\n CASE WHEN (invcnt_cntdate IS NULL) THEN ''\n ELSE formatDate(invcnt_cntdate)\n END AS entereddate,\n CASE WHEN (invcnt_cntdate IS NULL) THEN ''\n ELSE invcnt_cnt_username\n END AS enteredby,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatDate(invcnt_postdate)\n END AS posteddate,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE invcnt_post_username\n END AS postedby,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatQty(invcnt_qoh_before)\n END AS qohbefore,\n CASE WHEN (invcnt_qoh_after IS NULL) THEN ''\n ELSE formatQty(invcnt_qoh_after)\n END AS qohafter,\n CASE WHEN (NOT invcnt_posted) THEN ''\n ELSE formatQty(invcnt_qoh_after - invcnt_qoh_before)\n END AS variance,\n CASE WHEN (NOT invcnt_posted) THEN ''\n WHEN (invcnt_qoh_before=0) THEN formatScrap(1)\n ELSE formatScrap((1 - (invcnt_qoh_after / invcnt_qoh_before)) * -1)\n END AS percentage\n FROM invcnt, itemsite, whsinfo\n WHERE ((invcnt_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=<? value("item_id") ?>)\n AND (invcnt_tagdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if not exists("showUnposted") ?>\n AND (invcnt_posted)\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nORDER BY invcnt_tagdate;\n \n \n 236\n \n \n \n \n \n 515\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n 5\n 229\n 740\n 229\n 2\n \n \n \n \n 100\n 145\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n 515\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 100\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n 5\n 30\n 740\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 41\n \n 5\n 35\n 740\n 35\n 0\n \n \n \n 409\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohbefore\n \n \n \n \n 50\n 0\n 105\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invcnt_tagnumber\n \n \n \n \n 245\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n enteredby\n \n \n \n \n 165\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createddate\n \n \n \n \n 325\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n posteddate\n \n \n \n \n 495\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qohafter\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 665\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n percentage\n \n \n \n \n 165\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createdby\n \n \n \n \n 325\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n postedby\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n variance\n \n \n \n \n 245\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n entereddate\n \n \n \n
\n \n 16\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 304 DepartmentsMasterList \N \n\n Departments Master List\n DepartmentsMasterList\n \n Letter\n \n 100\n 100\n 100\n 100\n \n deptQuery\n SELECT dept_number, dept_name\nFROM dept\nORDER BY dept_number;\n \n \n \n 103\n \n \n 2\n 100\n 647\n 100\n 0\n \n \n \n 1\n 72\n 646\n 72\n 0\n \n \n \n
\n main\n \n \n deptQuery\n \n 31\n \n \n 180\n 10\n 200\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n deptQuery\n dept_name\n \n \n \n \n 15\n 10\n 150\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n deptQuery\n dept_number\n \n \n \n
\n
\n \N 0 2013-07-26 16:14:22.271087 339 IncidentSeveritiesList \N \n\n Incident Severities\n IncidentSeveritiesList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT incdtseverity_name, incdtseverity_order, incdtseverity_descrip\n FROM incdtseverity\nORDER BY incdtseverity_order, incdtseverity_name;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 250\n 0\n 500\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtseverity_descrip\n \n \n \n \n 10\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtseverity_order\n \n \n \n \n 100\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdtseverity_name\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 169 ItemCostSummary \N \n\n Item Costs Summary\n ItemCostSummary\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n SELECT itemcost_id,\n CASE WHEN (costelem_sys) THEN 1\n ELSE 0\n END,\n costelem_type as f_element,\n formatBoolYN(itemcost_lowlevel) as f_lower,\n formatCost(itemcost_stdcost) as f_stdcost,\n formatDate(itemcost_posted, 'Never') as f_posted,\n formatcost(currToBase(itemcost_curr_id, itemcost_actcost, NULL)) as f_actcost,\n formatDate(itemcost_updated, 'Never') as f_updated,\n itemcost_stdcost AS stdcost, currToBase(itemcost_curr_id, itemcost_actcost, NULL) AS actcost\n FROM itemcost, costelem\n WHERE ((itemcost_costelem_id=costelem_id)\n AND (itemcost_item_id=<? value("item_id") ?>)\n)\nORDER BY itemcost_lowlevel, costelem_type;\n \n \n 221\n \n \n \n 100\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 330\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_stdcost\n \n \n \n \n 50\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_element\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_updated\n \n \n \n \n 280\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_lower\n \n \n \n \n 409\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 490\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actcost\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 16\n \n \n 490\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n actcost\n \n price\n \n \n \n \n \n 330\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n stdcost\n \n price\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 285 FinancialReport \N \n\n Financial Report\n FinancialReport\n Ad Hoc Report\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT flhead_name,\n CASE WHEN(trim(BOTH FROM COALESCE(flhead_custom_label,''))='') THEN 'Custom'\n ELSE flhead_custom_label\n END AS custom_label,\n CASE WHEN(flhead_usealtbegin) THEN flhead_altbegin\n ELSE text('Begining')\n END AS begining_label,\n CASE WHEN(flhead_usealtend) THEN flhead_altend\n ELSE text('Ending')\n END AS ending_label,\n CASE WHEN(flhead_usealtdebits) THEN flhead_altdebits\n ELSE text('Debits')\n END AS debits_label,\n CASE WHEN(flhead_usealtcredits) THEN flhead_altcredits\n ELSE text('Credits')\n END AS credits_label,\n CASE WHEN(flhead_usealtbudget) THEN flhead_altbudget\n ELSE text('Budget')\n END AS budget_label,\n CASE WHEN(flhead_usealtdiff) THEN flhead_altdiff\n ELSE text('Difference')\n END AS diff_label\n FROM flhead\n WHERE (flhead_id=<? value("flhead_id") ?>)\n \n \n detail\n SELECT financialReport(<? value("flhead_id") ?>, period_id,<? value("interval") ?>,<? value("prj_id") ?>)\n FROM period\n WHERE (period_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ));\nSELECT period_id, period_start, formatperiodname(period_id,<? value("interval") ?>) AS f_period, flrpt_order,\n ( repeat(' ', flrpt_level) || flgrp_name ) AS name,\n CASE WHEN(flgrp_summarize AND flgrp_showstart) THEN formatMoney(flrpt_beginning)\n ELSE NULL\n END AS beginning,\n CASE WHEN(flgrp_summarize AND flgrp_showdelta) THEN formatMoney(flrpt_debits)\n ELSE NULL\n END AS debits,\n CASE WHEN(flgrp_summarize AND flgrp_showdelta) THEN formatMoney(flrpt_credits)\n ELSE NULL\n END AS credits,\n CASE WHEN(flgrp_summarize AND flgrp_showend) THEN formatMoney(flrpt_ending)\n ELSE NULL\n END AS ending,\n CASE WHEN(flgrp_summarize AND flgrp_showbudget) THEN formatMoney(flrpt_budget)\n ELSE NULL\n END AS budget,\n CASE WHEN(flgrp_summarize AND flgrp_showdiff) THEN formatMoney(flrpt_diff)\n ELSE NULL\n END AS diff,\n CASE WHEN(flgrp_summarize AND flgrp_showcustom) THEN formatMoney(flrpt_custom)\n ELSE NULL\n END AS custom,\n CASE WHEN(flgrp_summarize AND flgrp_showstartprcnt) THEN formatPrcnt(flrpt_beginningprcnt)\n ELSE NULL\n END AS beginningprcnt,\n CASE WHEN(flgrp_summarize AND flgrp_showdeltaprcnt) THEN formatPrcnt(flrpt_debitsprcnt)\n ELSE NULL\n END AS debitsprcnt,\n CASE WHEN(flgrp_summarize AND flgrp_showdeltaprcnt) THEN formatPrcnt(flrpt_creditsprcnt)\n ELSE NULL\n END AS creditsprcnt,\n CASE WHEN(flgrp_summarize AND flgrp_showendprcnt) THEN formatPrcnt(flrpt_endingprcnt)\n ELSE NULL\n END AS endingprcnt,\n CASE WHEN(flgrp_summarize AND flgrp_showbudgetprcnt) THEN formatPrcnt(flrpt_budgetprcnt)\n ELSE NULL\n END AS budgetprcnt,\n CASE WHEN(flgrp_summarize AND flgrp_showdiffprcnt) THEN formatPrcnt(flrpt_diffprcnt)\n ELSE NULL\n END AS diffprcnt,\n CASE WHEN(flgrp_summarize AND flgrp_showcustomprcnt) THEN formatPrcnt(flrpt_customprcnt)\n ELSE NULL\n END AS customprcnt\n FROM flrpt, flgrp, period\n WHERE ((flrpt_type='G')\n AND (flrpt_type_id=flgrp_id)\n AND (flrpt_flhead_id=<? value("flhead_id") ?>)\n AND (flrpt_period_id=period_id)\n AND (flrpt_username=getEffectiveXtUser())\n AND (flrpt_interval=<? value("interval") ?>)\n AND (period_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n )))\nUNION\nSELECT period_id, period_start, formatperiodname(period_id,<? value("interval") ?>) AS f_period, flrpt_order,\n ( repeat(' ', flrpt_level) ||\n CASE WHEN(accnt_id IS NULL) THEN ('Unknown Account ID ' || flitem_accnt_id)\n ELSE (formatGLAccount(accnt_id) || '-' || accnt_descrip)\n END\n ) AS name,\n formatMoney(flrpt_beginning) AS beginning,\n formatMoney(flrpt_debits) AS debits,\n formatMoney(flrpt_credits) AS credits,\n formatMoney(flrpt_ending) AS ending,\n formatMoney(flrpt_budget) AS budget,\n formatMoney(flrpt_diff) AS diff,\n formatMoney(flrpt_custom) AS custom,\n formatPrcnt(flrpt_beginningprcnt) AS beginningprcnt,\n formatPrcnt(flrpt_debitsprcnt) AS debitsprcnt,\n formatPrcnt(flrpt_creditsprcnt) AS creditsprcnt,\n formatPrcnt(flrpt_endingprcnt) AS endingprcnt,\n formatPrcnt(flrpt_budgetprcnt) AS budgetprcnt,\n formatPrcnt(flrpt_diffprcnt) AS diffprcnt,\n formatPrcnt(flrpt_customprcnt) AS customprcnt\n FROM flrpt LEFT OUTER JOIN accnt ON (flrpt_accnt_id=accnt_id), flitem, period\n WHERE ((flrpt_type='I')\n AND (flrpt_type_id=flitem_id)\n AND (flrpt_flhead_id=<? value("flhead_id") ?>)\n AND (flrpt_period_id=period_id)\n AND (flrpt_username=getEffectiveXtUser())\n AND (flrpt_interval=<? value("interval") ?>)\n<? if not exists("showzeros") ?>\n AND ((flrpt_beginning <> 0) \n OR (flrpt_debits <> 0)\n OR (flrpt_credits <> 0)\n OR (flrpt_ending <> 0)\n OR (flrpt_budget <> 0)\n OR (flrpt_diff <> 0)\n OR (flrpt_custom <> 0))\n<? endif ?>\n AND (period_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n )))\nUNION\nSELECT period_id, period_start, formatperiodname(period_id,<? value("interval") ?>) AS f_period, flrpt_order,\n ( repeat(' ', flrpt_level) || flspec_name ) AS name,\n formatMoney(flrpt_beginning) AS beginning,\n formatMoney(flrpt_debits) AS debits,\n formatMoney(flrpt_credits) AS credits,\n formatMoney(flrpt_ending) AS ending,\n formatMoney(flrpt_budget) AS budget,\n formatMoney(flrpt_diff) AS diff,\n formatMoney(flrpt_custom) AS custom,\n formatPrcnt(flrpt_beginningprcnt) AS beginningprcnt,\n formatPrcnt(flrpt_debitsprcnt) AS debitsprcnt,\n formatPrcnt(flrpt_creditsprcnt) AS creditsprcnt,\n formatPrcnt(flrpt_endingprcnt) AS endingprcnt,\n formatPrcnt(flrpt_budgetprcnt) AS budgetprcnt,\n formatPrcnt(flrpt_diffprcnt) AS diffprcnt,\n formatPrcnt(flrpt_customprcnt) AS customprcnt\n FROM flrpt, flspec, period\n WHERE ((flrpt_type='S')\n AND (flrpt_type_id=flspec_id)\n AND (flrpt_flhead_id=<? value("flhead_id") ?>)\n AND (flrpt_period_id=period_id)\n AND (flrpt_username=getEffectiveXtUser())\n AND (flrpt_interval=<? value("interval") ?>)\n AND (period_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n )))\nUNION\nSELECT period_id, period_start, formatperiodname(period_id,<? value("interval") ?>) AS f_period, flrpt_order,\n ( repeat(' ', flrpt_level) ||\n CASE WHEN(flrpt_type='T' AND flrpt_level=0) THEN COALESCE(flrpt_altname,'Total')\n WHEN(flrpt_type='T') THEN COALESCE(flrpt_altname,'Subtotal')\n ELSE ('Type ' || flrpt_type || ' ' || text(flrpt_type_id))\n END\n ) AS name,\n formatMoney(flrpt_beginning) AS beginning,\n formatMoney(flrpt_debits) AS debits,\n formatMoney(flrpt_credits) AS credits,\n formatMoney(flrpt_ending) AS ending,\n formatMoney(flrpt_budget) AS budget,\n formatMoney(flrpt_diff) AS diff,\n formatMoney(flrpt_custom) AS custom,\n formatPrcnt(flrpt_beginningprcnt) AS beginningprcnt,\n formatPrcnt(flrpt_debitsprcnt) AS debitsprcnt,\n formatPrcnt(flrpt_creditsprcnt) AS creditsprcnt,\n formatPrcnt(flrpt_endingprcnt) AS endingprcnt,\n formatPrcnt(flrpt_budgetprcnt) AS budgetprcnt,\n formatPrcnt(flrpt_diffprcnt) AS diffprcnt,\n formatPrcnt(flrpt_customprcnt) AS customprcnt\n FROM flrpt, period\n WHERE ((NOT (flrpt_type IN ('G','I','S')))\n AND (flrpt_flhead_id=<? value("flhead_id") ?>)\n AND (flrpt_period_id=period_id)\n AND (flrpt_username=getEffectiveXtUser())\n AND (flrpt_interval=<? value("interval") ?>)\n AND (period_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n )))\n ORDER BY period_start, flrpt_order;\n \n \n notes\n SELECT flhead_notes AS notes\nFROM flhead\nWHERE ((flhead_id=<? value("flhead_id") ?>)\n AND (length(flhead_notes) > 0))\n \n \n 136\n \n \n \n 100\n 104\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flhead_name\n \n \n \n \n \n \n 5\n \n \n 38\n \n \n 775\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n diff_label\n \n \n \n \n \n \n \n \n 615\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n ending_label\n \n \n \n \n \n \n 375\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n begining_label\n \n \n \n \n 455\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n debits_label\n \n \n \n 5\n 30\n 994\n 30\n 2\n \n \n \n \n 855\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n custom_label\n \n \n \n \n 695\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n budget_label\n \n \n \n \n \n 535\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n credits_label\n \n \n \n
\n detail\n \n byPeriod\n period_id\n \n 112\n \n \n \n \n \n \n 855\n 80\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n custom_label\n \n \n \n \n 535\n 80\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n credits_label\n \n \n \n \n 455\n 80\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n debits_label\n \n \n \n \n \n \n \n 100\n 40\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n f_period\n \n \n \n \n 695\n 80\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n budget_label\n \n \n \n \n \n 615\n 80\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n ending_label\n \n \n \n \n 775\n 80\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n diff_label\n \n \n \n \n 10\n 110\n 1000\n 110\n 2\n \n \n \n 375\n 80\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n begining_label\n \n \n \n \n \n \n detail\n \n 33\n \n \n 455\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debits\n \n \n \n \n 375\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n beginningprcnt\n \n \n \n \n 5\n 0\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n name\n \n \n \n \n 855\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n customprcnt\n \n \n \n \n 615\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ending\n \n \n \n \n 775\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n diffprcnt\n \n \n \n \n 695\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n budget\n \n \n \n \n 615\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n endingprcnt\n \n \n \n \n 375\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n beginning\n \n \n \n \n 695\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n budgetprcnt\n \n \n \n \n 855\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custom\n \n \n \n \n 455\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debitsprcnt\n \n \n \n \n 535\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credits\n \n \n \n \n 775\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n diff\n \n \n \n \n 535\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n creditsprcnt\n \n \n \n
\n
\n notes\n \n \n head\n \n 26\n \n \n 10\n 6\n 980\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 23\n \n \n \n 930\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n Ad Hoc Report 0 2013-07-26 16:14:22.271087 376 FinancialReportMonthBudget \N \n\n Financial Report Month and Budget\n FinancialReportMonthBudget\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_month <> 0) OR (flstmtitem_monthbudget <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n\n \n \n 167\n \n \n \n \n 380\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 500\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n 380\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 580\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n 3.0775\n 165\n 748.368\n 165\n 2\n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 660\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 4\n \n \n 37\n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n 1.53875\n 35\n 749.873\n 35\n 2\n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 380\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthbudget\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_month\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthbudgetdiffprcnt\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthbudgetdiff\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 387 FinancialReportMonthDbCr \N \n\n Financial Report Month with Debits and Credits\n FinancialReportMonthDbCr\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_monthdb <> 0) OR (flstmtitem_monthcr <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 167\n \n \n 590\n 145\n 75\n 16\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n 2.62279\n 160\n 749\n 160\n 2\n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n \n \n \n 670\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n 505\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n 425\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n \n 590\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 100\n 60\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 60\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n \n 4\n \n \n 37\n \n 1.94814\n 31\n 748.325\n 31\n 2\n \n \n \n \n 670\n 16\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_typedescrip_prcnt\n \n \n \n \n 505\n 1\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 670\n 1\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 425\n 1\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 590\n 1\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 590\n 16\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 390\n 0\n 750\n 0\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 420\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthdb\n \n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_month\n \n \n \n \n 505\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthcr\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_monthprcnt\n \n \n \n \n 25\n 0\n 390\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 10\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 377 FinancialReportMonthPriorMonth \N \n\n Financial Report Month and Prior Month\n FinancialReportMonthPriorMonth\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_typedescrip2 || ' Diff.' AS f_diff,\n flstmthead_typedescrip2 || ' % Diff.' AS f_diffprcnt,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_month <> 0) OR (flstmtitem_prmonth <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 170\n \n 2.82315\n 160.942\n 760\n 160.942\n 2\n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 500\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prmonth\n \n \n \n \n 380\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 580\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prmonth\n \n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n 380\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 660\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n 660\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prmonth\n \n \n \n \n 500\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n \n 580\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 7\n \n \n 40\n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prmonth\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prmonth\n \n \n \n \n 500\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prmonth\n \n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 380\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 660\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n 0.0790882\n 31.4959\n 747.149\n 31.4959\n 2\n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 7\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 22\n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prmonth\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_month\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prmonthdiffprcnt\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prmonthdiff\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 25\n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 10\n \n
\n \N 0 2013-07-26 16:14:22.271087 386 FinancialReportMonthPriorQuarter \N \n\n Financial Report Month and Prior Quarter\n FinancialReportMonthPriorQuarter\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_typedescrip2 || 'Diff.' AS f_diff,\n flstmthead_typedescrip2 || ' % Diff.' AS f_diffprcnt,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_month <> 0) OR (flstmtitem_prqtr <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 169\n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 500\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n \n 500\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n \n \n 660\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n 580\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n 380\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n 2.16957\n 162\n 750\n 162\n 2\n \n \n \n 580\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n 660\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n 380\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 6\n \n \n 39\n \n \n 380\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 500\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_month\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n 660\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n 1.79722\n 31\n 749.933\n 31\n 2\n \n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 6\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 21\n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prqtrdiff\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_month\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prqtr\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prqtrdiffprcnt\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 24\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 9\n \n
\n \N 0 2013-07-26 16:14:22.271087 380 FinancialReportQuarter \N \n\n Financial Report Quarter\n FinancialReportQuarter\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_qtr <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 168\n \n 1\n 160\n 750\n 160\n 2\n \n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n \n \n \n 590\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 670\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n 590\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 5\n \n \n 38\n \n \n 590\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n 1\n 30\n 749\n 30\n 2\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 5\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 20\n \n \n 25\n 0\n 550\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtr\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtrprcnt\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 23\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 8\n \n
\n \N 0 2013-07-26 16:14:22.271087 382 FinancialReportQuarterPriorQuarter \N \n\n Financial Report Quarter and Prior Quarter\n FinancialReportQuarterPriorQuarter\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_typedescrip2 || ' Diff.' AS f_diff,\n flstmthead_typedescrip2 || ' % Diff.' AS f_diffprcnt,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_qtr <> 0) OR (flstmtitem_prqtr <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 167\n \n \n 380\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n 500\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 580\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n \n 500\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n 0\n 159\n 749\n 159\n 2\n \n \n \n \n 580\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n 660\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 660\n 130\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n 380\n 145\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 4\n \n \n 37\n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n 500\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 660\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diffprcnt\n \n \n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_qtr\n \n \n \n \n 380\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n \n 580\n 15\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_diff\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_prqtr\n \n \n \n 1\n 30\n 748\n 30\n 2\n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 380\n 1\n 740\n 1\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 380\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_qtr\n \n \n \n \n 660\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prqtrdiffprcnt\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prqtr\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 580\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_prqtrdiff\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 383 FinancialReportYear \N \n\n Financial Report Year\n FinancialReportYear\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_year <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 167\n \n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n 1\n 160\n 749\n 160\n 2\n \n \n \n \n 570\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n \n 665\n 130\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 570\n 145\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 4\n \n \n 37\n \n \n 570\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 660\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n 0\n 31\n 751\n 31\n 2\n \n \n \n 570\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 390\n 0\n 750\n 0\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_yearprcnt\n \n \n \n \n 25\n 0\n 550\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n \n 570\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_year\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 384 FinancialReportYearBudget \N \n\n Financial Report Year and Budget\n FinancialReportYearBudget\n \n \n Financial Report Column Layout\n SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))\n \n \n Accounting Period Reference\n SELECT period_id, \n CASE\n WHEN period_name <> '' THEN period_name \n ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n END \nFROM period \nORDER BY period_end DESC\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n <? value("project") ?> AS project,\n (SELECT prj_name FROM prj WHERE prj_id=<? value("prj_id") ?>) AS prj_name,\n flstmthead_username,\n flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n flstmthead_typedescrip1,\n flstmthead_typedescrip2,\n flstmthead_month,\n flstmthead_qtr,\n flstmthead_year,\n flstmthead_prmonth,\n flstmthead_prqtr,\n flstmthead_pryear\nFROM getflstmthead(<? value("flcol_id") ?>,<? value("period_id") ?>)\n \n \n detail\n SELECT \n flstmtitem_flhead_id,\n flstmtitem_period_id,\n flstmtitem_username,\n flstmtitem_order,\n flstmtitem_level,\n flstmtitem_subgrp,\n flstmtitem_type,\n flstmtitem_type_id,\n flstmtitem_parent_id,\n flstmtitem_accnt_id,\n flstmtitem_name,\n formatMoney(flstmtitem_month) AS flstmtitem_month,\n formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n formatMoney(flstmtitem_year) AS flstmtitem_year,\n formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(<? value("flcol_id") ?>,<? value("period_id") ?>,\n<? if exists("shownumbers") ?>\n true\n<? else ?>\n false\n<? endif ?>\n,True,<? value("prj_id") ?>)\n<? if not exists("showzeros") ?>\n WHERE ((flstmtitem_year <> 0) OR (flstmtitem_yearbudget <> 0) OR (flstmtitem_type <> 'I'))\n<? endif ?>\n;\n \n \n notes\n SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=<? value("flcol_id") ?>)\n AND (flnotes_period_id=<? value("period_id") ?>)\n AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n\n \n \n 167\n \n \n 465\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 360\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n \n 360\n 145\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 560\n 145\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n Budget Diff.\n \n \n \n \n 100\n 100\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n flstmthead_typedescrip1\n \n \n \n \n \n 560\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n \n 100\n 80\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_name\n \n \n \n \n \n \n 3.53065\n 160\n 749.738\n 160\n 2\n \n \n \n 650\n 130\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 99\n 59.6\n 459\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n prj_name\n \n \n \n \n 15\n 59.5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n project\n \n \n \n \n \n 4\n \n \n 37\n \n \n 555\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n \n 355\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_typedescrip2\n \n \n \n \n 650\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 455\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n 355\n 0\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n flstmthead_year\n \n \n \n \n -0.610015\n 29.5831\n 748.788\n 29.5831\n 2\n \n \n \n 555\n 15\n 85\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n Budget Diff.\n \n \n \n \n
\n detail\n \n subgrp\n flstmtitem_subgrp\n \n 4\n \n 355\n 0\n 750\n 0\n 0\n \n \n \n \n \n detail\n \n 19\n \n \n 459\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_yearbudget\n \n \n \n \n 560\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_yearbudgetdiff\n \n \n \n \n 650\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_yearbudgetdiffprcnt\n \n \n \n \n 360\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_year\n \n \n \n \n 25\n 0\n 345\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n flstmtitem_name\n \n \n \n
\n
\n notes\n \n \n notes\n \n 24\n \n \n 25\n 9\n 700\n 15\n \n 0\n \n Arial\n 9\n normal\n \n \n \n \n notes\n notes\n \n \n \n
\n \n 22\n \n \n 695\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 7\n \n
\n \N 0 2013-07-26 16:14:22.271087 168 ItemCostsByClassCode \N \n\n Item Costs By Class Code\n ItemCostsByClassCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("classcode_id") ?>\n ( SELECT (classcode_code || '-' || classcode_descrip)\n FROM classcode\n WHERE (classcode_id=<? value("classcode_id") ?>) )\n <? elseif exists("classcode_pattern") ?>\n text(<? value("classcode_pattern") ?>)\n <? else ?>\n text('All Class Codes')\n <? endif ?>\n AS classcode;\n \n \n detail\n SELECT item_id,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name as f_uom,\n formatCost(scost) as f_stdcost,\n formatCost(acost) as f_actcost,\n classcode_code\n FROM ( SELECT item_id,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n stdcost(item_id) AS scost,\n actcost(item_id) AS acost,\n classcode_code\n FROM item, classcode, uom\n WHERE ((item_classcode_id=classcode_id)\n AND (item_inv_uom_id=uom_id)\n <? if exists("classcode_id") ?>\n AND (classcode_id=<? value("classcode_id") ?>)\n <? elseif exists("classcode_pattern") ?>\n AND (classcode_code ~ <? value("classcode_pattern") ?>)\n <? endif ?>\n )\n ) AS data\n WHERE ( (true)\n<? if exists("onlyShowZeroCosts") ?>\n AND ((scost=0) OR (acost=0))\n<? endif ?>\n<? if exists("onlyShowDiffCosts") ?>\n AND (scost != acost)\n<? endif ?>\n )\nORDER BY item_number\n \n \n 234\n \n \n \n \n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n \n \n 120\n 120\n 565\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n classcode\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 400\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_uom\n \n \n \n \n 500\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_stdcost\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 5\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n classcode_code\n \n \n \n \n 70\n 0\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 70\n 30\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 70\n 15\n 228\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 600\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actcost\n \n \n \n
\n \n 16\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 485 ItemSources \N \n\n Item Sources\n ItemSources\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT item_number, vend_name,\n item_descrip1, item_descrip2,\n uom_name,\n itemsrc_vend_item_number as f_venditem,\n itemsrc_vend_uom as f_venduom,\n formatQty(itemsrc_invvendoruomratio) as f_uomratio\nFROM itemsrc, vendinfo, item, uom\nWHERE ((itemsrc_vend_id=vend_id)\n AND (itemsrc_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n<? if exists("item_id") ?>\n AND (itemsrc_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("vend_id") ?>\n AND (itemsrc_vend_id=<? value("vend_id") ?>)\n<? endif ?>\n)\nORDER By item_number, vend_name;\n \n \n 221\n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n \n \n \n 15\n 38\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 435\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 695\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_uomratio\n \n \n \n \n 230\n 2\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 640\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_venduom\n \n \n \n \n 230\n 32\n 400\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 230\n 17\n 400\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 485\n 2\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_venditem\n \n \n \n \n 5\n 2\n 215\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 85\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 79 ListOpenSalesOrders \N \n\n List Open Sales Orders\n ListOpenSalesOrders\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n\n \n \n detail\n SELECT DISTINCT cohead.*,\n COALESCE(cust_number, :error) AS cust_number,\n getSoSchedDate(cohead_id) AS scheddate,\n formatDate(cohead_orderdate) AS f_orderdate\nFROM cohead \n JOIN custinfo ON (cohead_cust_id=cust_id) \n <? if exists("selectedSites") ?> \n JOIN coitem ON (coitem_cohead_id=cohead_id) \n JOIN itemsite ON (coitem_itemsite_id=itemsite_id) \n JOIN site() ON (itemsite_warehous_id=warehous_id) \n <? else ?> \n LEFT OUTER JOIN coitem ON (coitem_cohead_id=cohead_id) \n LEFT OUTER JOIN itemsite ON (coitem_itemsite_id=itemsite_id) \n LEFT OUTER JOIN site() ON (itemsite_warehous_id=warehous_id) \n <? endif ?> \nWHERE((true) \n <? if exists("cust_id") ?>\n AND (cust_id=<? value("cust_id") ?> )\n <? endif ?>\n <? if not exists("showClosed") ?> \n AND ((coitem_status = 'O') OR (coitem_status IS NULL)) \n <? endif ?>\n <? if exists("warehous_id") ?>\n AND (warehous_id=<? value("warehous_id") ?>)\n <? endif ?>\n ) \nORDER BY cohead_number \n \n \n 173\n \n \n \n 4\n 168\n 744\n 168\n 2\n \n \n \n \n \n \n 10\n 43\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 95\n 0\n 325\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_billtoname\n \n \n \n \n 425\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_custponumber\n \n \n \n \n 580\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orderdate\n \n \n \n \n 5\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 50 IndentedBOM \N \n\n Indented Bill of Materials\n IndentedBOM\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n uom_name AS item_invuom,\n item_descrip1,\n item_descrip2\n FROM item, uom\n WHERE ((item_id=<? value("item_id") ?>)\n AND (item_inv_uom_id=uom_id));\n \n \n \n detail\n SELECT (REPEAT(' ',(bomdata_bomwork_level-1)*3) || bomdata_bomwork_seqnumber) AS f_seqnumber,\n bomdata_item_number AS item_number,\n bomdata_uom_name AS item_invuom,\n bomdata_item_descrip1 AS item_descrip1,\n bomdata_item_descrip2 AS item_descrip2,\n bomdata_issuemethod AS issuemethod,\n bomdata_createchild AS createchild,\n formatQtyPer(bomdata_qtyreq) AS qtyreq,\n formatScrap(bomdata_scrap) AS scrap,\n CASE WHEN COALESCE(bomdata_effective, startOfTime()) <= startOfTime()\n THEN <? value("always") ?>\n ELSE formatDate(bomdata_effective)\n END AS effective,\n CASE WHEN COALESCE(bomdata_expires, endOfTime()) >= endOfTime()\n THEN <? value("never") ?>\n ELSE formatDate(bomdata_expires)\n END AS expires\nFROM indentedBOM(<? value("item_id") ?>,<? value("revision_id") ?>,<? value("expiredDays") ?>,<? value("futureDays") ?>)\nWHERE (bomdata_item_id>0);\n \n \n bomhead\n SELECT bomhead_docnum, bomhead_revision,\nformatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=<? value("item_id") ?>)\nAND (bomhead_rev_id=<? value("revision_id") ?>));\n \n \n 242\n \n \n \n \n \n \n \n 100\n 103\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n 100\n 125\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 580\n 103\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_docnum\n \n \n \n \n \n \n \n 580\n 125\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n f_revisiondate\n \n \n \n \n \n \n 5\n 235\n 745\n 235\n 2\n \n \n \n \n 100\n 145\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n 580\n 145\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_revision\n \n \n \n \n 315\n 103\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_invuom\n \n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 53\n \n \n 505\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n scrap\n \n \n \n \n 665\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issuemethod\n \n \n \n \n 585\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n effective\n \n \n \n \n 110\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 665\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n expires\n \n \n \n \n 275\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_invuom\n \n \n \n \n 5\n 0\n 103\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_seqnumber\n \n \n \n \n 110\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 425\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyreq\n \n \n \n \n 110\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 585\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createchild\n \n \n \n
\n \n 18\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 208 IndentedWhereUsed \N \n\n Indented Where Used\n IndentedWhereUsed\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n uom_name AS item_invuom,\n item_descrip1,\n item_descrip2\n FROM item, uom\n WHERE ((item_id=<? value("item_id") ?>)\n AND (item_inv_uom_id=uom_id));\n \n \n \n detail\n SELECT (REPEAT(' ',(bomwork_level-1)*3) || bomwork_seqnumber) AS f_seqnumber,\n bomworkitemsequence(bomwork_id) AS seqord,\n item_number, uom_name AS item_invuom,\n item_descrip1, item_descrip2,\n formatQty(bomwork_qtyfxd) AS qtyfxd,\n formatQtyPer(bomwork_qtyper) AS qtyper,\n formatScrap(bomwork_scrap) AS scrap,\n formatDate(bomwork_effective, 'Always') AS effective,\n formatDate(bomwork_expires, 'Never') AS expires\n FROM bomwork, item, uom\n WHERE ((bomwork_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (bomwork_set_id=<? value("bomworkset_id") ?>)\n<? if not exists("showExpired") ?>\n AND (bomwork_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (bomwork_effective <= CURRENT_DATE)\n<? endif ?>\n)\nORDER BY seqord;\n \n \n 242\n \n \n 100\n 145\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n 100\n 125\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n \n \n 315\n 103\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_invuom\n \n \n \n 5\n 235\n 745\n 235\n 2\n \n \n \n \n \n \n \n 100\n 103\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 52\n \n \n 275\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_invuom\n \n \n \n \n 665\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n expires\n \n \n \n \n 5\n 0\n 103\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_seqnumber\n \n \n \n \n 113\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 585\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n effective\n \n \n \n \n 505\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n scrap\n \n \n \n \n 113\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 425\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyper\n \n \n \n \n 113\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 345\n 1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyfxd\n \n \n \n
\n \n 17\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 171 ItemMaster \N \n\n Item Master\n ItemMaster\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n formatBoolYN(item_active) AS f_item_active,\n item_descrip1, item_descrip2,\n CASE WHEN(item_type='P') THEN 'Purchased'\n WHEN(item_type='M') THEN 'Manufactured'\n WHEN(item_type='J') THEN 'Job'\n WHEN(item_type='F') THEN 'Phantom'\n WHEN(item_type='B') THEN 'Breeder'\n WHEN(item_type='C') THEN 'Co-Product'\n WHEN(item_type='Y') THEN 'By-Product'\n WHEN(item_type='R') THEN 'Reference'\n WHEN(item_type='T') THEN 'Tooling'\n WHEN(item_type='O') THEN 'Outside Process'\n WHEN(item_type='K') THEN 'Kit'\n ELSE item_type\n END AS f_item_type,\n formatBoolYN(item_config) AS f_item_config,\n (classcode_code||' - '||classcode_descrip) AS f_classcode,\n CASE WHEN (COALESCE(freightclass_id, -1) <> -1) THEN (freightclass_code||' - '||freightclass_descrip) END AS f_freightclass,\n iuom.uom_name AS invuom,\n formatBoolYN(item_picklist) AS f_item_picklist,\n formatBoolYN(item_fractional) AS f_item_fractional,\n itemcapuom(item_id) AS capuom, itemaltcapuom(item_id) AS altcapuom, puom.uom_name AS shipuom,\n formatUOMRatio(itemcapinvrat(item_id)) AS f_capinvrat,\n formatUOMRatio(itemaltcapinvrat(item_id)) AS f_altcapinvrat,\n formatUOMRatio(iteminvpricerat(item_id)) AS f_shipinvrat,\n formatWeight(item_prodweight) AS f_item_prodweight,\n formatWeight(item_packweight) AS f_item_packweight,\n formatBoolYN(item_sold) AS f_item_sold\n FROM item JOIN classcode ON (classcode_id=item_classcode_id)\n JOIN uom iuom ON (iuom.uom_id=item_inv_uom_id)\n JOIN uom puom ON (puom.uom_id=item_price_uom_id)\n LEFT OUTER JOIN freightclass ON (freightclass_id=item_freightclass_id)\n WHERE (item_id=<? value("item_id") ?>)\n;\n \n \n sold\n SELECT uom_name,\n formatUOMRatio(iteminvpricerat(item_id)) AS f_iteminvpricerat,\n (prodcat_code||' - '||prodcat_descrip) AS f_prodcat,\n formatBoolYN(item_exclusive) AS f_item_exclusive,\n formatPrice(item_listprice) AS f_item_listprice,\n formatExtPrice(item_listprice / iteminvpricerat(item_id)) AS f_extprice\n FROM item, prodcat, uom\n WHERE ((item_id=<? value("item_id") ?>)\n AND (item_price_uom_id=uom_id)\n AND (item_sold)\n AND (item_prodcat_id=prodcat_id) );\n \n \n notes\n SELECT item_comments, item_extdescrip\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n \n \n itemchar\n SELECT 1 as one,\n char_name as charass_name,\n charass_value\n FROM charass, char\n WHERE ((charass_target_type='I')\n AND (charass_char_id=char_id)\n AND (charass_target_id=<? value("item_id") ?>))\nORDER BY char_name;\n \n \n imglist\n SELECT 1 as one,\n image_name, firstLine(image_descrip) as f_descrip,\n CASE WHEN (imageass_purpose='I') THEN 'Inventory Description'\n WHEN (imageass_purpose='P') THEN 'Product Description'\n WHEN (imageass_purpose='E') THEN 'Engineering Reference'\n WHEN (imageass_purpose='M') THEN 'Miscellaneous'\n ELSE 'Other'\n END as f_purpose\nFROM imageass, image\nWHERE ( (imageass_image_id=image_id)\n AND (imageass_source='I')\n AND (imageass_source_id=<? value("item_id") ?>) )\nORDER BY image_name;\n \n \n comments\n SELECT 1 as one,\n formatDate(comment_date) as f_date,\n comment_user,\n comment_text\nFROM comment\nWHERE ( (comment_source='I')\n AND (comment_source_id=<? value("item_id") ?>) )\nORDER BY comment_date;\n \n \n 333\n \n \n 135\n 310\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_item_sold\n \n \n \n \n \n 465\n 252\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_shipinvrat\n \n \n \n \n \n \n \n 505\n 135\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_item_config\n \n \n \n \n 505\n 155\n 225\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_freightclass\n \n \n \n \n \n 135\n 227\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n altcapuom\n \n \n \n \n 390\n 285\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_item_packweight\n \n \n \n \n 465\n 207\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_capinvrat\n \n \n \n \n 135\n 102\n 400\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n 135\n 155\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_classcode\n \n \n \n \n 135\n 135\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_item_type\n \n \n \n \n 135\n 65\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 135\n 185\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n invuom\n \n \n \n \n \n \n \n 465\n 227\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_altcapinvrat\n \n \n \n \n \n \n \n 135\n 252\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n shipuom\n \n \n \n \n 135\n 285\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_item_prodweight\n \n \n \n \n 135\n 207\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n capuom\n \n \n \n \n 135\n 85\n 400\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 565\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_item_active\n \n \n \n \n \n \n \n \n \n 590\n 185\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_item_fractional\n \n \n \n \n 370\n 185\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_item_picklist\n \n \n \n
\n sold\n \n \n sold\n \n 93\n \n \n \n 207\n 45\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n sold\n f_item_listprice\n \n \n \n \n 640\n 45\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n sold\n f_item_exclusive\n \n \n \n \n \n \n \n 207\n 25\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n sold\n f_prodcat\n \n \n \n \n 545\n 5\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n sold\n f_iteminvpricerat\n \n \n \n \n \n 207\n 65\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n sold\n f_extprice\n \n \n \n \n \n 207\n 5\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n sold\n uom_name\n \n \n \n \n
\n
\n notes\n \n \n notes\n \n 36\n \n \n \n 120\n 5\n 615\n 20\n \n 5\n \n Arial\n 10\n bold\n \n \n \n \n notes\n item_comments\n \n \n \n
\n
\n extdescrip\n \n \n notes\n \n 36\n \n \n \n 120\n 5\n 615\n 20\n \n 5\n \n Arial\n 10\n bold\n \n \n \n \n notes\n item_extdescrip\n \n \n \n
\n
\n itemchar\n \n itemchar\n one\n \n 57\n \n 120\n 50\n 690\n 50\n 0\n \n \n \n \n \n \n \n \n itemchar\n \n 21\n \n \n 300\n 0\n 385\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n itemchar\n charass_value\n \n \n \n \n 125\n 0\n 160\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n itemchar\n charass_name\n \n \n \n
\n
\n imglist\n \n imglist\n one\n \n 57\n \n \n \n \n \n 120\n 50\n 690\n 50\n 0\n \n \n \n \n \n imglist\n \n 21\n \n \n 565\n 0\n 130\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n imglist\n f_purpose\n \n \n \n \n 125\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n imglist\n image_name\n \n \n \n \n 250\n 0\n 315\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n imglist\n f_descrip\n \n \n \n
\n
\n comments\n \n comments\n one\n \n 57\n \n \n \n \n 120\n 50\n 690\n 50\n 0\n \n \n \n \n \n \n comments\n \n 21\n \n \n 315\n 0\n 370\n 15\n \n 5\n \n Arial\n 8\n bold\n \n \n \n \n comments\n comment_text\n \n \n \n \n 207\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n comments\n comment_user\n \n \n \n \n 125\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n comments\n f_date\n \n \n \n
\n \n 21\n \n \n \n \n 102\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 217 LocationDispatchList \N \n\n Location Dispatch List\n LocationDispatchList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT warehous_code\nFROM whsinfo\nWHERE (warehous_id=%1);\n \n \n detail\n SELECT formatLocationBarcode(location_id) AS barcode,\n formatLocationIssueBarcode(location_id) AS issuebarcode,\n formatLocationContentsBarcode(location_id) AS contentsbarcode,\n location_name, firstLine(location_descrip) AS description\nFROM location\nWHERE (location_id IN (%2))\nORDER BY location_name;\n \n \n 131\n \n \n 5\n 125\n 985\n 125\n 2\n \n \n \n \n \n 510\n 35\n 80\n 20\n \n \n Arial\n 12\n bold\n \n \n \n \n head\n warehous_code\n \n \n \n \n \n \n \n
\n detail\n \n detail\n location_name\n \n \n \n detail\n \n 71\n \n \n 15\n 5\n 125\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n location_name\n \n \n \n \n 335\n 30\n 280\n 25\n \n 128\n 20\n \n \n detail\n contentsbarcode\n \n \n \n \n 5\n 30\n 280\n 25\n \n 128\n 20\n \n \n detail\n barcode\n \n \n \n \n 670\n 30\n 280\n 25\n \n 128\n 20\n \n \n detail\n issuebarcode\n \n \n \n \n 170\n 5\n 275\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n description\n \n \n \n 5\n 65\n 985\n 65\n 0\n \n \n
\n
\n \N 0 2013-07-26 16:14:22.271087 95 MaterialUsageVarianceByItem \N \n\n Material Usage Variance By Item\n MaterialUsageVarianceByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate\n FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n workOrderVariance\n material\n \n \n 234\n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n \n 605\n 90\n 120\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n 605\n 110\n 120\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n 360\n 90\n 120\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n \n 140\n 130\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n 140\n 110\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n 140\n 155\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n 140\n 90\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 85\n 15\n 395\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n componentdescrip\n \n \n \n \n 580\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actqtyper\n \n \n \n \n 494\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projqtyper\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 400\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_received\n \n \n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervarpercent\n \n \n \n \n 85\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n componentitemnumber\n \n \n \n \n 494\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projreq\n \n \n \n \n 5\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervar\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actiss\n \n \n \n \n 315\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 404 OpportunityList \N \n\n Opportunity List\n OpportunityList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n opportunities\n detail\n \n \n queryParams\n SELECT\n formatDate(<? value("startDate") ?>,'Earliest') AS f_startDate,\n formatDate(<? value("endDate") ?>,'Latest') AS f_endDate,\n <? if exists("username") ?>\n <? value("username") ?> AS usr_username\n <? elseif exists("usr_pattern") ?>\n <? value("usr_pattern") ?> AS usr_username\n <? else ?>\n text('All') AS usr_username\n <? endif ?>\n;\n \n \n 163\n \n \n \n \n \n \n \n 5.66667\n 158.333\n 745.667\n 158.333\n 2\n \n \n \n \n \n \n \n \n \n 10\n 43\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 41\n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n ByUser\n usr\n \n \n \n detail\n \n 36\n \n \n 220\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n opsource_name\n \n \n \n \n 395\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 50\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n crmacct_number\n \n \n \n \n 480\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_currency\n \n \n \n \n 10\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ophead_name\n \n \n \n \n 305\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ophead_probability_prcnt\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actualdate\n \n \n \n \n 220\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n opstage_name\n \n \n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_targetdate\n \n \n \n \n 135\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ophead_owner_username\n \n \n \n \n 305\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n optype_name\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 146 POLineItemsByVendor \N \n\n P/O Line Items By Vendor\n POLineItemsByVendor\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT\n<? if exists("vend_id") ?>\n (SELECT ('Vendor = ' || vend_name) FROM vendinfo WHERE vend_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n (SELECT ('Vendor Type = ' || vendtype_code) FROM vendtype WHERE vendtype_id=<? value("vendtype_id") ?>)\n<? elseif exists("vendtype_pattern") ?>\n ('Vendor Type pattern = ' || <? value("vendtype_pattern") ?>)\n<? else ?>\n 'All Vendors'\n<? endif ?>\n AS selection,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername,\n <? if exists("openItems") ?>\n text('Open Items')\n <? elseif exists("closedItems") ?>\n text('Closed Items')\n <? else ?>\n text('All Items')\n <? endif ?>\n AS f_whichitems\n;\n \n \n detail\n poItems\n detail\n \n \n 224\n \n \n \n \n 535\n 75\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n 475\n 130\n 165\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_whichitems\n \n \n \n \n \n \n \n \n \n \n 535\n 95\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 150\n 75\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n selection\n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 9\n \n \n 24\n \n \n \n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 19\n \n \n 440\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemuom\n \n \n \n \n 225\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemnumber\n \n \n \n \n 45\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pohead_number\n \n \n \n \n 135\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_duedate\n \n \n \n \n 5\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 493\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_qty_ordered\n \n qty\n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_qty_received\n \n qty\n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_qty_returned\n \n qty\n \n \n
\n \n 19\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 491 ItemSites \N \n\n Item Sites\n ItemSites\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT warehous_code,\n formatBoolYN(itemsite_active) AS active,\n item_number,\n item_descrip1,\n item_descrip2,\n formatBoolYN(itemsite_wosupply) AS supplied,\n formatBoolYN(itemsite_sold) AS sold,\n itemsite_soldranking,\n formatBoolYN(itemsite_stocked) AS stocked,\n formatBoolYN(itemsite_createpr) AS createpr,\n CASE WHEN (itemsite_controlmethod='N') THEN 'None'\n WHEN (itemsite_controlmethod='R') THEN 'Regular'\n WHEN (itemsite_controlmethod='L') THEN 'Lot #'\n WHEN (itemsite_controlmethod='S') THEN 'Serial #'\n ELSE '?'\n END AS controlmethod,\n formatBoolYN(itemsite_loccntrl) AS locationcontrol,\n CASE WHEN (itemsite_location_id=-1) THEN 'None'\n ELSE ( SELECT location_name\n FROM location\n WHERE (location_id=itemsite_location_id) )\n END AS defaultlocation,\n formatBoolYN(itemsite_useparams) AS enforceparams,\n formatBoolYN(itemsite_useparamsmanual) AS onmanualorders,\n formatQty(itemsite_reorderlevel) AS reorderlevel,\n formatQty(itemsite_ordertoqty) AS orderupto,\n formatQty(itemsite_multordqty) AS ordermult,\n formatQty(itemsite_safetystock) AS safetystock,\n itemsite_abcclass,\n itemsite_cyclecountfreq,\n itemsite_leadtime,\n itemsite_eventfence,\n formatQty(itemsite_qtyonhand) AS qoh,\n formatDate(itemsite_datelastused, 'Never') AS lastused,\n formatDate(itemsite_datelastcount, 'Never') AS lastcounted,\n CASE WHEN(itemsite_plancode_id=-1) THEN 'Error'\n ELSE (SELECT (plancode_code || '-' || plancode_name)\n FROM plancode\n WHERE (plancode_id=itemsite_plancode_id) )\n END AS plannercode\n FROM item, uom, itemsite, whsinfo\n WHERE ((itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=item_id)\n AND(item_inv_uom_id=uom_id)\n <? if exists("search_pattern") ?>\n AND ((item_number ~* <? value("search_pattern") ?>)\n OR (item_descrip1 || ' ' || item_descrip2 ~* <? value("search_pattern") ?>)\n OR (warehous_code ~* <? value("search_pattern") ?>))\n <? endif ?>\n <? if exists("item_id") ?>\n AND (item_id=<? value("item_id") ?>)\n <? endif ?>\n <? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n <? endif ?>\n <? if exists("itemgrp_id") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id \n FROM itemgrpitem \n WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n <? endif ?>\n <? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n <? endif ?>\n <? if exists("costcat_id") ?>\n AND (itemsite_costcat_id=<? value("costcat_id") ?>)\n <? endif ?>\n <? if exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id \n FROM classcode \n WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n <? endif ?>\n <? if exists("itemgrp_pattern") ?>\n AND (item_id IN (SELECT itemgrpitem_item_id \n FROM itemgrpitem, itemgrp \n WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) \n AND (itemgrp_name ~ <? value("itemgrp_pattern") ?>) ) ))\n <? endif ?>\n <? if exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id \n FROM plancode \n WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n <? endif ?>\n <? if exists("costcat_pattern") ?>\n AND (itemsite_costcat_id IN (SELECT costcat_id \n FROM costcat \n WHERE (costcat_code ~ <? value("costcat_pattern") ?>)))\n <? endif ?>\n <? if exists("warehous_id") ?>\n AND (warehous_id=<? value("warehous_id") ?>)\n <? endif ?>\n <? if not exists("showInactive") ?>\n AND (itemsite_active)\n <? endif ?>\n)\nORDER BY item_number, warehous_code;\n \n \n 281\n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 275\n 745\n 275\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 10\n 38\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 81\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 75\n 745\n 75\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 81\n \n \n 580\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orderupto\n \n \n \n \n 490\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n enforceparams\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 260\n 60\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qoh\n \n \n \n \n 430\n 60\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n lastcounted\n \n \n \n \n 580\n 45\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n safetystock\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n reorderlevel\n \n \n \n \n 409\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n controlmethod\n \n \n \n \n 50\n 0\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 280\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n supplied\n \n \n \n \n 330\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createpr\n \n \n \n \n 280\n 30\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n stocked\n \n \n \n \n 330\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_soldranking\n \n \n \n \n 409\n 30\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n defaultlocation\n \n \n \n \n 409\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locationcontrol\n \n \n \n \n 10\n 15\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n active\n \n \n \n 5\n 75\n 745\n 75\n 0\n \n \n \n 670\n 15\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_cyclecountfreq\n \n \n \n \n 280\n 15\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sold\n \n \n \n \n 50\n 30\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 670\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_abcclass\n \n \n \n \n 50\n 15\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 490\n 15\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n onmanualorders\n \n \n \n \n 50\n 45\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n plannercode\n \n \n \n \n 345\n 60\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n lastused\n \n \n \n \n 670\n 45\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_eventfence\n \n \n \n \n 580\n 30\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordermult\n \n \n \n \n 670\n 30\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemsite_leadtime\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 407 JobCosting \N \n\n Job Costing\n JobCosting\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatwonumber(<? value("wo_id") ?>) AS wonumber;\n \n \n \n detail\n manufacture\n jobcosting\n \n \n 141\n \n \n \n \n 0\n 135\n 740\n 135\n 2\n \n \n \n \n \n \n \n 120\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n wonumber\n \n \n \n \n \n \n 9\n \n \n 29\n \n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n
\n detail\n \n \n detail\n \n 21\n \n 0\n 20\n 740\n 20\n 0\n \n \n \n 630\n 0\n 29\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom\n \n \n \n \n 80\n 0\n 219\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n code\n \n \n \n \n 305\n 0\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n descrip\n \n \n \n \n 15\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n type\n \n \n \n \n 540\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qty\n \n qty\n \n \n \n 666\n 0\n 84\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cost\n \n cost\n \n \n
\n \n 21\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 18\n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cost\n \n cost\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 468 Journals \N \n\n Journals\n Journals\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("source") ?>\n text(<? value("source") ?>)\n <? else ?>\n text('All Sources')\n <? endif ?>\n AS source,\n <? if exists("accnt_id") ?>\n ( SELECT (accnt_number || '-' || accnt_descrip)\n FROM accnt\n WHERE (accnt_id=<? value("accnt_id") ?>) )\n <? else ?>\n text('All Accounts')\n <? endif ?>\n AS accnt,\n <? if exists("showUsernames") ?>\n text('Username')\n <? else ?>\n text('')\n <? endif ?>\n AS f_username\n \n \n detail\n SELECT sltrans_id,\n sltrans_created, formatDate(sltrans_date) AS transdate,\n sltrans_source, sltrans_doctype, sltrans_docnumber, invhist_docnumber,\n firstLine(sltrans_notes) AS transnotes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n-- Debits:\n CASE WHEN (sltrans_amount < 0) THEN formatMoney(ABS(sltrans_amount))\n ELSE ''\n END AS f_debit, \n CASE WHEN (sltrans_amount < 0) THEN ABS(sltrans_amount)\n ELSE 0\n END AS debit_amt, \n--Credits:\n CASE WHEN (sltrans_amount > 0) THEN formatMoney(sltrans_amount)\n ELSE ''\n END AS f_credit,\n CASE WHEN (sltrans_amount > 0) THEN sltrans_amount\n ELSE 0\n END AS credit_amt,\n--Balance:\n sltrans_amount * -1 as balance_amt,\n--\n sltrans_amount,\n CASE WHEN accnt_type IN ('A','E') THEN \n sltrans_amount * -1\n ELSE sltrans_amount END AS running,\n formatBoolYN(sltrans_posted) AS f_posted,\n sltrans_username AS f_username,\n sltrans_sequence\nFROM sltrans\n JOIN accnt ON (sltrans_accnt_id=accnt_id) \n LEFT OUTER JOIN invhist ON (sltrans_misc_id=invhist_id\n AND sltrans_docnumber='Misc.') \n<? if exists("company_id") ?>\n JOIN company ON (accnt_company=company_number) \n<? endif ?>\n<? if exists("prfcntr_id") ?>\n JOIN prftcntr ON (accnt_profit=prftcntr_number) \n<? endif ?>\n<? if exists("subaccnt_id") ?>\n JOIN subaccnt ON (accnt_sub=subaccnt_number) \n<? endif ?>\n<? if exists("subType") ?>\n JOIN subaccnttype ON (subaccnttype_code=accnt_subaccnttype_code) \n<? endif ?>\nWHERE (\n<? if exists("startDate") ?>\n <? if exists("endDate") ?>\n (sltrans_date BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n <? else ?>\n (sltrans_date BETWEEN <? value("startDate") ?>\n AND endoftime())\n <? endif ?>\n<? else ?>\n <? if exists("endDate") ?>\n (sltrans_date BETWEEN startoftime()\n AND <? value("endDate") ?>)\n <? else ?>\n (sltrans_date BETWEEN startoftime()\n AND endoftime())\n <? endif ?>\n<? endif ?>\n<? if exists("company_id") ?>\n AND (company_id=<? value("company_id") ?>)\n<? endif ?>\n<? if exists("prfcntr_id") ?>\n AND (prftcntr_id=<? value("prfcntr_id") ?>)\n<? endif ?>\n<? if exists("accnt_number") ?>\n AND (accnt_number=<? value("accnt_number") ?>)\n<? endif ?>\n<? if exists("subaccnt_id") ?>\n AND (subaccnt_id=<? value("subaccnt_id") ?>)\n<? endif ?>\n<? if exists("subType") ?>\n AND (subaccnttype_id=<? value("subType") ?>)\n<? endif ?>\n<? if exists("accntType") ?>\n AND (accnt_type= <? value("accntType") ?>)\n<? endif ?>\n<? if exists("accnt_id") ?>\n AND (sltrans_accnt_id=<? value("accnt_id") ?>)\n<? endif ?>\n<? if exists("docnum") ?>\n AND (sltrans_docnumber = case when <? value("docnum") ?> = '' then \n sltrans_docnumber else \n<? value("docnum") ?> end ) \n<? endif ?>\n<? if exists("source") ?>\n AND (sltrans_source=<? value("source") ?>)\n<? endif ?>\n<? if exists("source_pattern") ?>\n AND (sltrans_source ~* <? value("source_pattern") ?>)\n<? endif ?>\n<? if exists("journalnumber") ?>\n AND (sltrans_gltrans_journalnumber=<? value("journalnumber") ?>)\n<? endif ?>\n<? if exists("posted") ?>\n AND (sltrans_posted=<? value("posted") ?>)\n<? endif ?>\n )\nORDER BY sltrans_created,\n sltrans_sequence, sltrans_amount;\n \n \n 205\n \n \n \n \n \n \n \n 0\n 200\n 1000\n 200\n 2\n \n \n \n \n \n \n \n \n 10\n 40\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 5\n \n \n 45\n \n \n \n \n 0\n 40\n 1000\n 40\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 31\n \n \n 882.19\n -0.890523\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_username\n \n \n \n \n 790.907\n -0.890523\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n \n 240\n 15\n 265\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transnotes\n \n \n \n \n 954.846\n -0.891\n 42.1539\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 12500\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_doctype\n \n \n \n \n 125\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sltrans_doctype\n \n \n \n \n 0\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 180\n 15\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invhist_docnumber\n \n \n \n \n 180\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sltrans_docnumber\n \n \n \n \n 681.65\n -0.890523\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n \n 240\n 0\n 270\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 65\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sltrans_source\n \n \n \n
\n \n \n 75\n \n \n 765.907\n 8.08006\n 105\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credit_amt\n \n money\n \n \n \n 632.141\n 5.07044\n 1000\n 5\n 2\n \n \n \n 960\n 60\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 60\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 656.65\n 8.08006\n 105\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debit_amt\n \n money\n \n \n \n \n \n \n 15\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 960\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 403 ListTransferOrders \N \n\n List Transfer Orders\n ListTransferOrders\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("src_warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("src_warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?> AS src_warehous_code,\n <? if exists("dest_warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("dest_warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?> AS dest_warehous_code,\n CASE WHEN (<? value ("tohead_status") ?>='C') THEN 'Closed'\n WHEN (<? value ("tohead_status") ?>='O') THEN 'Open'\n ELSE text('All Statuses')\n END AS status;\n\n \n \n detail\n SELECT tohead_number,\n tohead_srcname,\n tohead_trnsname,\n tohead_destname,\n formatDate(tohead_orderdate) AS f_orderdate,\n formatDate(MIN(toitem_schedshipdate)) AS f_scheddate,\n formatDate(DATE(MAX(shipitem_shipdate))) AS f_shipdate,\n CASE WHEN (tohead_status='C') THEN 'Closed'\n WHEN (tohead_status='O') THEN 'Open'\n ELSE tohead_status\n END AS status\n FROM tohead, toitem LEFT OUTER JOIN\n (shipitem JOIN\n shiphead ON (shipitem_shiphead_id=shiphead_id\n AND shiphead_order_type='TO')\n ) ON (shipitem_orderitem_id=toitem_id)\n WHERE ((toitem_tohead_id=tohead_id)\n AND (toitem_status<>'X')\n<? if exists("tohead_status") ?>\n AND (tohead_status=<? value("tohead_status") ?>)\n<? elseif exists("excludeClosed") ?>\n AND (tohead_status <> 'C')\n<? endif ?>\n<? if exists("src_warehous_id") ?>\n AND (tohead_src_warehous_id=<? value("src_warehous_id") ?>)\n<? endif ?>\n<? if exists("dest_warehous_id") ?>\n AND (tohead_dest_warehous_id=<? value("dest_warehous_id") ?>)\n<? endif ?>\n)\nGROUP BY tohead_number, tohead_srcname, tohead_trnsname, tohead_destname,\n tohead_orderdate, tohead_status\nORDER BY tohead_number;\n \n \n 221\n \n \n \n \n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 140\n 150\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n status\n \n \n \n \n \n 140\n 105\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n src_warehous_code\n \n \n \n \n 140\n 130\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n dest_warehous_code\n \n \n \n \n \n \n 5\n \n \n 21\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 15\n \n \n 5\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tohead_number\n \n \n \n \n 600\n 0\n 100\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipdate\n \n \n \n \n 200\n 0\n 95\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tohead_trnsname\n \n \n \n \n 300\n 0\n 95\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tohead_destname\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tohead_srcname\n \n \n \n \n 500\n 0\n 100\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n f_scheddate\n \n \n \n \n 400\n 0\n 100\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orderdate\n \n \n \n \n 700\n 0\n 50\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n status\n \n \n \n
\n \n 15\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 390 POsByDate \N \n\n P/Os By Date\n POsByDate\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate\n\n \n \n detail\n purchaseOrders\n detail\n \n \n 221\n \n \n 550\n 95\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 135\n 75\n 275\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n 135\n 95\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 550\n 75\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 5\n 2\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehousecode\n \n \n \n \n 325\n 2\n 230\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 650\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 80\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pohead_number\n \n \n \n \n 200\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_status\n \n \n \n \n 565\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orderdate\n \n \n \n
\n \n 18\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 440 PackageMasterList \N \n\n Package Master List\n PackageMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT *, formatboolyn(packageIsEnabled(pkghead_name)) AS enabled\nFROM pkghead\nORDER BY pkghead_name, pkghead_version DESC;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 265\n 0\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pkghead_descrip\n \n \n \n \n 10\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pkghead_name\n \n \n \n \n 565\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pkghead_version\n \n \n \n \n 665\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n enabled\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 173 PackingListBatchEditList \N \n\n Packing List Batch Edit List\n PackingListBatchEditList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT cohead_number AS order_number, pack_head_type,\n cohead_shipvia AS shipvia,\n formatShipmentNumber(pack_shiphead_id) AS shipment_number, \n cust_number AS number, cohead_billtoname AS name,\n CASE WHEN (cohead_holdtype='N') THEN <? value("none") ?>\n WHEN (cohead_holdtype='C') THEN <? value("credit") ?>\n WHEN (cohead_holdtype='S') THEN <? value("ship") ?>\n WHEN (cohead_holdtype='P') THEN <? value("pack") ?>\n WHEN (cohead_holdtype='R') THEN <? value("return") ?>\n ELSE <? value("other") ?>\n END AS f_holdtype,\n formatBoolYN(pack_printed) AS f_printed\nFROM pack, cohead, custinfo\nWHERE ((pack_head_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (pack_head_type='SO'))\n<? if exists("MultiWhs") ?>\n AND checkSOSitePrivs(cohead_id)\nUNION \nSELECT tohead_number AS order_number, pack_head_type,\n tohead_shipvia AS shipvia,\n formatShipmentNumber(pack_shiphead_id) AS shipment_number, \n tohead_destname AS number, tohead_destcntct_name AS name,\n '' AS f_holdtype,\n formatBoolYN(pack_printed) AS f_printed\nFROM pack, tohead \nWHERE ((pack_head_id=tohead_id)\n AND (pack_head_type='TO')) \n<? endif ?>\nORDER BY order_number;\n \n \n 75\n \n \n \n \n \n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n 5\n \n \n 31\n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 15\n \n \n 115\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipment_number\n \n \n \n \n 675\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_printed\n \n \n \n \n 220\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n number\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n order_number\n \n \n \n \n 600\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_holdtype\n \n \n \n \n 320\n 0\n 160\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n name\n \n \n \n \n 490\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipvia\n \n \n \n
\n \n 15\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 98 MaterialUsageVarianceByWarehouse \N \n\n Material Usage Variance By Site\n MaterialUsageVarianceByWarehouse\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n \n \n detail\n workOrderVariance\n material\n \n \n 234\n \n \n \n \n 490\n 130\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n \n 140\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 490\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 520\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projreq\n \n \n \n \n 85\n 15\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n parentdescrip\n \n \n \n \n 595\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actqtyper\n \n \n \n \n 444\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 265\n 15\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n componentdescrip\n \n \n \n \n 595\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actiss\n \n \n \n \n 670\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervarpercent\n \n \n \n \n 265\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n componentitemnumber\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervar\n \n \n \n \n 85\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n parentitemnumber\n \n \n \n \n 444\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_received\n \n \n \n \n 5\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 520\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projqtyper\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 97 MaterialUsageVarianceByWorkOrder \N \n\n Material Usage Variance By Work Order\n MaterialUsageVarianceByWorkOrder\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatWONumber(wo_id) AS wonumber,\n warehous_code, item_number, uom_name,\n item_descrip1, item_descrip2,\n wo_status\n FROM wo, itemsite, item, whsinfo, uom\n WHERE ((wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_id=<? value("wo_id") ?>))\n \n \n detail\n workOrderVariance\n material\n \n \n 234\n \n \n 140\n 140\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n 140\n 120\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n 140\n 100\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 360\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehous_code\n \n \n \n \n \n 140\n 70\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n wonumber\n \n \n \n \n 140\n 165\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n wo_status\n \n \n \n \n \n \n \n \n \n \n 360\n 100\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actiss\n \n \n \n \n 85\n 15\n 375\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n componentdescrip\n \n \n \n \n 85\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n componentitemnumber\n \n \n \n \n 400\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_received\n \n \n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervarpercent\n \n \n \n \n 494\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projreq\n \n \n \n \n 315\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 580\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_actqtyper\n \n \n \n \n 5\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 494\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projqtyper\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtypervar\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 103 OpenWorkOrdersWithClosedParentSalesOrders \N \n\n Open Work Orders With Closed Parent Sales Orders\n OpenWorkOrdersWithClosedParentSalesOrders\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n \n \n detail\n SELECT formatWONumber(wo_id) AS wonumber,\n wo_status, item_number, uom_name,\n item_descrip1, item_descrip2,\n warehous_code,\n cohead_number,\n formatQty(wo_qtyord) AS qtyord,\n formatQty(wo_qtyrcv) AS qtyrcv,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate \n FROM coitem, cohead, wo, itemsite, whsinfo, item, uom\n WHERE ((coitem_cohead_id=cohead_id)\n AND (coitem_order_id=wo_id)\n AND (coitem_status='C')\n AND (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_status IN ('O', 'E', 'R', 'I'))\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nORDER BY wo_duedate;\n \n \n 236\n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n 140\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 265\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 85\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 5\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wonumber\n \n \n \n \n 85\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 405\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyord\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n startdate\n \n \n \n \n 315\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n \n 85\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 5\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wo_status\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n duedate\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyrcv\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 286 OpenWorkOrdersWithParentSalesOrders \N \n\n Open Work Orders With Parent Sales Orders\n OpenWorkOrdersWithParentSalesOrders\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n \n \n detail\n SELECT formatWONumber(wo_id) AS wonumber,\n wo_status, item_number, uom_name,\n item_descrip1, item_descrip2,\n warehous_code,\n cohead_number,\n formatQty(wo_qtyord) AS qtyord,\n formatQty(wo_qtyrcv) AS qtyrcv,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate \n FROM coitem, cohead, wo, itemsite, whsinfo, item, uom\n WHERE ((coitem_cohead_id=cohead_id)\n AND (coitem_order_id=wo_id)\n AND (coitem_status<>'X')\n AND (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_status IN ('O', 'E', 'R', 'I'))\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nORDER BY wo_duedate;\n \n \n 236\n \n \n 5\n 230\n 745\n 230\n 2\n \n \n \n \n \n \n 140\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 5\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wo_status\n \n \n \n \n 85\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 5\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wonumber\n \n \n \n \n 85\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 85\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyrcv\n \n \n \n \n 315\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n startdate\n \n \n \n \n 265\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 405\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyord\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n duedate\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 149 POHistory \N \r\n\r\n P/O History\r\n POHistory\r\n \r\n \r\n \r\n select pohead_id, pohead_number from pohead order by pohead_number desc;\r\n \r\n Letter\r\n \r\n 50\r\n 50\r\n 50\r\n 50\r\n \r\n head\r\n SELECT pohead_number, \r\n vend_name \r\n FROM pohead, vendinfo \r\n WHERE ((pohead_id=<? value("pohead_id") ?>) \r\n AND (pohead_vend_id=vend_id));\r\n \r\n \r\n detail\r\n SELECT \r\npoitem_linenumber as f_number, \r\nitem_number as f_item, \r\nuom_name as f_uom1, \r\nformatDate(poitem_duedate) as f_duedate, \r\npoitem_vend_item_number as f_vend_item, \r\npoitem_vend_uom as f_uom2, \r\nformatQty(poitem_qty_ordered) as f_ordered, \r\nformatqty(poitem_qty_received) as f_received \r\nFROM poitem, itemsite, item, uom \r\nWHERE ((poitem_itemsite_id=itemsite_id) \r\nAND (itemsite_item_id=item_id) \r\nAND (item_inv_uom_id=uom_id) \r\nAND (poitem_pohead_id=<? value("pohead_id") ?>)) \r\n \r\nUNION \r\n \r\nSELECT \r\npoitem_linenumber as f_number, \r\npoitem_vend_item_number as f_item, \r\nexpcat_code as f_uom1, \r\nformatDate(poitem_duedate) as f_duedate, \r\npoitem_vend_item_descrip as f_vend_item, \r\nexpcat_descrip as f_uom2, \r\nformatQty(poitem_qty_ordered) as f_ordered, \r\nformatqty(poitem_qty_received) as f_received \r\nFROM poitem, expcat \r\nWHERE ((poitem_expcat_id = expcat_id) \r\nAND (poitem_pohead_id=<? value("pohead_id") ?>)) \r\n \r\nORDER BY f_number;\r\n \r\n \r\n 205\r\n \r\n 5\r\n 200\r\n 990\r\n 200\r\n 2\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 105\r\n 120\r\n 385\r\n 20\r\n \r\n \r\n Arial\r\n 10\r\n bold\r\n \r\n \r\n \r\n \r\n head\r\n vend_name\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 105\r\n 100\r\n 385\r\n 20\r\n \r\n \r\n Arial\r\n 10\r\n bold\r\n \r\n \r\n \r\n \r\n head\r\n pohead_number\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 8\r\n \r\n \r\n 42\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 5\r\n 37\r\n 990\r\n 37\r\n 2\r\n \r\n \r\n \r\n \r\n
\r\n detail\r\n \r\n \r\n detail\r\n \r\n 18\r\n \r\n \r\n 45\r\n 0\r\n 150\r\n 15\r\n \r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n detail\r\n f_item\r\n \r\n \r\n \r\n \r\n 805\r\n 0\r\n 80\r\n 15\r\n \r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n detail\r\n f_ordered\r\n \r\n \r\n \r\n \r\n 900\r\n 0\r\n 90\r\n 15\r\n \r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n detail\r\n f_received\r\n \r\n \r\n \r\n \r\n 180\r\n 0\r\n 145\r\n 15\r\n \r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n detail\r\n f_uom1\r\n \r\n \r\n \r\n \r\n 5\r\n 0\r\n 35\r\n 15\r\n \r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n detail\r\n f_number\r\n \r\n \r\n \r\n \r\n 730\r\n 0\r\n 55\r\n 15\r\n \r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n detail\r\n f_duedate\r\n \r\n \r\n \r\n \r\n 525\r\n 0\r\n 195\r\n 15\r\n \r\n 1\r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n detail\r\n f_vend_item\r\n \r\n \r\n \r\n \r\n 325\r\n 0\r\n 190\r\n 15\r\n \r\n 1\r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n detail\r\n f_uom2\r\n \r\n \r\n \r\n
\r\n \r\n 32\r\n \r\n \r\n \r\n 945\r\n 17\r\n 40\r\n 15\r\n \r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n Context Query\r\n page_number\r\n \r\n \r\n \r\n \r\n 85\r\n 17\r\n 100\r\n 15\r\n \r\n \r\n Arial\r\n 8\r\n bold\r\n \r\n \r\n \r\n \r\n Context Query\r\n report_date\r\n \r\n \r\n \r\n \r\n
\r\n \N 0 2013-07-26 16:14:22.271087 391 POsByVendor \N \n\n P/Os By Vendor\n POsByVendor\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n<? if exists("vend_id") ?>\n (SELECT ('Vendor = ' || vend_name) FROM vendinfo WHERE vend_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n (SELECT ('Vendor Type = ' || vendtype_code) FROM vendtype WHERE vendtype_id=<? value("vendtype_id") ?>)\n<? elseif exists("vendtype_pattern") ?>\n ('Vendor Type pattern = ' || <? value("vendtype_pattern") ?>)\n<? else ?>\n 'All Vendors'\n<? endif ?>\n AS selection,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("byReceiptDate") ?>\n TEXT('By Receipt Date')\n <? elseif exists("byDueDate") ?>\n TEXT('By Due Date')\n <? else ?>\n TEXT('By Order Date')\n <? endif ?>\n AS f_byDate,\n <? if exists("descrip_pattern") ?>\n TEXT('Where Item Description contains ' || <? value("descrip_pattern") ?>)\n <? else ?>\n TEXT('')\n <? endif ?>\n AS f_descrip\n\n \n \n detail\n purchaseOrders\n detail\n \n \n 221\n \n \n 135\n 135\n 540\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_descrip\n \n \n \n \n 550\n 115\n 180\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_byDate\n \n \n \n \n \n \n 135\n 95\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 135\n 75\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n selection\n \n \n \n \n \n 550\n 95\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 550\n 75\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 650\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orderdate\n \n \n \n \n 5\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehousecode\n \n \n \n \n 200\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_status\n \n \n \n \n 80\n 0\n 110\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pohead_number\n \n \n \n \n 330\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_number\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 363 PackingList \N \n\n Packing List\n PackingList\n Hybrid Packing List - use the shiphead_id if it is passed but use the order id and type if they're passed but not shiphead_id - Shows Lot/Serial\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 25\n 25\n 25\n 25\n \n head\n SELECT COALESCE(shiphead_number::TEXT, 'Not Issued To Shipping') AS shiphead_number,\n\t 'S/O #:' AS ordertype,\n cohead_number AS ordernumber,\n formatsobarcode(cohead_id) AS order_barcode,\n COALESCE(shiphead_shipvia, cohead_shipvia) AS shipvia,\n cohead_shiptophone AS shiptophone,\n cohead_custponumber,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_shipcomments AS shipcomments,\n cohead_billtoname AS billtoname,\n formataddr(cohead_billtoaddress1, cohead_billtoaddress2,\n cohead_billtoaddress3,\n (cohead_billtocity || ' ' || cohead_billtostate ||\n ' ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address,\n cohead_shiptoname AS shiptoname,\n formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2,\n cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate ||\n ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n\n cust_number,\n trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n cntct_phone AS cust_phone,\n terms_descrip\n FROM custinfo\n JOIN cohead ON (cohead_cust_id=cust_id)\n JOIN terms ON (cohead_terms_id=terms_id)\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n<? if exists("shiphead_id") ?>\n JOIN\n<? else ?>\n LEFT OUTER JOIN\n<? endif ?>\n shiphead ON (shiphead_order_type='SO') AND (shiphead_order_id=cohead_id)\nWHERE TRUE\n<? if exists('shiphead_id') ?>\n AND (shiphead_id=<? value("shiphead_id") ?>)\n<? endif ?>\n<? if exists("head_id") ?>\n AND (cohead_id=<? value("head_id") ?>)\n AND (<? value("head_type") ?>='SO')\n<? endif ?>\n\n\n<? if exists("MultiWhs") ?>\nUNION\nSELECT COALESCE(shiphead_number::TEXT, 'Not Issued To Shipping') AS shiphead_number,\n 'T/O #:' AS ordertype,\n tohead_number AS ordernumber,\n formattobarcode(tohead_id) AS order_barcode,\n COALESCE(shiphead_shipvia, tohead_shipvia) AS shipvia,\n tohead_destphone AS shiptophone,\n TEXT(' ') AS cohead_custponumber,\n formatDate(tohead_orderdate) AS orderdate,\n tohead_shipcomments AS shipcomments,\n tohead_srcname AS billtoname,\n formataddr(tohead_srcaddress1, tohead_srcaddress2,\n tohead_srcaddress3,\n (tohead_srccity || ' ' || tohead_srcstate ||\n ' ' || tohead_srcpostalcode), tohead_srccountry) AS billing_address,\n tohead_destname AS shiptoname,\n formataddr(tohead_destaddress1, tohead_destaddress2,\n tohead_destaddress3,\n (tohead_destcity || ' ' || tohead_deststate ||\n ' ' || tohead_destpostalcode), tohead_destcountry) AS shipping_address,\n 'Transfer Order' AS cust_number,\n tohead_destcntct_name AS cust_contact,\n tohead_destphone AS cust_phone,\n '' AS terms_descrip\n FROM tohead \n<? if exists("shiphead_id") ?>\n\tJOIN\n<? else ?>\n\tLEFT OUTER JOIN\n<? endif ?>\n shiphead ON (shiphead_order_type='TO') AND (shiphead_order_id=tohead_id)\nWHERE TRUE\n<? if exists('shiphead_id') ?>\n AND (shiphead_id=<? value("shiphead_id")?>)\n<? endif ?>\n<? if exists("head_id") ?>\n AND (tohead_id=<? value("head_id") ?>)\n AND (<? value("head_type") ?>='TO')\n<? endif ?>\n<? endif ?>;\n \n \n scheddate\n SELECT formatDate(MIN(orderitem_scheddate)) AS scheddate\n FROM orderitem\n <? if exists("shiphead_id") ?>\n JOIN shiphead ON ((orderitem_orderhead_type=shiphead_order_type)\n\t\t AND (orderitem_orderhead_id=shiphead_order_id)\n\t\t AND (shiphead_id=<? value("shiphead_id")?>))\n JOIN shipitem ON ((shiphead_id=shipitem_shiphead_id)\n\t\t AND (shipitem_orderitem_id=orderitem_id))\n <? endif ?>\n WHERE ((orderitem_status <> 'X')\n<? if exists("head_id") ?>\n AND (orderitem_orderhead_type=<? value("head_type") ?>)\n AND (orderitem_orderhead_id=<? value("head_id") ?>)\n<? endif ?>\n );\n \n \n detail\n SELECT 1 AS groupby,\n coitem_linenumber AS linenumber,\n coitem_memo AS memo,\n CASE WHEN (coitem_custpn != '') THEN coitem_custpn\n ELSE item_number\n END AS item_number,\n formatitemsitebarcode(itemsite_id) AS item_barcode,\n formatsoitembarcode(coitem_id) AS orderitem_barcode,\n (select uom_name from uom where uom_id = coitem_qty_uom_id) AS uom_name,\n itemsellinguom(item_id) AS shipuom,\n CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip1\n ELSE item_descrip1\n END AS item_descrip1,\n CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip2\n ELSE item_descrip2\n END AS item_descrip2,\n formatQty(coitem_qtyord) AS ordered,\n ( SELECT formatQty(COALESCE(SUM(shipitem_qty), 0))\n FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id)\n WHERE ((shipitem_orderitem_id=coitem_id) AND (shiphead_order_type='SO')) ) AS atShipping,\n\n CASE WHEN (coitem_status='O' AND (SELECT cust_creditstatus\n FROM custinfo,cohead\n WHERE (coitem_cohead_id=cohead_id)\n AND (cust_id=cohead_cust_id))='H') THEN 'H'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=coitem_linenumber)\n AND (cohead_id=coitem_cohead_id))) >= coitem_qtyord)) THEN 'I'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=coitem_linenumber)\n AND (cohead_id=coitem_cohead_id))) > 0)) THEN 'P'\n WHEN (coitem_status='O' AND (itemsite_qtyonhand - qtyAllocated(itemsite_id, CURRENT_DATE)\n + qtyOrdered(itemsite_id, CURRENT_DATE))\n >= (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) THEN 'R'\n ELSE coitem_status\n END AS f_status\n FROM coitem\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN uom ON (uom_id=item_inv_uom_id)\n LEFT OUTER JOIN itemalias ON (itemalias_item_id=item_id AND itemalias_number=coitem_custpn) \n WHERE ( (coitem_status <> 'X')\n<? if exists("shiphead_id") ?>\n AND (coitem_cohead_id IN (SELECT shiphead_order_id FROM shiphead\n\t\t\t WHERE ((shiphead_id=<? value("shiphead_id") ?>)\n\t\t\t AND (shiphead_order_type='SO'))))\n<? endif ?>\n<? if exists("head_id") ?>\n AND (<? value("head_type") ?>='SO')\n AND (coitem_cohead_id=<? value("head_id") ?>)\n<? endif ?>\n)\nGROUP BY coitem_qty_uom_id, coitem_linenumber, coitem_id, coitem_memo, item_number, uom_name, shipuom,\n coitem_custpn, itemalias_usedescrip, itemalias_descrip1, itemalias_descrip2,\n item_descrip1, item_descrip2, coitem_qtyord, coitem_qty_invuomratio, coitem_qtyshipped,\n coitem_qtyreturned, coitem_status, coitem_cohead_id,\n itemsite_id, itemsite_qtyonhand, itemsite_warehous_id, item_id\n<? if exists("MultiWhs") ?>\nUNION\nSELECT 2 AS groupby,\n toitem_linenumber AS linenumber,\n toitem_notes AS memo,\n item_number,\n formatitemsitebarcode(itemsite_id) AS item_barcode,\n formattoitembarcode(toitem_id) AS orderitem_barcode,\n uom_name,\n itemsellinguom(item_id) AS shipuom,\n item_descrip1,\n item_descrip2,\n\n formatQty(toitem_qty_ordered) AS ordered,\n ( SELECT formatQty(COALESCE(SUM(shipitem_qty), 0))\n FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id)\n WHERE ((shipitem_orderitem_id=toitem_id) AND (shiphead_order_type='TO')) ) AS atShipping,\n\n toitem_status AS f_status\n FROM itemsite, item, toitem, tohead, uom\n WHERE ((toitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (item_id=itemsite_item_id)\n AND (toitem_tohead_id=tohead_id)\n AND (toitem_status <> 'X')\n AND (tohead_src_warehous_id=itemsite_warehous_id)\n<? if exists("shiphead_id") ?>\n AND (toitem_tohead_id IN (SELECT shiphead_order_id FROM shiphead\n\t\t\t WHERE ((shiphead_id=<? value("shiphead_id") ?>)\n\t\t\t AND (shiphead_order_type='TO'))))\n<? endif ?>\n<? if exists("head_id") ?>\n AND (<? value("head_type") ?>='TO')\n AND (toitem_tohead_id=<? value("head_id") ?>)\n<? endif ?>\n)\n<? endif ?>\nORDER BY linenumber;\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n lotdetail\n SELECT * FROM \n(\n SELECT\n shiphead_number,\n (cohead_number || '-' || coitem_linenumber) AS ordernumber,\n item_number,\n formatlotserialnumber(invdetail_ls_id) AS invdetail_lotserial,\n SUM(invdetail_qty) * -1 AS lotqty,\n SUM(invhist_invqty) as totalshipmentqty,\n invhist_transtype,\n formatdate(MAX(invhist_transdate)) AS invhistdate,\n formatdate(MAX(shipitem_transdate)) AS shiptransdate\n FROM shiphead\n JOIN shipitem ON (shipitem_shiphead_id=shiphead_id)\n JOIN invhist ON (invhist_id=shipitem_invhist_id)\n JOIN invdetail ON (invdetail_invhist_id=invhist_id)\n JOIN cohead ON (cohead_id=shiphead_order_id)\n JOIN coitem ON (coitem_id=shipitem_orderitem_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n WHERE ( (shiphead_id = <? value("shiphead_id") ?> )\n AND ('SO'=shiphead_order_type) )\n GROUP BY shiphead_number,cohead_number,item_number,invdetail_ls_id,\n coitem_linenumber,invhist_transtype\n<? if exists("MultiWhs") ?>\nUNION\n SELECT\n shiphead_number,\n (tohead_number || '-' || toitem_linenumber) AS ordernumber,\n item_number,\n formatlotserialnumber(invdetail_ls_id) AS invdetail_lotserial,\n SUM(invdetail_qty) * -1 AS lotqty,\n SUM(invhist_invqty) as totalshipmentqty,\n invhist_transtype,\n formatdate(MAX(invhist_transdate)) AS invhistdate,\n formatdate(MAX(shipitem_transdate)) AS shiptransdate\n FROM shiphead\n JOIN shipitem ON (shipitem_shiphead_id=shiphead_id)\n JOIN invhist ON (invhist_id=shipitem_invhist_id)\n JOIN invdetail ON (invdetail_invhist_id=invhist_id)\n JOIN tohead ON (tohead_id=shiphead_order_id)\n JOIN toitem ON (toitem_id=shipitem_orderitem_id)\n JOIN item ON (item_id=toitem_item_id)\n WHERE ( (shiphead_id = <? value("shiphead_id") ?> )\n AND ('TO'=shiphead_order_type) )\n GROUP BY shiphead_number,tohead_number,item_number,invdetail_ls_id,\n toitem_linenumber,invhist_transtype\n<? endif ?>\n) data\nORDER BY ordernumber;\n \n \n 451\n \n \n 375\n 0\n 425\n 100\n \n stretch\n \n logo\n image_data\n \n \n \n \n 375\n 180\n 307\n 25\n \n 3of9\n 20\n \n 0.01\n \n head\n cohead_custponumber\n \n \n \n \n 170\n 150\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n 375\n 120\n 231\n 25\n \n 128\n 10\n \n 0.01\n \n head\n order_barcode\n \n \n \n \n \n 120\n 360\n 250\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n cust_contact\n \n \n \n \n \n 170\n 180\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n 480\n 260\n 300\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n shiptoname\n \n \n \n \n 375\n 150\n 177\n 25\n \n 3of9\n 10\n \n 0.01\n \n head\n cust_number\n \n \n \n \n 480\n 280\n 300\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n shipping_address\n \n \n \n \n \n \n 10\n 120\n 150\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n ordertype\n \n \n \n \n 170\n 207\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n orderdate\n \n \n \n \n \n 170\n 227\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n scheddate\n scheddate\n \n \n \n \n 0\n 390\n 797\n 390\n 0\n \n \n \n \n \n 0\n 430\n 797\n 430\n 0\n \n \n \n \n 480\n 227\n 300\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n shipvia\n \n \n \n \n 90\n 280\n 300\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n billing_address\n \n \n \n \n \n 90\n 260\n 300\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n billtoname\n \n \n \n \n \n 457\n 360\n 320\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n terms_descrip\n \n \n \n \n 170\n 90\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n shiphead_number\n \n \n \n \n \n \n 170\n 120\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n ordernumber\n \n \n \n \n \n \n
\n detail\n \n detail\n groupby\n \n 43\n \n \n 50\n 5\n 625\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n head\n shipcomments\n \n \n \n \n \n lineitem\n linenumber\n \n 21\n \n 0\n 0\n 837\n 0\n 0\n \n \n \n \n \n detail\n \n 81\n \n \n 227\n 0\n 40\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n 610\n 0\n 50\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n f_status\n \n \n \n \n \n \n 280\n 0\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n ordered\n \n \n \n \n 20\n 0\n 200\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 90\n 50\n 560\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n memo\n \n \n \n \n 507\n 30\n 280\n 30\n \n 128\n 15\n \n 0.01\n \n detail\n item_barcode\n \n \n \n \n 20\n 35\n 300\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 20\n 20\n 300\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n item_descrip1\n \n \n \n 470\n 20\n 520\n 20\n 1\n \n \n \n 370\n 0\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n atShipping\n \n \n \n
\n
\n lotdetail\n \n lotdetail\n ordernumber\n \n 48\n \n \n \n 0\n 40\n 797\n 40\n 0\n \n \n \n \n \n 13\n \n 0\n 5\n 797\n 5\n 0\n \n \n \n \n \n lotdetail\n \n 23\n \n \n 232\n 5\n 195\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n lotdetail\n invdetail_lotserial\n \n \n \n \n 30\n 5\n 195\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n lotdetail\n item_number\n \n \n \n \n 457\n 5\n 60\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n lotdetail\n lotqty\n \n \n \n
\n \n 57\n \n \n \n 90\n 8\n 95\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 735\n 8\n 45\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 455\n 8\n 80\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n ordernumber\n \n \n \n \n 365\n 8\n 80\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n ordertype\n \n \n \n \n 57\n \n \n \n 540\n 40\n 790\n 40\n 0\n \n \n 160\n 40\n 407\n 40\n 0\n \n \n
\n Hybrid Packing List - use the shiphead_id if it is passed but use the order id and type if they're passed but not shiphead_id - Shows Lot/Serial 0 2013-07-26 16:14:22.271087 91 PendingWOMaterialAvailability \N \n\n Pending W/O Material Availability\n PendingWOMaterialAvailability\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number, item_descrip1, item_descrip2,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse\n FROM item\nWHERE (item_id=<? value("item_id") ?>);\n \n \n detail\n pendingAvailability\n detail\n \n \n 234\n \n \n 140\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n 140\n 160\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n \n \n \n 140\n 100\n 198\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n 140\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 41\n \n \n 290\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 405\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pendalloc\n \n qty\n \n \n 6\n 32\n 745\n 32\n 0\n \n \n \n 110\n -1\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 575\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qoh\n \n qty\n \n \n \n 110\n 15\n 615\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip\n \n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n totalalloc\n \n qty\n \n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n totalavail\n \n qty\n \n \n \n 60\n -1\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bomitem_seqnumber\n \n \n \n \n 15\n -1\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bomdata_bomwork_level\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 147 POLineItemsByDate \N \n\n P/O Line Items By Date\n POLineItemsByDate\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername,\n <? if exists("openItems") ?>\n text('Open Items')\n <? elseif exists("closedItems") ?>\n text('Closed Items')\n <? else ?>\n text('All Items')\n <? endif ?>\n as f_whichitems,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate\n\n \n \n detail\n SELECT CASE WHEN (itemsite_id IS NULL) THEN ( SELECT warehous_code\n FROM whsinfo\n WHERE (pohead_warehous_id=warehous_id) )\n ELSE ( SELECT warehous_code\n FROM whsinfo\n WHERE (itemsite_warehous_id=warehous_id) )\n END AS warehousecode,\n pohead_number as f_ponumber,\n poitem_linenumber as f_linenumber,\n vend_name,\n formatDate(poitem_duedate) as f_duedate,\n COALESCE(item_number, (text('NonInv - ') || poitem_vend_item_number)) AS itemnumber,\n COALESCE(uom_name, poitem_vend_uom) AS itemuom,\n formatQty(poitem_qty_ordered) as f_ordered,\n formatQty(poitem_qty_received) as f_received,\n formatQty(poitem_qty_returned) as f_returned\n FROM pohead, vendinfo,\n poitem LEFT OUTER JOIN\n (itemsite JOIN item\n ON (itemsite_item_id=item_id) JOIN uom ON (item_inv_uom_id=uom_id))\n ON (poitem_itemsite_id=itemsite_id) \n WHERE ((poitem_pohead_id=pohead_id)\n AND (pohead_vend_id=vend_id)\n AND (poitem_duedate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("warehous_id") ?>\n AND ( ( (itemsite_id IS NULL) AND (pohead_warehous_id=<? value("warehous_id") ?>) ) OR\n ( (itemsite_id IS NOT NULL) AND (itemsite_warehous_id=<? value("warehous_id") ?>) ) )\n<? endif ?>\n<? if exists("agentUsername") ?>\n AND (pohead_agent_username=<? value("agentUsername") ?>)\n<? endif ?>\n<? if exists("openItems") ?>\n AND (poitem_status='O')\n<? elseif exists("closedItems") ?>\n AND (poitem_status='C')\n<? endif ?>\n)\nORDER BY poitem_duedate;\n \n \n 237\n \n \n 135\n 75\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n \n \n \n \n \n 550\n 95\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 475\n 130\n 165\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_whichitems\n \n \n \n \n \n \n 135\n 95\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 550\n 75\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n 7\n \n \n 37\n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 37\n \n 5\n 30\n 745\n 30\n 0\n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_returned\n \n \n \n \n 525\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemuom\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 370\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemnumber\n \n \n \n \n 45\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ponumber\n \n \n \n \n 580\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_received\n \n \n \n \n 5\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehousecode\n \n \n \n \n 285\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 130\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 5\n 15\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_linenumber\n \n \n \n
\n \n 17\n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 148 POLineItemsByItem \N \n\n P/O Line Items By Item\n POLineItemsByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number, item_descrip1, item_descrip2, uom_name,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername,\n <? if exists("openItems") ?>\n text('Open Items')\n <? elseif exists("closedItems") ?>\n text('Closed Items')\n <? else ?>\n text('All Items')\n <? endif ?>\n AS f_whichitems\n FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n SELECT warehous_code, pohead_number as f_ponumber, vend_name,\n formatDate(poitem_duedate) as f_duedate,\n poitem_vend_uom as uom_name, \n formatQty(poitem_qty_ordered) as f_ordered,\n formatQty(poitem_qty_received) as f_received,\n formatQty(poitem_qty_returned) as f_returned \n FROM pohead, poitem, vendinfo, itemsite, whsinfo\n WHERE ((poitem_pohead_id=pohead_id)\n AND (pohead_vend_id=vend_id)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("agentUsername") ?>\n AND (pohead_agent_username=<? value("agentUsername") ?>)\n<? endif ?>\n<? if exists("openItems") ?>\n AND (poitem_status='O')\n<? elseif exists("closedItems") ?>\n AND (poitem_status='C')\n<? endif ?>\n AND (poitem_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=<? value("item_id") ?>)\n) \nORDER BY poitem_duedate;\n \n \n 221\n \n \n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 325\n 75\n 80\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n 475\n 130\n 165\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_whichitems\n \n \n \n \n 110\n 112\n 250\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n 535\n 95\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 110\n 75\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n 110\n 95\n 250\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 535\n 75\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_received\n \n \n \n \n 440\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 5\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_returned\n \n \n \n \n 355\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 493\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 135\n 0\n 215\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 45\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ponumber\n \n \n \n
\n \n 16\n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 365 PickingListSOClosedLines \N \n\n Picking List - SO\n PickingListSOClosedLines\n Shows Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo"\n\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 25\n 25\n 25\n 25\n \n head\n SELECT cust_number,\n formatsobarcode(cohead_id) AS order_barcode,\n\n formataddr(cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address, \n\n formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n\n trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n cohead_billtoname,\n cohead_billtoaddress1,\n cohead_billtoaddress2,\n cohead_billtoaddress3,\n (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode) AS billtocitystatezip,\n cntct_phone AS cust_phone,\n cohead_shiptoname,\n cohead_shiptoaddress1,\n cohead_shiptoaddress2,\n cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n cohead_number,\n cohead_shipvia,\n cohead_shiptophone,\n cohead_custponumber,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_shipcomments, \n terms_descrip\n FROM cohead\n JOIN custinfo ON (cohead_cust_id=cust_id)\n JOIN terms ON (cohead_terms_id=terms_id)\n LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n WHERE (cohead_id=<? value("sohead_id") ?>);\n \n \n \n scheddate\n SELECT formatDate(MIN(coitem_scheddate)) AS scheddate\n FROM coitem\n WHERE ((coitem_status <> 'X') AND (coitem_cohead_id=<? value("sohead_id") ?>));\n \n \n detail\n SELECT 1 AS groupby,\n coitem_linenumber AS sortline, coitem_subnumber AS sortsubline,\n formatsolinenumber(coitem_id) AS linenumber,\n coitem_memo,\n item_number,\n formatitemsitebarcode(itemsite_id) AS item_barcode,\n-- In 2.3 replaced the next line:\n-- uom_name,\n-- with:\n (select uom_name from uom where uom_id = coitem_qty_uom_id) AS uom_name,\n itemsellinguom(item_id) AS shipuom,\n item_descrip1,\n item_descrip2,\n formatQty(coitem_qtyord) AS ordered,\n CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0) THEN formatQty(coitem_qtyshipped - coitem_qtyreturned)\n ELSE NULL\n END AS shipped,\n CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0) THEN formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned))\n ELSE NULL\n END AS balance,\n CASE WHEN (qtyAtShipping('SO', coitem_id) > 0.0) THEN formatQty(qtyAtShipping('SO', coitem_id))\n ELSE NULL\n END AS atShipping,\n CASE WHEN (coitem_status='O' AND (SELECT cust_creditstatus FROM custinfo,cohead WHERE coitem_cohead_id=cohead_id AND cust_id=cohead_cust_id)='H') THEN 'H'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=CASE WHEN(coitem_subnumber > 0) THEN (coitem_linenumber * 1000) + coitem_subnumber ELSE coitem_linenumber END)\n AND (cohead_id=coitem_cohead_id))) >= coitem_qtyord)) THEN 'I'\n WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n FROM cohead, invchead, invcitem\n WHERE ((invchead_ordernumber=cohead_number)\n AND (invcitem_invchead_id=invchead_id)\n AND (invcitem_item_id=item_id)\n AND (invcitem_warehous_id=itemsite_warehous_id)\n AND (invcitem_linenumber=CASE WHEN(coitem_subnumber > 0) THEN (coitem_linenumber * 1000) + coitem_subnumber ELSE coitem_linenumber END)\n AND (cohead_id=coitem_cohead_id))) > 0)) THEN 'P'\n WHEN (coitem_status='O' AND (itemsite_qtyonhand - qtyAllocated(itemsite_id, CURRENT_DATE)\n + qtyOrdered(itemsite_id, CURRENT_DATE))\n >= (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) THEN 'R'\n ELSE coitem_status\n END AS f_status\n FROM itemsite, item, uom, coitem\n WHERE ( (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (item_type != 'K')\n AND (coitem_status <> 'X')\n AND (coitem_cohead_id=<? value("sohead_id") ?>)\n)\n--2.3 add coitem_qty_uom_id, to the GROUP BY clause\nGROUP BY coitem_qty_uom_id,\n linenumber, coitem_linenumber, coitem_subnumber, coitem_id, coitem_memo, item_number, uom_name, shipuom,\n item_descrip1, item_descrip2, coitem_qtyord, coitem_qty_invuomratio, coitem_qtyshipped,\n coitem_qtyreturned, coitem_status, coitem_cohead_id,\n itemsite_id, itemsite_qtyonhand, itemsite_warehous_id, item_id\nORDER BY sortline, sortsubline;\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n 477\n \n \n 375\n 0\n 425\n 85\n \n stretch\n \n logo\n image_data\n \n \n \n \n 465\n 280\n 305\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n shipping_address\n \n \n \n \n 120\n 400\n 252\n 25\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n cust_contact\n \n \n \n 25\n 425\n 822\n 425\n 0\n \n \n \n 170\n 155\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n \n 75\n 280\n 295\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n billing_address\n \n \n \n \n \n \n 375\n 95\n 232\n 25\n \n 128\n 10\n \n 0.01\n \n head\n order_barcode\n \n \n \n \n \n \n 465\n 260\n 305\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_shiptoname\n \n \n \n \n \n \n 432\n 215\n 331\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_shipvia\n \n \n \n \n 170\n 125\n 170\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n \n 75\n 260\n 305\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_billtoname\n \n \n \n \n 170\n 95\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n 175\n 195\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n orderdate\n \n \n \n \n \n \n \n 25\n 465\n 822\n 465\n 0\n \n \n \n 175\n 215\n 100\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n scheddate\n scheddate\n \n \n \n \n 375\n 160\n 307\n 25\n \n 3of9\n 20\n \n 0.01\n \n head\n cohead_custponumber\n \n \n \n \n \n 467\n 400\n 320\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n terms_descrip\n \n \n \n \n \n \n \n 375\n 130\n 177\n 25\n \n 3of9\n 10\n \n 0.01\n \n head\n cust_number\n \n \n \n \n \n \n
\n detail\n \n detail\n groupby\n \n 73\n \n \n 50\n 5\n 625\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shipcomments\n \n \n \n \n \n lineitem\n linenumber\n \n 28\n \n 5\n 5\n 842\n 5\n 0\n \n \n \n \n \n detail\n \n 156\n \n \n 415\n 80\n 500\n 80\n 0\n \n \n 305\n 110\n 395\n 110\n 0\n \n \n 80\n 80\n 170\n 80\n 0\n \n \n 745\n 15\n 795\n 15\n 1\n \n \n \n 25\n 0\n 200\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 100\n 120\n 700\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n detail\n coitem_memo\n \n \n \n 415\n 110\n 500\n 110\n 0\n \n \n 305\n 80\n 395\n 80\n 0\n \n \n \n 630\n 95\n 85\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n f_status\n \n \n \n \n 365\n 30\n 467\n 35\n \n 128\n 15\n \n 0.01\n \n detail\n item_barcode\n \n \n \n \n \n 190\n 80\n 280\n 80\n 0\n \n \n \n 530\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n balance\n \n \n \n 80\n 110\n 170\n 110\n 0\n \n \n 632\n 80\n 720\n 80\n 0\n \n \n \n \n 25\n 40\n 295\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 320\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n ordered\n \n \n \n \n 227\n 0\n 85\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n 425\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n shipped\n \n \n \n 190\n 110\n 280\n 110\n 0\n \n \n \n 25\n 20\n 295\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 635\n 0\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n atshipping\n \n \n \n \n
\n \n 57\n \n \n \n \n 735\n 5\n 45\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 5\n 95\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 455\n 5\n 80\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n 113\n \n \n 186\n 90\n 360\n 90\n 0\n \n \n \n 185\n 25\n 362\n 25\n 0\n \n \n
\n Shows Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo"\n 0 2013-07-26 16:14:22.271087 141 PlannerCodeMasterList \N \n\n Planner Code Master List\n PlannerCodeMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT plancode_id,\n plancode_code, \n plancode_name\n FROM plancode\nORDER BY plancode_code;\n \n \n 76\n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n plancode_name\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n plancode_code\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 258 PricingScheduleAssignments \N \n\n Pricing Schedule Assignments\n PricingScheduleAssignments\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT ipsass_id,\n CASE WHEN (ipsass_shipto_id != -1) THEN (SELECT shipto_num FROM shiptoinfo WHERE (shipto_id=ipsass_shipto_id))\n WHEN (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) THEN ipsass_shipto_pattern\n ELSE TEXT('ANY')\n END AS shiptonum,\n CASE WHEN (ipsass_shipto_id != -1) THEN (SELECT cust_number FROM shiptoinfo, custinfo WHERE ((shipto_cust_id=cust_id) AND (shipto_id=ipsass_shipto_id)))\n WHEN (ipsass_cust_id=-1) THEN TEXT('Any')\n ELSE (SELECT cust_number FROM custinfo WHERE (cust_id=ipsass_cust_id))\n END AS custnumber,\n CASE WHEN (ipsass_shipto_id != -1) THEN (SELECT cust_name FROM shiptoinfo, custinfo WHERE ((shipto_cust_id=cust_id) AND (shipto_id=ipsass_shipto_id)))\n WHEN (ipsass_cust_id=-1) THEN ''\n ELSE (SELECT cust_name FROM custinfo WHERE (cust_id=ipsass_cust_id))\n END AS custname,\n CASE WHEN (ipsass_cust_id != -1) THEN TEXT('N/A')\n WHEN (ipsass_shipto_id != -1) THEN TEXT('N/A')\n WHEN (COALESCE(LENGTH(ipsass_shipto_pattern),0) > 0) THEN TEXT('N/A')\n WHEN (ipsass_custtype_id=-1) THEN ipsass_custtype_pattern\n ELSE (SELECT custtype_code FROM custtype WHERE (custtype_id=ipsass_custtype_id))\n END AS custtype,\n ipshead_name\nFROM ipsass, ipshead\nWHERE (ipshead_id=ipsass_ipshead_id)\nORDER BY custname, custtype;\n\n \n \n 78\n \n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 465\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custtype\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shiptonum\n \n \n \n \n 240\n 0\n 205\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custname\n \n \n \n \n 115\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custnumber\n \n \n \n \n 580\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ipshead_name\n \n \n \n
\n \n 18\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 44 ProductCategoriesMasterList \N \n\n Product Categories Master List\n ProductCategoriesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select prodcat_code, prodcat_descrip\n from prodcat\norder by prodcat_code;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prodcat_code\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prodcat_descrip\n \n \n \n
\n \n 16\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 306 ProjectTaskList \N \n\n ProjectTaskList\n ProjectTaskList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT prjtask_number, prjtask_name, prjtask_descrip\n FROM prjtask\n WHERE (prjtask_prj_id=<?value("prj_id")?>)\n ORDER BY prjtask_number;\n \n \n head\n SELECT (prj_number||'-'||prj_name) AS project\n FROM prj\n WHERE (prj_id=<? value("prj_id") ?>);\n \n \n 102\n \n \n \n \n 120\n 50\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n project\n \n \n \n \n \n 5\n 95\n 745\n 95\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 10\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prjtask_number\n \n \n \n \n 285\n 0\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prjtask_descrip\n \n \n \n \n 70\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prjtask_name\n \n \n \n
\n \n 18\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 259 PurchaseOrderTypes \N \n\n Purchase Order Types\n PurchaseOrderTypes\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT potype_id,\n potype_name,\n potype_descrip\n FROM potype\nORDER BY potype_name;\n \n \n 77\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 7\n \n \n 22\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n potype_descrip\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n potype_name\n \n \n \n
\n \n 17\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 156 PartiallyShippedOrders \N \n\n Partially Shipped Orders\n PartiallyShippedOrders\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT CASE WHEN (cohead_holdtype IN ('P', 'C', 'R')) THEN -1\n ELSE cohead_id\n END AS _coheadid, cohead_id,\n cohead_holdtype, cohead_number, cust_name,\n CASE WHEN (cohead_holdtype='N') THEN <? value("none") ?>\n WHEN (cohead_holdtype='C') THEN <? value("credit") ?>\n WHEN (cohead_holdtype='S') THEN <? value("ship") ?>\n WHEN (cohead_holdtype='P') THEN <? value("pack") ?>\n WHEN (cohead_holdtype='R') THEN <? value("return") ?>\n ELSE <? value("Other") ?>\n END AS f_holdtype,\n formatDate(cohead_orderdate) AS f_orderdate,\n formatDate(MIN(coitem_scheddate)) AS f_scheddate,\n formatDate(cohead_packdate) AS f_packdate,\n <? if exists("showPrices") ?>\n formatExtPrice( SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio) ) )\n <? else ?>\n text('')\n <? endif ?>\n AS f_extprice,\n SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio) ) AS backlog,\n MIN(coitem_scheddate) AS scheddate,\n COALESCE(MIN(shipitem_id), 0) AS shipped\n FROM cohead, itemsite, item, custinfo,\n coitem LEFT OUTER JOIN shipitem ON (shipitem_orderitem_id=coitem_id) \n WHERE ( (coitem_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (coitem_status='O')\n AND (cohead_id IN ( SELECT DISTINCT coitem_cohead_id\n FROM coitem\n WHERE (coitem_qtyshipped > 0) ))\n AND (coitem_qtyshipped < coitem_qtyord)\n AND (coitem_scheddate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nGROUP BY cohead_id, cohead_number, cust_name, cohead_holdtype,\n cohead_orderdate, cohead_packdate\nORDER BY scheddate, cohead_number;\n \n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT (warehous_code||'-'||warehous_descrip)\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("showPrices") ?>\n text('$ Amount')\n <? else ?>\n text('')\n <? endif ?>\n AS f_amount,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate;\n \n \n 205\n \n \n \n 484\n 75\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 113\n 75\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n 484\n 95\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n 5\n 200\n 745\n 200\n 2\n \n \n \n \n \n \n \n 665\n 185\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_amount\n \n \n \n \n \n \n 8\n \n \n 28\n \n \n \n \n \n \n 665\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_amount\n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_packdate\n \n \n \n \n 409\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orderdate\n \n \n \n \n 75\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_extprice\n \n \n \n \n 325\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_holdtype\n \n \n \n \n 495\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scheddate\n \n \n \n \n 5\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n
\n \n 19\n \n \n 80\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 715\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 69 PricesByCustomerType \N \n\n Prices By Customer Type\n PricesByCustomerType\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT (custtype_code || '-' || custtype_descrip) as custtype,\n <? if exists("showExpired") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showexpired,\n <? if exists("showFuture") ?>\n text('Yes')\n <? else ?>\n text('No')\n <? endif ?>\n AS f_showfuture,\n <? if exists("showCosts") ?>\n <? if exists("actualCosts") ?>\n text('Show Costs and Margins using Actual Costs')\n <? else ?>\n text('Show Costs and Margins using Standard Costs')\n <? endif ?>\n AS f_showcosts,\n text('Cost') AS f_costlabel,\n text('Margin') AS f_marginlabel\n <? else ?>\n text('') AS f_showcosts,\n text('') AS f_costlabel,\n text('') AS f_marginlabel\n <? endif ?>\n FROM custtype\n WHERE (custtype_id=<? value("custtype_id") ?>);\n\n \n \n detail\n SELECT itemid, sourcetype, schedulename, type, itemnumber,\n item_descrip1, item_descrip2,\n CASE WHEN (qtybreak = -1) THEN 'N/A'\n ELSE formatQty(qtybreak)\n END AS f_qtybreak,\n price, formatSalesPrice(price) AS f_price,\n <? if exists("showCosts") ?>\n cost AS cost,\n formatCost(cost) AS f_cost,\n CASE WHEN ((price = 0) OR (cost = 0)) THEN 'N/A'\n ELSE formatScrap((price - cost) / price)\n END AS f_margin\n <? else ?>\n 0 AS cost,\n '' AS f_cost,\n '' AS f_margin\n <? endif ?>\nFROM (\n SELECT ipsprice_id AS itemid, 2 AS sourcetype,\n ipshead_name AS schedulename, 'Cust. Type' AS type,\n item_number AS itemnumber, item_descrip1, item_descrip2,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(ipsprice_item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(ipsprice_item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM ipsass, ipshead, ipsprice, item \n WHERE ((ipsass_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n AND (ipsass_custtype_id=<? value("custtype_id") ?>)\n<? if not exists("showExpired") ?>\n AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT ipsprice_id AS itemid, 3 AS sourcetype,\n ipshead_name AS schedulename, ('Sale' || '-' || sale_name) AS type,\n item_number AS itemnumber,\n item_descrip1, item_descrip2,\n ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n <? if exists("actualCosts") ?>\n (actcost(ipsprice_item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(ipsprice_item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM sale, ipshead, ipsprice, item\n WHERE ( (sale_ipshead_id=ipshead_id)\n AND (ipsprice_ipshead_id=ipshead_id)\n AND (ipsprice_item_id=item_id)\n<? if not exists("showExpired") ?>\n AND (sale_enddate > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showFuture") ?>\n AND (sale_startdate <= CURRENT_DATE)\n<? endif ?>\n )\n\n UNION\n SELECT item_id AS itemid, 0 AS sourcetype,\n '' AS schedulename, 'List Price' AS type,\n item_number AS itemnumber, item_descrip1, item_descrip2,\n -1 AS qtybreak, item_listprice AS price,\n <? if exists("actualCosts") ?>\n (actcost(item_id) * iteminvpricerat(item_id))\n <? else ?>\n (stdcost(item_id) * iteminvpricerat(item_id))\n <? endif ?>\n AS cost\n FROM item\n WHERE ( (item_sold)\n AND (item_active)\n AND (NOT item_exclusive) )\n) AS data\nORDER BY itemnumber, price;\n \n \n 236\n \n \n \n \n \n 585\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_costlabel\n \n \n \n \n 665\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_marginlabel\n \n \n \n \n 130\n 80\n 500\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n custtype\n \n \n \n \n \n 565\n 120\n 113\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showfuture\n \n \n \n \n \n \n 565\n 100\n 113\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showexpired\n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n 405\n 140\n 335\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_showcosts\n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n \n 665\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_marginlabel\n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n 585\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_costlabel\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtybreak\n \n \n \n \n 10\n 15\n 240\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 195\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n schedulename\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemnumber\n \n \n \n \n 505\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_price\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_margin\n \n \n \n \n 10\n 30\n 240\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 585\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cost\n \n \n \n \n 320\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n type\n \n \n \n
\n \n 16\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 203 PurchaseReqsByPlannerCode \N \n\n Purchase Requests By Planner Code\n PurchaseReqsByPlannerCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("plancode_id") ?>\n ( SELECT (plancode_code||'-'||plancode_name)\n FROM plancode\n WHERE plancode_id=<? value("plancode_id") ?>)\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plancode,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate;\n \n \n detail\n SELECT item_number,\n (item_descrip1 || ' ' || item_descrip2) as item_descrip,\n pr_status,\n CASE WHEN (pr_order_type='W') THEN ('W/O ' || ( SELECT formatWoNumber(womatl_wo_id)\n FROM womatl\n WHERE (womatl_id=pr_order_id) ) )\n WHEN (pr_order_type='S') THEN ('S/O ' || (SELECT formatSoNumber(pr_order_id)))\n WHEN (pr_order_type='F') THEN ('Planned Order')\n WHEN (pr_order_type='M') THEN 'Manual'\n ELSE 'Other'\n END AS f_type,\n formatDate(pr_duedate) AS f_duedate,\n formatQty(pr_qtyreq) AS f_qtyreq\n FROM pr, itemsite, item\n WHERE ((pr_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (pr_duedate BETWEEN <? value("startDate") ?> and <? value("endDate") ?>)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ <? value("plancode_pattern") ?>) ) )\n<? endif ?>\n)\nORDER BY pr_duedate;\n \n \n 171\n \n \n \n \n 555\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 555\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n 5\n 165\n 745\n 165\n 2\n \n \n \n \n \n \n \n \n 135\n 65\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plancode\n \n \n \n \n \n 135\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n 6\n \n \n 26\n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyreq\n \n \n \n \n 10\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 135\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip\n \n \n \n \n 340\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pr_status\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 425\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n
\n \n 16\n \n \n \n 105\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 11 QOHByLocation \N \n\n Quantities on Hand by Location\n QOHByLocation\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT (location_name||'-'||firstLine(location_descrip)) AS f_location,\n formatBoolYN(location_netable) AS f_netable,\n formatBoolYN(location_restrict) AS f_restricted,\n warehous_code,\n formatDate(<? value("asOf") ?>) AS asofdate\n FROM location, whsinfo\n WHERE ((location_warehous_id=warehous_id)\n AND (location_id=<? value("location_id") ?>) );\n \n \n detail\n qoh\n detail\n \n \n 234\n \n \n 130\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehous_code\n \n \n \n \n \n \n \n 435\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_restricted\n \n \n \n \n \n \n \n \n 130\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_location\n \n \n \n 5\n 228\n 745\n 228\n 2\n \n \n \n \n \n 435\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_netable\n \n \n \n \n \n \n 130\n 160\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n asofdate\n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 320\n 0\n 230\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_lotserial\n \n \n \n \n 85\n 0\n 220\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 565\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 85\n 15\n 526\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_descrip\n \n \n \n \n 10\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qoh\n \n qty\n \n \n \n 665\n 14\n 80\n 20\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n reservedqty\n \n qty\n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 172 Quote \N \n\n Quote\n Quote\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT quhead_number,\n quhead_shipvia,\n formatDate(quhead_quotedate) as f_orderdate,\n formatDate(quhead_packdate) as f_packdate,\n salesrep_name,\n formatScrap(quhead_commission) as f_commission,\n (terms_code||' - '||terms_descrip) as f_terms,\n cust_number,\n quhead_billtoname,\n formatAddr(quhead_billtoaddress1,\n quhead_billtoaddress2,\n quhead_billtoaddress3,\n (quhead_billtocity || ', ' || quhead_billtostate || ' ' || quhead_billtozip),\n quhead_billtocountry) AS f_billtoaddress,\n CASE WHEN(quhead_shipto_id=-1) THEN text('')\n ELSE (SELECT text(shipto_num) FROM shiptoinfo WHERE (shipto_id=quhead_shipto_id))\n END AS f_shiptonum,\n quhead_shiptoname,\n formatAddr(quhead_shiptoaddress1,\n quhead_shiptoaddress2,\n quhead_shiptoaddress3,\n (quhead_shiptocity || ', ' || quhead_shiptostate || ' ' || quhead_shiptozipcode),\n quhead_shiptocountry) AS f_shiptoaddress,\n quhead_custponumber,\n quhead_fob, saletype_code\nFROM quhead\n LEFT OUTER JOIN custinfo ON (quhead_cust_id = cust_id)\n LEFT OUTER JOIN terms ON (quhead_terms_id = terms_id)\n LEFT OUTER JOIN salesrep ON (quhead_salesrep_id = salesrep_id)\n LEFT OUTER JOIN saletype ON (quhead_saletype_id = saletype_id)\nWHERE (quhead_id = <? value("quhead_id") ?>)\n\n \n \n notes\n SELECT quhead_ordercomments,\n quhead_shipcomments\n FROM quhead\n WHERE (quhead_id=<? value("quhead_id") ?>);\n \n \n items\n SELECT quitem_id,\n quitem_linenumber,\n quitem_custpn, \n item_number,\n item_descrip1,\n --The following 2 lines are new in 2.3\n (select uom_name from uom where uom_id = quitem_qty_uom_id) AS uom_ordered,\n (select uom_name from uom where uom_id = quitem_price_uom_id) AS uom_pricing,\n warehous_code,\n formatQty(quitem_qtyord) as f_ordered,\n formatPrice(quitem_price) as f_price,\n --The following line was changed in 2.3 from:\n --formatExtprice(quitem_qtyord * (quitem_price / iteminvpricerat(item_id))) as f_extprice\n --To:\n formatExtprice((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio)) as f_extprice,\n quitem_memo,\n char_name, \n charass_value \nFROM quitem\n JOIN item ON (item_id=quitem_item_id)\n LEFT OUTER JOIN (itemsite JOIN whsinfo ON (itemsite_warehous_id=warehous_id)) ON (quitem_itemsite_id=itemsite_id)\n LEFT OUTER JOIN charass ON ((charass_target_id = quitem_id) \n AND (charass_target_type = 'QI'))\n LEFT OUTER JOIN char ON (charass_char_id = char_id)\nWHERE (quitem_quhead_id=<? value("quhead_id") ?>) \nORDER BY quitem_linenumber;\n \n \n totals\n SELECT 1 as one,\n formatExtPrice(subtotal) AS f_subtotal,\n formatExtPrice(tax) AS f_tax,\n formatExtPrice(quhead_freight) AS f_freight,\n formatExtPrice(quhead_misc) AS f_misc,\n formatExtPrice(subtotal + tax + quhead_freight + quhead_misc) AS f_total\n FROM quhead,\n (SELECT SUM(ROUND((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio),2)) AS subtotal\n FROM quitem\n WHERE (quitem_quhead_id=<? value("quhead_id") ?>) ) AS subtot,\n (SELECT COALESCE(SUM(tax),0.0) AS tax \n FROM (\n SELECT ROUND(SUM(taxdetail_tax),2) AS tax \n FROM tax \n JOIN calculateTaxDetailSummary('Q', <? value("quhead_id") ?>, 'T') ON (taxdetail_tax_id=tax_id)\n\tGROUP BY tax_id) AS data) AS taxtot\n \n\n\n WHERE (quhead_id=<? value("quhead_id") ?>);\n\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n currency_info\n --this was added in version 2.3\nSELECT curr_name,\n curr_symbol,\n curr_abbr\nFROM quhead, curr_symbol\nWHERE ( (quhead_curr_id = curr_id)\n AND (quhead_id = <? value("quhead_id") ?>) );\n \n \n address\n SELECT warehous_descrip,\n formatAddr(addr_line1,\n addr_line2,\n addr_line3,\n (addr_city || ' ' || addr_state || ' ' || addr_postalcode),\n addr_country) AS warehouse_address\nFROM whsinfo, \n addr, \n quhead\nWHERE ( (addr_id = warehous_addr_id)\n AND (quhead_warehous_id = warehous_id)\n AND (quhead_id=<? value("quhead_id") ?>) );\n \n \n contact_fax_phone\n SELECT cntct_fax,\n cntct_phone\nFROM cntct, quhead, custinfo\nWHERE ( (cust_id = quhead_cust_id)\n AND (cust_cntct_id = cntct_id)\n AND (quhead_id = <? value("quhead_id") ?>) );\n\n \n \n 427\n \n \n 275\n 5\n 238\n 100\n \n stretch\n \n logo\n image_data\n \n \n \n \n 10\n 25\n 265\n 15\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n address\n warehouse_address\n \n \n \n \n 100\n 175\n 206\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_number\n \n \n \n \n 440\n 215\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n quhead_shiptoname\n \n \n \n \n \n 55\n 325\n 121\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n contact_fax_phone\n cntct_phone\n \n \n \n \n \n \n 55\n 215\n 285\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n quhead_billtoname\n \n \n \n \n 208\n 325\n 121\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n contact_fax_phone\n cntct_fax\n \n \n \n \n 440\n 190\n 206\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_shiptonum\n \n \n \n \n 100\n 130\n 206\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n quhead_number\n \n \n \n \n \n \n 440\n 145\n 103\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_packdate\n \n \n \n \n \n \n 100\n 160\n 206\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n saletype_code\n \n \n \n \n \n \n \n \n \n \n 100\n 145\n 206\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n salesrep_name\n \n \n \n \n \n \n \n \n \n 440\n 130\n 103\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_orderdate\n \n \n \n \n \n \n \n \n 505\n 350\n 206\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n quhead_shipvia\n \n \n \n \n 140\n 370\n 206\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n quhead_fob\n \n \n \n \n \n 440\n 160\n 262\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_terms\n \n \n \n \n 55\n 233\n 300\n 15\n \n 0\n \n Arial\n 10\n normal\n \n \n \n \n head\n f_billtoaddress\n \n \n \n \n 140\n 350\n 206\n 21\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n quhead_custponumber\n \n \n \n \n 10\n 5\n 257\n 19\n \n \n Arial\n 10\n bold\n \n \n \n \n address\n warehous_descrip\n \n \n \n \n 440\n 233\n 300\n 15\n \n 0\n \n Arial\n 10\n normal\n \n \n \n \n head\n f_shiptoaddress\n \n \n \n
\n lineitems\n \n lineitems\n quitem_linenumber\n \n 32\n \n \n 155\n 0\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n item_descrip1\n \n \n \n 5\n 0\n 783\n 0\n 2\n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n f_extprice\n \n \n \n \n \n 5\n 0\n 25\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n quitem_linenumber\n \n \n \n \n 385\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n warehous_code\n \n \n \n \n 640\n 0\n 37\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n uom_pricing\n \n \n \n \n 525\n 0\n 37\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n uom_ordered\n \n \n \n \n \n 45\n 0\n 103\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n item_number\n \n \n \n \n 565\n 0\n 72\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n f_price\n \n \n \n \n 440\n 0\n 77\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n f_ordered\n \n \n \n \n 33.8828\n \n \n \n 290\n 0\n 454.347\n 13.2412\n \n 10\n \n Arial\n 8\n bold\n \n \n \n \n items\n quitem_memo\n \n \n \n \n \n 289.596\n 15.5884\n 199\n 17.1\n \n 0\n \n Sans Serif\n 8\n bold\n \n \n \n \n items\n quitem_custpn\n \n \n \n \n \n \n items\n \n 18\n \n \n 385\n 0\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n charass_value\n \n \n \n \n 208\n 0\n 165\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n items\n char_name\n \n \n \n
\n
\n items\n \n items\n one\n \n 87\n \n \n \n 670\n 65\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n totals\n f_total\n \n \n \n \n \n 670\n 50\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n totals\n f_tax\n \n \n \n \n \n 670\n 35\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n totals\n f_freight\n \n \n \n \n 670\n 20\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n totals\n f_misc\n \n \n \n \n \n \n \n 204\n 10\n 206\n 18\n \n \n Arial\n 10\n bold\n \n \n \n \n currency_info\n curr_name\n \n \n \n \n 670\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n totals\n f_subtotal\n \n \n \n \n \n \n items\n \n 7\n \n
\n
\n notes\n \n \n notes\n \n 32\n \n \n \n 155\n 5\n 591\n 18\n \n 5\n \n Arial\n 10\n bold\n \n \n \n \n notes\n quhead_ordercomments\n \n \n \n
\n
\n extdescrip\n \n \n notes\n \n 32\n \n \n \n 155\n 5\n 591\n 21\n \n 5\n \n Arial\n 10\n bold\n \n \n \n \n notes\n quhead_shipcomments\n \n \n \n
\n \n 29\n \n \n 705\n 0\n 42\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 85\n 0\n 103\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 278 ReasonCodeMasterList \N \n\n Reason Code Master List\n ReasonCodeMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT rsncode_code, rsncode_descrip\n FROM rsncode\nORDER BY rsncode_code;\n \n \n 77\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 7\n \n \n 22\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n rsncode_code\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n rsncode_descrip\n \n \n \n
\n \n 17\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 181 ReceiptsReturnsByDate \N \n\n Receipts and Returns By Date\n ReceiptsReturnsByDate\n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername,\n <? if exists("showVariances") ?>\n text('Purch. Cost') AS f_purchcost,\n text('Recv. Cost') AS f_recvcost\n <? else ?>\n text('') AS f_purchcost,\n text('') AS f_recvcost\n <? endif ?>\n \n \n detail\n receivings\n detail\n \n \n 221\n \n \n \n \n 645\n 185\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_purchcost\n \n \n \n \n \n 455\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n 120\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 645\n 200\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_recvcost\n \n \n \n \n \n \n 455\n 95\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n 120\n 95\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n 6\n \n \n 41\n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n 645\n 20\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_recvcost\n \n \n \n \n 645\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_purchcost\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 215\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemnumber\n \n \n \n \n 530\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 645\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recvcost\n \n \n \n \n 215\n 15\n 400\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n venditemdescrip\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_purchcost\n \n \n \n \n 5\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 110\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 110\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recvdate\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ponumber\n \n \n \n \n 418\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sense\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 85\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 436 ReceivingLabel \N \n\n Receiving Label\n ReceivingLabel\n \n \n must be a positive number or 0. used to specify how many day back from today the report takes into account when printing recieving labels\n \n \n Item Number - Used to filter the item numbers by the first matching characters from the left of the string\n \n \n used to specify the number of repeated sets of labels required\n \n \n used with the pirnt receiving label form\n \n \n used to filter the report by a PO number\n \n CILS ALP1-9200-1\n Labels\n \n 10\n 0\n 0\n 10\n \n detail\n SELECT formatDate(current_date) AS date, \n COALESCE(item_number,poitem_vend_item_number) AS item_number, \n COALESCE(item_descrip1, poitem_vend_item_descrip) AS item_descrip1,\n <? value("vendorItemLit") ?> AS vendoritemlit,\n poitem_vend_item_number, \n <? value("ordertype") ?> || '#:' AS typenum,\n pohead_number AS head_number \n FROM pohead, poitem \n LEFT OUTER JOIN itemsite ON (itemsite_id = poitem_itemsite_id)\n LEFT OUTER JOIN item ON (item_id = itemsite_item_id) \n WHERE ((pohead_id = poitem_pohead_id)\n AND (poitem_id = <? value("orderitemid") ?>)\n AND ('PO' = <? value("ordertype") ?>))\nUNION\nSELECT formatDate(current_date) AS date, \n item_number AS item_number, \n item_descrip1 AS item_descrip1,\n NULL, NULL, \n <? value("ordertype") ?> || '#:' AS typenum,\n rahead_number AS head_number\n FROM rahead, raitem \n JOIN itemsite ON (itemsite_id = raitem_itemsite_id)\n JOIN item ON (item_id = itemsite_item_id) \n WHERE ((rahead_id = raitem_rahead_id)\n AND (raitem_id = <? value("orderitemid") ?>)\n AND ('RA' = <? value("ordertype") ?>))\nUNION\nSELECT formatDate(current_date) AS date, \n item_number AS item_number, \n item_descrip1 AS item_descrip1,\n NULL, NULL, \n <? value("ordertype") ?> || '#:' AS typenum,\n tohead_number AS head_number\n FROM tohead, toitem \n JOIN item ON (item_id = toitem_item_id) \n WHERE ((tohead_id = toitem_tohead_id)\n AND (toitem_id = <? value("orderitemid") ?>)\n AND ('TO' = <? value("ordertype") ?>))\n \n
\n detail\n \n \n detail\n \n 698\n \n \n 5\n 5\n 190\n 15\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 5\n 20\n 175\n 10\n \n 0\n \n Arial\n 7\n normal\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 80\n 50\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n poitem_vend_item_number\n \n \n \n \n 35\n 65\n 45\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n head_number\n \n \n \n \n \n 115\n 65\n 65\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n date\n \n \n \n \n 5\n 65\n 25\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n typenum\n \n \n \n \n 5\n 50\n 75\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n vendoritemlit\n \n \n \n
\n
\n \N 0 2013-07-26 16:14:22.271087 492 ReceivingLabelOrder \N \n\n Receiving Label Order\n ReceivingLabelOrder\n \n \n must be a positive number or 0. used to specify how many day back from today the report takes into account when printing recieving labels\n \n \n Item Number - Used to filter the item numbers by the first matching characters from the left of the string\n \n \n used to specify the number of repeated sets of labels required\n \n \n used with the pirnt receiving label form\n \n \n used to filter the report by a PO number\n \n \n \n \n 0.05\n 0.05\n \n CILS ALP1-9200-1\n Labels\n \n 10\n 0\n 0\n 10\n \n detail\n SELECT formatDate(current_date) AS date, \n COALESCE(item_number,poitem_vend_item_number) AS item_number, \n COALESCE(item_descrip1, poitem_vend_item_descrip) AS item_descrip1,\n <? value("vendorItemLit") ?> AS vendoritemlit,\n poitem_vend_item_number, \n <? value("orderhead_type") ?> || '#:' AS typenum,\n pohead_number AS head_number \n FROM pohead\n JOIN poitem ON (poitem_pohead_id = pohead_id)\n LEFT OUTER JOIN itemsite ON (itemsite_id = poitem_itemsite_id)\n LEFT OUTER JOIN item ON (item_id = itemsite_item_id) \n WHERE ((pohead_id = <? value("orderhead_id") ?>)\n AND ('PO' = <? value("orderhead_type") ?>))\nUNION\nSELECT formatDate(current_date) AS date, \n item_number AS item_number, \n item_descrip1 AS item_descrip1,\n NULL, NULL, \n <? value("orderhead_type") ?> || '#:' AS typenum,\n rahead_number AS head_number\n FROM rahead\n JOIN raitem ON (raitem_rahead_id = rahead_id)\n JOIN itemsite ON (itemsite_id = raitem_itemsite_id)\n JOIN item ON (item_id = itemsite_item_id) \n WHERE ((rahead_id = <? value("orderhead_id") ?>)\n AND ('RA' = <? value("orderhead_type") ?>))\nUNION\nSELECT formatDate(current_date) AS date, \n item_number AS item_number, \n item_descrip1 AS item_descrip1,\n NULL, NULL, \n <? value("orderhead_type") ?> || '#:' AS typenum,\n tohead_number AS head_number\n FROM tohead\n JOIN toitem ON (toitem_tohead_id = tohead_id)\n JOIN item ON (item_id = toitem_item_id) \n WHERE ((tohead_id = <? value("orderhead_id") ?>)\n AND ('TO' = <? value("orderhead_type") ?>))\n \n
\n detail\n \n \n detail\n \n 698\n \n \n 5\n 5\n 190\n 15\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 5\n 20\n 175\n 10\n \n 0\n \n Arial\n 7\n normal\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 80\n 50\n 100\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n poitem_vend_item_number\n \n \n \n \n 35\n 65\n 45\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n head_number\n \n \n \n \n \n 115\n 65\n 65\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n date\n \n \n \n \n 5\n 65\n 25\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n typenum\n \n \n \n \n 5\n 50\n 75\n 15\n \n \n Helvetica\n 8\n normal\n \n \n \n \n detail\n vendoritemlit\n \n \n \n
\n
\n \N 0 2013-07-26 16:14:22.271087 105 ReportsMasterList \N \n\n Reports Master List\n ReportsMasterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n reports\n detail\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 80\n 2\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n report_name\n \n \n \n \n 0\n 2\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pkgname\n \n \n \n \n 265\n 2\n 475\n 15\n \n 1\n \n Arial\n 8\n bold\n \n \n \n \n detail\n report_descrip_qttooltiprole\n \n \n \n
\n \n 16\n \n \n 90\n 1\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 1\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 370 PurchaseOrder \N \n\n Purchase Order\n PurchaseOrder\n Selecting an Alt Address on the PO will cause the printed PO to display that address as the Ship To on the printed document.\n \n \n \n \n \n Head\n title\n \n 25\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 28\n 28\n 20\n 20\n \n Head\n SELECT pohead_number,\n formatDate(pohead_orderdate) AS f_orderdate,\n pohead_fob,\n pohead_shipvia,\n terms_descrip,\n vend_number,\n vend_name,\n warehous_descrip,\n pohead_agent_username,\n usr.usr_propername AS username,\n pohead_comments,\n text(<? value("title") ?>) AS title\n FROM pohead\n LEFT OUTER JOIN usr ON (pohead_agent_username = usr_username)\n LEFT OUTER JOIN terms ON (pohead_terms_id = terms_id)\n LEFT OUTER JOIN vendinfo ON (pohead_vend_id = vend_id)\n LEFT OUTER JOIN whsinfo ON (pohead_warehous_id = warehous_id)\n WHERE (pohead_id=<? value("pohead_id") ?>);\n \n \n Detail\n SELECT poitem_linenumber,\n poitem_comments,\n poitem_linenumber AS f_line,\n item_number,\n poitem_vend_item_number, \n CASE WHEN (LENGTH(TRIM(BOTH '\t' FROM poitem_vend_item_descrip)) <= 0) THEN\n (item_descrip1 || '' || item_descrip2)\n ELSE (poitem_vend_item_descrip)\n END AS itemdescription,\n formatQty(poitem_qty_ordered) AS f_ordered,\n CASE WHEN (poitem_vend_uom LIKE '') THEN (uom_name)\n ELSE (poitem_vend_uom)\n END AS itemuom,\n formatPurchPrice(poitem_unitprice) AS f_price,\n formatExtPrice(poitem_unitprice * poitem_qty_ordered) AS f_extended,\n formatDate(poitem_duedate) AS f_duedate,\n characteristicsToString('PI', poitem_id, '=', ', ') AS poitem_characteristics\nFROM poitem\n\tLEFT OUTER JOIN itemsite ON (poitem_itemsite_id = itemsite_id)\n\tLEFT OUTER JOIN (item JOIN uom ON (item_inv_uom_id=uom_id)) ON (itemsite_item_id = item_id)\nWHERE \t(poitem_pohead_id=<? value("pohead_id") ?>) \nORDER BY poitem_linenumber;\n \n \n Foot\n SELECT formatExtPrice(subtotal) AS f_subtotal,\n formatExtPrice(totalfreight) AS f_totalfreight,\n formatExtPrice(tax) AS f_tax,\n formatExtPrice(subtotal + totalfreight + tax) AS f_totaldue\nFROM\n( SELECT COALESCE(SUM(poitem_qty_ordered * poitem_unitprice), 0) AS subtotal,\n COALESCE(SUM(poitem_freight)+pohead_freight,0) AS totalfreight,\n (SELECT COALESCE(SUM(tax), 0.0)\n FROM (SELECT ROUND(SUM(taxdetail_tax),2) AS tax\n FROM tax\n JOIN calculateTaxDetailSummary('PO', <? value("pohead_id") ?>, 'T') ON (taxdetail_tax_id=tax_id)\n GROUP BY tax_id) AS taxdata) AS tax\n FROM pohead JOIN poitem ON (poitem_pohead_id=pohead_id)\n WHERE (pohead_id=<? value("pohead_id") ?>)\n GROUP BY pohead_freight ) AS data;\n\n \n \n Logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n Currency\n SELECT\n curr_symbol\nFROM\n pohead,\n curr_symbol\nWHERE (pohead_id = <? value("pohead_id") ?>) AND\n pohead_curr_id = curr_id;\n \n \n Address\n SELECT\n warehous_descrip,\n formatAddr(addr_line1, addr_line2, addr_line3, ( addr_city || ' ' || addr_state || ' ' || addr_postalcode), addr_country) AS warehouse_address\nFROM\n whsinfo, \n addr, \n pohead\nWHERE \n addr_id = warehous_addr_id\n and pohead_warehous_id = warehous_id\n AND pohead_id=<? value("pohead_id") ?> ;\n \n \n ShipToAddress\n SELECT pohead_number,\n formatDate(pohead_orderdate) AS f_orderdate,\n pohead_fob,\n pohead_shipvia,\n terms_descrip,\n vend_number,\n vend_name,\n va.addr_line1 AS vend_address1,\n va.addr_line2 AS vend_address2,\n va.addr_line3 AS vend_address3,\n (va.addr_city || ' ' || va.addr_state || ' ' || va.addr_postalcode) AS vendcitystatezip,\n formatcntctname(pohead_vend_cntct_id) AS vend_contact,\n formataddr(pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, (pohead_vendcity || ' ' || pohead_vendstate || ' ' || pohead_vendzipcode), pohead_vendcountry) as vend_address,\n warehous_descrip,\n wa.addr_line1 as warehous_addr1,\n wa.addr_line2 as warehous_addr2,\n wa.addr_line3 as warehous_addr3,\n wa.addr_city as warehous_addr4,\n wa.addr_postalcode as zip,\n wa.addr_state,\n wa.addr_country,\n formatcntctname(pohead_shipto_cntct_id) AS shipto_contact,\n formataddr(pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, (pohead_shiptocity || ' ' || pohead_shiptostate || ' ' || pohead_shiptozipcode), pohead_shiptocountry) as shipto_address,\n pohead_agent_username AS username,\n pohead_comments,\n text(<? value("title") ?>) AS title\n FROM pohead\n LEFT OUTER JOIN terms ON (pohead_terms_id = terms_id),\n vendinfo\n LEFT OUTER JOIN addr va ON (vend_addr_id=va.addr_id),\n whsinfo\n LEFT OUTER JOIN addr wa ON (warehous_addr_id = wa.addr_id)\n WHERE ((pohead_vend_id=vend_id)\n AND (pohead_warehous_id = warehous_id)\n AND (pohead_id=<? value("pohead_id") ?>) );\n \n \n 376\n \n \n 290\n 10\n 225\n 75\n \n stretch\n \n Logo\n image_data\n \n \n \n \n 0\n 130\n 270\n 130\n 0\n \n \n 5\n 315\n 805\n 315\n 0\n \n \n \n 535\n 130\n 810\n 130\n 0\n \n \n 535\n 0\n 535\n 130\n 0\n \n \n \n \n \n \n 645\n 60\n 140\n 17\n \n \n Arial\n 12\n normal\n \n \n \n \n Head\n f_orderdate\n \n \n \n \n 500\n 142\n 300\n 17\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n ShipToAddress\n shipto_contact\n \n \n \n \n \n 5\n 25\n 265\n 17\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n Address\n warehouse_address\n \n \n \n \n 5\n 5\n 267\n 17\n \n \n Arial\n 12\n normal\n \n \n \n \n Address\n warehous_descrip\n \n \n \n \n 645\n 40\n 126\n 17\n \n \n Arial\n 12\n normal\n \n \n \n \n Head\n pohead_number\n \n \n \n 5\n 360\n 805\n 360\n 0\n \n \n \n \n 75\n 155\n 300\n 17\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n ShipToAddress\n vend_contact\n \n \n \n 270\n 0\n 270\n 130\n 0\n \n \n \n \n \n 5\n 290\n 187\n 17\n \n \n Arial\n 11\n normal\n \n \n \n \n Head\n pohead_fob\n \n \n \n \n 202\n 290\n 252\n 17\n \n \n Arial\n 11\n normal\n \n \n \n \n Head\n pohead_shipvia\n \n \n \n \n \n \n \n \n \n \n \n 655\n 290\n 117\n 17\n \n \n Arial\n 11\n normal\n \n \n \n \n Head\n username\n \n \n \n \n 442\n 290\n 202\n 17\n \n \n Arial\n 11\n normal\n \n \n \n \n Head\n terms_descrip\n \n \n \n \n \n 645\n 85\n 35\n 16\n \n \n Arial\n 12\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n 5\n 285\n 805\n 285\n 0\n \n \n \n \n \n \n \n 75\n 137\n 300\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n Head\n vend_name\n \n \n \n \n 645\n 107\n 140\n 17\n \n \n Arial\n 12\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 500\n 162\n 300\n 17\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n ShipToAddress\n shipto_address\n \n \n \n \n 75\n 172\n 300\n 17\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n ShipToAddress\n vend_address\n \n \n \n
\n detail\n \n \n Detail\n \n 107\n \n \n 625\n 25\n 55\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n itemuom\n \n \n \n \n 50\n 65\n 605\n 17\n \n 0\n \n Arial\n 10\n normal\n \n \n \n \n Detail\n poitem_comments\n \n \n \n \n 700\n 25\n 100\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_duedate\n \n \n \n \n 700\n 5\n 92\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_extended\n \n \n \n \n 50\n 45\n 750\n 17\n \n \n Arial\n 9\n normal\n \n \n \n \n Detail\n poitem_characteristics\n \n \n \n \n 545\n 25\n 75\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_ordered\n \n \n \n \n 555\n 5\n 75\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_price\n \n \n \n \n 505\n 5\n 25\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Currency\n curr_symbol\n \n \n \n \n 150\n 5\n 350\n 17\n \n 0\n \n Arial\n 10\n normal\n \n \n \n \n Detail\n itemdescription\n \n \n \n \n 50\n 25\n 225\n 17\n \n \n Arial\n 9\n normal\n \n \n \n \n Detail\n poitem_vend_item_number\n \n \n \n \n 50\n 5\n 92\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n item_number\n \n \n \n \n 10\n 5\n 36\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n Detail\n f_line\n \n \n \n
\n \n \n 113\n \n \n 670\n 85\n 25\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Currency\n curr_symbol\n \n \n \n \n 35\n 10\n 530\n 17\n \n 14\n \n Arial\n 10\n normal\n \n \n \n \n Head\n pohead_comments\n \n \n \n \n \n 705\n 55\n 100\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Foot\n f_tax\n \n \n \n \n 705\n 85\n 100\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Foot\n f_totaldue\n \n \n \n \n 670\n 12\n 25\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Currency\n curr_symbol\n \n \n \n \n 670\n 55\n 25\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Currency\n curr_symbol\n \n \n \n 585\n 75\n 806\n 75\n 0\n \n \n \n \n \n 705\n 35\n 100\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Foot\n f_totalfreight\n \n \n \n 10\n 5\n 805\n 5\n 0\n \n \n \n 705\n 12\n 100\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Foot\n f_subtotal\n \n \n \n \n \n 670\n 35\n 25\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Currency\n curr_symbol\n \n \n \n \n 57\n \n \n
\n Selecting an Alt Address on the PO will cause the printed PO to display that address as the Ship To on the printed document. 0 2013-07-26 16:14:22.271087 161 PurchasePriceVariancesByItem \N \n\n Purchase Price Variances By Item\n PurchasePriceVariancesByItem\n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number, item_descrip1,\n item_descrip2, uom_name,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername\n FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n \n \n detail\n poPriceVariances\n detail\n \n \n 236\n \n \n 95\n 135\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n \n 550\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 95\n 155\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n 550\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 95\n 65\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 95\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n \n 95\n 103\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n 5\n 230\n 745\n 230\n 2\n \n \n \n 310\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n \n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 36\n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_order_number\n \n \n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_varprcnt\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_variance\n \n \n \n \n 60\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n 5\n 30\n 745\n 30\n 0\n \n \n \n 575\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recv_value\n \n \n \n \n 215\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_date\n \n \n \n \n 300\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemnumber\n \n \n \n \n 300\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemdescrip\n \n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 575\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_voucher_value\n \n \n \n
\n \n 17\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 162 PurchasePriceVariancesByVendor \N \n\n Purchase Price Variances By Vendor\n PurchasePriceVariancesByVendor\n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code FROM whsinfo WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername;\n \n \n detail\n poPriceVariances\n detail\n \n \n 236\n \n \n \n 550\n 64.8725\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 550\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 94.254\n 64.8725\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n \n 95.746\n 84.8725\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n \n \n 5\n 230\n 745\n 230\n 2\n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 36\n \n \n 665\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_varprcnt\n \n \n \n \n 6.49\n -1.88608e-20\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_order_number\n \n \n \n 5\n 30\n 745\n 30\n 0\n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 300\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemdescrip\n \n \n \n \n 575\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_voucher_value\n \n \n \n \n 215\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_date\n \n \n \n \n 300\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemnumber\n \n \n \n \n 575\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_recv_value\n \n \n \n \n 69.9\n 0\n 143\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 665\n -0.442\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_variance\n \n \n \n
\n \n 17\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 103\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 145 PurchaseRequestsByItem \N \n\n Purchase Requests By Item\n PurchaseRequestsByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code\n FROM whsinfo\n WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse\n FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n \n \n detail\n SELECT pr_status,\n pr_number || '-' || pr_subnumber AS pr_number,\n CASE WHEN (pr_order_type='W') THEN ('W/O ' || ( SELECT formatWoNumber(womatl_wo_id)\n FROM womatl\n WHERE (womatl_id=pr_order_id) ) )\n WHEN (pr_order_type='S') THEN ('S/O ' || (SELECT formatSoNumber(pr_order_id)))\n WHEN (pr_order_type='F') THEN ('Planned Order')\n WHEN (pr_order_type='M') THEN 'Manual'\n ELSE 'Other'\n END as f_type,\n pr_createdate as f_createdate,\n formatDate(pr_duedate) as f_duedate,\n formatQty(pr_qtyreq) as f_qtyreq,\n pr_releasenote as f_notes\n FROM pr, itemsite \n WHERE ((pr_itemsite_id=itemsite_id)\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n ) \nORDER BY pr_duedate;\n \n \n 221\n \n \n \n 135\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 135\n 105\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n 135\n 135\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 135\n 65\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n 355\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n 5\n \n \n 25\n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 39\n \n \n 655\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyreq\n \n \n \n \n 190\n 0\n 209\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n \n 560\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 10\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pr_number\n \n \n \n \n 105\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n pr_status\n \n \n \n \n \n 52\n 18\n 683\n 15\n \n 14\n \n Helvetica\n 6\n normal\n \n \n \n \n detail\n f_notes\n \n \n \n \n 445\n 0\n 110\n 16\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_createdate\n \n \n \n
\n \n 15\n \n \n 105\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 71 SalesAccountAssignmentsMasterList \N \n\n Sales Account Assignments Master List\n SalesAccountAssignmentsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT salesaccnt_id,\n CASE WHEN salesaccnt_warehous_id=-1 THEN 'Any'::TEXT\n ELSE (SELECT warehous_code FROM whsinfo WHERE (warehous_id=salesaccnt_warehous_id))\n END AS warehouscode,\n CASE WHEN salesaccnt_custtype_id=-1 THEN salesaccnt_custtype\n ELSE (SELECT custtype_code FROM custtype WHERE (custtype_id=salesaccnt_custtype_id))\n END AS custtypecode,\n CASE WHEN salesaccnt_prodcat_id=-1 THEN salesaccnt_prodcat\n ELSE (SELECT prodcat_code FROM prodcat WHERE (prodcat_id=salesaccnt_prodcat_id))\n END AS prodcatcode,\n formatGLAccount(salesaccnt_sales_accnt_id) AS salesaccnt,\n formatGLAccount(salesaccnt_credit_accnt_id) AS creditaccnt,\n formatGLAccount(salesaccnt_cos_accnt_id) AS costaccnt,\n formatGLAccount(salesaccnt_returns_accnt_id) AS returnsaccnt,\n formatGLAccount(salesaccnt_cor_accnt_id) AS coraccnt,\n formatGLAccount(salesaccnt_cow_accnt_id) AS cowaccnt\n FROM salesaccnt\nORDER BY warehouscode, custtypecode, prodcatcode;\n \n \n 87\n \n 0\n 81\n 740\n 81\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 7\n \n \n 27\n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 230\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salesaccnt\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehouscode\n \n \n \n \n 65\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custtypecode\n \n \n \n \n 315\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n creditaccnt\n \n \n \n \n 150\n -1\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prodcatcode\n \n \n \n \n 400\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n costaccnt\n \n \n \n \n 485\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n returnsaccnt\n \n \n \n \n 570\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n coraccnt\n \n \n \n \n 655\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cowaccnt\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 441 SalesCategoriesMasterList \N \n\n Sales Categories Master List\n SalesCategoriesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT salescat_id, salescat_name, salescat_descrip,\n formatGLAccount(salescat_sales_accnt_id) AS salesaccnt,\n formatGLAccount(salescat_prepaid_accnt_id) AS prepaidaccnt,\n formatGLAccount(salescat_ar_accnt_id) AS araccnt\n FROM salescat\nORDER BY salescat_name;\n \n \n 87\n \n 0\n 81\n 740\n 81\n 2\n \n \n \n \n \n \n \n \n \n \n 7\n \n \n 27\n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 230\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salesaccnt\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salescat_name\n \n \n \n \n 65\n -1\n 155\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salescat_descrip\n \n \n \n \n 315\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prepaidaccnt\n \n \n \n \n 400\n -1\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n araccnt\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 416 SalesOrderAcknowledgement \N \n\n Sales Order Acknowledgement\n SalesOrderAcknowledgement\n Sales Order Acknowledgement Omits Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo"\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 25\n 25\n 25\n 25\n \n head\n SELECT cust_number,\n formatsobarcode(cohead_id) AS order_barcode,\n\n formataddr(cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address, \n\n formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n\n trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n cohead_billtoname,\n cohead_billtoaddress1,\n cohead_billtoaddress2,\n cohead_billtoaddress3,\n (cohead_billtocity || ' ' || cohead_billtostate || ' ' || cohead_billtozipcode) AS billtocitystatezip,\n cntct_phone AS cust_phone,\n cohead_shiptoname,\n cohead_shiptoaddress1,\n cohead_shiptoaddress2,\n cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n cohead_number,\n cohead_shipvia,\n cohead_shiptophone,\n cohead_custponumber,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_shipcomments, \n terms_descrip\n FROM cohead, custinfo, terms, cntct\n WHERE ((cohead_cust_id=cust_id)\n AND (cust_cntct_id=cntct_id)\n AND (cohead_terms_id=terms_id)\n AND (cohead_id=<? value("sohead_id") ?>)\n);\n \n \n scheddate\n SELECT formatDate(MIN(coitem_scheddate)) AS scheddate\n FROM coitem\n WHERE ((coitem_status <> 'X') AND (coitem_cohead_id=<? value("sohead_id") ?>));\n \n \n detail\n salesOrderItems\n list\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n 477\n \n \n 375\n 0\n 425\n 85\n \n stretch\n \n logo\n image_data\n \n \n \n \n 120\n 400\n 253\n 25\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n cust_contact\n \n \n \n \n \n 175\n 195\n 100\n 20\n \n \n helvetica\n 14\n normal\n \n \n \n \n head\n orderdate\n \n \n \n \n \n 469\n 400\n 320\n 20\n \n \n Arial\n 12\n normal\n \n \n \n \n head\n terms_descrip\n \n \n \n \n \n 375\n 130\n 177\n 25\n \n 3of9\n 10\n \n 0.01\n \n head\n cust_number\n \n \n \n \n 375\n 160\n 307\n 25\n \n 3of9\n 20\n \n 0.01\n \n head\n cohead_custponumber\n \n \n \n \n \n 170\n 155\n 170\n 20\n \n \n helvetica\n 14\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n \n \n 433\n 215\n 331\n 20\n \n \n helvetica\n 14\n normal\n \n \n \n \n head\n cohead_shipvia\n \n \n \n \n \n 170\n 95\n 100\n 20\n \n \n helvetica\n 14\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n 375\n 95\n 234\n 25\n \n 128\n 10\n \n 0.01\n \n head\n order_barcode\n \n \n \n \n 25\n 465\n 823\n 465\n 0\n \n \n \n \n 75\n 260\n 305\n 20\n \n \n Arial\n 14\n normal\n \n \n \n \n head\n cohead_billtoname\n \n \n \n \n 75\n 280\n 295\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n billing_address\n \n \n \n \n \n \n \n 465\n 280\n 305\n 20\n \n 10\n \n Arial\n 10\n normal\n \n \n \n \n head\n shipping_address\n \n \n \n \n 170\n 125\n 170\n 20\n \n \n helvetica\n 14\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n \n \n 465\n 260\n 305\n 20\n \n \n helvetica\n 14\n normal\n \n \n \n \n head\n cohead_shiptoname\n \n \n \n \n \n 175\n 215\n 100\n 20\n \n \n helvetica\n 14\n normal\n \n \n \n \n scheddate\n scheddate\n \n \n \n 25\n 425\n 823\n 425\n 0\n \n \n \n \n \n \n
\n detail\n \n detail\n groupby\n \n 72\n \n \n 50\n 5\n 625\n 17\n \n 14\n \n helvetica\n 10\n normal\n \n \n \n \n head\n cohead_shipcomments\n \n \n \n \n \n lineitem\n coitem_linenumber\n \n 28\n \n 5\n 5\n 843\n 5\n 0\n \n \n \n \n \n detail\n \n 153\n \n \n 425\n 0\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n detail\n f_qtyshipped\n \n \n \n \n 635\n 0\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n detail\n f_qtyatshipping\n \n \n \n \n 365\n 30\n 469\n 35\n \n 128\n 15\n \n 0.01\n \n detail\n item_barcode\n \n \n \n \n 630\n 95\n 85\n 15\n \n \n helvetica\n 10\n normal\n \n \n \n \n detail\n enhanced_status\n \n \n \n \n 100\n 120\n 700\n 17\n \n 14\n \n helvetica\n 10\n normal\n \n \n \n \n detail\n coitem_memo\n \n \n \n 80\n 80\n 170\n 80\n 0\n \n \n \n \n 415\n 80\n 500\n 80\n 0\n \n \n \n \n 530\n 0\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n detail\n f_balance\n \n \n \n \n 80\n 110\n 170\n 110\n 0\n \n \n \n 25\n 40\n 295\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_descrip2_cust\n \n \n \n 305\n 110\n 395\n 110\n 0\n \n \n \n 25\n 0\n 200\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_number_cust\n \n \n \n \n 25\n 20\n 295\n 20\n \n \n Arial\n 11\n bold\n \n \n \n \n detail\n item_descrip1_cust\n \n \n \n 745\n 15\n 795\n 15\n 1\n \n \n 190\n 80\n 280\n 80\n 0\n \n \n 632\n 80\n 720\n 80\n 0\n \n \n 190\n 110\n 280\n 110\n 0\n \n \n \n 228\n 0\n 85\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n detail\n qty_uom\n \n \n \n \n 415\n 110\n 500\n 110\n 0\n \n \n 305\n 80\n 395\n 80\n 0\n \n \n \n 320\n 0\n 100\n 20\n \n \n helvetica\n 10\n normal\n \n \n \n \n detail\n f_qtyord\n \n \n \n
\n \n 57\n \n \n 90\n 5\n 95\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 455\n 5\n 80\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n \n \n 735\n 5\n 45\n 17\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 113\n \n 185\n 25\n 363\n 25\n 0\n \n \n 186\n 90\n 360\n 90\n 0\n \n \n \n \n
\n Sales Order Acknowledgement Omits Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo" 0 2013-07-26 16:14:22.271087 72 SalesRepsMasterList \N \n\n Sales Reps Master List\n SalesRepsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select salesrep_number, salesrep_name,\n formatBoolYN(salesrep_active) AS f_active,\n formatScrap(salesrep_commission) AS f_commprcnt\n from salesrep\norder by salesrep_name;\n \n \n 76\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 610\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_active\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salesrep_number\n \n \n \n \n 115\n 0\n 490\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salesrep_name\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_commprcnt\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 510 SaleTypesMasterList \N \n\n Sale Types Master List\n SaleTypesMasterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select *\n from saletype\norder by saletype_code;\n \n \n 76\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n saletype_code\n \n \n \n \n 240\n 0\n 500\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n saletype_descr\n \n \n \n \n 180\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n saletype_active\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 163 RejectedMaterialByVendor \N \n\n Rejected Material By Vendor\n RejectedMaterialByVendor\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT vend_number, vend_name,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code\n FROM whsinfo\n WHERE warehous_id=<? value("warehous_id") ?>)\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("agentUsername") ?>\n TEXT(<? value("agentUsername" ?>)\n <? else ?>\n TEXT('All Agents')\n <? endif ?>\n AS agentUsername,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate\n FROM vendinfo\n WHERE (vend_id=<? value("vend_id") ?>);\n \n \n detail\n SELECT poreject_id, poreject_ponumber, vend_name,\n formatDate(poreject_date) as f_date,\n poreject_vend_item_number as f_itemnum,\n poreject_vend_item_descrip as f_itemdescrip,\n formatQty(poreject_qty) as f_qty,\n rjctcode_code as f_rejectcode\nFROM poreject, vendinfo, itemsite, rjctcode\nWHERE ( (poreject_posted)\n AND (poreject_vend_id=vend_id)\n AND (poreject_rjctcode_id=rjctcode_id)\n AND (poreject_itemsite_id=itemsite_id)\n AND (vend_id=<? value("vend_id") ?>)\n AND (date(poreject_date) BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("agentUsername") ?>\n AND (poreject_agent_username=<? value("agentUsername") ?>)\n<? endif ?>\n )\nORDER BY poreject_date DESC;\n \n \n 236\n \n \n \n \n 95\n 135\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n 95\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_name\n \n \n \n \n \n \n 95\n 65\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_number\n \n \n \n \n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n 550\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 95\n 155\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n 550\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 36\n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_rejectcode\n \n \n \n \n 492\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 300\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_itemnum\n \n \n \n \n 60\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poreject_ponumber\n \n \n \n \n 300\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_itemdescrip\n \n \n \n \n 215\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_date\n \n \n \n 5\n 30\n 745\n 30\n 0\n \n \n
\n \n 16\n \n \n 102\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 139 ReorderExceptionsByPlannerCode \N \n\n Reorder Exceptions by Planner Code\n ReorderExceptionsByPlannerCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("plancode_id") ?>\n ( SELECT (plancode_code || '-' || plancode_name)\n FROM plancode\n WHERE plancode_id=<? value("plancode_id") ?>)\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plannercode,\n <? if exists("includePlannedOrders") ?>\n formatBoolYN(true)\n <? else ?>\n formatBoolYN(false)\n <? endif ?>\n AS includeplnord,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n \n \n detail\n SELECT warehous_code, item_number, item_descrip1, item_descrip2,\n formatDate(reorderdate) AS f_reorderdate,\n formatQty(reorderlevel) AS f_reorderlevel,\n formatQty((itemsite_qtyonhand - qtyAllocated(itemsite_id, reorderdate) + qtyOrdered(itemsite_id, reorderdate))) AS f_projavail,\n reorderdate \n FROM ( SELECT itemsite_id,\n CASE WHEN (item_type IN ('M', 'B', 'T')) THEN 1\n WHEN (item_type IN ('P', 'O')) THEN 2\n ELSE 3\n END AS itemtype,\n warehous_code, item_number, item_descrip1, item_descrip2,\n reorderDate(itemsite_id, <? value("lookAheadDays") ?>, <? if exists("includePlannedOrder") ?>true<? else ?>false<? endif ?>) AS reorderdate, itemsite_qtyonhand,\n reorderlevel \n FROM ( SELECT itemsite_id, itemsite_item_id, itemsite_warehous_id,\n itemsite_qtyonhand,\n CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel\n FROM itemsite \n WHERE ((true)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? endif ?>\n )\n ) AS itemsitedate, item, whsinfo\n WHERE ((itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id))\n ) AS data \n WHERE (reorderdate IS NOT NULL) \nORDER BY reorderdate, item_number;\n \n \n 221\n \n \n \n \n \n \n \n \n 140\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n lookAheadDays\n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n 525\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n includeplnord\n \n \n \n \n 140\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 140\n 80\n 385\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plannercode\n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 5\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 50\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 385\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_reorderdate\n \n \n \n \n 490\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_reorderlevel\n \n \n \n \n 595\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_projavail\n \n \n \n \n 50\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 50\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n
\n \n 16\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 409 ReturnAuthorizationWorkbenchDueCredit \N \n\n Return Authorization Workbench Due Credit\n ReturnAuthorizationWorkbenchDueCredit\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n<? if exists("cust_id") ?>\n cust_number AS f_custtype\n FROM custinfo\n WHERE(cust_id=<? value("cust_id") ?>);\n<? elseif exists("custtype_id") ?>\n custtype_name AS f_custtype\n FROM custtype\n WHERE(custtype_id=<? value("custtype_id") ?>);\n<? elseif exists("custgrp_id") ?>\n custgrp_name AS f_custtype\n FROM custgrp\n WHERE(custgrp_id=<? value("custgrp_id") ?>);\n<? else ?>\n text('All Customer Types') AS f_custtype\n<? endif ?>\n \n \n detail\n SELECT DISTINCT rahead_id,\nCASE\n WHEN rahead_creditmethod = 'M' THEN\n 1\n WHEN rahead_creditmethod = 'K' THEN\n 2\n WHEN rahead_creditmethod = 'C' THEN\n 3\nEND,\nrahead_number, cust_name,\nformatDate(rahead_authdate) AS f_authdate, formatDate(NULL) AS f_eligibledate,\nformatMoney(currtobase(rahead_curr_id,\n calcradueamt(rahead_id), current_date)) AS f_amount,\nCASE\n WHEN rahead_creditmethod = 'M' THEN\n <? value("creditmemo") ?>\n WHEN rahead_creditmethod = 'K' THEN\n <? value("check") ?>\n WHEN rahead_creditmethod = 'C' THEN\n <? value("creditcard") ?>\nEND AS creditmethod, rahead_authdate\nFROM rahead, raitem, custtype, custinfo LEFT OUTER JOIN custgrpitem ON (cust_id=custgrpitem_cust_id)\nWHERE ( (rahead_id=raitem_rahead_id)\n AND (rahead_cust_id=cust_id)\n AND (cust_custtype_id=custtype_id)\n AND ((raitem_disposition = 'R' AND rahead_timing = 'R' AND raitem_qtyreceived > raitem_qtycredited)\n OR (raitem_disposition = 'R' AND rahead_timing = 'I' AND raitem_qtyauthorized > raitem_qtycredited)\n OR (raitem_disposition = 'C' AND raitem_qtyauthorized > raitem_qtycredited))\n AND (raitem_status = 'O')\n AND (rahead_creditmethod != 'N')\n AND (calcradueamt(rahead_id) > 0)\n AND (raitem_disposition IN ('C','R'))\n <? if exists("cust_id") ?>\n AND (cust_id=<? value("cust_id") ?>)\n <? elseif exists("custtype_id") ?>\n AND (custtype_id=<? value("custtype_id") ?>)\n <? elseif exists("custtype_pattern") ?>\n AND (custtype_pattern=<? value("custtype_pattern") ?>)\n <? elseif exists("custgrp_id") ?>\n AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n <? endif ?>\n AND (rahead_creditmethod IN ('$'\n <? if exists("doM") ?>, 'M'<? endif ?>\n <? if exists("doK") ?>, 'K'<? endif ?>\n <? if exists("doC") ?>, 'C'<? endif ?>\n ))\n ) \nORDER BY rahead_authdate,rahead_number;\n \n \n 223\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n 185\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_custtype\n \n \n \n \n \n \n \n 6\n \n \n 28\n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 245\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_eligibledate\n \n \n \n \n 325\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 410\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n creditmethod\n \n \n \n \n 5\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n rahead_number\n \n \n \n \n 90\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 170\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_authdate\n \n \n \n
\n \n 18\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 410 ReturnAuthorizationWorkbenchReview \N \n\n Return Authorization Workbench Review\n ReturnAuthorizationWorkbenchReview\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT \n<? if exists("cust_id") ?>\n (cust_number || '-' || cust_name) AS f_custtype\n FROM custinfo\n WHERE(cust_id=<? value("cust_id") ?>)\n<? elseif exists("custtype_id") ?>\n (custtype_code || '-' || custtype_descrip) AS f_custtype\n FROM custtype\n WHERE(custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custgrp_id") ?>\n (custgrp_name || '-' || custgrp_descrip) AS f_custtype\n FROM custgrp\n WHERE(custgrp_id=<? value("custgrp_id") ?>)\n<? else ?>\n text('All Customer Types') AS f_custtype\n<? endif ?>\n;\n \n \n detail\n SELECT * FROM (\nSELECT rahead_id, rahead_number, COALESCE(cust_name,text('Undefined')) AS custnumber,\nformatDate(rahead_authdate) AS f_authdate, COALESCE(formatDate(rahead_expiredate),text('Never')) AS f_expiredate,\nCASE\n WHEN raitem_disposition = 'C' THEN\n text('Credit')\n WHEN raitem_disposition = 'R' THEN\n text('Return')\n WHEN raitem_disposition = 'P' THEN\n text('Replace')\n WHEN raitem_disposition = 'V' THEN\n text('Service')\n WHEN raitem_disposition = 'S' THEN\n text('Shipment')\n END AS disposition,\nCASE\n WHEN rahead_creditmethod = 'N' THEN\n text('None')\n WHEN rahead_creditmethod = 'M' THEN\n text('Memo')\n WHEN rahead_creditmethod = 'K' THEN\n text('Check')\n WHEN rahead_creditmethod = 'C' THEN\n text('Card')\nEND AS creditmethod,\nCASE\n WHEN raitem_status = 'C' THEN\n text('Closed')\n WHEN raitem_disposition = 'C' THEN\n text('Payment')\n WHEN raitem_disposition = 'R'\n AND SUM(raitem_qtyauthorized-raitem_qtycredited) > 0\n AND SUM(raitem_qtyauthorized-raitem_qtyreceived) > 0 THEN\n text('Receipt') || ',' || text('Payment')\n WHEN raitem_disposition = 'R'\n AND SUM(raitem_qtyreceived-raitem_qtycredited) > 0 THEN\n text('Payment')\n WHEN raitem_disposition = 'R'\n AND SUM(raitem_qtyauthorized-raitem_qtyreceived) > 0 THEN\n text('Receipt')\n WHEN raitem_disposition IN ('P','V')\n AND SUM(raitem_qtyauthorized-COALESCE(coitem_qtyshipped,0)) > 0\n AND SUM(raitem_qtyauthorized-raitem_qtyreceived) > 0 THEN\n text('Receipt') || ',' || text('Shipment')\n WHEN raitem_disposition IN ('P','V')\n AND SUM(raitem_qtyauthorized-COALESCE(coitem_qtyshipped,0)) > 0 THEN\n text('Shipment')\n WHEN raitem_disposition IN ('P','V')\n AND SUM(raitem_qtyauthorized-raitem_qtyreceived) > 0 THEN\n text('Receipt')\n WHEN raitem_disposition = 'S' THEN\n text('Shipment')\n ELSE ''\nEND AS awaiting\nFROM rahead\n LEFT OUTER JOIN custinfo ON (rahead_cust_id=cust_id)\n LEFT OUTER JOIN custtype ON (cust_custtype_id=custtype_id)\n LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id), \n raitem\n LEFT OUTER JOIN coitem ON (raitem_new_coitem_id=coitem_id)\nWHERE ( (rahead_id=raitem_rahead_id)\n\n<? if exists("cust_id") ?>\n AND (cust_id=<? value("cust_id")?>)\n<? elseif exists("custtype_id") ?>\n AND (custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custgrp_id") ?>\n AND (custgrpitem_custgrp_id=<? value("custgrp_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (custtype_code ~ <? value("custtype_pattern") ?>)\n<? endif ?>\n\n<? if not exists("showExpired") ?>\n AND (COALESCE(rahead_expiredate,CURRENT_DATE) >= CURRENT_DATE)\n<? endif ?>\n<? if exists("showClosed") ?>\n AND (raitem_status='O' OR rahead_authdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? else ?>\n AND (raitem_status = 'O')\n<? endif ?>\n ) GROUP BY rahead_id,rahead_number,cust_name,rahead_expiredate,\n rahead_authdate,raitem_status,raitem_disposition,rahead_creditmethod,\n rahead_curr_id\n ORDER BY rahead_authdate,rahead_number\n) as data\n\nWHERE (FALSE)\n<? if exists("showReceipts") ?>\n OR ((disposition IN ('Return','Replace','Service'))\n AND (awaiting ~ 'Receipt'))\n<? endif ?>\n<? if exists("showShipments") ?>\n OR ((disposition IN ('Replace','Service','Shipment'))\n AND (awaiting ~ 'Shipment'))\n<? endif ?>\n<? if exists("showPayments") ?>\n OR ((disposition IN ('Credit','Return'))\n AND (awaiting ~ 'Payment'))\n<? endif ?>\n<? if exists("showClosed") ?>\n OR ((awaiting = 'Closed'))\n<? endif ?>\n\n \n \n 223\n \n \n \n \n \n \n 185\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_custtype\n \n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 6\n \n \n 28\n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 5\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n rahead_number\n \n \n \n \n 170\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_authdate\n \n \n \n \n 245\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_expiredate\n \n \n \n \n 410\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n creditmethod\n \n \n \n \n 325\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n disposition\n \n \n \n \n 525\n 0\n 195\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n awaiting\n \n \n \n \n 90\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n custnumber\n \n \n \n
\n \n 18\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 60 SalesOrderStatus \N \n\n Sales Order Status\n SalesOrderStatus\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT \n --the following line was added for version 2.3:\n (select uom_name from uom where uom_id = coitem_qty_uom_id) AS uom_orderuom,\n coitem_linenumber,\n item_number, item_descrip1,\n item_descrip2,\n warehous_code,\n formatQty(coitem_qtyord) AS qtyord,\n formatQty(coitem_qtyshipped) AS qtyship,\n formatQty(coitem_qtyreturned) AS qtyret,\n formatQty(SUM(COALESCE(shipitem_qty, 0))) AS qtyinvcd,\n formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) AS f_balance,\n CASE WHEN (coitem_status='C') THEN\n ( formatDate(coitem_closedate) || ' (' || coitem_close_username || ')' )\n ELSE ''\n END AS f_dateuser,\n CASE WHEN (coitem_order_id=-1) THEN ''\n WHEN (coitem_order_type='W') THEN\n ( SELECT (formatWoNumber(wo_id) || '/' || wo_status)\n FROM wo\n WHERE (wo_id=coitem_order_id) )\n ELSE ''\n END AS f_childord\n FROM itemsite, item, whsinfo, coitem LEFT OUTER JOIN\n shipitem ON (shipitem_orderitem_id=coitem_id\n AND shipitem_invcitem_id IS NOT NULL) \n WHERE ((coitem_itemsite_id=itemsite_id)\n AND (coitem_status<>'X')\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (coitem_cohead_id=<? value("sohead_id") ?>)\n)\nGROUP BY uom_orderuom,\n coitem_id, coitem_linenumber, item_number,\n item_descrip1, item_descrip2, warehous_code,\n coitem_qtyord, coitem_qtyshipped, coitem_status,\n coitem_closedate, coitem_close_username,\n coitem_qtyreturned, coitem_order_id,\n coitem_order_type\nORDER BY coitem_linenumber;\n \n \n head\n SELECT cohead_number,\n formatDate(cohead_orderdate) AS orderdate,\n cohead_custponumber,\n cust_name, cntct_phone AS cust_phone\n FROM cohead, custinfo, cntct\n WHERE ((cohead_cust_id=cust_id)\n AND (cust_cntct_id=cntct_id)\n AND (cohead_id=<? value("sohead_id") ?>)\n);\n \n \n lastupdated\n SELECT formatDate(MAX(lastupdated)) AS f_lastupdated\n FROM (SELECT cohead_lastupdated AS lastupdated\n FROM cohead\n WHERE (cohead_id=:sohead_id)\n UNION\n SELECT coitem_lastupdated AS lastupdated\n FROM coitem\n WHERE (coitem_cohead_id=<? value("sohead_id") ?>) ) AS data;\n \n \n 224\n \n \n \n \n \n \n \n \n \n \n \n \n \n 112\n 95\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n orderdate\n \n \n \n \n 475\n 75\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_name\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n 475\n 112\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n \n \n 475\n 95\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_phone\n \n \n \n \n 475\n 135\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n lastupdated\n f_lastupdated\n \n \n \n \n 112\n 75\n 220\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_number\n \n \n \n \n \n \n \n \n \n 7\n \n \n 37\n \n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 54\n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_childord\n \n \n \n \n 550\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_dateuser\n \n \n \n \n 550\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 5\n 0\n 25\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n coitem_linenumber\n \n \n \n \n 469\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyinvcd\n \n \n \n \n 35\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 229\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyord\n \n \n \n \n 170\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 390\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyret\n \n \n \n \n 35\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 310\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyship\n \n \n \n \n 35\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 200\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_orderuom\n \n \n \n
\n \n 20\n \n \n 715\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 80\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 246 SelectedPaymentsList \N \n\n Selected Payments List\n SelectedPaymentsList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT apopen_id, apselect_id,\n (bankaccnt_name || '-' || bankaccnt_descrip) AS bankaccnt,\n (vend_number || '-' || vend_name) AS vendor,\n apopen_docnumber,\n apopen_ponumber,\n formatMoney(apselect_amount) AS f_selected\n FROM apselect, apopen, vendinfo, bankaccnt\n WHERE ((apopen_vend_id=vend_id)\n AND (apselect_apopen_id=apopen_id)\n AND (apselect_bankaccnt_id=bankaccnt_id)\n<? if exists("vend_id") ?>\n AND (vend_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n AND (vend_vendtype_id=<? value("vendtype_id") ?>)\n<? elseif exists("vendtype_pattern") ?>\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ <? value("vendtype_pattern") ?>)))\n<? endif ?>\n )\nORDER BY bankaccnt_name, vend_number, apopen_docnumber;\n \n \n 141\n \n \n \n \n \n \n 5\n 135\n 745\n 135\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 575\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_selected\n \n \n \n \n 450\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apopen_ponumber\n \n \n \n \n 10\n 0\n 225\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bankaccnt\n \n \n \n \n 365\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apopen_docnumber\n \n \n \n \n 240\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vendor\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 75 ShipToMasterList \N \n\n Ship-To Master List\n ShipToMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT cust_number, cust_name\n FROM custinfo\nWHERE (cust_id=<? value("cust_id") ?>);\n \n \n \n detail\n SELECT shipto_num AS num,\n shipto_name AS name,\n addr_line1 AS address,\n (addr_city || ', ' || addr_state || ' ' || addr_postalcode) AS citystatezip\n FROM shiptoinfo\n LEFT OUTER JOIN addr ON (shipto_addr_id=addr_id)\n WHERE (shipto_cust_id=<? value("cust_id") ?>) \nORDER BY shipto_num;\n \n \n 171\n \n 5\n 165\n 745\n 165\n 2\n \n \n \n \n 135\n 70\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_number\n \n \n \n \n 135\n 90\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_name\n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n num\n \n \n \n \n 270\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n address\n \n \n \n \n 545\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n citystatezip\n \n \n \n \n 65\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n name\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 105\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 218 ShipmentsByDate \N \n\n Shipments By Date\n ShipmentsByDate\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(date(<? value("startDate") ?>)) AS startDate,\n formatDate(date(<? value("endDate") ?>)) AS endDate;\n\n \n \n detail\n SELECT shiphead_id, lineitem_id,\n CASE WHEN (level=0) THEN order_number\n ELSE item_number\n END AS order_item,\n CASE WHEN (level=0) THEN customer\n ELSE itemdescription\n END AS cust_desc,\n shiphead_order_type,\n shiphead_number, \n order_number, \n customer,\n shiphead_shipdate AS f_shipdate,\n shiphead_tracknum,\n shiphead_freight,\n freight_curr_abbr,\n linenumber,\n item_number,\n itemdescription,\n warehous_code,\n formatQty(qtyord) AS f_qtyord,\n formatQty(qtyshipped) AS f_qtyshipped\nFROM (\nSELECT shiphead_id, coitem_id AS lineitem_id, cohead_number AS sortkey1, shiphead_number AS sortkey2, 1 AS level,\n shiphead_order_type,\n shiphead_number,\n cohead_number AS order_number, \n (cust_number || '-' || cust_name) AS customer,\n shiphead_shipdate,\n shiphead_tracknum,\n shiphead_freight,\n currConcat(shiphead_freight_curr_id) AS freight_curr_abbr, \n coitem_linenumber AS linenumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n warehous_code,\n coitem_qtyord AS qtyord,\n SUM(shipitem_qty) AS qtyshipped\nFROM shipitem, shiphead, coitem, cohead, custinfo, itemsite, item, whsinfo\nWHERE ( (shipitem_shiphead_id=shiphead_id)\n AND (shipitem_orderitem_id=coitem_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_status <> 'X')\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (shiphead_order_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (shiphead_shipped)\n AND (shiphead_order_type='SO')\n<? if exists("startDate") ?>\n AND (shiphead_shipdate BETWEEN <? value("startDate") ?> and <? value("endDate") ?>)\n<? endif ?>\n<? if exists("sohead_id") ?>\n AND (cohead_id = <? value("sohead_id") ?>)\n<? endif ?>\n<? if exists("shiphead_id") ?>\n AND (shiphead_id = <? value("shiphead_id") ?>)\n<? endif ?>\n ) \nGROUP BY shiphead_id, coitem_id, shiphead_order_type, shiphead_number,\n cohead_number, cust_number, cust_name, shiphead_shipdate,\n coitem_linenumber, item_number, item_descrip1, item_descrip2,\n warehous_code, shiphead_tracknum, coitem_qtyord, \n shiphead_freight, shiphead_freight_curr_id \n<? if exists("MultiWhs") ?>\nUNION\nSELECT shiphead_id, toitem_id AS lineitem_id, tohead_number AS sortkey1, shiphead_number AS sortkey2, 1 AS level,\n shiphead_order_type,\n shiphead_number,\n tohead_number AS order_number, \n tohead_destname AS customer,\n shiphead_shipdate,\n shiphead_tracknum,\n shiphead_freight,\n currConcat(shiphead_freight_curr_id) AS freight_curr_abbr, \n toitem_linenumber AS linenumber, item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdescription,\n tohead_srcname AS warehous_code,\n toitem_qty_ordered AS qtyord,\n SUM(shipitem_qty) AS qtyshipped\nFROM shipitem, shiphead, toitem, tohead, item \nWHERE ( (shipitem_shiphead_id=shiphead_id)\n AND (shipitem_orderitem_id=toitem_id)\n AND (toitem_status <> 'X')\n AND (toitem_item_id=item_id)\n AND (shiphead_order_id=tohead_id)\n AND (shiphead_shipped)\n AND (shiphead_order_type='TO')\n<? if exists("startDate") ?>\n AND (shiphead_shipdate BETWEEN <? value("startDate") ?> and <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tohead_id") ?>\n AND (tohead_id = <? value("tohead_id") ?>)\n<? endif ?>\n<? if exists("shiphead_id") ?>\n AND (shiphead_id = <? value("shiphead_id") ?>)\n<? endif ?>\n ) \nGROUP BY shiphead_id, toitem_id, shiphead_order_type, shiphead_number,\n tohead_number, tohead_destname, shiphead_shipdate,\n toitem_linenumber, item_number, item_descrip1, item_descrip2,\n tohead_srcname, shiphead_tracknum, toitem_qty_ordered, \n shiphead_freight, shiphead_freight_curr_id \n<? endif ?>\n ) AS data\nORDER BY sortkey1, sortkey2, level, linenumber DESC;\n\n \n \n 221\n \n \n \n \n \n \n \n \n 140\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n 140\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n 5\n \n \n 41\n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n
\n detail\n \n cohead_number\n order_number\n \n 45\n \n \n 85\n 40\n 745\n 40\n 2\n \n \n \n \n 114\n 5\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n order_number\n \n \n \n \n 114\n 20\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n customer\n \n \n \n \n \n \n detail\n \n 33\n \n \n 240\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 520\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyord\n \n \n \n 5\n 28\n 745\n 28\n 0\n \n \n \n 5\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shiphead_number\n \n \n \n \n 600\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyshipped\n \n \n \n \n 185\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n linenumber\n \n \n \n \n 105\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipdate\n \n \n \n \n 440\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 240\n 15\n 455\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemdescription\n \n \n \n
\n \n 15\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 442 ShipmentsByShipment \N \n\n Shipments By Shipment\n ShipmentsByShipment\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT shiphead_number AS f_shipnumber,\n shiphead_tracknum AS f_tracknum,\n formatMoney(shiphead_freight) AS freight,\n ordernumber AS f_sonumber,\n formatDate(orderdate) AS f_orderdate,\n custponumber AS f_ponumber,\n cust_name AS f_custname,\n cntct_phone AS f_custphone\n FROM custinfo JOIN cntct ON (cust_cntct_id=cntct_id), (SELECT shiphead_number,\n shiphead_tracknum,\n shiphead_freight,\n cohead_number AS ordernumber,\n cohead_cust_id AS order_cust_id,\n cohead_orderdate AS orderdate,\n cohead_custponumber AS custponumber\n FROM cohead JOIN shiphead ON (shiphead_order_id=cohead_id AND shiphead_order_type='SO')\n WHERE(shiphead_id=<? value("shiphead_id") ?>)\n UNION\n SELECT shiphead_number,\n shiphead_tracknum,\n shiphead_freight,\n tohead_number AS ordernumber,\n NULL AS order_cust_id,\n tohead_orderdate AS orderdate,\n NULL AS custponumber\n FROM tohead JOIN shiphead ON (shiphead_order_id=tohead_id AND shiphead_order_type='TO')\n WHERE(shiphead_id=<? value("shiphead_id") ?>) \n ) AS taborder\n WHERE(order_cust_id=cust_id);\n\n \n \n detail\n shipments\n detail\n \n \n 221\n \n \n \n \n \n 140\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_orderdate\n \n \n \n \n 140\n 155\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_ponumber\n \n \n \n \n \n \n \n \n 140\n 135\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_custphone\n \n \n \n \n 140\n 114\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_custname\n \n \n \n \n \n \n \n 140\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_sonumber\n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n 140\n 49\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_shipnumber\n \n \n \n \n \n 540\n 129\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_tracknum\n \n \n \n \n 540\n 149\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_freight\n \n \n \n \n \n \n \n 5\n \n \n 41\n \n \n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 38\n \n \n 240\n 15\n 480\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_description\n \n \n \n \n 185\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n linenumber\n \n \n \n \n 520\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyord\n \n \n \n \n 105\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipdate\n \n \n \n \n 5\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shiphead_number\n \n \n \n \n 600\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyshipped\n \n \n \n \n 240\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 440\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n 5\n 33\n 745\n 33\n 0\n \n \n
\n \n 15\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 435 ShipmentsPending \N \n\n Shipments Pending\n ShipmentsPending\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n\n \n \n detail\n maintainShipping\n detail\n \n \n 221\n \n \n \n \n \n \n \n \n 140\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n 5\n \n \n 41\n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 33\n \n \n 240\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n dest\n \n \n \n \n 520\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipqty\n \n \n \n 5\n 28\n 745\n 28\n 0\n \n \n \n 5\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shiphead_number\n \n \n \n \n 600\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipvalue\n \n \n \n \n 160\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n linenumber\n \n \n \n \n 105\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ordertype\n \n \n \n \n 390\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shiphead_shipvia\n \n \n \n \n 240\n 13\n 455\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n description\n \n \n \n \n 480\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n
\n \n 15\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 100\n \n \n 600\n 10\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipvalue\n \n cost\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 266 ShippingLabelsByInvoice \N \n\n Shipping Labels By Invoice\n ShippingLabelsByInvoice\n \n Avery 5263\n Labels\n \n 100\n 100\n 100\n 100\n \n detail\n SELECT sequence_value,\n invchead_invcnumber,\n cust_number,\n invchead_ordernumber,\n invchead_ponumber,\n invchead_shipto_name,\n invchead_shipto_address1,\n invchead_shipto_address2,\n invchead_shipto_address3,\n (COALESCE(invchead_shipto_city,'') || ' ' || COALESCE(invchead_shipto_state,'') || ' ' || COALESCE(invchead_shipto_zipcode,'')) AS citystatezip\n FROM invchead, custinfo, sequence\n WHERE ( (invchead_cust_id=cust_id)\n AND (sequence_value BETWEEN <? value("labelFrom") ?> AND <? value("labelTo") ?>)\n AND (invchead_id=<? value("invchead_id") ?>) );\n \n \n
\n detail\n \n \n detail\n \n 201\n \n \n 100\n 125\n 155\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n cust_number\n \n \n \n \n \n \n \n 100\n 140\n 155\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n invchead_invcnumber\n \n \n \n \n 285\n 180\n 36\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n sequence_value\n \n \n \n \n 30\n 85\n 285\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n citystatezip\n \n \n \n \n 30\n 40\n 285\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n invchead_shipto_address1\n \n \n \n \n 340\n 180\n 36\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n Parameter Query\n labelTo\n \n \n \n \n \n 30\n 25\n 285\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n invchead_shipto_name\n \n \n \n \n 30\n 70\n 285\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n invchead_shipto_address3\n \n \n \n \n 30\n 55\n 285\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n invchead_shipto_address2\n \n \n \n \n 100\n 155\n 155\n 17\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n invchead_ponumber\n \n \n \n
\n
\n \N 0 2013-07-26 16:14:22.271087 247 SelectPaymentsList \N \n\n Select Payments List\n SelectPaymentsList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT apopen_id, apselectid, vendor, apopen_docnumber, apopen_ponumber,\n formatDate(apopen_duedate) AS f_duedate,\n formatDate(apopen_docdate) AS f_docdate,\n formatMoney(amount) AS f_amount,\n f_selected, f_late, status\n FROM (SELECT apopen_id, COALESCE(apselect_id, -1) AS apselectid,\n (vend_number || '-' || vend_name) AS vendor,\n apopen_docnumber, apopen_ponumber,\n apopen_duedate, apopen_docdate,\n (apopen_amount - apopen_paid -\n COALESCE((SELECT SUM(checkitem_amount / checkitem_curr_rate)\n FROM checkitem, checkhead\n WHERE ((checkitem_checkhead_id=checkhead_id)\n AND (checkitem_apopen_id=apopen_id)\n AND (NOT checkhead_void)\n AND (NOT checkhead_posted))\n ), 0)) AS amount,\n formatMoney(COALESCE(SUM(apselect_amount), 0)) AS f_selected,\n formatBoolYN(apopen_duedate <= CURRENT_DATE) AS f_late,\n CASE WHEN (apopen_status='O') THEN TEXT('Open')\n ELSE CASE WHEN (apopen_status='H') THEN TEXT('On Hold')\n ELSE CASE WHEN (apopen_status='C') THEN TEXT('Close')\n END\n END\n END AS status\n FROM vendinfo, apopen LEFT OUTER JOIN apselect ON (apselect_apopen_id=apopen_id)\n WHERE ( (apopen_open)\n AND (apopen_doctype IN ('V', 'D'))\n AND (apopen_vend_id=vend_id)\n<? if exists("vend_id") ?>\n AND (vend_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n AND (vend_vendtype_id=<? value("vendtype_id") ?>)\n<? elseif exists("vendtype_pattern") ?>\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ <? value("vendtype_pattern") ?>)))\n<? endif ?>\n )\nGROUP BY apopen_id, apselect_id, vend_number, vend_name,\n apopen_docnumber, apopen_ponumber,\n apopen_duedate, apopen_docdate, apopen_amount, apopen_paid, apopen_curr_id, apopen_status) AS data\n WHERE (amount <> 0.0)\nORDER BY apopen_duedate, amount DESC;\n \n \n head\n SELECT <? if exists("vend_id") ?>\n ( SELECT vend_name\n FROM vendinfo\n WHERE (vend_id=<? value("vend_id") ?>) )\n <? elseif exists("vendtype_id") ?>\n ( SELECT (vendtype_code || '-' || vendtype_descrip)\n FROM vendtype\n WHERE (vendtype_id=<? value("vendtype_id") ?>) )\n <? elseif exists("vendtype_pattern") ?>\n text(<? value("vendtype_pattern") ?>)\n <? else ?>\n text('All Vendors')\n <? endif ?>\n AS f_value,\n <? if reExists("vendtype_.*") ?>\n text('Vendor Type:')\n <? else ?>\n text('Vendor:')\n <? endif ?>\n AS f_label;\n \n \n \n 141\n \n \n 20\n 65\n 125\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n f_label\n \n \n \n \n \n \n \n \n \n \n \n 150\n 65\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_value\n \n \n \n \n 5\n 135\n 745\n 135\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 205\n -1\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apopen_ponumber\n \n \n \n \n 280\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 590\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_selected\n \n \n \n \n 505\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 360\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_docdate\n \n \n \n \n 680\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_late\n \n \n \n \n 130\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apopen_docnumber\n \n \n \n \n 5\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vendor\n \n \n \n \n 435\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n status\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 267 ShippingLabelsBySo \N \n\n Shippinig Labels By S/O\n ShippingLabelsBySo\n \n Letter\n \n 100\n 100\n 100\n 100\n \n detail\n SELECT sequence_value, \n cust_number, \n cohead_number, \n \nformataddr(cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address, \n \n \n cohead_custponumber, \n cohead_shiptoname, \n cohead_shiptoaddress1, \n cohead_shiptoaddress2, \n cohead_shiptoaddress3, \n (COALESCE(cohead_shiptocity,'') || ' ' || COALESCE(cohead_shiptostate,'') || ' ' || COALESCE(cohead_shiptozipcode,'')) AS citystatezip \nFROM cohead, custinfo, sequence \nWHERE ( (cohead_cust_id=cust_id) \n AND (sequence_value BETWEEN <? value("labelFrom") ?> AND <? value("labelTo") ?>) \n AND (cohead_id=<? value("sohead_id") ?>) ) \nLIMIT <? value("labelTo") ?>; \n \n \n
\n detail\n \n \n detail\n \n 494\n \n \n \n 725\n 9\n 155\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n cust_number\n \n \n \n \n 800\n 445\n 36\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n Parameter Query\n labelTo\n \n \n \n \n 15\n 119\n 880\n 55\n \n 0\n \n Arial\n 36\n bold\n \n \n \n \n detail\n shipping_address\n \n \n \n \n 9\n 65\n 884\n 50\n \n \n Arial\n 36\n bold\n \n \n \n \n detail\n cohead_shiptoname\n \n \n \n \n 725\n 40\n 155\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n cohead_custponumber\n \n \n \n \n \n 725\n 25\n 155\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n cohead_number\n \n \n \n \n 735\n 445\n 36\n 16\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n sequence_value\n \n \n \n \n \n
\n
\n \N 0 2013-07-26 16:14:22.271087 73 ShippingZonesMasterList \N \n\n Shipping Zones Master List\n ShippingZonesMasterList\n \n \n 850\n 1100\n \n \n 50\n 50\n 50\n 50\n \n detail\n select shipzone_name, shipzone_descrip\n from shipzone\norder by shipzone_name;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipzone_name\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipzone_descrip\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 52 SingleLevelWhereUsed \N \n\n Single Level Where Used\n SingleLevelWhereUsed\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n uom_name,\n item_descrip1,\n item_descrip2,\n <? if exists("effective") ?>\n formatDate(<? value("effective") ?>)\n <? else ?>\n text('Now')\n <? endif ?>\n AS effective\n FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=<? value("item_id") ?>);\n \n \n \n detail\n whereUsed\n detail\n \n \n 241\n \n \n \n \n 5\n 235\n 745\n 235\n 2\n \n \n \n 114\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n \n \n \n \n 450\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n effective\n \n \n \n \n 114\n 160\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n 114\n 120\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n 450\n 138\n 185\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n \n \n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 444\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scrap\n \n \n \n \n 75\n 15\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 75\n 30\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 404\n 0\n 38\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 675\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_issuemethod\n \n \n \n \n 675\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_expires\n \n \n \n \n 75\n 0\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n 4\n 50\n 745\n 50\n 0\n \n \n \n 5\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bomitem_seqnumber\n \n \n \n \n 525\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyreq\n \n \n \n \n 600\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_createwo\n \n \n \n \n 315\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyper\n \n \n \n \n 600\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_effective\n \n \n \n \n 315\n 17\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyfxd\n \n \n \n
\n \n 16\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 248 StandardJournalGroupMasterList \N \n\n Standard Journal Group Master List\n StandardJournalGroupMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT stdjrnlgrp_id,\n stdjrnlgrp_name,\n stdjrnlgrp_descrip\n FROM stdjrnlgrp\nORDER BY stdjrnlgrp_name;\n \n \n 77\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 7\n \n \n 22\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 220\n 0\n 500\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n stdjrnlgrp_descrip\n \n \n \n \n 10\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n stdjrnlgrp_name\n \n \n \n
\n \n 17\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 282 StandardJournalHistory \N \n\n Standard Journal History\n StandardJournalHistory\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("source") ?>\n text(<? value("source") ?>)\n <? else ?>\n text('All Sources')\n <? endif ?>\n AS source,\n <? if exists("startJrnlnum") ?>\n text('Start Journal Number:')\n <? else ?>\n text('')\n <? endif ?>\n AS startJrnlnumLit,\n <? if exists("endJrnlnum") ?>\n text('End Journal Number:')\n <? else ?>\n text('')\n <? endif ?>\n AS endJrnlnumLit;\n \n \n detail\n SELECT formatDate(gltrans_date) AS transdate,\n gltrans_journalnumber,\n gltrans_docnumber,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n CASE WHEN (gltrans_amount < 0) THEN formatMoney(gltrans_amount * -1)\n ELSE ''\n END AS f_debit,\n CASE WHEN (gltrans_amount > 0) THEN formatMoney(gltrans_amount)\n ELSE ''\n END AS f_credit,\n formatBoolYN(gltrans_posted) AS f_posted\n FROM gltrans, accnt\n WHERE ( (gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted)\n AND (gltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n AND (gltrans_doctype='ST') )\nORDER BY gltrans_date, gltrans_sequence, gltrans_docnumber, gltrans_amount;\n \n \n 162\n \n \n \n \n 200\n 65\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 200\n 85\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 5\n 155\n 745\n 155\n 2\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n JournalSeries\n gltrans_journalnumber\n \n 16\n \n \n 680\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 100\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_journalnumber\n \n \n \n \n \n JournalName\n gltrans_docnumber\n \n 16\n \n \n 190\n 0\n 130\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_docnumber\n \n \n \n \n \n \n detail\n \n 17\n \n \n 595\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n \n 330\n 0\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 274 SubAccountTypeMasterList \N \n\n Subaccount Type Master List\n SubAccountTypeMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT subaccnttype_code, subaccnttype_descrip,\n CASE WHEN(subaccnttype_accnt_type='A') THEN text('Asset')\n WHEN(subaccnttype_accnt_type='L') THEN text('Liability')\n WHEN(subaccnttype_accnt_type='E') THEN text('Expense')\n WHEN(subaccnttype_accnt_type='R') THEN text('Revenue')\n WHEN(subaccnttype_accnt_type='Q') THEN text('Equity')\n ELSE text('ERROR')\n END AS f_type\n FROM subaccnttype\nORDER BY subaccnttype_code;\n \n \n 76\n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 240\n 0\n 500\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n subaccnttype_descrip\n \n \n \n \n 120\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n subaccnttype_code\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 49 SingleLevelBOM \N \n\n Single Level Bill of Materials\n SingleLevelBOM\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number, uom_name AS item_invuom, item_descrip1, item_descrip2\nFROM item, uom\nWHERE ((item_id=<? value("item_id") ?>)\nAND (item_inv_uom_id=uom_id));\n \n \n \n detail\n SELECT bomitem_seqnumber, item_number,\n invuom.uom_name AS invuomname, issueuom.uom_name AS issueuomname,\n item_descrip1, item_descrip2,\n formatBoolYN(bomitem_createwo) AS createchild,\n CASE WHEN (bomitem_issuemethod='S') THEN 'Push'\n WHEN (bomitem_issuemethod='L') THEN 'Pull'\n WHEN (bomitem_issuemethod='M') THEN 'Mixed'\n ELSE 'Special'\n END AS issuemethod,\n formatQty(bomitem_qtyfxd) AS issueqtyfxd,\n formatQty(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyfxd)) AS invqtyfxd,\n formatQtyPer(bomitem_qtyper) AS issueqtyper,\n formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper)) AS invqtyper,\n formatScrap(bomitem_scrap) AS scrap,\n formatQtyPer((bomitem_qtyfxd + bomitem_qtyper) * (1 + bomitem_scrap)) AS qtyreq,\n formatDate(bomitem_effective, <? value("always") ?>) AS effective,\n formatDate(bomitem_expires, <? value("never") ?>) AS expires,\n bomitem_ecn\n<? if exists("revision_id") ?>\n FROM bomitem(<? value("item_id") ?>,<? value("revision_id") ?>)\n<? else ?>\n FROM bomitem(<? value("item_id") ?>)\n<? endif ?>\n, item, uom AS issueuom, uom AS invuom\nWHERE ((bomitem_item_id=item_id)\nAND (item_inv_uom_id=invuom.uom_id)\nAND (bomitem_uom_id=issueuom.uom_id)\n<? if exists("expiredDays") ?>\n AND (bomitem_expires > (CURRENT_DATE - <? value("expiredDays") ?>))\n<? else ?>\n AND (bomitem_expires > CURRENT_DATE)\n<? endif ?>\n\n<? if exists("effectiveDays") ?>\n AND (bomitem_effective <= (CURRENT_DATE + <? value("effectiveDays") ?>))\n<? else ?>\n AND (bomitem_effective <= CURRENT_DATE)\n<? endif ?>\n\n)\nORDER BY bomitem_seqnumber, bomitem_effective;\n\n \n \n bomhead\n SELECT bomhead_docnum, bomhead_revision,\n formatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=<? value("item_id") ?>)\n<? if exists("revision_id") ?>\nAND (bomhead_rev_id=<? value("revision_id") ?>)\n<? else ?>\nAND (bomhead_rev_id=getActiveRevId('BOM',<? value("item_id") ?>))\n<? endif ?>\n);\n \n \n 208\n \n \n \n \n 120\n 110\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n \n 482\n 130\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_revision\n \n \n \n \n \n \n \n \n \n \n 120\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n 482\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n f_revisiondate\n \n \n \n \n 482\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_docnum\n \n \n \n \n \n \n 120\n 130\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n 5\n 202\n 745\n 202\n 2\n \n \n \n \n \n \n \n \n 7\n \n \n 37\n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 57\n \n \n 405\n 18\n 37\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invuomname\n \n \n \n \n 675\n 18\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issuemethod\n \n \n \n \n 675\n 3\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n expires\n \n \n \n \n 440\n 3\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n scrap\n \n \n \n \n 15\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bomitem_seqnumber\n \n \n \n \n 315\n 33\n 227\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 315\n 18\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invqtyper\n \n \n \n \n 70\n 0\n 115\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 600\n 3\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n effective\n \n \n \n \n 455\n 18\n 135\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n bomitem_ecn\n \n \n \n \n 525\n 3\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyreq\n \n \n \n \n 600\n 18\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n createchild\n \n \n \n \n 70\n 33\n 227\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 315\n 3\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issueqtyper\n \n \n \n \n 405\n 3\n 37\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issueuomname\n \n \n \n \n 235\n 3\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issueqtyfxd\n \n \n \n \n 235\n 18\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invqtyfxd\n \n \n \n
\n \n 21\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 175 SlowMovingInventoryByClassCode \N \n\n Slow Moving Inventory By Class Code\n SlowMovingInventoryByClassCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n (SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("classcode_id") ?>\n (SELECT (classcode_code || '-' || classcode_descrip)\n FROM classcode\n WHERE (classcode_id=<? value("classcode_id") ?>) )\n <? elseif exists("classcode_pattern") ?>\n text(<? value("classcode_pattern") ?>)\n <? else ?>\n text('All Class Codes')\n <? endif ?>\n AS classcode,\n <? if exists("showValue") ?>\n <? if exists("useActualCosts") ?>\n text('Show Inventory Value with Actual Costs')\n <? else ?>\n text('Show Inventory Value with Standard Costs')\n <? endif ?>\n AS showvalues,\n text('Unit Cost') AS f_unitcost,\n text('Value') AS f_value,\n <? else ?>\n text('') AS showvalues,\n text('') AS f_unitcost,\n text('') AS f_value,\n <? endif ?>\n formatDate(<? value("cutoffDate") ?>) AS f_cutoff;\n \n \n detail\n SELECT warehous_code,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n formatQty(itemsite_qtyonhand) AS f_qoh,\n formatDate(itemsite_datelastused) AS f_datelastused,\n <? if exists("showValue") ?>\n formatCost(cost)\n <? else ?>\n text('')\n <? endif ?>\n AS f_unitcost,\n noNeg(cost * itemsite_qtyonhand) AS value,\n <? if exists("showValue") ?>\n formatExtPrice(noNeg(cost * itemsite_qtyonhand))\n <? else ?>\n text('')\n <? endif ?>\n AS f_value\n FROM ( SELECT itemsite_id,\n warehous_code,\n item_number,\n item_descrip1,\n item_descrip2, uom_name,\n itemsite_qtyonhand,\n itemsite_datelastused,\n <? if exists("useActualCosts") ?>\n actcost(itemsite_item_id)\n <? else ?>\n stdcost(itemsite_item_id)\n <? endif ?>\n AS cost\n FROM itemsite, item, whsinfo, uom\n WHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_active)\n AND (itemsite_datelastused < <? value("cutoffDate") ?>)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE classcode_code ~ <? value("classcode_pattern") ?>) )\n<? endif ?>\n )\n ) AS data\nORDER BY warehous_code,\n<? if exists("orderByInventoryValue") ?>\n value DESC\n<? elseif exists("orderByDateLastUsed") ?>\n itemsite_datelastused\n<? else ?>\n item_number\n<? endif ?>\n \n \n 236\n \n \n 575\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_unitcost\n \n \n \n \n 130\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n \n \n \n 440\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showvalues\n \n \n \n \n \n \n 660\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_value\n \n \n \n \n \n \n 130\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n classcode\n \n \n \n \n 540\n 120\n 195\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_cutoff\n \n \n \n \n \n 6\n \n \n 41\n \n \n 5\n 35\n 745\n 34\n 2\n \n \n \n \n \n \n 660\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_value\n \n \n \n \n \n 575\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_unitcost\n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 380\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_datelastused\n \n \n \n \n 105\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n \n \n \n 105\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 25\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 105\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 265\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 575\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unitcost\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 16\n \n
\n \N 0 2013-07-26 16:14:22.271087 195 StandardBOL \N \n\n Standard Bill of Lading\n StandardBOL\n \n Letter\n \n 50\n 50\n 0\n 0\n \n head\n SELECT shiphead_shipvia, formatDate(shiphead_shipdate) AS shipdate,\n cust_name, cust_number, cohead_number, cohead_fob, cohead_custponumber,\n warehous_descrip, addr_line1 AS warehous_addr1, addr_line2 AS warehous_addr2, addr_line3 AS warehous_addr3, addr_city AS warehous_addr4, warehous_fob,\n cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n cohead_shiptophone\n FROM shiphead, cohead, whsinfo, custinfo\n LEFT OUTER JOIN addr ON (warehous_addr_id=addr_id)\n WHERE ((shiphead_order_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (cohead_warehous_id=warehous_id)\n AND (shiphead_id=%1));\n \n \n detail\n SELECT coitem_linenumber, formatQty(SUM(shipitem_qty)) AS invqty, uom_name, roundUp(SUM(shipitem_qty) / itemuomratiobytype(item_id, 'Selling'))::integer AS shipqty,\n itemsellinguom(item_id) AS shipuom, item_number, item_descrip1, item_descrip2,\n formatQty(SUM(shipitem_qty) * item_prodweight) AS netweight,\n formatQty(SUM(shipitem_qty) * (item_prodweight + item_packweight)) AS grossweight\n FROM shipitem, coitem, itemsite, item, uom\n WHERE ((shipitem_orderitem_id=coitem_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (shipitem_shiphead_id=%1))\n GROUP BY coitem_linenumber, item_number, uom_name, shipuom,\n item_descrip1, item_descrip2, item_prodweight, item_packweight\n ORDER BY coitem_linenumber;\n \n \n \n foot\n SELECT formatQty(SUM(shipitem_qty * item_prodweight)) AS netweight,\n formatQty(SUM(shipitem_qty * (item_prodweight + item_packweight))) AS grossweight,\n CASE\n WHEN ('%3' = 'C') THEN 'X'\n ELSE ' '\n END AS collectflag,\n CASE\n WHEN ('%3' = 'C') THEN 'Therm-O-Rock East, Inc.'\n ELSE ' '\n END AS section7,\n CASE\n WHEN ('%3' = 'C') THEN 'Therm-O-Rock, East, Inc.'\n ELSE ' '\n END AS collect_name,\n CASE\n WHEN ('%3' = 'C') THEN 'Pine Street'\n ELSE ' '\n END AS collect_address1,\n CASE\n WHEN ('%3' = 'C') THEN ''\n ELSE ' '\n END AS collect_address2,\n CASE\n WHEN ('%3' = 'C') THEN 'New Eagle PA 15067'\n ELSE ' '\n END AS collect_address3\n FROM shipitem, coitem, itemsite, item\n WHERE ((shipitem_orderitem_id=coitem_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (shipitem_shiphead_id=%1));\n \n \n notes\n SELECT shiphead_notes\n FROM shiphead\n WHERE (shiphead_id=%1);\n \n \n \n 242\n \n \n 95\n 125\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n warehous_addr2\n \n \n \n \n 600\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n shipdate\n \n \n \n \n 530\n 165\n 300\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n shiptocitystatezip\n \n \n \n \n 95\n 165\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n warehous_addr4\n \n \n \n \n 530\n 145\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptoaddress3\n \n \n \n \n 530\n 125\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptoaddress2\n \n \n \n \n 95\n 145\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n warehous_addr3\n \n \n \n \n 95\n 85\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n warehous_descrip\n \n \n \n \n 530\n 85\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptoname\n \n \n \n \n 530\n 105\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptoaddress1\n \n \n \n \n 115\n 35\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n shiphead_shipvia\n \n \n \n \n 95\n 105\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n warehous_addr1\n \n \n \n \n 530\n 185\n 300\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_shiptophone\n \n \n \n
\n detail\n \n \n detail\n \n 57\n \n \n 200\n 40\n 300\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 95\n 30\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n 10\n 30\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n invqty\n \n \n \n \n 200\n 5\n 300\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n item_number\n \n \n \n \n 520\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n netweight\n \n \n \n \n 10\n 5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n shipqty\n \n \n \n \n 520\n 25\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n grossweight\n \n \n \n \n 94\n 5\n 80\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n detail\n shipuom\n \n \n \n \n 200\n 25\n 300\n 14\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n item_descrip1\n \n \n \n
\n \n \n 287\n \n \n 230\n 180\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collect_address2\n \n \n \n \n 438\n 261\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n section7\n \n \n \n \n \n 520\n 5\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n netweight\n \n \n \n \n 614\n 60\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_fob\n \n \n \n \n 20\n 180\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collect_name\n \n \n \n \n \n 520\n 25\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n grossweight\n \n \n \n \n \n 230\n 200\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collect_address3\n \n \n \n \n 728\n 261\n 46\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collectflag\n \n \n \n \n 614\n 100\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n 614\n 120\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n 614\n 80\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n \n 20\n 200\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n foot\n collect_address1\n \n \n \n \n 50\n 10\n 400\n 100\n \n \n Arial\n 10\n normal\n \n \n \n \n notes\n shiphead_notes\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 249 StandardJournalMasterList \N \n\n Standard Journal Master List\n StandardJournalMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT stdjrnl_id,\n stdjrnl_name,\n stdjrnl_descrip\n FROM stdjrnl\nORDER BY stdjrnl_name;\n \n \n 76\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 220\n 0\n 500\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n stdjrnl_descrip\n \n \n \n \n 10\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n stdjrnl_name\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 261 Statement \N \n\n Statement\n Statement\n "As of" date included\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 100\n 100\n 100\n 100\n \n detail\n SELECT CASE WHEN (araging_doctype = 'I') THEN <? value("invoice") ?>\n WHEN (araging_doctype = 'D') THEN <? value("debit") ?>\n WHEN (araging_doctype = 'C') THEN <? value("credit") ?>\n WHEN (araging_doctype = 'R') THEN <? value("deposit") ?>\n ELSE 'Misc.'\n END AS doctype,\n araging_docnumber AS f_docnumber,\n formatDate(CAST(araging_docdate AS DATE)) AS f_docdate,\n CASE WHEN (araging_doctype IN ('I','C','D')) THEN formatDate(araging_duedate)\n ELSE ''\n END AS f_duedate,\n formatMoney(araging_aropen_amount) AS f_amount,\n formatMoney(araging_aropen_amount - araging_total_val) AS f_applied,\n formatMoney(araging_total_val) AS f_balance\nFROM araging(<? value("asofdate") ?>, true, false)\nWHERE ((araging_cust_id = <? value("cust_id") ?>)\n AND (abs(araging_aropen_amount) > 0)\n )\nORDER BY araging_duedate;\n \n \n head\n SELECT cust_name, addr_line1 AS cust_address1, addr_line2 AS cust_address2, addr_line3 AS cust_address3,\n (addr_city || ' ' || addr_state || ' ' || addr_postalcode) AS citystatezip,\n formatDate(COALESCE(<? value("asofdate") ?>, current_date)) AS asofdate\nFROM custinfo\nLEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\nLEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\nWHERE (cust_id = <? value("cust_id") ?>);\n \n \n Currency\n SELECT currconcat(cust_curr_id) AS currAbbr\n FROM custinfo\n WHERE (cust_id=<? value("cust_id") ?>)\n\n \n \n foot\n SELECT formatMoney(SUM(araging_cur_val)) AS f_current,\n formatMoney(SUM(araging_thirty_val)) AS f_thirty,\n formatMoney(SUM(araging_sixty_val)) AS f_sixty,\n formatMoney(SUM(araging_ninety_val)) AS f_ninety,\n formatMoney(SUM(araging_plus_val)) AS f_plus,\n formatMoney(SUM(araging_total_val)) AS f_total\nFROM araging(<? value("asofdate") ?>, true, false)\nWHERE ((abs(araging_aropen_amount) > 0)\n AND (araging_cust_id = <? value("cust_id") ?>));\n \n \n 277\n \n 475\n 245\n 475\n 270\n 0\n \n \n \n 25\n 190\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n citystatezip\n \n \n \n \n \n 10\n 245\n 10\n 270\n 0\n \n \n \n \n 445\n 40\n 445\n 75\n 0\n \n \n \n 395\n 245\n 395\n 270\n 0\n \n \n 445\n 75\n 585\n 75\n 0\n \n \n 310\n 245\n 310\n 270\n 0\n \n \n 123.972\n 244.219\n 123.972\n 269.461\n 0\n \n \n \n \n 25\n 150\n 300\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address1\n \n \n \n \n 25\n 165\n 300\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address2\n \n \n \n \n 10\n 244.541\n 640\n 244.541\n 0\n \n \n \n 25\n 135\n 300\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_name\n \n \n \n 210\n 245.459\n 210\n 270.459\n 0\n \n \n \n 475\n 60\n 90\n 15\n \n \n Arial\n 12\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n 640\n 245\n 640\n 270\n 0\n \n \n \n 25\n 180\n 300\n 15\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cust_address3\n \n \n \n \n 545\n 245\n 545\n 270\n 0\n \n \n \n 585\n 40\n 585\n 75\n 0\n \n \n 445\n 40\n 585\n 40\n 0\n \n \n 10\n 270\n 640\n 270\n 0\n \n \n 445\n 55\n 585\n 55\n 0\n \n \n \n \n 105\n 50\n 100\n 15\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n asofdate\n \n \n \n
\n detail\n \n unnamed\n \n \n \n \n detail\n \n 16\n \n \n 20\n 0\n 100\n 15\n \n \n Arial\n 12\n normal\n \n \n \n \n detail\n doctype\n \n \n \n \n 395\n 0\n 80\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n f_amount\n \n \n \n \n 130\n 0\n 75\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n f_docnumber\n \n \n \n \n 480\n 0\n 75\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n f_applied\n \n \n \n \n 315\n 0\n 75\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 215\n 0\n 90\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n f_docdate\n \n \n \n \n 560\n 0\n 80\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n detail\n f_balance\n \n \n \n
\n \n \n 111\n \n 190\n 5\n 190\n 35\n 0\n \n \n 10\n 5\n 10\n 35\n 0\n \n \n \n 100\n 5\n 100\n 35\n 0\n \n \n 365\n 5\n 365\n 35\n 0\n \n \n \n \n \n 190\n 15\n 85\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n foot\n f_sixty\n \n \n \n \n 365\n 15\n 85\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n foot\n f_plus\n \n \n \n \n 100\n 15\n 85\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n foot\n f_thirty\n \n \n \n 10\n 35\n 640\n 35\n 0\n \n \n \n 10\n 15\n 85\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n foot\n f_current\n \n \n \n 640\n 5\n 640\n 35\n 0\n \n \n \n \n 280\n 5\n 280\n 35\n 0\n \n \n \n \n \n 280\n 15\n 80\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n foot\n f_ninety\n \n \n \n 455\n 5\n 455\n 35\n 0\n \n \n \n 100\n 45\n 67\n 15\n \n \n Arial\n 11\n normal\n \n \n \n \n Currency\n currAbbr\n \n \n \n 10\n 5\n 640\n 5\n 0\n \n \n \n 544\n 15\n 85\n 20\n \n \n Arial\n 11\n normal\n \n \n \n \n foot\n f_total\n \n \n \n
\n "As of" date included 0 2013-07-26 16:14:22.271087 220 SummarizedBOM \N \n\n Summarized Bill of Materials\n SummarizedBOM\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n uom_name AS item_invuom,\n item_descrip1,\n item_descrip2\n FROM item, uom\n WHERE ((item_id=<? value("item_id") ?>)\n AND (item_inv_uom_id=uom_id));\n \n \n \n detail\n select bomdata_item_number AS item_number,\n bomdata_uom_name AS item_invuom,\n bomdata_item_descrip1 AS item_descrip1,\n bomdata_item_descrip2 AS item_descrip2,\n formatQtyPer(bomdata_qtyreq) AS qtyreq\n FROM summarizedBOM(<? value("item_id") ?>,<? value("revision_id") ?>,<? value("expiredDays") ?>,<? value("futureDays") ?>)\n\n\n \n \n bomhead\n SELECT bomhead_docnum, bomhead_revision,\nformatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=<? value("item_id") ?>)\nAND (bomhead_rev_id=<? value("revision_id") ?>));\n \n \n 242\n \n \n 315\n 103\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_invuom\n \n \n \n \n 585\n 103\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_docnum\n \n \n \n \n \n \n 100\n 145\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n 5\n 235\n 745\n 235\n 2\n \n \n \n \n 100\n 103\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 100\n 125\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n \n \n \n 585\n 145\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n bomhead_revision\n \n \n \n \n \n 585\n 125\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n bomhead\n f_revisiondate\n \n \n \n \n \n 6\n \n \n 36\n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 52\n \n \n 112\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 112\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 112\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 275\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_invuom\n \n \n \n \n 425\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyreq\n \n \n \n
\n \n 17\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 301 SummarizedBankrecHistory \N \n\n Summarized Bank Reconciliation History\n SummarizedBankrecHistory\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT bankrec_id,\n formatBoolYN(bankrec_posted) AS f_posted,\n formatDate(bankrec_created) AS f_created,\n formatDate(bankrec_postdate) AS f_postdate,\n bankrec_username AS f_username,\n formatDate(bankrec_opendate) AS f_opendate,\n formatDate(bankrec_enddate) AS f_enddate,\n formatMoney(bankrec_openbal) AS f_openbal,\n formatMoney(bankrec_endbal) AS f_endbal\n FROM bankrec\n WHERE (bankrec_bankaccnt_id=<? value("bankaccntid") ?>)\n ORDER BY bankrec_created;\n \n \n head\n SELECT (bankaccnt_name || '-' || bankaccnt_descrip) AS f_bankaccnt\n FROM bankaccnt\n WHERE (bankaccnt_id=<? value("bankaccntid") ?>);\n \n \n 121\n \n \n \n \n \n \n 5\n 115\n 745\n 115\n 2\n \n \n \n 145\n 60\n 220\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_bankaccnt\n \n \n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_posted\n \n \n \n \n 96\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_postdate\n \n \n \n \n 370\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_opendate\n \n \n \n \n 655\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_endbal\n \n \n \n \n 560\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_openbal\n \n \n \n \n 180\n 0\n 185\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_username\n \n \n \n \n 465\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_enddate\n \n \n \n
\n \n 18\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 477 SummarizedSalesHistory \N \n\n Summarized Sales History\n SummarizedSalesHistory\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n summarizedSalesHistory\n detail\n \n \n 163\n \n \n \n \n 3\n 159\n 743\n 159\n 2\n \n \n \n \n \n \n \n 15\n 40\n 725\n 15\n \n 11\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 605\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n totalsales\n \n extprice\n \n \n \n 540\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n qtyshipped\n \n \n \n \n 405\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n firstdate\n \n \n \n \n 475\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n lastdate\n \n \n \n \n 10\n 0\n 80\n 15\n \n 11\n \n Arial\n 8\n bold\n \n \n \n \n detail\n groupsLit\n \n \n \n \n 100\n 0\n 90\n 15\n \n 11\n \n Arial\n 8\n bold\n \n \n \n \n detail\n groups\n \n \n \n \n 200\n 0\n 190\n 15\n \n 11\n \n Arial\n 8\n bold\n \n \n \n \n detail\n groupsDescrip\n \n \n \n \n 695\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currAbbr\n \n \n \n
\n \n 17\n \n \n \n 105\n 1\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 1\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 19 SubstituteAvailabilityByRootItem \N \n\n Substitue Availability By Root Item\n SubstituteAvailabilityByRootItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n \n \n detail\n SELECT warehous_code,\n item_number,\n item_descrip1,\n item_descrip2,\n formatQty(sub.itemsite_qtyonhand) AS f_qtyonhand,\n formatQty(CASE WHEN(sub.itemsite_useparams) THEN sub.itemsite_reorderlevel ELSE 0.0 END) AS f_reorderlevel,\n sub.itemsite_leadtime as leadtime,\n<? if exists("byDays") ?>\n formatQty(qtyAllocated(sub.itemsite_id, <? value("byDays") ?>)) AS f_allocated,\n formatQty(qtyOrdered(sub.itemsite_id, <? value("byDays") ?>)) AS f_ordered,\n formatQty(sub.itemsite_qtyonhand + qtyOrdered(sub.itemsite_id, <? value("byDays") ?>) - qtyAllocated(sub.itemsite_id, <? value("byDays") ?>)) as f_avail\n<? elseif exists("byDate") ?>\n formatQty(qtyAllocated(sub.itemsite_id, (<? value("byDate") ?> - CURRENT_DATE))) AS f_allocated,\n formatQty(qtyOrdered(sub.itemsite_id, (<? value("byDate") ?> - CURRENT_DATE))) AS f_ordered,\n formatQty(sub.itemsite_qtyonhand + qtyOrdered(sub.itemsite_id, (<? value("byDate") ?> - CURRENT_DATE)) - qtyAllocated(sub.itemsite_id, (<? value("byDate") ?> - CURRENT_DATE))) as f_avail\n<? else ?>\n formatQty(qtyAllocated(sub.itemsite_id, sub.itemsite_leadtime)) AS f_allocated,\n formatQty(qtyOrdered(sub.itemsite_id, sub.itemsite_leadtime)) AS f_ordered,\n formatQty(sub.itemsite_qtyonhand + qtyOrdered(sub.itemsite_id, sub.itemsite_leadtime) - qtyAllocated(sub.itemsite_id, sub.itemsite_leadtime)) as f_avail\n<? endif ?>\n FROM item, itemsite AS sub, itemsite AS root, whsinfo, itemsub\n WHERE ((sub.itemsite_item_id=item_id)\n AND (root.itemsite_item_id=itemsub_parent_item_id)\n AND (sub.itemsite_item_id=itemsub_sub_item_id)\n AND (root.itemsite_warehous_id=sub.itemsite_warehous_id)\n AND (sub.itemsite_warehous_id=warehous_id)\n AND (root.itemsite_item_id=<? value("item_id") ?>)\n<? if exists("warehous_id") ?>\n AND (root.itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nORDER BY itemsub_rank;\n \n \n 221\n \n \n 140\n 140\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n 140\n 100\n 385\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n 140\n 120\n 385\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 140\n 80\n 385\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 41\n \n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 56\n \n \n 65\n 30\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 65\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 330\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyonhand\n \n \n \n \n 10\n 15\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n leadtime\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_avail\n \n \n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ordered\n \n \n \n \n 540\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_reorderlevel\n \n \n \n \n 434\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_allocated\n \n \n \n \n 65\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 65 SummarizedBacklogByWarehouse \N \n\n Summarized Backlog By Site\n SummarizedBacklogByWarehouse\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("custtype_id") ?>\n ( SELECT (custtype_code||'-'||custtype_descrip)\n FROM custtype\n WHERE (custtype_id=<? value("custtype_id") ?>) )\n <? elseif exists("custtype_pattern") ?>\n text(<? value("custtype_pattern") ?>)\n <? else ?>\n text('All Customer Types')\n <? endif ?>\n AS custtype,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("showPrices") ?>\n text('Sales') AS lbl_sales,\n text('Cost') AS lbl_cost,\n text('Margin') AS lbl_margin,\n text('Totals:') AS lbl_totals,\n <? else ?>\n text('') AS lbl_sales,\n text('') AS lbl_cost,\n text('') AS lbl_margin,\n text('') AS lbl_totals,\n <? endif ?>\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate;\n \n \n detail\n SELECT CASE WHEN (cohead_holdtype='P') THEN -1\n ELSE cohead_id\n END AS _coheadid, cohead_id,\n cohead_holdtype, cohead_number, cust_name,\n CASE WHEN (cohead_holdtype='N') THEN <? value("none") ?>\n WHEN (cohead_holdtype='C') THEN <? value("credit") ?>\n WHEN (cohead_holdtype='S') THEN <? value("ship") ?>\n WHEN (cohead_holdtype='P') THEN <? value("pack") ?>\n WHEN (cohead_holdtype='R') THEN <? value("return") ?>\n ELSE <? value("Other") ?>\n END AS f_holdtype,\n formatDate(cohead_orderdate) AS f_orderdate,\n formatDate(MIN(coitem_scheddate)) AS f_scheddate,\n formatDate(cohead_packdate) AS f_packdate,\n <? if exists("showPrices") ?>\n formatMoney( SUM( round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio),2) ) )\n <? else ?>\n text('')\n <? endif ?>\n AS f_sales,\n <? if exists("showPrices") ?>\n formatCost(SUM((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * stdcost(item_id) ) )\n <? else ?>\n text('')\n <? endif ?>\n AS f_cost,\n <? if exists("showPrices") ?>\n formatMoney( SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n ((coitem_price / coitem_price_invuomratio) - stdcost(item_id)) ) )\n <? else ?>\n text('')\n <? endif ?>\n AS f_margin,\n SUM( round( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio),2) ) AS sales,\n SUM((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * stdcost(item_id) ) AS cost,\n SUM((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n ((coitem_price / coitem_price_invuomratio) - stdcost(item_id)) ) AS margin,\n MIN(coitem_scheddate) AS scheddate,\n formatShipmentNumber(shiphead_id) AS shiphead_number,\n CASE WHEN (shiphead_shipped IS NULL) THEN text('')\n WHEN (shiphead_shipped) THEN text('Yes')\n WHEN (NOT shiphead_shipped) THEN text('No')\n END AS shipstatus,\n COALESCE(shiphead_shipvia, '') AS shipvia,\n CASE WHEN (shiphead_shipdate IS NULL) THEN text('')\n ELSE formatDate(shiphead_shipdate)\n END AS shipdate\n FROM coitem, itemsite, item, custinfo,\n cohead LEFT OUTER JOIN shiphead ON (shiphead_order_id=cohead_id AND shiphead_order_type='SO') \n WHERE ( (coitem_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (coitem_status NOT IN ('C','X'))\n AND (coitem_scheddate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id\n FROM custtype\n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nGROUP BY cohead_id, cohead_number, cust_name, cohead_holdtype,\n cohead_orderdate, cohead_packdate, shiphead_shipped,\n shiphead_shipvia, shiphead_shipdate, shiphead_id\nORDER BY \n<? if exists("orderByShipDate") ?>\n scheddate,\n<? elseif exists("orderByPackDate") ?>\n cohead_packdate,\n<? endif ?>\ncohead_number, shiphead_shipped;\n \n \n totals\n SELECT\n<? if exists("showPrices") ?>\n formatMoney( SUM( sales ) ) AS f_sales,\n formatCost( SUM( cost ) ) AS f_cost,\n formatMoney( SUM( margin ) ) AS f_margin\n FROM (\nSELECT SUM( round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n (coitem_price / coitem_price_invuomratio),2) ) AS sales,\n SUM((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * stdcost(item_id) ) AS cost,\n SUM((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n ((coitem_price / coitem_price_invuomratio) - stdcost(item_id)) ) AS margin\n FROM coitem, itemsite, item, custinfo,\n cohead\n WHERE ( (coitem_cohead_id=cohead_id)\n AND (cohead_cust_id=cust_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (coitem_status NOT IN ('C','X'))\n AND (coitem_scheddate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("custtype_id") ?>\n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? elseif exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id\n FROM custtype\n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nGROUP BY cohead_id, cohead_number, cust_name, cohead_holdtype,\n cohead_orderdate, cohead_packdate\n) AS data\n<? else ?>\n text('') AS f_sales,\n text('') AS f_cost,\n text('') AS f_margin\n<? endif ?>\n \n \n 206\n \n 5\n 200\n 745\n 200\n 2\n \n \n \n 670\n 170\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_margin\n \n \n \n \n \n \n \n 140\n 104\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 140\n 85\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n custtype\n \n \n \n \n \n 515\n 85\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 510\n 170\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_sales\n \n \n \n \n \n \n 515\n 104\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 590\n 170\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_cost\n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 28\n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n 585\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_cost\n \n \n \n \n 665\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_margin\n \n \n \n \n \n 505\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_sales\n \n \n \n
\n detail\n \n unnamed\n cohead_id\n \n 18\n \n \n 70\n 0\n 145\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 370\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scheddate\n \n \n \n \n 510\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_sales\n \n \n \n \n 290\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_orderdate\n \n \n \n \n 670\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_margin\n \n \n \n \n 5\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n \n 220\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_holdtype\n \n \n \n \n 590\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cost\n \n \n \n \n 440\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_packdate\n \n \n \n \n \n \n detail\n \n 18\n \n \n 220\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shiphead_number\n \n \n \n \n 5\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipstatus\n \n \n \n \n 70\n 0\n 145\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipvia\n \n \n \n \n 290\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n shipdate\n \n \n \n
\n \n 18\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 18\n \n \n 590\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n totals\n f_cost\n \n \n \n \n 407\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_totals\n \n \n \n \n 510\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n totals\n f_sales\n \n \n \n \n 670\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n totals\n f_margin\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 250 SummarizedGLTransactions \N \n\n Summarized G/L Transactions\n SummarizedGLTransactions\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("source") ?>\n text(<? value("source") ?>)\n <? else ?>\n text('All Sources')\n <? endif ?>\n AS source,\n <? if exists("showUsernames") ?>\n text('Username')\n <? else ?>\n text('')\n <? endif ?>\n AS f_username;\n \n \n detail\n SELECT data.accnt_id AS accnt_id,\n-- account information\n formatGLAccount(data.accnt_id) AS account,\n accnt_descrip,\n f_debit,\n f_credit,\n-- transactionn details\n formatDate(gltrans_date) AS transdate,\n gltrans_source,\n gltrans_doctype,\n gltrans_docnumber,\n gltrans_notes,\n f_debitdetail,\n f_creditdetail,\n <? if exists("showUsernames") ?>\n gltrans_username\n <? else ?>\n text('')\n <? endif ?>\n AS f_username\n FROM ( SELECT accnt_id,\n accnt_number,\n accnt_profit,\n accnt_sub,\n accnt_descrip,\n formatMoney( SUM( CASE WHEN (gltrans_amount < 0) THEN (gltrans_amount * -1)\n ELSE 0\n END ) ) AS f_debit,\n formatMoney( SUM( CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n ELSE 0\n END ) ) AS f_credit\n FROM gltrans, accnt\n WHERE ( (gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted)\n AND (gltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n <? if exists("source") ?>\n AND (gltrans_source=<? value("source") ?>)\n <? endif ?>\n <? if exists("unpostedTransactions") ?>\n AND (NOT gltrans_posted)\n <? elseif exists("postedTransactions") ?>\n AND (gltrans_posted)\n <? endif ?>\n )\n GROUP BY accnt_id, accnt_number, accnt_profit, accnt_sub, accnt_descrip\n ) AS data LEFT OUTER JOIN\n ( SELECT accnt_id,\n gltrans_date,\n gltrans_created,\n gltrans_source,\n gltrans_doctype,\n gltrans_docnumber,\n gltrans_notes,\n gltrans_username,\n CASE WHEN (gltrans_amount < 0) THEN formatMoney(gltrans_amount * -1)\n ELSE ''\n END AS f_debitdetail,\n CASE WHEN (gltrans_amount > 0) THEN formatMoney(gltrans_amount)\n ELSE ''\n END AS f_creditdetail\n FROM gltrans, accnt\n WHERE ((gltrans_accnt_id=accnt_id)\n AND (NOT gltrans_deleted)\n AND (gltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n <? if exists("source") ?>\n AND (gltrans_source=<? value("source") ?>)\n <? endif ?>\n <? if exists("unpostedTransactions") ?>\n AND (NOT gltrans_posted)\n <? elseif exists("postedTransactions") ?>\n AND (gltrans_posted)\n <? endif ?>\n )\n ) AS data2 ON (data.accnt_id=data2.accnt_id)\nORDER BY accnt_number, accnt_profit, accnt_sub, gltrans_date DESC, gltrans_created;\n \n \n 201\n \n \n 5\n 200\n 745\n 200\n 2\n \n \n \n 545\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n 140\n 70\n 290\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n source\n \n \n \n \n \n 665\n 185\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_username\n \n \n \n \n \n \n \n \n 545\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n \n \n 17\n \n \n 28\n \n \n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n 665\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_username\n \n \n \n \n \n
\n detail\n \n detail\n accnt_id\n \n 23\n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 595\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n \n 120\n 0\n 305\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n accnt_descrip\n \n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n \n 14\n \n 112\n 5\n 744\n 5\n 0\n \n \n \n \n \n detail\n \n 24\n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 375\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_doctype\n \n \n \n \n 595\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_creditdetail\n \n \n \n \n 330\n 0\n 36\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_source\n \n \n \n \n 434\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_docnumber\n \n \n \n \n 120\n 0\n 200\n 15\n \n 5\n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_notes\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_username\n \n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debitdetail\n \n \n \n
\n \n 26\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 393 TaxAuthoritiesMasterList \N \n\n Tax Authorities Master List\n TaxAuthoritiesMasterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n taxAuthorities\n detail\n \n \n 128\n \n 5\n 120\n 745\n 120\n 2\n \n \n \n \n \n \n 10\n 38\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n taxauth_code\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n taxauth_name\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 437 TaxHistoryDetail \N \n\n Tax History Detail\n TaxHistoryDetail\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("showSales") ?>\n 'Yes'\n <? else ?>\n 'No'\n <? endif ?>\n AS showSales,\n <? if exists("showPurchases") ?>\n 'Yes'\n <? else ?>\n 'No'\n <? endif ?>\n AS showPurchases,\n <? if exists("groupProper") ?>\n <? value("groupProper") ?> || '=' || <? value("selection") ?>\n <? else ?>\n 'All' \n <? endif ?>\n AS selection,\n <? if exists("distDate") ?>\n text('Distribution Date')\n <? else ?>\n text('Document Date')\n <? endif ?>\n AS basis,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate,\n 'Tax ' || (SELECT curr_symbol \n FROM curr_symbol\n WHERE curr_base) AS taxbaseLit;\n \n \n detail\n <? if exists("showSales") ?>\n------------BEGIN SALES--------------\n-- All sales tax history including memos \nSELECT \n formatDate(taxhist_distdate) AS f_distdate, \n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,<? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n CASE\n WHEN (cohist_doctype != 'C') THEN\n cohist_invcnumber\n ELSE\n cohist_ordernumber\n END AS docnumber, \n <? value("sales") ?> AS source,\n CASE\n WHEN (cohist_doctype='I') THEN\n <? value("invoice") ?>\n WHEN (cohist_doctype='C') THEN\n <? value("creditmemo") ?> \n WHEN (cohist_doctype='D') THEN\n <? value("debitmemo") ?>\n ELSE\n <? value("other") ?>\n END AS doctype,\n item_number, COALESCE(item_descrip1,cohist_misc_descrip) AS description,\n CASE\n WHEN (cohist_doctype != 'C') THEN\n cohist_ordernumber \n END AS ordernumber, cohist_invcdate AS docdate,\n cohist_billtoname AS name, \n formatQty(cohist_qtyshipped) AS f_qty, \n formatSalesPrice(cohist_unitprice) AS f_unitprice, \n formatMoney(cohist_qtyshipped * cohist_unitprice) AS f_amount,\n formatMoney(taxhist_tax) AS f_taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n formatMoney(taxhist_tax / taxhist_curr_rate) AS f_taxbase\nFROM cohisttax\n JOIN cohist ON (cohist_id=taxhist_parent_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (cohist_taxzone_id=taxzone_id)\n LEFT OUTER JOIN itemsite ON (cohist_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n<? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? else ?>\nWHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tax_id") ?>\n AND (taxhist_tax_id=<? value("tax_id") ?>)\n<? endif ?>\n<? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=<? value("taxtype_id") ?>)\n<? endif ?>\n<? if exists("taxclass_id") ?>\n AND (taxclass_id=<? value("taxclass_id") ?>)\n<? endif ?>\n<? if exists("taxauth_id") ?>\n AND (taxauth_id=<? value("taxauth_id") ?>)\n<? endif ?>\n<? if exists("taxzone_id") ?>\n AND (taxzone_id=<? value("taxzone_id") ?>)\n<? endif ?>\n)\n<? endif ?>\n--------------END SALES--------------------\n<? if exists("showPurchases") ?>\n<? if exists("showSales") ?>\n-- Union because sales and purchase shown together\nUNION ALL\n<? endif ?>\n<? endif ?>\n------------BEGIN PURCHASE----------------\n<? if exists("showPurchases") ?>\n-- A/P Memo history\nSELECT \n formatDate(taxhist_distdate) AS f_distdate, \n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n <? value("none") ?> AS taxzone,'' AS taxzone_descrip, curr_abbr, \n apopen_docnumber AS docnumber, \n <? value("purchase") ?> AS source,\n CASE\n WHEN (apopen_doctype='C') THEN\n <? value("creditmemo") ?> \n WHEN (apopen_doctype='D') THEN\n <? value("debitmemo") ?>\n ELSE\n <? value("other") ?>\n END AS doctype,\n '' AS item_number, apopen_notes AS description,\n apopen_ponumber AS ordernumber, apopen_docdate AS docdate,\n vend_name AS name, \n formatQty(1) AS f_qty, \n formatPurchPrice(apopen_amount) AS unitprice, formatMoney(apopen_amount) AS f_amount,\n formatMoney(taxhist_tax) AS f_taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n formatMoney(taxhist_tax / taxhist_curr_rate) AS f_taxbase\nFROM apopentax\n JOIN apopen ON (apopen_id=taxhist_parent_id)\n JOIN vendinfo ON (apopen_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n<? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? else ?>\nWHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tax_id") ?>\n AND (taxhist_tax_id=<? value("tax_id") ?>)\n<? endif ?>\n<? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=<? value("taxtype_id") ?>)\n<? endif ?>\n<? if exists("taxclass_id") ?>\n AND (taxclass_id=<? value("taxclass_id") ?>)\n<? endif ?>\n<? if exists("taxauth_id") ?>\n AND (taxauth_id=<? value("taxauth_id") ?>)\n<? endif ?>\n<? if exists("taxzone_id") ?>\n AND (false)\n<? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nUNION ALL\n--Voucher Header History\nSELECT \n formatDate(taxhist_distdate) AS f_distdate, \n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,<? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n vohead_number AS docnumber, \n <? value("purchase") ?> AS source,\n <? value("voucher") ?> AS doctype,\n '', vohead_notes AS description,\n pohead_number AS ordernumber, vohead_docdate AS docdate,\n vend_name AS name, \n formatQty(1) AS f_qty, \n formatPurchPrice(0) AS f_unitprice, formatMoney(0) AS f_amount,\n formatMoney(taxhist_tax) AS f_taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n formatMoney(taxhist_tax / taxhist_curr_rate) AS f_taxbase\nFROM voheadtax\n JOIN vohead ON (vohead_id=taxhist_parent_id)\n LEFT OUTER JOIN pohead ON (vohead_pohead_id=pohead_id)\n JOIN vendinfo ON (vohead_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)\n<? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? else ?>\nWHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tax_id") ?>\n AND (taxhist_tax_id=<? value("tax_id") ?>)\n<? endif ?>\n<? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=<? value("taxtype_id") ?>)\n<? endif ?>\n<? if exists("taxclass_id") ?>\n AND (taxclass_id=<? value("taxclass_id") ?>)\n<? endif ?>\n<? if exists("taxauth_id") ?>\n AND (taxauth_id=<? value("taxauth_id") ?>)\n<? endif ?>\n<? if exists("taxzone_id") ?>\n AND (taxzone_id=<? value("taxzone_id") ?>)\n<? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nUNION ALL\n--Voucher Line Item\nSELECT \n formatDate(taxhist_distdate) AS f_distdate, \n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,<? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n vohead_number AS docnumber, \n <? value("purchase") ?> AS source,\n <? value("voucher") ?> AS doctype,\n COALESCE(item_number,expcat_code), COALESCE(item_descrip1,expcat_descrip) AS description,\n pohead_number AS ordernumber, vohead_docdate AS docdate,\n vend_name AS name, \n formatQty(voitem_qty) AS f_qty, \n formatPurchPrice(COALESCE(SUM(vodist_amount),0)/voitem_qty) AS unitprice, \n formatMoney(COALESCE(SUM(vodist_amount),0)) AS f_amount,\n formatMoney(taxhist_tax) AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n formatMoney(taxhist_tax / taxhist_curr_rate) AS f_taxbase\nFROM voitemtax\n JOIN voitem ON (voitem_id=taxhist_parent_id)\n JOIN vohead ON (vohead_id=voitem_vohead_id)\n JOIN pohead ON (vohead_pohead_id=pohead_id)\n JOIN poitem ON (voitem_poitem_id=poitem_id)\n JOIN vodist ON ((vodist_poitem_id=poitem_id)\n AND (vodist_vohead_id=vohead_id))\n JOIN vendinfo ON (vohead_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN expcat ON (expcat_id=poitem_expcat_id)\n<? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? else ?>\nWHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tax_id") ?>\n AND (taxhist_tax_id=<? value("tax_id") ?>)\n<? endif ?>\n<? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=<? value("taxtype_id") ?>)\n<? endif ?>\n<? if exists("taxclass_id") ?>\n AND (taxclass_id=<? value("taxclass_id") ?>)\n<? endif ?>\n<? if exists("taxauth_id") ?>\n AND (taxauth_id=<? value("taxauth_id") ?>)\n<? endif ?>\n<? if exists("taxzone_id") ?>\n AND (taxzone_id=<? value("taxzone_id") ?>)\n<? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nGROUP BY taxhist_id,taxhist_distdate,tax_code,tax_descrip,\n taxtype_name,taxtype_descrip,taxclass_code,taxclass_descrip,\n taxauth_code,taxauth_descrip,taxzone,taxzone_descrip,curr_abbr,\n vohead_number,pohead_number,item_number,item_descrip1,\n vohead_curr_id,vohead_distdate,vohead_docdate,vend_name,\n expcat_code,expcat_descrip,taxhist_tax,taxhist_curr_rate,\n voitem_qty\n<? endif ?>\n-------------END PURCHASE--------------\nORDER BY docdate DESC, docnumber DESC\n\n\n \n \n 221\n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 460.577\n 137.571\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 460.577\n 116.571\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 461\n 96\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n basis\n \n \n \n \n \n 141\n 137\n 230\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n selection\n \n \n \n \n 141\n 117\n 230\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showPurchases\n \n \n \n \n \n 141\n 96\n 230\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showSales\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 650\n 182\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n taxbaseLit\n \n \n \n \n \n 6\n \n \n 52\n \n \n 6\n 45\n 746\n 45\n 2\n \n \n \n \n \n \n \n \n \n \n \n 650\n 12\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n taxbaseLit\n \n \n \n
\n detail\n \n \n detail\n \n 37\n \n \n 200\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tax\n \n \n \n \n 100\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n source\n \n \n \n \n 575\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n curr_abbr\n \n \n \n \n 500\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_taxlocal\n \n \n \n \n 5\n 0\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n docnumber\n \n \n \n \n 300\n 16.6\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n description\n \n \n \n \n 300\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 650\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_taxbase\n \n \n \n \n 200\n 16.6\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n docdate\n \n \n \n \n 100\n 16.6\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n doctype\n \n \n \n 6\n 33\n 746\n 33\n 1\n \n \n
\n \n 16\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 23\n \n \n 648\n 4\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n taxbase\n \n money\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 438 TaxHistorySummary \N \n\n Tax History Summary\n TaxHistorySummary\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("showSales") ?>\n 'Yes'\n <? else ?>\n 'No'\n <? endif ?>\n AS showSales,\n <? if exists("showPurchases") ?>\n 'Yes'\n <? else ?>\n 'No'\n <? endif ?>\n AS showPurchases,\n <? value("groupProper") ?> AS group,\n <? value("groupProper") ?> || ':' AS selectionLit,\n <? value("selection") ?> AS selection,\n <? if exists("distDate") ?>\n text('Distribution Date')\n <? else ?>\n text('Document Date')\n <? endif ?>\n AS basis,\n formatDate(<? value("startDate") ?>) AS startdate,\n formatDate(<? value("endDate") ?>) AS enddate;\n \n \n detail\n -----------BEGIN SUMMARY----------\nSELECT <? literal("groupBy") ?> AS group, \n <? literal("groupBy") ?>_descrip AS description, \n formatMoney(SUM(salesbase)) AS f_salesbase,\n formatMoney(SUM(freightbase)) AS f_freightbase, \n CASE WHEN (SUM(freighttax) > 0) THEN true ELSE false END AS freighttax, \n SUM(salestaxbase) AS salestaxbase,\n formatMoney(SUM(salestaxbase)) AS f_salestaxbase,\n formatMoney(SUM(purchasebase)) AS f_purchasebase,\n SUM(purchasetaxbase) * -1 AS purchasetaxbase, \n formatMoney(SUM(purchasetaxbase) * -1) AS f_purchasetaxbase, \n SUM(salestaxbase) + SUM(purchasetaxbase) AS nettaxbase,\n formatMoney(SUM(salestaxbase) + SUM(purchasetaxbase)) AS f_nettaxbase\nFROM (\n------------END SUMMARY--------------\n<? if exists("showSales") ?>\n------------BEGIN SALES--------------\n-- All sales tax history including memos \nSELECT \n taxhist_distdate, \n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,<? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n CASE\n WHEN (cohist_doctype != 'C') THEN\n cohist_invcnumber\n ELSE\n cohist_ordernumber\n END AS docnumber, \n <? value("sales") ?> AS source,\n CASE\n WHEN (cohist_doctype='I') THEN\n <? value("invoice") ?>\n WHEN (cohist_doctype='C') THEN\n <? value("creditmemo") ?> \n WHEN (cohist_doctype='D') THEN\n <? value("debitmemo") ?>\n ELSE\n <? value("other") ?>\n END AS doctype,\n item_number, COALESCE(item_descrip1,cohist_misc_descrip) AS description,\n CASE\n WHEN (cohist_doctype != 'C') THEN\n cohist_ordernumber \n END AS ordernumber, cohist_invcdate AS docdate,\n cohist_billtoname AS name, \n cohist_qtyshipped AS qty, \n cohist_unitprice AS unitprice, (cohist_qtyshipped * cohist_unitprice) AS amount,\n CASE\n WHEN (cohist_misc_type IS NULL OR cohist_misc_type IN ('M','F')) THEN\n currToBase(cohist_curr_id, cohist_qtyshipped * cohist_unitprice, cohist_invcdate) \n ELSE 0\n END AS salesbase,\n CASE\n WHEN (cohist_misc_type = 'F') THEN\n currToBase(cohist_curr_id, cohist_qtyshipped * cohist_unitprice, cohist_invcdate) \n ELSE 0\n END AS freightbase,\n CASE\n WHEN (cohist_misc_type = 'F') THEN\n taxhist_tax / taxhist_curr_rate\n ELSE 0\n END AS freighttax,\n 0 AS purchasebase,\n taxhist_tax AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n taxhist_tax / taxhist_curr_rate AS salestaxbase,\n 0 AS purchasetaxbase\nFROM cohisttax\n JOIN cohist ON (cohist_id=taxhist_parent_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (cohist_taxzone_id=taxzone_id)\n LEFT OUTER JOIN itemsite ON (cohist_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n<? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? else ?>\nWHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tax_id") ?>\n AND (taxhist_tax_id=<? value("tax_id") ?>)\n<? endif ?>\n<? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=<? value("taxtype_id") ?>)\n<? endif ?>\n<? if exists("taxclass_id") ?>\n AND (taxclass_id=<? value("taxclass_id") ?>)\n<? endif ?>\n<? if exists("taxauth_id") ?>\n AND (taxauth_id=<? value("taxauth_id") ?>)\n<? endif ?>\n<? if exists("taxzone_id") ?>\n AND (taxzone_id=<? value("taxzone_id") ?>)\n<? endif ?>\n)\n<? endif ?>\n--------------END SALES--------------------\n<? if exists("showPurchases") ?>\n<? if exists("showSales") ?>\n-- Union because sales and purchase shown together\nUNION ALL\n<? endif ?>\n<? endif ?>\n------------BEGIN PURCHASE----------------\n<? if exists("showPurchases") ?>\n-- A/P Memo history\nSELECT \n taxhist_distdate, \n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n <? value("none") ?> AS taxzone,'' AS taxzone_descrip, curr_abbr, \n apopen_docnumber AS docnumber, \n <? value("purchase") ?> AS source,\n CASE\n WHEN (apopen_doctype='C') THEN\n <? value("creditmemo") ?> \n WHEN (apopen_doctype='D') THEN\n <? value("debitmemo") ?>\n ELSE\n <? value("other") ?>\n END AS doctype,\n '' AS item_number, apopen_notes AS description,\n apopen_ponumber AS ordernumber, apopen_docdate AS docdate,\n vend_name AS name, \n 1 AS qty, \n apopen_amount AS unitprice, apopen_amount AS amount,\n 0 AS salesbase,\n 0 AS freightbase,\n 0 AS freighttax,\n apopen_amount / apopen_curr_rate AS purchasebase,\n taxhist_tax AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n 0 AS salestaxbase,\n taxhist_tax / taxhist_curr_rate AS purchasetaxbase\nFROM apopentax\n JOIN apopen ON (apopen_id=taxhist_parent_id)\n JOIN vendinfo ON (apopen_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n<? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? else ?>\nWHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tax_id") ?>\n AND (taxhist_tax_id=<? value("tax_id") ?>)\n<? endif ?>\n<? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=<? value("taxtype_id") ?>)\n<? endif ?>\n<? if exists("taxclass_id") ?>\n AND (taxclass_id=<? value("taxclass_id") ?>)\n<? endif ?>\n<? if exists("taxauth_id") ?>\n AND (taxauth_id=<? value("taxauth_id") ?>)\n<? endif ?>\n<? if exists("taxzone_id") ?>\n AND (false)\n<? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nUNION ALL\n--Voucher Header History\nSELECT \n taxhist_distdate, \n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,<? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n vohead_number AS docnumber, \n <? value("purchase") ?> AS source,\n <? value("voucher") ?> AS doctype,\n '', vohead_notes AS description,\n pohead_number AS ordernumber, vohead_docdate AS docdate,\n vend_name AS name, \n 1 AS qty, \n 0 AS unitprice, 0 AS amount,\n 0 AS salesbase,\n 0 AS freightbase,\n 0 AS freighttax,\n 0 AS purchasebase,\n taxhist_tax AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n 0 AS salestaxbase,\n taxhist_tax / taxhist_curr_rate AS purchasetaxbase\nFROM voheadtax\n JOIN vohead ON (vohead_id=taxhist_parent_id)\n LEFT OUTER JOIN pohead ON (vohead_pohead_id=pohead_id)\n JOIN vendinfo ON (vohead_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)\n<? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? else ?>\nWHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tax_id") ?>\n AND (taxhist_tax_id=<? value("tax_id") ?>)\n<? endif ?>\n<? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=<? value("taxtype_id") ?>)\n<? endif ?>\n<? if exists("taxclass_id") ?>\n AND (_taxclass_id=<? value("taxclass_id") ?>)\n<? endif ?>\n<? if exists("taxauth_id") ?>\n AND (taxauth_id=<? value("taxauth_id") ?>)\n<? endif ?>\n<? if exists("taxzone_id") ?>\n AND (taxzone_id=<? value("taxzone_id") ?>)\n<? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nUNION ALL\n--Voucher Line Item\nSELECT \n taxhist_distdate, \n tax_code AS tax, tax_descrip,\n COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,\n COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,\n COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n COALESCE(taxzone_code,<? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n vohead_number AS docnumber, \n <? value("purchase") ?> AS source,\n <? value("voucher") ?> AS doctype,\n COALESCE(item_number,expcat_code), COALESCE(item_descrip1,expcat_descrip) AS description,\n pohead_number AS ordernumber, vohead_docdate AS docdate,\n vend_name AS name, \n voitem_qty AS qty, \n COALESCE(SUM(vodist_amount),0)/voitem_qty AS unitprice, COALESCE(SUM(vodist_amount),0) AS amount,\n 0 AS salesbase,\n 0 AS freightbase,\n 0 AS freighttax,\n currToBase(vohead_curr_id, COALESCE(SUM(vodist_amount),0), vohead_distdate) AS purchasebase,\n taxhist_tax AS taxlocal,\n taxhist_tax / taxhist_curr_rate AS taxbase,\n 0 AS salestaxbase,\n taxhist_tax / taxhist_curr_rate AS purchasetaxbase\nFROM voitemtax\n JOIN voitem ON (voitem_id=taxhist_parent_id)\n JOIN vohead ON (vohead_id=voitem_vohead_id)\n JOIN pohead ON (vohead_pohead_id=pohead_id)\n JOIN poitem ON (voitem_poitem_id=poitem_id)\n JOIN vodist ON ((vodist_poitem_id=poitem_id)\n AND (vodist_vohead_id=vohead_id))\n JOIN vendinfo ON (vohead_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN expcat ON (expcat_id=poitem_expcat_id)\n<? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? else ?>\nWHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>\n AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("tax_id") ?>\n AND (taxhist_tax_id=<? value("tax_id") ?>)\n<? endif ?>\n<? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=<? value("taxtype_id") ?>)\n<? endif ?>\n<? if exists("taxclass_id") ?>\n AND (taxclass_id=<? value("taxclass_id") ?>)\n<? endif ?>\n<? if exists("taxauth_id") ?>\n AND (taxauth_id=<? value("taxauth_id") ?>)\n<? endif ?>\n<? if exists("taxzone_id") ?>\n AND (taxzone_id=<? value("taxzone_id") ?>)\n<? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nGROUP BY taxhist_id,taxhist_distdate,tax_code,tax_descrip,\n taxtype_name,taxtype_descrip,taxclass_code,taxclass_descrip,\n taxauth_code,taxauth_descrip,taxzone,taxzone_descrip,curr_abbr,\n vohead_number,pohead_number,item_number,item_descrip1,\n vohead_curr_id,vohead_distdate,vohead_docdate,vend_name,\n expcat_code,expcat_descrip,taxhist_tax,taxhist_curr_rate,\n voitem_qty\n<? endif ?>\n-------------END PURCHASE--------------\nORDER BY docdate DESC, docnumber DESC\n\n) AS data\nGROUP BY <? literal("groupBy") ?>, <? literal("groupBy") ?>_descrip\nORDER BY <? literal("groupBy") ?>\n\n\n \n \n 221\n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 141\n 138\n 230\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n selection\n \n \n \n \n \n \n 460.577\n 137.571\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n \n \n 460.577\n 116.571\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 461\n 96\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n basis\n \n \n \n \n \n 141\n 117\n 230\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n group\n \n \n \n \n 65.6\n 138\n 65.9\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n selectionLit\n \n \n \n \n 4\n 199\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n group\n \n \n \n \n \n \n 141\n 97\n 230\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showPurchases\n \n \n \n \n \n 141\n 76\n 230\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n showSales\n \n \n \n \n \n \n 6\n \n \n 26\n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n \n 0\n 2\n 100\n 20\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n group\n \n \n \n \n
\n detail\n \n \n detail\n \n 19\n \n \n 200\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_freightbase\n \n \n \n \n 100\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_salesbase\n \n \n \n \n 550\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_purchasetaxbase\n \n \n \n \n 450\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_purchasebase\n \n \n \n \n 0\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n group\n \n \n \n \n 350\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_salestaxbase\n \n \n \n \n 300\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n freighttax\n \n \n \n \n 650\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_nettaxbase\n \n \n \n
\n \n 16\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 20\n \n \n 650\n 3\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n nettaxbase\n \n money\n \n \n \n 350\n 3\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n salestaxbase\n \n qty\n \n \n \n 551\n 3\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n purchasetaxbase\n \n money\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 394 TaxTypesMasterList \N \n\n Tax Types Master List\n TaxTypesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select taxtype_name, taxtype_descrip\n from taxtype\norder by taxtype_name;\n \n \n 76\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n taxtype_name\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n taxtype_descrip\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 74 TermsMasterList \N \n\n Terms Master List\n TermsMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select terms_code, terms_descrip,\n terms_duedays, terms_discdays,\n formatScrap(terms_discprcnt) AS f_discprcnt\n from terms\norder by terms_code;\n \n \n 76\n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 495\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n terms_duedays\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n terms_discdays\n \n \n \n \n 95\n 0\n 395\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n terms_descrip\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n terms_code\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_discprcnt\n \n \n \n
\n \n 16\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 136 TimePhasedAvailability \N \n\n Time Phased Availability\n TimePhasedAvailability\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("plancode_id") ?>\n ( SELECT (plancode_code || '-' || plancode_name)\n FROM plancode\n WHERE (plancode_id=<? value("plancode_id") ?>) )\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plncode;\n \n \n detail\n SELECT findPeriodStart(rcalitem_id) AS pstart,\n findPeriodEnd(rcalitem_id) AS pend,\n (formatDate(findPeriodStart(rcalitem_id)) || '-' || formatDate(findPeriodEnd(rcalitem_id))) AS period,\n item_number,\n uom_name AS f_uom,\n warehous_code,\n formatQty(qtyAvailable(itemsite_id, findPeriodStart(rcalitem_id))) AS f_unit\n FROM rcalitem, itemsite, item, uom, whsinfo\n WHERE ((rcalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN ( SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? endif ?>\n )\n UNION\nSELECT findPeriodStart(acalitem_id) AS pstart,\n findPeriodEnd(acalitem_id) AS pend,\n (formatDate(findPeriodStart(acalitem_id)) || '-' || formatDate(findPeriodEnd(acalitem_id))) AS period,\n item_number,\n uom_name AS f_uom,\n warehous_code,\n formatQty(qtyAvailable(itemsite_id, findPeriodStart(acalitem_id))) AS f_unit\n FROM acalitem, itemsite, item, uom, whsinfo\n WHERE ((acalitem_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN ( SELECT plancode_id\n FROM plancode\n WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? endif ?>\n )\nORDER BY pstart, item_number, warehous_code;\n \n \n 221\n \n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n 140\n 105\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 140\n 80\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plncode\n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n detail\n pstart\n \n 6\n \n \n 10\n 5\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n \n \n detail\n \n 16\n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unit\n \n \n \n \n 530\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_uom\n \n \n \n \n 615\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 320\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n
\n \n 16\n \n \n \n 690\n 0\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 252 TimePhasedOpenARItems \N \n\n Time Phased Open A/R Items\n TimePhasedOpenARItems\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("cust_id") ?>\n ( SELECT cust_name\n FROM custinfo\n WHERE (cust_id=<? value("cust_id") ?>) )\n <? elseif exists("custtype_id") ?>\n ( SELECT (custtype_code || '-' || custtype_descrip)\n FROM custtype\n WHERE (custtype_id=<? value("custtype_id") ?>) )\n <? elseif exists("custgrp_id") ?>\n ( SELECT (custgrp_name || '-' || custgrp_descrip)\n\t FROM custgrp\n WHERE (custgrp_id=<? value("custgrp_id") ?>) )\n <? elseif exists("custtype_pattern") ?>\n text(<? value("custtype_pattern") ?>)\n <? else ?>\n text('All Customers')\n <? endif ?>\n AS f_value,\n <? if reExists("custtype_.*") ?>\n text('Customer Type:')\n <? elseif exists("custgrp_id") ?>\n text('Customer Group:')\n <? else ?>\n text('Customer:')\n <? endif ?>\n AS f_label;\n \n \n \n detail\n SELECT pstart, pend,\n period,\n cust_number, cust_name,\n value,\n formatMoney(value) AS f_value\n FROM (\n SELECT calitem_start AS pstart,\n calitem_end AS pend,\n (formatDate(calitem_start) || '-' || formatDate(calitem_end)) AS period,\n cust_number,\n cust_name,\n openARItemsValue(cust_id, calitem_id) AS value\n FROM custinfo LEFT OUTER JOIN custgrpitem ON (cust_id=custgrpitem_cust_id)\n LEFT OUTER JOIN custgrp ON (custgrpitem_custgrp_id=custgrp_id),\n ( SELECT rcalitem_id AS calitem_id,\n findPeriodStart(rcalitem_id) AS calitem_start,\n findPeriodEnd(rcalitem_id) AS calitem_end\n FROM rcalitem\n WHERE (rcalitem_id IN (\n <? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n <? endforeach ?>\n )\n )\n UNION\n SELECT acalitem_id AS calitem_id,\n findPeriodStart(acalitem_id) AS calitem_start,\n findPeriodEnd(acalitem_id) AS calitem_end\n FROM acalitem\n WHERE (acalitem_id IN (\n <? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n <? endforeach ?>\n )\n )\n ) AS calitem\n <? if exists("cust_id") ?>\n WHERE (cust_id=<? value("cust_id") ?>)\n <? elseif exists("custtype_id") ?>\n WHERE (cust_custtype_id=<? value("custtype_id") ?>)\n <? elseif exists("custgrp_id") ?>\n WHERE (custgrp_id=<? value("custgrp_id") ?>)\n <? elseif exists("custtype_pattern") ?>\n WHERE (cust_custtype_id IN (SELECT custtype_id\n FROM custtype\n WHERE (custtype_code ~ <? value("custtype_pattern") ?>) ))\n <? endif ?>\n ) AS data\n WHERE (value != 0)\nORDER BY pstart, pend, cust_number\n\n \n \n 222\n \n \n \n 10\n 100\n 125\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n f_label\n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 140\n 100\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_value\n \n \n \n \n \n 7\n \n \n 22\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n detail\n pstart\n \n 7\n \n \n 10\n 5\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n 27\n \n 635\n 5\n 745\n 5\n 0\n \n \n \n 645\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n value\n \n money\n \n \n \n \n \n \n detail\n \n 17\n \n \n 430\n 0\n 210\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 320\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n \n \n
\n \n 17\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 690\n 0\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 273 TimePhasedPlannedRevenueExpensesByPlannerCode \N \n\n Time Phased Planned Revenue/Expenses By Planner Code\n TimePhasedPlannedRevenueExpensesByPlannerCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("plancode_id") ?>\n ( SELECT (plancode_code || '-' || plancode_name)\n FROM plancode\n WHERE (plancode_id=<? value("plancode_id") ?>) )\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plncode;\n \n \n detail\n SELECT (formatDate(calitem_startdate) || '-' || formatDate(calitem_enddate)) AS period,\n formatMoney(COALESCE(cost,0.0)) AS f_cost,\n formatMoney(COALESCE(revenue,0.0)) AS f_revenue,\n formatMoney(COALESCE(revenue,0.0) - COALESCE(cost,0.0)) AS f_profit\n FROM ( SELECT calitem_startdate,\n calitem_enddate,\n SUM(plannedCost(plancode_id, warehous_id,\n <? if exists("actualCost") ?>'A'<? else ?>'S'<? endif ?>\n , calitem_id))\n AS cost,\n <? if exists("averagePrice") ?>\n SUM(plannedRevenue(plancode_id, warehous_id, 'A', calitem_id,\n <? value("startEvalDate") ?>, <? value("endEvalDate") ?>))\n <? else ?>\n SUM(plannedRevenue(plancode_id, warehous_id, 'L', calitem_id))\n <? endif ?>\n AS revenue\n FROM plancode, whsinfo,\n ( SELECT rcalitem_id AS calitem_id,\n findPeriodStart(rcalitem_id) AS calitem_startdate,\n findPeriodEnd(rcalitem_id) AS calitem_enddate\n FROM rcalitem\n WHERE (rcalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n UNION\n SELECT acalitem_id AS calitem_id,\n findPeriodStart(acalitem_id) AS calitem_startdate,\n findPeriodEnd(acalitem_id) AS calitem_enddate\n FROM acalitem\n WHERE (acalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n ) AS calitem\n WHERE ((TRUE)\n<? if exists("warehous_id") ?>\n AND (warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (plancode_code ~ <? value("plancode_pattern") ?>)\n<? endif ?>\n )\n GROUP BY calitem_startdate, calitem_enddate\n ) AS data\nORDER BY calitem_startdate\n \n \n 221\n \n \n 140\n 105\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n \n \n 140\n 80\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plncode\n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 6\n \n \n 26\n \n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 430\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_cost\n \n \n \n \n 10\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n 640\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_profit\n \n \n \n \n 535\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_revenue\n \n \n \n
\n \n 16\n \n \n 690\n 0\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 478 TimePhasedBookings \N \n\n Time Phased Bookings\n TimePhasedBookings\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("byCust") ?>\n text('Customer')\n <? elseif exists("byProdcat") ?>\n text('Product Category')\n <? else ?>\n text('Item')\n <? endif ?>\n AS groupby,\n <? if exists("byCust") ?>\n text('Name')\n <? else ?>\n text('Description')\n <? endif ?>\n AS groupbyDescrip,\n <? if exists("salesDollars") ?>\n text('')\n <? else ?>\n text('UOM')\n <? endif ?>\n AS lbl_uom,\n <? if exists("inventoryUnits") ?>\n text('Qty.')\n <? elseif exists("capacityUnits") ?>\n text('Capacity')\n <? elseif exists("altCapacityUnits") ?>\n text('Alt. Capacity')\n <? elseif exists("salesDollars") ?>\n text('Sales')\n <? else ?>\n text('ERROR')\n <? endif ?>\n AS lbl_unittype; \n \n \n detail\n SELECT *, \n coalesce(unit,0) AS unit, \n<? if exists("salesDollars") ?>\n formatExtPrice(coalesce(unit,0)) AS f_unit\n<? else ?>\n formatQty(coalesce(unit,0)) AS f_unit\n<? endif ?>\nFROM\n-- Outer Table Query\n(SELECT DISTINCT\n calitem_id,\n findPeriodStart(calitem_id) AS pstart,\n findPeriodEnd(calitem_id) AS pend,\n (formatDate(findPeriodStart(calitem_id)) || '-' || formatDate(findPeriodEnd(calitem_id))) AS period,\n<? if exists("byCust") ?>\n cust_id, cust_number AS f_number, cust_name AS f_description\n<? elseif exists("byProdcat") ?>\n prodcat_id, prodcat_code AS f_number, prodcat_descrip AS f_description\n<? elseif exists("byItem") ?>\n item_id, item_number AS f_number, item_descrip1 AS f_description\n<? endif ?>\n , warehous_id, warehous_code\n<? if exists("salesDollars") ?>\n , <? value("baseCurrAbbr") ?>::text AS f_uom\n<? else ?>\n <? if exists("inventoryUnits") ?>\n , uom_name AS f_uom\n <? elseif exists("capacityUnits") ?>\n , itemcapuom(item_id) AS f_uom\n <? elseif exists("altCapacityUnits") ?>\n , itemaltcapuom(item_id) AS f_uom\n <? endif ?>\n<? endif ?>\nFROM coitem\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n JOIN itemsite ON (coitem_itemsite_id=itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n<? if exists("inventoryUnits") ?>\n JOIN uom ON (item_inv_uom_id=uom_id)\n<? endif ?>\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n<? if reExists("[cC]ust") ?>\n JOIN custinfo ON (cohead_cust_id=cust_id)\n<? endif ?> \n<? if reExists("[pP]rodcat") ?>\n JOIN prodcat ON (item_prodcat_id=prodcat_id)\n<? endif ?>\n , ( SELECT rcalitem_id AS calitem_id,\n findPeriodStart(rcalitem_id) AS calitem_start,\n findPeriodEnd(rcalitem_id) AS calitem_end\n FROM rcalitem\n WHERE (rcalitem_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n )\n )\n UNION\n SELECT acalitem_id AS calitem_id,\n findPeriodStart(acalitem_id) AS calitem_start,\n findPeriodEnd(acalitem_id) AS calitem_end\n FROM acalitem\n WHERE (acalitem_id IN (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n )\n )\n ) AS calitem\nWHERE ((cohead_orderdate BETWEEN\n<? foreach("period_id_list") ?>\n <? if isfirst("period_id_list") ?>\n findPeriodStart(<? value("period_id_list") ?>)\n <? endif ?>\n <? if isLast("period_id_list") ?>\n AND findPeriodEnd(<? value("period_id_list") ?>)\n <? endif ?>\n<? endforeach ?>\n)\n AND (coitem_status != 'X')\n<? if exists("item_id") ?> \n AND (item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("cust_id") ?> \n AND (cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?> \n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? endif ?>\n<? if exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id \n FROM custtype \n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("prodcat_id") ?> \n AND (item_prodcat_id=<? value("prodcat_id") ?>) \n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT prodcat_id \n FROM prodcat \n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n<? endif ?>\n<? if exists("warehous_id") ?> \n AND(itemsite_warehous_id=<? value("warehous_id") ?>) \n<? endif ?>\n )\nORDER BY pstart, f_number, f_description, f_uom, warehous_code) list\nLEFT OUTER JOIN\n-- Bookings calcuations\n-- Loop through each period bucket to find bookings for period\n(<? foreach("period_id_list") ?>\n SELECT \n <? value("period_id_list") ?> AS calitem_id,\n warehous_id,\n<? if exists("byCust") ?>\n cust_id\n<? elseif exists("byProdcat") ?>\n prodcat_id \n<? elseif exists("byItem") ?>\n item_id\n<? endif ?>\n<? if exists("salesDollars") ?>\n , sum(round((coitem_qtyord * coitem_qty_invuomratio) * (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2)) AS unit\n , <? value("baseCurrAbbr") ?>::text AS f_uom\n<? else ?>\n , sum(coitem_qtyord)\n <? if exists("capacityUnits") ?>\n * itemcapinvrat(item_id)\n <? elseif exists("altCapacityUnits") ?>\n * itemaltcapinvrat(item_id)\n <? endif ?>\n AS unit\n <? if exists("inventoryUnits") ?>\n , uom_name AS f_uom\n <? elseif exists("capacityUnits") ?>\n , itemcapuom(item_id) AS f_uom\n <? elseif exists("altCapacityUnits") ?>\n , itemaltcapuom(item_id) AS f_uom\n <? endif ?>\n<? endif ?>\n FROM coitem\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n JOIN itemsite ON (coitem_itemsite_id=itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n<? if exists("inventoryUnits") ?>\n JOIN uom ON (item_inv_uom_id=uom_id)\n<? endif ?>\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n<? if reExists("[cC]ust") ?>\n JOIN custinfo ON (cohead_cust_id=cust_id)\n<? endif ?> \n<? if reExists("[pP]rodcat") ?>\n JOIN prodcat ON (item_prodcat_id=prodcat_id)\n<? endif ?>\n WHERE ((cohead_orderdate BETWEEN findPeriodStart(<? value("period_id_list") ?>) AND findPeriodEnd(<? value("period_id_list") ?>))\n AND (coitem_status != 'X')\n<? if exists("item_id") ?> \n AND (item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("cust_id") ?> \n AND (cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?> \n AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? endif ?>\n<? if exists("custtype_pattern") ?>\n AND (cust_custtype_id IN (SELECT custtype_id \n FROM custtype \n WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("prodcat_id") ?> \n AND (item_prodcat_id=<? value("prodcat_id") ?>) \n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n AND (item_prodcat_id IN (SELECT prodcat_id \n FROM prodcat \n WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n<? endif ?>\n<? if exists("warehous_id") ?> \n AND(itemsite_warehous_id=<? value("warehous_id") ?>) \n<? endif ?>\n )\nGROUP BY\n<? if exists("byCust") ?>\n cust_id, \n <? if exists("capacityUnits") ?>\n item_id,\n <? elseif exists("altCapacityUnits") ?>\n item_id,\n <? endif ?>\n<? elseif exists("byProdcat") ?>\n prodcat_id,\n <? if exists("capacityUnits") ?>\n item_id,\n <? elseif exists("altCapacityUnits") ?>\n item_id,\n <? endif ?>\n<? elseif exists("byItem") ?>\n item_id,\n<? endif ?>\n f_uom, warehous_id\n <? if isLast("period_id_list") ?>\n <? else ?>\nUNION\n <? endif ?>\n<? endforeach ?> \n) bookings ON\n<? if exists("byCust") ?>\n (list.cust_id=bookings.cust_id)\n<? elseif exists("byProdcat") ?>\n (list.prodcat_id=bookings.prodcat_id)\n<? elseif exists("byItem") ?>\n (list.item_id=bookings.item_id)\n<? endif ?>\n AND (list.calitem_id=bookings.calitem_id)\n AND (list.warehous_id=bookings.warehous_id)\n AND (list.f_uom=bookings.f_uom)\n \n \n 221\n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 660\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unittype\n \n \n \n \n 530\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_uom\n \n \n \n \n \n 220\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n groupby\n \n \n \n \n 330\n 200\n 200\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n groupbyDescrip\n \n \n \n \n 10\n 33\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n 530\n -1\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_uom\n \n \n \n \n 660\n -1\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unittype\n \n \n \n \n 215\n -1\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n groupby\n \n \n \n \n 330\n -1\n 200\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n groupbyDescrip\n \n \n \n
\n detail\n \n detail\n pstart\n \n 6\n \n \n 10\n 5\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n 31\n \n \n 660\n 5\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n unit\n \n extprice\n \n \n \n 640\n 0\n 745\n 0\n 0\n \n \n \n \n \n \n detail\n \n 16\n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unit\n \n \n \n \n 615\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 530\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_uom\n \n \n \n \n 220\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_number\n \n \n \n \n 330\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_description\n \n \n \n
\n \n 16\n \n \n \n 95\n -1\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 690\n -1\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 199 TimePhasedDemandByPlannerCode \N \n\n Time Phased Demand By Planner Code\n TimePhasedDemandByPlannerCode\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("plancode_id") ?>\n ( SELECT (plancode_code||'-'||plancode_name)\n FROM plancode\n WHERE plancode_id=<? value("plancode_id") ?>)\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plancode,\n <? if exists("inventoryUnits") ?>\n text('Qty.')\n <? elseif exists("capacityUnits") ?>\n text('Capacity')\n <? elseif exists("altCapacityUnits") ?>\n text('Alt. Capacity')\n <? else ?>\n text('ERROR')\n <? endif ?>\n AS lbl_unittype ;\n \n \n detail\n SELECT findPeriodStart(calitem_id) AS pstart,\n findPeriodEnd(calitem_id) AS pend,\n (formatDate(findPeriodStart(calitem_id)) || '-' || formatDate(findPeriodEnd(calitem_id))) AS period,\n plancode_code,\n <? if exists("inventoryUnits") ?>\n uom_name\n <? elseif exists("capacityUnits") ?>\n itemcapuom(item_id)\n <? elseif exists("altCapacityUnits") ?>\n itemaltcapuom(item_id)\n <? else ?>\n text('')\n <? endif ?>\n AS f_uom,\n warehous_code,\n <? if exists("inventoryUnits") ?>\n formatQty(SUM(summDemand(itemsite_id, calitem_id)))\n <? elseif exists("capacityUnits") ?>\n formatQty(SUM(summDemand(itemsite_id, calitem_id) * itemcapinvrat(item_id)))\n <? elseif exists("altCapacityUnits") ?>\n formatQty(SUM(summDemand(itemsite_id, calitem_id) * itemaltcapinvrat(item_id)))\n <? else ?>\n formatQty(SUM(summDemand(itemsite_id, calitem_id)))\n <? endif ?>\n AS f_unit\n FROM itemsite, item, uom, whsinfo, plancode,\n (SELECT rcalitem_id AS calitem_id\n FROM rcalitem\n WHERE (rcalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n UNION\n SELECT acalitem_id as calitem_id\n FROM acalitem\n WHERE (acalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n ) AS calitem\n WHERE ((itemsite_warehous_id=warehous_id)\n AND (itemsite_active)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_plancode_id=plancode_id)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (plancode_code ~ <? value("plancode_pattern") ?>)\n<? endif ?>\n )\nGROUP BY pstart, pend, period, plancode_code, warehous_code, f_uom\nORDER BY pstart, plancode_code, warehous_code, f_uom;\n \n \n 221\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 660\n 200\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unittype\n \n \n \n \n 140\n 105\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n 140\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plancode\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_unittype\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n detail\n pstart\n \n 6\n \n \n 10\n 5\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n \n \n detail\n \n 16\n \n \n 320\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n plancode_code\n \n \n \n \n 615\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 530\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_uom\n \n \n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unit\n \n \n \n
\n \n 16\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 690\n 0\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 201 TimePhasedProductionByItem \N \n\n Time Phased Production By Item\n TimePhasedProductionByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("plancode_id") ?>\n ( SELECT (plancode_code||'-'||plancode_name)\n FROM plancode\n WHERE plancode_id=<? value("plancode_id") ?>)\n <? elseif exists("plancode_pattern") ?>\n text(<? value("plancode_pattern") ?>)\n <? else ?>\n text('All Planner Codes')\n <? endif ?>\n AS plancode ;\n \n \n detail\n SELECT findPeriodStart(calitem_id) AS pstart,\n findPeriodEnd(calitem_id) AS pend,\n (formatDate(findPeriodStart(calitem_id)) || '-' || formatDate(findPeriodEnd(calitem_id))) AS period,\n item_number,\n uom_name,\n warehous_code,\n formatQty(SUM(summProd(itemsite_id, calitem_id))) AS f_unit\n FROM itemsite, item, uom, whsinfo,\n (SELECT rcalitem_id AS calitem_id\n FROM rcalitem\n WHERE (rcalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n UNION\n SELECT acalitem_id as calitem_id\n FROM acalitem\n WHERE (acalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n ) AS calitem\n WHERE ((itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? endif ?>\n )\nGROUP BY pstart, pend, period, item_number, warehous_code, uom_name\nORDER BY pstart, item_number, warehous_code;\n \n \n 221\n \n \n 140\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n plancode\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n 140\n 105\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n detail\n pstart\n \n 6\n \n \n 10\n 5\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n \n \n detail\n \n 16\n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_unit\n \n \n \n \n 615\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 320\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 530\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n
\n \n 16\n \n \n 690\n 0\n 51\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 372 TimePhasedStatisticsByItem \N \n\n Time Phased Usage Statistics By Item\n TimePhasedStatisticsByItem\n Shows graph\n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Warehouses')\n <? endif ?>\n AS warehouse\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n \n \n detail\n SELECT calitem_pstart AS pstart,\n calitem_pend AS pend,\n (formatDate(calitem_pstart) || '-' || formatDate(calitem_pend)) AS period,\n warehous_code,\n formatQty(summTransR(itemsite_id, calitem_id)) AS received,\n formatQty(summTransI(itemsite_id, calitem_id)) AS issued,\n formatQty(summTransS(itemsite_id, calitem_id)) AS sold,\n formatQty(summTransC(itemsite_id, calitem_id)) AS scrap,\n formatQty(summTransA(itemsite_id, calitem_id)) AS adjustments,\n--\n summTransR(itemsite_id, calitem_id) AS a_received,\n summTransI(itemsite_id, calitem_id) AS a_issued,\n summTransS(itemsite_id, calitem_id) AS a_sold,\n summTransC(itemsite_id, calitem_id) AS a_scrap,\n summTransA(itemsite_id, calitem_id) AS a_adjustments\n\n FROM itemsite, whsinfo,\n\n ( SELECT rcalitem_id as calitem_id,\n findPeriodStart(rcalitem_id) as calitem_pstart,\n findPeriodEnd(rcalitem_id) as calitem_pend\n FROM rcalitem\n WHERE (rcalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n UNION\n SELECT acalitem_id as calitem_id,\n findPeriodStart(acalitem_id) as calitem_pstart,\n findPeriodEnd(acalitem_id) as calitem_pend\n FROM acalitem\n WHERE (acalitem_id in (\n<? foreach("period_id_list") ?>\n <? if not isfirst("period_id_list") ?>\n ,\n <? endif ?>\n <? value("period_id_list") ?>\n<? endforeach ?>\n ))\n ORDER BY calitem_pstart, calitem_pend\n ) as calitem\n\n WHERE ((itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\nORDER BY calitem_pstart, warehous_code;\n \n \n Blue\n 0\n 0\n 255\n \n \n BlueGreen\n 0\n 255\n 255\n \n \n Green\n 0\n 255\n 0\n \n \n Red\n 255\n 0\n 0\n \n \n RedBlue\n 255\n 0\n 255\n \n \n RedGreen\n 255\n 255\n 0\n \n \n 683\n \n \n 130\n 63\n 385\n 18\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n 130\n 50\n 200\n 18\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n 0\n 675\n 735\n 675\n 2\n \n \n \n \n \n \n \n \n 35\n 116\n 712\n 467\n \n \n Arial\n 8\n normal\n \n \n detail\n \n \n \n <string>Time Phased Activity Graph</string>\n \n \n \n <string>Date Range</string>\n \n period\n \n \n \n <string>Quantity</string>\n \n 0\n 0\n true\n \n \n IssuedQuanity\n a_issued\n Green\n \n \n \n Received\n a_received\n BlueGreen\n \n \n \n Sold\n a_sold\n Blue\n \n \n \n Scrapped\n a_scrap\n RedGreen\n \n \n \n Adjusted\n a_adjustments\n RedBlue\n \n \n \n \n \n \n 543\n 43\n 200\n 18\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n 130\n 80\n 385\n 18\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n 9\n \n \n 23\n \n \n \n \n \n 5\n 13\n 738\n 13\n 2\n \n \n \n \n \n
\n detail\n \n detail\n pstart\n \n 15\n \n \n 10\n 5\n 250\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n period\n \n \n \n \n \n \n detail\n \n 18\n \n \n 405\n 0\n 80\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issued\n \n \n \n \n 575\n 0\n 80\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n scrap\n \n \n \n \n 318\n 0\n 80\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n received\n \n \n \n \n 268\n 0\n 35\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 488\n 0\n 80\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n sold\n \n \n \n \n 660\n 0\n 80\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n adjustments\n \n \n \n
\n \n 18\n \n \n \n 688\n 0\n 51\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 93\n 0\n 100\n 13\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n Shows graph 0 2013-07-26 16:14:22.271087 340 TitleList \N \n\n Titles\n TitleList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT hnfc_code\n FROM hnfc\nORDER BY hnfc_code;\n \n \n 76\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n hnfc_code\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 430 TodoItem \N \n\n To-Do Item\n TodoItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT todoitem_id AS id,\n 'T' AS type, todoitem_seq AS seq, \n todoitem_name AS name, \n firstLine(todoitem_description) AS descrip, \n todoitem_status AS status, todoitem_due_date AS due, \n todoitem_username AS usr, incdt_number AS incdt \nFROM todoitem LEFT OUTER JOIN incdt ON (incdt_id=todoitem_incdt_id) \nWHERE (todoitem_id=<? value("todoitem_id") ?>)\nORDER BY seq, usr;\n \n \n 141\n \n \n \n 385\n 30\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n status\n \n \n \n \n 110\n 35\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n type\n \n \n \n \n \n \n \n 385\n 45\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n due\n \n \n \n \n 385\n 60\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n incdt\n \n \n \n \n \n \n 110\n 20\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n usr\n \n \n \n \n 110\n 65\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n name\n \n \n \n \n 110\n 80\n 600\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n descrip\n \n \n \n \n \n 10\n 135\n 750\n 135\n 2\n \n \n \n 110\n 50\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n seq\n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n\n \N 0 2013-07-26 16:14:22.271087 345 TodoList \N \n\n To-Do List\n TodoList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n todolist\n detail\n \n \n queryParams\n SELECT\n <? if exists("completed") ?> 'Yes' <? else ?> 'No' <? endif ?> AS showClosed,\n <? if exists("projects") ?> 'Yes' <? else ?> 'No' <? endif ?> AS showTasks,\n <? if exists("incidents") ?> 'Yes' <? else ?> 'No' <? endif ?> AS showIncdts;\n \n \n 141\n \n \n 325\n 43\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n queryParams\n showClosed\n \n \n \n \n \n \n \n \n 110\n 43\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n queryParams\n showIncdts\n \n \n \n 10\n 135\n 750\n 135\n 2\n \n \n \n \n \n \n \n \n \n \n 555\n 43\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n queryParams\n showTasks\n \n \n \n \n 10\n 63\n 725\n 15\n \n 12\n \n Arial\n 8\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n
\n detail\n \n ByUser\n assigned\n \n \n \n detail\n \n 31\n \n \n 630\n 0\n 115\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_parent\n \n \n \n \n 10\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n assigned\n \n \n \n \n 230\n 15\n 520\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n notes\n \n \n \n \n 435\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n stage\n \n \n \n \n 100\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n type\n \n \n \n \n 165\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n priority\n \n \n \n \n 540\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n due\n \n \n \n \n 230\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n name\n \n \n \n
\n \n 16\n \n \n \n \n 90\n 1\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 1\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 253 TrialBalances \N \n\n Trial Balances\n TrialBalances\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("accnt_id") ?>\n ( SELECT (accnt_number || '-' || accnt_descrip)\n FROM accnt\n WHERE (accnt_id=<? value("accnt_id") ?>) )\n <? else ?>\n text('All Accounts')\n <? endif ?>\n AS accnt,\n <? if exists("period_id") ?>\n ( SELECT (formatDate(period_start) || '-' || formatDate(period_end))\n FROM period\n WHERE (period_id=<? value("period_id") ?>) )\n <? else ?>\n text('All Periods')\n <? endif ?>\n AS period;\n \n \n \n detail\n SELECT accnt_id,\n period_id,\n formatDate(period_start) AS f_start,\n formatDate(period_end) AS f_end,\n formatGLAccount(accnt_id) AS f_account,\n accnt_descrip,\n formatMoney(abs(trialbal_beginning)) AS f_beginning,\n CASE WHEN(trialbal_beginning>0) THEN text('CR')\n ELSE text('')\n END AS f_beginningcr,\n formatMoney(trialbal_debits) AS f_debits,\n formatMoney(trialbal_credits) AS f_credits,\n formatMoney(abs(trialbal_debits - trialbal_credits)) AS f_diff,\n CASE WHEN((trialbal_debits - trialbal_credits) < 0) THEN text('CR')\n ELSE text('')\n END AS f_diffcr,\n formatMoney(abs(trialbal_ending)) AS f_ending,\n CASE WHEN(trialbal_ending>0) THEN text('CR')\n ELSE text('')\n END AS f_endingcr\n FROM trialbal, accnt, period\n WHERE ((trialbal_accnt_id=accnt_id)\n AND (trialbal_period_id=period_id)\n<? if exists("accnt_id") ?>\n AND (trialbal_accnt_id=<? value("accnt_id") ?>)\n<? endif ?>\n<? if exists("period_id") ?>\n AND (period_id=<? value("period_id") ?>)\n<? endif ?>\n<? if not exists("showZero") ?>\n AND (abs(trialbal_beginning)+abs(trialbal_ending)+abs(trialbal_debits)+abs(trialbal_credits) > 0) \n<? endif ?>\n )\nORDER BY period_start, formatGLAccount(accnt_id);\n \n \n total\n SELECT formatMoney(abs(beginning)) AS f_beginning,\n CASE WHEN(beginning<0) THEN text('CR')\n ELSE text('')\n END AS f_beginningcr,\n formatMoney(debits) AS f_debits,\n formatMoney(credits) AS f_credits,\n formatMoney(abs(debits - credits)) AS f_diff,\n CASE WHEN((debits - credits) < 0) THEN text('CR')\n ELSE text('')\n END AS f_diffcr,\n formatMoney(abs(ending)) AS f_ending,\n CASE WHEN(ending<0) THEN text('CR')\n ELSE text('')\n END AS f_endingcr\n FROM ( SELECT SUM(trialbal_beginning*-1) AS beginning,\n SUM(trialbal_debits) AS debits,\n SUM(trialbal_credits) AS credits,\n SUM(trialbal_ending*-1) AS ending\n FROM trialbal, accnt, period\n WHERE ((trialbal_accnt_id=accnt_id)\n AND (trialbal_period_id=period_id)\n<? if exists("accnt_id") ?>\n AND (trialbal_accnt_id=<? value("accnt_id") ?>)\n<? endif ?>\n<? if exists("period_id") ?>\n AND (period_id=<? value("period_id") ?>)\n<? endif ?>\n )\n ) AS data;\n \n \n 191\n \n \n \n \n \n \n \n \n \n 5\n 185\n 990\n 185\n 2\n \n \n \n \n \n 10\n 38\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n 5\n 30\n 990\n 30\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 31\n \n \n 475\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_beginningcr\n \n \n \n \n 105\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_end\n \n \n \n \n 965\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_endingcr\n \n \n \n \n 510\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debits\n \n \n \n \n 370\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_beginning\n \n \n \n \n 615\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credits\n \n \n \n \n 200\n 15\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n accnt_descrip\n \n \n \n \n 10\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_start\n \n \n \n \n 860\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ending\n \n \n \n \n 720\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_diff\n \n \n \n \n 825\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_diffcr\n \n \n \n \n 200\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_account\n \n \n \n
\n \n 17\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 21\n \n \n 370\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_beginning\n \n \n \n \n 720\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_diff\n \n \n \n \n 510\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_debits\n \n \n \n \n 615\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_credits\n \n \n \n \n 860\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_ending\n \n \n \n \n \n 965\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_endingcr\n \n \n \n \n 475\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_beginningcr\n \n \n \n \n 825\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n f_diffcr\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 223 UOMs \N \n\n Units of Measure\n UOMs\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT uom_name,\n uom_descrip\n FROM uom\nORDER BY uom_name;\n \n \n 76\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_descrip\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 268 UnappliedAPCreditMemos \N \n\n Unapplied A/P Credit Memos\n UnappliedAPCreditMemos\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT apopen_id, apopen_docnumber,\n (vend_number || '-' || vend_name) AS vendor,\n formatMoney(apopen_amount) AS f_amount,\n formatMoney(apopen_paid) AS f_paid,\n formatMoney(apopen_amount - apopen_paid) AS f_balance\nFROM apopen, vendinfo\nWHERE ( (apopen_doctype='C')\n AND (apopen_open)\n AND (apopen_vend_id=vend_id)\n<? if exists("vend_id") ?>\n AND (vend_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n AND (vend_vendtype_id=<? value("vendtype_id") ?>)\n<? elseif exists("vendtype_pattern") ?>\n AND (vend_vendtype_id IN (SELECT vendtype_id\n FROM vendtype\n WHERE (vendtype_code ~ <? value("vendtype_pattern") ?>)))\n<? endif ?>\n)\nORDER BY apopen_docnumber;\n \n \n 77\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n \n \n 6\n \n \n 26\n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n apopen_docnumber\n \n \n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_paid\n \n \n \n \n 434\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 100\n 0\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vendor\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 269 UnappliedARCreditMemos \N \n\n Unapplied A/R Credit Memos\n UnappliedARCreditMemos\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT aropen_id, aropen_docnumber,\n (cust_number || '-' || cust_name) AS cust,\n formatMoney(aropen_amount) AS f_amount,\n formatMoney(aropen_paid) AS f_paid,\n formatMoney(aropen_amount - aropen_paid) AS f_balance\nFROM aropen, custinfo\nWHERE ( (aropen_doctype IN ('C', 'R'))\n AND (aropen_open)\n AND (aropen_cust_id=cust_id) )\nORDER BY aropen_docnumber;\n \n \n 77\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n \n \n \n 6\n \n \n 26\n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n aropen_docnumber\n \n \n \n \n 540\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_paid\n \n \n \n \n 434\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 100\n 0\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust\n \n \n \n
\n \n 17\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 232 UniformBOL \N \n\n Uniform Bill of Lading\n UniformBOL\n \n \n \n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 25\n 25\n \n head\n SELECT shiphead_shipvia, formatDate(shiphead_shipdate) AS shipdate,\n cust_name, cust_number, cohead_number, cohead_fob, cohead_custponumber,\n warehous_descrip, addr_line1 AS warehous_addr1, addr_line2 AS warehous_addr2, addr_line3 AS warehous_addr3, addr_city AS warehous_addr4, warehous_fob,\n cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3,\n (cohead_shiptocity || ' ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n cohead_shiptophone\n FROM shiphead JOIN cohead ON (cohead_id=shiphead_order_id)\n LEFT OUTER JOIN whsinfo ON (warehous_id=cohead_warehous_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n LEFT OUTER JOIN addr ON (warehous_addr_id=addr_id)\n WHERE (shiphead_id=<? value("shiphead_id") ?>);\n \n \n detail\n SELECT 1 as one,\n coitem_linenumber,\n formatQty(SUM(shipitem_qty)) AS invqty,\n uom_name,\n itemsellinguom(item_id) AS shipuom,\n roundUp(SUM(shipitem_qty) / iteminvpricerat(item_id))::integer AS shipqty,\n item_number, item_descrip1, item_descrip2,\n formatQty(SUM(shipitem_qty) * item_prodweight) AS netweight,\n formatQty(SUM(shipitem_qty) * (item_prodweight + item_packweight)) AS grossweight\n FROM shipitem, coitem, itemsite, item, uom\n WHERE ((shipitem_orderitem_id=coitem_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (shipitem_shiphead_id=<? value("shiphead_id") ?>))\nGROUP BY coitem_linenumber, item_number, item_id,\n uom_name, shipuom,\n item_descrip1,\n item_descrip2, item_prodweight,\n item_packweight\nORDER BY coitem_linenumber;\n \n \n \n foot\n SELECT formatQty(SUM(shipitem_qty * item_prodweight)) AS netweight,\n formatQty(SUM(shipitem_qty * (item_prodweight + item_packweight))) AS grossweight \n FROM shipitem, coitem, itemsite, item\n WHERE ((shipitem_orderitem_id=coitem_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (shipitem_shiphead_id=<? value("shiphead_id") ?>));\n \n \n notes\n SELECT shiphead_notes\n FROM shiphead\n WHERE (shiphead_id=<? value("shiphead_id") ?>);\n \n \n legal1\n SELECT \n text('*If the shipment moves between two ports by carrier by water, the law requires that the Bill Of Lading shall state whether it is ''carrier''s or shipper''s weight''.\\n\\nNOTE: Where the rate is dependent on value, shippers are required to state specifically in writing the agreed or declared value of the property. The agreed or declared value of the property is hereby specifically stated by the shipper to be not exceeding:\\n\\n_________________________\\n\\nper ______________________') AS legal3\n \n \n 42\n \n \n 5\n 35\n 795\n 35\n 2\n \n \n \n \n \n \n \n \n \n 332\n \n \n 145\n 5\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cust_number\n \n \n \n \n 405\n 85\n 405\n 185\n 0\n \n \n \n 419\n 160\n 370\n 25\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n shiphead_shipvia\n \n \n \n \n \n 100\n 305\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehous_addr4\n \n \n \n 795\n 85\n 795\n 185\n 0\n \n \n 405\n 185\n 795\n 185\n 0\n \n \n \n 145\n 45\n 200\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_fob\n \n \n \n \n 405\n 150\n 795\n 150\n 0\n \n \n 600\n 112\n 600\n 150\n 0\n \n \n \n 100\n 285\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehous_addr3\n \n \n \n \n 100\n 190\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_shiptophone\n \n \n \n \n \n 100\n 130\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_shiptoaddress2\n \n \n \n \n \n 100\n 225\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehous_descrip\n \n \n \n \n \n \n 145\n 25\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n cohead_number\n \n \n \n \n 100\n 170\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n shiptocitystatezip\n \n \n \n \n \n \n \n 615\n 125\n 175\n 25\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_custponumber\n \n \n \n \n 100\n 150\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_shiptoaddress3\n \n \n \n \n \n 100\n 265\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehous_addr2\n \n \n \n \n 415\n 200\n 380\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n notes\n shiphead_notes\n \n \n \n \n \n 100\n 90\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_shiptoname\n \n \n \n \n \n \n \n 100\n 245\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehous_addr1\n \n \n \n 405\n 85\n 795\n 85\n 0\n \n \n \n 635\n 50\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n shipdate\n \n \n \n 405\n 112\n 795\n 112\n 0\n \n \n \n \n \n \n 100\n 110\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n cohead_shiptoaddress1\n \n \n \n \n
\n detail\n \n \n detail\n \n 52\n \n \n 150\n 35\n 380\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 540\n 0\n 120\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n grossweight\n \n \n \n \n 5\n 0\n 80\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n shipqty\n \n \n \n \n 150\n 20\n 380\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 145\n 0\n 390\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n item_number\n \n \n \n
\n \n \n 466\n \n \n \n 5\n 90\n 795\n 90\n 0\n \n \n \n \n \n \n \n \n \n 220\n 80\n 228\n 80\n 0\n \n \n \n 560\n 75\n 570\n 75\n 0\n \n \n 400\n 90\n 400\n 245\n 0\n \n \n \n \n 5\n 5\n 5\n 445\n 0\n \n \n 210\n 220\n 385\n 220\n 0\n \n \n \n \n \n \n \n 220\n 70\n 228\n 70\n 0\n \n \n 220\n 55\n 220\n 65\n 0\n \n \n 600\n 90\n 600\n 245\n 0\n \n \n \n \n \n \n \n 560\n 65\n 560\n 75\n 0\n \n \n \n \n 560\n 60\n 570\n 60\n 0\n \n \n 600\n 135\n 795\n 135\n 0\n \n \n 560\n 50\n 570\n 50\n 0\n \n \n \n \n \n \n \n 540\n 5\n 120\n 25\n \n \n Arial\n 10\n bold\n \n \n \n \n foot\n grossweight\n \n \n \n 795\n 5\n 795\n 445\n 0\n \n \n \n \n \n \n \n \n 560\n 50\n 560\n 60\n 0\n \n \n 765\n 70\n 765\n 80\n 0\n \n \n \n 570\n 75\n 570\n 65\n 0\n \n \n 5\n 320\n 795\n 320\n 0\n \n \n 228\n 65\n 228\n 55\n 0\n \n \n 200\n 90\n 200\n 245\n 0\n \n \n \n \n \n 665\n 5\n 665\n 30\n 0\n \n \n \n \n 220\n 70\n 220\n 80\n 0\n \n \n \n 580\n 30\n 580\n 90\n 0\n \n \n 5\n 340\n 795\n 340\n 0\n \n \n \n 210\n 30\n 210\n 90\n 0\n \n \n 390\n 30\n 390\n 90\n 0\n \n \n 220\n 65\n 228\n 65\n 0\n \n \n 5\n 408\n 795\n 408\n 0\n \n \n 433\n 240\n 586\n 240\n 0\n \n \n 765\n 80\n 775\n 80\n 0\n \n \n \n 5\n 375\n 795\n 375\n 0\n \n \n \n 5\n 50\n 210\n 50\n 0\n \n \n \n 408\n 220\n 586\n 220\n 0\n \n \n 560\n 65\n 570\n 65\n 0\n \n \n 670\n 170\n 762\n 170\n 0\n \n \n 5\n 30\n 795\n 30\n 0\n \n \n 5\n 445\n 795\n 445\n 0\n \n \n \n \n \n \n \n \n 775\n 80\n 775\n 70\n 0\n \n \n \n \n 765\n 70\n 775\n 70\n 0\n \n \n 5\n 245\n 795\n 245\n 0\n \n \n \n \n 685\n 408\n 685\n 445\n 0\n \n \n \n 400\n 320\n 400\n 445\n 0\n \n \n \n \n 228\n 80\n 228\n 70\n 0\n \n \n \n \n 5\n 5\n 795\n 5\n 0\n \n \n \n 535\n 5\n 535\n 30\n 0\n \n \n \n \n \n \n \n 600\n 110\n 795\n 110\n 0\n \n \n 220\n 55\n 228\n 55\n 0\n \n \n \n \n \n \n 570\n 60\n 570\n 50\n 0\n \n \n
\n \N 0 2013-07-26 16:14:22.271087 159 UninvoicedReceipts \N \n\n Uninvoiced Receipts\n UninvoicedReceipts\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?> \n ( SELECT warehous_code \n FROM whsinfo \n WHERE (warehous_id=<? value("warehous_id") ?>) ) \n <? else ?> \n text('All Sites') \n <? endif ?> \n AS warehouse, \n <? if exists("agentUsername") ?> \n TEXT(<? value("agentUsername" ?>) \n <? else ?> \n TEXT('All Agents') \n <? endif ?> \n AS agentUsername; \n\n \n \n detail\n SELECT recv_id,\n formatDate(recv_date) as f_date,\n recv_trans_usr_name as f_user,\n recv_order_number AS f_ponumber, poitem_linenumber,\n vend_name, \n COALESCE(item_number, ('Misc. - ' || recv_vend_item_number)) AS item_number,\n formatQty(recv_qty) as f_qty,\n 'Receipt' AS f_type,\n recv_value AS value,\n formatMoney(recv_value) AS f_value\n FROM recv\n LEFT OUTER JOIN itemsite ON (recv_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id),\n poitem, vendinfo\n WHERE ((recv_orderitem_id=poitem_id)\n AND (recv_order_type='PO')\n AND (recv_vend_id=vend_id)\n AND (recv_posted)\n AND (recv_vohead_id IS NULL)\n AND (NOT recv_invoiced)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("agentUsername") ?>\n AND (recv_agent_username=<? value("agentUsername") ?>)\n<? endif ?>\n)\nUNION\nSELECT poreject_id,\n formatDate(poreject_date) as f_date,\n poreject_trans_username as f_user,\n poreject_ponumber AS f_ponumber, poitem_linenumber,\n vend_name, \n COALESCE(item_number, ('Misc. - ' || poreject_vend_item_number)) AS item_number,\n formatQty(poreject_qty) as f_qty,\n 'Return' AS f_type,\n poreject_value *-1 AS value,\n formatMoney(poreject_value*-1) AS f_value\n FROM poreject\n LEFT OUTER JOIN itemsite ON (poreject_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id),\n poitem, vendinfo\n WHERE ((poreject_poitem_id=poitem_id)\n-- AND (poreject_itemsite_id=itemsite_id)\n-- AND (itemsite_item_id=item_id)\n AND (poreject_vend_id=vend_id)\n AND (poreject_posted)\n AND (NOT poreject_invoiced)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("agentUsername") ?>\n AND (poreject_agent_username=<? value("agentUsername") ?>)\n<? endif ?>\n)\nORDER BY f_ponumber, poitem_linenumber;\n \n \n 221\n \n \n \n 145\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n \n 145\n 110\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n agentUsername\n \n \n \n \n \n 6\n \n \n 29\n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 18\n \n \n 85\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_user\n \n \n \n \n 520\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 170\n 0\n 65\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_ponumber\n \n \n \n \n 285\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 400\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 5\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_date\n \n \n \n \n 245\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_linenumber\n \n \n \n \n 590\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_type\n \n \n \n \n 665\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_value\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 104\n \n \n \n 665\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n value\n \n qty\n \n \n
\n \N 0 2013-07-26 16:14:22.271087 77 UninvoicedShipments \N \n\n Uninvoiced Shipments\n UninvoicedShipments\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse;\n\n \n \n detail\n SELECT cohead_id, shipitem_id, cohead_number, coitem_linenumber,\n item_number, item_descrip1, item_descrip2,\n uom_name,\n shipped, formatQty(shipped) AS f_shipped,\n selected, formatQty(selected) AS f_selected\nFROM (\nSELECT cohead_id, shipitem_id, cohead_number, coitem_linenumber,\n item_number, item_descrip1, item_descrip2,\n uom_name,\n COALESCE(SUM(shipitem_qty), 0) AS shipped,\n COALESCE(SUM(cobill_qty), 0) AS selected\nFROM cohead, itemsite, item, uom,\n whsinfo, shipitem, shiphead,\n coitem LEFT OUTER JOIN\n ( cobill JOIN cobmisc\n ON ( (cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) )\n ON (cobill_coitem_id=coitem_id)\nWHERE ( (shipitem_orderitem_id=coitem_id)\n AND (shipitem_shiphead_id=shiphead_id)\n AND (coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_qty_uom_id=uom_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (shiphead_shipped)\n AND (NOT shipitem_invoiced)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n )\nGROUP BY cohead_number, coitem_id, coitem_linenumber, item_number,\n item_descrip1, item_descrip2, cohead_id, shipitem_id, uom_name\n) AS data\n<? if exists("showUnselected") ?>\n WHERE (selected = 0)\n<? endif ?>\n;\n \n \n 236\n \n \n 100\n 104\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 37\n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n
\n detail\n \n \n detail\n \n 57\n \n \n 5\n 0\n 85\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cohead_number\n \n \n \n \n 494\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 665\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_selected\n \n \n \n \n 150\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 95\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n coitem_linenumber\n \n \n \n \n 580\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipped\n \n \n \n \n 150\n 0\n 229\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 150\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n 5\n 50\n 745\n 50\n 0\n \n \n
\n \n 18\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 396 UnpostedGlSeries \N \n\n Unposted G/L Series Transactions\n UnpostedGlSeries\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT *, glseries_sequence,\n (formatGLAccount(glseries_accnt_id) || ' - ' ||\n accnt_descrip) AS account,\n CASE WHEN (glseries_amount < 0) THEN\n formatMoney(glseries_amount * -1)\n ELSE '' END AS debit,\n CASE WHEN (glseries_amount >= 0) THEN\n formatMoney(glseries_amount)\n ELSE '' END AS credit\nFROM glseries, accnt\nWHERE (glseries_accnt_id=accnt_id)\nORDER BY glseries_distdate, glseries_sequence, glseries_amount;\n \n \n 75\n \n \n \n \n \n \n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n 11\n \n \n 51\n \n \n \n \n \n \n 5\n 40\n 740\n 40\n 2\n \n \n \n \n \n
\n detail\n \n glseries_sequence\n glseries_sequence\n \n 11\n \n 10\n 0\n 40\n 0\n 0\n \n \n \n \n \n detail\n \n 21\n \n \n 610\n 0\n 150\n 11\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n glseries_notes\n \n \n \n \n 95\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n glseries_source\n \n \n \n \n 310\n 0\n 130\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 0\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n glseries_distdate\n \n \n \n \n 530\n 0\n 70\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credit\n \n \n \n \n 450\n 0\n 70\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debit\n \n \n \n \n 200\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n glseries_docnumber\n \n \n \n \n 145\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n glseries_doctype\n \n \n \n
\n \n 15\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 397 UnpostedGLTransactions \N \n\n Unposted G/L Transactions\n UnpostedGLTransactions\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n <? if exists("period_id") ?>\nSELECT formatDate(period_start, 'Earliest') AS startdate,\n formatDate(period_end, 'Latest') AS enddate,\n period_name\nFROM period\nWHERE (period_id=<? value("period_id") ?>);\n<? else ?>\nSELECT 'Earliest' AS startdate,\n 'Latest' AS enddate,\n 'All Periods' AS period_name;\n<? endif ?>\n \n \n detail\n SELECT gltrans_id,\n formatDate(gltrans_date) AS transdate,\n gltrans_source,\n gltrans_doctype,\n gltrans_docnumber,\n invhist_docnumber,\n firstLine(gltrans_notes) AS transnotes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n-- Debits:\n CASE WHEN (gltrans_amount < 0) THEN formatMoney(ABS(gltrans_amount))\n ELSE ''\n END AS f_debit, \n CASE WHEN (gltrans_amount < 0) THEN ABS(gltrans_amount)\n ELSE 0\n END AS debit_amt, \n--Credits:\n CASE WHEN (gltrans_amount > 0) THEN formatMoney(gltrans_amount)\n ELSE ''\n END AS f_credit,\n CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n ELSE 0\n END AS credit_amt,\n--Balance:\n gltrans_amount * -1 as balance_amt\n--\n FROM period, gltrans JOIN accnt ON (gltrans_accnt_id=accnt_id)\n LEFT OUTER JOIN invhist ON (gltrans_misc_id=invhist_id AND gltrans_docnumber='Misc.')\nWHERE (NOT gltrans_posted\n AND (NOT gltrans_deleted)\n AND (gltrans_date BETWEEN period_start AND period_end)\n<? if exists("period_id") ?>\n AND (period_id=<? value("period_id") ?>)\n<? endif ?>\n)\nORDER BY gltrans_created, gltrans_sequence, gltrans_amount;\n \n \n 205\n \n \n \n \n \n 545\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 140\n 70\n 290\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n period_name\n \n \n \n \n \n \n \n \n \n \n 545\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n 0\n 200\n 1000\n 200\n 2\n \n \n \n \n \n \n 5\n \n \n 45\n \n \n \n 0\n 40\n 1000\n 40\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 31\n \n \n 310\n 0\n 270\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 12500\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_doctype\n \n \n \n \n 208\n 15\n 95\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invhist_docnumber\n \n \n \n \n 0\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 125\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_doctype\n \n \n \n \n 204\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_docnumber\n \n \n \n \n 310\n 15\n 265\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transnotes\n \n \n \n \n 720\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n \n 65\n 0\n 60\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_source\n \n \n \n \n 605\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n
\n \n \n 75\n \n \n 835\n 25\n 105\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n balance_amt\n \n money\n \n \n \n \n \n 605\n 5\n 1015\n 5\n 2\n \n \n \n \n 960\n 60\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 60\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 720\n 25\n 105\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n credit_amt\n \n money\n \n \n \n \n \n 605\n 25\n 105\n 14\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n debit_amt\n \n money\n \n \n \n \n 15\n \n \n \n 960\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 398 UnpostedPoReceipts \N \n\n Unposted Purchase Order Receipts\n UnpostedPoReceipts\n \n \n \n \n \n \n \n \n \n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT recv_id, recv_orderitem_id, recv_order_number, recv_order_type,\n orderhead_from,\n orderitem_linenumber,\n formatDate(recv_duedate) AS recv_duedate,\n warehous_code,\n COALESCE(item_number, <? value("nonInventory") ?>) AS item_number,\n COALESCE(uom_name, <? value("na") ?>) AS uom_name,\n recv_vend_item_number,\n recv_vend_uom,\n formatQty(orderitem_qty_ordered) AS qty_ordered,\n formatQty(orderitem_qty_received) AS qty_received,\n formatQty(recv_qty) AS recv_qty,\n formatDate(recv_date) AS recv_date,\n formatDate(COALESCE(recv_gldistdate, recv_date)) AS recv_gldistdate\nFROM orderhead JOIN\n orderitem ON ((orderitem_orderhead_id=orderhead_id)\n\t AND (orderitem_orderhead_type=orderhead_type)) JOIN \n recv ON ((recv_orderitem_id=orderitem_id)\n\t AND (recv_order_type=orderitem_orderhead_type)) LEFT OUTER JOIN\n (itemsite JOIN item ON (itemsite_item_id=item_id)\n\t JOIN uom ON (item_inv_uom_id=uom_id)\n JOIN site() ON (itemsite_warehous_id=warehous_id)\n )\n ON (recv_itemsite_id=itemsite_id) LEFT OUTER JOIN\n vendinfo ON (orderhead_type='PO' AND orderhead_from_id=vend_id)\nWHERE (NOT recv_posted)\nORDER BY orderhead_from, recv_order_number, orderitem_linenumber;\n\n \n \n 76\n \n 5\n 70\n 745\n 70\n 2\n \n \n \n
\n detail\n \n ponumber\n recv_order_number\n \n 51\n \n \n \n \n \n 100\n 0\n 27\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_order_type\n \n \n \n \n \n 100\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orderhead_from\n \n \n \n \n \n \n \n 135\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_order_number\n \n \n \n \n \n \n \n \n \n \n \n detail\n \n 21\n \n \n 685\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_date\n \n \n \n \n 130\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n item_number\n \n \n \n \n 395\n 0\n 40\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n recv_vend_uom\n \n \n \n \n 0\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n orderitem_linenumber\n \n \n \n \n 285\n 0\n 100\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n recv_vend_item_number\n \n \n \n \n 520\n 0\n 70\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n qty_received\n \n \n \n \n 40\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_duedate\n \n \n \n \n 240\n 0\n 40\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n uom_name\n \n \n \n \n 600\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n recv_qty\n \n \n \n \n 440\n 0\n 70\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n qty_ordered\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 399 UnpostedReturnsForPO \N \n\n Unposted Returns For Purchase Order\n UnpostedReturnsForPO\n \n Letter\n \n 100\n 100\n 50\n 50\n \n address\n select formatAddr(<? value("addr_id") ?>) AS f_addr;\n \n \n detail\n SELECT poitem_linenumber,\n COALESCE(item_number, 'Non-Inventory') AS item_number,\n COALESCE(uom_name, 'N/A') AS uom_name,\n poitem_vend_item_number, poitem_vend_uom,\n formatQty(poitem_qty_ordered) AS f_poitem_qty_ordered,\n formatQty(poitem_qty_received) AS f_poitem_qty_received,\n formatQty(poitem_qty_returned) AS f_poitem_qty_returned,\n formatQty(SUM(COALESCE(poreject_qty, 0))) AS f_poreject_qty,\n rjctcode_code\nFROM poreject LEFT OUTER JOIN rjctcode ON (poreject_rjctcode_id=rjctcode_id),\n poitem LEFT OUTER JOIN\n ( itemsite JOIN item\n ON (itemsite_item_id=item_id) JOIN uom ON (item_inv_uom_id=uom_id)\n ) ON (poitem_itemsite_id=itemsite_id)\nWHERE ((poreject_poitem_id=poitem_id)\n AND (NOT poreject_posted)\n AND (poitem_pohead_id=<? value("pohead_id") ?>))\nGROUP BY\n poitem_linenumber,\n item_number,\n uom_name,\n poitem_vend_item_number,\n poitem_vend_uom,\n poitem_qty_ordered,\n poitem_qty_received,\n poitem_qty_returned,\n rjctcode_code\nORDER BY poitem_linenumber;\n \n \n pohead\n SELECT *\nFROM pohead, vendinfo\nWHERE ((pohead_vend_id=vend_id)\n AND (pohead_id=<? value("pohead_id") ?>));\n \n \n logo\n SELECT image_data \nFROM image \nWHERE ((image_name='logo'));\n \n \n 127\n \n \n \n 5\n 5\n 155\n 95\n \n stretch\n \n logo\n image_data\n \n \n \n 0\n 113\n 740\n 113\n 2\n \n \n
\n Address\n \n \n address\n \n 23\n \n \n \n 60\n 0\n 500\n 18\n \n 11\n \n Arial\n 10\n bold\n \n \n \n \n address\n f_addr\n \n \n \n
\n
\n POHead\n \n \n pohead\n \n 107\n \n \n \n \n \n 100\n 41\n 100\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n pohead\n vend_number\n \n \n \n \n \n \n \n 100\n 30\n 100\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n pohead\n pohead_number\n \n \n \n 0\n 95\n 740\n 95\n 0\n \n \n \n \n \n \n
\n
\n detail\n \n \n detail\n \n 42\n \n \n 355\n 0\n 85\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_poitem_qty_received\n \n \n \n \n 200\n 0\n 100\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_vend_item_number\n \n \n \n \n 570\n 0\n 85\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_poreject_qty\n \n \n \n \n 45\n 15\n 645\n 11\n \n 1\n \n Arial\n 8\n bold\n \n \n \n \n detail\n rjctcode_code\n \n \n \n \n 310\n 0\n 40\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_vend_uom\n \n \n \n \n 1\n 0\n 35\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n poitem_linenumber\n \n \n \n \n 459\n 0\n 90\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_poitem_qty_returned\n \n \n \n \n \n 150\n 0\n 40\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 40\n 0\n 100\n 11\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n
\n \n 23\n \n \n \n \n 90\n 0\n 100\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 700\n 0\n 40\n 11\n \n \n Arial\n 8\n normal\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 495 UnpostedVouchers \N \n\n Unposted Vouchers\n UnpostedVouchers\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n openVouchers\n populate\n \n \n 78\n \n \n \n \n \n \n 3.66667\n 74\n 743.667\n 74\n 2\n \n \n \n \n \n \n \n \n 6\n \n \n 41\n \n 5\n 35\n 745\n 35\n 2\n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n detail\n orderid\n \n \n \n detail\n \n 17\n \n \n 650\n 2\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 400\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vohead_invcnumber\n \n \n \n \n 90\n 2\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ponumber\n \n \n \n \n 5\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vohead_number\n \n \n \n \n 490\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_distdate\n \n \n \n \n 310\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vendtype_code\n \n \n \n \n 570\n 2\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_postdate\n \n \n \n \n 150\n 2\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vendor\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 222 UnusedPurchasedItems \N \n\n Unused Purchased Items\n UnusedPurchasedItems\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT <? if exists("classcode_id") ?>\n ( SELECT (classcode_code||'-'||classcode_descrip)\n FROM classcode\n WHERE (classcode_id=<? value("classcode_id") ?>) )\n <? elseif exists("classcode_pattern") ?>\n text(<? value("classcode_pattern") ?>)\n <? else ?>\n text('All Class Codes')\n <? endif ?>\n AS classcode,\n <? if exists("includeUncontrolledItems") ?>\n text('Showing Uncontrolled Items')\n <? else ?>\n text('')\n <? endif ?>\n AS lbl_showuncontrolled\n \n \n detail\n SELECT DISTINCT item_id,\n item_number,\n item_descrip1,\n item_descrip2,\n uom_name,\n formatQty(SUM(itemsite_qtyonhand)) AS f_qoh,\n formatDate(MAX(itemsite_datelastcount), 'Never') AS f_lastcntd,\n formatDate(MAX(itemsite_datelastused), 'Never') AS f_lastused\n FROM item, itemsite, uom\n WHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (item_id NOT IN (SELECT DISTINCT bomitem_item_id FROM bomitem))\n AND (NOT item_sold)\n AND (item_type IN ('P', 'O'))\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id\n FROM classcode\n WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n<? endif ?>\n<? if not exists("includeUncontrolledItems") ?>\n AND (itemsite_controlmethod <> 'N')\n<? endif ?>\n)\nGROUP BY item_id, item_number, uom_name, item_descrip1, item_descrip2\nORDER BY item_number;\n \n \n 236\n \n \n 130\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n classcode\n \n \n \n \n \n \n 440\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n lbl_showuncontrolled\n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 37\n \n \n 5\n 30\n 745\n 31\n 2\n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_lastused\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 425\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_lastcntd\n \n \n \n \n 15\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 15\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 320\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qoh\n \n \n \n \n 225\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n uom_name\n \n \n \n \n 15\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n
\n \n 16\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 488 UsageStatistics \N \n\n Item Usage Statistics\n UsageStatistics\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n usageStatistics\n detail\n \n \n 221\n \n \n \n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n \n 10\n 38\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 37\n \n \n 425\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_sold\n \n \n \n \n 10\n 0\n 35\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n 3\n 31\n 743\n 31\n 0\n \n \n \n 665\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_transfer\n \n \n \n \n 505\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scrap\n \n \n \n \n 585\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_adjust\n \n \n \n \n 345\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_issued\n \n \n \n \n 65\n 15\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemdescrip\n \n \n \n \n 65\n 0\n 185\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 260\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_received\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 279 WOLabel \N \n\n WO Order Label\n WOLabel\n Labels generated for use in labeling parts out of a work order\n \n \n \n 0.05\n 0.05\n \n \n 400\n 333\n \n \n 25\n 25\n 25\n 25\n \n detail\n SELECT \n sequence_value,\n formatDate(wo_duedate) AS due_date, \n item_number,\n item_descrip1,\n COALESCE(prodcat_descrip, '') AS prodcat_descrip \n FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN sequence ON (sequence.sequence_value BETWEEN 1 AND <? value("labelTo") ?>)\n LEFT OUTER JOIN prodcat ON (prodcat_id=item_prodcat_id)\nWHERE (wo_id=<? value("wo_id") ?>);\n\n \n
\n detail\n \n \n detail\n \n 218\n \n \n 10\n 150\n 330\n 25\n \n \n Arial\n 12\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 10\n 95\n 330\n 25\n \n \n Arial\n 12\n bold\n \n \n \n \n detail\n prodcat_descrip\n \n \n \n \n 10\n 180\n 330\n 25\n \n 3of9\n 5\n \n 0.01\n \n detail\n item_number\n \n \n \n \n 150\n 35\n 120\n 18\n \n \n Arial\n 12\n bold\n \n \n \n \n detail\n due_date\n \n \n \n \n 75\n 125\n 265\n 18\n \n \n Arial\n 12\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n
\n
\n Labels generated for use in labeling parts out of a work order 0 2013-07-26 16:14:22.271087 280 WOLabelForm \N \n\n WO Order Label\n WOLabelForm\n Labels generated for use in labeling parts out of a work order\n \n 275\n 212\n \n \n 25\n 25\n 25\n 25\n \n detail\n SELECT \n sequence_value,\n formatDate(wo_duedate) AS due_date, \n item_number,\n item_descrip1,\n prodcat_descrip \n FROM \n wo, \n itemsite,\n item,\n prodcat,\n sequence\nWHERE ( (wo_itemsite_id = itemsite_id)\nAND (wo_id=<? value("wo_id") ?>)\nAND (item_prodcat_id = prodcat_id)\nAND (itemsite_item_id = item_id)\nAND (sequence.sequence_value \nBETWEEN 1 AND 1));\n \n
\n detail\n \n \n detail\n \n 214\n \n \n 21\n 91\n 192\n 25\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n prodcat_descrip\n \n \n \n \n 10\n 182\n 212\n 25\n \n 3of9\n 5\n
\n \n detail\n item_number\n \n \n \n \n \n 62\n 122\n 265\n 17\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 145\n 5\n 77\n 17\n \n \n Arial\n 9\n bold\n \n \n \n \n detail\n due_date\n \n \n \n \n 20\n 151\n 185\n 25\n \n \n Arial\n 10\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n
\n
\n Labels generated for use in labeling parts out of a work order 0 2013-07-26 16:14:22.271087 106 UsersMasterList \N \n\n Users Master List\n UsersMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n select usr_username,\n usr_propername,\n usr_initials,\n formatBoolYN(usr_active) AS f_active,\n formatBoolYN(usr_agent) AS f_pa,\n locale_code\n FROM usr, locale\n WHERE ((usr_locale_id=locale_id)\n<? if not exists("showInactive") ?>\n AND (usr_active=true)\n<? endif ?>\n)\nORDER BY usr_username;\n \n \n 76\n \n \n \n \n \n \n \n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 434\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_pa\n \n \n \n \n 114\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_active\n \n \n \n \n 375\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n usr_initials\n \n \n \n \n 170\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n usr_propername\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n usr_username\n \n \n \n \n 500\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locale_code\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 236 VendorAPHistory \N \n\n Vendor AP History\n VendorAPHistory\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT vend_number,\n vend_name,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate\n FROM vendinfo\n WHERE (vend_id=<? value("vend_id") ?>);\n \n \n detail\n SELECT 1 AS type, apopen_id, -1 AS applyid,\n apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n apopen_docnumber AS docnumber,\n formatBoolYN(apopen_open) AS f_open,\n CASE WHEN (apopen_doctype='V') THEN text('Voucher')\n WHEN (apopen_doctype='C') THEN text('C/M')\n WHEN (apopen_doctype='D') THEN text('D/M')\n ELSE text('Other')\n END AS documenttype,\n apopen_invcnumber AS invoicenumber,\n apopen_ponumber AS ponumber,\n formatDate(apopen_docdate) AS f_docdate,\n formatDate(apopen_duedate) AS f_duedate,\n formatMoney(apopen_amount) AS f_amount,\n formatMoney((apopen_amount - apopen_paid)) AS f_balance\nFROM apopen\nWHERE ( (apopen_vend_id=<? value("vend_id") ?>)\n AND (apopen_docdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) )\n\nUNION\nSELECT 2 AS type, apopen_id, apapply_source_apopen_id AS applyid,\n apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n apapply_source_docnumber AS docnumber,\n '' AS f_open,\n CASE WHEN (apapply_source_doctype='C') THEN text('C/M')\n WHEN (apapply_source_doctype='K') THEN text('Check')\n ELSE text('Other')\n END AS documenttype,\n '' AS invoicenumber,\n '' AS ponumber,\n formatDate(apapply_postdate) AS f_docdate,\n '' AS f_duedate,\n formatMoney(apapply_amount) AS f_amount,\n '' AS f_balance\nFROM apapply, apopen\nWHERE ( (apapply_target_apopen_id=apopen_id)\n AND (apapply_vend_id=<? value("vend_id") ?>)\n AND (apopen_vend_id=<? value("vend_id") ?>)\n AND (apopen_docdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) )\n\nUNION\nSELECT 3 AS type, apopen_id, apapply_target_apopen_id AS applyid,\n apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n apapply_target_docnumber AS docnumber,\n '' AS f_open,\n CASE WHEN (apapply_target_doctype='V') THEN text('Voucher')\n WHEN (apapply_target_doctype='D') THEN text('D/M')\n ELSE text('Other')\n END AS documenttype,\n apopen_invcnumber AS invoicenumber,\n '' AS ponumber,\n formatDate(apapply_postdate) AS f_docdate,\n '' AS f_duedate,\n formatMoney(apapply_amount) AS f_amount,\n '' AS f_balance\nFROM apapply, apopen\nWHERE ( (apapply_source_doctype IN ('C', 'K'))\n AND (apapply_source_doctype=apopen_doctype)\n AND (apapply_source_docnumber=apopen_docnumber)\n AND (apapply_vend_id=<? value("vend_id") ?>)\n AND (apopen_vend_id=<? value("vend_id") ?>)\n AND (apopen_docdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) )\n\nORDER BY sortdate, apopen_id, type;\n \n \n 162\n \n \n \n 550\n 85\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 95\n 65\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_number\n \n \n \n \n \n \n \n \n \n \n 5\n 155\n 745\n 155\n 2\n \n \n \n \n \n 95\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_name\n \n \n \n \n \n 550\n 65\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 14\n 2\n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 400\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_docdate\n \n \n \n \n 570\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n \n 655\n 0\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 315\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n ponumber\n \n \n \n \n 60\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n documenttype\n \n \n \n \n 485\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_open\n \n \n \n \n 145\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n docnumber\n \n \n \n \n 230\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invoicenumber\n \n \n \n
\n \n 17\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 104\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 31 WarehouseLocationMasterList \N \n\n Warehouse Location Master List\n WarehouseLocationMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT (warehous_code || ' ' || location_name) AS whs_bin,\n warehous_code,\n formatLocationName(location_id) AS locationname,\n location_descrip,\n formatBoolYN(location_netable) AS f_netable,\n formatBoolYN(location_restrict) AS f_restrict,\n item_number,\n (item_descrip1 || ' ' || item_descrip2) AS itemdesc\n FROM location LEFT OUTER JOIN\n (SELECT locitem_location_id,\n item_number,\n item_descrip1,\n item_descrip2\n FROM locitem, item\n WHERE locitem_item_id=item_id) AS itemlocation\n ON (locitem_location_id=location_id and location_restrict=true), whsinfo\n WHERE ((location_warehous_id=warehous_id)\n<? if exists("warehous_id") ?>\n AND (warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n) ORDER BY warehous_code, location_name;\n \n \n head\n SELECT <? if exists("warehous_id") ?>\n text('Warehouse:') AS f_text,\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) ) AS f_value\n <? else ?>\n text('') AS f_text,\n text('') AS f_value\n <? endif ?>\n \n \n 102\n \n \n \n 30\n 50\n 100\n 20\n \n \n Arial\n 10\n normal\n \n \n \n \n head\n f_text\n \n \n \n \n \n \n \n \n \n 140\n 50\n 175\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n f_value\n \n \n \n 5\n 100\n 745\n 100\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n \n
\n detail\n \n detail\n locationname\n \n 21\n \n \n 225\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_restrict\n \n \n \n \n 5\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 395\n 5\n 350\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n detail\n location_descrip\n \n \n \n 5\n 0\n 745\n 0\n 0\n \n \n \n 55\n 5\n 114\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locationname\n \n \n \n \n 170\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_netable\n \n \n \n \n \n \n detail\n \n 18\n \n \n 290\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 395\n 0\n 350\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemdesc\n \n \n \n
\n \n 18\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 30 WarehouseMasterList \N \n\n Warehouse Master List\n WarehouseMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT warehous_code,\n formatBoolYN(warehous_active) AS f_active,\n warehous_descrip,\n addr_line1 AS warehous_addr1,\n addr_line2 AS warehous_addr2,\n addr_line3 AS warehous_addr3,\n (addr_city || ',' || addr_state || ' ' || addr_postalcode) AS warehous_addr4,\n warehous_fob,\n warehous_bol_prefix,\n warehous_bol_number,\n formatBoolYN(warehous_shipping) AS f_shipping,\n warehous_counttag_prefix,\n warehous_counttag_number,\n formatBoolYN(warehous_useslips) as f_useslips\n FROM site() JOIN addr ON (addr_id=warehous_addr_id)\nLEFT OUTER JOIN sitetype ON (sitetype_id=warehous_sitetype_id) \nWHERE ((TRUE)\n<? if not exists("showInactive") ?>\n AND (warehous_active) \n<? endif ?>\n) ORDER BY warehous_code;\n \n \n head\n SELECT <? if exists("showInactive") ?>\n text('Showing Active and Inactive Warehouses')\n <? else ?>\n text('Showing Active Warehouses')\n <? endif ?>\n AS f_show;\n \n \n 61\n \n 5\n 55\n 745\n 55\n 2\n \n \n \n 10\n 40\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n f_show\n \n \n \n \n
\n detail\n \n \n detail\n \n 151\n \n \n 615\n 110\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_shipping\n \n \n \n 5\n 145\n 745\n 145\n 0\n \n \n \n 120\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 295\n 90\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_fob\n \n \n \n \n 350\n 110\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_bol_number\n \n \n \n \n 120\n 25\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_active\n \n \n \n \n 295\n 5\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_descrip\n \n \n \n \n 295\n 110\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_bol_prefix\n \n \n \n \n \n \n 295\n 125\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_counttag_prefix\n \n \n \n \n \n 295\n 70\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_addr4\n \n \n \n \n 350\n 140\n 450\n 140\n 0\n \n \n \n 295\n 125\n 345\n 125\n 0\n \n \n \n \n \n 350\n 125\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_counttag_number\n \n \n \n 350\n 125\n 450\n 125\n 0\n \n \n \n 295\n 25\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_addr1\n \n \n \n \n \n 615\n 125\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_useslips\n \n \n \n \n 295\n 55\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_addr3\n \n \n \n \n \n 295\n 40\n 450\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_addr2\n \n \n \n 295\n 140\n 345\n 140\n 0\n \n \n
\n \n 16\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 8 ValidLocationsByItem \N \n\n Valid Locations By Item\n ValidLocationsByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n SELECT warehous_code,\n formatLocationName(location_id) AS locationname,\n firstLine(location_descrip) as f_descrip,\n formatBoolYN(location_restrict) AS restricted,\n formatBoolYN(location_netable) AS netable\n FROM itemsite, location, whsinfo\n WHERE ((validLocation(location_id, itemsite_id))\n AND ((itemsite_loccntrl) OR (itemsite_location_id=location_id))\n AND (itemsite_item_id=<? value("item_id") ?>)\n AND (itemsite_warehous_id=warehous_id)\n<? if exists("warehous_id") ?>\n AND (warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n)\n\nORDER BY warehous_code, locationname;\n \n \n 221\n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n 100\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n \n 100\n 145\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 10\n 0\n 45\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n warehous_code\n \n \n \n \n 640\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n netable\n \n \n \n \n 555\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n restricted\n \n \n \n \n 70\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n locationname\n \n \n \n \n 235\n 0\n 310\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_descrip\n \n \n \n
\n \n 16\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 432 VendorInformation \N \n\n Vendor Information\n VendorInformation\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT vend_name, vend_vendtype_id, vend_terms_id,\n vend_shipvia, vend_active, vend_cntct1_id,\n vend_cntct2_id, crmacct_id, vend_number,\n MIN(pohead_orderdate) AS minpodate, \n MAX(pohead_orderdate) AS maxpodate, \n formatMoney(SUM(currToBase(pohead_curr_id,\n (poitem_qty_ordered - poitem_qty_received) * poitem_unitprice,\n CURRENT_DATE))) AS backlog ,\n c1.cntct_first_name || ' ' || c1.cntct_last_name AS contact1_name,\n c1.cntct_phone AS contact1_phone, c1.cntct_phone2 AS contact1_phone, \n formataddr(a1.addr_id) AS contact1_address,\n c1.cntct_fax as contact1_fax, c1.cntct_email AS contct1_email,\n c2.cntct_first_name || ' ' || c2.cntct_last_name AS contact2_name,\n c2.cntct_phone AS contact2_phone, c2.cntct_phone2 AS contact2_phone, \n c2.cntct_fax as contact2_fax, c2.cntct_email AS contct2_email,\n formataddr(a2.addr_id) AS contact2_address,\n vend_comments\n FROM vendinfo\n LEFT OUTER JOIN cntct c1 ON (vend_cntct1_id = c1.cntct_id)\n LEFT OUTER JOIN addr a1 ON (c1.cntct_addr_id = a1.addr_id)\n LEFT OUTER JOIN cntct c2 ON (vend_cntct2_id = c2.cntct_id)\n LEFT OUTER JOIN addr a2 ON (c2.cntct_addr_id = a2.addr_id)\n LEFT OUTER JOIN pohead ON (pohead_vend_id=vend_id)\n LEFT OUTER JOIN poitem ON (poitem_pohead_id=pohead_id\n AND poitem_status='O')\n JOIN crmacct ON (crmacct_vend_id=vend_id)\n WHERE (vend_id=<? value("vend_id") ?>) \n GROUP BY vend_name, vend_vendtype_id, vend_terms_id,\n vend_shipvia, vend_active,vend_cntct1_id,\n vend_cntct2_id, crmacct_id,\n c1.cntct_first_name, c1.cntct_last_name,\n c1.cntct_phone, c1.cntct_phone2, \n a1.addr_id,c1.cntct_fax, c1.cntct_email,\n c2.cntct_first_name,c2.cntct_last_name ,\n c2.cntct_phone, c2.cntct_phone2, \n c2.cntct_fax, c2.cntct_email,a2.addr_id,\n vend_comments, vend_number;\n \n \n lypurch\n SELECT formatMoney(SUM(currToBase(vohead_curr_id,\n vohead_amount,\n vohead_gldistdate))) AS purchases \n FROM vohead \n WHERE (vohead_posted\n AND (vohead_gldistdate \n BETWEEN (DATE_TRUNC('year', CURRENT_DATE) - INTERVAL '1 year')\n AND (DATE_TRUNC('year', CURRENT_DATE) - INTERVAL '1 day'))\n AND (vohead_vend_id=<? value("vend_id") ?>));\n \n \n ytdpurch\n SELECT formatMoney(SUM(currToBase(vohead_curr_id,\n vohead_amount,\n vohead_gldistdate))) AS purchases \n FROM vohead \n WHERE (vohead_posted\n AND (vohead_gldistdate \n BETWEEN (DATE_TRUNC('year', CURRENT_DATE))\n AND (CURRENT_DATE - INTERVAL '1 day'))\n AND (vohead_vend_id=<? value("vend_id") ?>));\n \n \n backlog\n SELECT formatMoney( COALESCE( SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ), 0 ) ) AS backlog FROM cohead, coitem, itemsite, item WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (coitem_status='O') AND (cohead_cust_id=<? value("cust_id") ?>) );\n \n \n OpenBalance\n SELECT formatMoney(COALESCE(SUM((apopen_amount-apopen_paid) / apopen_curr_rate * \n CASE WHEN (apopen_doctype IN ('D','V')) THEN 1 \n ELSE -1 END), 0.0)) AS balance \n FROM apopen \n WHERE ((apopen_open)\n AND (apopen_vend_id=<? value("vend_id") ?>));\n\n \n \n podate\n SELECT formatDate(MIN(pohead_orderdate)) AS firstpodate, formatDate(MAX(pohead_orderdate)) AS lastpodate\nFROM pohead\nWHERE (pohead_vend_id=<? value("vend_id") ?>)\n \n \n 392\n \n \n \n 105\n 368\n 575\n 15\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n head\n vend_comments\n \n \n \n \n 134\n 305\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n podate\n firstpodate\n \n \n \n 370\n 160\n 370\n 295\n 0\n \n \n 5\n 155\n 360\n 155\n 0\n \n \n \n \n 99.8\n 229\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n contact1_name\n \n \n \n \n 100\n 260\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n contact1_fax\n \n \n \n \n \n 474\n 229\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n contact2_name\n \n \n \n \n \n 5\n 295\n 740\n 295\n 2\n \n \n \n \n \n 400\n 305\n 145\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n lypurch\n purchases\n \n \n \n \n 475\n 275\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n contact2_email\n \n \n \n \n 100\n 275\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n contact1_email\n \n \n \n \n 475\n 260\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n contact2_fax\n \n \n \n \n \n 100\n 75\n 295\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_name\n \n \n \n \n \n 400\n 325\n 145\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n ytdpurch\n purchases\n \n \n \n \n \n \n 475\n 245\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n contact2_phone\n \n \n \n \n 380\n 155\n 735\n 155\n 0\n \n \n \n \n \n \n 130\n 344.893\n 103\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n backlog\n \n \n \n \n 100\n 245\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n head\n contact1_phone\n \n \n \n \n 130\n 325\n 105\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n podate\n lastpodate\n \n \n \n \n 410\n 345\n 134.643\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n OpenBalance\n balance\n \n \n \n \n \n \n 100\n 95\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_number\n \n \n \n \n \n \n \n 21\n 163\n 341\n 12\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n head\n contact1_address\n \n \n \n \n 399\n 164\n 333\n 12\n \n 0\n \n Arial\n 8\n bold\n \n \n \n \n head\n contact2_address\n \n \n \n \n 18\n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n\n \N 0 2013-07-26 16:14:22.271087 142 VendorMasterList \N \n\n Vendor Master List\n VendorMasterList\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n vendors\n detail\n \n \n 153\n \n \n \n \n \n 8\n 149\n 748\n 149\n 2\n \n \n \n 10\n 43\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n
\n detail\n \n \n detail\n \n 91\n \n \n 175\n 30\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_line2\n \n \n \n \n 515\n 60\n 204\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_zip\n \n \n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 175\n 15\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_line1\n \n \n \n \n 175\n 60\n 204\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_city\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_number\n \n \n \n \n 175\n 45\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_line3\n \n \n \n \n 370\n 60\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n addr_state\n \n \n \n
\n \n 21\n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 260 ViewAPCheckRunEditList \N \n\n View Check Run Edit List\n ViewAPCheckRunEditList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT CASE WHEN checkhead_void THEN 0\n ELSE checkhead_amount END AS amt_check,\n CASE WHEN checkhead_void THEN 0\n ELSE currToBase(checkhead_curr_id,checkhead_amount,\n checkhead_checkdate)\n END AS base_amt_check,\n checkhead_id AS primaryid,\n -1 AS secondaryid,\n formatBoolYN(checkhead_void) AS f_void,\n formatBoolYN(checkhead_printed) AS f_printed,\n TEXT(checkhead_number) AS number,\n (checkrecip_number || '-' || checkrecip_name) AS description,\n formatDate(checkhead_checkdate) AS f_checkdate,\n formatMoney(checkhead_amount) AS f_amount,\n formatMoney(currtobase(checkhead_curr_id,checkhead_amount,checkhead_checkdate)) AS f_baseamount,\n currconcat(checkhead_curr_id) AS currAbbr,\n checkhead_number,\n 1 AS orderby\n FROM checkhead LEFT OUTER JOIN\n checkrecip ON ((checkrecip_id=checkhead_recip_id)\n\t\t AND (checkrecip_type=checkhead_recip_type))\n WHERE ((checkhead_bankaccnt_id=<? value("bankaccnt_id") ?>)\n AND (NOT checkhead_posted)\n AND (NOT checkhead_replaced)\n AND (NOT checkhead_deleted)\n<? if exists("vend_id") ?>\n AND (checkrecip_type='V')\n AND (checkrecip_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n AND (checkrecip_type='V')\n AND (checkrecip_id IN (SELECT vend_id\n FROM vendinfo\n WHERE (vend_vendtype_id=<? value("vendtype_id") ?>)))\n<? elseif exists("vendtype_pattern") ?>\n AND (checkrecip_type='V')\n AND (checkrecip_id IN (SELECT vend_id\n FROM vendinfo, vendtype\n WHERE ((vend_vendtype_id=vendtype_id)\n AND (vendtype_code ~ <? value("vendtype_pattern") ?>))))\n<? endif ?>\n )\n\nUNION SELECT 0 AS amt_check,\n 0 AS base_amt_check,\n checkitem_checkhead_id AS primaryid,\n checkitem_id AS secondaryid,\n '' AS f_void,\n '' AS f_printed,\n CASE WHEN (checkitem_ranumber IS NOT NULL) THEN checkitem_ranumber::TEXT\n\t ELSE checkitem_vouchernumber\n\t END AS number,\n CASE WHEN (checkitem_cmnumber IS NOT NULL) THEN checkitem_cmnumber::TEXT\n\t ELSE checkitem_invcnumber\n\t END AS description,\n '' AS f_checkdate,\n formatMoney(checkitem_amount) AS f_amount,\n formatMoney(currtobase(checkitem_curr_id,checkitem_amount,checkhead_checkdate)) AS f_baseamount,\n currconcat(checkitem_curr_id) AS currAbbr,\n checkhead_number,\n 2 AS orderby\n FROM checkitem, checkhead\n WHERE ( (checkitem_checkhead_id=checkhead_id)\n AND (checkhead_bankaccnt_id=<? value("bankaccnt_id") ?>)\n AND (NOT checkhead_posted)\n AND (NOT checkhead_replaced)\n AND (NOT checkhead_deleted)\n<? if exists("vend_id") ?>\n AND (checkhead_recip_type='V')\n AND (checkhead_recip_id=<? value("vend_id") ?>)\n<? elseif exists("vendtype_id") ?>\n AND (checkhead_recip_type='V')\n AND (checkhead_recip_id IN (SELECT vend_id\n FROM vendinfo\n WHERE (vend_vendtype_id=<? value("vendtype_id") ?>)))\n<? elseif exists("vendtype_pattern") ?>\n AND (checkhead_recip_type='V')\n AND (checkhead_recip_id IN (SELECT vend_id\n FROM vendinfo, vendtype\n WHERE ((vend_vendtype_id=vendtype_id)\n AND (vendtype_code ~ <? value("vendtype_pattern") ?>))))\n<? endif ?>\n )\nORDER BY checkhead_number, primaryid, orderby;\n \n \n head\n SELECT (bankaccnt_name || '-' || bankaccnt_descrip) AS bankaccnt\n FROM bankaccnt\n WHERE (bankaccnt_id=<? value("bankaccnt_id") ?>);\n \n \n 127\n \n \n 5\n 112\n 745\n 112\n 2\n \n \n \n \n \n \n 145\n 55\n 350\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n bankaccnt\n \n \n \n \n \n \n \n \n \n \n \n \n 11\n \n \n 28\n \n \n \n 5\n 20\n 745\n 20\n 2\n \n \n \n \n \n \n \n
\n detail\n \n detail\n orderid\n \n \n \n detail\n \n 21\n \n \n 130\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n number\n \n \n \n \n 585\n 0\n 53\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n currAbbr\n \n \n \n \n 5\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_void\n \n \n \n \n 65\n 0\n 55\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_printed\n \n \n \n \n 465\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_checkdate\n \n \n \n \n 245\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n description\n \n \n \n \n 645\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_amount\n \n \n \n
\n \n 21\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 61\n \n \n 645\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n amt_check\n \n qty\n \n \n \n 645\n 20\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n base_amt_check\n \n qty\n \n \n \n 567\n 2\n 745\n 2\n 2\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 287 VoucherRegister \N \n\n Voucher Register\n VoucherRegister\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate,\n <? if exists("accnt_id") ?>\n ( SELECT (accnt_number || '-' || accnt_descrip)\n FROM accnt\n WHERE (accnt_id=<? value("accnt_id") ?>) )\n <? else ?>\n text('All Accounts')\n <? endif ?>\n AS accnt,\n <? if exists("showUsernames") ?>\n text('Username')\n <? else ?>\n text('')\n <? endif ?>\n AS f_username\n \n \n detail\n SELECT gltrans_id,\n formatDate(gltrans_date) AS transdate,\n vend_number, vend_name,\n gltrans_doctype,\n gltrans_docnumber,\n firstLine(gltrans_notes) AS transnotes,\n (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n CASE WHEN (gltrans_amount < 0) THEN formatMoney(ABS(gltrans_amount))\n ELSE ''\n END AS f_debit,\n CASE WHEN (gltrans_amount > 0) THEN formatMoney(gltrans_amount)\n ELSE ''\n END AS f_credit,\n <? if exists("showUsernames") ?>\n gltrans_username\n <? else ?>\n text('')\n <? endif ?>\n AS f_username\n FROM accnt, gltrans LEFT OUTER JOIN vohead JOIN vendinfo ON (vohead_vend_id=vend_id) ON (gltrans_doctype='VO' and gltrans_docnumber=vohead_number)\n WHERE ((gltrans_accnt_id=accnt_id)\n AND (gltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("accnt_id") ?>\n AND (gltrans_accnt_id=<? value("accnt_id") ?>)\n<? endif ?>\n AND (gltrans_source='A/P')\n )\nORDER BY gltrans_created DESC, gltrans_sequence, gltrans_amount;\n \n \n 221\n \n \n 545\n 70\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n \n 5\n 215\n 745\n 215\n 2\n \n \n \n \n 670\n 170\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_username\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 545\n 90\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 140\n 70\n 290\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n accnt\n \n \n \n \n \n 6\n \n \n 56\n \n \n \n \n \n \n \n \n \n \n \n 670\n 5\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n f_username\n \n \n \n 5\n 50\n 745\n 50\n 2\n \n \n
\n detail\n \n \n detail\n \n 46\n \n \n 245\n 0\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transnotes\n \n \n \n \n 15\n 30\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_number\n \n \n \n \n 245\n 15\n 260\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n account\n \n \n \n \n 160\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_doctype\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n transdate\n \n \n \n \n 510\n 30\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_debit\n \n \n \n \n 105\n 30\n 265\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vend_name\n \n \n \n \n 595\n 30\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_credit\n \n \n \n \n 620\n 0\n 120\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_username\n \n \n \n \n 160\n 15\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n gltrans_docnumber\n \n \n \n
\n \n 18\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 194 WOHistoryByClassCode \N \n\n Work Order History By Class Code\n WOHistoryByClassCode\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n Detail\n workOrderHistory\n detail\n \n \n head\n SELECT <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("classcode_id") ?>\n ( SELECT (classcode_code||'-'||classcode_descrip)\n FROM classcode\n WHERE (classcode_id=<? value("classcode_id") ?>) )\n <? elseif exists("classcode_pattern") ?>\n text(<? value("classcode_pattern") ?>)\n <? else ?>\n text('All Class Codes')\n <? endif ?>\n AS classcode,\n <? if exists("showOnlyTopLevel") ?>\n text('Only Show Top level Work Orders')\n <? else ?>\n text('')\n <? endif ?>\n AS lbl_toplevel,\n <? if exists("showCosts") ?>\n text('Cost')\n <? else ?>\n text('')\n <? endif ?>\n AS lbl_cost\n;\n \n \n 172\n \n \n \n \n \n 5\n 165\n 740\n 165\n 2\n \n \n \n \n \n \n \n \n \n 135\n 85\n 170\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n classcode\n \n \n \n \n \n 365\n 85\n 355\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n lbl_toplevel\n \n \n \n \n 135\n 105\n 170\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 665\n 151\n 70\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_cost\n \n \n \n \n \n 7\n \n \n 32\n \n \n \n \n \n \n \n 5\n 25\n 740\n 25\n 2\n \n \n \n \n \n \n 660\n 8\n 70\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_cost\n \n \n \n
\n detail\n \n \n Detail\n \n 52\n \n \n 5\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wonumber\n \n \n \n \n 85\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n warehous_code\n \n \n \n \n 509\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_wo_duedate\n \n \n \n \n 45\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wo_status\n \n \n \n \n 125\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_number\n \n \n \n \n 229\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n uom_name\n \n \n \n \n 125\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_descrip2\n \n \n \n \n 670\n 0\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_wo_postedvalue\n \n \n \n \n 270\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_wo_qtyord\n \n \n \n \n 125\n 15\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_descrip1\n \n \n \n \n 350\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_wo_qtyrcv\n \n \n \n 5\n 45\n 740\n 45\n 0\n \n \n \n 430\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n f_wo_startdate\n \n \n \n
\n \n 17\n \n \n \n 95\n 0\n 113\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 86 WOHistoryByItem \N \n\n Work Order History by Item\n WOHistoryByItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n Detail\n SELECT formatWONumber(wo_id) AS wonumber,\n wo_status, warehous_code,\n formatQty(wo_qtyord) AS ordered,\n formatQty(wo_qtyrcv) AS received,\n formatDate(wo_startdate) AS startdate,\n formatDate(wo_duedate) AS duedate,\n <? if exists("showCosts") ?>\n formatCost(wo_postedvalue)\n <? else ?>\n text('')\n <? endif ?>\n AS value\n FROM wo, itemsite, whsinfo\n WHERE ((wo_itemsite_id=itemsite_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (itemsite_item_id=<? value("item_id") ?>)\n<? if exists("showOnlyTopLevel") ?>\n AND ((wo_ordtype<>'W') OR (wo_ordtype IS NULL))\n<? endif ?>\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n AND (wo_duedate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) )\nORDER BY wo_startdate DESC, wo_number, wo_subnumber;\n \n \n \n head\n SELECT item_number,\n item_descrip1,\n item_descrip2,\n <? if exists("warehous_id") ?>\n (SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>))\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse,\n <? if exists("showOnlyTopLevel") ?>\n text('Only Show Top Level Work Orders')\n <? else ?>\n text('')\n <? endif ?>\n AS lbl_toplevel,\n <? if exists("showCosts") ?>\n text('Cost')\n <? else ?>\n text('')\n <? endif ?>\n AS lbl_cost,\n formatDate(<? value("startDate") ?>, 'Earliest') AS startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS enddate\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n \n \n 191\n \n \n \n \n 135\n 85\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 550\n 85\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n enddate\n \n \n \n \n 445\n 105\n 250\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n lbl_toplevel\n \n \n \n \n \n \n \n \n 550\n 65\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n startdate\n \n \n \n \n 135\n 105\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n 5\n 185\n 740\n 185\n 2\n \n \n \n \n \n \n 135\n 125\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n 135\n 65\n 305\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n 660\n 170\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_cost\n \n \n \n \n \n \n 6\n \n \n 31\n \n \n \n \n 5\n 25\n 740\n 25\n 2\n \n \n \n \n 660\n 10\n 80\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n head\n lbl_cost\n \n \n \n \n \n \n
\n detail\n \n \n Detail\n \n 16\n \n \n 405\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n startdate\n \n \n \n \n 170\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n warehous_code\n \n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n duedate\n \n \n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wonumber\n \n \n \n \n 114\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wo_status\n \n \n \n \n 235\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n ordered\n \n \n \n \n 320\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n received\n \n \n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n value\n \n \n \n
\n \n 16\n \n \n 95\n 0\n 114\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 90 WOMaterialAvailabilityByWorkOrder \N \n\n W/O Material Availability By Work Order\n WOMaterialAvailabilityByWorkOrder\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatWONumber(wo_id) AS wonumber,\n warehous_code as warehouse,\n item_number, item_descrip1, item_descrip2, uom_name,\n wo_status AS status, \n <? if exists("onlyShowShortages") ?>\n text('Only Show Shortages')\n <? elseif exists("onlyShowInsufficientInventory") ?>\n text('Only Show Insufficient Inventory')\n <? else ?>\n text('All Materials')\n <? endif ?>\n AS itemfiltertext,\n <? if exists("IndentedParentChild") ?>\n text('Indented Works Orders')\n <? elseif exists("summarizedParentChild") ?>\n text('Summarized Parent/Child Orders')\n <? else ?>\n text('Parent Order Only')\n <? endif ?>\n AS wofiltertext\n FROM wo, itemsite, item, uom, whsinfo\n WHERE ((wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_id=<? value("wo_id") ?>) );\n \n \n detail\n SELECT *, (REPEAT(' ',(woinvav_level-1)*3) || woinvav_item_wo_number) AS itemwonumber FROM woinvavail(<? value("wo_id") ?>,\n<? if exists("IndentedParentChild") ?>\ntrue, \n <? else ?>\nfalse, \n<? endif ?>\n<? if exists("summarizedParentChild") ?>\ntrue, \n <? else ?>\nfalse, \n<? endif ?>\n<? if exists("onlyShowShortages") ?>\ntrue, \n <? else ?>\nfalse, \n<? endif ?>\n<? if exists("onlyShowInsufficientInventory") ?>\ntrue) \n <? else ?>\nfalse) \n<? endif ?>\n \n \n 236\n \n \n \n 325\n 100\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n uom_name\n \n \n \n \n \n \n 100\n 75\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 100\n 100\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n 100\n 55\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n wonumber\n \n \n \n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 100\n 165\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n status\n \n \n \n \n \n \n \n \n 100\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n 325\n 55\n 365\n 18\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n itemfiltertext\n \n \n \n \n 325\n 75\n 365\n 18\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n wofiltertext\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 32\n \n \n 350\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n woinvav_balance\n \n \n \n \n 270\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n woinvav_qoh\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n woinvav_totalavail\n \n \n \n \n 430\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n woinvav_allocated\n \n \n \n \n 509\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n woinvav_ordered\n \n \n \n \n 10\n 0\n 170\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n itemwonumber\n \n \n \n 0\n 29\n 750\n 29\n 0\n \n \n \n 190\n 15\n 555\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n woinvav_descrip\n \n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n woinvav_woavail\n \n \n \n \n 190\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n woinvav_uomname\n \n \n \n
\n \n 16\n \n \n \n \n 695\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 308 VendorAddressList \N \n\n Vendor Address List\n VendorAddressList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT vend_number, vend_name\n FROM vendinfo\n WHERE (vend_id=<? value("vend_id") ?>);\n \n \n \n detail\n SELECT vendaddr_code as num,\n vendaddr_name as name,\n addr_line1 AS address,\n (addr_city || ', ' || addr_state || ' ' || addr_postalcode) AS citystatezip\n FROM vendaddrinfo\n LEFT OUTER JOIN addr ON (vendaddr_addr_id=addr_id)\n WHERE (vendaddr_vend_id=<? value("vend_id") ?>) \nORDER BY vendaddr_code;\n \n \n 171\n \n \n \n \n \n \n 135\n 70\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_number\n \n \n \n \n 5\n 165\n 745\n 165\n 2\n \n \n \n \n 135\n 90\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n vend_name\n \n \n \n \n \n 6\n \n \n 21\n \n \n \n \n \n 5\n 15\n 745\n 15\n 2\n \n \n
\n detail\n \n \n detail\n \n 17\n \n \n 5\n 0\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n num\n \n \n \n \n 65\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n name\n \n \n \n \n 545\n 0\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n citystatezip\n \n \n \n \n 270\n 0\n 250\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n address\n \n \n \n
\n \n 17\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 105\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 186 VendorTypesMasterList \N \n\n Vendor Types Master List\n VendorTypesMasterList\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT vendtype_id,\n vendtype_code,\n vendtype_descrip\n FROM vendtype\nORDER BY vendtype_code;\n \n \n 76\n \n \n 5\n 70\n 745\n 70\n 2\n \n \n \n \n \n \n 6\n \n \n 21\n \n 5\n 15\n 745\n 15\n 2\n \n \n \n \n
\n detail\n \n \n detail\n \n 16\n \n \n 175\n 0\n 565\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vendtype_descrip\n \n \n \n \n 10\n 0\n 150\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vendtype_code\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 88 WOMaterialRequirementsByComponentItem \N \n\n W/O Material Requirements By Component Item\n WOMaterialRequirementsByComponentItem\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT item_number, item_descrip1, item_descrip2,\n <? if exists("warehous_id") ?>\n ( SELECT warehous_code\n FROM whsinfo\n WHERE (warehous_id=<? value("warehous_id") ?>) )\n <? else ?>\n text('All Sites')\n <? endif ?>\n AS warehouse\n FROM item\n WHERE (item_id=<? value("item_id") ?>);\n\n \n \n detail\n workOrderMaterial\n detail\n \n \n total\n SELECT formatQty(SUM(womatl_qtyreq)) AS required,\n formatQty(SUM(womatl_qtyiss)) AS issued,\n formatQty(SUM(noNeg(womatl_qtyreq - womatl_qtyiss))) AS balance\n FROM wo, womatl, itemsite AS parentsite, itemsite AS componentsite, item, uom\nWHERE ((womatl_wo_id=wo_id)\n AND (womatl_uom_id=uom_id)\n AND (wo_status <> 'C')\n AND (wo_itemsite_id=parentsite.itemsite_id)\n AND (womatl_itemsite_id=componentsite.itemsite_id)\n AND (parentsite.itemsite_item_id=item_id)\n AND (componentsite.itemsite_item_id=<? value("item_id") ?>)\n<? if exists("warehous_id") ?>\n AND (componentsite.itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n )\n;\n \n \n 236\n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n 100\n 145\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n \n \n \n \n 100\n 100\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n \n \n \n 100\n 80\n 200\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n wonumber\n \n \n \n \n 95\n 32\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 95\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 515\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyiss\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 200\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issuemethod\n \n \n \n \n 360\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scrap\n \n \n \n \n 400\n 32\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 440\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyreq\n \n \n \n \n 280\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyper\n \n \n \n \n 280\n 17\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyfxd\n \n \n \n
\n \n 16\n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 16\n \n \n 595\n 1\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n balance\n \n \n \n \n \n 520\n 1\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n issued\n \n \n \n \n 445\n 1\n 70\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n total\n required\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 89 WOMaterialRequirementsByWorkOrder \N \n\n W/O Material Requirements By Work Order\n WOMaterialRequirementsByWorkOrder\n \n Letter\n \n 50\n 50\n 50\n 50\n \n head\n SELECT formatWONumber(wo_id) AS wonumber,\n warehous_code as warehouse,\n item_number, item_descrip1,\n item_descrip2, uom_name,\n wo_status AS status\n FROM wo, itemsite, item, uom, whsinfo\n WHERE ((wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_id=<? value("wo_id") ?>) );\n \n \n detail\n workOrderMaterial\n detail\n \n \n 236\n \n \n \n 100\n 165\n 100\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n status\n \n \n \n \n 100\n 100\n 150\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_number\n \n \n \n \n \n \n \n \n \n \n \n 100\n 140\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip2\n \n \n \n \n \n \n \n 100\n 75\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n warehouse\n \n \n \n \n \n 100\n 120\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n item_descrip1\n \n \n \n \n 100\n 55\n 300\n 20\n \n \n Arial\n 10\n bold\n \n \n \n \n head\n wonumber\n \n \n \n \n \n 5\n 229\n 745\n 229\n 2\n \n \n \n \n \n 6\n \n \n 36\n \n \n \n \n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 51\n \n \n 10\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 430\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyreq\n \n \n \n \n 190\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n issuemethod\n \n \n \n \n 350\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_scrap\n \n \n \n \n 509\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyiss\n \n \n \n 5\n 45\n 745\n 45\n 0\n \n \n \n 10\n 30\n 300\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 670\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_duedate\n \n \n \n \n 590\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_balance\n \n \n \n \n 10\n 15\n 255\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 270\n 0\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyper\n \n \n \n \n 270\n 17\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qtyfxd\n \n \n \n
\n \n 16\n \n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 486 Items \N \n\n Items\n Items\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n SELECT\n <? if exists("ListNumericItemNumbersFirst") ?>\n DISTINCT ON ( toNumeric(item_number, 999999999999999), item_number )\n <? else ?>\n DISTINCT ON ( item_number )\n <? endif ?>\n item_number,\n item_descrip1,\n item_descrip2,\n formatBoolYN(item_active) AS active,\n CASE WHEN (item_type='M') THEN 'Manufactured'\n WHEN (item_type='P') THEN 'Purchased'\n WHEN (item_type='F') THEN 'Phantom'\n WHEN (item_type='B') THEN 'Breeder'\n WHEN (item_type='C') THEN 'Co-Product'\n WHEN (item_type='Y') THEN 'By-Product'\n WHEN (item_type='R') THEN 'Reference'\n WHEN (item_type='T') THEN 'Tooling'\n WHEN (item_type='O') THEN 'Outside Process'\n WHEN (item_type='J') THEN 'Job'\n WHEN (item_type='K') THEN 'Kit'\n WHEN (item_type='L') THEN 'Planning'\n ELSE item_type\n END AS itemtype,\n iuom.uom_name AS invuom,\n itemcapuom(item_id) AS capuom,\n itemaltcapuom(item_id) AS altcapuom,\n puom.uom_name AS priceuom,\n puom.uom_name AS shipuom,\n formatRatio(itemcapinvrat(item_id)) AS capratio,\n formatRatio(itemaltcapinvrat(item_id)) AS altcapratio,\n formatRatio(iteminvpricerat(item_id)) AS shipratio,\n formatRatio(iteminvpricerat(item_id)) AS priceratio,\n formatBoolYN(item_sold) AS sold,\n formatBoolYN(item_exclusive) AS exclusive,\n formatBoolYN(item_picklist) AS picklist,\n formatBoolYN(item_config) AS configured,\n formatWeight(item_prodweight) AS prodweight,\n formatWeight(item_packweight) AS packweight,\n classcode_code\nFROM item\n JOIN classcode ON (item_classcode_id=classcode_id)\n JOIN uom iuom ON (item_inv_uom_id=iuom.uom_id)\n JOIN uom puom ON (item_price_uom_id=puom.uom_id)\n<? if exists("itemgrp_id") ?>\n JOIN itemgrpitem ON (item_id=itemgrpitem_item_id)\n JOIN itemgrp ON (itemgrp_id=itemgrpitem_itemgrp_id)\n<? endif ?>\n<? foreach("char_id_text_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_text_list") ?> \n ON ((charass_alias<? literal("char_id_text_list") ?>.charass_target_type='I') \n AND (charass_alias<? literal("char_id_text_list") ?>.charass_target_id=item_id)\n AND (charass_alias<? literal("char_id_text_list") ?>.charass_char_id=<? value("char_id_text_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_text_list") ?> \n ON (charass_alias<? literal("char_id_text_list") ?>.charass_char_id=char_alias<? literal("char_id_text_list") ?>.char_id)\n<? endforeach ?>\n<? foreach("char_id_list_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_list_list") ?> \n ON ((charass_alias<? literal("char_id_list_list") ?>.charass_target_type='I') \n AND (charass_alias<? literal("char_id_list_list") ?>.charass_target_id=item_id)\n AND (charass_alias<? literal("char_id_list_list") ?>.charass_char_id=<? value("char_id_list_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_list_list") ?> \n ON (charass_alias<? literal("char_id_list_list") ?>.charass_char_id=char_alias<? literal("char_id_list_list") ?>.char_id)\n<? endforeach ?>\n<? foreach("char_id_date_list") ?>\n LEFT OUTER JOIN charass charass_alias<? literal("char_id_date_list") ?> \n ON ((charass_alias<? literal("char_id_date_list") ?>.charass_target_type='I') \n AND (charass_alias<? literal("char_id_date_list") ?>.charass_target_id=item_id)\n AND (charass_alias<? literal("char_id_date_list") ?>.charass_char_id=<? value("char_id_date_list") ?>))\n LEFT OUTER JOIN char char_alias<? literal("char_id_date_list") ?> \n ON (charass_alias<? literal("char_id_date_list") ?>.charass_char_id=char_alias<? literal("char_id_date_list") ?>.char_id)\n<? endforeach ?>\nWHERE ( true\n<? if exists("search_pattern") ?>\n AND ( (item_number ~* <? value("search_pattern") ?>)\n OR (item_descrip1 || item_descrip2 ~* <? value("search_pattern") ?>) )\n<? endif ?>\n<? if exists("showPurchased") ?>\n AND (item_type IN ('P', 'O'))\n<? elseif exists("showManufactured") ?>\n AND (item_type IN ('M', 'F', 'B','K'))\n<? elseif exists("showSold") ?>\n AND (item_sold)\n<? endif ?>\n<? if exists("item_type") ?>\n AND (item_type=<? value("item_type") ?>)\n<? endif ?>\n<? if not exists("showInactive") ?>\n AND (item_active)\n<? endif ?>\n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>)\n<? endif ?>\n<? if exists("prodcat_id") ?>\n AND (item_prodcat_id=<? value("prodcat_id") ?>)\n<? endif ?>\n<? if exists("freightclass_id") ?>\n AND (item_freightclass_id=<? value("freightclass_id") ?>)\n<? endif ?>\n<? if exists("itemgrp_id") ?>\n AND (itemgrp_id=<? value("itemgrp_id") ?>)\n<? endif ?>\n<? if exists("item_number_pattern") ?>\n AND (item_number ~* <? value("item_number_pattern") ?>)\n<? endif ?>\n<? if exists("item_descrip_pattern") ?>\n AND (item_descrip1 || item_descrip2 ~* <? value("item_descrip_pattern") ?>)\n<? endif ?>\n<? if exists("classcode_pattern") ?>\n AND (classcode_code ~* <? value("classcode_pattern") ?>)\n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n AND (prodcat_code ~* <? value("prodcat_pattern") ?>)\n<? endif ?>\n<? if exists("freightclass_pattern") ?>\n AND (freightclass_code ~* <? value("freightclass_pattern") ?>)\n<? endif ?>\n<? literal("charClause") ?>\n) ORDER BY\n<? if exists("ListNumericItemNumbersFirst") ?>\n toNumeric(item_number, 999999999999999),\n<? endif ?>\n item_number;\n \n \n 241\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n 235\n 745\n 235\n 2\n \n \n \n \n 10\n 28\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 81\n \n \n \n 5\n 75\n 745\n 75\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n unnamed\n \n \n detail\n \n 81\n \n \n 565\n 30\n 60\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n picklist\n \n \n \n \n 10\n 15\n 250\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 565\n 15\n 60\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n exclusive\n \n \n \n \n 433\n 45\n 90\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n priceratio\n \n \n \n \n 10\n 45\n 250\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n itemtype\n \n \n \n \n 640\n 0\n 100\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n packweight\n \n \n \n \n 10\n 30\n 250\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n item_descrip2\n \n \n \n \n 433\n 30\n 90\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n altcapratio\n \n \n \n \n 275\n 60\n 100\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n shipuom\n \n \n \n \n 10\n 0\n 250\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n detail\n item_number\n \n \n \n 5\n 75\n 745\n 75\n 0\n \n \n \n 565\n 0\n 60\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n sold\n \n \n \n \n 565\n 45\n 60\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n configured\n \n \n \n \n 275\n 45\n 100\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n priceuom\n \n \n \n \n 275\n 0\n 100\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n invuom\n \n \n \n \n 10\n 60\n 50\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n active\n \n \n \n \n 433\n 15\n 90\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n capratio\n \n \n \n \n 104\n 60\n 66\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n classcode_code\n \n \n \n \n 275\n 30\n 100\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n altcapuom\n \n \n \n \n 275\n 15\n 100\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n capuom\n \n \n \n \n 640\n 15\n 100\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n prodweight\n \n \n \n \n 433\n 60\n 90\n 15\n \n \n Arial\n 8\n 40\n \n \n \n \n detail\n shipratio\n \n \n \n
\n \n 16\n \n \n \n \n 80\n 0\n 140\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 715\n 0\n 30\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 480 WOSchedule \N \n\n Work Order Schedule\n WOSchedule\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n Detail\n workOrderSchedule\n detail\n \n \n Head\n SELECT formatDate(<? value("startDate") ?>, 'Earliest') AS f_startdate,\n formatDate(<? value("endDate") ?>, 'Latest') AS f_enddate,\n<? if exists("warehous_id") ?>\n warehous_code\nFROM whsinfo\nWHERE (warehous_id=<? value("warehous_id") ?>);\n<? else ?>\n TEXT('All Sites') AS warehous_code;\n<? endif ?>\n\n \n \n 191\n \n 5\n 185\n 740\n 185\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n 10\n 38\n 725\n 15\n \n 12\n \n Arial\n 10\n bold\n \n \n \n \n Parameter Query\n filter\n \n \n \n \n \n 6\n \n \n 31\n \n \n \n \n \n \n \n \n 5\n 25\n 740\n 25\n 2\n \n \n \n \n
\n detail\n \n \n Detail\n \n 52\n \n \n 405\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n ordered\n \n \n \n \n 190\n 30\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_descrip2\n \n \n \n \n 360\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n uom_name\n \n \n \n \n 190\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_number\n \n \n \n \n 140\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n warehous_code\n \n \n \n \n 490\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n received\n \n \n \n \n 10\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wonumber\n \n \n \n 5\n 45\n 740\n 45\n 0\n \n \n \n 190\n 15\n 200\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n item_descrip1\n \n \n \n \n 95\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n wo_status\n \n \n \n \n 575\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n startdate\n \n \n \n \n 660\n 0\n 80\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Detail\n duedate\n \n \n \n
\n \n 17\n \n \n 95\n 0\n 112\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n
\n \N 0 2013-07-26 16:14:22.271087 \. -- -- Data for Name: rjctcode; Type: TABLE DATA; Schema: public; Owner: admin -- COPY rjctcode (rjctcode_id, rjctcode_code, rjctcode_descrip) FROM stdin; 17 PO-DAMAGED-RETURNED PO Damaged - Return to Supplier 18 PO-WRONG-PRODUCT PO Wrong Product - Return to Supplier 21 PO-NONCONFORM PO Nonconforming Item \. -- -- Data for Name: rsncode; Type: TABLE DATA; Schema: public; Owner: admin -- COPY rsncode (rsncode_id, rsncode_code, rsncode_descrip, rsncode_doctype) FROM stdin; 2 SO-DAMAGED-RETURNED SO Damaged - Returned on CM \N 1 SO-WRONG-RETURNED SO Wrong Product - Returned on CM \N \. -- -- Data for Name: sale; Type: TABLE DATA; Schema: public; Owner: admin -- COPY sale (sale_id, sale_name, sale_descrip, sale_ipshead_id, sale_startdate, sale_enddate) FROM stdin; \. -- -- Data for Name: salesaccnt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY salesaccnt (salesaccnt_id, salesaccnt_custtype_id, salesaccnt_prodcat_id, salesaccnt_warehous_id, salesaccnt_sales_accnt_id, salesaccnt_credit_accnt_id, salesaccnt_cos_accnt_id, salesaccnt_custtype, salesaccnt_prodcat, salesaccnt_returns_accnt_id, salesaccnt_cor_accnt_id, salesaccnt_cow_accnt_id, salesaccnt_saletype_id, salesaccnt_shipzone_id) FROM stdin; 40 -1 33 -1 140 123 108 .* [^a-zA-Z0-9_] 135 136 137 -1 -1 34 19 -1 -1 141 123 108 [^a-zA-Z0-9_] .* 135 136 137 -1 -1 38 -1 -1 40 142 154 148 .* .* 147 152 153 -1 -1 36 -1 -1 39 142 154 148 .* .* 147 152 153 -1 -1 32 -1 -1 -1 103 123 108 .* .* 135 136 137 -1 -1 \. -- -- Data for Name: salescat; Type: TABLE DATA; Schema: public; Owner: admin -- COPY salescat (salescat_id, salescat_active, salescat_name, salescat_descrip, salescat_sales_accnt_id, salescat_prepaid_accnt_id, salescat_ar_accnt_id) FROM stdin; 1 t NORMAL-SALE Normal Sale 103 123 106 2 t SERVICE Service Revenue 140 123 106 \. -- -- Data for Name: salesrep; Type: TABLE DATA; Schema: public; Owner: admin -- COPY salesrep (salesrep_id, salesrep_active, salesrep_number, salesrep_name, salesrep_commission, salesrep_method, salesrep_emp_id) FROM stdin; 29 t 1000 Sam Masters 0.0750 \N \N 30 t ADMIN Administrator 0.0000 \N 1 31 t JSMITH John Smith 0.0700 \N 2 \. -- -- Data for Name: saletype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY saletype (saletype_id, saletype_code, saletype_descr, saletype_active) FROM stdin; 1 CUST Customer t 2 INT Internet t 3 REP Sales Rep t \. -- -- Data for Name: schemaord; Type: TABLE DATA; Schema: public; Owner: admin -- COPY schemaord (schemaord_id, schemaord_name, schemaord_order) FROM stdin; \. -- -- Data for Name: script; Type: TABLE DATA; Schema: public; Owner: admin -- COPY script (script_id, script_name, script_order, script_enabled, script_source, script_notes) FROM stdin; 6 salesOrder 0 f //This makes the literal for Commission invisible\n//mywindow.findChild("_commissionLit").visible=false;\n\n//This makes the Commission field invisible\n//mywindow.findChild("_commission").visible=false;\n\n//Or, this makes the Commission field read only\nmywindow.findChild("_commission").readOnly=true;\n\n//This make the literal field '%' invisible\n//mywindow.findChild("_commissionPrcntLit").visible=false;\n\n//On the Line Items tab, this makes the literal Margin invisible\nmywindow.findChild("_marginLit").visible=false;\n\n//On the Line Items tab, this makes the Margin invisible\nmywindow.findChild("_margin").visible=false;\n\n\n\n\n Hide Sales Order Fields 5 taxCodes 0 f function copyClicked()\n{\n var params = new Object;\n params.tax_id = mywindow.findChild("_tax").id;\n\n var qry = toolbox.executeQuery("INSERT INTO tax"\n +" (tax_code, tax_descrip,"\n +" tax_sales_accnt_id, tax_ratea,"\n +" tax_salesb_accnt_id, tax_rateb,"\n +" tax_salesc_accnt_id, tax_ratec,"\n +" tax_freight, tax_cumulative) "\n +"SELECT tax_code||'_copy', tax_descrip,"\n +" tax_sales_accnt_id, tax_ratea,"\n +" tax_salesb_accnt_id, tax_rateb,"\n +" tax_salesc_accnt_id, tax_ratec,"\n +" tax_freight, tax_cumulative"\n +" FROM tax"\n +" WHERE(tax_id=);", params);\n if(qry.numRowsAffected()<1)\n {\n toolbox.messageBox("information", mywindow,\n "Copy Failed", "There was an error copying the selected Tax Code. "\n +"Please check the Database Logs for additional information.");\n return;\n }\n\n mywindow.sFillList();\n}\n\nvar btnView = mywindow.findChild("_view");\nvar layout = toolbox.widgetGetLayout(btnView);\nvar newbutton = toolbox.createWidget("QPushButton", mywindow, "_copyButton");\nnewbutton.text="Cop&y";\ntoolbox.layoutBoxInsertWidget(layout, 3, newbutton);\nnewbutton.clicked.connect(copyClicked);\nnewbutton.enabled=false;\nvar taxlist = mywindow.findChild("_tax");\ntaxlist.valid.connect(newbutton, "setEnabled");\n Copy Tax Codes Button 43 storedProcErrorLookup 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2009 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\n/* This simplified version of xtuple/common/storedProcErrorLookup.cpp takes\n an error structure, allowing packages to define their own errors.\n*/\nfunction storedProcErrorLookup(procName, returnVal, errorStruct)\n{\n var message;\n\n if (null != errorStruct)\n {\n if (procName in errorStruct &&\n returnVal in errorStruct[procName])\n message = errorStruct[procName][returnVal];\n else\n {\n procName = procName.toLowerCase();\n for (var tmpProcName in errorStruct)\n if (procName == tmpProcName.toLowerCase())\n {\n message = errorStruct[tmpProcName][returnVal];\n break;\n }\n }\n\n if (message != null)\n return "

" + message\n + qsTr("
(%1, %2)
").arg(procName).arg(returnVal);\n }\n\n return toolbox.storedProcErrorLookup(procName, returnVal);\n}\n this scripted version of the error lookup routine allows packages to define their own messages 7 initMenu 10 f var menu = mainwindow.findChild("menu.sales.lookup"); \nvar trig = mainwindow.findChild("wo.dspWoScheduleByWorkOrder");\nvar act = toolbox.menuAddAction(menu, "Lookup Work Order");\nact.triggered.connect(trig, "trigger"); Add SO Menu Lookup for WOs - Simple 378 initMenu 20 f // Set variables equal to application menu property \nvar lookupMenu = mainwindow.findChild("menu.sales.lookup");\n\n// Set the action in a variable\nvar trig1 = mainwindow.findChild("wo.dspWoScheduleByWorkOrder");\nvar trig2 = mainwindow.findChild("wo.dspWoScheduleByItem");\n\n// Add a menu item, enable by priv., connect it to trig1 based on user action\nvar byWoAct = lookupMenu.addAction ( "Lookup Work Order by WO");\nbyWoAct.enabled = privileges.value("SalesWOReports");\nbyWoAct.triggered.connect(trig1, "trigger");\n\nvar byItemAct = lookupMenu.addAction("Lookup Work Order by Item");\nbyItemAct.enabled = privileges.value("SalesWOReports");\nbyItemAct.triggered.connect(trig2, "trigger");\n\n//Run this in Postgres to create the priv.\n\n//BEGIN;\n// INSERT INTO\n// priv\n// (priv_module,\n// priv_name,\n// priv_descrip)\n// VALUES\n// ('Manufacture',\n// 'SalesWOReports',\n// 'Sales Report Menu Options');\n//COMMIT;\n\n initMenu - Advanced example With Privs 1 dspBacklogByParameterList 1 f var _list = mywindow.findChild("_list");\n\nfunction expandClicked()\n{\n if (_list)\n _list.expandAll();\n}\n\nvar layout = mywindow.findChild("_buttonLayout");\nvar newbutton = toolbox.createWidget("QPushButton", mywindow, "_expandButton");\nnewbutton.text="E&xpand All";\n\nif (layout)\n layout.addWidget(newbutton);\n\nnewbutton.clicked.connect(expandClicked);\n Sales Backlog By ... Add Expand All Button - 3.6 2 dspBacklogByParameterList 2 f var _list = mywindow.findChild("_list");\n\nfunction collapseClicked()\n{\n if (_list)\n _list.collapseAll();\n}\n\nvar layout = mywindow.findChild("_buttonLayout");\nvar newbutton = toolbox.createWidget("QPushButton", mywindow, "_collapseButton");\nnewbutton.text="C&ollapse All";\n\nif (layout)\n layout.addWidget(newbutton);\n\nnewbutton.clicked.connect(collapseClicked); Sales Backlog By ... Add Collapse All Button - 3.6 376 dspIndentedBOM 1 f var _list = mywindow.findChild("_list"); \n\nfunction expandClicked()\n{\nif (_list)\n_list.expandAll();\n}\n\nvar layout = mywindow.findChild("_buttonLayout");\nvar newbutton = toolbox.createWidget("QPushButton", mywindow, "_expandButton");\nnewbutton.text="E&xpand All";\n\nif (layout)\nlayout.addWidget(newbutton);\n\nnewbutton.clicked.connect(expandClicked); Expand Button (version 3.6+) 377 dspIndentedBOM 2 f var _list = mywindow.findChild("_list"); \n\nfunction collapseClicked()\n{\nif (_list)\n_list.collapseAll();\n}\n\nvar layout = mywindow.findChild("_buttonLayout");\nvar newbutton = toolbox.createWidget("QPushButton", mywindow, "_collapseButton");\nnewbutton.text="C&ollapse All";\n\nif (layout)\nlayout.addWidget(newbutton);\n\nnewbutton.clicked.connect(collapseClicked); Collapse Button (version 3.6+) 4 DisplayItemLocations 0 t debugger;\n/* This QtScript example shows the basic scripting required to make a simple\n window designed with Qt Designer and imported into an xTuple ERP database\n do the following things:\n - close the window when the user clicks on a Close button\n - query the database and display the data on-screen\n - print a report\n\n The window contains the following widgets on it:\n _group a WarehouseGroup which lets user choose either a single warehouse\n or all warehouses\n _list an XTreeWidget to display the resulting data in tabular form\n _update an XCheckBox with which the user can request automatic updates\n _close \\\n _query } QPushButtons to perform the obvious\n _print /\n*/\n\n/*\n The _group widget lets the user choose selection criteria for the query.\n The getParams() function checks the _group widget and creates a parameter\n object to hold the selection criteria. This behaves much like an OpenRPT\n ParameterList object in C++ for passing data to a MetaSQL query.\n The getParams() function is called by query() and print() below.\n*/\n\nvar _dates = mywindow.findChild("_dates");\n_dates.setStartNull(qsTr("Earliest"), mainwindow.startOfTime(), true);\n_dates.setEndNull(qsTr("Latest"), mainwindow.endOfTime(), true);\n\nfunction getParams()\n{\n // create an object to hold the parameters\n var params = new Object;\n\n /* ask the _group object on the current window if it "isSelected()".\n this is a Q_INVOKABLE method of the WarehouseGroup - see\n widgets/warehousegroup.h in the C++ source tree.\n */\n if(mywindow.findChild("_group").isSelected())\n {\n // create a parameter named "warehous_id" and give it\n // the value of _group's id Q_PROPERTY - see widgets/warehousgroup.h\n params.warehous_id = mywindow.findChild("_group").id();\n params.startDate = _dates.startDate;\n params.endDate = _dates.endDate;\n }\n // hand the parameter list back to the caller\n params.startDate = _dates.startDate;\n params.endDate = _dates.endDate;\n return params;\n}\n\n// Now define a query, run it, and populate the _list with the results.\nfunction query()\n{\n var params = getParams(); // get selection criteria from the window\n\n /* Execute a MetaSQL statement, passing it parameters and saving the result\n set in a variable named 'qry'. The first column in the query should be an\n id column and /every/ column should be named.\n In addition to the list of data columns to display, the query contains\n several special columns that tell _list how to format some of the data.\n */\nvar qry = toolbox.executeDbQuery("DisplayItemLocations", "DisplayItemLocations", params);\n\n // populate the _list XTreeWidget with the query results saved in qry.\n mywindow.findChild("_list").populate(qry);\n}\n\n/* Call OpenRPT to print a report. Make sure the main query in the report is\n similar to the query above or the user is going to be very surprised.\n*/\nfunction print()\n{\n // Call the named report and pass it the same parameters used by query().\n toolbox.printReport("ItemLocationsByWarehouse", getParams());\n}\n\n/* This function checks whether the _update widget is checked or not. If\n _update is checked when tick() gets called then it will repopulate _list.\n*/\nfunction tick()\n{\n if (mywindow.findChild("_update").checked)\n {\n query();\n }\n}\n\n/* Now we have to set up the display and connect the various objects together\n in a way that will make the display work when users click the buttons.\n\n First connect the buttons to the appropriate functions. Windows know how to\n close themselves so connect the _close button to the generic close function.\n*/\nmywindow.findChild("_close").clicked.connect(mywindow, "close");\n\n// connect the _query and _print buttons to the functions defined above\nmywindow.findChild("_query").clicked.connect(query);\nmywindow.findChild("_print").clicked.connect(print);\n\n/* xTuple ERP has an internal repeating timer. Connect the tick() function to\n this timer so the _list gets updated automatically if the user so desires.\n*/\nmainwindow.tick.connect(tick);\n\n/* When _list gets created by the window, it is empty - no rows and no columns.\n Define the columns here and let query() create the rows. addColumn() takes\n the following arguments:\n 1) column title text\n 2) column width in pixels\n 3) default column alignment - see the Qt docs for Qt::Alignment\n 4) default visibility - is this column visible when the window is first shown\n 5) column name from the query to put in this column of the display\n*/\nvar list = mywindow.findChild("_list");\n\nlist.addColumn("WHSE", 75, 1, true, "warehous_code");\nlist.addColumn("Item", 115, 1, true, "item_number");\nlist.addColumn("Location", 90, 1, true, "location_name");\nlist.addColumn("Lot/Serial Number", 115, 1, true, "lsnumber")\nlist.addColumn("Loc. Qty", 65, 2, true, "itemloc_qty")\nlist.addColumn("Expiration", 90, 1, true, "itemloc_expiration");\n\n// and that's it\n Display Item Location Detail \. -- -- Data for Name: sequence; Type: TABLE DATA; Schema: public; Owner: admin -- COPY sequence (sequence_value) FROM stdin; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 \. -- -- Data for Name: shift; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shift (shift_id, shift_number, shift_name) FROM stdin; 1 DAY Day Shift 2 NIGHT Night \. -- -- Data for Name: shipchrg; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shipchrg (shipchrg_id, shipchrg_name, shipchrg_descrip, shipchrg_custfreight, shipchrg_handling) FROM stdin; 4 ADDCHARGE Add Shipping Charges to Order t \N 3 NOCHARGE No Charge for Shipping f \N \. -- -- Data for Name: shipdata; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shipdata (shipdata_cohead_number, shipdata_cosmisc_tracknum, shipdata_cosmisc_packnum_tracknum, shipdata_weight, shipdata_base_freight, shipdata_total_freight, shipdata_shipper, shipdata_billing_option, shipdata_package_type, shipdata_void_ind, shipdata_lastupdated, shipdata_shiphead_number, shipdata_base_freight_curr_id, shipdata_total_freight_curr_id) FROM stdin; 50002 1Z60E2320344632667 1Z60E2320344632667 2.0000 7.7400 7.7400 UPS Prepaid Package N 2005-12-27 15:50:56.790531 204 1 1 50002 1Z60E2320344632667 1Z60E2320345434272 2.0000 7.7400 7.7400 UPS Prepaid Package N 2005-12-27 15:50:56.790531 204 1 1 50040 1Z60E2320344632667 1Z60E2320344632667 2.0000 7.7400 7.7400 UPS Prepaid Package N 2006-01-11 15:50:38.407882 218 1 1 50040 1Z60E2320344632667 1Z60E2320345434272 2.0000 7.7400 7.7400 UPS Prepaid Package N 2006-01-11 15:50:38.407882 218 1 1 40005 1Z60E2320344632667 1Z60E2320344632667 2.0000 7.7400 7.7400 UPS Prepaid Package N 2006-01-13 12:51:54.041 223 1 1 40005 1Z60E2320344632668 1Z60E2320345432668 2.0000 7.7400 7.7400 UPS Prepaid Package N 2006-01-13 12:51:54.041 223 1 1 \. -- -- Data for Name: shipdatasum; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shipdatasum (shipdatasum_cohead_number, shipdatasum_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum, shipdatasum_weight, shipdatasum_base_freight, shipdatasum_total_freight, shipdatasum_shipper, shipdatasum_billing_option, shipdatasum_package_type, shipdatasum_lastupdated, shipdatasum_shipped, shipdatasum_shiphead_number, shipdatasum_base_freight_curr_id, shipdatasum_total_freight_curr_id) FROM stdin; 50002 1Z60E2320344632667 1Z60E2320344632667 2.0000 7.7400 7.7400 UPS Prepaid Package 2005-12-27 15:50:56.790531 t 204 1 1 50040 1Z60E2320344632667 1Z60E2320344632667 2.0000 7.7400 7.7400 UPS Prepaid Package 2006-01-11 15:50:38.407882 t 218 1 1 40005 1Z60E2320344632667 1Z60E2320344632667 2.0000 7.7400 7.7400 UPS Prepaid Package 2006-01-13 12:51:54.041 t 223 1 1 \. -- -- Data for Name: shipform; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shipform (shipform_id, shipform_name, shipform_report_id, shipform_report_name) FROM stdin; 12 SO-PackList 364 \N 13 INTRAN-PackList 363 PackingList \. -- -- Data for Name: shiphead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shiphead (shiphead_id, shiphead_order_id, shiphead_order_type, shiphead_number, shiphead_shipvia, shiphead_freight, shiphead_freight_curr_id, shiphead_notes, shiphead_shipped, shiphead_shipdate, shiphead_shipchrg_id, shiphead_shipform_id, shiphead_sfstatus, shiphead_tracknum) FROM stdin; 203 2956 SO 203 UPS-GROUND-UPS Ground 99.0000 1 Notes Entered on Ship-To Master t 2005-12-27 4 12 N 9977445543211 212 2971 SO 212 UPS-GROUND-UPS Ground 99.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-09 4 12 N 1Z0807720204677242 204 2958 SO 204 UPS - Prepaid 7.7400 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2005-12-27 4 12 N 1Z60E2320344632667 213 2973 SO 213 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-09 4 12 N 205 2960 SO 205 UPS-GROUND-UPS Ground 5.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2005-12-27 4 12 N 33112211 206 2960 SO 206 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2005-12-27 4 12 N 214 2975 SO 214 UPS-GROUND-UPS Ground 8.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-09 4 12 N 207 2960 SO 207 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2005-12-27 4 12 N 215 2977 SO 215 UPS-GROUND-UPS Ground 4.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-09 4 12 N 208 2960 SO 208 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2005-12-27 4 12 N 209 2962 SO 209 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2005-12-27 4 12 N 210 2964 SO 210 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2005-12-29 4 12 N 211 2965 SO 211 UPS-GROUND-UPS Ground 100.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2005-12-29 4 12 N 216 2988 SO 216 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-11 4 12 N 217 2993 SO 217 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-11 4 12 N 218 2995 SO 218 UPS - Prepaid 7.7400 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-11 4 12 N 1Z60E2320344632667 220 2998 SO 220 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-11 4 12 N 221 2988 SO 221 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-12 4 12 N 222 3002 SO 222 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-13 4 12 N 223 3005 SO 223 UPS - Prepaid 7.7400 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-13 4 12 N 1Z60E2320344632667 224 3009 SO 224 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-13 4 12 N 225 3015 SO 225 UPS-GROUND-UPS Ground 54.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-13 4 12 N 1E9991234544322 226 3021 SO 226 UPS-GROUND-UPS Ground 90.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-30 4 12 N 1z 010 784 03 4688 9432 227 3023 SO 227 UPS-GROUND-UPS Ground 100.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-01-30 4 12 N 228 3026 SO 228 UPS-GROUND-UPS Ground 37.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-02-01 4 12 N 1Z 53R 4A2 03 5412 2233 229 3028 SO 229 UPS-GROUND-UPS Ground 99.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-07-05 4 12 N 1Z3E22130123456789 230 3032 SO 230 UPS-GROUND-UPS Ground 37.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-07-05 4 12 N 1Z53R4A20354122233 231 3038 SO 231 UPS-GROUND-UPS Ground 45.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-10-13 4 12 N 1Z5840070276536412 232 3047 SO 232 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-12-05 4 12 P 233 3049 SO 233 FEDEX-Ground-Fedex Ground 32.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2006-12-28 4 12 N 9613863017136236631074 234 3053 SO 234 UPS-GROUND-UPS Ground 99.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2007-01-08 4 12 N 102311 235 3053 SO 235 UPS-GROUND-UPS Ground 99.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2007-01-08 4 12 N 321112 237 3061 SO 60001 UPS-GROUND-UPS Ground 45.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2007-02-20 4 12 N 1Z1023001111 238 3065 SO 60002 FEDEX - Ground-FEDEX Ground 99.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2007-04-05 4 12 N 9612804716407170204285 236 3059 SO 60000 UPS-GROUND-UPS Ground 55.0000 3 t 2007-02-20 4 12 N 1z0101002991991 239 3067 SO 60003 UPS-GROUND-UPS Ground 100.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2007-05-30 4 12 N 240 3071 SO 60004 UPS-GROUND-UPS Ground 100.0000 1 t 2007-05-30 4 12 N 241 1 TO 60005 UPS-GROUND-UPS Ground 100.0000 1 This is an internal company shipment. t 2007-08-31 \N 13 N 1Z5840070270113540 243 3 TO 60007 UPS-GROUND-UPS Ground 100.0000 1 This is an internal company shipment. t 2007-09-21 \N 13 N 245 5 TO 60009 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2007-12-14 \N 13 N 242 3073 SO 60006 UPS-GROUND-UPS Ground 37.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2007-08-31 4 12 N 1Z5840070270113540 249 3081 SO 60013 UPS-GROUND-UPS Ground 100.0000 3 t 2007-12-20 4 12 N 244 3074 SO 60008 UPS-GROUND-UPS Ground 100.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2007-09-21 4 12 N 1Z5840070270113540 246 3076 SO 60010 UPS-GROUND-UPS Ground 100.0000 3 t 2007-12-14 4 12 N 247 3078 SO 60011 UPS-GROUND-UPS Ground 0.0000 3 \N t 2007-12-14 4 12 N 248 3079 SO 60012 UPS-GROUND-UPS Ground 0.0000 3 t 2007-12-14 4 12 N 250 3085 SO 60014 UPS-GROUND-UPS Ground 59.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-03-04 4 12 N 253 3092 SO 60017 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-03-05 4 12 N 255 3095 SO 60019 UPS-GROUND-UPS Ground 200.0000 3 t 2008-04-04 4 12 N 251 3090 SO 60015 UPS-GROUND-UPS Ground 0.0000 1 \N t 2008-03-04 4 12 N 254 3094 SO 60018 UPS-GROUND-UPS Ground 0.0000 1 \N t 2008-03-05 4 12 N 252 3091 SO 60016 UPS-GROUND-UPS Ground 0.0000 3 t 2008-03-04 4 12 N 256 3097 SO 60021 UPS-GROUND-UPS Ground 0.0000 3 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-06-12 4 12 N 257 3100 SO 60022 UPS-GROUND-UPS Ground 0.0000 3 t 2008-06-12 4 12 N 258 3103 SO 60023 UPS-GROUND-UPS Ground 0.0000 3 t 2008-06-12 4 12 N 259 3105 SO 60024 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-06-12 4 12 N 261 3106 SO 60026 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-06-18 4 12 N 262 3109 SO 60027 UPS-GROUND-UPS Ground 150.0000 3 t 2008-06-19 4 12 N 1Z6V31291239857191 263 3111 SO 60028 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-06-19 4 12 N 264 3115 SO 60029 UPS-GROUND-UPS Ground 15.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-06-20 4 12 N 265 3117 SO 60030 UPS-GROUND-UPS Ground 27.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-06-20 4 12 N 266 3120 SO 60031 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-07-15 4 12 N 267 3120 SO 60032 UPS-GROUND-UPS Ground 150.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-09-08 4 12 N 268 3120 SO 60033 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-09-08 4 12 N 269 3123 SO 60034 UPS-GROUND-UPS Ground 10.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-09-09 4 12 N 270 3134 SO 60035 UPS-GROUND-UPS Ground 100.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\nFinal t 2008-10-02 4 12 N 1Z6V31291239857191 271 3127 SO 60036 UPS-GROUND-UPS Ground 35.0000 3 t 2008-10-02 4 12 N 1Z6V31291239857191 272 3135 SO 60037 UPS-GROUND-UPS Ground 300.0000 1 t 2008-10-02 4 12 N 1z6v31291239857191 273 3142 SO 60038 UPS-GROUND-UPS Ground 100.0000 3 t 2008-12-31 4 12 N 1020101 274 3144 SO 60039 UPS-GROUND-UPS Ground 0.0000 3 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2008-12-31 4 12 N 275 3155 SO 60040 UPS-GROUND-UPS Ground 500.0000 3 t 2009-01-12 4 12 N 1Z10FW29PP09232934 276 3157 SO 60041 UPS-GROUND-UPS Ground 7.5000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2009-01-12 4 12 N 1Z10FW29PP09232934 277 3158 SO 60042 UPS-GROUND-UPS Ground 5.2100 3 t 2009-01-12 4 12 N 278 3161 SO 60043 UPS-GROUND-UPS Ground 2604.1500 3 t 2009-06-26 4 12 N 279 3163 SO 60044 UPS-GROUND-UPS Ground 18750.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2009-08-13 4 12 N 280 11 TO 60045 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2009-09-21 \N 13 N 291 27 TO 60056 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. f 2009-10-13 \N 13 N 281 7 TO 60046 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2009-09-21 \N 13 N 296 34 TO 60061 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2009-10-13 \N 13 N 282 9 TO 60047 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2009-09-21 \N 13 N 287 3175 SO 60052 UPS-GROUND-UPS Ground 10.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2009-09-25 4 12 N 283 13 TO 60048 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2009-09-21 \N 13 N 292 30 TO 60057 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. f 2009-10-13 \N 13 N 293 3178 SO 60058 UPS-GROUND-UPS Ground 6.9400 3 t 2009-10-13 4 12 N 284 3171 SO 60049 UPS-GROUND-UPS Ground 13020.8300 3 t 2009-09-21 4 12 N 295 32 TO 60060 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2009-10-13 \N 13 N 294 3177 SO 60059 UPS-GROUND-UPS Ground 9375.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2009-10-13 4 12 N 285 15 TO 60050 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. f 2009-09-25 \N 13 N 297 3183 SO 60062 UPS-GROUND-UPS Ground 18750.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2009-12-03 4 12 N 286 17 TO 60051 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. f 2009-09-25 \N 13 N 288 19 TO 60053 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. f 2009-09-25 \N 13 N 289 22 TO 60054 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2009-09-25 \N 13 N 290 24 TO 60055 UPS-GROUND-UPS Ground 0.0000 1 This is an internal company shipment. t 2009-09-25 \N 13 N 298 3187 SO 60063 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-03-10 4 12 N \N 299 3189 SO 60064 UPS-GROUND-UPS Ground 1758.7500 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-03-12 4 12 N 300 3193 SO 60065 UPS-GROUND-UPS Ground 0.0000 1 t 2010-03-12 4 12 N 301 3194 SO 60066 UPS-GROUND-UPS Ground 0.0000 3 t 2010-04-02 4 12 N \N 302 3195 SO 60067 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-06-07 4 12 N \N 305 3198 SO 60070 UPS-GROUND-UPS Ground 0.0000 1 t 2010-09-07 4 12 N \N 306 3200 SO 60071 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-09-07 4 12 N \N 307 3201 SO 60072 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-09-07 4 12 N \N 308 3203 SO 60073 UPS-GROUND-UPS Ground 4375.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-07-30 4 12 N 309 3203 SO 60074 UPS-GROUND-UPS Ground 4375.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-08-01 4 12 N 310 3205 SO 60075 UPS-GROUND-UPS Ground 21604.9383 3 t 2010-09-08 4 12 N 311 3211 SO 60076 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-11-04 4 12 N \N 312 3213 SO 60077 UPS-GROUND-UPS Ground 216.0494 3 t 2010-11-04 4 12 N 1Z6593290356186950 313 3215 SO 60078 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2010-12-30 4 12 N \N 315 3217 SO 60080 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2011-03-07 4 12 N \N 316 3207 SO 60081 UPS-GROUND-UPS Ground 0.0000 3 t 2011-04-18 4 12 N \N 318 3221 SO 60083 FEDEX - Ground-FEDEX Ground 7.2464 2 t 2011-04-18 4 12 N \N 319 3221 SO 60084 FEDEX - Ground-FEDEX Ground 700.0000 2 t 2011-04-18 4 12 N 320 3227 SO 60085 UPS-GROUND-UPS Ground 0.0000 1 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n t 2011-06-03 4 12 N \N 321 3229 SO 60086 UPS-GROUND-UPS Ground 0.0000 3 t 2011-06-03 4 12 N \N 322 3229 SO 60087 UPS-GROUND-UPS Ground 0.0000 3 t 2011-06-03 4 12 N \N 323 3231 SO 60088 UPS-GROUND-UPS Ground 0.0000 3 t 2011-06-03 4 12 N \N \. -- -- Data for Name: shipitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shipitem (shipitem_id, shipitem_orderitem_id, shipitem_shiphead_id, shipitem_qty, shipitem_shipped, shipitem_shipdate, shipitem_transdate, shipitem_trans_username, shipitem_invoiced, shipitem_invcitem_id, shipitem_value, shipitem_invhist_id) FROM stdin; 518 636 253 100.000000 f \N 2008-03-05 13:49:55.908928-05 jsmith t 64 638.180000 3382 520 638 255 1000.000000 f \N 2008-04-04 08:46:00.842417-04 mfgadmin t 66 6381.800000 3392 519 637 254 1.000000 f \N 2008-03-05 13:59:02.754616-05 jsmith t 65 16.380000 3384 507 4 245 100.000000 t 2007-12-14 12:40:16.656-05 2007-12-14 12:39:54.078-05 mfgadmin f \N 1.285000 \N 513 627 249 10.000000 f \N 2007-12-20 11:46:03.249-05 mfgadmin t 59 139.283300 \N 508 622 246 500.000000 f \N 2007-12-14 13:04:17.796-05 mfgadmin t 54 3190.900000 \N 509 621 246 5000.000000 f \N 2007-12-14 13:04:17.796-05 mfgadmin t 55 31909.000000 \N 510 625 247 1.000000 f \N 2007-12-14 13:22:14.218-05 mfgadmin t 56 6.380000 \N 511 624 247 10.000000 f \N 2007-12-14 13:22:14.218-05 mfgadmin t 57 63.820000 \N 512 626 248 2.000000 f \N 2007-12-14 13:29:29.015-05 mfgadmin t 58 12.760000 \N 442 566 203 100.000000 f \N 2005-12-27 11:16:03.293252-05 jsmith t \N 0.000000 \N 457 573 212 100.000000 f \N 2006-01-09 10:18:03.89857-05 jsmith t \N 0.000000 \N 458 574 213 10.000000 f \N 2006-01-09 10:42:36.316136-05 jsmith t \N 0.000000 \N 444 567 204 1.000000 f \N 2005-12-27 15:53:47.770886-05 jsmith t \N 0.000000 \N 445 567 204 1.000000 f \N 2005-12-27 15:53:53.083837-05 jsmith t \N 0.000000 \N 446 567 204 3.000000 f \N 2005-12-27 15:54:06.16052-05 jsmith t \N 0.000000 \N 459 575 214 10.000000 f \N 2006-01-09 10:53:14.730945-05 jsmith t \N 0.000000 \N 447 568 205 1.000000 f \N 2005-12-27 16:02:19.702592-05 jsmith t \N 0.000000 \N 448 568 206 1.000000 f \N 2005-12-27 16:07:59.597566-05 jsmith t \N 0.000000 \N 460 576 215 10.000000 f \N 2006-01-09 10:53:53.966653-05 jsmith t \N 0.000000 \N 451 568 207 1.000000 f \N 2005-12-27 16:10:03.036548-05 jsmith t \N 0.000000 \N 452 568 208 2.000000 f \N 2005-12-27 16:22:09.923092-05 jsmith t \N 0.000000 \N 453 569 209 10.000000 f \N 2005-12-27 16:27:44.026945-05 jsmith t \N 0.000000 \N 454 570 210 10.000000 f \N 2005-12-27 16:40:43.670411-05 jsmith t \N 0.000000 \N 455 571 210 1.000000 f \N 2005-12-29 09:27:37.006847-05 jsmith t \N 0.000000 \N 456 572 211 369.000000 f \N 2005-12-29 12:07:32.143853-05 jsmith t \N 0.000000 \N 466 579 216 1.000000 f \N 2006-01-11 14:31:44.746753-05 jsmith t \N 0.000000 \N 463 579 216 1.000000 f \N 2006-01-11 14:29:27.4484-05 jsmith t \N 0.000000 \N 467 580 216 1.000000 f \N 2006-01-11 14:31:57.792661-05 jsmith t \N 0.000000 \N 464 580 216 1.000000 f \N 2006-01-11 14:29:39.244866-05 jsmith t \N 0.000000 \N 468 581 216 1.000000 f \N 2006-01-11 14:32:02.775311-05 jsmith t \N 0.000000 \N 465 581 216 1.000000 f \N 2006-01-11 14:29:53.348902-05 jsmith t \N 0.000000 \N 469 582 217 50.000000 f \N 2006-01-11 15:13:53.676035-05 jsmith t \N 0.000000 \N 470 583 218 10.000000 f \N 2006-01-11 15:42:25.88454-05 jsmith t \N 0.000000 \N 472 585 220 10.000000 f \N 2006-01-11 16:03:28.126626-05 jsmith t \N 0.000000 \N 475 581 221 1.000000 f \N 2006-01-12 13:46:23.304596-05 jsmith t \N 0.000000 \N 473 579 221 1.000000 f \N 2006-01-12 13:46:04.75092-05 jsmith t \N 0.000000 \N 474 580 221 1.000000 f \N 2006-01-12 13:46:17.528594-05 jsmith t \N 0.000000 \N 477 579 221 7.000000 f \N 2006-01-12 13:46:04.75092-05 jsmith t \N 0.000000 \N 478 580 221 7.000000 f \N 2006-01-12 13:46:17.528594-05 jsmith t \N 0.000000 \N 476 581 221 7.000000 f \N 2006-01-12 13:46:23.304596-05 jsmith t \N 0.000000 \N 479 587 222 100.000000 f \N 2006-01-13 11:53:06.038317-05 jsmith t \N 0.000000 \N 480 588 223 10.000000 f \N 2006-01-13 12:48:21.366-05 jsmith t \N 0.000000 \N 481 591 224 10.000000 f \N 2006-01-13 13:42:12.762-05 jsmith t \N 0.000000 \N 482 592 225 100.000000 f \N 2006-01-13 15:30:06.521-05 jsmith t \N 0.000000 \N 483 594 226 100.000000 f \N 2006-01-30 12:41:05.59221-05 jsmith t \N 0.000000 \N 484 595 227 100.000000 f \N 2006-01-30 17:02:47.212738-05 jsmith t \N 0.000000 \N 485 596 228 100.000000 f \N 2006-02-01 09:26:49.877-05 jsmith t \N 0.000000 \N 486 597 229 100.000000 f \N 2006-07-05 09:18:56.598-04 jsmith t \N 0.000000 \N 487 598 230 100.000000 f \N 2006-07-05 14:05:26.567-04 jsmith t \N 0.000000 \N 488 601 231 100.000000 f \N 2006-10-13 15:45:32.519-04 jsmith t \N 0.000000 \N 490 604 232 90.000000 f \N 2006-12-05 12:23:34.228-05 mfgadmin t \N 0.000000 \N 489 604 232 10.000000 f \N 2006-12-05 12:16:44.541-05 mfgadmin t \N 0.000000 \N 491 605 233 100.000000 f \N 2006-12-28 11:45:16.421-05 mfgadmin t \N 0.000000 \N 492 607 234 50.000000 f \N 2007-01-08 16:27:48.746-05 jsmith t 36 0.000000 \N 493 607 235 50.000000 f \N 2007-01-08 16:34:13.105-05 jsmith t 37 0.000000 \N 494 609 236 100.000000 f \N 2007-02-20 08:35:30.485-05 mfgadmin t 38 0.000000 \N 496 612 238 1000.000000 f \N 2007-04-05 15:39:03.921-04 jsmith t 40 0.000000 \N 495 610 237 100.000000 f \N 2007-02-20 08:42:10.673-05 mfgadmin t 39 0.000000 \N 497 613 239 100.000000 f \N 2007-05-30 09:24:46.765-04 mfgadmin t 42 0.000000 \N 498 614 239 100.000000 f \N 2007-05-30 09:24:46.765-04 mfgadmin t 43 0.000000 \N 499 615 239 100.000000 f \N 2007-05-30 09:24:46.765-04 mfgadmin t 44 0.000000 \N 500 616 239 100.000000 f \N 2007-05-30 09:24:46.765-04 mfgadmin t 45 0.000000 \N 501 617 240 100.000000 f \N 2007-05-30 11:39:06.664661-04 mfgadmin t 48 0.000000 \N 502 618 240 100.000000 f \N 2007-05-30 11:39:06.664661-04 mfgadmin t 49 0.000000 \N 503 2 241 100.000000 t 2007-08-31 10:46:38.343-04 2007-08-31 10:45:56.484-04 mfgadmin f \N 0.000000 \N 505 3 243 400.000000 t 2007-09-21 14:15:09-04 2007-09-21 14:11:05.484-04 mfgadmin f \N 0.000000 \N 504 619 242 100.000000 f \N 2007-08-31 11:05:32.687-04 mfgadmin t 51 0.000000 \N 506 620 244 100.000000 f \N 2007-09-21 14:52:31.734-04 mfgadmin t 52 0.000000 \N 514 629 250 3.000000 f \N 2008-03-04 14:14:57.827315-05 jsmith t 60 49.150000 3363 515 630 250 100.000000 f \N 2008-03-04 14:14:57.827315-05 jsmith t 61 638.180000 3364 516 633 251 1.000000 f \N 2008-03-04 16:28:48.025446-05 jsmith t 62 16.380000 3370 517 635 252 1.000000 f \N 2008-03-04 16:36:38.714943-05 jsmith t 63 16.380000 3372 521 639 256 1.000000 f \N 2008-06-12 00:00:00-04 jsmith t 67 6.380000 3393 522 640 257 1.000000 f \N 2008-06-12 00:00:00-04 jsmith t 69 23.689300 \N 523 641 258 0.500000 f \N 2008-06-12 00:00:00-04 jsmith t 70 93.170000 3422 524 642 259 0.500000 f \N 2008-06-12 00:00:00-04 jsmith t 71 93.170000 3423 526 643 261 100.000000 f \N 2008-06-18 00:00:00-04 jsmith t 72 188.000000 \N 529 644 262 1000.000000 f \N 2008-06-19 00:00:00-04 jsmith t 73 1700.000000 \N 528 645 262 1000.000000 f \N 2008-06-19 00:00:00-04 jsmith t 74 1863.400000 3473 527 646 262 1000.000000 f \N 2008-06-19 00:00:00-04 jsmith t 75 8348.200000 3472 530 647 263 99.000000 f \N 2008-06-19 00:00:00-04 jsmith t 76 152.856000 \N 531 649 264 1.000000 f \N 2008-06-20 00:00:00-04 jsmith t 77 11.860000 3495 532 650 265 100.000000 f \N 2008-06-20 00:00:00-04 jsmith t 78 256.340000 3505 534 655 266 3000.000000 f \N 2008-07-15 00:00:00-04 admin t 79 7703.400000 3511 536 653 267 4000.000000 f \N 2008-08-09 00:00:00-04 admin t 80 10271.200000 3514 537 652 268 3000.000000 f \N 2008-09-08 00:00:00-04 admin t 81 7703.400000 3515 539 661 269 4.000000 f \N 2008-09-09 00:00:00-04 jsmith t 83 0.400000 3517 540 662 269 1.000000 f \N 2008-09-09 00:00:00-04 jsmith t 84 0.250000 3518 541 663 269 4.000000 f \N 2008-09-09 00:00:00-04 jsmith t 85 4.150000 3519 542 664 269 1.000000 f \N 2008-09-09 00:00:00-04 jsmith t 86 2.330000 3520 543 660 269 0.050000 f \N 2008-09-09 00:00:00-04 jsmith t 87 0.750000 3522 544 671 270 100.000000 f \N 2008-10-02 00:00:00-04 jsmith t 89 256.340000 3548 547 675 270 400.000000 f \N 2008-10-02 00:00:00-04 jsmith t 90 40.000000 3551 548 676 270 100.000000 f \N 2008-10-02 00:00:00-04 jsmith t 91 25.000000 3552 549 677 270 400.000000 f \N 2008-10-02 00:00:00-04 jsmith t 92 415.480000 3553 550 678 270 100.000000 f \N 2008-10-02 00:00:00-04 jsmith t 93 233.000000 3554 545 672 270 3.000000 f \N 2008-10-02 00:00:00-04 jsmith t 94 37.690000 3549 546 674 270 5.000000 f \N 2008-10-02 00:00:00-04 jsmith t 95 74.500000 3550 551 668 271 10.000000 f \N 2008-10-02 00:00:00-04 jsmith t 96 62.601000 \N 552 681 272 1000.000000 f \N 2008-10-02 00:00:00-04 jsmith t 97 2567.800000 3561 554 680 272 1000.000000 f \N 2008-10-02 00:00:00-04 jsmith t 98 2567.800000 3563 553 679 272 1100.000000 f \N 2008-10-02 00:00:00-04 jsmith t 99 2824.580000 3562 555 685 273 100.000000 f \N 2008-12-31 00:00:00-05 jsmith t 101 256.340000 3576 556 687 274 5050.000000 f \N 2008-12-31 00:00:00-05 jsmith t 102 41905.910000 3578 559 711 275 1000.000000 f \N 2009-01-12 00:00:00-05 jsmith t 105 2567.800000 3584 558 710 275 1000.000000 f \N 2009-01-12 00:00:00-05 jsmith t 106 2567.800000 3583 557 709 275 1000.000000 f \N 2009-01-12 00:00:00-05 jsmith t 107 2567.800000 3582 560 715 276 1.000000 f \N 2009-01-12 00:00:00-05 jsmith t 108 12.563400 3585 561 717 277 1.000000 f \N 2009-01-12 00:00:00-05 jsmith t 109 12.563400 3586 563 721 278 300.000000 f \N 2009-06-26 16:11:35.256986-04 admin t 111 770.340000 3609 562 722 278 400.000000 f \N 2009-06-26 16:11:32.419021-04 admin t 112 1027.120000 3608 564 720 278 300.000000 f \N 2009-06-26 16:11:42.700487-04 admin t 113 770.340000 3610 565 724 279 10000.000000 f \N 2009-08-13 00:00:00-04 admin t 114 25634.000000 3629 571 15 280 200.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 513.560000 3695 569 13 280 200.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 513.560000 3693 570 14 280 200.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 513.560000 3694 572 16 280 200.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 512.680000 3696 574 6 281 20.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 51.356000 3714 573 5 281 20.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 51.356000 3713 575 7 281 20.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 51.356000 3715 576 8 281 20.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 51.268000 3716 578 10 282 20.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 51.356000 3734 579 11 282 20.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 51.356000 3735 580 12 282 20.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 51.268000 3736 577 9 282 20.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 jsmith f \N 51.356000 3733 583 19 283 55.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 admin f \N 141.229000 3762 581 17 283 50.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 admin f \N 128.390000 3760 582 18 283 55.000000 t 2009-09-21 00:00:00-04 2009-09-21 00:00:00-04 admin f \N 141.229000 3761 584 732 284 5000.000000 f \N 2009-09-21 00:00:00-04 admin t 115 12817.000000 3792 596 739 293 1000.000000 f \N 2009-10-13 00:00:00-04 jsmith t 119 8298.200000 3943 587 735 287 10.000000 f \N 2009-09-25 00:00:00-04 jsmith t 118 82.982000 3839 597 737 294 5000.000000 f \N 2009-10-13 00:00:00-04 jsmith t 120 12817.000000 3944 598 31 295 20.000000 t 2009-10-13 00:00:00-04 2009-10-13 00:00:00-04 jsmith f \N 51.268000 3945 599 32 296 20.000000 t 2009-10-13 00:00:00-04 2009-10-13 00:00:00-04 jsmith f \N 51.268000 3951 600 743 297 10000.000000 f \N 2009-12-03 00:00:00-05 admin t 122 25634.000000 3973 592 24 289 5.000000 t 2009-09-25 00:00:00-04 2009-09-25 00:00:00-04 jsmith f \N 12.817000 3881 593 25 290 5.000000 t 2009-09-25 00:00:00-04 2009-09-25 00:00:00-04 jsmith f \N 13.102000 3886 601 747 298 1000.000000 f \N 2010-03-10 16:37:44.35516-05 admin t 123 22000.000000 3980 603 751 299 5.000000 f \N 2010-03-12 00:00:00-05 admin t 124 12.817000 3991 602 749 299 1000.000000 f \N 2010-03-12 00:00:00-05 admin t 125 2563.400000 3990 604 754 300 1.000000 f \N 2010-03-12 00:00:00-05 admin t 127 12.563400 3993 605 756 301 1000.000000 f \N 2010-04-02 10:32:32.826485-04 admin t 128 22000.000000 3996 606 758 302 2000.000000 f \N 2010-06-07 10:17:56.128144-04 admin t 129 44000.000000 3998 607 765 305 2000.000000 f \N 2010-09-07 16:18:18.630866-04 admin t 130 44000.000000 4029 609 767 306 4000.000000 f \N 2010-09-07 16:41:51.385685-04 admin t 131 88000.000000 4033 610 769 307 3000.000000 f \N 2010-09-07 16:42:11.568275-04 admin t 132 66000.000000 4035 612 771 308 2500.000000 f \N 2010-07-30 00:00:00-04 admin t 133 6408.500000 4039 613 771 309 2500.000000 f \N 2010-08-01 00:00:00-04 admin t 133 6408.500000 4040 614 773 310 10000.000000 f \N 2010-09-08 00:00:00-04 admin t 134 25634.000000 4052 616 781 312 100.000000 f \N 2010-11-04 00:00:00-04 admin t 135 256.340000 4074 617 783 313 1000.000000 f \N 2010-12-30 16:26:20.151456-05 admin t 139 22000.000000 4076 615 779 311 2500.000000 f \N 2010-11-04 15:46:09.303015-04 admin t 140 55000.000000 4063 618 785 315 5000.000000 f \N 2011-03-07 15:31:59.358339-05 admin t 146 110000.000000 4079 622 789 319 1000.000000 f \N 2011-04-18 00:00:00-04 admin t 147 8298.200000 4097 621 791 318 1000.000000 f \N 2011-04-18 08:24:17.311443-04 admin t 148 22000.000000 4096 619 775 316 100.000000 f \N 2011-04-18 07:44:56.364535-04 admin t 149 2200.000000 4081 623 797 320 3000.000000 f \N 2011-06-03 16:14:35.243541-04 admin t 151 66000.000000 4106 624 799 321 3500.000000 f \N 2011-06-03 16:26:54.335808-04 admin t 152 77000.000000 4108 625 799 322 3500.000000 f \N 2011-06-03 16:30:08.321477-04 admin t 152 77000.000000 4111 626 801 323 5000.000000 f \N 2011-06-03 16:36:34.56468-04 admin t 153 110000.000000 4113 \. -- -- Data for Name: shiptoinfo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shiptoinfo (shipto_id, shipto_cust_id, shipto_name, shipto_salesrep_id, shipto_comments, shipto_shipcomments, shipto_shipzone_id, shipto_shipvia, shipto_commission, shipto_shipform_id, shipto_shipchrg_id, shipto_active, shipto_default, shipto_num, shipto_ediprofile_id, shipto_cntct_id, shipto_addr_id, shipto_taxzone_id) FROM stdin; 32 95 Olde Towne Store 2 29 35 UPS-GROUND-UPS Ground 0.0750 12 4 t f STORE2 -2 \N 10 1 31 95 Olde Towne Store 1 29 Packing List Note: No special handling or delivery instructions for \ndeliveries to STORE1.\n 35 UPS-GROUND-UPS Ground 0.0750 12 4 t t STORE1 -2 8 7 2 33 95 Olde Towne Store 3 29 36 UPS-GROUND-UPS Ground 0.0750 12 4 t f STORE3 -2 17 14 1 34 97 XTRM Toys Distribution Center 1 29 \N UPS-GROUND-UPS Ground 0.0000 12 4 t t DIST-1 \N 4 36 \N 35 123 Vienna Collectibles Headquarters 29 \N UPS-GROUND-UPS Ground 0.0000 12 4 t t Vienna 1 \N 36 41 \N \. -- -- Data for Name: shipvia; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shipvia (shipvia_id, shipvia_code, shipvia_descrip) FROM stdin; 13 UPS-GROUND UPS Ground 14 FEDEX - Ground FEDEX Ground \. -- -- Data for Name: shipzone; Type: TABLE DATA; Schema: public; Owner: admin -- COPY shipzone (shipzone_id, shipzone_name, shipzone_descrip) FROM stdin; 35 DOMESTIC1 Domestic Zone 1 36 DOMESTIC2 Domestic Zone 2 37 DOMESTIC3 Domestic Zone 3 \. -- -- Data for Name: sitetype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY sitetype (sitetype_id, sitetype_name, sitetype_descrip) FROM stdin; 3 INTRAN Intransit 4 RETAIL Retail 5 MFG Manufacturing 2 DIST Distribution \. -- -- Data for Name: sltrans; Type: TABLE DATA; Schema: public; Owner: admin -- COPY sltrans (sltrans_id, sltrans_created, sltrans_date, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_docnumber, sltrans_misc_id, sltrans_amount, sltrans_notes, sltrans_journalnumber, sltrans_posted, sltrans_doctype, sltrans_username, sltrans_gltrans_journalnumber, sltrans_rec) FROM stdin; \. -- -- Data for Name: sltrans_backup; Type: TABLE DATA; Schema: public; Owner: admin -- COPY sltrans_backup (sltrans_old_id, sltrans_new_id) FROM stdin; \. -- -- Data for Name: source; Type: TABLE DATA; Schema: public; Owner: admin -- COPY source (source_id, source_module, source_name, source_descrip) FROM stdin; 1 CRM ADDR Address 2 Products BBH Breeder Bill of Materials 3 Products BBI Breeder Bill of Materials Item 4 Products BMH Bill of Materials 5 Products BMI Bill of Materials Item 6 Products BOH Bill of Operations 7 Products BOI Bill of Operations Item 8 CRM CRMA CRM Account 9 CRM T Contact 10 Sales C Customer 11 System EMP Employee 12 CRM INCDT Incident 13 Products I Item 14 Inventory IS Item Site 15 Purchase IR Item Source 16 Inventory L Location 17 Inventory LS Lot Serial 18 CRM OPP Opportunity 19 CRM J Project 20 Purchase P Purchase Order 21 Purchase PI Purchase Order Item 22 Sales RA Return Authorization 23 Sales RI Return Authorization Item 24 Sales Q Quote 25 Sales QI Quote Item 26 Sales S Sales Order 27 Sales SI Sales Order Item 28 Inventory TO Transfer Order 29 Inventory TI Transfer Order Item 30 Purchase V Vendor 31 Inventory WH Site 32 Manufacture W Work Order 33 CRM TD Todo Item 34 CRM TA Tasks 35 CRM PSPCT Prospect 36 Sales SR Sales Rep 37 Accounting TAXAUTH Tax Authority 38 System USR User \. -- -- Data for Name: state; Type: TABLE DATA; Schema: public; Owner: admin -- COPY state (state_id, state_name, state_abbr, state_country_id) FROM stdin; 1 Alabama AL 230 2 Alaska AK 230 3 American Samoa AS 230 4 Arizona AZ 230 5 Arkansas AR 230 6 California CA 230 7 Colorado CO 230 8 Connecticut CT 230 9 Delaware DE 230 10 District Of Columbia DC 230 11 Federated States Of Micronesia FM 230 12 Florida FL 230 13 Georgia GA 230 14 Guam GU 230 15 Hawaii HI 230 16 Idaho ID 230 17 Illinois IL 230 18 Indiana IN 230 19 Iowa IA 230 20 Kansas KS 230 21 Kentucky KY 230 22 Louisiana LA 230 23 Maine ME 230 24 Marshall Islands MH 230 25 Maryland MD 230 26 Massachusetts MA 230 27 Michigan MI 230 28 Minnesota MN 230 29 Mississippi MS 230 30 Missouri MO 230 31 Montana MT 230 32 Nebraska NE 230 33 Nevada NV 230 34 New Hampshire NH 230 35 New Jersey NJ 230 36 New Mexico NM 230 37 New York NY 230 38 North Carolina NC 230 39 North Dakota ND 230 40 Northern Mariana Islands MP 230 41 Ohio OH 230 42 Oklahoma OK 230 43 Oregon OR 230 44 Palau PW 230 45 Pennsylvania PA 230 46 Puerto Rico PR 230 47 Rhode Island RI 230 48 South Carolina SC 230 49 South Dakota SD 230 50 Tennessee TN 230 51 Texas TX 230 52 Utah UT 230 53 Vermont VT 230 54 Virgin Islands VI 230 55 Virginia VA 230 56 Washington WA 230 57 West Virginia WV 230 58 Wisconsin WI 230 59 Wyoming WY 230 60 Armed Forces Africa, Canada, Europe, Middle East AE 230 61 Armed Forces Americas (except Canada) AA 230 62 Armed Forces Pacific AP 230 63 Alberta AB 39 64 British Columbia BC 39 65 Manitoba MB 39 66 New Brunswick NB 39 67 Newfoundland and Labrador NL 39 68 Northwest Territories NT 39 69 Nova Scotia NS 39 70 Nunavut NU 39 71 Ontario ON 39 72 Prince Edward Island PE 39 73 Quebec QC 39 74 Saskatchewan SK 39 75 Yukon YT 39 76 Aguascalientes AGS 140 77 Baja California BC 140 78 Baja California Sur BCS 140 79 Campeche CAM 140 80 Coahuila COAH 140 81 Colima COL 140 82 Chiapas CHIS 140 83 Chihuahua CHIH 140 84 Distrito Federal DF 140 85 Durango DGO 140 86 Guanajuato GTO 140 87 Guerrero GRO 140 88 Hidalgo HGO 140 89 Jalisco JAL 140 90 Mexico MEX 140 91 Michoacan MICH 140 92 Morelos MOR 140 93 Nayarit NAY 140 94 Nuevo Leon NL 140 95 Oaxaca OAX 140 96 Puebla PUE 140 97 Queretaro QRO 140 98 Quintana Roo Q ROO 140 99 San Luis Potosi SLP 140 100 Sinaloa SIN 140 101 Sonora SON 140 102 Tabasco TAB 140 103 Tamaulipas TAMPS 140 104 Tlaxcala TLAX 140 105 Veracruz VER 140 106 Yucatan YUC 140 107 Zacatecas ZAC 140 108 Australian Capital Territory ACT 13 109 New South Wales NSW 13 110 Northern Territory NT 13 111 Queensland QLD 13 112 South Australia SA 13 113 Tasmania TAS 13 114 Victoria VIC 13 115 Western Australia WA 13 116 Schleswig-Holstein SH 81 117 Mecklenburg-Vorpommern MV 81 118 Hamburg HH 81 119 Bremen HB 81 120 Berlin BE 81 121 Brandenburg BB 81 122 Niedersachsen NI 81 123 Nordrhein-Westfalen NW 81 124 Sachsen-Anhalt ST 81 125 Sachsen SN 81 126 Hessen HE 81 127 Thüringen TH 81 128 Bayern BY 81 129 Rheinland-Pfalz RP 81 130 Saarland SL 81 131 Baden-Württemberg BW 81 132 Acre AC 30 133 Alagoas AL 30 134 Amapá AP 30 135 Amazonas AM 30 136 Bahia VA 30 137 Ceará CE 30 138 Distito Federal DF 30 139 Espirito Santo ES 30 140 Goiás GO 30 141 Maranhão MA 30 142 Mato Grosso MT 30 143 Mato Grosso do Sul MS 30 144 Minas Gerais MG 30 145 Pará PA 30 146 Paraiba PB 30 147 Paraná PR 30 148 Pernambuco PE 30 149 Piaui PI 30 150 Rio de Janeiro RJ 30 151 Rio Grande do Norte RN 30 152 Rio Grande do Sul RS 30 153 Rondônia RO 30 154 Roraima RR 30 155 Santa Catarina SC 30 156 São Paulo SP 30 157 Sergipe SE 30 158 Tocantins TO 30 \. -- -- Data for Name: status; Type: TABLE DATA; Schema: public; Owner: admin -- COPY status (status_id, status_type, status_code, status_name, status_seq, status_color) FROM stdin; 1 INCDT N New 0 #FFA0A0 2 INCDT F Feedback 1 #FF50A8 3 INCDT C Confirmed 2 #FFFFB0 4 INCDT A Assigned 3 #C8C8FF 5 INCDT R Resolved 4 #CCEEDD 6 INCDT L Closed 5 #E8E8E8 \. -- -- Data for Name: stdjrnl; Type: TABLE DATA; Schema: public; Owner: admin -- COPY stdjrnl (stdjrnl_id, stdjrnl_name, stdjrnl_descrip, stdjrnl_notes) FROM stdin; 32 Ship Order Ship Order Standard Journal that simulates some of the GL postings related shipping product. 33 Receive Product Receive Product Receipt to Payment Cycle \. -- -- Data for Name: stdjrnlgrp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY stdjrnlgrp (stdjrnlgrp_id, stdjrnlgrp_name, stdjrnlgrp_descrip) FROM stdin; 13 PERIOD_END Period End Group \. -- -- Data for Name: stdjrnlgrpitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY stdjrnlgrpitem (stdjrnlgrpitem_id, stdjrnlgrpitem_stdjrnl_id, stdjrnlgrpitem_toapply, stdjrnlgrpitem_applied, stdjrnlgrpitem_effective, stdjrnlgrpitem_expires, stdjrnlgrpitem_stdjrnlgrp_id) FROM stdin; \. -- -- Data for Name: stdjrnlitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY stdjrnlitem (stdjrnlitem_id, stdjrnlitem_stdjrnl_id, stdjrnlitem_accnt_id, stdjrnlitem_amount, stdjrnlitem_notes) FROM stdin; 31 32 85 45250.00 32 32 108 -45250.00 33 32 109 -77250.00 34 32 103 77250.00 35 33 85 -50000.00 FG Inv 36 33 95 50000.00 Liab Clear 37 33 95 -50000.00 Clear PO Liab Clear 38 33 99 50000.00 Accrue Payable 39 33 109 50000.00 Cash Payment 40 33 99 -50000.00 Clear A/P \. -- -- Data for Name: subaccnt; Type: TABLE DATA; Schema: public; Owner: admin -- COPY subaccnt (subaccnt_id, subaccnt_number, subaccnt_descrip) FROM stdin; 1 01 Profit Center 01 - General \. -- -- Data for Name: subaccnttype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY subaccnttype (subaccnttype_id, subaccnttype_accnt_type, subaccnttype_code, subaccnttype_descrip) FROM stdin; 1 A CA Cash Assets 2 A AR Accounts Receivable 3 A IN Inventory 4 A CAS Current Assets 5 A FA Fixed Assets 6 A AD Accumulated Depreciation 7 L CL Current Liabilities 8 L AP Accounts Payable 9 L LTL Long Term Liabilities 10 Q EDC Equity do not close 11 Q ERE Equity Retained Earnings 12 Q EC Equity close 13 R SI Sales Income 14 R II Interest Income 15 R IV Investment Income 16 R RT Returns 17 E COGS Cost of Goods Sold 18 E EXP Expenses 19 R OI Other Income 21 E DEP Depreciation Expense \. -- -- Data for Name: tax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY tax (tax_id, tax_code, tax_descrip, tax_sales_accnt_id, tax_taxclass_id, tax_taxauth_id, tax_basis_tax_id) FROM stdin; 16 VATAX-A Virginia Sales Tax 102 \N \N \N 18 GA TAX-A Georgia Sales Tax 155 \N \N \N 17 NC TAX-A North Carolina Sales Tax 129 \N \N \N \. -- -- Data for Name: taxass; Type: TABLE DATA; Schema: public; Owner: admin -- COPY taxass (taxass_id, taxass_taxzone_id, taxass_taxtype_id, taxass_tax_id) FROM stdin; 1 2 2 16 2 1 2 17 3 1 1 17 4 4 2 18 \. -- -- Data for Name: taxauth; Type: TABLE DATA; Schema: public; Owner: admin -- COPY taxauth (taxauth_id, taxauth_code, taxauth_name, taxauth_extref, taxauth_addr_id, taxauth_curr_id, taxauth_county, taxauth_accnt_id) FROM stdin; 3 GA TAX Georgia IRS 12991991 31 1 155 2 VA TAX Virginia IRS 123111 15 1 Arlington 102 1 NC TAX North Carolina IRS 1992991 16 1 Clemmons 129 \. -- -- Data for Name: taxclass; Type: TABLE DATA; Schema: public; Owner: admin -- COPY taxclass (taxclass_id, taxclass_code, taxclass_descrip, taxclass_sequence) FROM stdin; 1 1 Legacy Class 1 0 2 2 Legacy Class 2 0 3 3 Legacy Class 3 0 \. -- -- Data for Name: taxhist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY taxhist (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; \. -- -- Data for Name: taxrate; Type: TABLE DATA; Schema: public; Owner: admin -- COPY taxrate (taxrate_id, taxrate_tax_id, taxrate_percent, taxrate_curr_id, taxrate_amount, taxrate_effective, taxrate_expires) FROM stdin; 1 16 0.050000 1 0.00 1970-01-01 2100-12-31 3 17 0.055000 1 0.00 2009-09-01 2100-01-01 4 18 0.040000 1 0.00 1970-01-01 2100-01-01 6 17 0.040000 1 0.00 2004-01-01 2009-08-31 \. -- -- Data for Name: taxreg; Type: TABLE DATA; Schema: public; Owner: admin -- COPY taxreg (taxreg_id, taxreg_rel_id, taxreg_rel_type, taxreg_taxauth_id, taxreg_number, taxreg_taxzone_id, taxreg_effective, taxreg_expires, taxreg_notes) FROM stdin; \. -- -- Data for Name: taxtype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY taxtype (taxtype_id, taxtype_name, taxtype_descrip, taxtype_sys) FROM stdin; 1 Freight System Defined Freight Tax Type. DO NOT CHANGE. t 2 Taxable A Basic Taxable Tax Type f 3 Adjustment System Defined Adjustment Tax Type. DO NOT CHANGE. t \. -- -- Data for Name: taxzone; Type: TABLE DATA; Schema: public; Owner: admin -- COPY taxzone (taxzone_id, taxzone_code, taxzone_descrip) FROM stdin; 2 VA TAX Virginia Sales Tax 4 GA TAX Georgia Sales Tax 1 NC TAX North Carolina Sales Tax \. -- -- Data for Name: terms; Type: TABLE DATA; Schema: public; Owner: admin -- COPY terms (terms_id, terms_code, terms_descrip, terms_type, terms_duedays, terms_discdays, terms_discprcnt, terms_cutoffday, terms_ap, terms_ar) FROM stdin; 42 2-10N30 2% Discount in 10 Days - Net 30 Days D 30 10 0.020000 1 t t 43 NET30 Net 30 D 30 0 0.000000 1 t t 44 COD Cash On Delivery D 0 0 0.000000 1 t t \. -- -- Data for Name: todoitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY todoitem (todoitem_id, todoitem_name, todoitem_description, todoitem_incdt_id, todoitem_creator_username, todoitem_status, todoitem_active, todoitem_start_date, todoitem_due_date, todoitem_assigned_date, todoitem_completed_date, todoitem_seq, todoitem_notes, todoitem_crmacct_id, todoitem_ophead_id, todoitem_owner_username, todoitem_priority_id, todoitem_username, todoitem_recurring_todoitem_id, todoitem_cntct_id) FROM stdin; 4 Gather Requirements Gather requirements from customer \N mfgadmin N t \N 2007-09-30 2007-08-31 \N 10 Call Jim Farnbrough \N 2 \N \N mfgadmin \N \N 6 Design Create CAD renderings of products and estimate cost. \N mfgadmin N t \N 2007-10-30 2007-08-31 \N 20 \N 2 \N \N mfgadmin \N \N 7 Present Proposal Travel to customer to present proposal and close deal \N mfgadmin N t \N 2007-11-09 2007-08-31 \N 30 Perhaps we can time this to coinside with the North American Toy Festival which we are both attending in Toronto. \N 2 \N \N mfgadmin \N \N 1 Contact Customer Contact Customer 1 jsmith C f 2006-10-21 2006-10-20 2006-10-13 2006-10-21 10 \N \N \N 3 jsmith \N \N 2 Review Spec Review Customer Spec 1 jsmith C f 2006-10-22 2006-10-27 2006-10-13 2006-10-22 19 \N \N \N 3 jsmith \N \N 3 Quote Job Quote Job and Send To Customer 1 jsmith C f 2006-10-23 2006-11-12 2006-10-13 2006-10-23 28 \N \N \N 3 jsmith \N \N 14 Swap Stockcar1 TSUB Stockcar TSUB1 for TSUB2 4 admin C t 2010-06-07 2010-06-07 2010-06-07 2010-06-07 0 1 \N admin 3 admin \N \N 15 Stockcar1 update BOM BOM Updates, Fix the TSUB 4 admin C t 2010-06-07 2010-06-07 2010-06-07 2010-06-07 0 1 \N admin 3 admin \N \N 11 Change Stock Car BOM Update BOM 3 admin C t 2010-06-07 2010-06-14 2010-06-07 2010-06-07 0 1 \N admin 3 admin \N \N 12 Update Stockcar Docs Update Documentation 3 admin C t 2010-06-07 2010-06-15 2010-06-07 2010-06-07 0 1 \N admin 3 admin \N \N 13 Update Sales Team Review changes with Sales & Customer Service 3 admin C t 2010-06-07 2010-06-17 2010-06-07 2010-06-07 0 1 \N admin 3 admin \N \N 8 Quote Provide Quote \N admin C t 2010-06-07 2010-07-07 2010-06-07 2010-06-07 0 1 3 admin 2 admin \N \N \. -- -- Data for Name: trgthist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY trgthist (trgthist_src_cntct_id, trgthist_trgt_cntct_id, trgthist_col, trgthist_value) FROM stdin; \. -- -- Data for Name: trialbal; Type: TABLE DATA; Schema: public; Owner: admin -- COPY trialbal (trialbal_id, trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_credits, trialbal_debits, trialbal_dirty, trialbal_yearend) FROM stdin; 20498 105 89 0.57 0.57 0.00 0.00 f 0.00 20499 106 89 0.57 0.57 0.00 0.00 f 0.00 20500 107 89 0.57 0.57 0.00 0.00 f 0.00 20501 108 89 0.57 0.57 0.00 0.00 f 0.00 20502 109 89 0.57 0.57 0.00 0.00 f 0.00 20503 110 89 0.57 0.57 0.00 0.00 f 0.00 20504 111 89 0.57 0.57 0.00 0.00 f 0.00 20505 112 89 0.57 0.57 0.00 0.00 f 0.00 20506 113 89 0.57 0.57 0.00 0.00 f 0.00 20507 114 89 0.57 0.57 0.00 0.00 f 0.00 20508 115 89 0.57 0.57 0.00 0.00 f 0.00 20509 116 89 0.57 0.57 0.00 0.00 f 0.00 15349 46 91 0.00 0.00 0.00 0.00 f 0.00 15377 58 91 243.20 243.20 0.00 0.00 f 0.00 15378 59 91 243.20 243.20 0.00 0.00 f 0.00 15412 46 92 0.00 0.00 0.00 0.00 f 0.00 20510 105 92 0.00 0.00 0.00 0.00 f 0.00 20511 106 92 0.00 0.00 0.00 0.00 f 0.00 20512 107 92 0.00 0.00 0.00 0.00 f 0.00 20513 108 92 0.00 0.00 0.00 0.00 f 0.00 20514 109 92 0.00 0.00 0.00 0.00 f 0.00 20515 110 92 0.00 0.00 0.00 0.00 f 0.00 20516 111 92 0.00 0.00 0.00 0.00 f 0.00 20517 112 92 0.00 0.00 0.00 0.00 f 0.00 19591 103 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 17255 43 121 49.46 96.96 47.50 0.00 f 0.00 17256 44 121 96.96 96.96 0.00 0.00 f 0.00 17257 45 121 96.96 559.46 462.50 0.00 f 0.00 17259 50 121 910.33 910.33 0.00 0.00 f 0.00 20073 93 105 631.35 631.35 0.00 0.00 f 0.00 20090 98 137 0.00 0.00 0.00 0.00 f 0.00 20091 99 137 0.00 0.00 0.00 0.00 f 0.00 20092 100 137 0.00 0.00 0.00 0.00 f 0.00 20093 101 137 0.00 0.00 0.00 0.00 f 0.00 20101 97 128 -3959.81 -3959.81 0.00 0.00 f 0.00 20103 99 128 -3959.81 -3959.81 0.00 0.00 f 0.00 20104 100 128 -3959.81 -3959.81 0.00 0.00 f 0.00 20105 101 128 -3959.81 -3959.81 0.00 0.00 f 0.00 20106 102 128 -3959.81 -3959.81 0.00 0.00 f 0.00 20107 103 128 -3959.81 -3959.81 0.00 0.00 f 0.00 20108 104 128 -3959.81 -3959.81 0.00 0.00 f 0.00 18253 33 138 0.00 0.00 0.00 0.00 f 0.00 18254 34 138 0.00 0.00 0.00 0.00 f 0.00 18259 39 138 0.00 0.00 0.00 0.00 f 0.00 18260 40 138 0.00 0.00 0.00 0.00 f 0.00 18261 41 138 0.00 0.00 0.00 0.00 f 0.00 15494 49 93 0.00 0.00 0.00 0.00 f 0.00 16206 68 104 0.00 0.00 0.00 0.00 f 0.00 16218 80 104 0.00 0.00 0.00 0.00 f 0.00 15035 29 86 0.00 0.00 0.00 0.00 f 0.00 16372 42 107 0.00 0.00 0.00 0.00 f 0.00 16373 43 107 0.00 0.00 0.00 0.00 f 0.00 20554 113 108 0.00 0.00 0.00 0.00 f 0.00 20555 114 108 0.00 0.00 0.00 0.00 f 0.00 20556 115 108 0.00 0.00 0.00 0.00 f 0.00 20557 116 108 0.00 0.00 0.00 0.00 f 0.00 20558 105 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20559 106 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20560 107 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20561 108 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20562 109 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20563 110 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20564 111 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20565 112 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20566 113 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20567 114 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20568 115 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 20569 116 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 14909 29 84 5000.00 5000.00 0.00 0.00 f 0.00 14910 28 84 5000.00 5000.00 0.00 0.00 f 0.00 20570 105 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20571 106 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20572 107 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20573 108 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20574 109 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20575 110 84 3834455.79 3834455.79 0.00 0.00 f 0.00 18429 86 140 2025.00 2025.00 0.00 0.00 f 0.00 18430 87 140 2025.00 2025.00 0.00 0.00 f 0.00 20163 99 140 103350.00 103350.00 0.00 0.00 f 0.00 20164 100 140 103350.00 103350.00 0.00 0.00 f 0.00 20165 101 140 103350.00 103350.00 0.00 0.00 f 0.00 20166 102 140 103350.00 103350.00 0.00 0.00 f 0.00 20167 103 140 103350.00 103350.00 0.00 0.00 f 0.00 20168 104 140 103350.00 103350.00 0.00 0.00 f 0.00 17767 54 130 0.00 0.00 0.00 0.00 f 0.00 17775 62 130 0.00 0.00 0.00 0.00 f 0.00 17776 63 130 0.00 0.00 0.00 0.00 f 0.00 17777 64 130 0.00 0.00 0.00 0.00 f 0.00 17790 77 130 0.00 0.00 821.55 821.55 f 0.00 20277 93 130 0.00 0.00 0.00 0.00 f 0.00 20278 94 130 0.00 0.00 0.00 0.00 f 0.00 20279 95 130 0.00 0.00 0.00 0.00 f 0.00 20280 96 130 0.00 0.00 0.00 0.00 f 0.00 17138 55 119 -1000.00 -1000.00 0.00 0.00 f 0.00 15538 46 94 0.00 0.00 0.00 0.00 f 0.00 15572 64 94 4543.27 4543.27 0.00 0.00 f 0.00 15578 70 94 0.00 0.00 0.00 0.00 f 0.00 17431 30 125 0.00 0.00 0.00 0.00 f 0.00 17432 31 125 0.00 0.00 0.00 0.00 f 0.00 17447 49 125 0.00 0.00 0.00 0.00 f 0.00 17448 50 125 0.00 0.00 0.00 0.00 f 0.00 17449 51 125 0.00 0.00 0.00 0.00 f 0.00 19623 99 99 0.00 -1000.00 0.00 1000.00 f 0.00 19624 100 99 -1000.00 -1000.00 0.00 0.00 f 0.00 19625 101 99 -1000.00 -1000.00 0.00 0.00 f 0.00 19626 102 99 -1000.00 -1000.00 0.00 0.00 f 0.00 19627 103 99 -1000.00 -1000.00 0.00 0.00 f 0.00 19628 104 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20594 105 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20595 106 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20596 107 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20597 108 99 -1000.00 -1000.00 0.00 0.00 f 0.00 18262 42 138 0.00 -100.00 0.00 100.00 f 0.00 18263 43 138 -100.00 -100.00 0.00 0.00 f 0.00 18277 60 138 -24115.81 -21015.06 5407.00 2306.25 f 0.00 14740 48 103 0.00 6000.00 8000.00 2000.00 f 0.00 20176 100 141 733038.42 733038.42 0.00 0.00 f 0.00 20177 101 141 733038.42 733038.42 0.00 0.00 f 0.00 20178 102 141 733038.42 733038.42 0.00 0.00 f 0.00 20179 103 141 733038.42 733038.42 0.00 0.00 f 0.00 20180 104 141 733038.42 733038.42 0.00 0.00 f 0.00 14816 48 142 0.00 0.00 0.00 0.00 f 0.00 20182 94 142 0.00 0.00 0.00 0.00 f 0.00 20183 95 142 0.00 0.00 0.00 0.00 f 0.00 14820 48 144 0.00 0.00 0.00 0.00 f 0.00 14822 48 145 0.00 0.00 0.00 0.00 f 0.00 14824 48 146 0.00 0.00 0.00 0.00 f 0.00 18834 50 147 0.00 0.00 0.00 0.00 f 0.00 18835 51 147 0.00 0.00 0.00 0.00 f 0.00 18836 52 147 0.00 0.00 0.00 0.00 f 0.00 18837 53 147 0.00 0.00 0.00 0.00 f 0.00 18838 54 147 0.00 0.00 0.00 0.00 f 0.00 18842 58 147 0.00 0.00 0.00 0.00 f 0.00 18843 59 147 0.00 0.00 0.00 0.00 f 0.00 18844 60 147 0.00 0.00 0.00 0.00 f 0.00 18845 61 147 0.00 0.00 0.00 0.00 f 0.00 18846 62 147 0.00 0.00 0.00 0.00 f 0.00 18847 63 147 0.00 0.00 0.00 0.00 f 0.00 18848 64 147 0.00 0.00 0.00 0.00 f 0.00 18849 65 147 0.00 0.00 0.00 0.00 f 0.00 18860 76 147 0.00 0.00 0.00 0.00 f 0.00 18869 85 147 0.00 0.00 0.00 0.00 f 0.00 18870 86 147 0.00 0.00 0.00 0.00 f 0.00 18871 87 147 0.00 0.00 0.00 0.00 f 0.00 18872 88 147 0.00 0.00 0.00 0.00 f 0.00 19653 93 83 0.00 0.00 0.00 0.00 f 0.00 19654 94 83 0.00 0.00 0.00 0.00 f 0.00 19655 95 83 0.00 0.00 0.00 0.00 f 0.00 19656 96 83 0.00 0.00 0.00 0.00 f 0.00 19657 97 83 0.00 0.00 0.00 0.00 f 0.00 19658 98 83 0.00 0.00 0.00 0.00 f 0.00 19659 99 83 0.00 0.00 0.00 0.00 f 0.00 19660 100 83 0.00 0.00 0.00 0.00 f 0.00 19661 101 83 0.00 0.00 0.00 0.00 f 0.00 19662 102 83 0.00 0.00 0.00 0.00 f 0.00 19663 103 83 0.00 0.00 0.00 0.00 f 0.00 19664 104 83 0.00 0.00 0.00 0.00 f 0.00 15225 28 89 0.00 0.00 0.00 0.00 f 0.00 19665 93 91 0.00 0.00 0.00 0.00 f 0.00 19666 94 91 0.00 0.00 0.00 0.00 f 0.00 19667 95 91 0.00 0.00 0.00 0.00 f 0.00 19668 96 91 0.00 0.00 0.00 0.00 f 0.00 19669 97 91 0.00 0.00 0.00 0.00 f 0.00 19670 98 91 0.00 77000.00 77000.00 0.00 f 0.00 19671 99 91 77000.00 77000.00 0.00 0.00 f 0.00 19672 100 91 77000.00 77000.00 0.00 0.00 f 0.00 19673 101 91 77000.00 77000.00 0.00 0.00 f 0.00 19674 102 91 77000.00 77000.00 0.00 0.00 f 0.00 19675 103 91 77000.00 77000.00 0.00 0.00 f 0.00 19676 104 91 77000.00 77000.00 0.00 0.00 f 0.00 20518 113 92 0.00 0.00 0.00 0.00 f 0.00 20519 114 92 0.00 0.00 0.00 0.00 f 0.00 20520 115 92 0.00 0.00 0.00 0.00 f 0.00 20521 116 92 0.00 0.00 0.00 0.00 f 0.00 15475 46 93 0.00 0.00 0.00 0.00 f 0.00 20522 105 93 0.00 0.00 0.00 0.00 f 0.00 21258 109 130 0.00 0.00 0.00 0.00 f 0.00 21259 110 130 0.00 0.00 0.00 0.00 f 0.00 21260 111 130 0.00 0.00 0.00 0.00 f 0.00 21261 112 130 0.00 0.00 0.00 0.00 f 0.00 21262 113 130 0.00 0.00 0.00 0.00 f 0.00 21263 114 130 0.00 0.00 0.00 0.00 f 0.00 15350 29 91 0.00 0.00 0.00 0.00 f 0.00 15351 28 91 0.00 -10.00 15.00 25.00 f 0.00 15409 90 91 1900.00 1900.00 0.00 0.00 f 0.00 19717 97 107 0.00 0.00 0.00 0.00 f 0.00 19718 98 107 0.00 0.00 0.00 0.00 f 0.00 19719 99 107 0.00 0.00 0.00 0.00 f 0.00 19720 100 107 0.00 0.00 0.00 0.00 f 0.00 19721 101 107 0.00 0.00 0.00 0.00 f 0.00 19722 102 107 0.00 0.00 0.00 0.00 f 0.00 19723 103 107 0.00 0.00 0.00 0.00 f 0.00 19724 104 107 0.00 0.00 0.00 0.00 f 0.00 19579 103 108 -429654.10 -429654.10 0.00 0.00 f 0.00 20546 105 108 0.00 0.00 0.00 0.00 f 0.00 20547 106 108 0.00 0.00 0.00 0.00 f 0.00 20548 107 108 0.00 0.00 0.00 0.00 f 0.00 20549 108 108 0.00 0.00 0.00 0.00 f 0.00 20550 109 108 0.00 0.00 0.00 0.00 f 0.00 20397 93 158 0.00 0.00 0.00 0.00 f 0.00 21379 110 158 0.00 0.00 0.00 0.00 f 0.00 21385 116 158 0.00 0.00 0.00 0.00 f 0.00 21386 105 159 0.00 0.00 0.00 0.00 f 0.00 21387 106 159 0.00 0.00 0.00 0.00 f 0.00 21388 107 159 0.00 0.00 0.00 0.00 f 0.00 21389 108 159 0.00 0.00 0.00 0.00 f 0.00 18765 41 146 0.00 0.00 0.00 0.00 f 0.00 18766 42 146 0.00 0.00 0.00 0.00 f 0.00 18767 43 146 0.00 0.00 0.00 0.00 f 0.00 18768 44 146 0.00 0.00 0.00 0.00 f 0.00 18769 45 146 0.00 0.00 0.00 0.00 f 0.00 18783 62 146 0.00 0.00 0.00 0.00 f 0.00 18796 75 146 0.00 0.00 0.00 0.00 f 0.00 18797 76 146 0.00 0.00 0.00 0.00 f 0.00 18799 78 146 -744.34 -795.61 102.54 153.81 f 0.00 18805 84 146 -790.49 -790.49 0.00 0.00 f 0.00 18806 85 146 -790.49 -790.49 0.00 0.00 f 0.00 18807 86 146 -790.49 -790.49 0.00 0.00 f 0.00 18808 87 146 -790.49 -790.49 0.00 0.00 f 0.00 18809 88 146 -790.49 -790.49 0.00 0.00 f 0.00 18810 89 146 -790.49 -790.49 0.00 0.00 f 0.00 18811 90 146 -790.49 -790.49 0.00 0.00 f 0.00 21429 115 161 3400.00 3400.00 0.00 0.00 f 0.00 21430 116 161 3400.00 3400.00 0.00 0.00 f 0.00 15476 29 93 0.00 0.00 0.00 0.00 f 0.00 15477 28 93 0.00 -1.07 0.00 1.07 f 0.00 15531 86 93 0.00 0.00 0.00 0.00 f 0.00 19796 104 117 1228.17 1228.17 0.00 0.00 f 0.00 19797 93 118 0.00 0.00 0.00 0.00 f 0.00 19798 94 118 0.00 0.00 0.00 0.00 f 0.00 19799 95 118 0.00 0.00 0.00 0.00 f 0.00 18687 92 144 0.00 0.00 0.00 0.00 f 0.00 20193 93 144 0.00 0.00 0.00 0.00 f 0.00 20194 94 144 0.00 0.00 0.00 0.00 f 0.00 20195 95 144 0.00 0.00 0.00 0.00 f 0.00 20196 96 144 0.00 0.00 0.00 0.00 f 0.00 20197 97 144 0.00 0.00 0.00 0.00 f 0.00 20198 98 144 0.00 0.00 0.00 0.00 f 0.00 20199 99 144 0.00 0.00 0.00 0.00 f 0.00 20200 100 144 0.00 0.00 0.00 0.00 f 0.00 20201 101 144 0.00 0.00 0.00 0.00 f 0.00 20202 102 144 0.00 0.00 0.00 0.00 f 0.00 18763 39 146 0.00 0.00 0.00 0.00 f 0.00 18764 40 146 0.00 0.00 0.00 0.00 f 0.00 20630 105 83 0.00 0.00 0.00 0.00 f 0.00 20631 106 83 0.00 0.00 0.00 0.00 f 0.00 20632 107 83 0.00 0.00 0.00 0.00 f 0.00 20633 108 83 0.00 0.00 0.00 0.00 f 0.00 20634 109 83 0.00 0.00 0.00 0.00 f 0.00 20635 110 83 0.00 0.00 0.00 0.00 f 0.00 20636 111 83 0.00 0.00 0.00 0.00 f 0.00 20637 112 83 0.00 0.00 0.00 0.00 f 0.00 20638 113 83 0.00 0.00 0.00 0.00 f 0.00 20639 114 83 0.00 0.00 0.00 0.00 f 0.00 20640 115 83 0.00 0.00 0.00 0.00 f 0.00 20641 116 83 0.00 0.00 0.00 0.00 f 0.00 20642 105 91 0.00 0.00 0.00 0.00 f 0.00 20643 106 91 0.00 0.00 0.00 0.00 f 0.00 20644 107 91 0.00 0.00 0.00 0.00 f 0.00 20645 108 91 0.00 0.00 0.00 0.00 f 0.00 20646 109 91 0.00 0.00 0.00 0.00 f 0.00 20647 110 91 0.00 0.00 0.00 0.00 f 0.00 20648 111 91 0.00 0.00 0.00 0.00 f 0.00 20649 112 91 0.00 0.00 0.00 0.00 f 0.00 20650 113 91 0.00 0.00 0.00 0.00 f 0.00 20651 114 91 0.00 0.00 0.00 0.00 f 0.00 20652 115 91 0.00 0.00 0.00 0.00 f 0.00 20653 116 91 0.00 0.00 0.00 0.00 f 0.00 20523 106 93 0.00 0.00 0.00 0.00 f 0.00 20524 107 93 0.00 0.00 0.00 0.00 f 0.00 20525 108 93 0.00 0.00 0.00 0.00 f 0.00 20526 109 93 0.00 0.00 0.00 0.00 f 0.00 20527 110 93 0.00 0.00 0.00 0.00 f 0.00 20528 111 93 0.00 0.00 0.00 0.00 f 0.00 20529 112 93 0.00 0.00 0.00 0.00 f 0.00 20530 113 93 0.00 0.00 0.00 0.00 f 0.00 20531 114 93 0.00 0.00 0.00 0.00 f 0.00 20532 115 93 0.00 0.00 0.00 0.00 f 0.00 20533 116 93 0.00 0.00 0.00 0.00 f 0.00 19677 93 133 20227.65 20227.65 0.00 0.00 f 0.00 19678 94 133 20227.65 20227.65 0.00 0.00 f 0.00 19679 95 133 20227.65 21450.00 21450.00 20227.65 f 0.00 19680 96 133 21450.00 0.00 0.00 21450.00 f 0.00 19681 97 133 0.00 0.00 0.00 0.00 f 0.00 19682 98 133 0.00 0.00 0.00 0.00 f 0.00 19683 99 133 0.00 0.00 0.00 0.00 f 0.00 19684 100 133 0.00 0.00 0.00 0.00 f 0.00 19685 101 133 0.00 0.00 0.00 0.00 f 0.00 19686 102 133 0.00 0.00 0.00 0.00 f 0.00 19687 103 133 0.00 0.00 0.00 0.00 f 0.00 19688 104 133 0.00 0.00 0.00 0.00 f 0.00 20654 105 133 0.00 0.00 0.00 0.00 f 0.00 20655 106 133 0.00 0.00 0.00 0.00 f 0.00 20656 107 133 0.00 0.00 0.00 0.00 f 0.00 20657 108 133 0.00 0.00 0.00 0.00 f 0.00 20658 109 133 0.00 0.00 0.00 0.00 f 0.00 20659 110 133 0.00 0.00 0.00 0.00 f 0.00 20660 111 133 0.00 0.00 0.00 0.00 f 0.00 20661 112 133 0.00 0.00 0.00 0.00 f 0.00 20662 113 133 0.00 0.00 0.00 0.00 f 0.00 20663 114 133 0.00 0.00 0.00 0.00 f 0.00 20664 115 133 0.00 0.00 0.00 0.00 f 0.00 20665 116 133 0.00 0.00 0.00 0.00 f 0.00 19689 93 136 0.00 0.00 0.00 0.00 f 0.00 19690 94 136 0.00 0.00 0.00 0.00 f 0.00 19691 95 136 0.00 0.00 0.00 0.00 f 0.00 19692 96 136 0.00 0.00 0.00 0.00 f 0.00 19693 97 136 0.00 0.00 0.00 0.00 f 0.00 19694 98 136 0.00 0.00 0.00 0.00 f 0.00 19695 99 136 0.00 0.00 0.00 0.00 f 0.00 19696 100 136 0.00 0.00 0.00 0.00 f 0.00 19697 101 136 0.00 0.00 0.00 0.00 f 0.00 20666 105 136 0.00 0.00 0.00 0.00 f 0.00 20667 106 136 0.00 0.00 0.00 0.00 f 0.00 20668 107 136 0.00 0.00 0.00 0.00 f 0.00 20669 108 136 0.00 0.00 0.00 0.00 f 0.00 20670 109 136 0.00 0.00 0.00 0.00 f 0.00 20671 110 136 0.00 0.00 0.00 0.00 f 0.00 20672 111 136 0.00 0.00 0.00 0.00 f 0.00 20673 112 136 0.00 0.00 0.00 0.00 f 0.00 20674 113 136 0.00 0.00 0.00 0.00 f 0.00 20675 114 136 0.00 0.00 0.00 0.00 f 0.00 20676 115 136 0.00 0.00 0.00 0.00 f 0.00 20677 116 136 0.00 0.00 0.00 0.00 f 0.00 16168 46 104 0.00 0.00 0.00 0.00 f 0.00 16224 86 104 0.00 0.00 0.00 0.00 f 0.00 16225 87 104 0.00 0.00 0.00 0.00 f 0.00 20678 105 104 0.00 0.00 0.00 0.00 f 0.00 20679 106 104 0.00 0.00 0.00 0.00 f 0.00 20680 107 104 0.00 0.00 0.00 0.00 f 0.00 20681 108 104 0.00 0.00 0.00 0.00 f 0.00 20682 109 104 0.00 0.00 0.00 0.00 f 0.00 20683 110 104 0.00 0.00 0.00 0.00 f 0.00 20684 111 104 0.00 0.00 0.00 0.00 f 0.00 20688 115 104 0.00 0.00 0.00 0.00 f 0.00 20689 116 104 0.00 0.00 0.00 0.00 f 0.00 20534 105 86 0.00 0.00 0.00 0.00 f 0.00 20535 106 86 0.00 0.00 0.00 0.00 f 0.00 20536 107 86 0.00 0.00 0.00 0.00 f 0.00 20537 108 86 0.00 0.00 0.00 0.00 f 0.00 20538 109 86 0.00 0.00 0.00 0.00 f 0.00 20539 110 86 0.00 0.00 0.00 0.00 f 0.00 20540 111 86 0.00 0.00 0.00 0.00 f 0.00 20541 112 86 0.00 0.00 0.00 0.00 f 0.00 20542 113 86 0.00 0.00 0.00 0.00 f 0.00 20543 114 86 0.00 0.00 0.00 0.00 f 0.00 20544 115 86 0.00 0.00 0.00 0.00 f 0.00 20545 116 86 0.00 0.00 0.00 0.00 f 0.00 16357 46 107 0.00 0.00 0.00 0.00 f 0.00 20690 105 107 0.00 0.00 0.00 0.00 f 0.00 20691 106 107 0.00 0.00 0.00 0.00 f 0.00 20692 107 107 0.00 0.00 0.00 0.00 f 0.00 20693 108 107 0.00 0.00 0.00 0.00 f 0.00 20694 109 107 0.00 0.00 0.00 0.00 f 0.00 20695 110 107 0.00 0.00 0.00 0.00 f 0.00 20696 111 107 0.00 0.00 0.00 0.00 f 0.00 20697 112 107 0.00 0.00 0.00 0.00 f 0.00 20698 113 107 0.00 0.00 0.00 0.00 f 0.00 20699 114 107 0.00 0.00 0.00 0.00 f 0.00 20700 115 107 0.00 0.00 0.00 0.00 f 0.00 20701 116 107 0.00 0.00 0.00 0.00 f 0.00 16420 46 108 -3000.00 -4000.00 0.00 1000.00 f 0.00 19577 101 108 -429654.10 -429654.10 0.00 0.00 f 0.00 19578 102 108 -429654.10 -429654.10 0.00 0.00 f 0.00 20551 110 108 0.00 0.00 0.00 0.00 f 0.00 20552 111 108 0.00 0.00 0.00 0.00 f 0.00 20553 112 108 0.00 0.00 0.00 0.00 f 0.00 19725 93 110 0.00 0.00 0.00 0.00 f 0.00 19726 94 110 0.00 0.00 0.00 0.00 f 0.00 19727 95 110 0.00 0.00 0.00 0.00 f 0.00 16374 44 107 0.00 0.00 0.00 0.00 f 0.00 16375 45 107 0.00 0.00 0.00 0.00 f 0.00 16376 49 107 0.00 0.00 0.00 0.00 f 0.00 16377 50 107 0.00 0.00 0.00 0.00 f 0.00 16427 34 108 -33872.99 -48872.99 0.00 15000.00 f 0.00 16428 35 108 -48872.99 -263872.99 0.00 215000.00 f 0.00 16429 36 108 -263872.99 -414365.35 0.00 150492.36 f 0.00 16430 37 108 -414365.35 -564365.35 0.00 150000.00 f 0.00 16432 39 108 -579365.35 -610003.53 0.00 30638.18 f 0.00 16433 40 108 -610003.53 -625003.53 0.00 15000.00 f 0.00 16436 43 108 -15638.18 -31914.54 0.00 16276.36 f 0.00 16437 44 108 -31914.54 -46914.54 0.00 15000.00 f 0.00 16438 45 108 -46914.54 -53296.34 0.00 6381.80 f 0.00 16439 49 108 -53296.34 -57125.42 0.00 3829.08 f 0.00 16440 50 108 -57125.42 -72125.42 0.00 15000.00 f 0.00 16441 51 108 -72125.42 -87125.42 0.00 15000.00 f 0.00 16442 52 108 -87125.42 -102763.60 0.00 15638.18 f 0.00 16443 53 108 -102763.60 -148651.78 0.00 45888.18 f 0.00 16444 54 108 -148651.78 -193901.78 0.00 45250.00 f 0.00 16445 55 108 -193901.78 -239151.78 0.00 45250.00 f 0.00 16446 56 108 -239151.78 -274473.92 0.00 35322.14 f 0.00 19569 93 108 0.00 0.00 0.00 0.00 f 0.00 19573 97 108 -99654.10 -99654.10 0.00 0.00 f 0.00 19574 98 108 -99654.10 -429654.10 0.00 330000.00 f 0.00 19575 99 108 -429654.10 -429654.10 0.00 0.00 f 0.00 19576 100 108 -429654.10 -429654.10 0.00 0.00 f 0.00 20710 113 110 0.00 0.00 0.00 0.00 f 0.00 20711 114 110 0.00 0.00 0.00 0.00 f 0.00 20712 115 110 0.00 0.00 0.00 0.00 f 0.00 20713 116 110 0.00 0.00 0.00 0.00 f 0.00 20714 105 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20715 106 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20716 107 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20717 108 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20718 109 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20719 110 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20720 111 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20721 112 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20722 113 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20723 114 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20724 115 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20725 116 111 -145999.79 -145999.79 0.00 0.00 f 0.00 20726 105 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20727 106 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16569 53 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16570 54 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16609 46 111 0.00 0.00 0.00 0.00 f 0.00 20735 114 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20736 115 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20737 116 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20738 105 116 40000.00 40000.00 0.00 0.00 f 0.00 20739 106 116 40000.00 40000.00 0.00 0.00 f 0.00 20740 107 116 40000.00 40000.00 0.00 0.00 f 0.00 20741 108 116 40000.00 40000.00 0.00 0.00 f 0.00 20742 109 116 40000.00 40000.00 0.00 0.00 f 0.00 20743 110 116 40000.00 40000.00 0.00 0.00 f 0.00 20744 111 116 40000.00 40000.00 0.00 0.00 f 0.00 20745 112 116 40000.00 40000.00 0.00 0.00 f 0.00 20746 113 116 40000.00 40000.00 0.00 0.00 f 0.00 20747 114 116 40000.00 40000.00 0.00 0.00 f 0.00 20748 115 116 40000.00 40000.00 0.00 0.00 f 0.00 20749 116 116 40000.00 40000.00 0.00 0.00 f 0.00 15728 29 97 0.00 -500.00 0.00 500.00 f 0.00 15729 28 97 -500.00 -700.00 0.00 200.00 f 0.00 20750 105 97 0.00 0.00 0.00 0.00 f 0.00 20751 106 97 0.00 0.00 0.00 0.00 f 0.00 20752 107 97 0.00 0.00 0.00 0.00 f 0.00 20753 108 97 0.00 0.00 0.00 0.00 f 0.00 20754 109 97 0.00 0.00 0.00 0.00 f 0.00 20755 110 97 0.00 0.00 0.00 0.00 f 0.00 20756 111 97 0.00 0.00 0.00 0.00 f 0.00 20757 112 97 0.00 0.00 0.00 0.00 f 0.00 20758 113 97 0.00 0.00 0.00 0.00 f 0.00 20759 114 97 0.00 0.00 0.00 0.00 f 0.00 20760 115 97 0.00 0.00 0.00 0.00 f 0.00 20761 116 97 0.00 0.00 0.00 0.00 f 0.00 20762 105 117 0.00 0.00 0.00 0.00 f 0.00 20763 106 117 0.00 0.00 0.00 0.00 f 0.00 20764 107 117 0.00 0.00 0.00 0.00 f 0.00 20765 108 117 0.00 0.00 0.00 0.00 f 0.00 20766 109 117 0.00 0.00 0.00 0.00 f 0.00 20767 110 117 0.00 0.00 0.00 0.00 f 0.00 20768 111 117 0.00 0.00 0.00 0.00 f 0.00 20769 112 117 0.00 0.00 0.00 0.00 f 0.00 20770 113 117 0.00 0.00 0.00 0.00 f 0.00 20771 114 117 0.00 0.00 0.00 0.00 f 0.00 20772 115 117 0.00 0.00 0.00 0.00 f 0.00 20773 116 117 0.00 0.00 0.00 0.00 f 0.00 19800 96 118 0.00 0.00 0.00 0.00 f 0.00 19801 97 118 0.00 0.00 0.00 0.00 f 0.00 19802 98 118 0.00 0.00 0.00 0.00 f 0.00 17122 36 119 0.00 0.00 0.00 0.00 f 0.00 17123 37 119 0.00 0.00 0.00 0.00 f 0.00 17124 38 119 0.00 0.00 0.00 0.00 f 0.00 17125 39 119 0.00 0.00 0.00 0.00 f 0.00 20482 89 160 0.00 0.00 0.00 0.00 f 0.00 16735 46 113 10000.00 20000.00 10000.00 0.00 f 0.00 19803 99 118 0.00 0.00 0.00 0.00 f 0.00 19804 100 118 0.00 0.00 0.00 0.00 f 0.00 19805 101 118 0.00 0.00 0.00 0.00 f 0.00 19806 102 118 0.00 0.00 0.00 0.00 f 0.00 19807 103 118 0.00 0.00 0.00 0.00 f 0.00 19808 104 118 0.00 0.00 0.00 0.00 f 0.00 20774 105 118 0.00 0.00 0.00 0.00 f 0.00 20775 106 118 0.00 0.00 0.00 0.00 f 0.00 20776 107 118 0.00 0.00 0.00 0.00 f 0.00 20777 108 118 0.00 0.00 0.00 0.00 f 0.00 20778 109 118 0.00 0.00 0.00 0.00 f 0.00 20779 110 118 0.00 0.00 0.00 0.00 f 0.00 20780 111 118 0.00 0.00 0.00 0.00 f 0.00 20781 112 118 0.00 0.00 0.00 0.00 f 0.00 20782 113 118 0.00 0.00 0.00 0.00 f 0.00 20783 114 118 0.00 0.00 0.00 0.00 f 0.00 20784 115 118 0.00 0.00 0.00 0.00 f 0.00 20785 116 118 0.00 0.00 0.00 0.00 f 0.00 17131 45 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17132 49 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17133 50 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17134 51 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17136 53 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17137 54 119 -1000.00 -1000.00 0.00 0.00 f 0.00 19809 93 119 0.00 0.00 0.00 0.00 f 0.00 19810 94 119 0.00 0.00 0.00 0.00 f 0.00 19811 95 119 0.00 0.00 0.00 0.00 f 0.00 19812 96 119 0.00 0.00 0.00 0.00 f 0.00 19813 97 119 0.00 0.00 0.00 0.00 f 0.00 19814 98 119 0.00 0.00 0.00 0.00 f 0.00 19815 99 119 0.00 0.00 0.00 0.00 f 0.00 19816 100 119 0.00 0.00 0.00 0.00 f 0.00 19817 101 119 0.00 0.00 0.00 0.00 f 0.00 19818 102 119 0.00 0.00 0.00 0.00 f 0.00 19819 103 119 0.00 0.00 0.00 0.00 f 0.00 19820 104 119 0.00 0.00 0.00 0.00 f 0.00 20786 105 119 0.00 0.00 0.00 0.00 f 0.00 20787 106 119 0.00 0.00 0.00 0.00 f 0.00 20788 107 119 0.00 0.00 0.00 0.00 f 0.00 20281 97 130 0.00 0.00 0.00 0.00 f 0.00 20282 98 130 0.00 0.00 0.00 0.00 f 0.00 20283 99 130 0.00 0.00 0.00 0.00 f 0.00 20284 100 130 0.00 0.00 0.00 0.00 f 0.00 20285 101 130 0.00 0.00 0.00 0.00 f 0.00 20286 102 130 0.00 0.00 0.00 0.00 f 0.00 20287 103 130 0.00 0.00 0.00 0.00 f 0.00 21254 105 130 0.00 0.00 0.00 0.00 f 0.00 21255 106 130 0.00 0.00 0.00 0.00 f 0.00 18038 73 134 0.00 0.00 0.00 0.00 f 0.00 18039 74 134 0.00 0.00 0.00 0.00 f 0.00 18040 75 134 0.00 0.00 0.00 0.00 f 0.00 19865 101 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 19866 102 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 19867 103 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 19868 104 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20834 105 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20835 106 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20576 111 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20577 112 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20578 113 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20579 114 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20580 115 84 3834455.79 3834455.79 0.00 0.00 f 0.00 20581 116 84 3834455.79 3834455.79 0.00 0.00 f 0.00 17305 30 122 0.00 0.00 0.00 0.00 f 0.00 19869 93 122 0.00 0.00 0.00 0.00 f 0.00 19870 94 122 0.00 0.00 0.00 0.00 f 0.00 19871 95 122 0.00 1500.00 1500.00 0.00 f 0.00 18041 76 134 0.00 0.00 0.00 0.00 f 0.00 18045 80 134 0.00 0.00 0.00 0.00 f 0.00 20289 93 134 0.00 0.00 0.00 0.00 f 0.00 20290 94 134 0.00 0.00 0.00 0.00 f 0.00 20291 95 134 0.00 0.00 0.00 0.00 f 0.00 20292 96 134 0.00 0.00 0.00 0.00 f 0.00 20293 97 134 0.00 0.00 0.00 0.00 f 0.00 20294 98 134 0.00 0.00 0.00 0.00 f 0.00 20295 99 134 0.00 0.00 0.00 0.00 f 0.00 20296 100 134 0.00 0.00 0.00 0.00 f 0.00 16358 29 107 0.00 0.00 0.00 0.00 f 0.00 16359 28 107 0.00 0.00 0.00 0.00 f 0.00 20297 101 134 0.00 0.00 0.00 0.00 f 0.00 20298 102 134 0.00 0.00 0.00 0.00 f 0.00 20299 103 134 0.00 0.00 0.00 0.00 f 0.00 16909 78 115 0.00 0.00 0.00 0.00 f 0.00 16910 79 115 0.00 0.00 0.00 0.00 f 0.00 16911 80 115 0.00 0.00 0.00 0.00 f 0.00 16912 81 115 0.00 0.00 12.06 12.06 f 0.00 16913 82 115 0.00 0.00 0.00 0.00 f 0.00 16914 83 115 0.00 0.00 0.00 0.00 f 0.00 16915 84 115 0.00 0.00 0.00 0.00 f 0.00 20806 113 94 20216.12 20216.12 0.00 0.00 f 0.00 20807 114 94 20216.12 20216.12 0.00 0.00 f 0.00 20808 115 94 20216.12 20216.12 0.00 0.00 f 0.00 20809 116 94 20216.12 20216.12 0.00 0.00 f 0.00 20810 105 125 0.00 0.00 0.00 0.00 f 0.00 20811 106 125 0.00 0.00 0.00 0.00 f 0.00 20812 107 125 0.00 0.00 0.00 0.00 f 0.00 20813 108 125 0.00 0.00 0.00 0.00 f 0.00 20814 109 125 0.00 0.00 0.00 0.00 f 0.00 20815 110 125 0.00 0.00 0.00 0.00 f 0.00 20816 111 125 0.00 0.00 0.00 0.00 f 0.00 20817 112 125 0.00 0.00 0.00 0.00 f 0.00 20818 113 125 0.00 0.00 0.00 0.00 f 0.00 20819 114 125 0.00 0.00 0.00 0.00 f 0.00 20820 115 125 0.00 0.00 0.00 0.00 f 0.00 20821 116 125 0.00 0.00 0.00 0.00 f 0.00 19863 99 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 19864 100 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 16916 85 115 0.00 0.00 0.00 0.00 f 0.00 16917 86 115 0.00 0.00 0.00 0.00 f 0.00 20366 98 157 -7621.47 -10591.47 0.00 2970.00 f 0.00 20367 99 157 -10591.47 -10591.47 0.00 0.00 f 0.00 20368 100 157 -10591.47 -10591.47 0.00 0.00 f 0.00 17396 61 123 0.00 0.00 0.00 0.00 f 0.00 20380 100 123 -185150.00 -185150.00 0.00 0.00 f 0.00 20381 101 123 -185150.00 -185150.00 0.00 0.00 f 0.00 20382 102 123 -185150.00 -185150.00 0.00 0.00 f 0.00 20383 103 123 -185150.00 -185150.00 0.00 0.00 f 0.00 20384 104 123 -185150.00 -185150.00 0.00 0.00 f 0.00 21390 109 159 0.00 0.00 0.00 0.00 f 0.00 20865 112 112 0.00 0.00 0.00 0.00 f 0.00 20866 113 112 0.00 0.00 0.00 0.00 f 0.00 20867 114 112 0.00 0.00 0.00 0.00 f 0.00 20868 115 112 0.00 0.00 0.00 0.00 f 0.00 20869 116 112 0.00 0.00 0.00 0.00 f 0.00 15979 46 101 0.00 0.00 0.00 0.00 f 0.00 16024 75 101 863.60 863.60 0.00 0.00 f 0.00 16918 87 115 0.00 0.00 0.00 0.00 f 0.00 16919 88 115 0.00 0.00 0.00 0.00 f 0.00 16920 89 115 0.00 0.00 0.00 0.00 f 0.00 16921 90 115 0.00 0.00 0.00 0.00 f 0.00 16923 92 115 0.00 0.00 0.00 0.00 f 0.00 20349 93 115 0.00 0.00 0.00 0.00 f 0.00 20350 94 115 0.00 0.00 0.00 0.00 f 0.00 20351 95 115 0.00 0.00 0.00 0.00 f 0.00 20352 96 115 0.00 0.00 0.00 0.00 f 0.00 20353 97 115 0.00 0.00 0.00 0.00 f 0.00 20354 98 115 0.00 0.00 0.00 0.00 f 0.00 20355 99 115 0.00 0.00 0.00 0.00 f 0.00 20356 100 115 0.00 0.00 0.00 0.00 f 0.00 20357 101 115 0.00 0.00 0.00 0.00 f 0.00 20358 102 115 0.00 0.00 0.00 0.00 f 0.00 20359 103 115 0.00 0.00 0.00 0.00 f 0.00 20360 104 115 0.00 0.00 0.00 0.00 f 0.00 21326 105 115 0.00 0.00 0.00 0.00 f 0.00 21327 106 115 0.00 0.00 0.00 0.00 f 0.00 21328 107 115 0.00 0.00 0.00 0.00 f 0.00 21329 108 115 0.00 0.00 0.00 0.00 f 0.00 21391 110 159 0.00 0.00 0.00 0.00 f 0.00 21392 111 159 0.00 0.00 0.00 0.00 f 0.00 21393 112 159 0.00 0.00 0.00 0.00 f 0.00 21394 113 159 0.00 0.00 0.00 0.00 f 0.00 21395 114 159 0.00 0.00 0.00 0.00 f 0.00 21396 115 159 0.00 0.00 0.00 0.00 f 0.00 21397 116 159 0.00 0.00 0.00 0.00 f 0.00 20423 46 160 0.00 0.00 0.00 0.00 f 0.00 20424 29 160 0.00 0.00 0.00 0.00 f 0.00 20425 28 160 0.00 0.00 0.00 0.00 f 0.00 20426 30 160 0.00 0.00 0.00 0.00 f 0.00 20427 31 160 0.00 0.00 0.00 0.00 f 0.00 20428 32 160 0.00 0.00 0.00 0.00 f 0.00 16924 46 116 0.00 0.00 0.00 0.00 f 0.00 16929 32 116 5000.00 5000.00 0.00 0.00 f 0.00 16987 46 117 0.00 0.00 0.00 0.00 f 0.00 16485 28 109 -18000.00 -1009222.11 23988.60 1015210.71 f 0.00 16501 45 109 -2535514.97 -2578626.47 1700.00 44811.50 f 0.00 16502 49 109 -2578626.47 -2587104.58 4276.50 12754.61 f 0.00 20858 105 112 0.00 0.00 0.00 0.00 f 0.00 20859 106 112 0.00 0.00 0.00 0.00 f 0.00 20860 107 112 0.00 0.00 0.00 0.00 f 0.00 20861 108 112 0.00 0.00 0.00 0.00 f 0.00 20862 109 112 0.00 0.00 0.00 0.00 f 0.00 20863 110 112 0.00 0.00 0.00 0.00 f 0.00 20864 111 112 0.00 0.00 0.00 0.00 f 0.00 20429 33 160 0.00 0.00 0.00 0.00 f 0.00 20430 34 160 0.00 0.00 0.00 0.00 f 0.00 20431 35 160 0.00 0.00 0.00 0.00 f 0.00 20432 36 160 0.00 0.00 0.00 0.00 f 0.00 20433 37 160 0.00 0.00 0.00 0.00 f 0.00 20434 38 160 0.00 0.00 0.00 0.00 f 0.00 20437 41 160 0.00 0.00 0.00 0.00 f 0.00 20438 42 160 0.00 0.00 0.00 0.00 f 0.00 20439 43 160 0.00 0.00 0.00 0.00 f 0.00 20440 44 160 0.00 0.00 0.00 0.00 f 0.00 20441 45 160 0.00 0.00 0.00 0.00 f 0.00 20448 55 160 0.00 0.00 0.00 0.00 f 0.00 20449 56 160 0.00 0.00 0.00 0.00 f 0.00 17040 83 117 0.00 0.00 0.00 0.00 f 0.00 17041 84 117 0.00 0.00 0.00 0.00 f 0.00 17042 85 117 0.00 0.00 0.00 0.00 f 0.00 17050 46 118 0.00 0.00 0.00 0.00 f 0.00 17113 46 119 0.00 0.00 0.00 0.00 f 0.00 15950 64 100 0.00 0.00 0.00 0.00 f 0.00 15951 65 100 0.00 0.00 0.00 0.00 f 0.00 15952 66 100 0.00 0.00 0.00 0.00 f 0.00 19930 94 100 100.00 100.00 0.00 0.00 f 0.00 19931 95 100 100.00 100.00 0.00 0.00 f 0.00 19932 96 100 100.00 100.00 0.00 0.00 f 0.00 19933 97 100 100.00 100.00 0.00 0.00 f 0.00 19934 98 100 100.00 100.00 0.00 0.00 f 0.00 19935 99 100 100.00 1100.00 1000.00 0.00 f 0.00 19936 100 100 1100.00 1100.00 0.00 0.00 f 0.00 19937 101 100 1100.00 1100.00 0.00 0.00 f 0.00 19938 102 100 1100.00 1100.00 0.00 0.00 f 0.00 19939 103 100 1100.00 1100.00 0.00 0.00 f 0.00 19940 104 100 1100.00 1100.00 0.00 0.00 f 0.00 20906 105 100 1100.00 1100.00 0.00 0.00 f 0.00 20369 101 157 -10591.47 -10591.47 0.00 0.00 f 0.00 20370 102 157 -10591.47 -10591.47 0.00 0.00 f 0.00 20371 103 157 -10591.47 -10591.47 0.00 0.00 f 0.00 20372 104 157 -10591.47 -10591.47 0.00 0.00 f 0.00 21338 105 157 0.00 0.00 0.00 0.00 f 0.00 21339 106 157 0.00 0.00 0.00 0.00 f 0.00 21340 107 157 0.00 0.00 0.00 0.00 f 0.00 21341 108 157 0.00 0.00 0.00 0.00 f 0.00 21342 109 157 0.00 0.00 0.00 0.00 f 0.00 21343 110 157 0.00 0.00 0.00 0.00 f 0.00 21344 111 157 0.00 0.00 0.00 0.00 f 0.00 21345 112 157 0.00 0.00 0.00 0.00 f 0.00 21346 113 157 0.00 0.00 0.00 0.00 f 0.00 21347 114 157 0.00 0.00 0.00 0.00 f 0.00 21348 115 157 0.00 0.00 0.00 0.00 f 0.00 21349 116 157 0.00 0.00 0.00 0.00 f 0.00 17365 46 123 0.00 0.00 0.00 0.00 f 0.00 17370 32 123 0.00 0.00 0.00 0.00 f 0.00 17371 33 123 0.00 0.00 0.00 0.00 f 0.00 17372 34 123 0.00 0.00 0.00 0.00 f 0.00 17373 35 123 0.00 0.00 0.00 0.00 f 0.00 17392 57 123 0.00 0.00 0.00 0.00 f 0.00 17393 58 123 0.00 0.00 0.00 0.00 f 0.00 17394 59 123 0.00 0.00 0.00 0.00 f 0.00 20450 57 160 0.00 0.00 0.00 0.00 f 0.00 20451 58 160 0.00 0.00 0.00 0.00 f 0.00 20472 79 160 0.00 0.00 0.00 0.00 f 0.00 16610 29 111 0.00 0.00 0.00 0.00 f 0.00 16611 28 111 0.00 0.00 0.00 0.00 f 0.00 16623 41 111 -1000.00 -1000.00 0.00 0.00 f 0.00 20473 80 160 0.00 0.00 0.00 0.00 f 0.00 20474 81 160 0.00 0.00 0.00 0.00 f 0.00 20475 82 160 0.00 0.00 0.00 0.00 f 0.00 20476 83 160 0.00 0.00 0.00 0.00 f 0.00 20477 84 160 0.00 0.00 0.00 0.00 f 0.00 20478 85 160 0.00 0.00 0.00 0.00 f 0.00 20479 86 160 0.00 0.00 0.00 0.00 f 0.00 20480 87 160 0.00 0.00 0.00 0.00 f 0.00 20481 88 160 0.00 0.00 0.00 0.00 f 0.00 21403 110 160 0.00 0.00 0.00 0.00 f 0.00 21404 111 160 0.00 0.00 0.00 0.00 f 0.00 21405 112 160 0.00 0.00 0.00 0.00 f 0.00 19462 43 158 0.00 0.00 0.00 0.00 f 0.00 19463 44 158 0.00 0.00 0.00 0.00 f 0.00 19464 45 158 0.00 0.00 0.00 0.00 f 0.00 19483 67 158 0.00 0.00 0.00 0.00 f 0.00 19484 68 158 0.00 0.00 0.00 0.00 f 0.00 19485 69 158 0.00 0.00 0.00 0.00 f 0.00 19486 70 158 0.00 0.00 0.00 0.00 f 0.00 21406 113 160 0.00 0.00 0.00 0.00 f 0.00 21411 97 161 3400.00 3400.00 0.00 0.00 f 0.00 21412 98 161 3400.00 3400.00 0.00 0.00 f 0.00 21413 99 161 3400.00 3400.00 0.00 0.00 f 0.00 21414 100 161 3400.00 3400.00 0.00 0.00 f 0.00 21415 101 161 3400.00 3400.00 0.00 0.00 f 0.00 21416 102 161 3400.00 3400.00 0.00 0.00 f 0.00 21417 103 161 3400.00 3400.00 0.00 0.00 f 0.00 21418 104 161 3400.00 3400.00 0.00 0.00 f 0.00 21419 105 161 3400.00 3400.00 0.00 0.00 f 0.00 21420 106 161 3400.00 3400.00 0.00 0.00 f 0.00 21421 107 161 3400.00 3400.00 0.00 0.00 f 0.00 21422 108 161 3400.00 3400.00 0.00 0.00 f 0.00 21423 109 161 3400.00 3400.00 0.00 0.00 f 0.00 21424 110 161 3400.00 3400.00 0.00 0.00 f 0.00 21425 111 161 3400.00 3400.00 0.00 0.00 f 0.00 21426 112 161 3400.00 3400.00 0.00 0.00 f 0.00 21427 113 161 3400.00 3400.00 0.00 0.00 f 0.00 21428 114 161 3400.00 3400.00 0.00 0.00 f 0.00 16736 29 113 20000.00 20000.00 0.00 0.00 f 0.00 16737 28 113 20000.00 1020000.00 1000000.00 0.00 f 0.00 17163 80 119 0.00 0.00 0.00 0.00 f 0.00 17164 81 119 0.00 0.00 0.00 0.00 f 0.00 20941 116 88 0.00 0.00 0.00 0.00 f 0.00 15853 46 99 0.00 0.00 0.00 0.00 f 0.00 15859 33 99 262.95 262.95 0.00 0.00 f 0.00 19617 93 99 22956.05 22956.05 0.00 0.00 f 0.00 19618 94 99 22956.05 22956.05 0.00 0.00 f 0.00 19619 95 99 22956.05 0.00 111074.00 134030.05 f 0.00 19620 96 99 0.00 555.00 26355.00 25800.00 f 0.00 19621 97 99 555.00 555.00 113000.00 113000.00 f 0.00 19622 98 99 555.00 0.00 146000.00 146555.00 f 0.00 20598 109 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20599 110 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20600 111 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20601 112 99 -1000.00 -1000.00 0.00 0.00 f 0.00 17412 77 123 0.00 -119.00 20125.00 20244.00 f 0.00 17413 78 123 -119.00 -119.00 0.00 0.00 f 0.00 20373 93 123 0.00 0.00 0.00 0.00 f 0.00 20374 94 123 0.00 0.00 0.00 0.00 f 0.00 21350 105 123 0.00 0.00 0.00 0.00 f 0.00 21351 106 123 0.00 0.00 0.00 0.00 f 0.00 19458 39 158 0.00 0.00 0.00 0.00 f 0.00 19459 40 158 0.00 0.00 0.00 0.00 f 0.00 19460 41 158 0.00 0.00 0.00 0.00 f 0.00 19461 42 158 0.00 0.00 0.00 0.00 f 0.00 15262 69 89 0.00 0.00 0.00 0.00 f 0.00 15263 70 89 0.00 0.00 0.00 0.00 f 0.00 15264 71 89 0.00 0.00 0.00 0.00 f 0.00 15265 72 89 0.00 0.00 0.00 0.00 f 0.00 15266 73 89 0.00 0.00 0.00 0.00 f 0.00 15267 74 89 0.00 0.00 0.00 0.00 f 0.00 15268 75 89 0.00 0.00 0.00 0.00 f 0.00 15269 76 89 0.00 0.00 0.00 0.00 f 0.00 15270 77 89 0.00 0.57 26.20 25.63 f 0.00 15271 78 89 0.57 0.57 0.00 0.00 f 0.00 15272 79 89 0.57 0.57 0.00 0.00 f 0.00 15273 80 89 0.57 0.57 0.00 0.00 f 0.00 15274 81 89 0.57 0.57 0.00 0.00 f 0.00 15281 88 89 0.57 0.57 0.00 0.00 f 0.00 15285 92 89 0.57 0.57 0.00 0.00 f 0.00 19728 96 110 0.00 0.00 0.00 0.00 f 0.00 20728 107 113 1419999.99 1419999.99 0.00 0.00 f 0.00 17302 46 122 0.00 0.00 0.00 0.00 f 0.00 15291 32 90 22.00 22.00 0.00 0.00 f 0.00 15294 35 90 22.00 22.00 0.00 0.00 f 0.00 15295 36 90 22.00 41.00 22.00 3.00 f 0.00 15296 37 90 41.00 41.00 0.00 0.00 f 0.00 15297 38 90 41.00 41.00 0.00 0.00 f 0.00 20981 108 121 0.00 0.00 0.00 0.00 f 0.00 20982 109 121 0.00 0.00 0.00 0.00 f 0.00 20219 95 146 -790.49 -790.49 0.00 0.00 f 0.00 20220 96 146 -790.49 -790.49 0.00 0.00 f 0.00 20221 97 146 -790.49 -790.49 0.00 0.00 f 0.00 20232 96 147 0.00 0.00 0.00 0.00 f 0.00 20233 97 147 0.00 0.00 0.00 0.00 f 0.00 20234 98 147 0.00 0.00 0.00 0.00 f 0.00 20235 99 147 0.00 0.00 0.00 0.00 f 0.00 20236 100 147 0.00 0.00 0.00 0.00 f 0.00 20237 101 147 0.00 0.00 0.00 0.00 f 0.00 20238 102 147 0.00 0.00 0.00 0.00 f 0.00 20239 103 147 0.00 0.00 0.00 0.00 f 0.00 20240 104 147 0.00 0.00 0.00 0.00 f 0.00 15253 60 89 0.00 0.00 0.00 0.00 f 0.00 15256 63 89 0.00 0.00 0.00 0.00 f 0.00 15257 64 89 0.00 0.00 0.00 0.00 f 0.00 15258 65 89 0.00 0.00 0.00 0.00 f 0.00 15259 66 89 0.00 0.00 0.00 0.00 f 0.00 15260 67 89 0.00 0.00 0.00 0.00 f 0.00 15261 68 89 0.00 0.00 0.00 0.00 f 0.00 15354 32 91 0.00 0.00 0.00 0.00 f 0.00 15355 33 91 0.00 0.00 0.00 0.00 f 0.00 15408 89 91 1900.00 1900.00 0.00 0.00 f 0.00 15410 91 91 1900.00 1900.00 0.00 0.00 f 0.00 15411 92 91 1900.00 1900.00 0.00 0.00 f 0.00 15417 32 92 0.00 0.00 0.00 0.00 f 0.00 15420 35 92 0.00 0.00 0.00 0.00 f 0.00 15421 36 92 0.00 0.00 0.00 0.00 f 0.00 15423 38 92 0.00 0.00 0.00 0.00 f 0.00 15424 39 92 0.00 -94.00 0.00 94.00 f 0.00 15425 40 92 -94.00 -94.00 0.00 0.00 f 0.00 15426 41 92 -94.00 -94.00 0.00 0.00 f 0.00 16988 29 117 0.00 0.00 0.00 0.00 f 0.00 16989 28 117 0.00 0.00 0.00 0.00 f 0.00 17428 46 125 0.00 0.00 0.00 0.00 f 0.00 17491 46 126 0.00 0.00 0.00 0.00 f 0.00 21028 107 135 0.00 0.00 0.00 0.00 f 0.00 21029 108 135 0.00 0.00 0.00 0.00 f 0.00 21030 109 135 0.00 0.00 0.00 0.00 f 0.00 21031 110 135 0.00 0.00 0.00 0.00 f 0.00 21032 111 135 0.00 0.00 0.00 0.00 f 0.00 21033 112 135 0.00 0.00 0.00 0.00 f 0.00 21034 113 135 0.00 0.00 0.00 0.00 f 0.00 21035 114 135 0.00 0.00 0.00 0.00 f 0.00 21036 115 135 0.00 0.00 0.00 0.00 f 0.00 21037 116 135 0.00 0.00 0.00 0.00 f 0.00 21038 105 95 -870.00 -870.00 0.00 0.00 f 0.00 21039 106 95 -870.00 -870.00 0.00 0.00 f 0.00 21040 107 95 -870.00 -870.00 0.00 0.00 f 0.00 21041 108 95 -870.00 -870.00 0.00 0.00 f 0.00 21062 105 137 0.00 0.00 0.00 0.00 f 0.00 16957 63 116 5000.00 5000.00 0.00 0.00 f 0.00 16958 64 116 5000.00 5000.00 0.00 0.00 f 0.00 16959 65 116 5000.00 5000.00 0.00 0.00 f 0.00 16960 66 116 5000.00 5000.00 0.00 0.00 f 0.00 16961 67 116 5000.00 5000.00 0.00 0.00 f 0.00 21075 106 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21076 107 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21077 108 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21078 109 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21079 110 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21080 111 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21081 112 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21082 113 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21083 114 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21084 115 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21085 116 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21086 105 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21087 106 138 -70129.40 -70129.40 0.00 0.00 f 0.00 16452 62 108 -229997.31 -242734.38 0.00 12737.07 f 0.00 16453 63 108 -242734.38 -250437.78 0.00 7703.40 f 0.00 16459 69 108 0.00 -7728.52 0.00 7728.52 f 0.00 16460 70 108 -7728.52 -52978.52 0.00 45250.00 f 0.00 16461 71 108 -52978.52 -98805.10 0.00 45826.58 f 0.00 16546 46 110 0.00 0.00 0.00 0.00 f 0.00 16553 34 110 0.00 0.00 0.00 0.00 f 0.00 16554 35 110 0.00 0.00 0.00 0.00 f 0.00 16555 36 110 0.00 0.00 0.00 0.00 f 0.00 16607 91 110 0.00 0.00 0.00 0.00 f 0.00 16608 92 110 0.00 0.00 0.00 0.00 f 0.00 16613 31 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16619 37 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16750 42 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16779 74 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16780 75 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16781 76 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16783 78 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19698 102 136 0.00 0.00 0.00 0.00 f 0.00 19699 103 136 0.00 0.00 0.00 0.00 f 0.00 19700 104 136 0.00 0.00 0.00 0.00 f 0.00 19701 93 104 0.00 0.00 0.00 0.00 f 0.00 19702 94 104 0.00 0.00 0.00 0.00 f 0.00 19703 95 104 0.00 0.00 0.00 0.00 f 0.00 19704 96 104 0.00 0.00 0.00 0.00 f 0.00 19705 97 104 0.00 0.00 0.00 0.00 f 0.00 19706 98 104 0.00 0.00 0.00 0.00 f 0.00 19707 99 104 0.00 0.00 0.00 0.00 f 0.00 19708 100 104 0.00 0.00 0.00 0.00 f 0.00 19709 101 104 0.00 0.00 0.00 0.00 f 0.00 19710 102 104 0.00 0.00 0.00 0.00 f 0.00 19711 103 104 0.00 0.00 0.00 0.00 f 0.00 19712 104 104 0.00 0.00 0.00 0.00 f 0.00 19713 93 107 0.00 0.00 0.00 0.00 f 0.00 19714 94 107 0.00 0.00 0.00 0.00 f 0.00 19715 95 107 0.00 0.00 0.00 0.00 f 0.00 19716 96 107 0.00 0.00 0.00 0.00 f 0.00 19736 104 110 0.00 0.00 0.00 0.00 f 0.00 19831 103 94 20216.12 20216.12 0.00 0.00 f 0.00 19832 104 94 20216.12 20216.12 0.00 0.00 f 0.00 19833 93 125 0.00 0.00 0.00 0.00 f 0.00 19834 94 125 0.00 0.00 0.00 0.00 f 0.00 19835 95 125 0.00 0.00 0.00 0.00 f 0.00 19836 96 125 0.00 0.00 0.00 0.00 f 0.00 19837 97 125 0.00 0.00 0.00 0.00 f 0.00 19838 98 125 0.00 0.00 0.00 0.00 f 0.00 19839 99 125 0.00 0.00 0.00 0.00 f 0.00 19840 100 125 0.00 0.00 0.00 0.00 f 0.00 19841 101 125 0.00 0.00 0.00 0.00 f 0.00 19842 102 125 0.00 0.00 0.00 0.00 f 0.00 19843 103 125 0.00 0.00 0.00 0.00 f 0.00 16110 32 103 11194.54 61194.54 50000.00 0.00 f 0.00 16111 33 103 61194.54 116194.54 55000.00 0.00 f 0.00 16112 34 103 116194.54 191194.54 75000.00 0.00 f 0.00 16113 35 103 191194.54 591194.54 400000.00 0.00 f 0.00 16114 36 103 591194.54 1044094.54 452900.00 0.00 f 0.00 16115 37 103 1044094.54 1547594.54 503500.00 0.00 f 0.00 16116 38 103 1547594.54 1597594.54 50000.00 0.00 f 0.00 16117 39 103 1597594.54 1698544.54 100950.00 0.00 f 0.00 16118 40 103 1698544.54 1748544.54 50000.00 0.00 f 0.00 16119 41 103 1748544.54 1850483.64 101939.10 0.00 f 0.00 16120 42 103 0.00 50989.10 50989.10 0.00 f 0.00 18437 29 141 0.00 0.00 0.00 0.00 f 0.00 20174 98 141 371138.43 733038.42 361899.99 0.00 f 0.00 20175 99 141 733038.42 733038.42 0.00 0.00 f 0.00 21146 105 141 0.00 0.00 0.00 0.00 f 0.00 21147 106 141 0.00 0.00 0.00 0.00 f 0.00 21148 107 141 0.00 0.00 0.00 0.00 f 0.00 21149 108 141 0.00 0.00 0.00 0.00 f 0.00 21150 109 141 0.00 0.00 0.00 0.00 f 0.00 21151 110 141 0.00 0.00 0.00 0.00 f 0.00 21152 111 141 0.00 0.00 0.00 0.00 f 0.00 21153 112 141 0.00 0.00 0.00 0.00 f 0.00 21154 113 141 0.00 0.00 0.00 0.00 f 0.00 21155 114 141 0.00 0.00 0.00 0.00 f 0.00 21156 115 141 0.00 0.00 0.00 0.00 f 0.00 21157 116 141 0.00 0.00 0.00 0.00 f 0.00 21158 105 142 0.00 0.00 0.00 0.00 f 0.00 21159 106 142 0.00 0.00 0.00 0.00 f 0.00 21160 107 142 0.00 0.00 0.00 0.00 f 0.00 21161 108 142 0.00 0.00 0.00 0.00 f 0.00 21162 109 142 0.00 0.00 0.00 0.00 f 0.00 21163 110 142 0.00 0.00 0.00 0.00 f 0.00 21164 111 142 0.00 0.00 0.00 0.00 f 0.00 21165 112 142 0.00 0.00 0.00 0.00 f 0.00 21166 113 142 0.00 0.00 0.00 0.00 f 0.00 21167 114 142 0.00 0.00 0.00 0.00 f 0.00 21168 115 142 0.00 0.00 0.00 0.00 f 0.00 21169 116 142 0.00 0.00 0.00 0.00 f 0.00 17932 46 133 0.00 0.00 0.00 0.00 f 0.00 17429 29 125 0.00 0.00 0.00 0.00 f 0.00 17430 28 125 0.00 0.00 0.00 0.00 f 0.00 16003 54 101 189.00 189.00 0.00 0.00 f 0.00 16004 55 101 189.00 189.00 0.00 0.00 f 0.00 16005 56 101 189.00 247.61 58.61 0.00 f 0.00 16006 57 101 0.00 0.00 0.00 0.00 f 0.00 16007 58 101 0.00 0.00 0.00 0.00 f 0.00 16015 66 101 1698.73 2264.13 565.40 0.00 f 0.00 16017 68 101 2264.13 3266.45 1002.32 0.00 f 0.00 16018 69 101 0.00 159.60 159.60 0.00 f 0.00 16020 71 101 159.60 159.60 0.00 0.00 f 0.00 16021 72 101 159.60 159.60 0.00 0.00 f 0.00 19929 93 100 100.00 100.00 0.00 0.00 f 0.00 19645 97 143 0.00 0.00 0.00 0.00 f 0.00 19646 98 143 0.00 0.00 0.00 0.00 f 0.00 19647 99 143 0.00 0.00 0.00 0.00 f 0.00 19648 100 143 0.00 0.00 0.00 0.00 f 0.00 19649 101 143 0.00 0.00 0.00 0.00 f 0.00 16173 32 104 0.00 0.00 0.00 0.00 f 0.00 17555 29 127 0.00 0.00 0.00 0.00 f 0.00 17556 28 127 0.00 0.00 0.00 0.00 f 0.00 20049 93 135 0.00 0.00 0.00 0.00 f 0.00 20050 94 135 0.00 0.00 0.00 0.00 f 0.00 20051 95 135 0.00 0.00 0.00 0.00 f 0.00 20052 96 135 0.00 0.00 0.00 0.00 f 0.00 20053 97 135 0.00 0.00 0.00 0.00 f 0.00 20054 98 135 0.00 0.00 0.00 0.00 f 0.00 20055 99 135 0.00 0.00 0.00 0.00 f 0.00 21206 105 147 0.00 0.00 0.00 0.00 f 0.00 18881 31 148 0.00 0.00 0.00 0.00 f 0.00 18882 32 148 0.00 0.00 0.00 0.00 f 0.00 18883 33 148 0.00 0.00 0.00 0.00 f 0.00 18893 43 148 0.00 0.00 0.00 0.00 f 0.00 18898 51 148 0.00 0.00 0.00 0.00 f 0.00 18899 52 148 0.00 0.00 0.00 0.00 f 0.00 18900 53 148 0.00 0.00 0.00 0.00 f 0.00 18901 54 148 0.00 0.00 0.00 0.00 f 0.00 18902 55 148 0.00 0.00 0.00 0.00 f 0.00 18903 56 148 0.00 0.00 0.00 0.00 f 0.00 18904 57 148 0.00 0.00 0.00 0.00 f 0.00 18905 58 148 0.00 0.00 0.00 0.00 f 0.00 18919 72 148 0.00 0.00 0.00 0.00 f 0.00 18920 73 148 0.00 0.00 0.00 0.00 f 0.00 18925 78 148 -33.39 -135.93 0.00 102.54 f 0.00 18926 79 148 -135.93 -135.93 0.00 0.00 f 0.00 20241 93 148 0.00 0.00 0.00 0.00 f 0.00 18985 75 149 0.00 0.00 0.00 0.00 f 0.00 18989 79 149 0.00 0.00 0.00 0.00 f 0.00 18993 83 149 0.00 0.00 0.00 0.00 f 0.00 20253 93 149 0.00 0.00 0.00 0.00 f 0.00 20254 94 149 0.00 0.00 0.00 0.00 f 0.00 20255 95 149 0.00 0.00 0.00 0.00 f 0.00 20256 96 149 0.00 0.00 0.00 0.00 f 0.00 20257 97 149 0.00 0.00 0.00 0.00 f 0.00 21236 111 149 0.00 0.00 0.00 0.00 f 0.00 21237 112 149 0.00 0.00 0.00 0.00 f 0.00 21238 113 149 0.00 0.00 0.00 0.00 f 0.00 21239 114 149 0.00 0.00 0.00 0.00 f 0.00 21240 115 149 0.00 0.00 0.00 0.00 f 0.00 21241 116 149 0.00 0.00 0.00 0.00 f 0.00 14832 48 150 0.00 0.00 0.00 0.00 f 0.00 19014 38 150 0.00 0.00 0.00 0.00 f 0.00 19027 54 150 0.00 0.00 0.00 0.00 f 0.00 19028 55 150 0.00 0.00 0.00 0.00 f 0.00 19029 56 150 0.00 0.00 0.00 0.00 f 0.00 19044 71 150 0.00 0.00 0.00 0.00 f 0.00 19055 82 150 0.00 0.00 0.00 0.00 f 0.00 19056 83 150 0.00 0.00 0.00 0.00 f 0.00 20265 93 150 0.00 0.00 0.00 0.00 f 0.00 20266 94 150 0.00 0.00 0.00 0.00 f 0.00 20267 95 150 0.00 0.00 0.00 0.00 f 0.00 20268 96 150 0.00 0.00 0.00 0.00 f 0.00 20269 97 150 0.00 0.00 0.00 0.00 f 0.00 20270 98 150 0.00 0.00 0.00 0.00 f 0.00 18121 46 136 0.00 0.00 0.00 0.00 f 0.00 16299 32 106 0.00 0.00 0.00 0.00 f 0.00 16305 38 106 0.00 0.00 0.00 0.00 f 0.00 16306 39 106 0.00 0.00 1042.50 1042.50 f 0.00 16307 40 106 0.00 0.00 0.00 0.00 f 0.00 17681 29 129 0.00 0.00 0.00 0.00 f 0.00 17682 28 129 0.00 0.00 0.00 0.00 f 0.00 18058 46 135 0.00 0.00 0.00 0.00 f 0.00 16290 89 105 631.35 631.35 0.00 0.00 f 0.00 16291 90 105 631.35 631.35 0.00 0.00 f 0.00 16292 91 105 631.35 631.35 0.00 0.00 f 0.00 16293 92 105 631.35 631.35 0.00 0.00 f 0.00 18983 73 149 0.00 0.00 0.00 0.00 f 0.00 18984 74 149 0.00 0.00 0.00 0.00 f 0.00 16425 32 108 -3872.99 -18872.99 0.00 15000.00 f 0.00 16426 33 108 -18872.99 -33872.99 0.00 15000.00 f 0.00 16462 72 108 -98805.10 -144055.10 0.00 45250.00 f 0.00 16463 73 108 -144055.10 -195055.10 0.00 51000.00 f 0.00 16464 74 108 -195055.10 -242872.90 0.00 47817.80 f 0.00 16465 75 108 -242872.90 -288122.90 0.00 45250.00 f 0.00 16466 76 108 -288122.90 -313756.90 0.00 25634.00 f 0.00 16467 77 108 -313756.90 -371912.02 0.00 58155.12 f 0.00 16468 78 108 -371912.02 -393027.22 0.00 21115.20 f 0.00 16469 79 108 -393027.22 -438277.22 0.00 45250.00 f 0.00 16470 80 108 -438277.22 -463911.22 0.00 25634.00 f 0.00 16471 81 108 0.00 -45250.00 0.00 45250.00 f 0.00 16472 82 108 -45250.00 -90500.00 0.00 45250.00 f 0.00 16473 83 108 -90500.00 -115076.22 0.00 24576.22 f 0.00 16474 84 108 -115076.22 -182326.22 0.00 67250.00 f 0.00 16475 85 108 -182326.22 -227576.22 0.00 45250.00 f 0.00 17807 29 131 0.00 0.00 0.00 0.00 f 0.00 17808 28 131 0.00 0.00 0.00 0.00 f 0.00 18184 46 137 0.00 0.00 0.00 0.00 f 0.00 18247 46 138 0.00 0.00 0.00 0.00 f 0.00 16476 86 108 -227576.22 -271576.22 0.00 44000.00 f 0.00 16477 87 108 -271576.22 -277984.72 0.00 6408.50 f 0.00 16478 88 108 -277984.72 -284393.22 0.00 6408.50 f 0.00 16479 89 108 -284393.22 -508027.22 0.00 223634.00 f 0.00 16480 90 108 -508027.22 -598527.22 0.00 90500.00 f 0.00 16481 91 108 -598527.22 -653783.56 0.00 55256.34 f 0.00 16482 92 108 -653783.56 -675783.56 0.00 22000.00 f 0.00 16551 32 110 0.00 0.00 0.00 0.00 f 0.00 16492 36 109 -1250441.40 -1453498.40 250074.00 453131.00 f 0.00 17933 29 133 0.00 0.00 0.00 0.00 f 0.00 17934 28 133 0.00 0.00 0.00 0.00 f 0.00 16580 64 110 0.00 0.00 0.00 0.00 f 0.00 16581 65 110 0.00 0.00 0.00 0.00 f 0.00 16582 66 110 0.00 0.00 0.00 0.00 f 0.00 16583 67 110 0.00 0.00 0.00 0.00 f 0.00 16584 68 110 0.00 0.00 0.00 0.00 f 0.00 16585 69 110 0.00 0.00 0.00 0.00 f 0.00 16586 70 110 0.00 0.00 0.00 0.00 f 0.00 16614 32 111 -1000.00 -1000.00 0.00 0.00 f 0.00 18310 46 139 0.00 0.00 0.00 0.00 f 0.00 18373 46 140 0.00 0.00 0.00 0.00 f 0.00 18436 46 141 0.00 0.00 0.00 0.00 f 0.00 21307 110 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21308 111 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21309 112 155 -1014.64 -1014.64 0.00 0.00 f 0.00 16880 49 115 0.00 0.00 0.00 0.00 f 0.00 16881 50 115 0.00 0.00 0.00 0.00 f 0.00 16883 52 115 0.00 0.00 0.00 0.00 f 0.00 16884 53 115 0.00 0.00 0.00 0.00 f 0.00 16888 57 115 0.00 0.00 0.00 0.00 f 0.00 16892 61 115 0.00 0.00 0.00 0.00 f 0.00 16893 62 115 0.00 0.00 0.00 0.00 f 0.00 16894 63 115 0.00 0.00 0.00 0.00 f 0.00 16895 64 115 0.00 0.00 0.00 0.00 f 0.00 16897 66 115 0.00 0.00 0.00 0.00 f 0.00 16786 81 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16787 82 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16788 83 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16789 84 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16790 85 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16791 86 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16792 87 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16793 88 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16794 89 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16795 90 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16796 91 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16797 92 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16962 68 116 5000.00 5000.00 0.00 0.00 f 0.00 16966 72 116 5000.00 5000.00 0.00 0.00 f 0.00 16983 89 116 40000.00 40000.00 0.00 0.00 f 0.00 16984 90 116 40000.00 40000.00 0.00 0.00 f 0.00 16985 91 116 40000.00 40000.00 0.00 0.00 f 0.00 14728 48 97 0.00 0.00 0.00 0.00 f 0.00 15733 33 97 -1010.00 -1010.00 0.00 0.00 f 0.00 15734 34 97 -1010.00 -1010.00 0.00 0.00 f 0.00 15735 35 97 -1010.00 -1010.00 0.00 0.00 f 0.00 16994 34 117 0.00 0.00 0.00 0.00 f 0.00 14770 48 118 0.00 0.00 0.00 0.00 f 0.00 17051 29 118 0.00 0.00 0.00 0.00 f 0.00 17052 28 118 0.00 0.00 0.00 0.00 f 0.00 17073 53 118 0.00 0.00 0.00 0.00 f 0.00 17074 54 118 0.00 0.00 0.00 0.00 f 0.00 17075 55 118 0.00 0.00 0.00 0.00 f 0.00 17076 56 118 0.00 0.01 0.01 0.00 f 0.00 17077 57 118 0.00 0.00 0.00 0.00 f 0.00 17078 58 118 0.00 0.00 0.00 0.00 f 0.00 17079 59 118 0.00 0.00 0.00 0.00 f 0.00 20398 94 158 0.00 0.00 0.00 0.00 f 0.00 20399 95 158 0.00 0.00 0.00 0.00 f 0.00 20400 96 158 0.00 -1400.00 0.00 1400.00 f 0.00 20401 97 158 -1400.00 -1400.00 0.00 0.00 f 0.00 20402 98 158 -1400.00 -1400.00 0.00 0.00 f 0.00 20403 99 158 -1400.00 -1400.00 0.00 0.00 f 0.00 20404 100 158 -1400.00 -1400.00 0.00 0.00 f 0.00 20405 101 158 -1400.00 -1400.00 0.00 0.00 f 0.00 20406 102 158 -1400.00 -1400.00 0.00 0.00 f 0.00 20407 103 158 -1400.00 -1400.00 0.00 0.00 f 0.00 20408 104 158 -1400.00 -1400.00 0.00 0.00 f 0.00 21374 105 158 0.00 0.00 0.00 0.00 f 0.00 21375 106 158 0.00 0.00 0.00 0.00 f 0.00 21376 107 158 0.00 0.00 0.00 0.00 f 0.00 21377 108 158 0.00 0.00 0.00 0.00 f 0.00 21378 109 158 0.00 0.00 0.00 0.00 f 0.00 19444 47 158 0.00 0.00 0.00 0.00 f 0.00 20435 39 160 0.00 0.00 0.00 0.00 f 0.00 20436 40 160 0.00 0.00 0.00 0.00 f 0.00 16932 35 116 5000.00 5000.00 0.00 0.00 f 0.00 16933 36 116 5000.00 5000.00 0.00 0.00 f 0.00 16934 37 116 5000.00 5000.00 0.00 0.00 f 0.00 16935 38 116 5000.00 5000.00 0.00 0.00 f 0.00 15596 88 94 15047.78 15047.78 0.00 0.00 f 0.00 15597 89 94 15047.78 19299.24 4251.46 0.00 f 0.00 15598 90 94 19299.24 19299.24 0.00 0.00 f 0.00 15599 91 94 19299.24 19344.78 45.54 0.00 f 0.00 15600 92 94 19344.78 19344.78 0.00 0.00 f 0.00 16483 46 109 6000.00 -16000.00 0.00 22000.00 f 0.00 16527 74 109 -3121729.35 -3098783.35 150196.00 127250.00 f 0.00 16528 75 109 -3098783.35 -3126033.35 50000.00 77250.00 f 0.00 16529 76 109 -3126033.35 -3194770.35 47138.00 115875.00 f 0.00 20822 105 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20823 106 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20824 107 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20825 108 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20826 109 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20827 110 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20828 111 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20829 112 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20830 113 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20831 114 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20832 115 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20833 116 126 -103372.61 -103372.61 0.00 0.00 f 0.00 17554 46 127 0.00 0.00 0.00 0.00 f 0.00 20836 107 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20837 108 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20838 109 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20839 110 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20840 111 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20841 112 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20842 113 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20843 114 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20844 115 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 20845 116 127 -1456338.03 -1456338.03 0.00 0.00 f 0.00 14933 55 84 1202787.24 1202787.24 0.00 0.00 f 0.00 17352 80 122 51380.00 70130.00 18750.00 0.00 f 0.00 16677 32 112 0.00 0.00 0.00 0.00 f 0.00 16678 33 112 0.00 0.00 0.00 0.00 f 0.00 16679 34 112 0.00 0.00 0.00 0.00 f 0.00 16680 35 112 0.00 0.00 0.00 0.00 f 0.00 16681 36 112 0.00 0.00 0.00 0.00 f 0.00 16682 37 112 0.00 0.00 0.00 0.00 f 0.00 16683 38 112 0.00 0.00 0.00 0.00 f 0.00 16684 39 112 0.00 0.00 0.00 0.00 f 0.00 20602 113 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20300 104 134 0.00 0.00 0.00 0.00 f 0.00 16816 45 114 0.00 0.00 0.00 0.00 f 0.00 16847 79 114 110000.00 110000.00 0.00 0.00 f 0.00 16848 80 114 110000.00 110000.00 0.00 0.00 f 0.00 14761 47 114 0.00 0.00 0.00 0.00 f 0.00 14738 48 102 0.00 0.00 0.00 0.00 f 0.00 16047 32 102 598.54 598.54 0.00 0.00 f 0.00 16048 33 102 598.54 598.54 0.00 0.00 f 0.00 16049 34 102 598.54 598.54 0.00 0.00 f 0.00 16050 35 102 598.54 598.54 0.00 0.00 f 0.00 16051 36 102 598.54 598.54 0.00 0.00 f 0.00 20627 114 143 0.00 0.00 0.00 0.00 f 0.00 20628 115 143 0.00 0.00 0.00 0.00 f 0.00 20629 116 143 0.00 0.00 0.00 0.00 f 0.00 20442 49 160 0.00 0.00 0.00 0.00 f 0.00 20443 50 160 0.00 0.00 0.00 0.00 f 0.00 20444 51 160 0.00 0.00 0.00 0.00 f 0.00 20445 52 160 0.00 0.00 0.00 0.00 f 0.00 20446 53 160 0.00 0.00 0.00 0.00 f 0.00 20447 54 160 0.00 0.00 0.00 0.00 f 0.00 17039 82 117 0.00 0.00 0.00 0.00 f 0.00 17043 86 117 0.00 0.00 0.00 0.00 f 0.00 17044 87 117 0.00 0.00 0.00 0.00 f 0.00 17045 88 117 0.00 0.00 0.00 0.00 f 0.00 17046 89 117 0.00 0.00 0.00 0.00 f 0.00 17047 90 117 0.00 0.00 0.00 0.00 f 0.00 17055 32 118 0.00 0.00 0.00 0.00 f 0.00 17058 35 118 0.00 0.00 0.00 0.00 f 0.00 17059 36 118 0.00 0.00 0.00 0.00 f 0.00 17060 37 118 0.00 0.00 0.00 0.00 f 0.00 17061 38 118 0.00 0.00 0.00 0.00 f 0.00 17062 39 118 0.00 0.00 0.00 0.00 f 0.00 17063 40 118 0.00 0.00 0.00 0.00 f 0.00 16804 33 114 0.00 0.00 0.00 0.00 f 0.00 16805 34 114 0.00 0.00 0.00 0.00 f 0.00 16810 39 114 0.00 0.00 0.00 0.00 f 0.00 16812 41 114 0.00 0.00 0.00 0.00 f 0.00 16813 42 114 0.00 0.00 0.00 0.00 f 0.00 16814 43 114 0.00 0.00 0.00 0.00 f 0.00 16815 44 114 0.00 0.00 0.00 0.00 f 0.00 19729 97 110 0.00 0.00 0.00 0.00 f 0.00 19730 98 110 0.00 0.00 0.00 0.00 f 0.00 19731 99 110 0.00 0.00 0.00 0.00 f 0.00 19732 100 110 0.00 0.00 0.00 0.00 f 0.00 19733 101 110 0.00 0.00 0.00 0.00 f 0.00 19734 102 110 0.00 0.00 0.00 0.00 f 0.00 19735 103 110 0.00 0.00 0.00 0.00 f 0.00 20702 105 110 0.00 0.00 0.00 0.00 f 0.00 20703 106 110 0.00 0.00 0.00 0.00 f 0.00 20704 107 110 0.00 0.00 0.00 0.00 f 0.00 20705 108 110 0.00 0.00 0.00 0.00 f 0.00 20706 109 110 0.00 0.00 0.00 0.00 f 0.00 20707 110 110 0.00 0.00 0.00 0.00 f 0.00 20708 111 110 0.00 0.00 0.00 0.00 f 0.00 20709 112 110 0.00 0.00 0.00 0.00 f 0.00 20729 108 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20730 109 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20731 110 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20732 111 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20733 112 113 1419999.99 1419999.99 0.00 0.00 f 0.00 20734 113 113 1419999.99 1419999.99 0.00 0.00 f 0.00 17126 40 119 0.00 0.00 0.00 0.00 f 0.00 17127 41 119 0.00 0.00 0.00 0.00 f 0.00 17128 42 119 0.00 -1000.00 0.00 1000.00 f 0.00 17129 43 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17130 44 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17172 89 119 0.00 0.00 0.00 0.00 f 0.00 17173 90 119 0.00 0.00 0.00 0.00 f 0.00 17174 91 119 0.00 0.00 0.00 0.00 f 0.00 17175 92 119 0.00 0.00 0.00 0.00 f 0.00 20789 108 119 0.00 0.00 0.00 0.00 f 0.00 20790 109 119 0.00 0.00 0.00 0.00 f 0.00 20791 110 119 0.00 0.00 0.00 0.00 f 0.00 20792 111 119 0.00 0.00 0.00 0.00 f 0.00 20793 112 119 0.00 0.00 0.00 0.00 f 0.00 20794 113 119 0.00 0.00 0.00 0.00 f 0.00 20795 114 119 0.00 0.00 0.00 0.00 f 0.00 20796 115 119 0.00 0.00 0.00 0.00 f 0.00 20797 116 119 0.00 0.00 0.00 0.00 f 0.00 19821 93 94 19344.78 19344.78 0.00 0.00 f 0.00 19822 94 94 19344.78 19344.78 0.00 0.00 f 0.00 19823 95 94 19344.78 19344.78 0.00 0.00 f 0.00 19824 96 94 19344.78 20177.62 832.84 0.00 f 0.00 19825 97 94 20177.62 20177.62 0.00 0.00 f 0.00 19826 98 94 20177.62 20216.12 38.50 0.00 f 0.00 19827 99 94 20216.12 20216.12 0.00 0.00 f 0.00 20798 105 94 20216.12 20216.12 0.00 0.00 f 0.00 20799 106 94 20216.12 20216.12 0.00 0.00 f 0.00 20800 107 94 20216.12 20216.12 0.00 0.00 f 0.00 20801 108 94 20216.12 20216.12 0.00 0.00 f 0.00 20802 109 94 20216.12 20216.12 0.00 0.00 f 0.00 20803 110 94 20216.12 20216.12 0.00 0.00 f 0.00 20804 111 94 20216.12 20216.12 0.00 0.00 f 0.00 20805 112 94 20216.12 20216.12 0.00 0.00 f 0.00 19749 93 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19750 94 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19751 95 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19752 96 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19753 97 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19754 98 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19755 99 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19756 100 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19757 101 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19758 102 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19759 103 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19760 104 113 1419999.99 1419999.99 0.00 0.00 f 0.00 19761 93 116 40000.00 40000.00 0.00 0.00 f 0.00 19762 94 116 40000.00 40000.00 0.00 0.00 f 0.00 19763 95 116 40000.00 40000.00 0.00 0.00 f 0.00 17433 32 125 0.00 0.00 0.00 0.00 f 0.00 17436 35 125 0.00 0.00 0.00 0.00 f 0.00 17437 36 125 0.00 0.00 0.00 0.00 f 0.00 17438 37 125 0.00 0.00 0.00 0.00 f 0.00 17439 38 125 0.00 0.00 0.00 0.00 f 0.00 17440 39 125 0.00 0.00 0.00 0.00 f 0.00 17441 40 125 0.00 0.00 0.00 0.00 f 0.00 17442 41 125 0.00 0.00 0.00 0.00 f 0.00 17444 43 125 0.00 0.00 0.00 0.00 f 0.00 17446 45 125 0.00 0.00 0.00 0.00 f 0.00 17450 52 125 0.00 0.00 0.00 0.00 f 0.00 19737 93 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19738 94 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19739 95 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19740 96 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19741 97 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19742 98 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19743 99 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19744 100 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19745 101 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19746 102 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19747 103 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19748 104 111 -145999.79 -145999.79 0.00 0.00 f 0.00 19764 96 116 40000.00 40000.00 0.00 0.00 f 0.00 19765 97 116 40000.00 40000.00 0.00 0.00 f 0.00 19766 98 116 40000.00 40000.00 0.00 0.00 f 0.00 19767 99 116 40000.00 40000.00 0.00 0.00 f 0.00 19768 100 116 40000.00 40000.00 0.00 0.00 f 0.00 19769 101 116 40000.00 40000.00 0.00 0.00 f 0.00 19770 102 116 40000.00 40000.00 0.00 0.00 f 0.00 19771 103 116 40000.00 40000.00 0.00 0.00 f 0.00 19772 104 116 40000.00 40000.00 0.00 0.00 f 0.00 15727 46 97 0.00 0.00 0.00 0.00 f 0.00 15732 32 97 -1010.00 -1010.00 0.00 0.00 f 0.00 15736 36 97 -1010.00 -1010.00 0.00 0.00 f 0.00 15737 37 97 -1010.00 -3498.78 0.00 2488.78 f 0.00 19773 93 97 0.00 0.00 0.00 0.00 f 0.00 19774 94 97 0.00 0.00 0.00 0.00 f 0.00 17575 51 127 -53877.21 -53877.21 0.00 0.00 f 0.00 17576 52 127 -53877.21 -72427.33 0.00 18550.12 f 0.00 17577 53 127 -72427.33 -72427.33 0.00 0.00 f 0.00 17578 54 127 -72427.33 -72427.33 0.00 0.00 f 0.00 17579 55 127 -72427.33 -72427.33 0.00 0.00 f 0.00 17580 56 127 -72427.33 -127096.28 0.00 54668.95 f 0.00 17581 57 127 -127096.28 -127096.28 0.00 0.00 f 0.00 17582 58 127 -127096.28 -127096.28 0.00 0.00 f 0.00 17583 59 127 -127096.28 -127096.28 0.00 0.00 f 0.00 17586 62 127 -141892.83 -226735.14 0.00 84842.31 f 0.00 17587 63 127 -226735.14 -226735.14 0.00 0.00 f 0.00 17588 64 127 -226735.14 -226735.14 0.00 0.00 f 0.00 17592 68 127 -271111.78 -485647.96 0.00 214536.18 f 0.00 17593 69 127 -485647.96 -517460.40 0.00 31812.44 f 0.00 17594 70 127 -517460.40 -517460.40 0.00 0.00 f 0.00 19884 96 112 0.00 0.00 0.00 0.00 f 0.00 19885 97 112 0.00 0.00 0.00 0.00 f 0.00 19886 98 112 0.00 0.00 0.00 0.00 f 0.00 19887 99 112 0.00 0.00 0.00 0.00 f 0.00 19888 100 112 0.00 0.00 0.00 0.00 f 0.00 19889 101 112 0.00 0.00 0.00 0.00 f 0.00 19890 102 112 0.00 0.00 0.00 0.00 f 0.00 19891 103 112 0.00 0.00 0.00 0.00 f 0.00 19892 104 112 0.00 0.00 0.00 0.00 f 0.00 16016 67 101 2264.13 2264.13 0.00 0.00 f 0.00 16022 73 101 159.60 159.60 0.00 0.00 f 0.00 17685 32 129 0.00 0.00 0.00 0.00 f 0.00 17622 32 128 0.00 0.00 0.00 0.00 f 0.00 18626 29 144 0.00 0.00 0.00 0.00 f 0.00 18627 28 144 0.00 0.00 0.00 0.00 f 0.00 18689 29 145 0.00 0.00 0.00 0.00 f 0.00 18761 37 146 0.00 0.00 0.00 0.00 f 0.00 18762 38 146 0.00 0.00 0.00 0.00 f 0.00 19775 95 97 0.00 0.00 0.00 0.00 f 0.00 19776 96 97 0.00 0.00 0.00 0.00 f 0.00 19777 97 97 0.00 0.00 0.00 0.00 f 0.00 19778 98 97 0.00 0.00 0.00 0.00 f 0.00 19779 99 97 0.00 0.00 0.00 0.00 f 0.00 19780 100 97 0.00 0.00 0.00 0.00 f 0.00 19781 101 97 0.00 0.00 0.00 0.00 f 0.00 19782 102 97 0.00 0.00 0.00 0.00 f 0.00 19783 103 97 0.00 0.00 0.00 0.00 f 0.00 19784 104 97 0.00 0.00 0.00 0.00 f 0.00 19785 93 117 0.00 0.00 0.00 0.00 f 0.00 19786 94 117 0.00 0.00 0.00 0.00 f 0.00 19787 95 117 0.00 784.51 856.34 71.83 f 0.00 19788 96 117 784.51 1228.17 443.66 0.00 f 0.00 19789 97 117 1228.17 1228.17 0.00 0.00 f 0.00 19790 98 117 1228.17 1228.17 0.00 0.00 f 0.00 16023 74 101 159.60 863.60 704.00 0.00 f 0.00 16025 76 101 863.60 1825.60 962.00 0.00 f 0.00 20870 105 101 0.00 0.00 0.00 0.00 f 0.00 20871 106 101 0.00 0.00 0.00 0.00 f 0.00 14712 48 89 0.00 0.00 0.00 0.00 f 0.00 15229 33 89 0.00 0.00 0.00 0.00 f 0.00 15230 34 89 0.00 0.00 0.00 0.00 f 0.00 15231 35 89 0.00 0.00 0.00 0.00 f 0.00 15232 36 89 0.00 0.00 0.00 0.00 f 0.00 15233 37 89 0.00 0.00 0.00 0.00 f 0.00 15234 38 89 0.00 0.00 0.00 0.00 f 0.00 15235 39 89 0.00 0.00 0.00 0.00 f 0.00 17937 32 133 0.00 0.00 0.00 0.00 f 0.00 19912 100 96 0.00 0.00 0.00 0.00 f 0.00 19913 101 96 0.00 0.00 0.00 0.00 f 0.00 19914 102 96 0.00 0.00 0.00 0.00 f 0.00 19915 103 96 0.00 0.00 0.00 0.00 f 0.00 19916 104 96 0.00 0.00 0.00 0.00 f 0.00 19917 93 87 45336.48 45336.48 0.00 0.00 f 0.00 19918 94 87 45336.48 45336.48 0.00 0.00 f 0.00 19919 95 87 45336.48 45336.48 0.00 0.00 f 0.00 19920 96 87 45336.48 0.00 1497.31 46833.79 f 0.00 19921 97 87 0.00 0.00 0.00 0.00 f 0.00 19943 95 90 -3989.69 -3989.69 0.00 0.00 f 0.00 19944 96 90 -3989.69 0.00 3989.69 0.00 f 0.00 19945 97 90 0.00 0.00 0.00 0.00 f 0.00 19946 98 90 0.00 0.00 0.00 0.00 f 0.00 19947 99 90 0.00 0.00 0.00 0.00 f 0.00 19948 100 90 0.00 0.00 0.00 0.00 f 0.00 19949 101 90 0.00 0.00 0.00 0.00 f 0.00 19950 102 90 0.00 0.00 0.00 0.00 f 0.00 19951 103 90 0.00 0.00 0.00 0.00 f 0.00 19952 104 90 0.00 0.00 0.00 0.00 f 0.00 20918 105 90 0.00 0.00 0.00 0.00 f 0.00 20919 106 90 0.00 0.00 0.00 0.00 f 0.00 17874 32 132 0.00 0.00 0.00 0.00 f 0.00 17895 56 132 200.00 200.00 0.00 0.00 f 0.00 17896 57 132 200.00 200.00 0.00 0.00 f 0.00 17897 58 132 200.00 200.00 0.00 0.00 f 0.00 17898 59 132 200.00 200.00 0.00 0.00 f 0.00 17899 60 132 200.00 200.00 0.00 0.00 f 0.00 17900 61 132 200.00 200.00 0.00 0.00 f 0.00 17901 62 132 200.00 200.00 0.00 0.00 f 0.00 17902 63 132 200.00 200.00 0.00 0.00 f 0.00 17903 64 132 200.00 200.00 0.00 0.00 f 0.00 17904 65 132 200.00 200.00 0.00 0.00 f 0.00 17905 66 132 200.00 200.00 0.00 0.00 f 0.00 17906 67 132 200.00 200.00 0.00 0.00 f 0.00 17907 68 132 200.00 200.00 0.00 0.00 f 0.00 19018 42 150 0.00 0.00 0.00 0.00 f 0.00 19019 43 150 0.00 0.00 0.00 0.00 f 0.00 19020 44 150 0.00 0.00 0.00 0.00 f 0.00 19021 45 150 0.00 0.00 0.00 0.00 f 0.00 19022 49 150 0.00 0.00 0.00 0.00 f 0.00 19023 50 150 0.00 0.00 0.00 0.00 f 0.00 19024 51 150 0.00 0.00 0.00 0.00 f 0.00 15452 70 92 0.00 0.00 0.00 0.00 f 0.00 15453 71 92 0.00 0.00 0.00 0.00 f 0.00 15454 72 92 0.00 0.00 0.00 0.00 f 0.00 15455 73 92 0.00 0.00 0.00 0.00 f 0.00 17976 74 133 0.00 0.00 0.00 0.00 f 0.00 17977 75 133 0.00 0.00 0.00 0.00 f 0.00 17978 76 133 0.00 0.00 0.00 0.00 f 0.00 19923 99 87 2986.30 2986.30 0.00 0.00 f 0.00 19924 100 87 2986.30 2986.30 0.00 0.00 f 0.00 19925 101 87 2986.30 2986.30 0.00 0.00 f 0.00 19926 102 87 2986.30 2986.30 0.00 0.00 f 0.00 19927 103 87 2986.30 2986.30 0.00 0.00 f 0.00 19928 104 87 2986.30 2986.30 0.00 0.00 f 0.00 15916 46 100 0.00 0.00 0.00 0.00 f 0.00 15921 32 100 0.00 0.00 0.00 0.00 f 0.00 15965 79 100 100.00 100.00 0.00 0.00 f 0.00 15966 80 100 100.00 100.00 0.00 0.00 f 0.00 15967 81 100 100.00 100.00 0.00 0.00 f 0.00 20920 107 90 0.00 0.00 0.00 0.00 f 0.00 20921 108 90 0.00 0.00 0.00 0.00 f 0.00 20922 109 90 0.00 0.00 0.00 0.00 f 0.00 20923 110 90 0.00 0.00 0.00 0.00 f 0.00 20924 111 90 0.00 0.00 0.00 0.00 f 0.00 20925 112 90 0.00 0.00 0.00 0.00 f 0.00 20926 113 90 0.00 0.00 0.00 0.00 f 0.00 20927 114 90 0.00 0.00 0.00 0.00 f 0.00 18177 86 136 0.00 0.00 0.00 0.00 f 0.00 18178 87 136 0.00 0.00 0.00 0.00 f 0.00 18179 88 136 0.00 0.00 0.00 0.00 f 0.00 18180 89 136 0.00 0.00 0.00 0.00 f 0.00 18181 90 136 0.00 0.00 0.00 0.00 f 0.00 18182 91 136 0.00 0.00 0.00 0.00 f 0.00 18183 92 136 0.00 0.00 0.00 0.00 f 0.00 17085 65 118 0.00 0.00 0.00 0.00 f 0.00 17106 86 118 0.00 0.00 0.00 0.00 f 0.00 17107 87 118 0.00 0.00 0.00 0.00 f 0.00 19975 103 114 110000.00 110000.00 0.00 0.00 f 0.00 19976 104 114 110000.00 110000.00 0.00 0.00 f 0.00 20942 105 114 110000.00 110000.00 0.00 0.00 f 0.00 20943 106 114 110000.00 110000.00 0.00 0.00 f 0.00 20944 107 114 110000.00 110000.00 0.00 0.00 f 0.00 20945 108 114 110000.00 110000.00 0.00 0.00 f 0.00 20946 109 114 110000.00 110000.00 0.00 0.00 f 0.00 20947 110 114 110000.00 110000.00 0.00 0.00 f 0.00 20948 111 114 110000.00 110000.00 0.00 0.00 f 0.00 20949 112 114 110000.00 110000.00 0.00 0.00 f 0.00 20950 113 114 110000.00 110000.00 0.00 0.00 f 0.00 20951 114 114 110000.00 110000.00 0.00 0.00 f 0.00 20952 115 114 110000.00 110000.00 0.00 0.00 f 0.00 20953 116 114 110000.00 110000.00 0.00 0.00 f 0.00 16042 46 102 0.00 0.00 0.00 0.00 f 0.00 16083 71 102 4.46 4.46 0.00 0.00 f 0.00 16084 72 102 4.46 4.46 0.00 0.00 f 0.00 19977 93 102 14087.73 19087.73 5000.00 0.00 f 0.00 19978 94 102 19087.73 19087.73 0.00 0.00 f 0.00 19979 95 102 19087.73 31446.41 12375.00 16.32 f 0.00 17994 92 133 20227.65 20227.65 0.00 0.00 f 0.00 18126 32 136 0.00 0.00 0.00 0.00 f 0.00 18127 33 136 0.00 0.00 0.00 0.00 f 0.00 18129 35 136 0.00 0.00 0.00 0.00 f 0.00 18130 36 136 0.00 0.00 0.00 0.00 f 0.00 18131 37 136 0.00 0.00 0.00 0.00 f 0.00 18165 74 136 0.00 0.00 0.00 0.00 f 0.00 18166 75 136 0.00 0.00 0.00 0.00 f 0.00 18167 76 136 0.00 0.00 0.00 0.00 f 0.00 18168 77 136 0.00 0.00 0.00 0.00 f 0.00 18169 78 136 0.00 0.00 0.00 0.00 f 0.00 18170 79 136 0.00 0.00 0.00 0.00 f 0.00 18176 85 136 0.00 0.00 0.00 0.00 f 0.00 15084 80 86 869.99 869.99 33869.00 33869.00 f 0.00 15085 81 86 869.99 869.99 0.00 0.00 f 0.00 15718 84 96 0.00 0.00 22000.00 22000.00 f 0.00 15719 85 96 0.00 0.00 0.00 0.00 f 0.00 15720 86 96 0.00 0.00 44000.00 44000.00 f 0.00 15721 87 96 0.00 0.00 6408.50 6408.50 f 0.00 15722 88 96 0.00 0.00 6408.50 6408.50 f 0.00 15723 89 96 0.00 0.00 324451.00 324451.00 f 0.00 15724 90 96 0.00 0.00 0.00 0.00 f 0.00 15725 91 96 0.00 0.00 55256.34 55256.34 f 0.00 15726 92 96 0.00 0.00 22000.00 22000.00 f 0.00 15953 67 100 0.00 0.00 0.00 0.00 f 0.00 15954 68 100 0.00 0.00 0.00 0.00 f 0.00 15955 69 100 0.00 0.00 0.00 0.00 f 0.00 15956 70 100 0.00 0.00 0.00 0.00 f 0.00 15957 71 100 0.00 0.00 0.00 0.00 f 0.00 20966 105 129 -505.22 -505.22 0.00 0.00 f 0.00 20967 106 129 -505.22 -505.22 0.00 0.00 f 0.00 20968 107 129 -505.22 -505.22 0.00 0.00 f 0.00 20969 108 129 -505.22 -505.22 0.00 0.00 f 0.00 20970 109 129 -505.22 -505.22 0.00 0.00 f 0.00 20971 110 129 -505.22 -505.22 0.00 0.00 f 0.00 20972 111 129 -505.22 -505.22 0.00 0.00 f 0.00 20973 112 129 -505.22 -505.22 0.00 0.00 f 0.00 20974 113 129 -505.22 -505.22 0.00 0.00 f 0.00 20975 114 129 -505.22 -505.22 0.00 0.00 f 0.00 20976 115 129 -505.22 -505.22 0.00 0.00 f 0.00 20977 116 129 -505.22 -505.22 0.00 0.00 f 0.00 17239 46 121 0.00 0.00 0.00 0.00 f 0.00 20001 93 121 0.00 0.00 0.00 0.00 f 0.00 20978 105 121 0.00 0.00 0.00 0.00 f 0.00 20483 90 160 0.00 0.00 0.00 0.00 f 0.00 20484 91 160 0.00 0.00 0.00 0.00 f 0.00 20485 92 160 0.00 0.00 0.00 0.00 f 0.00 20486 93 160 0.00 0.00 0.00 0.00 f 0.00 20487 94 160 0.00 0.00 0.00 0.00 f 0.00 20488 95 160 0.00 0.00 0.00 0.00 f 0.00 20489 96 160 0.00 -3400.00 0.00 3400.00 f 0.00 20490 97 160 -3400.00 -3400.00 0.00 0.00 f 0.00 20491 98 160 -3400.00 -3400.00 0.00 0.00 f 0.00 20492 99 160 -3400.00 -3400.00 0.00 0.00 f 0.00 20493 100 160 -3400.00 -3400.00 0.00 0.00 f 0.00 20494 101 160 -3400.00 -3400.00 0.00 0.00 f 0.00 20495 102 160 -3400.00 -3400.00 0.00 0.00 f 0.00 20496 103 160 -3400.00 -3400.00 0.00 0.00 f 0.00 20497 104 160 -3400.00 -3400.00 0.00 0.00 f 0.00 21398 105 160 0.00 0.00 0.00 0.00 f 0.00 21399 106 160 0.00 0.00 0.00 0.00 f 0.00 21400 107 160 0.00 0.00 0.00 0.00 f 0.00 21401 108 160 0.00 0.00 0.00 0.00 f 0.00 21402 109 160 0.00 0.00 0.00 0.00 f 0.00 21015 106 131 0.00 0.00 0.00 0.00 f 0.00 21016 107 131 0.00 0.00 0.00 0.00 f 0.00 21017 108 131 0.00 0.00 0.00 0.00 f 0.00 21018 109 131 0.00 0.00 0.00 0.00 f 0.00 21019 110 131 0.00 0.00 0.00 0.00 f 0.00 21020 111 131 0.00 0.00 0.00 0.00 f 0.00 21021 112 131 0.00 0.00 0.00 0.00 f 0.00 21022 113 131 0.00 0.00 0.00 0.00 f 0.00 21023 114 131 0.00 0.00 0.00 0.00 f 0.00 21024 115 131 0.00 0.00 0.00 0.00 f 0.00 15275 82 89 0.57 0.57 0.00 0.00 f 0.00 15276 83 89 0.57 0.57 0.00 0.00 f 0.00 15277 84 89 0.57 0.57 0.00 0.00 f 0.00 15278 85 89 0.57 0.57 0.00 0.00 f 0.00 15279 86 89 0.57 0.57 0.00 0.00 f 0.00 15280 87 89 0.57 0.57 0.00 0.00 f 0.00 21006 109 132 200.00 200.00 0.00 0.00 f 0.00 21007 110 132 200.00 200.00 0.00 0.00 f 0.00 21008 111 132 200.00 200.00 0.00 0.00 f 0.00 21009 112 132 200.00 200.00 0.00 0.00 f 0.00 21010 113 132 200.00 200.00 0.00 0.00 f 0.00 21011 114 132 200.00 200.00 0.00 0.00 f 0.00 21012 115 132 200.00 200.00 0.00 0.00 f 0.00 21013 116 132 200.00 200.00 0.00 0.00 f 0.00 20037 93 131 0.00 0.00 0.00 0.00 f 0.00 20038 94 131 0.00 0.00 0.00 0.00 f 0.00 20039 95 131 0.00 0.00 0.00 0.00 f 0.00 20040 96 131 0.00 0.00 0.00 0.00 f 0.00 20041 97 131 0.00 0.00 0.00 0.00 f 0.00 20042 98 131 0.00 0.00 0.00 0.00 f 0.00 20043 99 131 0.00 0.00 0.00 0.00 f 0.00 20044 100 131 0.00 0.00 0.00 0.00 f 0.00 20045 101 131 0.00 0.00 0.00 0.00 f 0.00 20046 102 131 0.00 0.00 0.00 0.00 f 0.00 20047 103 131 0.00 0.00 0.00 0.00 f 0.00 20048 104 131 0.00 0.00 0.00 0.00 f 0.00 21014 105 131 0.00 0.00 0.00 0.00 f 0.00 15395 76 91 0.00 0.00 0.00 0.00 f 0.00 15396 77 91 0.00 66.94 69.51 2.57 f 0.00 15397 78 91 66.94 66.94 0.00 0.00 f 0.00 21055 110 105 631.35 631.35 0.00 0.00 f 0.00 21056 111 105 631.35 631.35 0.00 0.00 f 0.00 21057 112 105 631.35 631.35 0.00 0.00 f 0.00 21058 113 105 631.35 631.35 0.00 0.00 f 0.00 21059 114 105 631.35 631.35 0.00 0.00 f 0.00 21060 115 105 631.35 631.35 0.00 0.00 f 0.00 21061 116 105 631.35 631.35 0.00 0.00 f 0.00 14806 48 137 0.00 0.00 0.00 0.00 f 0.00 18185 29 137 0.00 0.00 0.00 0.00 f 0.00 18186 28 137 0.00 0.00 0.00 0.00 f 0.00 18189 32 137 0.00 0.00 0.00 0.00 f 0.00 18192 35 137 0.00 0.00 0.00 0.00 f 0.00 18195 38 137 0.00 0.00 0.00 0.00 f 0.00 18209 55 137 0.00 0.00 0.00 0.00 f 0.00 20085 93 137 0.00 0.00 0.00 0.00 f 0.00 20086 94 137 0.00 0.00 0.00 0.00 f 0.00 20087 95 137 0.00 0.00 0.00 0.00 f 0.00 20088 96 137 0.00 0.00 0.00 0.00 f 0.00 21063 106 137 0.00 0.00 0.00 0.00 f 0.00 21064 107 137 0.00 0.00 0.00 0.00 f 0.00 21065 108 137 0.00 0.00 0.00 0.00 f 0.00 21066 109 137 0.00 0.00 0.00 0.00 f 0.00 21067 110 137 0.00 0.00 0.00 0.00 f 0.00 21068 111 137 0.00 0.00 0.00 0.00 f 0.00 21069 112 137 0.00 0.00 0.00 0.00 f 0.00 21070 113 137 0.00 0.00 0.00 0.00 f 0.00 21071 114 137 0.00 0.00 0.00 0.00 f 0.00 21072 115 137 0.00 0.00 0.00 0.00 f 0.00 21073 116 137 0.00 0.00 0.00 0.00 f 0.00 17617 46 128 0.00 0.00 0.00 0.00 f 0.00 17624 34 128 0.00 0.00 0.00 0.00 f 0.00 17626 36 128 0.00 0.00 0.00 0.00 f 0.00 17627 37 128 0.00 0.00 0.00 0.00 f 0.00 17628 38 128 0.00 0.00 0.00 0.00 f 0.00 17645 58 128 -2685.54 -2685.54 0.00 0.00 f 0.00 17668 81 128 -3947.25 -3947.25 0.00 0.00 f 0.00 21074 105 128 -3959.81 -3959.81 0.00 0.00 f 0.00 18280 63 138 -31002.49 -22444.01 8558.48 0.00 f 0.00 18281 64 138 -22444.01 -22444.01 1100.00 1100.00 f 0.00 21088 107 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21089 108 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21090 109 138 -70129.40 -70129.40 0.00 0.00 f 0.00 14809 47 139 0.00 0.00 0.00 0.00 f 0.00 15393 74 91 0.00 0.00 0.00 0.00 f 0.00 15394 75 91 0.00 0.00 0.00 0.00 f 0.00 20126 98 85 -459266.80 -277356.81 407651.56 225741.57 t 0.00 15510 65 93 -2.25 -2.25 0.00 0.00 f 0.00 15511 66 93 -2.25 -2.25 0.00 0.00 f 0.00 15512 67 93 -2.25 -2.25 0.00 0.00 f 0.00 15513 68 93 -2.25 -2.25 0.00 0.00 f 0.00 15514 69 93 0.00 0.00 0.00 0.00 f 0.00 20127 99 85 -272266.80 -272266.80 0.00 0.00 f 0.00 20128 100 85 -272266.80 -272266.80 0.00 0.00 f 0.00 20129 101 85 -272266.80 -272266.80 0.00 0.00 f 0.00 20130 102 85 -272266.80 -272266.80 0.00 0.00 f 0.00 20131 103 85 -272266.80 -272266.80 0.00 0.00 f 0.00 20132 104 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21098 105 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21099 106 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21100 107 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21101 108 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21102 109 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21103 110 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21104 111 85 -272266.80 -272266.80 0.00 0.00 f 0.00 17083 63 118 0.00 0.00 0.00 0.00 f 0.00 17084 64 118 0.00 0.00 0.00 0.00 f 0.00 18400 57 140 0.00 0.00 0.00 0.00 f 0.00 18401 58 140 0.00 0.00 0.00 0.00 f 0.00 18402 59 140 0.00 0.00 0.00 0.00 f 0.00 18403 60 140 0.00 0.00 0.00 0.00 f 0.00 18404 61 140 0.00 0.00 0.00 0.00 f 0.00 18405 62 140 0.00 0.00 0.00 0.00 f 0.00 18406 63 140 0.00 0.00 0.00 0.00 f 0.00 18407 64 140 0.00 0.00 0.00 0.00 f 0.00 18408 65 140 0.00 0.00 0.00 0.00 f 0.00 18433 90 140 2025.00 2025.00 0.00 0.00 f 0.00 18434 91 140 2025.00 66825.00 64800.00 0.00 f 0.00 18435 92 140 66825.00 82095.05 15270.05 0.00 f 0.00 21134 105 140 0.00 0.00 0.00 0.00 f 0.00 21135 106 140 0.00 0.00 0.00 0.00 f 0.00 21136 107 140 0.00 0.00 0.00 0.00 f 0.00 21137 108 140 0.00 0.00 0.00 0.00 f 0.00 21138 109 140 0.00 0.00 0.00 0.00 f 0.00 21139 110 140 0.00 0.00 0.00 0.00 f 0.00 21140 111 140 0.00 0.00 0.00 0.00 f 0.00 21141 112 140 0.00 0.00 0.00 0.00 f 0.00 21142 113 140 0.00 0.00 0.00 0.00 f 0.00 21143 114 140 0.00 0.00 0.00 0.00 f 0.00 21144 115 140 0.00 0.00 0.00 0.00 f 0.00 21145 116 140 0.00 0.00 0.00 0.00 f 0.00 16105 46 103 6000.00 18000.00 12000.00 0.00 f 0.00 16106 29 103 18000.00 20500.00 2500.00 0.00 f 0.00 16107 28 103 20500.00 25255.20 14755.20 10000.00 f 0.00 16109 31 103 8244.54 11194.54 2950.00 0.00 f 0.00 16121 43 103 50989.10 102889.11 51900.01 0.00 f 0.00 16122 44 103 102889.11 152889.11 50000.00 0.00 f 0.00 16123 45 103 152889.11 197139.11 44250.00 0.00 f 0.00 16124 49 103 197139.11 255506.71 58367.60 0.00 f 0.00 16125 50 103 255506.71 305506.71 50000.00 0.00 f 0.00 16126 51 103 305506.71 368406.71 62900.00 0.00 f 0.00 16127 52 103 368406.71 419356.71 50950.00 0.00 f 0.00 16130 55 103 571806.71 649056.71 77250.00 0.00 f 0.00 16133 58 103 77250.00 164500.00 87250.00 0.00 f 0.00 16134 59 103 164500.00 243917.30 79417.30 0.00 f 0.00 16135 60 103 243917.30 331607.85 87690.55 0.00 f 0.00 16148 73 103 285839.10 376839.10 91000.00 0.00 f 0.00 17080 60 118 0.00 0.00 0.00 0.00 f 0.00 17081 61 118 0.00 0.00 0.00 0.00 f 0.00 17082 62 118 0.00 0.00 0.00 0.00 f 0.00 18438 28 141 0.00 0.00 0.00 0.00 f 0.00 18441 32 141 0.00 0.00 0.00 0.00 f 0.00 15744 44 97 -5000.00 -5000.00 0.00 0.00 f 0.00 15745 45 97 -5000.00 -6200.00 0.00 1200.00 f 0.00 15746 49 97 -6200.00 -6599.00 0.00 399.00 f 0.00 15747 50 97 -6599.00 -6599.00 0.00 0.00 f 0.00 15748 51 97 -6599.00 -6599.00 0.00 0.00 f 0.00 15749 52 97 -6599.00 -6599.00 0.00 0.00 f 0.00 15750 53 97 -6599.00 -6599.00 0.00 0.00 f 0.00 15751 54 97 -6599.00 -6599.00 0.00 0.00 f 0.00 15752 55 97 -6599.00 -6599.00 0.00 0.00 f 0.00 19644 96 143 0.00 0.00 0.00 0.00 f 0.00 19650 102 143 0.00 0.00 0.00 0.00 f 0.00 19651 103 143 0.00 0.00 0.00 0.00 f 0.00 19652 104 143 0.00 0.00 0.00 0.00 f 0.00 20618 105 143 0.00 0.00 0.00 0.00 f 0.00 20619 106 143 0.00 0.00 0.00 0.00 f 0.00 20620 107 143 0.00 0.00 0.00 0.00 f 0.00 20621 108 143 0.00 0.00 0.00 0.00 f 0.00 20622 109 143 0.00 0.00 0.00 0.00 f 0.00 20623 110 143 0.00 0.00 0.00 0.00 f 0.00 20624 111 143 0.00 0.00 0.00 0.00 f 0.00 20625 112 143 0.00 0.00 0.00 0.00 f 0.00 20626 113 143 0.00 0.00 0.00 0.00 f 0.00 21170 105 144 0.00 0.00 0.00 0.00 f 0.00 21171 106 144 0.00 0.00 0.00 0.00 f 0.00 21172 107 144 0.00 0.00 0.00 0.00 f 0.00 21173 108 144 0.00 0.00 0.00 0.00 f 0.00 21174 109 144 0.00 0.00 0.00 0.00 f 0.00 21175 110 144 0.00 0.00 0.00 0.00 f 0.00 21176 111 144 0.00 0.00 0.00 0.00 f 0.00 21177 112 144 0.00 0.00 0.00 0.00 f 0.00 21178 113 144 0.00 0.00 0.00 0.00 f 0.00 21179 114 144 0.00 0.00 0.00 0.00 f 0.00 21180 115 144 0.00 0.00 0.00 0.00 f 0.00 21181 116 144 0.00 0.00 0.00 0.00 f 0.00 21182 105 145 0.00 0.00 0.00 0.00 f 0.00 21183 106 145 0.00 0.00 0.00 0.00 f 0.00 21184 107 145 0.00 0.00 0.00 0.00 f 0.00 21185 108 145 0.00 0.00 0.00 0.00 f 0.00 21186 109 145 0.00 0.00 0.00 0.00 f 0.00 21187 110 145 0.00 0.00 0.00 0.00 f 0.00 21188 111 145 0.00 0.00 0.00 0.00 f 0.00 21189 112 145 0.00 0.00 0.00 0.00 f 0.00 21190 113 145 0.00 0.00 0.00 0.00 f 0.00 21191 114 145 0.00 0.00 0.00 0.00 f 0.00 21192 115 145 0.00 0.00 0.00 0.00 f 0.00 21193 116 145 0.00 0.00 0.00 0.00 f 0.00 18784 63 146 0.00 0.00 0.00 0.00 f 0.00 18785 64 146 0.00 0.00 0.00 0.00 f 0.00 18786 65 146 0.00 0.00 0.00 0.00 f 0.00 18787 66 146 0.00 0.00 0.00 0.00 f 0.00 18788 67 146 0.00 0.00 0.00 0.00 f 0.00 18789 68 146 0.00 0.00 0.00 0.00 f 0.00 18790 69 146 0.00 0.00 0.00 0.00 f 0.00 18791 70 146 0.00 0.00 0.00 0.00 f 0.00 18794 73 146 0.00 0.00 0.00 0.00 f 0.00 18795 74 146 0.00 0.00 0.00 0.00 f 0.00 17108 88 118 0.00 0.00 0.00 0.00 f 0.00 17109 89 118 0.00 0.00 0.00 0.00 f 0.00 17110 90 118 0.00 0.00 0.00 0.00 f 0.00 17111 91 118 0.00 0.00 0.00 0.00 f 0.00 17112 92 118 0.00 0.00 0.00 0.00 f 0.00 14769 47 118 0.00 0.00 0.00 0.00 f 0.00 17114 29 119 0.00 0.00 0.00 0.00 f 0.00 17115 28 119 0.00 0.00 0.00 0.00 f 0.00 17116 30 119 0.00 0.00 0.00 0.00 f 0.00 17117 31 119 0.00 0.00 0.00 0.00 f 0.00 17118 32 119 0.00 0.00 0.00 0.00 f 0.00 17119 33 119 0.00 0.00 0.00 0.00 f 0.00 17120 34 119 0.00 0.00 0.00 0.00 f 0.00 17121 35 119 0.00 0.00 0.00 0.00 f 0.00 15583 75 94 459.80 459.80 0.00 0.00 f 0.00 15584 76 94 459.80 4534.64 4074.84 0.00 f 0.00 15585 77 94 4534.64 6965.64 2431.00 0.00 f 0.00 15586 78 94 6965.64 9691.11 2725.47 0.00 f 0.00 15587 79 94 9691.11 9691.11 0.00 0.00 f 0.00 15588 80 94 9691.11 13765.95 4074.84 0.00 f 0.00 15589 81 94 13765.95 13765.95 0.00 0.00 f 0.00 15590 82 94 13765.95 13765.95 0.00 0.00 f 0.00 15591 83 94 13765.95 14168.44 402.49 0.00 f 0.00 15592 84 94 14168.44 14168.44 0.00 0.00 f 0.00 15593 85 94 14168.44 14168.44 0.00 0.00 f 0.00 15594 86 94 14168.44 15047.78 879.34 0.00 f 0.00 15595 87 94 15047.78 15047.78 0.00 0.00 f 0.00 16517 64 109 -3051877.69 -3129127.69 0.00 77250.00 f 0.00 16518 65 109 -3129127.69 -3116577.89 101277.00 88727.20 f 0.00 16519 66 109 -3116577.89 -3117312.83 50068.60 50803.54 f 0.00 16520 67 109 -3117312.83 -3171767.83 20000.00 74455.00 f 0.00 16521 68 109 -3171767.83 -3055297.69 116470.14 0.00 f 0.00 18800 79 146 -795.61 -795.61 0.00 0.00 f 0.00 18801 80 146 -795.61 -795.61 0.00 0.00 f 0.00 21194 105 146 -790.49 -790.49 0.00 0.00 f 0.00 21195 106 146 -790.49 -790.49 0.00 0.00 f 0.00 21196 107 146 -790.49 -790.49 0.00 0.00 f 0.00 21197 108 146 -790.49 -790.49 0.00 0.00 f 0.00 21198 109 146 -790.49 -790.49 0.00 0.00 f 0.00 21199 110 146 -790.49 -790.49 0.00 0.00 f 0.00 21200 111 146 -790.49 -790.49 0.00 0.00 f 0.00 21201 112 146 -790.49 -790.49 0.00 0.00 f 0.00 21202 113 146 -790.49 -790.49 0.00 0.00 f 0.00 21203 114 146 -790.49 -790.49 0.00 0.00 f 0.00 21204 115 146 -790.49 -790.49 0.00 0.00 f 0.00 21205 116 146 -790.49 -790.49 0.00 0.00 f 0.00 18819 32 147 0.00 0.00 0.00 0.00 f 0.00 18850 66 147 0.00 0.00 0.00 0.00 f 0.00 18851 67 147 0.00 0.00 0.00 0.00 f 0.00 17395 60 123 0.00 0.00 0.00 0.00 f 0.00 17597 73 127 -517460.40 -517460.40 0.00 0.00 f 0.00 17599 75 127 -531541.03 -531541.03 0.00 0.00 f 0.00 17600 76 127 -531541.03 -531541.03 0.00 0.00 f 0.00 17601 77 127 -531541.03 -601943.87 70402.84 140805.68 f 0.00 17602 78 127 -601943.87 -644253.89 0.00 42310.02 f 0.00 17603 79 127 -644253.89 -644253.89 0.00 0.00 f 0.00 17604 80 127 -644253.89 -644253.89 0.00 0.00 f 0.00 17605 81 127 -644253.89 -644253.89 0.00 0.00 f 0.00 17611 87 127 -694919.92 -694919.92 0.00 0.00 f 0.00 17612 88 127 -694919.92 -694919.92 0.00 0.00 f 0.00 17613 89 127 -694919.92 -830459.59 0.00 135539.67 f 0.00 17614 90 127 -830459.59 -830459.59 0.00 0.00 f 0.00 17615 91 127 -830459.59 -831842.65 0.00 1383.06 f 0.00 17616 92 127 -831842.65 -896642.65 0.00 64800.00 f 0.00 16052 37 102 598.54 598.54 0.00 0.00 f 0.00 16053 38 102 598.54 598.54 0.00 0.00 f 0.00 16054 39 102 598.54 598.54 0.00 0.00 f 0.00 16057 42 102 598.54 598.54 0.00 0.00 f 0.00 16058 43 102 598.54 598.54 0.00 0.00 f 0.00 16063 51 102 598.54 1243.54 645.00 0.00 f 0.00 16064 52 102 1243.54 1291.04 47.50 0.00 f 0.00 16089 77 102 4629.46 4647.21 20.25 2.50 f 0.00 16090 78 102 4647.21 6959.71 2312.50 0.00 f 0.00 16091 79 102 6959.71 6959.71 0.00 0.00 f 0.00 16092 80 102 6959.71 11359.58 4625.00 225.13 f 0.00 16093 81 102 11359.58 11359.58 0.00 0.00 f 0.00 16094 82 102 11359.58 11359.58 0.00 0.00 f 0.00 16095 83 102 11359.58 11775.23 464.95 49.30 f 0.00 16096 84 102 11775.23 11775.23 0.00 0.00 f 0.00 16097 85 102 11775.23 11775.23 0.00 0.00 f 0.00 16098 86 102 11775.23 11775.23 0.00 0.00 f 0.00 18852 68 147 0.00 0.00 0.00 0.00 f 0.00 18853 69 147 0.00 0.00 0.00 0.00 f 0.00 18854 70 147 0.00 0.00 0.00 0.00 f 0.00 18855 71 147 0.00 0.00 0.00 0.00 f 0.00 18856 72 147 0.00 0.00 0.00 0.00 f 0.00 18857 73 147 0.00 0.00 0.00 0.00 f 0.00 18858 74 147 0.00 0.00 0.00 0.00 f 0.00 18859 75 147 0.00 0.00 0.00 0.00 f 0.00 18861 77 147 0.00 0.00 0.00 0.00 f 0.00 18862 78 147 0.00 0.00 0.00 0.00 f 0.00 18863 79 147 0.00 0.00 0.00 0.00 f 0.00 18868 84 147 0.00 0.00 0.00 0.00 f 0.00 18873 89 147 0.00 0.00 0.00 0.00 f 0.00 18874 90 147 0.00 0.00 0.00 0.00 f 0.00 20229 93 147 0.00 0.00 0.00 0.00 f 0.00 20230 94 147 0.00 0.00 0.00 0.00 f 0.00 20231 95 147 0.00 0.00 0.00 0.00 f 0.00 16714 72 112 0.00 0.00 0.00 0.00 f 0.00 16715 73 112 0.00 0.00 0.00 0.00 f 0.00 16716 74 112 0.00 0.00 0.00 0.00 f 0.00 16717 75 112 0.00 0.00 0.00 0.00 f 0.00 16718 76 112 0.00 0.00 0.00 0.00 f 0.00 16719 77 112 0.00 -15000.00 0.00 15000.00 f 0.00 16720 78 112 -15000.00 -15000.00 0.00 0.00 f 0.00 16721 79 112 -15000.00 -15000.00 0.00 0.00 f 0.00 16722 80 112 -15000.00 -15000.00 0.00 0.00 f 0.00 16723 81 112 0.00 0.00 0.00 0.00 f 0.00 16724 82 112 0.00 0.00 0.00 0.00 f 0.00 16725 83 112 0.00 0.00 0.00 0.00 f 0.00 16726 84 112 0.00 0.00 0.00 0.00 f 0.00 16727 85 112 0.00 0.00 0.00 0.00 f 0.00 16728 86 112 0.00 0.00 0.00 0.00 f 0.00 16729 87 112 0.00 0.00 0.00 0.00 f 0.00 16730 88 112 0.00 0.00 0.00 0.00 f 0.00 17918 79 132 200.00 200.00 0.00 0.00 f 0.00 17919 80 132 200.00 200.00 0.00 0.00 f 0.00 17806 46 131 0.00 0.00 0.00 0.00 f 0.00 17841 65 131 0.00 0.00 0.00 0.00 f 0.00 17842 66 131 0.00 0.00 0.00 0.00 f 0.00 17843 67 131 0.00 0.00 0.00 0.00 f 0.00 18059 29 135 0.00 0.00 0.00 0.00 f 0.00 18060 28 135 0.00 0.00 0.00 0.00 f 0.00 21207 106 147 0.00 0.00 0.00 0.00 f 0.00 21208 107 147 0.00 0.00 0.00 0.00 f 0.00 21209 108 147 0.00 0.00 0.00 0.00 f 0.00 21210 109 147 0.00 0.00 0.00 0.00 f 0.00 21211 110 147 0.00 0.00 0.00 0.00 f 0.00 21212 111 147 0.00 0.00 0.00 0.00 f 0.00 21213 112 147 0.00 0.00 0.00 0.00 f 0.00 21214 113 147 0.00 0.00 0.00 0.00 f 0.00 21215 114 147 0.00 0.00 0.00 0.00 f 0.00 21216 115 147 0.00 0.00 0.00 0.00 f 0.00 21217 116 147 0.00 0.00 0.00 0.00 f 0.00 14825 47 147 0.00 0.00 0.00 0.00 f 0.00 18877 46 148 0.00 0.00 0.00 0.00 f 0.00 18879 28 148 0.00 0.00 0.00 0.00 f 0.00 16706 64 112 0.00 0.00 0.00 0.00 f 0.00 16707 65 112 0.00 0.00 0.00 0.00 f 0.00 16708 66 112 0.00 0.00 0.00 0.00 f 0.00 16709 67 112 0.00 0.00 0.00 0.00 f 0.00 16710 68 112 0.00 0.00 0.00 0.00 f 0.00 16711 69 112 0.00 0.00 0.00 0.00 f 0.00 16712 70 112 0.00 0.00 0.00 0.00 f 0.00 16713 71 112 0.00 0.00 0.00 0.00 f 0.00 16183 42 104 0.00 0.00 0.00 0.00 f 0.00 16184 43 104 0.00 0.00 0.00 0.00 f 0.00 16185 44 104 0.00 0.00 0.00 0.00 f 0.00 16186 45 104 0.00 0.00 0.00 0.00 f 0.00 16187 49 104 0.00 0.00 0.00 0.00 f 0.00 16188 50 104 0.00 0.00 0.00 0.00 f 0.00 18447 38 141 0.00 0.00 0.00 0.00 f 0.00 18448 39 141 0.00 0.00 0.00 0.00 f 0.00 18449 40 141 0.00 0.00 0.00 0.00 f 0.00 18450 41 141 0.00 0.00 0.00 0.00 f 0.00 18451 42 141 0.00 0.00 0.00 0.00 f 0.00 18456 50 141 0.00 0.00 0.00 0.00 f 0.00 18457 51 141 0.00 0.00 0.00 0.00 f 0.00 18458 52 141 0.00 0.00 0.00 0.00 f 0.00 18459 53 141 0.00 0.00 0.00 0.00 f 0.00 18460 54 141 0.00 0.00 0.00 0.00 f 0.00 18461 55 141 0.00 0.00 0.00 0.00 f 0.00 18466 60 141 0.00 0.00 0.00 0.00 f 0.00 18467 61 141 0.00 0.00 0.00 0.00 f 0.00 18487 81 141 0.00 0.00 0.00 0.00 f 0.00 18488 82 141 0.00 0.00 0.00 0.00 f 0.00 18489 83 141 0.00 0.00 0.00 0.00 f 0.00 18490 84 141 0.00 51700.03 51700.03 0.00 f 0.00 18491 85 141 51700.03 51700.03 0.00 0.00 f 0.00 18492 86 141 51700.03 51700.03 0.00 0.00 f 0.00 18493 87 141 51700.03 51700.03 0.00 0.00 f 0.00 18494 88 141 51700.03 51700.03 0.00 0.00 f 0.00 18495 89 141 51700.03 155005.81 103305.78 0.00 f 0.00 18496 90 141 155005.81 155005.81 0.00 0.00 f 0.00 18497 91 141 155005.81 156038.87 1033.06 0.00 f 0.00 18499 46 142 0.00 0.00 0.00 0.00 f 0.00 18504 32 142 0.00 0.00 0.00 0.00 f 0.00 18548 79 142 593.46 593.46 0.00 0.00 f 0.00 18549 80 142 593.46 593.46 0.00 0.00 f 0.00 18550 81 142 0.00 21.98 21.98 0.00 f 0.00 18551 82 142 21.98 21.98 0.00 0.00 f 0.00 18927 80 148 -135.93 -135.93 0.00 0.00 f 0.00 18928 81 148 0.00 -5.12 0.00 5.12 f 0.00 18929 82 148 -5.12 -5.12 0.00 0.00 f 0.00 18930 83 148 -5.12 -5.12 0.00 0.00 f 0.00 18931 84 148 -5.12 -5.12 0.00 0.00 f 0.00 18932 85 148 -5.12 -5.12 0.00 0.00 f 0.00 18933 86 148 -5.12 -5.12 0.00 0.00 f 0.00 18934 87 148 -5.12 -5.12 0.00 0.00 f 0.00 18935 88 148 -5.12 -5.12 0.00 0.00 f 0.00 18936 89 148 -5.12 -5.12 0.00 0.00 f 0.00 18937 90 148 -5.12 -5.12 0.00 0.00 f 0.00 18938 91 148 -5.12 -5.12 0.00 0.00 f 0.00 18939 92 148 -5.12 -5.12 0.00 0.00 f 0.00 20242 94 148 0.00 0.00 0.00 0.00 f 0.00 21218 105 148 0.00 0.00 0.00 0.00 f 0.00 21219 106 148 0.00 0.00 0.00 0.00 f 0.00 21220 107 148 0.00 0.00 0.00 0.00 f 0.00 21221 108 148 0.00 0.00 0.00 0.00 f 0.00 16301 34 106 0.00 0.00 0.00 0.00 f 0.00 16302 35 106 0.00 0.00 0.00 0.00 f 0.00 16303 36 106 0.00 0.00 2131.00 2131.00 f 0.00 16304 37 106 0.00 0.00 3500.00 3500.00 f 0.00 15298 39 90 41.00 -70.50 0.00 111.50 f 0.00 15299 40 90 -70.50 -70.50 0.00 0.00 f 0.00 15300 41 90 -70.50 240.00 385.50 75.00 f 0.00 15301 42 90 240.00 240.00 0.00 0.00 f 0.00 15302 43 90 240.00 240.00 0.00 0.00 f 0.00 15303 44 90 240.00 240.00 0.00 0.00 f 0.00 15304 45 90 240.00 240.00 0.00 0.00 f 0.00 15305 49 90 240.00 234.75 31.00 36.25 f 0.00 15306 50 90 234.75 234.75 0.00 0.00 f 0.00 15307 51 90 234.75 234.75 0.00 0.00 f 0.00 15308 52 90 234.75 234.75 0.00 0.00 f 0.00 15309 53 90 234.75 234.75 0.00 0.00 f 0.00 15310 54 90 234.75 234.75 0.00 0.00 f 0.00 15311 55 90 234.75 234.75 0.00 0.00 f 0.00 15312 56 90 234.75 -40.51 0.00 275.26 f 0.00 15313 57 90 -40.51 -40.51 0.00 0.00 f 0.00 15314 58 90 -40.51 -40.51 0.00 0.00 f 0.00 15315 59 90 -40.51 -45.51 0.00 5.00 f 0.00 18668 73 144 0.00 0.00 0.00 0.00 f 0.00 18669 74 144 0.00 0.00 0.00 0.00 f 0.00 18670 75 144 0.00 0.00 0.00 0.00 f 0.00 18671 76 144 0.00 0.00 0.00 0.00 f 0.00 21222 109 148 0.00 0.00 0.00 0.00 f 0.00 21223 110 148 0.00 0.00 0.00 0.00 f 0.00 21224 111 148 0.00 0.00 0.00 0.00 f 0.00 21225 112 148 0.00 0.00 0.00 0.00 f 0.00 21226 113 148 0.00 0.00 0.00 0.00 f 0.00 21227 114 148 0.00 0.00 0.00 0.00 f 0.00 21228 115 148 0.00 0.00 0.00 0.00 f 0.00 21229 116 148 0.00 0.00 0.00 0.00 f 0.00 14827 47 148 0.00 0.00 0.00 0.00 f 0.00 14830 48 149 0.00 0.00 0.00 0.00 f 0.00 18950 37 149 0.00 0.00 0.00 0.00 f 0.00 18951 38 149 0.00 0.00 0.00 0.00 f 0.00 18953 40 149 0.00 0.00 0.00 0.00 f 0.00 18954 41 149 0.00 0.00 0.00 0.00 f 0.00 18956 43 149 0.00 0.00 0.00 0.00 f 0.00 18957 44 149 0.00 0.00 0.00 0.00 f 0.00 18958 45 149 0.00 0.00 0.00 0.00 f 0.00 18959 49 149 0.00 0.00 0.00 0.00 f 0.00 18960 50 149 0.00 0.00 0.00 0.00 f 0.00 18961 51 149 0.00 0.00 0.00 0.00 f 0.00 18962 52 149 0.00 0.00 0.00 0.00 f 0.00 18963 53 149 0.00 0.00 0.00 0.00 f 0.00 18964 54 149 0.00 0.00 0.00 0.00 f 0.00 18965 55 149 0.00 0.00 0.00 0.00 f 0.00 18980 70 149 0.00 0.00 0.00 0.00 f 0.00 18981 71 149 0.00 0.00 0.00 0.00 f 0.00 18982 72 149 0.00 0.00 0.00 0.00 f 0.00 19015 39 150 0.00 0.00 0.00 0.00 f 0.00 19037 64 150 0.00 0.00 0.00 0.00 f 0.00 19038 65 150 0.00 0.00 0.00 0.00 f 0.00 19039 66 150 0.00 0.00 0.00 0.00 f 0.00 19040 67 150 0.00 0.00 0.00 0.00 f 0.00 19041 68 150 0.00 0.00 0.00 0.00 f 0.00 19042 69 150 0.00 0.00 0.00 0.00 f 0.00 19043 70 150 0.00 0.00 0.00 0.00 f 0.00 19045 72 150 0.00 0.00 0.00 0.00 f 0.00 19046 73 150 0.00 0.00 0.00 0.00 f 0.00 19047 74 150 0.00 0.00 0.00 0.00 f 0.00 19048 75 150 0.00 0.00 0.00 0.00 f 0.00 19049 76 150 0.00 0.00 0.00 0.00 f 0.00 19050 77 150 0.00 -33.32 0.00 33.32 f 0.00 20271 99 150 0.00 0.00 0.00 0.00 f 0.00 20272 100 150 0.00 0.00 0.00 0.00 f 0.00 20273 101 150 0.00 0.00 0.00 0.00 f 0.00 20274 102 150 0.00 0.00 0.00 0.00 f 0.00 20275 103 150 0.00 0.00 0.00 0.00 f 0.00 20276 104 150 0.00 0.00 0.00 0.00 f 0.00 21242 105 150 0.00 0.00 0.00 0.00 f 0.00 21243 106 150 0.00 0.00 0.00 0.00 f 0.00 21244 107 150 0.00 0.00 0.00 0.00 f 0.00 21245 108 150 0.00 0.00 0.00 0.00 f 0.00 21246 109 150 0.00 0.00 0.00 0.00 f 0.00 21247 110 150 0.00 0.00 0.00 0.00 f 0.00 21248 111 150 0.00 0.00 0.00 0.00 f 0.00 21249 112 150 0.00 0.00 0.00 0.00 f 0.00 21250 113 150 0.00 0.00 0.00 0.00 f 0.00 21251 114 150 0.00 0.00 0.00 0.00 f 0.00 21252 115 150 0.00 0.00 0.00 0.00 f 0.00 15316 60 90 -45.51 1150.74 1196.25 0.00 f 0.00 15317 61 90 1150.74 1150.74 0.00 0.00 f 0.00 15318 62 90 1150.74 10352.04 12934.80 3733.50 f 0.00 15319 63 90 10352.04 10352.04 0.00 0.00 f 0.00 15320 64 90 10352.04 -14419.48 0.00 24771.52 f 0.00 19025 52 150 0.00 0.00 0.00 0.00 f 0.00 19026 53 150 0.00 0.00 0.00 0.00 f 0.00 19030 57 150 0.00 0.00 0.00 0.00 f 0.00 19031 58 150 0.00 0.00 0.00 0.00 f 0.00 19032 59 150 0.00 0.00 0.00 0.00 f 0.00 19033 60 150 0.00 0.00 0.00 0.00 f 0.00 19034 61 150 0.00 0.00 0.00 0.00 f 0.00 19035 62 150 0.00 0.00 0.00 0.00 f 0.00 19036 63 150 0.00 0.00 0.00 0.00 f 0.00 15622 51 95 0.00 0.00 0.00 0.00 f 0.00 15623 52 95 0.00 0.00 25.00 25.00 f 0.00 15624 53 95 0.00 0.00 325.00 325.00 f 0.00 15625 54 95 0.00 0.00 0.00 0.00 f 0.00 15626 55 95 0.00 0.00 0.00 0.00 f 0.00 15627 56 95 0.00 0.00 2625.00 2625.00 f 0.00 15628 57 95 0.00 91.00 91.00 0.00 f 0.00 15629 58 95 91.00 91.00 0.00 0.00 f 0.00 15630 59 95 91.00 91.00 325.00 325.00 f 0.00 15631 60 95 91.00 91.00 2306.25 2306.25 f 0.00 15632 61 95 91.00 91.00 0.00 0.00 f 0.00 15633 62 95 91.00 91.00 24955.75 24955.75 f 0.00 15634 63 95 91.00 91.00 8558.48 8558.48 f 0.00 15635 64 95 91.00 91.00 9658.48 9658.48 f 0.00 15636 65 95 91.00 91.00 18556.32 18556.32 f 0.00 15637 66 95 91.00 91.00 7743.40 7743.40 f 0.00 15638 67 95 91.00 91.00 0.00 0.00 f 0.00 15639 68 95 91.00 0.00 41511.00 41602.00 f 0.00 15640 69 95 0.00 0.00 8953.40 8953.40 f 0.00 15641 70 95 0.00 0.00 50000.00 50000.00 f 0.00 15642 71 95 0.00 0.00 0.00 0.00 f 0.00 15644 73 95 0.00 0.00 150000.00 150000.00 f 0.00 15645 74 95 0.00 0.00 150200.00 150200.00 f 0.00 15646 75 95 0.00 0.00 50000.00 50000.00 f 0.00 15647 76 95 0.00 0.00 48100.00 48100.00 f 0.00 15648 77 95 0.00 0.00 77108.40 77108.40 f 0.00 15649 78 95 0.00 -213.66 6836.34 7050.00 f 0.00 15650 79 95 -213.66 -870.00 50000.00 50656.34 f 0.00 15651 80 95 -870.00 -870.00 14502.50 14502.50 f 0.00 21264 115 130 0.00 0.00 0.00 0.00 f 0.00 21265 116 130 0.00 0.00 0.00 0.00 f 0.00 18003 35 134 0.00 0.00 0.00 0.00 f 0.00 18004 36 134 0.00 0.00 0.00 0.00 f 0.00 18005 37 134 0.00 0.00 0.00 0.00 f 0.00 18029 64 134 0.00 0.00 0.00 0.00 f 0.00 18030 65 134 0.00 0.00 0.00 0.00 f 0.00 15579 71 94 0.00 0.00 0.00 0.00 f 0.00 15580 72 94 0.00 0.00 0.00 0.00 f 0.00 15581 73 94 0.00 0.00 0.00 0.00 f 0.00 15582 74 94 0.00 459.80 459.80 0.00 f 0.00 14947 69 84 2243332.22 2243332.22 0.00 0.00 f 623408.94 14961 83 84 2943883.17 2943883.17 0.00 0.00 f 0.00 15614 40 95 0.00 0.00 0.00 0.00 f 0.00 15615 41 95 0.00 0.00 539.00 539.00 f 0.00 15763 66 97 0.00 0.00 0.00 0.00 f 0.00 15764 67 97 0.00 0.00 0.00 0.00 f 0.00 15765 68 97 0.00 0.00 0.00 0.00 f 0.00 15766 69 97 0.00 0.00 0.00 0.00 f 0.00 15767 70 97 0.00 0.00 0.00 0.00 f 0.00 15768 71 97 0.00 0.00 0.00 0.00 f 0.00 15769 72 97 0.00 0.00 0.00 0.00 f 0.00 15770 73 97 0.00 0.00 0.00 0.00 f 0.00 15771 74 97 0.00 0.00 0.00 0.00 f 0.00 15772 75 97 0.00 0.00 0.00 0.00 f 0.00 15773 76 97 0.00 0.00 0.00 0.00 f 0.00 15774 77 97 0.00 0.00 0.00 0.00 f 0.00 15775 78 97 0.00 0.00 0.00 0.00 f 0.00 15776 79 97 0.00 0.00 0.00 0.00 f 0.00 15777 80 97 0.00 0.00 0.00 0.00 f 0.00 15778 81 97 0.00 -125.00 0.00 125.00 f 0.00 15779 82 97 -125.00 -125.00 0.00 0.00 f 0.00 15780 83 97 -125.00 -125.00 0.00 0.00 f 0.00 15781 84 97 -125.00 -125.00 0.00 0.00 f 0.00 15782 85 97 -125.00 -125.00 0.00 0.00 f 0.00 15783 86 97 -125.00 -125.00 0.00 0.00 f 0.00 15784 87 97 -125.00 -125.00 0.00 0.00 f 0.00 15785 88 97 -125.00 -125.00 0.00 0.00 f 0.00 15786 89 97 -125.00 -125.00 0.00 0.00 f 0.00 15787 90 97 -125.00 -125.00 0.00 0.00 f 0.00 19791 99 117 1228.17 1228.17 0.00 0.00 f 0.00 19792 100 117 1228.17 1228.17 0.00 0.00 f 0.00 19793 101 117 1228.17 1228.17 0.00 0.00 f 0.00 21270 109 134 0.00 0.00 0.00 0.00 f 0.00 21271 110 134 0.00 0.00 0.00 0.00 f 0.00 21272 111 134 0.00 0.00 0.00 0.00 f 0.00 21273 112 134 0.00 0.00 0.00 0.00 f 0.00 19087 51 152 0.00 0.00 0.00 0.00 f 0.00 19088 52 152 0.00 0.00 0.00 0.00 f 0.00 19089 53 152 0.00 0.00 0.00 0.00 f 0.00 19090 54 152 0.00 0.00 0.00 0.00 f 0.00 19091 55 152 0.00 0.00 0.00 0.00 f 0.00 19092 56 152 0.00 0.00 0.00 0.00 f 0.00 19094 58 152 0.00 0.00 0.00 0.00 f 0.00 21281 108 152 0.00 0.00 0.00 0.00 f 0.00 21282 109 152 0.00 0.00 0.00 0.00 f 0.00 21283 110 152 0.00 0.00 0.00 0.00 f 0.00 21284 111 152 0.00 0.00 0.00 0.00 f 0.00 21285 112 152 0.00 0.00 0.00 0.00 f 0.00 21286 113 152 0.00 0.00 0.00 0.00 f 0.00 21287 114 152 0.00 0.00 0.00 0.00 f 0.00 19282 57 155 0.00 0.00 0.00 0.00 f 0.00 19283 58 155 0.00 0.00 0.00 0.00 f 0.00 19284 59 155 0.00 0.00 0.00 0.00 f 0.00 19285 60 155 0.00 0.00 0.00 0.00 f 0.00 19286 61 155 0.00 0.00 0.00 0.00 f 0.00 19287 62 155 0.00 0.00 0.00 0.00 f 0.00 19288 63 155 0.00 0.00 0.00 0.00 f 0.00 19298 73 155 0.00 0.00 0.00 0.00 f 0.00 20333 101 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20334 102 155 -1014.64 -1014.64 0.00 0.00 f 0.00 19902 102 101 28.00 28.00 0.00 0.00 f 0.00 19903 103 101 28.00 28.00 0.00 0.00 f 0.00 19904 104 101 28.00 28.00 0.00 0.00 f 0.00 19905 93 96 0.00 0.00 0.00 0.00 f 0.00 19906 94 96 0.00 0.00 0.00 0.00 f 0.00 19907 95 96 0.00 0.00 110000.00 110000.00 f 0.00 19908 96 96 0.00 0.00 32498.20 32498.20 f 0.00 19909 97 96 0.00 0.00 0.00 0.00 f 0.00 19910 98 96 0.00 0.00 330000.00 330000.00 f 0.00 19911 99 96 0.00 0.00 0.00 0.00 f 0.00 15924 35 100 0.00 0.00 0.00 0.00 f 0.00 15925 36 100 0.00 0.00 0.00 0.00 f 0.00 15926 37 100 0.00 0.00 0.00 0.00 f 0.00 15927 38 100 0.00 0.00 0.00 0.00 f 0.00 15928 39 100 0.00 0.00 0.00 0.00 f 0.00 15929 40 100 0.00 0.00 0.00 0.00 f 0.00 15930 41 100 0.00 0.00 0.00 0.00 f 0.00 15931 42 100 0.00 0.00 0.00 0.00 f 0.00 15932 43 100 0.00 0.00 0.00 0.00 f 0.00 15933 44 100 0.00 0.00 0.00 0.00 f 0.00 15934 45 100 0.00 0.00 0.00 0.00 f 0.00 15935 49 100 0.00 0.00 0.00 0.00 f 0.00 15936 50 100 0.00 0.00 0.00 0.00 f 0.00 15937 51 100 0.00 0.00 0.00 0.00 f 0.00 15938 52 100 0.00 0.00 0.00 0.00 f 0.00 15939 53 100 0.00 0.00 0.00 0.00 f 0.00 15940 54 100 0.00 0.00 0.00 0.00 f 0.00 15941 55 100 0.00 0.00 0.00 0.00 f 0.00 15942 56 100 0.00 0.00 0.00 0.00 f 0.00 15943 57 100 0.00 0.00 0.00 0.00 f 0.00 15944 58 100 0.00 0.00 0.00 0.00 f 0.00 15945 59 100 0.00 0.00 0.00 0.00 f 0.00 15874 51 99 363.55 1563.55 1200.00 0.00 f 0.00 15887 64 99 -0.01 33499.99 33500.00 0.00 f 0.00 15888 65 99 33499.99 -0.01 68650.00 102150.00 f 0.00 15891 68 99 50000.00 0.00 50116.00 100116.00 f 0.00 15892 69 99 0.00 2799.98 13079.98 10280.00 f 0.00 15893 70 99 2799.98 2799.98 50000.00 50000.00 f 0.00 16833 65 114 100000.00 100000.00 0.00 0.00 f 0.00 16834 66 114 100000.00 100000.00 0.00 0.00 f 0.00 19965 93 114 110000.00 110000.00 0.00 0.00 f 0.00 19988 104 102 31446.41 31446.41 0.00 0.00 f 0.00 17742 92 129 -505.22 -505.22 0.00 0.00 f 0.00 19989 93 129 -505.22 -505.22 0.00 0.00 f 0.00 19990 94 129 -505.22 -505.22 0.00 0.00 f 0.00 19991 95 129 -505.22 -505.22 0.00 0.00 f 0.00 19992 96 129 -505.22 -505.22 0.00 0.00 f 0.00 19993 97 129 -505.22 -505.22 0.00 0.00 f 0.00 14759 47 113 0.00 10000.00 10000.00 0.00 f 0.00 14765 47 116 0.00 0.00 0.00 0.00 f 0.00 16685 40 112 0.00 0.00 0.00 0.00 f 0.00 16686 41 112 0.00 0.00 0.00 0.00 f 0.00 16687 42 112 0.00 0.00 0.00 0.00 f 0.00 16689 44 112 0.00 0.00 0.00 0.00 f 0.00 16690 45 112 0.00 0.00 0.00 0.00 f 0.00 16691 49 112 0.00 0.00 0.00 0.00 f 0.00 16692 50 112 0.00 0.00 0.00 0.00 f 0.00 16693 51 112 0.00 0.00 0.00 0.00 f 0.00 16694 52 112 0.00 0.00 0.00 0.00 f 0.00 16695 53 112 0.00 0.00 0.00 0.00 f 0.00 21331 110 115 0.00 0.00 0.00 0.00 f 0.00 21332 111 115 0.00 0.00 0.00 0.00 f 0.00 21333 112 115 0.00 0.00 0.00 0.00 f 0.00 21335 114 115 0.00 0.00 0.00 0.00 f 0.00 21336 115 115 0.00 0.00 0.00 0.00 f 0.00 21337 116 115 0.00 0.00 0.00 0.00 f 0.00 14763 47 115 0.00 0.00 0.00 0.00 f 0.00 14844 48 157 0.00 0.00 0.00 0.00 f 0.00 19381 46 157 0.00 0.00 0.00 0.00 f 0.00 19382 29 157 0.00 0.00 0.00 0.00 f 0.00 19383 28 157 0.00 0.00 0.00 0.00 f 0.00 14985 41 85 -255437.61 -225437.61 31933.16 1933.16 f 0.00 19016 40 150 0.00 0.00 0.00 0.00 f 0.00 19017 41 150 0.00 0.00 0.00 0.00 f 0.00 21253 116 150 0.00 0.00 0.00 0.00 f 0.00 17765 52 130 0.00 0.00 0.00 0.00 f 0.00 17766 53 130 0.00 0.00 0.00 0.00 f 0.00 16990 30 117 0.00 0.00 0.00 0.00 f 0.00 16991 31 117 0.00 0.00 0.00 0.00 f 0.00 16992 32 117 0.00 0.00 0.00 0.00 f 0.00 14767 47 117 0.00 0.00 0.00 0.00 f 0.00 16104 92 102 14087.73 14087.73 0.00 0.00 f 0.00 18293 76 138 -28598.37 -57868.37 27040.00 56310.00 f 0.00 18296 79 138 -42748.53 -42748.53 0.00 0.00 f 0.00 18297 80 138 -42748.53 -38396.40 27064.63 22712.50 f 0.00 18300 83 138 -38396.40 -36713.40 2704.00 1021.00 f 0.00 18301 84 138 -36713.40 -36713.40 0.00 0.00 f 0.00 18302 85 138 -36713.40 -36713.40 0.00 0.00 f 0.00 18303 86 138 -36713.40 -78465.60 16638.80 58391.00 f 0.00 18304 87 138 -78465.60 -78465.60 0.00 0.00 f 0.00 18305 88 138 -78465.60 -78465.60 0.00 0.00 f 0.00 18306 89 138 -78465.60 -76560.22 27936.38 26031.00 f 0.00 18307 90 138 -76560.22 -76560.22 0.00 0.00 f 0.00 18308 91 138 -76560.22 -76391.92 270.40 102.10 f 0.00 18309 92 138 -76391.92 -76391.92 0.00 0.00 f 0.00 14704 48 85 -7000.00 -24000.00 4000.00 21000.00 f 0.00 14973 28 85 -22000.00 -41195.81 2947.16 22142.97 f 0.00 14979 35 85 -36878.87 -124878.87 215000.00 303000.00 f 0.00 14980 36 85 -124878.87 -224572.47 151065.96 250759.56 f 0.00 14981 37 85 -224572.47 -74666.47 150000.00 94.00 f 0.00 14982 38 85 -74666.47 -59666.47 15000.00 0.00 f 0.00 14984 40 85 -270437.61 -255437.61 15000.00 0.00 f 0.00 14699 47 83 0.00 0.00 0.00 0.00 f 0.00 14711 47 89 0.00 0.00 0.00 0.00 f 0.00 14715 47 91 0.00 0.00 0.00 0.00 f 0.00 14717 47 92 0.00 0.00 0.00 0.00 f 0.00 14719 47 93 0.00 0.00 0.00 0.00 f 0.00 14741 47 104 0.00 0.00 0.00 0.00 f 0.00 14705 47 86 0.00 0.00 0.00 0.00 f 0.00 14747 47 107 0.00 0.00 0.00 0.00 f 0.00 14749 47 108 0.00 -3000.00 0.00 3000.00 f 0.00 14753 47 110 0.00 0.00 0.00 0.00 f 0.00 14755 47 111 0.00 0.00 0.00 0.00 f 0.00 14727 47 97 0.00 -1000.00 0.00 1000.00 f 0.00 14721 47 94 0.00 0.00 0.00 0.00 f 0.00 14751 47 109 0.00 -8000.00 11000.00 19000.00 f 0.00 14701 47 84 0.00 0.00 0.00 0.00 f 0.00 14735 47 101 0.00 0.00 0.00 0.00 f 0.00 14745 47 106 0.00 0.00 0.00 0.00 f 0.00 14725 47 96 0.00 0.00 0.00 0.00 f 0.00 14707 47 87 0.00 0.00 0.00 0.00 f 0.00 14733 47 100 0.00 0.00 0.00 0.00 f 0.00 14713 47 90 0.00 0.00 0.00 0.00 f 0.00 14709 47 88 0.00 0.00 0.00 0.00 f 0.00 14731 47 99 0.00 0.00 0.00 0.00 f 0.00 14737 47 102 0.00 0.00 0.00 0.00 f 0.00 14729 47 98 0.00 0.00 0.00 0.00 f 0.00 14723 47 95 0.00 0.00 0.00 0.00 f 0.00 16235 31 105 587.22 624.22 37.00 0.00 f 0.00 16236 32 105 624.22 624.22 0.00 0.00 f 0.00 16138 63 103 510888.47 555888.47 45000.00 0.00 f 0.00 21268 107 134 0.00 0.00 0.00 0.00 f 0.00 21269 108 134 0.00 0.00 0.00 0.00 f 0.00 20335 103 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20336 104 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21302 105 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21303 106 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21304 107 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21305 108 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21306 109 155 -1014.64 -1014.64 0.00 0.00 f 0.00 16898 67 115 0.00 0.00 0.00 0.00 f 0.00 16899 68 115 0.00 0.00 0.00 0.00 f 0.00 16900 69 115 0.00 0.00 0.00 0.00 f 0.00 16901 70 115 0.00 0.00 0.00 0.00 f 0.00 16902 71 115 0.00 0.00 0.00 0.00 f 0.00 21330 109 115 0.00 0.00 0.00 0.00 f 0.00 19384 30 157 0.00 0.00 0.00 0.00 f 0.00 19385 31 157 0.00 0.00 0.00 0.00 f 0.00 19386 32 157 0.00 0.00 0.00 0.00 f 0.00 19387 33 157 0.00 0.00 0.00 0.00 f 0.00 19388 34 157 0.00 0.00 0.00 0.00 f 0.00 20361 93 157 0.00 0.00 0.00 0.00 f 0.00 20362 94 157 0.00 0.00 0.00 0.00 f 0.00 20363 95 157 0.00 -328.45 0.00 328.45 f 0.00 20364 96 157 -328.45 -2451.47 0.00 2123.02 f 0.00 20365 97 157 -2451.47 -7621.47 0.00 5170.00 f 0.00 14700 48 83 0.00 0.00 0.00 0.00 f 0.00 17397 62 123 0.00 0.00 1980.00 1980.00 f 0.00 17398 63 123 0.00 0.00 0.00 0.00 f 0.00 17399 64 123 0.00 0.00 0.00 0.00 f 0.00 17400 65 123 0.00 -253.35 0.00 253.35 f 0.00 17401 66 123 -253.35 -253.35 2000.00 2000.00 f 0.00 17402 67 123 -253.35 -253.35 0.00 0.00 f 0.00 17405 70 123 0.00 0.00 0.00 0.00 f 0.00 17406 71 123 0.00 0.00 0.00 0.00 f 0.00 17407 72 123 0.00 0.00 0.00 0.00 f 0.00 17408 73 123 0.00 0.00 0.00 0.00 f 0.00 17409 74 123 0.00 0.00 0.00 0.00 f 0.00 17410 75 123 0.00 0.00 0.00 0.00 f 0.00 17411 76 123 0.00 0.00 0.00 0.00 f 0.00 20375 95 123 0.00 0.00 21450.00 21450.00 f 0.00 20376 96 123 0.00 0.00 0.00 0.00 f 0.00 20377 97 123 0.00 0.00 5170.00 5170.00 f 0.00 20378 98 123 0.00 -185150.00 2970.00 188120.00 f 0.00 20379 99 123 -185150.00 -185150.00 0.00 0.00 f 0.00 20685 112 104 0.00 0.00 0.00 0.00 f 0.00 20686 113 104 0.00 0.00 0.00 0.00 f 0.00 20687 114 104 0.00 0.00 0.00 0.00 f 0.00 16454 64 108 -250437.78 -295687.78 0.00 45250.00 f 0.00 16455 65 108 -295687.78 -313670.26 0.00 17982.48 f 0.00 16456 66 108 -313670.26 -322775.05 0.00 9104.79 f 0.00 16458 68 108 -342775.05 -477791.64 0.00 135016.59 f 0.00 16493 37 109 -1453498.40 -1954509.62 2488.78 503500.00 f 0.00 16494 38 109 -1954509.62 -2004509.62 0.00 50000.00 f 0.00 16495 39 109 -2004509.62 -2055493.85 250158.27 301142.50 f 0.00 16496 40 109 -2055493.85 -2305393.85 100.00 250000.00 f 0.00 16504 51 109 -2637104.58 -2687104.58 0.00 50000.00 f 0.00 16505 52 109 -2687104.58 -2750259.58 1424.50 64579.50 f 0.00 16506 53 109 -2750259.58 -2827239.58 367.50 77347.50 f 0.00 16507 54 109 -2827239.58 -2852489.58 50000.00 75250.00 f 0.00 16508 55 109 -2852489.58 -2929739.58 0.00 77250.00 f 0.00 16511 58 109 -2955764.58 -2768012.35 275002.23 87250.00 f 0.00 16512 59 109 -2768012.35 -2847293.22 303.80 79584.67 f 0.00 14702 48 84 5000.00 5000.00 0.00 0.00 f 5000.00 14935 57 84 1619923.28 1619923.28 0.00 0.00 f 417136.04 14936 58 84 1619923.28 1619923.28 0.00 0.00 f 0.00 17307 32 122 0.00 0.00 0.00 0.00 f 0.00 19872 96 122 1500.00 2512.00 1012.00 0.00 f 0.00 19873 97 122 2512.00 2512.00 0.00 0.00 f 0.00 19874 98 122 2512.00 10562.00 8050.00 0.00 f 0.00 19875 99 122 10562.00 10562.00 0.00 0.00 f 0.00 19876 100 122 10562.00 10562.00 0.00 0.00 f 0.00 19877 101 122 10562.00 10562.00 0.00 0.00 f 0.00 19878 102 122 10562.00 10562.00 0.00 0.00 f 0.00 19879 103 122 10562.00 10562.00 0.00 0.00 f 0.00 19880 104 122 10562.00 10562.00 0.00 0.00 f 0.00 20846 105 122 0.00 0.00 0.00 0.00 f 0.00 20847 106 122 0.00 0.00 0.00 0.00 f 0.00 20848 107 122 0.00 0.00 0.00 0.00 f 0.00 20849 108 122 0.00 0.00 0.00 0.00 f 0.00 20850 109 122 0.00 0.00 0.00 0.00 f 0.00 20851 110 122 0.00 0.00 0.00 0.00 f 0.00 20852 111 122 0.00 0.00 0.00 0.00 f 0.00 20853 112 122 0.00 0.00 0.00 0.00 f 0.00 20854 113 122 0.00 0.00 0.00 0.00 f 0.00 20855 114 122 0.00 0.00 0.00 0.00 f 0.00 20856 115 122 0.00 0.00 0.00 0.00 f 0.00 20857 116 122 0.00 0.00 0.00 0.00 f 0.00 16688 43 112 0.00 0.00 0.00 0.00 f 0.00 19881 93 112 0.00 0.00 0.00 0.00 f 0.00 19882 94 112 0.00 0.00 0.00 0.00 f 0.00 19883 95 112 0.00 0.00 0.00 0.00 f 0.00 20872 107 101 0.00 0.00 0.00 0.00 f 0.00 20873 108 101 0.00 0.00 0.00 0.00 f 0.00 20874 109 101 0.00 0.00 0.00 0.00 f 0.00 20875 110 101 0.00 0.00 0.00 0.00 f 0.00 16660 81 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16661 82 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16662 83 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16663 84 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16664 85 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16665 86 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16666 87 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16749 41 113 1420000.00 1420000.00 0.00 0.00 f 0.00 20876 111 101 0.00 0.00 0.00 0.00 f 0.00 20877 112 101 0.00 0.00 0.00 0.00 f 0.00 20878 113 101 0.00 0.00 0.00 0.00 f 0.00 20879 114 101 0.00 0.00 0.00 0.00 f 0.00 14706 48 86 0.00 0.00 0.00 0.00 f 0.00 15049 42 86 0.00 0.00 638.18 638.18 f 0.00 15050 43 86 0.00 0.00 767.38 767.38 f 0.00 16615 33 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16616 34 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16633 54 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16634 55 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16635 56 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16636 57 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16637 58 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16638 59 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16639 60 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16640 61 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16642 63 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16643 64 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16644 65 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16645 66 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16646 67 111 -1000.00 -51000.00 0.00 50000.00 f 0.00 16647 68 111 -51000.00 -51000.00 0.00 0.00 f 0.00 16648 69 111 -51000.00 -51000.00 0.00 0.00 f 0.00 16649 70 111 -51000.00 -51000.00 0.00 0.00 f 0.00 16650 71 111 -51000.00 -51000.00 0.00 0.00 f 0.00 16651 72 111 -51000.00 -51000.00 0.00 0.00 f 0.00 16652 73 111 -51000.00 -51000.00 0.00 0.00 f 0.00 14781 47 125 0.00 0.00 0.00 0.00 f 0.00 20894 105 87 2986.30 2986.30 0.00 0.00 f 0.00 20895 106 87 2986.30 2986.30 0.00 0.00 f 0.00 20896 107 87 2986.30 2986.30 0.00 0.00 f 0.00 20897 108 87 2986.30 2986.30 0.00 0.00 f 0.00 20898 109 87 2986.30 2986.30 0.00 0.00 f 0.00 20899 110 87 2986.30 2986.30 0.00 0.00 f 0.00 20900 111 87 2986.30 2986.30 0.00 0.00 f 0.00 20901 112 87 2986.30 2986.30 0.00 0.00 f 0.00 20902 113 87 2986.30 2986.30 0.00 0.00 f 0.00 20903 114 87 2986.30 2986.30 0.00 0.00 f 0.00 20904 115 87 2986.30 2986.30 0.00 0.00 f 0.00 20905 116 87 2986.30 2986.30 0.00 0.00 f 0.00 20907 106 100 1100.00 1100.00 0.00 0.00 f 0.00 20908 107 100 1100.00 1100.00 0.00 0.00 f 0.00 20909 108 100 1100.00 1100.00 0.00 0.00 f 0.00 20910 109 100 1100.00 1100.00 0.00 0.00 f 0.00 21266 105 134 0.00 0.00 0.00 0.00 f 0.00 21267 106 134 0.00 0.00 0.00 0.00 f 0.00 17011 54 117 0.00 0.00 0.00 0.00 f 0.00 17012 55 117 0.00 0.00 0.00 0.00 f 0.00 17013 56 117 0.00 0.00 0.00 0.00 f 0.00 17014 57 117 0.00 0.00 0.00 0.00 f 0.00 17015 58 117 0.00 0.00 0.00 0.00 f 0.00 17016 59 117 0.00 0.00 0.00 0.00 f 0.00 17017 60 117 0.00 0.00 0.00 0.00 f 0.00 17018 61 117 0.00 0.00 0.00 0.00 f 0.00 17019 62 117 0.00 0.00 0.00 0.00 f 0.00 17020 63 117 0.00 0.00 0.00 0.00 f 0.00 14782 48 125 0.00 0.00 0.00 0.00 f 0.00 17492 29 126 0.00 0.00 0.00 0.00 f 0.00 17493 28 126 0.00 0.00 0.00 0.00 f 0.00 17494 30 126 0.00 0.00 0.00 0.00 f 0.00 17495 31 126 0.00 0.00 0.00 0.00 f 0.00 14783 47 126 0.00 0.00 0.00 0.00 f 0.00 19971 99 114 110000.00 110000.00 0.00 0.00 f 0.00 19972 100 114 110000.00 110000.00 0.00 0.00 f 0.00 19973 101 114 110000.00 110000.00 0.00 0.00 f 0.00 19974 102 114 110000.00 110000.00 0.00 0.00 f 0.00 19980 96 102 31446.41 31446.41 0.00 0.00 f 0.00 19981 97 102 31446.41 31446.41 0.00 0.00 f 0.00 19982 98 102 31446.41 31446.41 0.00 0.00 f 0.00 19983 99 102 31446.41 31446.41 0.00 0.00 f 0.00 19984 100 102 31446.41 31446.41 0.00 0.00 f 0.00 19985 101 102 31446.41 31446.41 0.00 0.00 f 0.00 19986 102 102 31446.41 31446.41 0.00 0.00 f 0.00 19987 103 102 31446.41 31446.41 0.00 0.00 f 0.00 20954 105 102 31446.41 31446.41 0.00 0.00 f 0.00 20955 106 102 31446.41 31446.41 0.00 0.00 f 0.00 20956 107 102 31446.41 31446.41 0.00 0.00 f 0.00 20957 108 102 31446.41 31446.41 0.00 0.00 f 0.00 20958 109 102 31446.41 31446.41 0.00 0.00 f 0.00 20959 110 102 31446.41 31446.41 0.00 0.00 f 0.00 20960 111 102 31446.41 31446.41 0.00 0.00 f 0.00 20961 112 102 31446.41 31446.41 0.00 0.00 f 0.00 20962 113 102 31446.41 31446.41 0.00 0.00 f 0.00 20963 114 102 31446.41 31446.41 0.00 0.00 f 0.00 20964 115 102 31446.41 31446.41 0.00 0.00 f 0.00 20965 116 102 31446.41 31446.41 0.00 0.00 f 0.00 20979 106 121 0.00 0.00 0.00 0.00 f 0.00 20980 107 121 0.00 0.00 0.00 0.00 f 0.00 20983 110 121 0.00 0.00 0.00 0.00 f 0.00 20984 111 121 0.00 0.00 0.00 0.00 f 0.00 20985 112 121 0.00 0.00 0.00 0.00 f 0.00 20986 113 121 0.00 0.00 0.00 0.00 f 0.00 21407 114 160 0.00 0.00 0.00 0.00 f 0.00 21408 115 160 0.00 0.00 0.00 0.00 f 0.00 21409 116 160 0.00 0.00 0.00 0.00 f 0.00 17161 78 119 0.00 0.00 0.00 0.00 f 0.00 17162 79 119 0.00 0.00 0.00 0.00 f 0.00 17165 82 119 0.00 0.00 0.00 0.00 f 0.00 17166 83 119 0.00 0.00 0.00 0.00 f 0.00 17167 84 119 0.00 0.00 0.00 0.00 f 0.00 17168 85 119 0.00 0.00 0.00 0.00 f 0.00 17169 86 119 0.00 0.00 0.00 0.00 f 0.00 17170 87 119 0.00 0.00 0.00 0.00 f 0.00 17171 88 119 0.00 0.00 0.00 0.00 f 0.00 14785 47 127 0.00 0.00 0.00 0.00 f 0.00 16696 54 112 0.00 0.00 0.00 0.00 f 0.00 16697 55 112 0.00 0.00 0.00 0.00 f 0.00 16698 56 112 0.00 0.00 0.00 0.00 f 0.00 16699 57 112 0.00 0.00 0.00 0.00 f 0.00 16700 58 112 0.00 0.00 0.00 0.00 f 0.00 16701 59 112 0.00 0.00 0.00 0.00 f 0.00 16702 60 112 0.00 0.00 0.00 0.00 f 0.00 16703 61 112 0.00 0.00 0.00 0.00 f 0.00 16704 62 112 0.00 0.00 0.00 0.00 f 0.00 16705 63 112 0.00 0.00 0.00 0.00 f 0.00 16731 89 112 0.00 0.00 0.00 0.00 f 0.00 16734 92 112 0.00 0.00 0.00 0.00 f 0.00 15980 29 101 0.00 0.00 0.00 0.00 f 0.00 15981 28 101 0.00 281.40 281.40 0.00 f 0.00 15983 31 101 2.90 2.90 0.00 0.00 f 0.00 15994 42 101 0.00 180.00 180.00 0.00 f 0.00 15995 43 101 180.00 181.00 1.00 0.00 f 0.00 15996 44 101 181.00 181.00 0.00 0.00 f 0.00 15997 45 101 181.00 181.00 0.00 0.00 f 0.00 15999 50 101 181.00 181.00 0.00 0.00 f 0.00 16000 51 101 181.00 181.00 0.00 0.00 f 0.00 20991 106 98 0.00 0.00 0.00 0.00 f 0.00 19794 102 117 1228.17 1228.17 0.00 0.00 f 0.00 19795 103 117 1228.17 1228.17 0.00 0.00 f 0.00 19828 100 94 20216.12 20216.12 0.00 0.00 f 0.00 19829 101 94 20216.12 20216.12 0.00 0.00 f 0.00 19830 102 94 20216.12 20216.12 0.00 0.00 f 0.00 17451 53 125 0.00 0.00 0.00 0.00 f 0.00 17452 54 125 0.00 0.00 0.00 0.00 f 0.00 17453 55 125 0.00 0.00 0.00 0.00 f 0.00 17454 56 125 0.00 0.00 0.00 0.00 f 0.00 17455 57 125 0.00 0.00 0.00 0.00 f 0.00 17456 58 125 0.00 0.00 0.00 0.00 f 0.00 17457 59 125 0.00 0.00 0.00 0.00 f 0.00 17458 60 125 0.00 0.00 0.00 0.00 f 0.00 17459 61 125 0.00 0.00 0.00 0.00 f 0.00 17460 62 125 0.00 0.00 0.00 0.00 f 0.00 19844 104 125 0.00 0.00 0.00 0.00 f 0.00 17496 32 126 0.00 0.00 0.00 0.00 f 0.00 16273 72 105 631.35 631.35 0.00 0.00 f 0.00 19487 71 158 0.00 0.00 0.00 0.00 f 0.00 19488 72 158 0.00 0.00 0.00 0.00 f 0.00 19489 73 158 0.00 0.00 0.00 0.00 f 0.00 19490 74 158 0.00 0.00 0.00 0.00 f 0.00 19491 75 158 0.00 0.00 0.00 0.00 f 0.00 19492 76 158 0.00 0.00 0.00 0.00 f 0.00 19504 88 158 -1000.00 -1000.00 0.00 0.00 f 0.00 19505 89 158 -1000.00 -1100.00 0.00 100.00 f 0.00 19506 90 158 -1100.00 -1100.00 0.00 0.00 f 0.00 19507 91 158 -1100.00 -1100.00 0.00 0.00 f 0.00 19508 92 158 -1100.00 -1100.00 0.00 0.00 f 0.00 17479 81 125 0.00 0.00 0.00 0.00 f 0.00 17480 82 125 0.00 0.00 0.00 0.00 f 0.00 17481 83 125 0.00 0.00 0.00 0.00 f 0.00 17482 84 125 0.00 0.00 0.00 0.00 f 0.00 17483 85 125 0.00 0.00 0.00 0.00 f 0.00 17484 86 125 0.00 0.00 0.00 0.00 f 0.00 17485 87 125 0.00 0.00 0.00 0.00 f 0.00 17486 88 125 0.00 0.00 0.00 0.00 f 0.00 15850 90 98 0.00 0.00 0.00 0.00 f 0.00 20013 93 98 0.00 0.00 0.00 0.00 f 0.00 20014 94 98 0.00 0.00 0.00 0.00 f 0.00 21125 108 120 0.00 0.00 0.00 0.00 f 0.00 21126 109 120 0.00 0.00 0.00 0.00 f 0.00 21127 110 120 0.00 0.00 0.00 0.00 f 0.00 21128 111 120 0.00 0.00 0.00 0.00 f 0.00 21129 112 120 0.00 0.00 0.00 0.00 f 0.00 21130 113 120 0.00 0.00 0.00 0.00 f 0.00 21131 114 120 0.00 0.00 0.00 0.00 f 0.00 21132 115 120 0.00 0.00 0.00 0.00 f 0.00 21133 116 120 0.00 0.00 0.00 0.00 f 0.00 18378 32 140 0.00 0.00 0.00 0.00 f 0.00 18383 37 140 0.00 0.00 0.00 0.00 f 0.00 18384 38 140 0.00 0.00 0.00 0.00 f 0.00 18385 39 140 0.00 0.00 0.00 0.00 f 0.00 18398 55 140 0.00 0.00 0.00 0.00 f 0.00 18399 56 140 0.00 0.00 0.00 0.00 f 0.00 16149 74 103 376839.10 454089.10 77250.00 0.00 f 0.00 16151 76 103 531339.10 623839.10 92500.00 0.00 f 0.00 19629 93 103 0.00 100000.00 100000.00 0.00 f 0.00 19630 94 103 100000.00 100000.00 0.00 0.00 f 0.00 21410 96 161 0.00 3400.00 3400.00 0.00 f 0.00 14797 47 133 0.00 0.00 0.00 0.00 f 0.00 17674 87 128 -3959.81 -3959.81 0.00 0.00 f 0.00 17675 88 128 -3959.81 -3959.81 0.00 0.00 f 0.00 17676 89 128 -3959.81 -3959.81 0.00 0.00 f 0.00 17677 90 128 -3959.81 -3959.81 0.00 0.00 f 0.00 17678 91 128 -3959.81 -3959.81 0.00 0.00 f 0.00 17679 92 128 -3959.81 -3959.81 0.00 0.00 f 0.00 17231 85 120 -700.00 -700.00 0.00 0.00 f 0.00 17232 86 120 -700.00 -2630.00 0.00 1930.00 f 0.00 20145 93 120 0.00 0.00 0.00 0.00 f 0.00 20146 94 120 0.00 0.00 0.00 0.00 f 0.00 20147 95 120 0.00 -989.00 0.00 989.00 f 0.00 20148 96 120 -989.00 -1344.00 0.00 355.00 f 0.00 20149 97 120 -1344.00 -1344.00 0.00 0.00 f 0.00 20150 98 120 -1344.00 -1344.00 0.00 0.00 f 0.00 20151 99 120 -1344.00 -1344.00 0.00 0.00 f 0.00 20152 100 120 -1344.00 -1344.00 0.00 0.00 f 0.00 20153 101 120 -1344.00 -1344.00 0.00 0.00 f 0.00 20154 102 120 -1344.00 -1344.00 0.00 0.00 f 0.00 20155 103 120 -1344.00 -1344.00 0.00 0.00 f 0.00 20156 104 120 -1344.00 -1344.00 0.00 0.00 f 0.00 14773 47 120 0.00 0.00 0.00 0.00 f 0.00 18412 69 140 0.00 0.00 0.00 0.00 f 0.00 18431 88 140 2025.00 2025.00 0.00 0.00 f 0.00 18432 89 140 2025.00 2025.00 0.00 0.00 f 0.00 20157 93 140 0.00 0.00 0.00 0.00 f 0.00 20158 94 140 0.00 103350.00 103350.00 0.00 f 0.00 20159 95 140 103350.00 103350.00 0.00 0.00 f 0.00 20160 96 140 103350.00 103350.00 0.00 0.00 f 0.00 20161 97 140 103350.00 103350.00 0.00 0.00 f 0.00 20162 98 140 103350.00 103350.00 0.00 0.00 f 0.00 17875 33 132 0.00 0.00 0.00 0.00 f 0.00 17877 35 132 0.00 0.00 0.00 0.00 f 0.00 17878 36 132 0.00 0.00 0.00 0.00 f 0.00 17879 37 132 0.00 0.00 0.00 0.00 f 0.00 17880 38 132 0.00 0.00 0.00 0.00 f 0.00 17881 39 132 0.00 0.00 0.00 0.00 f 0.00 17882 40 132 0.00 0.00 0.00 0.00 f 0.00 17883 41 132 0.00 0.00 0.00 0.00 f 0.00 17884 42 132 0.00 0.00 0.00 0.00 f 0.00 17885 43 132 0.00 0.00 0.00 0.00 f 0.00 17886 44 132 0.00 0.00 0.00 0.00 f 0.00 17887 45 132 0.00 0.00 0.00 0.00 f 0.00 17888 49 132 0.00 0.00 0.00 0.00 f 0.00 17889 50 132 0.00 0.00 0.00 0.00 f 0.00 17890 51 132 0.00 0.00 0.00 0.00 f 0.00 17891 52 132 0.00 100.00 100.00 0.00 f 0.00 17892 53 132 100.00 200.00 100.00 0.00 f 0.00 17893 54 132 200.00 200.00 0.00 0.00 f 0.00 21380 111 158 0.00 0.00 0.00 0.00 f 0.00 21381 112 158 0.00 0.00 0.00 0.00 f 0.00 21382 113 158 0.00 0.00 0.00 0.00 f 0.00 21383 114 158 0.00 0.00 0.00 0.00 f 0.00 21384 115 158 0.00 0.00 0.00 0.00 f 0.00 17961 59 133 0.00 0.00 0.00 0.00 f 0.00 17962 60 133 0.00 0.00 0.00 0.00 f 0.00 17963 61 133 0.00 0.00 0.00 0.00 f 0.00 17964 62 133 0.00 0.00 1980.00 1980.00 f 0.00 17966 64 133 0.00 0.00 0.00 0.00 f 0.00 17967 65 133 0.00 0.00 0.00 0.00 f 0.00 17968 66 133 0.00 0.00 1000.00 1000.00 f 0.00 17969 67 133 0.00 0.00 0.00 0.00 f 0.00 17970 68 133 0.00 0.00 0.00 0.00 f 0.00 17971 69 133 0.00 0.00 0.00 0.00 f 0.00 17972 70 133 0.00 0.00 0.00 0.00 f 0.00 17973 71 133 0.00 0.00 0.00 0.00 f 0.00 17974 72 133 0.00 0.00 0.00 0.00 f 0.00 17975 73 133 0.00 0.00 0.00 0.00 f 0.00 17979 77 133 0.00 0.00 10075.00 10075.00 f 0.00 17980 78 133 0.00 0.00 0.00 0.00 f 0.00 17981 79 133 0.00 0.00 0.00 0.00 f 0.00 17982 80 133 0.00 0.00 0.00 0.00 f 0.00 17983 81 133 0.00 0.00 0.00 0.00 f 0.00 17984 82 133 0.00 0.00 0.00 0.00 f 0.00 17987 85 133 0.00 0.00 0.00 0.00 f 0.00 17988 86 133 0.00 0.00 0.00 0.00 f 0.00 17989 87 133 0.00 148500.00 148500.00 0.00 f 0.00 17990 88 133 148500.00 346500.00 198000.00 0.00 f 0.00 17991 89 133 346500.00 0.00 0.00 346500.00 f 0.00 17992 90 133 0.00 0.00 0.00 0.00 f 0.00 17993 91 133 0.00 20227.65 20227.65 0.00 f 0.00 14803 47 136 0.00 0.00 0.00 0.00 f 0.00 16001 52 101 181.00 181.50 0.50 0.00 f 0.00 16002 53 101 181.50 189.00 7.50 0.00 f 0.00 15713 79 96 -12.82 -12.82 0.00 0.00 f 0.00 15714 80 96 -12.82 -12.82 25634.00 25634.00 f 0.00 15715 81 96 -12.82 0.00 12.82 0.00 f 0.00 15716 82 96 0.00 0.00 0.00 0.00 f 0.00 15717 83 96 0.00 0.00 24588.78 24588.78 f 0.00 15968 82 100 100.00 100.00 0.00 0.00 f 0.00 15969 83 100 100.00 100.00 0.00 0.00 f 0.00 15907 84 99 0.00 0.00 72000.00 72000.00 f 0.00 16799 29 114 0.00 0.00 10000.00 10000.00 f 0.00 16803 32 114 0.00 0.00 0.00 0.00 f 0.00 16808 37 114 0.00 0.00 0.00 0.00 f 0.00 16809 38 114 0.00 0.00 0.00 0.00 f 0.00 16099 87 102 11775.23 14087.73 2312.50 0.00 f 0.00 16100 88 102 14087.73 14087.73 0.00 0.00 f 0.00 16101 89 102 14087.73 14087.73 0.00 0.00 f 0.00 16102 90 102 14087.73 14087.73 0.00 0.00 f 0.00 16103 91 102 14087.73 14087.73 0.00 0.00 f 0.00 14790 48 129 0.00 0.00 0.00 0.00 f 0.00 19290 65 155 0.00 0.00 0.00 0.00 f 0.00 18132 38 136 0.00 0.00 0.00 0.00 f 0.00 18133 39 136 0.00 0.00 0.00 0.00 f 0.00 18134 40 136 0.00 0.00 0.00 0.00 f 0.00 18135 41 136 0.00 0.00 0.00 0.00 f 0.00 18136 42 136 0.00 0.00 0.00 0.00 f 0.00 18137 43 136 0.00 0.00 0.00 0.00 f 0.00 18138 44 136 0.00 0.00 0.00 0.00 f 0.00 18139 45 136 0.00 0.00 0.00 0.00 f 0.00 18140 49 136 0.00 0.00 0.00 0.00 f 0.00 18141 50 136 0.00 0.00 0.00 0.00 f 0.00 18142 51 136 0.00 0.00 0.00 0.00 f 0.00 18143 52 136 0.00 0.00 0.00 0.00 f 0.00 18144 53 136 0.00 0.00 0.00 0.00 f 0.00 18145 54 136 0.00 0.00 0.00 0.00 f 0.00 18146 55 136 0.00 0.00 0.00 0.00 f 0.00 18147 56 136 0.00 70.20 70.20 0.00 f 0.00 18148 57 136 0.00 0.00 0.00 0.00 f 0.00 18149 58 136 0.00 0.00 0.00 0.00 f 0.00 18150 59 136 0.00 0.00 0.00 0.00 f 0.00 18151 60 136 0.00 0.00 0.00 0.00 f 0.00 18152 61 136 0.00 0.00 0.00 0.00 f 0.00 18153 62 136 0.00 0.00 0.00 0.00 f 0.00 15790 46 98 0.00 0.00 0.00 0.00 f 0.00 15796 33 98 0.00 0.00 0.00 0.00 f 0.00 15800 37 98 0.00 0.00 0.00 0.00 f 0.00 15801 38 98 0.00 0.00 0.00 0.00 f 0.00 15806 43 98 0.00 0.00 0.00 0.00 f 0.00 15807 44 98 0.00 0.00 0.00 0.00 f 0.00 15808 45 98 0.00 0.00 0.00 0.00 f 0.00 18215 61 137 0.00 0.00 0.00 0.00 f 0.00 18216 62 137 0.00 0.00 0.00 0.00 f 0.00 18217 63 137 0.00 0.00 0.00 0.00 f 0.00 18218 64 137 0.00 0.00 0.00 0.00 f 0.00 18219 65 137 0.00 0.00 0.00 0.00 f 0.00 18220 66 137 0.00 0.00 0.00 0.00 f 0.00 18221 67 137 0.00 0.00 0.00 0.00 f 0.00 18222 68 137 0.00 0.00 0.00 0.00 f 0.00 17192 43 120 -5000.00 -5128.50 0.00 128.50 f 0.00 17193 44 120 -5128.50 -5128.50 0.00 0.00 f 0.00 17194 45 120 -5128.50 -5628.50 0.00 500.00 f 0.00 17195 49 120 -5628.50 -5628.50 0.00 0.00 f 0.00 17196 50 120 -5628.50 -5628.50 0.00 0.00 f 0.00 17197 51 120 -5628.50 -5628.50 0.00 0.00 f 0.00 17198 52 120 -5628.50 -5628.50 0.00 0.00 f 0.00 17199 53 120 -5628.50 -5678.50 0.00 50.00 f 0.00 17200 54 120 -5678.50 -5678.50 0.00 0.00 f 0.00 17201 55 120 -5678.50 -5678.50 0.00 0.00 f 0.00 17202 56 120 -5678.50 -5678.50 0.00 0.00 f 0.00 18316 33 139 0.00 0.00 0.00 0.00 f 0.00 18317 34 139 0.00 0.00 0.00 0.00 f 0.00 18372 92 139 -4474.20 -4974.20 0.00 500.00 f 0.00 18381 35 140 0.00 0.00 0.00 0.00 f 0.00 18382 36 140 0.00 0.00 0.00 0.00 f 0.00 14815 47 142 0.00 0.00 0.00 0.00 f 0.00 18690 28 145 0.00 0.00 0.00 0.00 f 0.00 18691 30 145 0.00 0.00 0.00 0.00 f 0.00 18693 32 145 0.00 0.00 0.00 0.00 f 0.00 18695 34 145 0.00 0.00 0.00 0.00 f 0.00 18702 41 145 0.00 0.00 0.00 0.00 f 0.00 18703 42 145 0.00 0.00 0.00 0.00 f 0.00 18716 58 145 0.00 0.00 0.00 0.00 f 0.00 18717 59 145 0.00 0.00 0.00 0.00 f 0.00 18751 46 146 0.00 0.00 0.00 0.00 f 0.00 18756 32 146 0.00 0.00 0.00 0.00 f 0.00 18813 92 146 -790.49 -790.49 0.00 0.00 f 0.00 18814 46 147 0.00 0.00 0.00 0.00 f 0.00 18815 29 147 0.00 0.00 0.00 0.00 f 0.00 18816 28 147 0.00 0.00 0.00 0.00 f 0.00 18817 30 147 0.00 0.00 0.00 0.00 f 0.00 18820 33 147 0.00 0.00 0.00 0.00 f 0.00 18822 35 147 0.00 0.00 0.00 0.00 f 0.00 18823 36 147 0.00 0.00 0.00 0.00 f 0.00 18824 37 147 0.00 0.00 0.00 0.00 f 0.00 18825 38 147 0.00 0.00 0.00 0.00 f 0.00 18826 39 147 0.00 0.00 0.00 0.00 f 0.00 18827 40 147 0.00 0.00 0.00 0.00 f 0.00 18828 41 147 0.00 0.00 0.00 0.00 f 0.00 18829 42 147 0.00 0.00 0.00 0.00 f 0.00 18839 55 147 0.00 0.00 0.00 0.00 f 0.00 18840 56 147 0.00 0.00 0.00 0.00 f 0.00 18841 57 147 0.00 0.00 0.00 0.00 f 0.00 18520 51 142 0.00 0.00 0.00 0.00 f 0.00 18521 52 142 0.00 0.00 0.00 0.00 f 0.00 18522 53 142 0.00 0.00 0.00 0.00 f 0.00 18523 54 142 0.00 0.00 0.00 0.00 f 0.00 18524 55 142 0.00 0.00 0.00 0.00 f 0.00 18525 56 142 0.00 0.00 0.00 0.00 f 0.00 18526 57 142 0.00 0.00 0.00 0.00 f 0.00 18527 58 142 0.00 0.00 0.00 0.00 f 0.00 18528 59 142 0.00 0.00 0.00 0.00 f 0.00 18529 60 142 0.00 0.00 0.00 0.00 f 0.00 18530 61 142 0.00 0.00 0.00 0.00 f 0.00 18531 62 142 0.00 0.00 0.00 0.00 f 0.00 18532 63 142 0.00 0.00 0.00 0.00 f 0.00 18533 64 142 0.00 0.00 0.00 0.00 f 0.00 18534 65 142 0.00 0.00 0.00 0.00 f 0.00 18535 66 142 0.00 0.00 0.00 0.00 f 0.00 18536 67 142 0.00 0.00 0.00 0.00 f 0.00 18537 68 142 0.00 0.00 0.00 0.00 f 0.00 18538 69 142 0.00 0.00 0.00 0.00 f 0.00 18539 70 142 0.00 0.00 0.00 0.00 f 0.00 18540 71 142 0.00 0.00 0.00 0.00 f 0.00 18541 72 142 0.00 0.00 0.00 0.00 f 0.00 18542 73 142 0.00 0.00 0.00 0.00 f 0.00 18543 74 142 0.00 0.00 0.00 0.00 f 0.00 18544 75 142 0.00 0.00 0.00 0.00 f 0.00 18545 76 142 0.00 0.00 0.00 0.00 f 0.00 18546 77 142 0.00 153.86 153.86 0.00 f 0.00 18547 78 142 153.86 593.46 439.60 0.00 f 0.00 18895 45 148 0.00 0.00 0.00 0.00 f 0.00 18896 49 148 0.00 0.00 0.00 0.00 f 0.00 18897 50 148 0.00 0.00 0.00 0.00 f 0.00 18906 59 148 0.00 0.00 0.00 0.00 f 0.00 18907 60 148 0.00 0.00 0.00 0.00 f 0.00 18908 61 148 0.00 0.00 0.00 0.00 f 0.00 18909 62 148 0.00 0.00 0.00 0.00 f 0.00 18910 63 148 0.00 0.00 0.00 0.00 f 0.00 18911 64 148 0.00 0.00 0.00 0.00 f 0.00 18912 65 148 0.00 0.00 0.00 0.00 f 0.00 18913 66 148 0.00 0.00 0.00 0.00 f 0.00 18914 67 148 0.00 0.00 0.00 0.00 f 0.00 18915 68 148 0.00 0.00 0.00 0.00 f 0.00 18916 69 148 0.00 0.00 0.00 0.00 f 0.00 18917 70 148 0.00 0.00 0.00 0.00 f 0.00 18918 71 148 0.00 0.00 0.00 0.00 f 0.00 18505 33 142 0.00 0.00 0.00 0.00 f 0.00 18506 34 142 0.00 0.00 0.00 0.00 f 0.00 18517 45 142 0.00 0.00 0.00 0.00 f 0.00 18518 49 142 0.00 0.00 0.00 0.00 f 0.00 18519 50 142 0.00 0.00 0.00 0.00 f 0.00 14964 86 84 2943883.17 2943883.17 0.00 0.00 f 0.00 14965 87 84 2943883.17 2943883.17 0.00 0.00 f 0.00 14966 88 84 2943883.17 2943883.17 0.00 0.00 f 0.00 14967 89 84 2943883.17 2943883.17 0.00 0.00 f 0.00 14968 90 84 2943883.17 2943883.17 0.00 0.00 f 0.00 14969 91 84 2943883.17 2943883.17 0.00 0.00 f 0.00 14970 92 84 2943883.17 2943883.17 0.00 0.00 f 0.00 16131 56 103 649056.71 701169.08 52112.37 0.00 f 0.00 16132 57 103 0.00 77250.00 77250.00 0.00 f 0.00 16137 62 103 408857.85 510888.47 102030.62 0.00 f 0.00 16150 75 103 454089.10 531339.10 77250.00 0.00 f 0.00 16152 77 103 623839.10 701505.09 77665.99 0.00 f 0.00 16153 78 103 701505.09 747755.09 46250.00 0.00 f 0.00 16156 81 103 0.00 77250.00 77250.00 0.00 f 0.00 16157 82 103 77250.00 154500.00 77250.00 0.00 f 0.00 16158 83 103 154500.00 213299.00 58799.00 0.00 f 0.00 16159 84 103 213299.00 290549.00 77250.00 0.00 f 0.00 18563 29 143 0.00 0.00 0.00 0.00 f 0.00 18569 34 143 0.00 0.00 0.00 0.00 f 0.00 18577 42 143 0.00 0.00 0.00 0.00 f 0.00 18578 43 143 0.00 0.00 0.00 0.00 f 0.00 18579 44 143 0.00 0.00 0.00 0.00 f 0.00 18580 45 143 0.00 0.00 0.00 0.00 f 0.00 18592 60 143 0.00 0.00 0.00 0.00 f 0.00 18645 50 144 0.00 0.00 0.00 0.00 f 0.00 18646 51 144 0.00 0.00 0.00 0.00 f 0.00 18648 53 144 0.00 0.00 0.00 0.00 f 0.00 18649 54 144 0.00 0.00 0.00 0.00 f 0.00 18650 55 144 0.00 0.00 0.00 0.00 f 0.00 19510 82 159 0.00 0.00 0.00 0.00 f 0.00 19511 83 159 0.00 0.00 0.00 0.00 f 0.00 19512 84 159 0.00 0.00 0.00 0.00 f 0.00 19513 85 159 0.00 0.00 0.00 0.00 f 0.00 19514 86 159 0.00 0.00 0.00 0.00 f 0.00 19515 87 159 0.00 0.00 0.00 0.00 f 0.00 19516 88 159 0.00 0.00 0.00 0.00 f 0.00 19517 89 159 0.00 0.00 0.00 0.00 f 0.00 19518 90 159 0.00 0.00 0.00 0.00 f 0.00 19519 91 159 0.00 0.00 0.00 0.00 f 0.00 19520 92 159 0.00 -456.05 0.00 456.05 f 0.00 20409 93 159 0.00 0.00 0.00 0.00 f 0.00 20410 94 159 0.00 0.00 0.00 0.00 f 0.00 20411 95 159 0.00 0.00 0.00 0.00 f 0.00 20412 96 159 0.00 0.00 0.00 0.00 f 0.00 20413 97 159 0.00 0.00 0.00 0.00 f 0.00 14962 84 84 2943883.17 2943883.17 0.00 0.00 f 0.00 14963 85 84 2943883.17 2943883.17 0.00 0.00 f 0.00 18772 51 146 0.00 0.00 0.00 0.00 f 0.00 18773 52 146 0.00 0.00 0.00 0.00 f 0.00 18774 53 146 0.00 0.00 0.00 0.00 f 0.00 18775 54 146 0.00 0.00 0.00 0.00 f 0.00 18776 55 146 0.00 0.00 0.00 0.00 f 0.00 18777 56 146 0.00 0.00 0.00 0.00 f 0.00 18778 57 146 0.00 0.00 0.00 0.00 f 0.00 18994 84 149 0.00 0.00 0.00 0.00 f 0.00 18995 85 149 0.00 0.00 0.00 0.00 f 0.00 18996 86 149 0.00 0.00 0.00 0.00 f 0.00 18997 87 149 0.00 0.00 0.00 0.00 f 0.00 18998 88 149 0.00 0.00 0.00 0.00 f 0.00 18999 89 149 0.00 0.00 0.00 0.00 f 0.00 19000 90 149 0.00 0.00 0.00 0.00 f 0.00 19001 91 149 0.00 0.00 0.00 0.00 f 0.00 14829 47 149 0.00 0.00 0.00 0.00 f 0.00 19003 46 150 0.00 0.00 0.00 0.00 f 0.00 19005 28 150 0.00 0.00 0.00 0.00 f 0.00 19006 30 150 0.00 0.00 0.00 0.00 f 0.00 19008 32 150 0.00 0.00 0.00 0.00 f 0.00 19009 33 150 0.00 0.00 0.00 0.00 f 0.00 19011 35 150 0.00 0.00 0.00 0.00 f 0.00 20414 98 159 0.00 0.00 0.00 0.00 f 0.00 20415 99 159 0.00 0.00 0.00 0.00 f 0.00 20416 100 159 0.00 0.00 0.00 0.00 f 0.00 20417 101 159 0.00 0.00 0.00 0.00 f 0.00 20418 102 159 0.00 0.00 0.00 0.00 f 0.00 20419 103 159 0.00 0.00 0.00 0.00 f 0.00 20420 104 159 0.00 0.00 0.00 0.00 f 0.00 19509 81 159 0.00 0.00 0.00 0.00 f 0.00 15236 40 89 0.00 0.00 0.00 0.00 f 0.00 15237 41 89 0.00 0.00 0.00 0.00 f 0.00 15238 42 89 0.00 0.00 0.00 0.00 f 0.00 15239 43 89 0.00 0.00 0.00 0.00 f 0.00 15246 53 89 0.00 0.00 0.00 0.00 f 0.00 15247 54 89 0.00 0.00 0.00 0.00 f 0.00 15248 55 89 0.00 0.00 0.00 0.00 f 0.00 15249 56 89 0.00 0.00 0.00 0.00 f 0.00 18593 61 143 0.00 0.00 0.00 0.00 f 0.00 18594 62 143 0.00 0.00 0.00 0.00 f 0.00 18597 65 143 0.00 0.00 0.00 0.00 f 0.00 18598 66 143 0.00 0.00 0.00 0.00 f 0.00 18599 67 143 0.00 0.00 0.00 0.00 f 0.00 16337 73 106 -50000.00 -50000.00 0.00 0.00 f 0.00 16338 74 106 -50000.00 0.00 64080.63 14080.63 f 0.00 16339 75 106 0.00 0.00 0.00 0.00 f 0.00 15463 81 92 0.00 0.00 0.00 0.00 f 0.00 15464 82 92 0.00 0.00 0.00 0.00 f 0.00 15465 83 92 0.00 0.00 0.00 0.00 f 0.00 15466 84 92 0.00 0.00 0.00 0.00 f 0.00 15467 85 92 0.00 0.00 0.00 0.00 f 0.00 15468 86 92 0.00 0.00 0.00 0.00 f 0.00 15469 87 92 0.00 0.00 0.00 0.00 f 0.00 15470 88 92 0.00 0.00 0.00 0.00 f 0.00 15471 89 92 0.00 0.00 0.00 0.00 f 0.00 19845 93 126 -4696.37 -4696.37 0.00 0.00 f 0.00 19846 94 126 -4696.37 -4696.37 0.00 0.00 f 0.00 19847 95 126 -4696.37 -4696.37 0.00 0.00 f 0.00 20582 105 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20583 106 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20584 107 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20585 108 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20586 109 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20587 110 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20588 111 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20589 112 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20590 113 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20591 114 106 -4530.29 -4530.29 0.00 0.00 f 0.00 19848 96 126 -4696.37 -103372.61 0.00 98676.24 f 0.00 19849 97 126 -103372.61 -103372.61 0.00 0.00 f 0.00 19850 98 126 -103372.61 -103372.61 0.00 0.00 f 0.00 19851 99 126 -103372.61 -103372.61 0.00 0.00 f 0.00 19852 100 126 -103372.61 -103372.61 0.00 0.00 f 0.00 20880 115 101 0.00 0.00 0.00 0.00 f 0.00 20881 116 101 0.00 0.00 0.00 0.00 f 0.00 16294 46 106 0.00 0.00 0.00 0.00 f 0.00 16335 71 106 -50000.00 -50000.00 0.00 0.00 f 0.00 16336 72 106 -50000.00 -50000.00 0.00 0.00 f 0.00 20914 113 100 1100.00 1100.00 0.00 0.00 f 0.00 20915 114 100 1100.00 1100.00 0.00 0.00 f 0.00 20916 115 100 1100.00 1100.00 0.00 0.00 f 0.00 20917 116 100 1100.00 1100.00 0.00 0.00 f 0.00 15287 29 90 0.00 0.00 0.00 0.00 f 0.00 15288 28 90 0.00 6053.79 6134.59 80.80 f 0.00 19941 93 90 -3989.69 -3989.69 0.00 0.00 f 0.00 19942 94 90 -3989.69 -3989.69 0.00 0.00 f 0.00 20928 115 90 0.00 0.00 0.00 0.00 f 0.00 20929 116 90 0.00 0.00 0.00 0.00 f 0.00 15163 30 88 0.00 0.00 0.00 0.00 f 0.00 15164 31 88 0.00 0.00 0.00 0.00 f 0.00 15165 32 88 0.00 0.00 0.00 0.00 f 0.00 19953 93 88 0.00 0.00 0.00 0.00 f 0.00 19954 94 88 0.00 0.00 0.00 0.00 f 0.00 19955 95 88 0.00 0.00 0.00 0.00 f 0.00 19956 96 88 0.00 0.00 0.00 0.00 f 0.00 19957 97 88 0.00 0.00 0.00 0.00 f 0.00 19958 98 88 0.00 0.00 0.00 0.00 f 0.00 19959 99 88 0.00 0.00 0.00 0.00 f 0.00 19960 100 88 0.00 0.00 0.00 0.00 f 0.00 19961 101 88 0.00 0.00 0.00 0.00 f 0.00 19962 102 88 0.00 0.00 0.00 0.00 f 0.00 19963 103 88 0.00 0.00 0.00 0.00 f 0.00 19964 104 88 0.00 0.00 0.00 0.00 f 0.00 20930 105 88 0.00 0.00 0.00 0.00 f 0.00 20931 106 88 0.00 0.00 0.00 0.00 f 0.00 20932 107 88 0.00 0.00 0.00 0.00 f 0.00 20933 108 88 0.00 0.00 0.00 0.00 f 0.00 20934 109 88 0.00 0.00 0.00 0.00 f 0.00 20935 110 88 0.00 0.00 0.00 0.00 f 0.00 20936 111 88 0.00 0.00 0.00 0.00 f 0.00 20937 112 88 0.00 0.00 0.00 0.00 f 0.00 20938 113 88 0.00 0.00 0.00 0.00 f 0.00 15074 70 86 0.00 0.00 0.00 0.00 f 0.00 15075 71 86 0.00 0.00 0.00 0.00 f 0.00 15076 72 86 0.00 0.00 0.00 0.00 f 0.00 15077 73 86 0.00 0.00 0.00 0.00 f 0.00 15078 74 86 0.00 0.00 3388.80 3388.80 f 0.00 15099 28 87 0.00 76.85 80.69 3.84 f 0.00 20911 110 100 1100.00 1100.00 0.00 0.00 f 0.00 20912 111 100 1100.00 1100.00 0.00 0.00 f 0.00 20913 112 100 1100.00 1100.00 0.00 0.00 f 0.00 16826 58 114 100000.00 100000.00 0.00 0.00 f 0.00 16827 59 114 100000.00 100000.00 0.00 0.00 f 0.00 16828 60 114 100000.00 100000.00 0.00 0.00 f 0.00 16829 61 114 100000.00 100000.00 0.00 0.00 f 0.00 16830 62 114 100000.00 100000.00 0.00 0.00 f 0.00 16831 63 114 100000.00 100000.00 0.00 0.00 f 0.00 16832 64 114 100000.00 100000.00 0.00 0.00 f 0.00 19966 94 114 110000.00 110000.00 0.00 0.00 f 0.00 19967 95 114 110000.00 110000.00 0.00 0.00 f 0.00 19968 96 114 110000.00 110000.00 0.00 0.00 f 0.00 19969 97 114 110000.00 110000.00 0.00 0.00 f 0.00 19970 98 114 110000.00 110000.00 0.00 0.00 f 0.00 17680 46 129 0.00 0.00 0.00 0.00 f 0.00 17683 30 129 0.00 0.00 0.00 0.00 f 0.00 17687 34 129 0.00 0.00 0.00 0.00 f 0.00 17712 62 129 2281.81 2281.81 0.00 0.00 f 0.00 15090 86 86 869.99 1869.99 56086.70 55086.70 f 0.00 15091 87 86 1869.99 1869.99 0.00 0.00 f 0.00 15092 88 86 1869.99 1869.99 0.00 0.00 f 0.00 15093 89 86 1869.99 1969.99 34906.82 34806.82 f 0.00 15094 90 86 1969.99 1969.99 0.00 0.00 f 0.00 15095 91 86 1969.99 1969.99 338.44 338.44 f 0.00 15096 92 86 1969.99 1969.99 0.00 0.00 f 0.00 20604 115 99 -1000.00 -1000.00 0.00 0.00 f 0.00 20605 116 99 -1000.00 -1000.00 0.00 0.00 f 0.00 16798 46 114 0.00 0.00 0.00 0.00 f 0.00 16806 35 114 0.00 0.00 0.00 0.00 f 0.00 16807 36 114 0.00 0.00 0.00 0.00 f 0.00 16817 49 114 0.00 0.00 0.00 0.00 f 0.00 16818 50 114 0.00 0.00 0.00 0.00 f 0.00 16819 51 114 0.00 0.00 0.00 0.00 f 0.00 16820 52 114 0.00 0.00 0.00 0.00 f 0.00 16821 53 114 0.00 0.00 0.00 0.00 f 0.00 16823 55 114 0.00 0.00 0.00 0.00 f 0.00 16824 56 114 0.00 0.00 0.00 0.00 f 0.00 16825 57 114 0.00 100000.00 100000.00 0.00 f 0.00 14845 46 83 0.00 0.00 0.00 0.00 f 0.00 14846 29 83 0.00 0.00 0.00 0.00 f 0.00 14861 43 83 0.00 0.00 0.00 0.00 f 0.00 14862 44 83 0.00 0.00 0.00 0.00 f 0.00 14863 45 83 0.00 0.00 0.00 0.00 f 0.00 14864 49 83 0.00 0.00 0.00 0.00 f 0.00 14865 50 83 0.00 0.00 0.00 0.00 f 0.00 14866 51 83 0.00 0.00 0.00 0.00 f 0.00 14867 52 83 0.00 0.00 0.00 0.00 f 0.00 14868 53 83 0.00 0.00 0.00 0.00 f 0.00 14869 54 83 0.00 0.00 0.00 0.00 f 0.00 14870 55 83 0.00 0.00 0.00 0.00 f 0.00 14871 56 83 0.00 0.00 0.00 0.00 f 0.00 14872 57 83 0.00 0.00 0.00 0.00 f 0.00 15383 64 91 603.54 603.54 0.00 0.00 f 0.00 15384 65 91 603.54 603.54 0.00 0.00 f 0.00 15385 66 91 603.54 603.54 0.00 0.00 f 0.00 15386 67 91 603.54 603.54 0.00 0.00 f 0.00 15387 68 91 603.54 603.54 0.00 0.00 f 0.00 15388 69 91 0.00 0.00 0.00 0.00 f 0.00 15389 70 91 0.00 0.00 0.00 0.00 f 0.00 15390 71 91 0.00 0.00 0.00 0.00 f 0.00 15391 72 91 0.00 0.00 0.00 0.00 f 0.00 15392 73 91 0.00 0.00 0.00 0.00 f 0.00 15398 79 91 66.94 66.94 0.00 0.00 f 0.00 15399 80 91 66.94 66.94 0.00 0.00 f 0.00 15400 81 91 0.00 0.00 0.00 0.00 f 0.00 15401 82 91 0.00 0.00 0.00 0.00 f 0.00 15402 83 91 0.00 0.00 0.00 0.00 f 0.00 15292 33 90 22.00 22.00 0.00 0.00 f 0.00 14921 40 84 23457.13 23457.13 0.00 0.00 f 0.00 14922 41 84 23457.13 23457.13 0.00 0.00 f 0.00 14923 42 84 1202787.24 1202787.24 0.00 0.00 f 1179330.11 14924 43 84 1202787.24 1202787.24 0.00 0.00 f 0.00 21027 106 135 0.00 0.00 0.00 0.00 f 0.00 15602 29 95 0.00 0.00 0.00 0.00 f 0.00 15652 81 95 -870.00 -870.00 50125.00 50125.00 f 0.00 20061 93 95 -870.00 -870.00 0.00 0.00 f 0.00 20062 94 95 -870.00 -870.00 0.00 0.00 f 0.00 20063 95 95 -870.00 -870.00 110000.00 110000.00 f 0.00 20064 96 95 -870.00 -870.00 25600.00 25600.00 f 0.00 20065 97 95 -870.00 76130.00 187000.00 110000.00 f 0.00 20066 98 95 76130.00 -870.00 143000.00 220000.00 f 0.00 21042 109 95 -870.00 -870.00 0.00 0.00 f 0.00 21043 110 95 -870.00 -870.00 0.00 0.00 f 0.00 21044 111 95 -870.00 -870.00 0.00 0.00 f 0.00 21045 112 95 -870.00 -870.00 0.00 0.00 f 0.00 21046 113 95 -870.00 -870.00 0.00 0.00 f 0.00 21047 114 95 -870.00 -870.00 0.00 0.00 f 0.00 21048 115 95 -870.00 -870.00 0.00 0.00 f 0.00 15403 84 91 0.00 0.00 0.00 0.00 f 0.00 15404 85 91 0.00 0.00 0.00 0.00 f 0.00 15405 86 91 0.00 1900.00 1900.00 0.00 f 0.00 15406 87 91 1900.00 1900.00 0.00 0.00 f 0.00 15407 88 91 1900.00 1900.00 0.00 0.00 f 0.00 15418 33 92 0.00 0.00 0.00 0.00 f 0.00 15427 42 92 0.00 0.00 0.00 0.00 f 0.00 15428 43 92 0.00 0.00 0.00 0.00 f 0.00 15429 44 92 0.00 0.00 0.00 0.00 f 0.00 15430 45 92 0.00 0.00 0.00 0.00 f 0.00 15431 49 92 0.00 0.00 0.00 0.00 f 0.00 15432 50 92 0.00 0.00 0.00 0.00 f 0.00 15433 51 92 0.00 0.00 0.00 0.00 f 0.00 15434 52 92 0.00 0.00 0.00 0.00 f 0.00 15435 53 92 0.00 0.00 0.00 0.00 f 0.00 15436 54 92 0.00 0.00 0.00 0.00 f 0.00 15437 55 92 0.00 0.00 0.00 0.00 f 0.00 16740 32 113 1020000.00 1020000.00 0.00 0.00 f 0.00 14920 39 84 23457.13 23457.13 0.00 0.00 f 0.00 21050 105 105 631.35 631.35 0.00 0.00 f 0.00 15481 33 93 -5.00 -5.00 0.00 0.00 f 0.00 15482 34 93 -5.00 -5.00 0.00 0.00 f 0.00 15503 58 93 0.00 0.00 0.00 0.00 f 0.00 15504 59 93 0.00 -2.25 0.00 2.25 f 0.00 15507 62 93 -2.25 -2.25 0.00 0.00 f 0.00 15508 63 93 -2.25 -2.25 0.00 0.00 f 0.00 15509 64 93 -2.25 -2.25 0.00 0.00 f 0.00 15515 70 93 0.00 0.00 0.00 0.00 f 0.00 15516 71 93 0.00 0.00 0.00 0.00 f 0.00 15517 72 93 0.00 0.00 0.00 0.00 f 0.00 15518 73 93 0.00 0.00 0.00 0.00 f 0.00 15520 75 93 0.00 0.00 0.00 0.00 f 0.00 15521 76 93 0.00 0.00 0.00 0.00 f 0.00 15522 77 93 0.00 -10.39 0.00 10.39 f 0.00 15523 78 93 -10.39 -10.39 0.00 0.00 f 0.00 15524 79 93 -10.39 -10.39 0.00 0.00 f 0.00 16270 69 105 631.35 631.35 0.00 0.00 f 0.00 16271 70 105 631.35 631.35 0.00 0.00 f 0.00 16274 73 105 631.35 631.35 0.00 0.00 f 0.00 20074 94 105 631.35 631.35 0.00 0.00 f 0.00 20075 95 105 631.35 631.35 0.00 0.00 f 0.00 20076 96 105 631.35 631.35 0.00 0.00 f 0.00 20077 97 105 631.35 631.35 0.00 0.00 f 0.00 20078 98 105 631.35 631.35 0.00 0.00 f 0.00 20079 99 105 631.35 631.35 0.00 0.00 f 0.00 20080 100 105 631.35 631.35 0.00 0.00 f 0.00 20081 101 105 631.35 631.35 0.00 0.00 f 0.00 20082 102 105 631.35 631.35 0.00 0.00 f 0.00 20083 103 105 631.35 631.35 0.00 0.00 f 0.00 20084 104 105 631.35 631.35 0.00 0.00 f 0.00 18351 71 139 -300.00 -300.00 0.00 0.00 f 0.00 18352 72 139 -300.00 -300.00 0.00 0.00 f 0.00 15054 50 86 -0.01 -0.01 0.00 0.00 f 0.00 15055 51 86 -0.01 -0.01 0.00 0.00 f 0.00 15056 52 86 -0.01 -0.01 703.34 703.34 f 0.00 15057 53 86 -0.01 -0.01 704.18 704.18 f 0.00 15058 54 86 -0.01 -0.01 0.00 0.00 f 0.00 15754 57 97 0.00 0.00 0.00 0.00 f 0.00 15755 58 97 0.00 0.00 0.00 0.00 f 0.00 15674 37 96 0.00 0.00 0.00 0.00 f 0.00 15679 42 96 0.00 -2000.00 638.18 2638.18 f 0.00 15680 43 96 -2000.00 -2000.00 1276.36 1276.36 f 0.00 15681 44 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15682 45 96 -2000.00 -2000.00 6381.80 6381.80 f 0.00 15687 53 96 -2000.00 -2000.00 1152.18 1152.18 f 0.00 15688 54 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15689 55 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15691 57 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15692 58 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15693 59 96 -2000.00 -2000.00 1358.27 1358.27 f 0.00 15694 60 96 -2000.00 -2000.00 6381.80 6381.80 f 0.00 15695 61 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15698 64 96 -2000.00 -12271.20 0.00 10271.20 f 0.00 15699 65 96 -12271.20 -2000.00 35957.83 25686.63 f 0.00 15700 66 96 -2000.00 -2000.00 9104.79 9104.79 f 0.00 15701 67 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15702 68 96 -2000.00 0.00 44162.25 42162.25 f 0.00 18348 68 139 -2259.60 -2259.60 0.00 0.00 f 0.00 18349 69 139 0.00 -300.00 0.00 300.00 f 0.00 18350 70 139 -300.00 -300.00 0.00 0.00 f 0.00 15546 35 94 45.98 45.98 0.00 0.00 f 0.00 15547 36 94 45.98 126.87 80.89 0.00 f 0.00 15548 37 94 126.87 126.87 0.00 0.00 f 0.00 15549 38 94 126.87 126.87 0.00 0.00 f 0.00 15985 33 101 2.90 2.90 0.00 0.00 f 0.00 15988 36 101 2.90 3.90 1.00 0.00 f 0.00 15989 37 101 3.90 3.90 0.00 0.00 f 0.00 15990 38 101 3.90 3.90 0.00 0.00 f 0.00 15991 39 101 3.90 7.13 3.23 0.00 f 0.00 15992 40 101 7.13 7.13 0.00 0.00 f 0.00 15993 41 101 7.13 7.13 0.00 0.00 f 0.00 15922 33 100 0.00 0.00 0.00 0.00 f 0.00 15923 34 100 0.00 0.00 0.00 0.00 f 0.00 15958 72 100 0.00 0.00 0.00 0.00 f 0.00 15959 73 100 0.00 0.00 0.00 0.00 f 0.00 15960 74 100 0.00 0.00 0.00 0.00 f 0.00 15961 75 100 0.00 0.00 0.00 0.00 f 0.00 15962 76 100 0.00 0.00 0.00 0.00 f 0.00 15963 77 100 0.00 100.00 100.00 0.00 f 0.00 15964 78 100 100.00 100.00 0.00 0.00 f 0.00 15970 84 100 100.00 100.00 0.00 0.00 f 0.00 15971 85 100 100.00 100.00 0.00 0.00 f 0.00 15972 86 100 100.00 100.00 0.00 0.00 f 0.00 15973 87 100 100.00 100.00 0.00 0.00 f 0.00 15974 88 100 100.00 100.00 0.00 0.00 f 0.00 15975 89 100 100.00 100.00 0.00 0.00 f 0.00 15976 90 100 100.00 100.00 0.00 0.00 f 0.00 15977 91 100 100.00 100.00 0.00 0.00 f 0.00 15978 92 100 100.00 100.00 0.00 0.00 f 0.00 21123 106 120 0.00 0.00 0.00 0.00 f 0.00 21124 107 120 0.00 0.00 0.00 0.00 f 0.00 19631 95 103 100000.00 347500.00 247500.00 0.00 f 0.00 19632 96 103 347500.00 347500.00 0.00 0.00 f 0.00 19633 97 103 347500.00 347500.00 0.00 0.00 f 0.00 19634 98 103 347500.00 496000.00 148500.00 0.00 f 0.00 19635 99 103 496000.00 496000.00 0.00 0.00 f 0.00 19636 100 103 496000.00 496000.00 0.00 0.00 f 0.00 18442 33 141 0.00 0.00 0.00 0.00 f 0.00 18444 35 141 0.00 0.00 0.00 0.00 f 0.00 18445 36 141 0.00 0.00 0.00 0.00 f 0.00 18446 37 141 0.00 0.00 0.00 0.00 f 0.00 18462 56 141 0.00 0.00 0.00 0.00 f 0.00 18468 62 141 0.00 0.00 0.00 0.00 f 0.00 18469 63 141 0.00 0.00 0.00 0.00 f 0.00 18470 64 141 0.00 0.00 0.00 0.00 f 0.00 18471 65 141 0.00 0.00 0.00 0.00 f 0.00 18472 66 141 0.00 0.00 0.00 0.00 f 0.00 18473 67 141 0.00 0.00 0.00 0.00 f 0.00 18474 68 141 0.00 0.00 0.00 0.00 f 0.00 18476 70 141 31084.94 31084.94 0.00 0.00 f 0.00 14716 48 91 0.00 0.00 0.00 0.00 f 0.00 16174 33 104 0.00 0.00 0.00 0.00 f 0.00 16178 37 104 0.00 0.00 0.00 0.00 f 0.00 16179 38 104 0.00 0.00 0.00 0.00 f 0.00 16180 39 104 0.00 0.00 0.00 0.00 f 0.00 16488 32 109 -1023441.40 -1073441.40 0.00 50000.00 f 0.00 16489 33 109 -1073441.40 -1128441.40 0.00 55000.00 f 0.00 16074 62 102 1446.91 2321.18 874.27 0.00 f 0.00 18482 76 141 41415.57 41415.57 0.00 0.00 f 0.00 18483 77 141 41415.57 93068.40 51652.83 0.00 f 0.00 18484 78 141 93068.40 135368.43 42300.03 0.00 f 0.00 18485 79 141 135368.43 135368.43 0.00 0.00 f 0.00 14718 48 92 0.00 0.00 0.00 0.00 f 0.00 15422 37 92 0.00 0.00 0.00 0.00 f 0.00 14720 48 93 0.00 0.00 0.00 0.00 f 0.00 16207 69 104 0.00 0.00 0.00 0.00 f 0.00 16208 70 104 0.00 0.00 0.00 0.00 f 0.00 16209 71 104 0.00 0.00 0.00 0.00 f 0.00 16210 72 104 0.00 0.00 0.00 0.00 f 0.00 16211 73 104 0.00 0.00 0.00 0.00 f 0.00 16212 74 104 0.00 0.00 0.00 0.00 f 0.00 16213 75 104 0.00 0.00 0.00 0.00 f 0.00 16214 76 104 0.00 0.00 0.00 0.00 f 0.00 16215 77 104 0.00 0.00 0.00 0.00 f 0.00 16216 78 104 0.00 0.00 0.00 0.00 f 0.00 16217 79 104 0.00 0.00 0.00 0.00 f 0.00 18986 76 149 0.00 0.00 0.00 0.00 f 0.00 18987 77 149 0.00 0.00 0.00 0.00 f 0.00 18988 78 149 0.00 0.00 0.00 0.00 f 0.00 14722 48 94 0.00 0.00 0.00 0.00 f 0.00 15543 32 94 45.98 45.98 0.00 0.00 f 0.00 15544 33 94 45.98 45.98 0.00 0.00 f 0.00 16674 28 112 0.00 0.00 0.00 0.00 f 0.00 16296 28 106 0.00 0.00 5210.71 5210.71 f 0.00 16300 33 106 0.00 0.00 0.00 0.00 f 0.00 16308 41 106 0.00 -2068.06 0.00 2068.06 f 0.00 16312 45 106 -0.01 -0.01 44811.50 44811.50 f 0.00 16313 49 106 -0.01 -18550.13 40579.79 59129.91 f 0.00 16314 50 106 -18550.13 -18550.13 0.00 0.00 f 0.00 16315 51 106 -18550.13 -32095.13 0.00 13545.00 f 0.00 16316 52 106 -32095.13 -0.01 33129.62 1034.50 f 0.00 16317 53 106 -0.01 -0.01 2097.50 2097.50 f 0.00 16318 54 106 -0.01 -0.01 0.00 0.00 f 0.00 16321 57 106 -0.01 -0.01 0.00 0.00 f 0.00 16322 58 106 -0.01 -0.01 0.00 0.00 f 0.00 16323 59 106 -0.01 0.00 2334.68 2334.67 f 0.00 16324 60 106 0.00 0.00 14796.55 14796.55 f 0.00 16325 61 106 0.00 0.00 0.00 0.00 f 0.00 16326 62 106 0.00 -0.01 103243.88 103243.89 f 0.00 16327 63 106 -0.01 -0.01 47250.00 47250.00 f 0.00 16328 64 106 -0.01 -0.01 0.00 0.00 f 0.00 16329 65 106 -0.01 0.00 88980.56 88980.55 f 0.00 16330 66 106 0.00 0.00 95180.18 95180.18 f 0.00 16331 67 106 0.00 0.00 74455.00 74455.00 f 0.00 16332 68 106 0.00 0.00 214536.18 214536.18 f 0.00 16333 69 106 0.00 -50000.00 31913.50 81913.50 f 0.00 16237 33 105 624.22 624.22 0.00 0.00 f 0.00 16288 87 105 631.35 631.35 0.00 0.00 f 0.00 16289 88 105 631.35 631.35 0.00 0.00 f 0.00 20315 95 153 0.00 0.00 0.00 0.00 f 0.00 20316 96 153 0.00 0.00 0.00 0.00 f 0.00 20317 97 153 0.00 0.00 0.00 0.00 f 0.00 20318 98 153 0.00 0.00 0.00 0.00 f 0.00 20319 99 153 0.00 0.00 0.00 0.00 f 0.00 20320 100 153 0.00 0.00 0.00 0.00 f 0.00 20321 101 153 0.00 0.00 0.00 0.00 f 0.00 20322 102 153 0.00 0.00 0.00 0.00 f 0.00 20323 103 153 0.00 0.00 0.00 0.00 f 0.00 21290 105 153 0.00 0.00 0.00 0.00 f 0.00 21291 106 153 0.00 0.00 0.00 0.00 f 0.00 21292 107 153 0.00 0.00 0.00 0.00 f 0.00 21293 108 153 0.00 0.00 0.00 0.00 f 0.00 21294 109 153 0.00 0.00 0.00 0.00 f 0.00 21295 110 153 0.00 0.00 0.00 0.00 f 0.00 16552 33 110 0.00 0.00 0.00 0.00 f 0.00 16541 88 109 -3670820.12 -3906157.62 15600.00 250937.50 f 0.00 16542 89 109 -3906157.62 -3816012.24 189145.38 99000.00 f 0.00 16543 90 109 -3816012.24 -3920512.24 50000.00 154500.00 f 0.00 16544 91 109 -3920512.24 -3851012.24 99500.00 30000.00 f 0.00 19853 101 126 -103372.61 -103372.61 0.00 0.00 f 0.00 19854 102 126 -103372.61 -103372.61 0.00 0.00 f 0.00 19855 103 126 -103372.61 -103372.61 0.00 0.00 f 0.00 19856 104 126 -103372.61 -103372.61 0.00 0.00 f 0.00 17559 32 127 0.00 0.00 0.00 0.00 f 0.00 19857 93 127 -896642.65 -896642.65 0.00 0.00 f 0.00 19858 94 127 -896642.65 -896642.65 0.00 0.00 f 0.00 19859 95 127 -896642.65 -977142.65 0.00 80500.00 f 0.00 19860 96 127 -977142.65 -1018208.05 0.00 41065.40 f 0.00 19861 97 127 -1018208.05 -1276708.04 0.00 258499.99 f 0.00 19862 98 127 -1276708.04 -1456338.03 0.00 179629.99 f 0.00 14934 56 84 1202787.24 1202787.24 0.00 0.00 f 0.00 14937 59 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14938 60 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14939 61 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14940 62 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14941 63 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14942 64 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14943 65 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14944 66 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14945 67 84 1619923.28 1619923.28 0.00 0.00 f 0.00 14946 68 84 1619923.28 1619923.28 0.00 0.00 f 0.00 17303 29 122 0.00 0.00 0.00 0.00 f 0.00 17304 28 122 0.00 0.00 0.00 0.00 f 0.00 17306 31 122 0.00 0.00 0.00 0.00 f 0.00 14726 48 96 0.00 0.00 0.00 0.00 f 0.00 15666 28 96 0.00 -0.02 1352.07 1352.09 f 0.00 15669 32 96 0.00 0.00 0.00 0.00 f 0.00 15670 33 96 0.00 0.00 0.00 0.00 f 0.00 15671 34 96 0.00 0.00 0.00 0.00 f 0.00 15672 35 96 0.00 0.00 0.00 0.00 f 0.00 15673 36 96 0.00 0.00 492.36 492.36 f 0.00 14724 48 95 0.00 0.00 0.00 0.00 f 0.00 19080 41 152 0.00 0.00 0.00 0.00 f 0.00 19081 42 152 0.00 0.00 0.00 0.00 f 0.00 19082 43 152 0.00 0.00 0.00 0.00 f 0.00 19083 44 152 0.00 0.00 0.00 0.00 f 0.00 19293 68 155 0.00 0.00 0.00 0.00 f 0.00 19294 69 155 0.00 0.00 0.00 0.00 f 0.00 19295 70 155 0.00 0.00 0.00 0.00 f 0.00 19296 71 155 0.00 0.00 0.00 0.00 f 0.00 19297 72 155 0.00 0.00 0.00 0.00 f 0.00 19300 75 155 0.00 0.00 0.00 0.00 f 0.00 19301 76 155 0.00 0.00 0.00 0.00 f 0.00 19302 77 155 0.00 0.00 0.00 0.00 f 0.00 19303 78 155 0.00 0.00 0.00 0.00 f 0.00 16741 33 113 1020000.00 1020000.00 0.00 0.00 f 0.00 16742 34 113 1020000.00 1020000.00 0.00 0.00 f 0.00 16768 63 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16769 64 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16770 65 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16771 66 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16772 67 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16773 68 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16774 69 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16775 70 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16776 71 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16777 72 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16778 73 113 1419999.99 1419999.99 0.00 0.00 f 0.00 17353 81 122 0.00 0.00 0.00 0.00 f 0.00 17354 82 122 0.00 0.00 0.00 0.00 f 0.00 17355 83 122 0.00 1758.75 1758.75 0.00 f 0.00 17356 84 122 1758.75 1758.75 0.00 0.00 f 0.00 17363 91 122 41133.75 41483.75 350.00 0.00 f 0.00 17364 92 122 41483.75 41483.75 0.00 0.00 f 0.00 16672 46 112 0.00 0.00 0.00 0.00 f 0.00 14757 47 112 0.00 0.00 0.00 0.00 f 0.00 15984 32 101 2.90 2.90 0.00 0.00 f 0.00 19893 93 101 0.00 0.00 0.00 0.00 f 0.00 19894 94 101 0.00 0.00 0.00 0.00 f 0.00 19895 95 101 0.00 0.00 0.00 0.00 f 0.00 19896 96 101 0.00 28.00 28.00 0.00 f 0.00 19897 97 101 28.00 28.00 0.00 0.00 f 0.00 19898 98 101 28.00 28.00 0.00 0.00 f 0.00 15162 28 88 0.00 0.00 0.00 0.00 f 0.00 15166 33 88 0.00 0.00 0.00 0.00 f 0.00 15167 34 88 0.00 0.00 0.00 0.00 f 0.00 15168 35 88 0.00 0.00 0.00 0.00 f 0.00 15169 36 88 0.00 0.00 0.00 0.00 f 0.00 15170 37 88 0.00 0.00 0.00 0.00 f 0.00 15171 38 88 0.00 0.00 0.00 0.00 f 0.00 15172 39 88 0.00 0.00 0.00 0.00 f 0.00 15173 40 88 0.00 0.00 0.00 0.00 f 0.00 15174 41 88 0.00 0.00 0.00 0.00 f 0.00 15175 42 88 0.00 0.00 0.00 0.00 f 0.00 20113 97 138 -67104.60 -67104.60 0.00 0.00 f 0.00 20115 99 138 -70129.40 -70129.40 0.00 0.00 f 0.00 20116 100 138 -70129.40 -70129.40 0.00 0.00 f 0.00 20117 101 138 -70129.40 -70129.40 0.00 0.00 f 0.00 20118 102 138 -70129.40 -70129.40 0.00 0.00 f 0.00 20119 103 138 -70129.40 -70129.40 0.00 0.00 f 0.00 20120 104 138 -70129.40 -70129.40 0.00 0.00 f 0.00 20121 93 85 -270917.52 -268947.52 1970.00 0.00 f 0.00 20122 94 85 -268947.52 -268947.52 0.00 0.00 f 0.00 14813 47 141 0.00 0.00 0.00 0.00 f 0.00 18552 83 142 21.98 21.98 0.00 0.00 f 0.00 18553 84 142 21.98 21.98 0.00 0.00 f 0.00 18554 85 142 21.98 21.98 0.00 0.00 f 0.00 18555 86 142 21.98 21.98 0.00 0.00 f 0.00 18556 87 142 21.98 21.98 0.00 0.00 f 0.00 18557 88 142 21.98 21.98 0.00 0.00 f 0.00 18558 89 142 21.98 21.98 0.00 0.00 f 0.00 18559 90 142 21.98 21.98 0.00 0.00 f 0.00 18562 46 143 0.00 0.00 0.00 0.00 f 0.00 18564 28 143 0.00 0.00 0.00 0.00 f 0.00 18565 30 143 0.00 0.00 0.00 0.00 f 0.00 18567 32 143 0.00 0.00 0.00 0.00 f 0.00 18570 35 143 0.00 0.00 0.00 0.00 f 0.00 18573 38 143 0.00 0.00 0.00 0.00 f 0.00 18574 39 143 0.00 0.00 0.00 0.00 f 0.00 18575 40 143 0.00 0.00 0.00 0.00 f 0.00 18576 41 143 0.00 0.00 0.00 0.00 f 0.00 20114 98 138 -67104.60 -70690.75 892.40 4478.55 t 0.00 18581 49 143 0.00 0.00 0.00 0.00 f 0.00 18582 50 143 0.00 0.00 0.00 0.00 f 0.00 18584 52 143 0.00 0.00 0.00 0.00 f 0.00 14736 48 101 0.00 0.00 0.00 0.00 f 0.00 14734 48 100 0.00 0.00 0.00 0.00 f 0.00 14714 48 90 0.00 0.00 0.00 0.00 f 0.00 14710 48 88 0.00 0.00 0.00 0.00 f 0.00 16993 33 117 0.00 0.00 0.00 0.00 f 0.00 15188 58 88 0.00 0.00 0.00 0.00 f 0.00 15189 59 88 0.00 0.00 0.00 0.00 f 0.00 15190 60 88 0.00 0.00 0.00 0.00 f 0.00 15191 61 88 0.00 0.00 0.00 0.00 f 0.00 15192 62 88 0.00 0.00 0.00 0.00 f 0.00 15193 63 88 0.00 0.00 0.00 0.00 f 0.00 15194 64 88 0.00 0.00 0.00 0.00 f 0.00 15195 65 88 0.00 0.00 0.00 0.00 f 0.00 15196 66 88 0.00 0.00 0.00 0.00 f 0.00 14732 48 99 0.00 0.00 0.00 0.00 f 0.00 16800 28 114 0.00 0.00 0.00 0.00 f 0.00 20123 95 85 -268947.52 -268947.52 110000.00 110000.00 f 0.00 20124 96 85 -268947.52 -272266.80 32498.20 35817.48 f 0.00 20125 97 85 -272266.80 -459266.80 0.00 187000.00 f 0.00 20135 95 139 0.00 -85.00 0.00 85.00 f 0.00 20136 96 139 -85.00 -485.00 0.00 400.00 f 0.00 20137 97 139 -485.00 -3485.00 0.00 3000.00 f 0.00 20138 98 139 -3485.00 -6485.00 0.00 3000.00 f 0.00 20139 99 139 -6485.00 -6485.00 0.00 0.00 f 0.00 20140 100 139 -6485.00 -6485.00 0.00 0.00 f 0.00 20141 101 139 -6485.00 -6485.00 0.00 0.00 f 0.00 20142 102 139 -6485.00 -6485.00 0.00 0.00 f 0.00 20143 103 139 -6485.00 -6485.00 0.00 0.00 f 0.00 20144 104 139 -6485.00 -6485.00 0.00 0.00 f 0.00 21334 113 115 0.00 0.00 0.00 0.00 f 0.00 14742 48 104 0.00 0.00 0.00 0.00 f 0.00 17056 33 118 0.00 0.00 0.00 0.00 f 0.00 17057 34 118 0.00 0.00 0.00 0.00 f 0.00 17092 72 118 0.00 0.00 0.00 0.00 f 0.00 17095 75 118 0.00 0.00 0.00 0.00 f 0.00 17096 76 118 0.00 0.00 0.00 0.00 f 0.00 17097 77 118 0.00 -0.01 0.00 0.01 f 0.00 17098 78 118 -0.01 -0.01 0.00 0.00 f 0.00 17099 79 118 -0.01 -0.01 0.00 0.00 f 0.00 17105 85 118 0.00 0.00 0.00 0.00 f 0.00 20214 102 145 0.00 0.00 0.00 0.00 f 0.00 20215 103 145 0.00 0.00 0.00 0.00 f 0.00 20216 104 145 0.00 0.00 0.00 0.00 f 0.00 14821 47 145 0.00 0.00 0.00 0.00 f 0.00 18752 29 146 0.00 0.00 0.00 0.00 f 0.00 18753 28 146 0.00 0.00 0.00 0.00 f 0.00 18770 49 146 0.00 0.00 0.00 0.00 f 0.00 18771 50 146 0.00 0.00 0.00 0.00 f 0.00 18779 58 146 0.00 0.00 0.00 0.00 f 0.00 18780 59 146 0.00 0.00 0.00 0.00 f 0.00 18781 60 146 0.00 0.00 0.00 0.00 f 0.00 18782 61 146 0.00 0.00 0.00 0.00 f 0.00 15792 28 98 0.00 -29.99 0.00 29.99 f 0.00 15795 32 98 0.00 0.00 0.00 0.00 f 0.00 15840 80 98 0.00 0.00 0.00 0.00 f 0.00 15841 81 98 0.00 0.00 0.00 0.00 f 0.00 20243 95 148 0.00 0.00 0.00 0.00 f 0.00 20244 96 148 0.00 0.00 0.00 0.00 f 0.00 20245 97 148 0.00 0.00 0.00 0.00 f 0.00 20246 98 148 0.00 0.00 0.00 0.00 f 0.00 20247 99 148 0.00 0.00 0.00 0.00 f 0.00 20248 100 148 0.00 0.00 0.00 0.00 f 0.00 20249 101 148 0.00 0.00 0.00 0.00 f 0.00 20250 102 148 0.00 0.00 0.00 0.00 f 0.00 20251 103 148 0.00 0.00 0.00 0.00 f 0.00 20252 104 148 0.00 0.00 0.00 0.00 f 0.00 18940 46 149 0.00 0.00 0.00 0.00 f 0.00 18942 28 149 0.00 0.00 0.00 0.00 f 0.00 18943 30 149 0.00 0.00 0.00 0.00 f 0.00 18945 32 149 0.00 0.00 0.00 0.00 f 0.00 18946 33 149 0.00 0.00 0.00 0.00 f 0.00 18948 35 149 0.00 0.00 0.00 0.00 f 0.00 18949 36 149 0.00 0.00 0.00 0.00 f 0.00 19493 77 158 0.00 0.00 0.00 0.00 f 0.00 19494 78 158 0.00 0.00 0.00 0.00 f 0.00 19495 79 158 0.00 0.00 0.00 0.00 f 0.00 19496 80 158 0.00 0.00 0.00 0.00 f 0.00 19497 81 158 0.00 0.00 0.00 0.00 f 0.00 19498 82 158 0.00 0.00 0.00 0.00 f 0.00 19499 83 158 0.00 0.00 0.00 0.00 f 0.00 19500 84 158 0.00 0.00 0.00 0.00 f 0.00 19501 85 158 0.00 0.00 0.00 0.00 f 0.00 19502 86 158 0.00 -1000.00 0.00 1000.00 f 0.00 19503 87 158 -1000.00 -1000.00 0.00 0.00 f 0.00 17153 70 119 0.00 0.00 0.00 0.00 f 0.00 17154 71 119 0.00 0.00 0.00 0.00 f 0.00 17155 72 119 0.00 0.00 0.00 0.00 f 0.00 17156 73 119 0.00 0.00 0.00 0.00 f 0.00 17157 74 119 0.00 0.00 0.00 0.00 f 0.00 17158 75 119 0.00 0.00 0.00 0.00 f 0.00 17159 76 119 0.00 0.00 0.00 0.00 f 0.00 17160 77 119 0.00 0.00 0.00 0.00 f 0.00 17434 33 125 0.00 0.00 0.00 0.00 f 0.00 17308 33 122 0.00 0.00 0.00 0.00 f 0.00 14746 48 106 0.00 0.00 0.00 0.00 f 0.00 14730 48 98 0.00 0.00 0.00 0.00 f 0.00 14748 48 107 0.00 0.00 0.00 0.00 f 0.00 14750 48 108 0.00 -3000.00 1000.00 4000.00 f 0.00 14752 48 109 -8000.00 6000.00 22000.00 8000.00 f 0.00 17516 55 126 -24712.47 -24712.47 0.00 0.00 f 0.00 17560 33 127 0.00 0.00 0.00 0.00 f 0.00 20592 115 106 -4530.29 -4530.29 0.00 0.00 f 0.00 20593 116 106 -4530.29 -4530.29 0.00 0.00 f 0.00 15664 46 96 0.00 0.00 0.00 0.00 f 0.00 20882 105 96 0.00 0.00 0.00 0.00 f 0.00 20883 106 96 0.00 0.00 0.00 0.00 f 0.00 20884 107 96 0.00 0.00 0.00 0.00 f 0.00 20885 108 96 0.00 0.00 0.00 0.00 f 0.00 20886 109 96 0.00 0.00 0.00 0.00 f 0.00 20887 110 96 0.00 0.00 0.00 0.00 f 0.00 20888 111 96 0.00 0.00 0.00 0.00 f 0.00 20889 112 96 0.00 0.00 0.00 0.00 f 0.00 20890 113 96 0.00 0.00 0.00 0.00 f 0.00 20891 114 96 0.00 0.00 0.00 0.00 f 0.00 20892 115 96 0.00 0.00 0.00 0.00 f 0.00 20893 116 96 0.00 0.00 0.00 0.00 f 0.00 15098 29 87 0.00 0.00 0.00 0.00 f 0.00 20939 114 88 0.00 0.00 0.00 0.00 f 0.00 20940 115 88 0.00 0.00 0.00 0.00 f 0.00 15854 29 99 0.00 0.00 0.00 0.00 f 0.00 15855 28 99 0.00 250.00 14520.00 14270.00 f 0.00 15858 32 99 262.95 262.95 0.00 0.00 f 0.00 15881 58 99 -0.02 -0.02 0.00 0.00 f 0.00 15882 59 99 -0.02 -0.02 352.85 352.85 f 0.00 15883 60 99 -0.02 -0.02 1110.00 1110.00 f 0.00 15884 61 99 -0.02 -0.02 0.00 0.00 f 0.00 15885 62 99 -0.02 -0.01 14981.55 14981.54 f 0.00 15886 63 99 -0.01 -0.01 0.00 0.00 f 0.00 15898 75 99 0.00 0.00 50000.00 50000.00 f 0.00 20603 114 99 -1000.00 -1000.00 0.00 0.00 f 0.00 17713 63 129 2281.81 2281.81 0.00 0.00 f 0.00 17714 64 129 2281.81 2281.81 0.00 0.00 f 0.00 17715 65 129 2281.81 1981.81 0.00 300.00 f 0.00 17716 66 129 1981.81 3881.18 1899.37 0.00 f 0.00 17717 67 129 3881.18 3881.18 0.00 0.00 f 0.00 17718 68 129 3881.18 0.00 0.00 3881.18 f 0.00 17726 76 129 0.00 0.00 0.00 0.00 f 0.00 17732 82 129 52.78 52.78 0.00 0.00 f 0.00 17733 83 129 52.78 52.78 0.00 0.00 f 0.00 20012 104 121 0.00 0.00 0.00 0.00 f 0.00 20987 114 121 0.00 0.00 0.00 0.00 f 0.00 20988 115 121 0.00 0.00 0.00 0.00 f 0.00 20989 116 121 0.00 0.00 0.00 0.00 f 0.00 14775 47 121 0.00 0.00 0.00 0.00 f 0.00 15798 35 98 0.00 0.00 0.00 0.00 f 0.00 15799 36 98 0.00 0.00 0.00 0.00 f 0.00 15802 39 98 0.00 0.00 0.00 0.00 f 0.00 15803 40 98 0.00 0.00 0.00 0.00 f 0.00 15805 42 98 0.00 0.00 0.00 0.00 f 0.00 15829 69 98 0.00 0.00 0.00 0.00 f 0.00 15830 70 98 0.00 0.00 0.00 0.00 f 0.00 15831 71 98 0.00 0.00 0.00 0.00 f 0.00 15832 72 98 0.00 0.00 0.00 0.00 f 0.00 15833 73 98 0.00 0.00 0.00 0.00 f 0.00 15834 74 98 0.00 0.00 0.00 0.00 f 0.00 15835 75 98 0.00 0.00 0.00 0.00 f 0.00 15836 76 98 0.00 0.00 0.00 0.00 f 0.00 15837 77 98 0.00 0.00 0.00 0.00 f 0.00 14754 48 110 0.00 0.00 0.00 0.00 f 0.00 16497 41 109 -2305393.85 -2393036.85 12357.00 100000.00 f 0.00 16498 42 109 -2393036.85 -2436284.91 8820.00 52068.06 f 0.00 16499 43 109 -2436284.91 -2485514.97 3049.00 52279.06 f 0.00 16500 44 109 -2485514.97 -2535514.97 0.00 50000.00 f 0.00 16503 50 109 -2587104.58 -2637104.58 0.00 50000.00 f 0.00 17686 33 129 0.00 0.00 0.00 0.00 f 0.00 15810 50 98 0.00 0.00 0.00 0.00 f 0.00 15811 51 98 0.00 0.00 0.00 0.00 f 0.00 15812 52 98 0.00 -100.00 0.00 100.00 f 0.00 15813 53 98 -100.00 -200.00 0.00 100.00 f 0.00 15814 54 98 -200.00 -200.00 0.00 0.00 f 0.00 15815 55 98 -200.00 -200.00 0.00 0.00 f 0.00 15816 56 98 -200.00 -200.00 0.00 0.00 f 0.00 15817 57 98 0.00 0.00 0.00 0.00 f 0.00 15818 58 98 0.00 0.00 0.00 0.00 f 0.00 15819 59 98 0.00 0.00 0.00 0.00 f 0.00 15820 60 98 0.00 0.00 0.00 0.00 f 0.00 15821 61 98 0.00 0.00 0.00 0.00 f 0.00 15822 62 98 0.00 0.00 0.00 0.00 f 0.00 15823 63 98 0.00 0.00 0.00 0.00 f 0.00 15824 64 98 0.00 0.00 0.00 0.00 f 0.00 15825 65 98 0.00 0.00 0.00 0.00 f 0.00 15826 66 98 0.00 0.00 0.00 0.00 f 0.00 15827 67 98 0.00 0.00 0.00 0.00 f 0.00 15828 68 98 0.00 0.00 0.00 0.00 f 0.00 14793 47 131 0.00 0.00 0.00 0.00 f 0.00 18078 50 135 0.00 0.00 0.00 0.00 f 0.00 18079 51 135 0.00 0.00 0.00 0.00 f 0.00 18080 52 135 0.00 0.00 0.00 0.00 f 0.00 18081 53 135 0.00 0.00 0.00 0.00 f 0.00 20056 100 135 0.00 0.00 0.00 0.00 f 0.00 20057 101 135 0.00 0.00 0.00 0.00 f 0.00 20058 102 135 0.00 0.00 0.00 0.00 f 0.00 20059 103 135 0.00 0.00 0.00 0.00 f 0.00 20060 104 135 0.00 0.00 0.00 0.00 f 0.00 17938 33 133 0.00 0.00 0.00 0.00 f 0.00 17941 36 133 0.00 0.00 0.00 0.00 f 0.00 17942 37 133 0.00 0.00 0.00 0.00 f 0.00 17943 38 133 0.00 0.00 0.00 0.00 f 0.00 17944 39 133 0.00 0.00 0.00 0.00 f 0.00 17945 40 133 0.00 0.00 0.00 0.00 f 0.00 17946 41 133 0.00 0.00 0.00 0.00 f 0.00 17947 42 133 0.00 0.00 0.00 0.00 f 0.00 17948 43 133 0.00 0.00 0.00 0.00 f 0.00 17949 44 133 0.00 0.00 0.00 0.00 f 0.00 17950 45 133 0.00 0.00 0.00 0.00 f 0.00 17951 49 133 0.00 0.00 0.00 0.00 f 0.00 17952 50 133 0.00 0.00 0.00 0.00 f 0.00 14756 48 111 0.00 0.00 0.00 0.00 f 0.00 14758 48 112 0.00 0.00 0.00 0.00 f 0.00 20036 104 132 200.00 200.00 0.00 0.00 f 0.00 21002 105 132 200.00 200.00 0.00 0.00 f 0.00 21003 106 132 200.00 200.00 0.00 0.00 f 0.00 21004 107 132 200.00 200.00 0.00 0.00 f 0.00 21005 108 132 200.00 200.00 0.00 0.00 f 0.00 14795 47 132 0.00 0.00 0.00 0.00 f 0.00 17811 32 131 0.00 0.00 0.00 0.00 f 0.00 17820 41 131 0.00 0.00 0.00 0.00 f 0.00 17821 42 131 0.00 0.00 0.00 0.00 f 0.00 17822 43 131 0.00 0.00 0.00 0.00 f 0.00 21025 116 131 0.00 0.00 0.00 0.00 f 0.00 21115 110 139 0.00 0.00 0.00 0.00 f 0.00 14760 48 113 10000.00 10000.00 0.00 0.00 f 0.00 14762 48 114 0.00 0.00 0.00 0.00 f 0.00 15844 84 98 0.00 0.00 0.00 0.00 f 0.00 17894 55 132 200.00 200.00 0.00 0.00 f 0.00 17908 69 132 200.00 200.00 0.00 0.00 f 0.00 17909 70 132 200.00 200.00 0.00 0.00 f 0.00 17910 71 132 200.00 200.00 0.00 0.00 f 0.00 17911 72 132 200.00 200.00 0.00 0.00 f 0.00 17912 73 132 200.00 200.00 0.00 0.00 f 0.00 17913 74 132 200.00 200.00 0.00 0.00 f 0.00 17914 75 132 200.00 200.00 0.00 0.00 f 0.00 17915 76 132 200.00 200.00 0.00 0.00 f 0.00 17916 77 132 200.00 200.00 0.00 0.00 f 0.00 17917 78 132 200.00 200.00 0.00 0.00 f 0.00 18064 33 135 0.00 0.00 0.00 0.00 f 0.00 21097 116 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21105 112 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21106 113 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21107 114 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21108 115 85 -272266.80 -272266.80 0.00 0.00 f 0.00 21109 116 85 -272266.80 -272266.80 0.00 0.00 f 0.00 18346 66 139 -829.60 -2259.60 0.00 1430.00 f 0.00 18353 73 139 -300.00 -300.00 0.00 0.00 f 0.00 18354 74 139 -300.00 -300.00 0.00 0.00 f 0.00 20133 93 139 0.00 0.00 0.00 0.00 f 0.00 20134 94 139 0.00 0.00 0.00 0.00 f 0.00 21110 105 139 0.00 0.00 0.00 0.00 f 0.00 21111 106 139 0.00 0.00 0.00 0.00 f 0.00 21112 107 139 0.00 0.00 0.00 0.00 f 0.00 21113 108 139 0.00 0.00 0.00 0.00 f 0.00 21114 109 139 0.00 0.00 0.00 0.00 f 0.00 14766 48 116 0.00 0.00 0.00 0.00 f 0.00 19899 99 101 28.00 28.00 0.00 0.00 f 0.00 19900 100 101 28.00 28.00 0.00 0.00 f 0.00 19901 101 101 28.00 28.00 0.00 0.00 f 0.00 16850 82 114 110000.00 110000.00 0.00 0.00 f 0.00 19994 98 129 -505.22 -505.22 0.00 0.00 f 0.00 19995 99 129 -505.22 -505.22 0.00 0.00 f 0.00 19996 100 129 -505.22 -505.22 0.00 0.00 f 0.00 19997 101 129 -505.22 -505.22 0.00 0.00 f 0.00 19998 102 129 -505.22 -505.22 0.00 0.00 f 0.00 14789 47 129 0.00 0.00 0.00 0.00 f 0.00 16972 78 116 40000.00 40000.00 0.00 0.00 f 0.00 16973 79 116 40000.00 40000.00 0.00 0.00 f 0.00 16974 80 116 40000.00 40000.00 0.00 0.00 f 0.00 16975 81 116 40000.00 40000.00 0.00 0.00 f 0.00 16976 82 116 40000.00 40000.00 0.00 0.00 f 0.00 14768 48 117 0.00 0.00 0.00 0.00 f 0.00 18332 52 139 0.00 0.00 0.00 0.00 f 0.00 18333 53 139 0.00 0.00 0.00 0.00 f 0.00 18334 54 139 0.00 0.00 0.00 0.00 f 0.00 18335 55 139 0.00 0.00 0.00 0.00 f 0.00 18336 56 139 0.00 0.00 0.00 0.00 f 0.00 18337 57 139 0.00 0.00 0.00 0.00 f 0.00 18340 60 139 0.00 0.00 0.00 0.00 f 0.00 18341 61 139 0.00 0.00 0.00 0.00 f 0.00 18342 62 139 0.00 -329.60 0.00 329.60 f 0.00 18343 63 139 -329.60 -329.60 0.00 0.00 f 0.00 18344 64 139 -329.60 -499.60 0.00 170.00 f 0.00 18345 65 139 -499.60 -829.60 0.00 330.00 f 0.00 18355 75 139 -300.00 -300.00 0.00 0.00 f 0.00 18356 76 139 -300.00 -300.00 0.00 0.00 f 0.00 18357 77 139 -300.00 -900.00 0.00 600.00 f 0.00 18358 78 139 -900.00 -1570.00 0.00 670.00 f 0.00 18359 79 139 -1570.00 -1570.00 0.00 0.00 f 0.00 18360 80 139 -1570.00 -1570.00 0.00 0.00 f 0.00 18361 81 139 0.00 0.00 0.00 0.00 f 0.00 18362 82 139 0.00 0.00 0.00 0.00 f 0.00 18363 83 139 0.00 -325.00 0.00 325.00 f 0.00 18364 84 139 -325.00 -325.00 0.00 0.00 f 0.00 14772 48 119 0.00 0.00 0.00 0.00 f 0.00 18099 71 135 0.00 0.00 0.00 0.00 f 0.00 18102 74 135 0.00 0.00 0.00 0.00 f 0.00 18103 75 135 0.00 0.00 0.00 0.00 f 0.00 18104 76 135 0.00 0.00 0.00 0.00 f 0.00 18105 77 135 0.00 0.00 0.00 0.00 f 0.00 18106 78 135 0.00 0.00 0.00 0.00 f 0.00 15601 46 95 0.00 0.00 0.00 0.00 f 0.00 15613 39 95 0.00 0.00 50.00 50.00 f 0.00 16232 29 105 0.00 0.00 0.00 0.00 f 0.00 16233 28 105 0.00 216.74 216.74 0.00 f 0.00 16258 57 105 631.35 631.35 0.00 0.00 f 0.00 16259 58 105 631.35 631.35 0.00 0.00 f 0.00 16275 74 105 631.35 631.35 0.00 0.00 f 0.00 16276 75 105 631.35 631.35 0.00 0.00 f 0.00 16277 76 105 631.35 631.35 0.00 0.00 f 0.00 16278 77 105 631.35 631.35 0.00 0.00 f 0.00 16279 78 105 631.35 631.35 0.00 0.00 f 0.00 14778 48 122 0.00 0.00 0.00 0.00 f 0.00 14776 48 121 0.00 0.00 0.00 0.00 f 0.00 17241 28 121 0.00 0.00 0.00 0.00 f 0.00 16280 79 105 631.35 631.35 0.00 0.00 f 0.00 16284 83 105 631.35 631.35 0.00 0.00 f 0.00 14743 47 105 0.00 0.00 0.00 0.00 f 0.00 18190 33 137 0.00 0.00 0.00 0.00 f 0.00 14805 47 137 0.00 0.00 0.00 0.00 f 0.00 17619 28 128 0.00 0.00 0.00 0.00 f 0.00 14787 47 128 0.00 0.00 0.00 0.00 f 0.00 18282 65 138 -22444.01 -30338.51 1844.73 9739.23 f 0.00 18311 29 139 0.00 0.00 0.00 0.00 f 0.00 17350 78 122 41995.01 51380.00 9384.99 0.00 f 0.00 17351 79 122 51380.00 51380.00 0.00 0.00 f 0.00 18583 51 143 0.00 0.00 0.00 0.00 f 0.00 18600 68 143 0.00 0.00 0.00 0.00 f 0.00 18625 46 144 0.00 0.00 0.00 0.00 f 0.00 18631 33 144 0.00 0.00 0.00 0.00 f 0.00 18661 66 144 0.00 0.00 0.00 0.00 f 0.00 18662 67 144 0.00 0.00 0.00 0.00 f 0.00 18663 68 144 0.00 0.00 0.00 0.00 f 0.00 18664 69 144 0.00 0.00 0.00 0.00 f 0.00 18665 70 144 0.00 0.00 0.00 0.00 f 0.00 18666 71 144 0.00 0.00 0.00 0.00 f 0.00 18667 72 144 0.00 0.00 0.00 0.00 f 0.00 21310 113 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21311 114 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21312 115 155 -1014.64 -1014.64 0.00 0.00 f 0.00 21313 116 155 -1014.64 -1014.64 0.00 0.00 f 0.00 19349 61 156 0.00 0.00 0.00 0.00 f 0.00 19376 88 156 15000.00 15000.00 0.00 0.00 f 0.00 19377 89 156 15000.00 15000.00 0.00 0.00 f 0.00 17471 73 125 0.00 0.00 0.00 0.00 f 0.00 19999 103 129 -505.22 -505.22 0.00 0.00 f 0.00 20226 102 146 -790.49 -790.49 0.00 0.00 f 0.00 20227 103 146 -790.49 -790.49 0.00 0.00 f 0.00 20228 104 146 -790.49 -790.49 0.00 0.00 f 0.00 19468 52 158 0.00 0.00 0.00 0.00 f 0.00 19469 53 158 0.00 0.00 0.00 0.00 f 0.00 19470 54 158 0.00 0.00 0.00 0.00 f 0.00 19471 55 158 0.00 0.00 0.00 0.00 f 0.00 19472 56 158 0.00 0.00 0.00 0.00 f 0.00 19473 57 158 0.00 0.00 0.00 0.00 f 0.00 19474 58 158 0.00 0.00 0.00 0.00 f 0.00 19475 59 158 0.00 0.00 0.00 0.00 f 0.00 19476 60 158 0.00 0.00 0.00 0.00 f 0.00 19477 61 158 0.00 0.00 0.00 0.00 f 0.00 19478 62 158 0.00 0.00 0.00 0.00 f 0.00 19479 63 158 0.00 0.00 0.00 0.00 f 0.00 19480 64 158 0.00 0.00 0.00 0.00 f 0.00 19481 65 158 0.00 0.00 0.00 0.00 f 0.00 19482 66 158 0.00 0.00 0.00 0.00 f 0.00 15438 56 92 0.00 0.00 0.00 0.00 f 0.00 15439 57 92 0.00 0.00 0.00 0.00 f 0.00 15440 58 92 0.00 0.00 0.00 0.00 f 0.00 15441 59 92 0.00 -56.20 0.00 56.20 f 0.00 15442 60 92 -56.20 -56.20 0.00 0.00 f 0.00 15443 61 92 -56.20 -56.20 0.00 0.00 f 0.00 15444 62 92 -56.20 -80.95 0.00 24.75 f 0.00 15461 79 92 -26.20 -26.20 0.00 0.00 f 0.00 15462 80 92 -26.20 -50.83 0.00 24.63 f 0.00 15472 90 92 0.00 0.00 0.00 0.00 f 0.00 15473 91 92 0.00 0.00 0.00 0.00 f 0.00 15474 92 92 0.00 0.00 0.00 0.00 f 0.00 14786 48 127 0.00 0.00 0.00 0.00 f 0.00 14788 48 128 0.00 0.00 0.00 0.00 f 0.00 20211 99 145 0.00 0.00 0.00 0.00 f 0.00 20212 100 145 0.00 0.00 0.00 0.00 f 0.00 20213 101 145 0.00 0.00 0.00 0.00 f 0.00 20223 99 146 -790.49 -790.49 0.00 0.00 f 0.00 20224 100 146 -790.49 -790.49 0.00 0.00 f 0.00 20225 101 146 -790.49 -790.49 0.00 0.00 f 0.00 16175 34 104 0.00 0.00 0.00 0.00 f 0.00 19592 104 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 15809 49 98 0.00 0.00 0.00 0.00 f 0.00 16379 52 107 0.00 0.00 0.00 0.00 f 0.00 16380 53 107 0.00 0.00 0.00 0.00 f 0.00 16381 54 107 0.00 0.00 0.00 0.00 f 0.00 16382 55 107 0.00 0.00 0.00 0.00 f 0.00 16385 58 107 0.00 0.00 0.00 0.00 f 0.00 16386 59 107 0.00 0.00 0.00 0.00 f 0.00 16387 60 107 0.00 0.00 0.00 0.00 f 0.00 16388 61 107 0.00 0.00 0.00 0.00 f 0.00 16389 62 107 0.00 0.00 0.00 0.00 f 0.00 16390 63 107 0.00 0.00 0.00 0.00 f 0.00 16391 64 107 0.00 0.00 0.00 0.00 f 0.00 16392 65 107 0.00 0.00 0.00 0.00 f 0.00 16334 70 106 -50000.00 -50000.00 0.00 0.00 f 0.00 14796 48 132 0.00 0.00 0.00 0.00 f 0.00 14794 48 131 0.00 0.00 0.00 0.00 f 0.00 16238 34 105 624.22 624.22 0.00 0.00 f 0.00 16239 35 105 624.22 624.22 0.00 0.00 f 0.00 16272 71 105 631.35 631.35 0.00 0.00 f 0.00 21122 105 120 0.00 0.00 0.00 0.00 f 0.00 19637 101 103 496000.00 496000.00 0.00 0.00 f 0.00 19638 102 103 496000.00 496000.00 0.00 0.00 f 0.00 19639 103 103 496000.00 496000.00 0.00 0.00 f 0.00 19640 104 103 496000.00 496000.00 0.00 0.00 f 0.00 20606 105 103 0.00 0.00 0.00 0.00 f 0.00 20607 106 103 0.00 0.00 0.00 0.00 f 0.00 20608 107 103 0.00 0.00 0.00 0.00 f 0.00 20609 108 103 0.00 0.00 0.00 0.00 f 0.00 20610 109 103 0.00 0.00 0.00 0.00 f 0.00 20611 110 103 0.00 0.00 0.00 0.00 f 0.00 20612 111 103 0.00 0.00 0.00 0.00 f 0.00 20613 112 103 0.00 0.00 0.00 0.00 f 0.00 20614 113 103 0.00 0.00 0.00 0.00 f 0.00 20615 114 103 0.00 0.00 0.00 0.00 f 0.00 20616 115 103 0.00 0.00 0.00 0.00 f 0.00 20617 116 103 0.00 0.00 0.00 0.00 f 0.00 14739 47 103 0.00 9000.00 9000.00 0.00 f 0.00 18477 71 141 31084.94 31084.94 0.00 0.00 f 0.00 18478 72 141 31084.94 31084.94 0.00 0.00 f 0.00 18479 73 141 31084.94 31084.94 0.00 0.00 f 0.00 16366 36 107 0.00 0.00 0.00 0.00 f 0.00 16367 37 107 0.00 0.00 0.00 0.00 f 0.00 16368 38 107 0.00 0.00 0.00 0.00 f 0.00 16369 39 107 0.00 0.00 0.00 0.00 f 0.00 16370 40 107 0.00 0.00 0.00 0.00 f 0.00 16371 41 107 0.00 0.00 0.00 0.00 f 0.00 16378 51 107 0.00 0.00 0.00 0.00 f 0.00 14798 48 133 0.00 0.00 0.00 0.00 f 0.00 16393 66 107 0.00 0.00 0.00 0.00 f 0.00 16394 67 107 0.00 0.00 0.00 0.00 f 0.00 16395 68 107 0.00 0.00 0.00 0.00 f 0.00 16396 69 107 0.00 0.00 0.00 0.00 f 0.00 16397 70 107 0.00 0.00 0.00 0.00 f 0.00 16398 71 107 0.00 0.00 0.00 0.00 f 0.00 16399 72 107 0.00 0.00 0.00 0.00 f 0.00 16400 73 107 0.00 0.00 0.00 0.00 f 0.00 16401 74 107 0.00 0.00 0.00 0.00 f 0.00 16402 75 107 0.00 0.00 0.00 0.00 f 0.00 16403 76 107 0.00 0.00 0.00 0.00 f 0.00 16404 77 107 0.00 0.00 0.00 0.00 f 0.00 16405 78 107 0.00 0.00 0.00 0.00 f 0.00 16406 79 107 0.00 0.00 0.00 0.00 f 0.00 16407 80 107 0.00 0.00 0.00 0.00 f 0.00 16408 81 107 0.00 0.00 0.00 0.00 f 0.00 16409 82 107 0.00 0.00 0.00 0.00 f 0.00 20188 100 142 0.00 0.00 0.00 0.00 f 0.00 20189 101 142 0.00 0.00 0.00 0.00 f 0.00 20190 102 142 0.00 0.00 0.00 0.00 f 0.00 20191 103 142 0.00 0.00 0.00 0.00 f 0.00 20192 104 142 0.00 0.00 0.00 0.00 f 0.00 18651 56 144 0.00 0.00 0.00 0.00 f 0.00 18652 57 144 0.00 0.00 0.00 0.00 f 0.00 18653 58 144 0.00 0.00 0.00 0.00 f 0.00 18654 59 144 0.00 0.00 0.00 0.00 f 0.00 18655 60 144 0.00 0.00 0.00 0.00 f 0.00 18656 61 144 0.00 0.00 0.00 0.00 f 0.00 18657 62 144 0.00 0.00 0.00 0.00 f 0.00 20203 103 144 0.00 0.00 0.00 0.00 f 0.00 20204 104 144 0.00 0.00 0.00 0.00 f 0.00 18688 46 145 0.00 0.00 0.00 0.00 f 0.00 18696 35 145 0.00 0.00 0.00 0.00 f 0.00 18697 36 145 0.00 0.00 0.00 0.00 f 0.00 18698 37 145 0.00 0.00 0.00 0.00 f 0.00 18699 38 145 0.00 0.00 0.00 0.00 f 0.00 18714 56 145 0.00 0.00 0.00 0.00 f 0.00 20205 93 145 0.00 0.00 0.00 0.00 f 0.00 20206 94 145 0.00 0.00 0.00 0.00 f 0.00 20207 95 145 0.00 0.00 0.00 0.00 f 0.00 20208 96 145 0.00 0.00 0.00 0.00 f 0.00 20209 97 145 0.00 0.00 0.00 0.00 f 0.00 20210 98 145 0.00 0.00 0.00 0.00 f 0.00 14823 47 146 0.00 0.00 0.00 0.00 f 0.00 18830 43 147 0.00 0.00 0.00 0.00 f 0.00 18831 44 147 0.00 0.00 0.00 0.00 f 0.00 18832 45 147 0.00 0.00 0.00 0.00 f 0.00 18833 49 147 0.00 0.00 0.00 0.00 f 0.00 14804 48 136 0.00 0.00 0.00 0.00 f 0.00 16571 55 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16572 56 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16573 57 110 0.00 0.00 0.00 0.00 f 0.00 16574 58 110 0.00 0.00 0.00 0.00 f 0.00 16575 59 110 0.00 0.00 0.00 0.00 f 0.00 16576 60 110 0.00 0.00 0.00 0.00 f 0.00 16577 61 110 0.00 0.00 0.00 0.00 f 0.00 14802 48 135 0.00 0.00 0.00 0.00 f 0.00 20184 96 142 0.00 0.00 0.00 0.00 f 0.00 20185 97 142 0.00 0.00 0.00 0.00 f 0.00 20186 98 142 0.00 0.00 0.00 0.00 f 0.00 20187 99 142 0.00 0.00 0.00 0.00 f 0.00 16936 39 116 5000.00 5000.00 0.00 0.00 f 0.00 16937 40 116 5000.00 5000.00 0.00 0.00 f 0.00 16938 41 116 5000.00 5000.00 0.00 0.00 f 0.00 16939 42 116 5000.00 5000.00 0.00 0.00 f 0.00 16940 43 116 5000.00 5000.00 0.00 0.00 f 0.00 16941 44 116 5000.00 5000.00 0.00 0.00 f 0.00 16942 45 116 5000.00 5000.00 0.00 0.00 f 0.00 16943 49 116 5000.00 5000.00 0.00 0.00 f 0.00 16944 50 116 5000.00 5000.00 0.00 0.00 f 0.00 16945 51 116 5000.00 5000.00 0.00 0.00 f 0.00 16946 52 116 5000.00 5000.00 0.00 0.00 f 0.00 16947 53 116 5000.00 5000.00 0.00 0.00 f 0.00 16948 54 116 5000.00 5000.00 0.00 0.00 f 0.00 15079 75 86 0.00 0.00 0.00 0.00 f 0.00 15080 76 86 0.00 0.00 33844.00 33844.00 f 0.00 15083 79 86 869.99 869.99 0.00 0.00 f 0.00 15086 82 86 869.99 869.99 0.00 0.00 f 0.00 15087 83 86 869.99 869.99 3384.40 3384.40 f 0.00 15088 84 86 869.99 869.99 0.00 0.00 f 0.00 15089 85 86 869.99 869.99 0.00 0.00 f 0.00 15109 39 87 11.07 41682.79 41671.72 0.00 f 0.00 15110 40 87 41682.79 41682.79 0.00 0.00 f 0.00 15111 41 87 41682.79 41706.30 23.51 0.00 f 0.00 15112 42 87 41706.30 41740.18 33.88 0.00 f 0.00 15113 43 87 41740.18 41740.62 0.44 0.00 f 0.00 15114 44 87 41740.62 41740.62 0.00 0.00 f 0.00 15115 45 87 41740.62 41805.23 64.61 0.00 f 0.00 15116 49 87 41805.23 40298.67 1999.86 3506.42 f 0.00 15117 50 87 40298.67 40298.67 0.00 0.00 f 0.00 15118 51 87 40298.67 40298.67 0.00 0.00 f 0.00 15119 52 87 40298.67 298.11 0.00 40000.56 f 0.00 15020 79 85 -278514.37 -283264.37 45250.00 50000.00 f 0.00 15021 80 85 -283264.37 -283264.37 25634.00 25634.00 f 0.00 15022 81 85 -283264.37 -288027.19 45250.00 50012.82 f 0.00 15023 82 85 -288027.19 -292777.19 45250.00 50000.00 f 0.00 15024 83 85 -292777.19 -292789.50 24588.78 24601.09 f 0.00 15025 84 85 -292789.50 -297539.50 67250.00 72000.00 f 0.00 15026 85 85 -297539.50 -302289.50 45250.00 50000.00 f 0.00 15027 86 85 -302289.50 -310587.70 50497.50 58795.70 f 0.00 15028 87 85 -310587.70 -404996.20 6408.50 100817.00 f 0.00 15029 88 85 -404996.20 -464587.70 6408.50 66000.00 f 0.00 15030 89 85 -464587.70 -311417.52 324451.00 171280.82 f 0.00 21274 113 134 0.00 0.00 0.00 0.00 f 0.00 21275 114 134 0.00 0.00 0.00 0.00 f 0.00 21276 115 134 0.00 0.00 0.00 0.00 f 0.00 21277 116 134 0.00 0.00 0.00 0.00 f 0.00 19066 46 152 0.00 0.00 0.00 0.00 f 0.00 19071 32 152 0.00 0.00 0.00 0.00 f 0.00 19073 34 152 0.00 0.00 0.00 0.00 f 0.00 19074 35 152 0.00 0.00 0.00 0.00 f 0.00 19075 36 152 0.00 0.00 0.00 0.00 f 0.00 19076 37 152 0.00 0.00 0.00 0.00 f 0.00 19077 38 152 0.00 0.00 0.00 0.00 f 0.00 19078 39 152 0.00 0.00 0.00 0.00 f 0.00 19079 40 152 0.00 0.00 0.00 0.00 f 0.00 19084 45 152 0.00 0.00 0.00 0.00 f 0.00 19085 49 152 0.00 0.00 0.00 0.00 f 0.00 19086 50 152 0.00 0.00 0.00 0.00 f 0.00 15178 45 88 0.00 0.00 0.00 0.00 f 0.00 15179 49 88 0.00 0.00 0.00 0.00 f 0.00 15180 50 88 0.00 0.00 0.00 0.00 f 0.00 15181 51 88 0.00 0.00 0.00 0.00 f 0.00 15182 52 88 0.00 0.00 0.00 0.00 f 0.00 14812 48 140 0.00 0.00 0.00 0.00 f 0.00 14814 48 141 0.00 0.00 0.00 0.00 f 0.00 20302 94 152 0.00 0.00 0.00 0.00 f 0.00 20303 95 152 0.00 0.00 0.00 0.00 f 0.00 21278 105 152 0.00 0.00 0.00 0.00 f 0.00 21279 106 152 0.00 0.00 0.00 0.00 f 0.00 21280 107 152 0.00 0.00 0.00 0.00 f 0.00 21288 115 152 0.00 0.00 0.00 0.00 f 0.00 21289 116 152 0.00 0.00 0.00 0.00 f 0.00 19131 28 153 0.00 0.00 0.00 0.00 f 0.00 19132 30 153 0.00 0.00 0.00 0.00 f 0.00 19133 31 153 0.00 0.00 0.00 0.00 f 0.00 19136 34 153 0.00 0.00 0.00 0.00 f 0.00 19137 35 153 0.00 0.00 0.00 0.00 f 0.00 19138 36 153 0.00 0.00 0.00 0.00 f 0.00 19139 37 153 0.00 0.00 0.00 0.00 f 0.00 19140 38 153 0.00 0.00 0.00 0.00 f 0.00 19141 39 153 0.00 0.00 0.00 0.00 f 0.00 19142 40 153 0.00 0.00 0.00 0.00 f 0.00 19143 41 153 0.00 0.00 0.00 0.00 f 0.00 19144 42 153 0.00 0.00 0.00 0.00 f 0.00 19145 43 153 0.00 0.00 0.00 0.00 f 0.00 19148 49 153 0.00 0.00 0.00 0.00 f 0.00 19149 50 153 0.00 0.00 0.00 0.00 f 0.00 19150 51 153 0.00 0.00 0.00 0.00 f 0.00 19168 69 153 0.00 0.00 0.00 0.00 f 0.00 19169 70 153 0.00 0.00 0.00 0.00 f 0.00 19170 71 153 0.00 0.00 0.00 0.00 f 0.00 19171 72 153 0.00 0.00 0.00 0.00 f 0.00 21296 111 153 0.00 0.00 0.00 0.00 f 0.00 21297 112 153 0.00 0.00 0.00 0.00 f 0.00 21298 113 153 0.00 0.00 0.00 0.00 f 0.00 21299 114 153 0.00 0.00 0.00 0.00 f 0.00 21300 115 153 0.00 0.00 0.00 0.00 f 0.00 21301 116 153 0.00 0.00 0.00 0.00 f 0.00 19257 28 155 0.00 0.00 0.00 0.00 f 0.00 19258 30 155 0.00 0.00 0.00 0.00 f 0.00 19259 31 155 0.00 0.00 0.00 0.00 f 0.00 19289 64 155 0.00 0.00 0.00 0.00 f 0.00 19291 66 155 0.00 0.00 0.00 0.00 f 0.00 19292 67 155 0.00 0.00 0.00 0.00 f 0.00 19304 79 155 0.00 -12.00 0.00 12.00 f 0.00 19305 80 155 -12.00 -404.00 0.00 392.00 f 0.00 19306 81 155 -404.00 -404.00 0.00 0.00 f 0.00 19307 82 155 -404.00 -404.00 0.00 0.00 f 0.00 19308 83 155 -404.00 -414.64 0.00 10.64 f 0.00 19309 84 155 -414.64 -414.64 0.00 0.00 f 0.00 19310 85 155 -414.64 -414.64 0.00 0.00 f 0.00 19311 86 155 -414.64 -414.64 0.00 0.00 f 0.00 15334 78 90 -1134.60 -1724.72 0.00 590.12 f 0.00 15335 79 90 -1724.72 -1768.38 0.00 43.66 f 0.00 15336 80 90 -1768.38 -1768.38 0.00 0.00 f 0.00 15337 81 90 -1768.38 -1768.38 0.00 0.00 f 0.00 15338 82 90 -1768.38 -1768.38 0.00 0.00 f 0.00 15339 83 90 -1768.38 -1796.69 0.00 28.31 f 0.00 15340 84 90 -1796.69 -1796.69 0.00 0.00 f 0.00 15341 85 90 -1796.69 -1796.69 0.00 0.00 f 0.00 15342 86 90 -1796.69 -1796.69 0.00 0.00 f 0.00 15343 87 90 -1796.69 -1796.69 0.00 0.00 f 0.00 15344 88 90 -1796.69 -3979.69 0.00 2183.00 f 0.00 20000 104 129 -505.22 -505.22 0.00 0.00 f 0.00 20002 94 121 0.00 0.00 0.00 0.00 f 0.00 20003 95 121 0.00 0.00 0.00 0.00 f 0.00 20004 96 121 0.00 0.00 0.00 0.00 f 0.00 20005 97 121 0.00 0.00 0.00 0.00 f 0.00 20006 98 121 0.00 0.00 0.00 0.00 f 0.00 20007 99 121 0.00 0.00 0.00 0.00 f 0.00 20008 100 121 0.00 0.00 0.00 0.00 f 0.00 20009 101 121 0.00 0.00 0.00 0.00 f 0.00 20010 102 121 0.00 0.00 0.00 0.00 f 0.00 20011 103 121 0.00 0.00 0.00 0.00 f 0.00 20067 99 95 -870.00 -870.00 0.00 0.00 f 0.00 20068 100 95 -870.00 -870.00 0.00 0.00 f 0.00 20069 101 95 -870.00 -870.00 0.00 0.00 f 0.00 20070 102 95 -870.00 -870.00 0.00 0.00 f 0.00 20071 103 95 -870.00 -870.00 0.00 0.00 f 0.00 15485 37 93 -5.00 -5.00 0.00 0.00 f 0.00 15486 38 93 -5.00 -5.00 0.00 0.00 f 0.00 15487 39 93 -5.00 -5.00 0.00 0.00 f 0.00 15488 40 93 -5.00 -5.00 0.00 0.00 f 0.00 18560 91 142 21.98 21.98 0.00 0.00 f 0.00 18561 92 142 21.98 21.98 0.00 0.00 f 0.00 20181 93 142 0.00 0.00 0.00 0.00 f 0.00 16868 34 115 0.00 0.00 0.00 0.00 f 0.00 16873 39 115 0.00 0.00 0.00 0.00 f 0.00 16874 40 115 0.00 0.00 0.00 0.00 f 0.00 16875 41 115 0.00 0.00 0.00 0.00 f 0.00 16876 42 115 0.00 0.00 0.00 0.00 f 0.00 16877 43 115 0.00 0.00 0.00 0.00 f 0.00 16878 44 115 0.00 0.00 0.00 0.00 f 0.00 16879 45 115 0.00 0.00 0.00 0.00 f 0.00 19159 60 153 0.00 0.00 0.00 0.00 f 0.00 19172 73 153 0.00 0.00 0.00 0.00 f 0.00 15616 42 95 0.00 0.00 0.00 0.00 f 0.00 15617 43 95 0.00 1.25 51.25 50.00 f 0.00 15618 44 95 1.25 1.25 0.00 0.00 f 0.00 15619 45 95 1.25 1.25 0.00 0.00 f 0.00 15620 49 95 1.25 0.00 3878.38 3879.63 f 0.00 15621 50 95 0.00 0.00 0.00 0.00 f 0.00 14826 48 147 0.00 0.00 0.00 0.00 f 0.00 14828 48 148 0.00 0.00 0.00 0.00 f 0.00 17768 55 130 0.00 0.00 0.00 0.00 f 0.00 17769 56 130 0.00 0.00 0.00 0.00 f 0.00 17770 57 130 0.00 0.00 0.00 0.00 f 0.00 17771 58 130 0.00 0.00 0.00 0.00 f 0.00 17772 59 130 0.00 0.00 16.38 16.38 f 0.00 17773 60 130 0.00 0.00 0.00 0.00 f 0.00 17774 61 130 0.00 0.00 0.00 0.00 f 0.00 18001 33 134 0.00 0.00 0.00 0.00 f 0.00 19072 33 152 0.00 0.00 0.00 0.00 f 0.00 19093 57 152 0.00 0.00 0.00 0.00 f 0.00 20304 96 152 0.00 0.00 0.00 0.00 f 0.00 20305 97 152 0.00 0.00 0.00 0.00 f 0.00 20306 98 152 0.00 0.00 0.00 0.00 f 0.00 20307 99 152 0.00 0.00 0.00 0.00 f 0.00 20308 100 152 0.00 0.00 0.00 0.00 f 0.00 20309 101 152 0.00 0.00 0.00 0.00 f 0.00 20310 102 152 0.00 0.00 0.00 0.00 f 0.00 20311 103 152 0.00 0.00 0.00 0.00 f 0.00 20312 104 152 0.00 0.00 0.00 0.00 f 0.00 19134 32 153 0.00 0.00 0.00 0.00 f 0.00 19135 33 153 0.00 0.00 0.00 0.00 f 0.00 19146 44 153 0.00 0.00 0.00 0.00 f 0.00 19147 45 153 0.00 0.00 0.00 0.00 f 0.00 19157 58 153 0.00 0.00 0.00 0.00 f 0.00 19158 59 153 0.00 0.00 0.00 0.00 f 0.00 15738 38 97 -3498.78 -3498.78 0.00 0.00 f 0.00 15739 39 97 -3498.78 -3398.78 100.00 0.00 f 0.00 15740 40 97 -3398.78 -3498.78 0.00 100.00 f 0.00 15741 41 97 -3498.78 -12338.78 0.00 8840.00 f 0.00 15742 42 97 0.00 -2000.00 0.00 2000.00 f 0.00 15743 43 97 -2000.00 -5000.00 0.00 3000.00 f 0.00 15753 56 97 -6599.00 -6599.00 0.00 0.00 f 0.00 20072 104 95 -870.00 -870.00 0.00 0.00 f 0.00 16231 46 105 0.00 0.00 0.00 0.00 f 0.00 15894 71 99 2799.98 2799.98 0.00 0.00 f 0.00 15895 72 99 2799.98 2799.98 50000.00 50000.00 f 0.00 15896 73 99 2799.98 0.00 150000.00 152799.98 f 0.00 15897 74 99 0.00 0.00 185199.79 185199.79 f 0.00 15899 76 99 0.00 0.00 48100.00 48100.00 f 0.00 15900 77 99 0.00 0.00 114345.50 114345.50 f 0.00 15901 78 99 0.00 0.00 8310.12 8310.12 f 0.00 15902 79 99 0.00 712.00 50712.00 50000.00 f 0.00 15903 80 99 712.00 0.00 15119.63 15831.63 f 0.00 15838 78 98 0.00 0.00 0.00 0.00 f 0.00 15839 79 98 0.00 0.00 0.00 0.00 f 0.00 15842 82 98 0.00 0.00 0.00 0.00 f 0.00 15843 83 98 0.00 0.00 0.00 0.00 f 0.00 15849 89 98 0.00 0.00 0.00 0.00 f 0.00 20015 95 98 0.00 0.00 0.00 0.00 f 0.00 20016 96 98 0.00 0.00 0.00 0.00 f 0.00 20017 97 98 0.00 0.00 0.00 0.00 f 0.00 20018 98 98 0.00 0.00 0.00 0.00 f 0.00 20019 99 98 0.00 0.00 0.00 0.00 f 0.00 20020 100 98 0.00 0.00 0.00 0.00 f 0.00 20021 101 98 0.00 0.00 0.00 0.00 f 0.00 20022 102 98 0.00 0.00 0.00 0.00 f 0.00 20023 103 98 0.00 0.00 0.00 0.00 f 0.00 20024 104 98 0.00 0.00 0.00 0.00 f 0.00 20990 105 98 0.00 0.00 0.00 0.00 f 0.00 20992 107 98 0.00 0.00 0.00 0.00 f 0.00 20993 108 98 0.00 0.00 0.00 0.00 f 0.00 20994 109 98 0.00 0.00 0.00 0.00 f 0.00 20995 110 98 0.00 0.00 0.00 0.00 f 0.00 20996 111 98 0.00 0.00 0.00 0.00 f 0.00 20997 112 98 0.00 0.00 0.00 0.00 f 0.00 20998 113 98 0.00 0.00 0.00 0.00 f 0.00 20999 114 98 0.00 0.00 0.00 0.00 f 0.00 21000 115 98 0.00 0.00 0.00 0.00 f 0.00 21001 116 98 0.00 0.00 0.00 0.00 f 0.00 17869 46 132 0.00 0.00 0.00 0.00 f 0.00 17871 28 132 0.00 0.00 0.00 0.00 f 0.00 20025 93 132 200.00 200.00 0.00 0.00 f 0.00 20026 94 132 200.00 200.00 0.00 0.00 f 0.00 20027 95 132 200.00 200.00 0.00 0.00 f 0.00 20028 96 132 200.00 200.00 0.00 0.00 f 0.00 20029 97 132 200.00 200.00 0.00 0.00 f 0.00 20030 98 132 200.00 200.00 0.00 0.00 f 0.00 20031 99 132 200.00 200.00 0.00 0.00 f 0.00 20032 100 132 200.00 200.00 0.00 0.00 f 0.00 20033 101 132 200.00 200.00 0.00 0.00 f 0.00 20034 102 132 200.00 200.00 0.00 0.00 f 0.00 18921 74 148 0.00 0.00 0.00 0.00 f 0.00 18922 75 148 0.00 0.00 0.00 0.00 f 0.00 18923 76 148 0.00 0.00 0.00 0.00 f 0.00 20096 104 137 0.00 0.00 0.00 0.00 f 0.00 17623 33 128 0.00 0.00 0.00 0.00 f 0.00 17663 76 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17664 77 128 -2587.16 -3844.72 881.55 2139.11 f 0.00 17665 78 128 -3844.72 -3947.25 230.71 333.24 f 0.00 20097 93 128 -3959.81 -3959.81 0.00 0.00 f 0.00 16008 59 101 0.00 7.06 7.06 0.00 f 0.00 16009 60 101 7.06 29.26 22.20 0.00 f 0.00 16010 61 101 29.26 29.26 0.00 0.00 f 0.00 16011 62 101 29.26 325.73 296.47 0.00 f 0.00 16012 63 101 325.73 325.73 0.00 0.00 f 0.00 16013 64 101 325.73 325.73 0.00 0.00 f 0.00 16014 65 101 325.73 1698.73 1373.00 0.00 f 0.00 20035 103 132 200.00 200.00 0.00 0.00 f 0.00 21026 105 135 0.00 0.00 0.00 0.00 f 0.00 15603 28 95 0.00 -28.39 20345.40 20373.79 f 0.00 21049 116 95 -870.00 -870.00 0.00 0.00 f 0.00 16260 59 105 631.35 631.35 0.00 0.00 f 0.00 16261 60 105 631.35 631.35 0.00 0.00 f 0.00 16262 61 105 631.35 631.35 0.00 0.00 f 0.00 16263 62 105 631.35 631.35 0.00 0.00 f 0.00 16264 63 105 631.35 631.35 0.00 0.00 f 0.00 16265 64 105 631.35 631.35 0.00 0.00 f 0.00 16266 65 105 631.35 631.35 0.00 0.00 f 0.00 16267 66 105 631.35 631.35 0.00 0.00 f 0.00 16268 67 105 631.35 631.35 0.00 0.00 f 0.00 16269 68 105 631.35 631.35 0.00 0.00 f 0.00 21051 106 105 631.35 631.35 0.00 0.00 f 0.00 21052 107 105 631.35 631.35 0.00 0.00 f 0.00 21053 108 105 631.35 631.35 0.00 0.00 f 0.00 21054 109 105 631.35 631.35 0.00 0.00 f 0.00 20094 102 137 0.00 0.00 0.00 0.00 f 0.00 20095 103 137 0.00 0.00 0.00 0.00 f 0.00 14911 30 84 23457.13 23457.13 0.00 0.00 f 18457.13 14912 31 84 23457.13 23457.13 0.00 0.00 f 0.00 14913 32 84 23457.13 23457.13 0.00 0.00 f 0.00 14914 33 84 23457.13 23457.13 0.00 0.00 f 0.00 14915 34 84 23457.13 23457.13 0.00 0.00 f 0.00 16136 61 103 331607.85 408857.85 77250.00 0.00 f 0.00 16139 64 103 555888.47 633138.47 77250.00 0.00 f 0.00 16140 65 103 633138.47 717729.46 84591.00 0.01 f 0.00 16141 66 103 717729.46 810352.80 92623.34 0.00 f 0.00 16142 67 103 810352.80 859807.80 49455.00 0.00 f 0.00 16143 68 103 859807.80 1074199.98 214392.18 0.00 f 0.00 16144 69 103 0.00 50089.10 81080.99 30991.89 f 0.00 16145 70 103 50089.10 127339.10 77250.00 0.00 f 0.00 16146 71 103 127339.10 204589.10 77250.00 0.00 f 0.00 16147 72 103 204589.10 285839.10 81250.00 0.00 f 0.00 20171 95 141 0.00 0.00 0.00 0.00 f 0.00 20172 96 141 0.00 112638.44 112638.44 0.00 f 0.00 14908 46 84 5000.00 5000.00 0.00 0.00 f 0.00 14948 70 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14949 71 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14950 72 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14951 73 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14952 74 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14953 75 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14954 76 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14955 77 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14956 78 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14957 79 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14958 80 84 2243332.22 2243332.22 0.00 0.00 f 0.00 14959 81 84 2943883.17 2943883.17 0.00 0.00 f 700550.95 16244 40 105 624.22 624.22 0.00 0.00 f 0.00 16245 41 105 624.22 624.22 0.00 0.00 f 0.00 16248 44 105 624.22 624.22 0.00 0.00 f 0.00 16249 45 105 624.22 624.22 0.00 0.00 f 0.00 16250 49 105 624.22 631.35 7.13 0.00 f 0.00 16251 50 105 631.35 631.35 0.00 0.00 f 0.00 14971 46 85 -24000.00 -23000.00 1000.00 0.00 f 0.00 14975 31 85 -33079.07 -31878.87 1532.98 332.78 f 0.00 14976 32 85 -31878.87 -16878.87 15000.00 0.00 f 0.00 14977 33 85 -16878.87 -1878.87 15000.00 0.00 f 0.00 14978 34 85 -1878.87 -36878.87 15000.00 50000.00 f 0.00 18924 77 148 0.00 -33.39 0.00 33.39 f 0.00 15034 46 86 0.00 0.00 0.00 0.00 f 0.00 16319 55 106 -0.01 -0.01 0.00 0.00 f 0.00 16320 56 106 -0.01 -0.01 54678.74 54678.74 f 0.00 15097 46 87 0.00 0.00 0.00 0.00 f 0.00 15006 65 85 -97757.85 -98872.29 25678.00 26792.44 f 0.00 15007 66 85 -98872.29 -98577.82 8254.21 7959.74 f 0.00 15008 67 85 -98577.82 -98577.82 0.00 0.00 f 0.00 15009 68 85 -98577.82 -100162.91 42162.25 43747.34 f 0.00 15010 69 85 -100162.91 -100137.79 7728.52 7703.40 f 0.00 20258 98 149 0.00 0.00 0.00 0.00 f 0.00 20259 99 149 0.00 0.00 0.00 0.00 f 0.00 20260 100 149 0.00 0.00 0.00 0.00 f 0.00 20261 101 149 0.00 0.00 0.00 0.00 f 0.00 20262 102 149 0.00 0.00 0.00 0.00 f 0.00 20263 103 149 0.00 0.00 0.00 0.00 f 0.00 20264 104 149 0.00 0.00 0.00 0.00 f 0.00 21230 105 149 0.00 0.00 0.00 0.00 f 0.00 21231 106 149 0.00 0.00 0.00 0.00 f 0.00 21232 107 149 0.00 0.00 0.00 0.00 f 0.00 21233 108 149 0.00 0.00 0.00 0.00 f 0.00 21234 109 149 0.00 0.00 0.00 0.00 f 0.00 21235 110 149 0.00 0.00 0.00 0.00 f 0.00 15223 46 89 0.00 0.00 0.00 0.00 f 0.00 16434 41 108 -625003.53 -656279.89 0.00 31276.36 f 0.00 16435 42 108 0.00 -15638.18 0.00 15638.18 f 0.00 15123 56 87 296.71 1463.01 1166.30 0.00 f 0.00 15124 57 87 1463.01 1463.01 0.00 0.00 f 0.00 15125 58 87 1463.01 1463.01 0.00 0.00 f 0.00 15126 59 87 1463.01 1585.20 123.31 1.12 f 0.00 15127 60 87 1585.20 2248.92 663.72 0.00 f 0.00 15128 61 87 2248.92 2248.92 0.00 0.00 f 0.00 15130 63 87 -29.18 -29.18 0.00 0.00 f 0.00 15160 46 88 0.00 0.00 0.00 0.00 f 0.00 19126 90 152 0.00 0.00 0.00 0.00 f 0.00 19127 91 152 0.00 0.00 0.00 0.00 f 0.00 19128 92 152 0.00 0.00 0.00 0.00 f 0.00 20301 93 152 0.00 0.00 0.00 0.00 f 0.00 19190 91 153 0.00 0.00 0.00 0.00 f 0.00 19191 92 153 0.00 0.00 0.00 0.00 f 0.00 20313 93 153 0.00 0.00 0.00 0.00 f 0.00 20314 94 153 0.00 0.00 0.00 0.00 f 0.00 20324 104 153 0.00 0.00 0.00 0.00 f 0.00 14835 47 153 0.00 0.00 0.00 0.00 f 0.00 14840 48 155 0.00 0.00 0.00 0.00 f 0.00 19260 32 155 0.00 0.00 0.00 0.00 f 0.00 19280 55 155 0.00 0.00 0.00 0.00 f 0.00 19281 56 155 0.00 0.00 0.00 0.00 f 0.00 15240 44 89 0.00 0.00 0.00 0.00 f 0.00 15241 45 89 0.00 0.00 0.00 0.00 f 0.00 15242 49 89 0.00 0.00 0.00 0.00 f 0.00 15243 50 89 0.00 0.00 0.00 0.00 f 0.00 15244 51 89 0.00 0.00 0.00 0.00 f 0.00 15245 52 89 0.00 0.00 0.00 0.00 f 0.00 15286 46 90 0.00 0.00 0.00 0.00 f 0.00 20344 100 156 15000.00 15000.00 0.00 0.00 f 0.00 20345 101 156 15000.00 15000.00 0.00 0.00 f 0.00 20346 102 156 15000.00 15000.00 0.00 0.00 f 0.00 20347 103 156 15000.00 15000.00 0.00 0.00 f 0.00 20348 104 156 15000.00 15000.00 0.00 0.00 f 0.00 21314 105 156 15000.00 15000.00 0.00 0.00 f 0.00 21315 106 156 15000.00 15000.00 0.00 0.00 f 0.00 21316 107 156 15000.00 15000.00 0.00 0.00 f 0.00 21317 108 156 15000.00 15000.00 0.00 0.00 f 0.00 21318 109 156 15000.00 15000.00 0.00 0.00 f 0.00 21319 110 156 15000.00 15000.00 0.00 0.00 f 0.00 21320 111 156 15000.00 15000.00 0.00 0.00 f 0.00 21321 112 156 15000.00 15000.00 0.00 0.00 f 0.00 21322 113 156 15000.00 15000.00 0.00 0.00 f 0.00 21323 114 156 15000.00 15000.00 0.00 0.00 f 0.00 21324 115 156 15000.00 15000.00 0.00 0.00 f 0.00 21325 116 156 15000.00 15000.00 0.00 0.00 f 0.00 14764 48 115 0.00 0.00 0.00 0.00 f 0.00 16861 46 115 0.00 0.00 0.00 0.00 f 0.00 16863 28 115 0.00 0.00 0.00 0.00 f 0.00 16866 32 115 0.00 0.00 0.00 0.00 f 0.00 16867 33 115 0.00 0.00 0.00 0.00 f 0.00 15364 42 91 0.00 638.18 638.18 0.00 f 0.00 15365 43 91 638.18 638.18 0.00 0.00 f 0.00 15366 44 91 638.18 638.18 0.00 0.00 f 0.00 15367 45 91 638.18 1284.18 646.00 0.00 f 0.00 15368 49 91 1284.18 4084.18 2800.00 0.00 f 0.00 15369 50 91 4084.18 4084.18 0.00 0.00 f 0.00 15370 51 91 4084.18 4084.18 0.00 0.00 f 0.00 15371 52 91 4084.18 4084.18 0.00 0.00 f 0.00 15372 53 91 4084.18 4084.18 0.00 0.00 f 0.00 15373 54 91 4084.18 4084.18 0.00 0.00 f 0.00 15374 55 91 4084.18 4084.18 0.00 0.00 f 0.00 19255 46 155 0.00 0.00 0.00 0.00 f 0.00 19318 46 156 0.00 0.00 0.00 0.00 f 0.00 19227 65 154 0.00 0.00 0.00 0.00 f 0.00 19228 66 154 0.00 0.00 0.00 0.00 f 0.00 19229 67 154 0.00 0.00 0.00 0.00 f 0.00 19230 68 154 0.00 0.00 0.00 0.00 f 0.00 19231 69 154 0.00 0.00 0.00 0.00 f 0.00 19232 70 154 0.00 0.00 0.00 0.00 f 0.00 19233 71 154 0.00 0.00 0.00 0.00 f 0.00 19236 74 154 0.00 0.00 0.00 0.00 f 0.00 19237 75 154 0.00 0.00 0.00 0.00 f 0.00 19238 76 154 0.00 0.00 0.00 0.00 f 0.00 19241 79 154 0.00 0.00 0.00 0.00 f 0.00 19242 80 154 0.00 0.00 0.00 0.00 f 0.00 19243 81 154 0.00 0.00 0.00 0.00 f 0.00 19244 82 154 0.00 0.00 0.00 0.00 f 0.00 19245 83 154 0.00 0.00 0.00 0.00 f 0.00 19246 84 154 0.00 0.00 0.00 0.00 f 0.00 19247 85 154 0.00 0.00 0.00 0.00 f 0.00 19248 86 154 0.00 0.00 0.00 0.00 f 0.00 19249 87 154 0.00 0.00 0.00 0.00 f 0.00 19250 88 154 0.00 0.00 0.00 0.00 f 0.00 20385 93 154 0.00 0.00 0.00 0.00 f 0.00 14873 58 83 0.00 0.00 0.00 0.00 f 0.00 14874 59 83 0.00 0.00 0.00 0.00 f 0.00 14875 60 83 0.00 0.00 0.00 0.00 f 0.00 14876 61 83 0.00 0.00 0.00 0.00 f 0.00 14877 62 83 0.00 0.00 0.00 0.00 f 0.00 14878 63 83 0.00 0.00 0.00 0.00 f 0.00 14879 64 83 0.00 0.00 0.00 0.00 f 0.00 14880 65 83 0.00 0.00 0.00 0.00 f 0.00 14881 66 83 0.00 0.00 0.00 0.00 f 0.00 14882 67 83 0.00 0.00 0.00 0.00 f 0.00 14883 68 83 0.00 0.00 0.00 0.00 f 0.00 14884 69 83 0.00 0.00 0.00 0.00 f 0.00 14885 70 83 0.00 0.00 0.00 0.00 f 0.00 14886 71 83 0.00 0.00 0.00 0.00 f 0.00 14887 72 83 0.00 0.00 0.00 0.00 f 0.00 14888 73 83 0.00 0.00 0.00 0.00 f 0.00 14889 74 83 0.00 0.00 0.00 0.00 f 0.00 20098 94 128 -3959.81 -3959.81 0.00 0.00 f 0.00 15070 66 86 -91.00 -91.00 483.14 483.14 f 0.00 15071 67 86 -91.00 -91.00 0.00 0.00 f 0.00 17007 50 117 0.00 0.00 0.00 0.00 f 0.00 17008 51 117 0.00 0.00 0.00 0.00 f 0.00 17147 64 119 0.00 0.00 0.00 0.00 f 0.00 17148 65 119 0.00 0.00 0.00 0.00 f 0.00 15356 34 91 0.00 0.00 0.00 0.00 f 0.00 15357 35 91 0.00 0.00 0.00 0.00 f 0.00 15505 60 93 -2.25 -2.25 0.00 0.00 f 0.00 15506 61 93 -2.25 -2.25 0.00 0.00 f 0.00 17443 42 125 0.00 0.00 0.00 0.00 f 0.00 21354 109 123 0.00 0.00 0.00 0.00 f 0.00 21355 110 123 0.00 0.00 0.00 0.00 f 0.00 21356 111 123 0.00 0.00 0.00 0.00 f 0.00 21357 112 123 0.00 0.00 0.00 0.00 f 0.00 21358 113 123 0.00 0.00 0.00 0.00 f 0.00 21359 114 123 0.00 0.00 0.00 0.00 f 0.00 21360 115 123 0.00 0.00 0.00 0.00 f 0.00 21361 116 123 0.00 0.00 0.00 0.00 f 0.00 14838 48 154 0.00 0.00 0.00 0.00 f 0.00 19197 32 154 0.00 0.00 0.00 0.00 f 0.00 19198 33 154 0.00 0.00 0.00 0.00 f 0.00 19199 34 154 0.00 0.00 0.00 0.00 f 0.00 19200 35 154 0.00 0.00 0.00 0.00 f 0.00 19201 36 154 0.00 0.00 0.00 0.00 f 0.00 19202 37 154 0.00 0.00 0.00 0.00 f 0.00 19203 38 154 0.00 0.00 0.00 0.00 f 0.00 19211 49 154 0.00 0.00 0.00 0.00 f 0.00 19212 50 154 0.00 0.00 0.00 0.00 f 0.00 17584 60 127 -127096.28 -141892.83 0.00 14796.55 f 0.00 17585 61 127 -141892.83 -141892.83 0.00 0.00 f 0.00 15643 72 95 0.00 0.00 50000.00 50000.00 f 0.00 15788 91 97 -125.00 -125.00 0.00 0.00 f 0.00 15789 92 97 -125.00 -125.00 0.00 0.00 f 0.00 18206 52 137 0.00 0.00 0.00 0.00 f 0.00 18207 53 137 0.00 0.00 0.00 0.00 f 0.00 18208 54 137 0.00 0.00 0.00 0.00 f 0.00 20099 95 128 -3959.81 -3959.81 0.00 0.00 f 0.00 20100 96 128 -3959.81 -3959.81 0.00 0.00 f 0.00 21091 110 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21092 111 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21093 112 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21094 113 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21095 114 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21096 115 138 -70129.40 -70129.40 0.00 0.00 f 0.00 21116 111 139 0.00 0.00 0.00 0.00 f 0.00 21117 112 139 0.00 0.00 0.00 0.00 f 0.00 21118 113 139 0.00 0.00 0.00 0.00 f 0.00 21119 114 139 0.00 0.00 0.00 0.00 f 0.00 21120 115 139 0.00 0.00 0.00 0.00 f 0.00 21121 116 139 0.00 0.00 0.00 0.00 f 0.00 17176 46 120 0.00 0.00 0.00 0.00 f 0.00 17177 29 120 0.00 0.00 0.00 0.00 f 0.00 17178 28 120 0.00 0.00 0.00 0.00 f 0.00 17180 31 120 0.00 0.00 0.00 0.00 f 0.00 17181 32 120 0.00 0.00 0.00 0.00 f 0.00 17183 34 120 0.00 0.00 0.00 0.00 f 0.00 17204 58 120 0.00 0.00 0.00 0.00 f 0.00 17217 71 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17218 72 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17219 73 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17220 74 120 -1500.00 -1500.00 0.00 0.00 f 0.00 16361 31 107 0.00 0.00 0.00 0.00 f 0.00 16362 32 107 0.00 0.00 0.00 0.00 f 0.00 18347 67 139 -2259.60 -2259.60 0.00 0.00 f 0.00 18812 91 146 -790.49 -790.49 0.00 0.00 f 0.00 20217 93 146 -790.49 -790.49 0.00 0.00 f 0.00 20218 94 146 -790.49 -790.49 0.00 0.00 f 0.00 16509 56 109 -2929739.58 -2878514.58 51225.00 0.00 f 0.00 16510 57 109 -2878514.58 -2955764.58 0.00 77250.00 f 0.00 18481 75 141 41415.57 41415.57 0.00 0.00 f 0.00 20288 104 130 0.00 0.00 0.00 0.00 f 0.00 21256 107 130 0.00 0.00 0.00 0.00 f 0.00 21257 108 130 0.00 0.00 0.00 0.00 f 0.00 16641 62 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16882 51 115 0.00 0.00 0.00 0.00 f 0.00 21369 112 154 0.00 0.00 0.00 0.00 f 0.00 21370 113 154 0.00 0.00 0.00 0.00 f 0.00 21371 114 154 0.00 0.00 0.00 0.00 f 0.00 21372 115 154 0.00 0.00 0.00 0.00 f 0.00 21373 116 154 0.00 0.00 0.00 0.00 f 0.00 19445 48 158 0.00 0.00 0.00 0.00 f 0.00 19446 46 158 0.00 0.00 0.00 0.00 f 0.00 19447 29 158 0.00 0.00 0.00 0.00 f 0.00 19448 28 158 0.00 0.00 0.00 0.00 f 0.00 19449 30 158 0.00 0.00 0.00 0.00 f 0.00 19453 34 158 0.00 0.00 0.00 0.00 f 0.00 19454 35 158 0.00 0.00 0.00 0.00 f 0.00 19455 36 158 0.00 0.00 0.00 0.00 f 0.00 19456 37 158 0.00 0.00 0.00 0.00 f 0.00 19457 38 158 0.00 0.00 0.00 0.00 f 0.00 16782 77 113 1419999.99 1419999.99 0.00 0.00 f 0.00 18747 89 145 0.00 0.00 0.00 0.00 f 0.00 18748 90 145 0.00 0.00 0.00 0.00 f 0.00 21352 107 123 0.00 0.00 0.00 0.00 f 0.00 21353 108 123 0.00 0.00 0.00 0.00 f 0.00 19213 51 154 0.00 0.00 0.00 0.00 f 0.00 19226 64 154 0.00 0.00 0.00 0.00 f 0.00 20386 94 154 0.00 0.00 0.00 0.00 f 0.00 20387 95 154 0.00 0.00 0.00 0.00 f 0.00 20388 96 154 0.00 0.00 0.00 0.00 f 0.00 20389 97 154 0.00 0.00 0.00 0.00 f 0.00 20390 98 154 0.00 0.00 0.00 0.00 f 0.00 20391 99 154 0.00 0.00 0.00 0.00 f 0.00 20392 100 154 0.00 0.00 0.00 0.00 f 0.00 20393 101 154 0.00 0.00 0.00 0.00 f 0.00 20394 102 154 0.00 0.00 0.00 0.00 f 0.00 20395 103 154 0.00 0.00 0.00 0.00 f 0.00 20396 104 154 0.00 0.00 0.00 0.00 f 0.00 21362 105 154 0.00 0.00 0.00 0.00 f 0.00 21363 106 154 0.00 0.00 0.00 0.00 f 0.00 21364 107 154 0.00 0.00 0.00 0.00 f 0.00 21365 108 154 0.00 0.00 0.00 0.00 f 0.00 21366 109 154 0.00 0.00 0.00 0.00 f 0.00 21367 110 154 0.00 0.00 0.00 0.00 f 0.00 21368 111 154 0.00 0.00 0.00 0.00 f 0.00 18818 31 147 0.00 0.00 0.00 0.00 f 0.00 16922 91 115 0.00 0.00 0.00 0.00 f 0.00 19002 92 149 0.00 0.00 0.00 0.00 f 0.00 19070 31 152 0.00 0.00 0.00 0.00 f 0.00 17357 85 122 1758.75 1758.75 0.00 0.00 f 0.00 17358 86 122 1758.75 1758.75 0.00 0.00 f 0.00 19261 33 155 0.00 0.00 0.00 0.00 f 0.00 19262 34 155 0.00 0.00 0.00 0.00 f 0.00 19263 35 155 0.00 0.00 0.00 0.00 f 0.00 19264 36 155 0.00 0.00 0.00 0.00 f 0.00 19265 37 155 0.00 0.00 0.00 0.00 f 0.00 19266 38 155 0.00 0.00 0.00 0.00 f 0.00 19267 39 155 0.00 0.00 0.00 0.00 f 0.00 19268 40 155 0.00 0.00 0.00 0.00 f 0.00 19269 41 155 0.00 0.00 0.00 0.00 f 0.00 19270 42 155 0.00 0.00 0.00 0.00 f 0.00 19271 43 155 0.00 0.00 0.00 0.00 f 0.00 19272 44 155 0.00 0.00 0.00 0.00 f 0.00 19273 45 155 0.00 0.00 0.00 0.00 f 0.00 19274 49 155 0.00 0.00 0.00 0.00 f 0.00 19275 50 155 0.00 0.00 0.00 0.00 f 0.00 19276 51 155 0.00 0.00 0.00 0.00 f 0.00 19277 52 155 0.00 0.00 0.00 0.00 f 0.00 19278 53 155 0.00 0.00 0.00 0.00 f 0.00 19279 54 155 0.00 0.00 0.00 0.00 f 0.00 17497 33 126 0.00 0.00 0.00 0.00 f 0.00 17498 34 126 0.00 0.00 0.00 0.00 f 0.00 18015 50 134 0.00 0.00 0.00 0.00 f 0.00 18049 84 134 0.00 0.00 0.00 0.00 f 0.00 18050 85 134 0.00 0.00 0.00 0.00 f 0.00 18193 36 137 0.00 0.00 0.00 0.00 f 0.00 18194 37 137 0.00 0.00 0.00 0.00 f 0.00 18409 66 140 0.00 0.00 0.00 0.00 f 0.00 18410 67 140 0.00 25000.00 25000.00 0.00 f 0.00 18411 68 140 25000.00 25000.00 0.00 0.00 f 0.00 18413 70 140 0.00 0.00 0.00 0.00 f 0.00 18414 71 140 0.00 0.00 0.00 0.00 f 0.00 18415 72 140 0.00 0.00 0.00 0.00 f 0.00 18416 73 140 0.00 0.00 0.00 0.00 f 0.00 18417 74 140 0.00 0.00 0.00 0.00 f 0.00 18418 75 140 0.00 0.00 0.00 0.00 f 0.00 18419 76 140 0.00 0.00 0.00 0.00 f 0.00 18420 77 140 0.00 55000.00 55000.00 0.00 f 0.00 18421 78 140 55000.00 55000.00 0.00 0.00 f 0.00 18422 79 140 55000.00 55000.00 0.00 0.00 f 0.00 18423 80 140 55000.00 57025.00 2025.00 0.00 f 0.00 18424 81 140 0.00 2025.00 2025.00 0.00 f 0.00 18425 82 140 2025.00 2025.00 0.00 0.00 f 0.00 18426 83 140 2025.00 2025.00 0.00 0.00 f 0.00 16931 34 116 5000.00 5000.00 0.00 0.00 f 0.00 16491 35 109 -1153441.40 -1250441.40 303000.00 400000.00 f 0.00 15987 35 101 2.90 2.90 0.00 0.00 f 0.00 15946 60 100 0.00 0.00 0.00 0.00 f 0.00 15861 35 99 262.95 262.95 0.00 0.00 f 0.00 15862 36 99 262.95 262.95 75.00 75.00 f 0.00 15864 38 99 262.95 262.95 0.00 0.00 f 0.00 15865 39 99 262.95 262.95 161.50 161.50 f 0.00 15866 40 99 262.95 262.95 0.00 0.00 f 0.00 15867 41 99 262.95 262.95 9068.50 9068.50 f 0.00 15868 42 99 262.95 262.95 9000.00 9000.00 f 0.00 15869 43 99 262.95 262.95 50.00 50.00 f 0.00 15873 50 99 263.55 363.55 100.00 0.00 f 0.00 15848 88 98 0.00 0.00 0.00 0.00 f 0.00 15851 91 98 0.00 0.00 0.00 0.00 f 0.00 15852 92 98 0.00 0.00 0.00 0.00 f 0.00 16617 35 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16657 78 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16658 79 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16659 80 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16668 89 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16743 35 113 1020000.00 1020000.00 0.00 0.00 f 0.00 16995 35 117 0.00 0.00 0.00 0.00 f 0.00 17499 35 126 0.00 0.00 0.00 0.00 f 0.00 17562 35 127 0.00 0.00 0.00 0.00 f 0.00 17313 38 122 136.00 136.00 0.00 0.00 f 0.00 17314 39 122 136.00 181.00 45.00 0.00 f 0.00 17315 40 122 181.00 181.00 0.00 0.00 f 0.00 17276 67 121 0.00 0.00 0.00 0.00 f 0.00 17294 85 121 0.00 0.00 0.00 0.00 f 0.00 17295 86 121 0.00 0.00 0.00 0.00 f 0.00 17688 35 129 0.00 0.00 0.00 0.00 f 0.00 17625 35 128 0.00 0.00 0.00 0.00 f 0.00 17631 41 128 0.00 0.00 0.00 0.00 f 0.00 17632 42 128 0.00 0.00 0.00 0.00 f 0.00 17633 43 128 0.00 0.00 0.00 0.00 f 0.00 18757 33 146 0.00 0.00 0.00 0.00 f 0.00 18758 34 146 0.00 0.00 0.00 0.00 f 0.00 17940 35 133 0.00 0.00 0.00 0.00 f 0.00 17958 56 133 0.00 0.00 0.00 0.00 f 0.00 15037 30 86 1.06 0.00 1962.99 1964.05 f 0.00 16423 30 108 0.00 -2626.81 7.38 2634.19 f 0.00 16297 30 106 0.00 0.00 6927.29 6927.29 f 0.00 15667 30 96 -0.02 0.00 1699.11 1699.09 f 0.00 15100 30 87 76.85 0.00 69424.15 69501.00 f 0.00 16045 30 102 238.77 551.04 312.27 0.00 f 0.00 16234 30 105 216.74 587.22 370.48 0.00 f 0.00 16108 30 103 0.00 8244.54 8244.54 0.00 f 0.00 18507 35 142 0.00 0.00 0.00 0.00 f 0.00 15541 30 94 151.99 0.00 252.00 403.99 f 0.00 16486 30 109 -1009222.11 -1020406.90 2617.50 13802.29 f 0.00 15120 53 87 298.11 296.71 0.00 1.40 f 0.00 15121 54 87 296.71 296.71 0.00 0.00 f 0.00 15122 55 87 296.71 296.71 0.00 0.00 f 0.00 15131 64 87 -29.18 -29.18 0.00 0.00 f 0.00 15132 65 87 -29.18 -29.18 0.00 0.00 f 0.00 15133 66 87 -29.18 16.92 46.10 0.00 f 0.00 15134 67 87 16.92 16.92 0.00 0.00 f 0.00 15135 68 87 16.92 0.00 22.50 39.42 f 0.00 15136 69 87 0.00 0.00 0.00 0.00 f 0.00 15137 70 87 0.00 0.00 0.00 0.00 f 0.00 15138 71 87 0.00 0.00 0.00 0.00 f 0.00 15139 72 87 0.00 0.00 0.00 0.00 f 0.00 15140 73 87 0.00 0.00 0.00 0.00 f 0.00 15141 74 87 0.00 0.00 0.00 0.00 f 0.00 15142 75 87 0.00 0.00 0.00 0.00 f 0.00 15143 76 87 0.00 2729.16 2729.16 0.00 f 0.00 15144 77 87 2729.16 4606.07 1876.91 0.00 f 0.00 15145 78 87 4606.07 8591.87 4002.30 16.50 f 0.00 15146 79 87 8591.87 8591.87 0.00 0.00 f 0.00 15147 80 87 8591.87 11346.03 2754.16 0.00 f 0.00 15148 81 87 11346.03 11346.03 0.00 0.00 f 0.00 15149 82 87 11346.03 11346.03 0.00 0.00 f 0.00 15289 30 90 6053.79 22.00 90.50 6122.29 f 0.00 15856 30 99 250.00 262.95 773.99 761.04 f 0.00 15604 30 95 -28.39 0.00 290.64 262.25 f 0.00 18255 35 138 0.00 0.00 0.00 0.00 f 0.00 18256 36 138 0.00 0.00 0.00 0.00 f 0.00 14974 30 85 -41195.81 -33079.07 81104.41 72987.67 f 0.00 15282 89 89 0.57 0.57 0.00 0.00 f 0.00 15283 90 89 0.57 0.57 0.00 0.00 f 0.00 15284 91 89 0.57 0.57 0.00 0.00 f 0.00 18622 90 143 0.00 0.00 0.00 0.00 f 0.00 18623 91 143 0.00 0.00 0.00 0.00 f 0.00 18624 92 143 0.00 0.00 0.00 0.00 f 0.00 18633 35 144 0.00 0.00 0.00 0.00 f 0.00 14890 75 83 0.00 0.00 0.00 0.00 f 0.00 14891 76 83 0.00 0.00 0.00 0.00 f 0.00 14892 77 83 0.00 0.00 0.00 0.00 f 0.00 14893 78 83 0.00 0.00 0.00 0.00 f 0.00 14894 79 83 0.00 0.00 0.00 0.00 f 0.00 14895 80 83 0.00 0.00 0.00 0.00 f 0.00 14896 81 83 0.00 0.00 0.00 0.00 f 0.00 14897 82 83 0.00 0.00 0.00 0.00 f 0.00 14903 88 83 0.00 0.00 0.00 0.00 f 0.00 14904 89 83 0.00 0.00 0.00 0.00 f 0.00 15563 55 94 1303.21 1303.21 0.00 0.00 f 0.00 15564 56 94 1303.21 2634.45 1331.24 0.00 f 0.00 16026 77 101 1825.60 3060.46 1234.86 0.00 f 0.00 16027 78 101 3060.46 3226.67 166.21 0.00 f 0.00 16028 79 101 3226.67 3226.67 0.00 0.00 f 0.00 16029 80 101 3226.67 3516.72 290.05 0.00 f 0.00 16030 81 101 0.00 2.50 2.50 0.00 f 0.00 16031 82 101 2.50 2.50 0.00 0.00 f 0.00 16032 83 101 2.50 8.32 5.82 0.00 f 0.00 16034 85 101 8.32 8.32 0.00 0.00 f 0.00 14972 29 85 -23000.00 -22000.00 1000.00 0.00 f 0.00 15705 71 96 0.00 0.00 0.00 0.00 f 0.00 15706 72 96 0.00 0.00 0.00 0.00 f 0.00 15707 73 96 0.00 0.00 0.00 0.00 f 0.00 15708 74 96 0.00 0.00 2567.80 2567.80 f 0.00 15709 75 96 0.00 0.00 0.00 0.00 f 0.00 15107 37 87 11.07 11.07 0.00 0.00 f 0.00 15108 38 87 11.07 11.07 0.00 0.00 f 0.00 15161 29 88 0.00 0.00 0.00 0.00 f 0.00 16853 85 114 110000.00 110000.00 0.00 0.00 f 0.00 16854 86 114 110000.00 110000.00 0.00 0.00 f 0.00 16855 87 114 110000.00 110000.00 0.00 0.00 f 0.00 16856 88 114 110000.00 110000.00 0.00 0.00 f 0.00 16857 89 114 110000.00 110000.00 0.00 0.00 f 0.00 16858 90 114 110000.00 110000.00 0.00 0.00 f 0.00 16859 91 114 110000.00 110000.00 0.00 0.00 f 0.00 16860 92 114 110000.00 110000.00 0.00 0.00 f 0.00 15793 30 98 0.00 0.00 0.00 0.00 f 0.00 16870 36 115 0.00 0.00 0.00 0.00 f 0.00 15224 29 89 0.00 0.00 0.00 0.00 f 0.00 15254 61 89 0.00 0.00 0.00 0.00 f 0.00 15255 62 89 0.00 0.00 0.00 0.00 f 0.00 17335 63 122 794.00 794.00 0.00 0.00 f 0.00 17336 64 122 794.00 794.00 0.00 0.00 f 0.00 17337 65 122 794.00 954.00 160.00 0.00 f 0.00 17338 66 122 954.00 1415.60 461.60 0.00 f 0.00 17339 67 122 1415.60 1415.60 0.00 0.00 f 0.00 17340 68 122 1415.60 1559.60 144.00 0.00 f 0.00 15919 30 100 0.00 0.00 0.00 0.00 f 0.00 15879 56 99 263.55 262.95 2900.26 2900.86 f 0.00 15880 57 99 262.95 -0.02 0.00 262.97 f 0.00 15413 29 92 0.00 0.00 0.00 0.00 f 0.00 17650 63 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17651 64 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17652 65 128 -2587.16 -2587.16 0.00 0.00 f 0.00 15539 29 94 0.00 0.00 0.00 0.00 f 0.00 18046 81 134 0.00 0.00 0.00 0.00 f 0.00 18047 82 134 0.00 0.00 0.00 0.00 f 0.00 18048 83 134 0.00 0.00 0.00 0.00 f 0.00 18051 86 134 0.00 0.00 0.00 0.00 f 0.00 15665 29 96 0.00 0.00 0.00 0.00 f 0.00 15690 56 96 -2000.00 -2000.00 35450.64 35450.64 f 0.00 16457 67 108 -322775.05 -342775.05 0.00 20000.00 f 0.00 16558 39 110 0.00 0.00 0.00 0.00 f 0.00 16559 40 110 0.00 0.00 0.00 0.00 f 0.00 16560 41 110 0.00 0.00 0.00 0.00 f 0.00 16561 42 110 0.00 -1000.00 0.00 1000.00 f 0.00 16562 43 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16563 44 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16565 49 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16566 50 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16567 51 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16568 52 110 -1000.00 -1000.00 0.00 0.00 f 0.00 16578 62 110 0.00 0.00 0.00 0.00 f 0.00 16579 63 110 0.00 0.00 0.00 0.00 f 0.00 16587 71 110 0.00 0.00 0.00 0.00 f 0.00 16588 72 110 0.00 0.00 0.00 0.00 f 0.00 16618 36 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16744 36 113 1020000.00 1020000.00 0.00 0.00 f 0.00 16035 86 101 8.32 30.32 22.00 0.00 f 0.00 16036 87 101 30.32 30.32 0.00 0.00 f 0.00 16037 88 101 30.32 30.32 0.00 0.00 f 0.00 16038 89 101 30.32 395.94 365.62 0.00 f 0.00 16039 90 101 395.94 395.94 0.00 0.00 f 0.00 16040 91 101 395.94 396.82 0.88 0.00 f 0.00 16041 92 101 396.82 396.82 0.00 0.00 f 0.00 15791 29 98 0.00 0.00 0.00 0.00 f 0.00 16612 30 111 0.00 -1000.00 0.00 1000.00 f 0.00 16738 30 113 1020000.00 1020000.00 0.00 0.00 f 0.00 16996 36 117 0.00 0.00 0.00 0.00 f 0.00 17311 36 122 0.00 136.00 136.00 0.00 f 0.00 16675 30 112 0.00 0.00 0.00 0.00 f 0.00 15917 29 100 0.00 0.00 0.00 0.00 f 0.00 16849 81 114 110000.00 110000.00 0.00 0.00 f 0.00 16851 83 114 110000.00 110000.00 0.00 0.00 f 0.00 16852 84 114 110000.00 110000.00 0.00 0.00 f 0.00 16043 29 102 0.00 0.00 0.00 0.00 f 0.00 16169 29 104 0.00 0.00 0.00 0.00 f 0.00 17500 36 126 0.00 0.00 0.00 0.00 f 0.00 17503 39 126 0.00 -25000.00 0.00 25000.00 f 0.00 17504 40 126 -25000.00 -25000.00 400000.00 400000.00 f 0.00 17563 36 127 0.00 0.00 0.00 0.00 f 0.00 16801 30 114 0.00 0.00 0.00 0.00 f 0.00 16822 54 114 0.00 0.00 0.00 0.00 f 0.00 17689 36 129 0.00 0.00 0.00 0.00 f 0.00 16864 30 115 0.00 0.00 0.00 0.00 f 0.00 16927 30 116 0.00 5000.00 5000.00 0.00 f 0.00 16963 69 116 5000.00 5000.00 0.00 0.00 f 0.00 16964 70 116 5000.00 5000.00 0.00 0.00 f 0.00 16965 71 116 5000.00 5000.00 0.00 0.00 f 0.00 17053 30 118 0.00 0.00 0.00 0.00 f 0.00 16295 29 106 0.00 0.00 0.00 0.00 f 0.00 17734 84 129 52.78 52.78 0.00 0.00 f 0.00 17735 85 129 52.78 52.78 0.00 0.00 f 0.00 17736 86 129 52.78 52.78 0.00 0.00 f 0.00 17737 87 129 52.78 52.78 0.00 0.00 f 0.00 17738 88 129 52.78 52.78 0.00 0.00 f 0.00 17739 89 129 52.78 -505.22 0.00 558.00 f 0.00 17740 90 129 -505.22 -505.22 0.00 0.00 f 0.00 17741 91 129 -505.22 -505.22 0.00 0.00 f 0.00 18067 36 135 0.00 0.00 0.00 0.00 f 0.00 16281 80 105 631.35 631.35 0.00 0.00 f 0.00 16282 81 105 631.35 631.35 0.00 0.00 f 0.00 16283 82 105 631.35 631.35 0.00 0.00 f 0.00 17755 39 130 0.00 0.00 0.00 0.00 f 0.00 17756 40 130 0.00 0.00 0.00 0.00 f 0.00 17757 41 130 0.00 0.00 0.00 0.00 f 0.00 17758 42 130 0.00 0.00 0.00 0.00 f 0.00 17759 43 130 0.00 0.00 0.00 0.00 f 0.00 16421 29 108 -4000.00 -5000.00 0.00 1000.00 f 0.00 16431 38 108 -564365.35 -579365.35 0.00 15000.00 f 0.00 17093 73 118 0.00 0.00 0.00 0.00 f 0.00 17094 74 118 0.00 0.00 0.00 0.00 f 0.00 18084 56 135 0.00 -9.80 0.00 9.80 f 0.00 18085 57 135 0.00 0.00 0.00 0.00 f 0.00 18086 58 135 0.00 0.00 0.00 0.00 f 0.00 18087 59 135 0.00 0.00 0.00 0.00 f 0.00 18088 60 135 0.00 0.00 0.00 0.00 f 0.00 18089 61 135 0.00 0.00 0.00 0.00 f 0.00 17179 30 120 0.00 0.00 0.00 0.00 f 0.00 18508 36 142 0.00 0.00 0.00 0.00 f 0.00 16547 29 110 0.00 0.00 0.00 0.00 f 0.00 16564 45 110 -1000.00 -1000.00 0.00 0.00 f 0.00 17242 30 121 0.00 0.00 0.00 0.00 f 0.00 17245 33 121 0.00 0.00 0.00 0.00 f 0.00 18603 71 143 0.00 0.00 0.00 0.00 f 0.00 18604 72 143 0.00 0.00 0.00 0.00 f 0.00 18605 73 143 0.00 0.00 0.00 0.00 f 0.00 18606 74 143 0.00 0.00 0.00 0.00 f 0.00 18634 36 144 0.00 0.00 0.00 0.00 f 0.00 16556 37 110 0.00 0.00 0.00 0.00 f 0.00 16557 38 110 0.00 0.00 0.00 0.00 f 0.00 16589 73 110 0.00 0.00 0.00 0.00 f 0.00 16590 74 110 0.00 0.00 0.00 0.00 f 0.00 16591 75 110 0.00 0.00 0.00 0.00 f 0.00 16592 76 110 0.00 0.00 0.00 0.00 f 0.00 16593 77 110 0.00 0.00 0.00 0.00 f 0.00 16594 78 110 0.00 0.00 0.00 0.00 f 0.00 16595 79 110 0.00 0.00 0.00 0.00 f 0.00 16596 80 110 0.00 0.00 0.00 0.00 f 0.00 16597 81 110 0.00 0.00 0.00 0.00 f 0.00 16601 85 110 0.00 0.00 0.00 0.00 f 0.00 16602 86 110 0.00 0.00 0.00 0.00 f 0.00 16603 87 110 0.00 0.00 0.00 0.00 f 0.00 16604 88 110 0.00 0.00 0.00 0.00 f 0.00 16605 89 110 0.00 0.00 0.00 0.00 f 0.00 16606 90 110 0.00 0.00 0.00 0.00 f 0.00 16621 39 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16622 40 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16624 42 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16625 43 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16626 44 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16627 45 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16628 49 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16673 29 112 0.00 0.00 0.00 0.00 f 0.00 19327 36 156 0.00 0.00 0.00 0.00 f 0.00 17368 30 123 0.00 0.00 0.00 0.00 f 0.00 16997 37 117 0.00 0.00 0.00 0.00 f 0.00 16998 38 117 0.00 0.00 0.00 0.00 f 0.00 17030 73 117 0.00 0.00 0.00 0.00 f 0.00 17031 74 117 0.00 0.00 0.00 0.00 f 0.00 17032 75 117 0.00 0.00 0.00 0.00 f 0.00 17033 76 117 0.00 0.00 0.00 0.00 f 0.00 17034 77 117 0.00 0.00 0.00 0.00 f 0.00 17035 78 117 0.00 0.00 0.00 0.00 f 0.00 17036 79 117 0.00 0.00 0.00 0.00 f 0.00 17037 80 117 0.00 0.00 0.00 0.00 f 0.00 17038 81 117 0.00 0.00 0.00 0.00 f 0.00 16840 72 114 100000.00 100000.00 0.00 0.00 f 0.00 17620 30 128 0.00 0.00 0.00 0.00 f 0.00 16925 29 116 0.00 0.00 0.00 0.00 f 0.00 17520 59 126 -23095.22 -23053.23 41.99 0.00 f 0.00 17521 60 126 -23053.23 -23053.23 0.00 0.00 f 0.00 17522 61 126 -23053.23 -23053.23 0.00 0.00 f 0.00 17523 62 126 -23053.23 -22847.46 205.77 0.00 f 0.00 17524 63 126 -22847.46 -22847.46 0.00 0.00 f 0.00 17550 89 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17809 30 131 0.00 0.00 0.00 0.00 f 0.00 17746 30 130 0.00 0.00 0.00 0.00 f 0.00 17135 52 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17872 30 132 0.00 0.00 0.00 0.00 f 0.00 17794 81 130 0.00 0.00 0.00 0.00 f 0.00 17795 82 130 0.00 0.00 0.00 0.00 f 0.00 17796 83 130 0.00 0.00 0.00 0.00 f 0.00 17797 84 130 0.00 0.00 0.00 0.00 f 0.00 17798 85 130 0.00 0.00 0.00 0.00 f 0.00 17804 91 130 0.00 0.00 0.00 0.00 f 0.00 17805 92 130 0.00 0.00 0.00 0.00 f 0.00 17240 29 121 0.00 0.00 0.00 0.00 f 0.00 17285 76 121 0.00 0.00 0.00 0.00 f 0.00 17286 77 121 0.00 0.00 0.00 0.00 f 0.00 18243 89 137 0.00 0.00 0.00 0.00 f 0.00 18244 90 137 0.00 0.00 0.00 0.00 f 0.00 18245 91 137 0.00 0.00 0.00 0.00 f 0.00 18246 92 137 0.00 0.00 0.00 0.00 f 0.00 18257 37 138 0.00 0.00 0.00 0.00 f 0.00 18338 58 139 0.00 0.00 0.00 0.00 f 0.00 18339 59 139 0.00 0.00 0.00 0.00 f 0.00 18386 40 140 0.00 0.00 0.00 0.00 f 0.00 18387 41 140 0.00 0.00 0.00 0.00 f 0.00 18388 42 140 0.00 0.00 0.00 0.00 f 0.00 18389 43 140 0.00 0.00 0.00 0.00 f 0.00 18390 44 140 0.00 0.00 0.00 0.00 f 0.00 18394 51 140 0.00 0.00 0.00 0.00 f 0.00 18395 52 140 0.00 0.00 0.00 0.00 f 0.00 18396 53 140 0.00 0.00 0.00 0.00 f 0.00 18397 54 140 0.00 0.00 0.00 0.00 f 0.00 17998 30 134 0.00 0.00 0.00 0.00 f 0.00 18022 57 134 0.00 0.00 0.00 0.00 f 0.00 18023 58 134 0.00 0.00 0.00 0.00 f 0.00 16620 38 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16629 50 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16630 51 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16631 52 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16632 53 111 -1000.00 -1000.00 0.00 0.00 f 0.00 16653 74 111 -51000.00 -85999.79 0.00 34999.79 f 0.00 16654 75 111 -85999.79 -85999.79 0.00 0.00 f 0.00 16655 76 111 -85999.79 -85999.79 0.00 0.00 f 0.00 16656 77 111 -85999.79 -145999.79 0.00 60000.00 f 0.00 16669 90 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16670 91 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16671 92 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16745 37 113 1020000.00 1020000.00 0.00 0.00 f 0.00 16746 38 113 1020000.00 1020000.00 0.00 0.00 f 0.00 16747 39 113 1020000.00 1220000.00 200000.00 0.00 f 0.00 16748 40 113 1220000.00 1420000.00 400000.00 200000.00 f 0.00 16751 43 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16758 53 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16759 54 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16760 55 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16761 56 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16762 57 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16763 58 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16764 59 113 1420000.00 1419999.99 0.00 0.01 f 0.00 16765 60 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16766 61 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16767 62 113 1419999.99 1419999.99 0.00 0.00 f 0.00 15565 57 94 2634.45 2634.45 0.00 0.00 f 0.00 15566 58 94 2634.45 2634.45 0.00 0.00 f 0.00 16835 67 114 100000.00 100000.00 0.00 0.00 f 0.00 17366 29 123 0.00 0.00 0.00 0.00 f 0.00 17561 34 127 0.00 0.00 0.00 0.00 f 0.00 17312 37 122 136.00 136.00 0.00 0.00 f 0.00 16836 68 114 100000.00 100000.00 0.00 0.00 f 0.00 16837 69 114 100000.00 100000.00 0.00 0.00 f 0.00 17618 29 128 0.00 0.00 0.00 0.00 f 0.00 18250 30 138 0.00 0.00 0.00 0.00 f 0.00 18313 30 139 0.00 0.00 0.00 0.00 f 0.00 16871 37 115 0.00 0.00 0.00 0.00 f 0.00 17501 37 126 0.00 0.00 0.00 0.00 f 0.00 17512 51 126 -24712.47 -24712.47 0.00 0.00 f 0.00 17513 52 126 -24712.47 -24712.47 0.00 0.00 f 0.00 17514 53 126 -24712.47 -24712.47 0.00 0.00 f 0.00 17515 54 126 -24712.47 -24712.47 0.00 0.00 f 0.00 17517 56 126 -24712.47 -23095.22 1617.25 0.00 f 0.00 17518 57 126 -23095.22 -23095.22 0.00 0.00 f 0.00 17564 37 127 0.00 0.00 0.00 0.00 f 0.00 17690 37 129 0.00 0.00 0.00 0.00 f 0.00 18439 30 141 0.00 0.00 0.00 0.00 f 0.00 18502 30 142 0.00 0.00 0.00 0.00 f 0.00 17744 29 130 0.00 0.00 0.00 0.00 f 0.00 17953 51 133 0.00 0.00 0.00 0.00 f 0.00 17954 52 133 0.00 0.00 500.00 500.00 f 0.00 17955 53 133 0.00 0.00 1500.00 1500.00 f 0.00 17956 54 133 0.00 0.00 0.00 0.00 f 0.00 17957 55 133 0.00 0.00 0.00 0.00 f 0.00 17870 29 132 0.00 0.00 0.00 0.00 f 0.00 17816 37 131 0.00 0.00 0.00 0.00 f 0.00 17817 38 131 0.00 0.00 0.00 0.00 f 0.00 17818 39 131 0.00 0.00 0.00 0.00 f 0.00 17819 40 131 0.00 0.00 0.00 0.00 f 0.00 17851 75 131 -799.00 -799.00 0.00 0.00 f 0.00 17852 76 131 -799.00 -799.00 0.00 0.00 f 0.00 18068 37 135 0.00 0.00 0.00 0.00 f 0.00 17754 38 130 0.00 0.00 0.00 0.00 f 0.00 17781 68 130 0.00 0.00 0.00 0.00 f 0.00 17782 69 130 0.00 0.00 0.00 0.00 f 0.00 17783 70 130 0.00 0.00 0.00 0.00 f 0.00 17784 71 130 0.00 0.00 0.00 0.00 f 0.00 17793 80 130 0.00 0.00 0.00 0.00 f 0.00 17985 83 133 0.00 0.00 0.00 0.00 f 0.00 17986 84 133 0.00 0.00 0.00 0.00 f 0.00 18231 77 137 0.00 0.00 0.00 0.00 f 0.00 18232 78 137 0.00 0.00 0.00 0.00 f 0.00 18233 79 137 0.00 0.00 0.00 0.00 f 0.00 18234 80 137 0.00 0.00 0.00 0.00 f 0.00 18235 81 137 0.00 0.00 0.00 0.00 f 0.00 18236 82 137 0.00 0.00 0.00 0.00 f 0.00 18237 83 137 0.00 0.00 12.56 12.56 f 0.00 18509 37 142 0.00 0.00 0.00 0.00 f 0.00 18635 37 144 0.00 0.00 0.00 0.00 f 0.00 18754 30 146 0.00 0.00 0.00 0.00 f 0.00 17996 29 134 0.00 0.00 0.00 0.00 f 0.00 18122 29 136 0.00 0.00 0.00 0.00 f 0.00 18125 31 136 0.00 0.00 0.00 0.00 f 0.00 16986 92 116 40000.00 40000.00 0.00 0.00 f 0.00 16999 39 117 0.00 0.00 0.00 0.00 f 0.00 17000 40 117 0.00 0.00 0.00 0.00 f 0.00 17001 41 117 0.00 0.00 0.00 0.00 f 0.00 17002 42 117 0.00 0.00 0.00 0.00 f 0.00 17003 43 117 0.00 0.00 0.00 0.00 f 0.00 17004 44 117 0.00 0.00 0.00 0.00 f 0.00 17005 45 117 0.00 0.00 0.00 0.00 f 0.00 17006 49 117 0.00 0.00 0.00 0.00 f 0.00 17009 52 117 0.00 0.00 0.00 0.00 f 0.00 17010 53 117 0.00 0.00 0.00 0.00 f 0.00 17021 64 117 0.00 0.00 0.00 0.00 f 0.00 17022 65 117 0.00 0.00 0.00 0.00 f 0.00 17023 66 117 0.00 0.00 0.00 0.00 f 0.00 16838 70 114 100000.00 100000.00 0.00 0.00 f 0.00 16839 71 114 100000.00 100000.00 0.00 0.00 f 0.00 16841 73 114 100000.00 100000.00 0.00 0.00 f 0.00 16842 74 114 100000.00 100000.00 0.00 0.00 f 0.00 16843 75 114 100000.00 100000.00 0.00 0.00 f 0.00 16844 76 114 100000.00 100000.00 0.00 0.00 f 0.00 16845 77 114 100000.00 110000.00 10000.00 0.00 f 0.00 16846 78 114 110000.00 110000.00 0.00 0.00 f 0.00 17024 67 117 0.00 0.00 0.00 0.00 f 0.00 17025 68 117 0.00 0.00 0.00 0.00 f 0.00 17026 69 117 0.00 0.00 0.00 0.00 f 0.00 17027 70 117 0.00 0.00 0.00 0.00 f 0.00 17028 71 117 0.00 0.00 0.00 0.00 f 0.00 18248 29 138 0.00 0.00 0.00 0.00 f 0.00 19069 30 152 0.00 0.00 0.00 0.00 f 0.00 17634 44 128 0.00 0.00 0.00 0.00 f 0.00 17635 45 128 0.00 0.00 0.00 0.00 f 0.00 17636 49 128 0.00 -1914.54 638.18 2552.72 f 0.00 17637 50 128 -1914.54 -1914.54 0.00 0.00 f 0.00 17638 51 128 -1914.54 -1914.54 0.00 0.00 f 0.00 17639 52 128 -1914.54 -2043.04 0.00 128.50 f 0.00 17640 53 128 -2043.04 -2557.04 0.00 514.00 f 0.00 17641 54 128 -2557.04 -2557.04 0.00 0.00 f 0.00 17642 55 128 -2557.04 -2557.04 0.00 0.00 f 0.00 17643 56 128 -2557.04 -2685.54 0.00 128.50 f 0.00 17644 57 128 -2685.54 -2685.54 0.00 0.00 f 0.00 17646 59 128 -2685.54 -2734.68 16.38 65.52 f 0.00 17647 60 128 -2734.68 -2734.68 0.00 0.00 f 0.00 17648 61 128 -2734.68 -2734.68 0.00 0.00 f 0.00 17649 62 128 -2734.68 -2587.16 2166.42 2018.90 f 0.00 17653 66 128 -2587.16 -2587.16 0.00 0.00 f 0.00 18374 29 140 0.00 0.00 0.00 0.00 f 0.00 19195 30 154 0.00 0.00 0.00 0.00 f 0.00 18071 40 135 0.00 0.00 0.00 0.00 f 0.00 18500 29 142 0.00 0.00 0.00 0.00 f 0.00 18055 90 134 0.00 0.00 0.00 0.00 f 0.00 18056 91 134 0.00 0.00 0.00 0.00 f 0.00 18057 92 134 0.00 0.00 0.00 0.00 f 0.00 15150 83 87 11346.03 11623.94 277.91 0.00 f 0.00 15151 84 87 11623.94 11623.94 0.00 0.00 f 0.00 15152 85 87 11623.94 11623.94 0.00 0.00 f 0.00 15153 86 87 11623.94 42695.00 31071.06 0.00 f 0.00 15154 87 87 42695.00 42695.00 0.00 0.00 f 0.00 15155 88 87 42695.00 42695.00 0.00 0.00 f 0.00 15156 89 87 42695.00 45313.98 2618.98 0.00 f 0.00 15157 90 87 45313.98 45313.98 0.00 0.00 f 0.00 18636 38 144 0.00 0.00 0.00 0.00 f 0.00 18637 39 144 0.00 0.00 0.00 0.00 f 0.00 18647 52 144 0.00 0.00 0.00 0.00 f 0.00 18700 39 145 0.00 0.00 0.00 0.00 f 0.00 18701 40 145 0.00 0.00 0.00 0.00 f 0.00 18704 43 145 0.00 0.00 0.00 0.00 f 0.00 18705 44 145 0.00 0.00 0.00 0.00 f 0.00 17029 72 117 0.00 0.00 0.00 0.00 f 0.00 17064 41 118 0.00 0.00 0.00 0.00 f 0.00 17065 42 118 0.00 0.00 0.00 0.00 f 0.00 17066 43 118 0.00 0.00 0.00 0.00 f 0.00 17067 44 118 0.00 0.00 0.00 0.00 f 0.00 17068 45 118 0.00 0.00 0.00 0.00 f 0.00 17069 49 118 0.00 0.00 0.00 0.00 f 0.00 17070 50 118 0.00 0.00 0.00 0.00 f 0.00 17071 51 118 0.00 0.00 0.00 0.00 f 0.00 17072 52 118 0.00 0.00 0.00 0.00 f 0.00 15527 82 93 0.00 0.00 0.00 0.00 f 0.00 15528 83 93 0.00 0.00 0.00 0.00 f 0.00 15529 84 93 0.00 0.00 0.00 0.00 f 0.00 15530 85 93 0.00 0.00 0.00 0.00 f 0.00 17502 38 126 0.00 0.00 0.00 0.00 f 0.00 17565 38 127 0.00 0.00 0.00 0.00 f 0.00 17316 41 122 181.00 213.00 32.00 0.00 f 0.00 17317 42 122 0.00 198.00 198.00 0.00 f 0.00 17318 43 122 198.00 345.03 147.03 0.00 f 0.00 17319 44 122 345.03 345.03 0.00 0.00 f 0.00 17320 45 122 345.03 444.03 99.00 0.00 f 0.00 17321 49 122 444.03 644.03 200.00 0.00 f 0.00 17322 50 122 644.03 644.03 0.00 0.00 f 0.00 17323 51 122 644.03 644.03 0.00 0.00 f 0.00 17324 52 122 644.03 681.03 37.00 0.00 f 0.00 17325 53 122 681.03 781.03 100.00 0.00 f 0.00 17326 54 122 781.03 781.03 0.00 0.00 f 0.00 17327 55 122 781.03 781.03 0.00 0.00 f 0.00 17328 56 122 781.03 1152.03 371.00 0.00 f 0.00 17329 57 122 0.00 0.00 0.00 0.00 f 0.00 17330 58 122 0.00 0.00 0.00 0.00 f 0.00 17331 59 122 0.00 59.00 59.00 0.00 f 0.00 17260 51 121 910.33 910.33 0.00 0.00 f 0.00 17261 52 121 910.33 910.33 0.00 0.00 f 0.00 17262 53 121 910.33 910.33 0.00 0.00 f 0.00 17273 64 121 0.00 0.00 0.00 0.00 f 0.00 17274 65 121 0.00 0.00 0.00 0.00 f 0.00 17275 66 121 0.00 0.00 0.00 0.00 f 0.00 17205 59 120 0.00 -22.85 0.00 22.85 f 0.00 17206 60 120 -22.85 -22.85 0.00 0.00 f 0.00 17234 88 120 -2630.00 -2630.00 0.00 0.00 f 0.00 18941 29 149 0.00 0.00 0.00 0.00 f 0.00 19004 29 150 0.00 0.00 0.00 0.00 f 0.00 17598 74 127 -517460.40 -531541.03 0.00 14080.63 f 0.00 17606 82 127 -644253.89 -644253.89 0.00 0.00 f 0.00 17607 83 127 -644253.89 -644253.89 0.00 0.00 f 0.00 17608 84 127 -644253.89 -694919.92 0.00 50666.03 f 0.00 15683 49 96 -2000.00 -2000.00 3829.08 3829.08 f 0.00 15684 50 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15685 51 96 -2000.00 -2000.00 0.00 0.00 f 0.00 15686 52 96 -2000.00 -2000.00 766.68 766.68 f 0.00 17691 38 129 0.00 0.00 0.00 0.00 f 0.00 17694 41 129 0.00 0.00 0.00 0.00 f 0.00 17695 42 129 0.00 0.00 0.00 0.00 f 0.00 17629 39 128 0.00 0.00 0.00 0.00 f 0.00 17630 40 128 0.00 0.00 0.00 0.00 f 0.00 17654 67 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17655 68 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17656 69 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17657 70 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17658 71 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17659 72 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17660 73 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17661 74 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17662 75 128 -2587.16 -2587.16 0.00 0.00 f 0.00 17666 79 128 -3947.25 -3947.25 0.00 0.00 f 0.00 17667 80 128 -3947.25 -3947.25 0.00 0.00 f 0.00 17670 83 128 -3947.25 -3959.81 0.00 12.56 f 0.00 17671 84 128 -3959.81 -3959.81 0.00 0.00 f 0.00 17673 86 128 -3959.81 -3959.81 0.00 0.00 f 0.00 18006 38 134 0.00 0.00 0.00 0.00 f 0.00 19067 29 152 0.00 0.00 0.00 0.00 f 0.00 19130 29 153 0.00 0.00 0.00 0.00 f 0.00 15870 44 99 262.95 262.95 0.00 0.00 f 0.00 15871 45 99 262.95 262.95 0.00 0.00 f 0.00 15872 49 99 262.95 263.55 4307.63 4307.03 f 0.00 18069 38 135 0.00 0.00 0.00 0.00 f 0.00 18510 38 142 0.00 0.00 0.00 0.00 f 0.00 18052 87 134 0.00 0.00 0.00 0.00 f 0.00 18053 88 134 0.00 0.00 0.00 0.00 f 0.00 18054 89 134 0.00 0.00 0.00 0.00 f 0.00 19256 29 155 0.00 0.00 0.00 0.00 f 0.00 14905 90 83 0.00 0.00 0.00 0.00 f 0.00 14906 91 83 0.00 0.00 0.00 0.00 f 0.00 14907 92 83 0.00 0.00 0.00 0.00 f 0.00 17445 44 125 0.00 0.00 0.00 0.00 f 0.00 17461 63 125 0.00 0.00 0.00 0.00 f 0.00 17462 64 125 0.00 0.00 0.00 0.00 f 0.00 17332 60 122 59.00 455.00 396.00 0.00 f 0.00 17333 61 122 455.00 455.00 0.00 0.00 f 0.00 17341 69 122 0.00 735.00 735.00 0.00 f 0.00 17342 70 122 735.00 735.00 0.00 0.00 f 0.00 17343 71 122 735.00 735.00 0.00 0.00 f 0.00 17463 65 125 0.00 0.00 0.00 0.00 f 0.00 17464 66 125 0.00 0.00 0.00 0.00 f 0.00 17465 67 125 0.00 0.00 0.00 0.00 f 0.00 17466 68 125 0.00 0.00 0.00 0.00 f 0.00 15998 49 101 181.00 181.00 0.00 0.00 f 0.00 18154 63 136 0.00 0.00 0.00 0.00 f 0.00 18155 64 136 0.00 0.00 0.00 0.00 f 0.00 18156 65 136 0.00 0.00 0.00 0.00 f 0.00 18157 66 136 0.00 0.00 0.00 0.00 f 0.00 18158 67 136 0.00 0.00 0.00 0.00 f 0.00 18159 68 136 0.00 0.00 0.00 0.00 f 0.00 18160 69 136 0.00 0.00 0.00 0.00 f 0.00 18164 73 136 0.00 0.00 0.00 0.00 f 0.00 18171 80 136 0.00 0.00 0.00 0.00 f 0.00 18172 81 136 0.00 0.00 0.00 0.00 f 0.00 18173 82 136 0.00 0.00 0.00 0.00 f 0.00 18174 83 136 0.00 0.00 0.00 0.00 f 0.00 18175 84 136 0.00 0.00 0.00 0.00 f 0.00 15213 83 88 0.00 0.00 0.00 0.00 f 0.00 18070 39 135 0.00 0.00 0.00 0.00 f 0.00 18097 69 135 0.00 0.00 0.00 0.00 f 0.00 18098 70 135 0.00 0.00 0.00 0.00 f 0.00 18198 41 137 0.00 0.00 0.00 0.00 f 0.00 18199 42 137 0.00 0.00 0.00 0.00 f 0.00 18200 43 137 0.00 0.00 0.00 0.00 f 0.00 18201 44 137 0.00 0.00 0.00 0.00 f 0.00 18202 45 137 0.00 0.00 0.00 0.00 f 0.00 18203 49 137 0.00 0.00 0.00 0.00 f 0.00 16154 79 103 747755.09 825005.09 77250.00 0.00 f 0.00 16155 80 103 825005.09 917505.09 92500.00 0.00 f 0.00 15361 39 91 94.00 -169.83 4162.98 4426.81 f 0.00 16309 42 106 -2068.06 -1236.56 2068.06 1236.56 f 0.00 16310 43 106 -1236.56 -0.01 3331.09 2094.54 f 0.00 16311 44 106 -0.01 -0.01 0.00 0.00 f 0.00 14983 39 85 -59666.47 -270437.61 35815.79 246586.93 f 0.00 18641 43 144 0.00 0.00 0.00 0.00 f 0.00 18642 44 144 0.00 0.00 0.00 0.00 f 0.00 18643 45 144 0.00 0.00 0.00 0.00 f 0.00 18644 49 144 0.00 0.00 0.00 0.00 f 0.00 18973 63 149 0.00 0.00 0.00 0.00 f 0.00 19058 85 150 0.00 0.00 0.00 0.00 f 0.00 19098 62 152 0.00 0.00 0.00 0.00 f 0.00 19099 63 152 0.00 0.00 0.00 0.00 f 0.00 19100 64 152 0.00 0.00 0.00 0.00 f 0.00 19101 65 152 0.00 0.00 0.00 0.00 f 0.00 19102 66 152 0.00 0.00 0.00 0.00 f 0.00 19103 67 152 0.00 0.00 0.00 0.00 f 0.00 19104 68 152 0.00 0.00 0.00 0.00 f 0.00 19105 69 152 0.00 0.00 0.00 0.00 f 0.00 19106 70 152 0.00 0.00 0.00 0.00 f 0.00 19107 71 152 0.00 0.00 0.00 0.00 f 0.00 19108 72 152 0.00 0.00 0.00 0.00 f 0.00 19109 73 152 0.00 0.00 0.00 0.00 f 0.00 19110 74 152 0.00 0.00 0.00 0.00 f 0.00 19111 75 152 0.00 0.00 0.00 0.00 f 0.00 19112 76 152 0.00 0.00 0.00 0.00 f 0.00 15519 74 93 0.00 0.00 0.00 0.00 f 0.00 16447 57 108 0.00 -45250.00 0.00 45250.00 f 0.00 16448 58 108 -45250.00 -90500.00 0.00 45250.00 f 0.00 16449 59 108 -90500.00 -137075.51 0.00 46575.51 f 0.00 16450 60 108 -137075.51 -184747.31 3960.00 51631.80 f 0.00 16451 61 108 -184747.31 -229997.31 0.00 45250.00 f 0.00 17467 69 125 0.00 0.00 0.00 0.00 f 0.00 17468 70 125 0.00 0.00 0.00 0.00 f 0.00 17469 71 125 0.00 0.00 0.00 0.00 f 0.00 17470 72 125 0.00 0.00 0.00 0.00 f 0.00 17477 79 125 -500.00 -500.00 0.00 0.00 f 0.00 17487 89 125 0.00 0.00 0.00 0.00 f 0.00 16598 82 110 0.00 0.00 0.00 0.00 f 0.00 16599 83 110 0.00 0.00 0.00 0.00 f 0.00 16600 84 110 0.00 0.00 0.00 0.00 f 0.00 17488 90 125 0.00 0.00 0.00 0.00 f 0.00 17489 91 125 0.00 0.00 0.00 0.00 f 0.00 17490 92 125 0.00 0.00 0.00 0.00 f 0.00 17505 41 126 -25000.00 -24871.50 128.50 0.00 f 0.00 17506 42 126 -24871.50 -24871.50 0.00 0.00 f 0.00 17507 43 126 -24871.50 -24743.00 128.50 0.00 f 0.00 17508 44 126 -24743.00 -24743.00 0.00 0.00 f 0.00 17509 45 126 -24743.00 -24743.00 0.00 0.00 f 0.00 17510 49 126 -24743.00 -24712.47 30.53 0.00 f 0.00 17511 50 126 -24712.47 -24712.47 0.00 0.00 f 0.00 17519 58 126 -23095.22 -23095.22 0.00 0.00 f 0.00 17546 85 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17547 86 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17548 87 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17551 90 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17552 91 126 -4739.69 -4696.37 43.32 0.00 f 0.00 17553 92 126 -4696.37 -4696.37 0.00 0.00 f 0.00 17568 41 127 -25000.00 -25000.00 0.00 0.00 f 0.00 17569 42 127 -25000.00 -25000.00 0.00 0.00 f 0.00 17570 43 127 -25000.00 -26052.03 0.00 1052.03 f 0.00 17571 44 127 -26052.03 -26052.03 0.00 0.00 f 0.00 17572 45 127 -26052.03 -26052.03 0.00 0.00 f 0.00 17573 49 127 -26052.03 -53877.21 0.00 27825.18 f 0.00 17574 50 127 -53877.21 -53877.21 0.00 0.00 f 0.00 15656 85 95 -870.00 -870.00 50000.00 50000.00 f 0.00 15657 86 95 -870.00 -870.00 59200.00 59200.00 f 0.00 17566 39 127 0.00 -25000.00 0.00 25000.00 f 0.00 17589 65 127 -226735.14 -226735.14 0.00 0.00 f 0.00 17590 66 127 -226735.14 -271111.78 0.00 44376.64 f 0.00 17595 71 127 -517460.40 -517460.40 0.00 0.00 f 0.00 17596 72 127 -517460.40 -517460.40 0.00 0.00 f 0.00 16811 40 114 0.00 0.00 0.00 0.00 f 0.00 17692 39 129 0.00 0.00 0.00 0.00 f 0.00 15804 41 98 0.00 0.00 0.00 0.00 f 0.00 18196 39 137 0.00 0.00 0.00 0.00 f 0.00 18007 39 134 0.00 0.00 0.00 0.00 f 0.00 16952 58 116 5000.00 5000.00 0.00 0.00 f 0.00 16953 59 116 5000.00 5000.00 0.00 0.00 f 0.00 17567 40 127 -25000.00 -25000.00 0.00 0.00 f 0.00 17693 40 129 0.00 0.00 0.00 0.00 f 0.00 17696 43 129 0.00 0.00 0.00 0.00 f 0.00 17697 44 129 0.00 0.00 0.00 0.00 f 0.00 17698 45 129 0.00 0.00 0.00 0.00 f 0.00 17699 49 129 0.00 186.44 211.44 25.00 f 0.00 17700 50 129 186.44 86.44 0.00 100.00 f 0.00 17706 56 129 86.44 2281.81 2195.37 0.00 f 0.00 17707 57 129 2281.81 2281.81 0.00 0.00 f 0.00 17708 58 129 2281.81 2281.81 0.00 0.00 f 0.00 17709 59 129 2281.81 2281.81 0.00 0.00 f 0.00 17710 60 129 2281.81 2281.81 0.00 0.00 f 0.00 17711 61 129 2281.81 2281.81 0.00 0.00 f 0.00 17719 69 129 0.00 0.00 0.00 0.00 f 0.00 17720 70 129 0.00 0.00 0.00 0.00 f 0.00 17721 71 129 0.00 0.00 0.00 0.00 f 0.00 17722 72 129 0.00 0.00 0.00 0.00 f 0.00 17723 73 129 0.00 0.00 0.00 0.00 f 0.00 17724 74 129 0.00 0.00 0.00 0.00 f 0.00 17725 75 129 0.00 0.00 0.00 0.00 f 0.00 17727 77 129 0.00 7.78 7.78 0.00 f 0.00 17728 78 129 7.78 50.64 42.86 0.00 f 0.00 17729 79 129 50.64 50.64 0.00 0.00 f 0.00 17730 80 129 50.64 50.64 0.00 0.00 f 0.00 17731 81 129 50.64 52.78 2.14 0.00 f 0.00 17959 57 133 0.00 0.00 0.00 0.00 f 0.00 17960 58 133 0.00 0.00 0.00 0.00 f 0.00 17100 80 118 -0.01 -0.01 0.00 0.00 f 0.00 17101 81 118 0.00 0.00 0.00 0.00 f 0.00 17102 82 118 0.00 0.00 0.00 0.00 f 0.00 17103 83 118 0.00 0.00 0.00 0.00 f 0.00 17104 84 118 0.00 0.00 0.00 0.00 f 0.00 16081 69 102 0.00 4.46 4.46 0.00 f 0.00 16082 70 102 4.46 4.46 0.00 0.00 f 0.00 16085 73 102 4.46 4.46 0.00 0.00 f 0.00 18073 42 135 0.00 0.00 0.00 0.00 f 0.00 18074 43 135 0.00 0.00 0.00 0.00 f 0.00 18075 44 135 0.00 0.00 0.00 0.00 f 0.00 18076 45 135 0.00 0.00 0.00 0.00 f 0.00 18077 49 135 0.00 0.00 0.00 0.00 f 0.00 18082 54 135 0.00 0.00 0.00 0.00 f 0.00 18083 55 135 0.00 0.00 0.00 0.00 f 0.00 18090 62 135 0.00 0.00 0.00 0.00 f 0.00 18091 63 135 0.00 0.00 0.00 0.00 f 0.00 18092 64 135 0.00 0.00 0.00 0.00 f 0.00 18093 65 135 0.00 0.00 0.00 0.00 f 0.00 18094 66 135 0.00 0.00 0.00 0.00 f 0.00 18095 67 135 0.00 0.00 0.00 0.00 f 0.00 17780 67 130 0.00 0.00 0.00 0.00 f 0.00 18008 40 134 0.00 0.00 0.00 0.00 f 0.00 18009 41 134 0.00 0.00 0.00 0.00 f 0.00 18010 42 134 0.00 0.00 0.00 0.00 f 0.00 18011 43 134 0.00 0.00 0.00 0.00 f 0.00 18012 44 134 0.00 0.00 0.00 0.00 f 0.00 18013 45 134 0.00 0.00 0.00 0.00 f 0.00 18014 49 134 0.00 0.00 0.00 0.00 f 0.00 18036 71 134 0.00 0.00 0.00 0.00 f 0.00 18037 72 134 0.00 0.00 0.00 0.00 f 0.00 17246 34 121 0.00 0.00 0.00 0.00 f 0.00 18072 41 135 0.00 0.00 0.00 0.00 f 0.00 18096 68 135 0.00 0.00 0.00 0.00 f 0.00 16246 42 105 624.22 624.22 0.00 0.00 f 0.00 16247 43 105 624.22 624.22 0.00 0.00 f 0.00 18197 40 137 0.00 0.00 0.00 0.00 f 0.00 18204 50 137 0.00 0.00 0.00 0.00 f 0.00 18205 51 137 0.00 0.00 0.00 0.00 f 0.00 18210 56 137 0.00 0.00 0.00 0.00 f 0.00 18211 57 137 0.00 0.00 0.00 0.00 f 0.00 18212 58 137 0.00 0.00 0.00 0.00 f 0.00 18213 59 137 0.00 0.00 49.14 49.14 f 0.00 18214 60 137 0.00 0.00 0.00 0.00 f 0.00 18223 69 137 0.00 0.00 0.00 0.00 f 0.00 18224 70 137 0.00 0.00 0.00 0.00 f 0.00 18225 71 137 0.00 0.00 0.00 0.00 f 0.00 18226 72 137 0.00 0.00 0.00 0.00 f 0.00 18238 84 137 0.00 0.00 0.00 0.00 f 0.00 18239 85 137 0.00 0.00 0.00 0.00 f 0.00 18240 86 137 0.00 0.00 0.00 0.00 f 0.00 18241 87 137 0.00 0.00 0.00 0.00 f 0.00 16383 56 107 0.00 0.00 0.00 0.00 f 0.00 16384 57 107 0.00 0.00 0.00 0.00 f 0.00 18513 41 142 0.00 0.00 0.00 0.00 f 0.00 18514 42 142 0.00 0.00 0.00 0.00 f 0.00 18516 44 142 0.00 0.00 0.00 0.00 f 0.00 18587 55 143 0.00 0.00 0.00 0.00 f 0.00 18601 69 143 0.00 0.00 0.00 0.00 f 0.00 18602 70 143 0.00 0.00 0.00 0.00 f 0.00 18607 75 143 0.00 0.00 0.00 0.00 f 0.00 18608 76 143 0.00 0.00 0.00 0.00 f 0.00 18609 77 143 0.00 0.00 1697.67 1697.67 f 0.00 18610 78 143 0.00 0.00 582.46 582.46 f 0.00 18611 79 143 0.00 0.00 0.00 0.00 f 0.00 18612 80 143 0.00 0.00 0.00 0.00 f 0.00 18613 81 143 0.00 0.00 0.00 0.00 f 0.00 18614 82 143 0.00 0.00 0.00 0.00 f 0.00 18615 83 143 0.00 0.00 0.00 0.00 f 0.00 18616 84 143 0.00 0.00 0.00 0.00 f 0.00 18617 85 143 0.00 0.00 0.00 0.00 f 0.00 18618 86 143 0.00 0.00 0.00 0.00 f 0.00 18619 87 143 0.00 0.00 0.00 0.00 f 0.00 18620 88 143 0.00 0.00 0.00 0.00 f 0.00 18621 89 143 0.00 0.00 0.00 0.00 f 0.00 18639 41 144 0.00 0.00 0.00 0.00 f 0.00 18640 42 144 0.00 0.00 0.00 0.00 f 0.00 18031 66 134 0.00 0.00 0.00 0.00 f 0.00 18032 67 134 0.00 0.00 0.00 0.00 f 0.00 18033 68 134 0.00 0.00 0.00 0.00 f 0.00 18034 69 134 0.00 0.00 0.00 0.00 f 0.00 18035 70 134 0.00 0.00 0.00 0.00 f 0.00 17378 40 123 0.00 0.00 0.00 0.00 f 0.00 17379 41 123 0.00 0.00 0.00 0.00 f 0.00 16532 79 109 -3313146.65 -3340396.65 50000.00 77250.00 f 0.00 16533 80 109 -3340396.65 -3442755.07 15541.58 117900.00 f 0.00 17534 73 126 -45211.47 -42411.49 2799.98 0.00 f 0.00 17535 74 126 -42411.49 -8111.70 34299.79 0.00 f 0.00 17538 77 126 -8111.70 -6611.60 1500.10 0.00 f 0.00 17539 78 126 -6611.60 -4739.69 1871.91 0.00 f 0.00 17540 79 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17541 80 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17542 81 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17543 82 126 -4739.69 -4739.69 0.00 0.00 f 0.00 16354 90 106 -98999.99 -98999.99 0.00 0.00 f 0.00 16355 91 106 -98999.99 -287549.99 11383.06 199933.06 f 0.00 16356 92 106 -287549.99 -188520.04 163800.00 64770.05 f 0.00 18328 45 139 0.00 0.00 0.00 0.00 f 0.00 18329 49 139 0.00 0.00 0.00 0.00 f 0.00 18330 50 139 0.00 0.00 0.00 0.00 f 0.00 18331 51 139 0.00 0.00 0.00 0.00 f 0.00 14831 47 150 0.00 0.00 0.00 0.00 f 0.00 14792 48 130 0.00 0.00 0.00 0.00 f 0.00 17745 28 130 0.00 0.00 0.00 0.00 f 0.00 14960 82 84 2943883.17 2943883.17 0.00 0.00 f 0.00 16352 88 106 -349937.50 -445500.00 52937.50 148500.00 f 0.00 16353 89 106 -445500.00 -98999.99 583805.79 237305.78 f 0.00 17702 52 129 86.44 86.44 0.00 0.00 f 0.00 17703 53 129 86.44 86.44 0.00 0.00 f 0.00 17704 54 129 86.44 86.44 0.00 0.00 f 0.00 17867 91 131 -100.00 -100.00 0.00 0.00 f 0.00 15053 49 86 -0.01 -0.01 11613.99 11613.99 f 0.00 15557 49 94 526.61 1211.29 684.68 0.00 f 0.00 14990 49 85 -171807.46 -171926.22 16321.25 16440.01 f 0.00 18977 67 149 0.00 0.00 0.00 0.00 f 0.00 18978 68 149 0.00 0.00 0.00 0.00 f 0.00 18979 69 149 0.00 0.00 0.00 0.00 f 0.00 18161 70 136 0.00 0.00 0.00 0.00 f 0.00 18162 71 136 0.00 0.00 0.00 0.00 f 0.00 18163 72 136 0.00 0.00 0.00 0.00 f 0.00 15063 59 86 -73.48 -71.25 1686.50 1684.27 f 0.00 15567 59 94 2634.45 2748.62 114.17 0.00 f 0.00 18276 59 138 -25100.00 -24115.81 1502.99 518.80 f 0.00 14997 56 85 602.68 -19203.23 71606.01 91411.92 f 0.00 17258 49 121 559.46 910.33 350.87 0.00 f 0.00 18251 31 138 0.00 0.00 0.00 0.00 f 0.00 18252 32 138 0.00 0.00 0.00 0.00 f 0.00 17536 75 126 -8111.70 -8111.70 0.00 0.00 f 0.00 17537 76 126 -8111.70 -8111.70 0.00 0.00 f 0.00 18595 63 143 0.00 0.00 0.00 0.00 f 0.00 18596 64 143 0.00 0.00 0.00 0.00 f 0.00 17672 85 128 -3959.81 -3959.81 0.00 0.00 f 0.00 18725 67 145 0.00 0.00 0.00 0.00 f 0.00 18726 68 145 0.00 0.00 0.00 0.00 f 0.00 18727 69 145 0.00 0.00 0.00 0.00 f 0.00 15570 62 94 3059.70 4543.27 1483.57 0.00 f 0.00 17334 62 122 455.00 794.00 339.00 0.00 f 0.00 15129 62 87 2248.92 -29.18 15121.11 17399.21 f 0.00 17813 34 131 0.00 0.00 0.00 0.00 f 0.00 15003 62 85 -143067.91 -143865.49 20843.71 21641.29 f 0.00 18864 80 147 0.00 0.00 0.00 0.00 f 0.00 18865 81 147 0.00 0.00 0.00 0.00 f 0.00 18866 82 147 0.00 0.00 0.00 0.00 f 0.00 18867 83 147 0.00 0.00 0.00 0.00 f 0.00 17965 63 133 0.00 0.00 0.00 0.00 f 0.00 15066 62 86 -71.25 -91.00 47684.91 47704.66 f 0.00 18279 62 138 -21015.06 -31002.49 42834.71 52822.14 f 0.00 18990 80 149 0.00 0.00 0.00 0.00 f 0.00 18991 81 149 0.00 0.00 0.00 0.00 f 0.00 18992 82 149 0.00 0.00 0.00 0.00 f 0.00 18100 72 135 0.00 0.00 0.00 0.00 f 0.00 18101 73 135 0.00 0.00 0.00 0.00 f 0.00 18283 66 138 -30338.51 -29377.53 1165.18 204.20 f 0.00 19117 81 152 0.00 0.00 0.00 0.00 f 0.00 19118 82 152 0.00 0.00 0.00 0.00 f 0.00 19119 83 152 0.00 0.00 0.00 0.00 f 0.00 19120 84 152 0.00 0.00 0.00 0.00 f 0.00 19121 85 152 0.00 0.00 0.00 0.00 f 0.00 19122 86 152 0.00 0.00 0.00 0.00 f 0.00 14771 47 119 0.00 0.00 0.00 0.00 f 0.00 16487 31 109 -1020406.90 -1023441.40 0.00 3034.50 f 0.00 18187 30 137 0.00 0.00 0.00 0.00 f 0.00 19234 72 154 0.00 0.00 0.00 0.00 f 0.00 19235 73 154 0.00 0.00 0.00 0.00 f 0.00 19239 77 154 0.00 0.00 0.00 0.00 f 0.00 19240 78 154 0.00 0.00 0.00 0.00 f 0.00 15072 68 86 -91.00 0.00 550.47 459.47 f 0.00 15073 69 86 0.00 0.00 0.00 0.00 f 0.00 16424 31 108 -2626.81 -3872.99 0.00 1246.18 f 0.00 15542 31 94 0.00 45.98 45.98 0.00 f 0.00 16298 31 106 0.00 0.00 1034.50 1034.50 f 0.00 15668 31 96 0.00 0.00 246.18 246.18 f 0.00 15101 31 87 0.00 0.00 0.00 0.00 f 0.00 15158 91 87 45313.98 45336.48 22.50 0.00 f 0.00 15159 92 87 45336.48 45336.48 0.00 0.00 f 0.00 15290 31 90 22.00 22.00 0.00 0.00 f 0.00 15176 43 88 0.00 0.00 0.00 0.00 f 0.00 15177 44 88 0.00 0.00 0.00 0.00 f 0.00 15183 53 88 0.00 0.00 0.00 0.00 f 0.00 15184 54 88 0.00 0.00 0.00 0.00 f 0.00 15185 55 88 0.00 0.00 0.00 0.00 f 0.00 15186 56 88 0.00 0.00 0.00 0.00 f 0.00 15187 57 88 0.00 0.00 0.00 0.00 f 0.00 15197 67 88 0.00 0.00 0.00 0.00 f 0.00 15198 68 88 0.00 0.00 0.00 0.00 f 0.00 15219 89 88 0.00 0.00 0.00 0.00 f 0.00 15220 90 88 0.00 0.00 0.00 0.00 f 0.00 15221 91 88 0.00 0.00 0.00 0.00 f 0.00 15222 92 88 0.00 0.00 0.00 0.00 f 0.00 16046 31 102 551.04 598.54 47.50 0.00 f 0.00 15353 31 91 0.00 0.00 0.00 0.00 f 0.00 15416 31 92 0.00 0.00 0.00 0.00 f 0.00 15479 31 93 -5.00 -5.00 0.00 0.00 f 0.00 15082 78 86 0.00 869.99 30363.57 29493.58 f 0.00 15326 70 90 -1826.58 -1826.58 0.00 0.00 f 0.00 15327 71 90 -1826.58 0.00 1826.58 0.00 f 0.00 15328 72 90 0.00 0.00 0.00 0.00 f 0.00 15329 73 90 0.00 0.00 0.00 0.00 f 0.00 18295 78 138 -48623.70 -42748.53 22246.01 16370.84 f 0.00 15019 78 85 -279593.14 -278514.37 21635.00 20556.23 f 0.00 15480 32 93 -5.00 -5.00 0.00 0.00 f 0.00 15550 39 94 126.87 172.30 45.43 0.00 f 0.00 15605 31 95 0.00 0.00 0.00 0.00 f 0.00 18294 77 138 -57868.37 -48623.70 16174.87 6930.20 f 0.00 15081 77 86 0.00 0.00 20472.37 20472.37 f 0.00 15731 31 97 -1010.00 -1010.00 0.00 0.00 f 0.00 15696 62 96 -2000.00 -2000.00 12737.07 12737.07 f 0.00 15697 63 96 -2000.00 -2000.00 7703.40 7703.40 f 0.00 15794 31 98 0.00 0.00 0.00 0.00 f 0.00 18798 77 146 0.00 -744.34 82.10 826.44 f 0.00 15711 77 96 0.00 -12.82 16832.56 16845.38 f 0.00 15920 31 100 0.00 0.00 0.00 0.00 f 0.00 15216 86 88 0.00 0.00 0.00 0.00 f 0.00 15217 87 88 0.00 0.00 0.00 0.00 f 0.00 15218 88 88 0.00 0.00 0.00 0.00 f 0.00 15857 31 99 262.95 262.95 0.00 0.00 f 0.00 15889 66 99 -0.01 0.00 28270.00 28269.99 f 0.00 15890 67 99 0.00 50000.00 50000.00 0.00 f 0.00 15015 74 85 -164637.79 -269387.79 47817.80 152567.80 f 0.00 15018 77 85 -274137.79 -279593.14 61934.82 67390.17 f 0.00 18042 77 134 0.00 0.00 3214.16 3214.16 f 0.00 14847 28 83 0.00 0.00 0.00 0.00 f 0.00 14848 30 83 0.00 0.00 0.00 0.00 f 0.00 14849 31 83 0.00 0.00 0.00 0.00 f 0.00 14850 32 83 0.00 0.00 0.00 0.00 f 0.00 14851 33 83 0.00 0.00 0.00 0.00 f 0.00 14852 34 83 0.00 0.00 0.00 0.00 f 0.00 14853 35 83 0.00 0.00 0.00 0.00 f 0.00 14854 36 83 0.00 0.00 0.00 0.00 f 0.00 14855 37 83 0.00 0.00 0.00 0.00 f 0.00 14856 38 83 0.00 0.00 0.00 0.00 f 0.00 14857 39 83 0.00 0.00 0.00 0.00 f 0.00 14858 40 83 0.00 0.00 0.00 0.00 f 0.00 14859 41 83 0.00 0.00 0.00 0.00 f 0.00 14860 42 83 0.00 0.00 0.00 0.00 f 0.00 15375 56 91 4084.18 4148.00 63.82 0.00 f 0.00 15376 57 91 0.00 243.20 243.20 0.00 f 0.00 15415 30 92 0.00 0.00 0.00 0.00 f 0.00 15445 63 92 -80.95 -80.95 0.00 0.00 f 0.00 15446 64 92 -80.95 -80.95 0.00 0.00 f 0.00 15447 65 92 -80.95 -817.05 0.00 736.10 f 0.00 15448 66 92 -817.05 -817.05 0.00 0.00 f 0.00 19331 40 156 0.00 0.00 0.00 0.00 f 0.00 15449 67 92 -817.05 -817.05 0.00 0.00 f 0.00 15450 68 92 -817.05 -890.94 0.00 73.89 f 0.00 15451 69 92 0.00 0.00 0.00 0.00 f 0.00 15456 74 92 0.00 0.00 0.00 0.00 f 0.00 15457 75 92 0.00 0.00 0.00 0.00 f 0.00 15458 76 92 0.00 0.00 0.00 0.00 f 0.00 15459 77 92 0.00 -26.20 0.00 26.20 f 0.00 15460 78 92 -26.20 -26.20 0.00 0.00 f 0.00 16172 31 104 0.00 0.00 0.00 0.00 f 0.00 16192 54 104 0.00 0.00 0.00 0.00 f 0.00 16193 55 104 0.00 0.00 0.00 0.00 f 0.00 16194 56 104 0.00 0.00 0.00 0.00 f 0.00 16195 57 104 0.00 0.00 0.00 0.00 f 0.00 16196 58 104 0.00 0.00 0.00 0.00 f 0.00 16197 59 104 0.00 0.00 0.00 0.00 f 0.00 16198 60 104 0.00 0.00 0.00 0.00 f 0.00 16199 61 104 0.00 0.00 0.00 0.00 f 0.00 16784 79 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16785 80 113 1419999.99 1419999.99 0.00 0.00 f 0.00 16926 28 116 0.00 0.00 0.00 0.00 f 0.00 16949 55 116 5000.00 5000.00 0.00 0.00 f 0.00 16950 56 116 5000.00 5000.00 0.00 0.00 f 0.00 16951 57 116 5000.00 5000.00 0.00 0.00 f 0.00 16954 60 116 5000.00 5000.00 0.00 0.00 f 0.00 16955 61 116 5000.00 5000.00 0.00 0.00 f 0.00 16956 62 116 5000.00 5000.00 0.00 0.00 f 0.00 15414 28 92 0.00 -5.00 0.00 5.00 f 0.00 17472 74 125 0.00 0.00 0.00 0.00 f 0.00 17473 75 125 0.00 0.00 0.00 0.00 f 0.00 17474 76 125 0.00 0.00 0.00 0.00 f 0.00 17475 77 125 0.00 -500.00 0.00 500.00 f 0.00 17476 78 125 -500.00 -500.00 0.00 0.00 f 0.00 17478 80 125 -500.00 -500.00 0.00 0.00 f 0.00 16484 29 109 -16000.00 -18000.00 500.00 2500.00 f 0.00 16513 60 109 -2847293.22 -2923455.42 1087.80 77250.00 f 0.00 16514 61 109 -2923455.42 -3000705.42 0.00 77250.00 f 0.00 16515 62 109 -3000705.42 -3004627.69 14479.30 18401.57 f 0.00 16516 63 109 -3004627.69 -3051877.69 0.00 47250.00 f 0.00 16524 71 109 -3072229.35 -3149479.35 0.00 77250.00 f 0.00 16525 72 109 -3149479.35 -3180729.35 50000.00 81250.00 f 0.00 16526 73 109 -3180729.35 -3121729.35 150000.00 91000.00 f 0.00 16531 78 109 -3260998.69 -3313146.65 6372.00 58519.96 f 0.00 16534 81 109 -3442755.07 -3469906.69 50222.50 77374.12 f 0.00 16535 82 109 -3469906.69 -3497156.69 50000.00 77250.00 f 0.00 16536 83 109 -3497156.69 -3535648.12 23335.82 61827.25 f 0.00 16537 84 109 -3535648.12 -3540898.12 72000.00 77250.00 f 0.00 16538 85 109 -3540898.12 -3570898.12 50000.00 80000.00 f 0.00 16539 86 109 -3570898.12 -3522320.12 48578.00 0.00 f 0.00 16540 87 109 -3522320.12 -3670820.12 0.00 148500.00 f 0.00 16545 92 109 -3851012.24 -3950012.24 0.00 99000.00 f 0.00 14784 48 126 0.00 0.00 0.00 0.00 f 0.00 14916 35 84 23457.13 23457.13 0.00 0.00 f 0.00 16170 28 104 0.00 0.00 306.64 306.64 f 0.00 16364 34 107 0.00 0.00 0.00 0.00 f 0.00 16365 35 107 0.00 0.00 0.00 0.00 f 0.00 14917 36 84 23457.13 23457.13 0.00 0.00 f 0.00 14918 37 84 23457.13 23457.13 0.00 0.00 f 0.00 14919 38 84 23457.13 23457.13 0.00 0.00 f 0.00 14925 44 84 1202787.24 1202787.24 0.00 0.00 f 0.00 14926 45 84 1202787.24 1202787.24 0.00 0.00 f 0.00 14927 49 84 1202787.24 1202787.24 0.00 0.00 f 0.00 14928 50 84 1202787.24 1202787.24 0.00 0.00 f 0.00 14929 51 84 1202787.24 1202787.24 0.00 0.00 f 0.00 14930 52 84 1202787.24 1202787.24 0.00 0.00 f 0.00 14931 53 84 1202787.24 1202787.24 0.00 0.00 f 0.00 14932 54 84 1202787.24 1202787.24 0.00 0.00 f 0.00 17344 72 122 735.00 735.00 0.00 0.00 f 0.00 17345 73 122 735.00 735.00 0.00 0.00 f 0.00 17346 74 122 735.00 4485.00 3750.00 0.00 f 0.00 17347 75 122 4485.00 4485.00 0.00 0.00 f 0.00 17348 76 122 4485.00 23235.00 18750.00 0.00 f 0.00 17349 77 122 23235.00 41995.01 18760.01 0.00 f 0.00 14777 47 122 0.00 0.00 0.00 0.00 f 0.00 16550 31 110 0.00 0.00 0.00 0.00 f 0.00 16522 69 109 -3055297.69 -3044979.35 10419.40 101.06 f 0.00 16523 70 109 -3044979.35 -3072229.35 50000.00 77250.00 f 0.00 16340 76 106 0.00 0.00 115875.00 115875.00 f 0.00 16341 77 106 0.00 0.00 208740.93 208740.93 f 0.00 16342 78 106 0.00 0.00 100247.52 100247.52 f 0.00 16343 79 106 0.00 0.00 0.00 0.00 f 0.00 16344 80 106 0.00 0.00 117900.00 117900.00 f 0.00 15703 69 96 0.00 0.00 7728.52 7728.52 f 0.00 15704 70 96 0.00 0.00 0.00 0.00 f 0.00 15710 76 96 0.00 0.00 25634.00 25634.00 f 0.00 15712 78 96 -12.82 -12.82 21115.20 21115.20 f 0.00 14708 48 87 0.00 0.00 0.00 0.00 f 0.00 15102 32 87 0.00 0.00 0.00 0.00 f 0.00 15103 33 87 0.00 0.00 0.00 0.00 f 0.00 15104 34 87 0.00 0.00 0.00 0.00 f 0.00 15105 35 87 0.00 0.00 0.00 0.00 f 0.00 15106 36 87 0.00 11.07 11.07 0.00 f 0.00 15918 28 100 0.00 0.00 0.00 0.00 f 0.00 15947 61 100 0.00 0.00 0.00 0.00 f 0.00 15948 62 100 0.00 0.00 0.00 0.00 f 0.00 15949 63 100 0.00 0.00 0.00 0.00 f 0.00 15036 28 86 0.00 1.06 1798.81 1797.75 f 0.00 16422 28 108 -5000.00 -6333.41 0.00 1333.41 f 0.00 16739 31 113 1020000.00 1020000.00 0.00 0.00 f 0.00 15540 28 94 0.00 151.99 151.99 0.00 f 0.00 16676 31 112 0.00 0.00 0.00 0.00 f 0.00 16732 90 112 0.00 0.00 0.00 0.00 f 0.00 16733 91 112 0.00 0.00 0.00 0.00 f 0.00 16802 31 114 0.00 0.00 0.00 0.00 f 0.00 16065 53 102 1291.04 1338.54 47.50 0.00 f 0.00 16066 54 102 1338.54 1338.54 0.00 0.00 f 0.00 16067 55 102 1338.54 1338.54 0.00 0.00 f 0.00 16068 56 102 1338.54 1338.54 0.00 0.00 f 0.00 16069 57 102 1338.54 1338.54 0.00 0.00 f 0.00 16070 58 102 1338.54 1338.54 0.00 0.00 f 0.00 16071 59 102 1338.54 1446.91 108.37 0.00 f 0.00 16072 60 102 1446.91 1446.91 0.00 0.00 f 0.00 16073 61 102 1446.91 1446.91 0.00 0.00 f 0.00 16075 63 102 2321.18 4571.18 2250.00 0.00 f 0.00 16076 64 102 4571.18 4571.18 0.00 0.00 f 0.00 16077 65 102 4571.18 8600.73 4229.55 200.00 f 0.00 16078 66 102 8600.73 8796.60 195.87 0.00 f 0.00 16079 67 102 8796.60 8796.60 0.00 0.00 f 0.00 16080 68 102 8796.60 0.00 0.00 8796.60 f 0.00 16086 74 102 4.46 4.46 0.00 0.00 f 0.00 16087 75 102 4.46 4.46 0.00 0.00 f 0.00 16088 76 102 4.46 4629.46 4625.00 0.00 f 0.00 15038 31 86 0.00 0.00 332.78 332.78 f 0.00 15039 32 86 0.00 0.00 0.00 0.00 f 0.00 15040 33 86 0.00 0.00 0.00 0.00 f 0.00 15041 34 86 0.00 0.00 0.00 0.00 f 0.00 15042 35 86 0.00 0.00 0.00 0.00 f 0.00 15043 36 86 0.00 0.00 665.56 665.56 f 0.00 15044 37 86 0.00 0.00 0.00 0.00 f 0.00 15045 38 86 0.00 0.00 0.00 0.00 f 0.00 15046 39 86 0.00 0.00 702.78 702.78 f 0.00 15047 40 86 0.00 0.00 0.00 0.00 f 0.00 15048 41 86 0.00 0.00 702.78 702.78 f 0.00 15051 44 86 0.00 0.00 0.00 0.00 f 0.00 15052 45 86 0.00 -0.01 6381.80 6381.81 f 0.00 15059 55 86 -0.01 -0.01 0.00 0.00 f 0.00 15060 56 86 -0.01 -0.02 38792.18 38792.19 f 0.00 15061 57 86 -0.02 -71.25 19.77 91.00 f 0.00 15062 58 86 -71.25 -73.48 0.00 2.23 f 0.00 15064 60 86 -71.25 -71.25 6381.80 6381.80 f 0.00 15065 61 86 -71.25 -71.25 0.00 0.00 f 0.00 15067 63 86 -91.00 -91.00 0.00 0.00 f 0.00 15068 64 86 -91.00 -91.00 0.00 0.00 f 0.00 15069 65 86 -91.00 -91.00 0.00 0.00 f 0.00 17920 81 132 200.00 200.00 0.00 0.00 f 0.00 17921 82 132 200.00 200.00 0.00 0.00 f 0.00 17922 83 132 200.00 200.00 0.00 0.00 f 0.00 17923 84 132 200.00 200.00 0.00 0.00 f 0.00 17924 85 132 200.00 200.00 0.00 0.00 f 0.00 17925 86 132 200.00 200.00 0.00 0.00 f 0.00 17926 87 132 200.00 200.00 0.00 0.00 f 0.00 17927 88 132 200.00 200.00 0.00 0.00 f 0.00 17928 89 132 200.00 200.00 0.00 0.00 f 0.00 17929 90 132 200.00 200.00 0.00 0.00 f 0.00 17930 91 132 200.00 200.00 0.00 0.00 f 0.00 17931 92 132 200.00 200.00 0.00 0.00 f 0.00 17812 33 131 0.00 0.00 0.00 0.00 f 0.00 17823 44 131 0.00 0.00 0.00 0.00 f 0.00 17824 45 131 0.00 0.00 0.00 0.00 f 0.00 17825 49 131 0.00 0.00 0.00 0.00 f 0.00 17826 50 131 0.00 0.00 0.00 0.00 f 0.00 17827 51 131 0.00 -1200.00 0.00 1200.00 f 0.00 17828 52 131 -1200.00 -1300.00 0.00 100.00 f 0.00 17829 53 131 -1300.00 -1600.00 0.00 300.00 f 0.00 17830 54 131 -1600.00 -1600.00 0.00 0.00 f 0.00 17831 55 131 -1600.00 -1600.00 0.00 0.00 f 0.00 17832 56 131 -1600.00 -1600.00 0.00 0.00 f 0.00 17833 57 131 0.00 0.00 0.00 0.00 f 0.00 17834 58 131 0.00 0.00 0.00 0.00 f 0.00 17835 59 131 0.00 0.00 0.00 0.00 f 0.00 17836 60 131 0.00 0.00 0.00 0.00 f 0.00 17837 61 131 0.00 0.00 0.00 0.00 f 0.00 17838 62 131 0.00 0.00 0.00 0.00 f 0.00 17839 63 131 0.00 0.00 0.00 0.00 f 0.00 17840 64 131 0.00 0.00 0.00 0.00 f 0.00 17860 84 131 0.00 0.00 0.00 0.00 f 0.00 17861 85 131 0.00 0.00 0.00 0.00 f 0.00 17862 86 131 0.00 -100.00 1000.00 1100.00 f 0.00 17863 87 131 -100.00 -100.00 0.00 0.00 f 0.00 17864 88 131 -100.00 -100.00 0.00 0.00 f 0.00 17865 89 131 -100.00 -100.00 0.00 0.00 f 0.00 17866 90 131 -100.00 -100.00 0.00 0.00 f 0.00 17868 92 131 -100.00 -100.00 0.00 0.00 f 0.00 18061 30 135 0.00 0.00 0.00 0.00 f 0.00 15227 31 89 0.00 0.00 0.00 0.00 f 0.00 15228 32 89 0.00 0.00 0.00 0.00 f 0.00 16967 73 116 5000.00 5000.00 0.00 0.00 f 0.00 16968 74 116 5000.00 5000.00 0.00 0.00 f 0.00 16969 75 116 5000.00 5000.00 0.00 0.00 f 0.00 16970 76 116 5000.00 5000.00 0.00 0.00 f 0.00 16971 77 116 5000.00 40000.00 35000.00 0.00 f 0.00 16977 83 116 40000.00 40000.00 0.00 0.00 f 0.00 16978 84 116 40000.00 40000.00 0.00 0.00 f 0.00 16979 85 116 40000.00 40000.00 0.00 0.00 f 0.00 16980 86 116 40000.00 40000.00 0.00 0.00 f 0.00 16981 87 116 40000.00 40000.00 0.00 0.00 f 0.00 16982 88 116 40000.00 40000.00 0.00 0.00 f 0.00 17844 68 131 0.00 0.00 0.00 0.00 f 0.00 17845 69 131 0.00 -799.00 0.00 799.00 f 0.00 17846 70 131 -799.00 -799.00 0.00 0.00 f 0.00 17847 71 131 -799.00 -799.00 0.00 0.00 f 0.00 17848 72 131 -799.00 -799.00 0.00 0.00 f 0.00 17849 73 131 -799.00 -799.00 0.00 0.00 f 0.00 17850 74 131 -799.00 -799.00 0.00 0.00 f 0.00 17853 77 131 -799.00 -799.00 0.00 0.00 f 0.00 17854 78 131 -799.00 -799.00 0.00 0.00 f 0.00 17855 79 131 -799.00 -799.00 0.00 0.00 f 0.00 17856 80 131 -799.00 -799.00 0.00 0.00 f 0.00 17857 81 131 0.00 0.00 0.00 0.00 f 0.00 17858 82 131 0.00 0.00 0.00 0.00 f 0.00 17859 83 131 0.00 0.00 0.00 0.00 f 0.00 15226 30 89 0.00 0.00 0.00 0.00 f 0.00 17054 31 118 0.00 0.00 0.00 0.00 f 0.00 18062 31 135 0.00 0.00 0.00 0.00 f 0.00 18063 32 135 0.00 0.00 0.00 0.00 f 0.00 18107 79 135 0.00 0.00 0.00 0.00 f 0.00 18108 80 135 0.00 0.00 0.00 0.00 f 0.00 14801 47 135 0.00 0.00 0.00 0.00 f 0.00 15606 32 95 0.00 0.00 0.00 0.00 f 0.00 15607 33 95 0.00 0.00 0.00 0.00 f 0.00 15608 34 95 0.00 0.00 0.00 0.00 f 0.00 15609 35 95 0.00 0.00 0.00 0.00 f 0.00 15610 36 95 0.00 0.00 94.00 94.00 f 0.00 15654 83 95 -870.00 -870.00 22237.69 22237.69 f 0.00 15655 84 95 -870.00 -870.00 72000.00 72000.00 f 0.00 15658 87 95 -870.00 -54053.00 100817.00 154000.00 f 0.00 15659 88 95 -54053.00 -870.00 66000.00 12817.00 f 0.00 14744 48 105 0.00 0.00 0.00 0.00 f 0.00 16240 36 105 624.22 624.22 0.00 0.00 f 0.00 16241 37 105 624.22 624.22 0.00 0.00 f 0.00 16242 38 105 624.22 624.22 0.00 0.00 f 0.00 16243 39 105 624.22 624.22 0.00 0.00 f 0.00 16252 51 105 631.35 631.35 0.00 0.00 f 0.00 16253 52 105 631.35 631.35 0.00 0.00 f 0.00 16254 53 105 631.35 631.35 0.00 0.00 f 0.00 16255 54 105 631.35 631.35 0.00 0.00 f 0.00 16256 55 105 631.35 631.35 0.00 0.00 f 0.00 16257 56 105 631.35 631.35 0.00 0.00 f 0.00 17280 71 121 0.00 0.00 0.00 0.00 f 0.00 17281 72 121 0.00 0.00 0.00 0.00 f 0.00 17282 73 121 0.00 0.00 0.00 0.00 f 0.00 17283 74 121 0.00 0.00 0.00 0.00 f 0.00 17284 75 121 0.00 0.00 0.00 0.00 f 0.00 17287 78 121 0.00 0.00 0.00 0.00 f 0.00 17288 79 121 0.00 0.00 0.00 0.00 f 0.00 17289 80 121 0.00 0.00 0.00 0.00 f 0.00 17290 81 121 0.00 0.00 0.00 0.00 f 0.00 17291 82 121 0.00 0.00 0.00 0.00 f 0.00 17292 83 121 0.00 0.00 0.00 0.00 f 0.00 17293 84 121 0.00 0.00 0.00 0.00 f 0.00 17296 87 121 0.00 0.00 0.00 0.00 f 0.00 17297 88 121 0.00 0.00 0.00 0.00 f 0.00 17298 89 121 0.00 0.00 0.00 0.00 f 0.00 17299 90 121 0.00 0.00 0.00 0.00 f 0.00 17300 91 121 0.00 0.00 0.00 0.00 f 0.00 17301 92 121 0.00 0.00 0.00 0.00 f 0.00 14996 55 85 -44647.32 602.68 45250.00 0.00 f 0.00 14998 57 85 -19203.23 -73953.23 45250.00 100000.00 f 0.00 14999 58 85 -73953.23 -278703.23 45250.00 250000.00 f 0.00 15000 59 85 -278703.23 -233567.91 46624.65 1489.33 f 0.00 15001 60 85 -233567.91 -188317.91 51631.80 6381.80 f 0.00 15352 30 91 0.00 0.00 1312.26 1312.26 f 0.00 17309 34 122 0.00 0.00 0.00 0.00 f 0.00 17310 35 122 0.00 0.00 0.00 0.00 f 0.00 17243 31 121 0.00 0.00 0.00 0.00 f 0.00 17244 32 121 0.00 0.00 0.00 0.00 f 0.00 17263 54 121 910.33 910.33 0.00 0.00 f 0.00 17264 55 121 910.33 910.33 0.00 0.00 f 0.00 17265 56 121 910.33 910.33 0.00 0.00 f 0.00 17266 57 121 0.00 0.00 0.00 0.00 f 0.00 17267 58 121 0.00 0.00 0.00 0.00 f 0.00 17268 59 121 0.00 0.00 0.00 0.00 f 0.00 17269 60 121 0.00 0.00 0.00 0.00 f 0.00 17270 61 121 0.00 0.00 0.00 0.00 f 0.00 17271 62 121 0.00 0.00 0.00 0.00 f 0.00 17272 63 121 0.00 0.00 0.00 0.00 f 0.00 17277 68 121 0.00 0.00 0.00 0.00 f 0.00 17278 69 121 0.00 0.00 0.00 0.00 f 0.00 17279 70 121 0.00 0.00 0.00 0.00 f 0.00 18366 86 139 -325.00 -3925.00 0.00 3600.00 f 0.00 18367 87 139 -3925.00 -3925.00 0.00 0.00 f 0.00 18368 88 139 -3925.00 -3925.00 0.00 0.00 f 0.00 15545 34 94 45.98 45.98 0.00 0.00 f 0.00 17359 87 122 1758.75 6133.75 4375.00 0.00 f 0.00 17360 88 122 6133.75 6133.75 0.00 0.00 f 0.00 17361 89 122 6133.75 41133.75 35000.00 0.00 f 0.00 17362 90 122 41133.75 41133.75 0.00 0.00 f 0.00 15002 61 85 -188317.91 -143067.91 45250.00 0.00 f 0.00 15004 63 85 -143865.49 -144720.57 7703.40 8558.48 f 0.00 15005 64 85 -144720.57 -97757.85 55521.20 8558.48 f 0.00 15011 70 85 -100137.79 -104887.79 45250.00 50000.00 f 0.00 15012 71 85 -104887.79 -60887.79 44000.00 0.00 f 0.00 15014 73 85 -65637.79 -164637.79 51000.00 150000.00 f 0.00 15016 75 85 -269387.79 -274137.79 45250.00 50000.00 f 0.00 15017 76 85 -274137.79 -274137.79 25634.00 25634.00 f 0.00 15031 90 85 -311417.52 -270917.52 90500.00 50000.00 f 0.00 15032 91 85 -270917.52 -270917.52 55256.34 55256.34 f 0.00 15033 92 85 -270917.52 -270917.52 22000.00 22000.00 f 0.00 14703 47 85 0.00 -7000.00 3000.00 10000.00 f 0.00 14810 48 139 0.00 0.00 0.00 0.00 f 0.00 18318 35 139 0.00 0.00 0.00 0.00 f 0.00 18319 36 139 0.00 0.00 0.00 0.00 f 0.00 18320 37 139 0.00 0.00 0.00 0.00 f 0.00 18321 38 139 0.00 0.00 0.00 0.00 f 0.00 18322 39 139 0.00 0.00 0.00 0.00 f 0.00 18323 40 139 0.00 0.00 0.00 0.00 f 0.00 18324 41 139 0.00 0.00 0.00 0.00 f 0.00 18325 42 139 0.00 0.00 0.00 0.00 f 0.00 18326 43 139 0.00 0.00 0.00 0.00 f 0.00 18327 44 139 0.00 0.00 0.00 0.00 f 0.00 18365 85 139 -325.00 -325.00 0.00 0.00 f 0.00 15730 30 97 0.00 -1010.00 0.00 1010.00 f 0.00 17525 64 126 -22847.46 -22847.46 0.00 0.00 f 0.00 17526 65 126 -22847.46 -22847.46 0.00 0.00 f 0.00 17527 66 126 -22847.46 -45211.47 27635.99 50000.00 f 0.00 17528 67 126 -45211.47 -45211.47 0.00 0.00 f 0.00 17529 68 126 -45211.47 -45211.47 0.00 0.00 f 0.00 17530 69 126 -45211.47 -45211.47 0.00 0.00 f 0.00 17531 70 126 -45211.47 -45211.47 0.00 0.00 f 0.00 17532 71 126 -45211.47 -45211.47 0.00 0.00 f 0.00 17533 72 126 -45211.47 -45211.47 0.00 0.00 f 0.00 17544 83 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17545 84 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17549 88 126 -4739.69 -4739.69 0.00 0.00 f 0.00 17558 31 127 0.00 0.00 0.00 0.00 f 0.00 17684 31 129 0.00 0.00 0.00 0.00 f 0.00 17621 31 128 0.00 0.00 0.00 0.00 f 0.00 16160 85 103 290549.00 370549.00 80000.00 0.00 f 0.00 16161 86 103 370549.00 469549.00 99000.00 0.00 f 0.00 16162 87 103 469549.00 713799.00 244250.00 0.00 f 0.00 16163 88 103 713799.00 862299.00 148500.00 0.00 f 0.00 16164 89 103 862299.00 961299.00 99000.00 0.00 f 0.00 16165 90 103 961299.00 1115799.00 154500.00 0.00 f 0.00 16166 91 103 1115799.00 1249549.00 133750.00 0.00 f 0.00 16167 92 103 1249549.00 1299049.00 49500.00 0.00 f 0.00 18452 43 141 0.00 0.00 0.00 0.00 f 0.00 18453 44 141 0.00 0.00 0.00 0.00 f 0.00 18454 45 141 0.00 0.00 0.00 0.00 f 0.00 18455 49 141 0.00 0.00 0.00 0.00 f 0.00 18465 59 141 0.00 0.00 0.00 0.00 f 0.00 18475 69 141 0.00 31084.94 31084.94 0.00 f 0.00 18498 92 141 156038.87 156038.87 0.00 0.00 f 0.00 18501 28 142 0.00 0.00 0.00 0.00 f 0.00 18511 39 142 0.00 0.00 0.00 0.00 f 0.00 18512 40 142 0.00 0.00 0.00 0.00 f 0.00 18515 43 142 0.00 0.00 0.00 0.00 f 0.00 14818 48 143 0.00 0.00 0.00 0.00 f 0.00 18571 36 143 0.00 0.00 0.00 0.00 f 0.00 18572 37 143 0.00 0.00 0.00 0.00 f 0.00 14817 47 143 0.00 0.00 0.00 0.00 f 0.00 18628 30 144 0.00 0.00 0.00 0.00 f 0.00 18629 31 144 0.00 0.00 0.00 0.00 f 0.00 18630 32 144 0.00 0.00 0.00 0.00 f 0.00 18638 40 144 0.00 0.00 0.00 0.00 f 0.00 14819 47 144 0.00 0.00 0.00 0.00 f 0.00 18694 33 145 0.00 0.00 0.00 0.00 f 0.00 18706 45 145 0.00 0.00 0.00 0.00 f 0.00 18707 49 145 0.00 0.00 0.00 0.00 f 0.00 18708 50 145 0.00 0.00 0.00 0.00 f 0.00 18709 51 145 0.00 0.00 0.00 0.00 f 0.00 18710 52 145 0.00 0.00 0.00 0.00 f 0.00 18711 53 145 0.00 0.00 0.00 0.00 f 0.00 18712 54 145 0.00 0.00 0.00 0.00 f 0.00 18713 55 145 0.00 0.00 0.00 0.00 f 0.00 17701 51 129 86.44 86.44 0.00 0.00 f 0.00 17705 55 129 86.44 86.44 0.00 0.00 f 0.00 17810 31 131 0.00 0.00 0.00 0.00 f 0.00 18718 60 145 0.00 0.00 0.00 0.00 f 0.00 18721 63 145 0.00 0.00 0.00 0.00 f 0.00 18723 65 145 0.00 0.00 0.00 0.00 f 0.00 18724 66 145 0.00 0.00 0.00 0.00 f 0.00 18728 70 145 0.00 0.00 0.00 0.00 f 0.00 18729 71 145 0.00 0.00 0.00 0.00 f 0.00 18730 72 145 0.00 0.00 0.00 0.00 f 0.00 18731 73 145 0.00 0.00 0.00 0.00 f 0.00 18732 74 145 0.00 0.00 0.00 0.00 f 0.00 18733 75 145 0.00 0.00 0.00 0.00 f 0.00 18734 76 145 0.00 0.00 0.00 0.00 f 0.00 18735 77 145 0.00 0.01 11.47 11.46 f 0.00 18736 78 145 0.01 0.01 0.00 0.00 f 0.00 18737 79 145 0.01 0.01 0.00 0.00 f 0.00 18738 80 145 0.01 0.01 0.00 0.00 f 0.00 18741 83 145 0.00 0.00 0.00 0.00 f 0.00 18742 84 145 0.00 0.00 0.00 0.00 f 0.00 18743 85 145 0.00 0.00 0.00 0.00 f 0.00 18744 86 145 0.00 0.00 0.00 0.00 f 0.00 18745 87 145 0.00 0.00 0.00 0.00 f 0.00 18746 88 145 0.00 0.00 0.00 0.00 f 0.00 18749 91 145 0.00 0.00 0.00 0.00 f 0.00 18759 35 146 0.00 0.00 0.00 0.00 f 0.00 18760 36 146 0.00 0.00 0.00 0.00 f 0.00 15982 30 101 0.00 2.90 2.90 0.00 f 0.00 17873 31 132 0.00 0.00 0.00 0.00 f 0.00 17876 34 132 0.00 0.00 0.00 0.00 f 0.00 18875 91 147 0.00 0.00 0.00 0.00 f 0.00 18876 92 147 0.00 0.00 0.00 0.00 f 0.00 18878 29 148 0.00 0.00 0.00 0.00 f 0.00 18880 30 148 0.00 0.00 0.00 0.00 f 0.00 18885 35 148 0.00 0.00 0.00 0.00 f 0.00 18886 36 148 0.00 0.00 0.00 0.00 f 0.00 18887 37 148 0.00 0.00 0.00 0.00 f 0.00 18888 38 148 0.00 0.00 0.00 0.00 f 0.00 18889 39 148 0.00 0.00 0.00 0.00 f 0.00 18890 40 148 0.00 0.00 0.00 0.00 f 0.00 18891 41 148 0.00 0.00 0.00 0.00 f 0.00 18892 42 148 0.00 0.00 0.00 0.00 f 0.00 16171 30 104 0.00 0.00 3931.16 3931.16 f 0.00 18066 35 135 0.00 0.00 0.00 0.00 f 0.00 17778 65 130 0.00 0.00 0.00 0.00 f 0.00 17779 66 130 0.00 0.00 0.00 0.00 f 0.00 14791 47 130 0.00 0.00 0.00 0.00 f 0.00 14800 48 134 0.00 0.00 0.00 0.00 f 0.00 17997 28 134 0.00 0.00 0.00 0.00 f 0.00 17999 31 134 0.00 0.00 0.00 0.00 f 0.00 18000 32 134 0.00 0.00 0.00 0.00 f 0.00 18016 51 134 0.00 0.00 0.00 0.00 f 0.00 18017 52 134 0.00 0.00 128.50 128.50 f 0.00 18018 53 134 0.00 0.00 514.00 514.00 f 0.00 18019 54 134 0.00 0.00 0.00 0.00 f 0.00 18020 55 134 0.00 0.00 0.00 0.00 f 0.00 18021 56 134 0.00 0.00 128.50 128.50 f 0.00 18024 59 134 0.00 0.00 0.00 0.00 f 0.00 18025 60 134 0.00 0.00 0.00 0.00 f 0.00 18026 61 134 0.00 0.00 0.00 0.00 f 0.00 18027 62 134 0.00 0.00 0.00 0.00 f 0.00 18028 63 134 0.00 0.00 0.00 0.00 f 0.00 14799 47 134 0.00 0.00 0.00 0.00 f 0.00 19068 28 152 0.00 0.00 0.00 0.00 f 0.00 19113 77 152 0.00 0.00 0.00 0.00 f 0.00 19114 78 152 0.00 0.00 0.00 0.00 f 0.00 14833 47 152 0.00 0.00 0.00 0.00 f 0.00 19129 46 153 0.00 0.00 0.00 0.00 f 0.00 19160 61 153 0.00 0.00 0.00 0.00 f 0.00 19161 62 153 0.00 0.00 0.00 0.00 f 0.00 19162 63 153 0.00 0.00 0.00 0.00 f 0.00 19163 64 153 0.00 0.00 0.00 0.00 f 0.00 19164 65 153 0.00 0.00 0.00 0.00 f 0.00 19165 66 153 0.00 0.00 0.00 0.00 f 0.00 19166 67 153 0.00 0.00 0.00 0.00 f 0.00 19167 68 153 0.00 0.00 0.00 0.00 f 0.00 16363 33 107 0.00 0.00 0.00 0.00 f 0.00 18188 31 137 0.00 0.00 0.00 0.00 f 0.00 19322 31 156 0.00 0.00 0.00 0.00 f 0.00 19324 33 156 0.00 0.00 0.00 0.00 f 0.00 19325 34 156 0.00 0.00 0.00 0.00 f 0.00 19326 35 156 0.00 0.00 0.00 0.00 f 0.00 19328 37 156 0.00 0.00 0.00 0.00 f 0.00 19329 38 156 0.00 0.00 0.00 0.00 f 0.00 19330 39 156 0.00 0.00 0.00 0.00 f 0.00 19332 41 156 0.00 0.00 0.00 0.00 f 0.00 19333 42 156 0.00 0.00 0.00 0.00 f 0.00 19334 43 156 0.00 0.00 0.00 0.00 f 0.00 19335 44 156 0.00 0.00 0.00 0.00 f 0.00 19336 45 156 0.00 0.00 0.00 0.00 f 0.00 19337 49 156 0.00 0.00 0.00 0.00 f 0.00 19338 50 156 0.00 0.00 0.00 0.00 f 0.00 18270 53 138 -100.00 -100.00 0.00 0.00 f 0.00 18271 54 138 -100.00 -100.00 0.00 0.00 f 0.00 18272 55 138 -100.00 -100.00 0.00 0.00 f 0.00 18273 56 138 -100.00 -100.00 0.00 0.00 f 0.00 18274 57 138 -100.00 -100.00 0.00 0.00 f 0.00 18275 58 138 -100.00 -25100.00 0.00 25000.00 f 0.00 18314 31 139 0.00 0.00 0.00 0.00 f 0.00 18377 31 140 0.00 0.00 0.00 0.00 f 0.00 19422 71 157 0.00 0.00 0.00 0.00 f 0.00 19423 72 157 0.00 0.00 0.00 0.00 f 0.00 19424 73 157 0.00 0.00 0.00 0.00 f 0.00 19425 74 157 0.00 0.00 0.00 0.00 f 0.00 19426 75 157 0.00 0.00 0.00 0.00 f 0.00 19427 76 157 0.00 0.00 0.00 0.00 f 0.00 19428 77 157 0.00 0.00 0.00 0.00 f 0.00 19429 78 157 0.00 0.00 0.00 0.00 f 0.00 19430 79 157 0.00 0.00 0.00 0.00 f 0.00 19431 80 157 0.00 0.00 0.00 0.00 f 0.00 19432 81 157 0.00 0.00 0.00 0.00 f 0.00 19433 82 157 0.00 0.00 0.00 0.00 f 0.00 19434 83 157 0.00 -1211.15 0.00 1211.15 f 0.00 19435 84 157 -1211.15 -2245.15 0.00 1034.00 f 0.00 19436 85 157 -2245.15 -2245.15 0.00 0.00 f 0.00 19437 86 157 -2245.15 -2245.15 0.00 0.00 f 0.00 19438 87 157 -2245.15 -2245.15 0.00 0.00 f 0.00 19439 88 157 -2245.15 -2245.15 0.00 0.00 f 0.00 19440 89 157 -2245.15 -5011.27 0.00 2766.12 f 0.00 19441 90 157 -5011.27 -5011.27 0.00 0.00 f 0.00 19442 91 157 -5011.27 -5238.92 0.00 227.65 f 0.00 19443 92 157 -5238.92 -5238.92 0.00 0.00 f 0.00 14843 47 157 0.00 0.00 0.00 0.00 f 0.00 14780 48 123 0.00 0.00 0.00 0.00 f 0.00 17367 28 123 0.00 0.00 0.00 0.00 f 0.00 17374 36 123 0.00 0.00 0.00 0.00 f 0.00 17375 37 123 0.00 0.00 0.00 0.00 f 0.00 17376 38 123 0.00 0.00 0.00 0.00 f 0.00 17377 39 123 0.00 0.00 0.00 0.00 f 0.00 16360 30 107 0.00 0.00 0.00 0.00 f 0.00 16413 86 107 0.00 0.00 0.00 0.00 f 0.00 16414 87 107 0.00 0.00 0.00 0.00 f 0.00 18264 44 138 -100.00 -100.00 0.00 0.00 f 0.00 18266 49 138 -100.00 -100.00 0.00 0.00 f 0.00 18267 50 138 -100.00 -100.00 0.00 0.00 f 0.00 18268 51 138 -100.00 -100.00 0.00 0.00 f 0.00 18269 52 138 -100.00 -100.00 0.00 0.00 f 0.00 16548 28 110 0.00 0.00 0.00 0.00 f 0.00 16549 30 110 0.00 0.00 0.00 0.00 f 0.00 18391 45 140 0.00 0.00 0.00 0.00 f 0.00 18392 49 140 0.00 0.00 0.00 0.00 f 0.00 18393 50 140 0.00 0.00 0.00 0.00 f 0.00 18440 31 141 0.00 0.00 0.00 0.00 f 0.00 18503 31 142 0.00 0.00 0.00 0.00 f 0.00 17423 88 123 0.00 0.00 198000.00 198000.00 f 0.00 17424 89 123 0.00 0.00 0.00 0.00 f 0.00 17425 90 123 0.00 0.00 0.00 0.00 f 0.00 17426 91 123 0.00 0.00 20227.65 20227.65 f 0.00 17427 92 123 0.00 0.00 0.00 0.00 f 0.00 14779 47 123 0.00 0.00 0.00 0.00 f 0.00 19192 46 154 0.00 0.00 0.00 0.00 f 0.00 19193 29 154 0.00 0.00 0.00 0.00 f 0.00 19194 28 154 0.00 0.00 0.00 0.00 f 0.00 19204 39 154 0.00 0.00 0.00 0.00 f 0.00 19205 40 154 0.00 0.00 0.00 0.00 f 0.00 19206 41 154 0.00 0.00 0.00 0.00 f 0.00 19207 42 154 0.00 0.00 0.00 0.00 f 0.00 19208 43 154 0.00 0.00 0.00 0.00 f 0.00 19209 44 154 0.00 0.00 0.00 0.00 f 0.00 19210 45 154 0.00 0.00 0.00 0.00 f 0.00 19251 89 154 0.00 0.00 0.00 0.00 f 0.00 19252 90 154 0.00 0.00 0.00 0.00 f 0.00 19253 91 154 0.00 0.00 0.00 0.00 f 0.00 19254 92 154 0.00 0.00 0.00 0.00 f 0.00 14837 47 154 0.00 0.00 0.00 0.00 f 0.00 15526 81 93 0.00 0.00 0.00 0.00 f 0.00 15535 90 93 0.00 0.00 0.00 0.00 f 0.00 15536 91 93 0.00 0.00 0.00 0.00 f 0.00 15908 85 99 0.00 0.00 50000.00 50000.00 f 0.00 15909 86 99 0.00 17230.00 65830.00 48600.00 f 0.00 15653 82 95 -870.00 -870.00 50000.00 50000.00 f 0.00 15660 89 95 -870.00 43130.00 61688.00 17688.00 f 0.00 15661 90 95 43130.00 43130.00 50000.00 50000.00 f 0.00 15662 91 95 43130.00 -870.00 55020.00 99020.00 f 0.00 15663 92 95 -870.00 -870.00 22000.00 22000.00 f 0.00 18566 31 143 0.00 0.00 0.00 0.00 f 0.00 16285 84 105 631.35 631.35 0.00 0.00 f 0.00 16286 85 105 631.35 631.35 0.00 0.00 f 0.00 16287 86 105 631.35 631.35 0.00 0.00 f 0.00 18298 81 138 -38396.40 -38396.40 0.00 0.00 f 0.00 18676 81 144 0.00 0.00 0.00 0.00 f 0.00 18692 31 145 0.00 0.00 0.00 0.00 f 0.00 18739 81 145 0.00 0.00 0.00 0.00 f 0.00 18755 31 146 0.00 0.00 0.00 0.00 f 0.00 18802 81 146 -795.61 -790.49 117.18 112.06 f 0.00 16219 81 104 0.00 0.00 0.00 0.00 f 0.00 16220 82 104 0.00 0.00 0.00 0.00 f 0.00 16221 83 104 0.00 0.00 0.00 0.00 f 0.00 16222 84 104 0.00 0.00 0.00 0.00 f 0.00 16223 85 104 0.00 0.00 0.00 0.00 f 0.00 16226 88 104 0.00 0.00 0.00 0.00 f 0.00 16227 89 104 0.00 0.00 0.00 0.00 f 0.00 16228 90 104 0.00 0.00 0.00 0.00 f 0.00 16229 91 104 0.00 0.00 0.00 0.00 f 0.00 16230 92 104 0.00 0.00 0.00 0.00 f 0.00 16928 31 116 5000.00 5000.00 0.00 0.00 f 0.00 16930 33 116 5000.00 5000.00 0.00 0.00 f 0.00 16033 84 101 8.32 8.32 0.00 0.00 f 0.00 16345 81 106 0.00 -2025.00 0.00 2025.00 f 0.00 16348 84 106 0.00 0.00 51700.03 51700.03 f 0.00 16349 85 106 0.00 0.00 0.00 0.00 f 0.00 16350 86 106 0.00 -99000.00 0.00 99000.00 f 0.00 15904 81 99 0.00 0.00 50125.00 50125.00 f 0.00 15905 82 99 0.00 0.00 50000.00 50000.00 f 0.00 15910 87 99 17230.00 171230.00 154000.00 0.00 f 0.00 15911 88 99 171230.00 171230.00 15600.00 15600.00 f 0.00 15912 89 99 171230.00 0.00 18281.00 189511.00 f 0.00 15913 90 99 0.00 0.00 50000.00 50000.00 f 0.00 15914 91 99 0.00 0.00 99544.20 99544.20 f 0.00 15915 92 99 0.00 22956.05 22956.05 0.00 f 0.00 18109 81 135 0.00 0.00 0.00 0.00 f 0.00 18677 82 144 0.00 0.00 0.00 0.00 f 0.00 18678 83 144 0.00 0.00 0.00 0.00 f 0.00 18679 84 144 0.00 0.00 0.00 0.00 f 0.00 18680 85 144 0.00 0.00 0.00 0.00 f 0.00 18681 86 144 0.00 0.00 0.00 0.00 f 0.00 18682 87 144 0.00 0.00 0.00 0.00 f 0.00 18683 88 144 0.00 0.00 0.00 0.00 f 0.00 18684 89 144 0.00 0.00 0.00 0.00 f 0.00 18685 90 144 0.00 0.00 0.00 0.00 f 0.00 18686 91 144 0.00 0.00 0.00 0.00 f 0.00 18740 82 145 0.00 0.00 0.00 0.00 f 0.00 18750 92 145 0.00 0.00 0.00 0.00 f 0.00 18803 82 146 -790.49 -790.49 0.00 0.00 f 0.00 18804 83 146 -790.49 -790.49 0.00 0.00 f 0.00 16410 83 107 0.00 0.00 0.00 0.00 f 0.00 16411 84 107 0.00 0.00 0.00 0.00 f 0.00 16412 85 107 0.00 0.00 0.00 0.00 f 0.00 16415 88 107 0.00 0.00 0.00 0.00 f 0.00 16416 89 107 0.00 0.00 0.00 0.00 f 0.00 16417 90 107 0.00 0.00 0.00 0.00 f 0.00 16418 91 107 0.00 0.00 0.00 0.00 f 0.00 16419 92 107 0.00 0.00 0.00 0.00 f 0.00 16667 88 111 -145999.79 -145999.79 0.00 0.00 f 0.00 16346 82 106 -2025.00 -2025.00 0.00 0.00 f 0.00 16347 83 106 -2025.00 0.00 63047.70 61022.70 f 0.00 16351 87 106 -99000.00 -349937.50 0.00 250937.50 f 0.00 18110 82 135 0.00 0.00 0.00 0.00 f 0.00 18111 83 135 0.00 0.00 0.00 0.00 f 0.00 18112 84 135 0.00 0.00 0.00 0.00 f 0.00 18113 85 135 0.00 0.00 0.00 0.00 f 0.00 18114 86 135 0.00 0.00 0.00 0.00 f 0.00 18115 87 135 0.00 0.00 0.00 0.00 f 0.00 18116 88 135 0.00 0.00 0.00 0.00 f 0.00 18117 89 135 0.00 0.00 0.00 0.00 f 0.00 18118 90 135 0.00 0.00 0.00 0.00 f 0.00 18119 91 135 0.00 0.00 0.00 0.00 f 0.00 18120 92 135 0.00 0.00 0.00 0.00 f 0.00 18242 88 137 0.00 0.00 0.00 0.00 f 0.00 18299 82 138 -38396.40 -38396.40 0.00 0.00 f 0.00 18944 31 149 0.00 0.00 0.00 0.00 f 0.00 18952 39 149 0.00 0.00 0.00 0.00 f 0.00 19007 31 150 0.00 0.00 0.00 0.00 f 0.00 19370 82 156 15000.00 15000.00 0.00 0.00 f 0.00 19371 83 156 15000.00 15000.00 0.00 0.00 f 0.00 14898 83 83 0.00 0.00 0.00 0.00 f 0.00 14899 84 83 0.00 0.00 0.00 0.00 f 0.00 14900 85 83 0.00 0.00 0.00 0.00 f 0.00 14901 86 83 0.00 0.00 0.00 0.00 f 0.00 14902 87 83 0.00 0.00 0.00 0.00 f 0.00 15478 30 93 0.00 -5.00 0.00 5.00 f 0.00 15532 87 93 0.00 0.00 0.00 0.00 f 0.00 17139 56 119 -1000.00 -1000.00 0.00 0.00 f 0.00 17140 57 119 0.00 0.00 0.00 0.00 f 0.00 17141 58 119 0.00 0.00 0.00 0.00 f 0.00 17142 59 119 0.00 0.00 0.00 0.00 f 0.00 17143 60 119 0.00 0.00 0.00 0.00 f 0.00 17144 61 119 0.00 0.00 0.00 0.00 f 0.00 17145 62 119 0.00 0.00 0.00 0.00 f 0.00 17146 63 119 0.00 0.00 0.00 0.00 f 0.00 17149 66 119 0.00 0.00 0.00 0.00 f 0.00 17150 67 119 0.00 0.00 0.00 0.00 f 0.00 17151 68 119 0.00 0.00 0.00 0.00 f 0.00 17152 69 119 0.00 0.00 0.00 0.00 f 0.00 15568 60 94 2748.62 3059.70 311.08 0.00 f 0.00 15569 61 94 3059.70 3059.70 0.00 0.00 f 0.00 15571 63 94 4543.27 4543.27 0.00 0.00 f 0.00 15210 80 88 0.00 0.00 0.00 0.00 f 0.00 15211 81 88 0.00 0.00 0.00 0.00 f 0.00 15212 82 88 0.00 0.00 0.00 0.00 f 0.00 15214 84 88 0.00 0.00 0.00 0.00 f 0.00 15863 37 99 262.95 262.95 0.00 0.00 f 0.00 15906 83 99 0.00 0.00 23341.64 23341.64 f 0.00 15250 57 89 0.00 0.00 0.00 0.00 f 0.00 15251 58 89 0.00 0.00 0.00 0.00 f 0.00 15252 59 89 0.00 0.00 0.00 0.00 f 0.00 17557 30 127 0.00 0.00 0.00 0.00 f 0.00 15293 34 90 22.00 22.00 0.00 0.00 f 0.00 15321 65 90 -14419.48 -65283.16 0.00 50863.68 f 0.00 15322 66 90 -65283.16 -84379.76 0.00 19096.60 f 0.00 15323 67 90 -84379.76 -84379.76 0.00 0.00 f 0.00 15324 68 90 -84379.76 0.00 92893.76 8514.00 f 0.00 15325 69 90 0.00 -1826.58 0.00 1826.58 f 0.00 15330 74 90 0.00 0.00 0.00 0.00 f 0.00 15331 75 90 0.00 0.00 0.00 0.00 f 0.00 15332 76 90 0.00 0.00 0.00 0.00 f 0.00 15333 77 90 0.00 -1134.60 0.00 1134.60 f 0.00 15345 89 90 -3979.69 -3979.69 0.00 0.00 f 0.00 15346 90 90 -3979.69 -3979.69 0.00 0.00 f 0.00 15347 91 90 -3979.69 -3989.69 0.00 10.00 f 0.00 15199 69 88 0.00 0.00 0.00 0.00 f 0.00 15200 70 88 0.00 0.00 0.00 0.00 f 0.00 15201 71 88 0.00 0.00 0.00 0.00 f 0.00 15202 72 88 0.00 0.00 0.00 0.00 f 0.00 15203 73 88 0.00 0.00 0.00 0.00 f 0.00 15204 74 88 0.00 0.00 0.00 0.00 f 0.00 15205 75 88 0.00 0.00 0.00 0.00 f 0.00 15206 76 88 0.00 0.00 0.00 0.00 f 0.00 15207 77 88 0.00 0.00 0.00 0.00 f 0.00 15208 78 88 0.00 0.00 0.00 0.00 f 0.00 15209 79 88 0.00 0.00 0.00 0.00 f 0.00 15358 36 91 0.00 0.00 0.00 0.00 f 0.00 15359 37 91 0.00 94.00 94.00 0.00 f 0.00 15360 38 91 94.00 94.00 0.00 0.00 f 0.00 15362 40 91 -169.83 -169.83 0.00 0.00 f 0.00 15363 41 91 -169.83 521.55 691.38 0.00 f 0.00 15379 60 91 243.20 243.20 0.00 0.00 f 0.00 15380 61 91 243.20 243.20 0.00 0.00 f 0.00 15381 62 91 243.20 603.54 360.34 0.00 f 0.00 15382 63 91 603.54 603.54 0.00 0.00 f 0.00 15348 92 90 -3989.69 -3989.69 0.00 0.00 f 0.00 16059 44 102 598.54 598.54 0.00 0.00 f 0.00 16060 45 102 598.54 598.54 0.00 0.00 f 0.00 16061 49 102 598.54 598.54 0.00 0.00 f 0.00 16062 50 102 598.54 598.54 0.00 0.00 f 0.00 15537 92 93 0.00 0.00 0.00 0.00 f 0.00 17935 30 133 0.00 0.00 0.00 0.00 f 0.00 17936 31 133 0.00 0.00 0.00 0.00 f 0.00 15551 40 94 172.30 172.30 0.00 0.00 f 0.00 15552 41 94 172.30 194.77 22.47 0.00 f 0.00 15553 42 94 194.77 194.77 0.00 0.00 f 0.00 15554 43 94 194.77 252.41 57.64 0.00 f 0.00 15555 44 94 252.41 252.41 0.00 0.00 f 0.00 15556 45 94 252.41 526.61 274.20 0.00 f 0.00 15558 50 94 1211.29 1211.29 0.00 0.00 f 0.00 15559 51 94 1211.29 1211.29 0.00 0.00 f 0.00 15560 52 94 1211.29 1256.83 45.54 0.00 f 0.00 15561 53 94 1256.83 1303.21 46.38 0.00 f 0.00 15562 54 94 1303.21 1303.21 0.00 0.00 f 0.00 15611 37 95 0.00 0.00 0.00 0.00 f 0.00 15612 38 95 0.00 0.00 0.00 0.00 f 0.00 17669 82 128 -3947.25 -3947.25 0.00 0.00 f 0.00 14808 48 138 0.00 0.00 0.00 0.00 f 0.00 18265 45 138 -100.00 -100.00 0.00 0.00 f 0.00 15675 38 96 0.00 0.00 0.00 0.00 f 0.00 15676 39 96 0.00 0.00 638.18 638.18 f 0.00 15677 40 96 0.00 0.00 0.00 0.00 f 0.00 15678 41 96 0.00 0.00 1276.36 1276.36 f 0.00 18123 28 136 0.00 0.00 0.00 0.00 f 0.00 18124 30 136 0.00 0.00 0.00 0.00 f 0.00 15875 52 99 1563.55 263.55 25.00 1325.00 f 0.00 15876 53 99 263.55 263.55 375.00 375.00 f 0.00 15877 54 99 263.55 263.55 0.00 0.00 f 0.00 15878 55 99 263.55 263.55 0.00 0.00 f 0.00 16019 70 101 159.60 159.60 0.00 0.00 f 0.00 18249 28 138 0.00 0.00 0.00 0.00 f 0.00 16177 36 104 0.00 0.00 0.00 0.00 f 0.00 18375 28 140 0.00 0.00 0.00 0.00 f 0.00 18376 30 140 0.00 0.00 0.00 0.00 f 0.00 19407 56 157 0.00 0.00 0.00 0.00 f 0.00 19408 57 157 0.00 0.00 0.00 0.00 f 0.00 19409 58 157 0.00 0.00 0.00 0.00 f 0.00 19410 59 157 0.00 0.00 0.00 0.00 f 0.00 19411 60 157 0.00 0.00 0.00 0.00 f 0.00 19412 61 157 0.00 0.00 0.00 0.00 f 0.00 19413 62 157 0.00 0.00 0.00 0.00 f 0.00 19414 63 157 0.00 0.00 0.00 0.00 f 0.00 19415 64 157 0.00 0.00 0.00 0.00 f 0.00 19416 65 157 0.00 0.00 0.00 0.00 f 0.00 19417 66 157 0.00 0.00 0.00 0.00 f 0.00 19418 67 157 0.00 0.00 0.00 0.00 f 0.00 19419 68 157 0.00 0.00 0.00 0.00 f 0.00 19420 69 157 0.00 0.00 0.00 0.00 f 0.00 19421 70 157 0.00 0.00 0.00 0.00 f 0.00 17369 31 123 0.00 0.00 0.00 0.00 f 0.00 17380 42 123 0.00 0.00 0.00 0.00 f 0.00 17381 43 123 0.00 0.00 1236.56 1236.56 f 0.00 17382 44 123 0.00 0.00 0.00 0.00 f 0.00 17383 45 123 0.00 0.00 0.00 0.00 f 0.00 17384 49 123 0.00 0.00 0.00 0.00 f 0.00 17385 50 123 0.00 0.00 0.00 0.00 f 0.00 17386 51 123 0.00 0.00 0.00 0.00 f 0.00 17387 52 123 0.00 0.00 500.00 500.00 f 0.00 17388 53 123 0.00 0.00 1500.00 1500.00 f 0.00 17389 54 123 0.00 0.00 0.00 0.00 f 0.00 17390 55 123 0.00 0.00 0.00 0.00 f 0.00 17391 56 123 0.00 0.00 0.00 0.00 f 0.00 17403 68 123 -253.35 -253.35 0.00 0.00 f 0.00 17404 69 123 0.00 0.00 0.00 0.00 f 0.00 17414 79 123 -119.00 -119.00 0.00 0.00 f 0.00 17415 80 123 -119.00 -119.00 0.00 0.00 f 0.00 17416 81 123 0.00 0.00 0.00 0.00 f 0.00 17417 82 123 0.00 0.00 0.00 0.00 f 0.00 17418 83 123 0.00 0.00 0.00 0.00 f 0.00 17419 84 123 0.00 0.00 0.00 0.00 f 0.00 17420 85 123 0.00 0.00 0.00 0.00 f 0.00 17421 86 123 0.00 0.00 0.00 0.00 f 0.00 17422 87 123 0.00 0.00 148500.00 148500.00 f 0.00 19196 31 154 0.00 0.00 0.00 0.00 f 0.00 19214 52 154 0.00 0.00 0.00 0.00 f 0.00 19215 53 154 0.00 0.00 0.00 0.00 f 0.00 19216 54 154 0.00 0.00 0.00 0.00 f 0.00 19217 55 154 0.00 0.00 0.00 0.00 f 0.00 19218 56 154 0.00 0.00 0.00 0.00 f 0.00 19219 57 154 0.00 0.00 0.00 0.00 f 0.00 19220 58 154 0.00 0.00 0.00 0.00 f 0.00 19221 59 154 0.00 0.00 0.00 0.00 f 0.00 19222 60 154 0.00 0.00 0.00 0.00 f 0.00 19223 61 154 0.00 0.00 0.00 0.00 f 0.00 19224 62 154 0.00 0.00 0.00 0.00 f 0.00 19225 63 154 0.00 0.00 0.00 0.00 f 0.00 15525 80 93 -10.39 -35.39 0.00 25.00 f 0.00 15533 88 93 0.00 0.00 0.00 0.00 f 0.00 15534 89 93 0.00 0.00 0.00 0.00 f 0.00 16176 35 104 0.00 0.00 0.00 0.00 f 0.00 16181 40 104 0.00 0.00 0.00 0.00 f 0.00 16182 41 104 0.00 0.00 0.00 0.00 f 0.00 16189 51 104 0.00 0.00 0.00 0.00 f 0.00 15573 65 94 4543.27 4543.27 0.00 0.00 f 0.00 15574 66 94 4543.27 4603.11 59.84 0.00 f 0.00 15575 67 94 4603.11 4603.11 0.00 0.00 f 0.00 15576 68 94 4603.11 0.00 75.57 4678.68 f 0.00 15577 69 94 0.00 0.00 0.00 0.00 f 0.00 16752 44 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16753 45 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16754 49 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16755 50 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16756 51 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16757 52 113 1420000.00 1420000.00 0.00 0.00 f 0.00 16044 28 102 0.00 238.77 238.77 0.00 f 0.00 18284 67 138 -29377.53 -29377.53 0.00 0.00 f 0.00 18285 68 138 -29377.53 -29256.37 435.29 314.13 f 0.00 18286 69 138 -29256.37 -30506.37 0.00 1250.00 f 0.00 18287 70 138 -30506.37 -30506.37 0.00 0.00 f 0.00 18288 71 138 -30506.37 -30506.37 0.00 0.00 f 0.00 18289 72 138 -30506.37 -30506.37 0.00 0.00 f 0.00 18290 73 138 -30506.37 -30506.37 0.00 0.00 f 0.00 18291 74 138 -30506.37 -28598.37 2929.00 1021.00 f 0.00 18292 75 138 -28598.37 -28598.37 0.00 0.00 f 0.00 14807 47 138 0.00 0.00 0.00 0.00 f 0.00 17048 91 117 0.00 0.00 0.00 0.00 f 0.00 17049 92 117 0.00 0.00 0.00 0.00 f 0.00 18792 71 146 0.00 0.00 0.00 0.00 f 0.00 18793 72 146 0.00 0.00 0.00 0.00 f 0.00 17247 35 121 0.00 0.00 0.00 0.00 f 0.00 17248 36 121 0.00 95.00 95.00 0.00 f 0.00 17249 37 121 95.00 95.00 0.00 0.00 f 0.00 17250 38 121 95.00 95.00 0.00 0.00 f 0.00 17251 39 121 95.00 142.50 47.50 0.00 f 0.00 17252 40 121 142.50 142.50 0.00 0.00 f 0.00 17253 41 121 142.50 239.46 96.96 0.00 f 0.00 17254 42 121 0.00 49.46 49.46 0.00 f 0.00 17207 61 120 -22.85 -22.85 0.00 0.00 f 0.00 17208 62 120 -22.85 -22.85 0.00 0.00 f 0.00 17209 63 120 -22.85 -22.85 0.00 0.00 f 0.00 17210 64 120 -22.85 -22.85 0.00 0.00 f 0.00 17211 65 120 -22.85 -22.85 0.00 0.00 f 0.00 17212 66 120 -22.85 -22.85 0.00 0.00 f 0.00 17213 67 120 -22.85 -22.85 0.00 0.00 f 0.00 17214 68 120 -22.85 -22.85 0.00 0.00 f 0.00 17215 69 120 0.00 -1500.00 0.00 1500.00 f 0.00 17216 70 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17227 81 120 0.00 0.00 0.00 0.00 f 0.00 15419 34 92 0.00 0.00 0.00 0.00 f 0.00 15484 36 93 -5.00 -5.00 0.00 0.00 f 0.00 15489 41 93 -5.00 -5.00 0.00 0.00 f 0.00 15490 42 93 0.00 0.00 0.00 0.00 f 0.00 15491 43 93 0.00 0.00 0.00 0.00 f 0.00 15492 44 93 0.00 0.00 0.00 0.00 f 0.00 15493 45 93 0.00 0.00 0.00 0.00 f 0.00 15495 50 93 0.00 0.00 0.00 0.00 f 0.00 15496 51 93 0.00 0.00 0.00 0.00 f 0.00 15497 52 93 0.00 0.00 0.00 0.00 f 0.00 16490 34 109 -1128441.40 -1153441.40 50000.00 75000.00 f 0.00 15986 34 101 2.90 2.90 0.00 0.00 f 0.00 15860 34 99 262.95 262.95 0.00 0.00 f 0.00 15797 34 98 0.00 0.00 0.00 0.00 f 0.00 19389 35 157 0.00 0.00 0.00 0.00 f 0.00 19390 36 157 0.00 0.00 0.00 0.00 f 0.00 19391 37 157 0.00 0.00 0.00 0.00 f 0.00 19392 38 157 0.00 0.00 0.00 0.00 f 0.00 19393 39 157 0.00 0.00 0.00 0.00 f 0.00 19394 40 157 0.00 0.00 0.00 0.00 f 0.00 19395 41 157 0.00 0.00 0.00 0.00 f 0.00 19396 42 157 0.00 0.00 0.00 0.00 f 0.00 19397 43 157 0.00 0.00 0.00 0.00 f 0.00 19398 44 157 0.00 0.00 0.00 0.00 f 0.00 19399 45 157 0.00 0.00 0.00 0.00 f 0.00 19400 49 157 0.00 0.00 0.00 0.00 f 0.00 19401 50 157 0.00 0.00 0.00 0.00 f 0.00 19402 51 157 0.00 0.00 0.00 0.00 f 0.00 19403 52 157 0.00 0.00 0.00 0.00 f 0.00 19404 53 157 0.00 0.00 0.00 0.00 f 0.00 19405 54 157 0.00 0.00 0.00 0.00 f 0.00 19406 55 157 0.00 0.00 0.00 0.00 f 0.00 16190 52 104 0.00 0.00 0.00 0.00 f 0.00 16191 53 104 0.00 0.00 0.00 0.00 f 0.00 16200 62 104 0.00 0.00 0.00 0.00 f 0.00 16201 63 104 0.00 0.00 0.00 0.00 f 0.00 16202 64 104 0.00 0.00 0.00 0.00 f 0.00 17086 66 118 0.00 0.00 0.00 0.00 f 0.00 17087 67 118 0.00 0.00 0.00 0.00 f 0.00 17088 68 118 0.00 0.00 0.00 0.00 f 0.00 17435 34 125 0.00 0.00 0.00 0.00 f 0.00 16530 77 109 -3194770.35 -3260998.69 125610.54 191838.88 f 0.00 17591 67 127 -271111.78 -271111.78 0.00 0.00 f 0.00 16055 40 102 598.54 598.54 0.00 0.00 f 0.00 16056 41 102 598.54 598.54 0.00 0.00 f 0.00 17939 34 133 0.00 0.00 0.00 0.00 f 0.00 18128 34 136 0.00 0.00 0.00 0.00 f 0.00 18065 34 135 0.00 0.00 0.00 0.00 f 0.00 14991 50 85 -171926.22 -156926.22 15000.00 0.00 f 0.00 14992 51 85 -156926.22 -141926.22 15000.00 0.00 f 0.00 14993 52 85 -141926.22 -86229.52 56424.48 727.78 f 0.00 14994 53 85 -86229.52 -39897.32 47059.98 727.78 f 0.00 14995 54 85 -39897.32 -44647.32 45250.00 50000.00 f 0.00 18191 34 137 0.00 0.00 0.00 0.00 f 0.00 18227 73 137 0.00 0.00 0.00 0.00 f 0.00 18228 74 137 0.00 0.00 0.00 0.00 f 0.00 18229 75 137 0.00 0.00 0.00 0.00 f 0.00 18230 76 137 0.00 0.00 0.00 0.00 f 0.00 18380 34 140 0.00 0.00 0.00 0.00 f 0.00 18443 34 141 0.00 0.00 0.00 0.00 f 0.00 18632 34 144 0.00 0.00 0.00 0.00 f 0.00 18715 57 145 0.00 0.00 0.00 0.00 f 0.00 18719 61 145 0.00 0.00 0.00 0.00 f 0.00 18720 62 145 0.00 0.00 0.00 0.00 f 0.00 18722 64 145 0.00 0.00 0.00 0.00 f 0.00 18821 34 147 0.00 0.00 0.00 0.00 f 0.00 18884 34 148 0.00 0.00 0.00 0.00 f 0.00 18947 34 149 0.00 0.00 0.00 0.00 f 0.00 19010 34 150 0.00 0.00 0.00 0.00 f 0.00 19365 77 156 0.00 15000.00 15000.00 0.00 f 0.00 19366 78 156 15000.00 15000.00 0.00 0.00 f 0.00 19367 79 156 15000.00 15000.00 0.00 0.00 f 0.00 19368 80 156 15000.00 15000.00 0.00 0.00 f 0.00 19369 81 156 15000.00 15000.00 0.00 0.00 f 0.00 19372 84 156 15000.00 15000.00 0.00 0.00 f 0.00 19373 85 156 15000.00 15000.00 0.00 0.00 f 0.00 19374 86 156 15000.00 15000.00 0.00 0.00 f 0.00 15483 35 93 -5.00 -5.00 0.00 0.00 f 0.00 15498 53 93 0.00 0.00 0.00 0.00 f 0.00 15499 54 93 0.00 0.00 0.00 0.00 f 0.00 15500 55 93 0.00 0.00 0.00 0.00 f 0.00 15501 56 93 0.00 0.00 0.00 0.00 f 0.00 15502 57 93 0.00 0.00 0.00 0.00 f 0.00 15756 59 97 0.00 0.00 0.00 0.00 f 0.00 15757 60 97 0.00 0.00 0.00 0.00 f 0.00 15758 61 97 0.00 0.00 0.00 0.00 f 0.00 15759 62 97 0.00 0.00 0.00 0.00 f 0.00 15760 63 97 0.00 0.00 0.00 0.00 f 0.00 15761 64 97 0.00 0.00 0.00 0.00 f 0.00 15762 65 97 0.00 0.00 0.00 0.00 f 0.00 15845 85 98 0.00 0.00 0.00 0.00 f 0.00 15846 86 98 0.00 0.00 0.00 0.00 f 0.00 15847 87 98 0.00 0.00 0.00 0.00 f 0.00 19353 65 156 0.00 0.00 0.00 0.00 f 0.00 19354 66 156 0.00 0.00 0.00 0.00 f 0.00 19355 67 156 0.00 0.00 0.00 0.00 f 0.00 19356 68 156 0.00 0.00 0.00 0.00 f 0.00 19357 69 156 0.00 0.00 0.00 0.00 f 0.00 19358 70 156 0.00 0.00 0.00 0.00 f 0.00 19359 71 156 0.00 0.00 0.00 0.00 f 0.00 19360 72 156 0.00 0.00 0.00 0.00 f 0.00 19361 73 156 0.00 0.00 0.00 0.00 f 0.00 19362 74 156 0.00 0.00 0.00 0.00 f 0.00 19363 75 156 0.00 0.00 0.00 0.00 f 0.00 19364 76 156 0.00 0.00 0.00 0.00 f 0.00 16203 65 104 0.00 0.00 0.00 0.00 f 0.00 16204 66 104 0.00 0.00 0.00 0.00 f 0.00 16205 67 104 0.00 0.00 0.00 0.00 f 0.00 17089 69 118 0.00 0.00 0.00 0.00 f 0.00 17090 70 118 0.00 0.00 0.00 0.00 f 0.00 17091 71 118 0.00 0.00 0.00 0.00 f 0.00 17609 85 127 -694919.92 -694919.92 0.00 0.00 f 0.00 17610 86 127 -694919.92 -694919.92 0.00 0.00 f 0.00 17814 35 131 0.00 0.00 0.00 0.00 f 0.00 17815 36 131 0.00 0.00 0.00 0.00 f 0.00 18258 38 138 0.00 0.00 0.00 0.00 f 0.00 14986 42 85 -225437.61 -208371.49 18342.48 1276.36 f 0.00 14987 43 85 -208371.49 -192204.46 16985.66 818.63 f 0.00 14988 44 85 -192204.46 -177204.46 15000.00 0.00 f 0.00 14989 45 85 -177204.46 -171807.46 12424.80 7027.80 f 0.00 15013 72 85 -60887.79 -65637.79 45250.00 50000.00 f 0.00 18312 28 139 0.00 0.00 0.00 0.00 f 0.00 18315 32 139 0.00 0.00 0.00 0.00 f 0.00 18369 89 139 -3925.00 -3960.00 0.00 35.00 f 0.00 18370 90 139 -3960.00 -3960.00 0.00 0.00 f 0.00 18371 91 139 -3960.00 -4474.20 0.00 514.20 f 0.00 14774 48 120 0.00 0.00 0.00 0.00 f 0.00 17182 33 120 0.00 0.00 0.00 0.00 f 0.00 17184 35 120 0.00 0.00 0.00 0.00 f 0.00 17185 36 120 0.00 0.00 0.00 0.00 f 0.00 17186 37 120 0.00 0.00 0.00 0.00 f 0.00 17187 38 120 0.00 0.00 0.00 0.00 f 0.00 17188 39 120 0.00 0.00 0.00 0.00 f 0.00 17189 40 120 0.00 0.00 0.00 0.00 f 0.00 17190 41 120 0.00 -3417.00 0.00 3417.00 f 0.00 17191 42 120 0.00 -5000.00 0.00 5000.00 f 0.00 17203 57 120 0.00 0.00 0.00 0.00 f 0.00 17233 87 120 -2630.00 -2630.00 0.00 0.00 f 0.00 17235 89 120 -2630.00 -2630.00 0.00 0.00 f 0.00 18463 57 141 0.00 0.00 0.00 0.00 f 0.00 18464 58 141 0.00 0.00 0.00 0.00 f 0.00 18568 33 143 0.00 0.00 0.00 0.00 f 0.00 18585 53 143 0.00 0.00 0.00 0.00 f 0.00 18586 54 143 0.00 0.00 0.00 0.00 f 0.00 18588 56 143 0.00 0.00 0.00 0.00 f 0.00 18589 57 143 0.00 0.00 0.00 0.00 f 0.00 18590 58 143 0.00 0.00 0.00 0.00 f 0.00 18591 59 143 0.00 0.00 0.00 0.00 f 0.00 18894 44 148 0.00 0.00 0.00 0.00 f 0.00 17743 46 130 0.00 0.00 0.00 0.00 f 0.00 17747 31 130 0.00 0.00 0.00 0.00 f 0.00 17748 32 130 0.00 0.00 0.00 0.00 f 0.00 17749 33 130 0.00 0.00 0.00 0.00 f 0.00 17750 34 130 0.00 0.00 0.00 0.00 f 0.00 17751 35 130 0.00 0.00 0.00 0.00 f 0.00 17752 36 130 0.00 0.00 0.00 0.00 f 0.00 17753 37 130 0.00 0.00 0.00 0.00 f 0.00 17760 44 130 0.00 0.00 0.00 0.00 f 0.00 17761 45 130 0.00 0.00 0.00 0.00 f 0.00 17762 49 130 0.00 0.00 0.00 0.00 f 0.00 17763 50 130 0.00 0.00 0.00 0.00 f 0.00 17764 51 130 0.00 0.00 0.00 0.00 f 0.00 17785 72 130 0.00 0.00 0.00 0.00 f 0.00 17786 73 130 0.00 0.00 0.00 0.00 f 0.00 17787 74 130 0.00 0.00 0.00 0.00 f 0.00 17788 75 130 0.00 0.00 0.00 0.00 f 0.00 17789 76 130 0.00 0.00 0.00 0.00 f 0.00 18955 42 149 0.00 0.00 0.00 0.00 f 0.00 18966 56 149 0.00 0.00 0.00 0.00 f 0.00 18967 57 149 0.00 0.00 0.00 0.00 f 0.00 18968 58 149 0.00 0.00 0.00 0.00 f 0.00 18969 59 149 0.00 0.00 0.00 0.00 f 0.00 18970 60 149 0.00 0.00 0.00 0.00 f 0.00 18971 61 149 0.00 0.00 0.00 0.00 f 0.00 18972 62 149 0.00 0.00 0.00 0.00 f 0.00 18974 64 149 0.00 0.00 0.00 0.00 f 0.00 18975 65 149 0.00 0.00 0.00 0.00 f 0.00 18976 66 149 0.00 0.00 0.00 0.00 f 0.00 19012 36 150 0.00 0.00 0.00 0.00 f 0.00 19013 37 150 0.00 0.00 0.00 0.00 f 0.00 19051 78 150 -33.32 -33.32 0.00 0.00 f 0.00 19052 79 150 -33.32 -33.32 0.00 0.00 f 0.00 19053 80 150 -33.32 -33.32 0.00 0.00 f 0.00 19054 81 150 0.00 0.00 0.00 0.00 f 0.00 19057 84 150 0.00 0.00 0.00 0.00 f 0.00 19059 86 150 0.00 0.00 0.00 0.00 f 0.00 19060 87 150 0.00 0.00 0.00 0.00 f 0.00 19061 88 150 0.00 0.00 0.00 0.00 f 0.00 19062 89 150 0.00 0.00 0.00 0.00 f 0.00 19063 90 150 0.00 0.00 0.00 0.00 f 0.00 19064 91 150 0.00 0.00 0.00 0.00 f 0.00 19065 92 150 0.00 0.00 0.00 0.00 f 0.00 16889 58 115 0.00 0.00 0.00 0.00 f 0.00 16890 59 115 0.00 0.00 0.00 0.00 f 0.00 16891 60 115 0.00 0.00 0.00 0.00 f 0.00 19095 59 152 0.00 0.00 0.00 0.00 f 0.00 19096 60 152 0.00 0.00 0.00 0.00 f 0.00 19097 61 152 0.00 0.00 0.00 0.00 f 0.00 19115 79 152 0.00 0.00 0.00 0.00 f 0.00 19116 80 152 0.00 0.00 0.00 0.00 f 0.00 19123 87 152 0.00 0.00 0.00 0.00 f 0.00 19124 88 152 0.00 0.00 0.00 0.00 f 0.00 19125 89 152 0.00 0.00 0.00 0.00 f 0.00 19151 52 153 0.00 0.00 0.00 0.00 f 0.00 19152 53 153 0.00 0.00 0.00 0.00 f 0.00 19153 54 153 0.00 0.00 0.00 0.00 f 0.00 19154 55 153 0.00 0.00 0.00 0.00 f 0.00 19155 56 153 0.00 0.00 0.00 0.00 f 0.00 19156 57 153 0.00 0.00 0.00 0.00 f 0.00 19340 52 156 0.00 0.00 0.00 0.00 f 0.00 19341 53 156 0.00 0.00 0.00 0.00 f 0.00 19342 54 156 0.00 0.00 0.00 0.00 f 0.00 19343 55 156 0.00 0.00 0.00 0.00 f 0.00 19344 56 156 0.00 0.00 0.00 0.00 f 0.00 19345 57 156 0.00 0.00 0.00 0.00 f 0.00 19350 62 156 0.00 0.00 0.00 0.00 f 0.00 19351 63 156 0.00 0.00 0.00 0.00 f 0.00 19352 64 156 0.00 0.00 0.00 0.00 f 0.00 19375 87 156 15000.00 15000.00 0.00 0.00 f 0.00 19380 92 156 15000.00 15000.00 0.00 0.00 f 0.00 14841 47 156 0.00 0.00 0.00 0.00 f 0.00 16862 29 115 0.00 0.00 10000.00 10000.00 f 0.00 16865 31 115 0.00 0.00 0.00 0.00 f 0.00 16869 35 115 0.00 0.00 0.00 0.00 f 0.00 16872 38 115 0.00 0.00 0.00 0.00 f 0.00 16885 54 115 0.00 0.00 0.00 0.00 f 0.00 16886 55 115 0.00 0.00 0.00 0.00 f 0.00 16887 56 115 0.00 0.00 0.00 0.00 f 0.00 19521 93 89 0.57 0.57 0.00 0.00 f 0.00 19522 94 89 0.57 0.57 0.00 0.00 f 0.00 19523 95 89 0.57 0.57 0.00 0.00 f 0.00 19524 96 89 0.57 0.57 0.00 0.00 f 0.00 19525 97 89 0.57 0.57 0.00 0.00 f 0.00 19526 98 89 0.57 0.57 0.00 0.00 f 0.00 19527 99 89 0.57 0.57 0.00 0.00 f 0.00 19528 100 89 0.57 0.57 0.00 0.00 f 0.00 19529 101 89 0.57 0.57 0.00 0.00 f 0.00 19530 102 89 0.57 0.57 0.00 0.00 f 0.00 19531 103 89 0.57 0.57 0.00 0.00 f 0.00 19532 104 89 0.57 0.57 0.00 0.00 f 0.00 19533 93 92 0.00 0.00 0.00 0.00 f 0.00 19534 94 92 0.00 0.00 0.00 0.00 f 0.00 19535 95 92 0.00 0.00 0.00 0.00 f 0.00 19536 96 92 0.00 0.00 0.00 0.00 f 0.00 19537 97 92 0.00 0.00 0.00 0.00 f 0.00 19538 98 92 0.00 0.00 0.00 0.00 f 0.00 19539 99 92 0.00 0.00 0.00 0.00 f 0.00 19540 100 92 0.00 0.00 0.00 0.00 f 0.00 19541 101 92 0.00 0.00 0.00 0.00 f 0.00 19542 102 92 0.00 0.00 0.00 0.00 f 0.00 19543 103 92 0.00 0.00 0.00 0.00 f 0.00 19544 104 92 0.00 0.00 0.00 0.00 f 0.00 19545 93 93 0.00 0.00 0.00 0.00 f 0.00 19546 94 93 0.00 0.00 0.00 0.00 f 0.00 19547 95 93 0.00 0.00 0.00 0.00 f 0.00 19548 96 93 0.00 0.00 0.00 0.00 f 0.00 19549 97 93 0.00 0.00 0.00 0.00 f 0.00 19550 98 93 0.00 0.00 0.00 0.00 f 0.00 19551 99 93 0.00 0.00 0.00 0.00 f 0.00 19552 100 93 0.00 0.00 0.00 0.00 f 0.00 19553 101 93 0.00 0.00 0.00 0.00 f 0.00 19554 102 93 0.00 0.00 0.00 0.00 f 0.00 19555 103 93 0.00 0.00 0.00 0.00 f 0.00 19556 104 93 0.00 0.00 0.00 0.00 f 0.00 19557 93 86 1969.99 -0.01 0.00 1970.00 f 0.00 19558 94 86 -0.01 -0.01 0.00 0.00 f 0.00 19559 95 86 -0.01 -0.01 0.00 0.00 f 0.00 19560 96 86 -0.01 0.00 14879.48 14879.47 f 0.00 19561 97 86 0.00 0.00 0.00 0.00 f 0.00 19562 98 86 0.00 0.00 4313.30 4313.30 f 0.00 19563 99 86 0.00 0.00 0.00 0.00 f 0.00 19564 100 86 0.00 0.00 0.00 0.00 f 0.00 19565 101 86 0.00 0.00 0.00 0.00 f 0.00 19566 102 86 0.00 0.00 0.00 0.00 f 0.00 19567 103 86 0.00 0.00 0.00 0.00 f 0.00 19568 104 86 0.00 0.00 0.00 0.00 f 0.00 19570 94 108 0.00 0.00 0.00 0.00 f 0.00 19571 95 108 0.00 -110000.00 0.00 110000.00 f 0.00 19572 96 108 -110000.00 -99654.10 42844.10 32498.20 f 0.00 19599 99 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19600 100 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19601 101 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19602 102 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19603 103 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19605 93 106 -188520.04 -293520.04 0.00 105000.00 f 0.00 19606 94 106 -293520.04 -396870.04 0.00 103350.00 f 0.00 19607 95 106 -396870.04 -279407.13 378837.91 261375.00 f 0.00 19608 96 106 -279407.13 -7500.29 385557.28 113650.44 f 0.00 19609 97 106 -7500.29 -2330.29 263669.99 258499.99 f 0.00 19610 98 106 -2330.29 -4530.29 331099.99 333299.99 f 0.00 19611 99 106 -4530.29 -4530.29 0.00 0.00 f 0.00 19612 100 106 -4530.29 -4530.29 0.00 0.00 f 0.00 19613 101 106 -4530.29 -4530.29 0.00 0.00 f 0.00 19614 102 106 -4530.29 -4530.29 0.00 0.00 f 0.00 19615 103 106 -4530.29 -4530.29 0.00 0.00 f 0.00 19616 104 106 -4530.29 -4530.29 0.00 0.00 f 0.00 19580 104 108 -429654.10 -429654.10 0.00 0.00 f 0.00 19581 93 109 -3950012.24 -3950012.24 0.00 0.00 f 0.00 19582 94 109 -3950012.24 -3950012.24 0.00 0.00 f 0.00 19583 95 109 -3950012.24 -4115982.19 134030.05 300000.00 f 0.00 19584 96 109 -4115982.19 -4312896.47 25772.00 222686.28 f 0.00 19585 97 109 -4312896.47 -4199896.47 113000.00 0.00 f 0.00 20089 97 137 0.00 0.00 0.00 0.00 f 0.00 19586 98 109 -4199896.47 -4201841.47 146555.00 148500.00 f 0.00 19587 99 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 19588 100 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 19589 101 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 19590 102 109 -4201841.47 -4201841.47 0.00 0.00 f 0.00 19593 93 84 3834455.79 3834455.79 0.00 0.00 f 890572.62 19594 94 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19595 95 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19596 96 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19597 97 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19598 98 84 3834455.79 3834455.79 0.00 0.00 f 0.00 18278 61 138 -21015.06 -21015.06 0.00 0.00 f 0.00 20109 93 138 -76391.92 -76391.92 0.00 0.00 f 0.00 20110 94 138 -76391.92 -76391.92 0.00 0.00 f 0.00 20111 95 138 -76391.92 -76391.92 0.00 0.00 f 0.00 20112 96 138 -76391.92 -67104.60 12549.32 3262.00 f 0.00 17236 90 120 -2630.00 -2630.00 0.00 0.00 f 0.00 17237 91 120 -2630.00 -2630.00 0.00 0.00 f 0.00 17238 92 120 -2630.00 -2630.00 0.00 0.00 f 0.00 18379 33 140 0.00 0.00 0.00 0.00 f 0.00 18427 84 140 2025.00 2025.00 0.00 0.00 f 0.00 18428 85 140 2025.00 2025.00 0.00 0.00 f 0.00 14811 47 140 0.00 0.00 0.00 0.00 f 0.00 16128 53 103 419356.71 496556.71 77200.00 0.00 f 0.00 16129 54 103 496556.71 571806.71 75250.00 0.00 f 0.00 19181 82 153 0.00 0.00 0.00 0.00 f 0.00 19182 83 153 0.00 0.00 0.00 0.00 f 0.00 19183 84 153 0.00 0.00 0.00 0.00 f 0.00 19184 85 153 0.00 0.00 0.00 0.00 f 0.00 19185 86 153 0.00 0.00 0.00 0.00 f 0.00 19186 87 153 0.00 0.00 0.00 0.00 f 0.00 19187 88 153 0.00 0.00 0.00 0.00 f 0.00 16896 65 115 0.00 0.00 0.00 0.00 f 0.00 16903 72 115 0.00 0.00 0.00 0.00 f 0.00 16904 73 115 0.00 0.00 0.00 0.00 f 0.00 16905 74 115 0.00 0.00 0.00 0.00 f 0.00 16906 75 115 0.00 0.00 0.00 0.00 f 0.00 16907 76 115 0.00 0.00 0.00 0.00 f 0.00 16908 77 115 0.00 0.00 0.00 0.00 f 0.00 19450 31 158 0.00 0.00 0.00 0.00 f 0.00 19451 32 158 0.00 0.00 0.00 0.00 f 0.00 19452 33 158 0.00 0.00 0.00 0.00 f 0.00 19465 49 158 0.00 0.00 0.00 0.00 f 0.00 19466 50 158 0.00 0.00 0.00 0.00 f 0.00 19467 51 158 0.00 0.00 0.00 0.00 f 0.00 20422 48 160 0.00 0.00 0.00 0.00 f 0.00 17791 78 130 0.00 0.00 256.34 256.34 f 0.00 17792 79 130 0.00 0.00 0.00 0.00 f 0.00 17799 86 130 0.00 0.00 0.00 0.00 f 0.00 17800 87 130 0.00 0.00 0.00 0.00 f 0.00 17801 88 130 0.00 0.00 0.00 0.00 f 0.00 17802 89 130 0.00 0.00 0.00 0.00 f 0.00 17803 90 130 0.00 0.00 0.00 0.00 f 0.00 17995 46 134 0.00 0.00 0.00 0.00 f 0.00 18002 34 134 0.00 0.00 0.00 0.00 f 0.00 18043 78 134 0.00 0.00 179.44 179.44 f 0.00 18044 79 134 0.00 0.00 0.00 0.00 f 0.00 14834 48 152 0.00 0.00 0.00 0.00 f 0.00 14836 48 153 0.00 0.00 0.00 0.00 f 0.00 19173 74 153 0.00 0.00 0.00 0.00 f 0.00 19174 75 153 0.00 0.00 0.00 0.00 f 0.00 19175 76 153 0.00 0.00 0.00 0.00 f 0.00 19176 77 153 0.00 0.00 0.00 0.00 f 0.00 19177 78 153 0.00 0.00 0.00 0.00 f 0.00 19178 79 153 0.00 0.00 0.00 0.00 f 0.00 19179 80 153 0.00 0.00 0.00 0.00 f 0.00 19180 81 153 0.00 0.00 0.00 0.00 f 0.00 15215 85 88 0.00 0.00 0.00 0.00 f 0.00 19188 89 153 0.00 0.00 0.00 0.00 f 0.00 19189 90 153 0.00 0.00 0.00 0.00 f 0.00 20452 59 160 0.00 0.00 0.00 0.00 f 0.00 20453 60 160 0.00 0.00 0.00 0.00 f 0.00 20454 61 160 0.00 0.00 0.00 0.00 f 0.00 20455 62 160 0.00 0.00 0.00 0.00 f 0.00 20456 63 160 0.00 0.00 0.00 0.00 f 0.00 20457 64 160 0.00 0.00 0.00 0.00 f 0.00 20458 65 160 0.00 0.00 0.00 0.00 f 0.00 20459 66 160 0.00 0.00 0.00 0.00 f 0.00 20460 67 160 0.00 0.00 0.00 0.00 f 0.00 20461 68 160 0.00 0.00 0.00 0.00 f 0.00 20462 69 160 0.00 0.00 0.00 0.00 f 0.00 20463 70 160 0.00 0.00 0.00 0.00 f 0.00 20464 71 160 0.00 0.00 0.00 0.00 f 0.00 20465 72 160 0.00 0.00 0.00 0.00 f 0.00 20466 73 160 0.00 0.00 0.00 0.00 f 0.00 20467 74 160 0.00 0.00 0.00 0.00 f 0.00 20468 75 160 0.00 0.00 0.00 0.00 f 0.00 20469 76 160 0.00 0.00 0.00 0.00 f 0.00 20470 77 160 0.00 0.00 0.00 0.00 f 0.00 20471 78 160 0.00 0.00 0.00 0.00 f 0.00 20421 47 160 0.00 0.00 0.00 0.00 f 0.00 17221 75 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17222 76 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17223 77 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17224 78 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17225 79 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17226 80 120 -1500.00 -1500.00 0.00 0.00 f 0.00 17228 82 120 0.00 0.00 0.00 0.00 f 0.00 17229 83 120 0.00 -700.00 0.00 700.00 f 0.00 17230 84 120 -700.00 -700.00 0.00 0.00 f 0.00 18480 74 141 31084.94 41415.57 10330.63 0.00 f 0.00 18486 80 141 135368.43 135368.43 0.00 0.00 f 0.00 20169 93 141 0.00 0.00 0.00 0.00 f 0.00 20170 94 141 0.00 0.00 0.00 0.00 f 0.00 20173 97 141 112638.44 371138.43 258499.99 0.00 f 0.00 19641 93 143 0.00 0.00 0.00 0.00 f 0.00 19642 94 143 0.00 0.00 0.00 0.00 f 0.00 19643 95 143 0.00 0.00 0.00 0.00 f 0.00 18658 63 144 0.00 0.00 0.00 0.00 f 0.00 18659 64 144 0.00 0.00 0.00 0.00 f 0.00 18660 65 144 0.00 0.00 0.00 0.00 f 0.00 18672 77 144 0.00 0.00 86.42 86.42 f 0.00 18673 78 144 0.00 0.00 0.00 0.00 f 0.00 18674 79 144 0.00 0.00 0.00 0.00 f 0.00 18675 80 144 0.00 0.00 0.00 0.00 f 0.00 19604 104 84 3834455.79 3834455.79 0.00 0.00 f 0.00 19299 74 155 0.00 0.00 0.00 0.00 f 0.00 19312 87 155 -414.64 -414.64 0.00 0.00 f 0.00 19313 88 155 -414.64 -1014.64 0.00 600.00 f 0.00 19314 89 155 -1014.64 -1014.64 0.00 0.00 f 0.00 19315 90 155 -1014.64 -1014.64 0.00 0.00 f 0.00 19316 91 155 -1014.64 -1014.64 0.00 0.00 f 0.00 19317 92 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20325 93 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20326 94 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20327 95 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20328 96 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20329 97 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20330 98 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20331 99 155 -1014.64 -1014.64 0.00 0.00 f 0.00 20332 100 155 -1014.64 -1014.64 0.00 0.00 f 0.00 14839 47 155 0.00 0.00 0.00 0.00 f 0.00 14842 48 156 0.00 0.00 0.00 0.00 f 0.00 19319 29 156 0.00 0.00 0.00 0.00 f 0.00 19320 28 156 0.00 0.00 0.00 0.00 f 0.00 19321 30 156 0.00 0.00 0.00 0.00 f 0.00 19323 32 156 0.00 0.00 0.00 0.00 f 0.00 19339 51 156 0.00 0.00 0.00 0.00 f 0.00 19346 58 156 0.00 0.00 0.00 0.00 f 0.00 19347 59 156 0.00 0.00 0.00 0.00 f 0.00 19348 60 156 0.00 0.00 0.00 0.00 f 0.00 19378 90 156 15000.00 15000.00 0.00 0.00 f 0.00 19379 91 156 15000.00 15000.00 0.00 0.00 f 0.00 20337 93 156 15000.00 15000.00 0.00 0.00 f 0.00 20338 94 156 15000.00 15000.00 0.00 0.00 f 0.00 20339 95 156 15000.00 15000.00 0.00 0.00 f 0.00 20340 96 156 15000.00 15000.00 0.00 0.00 f 0.00 20341 97 156 15000.00 15000.00 0.00 0.00 f 0.00 20342 98 156 15000.00 15000.00 0.00 0.00 f 0.00 20343 99 156 15000.00 15000.00 0.00 0.00 f 0.00 20222 98 146 -790.49 -1520.24 0.49 730.24 t 0.00 19922 98 87 0.00 11988.28 12272.91 284.63 t 0.00 20102 98 128 -3959.81 -6580.68 1.18 2622.05 t 0.00 \. -- -- Data for Name: uiform; Type: TABLE DATA; Schema: public; Owner: admin -- COPY uiform (uiform_id, uiform_name, uiform_order, uiform_enabled, uiform_source, uiform_notes) FROM stdin; 1 DisplayItemLocations 0 f \n\n DisplayItemLocations\n \n \n \n 0\n 0\n 359\n 344\n \n \n \n Display Item Locations\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Close\n \n \n \n \n \n \n Query\n \n \n \n \n \n \n Print\n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 20\n 40\n \n \n \n \n \n \n \n \n \n \n \n Automatically Update\n \n \n \n \n \n \n \n DateCluster\n QWidget\n

datecluster.h
\n \n \n WarehouseGroup\n QGroupBox\n
warehousegroup.h
\n
\n \n XCheckBox\n QCheckBox\n
xcheckbox.h
\n
\n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n \n \n \n\n Display Item Location Detail \. -- -- Data for Name: uom; Type: TABLE DATA; Schema: public; Owner: admin -- COPY uom (uom_id, uom_name, uom_descrip, uom_item_weight) FROM stdin; 10 WSET Wheel Set f 4 EA Each f 5 CS Case f 6 PL Pallet f 8 GL Gallon f 9 SH Sheet f 7 LB Pound t 11 HR Hour f 12 MILE Mile f 13 KM Kilometer f 14 KG Kilogram f \. -- -- Data for Name: uomconv; Type: TABLE DATA; Schema: public; Owner: admin -- COPY uomconv (uomconv_id, uomconv_from_uom_id, uomconv_from_value, uomconv_to_uom_id, uomconv_to_value, uomconv_fractional) FROM stdin; 1 10 1.0000000000 4 4.0000000000 f 2 13 1.0000000000 12 0.6213700000 t 3 14 1.0000000000 7 2.2046000000 t \. -- -- Data for Name: uomtype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY uomtype (uomtype_id, uomtype_name, uomtype_descrip, uomtype_multiple) FROM stdin; 1 Selling Selling a.k.a. Pricing and Shipping UOMs. t 2 Capacity Capacity UOMs. f 3 AltCapacity Alternate Capacity UOMs. f 4 MaterialIssue Material Issuing UOMs. f \. -- -- Data for Name: urlinfo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY urlinfo (url_id, url_title, url_url) FROM stdin; 1 Help http://www.xtuple.org/sites/default/files/refguide/RefGuide-3.4/ch01s01.html#d0e1600 \. -- -- Data for Name: usr_bak; Type: TABLE DATA; Schema: public; Owner: admin -- COPY usr_bak (usr_id, usr_username, usr_propername, usr_passwd, usr_locale_id, usr_initials, usr_agent, usr_active, usr_email, usr_window) FROM stdin; 2 admin Administrator 3 ADMIN t t matherton@xtuple.com 1 mfgadmin MFG User \N 3 ADMIN t f matherton@xtuple.com 9 jsmith John Smith \N 3 JS t t jsmith@xtuple.com \. -- -- Data for Name: usrgrp; Type: TABLE DATA; Schema: public; Owner: admin -- COPY usrgrp (usrgrp_id, usrgrp_grp_id, usrgrp_username) FROM stdin; 1 1 admin 2 1 mfgadmin \. -- -- Data for Name: usrpref; Type: TABLE DATA; Schema: public; Owner: admin -- COPY usrpref (usrpref_id, usrpref_name, usrpref_value, usrpref_username) FROM stdin; 2 ShowIMMenu t mfgadmin 3 ShowPDMenu t mfgadmin 4 ShowMSMenu t mfgadmin 5 ShowCPMenu t mfgadmin 6 ShowWOMenu t mfgadmin 7 ShowPOMenu t mfgadmin 8 ShowSOMenu t mfgadmin 9 ShowSRMenu t mfgadmin 10 ShowSAMenu t mfgadmin 28 ShowGLMenu t mfgadmin 34 UseCustCache f mfgadmin 29 ShowAPMenu t mfgadmin 27 ShowARMenu t mfgadmin 48 ShowPDToolbar t mfgadmin 51 ShowMSToolbar t mfgadmin 52 ShowCPToolbar t mfgadmin 49 ShowWOToolbar t mfgadmin 30 ShowSOToolbar t mfgadmin 53 ShowSRToolbar t mfgadmin 73 UsedFixedWidthFonts f mfgadmin 47 ShowIMToolbar t mfgadmin 74 ShowSAToolbar t mfgadmin 50 ShowPOToolbar t mfgadmin 76 ShowGLToolbar t mfgadmin 108 ToolbarPositions \n\n\nI/M Tools,P/D Tools,W/O Tools,P/O Tools,S/O Tools,\n[I/M Tools,0,0,-1,-1,1][P/D Tools,0,0,-1,-1,1][W/O Tools,0,0,-1,-1,1][P/O Tools,0,0,-1,-1,1][S/O Tools,0,0,-1,-1,1]\n\n\n\n\n\n\n mfgadmin 115 ShowIMMenu t jsmith 116 ShowPDMenu t jsmith 117 ShowMSMenu t jsmith 118 ShowCPMenu t jsmith 119 ShowWOMenu t jsmith 120 ShowPOMenu t jsmith 121 ShowSOMenu t jsmith 122 ShowSRMenu t jsmith 123 ShowSAMenu t jsmith 124 ShowAPMenu t jsmith 125 ShowARMenu t jsmith 126 ShowGLMenu t jsmith 140 UseItemCache f jsmith 141 UseCustCache f jsmith 142 UsedFixedWidthFonts f jsmith 143 ShowRIWorkOrdersByDefault f jsmith 144 ListNumericItemNumbersFirst f jsmith 145 ShowSOItemAvailability t jsmith 147 DefaultEllipsesAction list jsmith 149 F2 ar.arWorkBench jsmith 151 ShowPMMenu t jsmith 127 ShowIMToolbar t jsmith 128 ShowPDToolbar t jsmith 129 ShowMSToolbar t jsmith 130 ShowCPToolbar t jsmith 131 ShowWOToolbar t jsmith 132 ShowPOToolbar t jsmith 133 ShowSOToolbar t jsmith 134 ShowSRToolbar t jsmith 135 ShowSAToolbar t jsmith 152 ShowPMToolbar t jsmith 136 ShowAPToolbar t jsmith 137 ShowARToolbar t jsmith 138 ShowGLToolbar t jsmith 148 ToolbarPositions \n\n\nI/M Tools,P/D Tools,W/O Tools,P/O Tools,S/O Tools,\n[I/M Tools,0,0,-1,-1,1][P/D Tools,0,0,-1,-1,1][W/O Tools,0,0,-1,-1,1][P/O Tools,0,0,-1,-1,1][S/O Tools,0,0,-1,-1,1]\n\n\n\n\n\n\n jsmith 153 ShowPMMenu t mfgadmin 154 ShowPMToolbar t mfgadmin 75 ShowAPToolbar t mfgadmin 155 ShowARToolbar t mfgadmin 11 PreferredWarehouse 35 mfgadmin 156 UseItemCache f mfgadmin 54 ShowRIWorkOrdersByDefault f mfgadmin 157 ListNumericItemNumbersFirst f mfgadmin 158 ShowSOItemAvailability t mfgadmin 160 DefaultEllipsesAction list mfgadmin 164 ShowCRMMenu t mfgadmin 165 ShowCRMToolbar t mfgadmin 166 InterfaceWindowOption Workspace mfgadmin 161 ShowCRMMenu t jsmith 162 ShowCRMToolbar t jsmith 1 BackgroundImageid 23 mfgadmin 114 BackgroundImageid 23 jsmith 233 vendor/_taxreg/columnsShown 0,on|1,on| mfgadmin 234 vendor/_vendaddr/columnsShown 0,on|1,on|2,on| mfgadmin 169 F3 wo.dspWoScheduleByClassCode mfgadmin 167 F1 pd.itemAvailabilityWorkbench mfgadmin 171 F4 ar.arWorkBench mfgadmin 170 F5 gl.viewFinancialReport mfgadmin 172 reports/_report/columnsShown 0,on|1,on|2,on| mfgadmin 173 warehouse/_whsezone/columnsShown 0,on|1,on| mfgadmin 174 _commentsTab/_comment/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 175 warehouses/_warehouse/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 176 configureSO/_invoiceWatermarks/columnsShown 0,on|1,on|2,on| mfgadmin 177 configureSO/_creditMemoWatermarks/columnsShown 0,on|1,on|2,on| mfgadmin 178 arAccountAssignments/_araccnt/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 294 printWoTraveler/_releaseWo/checked 2 mfgadmin 146 IdleTimeout 30 jsmith 299 /_user/columnsShown 0,on|1,on| mfgadmin 179 users/_usr/columnsShown 0,on|1,on|2,on| mfgadmin 180 UseOldMenu f mfgadmin 181 boo/_booitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| mfgadmin 182 TabPage/_comment/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 183 dspWoScheduleByParameterList/_wo/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on| mfgadmin 238 project/_prjtask/columnsShown 0,on|1,on|2,on| mfgadmin 185 cashReceipt/_cc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 187 cashReceipt/_cashrcptmisc/columnsShown 0,on|1,on|2,on| mfgadmin 188 salesOrder/_cc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 300 /_wo/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 190 eventManager/_event/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 191 quotes/_quote/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 192 purchaseOrder/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 193 comment/_comment/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 194 opportunity/_charass/columnsShown 0,on|1,on|2,on| mfgadmin 195 opportunity/_todoList/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 196 opportunitySources/_oplist/columnsShown 0,on|1,on| mfgadmin 197 opportunityStages/_oplist/columnsShown 0,on|1,on| mfgadmin 163 InterfaceWindowOption TopLevel jsmith 198 opportunityTypes/_oplist/columnsShown 0,on|1,on| mfgadmin 199 opportunityList/_list/columnsShown 0,on|1,on|2,on|3,on|4,off|5,off|6,off|7,off|8,off|9,on|10,off| mfgadmin 200 unpostedPurchaseOrders/_pohead/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 201 enterPoReceipt/_orderitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| mfgadmin 202 unpostedPoReceipts/_recv/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on| mfgadmin 203 transferOrderItem/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| mfgadmin 204 itemSite/_restricted/columnsShown 0,on|1,on|2,on| mfgadmin 205 commentsTab/_comment/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 206 taxSelections/_taxsel/columnsShown 0,on|1,on|2,on| mfgadmin 207 transferOrder/_toitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| mfgadmin 208 shipOrder/_coitem/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 209 /_to/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 210 transferOrders/_to/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 211 dspQOHByItem/_qoh/columnsShown 0,on|1,on|2,on|3,on|4,on|5,off|6,off|7,off| mfgadmin 212 dspGLTransactions/_gltrans/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off| mfgadmin 213 voucher/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on| mfgadmin 214 voucher/_miscDistrib/columnsShown 0,on|1,on| mfgadmin 215 openVouchers/_vohead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| mfgadmin 216 selectPayments/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| mfgadmin 217 openSalesOrders/_so/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 235 vendors/_vendor/columnsShown 0,on|1,on|2,on| mfgadmin 301 woTimeClock/_wooperList/columnsShown 0,on|1,on|2,on| mfgadmin 219 unpostedInvoices/_invchead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| mfgadmin 237 financialLayouts/_flhead/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 220 arWorkBench/_cashrcpt/columnsShown 0,on|1,on|2,on| mfgadmin 221 arWorkBench/_aropenCM/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 222 arWorkBench/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| mfgadmin 223 arWorkBench/_preauth/columnsShown 0,on|1,on|2,on| mfgadmin 224 invoice/_invcitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| mfgadmin 225 dspInvoiceInformation/_arapply/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 226 dspCustomerInformation/_payments/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 227 dspCustomerInformation/_creditMemo/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 228 dspCustomerInformation/_order/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 229 dspCustomerInformation/_quote/columnsShown 0,on|1,on|2,on| mfgadmin 230 comments/_comment/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 231 dspCustomerInformation/_arhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 232 dspCustomerInformation/_invoice/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 302 /_item/columnsShown 0,on|1,on| mfgadmin 186 cashReceipt/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| mfgadmin 240 user/_available/columnsShown 0,on| mfgadmin 303 workOrderMaterials/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| mfgadmin 241 user/_granted/columnsShown 0,on| mfgadmin 236 dspTrialBalances/_trialbal/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| mfgadmin 242 configureIM/_shipformWatermarks/columnsShown 0,on|1,on|2,on| mfgadmin 243 fixSerial/_serial/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 244 calendars/_calhead/columnsShown 0,on|1,on| mfgadmin 245 accountNumbers/_account/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 246 standardJournal/_stdjrnlitem/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 247 glSeries/_glseries/columnsShown 0,on|1,on|2,on| mfgadmin 248 dspFinancialReport/_periods/columnsShown 0,on|1,on| mfgadmin 249 dspFinancialReport/_showBegBal/checked 0 mfgadmin 250 dspFinancialReport/_showBegBalPrcnt/checked 0 mfgadmin 251 dspFinancialReport/_showDebits/checked 0 mfgadmin 252 dspFinancialReport/_showDebitsPrcnt/checked 0 mfgadmin 253 dspFinancialReport/_showCredits/checked 0 mfgadmin 254 dspFinancialReport/_showCreditsPrcnt/checked 0 mfgadmin 255 dspFinancialReport/_showEndBal/checked 0 mfgadmin 256 dspFinancialReport/_showEndBalPrcnt/checked 0 mfgadmin 257 dspFinancialReport/_showBudget/checked 0 mfgadmin 258 dspFinancialReport/_showBudgetPrcnt/checked 0 mfgadmin 259 dspFinancialReport/_showDiff/checked 0 mfgadmin 260 dspFinancialReport/_showDiffPrcnt/checked 0 mfgadmin 261 dspFinancialReport/_showCustom/checked 0 mfgadmin 262 dspFinancialReport/_showCustomPrcnt/checked 0 mfgadmin 263 dspFinancialReport/_shownumbers/checked 0 mfgadmin 266 accountingPeriods/_period/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| mfgadmin 267 /_accnt/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 304 dspWoMaterialsByWorkOrder/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| mfgadmin 268 standardJournals/_stdjrnl/columnsShown 0,on|1,on| mfgadmin 269 salesOrderItem/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| mfgadmin 189 salesOrder/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,off|9,off|10,off|11,on|12,on|13,on| mfgadmin 270 createPlannedOrdersByPlannerCode/_deleteFirmed/checked 0 mfgadmin 271 dspRunningAvailability/_showPlanned/checked 2 mfgadmin 272 dspRunningAvailability/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 273 /_project/columnsShown 0,on|1,on| mfgadmin 274 workOrder/_printTraveler/checked 0 mfgadmin 275 dspPlannedOrdersByPlannerCode/_planord/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| mfgadmin 276 itemSourceList/_itemsrc/columnsShown 0,on|1,on| mfgadmin 277 dspPurchaseReqsByPlannerCode/_pr/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 278 unpostedPurchaseOrders/_allOpenOrders/checked 0 mfgadmin 279 quotes/_showProspects/checked 0 mfgadmin 280 shippingForms/_bolformat/columnsShown 0,on| mfgadmin 305 distributeInventory/_itemloc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 282 shipOrder/_print/checked 2 mfgadmin 283 shipOrder/_receive/checked 2 mfgadmin 284 issueToShipping/_requireInventory/checked 0 mfgadmin 285 issueToShipping/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| mfgadmin 286 enterPoReceipt/_singleLot/checked 0 mfgadmin 306 postProduction/_backflush/checked 2 mfgadmin 287 /_pohead/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 288 openVouchers/_printJournal/checked 0 mfgadmin 307 postProduction/_nonPickItems/checked 0 mfgadmin 289 postChecks/_printJournal/checked 2 mfgadmin 290 viewCheckRun/_check/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 291 reconcileBankaccount/_receipts/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 292 reconcileBankaccount/_checks/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 239 postOperations/_womatl/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 293 closeWo/_postComment/checked 0 mfgadmin 310 postProduction/_immediateTransfer/checked 0 mfgadmin 296 printWoTraveler/_routing/checked 2 mfgadmin 311 dspWoScheduleByParameterList/_showOnlyRI/checked 0 mfgadmin 298 printWoTraveler/_woLabel/checked 0 mfgadmin 353 item/_file/columnsShown 0,on|1,on| mfgadmin 354 item/_itemimage/columnsShown 0,on|1,on|2,on| mfgadmin 355 item/_itemtrans/columnsShown 0,on|1,on| mfgadmin 356 item/_itemsub/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 357 item/_itemalias/columnsShown 0,on|1,on| mfgadmin 358 item/_itemtax/columnsShown 0,on|1,on| mfgadmin 359 item/_itemSite/columnsShown 0,on|1,on|2,on| mfgadmin 360 item/_charass/columnsShown 0,on|1,on|2,on| mfgadmin 361 item/_uomconv/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 362 booItem/_booimage/columnsShown 0,on|1,on|2,on| mfgadmin 363 booitemImage/_image/columnsShown 0,on|1,on| mfgadmin 364 images/_image/columnsShown 0,on|1,on|2,on| mfgadmin 365 workCenters/_wrkcnt/columnsShown 0,on|1,on|2,on| mfgadmin 366 bomItem/_bomitemsub/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 367 BOM/_bomitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| mfgadmin 368 uom/_uomconv/columnsShown 0,on|1,on|2,on| mfgadmin 312 dspWoScheduleByParameterList/_showOnlyTopLevel/checked 0 mfgadmin 314 eventManager/_showAcknowledged/checked 0 mfgadmin 315 eventManager/_autoUpdate/checked 0 mfgadmin 316 /_so/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 218 selectOrderForBilling/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| mfgadmin 317 dspBillingSelections/_cobill/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 318 printInvoice/_invoiceWatermarks/columnsShown 0,on|1,on|2,on| mfgadmin 319 uninvoicedShipments/_showUnselected/checked 0 mfgadmin 320 uninvoicedShipments/_coship/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 321 salesAccounts/_salesaccnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| mfgadmin 322 _commentsPage/_comment/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 323 returnAuthorization/_raitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on|15,on|16,on|17,on|18,on| mfgadmin 324 priceList/_price/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 325 unpostedCreditMemos/_cmhead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 326 applyARCreditMemo/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 327 _open/_receipts/checked 2 mfgadmin 328 _open/_shipments/checked 2 mfgadmin 329 _open/_payment/checked 2 mfgadmin 330 _open/_expired/checked 2 mfgadmin 331 returnAuthorizationWorkbench/_ra/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| mfgadmin 332 _dueCredit/_postmemos/checked 0 mfgadmin 334 returnAuthorizationWorkbench/_radue/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| mfgadmin 336 _dueCredit/_check/checked 2 mfgadmin 369 uoms/_uoms/columnsShown 0,on|1,on| mfgadmin 338 dspARApplications/_cashReceipts/checked 0 mfgadmin 339 dspARApplications/_creditMemos/checked 2 mfgadmin 340 dspARApplications/_arapply/columnsShown 0,on|1,on|2,on|3,off|4,on|5,on|6,off|7,on|8,on|9,on| mfgadmin 341 openReturnAuthorizations/_ra/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 342 openReturnAuthorizations/_expired/checked 0 mfgadmin 370 items/_showInactive/checked 0 mfgadmin 344 dspInventoryHistoryByParameterList/_invhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| mfgadmin 345 dspPendingAvailability/_showShortages/checked 0 mfgadmin 346 dspPendingAvailability/_items/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 347 dspInventoryAvailabilityByParameterList/_showReorder/checked 0 mfgadmin 348 dspInventoryAvailabilityByParameterList/_ignoreReorderAtZero/checked 0 mfgadmin 349 dspInventoryAvailabilityByParameterList/_showShortages/checked 0 mfgadmin 350 dspInventoryAvailabilityByParameterList/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| mfgadmin 351 bankAccounts/_bankaccnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 352 unappliedARCreditMemos/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 371 items/_item/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 372 booItemList/_booitem/columnsShown 0,on|1,on| mfgadmin 373 workOrderOperations/_wooper/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 374 dspJobCosting/_showsu/checked 2 mfgadmin 375 dspJobCosting/_showrt/checked 2 mfgadmin 376 dspJobCosting/_showmatl/checked 2 mfgadmin 377 dspJobCosting/_cost/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 378 booList/_showInactive/checked 0 mfgadmin 379 booList/_boo/columnsShown 0,on|1,on| mfgadmin 380 classCodes/_classcode/columnsShown 0,on|1,on| mfgadmin 381 configureIE/_map/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 382 plannedSchedule/_list/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 383 plannedSchedules/_list/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| mfgadmin 384 userPreferences/_event/columnsShown 0,on|1,on|2,on| mfgadmin 385 userPreferences/_warehouses/columnsShown 0,on|1,on|2,on| mfgadmin 386 userPreferences/_hotkey/columnsShown 0,on|1,on|2,on| mfgadmin 333 _dueCredit/_printmemo/checked 2 mfgadmin 335 _dueCredit/_creditmemo/checked 2 mfgadmin 337 _dueCredit/_creditcard/checked 2 mfgadmin 343 openSalesOrders/_autoUpdate/checked 2 mfgadmin 387 dspOperationsByWorkCenter/_booitem/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 388 dspStandardOperationsByWorkCenter/_stdopn/columnsShown 0,on|1,on| mfgadmin 389 dspInventoryAvailabilityByWorkOrder/_onlyShowShortages/checked 0 mfgadmin 390 dspInventoryAvailabilityByWorkOrder/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| mfgadmin 295 printWoTraveler/_pickList/checked 2 mfgadmin 297 printWoTraveler/_packingList/checked 2 mfgadmin 391 customerFormAssignments/_custform/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| mfgadmin 264 dspFinancialReport/_showzeros/checked 2 mfgadmin 392 dspBankrecHistory/_details/columnsShown 0,on|1,on|2,on| mfgadmin 393 dspUnbalancedQOHByClassCode/_itemsite/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 309 postProduction/_closeWo/checked 2 mfgadmin 313 dspWoScheduleByParameterList/_autoUpdate/checked 2 mfgadmin 394 incidentWorkbench/_statusFeedback/checked 2 mfgadmin 395 incidentWorkbench/_statusConfirmed/checked 2 mfgadmin 396 incidentWorkbench/_statusNew/checked 2 mfgadmin 397 incidentWorkbench/_statusResolved/checked 2 mfgadmin 398 incidentWorkbench/_statusClosed/checked 2 mfgadmin 399 incidentWorkbench/_statusAssigned/checked 2 mfgadmin 400 incidentWorkbench/_incdt/columnsShown 0,on|1,on|2,on|3,on|4,on| mfgadmin 401 incidentWorkbench/_autoUpdate/checked 2 mfgadmin 402 projects/_prj/columnsShown 0,on|1,on|2,on| mfgadmin 403 dspSummarizedTaxableSales/_invchead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| mfgadmin 404 currencies/_curr/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 405 XCheckBox/forgetful f mfgadmin 406 ShowIMMenu t admin 407 ShowPDMenu t admin 408 ShowMSMenu t admin 409 ShowCPMenu t admin 410 ShowWOMenu t admin 411 ShowPOMenu t admin 412 ShowSOMenu t admin 413 ShowSRMenu t admin 414 ShowSAMenu t admin 415 ShowGLMenu t admin 416 UseCustCache f admin 417 ShowAPMenu t admin 418 ShowARMenu t admin 419 ShowPDToolbar t admin 420 ShowMSToolbar t admin 421 ShowCPToolbar t admin 422 ShowWOToolbar t admin 423 ShowSOToolbar t admin 424 ShowSRToolbar t admin 425 UsedFixedWidthFonts f admin 426 ShowIMToolbar t admin 427 ShowSAToolbar t admin 428 ShowPOToolbar t admin 429 ShowGLToolbar t admin 430 ToolbarPositions \n\n\nI/M Tools,P/D Tools,W/O Tools,P/O Tools,S/O Tools,\n[I/M Tools,0,0,-1,-1,1][P/D Tools,0,0,-1,-1,1][W/O Tools,0,0,-1,-1,1][P/O Tools,0,0,-1,-1,1][S/O Tools,0,0,-1,-1,1]\n\n\n\n\n\n\n admin 431 ShowPMMenu t admin 432 ShowPMToolbar t admin 433 ShowAPToolbar t admin 434 ShowARToolbar t admin 436 UseItemCache f admin 437 ShowRIWorkOrdersByDefault f admin 438 ListNumericItemNumbersFirst f admin 439 ShowSOItemAvailability t admin 441 DefaultEllipsesAction list admin 442 ShowCRMMenu t admin 443 ShowCRMToolbar t admin 445 BackgroundImageid 23 admin 446 vendor/_taxreg/columnsShown 0,on|1,on| admin 449 F3 wo.dspWoScheduleByClassCode admin 450 F1 pd.itemAvailabilityWorkbench admin 451 F4 ar.arWorkBench admin 452 F5 gl.viewFinancialReport admin 453 reports/_report/columnsShown 0,on|1,on|2,on| admin 454 warehouse/_whsezone/columnsShown 0,on|1,on| admin 455 _commentsTab/_comment/columnsShown 0,on|1,on|2,on|3,on| admin 457 configureSO/_invoiceWatermarks/columnsShown 0,on|1,on|2,on| admin 458 configureSO/_creditMemoWatermarks/columnsShown 0,on|1,on|2,on| admin 460 printWoTraveler/_releaseWo/checked 2 admin 461 /_user/columnsShown 0,on|1,on| admin 462 users/_usr/columnsShown 0,on|1,on|2,on| admin 463 UseOldMenu f admin 464 boo/_booitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 465 TabPage/_comment/columnsShown 0,on|1,on|2,on|3,on| admin 466 dspWoScheduleByParameterList/_wo/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on| admin 467 project/_prjtask/columnsShown 0,on|1,on|2,on| admin 468 cashReceipt/_cc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 447 vendor/_vendaddr/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 435 PreferredWarehouse 35 admin 470 cashReceipt/_cashrcptmisc/columnsShown 0,on|1,on|2,on| admin 471 salesOrder/_cc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 472 /_wo/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 473 eventManager/_event/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 476 comment/_comment/columnsShown 0,on|1,on|2,on|3,on| admin 477 opportunity/_charass/columnsShown 0,on|1,on|2,on| admin 478 opportunity/_todoList/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 479 opportunitySources/_oplist/columnsShown 0,on|1,on| admin 480 opportunityStages/_oplist/columnsShown 0,on|1,on| admin 481 opportunityTypes/_oplist/columnsShown 0,on|1,on| admin 486 transferOrderItem/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 487 itemSite/_restricted/columnsShown 0,on|1,on|2,on| admin 488 commentsTab/_comment/columnsShown 0,on|1,on|2,on|3,on| admin 489 taxSelections/_taxsel/columnsShown 0,on|1,on|2,on| admin 490 transferOrder/_toitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| admin 491 shipOrder/_coitem/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 492 /_to/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1045 unpostedInvoices/_printJournal/checked 0 admin 497 voucher/_miscDistrib/columnsShown 0,on|1,on| admin 498 openVouchers/_vohead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 499 selectPayments/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| admin 501 vendors/_vendor/columnsShown 0,on|1,on|2,on| admin 502 woTimeClock/_wooperList/columnsShown 0,on|1,on|2,on| admin 504 financialLayouts/_flhead/columnsShown 0,on|1,on|2,on|3,on| admin 510 dspInvoiceInformation/_arapply/columnsShown 0,on|1,on|2,on|3,on| admin 511 dspCustomerInformation/_payments/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 512 dspCustomerInformation/_creditMemo/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 513 dspCustomerInformation/_order/columnsShown 0,on|1,on|2,on|3,on| admin 514 dspCustomerInformation/_quote/columnsShown 0,on|1,on|2,on| admin 515 comments/_comment/columnsShown 0,on|1,on|2,on|3,on| admin 516 dspCustomerInformation/_arhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 517 dspCustomerInformation/_invoice/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 521 user/_available/columnsShown 0,on| admin 522 workOrderMaterials/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 523 user/_granted/columnsShown 0,on| admin 524 dspTrialBalances/_trialbal/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| admin 525 configureIM/_shipformWatermarks/columnsShown 0,on|1,on|2,on| admin 526 fixSerial/_serial/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 527 calendars/_calhead/columnsShown 0,on|1,on| admin 1361 dspVoucherRegister/_showUsername/checked 0 admin 529 standardJournal/_stdjrnlitem/columnsShown 0,on|1,on|2,on|3,on| admin 530 glSeries/_glseries/columnsShown 0,on|1,on|2,on| admin 531 dspFinancialReport/_periods/columnsShown 0,on|1,on| admin 547 accountingPeriods/_period/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 549 dspWoMaterialsByWorkOrder/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 550 standardJournals/_stdjrnl/columnsShown 0,on|1,on| admin 551 salesOrderItem/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 553 createPlannedOrdersByPlannerCode/_deleteFirmed/checked 0 admin 554 dspRunningAvailability/_showPlanned/checked 2 admin 555 dspRunningAvailability/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 556 /_project/columnsShown 0,on|1,on| admin 557 workOrder/_printTraveler/checked 0 admin 561 unpostedPurchaseOrders/_allOpenOrders/checked 0 admin 562 quotes/_showProspects/checked 0 admin 563 shippingForms/_bolformat/columnsShown 0,on| admin 548 /_accnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,off|7,off| admin 505 arWorkBench/_cashrcpt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 494 dspQOHByItem/_qoh/columnsShown 0,on|1,on|2,on|3,on|4,on|5,off|6,off|7,off|8,off| admin 564 distributeInventory/_itemloc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 566 shipOrder/_receive/checked 2 admin 567 issueToShipping/_requireInventory/checked 0 admin 493 transferOrders/_to/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 500 openSalesOrders/_so/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,off| admin 509 invoice/_invcitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| admin 568 issueToShipping/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 569 enterPoReceipt/_singleLot/checked 0 admin 571 /_pohead/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 572 openVouchers/_printJournal/checked 0 admin 474 quotes/_quote/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 565 shipOrder/_print/checked 0 admin 533 dspFinancialReport/_showBegBalPrcnt/checked 0 admin 534 dspFinancialReport/_showDebits/checked 0 admin 535 dspFinancialReport/_showDebitsPrcnt/checked 0 admin 536 dspFinancialReport/_showCredits/checked 0 admin 537 dspFinancialReport/_showCreditsPrcnt/checked 0 admin 538 dspFinancialReport/_showEndBal/checked 0 admin 539 dspFinancialReport/_showEndBalPrcnt/checked 0 admin 540 dspFinancialReport/_showBudget/checked 0 admin 541 dspFinancialReport/_showBudgetPrcnt/checked 0 admin 542 dspFinancialReport/_showDiff/checked 0 admin 543 dspFinancialReport/_showDiffPrcnt/checked 0 admin 544 dspFinancialReport/_showCustom/checked 0 admin 545 dspFinancialReport/_showCustomPrcnt/checked 0 admin 532 dspFinancialReport/_showBegBal/checked 0 admin 573 postProduction/_nonPickItems/checked 0 admin 575 viewCheckRun/_check/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 576 reconcileBankaccount/_receipts/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 577 reconcileBankaccount/_checks/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 578 postOperations/_womatl/columnsShown 0,on|1,on|2,on|3,on| admin 579 closeWo/_postComment/checked 0 admin 580 postProduction/_immediateTransfer/checked 0 admin 581 printWoTraveler/_routing/checked 2 admin 582 dspWoScheduleByParameterList/_showOnlyRI/checked 0 admin 583 printWoTraveler/_woLabel/checked 0 admin 584 item/_file/columnsShown 0,on|1,on| admin 585 item/_itemimage/columnsShown 0,on|1,on|2,on| admin 586 item/_itemtrans/columnsShown 0,on|1,on| admin 587 item/_itemsub/columnsShown 0,on|1,on|2,on|3,on| admin 588 item/_itemalias/columnsShown 0,on|1,on| admin 589 item/_itemtax/columnsShown 0,on|1,on| admin 592 item/_uomconv/columnsShown 0,on|1,on|2,on|3,on| admin 593 booItem/_booimage/columnsShown 0,on|1,on|2,on| admin 594 booitemImage/_image/columnsShown 0,on|1,on| admin 595 images/_image/columnsShown 0,on|1,on|2,on| admin 596 workCenters/_wrkcnt/columnsShown 0,on|1,on|2,on| admin 597 bomItem/_bomitemsub/columnsShown 0,on|1,on|2,on|3,on| admin 601 eventManager/_showAcknowledged/checked 0 admin 602 eventManager/_autoUpdate/checked 0 admin 603 /_so/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 604 selectOrderForBilling/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 606 printInvoice/_invoiceWatermarks/columnsShown 0,on|1,on|2,on| admin 607 uninvoicedShipments/_showUnselected/checked 0 admin 608 uninvoicedShipments/_coship/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 609 salesAccounts/_salesaccnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 610 _commentsPage/_comment/columnsShown 0,on|1,on|2,on|3,on| admin 612 priceList/_price/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 613 unpostedCreditMemos/_cmhead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 614 applyARCreditMemo/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 615 _open/_receipts/checked 2 admin 616 _open/_shipments/checked 2 admin 617 _open/_payment/checked 2 admin 619 returnAuthorizationWorkbench/_ra/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 620 _dueCredit/_postmemos/checked 0 admin 621 returnAuthorizationWorkbench/_radue/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 622 _dueCredit/_check/checked 2 admin 624 dspARApplications/_cashReceipts/checked 0 admin 625 dspARApplications/_creditMemos/checked 2 admin 626 dspARApplications/_arapply/columnsShown 0,on|1,on|2,on|3,off|4,on|5,on|6,off|7,on|8,on|9,on| admin 627 openReturnAuthorizations/_ra/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 629 items/_showInactive/checked 0 admin 1362 dspVoucherRegister/_gltrans/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off| admin 631 dspPendingAvailability/_showShortages/checked 0 admin 632 dspPendingAvailability/_items/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 633 dspInventoryAvailabilityByParameterList/_showReorder/checked 0 admin 634 dspInventoryAvailabilityByParameterList/_ignoreReorderAtZero/checked 0 admin 637 bankAccounts/_bankaccnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 638 unappliedARCreditMemos/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 640 items/_item/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 641 booItemList/_booitem/columnsShown 0,on|1,on| admin 642 workOrderOperations/_wooper/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 646 dspJobCosting/_showsu/checked 2 admin 647 dspJobCosting/_showrt/checked 2 admin 648 dspJobCosting/_showmatl/checked 2 admin 649 dspJobCosting/_cost/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 650 booList/_showInactive/checked 0 admin 651 booList/_boo/columnsShown 0,on|1,on| admin 652 classCodes/_classcode/columnsShown 0,on|1,on| admin 653 configureIE/_map/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 654 plannedSchedule/_list/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 655 plannedSchedules/_list/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 590 item/_itemSite/columnsShown 0,on|1,on|2,on|3,on| admin 591 item/_charass/columnsShown 0,on|1,on|2,on|3,off| admin 656 userPreferences/_event/columnsShown 0,on|1,on|2,on| admin 657 userPreferences/_warehouses/columnsShown 0,on|1,on|2,on| admin 658 userPreferences/_hotkey/columnsShown 0,on|1,on|2,on| admin 659 _dueCredit/_printmemo/checked 2 admin 660 _dueCredit/_creditmemo/checked 2 admin 662 openSalesOrders/_autoUpdate/checked 2 admin 663 dspOperationsByWorkCenter/_booitem/columnsShown 0,on|1,on|2,on|3,on| admin 574 postChecks/_printJournal/checked 0 admin 623 uoms/_uoms/columnsShown 0,on|1,on|2,on| admin 664 dspStandardOperationsByWorkCenter/_stdopn/columnsShown 0,on|1,on| admin 665 dspInventoryAvailabilityByWorkOrder/_onlyShowShortages/checked 0 admin 666 dspInventoryAvailabilityByWorkOrder/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| admin 669 customerFormAssignments/_custform/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 644 postProduction/_closeWo/checked 0 admin 671 dspBankrecHistory/_details/columnsShown 0,on|1,on|2,on| admin 672 dspUnbalancedQOHByClassCode/_itemsite/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 673 dspWoScheduleByParameterList/_autoUpdate/checked 2 admin 674 incidentWorkbench/_statusFeedback/checked 2 admin 675 incidentWorkbench/_statusConfirmed/checked 2 admin 676 incidentWorkbench/_statusNew/checked 2 admin 677 incidentWorkbench/_statusResolved/checked 2 admin 678 incidentWorkbench/_statusClosed/checked 2 admin 679 incidentWorkbench/_statusAssigned/checked 2 admin 681 incidentWorkbench/_autoUpdate/checked 2 admin 682 projects/_prj/columnsShown 0,on|1,on|2,on| admin 684 dspSummarizedTaxableSales/_invchead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 685 currencies/_curr/columnsShown 0,on|1,on|2,on|3,on| admin 686 XCheckBox/forgetful f admin 687 user/_available/columnsShown 0,on| jsmith 688 user/_granted/columnsShown 0,on| jsmith 689 users/_usr/columnsShown 0,on|1,on|2,on| jsmith 846 voucherItem/_uninvoiced/columnsShown 0,on|1,on|2,on|3,on| jsmith 691 cashReceipt/_cc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 692 cashReceipt/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 693 cashReceipt/_cashrcptmisc/columnsShown 0,on|1,on|2,on| jsmith 890 accountingYearPeriods/_period/columnsShown 0,on|1,on|2,on| mfgadmin 696 userPreferences/_hotkey/columnsShown 0,on|1,on|2,on| jsmith 697 userPreferences/_event/columnsShown 0,on|1,on|2,on| jsmith 698 userPreferences/_warehouses/columnsShown 0,on|1,on|2,on| jsmith 643 postProduction/_backflushOperations/checked 2 admin 699 fixSerial/_serial/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 700 currencies/_curr/columnsShown 0,on|1,on|2,on|3,on| jsmith 701 currencyConversions/_conversionRates/columnsShown 0,on|1,on|2,on|3,on| jsmith 702 warehouse/_whsezone/columnsShown 0,on|1,on| jsmith 703 _commentsTab/_comment/columnsShown 0,on|1,on|2,on|3,on| jsmith 704 configureIM/_shipformWatermarks/columnsShown 0,on|1,on|2,on| jsmith 706 hotkey/_action/columnsShown 0,on|1,on| jsmith 707 item/_uomconv/columnsShown 0,on|1,on|2,on|3,on| jsmith 710 item/_itemtax/columnsShown 0,on|1,on| jsmith 711 commentsTab/_comment/columnsShown 0,on|1,on|2,on|3,on| jsmith 712 item/_itemalias/columnsShown 0,on|1,on| jsmith 713 item/_itemsub/columnsShown 0,on|1,on|2,on|3,on| jsmith 714 item/_itemtrans/columnsShown 0,on|1,on| jsmith 715 item/_itemimage/columnsShown 0,on|1,on|2,on| jsmith 716 item/_file/columnsShown 0,on|1,on| jsmith 717 itemSite/_restricted/columnsShown 0,on|1,on|2,on| jsmith 719 costCategories/_costcat/columnsShown 0,on|1,on| jsmith 720 dspItemSitesByParameterList/_showInactive/checked 0 jsmith 721 dspItemSitesByParameterList/_itemsite/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 722 maintainItemCosts/_itemcost/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 723 items/_showInactive/checked 0 jsmith 724 items/_item/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 725 itemSites/_itemSite/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 726 createPlannedOrdersByPlannerCode/_deleteFirmed/checked 0 jsmith 727 TabPage/_comment/columnsShown 0,on|1,on|2,on|3,on| jsmith 728 workOrder/_printTraveler/checked 0 jsmith 730 financialLayout/_layouts/columnsShown 0,on|1,on| jsmith 847 voucherItem/_vodist/columnsShown 0,on|1,on| jsmith 848 reconcileBankaccount/_receipts/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 735 itemSource/_itemsrcp/columnsShown 0,on|1,on|2,on|3,on| jsmith 849 reconcileBankaccount/_checks/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 739 enterPoReceipt/_singleLot/checked 0 jsmith 743 /_pohead/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 744 voucher/_miscDistrib/columnsShown 0,on|1,on| jsmith 746 openVouchers/_vohead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 747 openVouchers/_printJournal/checked 0 jsmith 748 selectPayments/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| jsmith 749 viewCheckRun/_check/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 750 closeWo/_postComment/checked 0 jsmith 751 postProduction/_backflush/checked 2 jsmith 752 postProduction/_nonPickItems/checked 0 jsmith 755 postProduction/_immediateTransfer/checked 0 jsmith 756 dspInventoryAvailabilityByWorkOrder/_onlyShowShortages/checked 0 jsmith 757 dspInventoryAvailabilityByWorkOrder/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 759 distributeInventory/_taggedOnly/checked 0 jsmith 760 distributeInventory/_itemloc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 761 dspWoScheduleByParameterList/_showOnlyRI/checked 0 jsmith 762 dspWoScheduleByParameterList/_showOnlyTopLevel/checked 0 jsmith 763 dspWoScheduleByParameterList/_wo/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on| jsmith 734 /_item/columnsShown 0,on|1,on|2,on| jsmith 667 printWoTraveler/_pickList/checked 2 admin 764 dspWoScheduleByParameterList/_autoUpdate/checked 0 jsmith 765 dspFinancialReport/_periods/columnsShown 0,on|1,on| jsmith 766 dspFinancialReport/_showBegBal/checked 0 jsmith 767 dspFinancialReport/_showBegBalPrcnt/checked 0 jsmith 768 dspFinancialReport/_showDebits/checked 0 jsmith 769 dspFinancialReport/_showDebitsPrcnt/checked 0 jsmith 770 dspFinancialReport/_showCredits/checked 0 jsmith 645 shipOrder/_create/checked 2 admin 670 dspFinancialReport/_showzeros/checked 2 admin 771 dspFinancialReport/_showCreditsPrcnt/checked 0 jsmith 772 dspFinancialReport/_showEndBal/checked 0 jsmith 773 dspFinancialReport/_showEndBalPrcnt/checked 0 jsmith 774 dspFinancialReport/_showBudget/checked 0 jsmith 775 dspFinancialReport/_showBudgetPrcnt/checked 0 jsmith 776 dspFinancialReport/_showDiff/checked 0 jsmith 777 dspFinancialReport/_showDiffPrcnt/checked 0 jsmith 778 dspFinancialReport/_showCustom/checked 0 jsmith 779 dspFinancialReport/_showCustomPrcnt/checked 0 jsmith 850 postOperations/_womatl/columnsShown 0,on|1,on|2,on|3,on| jsmith 783 quotes/_showProspects/checked 0 jsmith 851 /_wo/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1605 customers/_autoupdate/checked 0 admin 785 salesOrderItem/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 787 eventManager/_event/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 789 salesOrder/_cc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 790 _commentsPage/_comment/columnsShown 0,on|1,on|2,on|3,on| jsmith 792 reports/_report/columnsShown 0,on|1,on|2,on| jsmith 1363 apOpenItem/_apapply/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 794 openSalesOrders/_autoUpdate/checked 0 jsmith 795 forms/_form/columnsShown 0,on|1,on| jsmith 796 printWoTraveler/_releaseWo/checked 0 jsmith 800 printWoTraveler/_woLabel/checked 0 jsmith 801 /_so/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 802 printInvoice/_invoiceWatermarks/columnsShown 0,on|1,on|2,on| jsmith 806 shipOrder/_coitem/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 807 issueToShipping/_requireInventory/checked 0 jsmith 808 issueToShipping/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 852 bomList/_showInactive/checked 0 jsmith 809 printShippingForm/_shipformWatermarks/columnsShown 0,on|1,on|2,on| jsmith 810 dspSalesOrderStatus/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 853 bomList/_bom/columnsShown 0,on|1,on| jsmith 854 booList/_showInactive/checked 0 jsmith 811 dspSalesOrdersByCustomer/_so/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 812 customerFormAssignments/_custform/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 855 booList/_boo/columnsShown 0,on|1,on| jsmith 1364 dspCheckRegister/_showDetail/checked 0 admin 817 standardJournal/_stdjrnlitem/columnsShown 0,on|1,on|2,on|3,on| jsmith 818 glSeries/_glseries/columnsShown 0,on|1,on|2,on| jsmith 819 standardJournals/_stdjrnl/columnsShown 0,on|1,on| jsmith 820 accountingYearPeriods/_period/columnsShown 0,on|1,on|2,on| jsmith 821 accountingPeriods/_period/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 891 unpostedInvoices/_printJournal/checked 0 mfgadmin 823 dspRunningAvailability/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 892 dspQOHByParameterList/_showValue/checked 0 mfgadmin 893 dspQOHByParameterList/_qoh/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off|11,off| mfgadmin 824 plannedSchedule/_list/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 825 plannedSchedules/_list/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 859 itemAvailabilityWorkbench/_whereused/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 826 financialLayouts/_flhead/columnsShown 0,on|1,on|2,on|3,on| jsmith 827 salesAccounts/_salesaccnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 861 itemAvailabilityWorkbench/_invhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 828 returnAuthorization/_raitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on|15,on|16,on|17,on|18,on| jsmith 862 itemAvailabilityWorkbench/_bomitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 829 openReturnAuthorizations/_ra/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 830 openReturnAuthorizations/_expired/checked 0 jsmith 863 inventory/_showReorder/checked 0 jsmith 864 inventory/_ignoreReorderAtZero/checked 0 jsmith 832 dspUnbalancedQOHByClassCode/_itemsite/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 865 inventory/_showShortages/checked 0 jsmith 894 distributeInventory/_taggedOnly/checked 0 mfgadmin 833 _dueCredit/_postmemos/checked 0 jsmith 834 _dueCredit/_printmemo/checked 0 jsmith 835 returnAuthorizationWorkbench/_radue/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 836 _dueCredit/_creditmemo/checked 2 jsmith 837 _dueCredit/_check/checked 2 jsmith 839 _open/_receipts/checked 2 jsmith 840 _open/_shipments/checked 2 jsmith 841 _open/_payment/checked 2 jsmith 1058 SoShowAll t admin 843 returnAuthorizationWorkbench/_ra/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 844 dspItemSitesByItem/_showInactive/checked 0 jsmith 845 dspItemSitesByItem/_itemsite/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 308 postProduction/_backflushOperations/checked 2 mfgadmin 866 itemAvailabilityWorkbench/_invAvailability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 875 incidentWorkbench/_incdt/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 876 incidentWorkbench/_autoUpdate/checked 0 jsmith 877 todoList/_active/checked 0 jsmith 838 _dueCredit/_creditcard/checked 0 jsmith 879 todoList/_incidents/checked 0 jsmith 881 todoList/_autoUpdate/checked 0 jsmith 882 projects/_prj/columnsShown 0,on|1,on|2,on| jsmith 883 crmaccounts/_crmaccount/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 884 uninvoicedShipments/_showUnselected/checked 0 jsmith 885 uninvoicedShipments/_coship/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 886 dspBillingSelections/_cobill/columnsShown 0,on|1,on|2,on|3,on| jsmith 887 dspSummarizedBacklogByWarehouse/_showPrices/checked 0 jsmith 888 dspSummarizedBacklogByWarehouse/_so/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,off|7,off|8,off| jsmith 889 dspTrialBalances/_trialbal/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| jsmith 895 assignLotSerial/_itemlocdist/columnsShown 0,on|1,on|2,on| mfgadmin 281 shipOrder/_create/checked 2 mfgadmin 184 virtualList/_listTab/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| mfgadmin 896 voucherItem/_uninvoiced/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 897 voucherItem/_vodist/columnsShown 0,on|1,on| mfgadmin 265 dspFinancialReport/_layout/columnsShown 0,on|1,on|2,on|3,on| mfgadmin 898 user/_availableGroup/columnsShown 0,on| admin 899 user/_grantedGroup/columnsShown 0,on| admin 900 group/_available/columnsShown 0,on| admin 901 group/_granted/columnsShown 0,on| admin 111 DisableExportContents f mfgadmin 112 UseEnhancedAuthentication f mfgadmin 902 groups/_list/columnsShown 0,on|1,on| admin 903 XCheckBox/forgetful f jsmith 905 locales/_locale/columnsShown 0,on|1,on| jsmith 906 employee/_groups/columnsShown 0,on|1,on| jsmith 907 employee/_charass/columnsShown 0,on|1,on| jsmith 1365 dspCheckRegister/_check/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 909 dspInventoryAvailabilityByParameterList/_showReorder/checked 0 jsmith 910 dspInventoryAvailabilityByParameterList/_ignoreReorderAtZero/checked 0 jsmith 911 dspInventoryAvailabilityByParameterList/_showShortages/checked 0 jsmith 913 dspBacklogByParameterList/_showPrices/checked 0 jsmith 914 dspBacklogByParameterList/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,off| jsmith 915 scripts/_script/columnsShown 0,on|1,on|2,on|3,on| jsmith 916 dspGLTransactions/_showUsername/checked 0 jsmith 918 /_shipto/columnsShown 0,on|1,on|2,on|3,on| jsmith 920 selectOrderForBilling/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 921 postBillingSelections/_consolidate/checked 0 jsmith 922 billingEditList/_cobill/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 924 unpostedInvoices/_printJournal/checked 0 jsmith 926 lotSerial/_charass/columnsShown 0,on|1,on| jsmith 927 lotSerial/_reg/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 925 dspDetailedInventoryHistoryByLotSerial/_invhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 928 invoice/_invcitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 929 dspTimePhasedSalesByCustomer//columnsShown 0,on|1,on| jsmith 930 dspTimePhasedSalesByCustomer/_sohist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on| jsmith 788 eventManager/_autoUpdate/checked 2 jsmith 758 assignLotSerial/_itemlocdist/columnsShown 0,on|1,on|2,on|3,on| jsmith 931 reassignLotSerial/_source/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 831 dspInventoryLocator/_itemloc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 932 dspInventoryAvailabilityByItem/_showReorder/checked 0 jsmith 933 dspInventoryAvailabilityByItem/_ignoreReorderAtZero/checked 0 jsmith 934 dspInventoryAvailabilityByItem/_showShortages/checked 0 jsmith 935 dspInventoryAvailabilityByItem/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 936 dspExpiredInventoryByClassCode/_expired/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,off|7,off| jsmith 745 voucher/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on| jsmith 938 dspTimePhasedOpenAPItems/_custom/checked 0 jsmith 939 dspTimePhasedOpenAPItems//columnsShown 0,on|1,on| jsmith 940 dspTimePhasedOpenAPItems/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 941 characteristics/_char/columnsShown 0,on|1,on| jsmith 942 boo/_booitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 943 bomItem/_bomitemsub/columnsShown 0,on|1,on|2,on|3,on| jsmith 944 booItemList/_booitem/columnsShown 0,on|1,on| jsmith 946 classCodes/_classcode/columnsShown 0,on|1,on| jsmith 947 dspItemsByClassCode/_showInactive/checked 0 jsmith 948 dspItemsByClassCode/_item/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 949 productCategories/_prodcat/columnsShown 0,on|1,on| jsmith 951 vendor/_taxreg/columnsShown 0,on|1,on| jsmith 952 vendors/_vendor/columnsShown 0,on|1,on|2,on| jsmith 953 dspInventoryHistoryByItem/_invhist/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| jsmith 954 dspUninvoicedReceivings/_porecv/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 955 expenseCategories/_expcat/columnsShown 0,on|1,on| jsmith 937 APAgingDefaultDate doc jsmith 919 _availabilityTab/_showIndented/checked 2 jsmith 797 printWoTraveler/_pickList/checked 2 jsmith 957 dspShipmentsBySalesOrder/_soship/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 960 priceList/_price/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 961 shippingInformation/_item/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 962 maintainShipping/_ship/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 963 address/_uses/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 964 address/_charass/columnsShown 0,on|1,on| jsmith 965 _tabComments/_comment/columnsShown 0,on|1,on|2,on|3,on| jsmith 966 addresses/_address/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 967 quotes/_showExpired/checked 0 jsmith 784 quotes/_quote/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 968 tabComments/_comment/columnsShown 0,on|1,on|2,on|3,on| jsmith 969 customer/_charass/columnsShown 0,on|1,on| jsmith 970 customer/_shipto/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 971 customer/_taxreg/columnsShown 0,on|1,on| jsmith 972 customer/_cc/columnsShown 0,on|1,on|2,on|3,on| jsmith 973 customers/_cust/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 974 crmaccount/_reg/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 975 crmaccount/_oplist/columnsShown 0,on|1,on|2,on|3,on|4,off|5,off|6,off|7,off|8,off|9,on|10,off| jsmith 976 _todoIncdtTab/_completedTodoIncdt/checked 0 jsmith 977 _todoIncdtTab/_showIncdt/checked 0 jsmith 978 _todoIncdtTab/_showTodo/checked 0 jsmith 979 _todoIncdtTab/_activeTodoIncdt/checked 0 jsmith 980 crmaccount/_todo/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 981 _todoIncdtTab/_autoUpdateTodo/checked 0 jsmith 1608 dspGLTransactions/_autoupdate/checked 0 admin 982 crmaccount/_charass/columnsShown 0,on|1,on| jsmith 984 dspCustomerInformation/_payments/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 986 _creditMemosTab/_creditMemoShowclosed/checked 0 jsmith 987 dspCustomerInformation/_creditMemo/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 988 _invoicesTab/_invoiceShowclosed/checked 0 jsmith 989 dspCustomerInformation/_invoice/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 990 _salesOrdersTab/_orderShowclosed/checked 0 jsmith 991 dspCustomerInformation/_order/columnsShown 0,on|1,on|2,on|3,on| jsmith 992 dspCustomerInformation/_quote/columnsShown 0,on|1,on|2,on| jsmith 993 configureSO/_invoiceWatermarks/columnsShown 0,on|1,on|2,on| jsmith 994 configureSO/_creditMemoWatermarks/columnsShown 0,on|1,on|2,on| jsmith 995 customCommand/_arguments/columnsShown 0,on|1,on| jsmith 996 uiform/_script/columnsShown 0,on|1,on|2,on|3,on| jsmith 997 uiform/_commands/columnsShown 0,on|1,on| jsmith 998 group/_available/columnsShown 0,on| jsmith 999 group/_granted/columnsShown 0,on| jsmith 1000 groups/_list/columnsShown 0,on|1,on| jsmith 1001 uiforms/_uiform/columnsShown 0,on|1,on|2,on|3,on| jsmith 1002 /_list/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 958 dspQOHByParameterList/_showValue/checked 2 jsmith 1005 postMiscProduction/_nonPickItems/checked 0 jsmith 1006 postMiscProduction/_immediateTransfer/checked 0 jsmith 1008 relocateInventory/_source/columnsShown 0,on|1,on|2,on| jsmith 1009 relocateInventory/_target/columnsShown 0,on|1,on| jsmith 1004 postMiscProduction/_backflush/checked 2 jsmith 860 itemAvailabilityWorkbench/_itemloc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 868 itemAvailabilityWorkbench/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 1010 dspPendingAvailability/_showShortages/checked 0 jsmith 1011 dspPendingAvailability/_items/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 1013 closePurchaseOrder/_po/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1014 checkFormats/_form/columnsShown 0,on|1,on| jsmith 1015 dspAROpenItemsByCustomer/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 1016 dspTimePhasedOpenARItems/_custom/checked 0 jsmith 1017 dspTimePhasedOpenARItems//columnsShown 0,on|1,on| jsmith 1018 dspTimePhasedOpenARItems/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 1019 applyARCreditMemo/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 1020 unappliedARCreditMemos/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 1021 taxCodes/_tax/columnsShown 0,on|1,on| jsmith 1022 dspWoScheduleByWorkOrder/_showOnlyRI/checked 0 jsmith 1023 dspWoScheduleByWorkOrder/_showOnlyTopLevel/checked 0 jsmith 1024 dspWoScheduleByWorkOrder/_wo/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 1025 dspWoScheduleByWorkOrder/_autoUpdate/checked 0 jsmith 737 unpostedPurchaseOrders/_allOpenOrders/checked 0 jsmith 1026 distributeBreederProduction/_distrib/columnsShown 0,on|1,on|2,on|3,on| jsmith 780 dspFinancialReport/_shownumbers/checked 2 jsmith 1027 plannerCodes/_plancode/columnsShown 0,on|1,on| jsmith 867 running/_showPlanned/checked 2 jsmith 1028 lotSerialRegistration/_charass/columnsShown 0,on|1,on| jsmith 1029 dspCostedIndentedBOM/_bomitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 869 incidentWorkbench/_statusFeedback/checked 2 jsmith 870 incidentWorkbench/_statusConfirmed/checked 2 jsmith 871 incidentWorkbench/_statusNew/checked 2 jsmith 872 incidentWorkbench/_statusResolved/checked 2 jsmith 873 incidentWorkbench/_statusClosed/checked 2 jsmith 874 incidentWorkbench/_statusAssigned/checked 2 jsmith 1030 user/_availableGroup/columnsShown 0,on| jsmith 1031 user/_grantedGroup/columnsShown 0,on| jsmith 1032 _availabilityTab/_showIndented/checked 0 admin 1034 user/_availableSite/columnsShown 0,on| admin 1035 user/_grantedSite/columnsShown 0,on| admin 1036 employee/_groups/columnsShown 0,on|1,on| admin 983 crmaccount/_contacts/columnsShown 0,on|1,on|2,off|3,off|4,on|5,on|6,on|7,on|8,on| jsmith 731 financialLayout/_layout/columnsShown 0,on|1,on|2,on| jsmith 546 dspFinancialReport/_shownumbers/checked 2 admin 1037 employee/_charass/columnsShown 0,on|1,on| admin 1038 employees/_emp/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1039 currencyConversions/_conversionRates/columnsShown 0,on|1,on|2,on|3,on| admin 1040 dspEarnedCommissions/_commission/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| admin 1012 distributeInventory/_qtyOnly/checked 0 jsmith 485 unpostedPoReceipts/_recv/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on| admin 1041 distributeInventory/_qtyOnly/checked 0 admin 469 cashReceipt/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| admin 1042 distributeInventory/_taggedOnly/checked 0 admin 1043 voucherItem/_uninvoiced/columnsShown 0,on|1,on|2,on|3,on| admin 1044 voucherItem/_vodist/columnsShown 0,on|1,on| admin 496 voucher/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on| admin 1047 miscVoucher/_miscDistrib/columnsShown 0,on|1,on| jsmith 1048 dspGLSeries/_gltrans/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 709 item/_itemSite/columnsShown 0,on|1,on|2,on|3,on| jsmith 1049 woTimeClock/_wooperList/columnsShown 0,on|1,on|2,on| jsmith 1050 packingListBatch/_pack/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 1051 packingListBatch/_autoUpdate/checked 0 jsmith 741 unpostedPoReceipts/_recv/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on| jsmith 1052 dspWoMaterialsByWorkOrder/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 822 dspRunningAvailability/_showPlanned/checked 2 jsmith 985 dspCustomerInformation/_arhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 1053 supplyTab/_showAvailability/checked 2 jsmith 1054 page_2/_showIndented/checked 2 jsmith 798 printWoTraveler/_routing/checked 2 jsmith 799 printWoTraveler/_packingList/checked 2 jsmith 753 postProduction/_backflushOperations/checked 2 jsmith 803 shipOrder/_create/checked 2 jsmith 1056 taxCodes/_tax/columnsShown 0,on|1,on| admin 1057 dspAllocations/_allocations/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 483 unpostedPurchaseOrders/_pohead/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1059 supplyTab/_showAvailability/checked 2 admin 1060 page_2/_showIndented/checked 0 admin 1061 user/_availableSite/columnsShown 0,on| jsmith 1062 user/_grantedSite/columnsShown 0,on| jsmith 1063 departments/_deptList/columnsShown 0,on|1,on| jsmith 1064 shifts/_shiftList/columnsShown 0,on|1,on| jsmith 1366 dspVendorAPHistory/_vendhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 1066 images/_image/columnsShown 0,on|1,on|2,on|3,off| jsmith 1067 profitCenters/_prftcntr/columnsShown 0,on|1,on| jsmith 1068 subaccounts/_subaccnt/columnsShown 0,on|1,on| jsmith 1069 companies/_company/columnsShown 0,on|1,on| jsmith 1070 subAccntTypes/_subaccnttypes/columnsShown 0,on|1,on|2,on| jsmith 1071 accountNumbers/_showExternal/checked 0 jsmith 1072 incidentCategories/_incidentCategories/columnsShown 0,on|1,on|2,on| jsmith 1073 calendar/_calitem/columnsShown 0,on|1,on|2,on| jsmith 1074 calendars/_calhead/columnsShown 0,on|1,on| jsmith 1075 honorifics/_honorifics/columnsShown 0,on| jsmith 705 warehouses/_warehouse/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1076 siteTypes/_sitetype/columnsShown 0,on|1,on| jsmith 1077 imageList/_image/columnsShown 0,on|1,on| jsmith 1078 EmailEvents f jsmith 1080 AlarmEmailDefault f jsmith 904 IngoreMissingTranslationFiles t jsmith 1082 IngoreMissingTranslationFiles t admin 1083 EmailEvents f admin 1084 AlarmEventDefault f admin 484 enterPoReceipt/_orderitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on| admin 506 arWorkBench/_aropenCM/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 558 dspPlannedOrdersByPlannerCode/_planord/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 1085 AlarmEmailDefault f admin 1086 AlarmSysmsgDefault f admin 1087 F3 so.newSalesOrder jsmith 1079 AlarmEventDefault t jsmith 1088 SoShowAll f jsmith 791 salesOrder/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off|11,off|12,off|13,on|14,on|15,on|16,on| jsmith 733 purchaseOrder/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off|11,off| jsmith 732 itemSourceList/_itemsrc/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 736 dspPurchaseReqsByPlannerCode/_pr/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 738 unpostedPurchaseOrders/_pohead/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 695 accountNumbers/_account/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 729 dspPlannedOrdersByPlannerCode/_planord/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 507 arWorkBench/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on|15,off| admin 1046 arOpenItem/_arapply/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 782 dspFinancialReport/_layout/columnsShown 0,on|1,on|2,on| jsmith 1089 _alarmTab/_alarms/columnsShown 0,on|1,on|2,on|3,on| jsmith 1081 AlarmSysmsgDefault t jsmith 1090 todoList/_projects/checked 0 jsmith 878 todoList/_completed/checked 2 jsmith 880 todoList/_todoList/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,off| jsmith 1367 vendorWorkBench/_showDetail/checked 0 admin 1092 dspAPOpenItemsByVendor/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 1093 dspGLTransactions/_showRunningTotal/checked 2 jsmith 1095 apWorkBench/_apselect/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 1096 apWorkBench/_check/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 1097 _creditCardTab/_showExpired/checked 0 jsmith 559 itemSourceList/_itemsrc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 475 purchaseOrder/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off|11,off|12,off|13,off| admin 560 dspPurchaseReqsByPlannerCode/_pr/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 440 IdleTimeout 0 admin 109 DisableExportContents f jsmith 814 arWorkBench/_aropenCM/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 1368 vendorWorkBench/_check/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 813 arWorkBench/_cashrcpt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 917 dspGLTransactions/_gltrans/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off| jsmith 1098 salesCategories/_salescat/columnsShown 0,on|1,on| jsmith 781 dspFinancialReport/_showzeros/checked 2 jsmith 1099 location/_locitem/columnsShown 0,on|1,on| jsmith 1100 locations/_location/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1101 uom/_uomconv/columnsShown 0,on|1,on|2,on|3,on| jsmith 1102 uoms/_uoms/columnsShown 0,on|1,on|2,on| jsmith 1103 whseCalendars/_whsecal/columnsShown 0,on|1,on| jsmith 1104 _documentsTab/_files/columnsShown 0,on|1,on| jsmith 1106 item/_itemsrc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 857 dspQOHByItem/_showValue/checked 2 jsmith 1107 freightClasses/_freightClass/columnsShown 0,on|1,on| jsmith 1108 itemPricingSchedule/_ipsitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 1109 itemPricingSchedules/_ipshead/columnsShown 0,on|1,on|2,on|3,on| jsmith 1110 itemPricingScheduleItem/_charprice/columnsShown 0,on|1,on|2,on| jsmith 1111 freightBreakdown/_freight/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 1112 pricingScheduleAssignments/_ipsass/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1113 laborRates/_lbrrate/columnsShown 0,on|1,on|2,on| jsmith 1114 workCenters/_wrkcnt/columnsShown 0,on|1,on|2,on| jsmith 1115 standardOperations/_stdopn/columnsShown 0,on|1,on| jsmith 945 BOM/_bomitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off| jsmith 1116 booItem/_booimage/columnsShown 0,on|1,on|2,on| jsmith 1117 instructions/_fixedFont/checked 0 jsmith 1003 customCommands/_commands/columnsShown 0,on|1,on|2,off| jsmith 1118 costingElements/_costelem/columnsShown 0,on| jsmith 1119 dspItemCostsByClassCode/_onlyShowZero/checked 0 jsmith 950 vendor/_vendaddr/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 1122 termses/_terms/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1123 vendorTypes/_vendtype/columnsShown 0,on|1,on| jsmith 1124 enterPoReturn/_showClosed/checked 2 jsmith 1125 enterPoReturn/_printReport/checked 0 jsmith 1126 enterPoReturn/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 1127 rejectCodes/_rjctcode/columnsShown 0,on|1,on| jsmith 1128 apAccountAssignments/_apaccnt/columnsShown 0,on|1,on|2,on|3,on| jsmith 1129 itemSources/_showInactive/checked 0 jsmith 742 itemSources/_itemsrc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 1130 itemSourceSearch/_itemsrc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,off| jsmith 1131 customerType/_charass/columnsShown 0,on|1,on|2,on| jsmith 1132 customerTypes/_custtype/columnsShown 0,on|1,on| jsmith 1133 dspSalesHistoryByParameterList/_showCosts/checked 2 jsmith 1134 dspSalesHistoryByParameterList/_showPrices/checked 2 jsmith 1135 dspSalesHistoryByParameterList/_sohist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on| jsmith 1136 bankAccounts/_bankaccnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 708 item/_charass/columnsShown 0,on|1,on|2,on|3,off| jsmith 1137 PostOpsShowAll t jsmith 1091 /_layout/columnsShown 0,on|1,on|2,on| jsmith 1138 arAccountAssignments/_araccnt/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 786 eventManager/_showAcknowledged/checked 0 jsmith 1120 dspItemCostsByClassCode/_onlyShowDiff/checked 2 jsmith 1139 dspBankrecHistory/_details/columnsShown 0,on|1,on|2,on| jsmith 1140 /_list/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 1141 locales/_locale/columnsShown 0,on|1,on| admin 1142 IngoreMissingTranslationFiles t mfgadmin 1143 EmailEvents f mfgadmin 1144 AlarmEventDefault f mfgadmin 1145 AlarmEmailDefault f mfgadmin 1146 AlarmSysmsgDefault f mfgadmin 159 IdleTimeout 30 mfgadmin 1147 dspSalesHistoryByParameterList/_showCosts/checked 2 admin 754 postProduction/_closeWo/checked 0 jsmith 912 dspInventoryAvailabilityByParameterList/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on| jsmith 1121 dspItemCostsByClassCode/_itemcost/columnsShown 0,on|1,on|2,on|3,on|4,on|5,off| jsmith 694 cashReceiptsEditList/_cashrcpt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 804 shipOrder/_print/checked 0 jsmith 816 arWorkBench/_preauth/columnsShown 0,on|1,on|2,on|3,off|4,off|5,on|6,on|7,on|8,off|9,off|10,off|11,off| jsmith 923 unpostedInvoices/_invchead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,off|8,off|9,off|10,on|11,on| jsmith 1105 _documentsTab/_images/columnsShown 0,on|1,on|2,on| jsmith 858 dspQOHByItem/_qoh/columnsShown 0,on|1,on|2,on|3,on|4,on|5,off|6,off|7,off|8,off| jsmith 1148 dspSalesHistoryByParameterList/_showPrices/checked 2 admin 1149 dspSalesHistoryByParameterList/_sohist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on| admin 1150 prospect/_quotes/columnsShown 0,on|1,on| admin 1151 prospects/_prospect/columnsShown 0,on|1,on|2,on|3,on| admin 1152 uiform/_commands/columnsShown 0,on|1,on|2,off| admin 1153 uiform/_script/columnsShown 0,on|1,on|2,on|3,on|4,off| admin 1154 uiforms/_uiform/columnsShown 0,on|1,on|2,on|3,on|4,off| admin 518 /_item/columnsShown 0,on|1,on|2,on| admin 1156 printChecks/_orderByName/checked 0 admin 1157 apWorkBench/_apselect/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1159 apWorkBench/_check/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1161 dspBacklogByParameterList/_showPrices/checked 2 admin 1162 dspBacklogByParameterList/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1370 vendorWorkBench/_showUnvouchered/checked 0 admin 1163 dspQOHByParameterList/_showValue/checked 0 admin 1164 dspQOHByParameterList/_qoh/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off|11,off|12,off| admin 1165 postMiscProduction/_backflush/checked 2 admin 1166 postMiscProduction/_nonPickItems/checked 0 admin 1167 postMiscProduction/_immediateTransfer/checked 0 admin 1183 propername MFG User mfgadmin 1184 initials ADMIN mfgadmin 1185 email matherton@xtuple.com mfgadmin 1186 locale_id 3 mfgadmin 1187 agent t mfgadmin 1168 /_shipto/columnsShown 0,on|1,on|2,on|3,on| admin 1188 active f mfgadmin 1189 window mfgadmin 1169 _creditCardTab/_showExpired/checked 0 admin 1170 miscVoucher/_miscDistrib/columnsShown 0,on|1,on| admin 598 BOM/_bomitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off| admin 1171 _documentsTab/_files/columnsShown 0,on|1,on| admin 1197 commentsTab/_verbose/checked 0 admin 1198 _commentsPage/_verbose/checked 0 admin 635 dspInventoryAvailabilityByParameterList/_showShortages/checked 0 admin 1371 vendorWorkBench/_showVariances/checked 0 admin 1172 _documentsTab/_images/columnsShown 0,on|1,on|2,off| admin 1199 dspIndentedBOM/_showExpired/checked 0 admin 1200 dspIndentedBOM/_showFuture/checked 0 admin 1201 dspIndentedBOM/_bomitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,off|9,off| admin 1202 maintainItemCosts/_itemcost/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 636 dspInventoryAvailabilityByParameterList/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on| admin 1203 /_ediprofile/columnsShown 0,on|1,on|2,on| admin 1204 customer/_preauth/columnsShown 0,on|1,off|2,off|3,on|4,on|5,on|6,on|7,on|8,off|9,off|10,off|11,off| admin 1205 customer/_arapply/columnsShown 0,on|1,on|2,off|3,off|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 1206 customer/_incidentsOnly/checked 0 admin 1207 customer/_unposted/checked 0 admin 1208 customer/_aropen/columnsShown 0,on|1,on|2,off|3,off|4,on|5,off|6,off|7,off|8,on|9,on|10,on|11,on|12,on|13,on|14,on|15,off| admin 661 _dueCredit/_creditcard/checked 0 admin 1209 customer/_radue/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on| admin 1210 customer/_ra/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on| admin 1212 customer/_quote/columnsShown 0,on|1,off|2,on|3,on|4,on| admin 1214 customer/_todolist/checked 2 admin 1215 customer/_incidents/checked 0 admin 1216 customer/_projects/checked 0 admin 1218 customer/_todoList/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on|7,off|8,on|9,on|10,off|11,off|12,off|13,off| admin 1219 customer/_contacts/columnsShown 0,on|1,on|2,off|3,off|4,on|5,on|6,on|7,on|8,on| admin 1220 customer/_charass/columnsShown 0,on|1,on| admin 1221 customer/_cc/columnsShown 0,on|1,on|2,on|3,on| admin 1222 customer/_taxreg/columnsShown 0,on|1,on| admin 1223 customer/_shipto/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1224 _commentsTab/_verbose/checked 0 admin 150 F1 so.customerWorkbench jsmith 168 F2 so.customerWorkbench mfgadmin 448 F2 so.customerWorkbench admin 1227 customerType/_charass/columnsShown 0,on|1,on|2,on| admin 1225 itemSites/_itemSite/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1226 addresses/_address/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 1228 customerTypes/_custtype/columnsShown 0,on|1,on| admin 1229 profitCenters/_prftcntr/columnsShown 0,on|1,on| admin 1230 accountNumbers/_showExternal/checked 0 admin 503 unpostedInvoices/_invchead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,off|8,off|9,off|10,on|11,on| admin 1155 cashReceiptsEditList/_cashrcpt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1160 dspGLTransactions/_showRunningTotal/checked 2 admin 1231 termses/_terms/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1372 vendorWorkBench/_porecv/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,off|8,off|9,off|10,off| admin 1232 customers/_cust/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 1233 siteTypes/_sitetype/columnsShown 0,on|1,on| admin 456 warehouses/_warehouse/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1234 crmaccount/_reg/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 1236 crmaccount/_todolist/checked 2 admin 1237 crmaccount/_incidents/checked 0 admin 1238 crmaccount/_projects/checked 0 admin 1239 crmaccount/_completed/checked 0 admin 1240 crmaccount/_todoList/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on|7,off|8,on|9,on|10,off|11,off|12,off|13,off| admin 1211 customer/_so/columnsShown 0,on|1,off|2,off|3,off|4,on|5,on|6,on|7,off| admin 1213 customer/_list/columnsShown 0,on|1,off|2,off|3,on|4,off|5,off|6,off|7,off|8,off|9,off|10,off|11,off| admin 1241 crmaccount/_autoUpdate/checked 0 admin 1242 crmaccount/_charass/columnsShown 0,on|1,on| admin 1244 crmaccounts/_crmaccount/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 1245 _bnkacctTab/_bnkaccts/columnsShown 0,off|1,on| admin 1246 _terminalTab/_terminals/columnsShown 0,off|1,on| admin 1247 retailSites/_sites/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 1235 crmaccount/_list/columnsShown 0,on|1,off|2,off|3,on|4,off|5,off|6,off|7,off|8,off|9,off|10,off|11,off| admin 1243 crmaccount/_contacts/columnsShown 0,on|1,on|2,off|3,off|4,on|5,on|6,on|7,on|8,on|9,on| admin 1176 propername Administrator admin 1196 window jsmith 1190 propername John Smith jsmith 528 accountNumbers/_account/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,off| admin 908 employees/_emp/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 718 /_accnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,off|7,off| jsmith 1248 commentsTab/_verbose/checked 0 jsmith 1249 _commentsTab/_verbose/checked 0 jsmith 1250 _commentsPage/_verbose/checked 0 jsmith 1252 transferOrderItem/_availability/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 1253 TabPage/_verbose/checked 0 jsmith 1254 transferOrder/_toitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| jsmith 856 transferOrders/_to/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 793 openSalesOrders/_so/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 1258 workOrder/_woIndentedList/columnsShown 0,on|1,on|2,on|3,on|4,off|5,on|6,on|7,on|8,off|9,on|10,off|11,off|12,off|13,off|14,off|15,on|16,off|17,off| jsmith 1373 vendorWorkBench/_showClosed/checked 0 admin 740 enterPoReceipt/_orderitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on| jsmith 1257 _detailTab/_indented/checked 2 jsmith 1272 /_ediprofile/columnsShown 0,on|1,on|2,on| jsmith 1251 _supplyTab/_showAvailability/checked 2 jsmith 959 dspQOHByParameterList/_qoh/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off|11,off|12,off| jsmith 1273 customer/_preauth/columnsShown 0,on|1,off|2,off|3,on|4,on|5,on|6,on|7,on|8,off|9,off|10,off|11,off| jsmith 1274 customer/_arapply/columnsShown 0,on|1,on|2,off|3,off|4,on|5,on|6,on|7,on|8,on|9,on|10,on| jsmith 1256 _detailTab/_showMaterials/checked 2 jsmith 1275 customer/_incidentsOnly/checked 0 jsmith 1276 customer/_unposted/checked 0 jsmith 1259 salesReps/_salesrep/columnsShown 0,on|1,on|2,on| jsmith 1260 _itemsTab/_saleitems/columnsShown 0,off|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,off| jsmith 1261 _salesTab/_sales/columnsShown 0,on|1,on|2,off|3,on|4,off|5,off|6,on|7,off|8,on|9,off|10,off|11,off|12,off|13,off|14,off|15,off|16,off|17,off|18,off|19,off|20,off|21,off|22,off|23,off|24,off|25,off|26,on|27,off|28,off|29,off|30,off|31,off|32,off|33,off|34,off| jsmith 1277 customer/_aropen/columnsShown 0,on|1,on|2,off|3,off|4,on|5,off|6,off|7,off|8,on|9,on|10,on|11,on|12,on|13,on|14,on|15,off| jsmith 1262 crmaccount/_list/columnsShown 0,on|1,off|2,on|3,on|4,off|5,off|6,off|7,off|8,off|9,off|10,off| jsmith 1263 crmaccount/_todolist/checked 2 jsmith 1264 crmaccount/_incidents/checked 0 jsmith 1265 crmaccount/_projects/checked 0 jsmith 1266 crmaccount/_completed/checked 0 jsmith 1267 crmaccount/_todoList/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on|7,off|8,on|9,on|10,off|11,off|12,off|13,off| jsmith 1268 crmaccount/_autoUpdate/checked 0 jsmith 1269 contact/_uses/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1270 contact/_charass/columnsShown 0,on|1,on| jsmith 1271 _tabComments/_verbose/checked 0 jsmith 1278 customer/_radue/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on| jsmith 1279 customer/_ra/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on| jsmith 1288 customer/_contacts/columnsShown 0,on|1,on|2,off|3,off|4,on|5,on|6,on|7,on|8,on| jsmith 1280 customer/_so/columnsShown 0,on|1,off|2,off|3,off|4,on|5,on|6,on| jsmith 1281 customer/_quote/columnsShown 0,on|1,off|2,on|3,on|4,on| jsmith 1282 customer/_list/columnsShown 0,on|1,off|2,on|3,on|4,off|5,off|6,off|7,off|8,off|9,off|10,off| jsmith 1283 customer/_todolist/checked 2 jsmith 1284 customer/_incidents/checked 0 jsmith 1285 customer/_projects/checked 0 jsmith 1286 customer/_completed/checked 0 jsmith 1287 customer/_todoList/columnsShown 0,on|1,off|2,on|3,on|4,on|5,on|6,on|7,off|8,on|9,on|10,off|11,off|12,off|13,off| jsmith 1289 contacts/_contacts/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| jsmith 1290 /_sales/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 1291 taxAssignment/_taxCodeOption/columnsShown 0,on| jsmith 1292 taxAssignment/_taxCodeSelected/columnsShown 0,on| jsmith 1293 taxAssignments/_taxass/columnsShown 0,on|1,on|2,on|3,on| jsmith 1294 _terminalTab/_terminals/columnsShown 0,off|1,on| jsmith 1295 _bnkacctTab/_bnkaccts/columnsShown 0,off|1,on| jsmith 1296 retailSites/_sites/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| jsmith 1297 cashRegisters/_terminals/columnsShown 0,on|1,on|2,on|3,on|4,off|5,on|6,off|7,off|8,off|9,off| jsmith 1298 _itemsTab/_saleitems/columnsShown 0,off|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,off| admin 1299 _salesTab/_sales/columnsShown 0,on|1,on|2,off|3,on|4,off|5,off|6,on|7,off|8,on|9,off|10,off|11,off|12,off|13,off|14,off|15,off|16,off|17,off|18,off|19,off|20,off|21,off|22,off|23,off|24,off|25,off|26,on|27,off|28,off|29,off|30,off|31,off|32,off|33,off|34,off| admin 1300 cashRegisters/_terminals/columnsShown 0,on|1,on|2,on|3,on|4,off|5,on|6,off|7,off|8,off|9,off| admin 1301 CopyListsPlainText f jsmith 1344 bomList/_showInactive/checked 0 admin 1345 bomList/_bom/columnsShown 0,on|1,on| admin 1302 CopyListsPlainText f admin 1303 _supplyTab/_showAvailability/checked 2 admin 1304 TabPage/_verbose/checked 0 admin 1359 recallOrders/_ship/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1305 accountingYearPeriods/_period/columnsShown 0,on|1,on|2,on| admin 1306 _detailTab/_showOperations/checked 0 admin 1307 _detailTab/_showMaterials/checked 2 admin 1308 _detailTab/_indented/checked 0 admin 1346 dspTrialBalances/_showZero/checked 0 jsmith 1310 itemSource/_itemsrcp/columnsShown 0,on|1,on|2,on|3,on| admin 1311 itemSources/_showInactive/checked 0 admin 1312 itemSources/_itemsrc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 1313 enterPoitemReceipt/_printLabel/checked 0 admin 1182 window admin 630 dspInventoryHistoryByParameterList/_invhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,off|13,off|14,off|15,on| admin 508 arWorkBench/_preauth/columnsShown 0,on|1,on|2,on|3,off|4,off|5,on|6,on|7,on|8,off|9,off|10,off|11,off| admin 1314 arWorkBench/_incidentsOnly/checked 0 admin 1317 salesCategories/_salescat/columnsShown 0,on|1,on| admin 1347 financialLayout/_layouts/columnsShown 0,on|1,on| admin 1318 dspUninvoicedReceivings/_porecv/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1319 taxClasses/_taxclass/columnsShown 0,on|1,on|2,on| admin 1321 dspTaxHistory/_taxdet/columnsShown 0,on|1,on|2,on|3,off|4,on|5,off|6,off|7,off|8,on|9,off|10,off|11,off|12,off|13,on|14,on|15,off|16,off|17,off|18,on|19,on|20,on| admin 1322 taxTypes/_taxtype/columnsShown 0,on|1,on| admin 1320 dspTaxHistory/_taxsum/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1316 dspCashReceipts/_arapply/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 1354 applyAPCreditMemo/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| jsmith 1323 taxDetail/_taxcodes/columnsShown 0,on|1,on|2,on|3,on| admin 1355 workOrderMaterials/_womatl/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,off|12,off| jsmith 1356 dspInventoryAvailabilityByWorkOrder/_includeChildren/checked 0 jsmith 1609 salesOrder edit 3211/_verbose/checked 0 admin 1375 vendorWorkBench/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1378 releasePlannedOrdersByPlannerCode/_firmedOnly/checked 0 admin 1324 taxCode/_taxitems/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1325 taxZones/_taxZone/columnsShown 0,on|1,on| jsmith 1326 taxAuthorities/_taxauth/columnsShown 0,on|1,on| jsmith 1327 searchForCRMAccount/_searchNumber/checked 0 jsmith 1328 searchForCRMAccount/_searchContact/checked 0 jsmith 1329 searchForCRMAccount/_searchName/checked 0 jsmith 1330 searchForCRMAccount/_searchPhone/checked 0 jsmith 1331 searchForCRMAccount/_searchStreet/checked 0 jsmith 1332 searchForCRMAccount/_searchCity/checked 0 jsmith 1333 searchForCRMAccount/_searchState/checked 2 jsmith 1334 searchForCRMAccount/_searchPostalCode/checked 0 jsmith 1335 searchForCRMAccount/_searchCountry/checked 0 jsmith 1336 searchForCRMAccount/_showInactive/checked 0 jsmith 1337 searchForCRMAccount/_searchCombo/checked 0 jsmith 1338 searchForCRMAccount/_searchEmail/checked 0 jsmith 1339 searchForCRMAccount/_crmacct/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| jsmith 1357 arOpenItem/_printOnPost/checked 0 jsmith 1360 vendor/_ediprofile/columnsShown 0,on|1,on|2,on| jsmith 1340 arWorkBench/_incidentsOnly/checked 0 jsmith 1341 arWorkBench/_unposted/checked 0 jsmith 815 arWorkBench/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on|15,off| jsmith 1342 packages/_package/columnsShown 0,on|1,on|2,on|3,on| admin 1343 packages/_autoUpdate/checked 0 admin 1351 apOpenItem/_apapply/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1349 subAccntTypes/_subaccnttypes/columnsShown 0,on|1,on|2,on| admin 139 PreferredWarehouse 35 jsmith 1350 expenseCategories/_expcat/columnsShown 0,on|1,on| admin 1352 unappliedAPCreditMemos/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| jsmith 1358 enterPoitemReceipt/_printLabel/checked 0 jsmith 1348 financialLayout/_layout/columnsShown 0,on|1,on|2,on| admin 1353 transformTrans/_source/columnsShown 0,on|1,on|2,on| admin 1374 vendorWorkBench/_searchDescrip/checked 0 admin 1369 vendorWorkBench/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,off|7,on|8,on|9,on|10,on|11,on| admin 1376 vendorWorkBench/_vendhist/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 1379 releasePlannedOrdersByPlannerCode/_appendTransferOrder/checked 2 admin 1380 releasePlannedOrdersByPlannerCode/_firmedOnly/checked 0 jsmith 1381 releasePlannedOrdersByPlannerCode/_appendTransferOrder/checked 2 jsmith 1382 printChecks/_orderByName/checked 0 jsmith 1094 apWorkBench/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,off|7,on|8,on|9,on|10,on|11,on| jsmith 1255 _detailTab/_showOperations/checked 2 jsmith 805 shipOrder/_receive/checked 0 jsmith 1383 vendorPriceList/_price/columnsShown 0,on|1,on|2,on|3,on| jsmith 690 virtualList/_listTab/columnsShown 0,on|1,on|2,on|3,on|4,on| jsmith 1055 scripts/_script/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1384 forms/_form/columnsShown 0,on|1,on| admin 1385 /_autoUpdate/checked 0 admin 1386 /_printJournal/checked 0 admin 1387 productCategories/_prodcat/columnsShown 0,on|1,on| admin 599 uom/_uomconv/columnsShown 0,on|1,on|2,on|3,on| admin 1388 /_showInactive/checked 0 admin 1389 itemSite/_verbose/checked 0 admin 1390 /_showAcknowledged/checked 0 admin 1391 APAgingDefaultDate dist admin 1392 /_custom/checked 0 admin 1393 dspTimePhasedOpenAPItems//columnsShown 0,on|1,on| admin 1394 dspTimePhasedOpenAPItems/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 1395 /_allOpenOrders/checked 0 admin 1396 assignLotSerial/_itemlocdist/columnsShown 0,on|1,on|2,on|3,on| admin 1397 /_singleLot/checked 0 admin 1398 /_showShortages/checked 0 admin 1399 /_showReorder/checked 0 admin 1400 /_ignoreReorderAtZero/checked 0 admin 1401 /_showBegBal/checked 0 admin 1402 /_showBegBalPrcnt/checked 0 admin 1403 /_showDebits/checked 0 admin 1404 /_showDebitsPrcnt/checked 0 admin 1405 /_showCredits/checked 0 admin 1406 /_showCreditsPrcnt/checked 0 admin 1407 /_showEndBal/checked 0 admin 1315 arWorkBench/_unposted/checked 2 admin 1408 /_showEndBalPrcnt/checked 0 admin 1409 /_showBudget/checked 0 admin 1410 /_showBudgetPrcnt/checked 0 admin 1411 /_showDiff/checked 0 admin 1412 /_showDiffPrcnt/checked 0 admin 1413 /_showCustom/checked 0 admin 1414 /_showCustomPrcnt/checked 0 admin 1418 reprintInvoices/_balanceOnly/checked 0 admin 1419 reprintInvoices/_invoice/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1420 reprintInvoices/_watermarks/columnsShown 0,on|1,on|2,on| admin 1421 ARAgingDefaultDate dist admin 1422 dspTimePhasedOpenARItems//columnsShown 0,on|1,on| admin 1423 dspTimePhasedOpenARItems/_aropen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 1424 /_showOperations/checked 0 admin 1425 /_showMaterials/checked 0 admin 1426 /_indented/checked 0 admin 1427 dspItemSourcesByVendor/_itemsrc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 1428 dspPoItemsByVendor/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,off| admin 1429 /_showRunningTotal/checked 0 admin 1431 printWoTraveler/_packingList/checked 0 admin 1432 closeWo/_verbose/checked 0 admin 1433 _commentTab/_comment/columnsShown 0,on|1,on|2,on|3,on| admin 1434 /_showOnlyRI/checked 0 admin 1435 /_showOnlyTopLevel/checked 0 admin 1610 addresses/_autoupdate/checked 0 admin 1436 dspAPOpenItemsByVendor/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on| admin 1415 /_shownumbers/checked 2 admin 1416 /_showzeros/checked 2 admin 1437 /_showPrices/checked 0 admin 1438 dspBacklogByItem/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off| admin 1439 dspBacklogByCustomer/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,off| admin 1440 /_requireInventory/checked 0 admin 1441 recallOrders/_ship/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1442 /_sales/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 1443 costCategories/_costcat/columnsShown 0,on|1,on| admin 1444 address/_uses/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1445 address/_charass/columnsShown 0,on|1,on| admin 1446 _tabComments/_comment/columnsShown 0,on|1,on|2,on|3,on| admin 444 InterfaceWindowOption TopLevel admin 1448 EnableScriptDebug f admin 459 arAccountAssignments/_araccnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 1174 /_layout/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 1449 unpostedGLTransactions/_gltrans/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1377 dspTrialBalances/_showZero/checked 0 admin 1450 taxCode/_taxitems/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1453 DisplayItemLocations/_list/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on| admin 1451 DisplayItemLocations/_update/checked 0 admin 1454 contact/_uses/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1455 contact/_charass/columnsShown 0,on|1,on| admin 1456 vendor/_verbose/checked 0 admin 1457 vendorTypes/_vendtype/columnsShown 0,on|1,on| admin 1173 item/_itemsrc/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 1470 returnAuthorizationItem/_raitemls/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 639 dspFinancialReport/_layout/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on| admin 1461 enterPoReceipt/_autoPost/checked 0 admin 605 dspBillingSelections/_cobill/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on| admin 1462 apWorkBench/_vohead/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on| admin 1463 apWorkBench/_printJournal/checked 0 admin 495 dspGLTransactions/_gltrans/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off| admin 1417 salesOrderItem/_showAvailability/checked 2 admin 1464 salesOrderItem/_showIndented/checked 0 admin 1471 returnAuthorizationItem/_showAvailability/checked 2 admin 1468 PostOpsShowAll t admin 1469 postProduction/_scrap/checked 0 admin 1158 apWorkBench/_apopen/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,off|7,on|8,on|9,on|10,on|11,on|12,on| admin 611 returnAuthorization/_raitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on|12,on|13,on|14,on|15,on|16,on|17,on|18,on|19,on|20,on|21,on|22,on|23,off| admin 1472 returnAuthorizationWorkbench/_creditmemo/checked 2 admin 1473 returnAuthorizationWorkbench/_check/checked 0 admin 1474 returnAuthorizationWorkbench/_postmemos/checked 0 admin 1475 returnAuthorizationWorkbench/_printmemo/checked 0 admin 1476 returnAuthorizationWorkbench/_receipts/checked 2 admin 1458 _documentsTab/_doc/columnsShown 0,on|1,off|2,on|3,on|4,on| admin 519 DisableExportContents f admin 1452 metasqls/_list/columnsShown 0,on|1,on|2,on|3,on|4,off| admin 1466 workOrder/_showMaterials/checked 2 admin 1467 workOrder/_indented/checked 2 admin 520 UseEnhancedAuthentication f admin 1465 workOrder/_showOperations/checked 2 admin 1065 selectedSites f admin 1177 initials ADMIN admin 1179 locale_id 3 admin 110 UseEnhancedAuthentication f jsmith 1033 selectedSites f jsmith 1192 email demo@xtuple.com jsmith 1191 initials JS jsmith 1193 locale_id 3 jsmith 1194 agent t jsmith 1195 active f jsmith 1477 returnAuthorizationWorkbench/_shipments/checked 2 admin 1478 returnAuthorizationWorkbench/_payment/checked 2 admin 1534 salesOrder edit 3196/_verbose/checked 0 admin 1535 item edit 344/_verbose/checked 0 admin 1536 item edit 345/_verbose/checked 0 admin 1533 dspWoScheduleByParameterList/_showOnlyTopLevel/checked 0 admin 1479 customCommand/_arguments/columnsShown 0,on|1,on| admin 1480 customCommands/_commands/columnsShown 0,on|1,on|2,off| admin 1537 item edit 315/_verbose/checked 0 admin 1481 opportunity/_verbose/checked 0 admin 1482 opportunity/_salesList/columnsShown 0,on|1,on|2,on|3,on| admin 1483 salesOrder/_verbose/checked 0 admin 1484 opListShowAll f admin 1485 opportunityList/_showInactive/checked 0 admin 482 opportunityList/_list/columnsShown 0,on|1,on|2,on|3,on|4,off|5,off|6,off|7,off|8,off|9,on|10,off|11,off| admin 1552 rescheduleWo/_changeChildren/checked 2 admin 1486 salesOrderItem/_verbose/checked 0 admin 1515 dspGLTransactions/_parameterWidget/checked t admin 552 salesOrder/_soitem/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off|11,on|12,off|13,off|14,on|15,on|16,on|17,on|18,on| admin 1487 todoItem/_verbose/checked 0 admin 1488 _alarmTab/_alarms/columnsShown 0,on|1,on|2,on|3,on| admin 1522 workOrder/_verbose/checked 0 admin 1489 address/_verbose/checked 0 admin 1490 crmaccount/_showInactive/checked 0 admin 1491 crmaccount/_verbose/checked 0 admin 1492 contact/_verbose/checked 0 admin 1493 contacts/_contacts/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on| admin 1494 salesOrder edit 3194/_verbose/checked 0 admin 1554 postOperations/_scrap/checked 0 admin 1495 package/_dep/columnsShown 0,on|1,on|2,on| admin 1496 package/_req/columnsShown 0,on|1,on|2,on| admin 1497 package/_rec/columnsShown 0,on|1,on|2,on| admin 1498 package/_showSystemDetails/checked 0 admin 1499 te/_lines/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,on|10,on|11,on| admin 1500 tesheet/_sheets/columnsShown 0,on|1,on|2,on|3,on|4,on| admin 1501 accountSearch/_accnt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,off|7,off| admin 1502 item new/_verbose/checked 0 admin 1503 copyItem/_copyBOO/checked 0 admin 1504 copyItem/_copyUsedAt/checked 0 admin 1505 item edit 343/_verbose/checked 0 admin 1506 employee/_verbose/checked 0 admin 683 virtualList/_listTab/columnsShown 0,on|1,on|2,on| admin 1507 salesOrder edit 3195/_verbose/checked 0 admin 1508 /_contactList/columnsShown 0,on|1,off|2,off|3,on|4,on|5,off|6,off|7,off|8,off|9,off| admin 1509 item edit 316/_verbose/checked 0 admin 1510 bomItem/_verbose/checked 0 admin 1519 dspPlannedOrdersByPlannerCode/_purchase/checked 2 admin 1520 dspPlannedOrdersByPlannerCode/_manufacture/checked 2 admin 1512 purchaseOrder/_verbose/checked 0 admin 1513 createInvoices/_consolidate/checked 0 admin 1548 arOpenItem/_printOnPost/checked 0 admin 1549 dspAROpenItems/_incidentsOnly/checked 0 admin 1521 dspPlannedOrdersByPlannerCode/_transfer/checked 2 admin 1527 purchaseOrderItem/_verbose/checked 0 admin 1550 dspAROpenItems/_unposted/checked 0 admin 1516 incidentWorkbench/parameterWidget/checked t admin 1517 incident/_verbose/checked 0 admin 1518 incidentWorkbench/parameterWidget/filter_default 2 admin 1528 item edit 341/_verbose/checked 0 admin 1529 issueToShipping/_onlyReserved/checked 0 admin 1551 salesOrder edit 3200/_verbose/checked 0 admin 1530 salesOrder new/_verbose/checked 0 admin 680 incidentWorkbench/_incdt/columnsShown 0,on|1,on|2,on|3,on|4,on|5,on|6,on|7,on|8,on|9,off|10,off|11,off| admin 1523 dspWoScheduleByParameterList/_open/checked 2 admin 1524 dspWoScheduleByParameterList/_released/checked 2 admin 1525 dspWoScheduleByParameterList/_exploded/checked 2 admin 1526 dspWoScheduleByParameterList/_inprocess/checked 2 admin 1309 workOrder/_woIndentedList/columnsShown 0,on|1,on|2,on|3,on|4,off|5,on|6,on|7,on|8,off|9,on|10,on|11,off|12,off|13,off|14,off|15,on|16,off|17,off| admin 1531 todoListCalendar/_active/checked 0 admin 1532 todoListCalendar/_completed/checked 0 admin 1514 dspGLTransactions/_parameterWidget/filter_default 0 admin 1511 MonitoredAccounts 109,86,143,108,92,93,106,89,84,103,99 admin 1538 customer/_creditmemo/checked 0 admin 1539 customer/_check/checked 0 admin 1540 customer/_creditcard/checked 0 admin 1541 customer/_postmemos/checked 0 admin 1542 customer/_printmemo/checked 0 admin 1543 customer/_receipts/checked 0 admin 1544 customer/_shipments/checked 0 admin 1545 customer/_payment/checked 0 admin 1546 customer/_showInactive/checked 0 admin 1547 customer/_verbose/checked 0 admin 1553 rescheduleWo/_postComment/checked 0 admin 1555 openSalesOrders/_queryonstart/checked 2 admin 1556 openSalesOrders/_autoupdate/checked 0 admin 1557 salesOrder view 3196/_verbose/checked 0 admin 1558 salesOrder edit 3207/_verbose/checked 0 admin 1559 dspInventoryHistoryByParameterList/_autoupdate/checked 0 admin 1560 dspAllocations/_autoupdate/checked 0 admin 1561 dspInventoryAvailabilityByParameterList/_autoupdate/checked 0 admin 1562 dspFinancialReport/_autoupdate/checked 0 admin 1563 items/_queryonstart/checked 2 admin 1564 items/_autoupdate/checked 0 admin 1566 dspPlannedOrdersByPlannerCode/_autoupdate/checked 0 admin 1178 email insert email here admin 1567 dspPurchaseReqsByPlannerCode/_autoupdate/checked 0 admin 1568 dspInventoryAvailabilityByWorkOrder/_autoupdate/checked 0 admin 1569 dspWoMaterialsByWorkOrder/_autoupdate/checked 0 admin 1565 dspWoScheduleByParameterList/_autoupdate/checked 2 admin 1570 openSalesOrders/_parameterWidget/checked f admin 1571 incidentWorkbench/_queryonstart/checked 2 admin 1572 incidentWorkbench/_parameterWidget/filter_default 2 admin 1573 incidentWorkbench/_autoupdate/checked 0 admin 1574 dspTimePhasedOpenARItems/_custom/checked 0 admin 1575 dspTimePhasedOpenARItems/_autoupdate/checked 0 admin 1576 items/_parameterWidget/checked t admin 1577 vendors/_queryonstart/checked 2 admin 1578 quotes/_autoupdate/checked 0 admin 1579 quotes/_queryonstart/checked 0 admin 1580 unpostedPurchaseOrders/_queryonstart/checked 2 admin 1581 unpostedPurchaseOrders/_autoupdate/checked 0 admin 1653 salesOrder edit 3221/_verbose/checked 0 admin 1583 purchaseOrder/_lineItemsPage/_poitem/columnsShown 0,on|1,on|2,on|3,on|4,off|5,on|6,on|7,on|8,on|9,on|10,off|11,off|12,off|13,on|14,on| admin 1585 salesOrder edit 3198/_verbose/checked 0 admin 1586 customer/_autoupdate/checked 0 admin 1587 customer/_activeOnly/checked 0 admin 1588 arWorkBench/_autoupdate/checked 0 admin 1589 cashReceipt/_credits/checked 0 admin 1590 dspOrderActivityByProject/_showSo/checked 2 admin 1591 dspOrderActivityByProject/_showWo/checked 2 admin 1592 dspOrderActivityByProject/_showPo/checked 2 admin 1593 dspOrderActivityByProject/_autoupdate/checked 0 admin 1594 project/_verbose/checked 0 admin 1595 projects/_showComplete/checked 0 admin 1596 projects/_autoupdate/checked 0 admin 1597 dspRunningAvailability/_autoupdate/checked 0 admin 1598 item view 316/_verbose/checked 0 admin 1601 attachEdiProfile/_showAll/checked 0 admin 1602 vendors/_autoupdate/checked 0 admin 1603 customers/_queryonstart/checked 2 admin 1612 crmaccounts/_queryonstart/checked 2 admin 1614 crmaccount/_autoupdate/checked 0 admin 1615 crmaccount/_activeOnly/checked 0 admin 1616 crmaccounts/_autoupdate/checked 0 admin 1617 item edit 340/_verbose/checked 0 admin 1618 item edit 342/_verbose/checked 0 admin 1619 /_saveDbCheck/checked 2 admin 1620 task/_verbose/checked 0 admin 1180 agent t admin 1181 active t admin 1621 prospects/_queryonstart/checked 2 admin 1622 prospects/_autoupdate/checked 0 admin 1623 dspPendingAvailability/_autoupdate/checked 0 admin 1624 salesOrder view 3215/_verbose/checked 0 admin 1625 dspAPOpenItemsByVendor/_autoupdate/checked 0 admin 1626 timeExpenseSheet/_printSheet/checked 0 admin 1654 dspTrialBalances/_autoupdate/checked 0 admin 1582 salesOrder/_lineItemsPage/_soitem/columnsShown 0,on|1,off|2,on|3,off|4,on|5,on|6,on|7,off|8,on|9,on|10,on|11,on|12,off|13,off|14,off|15,on|16,on|17,on|18,on|19,on|20,on| admin 1627 dspWoSchedule/_queryonstart/checked 2 admin 1628 dspPlannedOrders/_queryonstart/checked 2 admin 1629 dspPlannedOrders/_parameterWidget/checked t admin 1630 dspPlannedOrders/_autoupdate/checked 0 admin 1631 createPlannedOrdersByPlannerCode/_createExcp/checked 2 admin 1632 dspInventoryAvailability/asof 1 admin 1633 dspInventoryAvailability/_showShortages/checked 0 admin 1634 dspInventoryAvailability/_showReorder/checked 0 admin 1635 dspInventoryAvailability/_ignoreReorderAtZero/checked 0 admin 1636 dspInventoryAvailability/_byVendor/checked 0 admin 1637 dspInventoryAvailability/_autoupdate/checked 0 admin 1638 dspWoSchedule/_autoupdate/checked 0 admin 1639 dspInventoryAvailability/_parameterWidget/checked t admin 1655 timeExpenseSheets/_open/checked 2 admin 1656 timeExpenseSheets/_approved/checked 2 admin 1657 timeExpenseSheets/_closed/checked 2 admin 1658 timeExpenseSheets/_invoice/checked 0 admin 1659 timeExpenseSheets/_voucher/checked 0 admin 1660 timeExpenseSheets/_post/checked 0 admin 1640 dspInventoryAvailability/_parameterWidget/filter_default 5 admin 1641 itemSite/_closeSave/checked 0 admin 1642 dspAROpenItems/_autoupdate/checked 0 admin 1643 desktop/mfgHist/type receipts admin 1645 desktop/mfgHist/timeFrame year admin 1646 salesOrder edit 3217/_verbose/checked 0 admin 1647 item edit 300/_verbose/checked 0 admin 1649 unpostedPurchaseOrders/_showOpen/checked 2 admin 1650 unpostedPurchaseOrders/_showUnreleased/checked 2 admin 1651 salesOrder view 3221/_verbose/checked 0 admin 1644 desktop/mfgHist/groupBy item admin 1661 dspTimePhasedOpenAPItems/_custom/checked 0 admin 1662 dspTimePhasedOpenAPItems/_autoupdate/checked 0 admin 1663 salesOrder edit 3225/_verbose/checked 0 admin 1664 dspUninvoicedReceivings/_autoupdate/checked 0 admin 1665 virtualSearch/_searchNumber/checked 2 admin 1666 virtualSearch/_searchName/checked 0 admin 1667 virtualSearch/_searchDescrip/checked 0 admin 1668 enterPoReturn/_printReport/checked 0 admin 1669 dspQOH/_list/columnsShown 0,on|1,on|2,on|3,on|4,off|5,on|6,on|7,on|8,on|9,on|10,off|11,off|12,off|13,off| admin 1670 dspQOH/_autoupdate/checked 0 admin 1671 metasqls/_byPackage/checked 2 admin 1672 reports/_byPackage/checked 0 admin \. -- -- Data for Name: usrpriv; Type: TABLE DATA; Schema: public; Owner: admin -- COPY usrpriv (usrpriv_id, usrpriv_priv_id, usrpriv_username) FROM stdin; 3179 487 jsmith 3180 488 jsmith 3181 489 jsmith 3182 267 jsmith 3183 268 jsmith 3184 271 jsmith 3185 272 jsmith 3186 275 jsmith 3187 276 jsmith 3188 277 jsmith 3189 278 jsmith 3190 279 jsmith 3191 280 jsmith 3192 294 jsmith 3193 297 jsmith 3194 298 jsmith 3195 302 jsmith 3196 303 jsmith 3197 369 jsmith 3198 370 jsmith 3199 313 jsmith 3200 314 jsmith 3201 315 jsmith 3202 371 jsmith 3203 372 jsmith 3204 334 jsmith 3205 335 jsmith 3206 373 jsmith 3207 374 jsmith 3208 375 jsmith 3209 376 jsmith 3210 377 jsmith 3211 378 jsmith 3212 356 jsmith 3213 357 jsmith 3214 358 jsmith 3215 379 jsmith 3216 380 jsmith 3217 382 jsmith 3218 395 jsmith 3219 396 jsmith 3220 397 jsmith 3221 398 jsmith 3222 407 jsmith 3223 455 jsmith 3224 456 jsmith 3225 457 jsmith 3226 458 jsmith 3227 461 jsmith 3228 462 jsmith 3229 463 jsmith 3230 464 jsmith 3231 467 jsmith 3232 468 jsmith 3233 469 jsmith 3234 475 jsmith 3235 476 jsmith 3236 62 jsmith 3237 305 jsmith 3238 179 jsmith 3239 251 jsmith 3240 252 jsmith 3241 254 jsmith 3242 260 jsmith 3243 261 jsmith 3244 262 jsmith 3245 263 jsmith 3246 266 jsmith 3247 187 jsmith 3248 188 jsmith 3249 259 jsmith 3250 497 jsmith 3251 513 jsmith 3252 191 jsmith 3253 202 jsmith 3254 521 jsmith 3255 522 jsmith 3256 523 jsmith 3257 524 jsmith 3258 525 jsmith 3259 465 jsmith 3260 466 jsmith 3261 483 jsmith 3262 484 jsmith 3263 391 jsmith 3264 392 jsmith 3265 415 jsmith 3266 416 jsmith 3267 418 jsmith 3268 420 jsmith 3269 422 jsmith 3270 423 jsmith 3271 424 jsmith 3272 425 jsmith 3273 426 jsmith 3274 427 jsmith 3275 428 jsmith 3276 429 jsmith 3277 430 jsmith 3278 431 jsmith 3279 433 jsmith 3280 435 jsmith 3281 436 jsmith 3282 437 jsmith 3283 438 jsmith 3284 439 jsmith 3285 440 jsmith 3286 441 jsmith 3287 442 jsmith 3288 443 jsmith 3289 444 jsmith 3290 419 jsmith 3291 432 jsmith 3292 446 jsmith 3293 447 jsmith 3294 448 jsmith 3295 449 jsmith 3296 450 jsmith 3297 451 jsmith 3298 480 jsmith 3299 481 jsmith 3300 482 jsmith 3301 519 jsmith 3302 509 jsmith 3303 214 jsmith 3304 86 jsmith 3305 90 jsmith 3306 116 jsmith 3307 117 jsmith 3308 118 jsmith 3309 119 jsmith 3310 14 jsmith 3311 15 jsmith 3312 128 jsmith 3313 129 jsmith 3314 131 jsmith 3315 130 jsmith 3316 132 jsmith 3317 133 jsmith 3318 147 jsmith 3319 81 jsmith 3320 148 jsmith 3321 19 jsmith 3322 149 jsmith 3323 150 jsmith 3324 151 jsmith 3325 152 jsmith 3326 154 jsmith 3327 153 jsmith 3328 35 jsmith 3329 36 jsmith 3330 164 jsmith 3331 215 jsmith 3332 217 jsmith 3333 218 jsmith 3334 219 jsmith 3335 220 jsmith 3336 223 jsmith 3337 224 jsmith 3338 225 jsmith 3339 216 jsmith 3340 222 jsmith 3341 221 jsmith 3342 226 jsmith 3343 227 jsmith 3344 241 jsmith 3345 238 jsmith 3346 255 jsmith 3347 256 jsmith 3348 264 jsmith 3349 265 jsmith 3350 350 jsmith 3351 351 jsmith 3352 367 jsmith 3353 413 jsmith 3354 454 jsmith 3355 470 jsmith 3356 472 jsmith 3357 473 jsmith 3358 474 jsmith 3359 10 jsmith 3360 30 jsmith 3361 29 jsmith 3362 37 jsmith 3363 42 jsmith 3364 84 jsmith 3365 82 jsmith 3366 83 jsmith 3367 85 jsmith 3368 501 jsmith 3369 508 jsmith 3370 514 jsmith 3371 515 jsmith 3372 531 jsmith 3373 17 jsmith 3374 16 jsmith 3375 91 jsmith 3376 27 jsmith 3377 11 jsmith 3378 93 jsmith 3379 12 jsmith 3380 13 jsmith 3381 26 jsmith 3382 75 jsmith 3383 76 jsmith 3384 94 jsmith 3385 125 jsmith 3386 135 jsmith 3387 136 jsmith 3388 139 jsmith 3389 140 jsmith 3390 173 jsmith 3391 174 jsmith 3392 175 jsmith 3393 176 jsmith 3394 177 jsmith 3395 178 jsmith 3396 182 jsmith 3397 228 jsmith 3398 352 jsmith 3399 400 jsmith 3400 401 jsmith 3401 402 jsmith 3402 408 jsmith 3403 409 jsmith 3404 410 jsmith 3405 306 jsmith 3406 307 jsmith 3407 269 jsmith 3408 270 jsmith 3409 362 jsmith 3410 363 jsmith 3411 390 jsmith 3412 492 jsmith 3413 493 jsmith 3414 494 jsmith 3415 5 jsmith 3416 20 jsmith 3417 21 jsmith 3418 4 jsmith 3419 103 jsmith 3420 104 jsmith 3421 105 jsmith 3422 106 jsmith 3423 107 jsmith 3424 1 jsmith 3425 2 jsmith 3426 113 jsmith 3427 114 jsmith 3428 6 jsmith 3429 7 jsmith 3430 134 jsmith 3431 143 jsmith 3432 144 jsmith 3433 155 jsmith 3434 156 jsmith 3438 160 jsmith 3439 31 jsmith 3440 115 jsmith 3441 112 jsmith 3442 161 jsmith 3443 162 jsmith 3444 163 jsmith 3445 316 jsmith 3446 317 jsmith 3447 349 jsmith 3448 516 jsmith 3449 517 jsmith 3450 45 jsmith 3451 44 jsmith 3452 48 jsmith 3453 49 jsmith 3454 53 jsmith 3455 54 jsmith 3456 46 jsmith 3457 47 jsmith 3458 120 jsmith 3459 137 jsmith 3460 189 jsmith 3461 204 jsmith 3462 205 jsmith 3463 207 jsmith 3464 208 jsmith 3465 209 jsmith 3466 213 jsmith 3467 231 jsmith 3468 244 jsmith 3469 245 jsmith 3470 246 jsmith 3471 249 jsmith 3472 250 jsmith 3473 353 jsmith 3474 354 jsmith 3475 368 jsmith 3476 383 jsmith 3477 452 jsmith 3478 23 jsmith 3479 51 jsmith 3480 55 jsmith 3481 56 jsmith 3482 57 jsmith 3483 58 jsmith 3484 61 jsmith 3485 59 jsmith 3486 60 jsmith 3487 50 jsmith 3488 88 jsmith 3489 89 jsmith 3490 111 jsmith 3491 126 jsmith 3492 127 jsmith 3493 141 jsmith 3494 142 jsmith 3495 180 jsmith 3496 181 jsmith 3497 190 jsmith 3498 192 jsmith 3499 193 jsmith 3500 194 jsmith 3501 195 jsmith 3502 196 jsmith 3503 197 jsmith 3504 198 jsmith 3505 199 jsmith 3506 200 jsmith 3507 201 jsmith 3508 232 jsmith 3509 203 jsmith 3510 233 jsmith 3511 70 jsmith 3512 234 jsmith 3513 235 jsmith 3514 211 jsmith 3515 212 jsmith 3516 239 jsmith 3517 242 jsmith 3518 257 jsmith 3519 258 jsmith 3520 273 jsmith 3521 274 jsmith 3522 281 jsmith 3523 336 jsmith 3524 337 jsmith 3525 346 jsmith 3526 347 jsmith 3527 348 jsmith 3528 355 jsmith 3529 385 jsmith 3530 386 jsmith 3531 389 jsmith 3532 393 jsmith 3533 459 jsmith 3534 460 jsmith 3535 22 jsmith 3536 490 jsmith 3537 491 jsmith 3538 498 jsmith 3539 518 jsmith 3544 477 jsmith 3545 478 jsmith 3546 479 jsmith 3547 285 jsmith 3549 282 jsmith 3550 283 jsmith 3551 284 jsmith 3555 290 jsmith 3556 291 jsmith 3559 411 jsmith 3560 412 jsmith 3561 414 jsmith 3562 359 jsmith 3563 248 jsmith 3564 388 jsmith 3565 445 jsmith 3566 520 jsmith 3567 236 jsmith 3568 63 jsmith 3569 495 jsmith 3570 247 jsmith 3571 65 jsmith 3572 394 jsmith 3573 64 jsmith 3574 68 jsmith 3575 124 jsmith 3576 87 jsmith 3577 122 jsmith 3578 121 jsmith 3579 100 jsmith 3580 123 jsmith 3582 527 jsmith 3583 526 jsmith 3584 510 jsmith 3585 471 jsmith 3586 496 jsmith 3588 253 jsmith 3589 169 jsmith 3590 345 jsmith 3591 453 jsmith 3592 399 jsmith 3593 403 jsmith 3595 168 jsmith 3596 166 jsmith 3597 170 jsmith 3598 485 jsmith 3599 167 jsmith 3600 405 jsmith 3601 404 jsmith 3603 503 jsmith 3604 101 jsmith 3606 406 jsmith 3607 23 admin 3608 51 admin 3609 55 admin 3610 56 admin 3611 57 admin 3612 58 admin 3613 61 admin 3614 59 admin 3615 60 admin 3616 50 admin 3617 88 admin 3618 89 admin 3619 111 admin 3620 126 admin 3621 127 admin 3622 141 admin 3623 142 admin 3624 180 admin 3625 181 admin 3626 190 admin 3627 192 admin 3628 193 admin 3629 194 admin 3630 195 admin 3631 196 admin 3632 197 admin 3633 198 admin 3634 199 admin 3635 200 admin 3636 201 admin 3637 232 admin 3638 203 admin 3639 233 admin 3640 70 admin 3641 234 admin 3642 235 admin 3643 211 admin 3644 212 admin 3645 239 admin 3646 242 admin 3647 257 admin 3648 258 admin 3649 273 admin 3650 274 admin 3651 281 admin 3652 336 admin 3653 337 admin 3654 346 admin 3655 347 admin 3656 348 admin 3657 355 admin 3658 385 admin 3659 386 admin 3660 389 admin 3661 393 admin 3662 459 admin 3663 460 admin 3664 22 admin 3665 490 admin 3666 491 admin 3667 498 admin 3668 518 admin 3669 541 admin 3670 542 admin 3671 543 admin 3672 544 admin 3673 123 admin 3674 124 admin 3675 68 admin 3676 166 admin 3677 167 admin 3678 168 admin 3679 169 admin 3680 170 admin 3681 236 admin 3682 247 admin 3683 248 admin 3684 253 admin 3685 3 admin 3686 345 admin 3687 359 admin 3688 388 admin 3689 394 admin 3690 399 admin 3691 403 admin 3692 404 admin 3693 406 admin 3694 445 admin 3695 453 admin 3696 471 admin 3697 485 admin 3698 486 admin 3699 100 admin 3700 63 admin 3701 64 admin 3702 65 admin 3703 73 admin 3704 121 admin 3705 122 admin 3706 101 admin 3707 87 admin 3708 495 admin 3709 496 admin 3710 499 admin 3711 502 admin 3712 503 admin 3713 504 admin 3714 505 admin 3715 506 admin 3716 500 admin 3717 510 admin 3718 512 admin 3719 520 admin 3720 526 admin 3721 527 admin 3722 540 admin 3727 405 admin 3728 541 jsmith 3729 542 jsmith 3730 543 jsmith 3731 544 jsmith 3763 605 admin 3764 606 admin 3765 607 admin 3766 608 admin 3767 609 admin 3768 610 admin 3769 611 admin 3770 612 admin 3771 613 admin 3772 614 admin 3773 615 admin 3774 616 admin 3775 617 admin 3776 618 admin 3777 619 admin 3778 620 admin 3779 621 admin 3780 622 admin 3781 623 admin 3782 624 admin 3783 625 admin 3784 626 admin 3785 627 admin 3786 628 admin 3787 636 admin 3788 637 admin 3789 638 admin 3790 639 admin 3791 640 admin 3792 641 admin 3793 642 admin 3794 643 admin 3795 644 admin 3796 629 jsmith 3797 630 jsmith 3798 632 jsmith 3799 631 jsmith 3800 649 jsmith 3801 650 jsmith 3802 626 jsmith 3803 627 jsmith 3804 628 jsmith 3805 605 jsmith 3806 606 jsmith 3807 607 jsmith 3808 608 jsmith 3809 609 jsmith 3810 610 jsmith 3811 611 jsmith 3812 612 jsmith 3813 613 jsmith 3814 614 jsmith 3815 615 jsmith 3816 616 jsmith 3817 617 jsmith 3818 618 jsmith 3819 619 jsmith 3820 620 jsmith 3821 621 jsmith 3822 622 jsmith 3823 623 jsmith 3824 624 jsmith 3825 625 jsmith 3826 550 jsmith 3827 549 jsmith 3828 551 jsmith 3829 645 jsmith 3830 647 jsmith 3831 648 jsmith 3832 505 jsmith 3833 502 jsmith 3834 506 jsmith 3835 641 jsmith 3836 642 jsmith 3837 640 jsmith 3838 639 jsmith 3839 638 jsmith 3840 636 jsmith 3841 637 jsmith 3842 643 jsmith 3843 644 jsmith 3844 672 admin 3845 674 admin 3846 675 admin 3847 673 admin \. -- -- Data for Name: vendaddrinfo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY vendaddrinfo (vendaddr_id, vendaddr_vend_id, vendaddr_code, vendaddr_name, vendaddr_comments, vendaddr_cntct_id, vendaddr_addr_id, vendaddr_taxzone_id) FROM stdin; 34 78 100 Accounts Payable 9 8 \N 35 83 Store 1213 Office Plus Mega Center 15 11 \N 36 78 REMIT TPARTS Remit To Address 5 17 \N \. -- -- Data for Name: vendinfo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY vendinfo (vend_id, vend_name, vend_lastpurchdate, vend_active, vend_po, vend_comments, vend_pocomments, vend_number, vend_1099, vend_exported, vend_fobsource, vend_fob, vend_terms_id, vend_shipvia, vend_vendtype_id, vend_qualified, vend_ediemail, vend_ediemailbody, vend_edisubject, vend_edifilename, vend_accntnum, vend_emailpodelivery, vend_restrictpurch, vend_edicc, vend_curr_id, vend_cntct1_id, vend_cntct2_id, vend_addr_id, vend_match, vend_ach_enabled, vend_ach_accnttype, vend_ach_use_vendinfo, vend_ach_indiv_number, vend_ach_indiv_name, vend_ediemailhtml, vend_ach_routingnumber, vend_ach_accntnumber, vend_taxzone_id, vend_accnt_id, vend_expcat_id, vend_tax_id) FROM stdin; 92 United Parcel Service \N t f UPS f \N W 43 UPS 18 t 1212311 f t 1 24 \N 27 f f K f f +\\351\\263\\360\\006\\020\\305\\375 +\\351\\263\\360\\006\\020\\305\\375 \N \N -1 -1 86 Virginia IRS \N f f VA TAX f \N W 42 USPS 18 f 121112 f f 1 19 \N 15 f f K t f \N \N -1 -1 87 North Carolina IRS \N f f NC TAX f \N W 42 UPS 18 f f f 1 18 \N 16 f f K t f \N \N -1 -1 95 John Smith \N t f JSMITH f \N W 43 UPS 18 f \N \N \N \N \N f \N 1 \N \N \N f f K f f \N \N -1 -1 85 International Chrome Technologies \N t f ICHROME f \N W 42 Private 19 t matherton@openmfg.com Dear CTI:\n\nPlease see the attached Purchase Order number:\n\n\n\nRegards,\n\nProDiem Purchasing Department Purchase Order Attached PO_ 1231114 t t demo.openmfg.com 1 16 \N 13 f f K t f +\\351\\263\\360\\006\\020\\305\\375 +\\351\\263\\360\\006\\020\\305\\375 \N \N -1 -1 78 Toy Parts Inc. \N t f Default Vendor Notes From Vendor Master TPARTS f \N W 42 UPS 18 f demo@openmfg.com Dear TPARTS:\n\nPlease see the attached PO and contact us immediately if there are any issues.\n\nThanks,\n\nProDiem Purchasing. PO Attached Prodiem 110022 t f demo@openmfg.com 1 5 \N 5 f t K t f \\263\\270\\271Nsd\\262\\342\\011\\350\\264\\322]\\315L\\303 S\\233g6S\\326m;\\3540\\275\\016\\020\\274\\002]\\3663\\027\\371\\353\\370\\215~ 4 \N -1 -1 83 Office Plus \N t f VOFFP f \N W 42 UPS 18 f 101221 f f 1 15 14 11 f f K t f +\\351\\263\\360\\006\\020\\305\\375 +\\351\\263\\360\\006\\020\\305\\375 \N \N -1 -1 88 World Chem, Inc. \N t f Please contact World Chems supplier representative at 703-936-1212 if there are any questions. WCHEM f \N W 42 UPS 18 t 123111 f t 1 22 \N 20 f f K t f +\\351\\263\\360\\006\\020\\305\\375 +\\351\\263\\360\\006\\020\\305\\375 \N \N -1 -1 79 Packaging Pros LTD \N t f XPPI f \N W 42 UPS 18 f demo@openmfg.com Dear XPPI:\n\nPlease see the attached Purchase Order.\n\nRegards,\n\nProDiem Toys\n\n ProDiem PO PO_ 321121 t f demo@openmfg.com 2 6 7 6 f f K t f +\\351\\263\\360\\006\\020\\305\\375 +\\351\\263\\360\\006\\020\\305\\375 \N \N -1 -1 94 Diamond Manufacturing \N t f DMFG f \N W 43 UPS 20 t \N \N \N \N 43232 \N t \N 1 35 \N 35 f f K f f +\\351\\263\\360\\006\\020\\305\\375 +\\351\\263\\360\\006\\020\\305\\375 \N \N -1 -1 97 Admin \N t f ADMIN f \N W 43 UPS 22 f \N \N \N \N admin \N f \N 1 32 \N 40 f f K f f +\\351\\263\\360\\006\\020\\305\\375 +\\351\\263\\360\\006\\020\\305\\375 \N \N -1 -1 \. -- -- Data for Name: vendtype; Type: TABLE DATA; Schema: public; Owner: admin -- COPY vendtype (vendtype_id, vendtype_code, vendtype_descrip) FROM stdin; 18 STANDARD Standard Vendor 19 OP Outside Processor 20 DS Drop Shipper 21 CONTRACTOR Contractor 22 EMPLOYEE Employee \. -- -- Data for Name: vodist; Type: TABLE DATA; Schema: public; Owner: admin -- COPY vodist (vodist_id, vodist_poitem_id, vodist_vohead_id, vodist_costelem_id, vodist_accnt_id, vodist_amount, vodist_qty, vodist_expcat_id, vodist_tax_id, vodist_discountable, vodist_notes) FROM stdin; 118 432 175 3 \N 100.000000 200.000000 -1 -1 t \N 136 449 188 3 \N 50.000000 500.000000 -1 -1 t \N 119 433 175 3 \N 50.000000 100.000000 -1 -1 t \N 120 434 175 3 \N 100.000000 400.000000 -1 -1 t \N 137 450 190 3 \N 40.000000 500.000000 -1 -1 t \N 121 435 175 3 \N 1.000000 10.000000 -1 -1 t \N 122 436 175 3 \N 1.000000 100.000000 -1 -1 t \N 138 451 192 3 \N 50.000000 500.000000 -1 -1 t \N 123 437 177 3 \N 1.000000 8.000000 -1 -1 t \N 124 -1 182 -1 -1 200.000000 \N 16 -1 t \N 125 438 184 3 \N 100.000000 400.000000 -1 -1 t \N 126 439 184 3 \N 100.000000 400.000000 -1 -1 t \N 140 452 195 3 \N 10.000000 100.000000 -1 -1 t \N 127 440 184 3 \N 150.000000 300.000000 -1 -1 t \N 128 441 184 3 \N 10.000000 10.000000 -1 -1 t \N 141 453 197 3 \N 50.000000 1000.000000 -1 -1 t \N 129 442 184 3 \N 107.000000 492.000000 -1 -1 t \N 130 443 184 3 \N 150.000000 300.000000 -1 -1 t \N 142 454 199 3 \N 100.000000 500.000000 -1 -1 t \N 131 444 184 3 \N 100.000000 400.000000 -1 -1 t \N 132 445 186 3 \N 2500.000000 10000.000000 -1 -1 t \N 143 455 202 3 \N 25.000000 100.000000 -1 -1 t \N 133 446 186 3 \N 2500.000000 10000.000000 -1 -1 t \N 134 447 186 3 \N 4000.000000 40000.000000 -1 -1 t \N 144 456 204 3 \N 20.000000 90.000000 -1 -1 t \N 135 448 186 3 \N 50.000000 100.000000 -1 -1 t \N 145 460 206 3 \N 10.000000 10.000000 -1 -1 t \N 146 461 206 3 \N 190.000000 10.000000 -1 -1 t \N 147 462 209 3 \N 25.000000 100.000000 -1 -1 t \N 148 463 211 3 \N 25.000000 100.000000 -1 -1 t \N 149 464 213 3 \N 25.000000 100.000000 -1 -1 t \N 150 465 215 3 \N 25.000000 25.000000 -1 -1 t \N 151 466 217 3 \N 25.000000 100.000000 -1 -1 t \N 152 467 219 3 \N 50.000000 100.000000 -1 -1 t \N 154 472 226 3 \N 100.000000 100.000000 -1 -1 t \N 153 468 221 3 \N 25.000000 100.000000 -1 -1 t \N 155 473 228 3 \N 33.000000 100.000000 -1 -1 t \N 156 -1 231 -1 -1 3417.000000 \N 16 -1 t \N 157 -1 232 -1 -1 5423.000000 \N 16 -1 t \N 160 -1 238 -1 -1 2000.000000 \N 16 -1 t \N 158 475 234 3 \N 100.000000 100.000000 -1 -1 t \N 161 -1 238 -1 110 1000.000000 \N -1 -1 t \N 162 -1 238 -1 119 1000.000000 \N -1 -1 t \N 163 -1 238 -1 120 5000.000000 \N -1 -1 t \N 159 478 235 3 \N 100.000000 400.000000 -1 -1 t \N 164 479 240 3 \N 50.000000 200.000000 -1 -1 t \N 165 480 242 3 \N 2.500000 5.000000 -1 -1 t \N 166 481 245 3 \N 140.000000 50.000000 -1 -1 t \N 167 482 245 3 \N 1000.000000 1000.000000 -1 -1 t \N 168 484 245 3 \N 1600.000000 1600.000000 -1 -1 t \N 169 485 245 3 \N 500.000000 100.000000 -1 -1 t \N 170 486 245 3 \N 200.000000 200.000000 -1 -1 t \N 171 487 245 3 \N 200.000000 200.000000 -1 -1 t \N 172 488 245 3 \N 200.000000 200.000000 -1 -1 t \N 173 483 247 3 \N 0.880000 100.000000 -1 -1 t \N 174 -1 250 -1 -1 399.000000 \N 16 -1 t \N 175 489 252 3 \N 23.350000 100.000000 -1 -1 t \N 176 490 254 3 \N 10.000000 10.000000 -1 -1 t \N 178 -1 257 -1 -1 25.000000 \N 19 -1 t \N 179 -1 259 -1 -1 100.000000 \N 19 -1 t \N 182 492 264 3 \N 25.000000 100.000000 -1 -1 t \N 180 -1 260 -1 -1 1200.000000 \N 15 -1 t \N 181 491 262 3 \N 25.000000 100.000000 -1 -1 t \N 183 493 264 3 \N 300.000000 1.000000 -1 -1 t \N 184 -1 264 -1 -1 50.000000 \N 17 -1 t \N 185 495 267 3 \N 1250.000000 5000.000000 -1 -1 t \N 186 494 269 3 \N 1284.250000 5500.000000 -1 -1 t \N 187 496 271 3 \N 25.000000 100.000000 -1 -1 t \N 188 497 271 3 \N 250.000000 250.000000 -1 -1 t \N 189 498 274 3 \N 23.350000 100.000000 -1 -1 t \N 190 -1 274 -1 120 10.000000 \N -1 -1 t \N 191 -1 276 -1 -1 10.000000 \N 17 -1 t \N 192 499 276 3 \N 25.000000 100.000000 -1 -1 t \N 193 500 278 3 \N 1000.000000 1000.000000 -1 -1 t \N 194 501 278 3 \N 100.000000 1000.000000 -1 -1 t \N 195 502 278 3 \N 9.000000 100.000000 -1 -1 t \N 196 502 278 21 \N 1.000000 100.000000 -1 -1 t \N 197 503 280 3 \N 45.000000 5.000000 -1 -1 t \N 198 503 280 21 \N 5.000000 5.000000 -1 -1 t \N 199 -1 282 -1 -1 20.000000 \N 20 -1 t \N 200 504 282 3 \N 12.500000 5000.000000 -1 -1 t \N 201 506 282 3 \N 23.750000 9500.000000 -1 -1 t \N 202 505 284 3 \N 1200.000000 100.000000 -1 -1 t \N 203 -1 284 -1 -1 100.000000 \N 20 -1 t \N 205 507 288 3 \N 1200.000000 100.000000 -1 -1 t \N 206 -1 288 -1 -1 100.000000 \N 20 -1 t \N 207 510 290 3 \N 5.000000 2000.000000 -1 -1 t \N 208 511 290 3 \N 7.500000 3000.000000 -1 -1 t \N 209 -1 290 -1 -1 20.000000 \N 20 -1 t \N 210 508 291 3 \N 25.000000 100.000000 -1 -1 t \N 211 512 291 3 \N 25.000000 100.000000 -1 -1 t \N 212 513 296 3 \N 5000.000000 5000.000000 -1 -1 t \N 213 514 296 3 \N 340.000000 1700.000000 -1 -1 t \N 214 515 296 3 \N 1600.000000 16000.000000 -1 -1 t \N 215 -1 296 -1 -1 60.000000 \N 20 -1 t \N 216 516 298 3 \N 1100.000000 1100.000000 -1 -1 t \N 217 517 300 3 \N 239.800000 1199.000000 -1 -1 t \N 218 518 300 3 \N 1250.000000 1000.000000 -1 -1 t \N 219 519 301 3 \N 2500.000000 2000.000000 -1 -1 t \N 220 520 304 3 \N 25.000000 100.000000 -1 -1 t \N 221 -1 304 -1 -1 10.000000 \N 20 -1 t \N 222 521 306 3 \N 33330.000000 3333.000000 -1 -1 t \N 223 -1 306 -1 -1 170.000000 \N 20 -1 t \N 224 521 308 3 \N 66670.000000 6667.000000 -1 -1 t \N 225 -1 308 -1 -1 330.000000 \N 20 -1 t \N 226 522 312 3 \N 1000.000000 100.000000 -1 -1 t \N 227 522 312 21 \N 100.000000 100.000000 -1 -1 t \N 228 524 314 3 \N 550.000000 100.000000 -1 -1 t \N 229 525 316 3 \N 50.000000 200.000000 -1 -1 t \N 230 -1 316 -1 -1 20.000000 \N 20 -1 t \N 231 526 318 3 \N 8000.000000 1000.000000 -1 -1 t \N 232 527 318 3 \N 5000.000000 1000.000000 -1 -1 t \N 233 528 318 3 \N 6000.000000 1000.000000 -1 -1 t \N 234 -1 318 -1 -1 1000.000000 \N 20 -1 t \N 235 530 321 3 \N 25.000000 100.000000 -1 -1 t \N 236 529 322 3 \N 91.000000 91.000000 -1 -1 t \N 237 531 324 3 \N 50000.000000 5000.000000 -1 -1 t \N 238 -1 326 -1 111 50000.000000 \N -1 -1 t \N 239 536 328 3 \N 2660.000000 1000.000000 -1 -1 t \N 240 537 328 3 \N 2660.000000 1000.000000 -1 -1 t \N 241 538 328 3 \N 2660.000000 1000.000000 -1 -1 t \N 242 -1 330 -1 -1 500.000000 \N 15 -1 t \N 243 -1 332 -1 -1 1500.000000 \N 17 -1 t \N 244 -1 332 -1 -1 300.000000 \N 20 -1 t \N 245 539 334 3 \N 1000.000000 1000.000000 -1 -1 t \N 246 540 334 3 \N 1000.000000 1000.000000 -1 -1 t \N 247 542 336 3 \N 200.000000 1000.000000 -1 -1 t \N 248 -1 338 -1 111 25000.000000 \N -1 -1 t \N 249 545 340 3 \N 25000.000000 25000.000000 -1 -1 t \N 250 546 340 3 \N 6000.000000 60000.000000 -1 -1 t \N 251 543 340 3 \N 2000.000000 10000.000000 -1 -1 t \N 252 544 340 3 \N 15000.000000 60000.000000 -1 -1 t \N 253 547 340 3 \N 90.000000 1000.000000 -1 -1 t \N 254 547 340 21 \N 10.000000 1000.000000 -1 -1 t \N 255 548 342 3 \N 50.000000 200.000000 -1 -1 t \N 256 549 344 3 \N 150.000000 600.000000 -1 -1 t \N 257 550 345 3 \N 98.000000 100.000000 -1 -1 t \N 258 551 345 3 \N 97.000000 100.000000 -1 -1 t \N 259 552 345 3 \N 99.000000 100.000000 -1 -1 t \N 260 553 346 3 \N 9.800000 10.000000 -1 -1 t \N 261 554 346 3 \N 9.700000 10.000000 -1 -1 t \N 262 555 348 3 \N 1071.500000 5000.000000 -1 -1 t \N 263 556 354 3 \N 48.500000 50.000000 -1 -1 t \N 264 557 354 3 \N 49.500000 50.000000 -1 -1 t \N 265 558 354 3 \N 49.000000 50.000000 -1 -1 t \N 266 559 354 3 \N 550.000000 50.000000 -1 -1 t \N 267 -1 354 -1 -1 100.000000 \N 20 -1 f \N 268 -1 357 -1 -1 35000.000000 \N 21 -1 t \N 269 -1 357 -1 -1 500.000000 \N 20 -1 f \N 270 562 359 3 \N 25000.000000 1.000000 -1 -1 t \N 271 563 361 3 \N 532.400000 5324.000000 -1 -1 t \N 272 564 363 3 \N 870.000000 870.000000 -1 -1 t \N 273 -1 363 -1 -1 30.000000 \N 20 -1 t \N 274 565 365 3 \N 1264.370000 5900.000000 -1 -1 t \N 275 -1 365 -1 -1 100.000000 \N 20 -1 t \N 276 566 367 3 \N 5000.000000 50000.000000 -1 -1 t \N 277 -1 367 -1 -1 500.000000 \N 20 -1 t \N 279 567 369 3 \N 300.000000 100.000000 -1 -1 t \N 281 568 369 3 \N 400.000000 4000.000000 -1 -1 t \N 284 571 370 3 \N 2.000000 25.000000 -1 -1 t \N 285 571 370 21 \N 0.500000 25.000000 -1 -1 t \N 286 570 370 3 \N 2500.000000 10000.000000 -1 -1 t \N 287 569 370 3 \N 2000.000000 10000.000000 -1 -1 t \N 288 572 372 3 \N 8000.000000 8000.000000 -1 -1 t \N 289 573 372 3 \N 1800.000000 18000.000000 -1 -1 t \N 290 574 372 3 \N 150.000000 2000.000000 -1 -1 t \N 291 574 372 21 \N 50.000000 2000.000000 -1 -1 t \N 292 575 378 3 \N 125.000000 1.000000 -1 -1 t \N 294 576 380 3 \N 22000.000000 1000.000000 -1 -1 t \N 295 577 382 3 \N 200.000000 1000.000000 -1 -1 t \N 296 -1 385 -1 -1 300.000000 \N 20 -1 t 297 -1 385 -1 -1 700.000000 \N 17 -1 t 298 -1 385 -1 -1 40.000000 \N -1 16 t 299 578 387 3 \N 66.000000 3.000000 -1 -1 t 300 -1 387 -1 -1 25.000000 \N 20 -1 t 301 579 389 3 \N 22000.000000 1000.000000 -1 -1 t \N 302 580 391 3 \N 44000.000000 2000.000000 -1 -1 t \N 303 -1 391 -1 -1 3500.000000 \N 20 -1 t 304 -1 393 -1 -1 1000.000000 \N 15 -1 t 305 -1 396 -1 -1 100.000000 \N 15 -1 t 306 587 398 3 \N 12500.000000 10000.000000 -1 -1 t \N 307 -1 398 -1 -1 100.000000 \N 20 -1 t 309 584 401 3 \N 1500.000000 1500.000000 -1 -1 t \N 310 585 401 3 \N 200.000000 1000.000000 -1 -1 t \N 311 582 402 3 \N 1000.000000 1000.000000 -1 -1 t \N 312 -1 404 -1 -1 1930.000000 \N 17 -1 t 327 599 424 3 \N 21.130000 100.000000 -1 -1 t \N 315 589 410 3 \N 88000.000000 4000.000000 -1 -1 t \N 316 590 411 3 \N 66000.000000 3000.000000 -1 -1 t \N 317 592 413 3 \N 15000.000000 5000.000000 -1 -1 t 318 593 415 3 \N 10000.000000 10000.000000 -1 -1 t \N 319 594 415 3 \N 5588.000000 55880.000000 -1 -1 t \N 320 595 415 3 \N 2000.000000 10000.000000 -1 -1 t \N 321 -1 415 -1 -1 558.000000 \N 19 -1 t 322 597 417 3 \N 100.000000 100.000000 -1 -1 t \N 323 -1 417 -1 -1 35.000000 \N 20 -1 t 324 588 420 3 \N 44000.000000 2000.000000 -1 -1 t \N 325 -1 420 -1 -1 500.000000 \N 20 -1 t 326 598 422 3 \N 55000.000000 2500.000000 -1 -1 t \N 328 -1 424 -1 -1 10.000000 \N 20 -1 t 329 600 426 3 \N 22000.000000 1000.000000 -1 -1 t \N 330 -1 426 -1 -1 500.000000 \N 20 -1 t 331 -1 428 -1 159 275.000000 \N -1 -1 t 12/30/10\tHOTEL\t\t 332 -1 428 -1 159 181.050000 \N -1 -1 t 12/30/10\tMILEAGE\t\t 333 601 429 3 \N 110000.000000 5000.000000 -1 -1 t \N 334 -1 431 -1 -1 989.000000 \N 17 -1 t 335 -1 431 -1 -1 85.000000 \N 20 -1 t 336 596 433 3 \N 2200.000000 100.000000 -1 -1 t \N 337 -1 433 -1 -1 200.000000 \N 20 -1 t 338 604 435 3 \N 400.000000 400.000000 -1 -1 t \N 339 602 438 3 \N 22000.000000 1000.000000 -1 -1 t \N 340 -1 438 -1 -1 0.000000 \N 20 -1 t 341 603 440 3 \N 1000.000000 1000.000000 -1 -1 t \N 342 -1 440 -1 -1 0.000000 \N 20 -1 t 343 -1 442 -1 -1 200.000000 \N 20 -1 t 344 -1 442 -1 -1 355.000000 \N 17 -1 t 345 605 444 3 \N 66000.000000 3000.000000 -1 -1 t \N 346 -1 444 -1 -1 3000.000000 \N 20 -1 t 347 -1 446 -1 -1 3000.000000 \N 17 -1 t 348 607 448 3 \N 110000.000000 5000.000000 -1 -1 t \N 349 -1 448 -1 -1 3000.000000 \N 20 -1 t 350 606 451 3 \N 77000.000000 3500.000000 -1 -1 t \N \. -- -- Data for Name: vohead; Type: TABLE DATA; Schema: public; Owner: admin -- COPY vohead (vohead_id, vohead_number, vohead_pohead_id, vohead_posted, vohead_duedate, vohead_invcnumber, vohead_amount, vohead_docdate, vohead_1099, vohead_distdate, vohead_reference, vohead_terms_id, vohead_vend_id, vohead_curr_id, vohead_adjtaxtype_id, vohead_freighttaxtype_id, vohead_gldistdate, vohead_misc, vohead_taxzone_id, vohead_taxtype_id, vohead_notes, vohead_recurring_vohead_id) FROM stdin; 175 30000 347 t 2006-01-26 VN-101 3000.0000 2005-12-27 f 2005-12-27 RF-MDA201 42 78 1 \N \N \N \N \N 1 \N \N 188 30005 357 t 2006-01-28 VN-01 50.0000 2005-12-29 f 2005-12-29 RF-01 42 78 1 \N \N \N \N \N 1 \N \N 177 30001 349 t 2006-01-26 VN-2 1.0000 2005-12-27 f 2005-12-27 RF-MDA202 42 78 1 \N \N \N \N \N 1 \N \N 182 30002 -1 t 2006-01-26 VN-100 200.0000 2005-12-27 f 2005-12-27 RF-200 42 78 1 \N \N \N \N \N 1 \N \N 190 30006 359 t 2006-01-28 VN-1 40.0000 2005-12-29 f 2005-12-29 RF-1 42 78 1 \N \N \N \N \N 1 \N \N 184 30003 352 t 2006-01-28 VN-27 1000.0000 2005-12-29 f 2005-12-29 RF-01 42 78 1 \N \N \N \N \N 1 \N \N 192 30007 361 t 2006-01-28 VN-3 50.0000 2005-12-29 f 2005-12-29 RF-3 42 78 1 \N \N \N \N \N 1 \N \N 186 30004 355 t 2006-01-28 VN-001 13050.0000 2005-12-29 f 2005-12-29 RF-002 42 78 1 \N \N \N \N \N 1 \N \N 195 30008 363 t 2006-01-29 44 20.0000 2005-12-30 f 2005-12-30 55 42 78 1 \N \N \N \N \N 1 \N \N 197 30009 365 t 2006-01-29 50 50.0000 2005-12-30 f 2005-12-30 50 42 78 1 \N \N \N \N \N 1 \N \N 199 30010 367 t 2006-01-29 VN 100.0000 2005-12-30 f 2005-12-30 RF 42 78 1 \N \N \N \N \N 1 \N \N 202 30011 369 t 2006-02-08 VN-01-99 25.0000 2006-01-09 f 2006-01-09 RF-01 42 78 1 \N \N \N \N \N 1 \N \N 204 30012 371 t 2006-02-28 VN-102 20.0000 2006-01-09 f 2006-01-09 RF-101 42 78 1 \N \N \N \N \N 1 \N \N 206 30013 381 t 2006-01-12 VN-0199 200.0000 2006-01-12 f 2006-01-12 RF-01 42 78 1 \N \N \N \N \N 1 \N \N 209 30014 383 t 2006-02-12 VN-9311 25.0000 2006-01-13 f 2006-01-13 RF-9891 42 78 1 \N \N \N \N \N 1 \N \N 211 30015 385 t 2006-02-12 55443 25.0000 2006-01-13 f 2006-01-13 5433 42 78 1 \N \N \N \N \N 1 \N \N 213 30016 387 t 2006-03-01 VN-01221 25.0000 2006-01-30 f 2006-01-30 RF-901221 42 78 1 \N \N \N \N \N 1 \N \N 215 30017 389 t 2006-03-01 VN-00133 25.0000 2006-01-30 f 2006-01-30 RF-01221 42 78 1 \N \N \N \N \N 1 \N \N 217 30018 391 t 2006-03-02 TP-10112 25.0000 2006-01-31 f 2006-01-31 RF-01-2006 42 78 1 \N \N \N \N \N 1 \N \N 219 30019 393 t 2006-08-04 12113 50.0000 2006-07-05 f 2006-07-05 RF-1012 42 78 1 \N \N \N \N \N 1 \N \N 226 30021 402 t 2006-11-10 ER10211 100.0000 2006-10-11 f 2006-10-11 RF-0101 42 79 2 \N \N \N \N \N 1 \N \N 221 30020 395 t 2006-08-04 56571 25.0000 2006-07-05 f 2006-07-05 15378 42 78 1 \N \N \N \N \N 1 \N \N 228 30022 405 t 2006-11-12 VN-3301 33.0000 2006-10-13 f 2006-10-13 RF-001 42 78 1 \N \N \N \N \N 1 \N \N 231 30023 -1 t 2007-01-04 123001 3417.0000 2006-12-05 f 2006-12-05 MDA-001 42 78 1 \N \N \N \N \N 1 \N \N 232 30024 -1 t 2007-01-04 123119 5423.0000 2006-12-05 f 2006-12-05 MDA-001 42 78 1 \N \N \N \N \N 1 \N \N 238 30027 -1 t 2007-02-02 120311 9000.0000 2007-01-03 f 2007-01-03 RF-0111 42 78 1 \N \N \N \N \N 1 \N \N 234 30025 412 t 2007-01-27 VN-2177 100.0000 2006-12-28 f 2006-12-28 RE-11231 42 78 1 \N \N \N \N \N 1 \N \N 235 30026 415 t 2007-01-27 VI-12311 100.0000 2006-12-28 f 2006-12-28 REF-986 42 79 2 \N \N \N \N \N 1 \N \N 240 30028 417 t 2007-03-22 INV-0010 50.0000 2007-02-20 f 2007-02-20 RF-1010 42 78 1 \N \N \N \N \N 1 \N \N 242 30029 419 t 2007-06-29 10019919 2.5000 2007-05-30 f 2007-05-30 2.100101 42 78 1 \N \N \N \N \N 1 \N \N 245 30030 421 t 2007-06-29 9298887 3840.0000 2007-05-30 f 2007-05-30 2.101001 42 78 1 \N \N \N \N \N 1 \N \N 247 30031 423 t 2007-06-29 19291991 0.8800 2007-05-30 f 2007-05-30 2.1 42 79 2 \N \N \N \N \N 1 \N \N 250 30032 -1 t 2007-06-29 STORE BUY 399.0000 2007-05-30 f 2007-05-30 12311121 42 83 1 \N \N \N \N \N 1 \N \N 252 30033 425 t 2007-06-29 1231111 23.3500 2007-05-30 f 2007-05-30 RF01991 42 79 2 \N \N 2007-05-30 \N \N 1 \N \N 254 30034 427 t 2007-06-29 RF09090 10.0000 2007-05-30 f 2007-05-30 RF989898 42 85 1 \N \N 2007-05-30 \N \N 1 \N \N 257 30035 -1 t 2007-05-30 VN10001 25.0000 2007-05-30 f 2007-05-30 RF09090 42 87 1 \N \N 2007-05-30 \N \N 1 \N \N 259 30036 -1 t 2007-07-04 NCIRS-10101 100.0000 2007-06-04 f 2007-06-04 MA_22 42 87 1 \N \N 2007-06-04 \N \N 1 \N \N 264 30039 432 t 2007-10-21 RM1001 375.0000 2007-09-21 f 2007-09-21 MA-1001 42 78 1 \N \N 2007-09-21 \N \N 1 \N \N 260 30037 -1 t 2007-08-03 VN-1001 1200.0000 2007-07-04 f 2007-07-04 RF-01001 42 83 1 \N \N 2007-07-04 \N \N 1 \N \N 262 30038 429 t 2007-09-30 123111 25.0000 2007-08-31 f 2007-08-31 MA22 42 78 1 \N \N 2007-08-31 \N \N 1 \N \N 267 30040 436 t 2008-01-13 VN01001 1250.0000 2007-12-14 f 2007-12-14 RF01001 42 78 1 \N \N 2007-12-14 \N \N 1 \N \N 269 30041 434 t 2008-01-13 VN010010 1284.2500 2007-12-14 f 2007-12-14 RF010001 42 79 2 \N \N 2007-12-14 \N \N 1 \N \N 271 30042 438 t 2008-04-03 MA_10001 275.0000 2008-03-04 f 2008-03-04 RF1020011 42 78 1 \N \N 2008-03-04 \N \N 1 \N \N 276 30044 443 t 2008-04-04 1000100 35.0000 2008-03-05 f 2008-03-05 RF10001 42 78 1 \N \N 2008-03-05 \N \N 1 \N \N 278 30045 445 t 2008-05-04 VN100 1110.0000 2008-04-04 f 2008-04-04 MF1010 42 78 1 \N \N 2008-04-04 \N \N 1 \N \N 274 30043 441 t 2008-04-03 XP10010 33.3500 2008-03-04 f 2008-03-04 MA10001 42 79 2 \N \N 2008-03-04 \N \N 1 \N \N 280 30046 447 t 2008-07-05 NEG-7ID 50.0000 2008-06-05 f 2008-06-12 0DD 42 79 2 \N \N 2008-06-12 \N \N 1 \N \N 284 30048 451 t 2008-07-12 123111 1300.0000 2008-06-12 f 2008-06-12 RF10001 42 88 1 \N \N 2008-06-12 \N \N 1 \N \N 288 30049 453 t 2008-07-12 VN10001 1300.0000 2008-06-12 f 2008-06-12 RF10001 42 88 1 \N \N 2008-06-12 \N \N 1 \N \N 282 30047 449 t 2008-07-12 -14-7-0712 56.2500 2008-05-29 f 2008-06-05 6873 42 79 2 \N \N 2008-06-05 \N \N 1 \N \N 290 30050 458 t 2008-07-18 123111 32.5000 2008-06-18 f 2008-06-18 MA12311 42 79 2 \N \N 2008-06-18 \N \N 1 \N \N 291 30051 456 t 2008-07-18 VN10001 50.0000 2008-06-18 f 2008-06-18 MA002 42 78 1 \N \N 2008-06-18 \N \N 1 \N \N 296 30052 460 t 2008-07-19 V10001 7000.0000 2008-06-19 f 2008-06-19 RF01001 42 78 1 \N \N 2008-06-19 \N \N 1 \N \N 298 30053 462 t 2008-07-19 VN-01001 1100.0000 2008-06-19 f 2008-06-19 RF010012 42 85 1 \N \N 2008-06-19 \N \N 1 \N \N 300 30054 464 t 2008-07-19 51551 1489.8000 2008-06-19 f 2008-06-19 R762772 42 78 1 \N \N 2008-06-19 \N \N 1 \N \N 301 30055 466 t 2008-07-19 61661 2500.0000 2008-06-19 f 2008-06-19 RF19991 42 78 1 \N \N 2008-06-19 \N \N 1 \N \N 304 30056 468 t 2008-07-20 300-1 35.0000 2008-06-20 f 2008-06-20 RF3001 42 78 1 \N \N 2008-06-20 \N \N 1 \N \N 306 30057 470 t 2008-09-08 VN108871 33500.0000 2008-08-01 f 2008-08-01 RF109981 42 78 1 \N \N 2008-08-01 \N \N 1 \N \N 308 30058 470 t 2008-10-08 VI-01002301 67000.0000 2008-09-08 f 2008-09-08 RF1001 42 78 1 \N \N 2008-09-08 \N \N 1 \N \N 314 30060 474 t 2008-10-24 VN10019 550.0000 2008-09-24 f 2008-09-24 RF10019 42 78 1 \N \N 2008-09-24 \N \N 1 \N \N 312 30059 472 t 2008-10-24 VN10019 1100.0000 2008-09-24 f 2008-09-24 RF100191 42 88 1 \N \N 2008-09-24 \N \N 1 \N \N 316 30061 476 t 2008-11-01 VN1001001 70.0000 2008-10-02 f 2008-10-02 RF100191 42 78 1 \N \N 2008-10-02 \N \N 1 \N \N 318 30062 479 t 2008-11-01 VN10010 20000.0000 2008-10-02 f 2008-10-02 RF10001 42 79 2 \N \N 2008-10-02 \N \N 1 \N \N 321 30063 484 t 2009-01-30 VI01001 25.0000 2008-12-31 f 2008-12-31 RF10001 42 78 1 \N \N 2008-12-31 \N \N 1 \N \N 322 30064 481 t 2009-01-30 910091 91.0000 2008-12-31 f 2008-12-31 RF01991 42 85 1 \N \N 2008-12-31 \N \N 1 \N \N 324 30065 486 t 2009-01-30 MOB01 50000.0000 2008-12-31 f 2008-12-31 RF0101 42 78 1 \N \N 2008-12-31 \N \N 1 \N \N 326 30066 -1 t 2008-12-01 1298491 50000.0000 2008-11-01 f 2008-11-01 Purchase Paint Machine 42 88 1 \N \N 2008-11-01 t \N 1 \N \N 328 30067 491 t 2009-02-11 VN79801 7980.0000 2009-01-12 f 2009-01-12 RF101991 42 78 1 \N \N 2009-01-12 \N \N 1 \N \N 330 30068 -1 t 2009-02-11 VN1001 500.0000 2009-01-12 f 2009-01-12 RF10001 43 83 1 \N \N 2009-01-12 t \N 1 \N \N 332 30069 -1 t 2009-02-11 UP10010 1800.0000 2009-01-12 f 2009-01-12 Jan09 43 92 1 \N \N 2009-01-12 t \N 1 \N \N 334 30070 493 t 2009-03-01 1278781 2000.0000 2009-01-30 f 2009-01-30 RF0101 42 79 2 \N \N 2009-01-30 \N \N 1 \N \N 336 30071 495 t 2009-07-26 1231231 200.0000 2009-06-26 f 2009-06-26 311231 42 78 1 \N \N 2009-06-26 \N \N 1 \N \N 338 30072 -1 t 2009-07-26 VN-10001 25000.0000 2009-06-26 f 2009-06-26 Machine SRN#123101 42 88 2 \N \N 2009-06-26 t \N 1 \N \N 340 30073 497 t 2009-09-12 12311 48100.0000 2009-08-13 f 2009-08-13 RF1001 42 78 1 \N \N 2009-08-13 \N \N 1 \N \N 342 30074 499 t 2009-10-16 188771 52.5000 2009-09-16 f 2009-09-16 RF01019 42 78 1 \N \N 2009-09-16 \N 2 \N \N 363 30083 519 t 2009-11-12 56456456 900.0000 2009-10-13 f 2009-10-13 42 85 1 \N \N 2009-10-13 \N \N \N \N 365 30084 521 t 2009-11-12 324234 1364.3700 2009-10-13 f 2009-10-13 42 79 2 \N \N 2009-10-13 \N \N \N \N 367 30085 523 t 2009-11-12 234234 5500.0000 2009-10-13 f 2009-10-13 42 78 1 \N \N 2009-10-13 \N 4 \N \N 344 30075 501 t 2009-10-21 5334 150.0000 2009-09-21 f 2009-09-21 42 78 1 \N \N 2009-09-21 \N \N \N \N 345 30076 503 t 2009-09-21 34234 294.0000 2009-09-21 f 2009-09-21 42 88 1 \N \N 2009-09-21 \N \N \N \N 346 30077 505 t 2009-10-21 6234 19.5000 2009-09-21 f 2009-09-21 42 88 1 \N \N 2009-09-21 \N \N \N \N 348 30078 507 t 2009-10-21 745445 1071.5000 2009-09-21 f 2009-09-21 42 79 2 \N \N 2009-09-21 \N \N \N \N 354 30079 509 t 2009-10-22 12312311 797.0000 2009-09-22 f 2009-09-22 42 88 1 \N \N 2009-09-22 \N \N \N \N 369 30086 525 t 2009-12-03 GF193882 712.0000 2009-11-03 f 2009-11-03 RF103291 42 78 1 \N \N 2009-11-03 \N 4 \N \N 370 30087 527 t 2010-01-02 FG01001 4727.6300 2009-12-03 f 2009-12-03 RF103991 42 78 1 \N \N 2009-12-03 \N 2 \N \N 357 30080 -1 t 2009-10-24 3020299 35500.0000 2009-09-24 f 2009-09-24 ColorCraft Paint Center 42 88 1 \N \N 2009-09-24 t \N \N ColorCraft Paint Cetner CC-101\nSRN-382881 \N 359 30081 515 t 2009-10-24 537726 25500.0000 2009-09-24 f 2009-09-24 42 78 1 \N \N 2009-09-24 \N \N \N \N 361 30082 517 t 2009-10-25 6553435 532.4000 2009-09-25 f 2009-09-25 42 78 1 \N \N 2009-09-25 \N 4 \N \N 372 30088 529 t 2010-01-02 TX01991 10392.0000 2009-12-03 f 2009-12-03 RF19823 42 78 1 \N \N 2009-12-03 \N 4 \N \N 378 30089 531 t 2010-02-05 43234 125.0000 2010-01-06 f 2010-01-06 42 78 1 \N \N 2010-01-06 \N 4 \N \N 404 30102 -1 t 2010-07-07 U1002991 1930.0000 2010-06-07 f 2010-06-07 UPS-6 43 92 1 \N \N 2010-06-07 t \N \N \N 402 30101 542 t 2010-07-07 12342222 1000.0000 2010-06-07 f 2010-06-07 42 85 1 \N \N 2010-06-07 \N \N \N \N 401 30100 545 t 2010-07-07 1231123 1700.0000 2010-06-07 f 2010-06-07 42 78 1 \N \N 2010-06-07 \N 4 \N \N 380 30090 534 t 2010-04-09 54234 22000.0000 2010-03-10 f 2010-03-10 43 94 1 \N \N 2010-03-10 \N \N \N \N 398 30098 548 t 2010-07-07 1312213 12600.0000 2010-06-07 f 2010-06-07 42 78 1 \N \N 2010-06-07 \N 4 \N \N 417 30108 558 t 2010-10-13 MA01001 135.0000 2010-09-13 f 2010-09-13 MDA 42 85 1 \N \N 2010-09-13 \N \N \N \N 382 30091 535 t 2010-04-11 MA472771 208.0000 2010-03-12 f 2010-03-12 42 78 1 \N \N 2010-03-12 \N 4 \N \N 385 30092 -1 t 2010-04-11 1040.0000 2010-03-12 f 2010-03-12 43 92 1 \N \N 2010-03-12 t 2 \N \N 429 30114 564 t 2011-04-06 1231122 110000.0000 2011-03-07 f 2011-03-07 43 94 1 \N \N 2011-03-07 \N \N \N \N 387 30093 537 t 2010-04-11 36661 93.6400 2010-03-12 f 2010-03-12 STRUCK Buy 42 78 1 \N \N 2010-03-12 \N 4 \N \N 389 30094 539 t 2010-05-02 MA1881 22000.0000 2010-04-02 f 2010-04-02 43 94 1 \N \N 2010-04-02 \N \N \N \N 393 30096 -1 t 2010-07-07 W10881 1000.0000 2010-06-07 f 2010-06-07 W-101 42 88 1 \N \N 2010-06-07 t \N \N \N 391 30095 540 t 2010-07-07 IN4656256 47500.0000 2010-06-07 f 2010-06-07 MA-101 43 94 1 \N \N 2010-06-07 \N \N \N \N 420 30109 550 t 2010-12-04 44500.0000 2010-11-04 f 2010-11-04 43 94 1 \N \N 2010-11-04 \N \N \N \N 396 30097 -1 t 2010-07-07 TP001 100.0000 2010-06-07 f 2010-06-07 REF001 42 78 1 \N \N 2010-06-07 t 4 \N \N 451 30126 571 t 2011-07-03 1091991 77000.0000 2011-06-03 f 2011-06-03 43 94 1 \N \N 2011-06-03 \N \N \N \N 442 30121 -1 t 2011-05-30 UX1001001 555.0000 2011-04-30 f 2011-04-30 MA9091 43 92 1 \N \N 2011-04-30 t \N \N \N 410 30104 551 t 2010-08-14 IN10019 88000.0000 2010-07-15 f 2010-07-15 43 94 1 \N \N 2010-07-31 \N \N \N \N 422 30110 560 t 2010-12-04 677623 55000.0000 2010-11-04 f 2010-11-04 43 94 1 \N \N 2010-11-04 \N \N \N \N 411 30105 552 t 2010-09-16 87873 66000.0000 2010-08-17 f 2010-08-17 43 94 1 \N \N 2010-07-31 \N \N \N \N 424 30111 561 t 2010-12-04 543343 31.1300 2010-11-04 f 2010-11-04 42 79 2 \N \N 2010-11-04 \N \N \N \N 413 30106 553 t 2010-10-08 73776 15600.0000 2010-08-10 f 2010-08-10 42 78 1 \N \N 2010-08-15 \N 4 \N \N 415 30107 555 t 2010-10-08 36625 18146.0000 2010-09-08 f 2010-09-08 42 78 1 \N \N 2010-09-08 \N 4 \N \N 433 30117 557 t 2011-05-18 67623773 2400.0000 2011-04-18 f 2011-04-18 MA-01001 43 94 1 \N \N 2011-04-18 \N \N \N \N 435 30118 568 t 2011-05-18 CR-10001 400.0000 2011-04-18 f 2011-04-18 MA-1001 42 85 1 \N \N 2011-04-18 \N \N \N \N 426 30112 563 t 2011-01-29 3433 22500.0000 2010-12-30 f 2010-12-30 MA1001 43 94 1 \N \N 2010-12-30 \N \N \N \N 428 30113 -1 t 2011-01-29 N/A 456.0500 2010-12-30 f 2010-12-30 T&E Sheet 1000 43 97 1 \N \N 2010-12-30 t \N \N \N 444 30122 570 t 2011-07-03 69000.0000 2011-06-03 f 2011-06-03 43 94 1 \N \N 2011-06-03 \N \N \N \N 431 30116 -1 t 2011-04-06 US01001 1074.0000 2011-03-07 f 2011-03-07 43 92 1 \N \N 2011-03-07 t \N \N \N 438 30119 565 t 2011-05-18 12311112 22000.0000 2011-04-18 f 2011-04-18 MA-100101 43 94 1 \N \N 2011-04-18 \N \N \N \N 446 30123 -1 f 2011-07-03 123112 3000.0000 2011-06-03 f 2011-06-03 May 43 92 1 \N \N \N t \N \N \N 440 30120 566 t 2011-05-18 1000.0000 2011-04-18 f 2011-04-18 42 85 1 \N \N 2011-04-18 \N \N \N \N 448 30124 572 t 2011-06-23 1099329 113000.0000 2011-05-24 f 2011-05-24 43 94 1 \N \N 2011-05-19 \N \N \N \N \. -- -- Data for Name: voheadtax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY voheadtax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; 496 385 3 16 0.00 \N 1 0.000000 0.00 -40.000000 2010-03-12 2010-03-12 1 1.000000 6133 \. -- -- Data for Name: voitem; Type: TABLE DATA; Schema: public; Owner: admin -- COPY voitem (voitem_id, voitem_vohead_id, voitem_poitem_id, voitem_close, voitem_qty, voitem_freight, voitem_taxtype_id) FROM stdin; 111 175 432 t 200.000000 0.0000 \N 112 175 433 t 100.000000 0.0000 \N 113 175 434 t 400.000000 0.0000 \N 114 175 435 t 10.000000 0.0000 \N 115 175 436 t 100.000000 0.0000 \N 116 177 437 t 8.000000 0.0000 \N 117 184 438 t 400.000000 0.0000 \N 118 184 439 f 400.000000 0.0000 \N 119 184 440 t 300.000000 0.0000 \N 120 184 441 f 10.000000 0.0000 \N 121 184 442 f 492.000000 0.0000 \N 122 184 443 f 300.000000 0.0000 \N 123 184 444 f 400.000000 0.0000 \N 124 186 445 f 10000.000000 0.0000 \N 125 186 446 t 10000.000000 0.0000 \N 126 186 447 f 40000.000000 4000.0000 \N 127 186 448 f 100.000000 0.0000 \N 128 188 449 f 500.000000 0.0000 \N 129 190 450 t 500.000000 0.0000 \N 130 192 451 f 500.000000 0.0000 \N 131 194 452 f 100.000000 0.0000 \N 132 195 452 f 100.000000 0.0000 \N 133 197 453 t 1000.000000 0.0000 \N 134 199 454 f 500.000000 0.0000 \N 135 202 455 t 100.000000 0.0000 \N 136 204 456 f 90.000000 0.0000 \N 137 206 460 t 10.000000 0.0000 \N 138 206 461 t 10.000000 0.0000 \N 139 209 462 t 100.000000 0.0000 \N 140 211 463 t 100.000000 0.0000 \N 141 213 464 t 100.000000 0.0000 \N 142 215 465 t 25.000000 0.0000 \N 143 217 466 t 100.000000 0.0000 \N 144 219 467 t 100.000000 0.0000 \N 145 221 468 t 100.000000 0.0000 \N 146 226 472 t 100.000000 0.0000 \N 147 228 473 t 100.000000 0.0000 \N 148 234 475 t 100.000000 0.0000 \N 149 235 478 t 400.000000 0.0000 \N 150 240 479 t 200.000000 0.0000 \N 151 242 480 t 5.000000 0.0000 \N 152 245 481 t 50.000000 0.0000 \N 153 245 482 f 1000.000000 0.0000 \N 154 245 484 t 1600.000000 0.0000 \N 155 245 485 t 100.000000 0.0000 \N 156 245 486 t 200.000000 0.0000 \N 157 245 487 t 200.000000 0.0000 \N 158 245 488 t 200.000000 0.0000 \N 159 247 483 t 100.000000 0.0000 \N 160 252 489 t 100.000000 0.0000 \N 161 254 490 t 10.000000 0.0000 \N 162 262 491 t 100.000000 0.0000 \N 163 264 492 t 100.000000 0.0000 \N 164 264 493 t 1.000000 0.0000 \N 165 267 495 t 5000.000000 0.0000 \N 166 269 494 t 5500.000000 0.0000 \N 167 271 496 t 100.000000 0.0000 \N 168 271 497 t 250.000000 0.0000 \N 169 274 498 t 100.000000 0.0000 \N 170 276 499 t 100.000000 0.0000 \N 171 278 500 t 1000.000000 0.0000 \N 172 278 501 t 1000.000000 0.0000 \N 173 278 502 t 100.000000 0.0000 \N 174 280 503 t 5.000000 0.0000 \N 175 282 504 t 5000.000000 0.0000 \N 176 282 506 f 9500.000000 0.0000 \N 177 284 505 t 100.000000 0.0000 \N 179 288 507 t 100.000000 0.0000 \N 180 290 510 t 2000.000000 0.0000 \N 181 290 511 t 3000.000000 0.0000 \N 182 291 508 t 100.000000 0.0000 \N 183 291 512 t 100.000000 0.0000 \N 184 296 513 t 5000.000000 0.0000 \N 185 296 514 t 1700.000000 0.0000 \N 186 296 515 t 16000.000000 0.0000 \N 187 298 516 t 1100.000000 0.0000 \N 188 300 517 t 1199.000000 0.0000 \N 189 300 518 t 1000.000000 0.0000 \N 190 301 519 t 2000.000000 0.0000 \N 191 304 520 t 100.000000 0.0000 \N 192 306 521 f 3333.000000 0.0000 \N 194 312 522 t 100.000000 0.0000 \N 193 308 521 t 6667.000000 0.0000 \N 195 314 524 t 100.000000 0.0000 \N 196 316 525 t 200.000000 0.0000 \N 197 318 526 t 1000.000000 0.0000 \N 198 318 527 t 1000.000000 0.0000 \N 199 318 528 t 1000.000000 0.0000 \N 200 321 530 t 100.000000 0.0000 \N 201 322 529 t 91.000000 0.0000 \N 202 324 531 t 5000.000000 0.0000 \N 203 328 536 t 1000.000000 0.0000 \N 204 328 537 t 1000.000000 0.0000 \N 205 328 538 t 1000.000000 0.0000 \N 206 334 539 t 1000.000000 0.0000 \N 207 334 540 t 1000.000000 0.0000 \N 208 336 542 t 1000.000000 0.0000 \N 209 340 545 t 25000.000000 0.0000 \N 210 340 546 t 60000.000000 0.0000 \N 211 340 543 t 10000.000000 0.0000 \N 212 340 544 t 60000.000000 0.0000 \N 213 340 547 t 1000.000000 0.0000 \N 214 342 548 t 200.000000 0.0000 2 215 344 549 t 600.000000 0.0000 \N 216 345 550 t 100.000000 0.0000 \N 217 345 551 t 100.000000 0.0000 \N 218 345 552 t 100.000000 0.0000 \N 219 346 553 t 10.000000 0.0000 \N 220 346 554 t 10.000000 0.0000 \N 221 348 555 t 5000.000000 0.0000 \N 229 363 564 t 870.000000 0.0000 \N 227 359 562 t 1.000000 500.0000 \N 228 361 563 t 5324.000000 0.0000 \N 224 354 557 t 50.000000 0.0000 \N 223 354 556 t 50.000000 0.0000 2 230 365 565 t 5900.000000 0.0000 \N 225 354 558 t 50.000000 0.0000 \N 231 367 566 t 50000.000000 0.0000 \N 226 354 559 t 50.000000 0.0000 \N 233 369 567 t 100.000000 0.0000 2 235 369 568 t 4000.000000 0.0000 \N 239 370 570 t 10000.000000 0.0000 2 238 370 571 t 25.000000 0.0000 2 240 370 569 t 10000.000000 0.0000 2 242 372 572 t 8000.000000 0.0000 2 243 372 573 t 18000.000000 0.0000 2 244 372 574 t 2000.000000 0.0000 \N 245 378 575 t 1.000000 0.0000 \N 247 380 576 t 1000.000000 0.0000 \N 248 382 577 t 1000.000000 0.0000 2 249 387 578 t 3.000000 0.0000 2 250 389 579 t 1000.000000 0.0000 \N 251 391 580 t 2000.000000 0.0000 \N 252 398 587 t 10000.000000 0.0000 \N 254 401 584 t 1500.000000 0.0000 \N 255 401 585 t 1000.000000 0.0000 \N 256 402 582 t 1000.000000 0.0000 \N 259 410 589 t 4000.000000 0.0000 \N 260 411 590 t 3000.000000 0.0000 \N 261 413 592 t 5000.000000 0.0000 2 262 415 593 t 10000.000000 0.0000 \N 263 415 594 t 55880.000000 0.0000 \N 264 415 595 t 10000.000000 0.0000 \N 265 417 597 t 100.000000 0.0000 \N 266 420 588 t 2000.000000 0.0000 \N 267 422 598 t 2500.000000 0.0000 \N 268 424 599 t 100.000000 0.0000 \N 269 426 600 t 1000.000000 0.0000 \N 270 429 601 t 5000.000000 0.0000 \N 271 433 596 t 100.000000 0.0000 \N 272 435 604 t 400.000000 0.0000 \N 273 438 602 t 1000.000000 0.0000 \N 274 440 603 t 1000.000000 0.0000 \N 275 444 605 t 3000.000000 0.0000 \N 276 448 607 t 5000.000000 0.0000 \N 277 451 606 t 3500.000000 0.0000 \N \. -- -- Data for Name: voitemtax; Type: TABLE DATA; Schema: public; Owner: admin -- COPY voitemtax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; 382 214 2 16 -50.00 \N 0 0.050000 0.00 -2.500000 2009-09-16 2009-09-16 1 1.000000 5533 470 233 2 18 -300.00 \N 0 0.040000 0.00 -12.000000 2009-11-03 2009-11-03 1 1.000000 6044 474 238 2 16 -2.50 \N 0 0.050000 0.00 -0.125000 2009-12-03 2009-12-03 1 1.000000 6045 475 239 2 16 -2500.00 \N 0 0.050000 0.00 -125.000000 2009-12-03 2009-12-03 1 1.000000 6045 476 240 2 16 -2000.00 \N 0 0.050000 0.00 -100.000000 2009-12-03 2009-12-03 1 1.000000 6045 478 242 2 18 -8000.00 \N 0 0.040000 0.00 -320.000000 2009-12-03 2009-12-03 1 1.000000 6054 479 243 2 18 -1800.00 \N 0 0.040000 0.00 -72.000000 2009-12-03 2009-12-03 1 1.000000 6054 495 248 2 18 -200.00 \N 0 0.040000 0.00 -8.000000 2010-03-12 2010-03-12 1 1.000000 6131 508 249 2 18 -66.00 \N 0 0.040000 0.00 -2.640000 2010-03-12 2010-03-12 1 1.000000 6159 513 261 2 18 -15000.00 \N 0 0.040000 0.00 -600.000000 2010-08-10 2010-08-15 1 1.000000 6294 \. -- -- Data for Name: whsezone; Type: TABLE DATA; Schema: public; Owner: admin -- COPY whsezone (whsezone_id, whsezone_warehous_id, whsezone_name, whsezone_descrip) FROM stdin; 8 35 RM1 Raw Materials Zone 1 7 35 FG1 Finished Goods Zone 1 9 35 WP1 Wip Zone 1 \. -- -- Data for Name: whsinfo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY whsinfo (warehous_id, warehous_code, warehous_descrip, warehous_fob, warehous_active, warehous_counttag_prefix, warehous_counttag_number, warehous_bol_prefix, warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, warehous_aislesize, warehous_aislealpha, warehous_racksize, warehous_rackalpha, warehous_binsize, warehous_binalpha, warehous_locationsize, warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, warehous_shipping_commission, warehous_cntct_id, warehous_addr_id, warehous_transit, warehous_shipform_id, warehous_shipvia_id, warehous_shipcomments, warehous_costcat_id, warehous_sitetype_id, warehous_taxzone_id, warehous_sequence) FROM stdin; 35 WH1 Prodiem Toys Warehouse 1 t WH1 200001 WH1 100000 t t t 2 t 2 t 2 t 2 t t 83 0.0000 12 9 f \N \N \N \N 5 \N 30 \. -- -- Data for Name: wo; Type: TABLE DATA; Schema: public; Owner: admin -- COPY wo (wo_id, wo_number, wo_subnumber, wo_status, wo_itemsite_id, wo_startdate, wo_duedate, wo_ordtype, wo_ordid, wo_qtyord, wo_qtyrcv, wo_adhoc, wo_itemcfg_series, wo_imported, wo_wipvalue, wo_postedvalue, wo_prodnotes, wo_prj_id, wo_priority, wo_brdvalue, wo_bom_rev_id, wo_boo_rev_id, wo_cosmethod, wo_womatl_id, wo_username) FROM stdin; 448 10000 1 C 295 2005-12-28 2005-12-29 F 1038 100.000000 100.000000 f \N \N 0.000000 90.083400 \N 1 0.000000 -1 -1 \N \N \N 447 50001 1 C 293 2006-01-02 2006-01-03 S 566 100.000000 100.000000 f \N \N 0.000000 266.680000 TTOYS-Tremendous Toys Inc.\n \N 1 0.000000 -1 -1 \N \N \N 452 10002 1 C 295 2005-12-29 2005-12-30 F 1044 300.000000 300.000000 f \N \N 0.000000 274.100000 \N 1 0.000000 -1 -1 \N \N \N 454 10003 1 C 295 2006-01-10 2006-01-11 -1 100.000000 100.000000 f \N \N 0.000000 91.733400 \N 1 0.000000 -1 -1 \N \N \N 451 40000 2 C 293 2005-12-27 2005-12-28 S 571 100.000000 100.000000 f \N \N 0.000000 266.680000 TTOYS-Tremendous Toys Inc.\n \N 1 0.000000 -1 -1 \N \N \N 453 50008 1 C 293 2006-01-15 2006-01-16 S 573 100.000000 100.000000 f \N \N 0.000000 266.680000 TTOYS-Tremendous Toys Inc.\n \N 1 0.000000 -1 -1 \N \N \N 450 10001 1 C 293 2005-12-30 2005-12-31 -1 100.000000 100.000000 f \N \N 0.000000 266.680000 \N 1 0.000000 -1 -1 \N \N \N 449 40000 1 C 293 2005-12-27 2005-12-28 S 570 10.000000 10.000000 f \N \N 0.000000 30.510000 \N 1 0.000000 -1 -1 \N \N \N 522 40007 1 C 293 2007-12-17 2007-12-21 S 621 5000.000000 5000.000000 t \N \N 0.000000 30827.390100 -1 1 0.000000 -1 -1 \N \N \N 523 40007 2 C 302 2007-12-16 2007-12-21 S 622 500.000000 500.000000 f \N \N 0.000000 3183.580000 -1 1 0.000000 5 -1 \N \N \N 516 40006 1 C 293 2007-09-05 2007-09-09 S 619 100.000000 100.000000 f \N \N 0.000000 638.740000 -1 1 0.000000 -1 -1 \N \N \N 521 10042 1 C 295 2007-09-22 2007-09-23 M 1298 100.000000 100.000000 f \N \N 0.000000 65.883300 4 1 0.000000 -1 -1 \N \N \N 463 10009 1 C 295 2006-01-14 2006-01-15 -1 100.000000 100.000000 f \N \N 0.000000 86.233400 Order from MRP - MA \N 1 0.000000 -1 -1 \N \N \N 462 50043 1 C 293 2006-01-19 2006-01-20 S 587 100.000000 100.000000 f \N \N 0.000000 246.180000 TTOYS-Tremendous Toys Inc.\n \N 1 0.000000 -1 -1 \N \N \N 467 10010 1 C 295 2006-01-14 2006-01-15 -1 100.000000 100.000000 f \N \N 0.000000 86.233400 \N 1 0.000000 -1 -1 \N \N \N 466 50046 1 C 293 2006-01-19 2006-01-20 S 592 100.000000 100.000000 f \N \N 0.000000 246.180000 TTOYS-Tremendous Toys Inc.\n \N 1 0.000000 -1 -1 \N \N \N 470 10011 1 C 295 2006-01-31 2006-02-01 -1 100.000000 100.000000 f \N \N 0.000000 85.500000 \N 1 0.000000 -1 -1 \N \N \N 469 50148 1 C 293 2006-02-05 2006-02-06 S 594 100.000000 100.000000 f \N \N 0.000000 246.180000 TTOYS-Tremendous Toys Incorporated\n \N 1 0.000000 -1 -1 \N \N \N 472 10012 1 C 295 2006-01-31 2006-02-01 -1 100.000000 100.000000 f \N \N 0.000000 86.600000 \N 1 0.000000 -1 -1 \N \N \N 471 50149 1 C 293 2006-02-05 2006-02-06 S 595 100.000000 100.000000 f \N \N 0.000000 246.180000 TTOYS-Tremendous Toys Incorporated\n \N 1 0.000000 -1 -1 \N \N \N 474 10013 1 C 295 2006-02-01 2006-02-02 -1 100.000000 100.000000 f \N \N 0.000000 86.600000 \N 1 0.000000 -1 -1 \N \N \N 473 50150 1 C 293 2006-02-04 2006-02-05 S 596 100.000000 100.000000 f \N \N 0.000000 246.180000 TTOYS-Tremendous Toys Incorporated\n \N 1 0.000000 -1 -1 \N \N \N 475 50151 1 C 293 2006-07-12 2006-07-12 S 597 100.000000 100.000000 f \N \N 0.000000 246.180000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 \N \N \N 478 10015 1 C 295 2006-07-06 2006-07-07 -1 100.000000 100.000000 f \N \N 0.000000 86.600000 Released to W/O from MRPCompleted subassembly order.\n -1 1 0.000000 -1 -1 \N \N \N 477 50152 1 C 293 2006-07-09 2006-07-10 S 598 100.000000 100.000000 f \N \N 0.000000 246.180000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 \N \N \N 476 10014 1 C 295 2006-07-06 2006-07-07 -1 100.000000 100.000000 f \N \N 0.000000 75.531400 MRP Release -1 1 0.000000 -1 -1 \N \N \N 484 50155 1 C 293 2006-10-17 2006-10-18 S 601 100.000000 100.000000 f \N \N 0.000000 638.180000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 \N \N \N 485 10020 1 C 295 2006-10-14 2006-10-15 M 1078 100.000000 100.000000 f \N \N 0.000000 64.050000 -1 1 0.000000 -1 -1 \N \N \N 488 50158 1 C 293 2006-12-31 2007-01-04 S 605 100.000000 100.000000 f \N \N 0.000000 614.672000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 \N \N \N 489 10022 1 C 295 2006-12-29 2006-12-30 M 1181 100.000000 100.000000 f \N \N 0.000000 64.600000 -1 1 0.000000 -1 -1 \N \N \N 493 10023 1 C 295 2007-02-20 2007-02-21 M 1228 100.000000 100.000000 f \N \N 0.000000 64.600000 -1 1 0.000000 -1 -1 \N \N \N 494 10024 1 C 295 2007-02-21 2007-02-22 M 1229 100.000000 100.000000 f \N \N 0.000000 64.600000 -1 1 0.000000 -1 -1 \N \N \N 492 50160 1 C 293 2007-02-22 2007-02-22 S 609 100.000000 100.000000 f \N \N 0.000000 637.740000 XTRM-Xtreme Toys LTD\n -1 1 0.000000 -1 -1 \N \N \N 495 10025 1 C 293 2007-04-04 2007-04-08 -1 1000.000000 1000.000000 f \N \N 0.000000 6317.193400 -1 1 0.000000 -1 -1 \N \N \N 500 10029 2 C 305 2007-06-01 2007-06-04 W 499 200.000000 200.000000 f \N \N 0.000000 266.000000 -1 1 0.000000 -1 -1 \N \N \N 502 10030 2 C 305 2007-06-01 2007-06-04 W 501 200.000000 200.000000 f \N \N 0.000000 266.000000 -1 1 0.000000 -1 -1 \N \N \N 504 10031 2 C 305 2007-06-01 2007-06-04 W 503 200.000000 200.000000 f \N \N 0.000000 266.000000 -1 1 0.000000 -1 -1 \N \N \N 496 10026 1 C 295 2007-06-28 2007-06-29 M 1258 800.000000 800.000000 f \N \N 0.000000 509.100000 -1 1 0.000000 -1 -1 \N \N \N 520 50165 1 C 293 2007-09-25 2007-09-29 S 620 100.000000 100.000000 f \N \N 0.000000 638.300000 TTOYS-Tremendous Toys Incorporated\n 4 1 0.000000 -1 -1 \N \N \N 501 10030 1 C 303 2007-06-04 2007-06-09 -1 100.000000 100.000000 f \N \N 0.000000 905.180000 -1 1 0.000000 2 -1 \N \N \N 498 10028 1 C 308 2007-06-08 2007-06-09 -1 500.000000 500.000000 f \N \N 0.000000 3178.740000 -1 1 0.000000 3 -1 \N \N \N 457 10006 1 C 300 2006-01-11 2006-01-11 -1 10.000000 10.000000 f \N \N 0.000000 22.912000 \N 1 0.000000 4 -1 \N \N \N 458 10007 1 C 300 2006-01-11 2006-01-11 -1 10.000000 10.000000 f \N \N 0.000000 22.912000 \N 1 0.000000 4 -1 \N \N \N 461 10008 1 C 300 2006-01-15 2006-01-15 -1 10.000000 10.000000 f \N \N 0.000000 27.390000 \N 1 0.000000 4 -1 \N \N \N 513 10036 1 C 305 2007-06-03 2007-06-06 -1 10.000000 10.000000 f \N \N 0.000000 23.300000 -1 1 0.000000 -1 -1 \N \N \N 510 10034 1 C 295 2007-05-31 2007-06-01 M 1284 100.000000 100.000000 f \N \N 0.000000 65.516700 -1 1 0.000000 -1 -1 \N \N \N 508 50164 1 C 293 2007-06-02 2007-06-06 S 617 100.000000 100.000000 f \N \N 0.000000 638.740000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 \N \N \N 517 10039 1 C 295 2007-09-01 2007-09-02 M 1294 100.000000 100.000000 f \N \N 0.000000 64.600000 -1 1 0.000000 -1 -1 \N \N \N 456 10005 1 C 300 2006-01-11 2006-01-11 -1 10.000000 10.000000 f \N \N 0.000000 22.545400 \N 1 0.000000 4 -1 \N \N \N 499 10029 1 C 300 2007-06-04 2007-06-09 -1 100.000000 100.000000 f \N \N 0.000000 905.180000 -1 1 0.000000 4 -1 \N \N \N 503 10031 1 C 302 2007-06-04 2007-06-09 -1 100.000000 100.000000 f \N \N 0.000000 905.180000 -1 1 0.000000 5 -1 \N \N \N 497 10027 1 C 311 2007-06-07 2007-06-09 -1 500.000000 500.000000 f \N \N 0.000000 2538.500000 -1 1 0.000000 1 6 \N \N \N 507 10033 1 C 311 2007-05-30 2007-06-06 -1 10.000000 10.000000 f \N \N 0.000000 77.720000 -1 1 0.000000 1 6 \N \N \N 514 10037 1 C 311 2007-06-13 2007-06-13 -1 10.000000 10.000000 f \N \N 0.000000 77.720000 -1 1 0.000000 1 6 \N \N \N 525 40008 1 C 322 2007-12-22 2007-12-27 S 627 10.000000 10.000000 t \N \N 0.000000 139.283300 -1 1 0.000000 -1 -1 D \N \N 524 10043 1 C 295 2007-12-15 2007-12-16 M 1300 5500.000000 5500.000000 f \N \N 0.000000 3475.633400 -1 1 0.000000 -1 -1 \N \N \N 527 10044 1 C 295 2008-03-04 2008-03-05 M 1306 100.000000 100.000000 f \N \N 0.000000 64.600000 -1 1 0.000000 -1 -1 \N \N \N 535 10049 1 C 295 2008-03-06 2008-03-07 M 1320 100.000000 100.000000 f \N \N 0.000000 64.233400 -1 1 0.000000 -1 -1 \N \N \N 536 10050 1 C 300 2008-04-04 2008-04-09 -1 1000.000000 1000.000000 t \N \N 0.000000 5718.080000 -1 1 0.000000 4 -1 \N \N \N 528 10045 1 C 323 2008-03-04 2008-03-11 M 1305 10.000000 10.000000 f \N \N 0.000000 67.240000 -1 1 0.000000 -1 -1 \N \N \N 534 50172 1 C 293 2008-03-08 2008-03-12 S 636 100.000000 100.000000 f \N \N 0.000000 638.740000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 \N \N \N 530 10046 1 C 295 2008-03-04 2008-03-05 M 1311 100.000000 100.000000 f \N \N 0.000000 64.600000 -1 1 0.000000 -1 -1 \N \N \N 532 10048 1 C 293 2008-03-05 2008-03-09 M 1309 100.000000 100.000000 f \N \N 0.000000 638.740000 -1 1 0.000000 -1 -1 \N \N \N 531 10047 1 C 323 2008-03-04 2008-03-11 M 1310 3.000000 3.000000 f \N \N 0.000000 22.790000 -1 1 0.000000 -1 -1 \N \N \N 538 10051 1 C 295 2008-06-18 2008-06-19 M 1325 100.000000 100.000000 f \N \N 0.000000 64.600000 -1 1 0.000000 -1 -1 \N \N \N 537 50176 1 C 328 2008-06-17 2008-06-17 S 640 1.000000 1.000000 f \N \N 0.000000 23.689300 XTRM-Xtreme Toys LTD\n -1 1 0.000000 -1 -1 D \N \N 539 50178 1 C 328 2008-06-25 2008-06-25 S 643 100.000000 100.000000 f \N \N 0.000000 188.000000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 D \N \N 540 10052 1 C 295 2008-06-18 2008-06-19 -1 100.000000 100.000000 f \N \N 0.000000 64.600000 -1 1 0.000000 -1 -1 \N \N \N 545 10054 2 C 305 2008-06-22 2008-06-25 W 544 1100.000000 1100.000000 f \N \N 0.000000 2563.000000 -1 1 0.000000 -1 -1 \N \N \N 546 10055 1 C 295 2008-06-25 2008-06-26 M 1333 2800.000000 2800.000000 f \N \N 0.000000 1779.100000 -1 1 0.000000 -1 -1 \N \N \N 544 10054 1 C 308 2008-06-25 2008-06-26 -1 1100.000000 1100.000000 f \N \N 0.000000 9145.620000 -1 1 0.000000 3 -1 \N \N \N 542 50179 2 C 293 2008-06-19 2008-06-23 S 645 1000.000000 1000.000000 f \N \N 0.000000 1829.740000 XTRM-Xtreme Toys LTD\n -1 1 0.000000 -1 -1 \N \N \N 541 50179 1 C 328 2008-06-23 2008-06-23 S 644 1000.000000 1000.000000 f \N \N 0.000000 1700.000000 XTRM-Xtreme Toys LTD\n -1 1 0.000000 -1 -1 D \N \N 547 10056 1 C 311 2008-06-22 2008-06-22 -1 2000.000000 2000.000000 f \N \N 0.000000 10071.500000 -1 1 0.000000 1 6 \N \N \N 548 50180 1 C 328 2008-06-23 2008-06-23 S 647 99.000000 99.000000 f \N \N 0.000000 152.856000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 D \N \N 551 10057 1 C 295 2008-06-26 2008-06-27 M 1341 100.000000 100.000000 f \N \N 0.000000 60.333400 -1 1 0.000000 -1 -1 \N \N \N 550 50182 1 C 293 2008-06-25 2008-06-29 S 650 100.000000 100.000000 f \N \N 0.000000 256.340000 TTOYS-Tremendous Toys Incorporated\n -1 1 0.000000 -1 -1 \N \N \N 556 10058 1 C 295 2008-10-08 2008-10-09 M 1347 200.000000 200.000000 f \N \N 0.000000 118.100000 -1 1 0.000000 -1 -1 D \N \N 555 40010 1 C 293 2008-10-07 2008-10-11 S 671 100.000000 100.000000 f \N \N 0.000000 256.340000 \N 1 0.000000 -1 -1 \N \N \N 554 50185 1 C 328 2008-10-09 2008-10-09 S 668 10.000000 10.000000 f \N \N 0.000000 62.601000 XTRM-Xtreme Toys LTD\n \N 1 0.000000 -1 -1 D \N \N 558 10059 1 C 305 2008-12-27 2008-12-30 -1 91.000000 91.000000 f \N \N 0.000000 212.030000 -1 1 0.000000 -1 -1 D \N \N 560 10060 1 C 295 2009-01-06 2009-01-07 M 1353 100.000000 100.000000 f \N \N 0.000000 59.600000 -1 1 0.000000 -1 -1 D \N \N 559 50189 1 C 293 2009-01-05 2009-01-09 S 685 100.000000 100.000000 f \N \N 0.000000 256.340000 XTRM-Xtreme Toys LTD\n \N 1 0.000000 -1 -1 \N \N \N 563 10061 1 C 295 2009-08-14 2009-08-15 M 1355 10000.000000 10000.000000 f \N \N 0.000000 5851.100000 -1 1 0.000000 -1 -1 D \N \N 562 50195 1 C 293 2009-08-16 2009-08-20 S 724 10000.000000 10000.000000 f \N \N 0.000000 25263.740000 TTOYS-Tremendous Toys Incorporated\n \N 1 0.000000 -1 -1 \N \N \N 579 10068 1 C 331 2009-10-13 2009-10-14 M 1414 900.000000 900.000000 f \N \N 0.000000 527.600000 -1 1 0.000000 -1 -1 \N \N \N 583 50200 1 C 293 2009-12-08 2009-12-12 S 743 10000.000000 10000.000000 f \N \N 0.000000 25263.740000 TTOYS-Tremendous Toys Incorporated\n \N 1 0.000000 -1 -1 \N \N \N 570 50196 1 C 293 2009-09-17 2009-09-21 S 732 5000.000000 5000.000000 f \N \N 0.000000 12633.740000 XTRM-Xtreme Toys LTD\n \N 1 0.000000 -1 -1 \N \N \N 578 10067 2 C 305 2009-10-11 2009-10-14 W 577 870.000000 870.000000 f \N \N 0.000000 2027.100000 -1 1 0.000000 -1 -1 \N 1766 \N 571 10064 1 C 331 2009-09-21 2009-09-22 M 1402 5000.000000 5000.000000 f \N \N 0.000000 2926.100000 -1 1 0.000000 -1 -1 \N \N \N 566 10062 1 C 293 2009-09-16 2009-09-20 M 1391 200.000000 200.000000 f \N \N 0.000000 508.940000 -1 1 0.000000 -1 -1 \N \N \N 567 10063 1 C 331 2009-09-16 2009-09-17 M 1395 200.000000 200.000000 f \N \N 0.000000 118.100000 -1 1 0.000000 -1 -1 \N \N \N 581 10070 1 C 311 2009-10-13 2009-10-13 -1 400.000000 400.000000 f \N \N 0.000000 536.300000 -1 1 0.000000 1 6 \N \N \N 577 10067 1 C 308 2009-10-14 2009-10-15 M 1413 870.000000 870.000000 f \N \N 0.000000 7190.636000 -1 1 0.000000 3 -1 \N \N \N 576 50198 1 C 293 2009-10-18 2009-10-22 S 737 5000.000000 5000.000000 f \N \N 0.000000 12633.740000 TTOYS-Tremendous Toys Incorporated\n \N 1 0.000000 -1 -1 \N \N \N 580 10069 1 C 331 2009-10-14 2009-10-15 M 1415 5000.000000 5000.000000 f \N \N 0.000000 2926.100000 -1 1 0.000000 -1 -1 \N \N \N 574 10066 1 C 308 2009-09-25 2009-09-26 -1 100.000000 100.000000 t \N \N 0.000000 510.317000 -1 1 0.000000 3 -1 \N \N \N 584 10071 1 C 331 2009-12-04 2009-12-05 M 1423 10000.000000 10000.000000 f \N \N 0.000000 5826.100000 -1 1 0.000000 -1 -1 \N \N \N 588 10073 1 C 308 2010-06-13 2010-06-14 -1 1000.000000 1000.000000 f \N \N 0.000000 8264.540000 -1 1 0.000000 3 -1 \N \N \N 586 50202 1 C 293 2010-03-17 2010-03-21 S 749 1000.000000 1000.000000 f \N \N 0.000000 2529.740000 TTOYS-Tremendous Toys Incorporated\n \N 1 0.000000 -1 -1 \N \N \N 590 10074 1 C 331 2010-06-08 2010-06-09 M 1434 1000.000000 1000.000000 f \N \N 0.000000 586.100000 -1 1 0.000000 -1 -1 \N \N \N 587 10072 1 C 331 2010-03-13 2010-03-14 M 1429 1000.000000 1000.000000 f \N \N 0.000000 576.750000 -1 1 0.000000 -1 -1 \N \N \N 591 10075 1 C 311 2010-06-07 2010-06-07 -1 5000.000000 5000.000000 f \N \N 0.000000 6387.500000 -1 1 0.000000 1 6 \N \N \N 589 10073 2 C 305 2010-06-10 2010-06-13 W 588 1000.000000 1000.000000 f \N \N 0.000000 2330.000000 -1 1 0.000000 -1 -1 \N 1799 \N 599 10078 1 C 331 2010-09-09 2010-09-10 M 1453 10000.000000 10000.000000 f \N \N 0.000000 5961.283333 -1 1 0.000000 -1 -1 \N \N \N 598 50210 1 C 293 2010-09-11 2010-09-15 S 773 10000.000000 10000.000000 f \N \N 0.000000 25263.740000 XTRM-Xtreme Toys LTD\n \N 1 0.000000 -1 -1 \N \N \N 606 10081 1 C 331 2010-11-05 2010-11-06 M 1466 100.000000 100.000000 f \N \N 0.000000 59.600000 -1 1 0.000000 -1 -1 \N \N admin 601 10079 2 C 305 2010-09-16 2010-09-19 W 600 100.000000 100.000000 f \N \N 0.000000 233.000000 -1 1 0.000000 -1 -1 \N 1844 \N 608 10080 2 C 305 2011-05-30 2011-06-02 W 602 400.000000 400.000000 f \N \N 0.000000 532.000000 -1 1 0.000000 -1 -1 \N 1878 admin 605 50213 1 C 293 2010-11-09 2010-11-13 S 781 100.000000 100.000000 f \N \N 0.000000 256.340000 XTRM-Xtreme Toys LTD\n \N 1 0.000000 -1 -1 \N \N admin 600 10079 1 C 308 2010-09-19 2010-09-20 M 1462 100.000000 100.000000 f \N \N 0.000000 829.820000 -1 1 0.000000 9 -1 D \N \N 602 10080 1 C 308 2011-06-02 2011-06-06 M 1463 400.000000 400.000000 f \N \N 0.000000 3255.626666 -1 1 0.000000 9 -1 \N \N \N 611 10082 2 C 305 2011-04-15 2011-04-18 W 610 1000.000000 1000.000000 f \N \N 0.000000 1330.000000 -1 1 0.000000 -1 -1 \N 1890 admin 610 10082 1 C 308 2011-04-18 2011-04-19 -1 1000.000000 1000.000000 f \N \N 0.000000 8264.540000 -1 1 0.000000 9 -1 \N \N admin 614 10084 1 C 311 2011-06-03 2011-06-08 -1 500.000000 500.000000 f \N \N 0.000000 663.500000 -1 1 0.000000 1 6 \N \N admin 612 10083 1 E 308 2011-08-02 2011-08-07 -1 1000.000000 0.000000 f \N \N 0.000000 0.000000 -1 1 0.000000 9 -1 \N \N admin 613 10083 2 E 305 2011-07-30 2011-08-02 W 612 1000.000000 0.000000 f \N \N 0.000000 0.000000 -1 1 0.000000 -1 -1 \N 1898 admin \. -- -- Data for Name: womatl; Type: TABLE DATA; Schema: public; Owner: admin -- COPY womatl (womatl_id, womatl_wo_id, womatl_itemsite_id, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_status, womatl_imported, womatl_createwo, womatl_issuemethod, womatl_wooper_id, womatl_bomitem_id, womatl_duedate, womatl_schedatwooper, womatl_uom_id, womatl_notes, womatl_ref, womatl_scrapvalue, womatl_qtyfxd, womatl_issuewo) FROM stdin; 1575 524 296 1.00000000 0.0000 5500.000000 5500.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f M 913 174 2007-12-15 t 4 \N \N 0.000000 0.00000000 f 1574 524 298 1.00000000 0.1000 6050.000000 6050.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f M 913 175 2007-12-15 t 4 \N \N 0.000000 0.00000000 f 1566 522 294 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f M 909 168 2007-12-17 t 4 \N \N 0.000000 0.00000000 f 1567 522 297 0.01000000 0.0000 50.000000 50.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f M 909 169 2007-12-17 t 8 \N \N 0.000000 0.00000000 f 1568 522 299 4.00000000 0.0000 20000.000000 20000.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f M 908 170 2007-12-17 t 4 \N \N 0.000000 0.00000000 f 1569 522 295 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f M 907 184 2007-12-17 t 4 \N \N 0.000000 0.00000000 f 1576 522 299 0.01000000 0.0000 50.000000 50.000000 0.000000 2007-12-14 \N \N \N \N f \N S -1 -1 2007-12-17 \N 4 \N \N 0.000000 0.00000000 f 1570 523 294 1.00000000 0.0000 500.000000 500.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f L 912 188 2007-12-16 t 4 \N \N 0.000000 0.00000000 f 1572 523 299 4.00000000 0.0000 2000.000000 2000.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f L 910 186 2007-12-16 t 4 \N \N 0.000000 0.00000000 f 1540 513 306 1.00000000 0.0000 10.000000 10.000000 0.000000 2007-05-30 1970-01-01 0.000000 t \N f f L 887 203 2007-06-03 f 4 \N \N 0.000000 0.00000000 f 1539 513 307 1.00000000 0.0000 10.000000 10.000000 0.000000 2007-05-30 1970-01-01 0.000000 f \N f f L 887 211 2007-06-03 f 4 \N \N 0.000000 0.00000000 f 1541 514 314 1.00000000 0.0000 10.000000 10.000000 0.000000 2007-05-30 1970-01-01 0.000000 t \N f f L 889 208 2007-06-13 f 9 \N \N 0.000000 0.00000000 f 1529 510 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2007-05-30 1970-01-01 0.000000 t \N f f M 881 175 2007-05-31 t 4 \N \N 0.000000 0.00000000 f 1530 510 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-05-30 1970-01-01 0.000000 t \N f f M 881 174 2007-05-31 t 4 \N \N 0.000000 0.00000000 f 1520 508 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-05-30 1970-01-01 0.000000 t \N f f L 875 168 2007-06-02 t 4 \N \N 0.000000 0.00000000 f 1521 508 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2007-05-30 1970-01-01 0.000000 t \N f f L 876 170 2007-06-02 t 4 \N \N 0.000000 0.00000000 f 1522 508 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-05-30 1970-01-01 0.000000 t \N f f L 877 184 2007-06-02 t 4 \N \N 0.000000 0.00000000 f 1523 508 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2007-05-30 1970-01-01 0.000000 t \N f f L 875 169 2007-06-02 t 8 \N \N 0.000000 0.00000000 f 1564 521 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2007-09-21 1970-01-01 0.000000 t \N f f M 906 175 2007-09-22 t 4 \N \N 0.000000 0.00000000 f 1565 521 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-09-21 1970-01-01 0.000000 t \N f f M 906 174 2007-09-22 t 4 \N \N 0.000000 0.00000000 f 1560 520 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-09-21 1970-01-01 0.000000 t \N f f M 903 168 2007-09-25 t 4 \N \N 0.000000 0.00000000 f 1573 523 295 1.00000000 0.0000 500.000000 500.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f L 911 187 2007-12-16 t 4 \N \N 0.000000 0.00000000 f 1571 523 297 0.01000000 0.0000 5.000000 5.000000 0.000000 2007-12-14 1970-01-01 0.000000 t \N f f L 912 189 2007-12-16 t 8 \N \N 0.000000 0.00000000 f 1562 520 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2007-09-21 1970-01-01 0.000000 t \N f f M 903 169 2007-09-25 t 8 \N \N 0.000000 0.00000000 f 1563 520 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2007-09-21 1970-01-01 0.000000 t \N f f M 904 170 2007-09-25 t 4 \N \N 0.000000 0.00000000 f 1561 520 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-09-21 1970-01-01 0.000000 t \N f f M 905 184 2007-09-25 t 4 \N \N 0.000000 0.00000000 f 1578 525 312 4.00000000 0.0000 40.000000 40.000000 0.000000 2007-12-20 \N \N \N \N f \N S -1 -1 2007-12-22 \N 4 \N \N 0.000000 0.00000000 f 1550 517 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2007-08-31 1970-01-01 0.000000 t \N f f S 896 175 2007-09-01 t 4 \N \N 0.000000 0.00000000 f 1551 517 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-08-31 1970-01-01 0.000000 t \N f f S 896 174 2007-09-01 t 4 \N \N 0.000000 0.00000000 f 1577 525 299 1.00000000 0.0000 10.000000 10.000000 0.000000 2007-12-20 1970-01-01 0.000000 t \N f f S 915 215 2007-12-22 t 10 \N \N 0.000000 0.00000000 f 1546 516 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-08-31 1970-01-01 0.000000 t \N f f L 893 168 2007-09-05 t 4 \N \N 0.000000 0.00000000 f 1547 516 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2007-08-31 1970-01-01 0.000000 t \N f f L 894 170 2007-09-05 t 4 \N \N 0.000000 0.00000000 f 1549 516 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2007-08-31 1970-01-01 0.000000 t \N f f L 895 184 2007-09-05 t 4 \N \N 0.000000 0.00000000 f 1548 516 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2007-08-31 1970-01-01 0.000000 t \N f f L 893 169 2007-09-05 t 8 \N \N 0.000000 0.00000000 f 1613 536 294 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2008-04-04 1970-01-01 0.000000 t \N f f L 943 176 2008-04-04 t 4 \N \N 0.000000 0.00000000 f 1614 536 297 0.01000000 0.0000 10.000000 10.000000 0.000000 2008-04-04 1970-01-01 0.000000 t \N f f L 943 177 2008-04-04 t 8 \N \N 0.000000 0.00000000 f 1611 535 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-03-05 1970-01-01 0.000000 t \N f f M 940 174 2008-03-06 t 4 \N \N 0.000000 0.00000000 f 1584 527 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 920 175 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1583 527 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 920 174 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1615 536 299 4.00000000 0.0000 4000.000000 4000.000000 0.000000 2008-04-04 1970-01-01 0.000000 t \N f f L 941 178 2008-04-04 t 4 \N \N 0.000000 0.00000000 f 1588 528 294 1.00000000 0.0000 10.000000 10.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 922 219 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1612 535 298 1.00000000 0.1000 110.000000 101.000000 9.000000 2008-03-05 1970-01-01 0.000000 t \N f f M 940 175 2008-03-06 t 4 \N \N 0.000000 0.00000000 f 1587 528 295 1.00000000 0.0000 10.000000 10.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 921 218 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1585 528 297 0.01000000 0.0000 0.100000 0.100000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 922 216 2008-03-04 t 8 \N \N 0.000000 0.00000000 f 1610 534 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-03-05 1970-01-01 0.000000 t \N f f L 938 168 2008-03-08 t 4 \N \N 0.000000 0.00000000 f 1586 528 299 4.00000000 0.0000 40.000000 40.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 923 217 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1609 534 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-03-05 1970-01-01 0.000000 t \N f f L 937 184 2008-03-08 t 4 \N \N 0.000000 0.00000000 f 1607 534 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2008-03-05 1970-01-01 0.000000 t \N f f L 938 169 2008-03-08 t 8 \N \N 0.000000 0.00000000 f 1608 534 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2008-03-05 1970-01-01 0.000000 t \N f f L 939 170 2008-03-08 t 4 \N \N 0.000000 0.00000000 f 1594 530 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 927 175 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1593 530 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 927 174 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1602 532 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 932 168 2008-03-05 t 4 \N \N 0.000000 0.00000000 f 1599 532 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 932 169 2008-03-05 t 8 \N \N 0.000000 0.00000000 f 1600 532 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 933 170 2008-03-05 t 4 \N \N 0.000000 0.00000000 f 1601 532 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 931 184 2008-03-05 t 4 \N \N 0.000000 0.00000000 f 1598 531 294 1.00000000 0.0000 3.000000 3.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 929 219 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1595 531 297 0.01000000 0.0000 0.030000 0.030000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 929 216 2008-03-04 t 8 \N \N 0.000000 0.00000000 f 1596 531 299 4.00000000 0.0000 12.000000 12.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 930 217 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1597 531 295 1.00000000 0.0000 3.000000 3.000000 0.000000 2008-03-04 1970-01-01 0.000000 t \N f f L 928 218 2008-03-04 t 4 \N \N 0.000000 0.00000000 f 1623 538 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-06-12 1970-01-01 0.000000 t \N f f L 947 174 2008-06-18 t 4 \N \N 0.000000 0.00000000 f 1624 538 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2008-06-12 1970-01-01 0.000000 t \N f f L 947 175 2008-06-18 t 4 \N \N 0.000000 0.00000000 f 1617 537 294 1.00000000 0.0000 1.000000 1.000000 0.000000 2008-06-12 1970-01-01 0.000000 t \N f f L 945 223 2008-06-17 t 4 \N \N 0.000000 0.00000000 f 1621 537 329 0.00100000 0.0000 1.000000 0.001000 0.000000 2008-06-12 1970-01-01 0.000000 t \N f f L 945 227 2008-06-17 f 8 \N \N 0.000000 0.00000000 f 1620 537 326 2.00000000 0.0000 2.000000 2.000000 0.000000 2008-06-12 1970-01-01 0.000000 t \N f f L 946 225 2008-06-17 f 4 \N \N 0.000000 0.00000000 f 1619 537 295 1.00000000 0.0000 1.000000 1.000000 0.000000 2008-06-12 1970-01-01 0.000000 t \N f f L 944 222 2008-06-17 t 4 \N \N 0.000000 0.00000000 f 1622 537 299 4.00000000 0.0000 4.000000 4.000000 0.000000 2008-06-12 1970-01-01 0.000000 t \N f f L 946 221 2008-06-17 t 4 \N \N 0.000000 0.00000000 f 1618 537 318 0.01000000 0.0000 0.010000 0.010000 0.000000 2008-06-12 1970-01-01 0.000000 t \N f f L 945 224 2008-06-17 f 8 \N \N 0.000000 0.00000000 f 1625 539 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-06-18 1970-01-01 0.000000 t \N f f L 949 223 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1629 539 329 0.00100000 0.0000 1.000000 0.100000 0.000000 2008-06-18 1970-01-01 0.000000 t \N f f L 949 227 2008-06-25 f 8 \N \N 0.000000 0.00000000 f 1627 539 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-06-18 1970-01-01 0.000000 t \N f f L 948 222 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1630 539 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2008-06-18 1970-01-01 0.000000 t \N f f L 950 221 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1628 539 326 2.00000000 0.0000 200.000000 200.000000 0.000000 2008-06-18 1970-01-01 0.000000 t \N f f L 950 225 2008-06-25 f 4 \N \N 0.000000 0.00000000 f 1626 539 318 0.01000000 0.0000 1.000000 1.000000 0.000000 2008-06-18 1970-01-01 0.000000 t \N f f L 949 224 2008-06-25 f 8 \N \N 0.000000 0.00000000 f 1631 540 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-06-18 1970-01-01 0.000000 t \N f f L 951 174 2008-06-18 t 4 \N \N 0.000000 0.00000000 f 1632 540 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2008-06-18 1970-01-01 0.000000 t \N f f L 951 175 2008-06-18 t 4 \N \N 0.000000 0.00000000 f 1651 545 307 1.00000000 0.0000 1100.000000 1100.000000 0.000000 2008-06-19 1970-01-01 0.000000 f \N f f L 962 211 2008-06-22 f 4 \N \N 0.000000 0.00000000 f 1652 545 306 1.00000000 0.0000 1100.000000 1100.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 962 203 2008-06-22 f 4 \N \N 0.000000 0.00000000 f 1653 546 296 1.00000000 0.0000 2800.000000 2800.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 964 174 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1654 546 298 1.00000000 0.1000 3080.000000 3080.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 964 175 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1645 544 312 4.00000000 0.0000 4400.000000 4400.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 960 210 2008-06-25 f 4 \N \N 0.000000 0.00000000 f 1646 544 310 1.00000000 0.0000 1100.000000 1100.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 960 207 2008-06-25 f 4 \N \N 0.000000 0.00000000 f 1647 544 305 1.00000000 0.0000 1100.000000 1100.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f t L 960 212 2008-06-25 f 4 \N \N 0.000000 0.00000000 f 1648 544 295 1.00000000 0.0000 1100.000000 1100.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 961 199 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1649 544 299 4.00000000 0.0000 4400.000000 4400.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 960 198 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1650 544 297 0.01000000 0.0000 11.000000 11.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 959 201 2008-06-25 t 8 \N \N 0.000000 0.00000000 f 1639 542 294 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 956 168 2008-06-19 t 4 \N \N 0.000000 0.00000000 f 1640 542 295 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 955 184 2008-06-19 t 4 \N \N 0.000000 0.00000000 f 1641 542 299 4.00000000 0.0000 4000.000000 4000.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 957 170 2008-06-19 t 4 \N \N 0.000000 0.00000000 f 1642 542 297 0.01000000 0.0000 10.000000 10.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 956 169 2008-06-19 t 8 \N \N 0.000000 0.00000000 f 1633 541 294 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 953 223 2008-06-23 t 4 \N \N 0.000000 0.00000000 f 1634 541 329 0.00100000 0.0000 1.000000 1.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 953 227 2008-06-23 f 8 \N \N 0.000000 0.00000000 f 1635 541 295 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 952 222 2008-06-23 t 4 \N \N 0.000000 0.00000000 f 1636 541 299 4.00000000 0.0000 4000.000000 4000.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 954 221 2008-06-23 t 4 \N \N 0.000000 0.00000000 f 1637 541 326 2.00000000 0.0000 2000.000000 2000.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 954 225 2008-06-23 f 4 \N \N 0.000000 0.00000000 f 1638 541 318 0.01000000 0.0000 10.000000 10.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 953 224 2008-06-23 f 8 \N \N 0.000000 0.00000000 f 1655 547 314 1.00000000 0.0000 2000.000000 2000.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 965 208 2008-06-22 f 9 \N \N 0.000000 0.00000000 f 1656 548 294 1.00000000 0.0000 99.000000 99.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 967 223 2008-06-23 t 4 \N \N 0.000000 0.00000000 f 1657 548 295 1.00000000 0.0000 99.000000 99.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 966 222 2008-06-23 t 4 \N \N 0.000000 0.00000000 f 1658 548 299 4.00000000 0.0000 396.000000 396.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 968 221 2008-06-23 t 4 \N \N 0.000000 0.00000000 f 1659 548 297 0.01000000 0.0000 0.990000 0.990000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 967 220 2008-06-23 t 8 \N \N 0.000000 0.00000000 f 1660 548 327 3.00000000 0.0000 297.000000 297.000000 0.000000 2008-06-19 1970-01-01 0.000000 t \N f f L 968 226 2008-06-23 f 4 \N \N 0.000000 0.00000000 f 1669 551 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-06-20 1970-01-01 0.000000 t \N f f M 975 174 2008-06-26 t 4 \N \N 0.000000 0.00000000 f 1670 551 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2008-06-20 1970-01-01 0.000000 t \N f f M 975 175 2008-06-26 t 4 \N \N 0.000000 0.00000000 f 1665 550 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-06-20 1970-01-01 0.000000 t \N f f L 973 168 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1666 550 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-06-20 1970-01-01 0.000000 t \N f f L 972 184 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1667 550 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2008-06-20 1970-01-01 0.000000 t \N f f L 974 170 2008-06-25 t 4 \N \N 0.000000 0.00000000 f 1668 550 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2008-06-20 1970-01-01 0.000000 t \N f f L 973 169 2008-06-25 t 8 \N \N 0.000000 0.00000000 f 1689 556 298 1.00000000 0.1000 220.000000 220.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 988 175 2008-10-08 t 4 \N \N 0.000000 0.00000000 f 1690 556 296 1.00000000 0.0000 200.000000 200.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 988 174 2008-10-08 t 4 \N \N 0.000000 0.00000000 f 1680 554 327 3.00000000 0.0000 30.000000 30.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f S 984 226 2008-10-09 f 4 \N \N 0.000000 0.00000000 f 1683 554 299 4.00000000 0.0000 40.000000 40.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f S 984 221 2008-10-09 t 4 \N \N 0.000000 0.00000000 f 1682 554 295 1.00000000 0.0000 10.000000 10.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f S 982 222 2008-10-09 t 4 \N \N 0.000000 0.00000000 f 1685 555 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 986 168 2008-10-07 t 4 \N \N 0.000000 0.00000000 f 1686 555 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 987 170 2008-10-07 t 4 \N \N 0.000000 0.00000000 f 1687 555 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 986 169 2008-10-07 t 8 \N \N 0.000000 0.00000000 f 1688 555 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 985 184 2008-10-07 t 4 \N \N 0.000000 0.00000000 f 1681 554 294 1.00000000 0.0000 10.000000 20.000000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 983 223 2008-10-09 t 4 \N \N 0.000000 0.00000000 f 1679 554 329 0.00100000 0.0000 1.000000 0.020000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 983 227 2008-10-09 f 8 \N \N 0.000000 0.00000000 f 1684 554 318 0.01000000 0.0000 0.100000 0.200000 0.000000 2008-10-02 1970-01-01 0.000000 t \N f f L 983 224 2008-10-09 f 8 \N \N 0.000000 0.00000000 f 1696 558 307 1.00000000 0.0000 91.000000 91.000000 0.000000 2008-12-30 1970-01-01 0.000000 f \N f f L 992 211 2008-12-27 f 4 \N \N 0.000000 0.00000000 f 1695 558 306 1.00000000 0.0000 91.000000 91.000000 0.000000 2008-12-30 1970-01-01 0.000000 t \N f f L 992 203 2008-12-27 f 4 \N \N 0.000000 0.00000000 f 1702 560 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2008-12-31 1970-01-01 0.000000 t \N f f L 997 175 2009-01-06 t 4 \N \N 0.000000 0.00000000 f 1701 560 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-12-31 1970-01-01 0.000000 t \N f f L 997 174 2009-01-06 t 4 \N \N 0.000000 0.00000000 f 1697 559 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2008-12-31 1970-01-01 0.000000 t \N f f L 995 169 2009-01-05 t 8 \N \N 0.000000 0.00000000 f 1698 559 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2008-12-31 1970-01-01 0.000000 t \N f f L 996 170 2009-01-05 t 4 \N \N 0.000000 0.00000000 f 1700 559 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-12-31 1970-01-01 0.000000 t \N f f L 995 168 2009-01-05 t 4 \N \N 0.000000 0.00000000 f 1699 559 295 1.00000000 0.0000 100.000000 100.000000 0.000000 2008-12-31 1970-01-01 0.000000 t \N f f L 994 184 2009-01-05 t 4 \N \N 0.000000 0.00000000 f 1709 562 299 4.00000000 0.0000 40000.000000 40000.000000 0.000000 2009-08-13 1970-01-01 0.000000 t \N f f L 1002 170 2009-08-16 t 4 \N \N 0.000000 0.00000000 f 1713 563 298 1.00000000 0.1000 11000.000000 11000.000000 0.000000 2009-08-13 1970-01-01 0.000000 t \N f f L 1004 175 2009-08-14 t 4 \N \N 0.000000 0.00000000 f 1710 562 295 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2009-08-13 1970-01-01 0.000000 t \N f f L 1001 184 2009-08-16 t 4 \N \N 0.000000 0.00000000 f 1712 563 296 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2009-08-13 1970-01-01 0.000000 t \N f f L 1004 174 2009-08-14 t 4 \N \N 0.000000 0.00000000 f 1708 562 297 0.01000000 0.0000 100.000000 100.000000 0.000000 2009-08-13 1970-01-01 0.000000 t \N f f L 1003 169 2009-08-16 t 8 \N \N 0.000000 0.00000000 f 1711 562 294 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2009-08-13 1970-01-01 0.000000 t \N f f L 1003 168 2009-08-16 t 4 \N \N 0.000000 0.00000000 f 1736 570 297 0.01000000 0.0000 50.000000 50.000000 0.000000 2009-09-21 1970-01-01 0.000000 t \N f f L 1023 169 2009-09-17 t 8 \N \N 0.000000 0.00000000 f 1750 574 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2009-09-25 1970-01-01 0.000000 t \N f f M 1031 198 2009-09-25 t 4 \N \N 0.000000 0.00000000 f 1738 570 294 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2009-09-21 1970-01-01 0.000000 t \N f f L 1023 168 2009-09-17 t 4 \N \N 0.000000 0.00000000 f 1753 574 312 4.00000000 0.0000 400.000000 400.000000 10.000000 2009-09-25 1970-01-01 0.000000 t \N f f S 1031 210 2009-09-25 f 4 \N \N 10.390000 0.00000000 f 1739 570 331 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2009-09-21 1970-01-01 0.000000 t \N f f L 1021 243 2009-09-17 t 4 \N \N 0.000000 0.00000000 f 1737 570 299 4.00000000 0.0000 20000.000000 20000.000000 0.000000 2009-09-21 1970-01-01 0.000000 t \N f f L 1022 170 2009-09-17 t 4 \N \N 0.000000 0.00000000 f 1727 567 298 1.00000000 0.1000 220.000000 220.000000 0.000000 2009-09-16 1970-01-01 0.000000 t \N f f L 1014 238 2009-09-16 t 4 \N \N 0.000000 0.00000000 f 1726 567 296 1.00000000 0.0000 200.000000 200.000000 0.000000 2009-09-16 1970-01-01 0.000000 t \N f f L 1014 237 2009-09-16 t 4 \N \N 0.000000 0.00000000 f 1724 566 294 1.00000000 0.0000 200.000000 200.000000 0.000000 2009-09-16 1970-01-01 0.000000 t \N f f L 1013 168 2009-09-16 t 4 \N \N 0.000000 0.00000000 f 1722 566 297 0.01000000 0.0000 2.000000 2.000000 0.000000 2009-09-16 1970-01-01 0.000000 t \N f f L 1013 169 2009-09-16 t 8 \N \N 0.000000 0.00000000 f 1725 566 331 1.00000000 0.0000 200.000000 200.000000 0.000000 2009-09-16 1970-01-01 0.000000 t \N f f L 1011 243 2009-09-16 t 4 \N \N 0.000000 0.00000000 f 1723 566 299 4.00000000 0.0000 800.000000 800.000000 0.000000 2009-09-16 1970-01-01 0.000000 t \N f f L 1012 170 2009-09-16 t 4 \N \N 0.000000 0.00000000 f 1759 576 299 4.00000000 0.0000 20000.000000 20000.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1036 170 2009-10-18 t 4 \N \N 0.000000 0.00000000 f 1774 581 314 1.00000000 0.0000 400.000000 400.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1045 208 2009-10-13 f 9 \N \N 0.000000 0.00000000 f 1772 580 296 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1044 237 2009-10-14 t 4 \N \N 0.000000 0.00000000 f 1773 580 298 1.00000000 0.1000 5500.000000 5500.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1044 238 2009-10-14 t 4 \N \N 0.000000 0.00000000 f 1741 571 298 1.00000000 0.1000 5500.000000 5500.000000 0.000000 2009-09-21 1970-01-01 0.000000 t \N f f L 1024 238 2009-09-21 t 4 \N \N 0.000000 0.00000000 f 1740 571 296 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2009-09-21 1970-01-01 0.000000 t \N f f L 1024 237 2009-09-21 t 4 \N \N 0.000000 0.00000000 f 1780 583 299 4.00000000 0.0000 40000.000000 40000.000000 0.000000 2009-12-03 1970-01-01 0.000000 t \N f f L 1050 170 2009-12-08 t 4 \N \N 0.000000 0.00000000 f 1769 578 307 1.00000000 0.0000 870.000000 870.000000 0.000000 2009-10-13 1970-01-01 0.000000 f \N f f L 1041 211 2009-10-11 f 4 \N \N 0.000000 0.00000000 f 1767 577 331 1.00000000 0.0000 870.000000 870.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1040 240 2009-10-14 t 4 \N \N 0.000000 0.00000000 f 1768 578 306 1.00000000 0.0000 870.000000 870.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1041 203 2009-10-11 f 4 \N \N 0.000000 0.00000000 f 1784 584 298 1.00000000 0.1000 11000.000000 10900.000000 100.000000 2009-12-03 1970-01-01 0.000000 t \N f f L 1052 238 2009-12-04 t 4 \N \N 25.000000 0.00000000 f 1770 579 296 1.00000000 0.0000 900.000000 900.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1043 237 2009-10-13 t 4 \N \N 0.000000 0.00000000 f 1763 577 297 0.01000000 0.0000 8.700000 8.700000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1038 201 2009-10-14 t 8 \N \N 0.000000 0.00000000 f 1771 579 298 1.00000000 0.1000 990.000000 990.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1043 238 2009-10-13 t 4 \N \N 0.000000 0.00000000 f 1783 584 296 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2009-12-03 1970-01-01 0.000000 t \N f f L 1052 237 2009-12-04 t 4 \N \N 0.000000 0.00000000 f 1765 577 312 4.00000000 0.0000 3480.000000 3480.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1039 210 2009-10-14 f 4 \N \N 0.000000 0.00000000 f 1751 574 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2009-09-25 1970-01-01 0.000000 t \N f f M 1032 201 2009-09-25 t 8 \N \N 0.000000 0.00000000 f 1764 577 310 1.00000000 0.0000 870.000000 870.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1039 207 2009-10-14 f 4 \N \N 0.000000 0.00000000 f 1752 574 310 1.00000000 0.0000 100.000000 100.000000 0.000000 2009-09-25 1970-01-01 0.000000 t \N f f M 1031 207 2009-09-25 f 4 \N \N 0.000000 0.00000000 f 1766 577 305 1.00000000 0.0000 870.000000 870.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f t L 1039 212 2009-10-14 f 4 \N \N 0.000000 0.00000000 f 1762 577 299 4.00000000 0.0000 3480.000000 3480.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1039 198 2009-10-14 t 4 \N \N 0.000000 0.00000000 f 1760 576 294 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1035 168 2009-10-18 t 4 \N \N 0.000000 0.00000000 f 1761 576 331 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1037 243 2009-10-18 t 4 \N \N 0.000000 0.00000000 f 1758 576 297 0.01000000 0.0000 50.000000 50.000000 0.000000 2009-10-13 1970-01-01 0.000000 t \N f f L 1035 169 2009-10-18 t 8 \N \N 0.000000 0.00000000 f 1782 583 331 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2009-12-03 1970-01-01 0.000000 t \N f f L 1051 243 2009-12-08 t 4 \N \N 0.000000 0.00000000 f 1779 583 297 0.01000000 0.0000 100.000000 100.000000 0.000000 2009-12-03 1970-01-01 0.000000 t \N f f L 1049 169 2009-12-08 t 8 \N \N 0.000000 0.00000000 f 1781 583 294 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2009-12-03 1970-01-01 0.000000 t \N f f L 1049 168 2009-12-08 t 4 \N \N 0.000000 0.00000000 f 1791 586 294 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-03-12 1970-01-01 0.000000 t \N f f L 1056 168 2010-03-17 t 4 \N \N 0.000000 0.00000000 f 1790 586 299 4.00000000 0.0000 4000.000000 4000.000000 0.000000 2010-03-12 1970-01-01 0.000000 t \N f f L 1057 170 2010-03-17 t 4 \N \N 0.000000 0.00000000 f 1793 587 296 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-03-12 1970-01-01 0.000000 t \N f f L 1059 237 2010-03-13 t 4 \N \N 0.000000 0.00000000 f 1794 587 298 1.00000000 0.1000 1100.000000 1100.000000 0.000000 2010-03-12 1970-01-01 0.000000 t \N f f L 1059 238 2010-03-13 t 4 \N \N 0.000000 0.00000000 f 1789 586 297 0.01000000 0.0000 10.000000 10.000000 0.000000 2010-03-12 1970-01-01 0.000000 t \N f f L 1056 169 2010-03-17 t 8 \N \N 0.000000 0.00000000 f 1792 586 331 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-03-12 1970-01-01 0.000000 t \N f f L 1058 243 2010-03-17 t 4 \N \N 0.000000 0.00000000 f 1798 588 312 4.00000000 0.0000 4000.000000 4000.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1061 210 2010-06-13 f 4 \N \N 0.000000 0.00000000 f 1797 588 310 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1061 207 2010-06-13 f 4 \N \N 0.000000 0.00000000 f 1796 588 297 0.01000000 0.0000 10.000000 10.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1060 201 2010-06-13 t 8 \N \N 0.000000 0.00000000 f 1802 589 307 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-06-07 1970-01-01 0.000000 f \N f f L 1063 211 2010-06-10 f 4 \N \N 0.000000 0.00000000 f 1801 589 306 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1063 203 2010-06-10 f 4 \N \N 0.000000 0.00000000 f 1804 590 298 1.00000000 0.1000 1100.000000 1100.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1065 238 2010-06-08 t 4 \N \N 0.000000 0.00000000 f 1845 600 385 1.00000000 0.0000 100.000000 100.000000 0.000000 2010-09-13 1970-01-01 0.000000 t \N f f L 1090 265 2010-09-19 f 4 0.000000 0.00000000 f 1803 590 296 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1065 237 2010-06-08 t 4 \N \N 0.000000 0.00000000 f 1799 588 305 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f t L 1061 212 2010-06-13 f 4 \N \N 0.000000 0.00000000 f 1795 588 299 4.00000000 0.0000 4000.000000 4000.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1061 198 2010-06-13 t 4 \N \N 0.000000 0.00000000 f 1800 588 331 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1062 240 2010-06-13 t 4 \N \N 0.000000 0.00000000 f 1844 600 305 1.00000000 0.0000 100.000000 100.000000 0.000000 2010-09-13 1970-01-01 0.000000 t \N f t L 1090 263 2010-09-19 f 4 \N \N 0.000000 0.00000000 f 1805 591 314 1.00000000 0.0000 5000.000000 5000.000000 0.000000 2010-06-07 1970-01-01 0.000000 t \N f f L 1066 208 2010-06-07 f 9 \N \N 0.000000 0.00000000 f 1843 600 312 4.00000000 0.0000 400.000000 400.000000 0.000000 2010-09-13 1970-01-01 0.000000 t \N f f L 1090 262 2010-09-19 f 4 \N \N 0.000000 0.00000000 f 1879 602 385 1.00000000 0.0000 400.000000 400.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1112 265 2011-06-02 f 4 0.000000 0.00000000 f 1890 610 305 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f t L 1120 263 2011-04-18 f 4 \N \N 0.000000 0.00000000 f 1880 608 306 1.00000000 0.0000 400.000000 400.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1114 203 2011-05-30 f 4 \N \N 0.000000 0.00000000 f 1846 601 306 1.00000000 0.0000 100.000000 100.000000 0.000000 2010-09-13 1970-01-01 0.000000 t \N f f L 1092 203 2010-09-16 f 4 \N \N 0.000000 0.00000000 f 1838 599 296 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2010-09-08 1970-01-01 0.000000 t \N f f L 1088 237 2010-09-09 t 4 \N \N 0.000000 0.00000000 f 1847 601 307 1.00000000 0.0000 100.000000 100.000000 0.000000 2010-09-13 1970-01-01 0.000000 f \N f f L 1092 211 2010-09-16 f 4 \N \N 0.000000 0.00000000 f 1839 599 298 1.00000000 0.1000 11000.000000 11000.000000 0.000000 2010-09-08 1970-01-01 0.000000 t \N f f L 1088 238 2010-09-09 t 4 \N \N 0.000000 0.00000000 f 1834 598 297 0.01000000 0.0000 100.000000 100.000000 0.000000 2010-09-08 1970-01-01 0.000000 t \N f f L 1085 169 2010-09-11 t 8 \N \N 0.000000 0.00000000 f 1841 600 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2010-09-13 1970-01-01 0.000000 t \N f f L 1089 260 2010-09-19 t 8 \N \N 0.000000 0.00000000 f 1836 598 294 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2010-09-08 1970-01-01 0.000000 t \N f f L 1085 168 2010-09-11 t 4 \N \N 0.000000 0.00000000 f 1835 598 299 4.00000000 0.0000 40000.000000 40000.000000 0.000000 2010-09-08 1970-01-01 0.000000 t \N f f L 1086 170 2010-09-11 t 4 \N \N 0.000000 0.00000000 f 1842 600 310 1.00000000 0.0000 100.000000 100.000000 0.000000 2010-09-13 1970-01-01 0.000000 t \N f f L 1090 261 2010-09-19 f 4 \N \N 0.000000 0.00000000 f 1837 598 331 1.00000000 0.0000 10000.000000 10000.000000 0.000000 2010-09-08 1970-01-01 0.000000 t \N f f L 1087 243 2010-09-11 t 4 \N \N 0.000000 0.00000000 f 1840 600 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2010-09-13 1970-01-01 0.000000 t \N f f L 1090 259 2010-09-19 t 4 \N \N 0.000000 0.00000000 f 1865 606 298 1.00000000 0.1000 110.000000 110.000000 0.000000 2010-11-04 1970-01-01 0.000000 t \N f f L 1105 238 2010-11-05 t 4 \N \N 0.000000 0.00000000 f 1874 602 299 4.00000000 0.0000 1600.000000 1600.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1112 259 2011-06-02 t 4 \N \N 0.000000 0.00000000 f 1881 608 307 1.00000000 0.0000 400.000000 400.000000 0.000000 2011-04-18 1970-01-01 0.000000 f \N f f L 1114 211 2011-05-30 f 4 \N \N 0.000000 0.00000000 f 1864 606 296 1.00000000 0.0000 100.000000 100.000000 0.000000 2010-11-04 1970-01-01 0.000000 t \N f f L 1105 237 2010-11-05 t 4 \N \N 0.000000 0.00000000 f 1862 605 294 1.00000000 0.0000 100.000000 100.000000 0.000000 2010-11-04 1970-01-01 0.000000 t \N f f L 1102 168 2010-11-09 t 4 \N \N 0.000000 0.00000000 f 1860 605 297 0.01000000 0.0000 1.000000 1.000000 0.000000 2010-11-04 1970-01-01 0.000000 t \N f f L 1102 169 2010-11-09 t 8 \N \N 0.000000 0.00000000 f 1891 610 385 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1120 265 2011-04-18 f 4 0.000000 0.00000000 f 1861 605 299 4.00000000 0.0000 400.000000 400.000000 0.000000 2010-11-04 1970-01-01 0.000000 t \N f f L 1103 170 2010-11-09 t 4 \N \N 0.000000 0.00000000 f 1892 611 306 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1122 203 2011-04-15 f 4 \N \N 0.000000 0.00000000 f 1863 605 331 1.00000000 0.0000 100.000000 100.000000 0.000000 2010-11-04 1970-01-01 0.000000 t \N f f L 1104 243 2010-11-09 t 4 \N \N 0.000000 0.00000000 f 1876 602 310 1.00000000 0.0000 400.000000 400.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1112 261 2011-06-02 f 4 \N \N 0.000000 0.00000000 f 1893 611 307 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2011-04-18 1970-01-01 0.000000 f \N f f L 1122 211 2011-04-15 f 4 \N \N 0.000000 0.00000000 f 1875 602 297 0.01000000 0.0000 4.000000 4.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1111 260 2011-06-02 t 8 \N \N 0.000000 0.00000000 f 1878 602 305 1.00000000 0.0000 400.000000 400.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f t L 1112 263 2011-06-02 f 4 \N \N 0.000000 0.00000000 f 1887 610 297 0.01000000 0.0000 10.000000 10.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1119 260 2011-04-18 t 8 \N \N 0.000000 0.00000000 f 1877 602 312 4.00000000 0.0000 1600.000000 1600.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1112 262 2011-06-02 f 4 \N \N 0.000000 0.00000000 f 1888 610 310 1.00000000 0.0000 1000.000000 1000.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1120 261 2011-04-18 f 4 \N \N 0.000000 0.00000000 f 1886 610 299 4.00000000 0.0000 4000.000000 4000.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1120 259 2011-04-18 t 4 \N \N 0.000000 0.00000000 f 1889 610 312 4.00000000 0.0000 4000.000000 4000.000000 0.000000 2011-04-18 1970-01-01 0.000000 t \N f f L 1120 262 2011-04-18 f 4 \N \N 0.000000 0.00000000 f 1895 612 297 0.01000000 0.0000 10.000000 0.000000 0.000000 1970-01-01 1970-01-01 0.000000 t \N f f M 1124 260 2011-08-02 t 8 \N \N 0.000000 0.00000000 f 1894 612 299 4.00000000 0.0000 4000.000000 0.000000 0.000000 1970-01-01 1970-01-01 0.000000 t \N f f M 1125 259 2011-08-02 t 4 \N \N 0.000000 0.00000000 f 1902 614 314 1.00000000 0.0000 500.000000 500.000000 0.000000 2011-06-03 1970-01-01 0.000000 t \N f f L 1129 208 2011-06-03 f 9 \N \N 0.000000 0.00000000 f 1896 612 310 1.00000000 0.0000 1000.000000 0.000000 0.000000 1970-01-01 1970-01-01 0.000000 t \N f f M 1125 261 2011-08-02 f 4 \N \N 0.000000 0.00000000 f 1897 612 312 4.00000000 0.0000 4000.000000 0.000000 0.000000 1970-01-01 1970-01-01 0.000000 t \N f f M 1125 262 2011-08-02 f 4 \N \N 0.000000 0.00000000 f 1898 612 305 1.00000000 0.0000 1000.000000 0.000000 0.000000 1970-01-01 1970-01-01 0.000000 t \N f t M 1125 263 2011-08-02 f 4 \N \N 0.000000 0.00000000 f 1899 612 385 1.00000000 0.0000 1000.000000 0.000000 0.000000 1970-01-01 1970-01-01 0.000000 t \N f f M 1125 265 2011-08-02 f 4 0.000000 0.00000000 f 1900 613 306 1.00000000 0.0000 1000.000000 0.000000 0.000000 1970-01-01 1970-01-01 0.000000 t \N f f M 1127 203 2011-07-30 f 4 \N \N 0.000000 0.00000000 f 1901 613 307 1.00000000 0.0000 1000.000000 0.000000 0.000000 1970-01-01 1970-01-01 0.000000 f \N f f M 1127 211 2011-07-30 f 4 \N \N 0.000000 0.00000000 f \. -- -- Data for Name: womatlpost; Type: TABLE DATA; Schema: public; Owner: admin -- COPY womatlpost (womatlpost_id, womatlpost_womatl_id, womatlpost_invhist_id) FROM stdin; 1 1575 3314 2 1574 3315 3 1566 3317 4 1567 3318 5 1566 3319 6 1567 3320 7 1568 3321 8 1569 3322 9 1576 3324 10 1570 3326 11 1572 3327 12 1573 3328 13 1571 3329 14 1578 3338 15 1577 3339 16 1584 3343 17 1583 3344 18 1588 3346 19 1587 3347 20 1585 3348 21 1586 3349 22 1594 3351 23 1593 3352 24 1602 3354 25 1599 3355 26 1600 3356 27 1601 3357 28 1598 3359 29 1595 3360 30 1596 3361 31 1597 3362 32 1611 3374 33 1612 3375 34 1610 3378 35 1609 3379 36 1607 3380 37 1608 3381 38 1613 3386 39 1614 3387 40 1615 3388 41 1623 3406 42 1624 3407 46 1617 3411 47 1621 3412 48 1620 3413 49 1619 3414 50 1622 3415 51 1618 3416 58 1625 3436 59 1629 3437 60 1627 3438 61 1630 3439 62 1628 3440 63 1626 3441 64 1631 3444 65 1632 3445 66 1652 3456 67 1653 3458 68 1654 3459 69 1645 3461 70 1646 3462 71 1647 3463 72 1648 3464 73 1649 3465 74 1650 3466 75 1639 3468 76 1640 3469 77 1641 3470 78 1642 3471 79 1633 3474 80 1634 3475 81 1635 3476 82 1636 3477 83 1637 3478 84 1638 3479 85 1655 3483 86 1656 3489 87 1657 3490 88 1658 3491 89 1659 3492 90 1660 3493 91 1669 3497 92 1670 3498 93 1665 3501 94 1666 3502 95 1667 3503 96 1668 3504 97 1689 3531 98 1690 3532 102 1681 3537 103 1679 3538 104 1684 3539 105 1680 3540 106 1683 3541 107 1682 3542 108 1685 3543 109 1686 3544 110 1687 3545 111 1688 3546 112 1681 3555 113 1679 3556 114 1684 3557 115 1695 3564 116 1702 3568 117 1701 3569 118 1697 3571 119 1698 3572 120 1700 3573 121 1699 3574 122 1713 3621 123 1712 3622 124 1709 3624 125 1710 3625 126 1708 3626 127 1711 3627 128 1727 3633 129 1726 3634 130 1724 3636 131 1722 3637 132 1725 3638 133 1723 3639 134 1741 3784 135 1740 3785 136 1736 3787 137 1738 3788 138 1739 3789 139 1737 3790 140 1751 3810 141 1753 3811 142 1752 3812 143 1750 3813 144 1768 3893 145 1770 3895 146 1771 3896 147 1772 3898 148 1773 3899 149 1767 3901 150 1763 3902 151 1765 3903 152 1764 3904 153 1766 3905 154 1762 3906 155 1760 3908 156 1761 3909 157 1758 3910 158 1759 3911 159 1774 3913 160 1783 3965 161 1784 3966 162 1782 3968 163 1779 3969 164 1781 3970 165 1780 3971 166 1793 3982 167 1794 3983 168 1791 3985 169 1790 3986 170 1789 3987 171 1792 3988 172 1801 4003 173 1804 4005 174 1803 4006 175 1798 4008 176 1797 4009 177 1796 4010 178 1799 4011 179 1795 4012 180 1800 4013 181 1805 4016 182 1838 4044 183 1839 4045 184 1834 4047 185 1836 4048 186 1835 4049 187 1837 4050 188 1846 4053 189 1841 4055 190 1842 4056 191 1840 4057 192 1845 4058 193 1844 4059 194 1843 4060 195 1865 4065 196 1864 4066 197 1862 4068 198 1860 4069 199 1861 4070 200 1863 4071 201 1880 4084 202 1887 4086 203 1888 4087 204 1886 4088 205 1890 4089 206 1891 4090 207 1889 4091 208 1892 4093 209 1875 4098 210 1878 4099 211 1877 4100 212 1879 4101 213 1874 4102 214 1876 4103 215 1902 4115 \. -- -- Data for Name: womatlvar; Type: TABLE DATA; Schema: public; Owner: admin -- COPY womatlvar (womatlvar_id, womatlvar_number, womatlvar_subnumber, womatlvar_posted, womatlvar_parent_itemsite_id, womatlvar_component_itemsite_id, womatlvar_qtyord, womatlvar_qtyrcv, womatlvar_qtyiss, womatlvar_qtyper, womatlvar_scrap, womatlvar_wipscrap, womatlvar_bomitem_id, womatlvar_ref, womatlvar_notes, womatlvar_qtyfxd) FROM stdin; 45 40000 1 2005-12-29 293 297 10.000000 10.000000 0.100000 0.010000 0.000000 0.100000 169 \N \N 0.00000000 46 40000 1 2005-12-29 293 299 10.000000 10.000000 40.000000 4.000000 0.000000 10.000000 170 \N \N 0.00000000 47 40000 1 2005-12-29 293 294 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 48 40000 1 2005-12-29 293 295 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 171 \N \N 0.00000000 49 10008 1 2006-01-12 300 294 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 176 \N \N 0.00000000 50 10008 1 2006-01-12 300 297 10.000000 10.000000 0.100000 0.010000 0.000000 0.000000 177 \N \N 0.00000000 51 10008 1 2006-01-12 300 295 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 179 \N \N 0.00000000 52 10008 1 2006-01-12 300 299 10.000000 10.000000 20.000000 4.000000 0.000000 20.000000 178 \N \N 0.00000000 53 10013 1 2006-02-01 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 54 10013 1 2006-02-01 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 55 10014 1 2006-07-05 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 56 10014 1 2006-07-05 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 57 50151 1 2006-07-05 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 58 50151 1 2006-07-05 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 59 50151 1 2006-07-05 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 60 50151 1 2006-07-05 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 171 \N \N 0.00000000 61 10015 1 2006-07-05 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 62 10015 1 2006-07-05 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 63 50152 1 2006-07-05 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 64 50152 1 2006-07-05 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 65 50152 1 2006-07-05 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 66 50152 1 2006-07-05 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 171 \N \N 0.00000000 67 10020 1 2006-10-13 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 68 10020 1 2006-10-13 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 69 50155 1 2006-10-13 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 70 50155 1 2006-10-13 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 71 50155 1 2006-10-13 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 72 50155 1 2006-10-13 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 73 10022 1 2006-12-28 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 74 10022 1 2006-12-28 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 75 50158 1 2006-12-28 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 76 50158 1 2006-12-28 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 77 50158 1 2006-12-28 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 78 50158 1 2006-12-28 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 79 10023 1 2007-02-20 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 80 10023 1 2007-02-20 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 81 10024 1 2007-02-20 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 82 10024 1 2007-02-20 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 83 50160 1 2007-02-20 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 84 50160 1 2007-02-20 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 85 50160 1 2007-02-20 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 86 50160 1 2007-02-20 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 87 10025 1 2007-04-05 293 295 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 88 10025 1 2007-04-05 293 299 1000.000000 1000.000000 4000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 89 10025 1 2007-04-05 293 297 1000.000000 1000.000000 10.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 90 10025 1 2007-04-05 293 294 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 91 10029 2 2007-05-30 305 306 200.000000 200.000000 200.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 92 10030 2 2007-05-30 305 306 200.000000 200.000000 200.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 93 10031 2 2007-05-30 305 306 200.000000 200.000000 200.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 94 10026 1 2007-05-30 295 296 800.000000 800.000000 800.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 95 10026 1 2007-05-30 295 298 800.000000 800.000000 880.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 96 10027 1 2007-05-30 311 314 500.000000 500.000000 500.000000 1.000000 0.000000 0.000000 208 \N \N 0.00000000 97 10033 1 2007-05-30 311 314 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 208 \N \N 0.00000000 98 10029 1 2007-05-30 300 305 100.000000 100.000000 200.000000 2.000000 0.000000 0.000000 206 \N \N 0.00000000 99 10029 1 2007-05-30 300 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 177 \N \N 0.00000000 100 10029 1 2007-05-30 300 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 179 \N \N 0.00000000 101 10029 1 2007-05-30 300 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 178 \N \N 0.00000000 102 10029 1 2007-05-30 300 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 176 \N \N 0.00000000 103 10030 1 2007-05-30 303 305 100.000000 100.000000 200.000000 2.000000 0.000000 0.000000 204 \N \N 0.00000000 104 10030 1 2007-05-30 303 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 193 \N \N 0.00000000 105 10030 1 2007-05-30 303 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 191 \N \N 0.00000000 106 10030 1 2007-05-30 303 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 190 \N \N 0.00000000 107 10030 1 2007-05-30 303 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 192 \N \N 0.00000000 108 10031 1 2007-05-30 302 305 100.000000 100.000000 200.000000 2.000000 0.000000 0.000000 205 \N \N 0.00000000 109 10031 1 2007-05-30 302 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 189 \N \N 0.00000000 110 10031 1 2007-05-30 302 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 187 \N \N 0.00000000 111 10031 1 2007-05-30 302 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 186 \N \N 0.00000000 112 10031 1 2007-05-30 302 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 188 \N \N 0.00000000 113 10028 1 2007-05-30 308 297 500.000000 500.000000 5.000000 0.010000 0.000000 0.000000 201 \N \N 0.00000000 114 10028 1 2007-05-30 308 310 500.000000 500.000000 500.000000 1.000000 0.000000 0.000000 207 \N \N 0.00000000 115 10028 1 2007-05-30 308 312 500.000000 500.000000 2000.000000 4.000000 0.000000 0.000000 210 \N \N 0.00000000 116 10028 1 2007-05-30 308 295 500.000000 500.000000 500.000000 1.000000 0.000000 0.000000 199 \N \N 0.00000000 117 10028 1 2007-05-30 308 299 500.000000 500.000000 2000.000000 4.000000 0.000000 0.000000 198 \N \N 0.00000000 118 10036 1 2007-05-30 305 307 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 211 \N \N 0.00000000 119 10036 1 2007-05-30 305 306 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 120 10037 1 2007-05-30 311 314 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 208 \N \N 0.00000000 121 10034 1 2007-05-30 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 122 10034 1 2007-05-30 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 123 50164 1 2007-05-30 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 124 50164 1 2007-05-30 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 125 50164 1 2007-05-30 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 126 50164 1 2007-05-30 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 127 10039 1 2007-08-31 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 128 10039 1 2007-08-31 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 129 40006 1 2007-08-31 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 130 40006 1 2007-08-31 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 131 40006 1 2007-08-31 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 132 40006 1 2007-08-31 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 133 10042 1 2007-09-21 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 134 10042 1 2007-09-21 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 135 50165 1 2007-09-21 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 136 50165 1 2007-09-21 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 137 50165 1 2007-09-21 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 138 50165 1 2007-09-21 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 139 10043 1 2007-12-14 295 296 5500.000000 5500.000000 5500.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 140 10043 1 2007-12-14 295 298 5500.000000 5500.000000 6050.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 141 40007 1 2007-12-14 293 294 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 142 40007 1 2007-12-14 293 297 5000.000000 5000.000000 50.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 143 40007 1 2007-12-14 293 295 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 144 40007 1 2007-12-14 293 299 5000.000000 5000.000000 50.000000 1.000000 0.000000 0.000000 -1 \N \N 0.00000000 145 40007 1 2007-12-14 293 299 5000.000000 5000.000000 20000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 146 40007 2 2007-12-14 302 294 500.000000 500.000000 500.000000 1.000000 0.000000 0.000000 188 \N \N 0.00000000 147 40007 2 2007-12-14 302 299 500.000000 500.000000 2000.000000 4.000000 0.000000 0.000000 186 \N \N 0.00000000 148 40007 2 2007-12-14 302 295 500.000000 500.000000 500.000000 1.000000 0.000000 0.000000 187 \N \N 0.00000000 149 40007 2 2007-12-14 302 297 500.000000 500.000000 5.000000 0.010000 0.000000 0.000000 189 \N \N 0.00000000 150 10044 1 2008-03-04 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 151 10044 1 2008-03-04 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 152 10045 1 2008-03-04 323 294 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 219 \N \N 0.00000000 153 10045 1 2008-03-04 323 295 10.000000 10.000000 10.000000 1.000000 0.000000 0.000000 218 \N \N 0.00000000 154 10045 1 2008-03-04 323 297 10.000000 10.000000 0.100000 0.010000 0.000000 0.000000 216 \N \N 0.00000000 155 10045 1 2008-03-04 323 299 10.000000 10.000000 40.000000 4.000000 0.000000 0.000000 217 \N \N 0.00000000 156 10046 1 2008-03-04 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 157 10046 1 2008-03-04 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 158 10048 1 2008-03-04 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 159 10048 1 2008-03-04 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 160 10048 1 2008-03-04 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 161 10048 1 2008-03-04 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 162 10047 1 2008-03-04 323 294 3.000000 3.000000 3.000000 1.000000 0.000000 0.000000 219 \N \N 0.00000000 163 10047 1 2008-03-04 323 297 3.000000 3.000000 0.030000 0.010000 0.000000 0.000000 216 \N \N 0.00000000 164 10047 1 2008-03-04 323 299 3.000000 3.000000 12.000000 4.000000 0.000000 0.000000 217 \N \N 0.00000000 165 10047 1 2008-03-04 323 295 3.000000 3.000000 3.000000 1.000000 0.000000 0.000000 218 \N \N 0.00000000 166 10049 1 2008-03-05 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 167 10049 1 2008-03-05 295 298 100.000000 100.000000 101.000000 1.000000 0.100000 9.000000 175 \N \N 0.00000000 168 50172 1 2008-03-05 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 169 50172 1 2008-03-05 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 170 50172 1 2008-03-05 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 171 50172 1 2008-03-05 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 172 10050 1 2008-04-04 300 294 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 176 \N \N 0.00000000 173 10050 1 2008-04-04 300 297 1000.000000 1000.000000 10.000000 0.010000 0.000000 0.000000 177 \N \N 0.00000000 174 10050 1 2008-04-04 300 299 1000.000000 1000.000000 4000.000000 4.000000 0.000000 0.000000 178 \N \N 0.00000000 175 10051 1 2008-06-12 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 176 10051 1 2008-06-12 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 177 10052 1 2008-06-18 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 178 10052 1 2008-06-18 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 179 10054 2 2008-06-19 305 307 1100.000000 1100.000000 1100.000000 1.000000 0.000000 0.000000 211 \N \N 0.00000000 180 10054 2 2008-06-19 305 306 1100.000000 1100.000000 1100.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 181 10055 1 2008-06-19 295 296 2800.000000 2800.000000 2800.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 182 10055 1 2008-06-19 295 298 2800.000000 2800.000000 3080.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 183 10054 1 2008-06-19 308 312 1100.000000 1100.000000 4400.000000 4.000000 0.000000 0.000000 210 \N \N 0.00000000 184 10054 1 2008-06-19 308 310 1100.000000 1100.000000 1100.000000 1.000000 0.000000 0.000000 207 \N \N 0.00000000 185 10054 1 2008-06-19 308 305 1100.000000 1100.000000 1100.000000 1.000000 0.000000 0.000000 212 \N \N 0.00000000 186 10054 1 2008-06-19 308 295 1100.000000 1100.000000 1100.000000 1.000000 0.000000 0.000000 199 \N \N 0.00000000 187 10054 1 2008-06-19 308 299 1100.000000 1100.000000 4400.000000 4.000000 0.000000 0.000000 198 \N \N 0.00000000 188 10054 1 2008-06-19 308 297 1100.000000 1100.000000 11.000000 0.010000 0.000000 0.000000 201 \N \N 0.00000000 189 50179 2 2008-06-19 293 294 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 190 50179 2 2008-06-19 293 295 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 191 50179 2 2008-06-19 293 299 1000.000000 1000.000000 4000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 192 50179 2 2008-06-19 293 297 1000.000000 1000.000000 10.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 193 10056 1 2008-06-19 311 314 2000.000000 2000.000000 2000.000000 1.000000 0.000000 0.000000 208 \N \N 0.00000000 194 10057 1 2008-06-20 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 195 10057 1 2008-06-20 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 196 50182 1 2008-06-20 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 197 50182 1 2008-06-20 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 198 50182 1 2008-06-20 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 199 50182 1 2008-06-20 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 200 10058 1 2008-10-02 295 298 200.000000 200.000000 220.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 201 10058 1 2008-10-02 295 296 200.000000 200.000000 200.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 202 40010 1 2008-10-02 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 203 40010 1 2008-10-02 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 204 40010 1 2008-10-02 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 205 40010 1 2008-10-02 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 206 10059 1 2008-12-30 305 307 91.000000 91.000000 91.000000 1.000000 0.000000 0.000000 211 \N \N 0.00000000 207 10059 1 2008-12-30 305 306 91.000000 91.000000 91.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 208 10060 1 2008-12-31 295 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 209 10060 1 2008-12-31 295 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 210 50189 1 2008-12-31 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 211 50189 1 2008-12-31 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 212 50189 1 2008-12-31 293 295 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 213 50189 1 2008-12-31 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 214 10061 1 2009-08-13 295 298 10000.000000 10000.000000 11000.000000 1.000000 0.100000 0.000000 175 \N \N 0.00000000 215 10061 1 2009-08-13 295 296 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 174 \N \N 0.00000000 216 50195 1 2009-08-13 293 295 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 184 \N \N 0.00000000 217 50195 1 2009-08-13 293 294 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 218 50195 1 2009-08-13 293 297 10000.000000 10000.000000 100.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 219 50195 1 2009-08-13 293 299 10000.000000 10000.000000 40000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 220 10062 1 2009-09-16 293 294 200.000000 200.000000 200.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 221 10062 1 2009-09-16 293 331 200.000000 200.000000 200.000000 1.000000 0.000000 0.000000 243 \N \N 0.00000000 222 10062 1 2009-09-16 293 297 200.000000 200.000000 2.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 223 10062 1 2009-09-16 293 299 200.000000 200.000000 800.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 224 10063 1 2009-09-16 331 298 200.000000 200.000000 220.000000 1.000000 0.100000 0.000000 238 \N \N 0.00000000 225 10063 1 2009-09-16 331 296 200.000000 200.000000 200.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 226 10064 1 2009-09-21 331 298 5000.000000 5000.000000 5500.000000 1.000000 0.100000 0.000000 238 \N \N 0.00000000 227 10064 1 2009-09-21 331 296 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 228 50196 1 2009-09-21 293 294 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 229 50196 1 2009-09-21 293 331 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 243 \N \N 0.00000000 230 50196 1 2009-09-21 293 297 5000.000000 5000.000000 50.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 231 50196 1 2009-09-21 293 299 5000.000000 5000.000000 20000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 232 10066 1 2009-09-25 308 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 201 \N \N 0.00000000 233 10066 1 2009-09-25 308 312 100.000000 100.000000 400.000000 4.000000 0.000000 10.000000 210 \N \N 0.00000000 234 10066 1 2009-09-25 308 310 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 207 \N \N 0.00000000 235 10066 1 2009-09-25 308 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 198 \N \N 0.00000000 236 10067 2 2009-10-13 305 307 870.000000 870.000000 870.000000 1.000000 0.000000 0.000000 211 \N \N 0.00000000 237 10067 2 2009-10-13 305 306 870.000000 870.000000 870.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 238 10068 1 2009-10-13 331 296 900.000000 900.000000 900.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 239 10068 1 2009-10-13 331 298 900.000000 900.000000 990.000000 1.000000 0.100000 0.000000 238 \N \N 0.00000000 240 10069 1 2009-10-13 331 296 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 241 10069 1 2009-10-13 331 298 5000.000000 5000.000000 5500.000000 1.000000 0.100000 0.000000 238 \N \N 0.00000000 242 10067 1 2009-10-13 308 331 870.000000 870.000000 870.000000 1.000000 0.000000 0.000000 240 \N \N 0.00000000 243 10067 1 2009-10-13 308 312 870.000000 870.000000 3480.000000 4.000000 0.000000 0.000000 210 \N \N 0.00000000 244 10067 1 2009-10-13 308 310 870.000000 870.000000 870.000000 1.000000 0.000000 0.000000 207 \N \N 0.00000000 245 10067 1 2009-10-13 308 305 870.000000 870.000000 870.000000 1.000000 0.000000 0.000000 212 \N \N 0.00000000 246 10067 1 2009-10-13 308 297 870.000000 870.000000 8.700000 0.010000 0.000000 0.000000 201 \N \N 0.00000000 247 10067 1 2009-10-13 308 299 870.000000 870.000000 3480.000000 4.000000 0.000000 0.000000 198 \N \N 0.00000000 248 50198 1 2009-10-13 293 294 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 249 50198 1 2009-10-13 293 331 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 243 \N \N 0.00000000 250 50198 1 2009-10-13 293 297 5000.000000 5000.000000 50.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 251 50198 1 2009-10-13 293 299 5000.000000 5000.000000 20000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 252 10070 1 2009-10-13 311 314 400.000000 400.000000 400.000000 1.000000 0.000000 0.000000 208 \N \N 0.00000000 253 10071 1 2009-12-03 331 298 10000.000000 10000.000000 10900.000000 1.000000 0.100000 100.000000 238 \N \N 0.00000000 254 10071 1 2009-12-03 331 296 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 255 50200 1 2009-12-03 293 331 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 243 \N \N 0.00000000 256 50200 1 2009-12-03 293 294 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 257 50200 1 2009-12-03 293 297 10000.000000 10000.000000 100.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 258 50200 1 2009-12-03 293 299 10000.000000 10000.000000 40000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 259 10072 1 2010-03-12 331 298 1000.000000 1000.000000 1100.000000 1.000000 0.100000 0.000000 238 \N \N 0.00000000 260 10072 1 2010-03-12 331 296 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 261 50202 1 2010-03-12 293 297 1000.000000 1000.000000 10.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 262 50202 1 2010-03-12 293 294 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 263 50202 1 2010-03-12 293 299 1000.000000 1000.000000 4000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 264 50202 1 2010-03-12 293 331 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 243 \N \N 0.00000000 265 10073 2 2010-06-07 305 307 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 211 \N \N 0.00000000 266 10073 2 2010-06-07 305 306 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 267 10074 1 2010-06-07 331 298 1000.000000 1000.000000 1100.000000 1.000000 0.100000 0.000000 238 \N \N 0.00000000 268 10074 1 2010-06-07 331 296 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 269 10073 1 2010-06-07 308 297 1000.000000 1000.000000 10.000000 0.010000 0.000000 0.000000 201 \N \N 0.00000000 270 10073 1 2010-06-07 308 312 1000.000000 1000.000000 4000.000000 4.000000 0.000000 0.000000 210 \N \N 0.00000000 271 10073 1 2010-06-07 308 310 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 207 \N \N 0.00000000 272 10073 1 2010-06-07 308 305 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 212 \N \N 0.00000000 273 10073 1 2010-06-07 308 299 1000.000000 1000.000000 4000.000000 4.000000 0.000000 0.000000 198 \N \N 0.00000000 274 10073 1 2010-06-07 308 331 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 240 \N \N 0.00000000 275 10075 1 2010-06-07 311 314 5000.000000 5000.000000 5000.000000 1.000000 0.000000 0.000000 208 \N \N 0.00000000 276 10078 1 2010-09-08 331 298 10000.000000 10000.000000 11000.000000 1.000000 0.100000 0.000000 238 \N \N 0.00000000 277 10078 1 2010-09-08 331 296 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 278 50210 1 2010-09-08 293 294 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 279 50210 1 2010-09-08 293 297 10000.000000 10000.000000 100.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 280 50210 1 2010-09-08 293 299 10000.000000 10000.000000 40000.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 281 50210 1 2010-09-08 293 331 10000.000000 10000.000000 10000.000000 1.000000 0.000000 0.000000 243 \N \N 0.00000000 282 10079 2 2010-09-13 305 306 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 283 10079 2 2010-09-13 305 307 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 211 \N \N 0.00000000 284 10079 1 2010-09-13 308 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 260 \N \N 0.00000000 285 10079 1 2010-09-13 308 310 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 261 \N \N 0.00000000 286 10079 1 2010-09-13 308 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 259 \N \N 0.00000000 287 10079 1 2010-09-13 308 385 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 265 0.00000000 288 10079 1 2010-09-13 308 305 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 263 \N \N 0.00000000 289 10079 1 2010-09-13 308 312 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 262 \N \N 0.00000000 290 10081 1 2010-11-04 331 298 100.000000 100.000000 110.000000 1.000000 0.100000 0.000000 238 \N \N 0.00000000 291 10081 1 2010-11-04 331 296 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 237 \N \N 0.00000000 292 50213 1 2010-11-04 293 297 100.000000 100.000000 1.000000 0.010000 0.000000 0.000000 169 \N \N 0.00000000 293 50213 1 2010-11-04 293 294 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 168 \N \N 0.00000000 294 50213 1 2010-11-04 293 299 100.000000 100.000000 400.000000 4.000000 0.000000 0.000000 170 \N \N 0.00000000 295 50213 1 2010-11-04 293 331 100.000000 100.000000 100.000000 1.000000 0.000000 0.000000 243 \N \N 0.00000000 296 10080 2 2011-04-18 305 306 400.000000 400.000000 400.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 297 10080 2 2011-04-18 305 307 400.000000 400.000000 400.000000 1.000000 0.000000 0.000000 211 \N \N 0.00000000 298 10082 2 2011-04-18 305 306 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 203 \N \N 0.00000000 299 10082 2 2011-04-18 305 307 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 211 \N \N 0.00000000 300 10082 1 2011-04-18 308 297 1000.000000 1000.000000 10.000000 0.010000 0.000000 0.000000 260 \N \N 0.00000000 301 10082 1 2011-04-18 308 310 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 261 \N \N 0.00000000 302 10082 1 2011-04-18 308 299 1000.000000 1000.000000 4000.000000 4.000000 0.000000 0.000000 259 \N \N 0.00000000 303 10082 1 2011-04-18 308 385 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 265 0.00000000 304 10082 1 2011-04-18 308 312 1000.000000 1000.000000 4000.000000 4.000000 0.000000 0.000000 262 \N \N 0.00000000 305 10082 1 2011-04-18 308 305 1000.000000 1000.000000 1000.000000 1.000000 0.000000 0.000000 263 \N \N 0.00000000 306 10080 1 2011-04-18 308 310 400.000000 400.000000 400.000000 1.000000 0.000000 0.000000 261 \N \N 0.00000000 307 10080 1 2011-04-18 308 297 400.000000 400.000000 4.000000 0.010000 0.000000 0.000000 260 \N \N 0.00000000 308 10080 1 2011-04-18 308 299 400.000000 400.000000 1600.000000 4.000000 0.000000 0.000000 259 \N \N 0.00000000 309 10080 1 2011-04-18 308 385 400.000000 400.000000 400.000000 1.000000 0.000000 0.000000 265 0.00000000 310 10080 1 2011-04-18 308 312 400.000000 400.000000 1600.000000 4.000000 0.000000 0.000000 262 \N \N 0.00000000 311 10080 1 2011-04-18 308 305 400.000000 400.000000 400.000000 1.000000 0.000000 0.000000 263 \N \N 0.00000000 312 10084 1 2011-06-03 311 314 500.000000 500.000000 500.000000 1.000000 0.000000 0.000000 208 \N \N 0.00000000 \. -- -- Data for Name: xsltmap; Type: TABLE DATA; Schema: public; Owner: admin -- COPY xsltmap (xsltmap_id, xsltmap_name, xsltmap_doctype, xsltmap_system, xsltmap_import, xsltmap_export) FROM stdin; 1 Yahoo OrderList http://store.yahoo.com/doc/dtd/OrderList2.dtd yahoo_to_xtupleapi.xsl \. -- -- Data for Name: yearperiod; Type: TABLE DATA; Schema: public; Owner: admin -- COPY yearperiod (yearperiod_id, yearperiod_start, yearperiod_end, yearperiod_closed) FROM stdin; 5 2004-01-01 2004-12-31 t 6 2005-01-01 2005-12-31 t 7 2006-01-01 2006-12-31 t 8 2007-01-01 2007-12-31 t 9 2008-01-01 2008-12-31 t 10 2009-01-01 2009-12-31 t 12 2011-01-01 2011-12-31 f 11 2010-01-01 2010-12-31 t 13 2012-01-01 2012-12-31 f 14 2013-01-01 2013-12-31 f \. SET search_path = te, pg_catalog; -- -- Data for Name: pkgcmd; Type: TABLE DATA; Schema: te; Owner: admin -- COPY pkgcmd (cmd_id, cmd_module, cmd_title, cmd_descrip, cmd_privname, cmd_executable, cmd_name) FROM stdin; \. -- -- Data for Name: pkgcmdarg; Type: TABLE DATA; Schema: te; Owner: admin -- COPY pkgcmdarg (cmdarg_id, cmdarg_cmd_id, cmdarg_order, cmdarg_arg) FROM stdin; \. -- -- Data for Name: pkgimage; Type: TABLE DATA; Schema: te; Owner: admin -- COPY pkgimage (image_id, image_name, image_descrip, image_data) FROM stdin; \. -- -- Data for Name: pkgmetasql; Type: TABLE DATA; Schema: te; Owner: admin -- COPY pkgmetasql (metasql_id, metasql_group, metasql_name, metasql_notes, metasql_query, metasql_lastuser, metasql_lastupdate, metasql_grade) FROM stdin; 484 projects detailte -- Group: projects\n-- Name: detailte\n-- Notes: \nSELECT prj_id, prj_number, prj_name,\n CASE WHEN(prj_status='P') THEN \n WHEN(prj_status='O') THEN \n WHEN(prj_status='C') THEN \n ELSE \n END AS prj_status, \n prj_username, \n COALESCE(SUM(prjtask_hours_budget), 0.0) AS budget_hrs,\n COALESCE(SUM(prjtask_hours_actual), 0.0) AS actual_hrs,\n COALESCE(SUM(prjtask_hours_budget - prjtask_hours_actual), 0.0) AS balance_hrs, \n CASE WHEN COALESCE(SUM(prjtask_hours_budget - prjtask_hours_actual), 0.0) < 0 THEN \n 'error' END AS balance_hrs_qtforegroundrole, \n 'qty' AS budget_hrs_xtnumericrole, \n 'qty' AS actual_hrs_xtnumericrole, \n 'qty' AS balance_hrs_xtnumericrole \nFROM prj\nLEFT OUTER JOIN prjtask ON (prj_id=prjtask_prj_id)\n\nWHERE (prj_status <> 'C')\n\nGROUP BY prj_id, prj_number, prj_name, prj_status, prj_username \n ORDER BY prj_number; \N \N 0 427 customer seltecustrate Select Default Customer Project Info Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: customer\n-- Name: seltecustrate\n-- Notes: Select Default Customer Project Info\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *\nFROM te.tecustrate\nWHERE (tecustrate_cust_id=);\n \N \N 0 428 customer updtecustrate Update customer rate record Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: customer\n-- Name: updtecustrate\n-- Notes: Update customer rate record\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.tecustrate SET\n tecustrate_cust_id=,\n tecustrate_rate=,\n tecustrate_curr_id=\nWHERE (tecustrate_id=)\nRETURNING *;\n \N \N 0 425 customer deltecustrate Delete customer project defaults Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: customer\n-- Name: deltecustrate\n-- Notes: Delete customer project defaults\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM te.tecustrate\nWHERE (tecustrate_cust_id=);\n \N \N 0 426 customer instecustrate Insert customer rate record Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: customer\n-- Name: instecustrate\n-- Notes: Insert customer rate record\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nINSERT INTO te.tecustrate (\n tecustrate_cust_id,\n tecustrate_rate,\n tecustrate_curr_id )\nVALUES (\n ,\n ,\n )\nRETURNING *;\n \N \N 0 440 projectGantt getprj Fetch Project Info Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: projectGantt\n-- Name: getprj\n-- Notes: Fetch Project Info\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT prj_id\nFROM prj\nWHERE (prj_number=);\n \N \N 0 441 projectGantt jsgantt Loads jsGantt script file Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: projectGantt\n-- Name: jsgantt\n-- Notes: Loads jsGantt script file\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT script_source FROM script WHERE script_name = 'jsGantt';\n \N \N 0 442 projectGantt jsganttcss Loads jsGantt CSS file Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: projectGantt\n-- Name: jsganttcss\n-- Notes: Loads jsGantt CSS file\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT script_source FROM script WHERE script_name = 'jsGanttCSS';\n \N \N 0 443 projectGantt tasks Load project tasks for jsGantt Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: projectGantt\n-- Name: tasks\n-- Notes: Load project tasks for jsGantt\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n prjtask_id, \n prjtask_name, \n EXTRACT('day' FROM prjtask_start_date) || '/' || \n EXTRACT('month' FROM prjtask_start_date) || '/' || \n EXTRACT('year' FROM prjtask_start_date) AS start_date,\n EXTRACT('day' FROM prjtask_due_date) || '/' || \n EXTRACT('month' FROM prjtask_due_date) || '/' || \n EXTRACT('year' FROM prjtask_due_date) AS due_date \nFROM (\n SELECT \n prjtask_id,\n prjtask_name,\n COALESCE(prjtask_start_date,prjtask_due_date) AS prjtask_start_date,\n prjtask_due_date\n FROM prjtask\n\n\n WHERE (prjtask_prj_id = )\n) data;\n \N \N 0 444 task insteprjtask Insert task time expense record Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: task\n-- Name: insteprjtask\n-- Notes: Insert task time expense record\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nINSERT INTO te.teprjtask (\n teprjtask_prjtask_id,\n teprjtask_cust_id,\n teprjtask_rate,\n teprjtask_curr_id,\n teprjtask_item_id )\nVALUES (\n ,\n ,\n ,\n ,\n );\n \N \N 0 445 task selteprjtask Select Default Task Time Expense Info Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: task\n-- Name: selteprjtask\n-- Notes: Select Default Task Time Expense Info\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n COALESCE(teprjtask_cust_id,-1) AS cust_id,\n COALESCE(teprjtask_curr_id,-1) AS curr_id,\n COALESCE(teprjtask_item_id,-1) AS item_id,\n *\nFROM te.teprjtask\nWHERE (teprjtask_prjtask_id=);\n \N \N 0 446 task updteprjtask Update task time expense Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: task\n-- Name: updteprjtask\n-- Notes: Update task time expense\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.teprjtask SET\n teprjtask_cust_id=,\n teprjtask_rate=,\n teprjtask_curr_id=,\n teprjtask_item_id=\nWHERE (teprjtask_id=);\n \N \N 0 474 timeexpensesheets voucher Voucher Time Expense Sheet Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheets\n-- Name: voucher\n-- Notes: Voucher Time Expense Sheet\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT te.voucherSheet();\n \N \N 0 429 employee insteemp Insert employee time expense record Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: employee\n-- Name: insteemp\n-- Notes: Insert employee time expense record\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nINSERT INTO te.teemp (\n teemp_emp_id,\n teemp_contractor )\nVALUES (\n ,\n );\n \N \N 0 430 employee selteemp Select Default Employee Time Expense Info Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: employee\n-- Name: selteemp\n-- Notes: Select Default Employee Time Expense Info\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *\nFROM te.teemp\nWHERE (teemp_emp_id=);\n \N \N 0 431 employee updteemp Update employee time expense Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: employee\n-- Name: updteemp\n-- Notes: Update employee time expense\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.teemp SET\n teemp_contractor=\nWHERE (teemp_id=);\n \N \N 0 432 item delteexp Delete Item Expense Settings Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: item\n-- Name: delteexp\n-- Notes: Delete Item Expense Settings\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM te.teexp\nWHERE (teexp_id=);\n \N \N 0 433 item insteexp Insert item expense settings Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: item\n-- Name: insteexp\n-- Notes: Insert item expense settings\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nINSERT INTO te.teexp (\n teexp_id,\n teexp_expcat_id,\n teexp_accnt_id )\nVALUES (\n ,\n ,\n );\n \N \N 0 434 item selteexp Select Item Expense Settings Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: item\n-- Name: selteexp\n-- Notes: Select Item Expense Settings\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n teexp_expcat_id,\n teexp_accnt_id\nFROM te.teexp\nWHERE (teexp_id=);\n \N \N 0 435 item updteexp Update item expense settings Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: item\n-- Name: updteexp\n-- Notes: Update item expense settings\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.teexp SET\n teexp_expcat_id=,\n teexp_accnt_id=\nWHERE (teexp_id=);\n \N \N 0 436 project formatdates Formats Dates for jsGantt Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: project\n-- Name: formatdates\n-- Notes: Formats Dates for jsGantt\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n EXTRACT('day' FROM start_date) || '/' || \n EXTRACT('month' FROM start_date) || '/' || \n EXTRACT('year' FROM start_date) AS start_date,\n EXTRACT('day' FROM due_date) || '/' || \n EXTRACT('month' FROM due_date) || '/' || \n EXTRACT('year' FROM due_date) AS due_date\nFROM (\n SELECT COALESCE(,)::date AS start_date,\n ::date AS due_date\n) data\n \N \N 0 437 project insteprj Insert project time expense record Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: project\n-- Name: insteprj\n-- Notes: Insert project time expense record\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nINSERT INTO te.teprj (\n teprj_prj_id,\n teprj_cust_id,\n teprj_rate,\n teprj_curr_id )\nVALUES (\n ,\n ,\n ,\n );\n \N \N 0 438 project selteprj Select Default Project Time Expense Info Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: project\n-- Name: selteprj\n-- Notes: Select Default Project Time Expense Info\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT COALESCE(teprj_cust_id,-1) AS cust_id,\n COALESCE(teprj_curr_id,-1) AS curr_id,\n *\nFROM te.teprj\nWHERE (teprj_prj_id=);\n \N \N 0 439 project updteprj Update project time expense Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: project\n-- Name: updteprj\n-- Notes: Update project time expense\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.teprj SET\n teprj_cust_id=,\n teprj_rate=,\n teprj_curr_id=\nWHERE (teprj_id=);\n \N \N 0 447 timeexpensehistory detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensehistory\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n teitem.*,\n item_number, item_descrip1,\n cust_number, cust_name,\n tehead.*, tehead_number || '-' || teitem_linenumber::text AS f_sheet_number,\n emp_code,\n prj_number, prj_name,\n prjtask_number, prjtask_name,\n CASE WHEN (tehead_status='O') THEN \n \n WHEN (tehead_status='A') THEN\n \n ELSE \n END AS tehead_status_qtdisplayrole,\n CASE WHEN (teitem_type='T') THEN\n \n WHEN (teitem_type='E') THEN\n \n ELSE\n \n END AS teitem_type_qtdisplayrole,\n\n '0' AS teitem_qty_xttotalrole,\n\n\n '0' AS teitem_total_xttotalrole,\n\n\n formatQty(teitem_qty) AS f_qty,\n formatSalesPrice(teitem_rate) AS f_rate,\n formatBoolYN(teitem_billable) AS f_billable,\n formatExtPrice(teitem_total) AS f_total,\n formatDate(teitem_workdate) AS f_workdate,\n\n 'qty' AS teitem_qty_xtnumericrole,\n 'salesprice' AS teitem_rate_xtnumericrole,\n 'extprice' AS teitem_total_xtnumericrole\nFROM te.tehead\n JOIN te.teitem ON (tehead_id = teitem_tehead_id)\n JOIN emp ON (tehead_emp_id= emp_id)\n JOIN item ON (teitem_item_id = item_id)\n JOIN classcode ON (item_classcode_id=classcode_id)\n LEFT OUTER JOIN custinfo ON (teitem_cust_id=cust_id)\n\n JOIN custtype ON (cust_custtype_id=custtype_id)\n\n JOIN prjtask ON (teitem_prjtask_id=prjtask_id)\n JOIN prj ON (prjtask_prj_id=prj_id)\n\n JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n\n\n JOIN empgrpitem ON (empgrpitem_emp_id=emp_id)\n\n\n JOIN itemgrpitem ON (itemgrpitem_item_id=item_id)\n\nWHERE (true\n\n AND (teitem_workdate >= )\n\n\n AND (teitem_workdate <= )\n\n\n AND (teitem_type = 'T')\n\n\n AND (teitem_type = 'E')\n\n\n AND (prj_id = )\n\n\n AND (cust_id = )\n\n\n AND (cust_custtype_id = )\n\n\n AND (custtype_code ~* )\n\n\n AND (custgrpitem_custgrp_id=)\n\n\n AND (emp_id = )\n\n\n AND (empgrpitem_empgrp_id=)\n\n\n AND (item_id = )\n\n\n AND (itemgrpitem_itemgrp_id=)\n\n\n AND (classcode_id = )\n\n\n AND (classcode_code ~* )\n\n) \nORDER BY tehead_number, teitem_linenumber;\n \N \N 0 448 timeexpensesheet deltehead Delete Time Expense Sheet Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheet\n-- Name: deltehead\n-- Notes: Delete Time Expense Sheet\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM docass WHERE (docass_source_id= AND docass_source_type='TE');\nDELETE FROM te.tehead WHERE (tehead_id=);\n \N \N 0 449 timeexpensesheet delteitem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheet\n-- Name: delteitem\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM te.teitem\nWHERE teitem_id=\n \N \N 0 450 timeexpensesheet detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheet\n-- Name: detail\n-- Notes:\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n teitem.*,\n CASE WHEN (teitem_type = 'T') THEN\n teitem_qty\n END AS hours,\n CASE WHEN (teitem_type = 'E') THEN\n teitem_total\n END AS expense,\n item_number, item_descrip1,\n cust_number, cust_name,\n tehead.*, emp_code,\n prj_number, prj_name,\n prjtask_number, prjtask_name,\n CASE WHEN teitem_type='E' THEN 0\n ELSE COALESCE(teitem_empcost, te.calcRate(emp_wage, emp_wage_period))\n END AS teitem_hrlycost,\n CASE WHEN teitem_type='E' THEN 0\n ELSE COALESCE(teitem_empcost, te.calcRate(emp_wage, emp_wage_period))\n * teitem_qty END AS teitem_totalcost,\n CASE WHEN (teitem_type='T') THEN\n \n WHEN (teitem_type='E') THEN\n \n ELSE\n \n END AS teitem_type_qtdisplayrole,\n 'qty' AS teitem_qty_xtnumericrole,\n 'qty' AS hours_xtnumericrole,\n 'qty' AS teitem_qty_xtnumericrole,\n 'qty' AS hours_xtnumericrole,\n 'extprice' AS expense_xtnumericrole,\n '--' AS hours_xtnullrole,\n '--' AS expense_xtnullrole,\n 'salesprice' AS teitem_rate_xtnumericrole,\n 'extprice' AS teitem_total_xtnumericrole,\n 0 AS hours_xttotalrole,\n 0 AS expense_xttotalrole,\n firstLine(teitem_notes) AS f_notes\nFROM te.tehead\n JOIN te.teitem ON (tehead_id = teitem_tehead_id)\n JOIN emp ON (tehead_emp_id= emp_id)\n JOIN item ON (teitem_item_id = item_id)\n LEFT OUTER JOIN custinfo ON (teitem_cust_id=cust_id)\n JOIN prjtask ON (teitem_prjtask_id=prjtask_id)\n JOIN prj ON (prjtask_prj_id=prj_id)\nWHERE (tehead_id = )\nORDER BY teitem_linenumber;\n \N \N 0 451 timeexpensesheet header Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheet\n-- Name: header\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n tehead.*, emp_code\nFROM te.tehead\n JOIN emp ON (tehead_emp_id= emp_id)\nWHERE (tehead_id = );\n \N \N 0 452 timeexpensesheet instehead Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheet\n-- Name: instehead\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nINSERT INTO te.tehead(\n tehead_emp_id,\n tehead_warehous_id,\n tehead_weekending,\n tehead_notes) \nVALUES (\n ,\n ,\n ,\n )\nRETURNING *;\n \N \N 0 453 timeexpensesheet updtehead Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheet\n-- Name: updtehead\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.tehead SET \n tehead_emp_id = ,\n tehead_warehous_id = ,\n tehead_notes = \nWHERE tehead_id=;\n \N \N 0 454 timeexpensesheetitem detail Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n (SELECT (COUNT(teitem_id) = 0)\n FROM te.teitem maxte\n WHERE ((maxte.teitem_tehead_id=tehead_id)\n AND (maxte.teitem_linenumber > curr.teitem_linenumber))) AS ismax,\n COALESCE(curr.teitem_empcost, te.calcRate(emp_wage, emp_wage_period)) AS teitem_hrlycost\nFROM te.tehead\n JOIN te.teitem curr ON (tehead_id = curr.teitem_tehead_id) \n JOIN prjtask ON (prjtask_id=curr.teitem_prjtask_id)\n JOIN prj ON (prj_id=prjtask_prj_id)\t\t\n LEFT JOIN emp ON (tehead_emp_id = emp_id)\nWHERE (curr.teitem_id=);\n \N \N 0 473 timeexpensesheets unapprove Unapprove Time Expense Sheet Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheets\n-- Name: unapprove\n-- Notes: Unapprove Time Expense Sheet\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.tehead SET \n tehead_status = 'O' \nWHERE (tehead_id=);\n \N \N 0 455 timeexpensesheetitem emptotals Employee Hours Totals Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: emptotals\n-- Notes: Employee Hours Totals\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n formatqty(coalesce(sum(day_hours),0) + coalesce(,0)) as day_hours,\n formatqty(coalesce(sum(sheet_hours),0) + coalesce(,0)) as sheet_hours\nFROM (\n SELECT teitem_qty AS day_hours, 0 AS sheet_hours\n FROM te.teitem\n JOIN te.tehead ON (teitem_tehead_id=tehead_id)\n WHERE ((tehead_emp_id=)\n AND (teitem_id != )\n AND (teitem_workdate = )\n AND (teitem_type = 'T'))\n UNION ALL\n SELECT 0 AS day_hours, teitem_qty AS sheet_hours\n FROM te.teitem\n JOIN te.tehead ON (teitem_tehead_id=tehead_id)\n WHERE ((tehead_emp_id=)\n AND (teitem_id != )\n AND (tehead_id = )\n AND (teitem_type = 'T')) \n) AS data;\n \N \N 0 456 timeexpensesheetitem getcustinfo Get customer currency rate Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: getcustinfo\n-- Notes: Get customer currency rate\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cust_curr_id \nFROM custinfo \nWHERE (cust_id=);\n \N \N 0 457 timeexpensesheetitem gettask Get Project task list Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: gettask\n-- Notes: Get Project task list\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n prjtask_id,\n (prjtask_number || ' - ' || prjtask_name) AS name \nFROM prjtask \nWHERE (prjtask_prj_id = )\n\n AND (prjtask_status IN ('O','P'))\n\nORDER by prjtask_number;\n \N \N 0 458 timeexpensesheetitem getterate Get billing rate for Time Expense Item Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: getterate\n-- Notes: Get billing rate for Time Expense Item\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT COALESCE(rate,0) AS rate \nFROM (\n\n-- Project Task Rate\nSELECT teprjtask_rate AS rate, \n teprjtask_curr_id AS curr_id,\n 10 AS seq \nFROM te.teprjtask\nWHERE ((teprjtask_prjtask_id = )\n AND (teprjtask_curr_id IS NOT NULL))\nUNION\n\n-- Project Rate\nSELECT teprj_rate AS rate, \n teprj_curr_id AS curr_id,\n 20 AS seq\nFROM te.teprj\nWHERE ((teprj_prj_id = )\n AND (teprj_curr_id IS NOT NULL))\nUNION\n\n-- Employee Rate\nSELECT emp_extrate AS rate, \n baseCurrId() AS curr_id,\n 30 AS seq\nFROM emp\nWHERE ((emp_id = )\n AND (emp_extrate > 0))\nUNION\n\n-- Customer Rate\nSELECT tecustrate_rate as rate, \n tecustrate_curr_id,\n 40 AS seq\nFROM te.tecustrate\nWHERE ((tecustrate_cust_id = )\n AND (tecustrate_curr_id IS NOT NULL))\nUNION\n\n\n-- Item List Price\nSELECT item_listprice as rate, \n baseCurrId(),\n 50 AS seq\nFROM item\nWHERE (item_id = )\n) AS rates\nORDER BY seq\nLIMIT 1;\n \N \N 0 459 timeexpensesheetitem instask Insert a default Project Task Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: instask\n-- Notes: Insert a default Project Task\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nINSERT INTO prjtask\nSELECT\n nextval('invchead_invchead_id_seq'),\n ,\n ,\n ,\n ,\n null,\n 'O',\n 0,\n 0,\n 0,\n 0,\n current_user,\n ,\n null,\n ,\n null,\n current_user;\n \N \N 0 460 timeexpensesheetitem insteitem Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: insteitem\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nINSERT INTO te.teitem (\n teitem_tehead_id,\n teitem_linenumber,\n teitem_type,\n teitem_workdate,\n teitem_cust_id,\n teitem_po,\n teitem_item_id,\n teitem_uom_id,\n teitem_qty,\n teitem_rate,\n teitem_total,\n teitem_prjtask_id,\n teitem_billable,\n teitem_prepaid, \n teitem_notes,\n teitem_curr_id, \n teitem_empcost )\nSELECT\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n item_price_uom_id,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n \nFROM item\nWHERE (item_id=)\nRETURNING *;\n \N \N 0 461 timeexpensesheetitem nextlinenum Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: nextlinenum\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT COALESCE(MAX(teitem_linenumber),0) +1 AS linenumber\nFROM te.teitem\nWHERE (teitem_tehead_id=);\n \N \N 0 462 timeexpensesheetitem taskbudg Task Budget Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: taskbudg\n-- Notes: Task Budget\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n formatqty(prjtask_hours_budget) as budget_hours,\n formatqty(prjtask_hours_actual) as actual_hours,\n formatmoney(prjtask_exp_budget) as budget_cost,\n formatmoney(prjtask_exp_actual) as actual_cost \nFROM prjtask \nWHERE (prjtask_id = )\n \N \N 0 463 timeexpensesheetitem taskdefaults Project Task default values Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: taskdefaults\n-- Notes: Project Task default values\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n COALESCE(teprj_cust_id,teprjtask_cust_id,-1) AS cust_id,\n COALESCE(teprjtask_item_id,-1) AS item_id\nFROM prjtask\n JOIN prj ON (prj_id=prjtask_prj_id)\n LEFT OUTER JOIN te.teprj ON (teprj_prj_id=prj_id)\n LEFT OUTER JOIN te.teprjtask ON (teprjtask_prjtask_id=prjtask_id)\nWHERE (prjtask_id=)\n \N \N 0 464 timeexpensesheetitem taskrollup Total hours and expenses including unapproved sheets Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: taskrollup\n-- Notes: Total hours and expenses including unapproved sheets\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n formatQty(SUM(total_hours)) AS total_hours,\n formatMoney(SUM(total_expense)) AS total_expense\nFROM\n (\n SELECT \n prjtask_hours_actual AS total_hours,\n prjtask_exp_actual AS total_expense\n FROM prjtask \n WHERE prjtask_id = \n UNION\n SELECT\n SUM(teitem_qty) as total_hours,\n 0 as total_expense\n FROM te.teitem \n JOIN te.tehead ON (tehead_id=teitem_tehead_id)\n WHERE teitem_prjtask_id = \n AND teitem_type = 'T' \n-- AND teitem_id != \n AND tehead_status = 'O'\n UNION\n SELECT \n 0 as total_hours,\n SUM(teitem_total) AS total_expense\n FROM te.teitem \n JOIN te.tehead ON (tehead_id=teitem_tehead_id)\n WHERE teitem_prjtask_id = \n AND teitem_type = 'E'\n-- AND teitem_id != \n AND tehead_status = 'O'\n) AS rollup;\n \N \N 0 465 timeexpensesheetitem teitemnext Find Next Item Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: teitemnext\n-- Notes: Find Next Item\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT a.teitem_id\nFROM te.teitem AS a, te.teitem AS b\nWHERE ((a.teitem_tehead_id = b.teitem_tehead_id)\n AND (a.teitem_linenumber > b.teitem_linenumber)\n AND (b.teitem_id=))\nORDER BY a.teitem_linenumber\nLIMIT 1;\n \N \N 0 466 timeexpensesheetitem teitemprev Find previous item Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: teitemprev\n-- Notes: Find previous item\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT a.teitem_id\nFROM te.teitem AS a, te.teitem AS b\nWHERE ( (a.teitem_tehead_id = b.teitem_tehead_id)\n AND (a.teitem_linenumber < b.teitem_linenumber)\n AND (b.teitem_id=) ) \nORDER BY a.teitem_linenumber DESC\nLIMIT 1;\n\nSELECT teitem_id\nFROM te.teitem\nWHERE (teitem_tehead_id=)\nORDER BY teitem_linenumber DESC\nLIMIT 1;\n\n \N \N 0 467 timeexpensesheetitem updteitem Update Time Expense Item Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheetitem\n-- Name: updteitem\n-- Notes: Update Time Expense Item\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.teitem SET \n teitem_tehead_id=,\n teitem_linenumber=,\n teitem_type=,\n teitem_workdate=,\n teitem_cust_id=,\n teitem_po=,\n teitem_item_id=,\n teitem_uom_id=item_price_uom_id,\n teitem_qty=,\n teitem_rate=,\n teitem_total=,\n teitem_prjtask_id=,\n teitem_billable=,\n teitem_prepaid=, \n teitem_notes=,\n teitem_curr_id=,\n teitem_empcost=\nFROM item\nWHERE ((teitem_id=)\n AND (teitem_item_id=item_id))\nRETURNING *;\n \N \N 0 468 timeexpensesheets approve Approve Time Expense Sheet Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheets\n-- Name: approve\n-- Notes: Approve Time Expense Sheet\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.tehead SET \n tehead_status = 'A' \nWHERE (tehead_id=);\n \N \N 0 469 timeexpensesheets close Close Time Expense Sheet Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheets\n-- Name: close\n-- Notes: Close Time Expense Sheet\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE te.tehead SET \n tehead_status = 'C' \nWHERE (tehead_id=);\n \N \N 0 470 timeexpensesheets detail Time Expense Sheet List Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheets\n-- Name: detail\n-- Notes: Time Expense Sheet List\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n tehead_id,\n tehead_number,\n tehead_weekending,\n tehead_status,\n emp_code,\n invoiced,\n vouchered,\n posted,\n\n SUM(tovoucher) AS total_e,\n SUM(toinvoice) AS total_i,\n \n CASE WHEN (invoiced = 1) THEN \n WHEN (invoiced = 0) THEN \n ELSE \n END AS invoiced_qtdisplayrole,\n CASE WHEN (vouchered = 1) THEN \n WHEN (vouchered = 0) THEN \n ELSE \n END AS vouchered_qtdisplayrole,\n CASE WHEN (posted = 1) THEN \n WHEN (posted = 0) THEN \n ELSE \n END AS posted_qtdisplayrole,\n CASE WHEN (tehead_status='O') THEN\n \n WHEN (tehead_status='A') THEN\n \n ELSE \n END AS tehead_status_qtdisplayrole,\n 'curr' AS total_xtnumericrole,\n CASE WHEN (invoiced = -1) THEN 'LightGray'\n WHEN (invoiced = 0 AND tehead_status = 'A') THEN 'altemphasis'\n END AS invoiced_qtforegroundrole,\n CASE WHEN (vouchered = -1) THEN 'LightGray'\n WHEN (vouchered = 0 AND tehead_status = 'A') THEN 'altemphasis'\n END AS vouchered_qtforegroundrole,\n CASE WHEN (posted = -1) THEN 'LightGray'\n WHEN (posted = 0 AND tehead_status = 'A') THEN 'altemphasis'\n END AS posted_qtforegroundrole,\n CASE WHEN (tehead_status = 'O') THEN 'emphasis'\n WHEN (tehead_status = 'A') THEN 'altemphasis'\n END AS tehead_status_qtforegroundrole\n\n ,\n formatMoney(SUM(toinvoice)) AS f_total,\n formatDate(tehead_weekending) AS f_weekending\n\n\nFROM (\n SELECT\n tehead_id,\n tehead_number,\n tehead_weekending,\n tehead_status,\n emp_code, \n CASE WHEN (teitem_type='E' AND teitem_prepaid=false) \n THEN teitem_total\n WHEN (teitem_type='T' AND teemp_contractor = true) \n THEN COALESCE(teitem_empcost, te.calcRate(emp_wage, emp_wage_period))* teitem_qty\n ELSE 0 \n END as tovoucher,\n \n CASE WHEN (teitem_billable=TRUE) \n THEN teitem_total\n ELSE 0 \n END AS toinvoice,\n\n te.sheetstate(tehead_id, 'I') AS invoiced,\n te.sheetstate(tehead_id, 'V') AS vouchered,\n te.sheetstate(tehead_id, 'P') AS posted\n FROM te.tehead\n LEFT OUTER JOIN te.teitem ON (tehead_id=teitem_tehead_id)\n JOIN emp ON (tehead_emp_id=emp_id)\n LEFT OUTER JOIN te.teemp ON (tehead_emp_id=teemp_emp_id)\n WHERE (\n\n (tehead_weekending >= )\n AND (tehead_weekending <= )\n AND (tehead_status IN ())\n\n AND \n (tehead_emp_id=)\n\n)) AS data\nGROUP BY\n tehead_id,\n tehead_number,\n tehead_weekending,\n tehead_status,\n emp_code,\n invoiced,\n vouchered,\n posted\nORDER BY tehead_number;\n \N \N 0 471 timeexpensesheets invoice Invoice Time Expense Sheet Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheets\n-- Name: invoice\n-- Notes: Invoice Time Expense Sheet\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT te.invoiceSheets(ARRAY[\n \n \n ,\n \n \n \n]\n);\n \N \N 0 472 timeexpensesheets post Post Time Expense Sheet Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: timeexpensesheets\n-- Name: post\n-- Notes: Post Time Expense Sheet\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT te.postSheet(, , );\n \N \N 0 \. -- -- Data for Name: pkgpriv; Type: TABLE DATA; Schema: te; Owner: admin -- COPY pkgpriv (priv_id, priv_module, priv_name, priv_descrip, priv_seq) FROM stdin; 636 TE MaintainTimeExpenseOthers Allowed to Maintain Time/Exp Sheets for all users \N 637 TE MaintainTimeExpenseSelf Allowed to Maintain Time/Exp Sheets \N 638 TE MaintainTimeExpense Allowed to Maintain Time/Exp Sheets \N 639 TE CanViewRates Allowed to view rates in the Time Entries \N 678 TE MaintainEmpCostAll Allowed to maintain employee costs for all users \N 679 TE MaintainEmpCostSelf Allowed to maintain own employee costs \N 640 TE CanApprove Allowed to Approve Time/Exp Sheets \N 641 TE allowInvoicing Allowed to Invoice Time/Exp Sheets \N 642 TE allowVouchering Allowed to Voucher Time/Exp Sheets \N 643 TE PostTimeSheets Allowed to Post Time Sheets \N 644 TE ViewTimeExpenseHistory Allowed to view Time Expense Sheet history \N \. -- -- Data for Name: pkgreport; Type: TABLE DATA; Schema: te; Owner: admin -- COPY pkgreport (report_id, report_name, report_sys, report_source, report_descrip, report_grade, report_loaddate) FROM stdin; 464 TimeExpenseHistory \N \n\n Time Expense History\n TimeExpenseHistory\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n timeexpensehistory\n detail\n \n \n 95\n \n \n \n \n 3.33333\n 89.3333\n 743.333\n 89.3333\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 49\n \n \n \n 6.33333\n 41.3333\n 746.333\n 41.3333\n 2\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 40\n \n \n 394\n 19\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_number\n \n \n \n \n 480\n 19\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n item_descrip1\n \n \n \n \n 394\n 3.84333\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prjtask_number\n \n \n \n \n 479\n 3.84333\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prjtask_name\n \n \n \n \n 547\n 3.84333\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_qty\n \n \n \n \n 626\n 3.84333\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_billable\n \n \n \n \n 204\n 19\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_number\n \n \n \n \n 294\n 3.84333\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prj_name\n \n \n \n \n 204\n 3.84333\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n prj_number\n \n \n \n \n 294\n 19\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n cust_name\n \n \n \n \n 10\n 3.84333\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tehead_number\n \n \n \n \n 669.333\n 3.84333\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_total\n \n \n \n \n 25\n 19\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_workdate\n \n \n \n \n 111.667\n 4.33333\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n teitem_type_qtdisplayrole\n \n \n \n \n 111.667\n 19\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n emp_code\n \n \n \n \n 627\n 19\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tehead_status_qtdisplayrole\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n \n 35\n \n \n 549\n 4.33\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n teitem_qty\n \n money\n \n \n \n \n \n 668\n 4\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n teitem_total\n \n %0.2f\n \n \n \n
\n \N 0 \N 465 TimeExpenseSheet \N \n\n Time Expense Sheet\n TimeExpenseSheet\n \n \n \n SELECT tehead_id, tehead_number || '-' || tehead_username FROM tehead ORDER By tehead_number DESC;\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n header\n SELECT \n tehead_number,\n formatDate(tehead_weekending) AS f_weekending,\n warehous_code,\n emp_code || ' - ' || COALESCE(cntct_name,'') AS f_employee,\n CASE WHEN (tehead_status='O') THEN \n <? value("open") ?> \n WHEN (tehead_status='A') THEN\n <? value("approved") ?> \n ELSE <? value("closed") ?>\n END AS f_status,\n tehead_notes\nFROM te.tehead\n JOIN emp ON (tehead_emp_id=emp_id)\n JOIN whsinfo ON (warehous_id=tehead_warehous_id)\n LEFT OUTER JOIN cntct ON (emp_cntct_id=cntct_id)\nWHERE (tehead_id=<? value("tehead_id") ?>);\n\n \n \n time\n SELECT\n teitem_tehead_id,\n formatDate(teitem_workdate) AS f_workdate,\n prj_number,\n prj_name,\n prjtask_number,\n prjtask_name,\n cust_number,\n cust_name,\n item_number,\n item_descrip1,\n formatQty(teitem_qty) AS f_hours,\n teitem_qty,\n CASE WHEN (teitem_billable) THEN\n formatMoney(teitem_total)\n ELSE ' -- ' END AS f_billing_total,\n CASE WHEN (teitem_billable) THEN\n teitem_total\n ELSE 0 END AS billing_total,\n formatBoolYN(teitem_billable) AS f_billable,\n teitem_notes\nFROM te.teitem\n JOIN prjtask ON (teitem_prjtask_id=prjtask_id)\n JOIN prj ON (prjtask_prj_id=prj_id)\n JOIN item ON (item_id=teitem_item_id)\n LEFT OUTER JOIN custinfo ON (cust_id=teitem_cust_id)\nWHERE ((teitem_tehead_id=<? value("tehead_id") ?>)\n AND (teitem_type='T'))\nORDER BY teitem_tehead_id, teitem_workdate, teitem_linenumber;\n \n \n expense\n SELECT\n teitem_tehead_id,\n formatDate(teitem_workdate) AS f_workdate,\n prj_number,\n prj_name,\n prjtask_number,\n prjtask_name,\n cust_number,\n cust_name,\n item_number,\n item_descrip1,\n formatQty(teitem_qty) AS f_qty,\n teitem_qty,\n formatMoney(teitem_total) AS f_total,\n teitem_total,\n CASE WHEN (teitem_billable) THEN\n formatMoney(teitem_total)\n ELSE ' -- ' END AS f_billing_total,\n CASE WHEN (teitem_type = 'E') THEN\n teitem_total\n ELSE 0 END AS expense_total,\n CASE WHEN (teitem_billable) THEN\n teitem_total\n ELSE 0 END AS billing_total,\n formatBoolYN(teitem_billable) AS f_billable,\n teitem_notes\nFROM te.teitem\n JOIN prjtask ON (teitem_prjtask_id=prjtask_id)\n JOIN prj ON (prjtask_prj_id=prj_id)\n JOIN item ON (item_id=teitem_item_id)\n LEFT OUTER JOIN custinfo ON (cust_id=teitem_cust_id)\nWHERE ((teitem_tehead_id=<? value("tehead_id") ?>)\n AND (teitem_type='E'))\nORDER BY teitem_workdate, teitem_linenumber;\n \n \n prjsum\n SELECT\n teitem_tehead_id,\n prj_number,\n SUM(teitem_qty) AS total_hours,\n SUM(teitem_total) AS billing_total,\nCASE WHEN (\n (checkprivilege('MaintainEmpCostAll') \n OR \n (checkprivilege('MaintainEmpCostSelf') \n AND \n current_user = (SELECT tehead_username \n FROM te.tehead \n WHERE teitem_tehead_id = tehead_id)\n ) \n )\n )\n THEN SUM(teitem_empcost * teitem_qty)\n ELSE 0 END AS cost_total,\nCASE WHEN (\n (checkprivilege('MaintainEmpCostAll') \n OR\n (checkprivilege('MaintainEmpCostSelf')\n AND \n current_user = (SELECT tehead_username \n FROM te.tehead \n WHERE teitem_tehead_id = tehead_id)\n )\n )\n )\n THEN 'Cost'\n ELSE 'No Priv' END AS title\n\nFROM te.teitem\n JOIN prjtask ON (teitem_prjtask_id=prjtask_id)\n JOIN prj ON (prjtask_prj_id=prj_id)\n JOIN item ON (item_id=teitem_item_id)\n LEFT OUTER JOIN custinfo ON (cust_id=teitem_cust_id)\nWHERE ((teitem_tehead_id=<? value("tehead_id") ?>)\n AND (teitem_type='T'))\nGROUP BY teitem_tehead_id, prj_number;\n \n \n prjexpsum\n SELECT\n teitem_tehead_id,\n prj_number,\n SUM(teitem_total) AS total\nFROM te.teitem\n JOIN prjtask ON (teitem_prjtask_id=prjtask_id)\n JOIN prj ON (prjtask_prj_id=prj_id)\n JOIN item ON (item_id=teitem_item_id)\n LEFT OUTER JOIN custinfo ON (cust_id=teitem_cust_id)\nWHERE ((teitem_tehead_id=<? value("tehead_id") ?>)\n AND (teitem_type='E'))\nGROUP BY teitem_tehead_id, prj_number;\n \n \n 110\n \n \n \n \n \n \n \n \n 135\n 35\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n header\n tehead_number\n \n \n \n \n 135\n 50\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n header\n f_weekending\n \n \n \n \n 135\n 65\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n header\n warehous_code\n \n \n \n \n 135\n 80\n 175\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n header\n f_employee\n \n \n \n \n 355\n 80\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n header\n f_status\n \n \n \n \n \n \n 6\n \n \n 14\n \n
\n time\n \n timefoot\n teitem_tehead_id\n \n 70\n \n \n \n \n \n \n \n \n \n \n \n \n \n 3.33333\n 61.333\n 743.333\n 61.333\n 2\n \n \n \n 15\n \n \n \n \n time\n \n 45\n \n \n 625\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n f_billable\n \n \n \n \n 200\n 5\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n prj_name\n \n \n \n \n 385\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n prjtask_name\n \n \n \n \n 110\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n prj_number\n \n \n \n \n 670\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n f_billing_total\n \n \n \n \n 490\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n f_hours\n \n \n \n \n 10\n 5\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n f_workdate\n \n \n \n \n 300\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n prjtask_number\n \n \n \n \n 110\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n cust_number\n \n \n \n \n 200\n 15\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n cust_name\n \n \n \n \n 300\n 15\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n item_number\n \n \n \n \n 385\n 15\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n time\n item_descrip1\n \n \n \n \n 10\n 30\n 370\n 15\n \n 0\n \n Arial\n 8\n normal\n \n \n \n \n time\n teitem_notes\n \n \n \n
\n
\n projsum\n \n \n prj_sum\n teitem_tehead_id\n \n \n 50\n \n \n \n \n \n 3.33333\n 46.333\n 743.333\n 46.333\n 2\n \n \n \n 615\n 30\n 50\n 15\n \n \n Arial\n 8\n normal\n \n \n \n \n prjsum\n title\n \n \n \n \n 30\n \n \n 695\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjsum\n billing_total\n \n money\n \n \n \n \n 505\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjsum\n total_hours\n \n qty\n \n \n \n 360\n 5\n 745\n 5\n 2\n \n \n 420\n 5\n 520\n 5\n 0\n \n \n \n 615\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjsum\n cost_total\n \n money\n \n \n \n \n \n \n prjsum\n \n 25\n \n \n 695\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjsum\n billing_total\n \n money\n \n \n \n 615\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjsum\n cost_total\n \n money\n \n \n \n 380\n 5\n 115\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjsum\n prj_number\n \n \n \n \n 505\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjsum\n total_hours\n \n qty\n \n \n
\n
\n expense\n \n expdetail\n teitem_tehead_id\n \n 65\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 35\n \n \n 670\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n billing_total\n \n money\n \n \n \n \n \n 550\n 3.33\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n expense_total\n \n money\n \n \n \n \n \n \n expense\n \n 50\n \n \n 300\n 20\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n item_number\n \n \n \n \n 385\n 20\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n item_descrip1\n \n \n \n \n 300\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n prjtask_number\n \n \n \n \n 385\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n prjtask_name\n \n \n \n \n 490\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n f_qty\n \n \n \n \n 625\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n f_billable\n \n \n \n \n 670\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n f_billing_total\n \n \n \n \n 110\n 20\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n cust_number\n \n \n \n \n 200\n 5\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n prj_name\n \n \n \n \n 110\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n prj_number\n \n \n \n \n 200\n 20\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n cust_name\n \n \n \n \n 10\n 5\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n f_workdate\n \n \n \n \n 550\n 5\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n expense\n f_total\n \n \n \n 4.13052\n -5.20281\n 744.13\n -5.20281\n 2\n \n \n \n 110\n 35\n 600\n 15\n \n 0\n \n Arial\n 8\n normal\n \n \n \n \n expense\n teitem_notes\n \n \n \n
\n
\n prjexpsum\n \n prjexpsum\n teitem_tehead_id\n \n 60\n \n \n \n \n 4.13052\n 53.1454\n 744.13\n 53.1454\n 2\n \n \n \n 40\n \n \n 695\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjexpsum\n total\n \n money\n \n \n \n 655\n 5\n 745\n 5\n 2\n \n \n \n \n \n prjexpsum\n \n 25\n \n \n 370\n 5\n 115\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjexpsum\n prj_number\n \n \n \n \n 695\n 5\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n prjexpsum\n total\n \n money\n \n \n
\n \n 25\n \n \n 680\n 5\n 15\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n 90\n 5\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n \n \n 710\n 5\n 20\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_count\n \n \n \n \n 30\n \n \n 110\n 5\n 600\n 15\n \n 0\n \n Arial\n 8\n normal\n \n \n \n \n header\n tehead_notes\n \n \n \n \n
\n \N 0 \N 466 TimeExpenseSheets \N \n\n Time Expense Sheets\n TimeExpenseSheets\n \n \n \n \n 0.05\n 0.05\n \n Letter\n \n 50\n 50\n 50\n 50\n \n detail\n timeexpensesheets\n detail\n \n \n 131\n \n \n \n \n 10\n 130\n 750\n 130\n 2\n \n \n \n \n \n \n \n \n \n \n 6\n \n \n 36\n \n \n \n 5\n 30\n 745\n 30\n 2\n \n \n \n \n \n \n \n \n
\n detail\n \n \n detail\n \n 22\n \n \n 625\n 1.84\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n vouchered_qtdisplayrole\n \n \n \n \n 225\n 1.84\n 105\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n emp_code\n \n \n \n \n 550\n 1.84\n 75\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n invoiced_qtdisplayrole\n \n \n \n \n 110.599\n 1.84\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_weekending\n \n \n \n \n 700\n 1.84\n 50\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n posted_qtdisplayrole\n \n \n \n \n 450\n 1.84\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n f_total\n \n \n \n \n 8.59883\n 1.84\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tehead_number\n \n \n \n \n 350\n 1.84\n 90\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n detail\n tehead_status_qtdisplayrole\n \n \n \n
\n \n 16\n \n \n 90\n 0\n 100\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n report_date\n \n \n \n \n \n 705\n 0\n 40\n 15\n \n \n Arial\n 8\n bold\n \n \n \n \n Context Query\n page_number\n \n \n \n \n
\n \N 0 \N \. -- -- Data for Name: pkgscript; Type: TABLE DATA; Schema: te; Owner: admin -- COPY pkgscript (script_id, script_name, script_order, script_enabled, script_source, script_notes) FROM stdin; 316 dspTimeExpenseHistory 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\nxtte.dspTimeExpenseHistory = new Object;\n\nvar _close = mywindow.findChild("_close");\nvar _print = mywindow.findChild("_print");\nvar _query = mywindow.findChild("_query");\nvar _list = mywindow.findChild("_list");\nvar _parameterWidget = mywindow.findChild("_parameterWidget");\n\n_list.addColumn(qsTr("Sheet #"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "f_sheet_number");\n_list.addColumn(qsTr("Employee #"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "emp_code");\n_list.addColumn(qsTr("Work Date"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "teitem_workdate");\n_list.addColumn(qsTr("Type"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "teitem_type");\n_list.addColumn(qsTr("Status"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "tehead_status");\n_list.addColumn(qsTr("Project#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "prj_number");\n_list.addColumn(qsTr("Project Name"), -1, Qt.AlignLeft, false, "prj_name");\n_list.addColumn(qsTr("Task#"), XTreeWidget.orderColumn, Qt.AlignLeft, false, "prjtask_number");\n_list.addColumn(qsTr("Task Name"), -1, Qt.AlignLeft, false, "prjtask_name");\n_list.addColumn(qsTr("Cust.#"), XTreeWidget.orderColumn, Qt.AlignLeft, false, "cust_number");\n_list.addColumn(qsTr("Cust. Name"), -1, Qt.AlignLeft, false, "cust_name");\n_list.addColumn(qsTr("PO"), XTreeWidget.orderColumn, Qt.AlignLeft, false, "teitem_po");\n_list.addColumn(qsTr("Item"), XTreeWidget.itemColumn, Qt.AlignLeft, true, "item_number");\n_list.addColumn(qsTr("Description"), -1, Qt.AlignLeft, true, "item_descrip1");\n_list.addColumn(qsTr("Qty"), XTreeWidget.qtyColumn, Qt.AlignRight, true, "teitem_qty");\nif (privileges.check("CanViewRates"))\n{\n _list.addColumn(qsTr("Billable"), XTreeWidget.qtyColumn, Qt.AlignRight, false, "teitem_billable");\n _list.addColumn(qsTr("Ext."), XTreeWidget.moneyColumn, Qt.AlignRight, true, "teitem_total");\n}\n\nvar teSql = "SELECT 1,'" + qsTr("Time") + "','T' "\n + "UNION "\n + "SELECT 2,'" + qsTr("Expense") + "','E';";\n\nvar empGrpSql = "SELECT empgrp_id, empgrp_name, empgrp_name "\n + "FROM empgrp "\n + "ORDER BY empgrp_name;";\n\n_parameterWidget.append(qsTr("Start Date"), "startDate", ParameterWidget.Date, mainwindow.dbDate());\n_parameterWidget.append(qsTr("End Date"), "endDate", ParameterWidget.Date, mainwindow.dbDate());\n_parameterWidget.appendComboBox(qsTr("Type"), "typeEnum", teSql);\n_parameterWidget.append(qsTr("Employee"), "emp_id", ParameterWidget.Employee);\n_parameterWidget.appendComboBox(qsTr("Employee Group"), "empgrp_id", empGrpSql);\n_parameterWidget.append(qsTr("Project"), "prj_id", ParameterWidget.Project);\n_parameterWidget.append(qsTr("Customer"), "cust_id", ParameterWidget.Customer);\n_parameterWidget.appendComboBox(qsTr("Customer Type"), "custtype_id", XComboBox.CustomerTypes - 0);\n_parameterWidget.append(qsTr("Customer Type Pattern"), "custtype_pattern", ParameterWidget.Text);\n_parameterWidget.appendComboBox(qsTr("Customer Group"), "custgrp_id", XComboBox.CustomerGroups - 0);\n_parameterWidget.append(qsTr("Item"), "item_id", ParameterWidget.Item);\n_parameterWidget.appendComboBox(qsTr("Item Group"), "itemgrp_id", XComboBox.ItemGroups - 0);\n_parameterWidget.appendComboBox(qsTr("Class Code"), "classcode_id", XComboBox.ClassCodes - 0);\n_parameterWidget.append(qsTr("Class Code Pattern"), "classcode_pattern", ParameterWidget.Text);\n\n_parameterWidget.applyDefaultFilterSet();\n\nxtte.dspTimeExpenseHistory.populateMenu = function(pMenu, pItem, pCol)\n{\n if(pMenu == null)\n pMenu = _booitem.findChild("_menu");\n\n if(pMenu != null)\n {\n var editAct = pMenu.addAction(qsTr("Edit..."));\n editAct.triggered.connect(xtte.dspTimeExpenseHistory.editItem);\n editAct.enabled = (privileges.check("MaintainTimeExpense") &&\n pItem.rawValue("tehead_status") == 'O');\n\n var viewAct = pMenu.addAction(qsTr("View..."));\n viewAct.triggered.connect(xtte.dspTimeExpenseHistory.viewItem);\n }\n}\n\nxtte.dspTimeExpenseHistory.getParams = function()\n{\n var params = _parameterWidget.parameters();\n params.open = qsTr("Open");\n params.approved = qsTr("Approved");\n params.closed = qsTr("Closed");\n params.time = qsTr("Time");\n params.expense = qsTr("Expense");\n\n if("typeEnum" in params)\n {\n if (params.typeEnum == 1)\n params.timeOnly = true;\n else\n params.expenseOnly = true;\n }\n\n return params;\n}\n\nxtte.dspTimeExpenseHistory.print = function()\n{\n var params = xtte.dspTimeExpenseHistory.getParams();\n params.includeFormatted = true;\n\n toolbox.printReport("TimeExpenseHistory", params);\n}\n\nxtte.dspTimeExpenseHistory.fillList = function()\n{\n var qry = toolbox.executeDbQuery("timeexpensehistory", "detail", xtte.dspTimeExpenseHistory.getParams());\n _list.populate(qry)\n if(!qry.first())\n xtte.errorCheck(qry);\n}\n\nxtte.dspTimeExpenseHistory.editItem = function()\n{\n xtte.dspTimeExpenseHistory.openItem(xtte.editMode);\n}\n\n\nxtte.dspTimeExpenseHistory.viewItem = function()\n{\n xtte.dspTimeExpenseHistory.openItem(xtte.viewMode);\n}\n\n\nxtte.dspTimeExpenseHistory.openItem = function(mode)\n{ \n var params = new Object;\n params.mode = mode;\n params.teitem_id = _list.id();\n\n var wnd = toolbox.openWindow("timeExpenseSheetItem", mywindow);\n toolbox.lastWindow().set(params);\n if (wnd.exec() > 0)\n xtte.timeExpenseSheet.fillList();\n}\n\n// Connections\n_print.clicked.connect(xtte.dspTimeExpenseHistory.print);\n_query.clicked.connect(xtte.dspTimeExpenseHistory.fillList);\n_list["populateMenu(QMenu *, XTreeWidgetItem *, int)"].connect(xtte.dspTimeExpenseHistory.populateMenu)\n_close.clicked.connect(mywindow, "close");\n\n Time and Expense package 320 jsGantt 0 t /* \n _ ___ _ _ _ ____ \n (_)___ / _ \\__ _ _ __ | |_| |_ / | |___ \\ \n | / __| / /_\\/ _` | '_ \\| __| __| | | __) |\n | \\__ \\/ /_\\\\ (_| | | | | |_| |_ | |_ / __/ \n _/ |___/\\____/\\__,_|_| |_|\\__|\\__| |_(_)_____|\n|__/ \n\nCopyright (c) 2009, Shlomy Gantz BlueBrick Inc. All rights reserved.\n \n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions are met:\n* * Redistributions of source code must retain the above copyright\n* notice, this list of conditions and the following disclaimer.\n* * Redistributions in binary form must reproduce the above copyright\n* notice, this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n* * Neither the name of Shlomy Gantz or BlueBrick Inc. nor the\n* names of its contributors may be used to endorse or promote products\n* derived from this software without specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY SHLOMY GANTZ/BLUEBRICK INC. ''AS IS'' AND ANY\n* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n* DISCLAIMED. IN NO EVENT SHALL SHLOMY GANTZ/BLUEBRICK INC. BE LIABLE FOR ANY\n* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nvar JSGantt; if (!JSGantt) JSGantt = {};\n\nvar vTimeout = 0;\nvar vBenchTime = new Date().getTime();\n\nJSGantt.isIE = function () {\n\t\n\tif(typeof document.all != 'undefined')\n\t\treturn true;\n\telse\n\t\treturn false;\n}\n\n\nJSGantt.TaskItem = function(pID, pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption)\n{\n\n var vID = pID;\n var vName = pName;\n var vStart = new Date();\t\n var vEnd = new Date();\n var vColor = pColor;\n var vLink = pLink;\n var vMile = pMile;\n var vRes = pRes;\n var vComp = pComp;\n var vGroup = pGroup;\n var vParent = pParent;\n var vOpen = pOpen;\n var vDepend = pDepend;\n var vCaption = pCaption;\n var vDuration = '';\n var vLevel = 0;\n var vNumKid = 0;\n var vVisible = 1;\n var x1, y1, x2, y2;\n\n if (vGroup != 1)\n { \n vStart = JSGantt.parseDateStr(pStart,g.getDateInputFormat());\n vEnd = JSGantt.parseDateStr(pEnd,g.getDateInputFormat());\n }\n\n this.getID = function(){ return vID };\n this.getName = function(){ return vName };\n this.getStart = function(){ return vStart};\n this.getEnd = function(){ return vEnd };\n this.getColor = function(){ return vColor};\n this.getLink = function(){ return vLink };\n this.getMile = function(){ return vMile };\n this.getDepend = function(){ if(vDepend) return vDepend; else return null };\n this.getCaption = function(){ if(vCaption) return vCaption; else return ''; };\n this.getResource = function(){ if(vRes) return vRes; else return ' '; };\n this.getCompVal = function(){ if(vComp) return vComp; else return 0; };\n this.getCompStr = function(){ if(vComp) return vComp+'%'; else return ''; };\n\n this.getDuration = function(vFormat){ \n if (vMile) \n vDuration = '-';\n else if (vFormat=='hour')\n {\n tmpPer = Math.ceil((this.getEnd() - this.getStart()) / ( 60 * 60 * 1000) );\n if(tmpPer == 1) \n vDuration = '1 Hour';\n else\n vDuration = tmpPer + ' Hours';\n }\n \n else if (vFormat=='minute')\n {\n tmpPer = Math.ceil((this.getEnd() - this.getStart()) / ( 60 * 1000) );\n if(tmpPer == 1) \n vDuration = '1 Minute';\n else\n vDuration = tmpPer + ' Minutes';\n }\n \n \t\t else { //if(vFormat == 'day') {\n tmpPer = Math.ceil((this.getEnd() - this.getStart()) / (24 * 60 * 60 * 1000) + 1);\n if(tmpPer == 1) vDuration = '1 Day';\n else vDuration = tmpPer + ' Days';\n }\n\n //else if(vFormat == 'week') {\n // tmpPer = ((this.getEnd() - this.getStart()) / (24 * 60 * 60 * 1000) + 1)/7;\n // if(tmpPer == 1) vDuration = '1 Week';\n // else vDuration = tmpPer + ' Weeks'; \n //}\n\n //else if(vFormat == 'month') {\n // tmpPer = ((this.getEnd() - this.getStart()) / (24 * 60 * 60 * 1000) + 1)/30;\n // if(tmpPer == 1) vDuration = '1 Month';\n // else vDuration = tmpPer + ' Months'; \n //}\n\n //else if(vFormat == 'quater') {\n // tmpPer = ((this.getEnd() - this.getStart()) / (24 * 60 * 60 * 1000) + 1)/120;\n // if(tmpPer == 1) vDuration = '1 Qtr';\n // else vDuration = tmpPer + ' Qtrs'; \n //}\n return( vDuration )\n };\n\n this.getParent = function(){ return vParent };\n this.getGroup = function(){ return vGroup };\n this.getOpen = function(){ return vOpen };\n this.getLevel = function(){ return vLevel };\n this.getNumKids = function(){ return vNumKid };\n this.getStartX = function(){ return x1 };\n this.getStartY = function(){ return y1 };\n this.getEndX = function(){ return x2 };\n this.getEndY = function(){ return y2 };\n this.getVisible = function(){ return vVisible };\n\t this.setDepend = function(pDepend){ vDepend = pDepend;};\n this.setStart = function(pStart){ vStart = pStart;};\n this.setEnd = function(pEnd) { vEnd = pEnd; };\n this.setLevel = function(pLevel){ vLevel = pLevel;};\n this.setNumKid = function(pNumKid){ vNumKid = pNumKid;};\n this.setCompVal = function(pCompVal){ vComp = pCompVal;};\n this.setStartX = function(pX) {x1 = pX; };\n this.setStartY = function(pY) {y1 = pY; };\n this.setEndX = function(pX) {x2 = pX; };\n this.setEndY = function(pY) {y2 = pY; };\n this.setOpen = function(pOpen) {vOpen = pOpen; };\n this.setVisible = function(pVisible) {vVisible = pVisible; };\n\n }\n\n\t\n // function that loads the main gantt chart properties and functions\n // pDiv: (required) this is a DIV object created in HTML\n // pStart: UNUSED - future use to force minimum chart date\n // pEnd: UNUSED - future use to force maximum chart date\n // pWidth: UNUSED - future use to force chart width and cause objects to scale to fit within that width\n // pShowRes: UNUSED - future use to turn on/off display of resource names\n // pShowDur: UNUSED - future use to turn on/off display of task durations\n // pFormat: (required) - used to indicate whether chart should be drawn in "day", "week", "month", or "quarter" format\n // pCationType - what type of Caption to show: Caption, Resource, Duration, Complete\nJSGantt.GanttChart = function(pGanttVar, pDiv, pFormat)\n{\n\n var vGanttVar = pGanttVar;\n var vDiv = pDiv;\n var vFormat = pFormat;\n var vShowRes = 1;\n var vShowDur = 1;\n var vShowComp = 1;\n var vShowStartDate = 1;\n var vShowEndDate = 1;\n var vDateInputFormat = "mm/dd/yyyy";\n var vDateDisplayFormat = "mm/dd/yy";\n\t var vNumUnits = 0;\n var vCaptionType;\n var vDepId = 1;\n var vTaskList = new Array();\t\n\t var vFormatArr\t= new Array("day","week","month","quarter");\n var vQuarterArr = new Array(1,1,1,2,2,2,3,3,3,4,4,4);\n var vMonthDaysArr = new Array(31,28,31,30,31,30,31,31,30,31,30,31);\n var vMonthArr = new Array("January","February","March","April","May","June","July","August","September","October","November","December");\n\t this.setFormatArr = function() \t {\n\t\t\t\t\t\t\t\t\t\t vFormatArr = new Array();\n\t\t\t\t\t\t\t\t\t\t for(var i = 0; i < arguments.length; i++) {vFormatArr[i] = arguments[i];}\n\t\t\t\t\t\t\t\t\t\t if(vFormatArr.length>4){vFormatArr.length=4;}\n\t\t\t\t\t\t\t\t\t\t };\n this.setShowRes = function(pShow) { vShowRes = pShow; };\n this.setShowDur = function(pShow) { vShowDur = pShow; };\n this.setShowComp = function(pShow) { vShowComp = pShow; };\n this.setShowStartDate = function(pShow) { vShowStartDate = pShow; };\n this.setShowEndDate = function(pShow) { vShowEndDate = pShow; };\n this.setDateInputFormat = function(pShow) { vDateInputFormat = pShow; };\n this.setDateDisplayFormat = function(pShow) { vDateDisplayFormat = pShow; };\n this.setCaptionType = function(pType) { vCaptionType = pType };\n this.setFormat = function(pFormat){ \n vFormat = pFormat; \n this.Draw(); \n };\n\n this.getShowRes = function(){ return vShowRes };\n this.getShowDur = function(){ return vShowDur };\n this.getShowComp = function(){ return vShowComp };\n\t this.getShowStartDate = function(){ return vShowStartDate };\n\t this.getShowEndDate = function(){ return vShowEndDate };\n this.getDateInputFormat = function() { return vDateInputFormat };\n this.getDateDisplayFormat = function() { return vDateDisplayFormat };\n this.getCaptionType = function() { return vCaptionType };\n this.CalcTaskXY = function () \n {\n var vList = this.getList();\n var vTaskDiv;\n var vParDiv;\n var vLeft, vTop, vHeight, vWidth;\n\n for(i = 0; i < vList.length; i++)\n {\n vID = vList[i].getID();\n vTaskDiv = document.getElementById("taskbar_"+vID);\n vBarDiv = document.getElementById("bardiv_"+vID);\n vParDiv = document.getElementById("childgrid_"+vID);\n\n if(vBarDiv) {\n vList[i].setStartX( vBarDiv.offsetLeft );\n vList[i].setStartY( vParDiv.offsetTop+vBarDiv.offsetTop+6 );\n vList[i].setEndX( vBarDiv.offsetLeft + vBarDiv.offsetWidth );\n vList[i].setEndY( vParDiv.offsetTop+vBarDiv.offsetTop+6 );\n }\n }\n }\n\n this.AddTaskItem = function(value)\n {\n vTaskList.push(value);\n }\n\n this.getList = function() { return vTaskList };\n\n this.clearDependencies = function()\n {\n var parent = document.getElementById('rightside');\n var depLine;\n var vMaxId = vDepId;\n for ( i=1; i 0)\n {\n \n\t\t // Process all tasks preset parent date and completion %\n JSGantt.processRows(vTaskList, 0, -1, 1, 1);\n\n // get overall min/max dates plus padding\n vMinDate = JSGantt.getMinDate(vTaskList, vFormat);\n vMaxDate = JSGantt.getMaxDate(vTaskList, vFormat);\n\n // Calculate chart width variables. vColWidth can be altered manually to change each column width\n // May be smart to make this a parameter of GanttChart or set it based on existing pWidth parameter\n if(vFormat == 'day') {\n vColWidth = 18;\n vColUnit = 1;\n }\n else if(vFormat == 'week') {\n vColWidth = 37;\n vColUnit = 7;\n }\n else if(vFormat == 'month') {\n vColWidth = 37;\n vColUnit = 30;\n }\n else if(vFormat == 'quarter') {\n vColWidth = 60;\n vColUnit = 90;\n }\n \n else if(vFormat=='hour')\n {\n vColWidth = 18;\n vColUnit = 1;\n }\n \n else if(vFormat=='minute')\n {\n vColWidth = 18;\n vColUnit = 1;\n }\n \n vNumDays = (Date.parse(vMaxDate) - Date.parse(vMinDate)) / ( 24 * 60 * 60 * 1000);\n vNumUnits = vNumDays / vColUnit;\n \n \n vChartWidth = vNumUnits * vColWidth + 1;\n vDayWidth = (vColWidth / vColUnit) + (1/vColUnit);\n\n vMainTable =\n '' +\n '';\n\n vMainTable += vLeftTable;\n\n // Draw the Chart Rows\n vRightTable = \n '
';\n\n if(vShowRes !=1) vNameWidth+=vStatusWidth;\n if(vShowDur !=1) vNameWidth+=vStatusWidth;\n if(vShowComp!=1) vNameWidth+=vStatusWidth;\n\t\t if(vShowStartDate!=1) vNameWidth+=vStatusWidth;\n\t\t if(vShowEndDate!=1) vNameWidth+=vStatusWidth;\n \n\t\t // DRAW the Left-side of the chart (names, resources, comp%)\n vLeftTable =\n '
' +\n '' +\n ' ' +\n ' '; \n\n if(vShowRes ==1) vLeftTable += ' ' ;\n if(vShowDur ==1) vLeftTable += ' ' ;\n if(vShowComp==1) vLeftTable += ' ' ;\n\t\t\tif(vShowStartDate==1) vLeftTable += ' ' ;\n\t\t\tif(vShowEndDate==1) vLeftTable += ' ' ;\n\n vLeftTable +=\n '' +\n ' ' +\n ' ' ;\n\n if(vShowRes ==1) vLeftTable += ' ' ;\n if(vShowDur ==1) vLeftTable += ' ' ;\n if(vShowComp==1) vLeftTable += ' ' ;\n if(vShowStartDate==1) vLeftTable += ' ' ;\n if(vShowEndDate==1) vLeftTable += ' ' ;\n \n vLeftTable += '';\n\n for(i = 0; i < vTaskList.length; i++)\n {\n if( vTaskList[i].getGroup()) {\n vBGColor = "f3f3f3";\n vRowType = "group";\n } else {\n vBGColor = "ffffff";\n vRowType = "row";\n }\n \n vID = vTaskList[i].getID();\n\n \t\t if(vTaskList[i].getVisible() == 0) \n vLeftTable += '' ;\n\t\t\t else\n vLeftTable += '' ;\n\n\t\t\t vLeftTable += \n ' ' +\n ' ' ;\n\n if(vShowRes ==1) vLeftTable += ' ' ;\n if(vShowDur ==1) vLeftTable += ' ' ;\n if(vShowComp==1) vLeftTable += ' ' ;\n if(vShowStartDate==1) vLeftTable += ' ' ;\n if(vShowEndDate==1) vLeftTable += ' ' ;\n\n vLeftTable += '';\n\n }\n\n // DRAW the date format selector at bottom left. Another potential GanttChart parameter to hide/show this selector\n vLeftTable += '' +\n '
ResourceDuration% Comp.Start DateEnd Date
 ';\n\n for(j=1; j ' ;\n else\n vLeftTable += '+ ' ;\n\t\t\t\t \n } else {\n\n vLeftTable += '   ';\n }\n\n vLeftTable += \n ' ' + vTaskList[i].getName() + '' + vTaskList[i].getResource() + '' + vTaskList[i].getDuration(vFormat) + '' + vTaskList[i].getCompStr() + '' + JSGantt.formatDateStr( vTaskList[i].getStart(), vDateDisplayFormat) + '' + JSGantt.formatDateStr( vTaskList[i].getEnd(), vDateDisplayFormat) + '
  Powered by jsGantt      Format:';\n\t\t\n\t\t\tif (vFormatArr.join().indexOf("minute")!=-1) { \n if (vFormat=='minute') vLeftTable += 'Minute';\n else vLeftTable += 'Minute';\n\t\t\t}\n\t\t\t\n\t\t\tif (vFormatArr.join().indexOf("hour")!=-1) { \n if (vFormat=='hour') vLeftTable += 'Hour';\n else vLeftTable += 'Hour';\n\t\t\t}\n\t\t\t\n\t\t\tif (vFormatArr.join().indexOf("day")!=-1) { \n if (vFormat=='day') vLeftTable += 'Day';\n else vLeftTable += 'Day';\n\t\t\t}\n\t\t\t\n\t\t\tif (vFormatArr.join().indexOf("week")!=-1) { \n if (vFormat=='week') vLeftTable += 'Week';\n else vLeftTable += 'Week';\n\t\t\t}\n\t\t\t\n\t\t\tif (vFormatArr.join().indexOf("month")!=-1) { \n if (vFormat=='month') vLeftTable += 'Month';\n else vLeftTable += 'Month';\n\t\t\t}\n\t\t\t\n\t\t\tif (vFormatArr.join().indexOf("quarter")!=-1) { \n if (vFormat=='quarter') vLeftTable += 'Quarter';\n else vLeftTable += 'Quarter';\n\t\t\t}\n\t\t\t\n// vLeftTable += ' .';\n\n vLeftTable += '
' +\n '
' +\n '' +\n '';\n\n vTmpDate.setFullYear(vMinDate.getFullYear(), vMinDate.getMonth(), vMinDate.getDate());\n vTmpDate.setHours(0);\n vTmpDate.setMinutes(0);\n\n // Major Date Header\n while(Date.parse(vTmpDate) <= Date.parse(vMaxDate))\n {\t\n vStr = vTmpDate.getFullYear() + '';\n vStr = vStr.substring(2,4);\n \n \n if(vFormat == 'minute')\n {\n vRightTable += '';\n vTmpDate.setHours(vTmpDate.getHours()+1);\n }\n \n if(vFormat == 'hour')\n {\n vRightTable += '';\n vTmpDate.setDate(vTmpDate.getDate()+1);\n }\n \n \t if(vFormat == 'day')\n {\n\t\t\t vRightTable += '';\n vTmpDate.setDate(vTmpDate.getDate()+1);\n }\n else if(vFormat == 'week')\n {\n \t\t vRightTable += '';\n vTmpDate.setDate(vTmpDate.getDate()+7);\n }\n else if(vFormat == 'month')\n {\n\t vRightTable += '';\n vTmpDate.setDate(vTmpDate.getDate() + 1);\n while(vTmpDate.getDate() > 1)\n {\n vTmpDate.setDate(vTmpDate.getDate() + 1);\n }\n }\n else if(vFormat == 'quarter')\n {\n\t vRightTable += '';\n vTmpDate.setDate(vTmpDate.getDate() + 81);\n while(vTmpDate.getDate() > 1)\n {\n vTmpDate.setDate(vTmpDate.getDate() + 1);\n }\n }\n\n }\n\n vRightTable += '';\n\n // Minor Date header and Cell Rows\n vTmpDate.setFullYear(vMinDate.getFullYear(), vMinDate.getMonth(), vMinDate.getDate());\n vNxtDate.setFullYear(vMinDate.getFullYear(), vMinDate.getMonth(), vMinDate.getDate());\n vNumCols = 0;\n \n while(Date.parse(vTmpDate) <= Date.parse(vMaxDate))\n {\t\n if (vFormat == 'minute')\n {\n\t\t\t\n\t\t\t if( vTmpDate.getMinutes() ==0 ) \n vWeekdayColor = "ccccff";\n else\n vWeekdayColor = "ffffff";\n\t\t\t\t \n\t\t\t\t \n vDateRowStr += '';\n vItemRowStr += '';\n vTmpDate.setMinutes(vTmpDate.getMinutes() + 1);\n }\n \n else if (vFormat == 'hour')\n {\n\t\t\t\n\t\t\t if( vTmpDate.getHours() ==0 ) \n vWeekdayColor = "ccccff";\n else\n vWeekdayColor = "ffffff";\n\t\t\t\t \n\t\t\t\t \n vDateRowStr += '';\n vItemRowStr += '';\n vTmpDate.setHours(vTmpDate.getHours() + 1);\n }\n\n\t else if(vFormat == 'day' )\n {\n if( JSGantt.formatDateStr(vCurrDate,'mm/dd/yyyy') == JSGantt.formatDateStr(vTmpDate,'mm/dd/yyyy')) {\n vWeekdayColor = "ccccff";\n vWeekendColor = "9999ff";\n vWeekdayGColor = "bbbbff";\n vWeekendGColor = "8888ff";\n } else {\n vWeekdayColor = "ffffff";\n vWeekendColor = "cfcfcf";\n vWeekdayGColor = "f3f3f3";\n vWeekendGColor = "c3c3c3";\n }\n \n if(vTmpDate.getDay() % 6 == 0) {\n vDateRowStr += '';\n vItemRowStr += '';\n }\n else {\n vDateRowStr += '';\n if( JSGantt.formatDateStr(vCurrDate,'mm/dd/yyyy') == JSGantt.formatDateStr(vTmpDate,'mm/dd/yyyy')) \n vItemRowStr += '';\n else\n vItemRowStr += '';\n }\n\n vTmpDate.setDate(vTmpDate.getDate() + 1);\n\n }\n\n\t else if(vFormat == 'week')\n {\n\n vNxtDate.setDate(vNxtDate.getDate() + 7);\n\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vWeekdayColor = "ccccff";\n else\n vWeekdayColor = "ffffff";\n\n if(vNxtDate <= vMaxDate) {\n vDateRowStr += '';\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vItemRowStr += '';\n else\n vItemRowStr += '';\n\n } else {\n vDateRowStr += '';\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vItemRowStr += '';\n else\n vItemRowStr += '';\n\n }\n\n vTmpDate.setDate(vTmpDate.getDate() + 7);\n\n }\n\n\t else if(vFormat == 'month')\n {\n\n vNxtDate.setFullYear(vTmpDate.getFullYear(), vTmpDate.getMonth(), vMonthDaysArr[vTmpDate.getMonth()]);\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vWeekdayColor = "ccccff";\n else\n vWeekdayColor = "ffffff";\n\n if(vNxtDate <= vMaxDate) {\n vDateRowStr += '';\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vItemRowStr += '';\n else\n vItemRowStr += '';\n } else {\n vDateRowStr += '';\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vItemRowStr += '';\n else\n vItemRowStr += '';\n }\n\n vTmpDate.setDate(vTmpDate.getDate() + 1);\n\n while(vTmpDate.getDate() > 1) \n {\n vTmpDate.setDate(vTmpDate.getDate() + 1);\n }\n\n }\n\n\t else if(vFormat == 'quarter')\n {\n\n vNxtDate.setDate(vNxtDate.getDate() + 122);\n if( vTmpDate.getMonth()==0 || vTmpDate.getMonth()==1 || vTmpDate.getMonth()==2 )\n vNxtDate.setFullYear(vTmpDate.getFullYear(), 2, 31);\n else if( vTmpDate.getMonth()==3 || vTmpDate.getMonth()==4 || vTmpDate.getMonth()==5 )\n vNxtDate.setFullYear(vTmpDate.getFullYear(), 5, 30);\n else if( vTmpDate.getMonth()==6 || vTmpDate.getMonth()==7 || vTmpDate.getMonth()==8 )\n vNxtDate.setFullYear(vTmpDate.getFullYear(), 8, 30);\n else if( vTmpDate.getMonth()==9 || vTmpDate.getMonth()==10 || vTmpDate.getMonth()==11 )\n vNxtDate.setFullYear(vTmpDate.getFullYear(), 11, 31);\n\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vWeekdayColor = "ccccff";\n else\n vWeekdayColor = "ffffff";\n\n if(vNxtDate <= vMaxDate) {\n vDateRowStr += '';\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vItemRowStr += '';\n else\n vItemRowStr += '';\n } else {\n vDateRowStr += '';\n if( vCurrDate >= vTmpDate && vCurrDate < vNxtDate ) \n vItemRowStr += '';\n else \n vItemRowStr += '';\n }\n\n vTmpDate.setDate(vTmpDate.getDate() + 81);\n\n while(vTmpDate.getDate() > 1) \n {\n vTmpDate.setDate(vTmpDate.getDate() + 1);\n }\n\n }\n }\n\n vRightTable += vDateRowStr + '';\n vRightTable += '
' ;\n vRightTable += JSGantt.formatDateStr(vTmpDate, vDateDisplayFormat) + ' ' + vTmpDate.getHours() + ':00 -' + vTmpDate.getHours() + ':59 ' ;\n vRightTable += JSGantt.formatDateStr(vTmpDate, vDateDisplayFormat) + '' +\n\t\t\t JSGantt.formatDateStr(vTmpDate,vDateDisplayFormat.substring(0,5)) + ' - ';\n vTmpDate.setDate(vTmpDate.getDate()+6);\n\t\t vRightTable += JSGantt.formatDateStr(vTmpDate, vDateDisplayFormat) + '`'+ vStr + '`'+ vStr + '`'+ vStr + '
' + vTmpDate.getMinutes() + '
  
' + vTmpDate.getHours() + '
  
' + vTmpDate.getDate() + '
 
' + vTmpDate.getDate() + '
  
  
' + (vTmpDate.getMonth()+1) + '/' + vTmpDate.getDate() + '
  
  
' + (vTmpDate.getMonth()+1) + '/' + vTmpDate.getDate() + '
  
  
' + vMonthArr[vTmpDate.getMonth()].substr(0,3) + '
  
  
' + vMonthArr[vTmpDate.getMonth()].substr(0,3) + '
  
  
Qtr. ' + vQuarterArr[vTmpDate.getMonth()] + '
  
  
Qtr. ' + vQuarterArr[vTmpDate.getMonth()] + '
  
  
';\n\n // Draw each row\n\n for(i = 0; i < vTaskList.length; i++)\n\n {\n\n vTmpDate.setFullYear(vMinDate.getFullYear(), vMinDate.getMonth(), vMinDate.getDate());\n vTaskStart = vTaskList[i].getStart();\n vTaskEnd = vTaskList[i].getEnd();\n\n vNumCols = 0;\n vID = vTaskList[i].getID();\n\n // vNumUnits = Math.ceil((vTaskList[i].getEnd() - vTaskList[i].getStart()) / (24 * 60 * 60 * 1000)) + 1;\n vNumUnits = (vTaskList[i].getEnd() - vTaskList[i].getStart()) / (24 * 60 * 60 * 1000) + 1;\n\t if (vFormat=='hour')\n\t {\n vNumUnits = (vTaskList[i].getEnd() - vTaskList[i].getStart()) / ( 60 * 1000) + 1;\n\t }\n\t else if (vFormat=='minute')\n\t {\n vNumUnits = (vTaskList[i].getEnd() - vTaskList[i].getStart()) / ( 60 * 1000) + 1;\n\t }\n\t \n\t if(vTaskList[i].getVisible() == 0) \n vRightTable += '';\n\n }\n\n vMainTable += vRightTable + '
';\n\n\t\t vDiv.innerHTML = vMainTable;\n\n }\n\n } //this.draw\n\n this.mouseOver = function( pObj, pID, pPos, pType ) {\n if( pPos == 'right' ) vID = 'child_' + pID;\n else vID = 'childrow_' + pID;\n \n pObj.bgColor = "#ffffaa";\n vRowObj = JSGantt.findObj(vID);\n if (vRowObj) vRowObj.bgColor = "#ffffaa";\n }\n\n this.mouseOut = function( pObj, pID, pPos, pType ) {\n if( pPos == 'right' ) vID = 'child_' + pID;\n else vID = 'childrow_' + pID;\n \n pObj.bgColor = "#ffffff";\n vRowObj = JSGantt.findObj(vID);\n if (vRowObj) {\n if( pType == "group") {\n pObj.bgColor = "#f3f3f3";\n vRowObj.bgColor = "#f3f3f3";\n } else {\n pObj.bgColor = "#ffffff";\n vRowObj.bgColor = "#ffffff";\n }\n }\n }\n\n} //GanttChart\t\t\n\n// Recursively process task tree ... set min, max dates of parent tasks and identfy task level.\nJSGantt.processRows = function(pList, pID, pRow, pLevel, pOpen)\n{\n\n var vMinDate = new Date();\n var vMaxDate = new Date();\n var vMinSet = 0;\n var vMaxSet = 0;\n var vList = pList;\n var vLevel = pLevel;\n var i = 0;\n var vNumKid = 0;\n var vCompSum = 0;\n var vVisible = pOpen;\n \n for(i = 0; i < pList.length; i++)\n {\n if(pList[i].getParent() == pID) {\n\t\t vVisible = pOpen;\n pList[i].setVisible(vVisible);\n if(vVisible==1 && pList[i].getOpen() == 0) \n vVisible = 0;\n \n pList[i].setLevel(vLevel);\n vNumKid++;\n\n if(pList[i].getGroup() == 1) {\n JSGantt.processRows(vList, pList[i].getID(), i, vLevel+1, vVisible);\n }\n\n if( vMinSet==0 || pList[i].getStart() < vMinDate) {\n vMinDate = pList[i].getStart();\n vMinSet = 1;\n }\n\n if( vMaxSet==0 || pList[i].getEnd() > vMaxDate) {\n vMaxDate = pList[i].getEnd();\n vMaxSet = 1;\n }\n\n vCompSum += pList[i].getCompVal();\n\n }\n }\n\n if(pRow >= 0) {\n pList[pRow].setStart(vMinDate);\n pList[pRow].setEnd(vMaxDate);\n pList[pRow].setNumKid(vNumKid);\n pList[pRow].setCompVal(Math.ceil(vCompSum/vNumKid));\n }\n\n}\n\n\n// Used to determine the minimum date of all tasks and set lower bound based on format\nJSGantt.getMinDate = function getMinDate(pList, pFormat) \n {\n\n var vDate = new Date();\n\n vDate.setFullYear(pList[0].getStart().getFullYear(), pList[0].getStart().getMonth(), pList[0].getStart().getDate());\n\n // Parse all Task End dates to find min\n for(i = 0; i < pList.length; i++)\n {\n if(Date.parse(pList[i].getStart()) < Date.parse(vDate))\n vDate.setFullYear(pList[i].getStart().getFullYear(), pList[i].getStart().getMonth(), pList[i].getStart().getDate());\n }\n\n if ( pFormat== 'minute')\n {\n vDate.setHours(0);\n vDate.setMinutes(0);\n }\n\t\t else if (pFormat == 'hour' )\n {\n vDate.setHours(0);\n vDate.setMinutes(0);\n }\n // Adjust min date to specific format boundaries (first of week or first of month)\n else if (pFormat=='day')\n {\n vDate.setDate(vDate.getDate() - 1);\n while(vDate.getDay() % 7 > 0)\n {\n vDate.setDate(vDate.getDate() - 1);\n }\n\n }\n\n else if (pFormat=='week')\n {\n vDate.setDate(vDate.getDate() - 7);\n while(vDate.getDay() % 7 > 0)\n {\n vDate.setDate(vDate.getDate() - 1);\n }\n\n }\n\n else if (pFormat=='month')\n {\n while(vDate.getDate() > 1)\n {\n vDate.setDate(vDate.getDate() - 1);\n }\n }\n\n else if (pFormat=='quarter')\n {\n if( vDate.getMonth()==0 || vDate.getMonth()==1 || vDate.getMonth()==2 )\n vDate.setFullYear(vDate.getFullYear(), 0, 1);\n else if( vDate.getMonth()==3 || vDate.getMonth()==4 || vDate.getMonth()==5 )\n vDate.setFullYear(vDate.getFullYear(), 3, 1);\n else if( vDate.getMonth()==6 || vDate.getMonth()==7 || vDate.getMonth()==8 )\n vDate.setFullYear(vDate.getFullYear(), 6, 1);\n else if( vDate.getMonth()==9 || vDate.getMonth()==10 || vDate.getMonth()==11 )\n vDate.setFullYear(vDate.getFullYear(), 9, 1);\n\n }\n\n return(vDate);\n\n }\n\n\n\n\n\n\n\n // Used to determine the minimum date of all tasks and set lower bound based on format\n\nJSGantt.getMaxDate = function (pList, pFormat)\n{\n var vDate = new Date();\n\n vDate.setFullYear(pList[0].getEnd().getFullYear(), pList[0].getEnd().getMonth(), pList[0].getEnd().getDate());\n \n \n // Parse all Task End dates to find max\n for(i = 0; i < pList.length; i++)\n {\n if(Date.parse(pList[i].getEnd()) > Date.parse(vDate))\n {\n //vDate.setFullYear(pList[0].getEnd().getFullYear(), pList[0].getEnd().getMonth(), pList[0].getEnd().getDate());\n vDate.setTime(Date.parse(pList[i].getEnd()));\n\t\t\t}\t\n\t }\n\t \n\t if (pFormat == 'minute')\n {\n vDate.setHours(vDate.getHours() + 1);\n vDate.setMinutes(59);\n }\t\n\t \n if (pFormat == 'hour')\n {\n vDate.setHours(vDate.getHours() + 2);\n }\t\t\t\t\n\t\t\t\t\n // Adjust max date to specific format boundaries (end of week or end of month)\n if (pFormat=='day')\n {\n vDate.setDate(vDate.getDate() + 1);\n\n while(vDate.getDay() % 6 > 0)\n {\n vDate.setDate(vDate.getDate() + 1);\n }\n\n }\n\n if (pFormat=='week')\n {\n //For weeks, what is the last logical boundary?\n vDate.setDate(vDate.getDate() + 11);\n\n while(vDate.getDay() % 6 > 0)\n {\n vDate.setDate(vDate.getDate() + 1);\n }\n\n }\n\n // Set to last day of current Month\n if (pFormat=='month')\n {\n while(vDate.getDay() > 1)\n {\n vDate.setDate(vDate.getDate() + 1);\n }\n\n vDate.setDate(vDate.getDate() - 1);\n }\n\n // Set to last day of current Quarter\n if (pFormat=='quarter')\n {\n if( vDate.getMonth()==0 || vDate.getMonth()==1 || vDate.getMonth()==2 )\n vDate.setFullYear(vDate.getFullYear(), 2, 31);\n else if( vDate.getMonth()==3 || vDate.getMonth()==4 || vDate.getMonth()==5 )\n vDate.setFullYear(vDate.getFullYear(), 5, 30);\n else if( vDate.getMonth()==6 || vDate.getMonth()==7 || vDate.getMonth()==8 )\n vDate.setFullYear(vDate.getFullYear(), 8, 30);\n else if( vDate.getMonth()==9 || vDate.getMonth()==10 || vDate.getMonth()==11 )\n vDate.setFullYear(vDate.getFullYear(), 11, 31);\n\n }\n\n return(vDate);\n\n }\n\n\n\n\n\n\n\n // This function finds the document id of the specified object\n\nJSGantt.findObj = function (theObj, theDoc)\n\n {\n\n var p, i, foundObj;\n\n if(!theDoc) theDoc = document;\n\n if( (p = theObj.indexOf("?")) > 0 && parent.frames.length){\n\n theDoc = parent.frames[theObj.substring(p+1)].document;\n\n theObj = theObj.substring(0,p);\n\n }\n\n if(!(foundObj = theDoc[theObj]) && theDoc.all) \n\n foundObj = theDoc.all[theObj];\n\n\n\n for (i=0; !foundObj && i < theDoc.forms.length; i++) \n\n foundObj = theDoc.forms[i][theObj];\n\n\n\n for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)\n\n foundObj = JSGantt.findObj(theObj,theDoc.layers[i].document);\n\n\n\n if(!foundObj && document.getElementById)\n\n foundObj = document.getElementById(theObj);\n\n\n\n return foundObj;\n\n }\n\n\n\n\n\nJSGantt.changeFormat = function(pFormat,ganttObj) {\n\n\n\n if(ganttObj) \n\n\t\t{\n\n\t\tganttObj.setFormat(pFormat);\n\n\t\tganttObj.DrawDependencies();\n\n\t\t}\n\n else\n\n alert('Chart undefined');\n\n\n\n }\n\n\n\n\n\n // Function to open/close and hide/show children of specified task\n\nJSGantt.folder= function (pID,ganttObj) {\n\n var vList = ganttObj.getList();\n\n for(i = 0; i < vList.length; i++)\n {\n if(vList[i].getID() == pID) {\n\n if( vList[i].getOpen() == 1 ) {\n vList[i].setOpen(0);\n JSGantt.hide(pID,ganttObj);\n\n if (JSGantt.isIE()) \n JSGantt.findObj('group_'+pID).innerText = '+';\n else\n JSGantt.findObj('group_'+pID).textContent = '+';\n\t\t\t\t\n } else {\n\n vList[i].setOpen(1);\n\n JSGantt.show(pID, 1, ganttObj);\n\n if (JSGantt.isIE()) \n JSGantt.findObj('group_'+pID).innerText = 'ñ';\n else\n JSGantt.findObj('group_'+pID).textContent = 'ñ';\n\n }\n\n }\n }\n}\n\nJSGantt.hide= function (pID,ganttObj) {\n var vList = ganttObj.getList();\n var vID = 0;\n\n for(var i = 0; i < vList.length; i++)\n {\n if(vList[i].getParent() == pID) {\n vID = vList[i].getID();\n JSGantt.findObj('child_' + vID).style.display = "none";\n JSGantt.findObj('childgrid_' + vID).style.display = "none";\n vList[i].setVisible(0);\n if(vList[i].getGroup() == 1) \n JSGantt.hide(vID,ganttObj);\n }\n\n }\n}\n\n// Function to show children of specified task\nJSGantt.show = function (pID, pTop, ganttObj) {\n var vList = ganttObj.getList();\n var vID = 0;\n\n for(var i = 0; i < vList.length; i++)\n {\n if(vList[i].getParent() == pID) {\n vID = vList[i].getID();\n if(pTop == 1) {\n if (JSGantt.isIE()) { // IE;\n\n if( JSGantt.findObj('group_'+pID).innerText == '+') {\n JSGantt.findObj('child_'+vID).style.display = "";\n JSGantt.findObj('childgrid_'+vID).style.display = "";\n vList[i].setVisible(1);\n }\n\n } else {\n \n if( JSGantt.findObj('group_'+pID).textContent == '+') {\n JSGantt.findObj('child_'+vID).style.display = "";\n JSGantt.findObj('childgrid_'+vID).style.display = "";\n vList[i].setVisible(1);\n }\n\n }\n\n } else {\n\n if (JSGantt.isIE()) { // IE;\n if( JSGantt.findObj('group_'+pID).innerText == 'ñ') {\n JSGantt.findObj('child_'+vID).style.display = "";\n JSGantt.findObj('childgrid_'+vID).style.display = "";\n vList[i].setVisible(1);\n }\n\n } else {\n\n if( JSGantt.findObj('group_'+pID).textContent == 'ñ') {\n JSGantt.findObj('child_'+vID).style.display = "";\n JSGantt.findObj('childgrid_'+vID).style.display = "";\n vList[i].setVisible(1);\n }\n }\n }\n\n if(vList[i].getGroup() == 1) \n JSGantt.show(vID, 0,ganttObj);\n\n }\n }\n}\n\n\n \n\n\n // function to open window to display task link\n\nJSGantt.taskLink = function(pRef,pWidth,pHeight) \n\n {\n\n if(pWidth) vWidth =pWidth; else vWidth =400;\n if(pHeight) vHeight=pHeight; else vHeight=400;\n\n var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth); \n\n }\n\nJSGantt.parseDateStr = function(pDateStr,pFormatStr) {\n var vDate =new Date();\t\n vDate.setTime( Date.parse(pDateStr));\n\n switch(pFormatStr) \n {\n\t case 'mm/dd/yyyy':\n\t var vDateParts = pDateStr.split('/');\n vDate.setFullYear(parseInt(vDateParts[2], 10), parseInt(vDateParts[0], 10) - 1, parseInt(vDateParts[1], 10));\n break;\n\t case 'dd/mm/yyyy':\n\t var vDateParts = pDateStr.split('/');\n vDate.setFullYear(parseInt(vDateParts[2], 10), parseInt(vDateParts[1], 10) - 1, parseInt(vDateParts[0], 10));\n break;\n\t case 'yyyy-mm-dd':\n\t var vDateParts = pDateStr.split('-');\n vDate.setFullYear(parseInt(vDateParts[0], 10), parseInt(vDateParts[1], 10) - 1, parseInt(vDateParts[1], 10));\n break;\n }\n\n return(vDate);\n \n}\n\nJSGantt.formatDateStr = function(pDate,pFormatStr) {\n vYear4Str = pDate.getFullYear() + '';\n \t vYear2Str = vYear4Str.substring(2,4);\n vMonthStr = (pDate.getMonth()+1) + '';\n vDayStr = pDate.getDate() + '';\n\n var vDateStr = "";\t\n\n switch(pFormatStr) {\n\t case 'mm/dd/yyyy':\n return( vMonthStr + '/' + vDayStr + '/' + vYear4Str );\n\t case 'dd/mm/yyyy':\n return( vDayStr + '/' + vMonthStr + '/' + vYear4Str );\n\t case 'yyyy-mm-dd':\n return( vYear4Str + '-' + vMonthStr + '-' + vDayStr );\n\t case 'mm/dd/yy':\n return( vMonthStr + '/' + vDayStr + '/' + vYear2Str );\n\t case 'dd/mm/yy':\n return( vDayStr + '/' + vMonthStr + '/' + vYear2Str );\n\t case 'yy-mm-dd':\n return( vYear2Str + '-' + vMonthStr + '-' + vDayStr );\n\t case 'mm/dd':\n return( vMonthStr + '/' + vDayStr );\n\t case 'dd/mm':\n return( vDayStr + '/' + vMonthStr );\n }\t\t \n\t \n}\n\nJSGantt.parseXML = function(ThisFile,pGanttVar){\n\tvar is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; // Is this Chrome \n\t\n\ttry { //Internet Explorer \n\t\txmlDoc=new ActiveXObject("Microsoft.XMLDOM");\n\t\t}\n\tcatch(e) {\n\t\ttry { //Firefox, Mozilla, Opera, Chrome etc. \n\t\t\tif (is_chrome==false) { xmlDoc=document.implementation.createDocument("","",null); }\n\t\t}\n\t\tcatch(e) {\n\t\t\talert(e.message);\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (is_chrome==false) { \t// can't use xmlDoc.load in chrome at the moment\n\t\txmlDoc.async=false;\n\t\txmlDoc.load(ThisFile);\t\t// we can use loadxml\n\t\tJSGantt.AddXMLTask(pGanttVar)\n\t\txmlDoc=null;\t\t\t// a little tidying\n\t\tTask = null;\n\t}\n\telse {\n\t\tJSGantt.ChromeLoadXML(ThisFile,pGanttVar);\t\n\t\tta=null;\t// a little tidying\t\n\t}\n}\n\nJSGantt.AddXMLTask = function(pGanttVar){\n\n\tTask=xmlDoc.getElementsByTagName("task");\n\t\n\tvar n = xmlDoc.documentElement.childNodes.length;\t// the number of tasks. IE gets this right, but mozilla add extra ones (Whitespace)\n\t\n\tfor(var i=0;i/gi);\n\n\t\tvar n = ta.length;\t// the number of tasks. \n\t\tfor(var i=1;i/i)\n\t\n\t\t\tif(te.length> 2){var pID=te[1];} else {var pID = 0;}\n\t\t\tpID *= 1;\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pName=te[1];} else {var pName = "No Task Name";}\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pStart=te[1];} else {var pStart = "";}\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pEnd=te[1];} else {var pEnd = "";}\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pColor=te[1];} else {var pColor = '0000ff';}\n\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pLink=te[1];} else {var pLink = "";}\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pMile=te[1];} else {var pMile = 0;}\n\t\t\tpMile *= 1;\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pRes=te[1];} else {var pRes = "";}\t\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pComp=te[1];} else {var pComp = 0;}\t\n\t\t\tpComp *= 1;\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pGroup=te[1];} else {var pGroup = 0;}\t\n\t\t\tpGroup *= 1;\n\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pParent=te[1];} else {var pParent = 0;}\t\n\t\t\tpParent *= 1;\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pOpen=te[1];} else {var pOpen = 1;}\n\t\t\tpOpen *= 1;\n\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pDepend=te[1];} else {var pDepend = "";}\t\n\t\t\t//pDepend *= 1;\n\t\t\tif (pDepend.length==0){pDepend=''} // need this to draw the dependency lines\n\t\t\t\n\t\t\tvar te = Task.split(//i)\n\t\t\tif(te.length> 2){var pCaption=te[1];} else {var pCaption = "";}\n\t\t\t\n\t\t\t// Finally add the task\n\t\t\tpGanttVar.AddTaskItem(new JSGantt.TaskItem(pID , pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend,pCaption \t));\n\t\t}\n\t}\n}\n\nJSGantt.benchMark = function(pItem){\n var vEndTime=new Date().getTime();\n alert(pItem + ': Elapsed time: '+((vEndTime-vBenchTime)/1000)+' seconds.');\n vBenchTime=new Date().getTime();\n}\n\n\n Time and Expense package 314 configureCRM 0 t /*\n This file is part of the xtprjaccnt Package for xTuple ERP,\n and is Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. It\n is licensed to you under the xTuple End-User License Agreement ("the\n EULA"), the full text of which is available at www.xtuple.com/EULA.\n While the EULA gives you access to source code and encourages your\n involvement in the development process, this Package is not free\n software. By using this software, you agree to be bound by the\n terms of the EULA.\n*/\n\ninclude("xtte");\n\nxtte.configureCRM = new Object;\n\nvar _telayout = new QBoxLayout(mywindow);\nvar _tespcr = new QSpacerItem(10, 0, 1, 1 | 4);\nvar _laborAndOverheadLit = toolbox.createWidget("QLabel", mywindow, "_laborAndOverheadLit");\nvar _laborAndOverhead = toolbox.createWidget("GLCluster", mywindow, "_laborAndOverhead");\n_laborAndOverheadLit.text = qsTr("Project Labor And Overhead:");\n_laborAndOverheadLit.buddy= _laborAndOverhead;\n_laborAndOverhead.setType(0x02); // Liability\n\n_telayout.addWidget(_laborAndOverheadLit);\n_telayout.addWidget(_laborAndOverhead);\n_telayout.addItem(_tespcr);\n\nvar _useProjects = mywindow.findChild("_useProjects")\nvar _layout = toolbox.widgetGetLayout(_useProjects);\n_layout.insertLayout(1, _telayout);\n\nxtte.configureCRM.save = function()\n{ \n var id = -1;\n if (_useProjects.checked)\n id = _laborAndOverhead.id() \n \n metrics.set("PrjLaborAndOverhead", id);\n}\n// Initialize\n_laborAndOverhead.setEnabled(_useProjects.checked);\n_laborAndOverhead.setId(metrics.value("PrjLaborAndOverhead"));\n\n// Connections\nmywindow.saving.connect(xtte.configureCRM.save);\n_useProjects["toggled(bool)"].connect(_laborAndOverheadLit, "setEnabled(bool)");\n_useProjects["toggled(bool)"].connect(_laborAndOverhead, "setEnabled(bool)");\n\n Time and Expense package 322 projectGantt 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\nxtte.projectGantt = new Object;\n\nvar _webView = new QWebView(mywindow);\nvar _toolBar = mywindow.findChild("_toolBar");\nvar _layout = toolbox.widgetGetLayout(_toolBar);\nvar _prjid;\nvar _prjNumber;\nvar _prjName;\nvar _startDate;\nvar _dueDate;\nvar _jsCode;\nvar _cssCode;\nvar _jsPath;\nvar _cssPath;\nvar _qry;\nvar _page;\nvar _gantt;\n\nset = function (input) \n{ \n if ("startDate" in input)\n _startDate = input.startDate;\n\n if ("dueDate" in input)\n _dueDate = input.dueDate;\n\n if ("prjName" in input)\n _prjName = input.prjName;\n\n if ("prjNumber" in input)\n {\n _prjNumber = input.prjNumber;\n qry = toolbox.executeDbQuery("projectGantt","getprj",input);\n if (qry.first())\n _prjid = qry.value("prj_id");\n\n xtte.projectGantt.populate();\n }\n}\n\nxtte.projectGantt.populate = function()\n{\n\n _page = '';\n _page = _page + '';\n _page = _page + '';\n _page = _page + '';\n _page = _page + '
';\n\n _gantt = "";\n \n var html = _page + _gantt;\n _webView.setHtml(html);\n // This snippet should make the link open in a new browser, but nothing happens. Why?\n //_webView.page().linkDelegationPolicy = QWebPage.DelegateAllLinks;\n}\n\n// Initialize\nmywindow.findChild("_close").triggered.connect(mywindow, "close");\n\n_layout.addWidget(_webView, 1, 0);\n\n// Create jsGantt files on local OS if they don't already exist\nvar tmpdir = QDir.tempPath();\n_jsPath = tmpdir + "/jsgantt.js";\n_cssPath = tmpdir + "/jscantt.css";\n\nif (!QFile.exists(_jsPath))\n{\n // Create jsGantt script\n qry = toolbox.executeDbQuery("projectGantt","jsgantt");\n if (qry.first());\n _jsCode = qry.value("script_source");\n\n toolbox.textStreamWrite(_jsPath, _jsCode);\n\n // Create jsGantt style sheet\n qry = toolbox.executeDbQuery("projectGantt","jsganttcss");\n if (qry.first());\n _cssCode = qry.value("script_source");\n\n toolbox.textStreamWrite(_cssPath, _cssCode);\n}\n Time and Expense package 323 project 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\nxtte.project = new Object;\n\nvar _tab = mywindow.findChild("_tab"); \nvar _tebilling = toolbox.loadUi("tebilling", mywindow);\n_tab.insertTab(2, _tebilling, qsTr("Billing"));\n_tab.setEnabled(2, privileges.check("CanViewRates"));\n\nvar _buttonBox = mywindow.findChild("_buttonBox");\nvar _gantt = _buttonBox.addButton(qsTr("Gantt..."), QDialogButtonBox.ActionRole);\n\nvar _owner = mywindow.findChild("_owner");\nvar _assignedTo = mywindow.findChild("_assignedTo");\nvar _started = mywindow.findChild("_started");\nvar _due = mywindow.findChild("_due");\nvar _assigned = mywindow.findChild("_assigned");\nvar _completed = mywindow.findChild("_completed");\nvar _prjtask = mywindow.findChild("_prjtask");\nvar _newTask = mywindow.findChild("_newTask");\nvar _editTask = mywindow.findChild("_editTask");\nvar _viewTask = mywindow.findChild("_viewTask");\nvar _number = mywindow.findChild("_number");\nvar _name = mywindow.findChild("_name");\nvar _billingGroup = mywindow.findChild("_billingGroup");\nvar _itemGroup = _tebilling.findChild("_itemGroup");\nvar _useItem = _tebilling.findChild("_useItem");\nvar _cust = _tebilling.findChild("_cust");\nvar _rate = _tebilling.findChild("_rate");\nvar _mode = 'new';\nvar _teprjid = -1; \nvar _prjid = -1;\n\n//set = function(input)\nxtte.project.populated = function(input)\n{\n if (_number.enabled)\n _mode = "edit";\n else\n _mode = "view";\n\n if (input.mode == "view")\n {\n _cust.enabled = false;\n _billingGroup.enabled = false;\n }\n\n sql = "SELECT prj_id FROM prj WHERE prj_number=;";\n var params = new Object;\n params.prj_number = _number.text;\n \n var data = toolbox.executeQuery(sql, params);\n if (data.first())\n {\n _prjid = data.value("prj_id");\n xtte.project.populate();\n }\n}\n\nxtte.project.save = function(prjId)\n{\n if (prjId <= 0)\n return;\n\n var params = new Object();\n params.teprj_id\t= _teprjid;\n params.prj_id\t= prjId;\n if (_cust.isValid())\n params.cust_id \t= _cust.id();\n if (_billingGroup.checked)\n {\n params.rate\t= _rate.localValue;\n params.curr_id\t= _rate.id();\n }\n\n var query = "updteprj";\n if (_teprjid == -1)\n query = "insteprj";\n\n var q = toolbox.executeDbQuery("project", query, params);\n xtte.errorCheck(q);\n}\n\nxtte.project.populate = function()\n{\n var params = new Object();\n params.prj_id = _prjid; \n\n var q = toolbox.executeDbQuery("project", "selteprj", params);\n\n if (q.first())\n {\n _teprjid = q.value("teprj_id");\n _cust.setId(q.value("cust_id"));\n if (q.value("curr_id") == -1)\n _billingGroup.checked = false;\n else\n {\n _billingGroup.checked = true;\n _rate.setId(q.value("curr_id"));\n _rate.localValue = q.value("teprj_rate");\n }\n return;\n }\n else\n xtte.errorCheck(q);\n}\n\nxtte.project.newTask = function()\n{\n if (_prjid == -1)\n {\n if (!mywindow.sSave(true))\n return;\n else\n {\n var params = new Object;\n params.prjNumber = _number.text;\n\n var q = toolbox.executeDbQuery("projectGantt", "getprj", params);\n if (q.first())\n _prjid = q.value("prj_id");\n else\n return;\n }\n }\n\n xtte.project.openTask("new");\n}\n\nxtte.project.editTask = function()\n{\n xtte.project.openTask("edit");\n}\n\nxtte.project.viewTask = function()\n{\n xtte.project.openTask("view");\n}\n\nxtte.project.openTask = function(mode)\n{\n params = new Object;\n params.mode = mode;\n if (mode == "new")\n {\n params.prj_id = _prjid;\n params.prj_owner_username = _owner.username();\n params.prj_username = _assignedTo.username();\n params.prj_start_date = _started.date;\n params.prj_due_date = _due.date;\n params.prj_assigned_date = _assigned.date;\n params.prj_completed_date = _completed.date;\n }\n else\n params.prjtask_id = _prjtask.id();\n if (_cust.isValid())\n params.cust_id = _cust.id();\n\n var win = toolbox.openWindow("task", mywindow, Qt.ApplicationModal);\n toolbox.lastWindow().set(params);\n var result = win.exec();\n if(result != 0)\n mywindow.populate();\n}\n\nxtte.project.gantt = function()\n{\n if (!_due.isValid())\n {\n var msg = qsTr("You must enter a valid Due Date");\n QMessageBox.critical(mywindow, qsTr("Invalid Date"), msg);\n return;\n }\n\n var dparams = new Object;\n dparams.startDate = _started.date;\n dparams.dueDate = _due.date;\n\n var qry = toolbox.executeDbQuery("project","formatdates",dparams);\n if (qry.first())\n {\n var params = new Object;\n params.prjNumber = _number.text;\n params.prjName = _name.text;\n params.startDate = qry.value("start_date");\n params.dueDate = qry.value("due_date");\n\n toolbox.openWindow("projectGantt", mywindow, Qt.ApplicationModal);\n toolbox.lastWindow().set(params);\n }\n}\n\n// Initialize\n_itemGroup.hide();\n_useItem.hide();\n\n// Connections\ntoolbox.coreDisconnect(_newTask, "clicked()", mywindow, "sNewTask()");\ntoolbox.coreDisconnect(_editTask, "clicked()", mywindow, "sEditTask()");\ntoolbox.coreDisconnect(_viewTask, "clicked()", mywindow, "sViewTask()");\n\nmywindow.populated.connect(xtte.project.populated);\n_newTask.clicked.connect(xtte.project.newTask);\n_editTask.clicked.connect(xtte.project.editTask);\n_viewTask.clicked.connect(xtte.project.viewTask);\n_gantt.clicked.connect(xtte.project.gantt);\nmydialog["finished(int)"].connect(xtte.project.save);\n\n Time and Expense package 326 timeExpenseSheet 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ndebugger;\nvar _debug = false;\ninclude("xtte");\n\ntry\n{\n if (_debug)\n print("xtte.timeExpenseSheet script entered");\n\n // Define Variables\n xtte.timeExpenseSheet = new Object;\n\n var _all = mywindow.findChild("_all");\n var _buttonBox = mywindow.findChild("_buttonBox");\n var _edit = mywindow.findChild("_edit");\n var _new = mywindow.findChild("_new");\n var _delete = mywindow.findChild("_delete");\n var _view = mywindow.findChild("_view");\n var _print = mywindow.findChild("_print");\n var _printSheet = mywindow.findChild("_printSheet");\n var _lines = mywindow.findChild("_lines");\n var _selected = mywindow.findChild("_selected");\n var _weekending = mywindow.findChild("_weekending");\n var _employee = mywindow.findChild("_employee");\n var _sheetNumberExtra = mywindow.findChild("_sheetNumberExtra");\n var _site = mywindow.findChild("_site");\n var _orderComments = mywindow.findChild("_orderComments");\n var _documents = mywindow.findChild("_documents");\n\n var _sheet;\n var _id = -1;\n var _type;\n var _admin;\n\n _lines.addColumn(qsTr("Type"),\t\tXTreeWidget.docTypeColumn,Qt.AlignLeft, false, "teitem_type");\n\n //add logic to determine the next Sunday date and populate both start and end with it\n _lines.addColumn(qsTr("Line #"), XTreeWidget.seqColumn, Qt.AlignLeft, true, "teitem_linenumber");\n _lines.addColumn(qsTr("Sheet Date"), XTreeWidget.dateColumn, Qt.AlignLeft, false, "tehead_weekending");\n _lines.addColumn(qsTr("Work Date"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "teitem_workdate");\n _lines.addColumn(qsTr("Project#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "prj_number");\n _lines.addColumn(qsTr("Project Name"), -1, Qt.AlignLeft, false, "prj_name");\n _lines.addColumn(qsTr("Task#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "prjtask_number");\n _lines.addColumn(qsTr("Task Name"), -1, Qt.AlignLeft, false, "prjtask_name");\n _lines.addColumn(qsTr("Cust.#"), XTreeWidget.orderColumn, Qt.AlignLeft, false, "cust_number");\n _lines.addColumn(qsTr("Cust. Name"), -1, Qt.AlignLeft, false, "cust_name");\n _lines.addColumn(qsTr("PO"), XTreeWidget.orderColumn, Qt.AlignLeft, false, "teitem_po");\n _lines.addColumn(qsTr("Item"), XTreeWidget.itemColumn, Qt.AlignLeft, true, "item_number");\n _lines.addColumn(qsTr("Description"), -1, Qt.AlignLeft, true, "item_descrip1");\n _lines.addColumn(qsTr("Hours"), XTreeWidget.qtyColumn, Qt.AlignRight, true, "hours");\n _lines.addColumn(qsTr("Expense"), XTreeWidget.qtyColumn, Qt.AlignRight, true, "expense");\n _lines.addColumn(qsTr("Notes"), -1, Qt.AlignLeft, false, "f_notes");\n\n\n if (privileges.check("CanViewRates"))\n {\n _lines.addColumn(qsTr("Billable"), XTreeWidget.ynColumn, Qt.AlignLeft, true, "teitem_billable");\n _lines.addColumn(qsTr("Rate"), XTreeWidget.priceColumn, Qt.AlignRight, false, "teitem_rate");\n _lines.addColumn(qsTr("Extended"), XTreeWidget.moneyColumn, Qt.AlignRight, false, "teitem_total");\n }\n\n}\n\ncatch (e)\n{\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("timeExpenseSheet.js exception: ") + e);\n}\n\nset = function(input)\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.set entered");\n\n if("emp_id" in input)\n _employee.setId(input.emp_id); \n \n if("sheet" in input) \n _sheet = input.sheet;\n\n if ("tehead_id" in input)\n {\n _id = input.tehead_id;\n _documents.setId(_id);\n }\n\n if("mode" in input)\n {\n if (input.mode <= xtte.editMode)\n {\n _lines["valid(bool)"].connect(_edit["setEnabled(bool)"]);\n _lines["valid(bool)"].connect(_delete["setEnabled(bool)"]);\n _lines.itemSelected.connect(_edit, "animateClick");\n }\n\n if (input.mode == xtte.newMode)\n {\n _mode = "new";\n _weekending.enabled = true;\n }\n else if (input.mode == xtte.editMode)\n {\n _mode = "edit";\n _weekending.enabled = false;\n _employee.enabled = false;\n _site.enabled = false;\n var shortcut = _buttonBox.button(QDialogButtonBox.Cancel).shortcut;\n _buttonBox.removeButton(_buttonBox.button(QDialogButtonBox.Cancel));\n _buttonBox.addButton(QDialogButtonBox.Close);\n _buttonBox.button(QDialogButtonBox.Close).shortcut = shortcut;\n\n xtte.timeExpenseSheet.populate();\n }\n else if (input.mode == xtte.viewMode)\n {\n _mode = "view";\n _new.enabled = false;\n _orderComments.enabled = false;\n var shortcut = _buttonBox.button(QDialogButtonBox.Cancel).shortcut;\n _buttonBox.clear();\n _buttonBox.addButton(QDialogButtonBox.Close);\n _buttonBox.button(QDialogButtonBox.Close).shortcut = shortcut;\n _lines.itemSelected.connect(_view, "animateClick");\n _printSheet.hide();\n\n xtte.timeExpenseSheet.populate();\n }\n }\n return mainwindow.NoError;\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("set exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.populateMenu = function(pMenu, pItem, pCol)\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.populateMenu entered");\n\n var tmpact;\n\n if(pMenu == null)\n pMenu = _lines.findChild("_menu");\n\n if(pMenu != null)\n {\n var currentItem = _lines.currentItem();\n if (currentItem != null)\n {\n tmpact = pMenu.addAction(qsTr("Edit..."));\n tmpact.triggered.connect(xtte.timeExpenseSheet.editItem);\n tmpact.enabled = (_mode != "view" && privileges.check("MaintainTimeExpense"));\n\n tmpact = pMenu.addAction(qsTr("View..."));\n tmpact.triggered.connect(xtte.timeExpenseSheet.viewItem);\n\n tmpact = pMenu.addAction(qsTr("Delete..."));\n tmpact.triggered.connect(xtte.timeExpenseSheet.deleteItem);\n tmpact.enabled = (_mode != "view" && privileges.check("MaintainTimeExpense"));\n }\n }\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("populateMenu exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.deleteItem = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.deleteItem entered");\n\n var msg = qsTr("Are you sure you want to delete this line?");\n if (QMessageBox.question(mywindow, mywindow.windowTitle, msg,\n QMessageBox.Yes | QMessageBox.Escape,\n QMessageBox.No | QMessageBox.Default) == QMessageBox.Yes)\n {\n var params = new Object();\n params.teitem_id = _lines.id();\n\n q = toolbox.executeDbQuery("timeexpensesheet","delteitem", params );\n xtte.errorCheck(q);\n xtte.timeExpenseSheet.fillList();\n }\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("deleteItem exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.newItem = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.newItem entered");\n\n if (!xtte.timeExpenseSheet.save())\n return;\n\n xtte.timeExpenseSheet.openItem(xtte.newMode);\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("newItem exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.editItem = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.editItem entered");\n\n xtte.timeExpenseSheet.openItem(xtte.editMode);\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("editItem exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.viewItem = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.viewItem entered");\n\n xtte.timeExpenseSheet.openItem(xtte.viewMode);\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("viewItem exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.openItem = function(mode)\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.openItem entered");\n\n var params = new Object;\n params.tehead_id = _id;\n params.site = _site.text;\n params.weekending = _weekending.date;\n params.emp_id = _employee.id();\n params.mode = mode;\n if (mode) // Not new\n params.teitem_id = _lines.id();\n\n var wnd = toolbox.openWindow("timeExpenseSheetItem", mywindow);\n toolbox.lastWindow().set(params);\n wnd.exec();\n\n xtte.timeExpenseSheet.fillList();\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("openItem exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.accepted = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.accepted entered");\n\n if (!xtte.timeExpenseSheet.save())\n return;\n\n if (_printSheet.checked)\n xtte.timeExpenseSheet.printSheet();\n\n mywindow.close();\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("accepted exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.save = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.save entered");\n\n if (!_employee.isValid())\n throw new Error(qsTr("Employee Required"));\n\n if (_site.id() == -1)\n throw new Error(qsTr("Site Required"));\n\n if (!_weekending.isValid())\n throw new Error(qsTr("Week Ending Date Required"));\n\n var params = new Object();\n params.tehead_id = _id;\n params.emp_id = _employee.id();\n params.warehous_id = _site.id();\n params.weekending = _weekending.date;\n params.notes = _orderComments.plainText;\n\n var query = "updtehead";\n if (_id == -1)\n query = "instehead";\n\n q = toolbox.executeDbQuery("timeexpensesheet", query, params );\n if (q.first())\n {\n _id = q.value("tehead_id");\n _documents.setId(_id);\n _sheetNumberExtra.text = q.value("tehead_number");\n }\n else if (!xtte.errorCheck(q))\n return false;\n\n _weekending.enabled = false;\n _employee.enabled = false;\n _site.enabled = false;\n\n return true;\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, qsTr("timeExpenseSheet"), e.message);\n return false;\n }\n}\n\nxtte.timeExpenseSheet.handleNewButton = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.handleNewButton entered");\n\n _new.enabled = (_weekending.isValid() &&\n _employee.isValid() &&\n _mode != "view");\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("handleNewButton exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.populate = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.populate entered");\n\n var params = new Object;\n params.type = _type;\n params.emp = _employee.id();\n params.tehead_id = _id;\n\n q = toolbox.executeDbQuery("timeexpensesheet", "header", params);\n\n if (q.first())\n {\n _weekending.date = q.value("tehead_weekending");\n _sheetNumberExtra.text = q.value("tehead_number");\n _employee.setId(q.value("tehead_emp_id"));\n _site.setId(q.value("tehead_warehous_id"));\n _orderComments.setPlainText(q.value("tehead_notes"));\n }\n else if (!xtte.errorCheck(q))\n return;\n\n if (_mode == "view")\n {\n _weekending.enabled = false;\n _employee.enabled = false;\n _site.enabled = false;\n }\n\n xtte.timeExpenseSheet.fillList();\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("populate exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.testCurrEmpId = function()\n{\n var params = new Object;\n params.emp_id = _employee.id();\n qry = toolbox.executeQuery("SELECT crmacct_emp_id = ::integer AS test "\n + "FROM crmacct "\n + "WHERE crmacct_usr_username = getEffectiveXtUser();", params);\n if (qry.first()) {\n return qry.value("test");\n }\n else\n QMessageBox.information(mywindow, "Database Error", qry.lastError().text);\n return false;\n}\n\nxtte.timeExpenseSheet.fillList = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.fillList entered");\n\n if ( ( privileges.check("MaintainEmpCostSelf") && xtte.timeExpenseSheet.testCurrEmpId()) || privileges.check("MaintainEmpCostAll") )\n {\n _lines.addColumn(qsTr("Hourly Cost"), XTreeWidget.priceColumn, Qt.AlignRight, false, "teitem_hrlycost");\n _lines.addColumn(qsTr("Total Cost"), XTreeWidget.priceColumn, Qt.AlignRight, false, "teitem_totalcost");\n }\n\n var params = new Object;\n params.tehead_id = _id;\n params.time = qsTr("Time");\n params.expense = qsTr("Expense");\n params.error = qsTr("Error");\n\n q = toolbox.executeDbQuery("timeexpensesheet", "detail", params);\n\n _lines.populate(q);\n\n xtte.errorCheck(q);\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("fillList exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.printSheet = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.printSheet entered");\n\n var params = new Object;\n params.tehead_id = _id;\n params.approved = qsTr("Approved");\n params.closed = qsTr("Closed");\n params.open = qsTr("Open");\n\n toolbox.printReport("TimeExpenseSheet", params);\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("printSheet exception: ") + e);\n }\n}\n\nxtte.timeExpenseSheet.close = function()\n{\n try\n {\n if (_debug)\n print("xtte.timeExpenseSheet.close entered");\n\n if (_mode == "new" && _id != -1)\n {\n if (QMessageBox.question(mywindow,\n qsTr("Delete Sheet"),\n qsTr("

Are you sure you want to cancel this "\n + "sheet and discard all your changes?"),\n QMessageBox.Yes, QMessageBox.No) == QMessageBox.Yes)\n {\n var params = new Object;\n params.tehead_id = _id;\n\n toolbox.executeDbQuery("timeexpensesheet", "deltehead", params);\n }\n else\n return;\n }\n\n mywindow.close();\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, "timeExpenseSheet",\n qsTr("close exception: ") + e);\n }\n}\n\n// Initialize\n_employee.enabled = privileges.check("MaintainTimeExpenseOthers");\n_new.enabled = false;\n\n// Make connections\n_employee.newId.connect(xtte.timeExpenseSheet.handleNewButton);\n_weekending.newDate.connect(xtte.timeExpenseSheet.handleNewButton);\n_lines["valid(bool)"].connect(_view["setEnabled(bool)"]);\n\n_buttonBox.accepted.connect(xtte.timeExpenseSheet.accepted);\n_buttonBox.rejected.connect(xtte.timeExpenseSheet.close);\n\n_new.clicked.connect(xtte.timeExpenseSheet.newItem);\n_edit.clicked.connect(xtte.timeExpenseSheet.editItem);\n_delete.clicked.connect(xtte.timeExpenseSheet.deleteItem);\n_view.clicked.connect(xtte.timeExpenseSheet.viewItem);\n\n_lines["populateMenu(QMenu *, XTreeWidgetItem *, int)"].connect(xtte.timeExpenseSheet.populateMenu); Time and Expense package 327 timeExpenseSheetItem 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\n\n// Define local variables\nxtte.timeExpenseSheetItem = new Object;\n\nvar _hours = mywindow.findChild("_hours");\nvar _total = mywindow.findChild("_total");\t\nvar _totalLit = mywindow.findChild("_totalLit");\t\nvar _rate = mywindow.findChild("_rate");\nvar _rateLit = mywindow.findChild("_rateLit");\nvar _clients = mywindow.findChild("_clients");\nvar _employee = mywindow.findChild("_employee");\nvar _items = mywindow.findChild("_items");\nvar _po = mywindow.findChild("_po");\nvar _project = mywindow.findChild("_project");\nvar _task = mywindow.findChild("_task");\nvar _linenumber = mywindow.findChild("_linenumber");\nvar _sheet = mywindow.findChild("_sheet");\nvar _buttonBox = mywindow.findChild("_buttonBox");\nvar _weekending = mywindow.findChild("_weekending");\nvar _workdate = mywindow.findChild("_workdate");\nvar _type = mywindow.findChild("_type");\nvar _qtyLabel = mywindow.findChild("_qtyLabel");\nvar _billable = mywindow.findChild("_billable");\nvar _prepaid = mywindow.findChild("_prepaid");\nvar _actual = mywindow.findChild("_actual");\nvar _budget = mywindow.findChild("_budget");\nvar _actualCost = mywindow.findChild("_actualCost");\nvar _budgetCost = mywindow.findChild("_budgetCost");\nvar _notes = mywindow.findChild("_notes");\nvar _sheetLit = mywindow.findChild("_sheetLit");\nvar _dayHrs = mywindow.findChild("_dayHrs");\nvar _weekHrs = mywindow.findChild("_weekHrs");\n\nvar _empcostLit\t\t\t= mywindow.findChild("_empcostLit");\nvar _empcost\t\t\t= mywindow.findChild("_empcost");\nvar _totCostLit = mywindow.findChild("_totCostLit");\nvar _totCost = mywindow.findChild("_totCost");\n\nvar _cancel = _buttonBox.button(QDialogButtonBox.Cancel);\nvar _prev = _buttonBox.addButton(qsTr("Prev"), QDialogButtonBox.ActionRole);\nvar _next = _buttonBox.addButton(qsTr("Next"), QDialogButtonBox.ActionRole);\n\nvar _sheetnum;\nvar _linenum;\nvar _teitemid = -1;\nvar _headid = -1;\nvar _taskid = -1;\nvar _site;\nvar _mode = xtte.newMode;\nvar _modified = false;\nvar _populating = false;\nvar _last = true;\n\n\nset = function(input)\n{\n if("emp_id" in input)\n _employee.setId(input.emp_id);\n \n if("weekending" in input)\n _weekending.date = input.weekending;\n\n if ("tehead_id" in input)\n _headid = input.tehead_id;\n\n if ("site" in input)\n _site = input.site;\n\n if ("teitem_id" in input)\n _teitemid = input.teitem_id;\n\n if ("mode" in input)\n {\n _mode = input.mode;\n\n if (input.mode == xtte.newMode)\n {\n xtte.timeExpenseSheetItem.clear();\n }\n else if (input.mode == xtte.viewMode)\n {\n var shortcut = _buttonBox.button(QDialogButtonBox.Cancel).shortcut;\n _buttonBox.removeButton(_buttonBox.button(QDialogButtonBox.Cancel));\n _buttonBox.removeButton(_buttonBox.button(QDialogButtonBox.Save));\n _buttonBox.addButton(QDialogButtonBox.Close);\n _buttonBox.button(QDialogButtonBox.Close).shortcut = shortcut;\n _weekending.enabled = false;\n _next.enabled = false;\n _prepaid.enabled = false;\n _type.enabled = false;\n _weekending.enabled = false;\n _workdate.enabled = false;\n _hours.enabled = false;\n _rate.enabled = false;\n _items.enabled = false;\n _employee.enabled = false;\n _clients.enabled = false;\n _po.enabled = false;\n _project.enabled = false;\n _task.enabled = false;\n _notes.enabled = false;\n _billable.enabled = false; \n _empcost.enabled = false;\n }\n else if (input.mode == xtte.editMode)\n {\n _project.enabled = false;\n _task.enabled = false;\n }\n\n xtte.timeExpenseSheetItem.populate();\n }\n\n \n return mainwindow.NoError;\n}\n\nxtte.timeExpenseSheetItem.extension = function()\n{\n _total.localValue = (_hours.toDouble() * _rate.localValue);\n _totCost.localValue = (_hours.toDouble() * _empcost.localValue);\n if (_type.code == 'T')\n xtte.timeExpenseSheetItem.empTotals();\n xtte.timeExpenseSheetItem.modified();\n}\n\nxtte.timeExpenseSheetItem.gettask = function()\n{\n if (_project.isValid())\n {\n var params = new Object();\n params.prj_id = _project.id();\n params.name = qsTr("Default");\n if (_mode == xtte.newMode)\n params.active = true;\n if (_workdate.isValid())\n params.startDate = _workdate.date;\n\n var qry = toolbox.executeDbQuery("timeexpensesheetitem", "gettask", params);\n if(!xtte.errorCheck(qry))\n return;\n\n _task.populate(qry);\n\n if(_taskid > 0)\n _task.setId(_taskid);\n\n if (!qry.first())\n {\n var msg = qsTr("No task found. A default task will be added");\n QMessageBox.critical(mywindow, qsTr("task"), msg);\n toolbox.executeDbQuery("timeexpensesheetitem","instask",params);\n\n qry = toolbox.executeDbQuery("timeexpensesheetitem", "gettask", params);\n _task.populate(qry);\n }\n\n xtte.timeExpenseSheetItem.getPrice();\n xtte.timeExpenseSheetItem.budgTotals();\n xtte.timeExpenseSheetItem.actTotals();\n }\n}\n\nxtte.timeExpenseSheetItem.modified = function()\n{\n if (_populating)\n return;\n\n _modified = true;\n}\n\nxtte.timeExpenseSheetItem.getPrice = function()\n{\n if (_populating || !_clients.isValid())\n return;\n if (_type.code == 'T' && !_billable.checked)\n {\n _rate.localValue = 0;\n _rate.enabled = false;\n } \n else if (_mode == xtte.editMode)\n {\n if (QMessageBox.question(mywindow,\n qsTr("Update Rate?"),\n qsTr("

Would you like to update the existing rate?"),\n QMessageBox.Ok, QMessageBox.Cancel) == QMessageBox.Cancel)\n return;\n }\n\n var params = new Object();\n params.item_id = _items.id();\n params.task_id = _task.id();\n params.prj_id = _project.id();\n params.cust_id = _clients.id();\n params.emp_id = _employee.id();\n if (_type.code == "T")\n params.time = true;\n \n var qry = toolbox.executeDbQuery("timeexpensesheetitem", "getterate", params);\n \n if (qry.first())\n {\n if(_billable.checked)\n {\n _rate.setBaseValue(qry.value("rate"));\n _rate.enabled = true;\n }\n }\n else\n xtte.errorCheck(qry);\n \n var qry2 = toolbox.executeQuery("SELECT te.calcRate(emp_wage, emp_wage_period) as cost "\n + "FROM emp WHERE emp_id = ", params);\n if (qry2.first())\n {\n if(_type.code == 'T')\n {\n _empcost.setBaseValue(qry2.value("cost"));\n _totCost.setBaseValue(qry2.value("cost") * _hours.toDouble());\n }\n }\n else\n xtte.errorCheck(qry2);\n\n xtte.timeExpenseSheetItem.modified();\n}\n\nxtte.timeExpenseSheetItem.populate = function()\n{\n _modified = false;\n \n // Edit or View mode\n var params = new Object();\n params.teitem_id = _teitemid;\n\n qry = toolbox.executeDbQuery("timeexpensesheetitem","detail", params);\n if (qry.first())\n {\n if (_mode == xtte.newMode)\n _mode = xtte.editMode;\n _populating = true; \n\n _headid = qry.value("teitem_tehead_id");\n _sheet.text = (qry.value("tehead_number"));\n _sheetnum = (qry.value("tehead_number"));\n _employee.setId(qry.value("tehead_emp_id"));\n _weekending.date = (qry.value("tehead_weekending"));\n\n _linenumber.text = (qry.value("teitem_linenumber"));\n _linenum = (qry.value("teitem_linenumber"));\n _workdate.date = (qry.value("teitem_workdate"));\n _type.code = qry.value("teitem_type");\n _clients.setId(qry.value("teitem_cust_id"));\n _po.text = (qry.value("teitem_po"));\n _items.setId(qry.value("teitem_item_id"));\n _hours.text = (qry.value("teitem_qty"));\n _rate.setId(qry.value("teitem_curr_id") - 0);\n _rate.localValue = (qry.value("teitem_rate"));\n _total.localValue = (qry.value("teitem_total"));\n _project.setId(qry.value("prj_id"));\n _task.setId(qry.value("teitem_prjtask_id"));\n _billable.checked = qry.value("teitem_billable");\n _prepaid.checked = qry.value("teitem_prepaid")\n _notes.plainText = qry.value("teitem_notes");\n _empcost.localValue = qry.value("teitem_hrlycost");\n _totCost.localValue = qry.value("teitem_hrlycost")*qry.value("teitem_qty");\n\n _last = qry.value("ismax");\n if (_last && _mode == xtte.editMode)\n _next.text = qsTr("New");\n else\n _next.text = qsTr("Next");\n\n _next.enabled = !(_last && _mode == xtte.viewMode);\n _prev.enabled = (_linenum > 1);\n\n _populating = false;\n _modified = false;\n }\n else if (!xtte.errorCheck)\n return;\n\n xtte.timeExpenseSheetItem.empTotals();\n}\n\nxtte.timeExpenseSheetItem.accepted = function()\n{\n if (xtte.timeExpenseSheetItem.save())\n {\n if (_mode == xtte.newMode)\n xtte.timeExpenseSheetItem.clear();\n else\n mywindow.close();\n }\n}\n\nxtte.timeExpenseSheetItem.save = function()\n{\n try\n {\n if (!_workdate.isValid())\n throw new Error(qsTr("Work Date Required"));\n \n if (!_project.isValid())\n throw new Error(qsTr("Project Required"));\n \n if (!_items.isValid())\n throw new Error(qsTr("Item Required"));\n\n if (_task.id == -1)\n throw new Error(qsTr("Task Required"));\n\n if (_hours.toDouble < 0 && _billable.checked)\n throw new Error(qsTr("Billing of negative amounts is not supported"));\n }\n catch (e)\n {\n QMessageBox.critical(mywindow, qsTr("Processing Error"), e.message);\n return false;\n }\n\n if (_hours.toDouble() <= 0 && _type.code == 'E' && !_prepaid.checked)\n {\n var msg = qsTr("The system only supports vouchering positive expense quantities. "\n + "Do you want to save anyway?")\n if (QMessageBox.question( mywindow, mywindow.windowTitle, msg, \n QMessageBox.Yes | QMessageBox.Escape, QMessageBox.No | QMessageBox.Default) == QMessageBox.No)\n return false;\n }\n\n\n var params = new Object();\n params.teitem_tehead_id = _headid;\n params.teitem_linenumber = _linenum;\n params.teitem_type \t = _type.code;\n params.teitem_workdate = _workdate.date;\n params.teitem_cust_id = _clients.id();\n params.teitem_po = _po.text;\n params.teitem_item_id = _items.id();\n params.teitem_qty = _hours.toDouble();\n params.teitem_rate = _rate.localValue;\n params.teitem_total = _total.localValue;\n params.teitem_prjtask_id = _task.id();\n params.teitem_billable = _billable.checked;\n params.teitem_prepaid = _prepaid.checked;\n params.teitem_notes = _notes.plainText;\n params.teitem_id = _teitemid;\n params.teitem_curr_id = _rate.id();\n params.teitem_empcost = _empcost.localValue;\n\n var query = "updteitem";\n if (_teitemid < 0)\n query = "insteitem";\n\n var q = toolbox.executeDbQuery("timeexpensesheetitem", query, params);\n if (q.first())\n _teitemid = q.value("teitem_id");\n else if (!xtte.errorCheck(q))\n return;\n\n _prev.enabled = true;\n\n return true;\n}\n\n\nxtte.timeExpenseSheetItem.typeChanged = function()\n{\n if (_type.code == "T")\n {\n _qtyLabel.text = qsTr("Hours:");\n _rateLit.text = qsTr("Rate:");\n _rate.enabled = _clients.isValid();\n _billable.visible = true;\n _prepaid.visible = false;\n _prepaid.checked = false;\n _empcost.enabled = true;\n } \n else\n {\n _qtyLabel.text = qsTr("Qty:");\n _rateLit.text = qsTr("Unit Cost:");\n _billable.visible = true;\n _prepaid.visible = true;\n _empcost.enabled = false;\n _empcost.localValue = 0;\n _rate.enabled = true;\n _rate.localValue = 0;\n\n var params = new Object();\n params.emp_id = _employee.id();\n\n var qry = toolbox.executeQuery("SELECT COALESCE (crmacct_vend_id,-1) AS crmacct_vend_id FROM crmacct WHERE crmacct_emp_id= ;",params);\n\n if (qry.first())\n {\n var vend_id= qry.value("crmacct_vend_id");\n if(vend_id ==-1)\n {\n var msg = qsTr("The Employee is not a Vendor, this expense cannot be vouchered. "\n + "Do you want to continue?")\n if (QMessageBox.question( mywindow, mywindow.windowTitle, msg,\n QMessageBox.Yes | QMessageBox.Escape, QMessageBox.No | QMessageBox.Default) == QMessageBox.No)\n {\n _type.code= "T";\n return false;\n }\n }\n }\n }\n xtte.timeExpenseSheetItem.getPrice();\n xtte.timeExpenseSheetItem.empTotals();\n xtte.timeExpenseSheetItem.modified();\n}\n\nxtte.timeExpenseSheetItem.customerChanged = function()\n{\n _billable.enabled = _clients.isValid();\n _rate.enabled = (_clients.isValid() || _type.code == 'E');\n\n if (_populating)\n return;\n\n if (!_clients.isValid())\n {\n _po.clear();\n _rate.localValue = 0;\n _billable.checked = false;\n }\n\n var params = new Object;\n params.cust_id = _clients.id();\n\n q = toolbox.executeDbQuery("timeexpensesheetitem", "getcustinfo", params);\n if (q.first())\n _rate.setId(q.value("cust_curr_id") - 0);\n else if (!xtte.errorCheck(q))\n return;\n\n xtte.timeExpenseSheetItem.getPrice();\n}\n\nxtte.timeExpenseSheetItem.projectChanged = function()\n{\n //enable and reset the task fields\n _task.enabled = (_project.isValid() && _mode == xtte.newMode);\n\n xtte.timeExpenseSheetItem.gettask();\n xtte.timeExpenseSheetItem.modified();\n xtte.timeExpenseSheetItem.getPrice();\n}\n\n\nxtte.timeExpenseSheetItem.taskChanged = function()\n{ \n var custid = -1;\n var itemid = -1;\n var params = new Object;\n params.prjtask_id = _task.id();\n\n q = toolbox.executeDbQuery("timeexpensesheetitem", "taskdefaults", params);\n if (q.first())\n {\n custid = q.value("cust_id");\n itemid = q.value("item_id")\n }\n else if (!xtte.errorCheck(q))\n return;\n\n if (_populating)\n {\n // Disable if customer matches default, otherwise default must have changed\n // so allow for editing so user can decide what to do\n _clients.enabled = !(_clients.isValid() && _clients.id() == custid)\n _items.enabled = !(_items.isValid() && _items.id() == itemid)\n }\n else\n {\n if (custid > 0)\n {\n _clients.setId(custid);\n _clients.enabled = false;\n }\n else\n _clients.enabled = true;\n\n if (itemid > 0)\n {\n _items.setId(itemid);\n _items.enabled = false;\n }\n else\n _items.setId(-1);\n _items.enabled = true;\n }\n\n xtte.timeExpenseSheetItem.getPrice();\n xtte.timeExpenseSheetItem.budgTotals();\n xtte.timeExpenseSheetItem.actTotals();\n xtte.timeExpenseSheetItem.modified();\n}\n\nxtte.timeExpenseSheetItem.budgTotals = function()\n{\n var params = new Object;\n params.prj_id = _project.id();\n params.task_id = _task.id();\n \n var q = toolbox.executeDbQuery("timeexpensesheetitem", "taskbudg",params);\n if (q.first())\n {\n _budget.text = q.value("budget_hours"); \n _actual.text = q.value("actual_hours"); \n _budgetCost.text = q.value("budget_cost"); \n _actualCost.text = q.value("actual_cost"); \n \n }\n else \n xtte.errorCheck(q);\n}\n\n\nxtte.timeExpenseSheetItem.actTotals = function()\n{\n var params = new Object;\n params.task_id = _task.id();\n params.teitem_id = _teitemid;\n\n var expense = 0;\n var hours = 0; \n\n // get the task actuals then add the current\n var q = toolbox.executeDbQuery("timeexpensesheetitem","taskrollup",params);\n\n if (q.first())\n {\n _actual.text = q.value("total_hours");\n _actualCost.text = q.value("total_expense");\n } \n else\n xtte.errorCheck(q);\n}\n\nxtte.timeExpenseSheetItem.empTotals = function()\n{\n if (_populating)\n return;\n\n var params = new Object;\n params.teitem_id = _teitemid;\n params.tehead_id = _headid;\n params.emp_id = _employee.id();\n params.workDate = _workdate.date;\n if (_type.code == 'T')\n params.hours = _hours.toDouble() - 0;\n\n var q = toolbox.executeDbQuery("timeexpensesheetitem", "emptotals", params);\n\n if (q.first())\n {\n _dayHrs.setText(q.value("day_hours"));\n _weekHrs.setText(q.value("sheet_hours"));\n } \n else\n xtte.errorCheck(q);\n}\n\nxtte.timeExpenseSheetItem.prev = function()\n{\n if ( (_modified) && (_mode != xtte.viewMode) )\n {\n if (QMessageBox.question(mywindow,\n qsTr("Unsaved Changed"),\n qsTr("

You have made some changes "\n + "which have not yet been saved!

"\n + "Would you like to save them now?"),\n QMessageBox.Save, QMessageBox.No) == QMessageBox.Save)\n {\n if (!xtte.timeExpenseSheetItem.save())\n return;\n }\n }\n\n var params = new Object;\n if (_teitemid > 0)\n params.teitem_id = _teitemid;\n else\n params.tehead_id = _headid;\n\n var q = toolbox.executeDbQuery("timeexpensesheetitem", "teitemprev", params);\n\n if (q.first())\n {\n _teitemid = q.value("teitem_id");\n _modified = false;\n\n if (_mode == xtte.newMode)\n _mode = xtte.editMode;\n\n _next.enabled = true;\n xtte.timeExpenseSheetItem.populate();\n }\n else\n xtte.errorCheck(q);\n}\n\n\nxtte.timeExpenseSheetItem.next = function()\n{\n if ( (_modified) && (_mode != xtte.viewMode) )\n {\n\n if (QMessageBox.question(mywindow,\n qsTr("Unsaved Changed"),\n qsTr("

You have made some changes "\n + "which have not yet been saved!\\n" \n + "Would you like to save them now?"),\n QMessageBox.Save, QMessageBox.Cancel) != QMessageBox.Save)\n return;\n\n if (!xtte.timeExpenseSheetItem.save())\n return;\n }\n\n if (_last)\n xtte.timeExpenseSheetItem.clear();\n else\n {\n var params = new Object;\n params.teitem_id = _teitemid;\n var q = toolbox.executeDbQuery("timeexpensesheetitem","teitemnext",params);\n\n if (q.first())\n {\n _modified = false;\n _teitemid = q.value("teitem_id");\n _prev.enabled = true;\n xtte.timeExpenseSheetItem.populate();\n }\n else if (xtte.errorCheck(q))\n xtte.timeExpenseSheetItem.clear();\n }\n}\n\nxtte.timeExpenseSheetItem.clear = function()\n{\n var params = new Object();\n params.tehead_id = _headid;\n\n var q = toolbox.executeDbQuery("timeexpensesheet","header",params);\n\n if (q.first())\n {\n _weekending.date = (q.value("tehead_weekending")); \n _sheet.text = (q.value("tehead_number"));\n _sheetnum = (q.value("tehead_number"));\n _employee.setId(q.value("tehead_emp_id"));\n }\n else if (!xtte.errorCheck(q))\n return;\n\n q = toolbox.executeDbQuery("timeexpensesheetitem", "nextlinenum", params);\n if (q.first())\n {\n _linenumber.setText(q.value("linenumber"));\n _linenum = (q.value("linenumber"));\n } \n else \n xtte.errorCheck(q);\n\n _mode = xtte.newMode;\n _teitemid = -1;\n _prev.enabled = true;\n _type.enabled = true;\n _workdate.clear();\n _workdate.enabled = true;\n _workdate.setFocus();\n _hours.text = "0.0";\n _hours.enabled = true;\n _rate.localValue = 0;\n _empcost.enabled = true;\n _empcost.localValue = 0;\n _items.enabled = true;\n _items.setId(-1);\n _employee.enabled = false;\n _clients.enabled = true;\n _po.clear();\n _po.enabled = true;\n _project.enabled = true;\n _task.enabled = true;\n _notes.clear();\n _notes.enabled = true;\n _next.text = qsTr("New");\n _next.enabled = false;\n\n xtte.timeExpenseSheetItem.getPrice();\n\n _modified = false;\n}\n\n\nxtte.timeExpenseSheetItem.setSecurity = function()\n{\n if (privileges.check("CanViewRates"))\n {\n _rate.visible = true;\n _total.visible = true;\n _rateLit.visible = true;\n _totalLit.visible = true;\n }\n else\n {\n _rate.visible = false;\n _total.visible = false;\n _rateLit.visible = false;\n _totalLit.visible = false;\n }\n if ( ( privileges.check("MaintainEmpCostSelf") && xtte.timeExpenseSheetItem.testCurrEmpId()) || privileges.check("MaintainEmpCostAll") ) \n {\n _empcostLit.visible = true;\n _empcost.visible = true;\n _totCostLit.visible = true;\n _totCost.visible = true;\n }\n else\n {\n _empcostLit.visible = false;\n _empcost.visible = false;\n _totCostLit.visible = false;\n _totCost.visible = false;\n }\t\n}\n\nxtte.timeExpenseSheetItem.testCurrEmpId = function()\n{\n var params = new Object;\n params.emp_id = _employee.id();\n qry = toolbox.executeQuery("SELECT crmacct_emp_id = ::integer AS test "\n + "FROM crmacct "\n + "WHERE crmacct_usr_username = getEffectiveXtUser();", params);\n if (qry.first()) {\n return qry.value("test");\n }\n else \n QMessageBox.information(mywindow, "Database Error", qry.lastError().text);\n return false;\n}\n\n// Initialize default states\n_hours.setValidator(mainwindow.transQtyVal());\n\n_prev.enabled = false;\n_next.enabled = false;\n_task.enabled = false;\n_weekending.enabled = false;\n_linenumber.enabled = true;\n_employee.enabled = false;\n_total.enabled = false;\n_total.readonly = true;\n_rate.enabled = false;\n_billable.visible = true;\n_billable.enabled = false;\n_prepaid.visible = false;\n_next.enabled = false;\n\n_type.append(1, qsTr("Time"), "T");\n_type.append(2, qsTr("Expense"), "E");\n\n_items.setQuery(xtte.itemSql);\n\n_project.setAllowedStatuses(0x02); // In process\n\n// Define connections\n_buttonBox.accepted.connect(xtte.timeExpenseSheetItem.accepted);\n_buttonBox.rejected.connect(mydialog, "reject");\n_prev.clicked.connect(xtte.timeExpenseSheetItem.prev);\n_next.clicked.connect(xtte.timeExpenseSheetItem.next);\n\n_task.newID.connect(xtte.timeExpenseSheetItem.taskChanged);\n_rate.valueChanged.connect(xtte.timeExpenseSheetItem.extension);\n_workdate.newDate.connect(xtte.timeExpenseSheetItem.empTotals);\n_hours.textChanged.connect(xtte.timeExpenseSheetItem.extension);\n_empcost.valueChanged.connect(xtte.timeExpenseSheetItem.extension);\n_hours.editingFinished.connect(xtte.timeExpenseSheetItem.actTotals);\n_rate.valueChanged.connect(xtte.timeExpenseSheetItem.actTotals);\n_type.newID.connect(xtte.timeExpenseSheetItem.typeChanged);\n_items["newId(int)"].connect(xtte.timeExpenseSheetItem.getPrice);\n_clients["newId(int)"].connect(xtte.timeExpenseSheetItem.customerChanged);\n_project["newId(int)"].connect(xtte.timeExpenseSheetItem.projectChanged);\n_employee.newId.connect(xtte.timeExpenseSheetItem.modified);\n_po.textChanged.connect(xtte.timeExpenseSheetItem.modified);\n_workdate.newDate.connect(xtte.timeExpenseSheetItem.modified);\n_billable.toggled.connect(xtte.timeExpenseSheetItem.getPrice);\n_prepaid.toggled.connect(xtte.timeExpenseSheetItem.modified);\n_notes.textChanged.connect(xtte.timeExpenseSheetItem.modified);\n\nxtte.timeExpenseSheetItem.getPrice();\n_employee["newId(int)"].connect(xtte.timeExpenseSheetItem.setSecurity);\n Time and Expense package 328 timeExpenseSheets 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\n\n// Define Variables\nxtte.timeExpenseSheets = new Object;\n\nvar _all = mywindow.findChild("_all");\nvar _close = mywindow.findChild("_close");\nvar _query = mywindow.findChild("_query");\nvar _new = mywindow.findChild("_new");\nvar _print = mywindow.findChild("_print");\nvar _sheets = mywindow.findChild("_sheets");\nvar _selected = mywindow.findChild("_selected");\nvar _approve = mywindow.findChild("_approve");\nvar _process = mywindow.findChild("_process");\nvar _weekending = mywindow.findChild("_weekending");\nvar _showAllEmployees = mywindow.findChild("_showAllEmployees");\nvar _employee = mywindow.findChild("_employee");\nvar _selected = mywindow.findChild("_selected");\nvar _open = mywindow.findChild("_open");\nvar _approved = mywindow.findChild("_approved");\nvar _closed = mywindow.findChild("_closed");\nvar _invoice = mywindow.findChild("_invoice");\nvar _voucher = mywindow.findChild("_voucher");\nvar _post = mywindow.findChild("_post");\n\n// Set up columns\n_sheets.addColumn(qsTr("Sheet#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "tehead_number");\n_sheets.addColumn(qsTr("Date"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "tehead_weekending");\n_sheets.addColumn(qsTr("Employee"), -1, Qt.AlignLeft, true, "emp_code");\n_sheets.addColumn(qsTr("Status"), XTreeWidget.bigMoneyColumn, Qt.AlignCenter, true, "tehead_status");\nif (privileges.check("CanViewRates")) {\n _sheets.addColumn(qsTr("To Invoice"), XTreeWidget.bigMoneyColumn, Qt.AlignLeft, true, "total_i");\n _sheets.addColumn(qsTr("To Voucher"), XTreeWidget.bigMoneyColumn, Qt.AlignLeft, true, "total_e");\n}\n_sheets.addColumn(qsTr("Invoiced"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "invoiced");\n_sheets.addColumn(qsTr("Vouchered"),XTreeWidget.dateColumn, Qt.AlignLeft, true, "vouchered");\n_sheets.addColumn(qsTr("Posted"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "posted");\n\nxtte.timeExpenseSheets.populateMenu = function(pMenu, pItem, pCol)\n{\n var tmpact;\n\n if(pMenu == null)\n pMenu = _sheets.findChild("_menu");\n\n if(pMenu != null)\n {\n var currentItem = _sheets.currentItem();\n var selected = _sheets.selectedItems();\n\n if (currentItem != null)\n {\n if (selected.length == 1) // Can only handle editing for a single select\n {\n var status = currentItem.rawValue("tehead_status");\n\n tmpact = pMenu.addAction(qsTr("Print"));\n tmpact.triggered.connect(xtte.timeExpenseSheets.printSheet);\n\n pMenu.addSeparator();\n\n tmpact = pMenu.addAction(qsTr("Edit..."));\n tmpact.triggered.connect(xtte.timeExpenseSheets.editSheet);\n tmpact.enabled = (status == 'O' && privileges.check("MaintainTimeExpense"));\n \n tmpact = pMenu.addAction(qsTr("View..."));\n tmpact.triggered.connect(xtte.timeExpenseSheets.viewSheet);\n \n tmpact = pMenu.addAction(qsTr("Delete"));\n tmpact.triggered.connect(xtte.timeExpenseSheets.deleteSheet);\n tmpact.enabled = (status == 'O' && privileges.check("MaintainTimeExpense"));\n }\n\n if (xtte.timeExpenseSheets.canApprove(selected))\n {\n pMenu.addSeparator();\n tmpact = pMenu.addAction(qsTr("Approve"));\n tmpact.enabled = privileges.check("CanApprove");\n tmpact.triggered.connect(xtte.timeExpenseSheets.approveSheets);\n }\n else if (xtte.timeExpenseSheets.canUnapprove(selected))\n {\n pMenu.addSeparator();\n tmpact = pMenu.addAction(qsTr("Unapprove"));\n tmpact.enabled = privileges.check("CanApprove");\n tmpact.triggered.connect(xtte.timeExpenseSheets.unapproveSheets);\n }\n\n if (status == 'A' || status == 'O')\n {\n tmpact = pMenu.addAction(qsTr("Close"));\n tmpact.enabled = privileges.check("MaintainTimeExpense");\n tmpact.triggered.connect(xtte.timeExpenseSheets.closeSheet);\n }\n\n if ((xtte.timeExpenseSheets.canProcess("invoiced", selected)) ||\n (xtte.timeExpenseSheets.canProcess("vouchered", selected)) ||\n (xtte.timeExpenseSheets.canProcess("posted", selected)))\n pMenu.addSeparator();\n\n if (xtte.timeExpenseSheets.canProcess("invoiced", selected))\n {\n tmpact = pMenu.addAction(qsTr("Invoice"));\n tmpact.triggered.connect(xtte.timeExpenseSheets.invoiceSheets);\n tmpact.enabled = privileges.check("allowInvoicing");\n }\n\n if (xtte.timeExpenseSheets.canProcess("vouchered", selected))\n {\n tmpact = pMenu.addAction(qsTr("Voucher"));\n tmpact.triggered.connect(xtte.timeExpenseSheets.voucherSheets);\n tmpact.enabled = privileges.check("allowVouchering");\n }\n\n if (xtte.timeExpenseSheets.canProcess("posted", selected))\n {\n tmpact = pMenu.addAction(qsTr("Post Time"));\n tmpact.triggered.connect(xtte.timeExpenseSheets.postSheets);\n tmpact.enabled = privileges.check("PostTimeSheets");\n }\n }\n }\n}\n\nxtte.timeExpenseSheets.canApprove = function(selected)\n{\n for (var i = 0; i < selected.length; i++)\n {\n if (selected[i].rawValue("tehead_status") != 'O')\n return false;\n }\n return true;\n}\n\nxtte.timeExpenseSheets.canUnapprove = function(selected)\n{\n for (var i = 0; i < selected.length; i++)\n {\n if ((selected[i].rawValue("tehead_status") != 'A') ||\n (selected[i].rawValue("posted") > 0) ||\n (selected[i].rawValue("vouchered") > 0) ||\n (selected[i].rawValue("invoiced") > 0))\n return false;\n }\n return true;\n}\n\nxtte.timeExpenseSheets.canProcess = function(process, selected)\n{\n for (var i = 0; i < selected.length; i++)\n {\n if ((selected[i].rawValue("tehead_status") != 'A') ||\n (selected[i].rawValue(process) != 0))\n return false;\n }\n return true;\n}\n\nxtte.timeExpenseSheets.approve = function()\n{\n toolbox.executeBegin();\n for (var i = 0; i < _sheets.topLevelItemCount; i++)\n {\n var item = _sheets.topLevelItem(i);\n if (item.rawValue("tehead_status") == "O")\n {\n var params = new Object();\n params.tehead_id = item.id(); \n \n q = toolbox.executeDbQuery("timeexpensesheets", "approve", params );\n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback();\n return;\n }\n } \n }\n toolbox.executeCommit();\n xtte.timeExpenseSheets.fillList();\n}\n\nxtte.timeExpenseSheets.approveSheets = function()\n{\n toolbox.executeBegin();\n var selected = _sheets.selectedItems();\n for (var i = 0; i < selected.length; i++)\n {\n var params = new Object();\n params.tehead_id = selected[i].id(); \n\n q = toolbox.executeDbQuery("timeexpensesheets", "approve", params ); \n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback();\n return;\n }\n }\n toolbox.executeCommit();\n xtte.timeExpenseSheets.fillList(); \n}\n\nxtte.timeExpenseSheets.unapproveSheets = function()\n{\n toolbox.executeBegin();\n var selected = _sheets.selectedItems();\n for (var i = 0; i < selected.length; i++)\n {\n var params = new Object();\n params.tehead_id = selected[i].id(); \n\n q = toolbox.executeDbQuery("timeexpensesheets", "unapprove", params ); \n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback();\n return;\n }\n }\n toolbox.executeCommit();\n xtte.timeExpenseSheets.fillList(); \n}\n\n\nxtte.timeExpenseSheets.invoiceSheets = function()\n{\n xtte.timeExpenseSheets.processSheets(_sheets.selectedItems(), true, false, false);\n} \n\nxtte.timeExpenseSheets.voucherSheets = function()\n{\n xtte.timeExpenseSheets.processSheets(_sheets.selectedItems(), false, true, false);\n}\n\nxtte.timeExpenseSheets.postSheets = function()\n{ \n xtte.timeExpenseSheets.processSheets(_sheets.selectedItems(), false, false, true);\n}\n\nxtte.timeExpenseSheets.process = function()\n{\n toolbox.executeBegin();\n\n // First loop through and invoice\n if (_invoice.checked)\n {\n var ids = [];\n for (var i = 0; i < _sheets.topLevelItemCount; i++)\n {\n var item = _sheets.topLevelItem(i);\n if ((item.rawValue("tehead_status") == 'A') &&\n (item.rawValue("invoiced") == 0)) \n ids[i] = item.id();\n }\n\n if (ids.length)\n {\n var params = new Object();\n params.tehead_ids = ids; \n\n q = toolbox.executeDbQuery("timeexpensesheets", "invoice", params ); \n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback();\n return;\n }\n }\n }\n\n // Now loop through and do the others\n for (var i = 0; i < _sheets.topLevelItemCount; i++)\n {\n var item = _sheets.topLevelItem(i);\n var params = new Object();\n params.tehead_id = item.id(); \n\n if ((_voucher.checked) && \n (item.rawValue("tehead_status") == 'A') &&\n (item.rawValue("vouchered") == 0))\n {\n q = toolbox.executeDbQuery("timeexpensesheets", "voucher", params ); \n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback();\n return;\n }\n }\n\n if ((_post.checked) && \n (item.rawValue("tehead_status") == 'A') &&\n (item.rawValue("posted") == 0))\n {\n if (metrics.value("PrjLaborAndOverhead") - 0 <= 0)\n {\n QMessageBox.critical(mywindow, qsTr("Setup Error"),\n qsTr("No Labor and Overhead Account defined in CRM Setup."));\n {\n toolbox.executeRollback();\n return;\n }\n }\n\n params.phrase1 = qsTr("Post Time Sheet for ");\n params.phrase2 = qsTr(" to Project");\n\n q = toolbox.executeDbQuery("timeexpensesheets", "post", params ); \n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback();\n return;\n }\n } \n }\n\n toolbox.executeCommit();\n\n if (_invoice.checked)\n mainwindow.invoicesUpdated(1, true);\n\n if (_voucher.checked)\n mainwindow.vouchersUpdated();\n\n if (_post.checked)\n mainwindow.glSeriesUpdated();\n\n xtte.timeExpenseSheets.fillList();\n}\n\nxtte.timeExpenseSheets.processSheets = function(selected, invoice, voucher, post)\n{\n toolbox.executeBegin();\n if (invoice)\n { \n // Create an array so invoices can be consolidated\n var ids = [];\n for (var i = 0; i < selected.length; i++)\n ids[i] = selected[i].id();\n \n var params = new Object();\n params.tehead_ids = ids; \n\n q = toolbox.executeDbQuery("timeexpensesheets", "invoice", params ); \n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback();\n return false;\n }\n }\n\n for (var i = 0; i < selected.length; i++)\n {\n var params = new Object();\n params.tehead_id = selected[i].id(); \n\n if (voucher)\n {\n q = toolbox.executeDbQuery("timeexpensesheets", "voucher", params ); \n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback();\n return false;\n }\n }\n\n if (post)\n {\n if (metrics.value("PrjLaborAndOverhead") - 0 <= 0)\n {\n QMessageBox.critical(mywindow, qsTr("Setup Error"),\n qsTr("No Labor and Overhead Account defined in CRM Setup."));\n {\n toolbox.executeRollback();\n return false;\n }\n }\n\n params.phrase1 = qsTr("Post Time Sheet for ");\n params.phrase2 = qsTr(" to Project");\n\n q = toolbox.executeDbQuery("timeexpensesheets", "post", params ); \n if (!xtte.errorCheck(q))\n {\n toolbox.executeRollback(); \n return false;\n }\n }\n }\n \n toolbox.executeCommit();\n\n if (invoice)\n mainwindow.invoicesUpdated(1, true);\n\n if (voucher)\n mainwindow.vouchersUpdated();\n\n if (post)\n mainwindow.glSeriesUpdated();\n\n xtte.timeExpenseSheets.fillList(); \n \n return true;\n}\n\nxtte.timeExpenseSheets.deleteSheet = function()\n{\n var msg = qsTr("This action can not be undone. Are you sure you want to delete this sheet?");\n if (QMessageBox.question( mywindow, mywindow.windowTitle, msg, \n QMessageBox.Yes | QMessageBox.Escape, QMessageBox.No | QMessageBox.Default) == QMessageBox.Yes)\n {\n var params = new Object();\n params.tehead_id = _sheets.id(); \n\n toolbox.executeDbQuery("timeexpensesheet", "deltehead", params );\n\n xtte.timeExpenseSheets.fillList();\n }\n}\n\nxtte.timeExpenseSheets.closeSheet = function()\n{\n var msg = qsTr("This action can not be undone. Are you sure you want to close this sheet?");\n if (QMessageBox.question( mywindow, mywindow.windowTitle, msg, \n QMessageBox.Yes | QMessageBox.Escape, QMessageBox.No | QMessageBox.Default) == QMessageBox.Yes)\n {\n var params = new Object();\n params.tehead_id = _sheets.id(); \n\n q = toolbox.executeDbQuery("timeexpensesheets", "close", params ); \n if (xtte.errorCheck(q))\n xtte.timeExpenseSheets.fillList(); \n }\n}\n\nxtte.timeExpenseSheets.editSheet = function()\n{\n if (_sheets.currentItem().rawValue("tehead_status") == 'O')\n xtte.timeExpenseSheets.openSheet(xtte.editMode);\n else\n xtte.timeExpenseSheets.openSheet(xtte.viewMode);\n}\n\nxtte.timeExpenseSheets.newSheet = function()\n{\n xtte.timeExpenseSheets.openSheet(xtte.newMode);\n}\n\nxtte.timeExpenseSheets.viewSheet = function()\n{\n xtte.timeExpenseSheets.openSheet(xtte.viewMode);\n}\n\nxtte.timeExpenseSheets.openSheet = function(mode)\n{\n var params = new Object();\n params.mode = mode;\n if (mode) // Not new\n params.tehead_id = _sheets.id();\n else // New\n {\n if (_selected)\n params.emp_id = _employee.id();\n }\n\n var te = toolbox.openWindow("timeExpenseSheet", mywindow, Qt.ApplicationModal);\n toolbox.lastWindow().set(params);\n te.exec();\n xtte.timeExpenseSheets.fillList();\n}\n\nxtte.timeExpenseSheets.getParams = function()\n{\n params = new Object();\n\n if (!_open.checked &&\n !_approved.checked &&\n !_closed.checked)\n {\n params.statusList = "";\n return params;\n }\n\n params.startDate = _weekending.startDate;\n params.endDate = _weekending.endDate;\n if (!_showAllEmployees.checked)\n params.emp_id = _employee.id();\n\n var statusList = [];\n var num = 0;\n \n if (_open.checked)\n {\n statusList[num] = "'O'";\n num = num + 1;\n }\n if (_approved.checked)\n {\n statusList[num] = "'A'";\n num = num + 1;\n }\n if (_closed.checked)\n statusList[num] = "'C'";\n \n params.statusList = statusList.toString();\n params.approved = qsTr("Approved");\n params.closed = qsTr("Closed");\n params.open = qsTr("Open");\n params.yes = qsTr("Yes");\n params.no = qsTr("No");\n params.na = qsTr("N/A");\n\n return params;\n}\n\n\nxtte.timeExpenseSheets.fillList = function()\n{ \n var params = xtte.timeExpenseSheets.getParams();\n if (!params.statusList.length)\n return;\n\n q = toolbox.executeDbQuery("timeexpensesheets","detail", params);\n\n _sheets.populate(q);\n if (!xtte.errorCheck(q))\n return;\n}\n\nxtte.timeExpenseSheets.printSheet = function()\n{\n params = xtte.timeExpenseSheets.getParams();\n params.tehead_id = _sheets.id();\n toolbox.printReport("TimeExpenseSheet",params);\n}\n\nxtte.timeExpenseSheets.printReport = function()\n{\n var params = xtte.timeExpenseSheets.getParams();\n params.includeFormatted = true;\n\n toolbox.printReport("TimeExpenseSheets",params);\n}\n\nxtte.timeExpenseSheets.populateEmployees = function()\n{\n // getEffectiveXtUser and crmacct_emp_id were created in the same release\n var q = toolbox.executeQuery("SELECT crmacct_emp_id AS emp_id"\n + " FROM crmacct "\n + " WHERE crmacct_usr_username = getEffectiveXtUser();");\n // if they don't exist, try the older relationship maintained in the emp table\n if (q.lastError().type != QSqlError.NoError)\n q = toolbox.executeQuery("SELECT emp_id "\n + " FROM emp "\n + " WHERE emp_username = CURRENT_USER;");\n\n if (q.first()) \n _employee.setId(q.value("emp_id"));\n\n if (privileges.check("MaintainTimeExpenseOthers"))\n _showAllEmployees.visible = true;\n else\n {\n _showAllEmployees.visible = false;\n _employee.enabled = false;\n if (privileges.check("MaintainTimeExpenseSelf"))\n {\n if (_employee.id() == -1)\n QMessageBox.critical(mywindow, mywindow.windowTitle, \n qsTr("It appears that your current user isn't an active employee.") ); \n }\n else\n {\n QMessageBox.critical(mywindow, qsTr("Permissions Error"),\n qsTr("You do not have permissions to maintain time and expense entries"));\n if (mywindow.windowModality)\n mydialog.reject();\n else\n mywindow.close();\n }\n }\n}\n\n// Initialize\n_weekending.setStartNull(qsTr("Earliest"), startOfTime, true);\n_weekending.setEndNull(qsTr("Latest"), endOfTime, true);\n\n_approve.enabled = privileges.check("CanApprove");\n_selected.checked = true;\n_showAllEmployees.visible = false;\n\nif (!privileges.check("allowInvoicing"))\n{\n _invoice.forgetful = true;\n _invoice.checked = false;\n _invoice.enabled = false;\n}\n\nif (!privileges.check("allowVouchering"))\n{\n _voucher.forgetful = true;\n _voucher.checked = false;\n _voucher.enabled = false;\n}\n\nif (!privileges.check("PostTimeSheets"))\n{\n _post.forgetful = true;\n _post.checked = false;\n _post.enabled = false;\n}\n\n// Make connections\n_new.triggered.connect(xtte.timeExpenseSheets.newSheet);\n_close.triggered.connect(mywindow, "close");\n_approve.triggered.connect(xtte.timeExpenseSheets.approve);\n_process.triggered.connect(xtte.timeExpenseSheets.process);\n_print.triggered.connect(xtte.timeExpenseSheets.printReport);\n_query.triggered.connect(xtte.timeExpenseSheets.fillList);\n\n_showAllEmployees["toggled(bool)"].connect(_employee["setDisabled(bool)"]);\n_employee["newId(int)"].connect(xtte.timeExpenseSheets.fillList);\n\nmainwindow.invoicesUpdated.connect(xtte.timeExpenseSheets.fillList);\nmainwindow.vouchersUpdated.connect(xtte.timeExpenseSheets.fillList);\n\n_sheets["populateMenu(QMenu *, XTreeWidgetItem *, int)"].connect(xtte.timeExpenseSheets.populateMenu);\nif (privileges.check("MaintainTimeExpense"))\n _sheets.itemSelected.connect(xtte.timeExpenseSheets.editSheet);\nelse\n{\n _new.enabled = false;\n _sheets.itemSelected.connect(xtte.timeExpenseSheets.viewSheet);\n}\n\nxtte.timeExpenseSheets.populateEmployees();\n Time and Expense package 315 customer 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\nxtte.customer = new Object;\n\n\nif (privileges.check("CanViewRates"))\n{\n var _custid = -1;\n var _creditGroup = mywindow.findChild("_creditGroup");\n var _layout = toolbox.widgetGetLayout(_creditGroup);\n var _tecustomer = toolbox.loadUi("tecustomer", mywindow);\n var groupBox_3 = mywindow.findChild("groupBox_3");\n var groupBox_4 = mywindow.findChild("groupBox_4");\n var _creditStatusGroup = mywindow.findChild("_creditStatusGroup");\n\n _layout.addWidget(_tecustomer, 0, 0, 1, 3);\n _layout.addWidget(groupBox_4, 1, 0, 1, 1);\n _layout.addWidget(_creditStatusGroup, 1, 1, 1, 1);\n _layout.addWidget(groupBox_3, 1, 2, 1, 1);\n _layout.addWidget(_creditGroup, 2, 0, 1, 3);\n\n var _number = mywindow.findChild("_number");\n var _blanketPos = mywindow.findChild("_blanketPos");\n var _billingGroup = mywindow.findChild("_billingGroup");\n var _rate = _tecustomer.findChild("_rate");\n var _tecustrateid = -1;\n var _basecurrid = _rate.id();\n\n xtte.customer.modeChanged = function(mode)\n {\n _billingGroup.enabled = (mode == mainwindow.cNew || mode == mainwindow.cEdit);\n }\n\n xtte.customer.save = function()\n {\n\n var params = new Object();\n params.tecustrate_id = _tecustrateid;\n params.cust_id = _custid;\n params.curr_id = _rate.id();\n params.rate = _rate.localValue;\n\n var query = "updtecustrate";\n if (!_billingGroup.checked)\n query = "deltecustrate";\n else if (_tecustrateid == -1)\n query = "instecustrate";\n\n var q = toolbox.executeDbQuery("customer", query, params);\n if (q.first())\n _tecustrateid = q.value("tecustrate_id");\n else\n xtte.errorCheck(q);\n }\n\n xtte.customer.populate = function(custId)\n {\n if (_custid == custId)\n return;\n\n _custid = custId;\n\n var params = new Object();\n params.cust_id = _custid;\n\n var q = toolbox.executeDbQuery("customer", "seltecustrate", params);\n\n if (q.first())\n {\n _billingGroup.checked = true;\n _tecustrateid = q.value("tecustrate_id");\n _rate.setId(q.value("tecustrate_curr_id"));\n _rate.localValue = q.value("tecustrate_rate");\n return;\n }\n else\n xtte.errorCheck(q);\n\n _billingGroup.checked = false;\n _tecustrateid = -1;\n _rate.setId(_basecurrid);\n _rate.localValue = 0;\n }\n\n // Initialize\n QWidget.setTabOrder(_blanketPos, _rate);\n\n mywindow["newId(int)"].connect(xtte.customer.populate);\n mywindow["newMode(int)"].connect(xtte.customer.modeChanged);\n mywindow["saved(int)"].connect(xtte.customer.save);\n\n xtte.customer.populate();\n}\n Time and Expense package 317 employee 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\nxtte.employee = new Object;\n\nvar _externalRate = mywindow.findChild("_externalRate"); \nvar _layout = toolbox.widgetGetLayout(_externalRate);\nvar _contractor = toolbox.createWidget("QCheckBox", mywindow, "_contractor");\n_contractor.text = qsTr("Contractor");\n\n_layout.addWidget(_contractor, 1, 4);\n\nvar _teempid = -1; \nvar _empid = -1;\n\nset = function(input)\n{\n if("emp_id" in input)\n {\n _empid = input.emp_id;\n xtte.employee.populate();\n }\n\n if("mode" in input)\n {\n if (input.mode == "view")\n _contractor.enabled = false;\n }\n\n return mainwindow.NoError;\n}\n\nxtte.employee.save = function(empId)\n{\n if (empId <= 0)\n return;\n\n var params = new Object();\n params.teemp_id\t= _teempid;\n params.emp_id\t= empId;\n params.contractor\t= _contractor.checked;\n\n var query = "updteemp";\n if (_teempid == -1)\n query = "insteemp";\n\n var q = toolbox.executeDbQuery("employee", query, params);\n xtte.errorCheck(q);\n}\n\nxtte.employee.populate = function()\n{\n var params = new Object();\n params.emp_id = _empid; \n\n var q = toolbox.executeDbQuery("employee", "selteemp", params);\n\n if (q.first())\n {\n _teempid = q.value("teemp_id");\n _contractor.checked = (q.value("teemp_contractor"));\n }\n else\n xtte.errorCheck(q);\n}\n\nmydialog["finished(int)"].connect(xtte.employee.save);\n\n\n Time and Expense package 325 tebilling 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _item\t\t= mywindow.findChild("_item");\n\n_item.populate("select item_id,item_number,item_descrip1,item_listprice from item where item_sold = true and item_active = true and item_type = 'R'");\n\n Time and Expense package 318 initMenu 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\nxtte.initMenu = new Object;\n\n// Define menu and action variables\nvar crmMenu = mainwindow.findChild("menu.crm.projects");\ncrmMenu.addSeparator();\n\nvar tesheetAction = crmMenu.addAction(qsTr("Time and Expense..."), mainwindow);\ntesheetAction.objectName = "pm.teSheets";\ntesheetAction.setData("MaintainTimeExpense");\ntesheetAction.enabled = privileges.value("MaintainTimeExpense");\n\nvar crmRptMenu = mainwindow.findChild("menu.crm.reports");\nvar orderActPrj = mainwindow.findChild("pm.dspOrderActivityByProject");\n\nvar historyAction = new QAction(qsTr("Time and Expense History"), mainwindow);\nhistoryAction.objectName = "pm.teHistory";\nhistoryAction.setData("ViewTimeExpenseHistory");\nhistoryAction.enabled = privileges.value("ViewTimeExpenseHistory");\ncrmRptMenu.insertAction(orderActPrj, historyAction);\n\n// Define function(s)\nxtte.initMenu.openSheets = function()\n{\n toolbox.openWindow("timeExpenseSheets");\n}\n\nxtte.initMenu.openHistory = function()\n{\n toolbox.openWindow("dspTimeExpenseHistory");\n}\n\n// Connect Actions\ntesheetAction.triggered.connect(xtte.initMenu.openSheets);\nhistoryAction.triggered.connect(xtte.initMenu.openHistory);\n Time and Expense package 319 item 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\nxtte.item = new Object;\n\nvar _tab = mywindow.findChild("_tab"); \nvar _expensePage = toolbox.loadUi("teexpense", mywindow);\n_tab.insertTab(2, _expensePage, "Project");\n\nvar _projectExpense = mywindow.findChild("_projectExpense");\nvar _itemtype = mywindow.findChild("_itemtype");\nvar _close = mywindow.findChild("_close");\nvar _description = mywindow.findChild("_description");\nvar _account = mywindow.findChild("_account");\nvar _expcat = mywindow.findChild("_expcat");\nvar _accountSelected = mywindow.findChild("_accountSelected");\nvar _expcatSelected = mywindow.findChild("_expcatSelected");\nvar _allowExpenseGroup = mywindow.findChild("_allowExpenseGroup");\nvar _inventoryUOM = mywindow.findChild("_inventoryUOM");\nvar _save = mywindow.findChild("_save");\n\nvar _saved = false;\nvar _isnew = true;\n\nxtte.item.clickswitch = function()\n{\n if(_accountSelected.checked)\n {\n _account.enabled = true;\n _expcat.enabled = false;\n _expcat.setId(-1);\n }\n else\n {\n _account.enabled = false;\n _expcat.enabled = true;\n _account.setId(-1);\n }\n}\n\nxtte.item.save = function(id)\n{\n var params = new Object;\n params.item_id = id;\n params.expcat_id = _expcat.id();\n params.accnt_id = _account.id();\n\n var query = "updteexp";\n if (!_projectExpense.checked)\n query = "delteexp";\n else if (_isnew)\n query = "insteexp";\n\n var q = toolbox.executeDbQuery("item", query, params);\n xtte.errorCheck(q);\n}\n\nxtte.item.populate = function(itemId)\n{\n var params = new Object;\n params.item_id = itemId;\n\n var q = toolbox.executeDbQuery("item", "selteexp", params);\n\n if (q.first())\n {\n _projectExpense.checked = true;\n _expcat.setId(q.value("teexp_expcat_id"));\n _account.setId(q.value("teexp_accnt_id"));\n\n if(_account.id() > 0)\n _accountSelected.checked = true;\n else\n _expcatSelected.checked = true;\n\n _isnew = false;\n }\n else if (!xtte.errorCheck(q))\n return\n else\n {\n _projectExpense.checked = false;\n _isnew = true;\n }\n\n xtte.item.handleExpense();\n}\n\nxtte.item.handleExpense = function()\n{\n _tab.setTabEnabled(_tab.indexOf(_expensePage), _itemtype.currentIndex == 3);\n}\n\nxtte.item.checkSave = function()\n{\n if (_projectExpense.checked == true &&\n !_expcat.isValid() && \n !_account.isValid())\n {\n QMessageBox.critical(mywindow,\n qsTr("Can not save item"),\n qsTr("You must select a G/L Account or an expense account for Project Expense Items."));\n }\n else\n mywindow.sSave();\n}\n\n// Initialize\n_expcat.enabled = false;\n_account.setType(0x01 | 0x02 | 0x04); // Asset, Liability, Expense\n\n// Connections\ntoolbox.coreDisconnect(_save, "clicked()", mywindow, "sSave()"); \n_save.clicked.connect(xtte.item.checkSave);\nmywindow["saved(int)"].connect(xtte.item.save);\nmywindow["newId(int)"].connect(xtte.item.populate);\n_accountSelected.toggled.connect(xtte.item.clickswitch);\n_expcatSelected.toggled.connect(xtte.item.clickswitch);\n_itemtype['currentIndexChanged(QString)'].connect(xtte.item.handleExpense);\n_inventoryUOM.newID.connect(xtte.item.handleExpense);\n\n Time and Expense package 321 jsGanttCSS 0 t ..gantt { font-family:tahoma, arial, verdana; font-size:10px;}\n\n..gdatehead { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; HEIGHT: 18px }\n\n..ghead { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 24px; HEIGHT: 20px }\n\n..gname { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; WIDTH: 18px; HEIGHT: 18px }\n\n..ghead A { FONT-SIZE: 10px; COLOR: #000000; TEXT-DECORATION: none }\n\n..gheadwkend A { FONT-SIZE: 10px; COLOR: #000000; TEXT-DECORATION: none }\n\n..gheadwkend { BORDER-TOP: #efefef 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #efefef 1px solid; WIDTH: 24px; HEIGHT: 20px; background-color: #cfcfcf }\n\n..gfiller { BORDER-TOP: #efefef 1px solid; BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px }\n\n..gfillerwkend { BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px; BACKGROUND-COLOR: #cfcfcf }\n\n..gitem { BORDER-TOP: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px }\n\n..gitemwkend { BORDER-TOP: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px }\n\n..gmilestone {\tBORDER-TOP: #efefef 1px solid; FONT-SIZE: 14px; OVERFLOW: hidden; BORDER-LEFT: #efefef 1px solid; WIDTH: 18px; HEIGHT: 18px}\n\n..gmilestonewkend {\tBORDER-TOP: #efefef 1px solid; BORDER-LEFT: #cccccc 1px solid; WIDTH: 18px; HEIGHT: 18px}\n\n..btn { BORDER-RIGHT: #ffffff; BORDER-TOP: #ffffff; FONT-WEIGHT: bold; FONT-SIZE: 10px; BORDER-LEFT: #ffffff; WIDTH: 12px; COLOR: #cccccc; BORDER-BOTTOM: #ffffff; BACKGROUND-COLOR: #ffffff }\n\n..hrcomplete { BORDER-RIGHT: #000000 2px solid; PADDING-RIGHT: 0px; BORDER-TOP: #000000 2px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: #000000 2px solid; WIDTH: 20px; COLOR: #000000; PADDING-TOP: 0px; BORDER-BOTTOM: #000000 2px solid; HEIGHT: 4px }\n\n..hrhalfcomplete { BORDER-RIGHT: #000000 2px solid; BORDER-TOP: #000000 2px solid; BORDER-LEFT: #000000 2px solid; WIDTH: 9px; COLOR: #000000; BORDER-BOTTOM: #000000 2px solid; HEIGHT: 4px }\n\n..gweekend { font-family:tahoma, arial, verdana; font-size:11px; background-color:#EEEEEE; text-align:center; }\n\n..gtask { font-family:tahoma, arial, verdana; font-size:11px; background-color:#00FF00; text-align:center; }\n\n..gday { font-family:tahoma, arial, verdana; font-size:11px; text-align:center; }\n\n..gcomplete { background-color:black; height:5px; overflow: auto; margin-top:4px; }\n\nDIV.scroll { BORDER-RIGHT: #efefef 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #efefef 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; BORDER-LEFT: #efefef 1px solid; WIDTH: 420px; PADDING-TOP: 0px; BORDER-BOTTOM: #efefef 1px solid; BACKGROUND-COLOR: #ffffff }\n\nDIV.scroll2 { position:relative; PADDING-RIGHT: 0px; overflow:auto ;overflow-x:scroll;overflow-y:hidden; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; WIDTH: 482px; PADDING-TOP: 0px; BACKGROUND-COLOR: #ffffff }\n\n Time and Expense package 324 task 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("xtte");\nxtte.task = new Object;\n\nvar _tab = mywindow.findChild("_tab"); \nvar _tebilling = toolbox.loadUi("tebilling", mywindow);\n_tab.insertTab(2, _tebilling, qsTr("Billing"));\n_tab.setEnabled(2, privileges.check("CanViewRates"));\n\nvar _number = mywindow.findChild("_number");\nvar _actualHours = mywindow.findChild("_actualHours");\nvar _actualExp = mywindow.findChild("_actualExp");\nvar _billingGroup = _tebilling.findChild("_billingGroup");\nvar _itemGroup = _tebilling.findChild("_itemGroup");\nvar _cust = _tebilling.findChild("_cust");\nvar _rate = _tebilling.findChild("_rate");\nvar _item = _tebilling.findChild("_item");\nvar _useItem = _tebilling.findChild("_useItem");\nvar _teprjtaskid = -1; \nvar _prjtaskid = -1;\n\nset = function(input)\n{\n if("prjtask_id" in input)\n {\n _prjtaskid = input.prjtask_id;\n xtte.task.populate();\n }\n\n if("cust_id" in input)\n {\n _cust.setId(input.cust_id);\n _cust.enabled = false;\n }\n\n if("mode" in input)\n {\n if (input.mode == "view")\n {\n _cust.enabled = false;\n _billingGroup.enabled = false;\n _itemGroup.enabled = false;\n }\n }\n\n return mainwindow.NoError;\n}\n\nxtte.task.save = function(prjtaskId)\n{\n if (prjtaskId <= 0)\n return;\n\n var params = new Object();\n params.teprjtask_id\t= _teprjtaskid;\n params.prjtask_id\t= prjtaskId;\n if (_cust.isValid())\n params.cust_id \t= _cust.id();\n if (_billingGroup.checked)\n {\n params.rate\t= _rate.localValue;\n params.curr_id\t= _rate.id();\n }\n if (_useItem.checked && _item.isValid())\n params.item_id\t= _item.id()\n\n var query = "updteprjtask";\n if (_teprjtaskid == -1)\n query = "insteprjtask";\n\n var q = toolbox.executeDbQuery("task", query, params);\n xtte.errorCheck(q);\n}\n\nxtte.task.populate = function()\n{\n var params = new Object();\n params.prjtask_id = _prjtaskid; \n\n var q = toolbox.executeDbQuery("task", "selteprjtask", params);\n\n if (q.first())\n {\n _teprjtaskid = q.value("teprjtask_id");\n\n if (!_cust.isValid())\n _cust.setId(q.value("cust_id"));\n\n if (q.value("curr_id") == -1)\n _billingGroup.checked = false;\n else\n {\n _billingGroup.checked = true;\n _rate.setId(q.value("curr_id"));\n _rate.localValue = q.value("teprjtask_rate");\n }\n\n if (q.value("item_id") == -1)\n _useItem.checked = false;\n else\n {\n _useItem.checked = true;\n _item.setId(q.value("item_id"));\n }\n }\n else\n xtte.errorCheck(q);\n}\n\n// Initialize\n_item.setQuery(xtte.itemSql);\n_useItem.checked = false;\n\n// Connections\nmydialog["finished(int)"].connect(xtte.task.save);\n\n Time and Expense package 329 xtte 0 t /*\n * This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar xtte;\nif (!xtte)\n xtte = new Object;\n\nxtte.itemSql = "SELECT item_id,item_number,item_descrip1,item_descrip2, "\n + " item_type,item_config,item_upccode, item_active,uom_name "\n + "FROM item JOIN uom ON (uom_id=item_inv_uom_id) "\n + " JOIN te.teexp ON (teexp_id=item_id) "\n + "WHERE item_type='R' "\n\nxtte.newMode \t= 0;\nxtte.editMode\t= 1;\nxtte.viewMode\t= 2;\n\nxtte.errorCheck = function (q)\n{\n if (q.lastError().type != QSqlError.NoError)\n {\n QMessageBox.critical(mywindow,\n qsTr("Database Error"), q.lastError().text);\n return false;\n }\n\n return true;\n}\n Time and Expense package \. -- -- Data for Name: pkguiform; Type: TABLE DATA; Schema: te; Owner: admin -- COPY pkguiform (uiform_id, uiform_name, uiform_order, uiform_enabled, uiform_source, uiform_notes) FROM stdin; 166 dspTimeExpenseHistory 0 t \n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n dspTimeExpenseHistory\n \n \n \n 0\n 0\n 800\n 600\n \n \n \n Time and Expense History\n \n \n \n \n \n \n \n \n \n \n Close\n \n \n \n \n \n \n Query\n \n \n \n \n \n \n Print\n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 20\n 0\n \n \n \n \n \n \n \n \n \n \n 0\n 1\n \n \n \n QFrame::NoFrame\n \n \n QFrame::Raised\n \n \n \n 0\n \n \n \n \n Time Sheet Items\n \n \n \n \n \n \n false\n \n \n \n \n \n \n \n \n \n \n ParameterWidget\n QWidget\n

parameterwidget.h
\n \n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n 1\n
\n \n \n \n\n Time and Expense package 168 tebilling 0 t \n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n tebilling\n \n \n \n 0\n 0\n 396\n 334\n \n \n \n Billing\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n false\n \n \n Qt::Horizontal\n \n \n \n \n \n \n \n \n \n \n 0\n 1\n \n \n \n Use specified billing rate\n \n \n true\n \n \n false\n \n \n \n \n \n Rate:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 112\n 20\n \n \n \n \n \n \n \n \n \n \n 0\n \n \n \n \n \n \n Qt::Horizontal\n \n \n QSizePolicy::Fixed\n \n \n \n 12\n 10\n \n \n \n \n \n \n \n Qt::StrongFocus\n \n \n Use Specified item\n \n \n true\n \n \n \n \n \n \n \n \n \n 0\n 130\n \n \n \n \n \n \n false\n \n \n false\n \n \n \n \n \n true\n \n \n true\n \n \n \n \n \n \n \n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 20\n 0\n \n \n \n \n \n \n \n \n \n qPixmapFromMimeSource\n \n \n CurrCluster\n CurrDisplay\n
currcluster.h
\n
\n \n CurrDisplay\n QWidget\n
currcluster.h
\n
\n \n CustCluster\n QWidget\n
custcluster.h
\n
\n \n ItemCluster\n QWidget\n
itemcluster.h
\n 1\n
\n
\n \n _rate\n \n \n \n \n _billingGroup\n toggled(bool)\n _rate\n setCurrencyEnabled(bool)\n \n \n 210\n 133\n \n \n 167\n 142\n \n \n \n \n _useItem\n toggled(bool)\n _item\n setEnabled(bool)\n \n \n 200\n 189\n \n \n 196\n 250\n \n \n \n \n
\n Time and Expense package 170 teexpense 0 t \n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n teexpense\n \n \n \n 0\n 0\n 373\n 161\n \n \n \n \n 0\n 0\n \n \n \n \n 0\n 0\n \n \n \n Expense Item Setup\n \n \n \n \n \n 4\n \n \n \n \n \n \n Qt::Horizontal\n \n \n QSizePolicy::Fixed\n \n \n \n 10\n 20\n \n \n \n \n \n \n \n Allow use as Expense Item on Projects\n \n \n false\n \n \n \n \n \n \n \n \n false\n \n \n \n \n \n false\n \n \n \n \n \n \n \n \n \n Account\n \n \n true\n \n \n \n \n \n \n Expense Category\n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n Qt::StrongFocus\n \n \n \n \n \n false\n \n \n Qt::Horizontal\n \n \n false\n \n \n true\n \n \n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 20\n 0\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n qPixmapFromMimeSource\n \n \n ExpenseCluster\n QWidget\n
expensecluster.h
\n
\n \n GLCluster\n QWidget\n
glcluster.h
\n
\n
\n \n _accountSelected\n _account\n _expcatSelected\n \n \n \n \n _accountSelected\n toggled(bool)\n _account\n setEnabled(bool)\n \n \n 75\n 64\n \n \n 283\n 68\n \n \n \n \n _expcatSelected\n toggled(bool)\n _expcat\n setEnabled(bool)\n \n \n 130\n 126\n \n \n 448\n 140\n \n \n \n \n _projectExpense\n toggled(bool)\n _allowExpenseGroup\n setEnabled(bool)\n \n \n 196\n 25\n \n \n 186\n 96\n \n \n \n \n
\n Time and Expense package 171 timeExpenseSheet 0 t \n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n timeExpenseSheet\n \n \n \n 0\n 0\n 800\n 600\n \n \n \n \n 775\n 400\n \n \n \n Time and Expense\n \n \n \n \n \n 12\n \n \n \n \n Sheet #:\n \n \n \n \n \n \n ...\n \n \n \n \n \n \n Qt::Horizontal\n \n \n QSizePolicy::Expanding\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n QDialogButtonBox::Cancel|QDialogButtonBox::Save\n \n \n \n \n \n \n \n \n true\n \n \n 0\n \n \n \n S&heet\n \n \n \n \n \n \n \n Week of Date:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n true\n \n \n \n 0\n 0\n \n \n \n Qt::StrongFocus\n \n \n XDateEdit::None\n \n \n \n \n \n \n Site:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n 3\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n \n 200\n 16777215\n \n \n \n \n \n \n \n Employee:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n 3\n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n Qt::StrongFocus\n \n \n false\n \n \n true\n \n \n \n \n \n \n \n \n false\n \n \n &New\n \n \n \n \n \n \n false\n \n \n &Edit\n \n \n true\n \n \n \n \n \n \n false\n \n \n &View\n \n \n true\n \n \n \n \n \n \n false\n \n \n &Delete\n \n \n true\n \n \n \n \n \n \n Qt::Vertical\n \n \n QSizePolicy::Expanding\n \n \n \n 20\n 20\n \n \n \n \n \n \n \n \n \n \n Notes\n \n \n \n \n \n Qt::ClickFocus\n \n \n \n \n \n \n \n Documents\n \n \n \n \n \n Documents::TimeExpense\n \n \n \n \n \n \n \n \n \n \n Print on Save\n \n \n \n \n \n \n qPixmapFromMimeSource\n \n \n DLineEdit\n QWidget\n
datecluster.h
\n 1\n
\n \n Documents\n QWidget\n
documents.h
\n
\n \n EmpCluster\n QWidget\n
empcluster.h
\n
\n \n WComboBox\n XComboBox\n
wcombobox.h
\n
\n \n XCheckBox\n QCheckBox\n
xcheckbox.h
\n
\n \n XComboBox\n QComboBox\n
xcombobox.h
\n
\n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n 1\n
\n
\n \n \n
\n Time and Expense package 172 timeExpenseSheetItem 0 t \n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2011 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n timeExpenseSheetItem\n \n \n \n 0\n 0\n 825\n 626\n \n \n \n Time and Expense\n \n \n false\n \n \n Time and Expense\n \n \n \n \n \n \n \n Sheet:\n \n \n \n \n \n \n \n 80\n 0\n \n \n \n \n \n \n \n Line #:\n \n \n \n \n \n \n \n 80\n 0\n \n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 19\n 20\n \n \n \n \n \n \n \n \n \n Qt::Vertical\n \n \n QDialogButtonBox::Cancel|QDialogButtonBox::Save\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n \n \n \n \n \n \n \n \n \n \n Week of:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n Qt::NoFocus\n \n \n XDateEdit::Empty\n \n \n \n \n \n \n Work Date:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n Project #:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n Qt::StrongFocus\n \n \n \n \n \n true\n \n \n Qt::Horizontal\n \n \n false\n \n \n false\n \n \n \n \n \n \n \n \n Qt::StrongFocus\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n Task:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n Qt::StrongFocus\n \n \n QComboBox::AdjustToContents\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 13\n \n \n \n \n \n \n \n \n \n Type:\n \n \n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Qt::StrongFocus\n \n \n CLineEdit::AllCustomers\n \n \n \n \n \n \n \n \n Cust. PO#:\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n Qt::StrongFocus\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 231\n 171\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Hours:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n Rate:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n Total:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n \n \n \n \n Employee:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n \n \n Qt::StrongFocus\n \n \n Billable\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 20\n \n \n \n \n \n \n \n \n \n \n \n Qt::StrongFocus\n \n \n timedtl_rate\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 20\n \n \n \n \n \n \n \n \n \n \n \n Qt::NoFocus\n \n \n false\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 20\n \n \n \n \n \n \n \n \n \n Qt::StrongFocus\n \n \n Prepaid (not reimbursable)\n \n \n \n \n \n \n Hourly Cost:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n false\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 20\n \n \n \n \n \n \n \n \n \n Total Cost:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n false\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 20\n \n \n \n \n \n \n \n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 20\n 0\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n \n \n \n Summary\n \n \n \n \n \n Task\n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 20\n \n \n \n \n \n \n \n \n \n Planned Hours:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n Qt::Vertical\n \n \n \n \n \n \n Planned Expense:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n Actual Hours:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n Actual Expense:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 20\n 0\n \n \n \n \n \n \n \n \n \n \n \n \n Employee\n \n \n \n \n \n \n \n \n \n \n \n Day Total:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n Sheet Total:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n Hours\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n Hours\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 20\n 0\n \n \n \n \n \n \n \n \n \n \n \n \n \n Notes\n \n \n \n \n \n Qt::StrongFocus\n \n \n true\n \n \n \n \n \n \n \n \n \n \n \n CurrCluster\n \n
currcluster.h
\n
\n \n CustCluster\n \n
custcluster.h
\n
\n \n DLineEdit\n \n
datecluster.h
\n 1\n
\n \n EmpCluster\n \n
empcluster.h
\n
\n \n ItemCluster\n \n
itemcluster.h
\n 1\n
\n \n ProjectCluster\n \n
projectcluster.h
\n
\n \n XComboBox\n \n
xcombobox.h
\n
\n \n XLabel\n \n
xlabel.h
\n
\n \n XLineEdit\n \n
xlineedit.h
\n 1\n
\n \n XTextEdit\n \n
xtextedit.h
\n
\n
\n \n _workdate\n _type\n _project\n _task\n _clients\n _po\n _items\n _employee\n _hours\n _billable\n _rate\n _prepaid\n _tab\n _notes\n _buttonBox\n \n \n \n \n _rate\n idChanged(int)\n _total\n setId(int)\n \n \n 598\n 292\n \n \n 598\n 330\n \n \n \n \n
\n Time and Expense package 173 timeExpenseSheets 0 t \n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n timeExpenseSheets\n \n \n \n 0\n 0\n 800\n 600\n \n \n \n \n 0\n 0\n \n \n \n \n 700\n 370\n \n \n \n Time and Expense Sheets\n \n \n \n 0\n \n \n 0\n \n \n \n \n true\n \n \n Qt::Horizontal\n \n \n Qt::ToolButtonIconOnly\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n QFrame::StyledPanel\n \n \n QFrame::Raised\n \n \n \n \n \n \n 301\n 111\n \n \n \n \n 0\n 0\n \n \n \n Employees\n \n \n \n \n \n \n \n All\n \n \n \n \n \n \n Qt::Horizontal\n \n \n QSizePolicy::Preferred\n \n \n \n 40\n 10\n \n \n \n \n \n \n \n \n \n \n \n Selected:\n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 10\n \n \n \n \n \n \n \n \n \n \n \n \n \n 253\n 111\n \n \n \n Week of\n \n \n \n 5\n \n \n \n \n \n \n \n \n \n \n Status\n \n \n \n \n \n Open\n \n \n \n \n \n \n Approved\n \n \n \n \n \n \n Closed\n \n \n \n \n \n \n \n \n \n \n \n \n QAbstractItemView::ExtendedSelection\n \n \n false\n \n \n \n \n \n \n 12\n \n \n 6\n \n \n \n \n When Processing:\n \n \n \n \n \n \n Invoice\n \n \n \n \n \n \n Voucher\n \n \n \n \n \n \n Post Time\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 0\n \n \n \n \n \n \n \n \n \n New\n \n \n Ctrl+N\n \n \n \n \n Close\n \n \n Ctrl+W\n \n \n \n \n Process\n \n \n Process Approved\n \n \n \n \n Approve\n \n \n Approve All\n \n \n \n \n Query\n \n \n Ctrl+R\n \n \n \n \n Print\n \n \n Ctrl+P\n \n \n \n \n \n DateCluster\n QWidget\n
datecluster.h
\n 1\n
\n \n EmpCluster\n QWidget\n
empcluster.h
\n
\n \n XCheckBox\n QCheckBox\n
xcheckbox.h
\n
\n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n 1\n
\n
\n \n \n
\n Time and Expense package 167 projectGantt 0 t \n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n projectGantt\n \n \n Qt::NonModal\n \n \n \n 0\n 0\n 800\n 600\n \n \n \n Project Gantt\n \n \n \n \n \n \n 0\n \n \n 0\n \n \n \n \n true\n \n \n Qt::Horizontal\n \n \n Qt::ToolButtonIconOnly\n \n \n \n \n \n \n \n \n Close\n \n \n Ctrl+W\n \n \n \n \n \n\n Time and Expense package 169 tecustomer 0 t \n\n This file is part of the xtte package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n tecustomer\n \n \n \n 0\n 0\n 323\n 91\n \n \n \n Billing\n \n \n \n 0\n \n \n 6\n \n \n 0\n \n \n 0\n \n \n \n \n \n 0\n 1\n \n \n \n Use specified billing rate\n \n \n true\n \n \n false\n \n \n \n \n \n Rate:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 41\n 20\n \n \n \n \n \n \n \n \n \n \n qPixmapFromMimeSource\n \n \n CurrCluster\n CurrDisplay\n
currcluster.h
\n
\n \n CurrDisplay\n QWidget\n
currcluster.h
\n
\n
\n \n _rate\n \n \n \n \n _billingGroup\n toggled(bool)\n _rate\n setCurrencyEnabled(bool)\n \n \n 210\n 133\n \n \n 167\n 142\n \n \n \n \n
\n Time and Expense package \. -- -- Data for Name: tecustrate; Type: TABLE DATA; Schema: te; Owner: admin -- COPY tecustrate (tecustrate_cust_id, tecustrate_rate, tecustrate_id, tecustrate_curr_id) FROM stdin; \. -- -- Data for Name: teemp; Type: TABLE DATA; Schema: te; Owner: admin -- COPY teemp (teemp_id, teemp_emp_id, teemp_contractor) FROM stdin; 1 1 f \. -- -- Data for Name: teexp; Type: TABLE DATA; Schema: te; Owner: admin -- COPY teexp (teexp_id, teexp_expcat_id, teexp_accnt_id) FROM stdin; 340 24 -1 343 23 -1 342 23 -1 \. -- -- Data for Name: tehead; Type: TABLE DATA; Schema: te; Owner: admin -- COPY tehead (tehead_id, tehead_number, tehead_weekending, tehead_lastupdated, tehead_notes, tehead_status, tehead_emp_id, tehead_warehous_id, tehead_username) FROM stdin; 1 1000 2010-12-30 2011-04-18 13:54:47.67733 C 1 35 admin 2 1001 2011-04-30 2011-04-18 13:54:54.12386 C 1 35 admin \. -- -- Data for Name: teitem; Type: TABLE DATA; Schema: te; Owner: admin -- COPY teitem (teitem_id, teitem_tehead_id, teitem_linenumber, teitem_type, teitem_workdate, teitem_cust_id, teitem_vend_id, teitem_po, teitem_item_id, teitem_qty, teitem_rate, teitem_total, teitem_prjtask_id, teitem_lastupdated, teitem_billable, teitem_prepaid, teitem_notes, teitem_posted, teitem_curr_id, teitem_uom_id, teitem_invcitem_id, teitem_vodist_id, teitem_postedvalue, teitem_empcost) FROM stdin; 2 1 2 E 2010-12-30 95 \N 342 1 275 275 1 2010-12-30 16:36:50.62973 t f f 1 4 142 331 0 \N 3 1 3 E 2010-12-30 95 \N 343 355 0.51 181.05 1 2010-12-30 16:37:11.330822 t f f 1 12 143 332 0 \N 1 1 1 T 2010-12-30 95 \N 340 18 175 3150 1 2010-12-30 16:36:28.916572 t f t 1 11 141 \N 900.00 \N 4 2 1 T 2011-04-30 123 \N 340 50 108.7 5435 6 2011-04-18 13:51:27.083176 t f t 2 11 150 \N 2500.00 \N \. -- -- Data for Name: teprj; Type: TABLE DATA; Schema: te; Owner: admin -- COPY teprj (teprj_id, teprj_prj_id, teprj_cust_id, teprj_rate, teprj_curr_id) FROM stdin; 1 4 \N \N \N 2 5 95 175 1 3 6 123 150 2 \. -- -- Data for Name: teprjtask; Type: TABLE DATA; Schema: te; Owner: admin -- COPY teprjtask (teprjtask_id, teprjtask_cust_id, teprjtask_rate, teprjtask_item_id, teprjtask_prjtask_id, teprjtask_curr_id) FROM stdin; 1 95 \N 340 1 \N 2 95 \N 340 2 \N 3 95 \N 340 3 \N 4 95 \N 340 4 \N 5 95 \N 340 5 \N 6 123 \N 340 6 \N 7 123 \N 340 7 \N \. SET search_path = xtdesktop, pg_catalog; -- -- Data for Name: pkgcmd; Type: TABLE DATA; Schema: xtdesktop; Owner: admin -- COPY pkgcmd (cmd_id, cmd_module, cmd_title, cmd_descrip, cmd_privname, cmd_executable, cmd_name) FROM stdin; \. -- -- Data for Name: pkgcmdarg; Type: TABLE DATA; Schema: xtdesktop; Owner: admin -- COPY pkgcmdarg (cmdarg_id, cmdarg_cmd_id, cmdarg_order, cmdarg_arg) FROM stdin; \. -- -- Data for Name: pkgimage; Type: TABLE DATA; Schema: xtdesktop; Owner: admin -- COPY pkgimage (image_id, image_name, image_descrip, image_data) FROM stdin; 6559 ImgLeftArrow begin 644 internal\nMB5!.1PT*&@H````-24A$4@```!`````0"`,````H+0]3````NE!,5$4```#_\nM___,S,R99@"MK:WSB;_;;::5BY(5#!6TA+3\\]/QE#&WAKO6[8^L:&2?DX_L$\nM!(0$!`P("!3T]/S#P\\2\\O]&BI*SBY.P$-,QRE/S+SM4P6:L&.9@:5L`82J,U\nM??P]:KM*>\\='6747-5XP68YJEI^BIHC9+0E7)\\Y:Z>2LMG,\nMV^T$:=@]>+@V9)A3B<-FB[:?O=VRR>/D[/4E3'(]=*Q*>:I[N?:9R_M#3%39\nMY_3:KCHZ`````7123E,`0.;89@````EP2%ES```+$P``"Q,!`)J<&````$])\nM1$%4&)5C8"`2&*+ST00,U5`%#%5M#>$`R%=1U0,"#3`R40'RC7010`TDH&-A\nM`(<6*B`M!D8(`!)@,#=2-8<#!HB(.9K#S-$%&#`$\\```;J02#'C$':4`````\n(245.1*Y"8(((\n`\nend\n 6560 gear_16 begin 644 internal\nMB5!.1PT*&@H````-24A$4@```!`````0"`8````?\\_]A````"7!(67,```L3\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M"L\\X+_`$:`/K)M=ST,QPG'62\\Y\nMBW>][QW$+]G/CY-[T%ZC,XO6EH"01C3!G%X\\ZK2_.YW3^5[W2DB87&G\\FFN%\nM99\\EKTGHM?>L!4^`-2"%XHI+KF"V-8O+',XXK/$8X]#:HK4A30U)JHE'";,S\nMZ_GH=7_.X3,>YH'!W<1I1AQGC,<91CO.:)Y)G"0DX^0_!T^,']=MNPK`VM6%\nM+ZQO<^JT:SWPBTH7SYDUSWE"C!5H8SEO^Z_S[DO?C3`"-!AMR3)#EAF21),D\nMFG&S&WBH>Q_#8*_#G(`]CBKY@"T`:W7Q+\\NPL8(C#X^-[0N@!5'"+`6%@:&9]J>-U_T)UQX\nMUF60@4L=::I7E(_CE-$H9:D_X*;'O\\(CQW[*8)#2ZXWH]H8$NL*EFR]G,EC'\nM0P6,Z!O'D#*4.$*B$!Y6K(P")+EI`FJE1"17U"\nMVR2L3"'$@(B`4GV&I@?NQ"F?E%1>_GX?VW7/!,.F]\nM2H=6C(,LGZ^+Z4D;0Y(&*"614E`+Z[QBPX5G2^\\?'5B>S.?\\A[&@1_Z1R?TF**:FT2[Q6&,D$QR!LB`A7BG^X"-0,IFFGQ*U,7O1QMGK7DY--?COW;=QYY.W[^[U!G^5[G8W!]/"\nMSE_?.WXFMG8%0-M[]DC?L7&WDX^2;G4N?H[Q\\EGGR\\][D-[3!>"A8EW&07I<\nMZX6_*R&Y9LEQ3D`8392FF`IFF(PF:`4M%KM+?&/?O_EG%O?,=P?=_W!C_X6%\nMSPT>GWA[E?;U\\7%#O0#X[M_F2@A!S3EJSU+J>^?+SBQP'X/_O\\!K`$\nI-(G$))$(!2+%N:X?H['^_O_]*_X'!HIY!5TY']L`````245.1*Y"8(+\\\n`\nend\n \. -- -- Data for Name: pkgmetasql; Type: TABLE DATA; Schema: xtdesktop; Owner: admin -- COPY pkgmetasql (metasql_id, metasql_group, metasql_name, metasql_notes, metasql_query, metasql_lastuser, metasql_lastupdate, metasql_grade) FROM stdin; 289 desktop glforwardupdate Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: glforwardupdate\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT MIN(forwardUpdateAccount(accnt_id)) AS result \nFROM accnt \nWHERE (accnt_id IN ())\n \N \N 0 264 desktop bankBal Forward update balances if applicable Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: bankBal\n-- Notes: \n-- Forward update balances if applicable\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT forwardUpdateAccount(bankaccnt_accnt_id) AS result \nFROM bankaccnt \nWHERE (NOT fetchmetricbool('ManualForwardUpdate'));\n\n-- Return results\nSELECT bankaccnt_id, bankaccnt_name, trialbal_ending * -1 AS balance,\n 'curr' AS balance_xtnumericrole\nFROM bankaccnt\n JOIN accnt ON (bankaccnt_accnt_id=accnt_id)\n JOIN trialbal ON (accnt_id=trialbal_accnt_id)\n JOIN (SELECT period_id\n FROM period\n JOIN yearperiod ON (period_yearperiod_id=yearperiod_id)\n JOIN trialbal ON (trialbal_period_id=period_id)\n WHERE (period_start <= current_date)\n ORDER BY yearperiod_end desc, period_number desc\n LIMIT 1) data\n ON (trialbal_period_id=period_id)\nORDER BY bankaccnt_name;\n \N \N 0 560 desktop cmmntPrefSrc Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group:desktop\r\n-- Name:cmmntPrefSrc\r\n-- Notes: \r\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\r\n-- See www.xtuple.com/CPAL for the full text of the software license.\r\n\r\nSELECT A.id AS id, A.cmntsource_name AS cmntsource_name, A.cmntsource_fullname AS cmntsource_fullname\r\nFROM (SELECT 1 AS id, '' AS cmntsource_name, 'All Sources' AS cmntsource_fullname\r\n UNION\r\n SELECT 2, 'ADDR', 'Address'\r\n \r\n UNION\r\n SELECT 3, 'BBH', 'BBOMHead'\r\n UNION\r\n SELECT 4, 'BBI', 'BBOMItem'\r\n \r\n UNION\r\n SELECT 5, 'BMH', 'BOMHead'\r\n UNION\r\n SELECT 6, 'BMI', 'BOMItem'\r\n \r\n UNION\r\n SELECT 7, 'BOH', 'BOOHead'\r\n UNION\r\n SELECT 8, 'BOI', 'BOOItem'\r\n UNION\r\n SELECT 9, 'CRMA', 'CRMAccount'\r\n \r\n UNION\r\n SELECT 10, 'T', 'Contact'\r\n UNION\r\n SELECT 11, 'C', 'Customer'\r\n UNION\r\n SELECT 12, 'EMP', 'Employee'\r\n UNION\r\n SELECT 13, 'INCDT', 'Incident'\r\n UNION\r\n SELECT 14, 'I', 'Item'\r\n UNION\r\n SELECT 15, 'IS', 'ItemSite'\r\n UNION\r\n SELECT 16, 'IR', 'ItemSource'\r\n UNION\r\n SELECT 17, 'L', 'Location'\r\n \r\n UNION\r\n SELECT 18, 'LS', 'LotSerial'\r\n \r\n UNION\r\n SELECT 19, 'OPP', 'Opportunity'\r\n UNION\r\n SELECT 20, 'J', 'Project'\r\n UNION\r\n SELECT 21, 'P', 'PurchaseOrder'\r\n UNION\r\n SELECT 22, 'PI', 'PurchaseOrderItem'\r\n \r\n UNION\r\n SELECT 23, 'RA', 'ReturnAuth'\r\n \r\n UNION\r\n SELECT 24, 'RI', 'ReturnAuthItem'\r\n UNION\r\n SELECT 25, 'Q', 'Quote'\r\n UNION\r\n SELECT 26, 'QI', 'QuoteItem'\r\n UNION\r\n SELECT 27, 'S', 'SalesOrder'\r\n UNION\r\n SELECT 28, 'SI', 'SalesOrderItem'\r\n UNION\r\n SELECT 29, 'TA', 'Task'\r\n UNION\r\n SELECT 30, 'TD', 'TodoItem'\r\n \r\n UNION\r\n SELECT 31, 'TO', 'TransferOrder'\r\n UNION\r\n SELECT 32, 'TI', 'TransferOrderItem'\r\n \r\n UNION\r\n SELECT 33, 'V', 'Vendor'\r\n UNION\r\n SELECT 34, 'WH', 'Warehouse'\r\n UNION\r\n SELECT 35, 'W', 'WorkOrder') AS A\r\nWHERE ((true)\r\n\r\n AND (A.id IN ())\r\n\r\n )\r\nORDER BY A.id;\r\n \N \N 0 561 desktop cmmntPrefType Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group:desktop\r\n-- Name:cmmntPrefType\r\n-- Notes: \r\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\r\n-- See www.xtuple.com/CPAL for the full text of the software license.\r\n\r\nSELECT 0 AS id, 'All Types' AS commenttype_name\r\nUNION\r\nSELECT cmnttype_id AS id, cmnttype_name AS commenttype_name\r\nFROM cmnttype \r\nORDER BY commenttype_name;\r\n\r\n\r\n \N \N 0 562 desktop cmmntPrefUser Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group:desktop\r\n-- Name:cmmntPrefUser\r\n-- Notes: \r\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\r\n-- See www.xtuple.com/CPAL for the full text of the software license.\r\n\r\nSELECT usr_id, usr_username\r\nFROM usr \r\nWHERE (usr_username=current_user)\r\nUNION\r\nSELECT usr_id, usr_username AS usr_username\r\nFROM usr\r\nWHERE ((usr_active = true)\r\n AND(usr_username <> current_user))\r\nORDER BY usr_username; \r\n\r\n\r\n\r\n \N \N 0 563 desktop commentConsole Comment Console Query - update for OPP in 3.8 Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\r\n-- Name: commentConsole\r\n-- Notes: Comment Console Query - update for OPP in 3.8\r\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\r\n-- See www.xtuple.com/CPAL for the full text of the software license.\r\n\r\nSELECT \r\n comment_source_id,\r\n comment_date,\r\n cmnttype_name,\r\n firstLine(comment_text) AS comment_text,\r\n comment_text AS comment_text_qttooltiprole,\r\n comment_user,\r\n CASE WHEN comment_source = 'OPP' THEN 'OPP-Opportunity'\r\n WHEN comment_source = 'T' THEN 'T-Contact'\r\n ELSE comment_source END AS comment_source,\r\n CASE WHEN cmnttype_name = 'Email Received' THEN 6.5\r\n WHEN cmnttype_name = 'Email Sent' THEN 3.5\r\n WHEN cmnttype_name = 'Internal Information' THEN 1\r\n WHEN cmnttype_name = 'Left Message' THEN 1\r\n WHEN cmnttype_name = 'Meeting' THEN 25\r\n WHEN cmnttype_name = 'Outside Meeting' THEN 35\r\n WHEN cmnttype_name = 'Phone Call' THEN 7\r\n WHEN cmnttype_name = 'Sample Confirmation' THEN 1\r\n WHEN cmnttype_name = 'Sample Request' THEN 10\r\n WHEN cmnttype_name = 'Sent Postcard' THEN 1\r\n WHEN cmnttype_name = 'Trade Show' THEN 15\r\n ELSE 0 END AS points,\r\n 'qty' AS points_xttotalrole,\r\n CASE\r\n-- Address\r\n WHEN comment_source = 'ADDR' THEN\r\n (SELECT addr_line1 || addr_line2 || addr_line3\r\n FROM addr\r\n WHERE ((addr_id = comment_source_id)\r\n AND (comment_source = 'ADDR')))\r\n\r\n-- BBOMHead\r\n \r\n WHEN (comment_source = 'BBH')THEN\r\n (SELECT item_descrip1 || ' - ' || item_number\r\n FROM xtmfg.bbomitem, item\r\n WHERE ((comment_source_id = bbomitem_id)\r\n AND (item_id = bbomitem_parent_item_id)\r\n AND (comment_source = 'BBH')))\r\n \r\n\r\n-- BBOMItem\r\n \r\n WHEN (comment_source = 'BBI') THEN\r\n (\r\n (SELECT 'Parent - ' || item.item_descrip1 || ' - ' || item.item_number\r\n FROM xtmfg.bbomitem, item\r\n WHERE ((comment_source_id = bbomitem_id)\r\n AND (item_id = bbomitem_parent_item_id)\r\n AND (comment_source = 'BBI')))\r\n || ' - ' ||\r\n (SELECT 'BBOM Item - ' || item.item_descrip1 || ' - ' || item.item_number\r\n FROM xtmfg.bbomitem, item\r\n WHERE ((comment_source_id = bbomitem_id)\r\n AND (item_id = bbomitem_item_id)\r\n AND (comment_source = 'BBI')))\r\n )\r\n \r\n\r\n-- BOMHead\r\n WHEN comment_source = 'BMH' THEN\r\n (SELECT item_descrip1 || ' - ' || item_number\r\n FROM bomhead, item\r\n WHERE ((comment_source_id = bomhead_item_id)\r\n AND (bomhead_item_id = item_id)\r\n AND (comment_source = 'BMH')))\r\n\r\n-- BOM Item \r\n WHEN comment_source = 'BMI' THEN\r\n (\r\n (SELECT 'Parent - ' || item.item_descrip1 || ' - ' || item.item_number FROM \r\n public.bomitem, \r\n public.item\r\n WHERE bomitem.bomitem_parent_item_id = item.item_id AND \r\n bomitem_id = comment_source_id\r\n AND comment_source = 'BMI') \r\n || ' - ' ||\r\n (SELECT 'BOM Item - ' || item.item_descrip1 || ' - ' || item.item_number FROM \r\n public.bomitem, \r\n public.item\r\n WHERE bomitem.bomitem_item_id = item.item_id AND \r\n bomitem_id = comment_source_id\r\n AND comment_source = 'BMI')\r\n )\r\n\r\n-- BOOHead\r\n \r\n WHEN (comment_source = 'BOH') THEN\r\n (SELECT item_descrip1 || ' - ' || item_number\r\n FROM xtmfg.boohead, item\r\n WHERE ((comment_source_id = boohead_item_id)\r\n AND (item_id = boohead_item_id)\r\n AND (comment_source = 'BOH')))\r\n \r\n\r\n-- BOOItem\r\n \r\n WHEN (comment_source = 'BOI') THEN\r\n (SELECT 'Item - ' || item.item_descrip1 || ' - ' ||item.item_number\r\n || ' - ' ||\r\n 'Operation - ' || booitem_descrip1\r\n FROM xtmfg.booitem, item\r\n WHERE ((xtmfg.booitem.booitem_item_id = item_id)\r\n AND (booitem_id = comment_source_id)\r\n AND (comment_source = 'BOI')))\r\n \r\n\r\n-- T Contact\r\n WHEN comment_source = 'T' THEN\r\n (SELECT cntct_first_name || ' ' || cntct_last_name FROM cntct \r\n WHERE cntct_id = comment_source_id \r\n AND comment_source = 'T'\r\n )\r\n-- Opportunity\r\n-- Put this back in after 3.8.0\r\n/*\r\n\tWHEN comment_source = 'OPP' THEN\r\n (\r\n SELECT ophead_name || ' Account: ' || crmacct_number || ' - ' || crmacct_name || ' Priority: ' || incdtpriority_name || ' - ' || ' Assigned To: ' || ophead_username\r\n FROM ophead\r\n LEFT OUTER JOIN crmacct ON (ophead_crmacct_id = crmacct_id)\r\n LEFT OUTER JOIN incdtpriority ON (ophead_priority_id = incdtpriority_id)\r\n WHERE \r\n comment_source = 'OPP'\r\n AND comment_source_id = ophead_id\r\n\t )\r\n*/\r\n-- Customer\r\n WHEN comment_source = 'C' THEN\r\n (SELECT cust_number || ' - ' || cust_name FROM custinfo WHERE (cust_id = comment_source_id) AND (comment_source = 'C'))\r\n\r\n-- Credit Memo - Return Auth\r\n \r\n WHEN comment_source = 'CRMA' THEN\r\n (SELECT 'Credit Memo: ' || cmhead_number || ' Return Auth: ' || rahead_number || ' Customer ' || cust_number || ' - ' || cust_name\r\n FROM rahead, cmhead, custinfo\r\n WHERE\r\n ((cmhead_rahead_id = rahead_id)\r\n AND (cmhead_cust_id = cust_id)\r\n AND (cmhead_id = comment_source_id)\r\n AND (comment_source = 'CRMA')))\r\n \r\n\r\n-- Employee\r\n WHEN comment_source = 'EMP' THEN\r\n (SELECT emp_code || '-' || emp_name\r\n FROM emp \r\n WHERE((comment_source_id = emp_id)\r\n AND (comment_source = 'EMP')))\r\n\r\n-- Incident\r\n WHEN comment_source = 'INCDT' THEN\r\n (\r\n SELECT incdt_number || ' - ' ||\r\n crmacct_number || ' - ' || \r\n crmacct_name || ' - ' || \r\n incdt_summary\r\n FROM incdt, crmacct \r\n WHERE \r\n incdt_id = comment_source_id\r\n AND crmacct_id = incdt_crmacct_id\r\n AND (comment_source = 'INCDT')\r\n )\r\n\r\n-- Item\r\n WHEN comment_source = 'I' THEN\r\n (SELECT item_number || ' - ' || item_descrip1 \r\n FROM item WHERE item_id = comment_source_id\r\n AND (comment_source = 'I'))\r\n\r\n-- Item Site\r\n WHEN comment_source = 'IS' THEN\r\n (\r\n SELECT item_number || ' - ' || item_descrip1 \r\n FROM item, itemsite\r\n WHERE itemsite_item_id = item_id\r\n AND itemsite_id = comment_source_id\r\n AND (comment_source = 'IS')\r\n )\r\n\r\n-- ItemSource\r\n WHEN comment_source = 'IR' THEN\r\n (\r\n SELECT item_number || ' - ' || item_descrip1 \r\n FROM item, itemsrc\r\n WHERE itemsrc_item_id = item_id\r\n AND itemsrc_id = comment_source_id\r\n AND (comment_source = 'IR')\r\n )\r\n\r\n-- Location\r\n WHEN comment_source = 'L' THEN\r\n (SELECT location_name || ' - ' || location_descrip \r\n FROM location \r\n WHERE location_id = comment_source_id\r\n AND (comment_source = 'L'))\r\n\r\n-- LotSerial\r\n \r\n WHEN comment_source = 'LS' THEN\r\n (SELECT ls_number || '-' || item_number || '-' || item_descrip1 || item_descrip2\r\n FROM ls, item \r\n WHERE(ls_id = comment_source_id)\r\n AND(ls_item_id = item_id)\r\n AND (comment_source = 'LS'))\r\n \r\n-- Project \r\n WHEN comment_source = 'J' THEN\r\n (\r\n SELECT 'Project#: ' || prj_number || ' - Descrip: ' || prj_descrip || \r\n ' - Status: ' || prj_status || ' - Owner: ' || prj_owner_username || '- Due: ' || prj_due_date\r\n FROM prj\r\n WHERE\r\n prj_id = comment_source_id\r\n AND (comment_source = 'J')\r\n )\r\n-- PO Head\r\n WHEN comment_source = 'P' THEN\r\n (\r\n SELECT pohead_number || ' - ' || vend_number || ' - ' || vend_name\r\n FROM pohead, vendinfo\r\n WHERE pohead_vend_id = vend_id\r\n AND comment_source_id = pohead_id\r\n AND (comment_source = 'P')\r\n )\r\n-- PO Item\r\n WHEN comment_source = 'PI' THEN\r\n (\r\n SELECT pohead_number || ' - ' || vend_number || ' - ' || vend_name || ' - ' ||\r\n (\r\n SELECT item_number || ' - ' || item_descrip1\r\n FROM poitem, itemsite, item\r\n WHERE poitem_itemsite_id = itemsite_id\r\n AND itemsite_item_id = item_id\r\n AND comment_source_id = poitem_id\r\n AND comment_source = 'PI'\r\n )\r\n || ' - ' || poitem_vend_item_number \r\n || ' - ' || poitem_vend_item_descrip \r\n FROM pohead, vendinfo, poitem\r\n WHERE pohead_vend_id = vend_id\r\n AND poitem_pohead_id = pohead_id\r\n AND comment_source_id = poitem_id\r\n AND comment_source = 'PI'\r\n )\r\n-- Quote Head\r\n WHEN comment_source = 'Q' THEN\r\n (\r\n SELECT 'Quote#: ' || quhead_number || ' - Customer: ' || cust_number || ' - ' || cust_name\r\n FROM quhead, custinfo\r\n WHERE quhead_cust_id = cust_id \r\n AND quhead_id = comment_source_id\r\n AND comment_source = 'Q'\r\n )\r\n-- Quote Item\r\n WHEN comment_source = 'QI' THEN\r\n (\r\n SELECT 'Quote#: ' || quhead_number || ' Customer ' || cust_number || ' - ' || \r\n cust_name || ' Line #: ' || quitem_linenumber || ' - ' || ' Item#: ' || item_number || ' - ' || item_descrip1 || ' - Order Qty: ' || formatQty(quitem_qtyord)\r\n FROM quhead, quitem, item, itemsite, custinfo\r\n \r\n WHERE\r\n quitem_quhead_id = quhead_id\r\n AND quhead_cust_id = cust_id\r\n AND quitem_itemsite_id = itemsite_id\r\n AND itemsite_item_id = item_id\r\n AND quitem_id = comment_source_id\r\n AND comment_source = 'QI'\r\n )\r\n-- Return Auth Head\r\n \r\n WHEN comment_source = 'RA' THEN\r\n (\r\n SELECT rahead_number || ' - ' || cust_number || ' - ' || cust_name\r\n FROM rahead, custinfo\r\n WHERE rahead_cust_id = cust_id \r\n AND rahead_id = comment_source_id\r\n AND comment_source = 'RA'\r\n )\r\n \r\n-- SO Head\r\n WHEN comment_source = 'S' THEN\r\n (\r\n SELECT cohead_number || ' - ' || cust_number || ' - ' || cust_name\r\n FROM cohead, custinfo\r\n WHERE cohead_cust_id = cust_id \r\n AND cohead_id = comment_source_id\r\n AND comment_source = 'S'\r\n )\r\n-- SO Item \r\n WHEN comment_source = 'SI' THEN\r\n (\r\n SELECT 'Sales Order: ' || cohead_number || ' Customer ' || cust_number || ' - ' || \r\n cust_name || ' Line #: ' || coitem_linenumber || ' - ' || ' Item#: ' || item_number || ' - ' || item_descrip1 || ' - Order Qty: ' || formatQty(coitem_qtyord)\r\n FROM cohead, coitem, item, itemsite, custinfo\r\n \r\n WHERE\r\n coitem_cohead_id = cohead_id\r\n AND cohead_cust_id = cust_id\r\n AND coitem_itemsite_id = itemsite_id\r\n AND itemsite_item_id = item_id\r\n AND coitem_id = comment_source_id\r\n AND comment_source = 'SI'\r\n )\r\n\r\n-- Task\r\n WHEN comment_source = 'TA' THEN\r\n (\r\n SELECT prj_number || '-' || prjtask_number || '-' || prjtask_name || '-' || prjtask_descrip\r\n FROM prjtask, prj\r\n WHERE((prjtask_prj_id = prj_id)\r\n AND(prjtask_id = comment_source_id)\r\n AND(comment_source = 'TA'))\r\n )\r\n\r\n--TodoItem\r\n WHEN comment_source = 'TD' THEN\r\n (\r\n SELECT todoitem_name || '-' || todoitem_description\r\n FROM todoitem\r\n WHERE((todoitem_id = comment_source_id)\r\n AND(comment_source = 'TD'))\r\n )\r\n\r\n--Transfer Order Header\r\n \r\n WHEN comment_source = 'TO' THEN\r\n (\r\n SELECT 'Transfer#: ' || tohead_number || ' - Status: ' || tohead_status || ' - Source / Dest: ' || \r\n (SELECT warehous_code FROM whsinfo WHERE warehous_id = tohead_src_warehous_id) || ' / ' ||\r\n (SELECT warehous_code FROM whsinfo WHERE warehous_id = tohead_dest_warehous_id) \r\n FROM tohead\r\n WHERE tohead_id = comment_source_id\r\n AND comment_source = 'TO'\r\n )\r\n \r\n--Transfer Order item\r\n \r\n WHEN comment_source = 'TI' THEN\r\n (\r\n SELECT 'Transfer#: ' || tohead_number || ' - Status: ' || tohead_status || ' - Source / Dest: ' || \r\n (SELECT warehous_code FROM whsinfo WHERE warehous_id = tohead_src_warehous_id) || ' / ' ||\r\n (SELECT warehous_code FROM whsinfo WHERE warehous_id = tohead_dest_warehous_id) ||\r\n ' - Item: ' || item_number || ' - ' || item_descrip1 || ' - Qty: ' || formatQty(toitem_qty_ordered)\r\n FROM tohead, toitem, item\r\n WHERE \r\n toitem_item_id = item_id \r\n AND toitem_tohead_id = tohead_id\r\n AND toitem_id = comment_source_id\r\n AND comment_source = 'TI'\r\n )\r\n \r\n-- Vendor\r\n WHEN comment_source = 'V' THEN\r\n (\r\n SELECT 'Vendor Name: ' || vend_name || ' - Vendor Number: ' || vend_number\r\n FROM vendinfo\r\n WHERE vend_id = comment_source_id\r\n AND comment_source = 'V'\r\n )\r\n\r\n-- Warehouse \r\n WHEN comment_source = 'WH' THEN \r\n (SELECT warehous_code || ' - ' || warehous_descrip \r\n FROM whsinfo WHERE warehous_id = comment_source_id\r\n AND comment_source = 'WH')\r\n\r\n-- Work Order\r\n WHEN comment_source = 'W' THEN\r\n (\r\n SELECT \r\n 'WO#: ' || wo_number || ' - ' || \r\n wo_subnumber || ' - ' || \r\n 'Status: ' || wo_status || ' - ' || \r\n 'Ordered: ' || formatQty(wo_qtyord) || ' - ' || \r\n 'Received: ' || formatQty(wo_qtyrcv) || ' - ' || \r\n 'Item: ' || item_number || ' - ' || \r\n item_descrip1\r\n FROM wo, itemsite, item\r\n WHERE wo_itemsite_id = itemsite_id\r\n AND itemsite_item_id = item_id\r\n AND wo_id = comment_source_id\r\n AND comment_source = 'W'\r\n )\r\n-- Unknown\r\n ELSE 'Unknown Comment Type'\r\n END AS info\r\nFROM\r\n comment, cmnttype\r\nWHERE\r\n comment_cmnttype_id = cmnttype_id\r\n \r\n AND cmnttype_id IN ()\r\n \r\n --Example: these are the names given to the various comment types like 'General' or "ChangeLog' or those defined by the user.\r\n --This query will give you a list of them: \r\n --SELECT DISTINCT cmnttype_name, cmnttype_name FROM cmnttype ORDER BY cmnttype_name;\r\n-- AND comment_text LIKE '%'\r\n --Example: 'Created%' for all comments that start with the work 'Created'\r\n --Example: '%question% for all comments that contain the word 'question' anywhere in the comment\r\n\r\n \r\n AND comment_user IN (SELECT usr_username FROM usr WHERE usr_id IN ())\r\n -- \r\n \r\n \r\n \r\n AND comment_user = current_user\r\n -- \r\n \r\n \r\n --This list will show you users who have at least one comment\r\n --SELECT DISTINCT comment_user FROM comment ORDER BY comment_user;\r\n \r\n AND comment_source IN (\r\n \r\n \r\n \r\n \r\n ,\r\n \r\n \r\n )\r\n \r\n --This query will show all comment sources for which there is a comment\r\n --SELECT DISTINCT comment_source FROM comment ORDER BY comment_source;\r\n --Example: Incidents = 'INCDT'\r\n AND CAST(comment_date AS DATE) BETWEEN AND \r\nORDER BY \r\n comment_date, comment_user, comment_source; \N \N 0 265 desktop contacts Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: contacts\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n cntct_id AS id, crmacct_number, crmacct_name,\n cntct.*, addr.*\nFROM cntct \n LEFT OUTER JOIN crmacct ON (crmacct_cntct_id_1=cntct_id) \n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) \nWHERE (cntct_owner_username=getEffectiveXtUser())\nORDER BY cntct_name;\n \N \N 0 273 desktop payables Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: payables\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT formatMoney(sum(apaging_cur_val)) AS cur_val,\n formatMoney(sum(apaging_thirty_val)) AS thirty_val,\n formatMoney(sum(apaging_sixty_val)) AS sixty_val,\n formatMoney(sum(apaging_ninety_val)) AS ninety_val,\n formatMoney(sum(apaging_plus_val)) AS plus_val,\n formatMoney(sum(apaging_total_val)) AS total_val \nFROM apaging(current_date, false);\n \N \N 0 271 desktop mfgHist Summarized Manufacture History for Desktop Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: mfgHist\n-- Notes: Summarized Manufacture History for Desktop\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT , , ,\n sum(invhist_value_after-invhist_value_before) as amount, sum(invhist_qoh_after-invhist_qoh_before) AS qty,\n 'curr' AS amount_xtnumericrole,\n 'qty' AS qty_xtnumericrole,\n 0 AS amount_xttotalrole,\n 0 AS qty_xttotalrole\nFROM invhist\n JOIN itemsite ON (itemsite_id=invhist_itemsite_id)\n JOIN plancode ON (plancode_id=itemsite_plancode_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN classcode ON (classcode_id=item_classcode_id)\nWHERE ((invhist_transtype = 'RM')\n AND (invhist_ordtype = 'WO')\n AND ((invhist_transdate > DATE - 1 AND\n invhist_transdate < DATE + 1) )\n)\nGROUP BY , , \nORDER BY \n;\n \N \N 0 266 desktop crmaccounts Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: crmaccounts\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n crmacct_id AS id, crmacct_number, crmacct_name,\n cntct.*, addr.*\nFROM crmacct \n LEFT OUTER JOIN cntct ON (crmacct_cntct_id_1=cntct_id) \n LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) \nWHERE (crmacct_owner_username=getEffectiveXtUser())\nORDER BY crmacct_number;\n \N \N 0 267 desktop getDates Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: getDates\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT date_trunc(, current_date) AS startDate,\n date_trunc(, current_date) + + '-1 day' AS endDate\n \N \N 0 268 desktop glaccountBal tweak Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: glaccountBal\n-- Notes: tweak\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT accnt_id, formatGlAccount(accnt_id) AS accnt_id_qtdisplayrole, \n accnt_descrip, accnt_type,\n CASE WHEN(accnt_type='A') THEN \n WHEN(accnt_type='E') THEN \n WHEN(accnt_type='L') THEN \n WHEN(accnt_type='Q') THEN \n WHEN(accnt_type='R') THEN \n ELSE accnt_type\n END AS accnt_type_qtdisplayrole,\n CASE WHEN(accnt_type IN ('A','E')) THEN trialbal_ending * -1 \n ELSE trialbal_ending\n END AS balance,\n period_id,\n 'curr' AS balance_xtnumericrole\nFROM accnt \nJOIN trialbal ON (accnt_id=trialbal_accnt_id)\nJOIN (SELECT period_id\n FROM period\n JOIN yearperiod ON (period_yearperiod_id=yearperiod_id)\n WHERE (period_end >= current_date)\n ORDER BY yearperiod_end desc, period_number asc\n LIMIT 1) data\n ON (trialbal_period_id=period_id)\nWHERE (accnt_id IN ())\nORDER BY accnt_company, accnt_profit, accnt_number, accnt_sub\n \N \N 0 269 desktop glaccounts Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: glaccounts\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT accnt_id, formatGlAccount(accnt_id) AS accnt_id_qtdisplayrole, \n accnt_descrip, accnt_type,\n CASE WHEN(accnt_type='A') THEN \n WHEN(accnt_type='E') THEN \n WHEN(accnt_type='L') THEN \n WHEN(accnt_type='Q') THEN \n WHEN(accnt_type='R') THEN \n ELSE accnt_type\nEND AS accnt_type_qtdisplayrole \nFROM accnt;\t\n \N \N 0 564 desktop messageHistory Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\r\n-- Name: messageHistory\r\n-- Notes:\r\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\r\n-- See www.xtuple.com/CPAL for the full text of the software license.\r\n\r\nSELECT \r\n msg_id, \r\n msg_posted AS sent,\r\n CASE WHEN (msg_username = geteffectivextuser()) THEN 'me'\r\n ELSE msg_username END AS from,\r\n msg_text AS message,\r\n CASE WHEN msguser_username = geteffectivextuser() THEN 'me'\r\n ELSE msguser_username END AS to\r\nFROM msg a\r\nLEFT OUTER JOIN msguser ab ON a.msg_id = ab.msguser_msg_id\r\nWHERE (a.msg_username = geteffectivextuser())\r\n\r\nUNION\r\n\r\nSELECT \r\n msg_id, \r\n msg_posted AS sent,\r\n CASE WHEN (msg_username = geteffectivextuser()) THEN 'me'\r\n ELSE msg_username END AS from,\r\n msg_text AS message,\r\n CASE WHEN msguser_username = geteffectivextuser() THEN 'me'\r\n ELSE msguser_username END AS to\r\nFROM msg c\r\nLEFT OUTER JOIN msguser cd ON c.msg_id = cd.msguser_msg_id\r\nWHERE (cd.msguser_username = geteffectivextuser())\r\n\r\nORDER BY msg_id DESC\r\nLIMIT \N \N 0 270 desktop mfgAct Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: mfgAct\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n \nSELECT 'L' AS activity, AS activity_qtdisplayrole, 0 AS seq,\n COUNT(planord_id) AS count, COALESCE(sum(stdcost(item_id) * planord_qty),0) AS amount, \n sum(planord_qty) AS qty,\n 'curr' AS amount_xtnumericrole, 'qty' AS qty_xtnumericrole\nFROM planord\n JOIN itemsite ON (planord_itemsite_id = itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\nWHERE (planord_type = 'W')\nHAVING (COUNT(planord_id) > 0)\nUNION\n\nSELECT 'O' AS activity, AS activity_qtdisplayrole, 4 AS seq, \n COUNT(wo_id) AS count, \n SUM(round((wo_qtyord - wo_qtyrcv) * stdcost(itemsite_item_id),2)) AS amount, \n SUM(wo_qtyord - wo_qtyrcv) AS qty,\n 'curr' AS amount_xtnumericrole, 'qty' AS qty_xtnumericrole\nFROM wo\n JOIN itemsite ON (wo_itemsite_id=itemsite_id)\nWHERE (wo_status = 'O')\nHAVING (COUNT(wo_id) > 0)\nUNION ALL\nSELECT 'E' AS activity, AS activity_qtdisplayrole, 4 AS seq, \n COUNT(wo_id) AS count, \n SUM(round((wo_qtyord - wo_qtyrcv) * stdcost(itemsite_item_id),2)) AS amount, \n SUM(wo_qtyord - wo_qtyrcv) AS qty,\n 'curr' AS amount_xtnumericrole, 'qty' AS qty_xtnumericrole\nFROM wo\n JOIN itemsite ON (wo_itemsite_id=itemsite_id)\nWHERE (wo_status = 'E')\nHAVING (COUNT(wo_id) > 0)\nUNION ALL\nSELECT 'R' AS activity, AS activity_qtdisplayrole, 4 AS seq, \n COUNT(wo_id) AS count, \n SUM(round((wo_qtyord - wo_qtyrcv) * stdcost(itemsite_item_id),2)) AS amount, \n SUM(wo_qtyord - wo_qtyrcv) AS qty,\n 'curr' AS amount_xtnumericrole, 'qty' AS qty_xtnumericrole\nFROM wo\n JOIN itemsite ON (wo_itemsite_id=itemsite_id)\nWHERE (wo_status = 'R')\nHAVING (COUNT(wo_id) > 0)\nUNION ALL\nSELECT 'I' AS activity, AS activity_qtdisplayrole, 4 AS seq, \n COUNT(wo_id) AS count, \n SUM(round((wo_qtyord - wo_qtyrcv) * stdcost(itemsite_item_id),2)) AS amount, \n SUM(wo_qtyord - wo_qtyrcv) AS qty,\n 'curr' AS amount_xtnumericrole, 'qty' AS qty_xtnumericrole\nFROM wo\n JOIN itemsite ON (wo_itemsite_id=itemsite_id)\nWHERE (wo_status = 'I')\nHAVING (COUNT(wo_id) > 0)\nORDER BY seq;\n \N \N 0 272 desktop mfgOpen Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: mfgOpen\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT wo_id,\n CASE WHEN (wo_ordid IS NULL) THEN -1\n ELSE wo_ordid\n END AS orderid, wo_status,\n CASE WHEN (wo_status = 'E') THEN \n WHEN (wo_status = 'I') THEN \n WHEN (wo_status = 'R') THEN \n WHEN (wo_status = 'O') THEN \n END AS wo_status_qtdisplayrole, \n warehous_code, uom_name,\n item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n wo_qtyord, wo_qtyrcv, wo_startdate, wo_duedate,\n wo_number::TEXT || '-' || wo_subnumber::TEXT AS wonumber,\n wo_postedvalue, wo_wipvalue,\n 'qty' AS wo_qtyord_xtnumericrole,\n 'qty' AS wo_qtyrcv_xtnumericrole,\n 'curr' AS wo_postedvalue_xtnumericrole,\n 'curr' AS wo_wipvalue_xtnumericrole,\n CASE WHEN ((wo_startdate<=CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) THEN 'error'\n END AS wo_startdate_qtforegroundrole,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error'\n END AS wo_duedate_qtforegroundrole,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'Overdue'\n ELSE 'On Time'\n END AS condition,\n CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error' END AS condition_qtforegroundrole\nFROM wo\n JOIN itemsite ON (wo_itemsite_id=itemsite_id)\n JOIN whsinfo ON (itemsite_warehous_id=warehous_id)\n JOIN item ON (itemsite_item_id=item_id)\n JOIN uom ON (item_inv_uom_id=uom_id)\nWHERE (wo_status != 'C')\nORDER BY wo_number, wo_subnumber;\n \N \N 0 274 desktop pkgItems Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: pkgItems\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\nSELECT *,\n CASE WHEN pkgitem_type='P' THEN \n WHEN pkgitem_type='C' THEN \n WHEN pkgitem_type='D' THEN \n WHEN pkgitem_type='F' THEN \n WHEN pkgitem_type='G' THEN \n WHEN pkgitem_type='I' THEN \n WHEN pkgitem_type='M' THEN \n WHEN pkgitem_type='P' THEN \n WHEN pkgitem_type='R' THEN \n WHEN pkgitem_type='S' THEN \n WHEN pkgitem_type='T' THEN \n WHEN pkgitem_type='U' THEN \n WHEN pkgitem_type='V' THEN \n WHEN pkgitem_type='L' THEN \n WHEN pkgitem_type='B' THEN \n WHEN pkgitem_type='C' THEN \n ELSE pkgitem_type END AS pkgitem_type_qtdisplayrole\nFROM (\n------ PACKAGE ------\nSELECT pkghead_id AS pkgitem_id, 0 AS seq,\n 0 AS xtindentrole,\n pkghead_name AS pkgname,\n 'P'::text AS pkgitem_type,\n pkghead_name AS pkgitem_name,\n pkghead_descrip AS pkgitem_descrip\n FROM pkghead\nUNION\n\n------ CLIENT ------\nSELECT pkghead_id AS pkgitem_id, 1 AS seq,\n 1 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\n------ COMMANDS ------\nSELECT pkghead_id AS pkgitem_id, 2 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION \nSELECT cmd_id AS pkgitem_id, 3 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'D' AS pkgitem_type,\n cmd_name AS pkgitem_name,\n cmd_descrip AS pkgitem_descrip \n FROM cmd\n JOIN pg_class ON (cmd.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nUNION\n------ IMAGES ------\nSELECT pkghead_id AS pkgitem_id, 4 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION \nSELECT image_id AS pkgitem_id, 5 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'I'::text AS pkgitem_type,\n image_name AS pkgitem_name,\n image_descrip AS pkgitem_descrip \n FROM image\n JOIN pg_class ON (image.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nUNION \n------ METASQL ------\nSELECT pkghead_id AS pkgitem_id, 6 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT metasql_id AS pkgitem_id, 7 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'M' AS pkgitem_type,\n metasql_group || '-' || metasql_name AS pkgitem_name,\n metasql_notes AS pkgitem_descrip \n FROM metasql\n JOIN pg_class ON (metasql.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nUNION\n------ PRIVILEGES ------\nSELECT pkghead_id AS pkgitem_id, 8 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT priv_id AS pkgitem_id, 9 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'P' AS pkgitem_type,\n priv_module || '.' || priv_name AS pkgitem_name,\n priv_descrip AS pkgitem_descrip \n FROM priv\n JOIN pg_class ON (priv.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nUNION \n------ REPORTS ------\nSELECT pkghead_id AS pkgitem_id, 10 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT report_id AS pkgitem_id, 11 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'R' AS pkgitem_type,\n report_name AS pkgitem_name,\n report_descrip AS pkgitem_descrip \n FROM report\n JOIN pg_class ON (report.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid) \nUNION\n------ SCRIPTS ------\nSELECT pkghead_id AS pkgitem_id, 12 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT script_id AS pkgitem_id, 13 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'C'::text AS pkgitem_type,\n script_name AS pkgitem_name,\n script_notes AS pkgitem_descrip\n FROM script\n JOIN pg_class ON (script.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nUNION\n------ SCREENS ------\nSELECT pkghead_id AS pkgitem_id, 14 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT uiform_id AS pkgitem_id, 15 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'U'::text AS pkgitem_type,\n uiform_name AS pkgitem_name,\n uiform_notes AS pkgitem_descrip\n FROM uiform\n JOIN pg_class ON (uiform.tableoid=pg_class.oid)\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\nUNION\n------ DATABASE ------\nSELECT pkghead_id AS pkgitem_id, 20 AS seq, \n 1 AS xtindentrole,\n pkghead_name AS pkgname,\n 'B'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\n------ FUNCTIONS ------\nSELECT pkghead_id AS pkgitem_id, 21 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT pg_proc.oid AS pkgitem_id, 22 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'F' AS pkgitem_type,\n proname || '(' || oidvectortypes(proargtypes)\n || ')' AS pkgitem_name,\n pg_catalog.obj_description(pg_proc.oid, 'pg_proc') AS pkgitem_descrip \n FROM pg_proc\n JOIN pg_namespace ON (pronamespace=pg_namespace.oid)\nUNION\n------ SCHEMA ------\nSELECT pkghead_id AS pkgitem_id, 27 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT n.oid AS pkgitem_id, 28 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'S' AS pkgitem_type,\n nspname AS pkgitem_name,\n pg_catalog.obj_description(n.oid, 'pg_namespace') AS pkgitem_descrip \n FROM pg_namespace n\nUNION\n------ TABLES ------\nSELECT pkghead_id AS pkgitem_id, 29 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT c.oid AS pkgitem_id, 30 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'T' AS pkgitem_type,\n relname AS pkgitem_name,\n pg_catalog.obj_description(c.oid, 'pg_class') AS pkgitem_descrip \n FROM pg_class c\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n WHERE ((relkind='r')\n AND (relname !~ '^pkg(cmd(arg)?|image|metasql|priv|report|script|uiform)$'))\nUNION\n------ TRIGGERS ------\nSELECT pkghead_id AS pkgitem_id, 31 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT 0 AS pkgitem_id, 32 AS seq,\n 3 AS xtindentrole,\n trigger_schema AS pkgname,\n 'G' AS pkgitem_type,\n trigger_name AS pkgitem_name,\n event_object_table AS pkgitem_descrip \n FROM information_schema.triggers\n WHERE (trigger_name !~ '^pkg(cmd(arg)?|image|metasql|priv|report|script|uiform)')\nUNION\n------ VIEWS ------\nSELECT pkghead_id AS pkgitem_id, 33 AS seq,\n 2 AS xtindentrole,\n pkghead_name AS pkgname,\n 'L'::text AS pkgitem_type,\n AS pkgitem_name,\n '' AS pkgitem_descrip\n FROM pkghead\nUNION\nSELECT c.oid AS pkgitem_id, 34 AS seq,\n 3 AS xtindentrole,\n nspname AS pkgname,\n 'V' AS pkgitem_type,\n relname AS pkgitem_name,\n pg_catalog.obj_description(c.oid, 'pg_class') AS pkgitem_descrip \n FROM pg_class c\n JOIN pg_namespace ON (relnamespace=pg_namespace.oid)\n WHERE ((relkind='v'))\n) AS pkgitem \nWHERE (pkgname NOT IN ('api','public','pg_catalog'))\nORDER BY pkgname, seq, pkgitem_type_qtdisplayrole, pkgitem_name;\n \N \N 0 275 desktop purchAct Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: purchAct\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n \nSELECT 'L' AS activity, AS activity_qtdisplayrole, 0 AS seq,\n COUNT(planord_id) AS count, COALESCE(sum(stdcost(item_id) * planord_qty),0) AS amount, \n 'curr' AS amount_xtnumericrole\nFROM planord\n JOIN itemsite ON (planord_itemsite_id = itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\nWHERE (planord_type = 'P')\nHAVING (COUNT(planord_id) > 0)\nUNION\n\nSELECT 'Q' AS activity, AS activity_qtdisplayrole, 2 AS seq,\n COUNT(pr_id) AS count, COALESCE(sum(stdcost(item_id) * pr_qtyreq),0) AS amount, \n 'curr' AS amount_xtnumericrole\nFROM pr\n JOIN itemsite ON (pr_itemsite_id = itemsite_id)\n JOIN item ON (itemsite_item_id = item_id)\nHAVING (COUNT(pr_id) > 0)\nUNION\nSELECT 'U' AS activity, AS activity_qtdisplayrole, 3 AS seq, \n COUNT(pohead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT pohead_id,\n SUM(round((noNeg(poitem_qty_ordered - poitem_qty_received + poitem_qty_returned)) * \n currToBase(pohead_curr_id, poitem_unitprice, pohead_orderdate), 2) ) AS amount\n FROM poitem\n JOIN pohead ON (poitem_pohead_id=pohead_id)\n WHERE (pohead_status = 'U')\n GROUP BY pohead_id) data\nHAVING (COUNT(pohead_id) > 0)\nUNION\nSELECT 'O' AS activity, AS activity_qtdisplayrole, 4 AS seq, \n COUNT(pohead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT pohead_id,\n SUM(round((noNeg(poitem_qty_ordered - poitem_qty_received + poitem_qty_returned)) * \n currToBase(pohead_curr_id, poitem_unitprice, pohead_orderdate), 2) ) AS amount\n FROM poitem\n JOIN pohead ON (poitem_pohead_id=pohead_id)\n WHERE (pohead_status = 'O')\n GROUP BY pohead_id) data\nHAVING (COUNT(pohead_id) > 0)\nUNION\nSELECT 'A' AS activity, AS activity_qtdisplayrole, 5 AS seq, \n COUNT(recv_id) AS count, COALESCE(sum(recv_value),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM recv\nWHERE (NOT recv_posted)\nHAVING (COUNT(recv_id) > 0)\nUNION\nSELECT 'V' AS activity, AS activity_qtdisplayrole, 6 AS seq, \n COUNT(recv_id) AS count, COALESCE(sum(recv_value),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM recv\nWHERE ((recv_posted)\n AND (NOT recv_invoiced)\n AND (recv_vohead_id IS NULL)\n AND (recv_order_type = 'PO'))\nHAVING (COUNT(recv_id) > 0)\nUNION\nSELECT 'I' AS activity, AS activity_qtdisplayrole, 7 AS seq, \n COUNT(vohead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT vohead_id,\n SUM(round(currToBase(vohead_curr_id, vodist_amount, vohead_docdate), 2) ) AS amount\n FROM vohead\n JOIN vodist ON (vodist_vohead_id=vohead_id)\n WHERE ((vohead_pohead_id != -1)\n AND (NOT vohead_posted))\n GROUP BY vohead_id) data\nHAVING (COUNT(vohead_id) > 0)\nORDER BY seq;\n \N \N 0 276 desktop purchHist Summarized Purchase History for Desktop Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: purchHist\n-- Notes: Summarized Purchase History for Desktop\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n--------- VARIANCES -----------\n \nSELECT , , ,\n sum(qty) AS qty, sum(amount) AS amount,\n 'curr' AS amount_xtnumericrole,\n 'qty' AS qty_xtnumericrole,\n 0 AS amount_xttotalrole,\n 0 AS qty_xttotalrole\nFROM (\nSELECT vend_id, vend_number, vend_name,\n pohead_agent_username, usr_propername,\n COALESCE(item_id,-2) AS item_id,\n COALESCE(item_number,) AS item_number,\n item_descrip1,\n recv_qty AS qty, \n currToBase(vohead_curr_id, sum(vodist_amount) / sum(vodist_qty), vohead_distdate) * recv_qty - recv_value AS amount\nFROM recv\n JOIN vendinfo ON (recv_vend_id=vend_id)\n LEFT OUTER JOIN itemsite ON (recv_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n JOIN vodist ON ((vodist_poitem_id=recv_orderitem_id) \n AND (vodist_vohead_id=recv_vohead_id))\n JOIN vohead ON ((vodist_vohead_id=vohead_id) \n AND (vohead_posted))\n JOIN poitem ON (recv_orderitem_id=poitem_id)\n JOIN pohead ON (poitem_pohead_id=pohead_id)\n LEFT OUTER JOIN usr ON (pohead_agent_username=usr_username)\nWHERE (vohead_distdate BETWEEN AND \n AND (recv_order_type='PO'))\nGROUP BY recv_qty, recv_value, vohead_curr_id, vohead_distdate,\n vend_id, vend_number, vend_name,\n pohead_agent_username, usr_propername,\n item_id, item_number, item_descrip1\n) data\nWHERE (amount > 0)\nGROUP BY , , \n\n--------- RECEIPTS -------\n \nSELECT , , ,\n sum(amount) as amount, sum(qty) AS qty,\n 'curr' AS amount_xtnumericrole,\n 'qty' AS qty_xtnumericrole,\n 0 AS amount_xttotalrole,\n 0 AS qty_xttotalrole\nFROM (\n SELECT vend_id, vend_number, vend_name,\n pohead_agent_username, usr_propername,\n COALESCE(item_id,-2) AS item_id, COALESCE(item_number,) AS item_number,\n item_descrip1,\n coalesce(recv_value,0) AS amount,\n recv_qty AS qty\n FROM recv\n JOIN vendinfo ON (vend_id=recv_vend_id)\n LEFT OUTER JOIN itemsite ON (recv_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n JOIN poitem ON (recv_orderitem_id=poitem_id)\n JOIN pohead ON (poitem_pohead_id=pohead_id)\n LEFT OUTER JOIN usr ON (pohead_agent_username=usr_username)\n WHERE ((recv_date::date BETWEEN AND )\n AND (recv_posted)\n AND (recv_order_type = 'PO'))\n UNION ALL\n SELECT vend_id, vend_number, vend_name,\n pohead_agent_username, usr_propername,\n COALESCE(item_id,-1) AS item_id, COALESCE(item_number,) AS item_number,\n item_descrip1,\n coalesce(poreject_value,0) * -1 AS amount,\n poreject_qty * -1 AS qty\n FROM poreject\n JOIN vendinfo ON (vend_id=poreject_vend_id)\n JOIN itemsite ON (itemsite_id=poreject_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN poitem ON (poreject_poitem_id=poitem_id)\n JOIN pohead ON (poitem_pohead_id=pohead_id)\n LEFT OUTER JOIN usr ON (pohead_agent_username=usr_username)\n WHERE ((poreject_date::date BETWEEN AND )\n AND (poreject_posted))\n) data\nGROUP BY , , \nORDER BY \n;\n\n \N \N 0 277 desktop purchOpen Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: purchOpen\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT pohead_id, pohead_number, vend_number, vend_name, pohead_shipvia, \n formatCntctName(pohead_vend_cntct_honorific, \n pohead_vend_cntct_first_name, \n pohead_vend_cntct_middle, \n pohead_vend_cntct_last_name, \n pohead_vend_cntct_suffix) AS vend_cntct, \n pohead_vend_cntct_phone,\n formatCntctName(pohead_shipto_cntct_honorific, \n pohead_shipto_cntct_first_name, \n pohead_shipto_cntct_middle, \n pohead_shipto_cntct_last_name, \n pohead_shipto_cntct_suffix) AS shipto_cntct, \n pohead_shipto_cntct_phone,\n min(poitem_duedate) AS duedate, pohead_status AS status,\n CASE WHEN (pohead_status = 'O') THEN \n ELSE END AS status_qtdisplayrole,\n SUM(round(noNeg(poitem_qty_ordered - poitem_qty_received + poitem_qty_returned) * \n currToBase(pohead_curr_id, poitem_unitprice, pohead_orderdate), 2) ) AS amount,\n CASE WHEN (min(poitem_duedate) <= current_date) THEN 'error' \n ELSE 'emphasis' END AS duedate_qtforegroundrole,\n 'curr' AS amount_xtnumericrole\nFROM pohead \n JOIN vendinfo ON (pohead_vend_id=vend_id) \n JOIN poitem ON (poitem_pohead_id=pohead_id) \nWHERE (poitem_status IN ('U','O'))\nGROUP BY pohead_id, pohead_number, pohead_status, vend_number, vend_name, pohead_shipvia, pohead_vend_cntct_id, \n pohead_shipto_cntct_id, pohead_vend_cntct_phone, pohead_shipto_cntct_phone, pohead_vend_cntct_honorific, \n pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix,\n pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, \n pohead_shipto_cntct_suffix\nORDER BY pohead_number;\t\n \N \N 0 278 desktop receivables Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: receivables\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT formatMoney(sum(araging_cur_val)) AS cur_val,\n formatMoney(sum(araging_thirty_val)) AS thirty_val,\n formatMoney(sum(araging_sixty_val)) AS sixty_val,\n formatMoney(sum(araging_ninety_val)) AS ninety_val,\n formatMoney(sum(araging_plus_val)) AS plus_val,\n formatMoney(sum(araging_total_val)) AS total_val \nFROM araging(current_date, false);\n \N \N 0 279 desktop salesAct Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: salesAct\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT 'Q' AS activity, AS activity_qtdisplayrole, 0 AS seq,\n COUNT(quhead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole \nFROM \n (SELECT quhead_id,\n SUM(round((noNeg(quitem_qtyord) * quitem_qty_invuomratio) * \n (currToBase(quhead_curr_id, quitem_price, quhead_quotedate) / quitem_price_invuomratio), 2) ) AS amount\n FROM quitem\n JOIN quhead ON (quitem_quhead_id=quhead_id)\n WHERE ( COALESCE(quhead_expire,current_date + 1) > current_date )\n GROUP BY quhead_id) data\nHAVING (COUNT(quhead_id) > 0)\nUNION \nSELECT 'O' AS activity, AS activity_qtdisplayrole, 1 AS seq, \n COUNT(cohead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT cohead_id,\n SUM(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * \n (currToBase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) ) AS amount\n FROM coitem\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n WHERE ( coitem_status = 'O' )\n GROUP BY cohead_id) data\nHAVING (COUNT(cohead_id) > 0)\nUNION\nSELECT 'P' AS activity, AS activity_qtdisplayrole, 2 AS seq, \n COUNT(cohead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT cohead_id,\n SUM(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * \n (currToBase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) ) AS amount\n FROM coitem\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n JOIN pack ON ((pack_head_type='SO')\n AND (pack_head_id=cohead_id))\n WHERE ( (coitem_status = 'O')\n AND (NOT pack_printed) )\n GROUP BY cohead_id) data\nHAVING (COUNT(cohead_id) > 0)\nUNION\nSELECT 'S' AS activity, AS activity_qtdisplayrole, 3 AS seq, \n COUNT(cohead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT cohead_id,\n SUM(round((shipitem_qty * coitem_qty_invuomratio) * \n (currToBase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) ) AS amount\n FROM coitem\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n JOIN shipitem ON (shipitem_orderitem_id=coitem_id)\n JOIN shiphead ON ((shiphead_order_type='SO')\n AND (shipitem_shiphead_id=shiphead_id))\n WHERE ( (coitem_status = 'O')\n AND (NOT shiphead_shipped) )\n GROUP BY cohead_id) data\nHAVING (COUNT(cohead_id) > 0)\nUNION\nSELECT 'B' AS activity, AS activity_qtdisplayrole, 4 AS seq, \n COUNT(cohead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT cohead_id,\n CASE WHEN ( \n -- For kits only when entire kit has shipped\n item_type != 'K' OR NOT coitem_id IN (\n SELECT sub.coitem_id\n FROM coitem sub\n WHERE((sub.coitem_cohead_id=coitem_cohead_id)\n AND (sub.coitem_linenumber=coitem_linenumber)\n AND (sub.coitem_subnumber > 0)\n AND ((sub.coitem_qtyord - sub.coitem_qtyshipped + sub.coitem_qtyreturned) > 0))\n )) THEN\n -- Total shipped not invoiced minus any already selected for billing not invoiced\n SUM(round(((shipitem_qty -\n COALESCE((SELECT sum(cobill_qty) \n FROM cobill \n WHERE ((cobill_coitem_id=coitem_id \n AND (cobill_invcitem_id IS NULL)\n ))),0) \n * coitem_qty_invuomratio) * \n (currToBase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio)),2))\n ELSE 0\n END AS amount\n FROM coitem\n JOIN itemsite ON (coitem_itemsite_id=itemsite_id)\n JOIN item ON (itemsite_item_id=item_id)\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n JOIN shipitem ON (shipitem_orderitem_id=coitem_id)\n JOIN shiphead ON ((shiphead_order_type='SO')\n AND (shiphead_id=shipitem_shiphead_id))\n WHERE ( (coitem_cohead_id=cohead_id)\n AND (coitem_status = 'O')\n AND (shiphead_shipped)\n AND (NOT shipitem_invoiced)\n AND (shipitem_qty > COALESCE((SELECT sum(cobill_qty)\n FROM cobill\n WHERE cobill_coitem_id=coitem_id AND cobill_invcitem_id IS NULL), 0)) )\n GROUP BY cohead_id, coitem_id, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned, \n cust_partialship, item_type) data\nHAVING (COUNT(cohead_id) > 0)\nUNION\nSELECT 'I' AS activity, AS activity_qtdisplayrole, 5 AS seq, \n COUNT(cohead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT cohead_id,\n SUM(round((cobill_qty * coitem_qty_invuomratio) * \n (currToBase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) ) AS amount\n FROM coitem\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n JOIN cobill ON (cobill_coitem_id=coitem_id)\n WHERE ( (coitem_status = 'O')\n AND (cobill_invcitem_id IS NULL) )\n GROUP BY cohead_id) data\nHAVING (COUNT(cohead_id) > 0)\nUNION\nSELECT 'T' AS activity, AS activity_qtdisplayrole, 5 AS seq, \n COUNT(invchead_id) AS count, COALESCE(sum(amount),0) AS amount, 'curr' AS amount_xtnumericrole\nFROM\n (SELECT invchead_id,\n SUM(round((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / COALESCE(invcitem_price_invuomratio,1)),2)\n ) AS amount\n FROM invcitem\n JOIN invchead ON (invcitem_invchead_id=invchead_id)\n WHERE ( NOT invchead_posted )\n GROUP BY invchead_id) data\nHAVING (COUNT(invchead_id) > 0)\nORDER BY seq;\n \N \N 0 280 desktop salesHist Summarized Sales History for Desktop Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: salesHist\n-- Notes: Summarized Sales History for Desktop\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n--------- BOOKINGS -----------\n\nSELECT , , ,\n sum(round((coitem_qtyord * coitem_qty_invuomratio) *\n (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2)) AS amount,\n sum(coitem_qtyord) AS qty,\n 'curr' AS amount_xtnumericrole,\n 'qty' AS qty_xtnumericrole,\n 0 AS amount_xttotalrole,\n 0 AS qty_xttotalrole\nFROM coitem\n JOIN cohead ON (coitem_cohead_id=cohead_id)\n JOIN custinfo ON (cust_id=cohead_cust_id)\n JOIN salesrep ON (salesrep_id=cohead_salesrep_id)\n JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN prodcat ON (item_prodcat_id=prodcat_id)\nWHERE (cohead_orderdate BETWEEN AND )\nAND (coitem_status != 'X')\nGROUP BY , , \nORDER BY ;\n\n--------- SALES HISTORY -------\n \nSELECT , , ,\n sum(round((cohist_qtyshipped * currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate)), 2)) AS amount,\n sum(cohist_qtyshipped) AS qty,\n 'curr' AS amount_xtnumericrole,\n 'qty' AS qty_xtnumericrole,\n 0 AS amount_xttotalrole,\n 0 AS qty_xttotalrole\nFROM cohist \n JOIN custinfo ON (cust_id=cohist_cust_id)\n JOIN salesrep ON (salesrep_id=cohist_salesrep_id)\n JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n JOIN item ON (item_id=itemsite_item_id)\n JOIN prodcat ON (item_prodcat_id=prodcat_id)\nWHERE (cohist_invcdate BETWEEN AND )\nGROUP BY , , \nORDER BY ;\n\n \N \N 0 281 desktop salesOpen Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: salesOpen\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cohead_id, cohead_number, cust_number, cohead_shipvia, \n cohead_billtoname, \n formatCntctName(cohead_billto_cntct_honorific, \n cohead_billto_cntct_first_name, \n cohead_billto_cntct_middle, \n cohead_billto_cntct_last_name, \n cohead_billto_cntct_suffix) AS billto_cntct, \n cohead_billto_cntct_phone,\n cohead_shiptoname, \n formatCntctName(cohead_shipto_cntct_honorific, \n cohead_shipto_cntct_first_name, \n cohead_shipto_cntct_middle, \n cohead_shipto_cntct_last_name, \n cohead_shipto_cntct_suffix) AS shipto_cntct, \n cohead_shipto_cntct_phone,\n min(coitem_scheddate) AS scheddate, \n sum(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * \n (currToBase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) ) AS amount,\n CASE WHEN (min(coitem_scheddate) <= current_date) THEN 'error' \n ELSE 'emphasis' END AS scheddate_qtforegroundrole,\n 'curr' AS amount_xtnumericrole\nFROM cohead \n JOIN custinfo ON (cohead_cust_id=cust_id) \n JOIN coitem ON (coitem_cohead_id=cohead_id) \n JOIN itemsite ON (coitem_itemsite_id=itemsite_id) \n JOIN whsinfo ON (itemsite_warehous_id=warehous_id) \nWHERE (coitem_status='O')\nGROUP BY cohead_shipvia, cohead_billtoname, cohead_billto_cntct_id, cohead_billto_cntct_phone, \n cohead_shiptoname, cohead_shipto_cntct_id, cohead_shipto_cntct_phone, cohead_id, cohead_number, \n cust_number, cohead_billtoname, cohead_shiptoname, \n cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, \n cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix,\n cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, \n cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix\nORDER BY cohead_number;\n \N \N 0 565 desktop sendMessageToUser User Message query. Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\r\n-- Name: sendMessageToUser\r\n-- Notes: User Message query.\r\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\r\n-- See www.xtuple.com/CPAL for the full text of the software license.\r\n\r\nSELECT \r\npostmessage(\r\n( SELECT usr_username FROM usr WHERE usr_id = ),\r\n \r\n ); \N \N 0 282 desktop todoDelete Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: todoDelete\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDELETE FROM todoitem WHERE (todoitem_id=);\n \N \N 0 283 desktop todoList Select the list of activities that need attention including to-do items, incidents, tasks, and projects. Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: todoList\n-- Notes: Select the list of activities that need attention\n-- including to-do items, incidents, tasks, and projects.\n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n------ TO DO ITEMS-------\n SELECT todoitem_id AS id, 1 AS altId, todoitem_owner_username AS owner, \n AS type, incdtpriority_order AS seq,\n incdtpriority_name AS priority, \n todoitem_name AS name, \n firstLine(todoitem_description) AS descrip, \n todoitem_status AS status, todoitem_start_date as start, \n todoitem_due_date AS due, \n todoitem_username AS usr, CAST(incdt_number AS text) AS number,\n crmacct_number, crmacct_name, \n cust_number AS cust,\n CASE WHEN (todoitem_status != 'C'AND \n todoitem_due_date < CURRENT_DATE) THEN 'expired'\n WHEN (todoitem_status != 'C'AND \n todoitem_due_date > CURRENT_DATE) THEN 'future'\n END AS due_qtforegroundrole \n FROM todoitem LEFT OUTER JOIN incdt ON (incdt_id=todoitem_incdt_id) \n LEFT OUTER JOIN crmacct ON (crmacct_id=todoitem_crmacct_id) \n LEFT OUTER JOIN custinfo ON (cust_id=crmacct_cust_id) \n LEFT OUTER JOIN incdtpriority ON (incdtpriority_id=todoitem_priority_id) \n WHERE ((todoitem_active)\n AND (todoitem_status != 'C')\n AND ((todoitem_owner_username=) \n OR (todoitem_username=))) \n UNION \n------ INCIDENTS ------\n SELECT incdt_id AS id, 2 AS altId, incdt_owner_username AS owner, \n AS type, incdtpriority_order AS seq,\n incdtpriority_name AS priority, \n incdt_summary AS name, \n firstLine(incdt_descrip) AS descrip, \n incdt_status AS status, CAST(incdt_timestamp AS date) AS start, \n null AS due, \n incdt_assigned_username AS usr, CAST(incdt_number AS text) AS number,\n crmacct_number, crmacct_name,\n cust_number AS cust, \n NULL AS due_qtforegroundrole \n FROM incdt LEFT OUTER JOIN crmacct ON (crmacct_id=incdt_crmacct_id) \n LEFT OUTER JOIN custinfo ON (cust_id=crmacct_cust_id) \n LEFT OUTER JOIN incdtpriority ON (incdtpriority_id=incdt_incdtpriority_id) \n WHERE ((incdt_status != 'L')\n AND ((incdt_owner_username=) \t \n OR (incdt_assigned_username=)))\n------ TASKS ------\n UNION \n SELECT prjtask_id AS id, 3 AS altId, prjtask_owner_username AS owner, \n AS type, NULL AS seq, NULL AS priority, \n prjtask_number || '-' || prjtask_name AS name, \n firstLine(prjtask_descrip) AS descrip, \n prjtask_status AS status, prjtask_start_date AS start, \n prjtask_due_date AS due, \n prjtask_username AS usr, prj_number,\n '' AS crmacct_number, '' AS crmacct_name, '' AS cust, \n CASE WHEN (prjtask_status != 'C'AND \n prjtask_due_date < CURRENT_DATE) THEN 'expired'\n WHEN (prjtask_status != 'C'AND \n prjtask_due_date > CURRENT_DATE) THEN 'future'\n END AS due_qtforegroundrole \n FROM prj, prjtask \n WHERE((prj_id=prjtask_prj_id) \n AND (prjtask_status != 'C')\n AND ((prjtask_owner_username=) \n OR (prjtask_username=))) \n------ PROJECTS ------\n UNION \n SELECT prj_id AS id, 4 AS altId, prj_owner_username AS owner, \n AS type, NULL AS seq, NULL AS priority, \n prj_number || '-' || prj_name AS name, \n firstLine(prj_descrip) AS descrip, \n prj_status AS status, prj_start_date AS start, \n prj_due_date AS due, \n prj_username AS usr, NULL AS number,\n '' AS crmacct_number, '' AS crmacct_name,'' AS cust, \n CASE WHEN (prj_status != 'C'AND \n prj_due_date < CURRENT_DATE) THEN 'expired'\n WHEN (prj_status != 'C'AND \n prj_due_date > CURRENT_DATE) THEN 'future'\n END AS due_qtforegroundrole \n FROM prj \n WHERE ((prj_status != 'C')\n AND ((prj_owner_username=) \n OR (prj_username=)))\nORDER BY due, seq, usr; \n \N \N 0 284 desktop userOnline Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. See www.xtuple.com/CPAL for the full text of the software license. -- Group: desktop\n-- Name: userOnline\n-- Notes: \n-- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT usr_id, usr_username, usr_propername, usr_email,\n min(backend_start) AS client_start, max(query_start) AS query_start,\n sum(CASE WHEN(database IS NULL) THEN 0 ELSE 1 END) AS cnt_internal,\n sum(CASE WHEN(database IS NULL) THEN 1 ELSE 0 END) AS cnt_external,\n client_addr, '0' AS cnt_internal_xttotalrole, '0' AS cnt_external_xttotalrole\n FROM pg_stat_activity\n JOIN usr ON (usr_id=usesysid)\n LEFT OUTER JOIN pg_locks ON (database=datid AND classid=datid AND objid=procpid AND objsubid=2)\n WHERE(datname=current_database())\n GROUP BY usr_id, usr_username, usr_propername, usr_email,\n client_addr, cnt_internal_xttotalrole, cnt_external_xttotalrole;\n \N \N 0 \. -- -- Data for Name: pkgpriv; Type: TABLE DATA; Schema: xtdesktop; Owner: admin -- COPY pkgpriv (priv_id, priv_module, priv_name, priv_descrip, priv_seq) FROM stdin; 672 Desktop AccessAdditionalUser Controls access to additional Users \N 605 Desktop ViewBankAccountsDock Allows the user to view the Bank Accounts dock widget on the Desktop \N 606 Desktop ViewExtensionsDock Allows the user to view the Extensions dock widget on the Desktop \N 607 Desktop ViewGLAccountsDock Allows the user to view Monitored General Ledger Accounts dock widget on the Desktop \N 608 Desktop ViewManufactureActivitiesDock Allows the user to view the Manufacture Activities dock widget on the Desktop \N 609 Desktop ViewManufactureHistoryDock Allows the user to view the Manufacture History dock widget on the Desktop \N 610 Desktop ViewMyAccountsDock Allows the user to view the My (CRM) Accounts dock widget on the Desktop \N 611 Desktop ViewMyContactsDock Allows the user to view the My Contact dock widget on the Desktop \N 612 Desktop ViewTodoDock Allows the user to view the To Do dock widget on the Desktop \N 613 Desktop ViewPayablesDock Allows the user to view the Payables dock widget on the Desktop \N 614 Desktop ViewPurchaseActivitiesDock Allows the user to view the Purchase Activities dock widget on the Desktop \N 615 Desktop ViewPurchaseHistoryDock Allows the user to view the Purchase History dock widget on the Desktop \N 616 Desktop ViewPurchaseOrdersDock Allows the user to view the open purchase orders dock widget on the Desktop \N 617 Desktop ViewReceivablesDock Allows the user to view the Purchase History dock widget on the Desktop \N 618 Desktop ViewSalesActivitiesDock Allows the user to view the Sales Activities dock widget on the Desktop \N 619 Desktop ViewSalesHistoryDock Allows the user to view the Sales History dock widget on the Desktop \N 620 Desktop ViewSalesOrdersDock Allows the user to view the Sales Orders dock widget on the Desktop \N 621 Desktop ViewWorkOrdersDock Allows the user to view the Work Orders dock widget on the Desktop \N 622 Desktop ViewUsersOnlineDock Allows the user to view the Users Online doc \N 623 Desktop ViewCRMDesktop Allows the user to view the CRM Desktop page \N 624 Desktop ViewSalesDesktop Allows the user to view the Sales Desktop page \N 625 Desktop ViewPurchaseDesktop Allows the user to view the Purchase Desktop page \N 626 Desktop ViewManufactureDesktop Allows the user to view the Manufacture Desktop page \N 627 Desktop ViewAccountingDesktop Allows the user to view the Accounting Desktop page \N 628 Desktop ViewMaintenanceDesktop Allows the user to view the Maintenance Desktop page \N 673 Desktop viewSocialDesktop Allows the user to view the Social Desktop page \N 674 Desktop viewMsgHistoryDock Allows the user to view the Message History dock widget on the Desktop \N 675 Desktop viewSendMsgDock Allows the user to view the Sed Message dock widget on the Desktop \N \. -- -- Data for Name: pkgreport; Type: TABLE DATA; Schema: xtdesktop; Owner: admin -- COPY pkgreport (report_id, report_name, report_sys, report_source, report_descrip, report_grade, report_loaddate) FROM stdin; \. -- -- Data for Name: pkgscript; Type: TABLE DATA; Schema: xtdesktop; Owner: admin -- COPY pkgscript (script_id, script_name, script_order, script_enabled, script_source, script_notes) FROM stdin; 265 dockPurchOpen 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockPurchOpen;\nvar _purchOpen;\nvar _purchOpenIsDirty = true;\n\n/*!\n Initializes Open Purchase Order dock widget and places it in the main window.\n*/\nfunction initDockPurchOpen()\n{\n _dockPurchOpen = mainwindow.findChild("_dockPurchOpen");\n _purchOpen = mainwindow.findChild("_purchOpen");\n\n // Set columns on list\n _purchOpen.addColumn(qsTr("Order#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "pohead_number");\n _purchOpen.addColumn(qsTr("Vendor#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "vend_number");\n _purchOpen.addColumn(qsTr("Name"), -1, Qt.AlignLeft, true, "vend_name");\n _purchOpen.addColumn(qsTr("Contact"), -1, Qt.AlignLeft, true, "vend_cntct");\n _purchOpen.addColumn(qsTr("Phone"), -1, Qt.AlignLeft, true, "pohead_vend_cntct_phone"); \n _purchOpen.addColumn(qsTr("Status"), -1, Qt.AlignLeft, true, "status");\n _purchOpen.addColumn(qsTr("Ship Contact"), -1, Qt.AlignLeft, false, "shipto_cntct");\n _purchOpen.addColumn(qsTr("Ship Phone"), -1, Qt.AlignLeft, false, "pohead_shipto_cntct_phone"); \n _purchOpen.addColumn(qsTr("Ship Via"), -1, Qt.AlignLeft, true, "pohead_shipvia"); \n _purchOpen.addColumn(qsTr("Due Date"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "duedate");\n _purchOpen.addColumn(qsTr("Amount"), XTreeWidget.moneyColumn, Qt.AlignRight, true, "amount");\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshPurchOpen);\n mainwindow.purchaseOrderReceiptsUpdated.connect(refreshPurchOpen);\n mainwindow.purchaseOrdersUpdated.connect(refreshPurchOpen);\n\n _purchOpen.itemSelected.connect(openWindowPurchOpen);\n _purchOpen["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuPurchOpen);\n\n _dockPurchOpen.visibilityChanged.connect(fillListPurchOpen);\n\n // Handle privilge control\n var act = _dockPurchOpen.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewPurchaseOrdersDock"))\n {\n _dockPurchOpen.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewPurchaseOrdersDock");\n _menuDesktop.appendAction(act);\n\n fillListPurchOpen();\n}\n\n/*!\n Fills the list with open purchase data.\n*/\nfunction fillListPurchOpen()\n{\n _dockPurchOpen = mainwindow.findChild("_dockPurchOpen");\n _purchOpen = mainwindow.findChild("_purchOpen");\n\n if (!_dockPurchOpen.visible || !_purchOpenIsDirty)\n return;\n\n var params = new Object;\n params.open = qsTr("Open");\n params.unreleased = qsTr("Unreleased");\n\n _purchOpen.populate(toolbox.executeDbQuery("desktop","purchOpen",params));\n _purchOpenIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowPurchOpen()\n{ \n // Make sure we can open the window for this activity\n if (!privilegeCheckPurchOpen)\n return;\n\n params = new Object;\n params.pohead_id = _purchOpen.id();\n if (privileges.check("MaintainPurchaseOrders"))\n params.mode = "edit";\n else\n params.mode = "view";\n\n // Open the window and perform any handling required\n var po = toolbox.openWindow("purchaseOrder");\n po.set(params);\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a Purchase Order item.\n*/\nfunction populateMenuPurchOpen(pMenu, pItem)\n{\n var menuItem;\n var enable = privilegeCheckPurchOpen();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowPurchOpen);\n}\n\n/*!\n Returns whether user has privileges to view detail on the selected Purchase Order.\n*/\nfunction privilegeCheckPurchOpen()\n{\n return privileges.check("ViewPurchaseOrders") || \n privileges.check("MaintainPurchaseOrders");\n\n return false;\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshPurchOpen()\n{\n _purchOpenIsDirty = true;\n fillListPurchOpen();\n}\n 266 dockReceivables 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockReceivables;\nvar _receivables;\nvar _receivablesIsDirty = true;\n\n/*!\n Initializes Bank Balance dock widget and places it in the main window.\n*/\nfunction initDockReceivables()\n{\n _dockReceivables = mainwindow.findChild("_dockReceivables");\n _ar = mainwindow.findChild("_ar");\n _ar.rootIsDecorated = false;\n\n // Set columns on list\n _ar.addColumn(qsTr("Status"), -1, Qt.AlignLeft, true);\n _ar.addColumn(qsTr("Balance"), -1, Qt.AlignRight, true);\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshReceivables);\n mainwindow.checksUpdated.connect(refreshReceivables);\n mainwindow.paymentsUpdated.connect(refreshReceivables);\n mainwindow.vouchersUpdated.connect(refreshReceivables);\n\n _ar.itemSelected.connect(openWindowReceivables);\n _ar["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuReceivables);\n\n _dockReceivables.visibilityChanged.connect(fillListReceivables);\n\n // Handle privilge control\n var act = _dockReceivables.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewReceivablesDock"))\n {\n _dockReceivables.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewReceivablesDock");\n _menuDesktop.appendAction(act);\n\n fillListReceivables();\n}\n\n/*!\n Fills the list with bank account data.\n*/\nfunction fillListReceivables()\n{\n _dockReceivables = mainwindow.findChild("_dockReceivables");\n _ar = mainwindow.findChild("_ar");\n\n if (!_dockReceivables.visible || !_receivablesIsDirty)\n return;\n\n var q = toolbox.executeDbQuery("desktop","receivables");\n q.first();\n \n _ar.clear();\n var item1 = new XTreeWidgetItem(_ar, 0, qsTr("0+ Days"), q.value("cur_val"));\n var item2 = new XTreeWidgetItem(_ar, 1, qsTr("0-30 Days"), q.value("thirty_val"));\n var item3 = new XTreeWidgetItem(_ar, 2, qsTr("31-60 Days"), q.value("sixty_val"));\n var item4 = new XTreeWidgetItem(_ar, 3, qsTr("61-90 Days"), q.value("ninety_val"));\n var item5 = new XTreeWidgetItem(_ar, 4, qsTr("90+ days"), q.value("plus_val"));\n var item6 = new XTreeWidgetItem(_ar, 5, qsTr("Total Open"), q.value("total_val"));\n\n _receivablesIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowReceivables()\n{\n // Make sure we can open the window\n if (!privilegeCheckReceivables())\n return;\n\n var params = new Object;\n params.run = true;\n params.byDueDate = true;\n\n var asOfDate = mainwindow.dbDate();\n var startDate = new Date();\n var endDate = new Date();\n\n // Open the window and perform any handling required\n toolbox.openWindow("dspAROpenItems");\n\n if (_ar.id() == 0)\n {\n startDate.setDate(asOfDate.getDate());\n toolbox.lastWindow().findChild("_dates").setStartDate(startDate);\n }\n else if (_ar.id() == 1)\n {\n startDate.setDate(asOfDate.getDate() -30);\n endDate.setDate(asOfDate.getDate() -1);\n toolbox.lastWindow().findChild("_dates").setStartDate(startDate);\n toolbox.lastWindow().findChild("_dates").setEndDate(endDate);\n }\n else if (_ar.id() == 2)\n {\n startDate.setDate(asOfDate.getDate() -60);\n endDate.setDate(asOfDate.getDate() -31);\n toolbox.lastWindow().findChild("_dates").setStartDate(startDate);\n toolbox.lastWindow().findChild("_dates").setEndDate(endDate);\n }\n else if (_ar.id() == 3)\n {\n startDate.setDate(asOfDate.getDate() -90);\n endDate.setDate(asOfDate.getDate() -61);\n toolbox.lastWindow().findChild("_dates").setStartDate(startDate);\n toolbox.lastWindow().findChild("_dates").setEndDate(endDate);\n }\n else if (_ar.id() == 4)\n {\n endDate.setDate(asOfDate.getDate() -91);\n toolbox.lastWindow().findChild("_dates").setEndDate(endDate);\n }\n\n toolbox.lastWindow().set(params);\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a bank account item.\n*/\nfunction populateMenuReceivables(pMenu, pItem)\n{\n var menuItem;\n var enable = privilegeCheckReceivables();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowReceivables);\n}\n\n/*!\n Returns whether user has privileges to view detail.\n*/\nfunction privilegeCheckReceivables(act)\n{\n return privileges.check("ViewAROpenItems");\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshReceivables()\n{\n _receivablesIsDirty = true;\n fillListReceivables();\n}\n 267 dockSalesActive 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockSalesAct;\nvar _salesAct;\nvar _salesActIsDirty = true;\n\n/*!\n Initializes Sales Activity dock widget and places it in the main window.\n*/\nfunction initDockSalesAct()\n{\n _dockSalesAct = mainwindow.findChild("_dockSalesAct");\n _salesAct = mainwindow.findChild("_salesAct");\n\n // Set columns on list\n _salesAct.addColumn(qsTr("Type"), -1, Qt.AlignLeft, true, "activity");\n _salesAct.addColumn(qsTr("#"), 40, Qt.AlignRight, true, "count");\n _salesAct.addColumn(qsTr("Amount"), -1, Qt.AlignRight, true, "amount");\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshSalesAct);\n mainwindow.billingSelectionUpdated.connect(refreshSalesAct);\n mainwindow.invoicesUpdated.connect(refreshSalesAct);\n mainwindow.quotesUpdated.connect(refreshSalesAct)\n mainwindow.salesOrdersUpdated.connect(refreshSalesAct);\n\n _salesAct.itemSelected.connect(openWindowSalesAct);\n _salesAct["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuSalesAct);\n\n _dockSalesAct.visibilityChanged.connect(fillListSalesAct);\n\n // Handle privilge control\n var act = _dockSalesAct.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewSalesActivitiesDock"))\n {\n _dockSalesAct.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewSalesActivitiesDock");\n _menuDesktop.appendAction(act);\n fillListSalesAct();\n}\n\n/*!\n Fills the list with active sales data.\n*/\nfunction fillListSalesAct()\n{\n _dockSalesAct = mainwindow.findChild("_dockSalesAct");\n _salesAct = mainwindow.findChild("_salesAct");\n\n if (!_dockSalesAct.visible || !_salesActIsDirty)\n return;\n\n var params = new Object;\n params.quotes = qsTr("Quotes");\n params.open = qsTr("Orders");\n params.print = qsTr("To Print");\n params.pick = qsTr("Pick");\n params.ship = qsTr("At Shipping");\n params.bill = qsTr("Shipped");\n params.invoice = qsTr("To Bill");\n params.post = qsTr("Invoiced");\n\n _salesAct.populate(toolbox.executeDbQuery("desktop","salesAct", params));\n _salesActIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowSalesAct()\n{\n var ui;\n var run = false;\n var act = _salesAct.currentItem().rawValue("activity");\n \n // Make sure we can open the window for this activity\n if (!privilegeCheckSalesAct(act))\n return;\n\n // Determine which window to open\n if (act == "Q")\n {\n ui = "quotes";\n run = true;\n }\n else if (act == "O")\n {\n ui = "openSalesOrders";\n run = true;\n }\n else if (act == "P")\n ui = "packingListBatch";\n else if (act == "S")\n {\n ui = "maintainShipping";\n run = true;\n }\n else if (act == "B")\n ui = "uninvoicedShipments";\n else if (act == "I")\n ui = "dspBillingSelections";\n else if (act == "T")\n ui = "unpostedInvoices";\n\n // Open the window and perform any handling required\n toolbox.openWindow(ui);\n if (run)\n toolbox.lastWindow().sFillList();\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a Sales Activity item.\n*/\nfunction populateMenuSalesAct(pMenu, pItem)\n{\n var menuItem;\n var act = pItem.rawValue("activity");\n var enable = privilegeCheckSalesAct(act);\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowSalesAct);\n}\n\n/*!\n Returns whether user has privileges to view detail on the selected Sales Activity.\n*/\nfunction privilegeCheckSalesAct(act)\n{\n if (act == "Q") // Quote\n return privileges.check("ViewQuotes") || \n privileges.check("MaintainQuotes")\n else if (act == "O") // Open Sales Orders\n return privileges.check("ViewSalesOrders") || \n privileges.check("MaintainSalesOrders");\n else if (act == "P") // Packlist Batch\n return privileges.check("ViewPackingListBatch") || \n privileges.check("MaintainPackingListBatch");\n else if (act == "S") // Shipping\n return privileges.check("ViewShipping");\n else if (act == "B" || \n act == "I" || \n act == "T") // Billing, Invoicing\n return privileges.check("SelectBilling");\n\n return false;\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshSalesAct()\n{\n _salesActIsDirty = true;\n fillListSalesAct();\n}\n 268 dockSalesHistory 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _b1SalesHist;\nvar _b2SalesHist;\nvar _dockSalesHist;\nvar _groupBySalesHist;\nvar _timeFrameSalesHist;\nvar _typeSalesHist;\nvar _labelSalesHist;\nvar _salesHist;\nvar _salesHistIsDirty = true;\n\n/*!\n Initializes Sales History dock widget and places it in the main window.\n*/\nfunction initDockSalesHist()\n{\n // Set up objects\n _dockSalesHist = mainwindow.findChild("_dockSalesHist");\n _salesHist = mainwindow.findChild("_salesHist");\n\n _b1SalesHist = _dockSalesHist.findChild("_button1");\n _b2SalesHist = _dockSalesHist.findChild("_button2");\n _labelSalesHist = _dockSalesHist.findChild("_label");\n\n // Set icons\n var iReload = new QIcon;\n iReload.addDbImage("reload_16");\n _b1SalesHist.icon = iReload;\n _b1SalesHist.text = "";\n _b1SalesHist.toolTip = qsTr("Reload");\n\n var iGear = new QIcon();\n iGear.addDbImage("gear_16");\n _b2SalesHist.icon = iGear;\n _b2SalesHist.text = "";\n _b2SalesHist.toolTip = qsTr("Preferences...");\n\n // Load local preferences\n loadPreferencesSalesHist();\n\n // Set columns on list\n setColumnsSalesHist();\n\n // Populate the data\n fillListSalesHist();\n\n // Connect Signals and Slots\n _b1SalesHist.clicked.connect(refreshSalesHist);\n _b2SalesHist.clicked.connect(preferencesSalesHist);\n\n _dtTimer.timeout.connect(refreshSalesHist);\n mainwindow.salesOrdersUpdated.connect(refreshSalesHist);\n\n _salesHist.itemSelected.connect(openWindowSalesHist);\n _salesHist["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuSalesHist);\n\n _dockSalesHist.visibilityChanged.connect(fillListSalesHist);\n\n // Handle privilge control\n var act = _dockSalesHist.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewSalesHistoryDock"))\n {\n _dockSalesHist.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewSalesHistoryDock");\n _menuDesktop.appendAction(act);\n\n fillListSalesHist();\n}\n\n/*!\n Fills the list with sales history data based on parameters determined by\n sales history preferences.\n\n @sa preferencesSalesHist()\n*/\nfunction fillListSalesHist()\n{\n _dockSalesHist = mainwindow.findChild("_dockSalesHist");\n _salesHist = mainwindow.findChild("_salesHist");\n\n if (!_dockSalesHist.visible || !_salesHistIsDirty)\n return;\n\n var timeFrame;\n var type;\n var params = getDatesSalesHist();\n\n if (_typeSalesHist == "bookings")\n params.bookings = true;\n else\n params.sales = true;\n \n if (_groupBySalesHist == "cust")\n {\n params.group_id = "cust_id";\n params.group_number = "cust_number";\n params.group_name = "cust_name";\n }\n else if (_groupBySalesHist == "prodcat")\n {\n params.group_id = "prodcat_id";\n params.group_number = "prodcat_code";\n params.group_name = "prodcat_descrip";\n }\n else if (_groupBySalesHist == "salesrep")\n {\n params.group_id = "salesrep_id";\n params.group_number = "salesrep_number";\n params.group_name = "salesrep_name";\n }\n\n _salesHist.populate(toolbox.executeDbQuery("desktop","salesHist", params));\n\n if ("bookings" in params)\n type = qsTr("Bookings");\n else\n type = qsTr("Sales");\n\n if (_timeFrameSalesHist == "day")\n timeFrame = qsTr("Today");\n else if (_timeFrameSalesHist == "week")\n timeFrame = qsTr("this Week");\n else if (_timeFrameSalesHist == "month")\n timeFrame = qsTr("this Month");\n else if (_timeFrameSalesHist == "year")\n timeFrame = qsTr("this Year");\n\n _labelSalesHist.text = type + " " + timeFrame;\n\n _salesHistIsDirty = false;\n}\n\n/*!\n Returns an object with a list containing @a startDate and @a endDate\n that is used for fetching data and opening windows using the date range\n stored in local preferences.\n \n @sa preferencesSalesHist()\n @sa openWindowSalesHist()\n @sa fillListSalesHist()\n*/\nfunction getDatesSalesHist()\n{\n var params = new Object;\n\n params.timeFrame = _timeFrameSalesHist;\n params.interval = "1 " + _timeFrameSalesHist;\n\n var q = toolbox.executeDbQuery("desktop", "getDates", params);\n\n if (q.first())\n {\n params.startDate = q.value("startDate");\n params.endDate = q.value("endDate");\n }\n\n return params;\n}\n\n/*! \n Loads local Sales History preferences into memory.\n\n @sa preferencesSalesHist()\n*/\nfunction loadPreferencesSalesHist()\n{\n // Load preferences\n _groupBySalesHist = preferences.value("desktop/salesHist/groupBy");\n _timeFrameSalesHist = preferences.value("desktop/salesHist/timeFrame");\n _typeSalesHist = preferences.value("desktop/salesHist/type")\n \n // Set to defaults if no values\n _groupBySalesHist = (_groupBySalesHist.length ? _groupBySalesHist : "cust");\n _timeFrameSalesHist = (_timeFrameSalesHist.length ? _timeFrameSalesHist : "year");\n _typeSalesHist = (_typeSalesHist.length ? _typeSalesHist : "bookings");\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowSalesHist()\n{\n var ui;\n var params = getDatesSalesHist();\n params.run = true;\n\n // TO DO: Work it out so totals launch a window too\n if (_salesHist.id() == -1)\n return;\n \n // Make sure we can open the window\n if (!privilegeCheckSalesHist())\n return;\n\n // Determine which window to open\n if (_typeSalesHist == "bookings")\n ui = "dspBookings";\n else\n ui = "dspSalesHistory";\n if (_groupBySalesHist == "cust")\n params.cust_id = _salesHist.id();\n else if (_groupBySalesHist == "prodcat")\n params.prodcat_id = _salesHist.id();\n else if (_groupBySalesHist == "salesrep")\n params.salesrep_id = _salesHist.id();\n\n // Open the window and perform any special handling required\n toolbox.openWindow(ui);\n toolbox.lastWindow().set(params);\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on sales history.\n*/\nfunction populateMenuSalesHist(pMenu)\n{\n var menuItem;\n var enable = privilegeCheckSalesHist();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowSalesHist);\n}\n\n/*!\n Returns whether user has privileges to view Sales History detail.\n*/\nfunction privilegeCheckSalesHist()\n{\n return privileges.check("ViewSalesHistory");\n}\n\n/*! \n Set up columns depending on local preferences.\n\n @sa preferencesSalesHist()\n*/\nfunction setColumnsSalesHist()\n{\n _salesHist.columnCount = 0;\n\n if (_groupBySalesHist == "cust")\n {\n _salesHist.addColumn(qsTr("Customer"), -1, Qt.AlignLeft, true, "cust_number");\n _salesHist.addColumn(qsTr("Name"), -1, Qt.AlignLeft, false, "cust_name");\n }\n else if (_groupBySalesHist == "prodcat")\n {\n _salesHist.addColumn(qsTr("Product Category"), -1, Qt.AlignLeft, true, "prodcat_code");\n _salesHist.addColumn(qsTr("Description"), -1, Qt.AlignLeft, false, "prodcat_descrip");\n }\n else if (_groupBySalesHist == "salesrep")\n {\n _salesHist.addColumn(qsTr("Sales Rep."), -1, Qt.AlignLeft, true, "salesrep_number");\n _salesHist.addColumn(qsTr("Name"), -1, Qt.AlignLeft, false, "salesrep_name");\n }\n\n _salesHist.addColumn(qsTr("Amount"), -1, Qt.AlignRight, true, "amount");\n _salesHist.addColumn(qsTr("Qty."), -1, Qt.AlignRight, false, "qty");\n}\n\n/*! \n Launches the preferences window where the user can set sales data output preferences.\n*/\nfunction preferencesSalesHist()\n{\n params = new Object;\n params.path = "desktop/salesHist";\n params.groupBy = _groupBySalesHist;\n params.timeFrame = _timeFrameSalesHist;\n params.type = _typeSalesHist;\n\n var newdlg = toolbox.openWindow("preferencesHistory", mainwindow,\n Qt.ApplicationModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n if (newdlg.exec())\n {\n loadPreferencesSalesHist();\n setColumnsSalesHist();\n refreshSalesHist();\n }\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshSalesHist()\n{\n _salesHistIsDirty = true;\n fillListSalesHist();\n}\n 424 dockSendMessage 0 t var _dockSendMessage;\nvar _usr;\nvar _message;\nvar _send;\nvar _sendMessageIsDirty = true;\nvar _periodId = -1;\nvar _b1CommentConsole;\nvar _b2CommentConsole;\nvar _commentConsole;\nvar _commentConsoleIsDirty = true;\nvar _periodId = -1;\n\nfunction initDockSendMessage()\n{\n // Set up objects\n _dockSendMessage = mainwindow.findChild("_dockSendMessage");\n _usr = mainwindow.findChild("_usr");\n _message = mainwindow.findChild("_message");\n _send = mainwindow.findChild("_send");\n\n _commentConsole = mainwindow.findChild("_commentConsole");\n\n _b1CommentConsole = mainwindow.findChild("_button1");\n _b2CommentConsole = mainwindow.findChild("_button2");\n\n // Set icons\n var iReload = new QIcon;\n iReload.addDbImage("reload_16");\n _b1CommentConsole.icon = iReload;\n _b1CommentConsole.text = "";\n _b1CommentConsole.toolTip = qsTr("Reload");\n\n var iGear = new QIcon();\n iGear.addDbImage("gear_16");\n _b2CommentConsole.icon = iGear;\n _b2CommentConsole.text = "";\n _b2CommentConsole.toolTip = qsTr("Preferences...");\n\n // Set columns on list\n _commentConsole.addColumn("Date", 75, 1, true, "comment_date");\n _commentConsole.addColumn("Comment Type", 115, 1, true, "cmnttype_name");\n _commentConsole.addColumn("Text", 90, 1, true, "comment_text");\n _commentConsole.addColumn("Source", 115, 1, true, "comment_source")\n _commentConsole.addColumn("User", 65, 1, true, "comment_user")\n _commentConsole.addColumn("Detail", -1, 1, true, "info");\n _commentConsole.addColumn("Points", 40, 3, true, "points");\n\n mainwindow.itemsitesUpdated.connect(refreshCommentConsole);\n mainwindow.warehousesUpdated.connect(refreshCommentConsole);\n mainwindow.customersUpdated.connect(refreshCommentConsole)\n mainwindow.employeeUpdated.connect(refreshCommentConsole);\n mainwindow.vendorsUpdated.connect(refreshCommentConsole);\n mainwindow.returnAuthorizationsUpdated.connect(refreshCommentConsole);\n mainwindow.salesOrdersUpdated.connect(refreshCommentConsole)\n mainwindow.quotesUpdated.connect(refreshCommentConsole);\n mainwindow.workOrdersUpdated.connect(refreshCommentConsole);\n mainwindow.purchaseOrdersUpdated.connect(refreshCommentConsole);\n mainwindow.bomsUpdated.connect(refreshCommentConsole)\n mainwindow.bbomsUpdated.connect(refreshCommentConsole);\n mainwindow.boosUpdated.connect(refreshCommentConsole);\n mainwindow.projectsUpdated.connect(refreshCommentConsole);\n mainwindow.crmAccountsUpdated.connect(refreshCommentConsole)\n mainwindow.transferOrdersUpdated.connect(refreshCommentConsole);\n\n // Connect Signals and Slots\n _b1CommentConsole.clicked.connect(refreshCommentConsole);\n _b2CommentConsole.clicked.connect(preferencesCommentConsole);\n\n _commentConsole["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuCommentConsole);\n\n mainwindow["tick()"].connect(refreshCommentConsole);\n\n // Don't show if no privs\n var act = _dockSendMessage.toggleViewAction();\n if (!privileges.check("viewSendMsgDock"))\n { \n _dockSendMessage.hide();\n act.enabled = false;\n }\n else\n {\n _dockSendMessage.show();\n act.enabled = true;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("viewSendMsgDock");\n _menuDesktop.appendAction(act);\n\n _usr["newId(int)"].connect(sHandleButtons);\n _send.clicked.connect(send);\n\n fillListCommentConsole();\n}\n\nfunction getParams()\n{\n var params = new Object;\n\n params.message = _message.plainText;\n if (_usr.id() > 0)\n params.usr_id = _usr.id();\n\n return params;\n}\n\nfunction sHandleButtons()\n{\n var qry = "SELECT usr_id FROM usr WHERE usr_username = current_user;";\n var data = toolbox.executeQuery(qry, -1);\n if (data.first())\n var currenttUsr_id = data.value("usr_id");\n\n if (currenttUsr_id == _usr.id())\n {\n if (QMessageBox.information(mainwindow, qsTr("Send Message?"),\n qsTr("You are trying to Send Message to Yourself."\n +"\\nAre you sure that you really want to Continue?."),\n QMessageBox.Yes | QMessageBox.Default, QMessageBox.No | QMessageBox.Escape) == QMessageBox.No)\n {\n _usr.clear();\n return;\n }\n else\n _send.enabled = (_usr.id() >= 0);\n }\n else\n _send.enabled = (_usr.id() >= 0);\n}\n\nfunction send()\n{\n var params = getParams();\n var qry = toolbox.executeDbQuery("desktop", "sendMessageToUser", params);\n QMessageBox.information(mainwindow,'Sent','Message Sent');\n clear();\n}\n\nfunction set(input)\n{\n if ("user" in input)\n _usr.setUsername(input.user);\n else\n QMessageBox.warning(mywindow, "Message", "Could not set username");\n}\n\nfunction clear()\n{\n _usr.clear();\n _message.clear();\n}\n\nfunction fillListCommentConsole()\n{\n _commentConsole = mainwindow.findChild("_commentConsole");\n\n var cmmntTypeList = preferences.value("MonitoredCommentTypes");\n var cmmntSrcList = preferences.value("MonitoredCommentSrcs");\n var cmmntUsrList = preferences.value("MonitoredCommentUsrs");\n\n var params = new Object;\n\n //Checking whether xtmfg package exists in the database or not\n var checkxtmfg = "SELECT pkghead_id "\n + "FROM pkghead "\n + "WHERE (pkghead_name = 'xtmfg');";\n var datacheckxtmfg = toolbox.executeQuery(checkxtmfg, params);\n if (datacheckxtmfg.first())\n params.xtmfg_exist = datacheckxtmfg.value("pkghead_id");\n else if (datacheckxtmfg.lastError().type != QSqlError.NoError)\n {\n QMessageBox.critical(mainwindow, qsTr("Database Error"),\n datacheckxtmfg.lastError().text);\n return;\n }\n\n var getDate = "SELECT CURRENT_DATE + CAST( AS INTEGER) AS datevalue;";\n\n params.offSet = ((preferences.value("MonitoredCommentStrtDate") != '')?preferences.value("MonitoredCommentStrtDate"):-1);\n var data = toolbox.executeQuery(getDate, params);\n if (data.first())\n params.startDate = data.value("datevalue");\n else if (data.lastError().type != QSqlError.NoError)\n {\n QMessageBox.critical(mainwindow, qsTr("Database Error"),\n data.lastError().text);\n return;\n }\n\n params.offSet = ((preferences.value("MonitoredCommentEndDate") != '')?preferences.value("MonitoredCommentEndDate"):0);\n var data = toolbox.executeQuery(getDate, params);\n if (data.first())\n params.endDate = data.value("datevalue");\n else if (data.lastError().type != QSqlError.NoError)\n {\n QMessageBox.critical(mainwindow, qsTr("Database Error"),\n data.lastError().text);\n return;\n }\n\n _commentConsole.clear();\n \n if (cmmntTypeList.length)\n params.commenttype_id = cmmntTypeList;\n\n if (cmmntSrcList.length)\n {\n params.sourceidlist = cmmntSrcList;\n var sourceList = new Array();\n var data = toolbox.executeDbQuery("desktop","cmmntPrefSrc", params);\n var i = 0;\n while (data.next())\n sourceList.push(data.value("cmntsource_name"));\n params.source = sourceList;\n }\n\n if(cmmntUsrList.length)\n params.usr_id = cmmntUsrList;\n\n _commentConsole.populate(toolbox.executeDbQuery("desktop","commentConsole", params));\n _commentConsoleIsDirty = false;\n}\n\nfunction populateMenuCommentConsole(pMenu, pItem, pCol)\n{\n try\n {\n _commentConsole = mainwindow.findChild("_commentConsole");\n\n if(pMenu == null)\n pMenu = _commentConsole.findChild("_menu");\n if(pMenu != null)\n {\n var tmpact;\n if(pItem.text(3) == "ADDR")//Address\n {\n tmpact = pMenu.addAction(qsTr("Edit Address..."));\n tmpact.enabled = privileges.check("MaintainAddresses");\n tmpact.triggered.connect(editaddr);\n\n tmpact = pMenu.addAction(qsTr("View Address..."));\n tmpact.enabled = privileges.check("MaintainAddresses") ||\n privileges.check("ViewAddresses");\n tmpact.triggered.connect(viewaddr);\n }\n else if(pItem.text(3) == "BBH")//BBomhead\n {\n tmpact = pMenu.addAction(qsTr("Edit Breeder Bill of Material..."));\n tmpact.enabled = (privileges.check("MaintainBBOMs"));\n tmpact.triggered.connect(editbbh);\n\n tmpact = pMenu.addAction(qsTr("View Breeder Bill of Material..."));\n tmpact.enabled = (privileges.check("MaintainBBOMs") ||\n privileges.check("ViewBBOMs"));\n tmpact.triggered.connect(viewbbh);\n }\n else if(pItem.text(3) == "BBI")//BBOMItem\n {\n tmpact = pMenu.addAction(qsTr("Edit Breeder Bill of Material Item..."));\n tmpact.enabled = (privileges.check("MaintainBBOMs"));\n tmpact.triggered.connect(editbbi);\n\n tmpact = pMenu.addAction(qsTr("View Breeder Bill of Material Item..."));\n tmpact.enabled = (privileges.check("MaintainBBOMs") ||\n privileges.check("ViewBBOMs"));\n tmpact.triggered.connect(viewbbi);\n }\n else if(pItem.text(3) == "BMH")//BOMHead\n {\n tmpact = pMenu.addAction(qsTr("Edit Bill of Material..."));\n tmpact.enabled = (privileges.check("MaintainBOMs"));\n tmpact.triggered.connect(editbmh);\n\n tmpact = pMenu.addAction(qsTr("View Bill of Material..."));\n tmpact.enabled = (privileges.check("MaintainBOMs") ||\n privileges.check("ViewBOMs"));\n tmpact.triggered.connect(viewbmh);\n }\n else if(pItem.text(3) == "BMI")//BOM Item\n {\n tmpact = pMenu.addAction(qsTr("Edit BOM Item..."));\n tmpact.enabled = (privileges.check("MaintainBOMs"));\n tmpact.triggered.connect(editbomitem);\n\n tmpact = pMenu.addAction(qsTr("View BOM Item..."));\n tmpact.enabled = (privileges.check("MaintainBOMs") ||\n privileges.check("ViewBOMs"));\n tmpact.triggered.connect(viewbomitem);\n }\n else if(pItem.text(3) == "BOH")//BOO Head\n {\n tmpact = pMenu.addAction(qsTr("Edit BOO Head..."));\n tmpact.enabled = (privileges.check("MaintainBOOs"));\n tmpact.triggered.connect(editboh);\n\n tmpact = pMenu.addAction(qsTr("View BOO Head..."));\n tmpact.enabled = (privileges.check("MaintainBOOs") ||\n privileges.check("ViewBOOs"));\n tmpact.triggered.connect(viewboh);\n }\n else if(pItem.text(3) == "BOI")//BOO Item\n {\n tmpact = pMenu.addAction(qsTr("Edit BOO Item..."));\n tmpact.enabled = (privileges.check("MaintainBOOs"));\n tmpact.triggered.connect(editboi);\n\n tmpact = pMenu.addAction(qsTr("View BOO Item..."));\n tmpact.enabled = (privileges.check("MaintainBOOs") ||\n privileges.check("ViewBOOs"));\n tmpact.triggered.connect(viewboi);\n }\n else if(pItem.text(3) == "CRMA")//CRMAccount\n {\n tmpact = pMenu.addAction(qsTr("Edit CRM Account..."));\n tmpact.enabled = (privileges.check("MaintainPersonalCRMAccounts") ||\n privileges.check("MaintainAllCRMAccounts"));\n tmpact.triggered.connect(editcrma);\n\n tmpact = pMenu.addAction(qsTr("View CRM Account..."));\n tmpact.enabled = (privileges.check("MaintainPersonalCRMAccounts") ||\n privileges.check("ViewPersonalCRMAccounts")||\n privileges.check("MaintainPersonalCRMAccounts") ||\n privileges.check("ViewAllCRMAccounts"));\n tmpact.triggered.connect(viewcrma);\n }\n else if(pItem.text(3) == "T-Contact")//Contact\n {\n tmpact = pMenu.addAction(qsTr("Edit Contact..."));\n tmpact.enabled = (privileges.check("MaintainPersonalContacts") ||\n privileges.check("MaintainAllContacts"));\n tmpact.triggered.connect(editcntct);\n\n tmpact = pMenu.addAction(qsTr("View Contact..."));\n tmpact.enabled = (privileges.check("MaintainPersonalContacts") ||\n privileges.check("ViewPersonalContacts")||\n privileges.check("MaintainAllContacts") ||\n privileges.check("ViewAllContacts"));\n tmpact.triggered.connect(viewcntct);\n }\n else if(pItem.text(3) == "C")//Customer\n {\n tmpact = pMenu.addAction(qsTr("Edit Customer..."));\n tmpact.enabled = (privileges.check("MaintainCustomerMasters"));\n tmpact.triggered.connect(editcustomer);\n\n tmpact = pMenu.addAction(qsTr("View Customer..."));\n tmpact.enabled = (privileges.check("MaintainCustomerMasters") ||\n privileges.check("ViewCustomerMasters"));\n tmpact.triggered.connect(viewcustomer);\n }\n else if(pItem.text(3) == "EMP")//Employee\n {\n tmpact = pMenu.addAction(qsTr("Edit Employee..."));\n tmpact.enabled = (privileges.check("MaintainEmployees"));\n tmpact.triggered.connect(editemp);\n\n tmpact = pMenu.addAction(qsTr("View Employee..."));\n tmpact.enabled = (privileges.check("MaintainEmployees") ||\n privileges.check("ViewEmployees"));\n tmpact.triggered.connect(viewemp);\n }\n else if(pItem.text(3) == "INCDT")//Incident\n {\n tmpact = pMenu.addAction(qsTr("Edit Incident..."));\n tmpact.enabled = (privileges.check("MaintainPersonalIncidents") ||\n privileges.check("MaintainAllIncidents"));\n tmpact.triggered.connect(editincdt);\n\n tmpact = pMenu.addAction(qsTr("View Incident..."));\n tmpact.enabled = (privileges.check("MaintainPersonalIncidents") ||\n privileges.check("ViewPersonalIncidents")||\n privileges.check("MaintainAllIncidents") ||\n privileges.check("ViewAllIncidents"));\n tmpact.triggered.connect(viewincdt);\n }\n else if(pItem.text(3) == "I")//Item\n {\n tmpact = pMenu.addAction(qsTr("Edit Item..."));\n tmpact.enabled = (privileges.check("MaintainItemMasters"));\n tmpact.triggered.connect(edititem);\n\n tmpact = pMenu.addAction(qsTr("View Item..."));\n tmpact.enabled = (privileges.check("MaintainItemMasters") ||\n privileges.check("ViewItemMasters"));\n tmpact.triggered.connect(viewitem);\n }\n else if(pItem.text(3) == "IS")//ItemSite\n {\n tmpact = pMenu.addAction(qsTr("Edit ItemSite..."));\n tmpact.enabled = (privileges.check("MaintainItemSites"));\n tmpact.triggered.connect(edititemsite);\n\n tmpact = pMenu.addAction(qsTr("View ItemSite..."));\n tmpact.enabled = (privileges.check("MaintainItemSites") ||\n privileges.check("ViewItemSites"));\n tmpact.triggered.connect(viewitemsite);\n }\n else if(pItem.text(3) == "IR")//ItemSource\n {\n tmpact = pMenu.addAction(qsTr("Edit ItemSource..."));\n tmpact.enabled = (privileges.check("MaintainItemSources"));\n tmpact.triggered.connect(edititemsource);\n\n tmpact = pMenu.addAction(qsTr("View ItemSource..."));\n tmpact.enabled = (privileges.check("MaintainItemSources") ||\n privileges.check("ViewItemSources"));\n tmpact.triggered.connect(viewitemsource);\n }\n else if(pItem.text(3) == "L")//Location\n {\n tmpact = pMenu.addAction(qsTr("Edit Location..."));\n tmpact.enabled = (privileges.check("MaintainLocations"));\n tmpact.triggered.connect(editlocation);\n\n tmpact = pMenu.addAction(qsTr("View Location..."));\n tmpact.enabled = (privileges.check("MaintainLocations") ||\n privileges.check("ViewLocations"));\n tmpact.triggered.connect(viewlocation);\n }\n else if(pItem.text(3) == "LS")//LotSerial\n {\n tmpact = pMenu.addAction(qsTr("Edit LotSerial..."));\n tmpact.triggered.connect(editlotserial);\n\n tmpact = pMenu.addAction(qsTr("View LotSerial..."));\n tmpact.triggered.connect(viewlotserial);\n }\n else if(pItem.text(3) == "OPP-Opportunity")//Opportunity\n {\n tmpact = pMenu.addAction(qsTr("Edit Opportunity..."));\n tmpact.enabled = (privileges.check("MaintainPersonalOpportunities") ||\n privileges.check("MaintainAllOpportunities"));\n tmpact.triggered.connect(editopp);\n\n tmpact = pMenu.addAction(qsTr("View Opportunity..."));\n tmpact.enabled = (privileges.check("MaintainPersonalOpportunities") ||\n privileges.check("ViewPersonalOpportunities")||\n privileges.check("MaintainAllOpportunities") ||\n privileges.check("ViewAllOpportunities"));\n tmpact.triggered.connect(viewopp);\n }\n else if(pItem.text(3) == "J")//Project\n {\n tmpact = pMenu.addAction(qsTr("Edit Project..."));\n tmpact.enabled = (privileges.check("MaintainPersonalProjects") ||\n privileges.check("MaintainAllProjects"));\n tmpact.triggered.connect(editprj);\n\n tmpact = pMenu.addAction(qsTr("View Project..."));\n tmpact.enabled = (privileges.check("MaintainPersonalProjects") ||\n privileges.check("ViewPersonalProjects")||\n privileges.check("MaintainAllProjects") ||\n privileges.check("ViewAllProjects"));\n tmpact.triggered.connect(viewprj);\n }\n else if(pItem.text(3) == "P")//Purchase Order\n {\n tmpact = pMenu.addAction(qsTr("Edit Purchase Order..."));\n tmpact.enabled = (privileges.check("MaintainPurchaseOrders"));\n tmpact.triggered.connect(editpo);\n\n tmpact = pMenu.addAction(qsTr("View Purchase Order..."));\n tmpact.enabled = (privileges.check("MaintainPurchaseOrders") ||\n privileges.check("ViewPurchaseOrders"));\n tmpact.triggered.connect(viewpo);\n }\n else if(pItem.text(3) == "PI")//Purchase Order Item\n {\n tmpact = pMenu.addAction(qsTr("Edit Purchase Order Item..."));\n tmpact.enabled = (privileges.check("MaintainPurchaseOrders"));\n tmpact.triggered.connect(editpoitem);\n\n tmpact = pMenu.addAction(qsTr("View Purchase Order Item..."));\n tmpact.enabled = (privileges.check("MaintainPurchaseOrders") ||\n privileges.check("ViewPurchaseOrders"));\n tmpact.triggered.connect(viewpoitem);\n }\n else if(pItem.text(3) == "RA")//Return Authorisation\n {\n tmpact = pMenu.addAction(qsTr("Edit Return Authorisation..."));\n tmpact.enabled = (privileges.check("MaintainReturns"));\n tmpact.triggered.connect(editreturnauth);\n\n tmpact = pMenu.addAction(qsTr("View Return Authorisation..."));\n tmpact.enabled = (privileges.check("MaintainReturns") ||\n privileges.check("ViewReturns"));\n tmpact.triggered.connect(viewreturnauth);\n }\n else if(pItem.text(3) == "RI")//Return Authorisation Item\n {\n tmpact = pMenu.addAction(qsTr("Edit Return Authorisation Item..."));\n tmpact.enabled = (privileges.check("MaintainReturns"));\n tmpact.triggered.connect(editreturnauthitem);\n\n tmpact = pMenu.addAction(qsTr("View Return Authorisation Item..."));\n tmpact.enabled = (privileges.check("MaintainReturns") ||\n privileges.check("ViewReturns"));\n tmpact.triggered.connect(viewreturnauthitem);\n }\n else if(pItem.text(3) == "Q")//Quote\n {\n tmpact = pMenu.addAction(qsTr("Edit Quote..."));\n tmpact.enabled = (privileges.check("MaintainQuotes"));\n tmpact.triggered.connect(editquote);\n\n tmpact = pMenu.addAction(qsTr("View Quote..."));\n tmpact.enabled = (privileges.check("MaintainQuotes") ||\n privileges.check("ViewQuotes"));\n tmpact.triggered.connect(viewquote);\n }\n else if(pItem.text(3) == "QI")//Quote Item\n {\n tmpact = pMenu.addAction(qsTr("Edit Quote Item..."));\n tmpact.enabled = (privileges.check("MaintainQuotes"));\n tmpact.triggered.connect(editquoteitem);\n\n tmpact = pMenu.addAction(qsTr("View Quote Item..."));\n tmpact.enabled = (privileges.check("MaintainQuotes") ||\n privileges.check("ViewQuotes"));\n tmpact.triggered.connect(viewquoteitem);\n }\n else if(pItem.text(3) == "S")//Sales Order\n {\n tmpact = pMenu.addAction(qsTr("Edit Sales Order..."));\n tmpact.enabled = (privileges.check("MaintainSalesOrders"));\n tmpact.triggered.connect(editso);\n\n tmpact = pMenu.addAction(qsTr("View Sales Order..."));\n tmpact.enabled = (privileges.check("MaintainSalesOrders") ||\n privileges.check("ViewSalesOrders"));\n tmpact.triggered.connect(viewso);\n }\n else if(pItem.text(3) == "SI")//Sales Order Item\n {\n tmpact = pMenu.addAction(qsTr("Edit Sales Order Item..."));\n tmpact.enabled = (privileges.check("MaintainSalesOrders"));\n tmpact.triggered.connect(editsoitem);\n\n tmpact = pMenu.addAction(qsTr("View Sales Order Item..."));\n tmpact.enabled = (privileges.check("MaintainSalesOrders") ||\n privileges.check("ViewSalesOrders"));\n tmpact.triggered.connect(viewsoitem);\n }\n else if(pItem.text(3) == "TA")//Task\n {\n tmpact = pMenu.addAction(qsTr("Edit Task..."));\n tmpact.enabled = (privileges.check("MaintainPersonalProjects") ||\n privileges.check("MaintainAllProjects"));\n tmpact.triggered.connect(edittask);\n\n tmpact = pMenu.addAction(qsTr("View Task..."));\n tmpact.enabled = (privileges.check("MaintainPersonalProjects") ||\n privileges.check("ViewPersonalProjects")||\n privileges.check("MaintainAllProjects") ||\n privileges.check("ViewAllProjects"));\n tmpact.triggered.connect(viewtask);\n }\n else if(pItem.text(3) == "TD")//TodoItem\n {\n tmpact = pMenu.addAction(qsTr("Edit TodoItem..."));\n tmpact.enabled = (privileges.check("MaintainPersonalToDoItems") ||\n privileges.check("MaintainAllToDoItems"));\n tmpact.triggered.connect(edittodoitem);\n\n tmpact = pMenu.addAction(qsTr("View TodoItem..."));\n tmpact.enabled = (privileges.check("MaintainPersonalToDoItems") ||\n privileges.check("ViewPersonalToDoItems")||\n privileges.check("MaintainAllToDoItems") ||\n privileges.check("ViewAllToDoItems"));\n tmpact.triggered.connect(viewtodoitem);\n }\n else if(pItem.text(3) == "TO")//Transfer Order\n {\n tmpact = pMenu.addAction(qsTr("Edit Transfer Order..."));\n tmpact.enabled = (privileges.check("MaintainTransferOrders"));\n tmpact.triggered.connect(editto);\n\n tmpact = pMenu.addAction(qsTr("View Transfer Order..."));\n tmpact.enabled = (privileges.check("MaintainTransferOrders") ||\n privileges.check("ViewTransferOrders"));\n tmpact.triggered.connect(viewto);\n }\n else if(pItem.text(3) == "TI")//Transfer Order Item\n {\n tmpact = pMenu.addAction(qsTr("Edit Transfer Order Item..."));\n tmpact.enabled = (privileges.check("MaintainTransferOrders"));\n tmpact.triggered.connect(edittoitem);\n\n tmpact = pMenu.addAction(qsTr("View Transfer Order Item..."));\n tmpact.enabled = (privileges.check("MaintainTransferOrders") ||\n privileges.check("ViewTransferOrders"));\n tmpact.triggered.connect(viewtoitem);\n }\n else if(pItem.text(3) == "V")//Vendor\n {\n tmpact = pMenu.addAction(qsTr("Edit Vendor..."));\n tmpact.enabled = (privileges.check("MaintainVendors"));\n tmpact.triggered.connect(editvend);\n\n tmpact = pMenu.addAction(qsTr("View Vendor..."));\n tmpact.enabled = (privileges.check("MaintainVendors") ||\n privileges.check("ViewVendors"));\n tmpact.triggered.connect(viewvend);\n }\n else if(pItem.text(3) == "WH")//WareHouse\n {\n tmpact = pMenu.addAction(qsTr("Edit WareHouse..."));\n tmpact.enabled = (privileges.check("MaintainWarehouses"));\n tmpact.triggered.connect(editwh);\n\n tmpact = pMenu.addAction(qsTr("View WareHouse..."));\n tmpact.enabled = (privileges.check("MaintainWarehouses") ||\n privileges.check("ViewWarehouses"));\n tmpact.triggered.connect(viewwh);\n }\n else if(pItem.text(3) == "W")//Work Order\n {\n tmpact = pMenu.addAction(qsTr("Edit Work Order..."));\n tmpact.enabled = (privileges.check("MaintainWorkOrders"));\n tmpact.triggered.connect(editwo);\n\n tmpact = pMenu.addAction(qsTr("View Work Order..."));\n tmpact.enabled = (privileges.check("MaintainWorkOrders"));\n tmpact.triggered.connect(viewwo);\n }\n }\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "populateMenuCommentConsole exception: " + e);\n }\n}\n\nfunction preferencesCommentConsole()\n{\n try\n {\n \tparams = new Object;\n var newdlg = toolbox.openWindow("preferencesComment", mainwindow,\n Qt.ApplicationModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n if (newdlg.exec())\n refreshCommentConsole();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "preferencesCommentConsole exception: " + e);\n }\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshCommentConsole()\n{\n try\n {\n \t_commentConsoleIsDirty = true;\n fillListCommentConsole();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "refreshCommentConsole exception: " + e);\n }\n}\n\nfunction editaddr()\n{\n try\n {\n var params = new Object();\n params.addr_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("address", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editaddr exception: " + e);\n }\n}\n\nfunction viewaddr()\n{\n try\n {\n var params = new Object();\n params.addr_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("address", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewaddr exception: " + e);\n }\n}\n\nfunction editbbh()\n{\n try\n {\n var params = new Object();\n params.item_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("bbom", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editbbh exception: " + e);\n }\n}\n\nfunction viewbbh()\n{\n try\n {\n var params = new Object();\n params.item_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("bbom", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewbbh exception: " + e);\n }\n}\n\nfunction editbbi()\n{\n try\n {\n var params = new Object();\n params.bbomitem_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("bbomItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editbbi exception: " + e);\n }\n}\n\nfunction viewbbi()\n{\n try\n {\n var params = new Object();\n params.bbomitem_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("bbomItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewbbi exception: " + e);\n }\n}\n\nfunction editbmh()\n{\n try\n {\n var params = new Object();\n params.item_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("bom", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editbmh exception: " + e);\n }\n}\n\nfunction viewbmh()\n{\n try\n {\n var params = new Object();\n params.item_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("bom", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewbmh exception: " + e);\n }\n}\n\nfunction editbomitem()\n{\n try\n {\n params = new Object;\n params.bomitem_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("bomItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editbomitem exception: " + e);\n }\n}\n\nfunction viewbomitem()\n{\n try\n {\n params = new Object;\n params.bomitem_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("bomItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewbomitem exception: " + e);\n }\n}\n\nfunction editboh()\n{\n try\n {\n params = new Object;\n params.item_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("boo", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editboh exception: " + e);\n }\n}\n\nfunction viewboh()\n{\n try\n {\n params = new Object;\n params.item_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("boo", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewboh exception: " + e);\n }\n}\n\nfunction editboi()\n{\n try\n {\n params = new Object;\n params.booitem_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("booItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editboi exception: " + e);\n }\n}\n\nfunction viewboi()\n{\n try\n {\n params = new Object;\n params.booitem_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("booItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewboi exception: " + e);\n }\n}\n\nfunction editcntct()\n{\n try\n {\n var params = new Object();\n params.cntct_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("contact", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editcntct exception: " + e);\n }\n}\n\nfunction viewcntct()\n{\n try\n {\n var params = new Object();\n params.cntct_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("contact", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewcntct exception: " + e);\n }\n}\n\nfunction editcrma()\n{\n try\n {\n var params = new Object();\n params.crmacct_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("crmaccount", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editcrma exception: " + e);\n }\n}\n\nfunction viewcrma()\n{\n try\n {\n var params = new Object();\n params.crmacct_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("crmaccount", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewcrma exception: " + e);\n }\n}\n\nfunction editcustomer()\n{\n try\n {\n var params = new Object();\n params.cust_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("customer", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editcustomer exception: " + e);\n }\n}\n\nfunction viewcustomer()\n{\n try\n {\n var params = new Object();\n params.cust_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("customer", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewcustomer exception: " + e);\n }\n}\n\nfunction editemp()\n{\n try\n {\n var params = new Object();\n params.emp_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("employee", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editemp exception: " + e);\n }\n}\n\nfunction viewemp()\n{\n try\n {\n var params = new Object();\n params.emp_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("employee", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewemp exception: " + e);\n }\n}\n\nfunction editincdt()\n{\n try\n {\n params = new Object;\n params.incdt_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("incident", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editincdt exception: " + e);\n }\n}\n\nfunction viewincdt()\n{\n try\n {\n var params = new Object();\n params.incdt_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("incident", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewincdt exception: " + e);\n }\n}\n\nfunction edititem()\n{\n try\n {\n var params = new Object();\n params.item_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("item", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "edititem exception: " + e);\n }\n}\n\nfunction viewitem()\n{\n try\n {\n var params = new Object();\n params.item_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("item", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewitem exception: " + e);\n }\n}\n\nfunction edititemsite()\n{\n try\n {\n params = new Object;\n params.itemsite_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("itemSite", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "edititemsite exception: " + e);\n }\n}\n\nfunction viewitemsite()\n{\n try\n {\n params = new Object;\n params.itemsite_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("itemSite", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewitemsite exception: " + e);\n }\n}\n\nfunction edititemsource()\n{\n try\n {\n params = new Object;\n params.itemsrc_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("itemSource", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "edititemsource exception: " + e);\n }\n}\n\nfunction viewitemsource()\n{\n try\n {\n params = new Object;\n params.itemsrc_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("itemSource", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewitemsource exception: " + e);\n }\n}\n\nfunction editlocation()\n{\n try\n {\n var params = new Object();\n params.location_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("location", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editlocation exception: " + e);\n }\n}\n\nfunction viewlocation()\n{\n try\n {\n var params = new Object();\n params.location_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("location", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewlocation exception: " + e);\n }\n}\n\nfunction editlotserial()\n{\n try\n {\n var params = new Object();\n params.ls_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("lotSerial", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editlotserial exception: " + e);\n }\n}\n\nfunction viewlotserial()\n{\n try\n {\n var params = new Object();\n params.ls_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("lotSerial", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewlotserial exception: " + e);\n }\n}\n\nfunction editopp()\n{\n try\n {\n var params = new Object();\n params.ophead_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("opportunity", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editopp exception: " + e);\n }\n}\n\nfunction viewopp()\n{\n try\n {\n var params = new Object();\n params.ophead_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("opportunity", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewopp exception: " + e);\n }\n}\n\nfunction editprj()\n{\n try\n {\n var params = new Object();\n params.prj_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("project", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editprj exception: " + e);\n }\n}\n\nfunction viewprj()\n{\n try\n {\n var params = new Object();\n params.prj_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("project", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewprj exception: " + e);\n }\n}\n\nfunction editpo()\n{\n try\n {\n var params = new Object();\n params.pohead_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("purchaseOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editpo exception: " + e);\n }\n}\n\nfunction viewpo()\n{\n try\n {\n var params = new Object();\n params.pohead_id = _commentConsole.id();\n\n params.mode = "view";\n var newdlg = toolbox.openWindow("purchaseOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewpo exception: " + e);\n }\n}\n\nfunction editpoitem()\n{\n try\n {\n params = new Object;\n params.poitem_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("purchaseOrderItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editpoitem exception: " + e);\n }\n}\n\nfunction viewpoitem()\n{\n try\n {\n params = new Object;\n params.poitem_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("purchaseOrderItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewpoitem exception: " + e);\n }\n}\n\nfunction editquote()\n{\n try\n {\n var params = new Object();\n params.quhead_id = _commentConsole.id();\n\n params.mode = "editQuote";\n var newdlg = toolbox.openWindow("salesOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editquote exception: " + e);\n }\n}\n\nfunction viewquote()\n{\n try\n {\n var params = new Object();\n params.quhead_id = _commentConsole.id();\n\n params.mode = "viewQuote";\n var newdlg = toolbox.openWindow("salesOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewquote exception: " + e);\n }\n}\n\nfunction editquoteitem()\n{\n try\n {\n params = new Object;\n params.soitem_id = _commentConsole.id();\n params.mode = "editQuote";\n var newdlg = toolbox.openWindow("salesOrderItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editquoteitem exception: " + e);\n }\n}\n\nfunction viewquoteitem()\n{\n try\n {\n params = new Object;\n params.soitem_id = _commentConsole.id();\n params.mode = "viewQuote";\n\n var newdlg = toolbox.openWindow("salesOrderItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewquoteitem exception: " + e);\n }\n}\n\nfunction editreturnauth()\n{\n try\n {\n var params = new Object();\n params.rahead_id = _commentConsole.id();\n\n params.mode = "edit";\n var newdlg = toolbox.openWindow("returnAuthorization", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editreturnauth exception: " + e);\n }\n}\n\nfunction viewreturnauth()\n{\n try\n {\n var params = new Object();\n params.rahead_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("returnAuthorization", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewreturnauth exception: " + e);\n }\n}\n\nfunction editreturnauthitem()\n{\n try\n {\n var params = new Object();\n params.raitem_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("returnAuthorizationItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editreturnauthitem exception: " + e);\n }\n}\n\nfunction viewreturnauthitem()\n{\n try\n {\n var params = new Object();\n params.raitem_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("returnAuthorizationItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewreturnauthitem exception: " + e);\n }\n}\n\nfunction editso()\n{\n try\n {\n var params = new Object();\n params.sohead_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("salesOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editso exception: " + e);\n }\n}\n\nfunction viewso()\n{\n try\n {\n var params = new Object();\n params.sohead_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("salesOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewso exception: " + e);\n }\n}\n\nfunction editsoitem()\n{\n try\n {\n params = new Object;\n params.soitem_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("salesOrderItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editsoitem exception: " + e);\n }\n}\n\nfunction viewsoitem()\n{\n try\n {\n params = new Object;\n params.soitem_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("salesOrderItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewsoitem exception: " + e);\n }\n}\n\nfunction edittask()\n{\n try\n {\n params = new Object;\n params.prjtask_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("task", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "edittask exception: " + e);\n }\n}\n\nfunction viewtask()\n{\n try\n {\n params = new Object;\n params.prjtask_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("task", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewtask exception: " + e);\n }\n}\n\nfunction edittodoitem()\n{\n try\n {\n params = new Object;\n params.todoitem_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("todoItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "edittodoitem exception: " + e);\n }\n}\n\nfunction viewtodoitem()\n{\n try\n {\n params = new Object;\n params.todoitem_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("todoItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewtodoitem exception: " + e);\n }\n}\n\nfunction editto()\n{\n try\n {\n var params = new Object();\n params.tohead_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("transferOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editto exception: " + e);\n }\n}\n\nfunction viewto()\n{\n try\n {\n var params = new Object();\n params.tohead_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("transferOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewto exception: " + e);\n }\n}\n\nfunction edittoitem()\n{\n try\n {\n params = new Object;\n params.toitem_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("transferOrderItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "edittoitem exception: " + e);\n }\n}\n\nfunction viewtoitem()\n{\n try\n {\n params = new Object;\n params.toitem_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("transferOrderItem", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewtoitem exception: " + e);\n }\n}\n\nfunction editvend()\n{\n try\n {\n var params = new Object();\n params.vend_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("vendor", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editvend exception: " + e);\n }\n}\n\nfunction viewvend()\n{\n try\n {\n var params = new Object();\n params.vend_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("vendor", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewvend exception: " + e);\n }\n}\n\nfunction editwh()\n{\n try\n {\n params = new Object;\n params.warehous_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("warehouse", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editwh exception: " + e);\n }\n}\n\nfunction viewwh()\n{\n try\n {\n params = new Object;\n params.warehous_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("warehouse", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n var execval = newdlg.exec();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewwh exception: " + e);\n }\n}\n\nfunction editwo()\n{\n try\n {\n var params = new Object();\n params.wo_id = _commentConsole.id();\n params.mode = "edit";\n\n var newdlg = toolbox.openWindow("workOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "editwo exception: " + e);\n }\n}\n\nfunction viewwo()\n{\n try\n {\n var params = new Object();\n params.wo_id = _commentConsole.id();\n params.mode = "view";\n\n var newdlg = toolbox.openWindow("workOrder", mainwindow, 0, 1);\n var tmp = toolbox.lastWindow().set(params);\n newdlg.exec;\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockSendMessage",\n "viewwo exception: " + e);\n }\n}\n 272 initMenu 1 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\n// Import code from related scripts\ninclude("dockBankBal");\ninclude("dockExtensions");\ninclude("dockGLAccounts");\ninclude("dockMessageHistory");\ninclude("dockMfgActive");\ninclude("dockMfgHist");\ninclude("dockMfgOpen");\ninclude("dockMyAccounts");\ninclude("dockMyContacts");\ninclude("dockMyTodo");\ninclude("dockPayables");\ninclude("dockPurchActive");\ninclude("dockPurchHist");\ninclude("dockPurchOpen");\ninclude("dockReceivables");\ninclude("dockSalesActive");\ninclude("dockSalesHistory");\ninclude("dockSalesOpen");\ninclude("dockSendMessage");\ninclude("dockUserOnline");\n\nvar _desktopStack;\nvar _open = qsTr("Open...");\nvar _dtTimer;\nvar _leftAreaDocks = new Array();\nvar _bottomAreaDocks = new Array();\nvar _windows = new Array();\nvar _hasSavedState = settingsValue("hasSavedState").length > 0;\nvar _vToolBar;\nvar _vToolBarActions = new Array();\n\nvar _menuDesktop = new QMenu(qsTr("Desktop"),mainwindow);\nvar _menuToolBar = new QMenu(mainwindow);\nvar _menuWindow = mainwindow.findChild("menu.window");\n\n// Create Menu items for setup windows\nvar _menuSetup = new QMenu(qsTr("Setup"),mainwindow);\n\n// Add desktop to main window\naddAction("sys.currencies","currencies","CreateNewCurrency","CreateNewCurrency");\naddAction("sys.exchangeRates","currencyConversions","MaintainCurrencyRates","ViewCurrencyRates");\n\n// Set up refresh timer\n_dtTimer = new QTimer(mainwindow);\n_dtTimer.setInterval(metrics.value("desktop/timer"));\n_dtTimer.start();\n\n// Set the desktop\n_desktopStack = toolbox.createWidget("QStackedWidget", mainwindow, "_desktopStack");\nvar _desktopParent;\n\n// if this handleNewWindow overload exists then GUIClient is a QMdiArea\nif (mainwindow.showTopLevel())\n _desktopParent = mainwindow;\n// disable desktop when inside workspace mode\n//else if ("handleNewWindow(QWidget*,Qt::WindowModality,bool)" in mainwindow)\n// _desktopParent = toolbox.openWindow("desktop", mainwindow);\n\nif (_desktopParent)\n{\n_desktopParent.setCentralWidget(_desktopStack);\n_vToolBar = new QToolBar(_desktopParent);\n_desktopParent.addToolBar(Qt.LeftToolBarArea, _vToolBar);\n\n// Intialize the left toolbar\n_vToolBar.objectName = "_vToolBar";\n_vToolBar.windowTitle = "Desktop Toolbar";\n_vToolBar.floatable = false;\n_vToolBar.movable = false;\n_vToolBar.visible = true;\n_vToolBar.toolButtonStyle = Qt.ToolButtonTextUnderIcon;\n\n// Initialize Desktop\n// Set up browser for home Page\nvar _welcome = new QWebView(mainwindow);\nvar url = new QUrl(metrics.value("desktop/welcome"));\n_welcome.objectName = "_welcome";\n_welcome["loadFinished(bool)"].connect(loadLocalHtml);\n_welcome["linkClicked(const QUrl &)"].connect(openUrl);\n_welcome.load(url);\n_welcome.page().linkDelegationPolicy = QWebPage.DelegateAllLinks;\n_desktopStack.addWidget(_welcome);\naddToolBarAction(qsTr("Welcome"), "home_32");\n_vToolBarActions[0].checked = true;\n\n// Initialize additional desktop UIs and Dock Widgets\n// (Init functions come from the code pulled in by the include statements)\naddDesktop("desktopCRM", "clients_32", "ViewCRMDesktop");\ninitDockTodo();\ninitDockAccounts();\ninitDockMyCntcts();\n\naddDesktop("desktopSales", "reward_32", "ViewSalesDesktop");\ninitDockSalesAct();\ninitDockSalesHist();\ninitDockSalesOpen();\naddDesktop("desktopAccounting", "accounting_32", "ViewAccountingDesktop");\ninitDockPayables();\ninitDockReceivables();\ninitDockBankBal();\ninitDockGLAccounts();\n\naddDesktop("desktopPurchase", "order_32", "ViewPurchaseDesktop");\ninitDockPurchAct();\ninitDockPurchHist();\ninitDockPurchOpen();\n\naddDesktop("desktopManufacture", "industry_32", "ViewManufactureDesktop");\ninitDockMfgAct();\ninitDockMfgHist();\ninitDockMfgOpen();\n\naddDesktop("desktopSocial", "social", "viewSocialDesktop");\ninitDockUserOnline();\ninitDockMessageHistory();\ninitDockSendMessage();\n\nvar maintWin = addDesktop("desktopMaintenance", "gear_32", "ViewMaintenanceDesktop");\ninitDockExtensions();\n//initDockUserOnline();\n\n// Hack to fix icon size problem until next core release\nvar maintToolbar = maintWin.findChild("_toolbar");\n_vToolBar.iconSize = maintToolbar.iconSize;\nmaintWin.removeToolBar(maintToolbar);\n\n// Handle window actions\n_menuWindow.aboutToShow.connect(prepareWindowMenu);\n\n// Change behavior of item site button if commercial edition\nif (metrics.boolean("MultiWhs"))\n{\n var button = mainwindow.findChild("_sites");\n button.label = qsTr("Sites");\n button.actionName = "im.warehouses";\n}\n}\nelse\n{\n if (!preferences.boolean("NoDesktopNotice"))\n toolbox.openWindow("desktopNotice",mainwindow, Qt.WindowModal, Qt.Dialog);\n}\n\n/*!\n Adds screen with name of @a uiName to the desktop stack so long as the user has\n been granted the privilege @a privName. The @a windowTitle of the UI object is \n added to the Desktop Dock so that when it is clicked, the associated window is \n selected on the Desktop.\n*/\nfunction addDesktop(uiName, imageName, privilege)\n{\n // Get the UI and add to desktop stack\n var desktop = toolbox.loadUi(uiName);\n _desktopStack.addWidget(desktop);\n _windows[_windows.length] = desktop;\n addToolBarAction(desktop.windowTitle, imageName, privilege);\n desktop.restoreState();\n\n return desktop;\n}\n\n/*!\n Add a button with @a label and @a imageName to the left desktop toolbar\n*/\nfunction addToolBarAction(label, imageName, privilege)\n{\n // Get the icon\n var icn = new QIcon();\n icn.addDbImage(imageName);\n\n // Create the action (add to menu not seen to ensure priv rescans work)\n var act = _menuToolBar.addAction(icn, label);\n act.checkable = true;\n if (privilege)\n {\n act.setEnabled(privileges.check(privilege));\n act.setData(privilege);\n }\n\n // Add to toolbar\n _vToolBar.addAction(act);\n _vToolBarActions[_vToolBarActions.length] = act;\n _vToolBar["actionTriggered(QAction*)"].connect(toolbarActionTriggered);\n}\n\n/*!\n Loads a local HTML page from the database if the xTuple weclome page\n fails to load.\n*/\nfunction loadLocalHtml(ok)\n{\n if (!ok)\n {\n // Page didn't load, so load internal HTML saying we aren't connected\n var q = toolbox.executeQuery("SELECT xtdesktop.fetchWelcomeHtml() AS html");\n q.first();\n _welcome.setHtml(q.value("html"));\n }\n // We don't want to deal with loading any more web pages. Let OS do it\n _welcome.page().linkDelegationPolicy = QWebPage.DelegateAllLinks;;\n}\n\n\n/*!\n Launches links clicked on home page into new local browser window\n*/\nfunction openUrl(url)\n{\n toolbox.openUrl(new QUrl(url).toString());\n}\n\n/*!\n Adds desktop to the window menu\n*/\nfunction prepareWindowMenu()\n{\n // TO DO: Make this more modular\n var idx = _desktopStack.currentIndex;\n _dockMycontacts.toggleViewAction().visible = (idx == 1);\n _dockMyaccounts.toggleViewAction().visible = (idx == 1);\n _dockMytodo.toggleViewAction().visible = (idx == 1);\n _dockSalesAct.toggleViewAction().visible = (idx == 2);\n _dockSalesHist.toggleViewAction().visible = (idx == 2);\n _dockSalesOpen.toggleViewAction().visible = (idx == 2);\n _dockBankBal.toggleViewAction().visible = (idx == 3);\n _dockPayables.toggleViewAction().visible = (idx == 3);\n _dockReceivables.toggleViewAction().visible = (idx == 3);\n _dockGLAccounts.toggleViewAction().visible = (idx == 3);\n _dockPurchAct.toggleViewAction().visible = (idx == 4);\n _dockPurchHist.toggleViewAction().visible = (idx == 4);\n _dockPurchOpen.toggleViewAction().visible = (idx == 4);\n _dockMfgAct.toggleViewAction().visible = (idx == 5);\n _dockMfgHist.toggleViewAction().visible = (idx == 5);\n _dockMfgOpen.toggleViewAction().visible = (idx == 5);\n _dockSendMessage.toggleViewAction().visible = (idx == 6);\n _dockMessageHistory.toggleViewAction().visible = (idx == 6);\n _dockUserOnline.toggleViewAction().visible = (idx == 6);\n _dockExtensions.toggleViewAction().visible = (idx == 7);\n// _dockUserOnline.toggleViewAction().visible = (idx == 7);\n _menuWindow.addSeparator();\n _menuWindow.addMenu(_menuDesktop);\n}\n\nfunction toolbarActionTriggered(action)\n{\n // Move to the desktop page specified\n for (i in _vToolBarActions)\n {\n if (_vToolBarActions[i] == action)\n _desktopStack.currentIndex = i\n else\n _vToolBarActions[i].checked = false;\n }\n}\n\nfunction addAction(actionName, slotName, editPriv, viewPriv)\n{\n var tempaction;\n tmpaction = new QAction(mainwindow);\n tmpaction.enabled = privileges.value(editPriv) || privileges.value(viewPriv);\n tmpaction.setData(editPriv + " " + viewPriv);\n tmpaction.objectName = actionName;\n tmpaction.triggered.connect(this, slotName);\n _menuSetup.appendAction(tmpaction);\n}\n\nfunction openSetup(uiName)\n{\n var params = new Object;\n params.uiName = uiName;\n var wnd = toolbox.openWindow("setup", mainwindow);\n toolbox.lastWindow().set(params);\n wnd.exec();\n}\n\nfunction currencies()\n{\n openSetup("currencies");\n}\n\nfunction currencyConversions()\n{\n openSetup("currencyConversions");\n}\n\n\n 426 preferencesNumber 0 t try\r\n{\r\n var _limit = mywindow.findChild("_limit");\r\n var _path;\r\n\r\n mydialog.accepted.connect(mysave);\r\n}\r\ncatch (e)\r\n{\r\n QMessageBox.critical(mainwindow, "preferencesNumber",\r\n "preferencesNumber.js exception: " + e);\r\n}\r\n\r\nfunction set(params)\r\n{\r\n if ("path" in params)\r\n _path = params.path;\r\n\r\n if ("limit" in params)\r\n _limit.value = params.limit;\r\n else\r\n _limit.value = 10;\r\n}\r\n\r\nfunction mysave()\r\n{\r\n try\r\n {\r\n preferences.set(_path + "/limit", _limit.value);\r\n }\r\n catch (e)\r\n {\r\n QMessageBox.critical(mainwindow, "preferencesNumber",\r\n "mysave exception: " + e);\r\n }\r\n} 251 contact 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("dockMyContacts");\n\n// Connect this window so that the My Contacts dock list gets updated\nvar _contactList = mainwindow.findChild("_contactList");\n\n// Connect this window so that the My Contacts dock list gets updated\n//new method for buttonbox, added for 3.8\n var _buttonBox = mywindow.findChild("_buttonBox");\n toolbox.coreDisconnect(_buttonBox, "accepted()", mywindow, "sSave()");\n _buttonBox.accepted.connect(save);\n\n//method prior to 3.8 core release\n//var _save = mywindow.findChild("_save");\n//toolbox.coreDisconnect(_save, "clicked()", mydialog, "sSave()");\n//_save.clicked.connect(save);\n\nfunction save()\n{\n mydialog.sSave();\n fillListMyCntcts();\n}\n\n 252 desktopNotice 0 t /*\n * This file is part of the xtdesktop package for xTuple ERP: PostBooks edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nmydialog.accepted.connect(save)\n\nfunction save()\n{\n preferences.set("NoDesktopNotice",!mydialog.findChild("_remind").checked)\n}\n 253 dockBankBal 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockBankBal;\nvar _bankBal;\nvar _bankBalIsDirty = true;\n\n/*!\n Initializes Bank Balance dock widget and places it in the main window.\n*/\nfunction initDockBankBal()\n{\n _dockBankBal = mainwindow.findChild("_dockBankBal");\n _bankBal = mainwindow.findChild("_bankBal");\n\n // Set columns on list\n _bankBal.addColumn(qsTr("Name"), -1, Qt.AlignLeft, true, "bankaccnt_name");\n _bankBal.addColumn(qsTr("Balance"), -1, Qt.AlignRight, true, "balance");\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshBankBal);\n mainwindow.bankAccountsUpdated.connect(refreshBankBal);\n mainwindow.bankAdjustmentsUpdated.connect(refreshBankBal);\n mainwindow.cashReceiptsUpdated.connect(refreshBankBal);\n mainwindow.checksUpdated.connect(refreshBankBal);\n mainwindow.glSeriesUpdated.connect(refreshBankBal);\n\n _bankBal.itemSelected.connect(openWindowBankBal);\n _bankBal["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuBankBal);\n\n _dockBankBal.visibilityChanged.connect(fillListBankBal);\n\n // Handle privilge control\n var act = _dockBankBal.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewBankAccountsDock"))\n {\n _dockBankBal.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewBankAccountsDock");\n _menuDesktop.appendAction(act);\n\n fillListBankBal();\n}\n\n/*!\n Fills the list with bank account data.\n*/\nfunction fillListBankBal()\n{\n _dockBankBal = mainwindow.findChild("_dockBankBal");\n _bankBal = mainwindow.findChild("_bankBal");\n\n if (_dockBankBal.visible && _bankBalIsDirty)\n {\n _bankBal.populate(toolbox.executeDbQuery("desktop","bankBal"));\n _bankBalIsDirty = false;\n }\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowBankBal()\n{\n // Make sure we can open the window\n if (!privilegeCheckBankBal())\n return;\n\n // Open the window and perform any handling required\n toolbox.openWindow("reconcileBankaccount");\n var w = toolbox.lastWindow().findChild("_bankaccnt").setId(_bankBal.id());\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a bank account item.\n*/\nfunction populateMenuBankBal(pMenu, pItem)\n{\n var menuItem;\n var enable = privilegeCheckBankBal();\n\n menuItem = pMenu.addAction(qsTr("Reconcile..."));\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowBankBal);\n}\n\n/*!\n Returns whether user has privileges to view detail.\n*/\nfunction privilegeCheckBankBal(act)\n{\n return privileges.check("MaintainBankRec");\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshBankBal()\n{\n _bankBalIsDirty = true;\n fillListBankBal();\n}\n 254 dockExtensions 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockExtensions;\nvar _extensions;\nvar _extensionsIsDirty = true;\n\n/*!\n Initializes Extensions dock widget and places it in the main window.\n*/\nfunction initDockExtensions()\n{\n _dockExtensions = mainwindow.findChild("_dockExtensions");\n _extensions = mainwindow.findChild("_extensions");\n\n // Set columns on list\n _extensions.addColumn(qsTr("Name"), -1, Qt.AlignLeft, true, "pkgitem_name");\n _extensions.addColumn(qsTr("Description"), -1, Qt.AlignLeft, false, "pkgitem_descrip");\n _extensions.addColumn(qsTr("Type"), -1, Qt.AlignLeft, false, "pkgitem_type");\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshExtensions);\n\n _extensions.itemSelected.connect(openWindowExtensions);\n _extensions["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuExtensions);\n\n _dockExtensions.visibilityChanged.connect(fillListExtensions);\n\n // Handle privilge control\n var act = _dockExtensions.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewExtensionsDock"))\n {\n _dockExtensions.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewExtensionsDock");\n _menuDesktop.appendAction(act);\n\n fillListExtensions();\n}\n\n/*!\n Fills the list with active sales data.\n*/\nfunction fillListExtensions()\n{\n _dockExtensions = mainwindow.findChild("_dockExtensions");\n _extensions = mainwindow.findChild("_extensions");\n\n if (_dockExtensions.visible && _extensionsIsDirty)\n {\n var params = new Object;\n params.script = qsTr("Scripts");\n params.cmd = qsTr("Custom Commands");\n params.procedure = qsTr("Stored Procedures");\n params.trigger = qsTr("Triggers");\n params.image = qsTr("Images");\n params.metasql = qsTr("MetaSQL");\n params.priv = qsTr("Privileges");\n params.report = qsTr("Reports");\n params.schema = qsTr("Schema");\n params.table = qsTr("Tables");\n params.uiform = qsTr("Screens");\n params.view = qsTr("Views");\n params.folder = qsTr("Folder");\n params.client = qsTr("Client");\n params.database = qsTr("Database");\n\n _extensions.populate(toolbox.executeDbQuery("desktop","pkgItems", params))\n \n _extensionsIsDirty = false;\n }\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowExtensions()\n{\n var ui;\n var run = false;\n var type = _extensions.currentItem().rawValue("pkgitem_type");\n var params = new Object;\n params.mode = "view";\n \n // Make sure we can open the window for this activity\n if (!privilegeCheckExtensions(type))\n return;\n\n // Determine which window to open\n if (type == "P")\n {\n ui = "package";\n params.pkghead_id = _extensions.id();\n }\n else if (type == "C")\n {\n ui = "scriptEditor";\n params.script_id = _extensions.id();\n }\n else if (type == "D")\n {\n ui = "customCommand";\n params.cmd_id = _extensions.id();\n }\n else if (type == "I")\n {\n ui = "image";\n params.image_id = _extensions.id();\n }\n else if (type == "M")\n ui = "metasqls";\n else if (type == "R")\n ui = "reports";\n else if (type == "U")\n {\n ui = "uiform";\n params.uiform_id = _extensions.id();\n }\n\n // Open the window and perform any handling required\n win = toolbox.openWindow(ui);\n if (type == "M")\n {\n win.hide();\n win.findChild("_list").setId(_extensions.id());\n win.sEdit();\n win.close();\n }\n else if (type == "R")\n {\n win.hide();\n win.findChild("_report").setId(_extensions.id());\n win.sEdit();\n win.close();\n }\n else if (type == "U")\n {\n win.hide();\n toolbox.lastWindow().set(params);\n win.sEdit();\n }\n else\n {\n toolbox.lastWindow().set(params);\n if (toolbox.lastWindow().exec())\n fillListExtensions();\n }\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on an Extension item.\n*/\nfunction populateMenuExtensions(pMenu, pItem)\n{\n var menuItem;\n var type = pItem.rawValue("pkgitem_type");\n var enable = privilegeCheckExtensions(type);\n\n // If not a type we have an editor for get out\n if ((type != "P") &&\n (type != "C") &&\n (type != "D") &&\n (type != "I") &&\n (type != "M") &&\n (type != "R") &&\n (type != "U"))\n return;\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowExtensions);\n}\n\n/*!\n Returns whether user has privileges to view detail on the selected extension type.\n*/\nfunction privilegeCheckExtensions(type)\n{\n if (type == "P")\n return privileges.check("ViewPackages+#superuser")\n else if (type == "C")\n return privileges.check("MaintainScripts");\n else if (type == "D") \n return privileges.check("MaintainCustomCommands");\n else if (type == "I") \n return privileges.check("MaintainImages");\n else if (type == "M")\n return privileges.check("MaintainMetaSQL") ||\n privileges.check("ViewMetaSQL");\n else if (type == "R") \n return privileges.check("MaintainReports");\n else if (type == "U")\n return privileges.check("MaintainScreens");\n\n return false;\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshExtensions()\n{\n _extensionsIsDirty = true;\n fillListExtensions();\n}\n 255 dockGLAccounts 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _b1GLAccounts;\nvar _b2GLAccounts;\nvar _dockGLAccounts;\nvar _glAccounts;\nvar _glAccountsIsDirty = true;\nvar _periodId = -1;\n\n/*!\n Initializes Monitored Accounts dock widget and places it in the main window.\n*/\nfunction initDockGLAccounts()\n{\n // Set up objects\n _dockGLAccounts = mainwindow.findChild("_dockGLAccounts");\n _glAccounts = mainwindow.findChild("_glAccounts");\n\n _b1GLAccounts = _dockGLAccounts.findChild("_button1");\n _b2GLAccounts = _dockGLAccounts.findChild("_button2");\n _labelGLAccounts = _dockGLAccounts.findChild("_label");\n\n // Set icons\n var iReload = new QIcon;\n iReload.addDbImage("reload_16");\n _b1GLAccounts.icon = iReload;\n _b1GLAccounts.text = "";\n _b1GLAccounts.toolTip = qsTr("Reload");\n\n var iGear = new QIcon();\n iGear.addDbImage("gear_16");\n _b2GLAccounts.icon = iGear;\n _b2GLAccounts.text = "";\n _b2GLAccounts.toolTip = qsTr("Preferences...");\n\n // Set columns on list\n _glAccounts.addColumn(qsTr("Number"), -1, Qt.AlignLeft, true, "accnt_id");\n _glAccounts.addColumn(qsTr("Description"), -1, Qt.AlignLeft, true, "accnt_descrip");\n _glAccounts.addColumn(qsTr("Type"), -1, Qt.AlignLeft, true, "accnt_type");\n _glAccounts.addColumn(qsTr("Balance"), -1, Qt.AlignRight, true, "balance");\n\n // Connect Signals and Slots\n _b1GLAccounts.clicked.connect(refreshGLAccounts);\n _b2GLAccounts.clicked.connect(preferencesGLAccounts);\n\n _dtTimer.timeout.connect(refreshGLAccounts);\n mainwindow.bankAdjustmentsUpdated.connect(refreshGLAccounts);\n mainwindow.checksUpdated.connect(refreshGLAccounts);\n mainwindow.creditMemosUpdated.connect(refreshGLAccounts);\n mainwindow.cashReceiptsUpdated.connect(refreshGLAccounts);\n mainwindow.glSeriesUpdated.connect(refreshGLAccounts);\n mainwindow.invoicesUpdated.connect(refreshGLAccounts);\n mainwindow.paymentsUpdated.connect(refreshGLAccounts);\n mainwindow.standardPeriodsUpdated.connect(refreshGLAccounts);\n mainwindow.vouchersUpdated.connect(refreshGLAccounts);\n mainwindow.workOrderMaterialsUpdated.connect(refreshGLAccounts);\n mainwindow.workOrderOperationsUpdated.connect(refreshGLAccounts);\n mainwindow.workOrdersUpdated.connect(refreshGLAccounts);\n\n _glAccounts.itemSelected.connect(openWindowGLAccounts);\n _glAccounts["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuGLAccounts);\n\n _dockGLAccounts.visibilityChanged.connect(fillListGLAccounts);\n\n // Handle privilge control\n var act = _dockGLAccounts.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewGLAccountsDock"))\n {\n _dockGLAccounts.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewGLAccountsDock");\n _menuDesktop.appendAction(act);\n fillListGLAccounts();\n}\n\n/*!\n Fills the list with sales history data based on parameters determined by\n sales history preferences.\n\n @sa preferencesGLAccounts()\n*/\nfunction fillListGLAccounts()\n{\n _dockGLAccounts = mainwindow.findChild("_dockGLAccounts");\n _glAccounts = mainwindow.findChild("_glAccounts");\n\n if (!_dockGLAccounts.visible || !_glAccountsIsDirty)\n return;\n\n _glAccounts.clear();\n var accntIdList = preferences.value("MonitoredAccounts");\n if(!accntIdList.length)\n return;\n\n var params = new Object;\n params.asset = qsTr("Asset");\n params.liability = qsTr("Liability");\n params.revenue = qsTr("Revenue");\n params.expense = qsTr("Expense");\n params.equity = qsTr("Equity");\n params.accnt_id_list = accntIdList;\n\n // Forward update if applicable\n if (!metrics.boolean("ManualForwardUpdate"))\n toolbox.executeDbQuery("desktop","glforwardupdate", params);\n\n var qry = toolbox.executeDbQuery("desktop","glaccountBal", params);\n if (qry.first())\n {\n _periodId = qry.value("period_id");\n _glAccounts.populate(qry);\n }\n\n _glAccountsIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowGLAccounts()\n{\n var ui;\n var params = new Object;\n params.period_id = _periodId;\n params.accnt_id = _glAccounts.id();\n params.run = true;\n\n // Make sure we can open the window\n if (!privilegeCheckGLAccounts())\n return;\n\n // Open the window and perform any special handling required\n toolbox.openWindow("dspGLTransactions");\n toolbox.lastWindow().set(params);\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on sales history.\n*/\nfunction populateMenuGLAccounts(pMenu)\n{\n var menuItem;\n var enable = privilegeCheckGLAccounts();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowGLAccounts);\n}\n\n/*!\n Returns whether user has privileges to view Sales History detail.\n*/\nfunction privilegeCheckGLAccounts()\n{\n var returnval = privileges.check("ViewGLTransactions");\n print("privilegeCheckGLAccounts returning " + returnval);\n return returnval;\n}\n\n/*! \n Launches the preferences window where the user can set sales data output preferences.\n*/\nfunction preferencesGLAccounts()\n{\n params = new Object;\n\n var newdlg = toolbox.openWindow("preferencesSelections", mainwindow,\n Qt.ApplicationModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n if (newdlg.exec())\n refreshGLAccounts();\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshGLAccounts()\n{\n _glAccountsIsDirty = true;\n fillListGLAccounts();\n}\n 423 dockMessageHistory 0 t var _b1MessageHistory;\nvar _b2MessageHistory;\nvar _dockMessageHistory;\nvar _messageHistory;\nvar _limitmessageHistory;\nvar _messageHistoryIsDirty = true;\nvar _periodId = -1;\n\nfunction initDockMessageHistory()\n{ \n // Set up objects\n _dockMessageHistory = mainwindow.findChild("_dockMessageHistory");\n _messageHistory = mainwindow.findChild("_messageHistory");\n\n _b1MessageHistory = _dockMessageHistory.findChild("_button3");\n _b2MessageHistory = _dockMessageHistory.findChild("_button4");\n\n // Set icons\n var iReload = new QIcon;\n iReload.addDbImage("reload_16");\n _b1MessageHistory.icon = iReload;\n _b1MessageHistory.text = "";\n _b1MessageHistory.toolTip = qsTr("Reload");\n\n var iGear = new QIcon();\n iGear.addDbImage("gear_16");\n _b2MessageHistory.icon = iGear;\n _b2MessageHistory.text = "";\n _b2MessageHistory.toolTip = qsTr("Preferences...");\n\n // Set columns on list\n _messageHistory.addColumn("Date", 75, 1, true, "sent");\n _messageHistory.addColumn("From", 75, 1, true, "from");\n _messageHistory.addColumn("To", 75, 1, true, "to")\n _messageHistory.addColumn("Message", -1, 1, true, "message");\n\n // Connect Signals and Slots\n _b1MessageHistory.clicked.connect(refreshMessageHistory);\n _b2MessageHistory.clicked.connect(preferencesMessageHistory);\n\n _messageHistory["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuMessageHistory);\n _messageHistory["itemDoubleClicked(QTreeWidgetItem*, int)"].connect(myOpen);\n\n mainwindow["tick()"].connect(refreshMessageHistory);\n mainwindow.setUpListener("messagePosted");\n mainwindow["messageNotify()"].connect(refreshMessageHistory);\n\n // Don't show if no privs\n var act = _dockMessageHistory.toggleViewAction();\n if (!privileges.check("viewMsgHistoryDock"))\n { \n _dockMessageHistory.hide();\n act.enabled = false;\n }\n else\n {\n _dockMessageHistory.show();\n act.enabled = true;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("viewMsgHistoryDock");\n _menuDesktop.appendAction(act);\n\n fillListMessageHistory();\n}\n\nfunction fillListMessageHistory()\n{\n _dockMessageHistory = mainwindow.findChild("_dockMessageHistory");\n _messageHistory = mainwindow.findChild("_messageHistory");\n\n _messageHistory.clear();\n\n var params = new Object;\n params.limit = _limitmessageHistory;\n\n _messageHistory.populate(toolbox.executeDbQuery("desktop","messageHistory", params));\n _messageHistoryIsDirty = false;\n}\n\nfunction populateMenuMessageHistory(pMenu)\n{\n try\n {\n var menuItem = pMenu.addAction(qsTr("Open..."));\n menuItem.triggered.connect(myOpen);\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockMessageHistory",\n "populateMenuMessageHistory exception: " + e);\n }\n}\n\nfunction preferencesMessageHistory()\n{\n try\n {\n params = new Object;\n params.path = "desktop/messageHistory";\n params.limit = _limitmessageHistory;\n var newdlg = toolbox.openWindow("preferencesNumber", mainwindow,\n Qt.ApplicationModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n if (newdlg.exec())\n {\n loadPreferencesMessageHistory();\n refreshMessageHistory();\n }\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockMessageHistory",\n "preferencesMessageHistory exception: " + e);\n }\n}\n\nfunction loadPreferencesMessageHistory()\n{\n // Load preferences\n _limitmessageHistory = preferences.value("desktop/messageHistory/limit");\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshMessageHistory()\n{\n try\n {\n mainwindow.sSystemMessageAdded();\n messageHistoryIsDirty = true;\n fillListMessageHistory();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockMessageHistory",\n "refreshMessageHistory exception: " + e);\n }\n}\n\nfunction myOpen()\n{\n try\n {\n var params = new Object;\n params.msg_id = _messageHistory.id();\n var q = "SELECT msguser_id "\n + "FROM msguser "\n + "WHERE (msguser_msg_id = );";\n var data = toolbox.executeQuery(q, params);\n if (data.first())\n params.msguser_id = data.value("msguser_id");\n else if (data.lastError().type != QSqlError.NoError)\n {\n QMessageBox.critical(mainwindow, qsTr("Database Error"),\n data.lastError().text);\n return;\n }\n\n params.mode = "acknowledge";\n var newwnd = toolbox.openWindow("systemMessage", mainwindow, Qt.ApplicationModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n newwnd.exec();\n refreshMessageHistory();\n }\n catch (e)\n {\n QMessageBox.critical(mainwindow, "dockMessageHistory",\n "myOpen exception: " + e);\n }\n}\n 256 dockMfgActive 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockMfgAct;\nvar _MfgAct;\nvar _mfgActIsDirty = true;\n\n/*!\n Initializes Mfg. Activity dock widget and places it in the main window.\n*/\nfunction initDockMfgAct()\n{\n _dockMfgAct = mainwindow.findChild("_dockMfgAct");\n _mfgAct = mainwindow.findChild("_mfgAct");\n\n // Set columns on list\n _mfgAct.addColumn(qsTr("Type"), -1, Qt.AlignLeft, true, "activity");\n _mfgAct.addColumn(qsTr("#"), 40, Qt.AlignRight, true, "count");\n _mfgAct.addColumn(qsTr("Amount"), -1, Qt.AlignRight, true, "amount");\n _mfgAct.addColumn(qsTr("Qty"), -1, Qt.AlignRight, false, "qty");\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshMfgAct);\n mainwindow.workOrdersUpdated.connect(refreshMfgAct);\n mainwindow.workOrderMaterialsUpdated.connect(refreshMfgAct);\n mainwindow.workOrderOperationsUpdated.connect(refreshMfgAct);\n\n _mfgAct.itemSelected.connect(openWindowMfgAct);\n _mfgAct["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuMfgAct);\n\n _dockMfgAct.visibilityChanged.connect(fillListMfgAct);\n\n // Handle privilge control\n var act = _dockMfgAct.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewManufactureActivitiesDock"))\n {\n _dockMfgAct.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewManufactureActivitiesDock");\n _menuDesktop.appendAction(act);\n\n fillListMfgAct();\n}\n\n/*!\n Fills the list with active Purch data.\n*/\nfunction fillListMfgAct()\n{\n _dockMfgAct = mainwindow.findChild("_dockMfgAct");\n _mfgAct = mainwindow.findChild("_mfgAct");\n\n if (_dockMfgAct.visible && _mfgActIsDirty)\n {\n var params = new Object;\n if (metrics.value("Application") != "PostBooks")\n params.planned = qsTr("Planned");\n params.open = qsTr("Open");\n params.exploded = qsTr("Exploded");\n params.released = qsTr("Released");\n params.inprocess = qsTr("In Process");\n\n _mfgAct.populate(toolbox.executeDbQuery("desktop","mfgAct", params));\n }\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowMfgAct()\n{\n var ui;\n var run = false;\n var act = _mfgAct.currentItem().rawValue("activity");\n \n // Make sure we can open the window for this activity\n if (!privilegeCheckMfgAct(act))\n return;\n\n // Determine which window to open\n if (act == "L")\n ui = "dspPlannedOrders";\n else\n ui = "dspWoSchedule";\n\n // Open the window and perform any handling required\n var win = toolbox.openWindow(ui);\n if (act == "L")\n {\n// win.findChild("_purchase").forgetful = true;\n// win.findChild("_manufacture").forgetful = true;\n// win.findChild("_transfer").forgetful = true;\n// win.findChild("_purchase").checked = false;\n// win.findChild("_manufacture").checked = true;\n// win.findChild("_transfer").checked = false;\n// if (act == 'O')\n// win.findChild("_open").checked = true;\n// else if (act == 'E')\n// win.findChild("_exploded").checked = true;\n// else if (act == 'R')\n// win.findChild("_released").checked = true;\n// else if (act == 'I')\n// win.findChild("_inprocess").checked = true;\n// win.findChild("_warehouse").setAll();\n var params = new Object();\n params.type = "W";\n toolbox.lastWindow().set(params);\n }\n else\n {\n var params = new Object();\n params.status = act;\n toolbox.lastWindow().set(params);\n }\n\n\n win.sFillList();\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a Purch Activity item.\n*/\nfunction populateMenuMfgAct(pMenu, pItem)\n{\n var menuItem;\n var act = pItem.rawValue("activity");\n var enable = privilegeCheckMfgAct(act);\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowMfgAct);\n}\n\n/*!\n Returns whether user has privileges to view detail on the selected Manufacture Activity.\n*/\nfunction privilegeCheckMfgAct(act)\n{\n if (act == "L") // Planned Orders\n return privileges.check("ViewPlannedOrders");\n else // Work Orders\n return (privileges.check("ViewWorkOrders") || \n privileges.check("EditWorkOrders"));\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshMfgAct()\n{\n _mfgActIsDirty = true;\n fillListMfgAct();\n}\n 257 dockMfgHist 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _b1MfgHist;\nvar _b2MfgHist;\nvar _dockMfgHist;\nvar _groupByMfgHist;\nvar _timeFrameMfgHist;\nvar _typeMfgHist;\nvar _labelMfgHist;\nvar _mfgHist;\nvar _mfgHistIsDirty = true;\n\n/*!\n Initializes Sales History dock widget and places it in the main window.\n*/\nfunction initDockMfgHist()\n{\n // Set up objects\n _dockMfgHist = mainwindow.findChild("_dockMfgHist");\n _mfgHist = mainwindow.findChild("_mfgHist");\n\n _b1MfgHist = _dockMfgHist.findChild("_button1");\n _b2MfgHist = _dockMfgHist.findChild("_button2");\n _labelMfgHist = _dockMfgHist.findChild("_label");\n\n // Set icons\n var iReload = new QIcon;\n iReload.addDbImage("reload_16");\n _b1MfgHist.icon = iReload;\n _b1MfgHist.text = "";\n _b1MfgHist.toolTip = qsTr("Reload");\n\n var iGear = new QIcon();\n iGear.addDbImage("gear_16");\n _b2MfgHist.icon = iGear;\n _b2MfgHist.text = "";\n _b2MfgHist.toolTip = qsTr("Preferences...");\n\n // Load local preferences\n loadPreferencesMfgHist();\n\n // Set columns on list\n setColumnsMfgHist();\n\n // Connect Signals and Slots\n _b1MfgHist.clicked.connect(refreshMfgHist);\n _b2MfgHist.clicked.connect(preferencesMfgHist);\n\n _dtTimer.timeout.connect(refreshMfgHist);\n mainwindow.purchaseOrderReceiptsUpdated.connect(refreshMfgHist);\n mainwindow.vouchersUpdated.connect(refreshMfgHist);\n\n _mfgHist.itemSelected.connect(openWindowMfgHist);\n _mfgHist["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuMfgHist);\n\n _dockMfgHist.visibilityChanged.connect(fillListMfgHist);\n\n // Handle privilge control\n var act = _dockMfgHist.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewManufactureHistoryDock"))\n {\n _dockMfgHist.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewManufactureHistoryDock");\n _menuDesktop.appendAction(act);\n\n fillListMfgHist();\n}\n\n/*!\n Fills the list with sales history data based on parameters determined by\n sales history preferences.\n\n @sa preferencesMfgHist()\n*/\nfunction fillListMfgHist()\n{\n _dockMfgHist = mainwindow.findChild("_dockMfgHist");\n _mfgHist = mainwindow.findChild("_mfgHist");\n\n if (!_dockMfgHist.visible || !_mfgHistIsDirty) \n return;\n\n var timeFrame;\n var type;\n var params = getDatesMfgHist();\n \n if (_groupByMfgHist == "classcode")\n {\n params.group_id = "classcode_id";\n params.group_number = "classcode_code";\n params.group_name = "classcode_descrip";\n }\n else if (_groupByMfgHist == "item")\n {\n params.group_id = "item_id";\n params.group_number = "item_number";\n params.group_name = "item_descrip1";\n }\n else if (_groupByMfgHist == "plancode")\n {\n params.group_id = "plancode_id";\n params.group_number = "plancode_code";\n params.group_name = "plancode_name";\n }\n\n _mfgHist.populate(toolbox.executeDbQuery("desktop","mfgHist", params));\n\n type = qsTr("Receipts");\n\n if (_timeFrameMfgHist == "day")\n timeFrame = qsTr("Today");\n else if (_timeFrameMfgHist == "week")\n timeFrame = qsTr("this Week");\n else if (_timeFrameMfgHist == "month")\n timeFrame = qsTr("this Month");\n else if (_timeFrameMfgHist == "year")\n timeFrame = qsTr("this Year");\n\n _labelMfgHist.text = type + " " + timeFrame;\n\n _mfgHistIsDirty = false;\n}\n\n/*!\n Returns an object with a list containing @a startDate and @a endDate\n that is used for fetching data and opening windows using the date range\n stored in local preferences.\n \n @sa preferencesMfgHist()\n @sa openWindowMfgHist()\n @sa fillListMfgHist()\n*/\nfunction getDatesMfgHist()\n{\n var params = new Object;\n\n params.timeFrame = _timeFrameMfgHist;\n params.interval = "1 " + _timeFrameMfgHist;\n\n var q = toolbox.executeDbQuery("desktop", "getDates", params);\n\n if (q.first())\n {\n params.startDate = q.value("startDate");\n params.endDate = q.value("endDate");\n }\n\n return params;\n}\n\n/*! \n Loads local Sales History preferences into memory.\n\n @sa preferencesMfgHist()\n*/\nfunction loadPreferencesMfgHist()\n{\n // Load preferences\n _groupByMfgHist = preferences.value("desktop/mfgHist/groupBy");\n _timeFrameMfgHist = preferences.value("desktop/mfgHist/timeFrame");\n _typeMfgHist = preferences.value("desktop/mfgHist/type")\n \n // Set to defaults if no values\n _groupByMfgHist = (_groupByMfgHist.length ? _groupByMfgHist : "plancode");\n _timeFrameMfgHist = (_timeFrameMfgHist.length ? _timeFrameMfgHist : "year");\n _typeMfgHist = (_typeMfgHist.length ? _typeMfgHist : "receipts");\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowMfgHist()\n{\n var ui;\n var params = getDatesMfgHist();\n params.run = true;\n\n // TO DO: Work it out so totals launch a window too\n if (_mfgHist.id() == -1)\n return;\n \n // Make sure we can open the window\n if (!privilegeCheckMfgHist())\n return;\n\n // Determine which window to open\n if (_groupByMfgHist == "classcode")\n {\n ui = "dspInventoryHistory";\n params.classcode_id = _mfgHist.id();\n }\n else if (_groupByMfgHist == "item")\n {\n ui = "dspInventoryHistory";\n params.item_id = _mfgHist.id();\n }\n else if (_groupByMfgHist == "plancode")\n {\n ui = "dspInventoryHistory";\n params.plancode_id = _mfgHist.id();\n }\n params.transtype = "R";\n params.ordertype = "WO";\n params.run = true;\n\n // Open the window and perform any special handling required\n toolbox.openWindow(ui);\n toolbox.lastWindow().set(params);\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on sales history.\n*/\nfunction populateMenuMfgHist(pMenu)\n{\n var menuItem;\n var enable = privilegeCheckMfgHist();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowMfgHist);\n}\n\n/*!\n Returns whether user has privileges to view Sales History detail.\n*/\nfunction privilegeCheckMfgHist()\n{\n return privileges.check("ViewInventoryHistory");\n}\n\n/*! \n Set up columns depending on local preferences.\n\n @sa preferencesMfgHist()\n*/\nfunction setColumnsMfgHist()\n{\n _mfgHist.columnCount = 0;\n\n if (_groupByMfgHist == "classcode")\n {\n _mfgHist.addColumn(qsTr("Class Code"), -1, Qt.AlignLeft, true, "classcode_code");\n _mfgHist.addColumn(qsTr("Description"), -1, Qt.AlignLeft, false, "classcode_descrip");\n }\n else if (_groupByMfgHist == "item")\n {\n _mfgHist.addColumn(qsTr("Item Number"), -1, Qt.AlignLeft, true, "item_number");\n _mfgHist.addColumn(qsTr("Description"), -1, Qt.AlignLeft, false, "item_descrip1");\n }\n else if (_groupByMfgHist == "plancode")\n {\n _mfgHist.addColumn(qsTr("Planner Code"), -1, Qt.AlignLeft, true, "plancode_code");\n _mfgHist.addColumn(qsTr("Description"), -1, Qt.AlignLeft, false, "plancode_descrip");\n }\n\n _mfgHist.addColumn(qsTr("Amount"), -1, Qt.AlignRight, true, "amount");\n _mfgHist.addColumn(qsTr("Qty."), -1, Qt.AlignRight, false, "qty");\n}\n\n/*! \n Launches the preferences window where the user can set sales data output preferences.\n*/\nfunction preferencesMfgHist()\n{\n params = new Object;\n params.path = "desktop/mfgHist";\n params.groupBy = _groupByMfgHist;\n params.timeFrame = _timeFrameMfgHist;\n params.type = _typeMfgHist;\n\n var newdlg = toolbox.openWindow("preferencesHistory", mainwindow,\n Qt.ApplicationModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n if (newdlg.exec())\n {\n loadPreferencesMfgHist();\n setColumnsMfgHist();\n refreshMfgHist();\n }\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshMfgHist()\n{\n _mfgHistIsDirty = true;\n fillListMfgHist();\n}\n 258 dockMfgOpen 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockMfgOpen;\nvar _mfgOpen;\nvar _mfgOpenIsDirty = true;\n\n/*!\n Initializes Work Order dock widget and places it in the main window.\n*/\nfunction initDockMfgOpen()\n{\n _dockMfgOpen = mainwindow.findChild("_dockMfgOpen");\n _mfgOpen = mainwindow.findChild("_mfgOpen");\n\n // Set columns on list\n _mfgOpen.addColumn(qsTr("Order#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "wonumber");\n _mfgOpen.addColumn(qsTr("Item#"), XTreeWidget.itemColumn, Qt.AlignLeft, true, "item_number");\n _mfgOpen.addColumn(qsTr("Description"), -1, Qt.AlignLeft, true, "itemdescrip");\n if (metrics.boolean("MultiWhs"))\n _mfgOpen.addColumn(qsTr("Whs."), XTreeWidget.whsColumn, Qt.AlignLeft, true, "warehous_code");\n _mfgOpen.addColumn(qsTr("Status"), XTreeWidget.moneyColumn, Qt.AlignLeft, true, "wo_status");\n _mfgOpen.addColumn(qsTr("Ordered"), XTreeWidget.qtyColumn, Qt.AlignRight, true, "wo_qtyord"); \n _mfgOpen.addColumn(qsTr("Received"), XTreeWidget.qtyColumn, Qt.AlignRight, true, "wo_qtyrcv"); \n _mfgOpen.addColumn(qsTr("UOM"), XTreeWidget.uomColumn, Qt.AlignLeft, true, "uom_name"); \n _mfgOpen.addColumn(qsTr("Start Date"), XTreeWidget.dateColumn, Qt.AlignLeft, false, "wo_startdate"); \n _mfgOpen.addColumn(qsTr("Due Date"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "wo_duedate"); \n _mfgOpen.addColumn(qsTr("Condition"), XTreeWidget.statusColumn, Qt.AlignLeft, false, "condition"); \n if (privileges.check("ViewCosts"))\n {\n _mfgOpen.addColumn(qsTr("Posted Value"), XTreeWidget.moneyColumn, Qt.AlignRight, false, "wo_postedvalue");\n _mfgOpen.addColumn(qsTr("WIP Value"), XTreeWidget.moneyColumn, Qt.AlignRight, true, "wo_wipvalue");\n }\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshMfgOpen);\n mainwindow.workOrdersUpdated.connect(refreshMfgOpen);\n mainwindow.workOrderMaterialsUpdated.connect(refreshMfgOpen);\n mainwindow.workOrderOperationsUpdated.connect(refreshMfgOpen);\n\n _mfgOpen.itemSelected.connect(openWindowMfgOpen);\n _mfgOpen["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuMfgOpen);\n\n _dockMfgOpen.visibilityChanged.connect(fillListMfgOpen);\n\n // Handle privilge control\n var act = _dockMfgOpen.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewWorkOrdersDock"))\n {\n _dockMfgOpen.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewWorkOrdersDock");\n _menuDesktop.appendAction(act);\n\n fillListMfgOpen();\n}\n\n/*!\n Fills the list with open sales data.\n*/\nfunction fillListMfgOpen()\n{\n _dockMfgOpen = mainwindow.findChild("_dockMfgOpen");\n _mfgOpen = mainwindow.findChild("_mfgOpen");\n\n if (!_dockMfgOpen.visible || !_mfgOpenIsDirty)\n return;\n\n params = new Object;\n params.open = qsTr("Open");\n params.exploded = qsTr("Exploded");\n params.released = qsTr("Released");\n params.inprocess = qsTr("In Process");\n\n _mfgOpen.populate(toolbox.executeDbQuery("desktop","mfgOpen",params), true);\n\n _mfgOpenIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowMfgOpen()\n{ \n // Make sure we can open the window for this activity\n if (!privilegeCheckMfgOpen)\n return;\n\n params = new Object;\n params.wo_id = _mfgOpen.id();\n if (privileges.check("MaintainWorkOrders"))\n params.mode = "edit";\n else\n params.mode = "view";\n\n // Open the window and perform any handling required\n var wo = toolbox.openWindow("workOrder");\n wo.set(params);\n\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a Sales Order item.\n*/\nfunction populateMenuMfgOpen(pMenu, pItem)\n{\n var menuItem;\n var enable = privilegeCheckMfgOpen();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowMfgOpen);\n}\n\n/*!\n Returns whether user has privileges to view detail on the selected Sales Order.\n*/\nfunction privilegeCheckMfgOpen()\n{\n return privileges.check("ViewWorkOrders") || \n privileges.check("MaintainWorkOrders");\n\n return false;\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshMfgOpen()\n{\n _mfgOpenIsDirty = true;\n fillListMfgOpen();\n}\n 259 dockMyAccounts 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockMyaccounts;\nvar _accountList;\nvar _accountListIsDirty = true;\n\n/*!\n Initializes the My Accounts dock widget and places it in the main window.\n*/\nfunction initDockAccounts()\n{\n _dockMyaccounts = mainwindow.findChild("_dockMyaccounts");\n _accountList = mainwindow.findChild("_accountList");\n\n // Set columns on list\n _accountList.addColumn(qsTr("Number"), XTreeWidget.itemColumn, Qt.AlignLeft, false, "crmacct_number");\n _accountList.addColumn(qsTr("Name"), -1, Qt.AlignLeft, true, "crmacct_name");\n _accountList.addColumn(qsTr("Contact"), -1, Qt.AlignLeft , false, "cntct_name" );\n _accountList.addColumn(qsTr("Phone"), -1, Qt.AlignLeft, false, "cntct_phone" );\n _accountList.addColumn(qsTr("Email"), -1, Qt.AlignLeft, false, "cntct_email" );\n _accountList.addColumn(qsTr("Address"), -1, Qt.AlignLeft , false, "addr_line1" );\n _accountList.addColumn(qsTr("City"), XTreeWidget.docTypeColumn, Qt.AlignLeft , false, "addr_city" );\n _accountList.addColumn(qsTr("State"), XTreeWidget.orderColumn, Qt.AlignLeft , false, "addr_state" );\n _accountList.addColumn(qsTr("Country"), XTreeWidget.orderColumn, Qt.AlignLeft , false, "addr_country" );\n _accountList.addColumn(qsTr("Postal Code"), XTreeWidget.docTypeColumn, Qt.AlignLeft , false, "addr_postalcode" );\n\n // Connect signals and slots\n mainwindow.crmAccountsUpdated.connect(refreshMyAccts);\n mainwindow.customersUpdated.connect(refreshMyAccts);\n mainwindow.vendorsUpdated.connect(refreshMyAccts);\n\n _accountList.itemSelected.connect(openWindowMyAccts);\n _accountList["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuMyAccts);\n\n _dockMyaccounts.visibilityChanged.connect(fillListMyAccts);\n\n // Handle privilge control\n var act = _dockMyaccounts.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewMyAccountsDock"))\n {\n _dockMyaccounts.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewMyAccountsDock");\n _menuDesktop.appendAction(act);\n\n fillListMyAccts();\n}\n\n/*!\n Fills the My Accounts list with CRM Accounts owned by the current user.\n*/\nfunction fillListMyAccts()\n{\n _dockMyaccounts = mainwindow.findChild("_dockMyaccounts");\n _accountList = mainwindow.findChild("_accountList");\n\n if (!_dockMyaccounts.visible || !_accountListIsDirty)\n return;\n\n params = new Object;\n params.owner_username = mainwindow.username();\n _accountList.populate(toolbox.executeDbQuery("desktop", "crmaccounts", params));\n\n _accountListIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowMyAccts()\n{\n // Make sure we can open the window\n if (!privilegeCheckMyAccts())\n return;\n\n // Determine which contact to open\n params = new Object;\n params.crmacct_id = _accountList.id();\n if (privileges.check("MaintainAllCRMAccounts") || privileges.check("MaintainPersonalCRMAccounts"))\n params.mode = "edit"\n else\n params.mode = "view"\n\n // Open the window and perform any special handling required\n var win = toolbox.openWindow("crmaccount");\n win.set(params);\n}\n\n/*!\n Adds actions to \\a pMenu, typically from a right click on My Contacts.\n*/\nfunction populateMenuMyAccts(pMenu)\n{\n var menuItem;\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = privilegeCheckMyAccts();\n menuItem.triggered.connect(openWindowMyAccts);\n}\n\n/*!\n Returns whether user has privileges to view My Contact detail.\n*/\nfunction privilegeCheckMyAccts()\n{\n return privileges.check("MaintainAllCRMAccounts") || privileges.check("MaintainPersonalAccounts") ||\n privileges.check("ViewAllCRMAccounts") || privileges.check("ViewPersonalCRMAccounts");\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshMyAccts()\n{\n _accountListIsDirty = true;\n fillListMyAccts();\n}\n 260 dockMyContacts 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockMycontacts;\nvar _contactList;\n\n/*!\n Initializes the My Contacts dock widget and places it in the main window.\n*/\nfunction initDockMyCntcts()\n{\n _dockMycontacts = mainwindow.findChild("_dockMycontacts");\n _contactList = mainwindow.findChild("_contactList");\n\n // Set columns on list\n _contactList.addColumn(qsTr("Name"), -1, Qt.AlignLeft , true, "cntct_name" );\n _contactList.addColumn(qsTr("Account#"), XTreeWidget.itemColumn, Qt.AlignLeft, false, "crmacct_number");\n _contactList.addColumn(qsTr("Account Name"), -1, Qt.AlignLeft, false, "crmacct_name");\n _contactList.addColumn(qsTr("Phone"), -1, Qt.AlignLeft, true, "cntct_phone" );\n _contactList.addColumn(qsTr("Email"), -1, Qt.AlignLeft, false, "cntct_email" );\n _contactList.addColumn(qsTr("Address"), -1, Qt.AlignLeft , false, "addr_line1" );\n _contactList.addColumn(qsTr("City"), XTreeWidget.docTypeColumn, Qt.AlignLeft , false, "addr_city" );\n _contactList.addColumn(qsTr("State"), XTreeWidget.orderColumn, Qt.AlignLeft , false, "addr_state" );\n _contactList.addColumn(qsTr("Country"), XTreeWidget.orderColumn, Qt.AlignLeft , false, "addr_country" );\n _contactList.addColumn(qsTr("Postal Code"), XTreeWidget.docTypeColumn, Qt.AlignLeft , false, "addr_postalcode" );\n\n _dtTimer.timeout.connect(fillListMyCntcts);\n\n _contactList.itemSelected.connect(openWindowMyCntcts);\n _contactList["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuMyCntcts);\n\n _dockMycontacts.visibilityChanged.connect(fillListMyCntcts);\n\n // Handle privilge control\n var act = _dockMycontacts.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewMyContactsDock"))\n {\n _dockMycontacts.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewMyContactsDock");\n _menuDesktop.appendAction(act);\n\n fillListMyCntcts();\n}\n\n/*!\n Fills the My Contacts list with Contacts owned by the current user.\n*/\nfunction fillListMyCntcts()\n{\n _dockMycontacts = mainwindow.findChild("_dockMycontacts");\n _contactList = mainwindow.findChild("_contactList");\n\n if (!_dockMycontacts.visible)\n return;\n\n _contactList = mainwindow.findChild("_contactList");\n _contactList.populate(toolbox.executeDbQuery("desktop", "contacts"));\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowMyCntcts()\n{\n // Make sure we can open the window\n if (!privilegeCheckMyCntcts())\n return;\n\n // Determine which contact to open\n params = new Object;\n if (privileges.check("MaintainAllContacts") || privileges.check("MaintainPersonalContacts"))\n params.mode = "edit";\n else\n params.mode = "view";\n params.cntct_id = _contactList.id();\n\n // Open the window and perform any special handling required\n var newdlg = toolbox.openWindow("contact");\n newdlg.set(params);\n newdlg.exec();\n}\n\n/*!\n Adds actions to \\a pMenu, typically from a right click on My Contacts.\n*/\nfunction populateMenuMyCntcts(pMenu)\n{\n var menuItem;\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = privilegeCheckMyCntcts();\n menuItem.triggered.connect(openWindowMyCntcts);\n}\n\n/*!\n Returns whether user has privileges to view My Contact detail.\n*/\nfunction privilegeCheckMyCntcts()\n{\n return privileges.check("MaintainAllContacts") || privileges.check("MaintainPersonalContacts") ||\n privileges.check("ViewAllContacts") || privileges.check("ViewPersonalContacts");\n}\n 261 dockMyTodo 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockMytodo;\nvar _todoList;\n\n/*!\n Initializes To Do dock widget and places it in the main window.\n*/\nfunction initDockTodo()\n{\n _dockMytodo = mainwindow.findChild("_dockMytodo");\n _todoList = mainwindow.findChild("_todoList");\n\n if (_todoList)\n {\n // Set columns on list\n _todoList.addColumn(qsTr("Type"), XTreeWidget.userColumn, Qt.AlignCenter, true, "type");\n _todoList.addColumn(qsTr("Priority"), XTreeWidget.userColumn, Qt.AlignLeft, false, "priority");\n _todoList.addColumn(qsTr("Assigned To"), XTreeWidget.userColumn, Qt.AlignLeft, false, "usr");\n _todoList.addColumn(qsTr("Name"), -1, Qt.AlignLeft, true, "name");\n _todoList.addColumn(qsTr("Description"), -1, Qt.AlignLeft, true, "descrip");\n _todoList.addColumn(qsTr("Status"), XTreeWidget.statusColumn, Qt.AlignLeft, false, "status");\n _todoList.addColumn(qsTr("Start Date"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "start");\n _todoList.addColumn(qsTr("Due Date"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "due");\n _todoList.addColumn(qsTr("Parent#"), XTreeWidget.orderColumn, Qt.AlignLeft, false, "number");\n _todoList.addColumn(qsTr("Customer#"), XTreeWidget.orderColumn, Qt.AlignLeft, false, "cust");\n _todoList.addColumn(qsTr("Account#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "crmacct_number");\n _todoList.addColumn(qsTr("Account Name"), 100, Qt.AlignLeft, false, "crmacct_name");\n _todoList.addColumn(qsTr("Owner"), XTreeWidget.userColumn, Qt.AlignLeft, false,"owner");\n\n _todoList.itemSelected.connect(openWindowToDo);\n _todoList["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuToDo);\n }\n\n\n // Connect signals and slots\n _dtTimer.timeout.connect(fillListSalesAct);\n\n if (_dockMytodo)\n {\n _dockMytodo.visibilityChanged.connect(fillListToDo);\n\n // Handle privilge control\n var act = _dockMytodo.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewTodoDock"))\n {\n _dockMytodo.hide();\n act.enabled = false;\n }\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewTodoDock");\n _menuDesktop.appendAction(act);\n\n fillListToDo();\n}\n\n/*!\n Deletes the selected To Do item.\n*/\nfunction deleteToDo()\n{\n var answer = QMessageBox.question(mainwindow,\n qsTr("Delete To Do?"),\n qsTr("This will permenantly delete the To Do item. Are you sure?"),\n QMessageBox.Yes | QMessageBox.No,\n QMessageBox.Yes);\n if(answer == QMessageBox.No)\n return;\n\n params = new Object;\n params.todoitem_id = _todoList.id();\n\n toolbox.executeDbQuery("desktop","todoDelete", params);\n fillListToDo();\n}\n\n/*!\n Fills the To Do list with CRM activities owned by or assigned to the current user.\n*/\nfunction fillListToDo()\n{\n _dockMytodo = mainwindow.findChild("_dockMytodo");\n _todoList = mainwindow.findChild("_todoList");\n\n if (!_dockMytodo || !_dockMytodo.visible || !_todoList)\n return;\n\n params = new Object;\n params.todo = qsTr("To-do");\n params.incident = qsTr("Incident");\n params.task = qsTr("Task");\n params.project = qsTr("Project");\n params.todoList = true;\n params.incidents = true;\n params.projects = true;\n params.assigned_username = mainwindow.username();\n params.owner_username = mainwindow.username();\n _todoList = mainwindow.findChild("_todoList");\n _todoList.populate(toolbox.executeDbQuery("desktop", "todoList", params), true);\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowToDo()\n{\n params = new Object;\n actId = _todoList.altId();\n act = toDoAct(actId);\n\n // Make sure we can open the window\n if (!privilegeCheckToDo(act))\n return;\n\n // Determine which window to open\n if (act == "D") // To Do\n {\n ui = "todoItem";\n if (privileges.check("MaintainAllToDoItems") || privileges.check("MaintainPersonalToDoItems"))\n params.mode = "edit";\n else\n params.mode = "view";\n params.todoitem_id = _todoList.id();\n }\n else if (act == "I")\n {\n ui = "incident";\n if (privileges.check("MaintainAllIncidents") || privileges.check("MaintainPersonalIncidents"))\n params.mode = "edit";\n else\n params.mode = "view";\n params.incdt_id = _todoList.id();\n }\n else if (act == "T")\n {\n ui = "task";\n if (privileges.check("MaintainAllProjects") || privileges.check("MaintainPersonalProjects"))\n params.mode = "edit";\n else\n params.mode = "view"\n params.prjtask_id = _todoList.id();\n }\n else if (act == "P")\n {\n ui = "project";\n if (privileges.check("MaintainAllProjects") || privileges.check("MaintainPersonalProjects"))\n params.mode = "edit";\n else\n params.mode = "view";\n params.prj_id = _todoList.id();\n }\n\n // Open the window and perform any special handling required\n var newdlg = toolbox.openWindow(ui);\n newdlg.set(params);\n newdlg.exec()\n}\n\nfunction toDoAct(actId)\n{\n if (actId == 1)\n return "D";\n else if (actId == 2)\n return "I";\n else if (actId == 3)\n return "T";\n else if (actId == 4)\n return "P"\n\n return "";\n}\n\n/*!\n Adds actions to \\a pMenu, typically from a right click on My Contacts.\n*/\nfunction populateMenuToDo(pMenu)\n{\n var act = toDoAct(_todoList.altId());\n var menuItem;\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = privilegeCheckToDo(act);\n \n menuItem.triggered.connect(openWindowToDo);\n\n if (act == "D")\n {\n menuItem = pMenu.addAction(qsTr("Delete"));\n menuItem.enabled = privileges.check("MaintainAllToDoItems") || \n privileges.check("MaintainPersonalToDoItems");\n menuItem.triggered.connect(deleteToDo);\n }\n}\n\n/*!\n Returns whether user has privileges to view My Contact detail.\n*/\nfunction privilegeCheckToDo(act)\n{\n if (act == "D") // To Do list\n return privileges.check("MaintainAllToDoItems") || privileges.check("MaintainPersonalToDoItems") ||\n privileges.check("ViewAllToDoItems") || privileges.check("ViewPersonalToDoItems");\n else if (act == "I") // Incidents\n return privileges.check("MaintainAllIncidents") || privileges.check("MaintainPersonalIncidents") ||\n privileges.check("ViewAllIncidents") || privileges.check("ViewPersonalIncidents");\n else if (act == "P" || act == "T") // Projects and Tasks\n return privileges.check("MaintainAllProjects") || privileges.check("MaintainPersonalProjects") ||\n privileges.check("ViewAllProjects") || privileges.check("ViewPersonalProjects");\n\n return false;\n}\n\n 262 dockPayables 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockPayables;\nvar _payables;\nvar _payablesIsDirty = true;\n\n/*!\n Initializes Bank Balance dock widget and places it in the main window.\n*/\nfunction initDockPayables()\n{\n _dockPayables = mainwindow.findChild("_dockPayables");\n _ap = mainwindow.findChild("_ap");\n _ap.rootIsDecorated = false;\n\n // Set columns on list\n _ap.addColumn(qsTr("Status"), -1, Qt.AlignLeft, true);\n _ap.addColumn(qsTr("Balance"), -1, Qt.AlignRight, true);\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshPayables);\n mainwindow.checksUpdated.connect(refreshPayables);\n mainwindow.paymentsUpdated.connect(refreshPayables);\n mainwindow.vouchersUpdated.connect(refreshPayables);\n\n _ap.itemSelected.connect(openWindowPayables);\n _ap["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuPayables);\n\n _dockPayables.visibilityChanged.connect(fillListPayables);\n\n // Handle privilge control\n var act = _dockPayables.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewPayablesDock"))\n {\n _dockPayables.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewPayablesDock");\n _menuDesktop.appendAction(act);\n\n fillListPayables();\n}\n\n/*!\n Fills the list with bank account data.\n*/\nfunction fillListPayables()\n{\n _dockPayables = mainwindow.findChild("_dockPayables");\n _ap = mainwindow.findChild("_ap");\n\n if (!_dockPayables.visible || !_payablesIsDirty)\n return;\n\n var q = toolbox.executeDbQuery("desktop","payables");\n q.first();\n \n _ap.clear();\n var item1 = new XTreeWidgetItem(_ap, 0, qsTr("0+ Days"), q.value("cur_val"));\n var item2 = new XTreeWidgetItem(_ap, 1, qsTr("0-30 Days"), q.value("thirty_val"));\n var item3 = new XTreeWidgetItem(_ap, 2, qsTr("31-60 Days"), q.value("sixty_val"));\n var item4 = new XTreeWidgetItem(_ap, 3, qsTr("61-90 Days"), q.value("ninety_val"));\n var item5 = new XTreeWidgetItem(_ap, 4, qsTr("90+ days"), q.value("plus_val"));\n var item6 = new XTreeWidgetItem(_ap, 5, qsTr("Total Open"), q.value("total_val"));\n\n _payablesIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowPayables()\n{\n // Make sure we can open the window\n if (!privilegeCheckPayables())\n return;\n\n var params = new Object;\n params.run = true;\n\n var asOfDate = mainwindow.dbDate();\n var startDate = new Date();\n var endDate = new Date();\n\n // Open the window and perform any handling required\n toolbox.openWindow("dspAPOpenItemsByVendor");\n\n if (_ap.id() == 0)\n {\n startDate.setDate(asOfDate.getDate());\n toolbox.lastWindow().findChild("_dates").setStartDate(startDate);\n }\n else if (_ap.id() == 1)\n {\n startDate.setDate(asOfDate.getDate() -30);\n endDate.setDate(asOfDate.getDate() -1);\n toolbox.lastWindow().findChild("_dates").setStartDate(startDate);\n toolbox.lastWindow().findChild("_dates").setEndDate(endDate);\n }\n else if (_ap.id() == 2)\n {\n startDate.setDate(asOfDate.getDate() -60);\n endDate.setDate(asOfDate.getDate() -31);\n toolbox.lastWindow().findChild("_dates").setStartDate(startDate);\n toolbox.lastWindow().findChild("_dates").setEndDate(endDate);\n }\n else if (_ap.id() == 3)\n {\n startDate.setDate(asOfDate.getDate() -90);\n endDate.setDate(asOfDate.getDate() -61);\n toolbox.lastWindow().findChild("_dates").setStartDate(startDate);\n toolbox.lastWindow().findChild("_dates").setEndDate(endDate);\n }\n else if (_ap.id() == 4)\n {\n endDate.setDate(asOfDate.getDate() -91);\n toolbox.lastWindow().findChild("_dates").setEndDate(endDate);\n }\n\n toolbox.lastWindow().set(params);\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a bank account item.\n*/\nfunction populateMenuPayables(pMenu, pItem)\n{\n var menuItem;\n var enable = privilegeCheckPayables();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowPayables);\n}\n\n/*!\n Returns whether user has privileges to view detail.\n*/\nfunction privilegeCheckPayables(act)\n{\n return privileges.check("ViewAPOpenItems");\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshPayables()\n{\n _payablesIsDirty = true;\n fillListPayables();\n}\n 263 dockPurchActive 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockPurchAct;\nvar _purchAct;\nvar _purchActIsDirty = true;\n\n/*!\n Initializes Purch Activity dock widget and places it in the main window.\n*/\nfunction initDockPurchAct()\n{\n _dockPurchAct = mainwindow.findChild("_dockPurchAct");\n _purchAct = mainwindow.findChild("_purchAct");\n\n // Set columns on list\n _purchAct.addColumn(qsTr("Type"), -1, Qt.AlignLeft, true, "activity");\n _purchAct.addColumn(qsTr("#"), 40, Qt.AlignRight, true, "count");\n _purchAct.addColumn(qsTr("Amount"), -1, Qt.AlignRight, true, "amount");\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshPurchAct);\n mainwindow.purchaseOrdersUpdated.connect(refreshPurchAct);\n mainwindow.purchaseOrderReceiptsUpdated.connect(refreshPurchAct);\n mainwindow.purchaseRequestsUpdated.connect(refreshPurchAct);\n mainwindow.vouchersUpdated.connect(refreshPurchAct);\n\n _purchAct.itemSelected.connect(openWindowPurchAct);\n _purchAct["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuPurchAct);\n\n _dockPurchAct.visibilityChanged.connect(fillListPurchAct);\n\n // Handle privilge control\n var act = _dockPurchAct.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewPurchaseActivitiesDock"))\n {\n _dockPurchAct.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewPurchaseActivitiesDock");\n _menuDesktop.appendAction(act);\n\n fillListPurchAct();\n}\n\n/*!\n Fills the list with active Purch data.\n*/\nfunction fillListPurchAct()\n{\n _dockPurchAct = mainwindow.findChild("_dockPurchAct");\n _purchAct = mainwindow.findChild("_purchAct");\n\n if (!_dockPurchAct.visible || !_purchActIsDirty)\n return;\n\n var params = new Object;\n if (metrics.value("Application") != "PostBooks")\n {\n params.planned = qsTr("Planned");\n params.firmed = qsTr("Firmed");\n }\n params.request = qsTr("Requests");\n params.unreleased = qsTr("Unreleased");\n params.open = qsTr("Open");\n params.receiving = qsTr("At Receiving");\n params.received = qsTr("Received");\n params.vouchered = qsTr("Vouchered");\n\n _purchAct.populate(toolbox.executeDbQuery("desktop","purchAct", params));\n\n _purchActIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowPurchAct()\n{\n var ui;\n var run = false;\n var act = _purchAct.currentItem().rawValue("activity");\n \n // Make sure we can open the window for this activity\n if (!privilegeCheckPurchAct(act))\n return;\n\n // Determine which window to open\n if (act == "L")\n ui = "dspPlannedOrders";\n else if (act == "Q")\n ui = "dspPurchaseReqsByPlannerCode";\n else if (act == "U" || act == "O")\n ui = "unpostedPurchaseOrders";\n else if (act == "A")\n ui = "unpostedPoReceipts";\n else if (act == "V")\n ui = "dspUninvoicedReceivings";\n else if (act == "I")\n ui = "openVouchers";\n\n // Open the window and perform any handling required\n toolbox.openWindow(ui);\n if (act == "L")\n {\n// toolbox.lastWindow().findChild("_purchase").forgetful = true;\n// toolbox.lastWindow().findChild("_manufacture").forgetful = true;\n// toolbox.lastWindow().findChild("_transfer").forgetful = true;\n// toolbox.lastWindow().findChild("_purchase").checked = true;\n// toolbox.lastWindow().findChild("_manufacture").checked = false;\n// toolbox.lastWindow().findChild("_transfer").checked = false;\n var params = new Object();\n params.type = "P";\n toolbox.lastWindow().set(params);\n toolbox.lastWindow().sFillList();\n }\n if (act == "U" || act == "O") // Set options for open P/O list\n {\n var showUnreleased = toolbox.lastWindow().findChild("_showUnreleased");\n var showOpen = toolbox.lastWindow().findChild("_showOpen");\n showUnreleased.forgetful = true;\n showOpen.forgetful = true;\n if (act == "U")\n {\n showUnreleased.checked = true;\n showOpen.checked = false;\n }\n else\n {\n showUnreleased.checked = false;\n showOpen.checked = true;\n }\n toolbox.lastWindow().sFillList();\n }\n else if (act == "Q" || act == "V") \n {\n toolbox.lastWindow().findChild("_warehouse").setAll();\n toolbox.lastWindow().sFillList();\n }\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a Purch Activity item.\n*/\nfunction populateMenuPurchAct(pMenu, pItem)\n{\n var menuItem;\n var act = pItem.rawValue("activity");\n var enable = privilegeCheckPurchAct(act);\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowPurchAct);\n}\n\n/*!\n Returns whether user has privileges to view detail on the selected Purch Activity.\n*/\nfunction privilegeCheckPurchAct(act)\n{\n if (act == "L") // Planned Orders\n return privileges.check("ViewPlannedOrders");\n else if (act == "Q") // Purchase Requests\n return privileges.check("ViewPurchaseRequests");\n else if (act == "U" || act == "O") // Purchase Orders\n return privileges.check("ViewPurchaseOrders") || \n privileges.check("MaintainPurchaseOrders");\n else if (act == "A") // At Receiving\n return privileges.check("EnterReceipts");\n else if (act == "V") // Unvouchered Receipts\n return privileges.check("ViewUninvoicedReceipts") || \n privileges.check("MaintainUninvoicedReceipts");\n else if (act == "I") // Unposted Vouchers\n return privileges.check("ViewVouchers") || \n privileges.check("MaintainVouchers");\n\n return false;\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshPurchAct()\n{\n _purchActIsDirty = true;\n fillListPurchAct();\n}\n 264 dockPurchHist 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _b1PurchHist;\nvar _b2PurchHist;\nvar _dockPurchHist;\nvar _groupByPurchHist;\nvar _timeFramePurchHist;\nvar _typePurchHist;\nvar _labelPurchHist;\nvar _purchHist;\nvar _purchHistIsDirty = true;\n\n/*!\n Initializes Sales History dock widget and places it in the main window.\n*/\nfunction initDockPurchHist()\n{\n // Set up objects\n _dockPurchHist = mainwindow.findChild("_dockPurchHist");\n _purchHist = mainwindow.findChild("_purchHist");\n\n _b1PurchHist = _dockPurchHist.findChild("_button1");\n _b2PurchHist = _dockPurchHist.findChild("_button2");\n _labelPurchHist = _dockPurchHist.findChild("_label");\n\n // Set icons\n var iReload = new QIcon;\n iReload.addDbImage("reload_16");\n _b1PurchHist.icon = iReload;\n _b1PurchHist.text = "";\n _b1PurchHist.toolTip = qsTr("Reload");\n\n var iGear = new QIcon();\n iGear.addDbImage("gear_16");\n _b2PurchHist.icon = iGear;\n _b2PurchHist.text = "";\n _b2PurchHist.toolTip = qsTr("Preferences...");\n\n // Load local preferences\n loadPreferencesPurchHist();\n\n // Set columns on list\n setColumnsPurchHist();\n\n // Connect Signals and Slots\n _b1PurchHist.clicked.connect(refreshPurchHist);\n _b2PurchHist.clicked.connect(preferencesPurchHist);\n\n _dtTimer.timeout.connect(refreshPurchHist);\n mainwindow.purchaseOrderReceiptsUpdated.connect(refreshPurchHist);\n mainwindow.vouchersUpdated.connect(refreshPurchHist);\n\n _purchHist.itemSelected.connect(openWindowPurchHist);\n _purchHist["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuPurchHist);\n\n _dockPurchHist.visibilityChanged.connect(fillListPurchHist);\n\n // Handle privilge control\n var act = _dockPurchHist.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewPurchaseHistoryDock"))\n {\n _dockPurchHist.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewPurchaseHistoryDock");\n _menuDesktop.appendAction(act);\n\n fillListPurchHist();\n}\n\n/*!\n Fills the list with sales history data based on parameters determined by\n sales history preferences.\n\n @sa preferencesPurchHist()\n*/\nfunction fillListPurchHist()\n{\n _dockPurchHist = mainwindow.findChild("_dockPurchHist");\n _purchHist = mainwindow.findChild("_purchHist");\n\n if (!_dockPurchHist.visible || !_purchHistIsDirty) \n return;\n\n var timeFrame;\n var type;\n var params = getDatesPurchHist();\n params.nonInv = qsTr("Non-Inventory");\n\n if (_typePurchHist == "variances")\n params.variances = true;\n else\n params.receipts = true;\n \n if (_groupByPurchHist == "vend")\n {\n params.group_id = "vend_id";\n params.group_number = "vend_number";\n params.group_name = "vend_name";\n }\n else if (_groupByPurchHist == "item")\n {\n params.group_id = "item_id";\n params.group_number = "item_number";\n params.group_name = "item_descrip1";\n }\n else if (_groupByPurchHist == "agent")\n {\n params.group_id = "1";\n params.group_number = "pohead_agent_username";\n params.group_name = "usr_propername";\n }\n\n _purchHist.populate(toolbox.executeDbQuery("desktop","purchHist", params));\n\n if ("variances" in params)\n type = qsTr("Variances");\n else\n type = qsTr("Receipts");\n\n if (_timeFramePurchHist == "day")\n timeFrame = qsTr("Today");\n else if (_timeFramePurchHist == "week")\n timeFrame = qsTr("this Week");\n else if (_timeFramePurchHist == "month")\n timeFrame = qsTr("this Month");\n else if (_timeFramePurchHist == "year")\n timeFrame = qsTr("this Year");\n\n _labelPurchHist.text = type + " " + timeFrame;\n\n _purchHistIsDirty = false;\n}\n\n/*!\n Returns an object with a list containing @a startDate and @a endDate\n that is used for fetching data and opening windows using the date range\n stored in local preferences.\n \n @sa preferencesPurchHist()\n @sa openWindowPurchHist()\n @sa fillListPurchHist()\n*/\nfunction getDatesPurchHist()\n{\n var params = new Object;\n\n params.timeFrame = _timeFramePurchHist;\n params.interval = "1 " + _timeFramePurchHist;\n\n var q = toolbox.executeDbQuery("desktop", "getDates", params);\n\n if (q.first())\n {\n params.startDate = q.value("startDate");\n params.endDate = q.value("endDate");\n }\n\n return params;\n}\n\n/*! \n Loads local Sales History preferences into memory.\n\n @sa preferencesPurchHist()\n*/\nfunction loadPreferencesPurchHist()\n{\n // Load preferences\n _groupByPurchHist = preferences.value("desktop/purchHist/groupBy");\n _timeFramePurchHist = preferences.value("desktop/purchHist/timeFrame");\n _typePurchHist = preferences.value("desktop/purchHist/type")\n \n // Set to defaults if no values\n _groupByPurchHist = (_groupByPurchHist.length ? _groupByPurchHist : "vend");\n _timeFramePurchHist = (_timeFramePurchHist.length ? _timeFramePurchHist : "year");\n _typePurchHist = (_typePurchHist.length ? _typePurchHist : "receipts");\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowPurchHist()\n{\n var ui;\n var params = getDatesPurchHist();\n params.run = true;\n\n // TO DO: Work it out so totals launch a window too\n if (_purchHist.id() == -1)\n return;\n \n // Make sure we can open the window\n if (!privilegeCheckPurchHist())\n return;\n\n // Determine which window to open\n if (_groupByPurchHist == "vend")\n {\n if (_typePurchHist == "variances")\n ui = "dspPoPriceVariancesByVendor";\n else\n ui = "dspPoItemReceivingsByVendor";\n params.cust_id = _purchHist.id();\n }\n else if (_groupByPurchHist == "item")\n {\n if (_purchHist.id() == -2)\n {\n QMessageBox.warning(mainwindow, qsTr("Unsupported Action"),\n qsTr("Drill down on Non-Inventory Items is not yet supported"));\n return;\n }\n if (_typePurchHist == "variances")\n ui = "dspPoPriceVariancesByItem";\n else\n ui = "dspPoItemReceivingsByItem";\n params.prodcat_id = _purchHist.id();\n }\n else if (_groupByPurchHist == "agent")\n {\n if (_typePurchHist == "variances")\n ui = "dspPoPriceVariancesByVendor";\n else\n ui = "dspPoItemReceivingsByDate";\n params.salesrep_id = _purchHist.id();\n }\n\n // Open the window and perform any special handling required\n toolbox.openWindow(ui);\n var warehouse = toolbox.lastWindow().findChild("_warehouse");\n warehouse.setAll();\n if (_typePurchHist == "receipts")\n {\n toolbox.lastWindow().findChild("_showUnvouchered").forgetful = true;\n toolbox.lastWindow().findChild("_showUnvouchered").checked = true; \n }\n if (_groupByPurchHist == "vend")\n {\n if (_typePurchHist == "variances")\n toolbox.lastWindow().findChild("_vendorGroup").setVendId(_purchHist.id());\n else\n toolbox.lastWindow().findChild("_vendor").setId(_purchHist.id());\n }\n else if (_groupByPurchHist == "item")\n toolbox.lastWindow().findChild("_item").setId(_purchHist.id()); \n else if (_groupByPurchHist == "agent")\n {\n toolbox.lastWindow().findChild("_selectedPurchasingAgent").checked = true;\n toolbox.lastWindow().findChild("_agent").code = \n _purchHist.currentItem().rawValue("pohead_agent_username")\n }\n\n var dates = toolbox.lastWindow().findChild("_dates");\n dates.setStartDate(params.startDate);\n dates.setEndDate(params.endDate);\n toolbox.lastWindow().sFillList();\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on sales history.\n*/\nfunction populateMenuPurchHist(pMenu)\n{\n var menuItem;\n var enable = privilegeCheckPurchHist();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowPurchHist);\n}\n\n/*!\n Returns whether user has privileges to view Sales History detail.\n*/\nfunction privilegeCheckPurchHist()\n{\n if (_typePurchHist == "variances")\n return privileges.check("ViewVendorPerformance");\n else if (_typePurchHist == "receipts")\n return privileges.check("ViewReceiptsReturns");\n \n return false;\n}\n\n/*! \n Set up columns depending on local preferences.\n\n @sa preferencesPurchHist()\n*/\nfunction setColumnsPurchHist()\n{\n _purchHist.columnCount = 0;\n\n if (_groupByPurchHist == "vend")\n {\n _purchHist.addColumn(qsTr("Vendor"), -1, Qt.AlignLeft, true, "vend_number");\n _purchHist.addColumn(qsTr("Name"), -1, Qt.AlignLeft, false, "vend_name");\n }\n else if (_groupByPurchHist == "item")\n {\n _purchHist.addColumn(qsTr("Item Number"), -1, Qt.AlignLeft, true, "item_number");\n _purchHist.addColumn(qsTr("Description"), -1, Qt.AlignLeft, false, "item_descrip1");\n }\n else if (_groupByPurchHist == "agent")\n {\n _purchHist.addColumn(qsTr("Purch. Agent"), -1, Qt.AlignLeft, true, "pohead_agent_username");\n _purchHist.addColumn(qsTr("Name"), -1, Qt.AlignLeft, false, "usr_propername");\n }\n\n _purchHist.addColumn(qsTr("Amount"), -1, Qt.AlignRight, true, "amount");\n _purchHist.addColumn(qsTr("Qty."), -1, Qt.AlignRight, false, "qty");\n}\n\n/*! \n Launches the preferences window where the user can set sales data output preferences.\n*/\nfunction preferencesPurchHist()\n{\n params = new Object;\n params.path = "desktop/purchHist";\n params.groupBy = _groupByPurchHist;\n params.timeFrame = _timeFramePurchHist;\n params.type = _typePurchHist;\n\n var newdlg = toolbox.openWindow("preferencesHistory", mainwindow,\n Qt.ApplicationModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n if (newdlg.exec())\n {\n loadPreferencesPurchHist();\n setColumnsPurchHist();\n refreshPurchHist();\n }\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshPurchHist()\n{\n _purchHistIsDirty = true;\n fillListPurchHist();\n}\n 269 dockSalesOpen 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockSalesOpen;\nvar _salesOpen;\nvar _salesOpenIsDirty = true;\n\n/*!\n Initializes Open Sales Order dock widget and places it in the main window.\n*/\nfunction initDockSalesOpen()\n{\n _dockSalesOpen = mainwindow.findChild("_dockSalesOpen");\n _salesOpen = mainwindow.findChild("_salesOpen");\n\n // Set columns on list\n _salesOpen.addColumn(qsTr("Order#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "cohead_number");\n _salesOpen.addColumn(qsTr("Customer#"), XTreeWidget.orderColumn, Qt.AlignLeft, true, "cust_number");\n _salesOpen.addColumn(qsTr("Bill To"), -1, Qt.AlignLeft, true, "cohead_billtoname");\n _salesOpen.addColumn(qsTr("Bill Contact"), -1, Qt.AlignLeft, false, "billto_cntct");\n _salesOpen.addColumn(qsTr("Bill Phone"), -1, Qt.AlignLeft, false, "cohead_billto_cntct_phone"); \n _salesOpen.addColumn(qsTr("Ship To"), -1, Qt.AlignLeft, true, "cohead_shiptoname");\n _salesOpen.addColumn(qsTr("Ship Contact"), -1, Qt.AlignLeft, false, "shipto_cntct");\n _salesOpen.addColumn(qsTr("Ship Phone"), -1, Qt.AlignLeft, false, "cohead_shipto_cntct_phone");\n _salesOpen.addColumn(qsTr("Ship Via"), -1, Qt.AlignLeft, true, "cohead_shipvia"); \n _salesOpen.addColumn(qsTr("Sched. Date"), XTreeWidget.dateColumn, Qt.AlignLeft, true, "scheddate");\n _salesOpen.addColumn(qsTr("Amount"), XTreeWidget.moneyColumn, Qt.AlignRight, true, "amount");\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshSalesOpen);\n mainwindow.invoicesUpdated.connect(refreshSalesOpen);\n mainwindow.salesOrdersUpdated.connect(refreshSalesOpen);\n\n _salesOpen.itemSelected.connect(openWindowSalesOpen);\n _salesOpen["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuSalesOpen);\n\n _dockSalesOpen.visibilityChanged.connect(fillListSalesOpen);\n\n // Handle privilge control\n var act = _dockSalesOpen.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewSalesOrdersDock"))\n {\n _dockSalesOpen.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewSalesOrdersDock");\n _menuDesktop.appendAction(act);\n\n fillListSalesOpen();\n}\n\n/*!\n Fills the list with open sales data.\n*/\nfunction fillListSalesOpen()\n{\n _dockSalesOpen = mainwindow.findChild("_dockSalesOpen");\n _salesOpen = mainwindow.findChild("_salesOpen");\n\n if (!_dockSalesOpen.visible || !_salesOpenIsDirty)\n return;\n\n _salesOpen.populate(toolbox.executeDbQuery("desktop","salesOpen"));\n\n _salesOpenIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowSalesOpen()\n{ \n // Make sure we can open the window for this activity\n if (!privilegeCheckSalesOpen)\n return;\n\n params = new Object;\n params.sohead_id = _salesOpen.id();\n if (privileges.check("MaintainSalesOrders"))\n params.mode = "edit";\n else\n params.mode = "view";\n\n // Open the window and perform any handling required\n var so = toolbox.openWindow("salesOrder");\n so.set(params);\n\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a Sales Order item.\n*/\nfunction populateMenuSalesOpen(pMenu, pItem)\n{\n var menuItem;\n var enable = privilegeCheckSalesOpen();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowSalesOpen);\n}\n\n/*!\n Returns whether user has privileges to view detail on the selected Sales Order.\n*/\nfunction privilegeCheckSalesOpen()\n{\n return privileges.check("ViewSalesOrders") || \n privileges.check("MaintainSalesOrders");\n\n return false;\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshSalesOpen()\n{\n _salesOpenIsDirty = true;\n fillListSalesOpen();\n}\n 270 dockUserOnline 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _dockUserOnline;\nvar _userOnline;\nvar _userOnlineIsDirty = true;\n\n/*!\n Initializes Open Sales Order dock widget and places it in the main window.\n*/\nfunction initDockUserOnline()\n{\n _dockUserOnline = mainwindow.findChild("_dockUserOnline");\n _userOnline = mainwindow.findChild("_userOnline");\n\n // Set columns on list\n _userOnline.addColumn(qsTr("Username"), -1, Qt.AlignLeft, true, "usr_username");\n _userOnline.addColumn(qsTr("Proper Name"), -1, Qt.AlignLeft, true, "usr_propername");\n _userOnline.addColumn(qsTr("Email"), -1, Qt.AlignLeft, true, "usr_email");\n _userOnline.addColumn(qsTr("# Internal"), -1, Qt.AlignLeft, true, "cnt_internal");\n _userOnline.addColumn(qsTr("# External"), -1, Qt.AlignLeft, true, "cnt_external");\n _userOnline.addColumn(qsTr("Client Start"), XTreeWidget.timeDateColumn, Qt.AlignLeft, true, "client_start"); \n _userOnline.addColumn(qsTr("Query Start"), XTreeWidget.timeDateColumn, Qt.AlignLeft, true, "query_start");\n _userOnline.addColumn(qsTr("Client Address"), -1, Qt.AlignLeft, true, "client_addr");\n\n // Connect Signals and Slots\n _dtTimer.timeout.connect(refreshUserOnline);\n\n _userOnline.itemSelected.connect(openWindowUserOnline);\n _userOnline["populateMenu(QMenu*,XTreeWidgetItem*,int)"]\n .connect(populateMenuUserOnline);\n\n _dockUserOnline.visibilityChanged.connect(refreshUserOnline);\n\n // Handle privilge control\n var act = _dockUserOnline.toggleViewAction();\n\n // Don't show if no privs\n if (!privileges.check("ViewUsersOnlineDock"))\n {\n _dockUserOnline.hide();\n act.enabled = false;\n }\n\n // Allow rescan to let them show if privs granted\n act.setData("ViewUsersOnlineDock");\n _menuDesktop.appendAction(act);\n\n fillListUserOnline();\n}\n\n/*!\n Fills the list with open sales data.\n*/\nfunction fillListUserOnline()\n{\n _dockUserOnline = mainwindow.findChild("_dockUserOnline");\n _userOnline = mainwindow.findChild("_userOnline");\n\n if (!_dockUserOnline.visible || !_userOnlineIsDirty)\n return;\n\n _userOnline.populate(toolbox.executeDbQuery("desktop","userOnline"));\n _userOnlineIsDirty = false;\n}\n\n/*! \n Opens the window associated with the selected item.\n*/\nfunction openWindowUserOnline()\n{ \n // Make sure we can open the window for this activity\n if (!privilegeCheckUserOnline() ||\n !_userOnline.currentItem().rawValue("usr_username").length)\n return;\n\n params = new Object;\n params.username = _userOnline.currentItem().rawValue("usr_username");\n if (privilegeCheckUserOnline())\n params.mode="edit";\n\n // Open the window and perform any handling required\n var user = toolbox.openWindow("user");\n user.set(params);\n if (user.exec())\n refreshUserOnline();\n}\n\n/*!\n Adds actions to @a pMenu, typically from a right click on a user record.\n*/\nfunction populateMenuUserOnline(pMenu, pItem)\n{\n if (!_userOnline.currentItem().rawValue("usr_username").length)\n return;\n\n var menuItem;\n var enable = privilegeCheckUserOnline();\n\n menuItem = pMenu.addAction(_open);\n menuItem.enabled = enable;\n menuItem.triggered.connect(openWindowUserOnline);\n}\n\n/*!\n Returns whether user has privileges to view detail on the selected User.\n*/\nfunction privilegeCheckUserOnline()\n{\n return privileges.check("MaintainUsers");\n\n return false;\n}\n\n/*!\n Refreshes data if the window is visible, or the next time it becomes visible\n*/\nfunction refreshUserOnline()\n{\n _userOnlineIsDirty = true;\n fillListUserOnline();\n}\n 271 incident 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("dockMyTodo");\n\n// Connect this window so that the To Do dock list gets updated\nmydialog.finished.connect(fillListToDo);\n 425 preferencesComment 0 t try\r\n{\r\n var _usr = mywindow.findChild("_usr");\r\n var _type = mywindow.findChild("_type");\r\n var _source = mywindow.findChild("_source");\r\n var _dates = mywindow.findChild("_dates");\r\n var startdate;\r\n var enddate;\r\n\r\n if (!privileges.check("AccessAdditionalUser"))\r\n _usr.hide();\r\n else if(privileges.check("AccessAdditionalUser"))\r\n _usr.show();\r\n\r\n _type.addColumn("Comment Type", -1, 1, true, "commenttype_name");\r\n _source.addColumn("Comment Source", -1, 1, false, "cmntsource_name");\r\n _source.addColumn("Comment Source", -1, 1, true, "cmntsource_fullname");\r\n _usr.addColumn("User Name", -1, 1, true, "usr_username");\r\n\r\n populate();\r\n mydialog.accepted.connect(save);\r\n}\r\ncatch (e)\r\n{\r\n QMessageBox.critical(mywindow, "preferencesComment",\r\n "preferencesComment.js exception: " + e);\r\n}\r\n\r\nfunction set(params)\r\n{\r\n var prefusr = preferences.value("MonitoredCommentUsrs");\r\n var preftyp = preferences.value("MonitoredCommentTypes");\r\n var prefsrc = preferences.value("MonitoredCommentSrcs");\r\n\r\n var getDate = "SELECT CURRENT_DATE + CAST( AS INTEGER) AS datevalue;";\r\n\r\n params.offSet = ((preferences.value("MonitoredCommentStrtDate") != '')?preferences.value("MonitoredCommentStrtDate"):-1);\r\n var data = toolbox.executeQuery(getDate, params);\r\n if (data.first())\r\n _dates.setStartDate(data.value("datevalue"));\r\n else if (data.lastError().type != QSqlError.NoError)\r\n {\r\n QMessageBox.critical(mainwindow, qsTr("Database Error"),\r\n data.lastError().text);\r\n return;\r\n }\r\n\r\n params.offSet = ((preferences.value("MonitoredCommentEndDate") != '')?preferences.value("MonitoredCommentEndDate"):0);\r\n var data = toolbox.executeQuery(getDate, params);\r\n if (data.first())\r\n _dates.setEndDate(data.value("datevalue"));\r\n else if (data.lastError().type != QSqlError.NoError)\r\n {\r\n QMessageBox.critical(mainwindow, qsTr("Database Error"),\r\n data.lastError().text);\r\n return;\r\n }\r\n\r\n if (prefusr == '')\r\n {\r\n var qry = "SELECT usr_id FROM usr WHERE (usr_username = current_user);";\r\n var data = toolbox.executeQuery(qry, -1);\r\n if (data.first())\r\n _usr.setId(data.value("usr_id"));\r\n else if (data.lastError().type != QSqlError.NoError)\r\n {\r\n QMessageBox.critical(mainwindow, qsTr("Database Error"),\r\n data.lastError().text);\r\n return;\r\n }\r\n }\r\n else\r\n {\r\n var usrList = new Array();\r\n usrList = prefusr.split(",");\r\n for (var i in usrList)\r\n _usr.setId(usrList[i], false);\r\n }\r\n\r\n var typList = new Array();\r\n if (preftyp == '')\r\n _type.setId(0);\r\n else\r\n {\r\n typList = preftyp.split(",");\r\n for (var j in typList)\r\n _type.setId(typList[j], false);\r\n }\r\n\r\n var srcList = new Array();\r\n if (prefsrc == '')\r\n _source.setId(1);\r\n else\r\n {\r\n srcList = prefsrc.split(",");\r\n for (var k in srcList)\r\n _source.setId(srcList[k], false);\r\n }\r\n}\r\n\r\nfunction populate()\r\n{\r\n try\r\n {\r\n _type.clear();\r\n _type.populate(toolbox.executeDbQuery("desktop","cmmntPrefType"));\r\n _source.clear();\r\n _source.populate(toolbox.executeDbQuery("desktop","cmmntPrefSrc"));\r\n if (privileges.check("AccessAdditionalUser"))\r\n {\r\n _usr.clear();\r\n _usr.populate(toolbox.executeDbQuery("desktop","cmmntPrefUser"));\r\n }\r\n }\r\n catch (e)\r\n {\r\n QMessageBox.critical(mywindow, "preferencesComment",\r\n "populateType exception: " + e);\r\n }\r\n}\r\n\r\nfunction save()\r\n{\r\n var typList = new Array();\r\n var selectedTyp = _type.selectedItems();\r\n for (var i = 0; i < selectedTyp.length; i++)\r\n {\r\n if (selectedTyp[i].id() != 0)\r\n typList[i] = selectedTyp[i].id();\r\n }\r\n preferences.set("MonitoredCommentTypes", typList.join(","));\r\n\r\n var srcList = new Array();\r\n var selectedSrc = _source.selectedItems();\r\n for (var i = 0; i < selectedSrc.length; i++)\r\n {\r\n if (selectedSrc[i].id() != 1)\r\n srcList[i] = selectedSrc[i].id();\r\n }\r\n preferences.set("MonitoredCommentSrcs", srcList.join(","));\r\n\r\n if (privileges.check("AccessAdditionalUser"))\r\n {\r\n var usrList = new Array();\r\n var selectedUsr = _usr.selectedItems();\r\n for (var i = 0; i < selectedUsr.length; i++)\r\n usrList[i] = selectedUsr[i].id();\r\n preferences.set("MonitoredCommentUsrs", usrList.join(","));\r\n }\r\n\r\n var params = new Object();\r\n params.startdate1 = _dates.startDate;\r\n var qryStdate = "SELECT (::DATE - (current_date)) AS difference1;";\r\n var data1 = toolbox.executeQuery(qryStdate,params);\r\n if (data1.first())\r\n var strtDateoffSet = data1.value("difference1");\r\n else if (data1.lastError().type != QSqlError.NoError)\r\n {\r\n QMessageBox.critical(mywindow, qsTr("Database Error"),\r\n data1.lastError().text);\r\n mywindow.reject();\r\n }\r\n\r\n params.enddate1 = _dates.endDate;\r\n var qryEnddate = "SELECT (::DATE - (current_date)) AS difference2;";\r\n var data2 = toolbox.executeQuery(qryEnddate,params);\r\n if (data2.first())\r\n var endDateoffSet = data2.value("difference2");\r\n else if (data2.lastError().type != QSqlError.NoError)\r\n {\r\n QMessageBox.critical(mywindow, qsTr("Database Error"),\r\n data2.lastError().text);\r\n mywindow.reject();\r\n }\r\n\r\n preferences.set("MonitoredCommentStrtDate", strtDateoffSet);\r\n preferences.set("MonitoredCommentEndDate", endDateoffSet);\r\n}\r\n 273 preferencesHistory 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\nvar _groupBy = mywindow.findChild("_groupBy");\nvar _timeFrame = mywindow.findChild("_timeFrame");\nvar _type = mywindow.findChild("_type");\n\nvar _path;\n\n// Populate timeFrame combo\n_timeFrame.append(0, qsTr("Today"), "day");\n_timeFrame.append(1, qsTr("This Week"), "week");\n_timeFrame.append(2, qsTr("This Month"), "month");\n_timeFrame.append(3, qsTr("This Year"), "year");\n\nmydialog.accepted.connect(save);\n\n/*!\n Parameters @a params are passed to set up selection criteria for the window\n*/\nfunction set(params)\n{\n if ("path" in params)\n {\n _path = params.path;\n if (_path == "desktop/salesHist")\n {\n _type.append(0, qsTr("Bookings"), "bookings");\n _type.append(1, qsTr("Sales"), "sales");\n\n _groupBy.append(0, qsTr("Customer"), "cust");\n _groupBy.append(1, qsTr("Product Category"), "prodcat");\n _groupBy.append(2, qsTr("Sales Rep"), "salesrep");\n\n mywindow.windowTitle = qsTr("Sales History Preferences");\n }\n else if (_path == "desktop/purchHist")\n {\n _type.append(0, qsTr("Receipts"), "receipts");\n _type.append(1, qsTr("Variances"), "variances");\n\n _groupBy.append(0, qsTr("Vendor"), "vend");\n _groupBy.append(1, qsTr("Item"), "item");\n _groupBy.append(2, qsTr("Purchase Agent"), "agent");\n\n mywindow.windowTitle = qsTr("Purchase History Preferences");\n }\n else if (_path == "desktop/mfgHist")\n {\n _type.append(0, qsTr("Receipts"), "receipts");\n _type.enabled = false;\n\n _groupBy.append(0, qsTr("Class Code"), "classcode");\n _groupBy.append(1, qsTr("Item"), "item");\n _groupBy.append(2, qsTr("Planner Code"), "plancode");\n\n mywindow.windowTitle = qsTr("Manufacture History Preferences");\n }\n }\n\n if ("type" in params)\n _type.code = params.type;\n\n if ("groupBy" in params)\n _groupBy.code = params.groupBy;\n\n if ("timeFrame" in params)\n _timeFrame.code = params.timeFrame;\n\n}\n\n/*!\n Saves selection preferences to the local machine.\n*/\nfunction save()\n{\n // Save preferences to local machine\n preferences.set(_path + "/type", _type.code);\n preferences.set(_path + "/groupBy", _groupBy.code);\n preferences.set(_path + "/timeFrame", _timeFrame.code);\n}\n\n 274 preferencesSelections 0 t /*\n * This file is part of the xtdesktop package for xTuple ERP: PostBooks edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\nvar _gl = mywindow.findChild("_gl");\n\n// Set columns on list\n_gl.addColumn(qsTr("Account#"), -1, Qt.AlignLeft, true, "accnt_id");\n_gl.addColumn(qsTr("Description"), -1, Qt.AlignLeft, true, "accnt_descrip");\n_gl.addColumn(qsTr("Type"), -1, Qt.AlignLeft, true, "accnt_type" );\n\nparams = new Object;\nparams.asset = qsTr("Asset");\nparams.liability = qsTr("Liability");\nparams.revenue = qsTr("Revenue");\nparams.expense = qsTr("Expense");\nparams.equity = qsTr("Equity");\n\n_gl.populate(toolbox.executeDbQuery("desktop", "glaccounts", params));\n\nfunction set(params)\n{\n // Select accounts previously selected\n var pref = preferences.value("MonitoredAccounts");\n var accntList = new Array();\n accntList = pref.split(",");\n for (i in accntList) \n {\n _gl.setId(accntList[i], false);\n }\n}\n\nfunction save()\n{\n var accntList = new Array();\n var selected = _gl.selectedItems();\n for (var i = 0; i < selected.length; i++)\n accntList[i] = selected[i].id();\n\n preferences.set("MonitoredAccounts", accntList.join(","));\n}\n\n// Connect save on Ok\nmydialog.accepted.connect(save);\n 275 project 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("dockMyTodo");\n\n// Connect this window so that the To Do dock list gets updated\nmydialog.finished.connect(fillListToDo);\n 427 sendMessageToUser 0 t //debugger;\n\nvar _usr = mywindow.findChild("_usr");\nvar _message = mywindow.findChild("_message");\nvar _send = mywindow.findChild("_send");\n\nfunction getParams() \n{\n var params = new Object;\n\n params.message = _message.plainText;\n if (_usr.id() > 0)\n params.usr_id = _usr.id();\n\n return params;\n}\n\nfunction sHandleButtons()\n{\n var qry = "SELECT usr_id FROM usr WHERE usr_username = current_user;";\n var data = toolbox.executeQuery(qry, -1);\n if (data.first())\n var currenttUsr_id = data.value("usr_id");\n\n if (currenttUsr_id == _usr.id())\n {\n if (QMessageBox.information(mainwindow, qsTr("Send Message?"),\n qsTr("You are trying to Send Reply Message to Yourself."\n +"\\nAre you sure that you really want to Continue?."),\n QMessageBox.Yes | QMessageBox.Default, QMessageBox.No | QMessageBox.Escape) == QMessageBox.No)\n {\n _usr.clear();\n return;\n }\n else\n _send.enabled = (_usr.id() >= 0);\n }\n else\n _send.enabled = (_usr.id() >= 0);\n}\n\nfunction send()\n{\n var params = getParams(); \n var qry = toolbox.executeDbQuery("desktop", "sendMessageToUser", params);\n QMessageBox.information(mywindow,'Sent','Message Sent');\n mywindow.close();\n}\n\nfunction set(input)\n{\n if ("user" in input)\n _usr.setUsername(input.user);\n else\n QMessageBox.warning(mywindow, "Message", "Could not set username");\n}\n\n_usr["newId(int)"].connect(sHandleButtons);\n_send.clicked.connect(send);\nmywindow.findChild("_close").clicked.connect(mywindow, "close");\n 428 systemMessage 0 t //debugger;\n\nvar _save = mywindow.findChild("_save");\nvar layout = toolbox.widgetGetLayout(_save);\nvar _user = mywindow.findChild("_user");\n\nvar _reply = toolbox.createWidget("QPushButton", mywindow, "_reply");\n_reply.text = qsTr("Reply");\nlayout.insertWidget(0, _reply);\n\n_reply.clicked.connect(sendReply);\n\nfunction sendReply() \n{\n var params = new Object;\n params.user = _user.text;\n\n var newwnd = toolbox.openWindow("sendMessageToUser", mywindow, Qt.ApplicationModal, Qt.Dialog);\n toolbox.lastWindow().set(params);\n newwnd.exec();\n mydialog.accept();\n} 276 task 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("dockMyTodo");\n\n// Connect this window so that the To Do dock list gets updated\nmydialog.finished.connect(fillListToDo);\n 277 todoItem 0 t /*\n * This file is part of the xTuple ERP: PostBooks Edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\n\ninclude("dockMyTodo");\n\n// Connect this window so that the To Do dock list gets updated\nmydialog.finished.connect(fillListToDo);\n 278 userPreferences 0 t /*\n * This file is part of the xtdesktop package for xTuple ERP: PostBooks edition, a free and\n * open source Enterprise Resource Planning software suite,\n * Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\n * It is licensed to you under the Common Public Attribution License\n * version 1.0, the full text of which (including xTuple-specific Exhibits)\n * is available at www.xtuple.com/CPAL. By using this software, you agree\n * to be bound by its terms.\n */\nvar _interfaceWorkspace = mywindow.findChild("_interfaceWorkspace");\n\n_interfaceWorkspace.toggled.connect(desktopNotice);\n\nfunction desktopNotice()\n{\n if (_interfaceWorkspace.checked &&\n !preferences.boolean("NoDesktopNotice"))\n toolbox.openWindow("desktopNotice", mywindow, Qt.WindowModal, Qt.Dialog);\n}\n \. -- -- Data for Name: pkguiform; Type: TABLE DATA; Schema: xtdesktop; Owner: admin -- COPY pkguiform (uiform_id, uiform_name, uiform_order, uiform_enabled, uiform_source, uiform_notes) FROM stdin; 143 desktopAccounting 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n desktopAccounting\n \n \n \n 0\n 0\n 876\n 554\n \n \n \n Accounting\n \n \n true\n \n \n QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks\n \n \n \n \n \n \n \n 14\n 75\n true\n \n \n \n Accounting\n \n \n \n \n \n \n Payables\n \n \n \n 6\n \n \n 0\n \n \n \n \n taxes_clock_48\n \n \n Aging\n \n \n ap.dspAPAging\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n check_write_48\n \n \n Workbench\n \n \n ap.workbench\n \n \n dspBillingSelections\n \n \n \n \n \n \n \n \n \n customers_zoom_48\n \n \n Vendor\n \n \n po.vendorWorkBench\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Receivables\n \n \n \n 6\n \n \n 0\n \n \n \n \n collection_account_clock_48\n \n \n Aging\n \n \n ar.dspARAging\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n collection_account_write_48\n \n \n Workbench\n \n \n ar.arWorkBench\n \n \n dspBillingSelections\n \n \n \n \n \n \n \n \n \n customers_zoom_48\n \n \n Customer\n \n \n so.customerWorkbench\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n General Ledger\n \n \n \n 6\n \n \n 0\n \n \n \n \n company_write_48\n \n \n Chart of Accounts\n \n \n gl.accountNumbers\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n reward_write_48\n \n \n Budget\n \n \n gl.maintainBudgets\n \n \n \n \n \n \n \n \n \n accounting_write_48\n \n \n Standard Journal\n \n \n gl.listStandardJournals\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n accounting_ok_48\n \n \n Journal Series\n \n \n gl.unpostedEntries\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Bank Accounts\n \n \n \n 6\n \n \n 0\n \n \n \n \n bank_write_48\n \n \n Adjustment\n \n \n gl.adjustmentEditList\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n bank_ok_48\n \n \n Reconcile\n \n \n gl.reconcileBankaccnt\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Reporting\n \n \n \n 6\n \n \n 0\n \n \n \n \n spreadsheet_48\n \n \n Financial Statements\n \n \n gl.viewFinancialReport\n \n \n \n \n \n \n \n \n \n \n \n \n balance_zoom_48\n \n \n Trial Balance\n \n \n gl.dspTrialBalances\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n accounting_zoom_48\n \n \n Transactions\n \n \n gl.dspGLTransactions\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Bank Accounts\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n Payables\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n Receivables\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n Monitored Accounts\n \n \n 8\n \n \n \n \n 0\n \n \n 0\n \n \n 0\n \n \n 3\n \n \n 3\n \n \n \n \n false\n \n \n \n \n \n \n \n 16\n 16\n \n \n \n b\n \n \n true\n \n \n \n \n \n \n \n 16\n 16\n \n \n \n b\n \n \n true\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 40\n 20\n \n \n \n \n \n \n \n \n \n \n MenuButton\n QWidget\n

menubutton.h
\n \n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n \n \n \n\n 144 desktopCRM 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n desktopCRM\n \n \n \n 0\n 0\n 893\n 554\n \n \n \n CRM\n \n \n true\n \n \n true\n \n \n \n \n \n \n \n 14\n 75\n true\n \n \n \n Corporate Relationship Management\n \n \n \n \n \n \n Personal\n \n \n \n 6\n \n \n 0\n \n \n \n \n lamp_48\n \n \n Event Manager\n \n \n sys.eventManager\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n calendar_month_zoom_48\n \n \n To Do Calendar\n \n \n crm.todoListCalendar\n \n \n \n \n \n \n \n \n \n \n \n \n notepad_zoom_48\n \n \n To Do List\n \n \n crm.todoList\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Corporate\n \n \n \n 6\n \n \n 0\n \n \n \n \n clients_48\n \n \n Accounts\n \n \n crm.crmaccounts\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n execute_48\n \n \n Contacts\n \n \n crm.contacts\n \n \n \n \n \n \n \n \n \n \n \n \n book_48\n \n \n Address Book\n \n \n crm.addresses\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Pre-Sales\n \n \n \n 6\n \n \n 0\n \n \n \n \n customers_help_48\n \n \n Prospects\n \n \n so.prospects\n \n \n \n \n \n \n \n \n \n \n \n \n order_help_48\n \n \n Quotes\n \n \n so.listQuotes\n \n \n \n \n \n \n \n \n \n order_search_48\n \n \n Quotes by Item\n \n \n so.dspQuoteOrderLookupByItem\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n money_bag_write_48\n \n \n Opportunities\n \n \n crm.listOpportunity\n \n \n dspBillingSelections\n \n \n \n \n \n \n \n \n \n \n \n \n Project\n \n \n \n 6\n \n \n 0\n \n \n \n \n spreadsheet_48\n \n \n Projects\n \n \n pm.projects\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n time_sheet_write_48\n \n \n Time & Expense\n \n \n pm.teSheets\n \n \n \n \n \n \n \n \n \n \n \n \n spreadsheet_zoom_48\n \n \n Project Orders\n \n \n pm.dspOrderActivityByProject\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Account Management\n \n \n \n 6\n \n \n 0\n \n \n \n \n customers_48\n \n \n Customer Workbench\n \n \n so.customerWorkbench\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n chat_48\n \n \n Incidents\n \n \n crm.incidentList\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n To Do\n \n \n 8\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n My Contacts\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n My Accounts\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n \n MenuButton\n QWidget\n
menubutton.h
\n
\n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n
\n \n \n
\n 145 desktopMaintenance 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n desktopMaintenance\n \n \n \n 0\n 0\n 905\n 563\n \n \n \n Maintenance\n \n \n true\n \n \n QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks\n \n \n \n \n \n \n \n 14\n 75\n true\n \n \n \n Maintenance\n \n \n \n \n \n \n Products\n \n \n \n 6\n \n \n 0\n \n \n \n \n inventory_categories_48\n \n \n Items\n \n \n pd.listItems\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n inventory_write_48\n \n \n Bill of Materials\n \n \n pd.listBOMs\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n ImgDownArrow\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n \n \n \n Inventory\n \n \n \n 6\n \n \n 0\n \n \n \n \n store_house_48\n \n \n Site\n \n \n im.warehouse\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n cabinet_48\n \n \n Locations\n \n \n im.warehousesLocations\n \n \n dspBillingSelections\n \n \n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n ImgDownArrow\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n \n \n \n Pricing\n \n \n \n 6\n \n \n 0\n \n \n \n \n reward_clock_48\n \n \n Schedules\n \n \n so.pricingSchedules\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n customers_write_48\n \n \n Assignments\n \n \n so.pricingScheduleAssignments\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n ImgDownArrow\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n \n \n \n Security\n \n \n \n 6\n \n \n 0\n \n \n \n \n user_48\n \n \n Users\n \n \n sys.maintainUsers\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n group_48\n \n \n Roles\n \n \n sys.maintainGroups\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n ImgDownArrow\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n \n \n \n Currency\n \n \n \n 6\n \n \n 0\n \n \n \n \n coin_48\n \n \n Currencies\n \n \n sys.currencies\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n coin_clock_48\n \n \n Exchange Rates\n \n \n sys.exchangeRates\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n ImgDownArrow\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 0\n 20\n \n \n \n \n \n \n \n \n \n \n \n \n Design\n \n \n \n 6\n \n \n 0\n \n \n \n \n calculation_write_48\n \n \n Commands\n \n \n sys.customCommands\n \n \n \n \n \n \n \n \n \n \n \n \n script_write_48\n \n \n Scripts\n \n \n sys.scripts\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n window_write_48\n \n \n Screens\n \n \n sys.uiforms\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n spreadsheet_write_48\n \n \n Reports\n \n \n sys.reports\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n export_database_write_48\n \n \n MetaSQL\n \n \n sys.metasqls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Extensions\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n toolBar\n \n \n \n 32\n 32\n \n \n \n TopToolBarArea\n \n \n false\n \n \n \n \n \n MenuButton\n QWidget\n
menubutton.h
\n
\n \n XLabel\n QLabel\n
xlabel.h
\n
\n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n
\n \n \n
\n 146 desktopManufacture 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n desktopManufacture\n \n \n \n 0\n 0\n 882\n 554\n \n \n \n Manufacture\n \n \n true\n \n \n true\n \n \n \n \n \n \n \n 14\n 75\n true\n \n \n \n Manufacture\n \n \n \n \n \n \n Plan\n \n \n \n 6\n \n \n 0\n \n \n \n \n inventory_zoom_48\n \n \n Inventory Availability\n \n \n im.dspInventoryAvailability\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n industry_add_48\n \n \n Create Work Order\n \n \n wo.newWorkOrder\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n availability_write_48\n \n \n Material Requirements\n \n \n wo.maintainWoMaterialRequirements\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n industry_next_48\n \n \n Release\n \n \n wo.releaseWorkOrdersByPlannerCode\n \n \n \n \n \n \n \n \n \n \n \n \n printer_48\n \n \n Print\n \n \n wo.printTraveler\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n \n \n Process\n \n \n \n 6\n \n \n 0\n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n barcode_ok_48\n \n \n Issue Material\n \n \n wo.issueWoMaterialItem\n \n \n \n \n \n \n \n \n \n industry_close_48\n \n \n Close Work Order\n \n \n wo.closeWorkOrder\n \n \n \n \n \n \n \n \n \n \n \n \n barcode_back_48\n \n \n Return Material\n \n \n wo.returnWoMaterialItem\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n coin_stack_zoom_48\n \n \n Costing\n \n \n wo.dspJobCosting\n \n \n \n \n \n \n \n \n \n \n \n \n history_zoom_48\n \n \n History\n \n \n wo.dspWoHistoryByClassCode\n \n \n \n \n \n \n \n \n \n \n \n \n industry_ok_48\n \n \n Post Production\n \n \n wo.postProduction\n \n \n \n \n \n \n \n \n \n \n \n \n trash_ok_48\n \n \n Post Scrap\n \n \n wo.scrapWoMaterialFromWo\n \n \n \n \n \n \n \n \n \n \n \n \n industry_clock_48\n \n \n Order Schedule\n \n \n wo.dspWoSchedule\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n availability_zoom_48\n \n \n Material Availability\n \n \n wo.dspInventoryAvailabilityByWorkOrder\n \n \n \n \n \n \n \n \n \n \n \n \n industry_back_48\n \n \n Correct Production\n \n \n wo.correctProductionPosting\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Qt::AllDockWidgetAreas\n \n \n Manufacture Activities\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n Manufacture History\n \n \n 1\n \n \n \n \n 0\n \n \n 0\n \n \n 0\n \n \n 3\n \n \n 3\n \n \n \n \n false\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n label\n \n \n Qt::AlignCenter\n \n \n \n \n \n \n \n 16\n 16\n \n \n \n b\n \n \n true\n \n \n \n \n \n \n \n 16\n 16\n \n \n \n b\n \n \n true\n \n \n \n \n \n \n \n \n Qt::AllDockWidgetAreas\n \n \n Work Orders\n \n \n 8\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n \n MenuButton\n QWidget\n
menubutton.h
\n
\n \n XLabel\n QLabel\n
xlabel.h
\n
\n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n
\n \n \n
\n 148 desktopPurchase 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n desktopPurchase\n \n \n \n 0\n 0\n 886\n 554\n \n \n \n Purchase\n \n \n true\n \n \n true\n \n \n \n \n \n \n \n 14\n 75\n true\n \n \n \n Purchase\n \n \n \n \n \n \n Order\n \n \n \n 6\n \n \n 0\n \n \n \n \n order_help_48\n \n \n Purchase Requests\n \n \n po.dspPurchaseRequestsByPlannerCode\n \n \n \n \n \n \n \n \n \n \n \n \n order_add_48\n \n \n Create Purchase Order\n \n \n po.newPurchaseOrder\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n printer_48\n \n \n Print\n \n \n po.printPurchaseOrder\n \n \n \n \n \n \n \n \n \n \n \n \n inventory_zoom_48\n \n \n Inventory Availability\n \n \n im.dspInventoryAvailability\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n order_next_48\n \n \n Release\n \n \n po.listUnpostedPurchaseOrders\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n \n \n Receive\n \n \n \n 6\n \n \n 0\n \n \n \n \n barcode_ok_48\n \n \n Enter Receipts\n \n \n sr.enterReceipt\n \n \n \n \n \n \n \n \n \n \n \n \n inventory_48\n \n \n Unposted Receipts\n \n \n sr.postReceipts\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Payment\n \n \n \n 6\n \n \n 0\n \n \n \n \n taxes_ok_48\n \n \n Vouchers\n \n \n po.listUnpostedVouchers\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n stamp_48\n \n \n Select for Payment\n \n \n ap.selectPayments\n \n \n \n \n \n \n \n \n \n \n \n \n stamp_zoom_48\n \n \n Selected Payments\n \n \n ap.listSelectPayments\n \n \n \n \n \n \n \n \n \n \n \n \n check_zoom_48\n \n \n Check Register\n \n \n ap.dspCheckRegister\n \n \n \n \n \n \n \n \n \n \n \n \n check_ok_48\n \n \n Check Run\n \n \n ap.viewCheckRun\n \n \n \n \n \n \n \n \n \n \n \n \n taxes_clock_48\n \n \n Aging\n \n \n ap.dspAPAging\n \n \n dspTimePhasedOpenAPItems\n \n \n ViewAPOpenItems\n \n \n \n \n \n \n inventory_zoom_48\n \n \n Uninvoiced Receipts\n \n \n ap.uninvoicedReceipts\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n taxes_zoom_48\n \n \n Open Items\n \n \n ap.dspOpenAPItemsByVendor\n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n \n \n \n Qt::AllDockWidgetAreas\n \n \n Purchase Activities\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n Purchase History\n \n \n 1\n \n \n \n \n 0\n \n \n 0\n \n \n 0\n \n \n 3\n \n \n 3\n \n \n \n \n false\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n label\n \n \n Qt::AlignCenter\n \n \n \n \n \n \n \n 16\n 16\n \n \n \n b\n \n \n true\n \n \n \n \n \n \n \n 16\n 16\n \n \n \n b\n \n \n true\n \n \n \n \n \n \n \n \n Qt::AllDockWidgetAreas\n \n \n Purchase Orders\n \n \n 8\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n \n MenuButton\n QWidget\n
menubutton.h
\n
\n \n XLabel\n QLabel\n
xlabel.h
\n
\n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n
\n \n \n
\n 149 desktopSales 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n desktopSales\n \n \n \n 0\n 0\n 873\n 554\n \n \n \n Sales\n \n \n true\n \n \n QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks\n \n \n \n \n \n \n \n 14\n 75\n true\n \n \n \n Sales\n \n \n \n \n \n \n Order\n \n \n \n 6\n \n \n 0\n \n \n \n \n customers_write_48\n \n \n Prospects\n \n \n so.prospects\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n customers_add_48\n \n \n New Customer\n \n \n so.enterNewCustomer\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n order_write_48\n \n \n Quotes\n \n \n so.listQuotes\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n order_add_48\n \n \n New Sales Order\n \n \n so.newSalesOrder\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Ship\n \n \n \n 6\n \n \n 0\n \n \n \n \n printer_48\n \n \n Print Packing Lists\n \n \n sr.packingListBatch\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n barcode_ok_48\n \n \n Issue To Shipping\n \n \n sr.issueToShipping\n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n dispatch_order_ok_48\n \n \n Ship\n \n \n sr.shipOrder\n \n \n \n \n \n \n \n \n \n \n \n \n dispatch_order_zoom_48\n \n \n Maintain Shipping\n \n \n sr.maintainShippingContents\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n order_zoom_48\n \n \n Inventory Availability\n \n \n so.dspInventoryAvailabilityByCustomerType\n \n \n \n \n \n \n \n \n \n \n \n \n order_clock_48\n \n \n Backlog\n \n \n so.dspSummarizedBacklogByWarehouse\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Bill\n \n \n \n 6\n \n \n 0\n \n \n \n \n stamp_48\n \n \n Select for Billing\n \n \n so.uninvoicedShipments\n \n \n \n \n \n \n \n \n \n \n \n \n taxes_add_48\n \n \n Create Invoices\n \n \n so.dspBillingSelections\n \n \n dspBillingSelections\n \n \n \n \n \n \n \n \n \n taxes_ok_48\n \n \n Post Invoices\n \n \n so.listUnpostedInvoices\n \n \n \n \n \n \n \n \n \n \n \n \n taxes_clock_48\n \n \n Aging\n \n \n ar.dspARAging\n \n \n \n \n \n \n \n \n \n \n \n \n payment_ok_48\n \n \n Cash Receipts\n \n \n ar.cashReceiptEditList\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n ImgRightArrow\n \n \n \n \n \n \n \n \n \n \n Sales Activities\n \n \n 1\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n Sales History\n \n \n 1\n \n \n \n \n 0\n \n \n 0\n \n \n 0\n \n \n 3\n \n \n 3\n \n \n \n \n false\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n label\n \n \n Qt::AlignCenter\n \n \n \n \n \n \n \n 16\n 16\n \n \n \n b\n \n \n true\n \n \n \n \n \n \n \n 16\n 16\n \n \n \n b\n \n \n true\n \n \n \n \n \n \n \n \n Sales Orders\n \n \n 8\n \n \n \n \n 0\n \n \n \n \n false\n \n \n \n \n \n \n \n \n \n MenuButton\n QWidget\n
menubutton.h
\n
\n \n XLabel\n QLabel\n
xlabel.h
\n
\n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n
\n \n \n
\n 205 desktop 0 t \n\n This file is part of the xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n desktop\n \n \n \n 0\n 0\n 24\n 24\n \n \n \n Desktop\n \n \n \n \n \n\n container ui for the desktop webview 147 desktopNotice 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n desktopNotice\n \n \n \n 0\n 0\n 211\n 109\n \n \n \n Notice\n \n \n \n \n \n \n 0\n 0\n \n \n \n Note: The xTuple Desktop is only available when user preferences are set to show windows as free-floating.\n \n \n true\n \n \n \n \n \n \n Remind me about this again.\n \n \n true\n \n \n \n \n \n \n Qt::Horizontal\n \n \n QDialogButtonBox::Ok\n \n \n true\n \n \n \n \n \n \n \n \n _buttonBox\n accepted()\n desktopNotice\n accept()\n \n \n 248\n 254\n \n \n 157\n 274\n \n \n \n \n _buttonBox\n rejected()\n desktopNotice\n reject()\n \n \n 316\n 260\n \n \n 286\n 274\n \n \n \n \n\n 201 desktopSocial 0 t \r\n\r\n desktopSocial\r\n \r\n \r\n \r\n 0\r\n 0\r\n 996\r\n 666\r\n \r\n \r\n \r\n Social\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 15\r\n 75\r\n true\r\n \r\n \r\n \r\n Social\r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n \r\n 40\r\n 20\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Comment Console\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n \r\n 40\r\n 20\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 16\r\n 16\r\n \r\n \r\n \r\n b\r\n \r\n \r\n true\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 16\r\n 16\r\n \r\n \r\n \r\n b\r\n \r\n \r\n true\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::BottomDockWidgetArea|Qt::RightDockWidgetArea|Qt::TopDockWidgetArea\r\n \r\n \r\n Send Message\r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n User:\r\n \r\n \r\n \r\n \r\n \r\n \r\n false\r\n \r\n \r\n Send\r\n \r\n \r\n \r\n \r\n \r\n \r\n false\r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n \r\n 54\r\n 20\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Message:\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::BottomDockWidgetArea|Qt::RightDockWidgetArea|Qt::TopDockWidgetArea\r\n \r\n \r\n Message History\r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n \r\n 282\r\n 20\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 16\r\n 16\r\n \r\n \r\n \r\n b\r\n \r\n \r\n true\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 16\r\n 16\r\n \r\n \r\n \r\n b\r\n \r\n \r\n true\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::BottomDockWidgetArea|Qt::RightDockWidgetArea|Qt::TopDockWidgetArea\r\n \r\n \r\n Users Online\r\n \r\n \r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n false\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n UsernameCluster\r\n QWidget\r\n
usernamecluster.h
\r\n
\r\n \r\n XTreeWidget\r\n QTreeWidget\r\n
xtreewidget.h
\r\n 1\r\n
\r\n
\r\n \r\n \r\n
\r\n 202 preferencesComment 0 t \r\n\r\n preferencesComment\r\n \r\n \r\n \r\n 0\r\n 0\r\n 626\r\n 342\r\n \r\n \r\n \r\n Comment Preference\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n \r\n 40\r\n 20\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n QAbstractItemView::ExtendedSelection\r\n \r\n \r\n \r\n \r\n \r\n \r\n QAbstractItemView::ExtendedSelection\r\n \r\n \r\n \r\n \r\n \r\n \r\n QAbstractItemView::ExtendedSelection\r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n \r\n 40\r\n 20\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n \r\n 40\r\n 20\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n QDialogButtonBox::Cancel|QDialogButtonBox::Ok\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n DateCluster\r\n QWidget\r\n
datecluster.h
\r\n
\r\n \r\n XTreeWidget\r\n QTreeWidget\r\n
xtreewidget.h
\r\n 1\r\n
\r\n
\r\n \r\n \r\n \r\n _buttonBox\r\n accepted()\r\n preferencesComment\r\n accept()\r\n \r\n \r\n 248\r\n 254\r\n \r\n \r\n 157\r\n 274\r\n \r\n \r\n \r\n \r\n _buttonBox\r\n rejected()\r\n preferencesComment\r\n reject()\r\n \r\n \r\n 316\r\n 260\r\n \r\n \r\n 286\r\n 274\r\n \r\n \r\n \r\n \r\n
\r\n 150 preferencesHistory 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n preferencesHistory\n \n \n \n 0\n 0\n 350\n 104\n \n \n \n \n 350\n 0\n \n \n \n History Settings\n \n \n \n \n \n Type:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n \n \n \n \n Qt::Vertical\n \n \n QDialogButtonBox::Cancel|QDialogButtonBox::Ok\n \n \n \n \n \n \n Group By:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n \n \n \n \n Time Frame:\n \n \n Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter\n \n \n \n \n \n \n \n 0\n 0\n \n \n \n \n \n \n \n \n XComboBox\n QComboBox\n
xcombobox.h
\n
\n
\n \n \n \n buttonBox\n accepted()\n preferencesHistory\n accept()\n \n \n 248\n 254\n \n \n 157\n 274\n \n \n \n \n buttonBox\n rejected()\n preferencesHistory\n reject()\n \n \n 316\n 260\n \n \n 286\n 274\n \n \n \n \n
\n 203 preferencesNumber 0 t \r\n\r\n preferencesNumber\r\n \r\n \r\n \r\n 0\r\n 0\r\n 257\r\n 72\r\n \r\n \r\n \r\n Number Preferences\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Messages to display:\r\n \r\n \r\n \r\n \r\n \r\n \r\n 10\r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Horizontal\r\n \r\n \r\n \r\n 40\r\n 20\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Qt::Vertical\r\n \r\n \r\n QDialogButtonBox::Cancel|QDialogButtonBox::Ok\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n buttonBox\r\n accepted()\r\n preferencesNumber\r\n accept()\r\n \r\n \r\n 209\r\n 35\r\n \r\n \r\n 128\r\n 35\r\n \r\n \r\n \r\n \r\n buttonBox\r\n rejected()\r\n preferencesNumber\r\n reject()\r\n \r\n \r\n 209\r\n 35\r\n \r\n \r\n 128\r\n 35\r\n \r\n \r\n \r\n \r\n\r\n 151 preferencesSelections 0 t \n\n This file is part of the xtdesktop package for xTuple ERP: PostBooks Edition, a free and\nopen source Enterprise Resource Planning software suite,\nCopyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple.\nIt is licensed to you under the Common Public Attribution License\nversion 1.0, the full text of which (including xTuple-specific Exhibits)\nis available at www.xtuple.com/CPAL. By using this software, you agree\nto be bound by its terms.\n preferencesSelections\n \n \n \n 0\n 0\n 280\n 259\n \n \n \n Selection Preferences\n \n \n \n \n \n QAbstractItemView::ExtendedSelection\n \n \n \n \n \n \n Qt::Horizontal\n \n \n QDialogButtonBox::Cancel|QDialogButtonBox::Ok\n \n \n \n \n \n \n Select Accounts to monitor:\n \n \n \n \n \n \n \n XTreeWidget\n QTreeWidget\n
xtreewidget.h
\n
\n
\n \n \n \n _buttonBox\n accepted()\n preferencesSelections\n accept()\n \n \n 248\n 254\n \n \n 157\n 274\n \n \n \n \n _buttonBox\n rejected()\n preferencesSelections\n reject()\n \n \n 316\n 260\n \n \n 286\n 274\n \n \n \n \n
\n 204 sendMessageToUser 0 t \n\n sendMessageToUser\n \n \n \n 0\n 0\n 406\n 300\n \n \n \n Send Message to User\n \n \n \n \n \n User:\n \n \n \n \n \n \n Qt::Horizontal\n \n \n \n 158\n 56\n \n \n \n \n \n \n \n \n \n Close\n \n \n \n \n \n \n false\n \n \n Send\n \n \n \n \n \n \n Qt::Vertical\n \n \n \n 38\n 25\n \n \n \n \n \n \n \n \n \n false\n \n \n \n \n \n \n Message:\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n UsernameCluster\n QWidget\n
usernamecluster.h
\n
\n
\n \n \n
\n \. SET search_path = fixcountry, pg_catalog; -- -- Name: pkgcmd_pkey; Type: CONSTRAINT; Schema: fixcountry; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgcmd ADD CONSTRAINT pkgcmd_pkey PRIMARY KEY (cmd_id); -- -- Name: pkgcmdarg_pkey; Type: CONSTRAINT; Schema: fixcountry; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_pkey PRIMARY KEY (cmdarg_id); -- -- Name: pkgimage_pkey; Type: CONSTRAINT; Schema: fixcountry; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgimage ADD CONSTRAINT pkgimage_pkey PRIMARY KEY (image_id); -- -- Name: pkgmetasql_pkey; Type: CONSTRAINT; Schema: fixcountry; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgmetasql ADD CONSTRAINT pkgmetasql_pkey PRIMARY KEY (metasql_id); -- -- Name: pkgpriv_pkey; Type: CONSTRAINT; Schema: fixcountry; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgpriv ADD CONSTRAINT pkgpriv_pkey PRIMARY KEY (priv_id); -- -- Name: pkgreport_pkey; Type: CONSTRAINT; Schema: fixcountry; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgreport ADD CONSTRAINT pkgreport_pkey PRIMARY KEY (report_id); -- -- Name: pkgscript_pkey; Type: CONSTRAINT; Schema: fixcountry; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgscript ADD CONSTRAINT pkgscript_pkey PRIMARY KEY (script_id); -- -- Name: pkguiform_pkey; Type: CONSTRAINT; Schema: fixcountry; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkguiform ADD CONSTRAINT pkguiform_pkey PRIMARY KEY (uiform_id); SET search_path = public, pg_catalog; -- -- Name: acalitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY acalitem ADD CONSTRAINT acalitem_pkey PRIMARY KEY (acalitem_id); -- -- Name: accnt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY accnt ADD CONSTRAINT accnt_pkey PRIMARY KEY (accnt_id); -- -- Name: addr_addr_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY addr ADD CONSTRAINT addr_addr_number_key UNIQUE (addr_number); -- -- Name: addr_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY addr ADD CONSTRAINT addr_pkey PRIMARY KEY (addr_id); -- -- Name: alarm_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY alarm ADD CONSTRAINT alarm_pkey PRIMARY KEY (alarm_id); -- -- Name: apaccnt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY apaccnt ADD CONSTRAINT apaccnt_pkey PRIMARY KEY (apaccnt_id); -- -- Name: apapply_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY apapply ADD CONSTRAINT apapply_pkey PRIMARY KEY (apapply_id); -- -- Name: apcreditapply_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY apcreditapply ADD CONSTRAINT apcreditapply_pkey PRIMARY KEY (apcreditapply_id); -- -- Name: apopen_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY apopen ADD CONSTRAINT apopen_pkey PRIMARY KEY (apopen_id); -- -- Name: apopentax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_pkey PRIMARY KEY (taxhist_id); -- -- Name: apselect_apselect_apopen_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY apselect ADD CONSTRAINT apselect_apselect_apopen_id_key UNIQUE (apselect_apopen_id); -- -- Name: apselect_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY apselect ADD CONSTRAINT apselect_pkey PRIMARY KEY (apselect_id); -- -- Name: araccnt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY araccnt ADD CONSTRAINT araccnt_pkey PRIMARY KEY (araccnt_id); -- -- Name: arapply_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY arapply ADD CONSTRAINT arapply_pkey PRIMARY KEY (arapply_id); -- -- Name: arcreditapply_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY arcreditapply ADD CONSTRAINT arcreditapply_pkey PRIMARY KEY (arcreditapply_id); -- -- Name: aropen_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY aropen ADD CONSTRAINT aropen_pkey PRIMARY KEY (aropen_id); -- -- Name: aropenalloc_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY aropenalloc ADD CONSTRAINT aropenalloc_pkey PRIMARY KEY (aropenalloc_aropen_id, aropenalloc_doctype, aropenalloc_doc_id); -- -- Name: aropentax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_pkey PRIMARY KEY (taxhist_id); -- -- Name: asohist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY asohist ADD CONSTRAINT asohist_pkey PRIMARY KEY (asohist_id); -- -- Name: asohisttax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_pkey PRIMARY KEY (taxhist_id); -- -- Name: atlasmap_atlasmap_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY atlasmap ADD CONSTRAINT atlasmap_atlasmap_name_key UNIQUE (atlasmap_name); -- -- Name: atlasmap_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY atlasmap ADD CONSTRAINT atlasmap_pkey PRIMARY KEY (atlasmap_id); -- -- Name: bankaccnt_bankaccnt_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bankaccnt ADD CONSTRAINT bankaccnt_bankaccnt_name_key UNIQUE (bankaccnt_name); -- -- Name: bankaccnt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bankaccnt ADD CONSTRAINT bankaccnt_pkey PRIMARY KEY (bankaccnt_id); -- -- Name: bankadj_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bankadj ADD CONSTRAINT bankadj_pkey PRIMARY KEY (bankadj_id); -- -- Name: bankadjtype_bankadjtype_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bankadjtype ADD CONSTRAINT bankadjtype_bankadjtype_name_key UNIQUE (bankadjtype_name); -- -- Name: bankadjtype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bankadjtype ADD CONSTRAINT bankadjtype_pkey PRIMARY KEY (bankadjtype_id); -- -- Name: bankrec_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bankrec ADD CONSTRAINT bankrec_pkey PRIMARY KEY (bankrec_id); -- -- Name: bankrecitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bankrecitem ADD CONSTRAINT bankrecitem_pkey PRIMARY KEY (bankrecitem_id); -- -- Name: bomhead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bomhead ADD CONSTRAINT bomhead_pkey PRIMARY KEY (bomhead_id); -- -- Name: bomitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_pkey PRIMARY KEY (bomitem_id); -- -- Name: bomitemcost_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bomitemcost ADD CONSTRAINT bomitemcost_pkey PRIMARY KEY (bomitemcost_id); -- -- Name: bomitemsub_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bomitemsub ADD CONSTRAINT bomitemsub_pkey PRIMARY KEY (bomitemsub_id); -- -- Name: bomwork_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY bomwork ADD CONSTRAINT bomwork_pkey PRIMARY KEY (bomwork_id); -- -- Name: budghead_budghead_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY budghead ADD CONSTRAINT budghead_budghead_name_key UNIQUE (budghead_name); -- -- Name: budghead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY budghead ADD CONSTRAINT budghead_pkey PRIMARY KEY (budghead_id); -- -- Name: budgitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY budgitem ADD CONSTRAINT budgitem_pkey PRIMARY KEY (budgitem_id); -- -- Name: calhead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY calhead ADD CONSTRAINT calhead_pkey PRIMARY KEY (calhead_id); -- -- Name: cashrcpt_cashrcpt_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_cashrcpt_number_key UNIQUE (cashrcpt_number); -- -- Name: cashrcpt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_pkey PRIMARY KEY (cashrcpt_id); -- -- Name: cashrcptitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cashrcptitem ADD CONSTRAINT cashrcptitem_pkey PRIMARY KEY (cashrcptitem_id); -- -- Name: cashrcptmisc_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cashrcptmisc ADD CONSTRAINT cashrcptmisc_pkey PRIMARY KEY (cashrcptmisc_id); -- -- Name: ccard_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ccard ADD CONSTRAINT ccard_pkey PRIMARY KEY (ccard_id); -- -- Name: ccardaud_ccard_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ccardaud ADD CONSTRAINT ccardaud_ccard_pkey PRIMARY KEY (ccardaud_id); -- -- Name: ccbank_ccbank_ccard_type_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ccbank ADD CONSTRAINT ccbank_ccbank_ccard_type_key UNIQUE (ccbank_ccard_type); -- -- Name: ccbank_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ccbank ADD CONSTRAINT ccbank_pkey PRIMARY KEY (ccbank_id); -- -- Name: ccpay_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ccpay ADD CONSTRAINT ccpay_pkey PRIMARY KEY (ccpay_id); -- -- Name: char_char_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY "char" ADD CONSTRAINT char_char_name_key UNIQUE (char_name); -- -- Name: char_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY "char" ADD CONSTRAINT char_pkey PRIMARY KEY (char_id); -- -- Name: charass_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY charass ADD CONSTRAINT charass_pkey PRIMARY KEY (charass_id); -- -- Name: charopt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY charopt ADD CONSTRAINT charopt_pkey PRIMARY KEY (charopt_id); -- -- Name: checkhead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY checkhead ADD CONSTRAINT checkhead_pkey PRIMARY KEY (checkhead_id); -- -- Name: checkitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_pkey PRIMARY KEY (checkitem_id); -- -- Name: classcode_classcode_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY classcode ADD CONSTRAINT classcode_classcode_code_key UNIQUE (classcode_code); -- -- Name: classcode_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY classcode ADD CONSTRAINT classcode_pkey PRIMARY KEY (classcode_id); -- -- Name: cmd_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmd ADD CONSTRAINT cmd_pkey PRIMARY KEY (cmd_id); -- -- Name: cmdarg_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmdarg ADD CONSTRAINT cmdarg_pkey PRIMARY KEY (cmdarg_id); -- -- Name: cmhead_cmhead_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_number_key UNIQUE (cmhead_number); -- -- Name: cmhead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_pkey PRIMARY KEY (cmhead_id); -- -- Name: cmheadtax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_pkey PRIMARY KEY (taxhist_id); -- -- Name: cmitem_cmhead_id_linenumber_unique; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmhead_id_linenumber_unique UNIQUE (cmitem_cmhead_id, cmitem_linenumber); -- -- Name: cmitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_pkey PRIMARY KEY (cmitem_id); -- -- Name: cmitemtax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_pkey PRIMARY KEY (taxhist_id); -- -- Name: cmnttype_cmnttype_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmnttype ADD CONSTRAINT cmnttype_cmnttype_name_key UNIQUE (cmnttype_name); -- -- Name: cmnttype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmnttype ADD CONSTRAINT cmnttype_pkey PRIMARY KEY (cmnttype_id); -- -- Name: cmnttypesource_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cmnttypesource ADD CONSTRAINT cmnttypesource_pkey PRIMARY KEY (cmnttypesource_id); -- -- Name: cntct_cntct_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cntct ADD CONSTRAINT cntct_cntct_number_key UNIQUE (cntct_number); -- -- Name: cntct_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cntct ADD CONSTRAINT cntct_pkey PRIMARY KEY (cntct_id); -- -- Name: cntctaddr_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cntctaddr ADD CONSTRAINT cntctaddr_pkey PRIMARY KEY (cntctaddr_id); -- -- Name: cntctdata_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cntctdata ADD CONSTRAINT cntctdata_pkey PRIMARY KEY (cntctdata_id); -- -- Name: cntcteml_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cntcteml ADD CONSTRAINT cntcteml_pkey PRIMARY KEY (cntcteml_id); -- -- Name: cntctmrgd_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cntctmrgd ADD CONSTRAINT cntctmrgd_pkey PRIMARY KEY (cntctmrgd_cntct_id); -- -- Name: cntctsel_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cntctsel ADD CONSTRAINT cntctsel_pkey PRIMARY KEY (cntctsel_cntct_id); -- -- Name: cntslip_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cntslip ADD CONSTRAINT cntslip_pkey PRIMARY KEY (cntslip_id); -- -- Name: cobill_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cobill ADD CONSTRAINT cobill_pkey PRIMARY KEY (cobill_id); -- -- Name: cobilltax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_pkey PRIMARY KEY (taxhist_id); -- -- Name: cobmisc_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_pkey PRIMARY KEY (cobmisc_id); -- -- Name: cobmisctax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_pkey PRIMARY KEY (taxhist_id); -- -- Name: cohead_cohead_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_number_key UNIQUE (cohead_number); -- -- Name: cohead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_pkey PRIMARY KEY (cohead_id); -- -- Name: cohist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cohist ADD CONSTRAINT cohist_pkey PRIMARY KEY (cohist_id); -- -- Name: cohisttax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_pkey PRIMARY KEY (taxhist_id); -- -- Name: coitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_pkey PRIMARY KEY (coitem_id); -- -- Name: comment_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY comment ADD CONSTRAINT comment_pkey PRIMARY KEY (comment_id); -- -- Name: company_company_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY company ADD CONSTRAINT company_company_number_key UNIQUE (company_number); -- -- Name: company_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY company ADD CONSTRAINT company_pkey PRIMARY KEY (company_id); -- -- Name: contrct_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY contrct ADD CONSTRAINT contrct_pkey PRIMARY KEY (contrct_id); -- -- Name: costcat_costcat_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY costcat ADD CONSTRAINT costcat_costcat_code_key UNIQUE (costcat_code); -- -- Name: costcat_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY costcat ADD CONSTRAINT costcat_pkey PRIMARY KEY (costcat_id); -- -- Name: costelem_costelem_type_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY costelem ADD CONSTRAINT costelem_costelem_type_key UNIQUE (costelem_type); -- -- Name: costelem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY costelem ADD CONSTRAINT costelem_pkey PRIMARY KEY (costelem_id); -- -- Name: costhist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY costhist ADD CONSTRAINT costhist_pkey PRIMARY KEY (costhist_id); -- -- Name: costupdate_costupdate_item_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY costupdate ADD CONSTRAINT costupdate_costupdate_item_id_key UNIQUE (costupdate_item_id); -- -- Name: country_country_abbr_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY country ADD CONSTRAINT country_country_abbr_key UNIQUE (country_abbr); -- -- Name: country_country_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY country ADD CONSTRAINT country_country_name_key UNIQUE (country_name); -- -- Name: country_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY country ADD CONSTRAINT country_pkey PRIMARY KEY (country_id); -- -- Name: crmacct_crmacct_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_number_key UNIQUE (crmacct_number); -- -- Name: crmacct_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_pkey PRIMARY KEY (crmacct_id); -- -- Name: crmacctsel_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY crmacctsel ADD CONSTRAINT crmacctsel_pkey PRIMARY KEY (crmacctsel_src_crmacct_id); -- -- Name: curr_rate_curr_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY curr_rate ADD CONSTRAINT curr_rate_curr_id_key UNIQUE (curr_id, curr_effective); -- -- Name: curr_rate_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY curr_rate ADD CONSTRAINT curr_rate_pkey PRIMARY KEY (curr_rate_id); -- -- Name: curr_symbol_curr_abbr_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY curr_symbol ADD CONSTRAINT curr_symbol_curr_abbr_key UNIQUE (curr_abbr); -- -- Name: curr_symbol_curr_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY curr_symbol ADD CONSTRAINT curr_symbol_curr_name_key UNIQUE (curr_name); -- -- Name: curr_symbol_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY curr_symbol ADD CONSTRAINT curr_symbol_pkey PRIMARY KEY (curr_id); -- -- Name: cust_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY custinfo ADD CONSTRAINT cust_pkey PRIMARY KEY (cust_id); -- -- Name: custform_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY custform ADD CONSTRAINT custform_pkey PRIMARY KEY (custform_id); -- -- Name: custgrp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY custgrp ADD CONSTRAINT custgrp_pkey PRIMARY KEY (custgrp_id); -- -- Name: custgrpitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY custgrpitem ADD CONSTRAINT custgrpitem_pkey PRIMARY KEY (custgrpitem_id); -- -- Name: custinfo_cust_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_number_key UNIQUE (cust_number); -- -- Name: custtype_custtype_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY custtype ADD CONSTRAINT custtype_custtype_code_key UNIQUE (custtype_code); -- -- Name: custtype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY custtype ADD CONSTRAINT custtype_pkey PRIMARY KEY (custtype_id); -- -- Name: dept_dept_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY dept ADD CONSTRAINT dept_dept_number_key UNIQUE (dept_number); -- -- Name: dept_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY dept ADD CONSTRAINT dept_pkey PRIMARY KEY (dept_id); -- -- Name: destination_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY destination ADD CONSTRAINT destination_pkey PRIMARY KEY (destination_id); -- -- Name: docass_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY docass ADD CONSTRAINT docass_pkey PRIMARY KEY (docass_id); -- -- Name: emp_emp_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_code_key UNIQUE (emp_code); -- -- Name: emp_emp_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_number_key UNIQUE (emp_number); -- -- Name: emp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_pkey PRIMARY KEY (emp_id); -- -- Name: empgrp_empgrp_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY empgrp ADD CONSTRAINT empgrp_empgrp_name_key UNIQUE (empgrp_name); -- -- Name: empgrp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY empgrp ADD CONSTRAINT empgrp_pkey PRIMARY KEY (empgrp_id); -- -- Name: empgrpitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY empgrpitem ADD CONSTRAINT empgrpitem_pkey PRIMARY KEY (empgrpitem_id); -- -- Name: evntlog_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY evntlog ADD CONSTRAINT evntlog_pkey PRIMARY KEY (evntlog_id); -- -- Name: evntnot_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY evntnot ADD CONSTRAINT evntnot_pkey PRIMARY KEY (evntnot_id); -- -- Name: evnttype_evnttype_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY evnttype ADD CONSTRAINT evnttype_evnttype_name_key UNIQUE (evnttype_name); -- -- Name: evnttype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY evnttype ADD CONSTRAINT evnttype_pkey PRIMARY KEY (evnttype_id); -- -- Name: expcat_expcat_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY expcat ADD CONSTRAINT expcat_expcat_code_key UNIQUE (expcat_code); -- -- Name: expcat_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY expcat ADD CONSTRAINT expcat_pkey PRIMARY KEY (expcat_id); -- -- Name: file_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY file ADD CONSTRAINT file_pkey PRIMARY KEY (file_id); -- -- Name: filter_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY filter ADD CONSTRAINT filter_pkey PRIMARY KEY (filter_id); -- -- Name: fkey_flcol_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY flcol ADD CONSTRAINT fkey_flcol_key PRIMARY KEY (flcol_id); -- -- Name: flgrp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY flgrp ADD CONSTRAINT flgrp_pkey PRIMARY KEY (flgrp_id); -- -- Name: flhead_flhead_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY flhead ADD CONSTRAINT flhead_flhead_name_key UNIQUE (flhead_name); -- -- Name: flhead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY flhead ADD CONSTRAINT flhead_pkey PRIMARY KEY (flhead_id); -- -- Name: flitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY flitem ADD CONSTRAINT flitem_pkey PRIMARY KEY (flitem_id); -- -- Name: flnotes_flnotes_flhead_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY flnotes ADD CONSTRAINT flnotes_flnotes_flhead_id_key UNIQUE (flnotes_flhead_id, flnotes_period_id); -- -- Name: flrpt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY flrpt ADD CONSTRAINT flrpt_pkey PRIMARY KEY (flrpt_id); -- -- Name: flspec_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY flspec ADD CONSTRAINT flspec_pkey PRIMARY KEY (flspec_id); -- -- Name: form_form_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY form ADD CONSTRAINT form_form_name_key UNIQUE (form_name); -- -- Name: form_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY form ADD CONSTRAINT form_pkey PRIMARY KEY (form_id); -- -- Name: freightclass_freightclass_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY freightclass ADD CONSTRAINT freightclass_freightclass_code_key UNIQUE (freightclass_code); -- -- Name: freightclass_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY freightclass ADD CONSTRAINT freightclass_pkey PRIMARY KEY (freightclass_id); -- -- Name: glseries_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY glseries ADD CONSTRAINT glseries_pkey PRIMARY KEY (glseries_id); -- -- Name: gltrans_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY gltrans ADD CONSTRAINT gltrans_pkey PRIMARY KEY (gltrans_id); -- -- Name: grp_grp_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY grp ADD CONSTRAINT grp_grp_name_key UNIQUE (grp_name); -- -- Name: grp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY grp ADD CONSTRAINT grp_pkey PRIMARY KEY (grp_id); -- -- Name: grppriv_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY grppriv ADD CONSTRAINT grppriv_pkey PRIMARY KEY (grppriv_id); -- -- Name: hnfc_hnfc_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY hnfc ADD CONSTRAINT hnfc_hnfc_code_key UNIQUE (hnfc_code); -- -- Name: hnfc_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY hnfc ADD CONSTRAINT hnfc_pkey PRIMARY KEY (hnfc_id); -- -- Name: image_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY image ADD CONSTRAINT image_pkey PRIMARY KEY (image_id); -- -- Name: imageass_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY imageass ADD CONSTRAINT imageass_pkey PRIMARY KEY (imageass_id); -- -- Name: incdt_incdt_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_number_key UNIQUE (incdt_number); -- -- Name: incdt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_pkey PRIMARY KEY (incdt_id); -- -- Name: incdtcat_incdtcat_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdtcat ADD CONSTRAINT incdtcat_incdtcat_name_key UNIQUE (incdtcat_name); -- -- Name: incdtcat_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdtcat ADD CONSTRAINT incdtcat_pkey PRIMARY KEY (incdtcat_id); -- -- Name: incdthist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdthist ADD CONSTRAINT incdthist_pkey PRIMARY KEY (incdthist_id); -- -- Name: incdtpriority_incdtpriority_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdtpriority ADD CONSTRAINT incdtpriority_incdtpriority_name_key UNIQUE (incdtpriority_name); -- -- Name: incdtpriority_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdtpriority ADD CONSTRAINT incdtpriority_pkey PRIMARY KEY (incdtpriority_id); -- -- Name: incdtresolution_incdtresolution_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdtresolution ADD CONSTRAINT incdtresolution_incdtresolution_name_key UNIQUE (incdtresolution_name); -- -- Name: incdtresolution_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdtresolution ADD CONSTRAINT incdtresolution_pkey PRIMARY KEY (incdtresolution_id); -- -- Name: incdtseverity_incdtseverity_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdtseverity ADD CONSTRAINT incdtseverity_incdtseverity_name_key UNIQUE (incdtseverity_name); -- -- Name: incdtseverity_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY incdtseverity ADD CONSTRAINT incdtseverity_pkey PRIMARY KEY (incdtseverity_id); -- -- Name: invbal_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invbal ADD CONSTRAINT invbal_pkey PRIMARY KEY (invbal_id); -- -- Name: invchead_invcnumber_unique; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invchead ADD CONSTRAINT invchead_invcnumber_unique UNIQUE (invchead_invcnumber); -- -- Name: invchead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invchead ADD CONSTRAINT invchead_pkey PRIMARY KEY (invchead_id); -- -- Name: invcheadtax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_pkey PRIMARY KEY (taxhist_id); -- -- Name: invcitem_invchead_id_linenumber_unique; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invchead_id_linenumber_unique UNIQUE (invcitem_invchead_id, invcitem_linenumber); -- -- Name: invcitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_pkey PRIMARY KEY (invcitem_id); -- -- Name: invcitemtax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_pkey PRIMARY KEY (taxhist_id); -- -- Name: invcnt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invcnt ADD CONSTRAINT invcnt_pkey PRIMARY KEY (invcnt_id); -- -- Name: invdetail_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invdetail ADD CONSTRAINT invdetail_pkey PRIMARY KEY (invdetail_id); -- -- Name: invhist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invhist ADD CONSTRAINT invhist_pkey PRIMARY KEY (invhist_id); -- -- Name: invhistexpcat_invhist_id_expcat_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invhistexpcat ADD CONSTRAINT invhistexpcat_invhist_id_expcat_id UNIQUE (invhistexpcat_invhist_id, invhistexpcat_expcat_id); -- -- Name: invhistexpcat_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY invhistexpcat ADD CONSTRAINT invhistexpcat_pkey PRIMARY KEY (invhistexpcat_id); -- -- Name: ipsass_ipsass_ipshead_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsass ADD CONSTRAINT ipsass_ipsass_ipshead_id_key UNIQUE (ipsass_ipshead_id, ipsass_cust_id, ipsass_custtype_id, ipsass_custtype_pattern, ipsass_shipto_id, ipsass_shipto_pattern); -- -- Name: ipsass_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsass ADD CONSTRAINT ipsass_pkey PRIMARY KEY (ipsass_id); -- -- Name: ipsfreight_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_pkey PRIMARY KEY (ipsfreight_id); -- -- Name: ipshead_ipshead_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipshead ADD CONSTRAINT ipshead_ipshead_name_key UNIQUE (ipshead_name); -- -- Name: ipshead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipshead ADD CONSTRAINT ipshead_pkey PRIMARY KEY (ipshead_id); -- -- Name: ipsitem_ipsitem_ipshead_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipsitem_ipshead_id_key UNIQUE (ipsitem_ipshead_id, ipsitem_item_id, ipsitem_prodcat_id, ipsitem_qtybreak, ipsitem_qty_uom_id, ipsitem_price_uom_id); -- -- Name: ipsitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_pkey PRIMARY KEY (ipsitem_id); -- -- Name: ipsitemchar_ipsitemchar_ipsitem_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_key UNIQUE (ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value); -- -- Name: ipsitemchar_ipsitemchar_ipsitem_id_key1; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_key1 UNIQUE (ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value); -- -- Name: ipsitemchar_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_pkey PRIMARY KEY (ipsitemchar_id); -- -- Name: ipsprodcat_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ipsprodcat_bak ADD CONSTRAINT ipsprodcat_pkey PRIMARY KEY (ipsprodcat_id); -- -- Name: item_item_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY item ADD CONSTRAINT item_item_number_key UNIQUE (item_number); -- -- Name: item_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY item ADD CONSTRAINT item_pkey PRIMARY KEY (item_id); -- -- Name: itemalias_itemalias_item_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemalias ADD CONSTRAINT itemalias_itemalias_item_id_key UNIQUE (itemalias_item_id, itemalias_number); -- -- Name: itemalias_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemalias ADD CONSTRAINT itemalias_pkey PRIMARY KEY (itemalias_id); -- -- Name: itemcost_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_pkey PRIMARY KEY (itemcost_id); -- -- Name: itemgrp_itemgrp_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemgrp ADD CONSTRAINT itemgrp_itemgrp_name_key UNIQUE (itemgrp_name); -- -- Name: itemgrp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemgrp ADD CONSTRAINT itemgrp_pkey PRIMARY KEY (itemgrp_id); -- -- Name: itemgrpitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemgrpitem ADD CONSTRAINT itemgrpitem_pkey PRIMARY KEY (itemgrpitem_id); -- -- Name: itemloc_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemloc ADD CONSTRAINT itemloc_pkey PRIMARY KEY (itemloc_id); -- -- Name: itemlocdist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemlocdist ADD CONSTRAINT itemlocdist_pkey PRIMARY KEY (itemlocdist_id); -- -- Name: itemlocpost_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemlocpost ADD CONSTRAINT itemlocpost_pkey PRIMARY KEY (itemlocpost_id); -- -- Name: itemsite_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_pkey PRIMARY KEY (itemsite_id); -- -- Name: itemsrc_itemsrc_vend_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_itemsrc_vend_id_key UNIQUE (itemsrc_vend_id, itemsrc_item_id, itemsrc_effective, itemsrc_expires, itemsrc_vend_item_number, itemsrc_manuf_name, itemsrc_manuf_item_number); -- -- Name: itemsrc_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_pkey PRIMARY KEY (itemsrc_id); -- -- Name: itemsrcp_itemsrcp_itemsrc_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemsrcp ADD CONSTRAINT itemsrcp_itemsrcp_itemsrc_id_key UNIQUE (itemsrcp_itemsrc_id, itemsrcp_warehous_id, itemsrcp_dropship, itemsrcp_qtybreak); -- -- Name: itemsrcp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemsrcp ADD CONSTRAINT itemsrcp_pkey PRIMARY KEY (itemsrcp_id); -- -- Name: itemsub_itemsub_parent_item_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemsub ADD CONSTRAINT itemsub_itemsub_parent_item_id_key UNIQUE (itemsub_parent_item_id, itemsub_sub_item_id); -- -- Name: itemsub_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemsub ADD CONSTRAINT itemsub_pkey PRIMARY KEY (itemsub_id); -- -- Name: itemtax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemtax ADD CONSTRAINT itemtax_pkey PRIMARY KEY (itemtax_id); -- -- Name: itemtrans_itemtrans_source_item_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemtrans ADD CONSTRAINT itemtrans_itemtrans_source_item_id_key UNIQUE (itemtrans_source_item_id, itemtrans_target_item_id); -- -- Name: itemtrans_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemtrans ADD CONSTRAINT itemtrans_pkey PRIMARY KEY (itemtrans_id); -- -- Name: itemuom_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemuom ADD CONSTRAINT itemuom_pkey PRIMARY KEY (itemuom_id); -- -- Name: itemuomconv_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY itemuomconv ADD CONSTRAINT itemuomconv_pkey PRIMARY KEY (itemuomconv_id); -- -- Name: jrnluse_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY jrnluse ADD CONSTRAINT jrnluse_pkey PRIMARY KEY (jrnluse_id); -- -- Name: labeldef_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY labeldef ADD CONSTRAINT labeldef_pkey PRIMARY KEY (labeldef_id); -- -- Name: labelform_labelform_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY labelform ADD CONSTRAINT labelform_labelform_name_key UNIQUE (labelform_name); -- -- Name: labelform_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY labelform ADD CONSTRAINT labelform_pkey PRIMARY KEY (labelform_id); -- -- Name: lang_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY lang ADD CONSTRAINT lang_pkey PRIMARY KEY (lang_id); -- -- Name: locale_locale_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY locale ADD CONSTRAINT locale_locale_code_key UNIQUE (locale_code); -- -- Name: locale_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY locale ADD CONSTRAINT locale_pkey PRIMARY KEY (locale_id); -- -- Name: location_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY location ADD CONSTRAINT location_pkey PRIMARY KEY (location_id); -- -- Name: locitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY locitem ADD CONSTRAINT locitem_pkey PRIMARY KEY (locitem_id); -- -- Name: metasql_metasql_group_name_grade_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY metasql ADD CONSTRAINT metasql_metasql_group_name_grade_key UNIQUE (metasql_group, metasql_name, metasql_grade); -- -- Name: metasql_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY metasql ADD CONSTRAINT metasql_pkey PRIMARY KEY (metasql_id); -- -- Name: metric_metric_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY metric ADD CONSTRAINT metric_metric_name_key UNIQUE (metric_name); -- -- Name: metric_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY metric ADD CONSTRAINT metric_pkey PRIMARY KEY (metric_id); -- -- Name: metricenc_metricenc_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY metricenc ADD CONSTRAINT metricenc_metricenc_name_key UNIQUE (metricenc_name); -- -- Name: metricenc_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY metricenc ADD CONSTRAINT metricenc_pkey PRIMARY KEY (metricenc_id); -- -- Name: mrghist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY mrghist ADD CONSTRAINT mrghist_pkey PRIMARY KEY (mrghist_cntct_id, mrghist_table, mrghist_pkey_col, mrghist_pkey_id, mrghist_cntct_col); -- -- Name: mrgundo_mrgundo_schema_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY mrgundo ADD CONSTRAINT mrgundo_mrgundo_schema_key UNIQUE (mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col); -- -- Name: msg_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY msg ADD CONSTRAINT msg_pkey PRIMARY KEY (msg_id); -- -- Name: msguser_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY msguser ADD CONSTRAINT msguser_pkey PRIMARY KEY (msguser_id); -- -- Name: obsolete_tax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY obsolete_tax ADD CONSTRAINT obsolete_tax_pkey PRIMARY KEY (tax_id); -- -- Name: ophead_ophead_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_number_key UNIQUE (ophead_number); -- -- Name: ophead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_pkey PRIMARY KEY (ophead_id); -- -- Name: opsource_opsource_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY opsource ADD CONSTRAINT opsource_opsource_name_key UNIQUE (opsource_name); -- -- Name: opsource_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY opsource ADD CONSTRAINT opsource_pkey PRIMARY KEY (opsource_id); -- -- Name: opstage_opstage_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY opstage ADD CONSTRAINT opstage_opstage_name_key UNIQUE (opstage_name); -- -- Name: opstage_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY opstage ADD CONSTRAINT opstage_pkey PRIMARY KEY (opstage_id); -- -- Name: optype_optype_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY optype ADD CONSTRAINT optype_optype_name_key UNIQUE (optype_name); -- -- Name: optype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY optype ADD CONSTRAINT optype_pkey PRIMARY KEY (optype_id); -- -- Name: orderseq_orderseq_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY orderseq ADD CONSTRAINT orderseq_orderseq_name_key UNIQUE (orderseq_name); -- -- Name: orderseq_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY orderseq ADD CONSTRAINT orderseq_pkey PRIMARY KEY (orderseq_id); -- -- Name: pack_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pack ADD CONSTRAINT pack_pkey PRIMARY KEY (pack_id); -- -- Name: payaropen_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY payaropen ADD CONSTRAINT payaropen_pkey PRIMARY KEY (payaropen_ccpay_id, payaropen_aropen_id); -- -- Name: period_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY period ADD CONSTRAINT period_pkey PRIMARY KEY (period_id); -- -- Name: pkgdep_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgdep ADD CONSTRAINT pkgdep_pkey PRIMARY KEY (pkgdep_id); -- -- Name: pkghead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkghead ADD CONSTRAINT pkghead_pkey PRIMARY KEY (pkghead_id); -- -- Name: pkgitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgitem ADD CONSTRAINT pkgitem_pkey PRIMARY KEY (pkgitem_id); -- -- Name: pkgitem_pkgitem_pkghead_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgitem ADD CONSTRAINT pkgitem_pkgitem_pkghead_id_key UNIQUE (pkgitem_pkghead_id, pkgitem_type, pkgitem_name); -- -- Name: pkgitem_pkgitem_pkghead_id_key1; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgitem ADD CONSTRAINT pkgitem_pkgitem_pkghead_id_key1 UNIQUE (pkgitem_pkghead_id, pkgitem_type, pkgitem_item_id); -- -- Name: plancode_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY plancode ADD CONSTRAINT plancode_pkey PRIMARY KEY (plancode_id); -- -- Name: plancode_plancode_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY plancode ADD CONSTRAINT plancode_plancode_code_key UNIQUE (plancode_code); -- -- Name: pohead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pkey PRIMARY KEY (pohead_id); -- -- Name: pohead_pohead_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_number_key UNIQUE (pohead_number); -- -- Name: poitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY poitem ADD CONSTRAINT poitem_pkey PRIMARY KEY (poitem_id); -- -- Name: poitem_poitem_pohead_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_pohead_id_key UNIQUE (poitem_pohead_id, poitem_linenumber); -- -- Name: poreject_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY poreject ADD CONSTRAINT poreject_pkey PRIMARY KEY (poreject_id); -- -- Name: potype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY potype ADD CONSTRAINT potype_pkey PRIMARY KEY (potype_id); -- -- Name: pr_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY pr ADD CONSTRAINT pr_pkey PRIMARY KEY (pr_id); -- -- Name: prftcntr_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prftcntr ADD CONSTRAINT prftcntr_pkey PRIMARY KEY (prftcntr_id); -- -- Name: prftcntr_prftcntr_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prftcntr ADD CONSTRAINT prftcntr_prftcntr_number_key UNIQUE (prftcntr_number); -- -- Name: priv_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY priv ADD CONSTRAINT priv_pkey PRIMARY KEY (priv_id); -- -- Name: prj_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prj ADD CONSTRAINT prj_pkey PRIMARY KEY (prj_id); -- -- Name: prj_prj_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prj ADD CONSTRAINT prj_prj_number_key UNIQUE (prj_number); -- -- Name: prjtask_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prjtask ADD CONSTRAINT prjtask_pkey PRIMARY KEY (prjtask_id); -- -- Name: prjtask_prjtask_prj_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prjtask ADD CONSTRAINT prjtask_prjtask_prj_id_key UNIQUE (prjtask_prj_id, prjtask_number); -- -- Name: prjtaskuser_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prjtaskuser ADD CONSTRAINT prjtaskuser_pkey PRIMARY KEY (prjtaskuser_id); -- -- Name: prodcat_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prodcat ADD CONSTRAINT prodcat_pkey PRIMARY KEY (prodcat_id); -- -- Name: prodcat_prodcat_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prodcat ADD CONSTRAINT prodcat_prodcat_code_key UNIQUE (prodcat_code); -- -- Name: prospect_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prospect ADD CONSTRAINT prospect_pkey PRIMARY KEY (prospect_id); -- -- Name: prospect_prospect_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_number_key UNIQUE (prospect_number); -- -- Name: qryhead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY qryhead ADD CONSTRAINT qryhead_pkey PRIMARY KEY (qryhead_id); -- -- Name: qryhead_qryhead_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY qryhead ADD CONSTRAINT qryhead_qryhead_name_key UNIQUE (qryhead_name); -- -- Name: qryitem_qryitem_qryhead_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY qryitem ADD CONSTRAINT qryitem_qryitem_qryhead_id_key UNIQUE (qryitem_qryhead_id, qryitem_name); -- -- Name: qryitem_qryitem_qryhead_id_key1; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY qryitem ADD CONSTRAINT qryitem_qryitem_qryhead_id_key1 UNIQUE (qryitem_qryhead_id, qryitem_order); -- -- Name: quhead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_pkey PRIMARY KEY (quhead_id); -- -- Name: quhead_quhead_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_number_key UNIQUE (quhead_number); -- -- Name: quitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY quitem ADD CONSTRAINT quitem_pkey PRIMARY KEY (quitem_id); -- -- Name: rcalitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY rcalitem ADD CONSTRAINT rcalitem_pkey PRIMARY KEY (rcalitem_id); -- -- Name: recur_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY recur ADD CONSTRAINT recur_pkey PRIMARY KEY (recur_id); -- -- Name: recur_recur_parent_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY recur ADD CONSTRAINT recur_recur_parent_id_key UNIQUE (recur_parent_id, recur_parent_type); -- -- Name: recurtype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY recurtype ADD CONSTRAINT recurtype_pkey PRIMARY KEY (recurtype_id); -- -- Name: recurtype_recurtype_type_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY recurtype ADD CONSTRAINT recurtype_recurtype_type_key UNIQUE (recurtype_type); -- -- Name: recv_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_pkey PRIMARY KEY (recv_id); -- -- Name: report_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY report ADD CONSTRAINT report_pkey PRIMARY KEY (report_id); -- -- Name: rjctcode_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY rjctcode ADD CONSTRAINT rjctcode_pkey PRIMARY KEY (rjctcode_id); -- -- Name: rjctcode_rjctcode_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY rjctcode ADD CONSTRAINT rjctcode_rjctcode_code_key UNIQUE (rjctcode_code); -- -- Name: rsncode_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY rsncode ADD CONSTRAINT rsncode_pkey PRIMARY KEY (rsncode_id); -- -- Name: rsncode_rsncode_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY rsncode ADD CONSTRAINT rsncode_rsncode_code_key UNIQUE (rsncode_code); -- -- Name: sale_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY sale ADD CONSTRAINT sale_pkey PRIMARY KEY (sale_id); -- -- Name: sale_sale_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY sale ADD CONSTRAINT sale_sale_name_key UNIQUE (sale_name); -- -- Name: salesaccnt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY salesaccnt ADD CONSTRAINT salesaccnt_pkey PRIMARY KEY (salesaccnt_id); -- -- Name: salescat_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY salescat ADD CONSTRAINT salescat_pkey PRIMARY KEY (salescat_id); -- -- Name: salescat_salescat_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY salescat ADD CONSTRAINT salescat_salescat_name_key UNIQUE (salescat_name); -- -- Name: salesrep_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY salesrep ADD CONSTRAINT salesrep_pkey PRIMARY KEY (salesrep_id); -- -- Name: salesrep_salesrep_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY salesrep ADD CONSTRAINT salesrep_salesrep_number_key UNIQUE (salesrep_number); -- -- Name: saletype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY saletype ADD CONSTRAINT saletype_pkey PRIMARY KEY (saletype_id); -- -- Name: schemaord_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY schemaord ADD CONSTRAINT schemaord_pkey PRIMARY KEY (schemaord_id); -- -- Name: schemaord_schemaord_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY schemaord ADD CONSTRAINT schemaord_schemaord_name_key UNIQUE (schemaord_name); -- -- Name: schemaord_schemaord_order_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY schemaord ADD CONSTRAINT schemaord_schemaord_order_key UNIQUE (schemaord_order); -- -- Name: script_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY script ADD CONSTRAINT script_pkey PRIMARY KEY (script_id); -- -- Name: shift_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shift ADD CONSTRAINT shift_pkey PRIMARY KEY (shift_id); -- -- Name: shipchrg_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipchrg ADD CONSTRAINT shipchrg_pkey PRIMARY KEY (shipchrg_id); -- -- Name: shipdata_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipdata ADD CONSTRAINT shipdata_pkey PRIMARY KEY (shipdata_cohead_number, shipdata_cosmisc_tracknum, shipdata_cosmisc_packnum_tracknum, shipdata_void_ind); -- -- Name: shipdatasum_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipdatasum ADD CONSTRAINT shipdatasum_pkey PRIMARY KEY (shipdatasum_cohead_number, shipdatasum_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum); -- -- Name: shipform_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipform ADD CONSTRAINT shipform_pkey PRIMARY KEY (shipform_id); -- -- Name: shipform_shipform_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipform ADD CONSTRAINT shipform_shipform_name_key UNIQUE (shipform_name); -- -- Name: shiphead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_pkey PRIMARY KEY (shiphead_id); -- -- Name: shiphead_shiphead_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_shiphead_number_key UNIQUE (shiphead_number); -- -- Name: shipitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipitem ADD CONSTRAINT shipitem_pkey PRIMARY KEY (shipitem_id); -- -- Name: shipto_num_cust_unique; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shipto_num_cust_unique UNIQUE (shipto_cust_id, shipto_num); -- -- Name: shipto_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shipto_pkey PRIMARY KEY (shipto_id); -- -- Name: shipvia_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipvia ADD CONSTRAINT shipvia_pkey PRIMARY KEY (shipvia_id); -- -- Name: shipvia_shipvia_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipvia ADD CONSTRAINT shipvia_shipvia_code_key UNIQUE (shipvia_code); -- -- Name: shipzone_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipzone ADD CONSTRAINT shipzone_pkey PRIMARY KEY (shipzone_id); -- -- Name: shipzone_shipzone_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY shipzone ADD CONSTRAINT shipzone_shipzone_name_key UNIQUE (shipzone_name); -- -- Name: sitetype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY sitetype ADD CONSTRAINT sitetype_pkey PRIMARY KEY (sitetype_id); -- -- Name: sitetype_sitetype_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY sitetype ADD CONSTRAINT sitetype_sitetype_name_key UNIQUE (sitetype_name); -- -- Name: sltrans_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY sltrans ADD CONSTRAINT sltrans_pkey PRIMARY KEY (sltrans_id); -- -- Name: source_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY source ADD CONSTRAINT source_pkey PRIMARY KEY (source_id); -- -- Name: source_source_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY source ADD CONSTRAINT source_source_name_key UNIQUE (source_name); -- -- Name: state_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY state ADD CONSTRAINT state_pkey PRIMARY KEY (state_id); -- -- Name: state_state_country_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY state ADD CONSTRAINT state_state_country_id_key UNIQUE (state_country_id, state_name); -- -- Name: status_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY status ADD CONSTRAINT status_pkey PRIMARY KEY (status_id); -- -- Name: status_status_type_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY status ADD CONSTRAINT status_status_type_key UNIQUE (status_type, status_code); -- -- Name: stdjrnl_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY stdjrnl ADD CONSTRAINT stdjrnl_pkey PRIMARY KEY (stdjrnl_id); -- -- Name: stdjrnl_stdjrnl_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY stdjrnl ADD CONSTRAINT stdjrnl_stdjrnl_name_key UNIQUE (stdjrnl_name); -- -- Name: stdjrnlgrp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY stdjrnlgrp ADD CONSTRAINT stdjrnlgrp_pkey PRIMARY KEY (stdjrnlgrp_id); -- -- Name: stdjrnlgrp_stdjrnlgrp_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY stdjrnlgrp ADD CONSTRAINT stdjrnlgrp_stdjrnlgrp_name_key UNIQUE (stdjrnlgrp_name); -- -- Name: stdjrnlgrpitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY stdjrnlgrpitem ADD CONSTRAINT stdjrnlgrpitem_pkey PRIMARY KEY (stdjrnlgrpitem_id); -- -- Name: stdjrnlitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY stdjrnlitem ADD CONSTRAINT stdjrnlitem_pkey PRIMARY KEY (stdjrnlitem_id); -- -- Name: subaccnt_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY subaccnt ADD CONSTRAINT subaccnt_pkey PRIMARY KEY (subaccnt_id); -- -- Name: subaccnt_subaccnt_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY subaccnt ADD CONSTRAINT subaccnt_subaccnt_number_key UNIQUE (subaccnt_number); -- -- Name: subaccnttype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY subaccnttype ADD CONSTRAINT subaccnttype_pkey PRIMARY KEY (subaccnttype_id); -- -- Name: tax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY tax ADD CONSTRAINT tax_pkey PRIMARY KEY (tax_id); -- -- Name: taxass_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxass ADD CONSTRAINT taxass_pkey PRIMARY KEY (taxass_id); -- -- Name: taxass_taxass_taxzone_id_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxass ADD CONSTRAINT taxass_taxass_taxzone_id_key UNIQUE (taxass_taxzone_id, taxass_taxtype_id, taxass_tax_id); -- -- Name: taxauth_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_pkey PRIMARY KEY (taxauth_id); -- -- Name: taxauth_taxauth_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_taxauth_code_key UNIQUE (taxauth_code); -- -- Name: taxclass_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxclass ADD CONSTRAINT taxclass_pkey PRIMARY KEY (taxclass_id); -- -- Name: taxclass_taxclass_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxclass ADD CONSTRAINT taxclass_taxclass_code_key UNIQUE (taxclass_code); -- -- Name: taxhist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxhist ADD CONSTRAINT taxhist_pkey PRIMARY KEY (taxhist_id); -- -- Name: taxrate_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxrate ADD CONSTRAINT taxrate_pkey PRIMARY KEY (taxrate_id); -- -- Name: taxreg_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxreg ADD CONSTRAINT taxreg_pkey PRIMARY KEY (taxreg_id); -- -- Name: taxtype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxtype ADD CONSTRAINT taxtype_pkey PRIMARY KEY (taxtype_id); -- -- Name: taxtype_taxtype_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxtype ADD CONSTRAINT taxtype_taxtype_name_key UNIQUE (taxtype_name); -- -- Name: taxzone_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxzone ADD CONSTRAINT taxzone_pkey PRIMARY KEY (taxzone_id); -- -- Name: taxzone_taxzone_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY taxzone ADD CONSTRAINT taxzone_taxzone_code_key UNIQUE (taxzone_code); -- -- Name: terms_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY terms ADD CONSTRAINT terms_pkey PRIMARY KEY (terms_id); -- -- Name: terms_terms_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY terms ADD CONSTRAINT terms_terms_code_key UNIQUE (terms_code); -- -- Name: todoitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_pkey PRIMARY KEY (todoitem_id); -- -- Name: trialbal_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY trialbal ADD CONSTRAINT trialbal_pkey PRIMARY KEY (trialbal_id); -- -- Name: uiform_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY uiform ADD CONSTRAINT uiform_pkey PRIMARY KEY (uiform_id); -- -- Name: uom_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY uom ADD CONSTRAINT uom_pkey PRIMARY KEY (uom_id); -- -- Name: uom_uom_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY uom ADD CONSTRAINT uom_uom_name_key UNIQUE (uom_name); -- -- Name: uomconv_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY uomconv ADD CONSTRAINT uomconv_pkey PRIMARY KEY (uomconv_id); -- -- Name: uomtype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY uomtype ADD CONSTRAINT uomtype_pkey PRIMARY KEY (uomtype_id); -- -- Name: uomtype_uomtype_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY uomtype ADD CONSTRAINT uomtype_uomtype_name_key UNIQUE (uomtype_name); -- -- Name: urlinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY urlinfo ADD CONSTRAINT urlinfo_pkey PRIMARY KEY (url_id); -- -- Name: usr_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY usr_bak ADD CONSTRAINT usr_pkey PRIMARY KEY (usr_id); -- -- Name: usr_usr_username_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY usr_bak ADD CONSTRAINT usr_usr_username_key UNIQUE (usr_username); -- -- Name: usrgrp_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY usrgrp ADD CONSTRAINT usrgrp_pkey PRIMARY KEY (usrgrp_id); -- -- Name: usrpref_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY usrpref ADD CONSTRAINT usrpref_pkey PRIMARY KEY (usrpref_id); -- -- Name: usrpriv_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY usrpriv ADD CONSTRAINT usrpriv_pkey PRIMARY KEY (usrpriv_id); -- -- Name: vend_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY vendinfo ADD CONSTRAINT vend_pkey PRIMARY KEY (vend_id); -- -- Name: vendaddr_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY vendaddrinfo ADD CONSTRAINT vendaddr_pkey PRIMARY KEY (vendaddr_id); -- -- Name: vendinfo_vend_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY vendinfo ADD CONSTRAINT vendinfo_vend_number_key UNIQUE (vend_number); -- -- Name: vendtype_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY vendtype ADD CONSTRAINT vendtype_pkey PRIMARY KEY (vendtype_id); -- -- Name: vendtype_vendtype_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY vendtype ADD CONSTRAINT vendtype_vendtype_code_key UNIQUE (vendtype_code); -- -- Name: vodist_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY vodist ADD CONSTRAINT vodist_pkey PRIMARY KEY (vodist_id); -- -- Name: vohead_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_pkey PRIMARY KEY (vohead_id); -- -- Name: vohead_vohead_number_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_number_key UNIQUE (vohead_number); -- -- Name: voheadtax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_pkey PRIMARY KEY (taxhist_id); -- -- Name: voitem_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY voitem ADD CONSTRAINT voitem_pkey PRIMARY KEY (voitem_id); -- -- Name: voitemtax_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_pkey PRIMARY KEY (taxhist_id); -- -- Name: warehous_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT warehous_pkey PRIMARY KEY (warehous_id); -- -- Name: whsezone_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY whsezone ADD CONSTRAINT whsezone_pkey PRIMARY KEY (whsezone_id); -- -- Name: whsinfo_warehous_code_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_code_key UNIQUE (warehous_code); -- -- Name: wo_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY wo ADD CONSTRAINT wo_pkey PRIMARY KEY (wo_id); -- -- Name: womatl_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY womatl ADD CONSTRAINT womatl_pkey PRIMARY KEY (womatl_id); -- -- Name: womatlpost_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY womatlpost ADD CONSTRAINT womatlpost_pkey PRIMARY KEY (womatlpost_id); -- -- Name: womatlvar_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY womatlvar ADD CONSTRAINT womatlvar_pkey PRIMARY KEY (womatlvar_id); -- -- Name: xsltmap_name_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY xsltmap ADD CONSTRAINT xsltmap_name_key UNIQUE (xsltmap_name); -- -- Name: xsltmap_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY xsltmap ADD CONSTRAINT xsltmap_pkey PRIMARY KEY (xsltmap_id); -- -- Name: yearperiod_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace: -- ALTER TABLE ONLY yearperiod ADD CONSTRAINT yearperiod_pkey PRIMARY KEY (yearperiod_id); SET search_path = te, pg_catalog; -- -- Name: pkgcmd_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgcmd ADD CONSTRAINT pkgcmd_pkey PRIMARY KEY (cmd_id); -- -- Name: pkgcmdarg_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_pkey PRIMARY KEY (cmdarg_id); -- -- Name: pkgimage_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgimage ADD CONSTRAINT pkgimage_pkey PRIMARY KEY (image_id); -- -- Name: pkgmetasql_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgmetasql ADD CONSTRAINT pkgmetasql_pkey PRIMARY KEY (metasql_id); -- -- Name: pkgpriv_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgpriv ADD CONSTRAINT pkgpriv_pkey PRIMARY KEY (priv_id); -- -- Name: pkgreport_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgreport ADD CONSTRAINT pkgreport_pkey PRIMARY KEY (report_id); -- -- Name: pkgscript_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgscript ADD CONSTRAINT pkgscript_pkey PRIMARY KEY (script_id); -- -- Name: pkguiform_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkguiform ADD CONSTRAINT pkguiform_pkey PRIMARY KEY (uiform_id); -- -- Name: tecustrate_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY tecustrate ADD CONSTRAINT tecustrate_pkey PRIMARY KEY (tecustrate_cust_id); -- -- Name: teexp_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY teexp ADD CONSTRAINT teexp_pkey PRIMARY KEY (teexp_id); -- -- Name: tehead_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY tehead ADD CONSTRAINT tehead_pkey PRIMARY KEY (tehead_id); -- -- Name: teitem_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY teitem ADD CONSTRAINT teitem_pkey PRIMARY KEY (teitem_id); -- -- Name: teprj_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY teprj ADD CONSTRAINT teprj_pkey PRIMARY KEY (teprj_id); -- -- Name: teprjtask_pkey; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_pkey PRIMARY KEY (teprjtask_id); -- -- Name: teprjtask_teprjtask_prjtask_id_key; Type: CONSTRAINT; Schema: te; Owner: admin; Tablespace: -- ALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_teprjtask_prjtask_id_key UNIQUE (teprjtask_prjtask_id); SET search_path = xtdesktop, pg_catalog; -- -- Name: pkgcmd_pkey; Type: CONSTRAINT; Schema: xtdesktop; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgcmd ADD CONSTRAINT pkgcmd_pkey PRIMARY KEY (cmd_id); -- -- Name: pkgcmdarg_pkey; Type: CONSTRAINT; Schema: xtdesktop; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_pkey PRIMARY KEY (cmdarg_id); -- -- Name: pkgimage_pkey; Type: CONSTRAINT; Schema: xtdesktop; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgimage ADD CONSTRAINT pkgimage_pkey PRIMARY KEY (image_id); -- -- Name: pkgmetasql_pkey; Type: CONSTRAINT; Schema: xtdesktop; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgmetasql ADD CONSTRAINT pkgmetasql_pkey PRIMARY KEY (metasql_id); -- -- Name: pkgpriv_pkey; Type: CONSTRAINT; Schema: xtdesktop; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgpriv ADD CONSTRAINT pkgpriv_pkey PRIMARY KEY (priv_id); -- -- Name: pkgreport_pkey; Type: CONSTRAINT; Schema: xtdesktop; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgreport ADD CONSTRAINT pkgreport_pkey PRIMARY KEY (report_id); -- -- Name: pkgscript_pkey; Type: CONSTRAINT; Schema: xtdesktop; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkgscript ADD CONSTRAINT pkgscript_pkey PRIMARY KEY (script_id); -- -- Name: pkguiform_pkey; Type: CONSTRAINT; Schema: xtdesktop; Owner: admin; Tablespace: -- ALTER TABLE ONLY pkguiform ADD CONSTRAINT pkguiform_pkey PRIMARY KEY (uiform_id); SET search_path = public, pg_catalog; -- -- Name: accnt_unique_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX accnt_unique_idx ON accnt USING btree (accnt_number, accnt_profit, accnt_sub, accnt_company); -- -- Name: apopen_apopen_open_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX apopen_apopen_open_idx ON apopen USING btree (apopen_open); -- -- Name: apopen_apopen_vend_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX apopen_apopen_vend_id_idx ON apopen USING btree (apopen_vend_id); -- -- Name: apselect_apselect_apopen_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX apselect_apselect_apopen_id_idx ON apselect USING btree (apselect_apopen_id); -- -- Name: arapply_arapply_target_docnumber_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX arapply_arapply_target_docnumber_idx ON arapply USING btree (arapply_target_docnumber); -- -- Name: aropen_aropen_cust_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX aropen_aropen_cust_id_idx ON aropen USING btree (aropen_cust_id); -- -- Name: aropen_aropen_docnumber_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX aropen_aropen_docnumber_idx ON aropen USING btree (aropen_docnumber); -- -- Name: aropen_aropen_doctype_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX aropen_aropen_doctype_idx ON aropen USING btree (aropen_doctype); -- -- Name: aropen_aropen_open_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX aropen_aropen_open_idx ON aropen USING btree (aropen_open); -- -- Name: aropen_posted_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX aropen_posted_idx ON aropen USING btree (aropen_posted); -- -- Name: aropenalloc_aropen_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX aropenalloc_aropen_id_idx ON aropenalloc USING btree (aropenalloc_aropen_id); -- -- Name: aropenalloc_doc_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX aropenalloc_doc_id_idx ON aropenalloc USING btree (aropenalloc_doc_id); -- -- Name: bomitem_bomitem_item_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX bomitem_bomitem_item_id_idx ON bomitem USING btree (bomitem_item_id); -- -- Name: bomitem_effective_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX bomitem_effective_key ON bomitem USING btree (bomitem_effective); -- -- Name: bomitem_expires_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX bomitem_expires_key ON bomitem USING btree (bomitem_expires); -- -- Name: bomitem_parent_item_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX bomitem_parent_item_id ON bomitem USING btree (bomitem_parent_item_id); -- -- Name: bomitemcost_bomitem_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX bomitemcost_bomitem_id_key ON bomitemcost USING btree (bomitemcost_bomitem_id); -- -- Name: bomitemcost_master_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX bomitemcost_master_idx ON bomitemcost USING btree (bomitemcost_bomitem_id, bomitemcost_costelem_id, bomitemcost_lowlevel); -- -- Name: ccard_cust_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX ccard_cust_id_idx ON ccard USING btree (ccard_cust_id); -- -- Name: ccardaud_ccard_cust_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX ccardaud_ccard_cust_id_idx ON ccardaud USING btree (ccardaud_ccard_cust_id_new); -- -- Name: ccardaud_ccard_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX ccardaud_ccard_id_idx ON ccardaud USING btree (ccardaud_ccard_id); -- -- Name: ccpay_ccard_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX ccpay_ccard_id_idx ON ccpay USING btree (ccpay_ccard_id); -- -- Name: ccpay_cust_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX ccpay_cust_id_idx ON ccpay USING btree (ccpay_cust_id); -- -- Name: ccpay_order_number_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX ccpay_order_number_idx ON ccpay USING btree (ccpay_order_number); -- -- Name: charass_target_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX charass_target_idx ON charass USING btree (charass_target_type, charass_target_id); -- -- Name: checkhead_posted_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX checkhead_posted_idx ON checkhead USING btree (checkhead_posted); -- -- Name: checkhead_replaced_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX checkhead_replaced_idx ON checkhead USING btree (checkhead_replaced); -- -- Name: checkitem_apopenitem_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX checkitem_apopenitem_id_idx ON checkitem USING btree (checkitem_apopen_id); -- -- Name: cmhead_invcnumber_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cmhead_invcnumber_idx ON cmhead USING btree (cmhead_invcnumber); -- -- Name: cntct_email_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cntct_email_idx ON cntct USING btree (cntct_email); -- -- Name: cntct_name_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cntct_name_idx ON cntct USING btree (cntct_name); -- -- Name: cobill_cobmisc_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cobill_cobmisc_id ON cobill USING btree (cobill_cobmisc_id); -- -- Name: cobill_coitem_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cobill_coitem_id ON cobill USING btree (cobill_coitem_id); -- -- Name: cobmisc_cohead_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cobmisc_cohead_id ON cobmisc USING btree (cobmisc_cohead_id); -- -- Name: cobmisc_posted; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cobmisc_posted ON cobmisc USING btree (cobmisc_posted); -- -- Name: cohead_cohead_status_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohead_cohead_status_idx ON cohead USING btree (cohead_status); -- -- Name: cohead_cust_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohead_cust_id_key ON cohead USING btree (cohead_cust_id); -- -- Name: cohead_custponumber_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohead_custponumber_idx ON cohead USING btree (cohead_custponumber); -- -- Name: cohead_number_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX cohead_number_idx ON cohead USING btree (cohead_number); -- -- Name: cohead_shipto_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohead_shipto_id ON cohead USING btree (cohead_shipto_id); -- -- Name: cohist_cust_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohist_cust_id ON cohist USING btree (cohist_cust_id); -- -- Name: cohist_invcnumber; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohist_invcnumber ON cohist USING btree (cohist_invcnumber); -- -- Name: cohist_itemsite_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohist_itemsite_id ON cohist USING btree (cohist_itemsite_id); -- -- Name: cohist_shipdate; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohist_shipdate ON cohist USING btree (cohist_shipdate); -- -- Name: cohist_shipto_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX cohist_shipto_id ON cohist USING btree (cohist_shipto_id); -- -- Name: coitem_cohead_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX coitem_cohead_id_key ON coitem USING btree (coitem_cohead_id); -- -- Name: coitem_coitem_cohead_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX coitem_coitem_cohead_id_key ON coitem USING btree (coitem_cohead_id, coitem_linenumber, coitem_subnumber); -- -- Name: coitem_itemsite_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX coitem_itemsite_id ON coitem USING btree (coitem_itemsite_id); -- -- Name: coitem_linenumber_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX coitem_linenumber_key ON coitem USING btree (coitem_linenumber); -- -- Name: coitem_status_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX coitem_status_key ON coitem USING btree (coitem_status); -- -- Name: comment_comment_source_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX comment_comment_source_idx ON comment USING btree (comment_source, comment_source_id); -- -- Name: contrct_master_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX contrct_master_idx ON contrct USING btree (contrct_number, contrct_vend_id); -- -- Name: cust_number_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX cust_number_idx ON custinfo USING btree (cust_number); -- -- Name: evntlog_dispatched_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX evntlog_dispatched_idx ON evntlog USING btree (evntlog_dispatched); -- -- Name: evntlog_evntlog_username_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX evntlog_evntlog_username_idx ON evntlog USING btree (evntlog_username); -- -- Name: evntnot_evnttype_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX evntnot_evnttype_id_idx ON evntnot USING btree (evntnot_evnttype_id); -- -- Name: evntnot_warehous_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX evntnot_warehous_id_idx ON evntnot USING btree (evntnot_warehous_id); -- -- Name: filter_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX filter_idx ON filter USING btree (filter_screen, filter_username, filter_name); -- -- Name: gltrans_gltrans_accnt_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX gltrans_gltrans_accnt_id_idx ON gltrans USING btree (gltrans_accnt_id); -- -- Name: gltrans_gltrans_date_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX gltrans_gltrans_date_idx ON gltrans USING btree (gltrans_date); -- -- Name: gltrans_gltrans_journalnumber_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX gltrans_gltrans_journalnumber_idx ON gltrans USING btree (gltrans_journalnumber); -- -- Name: gltrans_sequence_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX gltrans_sequence_idx ON gltrans USING btree (gltrans_sequence); -- -- Name: invchead_invchead_ordernumber_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invchead_invchead_ordernumber_idx ON invchead USING btree (invchead_ordernumber); -- -- Name: invcitem_invcitem_invchead_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invcitem_invcitem_invchead_id_idx ON invcitem USING btree (invcitem_invchead_id); -- -- Name: invcitem_invcitem_itemsite_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invcitem_invcitem_itemsite_id_idx ON invcitem USING btree (invcitem_item_id, invcitem_warehous_id); -- -- Name: invcitemtax_taxhist_parent_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invcitemtax_taxhist_parent_id_idx ON invcitemtax USING btree (taxhist_parent_id); -- -- Name: invdetail_invdetail_invcitem_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invdetail_invdetail_invcitem_id_idx ON invdetail USING btree (invdetail_invcitem_id); -- -- Name: invdetail_invdetail_invhist_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invdetail_invdetail_invhist_id_idx ON invdetail USING btree (invdetail_invhist_id); -- -- Name: invhist_hasdetail; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invhist_hasdetail ON invhist USING btree (invhist_hasdetail); -- -- Name: invhist_invhist_ordnumber_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invhist_invhist_ordnumber_idx ON invhist USING btree (invhist_ordnumber); -- -- Name: invhist_itemsite_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invhist_itemsite_id ON invhist USING btree (invhist_itemsite_id); -- -- Name: invhist_series; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invhist_series ON invhist USING btree (invhist_series); -- -- Name: invhist_transdate; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invhist_transdate ON invhist USING btree (invhist_transdate); -- -- Name: invhist_transtype; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX invhist_transtype ON invhist USING btree (invhist_transtype); -- -- Name: ipsitem_ipshead_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX ipsitem_ipshead_id_idx ON ipsiteminfo USING btree (ipsitem_ipshead_id); -- -- Name: item_classcode_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX item_classcode_id ON item USING btree (item_classcode_id); -- -- Name: item_number_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX item_number_idx ON item USING btree (item_number); -- -- Name: item_prodcat_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX item_prodcat_id_idx ON item USING btree (item_prodcat_id); -- -- Name: item_upccode_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX item_upccode_idx ON item USING btree (item_upccode); -- -- Name: itemcost_item_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemcost_item_id_key ON itemcost USING btree (itemcost_item_id); -- -- Name: itemcost_master_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX itemcost_master_idx ON itemcost USING btree (itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel); -- -- Name: itemgrpitem_itemgrp_item_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX itemgrpitem_itemgrp_item_id_idx ON itemgrpitem USING btree (itemgrpitem_itemgrp_id, itemgrpitem_item_id); -- -- Name: itemloc_itemsite_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemloc_itemsite_idx ON itemloc USING btree (itemloc_itemsite_id); -- -- Name: itemloc_location_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemloc_location_idx ON itemloc USING btree (itemloc_location_id); -- -- Name: itemsite_active_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemsite_active_key ON itemsite USING btree (itemsite_active); -- -- Name: itemsite_item_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemsite_item_id_key ON itemsite USING btree (itemsite_item_id); -- -- Name: itemsite_item_warehous_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX itemsite_item_warehous_id_key ON itemsite USING btree (itemsite_item_id, itemsite_warehous_id); -- -- Name: itemsite_plancode_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemsite_plancode_id_key ON itemsite USING btree (itemsite_plancode_id); -- -- Name: itemsite_warehous_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemsite_warehous_id_key ON itemsite USING btree (itemsite_warehous_id); -- -- Name: itemsrc_vend_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemsrc_vend_id_idx ON itemsrc USING btree (itemsrc_vend_id); -- -- Name: itemsrcp_itemsrc_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemsrcp_itemsrc_id_key ON itemsrcp USING btree (itemsrcp_itemsrc_id); -- -- Name: itemsub_parent_item_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemsub_parent_item_id_key ON itemsub USING btree (itemsub_parent_item_id); -- -- Name: itemsub_sub_item_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX itemsub_sub_item_id_key ON itemsub USING btree (itemsub_sub_item_id); -- -- Name: location_warehous_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX location_warehous_idx ON location USING btree (location_warehous_id); -- -- Name: payaropen_aropen_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX payaropen_aropen_id_idx ON payaropen USING btree (payaropen_aropen_id); -- -- Name: payaropen_ccpay_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX payaropen_ccpay_id_idx ON payaropen USING btree (payaropen_ccpay_id); -- -- Name: payco_ccpay_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX payco_ccpay_id_idx ON payco USING btree (payco_ccpay_id); -- -- Name: payco_cohead_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX payco_cohead_id_idx ON payco USING btree (payco_cohead_id); -- -- Name: pohead_pohead_status_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX pohead_pohead_status_idx ON pohead USING btree (pohead_status); -- -- Name: poitem_itemsite_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX poitem_itemsite_id_key ON poitem USING btree (poitem_itemsite_id); -- -- Name: poitem_itemsite_status_duedate_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX poitem_itemsite_status_duedate_key ON poitem USING btree (poitem_itemsite_id, poitem_status, poitem_duedate); -- -- Name: poitem_pohead_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX poitem_pohead_id_key ON poitem USING btree (poitem_pohead_id); -- -- Name: poitem_status_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX poitem_status_key ON poitem USING btree (poitem_status); -- -- Name: priv_name_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX priv_name_idx ON priv USING btree (priv_name); -- -- Name: quitem_quhead_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX quitem_quhead_id_key ON quitem USING btree (quitem_quhead_id); -- -- Name: recv_ordertypeid_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX recv_ordertypeid_idx ON recv USING btree (recv_order_type, recv_orderitem_id); -- -- Name: report_name_grade_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX report_name_grade_idx ON report USING btree (report_name, report_grade); -- -- Name: salesaccnt_prodcat_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX salesaccnt_prodcat_id_idx ON salesaccnt USING btree (salesaccnt_prodcat_id); -- -- Name: salesaccnt_warehous_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX salesaccnt_warehous_id_idx ON salesaccnt USING btree (salesaccnt_warehous_id); -- -- Name: shipdata_cohead_number_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX shipdata_cohead_number_idx ON shipdata USING btree (shipdata_cohead_number); -- -- Name: shipdatasum_cohead_number_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX shipdatasum_cohead_number_idx ON shipdatasum USING btree (shipdatasum_cohead_number); -- -- Name: shipdatasum_cosmisc_tracknum_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX shipdatasum_cosmisc_tracknum_idx ON shipdatasum USING btree (shipdatasum_cosmisc_tracknum); -- -- Name: shiphead_order_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX shiphead_order_id_idx ON shiphead USING btree (shiphead_order_id); -- -- Name: shiphead_shipped_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX shiphead_shipped_idx ON shiphead USING btree (shiphead_shipped); -- -- Name: shipitem_invcitem_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX shipitem_invcitem_id_idx ON shipitem USING btree (shipitem_invcitem_id); -- -- Name: shipitem_orderitem_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX shipitem_orderitem_id_idx ON shipitem USING btree (shipitem_orderitem_id); -- -- Name: shipitem_shiphead_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX shipitem_shiphead_id_idx ON shipitem USING btree (shipitem_shiphead_id); -- -- Name: sltrans_sequence_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX sltrans_sequence_idx ON sltrans USING btree (sltrans_sequence); -- -- Name: sltrans_sltrans_accnt_id_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX sltrans_sltrans_accnt_id_idx ON sltrans USING btree (sltrans_accnt_id); -- -- Name: sltrans_sltrans_date_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX sltrans_sltrans_date_idx ON sltrans USING btree (sltrans_date); -- -- Name: sltrans_sltrans_journalnumber_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX sltrans_sltrans_journalnumber_idx ON sltrans USING btree (sltrans_journalnumber); -- -- Name: subaccnttype_code_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX subaccnttype_code_idx ON subaccnttype USING btree (subaccnttype_code); -- -- Name: todoitem_todoitem_username_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX todoitem_todoitem_username_idx ON todoitem USING btree (todoitem_username); -- -- Name: trialbal_accnt_period_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX trialbal_accnt_period_idx ON trialbal USING btree (trialbal_accnt_id, trialbal_period_id); -- -- Name: usrpref_userpref_name_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX usrpref_userpref_name_idx ON usrpref USING btree (usrpref_name); -- -- Name: vend_number_idx; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE UNIQUE INDEX vend_number_idx ON vendinfo USING btree (vend_number); -- -- Name: warehous_code_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX warehous_code_key ON whsinfo USING btree (warehous_code bpchar_ops); -- -- Name: wo_duedate; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX wo_duedate ON wo USING btree (wo_duedate); -- -- Name: wo_itemsite_id; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX wo_itemsite_id ON wo USING btree (wo_itemsite_id); -- -- Name: wo_ordtype; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX wo_ordtype ON wo USING btree (wo_ordtype); -- -- Name: wo_startdate; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX wo_startdate ON wo USING btree (wo_startdate); -- -- Name: wo_status; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX wo_status ON wo USING btree (wo_status); -- -- Name: womatl_itemsite_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX womatl_itemsite_id_key ON womatl USING btree (womatl_itemsite_id); -- -- Name: womatl_wo_id_key; Type: INDEX; Schema: public; Owner: admin; Tablespace: -- CREATE INDEX womatl_wo_id_key ON womatl USING btree (womatl_wo_id); SET search_path = te, pg_catalog; -- -- Name: teitem_teitem_tehead_id_idx; Type: INDEX; Schema: te; Owner: admin; Tablespace: -- CREATE INDEX teitem_teitem_tehead_id_idx ON teitem USING btree (teitem_tehead_id); SET search_path = api, pg_catalog; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO salesline DO INSTEAD DELETE FROM public.coitem WHERE (((coitem.coitem_cohead_id = public.getcoheadid((old.order_number)::text)) AND (((coitem.coitem_linenumber)::character varying)::text = (old.line_number)::text)) AND (coitem.coitem_subnumber = 0)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO apmemo DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO armemo DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO physinvcount DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO account DO INSTEAD DELETE FROM public.crmacct WHERE (crmacct.crmacct_number = (old.account_number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO accountchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'CRMACCT'::text) AND (charass.charass_target_id = public.getcrmacctid((old.account_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CRMACCT'::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO accountcomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO accountfile DO INSTEAD DELETE FROM public.url WHERE ((((url.url_source_id = public.getcrmacctid(old.account_number)) AND (url.url_source = 'CRMA'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO accountimage DO INSTEAD DELETE FROM public.imageass WHERE (((imageass.imageass_source_id = public.getcrmacctid(old.account_number)) AND (imageass.imageass_source = 'CRMA'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO address DO INSTEAD SELECT public.deleteaddress(public.getaddrid((old.address_number)::text)) AS deleteaddress; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO addresschar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'ADDR'::text) AND (charass.charass_target_id = public.getaddrid((old.address_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'ADDR'::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO addresscomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO bom DO INSTEAD SELECT public.deletebom(public.getitemid((old.item_number)::text)) AS deletebom; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO bomitem DO INSTEAD DELETE FROM public.bomitem WHERE ((bomitem.bomitem_id = old.id) AND public.fetchmetricbool('AllowBOMItemDelete'::text)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO bomitemcomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO bomitemsubstitute DO INSTEAD DELETE FROM public.bomitemsub WHERE ((bomitemsub.bomitemsub_bomitem_id = old.bomitem_id) AND (bomitemsub.bomitemsub_item_id = public.getitemid((old.substitute_item_number)::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO budget DO INSTEAD DELETE FROM public.budghead WHERE (budghead.budghead_name = old.name); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO budgetentry DO INSTEAD DELETE FROM public.budgitem WHERE (((budgitem.budgitem_budghead_id = public.getbudgheadid(old.name)) AND (budgitem.budgitem_period_id = public.getperiodid(old.period_start))) AND (budgitem.budgitem_accnt_id = public.getglaccntid(old.account))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO cashreceipt DO INSTEAD SELECT public.deletecashrcpt(cashrcpt.cashrcpt_id) AS deletecashrcpt FROM public.cashrcpt WHERE (cashrcpt.cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO cashreceiptapply DO INSTEAD DELETE FROM public.cashrcptitem WHERE ((cashrcptitem.cashrcptitem_cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)) AND (cashrcptitem.cashrcptitem_aropen_id = public.getaropenid((old.customer_number)::text, (old.doc_type)::bpchar, (old.doc_number)::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO cashreceiptapplymisc DO INSTEAD DELETE FROM public.cashrcptmisc WHERE ((cashrcptmisc.cashrcptmisc_cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)) AND (cashrcptmisc.cashrcptmisc_accnt_id = public.getglaccntid((old.account)::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO contact DO INSTEAD DELETE FROM public.cntct WHERE (cntct.cntct_number = (old.contact_number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO contactchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'CNTCT'::text) AND (charass.charass_target_id = public.getcntctid(old.contact_number))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CNTCT'::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO contactcomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO creditmemo DO INSTEAD SELECT public.deletecreditmemo(cmhead.cmhead_id) AS deletecreditmemo FROM public.cmhead WHERE ((cmhead.cmhead_number = old.memo_number) AND (cmhead.cmhead_posted = false)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO creditmemoline DO INSTEAD DELETE FROM public.cmitem WHERE ((cmitem.cmitem_cmhead_id = public.getcmheadid(old.memo_number, false)) AND (cmitem.cmitem_linenumber = old.line_number)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO custchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'C'::text) AND (charass.charass_target_id = public.getcustid((old.customer_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'C'::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO custcomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO custcreditcard DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO customer DO INSTEAD DELETE FROM public.custinfo WHERE (custinfo.cust_number = (old.customer_number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO customertype DO INSTEAD DELETE FROM public.custtype WHERE (custtype.custtype_code = (old.code)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO customertypechar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'CT'::text) AND (charass.charass_target_id = public.getcusttypeid((old.customer_type)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CT'::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO custshipto DO INSTEAD SELECT public.deleteshipto(public.getshiptoid((old.customer_number)::text, (old.shipto_number)::text)) AS deleteshipto; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO custtax DO INSTEAD DELETE FROM public.taxreg WHERE (((taxreg.taxreg_rel_type = 'C'::bpchar) AND (taxreg.taxreg_rel_id = public.getcustid((old.customer_number)::text))) AND (taxreg.taxreg_taxauth_id = public.gettaxauthid((old.tax_authority)::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO employee DO INSTEAD DELETE FROM public.emp WHERE (emp.emp_code = (old.code)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO employeechar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'EMP'::text) AND (charass.charass_target_id = public.getempid((old.employee_code)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'EMP'::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO employeecomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO extshipmaint DO INSTEAD DELETE FROM public.shipdata WHERE ((((shipdata.shipdata_cohead_number = (old.so_number)::text) AND (shipdata.shipdata_shiphead_number = (old.shipment_number)::text)) AND (shipdata.shipdata_shipper = (old.shipper)::text)) AND (shipdata.shipdata_cosmisc_packnum_tracknum = (old.package_tracking_number)::text)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO freightpricingscheduleitem DO INSTEAD DELETE FROM public.ipsfreight WHERE (((((((((ipsfreight.ipsfreight_ipshead_id = public.getipsheadid((old.pricing_schedule)::text)) AND (ipsfreight.ipsfreight_qtybreak = old.qty_break)) AND (ipsfreight.ipsfreight_price = old.price)) AND ((ipsfreight.ipsfreight_type)::text = CASE WHEN (old.price_type = 'Flat Rate'::text) THEN 'F'::text WHEN (old.price_type = 'Price Per UOM'::text) THEN 'P'::text ELSE NULL::text END)) AND ((ipsfreight.ipsfreight_warehous_id IS NULL) AND (old.from_site = 'Any'::text))) OR ((ipsfreight.ipsfreight_warehous_id = CASE WHEN (old.from_site = 'Any'::text) THEN 0 ELSE public.getwarehousid(old.from_site, 'All'::text) END) AND ((ipsfreight.ipsfreight_shipzone_id IS NULL) AND (old.to_shipzone = 'Any'::text)))) OR ((ipsfreight.ipsfreight_shipzone_id = CASE WHEN (old.to_shipzone = 'Any'::text) THEN 0 ELSE public.getshipzoneid(old.to_shipzone) END) AND ((ipsfreight.ipsfreight_freightclass_id IS NULL) AND (old.freight_class = 'Any'::text)))) OR ((ipsfreight.ipsfreight_freightclass_id = CASE WHEN (old.freight_class = 'Any'::text) THEN 0 ELSE public.getfreightclassid(old.freight_class) END) AND ((ipsfreight.ipsfreight_shipvia IS NULL) AND (old.ship_via = 'Any'::text)))) OR (ipsfreight.ipsfreight_shipvia = old.ship_via)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO incident DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO incidentchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'INCDT'::text) AND (charass.charass_target_id = public.getincidentid(old.incident_number))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'INCDT'::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO incidentcomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO incidentfile DO INSTEAD DELETE FROM public.url WHERE ((((url.url_source_id = public.getincidentid(old.incident_number)) AND (url.url_source = 'INCDT'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO incidentimage DO INSTEAD DELETE FROM public.imageass WHERE (((imageass.imageass_source_id = public.getincidentid(old.incident_number)) AND (imageass.imageass_source = 'INCDT'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO invoice DO INSTEAD SELECT public.deleteinvoice(invchead.invchead_id) AS deleteinvoice FROM public.invchead WHERE ((invchead.invchead_invcnumber = old.invoice_number) AND (invchead.invchead_posted = false)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO invoiceline DO INSTEAD DELETE FROM public.invcitem WHERE (invcitem.invcitem_invchead_id = (SELECT invchead.invchead_id FROM public.invchead WHERE ((invchead.invchead_invcnumber = old.invoice_number) AND (invchead.invchead_posted = false)))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO item DO INSTEAD SELECT public.deleteitem(public.getitemid((old.item_number)::text)) AS deleteitem; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemalias DO INSTEAD DELETE FROM public.itemalias WHERE ((itemalias.itemalias_item_id = public.getitemid((old.item_number)::text)) AND (itemalias.itemalias_number = old.alias_number)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'I'::text) AND (charass.charass_target_id = public.getitemid((old.item_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'I'::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemcomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemcost DO INSTEAD SELECT public.deleteitemcost(public.getitemid((old.item_number)::text), public.getcostelemid((old.costing_element)::text)) AS deleteitemcost; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemfile DO INSTEAD DELETE FROM public.url WHERE ((((url.url_source_id = public.getitemid((old.item_number)::text)) AND (url.url_source = 'I'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemimage DO INSTEAD DELETE FROM public.imageass WHERE (((imageass.imageass_source_id = public.getitemid((old.item_number)::text)) AND (imageass.imageass_source = 'I'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemsite DO INSTEAD SELECT public.deleteitemsite(public.getitemsiteid((old.site)::text, (old.item_number)::text)) AS deleteitemsite; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemsitecomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemsource DO INSTEAD DELETE FROM public.itemsrc WHERE (((((itemsrc.itemsrc_item_id = public.getitemid((old.item_number)::text)) AND (itemsrc.itemsrc_vend_id = public.getvendid((old.vendor)::text))) AND (itemsrc.itemsrc_vend_item_number = old.vendor_item_number)) AND (itemsrc.itemsrc_manuf_name = old.manufacturer_name)) AND (itemsrc.itemsrc_manuf_item_number = old.manufacturer_item_number)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemsourceprice DO INSTEAD DELETE FROM public.itemsrcp WHERE ((itemsrcp.itemsrcp_itemsrc_id = public.getitemsrcid((old.item_number)::text, (old.vendor)::text)) AND (itemsrcp.itemsrcp_qtybreak = old.qty_break)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemsubstitute DO INSTEAD DELETE FROM public.itemsub WHERE ((itemsub.itemsub_parent_item_id = public.getitemid((old.root_item_number)::text)) AND (itemsub.itemsub_sub_item_id = public.getitemid((old.substitute_item_number)::text))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemtaxtype DO INSTEAD DELETE FROM public.itemtax WHERE (((itemtax.itemtax_item_id = public.getitemid((old.item_number)::text)) AND CASE WHEN ((old.tax_zone)::text = 'Any'::text) THEN (itemtax.itemtax_taxzone_id IS NULL) ELSE (itemtax.itemtax_taxzone_id = public.gettaxzoneid((old.tax_zone)::text)) END) AND (itemtax.itemtax_taxtype_id = public.gettaxtypeid(old.tax_type))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO itemuomconversion DO INSTEAD SELECT public.deleteitemuomconv(itemuomconv.itemuomconv_id) AS deleteitemuomconv FROM public.itemuomconv WHERE ((itemuomconv.itemuomconv_item_id = public.getitemid((old.item_number)::text)) AND (((itemuomconv.itemuomconv_from_uom_id = public.getuomid((old.uom)::text)) AND (itemuomconv.itemuomconv_to_uom_id = public.getuomid(old.per_uom))) OR ((itemuomconv.itemuomconv_from_uom_id = public.getuomid(old.per_uom)) AND (itemuomconv.itemuomconv_to_uom_id = public.getuomid((old.uom)::text))))); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO journalentry DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO location DO INSTEAD DELETE FROM public.location WHERE ((location.location_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (location.location_name = (old.location)::text)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO misccounttag DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO pricingschedule DO INSTEAD DELETE FROM public.ipshead WHERE ((old.name)::text = ipshead.ipshead_name); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO pricingscheduleassign DO INSTEAD DELETE FROM public.ipsass WHERE ((((((ipsass.ipsass_ipshead_id = public.getipsheadid((old.pricing_schedule)::text)) AND (ipsass.ipsass_cust_id = CASE WHEN ((old.customer_number)::text = 'Any'::text) THEN (-1) ELSE public.getcustid((old.customer_number)::text) END)) AND (ipsass.ipsass_custtype_id = CASE WHEN ((old.customer_type)::text = 'N/A'::text) THEN (-1) ELSE public.getcusttypeid((old.customer_type)::text) END)) AND (ipsass.ipsass_custtype_pattern = (old.customer_type_pattern)::text)) AND (ipsass.ipsass_shipto_id = CASE WHEN ((old.customer_shipto)::text = 'Any'::text) THEN (-1) ELSE public.getshiptoid((old.customer_number)::text, (old.customer_shipto)::text) END)) AND (ipsass.ipsass_shipto_pattern = (old.customer_shipto_pattern)::text)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO pricingscheduleitem DO INSTEAD SELECT CASE WHEN ((old.type)::text = 'Item'::text) THEN public.deleteipsitem(public.getipsitemid((old.pricing_schedule)::text, (old.item_number)::text, old.qty_break, (old.qty_uom)::text, (old.price_uom)::text)) WHEN ((old.type)::text = 'Product Category'::text) THEN public.deleteipsprodcat(public.getipsprodcatid((old.pricing_schedule)::text, (old.product_category)::text, old.qty_break)) ELSE NULL::integer END AS result; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO pricingscheduleitemchar DO INSTEAD DELETE FROM public.ipsitemchar WHERE (((ipsitemchar.ipsitemchar_ipsitem_id = public.getipsitemid((old.pricing_schedule)::text, (old.item_number)::text, old.qty_break, (old.qty_uom)::text, (old.price_uom)::text)) AND (ipsitemchar.ipsitemchar_char_id = public.getcharid((old.characteristic)::text, 'I'::text))) AND (ipsitemchar.ipsitemchar_value = (old.value)::text)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO project DO INSTEAD SELECT public.deleteproject(public.getprjid(old.number)) AS deleteproject; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO projectcomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO prospect DO INSTEAD DELETE FROM public.prospect WHERE (prospect.prospect_number = (old.prospect_number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO purchaseline DO INSTEAD DELETE FROM public.poitem WHERE (poitem.poitem_id = public.getpoitemid((old.order_number)::text, old.line_number)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO purchaselinechar DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO purchaselinecomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO purchaseorder DO INSTEAD SELECT public.deletepo(pohead.pohead_id) AS deletepo FROM public.pohead WHERE (pohead.pohead_number = (old.order_number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO purchaseordercomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO quote DO INSTEAD SELECT public.deletequote(quhead.quhead_id, (old.quote_number)::text) AS deletequote FROM public.quhead WHERE (quhead.quhead_number = (old.quote_number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO quotecomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO quoteline DO INSTEAD DELETE FROM public.quitem WHERE ((quitem.quitem_quhead_id = public.getquoteid(old.quote_number)) AND (quitem.quitem_linenumber = old.line_number)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO quotelinechar DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO quotelinecomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO saleshistory DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO saleslinechar DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO saleslinecomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO salesorder DO INSTEAD SELECT public.deleteso(cohead.cohead_id, (old.order_number)::text) AS deleteso FROM public.cohead WHERE (cohead.cohead_number = (old.order_number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO salesordercomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO salesrep DO INSTEAD DELETE FROM public.salesrep WHERE (salesrep.salesrep_number = (old.number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO site DO NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO sitezone DO INSTEAD DELETE FROM public.whsezone WHERE ((whsezone.whsezone_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (whsezone.whsezone_name = (old.name)::text)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO task DO INSTEAD DELETE FROM public.prjtask WHERE ((prjtask.prjtask_prj_id = public.getprjid(old.project_number)) AND (prjtask.prjtask_number = old.number)); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO taskcomment DO INSTEAD NOTHING; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO todo DO INSTEAD SELECT public.deletetodoitem(old.task_number) AS deletetodoitem; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO vendor DO INSTEAD DELETE FROM public.vendinfo WHERE (vendinfo.vend_number = (old.vendor_number)::text); -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO vendoraddress DO INSTEAD SELECT public.deletevendoraddress(public.getvendaddrid((old.vendor_number)::text, (old.vendor_address_number)::text)) AS deletevendoraddress; -- -- Name: _DELETE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO vendortype DO INSTEAD SELECT public.deletevendortype(public.getvendtypeid((old.code)::text)) AS deletevendortype; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO salesline DO INSTEAD SELECT public.insertsalesline(new.*) AS insertsalesline; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO apmemo DO INSTEAD SELECT public.insertapmemo(new.*) AS insertapmemo; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO armemo DO INSTEAD SELECT public.insertarmemo(new.*) AS insertarmemo; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO physinvcount DO INSTEAD SELECT insertphysinvcount(new.*) AS insertphysinvcount; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO account DO INSTEAD INSERT INTO public.crmacct (crmacct_number, crmacct_parent_id, crmacct_name, crmacct_active, crmacct_type, crmacct_cntct_id_1, crmacct_cntct_id_2, crmacct_notes) VALUES (COALESCE(new.account_number, ((public.fetchcrmaccountnumber())::text)::character varying), public.getcrmacctid(new.parent_account), new.account_name, COALESCE(new.active, true), CASE WHEN (new.type = 'Individual'::text) THEN 'I'::text ELSE 'O'::text END, public.savecntct(public.getcntctid(new.primary_contact_number), new.primary_contact_number, public.saveaddr(public.getaddrid(new.primary_contact_address_number), new.primary_contact_address_number, new.primary_contact_address1, new.primary_contact_address2, new.primary_contact_address3, new.primary_contact_city, new.primary_contact_state, new.primary_contact_postalcode, new.primary_contact_country, new.primary_contact_address_change), new.primary_contact_honorific, new.primary_contact_first, new.primary_contact_middle, new.primary_contact_last, new.primary_contact_suffix, new.primary_contact_voice, NULL::text, new.primary_contact_fax, new.primary_contact_email, NULL::text, new.primary_contact_job_title, new.primary_contact_change), public.savecntct(public.getcntctid(new.secondary_contact_number), new.secondary_contact_number, public.saveaddr(public.getaddrid(new.secondary_contact_address_number), new.secondary_contact_address_number, new.secondary_contact_address1, new.secondary_contact_address2, new.secondary_contact_address3, new.secondary_contact_city, new.secondary_contact_state, new.secondary_contact_postalcode, new.secondary_contact_country, new.secondary_contact_address_change), new.secondary_contact_honorific, new.secondary_contact_first, new.secondary_contact_middle, new.secondary_contact_last, new.secondary_contact_suffix, new.secondary_contact_voice, NULL::text, new.secondary_contact_fax, new.secondary_contact_email, NULL::text, new.secondary_contact_job_title, new.secondary_contact_change), new.notes); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO accountchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('CRMACCT'::text, public.getcrmacctid((new.account_number)::text), public.getcharid((new.characteristic)::text, 'CRMACCT'::text), new.value, false); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO accountcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'CRMA'::text, public.getcrmacctid((new.account_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO accountfile DO INSTEAD INSERT INTO public.url (url_source_id, url_source, url_title, url_url) VALUES (public.getcrmacctid(new.account_number), 'CRMA'::text, new.title, new.url); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO accountimage DO INSTEAD SELECT public.saveimageass('CRMA'::text, public.getcrmacctid(new.account_number), 'M'::bpchar, public.getimageid(new.image_name)) AS saveimageass; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO address DO INSTEAD SELECT public.saveaddr(NULL::integer, (new.address_number)::text, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, COALESCE(new.active, true), new.notes, NULL::text) AS saveaddr; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO addresschar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('ADDR'::text, public.getaddrid((new.address_number)::text), public.getcharid((new.characteristic)::text, 'ADDR'::text), new.value, false); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO addresscomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'ADDR'::text, public.getaddrid((new.address_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO bom DO INSTEAD SELECT public.savebomhead(public.getitemid((new.item_number)::text), (new.revision)::text, new.revision_date, new.document_number, COALESCE(new.batch_size, (0)::numeric), new.total_qty_per) AS savebomhead; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO bomitem DO INSTEAD SELECT public.createbomitem(COALESCE(new.id, (nextval('public.bomitem_bomitem_id_seq'::regclass))::integer), public.getitemid((new.bom_item_number)::text), public.getitemid(new.item_number), COALESCE(new.sequence_number, (SELECT (max(bomitem.bomitem_seqnumber) + 10) FROM public.bomitem(public.getitemid((new.bom_item_number)::text), COALESCE(public.getrevid('BOM'::text, (new.bom_item_number)::text, (new.bom_revision)::text))) bomitem(bomitem_id, bomitem_parent_item_id, bomitem_seqnumber, bomitem_item_id, bomitem_qtyper, bomitem_scrap, bomitem_status, bomitem_effective, bomitem_expires, bomitem_createwo, bomitem_issuemethod, bomitem_schedatwooper, bomitem_ecn, bomitem_moddate, bomitem_subtype, bomitem_uom_id, bomitem_rev_id, bomitem_booitem_seq_id, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref, bomitem_qtyfxd, bomitem_issuewo)), 10), (CASE WHEN (new.issue_method = 'Mixed'::text) THEN 'M'::text WHEN (new.issue_method = 'Push'::text) THEN 'S'::text WHEN (new.issue_method = 'Pull'::text) THEN 'L'::text ELSE public.fetchmetrictext('DefaultWomatlIssueMethod'::text) END)::bpchar, COALESCE(public.getuomid(new.issue_uom), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid(new.item_number)))), new.qty_per, new.scrap, CASE WHEN (new.effective = 'Always'::text) THEN public.startoftime() ELSE COALESCE((new.effective)::date, public.startoftime()) END, CASE WHEN (new.expires = 'Never'::text) THEN public.endoftime() ELSE COALESCE((new.expires)::date, public.endoftime()) END, COALESCE(new.create_child_wo, false), COALESCE(public.getbooitemseqid((new.bom_item_number)::text, new.used_at), (-1)), COALESCE(new.schedule_at_wo_operation, false), new.ecn_number, (CASE WHEN (new.substitutions = 'No'::text) THEN 'N'::text WHEN (new.substitutions = 'BOM-Defined'::text) THEN 'B'::text ELSE 'I'::text END)::bpchar, COALESCE(public.getrevid('BOM'::text, (new.bom_item_number)::text, (new.bom_revision)::text)), public.getcharid(new.characteristic, 'I'::text), new.value, new.notes, new.reference) AS createbomitem; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO bomitemcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'BMI'::text, new.bomitem_id, COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO bomitemsubstitute DO INSTEAD INSERT INTO public.bomitemsub (bomitemsub_bomitem_id, bomitemsub_item_id, bomitemsub_uomratio, bomitemsub_rank) VALUES (new.bomitem_id, public.getitemid((new.substitute_item_number)::text), COALESCE(new.sub_parent_uom_ratio, (1)::numeric), COALESCE(new.ranking, 1)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO budget DO INSTEAD INSERT INTO public.budghead (budghead_name, budghead_descrip) VALUES (new.name, new.description); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO budgetentry DO INSTEAD INSERT INTO public.budgitem (budgitem_budghead_id, budgitem_period_id, budgitem_accnt_id, budgitem_amount) VALUES (public.getbudgheadid(new.name), public.getperiodid(new.period_start), public.getglaccntid(new.account), new.amount); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO cashreceipt DO INSTEAD INSERT INTO public.cashrcpt (cashrcpt_cust_id, cashrcpt_amount, cashrcpt_fundstype, cashrcpt_docnumber, cashrcpt_bankaccnt_id, cashrcpt_notes, cashrcpt_distdate, cashrcpt_salescat_id, cashrcpt_curr_id, cashrcpt_usecustdeposit) VALUES (public.getcustid((new.customer_number)::text), COALESCE(new.amount_received, (0)::numeric), CASE WHEN ((new.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((new.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((new.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((new.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((new.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((new.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((new.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((new.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((new.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, COALESCE(new.check_document_number, ''::character varying), public.getbankaccntid(new.post_to), COALESCE(new.notes, ''::text), CASE WHEN (new.distribution_date > ''::text) THEN ((new.distribution_date)::date)::timestamp with time zone ELSE now() END, COALESCE(public.getsalescatid(new.sales_category), (-1)), public.getcurrid((new.currency)::text), CASE WHEN (new.apply_balance_as = 'Customer Deposit'::text) THEN true ELSE false END); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO cashreceiptapply DO INSTEAD INSERT INTO public.cashrcptitem (cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount, cashrcptitem_discount) VALUES (public.getcashrcptid((new.customer_number)::text, CASE WHEN ((new.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((new.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((new.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((new.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((new.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((new.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((new.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((new.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((new.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (new.check_document_number)::text), public.getaropenid((new.customer_number)::text, (new.doc_type)::bpchar, (new.doc_number)::text), COALESCE(new.amount_to_apply, (0)::numeric), COALESCE(new.cashrcptitem_discount, (0)::numeric)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO cashreceiptapplymisc DO INSTEAD INSERT INTO public.cashrcptmisc (cashrcptmisc_cashrcpt_id, cashrcptmisc_accnt_id, cashrcptmisc_amount, cashrcptmisc_notes) VALUES (public.getcashrcptid((new.customer_number)::text, CASE WHEN ((new.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((new.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((new.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((new.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((new.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((new.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((new.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((new.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((new.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (new.check_document_number)::text), public.getglaccntid((new.account)::text), COALESCE(new.amount_to_distribute, (0)::numeric), COALESCE(new.notes, ''::text)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO contact DO INSTEAD SELECT public.savecntct(NULL::integer, (new.contact_number)::text, public.getcrmacctid(new.crm_account), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), new.honorific, new.first, new.middle, new.last, new.suffix, new.initials, COALESCE(new.active, true), new.voice, new.alternate, new.fax, new.email, new.web, new.notes, new.job_title, new.contact_change) AS savecntct; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO contactchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('CNTCT'::text, public.getcntctid(new.contact_number), public.getcharid((new.characteristic)::text, 'CNTCT'::text), new.value, false); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO contactcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'T'::text, public.getcntctid(new.contact_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO creditmemo DO INSTEAD SELECT public.insertcreditmemo(new.*) AS insertcreditmemo; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO creditmemoline DO INSTEAD SELECT public.insertcreditmemoline(new.*) AS insertcreditmemoline; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO custchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('C'::text, public.getcustid((new.customer_number)::text), public.getcharid((new.characteristic)::text, 'C'::text), new.value, false); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO custcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'C'::text, public.getcustid((new.customer_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO custcreditcard DO INSTEAD SELECT public.insertccard((new.customer_number)::text, new.active, new.credit_card_type, new.credit_card_number, new.name, new.street_address1, new.street_address2, new.city, new.state, new.postal_code, new.country, new.expiration_month, new.expiration_year, new.key) AS insertccard; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO customer DO INSTEAD INSERT INTO public.custinfo (cust_active, cust_custtype_id, cust_salesrep_id, cust_commprcnt, cust_name, cust_creditlmt, cust_creditrating, cust_backorder, cust_partialship, cust_terms_id, cust_discntprcnt, cust_balmethod, cust_ffshipto, cust_shipform_id, cust_shipvia, cust_blanketpos, cust_shipchrg_id, cust_creditstatus, cust_comments, cust_ffbillto, cust_usespos, cust_number, cust_autoupdatestatus, cust_autoholdorders, cust_preferred_warehous_id, cust_curr_id, cust_creditlmt_curr_id, cust_cntct_id, cust_corrcntct_id, cust_taxzone_id, cust_gracedays) VALUES (COALESCE(new.active, true), COALESCE((public.getcusttypeid(new.customer_type))::numeric, public.fetchmetricvalue('DefaultCustType'::text)), COALESCE((public.getsalesrepid(new.sales_rep))::numeric, public.fetchmetricvalue('DefaultSalesRep'::text)), COALESCE((new.commission * 0.01), (SELECT salesrep.salesrep_commission FROM public.salesrep WHERE (salesrep.salesrep_id = public.getsalesrepid(new.sales_rep)))), COALESCE(new.customer_name, ''::text), COALESCE((new.credit_limit)::numeric, public.fetchmetricvalue('SOCreditLimit'::text)), COALESCE(new.credit_rating, public.fetchmetrictext('SOCreditRate'::text)), COALESCE(new.accepts_backorders, public.fetchmetricbool('DefaultBackOrders'::text), false), COALESCE(new.accepts_partial_shipments, public.fetchmetricbool('DefaultPartialShipments'::text), false), COALESCE((public.gettermsid(new.default_terms))::numeric, public.fetchmetricvalue('DefaultTerms'::text)), COALESCE(new.default_discount, (0)::numeric), CASE WHEN (new.balance_method = 'Balance Forward'::text) THEN 'B'::text WHEN (new.balance_method = 'Open Items'::text) THEN 'O'::text ELSE COALESCE(public.fetchmetrictext('DefaultBalanceMethod'::text), 'B'::text) END, COALESCE(new.allow_free_form_shipto, public.fetchmetricbool('DefaultFreeFormShiptos'::text), false), COALESCE((public.getshipformid(new.ship_form))::numeric, public.fetchmetricvalue('DefaultShipFormId'::text)), COALESCE(new.ship_via, public.fetchdefaultshipvia()), COALESCE(new.uses_blanket_pos, false), COALESCE(public.getshipchrgid(new.shipping_charges), (-1)), CASE WHEN (new.credit_status = 'On Credit Warning'::text) THEN 'W'::text WHEN (new.credit_status = 'On Credit Hold'::text) THEN 'H'::text ELSE 'G'::text END, COALESCE(new.notes, ''::text), COALESCE(new.allow_free_form_billto, false), COALESCE(new.uses_purchase_orders, false), COALESCE(upper((new.customer_number)::text), (public.fetchcrmaccountnumber())::text), COALESCE(new.credit_status_exceed_warn, false), COALESCE(new.credit_status_exceed_hold, false), COALESCE(public.getwarehousid(new.preferred_selling_site, 'ACTIVE'::text), (-1)), COALESCE(public.getcurrid((new.default_currency)::text), public.basecurrid()), COALESCE(public.getcurrid((new.credit_limit_currency)::text), public.basecurrid()), public.savecntct(public.getcntctid(new.billing_contact_number, false), new.billing_contact_number, public.saveaddr(public.getaddrid(new.billing_contact_address_number), new.billing_contact_address_number, new.billing_contact_address1, new.billing_contact_address2, new.billing_contact_address3, new.billing_contact_city, new.billing_contact_state, new.billing_contact_postalcode, new.billing_contact_country, new.billing_contact_address_change), new.billing_contact_honorific, new.billing_contact_first, new.billing_contact_middle, new.billing_contact_last, new.billing_contact_suffix, new.billing_contact_voice, new.billing_contact_alternate, new.billing_contact_fax, new.billing_contact_email, new.billing_contact_web, new.billing_contact_job_title, new.billing_contact_change), public.savecntct(public.getcntctid(new.correspond_contact_number, false), new.correspond_contact_number, public.saveaddr(public.getaddrid(new.correspond_contact_address_number), new.correspond_contact_address_number, new.correspond_contact_address1, new.correspond_contact_address2, new.correspond_contact_address3, new.correspond_contact_city, new.correspond_contact_state, new.correspond_contact_postalcode, new.correspond_contact_country, new.correspond_contact_address_change), new.correspond_contact_honorific, new.correspond_contact_first, new.correspond_contact_middle, new.correspond_contact_last, new.correspond_contact_suffix, new.correspond_contact_voice, new.correspond_contact_alternate, new.correspond_contact_fax, new.correspond_contact_email, new.correspond_contact_web, new.correspond_contact_job_title, new.correspond_contact_change), public.gettaxzoneid(new.default_tax_zone), CASE WHEN (COALESCE(new.alternate_grace_days, 0) > 0) THEN new.alternate_grace_days ELSE NULL::integer END); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO customertaxreg DO INSTEAD INSERT INTO public.taxreg (taxreg_rel_id, taxreg_rel_type, taxreg_taxauth_id, taxreg_taxzone_id, taxreg_number, taxreg_effective, taxreg_expires, taxreg_notes) VALUES (public.getcustid((new.customer_number)::text), 'C'::bpchar, public.gettaxauthid((new.tax_authority)::text), (SELECT custinfo.cust_taxzone_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text))), COALESCE(new.registration_number, ''::text), CASE WHEN (new.start_date = 'Always'::text) THEN public.startoftime() ELSE COALESCE((new.start_date)::date, public.startoftime()) END, CASE WHEN (new.end_date = 'Never'::text) THEN public.endoftime() ELSE COALESCE((new.end_date)::date, public.endoftime()) END, new.notes); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO customertype DO INSTEAD INSERT INTO public.custtype (custtype_code, custtype_descrip, custtype_char) VALUES (new.code, COALESCE(new.description, ''::text), COALESCE(new.enable_characteristics_profile, false)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO customertypechar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('CT'::text, public.getcusttypeid((new.customer_type)::text), public.getcharid((new.characteristic)::text, 'CT'::text), new.value, COALESCE(new.is_default, false)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO custshipto DO INSTEAD INSERT INTO public.shiptoinfo (shipto_cust_id, shipto_name, shipto_salesrep_id, shipto_comments, shipto_shipcomments, shipto_shipzone_id, shipto_shipvia, shipto_commission, shipto_shipform_id, shipto_shipchrg_id, shipto_active, shipto_default, shipto_num, shipto_ediprofile_id, shipto_cntct_id, shipto_addr_id, shipto_taxzone_id) VALUES (public.getcustid((new.customer_number)::text), COALESCE(new.name, ''::text), COALESCE(public.getsalesrepid(new.sales_rep), (SELECT custinfo.cust_salesrep_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text)))), COALESCE(new.general_notes, ''::text), COALESCE(new.shipping_notes, ''::text), public.getshipzoneid(new.zone), COALESCE(new.ship_via, (SELECT custinfo.cust_shipvia FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text)))), COALESCE((new.commission / 100.0), (0)::numeric), COALESCE(public.getshipformid(new.ship_form), (SELECT custinfo.cust_shipform_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text)))), COALESCE(public.getshipchrgid(new.shipping_charges), (SELECT custinfo.cust_shipchrg_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text)))), COALESCE(new.active, true), COALESCE(new.default_flag, false), COALESCE(new.shipto_number, (((SELECT (COALESCE(max((shiptoinfo.shipto_num)::integer), 0) + 1) FROM public.shiptoinfo WHERE ((shiptoinfo.shipto_cust_id = public.getcustid((new.customer_number)::text)) AND (shiptoinfo.shipto_num ~ '^[0-9]*$'::text))))::text)::character varying), CASE WHEN (new.edi_profile = 'No EDI'::text) THEN (-1) WHEN (new.edi_profile = 'Use Customer Master'::text) THEN (-2) ELSE public.getediprofileid(new.edi_profile) END, public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), COALESCE(public.gettaxzoneid(new.tax_zone), (SELECT custinfo.cust_taxzone_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text))))); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO custtax DO INSTEAD INSERT INTO public.taxreg (taxreg_rel_type, taxreg_rel_id, taxreg_taxauth_id, taxreg_number) VALUES ('C'::bpchar, public.getcustid((new.customer_number)::text), public.gettaxauthid((new.tax_authority)::text), new.registration_number); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO employee DO INSTEAD INSERT INTO public.emp (emp_code, emp_number, emp_active, emp_cntct_id, emp_warehous_id, emp_mgr_emp_id, emp_wage_type, emp_wage, emp_wage_curr_id, emp_wage_period, emp_dept_id, emp_shift_id, emp_image_id, emp_extrate, emp_extrate_period, emp_startdate, emp_notes) VALUES (new.code, new.number, COALESCE(new.active, true), public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.honorific, new.first, new.middle, new.last, new.suffix, new.voice, new.alternate, new.fax, new.email, new.web, new.job_title, new.contact_change), public.getwarehousid(new.site, 'ALL'::text), (SELECT emp.emp_id FROM public.emp WHERE (emp.emp_code = new.manager_code)), CASE WHEN (new.wage_type = 'Hourly'::text) THEN 'H'::text WHEN (new.wage_type = 'Salaried'::text) THEN 'S'::text ELSE NULL::text END, new.wage, COALESCE(public.getcurrid((new.wage_currency)::text), public.basecurrid()), CASE WHEN (new.wage_period = 'Hour'::text) THEN 'H'::text WHEN (new.wage_period = 'Day'::text) THEN 'D'::text WHEN (new.wage_period = 'Week'::text) THEN 'W'::text WHEN (new.wage_period = 'Biweek'::text) THEN 'BW'::text WHEN (new.wage_period = 'Month'::text) THEN 'M'::text WHEN (new.wage_period = 'Year'::text) THEN 'Y'::text ELSE NULL::text END, public.getdeptid(new.department), public.getshiftid(new.shift), public.getimageid(new.image), new.rate, CASE WHEN (new.billing_period = 'Hour'::text) THEN 'H'::text WHEN (new.billing_period = 'Day'::text) THEN 'D'::text WHEN (new.billing_period = 'Week'::text) THEN 'W'::text WHEN (new.billing_period = 'Biweek'::text) THEN 'BW'::text WHEN (new.billing_period = 'Month'::text) THEN 'M'::text WHEN (new.billing_period = 'Year'::text) THEN 'Y'::text ELSE NULL::text END, new.start_date, COALESCE(new.notes, ''::text)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO employeechar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('EMP'::text, public.getempid((new.employee_code)::text), public.getcharid((new.characteristic)::text, 'EMP'::text), new.value, false); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO employeecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'EMP'::text, public.getempid((new.code)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid((new.type)::text), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO extshipmaint DO INSTEAD INSERT INTO public.shipdata (shipdata_cohead_number, shipdata_shiphead_number, shipdata_void_ind, shipdata_shipper, shipdata_billing_option, shipdata_weight, shipdata_base_freight, shipdata_base_freight_curr_id, shipdata_total_freight, shipdata_total_freight_curr_id, shipdata_package_type, shipdata_cosmisc_tracknum, shipdata_cosmisc_packnum_tracknum, shipdata_lastupdated) VALUES (new.so_number, new.shipment_number, new.void, new.shipper, new.billing_option, new.weight, new.base_freight, public.getcurrid((new.base_freight_currency)::text), new.total_freight, public.getcurrid((new.total_freight_currency)::text), new.package_type, new.tracking_number, new.package_tracking_number, new.last_updated); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO freightpricingscheduleitem DO INSTEAD INSERT INTO public.ipsfreight (ipsfreight_ipshead_id, ipsfreight_qtybreak, ipsfreight_price, ipsfreight_type, ipsfreight_warehous_id, ipsfreight_shipzone_id, ipsfreight_freightclass_id, ipsfreight_shipvia) VALUES (public.getipsheadid((new.pricing_schedule)::text), new.qty_break, new.price, CASE WHEN (new.price_type = 'Flat Rate'::text) THEN 'F'::text ELSE 'P'::text END, CASE WHEN (new.from_site = 'Any'::text) THEN NULL::integer ELSE public.getwarehousid(new.from_site, 'All'::text) END, CASE WHEN (new.to_shipzone = 'Any'::text) THEN NULL::integer ELSE public.getshipzoneid(new.to_shipzone) END, CASE WHEN (new.freight_class = 'Any'::text) THEN NULL::integer ELSE public.getfreightclassid(new.freight_class) END, CASE WHEN (new.ship_via = 'Any'::text) THEN NULL::text ELSE new.ship_via END); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO glaccount DO INSTEAD INSERT INTO public.accnt (accnt_number, accnt_descrip, accnt_comments, accnt_profit, accnt_sub, accnt_type, accnt_extref, accnt_company, accnt_forwardupdate, accnt_subaccnttype_code) VALUES (COALESCE(new.account_number, ''::character varying), COALESCE(new.description, ''::text), COALESCE(new.notes, ''::text), new.profit_center, new.sub_account, CASE WHEN (new.type = 'Asset'::text) THEN 'A'::text WHEN (new.type = 'Liability'::text) THEN 'L'::text WHEN (new.type = 'Expense'::text) THEN 'E'::text WHEN (new.type = 'Revenue'::text) THEN 'R'::text WHEN (new.type = 'Equity'::text) THEN 'Q'::text ELSE NULL::text END, COALESCE(new.ext_reference, ''::text), new.company, COALESCE(new.forward_update_trial_balances, false), COALESCE(new.sub_type, ''::text)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO incident DO INSTEAD INSERT INTO public.incdt (incdt_number, incdt_crmacct_id, incdt_cntct_id, incdt_summary, incdt_descrip, incdt_item_id, incdt_status, incdt_assigned_username, incdt_incdtcat_id, incdt_incdtseverity_id, incdt_incdtpriority_id, incdt_incdtresolution_id, incdt_lotserial, incdt_ls_id) VALUES (new.incident_number, public.getcrmacctid(new.crm_account), public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), COALESCE(new.description, ''::text), COALESCE(new.notes, ''::text), public.getitemid(new.item_number), CASE WHEN (new.status = 'New'::text) THEN 'N'::text WHEN (new.status = 'Feedback'::text) THEN 'F'::text WHEN (new.status = 'Confirmed'::text) THEN 'C'::text WHEN (new.status = 'Assigned'::text) THEN 'A'::text WHEN (new.status = 'Resolved'::text) THEN 'R'::text WHEN (new.status = 'Closed'::text) THEN 'L'::text ELSE ''::text END, COALESCE(new.assigned_to, ''::text), public.getincdtcatid(new.category), public.getincdtseverityid(new.severity), public.getincdtpriorityid(new.priority), public.getincdtresolutionid(new.resolution), COALESCE(new.lot_serial_number, ''::text), public.getlotserialid(new.item_number, new.lot_serial_number)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO incidentchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('INCDT'::text, public.getincidentid(new.incident_number), public.getcharid((new.characteristic)::text, 'INCDT'::text), new.value, false); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO incidentcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text, comment_public) VALUES (COALESCE(new.date, now()), 'INCDT'::text, public.getincidentid(new.incident_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text, COALESCE(new.public, true)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO incidentfile DO INSTEAD INSERT INTO public.url (url_source_id, url_source, url_title, url_url) VALUES (public.getincidentid(new.incident_number), 'INCDT'::text, new.title, new.url); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO incidentimage DO INSTEAD SELECT public.saveimageass('INCDT'::text, public.getincidentid(new.incident_number), 'M'::bpchar, public.getimageid(new.image_name)) AS saveimageass; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO invoice DO INSTEAD SELECT public.insertinvoice(new.*) AS insertinvoice; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO invoiceline DO INSTEAD SELECT public.insertinvoicelineitem(new.*) AS insertinvoicelineitem; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO item DO INSTEAD INSERT INTO public.item (item_number, item_active, item_descrip1, item_descrip2, item_type, item_maxcost, item_classcode_id, item_inv_uom_id, item_picklist, item_fractional, item_config, item_sold, item_prodcat_id, item_exclusive, item_listprice, item_listcost, item_price_uom_id, item_upccode, item_prodweight, item_packweight, item_comments, item_extdescrip) VALUES (upper((new.item_number)::text), COALESCE(new.active, true), COALESCE(new.description1, ''::text), COALESCE(new.description2, ''::text), CASE WHEN (new.item_type = 'Purchased'::text) THEN 'P'::text WHEN (new.item_type = 'Manufactured'::text) THEN 'M'::text WHEN (new.item_type = 'Job'::text) THEN 'J'::text WHEN (new.item_type = 'Kit'::text) THEN 'K'::text WHEN (new.item_type = 'Phantom'::text) THEN 'F'::text WHEN (new.item_type = 'Reference'::text) THEN 'R'::text WHEN (new.item_type = 'Costing'::text) THEN 'S'::text WHEN (new.item_type = 'Tooling'::text) THEN 'T'::text WHEN (new.item_type = 'Outside Process'::text) THEN 'O'::text WHEN (new.item_type = 'Planning'::text) THEN 'L'::text WHEN (new.item_type = 'Breeder'::text) THEN 'B'::text WHEN (new.item_type = 'Co-Product'::text) THEN 'C'::text WHEN (new.item_type = 'By-Product'::text) THEN 'Y'::text ELSE NULL::text END, COALESCE(new.maximum_desired_cost, (0)::numeric), public.getclasscodeid(new.class_code), public.getuomid(new.inventory_uom), COALESCE(new.pick_list_item, true), COALESCE(new.fractional, false), COALESCE(new.configured, false), COALESCE(new.item_is_sold, true), COALESCE(public.getprodcatid(new.product_category), (-1)), COALESCE(new.exclusive, false), COALESCE(new.list_price, (0)::numeric), COALESCE(new.list_cost, (0)::numeric), COALESCE(public.getuomid(new.list_price_uom), public.getuomid(new.inventory_uom)), new.upc_code, COALESCE(new.product_weight, (0)::numeric), COALESCE(new.packaging_weight, (0)::numeric), new.notes, new.ext_description); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemalias DO INSTEAD INSERT INTO public.itemalias (itemalias_item_id, itemalias_number, itemalias_usedescrip, itemalias_descrip1, itemalias_descrip2, itemalias_comments) VALUES (public.getitemid((new.item_number)::text), new.alias_number, COALESCE(new.use_description, false), COALESCE(new.description1, ''::text), COALESCE(new.description2, ''::text), new.comments); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('I'::text, public.getitemid((new.item_number)::text), public.getcharid((new.characteristic)::text, 'I'::text), new.value, COALESCE(new.is_default, false)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'IS'::text, public.getitemid((new.item_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemcost DO INSTEAD SELECT public.insertitemcost(public.getitemid((new.item_number)::text), public.getcostelemid((new.costing_element)::text), public.getcurrid((new.currency)::text), new.actual_cost, new.post_to_standard) AS insertitemcost; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemfile DO INSTEAD INSERT INTO public.url (url_source_id, url_source, url_title, url_url) VALUES (public.getitemid((new.item_number)::text), 'I'::text, new.title, new.url); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemimage DO INSTEAD SELECT public.saveimageass('I'::text, public.getitemid((new.item_number)::text), (CASE WHEN (new.purpose = 'Product Description'::text) THEN 'P'::text WHEN (new.purpose = 'Inventory Description'::text) THEN 'I'::text WHEN (new.purpose = 'Engineering Reference'::text) THEN 'E'::text WHEN (new.purpose = 'Miscellaneous'::text) THEN 'M'::text ELSE 'X'::text END)::bpchar, public.getimageid(new.image_name)) AS saveimageass; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemsite DO INSTEAD INSERT INTO public.itemsite (itemsite_item_id, itemsite_warehous_id, itemsite_active, itemsite_dropship, itemsite_posupply, itemsite_createpr, itemsite_wosupply, itemsite_createwo, itemsite_createsopr, itemsite_createsopo, itemsite_sold, itemsite_soldranking, itemsite_costmethod, itemsite_controlmethod, itemsite_perishable, itemsite_plancode_id, itemsite_costcat_id, itemsite_loccntrl, itemsite_location_id, itemsite_location, itemsite_location_comments, itemsite_disallowblankwip, itemsite_stocked, itemsite_abcclass, itemsite_autoabcclass, itemsite_cyclecountfreq, itemsite_eventfence, itemsite_useparams, itemsite_reorderlevel, itemsite_ordertoqty, itemsite_minordqty, itemsite_maxordqty, itemsite_multordqty, itemsite_useparamsmanual, itemsite_ordergroup, itemsite_ordergroup_first, itemsite_mps_timefence, itemsite_leadtime, itemsite_safetystock, itemsite_supply_itemsite_id, itemsite_notes, itemsite_qtyonhand, itemsite_warrpurc, itemsite_autoreg, itemsite_freeze, itemsite_value, itemsite_planning_type) VALUES (public.getitemid((new.item_number)::text), public.getwarehousid((new.site)::text, 'ACTIVE'::text), COALESCE(new.active, true), COALESCE(new.dropship, false), COALESCE(new.po_supplied_at_site, false), COALESCE(new.create_prs, false), COALESCE(new.wo_supplied_at_site, false), COALESCE(new.create_wos, false), COALESCE(new.create_soprs, false), COALESCE(new.create_sopos, false), COALESCE(new.sold_from_site, true), COALESCE(new.ranking, 1), CASE WHEN (new.cost_method = 'None'::text) THEN 'N'::text WHEN (new.cost_method = 'Average'::text) THEN 'A'::text WHEN (new.cost_method = 'Standard'::text) THEN 'S'::text WHEN (new.cost_method = 'Job'::text) THEN 'J'::text ELSE NULL::text END, CASE WHEN (new.control_method = 'None'::text) THEN 'N'::text WHEN (new.control_method = 'Regular'::text) THEN 'R'::text WHEN (new.control_method = 'Serial #'::text) THEN 'S'::text WHEN (new.control_method = 'Lot #'::text) THEN 'L'::text ELSE NULL::text END, COALESCE(new.perishable, false), public.getplancodeid(new.planner_code), public.getcostcatid(new.cost_category), COALESCE(new.multiple_location_control, false), COALESCE(public.getlocationid((new.site)::text, new.location), (-1)), COALESCE(new.user_defined_location, ''::text), COALESCE(new.location_comment, ''::text), COALESCE(new.disallow_blank_wip_locations, false), COALESCE(new.stocked, false), COALESCE(new.abc_class, 'A'::bpchar), COALESCE(new.allow_automatic_updates, false), COALESCE(new.cycl_cnt_freq, 0), COALESCE((new.event_fence)::numeric, public.fetchmetricvalue('DefaultEventFence'::text)), COALESCE(new.enforce_order_parameters, false), COALESCE(new.reorder_level, (0)::numeric), COALESCE(new.order_up_to, (0)::numeric), COALESCE(new.minimum_order, (0)::numeric), COALESCE(new.maximum_order, (0)::numeric), COALESCE(new.order_multiple, (0)::numeric), COALESCE(new.enforce_on_manual_orders, false), COALESCE(new.group_mps_mrp_orders, 0), COALESCE(new.first_group, false), COALESCE(new.mps_time_fence, 0), COALESCE(new.lead_time, 0), COALESCE(new.safety_stock, (0)::numeric), CASE WHEN (new.supplied_from_site = 'None'::text) THEN NULL::integer WHEN (new.supplied_from_site = ''::text) THEN NULL::integer ELSE public.getitemsiteid(new.supplied_from_site, (new.item_number)::text) END, COALESCE(new.notes, ''::text), 0, COALESCE(new.require_warranty, false), COALESCE(new.auto_register, false), false, 0, CASE WHEN (new.planning_system = 'None'::text) THEN 'N'::text WHEN (new.planning_system = 'MPS'::text) THEN 'S'::text ELSE 'M'::text END); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemsitecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'IS'::text, public.getitemsiteid((new.site)::text, (new.item_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemsource DO INSTEAD INSERT INTO public.itemsrc (itemsrc_item_id, itemsrc_vend_id, itemsrc_vend_item_number, itemsrc_vend_item_descrip, itemsrc_comments, itemsrc_vend_uom, itemsrc_invvendoruomratio, itemsrc_minordqty, itemsrc_multordqty, itemsrc_leadtime, itemsrc_ranking, itemsrc_active, itemsrc_default, itemsrc_manuf_name, itemsrc_manuf_item_number, itemsrc_manuf_item_descrip, itemsrc_upccode, itemsrc_contrct_id, itemsrc_effective, itemsrc_expires) VALUES (public.getitemid((new.item_number)::text), public.getvendid((new.vendor)::text), new.vendor_item_number, COALESCE(new.vendor_description, ''::text), COALESCE(new.notes, ''::text), new.vendor_uom, new.inventory_vendor_uom_ratio, new.minimum_order, new.order_multiple, new.lead_time, new.vendor_ranking, COALESCE(new.active, true), COALESCE(new.itemsrc_default, true), COALESCE(new.manufacturer_name, ''::text), COALESCE(new.manufacturer_item_number, ''::text), new.manufacturer_description, new.bar_code, public.getcontrctid(new.contract_number), COALESCE(public.getcontrcteffective(new.contract_number), new.effective_date), COALESCE(public.getcontrctexpires(new.contract_number), new.expires_date)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemsourceprice DO INSTEAD INSERT INTO public.itemsrcp (itemsrcp_itemsrc_id, itemsrcp_qtybreak, itemsrcp_price, itemsrcp_curr_id, itemsrcp_updated, itemsrcp_dropship, itemsrcp_warehous_id, itemsrcp_type, itemsrcp_discntprcnt, itemsrcp_fixedamtdiscount) VALUES (public.getitemsrcid((new.item_number)::text, (new.vendor)::text), new.qty_break, new.price_per_unit, public.getcurrid((new.currency)::text), now(), COALESCE(new.dropship_only, false), CASE WHEN (new.pricing_site = 'All'::text) THEN (-1) ELSE COALESCE(public.getwarehousid(new.pricing_site, 'ALL'::text), (-1)) END, CASE WHEN (new.pricing_type = 'Discount'::text) THEN 'D'::text ELSE 'N'::text END, (COALESCE(new.discount_percent, 0.0) / 100.0), new.discount_fixed_amount); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemsubstitute DO INSTEAD INSERT INTO public.itemsub (itemsub_parent_item_id, itemsub_sub_item_id, itemsub_uomratio, itemsub_rank) VALUES (public.getitemid((new.root_item_number)::text), public.getitemid((new.substitute_item_number)::text), COALESCE(new.sub_parent_uom_ratio, (1)::numeric), COALESCE(new.ranking, 1)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemtaxtype DO INSTEAD INSERT INTO public.itemtax (itemtax_item_id, itemtax_taxzone_id, itemtax_taxtype_id) VALUES (public.getitemid((new.item_number)::text), CASE WHEN ((new.tax_zone)::text = 'Any'::text) THEN NULL::integer ELSE public.gettaxzoneid((new.tax_zone)::text) END, public.gettaxtypeid(new.tax_type)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO itemuomconversion DO INSTEAD SELECT public.saveitemuomconv(public.getitemid((new.item_number)::text), COALESCE(public.getuomid((new.uom)::text), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid((new.item_number)::text)))), COALESCE(new.uom_value, (1)::numeric), COALESCE(public.getuomid(new.per_uom), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid((new.item_number)::text)))), COALESCE(new.per_uom_value, (1)::numeric), COALESCE(new.fractional, false), public.getuomtypeid(new.selected_types)) AS saveitemuomconv; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO journalentry DO INSTEAD SELECT public.insertgltransaction('G/L'::text, 'JE'::text, new.doc_number, new.notes, public.getglaccntid(new.credit), public.getglaccntid(new.debit), (-1), public.currtobase(public.getcurrid((new.currency)::text), new.amount, new.dist_date), new.dist_date) AS insertgltransaction; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO location DO INSTEAD INSERT INTO public.location (location_warehous_id, location_name, location_descrip, location_restrict, location_netable, location_whsezone_id, location_aisle, location_rack, location_bin) VALUES (public.getwarehousid((new.site)::text, 'ACTIVE'::text), COALESCE(new.location, ''::character varying), COALESCE(new.description, ''::text), COALESCE(new.restricted, false), COALESCE(new.netable, true), public.getwhsezoneid((new.site)::text, new.zone), COALESCE(new.aisle, ''::character varying), COALESCE(new.rack, ''::character varying), COALESCE(new.bin, ''::character varying)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO misccounttag DO INSTEAD SELECT public.postmisccount(public.getitemsiteid(COALESCE(new.site, (SELECT whsinfo.warehous_code FROM public.usrpref, public.whsinfo WHERE (((usrpref.usrpref_username = public.geteffectivextuser()) AND (usrpref.usrpref_name = 'PreferredWarehouse'::text)) AND (whsinfo.warehous_id = (usrpref.usrpref_value)::integer)))), new.item_number), new.quantity, new.comment) AS postmisccount; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO pricingschedule DO INSTEAD INSERT INTO public.ipshead (ipshead_id, ipshead_name, ipshead_descrip, ipshead_effective, ipshead_expires, ipshead_curr_id, ipshead_updated) VALUES (nextval('public.ipshead_ipshead_id_seq'::regclass), new.name, new.description, CASE WHEN (new.effective = 'Always'::text) THEN '1970-01-01'::date ELSE (COALESCE(new.effective, '1970-01-01'::text))::date END, CASE WHEN (new.expires = 'Never'::text) THEN '2100-01-01'::date ELSE (COALESCE(new.expires, '2100-01-01'::text))::date END, COALESCE(public.getcurrid((new.currency)::text), public.basecurrid()), now()); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO pricingscheduleassign DO INSTEAD INSERT INTO public.ipsass (ipsass_ipshead_id, ipsass_cust_id, ipsass_custtype_id, ipsass_custtype_pattern, ipsass_shipto_id, ipsass_shipto_pattern) VALUES (public.getipsheadid((new.pricing_schedule)::text), CASE WHEN ((new.customer_number)::text = 'Any'::text) THEN (-1) ELSE public.getcustid((new.customer_number)::text) END, CASE WHEN ((new.customer_type)::text = 'N/A'::text) THEN (-1) ELSE public.getcusttypeid((new.customer_type)::text) END, new.customer_type_pattern, CASE WHEN (((new.customer_number)::text = 'Any'::text) OR ((new.customer_shipto)::text = 'Any'::text)) THEN (-1) ELSE public.getshiptoid((new.customer_number)::text, (new.customer_shipto)::text) END, new.customer_shipto_pattern); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO pricingscheduleitem DO INSTEAD SELECT CASE WHEN ((new.type)::text = 'Item'::text) THEN public.saveipsitem(NULL::integer, public.getipsheadid((new.pricing_schedule)::text), public.getitemid((new.item_number)::text), COALESCE(new.qty_break, (0)::numeric), COALESCE(new.price, (0)::numeric), public.getuomid((new.qty_uom)::text), public.getuomid((new.price_uom)::text), new.percent, new.fixedamt, CASE new.pricing_type WHEN 'Nominal'::text THEN 'N'::text WHEN 'Discount'::text THEN 'D'::text WHEN 'Markup'::text THEN 'M'::text ELSE '?'::text END) WHEN ((new.type)::text = 'Product Category'::text) THEN public.saveipsprodcat(NULL::integer, public.getipsheadid((new.pricing_schedule)::text), public.getprodcatid((new.product_category)::text), new.qty_break, new.percent, new.fixedamt, CASE new.pricing_type WHEN 'Nominal'::text THEN 'N'::text WHEN 'Discount'::text THEN 'D'::text WHEN 'Markup'::text THEN 'M'::text ELSE '?'::text END) ELSE NULL::integer END AS "case"; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO pricingscheduleitemchar DO INSTEAD INSERT INTO public.ipsitemchar (ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value, ipsitemchar_price) VALUES (public.getipsitemid((new.pricing_schedule)::text, (new.item_number)::text, new.qty_break, (new.qty_uom)::text, (new.price_uom)::text), public.getcharid((new.characteristic)::text, 'I'::text), new.value, COALESCE(new.price, (0)::numeric)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO project DO INSTEAD INSERT INTO public.prj (prj_number, prj_name, prj_descrip, prj_owner_username, prj_username, prj_so, prj_wo, prj_po, prj_status, prj_due_date, prj_assigned_date, prj_start_date, prj_completed_date) VALUES (new.number, COALESCE(new.name, ''::text), COALESCE(new.description, ''::text), COALESCE(new.owner, public.geteffectivextuser()), COALESCE(new.assigned_to, public.geteffectivextuser()), COALESCE(new.sales_orders, true), COALESCE(new.work_orders, true), COALESCE(new.purchase_orders, true), CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, new.due, new.assigned, new.started, new.completed); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO projectcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'J'::text, public.getprjid((new.project_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO prospect DO INSTEAD INSERT INTO public.prospect (prospect_number, prospect_name, prospect_active, prospect_cntct_id, prospect_taxzone_id, prospect_salesrep_id, prospect_warehous_id, prospect_comments) VALUES (upper((new.prospect_number)::text), COALESCE(new.prospect_name, ''::text), COALESCE(new.active, true), public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.contact_address_number), new.contact_address_number, new.contact_address1, new.contact_address2, new.contact_address3, new.contact_city, new.contact_state, new.contact_postalcode, new.contact_country, new.contact_address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), public.gettaxzoneid(new.default_tax_zone), public.getsalesrepid(new.sales_rep), public.getwarehousid(new.site_code, 'ACTIVE'::text), COALESCE(new.notes, ''::text)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO purchaseline DO INSTEAD INSERT INTO public.poitem (poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_comments, poitem_expcat_id, poitem_freight, poitem_prj_id, poitem_bom_rev_id, poitem_boo_rev_id) VALUES (public.getpoheadid((new.order_number)::text), new.line_number, new.due_date, public.getitemsiteid(COALESCE(new.site, (SELECT whsinfo.warehous_code FROM (public.pohead JOIN public.whsinfo ON ((whsinfo.warehous_id = pohead.pohead_warehous_id))) WHERE (pohead.pohead_id = public.getpoheadid((new.order_number)::text))), (SELECT whsinfo.warehous_code FROM public.whsinfo WHERE (whsinfo.warehous_id = public.fetchprefwarehousid()))), new.item_number), new.vendor_description, new.qty_ordered, new.unit_price, new.vend_item_number, new.manufacturer_name, new.manufacturer_item_number, new.manufacturer_description, new.notes, public.getexpcatid(new.expense_category), new.freight, public.getprjid(new.project_number), public.getrevid('BOM'::text, new.item_number, new.bill_of_materials_revision), public.getrevid('BOO'::text, new.item_number, new.bill_of_operations_revision)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO purchaselinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('PI'::text, poitem.poitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.pohead, public.poitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((pohead.pohead_number = (new.order_number)::text) AND (pohead.pohead_id = poitem.poitem_pohead_id)) AND (poitem.poitem_linenumber = new.line_number)) AND (poitem.poitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = new.characteristic)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO purchaselinecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) SELECT COALESCE(new.date, (('now'::text)::date)::timestamp with time zone) AS "coalesce", 'PI', poitem.poitem_id, COALESCE(new.username, public.geteffectivextuser()) AS "coalesce", public.getcmnttypeid(new.type) AS getcmnttypeid, new.text FROM public.poitem, public.pohead WHERE (((pohead.pohead_number = (new.order_number)::text) AND (poitem.poitem_pohead_id = pohead.pohead_id)) AND (poitem.poitem_linenumber = new.line_number)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO purchaseorder DO INSTEAD INSERT INTO public.pohead (pohead_number, pohead_orderdate, pohead_status, pohead_terms_id, pohead_taxzone_id, pohead_warehous_id, pohead_agent_username, pohead_vend_id, pohead_vendaddr_id, pohead_fob, pohead_shipvia, pohead_curr_id, pohead_freight, pohead_comments, pohead_dropship, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry, pohead_cohead_id) SELECT new.order_number, COALESCE(new.order_date, ('now'::text)::date) AS "coalesce", 'U', COALESCE(public.gettermsid(new.terms), vendinfo.vend_terms_id) AS "coalesce", COALESCE(public.gettaxzoneid(new.tax_zone), vendinfo.vend_taxzone_id) AS "coalesce", COALESCE(public.getwarehousid(new.receiving_site, 'ALL'::text), public.fetchprefwarehousid()) AS "coalesce", COALESCE(new.purchasing_agent, public.geteffectivextuser()) AS "coalesce", public.getvendid(new.vendor_number) AS getvendid, CASE WHEN (new.alt_address = 'MAIN'::text) THEN NULL::integer ELSE public.getvendaddrid(new.vendor_number, new.alt_address) END AS getvendaddrid, COALESCE(new.fob, CASE WHEN (vendinfo.vend_fobsource = 'W'::bpchar) THEN (SELECT whsinfo.warehous_fob FROM public.whsinfo WHERE (whsinfo.warehous_id = COALESCE(public.getwarehousid(new.receiving_site, 'ALL'::text), public.fetchprefwarehousid()))) ELSE vendinfo.vend_fob END) AS "coalesce", COALESCE(new.ship_via, vendinfo.vend_shipvia) AS "coalesce", COALESCE(public.getcurrid((new.currency)::text), vendinfo.vend_curr_id) AS "coalesce", COALESCE(new.freight, (0)::numeric) AS "coalesce", new.notes, COALESCE(new.dropship, false) AS "coalesce", public.getcntctid(new.vend_contact_number) AS getcntctid, COALESCE(new.vend_cntct_honorific, ''::text) AS "coalesce", COALESCE(new.vend_cntct_first_name, ''::text) AS "coalesce", COALESCE(new.vend_cntct_middle, ''::text) AS "coalesce", COALESCE(new.vend_cntct_last_name, ''::text) AS "coalesce", COALESCE(new.vend_cntct_suffix, ''::text) AS "coalesce", COALESCE(new.vend_cntct_phone, ''::text) AS "coalesce", COALESCE(new.vend_cntct_title, ''::text) AS "coalesce", COALESCE(new.vend_cntct_fax, ''::text) AS "coalesce", COALESCE(new.vend_cntct_email, ''::text) AS "coalesce", COALESCE(new.vendaddress1, ''::text) AS "coalesce", COALESCE(new.vendaddress2, ''::text) AS "coalesce", COALESCE(new.vendaddress3, ''::text) AS "coalesce", COALESCE(new.vendcity, ''::text) AS "coalesce", COALESCE(new.vendstate, ''::text) AS "coalesce", COALESCE(new.vendzipcode, ''::text) AS "coalesce", COALESCE(new.vendcountry, ''::text) AS "coalesce", public.getcntctid(new.shipto_contact_number) AS getcntctid, COALESCE(new.shipto_cntct_honorific, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_first_name, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_middle, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_last_name, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_suffix, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_phone, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_title, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_fax, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_email, ''::text) AS "coalesce", public.getaddrid(new.shiptoaddress_number) AS getaddrid, COALESCE(new.shiptoaddress1, ''::text) AS "coalesce", COALESCE(new.shiptoaddress2, ''::text) AS "coalesce", COALESCE(new.shiptoaddress3, ''::text) AS "coalesce", COALESCE(new.shiptocity, ''::text) AS "coalesce", COALESCE(new.shiptostate, ''::text) AS "coalesce", COALESCE(new.shiptozipcode, ''::text) AS "coalesce", COALESCE(new.shiptocountry, ''::text) AS "coalesce", public.getcoheadid(new.sales_order_number) AS getcoheadid FROM public.vendinfo WHERE (vendinfo.vend_id = public.getvendid(new.vendor_number)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO purchaseordercomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'P'::text, public.getpoheadid((new.order_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO quote DO INSTEAD INSERT INTO public.quhead (quhead_number, quhead_cust_id, quhead_custponumber, quhead_quotedate, quhead_warehous_id, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_salesrep_id, quhead_terms_id, quhead_fob, quhead_shipvia, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_freight, quhead_misc, quhead_ordercomments, quhead_shipcomments, quhead_shiptophone, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_misc_accnt_id, quhead_misc_descrip, quhead_commission, quhead_packdate, quhead_prj_id, quhead_billtocountry, quhead_shiptocountry, quhead_curr_id, quhead_taxzone_id, quhead_taxtype_id, quhead_imported, quhead_expire, quhead_status, quhead_saletype_id, quhead_shipzone_id) VALUES (new.quote_number, public.getcustid(new.customer_number, true), new.cust_po_number, new.quote_date, public.getwarehousid(new.site, 'SHIPPING'::text), public.getshiptoid(new.customer_number, new.shipto_number), new.shipto_name, new.shipto_address1, new.shipto_address2, new.shipto_address3, public.getsalesrepid(new.sales_rep), public.gettermsid(new.terms), new.fob, new.ship_via, new.shipto_city, new.shipto_state, new.shipto_postal_code, new.freight, new.misc_charge, new.order_notes, new.shipping_notes, new.shipto_phone, new.billto_name, new.billto_address1, new.billto_address2, new.billto_address3, new.billto_city, new.billto_state, new.billto_postal_code, public.getglaccntid(new.misc_account_number), new.misc_charge_description, new.commission, new.pack_date, public.getprjid(new.project_number), new.billto_country, new.shipto_country, public.getcurrid((new.currency)::text), public.gettaxzoneid(new.tax_zone), public.gettaxtypeid(new.tax_type), true, new.expire_date, CASE WHEN (new.status = 'Converted'::text) THEN 'C'::text ELSE 'O'::text END, public.getsaletypeid(new.sale_type), public.getshipzoneid(new.shipto_shipzone)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO quotecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'Q'::text, public.getquoteid(new.quote_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO quoteline DO INSTEAD INSERT INTO public.quitem (quitem_quhead_id, quitem_linenumber, quitem_itemsite_id, quitem_scheddate, quitem_qtyord, quitem_unitcost, quitem_price, quitem_custprice, quitem_memo, quitem_imported, quitem_custpn, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_taxtype_id, quitem_qty_uom_id, quitem_qty_invuomratio, quitem_price_uom_id, quitem_price_invuomratio) SELECT public.getquoteid(new.quote_number) AS getquoteid, COALESCE(new.line_number, (SELECT (COALESCE(max(quitem.quitem_linenumber), 0) + 1) FROM public.quitem WHERE (quitem.quitem_quhead_id = public.getquoteid(new.quote_number)))) AS "coalesce", itemsite.itemsite_id, COALESCE(new.scheduled_date, (SELECT min(quitem.quitem_scheddate) AS min FROM public.quitem WHERE (quitem.quitem_quhead_id = public.getquoteid(new.quote_number)))) AS "coalesce", new.qty_ordered, public.stdcost(item.item_id) AS stdcost, COALESCE(new.net_unit_price, public.itemprice(public.getitemid(new.item_number), quhead.quhead_cust_id, quhead.quhead_shipto_id, new.qty_ordered, quhead.quhead_curr_id, quhead.quhead_quotedate)) AS "coalesce", public.itemprice(public.getitemid(new.item_number), quhead.quhead_cust_id, quhead.quhead_shipto_id, new.qty_ordered, quhead.quhead_curr_id, quhead.quhead_quotedate) AS itemprice, COALESCE(new.notes, ''::text) AS "coalesce", true AS bool, new.customer_pn, COALESCE(new.create_order, false) AS "coalesce", COALESCE(public.getwarehousid(new.supplying_site, 'SHIPPING'::text), itemsite.itemsite_warehous_id) AS "coalesce", public.getitemid(new.item_number) AS getitemid, COALESCE(new.overwrite_po_price, (0)::numeric) AS "coalesce", COALESCE(public.gettaxtypeid(new.tax_type), public.getitemtaxtype(itemsite.itemsite_item_id, quhead.quhead_taxzone_id)) AS "coalesce", COALESCE(public.getuomid(new.qty_uom), item.item_inv_uom_id) AS "coalesce", public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.qty_uom), item.item_inv_uom_id), item.item_inv_uom_id) AS itemuomtouomratio, COALESCE(public.getuomid(new.price_uom), item.item_price_uom_id) AS "coalesce", public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.price_uom), item.item_price_uom_id), item.item_price_uom_id) AS itemuomtouomratio FROM public.quhead, public.itemsite, public.item, public.whsinfo WHERE ((quhead.quhead_number = new.quote_number) AND (((((((itemsite.itemsite_warehous_id = whsinfo.warehous_id) AND (itemsite.itemsite_item_id = item.item_id)) AND itemsite.itemsite_active) AND (item.item_number = new.item_number)) AND whsinfo.warehous_active) AND whsinfo.warehous_shipping) AND (whsinfo.warehous_code = COALESCE(new.sold_from_site, (SELECT whsinfo.warehous_code FROM public.usrpref, public.whsinfo WHERE (((usrpref.usrpref_username = public.geteffectivextuser()) AND (usrpref.usrpref_name = 'PreferredWarehouse'::text)) AND (whsinfo.warehous_id = (usrpref.usrpref_value)::integer))))))); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO quotelinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('QI'::text, quitem.quitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.quhead, public.quitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((quhead.quhead_number = new.quote_number) AND (quhead.quhead_id = quitem.quitem_quhead_id)) AND (quitem.quitem_linenumber = new.line_number)) AND (quitem.quitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = new.characteristic)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO quotelinecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'QI'::text, public.getquotelineitemid(new.quote_number, new.line_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO salescredit DO INSTEAD INSERT INTO public.aropenalloc (aropenalloc_aropen_id, aropenalloc_doctype, aropenalloc_doc_id, aropenalloc_amount, aropenalloc_curr_id) VALUES (public.getaropenid(new.customer_number, 'C'::bpchar, new.cm_number), 'S'::bpchar, public.getcoheadid(new.so_number), new.amount, public.getcurrid((new.currency)::text)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO saleshistory DO INSTEAD INSERT INTO public.cohist (cohist_cust_id, cohist_itemsite_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_orderdate, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_shipto_id, cohist_salesrep_id, cohist_duedate, cohist_imported, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_commission, cohist_commissionpaid, cohist_unitcost, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_doctype, cohist_promisedate, cohist_ponumber, cohist_curr_id, cohist_sequence, cohist_taxzone_id, cohist_taxtype_id) VALUES (public.getcustid(new.customer_number), public.getitemsiteid(new.site_code, new.item_number), new.ship_date, new.ship_via, new.order_number, new.order_date, new.invoice_number, new.invoice_date, new.quantity_shipped, COALESCE(new.unit_price, (0)::numeric), public.getshiptoid(new.customer_number, new.shipto_number), public.getsalesrepid(new.sales_rep), new.due_date, true, new.billto_name, new.billto_address1, new.billto_address2, new.billto_address3, new.billto_city, new.billto_state, new.billto_zip, new.shipto_name, new.shipto_address1, new.shipto_address2, new.shipto_address3, new.shipto_city, new.shipto_state, new.shipto_zip, COALESCE(new.commission, (0)::numeric), COALESCE(new.commission_paid, false), COALESCE(new.unit_cost, (0)::numeric), CASE WHEN (new.misc_type = 'Misc. Charge'::text) THEN 'M'::text WHEN (new.misc_type = 'Freight'::text) THEN 'F'::text ELSE NULL::text END, new.misc_description, CASE WHEN (new.misc_type = 'Misc. Charge'::text) THEN public.getglaccntid(new.misc_info) ELSE NULL::integer END, CASE WHEN (new.document_type = 'Invoice'::text) THEN 'I'::text WHEN (new.document_type = 'Credit Memo'::text) THEN 'C'::text ELSE NULL::text END, new.promise_date, new.purchase_order_number, COALESCE(public.getcurrid((new.currency)::text), public.basecurrid()), new.gl_sequence, public.gettaxzoneid(new.tax_zone), public.gettaxtypeid(new.tax_type)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO saleslinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('SI'::text, coitem.coitem_id, charass.charass_char_id, new.value, public.itemcharprice(item.item_id, "char".char_id, new.value, cohead.cohead_cust_id, cohead.cohead_shipto_id, coitem.coitem_qtyord, cohead.cohead_curr_id, cohead.cohead_orderdate)) AS updatecharassignment FROM public.cohead, public.coitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((cohead.cohead_number = (new.order_number)::text) AND (cohead.cohead_id = coitem.coitem_cohead_id)) AND (coitem.coitem_id = public.getcoitemid((new.order_number)::text, new.line_number))) AND (coitem.coitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = new.characteristic)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO saleslinecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'SI'::text, public.getcoitemid((new.order_number)::text, new.line_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO salesorder DO INSTEAD INSERT INTO public.cohead (cohead_number, cohead_cust_id, cohead_custponumber, cohead_orderdate, cohead_warehous_id, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_salesrep_id, cohead_terms_id, cohead_fob, cohead_shipvia, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_freight, cohead_calcfreight, cohead_misc, cohead_imported, cohead_ordercomments, cohead_shipcomments, cohead_shiptophone, cohead_shipchrg_id, cohead_shipform_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_misc_accnt_id, cohead_misc_descrip, cohead_commission, cohead_holdtype, cohead_packdate, cohead_prj_id, cohead_shipcomplete, cohead_billtocountry, cohead_shiptocountry, cohead_curr_id, cohead_taxzone_id, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_saletype_id, cohead_shipzone_id) SELECT new.order_number, public.getcustid(new.customer_number) AS getcustid, new.cust_po_number, new.order_date, public.getwarehousid(new.site, 'SHIPPING'::text) AS getwarehousid, public.getshiptoid(new.customer_number, new.shipto_number) AS getshiptoid, new.shipto_name, new.shipto_address1, new.shipto_address2, new.shipto_address3, public.getsalesrepid(new.sales_rep) AS getsalesrepid, public.gettermsid(new.terms) AS gettermsid, new.fob, new.ship_via, new.shipto_city, new.shipto_state, new.shipto_postal_code, CASE WHEN COALESCE(new.calculate_freight, public.fetchmetricbool('CalculateFreight'::text)) THEN (0)::numeric ELSE new.freight END AS freight, COALESCE(new.calculate_freight, public.fetchmetricbool('CalculateFreight'::text)) AS "coalesce", new.misc_charge, true AS bool, new.order_notes, new.shipping_notes, new.shipto_phone, public.getshipchrgid(new.shipping_chgs) AS getshipchrgid, public.getshipformid(new.shipping_form) AS getshipformid, new.billto_name, new.billto_address1, new.billto_address2, new.billto_address3, new.billto_city, new.billto_state, new.billto_postal_code, public.getglaccntid(new.misc_account_number) AS getglaccntid, new.misc_charge_description, new.commission, CASE WHEN (new.hold_type = 'Credit'::text) THEN 'C'::text WHEN (new.hold_type = 'Shipping'::text) THEN 'S'::text WHEN (new.hold_type = 'Packing'::text) THEN 'P'::text ELSE 'N'::text END AS "case", new.pack_date, public.getprjid(new.project_number) AS getprjid, new.ship_complete, new.billto_country, new.shipto_country, public.getcurrid((new.currency)::text) AS getcurrid, CASE WHEN (new.tax_zone = 'None'::text) THEN (-1) ELSE public.gettaxzoneid(new.tax_zone) END AS gettaxzoneid, public.getcntctid(new.shipto_contact_number) AS getcntctid, new.shipto_contact_honorific, new.shipto_contact_first, new.shipto_contact_middle, new.shipto_contact_last, new.shipto_contact_suffix, new.shipto_contact_phone, new.shipto_contact_title, new.shipto_contact_fax, new.shipto_contact_email, public.getcntctid(new.billto_contact_number) AS getcntctid, new.billto_contact_name, new.billto_contact_first, new.billto_contact_middle, new.billto_contact_last, new.billto_contact_suffix, new.billto_contact_phone, new.billto_contact_title, new.billto_contct_fax, new.billto_contact_email, public.getsaletypeid(new.sale_type) AS getsaletypeid, public.getshipzoneid(new.shipto_shipzone) AS getshipzoneid FROM public.custinfo WHERE (custinfo.cust_number = new.customer_number); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO salesordercomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'S'::text, public.getsalesorderid((new.order_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO salesrep DO INSTEAD INSERT INTO public.salesrep (salesrep_active, salesrep_number, salesrep_name, salesrep_commission, salesrep_method, salesrep_emp_id) VALUES (COALESCE(new.active, true), COALESCE(new.number, ''::character varying), COALESCE(new.name, ''::text), COALESCE((new.commission_percent * 0.01), (0)::numeric), ''::bpchar, public.getempid(new.employee)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO site DO INSTEAD INSERT INTO public.whsinfo (warehous_code, warehous_descrip, warehous_fob, warehous_active, warehous_counttag_prefix, warehous_counttag_number, warehous_bol_prefix, warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, warehous_aislesize, warehous_aislealpha, warehous_racksize, warehous_rackalpha, warehous_binsize, warehous_binalpha, warehous_locationsize, warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, warehous_shipping_commission, warehous_cntct_id, warehous_addr_id, warehous_taxzone_id, warehous_transit, warehous_shipform_id, warehous_shipvia_id, warehous_shipcomments, warehous_costcat_id, warehous_sitetype_id, warehous_sequence) VALUES (COALESCE(new.code, ''::character varying), COALESCE(new.description, ''::text), CASE WHEN new.inventory_type THEN COALESCE(new.default_fob, ''::text) ELSE ''::text END, COALESCE(new.active, true), CASE WHEN new.inventory_type THEN COALESCE(new.next_count_tag_prefix, ''::text) ELSE ''::text END, CASE WHEN new.inventory_type THEN COALESCE(new.next_count_tag_number, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.next_bill_of_lading_prefix, ''::text) ELSE ''::text END, CASE WHEN new.inventory_type THEN COALESCE(new.next_bill_of_lading_number, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.shipping_site, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.force_the_use_of_count_slips, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.force_the_use_of_zones, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.aisle_size, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.aisle_allow_alpha_characters, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.rack_size, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.rack_allow_alpha_characters, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.bin_size, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.bin_allow_alpha_characters, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.location_size, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.location_allow_alpha_characters, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.enforce_arbl_naming_convention, false) ELSE false END, COALESCE(public.getglaccntid(new.post_unassigned_transactions_to), (-1)), CASE WHEN new.inventory_type THEN COALESCE((new.shipping_commission * 0.01), (0)::numeric) ELSE (0)::numeric END, public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), CASE WHEN new.inventory_type THEN COALESCE(public.gettaxzoneid(new.tax_zone), (-1)) ELSE NULL::integer END, CASE WHEN new.inventory_type THEN false WHEN new.transit_type THEN true ELSE false END, CASE WHEN new.transit_type THEN COALESCE((public.getshipformid(new.default_shipping_form))::numeric, public.fetchmetricvalue('DefaultShipFormId'::text)) ELSE NULL::numeric END, CASE WHEN new.transit_type THEN COALESCE((public.getshipviaid(new.default_ship_via))::numeric, public.fetchmetricvalue('DefaultShipViaId'::text)) ELSE NULL::numeric END, CASE WHEN new.transit_type THEN COALESCE(new.shipping_comments, ''::text) ELSE ''::text END, CASE WHEN new.transit_type THEN COALESCE(public.getcostcatid(new.default_cost_category), (-1)) ELSE NULL::integer END, COALESCE(public.getsitetypeid(new.type), (-1)), COALESCE(new.scheduling_sequence, 0)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO sitezone DO INSTEAD INSERT INTO public.whsezone (whsezone_warehous_id, whsezone_name, whsezone_descrip) VALUES (public.getwarehousid((new.site)::text, 'ACTIVE'::text), COALESCE(new.name, ''::character varying), COALESCE(new.description, ''::text)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO task DO INSTEAD INSERT INTO public.prjtask (prjtask_prj_id, prjtask_number, prjtask_name, prjtask_descrip, prjtask_owner_username, prjtask_username, prjtask_hours_budget, prjtask_hours_actual, prjtask_exp_budget, prjtask_exp_actual, prjtask_status, prjtask_due_date, prjtask_assigned_date, prjtask_start_date, prjtask_completed_date) VALUES (public.getprjid(new.project_number), new.number, COALESCE(new.name, ''::text), COALESCE(new.description, ''::text), COALESCE(new.owner, public.geteffectivextuser()), COALESCE(new.assigned_to, public.geteffectivextuser()), COALESCE(new.hours_budgeted, (0)::numeric), COALESCE(new.hours_actual, (0)::numeric), COALESCE(new.expenses_budgeted, (0)::numeric), COALESCE(new.expenses_actual, (0)::numeric), CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, new.due, new.assigned, new.started, new.completed); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO taskcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'TA'::text, public.getprjtaskid((new.project_number)::text, (new.task_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO todo DO INSTEAD SELECT public.createtodoitem(NULL::integer, new.assigned_to, COALESCE(new.task_name, ''::text), COALESCE(new.description, ''::text), public.getincidentid(new.incident), COALESCE(public.getincdtcrmacctid(new.incident), public.getcrmacctid(new.account)), public.getopheadid(new.opportunity), CASE WHEN (new.date_started > ''::text) THEN (new.date_started)::date ELSE NULL::date END, CASE WHEN (new.date_due > ''::text) THEN (new.date_due)::date ELSE NULL::date END, (CASE WHEN (new.status = 'Pending Input'::text) THEN 'P'::text WHEN (new.status = 'Deferred'::text) THEN 'D'::text ELSE 'N'::text END)::bpchar, CASE WHEN (new.date_assigned > ''::text) THEN (new.date_assigned)::date ELSE NULL::date END, CASE WHEN (new.date_completed > ''::text) THEN (new.date_completed)::date ELSE NULL::date END, public.getincdtpriorityid(new.priority), COALESCE(new.notes, ''::text), new.owner) AS createtodoitem; -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO vendor DO INSTEAD INSERT INTO public.vendinfo (vend_name, vend_lastpurchdate, vend_active, vend_po, vend_comments, vend_pocomments, vend_number, vend_1099, vend_exported, vend_fobsource, vend_fob, vend_terms_id, vend_shipvia, vend_vendtype_id, vend_qualified, vend_ediemail, vend_ediemailbody, vend_edisubject, vend_edifilename, vend_accntnum, vend_emailpodelivery, vend_restrictpurch, vend_edicc, vend_curr_id, vend_cntct1_id, vend_cntct2_id, vend_addr_id, vend_match, vend_taxzone_id, vend_ach_routingnumber, vend_ach_accntnumber, vend_accnt_id, vend_expcat_id, vend_tax_id) VALUES (COALESCE(new.vendor_name, ''::text), NULL::date, COALESCE(new.active, true), COALESCE(new.sells_purchase_order_items, false), COALESCE(new.notes, ''::text), COALESCE(new.po_comments, ''::text), COALESCE(new.vendor_number, ''::character varying), COALESCE(new.receives_1099, false), false, CASE WHEN (new.default_fob = 'Receiving Site'::text) THEN 'W'::text ELSE 'V'::text END, CASE WHEN (new.default_fob = 'Receiving Site'::text) THEN ''::text ELSE new.default_fob END, COALESCE((public.gettermsid(new.default_terms))::numeric, public.fetchmetricvalue('DefaultTerms'::text)), COALESCE(new.ship_via, public.fetchdefaultshipvia()), public.getvendtypeid(new.vendor_type), COALESCE(new.qualified, false), COALESCE(new.po_edi_email, ''::text), COALESCE(new.po_edi_emailbody, ''::text), COALESCE(new.po_edi_subject, ''::text), COALESCE(new.po_edi_filename, ''::text), COALESCE(new.account_number, ''::text), COALESCE(new.allow_email_po_delivery, false), COALESCE(new.may_only_sell_item_source, false), COALESCE(new.po_edi_cc, ''::text), COALESCE(public.getcurrid((new.default_currency)::text), public.basecurrid()), public.savecntct(public.getcntctid(new.contact1_number), new.contact1_number, NULL::integer, new.contact1_honorific, new.contact1_first, new.contact1_middle, new.contact1_last, new.contact1_suffix, new.contact1_voice, new.contact1_alternate, new.contact1_fax, new.contact1_email, new.contact1_web, new.contact1_job_title, new.contact1_change), public.savecntct(public.getcntctid(new.contact2_number), new.contact2_number, NULL::integer, new.contact2_honorific, new.contact2_first, new.contact2_middle, new.contact2_last, new.contact2_suffix, new.contact2_voice, new.contact2_alternate, new.contact2_fax, new.contact2_email, new.contact2_web, new.contact2_job_title, new.contact2_change), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), COALESCE(new.matching_vo_po_amounts, false), public.gettaxzoneid(new.default_tax_zone), ''::bytea, ''::bytea, COALESCE(public.getglaccntid(new.default_dist_gl_account), (-1)), COALESCE(public.getexpcatid(new.default_dist_expense_category), (-1)), COALESCE(public.gettaxid(new.default_dist_tax_code), (-1))); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO vendoraddress DO INSTEAD INSERT INTO public.vendaddrinfo (vendaddr_vend_id, vendaddr_code, vendaddr_name, vendaddr_comments, vendaddr_cntct_id, vendaddr_addr_id) VALUES (public.getvendid((new.vendor_number)::text), COALESCE(new.vendor_address_number, ''::character varying), COALESCE(new.vendor_address_name, ''::text), COALESCE(new.notes, ''::text), public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change)); -- -- Name: _INSERT; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO vendortype DO INSTEAD INSERT INTO public.vendtype (vendtype_code, vendtype_descrip) VALUES (new.code, COALESCE(new.description, ''::text)); -- -- Name: _INSERT_CHAR; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_INSERT_CHAR" AS ON INSERT TO purchaseline DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT 'PI', poitem.poitem_id, "char".char_id, charass.charass_value FROM public.pohead, public.poitem, public.charass, public."char", public.itemsite, public.item WHERE (((((((((pohead.pohead_number = (new.order_number)::text) AND (poitem.poitem_pohead_id = pohead.pohead_id)) AND (poitem.poitem_linenumber = new.line_number)) AND (itemsite.itemsite_id = poitem.poitem_itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND charass.charass_default) AND ("char".char_id = charass.charass_char_id)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO salesline DO INSTEAD UPDATE public.coitem SET coitem_status = new.status, coitem_scheddate = new.scheduled_date, coitem_promdate = new.promise_date, coitem_qtyord = new.qty_ordered, coitem_qty_uom_id = public.getuomid(new.qty_uom), coitem_qty_invuomratio = public.itemuomtouomratio(item.item_id, public.getuomid(new.qty_uom), item.item_inv_uom_id), coitem_price = new.net_unit_price, coitem_price_uom_id = public.getuomid(new.price_uom), coitem_price_invuomratio = public.itemuomtouomratio(item.item_id, public.getuomid(new.price_uom), item.item_price_uom_id), coitem_memo = new.notes, coitem_order_type = CASE WHEN (((NOT old.create_order) AND new.create_order) AND (item.item_type = 'M'::bpchar)) THEN 'W'::text WHEN ((((NOT old.create_order) AND new.create_order) AND (item.item_type = 'P'::bpchar)) AND itemsite.itemsite_createsopo) THEN 'P'::text WHEN (((NOT old.create_order) AND new.create_order) AND (item.item_type = 'P'::bpchar)) THEN 'R'::text ELSE NULL::text END, coitem_substitute_item_id = public.getitemid(new.substitute_for), coitem_prcost = new.overwrite_po_price, coitem_taxtype_id = CASE WHEN (new.tax_type = 'None'::text) THEN NULL::integer ELSE public.gettaxtypeid(new.tax_type) END, coitem_warranty = new.warranty, coitem_cos_accnt_id = public.getglaccntid(new.alternate_cos_account), coitem_rev_accnt_id = public.getglaccntid(new.alternate_rev_account) FROM (public.item JOIN public.itemsite ON ((item.item_id = itemsite.itemsite_item_id))) WHERE ((((item.item_number = old.item_number) AND (coitem.coitem_cohead_id = public.getcoheadid((old.order_number)::text))) AND (coitem.coitem_id = public.getcoitemid((old.order_number)::text, (old.line_number)::text))) AND (coitem.coitem_subnumber = 0)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO apmemo DO INSTEAD UPDATE public.apopen SET apopen_duedate = new.due_date, apopen_terms_id = public.gettermsid(new.terms), apopen_amount = new.amount, apopen_notes = new.notes WHERE ((apopen.apopen_docnumber = old.document_number) AND ((apopen.apopen_doctype)::text = CASE WHEN (old.document_type = 'Credit Memo'::text) THEN 'C'::text WHEN (old.document_type = 'Debit Memo'::text) THEN 'D'::text ELSE ''::text END)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO armemo DO INSTEAD UPDATE public.aropen SET aropen_duedate = new.due_date, aropen_terms_id = public.gettermsid(new.terms), aropen_salesrep_id = public.getsalesrepid(new.sales_rep), aropen_amount = new.amount, aropen_commission_due = new.commission_due, aropen_notes = new.notes, aropen_rsncode_id = public.getrsnid(new.reason_code) WHERE ((aropen.aropen_docnumber = old.document_number) AND ((aropen.aropen_doctype)::text = CASE WHEN (old.document_type = 'Credit Memo'::text) THEN 'C'::text WHEN (old.document_type = 'Debit Memo'::text) THEN 'D'::text ELSE ''::text END)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO physinvcount DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO account DO INSTEAD UPDATE public.crmacct SET crmacct_number = new.account_number, crmacct_parent_id = public.getcrmacctid(new.parent_account), crmacct_name = new.account_name, crmacct_active = new.active, crmacct_type = CASE WHEN (new.type = 'Individual'::text) THEN 'I'::text ELSE 'O'::text END, crmacct_cntct_id_1 = public.savecntct(public.getcntctid(new.primary_contact_number), new.primary_contact_number, public.saveaddr(public.getaddrid(new.primary_contact_address_number), new.primary_contact_address_number, new.primary_contact_address1, new.primary_contact_address2, new.primary_contact_address3, new.primary_contact_city, new.primary_contact_state, new.primary_contact_postalcode, new.primary_contact_country, new.primary_contact_address_change), new.primary_contact_honorific, new.primary_contact_first, new.primary_contact_middle, new.primary_contact_last, new.primary_contact_suffix, new.primary_contact_voice, NULL::text, new.primary_contact_fax, new.primary_contact_email, NULL::text, new.primary_contact_job_title, new.primary_contact_change), crmacct_cntct_id_2 = public.savecntct(public.getcntctid(new.secondary_contact_number), new.secondary_contact_number, public.saveaddr(public.getaddrid(new.secondary_contact_address_number), new.secondary_contact_address_number, new.secondary_contact_address1, new.secondary_contact_address2, new.secondary_contact_address3, new.secondary_contact_city, new.secondary_contact_state, new.secondary_contact_postalcode, new.secondary_contact_country, new.secondary_contact_address_change), new.secondary_contact_honorific, new.secondary_contact_first, new.secondary_contact_middle, new.secondary_contact_last, new.secondary_contact_suffix, new.secondary_contact_voice, NULL::text, new.secondary_contact_fax, new.secondary_contact_email, NULL::text, new.secondary_contact_job_title, new.secondary_contact_change), crmacct_notes = new.notes WHERE (crmacct.crmacct_number = (old.account_number)::text); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO accountchar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'CRMACCT'::text) AND (charass.charass_target_id = public.getcrmacctid((old.account_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CRMACCT'::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO accountcomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO accountfile DO INSTEAD UPDATE public.url SET url_title = new.title, url_url = new.url WHERE ((((url.url_source_id = public.getcrmacctid(old.account_number)) AND (url.url_source = 'CRMA'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO accountimage DO INSTEAD UPDATE public.imageass SET imageass_image_id = public.getimageid(new.image_name) WHERE (((imageass.imageass_source_id = public.getcrmacctid(old.account_number)) AND (imageass.imageass_source = 'CRMA'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO address DO INSTEAD SELECT public.saveaddr(public.getaddrid((new.address_number)::text), (new.address_number)::text, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.active, new.notes, new.change) AS saveaddr; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO addresschar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'ADDR'::text) AND (charass.charass_target_id = public.getaddrid((old.address_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'ADDR'::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO addresscomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO bom DO INSTEAD SELECT public.savebomhead(public.getitemid((new.item_number)::text), (new.revision)::text, new.revision_date, new.document_number, COALESCE(new.batch_size, (0)::numeric), new.total_qty_per) AS savebomhead; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO bomitem DO INSTEAD UPDATE public.bomitem SET bomitem_issuemethod = CASE WHEN (new.issue_method = 'Mixed'::text) THEN 'M'::text WHEN (new.issue_method = 'Push'::text) THEN 'S'::text WHEN (new.issue_method = 'Pull'::text) THEN 'L'::text ELSE NULL::text END, bomitem_uom_id = public.getuomid(new.issue_uom), bomitem_qtyper = new.qty_per, bomitem_scrap = new.scrap, bomitem_effective = CASE WHEN (new.effective = 'Always'::text) THEN public.startoftime() ELSE (new.effective)::date END, bomitem_expires = CASE WHEN (new.expires = 'Never'::text) THEN public.endoftime() ELSE (new.expires)::date END, bomitem_createwo = new.create_child_wo, bomitem_booitem_seq_id = COALESCE(public.getbooitemseqid((new.bom_item_number)::text, new.used_at), (-1)), bomitem_schedatwooper = new.schedule_at_wo_operation, bomitem_ecn = new.ecn_number, bomitem_subtype = CASE WHEN (new.substitutions = 'No'::text) THEN 'N'::text WHEN (new.substitutions = 'Item-Defined'::text) THEN 'I'::text WHEN (new.substitutions = 'BOM-Defined'::text) THEN 'B'::text ELSE NULL::text END, bomitem_rev_id = public.getrevid('BOM'::text, (new.bom_item_number)::text, (new.bom_revision)::text), bomitem_char_id = public.getcharid(new.characteristic, 'I'::text), bomitem_value = new.value, bomitem_notes = new.notes, bomitem_ref = new.reference WHERE (bomitem.bomitem_id = old.id); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO bomitemcomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO bomitemsubstitute DO INSTEAD UPDATE public.bomitemsub SET bomitemsub_uomratio = new.sub_parent_uom_ratio, bomitemsub_rank = new.ranking WHERE ((bomitemsub.bomitemsub_bomitem_id = old.bomitem_id) AND (bomitemsub.bomitemsub_item_id = public.getitemid((old.substitute_item_number)::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO budget DO INSTEAD UPDATE public.budghead SET budghead_name = new.name, budghead_descrip = new.description WHERE (budghead.budghead_name = old.name); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO budgetentry DO INSTEAD UPDATE public.budgitem SET budgitem_amount = new.amount WHERE (((budgitem.budgitem_budghead_id = public.getbudgheadid(old.name)) AND (budgitem.budgitem_period_id = public.getperiodid(old.period_start))) AND (budgitem.budgitem_accnt_id = public.getglaccntid(old.account))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO cashreceipt DO INSTEAD UPDATE public.cashrcpt SET cashrcpt_amount = new.amount_received, cashrcpt_fundstype = CASE WHEN ((new.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((new.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((new.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((new.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((new.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((new.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((new.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((new.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((new.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, cashrcpt_docnumber = new.check_document_number, cashrcpt_bankaccnt_id = public.getbankaccntid(new.post_to), cashrcpt_notes = new.notes, cashrcpt_distdate = CASE WHEN (new.distribution_date > ''::text) THEN (new.distribution_date)::date ELSE NULL::date END, cashrcpt_salescat_id = public.getsalescatid(new.sales_category), cashrcpt_curr_id = public.getcurrid((new.currency)::text), cashrcpt_usecustdeposit = CASE WHEN (new.apply_balance_as = 'Customer Deposit'::text) THEN true ELSE false END WHERE (cashrcpt.cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO cashreceiptapply DO INSTEAD UPDATE public.cashrcptitem SET cashrcptitem_amount = new.amount_to_apply, cashrcptitem_discount = new.cashrcptitem_discount WHERE ((cashrcptitem.cashrcptitem_cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)) AND (cashrcptitem.cashrcptitem_aropen_id = public.getaropenid((old.customer_number)::text, (old.doc_type)::bpchar, (old.doc_number)::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO cashreceiptapplymisc DO INSTEAD UPDATE public.cashrcptmisc SET cashrcptmisc_accnt_id = public.getglaccntid((new.account)::text), cashrcptmisc_amount = new.amount_to_distribute, cashrcptmisc_notes = new.notes WHERE ((cashrcptmisc.cashrcptmisc_cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)) AND (cashrcptmisc.cashrcptmisc_accnt_id = public.getglaccntid((old.account)::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO contact DO INSTEAD SELECT public.savecntct(public.getcntctid((new.contact_number)::text), (new.contact_number)::text, public.getcrmacctid(new.crm_account), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), new.honorific, new.first, new.middle, new.last, new.suffix, new.initials, new.active, new.voice, new.alternate, new.fax, new.email, new.web, new.notes, new.job_title, new.contact_change) AS savecntct; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO contactchar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'CNTCT'::text) AND (charass.charass_target_id = public.getcntctid(old.contact_number))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CNTCT'::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO contactcomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO creditmemo DO INSTEAD UPDATE public.cmhead SET cmhead_custponumber = new.customer_po_number, cmhead_docdate = new.memo_date, cmhead_shipto_id = COALESCE(public.getshiptoid(new.customer_number, new.shipto_number), (-1)), cmhead_shipto_name = new.shipto_name, cmhead_shipto_address1 = new.shipto_address1, cmhead_shipto_address2 = new.shipto_address2, cmhead_shipto_address3 = new.shipto_address3, cmhead_shipto_city = new.shipto_city, cmhead_shipto_state = new.shipto_state, cmhead_shipto_zipcode = new.shipto_postal_code, cmhead_shipto_country = new.shipto_country, cmhead_salesrep_id = public.getsalesrepid(new.sales_rep), cmhead_freight = COALESCE(new.freight, (0)::numeric), cmhead_misc = COALESCE(new.misc_charge_amount, (0)::numeric), cmhead_comments = new.notes, cmhead_billtoname = new.billto_name, cmhead_billtoaddress1 = new.billto_address1, cmhead_billtoaddress2 = new.billto_address2, cmhead_billtoaddress3 = new.billto_address3, cmhead_billtocity = new.billto_city, cmhead_billtostate = new.billto_state, cmhead_billtozip = new.billto_postal_code, cmhead_billtocountry = new.billto_country, cmhead_hold = COALESCE(new.on_hold, false), cmhead_commission = COALESCE(new.commission, (0)::numeric), cmhead_misc_accnt_id = COALESCE(public.getglaccntid(new.misc_charge_credit_account), (-1)), cmhead_misc_descrip = new.misc_charge_description, cmhead_rsncode_id = (SELECT rsncode.rsncode_id FROM public.rsncode WHERE (rsncode.rsncode_code = new.reason_code)), cmhead_curr_id = COALESCE(public.getcurrid((new.currency)::text), (-1)), cmhead_taxzone_id = public.gettaxzoneid(NULLIF(new.tax_zone, 'None'::text)) WHERE ((cmhead.cmhead_number = old.memo_number) AND (cmhead.cmhead_posted = false)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO creditmemoline DO INSTEAD SELECT public.updatecreditmemoline(new.*, old.*) AS updatecreditmemoline; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO custchar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'C'::text) AND (charass.charass_target_id = public.getcustid((old.customer_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'C'::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO custcomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO custcreditcard DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO customer DO INSTEAD UPDATE public.custinfo SET cust_active = new.active, cust_custtype_id = public.getcusttypeid(new.customer_type), cust_salesrep_id = public.getsalesrepid(new.sales_rep), cust_commprcnt = (new.commission * 0.01), cust_name = new.customer_name, cust_creditlmt = new.credit_limit, cust_creditrating = new.credit_rating, cust_backorder = new.accepts_backorders, cust_partialship = new.accepts_partial_shipments, cust_terms_id = public.gettermsid(new.default_terms), cust_discntprcnt = new.default_discount, cust_balmethod = CASE WHEN (new.balance_method = 'Balance Forward'::text) THEN 'B'::text WHEN (new.balance_method = 'Open Items'::text) THEN 'O'::text ELSE NULL::text END, cust_ffshipto = new.allow_free_form_shipto, cust_shipform_id = public.getshipformid(new.ship_form), cust_shipvia = new.ship_via, cust_blanketpos = new.uses_blanket_pos, cust_shipchrg_id = COALESCE(public.getshipchrgid(new.shipping_charges), (-1)), cust_creditstatus = CASE WHEN (new.credit_status = 'On Credit Warning'::text) THEN 'W'::text WHEN (new.credit_status = 'On Credit Hold'::text) THEN 'H'::text ELSE 'G'::text END, cust_comments = new.notes, cust_ffbillto = new.allow_free_form_billto, cust_usespos = new.uses_purchase_orders, cust_number = new.customer_number, cust_autoupdatestatus = new.credit_status_exceed_warn, cust_autoholdorders = new.credit_status_exceed_hold, cust_preferred_warehous_id = COALESCE(public.getwarehousid(new.preferred_selling_site, 'ACTIVE'::text), (-1)), cust_curr_id = public.getcurrid((new.default_currency)::text), cust_creditlmt_curr_id = public.getcurrid((new.credit_limit_currency)::text), cust_cntct_id = public.savecntct(public.getcntctid(new.billing_contact_number, false), new.billing_contact_number, public.saveaddr(public.getaddrid(new.billing_contact_address_number), new.billing_contact_address_number, new.billing_contact_address1, new.billing_contact_address2, new.billing_contact_address3, new.billing_contact_city, new.billing_contact_state, new.billing_contact_postalcode, new.billing_contact_country, new.billing_contact_address_change), new.billing_contact_honorific, new.billing_contact_first, new.billing_contact_middle, new.billing_contact_last, new.billing_contact_suffix, new.billing_contact_voice, new.billing_contact_alternate, new.billing_contact_fax, new.billing_contact_email, new.billing_contact_web, new.billing_contact_job_title, new.billing_contact_change), cust_corrcntct_id = public.savecntct(public.getcntctid(new.correspond_contact_number, false), new.correspond_contact_number, public.saveaddr(public.getaddrid(new.correspond_contact_address_number), new.correspond_contact_address_number, new.correspond_contact_address1, new.correspond_contact_address2, new.correspond_contact_address3, new.correspond_contact_city, new.correspond_contact_state, new.correspond_contact_postalcode, new.correspond_contact_country, new.correspond_contact_address_change), new.correspond_contact_honorific, new.correspond_contact_first, new.correspond_contact_middle, new.correspond_contact_last, new.correspond_contact_suffix, new.correspond_contact_voice, new.correspond_contact_alternate, new.correspond_contact_fax, new.correspond_contact_email, new.correspond_contact_web, new.correspond_contact_job_title, new.correspond_contact_change), cust_taxzone_id = public.gettaxzoneid(new.default_tax_zone), cust_gracedays = CASE WHEN (COALESCE(new.alternate_grace_days, 0) > 0) THEN new.alternate_grace_days ELSE NULL::integer END WHERE (custinfo.cust_id = public.getcustid((old.customer_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO customertype DO INSTEAD UPDATE public.custtype SET custtype_code = new.code, custtype_descrip = new.description, custtype_char = new.enable_characteristics_profile WHERE (custtype.custtype_code = (old.code)::text); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO customertypechar DO INSTEAD UPDATE public.charass SET charass_value = new.value, charass_default = new.is_default WHERE (((charass.charass_target_type = 'CT'::text) AND (charass.charass_target_id = public.getcusttypeid((old.customer_type)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CT'::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO custshipto DO INSTEAD UPDATE public.shiptoinfo SET shipto_cust_id = public.getcustid((new.customer_number)::text), shipto_name = new.name, shipto_salesrep_id = public.getsalesrepid(new.sales_rep), shipto_comments = new.general_notes, shipto_shipcomments = new.shipping_notes, shipto_shipzone_id = public.getshipzoneid(new.zone), shipto_shipvia = new.ship_via, shipto_commission = (new.commission / (100)::numeric), shipto_shipform_id = public.getshipformid(new.ship_form), shipto_shipchrg_id = public.getshipchrgid(new.shipping_charges), shipto_active = new.active, shipto_default = new.default_flag, shipto_num = old.shipto_number, shipto_ediprofile_id = CASE WHEN (new.edi_profile = 'No EDI'::text) THEN (-1) WHEN (new.edi_profile = 'Use Customer Master'::text) THEN (-2) ELSE public.getediprofileid(new.edi_profile) END, shipto_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), shipto_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), shipto_taxzone_id = public.gettaxzoneid(new.tax_zone) WHERE (shiptoinfo.shipto_id = public.getshiptoid((old.customer_number)::text, (old.shipto_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO custtax DO INSTEAD UPDATE public.taxreg SET taxreg_number = new.registration_number WHERE (((taxreg.taxreg_rel_type = 'C'::bpchar) AND (taxreg.taxreg_rel_id = public.getcustid((old.customer_number)::text))) AND (taxreg.taxreg_taxauth_id = public.gettaxauthid((old.tax_authority)::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO employee DO INSTEAD UPDATE public.emp SET emp_code = new.code, emp_number = new.number, emp_active = new.active, emp_startdate = new.start_date, emp_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.honorific, new.first, new.middle, new.last, new.suffix, new.voice, new.alternate, new.fax, new.email, new.web, new.job_title, new.contact_change), emp_warehous_id = public.getwarehousid(new.site, 'ALL'::text), emp_mgr_emp_id = (SELECT emp.emp_id FROM public.emp WHERE (emp.emp_code = new.manager_code)), emp_wage_type = CASE WHEN (new.wage_type = 'Hourly'::text) THEN 'H'::text WHEN (new.wage_type = 'Salaried'::text) THEN 'S'::text ELSE NULL::text END, emp_wage = new.wage, emp_wage_curr_id = COALESCE(public.getcurrid((new.wage_currency)::text), public.basecurrid()), emp_wage_period = CASE WHEN (new.wage_period = 'Hour'::text) THEN 'H'::text WHEN (new.wage_period = 'Day'::text) THEN 'D'::text WHEN (new.wage_period = 'Week'::text) THEN 'W'::text WHEN (new.wage_period = 'Biweek'::text) THEN 'BW'::text WHEN (new.wage_period = 'Month'::text) THEN 'M'::text WHEN (new.wage_period = 'Year'::text) THEN 'Y'::text ELSE NULL::text END, emp_dept_id = public.getdeptid(new.department), emp_shift_id = public.getshiftid(new.shift), emp_image_id = public.getimageid(new.image), emp_extrate = new.rate, emp_extrate_period = CASE WHEN (new.billing_period = 'Hour'::text) THEN 'H'::text WHEN (new.billing_period = 'Day'::text) THEN 'D'::text WHEN (new.billing_period = 'Week'::text) THEN 'W'::text WHEN (new.billing_period = 'Biweek'::text) THEN 'BW'::text WHEN (new.billing_period = 'Month'::text) THEN 'M'::text WHEN (new.billing_period = 'Year'::text) THEN 'Y'::text ELSE NULL::text END, emp_notes = COALESCE(new.notes, ''::text) WHERE (emp.emp_code = (old.code)::text); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO employeechar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'EMP'::text) AND (charass.charass_target_id = public.getempid((old.employee_code)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'EMP'::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO employeecomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO extshipmaint DO INSTEAD UPDATE public.shipdata SET shipdata_cohead_number = new.so_number, shipdata_shiphead_number = new.shipment_number, shipdata_void_ind = new.void, shipdata_shipper = new.shipper, shipdata_billing_option = new.billing_option, shipdata_weight = new.weight, shipdata_base_freight = new.base_freight, shipdata_base_freight_curr_id = public.getcurrid((new.base_freight_currency)::text), shipdata_total_freight = new.total_freight, shipdata_total_freight_curr_id = public.getcurrid((new.total_freight_currency)::text), shipdata_package_type = new.package_type, shipdata_cosmisc_tracknum = new.tracking_number, shipdata_cosmisc_packnum_tracknum = new.package_tracking_number, shipdata_lastupdated = new.last_updated WHERE ((((shipdata.shipdata_cohead_number = (old.so_number)::text) AND (shipdata.shipdata_shiphead_number = (old.shipment_number)::text)) AND (shipdata.shipdata_shipper = (old.shipper)::text)) AND (shipdata.shipdata_cosmisc_packnum_tracknum = (old.package_tracking_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO freightpricingscheduleitem DO INSTEAD UPDATE public.ipsfreight SET ipsfreight_ipshead_id = public.getipsheadid((old.pricing_schedule)::text), ipsfreight_qtybreak = new.qty_break, ipsfreight_price = new.price, ipsfreight_type = CASE WHEN (new.price_type = 'Flat Rate'::text) THEN 'F'::text WHEN (new.price_type = 'Price Per UOM'::text) THEN 'P'::text ELSE NULL::text END, ipsfreight_warehous_id = CASE WHEN (new.from_site = 'Any'::text) THEN NULL::integer ELSE public.getwarehousid(new.from_site, 'All'::text) END, ipsfreight_shipzone_id = CASE WHEN (new.to_shipzone = 'Any'::text) THEN NULL::integer ELSE public.getshipzoneid(new.to_shipzone) END, ipsfreight_freightclass_id = CASE WHEN (new.freight_class = 'Any'::text) THEN NULL::integer ELSE public.getfreightclassid(new.freight_class) END, ipsfreight_shipvia = CASE WHEN (new.ship_via = 'Any'::text) THEN NULL::text ELSE new.ship_via END WHERE (((((((((ipsfreight.ipsfreight_ipshead_id = public.getipsheadid((old.pricing_schedule)::text)) AND (ipsfreight.ipsfreight_qtybreak = old.qty_break)) AND (ipsfreight.ipsfreight_price = old.price)) AND ((ipsfreight.ipsfreight_type)::text = CASE WHEN (old.price_type = 'Flat Rate'::text) THEN 'F'::text WHEN (old.price_type = 'Price Per UOM'::text) THEN 'P'::text ELSE NULL::text END)) AND ((ipsfreight.ipsfreight_warehous_id IS NULL) AND (old.from_site = 'Any'::text))) OR ((ipsfreight.ipsfreight_warehous_id = CASE WHEN (old.from_site = 'Any'::text) THEN 0 ELSE public.getwarehousid(old.from_site, 'All'::text) END) AND ((ipsfreight.ipsfreight_shipzone_id IS NULL) AND (old.to_shipzone = 'Any'::text)))) OR ((ipsfreight.ipsfreight_shipzone_id = CASE WHEN (old.to_shipzone = 'Any'::text) THEN 0 ELSE public.getshipzoneid(old.to_shipzone) END) AND ((ipsfreight.ipsfreight_freightclass_id IS NULL) AND (old.freight_class = 'Any'::text)))) OR ((ipsfreight.ipsfreight_freightclass_id = CASE WHEN (old.freight_class = 'Any'::text) THEN 0 ELSE public.getfreightclassid(old.freight_class) END) AND ((ipsfreight.ipsfreight_shipvia IS NULL) AND (old.ship_via = 'Any'::text)))) OR (ipsfreight.ipsfreight_shipvia = old.ship_via)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO glaccount DO INSTEAD UPDATE public.accnt SET accnt_number = new.account_number, accnt_descrip = new.description, accnt_comments = new.notes, accnt_profit = new.profit_center, accnt_sub = new.sub_account, accnt_type = CASE WHEN (new.type = 'Asset'::text) THEN 'A'::text WHEN (new.type = 'Liability'::text) THEN 'L'::text WHEN (new.type = 'Expense'::text) THEN 'E'::text WHEN (new.type = 'Revenue'::text) THEN 'R'::text WHEN (new.type = 'Equity'::text) THEN 'Q'::text ELSE NULL::text END, accnt_extref = new.ext_reference, accnt_company = new.company, accnt_forwardupdate = new.forward_update_trial_balances, accnt_subaccnttype_code = new.sub_type WHERE (accnt.accnt_id = public.getglaccntid((old.company)::text, (old.profit_center)::text, (old.account_number)::text, (old.sub_account)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO incident DO INSTEAD UPDATE public.incdt SET incdt_crmacct_id = public.getcrmacctid(new.crm_account), incdt_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), incdt_descrip = new.notes, incdt_summary = new.description, incdt_item_id = public.getitemid(new.item_number), incdt_status = CASE WHEN (new.status = 'New'::text) THEN 'N'::text WHEN (new.status = 'Feedback'::text) THEN 'F'::text WHEN (new.status = 'Confirmed'::text) THEN 'C'::text WHEN (new.status = 'Assigned'::text) THEN 'A'::text WHEN (new.status = 'Resolved'::text) THEN 'R'::text WHEN (new.status = 'Closed'::text) THEN 'L'::text ELSE NULL::text END, incdt_assigned_username = new.assigned_to, incdt_incdtcat_id = public.getincdtcatid(new.category), incdt_incdtseverity_id = public.getincdtseverityid(new.severity), incdt_incdtpriority_id = public.getincdtpriorityid(new.priority), incdt_incdtresolution_id = public.getincdtresolutionid(new.resolution), incdt_lotserial = new.lot_serial_number, incdt_ls_id = public.getlotserialid(new.item_number, new.lot_serial_number) WHERE (incdt.incdt_id = public.getincidentid(old.incident_number)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO incidentchar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'INCDT'::text) AND (charass.charass_target_id = public.getincidentid(old.incident_number))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'INCDT'::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO incidentcomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO incidentfile DO INSTEAD UPDATE public.url SET url_title = new.title, url_url = new.url WHERE ((((url.url_source_id = public.getincidentid(old.incident_number)) AND (url.url_source = 'INCDT'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO incidentimage DO INSTEAD UPDATE public.imageass SET imageass_image_id = public.getimageid(new.image_name) WHERE (((imageass.imageass_source_id = public.getincidentid(old.incident_number)) AND (imageass.imageass_source = 'INCDT'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO invoice DO INSTEAD UPDATE public.invchead SET invchead_invcnumber = old.invoice_number, invchead_ordernumber = new.order_number, invchead_invcdate = new.invoice_date, invchead_shipdate = new.ship_date, invchead_orderdate = new.order_date, invchead_salesrep_id = public.getsalesrepid(new.sales_rep), invchead_commission = new.commission, invchead_taxzone_id = public.gettaxzoneid(NULLIF(new.tax_zone, 'None'::text)), invchead_terms_id = public.gettermsid(new.terms), invchead_cust_id = (SELECT public.getcustid(new.customer_number) AS getcustid), invchead_billto_name = new.billto_name, invchead_billto_address1 = new.billto_address1, invchead_billto_address2 = new.billto_address2, invchead_billto_address3 = new.billto_address3, invchead_billto_city = new.billto_city, invchead_billto_state = new.billto_state, invchead_billto_zipcode = new.billto_postal_code, invchead_billto_country = new.billto_country, invchead_billto_phone = new.billto_phone, invchead_shipto_id = COALESCE(public.getshiptoid(new.customer_number, new.shipto_number), (-1)), invchead_shipto_name = new.shipto_name, invchead_shipto_address1 = new.shipto_address1, invchead_shipto_address2 = new.shipto_address2, invchead_shipto_address3 = new.shipto_address3, invchead_shipto_city = new.shipto_city, invchead_shipto_state = new.shipto_state, invchead_shipto_zipcode = new.shipto_postal_code, invchead_shipto_country = new.shipto_country, invchead_shipto_phone = new.shipto_phone, invchead_ponumber = new.po_number, invchead_shipvia = new.ship_via, invchead_prj_id = COALESCE(public.getprjid(new.project_number), (-1)), invchead_fob = new.fob, invchead_misc_descrip = new.misc_charge_description, invchead_misc_amount = new.misc_charge, invchead_misc_accnt_id = COALESCE(public.getglaccntid(new.misc_charge_account_number), (-1)), invchead_freight = new.freight, invchead_curr_id = COALESCE(public.getcurrid((new.currency)::text), (-1)), invchead_payment = new.payment, invchead_notes = new.notes, invchead_saletype_id = public.getsaletypeid(new.sale_type), invchead_shipzone_id = public.getshipzoneid(new.shipto_shipzone) WHERE ((invchead.invchead_invcnumber = old.invoice_number) AND (invchead.invchead_posted = false)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO invoiceline DO INSTEAD SELECT public.updateinvoicelineitem(new.*, old.*) AS updateinvoicelineitem; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO item DO INSTEAD UPDATE public.item SET item_active = new.active, item_descrip1 = new.description1, item_descrip2 = new.description2, item_type = CASE WHEN (new.item_type = 'Purchased'::text) THEN 'P'::text WHEN (new.item_type = 'Manufactured'::text) THEN 'M'::text WHEN (new.item_type = 'Job'::text) THEN 'J'::text WHEN (new.item_type = 'Kit'::text) THEN 'K'::text WHEN (new.item_type = 'Phantom'::text) THEN 'F'::text WHEN (new.item_type = 'Reference'::text) THEN 'R'::text WHEN (new.item_type = 'Costing'::text) THEN 'S'::text WHEN (new.item_type = 'Tooling'::text) THEN 'T'::text WHEN (new.item_type = 'Outside Process'::text) THEN 'O'::text WHEN (new.item_type = 'Planning'::text) THEN 'L'::text WHEN (new.item_type = 'Breeder'::text) THEN 'B'::text WHEN (new.item_type = 'Co-Product'::text) THEN 'C'::text WHEN (new.item_type = 'By-Product'::text) THEN 'Y'::text ELSE NULL::text END, item_maxcost = new.maximum_desired_cost, item_classcode_id = public.getclasscodeid(new.class_code), item_inv_uom_id = public.getuomid(new.inventory_uom), item_picklist = new.pick_list_item, item_fractional = new.fractional, item_config = new.configured, item_sold = new.item_is_sold, item_prodcat_id = COALESCE(public.getprodcatid(new.product_category), (-1)), item_exclusive = new.exclusive, item_listprice = new.list_price, item_listcost = new.list_cost, item_price_uom_id = public.getuomid(new.list_price_uom), item_upccode = new.upc_code, item_prodweight = new.product_weight, item_packweight = new.packaging_weight, item_comments = new.notes, item_extdescrip = new.ext_description WHERE (item.item_id = public.getitemid((old.item_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemalias DO INSTEAD UPDATE public.itemalias SET itemalias_number = new.alias_number, itemalias_usedescrip = new.use_description, itemalias_descrip1 = new.description1, itemalias_descrip2 = new.description2, itemalias_comments = new.comments WHERE ((itemalias.itemalias_item_id = public.getitemid((old.item_number)::text)) AND (itemalias.itemalias_number = old.alias_number)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemchar DO INSTEAD UPDATE public.charass SET charass_value = new.value, charass_default = new.is_default WHERE (((charass.charass_target_type = 'I'::text) AND (charass.charass_target_id = public.getitemid((old.item_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'I'::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemcomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemcost DO INSTEAD SELECT public.updateitemcost(public.getitemid((new.item_number)::text), public.getcostelemid((new.costing_element)::text), public.getcurrid((new.currency)::text), new.actual_cost, new.post_to_standard) AS updateitemcost; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemfile DO INSTEAD UPDATE public.url SET url_title = new.title, url_url = new.url WHERE ((((url.url_source_id = public.getitemid((old.item_number)::text)) AND (url.url_source = 'I'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemimage DO INSTEAD SELECT public.saveimageass('I'::text, public.getitemid((new.item_number)::text), (CASE WHEN (new.purpose = 'Product Description'::text) THEN 'P'::text WHEN (new.purpose = 'Inventory Description'::text) THEN 'I'::text WHEN (new.purpose = 'Engineering Reference'::text) THEN 'E'::text WHEN (new.purpose = 'Miscellaneous'::text) THEN 'M'::text ELSE 'X'::text END)::bpchar, public.getimageid(new.image_name)) AS saveimageass; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemsite DO INSTEAD UPDATE public.itemsite SET itemsite_active = new.active, itemsite_dropship = new.dropship, itemsite_posupply = new.po_supplied_at_site, itemsite_createpr = new.create_prs, itemsite_wosupply = new.wo_supplied_at_site, itemsite_createwo = new.create_wos, itemsite_createsopr = new.create_soprs, itemsite_createsopo = new.create_sopos, itemsite_sold = new.sold_from_site, itemsite_soldranking = new.ranking, itemsite_costmethod = CASE WHEN (new.cost_method = 'None'::text) THEN 'N'::text WHEN (new.cost_method = 'Average'::text) THEN 'A'::text WHEN (new.cost_method = 'Standard'::text) THEN 'S'::text WHEN (new.cost_method = 'Job'::text) THEN 'J'::text ELSE NULL::text END, itemsite_controlmethod = CASE WHEN (new.control_method = 'None'::text) THEN 'N'::text WHEN (new.control_method = 'Regular'::text) THEN 'R'::text WHEN (new.control_method = 'Serial #'::text) THEN 'S'::text WHEN (new.control_method = 'Lot #'::text) THEN 'L'::text ELSE NULL::text END, itemsite_perishable = new.perishable, itemsite_plancode_id = public.getplancodeid(new.planner_code), itemsite_costcat_id = public.getcostcatid(new.cost_category), itemsite_loccntrl = new.multiple_location_control, itemsite_location_id = CASE WHEN (new.location = 'N/A'::text) THEN (-1) ELSE public.getlocationid((new.site)::text, new.location) END, itemsite_location = new.user_defined_location, itemsite_location_comments = new.user_defined_location, itemsite_disallowblankwip = new.disallow_blank_wip_locations, itemsite_stocked = new.stocked, itemsite_abcclass = new.abc_class, itemsite_autoabcclass = new.allow_automatic_updates, itemsite_cyclecountfreq = new.cycl_cnt_freq, itemsite_eventfence = new.event_fence, itemsite_useparams = new.enforce_order_parameters, itemsite_reorderlevel = new.reorder_level, itemsite_ordertoqty = new.order_up_to, itemsite_minordqty = new.minimum_order, itemsite_maxordqty = new.maximum_order, itemsite_multordqty = new.order_multiple, itemsite_useparamsmanual = new.enforce_on_manual_orders, itemsite_ordergroup = new.group_mps_mrp_orders, itemsite_ordergroup_first = new.first_group, itemsite_mps_timefence = new.mps_time_fence, itemsite_leadtime = new.lead_time, itemsite_safetystock = new.safety_stock, itemsite_supply_itemsite_id = CASE WHEN (new.supplied_from_site = 'None'::text) THEN NULL::integer WHEN (new.supplied_from_site = ''::text) THEN NULL::integer ELSE public.getitemsiteid(new.supplied_from_site, (new.item_number)::text) END, itemsite_notes = new.notes, itemsite_warrpurc = new.require_warranty, itemsite_autoreg = new.auto_register, itemsite_planning_type = CASE WHEN (new.planning_system = 'None'::text) THEN 'N'::text WHEN (new.planning_system = 'MPS'::text) THEN 'S'::text ELSE 'M'::text END WHERE (itemsite.itemsite_id = public.getitemsiteid((old.site)::text, (old.item_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemsitecomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemsource DO INSTEAD UPDATE public.itemsrc SET itemsrc_vend_item_number = new.vendor_item_number, itemsrc_vend_item_descrip = new.vendor_description, itemsrc_comments = new.notes, itemsrc_vend_uom = new.vendor_uom, itemsrc_invvendoruomratio = new.inventory_vendor_uom_ratio, itemsrc_minordqty = new.minimum_order, itemsrc_multordqty = new.order_multiple, itemsrc_leadtime = new.lead_time, itemsrc_ranking = new.vendor_ranking, itemsrc_active = new.active, itemsrc_default = new.itemsrc_default, itemsrc_manuf_name = new.manufacturer_name, itemsrc_manuf_item_number = new.manufacturer_item_number, itemsrc_manuf_item_descrip = new.manufacturer_description, itemsrc_upccode = new.bar_code, itemsrc_contrct_id = public.getcontrctid(new.contract_number), itemsrc_effective = COALESCE(public.getcontrcteffective(new.contract_number), new.effective_date), itemsrc_expires = COALESCE(public.getcontrctexpires(new.contract_number), new.expires_date) WHERE (((((itemsrc.itemsrc_item_id = public.getitemid((old.item_number)::text)) AND (itemsrc.itemsrc_vend_id = public.getvendid((old.vendor)::text))) AND (itemsrc.itemsrc_vend_item_number = old.vendor_item_number)) AND (itemsrc.itemsrc_manuf_name = old.manufacturer_name)) AND (itemsrc.itemsrc_manuf_item_number = old.manufacturer_item_number)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemsourceprice DO INSTEAD UPDATE public.itemsrcp SET itemsrcp_qtybreak = new.qty_break, itemsrcp_price = new.price_per_unit, itemsrcp_updated = now(), itemsrcp_curr_id = public.getcurrid((new.currency)::text), itemsrcp_dropship = COALESCE(new.dropship_only, false), itemsrcp_warehous_id = CASE WHEN (new.pricing_site = 'All'::text) THEN (-1) ELSE COALESCE(public.getwarehousid(new.pricing_site, 'ALL'::text), (-1)) END, itemsrcp_type = CASE WHEN (new.pricing_type = 'Discount'::text) THEN 'D'::text ELSE 'N'::text END, itemsrcp_discntprcnt = (COALESCE(new.discount_percent, 0.0) / 100.0), itemsrcp_fixedamtdiscount = new.discount_fixed_amount WHERE ((itemsrcp.itemsrcp_itemsrc_id = public.getitemsrcid((old.item_number)::text, (new.vendor)::text)) AND (itemsrcp.itemsrcp_qtybreak = old.qty_break)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemsubstitute DO INSTEAD UPDATE public.itemsub SET itemsub_uomratio = new.sub_parent_uom_ratio, itemsub_rank = new.ranking WHERE ((itemsub.itemsub_parent_item_id = public.getitemid((old.root_item_number)::text)) AND (itemsub.itemsub_sub_item_id = public.getitemid((old.substitute_item_number)::text))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemtaxtype DO INSTEAD UPDATE public.itemtax SET itemtax_taxzone_id = CASE WHEN ((new.tax_zone)::text = 'Any'::text) THEN NULL::integer ELSE public.gettaxzoneid((new.tax_zone)::text) END, itemtax_taxtype_id = public.gettaxtypeid(new.tax_type) WHERE (((itemtax.itemtax_item_id = public.getitemid((old.item_number)::text)) AND CASE WHEN ((old.tax_zone)::text = 'Any'::text) THEN (itemtax.itemtax_taxzone_id IS NULL) ELSE (itemtax.itemtax_taxzone_id = public.gettaxzoneid((old.tax_zone)::text)) END) AND (itemtax.itemtax_taxtype_id = public.gettaxtypeid(old.tax_type))); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO itemuomconversion DO INSTEAD SELECT public.saveitemuomconv(public.getitemid((new.item_number)::text), COALESCE(public.getuomid((new.uom)::text), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid((new.item_number)::text)))), COALESCE(new.uom_value, (1)::numeric), COALESCE(public.getuomid(new.per_uom), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid((new.item_number)::text)))), COALESCE(new.per_uom_value, (1)::numeric), COALESCE(new.fractional, false), public.getuomtypeid(new.selected_types)) AS saveitemuomconv; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO journalentry DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO location DO INSTEAD UPDATE public.location SET location_name = new.location, location_descrip = new.description, location_restrict = new.restricted, location_netable = new.netable, location_whsezone_id = public.getwhsezoneid((new.site)::text, new.zone), location_aisle = new.aisle, location_rack = new.rack, location_bin = new.bin WHERE ((location.location_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (location.location_name = (old.location)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO misccounttag DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO pricingschedule DO INSTEAD UPDATE public.ipshead SET ipshead_descrip = new.description, ipshead_effective = CASE WHEN (new.effective = 'Always'::text) THEN '1970-01-01'::date ELSE (new.effective)::date END, ipshead_expires = CASE WHEN (new.expires = 'Never'::text) THEN '2100-01-01'::date ELSE (new.expires)::date END, ipshead_updated = now(), ipshead_curr_id = CASE WHEN (SELECT (count(ipsiteminfo.ipsitem_id) = 0) FROM public.ipsiteminfo WHERE (ipsiteminfo.ipsitem_ipshead_id = public.getipsheadid((old.name)::text))) THEN COALESCE(public.getcurrid((new.currency)::text), public.basecurrid()) ELSE public.getcurrid((old.currency)::text) END WHERE (ipshead.ipshead_name = (old.name)::text); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO pricingscheduleassign DO INSTEAD UPDATE public.ipsass SET ipsass_ipshead_id = public.getipsheadid((new.pricing_schedule)::text), ipsass_cust_id = CASE WHEN ((new.customer_number)::text = 'Any'::text) THEN (-1) ELSE public.getcustid((new.customer_number)::text) END, ipsass_custtype_id = CASE WHEN ((new.customer_type)::text = 'N/A'::text) THEN (-1) ELSE public.getcusttypeid((new.customer_type)::text) END, ipsass_custtype_pattern = new.customer_type_pattern, ipsass_shipto_id = CASE WHEN (((new.customer_number)::text = 'Any'::text) OR ((new.customer_shipto)::text = 'Any'::text)) THEN (-1) ELSE public.getshiptoid((new.customer_number)::text, (new.customer_shipto)::text) END, ipsass_shipto_pattern = new.customer_shipto_pattern WHERE ((((((ipsass.ipsass_ipshead_id = public.getipsheadid((old.pricing_schedule)::text)) AND (ipsass.ipsass_cust_id = CASE WHEN ((old.customer_number)::text = 'Any'::text) THEN (-1) ELSE public.getcustid((old.customer_number)::text) END)) AND (ipsass.ipsass_custtype_id = CASE WHEN ((old.customer_type)::text = 'N/A'::text) THEN (-1) ELSE public.getcusttypeid((old.customer_type)::text) END)) AND (ipsass.ipsass_custtype_pattern = (old.customer_type_pattern)::text)) AND (ipsass.ipsass_shipto_id = CASE WHEN ((old.customer_shipto)::text = 'Any'::text) THEN (-1) ELSE public.getshiptoid((old.customer_number)::text, (old.customer_shipto)::text) END)) AND (ipsass.ipsass_shipto_pattern = (old.customer_shipto_pattern)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO pricingscheduleitem DO INSTEAD SELECT CASE WHEN ((old.type)::text = 'Item'::text) THEN public.saveipsitem(public.getipsitemid((old.pricing_schedule)::text, (old.item_number)::text, old.qty_break, (old.qty_uom)::text, (old.price_uom)::text), public.getipsheadid((new.pricing_schedule)::text), public.getitemid((new.item_number)::text), new.qty_break, new.price, public.getuomid((new.qty_uom)::text), public.getuomid((new.price_uom)::text), new.percent, new.fixedamt, CASE new.pricing_type WHEN 'Nominal'::text THEN 'N'::text WHEN 'Discount'::text THEN 'D'::text WHEN 'Markup'::text THEN 'M'::text ELSE '?'::text END) WHEN ((old.type)::text = 'Product Category'::text) THEN public.saveipsprodcat(public.getipsprodcatid((old.pricing_schedule)::text, (old.product_category)::text, old.qty_break), public.getipsheadid((new.pricing_schedule)::text), public.getprodcatid((new.product_category)::text), new.qty_break, new.percent, new.fixedamt, CASE new.pricing_type WHEN 'Nominal'::text THEN 'N'::text WHEN 'Discount'::text THEN 'D'::text WHEN 'Markup'::text THEN 'M'::text ELSE '?'::text END) ELSE NULL::integer END AS result; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO pricingscheduleitemchar DO INSTEAD UPDATE public.ipsitemchar SET ipsitemchar_price = new.price WHERE (((ipsitemchar.ipsitemchar_ipsitem_id = public.getipsitemid((old.pricing_schedule)::text, (old.item_number)::text, old.qty_break, (old.qty_uom)::text, (old.price_uom)::text)) AND (ipsitemchar.ipsitemchar_char_id = public.getcharid((old.characteristic)::text, 'I'::text))) AND (ipsitemchar.ipsitemchar_value = (old.value)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO project DO INSTEAD UPDATE public.prj SET prj_name = new.name, prj_descrip = new.description, prj_owner_username = new.owner, prj_username = new.assigned_to, prj_so = new.sales_orders, prj_wo = new.work_orders, prj_po = new.purchase_orders, prj_status = CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, prj_due_date = new.due, prj_assigned_date = new.assigned, prj_start_date = new.started, prj_completed_date = new.completed WHERE (prj.prj_number = old.number); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO projectcomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO prospect DO INSTEAD UPDATE public.prospect SET prospect_number = upper((new.prospect_number)::text), prospect_name = new.prospect_name, prospect_active = new.active, prospect_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.contact_address_number), new.contact_address_number, new.contact_address1, new.contact_address2, new.contact_address3, new.contact_city, new.contact_state, new.contact_postalcode, new.contact_country, new.contact_address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), prospect_taxzone_id = public.gettaxzoneid(new.default_tax_zone), prospect_salesrep_id = public.getsalesrepid(new.sales_rep), prospect_warehous_id = public.getwarehousid(new.site_code, 'ACTIVE'::text), prospect_comments = new.notes WHERE (prospect.prospect_id = public.getprospectid((old.prospect_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO purchaseline DO INSTEAD UPDATE public.poitem SET poitem_duedate = new.due_date, poitem_qty_ordered = new.qty_ordered, poitem_unitprice = new.unit_price, poitem_vend_item_number = new.vend_item_number, poitem_vend_item_descrip = new.vendor_description, poitem_manuf_name = new.manufacturer_name, poitem_manuf_item_number = new.manufacturer_item_number, poitem_manuf_item_descrip = new.manufacturer_description, poitem_comments = new.notes, poitem_freight = new.freight, poitem_prj_id = public.getprjid(new.project_number), poitem_bom_rev_id = public.getrevid('BOM'::text, old.item_number, new.bill_of_materials_revision), poitem_boo_rev_id = public.getrevid('BOO'::text, old.item_number, new.bill_of_operations_revision) WHERE (poitem.poitem_id = public.getpoitemid((old.order_number)::text, old.line_number)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO purchaselinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('PI'::text, poitem.poitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.pohead, public.poitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((pohead.pohead_number = (old.order_number)::text) AND (pohead.pohead_id = poitem.poitem_pohead_id)) AND (poitem.poitem_linenumber = old.line_number)) AND (poitem.poitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO purchaselinecomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO purchaseorder DO INSTEAD UPDATE public.pohead SET pohead_terms_id = public.gettermsid(new.terms), pohead_taxzone_id = public.gettaxzoneid(new.tax_zone), pohead_warehous_id = public.getwarehousid(new.receiving_site, 'ALL'::text), pohead_agent_username = new.purchasing_agent, pohead_vendaddr_id = CASE WHEN (new.alt_address = 'MAIN'::text) THEN NULL::integer ELSE public.getvendaddrid(old.vendor_number, new.alt_address) END, pohead_fob = new.fob, pohead_shipvia = new.ship_via, pohead_curr_id = public.getcurrid((new.currency)::text), pohead_freight = new.freight, pohead_comments = new.notes, pohead_dropship = new.dropship, pohead_vend_cntct_id = public.getcntctid(new.vend_contact_number), pohead_vend_cntct_honorific = new.vend_cntct_honorific, pohead_vend_cntct_first_name = new.vend_cntct_first_name, pohead_vend_cntct_middle = new.vend_cntct_middle, pohead_vend_cntct_last_name = new.vend_cntct_last_name, pohead_vend_cntct_suffix = new.vend_cntct_suffix, pohead_vend_cntct_phone = new.vend_cntct_phone, pohead_vend_cntct_title = new.vend_cntct_title, pohead_vend_cntct_fax = new.vend_cntct_fax, pohead_vend_cntct_email = new.vend_cntct_email, pohead_vendaddress1 = new.vendaddress1, pohead_vendaddress2 = new.vendaddress2, pohead_vendaddress3 = new.vendaddress3, pohead_vendcity = new.vendcity, pohead_vendstate = new.vendstate, pohead_vendzipcode = new.vendzipcode, pohead_vendcountry = new.vendcountry, pohead_shipto_cntct_id = public.getcntctid(new.shipto_contact_number), pohead_shipto_cntct_honorific = new.shipto_cntct_honorific, pohead_shipto_cntct_first_name = new.shipto_cntct_first_name, pohead_shipto_cntct_middle = new.shipto_cntct_middle, pohead_shipto_cntct_last_name = new.shipto_cntct_last_name, pohead_shipto_cntct_suffix = new.shipto_cntct_suffix, pohead_shipto_cntct_phone = new.shipto_cntct_phone, pohead_shipto_cntct_title = new.shipto_cntct_title, pohead_shipto_cntct_fax = new.shipto_cntct_fax, pohead_shipto_cntct_email = new.shipto_cntct_email, pohead_shiptoaddress_id = public.getaddrid(new.shiptoaddress_number), pohead_shiptoaddress1 = new.shiptoaddress1, pohead_shiptoaddress2 = new.shiptoaddress2, pohead_shiptoaddress3 = new.shiptoaddress3, pohead_shiptocity = new.shiptocity, pohead_shiptostate = new.shiptostate, pohead_shiptozipcode = new.shiptozipcode, pohead_shiptocountry = new.shiptocountry, pohead_cohead_id = public.getcoheadid(new.sales_order_number) WHERE (pohead.pohead_number = (old.order_number)::text); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO purchaseordercomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO quote DO INSTEAD UPDATE public.quhead SET quhead_number = old.quote_number, quhead_cust_id = public.getcustid(new.customer_number, true), quhead_custponumber = new.cust_po_number, quhead_quotedate = new.quote_date, quhead_warehous_id = public.getwarehousid(new.site, 'SHIPPING'::text), quhead_shipto_id = public.getshiptoid(new.customer_number, new.shipto_number), quhead_shiptoname = new.shipto_name, quhead_shiptoaddress1 = new.shipto_address1, quhead_shiptoaddress2 = new.shipto_address2, quhead_shiptoaddress3 = new.shipto_address3, quhead_salesrep_id = public.getsalesrepid(new.sales_rep), quhead_terms_id = public.gettermsid(new.terms), quhead_fob = new.fob, quhead_shipvia = new.ship_via, quhead_shiptocity = new.shipto_city, quhead_shiptostate = new.shipto_state, quhead_shiptozipcode = new.shipto_postal_code, quhead_freight = new.freight, quhead_misc = new.misc_charge, quhead_ordercomments = new.order_notes, quhead_shipcomments = new.shipping_notes, quhead_shiptophone = new.shipto_phone, quhead_billtoname = new.billto_name, quhead_billtoaddress1 = new.billto_address1, quhead_billtoaddress2 = new.billto_address2, quhead_billtoaddress3 = new.billto_address3, quhead_billtocity = new.billto_city, quhead_billtostate = new.billto_state, quhead_billtozip = new.billto_postal_code, quhead_misc_accnt_id = public.getglaccntid(new.misc_account_number), quhead_misc_descrip = new.misc_charge_description, quhead_commission = new.commission, quhead_packdate = new.pack_date, quhead_prj_id = public.getprjid(new.project_number), quhead_billtocountry = new.billto_country, quhead_shiptocountry = new.shipto_country, quhead_curr_id = public.getcurrid((new.currency)::text), quhead_taxzone_id = public.gettaxzoneid(new.tax_zone), quhead_taxtype_id = public.gettaxtypeid(new.tax_type), quhead_expire = new.expire_date, quhead_saletype_id = public.getsaletypeid(new.sale_type), quhead_shipzone_id = public.getshipzoneid(new.shipto_shipzone) WHERE (quhead.quhead_number = (old.quote_number)::text); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO quotecomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO quoteline DO INSTEAD UPDATE public.quitem SET quitem_scheddate = new.scheduled_date, quitem_qtyord = new.qty_ordered, quitem_qty_uom_id = public.getuomid(new.qty_uom), quitem_qty_invuomratio = public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.qty_uom), item.item_inv_uom_id), item.item_inv_uom_id), quitem_price = new.net_unit_price, quitem_price_uom_id = public.getuomid(new.price_uom), quitem_price_invuomratio = public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.price_uom), item.item_inv_uom_id), item.item_inv_uom_id), quitem_memo = new.notes, quitem_createorder = new.create_order, quitem_order_warehous_id = public.getwarehousid(new.supplying_site, 'SHIPPING'::text), quitem_prcost = new.overwrite_po_price, quitem_taxtype_id = public.gettaxtypeid(new.tax_type) FROM public.item WHERE ((quitem.quitem_quhead_id = public.getquoteid(old.quote_number)) AND (quitem.quitem_linenumber = old.line_number)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO quotelinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('QI'::text, quitem.quitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.quhead, public.quitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((quhead.quhead_number = old.quote_number) AND (quhead.quhead_id = quitem.quitem_quhead_id)) AND (quitem.quitem_linenumber = old.line_number)) AND (quitem.quitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO quotelinecomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO saleshistory DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO saleslinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('SI'::text, coitem.coitem_id, charass.charass_char_id, new.value, public.itemcharprice(item.item_id, "char".char_id, new.value, cohead.cohead_cust_id, cohead.cohead_shipto_id, coitem.coitem_qtyord, cohead.cohead_curr_id, cohead.cohead_orderdate)) AS updatecharassignment FROM public.cohead, public.coitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((cohead.cohead_number = (old.order_number)::text) AND (cohead.cohead_id = coitem.coitem_cohead_id)) AND (coitem.coitem_id = public.getcoitemid((old.order_number)::text, old.line_number))) AND (coitem.coitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO saleslinecomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO salesorder DO INSTEAD UPDATE public.cohead SET cohead_number = old.order_number, cohead_cust_id = public.getcustid(new.customer_number), cohead_custponumber = new.cust_po_number, cohead_orderdate = new.order_date, cohead_warehous_id = public.getwarehousid(new.site, 'SHIPPING'::text), cohead_shipto_id = public.getshiptoid(new.customer_number, new.shipto_number), cohead_shiptoname = new.shipto_name, cohead_shiptoaddress1 = new.shipto_address1, cohead_shiptoaddress2 = new.shipto_address2, cohead_shiptoaddress3 = new.shipto_address3, cohead_salesrep_id = public.getsalesrepid(new.sales_rep), cohead_terms_id = public.gettermsid(new.terms), cohead_fob = new.fob, cohead_shipvia = new.ship_via, cohead_shiptocity = new.shipto_city, cohead_shiptostate = new.shipto_state, cohead_shiptozipcode = new.shipto_postal_code, cohead_freight = CASE WHEN new.calculate_freight THEN COALESCE((SELECT sum(freightdetail.freightdata_total) AS sum FROM public.freightdetail('SO'::text, public.getcoheadid((old.order_number)::text), public.getcustid(new.customer_number), public.getshiptoid(new.customer_number, new.shipto_number), new.order_date, new.ship_via, public.getcurrid((new.currency)::text)) freightdetail(freightdata_schedule, freightdata_from, freightdata_to, freightdata_shipvia, freightdata_freightclass, freightdata_weight, freightdata_uom, freightdata_price, freightdata_type, freightdata_total, freightdata_currency)), (0)::numeric) ELSE new.freight END, cohead_calcfreight = new.calculate_freight, cohead_misc = new.misc_charge, cohead_ordercomments = new.order_notes, cohead_shipcomments = new.shipping_notes, cohead_shiptophone = new.shipto_phone, cohead_shipchrg_id = public.getshipchrgid(new.shipping_chgs), cohead_shipform_id = public.getshipformid(new.shipping_form), cohead_billtoname = new.billto_name, cohead_billtoaddress1 = new.billto_address1, cohead_billtoaddress2 = new.billto_address2, cohead_billtoaddress3 = new.billto_address3, cohead_billtocity = new.billto_city, cohead_billtostate = new.billto_state, cohead_billtozipcode = new.billto_postal_code, cohead_misc_accnt_id = public.getglaccntid(new.misc_account_number), cohead_misc_descrip = new.misc_charge_description, cohead_commission = new.commission, cohead_holdtype = CASE WHEN (new.hold_type = 'Credit'::text) THEN 'C'::text WHEN (new.hold_type = 'Shipping'::text) THEN 'S'::text WHEN (new.hold_type = 'Packing'::text) THEN 'P'::text ELSE 'N'::text END, cohead_packdate = new.pack_date, cohead_prj_id = public.getprjid(new.project_number), cohead_shipcomplete = new.ship_complete, cohead_billtocountry = new.billto_country, cohead_shiptocountry = new.shipto_country, cohead_curr_id = public.getcurrid((new.currency)::text), cohead_taxzone_id = public.gettaxzoneid(new.tax_zone), cohead_lastupdated = ('now'::text)::timestamp(6) with time zone, cohead_shipto_cntct_id = public.getcntctid(new.shipto_contact_number), cohead_shipto_cntct_honorific = new.shipto_contact_honorific, cohead_shipto_cntct_first_name = new.shipto_contact_first, cohead_shipto_cntct_middle = new.shipto_contact_middle, cohead_shipto_cntct_last_name = new.shipto_contact_last, cohead_shipto_cntct_suffix = new.shipto_contact_suffix, cohead_shipto_cntct_phone = new.shipto_contact_phone, cohead_shipto_cntct_title = new.shipto_contact_title, cohead_shipto_cntct_fax = new.shipto_contact_fax, cohead_shipto_cntct_email = new.shipto_contact_email, cohead_billto_cntct_id = public.getcntctid(new.billto_contact_number), cohead_billto_cntct_honorific = new.billto_contact_name, cohead_billto_cntct_first_name = new.billto_contact_first, cohead_billto_cntct_middle = new.billto_contact_middle, cohead_billto_cntct_last_name = new.billto_contact_last, cohead_billto_cntct_suffix = new.billto_contact_suffix, cohead_billto_cntct_phone = new.billto_contact_phone, cohead_billto_cntct_title = new.billto_contact_title, cohead_billto_cntct_fax = new.billto_contct_fax, cohead_billto_cntct_email = new.billto_contact_email, cohead_saletype_id = public.getsaletypeid(new.sale_type), cohead_shipzone_id = public.getshipzoneid(new.shipto_shipzone) WHERE (cohead.cohead_number = (old.order_number)::text); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO salesordercomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO salesrep DO INSTEAD UPDATE public.salesrep SET salesrep_active = new.active, salesrep_number = new.number, salesrep_name = new.name, salesrep_commission = (new.commission_percent * 0.01), salesrep_emp_id = public.getempid(new.employee) WHERE (salesrep.salesrep_number = (old.number)::text); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO site DO INSTEAD UPDATE public.whsinfo SET warehous_descrip = new.description, warehous_fob = CASE WHEN new.inventory_type THEN new.default_fob ELSE NULL::text END, warehous_active = new.active, warehous_counttag_prefix = CASE WHEN new.inventory_type THEN new.next_count_tag_prefix ELSE NULL::text END, warehous_counttag_number = CASE WHEN new.inventory_type THEN new.next_count_tag_number ELSE NULL::integer END, warehous_bol_prefix = CASE WHEN new.inventory_type THEN new.next_bill_of_lading_prefix ELSE NULL::text END, warehous_bol_number = CASE WHEN new.inventory_type THEN new.next_bill_of_lading_number ELSE NULL::integer END, warehous_shipping = CASE WHEN new.inventory_type THEN new.shipping_site ELSE NULL::boolean END, warehous_useslips = CASE WHEN new.inventory_type THEN new.force_the_use_of_count_slips ELSE NULL::boolean END, warehous_usezones = CASE WHEN new.inventory_type THEN new.force_the_use_of_zones ELSE NULL::boolean END, warehous_aislesize = CASE WHEN new.inventory_type THEN new.aisle_size ELSE NULL::integer END, warehous_aislealpha = CASE WHEN new.inventory_type THEN new.aisle_allow_alpha_characters ELSE NULL::boolean END, warehous_racksize = CASE WHEN new.inventory_type THEN new.rack_size ELSE NULL::integer END, warehous_rackalpha = CASE WHEN new.inventory_type THEN new.rack_allow_alpha_characters ELSE NULL::boolean END, warehous_binsize = CASE WHEN new.inventory_type THEN new.bin_size ELSE NULL::integer END, warehous_binalpha = CASE WHEN new.inventory_type THEN new.bin_allow_alpha_characters ELSE NULL::boolean END, warehous_locationsize = CASE WHEN new.inventory_type THEN new.location_size ELSE NULL::integer END, warehous_locationalpha = CASE WHEN new.inventory_type THEN new.location_allow_alpha_characters ELSE NULL::boolean END, warehous_enforcearbl = CASE WHEN new.inventory_type THEN new.enforce_arbl_naming_convention ELSE NULL::boolean END, warehous_default_accnt_id = public.getglaccntid(new.post_unassigned_transactions_to), warehous_shipping_commission = CASE WHEN new.inventory_type THEN (new.shipping_commission * 0.01) ELSE NULL::numeric END, warehous_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), warehous_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), warehous_taxzone_id = CASE WHEN new.inventory_type THEN public.gettaxzoneid(new.tax_zone) ELSE NULL::integer END, warehous_transit = CASE WHEN new.inventory_type THEN false WHEN new.transit_type THEN true ELSE NULL::boolean END, warehous_shipform_id = CASE WHEN new.transit_type THEN public.getshipformid(new.default_shipping_form) ELSE NULL::integer END, warehous_shipvia_id = CASE WHEN new.transit_type THEN public.getshipviaid(new.default_ship_via) ELSE NULL::integer END, warehous_shipcomments = CASE WHEN new.transit_type THEN new.shipping_comments ELSE NULL::text END, warehous_costcat_id = CASE WHEN new.transit_type THEN public.getcostcatid(new.default_cost_category) ELSE NULL::integer END, warehous_sitetype_id = public.getsitetypeid(new.type), warehous_sequence = new.scheduling_sequence WHERE (whsinfo.warehous_id = public.getwarehousid((old.code)::text, 'ALL'::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO sitezone DO INSTEAD UPDATE public.whsezone SET whsezone_descrip = new.description WHERE ((whsezone.whsezone_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (whsezone.whsezone_name = (old.name)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO task DO INSTEAD UPDATE public.prjtask SET prjtask_name = new.name, prjtask_descrip = new.description, prjtask_owner_username = new.owner, prjtask_username = new.assigned_to, prjtask_hours_budget = new.hours_budgeted, prjtask_hours_actual = new.hours_actual, prjtask_exp_budget = new.expenses_budgeted, prjtask_exp_actual = new.expenses_actual, prjtask_status = CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, prjtask_due_date = new.due, prjtask_assigned_date = new.assigned, prjtask_start_date = new.started, prjtask_completed_date = new.completed WHERE ((prjtask.prjtask_prj_id = public.getprjid(old.project_number)) AND (prjtask.prjtask_number = old.number)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO taskcomment DO INSTEAD NOTHING; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO todo DO INSTEAD SELECT public.updatetodoitem(old.task_number, old.assigned_to, new.task_name, new.description, public.getincidentid(new.incident), COALESCE(public.getincdtcrmacctid(new.incident), public.getcrmacctid(new.account)), public.getopheadid(new.opportunity), CASE WHEN (new.date_started > ''::text) THEN (new.date_started)::date ELSE NULL::date END, CASE WHEN (new.date_due > ''::text) THEN (new.date_due)::date ELSE NULL::date END, (CASE WHEN (new.status = 'Pending Input'::text) THEN 'P'::text WHEN (new.status = 'Deferred'::text) THEN 'D'::text WHEN (new.status = 'Neither'::text) THEN 'N'::text ELSE NULL::text END)::bpchar, CASE WHEN (new.date_assigned > ''::text) THEN (new.date_assigned)::date ELSE NULL::date END, CASE WHEN (new.date_completed > ''::text) THEN (new.date_completed)::date ELSE NULL::date END, public.getincdtpriorityid(new.priority), new.notes, new.active, new.owner) AS updatetodoitem; -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO vendor DO INSTEAD UPDATE public.vendinfo SET vend_name = new.vendor_name, vend_active = new.active, vend_po = new.sells_purchase_order_items, vend_comments = new.notes, vend_pocomments = new.po_comments, vend_1099 = new.receives_1099, vend_fobsource = CASE WHEN (new.default_fob IS NULL) THEN NULL::text WHEN (new.default_fob = 'Receiving Site'::text) THEN 'W'::text ELSE 'V'::text END, vend_fob = CASE WHEN (new.default_fob IS NULL) THEN NULL::text WHEN (new.default_fob = 'Receiving Site'::text) THEN ''::text ELSE new.default_fob END, vend_terms_id = public.gettermsid(new.default_terms), vend_shipvia = new.ship_via, vend_vendtype_id = public.getvendtypeid(new.vendor_type), vend_qualified = new.qualified, vend_ediemail = new.po_edi_email, vend_ediemailbody = new.po_edi_emailbody, vend_edisubject = new.po_edi_subject, vend_edifilename = new.po_edi_filename, vend_accntnum = new.account_number, vend_emailpodelivery = new.allow_email_po_delivery, vend_restrictpurch = new.may_only_sell_item_source, vend_edicc = new.po_edi_cc, vend_curr_id = public.getcurrid((new.default_currency)::text), vend_cntct1_id = public.savecntct(public.getcntctid(new.contact1_number), new.contact1_number, NULL::integer, new.contact1_honorific, new.contact1_first, new.contact1_middle, new.contact1_last, new.contact1_suffix, new.contact1_voice, new.contact1_alternate, new.contact1_fax, new.contact1_email, new.contact1_web, new.contact1_job_title, new.contact1_change), vend_cntct2_id = public.savecntct(public.getcntctid(new.contact2_number), new.contact2_number, NULL::integer, new.contact2_honorific, new.contact2_first, new.contact2_middle, new.contact2_last, new.contact2_suffix, new.contact2_voice, new.contact2_alternate, new.contact2_fax, new.contact2_email, new.contact2_web, new.contact2_job_title, new.contact2_change), vend_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), vend_match = new.matching_vo_po_amounts, vend_taxzone_id = public.gettaxzoneid(new.default_tax_zone), vend_accnt_id = COALESCE(public.getglaccntid(new.default_dist_gl_account), (-1)), vend_expcat_id = COALESCE(public.getexpcatid(new.default_dist_expense_category), (-1)), vend_tax_id = COALESCE(public.gettaxid(new.default_dist_tax_code), (-1)) WHERE (vendinfo.vend_id = public.getvendid((old.vendor_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO vendoraddress DO INSTEAD UPDATE public.vendaddrinfo SET vendaddr_vend_id = public.getvendid((new.vendor_number)::text), vendaddr_code = new.vendor_address_number, vendaddr_name = new.vendor_address_name, vendaddr_comments = new.notes, vendaddr_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), vendaddr_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change) WHERE (vendaddrinfo.vendaddr_id = public.getvendaddrid((old.vendor_number)::text, (old.vendor_address_number)::text)); -- -- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO vendortype DO INSTEAD UPDATE public.vendtype SET vendtype_code = new.code, vendtype_descrip = new.description WHERE (vendtype.vendtype_code = (old.code)::text); SET search_path = public, pg_catalog; -- -- Name: _DELETE; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_DELETE" AS ON DELETE TO url DO INSTEAD NOTHING; -- -- Name: _DELETE_FILE; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_DELETE_FILE" AS ON DELETE TO url WHERE (old.url_stream IS NOT NULL) DO INSTEAD SELECT deletefile(old.url_id) AS deletefile; -- -- Name: _DELETE_URL; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_DELETE_URL" AS ON DELETE TO url WHERE (old.url_stream IS NULL) DO INSTEAD SELECT deleteurl(old.url_id) AS deleteurl; -- -- Name: _INSERT; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_INSERT" AS ON INSERT TO url DO INSTEAD NOTHING; -- -- Name: _INSERT_FILE; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_INSERT_FILE" AS ON INSERT TO url WHERE (new.url_stream IS NOT NULL) DO INSTEAD INSERT INTO docass (docass_id, docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose) VALUES (COALESCE((new.url_id)::bigint, nextval('docass_docass_id_seq'::regclass)), new.url_source_id, new.url_source, createfile(new.url_title, new.url_url, new.url_stream), 'FILE'::text, 'S'::bpchar); -- -- Name: _INSERT_URL; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_INSERT_URL" AS ON INSERT TO url WHERE (new.url_stream IS NULL) DO INSTEAD INSERT INTO docass (docass_id, docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose) VALUES (COALESCE((new.url_id)::bigint, nextval('docass_docass_id_seq'::regclass)), new.url_source_id, new.url_source, createurl(new.url_title, new.url_url), 'URL'::text, 'S'::bpchar); -- -- Name: _UPDATE; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_UPDATE" AS ON UPDATE TO url DO INSTEAD NOTHING; -- -- Name: _UPDATE_FILE; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_UPDATE_FILE" AS ON UPDATE TO url WHERE (new.url_stream IS NOT NULL) DO INSTEAD UPDATE file SET file_title = new.url_title, file_stream = new.url_stream FROM docass WHERE (((docass.docass_id = old.url_id) AND (docass.docass_target_id = file.file_id)) AND (docass.docass_target_type = 'FILE'::text)); -- -- Name: _UPDATE_URL; Type: RULE; Schema: public; Owner: admin -- CREATE RULE "_UPDATE_URL" AS ON UPDATE TO url WHERE (new.url_stream IS NULL) DO INSTEAD UPDATE urlinfo SET url_title = new.url_title, url_url = new.url_url FROM docass WHERE (((docass.docass_id = old.url_id) AND (docass.docass_target_id = urlinfo.url_id)) AND (docass.docass_target_type = 'URL'::text)); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgcmdaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger(); -- -- Name: pkgcmdaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger(); -- -- Name: pkgcmdargaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger(); -- -- Name: pkgcmdargaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger(); -- -- Name: pkgcmdargbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger(); -- -- Name: pkgcmdbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger(); -- -- Name: pkgimageaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger(); -- -- Name: pkgimagealtertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger(); -- -- Name: pkgimagebeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger(); -- -- Name: pkgmetasqlaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger(); -- -- Name: pkgmetasqlaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger(); -- -- Name: pkgmetasqlbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger(); -- -- Name: pkgprivaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger(); -- -- Name: pkgprivaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger(); -- -- Name: pkgprivbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger(); -- -- Name: pkgreportaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger(); -- -- Name: pkgreportaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger(); -- -- Name: pkgreportbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger(); -- -- Name: pkgscriptaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger(); -- -- Name: pkgscriptaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger(); -- -- Name: pkgscriptbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger(); -- -- Name: pkguiformaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger(); -- -- Name: pkguiformaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger(); -- -- Name: pkguiformbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin -- CREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger(); SET search_path = public, pg_catalog; -- -- Name: accntdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER accntdeletetrigger BEFORE DELETE ON accnt FOR EACH ROW EXECUTE PROCEDURE _accntdeletetrigger(); -- -- Name: accnttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER accnttrigger BEFORE INSERT OR UPDATE ON accnt FOR EACH ROW EXECUTE PROCEDURE _accnttrigger(); -- -- Name: accntuniquetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER accntuniquetrigger BEFORE INSERT ON accnt FOR EACH ROW EXECUTE PROCEDURE _accntuniquetrigger(); -- -- Name: addrtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER addrtrigger BEFORE INSERT OR DELETE OR UPDATE ON addr FOR EACH ROW EXECUTE PROCEDURE _addrtrigger(); -- -- Name: alarmbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER alarmbeforetrigger BEFORE INSERT ON alarm FOR EACH ROW EXECUTE PROCEDURE _alarmbeforetrigger(); -- -- Name: apapplytrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER apapplytrigger BEFORE INSERT OR UPDATE ON apapply FOR EACH ROW EXECUTE PROCEDURE _apapplytrigger(); -- -- Name: apopentrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER apopentrigger BEFORE INSERT OR UPDATE ON apopen FOR EACH ROW EXECUTE PROCEDURE _apopentrigger(); -- -- Name: arapplytrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER arapplytrigger BEFORE INSERT OR UPDATE ON arapply FOR EACH ROW EXECUTE PROCEDURE _arapplytrigger(); -- -- Name: aropenaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER aropenaftertrigger AFTER INSERT OR UPDATE ON aropen FOR EACH ROW EXECUTE PROCEDURE _aropenaftertrigger(); -- -- Name: aropentrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER aropentrigger BEFORE INSERT OR UPDATE ON aropen FOR EACH ROW EXECUTE PROCEDURE _aropentrigger(); -- -- Name: bomheadtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER bomheadtrigger AFTER INSERT OR DELETE OR UPDATE ON bomhead FOR EACH ROW EXECUTE PROCEDURE _bomheadtrigger(); -- -- Name: bomitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER bomitemaftertrigger AFTER INSERT OR UPDATE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitemaftertrigger(); -- -- Name: bomitembeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER bomitembeforedeletetrigger BEFORE DELETE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitembeforedeletetrigger(); -- -- Name: bomitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER bomitembeforetrigger BEFORE INSERT OR UPDATE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitembeforetrigger(); -- -- Name: bomitemsubtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER bomitemsubtrigger BEFORE INSERT OR DELETE OR UPDATE ON bomitemsub FOR EACH ROW EXECUTE PROCEDURE _bomitemsubtrigger(); -- -- Name: cashrcptitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cashrcptitemaftertrigger AFTER INSERT OR UPDATE ON cashrcptitem FOR EACH ROW EXECUTE PROCEDURE _cashrcptitemaftertrigger(); -- -- Name: cashrcptitemtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cashrcptitemtrigger BEFORE INSERT OR UPDATE ON cashrcptitem FOR EACH ROW EXECUTE PROCEDURE _cashrcptitemtrigger(); -- -- Name: cashrcptmisctrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cashrcptmisctrigger BEFORE INSERT OR UPDATE ON cashrcptmisc FOR EACH ROW EXECUTE PROCEDURE _cashrcptmisctrigger(); -- -- Name: cashrcpttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cashrcpttrigger BEFORE INSERT OR UPDATE ON cashrcpt FOR EACH ROW EXECUTE PROCEDURE _cashrcpttrigger(); -- -- Name: ccardtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER ccardtrigger BEFORE INSERT OR UPDATE ON ccard FOR EACH ROW EXECUTE PROCEDURE _ccardtrigger(); -- -- Name: charasshistorytrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER charasshistorytrigger BEFORE INSERT OR DELETE OR UPDATE ON charass FOR EACH ROW EXECUTE PROCEDURE _charasshistorytrigger(); -- -- Name: charasstrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER charasstrigger AFTER INSERT OR UPDATE ON charass FOR EACH ROW EXECUTE PROCEDURE _charasstrigger(); -- -- Name: charbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER charbeforetrigger BEFORE INSERT OR UPDATE ON "char" FOR EACH ROW EXECUTE PROCEDURE _charbeforetrigger(); -- -- Name: charopttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER charopttrigger AFTER DELETE OR UPDATE ON charopt FOR EACH ROW EXECUTE PROCEDURE _charopttrigger(); -- -- Name: checkheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER checkheadbeforetrigger BEFORE INSERT OR UPDATE ON checkhead FOR EACH ROW EXECUTE PROCEDURE _checkheadbeforetrigger(); -- -- Name: cmheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cmheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cmhead FOR EACH ROW EXECUTE PROCEDURE _cmheadbeforetrigger(); -- -- Name: cmheadtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cmheadtrigger AFTER INSERT OR DELETE OR UPDATE ON cmhead FOR EACH ROW EXECUTE PROCEDURE _cmheadtrigger(); -- -- Name: cmitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cmitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cmitem FOR EACH ROW EXECUTE PROCEDURE _cmitembeforetrigger(); -- -- Name: cmitemtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cmitemtrigger AFTER INSERT OR DELETE OR UPDATE ON cmitem FOR EACH ROW EXECUTE PROCEDURE _cmitemtrigger(); -- -- Name: cntcttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cntcttrigger BEFORE INSERT OR UPDATE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttrigger(); -- -- Name: cntcttriggerafter; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cntcttriggerafter AFTER INSERT OR DELETE OR UPDATE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttriggerafter(); -- -- Name: cntcttriggerbeforedelete; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cntcttriggerbeforedelete BEFORE DELETE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttriggerbeforedelete(); -- -- Name: cntsliptrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cntsliptrigger BEFORE INSERT OR DELETE OR UPDATE ON cntslip FOR EACH ROW EXECUTE PROCEDURE _cntsliptrigger(); -- -- Name: cobillbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cobillbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cobill FOR EACH ROW EXECUTE PROCEDURE _cobillbeforetrigger(); -- -- Name: cobilltrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cobilltrigger AFTER INSERT OR DELETE OR UPDATE ON cobill FOR EACH ROW EXECUTE PROCEDURE _cobilltrigger(); -- -- Name: cobmiscbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cobmiscbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cobmisc FOR EACH ROW EXECUTE PROCEDURE _cobmiscbeforetrigger(); -- -- Name: cobmisctrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER cobmisctrigger AFTER INSERT OR DELETE OR UPDATE ON cobmisc FOR EACH ROW EXECUTE PROCEDURE _cobmisctrigger(); -- -- Name: commenttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER commenttrigger AFTER INSERT OR UPDATE ON comment FOR EACH ROW EXECUTE PROCEDURE _commenttrigger(); -- -- Name: companytrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER companytrigger BEFORE UPDATE ON company FOR EACH ROW EXECUTE PROCEDURE _companytrigger(); -- -- Name: contrctaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER contrctaftertrigger AFTER UPDATE ON contrct FOR EACH ROW EXECUTE PROCEDURE _contrctaftertrigger(); -- -- Name: crmacctaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER crmacctaftertrigger AFTER INSERT OR DELETE OR UPDATE ON crmacct FOR EACH ROW EXECUTE PROCEDURE _crmacctaftertrigger(); -- -- Name: crmacctbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER crmacctbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON crmacct FOR EACH ROW EXECUTE PROCEDURE _crmacctbeforetrigger(); -- -- Name: currexchangecheckoverlap; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER currexchangecheckoverlap BEFORE INSERT OR UPDATE ON curr_rate FOR EACH ROW EXECUTE PROCEDURE currexchangecheckoverlap(); -- -- Name: curronebase; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER curronebase AFTER INSERT OR UPDATE ON curr_symbol FOR EACH ROW EXECUTE PROCEDURE curronebase(); -- -- Name: custaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER custaftertrigger AFTER INSERT OR UPDATE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custaftertrigger(); -- -- Name: custinfoafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER custinfoafterdeletetrigger AFTER DELETE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custinfoafterdeletetrigger(); -- -- Name: custinfobeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER custinfobeforedeletetrigger BEFORE DELETE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custinfobeforedeletetrigger(); -- -- Name: custtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER custtrigger BEFORE INSERT OR UPDATE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custtrigger(); -- -- Name: custtypeafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER custtypeafterdeletetrigger AFTER DELETE ON custtype FOR EACH ROW EXECUTE PROCEDURE _custtypeafterdeletetrigger(); -- -- Name: custtypetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER custtypetrigger BEFORE INSERT OR UPDATE ON custtype FOR EACH ROW EXECUTE PROCEDURE _custtypetrigger(); -- -- Name: docasstrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER docasstrigger AFTER INSERT OR UPDATE ON docass FOR EACH ROW EXECUTE PROCEDURE _docasstrigger(); -- -- Name: empafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER empafterdeletetrigger AFTER DELETE ON emp FOR EACH ROW EXECUTE PROCEDURE _empafterdeletetrigger(); -- -- Name: empaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER empaftertrigger AFTER INSERT OR UPDATE ON emp FOR EACH ROW EXECUTE PROCEDURE _empaftertrigger(); -- -- Name: empbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER empbeforedeletetrigger BEFORE DELETE ON emp FOR EACH ROW EXECUTE PROCEDURE _empbeforedeletetrigger(); -- -- Name: empbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER empbeforetrigger BEFORE INSERT OR UPDATE ON emp FOR EACH ROW EXECUTE PROCEDURE _empbeforetrigger(); -- -- Name: gltransaltertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER gltransaltertrigger BEFORE DELETE OR UPDATE ON gltrans FOR EACH ROW EXECUTE PROCEDURE _gltransaltertrigger(); -- -- Name: gltransinserttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER gltransinserttrigger BEFORE INSERT ON gltrans FOR EACH ROW EXECUTE PROCEDURE _gltransinserttrigger(); -- -- Name: grpprivtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER grpprivtrigger BEFORE INSERT OR UPDATE ON grppriv FOR EACH ROW EXECUTE PROCEDURE _grpprivtrigger(); -- -- Name: imageasstrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER imageasstrigger AFTER INSERT OR UPDATE ON imageass FOR EACH ROW EXECUTE PROCEDURE _imageasstrigger(); -- -- Name: incdtbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER incdtbeforedeletetrigger BEFORE DELETE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdtbeforedeletetrigger(); -- -- Name: incdtbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER incdtbeforetrigger BEFORE INSERT OR UPDATE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdtbeforetrigger(); -- -- Name: incdttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER incdttrigger AFTER INSERT OR DELETE OR UPDATE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdttrigger(); -- -- Name: invcheadaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER invcheadaftertrigger AFTER UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadaftertrigger(); -- -- Name: invcheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER invcheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadbeforetrigger(); -- -- Name: invcheadtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER invcheadtrigger AFTER INSERT OR DELETE OR UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadtrigger(); -- -- Name: invcitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER invcitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON invcitem FOR EACH ROW EXECUTE PROCEDURE _invcitembeforetrigger(); -- -- Name: invcitemtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER invcitemtrigger AFTER INSERT OR DELETE OR UPDATE ON invcitem FOR EACH ROW EXECUTE PROCEDURE _invcitemtrigger(); -- -- Name: invhisttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER invhisttrigger BEFORE INSERT OR UPDATE ON invhist FOR EACH ROW EXECUTE PROCEDURE invhisttrig(); -- -- Name: ipsassbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER ipsassbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsass FOR EACH ROW EXECUTE PROCEDURE _ipsassbeforetrigger(); -- -- Name: ipsheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER ipsheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipshead FOR EACH ROW EXECUTE PROCEDURE _ipsheadbeforetrigger(); -- -- Name: ipsitemcharbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER ipsitemcharbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsitemchar FOR EACH ROW EXECUTE PROCEDURE _ipsitemcharbeforetrigger(); -- -- Name: ipsiteminfobeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER ipsiteminfobeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsiteminfo FOR EACH ROW EXECUTE PROCEDURE _ipsiteminfobeforetrigger(); -- -- Name: itemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemaftertrigger AFTER INSERT OR DELETE OR UPDATE ON item FOR EACH ROW EXECUTE PROCEDURE _itemaftertrigger(); -- -- Name: itemcostaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemcostaftertrigger AFTER INSERT OR UPDATE ON itemcost FOR EACH ROW EXECUTE PROCEDURE _itemcostaftertrigger(); -- -- Name: itemcosttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemcosttrigger BEFORE INSERT OR DELETE OR UPDATE ON itemcost FOR EACH ROW EXECUTE PROCEDURE _itemcosttrigger(); -- -- Name: itemsiteaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemsiteaftertrigger AFTER INSERT OR UPDATE ON itemsite FOR EACH ROW EXECUTE PROCEDURE _itemsiteaftertrigger(); -- -- Name: itemsitetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemsitetrigger BEFORE INSERT OR UPDATE ON itemsite FOR EACH ROW EXECUTE PROCEDURE _itemsitetrigger(); -- -- Name: itemsrcaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemsrcaftertrigger AFTER INSERT OR UPDATE ON itemsrc FOR EACH ROW EXECUTE PROCEDURE _itemsrcaftertrigger(); -- -- Name: itemsrcptrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemsrcptrigger BEFORE INSERT OR UPDATE ON itemsrcp FOR EACH ROW EXECUTE PROCEDURE _itemsrcptrigger(); -- -- Name: itemsrctrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemsrctrigger BEFORE INSERT OR UPDATE ON itemsrc FOR EACH ROW EXECUTE PROCEDURE _itemsrctrigger(); -- -- Name: itemsubtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemsubtrigger AFTER INSERT OR UPDATE ON itemsub FOR EACH ROW EXECUTE PROCEDURE _itemsubtrigger(); -- -- Name: itemtaxtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemtaxtrigger AFTER INSERT OR UPDATE ON itemtax FOR EACH ROW EXECUTE PROCEDURE _itemtaxtrigger(); -- -- Name: itemtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemtrigger BEFORE INSERT OR UPDATE ON item FOR EACH ROW EXECUTE PROCEDURE _itemtrigger(); -- -- Name: itemuomconvtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER itemuomconvtrigger AFTER INSERT OR UPDATE ON itemuomconv FOR EACH ROW EXECUTE PROCEDURE _itemuomconvtrigger(); -- -- Name: locationaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER locationaftertrigger AFTER INSERT OR UPDATE ON location FOR EACH ROW EXECUTE PROCEDURE _locationaftertrigger(); -- -- Name: locationtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER locationtrigger BEFORE INSERT OR UPDATE ON location FOR EACH ROW EXECUTE PROCEDURE _locationtrigger(); -- -- Name: metasqlaltertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER metasqlaltertrigger BEFORE INSERT OR UPDATE ON metasql FOR EACH ROW EXECUTE PROCEDURE _metasqlaltertrigger(); -- -- Name: metasqltrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER metasqltrigger BEFORE INSERT OR UPDATE ON metasql FOR EACH ROW EXECUTE PROCEDURE _metasqltrigger(); -- -- Name: opheadaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER opheadaftertrigger AFTER INSERT OR DELETE OR UPDATE ON ophead FOR EACH ROW EXECUTE PROCEDURE _opheadaftertrigger(); -- -- Name: opheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER opheadbeforetrigger BEFORE INSERT OR UPDATE ON ophead FOR EACH ROW EXECUTE PROCEDURE _opheadbeforetrigger(); -- -- Name: packbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER packbeforetrigger BEFORE INSERT OR UPDATE ON pack FOR EACH ROW EXECUTE PROCEDURE _packbeforetrigger(); -- -- Name: periodaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER periodaftertrigger AFTER INSERT OR DELETE OR UPDATE ON period FOR EACH STATEMENT EXECUTE PROCEDURE _periodaftertrigger(); -- -- Name: pkgheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER pkgheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkghead FOR EACH ROW EXECUTE PROCEDURE _pkgheadbeforetrigger(); -- -- Name: pkgitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER pkgitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgitem FOR EACH ROW EXECUTE PROCEDURE _pkgitembeforetrigger(); -- -- Name: poheadtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER poheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON pohead FOR EACH ROW EXECUTE PROCEDURE _poheadtrigger(); -- -- Name: poheadtriggerafter; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER poheadtriggerafter AFTER UPDATE ON pohead FOR EACH ROW EXECUTE PROCEDURE _poheadtriggerafter(); -- -- Name: poitemtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER poitemtrigger BEFORE INSERT OR DELETE OR UPDATE ON poitem FOR EACH ROW EXECUTE PROCEDURE _poitemtrigger(); -- -- Name: prjaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prjaftertrigger AFTER INSERT OR UPDATE ON prj FOR EACH ROW EXECUTE PROCEDURE _prjaftertrigger(); -- -- Name: prjbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prjbeforedeletetrigger BEFORE DELETE ON prj FOR EACH ROW EXECUTE PROCEDURE _prjbeforedeletetrigger(); -- -- Name: prjtaskaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prjtaskaftertrigger AFTER INSERT OR UPDATE ON prjtask FOR EACH ROW EXECUTE PROCEDURE _prjtaskaftertrigger(); -- -- Name: prjtasktrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prjtasktrigger BEFORE INSERT OR UPDATE ON prjtask FOR EACH ROW EXECUTE PROCEDURE _prjtasktrigger(); -- -- Name: prospectafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prospectafterdeletetrigger AFTER DELETE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectafterdeletetrigger(); -- -- Name: prospectaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prospectaftertrigger AFTER INSERT OR UPDATE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectaftertrigger(); -- -- Name: prospectbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prospectbeforedeletetrigger BEFORE DELETE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectbeforedeletetrigger(); -- -- Name: prospecttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prospecttrigger BEFORE INSERT OR UPDATE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospecttrigger(); -- -- Name: prtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER prtrigger AFTER INSERT ON pr FOR EACH ROW EXECUTE PROCEDURE _prtrigger(); -- -- Name: quheadtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER quheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON quhead FOR EACH ROW EXECUTE PROCEDURE _quheadtrigger(); -- -- Name: quitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER quitemaftertrigger AFTER INSERT OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitemaftertrigger(); -- -- Name: quitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER quitembeforetrigger BEFORE INSERT OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitembeforetrigger(); -- -- Name: quitemtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER quitemtrigger BEFORE INSERT OR DELETE OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitemtrigger(); -- -- Name: recuraftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER recuraftertrigger AFTER DELETE ON recur FOR EACH ROW EXECUTE PROCEDURE _recuraftertrigger(); -- -- Name: reporttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER reporttrigger BEFORE INSERT OR UPDATE ON report FOR EACH ROW EXECUTE PROCEDURE _reporttrigger(); -- -- Name: salesrepafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER salesrepafterdeletetrigger AFTER DELETE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepafterdeletetrigger(); -- -- Name: salesrepaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER salesrepaftertrigger AFTER INSERT OR UPDATE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepaftertrigger(); -- -- Name: salesrepbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER salesrepbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepbeforetrigger(); -- -- Name: saletypebeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER saletypebeforedeletetrigger BEFORE DELETE ON saletype FOR EACH ROW EXECUTE PROCEDURE _saletypebeforedeletetrigger(); -- -- Name: shipdatasumtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER shipdatasumtrigger BEFORE INSERT OR UPDATE ON shipdatasum FOR EACH ROW EXECUTE PROCEDURE _shipdatasumtrigger(); -- -- Name: shipdatatrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER shipdatatrigger BEFORE INSERT OR UPDATE ON shipdata FOR EACH ROW EXECUTE PROCEDURE _shipdatatrigger(); -- -- Name: shipformafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER shipformafterdeletetrigger AFTER DELETE ON shipform FOR EACH ROW EXECUTE PROCEDURE _shipformafterdeletetrigger(); -- -- Name: shipheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER shipheadbeforetrigger BEFORE INSERT OR UPDATE ON shiphead FOR EACH ROW EXECUTE PROCEDURE _shipheadbeforetrigger(); -- -- Name: shiptoinfoaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER shiptoinfoaftertrigger AFTER INSERT OR UPDATE ON shiptoinfo FOR EACH ROW EXECUTE PROCEDURE _shiptoinfoaftertrigger(); -- -- Name: shipviaafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER shipviaafterdeletetrigger AFTER DELETE ON shipvia FOR EACH ROW EXECUTE PROCEDURE _shipviaafterdeletetrigger(); -- -- Name: sltransaltertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER sltransaltertrigger BEFORE DELETE OR UPDATE ON sltrans FOR EACH ROW EXECUTE PROCEDURE _sltransaltertrigger(); -- -- Name: sltransinserttrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER sltransinserttrigger BEFORE INSERT ON sltrans FOR EACH ROW EXECUTE PROCEDURE _sltransinserttrigger(); -- -- Name: soheadtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER soheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON cohead FOR EACH ROW EXECUTE PROCEDURE _soheadtrigger(); -- -- Name: soheadtriggerafter; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER soheadtriggerafter AFTER UPDATE ON cohead FOR EACH ROW EXECUTE PROCEDURE _soheadtriggerafter(); -- -- Name: soitemafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER soitemafterdeletetrigger AFTER DELETE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemafterdeletetrigger(); -- -- Name: soitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER soitemaftertrigger AFTER INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemaftertrigger(); -- -- Name: soitembeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER soitembeforedeletetrigger BEFORE DELETE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitembeforedeletetrigger(); -- -- Name: soitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER soitembeforetrigger BEFORE INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitembeforetrigger(); -- -- Name: soitemtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER soitemtrigger BEFORE INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemtrigger(); -- -- Name: taxauthafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER taxauthafterdeletetrigger AFTER DELETE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthafterdeletetrigger(); -- -- Name: taxauthaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER taxauthaftertrigger AFTER INSERT OR UPDATE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthaftertrigger(); -- -- Name: taxauthbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER taxauthbeforedeletetrigger BEFORE DELETE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthbeforedeletetrigger(); -- -- Name: taxauthbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER taxauthbeforetrigger BEFORE INSERT OR UPDATE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthbeforetrigger(); -- -- Name: termsafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER termsafterdeletetrigger AFTER DELETE ON terms FOR EACH ROW EXECUTE PROCEDURE _termsafterdeletetrigger(); -- -- Name: todoitemtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER todoitemtrigger BEFORE DELETE ON todoitem FOR EACH ROW EXECUTE PROCEDURE _todoitemtrigger(); -- -- Name: uomconvupdate; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER uomconvupdate BEFORE UPDATE ON uomconv FOR EACH ROW EXECUTE PROCEDURE _uomconvupdate(); -- -- Name: usrprefaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER usrprefaftertrigger AFTER INSERT OR DELETE OR UPDATE ON usrpref FOR EACH ROW EXECUTE PROCEDURE _usrprefaftertrigger(); -- -- Name: usrprefbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER usrprefbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON usrpref FOR EACH ROW EXECUTE PROCEDURE _usrprefbeforetrigger(); -- -- Name: usrprivtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER usrprivtrigger BEFORE INSERT OR UPDATE ON usrpriv FOR EACH ROW EXECUTE PROCEDURE _usrprivtrigger(); -- -- Name: vendaddrtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER vendaddrtrigger BEFORE INSERT OR DELETE OR UPDATE ON vendaddrinfo FOR EACH ROW EXECUTE PROCEDURE _vendaddrtrigger(); -- -- Name: vendaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER vendaftertrigger AFTER INSERT OR UPDATE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendaftertrigger(); -- -- Name: vendinfoafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER vendinfoafterdeletetrigger AFTER DELETE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendinfoafterdeletetrigger(); -- -- Name: vendinfobeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER vendinfobeforedeletetrigger BEFORE DELETE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendinfobeforedeletetrigger(); -- -- Name: vendtrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER vendtrigger BEFORE INSERT OR UPDATE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendtrigger(); -- -- Name: vodistaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER vodistaftertrigger AFTER INSERT OR DELETE OR UPDATE ON vodist FOR EACH ROW EXECUTE PROCEDURE _vodistaftertrigger(); -- -- Name: vodistbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER vodistbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON vodist FOR EACH ROW EXECUTE PROCEDURE _vodistbeforetrigger(); -- -- Name: voheadaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER voheadaftertrigger AFTER INSERT OR DELETE OR UPDATE ON vohead FOR EACH ROW EXECUTE PROCEDURE _voheadaftertrigger(); -- -- Name: voheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER voheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON vohead FOR EACH ROW EXECUTE PROCEDURE _voheadbeforetrigger(); -- -- Name: voitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER voitemaftertrigger AFTER INSERT OR DELETE OR UPDATE ON voitem FOR EACH ROW EXECUTE PROCEDURE _voitemaftertrigger(); -- -- Name: voitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER voitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON voitem FOR EACH ROW EXECUTE PROCEDURE _voitembeforetrigger(); -- -- Name: warehoustrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER warehoustrigger BEFORE INSERT OR UPDATE ON whsinfo FOR EACH ROW EXECUTE PROCEDURE _warehoustrigger(); -- -- Name: whsezonetrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER whsezonetrigger BEFORE INSERT OR UPDATE ON whsezone FOR EACH ROW EXECUTE PROCEDURE _whsezonetrigger(); -- -- Name: womatlaftertrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER womatlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON womatl FOR EACH ROW EXECUTE PROCEDURE _womatlaftertrigger(); -- -- Name: wotrigger; Type: TRIGGER; Schema: public; Owner: admin -- CREATE TRIGGER wotrigger BEFORE INSERT OR DELETE OR UPDATE ON wo FOR EACH ROW EXECUTE PROCEDURE _wotrigger(); SET search_path = te, pg_catalog; -- -- Name: pkgcmdaftertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger(); -- -- Name: pkgcmdaltertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger(); -- -- Name: pkgcmdargaftertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger(); -- -- Name: pkgcmdargaltertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger(); -- -- Name: pkgcmdargbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger(); -- -- Name: pkgcmdbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger(); -- -- Name: pkgimageaftertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger(); -- -- Name: pkgimagealtertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger(); -- -- Name: pkgimagebeforetrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger(); -- -- Name: pkgmetasqlaftertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger(); -- -- Name: pkgmetasqlaltertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger(); -- -- Name: pkgmetasqlbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger(); -- -- Name: pkgprivaftertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger(); -- -- Name: pkgprivaltertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger(); -- -- Name: pkgprivbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger(); -- -- Name: pkgreportaftertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger(); -- -- Name: pkgreportaltertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger(); -- -- Name: pkgreportbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger(); -- -- Name: pkgscriptaftertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger(); -- -- Name: pkgscriptaltertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger(); -- -- Name: pkgscriptbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger(); -- -- Name: pkguiformaftertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger(); -- -- Name: pkguiformaltertrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger(); -- -- Name: pkguiformbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger(); -- -- Name: teheadtrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER teheadtrigger AFTER INSERT OR UPDATE ON tehead FOR EACH ROW EXECUTE PROCEDURE triggertehead(); -- -- Name: teitemtrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER teitemtrigger AFTER INSERT OR DELETE OR UPDATE ON teitem FOR EACH ROW EXECUTE PROCEDURE triggerteitem(); -- -- Name: teprjtrigger; Type: TRIGGER; Schema: te; Owner: admin -- CREATE TRIGGER teprjtrigger AFTER INSERT OR UPDATE ON teprj FOR EACH ROW EXECUTE PROCEDURE triggerteprj(); SET search_path = xtdesktop, pg_catalog; -- -- Name: pkgcmdaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger(); -- -- Name: pkgcmdaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger(); -- -- Name: pkgcmdargaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger(); -- -- Name: pkgcmdargaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger(); -- -- Name: pkgcmdargbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger(); -- -- Name: pkgcmdbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger(); -- -- Name: pkgimageaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger(); -- -- Name: pkgimagealtertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger(); -- -- Name: pkgimagebeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger(); -- -- Name: pkgmetasqlaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger(); -- -- Name: pkgmetasqlaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger(); -- -- Name: pkgmetasqlbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger(); -- -- Name: pkgprivaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger(); -- -- Name: pkgprivaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger(); -- -- Name: pkgprivbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger(); -- -- Name: pkgreportaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger(); -- -- Name: pkgreportaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger(); -- -- Name: pkgreportbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger(); -- -- Name: pkgscriptaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger(); -- -- Name: pkgscriptaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger(); -- -- Name: pkgscriptbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger(); -- -- Name: pkguiformaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger(); -- -- Name: pkguiformaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger(); -- -- Name: pkguiformbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin -- CREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger(); SET search_path = fixcountry, pg_catalog; -- -- Name: pkgcmdarg_cmdarg_cmd_id_fkey; Type: FK CONSTRAINT; Schema: fixcountry; Owner: admin -- ALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id); SET search_path = public, pg_catalog; -- -- Name: accnt_accnt_company_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY accnt ADD CONSTRAINT accnt_accnt_company_fkey FOREIGN KEY (accnt_company) REFERENCES company(company_number) ON UPDATE CASCADE; -- -- Name: accnt_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY accnt ADD CONSTRAINT accnt_to_curr_symbol FOREIGN KEY (accnt_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: apapply_apapply_checkhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apapply ADD CONSTRAINT apapply_apapply_checkhead_id_fkey FOREIGN KEY (apapply_checkhead_id) REFERENCES checkhead(checkhead_id); -- -- Name: apapply_apapply_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apapply ADD CONSTRAINT apapply_apapply_vend_id_fkey FOREIGN KEY (apapply_vend_id) REFERENCES vendinfo(vend_id); -- -- Name: apapply_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apapply ADD CONSTRAINT apapply_to_curr_symbol FOREIGN KEY (apapply_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: apcreditapply_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apcreditapply ADD CONSTRAINT apcreditapply_curr_symbol FOREIGN KEY (apcreditapply_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: apopen_apopen_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apopen ADD CONSTRAINT apopen_apopen_vend_id_fkey FOREIGN KEY (apopen_vend_id) REFERENCES vendinfo(vend_id); -- -- Name: apopen_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apopen ADD CONSTRAINT apopen_to_curr_symbol FOREIGN KEY (apopen_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: apopentax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: apopentax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES apopen(apopen_id) ON DELETE CASCADE; -- -- Name: apopentax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: apopentax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: apselect_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY apselect ADD CONSTRAINT apselect_to_curr_symbol FOREIGN KEY (apselect_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: arapply_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY arapply ADD CONSTRAINT arapply_to_curr_symbol FOREIGN KEY (arapply_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: arcreditapply_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY arcreditapply ADD CONSTRAINT arcreditapply_curr_symbol FOREIGN KEY (arcreditapply_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: aropen_aropen_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY aropen ADD CONSTRAINT aropen_aropen_cust_id_fkey FOREIGN KEY (aropen_cust_id) REFERENCES custinfo(cust_id); -- -- Name: aropen_aropen_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY aropen ADD CONSTRAINT aropen_aropen_salesrep_id_fkey FOREIGN KEY (aropen_salesrep_id) REFERENCES salesrep(salesrep_id); -- -- Name: aropen_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY aropen ADD CONSTRAINT aropen_to_curr_symbol FOREIGN KEY (aropen_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: aropentax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: aropentax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES aropen(aropen_id) ON DELETE CASCADE; -- -- Name: aropentax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: aropentax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: asohist_asohist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY asohist ADD CONSTRAINT asohist_asohist_taxtype_id_fkey FOREIGN KEY (asohist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: asohist_asohist_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY asohist ADD CONSTRAINT asohist_asohist_taxzone_id_fkey FOREIGN KEY (asohist_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: asohist_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY asohist ADD CONSTRAINT asohist_to_curr_symbol FOREIGN KEY (asohist_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: asohisttax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: asohisttax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES asohist(asohist_id) ON DELETE CASCADE; -- -- Name: asohisttax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: asohisttax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: bankaccnt_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bankaccnt ADD CONSTRAINT bankaccnt_to_curr_symbol FOREIGN KEY (bankaccnt_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: bankadj_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bankadj ADD CONSTRAINT bankadj_to_curr_symbol FOREIGN KEY (bankadj_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: bomhead_bomhead_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomhead ADD CONSTRAINT bomhead_bomhead_item_id_fkey FOREIGN KEY (bomhead_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE; -- -- Name: bomitem_bomitem_char_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_bomitem_char_id_fkey FOREIGN KEY (bomitem_char_id) REFERENCES "char"(char_id); -- -- Name: bomitem_bomitem_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_bomitem_item_id_fkey FOREIGN KEY (bomitem_item_id) REFERENCES item(item_id); -- -- Name: bomitem_bomitem_parent_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_bomitem_parent_item_id_fkey FOREIGN KEY (bomitem_parent_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE; -- -- Name: bomitem_bomitem_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_bomitem_uom_id_fkey FOREIGN KEY (bomitem_uom_id) REFERENCES uom(uom_id); -- -- Name: bomitemcost_bomitemcost_bomitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitemcost ADD CONSTRAINT bomitemcost_bomitemcost_bomitem_id_fkey FOREIGN KEY (bomitemcost_bomitem_id) REFERENCES bomitem(bomitem_id); -- -- Name: bomitemcost_bomitemcost_costelem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitemcost ADD CONSTRAINT bomitemcost_bomitemcost_costelem_id_fkey FOREIGN KEY (bomitemcost_costelem_id) REFERENCES costelem(costelem_id); -- -- Name: bomitemcost_bomitemcost_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitemcost ADD CONSTRAINT bomitemcost_bomitemcost_curr_id_fkey FOREIGN KEY (bomitemcost_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: bomitemsub_bomitemsub_bomitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitemsub ADD CONSTRAINT bomitemsub_bomitemsub_bomitem_id_fkey FOREIGN KEY (bomitemsub_bomitem_id) REFERENCES bomitem(bomitem_id) ON UPDATE RESTRICT ON DELETE CASCADE; -- -- Name: bomitemsub_bomitemsub_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomitemsub ADD CONSTRAINT bomitemsub_bomitemsub_item_id_fkey FOREIGN KEY (bomitemsub_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE; -- -- Name: bomwork_bomwork_char_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY bomwork ADD CONSTRAINT bomwork_bomwork_char_id_fkey FOREIGN KEY (bomwork_char_id) REFERENCES "char"(char_id); -- -- Name: budgitem_budgitem_budghead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY budgitem ADD CONSTRAINT budgitem_budgitem_budghead_id_fkey FOREIGN KEY (budgitem_budghead_id) REFERENCES budghead(budghead_id); -- -- Name: budgitem_budgitem_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY budgitem ADD CONSTRAINT budgitem_budgitem_period_id_fkey FOREIGN KEY (budgitem_period_id) REFERENCES period(period_id); -- -- Name: cashrcpt_bankaccnt_bankaccnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_bankaccnt_bankaccnt_id_fkey FOREIGN KEY (cashrcpt_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id); -- -- Name: cashrcpt_cust_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_cust_cust_id_fkey FOREIGN KEY (cashrcpt_cust_id) REFERENCES custinfo(cust_id); -- -- Name: cashrcpt_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_to_curr_symbol FOREIGN KEY (cashrcpt_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: cashrcptitem_aropen_aropen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cashrcptitem ADD CONSTRAINT cashrcptitem_aropen_aropen_id_fkey FOREIGN KEY (cashrcptitem_aropen_id) REFERENCES aropen(aropen_id); -- -- Name: cashrcptitem_cashrcpt_cashrcpt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cashrcptitem ADD CONSTRAINT cashrcptitem_cashrcpt_cashrcpt_id_fkey FOREIGN KEY (cashrcptitem_cashrcpt_id) REFERENCES cashrcpt(cashrcpt_id); -- -- Name: cashrcptmisc_accnt_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cashrcptmisc ADD CONSTRAINT cashrcptmisc_accnt_accnt_id_fkey FOREIGN KEY (cashrcptmisc_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: cashrcptmisc_cashrcpt_cashrcpt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cashrcptmisc ADD CONSTRAINT cashrcptmisc_cashrcpt_cashrcpt_id_fkey FOREIGN KEY (cashrcptmisc_cashrcpt_id) REFERENCES cashrcpt(cashrcpt_id); -- -- Name: ccard_ccard_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ccard ADD CONSTRAINT ccard_ccard_cust_id_fkey FOREIGN KEY (ccard_cust_id) REFERENCES custinfo(cust_id); -- -- Name: ccbank_ccbank_bankaccnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ccbank ADD CONSTRAINT ccbank_ccbank_bankaccnt_id_fkey FOREIGN KEY (ccbank_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id); -- -- Name: charopt_charopt_char_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY charopt ADD CONSTRAINT charopt_charopt_char_id_fkey FOREIGN KEY (charopt_char_id) REFERENCES "char"(char_id) ON DELETE CASCADE; -- -- Name: checkhead_checkhead_bankaccnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY checkhead ADD CONSTRAINT checkhead_checkhead_bankaccnt_id_fkey FOREIGN KEY (checkhead_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id); -- -- Name: checkhead_checkhead_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY checkhead ADD CONSTRAINT checkhead_checkhead_curr_id_fkey FOREIGN KEY (checkhead_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: checkhead_checkhead_expcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY checkhead ADD CONSTRAINT checkhead_checkhead_expcat_id_fkey FOREIGN KEY (checkhead_expcat_id) REFERENCES expcat(expcat_id); -- -- Name: checkitem_checkitem_apopen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_checkitem_apopen_id_fkey FOREIGN KEY (checkitem_apopen_id) REFERENCES apopen(apopen_id); -- -- Name: checkitem_checkitem_aropen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_checkitem_aropen_id_fkey FOREIGN KEY (checkitem_aropen_id) REFERENCES aropen(aropen_id); -- -- Name: checkitem_checkitem_checkhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_checkitem_checkhead_id_fkey FOREIGN KEY (checkitem_checkhead_id) REFERENCES checkhead(checkhead_id); -- -- Name: checkitem_checkitem_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_checkitem_curr_id_fkey FOREIGN KEY (checkitem_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: cmdarg_cmdarg_cmd_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmdarg ADD CONSTRAINT cmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES cmd(cmd_id) ON DELETE CASCADE; -- -- Name: cmhead_cmhead_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_cust_id_fkey FOREIGN KEY (cmhead_cust_id) REFERENCES custinfo(cust_id); -- -- Name: cmhead_cmhead_freighttaxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_freighttaxtype_id_fkey FOREIGN KEY (cmhead_freighttaxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cmhead_cmhead_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_prj_id_fkey FOREIGN KEY (cmhead_prj_id) REFERENCES prj(prj_id); -- -- Name: cmhead_cmhead_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_salesrep_id_fkey FOREIGN KEY (cmhead_salesrep_id) REFERENCES salesrep(salesrep_id); -- -- Name: cmhead_cmhead_saletype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_saletype_id_fkey FOREIGN KEY (cmhead_saletype_id) REFERENCES saletype(saletype_id); -- -- Name: cmhead_cmhead_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_shipzone_id_fkey FOREIGN KEY (cmhead_shipzone_id) REFERENCES shipzone(shipzone_id); -- -- Name: cmhead_cmhead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_taxzone_id_fkey FOREIGN KEY (cmhead_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: cmhead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_to_curr_symbol FOREIGN KEY (cmhead_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: cmheadtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: cmheadtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cmhead(cmhead_id) ON DELETE CASCADE; -- -- Name: cmheadtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: cmheadtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cmitem_cmhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmhead_id_fkey FOREIGN KEY (cmitem_cmhead_id) REFERENCES cmhead(cmhead_id) ON UPDATE CASCADE ON DELETE CASCADE; -- -- Name: cmitem_cmitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmitem_price_uom_id_fkey FOREIGN KEY (cmitem_price_uom_id) REFERENCES uom(uom_id); -- -- Name: cmitem_cmitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmitem_qty_uom_id_fkey FOREIGN KEY (cmitem_qty_uom_id) REFERENCES uom(uom_id); -- -- Name: cmitem_cmitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmitem_taxtype_id_fkey FOREIGN KEY (cmitem_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cmitemtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: cmitemtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cmitem(cmitem_id) ON DELETE CASCADE; -- -- Name: cmitemtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: cmitemtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cntct_cntct_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cntct ADD CONSTRAINT cntct_cntct_addr_id_fkey FOREIGN KEY (cntct_addr_id) REFERENCES addr(addr_id); -- -- Name: cntct_cntct_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cntct ADD CONSTRAINT cntct_cntct_crmacct_id_fkey FOREIGN KEY (cntct_crmacct_id) REFERENCES crmacct(crmacct_id); -- -- Name: cntctaddr_cntctaddr_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cntctaddr ADD CONSTRAINT cntctaddr_cntctaddr_addr_id_fkey FOREIGN KEY (cntctaddr_addr_id) REFERENCES addr(addr_id); -- -- Name: cntctaddr_cntctaddr_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cntctaddr ADD CONSTRAINT cntctaddr_cntctaddr_cntct_id_fkey FOREIGN KEY (cntctaddr_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; -- -- Name: cntctdata_cntctdata_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cntctdata ADD CONSTRAINT cntctdata_cntctdata_cntct_id_fkey FOREIGN KEY (cntctdata_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; -- -- Name: cntcteml_cntcteml_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cntcteml ADD CONSTRAINT cntcteml_cntcteml_cntct_id_fkey FOREIGN KEY (cntcteml_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; -- -- Name: cntctmrgd_cntctmrgd_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cntctmrgd ADD CONSTRAINT cntctmrgd_cntctmrgd_cntct_id_fkey FOREIGN KEY (cntctmrgd_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; -- -- Name: cntctsel_cntctsel_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cntctsel ADD CONSTRAINT cntctsel_cntctsel_cntct_id_fkey FOREIGN KEY (cntctsel_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; -- -- Name: cobill_cobill_invcitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobill ADD CONSTRAINT cobill_cobill_invcitem_id_fkey FOREIGN KEY (cobill_invcitem_id) REFERENCES invcitem(invcitem_id); -- -- Name: cobill_cobill_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobill ADD CONSTRAINT cobill_cobill_taxtype_id_fkey FOREIGN KEY (cobill_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cobilltax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: cobilltax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cobill(cobill_id) ON DELETE CASCADE; -- -- Name: cobilltax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: cobilltax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cobmisc_cobmisc_invchead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_cobmisc_invchead_id_fkey FOREIGN KEY (cobmisc_invchead_id) REFERENCES invchead(invchead_id); -- -- Name: cobmisc_cobmisc_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_cobmisc_taxtype_id_fkey FOREIGN KEY (cobmisc_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cobmisc_cobmisc_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_cobmisc_taxzone_id_fkey FOREIGN KEY (cobmisc_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: cobmisc_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_to_curr_symbol FOREIGN KEY (cobmisc_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: cobmisctax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: cobmisctax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cobmisc(cobmisc_id) ON DELETE CASCADE; -- -- Name: cobmisctax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: cobmisctax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cohead_cohead_billto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_billto_cntct_id_fkey FOREIGN KEY (cohead_billto_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: cohead_cohead_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_cust_id_fkey FOREIGN KEY (cohead_cust_id) REFERENCES custinfo(cust_id); -- -- Name: cohead_cohead_misc_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_misc_accnt_id_fkey FOREIGN KEY (cohead_misc_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: cohead_cohead_ophead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_ophead_id_fkey FOREIGN KEY (cohead_ophead_id) REFERENCES ophead(ophead_id); -- -- Name: cohead_cohead_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_prj_id_fkey FOREIGN KEY (cohead_prj_id) REFERENCES prj(prj_id); -- -- Name: cohead_cohead_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_salesrep_id_fkey FOREIGN KEY (cohead_salesrep_id) REFERENCES salesrep(salesrep_id); -- -- Name: cohead_cohead_saletype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_saletype_id_fkey FOREIGN KEY (cohead_saletype_id) REFERENCES saletype(saletype_id); -- -- Name: cohead_cohead_shipform_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_shipform_id_fkey FOREIGN KEY (cohead_shipform_id) REFERENCES shipform(shipform_id); -- -- Name: cohead_cohead_shipto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_shipto_cntct_id_fkey FOREIGN KEY (cohead_shipto_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: cohead_cohead_shipto_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_shipto_id_fkey FOREIGN KEY (cohead_shipto_id) REFERENCES shiptoinfo(shipto_id); -- -- Name: cohead_cohead_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_shipzone_id_fkey FOREIGN KEY (cohead_shipzone_id) REFERENCES shipzone(shipzone_id); -- -- Name: cohead_cohead_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_taxtype_id_fkey FOREIGN KEY (cohead_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cohead_cohead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_taxzone_id_fkey FOREIGN KEY (cohead_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: cohead_cohead_terms_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_terms_id_fkey FOREIGN KEY (cohead_terms_id) REFERENCES terms(terms_id); -- -- Name: cohead_cohead_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_warehous_id_fkey FOREIGN KEY (cohead_warehous_id) REFERENCES whsinfo(warehous_id); -- -- Name: cohead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_to_curr_symbol FOREIGN KEY (cohead_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: cohist_cohist_cohead_ccpay_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_cohead_ccpay_id_fkey FOREIGN KEY (cohist_cohead_ccpay_id) REFERENCES ccpay(ccpay_id); -- -- Name: cohist_cohist_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_cust_id_fkey FOREIGN KEY (cohist_cust_id) REFERENCES custinfo(cust_id); -- -- Name: cohist_cohist_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_salesrep_id_fkey FOREIGN KEY (cohist_salesrep_id) REFERENCES salesrep(salesrep_id); -- -- Name: cohist_cohist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_taxtype_id_fkey FOREIGN KEY (cohist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: cohist_cohist_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_taxzone_id_fkey FOREIGN KEY (cohist_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: cohist_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohist ADD CONSTRAINT cohist_to_curr_symbol FOREIGN KEY (cohist_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: cohisttax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: cohisttax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cohist(cohist_id) ON DELETE CASCADE; -- -- Name: cohisttax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: cohisttax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: coitem_coitem_cohead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_cohead_id_fkey FOREIGN KEY (coitem_cohead_id) REFERENCES cohead(cohead_id) ON DELETE CASCADE; -- -- Name: coitem_coitem_cos_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_cos_accnt_id_fkey FOREIGN KEY (coitem_cos_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: coitem_coitem_itemsite_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_itemsite_id_fkey FOREIGN KEY (coitem_itemsite_id) REFERENCES itemsite(itemsite_id); -- -- Name: coitem_coitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_price_uom_id_fkey FOREIGN KEY (coitem_price_uom_id) REFERENCES uom(uom_id); -- -- Name: coitem_coitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_qty_uom_id_fkey FOREIGN KEY (coitem_qty_uom_id) REFERENCES uom(uom_id); -- -- Name: coitem_coitem_rev_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_rev_accnt_id_fkey FOREIGN KEY (coitem_rev_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: coitem_coitem_substitute_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_substitute_item_id_fkey FOREIGN KEY (coitem_substitute_item_id) REFERENCES item(item_id); -- -- Name: coitem_coitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_taxtype_id_fkey FOREIGN KEY (coitem_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: comment_comment_cmnttype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY comment ADD CONSTRAINT comment_comment_cmnttype_id_fkey FOREIGN KEY (comment_cmnttype_id) REFERENCES cmnttype(cmnttype_id); -- -- Name: company_company_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY company ADD CONSTRAINT company_company_curr_id_fkey FOREIGN KEY (company_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: company_company_dscrp_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY company ADD CONSTRAINT company_company_dscrp_accnt_id_fkey FOREIGN KEY (company_dscrp_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: company_company_gainloss_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY company ADD CONSTRAINT company_company_gainloss_accnt_id_fkey FOREIGN KEY (company_gainloss_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: company_company_unrlzgainloss_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY company ADD CONSTRAINT company_company_unrlzgainloss_accnt_id_fkey FOREIGN KEY (company_unrlzgainloss_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: company_company_yearend_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY company ADD CONSTRAINT company_company_yearend_accnt_id_fkey FOREIGN KEY (company_yearend_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: contrct_contrct_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY contrct ADD CONSTRAINT contrct_contrct_vend_id_fkey FOREIGN KEY (contrct_vend_id) REFERENCES vendinfo(vend_id); -- -- Name: costhist_new_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY costhist ADD CONSTRAINT costhist_new_to_curr_symbol FOREIGN KEY (costhist_newcurr_id) REFERENCES curr_symbol(curr_id); -- -- Name: costhist_old_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY costhist ADD CONSTRAINT costhist_old_to_curr_symbol FOREIGN KEY (costhist_oldcurr_id) REFERENCES curr_symbol(curr_id); -- -- Name: crmacct_crmacct_cntct_id_1_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_cntct_id_1_fkey FOREIGN KEY (crmacct_cntct_id_1) REFERENCES cntct(cntct_id); -- -- Name: crmacct_crmacct_cntct_id_2_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_cntct_id_2_fkey FOREIGN KEY (crmacct_cntct_id_2) REFERENCES cntct(cntct_id); -- -- Name: crmacct_crmacct_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_cust_id_fkey FOREIGN KEY (crmacct_cust_id) REFERENCES custinfo(cust_id); -- -- Name: crmacct_crmacct_emp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_emp_id_fkey FOREIGN KEY (crmacct_emp_id) REFERENCES emp(emp_id); -- -- Name: crmacct_crmacct_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_parent_id_fkey FOREIGN KEY (crmacct_parent_id) REFERENCES crmacct(crmacct_id); -- -- Name: crmacct_crmacct_prospect_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_prospect_id_fkey FOREIGN KEY (crmacct_prospect_id) REFERENCES prospect(prospect_id); -- -- Name: crmacct_crmacct_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_salesrep_id_fkey FOREIGN KEY (crmacct_salesrep_id) REFERENCES salesrep(salesrep_id); -- -- Name: crmacct_crmacct_taxauth_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_taxauth_id_fkey FOREIGN KEY (crmacct_taxauth_id) REFERENCES taxauth(taxauth_id); -- -- Name: crmacct_crmacct_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_vend_id_fkey FOREIGN KEY (crmacct_vend_id) REFERENCES vendinfo(vend_id); -- -- Name: crmacctsel_crmacctsel_dest_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacctsel ADD CONSTRAINT crmacctsel_crmacctsel_dest_crmacct_id_fkey FOREIGN KEY (crmacctsel_dest_crmacct_id) REFERENCES crmacct(crmacct_id) ON DELETE CASCADE; -- -- Name: crmacctsel_crmacctsel_src_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY crmacctsel ADD CONSTRAINT crmacctsel_crmacctsel_src_crmacct_id_fkey FOREIGN KEY (crmacctsel_src_crmacct_id) REFERENCES crmacct(crmacct_id) ON DELETE CASCADE; -- -- Name: curr_rate_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY curr_rate ADD CONSTRAINT curr_rate_to_curr_symbol FOREIGN KEY (curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: cust_creditlmt_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT cust_creditlmt_to_curr_symbol FOREIGN KEY (cust_creditlmt_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: cust_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT cust_to_curr_symbol FOREIGN KEY (cust_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: custinfo_cust_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_cntct_id_fkey FOREIGN KEY (cust_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: custinfo_cust_corrcntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_corrcntct_id_fkey FOREIGN KEY (cust_corrcntct_id) REFERENCES cntct(cntct_id); -- -- Name: custinfo_cust_custtype_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_custtype_fkey FOREIGN KEY (cust_custtype_id) REFERENCES custtype(custtype_id) ON UPDATE RESTRICT ON DELETE RESTRICT; -- -- Name: custinfo_cust_salesrep_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_salesrep_fkey FOREIGN KEY (cust_salesrep_id) REFERENCES salesrep(salesrep_id) ON UPDATE RESTRICT ON DELETE RESTRICT; -- -- Name: custinfo_cust_shipform_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_shipform_fkey FOREIGN KEY (cust_shipform_id) REFERENCES shipform(shipform_id) ON UPDATE RESTRICT ON DELETE RESTRICT; -- -- Name: custinfo_cust_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_taxzone_id_fkey FOREIGN KEY (cust_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: custinfo_cust_terms_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_terms_fkey FOREIGN KEY (cust_terms_id) REFERENCES terms(terms_id) ON UPDATE RESTRICT ON DELETE RESTRICT; -- -- Name: emp_emp_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_cntct_id_fkey FOREIGN KEY (emp_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: emp_emp_dept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_dept_id_fkey FOREIGN KEY (emp_dept_id) REFERENCES dept(dept_id); -- -- Name: emp_emp_image_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_image_id_fkey FOREIGN KEY (emp_image_id) REFERENCES image(image_id); -- -- Name: emp_emp_mgr_emp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_mgr_emp_id_fkey FOREIGN KEY (emp_mgr_emp_id) REFERENCES emp(emp_id); -- -- Name: emp_emp_shift_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_shift_id_fkey FOREIGN KEY (emp_shift_id) REFERENCES shift(shift_id); -- -- Name: emp_emp_wage_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_wage_curr_id_fkey FOREIGN KEY (emp_wage_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: emp_emp_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_warehous_id_fkey FOREIGN KEY (emp_warehous_id) REFERENCES whsinfo(warehous_id); -- -- Name: empgrpitem_empgrpitem_emp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY empgrpitem ADD CONSTRAINT empgrpitem_empgrpitem_emp_id_fkey FOREIGN KEY (empgrpitem_emp_id) REFERENCES emp(emp_id); -- -- Name: empgrpitem_empgrpitem_empgrp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY empgrpitem ADD CONSTRAINT empgrpitem_empgrpitem_empgrp_id_fkey FOREIGN KEY (empgrpitem_empgrp_id) REFERENCES empgrp(empgrp_id); -- -- Name: flnotes_flnotes_flhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY flnotes ADD CONSTRAINT flnotes_flnotes_flhead_id_fkey FOREIGN KEY (flnotes_flhead_id) REFERENCES flhead(flhead_id) ON DELETE CASCADE; -- -- Name: flnotes_flnotes_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY flnotes ADD CONSTRAINT flnotes_flnotes_period_id_fkey FOREIGN KEY (flnotes_period_id) REFERENCES period(period_id) ON DELETE CASCADE; -- -- Name: grppriv_grppriv_grp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY grppriv ADD CONSTRAINT grppriv_grppriv_grp_id_fkey FOREIGN KEY (grppriv_grp_id) REFERENCES grp(grp_id); -- -- Name: incdt_incdt_aropen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_aropen_id_fkey FOREIGN KEY (incdt_aropen_id) REFERENCES aropen(aropen_id); -- -- Name: incdt_incdt_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_cntct_id_fkey FOREIGN KEY (incdt_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: incdt_incdt_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_crmacct_id_fkey FOREIGN KEY (incdt_crmacct_id) REFERENCES crmacct(crmacct_id); -- -- Name: incdt_incdt_incdtcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_incdtcat_id_fkey FOREIGN KEY (incdt_incdtcat_id) REFERENCES incdtcat(incdtcat_id); -- -- Name: incdt_incdt_incdtpriority_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_incdtpriority_id_fkey FOREIGN KEY (incdt_incdtpriority_id) REFERENCES incdtpriority(incdtpriority_id); -- -- Name: incdt_incdt_incdtresolution_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_incdtresolution_id_fkey FOREIGN KEY (incdt_incdtresolution_id) REFERENCES incdtresolution(incdtresolution_id); -- -- Name: incdt_incdt_incdtseverity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_incdtseverity_id_fkey FOREIGN KEY (incdt_incdtseverity_id) REFERENCES incdtseverity(incdtseverity_id); -- -- Name: incdt_incdt_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_item_id_fkey FOREIGN KEY (incdt_item_id) REFERENCES item(item_id); -- -- Name: incdt_incdt_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_prj_id_fkey FOREIGN KEY (incdt_prj_id) REFERENCES prj(prj_id); -- -- Name: incdt_incdt_recurring_incdt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_recurring_incdt_id_fkey FOREIGN KEY (incdt_recurring_incdt_id) REFERENCES incdt(incdt_id); -- -- Name: incdthist_incdthist_incdt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY incdthist ADD CONSTRAINT incdthist_incdthist_incdt_id_fkey FOREIGN KEY (incdthist_incdt_id) REFERENCES incdt(incdt_id); -- -- Name: invbal_invbal_itemsite_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invbal ADD CONSTRAINT invbal_invbal_itemsite_id_fkey FOREIGN KEY (invbal_itemsite_id) REFERENCES itemsite(itemsite_id) ON DELETE CASCADE; -- -- Name: invbal_invbal_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invbal ADD CONSTRAINT invbal_invbal_period_id_fkey FOREIGN KEY (invbal_period_id) REFERENCES period(period_id) ON DELETE CASCADE; -- -- Name: invchead_invchead_saletype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invchead ADD CONSTRAINT invchead_invchead_saletype_id_fkey FOREIGN KEY (invchead_saletype_id) REFERENCES saletype(saletype_id); -- -- Name: invchead_invchead_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invchead ADD CONSTRAINT invchead_invchead_shipzone_id_fkey FOREIGN KEY (invchead_shipzone_id) REFERENCES shipzone(shipzone_id); -- -- Name: invchead_invchead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invchead ADD CONSTRAINT invchead_invchead_taxzone_id_fkey FOREIGN KEY (invchead_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: invchead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invchead ADD CONSTRAINT invchead_to_curr_symbol FOREIGN KEY (invchead_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: invcheadtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: invcheadtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES invchead(invchead_id) ON DELETE CASCADE; -- -- Name: invcheadtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: invcheadtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: invcitem_invchead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invchead_id_fkey FOREIGN KEY (invcitem_invchead_id) REFERENCES invchead(invchead_id) ON UPDATE CASCADE ON DELETE CASCADE; -- -- Name: invcitem_invcitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invcitem_price_uom_id_fkey FOREIGN KEY (invcitem_price_uom_id) REFERENCES uom(uom_id); -- -- Name: invcitem_invcitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invcitem_qty_uom_id_fkey FOREIGN KEY (invcitem_qty_uom_id) REFERENCES uom(uom_id); -- -- Name: invcitem_invcitem_rev_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invcitem_rev_accnt_id_fkey FOREIGN KEY (invcitem_rev_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: invcitem_invcitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invcitem_taxtype_id_fkey FOREIGN KEY (invcitem_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: invcitemtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: invcitemtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES invcitem(invcitem_id) ON DELETE CASCADE; -- -- Name: invcitemtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: invcitemtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: invhistexpcat_invhistexpcat_expcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invhistexpcat ADD CONSTRAINT invhistexpcat_invhistexpcat_expcat_id_fkey FOREIGN KEY (invhistexpcat_expcat_id) REFERENCES expcat(expcat_id) ON UPDATE CASCADE ON DELETE CASCADE; -- -- Name: invhistexpcat_invhistexpcat_invhist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY invhistexpcat ADD CONSTRAINT invhistexpcat_invhistexpcat_invhist_id_fkey FOREIGN KEY (invhistexpcat_invhist_id) REFERENCES invhist(invhist_id) ON UPDATE CASCADE ON DELETE CASCADE; -- -- Name: ipsass_ipsass_ipshead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsass ADD CONSTRAINT ipsass_ipsass_ipshead_id_fkey FOREIGN KEY (ipsass_ipshead_id) REFERENCES ipshead(ipshead_id); -- -- Name: ipsfreight_ipsfreight_freightclass_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_ipsfreight_freightclass_id_fkey FOREIGN KEY (ipsfreight_freightclass_id) REFERENCES freightclass(freightclass_id); -- -- Name: ipsfreight_ipsfreight_ipshead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_ipsfreight_ipshead_id_fkey FOREIGN KEY (ipsfreight_ipshead_id) REFERENCES ipshead(ipshead_id); -- -- Name: ipsfreight_ipsfreight_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_ipsfreight_shipzone_id_fkey FOREIGN KEY (ipsfreight_shipzone_id) REFERENCES shipzone(shipzone_id); -- -- Name: ipsfreight_ipsfreight_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_ipsfreight_warehous_id_fkey FOREIGN KEY (ipsfreight_warehous_id) REFERENCES whsinfo(warehous_id); -- -- Name: ipshead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipshead ADD CONSTRAINT ipshead_to_curr_symbol FOREIGN KEY (ipshead_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: ipsitem_ipshead_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipshead_id_fk FOREIGN KEY (ipsitem_ipshead_id) REFERENCES ipshead(ipshead_id) ON DELETE CASCADE; -- -- Name: ipsitem_ipsitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipsitem_price_uom_id_fkey FOREIGN KEY (ipsitem_price_uom_id) REFERENCES uom(uom_id); -- -- Name: ipsitem_ipsitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipsitem_qty_uom_id_fkey FOREIGN KEY (ipsitem_qty_uom_id) REFERENCES uom(uom_id); -- -- Name: ipsitem_ipsitem_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipsitem_warehous_id_fkey FOREIGN KEY (ipsitem_warehous_id) REFERENCES whsinfo(warehous_id); -- -- Name: ipsitem_item_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_item_id_fk FOREIGN KEY (ipsitem_item_id) REFERENCES item(item_id); -- -- Name: ipsitemchar_ipsitemchar_char_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_ipsitemchar_char_id_fkey FOREIGN KEY (ipsitemchar_char_id) REFERENCES "char"(char_id); -- -- Name: ipsitemchar_ipsitemchar_ipsitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_fkey FOREIGN KEY (ipsitemchar_ipsitem_id) REFERENCES ipsiteminfo(ipsitem_id) ON DELETE CASCADE; -- -- Name: item_item_classcode_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY item ADD CONSTRAINT item_item_classcode_id_fkey FOREIGN KEY (item_classcode_id) REFERENCES classcode(classcode_id); -- -- Name: item_item_freightclass_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY item ADD CONSTRAINT item_item_freightclass_id_fkey FOREIGN KEY (item_freightclass_id) REFERENCES freightclass(freightclass_id); -- -- Name: item_item_inv_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY item ADD CONSTRAINT item_item_inv_uom_id_fkey FOREIGN KEY (item_inv_uom_id) REFERENCES uom(uom_id); -- -- Name: item_item_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY item ADD CONSTRAINT item_item_price_uom_id_fkey FOREIGN KEY (item_price_uom_id) REFERENCES uom(uom_id); -- -- Name: itemalias_itemalias_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemalias ADD CONSTRAINT itemalias_itemalias_item_id_fkey FOREIGN KEY (itemalias_item_id) REFERENCES item(item_id); -- -- Name: itemcost_itemcost_costelem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_itemcost_costelem_id_fkey FOREIGN KEY (itemcost_costelem_id) REFERENCES costelem(costelem_id); -- -- Name: itemcost_itemcost_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_itemcost_curr_id_fkey FOREIGN KEY (itemcost_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: itemcost_itemcost_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_itemcost_item_id_fkey FOREIGN KEY (itemcost_item_id) REFERENCES item(item_id); -- -- Name: itemcost_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_to_curr_symbol FOREIGN KEY (itemcost_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: itemsite_itemsite_costcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_itemsite_costcat_id_fkey FOREIGN KEY (itemsite_costcat_id) REFERENCES costcat(costcat_id); -- -- Name: itemsite_itemsite_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_itemsite_item_id_fkey FOREIGN KEY (itemsite_item_id) REFERENCES item(item_id); -- -- Name: itemsite_itemsite_plancode_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_itemsite_plancode_id_fkey FOREIGN KEY (itemsite_plancode_id) REFERENCES plancode(plancode_id); -- -- Name: itemsite_itemsite_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_itemsite_warehous_id_fkey FOREIGN KEY (itemsite_warehous_id) REFERENCES whsinfo(warehous_id); -- -- Name: itemsrc_itemsrc_contrct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_itemsrc_contrct_id_fkey FOREIGN KEY (itemsrc_contrct_id) REFERENCES contrct(contrct_id); -- -- Name: itemsrc_itemsrc_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_itemsrc_item_id_fkey FOREIGN KEY (itemsrc_item_id) REFERENCES item(item_id) ON DELETE CASCADE; -- -- Name: itemsrc_itemsrc_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_itemsrc_vend_id_fkey FOREIGN KEY (itemsrc_vend_id) REFERENCES vendinfo(vend_id) ON DELETE CASCADE; -- -- Name: itemsrcp_itemsrcp_itemsrc_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsrcp ADD CONSTRAINT itemsrcp_itemsrcp_itemsrc_id_fkey FOREIGN KEY (itemsrcp_itemsrc_id) REFERENCES itemsrc(itemsrc_id) ON DELETE CASCADE; -- -- Name: itemsrcp_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsrcp ADD CONSTRAINT itemsrcp_to_curr_symbol FOREIGN KEY (itemsrcp_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: itemsub_itemsub_parent_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsub ADD CONSTRAINT itemsub_itemsub_parent_item_id_fkey FOREIGN KEY (itemsub_parent_item_id) REFERENCES item(item_id); -- -- Name: itemsub_itemsub_sub_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemsub ADD CONSTRAINT itemsub_itemsub_sub_item_id_fkey FOREIGN KEY (itemsub_sub_item_id) REFERENCES item(item_id); -- -- Name: itemtax_itemtax_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemtax ADD CONSTRAINT itemtax_itemtax_item_id_fkey FOREIGN KEY (itemtax_item_id) REFERENCES item(item_id); -- -- Name: itemtax_itemtax_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemtax ADD CONSTRAINT itemtax_itemtax_taxtype_id_fkey FOREIGN KEY (itemtax_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: itemtax_itemtax_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemtax ADD CONSTRAINT itemtax_itemtax_taxzone_id_fkey FOREIGN KEY (itemtax_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: itemtrans_itemtrans_source_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemtrans ADD CONSTRAINT itemtrans_itemtrans_source_item_id_fkey FOREIGN KEY (itemtrans_source_item_id) REFERENCES item(item_id); -- -- Name: itemtrans_itemtrans_target_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemtrans ADD CONSTRAINT itemtrans_itemtrans_target_item_id_fkey FOREIGN KEY (itemtrans_target_item_id) REFERENCES item(item_id); -- -- Name: itemuom_itemuom_itemuomconv_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemuom ADD CONSTRAINT itemuom_itemuom_itemuomconv_id_fkey FOREIGN KEY (itemuom_itemuomconv_id) REFERENCES itemuomconv(itemuomconv_id); -- -- Name: itemuom_itemuom_uomtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemuom ADD CONSTRAINT itemuom_itemuom_uomtype_id_fkey FOREIGN KEY (itemuom_uomtype_id) REFERENCES uomtype(uomtype_id); -- -- Name: itemuomconv_itemuomconv_from_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemuomconv ADD CONSTRAINT itemuomconv_itemuomconv_from_uom_id_fkey FOREIGN KEY (itemuomconv_from_uom_id) REFERENCES uom(uom_id); -- -- Name: itemuomconv_itemuomconv_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemuomconv ADD CONSTRAINT itemuomconv_itemuomconv_item_id_fkey FOREIGN KEY (itemuomconv_item_id) REFERENCES item(item_id); -- -- Name: itemuomconv_itemuomconv_to_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY itemuomconv ADD CONSTRAINT itemuomconv_itemuomconv_to_uom_id_fkey FOREIGN KEY (itemuomconv_to_uom_id) REFERENCES uom(uom_id); -- -- Name: mrghist_mrghist_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY mrghist ADD CONSTRAINT mrghist_mrghist_cntct_id_fkey FOREIGN KEY (mrghist_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; -- -- Name: ophead_ophead_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_cntct_id_fkey FOREIGN KEY (ophead_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: ophead_ophead_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_crmacct_id_fkey FOREIGN KEY (ophead_crmacct_id) REFERENCES crmacct(crmacct_id); -- -- Name: ophead_ophead_opsource_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_opsource_id_fkey FOREIGN KEY (ophead_opsource_id) REFERENCES opsource(opsource_id); -- -- Name: ophead_ophead_opstage_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_opstage_id_fkey FOREIGN KEY (ophead_opstage_id) REFERENCES opstage(opstage_id); -- -- Name: ophead_ophead_optype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_optype_id_fkey FOREIGN KEY (ophead_optype_id) REFERENCES optype(optype_id); -- -- Name: ophead_ophead_priority_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_priority_id_fkey FOREIGN KEY (ophead_priority_id) REFERENCES incdtpriority(incdtpriority_id); -- -- Name: pack_pack_shiphead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pack ADD CONSTRAINT pack_pack_shiphead_id_fkey FOREIGN KEY (pack_shiphead_id) REFERENCES shiphead(shiphead_id); -- -- Name: payco_payco_ccpay_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY payco ADD CONSTRAINT payco_payco_ccpay_id_fkey FOREIGN KEY (payco_ccpay_id) REFERENCES ccpay(ccpay_id); -- -- Name: payco_payco_cohead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY payco ADD CONSTRAINT payco_payco_cohead_id_fkey FOREIGN KEY (payco_cohead_id) REFERENCES cohead(cohead_id); -- -- Name: pkgdep_pkgdep_parent_pkghead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pkgdep ADD CONSTRAINT pkgdep_pkgdep_parent_pkghead_id_fkey FOREIGN KEY (pkgdep_parent_pkghead_id) REFERENCES pkghead(pkghead_id); -- -- Name: pkgdep_pkgdep_pkghead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pkgdep ADD CONSTRAINT pkgdep_pkgdep_pkghead_id_fkey FOREIGN KEY (pkgdep_pkghead_id) REFERENCES pkghead(pkghead_id); -- -- Name: pkgitem_pkgitem_pkghead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pkgitem ADD CONSTRAINT pkgitem_pkgitem_pkghead_id_fkey FOREIGN KEY (pkgitem_pkghead_id) REFERENCES pkghead(pkghead_id) ON DELETE CASCADE; -- -- Name: pohead_pohead_cohead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_cohead_id_fkey FOREIGN KEY (pohead_cohead_id) REFERENCES cohead(cohead_id) ON DELETE SET NULL; -- -- Name: pohead_pohead_shipto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_shipto_cntct_id_fkey FOREIGN KEY (pohead_shipto_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: pohead_pohead_shiptoddress_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_shiptoddress_id_fkey FOREIGN KEY (pohead_shiptoaddress_id) REFERENCES addr(addr_id); -- -- Name: pohead_pohead_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_taxtype_id_fkey FOREIGN KEY (pohead_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: pohead_pohead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_taxzone_id_fkey FOREIGN KEY (pohead_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: pohead_pohead_terms_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_terms_id_fkey FOREIGN KEY (pohead_terms_id) REFERENCES terms(terms_id); -- -- Name: pohead_pohead_vend_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_vend_cntct_id_fkey FOREIGN KEY (pohead_vend_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: pohead_pohead_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_vend_id_fkey FOREIGN KEY (pohead_vend_id) REFERENCES vendinfo(vend_id); -- -- Name: pohead_pohead_vendaddr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_vendaddr_id_fkey FOREIGN KEY (pohead_vendaddr_id) REFERENCES vendaddrinfo(vendaddr_id); -- -- Name: pohead_pohead_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_warehous_id_fkey FOREIGN KEY (pohead_warehous_id) REFERENCES whsinfo(warehous_id); -- -- Name: pohead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_to_curr_symbol FOREIGN KEY (pohead_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: poitem_poitem_expcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_expcat_id_fkey FOREIGN KEY (poitem_expcat_id) REFERENCES expcat(expcat_id); -- -- Name: poitem_poitem_itemsite_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_itemsite_id_fkey FOREIGN KEY (poitem_itemsite_id) REFERENCES itemsite(itemsite_id); -- -- Name: poitem_poitem_itemsrc_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_itemsrc_id_fkey FOREIGN KEY (poitem_itemsrc_id) REFERENCES itemsrc(itemsrc_id); -- -- Name: poitem_poitem_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_prj_id_fkey FOREIGN KEY (poitem_prj_id) REFERENCES prj(prj_id); -- -- Name: poitem_poitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_taxtype_id_fkey FOREIGN KEY (poitem_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: poreject_poreject_recv_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY poreject ADD CONSTRAINT poreject_poreject_recv_id_fkey FOREIGN KEY (poreject_recv_id) REFERENCES recv(recv_id); -- -- Name: poreject_poreject_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY poreject ADD CONSTRAINT poreject_poreject_vend_id_fkey FOREIGN KEY (poreject_vend_id) REFERENCES vendinfo(vend_id); -- -- Name: prj_prj_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY prj ADD CONSTRAINT prj_prj_cntct_id_fkey FOREIGN KEY (prj_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: prj_prj_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY prj ADD CONSTRAINT prj_prj_crmacct_id_fkey FOREIGN KEY (prj_crmacct_id) REFERENCES crmacct(crmacct_id); -- -- Name: prj_prj_recurring_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY prj ADD CONSTRAINT prj_prj_recurring_prj_id_fkey FOREIGN KEY (prj_recurring_prj_id) REFERENCES prj(prj_id); -- -- Name: prjtask_prjtask_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY prjtask ADD CONSTRAINT prjtask_prjtask_prj_id_fkey FOREIGN KEY (prjtask_prj_id) REFERENCES prj(prj_id); -- -- Name: prospect_prospect_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_cntct_id_fkey FOREIGN KEY (prospect_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: prospect_prospect_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_salesrep_id_fkey FOREIGN KEY (prospect_salesrep_id) REFERENCES salesrep(salesrep_id); -- -- Name: prospect_prospect_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_taxzone_id_fkey FOREIGN KEY (prospect_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: prospect_prospect_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_warehous_id_fkey FOREIGN KEY (prospect_warehous_id) REFERENCES whsinfo(warehous_id); -- -- Name: qryitem_qryitem_qryhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY qryitem ADD CONSTRAINT qryitem_qryitem_qryhead_id_fkey FOREIGN KEY (qryitem_qryhead_id) REFERENCES qryhead(qryhead_id); -- -- Name: quhead_quhead_billto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_billto_cntct_id_fkey FOREIGN KEY (quhead_billto_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: quhead_quhead_misc_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_misc_accnt_id_fkey FOREIGN KEY (quhead_misc_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: quhead_quhead_ophead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_ophead_id_fkey FOREIGN KEY (quhead_ophead_id) REFERENCES ophead(ophead_id); -- -- Name: quhead_quhead_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_prj_id_fkey FOREIGN KEY (quhead_prj_id) REFERENCES prj(prj_id); -- -- Name: quhead_quhead_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_salesrep_id_fkey FOREIGN KEY (quhead_salesrep_id) REFERENCES salesrep(salesrep_id); -- -- Name: quhead_quhead_saletype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_saletype_id_fkey FOREIGN KEY (quhead_saletype_id) REFERENCES saletype(saletype_id); -- -- Name: quhead_quhead_shipto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_shipto_cntct_id_fkey FOREIGN KEY (quhead_shipto_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: quhead_quhead_shipto_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_shipto_id_fkey FOREIGN KEY (quhead_shipto_id) REFERENCES shiptoinfo(shipto_id); -- -- Name: quhead_quhead_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_shipzone_id_fkey FOREIGN KEY (quhead_shipzone_id) REFERENCES shipzone(shipzone_id); -- -- Name: quhead_quhead_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_taxtype_id_fkey FOREIGN KEY (quhead_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: quhead_quhead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_taxzone_id_fkey FOREIGN KEY (quhead_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: quhead_quhead_terms_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_terms_id_fkey FOREIGN KEY (quhead_terms_id) REFERENCES terms(terms_id); -- -- Name: quhead_quhead_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_warehous_id_fkey FOREIGN KEY (quhead_warehous_id) REFERENCES whsinfo(warehous_id); -- -- Name: quhead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_to_curr_symbol FOREIGN KEY (quhead_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: quitem_quitem_itemsrc_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quitem ADD CONSTRAINT quitem_quitem_itemsrc_id_fkey FOREIGN KEY (quitem_itemsrc_id) REFERENCES itemsrc(itemsrc_id); -- -- Name: quitem_quitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quitem ADD CONSTRAINT quitem_quitem_price_uom_id_fkey FOREIGN KEY (quitem_price_uom_id) REFERENCES uom(uom_id); -- -- Name: quitem_quitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quitem ADD CONSTRAINT quitem_quitem_qty_uom_id_fkey FOREIGN KEY (quitem_qty_uom_id) REFERENCES uom(uom_id); -- -- Name: quitem_quitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY quitem ADD CONSTRAINT quitem_quitem_taxtype_id_fkey FOREIGN KEY (quitem_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: recv_recv_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_freight_curr_id_fkey FOREIGN KEY (recv_freight_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: recv_recv_itemsite_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_itemsite_id_fkey FOREIGN KEY (recv_itemsite_id) REFERENCES itemsite(itemsite_id); -- -- Name: recv_recv_purchcost_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_purchcost_curr_id_fkey FOREIGN KEY (recv_purchcost_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: recv_recv_recvcost_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_recvcost_curr_id_fkey FOREIGN KEY (recv_recvcost_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: recv_recv_splitfrom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_splitfrom_id_fkey FOREIGN KEY (recv_splitfrom_id) REFERENCES recv(recv_id); -- -- Name: recv_recv_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_vend_id_fkey FOREIGN KEY (recv_vend_id) REFERENCES vendinfo(vend_id); -- -- Name: recv_recv_vohead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_vohead_id_fkey FOREIGN KEY (recv_vohead_id) REFERENCES vohead(vohead_id); -- -- Name: recv_recv_voitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_voitem_id_fkey FOREIGN KEY (recv_voitem_id) REFERENCES voitem(voitem_id); -- -- Name: salesrep_salesrep_emp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY salesrep ADD CONSTRAINT salesrep_salesrep_emp_id_fkey FOREIGN KEY (salesrep_emp_id) REFERENCES emp(emp_id); -- -- Name: shipdata_shipdata_base_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipdata ADD CONSTRAINT shipdata_shipdata_base_freight_curr_id_fkey FOREIGN KEY (shipdata_base_freight_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: shipdata_shipdata_shiphead_number_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipdata ADD CONSTRAINT shipdata_shipdata_shiphead_number_fkey FOREIGN KEY (shipdata_shiphead_number) REFERENCES shiphead(shiphead_number); -- -- Name: shipdata_shipdata_total_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipdata ADD CONSTRAINT shipdata_shipdata_total_freight_curr_id_fkey FOREIGN KEY (shipdata_total_freight_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: shipdatasum_shipdatasum_base_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipdatasum ADD CONSTRAINT shipdatasum_shipdatasum_base_freight_curr_id_fkey FOREIGN KEY (shipdatasum_base_freight_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: shipdatasum_shipdatasum_shiphead_number_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipdatasum ADD CONSTRAINT shipdatasum_shipdatasum_shiphead_number_fkey FOREIGN KEY (shipdatasum_shiphead_number) REFERENCES shiphead(shiphead_number); -- -- Name: shipdatasum_shipdatasum_total_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipdatasum ADD CONSTRAINT shipdatasum_shipdatasum_total_freight_curr_id_fkey FOREIGN KEY (shipdatasum_total_freight_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: shiphead_shiphead_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_shiphead_freight_curr_id_fkey FOREIGN KEY (shiphead_freight_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: shiphead_shiphead_shipchrg_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_shiphead_shipchrg_id_fkey FOREIGN KEY (shiphead_shipchrg_id) REFERENCES shipchrg(shipchrg_id); -- -- Name: shiphead_shiphead_shipform_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_shiphead_shipform_id_fkey FOREIGN KEY (shiphead_shipform_id) REFERENCES shipform(shipform_id); -- -- Name: shipitem_shipitem_invcitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipitem ADD CONSTRAINT shipitem_shipitem_invcitem_id_fkey FOREIGN KEY (shipitem_invcitem_id) REFERENCES invcitem(invcitem_id); -- -- Name: shipitem_shipitem_invhist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipitem ADD CONSTRAINT shipitem_shipitem_invhist_id_fkey FOREIGN KEY (shipitem_invhist_id) REFERENCES invhist(invhist_id); -- -- Name: shipitem_shipitem_shiphead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shipitem ADD CONSTRAINT shipitem_shipitem_shiphead_id_fkey FOREIGN KEY (shipitem_shiphead_id) REFERENCES shiphead(shiphead_id); -- -- Name: shiptoinfo_shipto_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_addr_id_fkey FOREIGN KEY (shipto_addr_id) REFERENCES addr(addr_id); -- -- Name: shiptoinfo_shipto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_cntct_id_fkey FOREIGN KEY (shipto_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: shiptoinfo_shipto_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_cust_id_fkey FOREIGN KEY (shipto_cust_id) REFERENCES custinfo(cust_id); -- -- Name: shiptoinfo_shipto_salesrep_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_salesrep_fkey FOREIGN KEY (shipto_salesrep_id) REFERENCES salesrep(salesrep_id) ON UPDATE RESTRICT ON DELETE RESTRICT; -- -- Name: shiptoinfo_shipto_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_salesrep_id_fkey FOREIGN KEY (shipto_salesrep_id) REFERENCES salesrep(salesrep_id); -- -- Name: shiptoinfo_shipto_shipform_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_shipform_fkey FOREIGN KEY (shipto_shipform_id) REFERENCES shipform(shipform_id) ON UPDATE RESTRICT ON DELETE RESTRICT; -- -- Name: shiptoinfo_shipto_shipform_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_shipform_id_fkey FOREIGN KEY (shipto_shipform_id) REFERENCES shipform(shipform_id); -- -- Name: shiptoinfo_shipto_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_shipzone_id_fkey FOREIGN KEY (shipto_shipzone_id) REFERENCES shipzone(shipzone_id); -- -- Name: shiptoinfo_shipto_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_taxzone_id_fkey FOREIGN KEY (shipto_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: state_state_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY state ADD CONSTRAINT state_state_country_id_fkey FOREIGN KEY (state_country_id) REFERENCES country(country_id); -- -- Name: tax_tax_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY tax ADD CONSTRAINT tax_tax_basis_tax_id_fkey FOREIGN KEY (tax_basis_tax_id) REFERENCES tax(tax_id) ON DELETE CASCADE; -- -- Name: tax_tax_sales_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY tax ADD CONSTRAINT tax_tax_sales_accnt_id_fkey FOREIGN KEY (tax_sales_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: tax_tax_taxauth_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY tax ADD CONSTRAINT tax_tax_taxauth_id_fkey FOREIGN KEY (tax_taxauth_id) REFERENCES taxauth(taxauth_id); -- -- Name: tax_tax_taxclass_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY tax ADD CONSTRAINT tax_tax_taxclass_id_fkey FOREIGN KEY (tax_taxclass_id) REFERENCES taxclass(taxclass_id); -- -- Name: taxass_taxass_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxass ADD CONSTRAINT taxass_taxass_tax_id_fkey FOREIGN KEY (taxass_tax_id) REFERENCES tax(tax_id); -- -- Name: taxass_taxass_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxass ADD CONSTRAINT taxass_taxass_taxtype_id_fkey FOREIGN KEY (taxass_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: taxass_taxass_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxass ADD CONSTRAINT taxass_taxass_taxzone_id_fkey FOREIGN KEY (taxass_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: taxauth_taxauth_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_taxauth_accnt_id_fkey FOREIGN KEY (taxauth_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: taxauth_taxauth_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_taxauth_addr_id_fkey FOREIGN KEY (taxauth_addr_id) REFERENCES addr(addr_id); -- -- Name: taxauth_taxauth_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_taxauth_curr_id_fkey FOREIGN KEY (taxauth_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: taxhist_taxhist_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxhist ADD CONSTRAINT taxhist_taxhist_curr_id_fkey FOREIGN KEY (taxhist_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: taxhist_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxhist ADD CONSTRAINT taxhist_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: taxhist_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxhist ADD CONSTRAINT taxhist_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: taxrate_taxrate_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxrate ADD CONSTRAINT taxrate_taxrate_curr_id_fkey FOREIGN KEY (taxrate_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: taxrate_taxrate_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxrate ADD CONSTRAINT taxrate_taxrate_tax_id_fkey FOREIGN KEY (taxrate_tax_id) REFERENCES tax(tax_id); -- -- Name: taxreg_taxreg_taxauth_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxreg ADD CONSTRAINT taxreg_taxreg_taxauth_id_fkey FOREIGN KEY (taxreg_taxauth_id) REFERENCES taxauth(taxauth_id); -- -- Name: taxreg_taxreg_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY taxreg ADD CONSTRAINT taxreg_taxreg_taxzone_id_fkey FOREIGN KEY (taxreg_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: todoitem_todoitem_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_cntct_id_fkey FOREIGN KEY (todoitem_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: todoitem_todoitem_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_crmacct_id_fkey FOREIGN KEY (todoitem_crmacct_id) REFERENCES crmacct(crmacct_id); -- -- Name: todoitem_todoitem_incdt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_incdt_id_fkey FOREIGN KEY (todoitem_incdt_id) REFERENCES incdt(incdt_id); -- -- Name: todoitem_todoitem_ophead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_ophead_id_fkey FOREIGN KEY (todoitem_ophead_id) REFERENCES ophead(ophead_id) ON UPDATE RESTRICT ON DELETE RESTRICT; -- -- Name: todoitem_todoitem_recurring_todoitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_recurring_todoitem_id_fkey FOREIGN KEY (todoitem_recurring_todoitem_id) REFERENCES todoitem(todoitem_id); -- -- Name: trgthist_trgthist_src_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY trgthist ADD CONSTRAINT trgthist_trgthist_src_cntct_id_fkey FOREIGN KEY (trgthist_src_cntct_id) REFERENCES cntctmrgd(cntctmrgd_cntct_id) ON DELETE CASCADE; -- -- Name: trgthist_trgthist_trgt_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY trgthist ADD CONSTRAINT trgthist_trgthist_trgt_cntct_id_fkey FOREIGN KEY (trgthist_trgt_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; -- -- Name: uomconv_uomconv_from_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY uomconv ADD CONSTRAINT uomconv_uomconv_from_uom_id_fkey FOREIGN KEY (uomconv_from_uom_id) REFERENCES uom(uom_id); -- -- Name: uomconv_uomconv_to_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY uomconv ADD CONSTRAINT uomconv_uomconv_to_uom_id_fkey FOREIGN KEY (uomconv_to_uom_id) REFERENCES uom(uom_id); -- -- Name: usrgrp_usrgrp_grp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY usrgrp ADD CONSTRAINT usrgrp_usrgrp_grp_id_fkey FOREIGN KEY (usrgrp_grp_id) REFERENCES grp(grp_id); -- -- Name: vend_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendinfo ADD CONSTRAINT vend_to_curr_symbol FOREIGN KEY (vend_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: vend_vend_cntct1_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendinfo ADD CONSTRAINT vend_vend_cntct1_id_fkey FOREIGN KEY (vend_cntct1_id) REFERENCES cntct(cntct_id); -- -- Name: vend_vend_cntct2_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendinfo ADD CONSTRAINT vend_vend_cntct2_id_fkey FOREIGN KEY (vend_cntct2_id) REFERENCES cntct(cntct_id); -- -- Name: vendaddrinfo_vendaddr_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendaddrinfo ADD CONSTRAINT vendaddrinfo_vendaddr_addr_id_fkey FOREIGN KEY (vendaddr_addr_id) REFERENCES addr(addr_id); -- -- Name: vendaddrinfo_vendaddr_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendaddrinfo ADD CONSTRAINT vendaddrinfo_vendaddr_cntct_id_fkey FOREIGN KEY (vendaddr_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: vendaddrinfo_vendaddr_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendaddrinfo ADD CONSTRAINT vendaddrinfo_vendaddr_taxzone_id_fkey FOREIGN KEY (vendaddr_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: vendinfo_vend_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendinfo ADD CONSTRAINT vendinfo_vend_addr_id_fkey FOREIGN KEY (vend_addr_id) REFERENCES addr(addr_id); -- -- Name: vendinfo_vend_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendinfo ADD CONSTRAINT vendinfo_vend_taxzone_id_fkey FOREIGN KEY (vend_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: vendinfo_vend_vendtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vendinfo ADD CONSTRAINT vendinfo_vend_vendtype_id_fkey FOREIGN KEY (vend_vendtype_id) REFERENCES vendtype(vendtype_id); -- -- Name: vohead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_to_curr_symbol FOREIGN KEY (vohead_curr_id) REFERENCES curr_symbol(curr_id); -- -- Name: vohead_vohead_adjtaxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_adjtaxtype_id_fkey FOREIGN KEY (vohead_adjtaxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: vohead_vohead_freighttaxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_freighttaxtype_id_fkey FOREIGN KEY (vohead_freighttaxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: vohead_vohead_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_taxtype_id_fkey FOREIGN KEY (vohead_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: vohead_vohead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_taxzone_id_fkey FOREIGN KEY (vohead_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: vohead_vohead_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_vend_id_fkey FOREIGN KEY (vohead_vend_id) REFERENCES vendinfo(vend_id); -- -- Name: voheadtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: voheadtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES vohead(vohead_id) ON DELETE CASCADE; -- -- Name: voheadtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: voheadtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: voitem_voitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voitem ADD CONSTRAINT voitem_voitem_taxtype_id_fkey FOREIGN KEY (voitem_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: voitemtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); -- -- Name: voitemtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES voitem(voitem_id) ON DELETE CASCADE; -- -- Name: voitemtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); -- -- Name: voitemtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); -- -- Name: whsinfo_warehous_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_accnt_id_fkey FOREIGN KEY (warehous_default_accnt_id) REFERENCES accnt(accnt_id); -- -- Name: whsinfo_warehous_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_addr_id_fkey FOREIGN KEY (warehous_addr_id) REFERENCES addr(addr_id); -- -- Name: whsinfo_warehous_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_cntct_id_fkey FOREIGN KEY (warehous_cntct_id) REFERENCES cntct(cntct_id); -- -- Name: whsinfo_warehous_costcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_costcat_id_fkey FOREIGN KEY (warehous_costcat_id) REFERENCES costcat(costcat_id); -- -- Name: whsinfo_warehous_shipform_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_shipform_id_fkey FOREIGN KEY (warehous_shipform_id) REFERENCES shipform(shipform_id); -- -- Name: whsinfo_warehous_shipvia_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_shipvia_id_fkey FOREIGN KEY (warehous_shipvia_id) REFERENCES shipvia(shipvia_id); -- -- Name: whsinfo_warehous_sitetype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_sitetype_id_fkey FOREIGN KEY (warehous_sitetype_id) REFERENCES sitetype(sitetype_id); -- -- Name: whsinfo_warehous_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_taxzone_id_fkey FOREIGN KEY (warehous_taxzone_id) REFERENCES taxzone(taxzone_id); -- -- Name: wo_wo_womatl_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY wo ADD CONSTRAINT wo_wo_womatl_id_fkey FOREIGN KEY (wo_womatl_id) REFERENCES womatl(womatl_id) ON DELETE SET NULL; -- -- Name: womatl_womatl_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY womatl ADD CONSTRAINT womatl_womatl_uom_id_fkey FOREIGN KEY (womatl_uom_id) REFERENCES uom(uom_id); -- -- Name: womatlpost_womatlpost_invhist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY womatlpost ADD CONSTRAINT womatlpost_womatlpost_invhist_id_fkey FOREIGN KEY (womatlpost_invhist_id) REFERENCES invhist(invhist_id); -- -- Name: womatlpost_womatlpost_womatl_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin -- ALTER TABLE ONLY womatlpost ADD CONSTRAINT womatlpost_womatlpost_womatl_id_fkey FOREIGN KEY (womatlpost_womatl_id) REFERENCES womatl(womatl_id) ON DELETE CASCADE; SET search_path = te, pg_catalog; -- -- Name: pkgcmdarg_cmdarg_cmd_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id); -- -- Name: tecustrate_tecustrate_curr_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY tecustrate ADD CONSTRAINT tecustrate_tecustrate_curr_id_fkey FOREIGN KEY (tecustrate_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT; -- -- Name: tecustrate_tecustrate_cust_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY tecustrate ADD CONSTRAINT tecustrate_tecustrate_cust_id_fkey FOREIGN KEY (tecustrate_cust_id) REFERENCES public.custinfo(cust_id) ON DELETE CASCADE; -- -- Name: teemp_teemp_emp_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teemp ADD CONSTRAINT teemp_teemp_emp_id_fkey FOREIGN KEY (teemp_emp_id) REFERENCES public.emp(emp_id) ON DELETE CASCADE; -- -- Name: teitem_teitem_curr_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teitem ADD CONSTRAINT teitem_teitem_curr_id_fkey FOREIGN KEY (teitem_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT; -- -- Name: teitem_teitem_invcitem_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teitem ADD CONSTRAINT teitem_teitem_invcitem_id_fkey FOREIGN KEY (teitem_invcitem_id) REFERENCES public.invcitem(invcitem_id) ON DELETE SET NULL; -- -- Name: teitem_teitem_tehead_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teitem ADD CONSTRAINT teitem_teitem_tehead_id_fkey FOREIGN KEY (teitem_tehead_id) REFERENCES tehead(tehead_id) ON DELETE CASCADE; -- -- Name: teitem_teitem_vodist_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teitem ADD CONSTRAINT teitem_teitem_vodist_id_fkey FOREIGN KEY (teitem_vodist_id) REFERENCES public.vodist(vodist_id) ON DELETE SET NULL; -- -- Name: teprj_teprj_curr_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teprj ADD CONSTRAINT teprj_teprj_curr_id_fkey FOREIGN KEY (teprj_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET NULL; -- -- Name: teprj_teprj_cust_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teprj ADD CONSTRAINT teprj_teprj_cust_id_fkey FOREIGN KEY (teprj_cust_id) REFERENCES public.custinfo(cust_id) ON DELETE SET NULL; -- -- Name: teprjtask_teprjtask_curr_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_teprjtask_curr_id_fkey FOREIGN KEY (teprjtask_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT; -- -- Name: teprjtask_teprjtask_item_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_teprjtask_item_id_fkey FOREIGN KEY (teprjtask_item_id) REFERENCES public.item(item_id) ON DELETE SET NULL; -- -- Name: teprjtask_teprjtask_prjtask_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin -- ALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_teprjtask_prjtask_id_fkey FOREIGN KEY (teprjtask_prjtask_id) REFERENCES public.prjtask(prjtask_id) ON DELETE CASCADE; SET search_path = xtdesktop, pg_catalog; -- -- Name: pkgcmdarg_cmdarg_cmd_id_fkey; Type: FK CONSTRAINT; Schema: xtdesktop; Owner: admin -- ALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id); -- -- Name: api; Type: ACL; Schema: -; Owner: admin -- REVOKE ALL ON SCHEMA api FROM PUBLIC; REVOKE ALL ON SCHEMA api FROM admin; GRANT ALL ON SCHEMA api TO admin; GRANT ALL ON SCHEMA api TO xtrole; -- -- Name: fixcountry; Type: ACL; Schema: -; Owner: admin -- REVOKE ALL ON SCHEMA fixcountry FROM PUBLIC; REVOKE ALL ON SCHEMA fixcountry FROM admin; GRANT ALL ON SCHEMA fixcountry TO admin; GRANT ALL ON SCHEMA fixcountry TO xtrole; -- -- Name: public; Type: ACL; Schema: -; Owner: postgres -- REVOKE ALL ON SCHEMA public FROM PUBLIC; REVOKE ALL ON SCHEMA public FROM postgres; GRANT ALL ON SCHEMA public TO postgres; GRANT ALL ON SCHEMA public TO PUBLIC; -- -- Name: te; Type: ACL; Schema: -; Owner: admin -- REVOKE ALL ON SCHEMA te FROM PUBLIC; REVOKE ALL ON SCHEMA te FROM admin; GRANT ALL ON SCHEMA te TO admin; GRANT ALL ON SCHEMA te TO xtrole; -- -- Name: xtdesktop; Type: ACL; Schema: -; Owner: admin -- REVOKE ALL ON SCHEMA xtdesktop FROM PUBLIC; REVOKE ALL ON SCHEMA xtdesktop FROM admin; GRANT ALL ON SCHEMA xtdesktop TO admin; GRANT ALL ON SCHEMA xtdesktop TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cntslip; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cntslip FROM PUBLIC; REVOKE ALL ON TABLE cntslip FROM admin; GRANT ALL ON TABLE cntslip TO admin; GRANT ALL ON TABLE cntslip TO xtrole; -- -- Name: invcnt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invcnt FROM PUBLIC; REVOKE ALL ON TABLE invcnt FROM admin; GRANT ALL ON TABLE invcnt TO admin; GRANT ALL ON TABLE invcnt TO xtrole; -- -- Name: item; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE item FROM PUBLIC; REVOKE ALL ON TABLE item FROM admin; GRANT ALL ON TABLE item TO admin; GRANT ALL ON TABLE item TO xtrole; -- -- Name: itemsite; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemsite FROM PUBLIC; REVOKE ALL ON TABLE itemsite FROM admin; GRANT ALL ON TABLE itemsite TO admin; GRANT ALL ON TABLE itemsite TO xtrole; -- -- Name: whsinfo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE whsinfo FROM PUBLIC; REVOKE ALL ON TABLE whsinfo FROM admin; GRANT ALL ON TABLE whsinfo TO admin; GRANT ALL ON TABLE whsinfo TO xtrole; SET search_path = api, pg_catalog; -- -- Name: physinvcount; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE physinvcount FROM PUBLIC; REVOKE ALL ON TABLE physinvcount FROM admin; GRANT ALL ON TABLE physinvcount TO admin; GRANT ALL ON TABLE physinvcount TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cohead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cohead FROM PUBLIC; REVOKE ALL ON TABLE cohead FROM admin; GRANT ALL ON TABLE cohead TO admin; GRANT ALL ON TABLE cohead TO xtrole; -- -- Name: coitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE coitem FROM PUBLIC; REVOKE ALL ON TABLE coitem FROM admin; GRANT ALL ON TABLE coitem TO admin; GRANT ALL ON TABLE coitem TO xtrole; -- -- Name: pohead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE pohead FROM PUBLIC; REVOKE ALL ON TABLE pohead FROM admin; GRANT ALL ON TABLE pohead TO admin; GRANT ALL ON TABLE pohead TO xtrole; -- -- Name: poitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE poitem FROM PUBLIC; REVOKE ALL ON TABLE poitem FROM admin; GRANT ALL ON TABLE poitem TO admin; GRANT ALL ON TABLE poitem TO xtrole; -- -- Name: taxtype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE taxtype FROM PUBLIC; REVOKE ALL ON TABLE taxtype FROM admin; GRANT ALL ON TABLE taxtype TO admin; GRANT ALL ON TABLE taxtype TO xtrole; -- -- Name: uom; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE uom FROM PUBLIC; REVOKE ALL ON TABLE uom FROM admin; GRANT ALL ON TABLE uom TO admin; GRANT ALL ON TABLE uom TO xtrole; SET search_path = api, pg_catalog; -- -- Name: salesline; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE salesline FROM PUBLIC; REVOKE ALL ON TABLE salesline FROM admin; GRANT ALL ON TABLE salesline TO admin; GRANT ALL ON TABLE salesline TO xtrole; SET search_path = public, pg_catalog; -- -- Name: invbal; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invbal FROM PUBLIC; REVOKE ALL ON TABLE invbal FROM admin; GRANT ALL ON TABLE invbal TO admin; GRANT ALL ON TABLE invbal TO xtrole; -- -- Name: bomitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bomitem FROM PUBLIC; REVOKE ALL ON TABLE bomitem FROM admin; GRANT ALL ON TABLE bomitem TO admin; GRANT ALL ON TABLE bomitem TO xtrole; -- -- Name: cntct; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cntct FROM PUBLIC; REVOKE ALL ON TABLE cntct FROM admin; GRANT ALL ON TABLE cntct TO admin; GRANT ALL ON TABLE cntct TO xtrole; -- -- Name: crmacct; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE crmacct FROM PUBLIC; REVOKE ALL ON TABLE crmacct FROM admin; GRANT ALL ON TABLE crmacct TO admin; GRANT ALL ON TABLE crmacct TO xtrole; -- -- Name: incdt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE incdt FROM PUBLIC; REVOKE ALL ON TABLE incdt FROM admin; GRANT ALL ON TABLE incdt TO admin; GRANT ALL ON TABLE incdt TO xtrole; -- -- Name: apopen; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apopen FROM PUBLIC; REVOKE ALL ON TABLE apopen FROM admin; GRANT ALL ON TABLE apopen TO admin; GRANT ALL ON TABLE apopen TO xtrole; -- -- Name: curr_symbol; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE curr_symbol FROM PUBLIC; REVOKE ALL ON TABLE curr_symbol FROM admin; GRANT ALL ON TABLE curr_symbol TO admin; GRANT ALL ON TABLE curr_symbol TO xtrole; -- -- Name: terms; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE terms FROM PUBLIC; REVOKE ALL ON TABLE terms FROM admin; GRANT ALL ON TABLE terms TO admin; GRANT ALL ON TABLE terms TO xtrole; -- -- Name: vendinfo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE vendinfo FROM PUBLIC; REVOKE ALL ON TABLE vendinfo FROM admin; GRANT ALL ON TABLE vendinfo TO admin; GRANT ALL ON TABLE vendinfo TO xtrole; SET search_path = api, pg_catalog; -- -- Name: apmemo; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE apmemo FROM PUBLIC; REVOKE ALL ON TABLE apmemo FROM admin; GRANT ALL ON TABLE apmemo TO admin; GRANT ALL ON TABLE apmemo TO xtrole; SET search_path = public, pg_catalog; -- -- Name: aropen; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE aropen FROM PUBLIC; REVOKE ALL ON TABLE aropen FROM admin; GRANT ALL ON TABLE aropen TO admin; GRANT ALL ON TABLE aropen TO xtrole; -- -- Name: custinfo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE custinfo FROM PUBLIC; REVOKE ALL ON TABLE custinfo FROM admin; GRANT ALL ON TABLE custinfo TO admin; GRANT ALL ON TABLE custinfo TO xtrole; -- -- Name: rsncode; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE rsncode FROM PUBLIC; REVOKE ALL ON TABLE rsncode FROM admin; GRANT ALL ON TABLE rsncode TO admin; GRANT ALL ON TABLE rsncode TO xtrole; -- -- Name: salescat; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE salescat FROM PUBLIC; REVOKE ALL ON TABLE salescat FROM admin; GRANT ALL ON TABLE salescat TO admin; GRANT ALL ON TABLE salescat TO xtrole; -- -- Name: salesrep; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE salesrep FROM PUBLIC; REVOKE ALL ON TABLE salesrep FROM admin; GRANT ALL ON TABLE salesrep TO admin; GRANT ALL ON TABLE salesrep TO xtrole; SET search_path = api, pg_catalog; -- -- Name: armemo; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE armemo FROM PUBLIC; REVOKE ALL ON TABLE armemo FROM admin; GRANT ALL ON TABLE armemo TO admin; GRANT ALL ON TABLE armemo TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cmhead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cmhead FROM PUBLIC; REVOKE ALL ON TABLE cmhead FROM admin; GRANT ALL ON TABLE cmhead TO admin; GRANT ALL ON TABLE cmhead TO xtrole; -- -- Name: shiptoinfo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shiptoinfo FROM PUBLIC; REVOKE ALL ON TABLE shiptoinfo FROM admin; GRANT ALL ON TABLE shiptoinfo TO admin; GRANT ALL ON TABLE shiptoinfo TO xtrole; -- -- Name: taxzone; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE taxzone FROM PUBLIC; REVOKE ALL ON TABLE taxzone FROM admin; GRANT ALL ON TABLE taxzone TO admin; GRANT ALL ON TABLE taxzone TO xtrole; SET search_path = api, pg_catalog; -- -- Name: creditmemo; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE creditmemo FROM PUBLIC; REVOKE ALL ON TABLE creditmemo FROM admin; GRANT ALL ON TABLE creditmemo TO admin; GRANT ALL ON TABLE creditmemo TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cmitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cmitem FROM PUBLIC; REVOKE ALL ON TABLE cmitem FROM admin; GRANT ALL ON TABLE cmitem TO admin; GRANT ALL ON TABLE cmitem TO xtrole; SET search_path = api, pg_catalog; -- -- Name: creditmemoline; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE creditmemoline FROM PUBLIC; REVOKE ALL ON TABLE creditmemoline FROM admin; GRANT ALL ON TABLE creditmemoline TO admin; GRANT ALL ON TABLE creditmemoline TO xtrole; SET search_path = public, pg_catalog; -- -- Name: invchead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invchead FROM PUBLIC; REVOKE ALL ON TABLE invchead FROM admin; GRANT ALL ON TABLE invchead TO admin; GRANT ALL ON TABLE invchead TO xtrole; -- -- Name: prj; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE prj FROM PUBLIC; REVOKE ALL ON TABLE prj FROM admin; GRANT ALL ON TABLE prj TO admin; GRANT ALL ON TABLE prj TO xtrole; -- -- Name: saletype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE saletype FROM PUBLIC; REVOKE ALL ON TABLE saletype FROM admin; GRANT ALL ON TABLE saletype TO admin; GRANT ALL ON TABLE saletype TO xtrole; -- -- Name: shipzone; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shipzone FROM PUBLIC; REVOKE ALL ON TABLE shipzone FROM admin; GRANT ALL ON TABLE shipzone TO admin; GRANT ALL ON TABLE shipzone TO xtrole; SET search_path = api, pg_catalog; -- -- Name: invoice; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE invoice FROM PUBLIC; REVOKE ALL ON TABLE invoice FROM admin; GRANT ALL ON TABLE invoice TO admin; GRANT ALL ON TABLE invoice TO xtrole; SET search_path = public, pg_catalog; -- -- Name: invcitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invcitem FROM PUBLIC; REVOKE ALL ON TABLE invcitem FROM admin; GRANT ALL ON TABLE invcitem TO admin; GRANT ALL ON TABLE invcitem TO xtrole; SET search_path = api, pg_catalog; -- -- Name: invoiceline; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE invoiceline FROM PUBLIC; REVOKE ALL ON TABLE invoiceline FROM admin; GRANT ALL ON TABLE invoiceline TO admin; GRANT ALL ON TABLE invoiceline TO xtrole; SET search_path = public, pg_catalog; -- -- Name: ophead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ophead FROM PUBLIC; REVOKE ALL ON TABLE ophead FROM admin; GRANT ALL ON TABLE ophead TO admin; GRANT ALL ON TABLE ophead TO xtrole; -- -- Name: prjtask; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE prjtask FROM PUBLIC; REVOKE ALL ON TABLE prjtask FROM admin; GRANT ALL ON TABLE prjtask TO admin; GRANT ALL ON TABLE prjtask TO xtrole; -- -- Name: todoitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE todoitem FROM PUBLIC; REVOKE ALL ON TABLE todoitem FROM admin; GRANT ALL ON TABLE todoitem TO admin; GRANT ALL ON TABLE todoitem TO xtrole; -- -- Name: addr; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE addr FROM PUBLIC; REVOKE ALL ON TABLE addr FROM admin; GRANT ALL ON TABLE addr TO admin; GRANT ALL ON TABLE addr TO xtrole; SET search_path = api, pg_catalog; -- -- Name: account; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE account FROM PUBLIC; REVOKE ALL ON TABLE account FROM admin; GRANT ALL ON TABLE account TO admin; GRANT ALL ON TABLE account TO xtrole; SET search_path = public, pg_catalog; -- -- Name: char; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE "char" FROM PUBLIC; REVOKE ALL ON TABLE "char" FROM admin; GRANT ALL ON TABLE "char" TO admin; GRANT ALL ON TABLE "char" TO xtrole; -- -- Name: charass; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE charass FROM PUBLIC; REVOKE ALL ON TABLE charass FROM admin; GRANT ALL ON TABLE charass TO admin; GRANT ALL ON TABLE charass TO xtrole; SET search_path = api, pg_catalog; -- -- Name: accountchar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE accountchar FROM PUBLIC; REVOKE ALL ON TABLE accountchar FROM admin; GRANT ALL ON TABLE accountchar TO admin; GRANT ALL ON TABLE accountchar TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cmnttype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cmnttype FROM PUBLIC; REVOKE ALL ON TABLE cmnttype FROM admin; GRANT ALL ON TABLE cmnttype TO admin; GRANT ALL ON TABLE cmnttype TO xtrole; -- -- Name: comment; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE comment FROM PUBLIC; REVOKE ALL ON TABLE comment FROM admin; GRANT ALL ON TABLE comment TO admin; GRANT ALL ON TABLE comment TO xtrole; SET search_path = api, pg_catalog; -- -- Name: accountcomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE accountcomment FROM PUBLIC; REVOKE ALL ON TABLE accountcomment FROM admin; GRANT ALL ON TABLE accountcomment TO admin; GRANT ALL ON TABLE accountcomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: docass; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE docass FROM PUBLIC; REVOKE ALL ON TABLE docass FROM admin; GRANT ALL ON TABLE docass TO admin; GRANT ALL ON TABLE docass TO xtrole; -- -- Name: file; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE file FROM PUBLIC; REVOKE ALL ON TABLE file FROM admin; GRANT ALL ON TABLE file TO admin; GRANT ALL ON TABLE file TO xtrole; -- -- Name: urlinfo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE urlinfo FROM PUBLIC; REVOKE ALL ON TABLE urlinfo FROM admin; GRANT ALL ON TABLE urlinfo TO admin; GRANT ALL ON TABLE urlinfo TO xtrole; -- -- Name: url; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE url FROM PUBLIC; REVOKE ALL ON TABLE url FROM admin; GRANT ALL ON TABLE url TO admin; GRANT ALL ON TABLE url TO xtrole; SET search_path = api, pg_catalog; -- -- Name: accountfile; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE accountfile FROM PUBLIC; REVOKE ALL ON TABLE accountfile FROM admin; GRANT ALL ON TABLE accountfile TO admin; GRANT ALL ON TABLE accountfile TO xtrole; SET search_path = public, pg_catalog; -- -- Name: docass_docass_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE docass_docass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE docass_docass_id_seq FROM admin; GRANT ALL ON SEQUENCE docass_docass_id_seq TO admin; GRANT ALL ON SEQUENCE docass_docass_id_seq TO xtrole; -- -- Name: image; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE image FROM PUBLIC; REVOKE ALL ON TABLE image FROM admin; GRANT ALL ON TABLE image TO admin; GRANT ALL ON TABLE image TO xtrole; -- -- Name: imageass; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE imageass FROM PUBLIC; REVOKE ALL ON TABLE imageass FROM admin; GRANT ALL ON TABLE imageass TO admin; GRANT ALL ON TABLE imageass TO xtrole; SET search_path = api, pg_catalog; -- -- Name: accountimage; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE accountimage FROM PUBLIC; REVOKE ALL ON TABLE accountimage FROM admin; GRANT ALL ON TABLE accountimage TO admin; GRANT ALL ON TABLE accountimage TO xtrole; -- -- Name: address; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE address FROM PUBLIC; REVOKE ALL ON TABLE address FROM admin; GRANT ALL ON TABLE address TO admin; GRANT ALL ON TABLE address TO xtrole; -- -- Name: addresschar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE addresschar FROM PUBLIC; REVOKE ALL ON TABLE addresschar FROM admin; GRANT ALL ON TABLE addresschar TO admin; GRANT ALL ON TABLE addresschar TO xtrole; -- -- Name: addresscomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE addresscomment FROM PUBLIC; REVOKE ALL ON TABLE addresscomment FROM admin; GRANT ALL ON TABLE addresscomment TO admin; GRANT ALL ON TABLE addresscomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: bomhead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bomhead FROM PUBLIC; REVOKE ALL ON TABLE bomhead FROM admin; GRANT ALL ON TABLE bomhead TO admin; GRANT ALL ON TABLE bomhead TO xtrole; SET search_path = api, pg_catalog; -- -- Name: bom; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE bom FROM PUBLIC; REVOKE ALL ON TABLE bom FROM admin; GRANT ALL ON TABLE bom TO admin; GRANT ALL ON TABLE bom TO xtrole; -- -- Name: bomitem; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE bomitem FROM PUBLIC; REVOKE ALL ON TABLE bomitem FROM admin; GRANT ALL ON TABLE bomitem TO admin; GRANT ALL ON TABLE bomitem TO xtrole; -- -- Name: bomitemcomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE bomitemcomment FROM PUBLIC; REVOKE ALL ON TABLE bomitemcomment FROM admin; GRANT ALL ON TABLE bomitemcomment TO admin; GRANT ALL ON TABLE bomitemcomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: bomitemsub; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bomitemsub FROM PUBLIC; REVOKE ALL ON TABLE bomitemsub FROM admin; GRANT ALL ON TABLE bomitemsub TO admin; GRANT ALL ON TABLE bomitemsub TO xtrole; SET search_path = api, pg_catalog; -- -- Name: bomitemsubstitute; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE bomitemsubstitute FROM PUBLIC; REVOKE ALL ON TABLE bomitemsubstitute FROM admin; GRANT ALL ON TABLE bomitemsubstitute TO admin; GRANT ALL ON TABLE bomitemsubstitute TO xtrole; SET search_path = public, pg_catalog; -- -- Name: budghead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE budghead FROM PUBLIC; REVOKE ALL ON TABLE budghead FROM admin; GRANT ALL ON TABLE budghead TO admin; GRANT ALL ON TABLE budghead TO xtrole; SET search_path = api, pg_catalog; -- -- Name: budget; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE budget FROM PUBLIC; REVOKE ALL ON TABLE budget FROM admin; GRANT ALL ON TABLE budget TO admin; GRANT ALL ON TABLE budget TO xtrole; SET search_path = public, pg_catalog; -- -- Name: accnt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE accnt FROM PUBLIC; REVOKE ALL ON TABLE accnt FROM admin; GRANT ALL ON TABLE accnt TO admin; GRANT ALL ON TABLE accnt TO xtrole; -- -- Name: budgitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE budgitem FROM PUBLIC; REVOKE ALL ON TABLE budgitem FROM admin; GRANT ALL ON TABLE budgitem TO admin; GRANT ALL ON TABLE budgitem TO xtrole; -- -- Name: period; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE period FROM PUBLIC; REVOKE ALL ON TABLE period FROM admin; GRANT ALL ON TABLE period TO admin; GRANT ALL ON TABLE period TO xtrole; SET search_path = api, pg_catalog; -- -- Name: budgetentry; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE budgetentry FROM PUBLIC; REVOKE ALL ON TABLE budgetentry FROM admin; GRANT ALL ON TABLE budgetentry TO admin; GRANT ALL ON TABLE budgetentry TO xtrole; SET search_path = public, pg_catalog; -- -- Name: bankaccnt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bankaccnt FROM PUBLIC; REVOKE ALL ON TABLE bankaccnt FROM admin; GRANT ALL ON TABLE bankaccnt TO admin; GRANT ALL ON TABLE bankaccnt TO xtrole; -- -- Name: cashrcpt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cashrcpt FROM PUBLIC; REVOKE ALL ON TABLE cashrcpt FROM admin; GRANT ALL ON TABLE cashrcpt TO admin; GRANT ALL ON TABLE cashrcpt TO xtrole; SET search_path = api, pg_catalog; -- -- Name: cashreceipt; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE cashreceipt FROM PUBLIC; REVOKE ALL ON TABLE cashreceipt FROM admin; GRANT ALL ON TABLE cashreceipt TO admin; GRANT ALL ON TABLE cashreceipt TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cashrcptitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cashrcptitem FROM PUBLIC; REVOKE ALL ON TABLE cashrcptitem FROM admin; GRANT ALL ON TABLE cashrcptitem TO admin; GRANT ALL ON TABLE cashrcptitem TO xtrole; SET search_path = api, pg_catalog; -- -- Name: cashreceiptapply; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE cashreceiptapply FROM PUBLIC; REVOKE ALL ON TABLE cashreceiptapply FROM admin; GRANT ALL ON TABLE cashreceiptapply TO admin; GRANT ALL ON TABLE cashreceiptapply TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cashrcptmisc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cashrcptmisc FROM PUBLIC; REVOKE ALL ON TABLE cashrcptmisc FROM admin; GRANT ALL ON TABLE cashrcptmisc TO admin; GRANT ALL ON TABLE cashrcptmisc TO xtrole; SET search_path = api, pg_catalog; -- -- Name: cashreceiptapplymisc; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE cashreceiptapplymisc FROM PUBLIC; REVOKE ALL ON TABLE cashreceiptapplymisc FROM admin; GRANT ALL ON TABLE cashreceiptapplymisc TO admin; GRANT ALL ON TABLE cashreceiptapplymisc TO xtrole; -- -- Name: contact; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE contact FROM PUBLIC; REVOKE ALL ON TABLE contact FROM admin; GRANT ALL ON TABLE contact TO admin; GRANT ALL ON TABLE contact TO xtrole; -- -- Name: contactchar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE contactchar FROM PUBLIC; REVOKE ALL ON TABLE contactchar FROM admin; GRANT ALL ON TABLE contactchar TO admin; GRANT ALL ON TABLE contactchar TO xtrole; -- -- Name: contactcomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE contactcomment FROM PUBLIC; REVOKE ALL ON TABLE contactcomment FROM admin; GRANT ALL ON TABLE contactcomment TO admin; GRANT ALL ON TABLE contactcomment TO xtrole; -- -- Name: custchar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE custchar FROM PUBLIC; REVOKE ALL ON TABLE custchar FROM admin; GRANT ALL ON TABLE custchar TO admin; GRANT ALL ON TABLE custchar TO xtrole; -- -- Name: custcomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE custcomment FROM PUBLIC; REVOKE ALL ON TABLE custcomment FROM admin; GRANT ALL ON TABLE custcomment TO admin; GRANT ALL ON TABLE custcomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: ccard; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ccard FROM PUBLIC; REVOKE ALL ON TABLE ccard FROM admin; GRANT ALL ON TABLE ccard TO admin; GRANT ALL ON TABLE ccard TO xtrole; SET search_path = api, pg_catalog; -- -- Name: custcreditcard; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE custcreditcard FROM PUBLIC; REVOKE ALL ON TABLE custcreditcard FROM admin; GRANT ALL ON TABLE custcreditcard TO admin; GRANT ALL ON TABLE custcreditcard TO xtrole; SET search_path = public, pg_catalog; -- -- Name: custtype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE custtype FROM PUBLIC; REVOKE ALL ON TABLE custtype FROM admin; GRANT ALL ON TABLE custtype TO admin; GRANT ALL ON TABLE custtype TO xtrole; -- -- Name: shipchrg; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shipchrg FROM PUBLIC; REVOKE ALL ON TABLE shipchrg FROM admin; GRANT ALL ON TABLE shipchrg TO admin; GRANT ALL ON TABLE shipchrg TO xtrole; -- -- Name: shipform; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shipform FROM PUBLIC; REVOKE ALL ON TABLE shipform FROM admin; GRANT ALL ON TABLE shipform TO admin; GRANT ALL ON TABLE shipform TO xtrole; SET search_path = api, pg_catalog; -- -- Name: customer; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE customer FROM PUBLIC; REVOKE ALL ON TABLE customer FROM admin; GRANT ALL ON TABLE customer TO admin; GRANT ALL ON TABLE customer TO xtrole; SET search_path = public, pg_catalog; -- -- Name: taxauth; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE taxauth FROM PUBLIC; REVOKE ALL ON TABLE taxauth FROM admin; GRANT ALL ON TABLE taxauth TO admin; GRANT ALL ON TABLE taxauth TO xtrole; -- -- Name: taxreg; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE taxreg FROM PUBLIC; REVOKE ALL ON TABLE taxreg FROM admin; GRANT ALL ON TABLE taxreg TO admin; GRANT ALL ON TABLE taxreg TO xtrole; SET search_path = api, pg_catalog; -- -- Name: customertaxreg; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE customertaxreg FROM PUBLIC; REVOKE ALL ON TABLE customertaxreg FROM admin; GRANT ALL ON TABLE customertaxreg TO admin; GRANT ALL ON TABLE customertaxreg TO xtrole; -- -- Name: customertype; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE customertype FROM PUBLIC; REVOKE ALL ON TABLE customertype FROM admin; GRANT ALL ON TABLE customertype TO admin; GRANT ALL ON TABLE customertype TO xtrole; -- -- Name: customertypechar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE customertypechar FROM PUBLIC; REVOKE ALL ON TABLE customertypechar FROM admin; GRANT ALL ON TABLE customertypechar TO admin; GRANT ALL ON TABLE customertypechar TO xtrole; -- -- Name: custshipto; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE custshipto FROM PUBLIC; REVOKE ALL ON TABLE custshipto FROM admin; GRANT ALL ON TABLE custshipto TO admin; GRANT ALL ON TABLE custshipto TO xtrole; -- -- Name: custtax; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE custtax FROM PUBLIC; REVOKE ALL ON TABLE custtax FROM admin; GRANT ALL ON TABLE custtax TO admin; GRANT ALL ON TABLE custtax TO xtrole; SET search_path = public, pg_catalog; -- -- Name: dept; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE dept FROM PUBLIC; REVOKE ALL ON TABLE dept FROM admin; GRANT ALL ON TABLE dept TO admin; GRANT ALL ON TABLE dept TO xtrole; -- -- Name: emp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE emp FROM PUBLIC; REVOKE ALL ON TABLE emp FROM admin; GRANT ALL ON TABLE emp TO admin; GRANT ALL ON TABLE emp TO xtrole; -- -- Name: shift; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shift FROM PUBLIC; REVOKE ALL ON TABLE shift FROM admin; GRANT ALL ON TABLE shift TO admin; GRANT ALL ON TABLE shift TO xtrole; SET search_path = api, pg_catalog; -- -- Name: employee; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE employee FROM PUBLIC; REVOKE ALL ON TABLE employee FROM admin; GRANT ALL ON TABLE employee TO admin; GRANT ALL ON TABLE employee TO xtrole; -- -- Name: employeechar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE employeechar FROM PUBLIC; REVOKE ALL ON TABLE employeechar FROM admin; GRANT ALL ON TABLE employeechar TO admin; GRANT ALL ON TABLE employeechar TO xtrole; -- -- Name: employeecomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE employeecomment FROM PUBLIC; REVOKE ALL ON TABLE employeecomment FROM admin; GRANT ALL ON TABLE employeecomment TO admin; GRANT ALL ON TABLE employeecomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: shipdata; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shipdata FROM PUBLIC; REVOKE ALL ON TABLE shipdata FROM admin; GRANT ALL ON TABLE shipdata TO admin; GRANT ALL ON TABLE shipdata TO xtrole; SET search_path = api, pg_catalog; -- -- Name: extshipmaint; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE extshipmaint FROM PUBLIC; REVOKE ALL ON TABLE extshipmaint FROM admin; GRANT ALL ON TABLE extshipmaint TO admin; GRANT ALL ON TABLE extshipmaint TO xtrole; SET search_path = public, pg_catalog; -- -- Name: freightclass; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE freightclass FROM PUBLIC; REVOKE ALL ON TABLE freightclass FROM admin; GRANT ALL ON TABLE freightclass TO admin; GRANT ALL ON TABLE freightclass TO xtrole; -- -- Name: ipsfreight; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ipsfreight FROM PUBLIC; REVOKE ALL ON TABLE ipsfreight FROM admin; GRANT ALL ON TABLE ipsfreight TO admin; GRANT ALL ON TABLE ipsfreight TO xtrole; -- -- Name: ipshead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ipshead FROM PUBLIC; REVOKE ALL ON TABLE ipshead FROM admin; GRANT ALL ON TABLE ipshead TO admin; GRANT ALL ON TABLE ipshead TO xtrole; SET search_path = api, pg_catalog; -- -- Name: freightpricingscheduleitem; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE freightpricingscheduleitem FROM PUBLIC; REVOKE ALL ON TABLE freightpricingscheduleitem FROM admin; GRANT ALL ON TABLE freightpricingscheduleitem TO admin; GRANT ALL ON TABLE freightpricingscheduleitem TO xtrole; -- -- Name: glaccount; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE glaccount FROM PUBLIC; REVOKE ALL ON TABLE glaccount FROM admin; GRANT ALL ON TABLE glaccount TO admin; GRANT ALL ON TABLE glaccount TO xtrole; SET search_path = public, pg_catalog; -- -- Name: incdtcat; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE incdtcat FROM PUBLIC; REVOKE ALL ON TABLE incdtcat FROM admin; GRANT ALL ON TABLE incdtcat TO admin; GRANT ALL ON TABLE incdtcat TO xtrole; -- -- Name: incdtpriority; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE incdtpriority FROM PUBLIC; REVOKE ALL ON TABLE incdtpriority FROM admin; GRANT ALL ON TABLE incdtpriority TO admin; GRANT ALL ON TABLE incdtpriority TO xtrole; -- -- Name: incdtresolution; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE incdtresolution FROM PUBLIC; REVOKE ALL ON TABLE incdtresolution FROM admin; GRANT ALL ON TABLE incdtresolution TO admin; GRANT ALL ON TABLE incdtresolution TO xtrole; -- -- Name: incdtseverity; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE incdtseverity FROM PUBLIC; REVOKE ALL ON TABLE incdtseverity FROM admin; GRANT ALL ON TABLE incdtseverity TO admin; GRANT ALL ON TABLE incdtseverity TO xtrole; SET search_path = api, pg_catalog; -- -- Name: incident; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE incident FROM PUBLIC; REVOKE ALL ON TABLE incident FROM admin; GRANT ALL ON TABLE incident TO admin; GRANT ALL ON TABLE incident TO xtrole; -- -- Name: incidentchar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE incidentchar FROM PUBLIC; REVOKE ALL ON TABLE incidentchar FROM admin; GRANT ALL ON TABLE incidentchar TO admin; GRANT ALL ON TABLE incidentchar TO xtrole; -- -- Name: incidentcomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE incidentcomment FROM PUBLIC; REVOKE ALL ON TABLE incidentcomment FROM admin; GRANT ALL ON TABLE incidentcomment TO admin; GRANT ALL ON TABLE incidentcomment TO xtrole; -- -- Name: incidentfile; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE incidentfile FROM PUBLIC; REVOKE ALL ON TABLE incidentfile FROM admin; GRANT ALL ON TABLE incidentfile TO admin; GRANT ALL ON TABLE incidentfile TO xtrole; -- -- Name: incidentimage; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE incidentimage FROM PUBLIC; REVOKE ALL ON TABLE incidentimage FROM admin; GRANT ALL ON TABLE incidentimage TO admin; GRANT ALL ON TABLE incidentimage TO xtrole; SET search_path = public, pg_catalog; -- -- Name: classcode; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE classcode FROM PUBLIC; REVOKE ALL ON TABLE classcode FROM admin; GRANT ALL ON TABLE classcode TO admin; GRANT ALL ON TABLE classcode TO xtrole; -- -- Name: prodcat; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE prodcat FROM PUBLIC; REVOKE ALL ON TABLE prodcat FROM admin; GRANT ALL ON TABLE prodcat TO admin; GRANT ALL ON TABLE prodcat TO xtrole; SET search_path = api, pg_catalog; -- -- Name: item; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE item FROM PUBLIC; REVOKE ALL ON TABLE item FROM admin; GRANT ALL ON TABLE item TO admin; GRANT ALL ON TABLE item TO xtrole; SET search_path = public, pg_catalog; -- -- Name: itemalias; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemalias FROM PUBLIC; REVOKE ALL ON TABLE itemalias FROM admin; GRANT ALL ON TABLE itemalias TO admin; GRANT ALL ON TABLE itemalias TO xtrole; SET search_path = api, pg_catalog; -- -- Name: itemalias; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemalias FROM PUBLIC; REVOKE ALL ON TABLE itemalias FROM admin; GRANT ALL ON TABLE itemalias TO admin; GRANT ALL ON TABLE itemalias TO xtrole; -- -- Name: itemchar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemchar FROM PUBLIC; REVOKE ALL ON TABLE itemchar FROM admin; GRANT ALL ON TABLE itemchar TO admin; GRANT ALL ON TABLE itemchar TO xtrole; -- -- Name: itemcomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemcomment FROM PUBLIC; REVOKE ALL ON TABLE itemcomment FROM admin; GRANT ALL ON TABLE itemcomment TO admin; GRANT ALL ON TABLE itemcomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: costelem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE costelem FROM PUBLIC; REVOKE ALL ON TABLE costelem FROM admin; GRANT ALL ON TABLE costelem TO admin; GRANT ALL ON TABLE costelem TO xtrole; -- -- Name: itemcost; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemcost FROM PUBLIC; REVOKE ALL ON TABLE itemcost FROM admin; GRANT ALL ON TABLE itemcost TO admin; GRANT ALL ON TABLE itemcost TO xtrole; SET search_path = api, pg_catalog; -- -- Name: itemcost; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemcost FROM PUBLIC; REVOKE ALL ON TABLE itemcost FROM admin; GRANT ALL ON TABLE itemcost TO admin; GRANT ALL ON TABLE itemcost TO xtrole; -- -- Name: itemfile; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemfile FROM PUBLIC; REVOKE ALL ON TABLE itemfile FROM admin; GRANT ALL ON TABLE itemfile TO admin; GRANT ALL ON TABLE itemfile TO xtrole; -- -- Name: itemimage; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemimage FROM PUBLIC; REVOKE ALL ON TABLE itemimage FROM admin; GRANT ALL ON TABLE itemimage TO admin; GRANT ALL ON TABLE itemimage TO xtrole; SET search_path = public, pg_catalog; -- -- Name: costcat; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE costcat FROM PUBLIC; REVOKE ALL ON TABLE costcat FROM admin; GRANT ALL ON TABLE costcat TO admin; GRANT ALL ON TABLE costcat TO xtrole; -- -- Name: location; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE location FROM PUBLIC; REVOKE ALL ON TABLE location FROM admin; GRANT ALL ON TABLE location TO admin; GRANT ALL ON TABLE location TO xtrole; -- -- Name: plancode; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE plancode FROM PUBLIC; REVOKE ALL ON TABLE plancode FROM admin; GRANT ALL ON TABLE plancode TO admin; GRANT ALL ON TABLE plancode TO xtrole; SET search_path = api, pg_catalog; -- -- Name: itemsite; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemsite FROM PUBLIC; REVOKE ALL ON TABLE itemsite FROM admin; GRANT ALL ON TABLE itemsite TO admin; GRANT ALL ON TABLE itemsite TO xtrole; -- -- Name: itemsitecomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemsitecomment FROM PUBLIC; REVOKE ALL ON TABLE itemsitecomment FROM admin; GRANT ALL ON TABLE itemsitecomment TO admin; GRANT ALL ON TABLE itemsitecomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: contrct; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE contrct FROM PUBLIC; REVOKE ALL ON TABLE contrct FROM admin; GRANT ALL ON TABLE contrct TO admin; GRANT ALL ON TABLE contrct TO xtrole; -- -- Name: itemsrc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemsrc FROM PUBLIC; REVOKE ALL ON TABLE itemsrc FROM admin; GRANT ALL ON TABLE itemsrc TO admin; GRANT ALL ON TABLE itemsrc TO xtrole; SET search_path = api, pg_catalog; -- -- Name: itemsource; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemsource FROM PUBLIC; REVOKE ALL ON TABLE itemsource FROM admin; GRANT ALL ON TABLE itemsource TO admin; GRANT ALL ON TABLE itemsource TO xtrole; SET search_path = public, pg_catalog; -- -- Name: itemsrcp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemsrcp FROM PUBLIC; REVOKE ALL ON TABLE itemsrcp FROM admin; GRANT ALL ON TABLE itemsrcp TO admin; GRANT ALL ON TABLE itemsrcp TO xtrole; SET search_path = api, pg_catalog; -- -- Name: itemsourceprice; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemsourceprice FROM PUBLIC; REVOKE ALL ON TABLE itemsourceprice FROM admin; GRANT ALL ON TABLE itemsourceprice TO admin; GRANT ALL ON TABLE itemsourceprice TO xtrole; SET search_path = public, pg_catalog; -- -- Name: itemsub; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemsub FROM PUBLIC; REVOKE ALL ON TABLE itemsub FROM admin; GRANT ALL ON TABLE itemsub TO admin; GRANT ALL ON TABLE itemsub TO xtrole; SET search_path = api, pg_catalog; -- -- Name: itemsubstitute; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemsubstitute FROM PUBLIC; REVOKE ALL ON TABLE itemsubstitute FROM admin; GRANT ALL ON TABLE itemsubstitute TO admin; GRANT ALL ON TABLE itemsubstitute TO xtrole; SET search_path = public, pg_catalog; -- -- Name: itemtax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemtax FROM PUBLIC; REVOKE ALL ON TABLE itemtax FROM admin; GRANT ALL ON TABLE itemtax TO admin; GRANT ALL ON TABLE itemtax TO xtrole; SET search_path = api, pg_catalog; -- -- Name: itemtaxtype; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemtaxtype FROM PUBLIC; REVOKE ALL ON TABLE itemtaxtype FROM admin; GRANT ALL ON TABLE itemtaxtype TO admin; GRANT ALL ON TABLE itemtaxtype TO xtrole; SET search_path = public, pg_catalog; -- -- Name: itemuomconv; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemuomconv FROM PUBLIC; REVOKE ALL ON TABLE itemuomconv FROM admin; GRANT ALL ON TABLE itemuomconv TO admin; GRANT ALL ON TABLE itemuomconv TO xtrole; SET search_path = api, pg_catalog; -- -- Name: itemuomconversion; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE itemuomconversion FROM PUBLIC; REVOKE ALL ON TABLE itemuomconversion FROM admin; GRANT ALL ON TABLE itemuomconversion TO admin; GRANT ALL ON TABLE itemuomconversion TO xtrole; SET search_path = public, pg_catalog; -- -- Name: gltrans; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE gltrans FROM PUBLIC; REVOKE ALL ON TABLE gltrans FROM admin; GRANT ALL ON TABLE gltrans TO admin; GRANT ALL ON TABLE gltrans TO xtrole; SET search_path = api, pg_catalog; -- -- Name: journalentry; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE journalentry FROM PUBLIC; REVOKE ALL ON TABLE journalentry FROM admin; GRANT ALL ON TABLE journalentry TO admin; GRANT ALL ON TABLE journalentry TO xtrole; SET search_path = public, pg_catalog; -- -- Name: whsezone; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE whsezone FROM PUBLIC; REVOKE ALL ON TABLE whsezone FROM admin; GRANT ALL ON TABLE whsezone TO admin; GRANT ALL ON TABLE whsezone TO xtrole; SET search_path = api, pg_catalog; -- -- Name: location; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE location FROM PUBLIC; REVOKE ALL ON TABLE location FROM admin; GRANT ALL ON TABLE location TO admin; GRANT ALL ON TABLE location TO xtrole; -- -- Name: misccounttag; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE misccounttag FROM PUBLIC; REVOKE ALL ON TABLE misccounttag FROM admin; GRANT ALL ON TABLE misccounttag TO admin; GRANT ALL ON TABLE misccounttag TO xtrole; -- -- Name: pricingschedule; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE pricingschedule FROM PUBLIC; REVOKE ALL ON TABLE pricingschedule FROM admin; GRANT ALL ON TABLE pricingschedule TO admin; GRANT ALL ON TABLE pricingschedule TO xtrole; SET search_path = public, pg_catalog; -- -- Name: ipsass; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ipsass FROM PUBLIC; REVOKE ALL ON TABLE ipsass FROM admin; GRANT ALL ON TABLE ipsass TO admin; GRANT ALL ON TABLE ipsass TO xtrole; SET search_path = api, pg_catalog; -- -- Name: pricingscheduleassign; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE pricingscheduleassign FROM PUBLIC; REVOKE ALL ON TABLE pricingscheduleassign FROM admin; GRANT ALL ON TABLE pricingscheduleassign TO admin; GRANT ALL ON TABLE pricingscheduleassign TO xtrole; SET search_path = public, pg_catalog; -- -- Name: ipsiteminfo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ipsiteminfo FROM PUBLIC; REVOKE ALL ON TABLE ipsiteminfo FROM admin; GRANT ALL ON TABLE ipsiteminfo TO admin; GRANT ALL ON TABLE ipsiteminfo TO xtrole; SET search_path = api, pg_catalog; -- -- Name: pricingscheduleitem; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE pricingscheduleitem FROM PUBLIC; REVOKE ALL ON TABLE pricingscheduleitem FROM admin; GRANT ALL ON TABLE pricingscheduleitem TO admin; GRANT ALL ON TABLE pricingscheduleitem TO xtrole; SET search_path = public, pg_catalog; -- -- Name: ipsitemchar; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ipsitemchar FROM PUBLIC; REVOKE ALL ON TABLE ipsitemchar FROM admin; GRANT ALL ON TABLE ipsitemchar TO admin; GRANT ALL ON TABLE ipsitemchar TO xtrole; SET search_path = api, pg_catalog; -- -- Name: pricingscheduleitemchar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE pricingscheduleitemchar FROM PUBLIC; REVOKE ALL ON TABLE pricingscheduleitemchar FROM admin; GRANT ALL ON TABLE pricingscheduleitemchar TO admin; GRANT ALL ON TABLE pricingscheduleitemchar TO xtrole; -- -- Name: project; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE project FROM PUBLIC; REVOKE ALL ON TABLE project FROM admin; GRANT ALL ON TABLE project TO admin; GRANT ALL ON TABLE project TO xtrole; -- -- Name: projectcomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE projectcomment FROM PUBLIC; REVOKE ALL ON TABLE projectcomment FROM admin; GRANT ALL ON TABLE projectcomment TO admin; GRANT ALL ON TABLE projectcomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cust_cust_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cust_cust_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cust_cust_id_seq FROM admin; GRANT ALL ON SEQUENCE cust_cust_id_seq TO admin; GRANT ALL ON SEQUENCE cust_cust_id_seq TO xtrole; -- -- Name: prospect; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE prospect FROM PUBLIC; REVOKE ALL ON TABLE prospect FROM admin; GRANT ALL ON TABLE prospect TO admin; GRANT ALL ON TABLE prospect TO xtrole; SET search_path = api, pg_catalog; -- -- Name: prospect; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE prospect FROM PUBLIC; REVOKE ALL ON TABLE prospect FROM admin; GRANT ALL ON TABLE prospect TO admin; GRANT ALL ON TABLE prospect TO xtrole; SET search_path = public, pg_catalog; -- -- Name: expcat; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE expcat FROM PUBLIC; REVOKE ALL ON TABLE expcat FROM admin; GRANT ALL ON TABLE expcat TO admin; GRANT ALL ON TABLE expcat TO xtrole; -- -- Name: womatl; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE womatl FROM PUBLIC; REVOKE ALL ON TABLE womatl FROM admin; GRANT ALL ON TABLE womatl TO admin; GRANT ALL ON TABLE womatl TO xtrole; SET search_path = api, pg_catalog; -- -- Name: purchaseline; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE purchaseline FROM PUBLIC; REVOKE ALL ON TABLE purchaseline FROM admin; GRANT ALL ON TABLE purchaseline TO admin; GRANT ALL ON TABLE purchaseline TO xtrole; -- -- Name: purchaselinechar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE purchaselinechar FROM PUBLIC; REVOKE ALL ON TABLE purchaselinechar FROM admin; GRANT ALL ON TABLE purchaselinechar TO admin; GRANT ALL ON TABLE purchaselinechar TO xtrole; -- -- Name: purchaselinecomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE purchaselinecomment FROM PUBLIC; REVOKE ALL ON TABLE purchaselinecomment FROM admin; GRANT ALL ON TABLE purchaselinecomment TO admin; GRANT ALL ON TABLE purchaselinecomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: tax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE tax FROM PUBLIC; REVOKE ALL ON TABLE tax FROM admin; GRANT ALL ON TABLE tax TO admin; GRANT ALL ON TABLE tax TO xtrole; -- -- Name: vendaddrinfo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE vendaddrinfo FROM PUBLIC; REVOKE ALL ON TABLE vendaddrinfo FROM admin; GRANT ALL ON TABLE vendaddrinfo TO admin; GRANT ALL ON TABLE vendaddrinfo TO xtrole; SET search_path = api, pg_catalog; -- -- Name: purchaseorder; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE purchaseorder FROM PUBLIC; REVOKE ALL ON TABLE purchaseorder FROM admin; GRANT ALL ON TABLE purchaseorder TO admin; GRANT ALL ON TABLE purchaseorder TO xtrole; -- -- Name: purchaseordercomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE purchaseordercomment FROM PUBLIC; REVOKE ALL ON TABLE purchaseordercomment FROM admin; GRANT ALL ON TABLE purchaseordercomment TO admin; GRANT ALL ON TABLE purchaseordercomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: quhead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE quhead FROM PUBLIC; REVOKE ALL ON TABLE quhead FROM admin; GRANT ALL ON TABLE quhead TO admin; GRANT ALL ON TABLE quhead TO xtrole; SET search_path = api, pg_catalog; -- -- Name: quote; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE quote FROM PUBLIC; REVOKE ALL ON TABLE quote FROM admin; GRANT ALL ON TABLE quote TO admin; GRANT ALL ON TABLE quote TO xtrole; -- -- Name: quotecomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE quotecomment FROM PUBLIC; REVOKE ALL ON TABLE quotecomment FROM admin; GRANT ALL ON TABLE quotecomment TO admin; GRANT ALL ON TABLE quotecomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: quitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE quitem FROM PUBLIC; REVOKE ALL ON TABLE quitem FROM admin; GRANT ALL ON TABLE quitem TO admin; GRANT ALL ON TABLE quitem TO xtrole; SET search_path = api, pg_catalog; -- -- Name: quoteline; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE quoteline FROM PUBLIC; REVOKE ALL ON TABLE quoteline FROM admin; GRANT ALL ON TABLE quoteline TO admin; GRANT ALL ON TABLE quoteline TO xtrole; -- -- Name: quotelinechar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE quotelinechar FROM PUBLIC; REVOKE ALL ON TABLE quotelinechar FROM admin; GRANT ALL ON TABLE quotelinechar TO admin; GRANT ALL ON TABLE quotelinechar TO xtrole; -- -- Name: quotelinecomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE quotelinecomment FROM PUBLIC; REVOKE ALL ON TABLE quotelinecomment FROM admin; GRANT ALL ON TABLE quotelinecomment TO admin; GRANT ALL ON TABLE quotelinecomment TO xtrole; SET search_path = public, pg_catalog; -- -- Name: aropenalloc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE aropenalloc FROM PUBLIC; REVOKE ALL ON TABLE aropenalloc FROM admin; GRANT ALL ON TABLE aropenalloc TO admin; GRANT ALL ON TABLE aropenalloc TO xtrole; SET search_path = api, pg_catalog; -- -- Name: salescredit; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE salescredit FROM PUBLIC; REVOKE ALL ON TABLE salescredit FROM admin; GRANT ALL ON TABLE salescredit TO admin; GRANT ALL ON TABLE salescredit TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cohist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cohist FROM PUBLIC; REVOKE ALL ON TABLE cohist FROM admin; GRANT ALL ON TABLE cohist TO admin; GRANT ALL ON TABLE cohist TO xtrole; -- -- Name: taxhist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE taxhist FROM PUBLIC; REVOKE ALL ON TABLE taxhist FROM admin; GRANT ALL ON TABLE taxhist TO admin; GRANT ALL ON TABLE taxhist TO xtrole; -- -- Name: taxhist_taxhist_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE taxhist_taxhist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxhist_taxhist_id_seq FROM admin; GRANT ALL ON SEQUENCE taxhist_taxhist_id_seq TO admin; GRANT ALL ON SEQUENCE taxhist_taxhist_id_seq TO xtrole; -- -- Name: cohisttax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cohisttax FROM PUBLIC; REVOKE ALL ON TABLE cohisttax FROM admin; GRANT ALL ON TABLE cohisttax TO admin; GRANT ALL ON TABLE cohisttax TO xtrole; SET search_path = api, pg_catalog; -- -- Name: saleshistory; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE saleshistory FROM PUBLIC; REVOKE ALL ON TABLE saleshistory FROM admin; GRANT ALL ON TABLE saleshistory TO admin; GRANT ALL ON TABLE saleshistory TO xtrole; -- -- Name: saleslinechar; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE saleslinechar FROM PUBLIC; REVOKE ALL ON TABLE saleslinechar FROM admin; GRANT ALL ON TABLE saleslinechar TO admin; GRANT ALL ON TABLE saleslinechar TO xtrole; -- -- Name: saleslinecomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE saleslinecomment FROM PUBLIC; REVOKE ALL ON TABLE saleslinecomment FROM admin; GRANT ALL ON TABLE saleslinecomment TO admin; GRANT ALL ON TABLE saleslinecomment TO xtrole; -- -- Name: salesorder; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE salesorder FROM PUBLIC; REVOKE ALL ON TABLE salesorder FROM admin; GRANT ALL ON TABLE salesorder TO admin; GRANT ALL ON TABLE salesorder TO xtrole; -- -- Name: salesordercomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE salesordercomment FROM PUBLIC; REVOKE ALL ON TABLE salesordercomment FROM admin; GRANT ALL ON TABLE salesordercomment TO admin; GRANT ALL ON TABLE salesordercomment TO xtrole; -- -- Name: salesrep; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE salesrep FROM PUBLIC; REVOKE ALL ON TABLE salesrep FROM admin; GRANT ALL ON TABLE salesrep TO admin; GRANT ALL ON TABLE salesrep TO xtrole; SET search_path = public, pg_catalog; -- -- Name: shipvia; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shipvia FROM PUBLIC; REVOKE ALL ON TABLE shipvia FROM admin; GRANT ALL ON TABLE shipvia TO admin; GRANT ALL ON TABLE shipvia TO xtrole; -- -- Name: sitetype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE sitetype FROM PUBLIC; REVOKE ALL ON TABLE sitetype FROM admin; GRANT ALL ON TABLE sitetype TO admin; GRANT ALL ON TABLE sitetype TO xtrole; SET search_path = api, pg_catalog; -- -- Name: site; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE site FROM PUBLIC; REVOKE ALL ON TABLE site FROM admin; GRANT ALL ON TABLE site TO admin; GRANT ALL ON TABLE site TO xtrole; -- -- Name: sitezone; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE sitezone FROM PUBLIC; REVOKE ALL ON TABLE sitezone FROM admin; GRANT ALL ON TABLE sitezone TO admin; GRANT ALL ON TABLE sitezone TO xtrole; -- -- Name: task; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE task FROM PUBLIC; REVOKE ALL ON TABLE task FROM admin; GRANT ALL ON TABLE task TO admin; GRANT ALL ON TABLE task TO xtrole; -- -- Name: taskcomment; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE taskcomment FROM PUBLIC; REVOKE ALL ON TABLE taskcomment FROM admin; GRANT ALL ON TABLE taskcomment TO admin; GRANT ALL ON TABLE taskcomment TO xtrole; -- -- Name: todo; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE todo FROM PUBLIC; REVOKE ALL ON TABLE todo FROM admin; GRANT ALL ON TABLE todo TO admin; GRANT ALL ON TABLE todo TO xtrole; SET search_path = public, pg_catalog; -- -- Name: vendtype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE vendtype FROM PUBLIC; REVOKE ALL ON TABLE vendtype FROM admin; GRANT ALL ON TABLE vendtype TO admin; GRANT ALL ON TABLE vendtype TO xtrole; SET search_path = api, pg_catalog; -- -- Name: vendor; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE vendor FROM PUBLIC; REVOKE ALL ON TABLE vendor FROM admin; GRANT ALL ON TABLE vendor TO admin; GRANT ALL ON TABLE vendor TO xtrole; -- -- Name: vendoraddress; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE vendoraddress FROM PUBLIC; REVOKE ALL ON TABLE vendoraddress FROM admin; GRANT ALL ON TABLE vendoraddress TO admin; GRANT ALL ON TABLE vendoraddress TO xtrole; -- -- Name: vendortype; Type: ACL; Schema: api; Owner: admin -- REVOKE ALL ON TABLE vendortype FROM PUBLIC; REVOKE ALL ON TABLE vendortype FROM admin; GRANT ALL ON TABLE vendortype TO admin; GRANT ALL ON TABLE vendortype TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cmd; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cmd FROM PUBLIC; REVOKE ALL ON TABLE cmd FROM admin; GRANT ALL ON TABLE cmd TO admin; GRANT ALL ON TABLE cmd TO xtrole; -- -- Name: cmd_cmd_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cmd_cmd_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmd_cmd_id_seq FROM admin; GRANT ALL ON SEQUENCE cmd_cmd_id_seq TO admin; GRANT ALL ON SEQUENCE cmd_cmd_id_seq TO xtrole; SET search_path = fixcountry, pg_catalog; -- -- Name: pkgcmd; Type: ACL; Schema: fixcountry; Owner: admin -- REVOKE ALL ON TABLE pkgcmd FROM PUBLIC; REVOKE ALL ON TABLE pkgcmd FROM admin; GRANT ALL ON TABLE pkgcmd TO admin; GRANT ALL ON TABLE pkgcmd TO xtrole; SET search_path = public, pg_catalog; -- -- Name: cmdarg; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cmdarg FROM PUBLIC; REVOKE ALL ON TABLE cmdarg FROM admin; GRANT ALL ON TABLE cmdarg TO admin; GRANT ALL ON TABLE cmdarg TO xtrole; -- -- Name: cmdarg_cmdarg_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cmdarg_cmdarg_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmdarg_cmdarg_id_seq FROM admin; GRANT ALL ON SEQUENCE cmdarg_cmdarg_id_seq TO admin; GRANT ALL ON SEQUENCE cmdarg_cmdarg_id_seq TO xtrole; SET search_path = fixcountry, pg_catalog; -- -- Name: pkgcmdarg; Type: ACL; Schema: fixcountry; Owner: admin -- REVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC; REVOKE ALL ON TABLE pkgcmdarg FROM admin; GRANT ALL ON TABLE pkgcmdarg TO admin; GRANT ALL ON TABLE pkgcmdarg TO xtrole; SET search_path = public, pg_catalog; -- -- Name: image_image_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE image_image_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE image_image_id_seq FROM admin; GRANT ALL ON SEQUENCE image_image_id_seq TO admin; GRANT ALL ON SEQUENCE image_image_id_seq TO xtrole; SET search_path = fixcountry, pg_catalog; -- -- Name: pkgimage; Type: ACL; Schema: fixcountry; Owner: admin -- REVOKE ALL ON TABLE pkgimage FROM PUBLIC; REVOKE ALL ON TABLE pkgimage FROM admin; GRANT ALL ON TABLE pkgimage TO admin; GRANT ALL ON TABLE pkgimage TO xtrole; SET search_path = public, pg_catalog; -- -- Name: metasql; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE metasql FROM PUBLIC; REVOKE ALL ON TABLE metasql FROM admin; GRANT ALL ON TABLE metasql TO admin; GRANT ALL ON TABLE metasql TO xtrole; -- -- Name: metasql_metasql_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE metasql_metasql_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE metasql_metasql_id_seq FROM admin; GRANT ALL ON SEQUENCE metasql_metasql_id_seq TO admin; GRANT ALL ON SEQUENCE metasql_metasql_id_seq TO xtrole; SET search_path = fixcountry, pg_catalog; -- -- Name: pkgmetasql; Type: ACL; Schema: fixcountry; Owner: admin -- REVOKE ALL ON TABLE pkgmetasql FROM PUBLIC; REVOKE ALL ON TABLE pkgmetasql FROM admin; GRANT ALL ON TABLE pkgmetasql TO admin; GRANT ALL ON TABLE pkgmetasql TO xtrole; SET search_path = public, pg_catalog; -- -- Name: priv; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE priv FROM PUBLIC; REVOKE ALL ON TABLE priv FROM admin; GRANT ALL ON TABLE priv TO admin; GRANT ALL ON TABLE priv TO xtrole; -- -- Name: priv_priv_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE priv_priv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE priv_priv_id_seq FROM admin; GRANT ALL ON SEQUENCE priv_priv_id_seq TO admin; GRANT ALL ON SEQUENCE priv_priv_id_seq TO xtrole; SET search_path = fixcountry, pg_catalog; -- -- Name: pkgpriv; Type: ACL; Schema: fixcountry; Owner: admin -- REVOKE ALL ON TABLE pkgpriv FROM PUBLIC; REVOKE ALL ON TABLE pkgpriv FROM admin; GRANT ALL ON TABLE pkgpriv TO admin; GRANT ALL ON TABLE pkgpriv TO xtrole; SET search_path = public, pg_catalog; -- -- Name: report; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE report FROM PUBLIC; REVOKE ALL ON TABLE report FROM admin; GRANT ALL ON TABLE report TO admin; GRANT ALL ON TABLE report TO xtrole; -- -- Name: report_report_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE report_report_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE report_report_id_seq FROM admin; GRANT ALL ON SEQUENCE report_report_id_seq TO admin; GRANT ALL ON SEQUENCE report_report_id_seq TO xtrole; SET search_path = fixcountry, pg_catalog; -- -- Name: pkgreport; Type: ACL; Schema: fixcountry; Owner: admin -- REVOKE ALL ON TABLE pkgreport FROM PUBLIC; REVOKE ALL ON TABLE pkgreport FROM admin; GRANT ALL ON TABLE pkgreport TO admin; GRANT ALL ON TABLE pkgreport TO xtrole; SET search_path = public, pg_catalog; -- -- Name: script; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE script FROM PUBLIC; REVOKE ALL ON TABLE script FROM admin; GRANT ALL ON TABLE script TO admin; GRANT ALL ON TABLE script TO xtrole; -- -- Name: script_script_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE script_script_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE script_script_id_seq FROM admin; GRANT ALL ON SEQUENCE script_script_id_seq TO admin; GRANT ALL ON SEQUENCE script_script_id_seq TO xtrole; SET search_path = fixcountry, pg_catalog; -- -- Name: pkgscript; Type: ACL; Schema: fixcountry; Owner: admin -- REVOKE ALL ON TABLE pkgscript FROM PUBLIC; REVOKE ALL ON TABLE pkgscript FROM admin; GRANT ALL ON TABLE pkgscript TO admin; GRANT ALL ON TABLE pkgscript TO xtrole; SET search_path = public, pg_catalog; -- -- Name: uiform; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE uiform FROM PUBLIC; REVOKE ALL ON TABLE uiform FROM admin; GRANT ALL ON TABLE uiform TO admin; GRANT ALL ON TABLE uiform TO xtrole; -- -- Name: uiform_uiform_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE uiform_uiform_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE uiform_uiform_id_seq FROM admin; GRANT ALL ON SEQUENCE uiform_uiform_id_seq TO admin; GRANT ALL ON SEQUENCE uiform_uiform_id_seq TO xtrole; SET search_path = fixcountry, pg_catalog; -- -- Name: pkguiform; Type: ACL; Schema: fixcountry; Owner: admin -- REVOKE ALL ON TABLE pkguiform FROM PUBLIC; REVOKE ALL ON TABLE pkguiform FROM admin; GRANT ALL ON TABLE pkguiform TO admin; GRANT ALL ON TABLE pkguiform TO xtrole; SET search_path = public, pg_catalog; -- -- Name: acalitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE acalitem FROM PUBLIC; REVOKE ALL ON TABLE acalitem FROM admin; GRANT ALL ON TABLE acalitem TO admin; GRANT ALL ON TABLE acalitem TO xtrole; -- -- Name: accnt_accnt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE accnt_accnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE accnt_accnt_id_seq FROM admin; GRANT ALL ON SEQUENCE accnt_accnt_id_seq TO admin; GRANT ALL ON SEQUENCE accnt_accnt_id_seq TO xtrole; -- -- Name: addr_addr_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE addr_addr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE addr_addr_id_seq FROM admin; GRANT ALL ON SEQUENCE addr_addr_id_seq TO admin; GRANT ALL ON SEQUENCE addr_addr_id_seq TO xtrole; -- -- Name: address; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE address FROM PUBLIC; REVOKE ALL ON TABLE address FROM admin; GRANT ALL ON TABLE address TO admin; GRANT ALL ON TABLE address TO xtrole; -- -- Name: alarm; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE alarm FROM PUBLIC; REVOKE ALL ON TABLE alarm FROM admin; GRANT ALL ON TABLE alarm TO admin; GRANT ALL ON TABLE alarm TO xtrole; -- -- Name: alarm_alarm_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE alarm_alarm_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE alarm_alarm_id_seq FROM admin; GRANT ALL ON SEQUENCE alarm_alarm_id_seq TO admin; GRANT ALL ON SEQUENCE alarm_alarm_id_seq TO xtrole; -- -- Name: apaccnt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apaccnt FROM PUBLIC; REVOKE ALL ON TABLE apaccnt FROM admin; GRANT ALL ON TABLE apaccnt TO admin; GRANT ALL ON TABLE apaccnt TO xtrole; -- -- Name: apaccnt_apaccnt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE apaccnt_apaccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apaccnt_apaccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE apaccnt_apaccnt_id_seq TO admin; GRANT ALL ON SEQUENCE apaccnt_apaccnt_id_seq TO xtrole; -- -- Name: apapply; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apapply FROM PUBLIC; REVOKE ALL ON TABLE apapply FROM admin; GRANT ALL ON TABLE apapply TO admin; GRANT ALL ON TABLE apapply TO xtrole; -- -- Name: apapply_apapply_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE apapply_apapply_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apapply_apapply_id_seq FROM admin; GRANT ALL ON SEQUENCE apapply_apapply_id_seq TO admin; GRANT ALL ON SEQUENCE apapply_apapply_id_seq TO xtrole; -- -- Name: checkhead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE checkhead FROM PUBLIC; REVOKE ALL ON TABLE checkhead FROM admin; GRANT ALL ON TABLE checkhead TO admin; GRANT ALL ON TABLE checkhead TO xtrole; -- -- Name: apchk; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apchk FROM PUBLIC; REVOKE ALL ON TABLE apchk FROM admin; GRANT ALL ON TABLE apchk TO admin; GRANT ALL ON TABLE apchk TO xtrole; -- -- Name: checkitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE checkitem FROM PUBLIC; REVOKE ALL ON TABLE checkitem FROM admin; GRANT ALL ON TABLE checkitem TO admin; GRANT ALL ON TABLE checkitem TO xtrole; -- -- Name: apchkitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apchkitem FROM PUBLIC; REVOKE ALL ON TABLE apchkitem FROM admin; GRANT ALL ON TABLE apchkitem TO admin; GRANT ALL ON TABLE apchkitem TO xtrole; -- -- Name: apcreditapply; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apcreditapply FROM PUBLIC; REVOKE ALL ON TABLE apcreditapply FROM admin; GRANT ALL ON TABLE apcreditapply TO admin; GRANT ALL ON TABLE apcreditapply TO xtrole; -- -- Name: apcreditapply_apcreditapply_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq FROM admin; GRANT ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq TO admin; GRANT ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq TO xtrole; -- -- Name: apmemo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apmemo FROM PUBLIC; REVOKE ALL ON TABLE apmemo FROM admin; GRANT ALL ON TABLE apmemo TO admin; GRANT ALL ON TABLE apmemo TO xtrole; -- -- Name: apopen_apopen_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE apopen_apopen_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apopen_apopen_id_seq FROM admin; GRANT ALL ON SEQUENCE apopen_apopen_id_seq TO admin; GRANT ALL ON SEQUENCE apopen_apopen_id_seq TO xtrole; -- -- Name: apopentax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apopentax FROM PUBLIC; REVOKE ALL ON TABLE apopentax FROM admin; GRANT ALL ON TABLE apopentax TO admin; GRANT ALL ON TABLE apopentax TO xtrole; -- -- Name: apselect; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE apselect FROM PUBLIC; REVOKE ALL ON TABLE apselect FROM admin; GRANT ALL ON TABLE apselect TO admin; GRANT ALL ON TABLE apselect TO xtrole; -- -- Name: apselect_apselect_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE apselect_apselect_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apselect_apselect_id_seq FROM admin; GRANT ALL ON SEQUENCE apselect_apselect_id_seq TO admin; GRANT ALL ON SEQUENCE apselect_apselect_id_seq TO xtrole; -- -- Name: araccnt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE araccnt FROM PUBLIC; REVOKE ALL ON TABLE araccnt FROM admin; GRANT ALL ON TABLE araccnt TO admin; GRANT ALL ON TABLE araccnt TO xtrole; -- -- Name: araccnt_araccnt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE araccnt_araccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE araccnt_araccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE araccnt_araccnt_id_seq TO admin; GRANT ALL ON SEQUENCE araccnt_araccnt_id_seq TO xtrole; -- -- Name: arapply; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE arapply FROM PUBLIC; REVOKE ALL ON TABLE arapply FROM admin; GRANT ALL ON TABLE arapply TO admin; GRANT ALL ON TABLE arapply TO xtrole; -- -- Name: arapply_arapply_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE arapply_arapply_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE arapply_arapply_id_seq FROM admin; GRANT ALL ON SEQUENCE arapply_arapply_id_seq TO admin; GRANT ALL ON SEQUENCE arapply_arapply_id_seq TO xtrole; -- -- Name: cashrcptitem_cashrcptitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq FROM admin; GRANT ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq TO admin; GRANT ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq TO xtrole; -- -- Name: arcreditapply; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE arcreditapply FROM PUBLIC; REVOKE ALL ON TABLE arcreditapply FROM admin; GRANT ALL ON TABLE arcreditapply TO admin; GRANT ALL ON TABLE arcreditapply TO xtrole; -- -- Name: arcreditapply_arcreditapply_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq FROM admin; GRANT ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq TO admin; GRANT ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq TO xtrole; -- -- Name: armemo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE armemo FROM PUBLIC; REVOKE ALL ON TABLE armemo FROM admin; GRANT ALL ON TABLE armemo TO admin; GRANT ALL ON TABLE armemo TO xtrole; -- -- Name: aropen_aropen_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE aropen_aropen_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE aropen_aropen_id_seq FROM admin; GRANT ALL ON SEQUENCE aropen_aropen_id_seq TO admin; GRANT ALL ON SEQUENCE aropen_aropen_id_seq TO xtrole; -- -- Name: aropentax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE aropentax FROM PUBLIC; REVOKE ALL ON TABLE aropentax FROM admin; GRANT ALL ON TABLE aropentax TO admin; GRANT ALL ON TABLE aropentax TO xtrole; -- -- Name: asohist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE asohist FROM PUBLIC; REVOKE ALL ON TABLE asohist FROM admin; GRANT ALL ON TABLE asohist TO admin; GRANT ALL ON TABLE asohist TO xtrole; -- -- Name: asohist_asohist_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE asohist_asohist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE asohist_asohist_id_seq FROM admin; GRANT ALL ON SEQUENCE asohist_asohist_id_seq TO admin; GRANT ALL ON SEQUENCE asohist_asohist_id_seq TO xtrole; -- -- Name: asohisttax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE asohisttax FROM PUBLIC; REVOKE ALL ON TABLE asohisttax FROM admin; GRANT ALL ON TABLE asohisttax TO admin; GRANT ALL ON TABLE asohisttax TO xtrole; -- -- Name: atlasmap; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE atlasmap FROM PUBLIC; REVOKE ALL ON TABLE atlasmap FROM admin; GRANT ALL ON TABLE atlasmap TO admin; GRANT ALL ON TABLE atlasmap TO xtrole; -- -- Name: atlasmap_atlasmap_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE atlasmap_atlasmap_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE atlasmap_atlasmap_id_seq FROM admin; GRANT ALL ON SEQUENCE atlasmap_atlasmap_id_seq TO admin; GRANT ALL ON SEQUENCE atlasmap_atlasmap_id_seq TO xtrole; -- -- Name: backup_usr; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE backup_usr FROM PUBLIC; REVOKE ALL ON TABLE backup_usr FROM admin; GRANT ALL ON TABLE backup_usr TO admin; GRANT ALL ON TABLE backup_usr TO xtrole; -- -- Name: bankaccnt_bankaccnt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq TO admin; GRANT ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq TO xtrole; -- -- Name: bankadj; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bankadj FROM PUBLIC; REVOKE ALL ON TABLE bankadj FROM admin; GRANT ALL ON TABLE bankadj TO admin; GRANT ALL ON TABLE bankadj TO xtrole; -- -- Name: bankadj_bankadj_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bankadj_bankadj_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankadj_bankadj_id_seq FROM admin; GRANT ALL ON SEQUENCE bankadj_bankadj_id_seq TO admin; GRANT ALL ON SEQUENCE bankadj_bankadj_id_seq TO xtrole; -- -- Name: bankadjtype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bankadjtype FROM PUBLIC; REVOKE ALL ON TABLE bankadjtype FROM admin; GRANT ALL ON TABLE bankadjtype TO admin; GRANT ALL ON TABLE bankadjtype TO xtrole; -- -- Name: bankadjtype_bankadjtype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq FROM admin; GRANT ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq TO admin; GRANT ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq TO xtrole; -- -- Name: bankrec; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bankrec FROM PUBLIC; REVOKE ALL ON TABLE bankrec FROM admin; GRANT ALL ON TABLE bankrec TO admin; GRANT ALL ON TABLE bankrec TO xtrole; -- -- Name: bankrec_bankrec_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bankrec_bankrec_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankrec_bankrec_id_seq FROM admin; GRANT ALL ON SEQUENCE bankrec_bankrec_id_seq TO admin; GRANT ALL ON SEQUENCE bankrec_bankrec_id_seq TO xtrole; -- -- Name: bankrecitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bankrecitem FROM PUBLIC; REVOKE ALL ON TABLE bankrecitem FROM admin; GRANT ALL ON TABLE bankrecitem TO admin; GRANT ALL ON TABLE bankrecitem TO xtrole; -- -- Name: bankrecitem_bankrecitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq FROM admin; GRANT ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq TO admin; GRANT ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq TO xtrole; -- -- Name: bomhead_bomhead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bomhead_bomhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomhead_bomhead_id_seq FROM admin; GRANT ALL ON SEQUENCE bomhead_bomhead_id_seq TO admin; GRANT ALL ON SEQUENCE bomhead_bomhead_id_seq TO xtrole; -- -- Name: bomitem_bomitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bomitem_bomitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomitem_bomitem_id_seq FROM admin; GRANT ALL ON SEQUENCE bomitem_bomitem_id_seq TO admin; GRANT ALL ON SEQUENCE bomitem_bomitem_id_seq TO xtrole; -- -- Name: bomitemcost; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bomitemcost FROM PUBLIC; REVOKE ALL ON TABLE bomitemcost FROM admin; GRANT ALL ON TABLE bomitemcost TO admin; GRANT ALL ON TABLE bomitemcost TO xtrole; -- -- Name: bomitemcost_bomitemcost_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq FROM admin; GRANT ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq TO admin; GRANT ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq TO xtrole; -- -- Name: bomitemsub_bomitemsub_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq FROM admin; GRANT ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq TO admin; GRANT ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq TO xtrole; -- -- Name: bomwork; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE bomwork FROM PUBLIC; REVOKE ALL ON TABLE bomwork FROM admin; GRANT ALL ON TABLE bomwork TO admin; GRANT ALL ON TABLE bomwork TO xtrole; -- -- Name: bomwork_bomwork_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE bomwork_bomwork_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomwork_bomwork_id_seq FROM admin; GRANT ALL ON SEQUENCE bomwork_bomwork_id_seq TO admin; GRANT ALL ON SEQUENCE bomwork_bomwork_id_seq TO xtrole; -- -- Name: budget; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE budget FROM PUBLIC; REVOKE ALL ON TABLE budget FROM admin; GRANT ALL ON TABLE budget TO admin; GRANT ALL ON TABLE budget TO xtrole; -- -- Name: budghead_budghead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE budghead_budghead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE budghead_budghead_id_seq FROM admin; GRANT ALL ON SEQUENCE budghead_budghead_id_seq TO admin; GRANT ALL ON SEQUENCE budghead_budghead_id_seq TO xtrole; -- -- Name: budgitem_budgitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE budgitem_budgitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE budgitem_budgitem_id_seq FROM admin; GRANT ALL ON SEQUENCE budgitem_budgitem_id_seq TO admin; GRANT ALL ON SEQUENCE budgitem_budgitem_id_seq TO xtrole; -- -- Name: calhead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE calhead FROM PUBLIC; REVOKE ALL ON TABLE calhead FROM admin; GRANT ALL ON TABLE calhead TO admin; GRANT ALL ON TABLE calhead TO xtrole; -- -- Name: calhead_calhead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE calhead_calhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE calhead_calhead_id_seq FROM admin; GRANT ALL ON SEQUENCE calhead_calhead_id_seq TO admin; GRANT ALL ON SEQUENCE calhead_calhead_id_seq TO xtrole; -- -- Name: carrier_carrier_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE carrier_carrier_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE carrier_carrier_id_seq FROM admin; GRANT ALL ON SEQUENCE carrier_carrier_id_seq TO admin; GRANT ALL ON SEQUENCE carrier_carrier_id_seq TO xtrole; -- -- Name: cashrcpt_cashrcpt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq FROM admin; GRANT ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq TO admin; GRANT ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq TO xtrole; -- -- Name: cashrcptmisc_cashrcptmisc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq FROM admin; GRANT ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq TO admin; GRANT ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq TO xtrole; -- -- Name: ccard_ccard_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ccard_ccard_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ccard_ccard_id_seq FROM admin; GRANT ALL ON SEQUENCE ccard_ccard_id_seq TO admin; GRANT ALL ON SEQUENCE ccard_ccard_id_seq TO xtrole; -- -- Name: ccardaud; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ccardaud FROM PUBLIC; REVOKE ALL ON TABLE ccardaud FROM admin; GRANT ALL ON TABLE ccardaud TO admin; GRANT ALL ON TABLE ccardaud TO xtrole; -- -- Name: ccardaud_ccardaud_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ccardaud_ccardaud_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ccardaud_ccardaud_id_seq FROM admin; GRANT ALL ON SEQUENCE ccardaud_ccardaud_id_seq TO admin; GRANT ALL ON SEQUENCE ccardaud_ccardaud_id_seq TO xtrole; -- -- Name: ccbank; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ccbank FROM PUBLIC; REVOKE ALL ON TABLE ccbank FROM admin; GRANT ALL ON TABLE ccbank TO admin; GRANT ALL ON TABLE ccbank TO xtrole; -- -- Name: ccbank_ccbank_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ccbank_ccbank_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ccbank_ccbank_id_seq FROM admin; GRANT ALL ON SEQUENCE ccbank_ccbank_id_seq TO admin; GRANT ALL ON SEQUENCE ccbank_ccbank_id_seq TO xtrole; -- -- Name: ccpay; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ccpay FROM PUBLIC; REVOKE ALL ON TABLE ccpay FROM admin; GRANT ALL ON TABLE ccpay TO admin; GRANT ALL ON TABLE ccpay TO xtrole; -- -- Name: ccpay_ccpay_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ccpay_ccpay_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ccpay_ccpay_id_seq FROM admin; GRANT ALL ON SEQUENCE ccpay_ccpay_id_seq TO admin; GRANT ALL ON SEQUENCE ccpay_ccpay_id_seq TO xtrole; -- -- Name: char_char_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE char_char_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE char_char_id_seq FROM admin; GRANT ALL ON SEQUENCE char_char_id_seq TO admin; GRANT ALL ON SEQUENCE char_char_id_seq TO xtrole; -- -- Name: charass_charass_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE charass_charass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE charass_charass_id_seq FROM admin; GRANT ALL ON SEQUENCE charass_charass_id_seq TO admin; GRANT ALL ON SEQUENCE charass_charass_id_seq TO xtrole; -- -- Name: charopt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE charopt FROM PUBLIC; REVOKE ALL ON TABLE charopt FROM admin; GRANT ALL ON TABLE charopt TO admin; GRANT ALL ON TABLE charopt TO xtrole; -- -- Name: charopt_charopt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE charopt_charopt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE charopt_charopt_id_seq FROM admin; GRANT ALL ON SEQUENCE charopt_charopt_id_seq TO admin; GRANT ALL ON SEQUENCE charopt_charopt_id_seq TO xtrole; -- -- Name: checkhead_checkhead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE checkhead_checkhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE checkhead_checkhead_id_seq FROM admin; GRANT ALL ON SEQUENCE checkhead_checkhead_id_seq TO admin; GRANT ALL ON SEQUENCE checkhead_checkhead_id_seq TO xtrole; -- -- Name: checkitem_checkitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE checkitem_checkitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE checkitem_checkitem_id_seq FROM admin; GRANT ALL ON SEQUENCE checkitem_checkitem_id_seq TO admin; GRANT ALL ON SEQUENCE checkitem_checkitem_id_seq TO xtrole; -- -- Name: checkrecip; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE checkrecip FROM PUBLIC; REVOKE ALL ON TABLE checkrecip FROM admin; GRANT ALL ON TABLE checkrecip TO admin; GRANT ALL ON TABLE checkrecip TO xtrole; -- -- Name: classcode_classcode_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE classcode_classcode_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE classcode_classcode_id_seq FROM admin; GRANT ALL ON SEQUENCE classcode_classcode_id_seq TO admin; GRANT ALL ON SEQUENCE classcode_classcode_id_seq TO xtrole; -- -- Name: cmhead_cmhead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cmhead_cmhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmhead_cmhead_id_seq FROM admin; GRANT ALL ON SEQUENCE cmhead_cmhead_id_seq TO admin; GRANT ALL ON SEQUENCE cmhead_cmhead_id_seq TO xtrole; -- -- Name: cmheadtax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cmheadtax FROM PUBLIC; REVOKE ALL ON TABLE cmheadtax FROM admin; GRANT ALL ON TABLE cmheadtax TO admin; GRANT ALL ON TABLE cmheadtax TO xtrole; -- -- Name: cmitem_cmitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cmitem_cmitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmitem_cmitem_id_seq FROM admin; GRANT ALL ON SEQUENCE cmitem_cmitem_id_seq TO admin; GRANT ALL ON SEQUENCE cmitem_cmitem_id_seq TO xtrole; -- -- Name: cmitemtax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cmitemtax FROM PUBLIC; REVOKE ALL ON TABLE cmitemtax FROM admin; GRANT ALL ON TABLE cmitemtax TO admin; GRANT ALL ON TABLE cmitemtax TO xtrole; -- -- Name: cmnttype_cmnttype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cmnttype_cmnttype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmnttype_cmnttype_id_seq FROM admin; GRANT ALL ON SEQUENCE cmnttype_cmnttype_id_seq TO admin; GRANT ALL ON SEQUENCE cmnttype_cmnttype_id_seq TO xtrole; -- -- Name: cmnttypesource; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cmnttypesource FROM PUBLIC; REVOKE ALL ON TABLE cmnttypesource FROM admin; GRANT ALL ON TABLE cmnttypesource TO admin; GRANT ALL ON TABLE cmnttypesource TO xtrole; -- -- Name: cmnttypesource_cmnttypesource_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq FROM admin; GRANT ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq TO admin; GRANT ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq TO xtrole; -- -- Name: cntct_cntct_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cntct_cntct_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntct_cntct_id_seq FROM admin; GRANT ALL ON SEQUENCE cntct_cntct_id_seq TO admin; GRANT ALL ON SEQUENCE cntct_cntct_id_seq TO xtrole; -- -- Name: cntctaddr; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cntctaddr FROM PUBLIC; REVOKE ALL ON TABLE cntctaddr FROM admin; GRANT ALL ON TABLE cntctaddr TO admin; GRANT ALL ON TABLE cntctaddr TO xtrole; -- -- Name: cntctaddr_cntctaddr_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq FROM admin; GRANT ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq TO admin; GRANT ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq TO xtrole; -- -- Name: cntctdata; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cntctdata FROM PUBLIC; REVOKE ALL ON TABLE cntctdata FROM admin; GRANT ALL ON TABLE cntctdata TO admin; GRANT ALL ON TABLE cntctdata TO xtrole; -- -- Name: cntctdata_cntctdata_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cntctdata_cntctdata_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntctdata_cntctdata_id_seq FROM admin; GRANT ALL ON SEQUENCE cntctdata_cntctdata_id_seq TO admin; GRANT ALL ON SEQUENCE cntctdata_cntctdata_id_seq TO xtrole; -- -- Name: cntcteml; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cntcteml FROM PUBLIC; REVOKE ALL ON TABLE cntcteml FROM admin; GRANT ALL ON TABLE cntcteml TO admin; GRANT ALL ON TABLE cntcteml TO xtrole; -- -- Name: cntcteml_cntcteml_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cntcteml_cntcteml_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntcteml_cntcteml_id_seq FROM admin; GRANT ALL ON SEQUENCE cntcteml_cntcteml_id_seq TO admin; GRANT ALL ON SEQUENCE cntcteml_cntcteml_id_seq TO xtrole; -- -- Name: cntctmrgd; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cntctmrgd FROM PUBLIC; REVOKE ALL ON TABLE cntctmrgd FROM admin; GRANT ALL ON TABLE cntctmrgd TO admin; GRANT ALL ON TABLE cntctmrgd TO xtrole; -- -- Name: cntctsel; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cntctsel FROM PUBLIC; REVOKE ALL ON TABLE cntctsel FROM admin; GRANT ALL ON TABLE cntctsel TO admin; GRANT ALL ON TABLE cntctsel TO xtrole; -- -- Name: cntslip_cntslip_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cntslip_cntslip_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntslip_cntslip_id_seq FROM admin; GRANT ALL ON SEQUENCE cntslip_cntslip_id_seq TO admin; GRANT ALL ON SEQUENCE cntslip_cntslip_id_seq TO xtrole; -- -- Name: cobill; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cobill FROM PUBLIC; REVOKE ALL ON TABLE cobill FROM admin; GRANT ALL ON TABLE cobill TO admin; GRANT ALL ON TABLE cobill TO xtrole; -- -- Name: cobill_cobill_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cobill_cobill_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cobill_cobill_id_seq FROM admin; GRANT ALL ON SEQUENCE cobill_cobill_id_seq TO admin; GRANT ALL ON SEQUENCE cobill_cobill_id_seq TO xtrole; -- -- Name: cobilltax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cobilltax FROM PUBLIC; REVOKE ALL ON TABLE cobilltax FROM admin; GRANT ALL ON TABLE cobilltax TO admin; GRANT ALL ON TABLE cobilltax TO xtrole; -- -- Name: cobmisc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cobmisc FROM PUBLIC; REVOKE ALL ON TABLE cobmisc FROM admin; GRANT ALL ON TABLE cobmisc TO admin; GRANT ALL ON TABLE cobmisc TO xtrole; -- -- Name: cobmisc_cobmisc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cobmisc_cobmisc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cobmisc_cobmisc_id_seq FROM admin; GRANT ALL ON SEQUENCE cobmisc_cobmisc_id_seq TO admin; GRANT ALL ON SEQUENCE cobmisc_cobmisc_id_seq TO xtrole; -- -- Name: cobmisctax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cobmisctax FROM PUBLIC; REVOKE ALL ON TABLE cobmisctax FROM admin; GRANT ALL ON TABLE cobmisctax TO admin; GRANT ALL ON TABLE cobmisctax TO xtrole; -- -- Name: cohead_cohead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cohead_cohead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cohead_cohead_id_seq FROM admin; GRANT ALL ON SEQUENCE cohead_cohead_id_seq TO admin; GRANT ALL ON SEQUENCE cohead_cohead_id_seq TO xtrole; -- -- Name: cohist_cohist_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cohist_cohist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cohist_cohist_id_seq FROM admin; GRANT ALL ON SEQUENCE cohist_cohist_id_seq TO admin; GRANT ALL ON SEQUENCE cohist_cohist_id_seq TO xtrole; -- -- Name: coitem_coitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE coitem_coitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE coitem_coitem_id_seq FROM admin; GRANT ALL ON SEQUENCE coitem_coitem_id_seq TO admin; GRANT ALL ON SEQUENCE coitem_coitem_id_seq TO xtrole; -- -- Name: comment_comment_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE comment_comment_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE comment_comment_id_seq FROM admin; GRANT ALL ON SEQUENCE comment_comment_id_seq TO admin; GRANT ALL ON SEQUENCE comment_comment_id_seq TO xtrole; -- -- Name: company; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE company FROM PUBLIC; REVOKE ALL ON TABLE company FROM admin; GRANT ALL ON TABLE company TO admin; GRANT ALL ON TABLE company TO xtrole; -- -- Name: company_company_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE company_company_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE company_company_id_seq FROM admin; GRANT ALL ON SEQUENCE company_company_id_seq TO admin; GRANT ALL ON SEQUENCE company_company_id_seq TO xtrole; -- -- Name: contrct_contrct_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE contrct_contrct_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE contrct_contrct_id_seq FROM admin; GRANT ALL ON SEQUENCE contrct_contrct_id_seq TO admin; GRANT ALL ON SEQUENCE contrct_contrct_id_seq TO xtrole; -- -- Name: shiphead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shiphead FROM PUBLIC; REVOKE ALL ON TABLE shiphead FROM admin; GRANT ALL ON TABLE shiphead TO admin; GRANT ALL ON TABLE shiphead TO xtrole; -- -- Name: shipitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shipitem FROM PUBLIC; REVOKE ALL ON TABLE shipitem FROM admin; GRANT ALL ON TABLE shipitem TO admin; GRANT ALL ON TABLE shipitem TO xtrole; -- -- Name: coship; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE coship FROM PUBLIC; REVOKE ALL ON TABLE coship FROM admin; GRANT ALL ON TABLE coship TO admin; GRANT ALL ON TABLE coship TO xtrole; -- -- Name: coship_coship_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE coship_coship_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE coship_coship_id_seq FROM admin; GRANT ALL ON SEQUENCE coship_coship_id_seq TO admin; GRANT ALL ON SEQUENCE coship_coship_id_seq TO xtrole; -- -- Name: cosmisc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cosmisc FROM PUBLIC; REVOKE ALL ON TABLE cosmisc FROM admin; GRANT ALL ON TABLE cosmisc TO admin; GRANT ALL ON TABLE cosmisc TO xtrole; -- -- Name: cosmisc_cosmisc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cosmisc_cosmisc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cosmisc_cosmisc_id_seq FROM admin; GRANT ALL ON SEQUENCE cosmisc_cosmisc_id_seq TO admin; GRANT ALL ON SEQUENCE cosmisc_cosmisc_id_seq TO xtrole; -- -- Name: cosrc_cosrc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cosrc_cosrc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cosrc_cosrc_id_seq FROM admin; GRANT ALL ON SEQUENCE cosrc_cosrc_id_seq TO admin; GRANT ALL ON SEQUENCE cosrc_cosrc_id_seq TO xtrole; -- -- Name: costcat_costcat_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE costcat_costcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE costcat_costcat_id_seq FROM admin; GRANT ALL ON SEQUENCE costcat_costcat_id_seq TO admin; GRANT ALL ON SEQUENCE costcat_costcat_id_seq TO xtrole; -- -- Name: costelem_costelem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE costelem_costelem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE costelem_costelem_id_seq FROM admin; GRANT ALL ON SEQUENCE costelem_costelem_id_seq TO admin; GRANT ALL ON SEQUENCE costelem_costelem_id_seq TO xtrole; -- -- Name: costhist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE costhist FROM PUBLIC; REVOKE ALL ON TABLE costhist FROM admin; GRANT ALL ON TABLE costhist TO admin; GRANT ALL ON TABLE costhist TO xtrole; -- -- Name: costhist_costhist_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE costhist_costhist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE costhist_costhist_id_seq FROM admin; GRANT ALL ON SEQUENCE costhist_costhist_id_seq TO admin; GRANT ALL ON SEQUENCE costhist_costhist_id_seq TO xtrole; -- -- Name: costupdate; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE costupdate FROM PUBLIC; REVOKE ALL ON TABLE costupdate FROM admin; GRANT ALL ON TABLE costupdate TO admin; GRANT ALL ON TABLE costupdate TO xtrole; -- -- Name: country; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE country FROM PUBLIC; REVOKE ALL ON TABLE country FROM admin; GRANT ALL ON TABLE country TO admin; GRANT ALL ON TABLE country TO xtrole; -- -- Name: country_country_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE country_country_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE country_country_id_seq FROM admin; GRANT ALL ON SEQUENCE country_country_id_seq TO admin; GRANT ALL ON SEQUENCE country_country_id_seq TO xtrole; -- -- Name: salesaccnt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE salesaccnt FROM PUBLIC; REVOKE ALL ON TABLE salesaccnt FROM admin; GRANT ALL ON TABLE salesaccnt TO admin; GRANT ALL ON TABLE salesaccnt TO xtrole; -- -- Name: creditmemoeditlist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE creditmemoeditlist FROM PUBLIC; REVOKE ALL ON TABLE creditmemoeditlist FROM admin; GRANT ALL ON TABLE creditmemoeditlist TO admin; GRANT ALL ON TABLE creditmemoeditlist TO xtrole; -- -- Name: creditmemoitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE creditmemoitem FROM PUBLIC; REVOKE ALL ON TABLE creditmemoitem FROM admin; GRANT ALL ON TABLE creditmemoitem TO admin; GRANT ALL ON TABLE creditmemoitem TO xtrole; -- -- Name: crmacct_crmacct_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE crmacct_crmacct_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE crmacct_crmacct_id_seq FROM admin; GRANT ALL ON SEQUENCE crmacct_crmacct_id_seq TO admin; GRANT ALL ON SEQUENCE crmacct_crmacct_id_seq TO xtrole; -- -- Name: crmacctsel; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE crmacctsel FROM PUBLIC; REVOKE ALL ON TABLE crmacctsel FROM admin; GRANT ALL ON TABLE crmacctsel TO admin; GRANT ALL ON TABLE crmacctsel TO xtrole; -- -- Name: curr_rate; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE curr_rate FROM PUBLIC; REVOKE ALL ON TABLE curr_rate FROM admin; GRANT ALL ON TABLE curr_rate TO admin; GRANT ALL ON TABLE curr_rate TO xtrole; -- -- Name: curr_rate_curr_rate_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE curr_rate_curr_rate_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE curr_rate_curr_rate_id_seq FROM admin; GRANT ALL ON SEQUENCE curr_rate_curr_rate_id_seq TO admin; GRANT ALL ON SEQUENCE curr_rate_curr_rate_id_seq TO xtrole; -- -- Name: curr_symbol_curr_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE curr_symbol_curr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE curr_symbol_curr_id_seq FROM admin; GRANT ALL ON SEQUENCE curr_symbol_curr_id_seq TO admin; GRANT ALL ON SEQUENCE curr_symbol_curr_id_seq TO xtrole; -- -- Name: cust; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE cust FROM PUBLIC; REVOKE ALL ON TABLE cust FROM admin; GRANT ALL ON TABLE cust TO admin; GRANT ALL ON TABLE cust TO xtrole; -- -- Name: cust_serial_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE cust_serial_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cust_serial_seq FROM admin; GRANT ALL ON SEQUENCE cust_serial_seq TO admin; GRANT ALL ON SEQUENCE cust_serial_seq TO xtrole; -- -- Name: custform; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE custform FROM PUBLIC; REVOKE ALL ON TABLE custform FROM admin; GRANT ALL ON TABLE custform TO admin; GRANT ALL ON TABLE custform TO xtrole; -- -- Name: custform_custform_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE custform_custform_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE custform_custform_id_seq FROM admin; GRANT ALL ON SEQUENCE custform_custform_id_seq TO admin; GRANT ALL ON SEQUENCE custform_custform_id_seq TO xtrole; -- -- Name: custgrp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE custgrp FROM PUBLIC; REVOKE ALL ON TABLE custgrp FROM admin; GRANT ALL ON TABLE custgrp TO admin; GRANT ALL ON TABLE custgrp TO xtrole; -- -- Name: custgrp_custgrp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE custgrp_custgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE custgrp_custgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE custgrp_custgrp_id_seq TO admin; GRANT ALL ON SEQUENCE custgrp_custgrp_id_seq TO xtrole; -- -- Name: custgrpitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE custgrpitem FROM PUBLIC; REVOKE ALL ON TABLE custgrpitem FROM admin; GRANT ALL ON TABLE custgrpitem TO admin; GRANT ALL ON TABLE custgrpitem TO xtrole; -- -- Name: custgrpitem_custgrpitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq FROM admin; GRANT ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq TO admin; GRANT ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq TO xtrole; -- -- Name: custtype_custtype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE custtype_custtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE custtype_custtype_id_seq FROM admin; GRANT ALL ON SEQUENCE custtype_custtype_id_seq TO admin; GRANT ALL ON SEQUENCE custtype_custtype_id_seq TO xtrole; -- -- Name: dept_dept_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE dept_dept_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE dept_dept_id_seq FROM admin; GRANT ALL ON SEQUENCE dept_dept_id_seq TO admin; GRANT ALL ON SEQUENCE dept_dept_id_seq TO xtrole; -- -- Name: destination; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE destination FROM PUBLIC; REVOKE ALL ON TABLE destination FROM admin; GRANT ALL ON TABLE destination TO admin; GRANT ALL ON TABLE destination TO xtrole; -- -- Name: destination_destination_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE destination_destination_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE destination_destination_id_seq FROM admin; GRANT ALL ON SEQUENCE destination_destination_id_seq TO admin; GRANT ALL ON SEQUENCE destination_destination_id_seq TO xtrole; -- -- Name: wo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE wo FROM PUBLIC; REVOKE ALL ON TABLE wo FROM admin; GRANT ALL ON TABLE wo TO admin; GRANT ALL ON TABLE wo TO xtrole; -- -- Name: docinfo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE docinfo FROM PUBLIC; REVOKE ALL ON TABLE docinfo FROM admin; GRANT ALL ON TABLE docinfo TO admin; GRANT ALL ON TABLE docinfo TO xtrole; -- -- Name: emp_emp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE emp_emp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE emp_emp_id_seq FROM admin; GRANT ALL ON SEQUENCE emp_emp_id_seq TO admin; GRANT ALL ON SEQUENCE emp_emp_id_seq TO xtrole; -- -- Name: empgrp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE empgrp FROM PUBLIC; REVOKE ALL ON TABLE empgrp FROM admin; GRANT ALL ON TABLE empgrp TO admin; GRANT ALL ON TABLE empgrp TO xtrole; -- -- Name: empgrp_empgrp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE empgrp_empgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE empgrp_empgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE empgrp_empgrp_id_seq TO admin; GRANT ALL ON SEQUENCE empgrp_empgrp_id_seq TO xtrole; -- -- Name: empgrpitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE empgrpitem FROM PUBLIC; REVOKE ALL ON TABLE empgrpitem FROM admin; GRANT ALL ON TABLE empgrpitem TO admin; GRANT ALL ON TABLE empgrpitem TO xtrole; -- -- Name: empgrpitem_empgrpitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq FROM admin; GRANT ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq TO admin; GRANT ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq TO xtrole; -- -- Name: evntlog; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE evntlog FROM PUBLIC; REVOKE ALL ON TABLE evntlog FROM admin; GRANT ALL ON TABLE evntlog TO admin; GRANT ALL ON TABLE evntlog TO xtrole; -- -- Name: evntlog_evntlog_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE evntlog_evntlog_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE evntlog_evntlog_id_seq FROM admin; GRANT ALL ON SEQUENCE evntlog_evntlog_id_seq TO admin; GRANT ALL ON SEQUENCE evntlog_evntlog_id_seq TO xtrole; -- -- Name: evntnot; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE evntnot FROM PUBLIC; REVOKE ALL ON TABLE evntnot FROM admin; GRANT ALL ON TABLE evntnot TO admin; GRANT ALL ON TABLE evntnot TO xtrole; -- -- Name: evntnot_evntnot_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE evntnot_evntnot_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE evntnot_evntnot_id_seq FROM admin; GRANT ALL ON SEQUENCE evntnot_evntnot_id_seq TO admin; GRANT ALL ON SEQUENCE evntnot_evntnot_id_seq TO xtrole; -- -- Name: evnttype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE evnttype FROM PUBLIC; REVOKE ALL ON TABLE evnttype FROM admin; GRANT ALL ON TABLE evnttype TO admin; GRANT ALL ON TABLE evnttype TO xtrole; -- -- Name: evnttype_evnttype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE evnttype_evnttype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE evnttype_evnttype_id_seq FROM admin; GRANT ALL ON SEQUENCE evnttype_evnttype_id_seq TO admin; GRANT ALL ON SEQUENCE evnttype_evnttype_id_seq TO xtrole; -- -- Name: expcat_expcat_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE expcat_expcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE expcat_expcat_id_seq FROM admin; GRANT ALL ON SEQUENCE expcat_expcat_id_seq TO admin; GRANT ALL ON SEQUENCE expcat_expcat_id_seq TO xtrole; -- -- Name: file_file_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE file_file_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE file_file_id_seq FROM admin; GRANT ALL ON SEQUENCE file_file_id_seq TO admin; GRANT ALL ON SEQUENCE file_file_id_seq TO xtrole; -- -- Name: filter; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE filter FROM PUBLIC; REVOKE ALL ON TABLE filter FROM admin; GRANT ALL ON TABLE filter TO admin; GRANT ALL ON TABLE filter TO xtrole; -- -- Name: filter_filter_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE filter_filter_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE filter_filter_id_seq FROM admin; GRANT ALL ON SEQUENCE filter_filter_id_seq TO admin; GRANT ALL ON SEQUENCE filter_filter_id_seq TO xtrole; -- -- Name: flhead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE flhead FROM PUBLIC; REVOKE ALL ON TABLE flhead FROM admin; GRANT ALL ON TABLE flhead TO admin; GRANT ALL ON TABLE flhead TO xtrole; -- -- Name: flitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE flitem FROM PUBLIC; REVOKE ALL ON TABLE flitem FROM admin; GRANT ALL ON TABLE flitem TO admin; GRANT ALL ON TABLE flitem TO xtrole; -- -- Name: flaccnt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE flaccnt FROM PUBLIC; REVOKE ALL ON TABLE flaccnt FROM admin; GRANT ALL ON TABLE flaccnt TO admin; GRANT ALL ON TABLE flaccnt TO xtrole; -- -- Name: flcol; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE flcol FROM PUBLIC; REVOKE ALL ON TABLE flcol FROM admin; GRANT ALL ON TABLE flcol TO admin; GRANT ALL ON TABLE flcol TO xtrole; -- -- Name: flcol_flcol_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE flcol_flcol_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flcol_flcol_id_seq FROM admin; GRANT ALL ON SEQUENCE flcol_flcol_id_seq TO admin; GRANT ALL ON SEQUENCE flcol_flcol_id_seq TO xtrole; -- -- Name: flgrp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE flgrp FROM PUBLIC; REVOKE ALL ON TABLE flgrp FROM admin; GRANT ALL ON TABLE flgrp TO admin; GRANT ALL ON TABLE flgrp TO xtrole; -- -- Name: flgrp_flgrp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE flgrp_flgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flgrp_flgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE flgrp_flgrp_id_seq TO admin; GRANT ALL ON SEQUENCE flgrp_flgrp_id_seq TO xtrole; -- -- Name: flhead_flhead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE flhead_flhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flhead_flhead_id_seq FROM admin; GRANT ALL ON SEQUENCE flhead_flhead_id_seq TO admin; GRANT ALL ON SEQUENCE flhead_flhead_id_seq TO xtrole; -- -- Name: flitem_flitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE flitem_flitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flitem_flitem_id_seq FROM admin; GRANT ALL ON SEQUENCE flitem_flitem_id_seq TO admin; GRANT ALL ON SEQUENCE flitem_flitem_id_seq TO xtrole; -- -- Name: flnotes; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE flnotes FROM PUBLIC; REVOKE ALL ON TABLE flnotes FROM admin; GRANT ALL ON TABLE flnotes TO admin; GRANT ALL ON TABLE flnotes TO xtrole; -- -- Name: flnotes_flnotes_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE flnotes_flnotes_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flnotes_flnotes_id_seq FROM admin; GRANT ALL ON SEQUENCE flnotes_flnotes_id_seq TO admin; GRANT ALL ON SEQUENCE flnotes_flnotes_id_seq TO xtrole; -- -- Name: flrpt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE flrpt FROM PUBLIC; REVOKE ALL ON TABLE flrpt FROM admin; GRANT ALL ON TABLE flrpt TO admin; GRANT ALL ON TABLE flrpt TO xtrole; -- -- Name: flrpt_flrpt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE flrpt_flrpt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flrpt_flrpt_id_seq FROM admin; GRANT ALL ON SEQUENCE flrpt_flrpt_id_seq TO admin; GRANT ALL ON SEQUENCE flrpt_flrpt_id_seq TO xtrole; -- -- Name: flspec; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE flspec FROM PUBLIC; REVOKE ALL ON TABLE flspec FROM admin; GRANT ALL ON TABLE flspec TO admin; GRANT ALL ON TABLE flspec TO xtrole; -- -- Name: flspec_flspec_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE flspec_flspec_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flspec_flspec_id_seq FROM admin; GRANT ALL ON SEQUENCE flspec_flspec_id_seq TO admin; GRANT ALL ON SEQUENCE flspec_flspec_id_seq TO xtrole; -- -- Name: form; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE form FROM PUBLIC; REVOKE ALL ON TABLE form FROM admin; GRANT ALL ON TABLE form TO admin; GRANT ALL ON TABLE form TO xtrole; -- -- Name: form_form_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE form_form_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE form_form_id_seq FROM admin; GRANT ALL ON SEQUENCE form_form_id_seq TO admin; GRANT ALL ON SEQUENCE form_form_id_seq TO xtrole; -- -- Name: freightclass_freightclass_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE freightclass_freightclass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE freightclass_freightclass_id_seq FROM admin; GRANT ALL ON SEQUENCE freightclass_freightclass_id_seq TO admin; GRANT ALL ON SEQUENCE freightclass_freightclass_id_seq TO xtrole; -- -- Name: glseries; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE glseries FROM PUBLIC; REVOKE ALL ON TABLE glseries FROM admin; GRANT ALL ON TABLE glseries TO admin; GRANT ALL ON TABLE glseries TO xtrole; -- -- Name: glseries_glseries_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE glseries_glseries_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE glseries_glseries_id_seq FROM admin; GRANT ALL ON SEQUENCE glseries_glseries_id_seq TO admin; GRANT ALL ON SEQUENCE glseries_glseries_id_seq TO xtrole; -- -- Name: gltrans_gltrans_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE gltrans_gltrans_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE gltrans_gltrans_id_seq FROM admin; GRANT ALL ON SEQUENCE gltrans_gltrans_id_seq TO admin; GRANT ALL ON SEQUENCE gltrans_gltrans_id_seq TO xtrole; -- -- Name: gltrans_sequence_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE gltrans_sequence_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE gltrans_sequence_seq FROM admin; GRANT ALL ON SEQUENCE gltrans_sequence_seq TO admin; GRANT ALL ON SEQUENCE gltrans_sequence_seq TO xtrole; -- -- Name: grp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE grp FROM PUBLIC; REVOKE ALL ON TABLE grp FROM admin; GRANT ALL ON TABLE grp TO admin; GRANT ALL ON TABLE grp TO xtrole; -- -- Name: grp_grp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE grp_grp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE grp_grp_id_seq FROM admin; GRANT ALL ON SEQUENCE grp_grp_id_seq TO admin; GRANT ALL ON SEQUENCE grp_grp_id_seq TO xtrole; -- -- Name: grppriv; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE grppriv FROM PUBLIC; REVOKE ALL ON TABLE grppriv FROM admin; GRANT ALL ON TABLE grppriv TO admin; GRANT ALL ON TABLE grppriv TO xtrole; -- -- Name: grppriv_grppriv_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE grppriv_grppriv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE grppriv_grppriv_id_seq FROM admin; GRANT ALL ON SEQUENCE grppriv_grppriv_id_seq TO admin; GRANT ALL ON SEQUENCE grppriv_grppriv_id_seq TO xtrole; -- -- Name: hnfc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE hnfc FROM PUBLIC; REVOKE ALL ON TABLE hnfc FROM admin; GRANT ALL ON TABLE hnfc TO admin; GRANT ALL ON TABLE hnfc TO xtrole; -- -- Name: hnfc_hnfc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE hnfc_hnfc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE hnfc_hnfc_id_seq FROM admin; GRANT ALL ON SEQUENCE hnfc_hnfc_id_seq TO admin; GRANT ALL ON SEQUENCE hnfc_hnfc_id_seq TO xtrole; -- -- Name: incdt_incdt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE incdt_incdt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdt_incdt_id_seq FROM admin; GRANT ALL ON SEQUENCE incdt_incdt_id_seq TO admin; GRANT ALL ON SEQUENCE incdt_incdt_id_seq TO xtrole; -- -- Name: incdtcat_incdtcat_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE incdtcat_incdtcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdtcat_incdtcat_id_seq FROM admin; GRANT ALL ON SEQUENCE incdtcat_incdtcat_id_seq TO admin; GRANT ALL ON SEQUENCE incdtcat_incdtcat_id_seq TO xtrole; -- -- Name: incdthist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE incdthist FROM PUBLIC; REVOKE ALL ON TABLE incdthist FROM admin; GRANT ALL ON TABLE incdthist TO admin; GRANT ALL ON TABLE incdthist TO xtrole; -- -- Name: incdthist_incdthist_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE incdthist_incdthist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdthist_incdthist_id_seq FROM admin; GRANT ALL ON SEQUENCE incdthist_incdthist_id_seq TO admin; GRANT ALL ON SEQUENCE incdthist_incdthist_id_seq TO xtrole; -- -- Name: incdtpriority_incdtpriority_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq FROM admin; GRANT ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq TO admin; GRANT ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq TO xtrole; -- -- Name: incdtresolution_incdtresolution_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq FROM admin; GRANT ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq TO admin; GRANT ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq TO xtrole; -- -- Name: incdtseverity_incdtseverity_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq FROM admin; GRANT ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq TO admin; GRANT ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq TO xtrole; -- -- Name: invbal_invbal_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE invbal_invbal_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invbal_invbal_id_seq FROM admin; GRANT ALL ON SEQUENCE invbal_invbal_id_seq TO admin; GRANT ALL ON SEQUENCE invbal_invbal_id_seq TO xtrole; -- -- Name: invc_invc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE invc_invc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invc_invc_id_seq FROM admin; GRANT ALL ON SEQUENCE invc_invc_id_seq TO admin; GRANT ALL ON SEQUENCE invc_invc_id_seq TO xtrole; -- -- Name: invchead_invchead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE invchead_invchead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invchead_invchead_id_seq FROM admin; GRANT ALL ON SEQUENCE invchead_invchead_id_seq TO admin; GRANT ALL ON SEQUENCE invchead_invchead_id_seq TO xtrole; -- -- Name: invcheadtax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invcheadtax FROM PUBLIC; REVOKE ALL ON TABLE invcheadtax FROM admin; GRANT ALL ON TABLE invcheadtax TO admin; GRANT ALL ON TABLE invcheadtax TO xtrole; -- -- Name: invcitem_invcitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE invcitem_invcitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invcitem_invcitem_id_seq FROM admin; GRANT ALL ON SEQUENCE invcitem_invcitem_id_seq TO admin; GRANT ALL ON SEQUENCE invcitem_invcitem_id_seq TO xtrole; -- -- Name: invcitemtax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invcitemtax FROM PUBLIC; REVOKE ALL ON TABLE invcitemtax FROM admin; GRANT ALL ON TABLE invcitemtax TO admin; GRANT ALL ON TABLE invcitemtax TO xtrole; -- -- Name: invcnt_invcnt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE invcnt_invcnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invcnt_invcnt_id_seq FROM admin; GRANT ALL ON SEQUENCE invcnt_invcnt_id_seq TO admin; GRANT ALL ON SEQUENCE invcnt_invcnt_id_seq TO xtrole; -- -- Name: invdetail; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invdetail FROM PUBLIC; REVOKE ALL ON TABLE invdetail FROM admin; GRANT ALL ON TABLE invdetail TO admin; GRANT ALL ON TABLE invdetail TO xtrole; -- -- Name: invdetail_invdetail_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE invdetail_invdetail_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invdetail_invdetail_id_seq FROM admin; GRANT ALL ON SEQUENCE invdetail_invdetail_id_seq TO admin; GRANT ALL ON SEQUENCE invdetail_invdetail_id_seq TO xtrole; -- -- Name: invhist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invhist FROM PUBLIC; REVOKE ALL ON TABLE invhist FROM admin; GRANT ALL ON TABLE invhist TO admin; GRANT ALL ON TABLE invhist TO xtrole; -- -- Name: invhist_invhist_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE invhist_invhist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invhist_invhist_id_seq FROM admin; GRANT ALL ON SEQUENCE invhist_invhist_id_seq TO admin; GRANT ALL ON SEQUENCE invhist_invhist_id_seq TO xtrole; -- -- Name: invhistexpcat; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invhistexpcat FROM PUBLIC; REVOKE ALL ON TABLE invhistexpcat FROM admin; GRANT ALL ON TABLE invhistexpcat TO admin; GRANT ALL ON TABLE invhistexpcat TO xtrole; -- -- Name: invhistexpcat_invhistexpcat_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq FROM admin; GRANT ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq TO admin; GRANT ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq TO xtrole; -- -- Name: invoiceitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE invoiceitem FROM PUBLIC; REVOKE ALL ON TABLE invoiceitem FROM admin; GRANT ALL ON TABLE invoiceitem TO admin; GRANT ALL ON TABLE invoiceitem TO xtrole; -- -- Name: ipsass_ipsass_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ipsass_ipsass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsass_ipsass_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsass_ipsass_id_seq TO admin; GRANT ALL ON SEQUENCE ipsass_ipsass_id_seq TO xtrole; -- -- Name: ipsctyp_ipsctyp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq TO admin; GRANT ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq TO xtrole; -- -- Name: ipscust_ipscust_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ipscust_ipscust_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipscust_ipscust_id_seq FROM admin; GRANT ALL ON SEQUENCE ipscust_ipscust_id_seq TO admin; GRANT ALL ON SEQUENCE ipscust_ipscust_id_seq TO xtrole; -- -- Name: ipsfreight_ipsfreight_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq TO admin; GRANT ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq TO xtrole; -- -- Name: ipshead_ipshead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ipshead_ipshead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipshead_ipshead_id_seq FROM admin; GRANT ALL ON SEQUENCE ipshead_ipshead_id_seq TO admin; GRANT ALL ON SEQUENCE ipshead_ipshead_id_seq TO xtrole; -- -- Name: ipsitem_ipsitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ipsitem_ipsitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsitem_ipsitem_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsitem_ipsitem_id_seq TO admin; GRANT ALL ON SEQUENCE ipsitem_ipsitem_id_seq TO xtrole; -- -- Name: ipsitemchar_ipsitemchar_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq TO admin; GRANT ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq TO xtrole; -- -- Name: ipsprice; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ipsprice FROM PUBLIC; REVOKE ALL ON TABLE ipsprice FROM admin; GRANT ALL ON TABLE ipsprice TO admin; GRANT ALL ON TABLE ipsprice TO xtrole; -- -- Name: ipsprodcat_bak; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE ipsprodcat_bak FROM PUBLIC; REVOKE ALL ON TABLE ipsprodcat_bak FROM admin; GRANT ALL ON TABLE ipsprodcat_bak TO admin; GRANT ALL ON TABLE ipsprodcat_bak TO xtrole; -- -- Name: ipsprodcat_ipsprodcat_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq TO admin; GRANT ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq TO xtrole; -- -- Name: item_item_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE item_item_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE item_item_id_seq FROM admin; GRANT ALL ON SEQUENCE item_item_id_seq TO admin; GRANT ALL ON SEQUENCE item_item_id_seq TO xtrole; -- -- Name: itemalias_itemalias_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemalias_itemalias_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemalias_itemalias_id_seq FROM admin; GRANT ALL ON SEQUENCE itemalias_itemalias_id_seq TO admin; GRANT ALL ON SEQUENCE itemalias_itemalias_id_seq TO xtrole; -- -- Name: itematr_itematr_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itematr_itematr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itematr_itematr_id_seq FROM admin; GRANT ALL ON SEQUENCE itematr_itematr_id_seq TO admin; GRANT ALL ON SEQUENCE itematr_itematr_id_seq TO xtrole; -- -- Name: itemcost_itemcost_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemcost_itemcost_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemcost_itemcost_id_seq FROM admin; GRANT ALL ON SEQUENCE itemcost_itemcost_id_seq TO admin; GRANT ALL ON SEQUENCE itemcost_itemcost_id_seq TO xtrole; -- -- Name: itemfrez_itemfrez_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemfrez_itemfrez_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemfrez_itemfrez_seq FROM admin; GRANT ALL ON SEQUENCE itemfrez_itemfrez_seq TO admin; GRANT ALL ON SEQUENCE itemfrez_itemfrez_seq TO xtrole; -- -- Name: itemgrp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemgrp FROM PUBLIC; REVOKE ALL ON TABLE itemgrp FROM admin; GRANT ALL ON TABLE itemgrp TO admin; GRANT ALL ON TABLE itemgrp TO xtrole; -- -- Name: itemgrp_itemgrp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemgrp_itemgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemgrp_itemgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE itemgrp_itemgrp_id_seq TO admin; GRANT ALL ON SEQUENCE itemgrp_itemgrp_id_seq TO xtrole; -- -- Name: itemgrpitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemgrpitem FROM PUBLIC; REVOKE ALL ON TABLE itemgrpitem FROM admin; GRANT ALL ON TABLE itemgrpitem TO admin; GRANT ALL ON TABLE itemgrpitem TO xtrole; -- -- Name: itemgrpitem_itemgrpitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq FROM admin; GRANT ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq TO admin; GRANT ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq TO xtrole; -- -- Name: itemimage; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemimage FROM PUBLIC; REVOKE ALL ON TABLE itemimage FROM admin; GRANT ALL ON TABLE itemimage TO admin; GRANT ALL ON TABLE itemimage TO xtrole; -- -- Name: itemimage_itemimage_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemimage_itemimage_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemimage_itemimage_id_seq FROM admin; GRANT ALL ON SEQUENCE itemimage_itemimage_id_seq TO admin; GRANT ALL ON SEQUENCE itemimage_itemimage_id_seq TO xtrole; -- -- Name: itemloc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemloc FROM PUBLIC; REVOKE ALL ON TABLE itemloc FROM admin; GRANT ALL ON TABLE itemloc TO admin; GRANT ALL ON TABLE itemloc TO xtrole; -- -- Name: itemloc_itemloc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemloc_itemloc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemloc_itemloc_id_seq FROM admin; GRANT ALL ON SEQUENCE itemloc_itemloc_id_seq TO admin; GRANT ALL ON SEQUENCE itemloc_itemloc_id_seq TO xtrole; -- -- Name: itemloc_series_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemloc_series_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemloc_series_seq FROM admin; GRANT ALL ON SEQUENCE itemloc_series_seq TO admin; GRANT ALL ON SEQUENCE itemloc_series_seq TO xtrole; -- -- Name: itemlocdist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemlocdist FROM PUBLIC; REVOKE ALL ON TABLE itemlocdist FROM admin; GRANT ALL ON TABLE itemlocdist TO admin; GRANT ALL ON TABLE itemlocdist TO xtrole; -- -- Name: itemlocdist_itemlocdist_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq FROM admin; GRANT ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq TO admin; GRANT ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq TO xtrole; -- -- Name: itemlocpost; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemlocpost FROM PUBLIC; REVOKE ALL ON TABLE itemlocpost FROM admin; GRANT ALL ON TABLE itemlocpost TO admin; GRANT ALL ON TABLE itemlocpost TO xtrole; -- -- Name: itemlocpost_itemlocpost_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq FROM admin; GRANT ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq TO admin; GRANT ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq TO xtrole; -- -- Name: itemopn_itemopn_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemopn_itemopn_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemopn_itemopn_id_seq FROM admin; GRANT ALL ON SEQUENCE itemopn_itemopn_id_seq TO admin; GRANT ALL ON SEQUENCE itemopn_itemopn_id_seq TO xtrole; -- -- Name: itemsite_itemsite_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemsite_itemsite_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemsite_itemsite_id_seq FROM admin; GRANT ALL ON SEQUENCE itemsite_itemsite_id_seq TO admin; GRANT ALL ON SEQUENCE itemsite_itemsite_id_seq TO xtrole; -- -- Name: itemsrc_itemsrc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemsrc_itemsrc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemsrc_itemsrc_id_seq FROM admin; GRANT ALL ON SEQUENCE itemsrc_itemsrc_id_seq TO admin; GRANT ALL ON SEQUENCE itemsrc_itemsrc_id_seq TO xtrole; -- -- Name: itemsrcp_itemsrcp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq FROM admin; GRANT ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq TO admin; GRANT ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq TO xtrole; -- -- Name: itemsub_itemsub_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemsub_itemsub_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemsub_itemsub_id_seq FROM admin; GRANT ALL ON SEQUENCE itemsub_itemsub_id_seq TO admin; GRANT ALL ON SEQUENCE itemsub_itemsub_id_seq TO xtrole; -- -- Name: itemtax_itemtax_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemtax_itemtax_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemtax_itemtax_id_seq FROM admin; GRANT ALL ON SEQUENCE itemtax_itemtax_id_seq TO admin; GRANT ALL ON SEQUENCE itemtax_itemtax_id_seq TO xtrole; -- -- Name: itemtrans; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemtrans FROM PUBLIC; REVOKE ALL ON TABLE itemtrans FROM admin; GRANT ALL ON TABLE itemtrans TO admin; GRANT ALL ON TABLE itemtrans TO xtrole; -- -- Name: itemtrans_itemtrans_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemtrans_itemtrans_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemtrans_itemtrans_id_seq FROM admin; GRANT ALL ON SEQUENCE itemtrans_itemtrans_id_seq TO admin; GRANT ALL ON SEQUENCE itemtrans_itemtrans_id_seq TO xtrole; -- -- Name: itemuom; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE itemuom FROM PUBLIC; REVOKE ALL ON TABLE itemuom FROM admin; GRANT ALL ON TABLE itemuom TO admin; GRANT ALL ON TABLE itemuom TO xtrole; -- -- Name: itemuom_itemuom_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemuom_itemuom_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemuom_itemuom_id_seq FROM admin; GRANT ALL ON SEQUENCE itemuom_itemuom_id_seq TO admin; GRANT ALL ON SEQUENCE itemuom_itemuom_id_seq TO xtrole; -- -- Name: itemuomconv_itemuomconv_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq FROM admin; GRANT ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq TO admin; GRANT ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq TO xtrole; -- -- Name: journal_number_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE journal_number_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE journal_number_seq FROM admin; GRANT ALL ON SEQUENCE journal_number_seq TO admin; GRANT ALL ON SEQUENCE journal_number_seq TO xtrole; -- -- Name: jrnluse; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE jrnluse FROM PUBLIC; REVOKE ALL ON TABLE jrnluse FROM admin; GRANT ALL ON TABLE jrnluse TO admin; GRANT ALL ON TABLE jrnluse TO xtrole; -- -- Name: jrnluse_jrnluse_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE jrnluse_jrnluse_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE jrnluse_jrnluse_id_seq FROM admin; GRANT ALL ON SEQUENCE jrnluse_jrnluse_id_seq TO admin; GRANT ALL ON SEQUENCE jrnluse_jrnluse_id_seq TO xtrole; -- -- Name: labeldef; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE labeldef FROM PUBLIC; REVOKE ALL ON TABLE labeldef FROM admin; GRANT ALL ON TABLE labeldef TO admin; GRANT ALL ON TABLE labeldef TO xtrole; -- -- Name: labeldef_labeldef_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE labeldef_labeldef_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE labeldef_labeldef_id_seq FROM admin; GRANT ALL ON SEQUENCE labeldef_labeldef_id_seq TO admin; GRANT ALL ON SEQUENCE labeldef_labeldef_id_seq TO xtrole; -- -- Name: labelform; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE labelform FROM PUBLIC; REVOKE ALL ON TABLE labelform FROM admin; GRANT ALL ON TABLE labelform TO admin; GRANT ALL ON TABLE labelform TO xtrole; -- -- Name: labelform_labelform_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE labelform_labelform_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE labelform_labelform_id_seq FROM admin; GRANT ALL ON SEQUENCE labelform_labelform_id_seq TO admin; GRANT ALL ON SEQUENCE labelform_labelform_id_seq TO xtrole; -- -- Name: lang; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE lang FROM PUBLIC; REVOKE ALL ON TABLE lang FROM admin; GRANT ALL ON TABLE lang TO admin; GRANT ALL ON TABLE lang TO xtrole; -- -- Name: lang_lang_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE lang_lang_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE lang_lang_id_seq FROM admin; GRANT ALL ON SEQUENCE lang_lang_id_seq TO admin; GRANT ALL ON SEQUENCE lang_lang_id_seq TO xtrole; -- -- Name: locale; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE locale FROM PUBLIC; REVOKE ALL ON TABLE locale FROM admin; GRANT ALL ON TABLE locale TO admin; GRANT ALL ON TABLE locale TO xtrole; -- -- Name: locale_locale_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE locale_locale_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE locale_locale_id_seq FROM admin; GRANT ALL ON SEQUENCE locale_locale_id_seq TO admin; GRANT ALL ON SEQUENCE locale_locale_id_seq TO xtrole; -- -- Name: location_location_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE location_location_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE location_location_id_seq FROM admin; GRANT ALL ON SEQUENCE location_location_id_seq TO admin; GRANT ALL ON SEQUENCE location_location_id_seq TO xtrole; -- -- Name: locitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE locitem FROM PUBLIC; REVOKE ALL ON TABLE locitem FROM admin; GRANT ALL ON TABLE locitem TO admin; GRANT ALL ON TABLE locitem TO xtrole; -- -- Name: locitem_locitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE locitem_locitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE locitem_locitem_id_seq FROM admin; GRANT ALL ON SEQUENCE locitem_locitem_id_seq TO admin; GRANT ALL ON SEQUENCE locitem_locitem_id_seq TO xtrole; -- -- Name: log_log_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE log_log_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE log_log_id_seq FROM admin; GRANT ALL ON SEQUENCE log_log_id_seq TO admin; GRANT ALL ON SEQUENCE log_log_id_seq TO xtrole; -- -- Name: metric; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE metric FROM PUBLIC; REVOKE ALL ON TABLE metric FROM admin; GRANT ALL ON TABLE metric TO admin; GRANT ALL ON TABLE metric TO xtrole; -- -- Name: metric_metric_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE metric_metric_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE metric_metric_id_seq FROM admin; GRANT ALL ON SEQUENCE metric_metric_id_seq TO admin; GRANT ALL ON SEQUENCE metric_metric_id_seq TO xtrole; -- -- Name: metricenc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE metricenc FROM PUBLIC; REVOKE ALL ON TABLE metricenc FROM admin; GRANT ALL ON TABLE metricenc TO admin; GRANT ALL ON TABLE metricenc TO xtrole; -- -- Name: metricenc_metricenc_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE metricenc_metricenc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE metricenc_metricenc_id_seq FROM admin; GRANT ALL ON SEQUENCE metricenc_metricenc_id_seq TO admin; GRANT ALL ON SEQUENCE metricenc_metricenc_id_seq TO xtrole; -- -- Name: misc_index_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE misc_index_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE misc_index_seq FROM admin; GRANT ALL ON SEQUENCE misc_index_seq TO admin; GRANT ALL ON SEQUENCE misc_index_seq TO xtrole; -- -- Name: mrghist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE mrghist FROM PUBLIC; REVOKE ALL ON TABLE mrghist FROM admin; GRANT ALL ON TABLE mrghist TO admin; GRANT ALL ON TABLE mrghist TO xtrole; -- -- Name: mrgundo; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE mrgundo FROM PUBLIC; REVOKE ALL ON TABLE mrgundo FROM admin; GRANT ALL ON TABLE mrgundo TO admin; GRANT ALL ON TABLE mrgundo TO xtrole; -- -- Name: msg; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE msg FROM PUBLIC; REVOKE ALL ON TABLE msg FROM admin; GRANT ALL ON TABLE msg TO admin; GRANT ALL ON TABLE msg TO xtrole; -- -- Name: msg_msg_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE msg_msg_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE msg_msg_id_seq FROM admin; GRANT ALL ON SEQUENCE msg_msg_id_seq TO admin; GRANT ALL ON SEQUENCE msg_msg_id_seq TO xtrole; -- -- Name: msguser; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE msguser FROM PUBLIC; REVOKE ALL ON TABLE msguser FROM admin; GRANT ALL ON TABLE msguser TO admin; GRANT ALL ON TABLE msguser TO xtrole; -- -- Name: msguser_msguser_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE msguser_msguser_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE msguser_msguser_id_seq FROM admin; GRANT ALL ON SEQUENCE msguser_msguser_id_seq TO admin; GRANT ALL ON SEQUENCE msguser_msguser_id_seq TO xtrole; -- -- Name: nvend_nvend_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE nvend_nvend_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE nvend_nvend_id_seq FROM admin; GRANT ALL ON SEQUENCE nvend_nvend_id_seq TO admin; GRANT ALL ON SEQUENCE nvend_nvend_id_seq TO xtrole; -- -- Name: obsolete_tax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE obsolete_tax FROM PUBLIC; REVOKE ALL ON TABLE obsolete_tax FROM admin; GRANT ALL ON TABLE obsolete_tax TO admin; GRANT ALL ON TABLE obsolete_tax TO xtrole; -- -- Name: ophead_ophead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE ophead_ophead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ophead_ophead_id_seq FROM admin; GRANT ALL ON SEQUENCE ophead_ophead_id_seq TO admin; GRANT ALL ON SEQUENCE ophead_ophead_id_seq TO xtrole; -- -- Name: opsource; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE opsource FROM PUBLIC; REVOKE ALL ON TABLE opsource FROM admin; GRANT ALL ON TABLE opsource TO admin; GRANT ALL ON TABLE opsource TO xtrole; -- -- Name: opsource_opsource_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE opsource_opsource_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE opsource_opsource_id_seq FROM admin; GRANT ALL ON SEQUENCE opsource_opsource_id_seq TO admin; GRANT ALL ON SEQUENCE opsource_opsource_id_seq TO xtrole; -- -- Name: opstage; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE opstage FROM PUBLIC; REVOKE ALL ON TABLE opstage FROM admin; GRANT ALL ON TABLE opstage TO admin; GRANT ALL ON TABLE opstage TO xtrole; -- -- Name: opstage_opstage_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE opstage_opstage_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE opstage_opstage_id_seq FROM admin; GRANT ALL ON SEQUENCE opstage_opstage_id_seq TO admin; GRANT ALL ON SEQUENCE opstage_opstage_id_seq TO xtrole; -- -- Name: optype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE optype FROM PUBLIC; REVOKE ALL ON TABLE optype FROM admin; GRANT ALL ON TABLE optype TO admin; GRANT ALL ON TABLE optype TO xtrole; -- -- Name: optype_optype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE optype_optype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE optype_optype_id_seq FROM admin; GRANT ALL ON SEQUENCE optype_optype_id_seq TO admin; GRANT ALL ON SEQUENCE optype_optype_id_seq TO xtrole; -- -- Name: orderhead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE orderhead FROM PUBLIC; REVOKE ALL ON TABLE orderhead FROM admin; GRANT ALL ON TABLE orderhead TO admin; GRANT ALL ON TABLE orderhead TO xtrole; -- -- Name: orderitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE orderitem FROM PUBLIC; REVOKE ALL ON TABLE orderitem FROM admin; GRANT ALL ON TABLE orderitem TO admin; GRANT ALL ON TABLE orderitem TO xtrole; -- -- Name: orderseq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE orderseq FROM PUBLIC; REVOKE ALL ON TABLE orderseq FROM admin; GRANT ALL ON TABLE orderseq TO admin; GRANT ALL ON TABLE orderseq TO xtrole; -- -- Name: orderseq_orderseq_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE orderseq_orderseq_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE orderseq_orderseq_id_seq FROM admin; GRANT ALL ON SEQUENCE orderseq_orderseq_id_seq TO admin; GRANT ALL ON SEQUENCE orderseq_orderseq_id_seq TO xtrole; -- -- Name: pack; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE pack FROM PUBLIC; REVOKE ALL ON TABLE pack FROM admin; GRANT ALL ON TABLE pack TO admin; GRANT ALL ON TABLE pack TO xtrole; -- -- Name: pack_pack_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE pack_pack_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pack_pack_id_seq FROM admin; GRANT ALL ON SEQUENCE pack_pack_id_seq TO admin; GRANT ALL ON SEQUENCE pack_pack_id_seq TO xtrole; -- -- Name: payaropen; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE payaropen FROM PUBLIC; REVOKE ALL ON TABLE payaropen FROM admin; GRANT ALL ON TABLE payaropen TO admin; GRANT ALL ON TABLE payaropen TO xtrole; -- -- Name: payco; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE payco FROM PUBLIC; REVOKE ALL ON TABLE payco FROM admin; GRANT ALL ON TABLE payco TO admin; GRANT ALL ON TABLE payco TO xtrole; -- -- Name: period_period_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE period_period_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE period_period_id_seq FROM admin; GRANT ALL ON SEQUENCE period_period_id_seq TO admin; GRANT ALL ON SEQUENCE period_period_id_seq TO xtrole; -- -- Name: pkgdep; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE pkgdep FROM PUBLIC; REVOKE ALL ON TABLE pkgdep FROM admin; GRANT ALL ON TABLE pkgdep TO admin; GRANT ALL ON TABLE pkgdep TO xtrole; -- -- Name: pkgdep_pkgdep_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE pkgdep_pkgdep_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pkgdep_pkgdep_id_seq FROM admin; GRANT ALL ON SEQUENCE pkgdep_pkgdep_id_seq TO admin; GRANT ALL ON SEQUENCE pkgdep_pkgdep_id_seq TO xtrole; -- -- Name: pkghead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE pkghead FROM PUBLIC; REVOKE ALL ON TABLE pkghead FROM admin; GRANT ALL ON TABLE pkghead TO admin; GRANT ALL ON TABLE pkghead TO xtrole; -- -- Name: pkghead_pkghead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE pkghead_pkghead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pkghead_pkghead_id_seq FROM admin; GRANT ALL ON SEQUENCE pkghead_pkghead_id_seq TO admin; GRANT ALL ON SEQUENCE pkghead_pkghead_id_seq TO xtrole; -- -- Name: pkgitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE pkgitem FROM PUBLIC; REVOKE ALL ON TABLE pkgitem FROM admin; GRANT ALL ON TABLE pkgitem TO admin; GRANT ALL ON TABLE pkgitem TO xtrole; -- -- Name: pkgitem_pkgitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE pkgitem_pkgitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pkgitem_pkgitem_id_seq FROM admin; GRANT ALL ON SEQUENCE pkgitem_pkgitem_id_seq TO admin; GRANT ALL ON SEQUENCE pkgitem_pkgitem_id_seq TO xtrole; -- -- Name: plancode_plancode_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE plancode_plancode_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE plancode_plancode_id_seq FROM admin; GRANT ALL ON SEQUENCE plancode_plancode_id_seq TO admin; GRANT ALL ON SEQUENCE plancode_plancode_id_seq TO xtrole; -- -- Name: planord_planord_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE planord_planord_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE planord_planord_id_seq FROM admin; GRANT ALL ON SEQUENCE planord_planord_id_seq TO admin; GRANT ALL ON SEQUENCE planord_planord_id_seq TO xtrole; -- -- Name: pohead_pohead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE pohead_pohead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pohead_pohead_id_seq FROM admin; GRANT ALL ON SEQUENCE pohead_pohead_id_seq TO admin; GRANT ALL ON SEQUENCE pohead_pohead_id_seq TO xtrole; -- -- Name: poitem_poitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE poitem_poitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE poitem_poitem_id_seq FROM admin; GRANT ALL ON SEQUENCE poitem_poitem_id_seq TO admin; GRANT ALL ON SEQUENCE poitem_poitem_id_seq TO xtrole; -- -- Name: recv; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE recv FROM PUBLIC; REVOKE ALL ON TABLE recv FROM admin; GRANT ALL ON TABLE recv TO admin; GRANT ALL ON TABLE recv TO xtrole; -- -- Name: porecv; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE porecv FROM PUBLIC; REVOKE ALL ON TABLE porecv FROM admin; GRANT ALL ON TABLE porecv TO admin; GRANT ALL ON TABLE porecv TO xtrole; -- -- Name: porecv_porecv_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE porecv_porecv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE porecv_porecv_id_seq FROM admin; GRANT ALL ON SEQUENCE porecv_porecv_id_seq TO admin; GRANT ALL ON SEQUENCE porecv_porecv_id_seq TO xtrole; -- -- Name: poreject; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE poreject FROM PUBLIC; REVOKE ALL ON TABLE poreject FROM admin; GRANT ALL ON TABLE poreject TO admin; GRANT ALL ON TABLE poreject TO xtrole; -- -- Name: poreject_poreject_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE poreject_poreject_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE poreject_poreject_id_seq FROM admin; GRANT ALL ON SEQUENCE poreject_poreject_id_seq TO admin; GRANT ALL ON SEQUENCE poreject_poreject_id_seq TO xtrole; -- -- Name: potype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE potype FROM PUBLIC; REVOKE ALL ON TABLE potype FROM admin; GRANT ALL ON TABLE potype TO admin; GRANT ALL ON TABLE potype TO xtrole; -- -- Name: potype_potype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE potype_potype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE potype_potype_id_seq FROM admin; GRANT ALL ON SEQUENCE potype_potype_id_seq TO admin; GRANT ALL ON SEQUENCE potype_potype_id_seq TO xtrole; -- -- Name: pr; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE pr FROM PUBLIC; REVOKE ALL ON TABLE pr FROM admin; GRANT ALL ON TABLE pr TO admin; GRANT ALL ON TABLE pr TO xtrole; -- -- Name: pr_pr_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE pr_pr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pr_pr_id_seq FROM admin; GRANT ALL ON SEQUENCE pr_pr_id_seq TO admin; GRANT ALL ON SEQUENCE pr_pr_id_seq TO xtrole; -- -- Name: prftcntr; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE prftcntr FROM PUBLIC; REVOKE ALL ON TABLE prftcntr FROM admin; GRANT ALL ON TABLE prftcntr TO admin; GRANT ALL ON TABLE prftcntr TO xtrole; -- -- Name: prftcntr_prftcntr_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE prftcntr_prftcntr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prftcntr_prftcntr_id_seq FROM admin; GRANT ALL ON SEQUENCE prftcntr_prftcntr_id_seq TO admin; GRANT ALL ON SEQUENCE prftcntr_prftcntr_id_seq TO xtrole; -- -- Name: usrgrp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE usrgrp FROM PUBLIC; REVOKE ALL ON TABLE usrgrp FROM admin; GRANT ALL ON TABLE usrgrp TO admin; GRANT ALL ON TABLE usrgrp TO xtrole; -- -- Name: usrpriv; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE usrpriv FROM PUBLIC; REVOKE ALL ON TABLE usrpriv FROM admin; GRANT ALL ON TABLE usrpriv TO admin; GRANT ALL ON TABLE usrpriv TO xtrole; -- -- Name: privgranted; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE privgranted FROM PUBLIC; REVOKE ALL ON TABLE privgranted FROM admin; GRANT ALL ON TABLE privgranted TO admin; GRANT ALL ON TABLE privgranted TO xtrole; -- -- Name: prj_prj_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE prj_prj_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prj_prj_id_seq FROM admin; GRANT ALL ON SEQUENCE prj_prj_id_seq TO admin; GRANT ALL ON SEQUENCE prj_prj_id_seq TO xtrole; -- -- Name: prjtask_prjtask_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE prjtask_prjtask_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prjtask_prjtask_id_seq FROM admin; GRANT ALL ON SEQUENCE prjtask_prjtask_id_seq TO admin; GRANT ALL ON SEQUENCE prjtask_prjtask_id_seq TO xtrole; -- -- Name: prjtaskuser; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE prjtaskuser FROM PUBLIC; REVOKE ALL ON TABLE prjtaskuser FROM admin; GRANT ALL ON TABLE prjtaskuser TO admin; GRANT ALL ON TABLE prjtaskuser TO xtrole; -- -- Name: prjtaskuser_prjtaskuser_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq FROM admin; GRANT ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq TO admin; GRANT ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq TO xtrole; -- -- Name: prodcat_prodcat_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE prodcat_prodcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prodcat_prodcat_id_seq FROM admin; GRANT ALL ON SEQUENCE prodcat_prodcat_id_seq TO admin; GRANT ALL ON SEQUENCE prodcat_prodcat_id_seq TO xtrole; -- -- Name: qryhead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE qryhead FROM PUBLIC; REVOKE ALL ON TABLE qryhead FROM admin; GRANT ALL ON TABLE qryhead TO admin; GRANT ALL ON TABLE qryhead TO xtrole; -- -- Name: qryhead_qryhead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE qryhead_qryhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE qryhead_qryhead_id_seq FROM admin; GRANT ALL ON SEQUENCE qryhead_qryhead_id_seq TO admin; GRANT ALL ON SEQUENCE qryhead_qryhead_id_seq TO xtrole; -- -- Name: qryitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE qryitem FROM PUBLIC; REVOKE ALL ON TABLE qryitem FROM admin; GRANT ALL ON TABLE qryitem TO admin; GRANT ALL ON TABLE qryitem TO xtrole; -- -- Name: qryitem_qryitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE qryitem_qryitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE qryitem_qryitem_id_seq FROM admin; GRANT ALL ON SEQUENCE qryitem_qryitem_id_seq TO admin; GRANT ALL ON SEQUENCE qryitem_qryitem_id_seq TO xtrole; -- -- Name: quhead_quhead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE quhead_quhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE quhead_quhead_id_seq FROM admin; GRANT ALL ON SEQUENCE quhead_quhead_id_seq TO admin; GRANT ALL ON SEQUENCE quhead_quhead_id_seq TO xtrole; -- -- Name: quitem_quitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE quitem_quitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE quitem_quitem_id_seq FROM admin; GRANT ALL ON SEQUENCE quitem_quitem_id_seq TO admin; GRANT ALL ON SEQUENCE quitem_quitem_id_seq TO xtrole; -- -- Name: rcalitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE rcalitem FROM PUBLIC; REVOKE ALL ON TABLE rcalitem FROM admin; GRANT ALL ON TABLE rcalitem TO admin; GRANT ALL ON TABLE rcalitem TO xtrole; -- -- Name: recur; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE recur FROM PUBLIC; REVOKE ALL ON TABLE recur FROM admin; GRANT ALL ON TABLE recur TO admin; GRANT ALL ON TABLE recur TO xtrole; -- -- Name: recur_recur_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE recur_recur_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE recur_recur_id_seq FROM admin; GRANT ALL ON SEQUENCE recur_recur_id_seq TO admin; GRANT ALL ON SEQUENCE recur_recur_id_seq TO xtrole; -- -- Name: recurtype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE recurtype FROM PUBLIC; REVOKE ALL ON TABLE recurtype FROM admin; GRANT ALL ON TABLE recurtype TO admin; GRANT ALL ON TABLE recurtype TO xtrole; -- -- Name: recurtype_recurtype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE recurtype_recurtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE recurtype_recurtype_id_seq FROM admin; GRANT ALL ON SEQUENCE recurtype_recurtype_id_seq TO admin; GRANT ALL ON SEQUENCE recurtype_recurtype_id_seq TO xtrole; -- -- Name: recv_recv_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE recv_recv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE recv_recv_id_seq FROM admin; GRANT ALL ON SEQUENCE recv_recv_id_seq TO admin; GRANT ALL ON SEQUENCE recv_recv_id_seq TO xtrole; -- -- Name: remitto; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE remitto FROM PUBLIC; REVOKE ALL ON TABLE remitto FROM admin; GRANT ALL ON TABLE remitto TO admin; GRANT ALL ON TABLE remitto TO xtrole; -- -- Name: rjctcode; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE rjctcode FROM PUBLIC; REVOKE ALL ON TABLE rjctcode FROM admin; GRANT ALL ON TABLE rjctcode TO admin; GRANT ALL ON TABLE rjctcode TO xtrole; -- -- Name: rjctcode_rjctcode_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE rjctcode_rjctcode_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE rjctcode_rjctcode_id_seq FROM admin; GRANT ALL ON SEQUENCE rjctcode_rjctcode_id_seq TO admin; GRANT ALL ON SEQUENCE rjctcode_rjctcode_id_seq TO xtrole; -- -- Name: rsncode_rsncode_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE rsncode_rsncode_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE rsncode_rsncode_id_seq FROM admin; GRANT ALL ON SEQUENCE rsncode_rsncode_id_seq TO admin; GRANT ALL ON SEQUENCE rsncode_rsncode_id_seq TO xtrole; -- -- Name: sale; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE sale FROM PUBLIC; REVOKE ALL ON TABLE sale FROM admin; GRANT ALL ON TABLE sale TO admin; GRANT ALL ON TABLE sale TO xtrole; -- -- Name: sale_sale_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE sale_sale_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE sale_sale_id_seq FROM admin; GRANT ALL ON SEQUENCE sale_sale_id_seq TO admin; GRANT ALL ON SEQUENCE sale_sale_id_seq TO xtrole; -- -- Name: salesaccnt_salesaccnt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq TO admin; GRANT ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq TO xtrole; -- -- Name: salescat_salescat_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE salescat_salescat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE salescat_salescat_id_seq FROM admin; GRANT ALL ON SEQUENCE salescat_salescat_id_seq TO admin; GRANT ALL ON SEQUENCE salescat_salescat_id_seq TO xtrole; -- -- Name: saleshistory; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE saleshistory FROM PUBLIC; REVOKE ALL ON TABLE saleshistory FROM admin; GRANT ALL ON TABLE saleshistory TO admin; GRANT ALL ON TABLE saleshistory TO xtrole; -- -- Name: saleshistorymisc; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE saleshistorymisc FROM PUBLIC; REVOKE ALL ON TABLE saleshistorymisc FROM admin; GRANT ALL ON TABLE saleshistorymisc TO admin; GRANT ALL ON TABLE saleshistorymisc TO xtrole; -- -- Name: salesrep_salesrep_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE salesrep_salesrep_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE salesrep_salesrep_id_seq FROM admin; GRANT ALL ON SEQUENCE salesrep_salesrep_id_seq TO admin; GRANT ALL ON SEQUENCE salesrep_salesrep_id_seq TO xtrole; -- -- Name: saletype_saletype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE saletype_saletype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE saletype_saletype_id_seq FROM admin; GRANT ALL ON SEQUENCE saletype_saletype_id_seq TO admin; GRANT ALL ON SEQUENCE saletype_saletype_id_seq TO xtrole; -- -- Name: schemaord; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE schemaord FROM PUBLIC; REVOKE ALL ON TABLE schemaord FROM admin; GRANT ALL ON TABLE schemaord TO admin; GRANT ALL ON TABLE schemaord TO xtrole; -- -- Name: schemaord_schemaord_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE schemaord_schemaord_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE schemaord_schemaord_id_seq FROM admin; GRANT ALL ON SEQUENCE schemaord_schemaord_id_seq TO admin; GRANT ALL ON SEQUENCE schemaord_schemaord_id_seq TO xtrole; -- -- Name: sequence; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE sequence FROM PUBLIC; REVOKE ALL ON TABLE sequence FROM admin; GRANT ALL ON TABLE sequence TO admin; GRANT ALL ON TABLE sequence TO xtrole; -- -- Name: shift_shift_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shift_shift_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shift_shift_id_seq FROM admin; GRANT ALL ON SEQUENCE shift_shift_id_seq TO admin; GRANT ALL ON SEQUENCE shift_shift_id_seq TO xtrole; -- -- Name: shipchrg_shipchrg_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shipchrg_shipchrg_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipchrg_shipchrg_id_seq FROM admin; GRANT ALL ON SEQUENCE shipchrg_shipchrg_id_seq TO admin; GRANT ALL ON SEQUENCE shipchrg_shipchrg_id_seq TO xtrole; -- -- Name: shipdatasum; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shipdatasum FROM PUBLIC; REVOKE ALL ON TABLE shipdatasum FROM admin; GRANT ALL ON TABLE shipdatasum TO admin; GRANT ALL ON TABLE shipdatasum TO xtrole; -- -- Name: shipform_shipform_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shipform_shipform_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipform_shipform_id_seq FROM admin; GRANT ALL ON SEQUENCE shipform_shipform_id_seq TO admin; GRANT ALL ON SEQUENCE shipform_shipform_id_seq TO xtrole; -- -- Name: shiphead_shiphead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shiphead_shiphead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shiphead_shiphead_id_seq FROM admin; GRANT ALL ON SEQUENCE shiphead_shiphead_id_seq TO admin; GRANT ALL ON SEQUENCE shiphead_shiphead_id_seq TO xtrole; -- -- Name: shipitem_shipitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shipitem_shipitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipitem_shipitem_id_seq FROM admin; GRANT ALL ON SEQUENCE shipitem_shipitem_id_seq TO admin; GRANT ALL ON SEQUENCE shipitem_shipitem_id_seq TO xtrole; -- -- Name: shipment_number_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shipment_number_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipment_number_seq FROM admin; GRANT ALL ON SEQUENCE shipment_number_seq TO admin; GRANT ALL ON SEQUENCE shipment_number_seq TO xtrole; -- -- Name: shipto; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE shipto FROM PUBLIC; REVOKE ALL ON TABLE shipto FROM admin; GRANT ALL ON TABLE shipto TO admin; GRANT ALL ON TABLE shipto TO xtrole; -- -- Name: shipto_shipto_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shipto_shipto_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipto_shipto_id_seq FROM admin; GRANT ALL ON SEQUENCE shipto_shipto_id_seq TO admin; GRANT ALL ON SEQUENCE shipto_shipto_id_seq TO xtrole; -- -- Name: shipvia_shipvia_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shipvia_shipvia_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipvia_shipvia_id_seq FROM admin; GRANT ALL ON SEQUENCE shipvia_shipvia_id_seq TO admin; GRANT ALL ON SEQUENCE shipvia_shipvia_id_seq TO xtrole; -- -- Name: shipzone_shipzone_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE shipzone_shipzone_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipzone_shipzone_id_seq FROM admin; GRANT ALL ON SEQUENCE shipzone_shipzone_id_seq TO admin; GRANT ALL ON SEQUENCE shipzone_shipzone_id_seq TO xtrole; -- -- Name: sitetype_sitetype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE sitetype_sitetype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE sitetype_sitetype_id_seq FROM admin; GRANT ALL ON SEQUENCE sitetype_sitetype_id_seq TO admin; GRANT ALL ON SEQUENCE sitetype_sitetype_id_seq TO xtrole; -- -- Name: sltrans; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE sltrans FROM PUBLIC; REVOKE ALL ON TABLE sltrans FROM admin; GRANT ALL ON TABLE sltrans TO admin; GRANT ALL ON TABLE sltrans TO xtrole; -- -- Name: sopack; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE sopack FROM PUBLIC; REVOKE ALL ON TABLE sopack FROM admin; GRANT ALL ON TABLE sopack TO admin; GRANT ALL ON TABLE sopack TO xtrole; -- -- Name: sopack_sopack_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE sopack_sopack_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE sopack_sopack_id_seq FROM admin; GRANT ALL ON SEQUENCE sopack_sopack_id_seq TO admin; GRANT ALL ON SEQUENCE sopack_sopack_id_seq TO xtrole; -- -- Name: source; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE source FROM PUBLIC; REVOKE ALL ON TABLE source FROM admin; GRANT ALL ON TABLE source TO admin; GRANT ALL ON TABLE source TO xtrole; -- -- Name: source_source_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE source_source_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE source_source_id_seq FROM admin; GRANT ALL ON SEQUENCE source_source_id_seq TO admin; GRANT ALL ON SEQUENCE source_source_id_seq TO xtrole; -- -- Name: state; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE state FROM PUBLIC; REVOKE ALL ON TABLE state FROM admin; GRANT ALL ON TABLE state TO admin; GRANT ALL ON TABLE state TO xtrole; -- -- Name: state_state_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE state_state_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE state_state_id_seq FROM admin; GRANT ALL ON SEQUENCE state_state_id_seq TO admin; GRANT ALL ON SEQUENCE state_state_id_seq TO xtrole; -- -- Name: status; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE status FROM PUBLIC; REVOKE ALL ON TABLE status FROM admin; GRANT ALL ON TABLE status TO admin; GRANT ALL ON TABLE status TO xtrole; -- -- Name: status_status_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE status_status_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE status_status_id_seq FROM admin; GRANT ALL ON SEQUENCE status_status_id_seq TO admin; GRANT ALL ON SEQUENCE status_status_id_seq TO xtrole; -- -- Name: stdjrnl; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE stdjrnl FROM PUBLIC; REVOKE ALL ON TABLE stdjrnl FROM admin; GRANT ALL ON TABLE stdjrnl TO admin; GRANT ALL ON TABLE stdjrnl TO xtrole; -- -- Name: stdjrnl_stdjrnl_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq FROM admin; GRANT ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq TO admin; GRANT ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq TO xtrole; -- -- Name: stdjrnlgrp; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE stdjrnlgrp FROM PUBLIC; REVOKE ALL ON TABLE stdjrnlgrp FROM admin; GRANT ALL ON TABLE stdjrnlgrp TO admin; GRANT ALL ON TABLE stdjrnlgrp TO xtrole; -- -- Name: stdjrnlgrp_stdjrnlgrp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq TO admin; GRANT ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq TO xtrole; -- -- Name: stdjrnlgrpitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE stdjrnlgrpitem FROM PUBLIC; REVOKE ALL ON TABLE stdjrnlgrpitem FROM admin; GRANT ALL ON TABLE stdjrnlgrpitem TO admin; GRANT ALL ON TABLE stdjrnlgrpitem TO xtrole; -- -- Name: stdjrnlgrpitem_stdjrnlgrpitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq FROM admin; GRANT ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq TO admin; GRANT ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq TO xtrole; -- -- Name: stdjrnlitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE stdjrnlitem FROM PUBLIC; REVOKE ALL ON TABLE stdjrnlitem FROM admin; GRANT ALL ON TABLE stdjrnlitem TO admin; GRANT ALL ON TABLE stdjrnlitem TO xtrole; -- -- Name: stdjrnlitem_stdjrnlitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq FROM admin; GRANT ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq TO admin; GRANT ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq TO xtrole; -- -- Name: subaccnt; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE subaccnt FROM PUBLIC; REVOKE ALL ON TABLE subaccnt FROM admin; GRANT ALL ON TABLE subaccnt TO admin; GRANT ALL ON TABLE subaccnt TO xtrole; -- -- Name: subaccnt_subaccnt_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE subaccnt_subaccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE subaccnt_subaccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE subaccnt_subaccnt_id_seq TO admin; GRANT ALL ON SEQUENCE subaccnt_subaccnt_id_seq TO xtrole; -- -- Name: subaccnttype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE subaccnttype FROM PUBLIC; REVOKE ALL ON TABLE subaccnttype FROM admin; GRANT ALL ON TABLE subaccnttype TO admin; GRANT ALL ON TABLE subaccnttype TO xtrole; -- -- Name: subaccnttype_subaccnttype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq FROM admin; GRANT ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq TO admin; GRANT ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq TO xtrole; -- -- Name: tax_tax_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE tax_tax_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE tax_tax_id_seq FROM admin; GRANT ALL ON SEQUENCE tax_tax_id_seq TO admin; GRANT ALL ON SEQUENCE tax_tax_id_seq TO xtrole; -- -- Name: taxass; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE taxass FROM PUBLIC; REVOKE ALL ON TABLE taxass FROM admin; GRANT ALL ON TABLE taxass TO admin; GRANT ALL ON TABLE taxass TO xtrole; -- -- Name: taxass_taxass_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE taxass_taxass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxass_taxass_id_seq FROM admin; GRANT ALL ON SEQUENCE taxass_taxass_id_seq TO admin; GRANT ALL ON SEQUENCE taxass_taxass_id_seq TO xtrole; -- -- Name: taxauth_taxauth_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE taxauth_taxauth_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxauth_taxauth_id_seq FROM admin; GRANT ALL ON SEQUENCE taxauth_taxauth_id_seq TO admin; GRANT ALL ON SEQUENCE taxauth_taxauth_id_seq TO xtrole; -- -- Name: taxclass; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE taxclass FROM PUBLIC; REVOKE ALL ON TABLE taxclass FROM admin; GRANT ALL ON TABLE taxclass TO admin; GRANT ALL ON TABLE taxclass TO xtrole; -- -- Name: taxclass_taxclass_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE taxclass_taxclass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxclass_taxclass_id_seq FROM admin; GRANT ALL ON SEQUENCE taxclass_taxclass_id_seq TO admin; GRANT ALL ON SEQUENCE taxclass_taxclass_id_seq TO xtrole; -- -- Name: taxrate; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE taxrate FROM PUBLIC; REVOKE ALL ON TABLE taxrate FROM admin; GRANT ALL ON TABLE taxrate TO admin; GRANT ALL ON TABLE taxrate TO xtrole; -- -- Name: taxrate_taxrate_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE taxrate_taxrate_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxrate_taxrate_id_seq FROM admin; GRANT ALL ON SEQUENCE taxrate_taxrate_id_seq TO admin; GRANT ALL ON SEQUENCE taxrate_taxrate_id_seq TO xtrole; -- -- Name: taxreg_taxreg_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE taxreg_taxreg_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxreg_taxreg_id_seq FROM admin; GRANT ALL ON SEQUENCE taxreg_taxreg_id_seq TO admin; GRANT ALL ON SEQUENCE taxreg_taxreg_id_seq TO xtrole; -- -- Name: taxtype_taxtype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE taxtype_taxtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxtype_taxtype_id_seq FROM admin; GRANT ALL ON SEQUENCE taxtype_taxtype_id_seq TO admin; GRANT ALL ON SEQUENCE taxtype_taxtype_id_seq TO xtrole; -- -- Name: taxzone_taxzone_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE taxzone_taxzone_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxzone_taxzone_id_seq FROM admin; GRANT ALL ON SEQUENCE taxzone_taxzone_id_seq TO admin; GRANT ALL ON SEQUENCE taxzone_taxzone_id_seq TO xtrole; -- -- Name: terms_terms_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE terms_terms_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE terms_terms_id_seq FROM admin; GRANT ALL ON SEQUENCE terms_terms_id_seq TO admin; GRANT ALL ON SEQUENCE terms_terms_id_seq TO xtrole; -- -- Name: todoitem_todoitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE todoitem_todoitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE todoitem_todoitem_id_seq FROM admin; GRANT ALL ON SEQUENCE todoitem_todoitem_id_seq TO admin; GRANT ALL ON SEQUENCE todoitem_todoitem_id_seq TO xtrole; -- -- Name: trgthist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE trgthist FROM PUBLIC; REVOKE ALL ON TABLE trgthist FROM admin; GRANT ALL ON TABLE trgthist TO admin; GRANT ALL ON TABLE trgthist TO xtrole; -- -- Name: trialbal; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE trialbal FROM PUBLIC; REVOKE ALL ON TABLE trialbal FROM admin; GRANT ALL ON TABLE trialbal TO admin; GRANT ALL ON TABLE trialbal TO xtrole; -- -- Name: trialbal_trialbal_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE trialbal_trialbal_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE trialbal_trialbal_id_seq FROM admin; GRANT ALL ON SEQUENCE trialbal_trialbal_id_seq TO admin; GRANT ALL ON SEQUENCE trialbal_trialbal_id_seq TO xtrole; -- -- Name: uom_uom_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE uom_uom_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE uom_uom_id_seq FROM admin; GRANT ALL ON SEQUENCE uom_uom_id_seq TO admin; GRANT ALL ON SEQUENCE uom_uom_id_seq TO xtrole; -- -- Name: uomconv; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE uomconv FROM PUBLIC; REVOKE ALL ON TABLE uomconv FROM admin; GRANT ALL ON TABLE uomconv TO admin; GRANT ALL ON TABLE uomconv TO xtrole; -- -- Name: uomconv_uomconv_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE uomconv_uomconv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE uomconv_uomconv_id_seq FROM admin; GRANT ALL ON SEQUENCE uomconv_uomconv_id_seq TO admin; GRANT ALL ON SEQUENCE uomconv_uomconv_id_seq TO xtrole; -- -- Name: uomtype; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE uomtype FROM PUBLIC; REVOKE ALL ON TABLE uomtype FROM admin; GRANT ALL ON TABLE uomtype TO admin; GRANT ALL ON TABLE uomtype TO xtrole; -- -- Name: uomtype_uomtype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE uomtype_uomtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE uomtype_uomtype_id_seq FROM admin; GRANT ALL ON SEQUENCE uomtype_uomtype_id_seq TO admin; GRANT ALL ON SEQUENCE uomtype_uomtype_id_seq TO xtrole; -- -- Name: urlinfo_url_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE urlinfo_url_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE urlinfo_url_id_seq FROM admin; GRANT ALL ON SEQUENCE urlinfo_url_id_seq TO admin; GRANT ALL ON SEQUENCE urlinfo_url_id_seq TO xtrole; -- -- Name: usrpref; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE usrpref FROM PUBLIC; REVOKE ALL ON TABLE usrpref FROM admin; GRANT ALL ON TABLE usrpref TO admin; GRANT ALL ON TABLE usrpref TO xtrole; -- -- Name: usr; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE usr FROM PUBLIC; REVOKE ALL ON TABLE usr FROM admin; GRANT ALL ON TABLE usr TO admin; GRANT ALL ON TABLE usr TO xtrole; -- -- Name: usr_bak; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE usr_bak FROM PUBLIC; REVOKE ALL ON TABLE usr_bak FROM admin; GRANT ALL ON TABLE usr_bak TO admin; GRANT ALL ON TABLE usr_bak TO xtrole; -- -- Name: usr_usr_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE usr_usr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE usr_usr_id_seq FROM admin; GRANT ALL ON SEQUENCE usr_usr_id_seq TO admin; GRANT ALL ON SEQUENCE usr_usr_id_seq TO xtrole; -- -- Name: usrgrp_usrgrp_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE usrgrp_usrgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE usrgrp_usrgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE usrgrp_usrgrp_id_seq TO admin; GRANT ALL ON SEQUENCE usrgrp_usrgrp_id_seq TO xtrole; -- -- Name: usrpref_usrpref_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE usrpref_usrpref_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE usrpref_usrpref_id_seq FROM admin; GRANT ALL ON SEQUENCE usrpref_usrpref_id_seq TO admin; GRANT ALL ON SEQUENCE usrpref_usrpref_id_seq TO xtrole; -- -- Name: usrpriv_usrpriv_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE usrpriv_usrpriv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE usrpriv_usrpriv_id_seq FROM admin; GRANT ALL ON SEQUENCE usrpriv_usrpriv_id_seq TO admin; GRANT ALL ON SEQUENCE usrpriv_usrpriv_id_seq TO xtrole; -- -- Name: vend; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE vend FROM PUBLIC; REVOKE ALL ON TABLE vend FROM admin; GRANT ALL ON TABLE vend TO admin; GRANT SELECT,INSERT,REFERENCES,DELETE,TRIGGER,UPDATE ON TABLE vend TO xtrole; -- -- Name: vend_vend_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE vend_vend_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vend_vend_id_seq FROM admin; GRANT ALL ON SEQUENCE vend_vend_id_seq TO admin; GRANT ALL ON SEQUENCE vend_vend_id_seq TO xtrole; -- -- Name: vendaddr; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE vendaddr FROM PUBLIC; REVOKE ALL ON TABLE vendaddr FROM admin; GRANT ALL ON TABLE vendaddr TO admin; GRANT ALL ON TABLE vendaddr TO xtrole; -- -- Name: vendaddr_vendaddr_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE vendaddr_vendaddr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vendaddr_vendaddr_id_seq FROM admin; GRANT ALL ON SEQUENCE vendaddr_vendaddr_id_seq TO admin; GRANT ALL ON SEQUENCE vendaddr_vendaddr_id_seq TO xtrole; -- -- Name: vendtype_vendtype_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE vendtype_vendtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vendtype_vendtype_id_seq FROM admin; GRANT ALL ON SEQUENCE vendtype_vendtype_id_seq TO admin; GRANT ALL ON SEQUENCE vendtype_vendtype_id_seq TO xtrole; -- -- Name: vodist; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE vodist FROM PUBLIC; REVOKE ALL ON TABLE vodist FROM admin; GRANT ALL ON TABLE vodist TO admin; GRANT ALL ON TABLE vodist TO xtrole; -- -- Name: vodist_vodist_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE vodist_vodist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vodist_vodist_id_seq FROM admin; GRANT ALL ON SEQUENCE vodist_vodist_id_seq TO admin; GRANT ALL ON SEQUENCE vodist_vodist_id_seq TO xtrole; -- -- Name: vohead; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE vohead FROM PUBLIC; REVOKE ALL ON TABLE vohead FROM admin; GRANT ALL ON TABLE vohead TO admin; GRANT ALL ON TABLE vohead TO xtrole; -- -- Name: vohead_vohead_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE vohead_vohead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vohead_vohead_id_seq FROM admin; GRANT ALL ON SEQUENCE vohead_vohead_id_seq TO admin; GRANT ALL ON SEQUENCE vohead_vohead_id_seq TO xtrole; -- -- Name: voheadtax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE voheadtax FROM PUBLIC; REVOKE ALL ON TABLE voheadtax FROM admin; GRANT ALL ON TABLE voheadtax TO admin; GRANT ALL ON TABLE voheadtax TO xtrole; -- -- Name: voitem; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE voitem FROM PUBLIC; REVOKE ALL ON TABLE voitem FROM admin; GRANT ALL ON TABLE voitem TO admin; GRANT ALL ON TABLE voitem TO xtrole; -- -- Name: voitem_voitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE voitem_voitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE voitem_voitem_id_seq FROM admin; GRANT ALL ON SEQUENCE voitem_voitem_id_seq TO admin; GRANT ALL ON SEQUENCE voitem_voitem_id_seq TO xtrole; -- -- Name: voitemtax; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE voitemtax FROM PUBLIC; REVOKE ALL ON TABLE voitemtax FROM admin; GRANT ALL ON TABLE voitemtax TO admin; GRANT ALL ON TABLE voitemtax TO xtrole; -- -- Name: warehous; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE warehous FROM PUBLIC; REVOKE ALL ON TABLE warehous FROM admin; GRANT ALL ON TABLE warehous TO admin; GRANT ALL ON TABLE warehous TO xtrole; -- -- Name: warehous_warehous_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE warehous_warehous_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE warehous_warehous_id_seq FROM admin; GRANT ALL ON SEQUENCE warehous_warehous_id_seq TO admin; GRANT ALL ON SEQUENCE warehous_warehous_id_seq TO xtrole; -- -- Name: whsezone_whsezone_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE whsezone_whsezone_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE whsezone_whsezone_id_seq FROM admin; GRANT ALL ON SEQUENCE whsezone_whsezone_id_seq TO admin; GRANT ALL ON SEQUENCE whsezone_whsezone_id_seq TO xtrole; -- -- Name: wo_wo_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE wo_wo_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE wo_wo_id_seq FROM admin; GRANT ALL ON SEQUENCE wo_wo_id_seq TO admin; GRANT ALL ON SEQUENCE wo_wo_id_seq TO xtrole; -- -- Name: womatl_womatl_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE womatl_womatl_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE womatl_womatl_id_seq FROM admin; GRANT ALL ON SEQUENCE womatl_womatl_id_seq TO admin; GRANT ALL ON SEQUENCE womatl_womatl_id_seq TO xtrole; -- -- Name: womatlpost; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE womatlpost FROM PUBLIC; REVOKE ALL ON TABLE womatlpost FROM admin; GRANT ALL ON TABLE womatlpost TO admin; GRANT ALL ON TABLE womatlpost TO xtrole; -- -- Name: womatlpost_womatlpost_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE womatlpost_womatlpost_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE womatlpost_womatlpost_id_seq FROM admin; GRANT ALL ON SEQUENCE womatlpost_womatlpost_id_seq TO admin; GRANT ALL ON SEQUENCE womatlpost_womatlpost_id_seq TO xtrole; -- -- Name: womatlvar; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE womatlvar FROM PUBLIC; REVOKE ALL ON TABLE womatlvar FROM admin; GRANT ALL ON TABLE womatlvar TO admin; GRANT ALL ON TABLE womatlvar TO xtrole; -- -- Name: womatlvar_womatlvar_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE womatlvar_womatlvar_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE womatlvar_womatlvar_id_seq FROM admin; GRANT ALL ON SEQUENCE womatlvar_womatlvar_id_seq TO admin; GRANT ALL ON SEQUENCE womatlvar_womatlvar_id_seq TO xtrole; -- -- Name: xcalitem_xcalitem_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE xcalitem_xcalitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE xcalitem_xcalitem_id_seq FROM admin; GRANT ALL ON SEQUENCE xcalitem_xcalitem_id_seq TO admin; GRANT ALL ON SEQUENCE xcalitem_xcalitem_id_seq TO xtrole; -- -- Name: xsltmap; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE xsltmap FROM PUBLIC; REVOKE ALL ON TABLE xsltmap FROM admin; GRANT ALL ON TABLE xsltmap TO admin; GRANT ALL ON TABLE xsltmap TO xtrole; -- -- Name: xsltmap_xsltmap_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE xsltmap_xsltmap_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE xsltmap_xsltmap_id_seq FROM admin; GRANT ALL ON SEQUENCE xsltmap_xsltmap_id_seq TO admin; GRANT ALL ON SEQUENCE xsltmap_xsltmap_id_seq TO xtrole; -- -- Name: yearperiod; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON TABLE yearperiod FROM PUBLIC; REVOKE ALL ON TABLE yearperiod FROM admin; GRANT ALL ON TABLE yearperiod TO admin; GRANT ALL ON TABLE yearperiod TO xtrole; -- -- Name: yearperiod_yearperiod_id_seq; Type: ACL; Schema: public; Owner: admin -- REVOKE ALL ON SEQUENCE yearperiod_yearperiod_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE yearperiod_yearperiod_id_seq FROM admin; GRANT ALL ON SEQUENCE yearperiod_yearperiod_id_seq TO admin; GRANT ALL ON SEQUENCE yearperiod_yearperiod_id_seq TO xtrole; SET search_path = te, pg_catalog; -- -- Name: pkgcmd; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE pkgcmd FROM PUBLIC; REVOKE ALL ON TABLE pkgcmd FROM admin; GRANT ALL ON TABLE pkgcmd TO admin; GRANT ALL ON TABLE pkgcmd TO xtrole; -- -- Name: pkgcmdarg; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC; REVOKE ALL ON TABLE pkgcmdarg FROM admin; GRANT ALL ON TABLE pkgcmdarg TO admin; GRANT ALL ON TABLE pkgcmdarg TO xtrole; -- -- Name: pkgimage; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE pkgimage FROM PUBLIC; REVOKE ALL ON TABLE pkgimage FROM admin; GRANT ALL ON TABLE pkgimage TO admin; GRANT ALL ON TABLE pkgimage TO xtrole; -- -- Name: pkgmetasql; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE pkgmetasql FROM PUBLIC; REVOKE ALL ON TABLE pkgmetasql FROM admin; GRANT ALL ON TABLE pkgmetasql TO admin; GRANT ALL ON TABLE pkgmetasql TO xtrole; -- -- Name: pkgpriv; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE pkgpriv FROM PUBLIC; REVOKE ALL ON TABLE pkgpriv FROM admin; GRANT ALL ON TABLE pkgpriv TO admin; GRANT ALL ON TABLE pkgpriv TO xtrole; -- -- Name: pkgreport; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE pkgreport FROM PUBLIC; REVOKE ALL ON TABLE pkgreport FROM admin; GRANT ALL ON TABLE pkgreport TO admin; GRANT ALL ON TABLE pkgreport TO xtrole; -- -- Name: pkgscript; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE pkgscript FROM PUBLIC; REVOKE ALL ON TABLE pkgscript FROM admin; GRANT ALL ON TABLE pkgscript TO admin; GRANT ALL ON TABLE pkgscript TO xtrole; -- -- Name: pkguiform; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE pkguiform FROM PUBLIC; REVOKE ALL ON TABLE pkguiform FROM admin; GRANT ALL ON TABLE pkguiform TO admin; GRANT ALL ON TABLE pkguiform TO xtrole; -- -- Name: tecustrate; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE tecustrate FROM PUBLIC; REVOKE ALL ON TABLE tecustrate FROM admin; GRANT ALL ON TABLE tecustrate TO admin; GRANT ALL ON TABLE tecustrate TO xtrole; -- -- Name: teemp; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE teemp FROM PUBLIC; REVOKE ALL ON TABLE teemp FROM admin; GRANT ALL ON TABLE teemp TO admin; GRANT ALL ON TABLE teemp TO xtrole; -- -- Name: teemp_teemp_id_seq; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON SEQUENCE teemp_teemp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE teemp_teemp_id_seq FROM admin; GRANT ALL ON SEQUENCE teemp_teemp_id_seq TO admin; GRANT ALL ON SEQUENCE teemp_teemp_id_seq TO xtrole; -- -- Name: teexp; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE teexp FROM PUBLIC; REVOKE ALL ON TABLE teexp FROM admin; GRANT ALL ON TABLE teexp TO admin; GRANT ALL ON TABLE teexp TO xtrole; -- -- Name: timesheet_seq; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON SEQUENCE timesheet_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE timesheet_seq FROM admin; GRANT ALL ON SEQUENCE timesheet_seq TO admin; GRANT ALL ON SEQUENCE timesheet_seq TO xtrole; -- -- Name: tehead; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE tehead FROM PUBLIC; REVOKE ALL ON TABLE tehead FROM admin; GRANT ALL ON TABLE tehead TO admin; GRANT ALL ON TABLE tehead TO xtrole; -- -- Name: tehead_tehead_id_seq; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON SEQUENCE tehead_tehead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE tehead_tehead_id_seq FROM admin; GRANT ALL ON SEQUENCE tehead_tehead_id_seq TO admin; GRANT ALL ON SEQUENCE tehead_tehead_id_seq TO xtrole; -- -- Name: teitem; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE teitem FROM PUBLIC; REVOKE ALL ON TABLE teitem FROM admin; GRANT ALL ON TABLE teitem TO admin; GRANT ALL ON TABLE teitem TO xtrole; -- -- Name: teitem_teitem_id_seq; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON SEQUENCE teitem_teitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE teitem_teitem_id_seq FROM admin; GRANT ALL ON SEQUENCE teitem_teitem_id_seq TO admin; GRANT ALL ON SEQUENCE teitem_teitem_id_seq TO xtrole; -- -- Name: teprj; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE teprj FROM PUBLIC; REVOKE ALL ON TABLE teprj FROM admin; GRANT ALL ON TABLE teprj TO admin; GRANT ALL ON TABLE teprj TO xtrole; -- -- Name: teprj_teprj_id_seq; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON SEQUENCE teprj_teprj_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE teprj_teprj_id_seq FROM admin; GRANT ALL ON SEQUENCE teprj_teprj_id_seq TO admin; GRANT ALL ON SEQUENCE teprj_teprj_id_seq TO xtrole; -- -- Name: teprjtask; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON TABLE teprjtask FROM PUBLIC; REVOKE ALL ON TABLE teprjtask FROM admin; GRANT ALL ON TABLE teprjtask TO admin; GRANT ALL ON TABLE teprjtask TO xtrole; -- -- Name: teprjtask_teprjtask_id_seq; Type: ACL; Schema: te; Owner: admin -- REVOKE ALL ON SEQUENCE teprjtask_teprjtask_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE teprjtask_teprjtask_id_seq FROM admin; GRANT ALL ON SEQUENCE teprjtask_teprjtask_id_seq TO admin; GRANT ALL ON SEQUENCE teprjtask_teprjtask_id_seq TO xtrole; SET search_path = xtdesktop, pg_catalog; -- -- Name: pkgcmd; Type: ACL; Schema: xtdesktop; Owner: admin -- REVOKE ALL ON TABLE pkgcmd FROM PUBLIC; REVOKE ALL ON TABLE pkgcmd FROM admin; GRANT ALL ON TABLE pkgcmd TO admin; GRANT ALL ON TABLE pkgcmd TO xtrole; -- -- Name: pkgcmdarg; Type: ACL; Schema: xtdesktop; Owner: admin -- REVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC; REVOKE ALL ON TABLE pkgcmdarg FROM admin; GRANT ALL ON TABLE pkgcmdarg TO admin; GRANT ALL ON TABLE pkgcmdarg TO xtrole; -- -- Name: pkgimage; Type: ACL; Schema: xtdesktop; Owner: admin -- REVOKE ALL ON TABLE pkgimage FROM PUBLIC; REVOKE ALL ON TABLE pkgimage FROM admin; GRANT ALL ON TABLE pkgimage TO admin; GRANT ALL ON TABLE pkgimage TO xtrole; -- -- Name: pkgmetasql; Type: ACL; Schema: xtdesktop; Owner: admin -- REVOKE ALL ON TABLE pkgmetasql FROM PUBLIC; REVOKE ALL ON TABLE pkgmetasql FROM admin; GRANT ALL ON TABLE pkgmetasql TO admin; GRANT ALL ON TABLE pkgmetasql TO xtrole; -- -- Name: pkgpriv; Type: ACL; Schema: xtdesktop; Owner: admin -- REVOKE ALL ON TABLE pkgpriv FROM PUBLIC; REVOKE ALL ON TABLE pkgpriv FROM admin; GRANT ALL ON TABLE pkgpriv TO admin; GRANT ALL ON TABLE pkgpriv TO xtrole; -- -- Name: pkgreport; Type: ACL; Schema: xtdesktop; Owner: admin -- REVOKE ALL ON TABLE pkgreport FROM PUBLIC; REVOKE ALL ON TABLE pkgreport FROM admin; GRANT ALL ON TABLE pkgreport TO admin; GRANT ALL ON TABLE pkgreport TO xtrole; -- -- Name: pkgscript; Type: ACL; Schema: xtdesktop; Owner: admin -- REVOKE ALL ON TABLE pkgscript FROM PUBLIC; REVOKE ALL ON TABLE pkgscript FROM admin; GRANT ALL ON TABLE pkgscript TO admin; GRANT ALL ON TABLE pkgscript TO xtrole; -- -- Name: pkguiform; Type: ACL; Schema: xtdesktop; Owner: admin -- REVOKE ALL ON TABLE pkguiform FROM PUBLIC; REVOKE ALL ON TABLE pkguiform FROM admin; GRANT ALL ON TABLE pkguiform TO admin; GRANT ALL ON TABLE pkguiform TO xtrole; -- -- PostgreSQL database dump complete -- postbooks-schema-demo-4.1.0/postbooks_demo-4.1.0.backup0000644000175000017500003002405512223754366022070 0ustar danieldanielPGDMP . qpostbooks_demo41x8.4.88.4.9c!00ENCODINGENCODINGSET client_encoding = 'UTF8'; falsed!00 STDSTRINGS STDSTRINGS)SET standard_conforming_strings = 'off'; falsee!12622018503postbooks_demo41xDATABASECREATE DATABASE postbooks_demo41x WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8'; !DROP DATABASE postbooks_demo41x; adminfalse26151681590apiSCHEMACREATE SCHEMA api; DROP SCHEMA api; adminfalsef!00apiACLREVOKE ALL ON SCHEMA api FROM PUBLIC; REVOKE ALL ON SCHEMA api FROM admin; GRANT ALL ON SCHEMA api TO admin; GRANT ALL ON SCHEMA api TO xtrole; adminfalse626151681591 fixcountrySCHEMACREATE SCHEMA fixcountry; DROP SCHEMA fixcountry; adminfalseg!00SCHEMA fixcountryCOMMENTICOMMENT ON SCHEMA fixcountry IS 'Schema to hold contents of fixcountry'; adminfalse7h!00 fixcountryACLREVOKE ALL ON SCHEMA fixcountry FROM PUBLIC; REVOKE ALL ON SCHEMA fixcountry FROM admin; GRANT ALL ON SCHEMA fixcountry TO admin; GRANT ALL ON SCHEMA fixcountry TO xtrole; adminfalse726152200publicSCHEMACREATE SCHEMA public; DROP SCHEMA public; postgresfalsei!00 SCHEMA publicCOMMENT6COMMENT ON SCHEMA public IS 'standard public schema'; postgresfalse8j!00publicACLREVOKE ALL ON SCHEMA public FROM PUBLIC; REVOKE ALL ON SCHEMA public FROM postgres; GRANT ALL ON SCHEMA public TO postgres; GRANT ALL ON SCHEMA public TO PUBLIC; postgresfalse8 26151681592teSCHEMACREATE SCHEMA te; DROP SCHEMA te; adminfalsek!00 SCHEMA teCOMMENTCOMMENT ON SCHEMA te IS 'This file is part of the xTuple ERP: PostBooks Edition, a free and open source Enterprise Resource Planning software suite, Copyright (c) 1999-2010 by OpenMFG LLC, d/b/a xTuple. It is licensed to you under the Common Public Attribution License version 1.0, the full text of which (including xTuple-specific Exhibits) is available at www.xtuple.com/CPAL. By using this software, you agree to be bound by its terms.'; adminfalse9l!00teACLREVOKE ALL ON SCHEMA te FROM PUBLIC; REVOKE ALL ON SCHEMA te FROM admin; GRANT ALL ON SCHEMA te TO admin; GRANT ALL ON SCHEMA te TO xtrole; adminfalse9 26151681593 xtdesktopSCHEMACREATE SCHEMA xtdesktop; DROP SCHEMA xtdesktop; adminfalsem!00SCHEMA xtdesktopCOMMENTGCOMMENT ON SCHEMA xtdesktop IS 'Schema to hold contents of xtdesktop'; adminfalse10n!00 xtdesktopACLREVOKE ALL ON SCHEMA xtdesktop FROM PUBLIC; REVOKE ALL ON SCHEMA xtdesktop FROM admin; GRANT ALL ON SCHEMA xtdesktop TO admin; GRANT ALL ON SCHEMA xtdesktop TO xtrole; adminfalse1026121681597plpgsqlPROCEDURAL LANGUAGE$CREATE PROCEDURAL LANGUAGE plpgsql; "DROP PROCEDURAL LANGUAGE plpgsql; adminfalse 12472005442achlineTYPExCREATE TYPE achline AS ( achline_checkhead_id integer, achline_batch text, achline_type text, achline_value text ); DROP TYPE public.achline; publicadminfalse8727 12472005445apagingTYPECREATE TYPE apaging AS ( apaging_docdate text, apaging_duedate date, apaging_ponumber text, apaging_reference text, apaging_invcnumber text, apaging_docnumber text, apaging_doctype text, apaging_vend_id integer, apaging_vend_number text, apaging_vend_name text, apaging_vend_vendtype_id integer, apaging_vendtype_code text, apaging_terms_descrip text, apaging_apopen_amount numeric, apaging_cur_val numeric, apaging_thirty_val numeric, apaging_sixty_val numeric, apaging_ninety_val numeric, apaging_plus_val numeric, apaging_total_val numeric, apaging_discdate date, apaging_disc_val numeric, apaging_discdays numeric, apaging_discprcnt numeric ); DROP TYPE public.apaging; publicadminfalse8728 12472005448aragingTYPECREATE TYPE araging AS ( araging_docdate date, araging_duedate date, araging_ponumber text, araging_docnumber text, araging_doctype text, araging_cust_id integer, araging_cust_number text, araging_cust_name text, araging_cust_custtype_id integer, araging_custtype_code text, araging_terms_descrip text, araging_aropen_amount numeric, araging_cur_val numeric, araging_thirty_val numeric, araging_sixty_val numeric, araging_ninety_val numeric, araging_plus_val numeric, araging_total_val numeric ); DROP TYPE public.araging; publicadminfalse8729 12472005451bomdataTYPEhCREATE TYPE bomdata AS ( bomdata_bomwork_id integer, bomdata_bomwork_parent_id integer, bomdata_bomwork_level integer, bomdata_bomwork_seqnumber integer, bomdata_bomitem_id integer, bomdata_item_id integer, bomdata_item_number text, bomdata_uom_name text, bomdata_item_descrip1 text, bomdata_item_descrip2 text, bomdata_itemdescription text, bomdata_batchsize numeric, bomdata_qtyfxd numeric, bomdata_qtyper numeric, bomdata_qtyreq numeric, bomdata_scrap numeric, bomdata_createchild boolean, bomdata_issuemethod text, bomdata_effective date, bomdata_expires date, bomdata_expired boolean, bomdata_future boolean, bomdata_actunitcost numeric, bomdata_stdunitcost numeric, bomdata_actextendedcost numeric, bomdata_stdextendedcost numeric, bomdata_ecn text, bomdata_char_id integer, bomdata_value text, bomdata_notes text, bomdata_ref text ); DROP TYPE public.bomdata; publicadminfalse8730 12471681612 checkdataTYPECREATE TYPE checkdata AS ( checkdata_page integer, checkdata_checknumber text, checkdata_checkwords text, checkdata_checkdate text, checkdata_checkamount text, checkdata_checkcurrsymbol text, checkdata_checkcurrabbr text, checkdata_checkcurrname text, checkdata_checkpayto text, checkdata_checkaddress text, checkdata_checkmemo text, checkdata_docnumber text, checkdata_docreference text, checkdata_docdate text, checkdata_docamount text, checkdata_docdiscount text, checkdata_docnetamount text ); DROP TYPE public.checkdata; publicadminfalse8144 12472005454cntctdupTYPECREATE TYPE cntctdup AS ( cntct_id integer, cntct_crmacct_id integer, cntct_addr_id integer, cntct_first_name text, cntct_last_name text, cntct_honorific text, cntct_initials text, cntct_active boolean, cntct_phone text, cntct_phone2 text, cntct_fax text, cntct_email text, cntct_webaddr text, cntct_notes text, cntct_title text, cntct_number text, cntct_middle text, cntct_suffix text, cntct_owner_username text, cntct_name text, crmacct_number text, crmacct_name text, addr_id integer, addr_active boolean, addr_line1 text, addr_line2 text, addr_line3 text, addr_city text, addr_state text, addr_postalcode text, addr_country text, addr_notes text, addr_number text, cntctdup_level integer ); DROP TYPE public.cntctdup; publicadminfalse8731 12472005457 flcoldataTYPEdCREATE TYPE flcoldata AS ( flcoldata_column integer, flcoldata_start date, flcoldata_end date ); DROP TYPE public.flcoldata; publicadminfalse8732# 12471681621 flstmtheadTYPECREATE TYPE flstmthead AS ( flstmthead_flhead_id integer, flstmthead_flcol_id integer, flstmthead_period_id integer, flstmthead_username text, flstmthead_typedescrip1 text, flstmthead_typedescrip2 text, flstmthead_flhead_name text, flstmthead_flcol_name text, flstmthead_month text, flstmthead_qtr text, flstmthead_year text, flstmthead_prmonth text, flstmthead_prqtr text, flstmthead_pryear text ); DROP TYPE public.flstmthead; publicadminfalse8145 12472005460 flstmtitemTYPECREATE TYPE flstmtitem AS ( flstmtitem_flhead_id integer, flstmtitem_period_id integer, flstmtitem_username text, flstmtitem_order integer, flstmtitem_level integer, flstmtitem_subgrp integer, flstmtitem_type text, flstmtitem_type_id integer, flstmtitem_parent_id integer, flstmtitem_accnt_id integer, flstmtitem_name text, flstmtitem_month numeric, flstmtitem_monthdb numeric, flstmtitem_monthcr numeric, flstmtitem_monthprcnt numeric, flstmtitem_monthbudget numeric, flstmtitem_monthbudgetprcnt numeric, flstmtitem_monthbudgetdiff numeric, flstmtitem_monthbudgetdiffprcnt numeric, flstmtitem_qtr numeric, flstmtitem_qtrdb numeric, flstmtitem_qtrcr numeric, flstmtitem_qtrprcnt numeric, flstmtitem_qtrbudget numeric, flstmtitem_qtrbudgetprcnt numeric, flstmtitem_qtrbudgetdiff numeric, flstmtitem_qtrbudgetdiffprcnt numeric, flstmtitem_year numeric, flstmtitem_yeardb numeric, flstmtitem_yearcr numeric, flstmtitem_yearprcnt numeric, flstmtitem_yearbudget numeric, flstmtitem_yearbudgetprcnt numeric, flstmtitem_yearbudgetdiff numeric, flstmtitem_yearbudgetdiffprcnt numeric, flstmtitem_prmonth numeric, flstmtitem_prmonthprcnt numeric, flstmtitem_prmonthdiff numeric, flstmtitem_prmonthdiffprcnt numeric, flstmtitem_prqtr numeric, flstmtitem_prqtrprcnt numeric, flstmtitem_prqtrdiff numeric, flstmtitem_prqtrdiffprcnt numeric, flstmtitem_pryear numeric, flstmtitem_pryearprcnt numeric, flstmtitem_pryeardiff numeric, flstmtitem_pryeardiffprcnt numeric ); DROP TYPE public.flstmtitem; publicadminfalse8733) 12471681627 fltrendheadTYPECREATE TYPE fltrendhead AS ( fltrendhead_flhead_id integer, fltrendhead_username text, fltrendhead_typedescrip text, fltrendhead_flhead_name text, fltrendhead_fld1 text, fltrendhead_fld2 text, fltrendhead_fld3 text, fltrendhead_fld4 text, fltrendhead_fld5 text, fltrendhead_fld6 text, fltrendhead_fld7 text, fltrendhead_fld8 text, fltrendhead_fld9 text, fltrendhead_fld10 text, fltrendhead_fld11 text, fltrendhead_fld12 text, fltrendhead_grndttl text ); DROP TYPE public.fltrendhead; publicadminfalse8146+ 12471681630 fltrenditemTYPE{CREATE TYPE fltrenditem AS ( fltrenditem_flhead_id integer, fltrenditem_username text, fltrenditem_order integer, fltrenditem_level integer, fltrenditem_subgrp integer, fltrenditem_type text, fltrenditem_type_id integer, fltrenditem_parent_id integer, fltrenditem_accnt_id integer, fltrenditem_name text, fltrenditem_fld1 text, fltrenditem_fld2 text, fltrenditem_fld3 text, fltrenditem_fld4 text, fltrenditem_fld5 text, fltrenditem_fld6 text, fltrenditem_fld7 text, fltrenditem_fld8 text, fltrenditem_fld9 text, fltrenditem_fld10 text, fltrenditem_fld11 text, fltrenditem_fld12 text, fltrenditem_grndttl text ); DROP TYPE public.fltrenditem; publicadminfalse8147 12472005463 freightdataTYPEDCREATE TYPE freightdata AS ( freightdata_schedule text, freightdata_from text, freightdata_to text, freightdata_shipvia text, freightdata_freightclass text, freightdata_weight numeric, freightdata_uom text, freightdata_price numeric, freightdata_type text, freightdata_total numeric, freightdata_currency text ); DROP TYPE public.freightdata; publicadminfalse8734 12472005435 itempriceTYPEUCREATE TYPE itemprice AS ( itemprice_price numeric, itemprice_type character(1) ); DROP TYPE public.itemprice; publicadminfalse8726/ 12471681636 orderitemtypeTYPE6CREATE TYPE orderitemtype AS ( orderitem_id integer, orderitem_orderhead_type text, orderitem_orderhead_id integer, orderitem_linenumber integer, orderitem_status text, orderitem_itemsite_id integer, orderitem_scheddate date, orderitem_qty_ordered numeric, orderitem_qty_shipped numeric, orderitem_qty_received numeric, orderitem_qty_uom_id integer, orderitem_qty_invuomratio numeric, orderitem_unitcost numeric, orderitem_unitcost_curr_id integer, orderitem_freight numeric, orderitem_freight_received numeric, orderitem_freight_curr_id integer ); DROP TYPE public.orderitemtype; publicadminfalse8148 12472005466ordheadTYPEfCREATE TYPE ordhead AS ( orderhead_id integer, orderhead_type text, orderhead_number text, orderhead_status text, orderhead_orderdate date, orderhead_linecount integer, orderhead_from_id integer, orderhead_from text, orderhead_to_id integer, orderhead_to text, orderhead_curr_id integer, orderhead_agent_username text, orderhead_shipvia text ); DROP TYPE public.ordhead; publicadminfalse8735 12472005469orditemTYPE0CREATE TYPE orditem AS ( orderitem_id integer, orderitem_orderhead_type text, orderitem_orderhead_id integer, orderitem_linenumber integer, orderitem_status text, orderitem_itemsite_id integer, orderitem_scheddate date, orderitem_qty_ordered numeric, orderitem_qty_shipped numeric, orderitem_qty_received numeric, orderitem_qty_uom_id integer, orderitem_qty_invuomratio numeric, orderitem_unitcost numeric, orderitem_unitcost_curr_id integer, orderitem_freight numeric, orderitem_freight_received numeric, orderitem_freight_curr_id integer ); DROP TYPE public.orditem; publicadminfalse8736! 12472005472reordlvlTYPEaCREATE TYPE reordlvl AS ( reordlvl_itemsite_id integer, reordlvl_item_id integer, reordlvl_warehous_code text, reordlvl_item_number text, reordlvl_item_descrip text, reordlvl_leadtime integer, reordlvl_daysofstock integer, reordlvl_curr_level numeric, reordlvl_total_days numeric, reordlvl_total_usage numeric, reordlvl_calc_level integer ); DROP TYPE public.reordlvl; publicadminfalse87371 12471681648seqissTYPEYCREATE TYPE seqiss AS ( seqiss_number integer, seqiss_time timestamp with time zone ); DROP TYPE public.seqiss; publicadminfalse8149% 12472005476subtaxTYPECREATE TYPE subtax AS ( subtax_taxcode_id integer, subtax_taxcode_code text, subtax_taxcode_descrip text, subtax_taxcode_level integer ); DROP TYPE public.subtax; publicadminfalse8738' 12472005479 taxassignTYPECREATE TYPE taxassign AS ( taxassign_taxzone_id integer, taxassign_taxtype_id integer, taxassign_level integer, taxassign_zone_code text, taxassign_type_descrip text, taxassign_taxclass_code text, taxassign_taxclass_sequence integer ); DROP TYPE public.taxassign; publicadminfalse8739- 12472005482 taxdetailTYPECREATE TYPE taxdetail AS ( taxdetail_tax_id integer, taxdetail_tax_code text, taxdetail_tax_descrip text, taxdetail_tax_basis_tax_id integer, taxdetail_taxrate_percent numeric(10,6), taxdetail_taxrate_amount numeric(16,2), taxdetail_level integer, taxdetail_taxclass_id integer, taxdetail_taxclass_code text, taxdetail_taxclass_sequence integer, taxdetail_tax numeric(16,6), taxdetail_curr_id integer, taxdetail_curr_abbr text ); DROP TYPE public.taxdetail; publicadminfalse87403 12472005485wodataTYPELCREATE TYPE wodata AS ( wodata_id integer, wodata_id_type integer, wodata_number integer, wodata_subnumber integer, wodata_itemnumber text, wodata_descrip text, wodata_status character(1), wodata_startdate date, wodata_duedate date, wodata_adhoc boolean, wodata_itemsite_id integer, wodata_qoh numeric, wodata_short numeric, wodata_qtyper numeric, wodata_qtyiss numeric, wodata_qtyrcv numeric, wodata_qtyordreq numeric, wodata_qtyuom text, wodata_scrap numeric, wodata_setup numeric, wodata_run numeric, wodata_notes text, wodata_ref text, wodata_level integer ); DROP TYPE public.wodata; publicadminfalse87415 12472005488woinvavTYPECREATE TYPE woinvav AS ( woinvav_itemsite_id integer, woinvav_womatl_id integer, woinvav_type character(1), woinvav_item_wo_number text, woinvav_descrip text, woinvav_uomname text, woinvav_qoh numeric, woinvav_balance numeric, woinvav_allocated numeric, woinvav_ordered numeric, woinvav_woavail numeric, woinvav_totalavail numeric, woinvav_reorderlevel numeric, woinvav_level integer ); DROP TYPE public.woinvav; publicadminfalse8742k12551758193<getcustnumberfrominfo(text, text, text, text, text, boolean)FUNCTIONCREATE FUNCTION getcustnumberfrominfo(text, text, text, text, text, boolean) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _email TEXT := COALESCE(UPPER($1), ''); _company TEXT := COALESCE(UPPER($2), ''); _first TEXT := COALESCE(UPPER($3), ''); _last TEXT := COALESCE(UPPER($4), ''); _fullname TEXT := COALESCE(UPPER($5), TRIM(_first || ' ' || _last)); _generate BOOLEAN := COALESCE($6, FALSE); _counter INTEGER; _custcount INTEGER := 0; _custnumber TEXT; _candidate TEXT := ''; _loopmax INTEGER := 0; _minlength INTEGER := 5; _maxlength INTEGER := 8; _numformat TEXT := ''; _testme TEXT; BEGIN IF (_email != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE (UPPER(cntct_email)=_email) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_company != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo WHERE (UPPER(cust_name)=_company) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_fullname = '' AND (_first != '' OR _last != '')) THEN _fullname := TRIM(_first || ' ' || _last); END IF; IF (_custcount <= 0 AND _fullname != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo WHERE (UPPER(cust_name)=_fullname) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_custcount > 1) THEN RAISE EXCEPTION 'Found % possible Customers for % and % and %', _custcount, _email, _company, _fullname; END IF; IF (_custcount <= 0 AND _generate) THEN IF (_maxlength < _minlength) THEN RAISE EXCEPTION 'Fix getCustNumberFromInfo: max length < min length'; END IF; IF (_company != '') THEN _candidate := _company; ELSIF (_email != '') THEN _candidate := SUBSTRING(_email FOR POSITION('@' IN _email) - 1); ELSIF (_last != '') THEN _candidate := _last; IF (_first != '') THEN _candidate := _candidate || _first; END IF; ELSIF (_fullname != '' AND (POSITION(' ' IN _fullname) > 0)) THEN _candidate := SUBSTRING(_fullname FROM POSITION(' ' IN _fullname) + 1) || SUBSTRING(_fullname FOR POSITION(' ' IN _fullname) - 1); END IF; WHILE (POSITION(' ' IN _candidate) > 0) LOOP _candidate := SUBSTRING(_candidate FOR POSITION(' ' IN _candidate) - 1) || SUBSTRING(_candidate FROM POSITION(' ' IN _candidate) + 1); END LOOP; FOR _counter IN _minlength.._maxlength LOOP _testme := SUBSTRING(_candidate FOR _counter); IF (NOT EXISTS(SELECT cust_number FROM custinfo WHERE (cust_number=_testme))) THEN _custnumber := _testme; EXIT; END IF; END LOOP; IF (_custnumber IS NULL OR _custnumber = '') THEN IF (LENGTH(_candidate) < _minlength) THEN _minlength := LENGTH(_candidate); END IF; FOR _counter IN _minlength.._maxlength LOOP _loopmax := _loopmax * 10 + 9; _numformat := _numformat || '0'; END LOOP; FOR _counter IN 1.._loopmax LOOP _testme := SUBSTRING(_candidate FOR _minlength) || TRIM(TO_CHAR(_counter, _numformat)); IF (NOT EXISTS(SELECT cust_number FROM custinfo WHERE (cust_number=_testme))) THEN _custnumber := _testme; EXIT; END IF; END LOOP; END IF; IF (_custnumber IS NULL OR _custnumber = '') THEN RAISE EXCEPTION 'Could not generate a new Customer Number'; END IF; END IF; IF (_custnumber IS NULL OR _custnumber = '') THEN RAISE EXCEPTION 'Could not find Customer Number for % and % and %', _email, _company, _fullname; END IF; RETURN _custnumber; END; $_$; PDROP FUNCTION api.getcustnumberfrominfo(text, text, text, text, text, boolean); apiadminfalse3992612551682406formatlocationname(integer)FUNCTIONCREATE FUNCTION formatlocationname(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _name TEXT; _r RECORD; BEGIN SELECT location_aisle, location_rack, location_bin, location_name INTO _r FROM location WHERE (location_id=pLocationid); IF (FOUND) THEN IF (_r.location_aisle IS NOT NULL) THEN _name := _r.location_aisle; ELSE _name := ''; END IF; IF (_r.location_rack IS NOT NULL) THEN _name := (_name || _r.location_rack); END IF; IF (_r.location_bin IS NOT NULL) THEN _name := (_name || _r.location_bin); END IF; IF (_r.location_name IS NOT NULL) THEN _name := (_name || _r.location_name); END IF; RETURN _name; ELSE RETURN 'N/A'; END IF; END; $_$; 2DROP FUNCTION public.formatlocationname(integer); publicadminfalse83992q12591684986cntslipTABLECREATE TABLE cntslip ( cntslip_id integer DEFAULT nextval(('"cntslip_cntslip_id_seq"'::text)::regclass) NOT NULL, cntslip_cnttag_id integer, cntslip_entered timestamp with time zone, cntslip_posted boolean, cntslip_number text, cntslip_qty numeric(18,6), cntslip_comments text, cntslip_location_id integer, cntslip_lotserial text, cntslip_lotserial_expiration date, cntslip_lotserial_warrpurc date, cntslip_username text ); DROP TABLE public.cntslip; publicadminfalse62858o!00 TABLE cntslipCOMMENT6COMMENT ON TABLE cntslip IS 'Count Slip information'; publicadminfalse369p!00cntslipACLREVOKE ALL ON TABLE cntslip FROM PUBLIC; REVOKE ALL ON TABLE cntslip FROM admin; GRANT ALL ON TABLE cntslip TO admin; GRANT ALL ON TABLE cntslip TO xtrole; publicadminfalse36912591685445invcntTABLECREATE TABLE invcnt ( invcnt_id integer DEFAULT nextval(('invcnt_invcnt_id_seq'::text)::regclass) NOT NULL, invcnt_itemsite_id integer, invcnt_tagdate timestamp with time zone, invcnt_cntdate timestamp with time zone, invcnt_qoh_before numeric(18,6), invcnt_qoh_after numeric(18,6), invcnt_matcost numeric(16,6), invcnt_posted boolean, invcnt_postdate timestamp with time zone, invcnt_comments text, invcnt_priority boolean, invcnt_tagnumber text, invcnt_invhist_id integer, invcnt_location_id integer, invcnt_cnt_username text, invcnt_post_username text, invcnt_tag_username text ); DROP TABLE public.invcnt; publicadminfalse64278q!00 TABLE invcntCOMMENT4COMMENT ON TABLE invcnt IS 'Count Tag information'; publicadminfalse466r!00invcntACLREVOKE ALL ON TABLE invcnt FROM PUBLIC; REVOKE ALL ON TABLE invcnt FROM admin; GRANT ALL ON TABLE invcnt TO admin; GRANT ALL ON TABLE invcnt TO xtrole; publicadminfalse46612591682747itemTABLECREATE TABLE item ( item_id integer DEFAULT nextval(('item_item_id_seq'::text)::regclass) NOT NULL, item_number text NOT NULL, item_descrip1 text NOT NULL, item_descrip2 text NOT NULL, item_classcode_id integer NOT NULL, item_picklist boolean DEFAULT true NOT NULL, item_comments text, item_sold boolean NOT NULL, item_fractional boolean NOT NULL, item_active boolean NOT NULL, item_type character(1) DEFAULT 'R'::bpchar NOT NULL, item_prodweight numeric(16,2) DEFAULT 0 NOT NULL, item_packweight numeric(16,2) DEFAULT 0 NOT NULL, item_prodcat_id integer NOT NULL, item_exclusive boolean DEFAULT false NOT NULL, item_listprice numeric(16,4) NOT NULL, item_config boolean DEFAULT false, item_extdescrip text, item_upccode text, item_maxcost numeric(16,6) DEFAULT 0 NOT NULL, item_inv_uom_id integer NOT NULL, item_price_uom_id integer NOT NULL, item_warrdays integer DEFAULT 0, item_freightclass_id integer, item_tax_recoverable boolean DEFAULT false NOT NULL, item_listcost numeric(16,6) DEFAULT 0.0 NOT NULL, CONSTRAINT item_item_number_check CHECK ((item_number <> ''::text)), CONSTRAINT item_item_type_check CHECK (((((((((((((item_type = 'P'::bpchar) OR (item_type = 'M'::bpchar)) OR (item_type = 'F'::bpchar)) OR (item_type = 'O'::bpchar)) OR (item_type = 'R'::bpchar)) OR (item_type = 'S'::bpchar)) OR (item_type = 'T'::bpchar)) OR (item_type = 'B'::bpchar)) OR (item_type = 'L'::bpchar)) OR (item_type = 'Y'::bpchar)) OR (item_type = 'C'::bpchar)) OR (item_type = 'K'::bpchar))), CONSTRAINT item_sold_check CHECK ((NOT (item_sold AND (item_prodcat_id = (-1))))) ); DROP TABLE public.item; publicadminfalse583558365837583858395840584158425843584458455846584758488s!00 TABLE itemCOMMENT-COMMENT ON TABLE item IS 'Item information'; publicadminfalse168t!00COLUMN item.item_maxcostCOMMENTjCOMMENT ON COLUMN item.item_maxcost IS 'Maximum cost for item. Used to constrain purchase order price.'; publicadminfalse168u!00COLUMN item.item_listcostCOMMENTZCOMMENT ON COLUMN item.item_listcost IS 'List cost for item. Basis for markup pricing.'; publicadminfalse168v!00itemACLREVOKE ALL ON TABLE item FROM PUBLIC; REVOKE ALL ON TABLE item FROM admin; GRANT ALL ON TABLE item TO admin; GRANT ALL ON TABLE item TO xtrole; publicadminfalse16812591682765itemsiteTABLE CREATE TABLE itemsite ( itemsite_id integer DEFAULT nextval(('itemsite_itemsite_id_seq'::text)::regclass) NOT NULL, itemsite_item_id integer NOT NULL, itemsite_warehous_id integer, itemsite_qtyonhand numeric(18,6) NOT NULL, itemsite_reorderlevel numeric(18,6) NOT NULL, itemsite_ordertoqty numeric(18,6) NOT NULL, itemsite_cyclecountfreq integer NOT NULL, itemsite_datelastcount date, itemsite_datelastused date, itemsite_loccntrl boolean NOT NULL, itemsite_safetystock numeric(18,6) NOT NULL, itemsite_minordqty numeric(18,6) NOT NULL, itemsite_multordqty numeric(18,6) NOT NULL, itemsite_leadtime integer NOT NULL, itemsite_abcclass character(1), itemsite_issuemethod character(1), itemsite_controlmethod character(1), itemsite_active boolean NOT NULL, itemsite_plancode_id integer NOT NULL, itemsite_costcat_id integer NOT NULL, itemsite_eventfence integer NOT NULL, itemsite_sold boolean NOT NULL, itemsite_stocked boolean NOT NULL, itemsite_freeze boolean DEFAULT false NOT NULL, itemsite_location_id integer NOT NULL, itemsite_useparams boolean NOT NULL, itemsite_useparamsmanual boolean NOT NULL, itemsite_soldranking integer DEFAULT 1, itemsite_createpr boolean, itemsite_location text, itemsite_location_comments text, itemsite_notes text, itemsite_perishable boolean NOT NULL, itemsite_nnqoh numeric(18,6) DEFAULT 0 NOT NULL, itemsite_autoabcclass boolean NOT NULL, itemsite_ordergroup integer DEFAULT 1 NOT NULL, itemsite_disallowblankwip boolean DEFAULT false NOT NULL, itemsite_maxordqty numeric(18,6) DEFAULT 0.0 NOT NULL, itemsite_mps_timefence integer DEFAULT 0 NOT NULL, itemsite_createwo boolean DEFAULT false NOT NULL, itemsite_warrpurc boolean DEFAULT false NOT NULL, itemsite_autoreg boolean DEFAULT false, itemsite_costmethod character(1) NOT NULL, itemsite_value numeric(12,2) NOT NULL, itemsite_ordergroup_first boolean DEFAULT false NOT NULL, itemsite_supply_itemsite_id integer, itemsite_planning_type character(1) DEFAULT 'M'::bpchar NOT NULL, itemsite_wosupply boolean DEFAULT false NOT NULL, itemsite_posupply boolean DEFAULT false NOT NULL, itemsite_lsseq_id integer, itemsite_cosdefault character(1), itemsite_createsopr boolean DEFAULT false, itemsite_createsopo boolean DEFAULT false, itemsite_dropship boolean DEFAULT false, itemsite_recvlocation_id integer DEFAULT (-1) NOT NULL, itemsite_issuelocation_id integer DEFAULT (-1) NOT NULL, itemsite_location_dist boolean DEFAULT false NOT NULL, itemsite_recvlocation_dist boolean DEFAULT false NOT NULL, itemsite_issuelocation_dist boolean DEFAULT false NOT NULL, CONSTRAINT itemsite_itemsite_abcclass_check CHECK (((((itemsite_abcclass = 'A'::bpchar) OR (itemsite_abcclass = 'B'::bpchar)) OR (itemsite_abcclass = 'C'::bpchar)) OR (itemsite_abcclass = 'T'::bpchar))), CONSTRAINT itemsite_itemsite_controlmethod_check CHECK (((((itemsite_controlmethod = 'N'::bpchar) OR (itemsite_controlmethod = 'R'::bpchar)) OR (itemsite_controlmethod = 'S'::bpchar)) OR (itemsite_controlmethod = 'L'::bpchar))), CONSTRAINT itemsite_itemsite_costmethod_check CHECK (((((itemsite_costmethod = 'N'::bpchar) OR (itemsite_costmethod = 'A'::bpchar)) OR (itemsite_costmethod = 'S'::bpchar)) OR (itemsite_costmethod = 'J'::bpchar))), CONSTRAINT itemsite_itemsite_ordergroup_check CHECK ((itemsite_ordergroup > 0)) ); DROP TABLE public.itemsite; publicadminfalse5849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458758w!00TABLE itemsiteCOMMENT6COMMENT ON TABLE itemsite IS 'Item Site information'; publicadminfalse169x!00!COLUMN itemsite.itemsite_lsseq_idCOMMENTlCOMMENT ON COLUMN itemsite.itemsite_lsseq_id IS 'Foreign key reference for automatic lot/serial numbering'; publicadminfalse169y!00#COLUMN itemsite.itemsite_createsoprCOMMENT_COMMENT ON COLUMN itemsite.itemsite_createsopr IS 'Used to flag Sales items that create P/Rs'; publicadminfalse169z!00#COLUMN itemsite.itemsite_createsopoCOMMENT_COMMENT ON COLUMN itemsite.itemsite_createsopo IS 'Used to flag Sales items that create P/Os'; publicadminfalse169{!00!COLUMN itemsite.itemsite_dropshipCOMMENTYCOMMENT ON COLUMN itemsite.itemsite_dropship IS 'Used to flag Sales items to drop ship'; publicadminfalse169|!00itemsiteACLREVOKE ALL ON TABLE itemsite FROM PUBLIC; REVOKE ALL ON TABLE itemsite FROM admin; GRANT ALL ON TABLE itemsite TO admin; GRANT ALL ON TABLE itemsite TO xtrole; publicadminfalse16912591682812whsinfoTABLECREATE TABLE whsinfo ( warehous_id integer DEFAULT nextval(('warehous_warehous_id_seq'::text)::regclass) NOT NULL, warehous_code text NOT NULL, warehous_descrip text, warehous_fob text, warehous_active boolean, warehous_counttag_prefix text, warehous_counttag_number integer, warehous_bol_prefix text, warehous_bol_number integer, warehous_shipping boolean, warehous_useslips boolean, warehous_usezones boolean, warehous_aislesize integer, warehous_aislealpha boolean, warehous_racksize integer, warehous_rackalpha boolean, warehous_binsize integer, warehous_binalpha boolean, warehous_locationsize integer, warehous_locationalpha boolean, warehous_enforcearbl boolean, warehous_default_accnt_id integer, warehous_shipping_commission numeric(8,4) DEFAULT 0.00, warehous_cntct_id integer, warehous_addr_id integer, warehous_transit boolean DEFAULT false NOT NULL, warehous_shipform_id integer, warehous_shipvia_id integer, warehous_shipcomments text, warehous_costcat_id integer, warehous_sitetype_id integer, warehous_taxzone_id integer, warehous_sequence integer DEFAULT 0 NOT NULL, CONSTRAINT whsinfo_check CHECK (((warehous_transit AND (warehous_costcat_id IS NOT NULL)) OR (NOT warehous_transit))), CONSTRAINT whsinfo_warehous_code_check CHECK ((warehous_code <> ''::text)) ); DROP TABLE public.whsinfo; publicadminfalse5882588358845885588658878}!00 TABLE whsinfoCOMMENT5COMMENT ON TABLE whsinfo IS 'Warehouse information'; publicadminfalse172~!00whsinfoACLREVOKE ALL ON TABLE whsinfo FROM PUBLIC; REVOKE ALL ON TABLE whsinfo FROM admin; GRANT ALL ON TABLE whsinfo TO admin; GRANT ALL ON TABLE whsinfo TO xtrole; publicadminfalse17212591845289 physinvcountVIEWvCREATE VIEW physinvcount AS SELECT whsinfo.warehous_code AS site, item.item_number, invcnt.invcnt_tagnumber AS tag_number, cntslip.cntslip_qty AS quantity, public.formatlocationname(cntslip.cntslip_location_id) AS location, cntslip.cntslip_lotserial AS lotserial, cntslip.cntslip_comments AS comment FROM ((((public.invcnt JOIN public.itemsite ON ((itemsite.itemsite_id = invcnt.invcnt_itemsite_id))) JOIN public.whsinfo ON ((whsinfo.warehous_id = itemsite.itemsite_warehous_id))) JOIN public.item ON ((item.item_id = itemsite.itemsite_item_id))) LEFT JOIN public.cntslip ON ((cntslip.cntslip_cnttag_id = invcnt.invcnt_id))); DROP VIEW api.physinvcount; apiadminfalse51606!00VIEW physinvcountCOMMENTICOMMENT ON VIEW physinvcount IS 'Physical Inventory Count Tag and Slip'; apiadminfalse725!00 physinvcountACLREVOKE ALL ON TABLE physinvcount FROM PUBLIC; REVOKE ALL ON TABLE physinvcount FROM admin; GRANT ALL ON TABLE physinvcount TO admin; GRANT ALL ON TABLE physinvcount TO xtrole; apiadminfalse72512551845294 insertphysinvcount(physinvcount)FUNCTIONCREATE FUNCTION insertphysinvcount(physinvcount) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNEW ALIAS FOR $1; _itemid INTEGER; _type TEXT; _siteid INTEGER; _itemsiteid INTEGER; _controlmethod TEXT; _loccntrl BOOLEAN; _locationid INTEGER; _lsid INTEGER; _invcntid INTEGER; _cntslipid INTEGER; _result INTEGER; BEGIN -- Check Item SELECT item_id, item_type INTO _itemid, _type FROM item WHERE (item_number=UPPER(pNEW.item_number)); IF (NOT FOUND OR _type IN ('F', 'R', 'L','J')) THEN SELECT item_id, item_type INTO _itemid, _type FROM item WHERE (item_upccode=pNEW.item_number); IF (NOT FOUND OR _type IN ('F', 'R', 'L','J')) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Item % not found or invalid type', pNEW.item_number; END IF; END IF; -- Check Site SELECT warehous_id INTO _siteid FROM whsinfo WHERE (warehous_code=COALESCE(pNEW.site, (SELECT warehous_code FROM usrpref,whsinfo WHERE (usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse') AND (warehous_id=CAST(usrpref_value AS INTEGER))))); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Site % not found', pNEW.site; END IF; -- Check Itemsite SELECT itemsite_id, itemsite_controlmethod, itemsite_loccntrl INTO _itemsiteid, _controlmethod, _loccntrl FROM itemsite WHERE (itemsite_item_id=_itemid) AND (itemsite_warehous_id=_siteid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Itemsite %, % not found', pNEW.site, pNEW.item_number; END IF; IF (_controlmethod = 'N') THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Itemsite %, % not inventory control method', pNEW.site, pNEW.item_number; END IF; IF (_controlmethod IN ('L', 'S') AND COALESCE(pNEW.lotserial, '') = '') THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Itemsite %, % lot/serial controlled and lotserial not provided', pNEW.site, pNEW.item_number; END IF; IF (_controlmethod = 'S') THEN -- Check for unique serial id SELECT ls_id INTO _lsid FROM ls WHERE (ls_number=pNEW.lotserial); IF (FOUND) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Serial %, %, % not unique', pNEW.site, pNEW.item_number, pNEW.lotserial; END IF; END IF; IF (_loccntrl) THEN IF (pNEW.location IS NULL) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Itemsite %, % multi location and location not provided', pNEW.site, pNEW.item_number; ELSE -- Check Location SELECT location_id INTO _locationid FROM location WHERE (location_id=getLocationId(pNEW.site, pNEW.location)); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because Location %, % not found', pNEW.site, pNEW.location; END IF; END IF; END IF; -- Create Count Tag SELECT CreateCountTag(_itemsiteid, pNEW.comment, FALSE, FALSE) INTO _invcntid; IF (_invcntid <= 0) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because CreateCountTag failed for Itemsite %, %', pNEW.site, pNEW.item_number; END IF; -- Create Count Slip INSERT INTO cntslip ( cntslip_cnttag_id, cntslip_username, cntslip_entered, cntslip_posted, cntslip_number, cntslip_qty, cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, cntslip_comments ) VALUES ( _invcntid, getEffectiveXtUser(), CURRENT_TIMESTAMP, FALSE, 'N/A', pNEW.quantity, COALESCE(_locationid, -1), pNEW.lotserial, NULL, NULL, pNEW.comment ) RETURNING cntslip_id INTO _cntslipid; -- Post Count Slip SELECT postCountSlip(_cntslipid) INTO _result; IF (_result < 0) THEN RAISE EXCEPTION 'Function insertPhysInvCount failed because postCountSlip failed for Itemsite %, %, %', pNEW.site, pNEW.item_number, _result; END IF; RETURN TRUE; END; $_$; 4DROP FUNCTION api.insertphysinvcount(physinvcount); apiadminfalse63992398612551681898 basecurrid()FUNCTIONCREATE FUNCTION basecurrid() RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE returnVal INTEGER; BEGIN SELECT curr_id INTO returnVal FROM curr_symbol WHERE curr_base = TRUE; IF NOT FOUND THEN RAISE EXCEPTION 'No base currency found'; END IF; RETURN returnVal; END; $$; #DROP FUNCTION public.basecurrid(); publicadminfalse8399212551682395formatglaccount(integer)FUNCTIONCREATE FUNCTION formatglaccount(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntid ALIAS FOR $1; _accnt RECORD; BEGIN SELECT COALESCE(accnt_company, '') AS accnt_company, COALESCE(accnt_profit, '') AS accnt_profit, accnt_number, COALESCE(accnt_sub, '') AS accnt_sub INTO _accnt FROM accnt WHERE (accnt_id=pAccntid); IF (NOT FOUND) THEN RETURN 'Error'; END IF; RETURN formatGlAccount(_accnt.accnt_company, _accnt.accnt_profit, _accnt.accnt_number, _accnt.accnt_sub); END; $_$; /DROP FUNCTION public.formatglaccount(integer); publicadminfalse8399212551682425formatsolinenumber(integer)FUNCTIONNCREATE FUNCTION formatsolinenumber(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; _r RECORD; BEGIN SELECT coitem_linenumber, coitem_subnumber INTO _r FROM coitem WHERE(coitem_id=pSoitemid); IF(NOT FOUND) THEN RETURN NULL; END IF; IF(COALESCE(_r.coitem_subnumber, 0) > 0) THEN RETURN _r.coitem_linenumber || '.' || _r.coitem_subnumber; END IF; RETURN _r.coitem_linenumber; END; $_$; 2DROP FUNCTION public.formatsolinenumber(integer); publicadminfalse39928&12551682477geteffectivextuser()FUNCTIONCREATE FUNCTION geteffectivextuser() RETURNS text LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN /* The default return value of this function is simply the user currently connected. Overload this function from another schema to implement specific user handling from an external application that uses connection pooling. Use setEffectiveXtUser(text) to create a temporary table that inserts user data that can in turn be used as a lookup reference for an over loaded version of this function like so: SELECT effective_value FROM effective_user WHERE effective_key = 'username' */ RETURN CURRENT_USER; END; $$; +DROP FUNCTION public.geteffectivextuser(); publicadminfalse8399212551682506 getitemtaxtype(integer, integer)FUNCTIONCREATE FUNCTION getitemtaxtype(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pTaxzoneid ALIAS FOR $2; _taxtypeid INTEGER; BEGIN SELECT itemtax_taxtype_id INTO _taxtypeid FROM itemtax WHERE ((itemtax_item_id=pItemid) AND (itemtax_taxzone_id=pTaxzoneid)); IF (NOT FOUND) THEN SELECT itemtax_taxtype_id INTO _taxtypeid FROM itemtax WHERE ((itemtax_item_id=pItemid) AND (itemtax_taxzone_id IS NULL)); IF (NOT FOUND) THEN RETURN NULL; END IF; END IF; RETURN _taxtypeid; END; $_$; 7DROP FUNCTION public.getitemtaxtype(integer, integer); publicadminfalse8399212591682880coheadTABLE CREATE TABLE cohead ( cohead_id integer DEFAULT nextval(('cohead_cohead_id_seq'::text)::regclass) NOT NULL, cohead_number text NOT NULL, cohead_cust_id integer NOT NULL, cohead_custponumber text, cohead_type character(1), cohead_orderdate date, cohead_warehous_id integer, cohead_shipto_id integer, cohead_shiptoname text, cohead_shiptoaddress1 text, cohead_shiptoaddress2 text, cohead_shiptoaddress3 text, cohead_shiptoaddress4 text, cohead_shiptoaddress5 text, cohead_salesrep_id integer NOT NULL, cohead_terms_id integer NOT NULL, cohead_fob text, cohead_shipvia text, cohead_shiptocity text, cohead_shiptostate text, cohead_shiptozipcode text, cohead_freight numeric(16,4) NOT NULL, cohead_misc numeric(16,4) DEFAULT 0 NOT NULL, cohead_imported boolean DEFAULT false, cohead_ordercomments text, cohead_shipcomments text, cohead_shiptophone text, cohead_shipchrg_id integer, cohead_shipform_id integer, cohead_billtoname text, cohead_billtoaddress1 text, cohead_billtoaddress2 text, cohead_billtoaddress3 text, cohead_billtocity text, cohead_billtostate text, cohead_billtozipcode text, cohead_misc_accnt_id integer, cohead_misc_descrip text, cohead_commission numeric(16,4), cohead_miscdate date, cohead_holdtype character(1), cohead_packdate date, cohead_prj_id integer, cohead_wasquote boolean DEFAULT false NOT NULL, cohead_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, cohead_shipcomplete boolean DEFAULT false NOT NULL, cohead_created timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone, cohead_creator text DEFAULT geteffectivextuser(), cohead_quote_number text, cohead_billtocountry text, cohead_shiptocountry text, cohead_curr_id integer DEFAULT basecurrid(), cohead_calcfreight boolean DEFAULT false NOT NULL, cohead_shipto_cntct_id integer, cohead_shipto_cntct_honorific text, cohead_shipto_cntct_first_name text, cohead_shipto_cntct_middle text, cohead_shipto_cntct_last_name text, cohead_shipto_cntct_suffix text, cohead_shipto_cntct_phone text, cohead_shipto_cntct_title text, cohead_shipto_cntct_fax text, cohead_shipto_cntct_email text, cohead_billto_cntct_id integer, cohead_billto_cntct_honorific text, cohead_billto_cntct_first_name text, cohead_billto_cntct_middle text, cohead_billto_cntct_last_name text, cohead_billto_cntct_suffix text, cohead_billto_cntct_phone text, cohead_billto_cntct_title text, cohead_billto_cntct_fax text, cohead_billto_cntct_email text, cohead_taxzone_id integer, cohead_taxtype_id integer, cohead_ophead_id integer, cohead_status character(1) DEFAULT 'O'::bpchar NOT NULL, cohead_saletype_id integer, cohead_shipzone_id integer, CONSTRAINT cohead_check CHECK (((cohead_misc = (0)::numeric) OR ((cohead_misc <> (0)::numeric) AND (cohead_misc_accnt_id IS NOT NULL)))), CONSTRAINT cohead_cohead_number_check CHECK ((cohead_number <> ''::text)) ); DROP TABLE public.cohead; publicadminfalse58995900590159025903590459055906590759085909591059118!00 TABLE coheadCOMMENT=COMMENT ON TABLE cohead IS 'Sales Order header information'; publicadminfalse176!00 COLUMN cohead.cohead_saletype_idCOMMENTXCOMMENT ON COLUMN cohead.cohead_saletype_id IS 'Associated sale type for sales order.'; publicadminfalse176!00 COLUMN cohead.cohead_shipzone_idCOMMENT\COMMENT ON COLUMN cohead.cohead_shipzone_id IS 'Associated shipping zone for sales order.'; publicadminfalse176!00coheadACLREVOKE ALL ON TABLE cohead FROM PUBLIC; REVOKE ALL ON TABLE cohead FROM admin; GRANT ALL ON TABLE cohead TO admin; GRANT ALL ON TABLE cohead TO xtrole; publicadminfalse17612591682898coitemTABLECREATE TABLE coitem ( coitem_id integer DEFAULT nextval(('coitem_coitem_id_seq'::text)::regclass) NOT NULL, coitem_cohead_id integer, coitem_linenumber integer NOT NULL, coitem_itemsite_id integer, coitem_status character(1), coitem_scheddate date, coitem_promdate date, coitem_qtyord numeric(18,6) NOT NULL, coitem_unitcost numeric(16,6) NOT NULL, coitem_price numeric(16,4) NOT NULL, coitem_custprice numeric(16,4) NOT NULL, coitem_qtyshipped numeric(18,6) NOT NULL, coitem_order_id integer, coitem_memo text, coitem_imported boolean DEFAULT false, coitem_qtyreturned numeric(18,6), coitem_closedate timestamp with time zone, coitem_custpn text, coitem_order_type character(1), coitem_close_username text, coitem_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, coitem_substitute_item_id integer, coitem_created timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone, coitem_creator text DEFAULT geteffectivextuser(), coitem_prcost numeric(16,6), coitem_qty_uom_id integer NOT NULL, coitem_qty_invuomratio numeric(20,10) NOT NULL, coitem_price_uom_id integer NOT NULL, coitem_price_invuomratio numeric(20,10) NOT NULL, coitem_warranty boolean DEFAULT false NOT NULL, coitem_cos_accnt_id integer, coitem_qtyreserved numeric(18,6) DEFAULT 0.0 NOT NULL, coitem_subnumber integer DEFAULT 0 NOT NULL, coitem_firm boolean DEFAULT false NOT NULL, coitem_taxtype_id integer, coitem_rev_accnt_id integer, coitem_pricemode character(1) DEFAULT 'D'::bpchar NOT NULL, CONSTRAINT coitem_coitem_status_check CHECK ((((coitem_status = 'O'::bpchar) OR (coitem_status = 'C'::bpchar)) OR (coitem_status = 'X'::bpchar))), CONSTRAINT valid_coitem_pricemode CHECK ((coitem_pricemode = ANY (ARRAY['D'::bpchar, 'M'::bpchar]))) ); DROP TABLE public.coitem; publicadminfalse5912591359145915591659175918591959205921592259238!00 TABLE coitemCOMMENT@COMMENT ON TABLE coitem IS 'Sales Order Line Item information'; publicadminfalse177!00COLUMN coitem.coitem_pricemodeCOMMENT~COMMENT ON COLUMN coitem.coitem_pricemode IS 'Pricing mode for sales order item. Valid values are D-discount, and M-markup'; publicadminfalse177!00coitemACLREVOKE ALL ON TABLE coitem FROM PUBLIC; REVOKE ALL ON TABLE coitem FROM admin; GRANT ALL ON TABLE coitem TO admin; GRANT ALL ON TABLE coitem TO xtrole; publicadminfalse17712591682914poheadTABLECREATE TABLE pohead ( pohead_id integer DEFAULT nextval(('pohead_pohead_id_seq'::text)::regclass) NOT NULL, pohead_status character(1), pohead_number text NOT NULL, pohead_orderdate date, pohead_vend_id integer, pohead_fob text, pohead_shipvia text, pohead_comments text, pohead_freight numeric(16,2) DEFAULT 0, pohead_printed boolean DEFAULT false, pohead_terms_id integer, pohead_warehous_id integer, pohead_vendaddr_id integer, pohead_agent_username text, pohead_curr_id integer DEFAULT basecurrid(), pohead_saved boolean DEFAULT true NOT NULL, pohead_taxzone_id integer, pohead_taxtype_id integer, pohead_dropship boolean DEFAULT false, pohead_vend_cntct_id integer, pohead_vend_cntct_honorific text, pohead_vend_cntct_first_name text, pohead_vend_cntct_middle text, pohead_vend_cntct_last_name text, pohead_vend_cntct_suffix text, pohead_vend_cntct_phone text, pohead_vend_cntct_title text, pohead_vend_cntct_fax text, pohead_vend_cntct_email text, pohead_vendaddress1 text, pohead_vendaddress2 text, pohead_vendaddress3 text, pohead_vendcity text, pohead_vendstate text, pohead_vendzipcode text, pohead_vendcountry text, pohead_shipto_cntct_id integer, pohead_shipto_cntct_honorific text, pohead_shipto_cntct_first_name text, pohead_shipto_cntct_middle text, pohead_shipto_cntct_last_name text, pohead_shipto_cntct_suffix text, pohead_shipto_cntct_phone text, pohead_shipto_cntct_title text, pohead_shipto_cntct_fax text, pohead_shipto_cntct_email text, pohead_shiptoaddress_id integer, pohead_shiptoaddress1 text, pohead_shiptoaddress2 text, pohead_shiptoaddress3 text, pohead_shiptocity text, pohead_shiptostate text, pohead_shiptozipcode text, pohead_shiptocountry text, pohead_cohead_id integer, pohead_released date, CONSTRAINT pohead_pohead_number_check CHECK ((pohead_number <> ''::text)), CONSTRAINT pohead_pohead_status_check CHECK ((((pohead_status = 'U'::bpchar) OR (pohead_status = 'O'::bpchar)) OR (pohead_status = 'C'::bpchar))) ); DROP TABLE public.pohead; publicadminfalse592459255926592759285929593059318!00 TABLE poheadCOMMENT@COMMENT ON TABLE pohead IS 'Purchase Order header information'; publicadminfalse178!00poheadACLREVOKE ALL ON TABLE pohead FROM PUBLIC; REVOKE ALL ON TABLE pohead FROM admin; GRANT ALL ON TABLE pohead TO admin; GRANT ALL ON TABLE pohead TO xtrole; publicadminfalse17812591682927poitemTABLECREATE TABLE poitem ( poitem_id integer DEFAULT nextval(('poitem_poitem_id_seq'::text)::regclass) NOT NULL, poitem_status character(1), poitem_pohead_id integer, poitem_linenumber integer, poitem_duedate date, poitem_itemsite_id integer, poitem_vend_item_descrip text, poitem_vend_uom text, poitem_invvenduomratio numeric(20,10), poitem_qty_ordered numeric(18,6) NOT NULL, poitem_qty_received numeric(18,6) DEFAULT 0.0 NOT NULL, poitem_qty_returned numeric(18,6) DEFAULT 0.0 NOT NULL, poitem_qty_vouchered numeric(18,6) DEFAULT 0.0 NOT NULL, poitem_unitprice numeric(16,6), poitem_vend_item_number text, poitem_comments text, poitem_qty_toreceive numeric(18,6), poitem_expcat_id integer, poitem_itemsrc_id integer, poitem_freight numeric(16,4) DEFAULT 0.0 NOT NULL, poitem_freight_received numeric(16,4) DEFAULT 0.0 NOT NULL, poitem_freight_vouchered numeric(16,4) DEFAULT 0.0 NOT NULL, poitem_prj_id integer, poitem_stdcost numeric(16,6), poitem_bom_rev_id integer, poitem_boo_rev_id integer, poitem_manuf_name text, poitem_manuf_item_number text, poitem_manuf_item_descrip text, poitem_taxtype_id integer, poitem_tax_recoverable boolean DEFAULT true NOT NULL, poitem_rlsd_duedate date, poitem_order_id integer, poitem_order_type character(1), CONSTRAINT poitem_poitem_status_check CHECK ((((poitem_status = 'U'::bpchar) OR (poitem_status = 'O'::bpchar)) OR (poitem_status = 'C'::bpchar))) ); DROP TABLE public.poitem; publicadminfalse5932593359345935593659375938593959408!00 TABLE poitemCOMMENTCCOMMENT ON TABLE poitem IS 'Purchase Order Line Item information'; publicadminfalse179!00poitemACLREVOKE ALL ON TABLE poitem FROM PUBLIC; REVOKE ALL ON TABLE poitem FROM admin; GRANT ALL ON TABLE poitem TO admin; GRANT ALL ON TABLE poitem TO xtrole; publicadminfalse17912591682798taxtypeTABLECREATE TABLE taxtype ( taxtype_id integer NOT NULL, taxtype_name text NOT NULL, taxtype_descrip text, taxtype_sys boolean DEFAULT false NOT NULL, CONSTRAINT taxtype_taxtype_name_check CHECK ((taxtype_name <> ''::text)) ); DROP TABLE public.taxtype; publicadminfalse587758788!00 TABLE taxtypeCOMMENT5COMMENT ON TABLE taxtype IS 'The list of Tax Types'; publicadminfalse170!00taxtypeACLREVOKE ALL ON TABLE taxtype FROM PUBLIC; REVOKE ALL ON TABLE taxtype FROM admin; GRANT ALL ON TABLE taxtype TO admin; GRANT ALL ON TABLE taxtype TO xtrole; publicadminfalse17012591682805uomTABLECREATE TABLE uom ( uom_id integer NOT NULL, uom_name text NOT NULL, uom_descrip text, uom_item_weight boolean DEFAULT false NOT NULL, CONSTRAINT uom_uom_name_check CHECK ((uom_name <> ''::text)) ); DROP TABLE public.uom; publicadminfalse588058818!00 TABLE uomCOMMENT7COMMENT ON TABLE uom IS 'Unit of Measure information'; publicadminfalse171!00uomACLREVOKE ALL ON TABLE uom FROM PUBLIC; REVOKE ALL ON TABLE uom FROM admin; GRANT ALL ON TABLE uom TO admin; GRANT ALL ON TABLE uom TO xtrole; publicadminfalse17112591682942 saleslineVIEWg CREATE VIEW salesline AS SELECT (cohead.cohead_number)::character varying AS order_number, (public.formatsolinenumber(coitem.coitem_id))::character varying AS line_number, l.item_number, coitem.coitem_custpn AS customer_pn, s.item_number AS substitute_for, whsinfo.warehous_code AS sold_from_site, coitem.coitem_status AS status, coitem.coitem_qtyord AS qty_ordered, q.uom_name AS qty_uom, coitem.coitem_price AS net_unit_price, p.uom_name AS price_uom, coitem.coitem_scheddate AS scheduled_date, coitem.coitem_promdate AS promise_date, coitem.coitem_warranty AS warranty, COALESCE((SELECT taxtype.taxtype_name FROM public.taxtype WHERE (taxtype.taxtype_id = public.getitemtaxtype(l.item_id, cohead.cohead_taxzone_id))), 'None'::text) AS tax_type, CASE WHEN (coitem.coitem_price = (0)::numeric) THEN '100'::text WHEN (coitem.coitem_custprice = (0)::numeric) THEN 'N/A'::text ELSE (round((((1)::numeric - (coitem.coitem_price / coitem.coitem_custprice)) * (100)::numeric), 4))::text END AS discount_pct_from_list, CASE WHEN (coitem.coitem_order_id = (-1)) THEN false ELSE true END AS create_order, CASE WHEN (coitem.coitem_order_id = (-1)) THEN ''::text ELSE ((pohead.pohead_number || '-'::text) || poitem.poitem_linenumber) END AS create_po, coitem.coitem_prcost AS overwrite_po_price, coitem.coitem_memo AS notes, CASE WHEN (coitem.coitem_cos_accnt_id IS NOT NULL) THEN public.formatglaccount(coitem.coitem_cos_accnt_id) ELSE NULL::text END AS alternate_cos_account, CASE WHEN (coitem.coitem_rev_accnt_id IS NOT NULL) THEN public.formatglaccount(coitem.coitem_rev_accnt_id) ELSE NULL::text END AS alternate_rev_account FROM public.cohead, (((public.coitem LEFT JOIN public.itemsite isb ON ((coitem.coitem_substitute_item_id = isb.itemsite_id))) LEFT JOIN public.item s ON ((isb.itemsite_item_id = s.item_id))) LEFT JOIN (public.poitem JOIN public.pohead ON ((poitem.poitem_pohead_id = pohead.pohead_id))) ON ((poitem.poitem_id = coitem.coitem_order_id))), public.itemsite il, public.item l, public.whsinfo, public.uom q, public.uom p WHERE ((((((cohead.cohead_id = coitem.coitem_cohead_id) AND (coitem.coitem_itemsite_id = il.itemsite_id)) AND (il.itemsite_item_id = l.item_id)) AND (il.itemsite_warehous_id = whsinfo.warehous_id)) AND (coitem.coitem_qty_uom_id = q.uom_id)) AND (coitem.coitem_price_uom_id = p.uom_id)) ORDER BY cohead.cohead_number, coitem.coitem_linenumber, coitem.coitem_subnumber; DROP VIEW api.salesline; apiadminfalse51356!00VIEW saleslineCOMMENT6COMMENT ON VIEW salesline IS 'Sales Order Line Item'; apiadminfalse180!00 saleslineACLREVOKE ALL ON TABLE salesline FROM PUBLIC; REVOKE ALL ON TABLE salesline FROM admin; GRANT ALL ON TABLE salesline TO admin; GRANT ALL ON TABLE salesline TO xtrole; apiadminfalse180l12551744970insertsalesline(salesline)FUNCTIONCREATE FUNCTION insertsalesline(salesline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNEW ALIAS FOR $1; _r RECORD; BEGIN IF (NOT EXISTS (SELECT cohead_id FROM cohead WHERE cohead_number=pNEW.order_number)) THEN RAISE EXCEPTION 'Function insertSalesLine failed because Sales Order % not found', pNEW.order_number; END IF; IF (NOT EXISTS (SELECT item_id FROM item WHERE item_number=pNEW.item_number)) THEN RAISE EXCEPTION 'Function insertSalesLine failed because Item Number % not found', pNEW.item_number; END IF; SELECT * INTO _r FROM cohead, itemsite, item, whsinfo WHERE ((cohead_number=pNEW.order_number) AND (itemsite_warehous_id=warehous_id AND (itemsite_item_id=item_id) AND (itemsite_active) AND (item_number=pNEW.item_number) AND (warehous_active) AND (warehous_id=COALESCE(getWarehousId(pNEW.sold_from_site,'ALL'),cohead_warehous_id,fetchprefwarehousid())))); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertSalesLine failed with unknown failure to retrieve Sales Order'; END IF; INSERT INTO coitem ( coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_qtyshipped, coitem_unitcost, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_custprice, coitem_order_id, coitem_memo, coitem_imported, coitem_qtyreturned, coitem_custpn, coitem_order_type, coitem_substitute_item_id, coitem_prcost, coitem_taxtype_id, coitem_warranty, coitem_cos_accnt_id, coitem_rev_accnt_id) VALUES ( _r.cohead_id, pNEW.line_number::INTEGER, _r.itemsite_id, pNEW.status, pNEW.scheduled_date, pNEW.promise_date, pNEW.qty_ordered, COALESCE(getUomId(pNEW.qty_uom),_r.item_inv_uom_id), itemuomtouomratio(_r.item_id,COALESCE(getUomId(pNEW.qty_uom),_r.item_inv_uom_id),_r.item_inv_uom_id), 0, stdCost(_r.item_id), COALESCE(pNEW.net_unit_price,itemPrice(_r.item_id,_r.cohead_cust_id, _r.cohead_shipto_id,pNEW.qty_ordered,_r.cohead_curr_id,_r.cohead_orderdate)), COALESCE(getUomId(pNEW.price_uom),_r.item_price_uom_id), itemuomtouomratio(_r.item_id,COALESCE(getUomId(pNEW.price_uom),_r.item_price_uom_id),_r.item_price_uom_id), itemPrice(_r.item_id, _r.cohead_cust_id, _r.cohead_shipto_id, pNEW.qty_ordered, _r.item_inv_uom_id, _r.item_price_uom_id, _r.cohead_curr_id,_r.cohead_orderdate, CASE WHEN (fetchMetricText('soPriceEffective') = 'ScheduleDate') THEN pNEW.scheduled_date WHEN (fetchMetricText('soPriceEffective') = 'OrderDate') THEN _r.cohead_orderdate ELSE CURRENT_DATE END, NULL) -1, pNEW.notes, true, 0, pNEW.customer_pn, CASE WHEN ((pNEW.create_order AND (_r.item_type = 'M')) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createwo)) THEN 'W' WHEN ((pNEW.create_order AND (_r.item_type = 'P')) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createsopr)) THEN 'R' WHEN ((pNEW.create_order AND (_r.item_type = 'P') AND (_r.itemsite_createsopo)) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createsopo)) THEN 'P' END, getitemid(pNEW.substitute_for), pNEW.overwrite_po_price, COALESCE(getTaxTypeId(pNEW.tax_type), getItemTaxType(_r.itemsite_item_id, _r.cohead_taxzone_id)), pNEW.warranty, getGlAccntId(pNEW.alternate_cos_account), getGlAccntId(pNEW.alternate_rev_account) ); RETURN TRUE; END; $_$; .DROP FUNCTION api.insertsalesline(salesline); apiadminfalse639922724%12551681664_accntdeletetrigger()FUNCTION CREATE FUNCTION _accntdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _accntnum TEXT := formatGLAccount(OLD.accnt_id); _check INTEGER; BEGIN -- This trigger is to protect against accounts that are in use -- Check to see if the passed accnt is used in a Cost Category SELECT costcat_id INTO _check FROM costcat WHERE ( (costcat_asset_accnt_id=OLD.accnt_id) OR (costcat_liability_accnt_id=OLD.accnt_id) OR (costcat_adjustment_accnt_id=OLD.accnt_id) OR (costcat_purchprice_accnt_id=OLD.accnt_id) OR (costcat_laboroverhead_accnt_id=OLD.accnt_id) OR (costcat_scrap_accnt_id=OLD.accnt_id) OR (costcat_invcost_accnt_id=OLD.accnt_id) OR (costcat_wip_accnt_id=OLD.accnt_id) OR (costcat_shipasset_accnt_id=OLD.accnt_id) OR (costcat_mfgscrap_accnt_id=OLD.accnt_id) OR (costcat_transform_accnt_id=OLD.accnt_id) OR (costcat_freight_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Cost Category'; END IF; -- Check to see if the passed accnt is used in a Sales Account Assignment SELECT salesaccnt_id INTO _check FROM salesaccnt WHERE ( (salesaccnt_sales_accnt_id=OLD.accnt_id) OR (salesaccnt_credit_accnt_id=OLD.accnt_id) OR (salesaccnt_cos_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Sales Account Assignment'; END IF; -- Check to see if the passed accnt is used in a A/R Account Assignment SELECT araccnt_id INTO _check FROM araccnt WHERE ( (araccnt_freight_accnt_id=OLD.accnt_id) OR (araccnt_ar_accnt_id=OLD.accnt_id) OR (araccnt_prepaid_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in A/R Account Assignment'; END IF; -- Check to see if the passed accnt is used in a Warehouse SELECT warehous_id INTO _check FROM whsinfo WHERE (warehous_default_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Site'; END IF; -- Check to see if the passed accnt is used in a Bank Account SELECT bankaccnt_id INTO _check FROM bankaccnt WHERE (bankaccnt_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Bank Account'; END IF; -- Check to see if the passed accnt is used in an Expense Category SELECT expcat_id INTO _check FROM expcat WHERE ( (expcat_exp_accnt_id=OLD.accnt_id) OR (expcat_liability_accnt_id=OLD.accnt_id) OR (expcat_purchprice_accnt_id=OLD.accnt_id) OR (expcat_freight_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Expense Category'; END IF; -- Check to see if the passed accnt is used in a Tax Code SELECT tax_id INTO _check FROM tax WHERE (tax_sales_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Tax Code'; END IF; -- Check to see if the passed accnt is used in a Standard Journal Item SELECT stdjrnlitem_id INTO _check FROM stdjrnlitem WHERE (stdjrnlitem_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Standard Journal Item'; END IF; -- Check to see if the passed accnt is used in a A/P Account Assignment SELECT apaccnt_ap_accnt_id INTO _check FROM apaccnt WHERE ( (apaccnt_ap_accnt_id=OLD.accnt_id) OR (apaccnt_prepaid_accnt_id=OLD.accnt_id) OR (apaccnt_discount_accnt_id=OLD.accnt_id) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in A/P Account Assignment'; END IF; -- Check to see if the passed accnt is used in an A/R Open Item record SELECT aropen_accnt_id INTO _check FROM aropen WHERE (aropen_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in A/R Open Item'; END IF; -- Check to see if the passed accnt has been used in the G/L SELECT gltrans_accnt_id INTO _check FROM gltrans WHERE (gltrans_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in G/L Transaction'; END IF; SELECT sltrans_accnt_id INTO _check FROM sltrans WHERE (sltrans_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in G/L Journal Transaction'; END IF; SELECT glseries_accnt_id INTO _check FROM glseries WHERE (glseries_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in G/L Series'; END IF; SELECT trialbal_accnt_id INTO _check FROM trialbal WHERE (trialbal_accnt_id=OLD.accnt_id) AND (trialbal_beginning != 0 OR trialbal_ending != 0) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Trial Balance'; END IF; SELECT cashrcptmisc_accnt_id INTO _check FROM cashrcptmisc WHERE (cashrcptmisc_accnt_id=OLD.accnt_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Can not delete, used in Cash Receipt Misc. Application'; END IF; -- TODO: everything above here should be replaced by fkeys IF (OLD.accnt_id = fetchMetricValue('DefaultAPAccount')) THEN RAISE EXCEPTION 'Cannot delete the default A/P Account [xtuple: accnt, -1, %]', _accntnum; ELSIF (OLD.accnt_id = fetchMetricValue('DefaultARAccount')) THEN RAISE EXCEPTION 'Cannot delete the default A/R Account [xtuple: accnt, -2, %]', _accntnum; END IF; RETURN OLD; END; $$; ,DROP FUNCTION public._accntdeletetrigger(); publicadminfalse83992$12551681665_accnttrigger()FUNCTION6CREATE FUNCTION _accnttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ffSub BOOLEAN; ffProfit BOOLEAN; result INTEGER; BEGIN SELECT (metric_value='t') INTO ffSub FROM metric WHERE(metric_name='GLFFSubaccounts') LIMIT 1; ffSub := COALESCE(ffSub, false); SELECT (metric_value='t') INTO ffProfit FROM metric WHERE(metric_name='GLFFProfitCenters') LIMIT 1; ffProfit := COALESCE(ffSub, false); IF (NEW.accnt_sub IS NOT NULL AND ffSub = false) THEN SELECT subaccnt_id INTO result FROM subaccnt WHERE(subaccnt_number=NEW.accnt_sub) LIMIT 1; IF (NOT FOUND) THEN RAISE EXCEPTION 'You must supply a valid Sub Account Number.'; END IF; END IF; IF (NEW.accnt_profit IS NOT NULL AND ffProfit = false) THEN SELECT prftcntr_id INTO result FROM prftcntr WHERE(prftcntr_number=NEW.accnt_profit) LIMIT 1; IF (NOT FOUND) THEN RAISE EXCEPTION 'You must supply a valid Profit Center Number.'; END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF ((NEW.accnt_type != OLD.accnt_type) AND (SELECT (count(*) > 0) FROM gltrans WHERE (gltrans_accnt_id=NEW.accnt_id))) THEN RAISE EXCEPTION 'You may not change the account type of an account that has transaction history'; END IF; END IF; NEW.accnt_name := formatGlAccount(NEW.accnt_company, NEW.accnt_profit, NEW.accnt_number, NEW.accnt_sub); RETURN NEW; END; $$; &DROP FUNCTION public._accnttrigger(); publicadminfalse83992-12551681666_accntuniquetrigger()FUNCTIONCREATE FUNCTION _accntuniquetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN -- This trigger is to protect against id collision on inherited tables since there is no way -- to enforce that with regular constraints. It should be applied to accnt and any table that -- inherits accnt. IF (SELECT (count(accnt_id) > 0) FROM accnt WHERE (accnt_id = NEW.accnt_id)) THEN RAISE EXCEPTION 'Can not create record on account with duplicate key %.', NEW.accnt_id; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._accntuniquetrigger(); publicadminfalse39928(12551681667_addrtrigger()FUNCTIONCREATE FUNCTION _addrtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _uses INTEGER := 0; BEGIN IF (TG_OP = 'INSERT') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('AddressNumber', NEW.addr_number); ELSE SELECT count(*) INTO _uses FROM cntct WHERE ((cntct_addr_id=OLD.addr_id) AND cntct_active); END IF; IF (TG_OP = 'UPDATE') THEN IF (OLD.addr_active AND NOT NEW.addr_active AND _uses > 0) THEN RAISE EXCEPTION 'Cannot inactivate Address with Active Contacts (%)', _uses; END IF; ELSIF (TG_OP = 'DELETE') THEN IF (_uses > 0) THEN RAISE EXCEPTION 'Cannot Delete Address with Active Contacts (%)', _uses; END IF; UPDATE cntct SET cntct_addr_id = NULL WHERE ((cntct_addr_id=OLD.addr_id) AND (NOT cntct_active)); RETURN OLD; END IF; RETURN NEW; END; $$; %DROP FUNCTION public._addrtrigger(); publicadminfalse83992612551681668_alarmbeforetrigger()FUNCTION7CREATE FUNCTION _alarmbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN PERFORM clearNumberIssue('AlarmNumber', NEW.alarm_number); RETURN NEW; END; $$; ,DROP FUNCTION public._alarmbeforetrigger(); publicadminfalse83992)12551681669_apapplytrigger()FUNCTIONCREATE FUNCTION _apapplytrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _tpaid NUMERIC; BEGIN -- get the exchange rate for the doc date IF (TG_OP = 'INSERT') THEN SELECT currtocurr(NEW.apapply_curr_id,apopen_curr_id,NEW.apapply_amount,NEW.apapply_postdate) INTO _tpaid FROM apopen WHERE ( apopen_id=NEW.apapply_target_apopen_id ); IF (FOUND) THEN NEW.apapply_target_paid := _tpaid; ELSE RAISE EXCEPTION 'Error calculating paid amount on application'; END IF; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._apapplytrigger(); publicadminfalse83992*12551681670_apopentrigger()FUNCTIONCREATE FUNCTION _apopentrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _currrate NUMERIC; BEGIN -- get the base exchange rate for the doc date IF (TG_OP = 'INSERT' AND NEW.apopen_curr_rate IS NULL) THEN SELECT curr_rate INTO _currrate FROM curr_rate WHERE ( (NEW.apopen_curr_id=curr_id) AND ( NEW.apopen_docdate BETWEEN curr_effective AND curr_expires) ); IF (FOUND) THEN NEW.apopen_curr_rate := _currrate; ELSE RAISE EXCEPTION 'Currency exchange rate not found'; END IF; END IF; NEW.apopen_open := NEW.apopen_amount > NEW.apopen_paid; IF (TG_OP = 'INSERT') THEN IF (NEW.apopen_open=FALSE) THEN NEW.apopen_status='C'; ELSE NEW.apopen_status='O'; END IF; --- clear the number from the issue cache PERFORM clearNumberIssue('APMemoNumber', NEW.apopen_docnumber); END IF; IF (TG_OP = 'UPDATE') THEN IF ((OLD.apopen_open=TRUE) AND (NEW.apopen_open=FALSE)) THEN NEW.apopen_status='C'; IF (NEW.apopen_closedate IS NULL) THEN NEW.apopen_closedate=CURRENT_DATE; END IF; END IF; IF ((OLD.apopen_open=FALSE) AND (NEW.apopen_open=TRUE)) THEN NEW.apopen_status='O'; NEW.apopen_closedate=NULL; END IF; END IF; RETURN NEW; END; $$; 'DROP FUNCTION public._apopentrigger(); publicadminfalse83992+12551681671_arapplytrigger()FUNCTIONCREATE FUNCTION _arapplytrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _tpaid NUMERIC; BEGIN -- get the exchange rate for the doc date IF (TG_OP = 'INSERT') THEN IF (NEW.arapply_target_doctype != 'K') THEN SELECT round(currtocurr(NEW.arapply_curr_id,aropen_curr_id,NEW.arapply_applied,NEW.arapply_postdate),2) INTO NEW.arapply_target_paid FROM aropen WHERE ( aropen_id=NEW.arapply_target_aropen_id ); ELSE SELECT round(currtocurr(NEW.arapply_curr_id,aropen_curr_id,NEW.arapply_applied,NEW.arapply_postdate),2) INTO NEW.arapply_target_paid FROM aropen WHERE ( aropen_id=NEW.arapply_source_aropen_id ); END IF; IF NOT FOUND THEN NEW.arapply_target_paid := NEW.arapply_applied; END IF; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._arapplytrigger(); publicadminfalse83992,12551681672_aropenaftertrigger()FUNCTIONCREATE FUNCTION _aropenaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _openAmount NUMERIC; _lateCount INTEGER := 0; _graceDays INTEGER; _checkLate BOOLEAN := false; _checkLimit BOOLEAN := false; _id INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN _id := NEW.aropen_id; ELSE _id := OLD.aropen_id; END IF; -- If metric is set then auto close any associated incidents when AR is closed IF (fetchMetricBool('AutoCloseARIncident')) THEN IF (NEW.aropen_open = FALSE) THEN UPDATE incdt SET incdt_status='L' WHERE (incdt_aropen_id=_id); END IF; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._aropenaftertrigger(); publicadminfalse8399212551681673_aropentrigger()FUNCTIONuCREATE FUNCTION _aropentrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _openAmount NUMERIC; _p RECORD; _lateCount INTEGER := 0; _graceDays INTEGER; _checkLate BOOLEAN := false; _checkLimit BOOLEAN := false; _id INTEGER; _currRate NUMERIC; BEGIN -- Checks -- Start with privileges IF ( (NOT checkPrivilege('MaintainARMemos')) AND (NOT checkPrivilege('PostMiscInvoices')) AND (NOT checkPrivilege('PostARDocuments')) ) THEN RAISE EXCEPTION 'You do not have privileges to maintain A/R Memos.'; END IF; IF ( (NEW.aropen_docnumber IS NULL) OR (LENGTH(NEW.aropen_docnumber) = 0) ) THEN RAISE EXCEPTION 'You must enter a valid Document # for this A/R Memo.'; END IF; IF ( (NEW.aropen_amount IS NOT NULL) AND (NEW.aropen_amount < 0) ) THEN RAISE EXCEPTION 'You must enter a positive Amount for this A/R Memo.'; END IF; IF (TG_OP IN ('INSERT', 'UPDATE') AND NEW.aropen_cust_id < 0) THEN RAISE NOTICE 'Fixing deprecated use of negative aropen_cust_id'; NEW.aropen_cust_id := NULL; END IF; IF (TG_OP IN ('INSERT', 'UPDATE') AND NEW.aropen_salesrep_id < 0) THEN RAISE NOTICE 'Fixing deprecated use of negative aropen_salesrep_id'; NEW.aropen_salesrep_id := NULL; END IF; IF (TG_OP = 'INSERT') THEN SELECT aropen_id INTO _id FROM aropen WHERE ( (aropen_doctype=NEW.aropen_doctype) AND (aropen_docnumber=NEW.aropen_docnumber) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'This Document Type/Number already exists. You may not enter a duplicate A/R Memo.'; END IF; --- clear the number from the issue cache if applicable PERFORM clearNumberIssue('ARMemoNumber', NEW.aropen_docnumber); END IF; -- Determine the number of late invoices IF ( SELECT (metric_value='t') FROM metric WHERE(metric_name='AutoCreditWarnLateCustomers')) THEN _checkLate := true; SELECT COALESCE(metric_value::integer, _graceDays) INTO _graceDays FROM metric WHERE(metric_name='DefaultAutoCreditWarnGraceDays'); IF (NOT FOUND) THEN _graceDays := 30; END IF; SELECT COALESCE(cust_gracedays, _graceDays) INTO _graceDays FROM custinfo WHERE(cust_id=NEW.aropen_cust_id); IF (NOT FOUND) THEN _graceDays := 30; END IF; SELECT count(aropen_id) INTO _lateCount FROM aropen WHERE((NEW.aropen_cust_id = aropen_cust_id) AND (aropen_open) AND (aropen_amount > aropen_paid) AND (aropen_doctype IN ('I', 'D')) AND (aropen_duedate < (CURRENT_DATE - _graceDays))); -- Adjust _lateCount if late invoice being paid IF ( (NEW.aropen_paid = NEW.aropen_amount) AND (NEW.aropen_doctype IN ('I', 'D')) AND (NEW.aropen_duedate < (CURRENT_DATE - _graceDays))) THEN _lateCount := _lateCount - 1; END IF; END IF; -- get the base exchange rate for the doc date IF (TG_OP = 'INSERT' AND NEW.aropen_curr_rate IS NULL) THEN SELECT curr_rate INTO _currrate FROM curr_rate WHERE ( (NEW.aropen_curr_id=curr_id) AND ( NEW.aropen_docdate BETWEEN curr_effective AND curr_expires) ); IF (FOUND) THEN NEW.aropen_curr_rate := _currrate; ELSE RAISE EXCEPTION 'Currency exchange rate not found'; END IF; END IF; -- Close this aropen if it is paid IF (NEW.aropen_paid = NEW.aropen_amount) THEN NEW.aropen_open=FALSE; -- Remove any aropenalloc regards that reference this aropen item DELETE FROM aropenalloc WHERE (aropenalloc_aropen_id=NEW.aropen_id); END IF; IF (TG_OP = 'INSERT') THEN IF (NEW.aropen_open=FALSE) AND (NEW.aropen_closedate IS NULL) THEN NEW.aropen_closedate=current_date; END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF ((OLD.aropen_open=TRUE) AND (NEW.aropen_open=FALSE) AND (NEW.aropen_closedate IS NULL)) THEN NEW.aropen_closedate=current_date; END IF; END IF; -- Only check if the customer in question has a non-zero Credit Limit SELECT cust_id, cust_creditlmt, cust_creditstatus, cust_autoupdatestatus, cust_autoholdorders INTO _p FROM custinfo WHERE (cust_id=NEW.aropen_cust_id); IF (_p.cust_creditlmt > 0) THEN _checkLimit := true; SELECT COALESCE(SUM( CASE WHEN (aropen_doctype IN ('I', 'D')) THEN (aropen_amount - aropen_paid) ELSE ((aropen_amount - aropen_paid) * -1) END ), 0.0) INTO _openAmount FROM aropen AS current WHERE ( (current.aropen_cust_id=NEW.aropen_cust_id) AND (current.aropen_open) AND (current.aropen_id <> NEW.aropen_id) ); -- Add in the value of the current aropen item IF (NEW.aropen_doctype IN ('I', 'D')) THEN _openAmount := (_openAmount + (NEW.aropen_amount - NEW.aropen_paid)); ELSE _openAmount := (_openAmount - (NEW.aropen_amount - NEW.aropen_paid)); END IF; ELSE _openAmount := 0; END IF; IF (_checkLimit OR _checkLate) THEN -- Handle a Customer that is going under its credit limit IF ((_p.cust_creditlmt >= _openAmount) AND (_lateCount <= 0)) THEN -- Handle the Customer Status IF ( (_p.cust_autoupdatestatus) AND (_p.cust_creditstatus='W') ) THEN UPDATE custinfo SET cust_creditstatus='G' WHERE (cust_id=NEW.aropen_cust_id); END IF; -- Handle the open Sales Orders IF (_p.cust_autoholdorders) THEN UPDATE cohead SET cohead_holdtype='N' FROM coitem WHERE ( (coitem_cohead_id=cohead_id) AND (cohead_holdtype='C') AND (coitem_status='O') AND (cohead_cust_id=_p.cust_id) ); END IF; -- Handle a Customer that is going over its credit limit ELSIF ((_p.cust_creditlmt < _openAmount) OR (_lateCount > 0)) THEN -- Handle the Customer Status IF ( (_p.cust_autoupdatestatus) AND (_p.cust_creditstatus = 'G') ) THEN UPDATE custinfo SET cust_creditstatus='W' WHERE (cust_id=NEW.aropen_cust_id); END IF; -- Handle the open Sales Orders IF (_p.cust_autoholdorders) THEN UPDATE cohead SET cohead_holdtype='C' FROM coitem WHERE ( (coitem_cohead_id=cohead_id) AND (cohead_holdtype='N') AND (coitem_status='O') AND (cohead_cust_id=_p.cust_id) ); END IF; END IF; END IF; RETURN NEW; END; $$; 'DROP FUNCTION public._aropentrigger(); publicadminfalse83992e12551681675_bomheadtrigger()FUNCTIONCREATE FUNCTION _bomheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _revid INTEGER; _check TEXT; BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainBOMs')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Bills of Material.'; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._bomheadtrigger(); publicadminfalse83992/12551681676_bomitemaftertrigger()FUNCTIONrCREATE FUNCTION _bomitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF ( SELECT fetchMetricBool('ItemChangeLog') ) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, ('Created BOM Item Sequence ' || NEW.bomitem_seqnumber::TEXT)); ELSIF (TG_OP = 'UPDATE') THEN IF (NEW.bomitem_effective <> OLD.bomitem_effective) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Effective Date Changed from ' || formatDate(OLD.bomitem_effective, 'Always') || ' to ' || formatDate(NEW.bomitem_effective, 'Always' ) ) ); END IF; IF (NEW.bomitem_expires <> OLD.bomitem_expires) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Expiration Date Changed from ' || formatDate(OLD.bomitem_expires, 'Never') || ' to ' || formatDate(NEW.bomitem_expires, 'Never' ) ) ); END IF; IF (NEW.bomitem_qtyfxd <> OLD.bomitem_qtyfxd) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Fixed Qty. Changed from ' || formatQtyPer(OLD.bomitem_qtyfxd) || ' to ' || formatQtyPer(NEW.bomitem_qtyfxd ) ) ); END IF; IF (NEW.bomitem_qtyper <> OLD.bomitem_qtyper) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Qty. Per Changed from ' || formatQtyPer(OLD.bomitem_qtyper) || ' to ' || formatQtyPer(NEW.bomitem_qtyper ) ) ); END IF; IF (NEW.bomitem_scrap <> OLD.bomitem_scrap) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Scrap % Changed from ' || formatPrcnt(OLD.bomitem_scrap) || ' to ' || formatPrcnt(NEW.bomitem_scrap ) ) ); END IF; IF (NEW.bomitem_issuemethod <> OLD.bomitem_issuemethod) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'Issue Method Changed from ' || (CASE WHEN(OLD.bomitem_issuemethod='S') THEN 'Push' WHEN(OLD.bomitem_issuemethod='L') THEN 'Pull' WHEN(OLD.bomitem_issuemethod='M') THEN 'Mixed' ELSE OLD.bomitem_issuemethod END) || ' to ' || (CASE WHEN(NEW.bomitem_issuemethod='S') THEN 'Push' WHEN(NEW.bomitem_issuemethod='L') THEN 'Pull' WHEN(NEW.bomitem_issuemethod='M') THEN 'Mixed' ELSE NEW.bomitem_issuemethod END) ) ); END IF; IF (NEW.bomitem_ecn <> OLD.bomitem_ecn) THEN PERFORM postComment( 'ChangeLog', 'BMI', NEW.bomitem_id, ( 'ECN Changed from ' || OLD.bomitem_ecn || ' to ' || NEW.bomitem_ecn ) ); END IF; IF (OLD.bomitem_createwo <> NEW.bomitem_createwo) THEN IF (NEW.bomitem_createwo) THEN PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, 'Create Child W/O activated'); ELSE PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, 'Create Child W/O deactivated'); END IF; END IF; IF (OLD.bomitem_issuewo <> NEW.bomitem_issuewo) THEN IF (NEW.bomitem_issuewo) THEN PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, 'Issue Child W/O activated'); ELSE PERFORM postComment('ChangeLog', 'BMI', NEW.bomitem_id, 'Issue Child W/O deactivated'); END IF; END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM comment WHERE ( (comment_source='BMI') AND (comment_source_id=OLD.bomitem_id) ); RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._bomitemaftertrigger(); publicadminfalse83992012551681677_bomitembeforedeletetrigger()FUNCTIONmCREATE FUNCTION _bomitembeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN DELETE FROM comment WHERE ( (comment_source='BMI') AND (comment_source_id=OLD.bomitem_id) ); RETURN OLD; END; $$; 4DROP FUNCTION public._bomitembeforedeletetrigger(); publicadminfalse83992.12551681678_bomitembeforetrigger()FUNCTIONCREATE FUNCTION _bomitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _bomworksetid INTEGER; _bomworkid INTEGER; _seqNumber INTEGER; _parentItem RECORD; BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainBOMs')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Bills of Material.'; END IF; -- Cache Parent Item SELECT * INTO _parentItem FROM item WHERE (item_id=NEW.bomitem_parent_item_id); IF (TG_OP = 'INSERT') THEN -- Make sure that the parent and component are not the same IF (NEW.bomitem_parent_item_id = NEW.bomitem_item_id) THEN RAISE EXCEPTION 'BOM Item Parent and Component Item cannot be the same. [xtuple: createBOMItem, -1]'; END IF; -- Make sure that the parent is not used in the component at some level IF ( SELECT (item_type IN ('M', 'F')) FROM item WHERE (item_id=NEW.bomitem_item_id) ) THEN SELECT indentedWhereUsed(NEW.bomitem_parent_item_id) INTO _bomworksetid; SELECT bomwork_id INTO _bomworkid FROM bomwork WHERE ((bomwork_set_id=_bomworksetid) AND (bomwork_item_id=NEW.bomitem_item_id)) LIMIT 1; IF (FOUND) THEN PERFORM deleteBOMWorkset(_bomworksetid); RAISE EXCEPTION 'BOM Item Parent is used by Component, BOM is recursive. [xtuple: createBOMItem, -2]'; END IF; END IF; PERFORM deleteBOMWorkset(_bomworksetid); -- Set defaults NEW.bomitem_rev_id := COALESCE(NEW.bomitem_rev_id, -1); NEW.bomitem_booitem_seq_id := COALESCE(NEW.bomitem_booitem_seq_id, -1); NEW.bomitem_schedatwooper := COALESCE(NEW.bomitem_schedatwooper, FALSE); IF (NEW.bomitem_seqnumber IS NULL) THEN -- Grab the next Sequence Number, if any SELECT MAX(bomitem_seqnumber) INTO _seqNumber FROM bomitem(NEW.bomitem_parent_item_id,NEW.bomitem_rev_id); IF (_seqNumber IS NOT NULL) THEN NEW.bomitem_seqnumber := (_seqNumber + 10); ELSE NEW.bomitem_seqnumber := 10; END IF; END IF; END IF; -- end Insert specific IF (TG_OP = 'UPDATE') THEN -- Disallow changes that would compromise revision control integrity IF (NEW.bomitem_parent_item_id != OLD.bomitem_parent_item_id) THEN RAISE EXCEPTION 'Parent Item ID may not be changed.'; END IF; IF (NEW.bomitem_item_id != OLD.bomitem_item_id) THEN RAISE EXCEPTION 'Item ID may not be changed.'; END IF; IF ((fetchMetricBool('RevControl')) AND (OLD.bomitem_rev_id > -1)) THEN IF (SELECT (rev_status = 'I') FROM rev WHERE (rev_id=OLD.bomitem_rev_id)) THEN RAISE EXCEPTION 'Bill of material is Inactive and may not be modified'; END IF; END IF; END IF; -- end Update specific -- Check for valid UOM IF (SELECT (count(*) != 1) FROM (SELECT uom_id FROM item JOIN uom ON (item_inv_uom_id=uom_id) WHERE(item_id=NEW.bomitem_item_id) UNION SELECT uom_id FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN uom ON (itemuomconv_to_uom_id=uom_id), itemuom, uomtype WHERE((itemuomconv_from_uom_id=item_inv_uom_id) AND (item_id=NEW.bomitem_item_id) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (uomtype_id=itemuom_uomtype_id) AND (uomtype_name='MaterialIssue')) UNION SELECT uom_id FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN uom ON (itemuomconv_from_uom_id=uom_id), itemuom, uomtype WHERE((itemuomconv_to_uom_id=item_inv_uom_id) AND (item_id=NEW.bomitem_item_id) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (uomtype_id=itemuom_uomtype_id) AND (uomtype_name='MaterialIssue'))) AS data WHERE (uom_id=NEW.bomitem_uom_id)) THEN RAISE EXCEPTION 'Unit of Measure Invalid for Material Issue.'; END IF; -- Disallow configuration parameters if parent is not a job item IF (NEW.bomitem_char_id IS NOT NULL) THEN IF (NOT _parentItem.item_config) THEN RAISE EXCEPTION 'Configuration characteristics may only be defined for Configured Items'; END IF; END IF; -- Kit items must be sold and not kits themselves IF (_parentItem.item_type = 'K') THEN IF (SELECT (COUNT(item_id) = 0) FROM item WHERE ((item_id=NEW.bomitem_item_id) AND (item_sold) AND (item_type != 'K'))) THEN RAISE EXCEPTION 'Bill of Material Items for kits must be sold and not kits themselves'; END IF; END IF; -- Over ride logic to disallow invalid data IF (NEW.bomitem_createwo) THEN IF (SELECT (item_type != 'M') FROM item WHERE (item_id=NEW.bomitem_item_id)) THEN NEW.bomitem_createwo := FALSE; END IF; IF (NEW.bomitem_booitem_seq_id = -1) THEN NEW.bomitem_schedatwooper := FALSE; END IF; END IF; NEW.bomitem_moddate := COALESCE(NEW.bomitem_moddate, CURRENT_DATE); RETURN NEW; END; $$; .DROP FUNCTION public._bomitembeforetrigger(); publicadminfalse39928112551681680_bomitemsubtrigger()FUNCTIONCREATE FUNCTION _bomitemsubtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainBOMs')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Bills of Material.'; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END; $$; +DROP FUNCTION public._bomitemsubtrigger(); publicadminfalse83992412551681681_cashrcptitemaftertrigger()FUNCTIONCREATE FUNCTION _cashrcptitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _total NUMERIC; BEGIN -- Checks -- Total Over Application Warning SELECT (cashrcpt_amount - SUM(COALESCE(cashrcptitem_amount, 0))) INTO _total FROM cashrcptitem JOIN cashrcpt ON (cashrcpt_id=cashrcptitem_cashrcpt_id) WHERE (cashrcptitem_cashrcpt_id=NEW.cashrcptitem_cashrcpt_id) GROUP BY cashrcpt_amount; IF (_total < 0.0) THEN RAISE WARNING 'Warning -- the Cash Receipt has been over applied.'; END IF; RETURN NEW; END; $$; 2DROP FUNCTION public._cashrcptitemaftertrigger(); publicadminfalse83992312551681682_cashrcptitemtrigger()FUNCTIONCREATE FUNCTION _cashrcptitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _openAmount NUMERIC; BEGIN -- Checks -- Start with Privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add a new Cash Receipt Application.'; END IF; ELSE SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Cash Receipt Application.'; END IF; END IF; -- Over Application SELECT round(currToCurr(aropen_curr_id, cashrcpt_curr_id, aropen_amount - aropen_paid, cashrcpt_distdate) - COALESCE((SELECT SUM(cashrcptitem_amount) FROM cashrcptitem, cashrcpt WHERE ((cashrcpt_id=cashrcptitem_cashrcpt_id) AND (NOT cashrcpt_void) AND (NOT cashrcpt_posted) AND (cashrcpt_id != NEW.cashrcptitem_cashrcpt_id) AND (cashrcptitem_aropen_id=NEW.cashrcptitem_aropen_id))), 0),2) INTO _openAmount FROM aropen, cashrcpt WHERE ( (aropen_id=NEW.cashrcptitem_aropen_id) AND (cashrcpt_id=NEW.cashrcptitem_cashrcpt_id) ); IF (NEW.cashrcptitem_amount > _openAmount) THEN RAISE EXCEPTION 'You may not apply more than the balance of this item.'; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._cashrcptitemtrigger(); publicadminfalse83992712551681683_cashrcptmisctrigger()FUNCTIONCREATE FUNCTION _cashrcptmisctrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; BEGIN -- Checks -- Start with Privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add a new Cash Receipt Misc. Application.'; END IF; ELSE SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Cash Receipt Misc. Application.'; END IF; END IF; -- Account is required IF (NEW.cashrcptmisc_accnt_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid GL Account.'; END IF; -- Amount is required IF (COALESCE(NEW.cashrcptmisc_amount, 0) = 0) THEN RAISE EXCEPTION 'You must supply a valid Amount.'; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._cashrcptmisctrigger(); publicadminfalse83992212551681684_cashrcpttrigger()FUNCTION CREATE FUNCTION _cashrcpttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _checkId INTEGER; _currId INTEGER; _bankCurrId INTEGER; _evntType TEXT; _whsId INTEGER; _custNumber TEXT; _currrate NUMERIC; BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add new Cash Receipts.'; END IF; ELSE SELECT checkPrivilege('MaintainCashReceipts') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Cash Receipt.'; END IF; END IF; -- Currency must be same as Bank Currency IF (TG_OP = 'INSERT') THEN _currId = COALESCE(NEW.cashrcpt_curr_id, basecurrid()); --- clear the number from the issue cache PERFORM clearNumberIssue('CashRcptNumber', NEW.cashrcpt_number); ELSE _currId = NEW.cashrcpt_curr_id; END IF; -- get the base exchange rate for the dist date IF (NEW.cashrcpt_curr_rate IS NULL) THEN SELECT curr_rate INTO _currrate FROM curr_rate WHERE ( (NEW.cashrcpt_curr_id=curr_id) AND ( NEW.cashrcpt_distdate BETWEEN curr_effective AND curr_expires) ); IF (FOUND) THEN NEW.cashrcpt_curr_rate := _currrate; ELSE RAISE EXCEPTION 'Currency exchange rate not found'; END IF; END IF; -- Create CashReceiptPosted Event IF (TG_OP = 'UPDATE') THEN IF (OLD.cashrcpt_posted=FALSE AND NEW.cashrcpt_posted=TRUE) THEN _evntType = 'CashReceiptPosted'; -- Find the warehouse for which to create evntlog entries SELECT usrpref_value INTO _whsId FROM usrpref WHERE usrpref_username = getEffectiveXtUser() AND usrpref_name = 'PreferredWarehouse'; -- Find the Customer Number SELECT cust_number INTO _custNumber FROM custinfo WHERE (cust_id=NEW.cashrcpt_cust_id); INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT DISTINCT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, NEW.cashrcpt_id, _whsId, (_custNumber || '-' || NEW.cashrcpt_docnumber || ' ' || currConcat(NEW.cashrcpt_curr_id) || formatMoney(NEW.cashrcpt_amount)) FROM evntnot, evnttype WHERE ((evntnot_evnttype_id=evnttype_id) AND (evnttype_name=_evntType)); END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._cashrcpttrigger(); publicadminfalse39928812551681685_ccardtrigger()FUNCTION(CREATE FUNCTION _ccardtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN New.ccard_lastupdated := current_timestamp; New.ccard_last_updated_by_username := getEffectiveXtUser(); IF (TG_OP = 'UPDATE') THEN INSERT INTO ccardaud VALUES (nextval('ccardaud_ccardaud_id_seq'), NEW.ccard_id, OLD.ccard_seq, NEW.ccard_seq, OLD.ccard_cust_id, NEW.ccard_cust_id, OLD.ccard_active, NEW.ccard_active, OLD.ccard_name, NEW.ccard_name, OLD.ccard_address1, NEW.ccard_address1, OLD.ccard_address2, NEW.ccard_address2, OLD.ccard_city, NEW.ccard_city, OLD.ccard_state, NEW.ccard_state, OLD.ccard_zip, NEW.ccard_zip, OLD.ccard_country, NEW.ccard_country, OLD.ccard_number, NEW.ccard_number, OLD.ccard_debit, NEW.ccard_debit, OLD.ccard_month_expired, NEW.ccard_month_expired, OLD.ccard_year_expired, NEW.ccard_year_expired, OLD.ccard_type, NEW.ccard_type); ELSE -- We are inserting a record, therefore no old values INSERT INTO ccardaud VALUES (nextval('ccardaud_ccardaud_id_seq'), NEW.ccard_id, NULL, NEW.ccard_seq, NULL, NEW.ccard_cust_id, NULL, NEW.ccard_active, NULL, NEW.ccard_name, NULL, NEW.ccard_address1, NULL, NEW.ccard_address2, NULL, NEW.ccard_city, NULL, NEW.ccard_state, NULL, NEW.ccard_zip, NULL, NEW.ccard_country, NULL, NEW.ccard_number, NULL, NEW.ccard_debit, NULL, NEW.ccard_month_expired, NULL, NEW.ccard_year_expired, NULL, NEW.ccard_type); END IF; RETURN NEW; END; $$; &DROP FUNCTION public._ccardtrigger(); publicadminfalse83992<12551681686_charasshistorytrigger()FUNCTIONcCREATE FUNCTION _charasshistorytrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF(TG_OP = 'DELETE') THEN IF (OLD.charass_target_type = 'INCDT') THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(OLD.charass_target_id, ('Characteristic ' || COALESCE((SELECT char_name FROM char WHERE (char_id=OLD.charass_char_id)), '') || ' Deleted: "' || COALESCE(OLD.charass_value,'') || '"') ); END IF; RETURN OLD; ELSIF (NEW.charass_target_type = 'INCDT') THEN IF (TG_OP = 'INSERT') THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(NEW.charass_target_id, ('Characteristic ' || COALESCE((SELECT char_name FROM char WHERE (char_id=NEW.charass_char_id)), '') || ' Added: "' || COALESCE(NEW.charass_value,'') || '"') ); ELSIF (TG_OP = 'UPDATE') THEN IF (COALESCE(NEW.charass_value,'') <> COALESCE(OLD.charass_value,'')) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(NEW.charass_target_id, ('Characteristic ' || COALESCE((SELECT char_name FROM char WHERE (char_id=NEW.charass_char_id)), '') || ' Changed: "' || COALESCE(OLD.charass_value,'') || '" -> "' || COALESCE(NEW.charass_value,'') || '"') ); END IF; END IF; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._charasshistorytrigger(); publicadminfalse83992912551681687_charasstrigger()FUNCTIONCREATE FUNCTION _charasstrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NEW.charass_target_type = 'I' AND NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Items.'; END IF; IF (NEW.charass_target_type = 'C' AND NOT checkPrivilege('MaintainCustomerMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Customers.'; END IF; -- Data check IF (NEW.charass_char_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Characteristic ID.'; END IF; -- Default Logic IF (NEW.charass_default) THEN UPDATE charass SET charass_default = false WHERE ((charass_target_id=NEW.charass_target_id) AND (charass_target_type=NEW.charass_target_type) AND (charass_char_id=NEW.charass_char_id) AND (charass_id <> NEW.charass_ID)); END IF; -- Incident update IF (NEW.charass_target_type = 'INCDT') THEN UPDATE incdt SET incdt_updated = now() WHERE incdt_id = NEW.charass_target_id; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._charasstrigger(); publicadminfalse39928B12551681688_charbeforetrigger()FUNCTIONCREATE FUNCTION _charbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainCharacteristics')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Characteristics.'; END IF; RETURN NEW; END; $$; +DROP FUNCTION public._charbeforetrigger(); publicadminfalse83992G12551681689_charopttrigger()FUNCTIONCREATE FUNCTION _charopttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainCharacteristics')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Characteristic options.'; END IF; IF (TG_OP = 'UPDATE') THEN UPDATE charass SET charass_value = NEW.charopt_value WHERE ((charass_char_id=NEW.charopt_char_id) AND (charass_value=OLD.charopt_value)); END IF; IF (TG_OP = 'DELETE') THEN IF (SELECT (count(charass_id) > 0) FROM charass WHERE ((charass_char_id=OLD.charopt_char_id) AND (charass_value=OLD.charopt_value))) THEN RAISE EXCEPTION 'This characteristic option value is in use and can not be deleted.'; END IF; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._charopttrigger(); publicadminfalse83992=12551681690_checkheadbeforetrigger()FUNCTIONCREATE FUNCTION _checkheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _amount NUMERIC; _currrate NUMERIC; BEGIN -- get the base exchange rate for the check date IF (TG_OP = 'INSERT' AND NEW.checkhead_curr_rate IS NULL) THEN SELECT curr_rate INTO _currrate FROM curr_rate WHERE ( (NEW.checkhead_curr_id=curr_id) AND ( NEW.checkhead_checkdate BETWEEN curr_effective AND curr_expires) ); IF (FOUND) THEN NEW.checkhead_curr_rate := _currrate; ELSE RAISE EXCEPTION 'Currency exchange rate not found'; END IF; END IF; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN IF (NOT EXISTS (SELECT checkrecip_id FROM checkrecip WHERE ((checkrecip_type=NEW.checkhead_recip_type) AND (checkrecip_id=NEW.checkhead_recip_id)) )) THEN RAISE EXCEPTION 'Cannot verify recipient for check % (type % id %)', NEW.checkhead_number, NEW.checkhead_recip_type, NEW.checkhead_recip_id; END IF; IF (NEW.checkhead_journalnumber IS NOT NULL AND NOT EXISTS (SELECT jrnluse_number FROM jrnluse WHERE (jrnluse_number=NEW.checkhead_journalnumber)) ) THEN RAISE EXCEPTION 'Journal Number % does not exist and cannot be used for check %.', NEW.checkhead_journalnumber, NEW.checkhead_number; END IF; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._checkheadbeforetrigger(); publicadminfalse83992s12551681691_cmheadbeforetrigger()FUNCTIONCREATE FUNCTION _cmheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _id INTEGER; BEGIN -- Checks -- Start with privileges SELECT checkPrivilege('MaintainCreditMemos') INTO _check; IF ( (TG_OP = 'INSERT') OR (TG_OP = 'DELETE') ) THEN IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Credit Memos.'; END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF ((OLD.cmhead_printed = NEW.cmhead_printed) AND NOT (_check) ) THEN RAISE EXCEPTION 'You do not have privileges to maintain Credit Memos.'; END IF; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM cmheadtax WHERE (taxhist_parent_id=OLD.cmhead_id); RETURN OLD; END IF; IF ( (NEW.cmhead_number IS NULL) OR (LENGTH(NEW.cmhead_number) = 0) ) THEN RAISE EXCEPTION 'You must enter a valid Memo # for this Credit Memo.'; END IF; IF (TG_OP = 'INSERT') THEN SELECT cmhead_id INTO _id FROM cmhead WHERE (cmhead_number=NEW.cmhead_number); IF (FOUND) THEN RAISE EXCEPTION 'The Memo # is already in use.'; END IF; IF (fetchMetricText('CMNumberGeneration') IN ('A','O')) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('CmNumber', NEW.cmhead_number); ELSIF (fetchMetricText('CMNumberGeneration') = 'S') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('SoNumber', NEW.cmhead_number); END IF; END IF; IF (NEW.cmhead_cust_id IS NOT NULL) THEN SELECT cust_id INTO _id FROM custinfo WHERE (cust_id=NEW.cmhead_cust_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'You must enter a valid Customer # for this Credit Memo.'; END IF; END IF; IF ( (NEW.cmhead_misc > 0) AND (NEW.cmhead_misc_accnt_id = -1) ) THEN RAISE EXCEPTION 'You may not enter a Misc. Charge without indicating the G/L Sales Account.'; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._cmheadbeforetrigger(); publicadminfalse83992>12551681692_cmheadtrigger()FUNCTION CREATE FUNCTION _cmheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN -- If this was created by a return, then reset the return IF (OLD.cmhead_rahead_id IS NOT NULL) THEN UPDATE rahead SET rahead_headcredited=false WHERE (rahead_id=OLD.cmhead_rahead_id); DELETE FROM rahist WHERE ((rahist_rahead_id=OLD.cmhead_rahead_id) AND (rahist_source='CM') AND (rahist_source_id=OLD.cmhead_id)); END IF; RETURN OLD; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Freight Tax IF (NEW.cmhead_freight <> 0) THEN PERFORM calculateTaxHist( 'cmheadtax', NEW.cmhead_id, NEW.cmhead_taxzone_id, getFreightTaxtypeId(), NEW.cmhead_docdate, NEW.cmhead_curr_id, NEW.cmhead_freight * -1 ); END IF; END IF; -- Update row IF (TG_OP = 'UPDATE') THEN IF ( (NEW.cmhead_freight <> OLD.cmhead_freight) OR (COALESCE(NEW.cmhead_taxzone_id,-1) <> COALESCE(OLD.cmhead_taxzone_id,-1)) OR (NEW.cmhead_docdate <> OLD.cmhead_docdate) OR (NEW.cmhead_curr_id <> OLD.cmhead_curr_id) ) THEN -- Calculate cmhead Tax PERFORM calculateTaxHist( 'cmheadtax', NEW.cmhead_id, NEW.cmhead_taxzone_id, getFreightTaxtypeId(), NEW.cmhead_docdate, NEW.cmhead_curr_id, NEW.cmhead_freight * -1 ); END IF; IF ( (COALESCE(NEW.cmhead_taxzone_id,-1) <> COALESCE(OLD.cmhead_taxzone_id,-1)) OR (NEW.cmhead_docdate <> OLD.cmhead_docdate) OR (NEW.cmhead_curr_id <> OLD.cmhead_curr_id) ) THEN -- Calculate cmitem Tax IF (COALESCE(NEW.cmhead_taxzone_id,-1) <> COALESCE(OLD.cmhead_taxzone_id,-1)) THEN -- Cmitem trigger will calculate tax UPDATE cmitem SET cmitem_taxtype_id=getItemTaxType(itemsite_item_id,NEW.cmhead_taxzone_id) FROM itemsite WHERE ((itemsite_id=cmitem_itemsite_id) AND (cmitem_cmhead_id=NEW.cmhead_id)); ELSE PERFORM calculateTaxHist( 'cmitemtax', cmitem_id, NEW.cmhead_taxzone_id, cmitem_taxtype_id, NEW.cmhead_docdate, NEW.cmhead_curr_id, (cmitem_qtycredit * cmitem_qty_invuomratio) * (cmitem_unitprice / cmitem_price_invuomratio) * -1) FROM cmitem WHERE (cmitem_cmhead_id = NEW.cmhead_id); END IF; END IF; END IF; RETURN NEW; END; $$; 'DROP FUNCTION public._cmheadtrigger(); publicadminfalse83992?12551681693_cmitembeforetrigger()FUNCTION)CREATE FUNCTION _cmitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _id INTEGER; BEGIN -- Checks -- Start with privileges SELECT checkPrivilege('MaintainCreditMemos') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Credit Memos.'; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM cmitemtax WHERE (taxhist_parent_id=OLD.cmitem_id); RETURN OLD; END IF; IF (TG_OP = 'INSERT') THEN IF ( (NEW.cmitem_qtycredit IS NULL) OR (NEW.cmitem_qtycredit = 0) ) THEN RAISE EXCEPTION 'Quantity to Credit must be greater than zero.'; END IF; SELECT cmitem_id INTO _id FROM cmitem WHERE ( (cmitem_cmhead_id=NEW.cmitem_cmhead_id) AND (cmitem_linenumber=NEW.cmitem_linenumber) ); IF (FOUND) THEN RAISE EXCEPTION 'The Memo Line Number is already in use.'; END IF; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._cmitembeforetrigger(); publicadminfalse83992@12551681694_cmitemtrigger()FUNCTION CREATE FUNCTION _cmitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ext NUMERIC; _r RECORD; BEGIN IF (TG_OP = 'DELETE') THEN -- If this was created by a return, reset return values IF (OLD.cmitem_raitem_id) IS NOT NULL THEN _ext := ROUND((OLD.cmitem_qtycredit * OLD.cmitem_qty_invuomratio) * (OLD.cmitem_unitprice / OLD.cmitem_price_invuomratio),2); UPDATE raitem SET raitem_status = 'O', raitem_qtycredited = raitem_qtycredited-OLD.cmitem_qtycredit, raitem_amtcredited = raitem_amtcredited-_ext WHERE (raitem_id=OLD.cmitem_raitem_id); END IF; RETURN OLD; END IF; -- Cache Credit Memo Head SELECT * INTO _r FROM cmhead WHERE (cmhead_id=NEW.cmitem_cmhead_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Credit Memo head not found'; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Tax PERFORM calculateTaxHist( 'cmitemtax', NEW.cmitem_id, COALESCE(_r.cmhead_taxzone_id, -1), NEW.cmitem_taxtype_id, COALESCE(_r.cmhead_docdate, CURRENT_DATE), COALESCE(_r.cmhead_curr_id, -1), (NEW.cmitem_qtycredit * NEW.cmitem_qty_invuomratio) * (NEW.cmitem_unitprice / NEW.cmitem_price_invuomratio) * -1); END IF; -- Update row IF (TG_OP = 'UPDATE') THEN -- Calculate Tax IF ( (NEW.cmitem_qtycredit <> OLD.cmitem_qtycredit) OR (NEW.cmitem_qty_invuomratio <> OLD.cmitem_qty_invuomratio) OR (NEW.cmitem_unitprice <> OLD.cmitem_unitprice) OR (NEW.cmitem_price_invuomratio <> OLD.cmitem_price_invuomratio) OR (COALESCE(NEW.cmitem_taxtype_id, -1) <> COALESCE(OLD.cmitem_taxtype_id, -1)) ) THEN PERFORM calculateTaxHist( 'cmitemtax', NEW.cmitem_id, COALESCE(_r.cmhead_taxzone_id, -1), NEW.cmitem_taxtype_id, COALESCE(_r.cmhead_docdate, CURRENT_DATE), COALESCE(_r.cmhead_curr_id, -1), (NEW.cmitem_qtycredit * NEW.cmitem_qty_invuomratio) * (NEW.cmitem_unitprice / NEW.cmitem_price_invuomratio) * -1); END IF; END IF; RETURN NEW; END; $$; 'DROP FUNCTION public._cmitemtrigger(); publicadminfalse83992C12551681695_cntcttrigger()FUNCTION.CREATE FUNCTION _cntcttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN NEW.cntct_name := formatCntctName(NULL, NEW.cntct_first_name, NEW.cntct_middle, NEW.cntct_last_name, NEW.cntct_suffix); NEW.cntct_email := lower(NEW.cntct_email); IF (TG_OP = 'INSERT') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('ContactNumber', NEW.cntct_number); END IF; RETURN NEW; END; $$; &DROP FUNCTION public._cntcttrigger(); publicadminfalse83992E12551681696_cntcttriggerafter()FUNCTIONtCREATE FUNCTION _cntcttriggerafter() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cntctemlid INTEGER; _rows INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN IF(length(coalesce(NEW.cntct_email,'')) > 0) THEN INSERT INTO cntcteml ( cntcteml_cntct_id, cntcteml_primary, cntcteml_email ) VALUES ( NEW.cntct_id, true, NEW.cntct_email ); END IF; PERFORM postComment('ChangeLog', 'T', NEW.cntct_id, ('Created by ' || getEffectiveXtUser())); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.cntct_email != NEW.cntct_email) THEN SELECT cntcteml_id INTO _cntctemlid FROM cntcteml WHERE ((cntcteml_cntct_id=NEW.cntct_id) AND (cntcteml_email=NEW.cntct_email)); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0) THEN UPDATE cntcteml SET cntcteml_primary=false WHERE ((cntcteml_cntct_id=NEW.cntct_id) AND (cntcteml_primary=true)); INSERT INTO cntcteml ( cntcteml_cntct_id, cntcteml_primary, cntcteml_email ) VALUES ( NEW.cntct_id, true, NEW.cntct_email ); ELSE UPDATE cntcteml SET cntcteml_primary=false WHERE ((cntcteml_cntct_id=NEW.cntct_id) AND (cntcteml_primary=true)); UPDATE cntcteml SET cntcteml_primary=true WHERE (cntcteml_id=_cntctemlid); END IF; END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM comment WHERE (comment_source_id=OLD.cntct_id AND comment_source = 'T'); DELETE FROM docass WHERE (docass_source_id=OLD.cntct_id AND docass_source_type = 'T') OR (docass_target_id=OLD.cntct_id AND docass_target_type = 'T'); RETURN OLD; END IF; RETURN NEW; END; $$; +DROP FUNCTION public._cntcttriggerafter(); publicadminfalse83992D12551681697_cntcttriggerbeforedelete()FUNCTION$CREATE FUNCTION _cntcttriggerbeforedelete() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM cntctaddr WHERE cntctaddr_cntct_id=OLD.cntct_id; DELETE FROM cntctdata WHERE cntctdata_cntct_id=OLD.cntct_id; DELETE FROM cntcteml WHERE cntcteml_cntct_id=OLD.cntct_id; DELETE FROM docass WHERE docass_source_id = OLD.cntct_id AND docass_source_type = 'T'; DELETE FROM docass WHERE docass_target_id = OLD.cntct_id AND docass_target_type = 'T'; -- these have denormalized cntct info so it should be ok to update them UPDATE cohead SET cohead_billto_cntct_id=NULL WHERE cohead_billto_cntct_id=OLD.cntct_id; UPDATE cohead SET cohead_shipto_cntct_id=NULL WHERE cohead_shipto_cntct_id=OLD.cntct_id; UPDATE pohead SET pohead_vend_cntct_id=NULL WHERE pohead_vend_cntct_id=OLD.cntct_id; UPDATE pohead SET pohead_shipto_cntct_id=NULL WHERE pohead_shipto_cntct_id=OLD.cntct_id; UPDATE quhead SET quhead_billto_cntct_id=NULL WHERE quhead_billto_cntct_id=OLD.cntct_id; UPDATE quhead SET quhead_shipto_cntct_id=NULL WHERE quhead_shipto_cntct_id=OLD.cntct_id; IF (fetchMetricBool('MultiWhs')) THEN UPDATE tohead SET tohead_destcntct_id=NULL WHERE tohead_destcntct_id=OLD.cntct_id; UPDATE tohead SET tohead_srccntct_id=NULL WHERE tohead_srccntct_id=OLD.cntct_id; END IF; END IF; RETURN OLD; END; $$; 2DROP FUNCTION public._cntcttriggerbeforedelete(); publicadminfalse83992F12551681698_cntsliptrigger()FUNCTIONuCREATE FUNCTION _cntsliptrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _p RECORD; _comments TEXT; _temp TEXT; BEGIN IF (TG_OP = 'DELETE') THEN SELECT itemsite_loccntrl, itemsite_controlmethod, cntslip_posted, cntslip_lotserial, cntslip_comments, cntslip_number, cntslip_qty INTO _p FROM cntslip, invcnt, itemsite WHERE ( (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id) AND (cntslip_id=OLD.cntslip_id) ); IF(_p.cntslip_posted) THEN SELECT ( ' Count Slip #' || _p.cntslip_number || ' deleted ' || formatQty(_p.cntslip_qty) ) INTO _comments; -- Add the Location name if the itemsite is MLC IF (_p.itemsite_loccntrl) THEN SELECT ( ', Location:' || location_name ) INTO _temp FROM location, cntslip WHERE ( (cntslip_location_id=location_id) AND (cntslip_id=OLD.cntslip_id) ); _comments := (_comments || _temp); END IF; -- Add the Lot/Serial if the itemsite is Lot or Serial controlled IF (_p.itemsite_controlmethod = 'L') THEN _comments := (_comments || ( ', Lot #:' || _p.cntslip_lotserial)); ELSIF (_p.itemsite_controlmethod = 'S') THEN _comments := (_comments || ( ', Serial #:' || _p.cntslip_lotserial)); END IF; _comments := (_comments || ' ' || _p.cntslip_comments); UPDATE invcnt SET invcnt_qoh_after = ( COALESCE(invcnt_qoh_after, 0) - cntslip_qty), invcnt_comments = (invcnt_comments || _comments) FROM cntslip WHERE ( (cntslip_cnttag_id=invcnt_id) AND (NOT invcnt_posted) AND (cntslip_id=OLD.cntslip_id) ); END IF; RETURN OLD; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._cntsliptrigger(); publicadminfalse83992z12551681699_cobillbeforetrigger()FUNCTION|CREATE FUNCTION _cobillbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM cobilltax WHERE (taxhist_parent_id=OLD.cobill_id); RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._cobillbeforetrigger(); publicadminfalse8399212551681700_cobilltrigger()FUNCTIONCREATE FUNCTION _cobilltrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; -- Cache Billing Head SELECT * INTO _r FROM cobmisc WHERE (cobmisc_id=NEW.cobill_cobmisc_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Billing head not found'; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Tax PERFORM calculateTaxHist( 'cobilltax', NEW.cobill_id, COALESCE(_r.cobmisc_taxzone_id, -1), NEW.cobill_taxtype_id, COALESCE(_r.cobmisc_shipdate, CURRENT_DATE), COALESCE(_r.cobmisc_curr_id, -1), (NEW.cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ) FROM coitem WHERE (coitem_id=NEW.cobill_coitem_id); END IF; -- Update row IF (TG_OP = 'UPDATE') THEN -- Calculate Tax IF ( (NEW.cobill_qty <> OLD.cobill_qty) OR (NEW.cobill_taxtype_id <> OLD.cobill_taxtype_id) ) THEN PERFORM calculateTaxHist( 'cobilltax', NEW.cobill_id, COALESCE(_r.cobmisc_taxzone_id, -1), NEW.cobill_taxtype_id, COALESCE(_r.cobmisc_shipdate, CURRENT_DATE), COALESCE(_r.cobmisc_curr_id, -1), (NEW.cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ) FROM coitem WHERE (coitem_id=NEW.cobill_coitem_id); END IF; END IF; RETURN NEW; END; $$; 'DROP FUNCTION public._cobilltrigger(); publicadminfalse8399212551681701_cobmiscbeforetrigger()FUNCTIONCREATE FUNCTION _cobmiscbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM cobmisctax WHERE (taxhist_parent_id=OLD.cobmisc_id); RETURN OLD; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._cobmiscbeforetrigger(); publicadminfalse83992H12551681702_cobmisctrigger()FUNCTION CREATE FUNCTION _cobmisctrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN -- Something can go here RETURN OLD; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Freight Tax IF (NEW.cobmisc_freight <> 0) THEN PERFORM calculateTaxHist( 'cobmisctax', NEW.cobmisc_id, NEW.cobmisc_taxzone_id, getFreightTaxtypeId(), NEW.cobmisc_invcdate, NEW.cobmisc_curr_id, NEW.cobmisc_freight ); END IF; END IF; -- Update row IF (TG_OP = 'UPDATE') THEN -- Calculate Tax IF (COALESCE(NEW.cobmisc_taxzone_id,-1) <> COALESCE(OLD.cobmisc_taxzone_id,-1)) THEN UPDATE cobill SET cobill_taxtype_id=getItemTaxType(itemsite_item_id,NEW.cobmisc_taxzone_id) FROM coitem JOIN itemsite ON (coitem_itemsite_id=itemsite_id) WHERE ((coitem_id=cobill_coitem_id) AND (cobill_cobmisc_id=NEW.cobmisc_id)); END IF; IF ( (NEW.cobmisc_freight <> OLD.cobmisc_freight) OR (COALESCE(NEW.cobmisc_taxzone_id,-1) <> COALESCE(OLD.cobmisc_taxzone_id,-1)) OR (NEW.cobmisc_invcdate <> OLD.cobmisc_invcdate) OR (NEW.cobmisc_curr_id <> OLD.cobmisc_curr_id) ) THEN PERFORM calculateTaxHist( 'cobmisctax', NEW.cobmisc_id, NEW.cobmisc_taxzone_id, getFreightTaxtypeId(), NEW.cobmisc_invcdate, NEW.cobmisc_curr_id, NEW.cobmisc_freight ); PERFORM calculateTaxHist( 'cobilltax', cobill_id, NEW.cobmisc_taxzone_id, cobill_taxtype_id, NEW.cobmisc_invcdate, NEW.cobmisc_curr_id, (cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ) FROM cobill JOIN coitem ON (coitem_id = cobill_coitem_id) WHERE (cobill_cobmisc_id = NEW.cobmisc_id); END IF; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._cobmisctrigger(); publicadminfalse83992O12551681703_commenttrigger()FUNCTIONCREATE FUNCTION _commenttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NEW.comment_cmnttype_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Comment Type ID.'; ELSIF (NEW.comment_source = 'INCDT') THEN UPDATE incdt SET incdt_updated = now() WHERE incdt_id = NEW.comment_source_id; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._commenttrigger(); publicadminfalse83992T12551681704_companytrigger()FUNCTIONCREATE FUNCTION _companytrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _used BOOLEAN := false; BEGIN IF (NEW.company_external AND NOT OLD.company_external) THEN IF EXISTS(SELECT accnt_id FROM accnt, company, ( SELECT DISTINCT apaccnt_ap_accnt_id AS test_accnt_id FROM apaccnt UNION SELECT DISTINCT apaccnt_discount_accnt_id FROM apaccnt UNION SELECT DISTINCT apaccnt_prepaid_accnt_id FROM apaccnt UNION SELECT DISTINCT apopen_accnt_id FROM apopen UNION SELECT DISTINCT araccnt_ar_accnt_id FROM araccnt UNION SELECT DISTINCT araccnt_deferred_accnt_id FROM araccnt UNION SELECT DISTINCT araccnt_freight_accnt_id FROM araccnt UNION SELECT DISTINCT araccnt_prepaid_accnt_id FROM araccnt UNION SELECT DISTINCT aropen_accnt_id FROM aropen UNION SELECT DISTINCT bankaccnt_accnt_id FROM bankaccnt UNION SELECT DISTINCT bankaccnt_rec_accnt_id FROM bankaccnt UNION SELECT DISTINCT budgitem_accnt_id FROM budgitem UNION SELECT DISTINCT cashrcptmisc_accnt_id FROM cashrcptmisc UNION SELECT DISTINCT cmhead_misc_accnt_id FROM cmhead UNION SELECT DISTINCT cobmisc_misc_accnt_id FROM cobmisc UNION SELECT DISTINCT cohead_misc_accnt_id FROM cohead UNION SELECT DISTINCT coitem_cos_accnt_id FROM coitem UNION SELECT DISTINCT costcat_adjustment_accnt_id FROM costcat UNION SELECT DISTINCT costcat_asset_accnt_id FROM costcat UNION SELECT DISTINCT costcat_freight_accnt_id FROM costcat UNION SELECT DISTINCT costcat_invcost_accnt_id FROM costcat UNION SELECT DISTINCT costcat_laboroverhead_accnt_id FROM costcat UNION SELECT DISTINCT costcat_liability_accnt_id FROM costcat UNION SELECT DISTINCT costcat_matusage_accnt_id FROM costcat UNION SELECT DISTINCT costcat_mfgscrap_accnt_id FROM costcat UNION SELECT DISTINCT costcat_purchprice_accnt_id FROM costcat UNION SELECT DISTINCT costcat_scrap_accnt_id FROM costcat UNION SELECT DISTINCT costcat_shipasset_accnt_id FROM costcat UNION SELECT DISTINCT costcat_toliability_accnt_id FROM costcat UNION SELECT DISTINCT costcat_transform_accnt_id FROM costcat UNION SELECT DISTINCT costcat_wip_accnt_id FROM costcat UNION SELECT DISTINCT costelem_exp_accnt_id FROM costelem UNION SELECT DISTINCT expcat_exp_accnt_id FROM expcat UNION SELECT DISTINCT expcat_freight_accnt_id FROM expcat UNION SELECT DISTINCT expcat_liability_accnt_id FROM expcat UNION SELECT DISTINCT expcat_purchprice_accnt_id FROM expcat UNION SELECT DISTINCT glseries_accnt_id FROM glseries UNION SELECT DISTINCT gltrans_accnt_id FROM gltrans UNION SELECT DISTINCT invchead_misc_accnt_id FROM invchead UNION SELECT DISTINCT quhead_misc_accnt_id FROM quhead UNION SELECT DISTINCT salesaccnt_cor_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_cos_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_cow_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_credit_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_returns_accnt_id FROM salesaccnt UNION SELECT DISTINCT salesaccnt_sales_accnt_id FROM salesaccnt UNION SELECT DISTINCT salescat_ar_accnt_id FROM salescat UNION SELECT DISTINCT salescat_prepaid_accnt_id FROM salescat UNION SELECT DISTINCT salescat_sales_accnt_id FROM salescat UNION SELECT DISTINCT stdjrnlitem_accnt_id FROM stdjrnlitem UNION SELECT DISTINCT tax_sales_accnt_id FROM tax UNION SELECT DISTINCT taxauth_accnt_id FROM taxauth UNION SELECT DISTINCT vodist_accnt_id FROM vodist UNION SELECT DISTINCT warehous_default_accnt_id FROM whsinfo ) AS dummy WHERE ((accnt_id=test_accnt_id) AND (accnt_company=company_number) AND (accnt_company=NEW.company_number)) ) THEN RAISE EXCEPTION 'Cannot make Company % External because it is used in the local database.', NEW.company_number; ELSIF (fetchMetricBool('EnableReturnAuth')) THEN IF EXISTS(SELECT accnt_id FROM accnt, company, ( SELECT DISTINCT rahead_misc_accnt_id AS test_accnt_id FROM rahead UNION SELECT DISTINCT raitem_cos_accnt_id FROM raitem ) AS dummy WHERE ((accnt_id=test_accnt_id) AND (accnt_company=company_number) AND (accnt_company=NEW.company_number)) ) THEN RAISE EXCEPTION 'Cannot make Company % External because it is used in the local database.', NEW.company_number; END IF; END IF; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._companytrigger(); publicadminfalse83992U12551758361_contrctaftertrigger()FUNCTIONCREATE FUNCTION _contrctaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN -- synchronize contract effectivity with item source effectivity IF (NEW.contrct_effective <> OLD.contrct_effective) THEN UPDATE itemsrc SET itemsrc_effective=NEW.contrct_effective WHERE itemsrc_contrct_id=NEW.contrct_id; END IF; IF (NEW.contrct_expires <> OLD.contrct_expires) THEN UPDATE itemsrc SET itemsrc_expires=NEW.contrct_expires WHERE itemsrc_contrct_id=NEW.contrct_id; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._contrctaftertrigger(); publicadminfalse8399212551681705_crmacctaftertrigger()FUNCTIONQCREATE FUNCTION _crmacctaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _gotpriv BOOLEAN; BEGIN /* update _number and _name separately to propagate just what changed. the priv manipulation allows targeted updates of crmaccount-maintained data (note: grantPriv() == false if the user already had the priv, true if this call granted the priv). */ IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN IF (NEW.crmacct_cust_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainCustomerMasters'); UPDATE custinfo SET cust_number = NEW.crmacct_number WHERE ((cust_id=NEW.crmacct_cust_id) AND (cust_number!=NEW.crmacct_number)); UPDATE custinfo SET cust_name = NEW.crmacct_name WHERE ((cust_id=NEW.crmacct_cust_id) AND (cust_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainCustomerMasters'); END IF; END IF; IF (NEW.crmacct_emp_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainEmployees'); UPDATE emp SET emp_code = NEW.crmacct_number WHERE ((emp_id=NEW.crmacct_emp_id) AND (emp_code!=NEW.crmacct_number)); UPDATE emp SET emp_name = NEW.crmacct_name WHERE ((emp_id=NEW.crmacct_emp_id) AND (emp_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainEmployees'); END IF; END IF; IF (NEW.crmacct_prospect_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainProspectMasters'); UPDATE prospect SET prospect_number = NEW.crmacct_number WHERE ((prospect_id=NEW.crmacct_prospect_id) AND (prospect_number!=NEW.crmacct_number)); UPDATE prospect SET prospect_name = NEW.crmacct_name WHERE ((prospect_id=NEW.crmacct_prospect_id) AND (prospect_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainProspectMasters'); END IF; END IF; IF (NEW.crmacct_salesrep_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainSalesReps'); UPDATE salesrep SET salesrep_number = NEW.crmacct_number WHERE ((salesrep_id=NEW.crmacct_salesrep_id) AND (salesrep_number!=NEW.crmacct_number)); UPDATE salesrep SET salesrep_name = NEW.crmacct_name WHERE ((salesrep_id=NEW.crmacct_salesrep_id) AND (salesrep_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainSalesReps'); END IF; END IF; IF (NEW.crmacct_taxauth_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainTaxAuthorities'); UPDATE taxauth SET taxauth_code = NEW.crmacct_number WHERE ((taxauth_id=NEW.crmacct_taxauth_id) AND (taxauth_code!=NEW.crmacct_number)); UPDATE taxauth SET taxauth_name = NEW.crmacct_name WHERE ((taxauth_id=NEW.crmacct_taxauth_id) AND (taxauth_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainTaxAuthorities'); END IF; END IF; IF (NEW.crmacct_vend_id IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainVendors'); UPDATE vendinfo SET vend_number = NEW.crmacct_number WHERE ((vend_id=NEW.crmacct_vend_id) AND (vend_number!=NEW.crmacct_number)); UPDATE vendinfo SET vend_name = NEW.crmacct_name WHERE ((vend_id=NEW.crmacct_vend_id) AND (vend_name!=NEW.crmacct_name)); IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainVendors'); END IF; END IF; -- Link Primary and Secondary Contacts to this Account if they are not already IF (NEW.crmacct_cntct_id_1 IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainAllContacts'); UPDATE cntct SET cntct_crmacct_id = NEW.crmacct_id WHERE cntct_id=NEW.crmacct_cntct_id_1; IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainAllContacts'); END IF; END IF; IF (NEW.crmacct_cntct_id_2 IS NOT NULL) THEN _gotpriv := grantPriv(getEffectiveXtUser(), 'MaintainAllContacts'); UPDATE cntct SET cntct_crmacct_id = NEW.crmacct_id WHERE cntct_id=NEW.crmacct_cntct_id_2; IF (_gotpriv) THEN PERFORM revokePriv(getEffectiveXtUser(), 'MaintainAllContacts'); END IF; END IF; -- cannot have fkey references to system catalogs so enforce them here IF (NEW.crmacct_usr_username IS NOT NULL) THEN IF (NOT EXISTS(SELECT usr_username FROM usr WHERE usr_username=NEW.crmacct_usr_username)) THEN RAISE EXCEPTION 'User % does not exist so this CRM Account Number is invalid.', NEW.crmacct_usr_username; END IF; IF (TG_OP = 'UPDATE') THEN -- reminder: this evaluates to false if either is NULL IF (NEW.crmacct_usr_username != OLD.crmacct_usr_username) THEN RAISE EXCEPTION 'Cannot change the user name for %', OLD.crmacct_usr_username; END IF; END IF; UPDATE usrpref SET usrpref_value = NEW.crmacct_name WHERE ((usrpref_username=NEW.crmacct_usr_username) AND (usrpref_name='propername') AND (usrpref_value!=NEW.crmacct_name)); END IF; ELSIF (TG_OP = 'DELETE') THEN IF (OLD.crmacct_cust_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Customer [xtuple: deleteCrmAccount, -1]'; END IF; IF (OLD.crmacct_emp_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is an Employee [xtuple: deleteCrmAccount, -7]'; END IF; IF (OLD.crmacct_prospect_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Prospect [xtuple: deleteCrmAccount, -3]'; END IF; DELETE FROM salesrep WHERE salesrep_id = OLD.crmacct_salesrep_id; IF (OLD.crmacct_salesrep_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Sales Rep [xtuple: deleteCrmAccount, -6]'; END IF; IF (OLD.crmacct_taxauth_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Tax Authority [xtuple: deleteCrmAccount, -5]'; END IF; IF (EXISTS(SELECT usename FROM pg_user WHERE usename=OLD.crmacct_usr_username)) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a User [xtuple: deleteCrmAccount, -8]'; END IF; IF (OLD.crmacct_vend_id IS NOT NULL) THEN RAISE EXCEPTION 'Cannot delete CRM Account because it is a Vendor [xtuple: deleteCrmAccount, -2]'; END IF; DELETE FROM imageass WHERE (imageass_source_id=OLD.crmacct_id) AND (imageass_source='CRMA'); DELETE FROM url WHERE (url_source_id=OLD.crmacct_id) AND (url_source='CRMA'); END IF; SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'CRMA', NEW.crmacct_id, ('Created by ' || getEffectiveXtUser())); ELSIF (TG_OP = 'DELETE') THEN PERFORM postComment(_cmnttypeid, 'CRMA', OLD.crmacct_id, 'Deleted "' || OLD.crmacct_number || '"'); END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._crmacctaftertrigger(); publicadminfalse83992V12551681707_crmacctbeforetrigger()FUNCTIONCREATE FUNCTION _crmacctbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _count INTEGER; BEGIN -- disallow reusing crmacct_numbers IF (TG_OP IN ('INSERT', 'UPDATE')) THEN IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.crmacct_number); END IF; NEW.crmacct_usr_username := LOWER(TRIM(NEW.crmacct_usr_username)); IF (NEW.crmacct_usr_username = '') THEN NEW.crmacct_usr_username = NULL; END IF; NEW.crmacct_owner_username := LOWER(TRIM(NEW.crmacct_owner_username)); IF (COALESCE(NEW.crmacct_owner_username, '') = '') THEN NEW.crmacct_owner_username = getEffectiveXtUser(); END IF; IF (NEW.crmacct_competitor_id < 0) THEN NEW.crmacct_competitor_id := NULL; END IF; IF (NEW.crmacct_partner_id < 0) THEN NEW.crmacct_partner_id := NULL; END IF; NEW.crmacct_number = UPPER(NEW.crmacct_number); IF (TG_OP = 'UPDATE') THEN -- TODO: why not ALTER USER OLD.crmacct_number RENAME TO LOWER(NEW.crmacct_number)? IF (NEW.crmacct_number != UPPER(OLD.crmacct_number) AND NEW.crmacct_usr_username IS NOT NULL AND UPPER(NEW.crmacct_usr_username) != NEW.crmacct_number) THEN RAISE EXCEPTION 'The CRM Account % is associated with a system User so the number cannot be changed.', NEW.crmacct_number; END IF; END IF; ELSIF (TG_OP = 'DELETE') THEN UPDATE cntct SET cntct_crmacct_id = NULL WHERE cntct_crmacct_id = OLD.crmacct_id; DELETE FROM docass WHERE docass_source_id = OLD.crmacct_id AND docass_source_type = 'CRMA'; DELETE FROM docass WHERE docass_target_id = OLD.crmacct_id AND docass_target_type = 'CRMA'; GET DIAGNOSTICS _count = ROW_COUNT; RAISE DEBUG 'updated % contacts', _count; RETURN OLD; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._crmacctbeforetrigger(); publicadminfalse3992812551681708_custaftertrigger()FUNCTIONCREATE FUNCTION _custaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _whsId INTEGER := -1; BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_cust_id=NEW.cust_id, crmacct_name=NEW.cust_name, crmacct_prospect_id=NULL WHERE crmacct_number=NEW.cust_number; IF (FOUND) THEN DELETE FROM prospect WHERE prospect_id=NEW.cust_id; EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_cust_id, crmacct_cntct_id_1, crmacct_cntct_id_2 ) VALUES (NEW.cust_number, NEW.cust_name, NEW.cust_active, 'O', NEW.cust_id, NEW.cust_cntct_id, NEW.cust_corrcntct_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; PERFORM updateCharAssignment('C', NEW.cust_id, char_id, charass_value) FROM custtype JOIN charass ON (custtype_id=charass_target_id AND charass_target_type='CT') JOIN char ON (charass_char_id=char_id) WHERE ((custtype_id=NEW.cust_custtype_id) AND (custtype_char) AND (charass_default)); ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.cust_number WHERE ((crmacct_cust_id=NEW.cust_id) AND (crmacct_number!=NEW.cust_number)); UPDATE crmacct SET crmacct_name = NEW.cust_name WHERE ((crmacct_cust_id=NEW.cust_id) AND (crmacct_name!=NEW.cust_name)); END IF; IF (TG_OP = 'INSERT') THEN -- find the warehouse for which to create evntlog entries SELECT usrpref_value INTO _whsId FROM usrpref WHERE usrpref_username = getEffectiveXtUser() AND usrpref_name = 'PreferredWarehouse'; INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT DISTINCT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'C', NEW.cust_id, _whsId, NEW.cust_number FROM evntnot, evnttype WHERE ((evntnot_evnttype_id=evnttype_id) AND (evnttype_name='NewCustomer')); END IF; IF (fetchMetricBool('CustomerChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.cust_number <> NEW.cust_number) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.cust_id, ('Number changed from "' || OLD.cust_number || '" to "' || NEW.cust_number || '"') ); END IF; IF (OLD.cust_name <> NEW.cust_name) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.cust_id, ('Name changed from "' || OLD.cust_name || '" to "' || NEW.cust_name || '"') ); END IF; IF (OLD.cust_active <> NEW.cust_active) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, CASE WHEN NEW.cust_active THEN 'Activated' ELSE 'Deactivated' END); END IF; IF (OLD.cust_discntprcnt <> NEW.cust_discntprcnt) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Discount changed from "' || formatprcnt(OLD.cust_discntprcnt) || '%" to "' || formatprcnt(NEW.cust_discntprcnt) || '%"') ); END IF; IF (OLD.cust_creditlmt <> NEW.cust_creditlmt) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Credit Limit changed from ' || formatMoney(OLD.cust_creditlmt) || ' to ' || formatMoney(NEW.cust_creditlmt))); END IF; IF (OLD.cust_creditstatus <> NEW.cust_creditstatus) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Credit Status Changed from "' || CASE OLD.cust_creditstatus WHEN 'G' THEN 'In Good Standing' WHEN 'W' THEN 'Credit Warning' WHEN 'H' THEN 'Credit Hold' ELSE 'Unknown/Error' END || '" to "' || CASE NEW.cust_creditstatus WHEN 'G' THEN 'In Good Standing' WHEN 'W' THEN 'Credit Warning' WHEN 'H' THEN 'Credit Hold' ELSE 'Unknown/Error' END || '"') ); END IF; IF (OLD.cust_custtype_id <> NEW.cust_custtype_id) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Customer type changed from "' || (SELECT custtype_code FROM custtype WHERE custtype_id = OLD.cust_custtype_id) || '" to "' || (SELECT custtype_code FROM custtype WHERE custtype_id = NEW.cust_custtype_id) || '"') ); END IF; IF (COALESCE(OLD.cust_gracedays,-1) <> COALESCE(NEW.cust_gracedays,-1)) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Grace Days changed from "' || COALESCE(TEXT(OLD.cust_gracedays), 'Default') || '" to "' || COALESCE(TEXT(NEW.cust_gracedays), 'Default') || '"')); END IF; IF (OLD.cust_terms_id <> NEW.cust_terms_id) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.cust_id, ('Terms changed from "' || (SELECT terms_code FROM terms WHERE terms_id = OLD.cust_terms_id) || '" to "' || (SELECT terms_code FROM terms WHERE terms_id = NEW.cust_terms_id) || '"')); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; *DROP FUNCTION public._custaftertrigger(); publicadminfalse83992`12551681710_custinfoafterdeletetrigger()FUNCTIONGCREATE FUNCTION _custinfoafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- handle transitory state when converting customer to prospect IF EXISTS(SELECT quhead_id FROM quhead WHERE (quhead_cust_id=OLD.cust_id) AND NOT EXISTS(SELECT prospect_id FROM prospect WHERE prospect_id=OLD.cust_id)) THEN RAISE EXCEPTION '[xtuple: deleteCustomer, -8]'; END IF; IF EXISTS(SELECT invchead_id FROM invchead WHERE (invchead_cust_id=OLD.cust_id)) THEN RAISE EXCEPTION '[xtuple: deleteCustomer, -7]'; END IF; -- end TODO IF EXISTS(SELECT checkhead_recip_id FROM checkhead WHERE ((checkhead_recip_id=OLD.cust_id) AND (checkhead_recip_type='C'))) THEN RAISE EXCEPTION '[xtuple: deleteCustomer, -6]'; END IF; DELETE FROM taxreg WHERE ((taxreg_rel_type='C') AND (taxreg_rel_id=OLD.cust_id)); DELETE FROM ipsass WHERE (ipsass_cust_id=OLD.cust_id); DELETE FROM docass WHERE docass_source_id = OLD.cust_id AND docass_source_type = 'C'; DELETE FROM docass WHERE docass_target_id = OLD.cust_id AND docass_target_type = 'C'; IF (fetchMetricBool('CustomerChangeLog')) THEN PERFORM postComment(cmnttype_id, 'C', OLD.cust_id, ('Deleted "' || OLD.cust_number || '"')) FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; 4DROP FUNCTION public._custinfoafterdeletetrigger(); publicadminfalse83992^12551681711_custinfobeforedeletetrigger()FUNCTIONCREATE FUNCTION _custinfobeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainCustomerMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Customers.'; END IF; UPDATE crmacct SET crmacct_cust_id = NULL WHERE crmacct_cust_id = OLD.cust_id; RETURN OLD; END; $$; 5DROP FUNCTION public._custinfobeforedeletetrigger(); publicadminfalse39928]12551681712_custtrigger()FUNCTIONCREATE FUNCTION _custtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainCustomerMasters') OR checkPrivilege('PostMiscInvoices')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Customers.'; END IF; IF (NEW.cust_number IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Customer Number.'; END IF; IF (LENGTH(COALESCE(NEW.cust_name,''))=0) THEN RAISE EXCEPTION 'You must supply a valid Customer Name.'; END IF; IF (NEW.cust_custtype_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Customer Type ID.'; END IF; IF (NEW.cust_salesrep_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Sales Rep ID.'; END IF; IF (NEW.cust_terms_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Terms Code ID.'; END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.cust_number); END IF; NEW.cust_number := UPPER(NEW.cust_number); RETURN NEW; END; $$; %DROP FUNCTION public._custtrigger(); publicadminfalse8399212551745159_custtypeafterdeletetrigger()FUNCTIONCREATE FUNCTION _custtypeafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (SELECT fetchMetricValue('DefaultCustType') = OLD.custtype_id) THEN RAISE EXCEPTION 'Cannot delete the default Customer Type [xtuple: custtype, -1, %]', OLD.custtype_code; END IF; RETURN OLD; END; $$; 4DROP FUNCTION public._custtypeafterdeletetrigger(); publicadminfalse83992a12551681713_custtypetrigger()FUNCTIONCREATE FUNCTION _custtypetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _code TEXT; BEGIN -- Checks IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (LENGTH(COALESCE(NEW.custtype_code, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Customer Type Code.'; END IF; SELECT custtype_code INTO _code FROM custtype WHERE ( (UPPER(custtype_code)=UPPER(NEW.custtype_code)) AND (custtype_id<>NEW.custtype_id) ); IF (FOUND) THEN RAISE EXCEPTION 'The Customer Type Code entered cannot be used as it is in use.'; END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._custtypetrigger(); publicadminfalse83992b12551681714_docasstrigger()FUNCTIONwCREATE FUNCTION _docasstrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NEW.docass_source_type = 'INCDT') THEN UPDATE incdt SET incdt_updated = now() WHERE incdt_id = NEW.docass_source_id; END IF; RETURN NEW; END; $$; 'DROP FUNCTION public._docasstrigger(); publicadminfalse83992l12551681715_empafterdeletetrigger()FUNCTIONCREATE FUNCTION _empafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (fetchMetricBool('EmployeeChangeLog')) THEN PERFORM postComment(cmnttype_id, 'EMP', OLD.emp_id, ('Deleted "' || OLD.emp_code || '"')) FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; /DROP FUNCTION public._empafterdeletetrigger(); publicadminfalse83992d12551681716_empaftertrigger()FUNCTIONCREATE FUNCTION _empaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _newcrmacctname TEXT; BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_emp_id=NEW.emp_id, crmacct_name=NEW.emp_name WHERE crmacct_number=NEW.emp_code; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_emp_id, crmacct_cntct_id_1 ) VALUES (NEW.emp_code, NEW.emp_name, NEW.emp_active, 'I', NEW.emp_id, NEW.emp_cntct_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; /* TODO: default characteristic assignments based on empgrp? */ ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.emp_code WHERE ((crmacct_emp_id=NEW.emp_id) AND (crmacct_number!=NEW.emp_code)); UPDATE crmacct SET crmacct_name = NEW.emp_name WHERE ((crmacct_emp_id=NEW.emp_id) AND (crmacct_name!=NEW.emp_name)); END IF; IF (fetchMetricBool('EmployeeChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.emp_number <> NEW.emp_number) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, ('Number Changed from "' || OLD.emp_number || '" to "' || NEW.emp_number || '"')); END IF; IF (OLD.emp_code <> NEW.emp_code) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, ('Code Changed from "' || OLD.emp_code || '" to "' || NEW.emp_code || '"')); END IF; IF (OLD.emp_active <> NEW.emp_active) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, CASE WHEN NEW.emp_active THEN 'Activated' ELSE 'Deactivated' END); END IF; IF (COALESCE(OLD.emp_dept_id, -1) <> COALESCE(NEW.emp_dept_id, -1)) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, ('Department Changed from "' || COALESCE((SELECT dept_number FROM dept WHERE dept_id=OLD.emp_dept_id), '') || '" to "' || COALESCE((SELECT dept_number FROM dept WHERE dept_id=NEW.emp_dept_id), '') || '"')); END IF; IF (COALESCE(OLD.emp_shift_id, -1) <> COALESCE(NEW.emp_shift_id, -1)) THEN PERFORM postComment(_cmnttypeid, 'EMP', NEW.emp_id, ('Shift Changed from "' || COALESCE((SELECT shift_number FROM shift WHERE shift_id=OLD.emp_shift_id), '') || '" to "' || COALESCE((SELECT shift_number FROM shift WHERE shift_id=NEW.emp_shift_id), '') || '"')); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._empaftertrigger(); publicadminfalse83992f12551681717_empbeforedeletetrigger()FUNCTIONCREATE FUNCTION _empbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainEmployees')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Employees.'; END IF; UPDATE crmacct SET crmacct_emp_id = NULL WHERE crmacct_emp_id = OLD.emp_id; UPDATE salesrep SET salesrep_emp_id = NULL WHERE salesrep_emp_id = OLD.emp_id; DELETE FROM docass WHERE docass_source_id = OLD.emp_id AND docass_source_type = 'EMP'; DELETE FROM docass WHERE docass_target_id = OLD.emp_id AND docass_target_type = 'EMP'; RETURN OLD; END; $$; 0DROP FUNCTION public._empbeforedeletetrigger(); publicadminfalse83992c12551681718_empbeforetrigger()FUNCTIONCREATE FUNCTION _empbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainEmployees')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Employees.'; END IF; IF (NEW.emp_code IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Employee Code.'; END IF; IF (NEW.emp_number IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Employee Number.'; END IF; IF (NEW.emp_id = NEW.emp_mgr_emp_id) THEN RAISE EXCEPTION 'An Employee may not be his or her own Manager.'; END IF; -- ERROR: cannot use column references in default expression IF (NEW.emp_name IS NULL) THEN NEW.emp_name = COALESCE(formatCntctName(NEW.emp_cntct_id), NEW.emp_number); END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.emp_number); END IF; NEW.emp_code := UPPER(NEW.emp_code); -- deprecated column emp_username IF (TG_OP = 'UPDATE' AND LOWER(NEW.emp_username) != LOWER(NEW.emp_code) AND EXISTS(SELECT 1 FROM crmacct WHERE crmacct_emp_id = NEW.emp_id AND crmacct_usr_username IS NOT NULL)) THEN NEW.emp_username = LOWER(NEW.emp_code); END IF; RETURN NEW; END; $$; *DROP FUNCTION public._empbeforetrigger(); publicadminfalse83992h12551681719_gltransaltertrigger()FUNCTION CREATE FUNCTION _gltransaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _externalCompany BOOLEAN := false; _updated BOOLEAN := false; BEGIN IF(TG_OP='DELETE') THEN RAISE EXCEPTION 'You may not delete G/L Transactions once they have been created.'; ELSIF (TG_OP = 'UPDATE') THEN SELECT company_external INTO _externalCompany FROM company JOIN accnt ON (company_number=accnt_company) WHERE (accnt_id=NEW.gltrans_accnt_id); IF (_externalCompany) THEN RAISE EXCEPTION 'Transactions are not allowed for G/L Accounts with External Company segments.'; END IF; IF(OLD.gltrans_id != NEW.gltrans_id) THEN _updated := true; ELSIF(OLD.gltrans_date != NEW.gltrans_date) THEN _updated := true; ELSIF(OLD.gltrans_accnt_id != NEW.gltrans_accnt_id) THEN _updated := true; ELSIF(OLD.gltrans_amount != NEW.gltrans_amount) THEN _updated := true; ELSIF(OLD.gltrans_username != NEW.gltrans_username) THEN _updated := true; ELSIF( (OLD.gltrans_sequence IS NULL AND NEW.gltrans_sequence IS NOT NULL) OR (OLD.gltrans_sequence IS NOT NULL AND NEW.gltrans_sequence IS NULL) OR (COALESCE(OLD.gltrans_sequence,0) != COALESCE(NEW.gltrans_sequence,0)) ) THEN _updated := true; ELSIF( (OLD.gltrans_created IS NULL AND NEW.gltrans_created IS NOT NULL) OR (OLD.gltrans_created IS NOT NULL AND NEW.gltrans_created IS NULL) OR (COALESCE(OLD.gltrans_created,now()) != COALESCE(NEW.gltrans_created,now())) ) THEN _updated := true; ELSIF( (OLD.gltrans_source IS NULL AND NEW.gltrans_source IS NOT NULL) OR (OLD.gltrans_source IS NOT NULL AND NEW.gltrans_source IS NULL) OR (COALESCE(OLD.gltrans_source,'') != COALESCE(NEW.gltrans_source,'')) ) THEN _updated := true; ELSIF( (OLD.gltrans_docnumber IS NULL AND NEW.gltrans_docnumber IS NOT NULL) OR (OLD.gltrans_docnumber IS NOT NULL AND NEW.gltrans_docnumber IS NULL) OR (COALESCE(OLD.gltrans_docnumber,'') != COALESCE(NEW.gltrans_docnumber,'')) ) THEN _updated := true; ELSIF( (OLD.gltrans_doctype IS NULL AND NEW.gltrans_doctype IS NOT NULL) OR (OLD.gltrans_doctype IS NOT NULL AND NEW.gltrans_doctype IS NULL) OR (COALESCE(OLD.gltrans_doctype,'') != COALESCE(NEW.gltrans_doctype,'')) ) THEN _updated := true; END IF; IF(_updated) THEN RAISE EXCEPTION 'You may not alter some G/L Transaction fields once they have been created.'; END IF; ELSE RAISE EXCEPTION 'trigger for gltrans table called in unexpected state.'; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._gltransaltertrigger(); publicadminfalse83992g12551681720_gltransinserttrigger()FUNCTIONCREATE FUNCTION _gltransinserttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _reqNotes BOOLEAN; _externalCompany BOOLEAN := false; BEGIN -- Checks -- Start with privileges IF ((NEW.gltrans_doctype='JE') AND (NOT checkPrivilege('PostJournalEntries'))) THEN RAISE EXCEPTION 'You do not have privileges to create a Journal Entry.'; END IF; SELECT company_external INTO _externalCompany FROM company JOIN accnt ON (company_number=accnt_company) WHERE (accnt_id=NEW.gltrans_accnt_id); IF (_externalCompany) THEN RAISE EXCEPTION 'Transactions are not allowed for G/L Accounts with External Company segments.'; END IF; -- RAISE NOTICE '_gltransInsertTrigger(): company_external = %', _externalCompany; SELECT metric_value='t' INTO _reqNotes FROM metric WHERE(metric_name='MandatoryGLEntryNotes'); IF (_reqNotes IS NULL) THEN _reqNotes := false; END IF; IF ((NEW.gltrans_doctype='JE') AND _reqNotes AND (TRIM(BOTH FROM COALESCE(NEW.gltrans_notes,''))='')) THEN RAISE EXCEPTION 'Notes are required for Journal Entries.'; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._gltransinserttrigger(); publicadminfalse83992i12551681721_grpprivtrigger()FUNCTION?CREATE FUNCTION _grpprivtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _returnVal INTEGER; BEGIN -- This looks like a candidate for a foreign key but isn't. -- fkeys don't work if the foreign key value resides in a child of the -- table and not the table itself. IF ((TG_OP = 'UPDATE' OR TG_OP = 'INSERT') AND (NOT EXISTS(SELECT priv_id FROM priv WHERE (priv_id=NEW.grppriv_priv_id)))) THEN RAISE EXCEPTION 'Privilege id % does not exist or is part of a disabled package.', NEW.grppriv_priv_id; RETURN OLD; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._grpprivtrigger(); publicadminfalse8399212551681722_imageasstrigger()FUNCTIONxCREATE FUNCTION _imageasstrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NEW.imageass_source = 'INCDT') THEN UPDATE incdt SET incdt_updated = now() WHERE incdt_id = NEW.imageass_source_id; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._imageasstrigger(); publicadminfalse83992k12551681723_incdtbeforedeletetrigger()FUNCTIONCREATE FUNCTION _incdtbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.incdt_id) AND (recur_parent_type='INCDT')); IF (_recurid IS NOT NULL) THEN SELECT MIN(incdt_id) INTO _newparentid FROM incdt WHERE ((incdt_recurring_incdt_id=OLD.inctd_id) AND (incdt_id!=OLD.incdt_id)); -- client is responsible for warning about deleting a recurring incdt IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; END IF; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; 2DROP FUNCTION public._incdtbeforedeletetrigger(); publicadminfalse83992j12551681724_incdtbeforetrigger()FUNCTIONCREATE FUNCTION _incdtbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _rec RECORD; _check BOOLEAN; _crmacct INTEGER; BEGIN IF(TG_OP = 'DELETE') THEN _rec := OLD; ELSE _rec := NEW; END IF; -- Set the incident number if blank IF (TG_OP = 'INSERT') THEN IF (NEW.incdt_number IS NULL) THEN SELECT fetchIncidentNumber() INTO NEW.incdt_number; END IF; --- clear the number from the issue cache PERFORM clearNumberIssue('IncidentNumber', NEW.incdt_number); END IF; -- Description is required IF (LENGTH(COALESCE(NEW.incdt_summary,''))=0) THEN RAISE EXCEPTION 'You must supply a valid Incident Description.'; END IF; -- CRM Account is required IF (NEW.incdt_crmacct_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid CRM Account.'; END IF; -- Contact is required IF (NEW.incdt_cntct_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Contact.'; END IF; NEW.incdt_updated := now(); RETURN NEW; END; $$; ,DROP FUNCTION public._incdtbeforetrigger(); publicadminfalse8399212551681725_incdttrigger()FUNCTIONCREATE FUNCTION _incdttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _counter INTEGER := 0; _whsId INTEGER := -1; _evntType TEXT; _cmnttypeid INTEGER := -1; _cmntid INTEGER := -1; BEGIN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='Notes to Comment'); IF NOT FOUND OR _cmnttypeid IS NULL THEN _cmnttypeid := -1; END IF; IF (TG_OP = 'DELETE') THEN -- This should never happen RETURN OLD; ELSIF (TG_OP = 'INSERT') THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'N', NULL, 'Incident Added'); _evntType = 'NewIncident'; IF (_cmnttypeid <> -1 AND COALESCE(NEW.incdt_descrip, '') <> '') THEN PERFORM postComment(_cmnttypeid, 'INCDT', NEW.incdt_id, NEW.incdt_descrip); END IF; ELSIF (TG_OP = 'UPDATE') THEN _evntType = 'UpdatedIncident'; IF (COALESCE(NEW.incdt_cntct_id,-1) <> COALESCE(OLD.incdt_cntct_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'C', NEW.incdt_cntct_id, ('Contact Changed: "' || COALESCE((SELECT cntct_first_name || ' ' || cntct_last_name FROM cntct WHERE (cntct_id=OLD.incdt_cntct_id)), '') || '" -> "' || COALESCE((SELECT cntct_first_name || ' ' || cntct_last_name FROM cntct WHERE (cntct_id=NEW.incdt_cntct_id)), '') || '"') ); END IF; IF (COALESCE(NEW.incdt_summary,'') <> COALESCE(OLD.incdt_summary,'')) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(NEW.incdt_id, ('Summary Updated: "' || COALESCE(OLD.incdt_summary, '') || '" -> "' || COALESCE(NEW.incdt_summary, '') || '"') ); END IF; IF (COALESCE(NEW.incdt_descrip,'') <> COALESCE(OLD.incdt_descrip,'')) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_descrip) VALUES(NEW.incdt_id, ('Description Updated: "' || substr(COALESCE(OLD.incdt_descrip, ''), 1, 20) || '..." -> "' || substr(COALESCE(NEW.incdt_descrip, ''), 1, 20) || '..."') ); IF (_cmnttypeid <> -1) THEN -- find an existing comment SELECT comment_id INTO _cmntid FROM comment WHERE comment_source = 'INCDT' AND comment_source_id = NEW.incdt_id AND comment_cmnttype_id = _cmnttypeid; IF FOUND THEN UPDATE comment SET comment_text = NEW.incdt_descrip WHERE comment_id = _cmntid; ELSE PERFORM postComment(_cmnttypeid, 'INCDT', NEW.incdt_id, NEW.incdt_descrip); END IF; END IF; END IF; IF (NEW.incdt_status <> OLD.incdt_status) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'S', NULL, ('Status Changed: ' || CASE WHEN(OLD.incdt_status='N') THEN 'New' WHEN(OLD.incdt_status='F') THEN 'Feedback' WHEN(OLD.incdt_status='C') THEN 'Confirmed' WHEN(OLD.incdt_status='A') THEN 'Assigned' WHEN(OLD.incdt_status='R') THEN 'Resolved' WHEN(OLD.incdt_status='L') THEN 'Closed' ELSE OLD.incdt_status END || ' -> ' || CASE WHEN(NEW.incdt_status='N') THEN 'New' WHEN(NEW.incdt_status='F') THEN 'Feedback' WHEN(NEW.incdt_status='C') THEN 'Confirmed' WHEN(NEW.incdt_status='A') THEN 'Assigned' WHEN(NEW.incdt_status='R') THEN 'Resolved' WHEN(NEW.incdt_status='L') THEN 'Closed' ELSE NEW.incdt_status END ) ); IF (NEW.incdt_status = 'L') THEN _evntType = 'ClosedIncident'; ELSIF (OLD.incdt_status = 'L') THEN _evntType = 'ReopenedIncident'; END IF; END IF; IF (COALESCE(NEW.incdt_assigned_username,'') <> COALESCE(OLD.incdt_assigned_username,'')) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'A', NULL, ('Assigned to: "' || COALESCE(OLD.incdt_assigned_username, '') || '" -> "' || COALESCE(NEW.incdt_assigned_username, '') || '"') ); END IF; IF (COALESCE(NEW.incdt_incdtcat_id,-1) <> COALESCE(OLD.incdt_incdtcat_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'T', NEW.incdt_incdtcat_id, ('Category Changed: ' || COALESCE((SELECT incdtcat_name FROM incdtcat WHERE (incdtcat_id=OLD.incdt_incdtcat_id)), '') || ' -> ' || COALESCE((SELECT incdtcat_name FROM incdtcat WHERE (incdtcat_id=NEW.incdt_incdtcat_id)), '') || '') ); END IF; IF (COALESCE(NEW.incdt_incdtseverity_id,-1) <> COALESCE(OLD.incdt_incdtseverity_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'V', NEW.incdt_incdtseverity_id, ('Severity Changed: ' || COALESCE((SELECT incdtseverity_name FROM incdtseverity WHERE (incdtseverity_id=OLD.incdt_incdtseverity_id)), '') || ' -> ' || COALESCE((SELECT incdtseverity_name FROM incdtseverity WHERE (incdtseverity_id=NEW.incdt_incdtseverity_id)), '') || '') ); END IF; IF (COALESCE(NEW.incdt_incdtpriority_id,-1) <> COALESCE(OLD.incdt_incdtpriority_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'P', NEW.incdt_incdtpriority_id, ('Priority Changed: ' || COALESCE((SELECT incdtpriority_name FROM incdtpriority WHERE (incdtpriority_id=OLD.incdt_incdtpriority_id)), '') || ' -> ' || COALESCE((SELECT incdtpriority_name FROM incdtpriority WHERE (incdtpriority_id=NEW.incdt_incdtpriority_id)), '') || '') ); END IF; IF (COALESCE(NEW.incdt_incdtresolution_id,-1) <> COALESCE(OLD.incdt_incdtresolution_id,-1)) THEN INSERT INTO incdthist (incdthist_incdt_id, incdthist_change, incdthist_target_id, incdthist_descrip) VALUES(NEW.incdt_id, 'E', NEW.incdt_incdtresolution_id, ('Resolution Changed: ' || COALESCE((SELECT incdtresolution_name FROM incdtresolution WHERE (incdtresolution_id=OLD.incdt_incdtresolution_id)), '') || ' -> ' || COALESCE((SELECT incdtresolution_name FROM incdtresolution WHERE (incdtresolution_id=NEW.incdt_incdtresolution_id)), '') || '') ); END IF; END IF; -- find the warehouse for which to create evntlog entries SELECT usrpref_value INTO _whsId FROM usrpref WHERE usrpref_username = getEffectiveXtUser() AND usrpref_name = 'PreferredWarehouse'; INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT DISTINCT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'IC', NEW.incdt_id, _whsId, NEW.incdt_number FROM evntnot, evnttype WHERE ((evntnot_evnttype_id=evnttype_id) AND (evnttype_name=_evntType)); RETURN NEW; END; $$; &DROP FUNCTION public._incdttrigger(); publicadminfalse83992o12551681727_invcheadaftertrigger()FUNCTIONCREATE FUNCTION _invcheadaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _cohead_id INTEGER; BEGIN -- Create a comment entry when on a Sales Order when an Invoice is Posted for that order -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'UPDATE') THEN IF ((OLD.invchead_posted != NEW.invchead_posted) AND NEW.invchead_posted) THEN SELECT cohead_id INTO _cohead_id FROM cohead WHERE (cohead_number = OLD.invchead_ordernumber); IF (FOUND) THEN PERFORM postComment( _cmnttypeid, 'S', _cohead_id, ('Invoice, ' || NEW.invchead_invcnumber || ', posted for this order') ); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._invcheadaftertrigger(); publicadminfalse83992m12551681728_invcheadbeforetrigger()FUNCTIONCREATE FUNCTION _invcheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'UPDATE') THEN IF (OLD.invchead_posted AND ((OLD.invchead_invcnumber != NEW.invchead_invcnumber) OR (OLD.invchead_invcdate != NEW.invchead_invcdate) OR (OLD.invchead_terms_id != NEW.invchead_terms_id) OR (OLD.invchead_salesrep_id != NEW.invchead_salesrep_id) OR (OLD.invchead_commission != NEW.invchead_commission) OR (OLD.invchead_taxzone_id != NEW.invchead_taxzone_id) OR (OLD.invchead_shipchrg_id != NEW.invchead_shipchrg_id) OR (OLD.invchead_prj_id != NEW.invchead_prj_id) OR (OLD.invchead_misc_accnt_id != NEW.invchead_misc_accnt_id) OR (OLD.invchead_misc_amount != NEW.invchead_misc_amount) OR (OLD.invchead_freight != NEW.invchead_freight))) THEN RAISE EXCEPTION 'Edit not allow on Posted Invoice.'; END IF; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM invcheadtax WHERE (taxhist_parent_id=OLD.invchead_id); SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.invchead_id) AND (recur_parent_type='I')); IF (_recurid IS NOT NULL) THEN SELECT invchead_id INTO _newparentid FROM invchead WHERE ((invchead_recurring_invchead_id=OLD.invchead_id) AND (invchead_id!=OLD.invchead_id)) ORDER BY invchead_invcdate LIMIT 1; IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; UPDATE invchead SET invchead_recurring_invchead_id=_newparentid WHERE invchead_recurring_invchead_id=OLD.invchead_id AND invchead_id!=OLD.invchead_id; END IF; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._invcheadbeforetrigger(); publicadminfalse83992n12551681729_invcheadtrigger()FUNCTION CREATE FUNCTION _invcheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN -- Something can go here RETURN OLD; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Freight Tax IF (NEW.invchead_freight <> 0) THEN PERFORM calculateTaxHist( 'invcheadtax', NEW.invchead_id, NEW.invchead_taxzone_id, getFreightTaxtypeId(), NEW.invchead_invcdate, NEW.invchead_curr_id, NEW.invchead_freight ); END IF; --- clear the number from the issue cache PERFORM clearNumberIssue('InvcNumber', NEW.invchead_invcnumber); END IF; -- Update row IF (TG_OP = 'UPDATE') THEN IF ( (NEW.invchead_freight <> OLD.invchead_freight) OR (COALESCE(NEW.invchead_taxzone_id,-1) <> COALESCE(OLD.invchead_taxzone_id,-1)) OR (NEW.invchead_invcdate <> OLD.invchead_invcdate) OR (NEW.invchead_curr_id <> OLD.invchead_curr_id) ) THEN -- Calculate invchead Tax PERFORM calculateTaxHist( 'invcheadtax', NEW.invchead_id, NEW.invchead_taxzone_id, getFreightTaxtypeId(), NEW.invchead_invcdate, NEW.invchead_curr_id, NEW.invchead_freight ); END IF; IF ( (COALESCE(NEW.invchead_taxzone_id,-1) <> COALESCE(OLD.invchead_taxzone_id,-1)) OR (NEW.invchead_invcdate <> OLD.invchead_invcdate) OR (NEW.invchead_curr_id <> OLD.invchead_curr_id) ) THEN -- Calculate invcitem Tax IF (COALESCE(NEW.invchead_taxzone_id,-1) <> COALESCE(OLD.invchead_taxzone_id,-1)) THEN UPDATE invcitem SET invcitem_taxtype_id=getItemTaxType(invcitem_item_id,NEW.invchead_taxzone_id) WHERE (invcitem_invchead_id=NEW.invchead_id); PERFORM calculateTaxHist( 'invcitemtax', invcitem_id, NEW.invchead_taxzone_id, invcitem_taxtype_id, NEW.invchead_invcdate, NEW.invchead_curr_id, (invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio) ) FROM invcitem WHERE (invcitem_invchead_id = NEW.invchead_id); END IF; END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._invcheadtrigger(); publicadminfalse83992p12551681730_invcitembeforetrigger()FUNCTIONCREATE FUNCTION _invcitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _itemfractional BOOLEAN; BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM invcitemtax WHERE (taxhist_parent_id=OLD.invcitem_id); RETURN OLD; END IF; IF (TG_OP IN ('UPDATE','DELETE')) THEN IF (SELECT COUNT(invchead_id) > 0 FROM invchead WHERE ((invchead_id=OLD.invcitem_invchead_id) AND (invchead_posted))) THEN RAISE EXCEPTION 'Edit not allowed on Posted Invoices.'; END IF; END IF; -- If regular Item then enforce item_fractional IF (COALESCE(NEW.invcitem_item_id, -1) <> -1) THEN SELECT itemuomfractionalbyuom(NEW.invcitem_item_id, NEW.invcitem_qty_uom_id) INTO _itemfractional; IF (NOT _itemfractional) THEN IF (TRUNC(NEW.invcitem_ordered) <> NEW.invcitem_ordered) THEN RAISE EXCEPTION 'Item does not support fractional quantities'; END IF; IF (TRUNC(NEW.invcitem_billed) <> NEW.invcitem_billed) THEN RAISE EXCEPTION 'Item does not support fractional quantities'; END IF; END IF; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._invcitembeforetrigger(); publicadminfalse83992q12551681731_invcitemtrigger()FUNCTIONDCREATE FUNCTION _invcitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; -- Cache Invoice Head SELECT * INTO _r FROM invchead WHERE (invchead_id=NEW.invcitem_invchead_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Invoice head not found'; END IF; -- Insert new row IF (TG_OP = 'INSERT') THEN -- Calculate Tax PERFORM calculateTaxHist( 'invcitemtax', NEW.invcitem_id, COALESCE(_r.invchead_taxzone_id, -1), NEW.invcitem_taxtype_id, COALESCE(_r.invchead_invcdate, CURRENT_DATE), COALESCE(_r.invchead_curr_id, -1), (NEW.invcitem_billed * NEW.invcitem_qty_invuomratio) * (NEW.invcitem_price / NEW.invcitem_price_invuomratio) ); END IF; -- Update row IF (TG_OP = 'UPDATE') THEN -- Calculate Tax IF ( (NEW.invcitem_billed <> OLD.invcitem_billed) OR (NEW.invcitem_qty_invuomratio <> OLD.invcitem_qty_invuomratio) OR (NEW.invcitem_price <> OLD.invcitem_price) OR (NEW.invcitem_price_invuomratio <> OLD.invcitem_price_invuomratio) OR (COALESCE(NEW.invcitem_taxtype_id, -1) <> COALESCE(OLD.invcitem_taxtype_id, -1)) ) THEN PERFORM calculateTaxHist( 'invcitemtax', NEW.invcitem_id, COALESCE(_r.invchead_taxzone_id, -1), NEW.invcitem_taxtype_id, COALESCE(_r.invchead_invcdate, CURRENT_DATE), COALESCE(_r.invchead_curr_id, -1), (NEW.invcitem_billed * NEW.invcitem_qty_invuomratio) * (NEW.invcitem_price / NEW.invcitem_price_invuomratio) ); END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._invcitemtrigger(); publicadminfalse83992t12551681732_ipsassbeforetrigger()FUNCTION<CREATE FUNCTION _ipsassbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Checks IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; -- Business logic, disallow invalid combinations IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (LENGTH(COALESCE(NEW.ipsass_custtype_pattern,'')) != 0) THEN new.ipsass_cust_id = -1; new.ipsass_custtype_id = -1; new.ipsass_shipto_id = -1; new.ipsass_shipto_pattern = ''; ELSIF (COALESCE(NEW.ipsass_custtype_id,-1) > -1) THEN new.ipsass_cust_id = -1; new.ipsass_shipto_id = -1; new.ipsass_shipto_pattern = ''; new.ipsass_custtype_pattern = ''; ELSIF (LENGTH(COALESCE(NEW.ipsass_shipto_pattern,'')) != 0) THEN new.ipsass_custtype_id = -1; new.ipsass_shipto_id = -1; new.ipsass_custtype_pattern = ''; ELSE new.ipsass_shipto_id = COALESCE(NEW.ipsass_shipto_id,-1); new.ipsass_custtype_id = -1; new.ipsass_shipto_pattern = ''; new.ipsass_custtype_pattern = ''; END IF; RETURN NEW; ELSE RETURN OLD; END IF; END; $$; -DROP FUNCTION public._ipsassbeforetrigger(); publicadminfalse8399212551681733_ipsheadbeforetrigger()FUNCTIONCREATE FUNCTION _ipsheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Checks IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN RETURN NEW; ELSE RETURN OLD; END IF; END; $$; .DROP FUNCTION public._ipsheadbeforetrigger(); publicadminfalse83992u12551681734_ipsitemcharbeforetrigger()FUNCTIONCREATE FUNCTION _ipsitemcharbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Checks IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (SELECT (COUNT(item_id)=0) FROM ipsiteminfo JOIN item ON (item_id=ipsitem_item_id) WHERE ((ipsitem_id=NEW.ipsitemchar_ipsitem_id) AND (item_config))) THEN RAISE EXCEPTION 'Characteristic prices may only be set on configured items.'; ELSIF (SELECT (COUNT(item_id)=0) FROM ipsiteminfo JOIN item ON (item_id=ipsitem_item_id) JOIN charass ON (charass_target_id=item_id AND charass_target_type='I') WHERE ((ipsitem_id=NEW.ipsitemchar_ipsitem_id) AND (charass_char_id=NEW.ipsitemchar_char_id) AND (charass_value=NEW.ipsitemchar_value))) THEN RAISE EXCEPTION 'No characteristic with matching value exists for this item.'; END IF; RETURN NEW; ELSE RETURN OLD; END IF; END; $$; 2DROP FUNCTION public._ipsitemcharbeforetrigger(); publicadminfalse83992{12551681735_ipsiteminfobeforetrigger()FUNCTIONiCREATE FUNCTION _ipsiteminfobeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN -- Checks IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN RETURN NEW; ELSE RETURN OLD; END IF; END; $$; 2DROP FUNCTION public._ipsiteminfobeforetrigger(); publicadminfalse83992|12551681736_itemaftertrigger()FUNCTION*CREATE FUNCTION _itemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Items.'; END IF; -- Integrity checks IF (TG_OP = 'UPDATE') THEN IF ((OLD.item_type <> NEW.item_type) AND (NEW.item_type = 'L')) THEN IF (SELECT COUNT(*) != 0 FROM bomitem WHERE (bomitem_item_id = OLD.item_id)) THEN RAISE EXCEPTION 'This item is part of one or more Bills of Materials and cannot be a Planning Item.'; END IF; END IF; IF ((OLD.item_type <> NEW.item_type) AND (NEW.item_type IN ('R','S','T'))) THEN IF (SELECT COUNT(*) != 0 FROM itemsite WHERE ((itemsite_item_id=OLD.item_id) AND (itemsite_qtyonhand + qtyallocated(itemsite_id,startoftime(),endoftime()) + qtyordered(itemsite_id,startoftime(),endoftime()) > 0 ))) THEN RAISE EXCEPTION 'Item type not allowed when there are itemsites with quantities with on hand quantities or pending inventory activity for this item.'; END IF; END IF; -- If type changed remove costs and deactivate item sites IF (NEW.item_type <> OLD.item_type) THEN PERFORM updateCost(itemcost_id, 0) FROM itemcost WHERE (itemcost_item_id=OLD.item_id); UPDATE itemsite SET itemsite_active=false WHERE (itemsite_item_id=OLD.item_id); IF (NEW.item_type = 'R') THEN UPDATE itemsite SET itemsite_controlmethod='N' WHERE (itemsite_item_id=OLD.item_id); END IF; END IF; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='ItemChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'I', NEW.item_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.item_active <> NEW.item_active) THEN IF (NEW.item_active) THEN PERFORM postComment(_cmnttypeid, 'I', NEW.item_id, 'Activated'); ELSE PERFORM postComment(_cmnttypeid, 'I', NEW.item_id, 'Deactivated'); END IF; END IF; IF (OLD.item_descrip1 <> NEW.item_descrip1) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Description 1 Changed from "' || OLD.item_descrip1 || '" to "' || NEW.item_descrip1 || '"' ) ); END IF; IF (OLD.item_descrip2 <> NEW.item_descrip2) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Description 2 Changed from "' || OLD.item_descrip2 || '" to "' || NEW.item_descrip2 || '"' ) ); END IF; IF (OLD.item_inv_uom_id <> NEW.item_inv_uom_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Inventory UOM Changed from "' || (SELECT uom_name FROM uom WHERE uom_id=OLD.item_inv_uom_id) || '" (' || CAST(OLD.item_inv_uom_id AS TEXT) || ') to "' || (SELECT uom_name FROM uom WHERE uom_id=NEW.item_inv_uom_id) || '" (' || CAST(NEW.item_inv_uom_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_sold <> NEW.item_sold) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_sold) THEN 'Sold Changed from FALSE to TRUE' ELSE 'Sold Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_picklist <> NEW.item_picklist) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_picklist) THEN 'Pick List Changed from FALSE to TRUE' ELSE 'Pick List Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_fractional <> NEW.item_fractional) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_fractional) THEN 'Fractional Changed from FALSE to TRUE' ELSE 'Fractional Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_exclusive <> NEW.item_exclusive) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_exclusive) THEN 'Exclusive Changed from FALSE to TRUE' ELSE 'Exclusive Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_config <> NEW.item_config) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, CASE WHEN (NEW.item_config) THEN 'Configured Changed from FALSE to TRUE' ELSE 'Configured Changed from TRUE to FALSE' END ); END IF; IF (OLD.item_listprice <> NEW.item_listprice) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'List Price Changed from "' || formatSalesPrice(OLD.item_listprice) || '" to "' || formatSalesPrice(NEW.item_listprice) || '"' ) ); END IF; -- Add New stuff IF (OLD.item_type <> NEW.item_type) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Type Changed from "' || OLD.item_type || '" to "' || NEW.item_type || '"' ) ); END IF; IF (OLD.item_price_uom_id <> NEW.item_price_uom_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Price UOM Changed from "' || (SELECT uom_name FROM uom WHERE uom_id=OLD.item_price_uom_id) || '" (' || CAST(OLD.item_price_uom_id AS TEXT) || ') to "' || (SELECT uom_name FROM uom WHERE uom_id=NEW.item_price_uom_id) || '" (' || CAST(NEW.item_price_uom_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_classcode_id <> NEW.item_classcode_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Class Code Changed from "' || (SELECT classcode_code || '-' || classcode_descrip FROM classcode WHERE classcode_id=OLD.item_classcode_id) || '" (' || CAST(OLD.item_classcode_id AS TEXT) || ') to "' || (SELECT classcode_code || '-' || classcode_descrip FROM classcode WHERE classcode_id=NEW.item_classcode_id) || '" (' || CAST(NEW.item_classcode_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_freightclass_id <> NEW.item_freightclass_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Freight Class Changed from "' || (SELECT freightclass_code || '-' || freightclass_descrip FROM freightclass WHERE freightclass_id=OLD.item_freightclass_id) || '" (' || CAST(OLD.item_freightclass_id AS TEXT) || ') to "' || (SELECT freightclass_code || '-' || freightclass_descrip FROM freightclass WHERE freightclass_id=NEW.item_freightclass_id) || '" (' || CAST(NEW.item_freightclass_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_prodcat_id <> NEW.item_prodcat_id) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Product Category Changed from "' || (SELECT prodcat_code || '-' || prodcat_descrip FROM prodcat WHERE prodcat_id=OLD.item_prodcat_id) || '" (' || CAST(OLD.item_prodcat_id AS TEXT) || ') to "' || (SELECT prodcat_code || '-' || prodcat_descrip FROM prodcat WHERE prodcat_id=NEW.item_prodcat_id) || '" (' || CAST(NEW.item_prodcat_id AS TEXT) || ')' ) ); END IF; IF (OLD.item_upccode <> NEW.item_upccode) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'UPC Code Changed from "' || OLD.item_upccode || '" to "' || NEW.item_upccode || '"' ) ); END IF; IF (OLD.item_prodweight <> NEW.item_prodweight) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Product Weight Changed from "' || formatWeight(OLD.item_prodweight) || '" to "' || formatWeight(NEW.item_prodweight) || '"' ) ); END IF; IF (OLD.item_packweight <> NEW.item_packweight) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Packaging Weight Changed from "' || formatWeight(OLD.item_packweight) || '" to "' || formatWeight(NEW.item_packweight) || '"' ) ); END IF; IF (OLD.item_maxcost <> NEW.item_maxcost) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'Maximum Desired Cost Changed from "' || formatCost(OLD.item_maxcost) || '" to "' || formatCost(NEW.item_maxcost) || '"' ) ); END IF; IF (OLD.item_listcost <> NEW.item_listcost) THEN PERFORM postComment( _cmnttypeid, 'I', NEW.item_id, ( 'List Cost Changed from "' || formatCost(OLD.item_listcost) || '" to "' || formatCost(NEW.item_listcost) || '"' ) ); END IF; -- End changes END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN DELETE FROM imageass WHERE ((imageass_source_id=OLD.item_id) AND (imageass_source='I')); DELETE FROM url WHERE ((url_source_id=OLD.item_id) AND (url_source='I')); DELETE FROM docass WHERE docass_source_id = OLD.item_id AND docass_source_type = 'I'; DELETE FROM docass WHERE docass_target_id = OLD.item_id AND docass_target_type = 'I'; RETURN OLD; END IF; RETURN NEW; END; $$; *DROP FUNCTION public._itemaftertrigger(); publicadminfalse8399212551681738_itemaliastrigger()FUNCTIONCREATE FUNCTION _itemaliastrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Aliases.'; END IF; RETURN NEW; END; $$; *DROP FUNCTION public._itemaliastrigger(); publicadminfalse3992812551681739_itemcostaftertrigger()FUNCTIONRCREATE FUNCTION _itemcostaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _itemNumber TEXT; _maxCost NUMERIC; _oldStdCost NUMERIC; _oldActCost NUMERIC; _actualCost NUMERIC; _standardCost NUMERIC; BEGIN -- Create Event if Standard or Actual Cost is greater than Max Cost IF NOT EXISTS(SELECT 1 FROM evntnot JOIN evnttype ON (evnttype_id = evntnot_evnttype_id) JOIN usrpref ON (evntnot_username = usrpref_username) WHERE evnttype_name = 'CostExceedsMaxDesired' AND usrpref_name = 'active' AND usrpref_value = 't') THEN RETURN NEW; END IF; SELECT item_number, item_maxcost, actcost(item_id), stdcost(item_id) INTO _itemNumber, _maxCost, _actualCost, _standardCost FROM item WHERE (item_id=NEW.itemcost_item_id); IF (_maxCost > 0.0) THEN -- IF (_standardCost > _maxCost) IF NOT EXISTS(SELECT 1 --COUNT(evntlog_id) FROM evntlog, evnttype WHERE evntlog_evnttype_id = evnttype_id AND evntlog_number LIKE (_itemNumber || ' -Standard- New:' || '%') AND (evntlog_dispatched IS NULL) AND CAST(evntlog_evnttime AS DATE) = current_date ) AND (_standardCost > _maxCost) THEN IF (TG_OP = 'INSERT') THEN _oldStdCost := 0; _oldActCost := 0; ELSE _oldStdCost := OLD.itemcost_stdcost; _oldActCost := OLD.itemcost_stdcost; END IF; INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_newvalue, evntlog_oldvalue ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, '', NEW.itemcost_item_id, itemsite_warehous_id, (_itemNumber || ' -Standard- ' || 'New: ' || formatCost(_standardCost) || ' Max: '|| formatCost(_MaxCost)), NEW.itemcost_stdcost, _oldStdCost FROM evntnot, evnttype, itemsite, usrpref WHERE ( (evntnot_evnttype_id=evnttype_id) AND (itemsite_item_id=NEW.itemcost_item_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (evnttype_name='CostExceedsMaxDesired') AND (itemsite_active) AND (usrpref_username = evntnot_username) AND (usrpref_name = 'active') AND (usrpref_value = 't')); -- LIMIT 1; END IF; IF NOT EXISTS( SELECT 1 FROM evntlog, evnttype WHERE evntlog_evnttype_id = evnttype_id AND evntlog_number LIKE (_itemNumber || ' -Actual- New:' || '%') AND (evntlog_dispatched IS NULL) AND CAST(evntlog_evnttime AS DATE) = current_date ) AND (_actualCost > _maxCost) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_newvalue, evntlog_oldvalue ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, '', NEW.itemcost_item_id, itemsite_warehous_id, (_itemNumber || ' -Actual- ' || 'New: ' || formatCost(_actualCost) || ' Max: '|| formatCost(_MaxCost)), NEW.itemcost_actcost, _oldActCost FROM evntnot, evnttype, itemsite, usrpref WHERE ( (evntnot_evnttype_id=evnttype_id) AND (itemsite_item_id=NEW.itemcost_item_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (evnttype_name='CostExceedsMaxDesired') AND (itemsite_active) AND (usrpref_username = evntnot_username) AND (usrpref_name = 'active') AND (usrpref_value = 't') ); --LIMIT 1; END IF; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._itemcostaftertrigger(); publicadminfalse83992w12551681740_itemcosttrigger()FUNCTIONg CREATE FUNCTION _itemcosttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN --Privilege Checks IF ( (TG_OP = 'INSERT') AND (NOT checkPrivilege('CreateCosts')) AND (NOT checkPrivilege('PostVouchers')) ) THEN RAISE EXCEPTION 'You do not have privileges to enter Item Costs.'; END IF; IF ( (TG_OP = 'UPDATE') AND (NOT checkPrivilege('EnterActualCosts')) AND (NOT checkPrivilege('PostVouchers')) AND (NOT checkPrivilege('UpdateActualCosts')) AND (NOT checkPrivilege('PostActualCosts')) AND (NOT checkPrivilege('PostStandardCosts')) ) THEN RAISE EXCEPTION 'You do not have privileges to update Item Costs.'; END IF; IF ( (TG_OP = 'DELETE') AND (NOT checkPrivilege('DeleteCosts')) ) THEN RAISE EXCEPTION 'You do not have privileges to delete Item Costs.'; END IF; IF (TG_OP = 'UPDATE') THEN IF (NEW.itemcost_actcost <> OLD.itemcost_actcost OR NEW.itemcost_curr_id <> OLD.itemcost_curr_id) THEN INSERT INTO costhist ( costhist_item_id, costhist_costelem_id, costhist_type, costhist_lowlevel, costhist_username, costhist_date, costhist_oldcost, costhist_newcost, costhist_oldcurr_id, costhist_newcurr_id ) VALUES ( NEW.itemcost_item_id, NEW.itemcost_costelem_id, 'A', NEW.itemcost_lowlevel, getEffectiveXtUser(), CURRENT_TIMESTAMP, OLD.itemcost_actcost, NEW.itemcost_actcost, OLD.itemcost_curr_id, NEW.itemcost_curr_id ); END IF; IF (NEW.itemcost_stdcost <> OLD.itemcost_stdcost) THEN INSERT INTO costhist ( costhist_item_id, costhist_costelem_id, costhist_type, costhist_lowlevel, costhist_username, costhist_date, costhist_oldcost, costhist_newcost, costhist_oldcurr_id, costhist_newcurr_id ) VALUES ( NEW.itemcost_item_id, NEW.itemcost_costelem_id, 'S', NEW.itemcost_lowlevel, getEffectiveXtUser(), CURRENT_TIMESTAMP, OLD.itemcost_stdcost, NEW.itemcost_stdcost, baseCurrId(), baseCurrId() ); END IF; RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN INSERT INTO costhist ( costhist_item_id, costhist_costelem_id, costhist_type, costhist_lowlevel, costhist_username, costhist_date, costhist_oldcost, costhist_newcost, costhist_oldcurr_id, costhist_newcurr_id ) VALUES ( NEW.itemcost_item_id, NEW.itemcost_costelem_id, 'N', NEW.itemcost_lowlevel, getEffectiveXtUser(), CURRENT_TIMESTAMP, 0, NEW.itemcost_actcost, baseCurrId(), NEW.itemcost_curr_id ); RETURN NEW; ELSIF (TG_OP = 'DELETE') THEN INSERT INTO costhist ( costhist_item_id, costhist_costelem_id, costhist_type, costhist_lowlevel, costhist_username, costhist_date, costhist_oldcost, costhist_newcost, costhist_oldcurr_id, costhist_newcurr_id ) VALUES ( OLD.itemcost_item_id, OLD.itemcost_costelem_id, 'D', OLD.itemcost_lowlevel, getEffectiveXtUser(), CURRENT_TIMESTAMP, OLD.itemcost_stdcost, 0, OLD.itemcost_curr_id, baseCurrId() ); RETURN OLD; END IF; END; $$; )DROP FUNCTION public._itemcosttrigger(); publicadminfalse3992812551681741_itemsiteaftertrigger()FUNCTION3CREATE FUNCTION _itemsiteaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _state INTEGER; _wasLocationControl BOOLEAN; _isLocationControl BOOLEAN; _wasLotSerial BOOLEAN; _isLotSerial BOOLEAN; _wasPerishable BOOLEAN; _isPerishable BOOLEAN; _qty NUMERIC; _maint BOOLEAN; _cost NUMERIC; _variance NUMERIC; _application TEXT; BEGIN -- Cache Application SELECT fetchMetricText('Application') INTO _application; -- Check if we are doing maintenance IF (TG_OP = 'INSERT') THEN _maint := TRUE; ELSIF (TG_OP = 'UPDATE') THEN IF ((OLD.itemsite_item_id != NEW.itemsite_item_id) OR (OLD.itemsite_warehous_id != NEW.itemsite_warehous_id) OR (OLD.itemsite_reorderlevel != NEW.itemsite_reorderlevel) OR (OLD.itemsite_ordertoqty != NEW.itemsite_ordertoqty) OR (OLD.itemsite_cyclecountfreq != NEW.itemsite_cyclecountfreq) OR (OLD.itemsite_planning_type != NEW.itemsite_planning_type) OR (OLD.itemsite_posupply != NEW.itemsite_posupply) OR (OLD.itemsite_wosupply != NEW.itemsite_wosupply) OR (OLD.itemsite_loccntrl != NEW.itemsite_loccntrl) OR (OLD.itemsite_safetystock != NEW.itemsite_safetystock) OR (OLD.itemsite_minordqty != NEW.itemsite_minordqty) OR (OLD.itemsite_multordqty != NEW.itemsite_multordqty) OR (OLD.itemsite_leadtime != NEW.itemsite_leadtime) OR (OLD.itemsite_abcclass != NEW.itemsite_abcclass) OR (OLD.itemsite_controlmethod != NEW.itemsite_controlmethod) OR (OLD.itemsite_active != NEW.itemsite_active) OR (OLD.itemsite_plancode_id != NEW.itemsite_plancode_id) OR (OLD.itemsite_costcat_id != NEW.itemsite_costcat_id) OR (OLD.itemsite_eventfence != NEW.itemsite_eventfence) OR (OLD.itemsite_sold != NEW.itemsite_sold) OR (OLD.itemsite_stocked != NEW.itemsite_stocked) OR (OLD.itemsite_location_id != NEW.itemsite_location_id) OR (OLD.itemsite_useparams != NEW.itemsite_useparams) OR (OLD.itemsite_useparamsmanual != NEW.itemsite_useparamsmanual) OR (OLD.itemsite_soldranking != NEW.itemsite_soldranking) OR (OLD.itemsite_createpr != NEW.itemsite_createpr) OR (OLD.itemsite_location != NEW.itemsite_location) OR (OLD.itemsite_location_comments != NEW.itemsite_location_comments) OR (OLD.itemsite_notes != NEW.itemsite_notes) OR (OLD.itemsite_perishable != NEW.itemsite_perishable) OR (OLD.itemsite_autoabcclass != NEW.itemsite_autoabcclass) OR (OLD.itemsite_ordergroup != NEW.itemsite_ordergroup) OR (OLD.itemsite_disallowblankwip != NEW.itemsite_disallowblankwip) OR (OLD.itemsite_maxordqty != NEW.itemsite_maxordqty) OR (OLD.itemsite_mps_timefence != NEW.itemsite_mps_timefence) OR (OLD.itemsite_createwo != NEW.itemsite_createwo) OR (OLD.itemsite_warrpurc != NEW.itemsite_warrpurc) OR (OLD.itemsite_costmethod != NEW.itemsite_costmethod) OR (OLD.itemsite_autoreg != NEW.itemsite_autoreg) OR (OLD.itemsite_lsseq_id != NEW.itemsite_lsseq_id) ) THEN IF (OLD.itemsite_item_id != NEW.itemsite_item_id) THEN RAISE EXCEPTION 'The item number on an itemsite may not be changed.'; ELSIF (OLD.itemsite_warehous_id != NEW.itemsite_warehous_id) THEN RAISE EXCEPTION 'The warehouse code on an itemsite may not be changed.'; END IF; _maint := TRUE; END IF; ELSE _maint := FALSE; END IF; IF (_maint) THEN -- Begin Maintenance -- Privilege Checks IF ( NOT checkPrivilege('MaintainItemSites') ) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Sites.'; END IF; -- Override values to avoid invalid data combinations IF (NOT NEW.itemsite_posupply) THEN UPDATE itemsite SET itemsite_createpr = FALSE WHERE (itemsite_id=NEW.itemsite_id); END IF; IF (NOT NEW.itemsite_wosupply) THEN UPDATE itemsite SET itemsite_createwo = FALSE WHERE (itemsite_id=NEW.itemsite_id); END IF; IF (NEW.itemsite_controlmethod NOT IN ('S','L')) THEN UPDATE itemsite SET itemsite_perishable = FALSE, itemsite_warrpurc = FALSE, itemsite_autoreg = FALSE, itemsite_lsseq_id = NULL WHERE (itemsite_id=NEW.itemsite_id); END IF; IF (NOT NEW.itemsite_loccntrl) THEN UPDATE itemsite SET itemsite_disallowblankwip = FALSE WHERE (itemsite_id=NEW.itemsite_id); END IF; IF (NOT NEW.itemsite_useparams) THEN UPDATE itemsite SET itemsite_reorderlevel = 0, itemsite_ordertoqty = 0, itemsite_minordqty = 0, itemsite_maxordqty = 0, itemsite_multordqty = 0, itemsite_useparamsmanual = FALSE WHERE (itemsite_id = NEW.itemsite_id); END IF; -- Integrity check IF (TG_OP = 'INSERT') THEN -- Handle MLC logic IF ( (NEW.itemsite_loccntrl) AND (NEW.itemsite_warehous_id IS NOT NULL) ) THEN IF (SELECT count(*)=0 FROM location WHERE ((location_warehous_id=NEW.itemsite_warehous_id) AND ( (NOT location_restrict) OR ( (location_restrict) AND (location_id IN ( SELECT locitem_location_id FROM locitem WHERE (locitem_item_id=NEW.itemsite_item_id) ) ) ) ))) THEN RAISE EXCEPTION 'You must first create at least one valid Location for this Item Site before it may be multiply located.'; END IF; END IF; --This could be made a table constraint later, but do not want to create a big problem --for users with problematic legacy data over a relatively trivial problem for now, --so we will just check moving forword. IF (NEW.itemsite_stocked AND NEW.itemsite_reorderlevel<=0) THEN RAISE EXCEPTION 'Stocked items must have postive reorder level specified.'; END IF; END IF; IF (TG_OP = 'UPDATE') THEN --This could be made a table constraint later, but do not want to create a big problem --for users with problematic legacy data over a relatively trivial problem for now, --so we will just check moving forword. IF ((NEW.itemsite_stocked) AND (NEW.itemsite_stocked != OLD.itemsite_stocked) --Avoid checking unless explicitly changed AND (NEW.itemsite_reorderlevel<=0)) THEN RAISE EXCEPTION 'Stocked items must have postive reorder level specified.'; END IF; END IF; IF (TG_OP = 'UPDATE') THEN -- Integrity check IF (NOT OLD.itemsite_loccntrl AND NEW.itemsite_loccntrl) THEN IF (SELECT count(*)=0 FROM location WHERE ((location_warehous_id=NEW.itemsite_warehous_id) AND ( (NOT location_restrict) OR ( (location_restrict) AND (location_id IN ( SELECT locitem_location_id FROM locitem WHERE (locitem_item_id=NEW.itemsite_item_id) ) ) ) ))) THEN RAISE EXCEPTION 'You must first create at least one valid Location for this Item Site before it may be multiply located.'; END IF; END IF; -- Update detail records based on control method changes _wasLocationControl := OLD.itemsite_loccntrl; _isLocationControl := NEW.itemsite_loccntrl; _wasLotSerial := OLD.itemsite_controlmethod IN ('S','L'); _isLotSerial := NEW.itemsite_controlmethod IN ('S','L'); _wasPerishable := OLD.itemsite_perishable; _isPerishable := NEW.itemsite_perishable; _state := 0; IF ( (_wasLocationControl) AND (_isLocationControl) ) THEN _state := 10; ELSIF ( (NOT _wasLocationControl) AND (NOT _isLocationControl) ) THEN _state := 20; ELSIF ( (NOT _wasLocationControl) AND (_isLocationControl) ) THEN _state := 30; ELSIF ( (_wasLocationControl) AND (NOT _isLocationControl) ) THEN _state := 40; END IF; IF ( (_wasLotSerial) AND (_isLotSerial) ) THEN _state := _state + 1; ELSIF ( (NOT _wasLotSerial) AND (NOT _isLotSerial) ) THEN _state := _state + 2; ELSIF ( (NOT _wasLotSerial) AND (_isLotSerial) ) THEN _state := _state + 3; ELSIF ( (_wasLotSerial) AND (NOT _isLotSerial) ) THEN _state := _state + 4; END IF; IF ( (_application = 'Standard') AND (_state IN (41, 43, 14, 34, 24, 42, 44)) ) THEN -- Check for Reservations IF (SELECT COUNT(*) > 0 FROM itemloc JOIN itemlocrsrv ON (itemlocrsrv_itemloc_id=itemloc_id) WHERE (itemloc_itemsite_id=OLD.itemsite_id)) THEN RAISE EXCEPTION 'Sales Order Reservations by Location exist for this Item Site'; END IF; END IF; IF (_state IN (41, 43)) THEN PERFORM consolidateLotSerial(OLD.itemsite_id); ELSIF (_state IN (14, 34)) THEN PERFORM consolidateLocations(OLD.itemsite_id); ELSIF (_state IN (24, 42, 44)) THEN RAISE NOTICE 'Deleting item site detail records,'; SELECT SUM(itemloc_qty) INTO _qty FROM itemloc, location WHERE ((itemloc_location_id=location_id) AND (NOT location_netable) AND (itemloc_itemsite_id=OLD.itemsite_id)); IF (_qty != 0) THEN UPDATE itemsite SET itemsite_qtyonhand = itemsite_qtyonhand + _qty, itemsite_nnqoh = itemsite_nnqoh - _qty WHERE (itemsite_id=OLD.itemsite_id); END IF; DELETE FROM itemloc WHERE (itemloc_itemsite_id=OLD.itemsite_id); END IF; IF (NEW.itemsite_qtyonhand != 0) THEN -- Handle detail creation -- Create itemloc records if they do not exist IF (_state IN (23, 32, 33)) THEN INSERT INTO itemloc ( itemloc_itemsite_id, itemloc_location_id, itemloc_expiration, itemloc_qty ) VALUES ( NEW.itemsite_id, -1, endOfTime(), NEW.itemsite_qtyonhand ); END IF; -- Handle Location distribution IF (_state IN (31, 32, 33, 34)) THEN IF (SELECT (COUNT(*)=1) FROM location WHERE ((location_id=NEW.itemsite_location_id) AND (location_warehous_id=NEW.itemsite_warehous_id) AND ( (NOT location_restrict) OR ( (location_restrict) AND (location_id IN ( SELECT locitem_location_id FROM locitem WHERE (locitem_item_id=NEW.itemsite_item_id) ) ) ) ))) THEN PERFORM initialDistribution(NEW.itemsite_id, NEW.itemsite_location_id); ELSE RAISE EXCEPTION 'A valid default location must be selected to distribute existing inventory to.'; END IF; END IF; -- Handle Lot/Serial distribution IF ( (_state = 13) OR (_state = 23) OR (_state = 33) OR (_state = 43) ) THEN RAISE NOTICE 'You should now use the Reassign Lot/Serial # window to assign Lot/Serial #s.'; END IF; END IF; IF (OLD.itemsite_costmethod='A' AND NEW.itemsite_costmethod='S') THEN -- TODO: Average costing cost method change SELECT stdcost(NEW.itemsite_item_id) * NEW.itemsite_qtyonhand INTO _cost; _variance := _cost - NEW.itemsite_value; NEW.itemsite_value := _cost; IF(_variance <> 0.0) THEN PERFORM insertGLTransaction( 'P/D', '', '', 'Itemsite converted from Average to Standard cost.', costcat_invcost_accnt_id, costcat_asset_accnt_id, NEW.itemsite_id, _variance, CURRENT_DATE ) FROM costcat WHERE(costcat_id=NEW.itemsite_costcat_id); UPDATE itemsite SET itemsite_value = _cost WHERE (itemsite_id = NEW.itemsite_id); END IF; END IF; END IF; -- Handle Perishable IF ( (_application = 'Standard') AND (_wasPerishable) AND (NOT _isPerishable) ) THEN UPDATE itemloc SET itemloc_expiration = endOfTime() WHERE (itemloc_itemsite_id = OLD.itemsite_id); PERFORM consolidateLotSerial(OLD.itemsite_id); END IF; -- If Planning Type changed to None then delete all Planned Orders IF ( (_application = 'Standard') AND (TG_OP = 'UPDATE') ) THEN IF (NEW.itemsite_planning_type = 'N' AND OLD.itemsite_planning_type <> 'N') THEN PERFORM deletePlannedOrder(planord_id, TRUE) FROM planord WHERE (planord_itemsite_id=NEW.itemsite_id); END IF; END IF; END IF; -- End Maintenance RETURN NEW; END; $$; .DROP FUNCTION public._itemsiteaftertrigger(); publicadminfalse8399212551681743_itemsitetrigger()FUNCTIONQCREATE FUNCTION _itemsitetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _r RECORD; BEGIN -- Cache some information SELECT item_type INTO _r FROM item WHERE (item_id=NEW.itemsite_item_id); -- Override values to avoid invalid data combinations IF (_r.item_type IN ('J','R','S')) THEN NEW.itemsite_planning_type := 'N'; END IF; IF (_r.item_type = 'L') THEN NEW.itemsite_planning_type := 'S'; END IF; IF (TG_OP = 'UPDATE') THEN IF ( (NEW.itemsite_qtyonhand <> OLD.itemsite_qtyonhand) ) THEN IF (OLD.itemsite_freeze) THEN NEW.itemsite_qtyonhand := OLD.itemsite_qtyonhand; ELSE NEW.itemsite_datelastused := CURRENT_DATE; END IF; IF ( (NEW.itemsite_qtyonhand < 0) AND (OLD.itemsite_qtyonhand >= 0) AND (NEW.itemsite_eventfence > 0) ) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'I', NEW.itemsite_id, warehous_id, (item_number || '/' || warehous_code) FROM evntnot, evnttype, item, whsinfo WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=NEW.itemsite_warehous_id) AND (NEW.itemsite_item_id=item_id) AND (NEW.itemsite_warehous_id=warehous_id) AND (evnttype_name='QOHBelowZero') ); END IF; END IF; IF ( (NEW.itemsite_value <> OLD.itemsite_value) AND (OLD.itemsite_freeze) ) THEN NEW.itemsite_value := OLD.itemsite_value; END IF; END IF; IF (NEW.itemsite_qtyonhand < 0 AND NEW.itemsite_costmethod = 'A') THEN RAISE EXCEPTION 'Itemsite (%) is set to use average costing and is not allowed to have a negative quantity on hand.', NEW.itemsite_id; ELSIF (NEW.itemsite_value < 0 AND NEW.itemsite_costmethod = 'A') THEN RAISE EXCEPTION 'This transaction results in a negative itemsite value. Itemsite (%) is set to use average costing and is not allowed to have a negative value.', NEW.itemsite_id; END IF; -- Handle the ChangeLog IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='ItemSiteChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'IS', NEW.itemsite_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.itemsite_plancode_id <> NEW.itemsite_plancode_id) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Planner Code Changed from "' || oldplancode.plancode_code || '" to "' || newplancode.plancode_code || '"' ) ) FROM plancode AS oldplancode, plancode AS newplancode WHERE ( (oldplancode.plancode_id=OLD.itemsite_plancode_id) AND (newplancode.plancode_id=NEW.itemsite_plancode_id) ); END IF; IF (NEW.itemsite_reorderlevel <> OLD.itemsite_reorderlevel) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Reorder Level Changed from ' || formatQty(OLD.itemsite_reorderlevel) || ' to ' || formatQty(NEW.itemsite_reorderlevel ) ) ); END IF; IF (NEW.itemsite_ordertoqty <> OLD.itemsite_ordertoqty) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Order Up To Changed from ' || formatQty(OLD.itemsite_ordertoqty) || ' to ' || formatQty(NEW.itemsite_ordertoqty ) ) ); END IF; IF (NEW.itemsite_leadtime <> OLD.itemsite_leadtime) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Itemsite Leadtime Changed from ' || formatQty(OLD.itemsite_leadtime) || ' to ' || formatQty(NEW.itemsite_leadtime ) ) ); END IF; IF (NEW.itemsite_abcclass <> OLD.itemsite_abcclass) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Itemsite ABC Class Changed from ' || COALESCE(OLD.itemsite_abcclass, 'None') || ' to ' || COALESCE(NEW.itemsite_abcclass,'None') ) ); END IF; IF (NEW.itemsite_controlmethod <> OLD.itemsite_controlmethod) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, ( 'Itemsite Control Method Changed from ' || COALESCE(OLD.itemsite_controlmethod,'None') || ' to ' || COALESCE(NEW.itemsite_controlmethod,'None') ) ); END IF; IF (OLD.itemsite_sold <> NEW.itemsite_sold) THEN PERFORM postComment( _cmnttypeid, 'IS', NEW.itemsite_id, CASE WHEN (NEW.itemsite_sold) THEN 'Sold Changed from FALSE to TRUE' ELSE 'Sold Changed from TRUE to FALSE' END ); END IF; IF (OLD.itemsite_active <> NEW.itemsite_active) THEN IF (NEW.itemsite_active) THEN PERFORM postComment(_cmnttypeid, 'IS', NEW.itemsite_id, 'Activated'); ELSE PERFORM postComment(_cmnttypeid, 'IS', NEW.itemsite_id, 'Deactivated'); END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._itemsitetrigger(); publicadminfalse8399212551681744_itemsrcaftertrigger()FUNCTIONCREATE FUNCTION _itemsrcaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemSources')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Sources.'; END IF; -- Set default to false for other item sources of this item IF (COALESCE(NEW.itemsrc_default, FALSE) = TRUE) THEN UPDATE itemsrc SET itemsrc_default = FALSE WHERE ( (itemsrc_item_id = NEW.itemsrc_item_id) AND (itemsrc_id <> NEW.itemsrc_id) ); END IF; RETURN NEW; END; $$; -DROP FUNCTION public._itemsrcaftertrigger(); publicadminfalse8399212551681745_itemsrcptrigger()FUNCTIONCREATE FUNCTION _itemsrcptrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemSources')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Sources.'; END IF; -- Set defaults NEW.itemsrcp_curr_id := COALESCE(NEW.itemsrcp_curr_id,basecurrid()); RETURN NEW; END; $$; )DROP FUNCTION public._itemsrcptrigger(); publicadminfalse8399212551681746_itemsrctrigger()FUNCTION1CREATE FUNCTION _itemsrctrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemSources')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Sources.'; END IF; -- Set defaults NEW.itemsrc_invvendoruomratio := COALESCE(NEW.itemsrc_invvendoruomratio,1); NEW.itemsrc_minordqty := COALESCE(NEW.itemsrc_minordqty,0); NEW.itemsrc_multordqty := COALESCE(NEW.itemsrc_multordqty,0); NEW.itemsrc_active := COALESCE(NEW.itemsrc_active,true); NEW.itemsrc_leadtime := COALESCE(NEW.itemsrc_leadtime,0); NEW.itemsrc_ranking := COALESCE(NEW.itemsrc_ranking,1); RETURN NEW; END; $$; (DROP FUNCTION public._itemsrctrigger(); publicadminfalse3992812551681747_itemsubtrigger()FUNCTIONCREATE FUNCTION _itemsubtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Item Substitutes.'; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._itemsubtrigger(); publicadminfalse8399212551681748_itemtaxtrigger()FUNCTIONCREATE FUNCTION _itemtaxtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Items.'; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._itemtaxtrigger(); publicadminfalse83992v12551681749_itemtrigger()FUNCTIONCREATE FUNCTION _itemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Override values to avoid invalid data combinations IF (NEW.item_type IN ('R','S','O','L','B')) THEN NEW.item_picklist := FALSE; END IF; IF (NEW.item_type IN ('F','S','O','L','B')) THEN NEW.item_picklist := FALSE; NEW.item_sold := FALSE; NEW.item_prodcat_id := -1; NEW.item_exclusive := false; NEW.item_listprice := 0; NEW.item_upccode := ''; NEW.item_prodweight := 0; NEW.item_packweight := 0; END IF; IF (NEW.item_type NOT IN ('M','R')) THEN NEW.item_config := false; END IF; RETURN NEW; END; $$; %DROP FUNCTION public._itemtrigger(); publicadminfalse8399212551681750_itemuomconvtrigger()FUNCTIONCREATE FUNCTION _itemuomconvtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Privilege Checks IF (NOT checkPrivilege('MaintainItemMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Items.'; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._itemuomconvtrigger(); publicadminfalse83992x12551681751_locationaftertrigger()FUNCTIONgCREATE FUNCTION _locationaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _itemloc RECORD; BEGIN -- Maintain itemsite_qtyonhand and itemsite_nnqoh when location_netable changes IF (TG_OP = 'UPDATE') THEN IF (OLD.location_netable <> NEW.location_netable) THEN FOR _itemloc IN SELECT * FROM itemloc WHERE (itemloc_location_id=NEW.location_id) LOOP IF (NEW.location_netable) THEN UPDATE itemsite SET itemsite_qtyonhand = itemsite_qtyonhand + _itemloc.itemloc_qty, itemsite_nnqoh = itemsite_nnqoh - _itemloc.itemloc_qty WHERE (itemsite_id=_itemloc.itemloc_itemsite_id); ELSE UPDATE itemsite SET itemsite_qtyonhand = itemsite_qtyonhand - _itemloc.itemloc_qty, itemsite_nnqoh = itemsite_nnqoh + _itemloc.itemloc_qty WHERE (itemsite_id=_itemloc.itemloc_itemsite_id); END IF; END LOOP; END IF; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._locationaftertrigger(); publicadminfalse8399212551681752_locationtrigger()FUNCTIONCREATE FUNCTION _locationtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _checkId INTEGER; BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainLocations') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add new Locations.'; END IF; ELSE SELECT checkPrivilege('MaintainLocations') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Location.'; END IF; END IF; -- Code is required IF ( (LENGTH(COALESCE(NEW.location_name,''))=0) AND (LENGTH(COALESCE(NEW.location_aisle,''))=0) AND (LENGTH(COALESCE(NEW.location_rack,''))=0) AND (LENGTH(COALESCE(NEW.location_bin,''))=0) ) THEN RAISE EXCEPTION 'You must supply a valid Location Identifier.'; END IF; -- Site is required IF (NEW.location_warehous_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Site.'; END IF; -- Location Identifier must be unique SELECT location_id INTO _checkId FROM location WHERE ( (UPPER(location_name)=UPPER(NEW.location_name)) AND (UPPER(location_aisle)=UPPER(NEW.location_aisle)) AND (UPPER(location_rack)=UPPER(NEW.location_rack)) AND (UPPER(location_bin)=UPPER(NEW.location_bin)) AND (location_warehous_id=NEW.location_warehous_id) AND (location_id<>NEW.location_id) ); IF (FOUND) THEN RAISE EXCEPTION 'You must supply a unique Location Identifier for this Site.'; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._locationtrigger(); publicadminfalse8399212551681753_metasqlaltertrigger()FUNCTIONCREATE FUNCTION _metasqlaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT (isDBA() OR checkPrivilege('MaintainMetaSQL'))) THEN RAISE EXCEPTION '% does not have privileges to maintain MetaSQL statements in %.%', getEffectiveXtUser(), TG_TABLE_SCHEMA, TG_TABLE_NAME; END IF; IF ((TG_OP = 'UPDATE' OR TG_OP = 'DELETE') AND NEW.metasql_grade <= 0 AND NOT isDBA()) THEN RAISE EXCEPTION 'You may not alter grade 0 metasql queries except using the xTuple Updater utility'; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._metasqlaltertrigger(); publicadminfalse3992812551681754_metasqltrigger()FUNCTIONNCREATE FUNCTION _metasqltrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN NEW.metasql_lastuser := getEffectiveXtUser(); NEW.metasql_lastupdate := current_date; RETURN NEW; END; $$; (DROP FUNCTION public._metasqltrigger(); publicadminfalse83992~12551681755_opheadaftertrigger()FUNCTIONCREATE FUNCTION _opheadaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM docass WHERE docass_source_id = OLD.ophead_id AND docass_source_type = 'OPP'; DELETE FROM docass WHERE docass_target_id = OLD.ophead_id AND docass_target_type = 'OPP'; END IF; -- Comments IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='OpportunityChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'OPP', NEW.ophead_id, 'Created'); --- clear the number from the issue cache PERFORM clearNumberIssue('OpportunityNumber', NEW.ophead_number); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.ophead_active <> NEW.ophead_active) THEN IF (NEW.ophead_active) THEN PERFORM postComment(_cmnttypeid, 'OPP', NEW.ophead_id, 'Activated'); ELSE PERFORM postComment(_cmnttypeid, 'OPP', NEW.ophead_id, 'Deactivated'); END IF; END IF; IF (OLD.ophead_name <> NEW.ophead_name) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Name Changed from "' || OLD.ophead_name || '" to "' || NEW.ophead_name || '"' ) ); END IF; IF (OLD.ophead_owner_username <> NEW.ophead_owner_username) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Owner Name Changed from "' || OLD.ophead_owner_username || '" to "' || NEW.ophead_owner_username || '"' ) ); END IF; IF (OLD.ophead_probability_prcnt <> NEW.ophead_probability_prcnt) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Probability % Changed from "' || OLD.ophead_probability_prcnt || '" to "' || NEW.ophead_probability_prcnt || '"' ) ); END IF; IF (OLD.ophead_amount <> NEW.ophead_amount) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Amount Changed from "' || OLD.ophead_amount || '" to "' || NEW.ophead_amount || '"' ) ); END IF; IF (OLD.ophead_target_date <> NEW.ophead_target_date) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Target Date Changed from "' || OLD.ophead_target_date || '" to "' || NEW.ophead_target_date || '"' ) ); END IF; IF (OLD.ophead_actual_date <> NEW.ophead_actual_date) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Actual Date Changed from "' || OLD.ophead_actual_date || '" to "' || NEW.ophead_actual_date || '"' ) ); END IF; IF (OLD.ophead_crmacct_id <> NEW.ophead_crmacct_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'CRM Account Changed from "' || (SELECT crmacct_name FROM crmacct WHERE crmacct_id=OLD.ophead_crmacct_id) || '" (' || OLD.ophead_crmacct_id || ') to "' || (SELECT crmacct_name FROM crmacct WHERE crmacct_id=NEW.ophead_crmacct_id) || '" (' || NEW.ophead_crmacct_id || ')' ) ); END IF; IF (OLD.ophead_curr_id <> NEW.ophead_curr_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Currency Changed from "' || (SELECT curr_name FROM curr_symbol WHERE curr_id=OLD.ophead_curr_id) || '" (' || OLD.ophead_curr_id || ') to "' || (SELECT curr_name FROM curr_symbol WHERE curr_id=NEW.ophead_curr_id) || '" (' || NEW.ophead_curr_id || ')' ) ); END IF; IF (OLD.ophead_opstage_id <> NEW.ophead_opstage_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Stage Changed from "' || (SELECT opstage_name FROM opstage WHERE opstage_id=OLD.ophead_opstage_id) || '" (' || OLD.ophead_opstage_id || ') to "' || (SELECT opstage_name FROM opstage WHERE opstage_id=NEW.ophead_opstage_id) || '" (' || NEW.ophead_opstage_id || ')' ) ); END IF; IF (OLD.ophead_opsource_id <> NEW.ophead_opsource_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Source Changed from "' || (SELECT opsource_name FROM opsource WHERE opsource_id=OLD.ophead_opsource_id) || '" (' || OLD.ophead_opsource_id || ') to "' || (SELECT opsource_name FROM opsource WHERE opsource_id=NEW.ophead_opsource_id) || '" (' || NEW.ophead_opsource_id || ')' ) ); END IF; IF (OLD.ophead_optype_id <> NEW.ophead_optype_id) THEN PERFORM postComment( _cmnttypeid, 'OPP', NEW.ophead_id, ( 'Type Changed from "' || (SELECT optype_name FROM optype WHERE optype_id=OLD.ophead_optype_id) || '" (' || OLD.ophead_optype_id || ') to "' || (SELECT optype_name FROM optype WHERE optype_id=NEW.ophead_optype_id) || '" (' || NEW.ophead_optype_id || ')' ) ); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._opheadaftertrigger(); publicadminfalse83992}12551681756_opheadbeforetrigger()FUNCTIONCREATE FUNCTION _opheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _rec record; _check boolean; _test text; BEGIN IF(TG_OP = 'DELETE') THEN _rec := OLD; ELSE _rec := NEW; END IF; -- Auto inactivate IF (TG_OP = 'UPDATE') THEN IF ( (NEW.ophead_opstage_id != OLD.ophead_opstage_id) AND (SELECT opstage_opinactive FROM opstage WHERE opstage_id=NEW.ophead_opstage_id) ) THEN NEW.ophead_active := FALSE; END IF; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._opheadbeforetrigger(); publicadminfalse3992812551681757_packbeforetrigger()FUNCTIONCREATE FUNCTION _packbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF ((TG_OP = 'INSERT') AND (NEW.pack_head_id) IS NOT NULL)THEN PERFORM postComment(_cmnttypeid, 'S', NEW.pack_head_id, 'Added to Packing List Batch'); END IF; END IF; IF ((TG_OP = 'INSERT') OR (TG_OP = 'UPDATE')) THEN IF (NEW.pack_shiphead_id IS NOT NULL AND NEW.pack_shiphead_id NOT IN (SELECT shiphead_id FROM shiphead WHERE (shiphead_order_id=NEW.pack_head_id) AND (shiphead_order_type=NEW.pack_head_type))) THEN RAISE EXCEPTION 'Shipment does not exist for % id %', NEW.pack_head_type, NEW.pack_head_id; RETURN OLD; END IF; IF (NEW.pack_head_type = 'SO' AND NEW.pack_head_id IN (SELECT cohead_id FROM cohead)) THEN RETURN NEW; ELSEIF (NEW.pack_head_type = 'TO') THEN IF (NOT fetchMetricBool('MultiWhs')) THEN RAISE EXCEPTION 'Transfer Orders are not supported by this version of the application'; ELSEIF (NEW.pack_head_id IN (SELECT tohead_id FROM tohead)) THEN RETURN NEW; END IF; END IF; RAISE EXCEPTION '% with id % does not exist', NEW.pack_head_type, NEW.pack_head_id; RETURN OLD; END IF; RETURN NEW; END; $$; +DROP FUNCTION public._packbeforetrigger(); publicadminfalse8399212551681758_periodaftertrigger()FUNCTIONoCREATE FUNCTION _periodaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _idoffirst INTEGER; _test INTEGER; BEGIN -- This trigger can easily cause an infinite loop -- because of this we have to be very careful to not -- do an update on the period table if no updates -- are absolutely needed so we don't just keep -- trigger ourselves again and again -- Figure out which period is the first one SELECT period_id INTO _idoffirst FROM period ORDER BY period_start LIMIT 1; -- If we didn't find anything there is nothing to do IF( NOT FOUND ) THEN RETURN NEW; END IF; -- do a select to see if there is at least one record that needs to be -- updated. If we do not find any then we can just leave without -- causing a retrigger of ourselves SELECT period_id INTO _test FROM period WHERE((COALESCE(period_initial, true) AND (NOT period_id=_idoffirst)) OR ((NOT COALESCE(period_initial, false)) AND (period_id=_idoffirst))) LIMIT 1; -- Nothing to update - get out of here IF( NOT FOUND ) THEN RETURN NEW; END IF; -- Update all the period records that already have the initial flag -- set and the one that we know should be the first. -- We don't have to be as careful here since we have already ruled -- out if don't need to update already. UPDATE period SET period_initial = (_idoffirst=period_id) WHERE((COALESCE(period_initial, true)) OR (period_id=_idoffirst)); RETURN NEW; END; $$; ,DROP FUNCTION public._periodaftertrigger(); publicadminfalse8399212551681759_pkgcmdaftertrigger()FUNCTION*CREATE FUNCTION _pkgcmdaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._pkgcmdaftertrigger(); publicadminfalse8399212551681760_pkgcmdaltertrigger()FUNCTION:CREATE FUNCTION _pkgcmdaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create custom commands in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter custom commands in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete custom commands from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._pkgcmdaltertrigger(); publicadminfalse8399212551681761_pkgcmdargaftertrigger()FUNCTION,CREATE FUNCTION _pkgcmdargaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkgcmdargaftertrigger(); publicadminfalse8399212551681762_pkgcmdargaltertrigger()FUNCTIONCCREATE FUNCTION _pkgcmdargaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create command arguments in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter command arguments in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete command arguments from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkgcmdargaltertrigger(); publicadminfalse3992812551681763_pkgcmdargbeforetrigger()FUNCTIONCREATE FUNCTION _pkgcmdargbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmdargid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN RETURN NEW; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._pkgcmdargbeforetrigger(); publicadminfalse8399212551681764_pkgcmdbeforetrigger()FUNCTIONCREATE FUNCTION _pkgcmdbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmdid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN IF (_debug) THEN RAISE NOTICE 'OLD.cmd_name %, NEW.cmd_name %', OLD.cmd_name, NEW.cmd_name; END IF; IF (NEW.cmd_name != OLD.cmd_name) THEN SELECT cmd_id INTO _cmdid FROM cmd WHERE cmd_name=NEW.cmd_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot change command name % because another command with that name already exists.', NEW.cmd_name; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN IF (_debug) THEN RAISE NOTICE 'inserting NEW.cmd_name %', NEW.cmd_name; END IF; SELECT cmd_id INTO _cmdid FROM cmd WHERE cmd_name=NEW.cmd_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot create new command % because another command with that name already exists.', NEW.cmd_name; END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM cmdarg WHERE cmdarg_cmd_id=OLD.cmd_id; RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._pkgcmdbeforetrigger(); publicadminfalse8399212551681765_pkgheadbeforetrigger()FUNCTIONCREATE FUNCTION _pkgheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF (TG_OP = 'UPDATE') THEN NEW.pkghead_created := OLD.pkghead_created; NEW.pkghead_updated := CURRENT_TIMESTAMP; IF (NEW.pkghead_indev AND NOT userCanCreateUsers(getEffectiveXtUser())) THEN NEW.pkghead_indev = FALSE; END IF; ELSIF (TG_OP = 'INSERT') THEN NEW.pkghead_created := CURRENT_TIMESTAMP; NEW.pkghead_updated := NEW.pkghead_created; IF (NEW.pkghead_indev AND NOT userCanCreateUsers(getEffectiveXtUser())) THEN NEW.pkghead_indev = FALSE; END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM pkgdep WHERE pkgdep_pkghead_id=OLD.pkghead_id; EXECUTE 'DROP SCHEMA ' || OLD.pkghead_name || ' CASCADE'; RETURN OLD; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._pkgheadbeforetrigger(); publicadminfalse8399212551681766_pkgimageaftertrigger()FUNCTION,CREATE FUNCTION _pkgimageaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._pkgimageaftertrigger(); publicadminfalse8399212551681767_pkgimagealtertrigger()FUNCTION CREATE FUNCTION _pkgimagealtertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create images in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter images in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete images from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._pkgimagealtertrigger(); publicadminfalse8399212551681768_pkgimagebeforetrigger()FUNCTIONCREATE FUNCTION _pkgimagebeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _imageid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN IF (_debug) THEN RAISE NOTICE 'OLD.image_name %, NEW.image_name %', OLD.image_name, NEW.image_name; END IF; IF (NEW.image_name != OLD.image_name) THEN SELECT image_id INTO _imageid FROM image WHERE image_name=NEW.image_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot change image named % because another image with that name already exists.', NEW.image_name; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN IF (_debug) THEN RAISE NOTICE 'inserting NEW.image_name %', NEW.image_name; END IF; SELECT image_id INTO _imageid FROM image WHERE image_name=NEW.image_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot create new image % because another image with that name already exists.', NEW.image_name; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkgimagebeforetrigger(); publicadminfalse8399212551681769_pkgitembeforetrigger()FUNCTION$CREATE FUNCTION _pkgitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _functionargs TEXT; _group TEXT; _object TEXT; _schema TEXT; _debug BOOL := false; BEGIN IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN _object = NEW.pkgitem_name; SELECT LOWER(pkghead_name) INTO _schema FROM pkghead WHERE (pkghead_id=NEW.pkgitem_pkghead_id); IF (NOT FOUND) THEN _schema := 'public'; END IF; IF (NEW.pkgitem_type = 'F') THEN _object := SPLIT_PART(_object, '(', 1); ELSIF (NEW.pkgitem_type = 'M') THEN _group := SPLIT_PART(_object, '-', 1); _object := SPLIT_PART(_object, '-', 2); END IF; IF _debug THEN RAISE NOTICE '_schema % and _object %', _schema, _object; END IF; IF (NEW.pkgitem_type = 'C') THEN IF (NOT EXISTS(SELECT script_id FROM script WHERE ((script_id=NEW.pkgitem_item_id) AND (script_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Script % as a Package Item without a corresponding script record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'D') THEN IF (NOT EXISTS(SELECT cmd_id FROM cmd WHERE ((cmd_id=NEW.pkgitem_item_id) AND (cmd_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Custom Command % as a Package Item without a corresponding cmd record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'F') THEN IF (NOT EXISTS(SELECT pg_proc.oid FROM pg_proc, pg_namespace WHERE ((pg_proc.oid=NEW.pkgitem_item_id) AND (proname = (_object)) AND (pronamespace=pg_namespace.oid) AND (nspname=_schema)) )) THEN RAISE EXCEPTION 'Cannot create Function % (oid %) as a Package Item without a corresponding function in the database.', NEW.pkgitem_name, NEW.pkgitem_item_id; END IF; ELSIF (NEW.pkgitem_type = 'G') THEN IF (NOT EXISTS(SELECT pg_class.oid FROM pg_trigger, pg_class, pg_namespace WHERE ((tgname=_object) AND (tgrelid=pg_class.oid) AND (relnamespace=pg_namespace.oid) AND (nspname=_schema)))) THEN RAISE EXCEPTION 'Cannot create Trigger % as a Package Item without a corresponding trigger in the database.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'I') THEN IF (NOT EXISTS(SELECT image_id FROM image WHERE ((image_id=NEW.pkgitem_item_id) AND (image_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Image % as a Package Item without a corresponding image record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'M') THEN IF (NOT EXISTS(SELECT metasql_id FROM metasql WHERE ((metasql_id=NEW.pkgitem_item_id) AND (metasql_group=_group) AND (metasql_name=_object)))) THEN RAISE EXCEPTION 'Cannot create MetaSQL statement % as a Package Item without a corresponding metasql record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'P') THEN IF (NOT EXISTS(SELECT priv_id FROM priv WHERE ((priv_id=NEW.pkgitem_item_id) AND (priv_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Privilege % as a Package Item without a corresponding priv record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'R') THEN IF (NOT EXISTS(SELECT report_id FROM report WHERE ((report_id=NEW.pkgitem_item_id) AND (report_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Report % as a Package Item without a corresponding report record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'S') THEN IF (NOT EXISTS(SELECT oid FROM pg_namespace WHERE (LOWER(nspname)=LOWER(NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create Schema % as a Package Item without a corresponding schema in the database.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'T') THEN IF (NOT EXISTS(SELECT pg_class.oid FROM pg_class, pg_namespace WHERE ((relname=_object) AND (relnamespace=pg_namespace.oid) AND (relkind='r') AND (nspname=_schema)))) THEN RAISE EXCEPTION 'Cannot create Table % as a Package Item without a corresponding table in the database.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'U') THEN IF (NOT EXISTS(SELECT uiform_id FROM uiform WHERE ((uiform_id=NEW.pkgitem_item_id) AND (uiform_name=NEW.pkgitem_name)))) THEN RAISE EXCEPTION 'Cannot create User Interface Form % as a Package Item without a corresponding uiform record.', NEW.pkgitem_name; END IF; ELSIF (NEW.pkgitem_type = 'V') THEN IF (NOT EXISTS(SELECT pg_class.oid FROM pg_class, pg_namespace WHERE ((relname=_object) AND (relnamespace=pg_namespace.oid) AND (relkind='v') AND (nspname=_schema)))) THEN RAISE EXCEPTION 'Cannot create View % as a Package Item without a corresponding view in the database.', NEW.pkgitem_name; END IF; ELSE RAISE EXCEPTION '"%" is not a valid type of package item.', NEW.pkgitem_type; END IF; ELSIF (TG_OP = 'DELETE') THEN IF _debug THEN RAISE NOTICE 'Deleting % % %', OLD.pkgitem_item_id, OLD.pkgitem_name, OLD.pkgitem_type; END IF; _object = OLD.pkgitem_name; SELECT pkghead_name INTO _schema FROM pkghead WHERE (pkghead_id=OLD.pkgitem_pkghead_id); IF (NOT FOUND) THEN _schema := 'public'; END IF; IF (OLD.pkgitem_type = 'F') THEN _object := SPLIT_PART(_object, '(', 1); ELSIF (OLD.pkgitem_type = 'M') THEN _group := SPLIT_PART(_object, '-', 1); _object := SPLIT_PART(_object, '-', 2); END IF; IF _debug THEN RAISE NOTICE '_schema % and _object %', _schema, _object; END IF; IF (OLD.pkgitem_type = 'C') THEN DELETE FROM script WHERE ((script_id=OLD.pkgitem_item_id) AND (script_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'D') THEN DELETE FROM cmd WHERE ((cmd_id=OLD.pkgitem_item_id) AND (cmd_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'F') THEN -- SELECT dropIfExists('FUNCTION', CAST (oid::regprocedure AS TEXT), _schema) PERFORM dropIfExists('FUNCTION', proname || '(' || oidvectortypes(proargtypes) || ')', _schema) FROM pg_proc WHERE (oid=OLD.pkgitem_item_id); ELSIF (OLD.pkgitem_type = 'G') THEN PERFORM dropIfExists('TRIGGER', _object, _schema); ELSIF (OLD.pkgitem_type = 'I') THEN DELETE FROM image WHERE ((image_id=OLD.pkgitem_item_id) AND (image_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'M') THEN DELETE FROM metasql WHERE ((metasql_id=OLD.pkgitem_item_id) AND (metasql_group=_group) AND (metasql_name=_object)); ELSIF (OLD.pkgitem_type = 'P') THEN DELETE FROM priv WHERE ((priv_id=OLD.pkgitem_item_id) AND (priv_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'R') THEN DELETE FROM report WHERE ((report_id=OLD.pkgitem_item_id) AND (report_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'S') THEN PERFORM dropIfExists('SCHEMA', OLD.pkgitem_name, OLD.pkgitem_name); ELSIF (OLD.pkgitem_type = 'T') THEN PERFORM dropIfExists('TABLE', _object, _schema, true); ELSIF (OLD.pkgitem_type = 'U') THEN DELETE FROM uiform WHERE ((uiform_id=OLD.pkgitem_item_id) AND (uiform_name=OLD.pkgitem_name)); ELSIF (OLD.pkgitem_type = 'V') THEN PERFORM dropIfExists('VIEW', _object, _schema, true); ELSE RAISE EXCEPTION '"%" is not a valid type of package item.', OLD.pkgitem_type; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._pkgitembeforetrigger(); publicadminfalse8399212551681771_pkgmetasqlaftertrigger()FUNCTION.CREATE FUNCTION _pkgmetasqlaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._pkgmetasqlaftertrigger(); publicadminfalse8399212551681772_pkgmetasqlaltertrigger()FUNCTION CREATE FUNCTION _pkgmetasqlaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _isdba BOOLEAN := false; BEGIN SELECT rolsuper INTO _isdba FROM pg_roles WHERE (rolname=getEffectiveXtUser()); IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; -- cannot combine IF's because plpgsql does not always evaluate left-to-right IF (TG_OP = 'INSERT') THEN IF (NEW.metasql_grade <= 0 AND NOT _isdba) THEN RAISE EXCEPTION 'You may not create grade 0 MetaSQL statements in packages except using the xTuple Updater utility'; END IF; ELSIF (TG_OP = 'UPDATE') THEN IF (NEW.metasql_grade <= 0 AND NOT _isdba) THEN RAISE EXCEPTION 'You may not alter grade 0 MetaSQL statements in packages except using the xTuple Updater utility'; END IF; ELSIF (TG_OP = 'DELETE') THEN IF (OLD.metasql_grade <= 0 AND NOT _isdba) THEN RAISE EXCEPTION 'You may not delete grade 0 MetaSQL statements from packages. Try deleting or disabling the package.'; ELSE RETURN OLD; END IF; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._pkgmetasqlaltertrigger(); publicadminfalse8399212551681773_pkgmetasqlbeforetrigger()FUNCTIONCREATE FUNCTION _pkgmetasqlbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _metasqlid INTEGER; _isdba BOOLEAN := false; BEGIN SELECT rolsuper INTO _isdba FROM pg_roles WHERE (rolname=getEffectiveXtUser()); IF (NOT (_isdba OR checkPrivilege('MaintainMetaSQL'))) THEN RAISE EXCEPTION '% does not have privileges to maintain MetaSQL statements in %.% (DBA=%)', getEffectiveXtUser(), TG_TABLE_SCHEMA, TG_TABLE_NAME, _isdba; END IF; IF (TG_OP = 'UPDATE') THEN RAISE DEBUG 'update OLD %-%-%, NEW %-%-%', OLD.metasql_group, OLD.metasql_name, OLD.metasql_grade, NEW.metasql_group, NEW.metasql_name, NEW.metasql_grade; IF (NEW.metasql_name != OLD.metasql_name OR NEW.metasql_group != OLD.metasql_group OR NEW.metasql_grade != OLD.metasql_grade) THEN SELECT metasql_id INTO _metasqlid FROM metasql WHERE metasql_name=NEW.metasql_name AND metasql_group=NEW.metasql_group AND metasql_grade=NEW.metasql_grade; IF (FOUND) THEN RAISE EXCEPTION 'Cannot change the MetaSQL statement named %-%-% because another MetaSQL statement with that group, name and grade already exists.', NEW.metasql_group, NEW.metasql_name, NEW.metasql_grade; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN RAISE DEBUG 'insert NEW %-% %', NEW.metasql_group, NEW.metasql_name, NEW.metasql_grade; SELECT metasql_id INTO _metasqlid FROM metasql WHERE metasql_name=NEW.metasql_name AND metasql_group=NEW.metasql_group AND metasql_grade=NEW.metasql_grade; IF (FOUND) THEN RAISE EXCEPTION 'The new MetaSQL statement %-% % conflicts with an existing statement.', NEW.metasql_group, NEW.metasql_name, NEW.metasql_grade; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; 1DROP FUNCTION public._pkgmetasqlbeforetrigger(); publicadminfalse3992812551681774_pkgprivaftertrigger()FUNCTION+CREATE FUNCTION _pkgprivaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._pkgprivaftertrigger(); publicadminfalse8399212551681775_pkgprivaltertrigger()FUNCTION,CREATE FUNCTION _pkgprivaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create privileges in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter privileges in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete privileges from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._pkgprivaltertrigger(); publicadminfalse3992812551681776_pkgprivbeforetrigger()FUNCTIONrCREATE FUNCTION _pkgprivbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _privid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN IF (_debug) THEN RAISE NOTICE 'OLD.priv_name %, NEW.priv_name %', OLD.priv_name, NEW.priv_name; END IF; IF (NEW.priv_name != OLD.priv_name) THEN SELECT priv_id INTO _privid FROM priv WHERE priv_name=NEW.priv_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot change privilege name % because another privilege with that name already exists.', NEW.priv_name; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN IF (_debug) THEN RAISE NOTICE 'inserting NEW.priv_name %', NEW.priv_name; END IF; SELECT priv_id INTO _privid FROM priv WHERE priv_name=NEW.priv_name; IF (FOUND) THEN RAISE EXCEPTION 'Cannot create new privilege % because another privilege with that name already exists.', NEW.priv_name; END IF; ELSIF (TG_OP = 'DELETE') THEN IF (_debug) THEN RAISE NOTICE 'deleting pkgpriv_id %', OLD.priv_id; END IF; DELETE FROM usrpriv WHERE usrpriv_priv_id=OLD.priv_id; DELETE FROM grppriv WHERE grppriv_priv_id=OLD.priv_id; RETURN OLD; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._pkgprivbeforetrigger(); publicadminfalse8399212551681777_pkgreportaftertrigger()FUNCTION-CREATE FUNCTION _pkgreportaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkgreportaftertrigger(); publicadminfalse8399212551681778_pkgreportaltertrigger()FUNCTIONECREATE FUNCTION _pkgreportaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create report definitions in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter report definitions in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete report definitions from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkgreportaltertrigger(); publicadminfalse8399212551681779_pkgreportbeforetrigger()FUNCTIONCREATE FUNCTION _pkgreportbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _reportid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN IF (_debug) THEN RAISE NOTICE 'update OLD % %, NEW % %', OLD.report_name, OLD.report_grade, NEW.report_name, NEW.report_grade; END IF; IF (NEW.report_name != OLD.report_name) THEN SELECT report_id INTO _reportid FROM report WHERE ((report_name=NEW.report_name) AND (report_grade=NEW.report_grade)); IF (FOUND) THEN RAISE EXCEPTION 'Cannot change report % % because another report with that name and grade already exists.', NEW.report_name, NEW.report_grade; END IF; END IF; ELSIF (TG_OP = 'INSERT') THEN IF (_debug) THEN RAISE NOTICE 'insert NEW % %', NEW.report_name, NEW.report_grade; END IF; SELECT report_id INTO _reportid FROM report WHERE ((report_name=NEW.report_name) AND (report_grade=NEW.report_grade)); IF (FOUND) THEN RAISE EXCEPTION 'Cannot create new report % % because another report with that name and grade already exists.', NEW.report_name, NEW.report_grade; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._pkgreportbeforetrigger(); publicadminfalse8399212551681780_pkgscriptaftertrigger()FUNCTION-CREATE FUNCTION _pkgscriptaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkgscriptaftertrigger(); publicadminfalse8399212551681781_pkgscriptaltertrigger()FUNCTION$CREATE FUNCTION _pkgscriptaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create scripts in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter scripts in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete scripts from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkgscriptaltertrigger(); publicadminfalse8399212551681782_pkgscriptbeforetrigger()FUNCTIONCREATE FUNCTION _pkgscriptbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _scriptid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN RETURN NEW; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._pkgscriptbeforetrigger(); publicadminfalse8399212551681783_pkguiformaftertrigger()FUNCTION-CREATE FUNCTION _pkguiformaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkguiformaftertrigger(); publicadminfalse8399212551681784_pkguiformaltertrigger()FUNCTIONCREATE FUNCTION _pkguiformaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pkgMayBeModified(TG_TABLE_SCHEMA)) THEN IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF (TG_OP = 'INSERT') THEN RAISE EXCEPTION 'You may not create forms in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'UPDATE') THEN RAISE EXCEPTION 'You may not alter forms in packages except using the xTuple Updater utility'; ELSIF (TG_OP = 'DELETE') THEN RAISE EXCEPTION 'You may not delete forms from packages. Try deleting or disabling the package.'; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._pkguiformaltertrigger(); publicadminfalse8399212551681785_pkguiformbeforetrigger()FUNCTIONCREATE FUNCTION _pkguiformbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _uiformid INTEGER; _debug BOOL := false; BEGIN IF (TG_OP = 'UPDATE') THEN RETURN NEW; ELSIF (TG_OP = 'INSERT') THEN RETURN NEW; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._pkguiformbeforetrigger(); publicadminfalse3992812551681786_poheadtrigger()FUNCTION CREATE FUNCTION _poheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _check BOOLEAN; _maint BOOLEAN := TRUE; BEGIN -- Check if we are doing maintenance IF (TG_OP = 'UPDATE') THEN IF ( (OLD.pohead_status != NEW.pohead_status) OR (OLD.pohead_printed != NEW.pohead_printed) ) THEN _maint := FALSE; END IF; END IF; -- Check IF ( (NOT _maint) AND (NOT checkPrivilege('MaintainPurchaseOrders')) AND (NOT checkPrivilege('PostPurchaseOrders')) AND (NOT checkPrivilege('PrintPurchaseOrders')) AND (NOT checkPrivilege('PostVouchers')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Purchase Order.'; END IF; IF ( _maint AND (NOT checkPrivilege('MaintainPurchaseOrders')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Purchase Order.'; END IF; IF (TG_OP = 'INSERT') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('PoNumber', NEW.pohead_number); END IF; IF ( (TG_OP = 'INSERT') OR (TG_op = 'UPDATE') ) THEN IF (NOT ISNUMERIC(NEW.pohead_number) AND NEW.pohead_saved) THEN RAISE EXCEPTION 'Purchase Order Number must be numeric.'; END IF; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='POChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'P', NEW.pohead_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.pohead_terms_id <> NEW.pohead_terms_id) THEN PERFORM postComment( _cmnttypeid, 'P', NEW.pohead_id, ('Terms Changed from "' || oldterms.terms_code || '" to "' || newterms.terms_code || '"') ) FROM terms AS oldterms, terms AS newterms WHERE ( (oldterms.terms_id=OLD.pohead_terms_id) AND (newterms.terms_id=NEW.pohead_terms_id) ); END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM docass WHERE docass_source_id = OLD.pohead_id AND docass_source_type = 'P'; DELETE FROM docass WHERE docass_target_id = OLD.pohead_id AND docass_target_type = 'P'; DELETE FROM comment WHERE ( (comment_source='P') AND (comment_source_id=OLD.pohead_id) ); END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END; $$; 'DROP FUNCTION public._poheadtrigger(); publicadminfalse8399212551681787_poheadtriggerafter()FUNCTION<CREATE FUNCTION _poheadtriggerafter() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (COALESCE(NEW.pohead_taxzone_id,-1) <> COALESCE(OLD.pohead_taxzone_id,-1)) THEN UPDATE poitem SET poitem_taxtype_id=getItemTaxType(itemsite_item_id,NEW.pohead_taxzone_id) FROM itemsite WHERE ((itemsite_id=poitem_itemsite_id) AND (poitem_pohead_id=NEW.pohead_id)); END IF; -- Do not update closed poitems IF (TG_OP = 'UPDATE') THEN IF (OLD.pohead_status != NEW.pohead_status) THEN UPDATE poitem SET poitem_status=NEW.pohead_status WHERE ( (poitem_pohead_id=NEW.pohead_id) AND (poitem_status <> 'C') ); END IF; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._poheadtriggerafter(); publicadminfalse8399212551681788_poitemtrigger()FUNCTIONj2CREATE FUNCTION _poitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _status CHAR(1); _check BOOLEAN; _cnt INTEGER; _s RECORD; BEGIN -- Check IF ( (TG_OP = 'UPDATE') AND (NOT checkPrivilege('MaintainPurchaseOrders')) AND (NOT checkPrivilege('ChangePurchaseOrderQty')) AND (NOT checkPrivilege('EnterReceipts')) AND (NOT checkPrivilege('PostVouchers')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Purchase Order.'; END IF; IF ( ( (TG_OP = 'INSERT') OR (TG_OP = 'DELETE') ) AND (NOT checkPrivilege('MaintainPurchaseOrders')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Purchase Order.'; END IF; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN SELECT pohead_status INTO _status FROM pohead WHERE (pohead_id=NEW.poitem_pohead_id); IF (NEW.poitem_itemsite_id=-1) THEN NEW.poitem_itemsite_id := NULL; END IF; IF (NEW.poitem_expcat_id=-1) THEN NEW.poitem_expcat_id := NULL; END IF; IF (NEW.poitem_itemsite_id IS NOT NULL AND NEW.poitem_expcat_id IS NOT NULL) THEN RAISE EXCEPTION 'A purchase order line may not include both an inventory and non-inventory item'; ELSIF (NEW.poitem_itemsite_id IS NULL AND NEW.poitem_expcat_id IS NULL) THEN RAISE EXCEPTION 'A purchase order line must specify either an inventory item or a non-inventory expense category'; ELSIF (NEW.poitem_qty_ordered IS NULL) THEN RAISE EXCEPTION 'A purchase order line must specify a quantity'; ELSIF (COALESCE(NEW.poitem_itemsite_id,-1) != -1) THEN SELECT (COUNT(item_id)=1) INTO _check FROM itemsite, item WHERE ((itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=item_id) AND (item_type IN ('P','O','M','T'))); IF NOT (_check) THEN RAISE EXCEPTION 'The item is not a purchasable item type'; END IF; END IF; END IF; IF (TG_OP = 'INSERT') THEN IF (_status='C') THEN RAISE EXCEPTION 'New lines may not be inserted into a closed purchase order'; END IF; --Fetch and apply default item source data if applicable IF ((NEW.poitem_itemsrc_id IS NULL) AND (NEW.poitem_itemsite_id IS NOT NULL)) THEN IF (NEW.poitem_itemsrc_id IS NULL) THEN SELECT COUNT(itemsrc_id) INTO _cnt FROM pohead,itemsrc,itemsite WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_vend_id=itemsrc_vend_id) AND (itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=itemsrc_item_id)); IF (_cnt = 1) THEN -- We found the one and only item source, so populate data for it SELECT itemsrc.* INTO _s FROM pohead,itemsrc,itemsite WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_vend_id=itemsrc_vend_id) AND (itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=itemsrc_item_id)); IF (FOUND) THEN NEW.poitem_itemsrc_id := _s.itemsrc_id; NEW.poitem_vend_uom := _s.itemsrc_vend_uom; NEW.poitem_invvenduomratio := _s.itemsrc_invvendoruomratio; NEW.poitem_duedate := COALESCE(NEW.poitem_duedate, CURRENT_DATE + _s.itemsrc_leadtime); NEW.poitem_vend_item_number := COALESCE(NEW.poitem_vend_item_number,_s.itemsrc_vend_item_number); NEW.poitem_vend_item_descrip := COALESCE(NEW.poitem_vend_item_descrip,_s.itemsrc_vend_item_descrip); NEW.poitem_manuf_name := COALESCE(NEW.poitem_manuf_name,_s.itemsrc_manuf_name); NEW.poitem_manuf_item_number := COALESCE(NEW.poitem_manuf_item_number, _s.itemsrc_manuf_item_number); NEW.poitem_manuf_item_descrip := COALESCE(NEW.poitem_manuf_item_descrip, _s.itemsrc_manuf_item_descrip); END IF; ELSIF (_cnt > 1) THEN -- There are multiple sources, see if there is an exact match with provided vendor info. SELECT itemsrc.* INTO _s FROM pohead,itemsrc,itemsite WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_vend_id=itemsrc_vend_id) AND (itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=itemsrc_item_id) AND (NEW.poitem_vend_item_number=itemsrc_vend_item_number) AND (COALESCE(NEW.poitem_manuf_name,'')=COALESCE(itemsrc_manuf_name,'')) AND (COALESCE(NEW.poitem_manuf_item_number,'')=COALESCE(itemsrc_manuf_item_number,''))); IF (FOUND) THEN NEW.poitem_itemsrc_id := _s.itemsrc_id; NEW.poitem_vend_uom := _s.itemsrc_vend_uom; NEW.poitem_invvenduomratio := _s.itemsrc_invvendoruomratio; NEW.poitem_duedate := COALESCE(NEW.poitem_duedate, CURRENT_DATE + _s.itemsrc_leadtime); NEW.poitem_vend_item_descrip := COALESCE(NEW.poitem_vend_item_descrip,_s.itemsrc_vend_item_descrip); NEW.poitem_manuf_item_descrip := COALESCE(NEW.poitem_manuf_item_descrip, _s.itemsrc_manuf_item_descrip); END IF; END IF; END IF; END IF; IF (NEW.poitem_duedate IS NULL) THEN RAISE EXCEPTION 'A due date is required'; END IF; --Set defaults NEW.poitem_linenumber := COALESCE(NEW.poitem_linenumber,( SELECT COALESCE(MAX(poitem_linenumber),0) + 1 FROM poitem WHERE (poitem_pohead_id=NEW.poitem_pohead_id))); NEW.poitem_status := _status; NEW.poitem_invvenduomratio := COALESCE(NEW.poitem_invvenduomratio,1); IF (NEW.poitem_invvenduomratio = 0.0) THEN NEW.poitem_invvenduomratio = 1.0; END IF; NEW.poitem_vend_item_number := COALESCE(NEW.poitem_vend_item_number,''); NEW.poitem_vend_item_descrip := COALESCE(NEW.poitem_vend_item_descrip,''); NEW.poitem_unitprice := COALESCE(NEW.poitem_unitprice,( SELECT itemsrcPrice(NEW.poitem_itemsrc_id, COALESCE(itemsite_warehous_id, -1), pohead_dropship, NEW.poitem_qty_ordered, pohead_curr_id, CURRENT_DATE) FROM itemsite, pohead WHERE ( (itemsite_id=NEW.poitem_itemsite_id) AND (pohead_id=NEW.poitem_pohead_id) )), 0.0); NEW.poitem_stdcost := COALESCE(NEW.poitem_stdcost,( SELECT stdcost(itemsite_item_id) FROM itemsite WHERE (itemsite_id=NEW.poitem_itemsite_id))); NEW.poitem_bom_rev_id := COALESCE(NEW.poitem_bom_rev_id,( SELECT getActiveRevId('BOM',itemsite_item_id) FROM itemsite WHERE (itemsite_id=NEW.poitem_itemsite_id))); NEW.poitem_boo_rev_id := COALESCE(NEW.poitem_boo_rev_id,( SELECT getActiveRevId('BOO',itemsite_item_id) FROM itemsite WHERE (itemsite_id=NEW.poitem_itemsite_id))); NEW.poitem_comments := COALESCE(NEW.poitem_comments,''); NEW.poitem_freight := COALESCE(NEW.poitem_freight,0); NEW.poitem_qty_received := 0; NEW.poitem_qty_returned := 0; NEW.poitem_qty_vouchered := 0; -- Insert Event Start INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', NEW.poitem_id, itemsite_warehous_id, (pohead_number || '-' || NEW.poitem_linenumber || ': ' || item_number) FROM evntnot, evnttype, itemsite, item, pohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.poitem_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.poitem_pohead_id=pohead_id) AND (NEW.poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='POitemCreate') ); -- Insert Event End END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='POChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'P', NEW.poitem_pohead_id, ('Created Line #' || NEW.poitem_linenumber::TEXT)); PERFORM postComment(_cmnttypeid, 'PI', NEW.poitem_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (NEW.poitem_qty_ordered <> OLD.poitem_qty_ordered) THEN PERFORM postComment( _cmnttypeid, 'PI', NEW.poitem_id, ( 'Qty. Ordered Changed from ' || formatQty(OLD.poitem_qty_ordered) || ' to ' || formatQty(NEW.poitem_qty_ordered ) ) ); END IF; IF (NEW.poitem_unitprice <> OLD.poitem_unitprice) THEN PERFORM postComment( _cmnttypeid, 'PI', NEW.poitem_id, ( 'Unit Price Changed from ' || formatPurchPrice(OLD.poitem_unitprice) || ' to ' || formatPurchPrice(NEW.poitem_unitprice ) ) ); END IF; IF (NEW.poitem_duedate <> OLD.poitem_duedate) THEN PERFORM postComment( _cmnttypeid, 'PI', NEW.poitem_id, ( 'Due Date Changed from ' || formatDate(OLD.poitem_duedate) || ' to ' || formatDate(NEW.poitem_duedate ) ) ); END IF; IF (COALESCE(OLD.poitem_taxtype_id, -1) <> COALESCE(NEW.poitem_taxtype_id, -1)) THEN PERFORM postComment( _cmnttypeid, 'PI', NEW.poitem_id, ( 'Tax Type Changed from "' || COALESCE((SELECT taxtype_name FROM taxtype WHERE taxtype_id=OLD.poitem_taxtype_id), 'None') || '" (' || COALESCE(OLD.poitem_taxtype_id, 0) || ') to "' || COALESCE((SELECT taxtype_name FROM taxtype WHERE taxtype_id=NEW.poitem_taxtype_id), 'None') || '" (' || COALESCE(NEW.poitem_taxtype_id, 0) || ')' ) ); END IF; IF (NEW.poitem_status <> OLD.poitem_status) THEN IF (NEW.poitem_status = 'C') THEN PERFORM postComment(_cmnttypeid, 'PI', NEW.poitem_id, 'Closed'); ELSIF (NEW.poitem_status = 'O') THEN PERFORM postComment(_cmnttypeid, 'PI', NEW.poitem_id, 'Opened'); END IF; END IF; ELSIF (TG_OP = 'DELETE') THEN PERFORM postComment(_cmnttypeid, 'P', OLD.poitem_pohead_id, ('Deleted Line #' || OLD.poitem_linenumber::TEXT)); END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN IF (EXISTS(SELECT recv_id FROM recv WHERE ((recv_order_type='PO') AND (recv_orderitem_id=OLD.poitem_id) AND (recv_qty>0)))) THEN RAISE EXCEPTION 'Cannot delete an P/O Item which has been received'; END IF; DELETE FROM comment WHERE ( (comment_source='PI') AND (comment_source_id=OLD.poitem_id) ); DELETE FROM charass WHERE ((charass_target_type='PI') AND (charass_target_id=OLD.poitem_id)); IF (OLD.poitem_status = 'O') THEN IF ( (SELECT (count(*) < 1) FROM poitem WHERE ((poitem_pohead_id=OLD.poitem_pohead_id) AND (poitem_id != OLD.poitem_id) AND (poitem_status <> 'C')) ) ) THEN UPDATE pohead SET pohead_status = 'C' WHERE ((pohead_id=OLD.poitem_pohead_id) AND (pohead_status='O')); END IF; END IF; RETURN OLD; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.poitem_itemsite_id != OLD.poitem_itemsite_id) THEN RAISE EXCEPTION 'You may not change the item site for a line item.'; ELSIF (NEW.poitem_expcat_id != OLD.poitem_expcat_id) THEN RAISE EXCEPTION 'You may not change the expense category for a line item.'; END IF; IF (OLD.poitem_status <> NEW.poitem_status) THEN IF ( (SELECT (count(*) < 1) FROM poitem WHERE ((poitem_pohead_id=NEW.poitem_pohead_id) AND (poitem_id != NEW.poitem_id) AND (poitem_status<>'C')) ) AND (NEW.poitem_status='C') ) THEN UPDATE pohead SET pohead_status = 'C' WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_status='O')); ELSE UPDATE pohead SET pohead_status = 'O' WHERE ((pohead_id=NEW.poitem_pohead_id) AND (pohead_status='C')); END IF; END IF; END IF; RETURN NEW; END IF; END; $$; 'DROP FUNCTION public._poitemtrigger(); publicadminfalse8399212551681790_prjaftertrigger()FUNCTIONCREATE FUNCTION _prjaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (NOT FOUND) THEN RAISE EXCEPTION 'Comment type ChangeLog not found'; END IF; IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'J', NEW.prj_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.prj_start_date <> NEW.prj_start_date) THEN PERFORM postComment( _cmnttypeid, 'J', NEW.prj_id, ('Start Date Changed from ' || formatDate(OLD.prj_start_date) || ' to ' || formatDate(NEW.prj_start_date)) ); END IF; IF (OLD.prj_due_date <> NEW.prj_due_date) THEN PERFORM postComment( _cmnttypeid, 'J', NEW.prj_id, ('Due Date Changed from ' || formatDate(OLD.prj_due_date) || ' to ' || formatDate(NEW.prj_due_date)) ); END IF; IF (OLD.prj_assigned_date <> NEW.prj_assigned_date) THEN PERFORM postComment( _cmnttypeid, 'J', NEW.prj_id, ('Assigned Date Changed from ' || formatDate(OLD.prj_assigned_date) || ' to ' || formatDate(NEW.prj_assigned_date)) ); END IF; IF (OLD.prj_completed_date <> NEW.prj_completed_date) THEN PERFORM postComment( _cmnttypeid, 'J', NEW.prj_id, ('Completed Date Changed from ' || formatDate(OLD.prj_completed_date) || ' to ' || formatDate(NEW.prj_completed_date)) ); END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._prjaftertrigger(); publicadminfalse8399212551681791_prjbeforedeletetrigger()FUNCTIONwCREATE FUNCTION _prjbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM docass WHERE docass_source_id = OLD.prj_id AND docass_source_type = 'J'; DELETE FROM docass WHERE docass_target_id = OLD.prj_id AND docass_target_type = 'J'; SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.prj_id) AND (recur_parent_type='J')); IF (_recurid IS NOT NULL) THEN SELECT MIN(prj_id) INTO _newparentid FROM prj WHERE ((prj_recurring_prj_id=OLD.prj_id) AND (prj_id!=OLD.prj_id)); -- client is responsible for warning about deleting a recurring prj IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; END IF; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._prjbeforedeletetrigger(); publicadminfalse8399212551681792_prjtaskaftertrigger()FUNCTIONCREATE FUNCTION _prjtaskaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (NOT FOUND) THEN RAISE EXCEPTION 'Comment type ChangeLog not found'; END IF; IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'TA', NEW.prjtask_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.prjtask_start_date <> NEW.prjtask_start_date) THEN PERFORM postComment( _cmnttypeid, 'TA', NEW.prjtask_id, ('Start Date Changed from ' || formatDate(OLD.prjtask_start_date) || ' to ' || formatDate(NEW.prjtask_start_date)) ); END IF; IF (OLD.prjtask_due_date <> NEW.prjtask_due_date) THEN PERFORM postComment( _cmnttypeid, 'TA', NEW.prjtask_id, ('Due Date Changed from ' || formatDate(OLD.prjtask_due_date) || ' to ' || formatDate(NEW.prjtask_due_date)) ); END IF; IF (OLD.prjtask_assigned_date <> NEW.prjtask_assigned_date) THEN PERFORM postComment( _cmnttypeid, 'TA', NEW.prjtask_id, ('Assigned Date Changed from ' || formatDate(OLD.prjtask_assigned_date) || ' to ' || formatDate(NEW.prjtask_assigned_date)) ); END IF; IF (OLD.prjtask_completed_date <> NEW.prjtask_completed_date) THEN PERFORM postComment( _cmnttypeid, 'TA', NEW.prjtask_id, ('Completed Date Changed from ' || formatDate(OLD.prjtask_completed_date) || ' to ' || formatDate(NEW.prjtask_completed_date)) ); END IF; IF (OLD.prjtask_hours_actual != NEW.prjtask_hours_actual) THEN PERFORM postComment(_cmnttypeid, 'TA', NEW.prjtask_id, 'Actual Hours changed from ' || formatQty(OLD.prjtask_hours_actual) || ' to ' || formatQty(NEW.prjtask_hours_actual)); END IF; IF (OLD.prjtask_exp_actual != NEW.prjtask_exp_actual) THEN PERFORM postComment(_cmnttypeid, 'TA', NEW.prjtask_id, 'Actual Expense changed from ' || formatQty(OLD.prjtask_exp_actual) || ' to ' || formatQty(NEW.prjtask_exp_actual)); END IF; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._prjtaskaftertrigger(); publicadminfalse8399212551681793_prjtasktrigger()FUNCTIONdCREATE FUNCTION _prjtasktrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Checks IF (NEW.prjtask_owner_username=getEffectiveXtUser()) THEN IF (NOT checkPrivilege('MaintainAllProjects') AND NOT checkPrivilege('MaintainPersonalProjects')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Projects.'; END IF; ELSIF (NOT checkPrivilege('MaintainAllProjects')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Projects.'; ELSIF (LENGTH(COALESCE(NEW.prjtask_number,'')) = 0) THEN RAISE EXCEPTION 'You must ender a valid number.'; ELSIF (LENGTH(COALESCE(NEW.prjtask_name,'')) = 0) THEN RAISE EXCEPTION 'You must ender a valid name.'; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._prjtasktrigger(); publicadminfalse3992812551681794_prospectafterdeletetrigger()FUNCTIONCREATE FUNCTION _prospectafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF EXISTS(SELECT 1 FROM quhead WHERE quhead_cust_id = OLD.prospect_id) AND NOT EXISTS (SELECT 1 FROM custinfo WHERE cust_id = OLD.prospect_id) THEN RAISE EXCEPTION '[xtuple: deleteProspect, -1]'; END IF; IF (fetchMetricBool('ProspectChangeLog')) THEN PERFORM postComment(cmnttype_id, 'PSPCT', OLD.prospect_id, 'Deleted "' || OLD.prospect_number || '"') FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; 4DROP FUNCTION public._prospectafterdeletetrigger(); publicadminfalse8399212551681795_prospectaftertrigger()FUNCTIONCREATE FUNCTION _prospectaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _custid INTEGER; _prospectid INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN SELECT crmacct_cust_id, crmacct_prospect_id INTO _custid, _prospectid FROM crmacct WHERE crmacct_number=NEW.prospect_number; IF (_custid > 0 AND _custid != _prospectid) THEN RAISE EXCEPTION '[xtuple: createProspect, -2]'; END IF; IF (_prospectid > 0) THEN RAISE EXCEPTION '[xtuple: createProspect, -3]'; END IF; -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_prospect_id=NEW.prospect_id, crmacct_cust_id=NULL, crmacct_name=NEW.prospect_name WHERE crmacct_number=NEW.prospect_number; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_prospect_id, crmacct_cntct_id_1 ) VALUES (NEW.prospect_number, NEW.prospect_name, NEW.prospect_active, 'O', NEW.prospect_id, NEW.prospect_cntct_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; /* TODO: default characteristic assignments based on what? */ ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.prospect_number WHERE ((crmacct_prospect_id=NEW.prospect_id) AND (crmacct_number!=NEW.prospect_number)); UPDATE crmacct SET crmacct_name = NEW.prospect_name WHERE ((crmacct_prospect_id=NEW.prospect_id) AND (crmacct_name!=NEW.prospect_name)); END IF; IF (fetchMetricBool('ProspectChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.prospect_active <> NEW.prospect_active) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, CASE WHEN NEW.prospect_active THEN 'Activated' ELSE 'Deactivated' END); END IF; IF (OLD.prospect_number <> NEW.prospect_number) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Number changed from "' || OLD.prospect_number || '" to "' || NEW.prospect_number || '"'); END IF; IF (OLD.prospect_name <> NEW.prospect_name) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Name changed from "' || OLD.prospect_name || '" to "' || NEW.prospect_name || '"'); END IF; IF (OLD.prospect_cntct_id <> NEW.prospect_cntct_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Contact changed from "' || formatCntctName(OLD.prospect_cntct_id) || '" to "' || formatCntctName(NEW.prospect_cntct_id) || '"'); END IF; IF (OLD.prospect_taxauth_id <> NEW.prospect_taxauth_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Tax Authority changed from "' || (SELECT taxauth_code FROM taxauth WHERE taxauth_id=OLD.prospect_taxauth_id) || '" to "' || (SELECT taxauth_code FROM taxauth WHERE taxauth_id=NEW.prospect_taxauth_id) || '"'); END IF; IF (OLD.prospect_salesrep_id <> NEW.prospect_salesrep_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Sales Rep changed from "' || (SELECT salesrep_number FROM salesrep WHERE salesrep_id=OLD.prospect_salesrep_id) || '" to "' || (SELECT salesrep_number FROM salesrep WHERE salesrep_id=NEW.prospect_salesrep_id) || '"'); END IF; IF (OLD.prospect_warehous_id <> NEW.prospect_warehous_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Warehouse changed from "' || (SELECT warehous_code FROM whsinfo WHERE warehous_id=OLD.prospect_warehous_id) || '" to "' || (SELECT warehous_code FROM whsinfo WHERE warehous_id=NEW.prospect_warehous_id) || '"'); END IF; IF (OLD.prospect_taxzone_id <> NEW.prospect_taxzone_id) THEN PERFORM postComment(_cmnttypeid, 'PSPCT', NEW.prospect_id, 'Tax Zone changed from "' || (SELECT taxzone_code FROM taxzone WHERE taxzone_id=OLD.prospect_taxzone_id) || '" to "' || (SELECT taxzone_code FROM taxzone WHERE taxzone_id=NEW.prospect_taxzone_id) || '"'); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._prospectaftertrigger(); publicadminfalse3992812551681796_prospectbeforedeletetrigger()FUNCTIONCREATE FUNCTION _prospectbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainProspectMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Prospects.'; END IF; UPDATE crmacct SET crmacct_prospect_id = NULL WHERE crmacct_prospect_id = OLD.prospect_id; RETURN OLD; END; $$; 5DROP FUNCTION public._prospectbeforedeletetrigger(); publicadminfalse3992812551681797_prospecttrigger()FUNCTION%CREATE FUNCTION _prospecttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainProspectMasters')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Prospects.'; END IF; IF (NEW.prospect_number IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Prospect Number.'; END IF; NEW.prospect_number := UPPER(NEW.prospect_number); RETURN NEW; END; $$; )DROP FUNCTION public._prospecttrigger(); publicadminfalse8399212551681798 _prtrigger()FUNCTIONMCREATE FUNCTION _prtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/EULA for the full text of the software license. BEGIN --- clear the number from the issue cache PERFORM clearNumberIssue('PrNumber', NEW.pr_number); RETURN NEW; END; $$; #DROP FUNCTION public._prtrigger(); publicadminfalse8399212551681799_quheadtrigger()FUNCTIONI5CREATE FUNCTION _quheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _oldHoldType TEXT; _newHoldType TEXT; _p RECORD; _a RECORD; _w RECORD; _shiptoId INTEGER; _addrId INTEGER; _prjId INTEGER; _check BOOLEAN; _numGen CHAR(1); BEGIN -- Checks SELECT checkPrivilege('MaintainQuotes') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Quotes.'; END IF; -- If this is imported, check the quote number IF (TG_OP = 'INSERT') THEN IF (NEW.quhead_imported) THEN SELECT fetchMetricText('QUNumberGeneration') INTO _numGen; IF ((NEW.quhead_number IS NULL) AND (_numGen='M')) THEN RAISE EXCEPTION 'You must supply a Quote Number.'; ELSE IF ((NEW.quhead_number IS NOT NULL) AND (_numGen='A')) THEN RAISE EXCEPTION 'You may not supply a new Quote Number xTuple will generate the number.'; ELSE IF ((NEW.quhead_number IS NULL) AND (_numGen='O')) THEN SELECT fetchqunumber() INTO NEW.quhead_number; ELSE IF (NEW.quhead_number IS NULL) THEN SELECT fetchsonumber() INTO NEW.quhead_number; END IF; END IF; END IF; END IF; END IF; IF (fetchMetricText('QUNumberGeneration') IN ('A','O')) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('QuNumber', NEW.quhead_number); ELSIF (fetchMetricText('QUNumberGeneration') = 'S') THEN --- clear the number from the issue cache PERFORM clearNumberIssue('SoNumber', NEW.quhead_number); END IF; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.quhead_number <> OLD.quhead_number) THEN RAISE EXCEPTION 'The order number may not be changed.'; END IF; END IF; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN -- Get Customer data IF (NEW.quhead_shipto_id IS NULL) THEN SELECT * INTO _p FROM ( SELECT cust_number,cust_usespos,cust_blanketpos,cust_ffbillto, cust_ffshipto,cust_name,cust_salesrep_id,cust_terms_id,cust_shipvia, cust_commprcnt,cust_curr_id,cust_taxzone_id, addr_line1,addr_line2,addr_line3,addr_city,addr_state,addr_postalcode,addr_country, shipto_id,shipto_addr_id,shipto_name,shipto_salesrep_id,shipto_shipvia, shipto_shipchrg_id,shipto_shipform_id,shipto_commission,shipto_taxzone_id FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) LEFT OUTER JOIN shiptoinfo ON ((cust_id=shipto_cust_id) AND shipto_default) WHERE (cust_id=NEW.quhead_cust_id) UNION SELECT prospect_number,false,false,true, true,prospect_name,prospect_salesrep_id,null,null, null,null,prospect_taxzone_id, addr_line1,addr_line2,addr_line3,addr_city,addr_state,addr_postalcode,addr_country, null,null,null,null,null, null,null,null,null FROM prospect LEFT OUTER JOIN cntct ON (prospect_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE (prospect_id=NEW.quhead_cust_id)) AS data; ELSE SELECT cust_creditstatus,cust_number,cust_usespos,cust_blanketpos,cust_ffbillto, cust_ffshipto,cust_name,cust_salesrep_id,cust_terms_id,cust_shipvia, cust_shipchrg_id,cust_shipform_id,cust_commprcnt,cust_curr_id,cust_taxzone_id, addr_line1,addr_line2,addr_line3,addr_city,addr_state,addr_postalcode,addr_country, shipto_id,shipto_addr_id,shipto_name,shipto_salesrep_id,shipto_shipvia, shipto_shipchrg_id,shipto_shipform_id,shipto_commission,shipto_taxzone_id INTO _p FROM shiptoinfo,custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE ((cust_id=NEW.quhead_cust_id) AND (shipto_id=shipto_id)); END IF; -- If there is customer data, then we can get to work IF (FOUND) THEN -- Only check PO number for imports because UI checks when whole quote is saved IF (TG_OP = 'INSERT') THEN -- Set to defaults if values not provided NEW.quhead_shipto_id := COALESCE(NEW.quhead_shipto_id,_p.shipto_id); NEW.quhead_salesrep_id := COALESCE(NEW.quhead_salesrep_id,_p.shipto_salesrep_id,_p.cust_salesrep_id); NEW.quhead_terms_id := COALESCE(NEW.quhead_terms_id,_p.cust_terms_id); NEW.quhead_shipvia := COALESCE(NEW.quhead_shipvia,_p.shipto_shipvia,_p.cust_shipvia); NEW.quhead_commission := COALESCE(NEW.quhead_commission,_p.shipto_commission,_p.cust_commprcnt); NEW.quhead_quotedate := COALESCE(NEW.quhead_quotedate,current_date); NEW.quhead_packdate := COALESCE(NEW.quhead_packdate,NEW.quhead_quotedate); NEW.quhead_curr_id := COALESCE(NEW.quhead_curr_id,_p.cust_curr_id,basecurrid()); NEW.quhead_taxzone_id := COALESCE(NEW.quhead_taxzone_id,_p.shipto_taxzone_id,_p.cust_taxzone_id); NEW.quhead_freight := COALESCE(NEW.quhead_freight,0); NEW.quhead_custponumber := COALESCE(NEW.quhead_custponumber,''); NEW.quhead_ordercomments := COALESCE(NEW.quhead_ordercomments,''); NEW.quhead_shipcomments := COALESCE(NEW.quhead_shipcomments,''); NEW.quhead_shiptophone := COALESCE(NEW.quhead_shiptophone,''); NEW.quhead_misc := COALESCE(NEW.quhead_misc,0); NEW.quhead_misc_descrip := COALESCE(NEW.quhead_misc_descrip,''); IF ((NEW.quhead_warehous_id IS NULL) OR (NEW.quhead_fob IS NULL)) THEN IF (NEW.quhead_warehous_id IS NULL) THEN SELECT warehous_id,warehous_fob INTO _w FROM usrpref, whsinfo WHERE ((warehous_id=CAST(usrpref_value AS INTEGER)) AND (warehous_shipping) AND (warehous_active) AND (usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse')); ELSE SELECT warehous_id,warehous_fob INTO _w FROM whsinfo WHERE (warehous_id=NEW.quhead_warehous_id); END IF; IF (FOUND) THEN NEW.quhead_warehous_id := COALESCE(NEW.quhead_warehous_id,_w.warehous_id); NEW.quhead_fob := COALESCE(NEW.quhead_fob,_w.warehous_fob); END IF; END IF; END IF; --Auto create project if applicable IF ((TG_OP = 'INSERT') AND (NEW.quhead_prj_id=-1)) THEN SELECT fetchMetricBool('AutoCreateProjectsForOrders') INTO _check; IF (_check) THEN SELECT NEXTVAL('prj_prj_id_seq') INTO _prjId; NEW.quhead_prj_id := _prjId; INSERT INTO prj (prj_id, prj_number, prj_name, prj_descrip, prj_so, prj_wo, prj_po) VALUES(_prjId, NEW.quhead_number, NEW.quhead_number, 'Auto Generated Project from Quote.', TRUE, TRUE, TRUE); END IF; END IF; -- Deal with Billing Address IF (TG_OP = 'INSERT') THEN IF (_p.cust_ffbillto) THEN -- If they didn't supply data, we'll put in the bill to address NEW.quhead_billtoname=COALESCE(NEW.quhead_billtoname,_p.cust_name,''); NEW.quhead_billtoaddress1=COALESCE(NEW.quhead_billtoaddress1,_p.addr_line1,''); NEW.quhead_billtoaddress2=COALESCE(NEW.quhead_billtoaddress2,_p.addr_line2,''); NEW.quhead_billtoaddress3=COALESCE(NEW.quhead_billtoaddress3,_p.addr_line3,''); NEW.quhead_billtocity=COALESCE(NEW.quhead_billtocity,_p.addr_city,''); NEW.quhead_billtostate=COALESCE(NEW.quhead_billtostate,_p.addr_state,''); NEW.quhead_billtozip=COALESCE(NEW.quhead_billtozip,_p.addr_postalcode,''); NEW.quhead_billtocountry=COALESCE(NEW.quhead_billtocountry,_p.addr_country,''); ELSE -- Free form not allowed, we're going to put in the address regardless NEW.quhead_billtoname=COALESCE(_p.cust_name,''); NEW.quhead_billtoaddress1=COALESCE(_p.addr_line1,''); NEW.quhead_billtoaddress2=COALESCE(_p.addr_line2,''); NEW.quhead_billtoaddress3=COALESCE(_p.addr_line3,''); NEW.quhead_billtocity=COALESCE(_p.addr_city,''); NEW.quhead_billtostate=COALESCE(_p.addr_state,''); NEW.quhead_billtozip=COALESCE(_p.addr_postalcode,''); NEW.quhead_billtocountry=COALESCE(_p.addr_country,''); END IF; END IF; -- Now let's look at Shipto Address -- If there's nothing in the address fields and there is a shipto id -- or there is a default address available, let's put in some shipto address data IF ((TG_OP = 'INSERT') AND NOT ((NEW.quhead_shipto_id IS NULL) AND NOT _p.cust_ffshipto) AND (NEW.quhead_shiptoname IS NULL) AND (NEW.quhead_shiptoaddress1 IS NULL) AND (NEW.quhead_shiptoaddress2 IS NULL) AND (NEW.quhead_shiptoaddress3 IS NULL) AND (NEW.quhead_shiptocity IS NULL) AND (NEW.quhead_shiptostate IS NULL) AND (NEW.quhead_shiptocountry IS NULL)) THEN IF ((NEW.quhead_shipto_id IS NULL) AND (_p.shipto_id IS NOT NULL)) THEN _shiptoId := _p.shipto_addr_id; ELSE _shiptoId := NEW.quhead_shipto_id; END IF; SELECT * INTO _a FROM shiptoinfo, addr WHERE ((shipto_id=_shiptoId) AND (addr_id=shipto_addr_id)); NEW.quhead_shiptoname := COALESCE(_p.shipto_name,''); NEW.quhead_shiptoaddress1 := COALESCE(_a.addr_line1,''); NEW.quhead_shiptoaddress2 := COALESCE(_a.addr_line2,''); NEW.quhead_shiptoaddress3 := COALESCE(_a.addr_line3,''); NEW.quhead_shiptocity := COALESCE(_a.addr_city,''); NEW.quhead_shiptostate := COALESCE(_a.addr_state,''); NEW.quhead_shiptozipcode := COALESCE(_a.addr_postalcode,''); NEW.quhead_shiptocountry := COALESCE(_a.addr_country,''); ELSE IF (_p.cust_ffshipto) THEN -- Use Address Save function to see if the new address entered matches -- data for the shipto number. If not that will insert new address for CRM SELECT SaveAddr( NULL, NULL, NEW.quhead_shiptoaddress1, NEW.quhead_shiptoaddress2, NEW.quhead_shiptoaddress3, NEW.quhead_shiptocity, NEW.quhead_shiptostate, NEW.quhead_shiptozipcode, NEW.quhead_shiptocountry, 'CHANGEONE') INTO _addrId; SELECT shipto_addr_id INTO _shiptoid FROM shiptoinfo WHERE (shipto_id=NEW.quhead_shipto_id); -- If the address passed doesn't match shipto address, then it's something else IF (_shiptoid <> _addrId) THEN NEW.quhead_shipto_id := NULL; END IF; ELSE SELECT quhead_shipto_id INTO _shiptoid FROM quhead WHERE (quhead_id=NEW.quhead_id); -- Get the shipto address IF (COALESCE(NEW.quhead_shipto_id,-1) <> COALESCE(_shiptoid,-1)) THEN SELECT * INTO _a FROM shiptoinfo LEFT OUTER JOIN cntct ON (shipto_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (shipto_addr_id=addr_id) WHERE (shipto_id=NEW.quhead_shipto_id); IF (FOUND) THEN -- Free form not allowed so we're going to make sure address matches Shipto data NEW.quhead_shiptoname := COALESCE(_a.shipto_name,''); NEW.quhead_shiptophone := COALESCE(_a.cntct_phone,''); NEW.quhead_shiptoaddress1 := COALESCE(_a.addr_line1,''); NEW.quhead_shiptoaddress2 := COALESCE(_a.addr_line2,''); NEW.quhead_shiptoaddress3 := COALESCE(_a.addr_line3,''); NEW.quhead_shiptocity := COALESCE(_a.addr_city,''); NEW.quhead_shiptostate := COALESCE(_a.addr_state,''); NEW.quhead_shiptozipcode := COALESCE(_a.addr_postalcode,''); NEW.quhead_shiptocountry := COALESCE(_a.addr_country,''); ELSE -- If no shipto data and free form not allowed, this won't work RAISE EXCEPTION 'Free form Shipto is not allowed on this Customer. You must supply a valid Shipto ID.'; END IF; END IF; END IF; END IF; END IF; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='SalesOrderChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'Q', NEW.quhead_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.quhead_terms_id <> NEW.quhead_terms_id) THEN PERFORM postComment( _cmnttypeid, 'Q', NEW.quhead_id, ('Terms Changed from "' || oldterms.terms_code || '" to "' || newterms.terms_code || '"') ) FROM terms AS oldterms, terms AS newterms WHERE ( (oldterms.terms_id=OLD.quhead_terms_id) AND (newterms.terms_id=NEW.quhead_terms_id) ); END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM comment WHERE ( (comment_source='Q') AND (comment_source_id=OLD.quhead_id) ); END IF; END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE RETURN NEW; END IF; END; $$; 'DROP FUNCTION public._quheadtrigger(); publicadminfalse8399212551681801_quitemaftertrigger()FUNCTIONCREATE FUNCTION _quitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check NUMERIC; BEGIN --If auto calculate freight, recalculate quhead_freight IF (SELECT quhead_calcfreight FROM quhead WHERE (quhead_id=NEW.quitem_quhead_id)) THEN UPDATE quhead SET quhead_freight = (SELECT SUM(freightdata_total) FROM freightDetail('QU', quhead_id, quhead_cust_id, quhead_shipto_id, quhead_quotedate, quhead_shipvia, quhead_curr_id)) WHERE quhead_id=NEW.quitem_quhead_id; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._quitemaftertrigger(); publicadminfalse8399212551681802_quitembeforetrigger()FUNCTIONCREATE FUNCTION _quitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check NUMERIC; _itemNumber TEXT; BEGIN -- Check IF (NEW.quitem_scheddate IS NULL) THEN RAISE EXCEPTION 'A schedule date is required.'; END IF; -- If this is imported, go ahead and insert default characteristics IF ((TG_OP = 'INSERT') AND NEW.quitem_imported) THEN PERFORM updateCharAssignment('SI', NEW.quitem_id, char_id, charass_value) FROM ( SELECT DISTINCT char_id, char_name, charass_value FROM charass, char, itemsite, item WHERE ((itemsite_id=NEW.quitem_itemsite_id) AND (itemsite_item_id=item_id) AND (charass_target_type='I') AND (charass_target_id=item_id) AND (charass_default) AND (char_id=charass_char_id)) ORDER BY char_name) AS data; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._quitembeforetrigger(); publicadminfalse3992812551681803_quitemtrigger()FUNCTION*CREATE FUNCTION _quitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _check BOOLEAN; BEGIN -- Checks SELECT checkPrivilege('MaintainQuotes') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Quotes.'; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='SalesOrderChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); ELSE _cmnttypeid := -1; END IF; IF (TG_OP = 'INSERT') THEN IF (_cmnttypeid <> -1) THEN PERFORM postComment(_cmnttypeid, 'QI', NEW.quitem_id, 'Created'); END IF; RETURN NEW; ELSE IF (TG_OP = 'DELETE') THEN DELETE FROM comment WHERE ( (comment_source='QI') AND (comment_source_id=OLD.quitem_id) ); DELETE FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=OLD.quitem_id)); RETURN OLD; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.quitem_qtyord <> OLD.quitem_qtyord) THEN IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'QI', NEW.quitem_id, ( 'Changed Qty. Ordered from ' || formatQty(OLD.quitem_qtyord) || ' to ' || formatQty(NEW.quitem_qtyord) ) ); END IF; END IF; IF (NEW.quitem_scheddate <> OLD.quitem_scheddate) THEN IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'QI', NEW.quitem_id, ( 'Changed Sched. Date from ' || formatDate(OLD.quitem_scheddate) || ' to ' || formatDate(NEW.quitem_scheddate)) ); END IF; END IF; END IF; END IF; END IF; -- NEW.quitem_lastupdated = CURRENT_TIMESTAMP; RETURN NEW; END; $$; 'DROP FUNCTION public._quitemtrigger(); publicadminfalse8399212551681804_recuraftertrigger()FUNCTIONCREATE FUNCTION _recuraftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _parentid INTEGER; _parenttype TEXT; BEGIN IF (TG_OP = 'DELETE') THEN IF (UPPER(OLD.recur_parent_type) = 'TODO') THEN UPDATE todoitem SET todoitem_recurring_todoitem_id=NULL WHERE (todoitem_recurring_todoitem_id=OLD.recur_parent_id); END IF; RETURN OLD; END IF; RETURN NEW; END; $$; +DROP FUNCTION public._recuraftertrigger(); publicadminfalse8399212551681805_reporttrigger()FUNCTIONCREATE FUNCTION _reporttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN NEW.report_loaddate = CURRENT_TIMESTAMP; RETURN NEW; END; $$; 'DROP FUNCTION public._reporttrigger(); publicadminfalse8399212551745230_salesrepafterdeletetrigger()FUNCTIONCREATE FUNCTION _salesrepafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN IF (SELECT fetchMetricValue('DefaultSalesRep') = OLD.salesrep_id) THEN RAISE EXCEPTION 'Cannot delete the default Sales Rep [xtuple: salesrep, -1, %]', OLD.salesrep_number; END IF; PERFORM postComment('ChangeLog', 'SR', OLD.salesrep_id, 'Deleted "' || OLD.salesrep_number || '"'); RETURN OLD; END; $$; 4DROP FUNCTION public._salesrepafterdeletetrigger(); publicadminfalse8399212551681806_salesrepaftertrigger()FUNCTIONg CREATE FUNCTION _salesrepaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_salesrep_id=NEW.salesrep_id, crmacct_name=NEW.salesrep_name WHERE crmacct_number=NEW.salesrep_number; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_salesrep_id ) VALUES (NEW.salesrep_number, NEW.salesrep_name, NEW.salesrep_active, 'I', NEW.salesrep_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; -- TODO: default characteristic assignments? ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.salesrep_number WHERE ((crmacct_salesrep_id=NEW.salesrep_id) AND (crmacct_number!=NEW.salesrep_number)); UPDATE crmacct SET crmacct_name = NEW.salesrep_name WHERE ((crmacct_salesrep_id=NEW.salesrep_id) AND (crmacct_name!=NEW.salesrep_name)); END IF; IF (fetchMetricBool('SalesRepChangeLog')) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.salesrep_active <> NEW.salesrep_active) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, CASE WHEN NEW.salesrep_active THEN 'Activated' ELSE 'Deactivated' END); END IF; IF (OLD.salesrep_number <> NEW.salesrep_number) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Number changed from "' || OLD.salesrep_number || '" to "' || NEW.salesrep_number || '"'); END IF; IF (OLD.salesrep_name <> NEW.salesrep_name) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Name changed from "' || OLD.salesrep_name || '" to "' || NEW.salesrep_name || '"'); END IF; IF (OLD.salesrep_commission <> NEW.salesrep_commission) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Commission changed from "' || OLD.salesrep_commission || '" to "' || NEW.salesrep_commission || '"'); END IF; IF (OLD.salesrep_method <> NEW.salesrep_method) THEN PERFORM postComment('ChangeLog', 'SR', NEW.salesrep_id, 'Method changed from "' || OLD.salesrep_method || '" to "' || NEW.salesrep_method || '"'); END IF; END IF; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._salesrepaftertrigger(); publicadminfalse8399212551681807_salesrepbeforetrigger()FUNCTIONCREATE FUNCTION _salesrepbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainSalesReps')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Sales Reps.'; END IF; IF (TG_OP IN ('INSERT', 'UPDATE')) THEN IF (NEW.salesrep_number IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Sales Rep Number.'; END IF; IF (NEW.salesrep_commission IS NULL) THEN RAISE EXCEPTION 'You must supply a Commission Rate for this Sales Rep.'; END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O') AND isNumeric(NEW.salesrep_number)) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('CRMAccountNumber', NEW.salesrep_number); END IF; NEW.salesrep_number = UPPER(NEW.salesrep_number); -- deprecated column salesrep_emp_id -- TODO: will this prevent breaking the crmacct-emp relationship? IF (TG_OP = 'UPDATE') THEN SELECT crmacct_emp_id INTO NEW.salesrep_emp_id FROM crmacct WHERE crmacct_salesrep_id = NEW.salesrep_id; END IF; ELSIF (TG_OP = 'DELETE') THEN UPDATE crmacct SET crmacct_salesrep_id = NULL WHERE crmacct_salesrep_id = OLD.salesrep_id; RETURN OLD; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._salesrepbeforetrigger(); publicadminfalse3992812551758445_saletypebeforedeletetrigger()FUNCTIONCREATE FUNCTION _saletypebeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check TEXT; BEGIN -- Check to see if any sales orders are assigned to the passed saletype SELECT cohead_number INTO _check FROM cohead WHERE (cohead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Sales Order % and possibly more. [xtuple: deletesaletype, -1]', _check; END IF; -- Check to see if any quotes are assigned to the passed saletype SELECT quhead_number INTO _check FROM quhead WHERE (quhead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Quote % and possibly more. [xtuple: deletesaletype, -2]', _check; END IF; -- Check to see if any invoice are assigned to the passed saletype SELECT invchead_invcnumber INTO _check FROM invchead WHERE (invchead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Invoice % and possibly more. [xtuple: deletesaletype, -3]', _check; END IF; -- Check to see if any credit memos are assigned to the passed saletype SELECT cmhead_number INTO _check FROM cmhead WHERE (cmhead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Credit Memo % and possibly more. [xtuple: deletesaletype, -4]', _check; END IF; -- Check to see if any return ruthorizations are assigned to the passed saletype IF (fetchMetricBool('EnableReturnAuth')) THEN SELECT rahead_number INTO _check FROM rahead WHERE (rahead_saletype_id=OLD.saletype_id) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Assigned to Return Authorization % and possibly more returns. [xtuple: deleteSaleType, -5]', _check; END IF; END IF; RETURN OLD; END; $$; 5DROP FUNCTION public._saletypebeforedeletetrigger(); publicadminfalse8399212551681808_shipdatasumtrigger()FUNCTIONiCREATE FUNCTION _shipdatasumtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (LENGTH(TRIM(NEW.shipdatasum_shiphead_number)) = 0) THEN NEW.shipdatasum_shiphead_number = NULL; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._shipdatasumtrigger(); publicadminfalse8399212551681809_shipdatatrigger()FUNCTIONCREATE FUNCTION _shipdatatrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _newShipdata_cohead_number INTEGER; _shipdatasum_shipper TEXT; _rows INTEGER; _cohead_id INTEGER; _shiphead_number TEXT; _headcount INTEGER; BEGIN -- This is where the shipper is identified and may need to be changed NEW.shipdata_cohead_number := TRIM(NEW.shipdata_cohead_number); IF (substring(NEW.shipdata_cosmisc_tracknum from 1 for 2) = '1Z') THEN _shipdatasum_shipper := 'UPS'; ELSE _shipdatasum_shipper := 'UNKNOWN'; END IF; IF (LENGTH(TRIM(NEW.shipdata_shiphead_number)) = 0) THEN NEW.shipdata_shiphead_number := NULL; END IF; IF (NEW.shipdata_cosmisc_tracknum = NEW.shipdata_cosmisc_packnum_tracknum) THEN IF (NEW.shipdata_void_ind = 'Y') THEN -- Delete the current shipdatasum DELETE FROM shipdatasum WHERE ((shipdatasum_cohead_number = NEW.shipdata_cohead_number) AND (shipdatasum_cosmisc_tracknum = NEW.shipdata_cosmisc_tracknum)); ELSIF (TG_OP = 'INSERT') THEN -- RAISE NOTICE 'Getting cohead_id (%)', NEW.shipdata_cohead_number; IF (NEW.shipdata_shiphead_number IS NULL) THEN SELECT cohead_id INTO _cohead_id FROM cohead WHERE cohead_number = NEW.shipdata_cohead_number; IF (FOUND) THEN -- RAISE NOTICE 'Getting shiphead number (%)', _cohead_id; SELECT count(shiphead_order_id), MAX(shiphead_number) INTO _headcount, _shiphead_number FROM shiphead WHERE ((shiphead_tracknum IS NULL OR shiphead_tracknum = '') AND ( shiphead_order_type = 'SO' and shiphead_order_id = _cohead_id) ); IF (_headcount = 1) THEN -- RAISE NOTICE 'Updating Shiphead Number (%)', _shiphead_number; NEW.shipdata_shiphead_number = _shiphead_number; ELSIF (_headcount > 1) THEN -- Trap for potential workflow problem. Can only infer shiphead from sales order number -- if shipping one at a time RAISE EXCEPTION 'Multiple shipments exist for this order. Please provide a specific a shipment number.'; END IF; END IF; END IF; INSERT INTO shipdatasum (shipdatasum_cohead_number, shipdatasum_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum, shipdatasum_weight, shipdatasum_base_freight, shipdatasum_total_freight, shipdatasum_base_freight_curr_id, shipdatasum_total_freight_curr_id, shipdatasum_shipper, shipdatasum_billing_option, shipdatasum_package_type, shipdatasum_shiphead_number) VALUES (NEW.shipdata_cohead_number, NEW.shipdata_cosmisc_tracknum, NEW.shipdata_cosmisc_packnum_tracknum, NEW.shipdata_weight, NEW.shipdata_base_freight, NEW.shipdata_total_freight, NEW.shipdata_base_freight_curr_id, NEW.shipdata_total_freight_curr_id, _shipdatasum_shipper, NEW.shipdata_billing_option, NEW.shipdata_package_type, NEW.shipdata_shiphead_number); ELSIF (TG_OP = 'UPDATE') THEN UPDATE shipdatasum SET shipdatasum_cohead_number=NEW.shipdata_cohead_number, shipdatasum_cosmisc_tracknum=NEW.shipdata_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum=NEW.shipdata_cosmisc_packnum_tracknum, shipdatasum_weight=NEW.shipdata_weight, shipdatasum_base_freight=NEW.shipdata_base_freight, shipdatasum_total_freight=NEW.shipdata_total_freight, shipdatasum_base_freight_curr_id=NEW.shipdata_base_freight_curr_id, shipdatasum_total_freight_curr_id=NEW.shipdata_total_freight_curr_id, shipdatasum_shipper=_shipdatasum_shipper, shipdatasum_billing_option=NEW.shipdata_billing_option, shipdatasum_package_type=NEW.shipdata_package_type, shipdatasum_shiphead_number=NEW.shipdata_shiphead_number WHERE ((TRIM(shipdatasum_cohead_number)=TRIM(OLD.shipdata_cohead_number)) AND (TRIM(shipdatasum_cosmisc_tracknum)=TRIM(OLD.shipdata_cosmisc_tracknum)) AND (TRIM(shipdatasum_cosmisc_packnum_tracknum)=TRIM(OLD.shipdata_cosmisc_packnum_tracknum))); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows <= 0) THEN INSERT INTO shipdatasum (shipdatasum_cohead_number, shipdatasum_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum, shipdatasum_weight, shipdatasum_base_freight, shipdatasum_total_freight, shipdatasum_base_freight_curr_id, shipdatasum_total_freight_curr_id, shipdatasum_shipper, shipdatasum_billing_option, shipdatasum_package_type, shipdatasum_shiphead_number) VALUES (NEW.shipdata_cohead_number, NEW.shipdata_cosmisc_tracknum, NEW.shipdata_cosmisc_packnum_tracknum, NEW.shipdata_weight, NEW.shipdata_base_freight, NEW.shipdata_total_freight, NEW.shipdata_base_freight_curr_id, NEW.shipdata_total_freight_curr_id, _shipdatasum_shipper, NEW.shipdata_billing_option, NEW.shipdata_package_type, NEW.shipdata_shiphead_number); END IF; END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._shipdatatrigger(); publicadminfalse8399212551745234_shipformafterdeletetrigger()FUNCTIONCREATE FUNCTION _shipformafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (fetchMetricValue('DefaultShipFormId') = OLD.shipform_id) THEN RAISE EXCEPTION 'Cannot delete the default Shipping Form [xtuple: shipform, -1, %, %]', OLD.shipform_name, OLD.shipform_report_name; END IF; RETURN OLD; END; $$; 4DROP FUNCTION public._shipformafterdeletetrigger(); publicadminfalse8399212551681810_shipheadbeforetrigger()FUNCTIONCREATE FUNCTION _shipheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF ((TG_OP = 'INSERT') OR (TG_OP = 'UPDATE')) THEN IF (NEW.shiphead_order_type = 'SO' AND NEW.shiphead_order_id IN (SELECT cohead_id FROM cohead)) THEN RETURN NEW; ELSEIF (NEW.shiphead_order_type = 'TO' AND NEW.shiphead_order_id IN (SELECT tohead_id FROM tohead)) THEN RETURN NEW; END IF; RAISE EXCEPTION '% with id % does not exist', NEW.shiphead_order_type, NEW.shiphead_order_id; RETURN OLD; END IF; RETURN NEW; END; $$; /DROP FUNCTION public._shipheadbeforetrigger(); publicadminfalse8399212551681811_shiptoinfoaftertrigger()FUNCTIONwCREATE FUNCTION _shiptoinfoaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF (NEW.shipto_default) THEN UPDATE shiptoinfo SET shipto_default = false WHERE ((shipto_cust_id=NEW.shipto_cust_id) AND (shipto_id <> NEW.shipto_id)); END IF; IF (SELECT fetchMetricBool('CustomerChangeLog')) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'C', NEW.shipto_cust_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.shipto_name <> NEW.shipto_name) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To Name Changed from "' || COALESCE(OLD.shipto_name, '') || '" to "' || COALESCE(NEW.shipto_name, '') || '"' ) ); END IF; IF (OLD.shipto_shipvia <> NEW.shipto_shipvia) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To ShipVia Changed from "' || COALESCE(OLD.shipto_shipvia, '') || '" to "' || COALESCE(NEW.shipto_shipvia, '') || '"' ) ); END IF; IF (COALESCE(OLD.shipto_taxzone_id, -1) <> COALESCE(NEW.shipto_taxzone_id, -1)) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To Tax Zone Changed from "' || COALESCE((SELECT taxzone_code FROM taxzone WHERE taxzone_id=OLD.shipto_taxzone_id), 'None') || '" to "' || COALESCE((SELECT taxzone_code FROM taxzone WHERE taxzone_id=NEW.shipto_taxzone_id), 'None') || '"' ) ); END IF; IF (OLD.shipto_shipzone_id <> NEW.shipto_shipzone_id) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To Shipping Zone Changed from "' || (SELECT shipzone_name FROM shipzone WHERE shipzone_id=OLD.shipto_shipzone_id) || '" to "' || (SELECT shipzone_name FROM shipzone WHERE shipzone_id=NEW.shipto_shipzone_id) || '"' ) ); END IF; IF (OLD.shipto_salesrep_id <> NEW.shipto_salesrep_id) THEN PERFORM postComment( _cmnttypeid, 'C', NEW.shipto_cust_id, ( NEW.shipto_name || ': Ship To Sales Rep Changed from "' || (SELECT salesrep_name FROM salesrep WHERE salesrep_id=OLD.shipto_salesrep_id) || '" to "' || (SELECT salesrep_name FROM salesrep WHERE salesrep_id=NEW.shipto_salesrep_id) || '"' ) ); END IF; IF (OLD.shipto_active <> NEW.shipto_active) THEN IF (NEW.shipto_active) THEN PERFORM postComment(_cmnttypeid, 'C', NEW.shipto_cust_id, (NEW.shipto_name || ': Ship To Activated')); ELSE PERFORM postComment(_cmnttypeid, 'C', NEW.shipto_cust_id, (NEW.shipto_name || ': Ship To Deactivated')); END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; $$; 0DROP FUNCTION public._shiptoinfoaftertrigger(); publicadminfalse8399212551745238_shipviaafterdeletetrigger()FUNCTIONCREATE FUNCTION _shipviaafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (SELECT fetchMetricValue('DefaultShipViaId') = OLD.shipvia_id) THEN RAISE EXCEPTION 'Cannot delete the default Ship-Via [xtuple: shipvia, -1, %]', OLD.shipvia_code; END IF; RETURN OLD; END; $$; 3DROP FUNCTION public._shipviaafterdeletetrigger(); publicadminfalse8399212551681812_sltransaltertrigger()FUNCTION CREATE FUNCTION _sltransaltertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _externalCompany BOOLEAN := false; _updated BOOLEAN := false; BEGIN IF(TG_OP='DELETE') THEN RAISE EXCEPTION 'You may not delete Journal Transactions once they have been created.'; ELSIF (TG_OP = 'UPDATE') THEN IF(OLD.sltrans_id != NEW.sltrans_id) THEN _updated := true; ELSIF(OLD.sltrans_date != NEW.sltrans_date) THEN _updated := true; ELSIF(OLD.sltrans_accnt_id != NEW.sltrans_accnt_id) THEN _updated := true; ELSIF(OLD.sltrans_amount != NEW.sltrans_amount) THEN _updated := true; ELSIF(OLD.sltrans_username != NEW.sltrans_username) THEN _updated := true; ELSIF( (OLD.sltrans_sequence IS NULL AND NEW.sltrans_sequence IS NOT NULL) OR (OLD.sltrans_sequence IS NOT NULL AND NEW.sltrans_sequence IS NULL) OR (COALESCE(OLD.sltrans_sequence,0) != COALESCE(NEW.sltrans_sequence,0)) ) THEN _updated := true; ELSIF( (OLD.sltrans_created IS NULL AND NEW.sltrans_created IS NOT NULL) OR (OLD.sltrans_created IS NOT NULL AND NEW.sltrans_created IS NULL) OR (COALESCE(OLD.sltrans_created,now()) != COALESCE(NEW.sltrans_created,now())) ) THEN _updated := true; ELSIF( (OLD.sltrans_source IS NULL AND NEW.sltrans_source IS NOT NULL) OR (OLD.sltrans_source IS NOT NULL AND NEW.sltrans_source IS NULL) OR (COALESCE(OLD.sltrans_source,'') != COALESCE(NEW.sltrans_source,'')) ) THEN _updated := true; ELSIF( (OLD.sltrans_docnumber IS NULL AND NEW.sltrans_docnumber IS NOT NULL) OR (OLD.sltrans_docnumber IS NOT NULL AND NEW.sltrans_docnumber IS NULL) OR (COALESCE(OLD.sltrans_docnumber,'') != COALESCE(NEW.sltrans_docnumber,'')) ) THEN _updated := true; ELSIF( (OLD.sltrans_doctype IS NULL AND NEW.sltrans_doctype IS NOT NULL) OR (OLD.sltrans_doctype IS NOT NULL AND NEW.sltrans_doctype IS NULL) OR (COALESCE(OLD.sltrans_doctype,'') != COALESCE(NEW.sltrans_doctype,'')) ) THEN _updated := true; END IF; IF(_updated) THEN RAISE EXCEPTION 'You may not alter some Journal Transaction fields once they have been created.'; END IF; ELSE RAISE EXCEPTION 'trigger for sltrans table called in unexpected state.'; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._sltransaltertrigger(); publicadminfalse8399212551681813_sltransinserttrigger()FUNCTIONkCREATE FUNCTION _sltransinserttrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _reqNotes BOOLEAN; _externalCompany BOOLEAN := false; BEGIN -- Checks SELECT company_external INTO _externalCompany FROM company JOIN accnt ON (company_number=accnt_company) WHERE (accnt_id=NEW.sltrans_accnt_id); IF (_externalCompany) THEN RAISE EXCEPTION 'Transactions are not allowed for G/L Accounts with External Company segments.'; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._sltransinserttrigger(); publicadminfalse83992I12551681814_soheadtrigger()FUNCTION_CREATE FUNCTION _soheadtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _p RECORD; _a RECORD; _w RECORD; _shiptoId INTEGER; _addrId INTEGER; _prjId INTEGER; _check BOOLEAN; _numGen CHAR(1); BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN IF ( (NOT checkPrivilege('MaintainSalesOrders')) AND (NOT checkPrivilege('EnterReceipts')) ) THEN RAISE EXCEPTION 'You do not have privileges to create a Sales Order.'; END IF; ELSIF (TG_OP = 'UPDATE') THEN IF ( (NOT checkPrivilege('MaintainSalesOrders')) AND (NOT checkPrivilege('IssueStockToShipping')) AND (NEW.cohead_holdtype = OLD.cohead_holdtype) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Sales Order.'; END IF; ELSE IF ( (NOT checkPrivilege('MaintainSalesOrders')) AND (NOT checkPrivilege('IssueStockToShipping')) ) THEN RAISE EXCEPTION 'You do not have privileges to alter a Sales Order.'; END IF; END IF; -- If this is imported, check the order number IF (TG_OP = 'INSERT') THEN IF (NEW.cohead_imported) THEN SELECT fetchMetricText('CONumberGeneration') INTO _numGen; IF ((NEW.cohead_number IS NULL) AND (_numGen='M')) THEN RAISE EXCEPTION 'You must supply an Order Number.'; ELSE IF (NEW.cohead_number IS NULL) THEN SELECT fetchsonumber() INTO NEW.cohead_number; END IF; END IF; END IF; IF (fetchMetricText('CONumberGeneration') IN ('A','O')) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('SoNumber', NEW.cohead_number); END IF; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.cohead_number <> OLD.cohead_number) THEN RAISE EXCEPTION 'The order number may not be changed.'; END IF; END IF; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN -- Get Customer data IF (NEW.cohead_shipto_id IS NULL) THEN SELECT cust_creditstatus,cust_number,cust_usespos,cust_blanketpos,cust_ffbillto, cust_ffshipto,cust_name,cust_salesrep_id,cust_terms_id,cust_shipvia, cust_shipchrg_id,cust_shipform_id,cust_commprcnt,cust_curr_id,cust_taxzone_id, cntct.*,addr.*, shipto_id,shipto_addr_id,shipto_name,shipto_salesrep_id,shipto_shipvia, shipto_shipchrg_id,shipto_shipform_id,shipto_commission,shipto_taxzone_id INTO _p FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) LEFT OUTER JOIN shiptoinfo ON ((cust_id=shipto_cust_id) AND shipto_default) WHERE (cust_id=NEW.cohead_cust_id); ELSE SELECT cust_creditstatus,cust_number,cust_usespos,cust_blanketpos,cust_ffbillto, cust_ffshipto,cust_name,cust_salesrep_id,cust_terms_id,cust_shipvia, cust_shipchrg_id,cust_shipform_id,cust_commprcnt,cust_curr_id,cust_taxzone_id, cntct.*,addr.*, shipto_id,shipto_addr_id,shipto_name,shipto_salesrep_id,shipto_shipvia, shipto_shipchrg_id,shipto_shipform_id,shipto_commission,shipto_taxzone_id INTO _p FROM shiptoinfo,custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE ((cust_id=NEW.cohead_cust_id) AND (shipto_id=NEW.cohead_shipto_id)); END IF; -- If there is customer data, then we can get to work IF (FOUND) THEN -- Check Credit IF (TG_OP = 'INSERT') THEN IF (_p.cust_creditstatus = 'H') THEN SELECT checkPrivilege('CreateSOForHoldCustomer') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'Customer % has been placed on a Credit Hold and you do not have privilege to create Sales Orders for Customers on Credit Hold. The selected Customer must be taken off of Credit Hold before you may create a new Sales Order for the Customer.',_p.cust_number; ELSE NEW.cohead_holdtype='C'; END IF; END IF; IF (_p.cust_creditstatus = 'W') THEN SELECT checkPrivilege('CreateSOForWarnCustomer') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'Customer % has been placed on a Credit Warning and you do not have privilege to create Sales Orders for Customers on Credit Warning. The selected Customer must be taken off of Credit Warning before you may create a new Sales Order for the Customer.',_p.cust_number; ELSE NEW.cohead_holdtype='C'; END IF; END IF; -- Set to defaults if values not provided NEW.cohead_shipto_id := COALESCE(NEW.cohead_shipto_id,_p.shipto_id); NEW.cohead_terms_id := COALESCE(NEW.cohead_terms_id,_p.cust_terms_id); NEW.cohead_orderdate := COALESCE(NEW.cohead_orderdate,current_date); NEW.cohead_packdate := COALESCE(NEW.cohead_packdate,NEW.cohead_orderdate); NEW.cohead_curr_id := COALESCE(NEW.cohead_curr_id,_p.cust_curr_id,basecurrid()); NEW.cohead_freight := COALESCE(NEW.cohead_freight,0); NEW.cohead_custponumber := COALESCE(NEW.cohead_custponumber,''); NEW.cohead_ordercomments := COALESCE(NEW.cohead_ordercomments,''); NEW.cohead_shipcomments := COALESCE(NEW.cohead_shipcomments,''); NEW.cohead_shiptophone := COALESCE(NEW.cohead_shiptophone,''); NEW.cohead_misc := COALESCE(NEW.cohead_misc,0); NEW.cohead_misc_descrip := COALESCE(NEW.cohead_misc_descrip,''); NEW.cohead_shipcomplete := COALESCE(NEW.cohead_shipcomplete,false); IF (_p.shipto_id IS NOT NULL) THEN -- Pull in over ride values NEW.cohead_salesrep_id := COALESCE(NEW.cohead_salesrep_id,_p.shipto_salesrep_id); NEW.cohead_shipvia := COALESCE(NEW.cohead_shipvia,_p.shipto_shipvia); NEW.cohead_shipchrg_id := COALESCE(NEW.cohead_shipchrg_id,_p.shipto_shipchrg_id); NEW.cohead_shipform_id := COALESCE(NEW.cohead_shipform_id,_p.shipto_shipform_id); NEW.cohead_commission := COALESCE(NEW.cohead_commission,_p.shipto_commission); IF (NEW.cohead_taxzone_id=-1) THEN NEW.cohead_taxzone_id := NULL; ELSE NEW.cohead_taxzone_id := COALESCE(NEW.cohead_taxzone_id,_p.shipto_taxzone_id); END IF; ELSE NEW.cohead_salesrep_id := COALESCE(NEW.cohead_salesrep_id,_p.cust_salesrep_id); NEW.cohead_shipvia := COALESCE(NEW.cohead_shipvia,_p.cust_shipvia); NEW.cohead_shipchrg_id := COALESCE(NEW.cohead_shipchrg_id,_p.cust_shipchrg_id); NEW.cohead_shipform_id := COALESCE(NEW.cohead_shipform_id,_p.cust_shipform_id); NEW.cohead_commission := COALESCE(NEW.cohead_commission,_p.cust_commprcnt); IF (NEW.cohead_taxzone_id=-1) THEN NEW.cohead_taxzone_id := NULL; ELSE NEW.cohead_taxzone_id := COALESCE(NEW.cohead_taxzone_id,_p.cust_taxzone_id); END IF; END IF; IF ((NEW.cohead_warehous_id IS NULL) OR (NEW.cohead_fob IS NULL)) THEN IF (NEW.cohead_warehous_id IS NULL) THEN SELECT warehous_id,warehous_fob INTO _w FROM usrpref, whsinfo WHERE ((warehous_id=CAST(usrpref_value AS INTEGER)) AND (warehous_shipping) AND (warehous_active) AND (usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse')); ELSE SELECT warehous_id,warehous_fob INTO _w FROM whsinfo WHERE (warehous_id=NEW.cohead_warehous_id); END IF; IF (FOUND) THEN NEW.cohead_warehous_id := COALESCE(NEW.cohead_warehous_id,_w.warehous_id); NEW.cohead_fob := COALESCE(NEW.cohead_fob,_w.warehous_fob); END IF; END IF; END IF; -- Only Check P/O logic for imports, because UI checks when entire order is saved IF (NEW.cohead_imported) THEN -- Check for required Purchase Order IF (_p.cust_usespos AND ((NEW.cohead_custponumber IS NULL) OR (TRIM(BOTH FROM NEW.cohead_custponumber)=''))) THEN RAISE EXCEPTION 'You must enter a Customer P/O for this Sales Order.'; END IF; -- Check for duplicate Purchase Orders if not allowed IF (_p.cust_usespos AND NOT (_p.cust_blanketpos)) THEN SELECT cohead_id INTO _a FROM cohead WHERE ((cohead_cust_id=NEW.cohead_cust_id) AND (cohead_id<>NEW.cohead_id) AND (UPPER(cohead_custponumber) = UPPER(NEW.cohead_custponumber)) ) UNION SELECT quhead_id FROM quhead WHERE ((quhead_cust_id=NEW.cohead_cust_id) AND (quhead_id<>NEW.cohead_id) AND (UPPER(quhead_custponumber) = UPPER(NEW.cohead_custponumber)) ); IF (FOUND) THEN RAISE EXCEPTION 'This Customer does not use Blanket P/O Numbers and the P/O Number you entered has already been used for another Sales Order. Please verify the P/O Number and either enter a new P/O Number or add to the existing Sales Order.'; END IF; END IF; END IF; --Auto create project if applicable IF ((TG_OP = 'INSERT') AND (NEW.cohead_prj_id IS NULL)) THEN SELECT fetchMetricBool('AutoCreateProjectsForOrders') INTO _check; IF (_check) THEN SELECT NEXTVAL('prj_prj_id_seq') INTO _prjId; NEW.cohead_prj_id := _prjId; INSERT INTO prj (prj_id, prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po) VALUES(_prjId, NEW.cohead_number, NEW.cohead_number, 'Auto Generated Project from Sales Order.', 'O', TRUE, TRUE, TRUE); END IF; END IF; IF (TG_OP = 'UPDATE') THEN SELECT true INTO _check FROM coitem WHERE ( (coitem_status='C') AND (coitem_cohead_id=NEW.cohead_id) ) LIMIT 1; IF (NOT FOUND) THEN --Update project references on supply UPDATE pr SET pr_prj_id=NEW.cohead_prj_id FROM coitem WHERE ((coitem_cohead_id=NEW.cohead_id) AND (coitem_order_type='R') AND (coitem_order_id=pr_id)); PERFORM changeWoProject(coitem_order_id, NEW.cohead_prj_id, TRUE) FROM coitem WHERE ((coitem_cohead_id=NEW.cohead_id) AND (coitem_order_type='W')); ELSE IF NEW.cohead_prj_id <> COALESCE(OLD.cohead_prj_id,-1) THEN RAISE EXCEPTION 'You can not change the project ID on orders with closed lines.'; END IF; END IF; END IF; -- Deal with Billing Address IF (TG_OP = 'INSERT') THEN IF (_p.cust_ffbillto) THEN -- If they didn't supply data, we'll put in the bill to contact and address NEW.cohead_billto_cntct_id=COALESCE(NEW.cohead_billto_cntct_id,_p.cntct_id); NEW.cohead_billto_cntct_honorific=COALESCE(NEW.cohead_billto_cntct_honorific,_p.cntct_honorific,''); NEW.cohead_billto_cntct_first_name=COALESCE(NEW.cohead_billto_cntct_first_name,_p.cntct_first_name,''); NEW.cohead_billto_cntct_middle=COALESCE(NEW.cohead_billto_cntct_middle,_p.cntct_middle,''); NEW.cohead_billto_cntct_last_name=COALESCE(NEW.cohead_billto_cntct_last_name,_p.cntct_last_name,''); NEW.cohead_billto_cntct_phone=COALESCE(NEW.cohead_billto_cntct_phone,_p.cntct_phone,''); NEW.cohead_billto_cntct_title=COALESCE(NEW.cohead_billto_cntct_title,_p.cntct_title,''); NEW.cohead_billto_cntct_fax=COALESCE(NEW.cohead_billto_cntct_fax,_p.cntct_fax,''); NEW.cohead_billto_cntct_email=COALESCE(NEW.cohead_billto_cntct_email,_p.cntct_email,''); NEW.cohead_billtoname=COALESCE(NEW.cohead_billtoname,_p.cust_name,''); NEW.cohead_billtoaddress1=COALESCE(NEW.cohead_billtoaddress1,_p.addr_line1,''); NEW.cohead_billtoaddress2=COALESCE(NEW.cohead_billtoaddress2,_p.addr_line2,''); NEW.cohead_billtoaddress3=COALESCE(NEW.cohead_billtoaddress3,_p.addr_line3,''); NEW.cohead_billtocity=COALESCE(NEW.cohead_billtocity,_p.addr_city,''); NEW.cohead_billtostate=COALESCE(NEW.cohead_billtostate,_p.addr_state,''); NEW.cohead_billtozipcode=COALESCE(NEW.cohead_billtozipcode,_p.addr_postalcode,''); NEW.cohead_billtocountry=COALESCE(NEW.cohead_billtocountry,_p.addr_country,''); ELSE -- Free form not allowed, we're going to put in the address regardless NEW.cohead_billto_cntct_id=_p.cntct_id; NEW.cohead_billto_cntct_honorific=COALESCE(_p.cntct_honorific,''); NEW.cohead_billto_cntct_first_name=COALESCE(_p.cntct_first_name,''); NEW.cohead_billto_cntct_middle=COALESCE(_p.cntct_middle,''); NEW.cohead_billto_cntct_last_name=COALESCE(_p.cntct_last_name,''); NEW.cohead_billto_cntct_phone=COALESCE(_p.cntct_phone,''); NEW.cohead_billto_cntct_title=COALESCE(_p.cntct_title,''); NEW.cohead_billto_cntct_fax=COALESCE(_p.cntct_fax,''); NEW.cohead_billto_cntct_email=COALESCE(_p.cntct_email,''); NEW.cohead_billtoname=COALESCE(_p.cust_name,''); NEW.cohead_billtoaddress1=COALESCE(_p.addr_line1,''); NEW.cohead_billtoaddress2=COALESCE(_p.addr_line2,''); NEW.cohead_billtoaddress3=COALESCE(_p.addr_line3,''); NEW.cohead_billtocity=COALESCE(_p.addr_city,''); NEW.cohead_billtostate=COALESCE(_p.addr_state,''); NEW.cohead_billtozipcode=COALESCE(_p.addr_postalcode,''); NEW.cohead_billtocountry=COALESCE(_p.addr_country,''); END IF; END IF; -- Now let's look at Shipto Address -- If there's nothing in the address fields and there is a shipto id -- or there is a default address available, let's put in some shipto address data IF ((TG_OP = 'INSERT') AND NOT ((NEW.cohead_shipto_id IS NULL) AND NOT _p.cust_ffshipto) AND (NEW.cohead_shipto_cntct_id IS NULL) AND (NEW.cohead_shipto_cntct_honorific IS NULL) AND (NEW.cohead_shipto_cntct_first_name IS NULL) AND (NEW.cohead_shipto_cntct_middle IS NULL) AND (NEW.cohead_shipto_cntct_last_name IS NULL) AND (NEW.cohead_shipto_cntct_suffix IS NULL) AND (NEW.cohead_shipto_cntct_phone IS NULL) AND (NEW.cohead_shipto_cntct_title IS NULL) AND (NEW.cohead_shipto_cntct_fax IS NULL) AND (NEW.cohead_shipto_cntct_email IS NULL) AND (NEW.cohead_shiptoname IS NULL) AND (NEW.cohead_shiptoaddress1 IS NULL) AND (NEW.cohead_shiptoaddress2 IS NULL) AND (NEW.cohead_shiptoaddress3 IS NULL) AND (NEW.cohead_shiptocity IS NULL) AND (NEW.cohead_shiptostate IS NULL) AND (NEW.cohead_shiptocountry IS NULL)) THEN IF ((NEW.cohead_shipto_id IS NULL) AND (_p.shipto_id IS NOT NULL)) THEN _shiptoId := _p.shipto_addr_id; ELSE _shiptoId := NEW.cohead_shipto_id; END IF; SELECT * INTO _a FROM shiptoinfo LEFT OUTER JOIN addr ON (addr_id=shipto_addr_id) LEFT OUTER JOIN cntct ON (cntct_id=shipto_cntct_id) WHERE (shipto_id=_shiptoId); NEW.cohead_shipto_cntct_id := _a.cntct_id; NEW.cohead_shipto_cntct_honorific := COALESCE(_a.cntct_honorific,''); NEW.cohead_shipto_cntct_first_name := COALESCE(_a.cntct_first_name,''); NEW.cohead_shipto_cntct_middle := COALESCE(_a.cntct_middle,''); NEW.cohead_shipto_cntct_last_name := COALESCE(_a.cntct_last_name,''); NEW.cohead_shipto_cntct_suffix := COALESCE(_a.cntct_suffix,''); NEW.cohead_shipto_cntct_phone := COALESCE(_a.cntct_phone,''); NEW.cohead_shipto_cntct_title := COALESCE(_a.cntct_title,''); NEW.cohead_shipto_cntct_fax := COALESCE(_a.cntct_fax,''); NEW.cohead_shipto_cntct_email := COALESCE(_a.cntct_email,''); NEW.cohead_shiptoname := COALESCE(_p.shipto_name,''); NEW.cohead_shiptoaddress1 := COALESCE(_a.addr_line1,''); NEW.cohead_shiptoaddress2 := COALESCE(_a.addr_line2,''); NEW.cohead_shiptoaddress3 := COALESCE(_a.addr_line3,''); NEW.cohead_shiptocity := COALESCE(_a.addr_city,''); NEW.cohead_shiptostate := COALESCE(_a.addr_state,''); NEW.cohead_shiptozipcode := COALESCE(_a.addr_postalcode,''); NEW.cohead_shiptocountry := COALESCE(_a.addr_country,''); ELSE IF (_p.cust_ffshipto) THEN -- Use Address Save function to see if the new address entered matches -- data for the shipto number. If not that will insert new address for CRM SELECT SaveAddr( NULL, NULL, NEW.cohead_shiptoaddress1, NEW.cohead_shiptoaddress2, NEW.cohead_shiptoaddress3, NEW.cohead_shiptocity, NEW.cohead_shiptostate, NEW.cohead_shiptozipcode, NEW.cohead_shiptocountry, 'CHANGEONE') INTO _addrId; SELECT shipto_addr_id INTO _shiptoid FROM shiptoinfo WHERE (shipto_id=NEW.cohead_shipto_id); -- If the address passed doesn't match shipto address, then it's something else IF (_shiptoid <> _addrId) THEN NEW.cohead_shipto_id := NULL; END IF; ELSE SELECT cohead_shipto_id INTO _shiptoid FROM cohead WHERE (cohead_id=NEW.cohead_id); -- Get the shipto address IF (COALESCE(NEW.cohead_shipto_id,-1) <> COALESCE(_shiptoid,-1)) THEN SELECT * INTO _a FROM shiptoinfo LEFT OUTER JOIN cntct ON (shipto_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (shipto_addr_id=addr_id) WHERE (shipto_id=NEW.cohead_shipto_id); IF (FOUND) THEN -- Free form not allowed so we're going to make sure address matches Shipto data NEW.cohead_shipto_cntct_id=_a.cntct_id; NEW.cohead_shipto_cntct_honorific=COALESCE(_a.cntct_honorific,''); NEW.cohead_shipto_cntct_first_name=COALESCE(_a.cntct_first_name,''); NEW.cohead_shipto_cntct_middle=COALESCE(_a.cntct_middle,''); NEW.cohead_shipto_cntct_last_name=COALESCE(_a.cntct_last_name,''); NEW.cohead_shipto_cntct_phone=COALESCE(_a.cntct_phone,''); NEW.cohead_shipto_cntct_title=COALESCE(_a.cntct_title,''); NEW.cohead_shipto_cntct_fax=COALESCE(_a.cntct_fax,''); NEW.cohead_shipto_cntct_email=COALESCE(_a.cntct_email,''); NEW.cohead_shiptoname := COALESCE(_a.shipto_name,''); NEW.cohead_shiptophone := COALESCE(_a.cntct_phone,''); NEW.cohead_shiptoaddress1 := COALESCE(_a.addr_line1,''); NEW.cohead_shiptoaddress2 := COALESCE(_a.addr_line2,''); NEW.cohead_shiptoaddress3 := COALESCE(_a.addr_line3,''); NEW.cohead_shiptocity := COALESCE(_a.addr_city,''); NEW.cohead_shiptostate := COALESCE(_a.addr_state,''); NEW.cohead_shiptozipcode := COALESCE(_a.addr_postalcode,''); NEW.cohead_shiptocountry := COALESCE(_a.addr_country,''); ELSE -- If no shipto data and free form not allowed, this won't work RAISE EXCEPTION 'Free form Shipto is not allowed on this Customer. You must supply a valid Shipto ID.'; END IF; END IF; END IF; END IF; END IF; END IF; IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='SalesOrderChangeLog') ) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment('ChangeLog', 'S', NEW.cohead_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.cohead_terms_id <> NEW.cohead_terms_id) THEN PERFORM postComment( 'ChangeLog', 'S', NEW.cohead_id, ('Terms Changed from "' || oldterms.terms_code || '" to "' || newterms.terms_code || '"') ) FROM terms AS oldterms, terms AS newterms WHERE ( (oldterms.terms_id=OLD.cohead_terms_id) AND (newterms.terms_id=NEW.cohead_terms_id) ); END IF; IF (OLD.cohead_shipvia <> NEW.cohead_shipvia) THEN PERFORM postComment ('ChangeLog', 'S', New.cohead_id, ('Shipvia Changed from "' || OLD.cohead_shipvia || '" to "' || NEW.cohead_shipvia || '"')); END IF; IF (OLD.cohead_holdtype <> NEW.cohead_holdtype) THEN PERFORM postComment( 'ChangeLog', 'S', NEW.cohead_id, ( 'Hold Type Changed from ' || (CASE OLD.cohead_holdtype WHEN('N') THEN 'No Hold' WHEN('C') THEN 'Credit Hold' WHEN('P') THEN 'Packing Hold' WHEN('S') THEN 'Shipping Hold' ELSE 'Unknown/Error' END) || ' to ' || (CASE NEW.cohead_holdtype WHEN('N') THEN 'No Hold' WHEN('C') THEN 'Credit Hold' WHEN('P') THEN 'Packing Hold' WHEN('S') THEN 'Shipping Hold' ELSE 'Unknown/Error' END) ) ); END IF; ELSIF (TG_OP = 'DELETE') THEN DELETE FROM docass WHERE docass_source_id = OLD.cohead_id AND docass_source_type = 'S'; DELETE FROM docass WHERE docass_target_id = OLD.cohead_id AND docass_target_type = 'S'; DELETE FROM comment WHERE ( (comment_source='S') AND (comment_source_id=OLD.cohead_id) ); END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF ( (NOT (OLD.cohead_holdtype = 'N')) AND (NEW.cohead_holdtype='N') ) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.cohead_id, NEW.cohead_warehous_id, NEW.cohead_number::TEXT FROM evntnot, evnttype WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=NEW.cohead_warehous_id) AND (evnttype_name='SoReleased') ); END IF; IF (OLD.cohead_ordercomments <> NEW.cohead_ordercomments) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.cohead_id, NEW.cohead_warehous_id, NEW.cohead_number::TEXT FROM evntnot, evnttype WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=NEW.cohead_warehous_id) AND (evnttype_name='SoNotesChanged') ); END IF; IF ((OLD.cohead_shipchrg_id != NEW.cohead_shipchrg_id) OR (OLD.cohead_freight != NEW.cohead_freight) OR (OLD.cohead_shipvia != NEW.cohead_shipvia)) THEN UPDATE shiphead SET shiphead_shipchrg_id=NEW.cohead_shipchrg_id, shiphead_freight=NEW.cohead_freight, shiphead_shipvia=NEW.cohead_shipvia WHERE ((shiphead_order_type='SO') AND (shiphead_order_id=NEW.cohead_id) AND (NOT shiphead_shipped)); END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; ELSE NEW.cohead_lastupdated = CURRENT_TIMESTAMP; RETURN NEW; END IF; END; $$; 'DROP FUNCTION public._soheadtrigger(); publicadminfalse83992J12551681816_soheadtriggerafter()FUNCTIONCREATE FUNCTION _soheadtriggerafter() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (COALESCE(NEW.cohead_taxzone_id,-1) <> COALESCE(OLD.cohead_taxzone_id,-1)) THEN UPDATE coitem SET coitem_taxtype_id=getItemTaxType(itemsite_item_id,NEW.cohead_taxzone_id) FROM itemsite WHERE ((itemsite_id=coitem_itemsite_id) AND (coitem_cohead_id=NEW.cohead_id)); END IF; -- update comments on any associated drop ship POs IF (COALESCE(NEW.cohead_shipcomments, TEXT('')) <> COALESCE(OLD.cohead_shipcomments, TEXT(''))) THEN UPDATE pohead SET pohead_comments=NEW.cohead_shipcomments FROM poitem JOIN coitem ON (coitem_cohead_id=NEW.cohead_id AND coitem_order_type='P' AND coitem_order_id=poitem_id) WHERE (pohead_id=poitem_pohead_id); END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._soheadtriggerafter(); publicadminfalse83992_12551745144_soitemafterdeletetrigger()FUNCTIONCREATE FUNCTION _soitemafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (OLD.coitem_status = 'O') THEN IF ( (SELECT (count(*) < 1) FROM coitem WHERE ((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_id != OLD.coitem_id) AND (coitem_status = 'O')) ) ) THEN UPDATE cohead SET cohead_status = 'C' WHERE ((cohead_id=OLD.coitem_cohead_id) AND (cohead_status='O')); END IF; END IF; RETURN OLD; END; $$; 2DROP FUNCTION public._soitemafterdeletetrigger(); publicadminfalse83992M12551681817_soitemaftertrigger()FUNCTION~&CREATE FUNCTION _soitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check NUMERIC; _r RECORD; _kit BOOLEAN; _fractional BOOLEAN; _rec RECORD; _kstat TEXT; _pstat TEXT; _result INTEGER; _coitemid INTEGER; _itemsrcid INTEGER; _orderid INTEGER; BEGIN _rec := NEW; --Cache some information SELECT * INTO _r FROM cohead WHERE (cohead_id=_rec.coitem_cohead_id); --Determine if this is a kit for later processing SELECT COALESCE(item_type,'')='K', item_fractional INTO _kit, _fractional FROM itemsite, item WHERE((itemsite_item_id=item_id) AND (itemsite_id=_rec.coitem_itemsite_id)); _kit := COALESCE(_kit, false); _fractional := COALESCE(_fractional, false); IF (_kit) THEN -- Kit Processing IF (TG_OP = 'INSERT') THEN -- Create Sub Lines for Kit Components PERFORM explodeKit(NEW.coitem_cohead_id, NEW.coitem_linenumber, 0, NEW.coitem_itemsite_id, NEW.coitem_qtyord, NEW.coitem_scheddate, NEW.coitem_promdate, NEW.coitem_memo); IF (fetchMetricBool('KitComponentInheritCOS')) THEN -- Update kit line item COS UPDATE coitem SET coitem_cos_accnt_id = CASE WHEN (COALESCE(NEW.coitem_cos_accnt_id, -1) != -1) THEN NEW.coitem_cos_accnt_id WHEN (NEW.coitem_warranty) THEN resolveCOWAccount(NEW.coitem_itemsite_id, _r.cohead_cust_id, _r.cohead_saletype_id, _r.cohead_shipzone_id) ELSE resolveCOSAccount(NEW.coitem_itemsite_id, _r.cohead_cust_id, _r.cohead_saletype_id, _r.cohead_shipzone_id) END WHERE((coitem_cohead_id=NEW.coitem_cohead_id) AND (coitem_linenumber = NEW.coitem_linenumber) AND (coitem_subnumber > 0)); END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF (NEW.coitem_qtyord <> OLD.coitem_qtyord) THEN -- Recreate Sub Lines for Kit Components FOR _coitemid IN SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_subnumber > 0) ) LOOP SELECT deleteSoItem(_coitemid) INTO _result; IF (_result < 0) THEN RAISE EXCEPTION 'Error deleting kit components: deleteSoItem(integer) Error:%', _result; END IF; END LOOP; PERFORM explodeKit(NEW.coitem_cohead_id, NEW.coitem_linenumber, 0, NEW.coitem_itemsite_id, NEW.coitem_qtyord, NEW.coitem_scheddate, NEW.coitem_promdate); END IF; IF ( (NEW.coitem_qtyord <> OLD.coitem_qtyord) OR (NEW.coitem_cos_accnt_id <> OLD.coitem_cos_accnt_id) ) THEN IF (fetchMetricBool('KitComponentInheritCOS')) THEN -- Update kit line item COS UPDATE coitem SET coitem_cos_accnt_id = CASE WHEN (COALESCE(NEW.coitem_cos_accnt_id, -1) != -1) THEN NEW.coitem_cos_accnt_id WHEN (NEW.coitem_warranty) THEN resolveCOWAccount(NEW.coitem_itemsite_id, _r.cohead_cust_id, _r.cohead_saletype_id, _r.cohead_shipzone_id) ELSE resolveCOSAccount(NEW.coitem_itemsite_id, _r.cohead_cust_id, _r.cohead_saletype_id, _r.cohead_shipzone_id) END WHERE((coitem_cohead_id=NEW.coitem_cohead_id) AND (coitem_linenumber = NEW.coitem_linenumber) AND (coitem_subnumber > 0)); END IF; END IF; IF (NEW.coitem_scheddate <> OLD.coitem_scheddate) THEN -- Update kit line item Schedule Date UPDATE coitem SET coitem_scheddate = NEW.coitem_scheddate WHERE((coitem_cohead_id=NEW.coitem_cohead_id) AND (coitem_linenumber = NEW.coitem_linenumber) AND (coitem_subnumber > 0)); END IF; END IF; END IF; IF (TG_OP = 'INSERT') THEN -- Create Purchase Request if flagged to do so IF ((NEW.coitem_order_type='R') AND (NEW.coitem_order_id=-1)) THEN SELECT createpr(CAST(cohead_number AS INTEGER), 'S', NEW.coitem_id) INTO _orderid FROM cohead WHERE (cohead_id=NEW.coitem_cohead_id); IF (_orderid > 0) THEN UPDATE coitem SET coitem_order_id=_orderid WHERE (coitem_id=NEW.coitem_id); END IF; END IF; -- Create Purchase Order if flagged to do so IF ((NEW.coitem_order_type='P') AND (NEW.coitem_order_id=-1)) THEN SELECT itemsrc_id INTO _itemsrcid FROM itemsite JOIN itemsrc ON (itemsrc_item_id=itemsite_item_id AND itemsrc_default) WHERE (itemsite_id=NEW.coitem_itemsite_id); IF (FOUND) THEN SELECT createPurchaseToSale(NEW.coitem_id, _itemsrcid, itemsite_dropship, CASE WHEN (NEW.coitem_prcost=0.0) THEN NULL ELSE NEW.coitem_prcost END) INTO _orderid FROM itemsite WHERE (itemsite_id=NEW.coitem_itemsite_id); IF (_orderid > 0) THEN UPDATE coitem SET coitem_order_id=_orderid WHERE (coitem_id=NEW.coitem_id); END IF; END IF; END IF; END IF; IF (TG_OP = 'UPDATE') THEN IF (NEW.coitem_order_type = 'P') THEN --If soitem is cancelled IF ((NEW.coitem_status = 'X') AND (OLD.coitem_status <> 'X')) THEN --Generate the PoItemSoCancelled event INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', poitem_id, itemsite_warehous_id, (pohead_number || '-' || poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id=evnttype_id) JOIN itemsite ON (evntnot_warehous_id=itemsite_warehous_id) JOIN item ON (itemsite_item_id=item_id) JOIN poitem ON (poitem_itemsite_id=itemsite_id) JOIN pohead ON( poitem_pohead_id=pohead_id) WHERE( (poitem_id=OLD.coitem_order_id) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='PoItemSoCancelled') ); END IF; END IF; END IF; IF (_rec.coitem_subnumber > 0) THEN SELECT coitem_status INTO _kstat FROM coitem WHERE((coitem_cohead_id=_rec.coitem_cohead_id) AND (coitem_linenumber=_rec.coitem_linenumber) AND (coitem_subnumber = 0)); IF ((SELECT count(*) FROM coitem WHERE((coitem_cohead_id=_rec.coitem_cohead_id) AND (coitem_linenumber=_rec.coitem_linenumber) AND (coitem_subnumber <> _rec.coitem_subnumber) AND (coitem_subnumber > 0) AND (coitem_status = 'O'))) > 0) THEN _pstat := 'O'; ELSE _pstat := _rec.coitem_status; END IF; END IF; IF(TG_OP = 'INSERT') THEN IF (_rec.coitem_subnumber > 0 AND _rec.coitem_status = 'O') THEN _pstat := 'O'; END IF; ELSIF (TG_OP = 'UPDATE') THEN IF (_rec.coitem_subnumber > 0 AND _rec.coitem_status = 'O') THEN _pstat := 'O'; END IF; IF ((NEW.coitem_status = 'C') AND (OLD.coitem_status <> 'C')) THEN IF(_kit) THEN UPDATE coitem SET coitem_status='C' WHERE((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_status='O') AND (coitem_subnumber > 0)); END IF; END IF; IF ((NEW.coitem_status = 'X') AND (OLD.coitem_status <> 'X')) THEN IF(_kit) THEN UPDATE coitem SET coitem_status='X' WHERE((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_status='O') AND (coitem_subnumber > 0)); END IF; END IF; IF(NEW.coitem_status = 'O' AND OLD.coitem_status <> 'O') THEN IF(_kit) THEN UPDATE coitem SET coitem_status='O' WHERE((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND ((coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) > 0) AND (coitem_subnumber > 0)); END IF; END IF; END IF; IF ((_kstat IS NOT NULL) AND (_pstat IS NOT NULL) AND (_rec.coitem_subnumber > 0) AND (_kstat <> _pstat)) THEN UPDATE coitem SET coitem_status = _pstat WHERE((coitem_cohead_id=_rec.coitem_cohead_id) AND (coitem_linenumber=_rec.coitem_linenumber) AND (coitem_subnumber = 0)); END IF; --If auto calculate freight, recalculate cohead_freight IF (SELECT cohead_calcfreight FROM cohead WHERE (cohead_id=NEW.coitem_cohead_id)) THEN UPDATE cohead SET cohead_freight = COALESCE( (SELECT SUM(freightdata_total) FROM freightDetail('SO', cohead_id, cohead_cust_id, cohead_shipto_id, cohead_orderdate, cohead_shipvia, cohead_curr_id)), 0) WHERE cohead_id=NEW.coitem_cohead_id; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._soitemaftertrigger(); publicadminfalse83992N12551745142_soitembeforedeletetrigger()FUNCTION9 CREATE FUNCTION _soitembeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _kit BOOLEAN := FALSE; _shipped BOOLEAN := FALSE; _coitemid INTEGER := 0; _result INTEGER := 0; BEGIN -- Check Priv IF NOT (checkPrivilege('MaintainSalesOrders')) THEN RAISE EXCEPTION 'You do not have privileges to alter a Sales Order.'; END IF; -- Cache some information SELECT * INTO _r FROM cohead, itemsite, item WHERE ( (cohead_id=OLD.coitem_cohead_id) AND (itemsite_id=OLD.coitem_itemsite_id) AND (item_id=itemsite_item_id) ); _kit := (COALESCE(_r.item_type,'')='K'); -- Check for shipped kit components IF(_kit AND OLD.coitem_status <> 'C' AND OLD.coitem_status <> 'X') THEN IF (EXISTS (SELECT coitem_id FROM coitem JOIN shipitem ON (shipitem_orderitem_id=coitem_id) JOIN shiphead ON (shiphead_id=shipitem_shiphead_id AND shiphead_order_type='SO') WHERE ((coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_subnumber > 0)) GROUP BY coitem_id HAVING (SUM(shipitem_qty) > 0) LIMIT 1) ) THEN _shipped := TRUE; END IF; END IF; IF(_kit AND _shipped) THEN RAISE EXCEPTION 'You can not delete this Sales Order Line as it has several sub components that have already been shipped.'; END IF; DELETE FROM comment WHERE ( (comment_source='SI') AND (comment_source_id=OLD.coitem_id) ); DELETE FROM charass WHERE ((charass_target_type='SI') AND (charass_target_id=OLD.coitem_id)); -- Delete Sub Lines for Kit Components IF (OLD.coitem_subnumber = 0) THEN FOR _coitemid IN SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=OLD.coitem_cohead_id) AND (coitem_linenumber=OLD.coitem_linenumber) AND (coitem_subnumber > 0) ) LOOP SELECT deleteSoItem(_coitemid) INTO _result; IF (_result < 0) THEN IF NOT (_r.itemsite_createsopo AND (_result = -10 OR _result = -20)) THEN RAISE EXCEPTION 'Error deleting kit components: deleteSoItem(integer) Error:%', _result; END IF; END IF; END LOOP; END IF; INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', OLD.coitem_id, _r.itemsite_warehous_id, (_r.cohead_number || '-' || OLD.coitem_linenumber) FROM evntnot, evnttype WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=_r.itemsite_warehous_id) AND (OLD.coitem_scheddate <= (CURRENT_DATE + _r.itemsite_eventfence)) AND (evnttype_name='SoitemCancelled') ); RETURN OLD; END; $$; 3DROP FUNCTION public._soitembeforedeletetrigger(); publicadminfalse83992L12551681819_soitembeforetrigger()FUNCTIONCREATE FUNCTION _soitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check NUMERIC; _itemNumber TEXT; _r RECORD; _kit BOOLEAN; BEGIN --Determine if this is a kit for later processing SELECT COALESCE(item_type,'')='K' INTO _kit FROM itemsite, item WHERE((itemsite_item_id=item_id) AND (itemsite_id=NEW.coitem_itemsite_id)); _kit := COALESCE(_kit, false); IF (TG_OP = 'INSERT') THEN -- If this is imported, go ahead and insert default characteristics IF (NEW.coitem_imported) THEN INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_price) SELECT 'SI', NEW.coitem_id, char_id, charass_value, itemcharprice(item_id,char_id,charass_value,cohead_cust_id,cohead_shipto_id,NEW.coitem_qtyord,cohead_curr_id,cohead_orderdate) FROM ( SELECT DISTINCT char_id, char_name, charass_value, item_id, cohead_cust_id, cohead_shipto_id, cohead_curr_id, cohead_orderdate FROM cohead, charass, char, itemsite, item WHERE((itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (charass_target_type='I') AND (charass_target_id=item_id) AND (charass_default) AND (char_id=charass_char_id) AND (cohead_id=NEW.coitem_cohead_id)) ORDER BY char_name) AS data; END IF; END IF; -- Create work order and process if flagged to do so IF ((NEW.coitem_order_type='W') AND (NEW.coitem_order_id=-1)) THEN SELECT createwo(CAST(cohead_number AS INTEGER), NEW.coitem_itemsite_id, 1, -- priority validateOrderQty(NEW.coitem_itemsite_id, NEW.coitem_qtyord, TRUE), itemsite_leadtime, NEW.coitem_scheddate, NEW.coitem_memo, 'S', NEW.coitem_id, cohead_prj_id) INTO NEW.coitem_order_id FROM cohead, itemsite WHERE ((cohead_id=NEW.coitem_cohead_id) AND (itemsite_id=NEW.coitem_itemsite_id)); INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT 'W', NEW.coitem_order_id, charass_char_id, charass_value FROM charass WHERE ((charass_target_type='SI') AND (charass_target_id=NEW.coitem_id)); END IF; IF (TG_OP = 'UPDATE') THEN -- Update P/R date if applicable IF (NEW.coitem_scheddate <> OLD.coitem_scheddate AND NEW.coitem_order_type='R' AND NEW.coitem_order_id > 1) THEN UPDATE pr SET pr_duedate = NEW.coitem_scheddate WHERE (pr_order_id=NEW.coitem_id AND pr_order_type='S'); END IF; -- If closing or cancelling and there is a job item work order, then close job and distribute remaining costs IF ((NEW.coitem_status = 'C' AND OLD.coitem_status <> 'C') OR (NEW.coitem_status = 'X' AND OLD.coitem_status <> 'X')) AND (OLD.coitem_order_id > -1) THEN SELECT wo_id, wo_wipvalue INTO _r FROM wo,itemsite,item WHERE ((wo_ordtype='S') AND (wo_ordid=OLD.coitem_id) AND (itemsite_id=wo_itemsite_id) AND (item_id=itemsite_item_id) AND (itemsite_costmethod = 'J')); IF (FOUND) THEN IF (_r.wo_wipvalue > 0) THEN -- Distribute to G/L, debit Cost of Sales, credit WIP PERFORM MIN(insertGLTransaction( 'W/O', 'WO', formatWoNumber(NEW.coitem_order_id), 'Job Closed Incomplete', costcat_wip_accnt_id, CASE WHEN (COALESCE(NEW.coitem_cos_accnt_id, -1) != -1) THEN NEW.coitem_cos_accnt_id WHEN (NEW.coitem_warranty=TRUE) THEN resolveCOWAccount(itemsite_id, cohead_cust_id, cohead_saletype_id, cohead_shipzone_id) ELSE resolveCOSAccount(itemsite_id, cohead_cust_id, cohead_saletype_id, cohead_shipzone_id) END, -1, _r.wo_wipvalue, current_date )) FROM itemsite, costcat, cohead WHERE ((itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (cohead_id=NEW.coitem_cohead_id)); END IF; UPDATE wo SET wo_status = 'C', wo_wipvalue = 0 WHERE (wo_id = _r.wo_id); END IF; END IF; -- Likewise, reopen the job if line reopened IF ((NEW.coitem_status != 'C' AND OLD.coitem_status = 'C') OR (NEW.coitem_status != 'X' AND OLD.coitem_status = 'X')) AND (OLD.coitem_order_id > -1) THEN UPDATE wo SET wo_status = 'I' FROM itemsite, item WHERE ((wo_ordtype = 'S') AND (wo_ordid=NEW.coitem_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costmethod='J')); END IF; -- Handle links to Return Authorization IF (fetchMetricBool('EnableReturnAuth')) THEN SELECT * INTO _r FROM raitem,rahead WHERE ((raitem_new_coitem_id=NEW.coitem_id) AND (rahead_id=raitem_rahead_id)); IF (FOUND) THEN IF ((_r.raitem_qtyauthorized <> NEW.coitem_qtyord OR _r.raitem_qty_uom_id <> NEW.coitem_qty_uom_id OR _r.raitem_qty_invuomratio <> NEW.coitem_qty_invuomratio OR _r.raitem_price_uom_id <> NEW.coitem_price_uom_id OR _r.raitem_price_invuomratio <> NEW.coitem_price_invuomratio) AND NOT (NEW.coitem_status = 'X' AND _r.raitem_qtyauthorized = 0)) THEN RAISE EXCEPTION 'Quantities for line item % may only be changed on the Return Authorization that created it.',NEW.coitem_linenumber; END IF; IF (OLD.coitem_warranty <> NEW.coitem_warranty) THEN UPDATE raitem SET raitem_warranty = NEW.coitem_warranty WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (raitem_warranty != NEW.coitem_warranty)); END IF; IF (OLD.coitem_cos_accnt_id <> NEW.coitem_cos_accnt_id) THEN UPDATE raitem SET raitem_cos_accnt_id = NEW.coitem_cos_accnt_id WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (COALESCE(raitem_cos_accnt_id,-1) != COALESCE(NEW.coitem_cos_accnt_id,-1))); END IF; IF (OLD.coitem_taxtype_id <> NEW.coitem_taxtype_id) THEN UPDATE raitem SET raitem_taxtype_id = NEW.coitem_taxtype_id WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (COALESCE(raitem_taxtype_id,-1) != COALESCE(NEW.coitem_taxtype_id,-1))); END IF; IF (OLD.coitem_scheddate <> NEW.coitem_scheddate) THEN UPDATE raitem SET raitem_scheddate = NEW.coitem_scheddate WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (raitem_scheddate != NEW.coitem_scheddate)); END IF; IF (OLD.coitem_memo <> NEW.coitem_memo) THEN UPDATE raitem SET raitem_notes = NEW.coitem_memo WHERE((raitem_new_coitem_id=NEW.coitem_id) AND (raitem_notes != NEW.coitem_memo)); END IF; IF ((OLD.coitem_qtyshipped <> NEW.coitem_qtyshipped) AND (NEW.coitem_qtyshipped >= _r.raitem_qtyauthorized) AND ((_r.raitem_disposition = 'S') OR (_r.raitem_status = 'O') AND (_r.raitem_disposition IN ('P','V')) AND (_r.raitem_qtyreceived >= _r.raitem_qtyauthorized))) THEN UPDATE raitem SET raitem_status = 'C' WHERE (raitem_new_coitem_id=NEW.coitem_id); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._soitembeforetrigger(); publicadminfalse39928K12551681821_soitemtrigger()FUNCTION%CREATE FUNCTION _soitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _changelog BOOLEAN := FALSE; _check BOOLEAN; _kit BOOLEAN; _shipped BOOLEAN; _atShipping NUMERIC; _tmp INTEGER; _rec RECORD; BEGIN -- Check SELECT checkPrivilege('MaintainSalesOrders') OR checkPrivilege('ShipOrders') OR checkPrivilege('IssueStockToShipping') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Sales Order.'; END IF; IF ( SELECT fetchMetricBool('SalesOrderChangeLog') ) THEN _changelog := TRUE; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (NEW.coitem_scheddate IS NULL) THEN IF (fetchmetricbool('AllowASAPShipSchedules')) THEN NEW.coitem_scheddate := current_date; ELSE RAISE EXCEPTION 'A schedule date is required.'; END IF; END IF; END IF; _rec := NEW; SELECT COALESCE(item_type,'')='K' INTO _kit FROM itemsite, item WHERE((itemsite_item_id=item_id) AND (itemsite_id=_rec.coitem_itemsite_id)); _kit := COALESCE(_kit, false); _shipped := false; IF(_kit AND _rec.coitem_status <> 'C' AND _rec.coitem_status <> 'X') THEN SELECT coitem_id INTO _tmp FROM coitem JOIN shipitem ON (shipitem_orderitem_id=coitem_id) JOIN shiphead ON (shiphead_id=shipitem_shiphead_id AND shiphead_order_type='SO') WHERE((coitem_cohead_id=_rec.coitem_cohead_id) AND (coitem_linenumber=_rec.coitem_linenumber) AND (coitem_subnumber > 0)) GROUP BY coitem_id HAVING (SUM(shipitem_qty) > 0) LIMIT 1; IF (FOUND) THEN _shipped := true; END IF; END IF; IF (TG_OP ='UPDATE') THEN IF ((OLD.coitem_status <> 'C') AND (NEW.coitem_status = 'C')) THEN SELECT qtyAtShipping(NEW.coitem_id) INTO _atShipping; IF (_atShipping > 0) THEN RAISE EXCEPTION 'Line % cannot be Closed at this time as there is inventory at shipping.',NEW.coitem_linenumber; END IF; END IF; END IF; IF (TG_OP = 'INSERT') THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.coitem_id, itemsite_warehous_id, (cohead_number || '-' || NEW.coitem_linenumber) FROM evntnot, evnttype, itemsite, item, cohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.coitem_cohead_id=cohead_id) AND (NEW.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='SoitemCreated') ); IF (_changelog) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Created'); END IF; --Set defaults if no values passed NEW.coitem_linenumber := COALESCE(NEW.coitem_linenumber, (SELECT (COALESCE(MAX(coitem_linenumber), 0) + 1) FROM coitem WHERE (coitem_cohead_id=NEW.coitem_cohead_id))); NEW.coitem_status := COALESCE(NEW.coitem_status,'O'); NEW.coitem_scheddate := COALESCE(NEW.coitem_scheddate, (SELECT MIN(coitem_scheddate) FROM coitem WHERE (coitem_cohead_id=NEW.coitem_cohead_id))); NEW.coitem_memo := COALESCE(NEW.coitem_memo,''); NEW.coitem_prcost := COALESCE(NEW.coitem_prcost,0); NEW.coitem_warranty := COALESCE(NEW.coitem_warranty,false); IF (NEW.coitem_status='O') THEN UPDATE cohead SET cohead_status = 'O' WHERE ((cohead_id=NEW.coitem_cohead_id) AND (cohead_status='C')); END IF; RETURN NEW; ELSIF (TG_OP = 'UPDATE') THEN IF (NEW.coitem_qtyord <> OLD.coitem_qtyord) THEN IF(_kit) THEN IF(_shipped) THEN RAISE EXCEPTION 'You can not change the qty ordered for a Kit item when one or more of its components have shipped inventory.'; END IF; END IF; INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_oldvalue, evntlog_newvalue ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.coitem_id, itemsite_warehous_id, (cohead_number || '-' || NEW.coitem_linenumber), OLD.coitem_qtyord, NEW.coitem_qtyord FROM evntnot, evnttype, itemsite, item, cohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.coitem_cohead_id=cohead_id) AND ( (NEW.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) OR (OLD.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) ) AND (evnttype_name='SoitemQtyChanged') ); IF (_changelog) THEN PERFORM postComment( 'ChangeLog', 'SI', NEW.coitem_id, ( 'Changed Qty. Ordered from ' || formatQty(OLD.coitem_qtyord) || ' to ' || formatQty(NEW.coitem_qtyord) ) ); END IF; END IF; IF (NEW.coitem_scheddate <> OLD.coitem_scheddate) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_olddate, evntlog_newdate ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', NEW.coitem_id, itemsite_warehous_id, (cohead_number || '-' || NEW.coitem_linenumber), OLD.coitem_scheddate, NEW.coitem_scheddate FROM evntnot, evnttype, itemsite, item, cohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.coitem_cohead_id=cohead_id) AND ( (NEW.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) OR (OLD.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) ) AND (evnttype_name='SoitemSchedDateChanged') ); IF (_changelog) THEN PERFORM postComment( 'ChangeLog', 'SI', NEW.coitem_id, ( 'Changed Sched. Date from ' || formatDate(OLD.coitem_scheddate) || ' to ' || formatDate(NEW.coitem_scheddate)) ); END IF; END IF; IF ((NEW.coitem_status = 'C') AND (OLD.coitem_status <> 'C')) THEN NEW.coitem_closedate = CURRENT_TIMESTAMP; NEW.coitem_close_username = getEffectiveXtUser(); NEW.coitem_qtyreserved := 0; IF (_changelog) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Closed'); END IF; END IF; IF ((NEW.coitem_status <> 'C') AND (OLD.coitem_status = 'C')) THEN NEW.coitem_closedate = NULL; NEW.coitem_close_username = NULL; IF (_changelog) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Reopened'); END IF; END IF; IF ((NEW.coitem_status = 'X') AND (OLD.coitem_status <> 'X')) THEN IF ((OLD.coitem_order_type = 'W') AND (SELECT wo_status IN ('O', 'E', 'R') FROM wo WHERE (wo_id=OLD.coitem_order_id))) THEN -- Close any associated W/O PERFORM closeWo(OLD.coitem_order_id, FALSE, CURRENT_DATE); ELSIF (OLD.coitem_order_type = 'R') THEN -- Delete any associated P/R PERFORM deletePr(OLD.coitem_order_id); END IF; NEW.coitem_qtyreserved := 0; IF (_changelog) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Canceled'); PERFORM postComment('ChangeLog', 'S', NEW.coitem_cohead_id, 'Line # '|| NEW.coitem_linenumber ||' Canceled'); END IF; INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'S', OLD.coitem_id, itemsite_warehous_id, (cohead_number || '-' || OLD.coitem_linenumber) FROM evntnot, evnttype, itemsite, item, cohead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=OLD.coitem_itemsite_id) AND (itemsite_item_id=item_id) AND (OLD.coitem_cohead_id=cohead_id) AND (OLD.coitem_scheddate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='SoitemCancelled') ); END IF; IF ((NEW.coitem_qtyreserved <> OLD.coitem_qtyreserved) AND (_changelog)) THEN PERFORM postComment('ChangeLog', 'SI', NEW.coitem_id, 'Changed Qty Reserved to '|| NEW.coitem_qtyreserved); END IF; END IF; NEW.coitem_lastupdated = CURRENT_TIMESTAMP; -- Handle status for header IF (TG_OP = 'UPDATE') THEN IF (OLD.coitem_status <> NEW.coitem_status) THEN IF ( (SELECT (count(*) < 1) FROM coitem WHERE ((coitem_cohead_id=NEW.coitem_cohead_id) AND (coitem_id != NEW.coitem_id) AND (coitem_status='O')) ) AND (NEW.coitem_status<>'O') ) THEN UPDATE cohead SET cohead_status = 'C' WHERE ((cohead_id=NEW.coitem_cohead_id) AND (cohead_status='O')); ELSE UPDATE cohead SET cohead_status = 'O' WHERE ((cohead_id=NEW.coitem_cohead_id) AND (cohead_status='C')); END IF; END IF; END IF; RETURN NEW; END; $$; 'DROP FUNCTION public._soitemtrigger(); publicadminfalse8399212551681823_taxauthafterdeletetrigger()FUNCTION6CREATE FUNCTION _taxauthafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (EXISTS(SELECT 1 FROM checkhead WHERE checkhead_recip_id = OLD.taxauth_id AND checkhead_recip_type='T')) THEN RAISE EXCEPTION 'Cannot delete the tax authority % because checks have been written to it [xtuple: deleteTaxAuthority, -7, %]', OLD.taxauth_number, OLD.taxauth_number; END IF; IF (fetchMetricValue('DefaultTaxAuthority') = OLD.taxauth_id) THEN RAISE EXCEPTION 'Cannot delete the default Tax Authority [xtuple: deleteTaxAuthority, -8, %]', OLD.taxauth_code; END IF; IF (fetchMetricBool('TaxAuthChangeLog')) THEN PERFORM postComment(cmnttype_id, 'TAXAUTH', OLD.taxauth_id, 'Deleted "' || OLD.taxauth_number || '"') FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; 3DROP FUNCTION public._taxauthafterdeletetrigger(); publicadminfalse8399212551681824_taxauthaftertrigger()FUNCTIONCREATE FUNCTION _taxauthaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_taxauth_id=NEW.taxauth_id, crmacct_name=NEW.taxauth_name WHERE crmacct_number=NEW.taxauth_code; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_taxauth_id ) VALUES (NEW.taxauth_code, NEW.taxauth_name, TRUE, 'O', NEW.taxauth_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; /* TODO: default characteristic assignments based on what? */ ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.taxauth_code WHERE ((crmacct_taxauth_id=NEW.taxauth_id) AND (crmacct_number!=NEW.taxauth_code)); UPDATE crmacct SET crmacct_name = NEW.taxauth_name WHERE ((crmacct_taxauth_id=NEW.taxauth_id) AND (crmacct_name!=NEW.taxauth_name)); END IF; IF (fetchMetricBool('TaxAuthChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.taxauth_code <> NEW.taxauth_code) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Code changed from "' || OLD.taxauth_code || '" to "' || NEW.taxauth_code || '"'); END IF; IF (OLD.taxauth_name <> NEW.taxauth_name) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Name changed from "' || OLD.taxauth_name || '" to "' || NEW.taxauth_name || '"'); END IF; IF (OLD.taxauth_extref <> NEW.taxauth_extref) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'External Ref. changed from "' || OLD.taxauth_extref || '" to "' || NEW.taxauth_extref || '"'); END IF; IF (OLD.taxauth_addr_id <> NEW.taxauth_addr_id) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Address changed from ' || formatAddr(OLD.taxauth_addr_id) || ' to ' || formatAddr(NEW.taxauth_addr_id)); END IF; IF (OLD.taxauth_curr_id <> NEW.taxauth_curr_id) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Currency changed from "' || currConcat(OLD.taxauth_curr_id) || '" to "' || currConcat(NEW.taxauth_curr_id) || '"'); END IF; IF (OLD.taxauth_county <> NEW.taxauth_county) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'County changed from "' || OLD.taxauth_county || '" to "' || NEW.taxauth_county || '"'); END IF; IF (OLD.taxauth_accnt_id <> NEW.taxauth_accnt_id) THEN PERFORM postComment(_cmnttypeid, 'TAXAUTH', NEW.taxauth_id, 'Account changed from "' || formatGLAccount(OLD.taxauth_accnt_id) || '" to "' || formatGLAccount(NEW.taxauth_accnt_id) || '"'); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._taxauthaftertrigger(); publicadminfalse8399212551681825_taxauthbeforedeletetrigger()FUNCTIONCREATE FUNCTION _taxauthbeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainTaxAuthorities')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Tax Authorities.'; END IF; UPDATE crmacct SET crmacct_taxauth_id = NULL WHERE crmacct_taxauth_id = OLD.taxauth_id; RETURN OLD; END; $$; 4DROP FUNCTION public._taxauthbeforedeletetrigger(); publicadminfalse8399212551681826_taxauthbeforetrigger()FUNCTIONCREATE FUNCTION _taxauthbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (NOT checkPrivilege('MaintainTaxAuthorities')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Tax Authorities.'; END IF; IF (NEW.taxauth_code IS NULL) THEN RAISE EXCEPTION 'You must supply a Tax Authority Code.'; END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.taxauth_code); END IF; NEW.taxauth_code := UPPER(NEW.taxauth_code); RETURN NEW; END; $$; .DROP FUNCTION public._taxauthbeforetrigger(); publicadminfalse3992812551745246_termsafterdeletetrigger()FUNCTIONCREATE FUNCTION _termsafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (fetchMetricValue('DefaultTerms') = OLD.terms_id) THEN RAISE EXCEPTION 'Cannot delete the default Terms [xtuple: terms, -1, %]', OLD.terms_code; END IF; RETURN OLD; END; $$; 1DROP FUNCTION public._termsafterdeletetrigger(); publicadminfalse8399212551681827_todoitemtrigger()FUNCTIONCREATE FUNCTION _todoitemtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.todoitem_id) AND (recur_parent_type='TODO')); IF (_recurid IS NOT NULL) THEN RAISE DEBUG 'recur_id for deleted todoitem = %', _recurid; SELECT todoitem_id INTO _newparentid FROM todoitem WHERE ((todoitem_recurring_todoitem_id=OLD.todoitem_id) AND (todoitem_id!=OLD.todoitem_id)) ORDER BY todoitem_due_date LIMIT 1; RAISE DEBUG '_newparentid for deleted todoitem = %', COALESCE(_newparentid, NULL); -- client is responsible for warning about deleting a recurring todoitem IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; UPDATE todoitem SET todoitem_recurring_todoitem_id=_newparentid WHERE todoitem_recurring_todoitem_id=OLD.todoitem_id AND todoitem_id != OLD.todoitem_id; RAISE DEBUG 'reparented recurrence'; END IF; END IF; DELETE FROM alarm WHERE ((alarm_source='TODO') AND (alarm_source_id=OLD.todoitem_id)); DELETE FROM docass WHERE docass_source_id = OLD.todoitem_id AND docass_source_type = 'TODO'; DELETE FROM docass WHERE docass_target_id = OLD.todoitem_id AND docass_target_type = 'TODO'; RETURN OLD; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._todoitemtrigger(); publicadminfalse8399212551681828_uomconvupdate()FUNCTIONCREATE FUNCTION _uomconvupdate() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE itemuomconv SET itemuomconv_to_value = NEW.uomconv_to_value, itemuomconv_from_value = NEW.uomconv_from_value, itemuomconv_fractional = NEW.uomconv_fractional WHERE((itemuomconv_from_uom_id = NEW.uomconv_from_uom_id) AND (itemuomconv_to_uom_id = NEW.uomconv_to_uom_id)); RETURN NEW; END; $$; 'DROP FUNCTION public._uomconvupdate(); publicadminfalse8399212551681829_usrprefaftertrigger()FUNCTIONCREATE FUNCTION _usrprefaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE IF (NEW.usrpref_name='active') THEN LOOP UPDATE crmacct SET crmacct_usr_username=NEW.usrpref_username WHERE crmacct_number=UPPER(NEW.usrpref_username); IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_active, crmacct_type, crmacct_usr_username ) VALUES (NEW.usrpref_username, NEW.usrpref_value::BOOL, 'I', NEW.usrpref_username); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; ELSIF (NEW.usrpref_name='propername') THEN LOOP UPDATE crmacct SET crmacct_name=NEW.usrpref_value WHERE crmacct_number=UPPER(NEW.usrpref_username); IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_active, crmacct_name, crmacct_type, crmacct_usr_username ) VALUES (UPPER(NEW.usrpref_username), TRUE, NEW.usrpref_value, 'I', NEW.usrpref_username); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._usrprefaftertrigger(); publicadminfalse8399212551681830_usrprefbeforetrigger()FUNCTIONCREATE FUNCTION _usrprefbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainUsers') OR checkPrivilege('MaintainPreferencesOthers') OR (checkPrivilege('MaintainPreferencesSelf'))) THEN -- 2 IFs because plpgsql doesn't always evaluate boolean exprs left-to-right IF (TG_OP = 'DELETE') THEN IF NOT (OLD.usrpref_name LIKE '%/checked' OR OLD.usrpref_name LIKE '%/columnsShown') THEN RAISE EXCEPTION 'You do not have privileges to change this User Preference.'; END IF; ELSIF (NEW.usrpref_username = getEffectiveXtUser()) THEN IF NOT (NEW.usrpref_name LIKE '%/checked' OR NEW.usrpref_name LIKE '%/columnsShown') THEN RAISE EXCEPTION 'You do not have privileges to change this User Preference.'; END IF; END IF; END IF; IF (TG_OP IN ('INSERT', 'UPDATE')) THEN IF (NEW.usrpref_name = 'locale') THEN IF NOT EXISTS(SELECT locale_id FROM locale WHERE locale_id = NEW.usrpref_value::INTEGER) THEN RAISE EXCEPTION 'You must supply a valid Locale.'; END IF; ELSIF (NEW.usrpref_name IN ('agent', 'active')) THEN IF (NEW.usrpref_value NOT IN ('t', 'f')) THEN RAISE EXCEPTION '% must be either "t" or "f"', NEW.usrpref_name; END IF; END IF; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; .DROP FUNCTION public._usrprefbeforetrigger(); publicadminfalse8399212551681831_usrprivtrigger()FUNCTION?CREATE FUNCTION _usrprivtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _returnVal INTEGER; BEGIN -- This looks like a candidate for a foreign key but isn't. -- fkeys don't work if the foreign key value resides in a child of the -- table and not the table itself. IF ((TG_OP = 'UPDATE' OR TG_OP = 'INSERT') AND (NOT EXISTS(SELECT priv_id FROM priv WHERE (priv_id=NEW.usrpriv_priv_id)))) THEN RAISE EXCEPTION 'Privilege id % does not exist or is part of a disabled package.', NEW.usrpriv_priv_id; RETURN OLD; ELSIF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; (DROP FUNCTION public._usrprivtrigger(); publicadminfalse8399212551681832_vendaddrtrigger()FUNCTIONCREATE FUNCTION _vendaddrtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _vendname TEXT; BEGIN -- Checks SELECT checkPrivilege('MaintainVendors') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to maintain Vendors.'; END IF; IF (TG_OP IN ('INSERT','UPDATE')) THEN IF (LENGTH(COALESCE(NEW.vendaddr_code, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Vendor Address Number.'; END IF; IF (LENGTH(COALESCE(NEW.vendaddr_name, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Vendor Address Name.'; END IF; IF (NEW.vendaddr_vend_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Vendor ID.'; END IF; SELECT vendaddr_code INTO _vendname FROM vendaddrinfo WHERE ( (vendaddr_vend_id=NEW.vendaddr_vend_id) AND (UPPER(vendaddr_code)=UPPER(NEW.vendaddr_code)) AND (vendaddr_id<>NEW.vendaddr_id) ); IF (FOUND) THEN RAISE EXCEPTION 'The Vendor Address Number entered cannot be used as it is in use.'; END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._vendaddrtrigger(); publicadminfalse8399212551681833_vendaftertrigger()FUNCTION CREATE FUNCTION _vendaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF (TG_OP = 'INSERT') THEN -- http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE LOOP UPDATE crmacct SET crmacct_vend_id=NEW.vend_id, crmacct_name=NEW.vend_name WHERE crmacct_number=NEW.vend_number; IF (FOUND) THEN EXIT; END IF; BEGIN INSERT INTO crmacct(crmacct_number, crmacct_name, crmacct_active, crmacct_type, crmacct_vend_id, crmacct_cntct_id_1, crmacct_cntct_id_2 ) VALUES (NEW.vend_number, NEW.vend_name, NEW.vend_active, 'O', NEW.vend_id, NEW.vend_cntct1_id, NEW.vend_cntct2_id); EXIT; EXCEPTION WHEN unique_violation THEN -- do nothing, and loop to try the UPDATE again END; END LOOP; /* TODO: default characteristic assignments based on vendgrp? */ ELSIF (TG_OP = 'UPDATE') THEN UPDATE crmacct SET crmacct_number = NEW.vend_number WHERE ((crmacct_vend_id=NEW.vend_id) AND (crmacct_number!=NEW.vend_number)); UPDATE crmacct SET crmacct_name = NEW.vend_name WHERE ((crmacct_vend_id=NEW.vend_id) AND (crmacct_name!=NEW.vend_name)); END IF; IF (fetchMetricBool('VendorChangeLog')) THEN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (_cmnttypeid IS NOT NULL) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'V', NEW.vend_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.vend_number <> NEW.vend_number) THEN PERFORM postComment(_cmnttypeid, 'V', NEW.vend_id, ('Number Changed from "' || OLD.vend_number || '" to "' || NEW.vend_number || '"') ); END IF; IF (OLD.vend_name <> NEW.vend_name) THEN PERFORM postComment( _cmnttypeid, 'V', NEW.vend_id, ('Name Changed from "' || OLD.vend_name || '" to "' || NEW.vend_name || '"') ); END IF; IF (OLD.vend_active <> NEW.vend_active) THEN PERFORM postComment(_cmnttypeid, 'V', NEW.vend_id, CASE WHEN NEW.vend_active THEN 'Activated' ELSE 'Deactivated' END); END IF; END IF; END IF; END IF; RETURN NEW; END; $$; *DROP FUNCTION public._vendaftertrigger(); publicadminfalse8399212551681834_vendinfoafterdeletetrigger()FUNCTIONCREATE FUNCTION _vendinfoafterdeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF EXISTS(SELECT 1 FROM checkhead WHERE ((checkhead_recip_id=OLD.vend_id) AND (checkhead_recip_type='V'))) THEN RAISE EXCEPTION '[xtuple: deleteVendor, -7]'; END IF; DELETE FROM taxreg WHERE ((taxreg_rel_type='V') AND (taxreg_rel_id=OLD.vend_id)); IF (fetchMetricBool('VendorChangeLog')) THEN PERFORM postComment(cmnttype_id, 'V', OLD.vend_id, ('Deleted "' || OLD.vend_number || '"')) FROM cmnttype WHERE (cmnttype_name='ChangeLog'); END IF; RETURN OLD; END; $$; 4DROP FUNCTION public._vendinfoafterdeletetrigger(); publicadminfalse8399212551681835_vendinfobeforedeletetrigger()FUNCTIONCREATE FUNCTION _vendinfobeforedeletetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainVendors')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Vendors.'; END IF; DELETE FROM itemsrcp WHERE itemsrcp_itemsrc_id IN (SELECT itemsrc_id FROM itemsrc WHERE itemsrc_vend_id=OLD.vend_id); DELETE FROM itemsrc WHERE (itemsrc_vend_id=OLD.vend_id); DELETE FROM vendaddrinfo WHERE (vendaddr_vend_id=OLD.vend_id); DELETE FROM docass WHERE docass_source_id = OLD.vend_id AND docass_source_type = 'V'; DELETE FROM docass WHERE docass_target_id = OLD.vend_id AND docass_target_type = 'V'; UPDATE crmacct SET crmacct_vend_id = NULL WHERE crmacct_vend_id = OLD.vend_id; RETURN OLD; END; $$; 5DROP FUNCTION public._vendinfobeforedeletetrigger(); publicadminfalse3992812551681836_vendtrigger()FUNCTIONCREATE FUNCTION _vendtrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF NOT (checkPrivilege('MaintainVendors')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Vendors.'; END IF; IF (LENGTH(COALESCE(NEW.vend_number, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Vendor Number.'; END IF; IF (LENGTH(COALESCE(NEW.vend_name, ''))=0) THEN RAISE EXCEPTION 'You must supply a valid Vendor Name.'; END IF; IF (NEW.vend_vendtype_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Vendor Type ID.'; END IF; IF (NEW.vend_terms_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Terms Code ID.'; END IF; IF (TG_OP = 'INSERT' AND fetchMetricText('CRMAccountNumberGeneration') IN ('A','O')) THEN PERFORM clearNumberIssue('CRMAccountNumber', NEW.vend_number); END IF; NEW.vend_number := UPPER(NEW.vend_number); RETURN NEW; END; $$; %DROP FUNCTION public._vendtrigger(); publicadminfalse3992812551681837_vodistaftertrigger()FUNCTIONCREATE FUNCTION _vodistaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF ( (TG_OP = 'UPDATE') OR (TG_OP = 'DELETE') ) THEN IF (OLD.vodist_tax_id <> -1) THEN -- Delete any existing voheadtax adjustment records DELETE FROM voheadtax WHERE ( (taxhist_parent_id=OLD.vodist_vohead_id) AND (taxhist_tax_id=OLD.vodist_tax_id) AND (taxhist_taxtype_id=getAdjustmentTaxTypeId()) ); END IF; END IF; IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; -- Cache Voucher Head SELECT * INTO _r FROM vohead WHERE (vohead_id=NEW.vodist_vohead_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Voucher head not found'; END IF; IF (NEW.vodist_tax_id <> -1) THEN -- Insert adjustment voheadtax INSERT INTO voheadtax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate ) VALUES ( NEW.vodist_vohead_id, getAdjustmentTaxTypeId(), NEW.vodist_tax_id, 0, NULL, 1, 0, 0, (NEW.vodist_amount * -1), _r.vohead_docdate ); END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._vodistaftertrigger(); publicadminfalse8399212551681838_vodistbeforetrigger()FUNCTIONbCREATE FUNCTION _vodistbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'DELETE') THEN IF (OLD.vodist_tax_id <> -1) THEN -- Delete any existing voheadtax adjustment records DELETE FROM voheadtax WHERE ( (taxhist_parent_id=OLD.vodist_vohead_id) AND (taxhist_tax_id=OLD.vodist_tax_id) AND (taxhist_taxtype_id=getAdjustmentTaxTypeId()) ); END IF; RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._vodistbeforetrigger(); publicadminfalse8399212551681839_voheadaftertrigger()FUNCTIONCREATE FUNCTION _voheadaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (TG_OP = 'DELETE') THEN PERFORM releaseVoNumber(CAST(OLD.vohead_number AS INTEGER)); RETURN OLD; END IF; IF (TG_OP = 'INSERT') THEN PERFORM clearNumberIssue('VcNumber', NEW.vohead_number); RETURN NEW; END IF; IF (TG_OP = 'UPDATE') THEN IF ( (COALESCE(NEW.vohead_taxzone_id,-1) <> COALESCE(OLD.vohead_taxzone_id,-1)) OR (NEW.vohead_docdate <> OLD.vohead_docdate) OR (NEW.vohead_curr_id <> OLD.vohead_curr_id) ) THEN PERFORM calculateTaxHist( 'voitemtax', voitem_id, NEW.vohead_taxzone_id, voitem_taxtype_id, NEW.vohead_docdate, NEW.vohead_curr_id, (vodist_amount * -1) ) FROM voitem JOIN vodist ON ( (vodist_vohead_id=voitem_vohead_id) AND (vodist_poitem_id=voitem_poitem_id) ) WHERE (voitem_vohead_id = NEW.vohead_id); END IF; -- Touch any Misc Tax Distributions so voheadtax is recalculated IF (NEW.vohead_docdate <> OLD.vohead_docdate) THEN UPDATE vodist SET vodist_vohead_id=NEW.vohead_id WHERE ( (vodist_vohead_id=OLD.vohead_id) AND (vodist_tax_id <> -1) ); END IF; END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._voheadaftertrigger(); publicadminfalse8399212551681840_voheadbeforetrigger()FUNCTIONCREATE FUNCTION _voheadbeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _recurid INTEGER; _newparentid INTEGER; BEGIN IF (TG_OP = 'DELETE') THEN IF (OLD.vohead_posted) THEN -- Cannot delete a posted voucher RAISE EXCEPTION 'Cannot delete a posted voucher'; END IF; /* TODO: is setting recv_invoiced and poreject_invoiced to FALSE correct? this behavior is inherited from the now-defunct deleteVoucher. */ UPDATE recv SET recv_vohead_id = NULL, recv_voitem_id = NULL, recv_invoiced = FALSE WHERE recv_vohead_id = OLD.vohead_id; UPDATE poreject SET poreject_vohead_id = NULL, poreject_voitem_id = NULL, poreject_invoiced = FALSE WHERE poreject_vohead_id = OLD.vohead_id; DELETE FROM vodist WHERE vodist_vohead_id = OLD.vohead_id; DELETE FROM voheadtax WHERE taxhist_parent_id = OLD.vohead_id; DELETE FROM voitem WHERE voitem_vohead_id = OLD.vohead_id; SELECT recur_id INTO _recurid FROM recur WHERE ((recur_parent_id=OLD.vohead_id) AND (recur_parent_type='V')); IF (_recurid IS NOT NULL) THEN SELECT vohead_id INTO _newparentid FROM vohead WHERE ((vohead_recurring_vohead_id=OLD.vohead_id) AND (vohead_id!=OLD.vohead_id)) ORDER BY vohead_docdate LIMIT 1; IF (_newparentid IS NULL) THEN DELETE FROM recur WHERE recur_id=_recurid; ELSE UPDATE recur SET recur_parent_id=_newparentid WHERE recur_id=_recurid; UPDATE vohead SET vohead_recurring_vohead_id=_newparentid WHERE vohead_recurring_vohead_id=OLD.vohead_id AND vohead_id!=OLD.vohead_id; END IF; END IF; RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._voheadbeforetrigger(); publicadminfalse8399212551681841_voitemaftertrigger()FUNCTIONCREATE FUNCTION _voitemaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN IF (TG_OP = 'DELETE') THEN RETURN OLD; END IF; -- Cache Voucher Head SELECT * INTO _r FROM vohead WHERE (vohead_id=NEW.voitem_vohead_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Voucher head not found'; END IF; -- Calculate Tax PERFORM calculateTaxHist( 'voitemtax', NEW.voitem_id, COALESCE(_r.vohead_taxzone_id, -1), NEW.voitem_taxtype_id, COALESCE(_r.vohead_docdate, CURRENT_DATE), COALESCE(_r.vohead_curr_id, -1), COALESCE(SUM(vodist_amount * -1), 0) ) FROM vodist WHERE ( (vodist_vohead_id=_r.vohead_id) AND (vodist_poitem_id=NEW.voitem_poitem_id) ); RETURN NEW; END; $$; ,DROP FUNCTION public._voitemaftertrigger(); publicadminfalse8399212551681842_voitembeforetrigger()FUNCTION|CREATE FUNCTION _voitembeforetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'DELETE') THEN DELETE FROM voitemtax WHERE (taxhist_parent_id=OLD.voitem_id); RETURN OLD; END IF; RETURN NEW; END; $$; -DROP FUNCTION public._voitembeforetrigger(); publicadminfalse8399212551681843_warehoustrigger()FUNCTION< CREATE FUNCTION _warehoustrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; _check BOOLEAN; _checkId INTEGER; BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainWarehouses') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add new Sites.'; END IF; ELSE SELECT checkPrivilege('MaintainWarehouses') OR checkPrivilege('IssueCountTags') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Site.'; END IF; END IF; -- Code is required IF (LENGTH(COALESCE(NEW.warehous_code,''))=0) THEN RAISE EXCEPTION 'You must supply a valid Site Code.'; END IF; -- Sitetype is required IF (NEW.warehous_sitetype_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Site Type.'; END IF; -- Cost Category is required for Transit types IF ((NEW.warehous_transit) AND (NEW.warehous_costcat_id IS NULL)) THEN RAISE EXCEPTION 'You must supply a valid Cost Category for Transit Sites.'; END IF; -- Code must be unique SELECT warehous_id INTO _checkId FROM whsinfo WHERE ( (UPPER(warehous_code)=UPPER(NEW.warehous_code)) AND (warehous_id<>NEW.warehous_id) ); IF (FOUND) THEN RAISE EXCEPTION 'You must supply a unique Site Code.'; END IF; -- Count Tag Prefix must be unique IF (TG_OP = 'INSERT') THEN SELECT warehous_id INTO _checkId FROM whsinfo WHERE (warehous_counttag_prefix=NEW.warehous_counttag_prefix); ELSE SELECT warehous_id INTO _checkId FROM whsinfo WHERE ( (warehous_counttag_prefix=NEW.warehous_counttag_prefix) AND (warehous_id<>NEW.warehous_id) ); END IF; IF (FOUND) THEN RAISE EXCEPTION 'You must supply a unique Count Tag Prefix.'; END IF; -- Check Complete -- Change Log IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='WarehouseChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); IF (FOUND) THEN IF (TG_OP = 'INSERT') THEN PERFORM postComment(_cmnttypeid, 'WH', NEW.warehous_id, 'Created'); ELSIF (TG_OP = 'UPDATE') THEN IF (OLD.warehous_code <> NEW.warehous_code) THEN PERFORM postComment( _cmnttypeid, 'WH', NEW.warehous_id, ('Code Changed from "' || OLD.warehous_code || '" to "' || NEW.warehous_code || '"') ); END IF; IF (OLD.warehous_descrip <> NEW.warehous_descrip) THEN PERFORM postComment( _cmnttypeid, 'WH', NEW.warehous_id, ( 'Description Changed from "' || OLD.warehous_descrip || '" to "' || NEW.warehous_descrip || '"' ) ); END IF; IF (OLD.warehous_active <> NEW.warehous_active) THEN IF (NEW.warehous_active) THEN PERFORM postComment(_cmnttypeid, 'WH', NEW.warehous_id, 'Activated'); ELSE PERFORM postComment(_cmnttypeid, 'WH', NEW.warehous_id, 'Deactivated'); END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._warehoustrigger(); publicadminfalse3992812551681844_whsezonetrigger()FUNCTIONCREATE FUNCTION _whsezonetrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _check BOOLEAN; _checkId INTEGER; BEGIN -- Checks -- Start with privileges IF (TG_OP = 'INSERT') THEN SELECT checkPrivilege('MaintainWarehouses') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to add new Site Zones.'; END IF; ELSE SELECT checkPrivilege('MaintainWarehouses') INTO _check; IF NOT (_check) THEN RAISE EXCEPTION 'You do not have privileges to alter a Site Zone.'; END IF; END IF; -- Name is required IF (LENGTH(COALESCE(NEW.whsezone_name,''))=0) THEN RAISE EXCEPTION 'You must supply a valid Site Zone Name.'; END IF; -- Site is required IF (NEW.whsezone_warehous_id IS NULL) THEN RAISE EXCEPTION 'You must supply a valid Site.'; END IF; RETURN NEW; END; $$; )DROP FUNCTION public._whsezonetrigger(); publicadminfalse8399212551681845_womatlaftertrigger()FUNCTIONCREATE FUNCTION _womatlaftertrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF (TG_OP = 'INSERT') THEN -- Create any required P/R's PERFORM createPr('W', NEW.womatl_id) FROM itemsite WHERE ((itemsite_id=NEW.womatl_itemsite_id) AND (itemsite_createpr)); END IF; RETURN NEW; END; $$; ,DROP FUNCTION public._womatlaftertrigger(); publicadminfalse3992812551681846 _wotrigger()FUNCTIONCREATE FUNCTION _wotrigger() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN IF ( SELECT (metric_value='t') FROM metric WHERE (metric_name='WorkOrderChangeLog') ) THEN -- Cache the cmnttype_id for ChangeLog SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name='ChangeLog'); ELSE _cmnttypeid := -1; END IF; IF (TG_OP = 'INSERT') THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', NEW.wo_id, itemsite_warehous_id, (NEW.wo_number || '-' || NEW.wo_subnumber) FROM evntnot, evnttype, itemsite, item WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.wo_itemsite_id) AND (itemsite_item_id=item_id) AND (NEW.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='WoCreated') ); IF (_cmnttypeid <> -1) THEN PERFORM postComment(_cmnttypeid, 'W', NEW.wo_id, 'Created'); END IF; IF (fetchMetricText('WONumberGeneration') IN ('A','O')) THEN --- clear the number from the issue cache PERFORM clearNumberIssue('WoNumber', NEW.wo_number); END IF; RETURN NEW; ELSE IF (TG_OP = 'DELETE') THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', OLD.wo_id, itemsite_warehous_id, (OLD.wo_number || '-' || OLD.wo_subnumber) FROM evntnot, evnttype, itemsite, item WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=OLD.wo_itemsite_id) AND (itemsite_item_id=item_id) AND (OLD.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='WoCancelled') ); DELETE FROM docass WHERE docass_source_id = OLD.wo_id AND docass_source_type = 'W'; DELETE FROM docass WHERE docass_target_id = OLD.wo_id AND docass_target_type = 'W'; DELETE FROM comment WHERE ( (comment_source='W') AND (comment_source_id=OLD.wo_id) ); DELETE FROM charass WHERE ((charass_target_type='W') AND (charass_target_id=OLD.wo_id)); RETURN OLD; ELSE IF (TG_OP = 'UPDATE') THEN IF (NEW.wo_qtyord <> OLD.wo_qtyord) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_oldvalue, evntlog_newvalue ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', NEW.wo_id, itemsite_warehous_id, (NEW.wo_number || '-' || NEW.wo_subnumber), OLD.wo_qtyord, NEW.wo_qtyord FROM evntnot, evnttype, itemsite, item WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.wo_itemsite_id) AND (itemsite_item_id=item_id) AND ( (NEW.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) OR (OLD.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) ) AND (evnttype_name='WoQtyChanged') ); IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'W', NEW.wo_id, ( 'Qty. Ordered Changed from ' || formatQty(OLD.wo_qtyord) || ' to ' || formatQty(NEW.wo_qtyord ) ) ); END IF; END IF; IF (NEW.wo_duedate <> OLD.wo_duedate) THEN INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_olddate, evntlog_newdate ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', NEW.wo_id, itemsite_warehous_id, (NEW.wo_number || '-' || NEW.wo_subnumber), OLD.wo_duedate, NEW.wo_duedate FROM evntnot, evnttype, itemsite, item WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (itemsite_id=NEW.wo_itemsite_id) AND (itemsite_item_id=item_id) AND ( (NEW.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) OR (OLD.wo_duedate <= (CURRENT_DATE + itemsite_eventfence)) ) AND (evnttype_name='WoDueDateChanged') ); IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'W', NEW.wo_id, ( 'Due Date Changed from ' || formatDate(OLD.wo_duedate) || ' to ' || formatDate(NEW.wo_duedate ) ) ); END IF; END IF; IF (NEW.wo_status <> OLD.wo_status) THEN IF (_cmnttypeid <> -1) THEN PERFORM postComment( _cmnttypeid, 'W', NEW.wo_id, ('Status Changed from ' || OLD.wo_status || ' to ' || NEW.wo_status) ); END IF; END IF; END IF; END IF; END IF; RETURN NEW; END; $$; #DROP FUNCTION public._wotrigger(); publicadminfalse8399212551681847acknowledgemessage(integer)FUNCTIONCREATE FUNCTION acknowledgemessage(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMsgid ALIAS FOR $1; BEGIN UPDATE msguser SET msguser_viewed=CURRENT_TIMESTAMP WHERE ( (msguser_msg_id=pMsgid) AND (msguser_username=getEffectiveXtUser()) ); RETURN TRUE; END; $_$; 2DROP FUNCTION public.acknowledgemessage(integer); publicadminfalse3992812551681848actcost(integer)FUNCTION CREATE FUNCTION actcost(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN actCost($1, NULL, baseCurrId()); END; $_$; 'DROP FUNCTION public.actcost(integer); publicadminfalse8399212551681849actcost(integer, integer)FUNCTIONCREATE FUNCTION actcost(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN actCost($1, $2, baseCurrId()); END; $_$; 0DROP FUNCTION public.actcost(integer, integer); publicadminfalse8399212551681850"actcost(integer, integer, integer)FUNCTIONCREATE FUNCTION actcost(integer, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pBomitemid ALIAS FOR $2; pCurrid ALIAS FOR $3; _cost NUMERIC; BEGIN -- Return actual cost in the given currency at the current conversion rate SELECT SUM(CASE WHEN (bomitemcost_id IS NOT NULL) THEN ROUND(currToCurr(bomitemcost_curr_id, pCurrid, bomitemcost_actcost, CURRENT_DATE), 6) ELSE ROUND(currToCurr(itemcost_curr_id, pCurrid, itemcost_actcost, CURRENT_DATE), 6) END) INTO _cost FROM itemcost LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=pBomitemid AND bomitemcost_costelem_id=itemcost_costelem_id) WHERE (itemcost_item_id=pItemid); IF (_cost IS NULL) THEN RETURN 0; ELSE RETURN _cost; END IF; END; $_$; 9DROP FUNCTION public.actcost(integer, integer, integer); publicadminfalse8399212551681851addrusecount(integer)FUNCTIONCREATE FUNCTION addrusecount(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAddrId ALIAS FOR $1; _fk RECORD; _r RECORD; _seq INTEGER; _col TEXT; _qry TEXT; _count INTEGER = 0; BEGIN -- Determine where this address is used by analyzing foreign key linkages -- TO DO: Can this be rationalized with cntctused(int)? FOR _fk IN SELECT pg_namespace.nspname AS schemaname, con.relname AS tablename, conkey AS seq, conrelid AS class_id FROM pg_constraint, pg_class f, pg_class con, pg_namespace WHERE confrelid=f.oid AND conrelid=con.oid AND f.relname = 'addr' AND con.relnamespace=pg_namespace.oid AND con.relname NOT IN ('pohead') -- exception(s) where address key doesn't actually drive document information LOOP -- Validate IF (ARRAY_UPPER(_fk.seq,1) > 1) THEN RAISE EXCEPTION 'Checks to tables where the address is one of multiple foreign key columns is not supported. Error on Table: %', pg_namespace.nspname || '.' || con.relname; END IF; _seq := _fk.seq[1]; -- Get the specific column name SELECT attname INTO _col FROM pg_attribute, pg_class WHERE ((attrelid=pg_class.oid) AND (pg_class.oid=_fk.class_id) AND (attnum=_seq)); -- See if there are dependencies _qry := 'SELECT * FROM ' || _fk.schemaname || '.' || _fk.tablename || ' WHERE ('|| _col || '=' || pAddrId || ');'; FOR _r IN EXECUTE _qry LOOP _count := _count + 1; END LOOP; END LOOP; RETURN _count; END; $_$; ,DROP FUNCTION public.addrusecount(integer); publicadminfalse8399212551681852Uaddtaxtoglseries(integer, text, text, text, integer, date, date, text, integer, text)FUNCTIONCREATE FUNCTION addtaxtoglseries(integer, text, text, text, integer, date, date, text, integer, text) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pCurrId ALIAS FOR $5; pExchDate ALIAS FOR $6; pDistDate ALIAS FOR $7; pTableName ALIAS FOR $8; pParentId ALIAS FOR $9; pNotes ALIAS FOR $10; _count INTEGER := 0; _baseTax NUMERIC := 0; _returnVal NUMERIC := 0; _t RECORD; _test INTEGER := 0; BEGIN -- This is just a fancy select statement on taxhist. -- Because all tax records tables inherit from taxhist, -- we can use the same select statement for all. -- https://www.postgresql.org/docs/8.1/static/ddl-inherit.html -- pTableName in the where clause narrows down the selection -- to the correct sub table. FOR _t IN SELECT * FROM taxhist JOIN tax ON (tax_id = taxhist_tax_id) JOIN pg_class ON (pg_class.oid = taxhist.tableoid) WHERE ( (taxhist_parent_id = pParentId) AND (relname = pTableName) ) LOOP _count := _count + 1; _baseTax := currToBase(pCurrId, _t.taxhist_tax, pExchDate); _returnVal := _returnVal + _baseTax; PERFORM insertIntoGLSeries( pSequence, pSource, pDocType, pDocNumber, _t.tax_sales_accnt_id, _baseTax, pDistDate, pNotes ); UPDATE taxhist SET taxhist_docdate=pExchDate, taxhist_distdate=pDistDate, taxhist_curr_id=pCurrId, taxhist_curr_rate=curr_rate FROM curr_rate WHERE ((taxhist_id=_t.taxhist_id) AND (pCurrId=curr_id) AND ( pExchDate BETWEEN curr_effective AND curr_expires) ); END LOOP; RETURN _returnVal; END; $_$; lDROP FUNCTION public.addtaxtoglseries(integer, text, text, text, integer, date, date, text, integer, text); publicadminfalse8399212551681853addtopackinglistbatch(integer)FUNCTIONCREATE FUNCTION addtopackinglistbatch(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; returnVal INTEGER; BEGIN -- MIN because error codes are negative SELECT MIN(addToPackingListBatch('SO', pSoheadid, shiphead_id)) INTO returnVal FROM shiphead WHERE ((shiphead_order_id=pSoheadid) AND (NOT shiphead_shipped) AND (shiphead_order_type='SO')); IF (NOT FOUND OR returnVal IS NULL) THEN returnVal := addToPackingListBatch('SO', pSoheadid, NULL); END IF; RETURN returnVal; END; $_$; 5DROP FUNCTION public.addtopackinglistbatch(integer); publicadminfalse8399212551681854'addtopackinglistbatch(integer, integer)FUNCTION&CREATE FUNCTION addtopackinglistbatch(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN addToPackingListBatch('SO', $1, $2); END; $_$; >DROP FUNCTION public.addtopackinglistbatch(integer, integer); publicadminfalse8399212551681855$addtopackinglistbatch(text, integer)FUNCTIONCREATE FUNCTION addtopackinglistbatch(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pheadtype ALIAS FOR $1; pheadid ALIAS FOR $2; returnVal INTEGER; BEGIN -- MIN because error codes are negative SELECT MIN(addToPackingListBatch(pheadtype, pheadid, shiphead_id)) INTO returnVal FROM shiphead WHERE ((shiphead_order_id=pheadid) AND (NOT shiphead_shipped) AND (shiphead_order_type=pheadtype)); IF (NOT FOUND OR returnVal IS NULL) THEN returnVal := addToPackingListBatch(pheadtype, pheadid, NULL); END IF; RETURN returnVal; END; $_$; ;DROP FUNCTION public.addtopackinglistbatch(text, integer); publicadminfalse8399212551681856-addtopackinglistbatch(text, integer, integer)FUNCTIONCREATE FUNCTION addtopackinglistbatch(text, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pheadtype ALIAS FOR $1; pheadid ALIAS FOR $2; pshipheadid ALIAS FOR $3; _check INTEGER; BEGIN SELECT pack_id INTO _check FROM pack WHERE ((pack_head_id=pheadid) AND ((pack_shiphead_id=pshipheadid) OR (pshipheadid IS NULL AND pack_shiphead_id IS NULL)) AND (pack_head_type=pheadtype) ); IF (NOT FOUND) THEN INSERT INTO pack ( pack_head_type, pack_head_id, pack_shiphead_id, pack_printed ) VALUES ( pheadtype, pheadid, pshipheadid, FALSE ); -- Auto Firm Sales Orders conditionally based on metric IF ( (pheadtype = 'SO') AND (fetchMetricBool('FirmSalesOrderPackingList')) ) THEN UPDATE coitem SET coitem_firm=TRUE WHERE (coitem_cohead_id=pheadid); END IF; END IF; RETURN pheadid; END; $_$; DDROP FUNCTION public.addtopackinglistbatch(text, integer, integer); publicadminfalse8399212551681857)adjustinvvalue(integer, numeric, integer)FUNCTION\CREATE FUNCTION adjustinvvalue(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pNewValue ALIAS FOR $2; pAccountid ALIAS FOR $3; _delta NUMERIC; _glreturn INTEGER; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN SELECT pNewValue - itemsite_value INTO _delta FROM itemsite WHERE (itemsite_id=pItemsiteid) FOR UPDATE; IF (NOT FOUND) THEN RETURN -1; END IF; SELECT insertGLTransaction('I/M', '', 'Post Value', 'Inventory Value Adjustment for ' || item_number, COALESCE (pAccountid, costcat_adjustment_accnt_id), costcat_asset_accnt_id, -1, _delta, CURRENT_DATE) INTO _glreturn FROM itemsite JOIN costcat ON (itemsite_costcat_id=costcat_id) JOIN item ON (itemsite_item_id=item_id) WHERE (itemsite_id=pItemsiteid); -- Create the AD transaction INSERT INTO invhist ( invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT itemsite_id, CURRENT_TIMESTAMP, 'AD', 0.0, itemsite_qtyonhand, itemsite_qtyonhand, '', 'Inventory Value Adjustment', uom_name, _delta, FALSE, itemsite_costmethod, itemsite_value, pNewValue, 0 FROM itemsite, item, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_id=pItemsiteid) ); UPDATE itemsite SET itemsite_value=pNewValue WHERE (itemsite_id=pItemsiteid); RETURN 0; END; $_$; @DROP FUNCTION public.adjustinvvalue(integer, numeric, integer); publicadminfalse3992812551681858adjustments(text)FUNCTIONbCREATE FUNCTION adjustments(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('CC', 'AD')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; (DROP FUNCTION public.adjustments(text); publicadminfalse8399212551681859allocatedforso(integer, date)FUNCTIONnCREATE FUNCTION allocatedforso(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN allocatedForSo(pItemsiteid, startOfTime(), pDate); END; $_$; 4DROP FUNCTION public.allocatedforso(integer, date); publicadminfalse8399212551681860 allocatedforso(integer, integer)FUNCTIONCREATE FUNCTION allocatedforso(integer, integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN allocatedForSo(pItemsiteid, startOfTime(), (CURRENT_DATE + pDate)); END; $_$; 7DROP FUNCTION public.allocatedforso(integer, integer); publicadminfalse83992p12551681861#allocatedforso(integer, date, date)FUNCTION CREATE FUNCTION allocatedforso(integer, date, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _qty NUMERIC; BEGIN SELECT COALESCE(SUM(noNeg(itemuomtouom(itemsite_item_id, coitem_qty_uom_id, NULL, coitem_qtyord - (coitem_qtyshipped + qtyAtShipping(coitem_id)) + coitem_qtyreturned))), 0.0) INTO _qty FROM coitem, itemsite, item WHERE ( (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (coitem_status='O') AND (coitem_itemsite_id=pItemsiteid) AND (coitem_scheddate BETWEEN pStartDate AND pEndDate) ); RETURN _qty; END; $_$; :DROP FUNCTION public.allocatedforso(integer, date, date); publicadminfalse39928y12551681862allocatedforwo(integer, date)FUNCTIONnCREATE FUNCTION allocatedforwo(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN allocatedForWo(pItemsiteid, startOfTime(), pDate); END; $_$; 4DROP FUNCTION public.allocatedforwo(integer, date); publicadminfalse39928v12551681863 allocatedforwo(integer, integer)FUNCTIONCREATE FUNCTION allocatedforwo(integer, integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAheadDays ALIAS FOR $2; BEGIN RETURN allocatedForWo(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookaheadDays)); END; $_$; 7DROP FUNCTION public.allocatedforwo(integer, integer); publicadminfalse8399212551681864#allocatedforwo(integer, date, date)FUNCTION,CREATE FUNCTION allocatedforwo(integer, date, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _itemtype TEXT; _qty NUMERIC; BEGIN SELECT item_type INTO _itemtype FROM itemsite JOIN item ON (item_id=itemsite_item_id) WHERE (itemsite_id=pItemsiteid); IF (_itemtype != 'T') THEN SELECT COALESCE(SUM(noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq - womatl_qtyiss))), 0.0) INTO _qty FROM womatl JOIN wo ON (wo_id=womatl_wo_id AND wo_status IN ('E','I','R')) JOIN itemsite ON (itemsite_id=womatl_itemsite_id) WHERE (womatl_itemsite_id=pItemsiteid) AND (womatl_duedate BETWEEN pStartDate AND pEndDate); ELSE SELECT COALESCE(SUM(noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq))), 0.0) - ( SELECT COALESCE(SUM(invhist_invqty),0) FROM itemsite, item, wo, womatl LEFT OUTER JOIN womatlpost ON (womatl_id=womatlpost_womatl_id) LEFT OUTER JOIN invhist ON ((womatlpost_invhist_id=invhist_id) AND (invhist_invqty > 0)) WHERE ( (womatl_itemsite_id=pItemsiteid) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_duedate BETWEEN pStartDate AND pEndDate) AND (wo_id=womatl_wo_id) AND (wo_status IN ('E','I','R')) ) ) INTO _qty FROM womatl JOIN wo ON (wo_id=womatl_wo_id AND wo_status IN ('E','I','R')) JOIN itemsite ON (itemsite_id=womatl_itemsite_id) WHERE (womatl_itemsite_id=pItemsiteid) AND (womatl_duedate BETWEEN pStartDate AND pEndDate); END IF; RETURN COALESCE(_qty,0); END; $_$; :DROP FUNCTION public.allocatedforwo(integer, date, date); publicadminfalse8399212551681865alterencrypt(text, text)FUNCTIONCREATE FUNCTION alterencrypt(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOldKey ALIAS FOR $1; pNewKey ALIAS FOR $2; _cc RECORD; _ccaud RECORD; _metricenc RECORD; num_updated INTEGER; BEGIN num_updated := 0; -- Update ccard FOR _cc IN SELECT ccard_id, decrypt(setbytea(ccard_name), setbytea(pOldKey), 'bf') AS ccard_name, decrypt(setbytea(ccard_address1), setbytea(pOldKey), 'bf') AS ccard_address1, decrypt(setbytea(ccard_address2), setbytea(pOldKey), 'bf') AS ccard_address2, decrypt(setbytea(ccard_city), setbytea(pOldKey), 'bf') AS ccard_city, decrypt(setbytea(ccard_state), setbytea(pOldKey), 'bf') AS ccard_state, decrypt(setbytea(ccard_zip), setbytea(pOldKey), 'bf') AS ccard_zip, decrypt(setbytea(ccard_country), setbytea(pOldKey), 'bf') AS ccard_country, decrypt(setbytea(ccard_number), setbytea(pOldKey), 'bf') AS ccard_number, decrypt(setbytea(ccard_month_expired), setbytea(pOldKey), 'bf') AS ccard_month_expired, decrypt(setbytea(ccard_year_expired), setbytea(pOldKey), 'bf') AS ccard_year_expired FROM ccard LOOP UPDATE ccard set ccard_name = encrypt(setbytea(_cc.ccard_name), setbytea(pNewKey), 'bf'), ccard_address1 = encrypt(setbytea(_cc.ccard_address1), setbytea(pNewKey), 'bf'), ccard_address2 = encrypt(setbytea(_cc.ccard_address2), setbytea(pNewKey), 'bf'), ccard_city = encrypt(setbytea(_cc.ccard_city), setbytea(pNewKey), 'bf'), ccard_state = encrypt(setbytea(_cc.ccard_state), setbytea(pNewKey), 'bf'), ccard_zip = encrypt(setbytea(_cc.ccard_zip), setbytea(pNewKey), 'bf'), ccard_country = encrypt(setbytea(_cc.ccard_country), setbytea(pNewKey), 'bf'), ccard_number = encrypt(setbytea(_cc.ccard_number), setbytea(pNewKey), 'bf'), ccard_month_expired = encrypt(setbytea(_cc.ccard_month_expired), setbytea(pNewKey), 'bf'), ccard_year_expired = encrypt(setbytea(_cc.ccard_year_expired), setbytea(pNewKey), 'bf') WHERE ccard_id = _cc.ccard_id; num_updated := num_updated + 1; END LOOP; -- Update ccardaud FOR _ccaud IN SELECT ccardaud_id, decrypt(setbytea(ccardaud_ccard_name_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_name_old, decrypt(setbytea(ccardaud_ccard_name_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_name_new, decrypt(setbytea(ccardaud_ccard_address1_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_address1_old, decrypt(setbytea(ccardaud_ccard_address1_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_address1_new, decrypt(setbytea(ccardaud_ccard_address2_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_address2_old, decrypt(setbytea(ccardaud_ccard_address2_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_address2_new, decrypt(setbytea(ccardaud_ccard_city_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_city_old, decrypt(setbytea(ccardaud_ccard_city_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_city_new, decrypt(setbytea(ccardaud_ccard_state_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_state_old, decrypt(setbytea(ccardaud_ccard_state_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_state_new, decrypt(setbytea(ccardaud_ccard_zip_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_zip_old, decrypt(setbytea(ccardaud_ccard_zip_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_zip_new, decrypt(setbytea(ccardaud_ccard_country_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_country_old, decrypt(setbytea(ccardaud_ccard_country_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_country_new, decrypt(setbytea(ccardaud_ccard_number_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_number_old, decrypt(setbytea(ccardaud_ccard_number_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_number_new, decrypt(setbytea(ccardaud_ccard_month_expired_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_month_expired_old, decrypt(setbytea(ccardaud_ccard_month_expired_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_month_expired_new, decrypt(setbytea(ccardaud_ccard_year_expired_old), setbytea(pOldKey), 'bf') AS ccardaud_ccard_year_expired_old, decrypt(setbytea(ccardaud_ccard_year_expired_new), setbytea(pOldKey), 'bf') AS ccardaud_ccard_year_expired_new FROM ccardaud LOOP UPDATE ccardaud set ccardaud_ccard_name_old = encrypt(setbytea(_ccaud.ccardaud_ccard_name_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_name_new = encrypt(setbytea(_ccaud.ccardaud_ccard_name_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_address1_old = encrypt(setbytea(_ccaud.ccardaud_ccard_address1_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_address1_new = encrypt(setbytea(_ccaud.ccardaud_ccard_address1_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_address2_old = encrypt(setbytea(_ccaud.ccardaud_ccard_address2_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_address2_new = encrypt(setbytea(_ccaud.ccardaud_ccard_address2_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_city_old = encrypt(setbytea(_ccaud.ccardaud_ccard_city_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_city_new = encrypt(setbytea(_ccaud.ccardaud_ccard_city_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_state_old = encrypt(setbytea(_ccaud.ccardaud_ccard_state_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_state_new = encrypt(setbytea(_ccaud.ccardaud_ccard_state_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_zip_old = encrypt(setbytea(_ccaud.ccardaud_ccard_zip_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_zip_new = encrypt(setbytea(_ccaud.ccardaud_ccard_zip_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_country_old = encrypt(setbytea(_ccaud.ccardaud_ccard_country_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_country_new = encrypt(setbytea(_ccaud.ccardaud_ccard_country_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_number_old = encrypt(setbytea(_ccaud.ccardaud_ccard_number_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_number_new = encrypt(setbytea(_ccaud.ccardaud_ccard_number_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_month_expired_old = encrypt(setbytea(_ccaud.ccardaud_ccard_month_expired_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_month_expired_new = encrypt(setbytea(_ccaud.ccardaud_ccard_month_expired_new), setbytea(pNewKey), 'bf'), ccardaud_ccard_year_expired_old = encrypt(setbytea(_ccaud.ccardaud_ccard_year_expired_old), setbytea(pNewKey), 'bf'), ccardaud_ccard_year_expired_new = encrypt(setbytea(_ccaud.ccardaud_ccard_year_expired_new), setbytea(pNewKey), 'bf') WHERE ccardaud_id = _ccaud.ccardaud_id; num_updated := num_updated + 1; END LOOP; -- Update metricenc FOR _metricenc IN SELECT metricenc_id, decrypt(setbytea(metricenc_value), setbytea(pOldKey), 'bf') AS metricenc_value FROM metricenc LOOP UPDATE metricenc set metricenc_value = encrypt(setbytea(_metricenc.metricenc_value), setbytea(pNewKey), 'bf') WHERE metricenc_id = _metricenc.metricenc_id; num_updated := num_updated + 1; END LOOP; RETURN num_updated; END; $_$; /DROP FUNCTION public.alterencrypt(text, text); publicadminfalse83992n12552005489apaging(date, boolean)FUNCTIONrCREATE FUNCTION apaging(date, boolean) RETURNS SETOF apaging LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAsOfDate ALIAS FOR $1; pUseDocDate ALIAS FOR $2; _row apaging%ROWTYPE; _x RECORD; _returnVal INTEGER; _asOfDate DATE; BEGIN _asOfDate := COALESCE(pAsOfDate,current_date); FOR _x IN SELECT --report uses currency rate snapshot to convert all amounts to base based on apopen_docdate to ensure the same exchange rate --today and greater base: CASE WHEN((apopen_duedate >= DATE(_asOfDate))) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS cur_val, --0 to 30 base CASE WHEN((apopen_duedate >= DATE(_asOfDate)-30) AND (apopen_duedate < DATE(_asOfDate))) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS thirty_val, --30-60 base CASE WHEN((apopen_duedate >= DATE(_asOfDate)-60) AND (apopen_duedate < DATE(_asOfDate) - 30 )) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS sixty_val, --60-90 base CASE WHEN((apopen_duedate >= DATE(_asOfDate)-90) AND (apopen_duedate < DATE(_asOfDate) - 60)) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS ninety_val, --greater than 90 base: CASE WHEN((apopen_duedate > DATE(_asOfDate)-10000) AND (apopen_duedate < DATE(_asOfDate) - 90)) THEN (((apopen_amount-apopen_paid + COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS plus_val, --total amount base: CASE WHEN((apopen_duedate > DATE(_asOfDate)-10000)) THEN (((apopen_amount-apopen_paid+COALESCE(SUM(apapply_target_paid),0)))/apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END) ELSE 0 END AS total_val, --AP Open Amount base CASE WHEN apopen_doctype IN ('C', 'R') THEN (apopen_amount * -1) / apopen_curr_rate ELSE apopen_amount / apopen_curr_rate END AS apopen_amount, apopen_docdate, apopen_duedate, apopen_ponumber, apopen_invcnumber, apopen_docnumber, apopen_doctype, vend_id, vend_name, vend_number, vend_vendtype_id, vendtype_code, terms_descrip, determineDiscountDate(terms_id, apopen_docdate) AS discdate, noNeg(apopen_discountable_amount * CASE WHEN (CURRENT_DATE <= determineDiscountDate(terms_id, apopen_docdate)) THEN terms_discprcnt ELSE 0.0 END) AS disc_val, terms_discdays AS discdays, (terms_discprcnt * 100.0) AS discprcnt FROM vendinfo, vendtype, apopen LEFT OUTER JOIN terms ON (apopen_terms_id=terms_id) LEFT OUTER JOIN apapply ON (((apopen_id=apapply_target_apopen_id) OR (apopen_id=apapply_source_apopen_id)) AND (apapply_postdate >_asOfDate)) WHERE ( (apopen_vend_id = vend_id) AND (vend_vendtype_id=vendtype_id) AND (CASE WHEN (pUseDocDate) THEN apopen_docdate ELSE apopen_distdate END <= _asOfDate) AND (COALESCE(apopen_closedate,_asOfDate+1)>_asOfDate) ) GROUP BY apopen_id,apopen_docdate,apopen_duedate,apopen_ponumber, apopen_invcnumber, apopen_docnumber,apopen_doctype,apopen_paid, apopen_curr_id,apopen_amount,vend_id,vend_name,vend_number,vend_vendtype_id,vendtype_code,terms_descrip, apopen_curr_rate, terms_id, terms_discdays, terms_discprcnt, apopen_discountable_amount ORDER BY vend_number, apopen_duedate LOOP _row.apaging_docdate := _x.apopen_docdate; _row.apaging_duedate := _x.apopen_duedate; _row.apaging_ponumber := _x.apopen_ponumber; _row.apaging_invcnumber := _x.apopen_invcnumber; _row.apaging_docnumber := _x.apopen_docnumber; _row.apaging_doctype := _x.apopen_doctype; _row.apaging_vend_id := _x.vend_id; _row.apaging_vend_number := _x.vend_number; _row.apaging_vend_name := _x.vend_name; _row.apaging_vend_vendtype_id := _x.vend_vendtype_id; _row.apaging_vendtype_code := _x.vendtype_code; _row.apaging_terms_descrip := _x.terms_descrip; _row.apaging_apopen_amount := _x.apopen_amount; _row.apaging_cur_val := _x.cur_val; _row.apaging_thirty_val := _x.thirty_val; _row.apaging_sixty_val := _x.sixty_val; _row.apaging_ninety_val := _x.ninety_val; _row.apaging_plus_val := _x.plus_val; _row.apaging_total_val := _x.total_val; _row.apaging_discdate := _x.discdate; _row.apaging_disc_val := _x.disc_val; _row.apaging_discdays := _x.discdays; _row.apaging_discprcnt := _x.discprcnt; RETURN NEXT _row; END LOOP; RETURN; END; $_$; -DROP FUNCTION public.apaging(date, boolean); publicadminfalse83992257312551681867apapplied(integer, date)FUNCTION}CREATE FUNCTION apapplied(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pDate ALIAS FOR $2; _amount NUMERIC; BEGIN -- Return amount applied to an apopen in base currency as of apapply_postdate SELECT SUM(currtobase(apapply_curr_id,apapply_amount,apapply_postdate)) INTO _amount FROM apapply WHERE (((apapply_target_apopen_id = pApopenid) OR (apapply_source_apopen_id = pApopenid)) AND (((apapply_journalnumber=0) AND (apapply_postdate <= pDate)) OR EXISTS(SELECT * FROM gltrans WHERE ((gltrans_journalnumber=apapply_journalnumber) AND (gltrans_date <= pDate))))); IF (_amount IS NULL) THEN RETURN 0; ELSE RETURN _amount; END IF; END; $_$; /DROP FUNCTION public.apapplied(integer, date); publicadminfalse8399212551681868apcheckpending(integer)FUNCTIONcCREATE FUNCTION apcheckpending(integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; _qty NUMERIC := 0.0; BEGIN SELECT SUM(checkitem_amount + checkitem_discount) INTO _qty FROM checkitem JOIN checkhead ON (checkitem_checkhead_id=checkhead_id) WHERE ((checkitem_apopen_id=pApopenid) AND (NOT checkhead_deleted) AND (NOT checkhead_replaced) AND (NOT checkhead_posted)); RETURN COALESCE(_qty, 0.0); END; $_$; .DROP FUNCTION public.apcheckpending(integer); publicadminfalse8399212551681869+apcurrgain(integer, integer, numeric, date)FUNCTIONCREATE FUNCTION apcurrgain(integer, integer, numeric, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenId ALIAS FOR $1; pCurrId ALIAS FOR $2; pValue ALIAS FOR $3; pDate ALIAS FOR $4; _start DATE; _end DATE; _gain NUMERIC; _r RECORD; BEGIN IF (pApopenId IS NULL OR pValue = 0) THEN RETURN 0; END IF; SELECT apopen_docdate, apopen_curr_rate INTO _r FROM apopen WHERE (apopen_id=pApopenId); IF (_r.apopen_docdate > pDate) THEN _gain := (currToBase(pCurrId, pValue, pDate) - (pValue / _r.apopen_curr_rate)) * -1; ELSE _gain := (pValue / _r.apopen_curr_rate) - currToBase(pCurrId, pValue, pDate); END IF; IF (_gain IS NULL) THEN RAISE EXCEPTION 'Error processing currency gain/loss.'; END IF; RETURN _gain; END; $_$; BDROP FUNCTION public.apcurrgain(integer, integer, numeric, date); publicadminfalse8399212551681870#applyapcreditmemotobalance(integer)FUNCTIONCREATE FUNCTION applyapcreditmemotobalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; _amount NUMERIC; _curr_id INTEGER; _curr_rate NUMERIC; _docdate DATE; _applyAmount NUMERIC; _r RECORD; _p RECORD; BEGIN -- Find the balance to apply SELECT (apopen_amount - apopen_paid - COALESCE(prepared,0.0) - COALESCE(selected,0.0) - COALESCE(SUM(currToCurr(apcreditapply_curr_id, apopen_curr_id, apcreditapply_amount, apopen_docdate)), 0)), apopen_curr_id, apopen_curr_rate, apopen_docdate INTO _amount, _curr_id, _curr_rate, _docdate FROM apopen LEFT OUTER JOIN apcreditapply ON (apcreditapply_source_apopen_id=apopen_id) LEFT OUTER JOIN (SELECT apopen_id AS selected_apopen_id, SUM(currToCurr(apselect_curr_id, apopen_curr_id, apselect_amount + apselect_discount, apselect_date)) AS selected FROM apselect JOIN apopen ON (apselect_apopen_id=apopen_id) GROUP BY apopen_id) AS sub1 ON (apopen_id=selected_apopen_id) LEFT OUTER JOIN (SELECT apopen_id AS prepared_apopen_id, SUM(checkitem_amount + checkitem_discount) AS prepared FROM checkhead JOIN checkitem ON (checkitem_checkhead_id=checkhead_id) JOIN apopen ON (checkitem_apopen_id=apopen_id) WHERE ((NOT checkhead_posted) AND (NOT checkhead_void)) GROUP BY apopen_id) AS sub2 ON (prepared_apopen_id=apopen_id) WHERE (apopen_id=pApopenid) GROUP BY apopen_amount, apopen_paid, apopen_curr_id, apopen_curr_rate, apopen_docdate, prepared, selected; IF (_amount < 0) THEN RETURN -1; END IF; -- Loop through the apopen items in order of due date FOR _r IN SELECT target.apopen_id AS apopenid, currToCurr(target.apopen_curr_id,source.apopen_curr_id, target.apopen_amount - target.apopen_paid - COALESCE(prepared,0.0) - COALESCE(selected,0.0) - COALESCE(applied,0.0), current_date) AS balance FROM apopen AS source, apopen AS target LEFT OUTER JOIN (SELECT apcreditapply_target_apopen_id AS applied_apopen_id, SUM(currToCurr(apcreditapply_curr_id, apopen_curr_id, apcreditapply_amount, apopen_docdate)) AS applied FROM apcreditapply JOIN apopen ON (apopen_id=apcreditapply_source_apopen_id) GROUP BY apcreditapply_target_apopen_id) AS sub3 ON (target.apopen_id=applied_apopen_id) LEFT OUTER JOIN (SELECT apopen_id AS selected_apopen_id, SUM(currToCurr(apselect_curr_id, apopen_curr_id, apselect_amount + apselect_discount, apselect_date)) AS selected FROM apselect JOIN apopen ON (apselect_apopen_id=apopen_id) GROUP BY apopen_id) AS sub1 ON (target.apopen_id=selected_apopen_id) LEFT OUTER JOIN (SELECT apopen_id AS prepared_apopen_id, SUM(checkitem_amount + checkitem_discount) AS prepared FROM checkhead JOIN checkitem ON (checkitem_checkhead_id=checkhead_id) JOIN apopen ON (checkitem_apopen_id=apopen_id) WHERE ((NOT checkhead_posted) AND (NOT checkhead_void)) GROUP BY apopen_id) AS sub2 ON (prepared_apopen_id=target.apopen_id) WHERE ( (source.apopen_vend_id=target.apopen_vend_id) AND (target.apopen_doctype IN ('V', 'D')) AND (target.apopen_open) AND (source.apopen_id=pApopenid) ) ORDER BY target.apopen_duedate, (target.apopen_amount - target.apopen_paid) LOOP -- Determine the amount to apply IF (_r.balance <= 0.0) THEN CONTINUE; ELSEIF (_r.balance > _amount) THEN _applyAmount := _amount; ELSE _applyAmount := _r.balance; END IF; -- Does an apcreditapply record already exist? SELECT apcreditapply_id, apcreditapply_amount * _curr_rate / currRate(apcreditapply_curr_id,_docdate) AS apcreditapply_amount INTO _p FROM apcreditapply WHERE ( (apcreditapply_target_apopen_id=_r.apopenid) AND (apcreditapply_source_apopen_id=pApopenid) ); IF (FOUND) THEN -- The following is depreciated, just skip the record -- Recalculate the amount to apply -- IF ((_r.balance - _p.apcreditapply_amount) > _amount) THEN -- _applyAmount := _amount; -- ELSE -- _applyAmount := (_r.balance - _p.apcreditapply_amount); -- END IF; -- Update the apcreditapply with the new amount to apply -- UPDATE apcreditapply -- SET apcreditapply_amount = (apcreditapply_amount + -- _applyAmount * currRate(apcreditapply_curr_id,_docdate) / _curr_rate) -- WHERE (apcreditapply_id=_p.apcreditapply_id); CONTINUE; ELSE -- Create a new apcreditapply record INSERT INTO apcreditapply ( apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id ) VALUES ( pApopenid, _r.apopenid, _applyAmount, _curr_id ); END IF; _amount := (_amount - _applyAmount); IF (_amount = 0) THEN EXIT; END IF; END LOOP; RETURN 1; END; $_$; :DROP FUNCTION public.applyapcreditmemotobalance(integer); publicadminfalse8399212551681871applyapcredits(integer)FUNCTIONCREATE FUNCTION applyapcredits(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendId ALIAS FOR $1; _result INTEGER; _apopenid INTEGER; _r RECORD; BEGIN -- Fetch credit memo(s) for the vendor FOR _r IN SELECT apopen_id, apopen_duedate FROM apopen JOIN vendinfo ON (apopen_vend_id = vend_id) WHERE ((apopen_doctype = 'C') AND (apopen_status = 'O') AND (vend_id = pVendId)) ORDER BY apopen_duedate LOOP -- Apply credit memo(s) according to due date SELECT applyapcreditmemotobalance(_r.apopen_id) INTO _result; -- Post the credit memo if applied IF (_result = 1) THEN SELECT postapcreditmemoapplication(_r.apopen_id) INTO _apopenid; IF (_apopenid < 0) THEN RETURN -1; END IF; ELSE RETURN -1; END IF; END LOOP; RETURN 1; END; $_$; .DROP FUNCTION public.applyapcredits(integer); publicadminfalse8399212551681872#applyarcreditmemotobalance(integer)FUNCTIONOCREATE FUNCTION applyarcreditmemotobalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenid ALIAS FOR $1; BEGIN RETURN applyARCreditMemoToBalance(pAropenid, NULL); END; $_$; :DROP FUNCTION public.applyarcreditmemotobalance(integer); publicadminfalse8399212551681873,applyarcreditmemotobalance(integer, integer)FUNCTIONCREATE FUNCTION applyarcreditmemotobalance(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceAropenid ALIAS FOR $1; pTargetAropenid ALIAS FOR $2; _amount NUMERIC; _amountcurrid INTEGER; _applyAmount NUMERIC; _applycurrid INTEGER; _curr_rate NUMERIC; _r RECORD; _p RECORD; BEGIN -- Find the balance to apply SELECT (aropen_amount - COALESCE(SUM(currToCurr(arcreditapply_curr_id, aropen_curr_id, arcreditapply_amount, aropen_docdate)), 0) - aropen_paid - COALESCE(prepared,0.0) - COALESCE(cashapplied,0.0)), aropen_curr_id, aropen_curr_rate INTO _amount, _amountcurrid, _curr_rate FROM aropen LEFT OUTER JOIN arcreditapply ON (arcreditapply_source_aropen_id=aropen_id) LEFT OUTER JOIN (SELECT aropen_id AS prepared_aropen_id, SUM(checkitem_amount + checkitem_discount) AS prepared FROM checkhead JOIN checkitem ON (checkitem_checkhead_id=checkhead_id) JOIN aropen ON (checkitem_aropen_id=aropen_id) WHERE ((NOT checkhead_posted) AND (NOT checkhead_void)) GROUP BY aropen_id) AS sub1 ON (prepared_aropen_id=aropen_id) LEFT OUTER JOIN (SELECT aropen_id AS cash_aropen_id, SUM(cashrcptitem_amount + cashrcptitem_discount) * -1.0 AS cashapplied FROM cashrcpt JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id) JOIN aropen ON (cashrcptitem_aropen_id=aropen_id) WHERE (NOT cashrcpt_posted) AND (NOT cashrcpt_void) GROUP BY aropen_id ) AS sub2 ON (cash_aropen_id=aropen_id) WHERE (aropen_id=pSourceAropenid) GROUP BY aropen_amount, aropen_paid, aropen_curr_id, aropen_curr_rate, prepared, cashapplied; IF (_amount < 0) THEN RETURN -1; END IF; -- Loop through the aropen items in order of due date FOR _r IN SELECT target.aropen_id AS aropenid, currToCurr(target.aropen_curr_id,source.aropen_curr_id, (target.aropen_amount - target.aropen_paid - calcpendingarapplications(target.aropen_id)), current_date) AS balance, target.aropen_curr_id AS curr_id, target.aropen_docdate AS docdate FROM aropen AS target, aropen AS source WHERE ( (source.aropen_cust_id=target.aropen_cust_id) AND (target.aropen_doctype IN ('D', 'I')) AND (target.aropen_open) AND (source.aropen_id=pSourceAropenid) AND ((pTargetAropenid IS NULL) OR (target.aropen_id=pTargetAropenid)) ) ORDER BY target.aropen_duedate, target.aropen_docnumber LOOP -- Determine the amount to apply IF (_r.balance > _amount) THEN _applyAmount := _amount; ELSE _applyAmount := _r.balance; END IF; _applycurrid := _amountcurrid; -- Does an arcreditapply record already exist? SELECT arcreditapply_id, arcreditapply_amount, arcreditapply_amount * _curr_rate / currRate(arcreditapply_curr_id,_r.docdate) AS arcreditapply_amount_applycurr INTO _p FROM arcreditapply WHERE ( (arcreditapply_target_aropen_id=_r.aropenid) AND (arcreditapply_source_aropen_id=pSourceAropenid) ); IF (FOUND) THEN -- Offset the amount to apply by the amount already applied _applyAmount := (_applyAmount - _p.arcreditapply_amount_applycurr); IF (_applyAmount < 0) THEN _applyAmount := 0; END IF; -- Update the arcreditapply with the new amount to apply UPDATE arcreditapply SET arcreditapply_amount = (arcreditapply_amount + _applyAmount * currRate(arcreditapply_curr_id,_r.docdate) / _curr_rate) WHERE (arcreditapply_id=_p.arcreditapply_id); ELSE -- Create a new arcreditapply record INSERT INTO arcreditapply ( arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id ) VALUES ( pSourceAropenid, _r.aropenid, _applyAmount, _applycurrid ); END IF; _amount := _amount - currToCurr(_applycurrid, _amountcurrid, _applyAmount, _r.docdate); IF (_amount = 0) THEN EXIT; END IF; END LOOP; RETURN 1; END; $_$; CDROP FUNCTION public.applyarcreditmemotobalance(integer, integer); publicadminfalse8399212551681874?applycashreceiptlinebalance(integer, integer, numeric, integer)FUNCTIONCREATE FUNCTION applycashreceiptlinebalance(integer, integer, numeric, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptId ALIAS FOR $1; pAropenid ALIAS FOR $2; pAmount ALIAS FOR $3; pCurrId ALIAS FOR $4; _balance NUMERIC; _amount NUMERIC; _applyAmount NUMERIC := 0; _discount NUMERIC := 0; _discprct NUMERIC; _docDate DATE; _r RECORD; _doctype CHAR(1); BEGIN -- All calculations performed in currency of Cash Receipt -- Clear previously applied DELETE FROM cashrcptitem WHERE ((cashrcptitem_cashrcpt_id=pCashrcptId) AND (cashrcptitem_aropen_id=pAropenId)); -- Find the balance to apply SELECT (pAmount - (COALESCE(SUM(cashrcptitem_amount), 0) ) ), COALESCE(cashrcpt_docdate, current_date) INTO _amount, _docDate FROM cashrcpt LEFT OUTER JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id = cashrcpt_id) WHERE (cashrcpt_id=pCashrcptid) GROUP BY cashrcpt_curr_id, cashrcpt_distdate, cashrcpt_docdate; SELECT (_amount - COALESCE(SUM(cashrcptmisc_amount), 0)) INTO _amount FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid); SELECT aropen_doctype INTO _doctype FROM aropen WHERE (aropen_id=pAropenId); RAISE DEBUG 'Amount (%) DocType (%)', _amount, _doctype; IF (_amount <= 0 AND _doctype IN ('I','D')) THEN RETURN 0; END IF; -- Determine Line balance SELECT currToCurr(aropen_curr_id, cashrcpt_curr_id, aropen_amount - aropen_paid, cashrcpt_distdate) - COALESCE((SELECT (SUM(cashrcptitem_amount) + SUM(cashrcptitem_discount)) FROM cashrcptitem, cashrcpt WHERE ((cashrcpt_id=cashrcptitem_cashrcpt_id) AND (NOT cashrcpt_void) AND (NOT cashrcpt_posted) AND (cashrcpt_id != pCashrcptId) AND (cashrcptitem_aropen_id=pAropenId))), 0) INTO _balance FROM aropen, cashrcpt WHERE ((aropen_id=pAropenId) AND (cashrcpt_id=pCashrcptId)); RAISE DEBUG 'Balance (%)', _balance; -- If Invoice or Debit Memo, determine Max Discount as per Terms IF (_doctype IN ('I','D')) THEN SELECT round(noNeg(_balance * CASE WHEN (_docDate <= determineDiscountDate(terms_id, aropen_docdate)) THEN COALESCE(terms_discprcnt, 0.0) ELSE 0.00 END - applied),2), CASE WHEN (_docDate <= determineDiscountDate(terms_id, aropen_docdate)) THEN COALESCE(terms_discprcnt, 0.0) ELSE 0.00 END INTO _discount, _discprct FROM aropen LEFT OUTER JOIN terms ON (terms_id=aropen_terms_id), (SELECT COALESCE(SUM(arapply_applied), 0.00) AS applied FROM arapply, aropen WHERE ((arapply_target_aropen_id=pAropenId) AND (arapply_source_aropen_id=pAropenId) AND (aropen_discount) ) ) AS data WHERE (aropen_id=pAropenId); -- Determine the amount to apply IF (_balance <= _amount + _discount) THEN _applyAmount := _balance - _discount; ELSE _discount := round((_amount / (1 - _discprct)) - _amount, 2); _applyAmount := _amount; END IF; ELSIF (_doctype IN ('C', 'R')) THEN -- Handle Credits, discounts don't apply here _applyAmount := _balance * -1; ELSE _applyAmount := _amount; END IF; IF (_applyAmount != 0) THEN -- Create a new cashrcptitem INSERT INTO cashrcptitem ( cashrcptitem_aropen_id, cashrcptitem_cashrcpt_id, cashrcptitem_amount,cashrcptitem_discount ) VALUES ( pAropenid, pCashrcptid, round(_applyAmount, 2), round(_discount, 2) ); END IF; RETURN abs(_applyAmount); END; $_$; VDROP FUNCTION public.applycashreceiptlinebalance(integer, integer, numeric, integer); publicadminfalse8399212551681875+applycashreceipttobalance(integer, numeric)FUNCTIONCREATE FUNCTION applycashreceipttobalance(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptid ALIAS FOR $1; pAmount ALIAS FOR $2; BEGIN RETURN applyCashReceiptToBalance(pCashrcptid, pAmount, baseCurrId() ); END; $_$; BDROP FUNCTION public.applycashreceipttobalance(integer, numeric); publicadminfalse83992125516818764applycashreceipttobalance(integer, numeric, integer)FUNCTIONCREATE FUNCTION applycashreceipttobalance(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptid ALIAS FOR $1; pAmount ALIAS FOR $2; pCurrId ALIAS FOR $3; BEGIN RETURN applyCashReceiptToBalance(pCashrcptid, pAmount, pCurrId, false); END; $_$; KDROP FUNCTION public.applycashreceipttobalance(integer, numeric, integer); publicadminfalse8399212551681877=applycashreceipttobalance(integer, numeric, integer, boolean)FUNCTIONCREATE FUNCTION applycashreceipttobalance(integer, numeric, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptid ALIAS FOR $1; pAmount ALIAS FOR $2; pCurrId ALIAS FOR $3; pInclCredits ALIAS FOR $4; _amount NUMERIC; _applied NUMERIC := 0; _applyAmount NUMERIC; _discount NUMERIC; _discprct NUMERIC; _docDate DATE; _r RECORD; _toApply NUMERIC; BEGIN -- Apply open credits first if applicable IF (pInclCredits) THEN -- First find total debits unaccounted for by this receipt so we can apply as much credit -- as possible to clear, but no more SELECT coalesce(noNeg(sum(currToCurr(aropen_curr_id, cashrcpt_curr_id, aropen_amount - aropen_paid, cashrcpt_distdate) - COALESCE((SELECT (SUM(cashrcptitem_amount) + SUM(cashrcptitem_discount)) FROM cashrcptitem, cashrcpt WHERE ((cashrcpt_id=cashrcptitem_cashrcpt_id) AND (NOT cashrcpt_void) AND (NOT cashrcpt_posted) AND (cashrcpt_id != pCashrcptid) AND (cashrcptitem_aropen_id=aropen_id))), 0)) - pAmount),0) INTO _toApply FROM cashrcpt JOIN custinfo ON (cashrcpt_cust_id=cust_id) JOIN aropen ON (cust_id=aropen_cust_id) WHERE ((cashrcpt_id=pCashrcptid) AND (aropen_open) AND (aropen_doctype IN ('I','D'))); -- Loop through and apply credits until we account for all remaining debits we can FOR _r IN SELECT aropen_id FROM cashrcpt JOIN custinfo ON (cashrcpt_cust_id=cust_id) JOIN aropen ON (cust_id=aropen_cust_id) WHERE ((cashrcpt_id=pCashrcptid) AND (aropen_open) AND (aropen_doctype IN ('C','R'))) ORDER BY aropen_duedate, aropen_docnumber LOOP EXIT WHEN _toApply <= 0; _toApply := _toApply - applyCashReceiptLineBalance(pCashrcptid, _r.aropen_id, _toApply, pCurrId); END LOOP; END IF; -- Find the balance to apply SELECT (currToCurr(pCurrId, cashrcpt_curr_id, pAmount, cashrcpt_distdate) - (COALESCE(SUM(cashrcptitem_amount), 0) ) ), COALESCE(cashrcpt_docdate, current_date) INTO _amount, _docDate FROM cashrcpt LEFT OUTER JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id = cashrcpt_id) WHERE (cashrcpt_id=pCashrcptid) GROUP BY cashrcpt_curr_id, cashrcpt_distdate, cashrcpt_docdate; SELECT (_amount - COALESCE(SUM(cashrcptmisc_amount), 0)) INTO _amount FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid); IF (_amount = 0) THEN RETURN 1; END IF; -- Loop through the aropen item in order of due date, searching only for -- aropen items that are open, for the current customer and have an outstanding balance FOR _r IN SELECT aropen_id, currToCurr(aropen_curr_id, cashrcpt_curr_id, aropen_amount - aropen_paid, cashrcpt_distdate) - COALESCE((SELECT SUM(cashrcptitem_amount) + SUM(cashrcptitem_discount) FROM cashrcptitem, cashrcpt WHERE ((cashrcpt_id=cashrcptitem_cashrcpt_id) AND (NOT cashrcpt_void) AND (NOT cashrcpt_posted) AND (cashrcpt_id != pCashrcptId) AND (cashrcptitem_aropen_id=aropen_id))), 0) AS balance, s.cashrcptitem_id AS cashrcptitem_id FROM cashrcpt, aropen LEFT OUTER JOIN cashrcptitem s ON (s.cashrcptitem_aropen_id=aropen_id AND s.cashrcptitem_cashrcpt_id=pCashrcptId) LEFT OUTER JOIN terms ON (aropen_terms_id=terms_id), (SELECT COALESCE(SUM(arapply_applied), 0.00) AS applied FROM arapply, aropen WHERE ((arapply_target_aropen_id=aropen_id) AND (arapply_source_aropen_id=aropen_id) AND (aropen_discount) ) ) AS data WHERE ( (aropen_cust_id=cashrcpt_cust_id) AND (aropen_doctype IN ('I', 'D')) AND (aropen_open) AND (cashrcpt_id=pCashrcptid) ) ORDER BY aropen_duedate, aropen_amount, balance LOOP -- Determine Max Discount as per Terms SELECT round(noNeg(_r.balance * CASE WHEN (_docDate <= determineDiscountDate(terms_id, aropen_docdate)) THEN terms_discprcnt ELSE 0.00 END - applied),2), CASE WHEN (_docDate <= determineDiscountDate(terms_id, aropen_docdate)) THEN terms_discprcnt ELSE 0.00 END INTO _discount, _discprct FROM aropen LEFT OUTER JOIN terms ON (terms_id=aropen_terms_id), (SELECT COALESCE(SUM(arapply_applied), 0.00) AS applied FROM arapply, aropen WHERE ((arapply_target_aropen_id=_r.aropen_id) AND (arapply_source_aropen_id=_r.aropen_id) AND (aropen_discount) ) ) AS data WHERE (aropen_id=_r.aropen_id); -- Determine the amount to apply IF (_r.balance <= _amount + _discount) THEN _applyAmount := _r.balance - _discount; ELSE _discount := round((_amount / (1 - _discprct)) - _amount, 2); _applyAmount := _amount; END IF; IF (_applyAmount > 0) THEN -- Does an cashrcptitem already exist? IF (_r.cashrcptitem_id IS NOT NULL) THEN -- Update the cashrcptitem with the new amount to apply UPDATE cashrcptitem SET cashrcptitem_amount = round(cashrcptitem_amount + _applyAmount, 2), cashrcptitem_discount = round(_discount, 2) WHERE (cashrcptitem_id=_r.cashrcptitem_id); ELSE -- Create a new cashrcptitem INSERT INTO cashrcptitem ( cashrcptitem_aropen_id, cashrcptitem_cashrcpt_id, cashrcptitem_amount, cashrcptitem_discount ) VALUES ( _r.aropen_id, pCashrcptid, round(_applyAmount, 2), round(_discount, 2) ); END IF; _amount := (_amount - _applyAmount); IF (round(_amount, 2) = 0) THEN EXIT; END IF; END IF; END LOOP; RETURN 1; END; $_$; TDROP FUNCTION public.applycashreceipttobalance(integer, numeric, integer, boolean); publicadminfalse83992o12552005491araging(date, boolean)FUNCTIONCREATE FUNCTION araging(date, boolean) RETURNS SETOF araging LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAsOfDate ALIAS FOR $1; pUseDocDate ALIAS FOR $2; _row araging%ROWTYPE; BEGIN FOR _row IN SELECT * FROM araging(pAsOfDate, pUseDocDate, true) LOOP RETURN NEXT _row; END LOOP; RETURN; END; $_$; -DROP FUNCTION public.araging(date, boolean); publicadminfalse825753992s12552005492araging(date, boolean, boolean)FUNCTION5CREATE FUNCTION araging(date, boolean, boolean) RETURNS SETOF araging LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAsOfDate ALIAS FOR $1; pUseDocDate ALIAS FOR $2; pConvBaseCurr ALIAS FOR $3; _row araging%ROWTYPE; _x RECORD; _returnVal INTEGER; _asOfDate DATE; BEGIN _asOfDate := COALESCE(pAsOfDate,current_date); FOR _x IN SELECT aropen_docdate, aropen_duedate, aropen_ponumber, aropen_docnumber, aropen_doctype, cust_id, cust_name, cust_number, cust_custtype_id, custtype_code, terms_descrip, --if pConvBaseCurr is true then use currtobase to convert all amounts to base based on aropen_docdate to ensure the same exchange rate --otherwise use currtocurr to convert all amounts to customer's currency based on aropen_docdate to ensure the same exchange rate --today and greater: CASE WHEN((aropen_duedate >= DATE(_asOfDate))) THEN balance ELSE 0.0 END AS cur_val, --0 to 30 CASE WHEN((aropen_duedate >= DATE(_asOfDate)-30) AND (aropen_duedate < DATE(_asOfDate))) THEN balance ELSE 0.0 END AS thirty_val, --30-60 CASE WHEN((aropen_duedate >= DATE(_asOfDate)-60) AND (aropen_duedate < DATE(_asOfDate) - 30 )) THEN balance ELSE 0.0 END AS sixty_val, --60-90 CASE WHEN((aropen_duedate >= DATE(_asOfDate)-90) AND (aropen_duedate < DATE(_asOfDate) - 60)) THEN balance ELSE 0.0 END AS ninety_val, --greater than 90: CASE WHEN((aropen_duedate > DATE(_asOfDate)-10000) AND (aropen_duedate < DATE(_asOfDate) - 90)) THEN balance ELSE 0.0 END AS plus_val, --total amount: CASE WHEN((aropen_duedate > DATE(_asOfDate)-10000)) THEN balance ELSE 0.0 END AS total_val, --AR Open Amount base aropen_amount FROM ( SELECT (((aropen_amount - aropen_paid + COALESCE(SUM(arapply_target_paid),0))) / CASE WHEN (pConvBaseCurr) THEN aropen_curr_rate ELSE currRate(aropen_curr_id, cust_curr_id, aropen_docdate) END * CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1.0 ELSE 1.0 END) AS balance, ((aropen_amount) / CASE WHEN (pConvBaseCurr) THEN aropen_curr_rate ELSE currRate(aropen_curr_id, cust_curr_id, aropen_docdate) END * CASE WHEN (aropen_doctype IN ('C', 'R')) THEN -1.0 ELSE 1.0 END) AS aropen_amount, aropen_docdate, aropen_duedate, aropen_ponumber, aropen_docnumber, aropen_doctype, cust_id, cust_name, cust_number, cust_custtype_id, custtype_code, COALESCE(arterms.terms_descrip, custterms.terms_descrip, '') AS terms_descrip FROM aropen JOIN custinfo ON (cust_id=aropen_cust_id) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN terms arterms ON (arterms.terms_id=aropen_terms_id) LEFT OUTER JOIN terms custterms ON (custterms.terms_id=cust_terms_id) LEFT OUTER JOIN arapply ON (((aropen_id=arapply_target_aropen_id) OR (aropen_id=arapply_source_aropen_id)) AND (arapply_distdate>_asOfDate)) WHERE ( (CASE WHEN (pUseDocDate) THEN aropen_docdate ELSE aropen_distdate END <= _asOfDate) AND (COALESCE(aropen_closedate,_asOfDate+1)>_asOfDate) ) GROUP BY aropen_id,aropen_docdate,aropen_duedate,aropen_ponumber,aropen_docnumber,aropen_doctype,aropen_paid, aropen_curr_id,aropen_amount,cust_id,cust_name,cust_number,cust_custtype_id,custtype_code, arterms.terms_descrip,custterms.terms_descrip, aropen_curr_rate, aropen_curr_id, cust_curr_id ORDER BY cust_number, aropen_duedate ) AS data LOOP _row.araging_docdate := _x.aropen_docdate; _row.araging_duedate := _x.aropen_duedate; _row.araging_ponumber := _x.aropen_ponumber; _row.araging_docnumber := _x.aropen_docnumber; _row.araging_doctype := _x.aropen_doctype; _row.araging_cust_id := _x.cust_id; _row.araging_cust_number := _x.cust_number; _row.araging_cust_name := _x.cust_name; _row.araging_cust_custtype_id := _x.cust_custtype_id; _row.araging_custtype_code := _x.custtype_code; _row.araging_terms_descrip := _x.terms_descrip; _row.araging_aropen_amount := _x.aropen_amount; _row.araging_cur_val := _x.cur_val; _row.araging_thirty_val := _x.thirty_val; _row.araging_sixty_val := _x.sixty_val; _row.araging_ninety_val := _x.ninety_val; _row.araging_plus_val := _x.plus_val; _row.araging_total_val := _x.total_val; RETURN NEXT _row; END LOOP; RETURN; END; $_$; 6DROP FUNCTION public.araging(date, boolean, boolean); publicadminfalse83992257512551681881arapplied(integer, date)FUNCTIONzCREATE FUNCTION arapplied(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenid ALIAS FOR $1; pDate ALIAS FOR $2; _amount NUMERIC; BEGIN -- Return amount applied to an aropen in base currency item as of the parameter date SELECT SUM(currtobase(arapply_curr_id,arapply_applied,pDate)) INTO _amount FROM arapply WHERE (((arapply_target_aropen_id = pAropenid) OR (arapply_source_aropen_id = pAropenid)) AND (((arapply_journalnumber=0) AND (arapply_postdate <= pDate)) OR EXISTS(SELECT * FROM gltrans WHERE ((gltrans_journalnumber=arapply_journalnumber) AND (gltrans_date <= pDate))))); IF (_amount IS NULL) THEN RETURN 0; ELSE RETURN _amount; END IF; END; $_$; /DROP FUNCTION public.arapplied(integer, date); publicadminfalse8399212551681882archivesaleshistory(integer)FUNCTIONCREATE FUNCTION archivesaleshistory(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSohistid ALIAS FOR $1; BEGIN INSERT INTO asohist ( asohist_id, asohist_cust_id, asohist_itemsite_id, asohist_shipdate, asohist_invcdate, asohist_duedate, asohist_promisedate, asohist_ordernumber, asohist_invcnumber, asohist_qtyshipped, asohist_unitprice, asohist_unitcost, asohist_billtoname, asohist_billtoaddress1, asohist_billtoaddress2, asohist_billtoaddress3, asohist_billtocity, asohist_billtostate, asohist_billtozip, asohist_shiptoname, asohist_shiptoaddress1, asohist_shiptoaddress2, asohist_shiptoaddress3, asohist_shiptocity, asohist_shiptostate, asohist_shiptozip, asohist_shipto_id, asohist_shipvia, asohist_salesrep_id, asohist_misc_type, asohist_misc_descrip, asohist_misc_id, asohist_commission, asohist_commissionpaid, asohist_doctype, asohist_orderdate, asohist_imported, asohist_ponumber, asohist_curr_id, asohist_taxtype_id, asohist_taxzone_id ) SELECT cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipdate, cohist_invcdate, cohist_duedate, cohist_promisedate, cohist_ordernumber, cohist_invcnumber, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_shipto_id, cohist_shipvia, cohist_salesrep_id, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_commission, cohist_commissionpaid, cohist_doctype, cohist_orderdate, cohist_imported, cohist_ponumber, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id FROM cohist WHERE (cohist_id=pSohistid); INSERT INTO asohisttax ( taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM cohisttax WHERE (taxhist_parent_id=pSohistid); DELETE FROM cohisttax WHERE (taxhist_parent_id=pSohistid); DELETE FROM cohist WHERE (cohist_id=pSohistid); RETURN pSohistid; END; $_$; 3DROP FUNCTION public.archivesaleshistory(integer); publicadminfalse8399212551681883+arcurrgain(integer, integer, numeric, date)FUNCTIONCREATE FUNCTION arcurrgain(integer, integer, numeric, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenId ALIAS FOR $1; pCurrId ALIAS FOR $2; pValue ALIAS FOR $3; pDate ALIAS FOR $4; _start DATE; _end DATE; _gain NUMERIC; _r RECORD; BEGIN IF (pAropenId IS NULL OR pValue = 0) THEN RETURN 0; END IF; SELECT aropen_docdate, aropen_curr_id, aropen_curr_rate INTO _r FROM aropen WHERE (aropen_id=pAropenId); IF (_r.aropen_docdate > pDate) THEN _gain := (currToBase(pCurrId, pValue, pDate) - currToCurr(pCurrId,_r.aropen_curr_id, pValue, pDate) / _r.aropen_curr_rate) * -1; ELSE _gain := currToCurr(pCurrId,_r.aropen_curr_id, pValue, pDate) / _r.aropen_curr_rate - currToBase(pCurrId, pValue, pDate); END IF; IF (_gain IS NULL) THEN RAISE EXCEPTION 'Error processing currency gain/loss.'; END IF; RETURN _gain; END; $_$; BDROP FUNCTION public.arcurrgain(integer, integer, numeric, date); publicadminfalse8399212551681884 armor(bytea)FUNCTIONqCREATE FUNCTION armor(bytea) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_armor'; #DROP FUNCTION public.armor(bytea); publicadminfalse812591681885invbalTABLECREATE TABLE invbal ( invbal_id integer NOT NULL, invbal_period_id integer, invbal_itemsite_id integer, invbal_qoh_beginning numeric(18,6) NOT NULL, invbal_qoh_ending numeric(18,6) NOT NULL, invbal_qty_in numeric(18,6) NOT NULL, invbal_qty_out numeric(18,6) NOT NULL, invbal_value_beginning numeric(12,2) NOT NULL, invbal_value_ending numeric(12,2) NOT NULL, invbal_value_in numeric(12,2) NOT NULL, invbal_value_out numeric(12,2) NOT NULL, invbal_nn_beginning numeric(18,6) NOT NULL, invbal_nn_ending numeric(18,6) NOT NULL, invbal_nn_in numeric(18,6) NOT NULL, invbal_nn_out numeric(18,6) NOT NULL, invbal_nnval_beginning numeric(12,2) NOT NULL, invbal_nnval_ending numeric(12,2) NOT NULL, invbal_nnval_in numeric(12,2) NOT NULL, invbal_nnval_out numeric(12,2) NOT NULL, invbal_dirty boolean DEFAULT true NOT NULL ); DROP TABLE public.invbal; publicadminfalse57518!00invbalACLREVOKE ALL ON TABLE invbal FROM PUBLIC; REVOKE ALL ON TABLE invbal FROM admin; GRANT ALL ON TABLE invbal TO admin; GRANT ALL ON TABLE invbal TO xtrole; publicadminfalse15012551681889asofinvbal(integer, date)FUNCTIONWCREATE FUNCTION asofinvbal(integer, date) RETURNS SETOF invbal LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; pAsofDate ALIAS FOR $2; _result invbal%ROWTYPE; _i RECORD; _h RECORD; _r RECORD; _prevCostmethod TEXT := 'A'; _prevDate TIMESTAMP WITH TIME ZONE; _runningQty NUMERIC := 0; _runningNn NUMERIC := 0; _runningValue NUMERIC := 0; _runningNnval NUMERIC := 0; BEGIN /* This is a base function to gather data. Because it is STABLE it should only need to be calculated once, even though it is likely to be called several times by other functions in parent query to present the various data. */ -- First make sure inventory balance is forward updated PERFORM forwardUpdateItemsite(pItemsiteId); -- Next find the previous period balace to use as a starting point SELECT invbal.*, period_start, itemsite_costmethod INTO _i FROM invbal JOIN itemsite ON (invbal_itemsite_id=itemsite_id) JOIN period ON (invbal_period_id=period_id) WHERE ((invbal_itemsite_id=pItemsiteId) AND (pAsofDate >= period_start)) ORDER BY period_start DESC LIMIT 1; _runningQty := _i.invbal_qoh_beginning; _runningNn := _i.invbal_nn_beginning; _runningValue := _i.invbal_value_beginning; _runningNnval := _i.invbal_nnval_beginning; _prevDate := _i.period_start; _prevCostmethod := _i.itemsite_costmethod; FOR _r IN SELECT invhist_id, invhist_created, invhist_invqty, invhist_transtype, invhist_unitcost, invhist_costmethod, itemsite_item_id, invhistSense(invhist_id) AS sense FROM invhist JOIN itemsite ON (itemsite_id=invhist_itemsite_id) WHERE ((invhist_itemsite_id=pItemsiteId) AND (invhist_transdate::date BETWEEN _i.period_start AND pAsofdate)) ORDER BY invhist_created, invhist_id LOOP -- Update balances changed by any standard cost update between transactions IF (_prevCostmethod = 'S' AND _runningQty != 0) THEN FOR _h IN SELECT costhist_oldcost, costhist_newcost FROM costhist JOIN item ON (costhist_item_id=item_id) JOIN itemsite ON (itemsite_item_id=item_id) WHERE ((itemsite_id=pItemsiteId) AND (costhist_date BETWEEN _prevDate AND _r.invhist_created) AND (costhist_type IN ('S','D'))) LOOP _runningValue := _runningValue + round((_h.costhist_newcost-_h.costhist_oldcost) * _runningQty,2); _runningNnval := _runningNnval + round((_h.costhist_newcost-_h.costhist_oldcost) * _runningNn,2); END LOOP; END IF; _prevDate := _r.invhist_created; _prevCostmethod := _r.invhist_costmethod; _runningQty := _runningQty + _r.invhist_invqty * _r.sense; _runningValue := _runningValue + round( _r.invhist_invqty * _r.sense * _r.invhist_unitcost,2); IF (_r.invhist_transtype = 'NN') THEN _runningNn := _runningNn + _r.invhist_invqty * -1; _runningNnval := _runningNnval + round( _r.invhist_invqty * -1 * _r.invhist_unitcost,2); END IF; END LOOP; _prevDate := COALESCE(_prevDate, _i.period_start); _prevCostmethod := COALESCE(_r.invhist_costmethod, _i.itemsite_costmethod); IF (_prevCostmethod = 'S' AND _runningQty != 0) THEN FOR _h IN SELECT costhist_oldcost, costhist_newcost FROM costhist JOIN item ON (costhist_item_id=item_id) JOIN itemsite ON (itemsite_item_id=item_id) WHERE ((itemsite_id=pItemsiteId) AND (costhist_date BETWEEN _prevDate AND CAST(pAsofDate + 1 AS TIMESTAMP WITH TIME ZONE)) AND (costhist_type IN ('S','D'))) LOOP _runningValue := _runningValue + round((_h.costhist_newcost-_h.costhist_oldcost) * _runningQty,2); _runningNnval := _runningNnval + round((_h.costhist_newcost-_h.costhist_oldcost) * _runningNn,2); END LOOP; END IF; _result := _i; _result.invbal_qoh_ending := _runningQty; _result.invbal_value_ending := _runningValue; _result.invbal_nn_ending := _runningNn; _result.invbal_nnval_ending := _runningNnval; RETURN NEXT _result; RETURN; END; $_$; 0DROP FUNCTION public.asofinvbal(integer, date); publicadminfalse83992261912551681890asofinvnn(integer, date)FUNCTIONCREATE FUNCTION asofinvnn(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; pAsofDate ALIAS FOR $2; _result NUMERIC; BEGIN SELECT invbal_nn_ending INTO _result FROM asofinvbal(pItemsiteId, pAsofDate); RETURN COALESCE(_result, 0); END; $_$; /DROP FUNCTION public.asofinvnn(integer, date); publicadminfalse8399212551681891asofinvqty(integer, date)FUNCTIONCREATE FUNCTION asofinvqty(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; pAsofDate ALIAS FOR $2; _result NUMERIC; BEGIN SELECT invbal_qoh_ending INTO _result FROM asofinvbal(pItemsiteId, pAsofDate); RETURN COALESCE(_result, 0); END; $_$; 0DROP FUNCTION public.asofinvqty(integer, date); publicadminfalse8399212551681892attachcontact(integer, integer)FUNCTIONCREATE FUNCTION attachcontact(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcntctId ALIAS FOR $1; pcrmacctId ALIAS FOR $2; BEGIN UPDATE cntct SET cntct_crmacct_id = pcrmacctId WHERE cntct_id = pcntctId; RETURN 0; END; $_$; 6DROP FUNCTION public.attachcontact(integer, integer); publicadminfalse8399212551681893*attachquotetoopportunity(integer, integer)FUNCTIONCREATE FUNCTION attachquotetoopportunity(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pOpheadid ALIAS FOR $2; BEGIN -- Check Quote IF (NOT EXISTS(SELECT quhead_id FROM quhead WHERE (quhead_id=pQuheadid))) THEN RETURN -1; END IF; -- Check Opportunity IF (NOT EXISTS(SELECT ophead_id FROM ophead WHERE (ophead_id=pOpheadid))) THEN RETURN -2; END IF; -- Cannot attach if already attached IF (EXISTS(SELECT quhead_id FROM quhead WHERE ((quhead_id=pQuheadid) AND (quhead_ophead_id IS NOT NULL)))) THEN RETURN -3; END IF; UPDATE quhead SET quhead_ophead_id=pOpheadid WHERE (quhead_id=pQuheadid); RETURN 0; END; $_$; ADROP FUNCTION public.attachquotetoopportunity(integer, integer); publicadminfalse8399212551681894/attachsalesordertoopportunity(integer, integer)FUNCTIONCREATE FUNCTION attachsalesordertoopportunity(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pOpheadid ALIAS FOR $2; BEGIN -- Check Sales Order IF (NOT EXISTS(SELECT cohead_id FROM cohead WHERE (cohead_id=pSoheadid))) THEN RETURN -1; END IF; -- Check Opportunity IF (NOT EXISTS(SELECT ophead_id FROM ophead WHERE (ophead_id=pOpheadid))) THEN RETURN -2; END IF; -- Cannot attach if already attached IF (EXISTS(SELECT cohead_id FROM cohead WHERE ((cohead_id=pSoheadid) AND (cohead_ophead_id IS NOT NULL)))) THEN RETURN -3; END IF; UPDATE cohead SET cohead_ophead_id=pOpheadid WHERE (cohead_id=pSoheadid); RETURN 0; END; $_$; FDROP FUNCTION public.attachsalesordertoopportunity(integer, integer); publicadminfalse8399212551681895&averagesalesprice(integer, date, date)FUNCTIONCREATE FUNCTION averagesalesprice(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _p RECORD; BEGIN -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitprice, cohist_shipdate)) AS totalsales, SUM(cohist_qtyshipped) AS totalship INTO _p FROM cohist WHERE ( (cohist_itemsite_id=pItemsiteid) AND (cohist_invcdate BETWEEN pStartDate AND pEndDate) ); IF ( (_p.totalship IS NULL) OR (_p.totalship = 0) ) THEN RETURN 0; ELSE RETURN (_p.totalsales / _p.totalship); END IF; END; $_$; =DROP FUNCTION public.averagesalesprice(integer, date, date); publicadminfalse3992812551681896avgcost(integer)FUNCTIONCREATE FUNCTION avgcost(pitemsiteid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC; _qoh NUMERIC; _qohnn NUMERIC; BEGIN SELECT itemsite_value, itemsite_qtyonhand, itemsite_nnqoh INTO _value, _qoh, _qohnn FROM itemsite WHERE(itemsite_id=pItemsiteid); IF (_qoh = 0.0 AND _qohnn = 0.0) THEN RETURN 0.0; END IF; RETURN _value / (_qoh + _qohnn); END; $$; 3DROP FUNCTION public.avgcost(pitemsiteid integer); publicadminfalse8399212551681897balanceitemsite(integer)FUNCTIONxCREATE FUNCTION balanceitemsite(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _itemlocseries INTEGER; _balanced NUMERIC; _qoh NUMERIC; _nnQoh NUMERIC; BEGIN -- Make sure that that passed Itemsite is MLC or Lot/Serial controlled IF ( ( SELECT (NOT ( (itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S')) )) FROM itemsite WHERE (itemsite_id=pItemsiteid) ) ) THEN RETURN 0; END IF; IF ( ( SELECT itemsite_freeze FROM itemsite WHERE(itemsite_id=pItemsiteid) ) ) THEN RETURN -1; END IF; -- Calculate the Netable portion SELECT COALESCE(SUM(itemloc_qty), 0) INTO _balanced FROM itemloc LEFT OUTER JOIN location ON (itemloc_location_id=location_id) WHERE ( ( (location_id IS NULL) OR (location_netable) ) AND (itemloc_itemsite_id=pItemsiteid) ); -- Post an AD Transaction for the Netable portion SELECT invAdjustment( itemsite_id, (_balanced - itemsite_qtyonhand), 'Balance', 'Inventory Balance' ) INTO _itemlocseries FROM itemsite WHERE (itemsite_id=pItemsiteid); -- Post the invtrans records associated with the itemlocdist records PERFORM postInvhist(itemlocdist_invhist_id) FROM itemlocdist WHERE(itemlocdist_series=_itemlocseries); -- Kill the resultant distribution records DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocseries); -- Calculate and write the Non-Netable portion directly SELECT COALESCE(SUM(itemloc_qty), 0) INTO _nnQoh FROM itemloc, location WHERE ( (itemloc_location_id=location_id) AND (NOT location_netable) AND (itemloc_itemsite_id=pItemsiteid) ); UPDATE itemsite SET itemsite_nnqoh = _nnQoh WHERE (itemsite_id=pItemsiteid); RETURN 1; END; $_$; /DROP FUNCTION public.balanceitemsite(integer); publicadminfalse8399212551681899bomcontains(integer, integer)FUNCTIONgCREATE FUNCTION bomcontains(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pparentitemid ALIAS FOR $1; pchilditemid ALIAS FOR $2; _bomworksetid INTEGER; _result BOOLEAN; BEGIN _bomworksetid := indentedWhereUsed(pchilditemid); _result := EXISTS(SELECT bomwork_id FROM bomwork WHERE ((bomwork_set_id=_bomworksetid) AND (bomwork_item_id=pparentitemid) )); PERFORM deleteBOMWorkset(_bomworksetid); RETURN _result; END; $_$; 4DROP FUNCTION public.bomcontains(integer, integer); publicadminfalse8399212551681900bomhistsequence(integer)FUNCTIONCREATE FUNCTION bomhistsequence(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pHistid ALIAS FOR $1; _wid INTEGER; _seqnum TEXT; _bomhist RECORD; BEGIN _wid := pHistid; SELECT bomhist_parent_id AS parent, to_char(bomhist_seqnumber, '00009') AS seq INTO _bomhist FROM bomhist WHERE bomhist_seq_id=_wid; IF (FOUND) THEN _seqnum := _bomhist.seq; _wid := _bomhist.parent; WHILE (_wid != -1) LOOP SELECT bomhist_parent_id AS parent, to_char(bomhist_seqnumber, '00009') AS seq INTO _bomhist FROM bomhist WHERE bomhist_seq_id=_wid; IF (FOUND) THEN _seqnum := _bomhist.seq || '-' || _seqnum; _wid := _bomhist.parent; ELSE _wid := -1; END IF; END LOOP; ELSE _seqnum := ''::TEXT; END IF; RETURN _seqnum; END; $_$; /DROP FUNCTION public.bomhistsequence(integer); publicadminfalse8399212591681901bomitemTABLECREATE TABLE bomitem ( bomitem_id integer DEFAULT nextval(('bomitem_bomitem_id_seq'::text)::regclass) NOT NULL, bomitem_parent_item_id integer NOT NULL, bomitem_seqnumber integer, bomitem_item_id integer NOT NULL, bomitem_qtyper numeric(20,8) NOT NULL, bomitem_scrap numeric(8,4) NOT NULL, bomitem_status character(1), bomitem_effective date NOT NULL, bomitem_expires date NOT NULL, bomitem_createwo boolean NOT NULL, bomitem_issuemethod character(1) NOT NULL, bomitem_schedatwooper boolean NOT NULL, bomitem_ecn text, bomitem_moddate date, bomitem_subtype character(1) NOT NULL, bomitem_uom_id integer NOT NULL, bomitem_rev_id integer DEFAULT (-1), bomitem_booitem_seq_id integer DEFAULT (-1), bomitem_char_id integer, bomitem_value text, bomitem_notes text, bomitem_ref text, bomitem_qtyfxd numeric(20,8) DEFAULT 0 NOT NULL, bomitem_issuewo boolean DEFAULT false NOT NULL, CONSTRAINT bomitem_bomitem_issuemethod_check CHECK ((((bomitem_issuemethod = 'M'::bpchar) OR (bomitem_issuemethod = 'S'::bpchar)) OR (bomitem_issuemethod = 'L'::bpchar))), CONSTRAINT bomitem_bomitem_subtype_check CHECK ((((bomitem_subtype = 'N'::bpchar) OR (bomitem_subtype = 'I'::bpchar)) OR (bomitem_subtype = 'B'::bpchar))) ); DROP TABLE public.bomitem; publicadminfalse57525753575457555756575757588!00 TABLE bomitemCOMMENTSCOMMENT ON TABLE bomitem IS 'Bill of Materials (BOM) component Items information'; publicadminfalse151!00COLUMN bomitem.bomitem_qtyfxdCOMMENTKCOMMENT ON COLUMN bomitem.bomitem_qtyfxd IS 'The fixed quantity required'; publicadminfalse151!00bomitemACLREVOKE ALL ON TABLE bomitem FROM PUBLIC; REVOKE ALL ON TABLE bomitem FROM admin; GRANT ALL ON TABLE bomitem TO admin; GRANT ALL ON TABLE bomitem TO xtrole; publicadminfalse15112551681914bomitem(integer)FUNCTIONCCREATE FUNCTION bomitem(integer) RETURNS SETOF bomitem LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT * FROM bomitem WHERE ((bomitem_parent_item_id=$1) AND (bomitem_rev_id=getActiveRevId('BOM',$1))); $_$; 'DROP FUNCTION public.bomitem(integer); publicadminfalse8262112551681915bomitem(integer, integer)FUNCTION6CREATE FUNCTION bomitem(integer, integer) RETURNS SETOF bomitem LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT * FROM bomitem WHERE ((bomitem_parent_item_id=$1) AND (bomitem_rev_id=$2)); $_$; 0DROP FUNCTION public.bomitem(integer, integer); publicadminfalse8262112551681916bomlevelbyitem(integer)FUNCTIONCREATE FUNCTION bomlevelbyitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _cnt INTEGER; _result INTEGER; _bomitem RECORD; BEGIN _cnt := 0; BEGIN FOR _bomitem IN SELECT bomitem_parent_item_id FROM bomitem WHERE ((bomitem_item_id=pItemid) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1))) LOOP SELECT bomLevelByItem(_bomitem.bomitem_parent_item_id) + 1 INTO _result; IF (_result > _cnt) THEN _cnt := _result; END IF; END LOOP; EXCEPTION WHEN statement_too_complex THEN RAISE EXCEPTION 'potential recursive BOM found for item_id %', pItemid; END; return _cnt; END; $_$; .DROP FUNCTION public.bomlevelbyitem(integer); publicadminfalse8399212551681917 bomlevelbyitem(integer, integer)FUNCTIONCREATE FUNCTION bomlevelbyitem(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pBomrevid ALIAS FOR $2; _cnt INTEGER; _result INTEGER; _bomitem RECORD; BEGIN _cnt := 0; BEGIN FOR _bomitem IN SELECT bomitem_parent_item_id FROM bomitem WHERE ((bomitem_item_id=pItemid) AND (bomitem_rev_id=pBomrevid) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1))) LOOP SELECT bomLevelByItem(_bomitem.bomitem_parent_item_id, pBomrevid) + 1 INTO _result; IF (_result > _cnt) THEN _cnt := _result; END IF; END LOOP; EXCEPTION WHEN statement_too_complex THEN RAISE EXCEPTION 'potential recursive BOM found for item_id %', pItemid; END; return _cnt; END; $_$; 7DROP FUNCTION public.bomlevelbyitem(integer, integer); publicadminfalse8399212551681918bomworkeffective(integer, date)FUNCTION*CREATE FUNCTION bomworkeffective(integer, date) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE workid ALIAS FOR $1; effdate ALIAS FOR $2; _wid INTEGER; _bomwork RECORD; BEGIN _wid := workid; WHILE (_wid != -1) LOOP SELECT bomwork_parent_id AS parent, bomwork_effective AS effective INTO _bomwork FROM bomwork WHERE bomwork_id=_wid; IF (FOUND) THEN _wid := _bomwork.parent; IF (_bomwork.effective > effdate) THEN RETURN FALSE; END IF; ELSE _wid := -1; END IF; END LOOP; RETURN TRUE; END; $_$; 6DROP FUNCTION public.bomworkeffective(integer, date); publicadminfalse8399212551681919bomworkexpired(integer, date)FUNCTION#CREATE FUNCTION bomworkexpired(integer, date) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE workid ALIAS FOR $1; expdate ALIAS FOR $2; _wid INTEGER; _bomwork RECORD; BEGIN _wid := workid; WHILE (_wid != -1) LOOP SELECT bomwork_parent_id AS parent, bomwork_expires AS expires INTO _bomwork FROM bomwork WHERE bomwork_id=_wid; IF (FOUND) THEN _wid := _bomwork.parent; IF (_bomwork.expires <= expdate) THEN RETURN TRUE; END IF; ELSE _wid := -1; END IF; END LOOP; RETURN FALSE; END; $_$; 4DROP FUNCTION public.bomworkexpired(integer, date); publicadminfalse8399212551681920bomworkitemsequence(integer)FUNCTIONCREATE FUNCTION bomworkitemsequence(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWorkid ALIAS FOR $1; _wid INTEGER; _seqnum TEXT; _bomwork RECORD; BEGIN _wid := pWorkid; SELECT bomwork_parent_id AS parent, item_number AS seq INTO _bomwork FROM bomwork, item WHERE ((bomwork_id=_wid) AND (bomwork_item_id=item_id)); IF (FOUND) THEN _seqnum := _bomwork.seq; _wid := _bomwork.parent; WHILE (_wid != -1) LOOP SELECT bomwork_parent_id AS parent, item_number AS seq INTO _bomwork FROM bomwork, item WHERE ((bomwork_id=_wid) AND (bomwork_item_id=item_id)); IF (FOUND) THEN _seqnum := _bomwork.seq || '-' || _seqnum; _wid := _bomwork.parent; ELSE _wid := -1; END IF; END LOOP; ELSE _seqnum := ''::TEXT; END IF; RETURN _seqnum; END; $_$; 3DROP FUNCTION public.bomworkitemsequence(integer); publicadminfalse8399212551681921bomworksequence(integer)FUNCTIONCREATE FUNCTION bomworksequence(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWorkid ALIAS FOR $1; _wid INTEGER; _seqnum TEXT; _bomwork RECORD; BEGIN _wid := pWorkid; SELECT bomwork_parent_id AS parent, to_char(bomwork_seqnumber, '00009') AS seq INTO _bomwork FROM bomwork WHERE bomwork_id=_wid; IF (FOUND) THEN _seqnum := _bomwork.seq; _wid := _bomwork.parent; WHILE (_wid != -1) LOOP SELECT bomwork_parent_id AS parent, to_char(bomwork_seqnumber, '00009') AS seq INTO _bomwork FROM bomwork WHERE bomwork_id=_wid; IF (FOUND) THEN _seqnum := _bomwork.seq || '-' || _seqnum; _wid := _bomwork.parent; ELSE _wid := -1; END IF; END LOOP; ELSE _seqnum := ''::TEXT; END IF; RETURN _seqnum; END; $_$; /DROP FUNCTION public.bomworksequence(integer); publicadminfalse8399212551681922buildinvbal(integer)FUNCTION CREATE FUNCTION buildinvbal(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; _r RECORD; _prevCostmethod TEXT := 'A'; _prevDate TIMESTAMP WITH TIME ZONE; _runningQty NUMERIC := 0; _runningNn NUMERIC := 0; BEGIN -- Validate IF (SELECT (count(invhist_id) > 0) FROM invhist WHERE ((invhist_itemsite_id=pItemsiteId) AND (NOT invhist_posted))) THEN SELECT item_number, warehous_code INTO _r FROM itemsite JOIN item ON (item_id=itemsite_item_id) JOIN whsinfo ON (itemsite_warehous_id=warehous_id) WHERE (itemsite_id=pItemsiteId); RAISE EXCEPTION 'Unposted inventory transactions exist for % at % [xtuple: buildInvBal, -1, %, %]', _r.item_number, _r.warehous_code, _r.item_number, _r.warehous_code; END IF; -- Remove any old records DELETE FROM invbal WHERE invbal_itemsite_id=pItemsiteId; FOR _r IN SELECT invhist.*, itemsite_item_id, invhistSense(invhist_id) AS sense, item_number, warehous_code FROM invhist JOIN itemsite ON (itemsite_id=invhist_itemsite_id) JOIN item ON (itemsite_item_id=item_id) JOIN whsinfo ON (itemsite_warehous_id=warehous_id) WHERE (invhist_itemsite_id=pItemsiteId) ORDER BY invhist_created, invhist_id LOOP RAISE NOTICE 'Calculating balances for Item % at Site % against transaction %, transtype %, sense %, qty %, %', _r.item_number, _r.warehous_code, _r.invhist_id, _r.invhist_transtype, _r.sense, _r.invhist_invqty, _r.invhist_comments; -- Update balances changed by any standard cost update between transactions IF (_prevCostmethod = 'S' AND _runningQty != 0) THEN PERFORM postValueintoInvBalance(pItemsiteid, costhist_date::date, _runningQty, _runningNn, costhist_oldcost, costhist_newcost ) FROM costhist WHERE ((costhist_item_id=_r.itemsite_item_id) AND (costhist_date BETWEEN _prevDate AND _r.invhist_created) AND (costhist_type IN ('S','D'))); END IF; -- Post transaction into inventory balance table PERFORM postIntoInvBalance(_r.invhist_id); _prevDate := _r.invhist_created; _prevCostmethod := _r.invhist_costmethod; _runningQty := _runningQty + _r.invhist_invqty * _r.sense; IF (_r.invhist_transtype = 'NN') THEN _runningNn := _runningNn + _r.invhist_invqty * -1; END IF; END LOOP; -- Update balances changed by any standard cost since last transaction IF (_prevCostmethod = 'S' AND _runningQty != 0) THEN PERFORM postValueintoInvBalance(pItemsiteid, costhist_date::date, _runningQty, _runningNn, costhist_oldcost, costhist_newcost ) FROM costhist WHERE ((costhist_item_id=_r.itemsite_item_id) AND (costhist_date > _prevDate) AND (costhist_type IN ('S','D'))); END IF; -- Forward update changes through all the balances PERFORM forwardupdateitemsite(pItemsiteId); RETURN 1; END; $_$; +DROP FUNCTION public.buildinvbal(integer); publicadminfalse8399212551681923buildsearchpath()FUNCTIONCREATE FUNCTION buildsearchpath() RETURNS text LANGUAGE plpgsql AS $_$ DECLARE _path TEXT := ''; _schema TEXT; _seq INTEGER; BEGIN -- get the schemas as ordered by the administrator SELECT concatagg(quote_ident(schemaord_name) || ',') INTO _path FROM (SELECT schemaord_name FROM schemaord LEFT OUTER JOIN pkghead ON (schemaord_name=pkghead_name) WHERE (pkghead_id IS NULL OR (pkghead_id IS NOT NULL AND packageisenabled(pkghead_id))) ORDER BY schemaord_order ) AS xtspq; -- add others that we think/know we need -- TODO: is there a reason not to include public, api, or packages? FOR _schema, _seq IN SELECT pkghead_name AS schema, 0 AS seq FROM pkghead WHERE packageisenabled(pkghead_id) UNION ALL SELECT 'public', 1 UNION ALL SELECT 'api', 2 ORDER BY seq, schema LOOP IF (_path !~* (E'(^|\\W)' || _schema || E'(\\W|$)')) THEN _path := _path || ',' || quote_ident(_schema); END IF; END LOOP; -- remove extraneous spaces and commas _path = BTRIM(REGEXP_REPLACE(_path, '( ?, ?)+', ',', 'g'), ', '); RAISE DEBUG 'buildSearchPath() returning %', _path; RETURN _path; END; $_$; (DROP FUNCTION public.buildsearchpath(); publicadminfalse83992!00FUNCTION buildsearchpath()COMMENT:COMMENT ON FUNCTION buildsearchpath() IS 'buildSearchPath() examines the schemaord and pkghead tables to build a search path string. It ensures that public, api, and all enabled packages are included even if they are not listed in the schemaord table. It returns the constructed search_path but does not set it.'; publicadminfalse102012551681924+calccashbudget(integer, integer, character)FUNCTION CREATE FUNCTION calccashbudget(integer, integer, character) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntId ALIAS FOR $1; pPeriodId ALIAS FOR $2; pInterval ALIAS FOR $3; _accntType CHAR; _currentBudget NUMERIC; _priorBudget NUMERIC; _result NUMERIC; BEGIN SELECT accnt_type INTO _accntType FROM accnt WHERE (accnt_id=pAccntId); SELECT COALESCE(SUM(budget_amount),0) INTO _currentBudget FROM budget WHERE ((budget_accnt_id=pAccntId) AND (budget_period_id=pPeriodId)); IF (pInterval='M') THEN SELECT (COALESCE(SUM(budget_amount),0)) INTO _priorBudget FROM budget, (SELECT COALESCE(pp.period_id,-1) AS prior_period_id FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1) AS data WHERE ((budget_accnt_id=pAccntId) AND (budget_period_id=prior_period_id)); ELSE IF (pInterval='Q') THEN SELECT (COALESCE(SUM(budget_amount),0)) INTO _priorBudget FROM budget, (SELECT COALESCE(pp.period_id,-1) AS prior_period_id FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start) AND (pp.period_quarter= CASE WHEN cp.period_quarter > 1 THEN cp.period_quarter - 1 ELSE 4 END) AND (pp.period_start >= cp.period_start - interval '1 year')) ORDER BY pp.period_start DESC LIMIT 1) AS data WHERE ((budget_accnt_id=pAccntId) AND (budget_period_id=prior_period_id)); ELSE SELECT (COALESCE(SUM(budget_amount),0)) INTO _priorBudget FROM budget, (SELECT pp.period_id AS prior_period_id FROM period cp, period pp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=cy.yearperiod_id) AND (pp.period_yearperiod_id=py.yearperiod_id) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY pp.period_start DESC LIMIT 1) AS data WHERE ((budget_accnt_id=pAccntId) AND (budget_period_id=prior_period_id)); END IF; END IF; IF _accntType='A' THEN _result := ((_priorBudget-_currentBudget) * -1 ); ELSE IF (_accntType IN ('L','Q')) THEN _result := ((_priorBudget-_currentBudget) *-1); ELSE RETURN -1; END IF; END IF; RETURN _result; END; $_$; BDROP FUNCTION public.calccashbudget(integer, integer, character); publicadminfalse8399212551681925calccmheadamt(integer)FUNCTIONCREATE FUNCTION calccmheadamt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM(COALESCE(extprice, 0)) INTO _amount FROM cmhead JOIN creditmemoitem ON (cmhead_id=cmitem_cmhead_id) WHERE (cmhead_id=pCmheadid); RETURN _amount; END; $_$; -DROP FUNCTION public.calccmheadamt(integer); publicadminfalse83992t12551681926calccmheadtax(integer)FUNCTIONCREATE FUNCTION calccmheadtax(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; _headamount NUMERIC := 0; _itemamount NUMERIC := 0; _amount NUMERIC := 0; BEGIN SELECT COALESCE(SUM(taxhist_tax), 0) INTO _headamount FROM cmhead JOIN cmheadtax ON (taxhist_parent_id=cmhead_id) WHERE (cmhead_id=pCmheadid); SELECT SUM(COALESCE(tax, 0)) INTO _itemamount FROM cmhead JOIN creditmemoitem ON (cmhead_id=cmitem_cmhead_id) WHERE (cmhead_id=pCmheadid); _amount := _headamount + _itemamount; RETURN (_amount * -1.0); END; $_$; -DROP FUNCTION public.calccmheadtax(integer); publicadminfalse8399212551681927calccobillamt(integer)FUNCTION'CREATE FUNCTION calccobillamt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobillid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT COALESCE(round((cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio), 2), 0) INTO _amount FROM cobill JOIN coitem ON (coitem_id=cobill_coitem_id) WHERE (cobill_id=pCobillid); RETURN _amount; END; $_$; -DROP FUNCTION public.calccobillamt(integer); publicadminfalse8399212551681928calccobilltax(integer)FUNCTIONCREATE FUNCTION calccobilltax(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobillid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT COALESCE(calculateTax(cobmisc_taxzone_id, cobill_taxtype_id, cobmisc_shipdate, cobmisc_curr_id, calcCobillAmt(cobill_id)), 0) INTO _amount FROM cobill JOIN coitem ON (coitem_id=cobill_coitem_id) JOIN cobmisc ON (cobmisc_id=cobill_cobmisc_id) WHERE (cobill_id=pCobillid); RETURN _amount; END; $_$; -DROP FUNCTION public.calccobilltax(integer); publicadminfalse8399212551681929calccobmiscamt(integer)FUNCTIONCREATE FUNCTION calccobmiscamt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM(COALESCE(calcCobillAmt(cobill_id), 0)) INTO _amount FROM cobmisc JOIN cobill ON (cobmisc_id=cobill_cobmisc_id) WHERE (cobmisc_id=pCobmiscid); RETURN _amount; END; $_$; .DROP FUNCTION public.calccobmiscamt(integer); publicadminfalse8399212551681930calccobmisctax(integer)FUNCTION`CREATE FUNCTION calccobmisctax(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM( COALESCE(calculateTax(cobmisc_taxzone_id, cobill_taxtype_id, cobmisc_shipdate, cobmisc_curr_id, COALESCE(round((cobill_qty * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio), 2), 0)) , 0) ) INTO _amount FROM cobmisc JOIN cobill ON (cobmisc_id=cobill_cobmisc_id) JOIN coitem ON (coitem_id=cobill_coitem_id) WHERE (cobmisc_id=pCobmiscid); RETURN _amount; END; $_$; .DROP FUNCTION public.calccobmisctax(integer); publicadminfalse83992 12551681931"calcpendingarapplications(integer)FUNCTIONCREATE FUNCTION calcpendingarapplications(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE paropenid ALIAS FOR $1; _arcreditsum NUMERIC; _aropencurrid INTEGER; _cashrcptsum NUMERIC; _sense INTEGER; BEGIN SELECT aropen_curr_id, (CASE WHEN aropen_doctype IN ('I','D') THEN 1 ELSE -1 END) INTO _aropencurrid, _sense FROM aropen WHERE (aropen_id=paropenid); SELECT SUM(currToCurr(cashrcpt_curr_id, _aropencurrid, cashrcptitem_amount + cashrcptitem_discount, coalesce(cashrcpt_applydate, cashrcpt_distdate))) * _sense INTO _cashrcptsum FROM cashrcptitem, cashrcpt WHERE ((cashrcptitem_cashrcpt_id=cashrcpt_id) AND (NOT cashrcpt_posted) AND (NOT cashrcpt_void) AND (cashrcptitem_aropen_id=paropenid) ); SELECT SUM(currToCurr(arcreditapply_curr_id, _aropencurrid, arcreditapply_amount, CURRENT_DATE)) INTO _arcreditsum FROM arcreditapply WHERE ((arcreditapply_target_aropen_id=paropenid) ); RETURN round(COALESCE(_cashrcptsum, 0) + COALESCE(_arcreditsum, 0),2); END; $_$; 9DROP FUNCTION public.calcpendingarapplications(integer); publicadminfalse83992 12551681932calcquoteamt(integer)FUNCTIONCREATE FUNCTION calcquoteamt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; _subtotal NUMERIC := 0; _tax NUMERIC := 0; _freight NUMERIC := 0; _misc NUMERIC := 0; _amount NUMERIC := 0; BEGIN SELECT COALESCE(SUM(ROUND((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio), 2)), 0) INTO _subtotal FROM quitem WHERE (quitem_quhead_id=pQuheadid); SELECT COALESCE(SUM(tax), 0) INTO _tax FROM ( SELECT ROUND(SUM(taxdetail_tax), 2) AS tax FROM tax JOIN calculateTaxDetailSummary('Q', pQuheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id ) AS data; SELECT COALESCE(quhead_freight, 0), COALESCE(quhead_misc, 0) INTO _freight, _misc FROM quhead WHERE (quhead_id=pQuheadid); _amount := _subtotal + _tax + _freight + _misc; RETURN _amount; END; $_$; ,DROP FUNCTION public.calcquoteamt(integer); publicadminfalse83992 12551681933calcsalesorderamt(integer)FUNCTION!CREATE FUNCTION calcsalesorderamt(pcoheadid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN calcSalesOrderAmt(pCoheadid, 'T'); END; $$; ;DROP FUNCTION public.calcsalesorderamt(pcoheadid integer); publicadminfalse83992z12551989105 calcsalesorderamt(integer, text)FUNCTION3CREATE FUNCTION calcsalesorderamt(pcoheadid integer, ptype text) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _subtotal NUMERIC := 0; _tax NUMERIC := 0; _freight NUMERIC := 0; _misc NUMERIC := 0; _credit NUMERIC := 0; _amount NUMERIC := 0; BEGIN -- pType: S = line item subtotal -- T = total -- B = balance due -- C = allocated credits -- X = tax SELECT COALESCE(SUM(ROUND((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio), 2)), 0) INTO _subtotal FROM coitem WHERE (coitem_cohead_id=pCoheadid) AND (coitem_status != 'X'); SELECT COALESCE(SUM(tax), 0) INTO _tax FROM ( SELECT ROUND(SUM(taxdetail_tax), 2) AS tax FROM tax JOIN calculateTaxDetailSummary('S', pCoheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id ) AS data; SELECT COALESCE(cohead_freight, 0), COALESCE(cohead_misc, 0), COALESCE(SUM(currToCurr(aropenalloc_curr_id, cohead_curr_id, aropenalloc_amount, CURRENT_DATE)),0) INTO _freight, _misc, _credit FROM cohead LEFT OUTER JOIN aropenalloc ON (aropenalloc_doctype='S' AND aropenalloc_doc_id=cohead_id) WHERE (cohead_id=pCoheadid) GROUP BY cohead_freight, cohead_misc, cohead_curr_id; _amount := CASE pType WHEN 'S' THEN (_subtotal) WHEN 'T' THEN (_subtotal + _tax + _freight + _misc) WHEN 'B' THEN (_subtotal + _tax + _freight + _misc - _credit) WHEN 'C' THEN (_credit) WHEN 'X' THEN (_tax) ELSE 0.0 END; RETURN _amount; END; $$; GDROP FUNCTION public.calcsalesorderamt(pcoheadid integer, ptype text); publicadminfalse83992A12551681934calcshipfreight(integer)FUNCTION17CREATE FUNCTION calcshipfreight(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadId ALIAS FOR $1; _result NUMERIC := 0; _order RECORD; _shipment RECORD; _weights RECORD; _price RECORD; _sales RECORD; _freightid INTEGER; _totalprice NUMERIC; _includepkgweight BOOLEAN := FALSE; _freight RECORD; _debug BOOLEAN := false; BEGIN --Get shipment SELECT shiphead_order_id, shiphead_order_type, shiphead_freight INTO _shipment FROM shiphead WHERE (shiphead_id=pShipheadId); IF (NOT FOUND) THEN RAISE EXCEPTION 'Shipment not found'; END IF; IF (_shipment.shiphead_order_type = 'SO') THEN --Sales Orders --Get the order header information SELECT cust_id AS cust_id, custtype_id, custtype_code, shipto_id, shipto_num, cohead_orderdate AS orderdate, cohead_shipvia AS shipvia, shipto_shipzone_id AS shipzone_id, cohead_curr_id AS curr_id, currConcat(cohead_curr_id) AS currAbbr, cohead_calcfreight, cohead_freight INTO _order FROM cohead JOIN custinfo ON (cust_id=cohead_cust_id) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN shiptoinfo ON (shipto_id=cohead_shipto_id) WHERE (cohead_id=_shipment.shiphead_order_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Order not found'; END IF; IF (_debug) THEN RAISE NOTICE 'cust_id = %', _order.cust_id; RAISE NOTICE 'custtype_id = %', _order.custtype_id; RAISE NOTICE 'shipto_id = %', _order.shipto_id; RAISE NOTICE 'shipto_num = %', _order.shipto_num; RAISE NOTICE 'orderdate = %', _order.orderdate; RAISE NOTICE 'shipvia = %', _order.shipvia; RAISE NOTICE 'shipzone_id = %', _order.shipzone_id; RAISE NOTICE 'curr_id = %', _order.curr_id; RAISE NOTICE 'currAbbr = %', _order.currAbbr; RAISE NOTICE 'calcfreight = %', _order.cohead_calcfreight; RAISE NOTICE 'freight = %', _order.cohead_freight; END IF; IF (NOT _order.cohead_calcfreight) THEN SELECT noNeg( _order.cohead_freight - COALESCE((SELECT SUM(shiphead_freight) FROM shiphead WHERE (shiphead_order_id = _shipment.shiphead_order_id) AND (shiphead_shipped='true')), 0) ) INTO _result; RETURN _result; END IF; SELECT fetchMetricBool('IncludePackageWeight') INTO _includepkgweight; --Calculate Sales Order freight --Get a list of aggregated weights from sites and --freight classes used on order lines FOR _weights IN SELECT CASE WHEN (_includePkgWeight) THEN SUM(shipitem_qty * (item_prodweight + item_packweight)) ELSE SUM(shipitem_qty * item_prodweight) END AS weight, itemsite_warehous_id, item_freightclass_id FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id) JOIN coitem ON (shipitem_orderitem_id=coitem_id) JOIN itemsite ON (itemsite_id=coitem_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE ( (shiphead_id=pShipheadId) AND (item_freightclass_id IS NOT NULL) ) GROUP BY itemsite_warehous_id, item_freightclass_id LOOP IF (_debug) THEN RAISE NOTICE '_weights.weight - %', _weights.weight; RAISE NOTICE '_weights.itemsite_warehous_id = %', _weights.itemsite_warehous_id; RAISE NOTICE '_weights.item_freightclass_id = %', _weights.item_freightclass_id; END IF; -- First get a sales price if any so we when we find other prices -- we can determine if we want that price or this price. -- Check for a Sale Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _sales FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN sale ON (sale_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN sale_startdate AND sale_enddate) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_sales.price IS NOT NULL) THEN RAISE NOTICE 'Sales Price found, %', _sales.price; END IF; END IF; -- Check for a Customer Shipto Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=_order.cust_id) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=_order.shipto_id) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Shipto Price found, %', _price.price; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Shipto Pattern Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=_order.cust_id) AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND (_order.shipto_num ~ ipsass_shipto_pattern) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Shipto Pattern Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=_order.cust_id) AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) = 0) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Type Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_custtype_id=_order.custtype_id) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Type Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Type Pattern Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, _order.curr_id, ipsfreight_price, _order.orderdate) ELSE currToCurr(ipshead_curr_id, _order.curr_id, (_weights.weight * ipsfreight_price), _order.orderdate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= _weights.weight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=_weights.itemsite_warehous_id)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=_weights.item_freightclass_id)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=_order.shipzone_id)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=_order.shipvia)) AND (CURRENT_DATE BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND (_order.custtype_code ~ ipsass_custtype_pattern) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Type Pattern Price found, %', _price.price; END IF; END IF; END IF; -- Select the lowest price IF ( (_price.price IS NOT NULL) AND ((_sales.price IS NULL) OR (_price.price < _sales.price)) ) THEN _freightid := _price.ipsfreight_id; _totalprice := _price.price; ELSE IF ( (_sales.price IS NOT NULL) AND ((_price.price IS NULL) OR (_sales.price <= _price.price)) ) THEN _freightid := _sales.ipsfreight_id; _totalprice := _sales.price; END IF; END IF; -- Total IF (_freightid IS NOT NULL) THEN _result := _result + _totalprice; END IF; END LOOP; RETURN ROUND(_result,2); END IF; IF (_shipment.shiphead_order_type = 'TO') THEN --Transfer Orders SELECT noNeg( (SELECT SUM(toitem_freight) + tohead_freight FROM tohead, toitem WHERE (toitem_tohead_id=tohead_id) AND (tohead_id = _shipment.shiphead_order_id) GROUP BY tohead_freight) - COALESCE((SELECT SUM(shiphead_freight) FROM shiphead WHERE (shiphead_order_id = _shipment.shiphead_order_id) AND (shiphead_shipped='true')), 0) ) INTO _result; RETURN _result; END IF; RETURN _result; END; $_$; /DROP FUNCTION public.calcshipfreight(integer); publicadminfalse83992{12551681936calctotalslipqty(integer)FUNCTIONCREATE FUNCTION calctotalslipqty(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTagid ALIAS FOR $1; _qty NUMERIC := 0; BEGIN SELECT SUM(COALESCE(cntslip_qty, 0.0)) INTO _qty FROM cntslip WHERE (cntslip_cnttag_id=pTagid); RETURN _qty; END; $_$; 0DROP FUNCTION public.calctotalslipqty(integer); publicadminfalse83992|12552005494calculatefreightdetail(integer, integer, text, integer, integer, text, date, text, integer, character varying, integer, integer, numeric)FUNCTION+CREATE FUNCTION calculatefreightdetail(integer, integer, text, integer, integer, text, date, text, integer, character varying, integer, integer, numeric) RETURNS SETOF freightdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustId ALIAS FOR $1; pCustTypeId ALIAS FOR $2; pCustTypeCode ALIAS FOR $3; pShiptoId ALIAS FOR $4; pShipZoneId ALIAS FOR $5; pShiptoNum ALIAS FOR $6; pOrderDate ALIAS FOR $7; pShipVia ALIAS FOR $8; pCurrId ALIAS FOR $9; pCurrAbbr ALIAS FOR $10; pItemSiteWhsId ALIAS FOR $11; pItemFreightclassId ALIAS FOR $12; pWeight ALIAS FOR $13; _row freightData%ROWTYPE; _price RECORD; _sales RECORD; _freightid INTEGER; _totalprice NUMERIC; _asof DATE; _debug BOOLEAN := FALSE; BEGIN --Get pricing effectivity metric IF (SELECT fetchMetricText('soPriceEffective') = 'OrderDate') THEN _asof := pOrderDate; ELSE _asof := CURRENT_DATE; END IF; _freightid := NULL; _totalprice := 0.0; IF (_debug) THEN RAISE NOTICE 'pWeight - %', pWeight; RAISE NOTICE 'pItemSiteWhsId = %', pItemSiteWhsId; RAISE NOTICE 'pItemFreightclassId = %', pItemFreightclassId; END IF; -- First get a sales price if any so when we find other prices -- we can determine if we want that price or this sales price. -- Check for a Sale Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _sales FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN sale ON (sale_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN sale_startdate AND sale_enddate) AND (pCustId IS NOT NULL) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_sales.price IS NOT NULL) THEN RAISE NOTICE 'Sales Price found, %', _sales.price; END IF; END IF; -- Check for a Customer Shipto Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=pShiptoId) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Shipto Price found, %', _price.price; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Shipto Pattern Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=pCustId) AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND (pShiptoNum ~ ipsass_shipto_pattern) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Shipto Pattern Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_cust_id=pCustId) AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) = 0) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Type Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsass_custtype_id=pCustTypeId) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Type Price found, %', _price.price; END IF; END IF; END IF; IF (_price.price IS NULL) THEN -- Check for a Customer Type Pattern Price SELECT ipsfreight_id, CASE WHEN (ipsfreight_type='F') THEN currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) ELSE currToCurr(ipshead_curr_id, pCurrId, (pWeight * ipsfreight_price), pOrderDate) END AS price INTO _price FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE ( (ipsfreight_qtybreak <= pWeight) AND ((ipsfreight_warehous_id IS NULL) OR (ipsfreight_warehous_id=pItemSiteWhsId)) AND ((ipsfreight_freightclass_id IS NULL) OR (ipsfreight_freightclass_id=pItemFreightclassId)) AND ((ipsfreight_shipzone_id IS NULL) OR (ipsfreight_shipzone_id=pShipZoneId)) AND ((ipsfreight_shipvia IS NULL) OR (ipsfreight_shipvia=pShipVia)) AND (_asof BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND (pCustTypeCode ~ ipsass_custtype_pattern) ) ORDER BY ipsfreight_qtybreak DESC, price ASC LIMIT 1; IF (_debug) THEN IF (_price.price IS NOT NULL) THEN RAISE NOTICE 'Customer Type Pattern Price found, %', _price.price; END IF; END IF; END IF; -- Select the lowest price IF ( (_price.price IS NOT NULL) AND ((_sales.price IS NULL) OR (_price.price < _sales.price)) ) THEN _freightid := _price.ipsfreight_id; _totalprice := _price.price; ELSE IF ( (_sales.price IS NOT NULL) AND ((_price.price IS NULL) OR (_sales.price <= _price.price)) ) THEN _freightid := _sales.ipsfreight_id; _totalprice := _sales.price; END IF; END IF; IF (_debug) THEN RAISE NOTICE '_freightid = %', _freightid; RAISE NOTICE '_totalprice = %', _totalprice; END IF; -- Get information for the selected ipsfreight -- and return IF (_freightid IS NULL) THEN _row.freightdata_schedule := 'N/A'; _row.freightdata_from := ''; _row.freightdata_to := ''; _row.freightdata_shipvia := ''; _row.freightdata_freightclass := ''; _row.freightdata_weight := 0; _row.freightdata_uom := ''; _row.freightdata_price := 0; _row.freightdata_type := ''; _row.freightdata_total := 0; _row.freightdata_currency := ''; RETURN NEXT _row; ELSE SELECT ipshead_name AS freightdata_schedule, COALESCE(warehous_code, 'Any') AS freightdata_from, COALESCE(shipzone_name, 'Any') AS freightdata_to, COALESCE(ipsfreight_shipvia, 'Any') AS freightdata_shipvia, COALESCE(freightclass_code, 'Any') AS freightdata_freightclass, pWeight AS freightdata_weight, uom_name AS freightdata_uom, currToCurr(ipshead_curr_id, pCurrId, ipsfreight_price, pOrderDate) AS freightdata_price, CASE WHEN (ipsfreight_type='F') THEN 'Flat Rate' ELSE 'Per UOM' END AS freightdata_type, _totalprice AS freightdata_total, pCurrAbbr AS freightdata_currency INTO _row FROM ipsfreight JOIN ipshead ON (ipshead_id=ipsfreight_ipshead_id) LEFT OUTER JOIN uom ON (uom_item_weight) LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id) LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id) LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id) WHERE (ipsfreight_id=_freightid); RETURN NEXT _row; END IF; RETURN; END; $_$; DROP FUNCTION public.calculatefreightdetail(integer, integer, text, integer, integer, text, date, text, integer, character varying, integer, integer, numeric); publicadminfalse839922587125520054969calculatesubtax(integer, date, integer, numeric, integer)FUNCTION6 CREATE FUNCTION calculatesubtax(integer, date, integer, numeric, integer) RETURNS SETOF taxdetail LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxCodeId ALIAS FOR $1; pDate ALIAS FOR $2; pCurrId ALIAS FOR $3; pAmount ALIAS FOR $4; pLevel ALIAS FOR $5; _row taxdetail%ROWTYPE; _rownumber INTEGER := 1; _calc_tax Numeric :=0; _x RECORD; _y RECORD; BEGIN FOR _x IN SELECT tax_id, tax_code, tax_descrip, tax_basis_tax_id, taxrate_id, taxrate_percent, taxrate_curr_id, taxrate_amount, taxclass_id, taxclass_code, COALESCE(taxclass_sequence,0) AS taxclass_sequence, curr_id, curr_abbr FROM tax, taxrate, taxclass, curr_symbol WHERE ((tax_id = taxrate_tax_id) AND (tax_taxclass_id = taxclass_id) AND (taxrate_curr_id = curr_id) AND (tax_basis_tax_id = pTaxCodeId) AND (pDate BETWEEN taxrate_effective AND taxrate_expires) AND (taxrate_curr_id = pCurrId)) LOOP SELECT ROUND((_x.taxrate_percent * pAmount + currToCurr(_x.curr_id, pCurrId, _x.taxrate_amount, pDate)), 6) INTO _calc_tax; _row.taxdetail_tax_id = _x.tax_id; _row.taxdetail_tax_code = _x.tax_code; _row.taxdetail_tax_descrip = _x.tax_descrip; _row.taxdetail_tax_basis_tax_id = _x.tax_basis_tax_id ; _row.taxdetail_taxrate_percent = _x.taxrate_percent; _row.taxdetail_taxrate_amount = _x.taxrate_amount; _row.taxdetail_level = pLevel + 1; _row.taxdetail_taxclass_id = _x.taxclass_id ; _row.taxdetail_taxclass_code = _x.taxclass_code; _row.taxdetail_taxclass_sequence = _x.taxclass_sequence; _row.taxdetail_tax = _calc_tax; _row.taxdetail_curr_id = _x.curr_id; _row.taxdetail_curr_abbr = _x.curr_abbr; RETURN NEXT _row; _rownumber := _rownumber + 1; FOR _y IN SELECT * FROM calculateSubTax( _x.tax_id, pDate, pCurrId, _calc_tax, pLevel + 1) LOOP _row.taxdetail_tax_id = _y.taxdetail_tax_id; _row.taxdetail_tax_code = _y.taxdetail_tax_code; _row.taxdetail_tax_descrip = _y.taxdetail_tax_descrip; _row.taxdetail_tax_basis_tax_id = _y.taxdetail_tax_basis_tax_id ; _row.taxdetail_taxrate_percent = _y.taxdetail_taxrate_percent; _row.taxdetail_taxrate_amount = _y.taxdetail_taxrate_amount; _row.taxdetail_level = _y.taxdetail_level + 1; _row.taxdetail_taxclass_id = _y.taxdetail_taxclass_id ; _row.taxdetail_taxclass_code = _y.taxdetail_taxclass_code; _row.taxdetail_taxclass_sequence = _y.taxdetail_taxclass_sequence; _row.taxdetail_tax = _y.taxdetail_tax; _row.taxdetail_curr_id = _y.taxdetail_curr_id; _row.taxdetail_curr_abbr = _y.taxdetail_curr_abbr; RETURN NEXT _row; _rownumber := _rownumber + 1; END LOOP; END LOOP; END; $_$; PDROP FUNCTION public.calculatesubtax(integer, date, integer, numeric, integer); publicadminfalse839922605125516819406calculatetax(integer, integer, date, integer, numeric)FUNCTION]CREATE FUNCTION calculatetax(integer, integer, date, integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxZoneId ALIAS FOR $1; pTaxTypeId ALIAS FOR $2; pDate ALIAS FOR $3; pCurrId ALIAS FOR $4; pAmount ALIAS FOR $5; _tottax numeric := 0; -- total tax BEGIN SELECT COALESCE(ROUND(SUM(taxdetail_tax),6),0) INTO _tottax FROM calculateTaxDetail(pTaxZoneId, pTaxTypeId, pDate, pCurrId, pAmount); RETURN _tottax; END; $_$; MDROP FUNCTION public.calculatetax(integer, integer, date, integer, numeric); publicadminfalse8399212552005497<calculatetaxdetail(integer, integer, date, integer, numeric)FUNCTIONCREATE FUNCTION calculatetaxdetail(integer, integer, date, integer, numeric) RETURNS SETOF taxdetail LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxZoneId ALIAS FOR $1; pTaxTypeId ALIAS FOR $2; pDate ALIAS FOR $3; pCurrId ALIAS FOR $4; pAmount ALIAS FOR $5; _row taxdetail%ROWTYPE; _x RECORD; _y RECORD; _z RECORD; _currcum numeric := 0; -- Current cumulative tax _currseq numeric := 0; -- Current group sequence _prevcum numeric := 0; -- Previous cumulative tax _tax numeric := 0; -- Calculated tax amount _taxbasis numeric := 0; -- Used for calculating sub taxes BEGIN IF ((COALESCE(pTaxTypeId,-1) = -1) OR (COALESCE(pTaxZoneId,-1) = -1)) THEN RETURN; END IF; SELECT DISTINCT COALESCE(taxass_taxzone_id, -1) AS taxzone_id, COALESCE(taxass_taxtype_id, -1) AS taxtype_id, taxass_tax_id, CASE WHEN ((taxass_taxzone_id IS NOT NULL) AND (taxass_taxtype_id IS NOT NULL)) THEN 0 WHEN ((taxass_taxzone_id IS NOT NULL) AND (taxass_taxtype_id IS NULL)) THEN 1 WHEN ((taxass_taxzone_id IS NULL) AND (taxass_taxtype_id IS NOT NULL)) THEN 2 ELSE 3 END AS sequence INTO _x FROM taxass WHERE ((COALESCE(taxass_taxzone_id, pTaxZoneId, -1) = COALESCE(pTaxZoneId,-1)) AND (COALESCE(taxass_taxtype_id, pTaxTypeId, -1) = COALESCE(pTaxTypeId,-1))) ORDER BY sequence LIMIT 1; --Now loop through each tax detail record and return calculated result FOR _y IN SELECT --the data required by taxdetail type. Coalesce group sequence to 0 if no class. tax_id ,tax_code ,tax_descrip ,tax_basis_tax_id ,taxrate_percent ,taxrate_amount ,0 as taxdetail_level ,taxclass_id ,taxclass_code ,COALESCE(taxclass_sequence, 0) AS taxclass_sequence ,0 as taxdetail_tax ,curr_id ,curr_abbr FROM taxass, taxclass RIGHT OUTER JOIN tax LEFT OUTER JOIN taxrate ON (taxrate_tax_id=tax_id) ON (tax_taxclass_id=taxclass_id), curr_symbol WHERE taxass_tax_id=tax_id AND taxrate_curr_id=curr_id AND COALESCE(taxass_taxzone_id, -1) = _x.taxzone_id AND COALESCE(taxass_taxtype_id, -1) = _x.taxtype_id AND pDate BETWEEN COALESCE(taxrate_effective, startoftime()) AND COALESCE(taxrate_expires, endoftime()) ORDER BY COALESCE(taxclass_sequence, 0) LOOP -- If sequence has changed, cache the previous cumulative tax IF (_currseq != _x.sequence) THEN _prevcum := _currcum; END IF; -- Calculate the tax amount. Convert currency for flat rate amounts SELECT ROUND((_y.taxrate_percent * (pAmount + _prevcum) + currToCurr(_y.curr_id, pCurrId, _y.taxrate_amount, pDate)), 6) INTO _tax FROM tax JOIN taxrate ON (tax_id = taxrate_tax_id) WHERE (tax_id=_x.taxass_tax_id) AND (pDate BETWEEN COALESCE(taxrate_effective, startoftime()) AND COALESCE(taxrate_expires, endoftime())); --Map fields to _row _row.taxdetail_tax_id := _y.tax_id; _row.taxdetail_tax_code := _y.tax_code; _row.taxdetail_tax_descrip := _y.tax_descrip; _row.taxdetail_tax_basis_tax_id := _y.tax_basis_tax_id; _row.taxdetail_taxrate_percent := _y.taxrate_percent; _row.taxdetail_taxrate_amount := _y.taxrate_amount; _row.taxdetail_level := _y.taxdetail_level; _row.taxdetail_taxclass_id := _y.taxclass_id; _row.taxdetail_taxclass_code := _y.taxclass_code; _row.taxdetail_taxclass_sequence := _y.taxclass_sequence; _row.taxdetail_tax := _tax; _row.taxdetail_curr_id := _y.curr_id; _row.taxdetail_curr_abbr := _y.curr_abbr; RETURN NEXT _row; -- Increment cumulative balance and sequence number IF(_y.taxclass_sequence <> 0) THEN _currcum := _currcum + _tax; END IF; _currseq := _y.taxclass_sequence; -- Loop to Calculate sub taxes FOR _z IN SELECT * FROM calculateSubTax(_y.tax_id,pDate, pCurrId, _tax, 0) LOOP --Mapping of data _row.taxdetail_tax_id := _z.taxdetail_tax_id; _row.taxdetail_tax_code := _z.taxdetail_tax_code; _row.taxdetail_tax_descrip := _z.taxdetail_tax_descrip; _row.taxdetail_tax_basis_tax_id := _z.taxdetail_tax_basis_tax_id; _row.taxdetail_taxrate_percent := _z.taxdetail_taxrate_percent; _row.taxdetail_taxrate_amount := _z.taxdetail_taxrate_amount; _row.taxdetail_level := _z.taxdetail_level; _row.taxdetail_taxclass_id := _z.taxdetail_taxclass_id; _row.taxdetail_taxclass_code := _z.taxdetail_taxclass_code; _row.taxdetail_taxclass_sequence := _z.taxdetail_taxclass_sequence; _row.taxdetail_tax := _z.taxdetail_tax; _row.taxdetail_curr_id := _z.taxdetail_curr_id; _row.taxdetail_curr_abbr := _z.taxdetail_curr_abbr; RETURN NEXT _row; --Add to cumulative counter (_curcum) _currcum := _currcum + _z.taxdetail_tax ; END LOOP; END LOOP; END; $_$; SDROP FUNCTION public.calculatetaxdetail(integer, integer, date, integer, numeric); publicadminfalse83992260512552005498%calculatetaxdetailline(text, integer)FUNCTION^CREATE FUNCTION calculatetaxdetailline(text, integer) RETURNS SETOF taxdetail LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderType ALIAS FOR $1; pOrderId ALIAS FOR $2; _row taxdetail%ROWTYPE; _qry text; _totaltax numeric; _y RECORD; _table text; BEGIN _totaltax=0.0; IF pOrderType = 'II' THEN _table := 'invcitemtax'; ELSIF pOrderType = 'BI' THEN _table := 'cobilltax'; ELSIF pOrderType = 'CI' THEN _table := 'cmitemtax'; ELSIF pOrderType = 'VI' THEN _table := 'voitemtax'; ELSIF pOrderType = 'TI' THEN _table := 'toitemtax'; ELSIF pOrderType = 'AR' THEN _table := 'aropentax'; ELSIF pOrderType = 'AP' THEN _table := 'apopentax'; END IF; _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, COALESCE(taxhist_sequence,0) AS taxhist_sequence FROM taxhist JOIN tax ON (taxhist_tax_id=tax_id) JOIN pg_class ON (pg_class.oid=taxhist.tableoid) WHERE ( (taxhist_parent_id = ' || pOrderId || ') AND (relname=''' || _table || ''') );'; FOR _y IN EXECUTE _qry LOOP _row.taxdetail_tax_id=_y.tax_id; _row.taxdetail_tax_code = _y.tax_code; _row.taxdetail_tax_descrip = _y.tax_descrip; _row.taxdetail_tax = _y.taxhist_tax; _row.taxdetail_level= 0 ; _row.taxdetail_taxclass_sequence= _y.taxhist_sequence; _totaltax = _totaltax + _y.taxhist_tax; RETURN NEXT _row; END LOOP; END; $_$; <DROP FUNCTION public.calculatetaxdetailline(text, integer); publicadminfalse83992260512552005499.calculatetaxdetailsummary(text, integer, text)FUNCTION"CREATE FUNCTION calculatetaxdetailsummary(text, integer, text) RETURNS SETOF taxdetail LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderType ALIAS FOR $1; pOrderId ALIAS FOR $2; pDisplayType ALIAS FOR $3; _row taxdetail%ROWTYPE; _qry text := ''; _qry1 text; _totaltax numeric; _x RECORD; _y RECORD; _table text; BEGIN _totaltax=0.0; IF pOrderType IN ('S','Q','RA','PO') THEN IF pOrderType = 'S' THEN _qry := 'SELECT ' || 'COALESCE(cohead_taxzone_id, -1) AS taxzone_id, cohead_orderdate AS order_date, cohead_curr_id AS curr_id, COALESCE(coitem_taxtype_id, -1) AS taxtype_id, ROUND((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio),2) AS amount FROM cohead, coitem WHERE ( (coitem_cohead_id = ' || pOrderId || ') AND (' || 'cohead_id = coitem_cohead_id) AND ( coitem_status != ''X'') )'; ELSEIF pOrderType = 'Q' THEN _qry := 'SELECT ' || 'COALESCE(quhead_taxzone_id, -1) AS taxzone_id, quhead_quotedate AS order_date, quhead_curr_id AS curr_id, COALESCE(quitem_taxtype_id, -1) AS taxtype_id, ROUND((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio),2) AS amount FROM quhead, quitem WHERE ( (quitem_quhead_id = ' || pOrderId || ') AND (quhead_id = quitem_quhead_id) )'; ELSEIF pOrderType = 'RA' THEN _qry := 'SELECT ' || 'COALESCE(rahead_taxzone_id, -1) AS taxzone_id, rahead_authdate AS order_date, rahead_curr_id AS curr_id, COALESCE(raitem_taxtype_id, -1) AS taxtype_id, ROUND((raitem_qtyauthorized * raitem_qty_invuomratio) * (raitem_unitprice / raitem_price_invuomratio),2) AS amount FROM rahead, raitem WHERE ( (raitem_rahead_id = ' || pOrderId || ') AND (rahead_id = raitem_rahead_id) )'; ELSEIF pOrderType = 'PO' THEN _qry := 'SELECT ' || 'COALESCE(pohead_taxzone_id, -1) AS taxzone_id, pohead_orderdate AS order_date, pohead_curr_id AS curr_id, COALESCE(poitem_taxtype_id, -1) AS taxtype_id, ROUND(poitem_qty_ordered * poitem_unitprice, 2) AS amount FROM pohead, poitem WHERE ( (poitem_pohead_id = ' || pOrderId || ') AND (pohead_id = poitem_pohead_id) )'; END IF; FOR _x IN EXECUTE _qry LOOP _qry1 := 'SELECT * from calculatetaxdetail(' || _x.taxzone_id || ',' || _x.taxtype_id || ',''' || _x.order_date || ''',' || _x.curr_id || ',' || _x.amount || ')'; FOR _y IN EXECUTE _qry1 LOOP _row.taxdetail_tax_id=_y.taxdetail_tax_id; _row.taxdetail_tax_code = _y.taxdetail_tax_code; _row.taxdetail_tax_descrip = _y.taxdetail_tax_descrip; _row.taxdetail_tax = _y.taxdetail_tax; _row.taxdetail_level=_y.taxdetail_level; _row.taxdetail_taxclass_sequence= _y.taxdetail_taxclass_sequence; _totaltax = _totaltax + _y.taxdetail_tax; RETURN NEXT _row; END LOOP; END LOOP; IF pDisplayType = 'T' AND pOrderType <> 'PO' THEN IF pOrderType = 'S' THEN _qry := 'SELECT COALESCE(cohead_taxzone_id, -1) AS taxzone_id, cohead_orderdate AS order_date, cohead_curr_id AS curr_id, cohead_freight AS freight FROM cohead WHERE cohead_id = ' || pOrderId ; ELSEIF pOrderType = 'Q' THEN _qry := 'SELECT COALESCE(quhead_taxzone_id, -1) AS taxzone_id, quhead_quotedate AS order_date, quhead_curr_id AS curr_id, COALESCE(quhead_freight,0) AS freight FROM quhead WHERE quhead_id = ' || pOrderId; ELSEIF pOrderType = 'RA' THEN _qry := 'SELECT COALESCE(rahead_taxzone_id, -1) AS taxzone_id, COALESCE(rahead_authdate,CURRENT_DATE) AS order_date, rahead_curr_id AS curr_id, COALESCE(rahead_freight,0) AS freight FROM rahead WHERE rahead_id = ' || pOrderId; END IF; FOR _x IN EXECUTE _qry LOOP _qry1 := 'SELECT * from calculatetaxdetail(' || _x.taxzone_id || ', getfreighttaxtypeid(),''' || _x.order_date || ''',' || _x.curr_id || ',' || _x.freight || ')'; FOR _y IN EXECUTE _qry1 LOOP _row.taxdetail_tax_id=_y.taxdetail_tax_id; _row.taxdetail_tax_code = _y.taxdetail_tax_code; _row.taxdetail_tax_descrip = _y.taxdetail_tax_descrip; _row.taxdetail_tax = _y.taxdetail_tax; _row.taxdetail_level=_y.taxdetail_level; _row.taxdetail_taxclass_sequence= _y.taxdetail_taxclass_sequence; _totaltax = _totaltax + _y.taxdetail_tax; RETURN NEXT _row; END LOOP; END LOOP; END IF; ELSEIF pOrderType IN ('I','B','CM', 'VO','TO') THEN IF (pOrderType='I') THEN _table := 'invcheadtax'; ELSIF (pOrderType='B') THEN _table := 'cobmisctax'; ELSIF (pOrderType='CM') THEN _table := 'cmheadtax'; ELSIF (pOrderType='VO') THEN _table := 'voheadtax'; ELSIF (pOrderType='TO') THEN _table := 'tohead'; END IF; IF pOrderType = 'I' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM invchead, invcitemtax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN invcitem ON (invcitem_id=taxhist_parent_id) WHERE invcitem_invchead_id = ' || pOrderId || ' AND invchead_id = invcitem_invchead_id '; ELSIF pOrderType = 'B' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM cobmisc, cobilltax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN cobill ON (cobill_id=taxhist_parent_id) WHERE cobill_cobmisc_id = ' || pOrderId || ' AND cobmisc_id = cobill_cobmisc_id '; ELSIF pOrderType = 'CM' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM cmhead, cmitemtax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN cmitem ON (cmitem_id=taxhist_parent_id) WHERE cmitem_cmhead_id = ' || pOrderId || ' AND cmhead_id = cmitem_cmhead_id '; ELSIF pOrderType = 'VO' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM vohead, voitemtax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN voitem ON (voitem_id=taxhist_parent_id) WHERE voitem_vohead_id = ' || pOrderId || ' AND vohead_id = voitem_vohead_id '; ELSIF pOrderType = 'TO' AND (pDisplayType IN ('L','T')) THEN _qry := 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM tohead, toitemtax LEFT OUTER JOIN tax ON (taxhist_tax_id=tax_id) LEFT OUTER JOIN toitem ON (toitem_id=taxhist_parent_id) WHERE toitem_tohead_id = ' || pOrderId || ' AND tohead_id = toitem_tohead_id '; END IF; IF pDisplayType IN ('F','T') AND pOrderType <> 'VO' THEN IF (length(_qry) > 0) THEN _qry := _qry || ' UNION ALL '; END IF; _qry := _qry || 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM taxhist JOIN tax ON (taxhist_tax_id=tax_id) JOIN pg_class ON (pg_class.oid=taxhist.tableoid) WHERE ( (taxhist_parent_id = ' || pOrderId || ') AND (taxhist_taxtype_id=getfreighttaxtypeid()) AND (relname=''' || _table || ''') )'; END IF; IF pDisplayType IN ('A','T') THEN IF (length(_qry) > 0) THEN _qry := _qry || ' UNION ALL '; END IF; _qry := _qry || 'SELECT taxhist_tax_id as tax_id, tax_code, tax_descrip, taxhist_tax, taxhist_sequence FROM taxhist JOIN tax ON (taxhist_tax_id=tax_id) JOIN pg_class ON (pg_class.oid=taxhist.tableoid) WHERE ( (taxhist_parent_id = ' || pOrderId || ') AND (taxhist_taxtype_id=getadjustmenttaxtypeid()) AND (relname=''' || _table || ''') )'; END IF; FOR _y IN EXECUTE _qry LOOP _row.taxdetail_tax_id=_y.tax_id; _row.taxdetail_tax_code = _y.tax_code; _row.taxdetail_tax_descrip = _y.tax_descrip; _row.taxdetail_tax = _y.taxhist_tax; _row.taxdetail_level= 0 ; _row.taxdetail_taxclass_sequence= COALESCE(_y.taxhist_sequence,0); _totaltax = _totaltax + _y.taxhist_tax; RETURN NEXT _row; END LOOP; END IF; END; $_$; EDROP FUNCTION public.calculatetaxdetailsummary(text, integer, text); publicadminfalse83992260512551681945Icalculatetaxhist(text, integer, integer, integer, date, integer, numeric)FUNCTIONCREATE FUNCTION calculatetaxhist(text, integer, integer, integer, date, integer, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTableName ALIAS FOR $1; pParentId ALIAS FOR $2; pTaxZoneId ALIAS FOR $3; pTaxTypeId ALIAS FOR $4; pDate ALIAS FOR $5; pCurrId ALIAS FOR $6; pAmount ALIAS FOR $7; _qry TEXT; BEGIN IF (pTableName IS NULL) THEN RAISE EXCEPTION 'A table name is required to calculate tax history'; ELSEIF (pParentId IS NULL) THEN RAISE EXCEPTION 'A parent ID is required to calculate tax history'; ELSEIF (pDate IS NULL) THEN RAISE EXCEPTION 'A date is required to calculate tax history'; ELSEIF (pAmount IS NULL) THEN RAISE EXCEPTION 'An amount is required to calculate tax history'; END IF; -- Build a query that deletes any previous tax history for this document record _qry := 'DELETE FROM ' || pTableName || ' WHERE taxhist_parent_id = ' || pParentId || ' AND taxhist_taxtype_id <> getadjustmenttaxtypeid();'; EXECUTE _qry; -- Next, build and execute query that inserts new rows. _qry := 'INSERT INTO ' || pTableName || ' ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate) SELECT ' || pParentId || ','; IF (pTaxTypeId IS NULL) THEN _qry := _qry || 'NULL'; ELSE _qry := _qry || pTaxTypeId; END If; _qry := _qry || ', taxdetail_tax_id,' || pAmount || ', taxdetail_tax_basis_tax_id, taxdetail_taxclass_sequence, taxdetail_taxrate_percent, taxdetail_taxrate_amount, taxdetail_tax, ''' || pDate || ''' FROM calculatetaxdetail(' || COALESCE(pTaxZoneId,-1) || ',' || COALESCE(pTaxTypeId,-1) ||',''' || pDate || ''',' || pCurrId || ',' || pAmount || ');'; EXECUTE _qry; RETURN true; END; $_$; `DROP FUNCTION public.calculatetaxhist(text, integer, integer, integer, date, integer, numeric); publicadminfalse39928 12551681946calcvoucheramt(integer)FUNCTIONCREATE FUNCTION calcvoucheramt(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoucherid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM(COALESCE(vodist_amount, 0)) INTO _amount FROM vodist WHERE (vodist_vohead_id=pVoucherid); RETURN _amount; END; $_$; .DROP FUNCTION public.calcvoucheramt(integer); publicadminfalse8399212551681947calcvoucherfreight(integer)FUNCTIONCREATE FUNCTION calcvoucherfreight(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoucherid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT SUM(COALESCE(voitem_freight, 0)) INTO _amount FROM voitem WHERE (voitem_vohead_id=pVoucherid); RETURN _amount; END; $_$; 2DROP FUNCTION public.calcvoucherfreight(integer); publicadminfalse8399212551681948calcvouchertax(integer)FUNCTIONtCREATE FUNCTION calcvouchertax(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoucherid ALIAS FOR $1; _amount NUMERIC := 0; BEGIN SELECT COALESCE(calculateTax(vohead_taxzone_id, vohead_taxtype_id, vohead_docdate, vohead_curr_id, calcVoucherAmt(vohead_id)), 0) INTO _amount FROM vohead WHERE (vohead_id=pVoucherid); RETURN _amount; END; $_$; .DROP FUNCTION public.calcvouchertax(integer); publicadminfalse83992#12551681949%calcwooperstartstub(integer, integer)FUNCTION"CREATE FUNCTION calcwooperstartstub(integer, integer) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoId ALIAS FOR $1; pBooitemSeqId ALIAS FOR $2; _result DATE; BEGIN IF ( SELECT ((metric_value='t') AND packageIsEnabled('xtmfg')) FROM metric WHERE(metric_name='Routings') ) THEN RETURN xtmfg.calcWooperStart(pWoId, pBooitemSeqId); END IF; RETURN null; END; $_$; <DROP FUNCTION public.calcwooperstartstub(integer, integer); publicadminfalse83992$12551681950cancelbillingselection(integer)FUNCTIONCREATE FUNCTION cancelbillingselection(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; BEGIN IF ( ( SELECT cobmisc_posted FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ) ) THEN RETURN -1; END IF; DELETE FROM cobill WHERE (cobill_cobmisc_id=pCobmiscid); DELETE FROM cobmisc WHERE (cobmisc_id=pCobmiscid); RETURN 1; END; $_$; 6DROP FUNCTION public.cancelbillingselection(integer); publicadminfalse83992'125516819510changeaccountingperioddates(integer, date, date)FUNCTIONCREATE FUNCTION changeaccountingperioddates(integer, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _check INTEGER; _r RECORD; BEGIN -- Check to make sure that the passed period is not closed IF ( ( SELECT period_closed FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Check to make sure that the passed start date does not fall -- into another period SELECT period_id INTO _check FROM period WHERE ( (pStartDate BETWEEN period_start AND period_end) AND (period_id <> pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to make sure that the passed end date does not fall -- into another period SELECT period_id INTO _check FROM period WHERE ( (pEndDate BETWEEN period_start AND period_end) AND (period_id <> pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to make sure that the new passed start and end dates do not -- orphan a posted G/L Transaction SELECT gltrans_id INTO _check FROM gltrans, period WHERE ( (gltrans_date BETWEEN period_start AND period_end) AND (gltrans_posted) AND (NOT (gltrans_date BETWEEN pStartDate AND pEndDate)) AND (period_id=pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; -- Alter the start and end dates of the pass period UPDATE period SET period_start=pStartDate, period_end=pEndDate WHERE (period_id=pPeriodid); -- Post any unposted G/L Transactions into the period FOR _r IN SELECT DISTINCT gltrans_sequence FROM gltrans WHERE ( (NOT gltrans_posted) AND (gltrans_date BETWEEN pStartDate AND pEndDate) ) LOOP PERFORM postIntoTrialBalance(_r.gltrans_sequence); END LOOP; -- All done RETURN 1; END; $_$; GDROP FUNCTION public.changeaccountingperioddates(integer, date, date); publicadminfalse83992+125516819524changeaccountingyearperioddates(integer, date, date)FUNCTION0CREATE FUNCTION changeaccountingyearperioddates(integer, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _check INTEGER; _checkBool BOOLEAN; _r RECORD; BEGIN -- Check to make sure that the passed yearperiod is not closed IF ( ( SELECT yearperiod_closed FROM yearperiod WHERE (yearperiod_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Check to make sure that the passed start date does not fall -- into another yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE ( (pStartDate BETWEEN yearperiod_start AND yearperiod_end) AND (yearperiod_id <> pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to make sure that the passed end date does not fall -- into another yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE ( (pEndDate BETWEEN yearperiod_start AND yearperiod_end) AND (yearperiod_id <> pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to make sure that the passed yearperiod is not closed IF ( ( SELECT (count(period_id) > 0) FROM period WHERE ((period_yearperiod_id=pPeriodid) AND (period_start < pStartDate OR period_end > pEndDate)) ) ) THEN RETURN -4; END IF; -- Make sure that the passed start is prior to the end date SELECT (pStartDate > pEndDate) INTO _checkBool; IF (_checkBool) THEN RETURN -5; END IF; -- Alter the start and end dates of the pass period UPDATE yearperiod SET yearperiod_start=pStartDate, yearperiod_end=pEndDate WHERE (yearperiod_id=pPeriodid); -- All done RETURN 1; END; $_$; KDROP FUNCTION public.changeaccountingyearperioddates(integer, date, date); publicadminfalse83992-12551681953Achangefkeypointers(text, text, integer, integer, text[], boolean)FUNCTIONECREATE FUNCTION changefkeypointers(text, text, integer, integer, text[], boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSchema ALIAS FOR $1; pTable ALIAS FOR $2; pSourceId ALIAS FOR $3; pTargetId ALIAS FOR $4; pIgnore ALIAS FOR $5; _purge BOOLEAN := COALESCE($6, FALSE); _counter INTEGER := 0; _count1 INTEGER := 0; _fk RECORD; _pk TEXT[]; BEGIN -- for all foreign keys that point to pSchema.pTable FOR _fk IN EXECUTE 'SELECT fkeyns.nspname AS schemaname, fkeytab.relname AS tablename, conkey, attname, typname FROM pg_constraint JOIN pg_class basetab ON (confrelid=basetab.oid) JOIN pg_namespace basens ON (basetab.relnamespace=basens.oid) JOIN pg_class fkeytab ON (conrelid=fkeytab.oid) JOIN pg_namespace fkeyns ON (fkeytab.relnamespace=fkeyns.oid) JOIN pg_attribute ON (attrelid=conrelid AND attnum=conkey[1]) JOIN pg_type ON (atttypid=pg_type.oid) WHERE basetab.relname = ' || quote_literal(pTable) || ' AND basens.nspname = ' || quote_literal(pSchema) || ' AND fkeytab.relname NOT IN (''' || ARRAY_TO_STRING(pIgnore, ''', ''') || ''')' LOOP IF (ARRAY_UPPER(_fk.conkey, 1) > 1) THEN RAISE EXCEPTION 'Cannot change the foreign key in %.% that refers to %.% because the foreign key constraint has multiple columns. [xtuple: changefkeypointers, -1, %.%, %.%]', _fk.schemaname, _fk.tablename, pSchema, pTable, _fk.schemaname, _fk.tablename, pSchema, pTable; END IF; -- optionally make a backup copy of the data IF (NOT _purge) THEN -- determine the primary key column of the fkey table _pk := primaryKeyFields(_fk.schemaname, _fk.tablename); IF (ARRAY_UPPER(_pk, 1) > 1) THEN RAISE EXCEPTION 'Cannot change foreign key references in %.% because it has a composite primary key. Try setting the purge option. [xtuple: changefkeypointers, -4, %.%]', _fk.schemaname, _fk.tablename, _fk.schemaname, _fk.tablename; END IF; -- make the backup copy EXECUTE 'INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT ' || quote_literal(_fk.schemaname) || ', ' || quote_literal(_fk.tablename) || ', ' || quote_literal(_pk[1]) || ', ' || _pk[1] || ', ' || quote_literal(_fk.attname) || ', ' || _fk.attname || ', ' || quote_literal(_fk.typname) || ', ' || quote_literal(pSchema) || ', ' || quote_literal(pTable) || ', ' || pTargetId || ' FROM ' || _fk.schemaname || '.' || _fk.tablename || ' WHERE ('|| _fk.attname || '=' || pSourceId || ');'; END IF; -- actually change the foreign keys to point to the desired base table record EXECUTE 'UPDATE ' || _fk.schemaname || '.' || _fk.tablename || ' SET ' || _fk.attname || '=' || pTargetId || ' WHERE (' || _fk.attname || '=' || pSourceId || ');'; GET DIAGNOSTICS _count1 = ROW_COUNT; _counter := _counter + _count1; END LOOP; RETURN _counter; END; $_$; XDROP FUNCTION public.changefkeypointers(text, text, integer, integer, text[], boolean); publicadminfalse39928!00JFUNCTION changefkeypointers(text, text, integer, integer, text[], boolean)COMMENTCOMMENT ON FUNCTION changefkeypointers(text, text, integer, integer, text[], boolean) IS 'Change the data in all tables with foreign key relationships so they point to the pSchema.pTable record with primary key pTargetId instead of the record with primary key pSourceId. Ignore any tables listed in pIgnore. If the final arg is TRUE, make a backup copy of the original data in the mrgundo table.'; publicadminfalse1069.12551681954"changepoitemduedate(integer, date)FUNCTION:CREATE FUNCTION changepoitemduedate(ppoitemid integer, pdate date) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN changePoitemDueDate(pPoitemid, pDate, false); END; $$; IDROP FUNCTION public.changepoitemduedate(ppoitemid integer, pdate date); publicadminfalse3992812551989114+changepoitemduedate(integer, date, boolean)FUNCTIONCREATE FUNCTION changepoitemduedate(ppoitemid integer, pdate date, pbyso boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF ( ( SELECT (poitem_status IN ('C')) FROM poitem WHERE (poitem_id=pPoitemid) ) ) THEN RETURN -1; END IF; UPDATE poitem SET poitem_duedate=pDate WHERE (poitem_id=pPoitemid); IF (pBySO) THEN --Generate the PoItemUpdatedBySo event INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', poitem_id, itemsite_warehous_id, (pohead_number || '-'|| poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id=evnttype_id) JOIN itemsite ON (evntnot_warehous_id=itemsite_warehous_id) JOIN item ON (itemsite_item_id=item_id) JOIN poitem ON (poitem_itemsite_id=itemsite_id) JOIN pohead ON (poitem_pohead_id=pohead_id) WHERE( (poitem_id=pPoitemid) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='PoItemUpdatedBySo') ); END IF; RETURN pPoitemid; END; $$; XDROP FUNCTION public.changepoitemduedate(ppoitemid integer, pdate date, pbyso boolean); publicadminfalse3992812551681955!changepoitemqty(integer, numeric)FUNCTION3CREATE FUNCTION changepoitemqty(ppoitemid integer, pqty numeric) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN changePoitemQty(pPoitemid, pQty, false); END; $$; GDROP FUNCTION public.changepoitemqty(ppoitemid integer, pqty numeric); publicadminfalse8399212551989115*changepoitemqty(integer, numeric, boolean)FUNCTIONCREATE FUNCTION changepoitemqty(ppoitemid integer, pqty numeric, pbyso boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN IF ( ( SELECT (poitem_status IN ('C')) FROM poitem WHERE (poitem_id=pPoitemid) ) ) THEN RETURN -1; END IF; UPDATE poitem SET poitem_qty_ordered=pQty WHERE (poitem_id=pPoitemid); IF (pBySO) THEN --Generate the PoItemUpdatedBySo event INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', poitem_id, itemsite_warehous_id, (pohead_number || '-'|| poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id=evnttype_id) JOIN itemsite ON (evntnot_warehous_id=itemsite_warehous_id) JOIN item ON (itemsite_item_id=item_id) JOIN poitem ON (poitem_itemsite_id=itemsite_id) JOIN pohead ON (poitem_pohead_id=pohead_id) WHERE( (poitem_id=pPoitemid) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='PoItemUpdatedBySo') ); END IF; RETURN pPoitemid; END; $$; VDROP FUNCTION public.changepoitemqty(ppoitemid integer, pqty numeric, pbyso boolean); publicadminfalse39928/12551681956changeprdate(integer, date)FUNCTIONpCREATE FUNCTION changeprdate(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrid ALIAS FOR $1; pDueDate ALIAS FOR $2; BEGIN UPDATE pr SET pr_duedate=pDueDate WHERE (pr_id=pPrid); RETURN 0; END; $_$; 2DROP FUNCTION public.changeprdate(integer, date); publicadminfalse83992012551681957changeprqty(integer, numeric)FUNCTIONlCREATE FUNCTION changeprqty(integer, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrid ALIAS FOR $1; pQty ALIAS FOR $2; BEGIN UPDATE pr SET pr_qtyreq=pQty WHERE (pr_id=pPrid); RETURN TRUE; END; $_$; 4DROP FUNCTION public.changeprqty(integer, numeric); publicadminfalse39928 12551681958changeprqty(integer, date)FUNCTIONCREATE FUNCTION changeprqty(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pPrid ALIAS FOR $1; pDueDate ALIAS FOR $2; BEGIN UPDATE pr SET pr_duedate=pDueDate WHERE (pr_id=pPrid); RETURN 0; END; $_$; 1DROP FUNCTION public.changeprqty(integer, date); publicadminfalse39928212551681959]changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean)FUNCTIONC CREATE FUNCTION changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSchema ALIAS FOR $1; pTable ALIAS FOR $2; pFkeyCol ALIAS FOR $3; pSourceId ALIAS FOR $4; pBaseSchema ALIAS FOR $5; pBaseTable ALIAS FOR $6; pTargetId ALIAS FOR $7; pTypeCol ALIAS FOR $8; pType ALIAS FOR $9; _purge BOOLEAN := COALESCE($10, FALSE); _counter INTEGER := 0; _coltype TEXT; _pk TEXT[]; BEGIN IF (NOT _purge) THEN EXECUTE 'SELECT typname FROM pg_type JOIN pg_attribute ON (pg_type.oid=atttypid) JOIN pg_class ON (attrelid=pg_class.oid) JOIN pg_namespace ON (relnamespace=pg_namespace.oid) WHERE (relname=' || quote_literal(pTable) || ') AND (nspname=' || quote_literal(pSchema) || ') AND (attname=' || quote_literal(pFkeyCol) || ')' INTO _coltype; _pk := primaryKeyFields(pSchema, pTable); IF (ARRAY_UPPER(_pk, 1) > 1) THEN RAISE EXCEPTION 'Cannot change pseudo-foreign key references in %.% because it has a composite primary key. Try setting the purge option. [xtuple: changepseudofkeypointers, -1, %.%', pSchema, pTable, pSchema, pTable; END IF; EXECUTE 'INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT ' || quote_literal(pSchema) || ', ' || quote_literal(pTable) || ', ' || quote_literal(_pk[1]) || ', ' || quote_ident(_pk[1]) || ', ' || quote_literal(pFkeyCol) || ', ' || quote_ident(pFkeyCol) || ', ' || quote_literal(_coltype) || ', ' || quote_literal(pBaseSchema) || ', ' || quote_literal(pBaseTable) || ', ' || pTargetId || ' FROM ' || quote_ident(pSchema) || '.' || quote_ident(pTable) || ' WHERE (('|| quote_ident(pFkeyCol) || '=' || pSourceId || ') AND ('|| quote_ident(pTypeCol) || '=' || quote_literal(pType) || '));'; END IF; -- actually change the foreign keys to point to the desired base table record EXECUTE 'UPDATE ' || quote_ident(pSchema) || '.' || quote_ident(pTable) || ' SET ' || quote_ident(pFkeyCol) || '=' || pTargetId || ' WHERE ((' || quote_ident(pFkeyCol) || '=' || pSourceId || ') AND (' || quote_ident(pTypeCol) || '=' || quote_literal(pType) || '));'; GET DIAGNOSTICS _counter = ROW_COUNT; RETURN _counter; END; $_$; tDROP FUNCTION public.changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean); publicadminfalse83992!00fFUNCTION changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean)COMMENTCOMMENT ON FUNCTION changepseudofkeypointers(text, text, text, integer, text, text, integer, text, text, boolean) IS 'Change the data in pSchema.pTable with a pseudo-foreign key relationship to another (unnamed) table. Make pSchema.pTable point to the record with primary key pTargetId instead of the record with primary key pSourceId. pSchema.pTable cannot have a true foreign key relationship because it holds data that can point to any of several tables. The pType value in the pTypeCol column describes which table the data refer to (e.g. "T" may indicate that the current record refers to a "cntct"). If the final arg is TRUE, make a backup copy of the data in the mrgundo table.'; publicadminfalse1074:12551681960+changewodates(integer, date, date, boolean)FUNCTIONC CREATE FUNCTION changewodates(integer, date, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pStartDate ALIAS FOR $2; pDueDate ALIAS FOR $3; changeChildren ALIAS FOR $4; _p RECORD; returnCode INTEGER; _vtemp NUMERIC; BEGIN SELECT wo_status, wo_startdate, itemsite_warehous_id INTO _p FROM wo Inner Join itemsite on wo_itemsite_id=itemsite_id WHERE (wo_id=pWoid); IF (_p.wo_status = 'C') THEN returnCode := 0; ELSIF (_p.wo_status IN ('R','I')) THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_olddate, evntlog_newdate) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', wo_id, itemsite_warehous_id, formatWoNumber(wo_id), wo_duedate, pDueDate FROM evntnot, evnttype, itemsite, item, wo WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (evnttype_name='RWoDueDateRequestChange') AND (wo_id=pWoid) ); returnCode := 0; END IF; -- Reschedule operations if routings enabled IF (fetchMetricBool('Routings')) THEN -- Reschedule wooper IF (fetchMetricBool('UseSiteCalendar')) THEN UPDATE xtmfg.wooper SET wooper_scheduled = calculatenextworkingdate(itemsite_warehous_id,DATE(pStartDate), CAST(calculateworkdays(itemsite_warehous_id, DATE(wo_startdate), DATE(wooper_scheduled)) as INTEGER)) FROM wo JOIN itemsite ON (wo_itemsite_id=itemsite_id) WHERE ( (wooper_wo_id=wo_id) AND (wo_id=pWoid) ); ELSE UPDATE xtmfg.wooper SET wooper_scheduled = (wooper_scheduled::DATE + (pStartDate - wo_startdate)) FROM wo WHERE ( (wooper_wo_id=wo_id) AND (wo_id=pWoid) ); END IF; -- Reschedule any womatl that is linked to wooper items -- and is set to be scheduled with the wooper in question UPDATE womatl SET womatl_duedate=wooper_scheduled FROM xtmfg.wooper WHERE ( (womatl_schedatwooper) AND (womatl_wooper_id=wooper_id) AND (womatl_wo_id=pWoid) ); END IF; -- Reschedule any womatl that is not linked to wooper items UPDATE womatl SET womatl_duedate=pStartDate WHERE ( (NOT womatl_schedatwooper) AND (womatl_wo_id=pWoid) ); -- Reschedule the W/O UPDATE wo SET wo_startdate=pStartDate, wo_duedate=pDueDate WHERE (wo_id=pWoid); -- Do the same for the children IF (changeChildren) THEN SELECT MAX(changeWoDates(wo_id, (pStartDate - itemsite_leadtime), pStartDate, TRUE)) INTO returnCode FROM wo, itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (wo_ordtype='W') AND (wo_ordid=pWoid) ); END IF; IF (returnCode IS NULL) THEN returnCode := 0; END IF; RETURN returnCode; END; $_$; BDROP FUNCTION public.changewodates(integer, date, date, boolean); publicadminfalse83992;12551681961*changewoproject(integer, integer, boolean)FUNCTIONCREATE FUNCTION changewoproject(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pPrjid ALIAS FOR $2; changeChildren ALIAS FOR $3; woStatus CHAR(1); _result INTEGER; BEGIN SELECT wo_status INTO woStatus FROM wo WHERE (wo_id=pWoid); UPDATE wo SET wo_prj_id=pPrjid WHERE (wo_id=pWoid); IF (woStatus = 'E' AND changeChildren) THEN _result := ( SELECT MIN(changeWoProject(wo_id, pPrjid, TRUE)) FROM womatl, wo WHERE ((womatl_itemsite_id=wo_itemsite_id) AND (wo_ordtype='W') AND (womatl_wo_id=pWoid) AND (wo_ordid=pWoid)) ); UPDATE pr SET pr_prj_id=pPrjid FROM womatl WHERE ((womatl_wo_id=pWoid) AND (pr_order_type='W') AND (pr_order_id=womatl_id)); ELSE _result = 1; END IF; RETURN _result; END; $_$; ADROP FUNCTION public.changewoproject(integer, integer, boolean); publicadminfalse83992<12551681962&changewoqty(integer, numeric, boolean)FUNCTION CREATE FUNCTION changewoqty(integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pQty ALIAS FOR $2; changeChildren ALIAS FOR $3; _r RECORD; _result INTEGER := 1; BEGIN SELECT wo_qtyord, wo_status, item_fractional INTO _r FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE (wo_id=pWoid); IF (_r.wo_qtyord = pQty) THEN RETURN 0; END IF; IF (NOT _r.wo_status IN ('O','E','R','I')) THEN RETURN 1; END IF; IF (_r.wo_status IN ('R','I')) THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number, evntlog_oldvalue, evntlog_newvalue) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', wo_id, itemsite_warehous_id, formatWoNumber(wo_id), wo_qtyord, pQty FROM evntnot, evnttype, itemsite, item, wo WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (evnttype_name='RWoQtyRequestChange') AND (wo_id=pWoid) ); _result = 0; END IF; UPDATE wo SET wo_qtyord=roundQty(_r.item_fractional, pQty) WHERE (wo_id=pWoid); UPDATE womatl SET womatl_qtyreq=(womatl_qtyfxd + wo_qtyord * womatl_qtyper) * (1 + womatl_scrap) FROM wo, itemsite WHERE ((womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (wo_id=pWoid)); IF (fetchMetricBool('Routings')) THEN UPDATE xtmfg.wooper SET wooper_rntime = CASE WHEN ((booitem_rnqtyper = 0) OR (booitem_invproduomratio = 0)) THEN 0 WHEN (NOT booitem_rnrpt) THEN 0 ELSE ( ( booitem_rntime / booitem_rnqtyper / booitem_invproduomratio ) * wo_qtyord ) END FROM xtmfg.booitem, wo WHERE ((wooper_wo_id=wo_id) AND (wooper_booitem_id=booitem_id) AND (wo_id=pWoid)); END IF; IF (changeChildren) THEN _result := ( SELECT MIN(changeWoQty(wo_id, womatl_qtyreq, TRUE)) FROM womatl, wo WHERE ((womatl_itemsite_id=wo_itemsite_id) AND (wo_ordtype='W') AND (womatl_wo_id=pWoid) AND (wo_ordid=pWoid)) ); END IF; RETURN _result; END; $_$; =DROP FUNCTION public.changewoqty(integer, numeric, boolean); publicadminfalse39928=125516819632characteristicstostring(text, integer, text, text)FUNCTION]CREATE FUNCTION characteristicstostring(text, integer, text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetId ALIAS FOR $2; pValKeySep ALIAS FOR $3; pPairSep ALIAS FOR $4; _string TEXT := ''; _extra BOOLEAN := false; _r RECORD; BEGIN FOR _r IN SELECT char_name, charass_value FROM charass, char WHERE ((charass_char_id=char_id) AND (charass_target_type=pTargetType) AND (charass_target_id=pTargetId)) LOOP IF(_extra) THEN _string := _string || pPairSep; END IF; _extra := true; _string := _string || _r.char_name || pValKeySep || _r.charass_value; END LOOP; RETURN _string; END; $_$; IDROP FUNCTION public.characteristicstostring(text, integer, text, text); publicadminfalse83992?12551681964!checkcreditmemositeprivs(integer)FUNCTIONCREATE FUNCTION checkcreditmemositeprivs(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT cmitem_id FROM cmitem JOIN itemsite ON (itemsite_id=cmitem_itemsite_id) WHERE ( (cmitem_cmhead_id=pCmheadid) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; 8DROP FUNCTION public.checkcreditmemositeprivs(integer); publicadminfalse3992812551681965&checkdetailformatted(integer, integer)FUNCTION|"CREATE FUNCTION checkdetailformatted(integer, integer) RETURNS SETOF checkdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckheadid ALIAS FOR $1; pMaxLines ALIAS FOR $2; _row checkdata%ROWTYPE; _checkhead RECORD; _checkdetail RECORD; _rowcount INTEGER := 0; _page INTEGER := 1; _docnumber TEXT := ''; _docreference TEXT := ''; _docdate TEXT := ''; _docamount TEXT := ''; _docdiscount TEXT := ''; _docnetamount TEXT := ''; BEGIN -- Check header information SELECT checkhead_number AS checknumber, INITCAP(spellAmount(checkhead_amount, curr_id)) AS checkwords, formatDate(checkhead_checkdate) AS checkdate, formatMoney(checkhead_amount) AS checkamount, curr_symbol AS checkcurrsymbol, curr_abbr AS checkcurrabbr, curr_name AS checkcurrname, CASE WHEN checkhead_recip_type = 'C' THEN (SELECT cust_name FROM custinfo WHERE cust_id=checkhead_recip_id) WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_name FROM taxauth WHERE taxauth_id=checkhead_recip_id) WHEN checkhead_recip_type = 'V' THEN COALESCE((SELECT vendaddr_name FROM vendaddrinfo WHERE((UPPER(vendaddr_code)='REMIT') AND (vendaddr_vend_id=checkhead_recip_id))), (SELECT vend_name FROM vendinfo WHERE(vend_id=checkhead_recip_id))) END AS checkpayto, formatAddr(CASE WHEN checkhead_recip_type = 'C' THEN (SELECT cntct_addr_id FROM cntct, custinfo WHERE((cust_cntct_id=cntct_id) AND (cust_id=checkhead_recip_id))) WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_addr_id FROM taxauth WHERE(taxauth_id=checkhead_recip_id)) WHEN checkhead_recip_type = 'V' THEN COALESCE((SELECT vendaddr_addr_id FROM vendaddrinfo WHERE((UPPER(vendaddr_code)='REMIT') AND (vendaddr_vend_id=checkhead_recip_id))), (SELECT vend_addr_id FROM vendinfo WHERE(vend_id=checkhead_recip_id))) END) AS checkaddress, checkhead_for AS checkmemo INTO _checkhead FROM checkhead, curr_symbol WHERE((checkhead_curr_id = curr_id) AND (checkhead_id=pCheckheadid) ); IF (NOT FOUND) THEN RETURN; END IF; _row.checkdata_page := _page; _row.checkdata_checknumber := _checkhead.checknumber; _row.checkdata_checkwords := _checkhead.checkwords; _row.checkdata_checkdate := _checkhead.checkdate; _row.checkdata_checkamount := _checkhead.checkamount; _row.checkdata_checkcurrsymbol := _checkhead.checkcurrsymbol; _row.checkdata_checkcurrabbr := _checkhead.checkcurrabbr; _row.checkdata_checkcurrname := _checkhead.checkcurrname; _row.checkdata_checkpayto := _checkhead.checkpayto; _row.checkdata_checkaddress := _checkhead.checkaddress; _row.checkdata_checkmemo := _checkhead.checkmemo; -- Check item details FOR _checkdetail IN SELECT --VOUCHER------------- 1 AS ord, 1 AS sequence_value, checkitem_invcnumber, checkitem_ponumber, formatMoney(checkitem_amount) AS docnetamount, 'Invoice#: ' || vohead_invcnumber AS docnumber, formatDate(vohead_docdate) AS docdate, vohead_reference AS docreference, 'Voucher: ' || checkitem_vouchernumber AS vouchernumber, formatMoney(apopen_amount) AS docamount, formatMoney(checkitem_discount) AS docdiscount FROM checkitem, vohead, apopen WHERE ((checkitem_checkhead_id=pCheckheadid) AND (checkitem_vouchernumber = vohead_number) AND (apopen_docnumber = checkitem_vouchernumber) AND (apopen_doctype = 'V')) UNION SELECT --DEBIT MEMO ------------------------- 2 AS ord, 1 AS sequence_value, checkitem_invcnumber, checkitem_ponumber, formatMoney(checkitem_amount) AS f_amount, 'Debit Memo PO#: ' || checkitem_ponumber AS doc_number, '' AS f_docdate, 'Debit Memo: ' || checkitem_vouchernumber AS doc_reference, checkitem_vouchernumber AS vouchernumber, formatMoney(apopen_amount) AS amount, formatMoney(checkitem_discount) AS disc_cred FROM checkitem, apopen WHERE ((checkitem_checkhead_id=pCheckheadid) AND (checkitem_vouchernumber = apopen_docnumber) AND (apopen_doctype = 'D')) UNION SELECT --CREDITs-------------------------- 3 AS ord, 1 AS sequence_value, checkitem_invcnumber, checkitem_ponumber, formatMoney(checkitem_amount) AS f_amount, 'Invoice#: ' || vohead_invcnumber AS doc_number, formatDate(vohead_docdate) AS f_docdate, 'Credit Applied: ' || apapply_source_doctype || ' ' || apapply_source_docnumber AS doc_reference, 'Voucher ' || checkitem_vouchernumber AS vouchernumber, '' AS amount, formatMoney((apapply_amount)) AS disc_cred FROM checkitem, vohead, apapply WHERE ((checkitem_checkhead_id=pCheckheadid) AND (checkitem_vouchernumber = vohead_number) AND (apapply_target_docnumber = checkitem_vouchernumber )) UNION SELECT --NON-VENDOR----------------------- 4 AS ord, 1 AS sequence_value, checkitem_invcnumber, checkitem_ponumber, formatMoney(checkitem_amount) AS f_amount, checkitem_invcnumber AS doc_number, formatDate(checkitem_docdate) AS f_docdate, '' AS doc_reference, '' AS vouchernumber, '' AS amount, '' AS disc_cred FROM checkhead LEFT OUTER JOIN checkitem ON (checkitem_checkhead_id=checkhead_id) WHERE ((checkhead_id=pCheckheadid) AND (checkhead_recip_type != 'V')) LOOP IF (_rowcount = pMaxLines) THEN _row.checkdata_docnumber := _docnumber; _row.checkdata_docreference := _docreference; _row.checkdata_docdate := _docdate; _row.checkdata_docamount := _docamount; _row.checkdata_docdiscount := _docdiscount; _row.checkdata_docnetamount := _docnetamount; RETURN NEXT _row; -- update/reset some variables _rowcount = 0; _page := _page + 1; _docnumber := ''; _docreference := ''; _docdate := ''; _docamount := ''; _docdiscount := ''; _docnetamount := ''; _row.checkdata_page := _page; _row.checkdata_checknumber := _checkhead.checknumber; _row.checkdata_checkwords := 'VOID VOID PAGE '||_page||' OF CHECK #'||_checkhead.checknumber||' VOID VOID'; _row.checkdata_checkdate := 'VOID VOID VOID'; _row.checkdata_checkamount := 'VOID VOID VOID'; --_row.checkdata_checkcurrsymbol := _checkhead.checkcurrsymbol; --_row.checkdata_checkcurrabbr := _checkhead.checkcurrabbr; --_row.checkdata_checkcurrname := _checkhead.checkcurrname; _row.checkdata_checkpayto := 'VOID VOID VOID'; --_row.checkdata_checkaddress := _checkhead.checkaddress; _row.checkdata_checkmemo := 'VOID VOID PAGE '||_page||' OF CHECK #'||_checkhead.checknumber||' VOID VOID'; END IF; _rowcount := _rowcount + 1; _docnumber := _docnumber || _checkdetail.docnumber || E'\n'; _docreference := _docreference || _checkdetail.docreference || E'\n'; _docdate := _docdate || _checkdetail.docdate || E'\n'; _docamount := _docamount || _checkdetail.docamount || E'\n'; _docdiscount := _docdiscount || _checkdetail.docdiscount || E'\n'; _docnetamount := _docnetamount || _checkdetail.docnetamount || E'\n'; END LOOP; _row.checkdata_docnumber := _docnumber; _row.checkdata_docreference := _docreference; _row.checkdata_docdate := _docdate; _row.checkdata_docamount := _docamount; _row.checkdata_docdiscount := _docdiscount; _row.checkdata_docnetamount := _docnetamount; RETURN NEXT _row; RETURN; END; $_$; =DROP FUNCTION public.checkdetailformatted(integer, integer); publicadminfalse83992258512551681967checkinvoicesiteprivs(integer)FUNCTIONCREATE FUNCTION checkinvoicesiteprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT invcitem_id FROM invcitem WHERE ( (invcitem_invchead_id=pInvcheadid) AND (invcitem_warehous_id <> -1) AND (invcitem_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; 5DROP FUNCTION public.checkinvoicesiteprivs(integer); publicadminfalse83992@12551681968checkpositeprivs(integer)FUNCTIONWCREATE FUNCTION checkpositeprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT poitem_id FROM poitem, itemsite WHERE ( (poitem_pohead_id=pPoheadid) AND (poitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT pohead_warehous_id FROM pohead WHERE ( (pohead_id=pPoheadid) AND (pohead_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; 0DROP FUNCTION public.checkpositeprivs(integer); publicadminfalse83992C12551681969checkprivilege(text)FUNCTIONCREATE FUNCTION checkprivilege(text) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrivilege ALIAS FOR $1; _result TEXT; BEGIN SELECT priv_id INTO _result FROM priv, grppriv, usrgrp WHERE((usrgrp_grp_id=grppriv_grp_id) AND (grppriv_priv_id=priv_id) AND (priv_name=pPrivilege) AND (usrgrp_username=getEffectiveXtUser())); IF (FOUND) THEN RETURN true; END IF; SELECT priv_id INTO _result FROM priv, usrpriv WHERE ((priv_id=usrpriv_priv_id) AND (priv_name=pPrivilege) AND (usrpriv_username=getEffectiveXtUser())); IF (FOUND) THEN RETURN true; ELSE RETURN false; END IF; END; $_$; +DROP FUNCTION public.checkprivilege(text); publicadminfalse8399212551681970checkquotesiteprivs(integer)FUNCTIONHCREATE FUNCTION checkquotesiteprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; BEGIN RETURN checkQuoteSitePrivs(pQuheadid, NULL); END; $_$; 3DROP FUNCTION public.checkquotesiteprivs(integer); publicadminfalse83992H12551681971%checkquotesiteprivs(integer, integer)FUNCTIONCREATE FUNCTION checkquotesiteprivs(integer, integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pWarehousid ALIAS FOR $2; _result INTEGER := 0; BEGIN -- RAISE NOTICE 'checkQuoteSitePrivs, pQuheadid = %', pQuheadid; -- RAISE NOTICE 'checkQuoteSitePrivs, pWarehousid = %', pWarehousid; IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF ( (NOT fetchUsrPrefBool('selectedSites')) AND (pWarehousid IS NULL) ) THEN RETURN true; END IF; IF (pWarehousid IS NULL) THEN SELECT COALESCE(COUNT(*), 0) INTO _result FROM quitem JOIN itemsite ON (itemsite_id=quitem_itemsite_id) JOIN site() ON (warehous_id=itemsite_warehous_id) WHERE (quitem_quhead_id=pQuheadid); ELSE SELECT COALESCE(COUNT(*), 0) INTO _result FROM quitem JOIN itemsite ON (itemsite_id=quitem_itemsite_id) JOIN site() ON (warehous_id=itemsite_warehous_id) WHERE ( (quitem_quhead_id=pQuheadid) AND (itemsite_warehous_id=pWarehousid) ); END IF; IF (_result > 0) THEN RETURN true; END IF; RETURN false; END; $_$; <DROP FUNCTION public.checkquotesiteprivs(integer, integer); publicadminfalse83992I12551681972checkrasiteprivs(integer)FUNCTIONCREATE FUNCTION checkrasiteprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pRaheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT raitem_id FROM raitem, itemsite WHERE ( (raitem_rahead_id=pRaheadid) AND (raitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT raitem_id FROM raitem, itemsite WHERE ( (raitem_rahead_id=pRaheadid) AND (raitem_coitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; 0DROP FUNCTION public.checkrasiteprivs(integer); publicadminfalse83992J12551681973checkshipmentsiteprivs(integer)FUNCTION$CREATE FUNCTION checkshipmentsiteprivs(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT coitem_id FROM shipitem, coitem, itemsite WHERE ( (shipitem_shiphead_id=pShipheadid) AND (coitem_id=shipitem_orderitem_id) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT cohead_warehous_id FROM shipitem, coitem, cohead WHERE ( (shipitem_shiphead_id=pShipheadid) AND (coitem_id=shipitem_orderitem_id) AND (cohead_id=coitem_cohead_id) AND (cohead_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; 6DROP FUNCTION public.checkshipmentsiteprivs(integer); publicadminfalse83992L12551681974checksositeprivs(integer)FUNCTIONWCREATE FUNCTION checksositeprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT coitem_id FROM coitem, itemsite WHERE ( (coitem_cohead_id=pSoheadid) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT cohead_warehous_id FROM cohead WHERE ( (cohead_id=pSoheadid) AND (cohead_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; 0DROP FUNCTION public.checksositeprivs(integer); publicadminfalse83992M12551681975checkvouchersiteprivs(integer)FUNCTIONCREATE FUNCTION checkvouchersiteprivs(integer) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoheadid ALIAS FOR $1; _check BOOLEAN; _result INTEGER; BEGIN IF (NOT fetchMetricBool('MultiWhs')) THEN RETURN true; END IF; IF (NOT fetchUsrPrefBool('selectedSites')) THEN RETURN true; END IF; SELECT COALESCE(COUNT(*), 0) INTO _result FROM ( SELECT voitem_id FROM voitem, poitem, itemsite WHERE ( (voitem_vohead_id=pVoheadid) AND (poitem_id=voitem_poitem_id) AND (poitem_itemsite_id=itemsite_id) AND (itemsite_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) UNION SELECT pohead_warehous_id FROM vohead, pohead WHERE ( (vohead_id=pVoheadid) AND (pohead_id=vohead_pohead_id) AND (pohead_warehous_id NOT IN (SELECT usrsite_warehous_id FROM usrsite WHERE (usrsite_username=getEffectiveXtUser()))) ) ) AS data; IF (_result > 0) THEN RETURN false; END IF; RETURN true; END; $_$; 5DROP FUNCTION public.checkvouchersiteprivs(integer); publicadminfalse83992Z12551681976clearnumberissue(text, integer)FUNCTIONqCREATE FUNCTION clearnumberissue(psequence text, pnumber integer) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE __seqiss seqiss[]; __newiss seqiss[] := ARRAY[]::seqiss[]; _i INTEGER; _result BOOLEAN := FALSE; _interval TEXT := fetchMetricText('NumberIssueResetIntervalDays') || ' day'; _number INTEGER; BEGIN -- get the sequence to update SELECT orderseq_seqiss INTO __seqiss FROM orderseq WHERE (orderseq_name=psequence); IF (NOT FOUND) THEN RAISE EXCEPTION 'Invalid orderseq_name %', psequence; END IF; IF(ARRAY_LENGTH(COALESCE(__seqiss,__newiss),1) IS NULL) THEN RETURN FALSE; END IF; -- build a new array sans the number we are releasing FOR _i IN 1..ARRAY_LENGTH(__seqiss,1) LOOP IF((__seqiss[_i]).seqiss_number = pnumber) THEN _result = TRUE; -- don't bother re-adding stale numbers ELSIF (now() - _interval::INTERVAL > (__seqiss[_i]).seqiss_time) THEN IF (_number IS NULL) THEN _number := (__seqiss[_i]).seqiss_number; ELSE _number := LEAST((__seqiss[_i]).seqiss_number, _number); END IF; ELSE __newiss := __newiss || __seqiss[_i]; END IF; END LOOP; -- update the order sequence with the result UPDATE orderseq SET orderseq_seqiss = __newiss WHERE (orderseq_name=psequence); -- reset to any cleared stale number IF(_number IS NOT NULL) THEN UPDATE orderseq SET orderseq_number = _number WHERE (orderseq_name=psequence); END IF; RETURN _result; END; $$; HDROP FUNCTION public.clearnumberissue(psequence text, pnumber integer); publicadminfalse83992[12551681977clearnumberissue(text, text)FUNCTIONCREATE FUNCTION clearnumberissue(psequence text, pnumber text) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _castpnumber INTEGER; BEGIN -- for now, order numbers in the database are text but usually -- string representations of integers. allow for the occasional non-integer. BEGIN _castpnumber := CAST(pnumber AS INTEGER); EXCEPTION WHEN cannot_coerce OR invalid_text_representation THEN RAISE DEBUG 'clearNumberIssue(%, %) received an unexpected pnumber', psequence, pnumber; RETURN FALSE; END; RETURN clearNumberIssue(psequence, _castpnumber); END; $$; EDROP FUNCTION public.clearnumberissue(psequence text, pnumber text); publicadminfalse83992\12551681978clearpayment(integer)FUNCTIONTCREATE FUNCTION clearpayment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApselectid ALIAS FOR $1; BEGIN DELETE FROM apselect WHERE (apselect_id=pApselectid); RETURN 1; END; $_$; ,DROP FUNCTION public.clearpayment(integer); publicadminfalse83992c12551681979closeaccountingperiod(integer)FUNCTION?CREATE FUNCTION closeaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _r RECORD; _nextPeriodid INTEGER; _trialbalid INTEGER; _ending NUMERIC; _currYear INTEGER; _nextYear INTEGER; BEGIN -- Bypass error checking is this the the initial period IF ( NOT ( SELECT period_initial FROM period WHERE (period_id=pPeriodid) ) ) THEN -- Check to make use that the period is not already closed IF ( ( SELECT period_closed FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Make sure that the day before this period belongs to another period SELECT prev.period_id AS periodid, prev.period_closed AS closed INTO _r FROM period AS prev, period AS curr WHERE ( (prev.period_end = (curr.period_start - 1)) AND (curr.period_id=pPeriodid) ); IF (NOT FOUND) THEN RETURN -2; END IF; -- Make sure that the previous period is closed IF (NOT _r.closed) THEN RETURN -3; END IF; END IF; -- Make sure that there the next period is defined SELECT next.period_id INTO _nextPeriodid FROM period AS next, period AS curr WHERE ( (next.period_start = (curr.period_end + 1)) AND (curr.period_id=pPeriodid) ); IF (NOT FOUND) THEN RETURN -4; END IF; -- Make sure that the user is not trying to prematurely close the Period IF ( ( SELECT (period_end >= CURRENT_DATE) FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -5; END IF; SELECT yearperiod_id INTO _currYear FROM yearperiod, period WHERE ((period_end BETWEEN yearperiod_start and yearperiod_end) AND (period_id=pPeriodid)); IF (NOT FOUND) THEN _currYear := -1; END IF; SELECT yearperiod_id INTO _nextYear FROM yearperiod, period WHERE ((period_end BETWEEN yearperiod_start and yearperiod_end) AND (period_id=_nextPeriodid)); IF (NOT FOUND) THEN RETURN -6; END IF; -- Walk through the entire COA, calculating the ending balance and pushing -- it to the beginning balance for the next period FOR _r IN SELECT accnt_id, accnt_type IN ('E', 'R') AS revexp, trialbal_id, trialbal_beginning, trialbal_credits, trialbal_debits FROM accnt LEFT OUTER JOIN trialbal ON ( (trialbal_accnt_id=accnt_id) AND (trialbal_period_id=pPeriodid) ) ORDER BY accnt_id LOOP IF (_r.trialbal_id IS NULL) THEN _ending = 0; INSERT INTO trialbal ( trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_dirty, trialbal_credits, trialbal_debits ) VALUES ( pPeriodid, _r.accnt_id, 0, 0, FALSE, 0, 0 ); ELSE _ending = (_r.trialbal_beginning - _r.trialbal_debits + _r.trialbal_credits); UPDATE trialbal SET trialbal_ending=_ending, trialbal_dirty = FALSE WHERE (trialbal_id=_r.trialbal_id); PERFORM forwardUpdateTrialBalance(_r.trialbal_id); END IF; IF (_r.revexp AND _currYear != _nextYear) THEN _ending := 0; END IF; -- Find the trialbal record for the next period SELECT trialbal_id INTO _trialbalid FROM trialbal WHERE ( (trialbal_period_id=_nextPeriodid) AND (trialbal_accnt_id=_r.accnt_id) ); IF (FOUND) THEN UPDATE trialbal SET trialbal_beginning = (_ending + trialbal_yearend), trialbal_ending = (_ending + trialbal_yearend - trialbal_debits + trialbal_credits) WHERE (trialbal_id=_trialbalid); ELSE INSERT INTO trialbal ( trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_dirty, trialbal_credits, trialbal_debits ) VALUES(_nextPeriodid, _r.accnt_id, _ending, _ending, TRUE, 0, 0 ); END IF; END LOOP; -- Set the period_closed flag UPDATE period SET period_closed=TRUE WHERE (period_id=pPeriodid); RETURN pPeriodid; END; $_$; 5DROP FUNCTION public.closeaccountingperiod(integer); publicadminfalse39928f12551681980"closeaccountingyearperiod(integer)FUNCTIONCREATE FUNCTION closeaccountingyearperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pYearPeriodid ALIAS FOR $1; _result INTEGER; BEGIN -- Check to make sure that the yearperiod is not already closed IF ( ( SELECT yearperiod_closed FROM yearperiod WHERE (yearperiod_id=pYearPeriodid) ) ) THEN RETURN -1; END IF; IF ( ( SELECT (count(period_id) > 0) FROM period WHERE ((period_yearperiod_id=pYearPeriodid) AND (NOT period_closed)) ) ) THEN RETURN -10; END IF; IF ( ( SELECT (count(yearperiod_id) > 0) FROM yearperiod WHERE ((yearperiod_end< ( SELECT yearperiod_end FROM yearperiod WHERE (yearperiod_id=pYearPeriodId)) ) AND (NOT yearperiod_closed)) ) ) THEN RETURN -11; END IF; -- Should we check for a previous yearperiod existing already ? -- If so then we should return -2 if one does not. -- If we did the previous yearperiod we should check to make sure that -- it is also closed. Returning -3 if it is not. -- Make sure that the user is not trying to prematurely close the YearPeriod IF ( ( SELECT (yearperiod_end >= CURRENT_DATE) FROM yearperiod WHERE (yearperiod_id=pYearPeriodid) ) ) THEN RETURN -5; END IF; -- Update the year end Retained Earnings SELECT updateRetainedEarnings(pYearPeriodid) INTO _result; IF (_result < 0) THEN RETURN _result; END IF; UPDATE yearperiod SET yearperiod_closed = TRUE WHERE yearperiod_id = pYearPeriodid; RETURN 0; END; $_$; 9DROP FUNCTION public.closeaccountingyearperiod(integer); publicadminfalse8399212551681981closepo(integer)FUNCTIONCREATE FUNCTION closepo(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; BEGIN UPDATE poitem SET poitem_status='C' WHERE (poitem_pohead_id=pPoheadid); -- _poitemTrigger will close pohead when the last poitem is closed -- UPDATE pohead -- SET pohead_status='C' -- WHERE (pohead_id=pPoheadid); RETURN 1; END; $_$; 'DROP FUNCTION public.closepo(integer); publicadminfalse39928g12551681982closewo(integer, boolean)FUNCTIONrCREATE FUNCTION closewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pPostMaterialVariances ALIAS FOR $2; BEGIN RETURN closeWo(pWoid, pPostMaterialVariances, CURRENT_DATE); END; $_$; 0DROP FUNCTION public.closewo(integer, boolean); publicadminfalse8399212551681983closewo(integer, boolean, date)FUNCTIONCREATE FUNCTION closewo(integer, boolean, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pPostMaterialVariances ALIAS FOR $2; pTransDate ALIAS FOR $3; _woNumber TEXT; _check CHAR; _itemlocSeries INTEGER := 0; BEGIN --If this is item type Job then we cannot close here SELECT itemsite_costmethod INTO _check FROM wo,itemsite WHERE ((wo_id=pWoid) AND (wo_itemsite_id=itemsite_id) AND (itemsite_costmethod = 'J')); IF (FOUND) THEN RAISE EXCEPTION 'Work orders for Job items are closed when all quantities are shipped'; END IF; SELECT formatWoNumber(pWoid) INTO _woNumber; -- If there are any tools issued on this job then we cannot close here IF ( SELECT (count(*) > 0) FROM womatl JOIN itemsite ON (womatl_itemsite_id=itemsite_id) JOIN item ON ((itemsite_item_id=item_id) AND (item_type='T')) WHERE ((womatl_wo_id=pWoid) AND (womatl_qtyiss > 0)) ) THEN RAISE EXCEPTION 'All Tools must be returned before the W/O can be closed'; END IF; -- Distribute any remaining wo_wipvalue to G/L - debit Inventory Cost, credit WIP PERFORM insertGLTransaction( 'W/O', 'WO', _woNumber, ('Manufacturing Inventory Cost Variance for ' || item_number), getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), getPrjAccntId(wo_prj_id, costcat_invcost_accnt_id), -1, COALESCE(wo_wipvalue, 0), pTransDate ) FROM wo, itemsite, item, costcat WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (wo_id=pWoid) ); -- Distribute any remaining wo_brdvalue to G/L - debit Inventory Cost, credit WIP PERFORM insertGLTransaction( 'W/O', 'WO', _woNumber, ('Breeder Inventory Cost Variance for ' || item_number), getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), CASE WHEN(itemsite_costmethod='A') THEN costcat_asset_accnt_id ELSE getPrjAccntId(wo_prj_id, costcat_invcost_accnt_id) END, -1, COALESCE(wo_brdvalue, 0), pTransDate ) FROM wo, itemsite, item, costcat WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (wo_id=pWoid) ); -- Don't bother with posting variances if the qtyrcv is 0 as -- they are meaningless. IF ( ( SELECT wo_qtyrcv FROM wo WHERE (wo_id=pWoid) ) > 0 ) THEN IF (pPostMaterialVariances) THEN -- Post womatl variances INSERT INTO womatlvar ( womatlvar_number, womatlvar_subnumber, womatlvar_posted, womatlvar_parent_itemsite_id, womatlvar_component_itemsite_id, womatlvar_qtyord, womatlvar_qtyrcv, womatlvar_qtyiss, womatlvar_qtyfxd, womatlvar_qtyper, womatlvar_scrap, womatlvar_wipscrap, womatlvar_bomitem_id, womatlvar_notes, womatlvar_ref ) SELECT wo_number, wo_subnumber, pTransDate, wo_itemsite_id, womatl_itemsite_id, wo_qtyord, wo_qtyrcv, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyiss), itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyfxd), itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyper), womatl_scrap, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtywipscrap), womatl_bomitem_id, womatl_notes, womatl_ref FROM wo, womatl, itemsite, item WHERE ((womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_type <> 'T') AND (wo_id=pWoid)); END IF; END IF; -- Delete any P/R's created for this W/O PERFORM deletePr('W', womatl_id) FROM womatl WHERE (womatl_wo_id=pWoid); UPDATE wo SET wo_wipvalue = 0, wo_brdvalue=0, wo_status='C' WHERE (wo_id=pWoid); RETURN 1; END; $_$; 6DROP FUNCTION public.closewo(integer, boolean, date); publicadminfalse8399212591681984cntctTABLECREATE TABLE cntct ( cntct_id integer NOT NULL, cntct_crmacct_id integer, cntct_addr_id integer, cntct_first_name text, cntct_last_name text, cntct_honorific text, cntct_initials text, cntct_active boolean DEFAULT true, cntct_phone text, cntct_phone2 text, cntct_fax text, cntct_email text, cntct_webaddr text, cntct_notes text, cntct_title text, cntct_number text NOT NULL, cntct_middle text, cntct_suffix text, cntct_owner_username text, cntct_name text ); DROP TABLE public.cntct; publicadminfalse57608!00 TABLE cntctCOMMENTSCOMMENT ON TABLE cntct IS 'Contact - information on how to reach a living person'; publicadminfalse152!00cntctACLREVOKE ALL ON TABLE cntct FROM PUBLIC; REVOKE ALL ON TABLE cntct FROM admin; GRANT ALL ON TABLE cntct TO admin; GRANT ALL ON TABLE cntct TO xtrole; publicadminfalse152l12551681991cntct()FUNCTIONCREATE FUNCTION cntct() RETURNS SETOF cntct LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row cntct%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllContacts','ViewAllContacts','MaintainPersonalContacts','ViewPersonalContacts') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM cntct LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM cntct WHERE cntct_owner_username = getEffectiveXtUser() LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; DROP FUNCTION public.cntct(); publicadminfalse839922624!00FUNCTION cntct()COMMENTqCOMMENT ON FUNCTION cntct() IS 'A table function that returns Contact results according to privilege settings.'; publicadminfalse113212552005502cntctdups(text, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)FUNCTION#CREATE FUNCTION cntctdups(text, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS SETOF cntctdup LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSearchText ALIAS FOR $1; pSearchContactName ALIAS FOR $2; pSearchPhone ALIAS FOR $3; pSearchEmail ALIAS FOR $4; pSearchNumber ALIAS FOR $5; pSearchName ALIAS FOR $6; pShowInactive ALIAS FOR $7; pIgnoreBlanks ALIAS FOR $8; pIndentedDups ALIAS FOR $9; pCheckHnfc ALIAS FOR $10; pCheckFirst ALIAS FOR $11; pCheckMiddle ALIAS FOR $12; pCheckLast ALIAS FOR $13; pCheckSuffix ALIAS FOR $14; pCheckPhone ALIAS FOR $15; pCheckEmail ALIAS FOR $16; _cntct cntctdup%ROWTYPE; _cntctdup cntctdup%ROWTYPE; _rec RECORD; _operator TEXT := ''; _clause TEXT; _qry TEXT := ''; _return BOOLEAN := true; _text TEXT; _first BOOLEAN := true; BEGIN -- Validate IF (pIndentedDups AND NOT pCheckHnfc AND NOT pCheckFirst AND NOT pCheckMiddle AND NOT pCheckLast AND NOT pCheckSuffix AND NOT pCheckEmail AND NOT pCheckPhone) THEN RETURN; END IF; _text = quote_literal(pSearchText); IF (pIndentedDups) THEN _qry := 'SELECT -1 AS cntct_id, -1 AS cntct_crmacct_id, -1 AS cntct_addr_id,'; IF (NOT pCheckFirst) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_first_name,'; IF (NOT pCheckLast) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_last_name,'; IF (NOT pCheckHnfc) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_honorific,'; _qry := _qry || ' '''' AS cntct_initials,'; _qry := _qry || ' NULL AS cntct_active,'; IF (NOT pCheckPhone) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_phone,'; IF (NOT pCheckPhone) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_phone2,'; _qry := _qry || ' '''' AS cntct_fax,'; IF (NOT pCheckEmail) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_email,'; _qry := _qry || ' '''' AS cntct_webaddr,'; _qry := _qry || ' '''' AS cntct_notes,'; _qry := _qry || ' '''' AS cntct_title,'; _qry := _qry || ' '''' AS cntct_number,'; IF (NOT pCheckMiddle) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_middle,'; IF (NOT pCheckSuffix) THEN _qry := _qry || ''''' AS '; END IF; _qry := _qry || ' cntct_suffix,'; _qry := _qry || ' '''' AS cntct_owner_username,'; _qry := _qry || ' '''' AS cntct_name,'; _qry := _qry || ' '''' AS crmacct_number, '; _qry := _qry || ' '''' AS crmacct_name, '; _qry := _qry || ' NULL AS addr_id, NULL AS addr_active, '''' AS addr_line1, '''' AS addr_line2, '''' AS addr_line3, '''' AS addr_city, '''' AS addr_state, '''' AS addr_postalcode, '''' AS addr_country, '''' AS addr_notes, '''' AS addr_number, cntctdup_level FROM ('; END IF; _clause := 'SELECT cntct_id, cntct_crmacct_id, cntct_addr_id, UPPER(cntct_first_name) AS cntct_first_name, UPPER(cntct_last_name) AS cntct_last_name, UPPER(cntct_honorific) AS cntct_honorific, cntct_initials, cntct_active, cntct_phone, cntct_phone2, cntct_fax, UPPER(cntct_email) AS cntct_email, cntct_webaddr, cntct_notes, cntct_title, cntct_number, UPPER(cntct_middle) AS cntct_middle, UPPER(cntct_suffix) AS cntct_suffix, cntct_owner_username, cntct_name, crmacct_number, crmacct_name, addr.*, 0 AS cntctdup_level FROM cntct() LEFT OUTER JOIN crmacct ON (cntct_crmacct_id=crmacct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE '; IF (NOT pIndentedDups) THEN WHILE position('UPPER' in _clause) > 0 LOOP _clause := regexp_replace(_clause, 'UPPER', ''); END LOOP; END IF; _qry := _qry || _clause; IF (NOT pShowInactive) THEN _qry := _qry || ' cntct_active AND '; END IF; IF (pIgnoreBlanks) THEN _qry := _qry || ' (COALESCE(LENGTH(cntct_first_name || cntct_last_name),0) > 0) AND '; END IF; _qry := _qry || '(false '; IF (pSearchNumber) THEN _qry := _qry || ' OR (crmacct_number ~* ' || quote_literal(pSearchText) || ') '; END IF; IF (pSearchName) THEN _qry := _qry || ' OR (crmacct_name ~* ' || quote_literal(pSearchText) || ') '; END IF; IF (pSearchContactName) THEN _qry := _qry || ' OR (cntct_first_name || '' '' || cntct_last_name ~* ' || quote_literal(pSearchText) || ') '; END IF; IF (pSearchPhone) THEN _qry := _qry || ' OR (cntct_phone || '' '' || cntct_phone2 || '' '' || cntct_fax ~* ' || quote_literal(pSearchText) || ') '; END IF; IF (pSearchEmail) THEN _qry := _qry || ' OR (cntct_email ~* ' || quote_literal(pSearchText) || ') '; END IF; _qry := _qry || ' ) '; IF (pIndentedDups) THEN _qry := _qry || ') data'; _clause := ' GROUP BY cntctdup_level'; IF (pCheckHnfc) THEN _clause := _clause || ',cntct_honorific'; END IF; IF (pCheckFirst) THEN _clause := _clause || ',cntct_first_name'; END IF; IF (pCheckMiddle) THEN _clause := _clause || ',cntct_middle'; END IF; IF (pCheckLast) THEN _clause := _clause || ',cntct_last_name'; END IF; IF (pCheckSuffix) THEN _clause := _clause || ',cntct_suffix'; END IF; IF (pCheckEmail) THEN _clause := _clause || ',cntct_email'; END IF; IF (pCheckPhone) THEN _clause := _clause || ',cntct_phone'; _clause := _clause || ',cntct_phone2'; END IF; _qry := _qry || _clause; _clause := ' HAVING('; IF (pCheckHnfc) THEN _clause := _clause || 'OR COUNT(cntct_honorific) > 1 '; END IF; IF (pCheckFirst) THEN _clause := _clause || 'OR COUNT(cntct_first_name) > 1 '; END IF; IF (pCheckMiddle) THEN _clause := _clause || 'OR COUNT(cntct_middle) > 1 '; END IF; IF (pCheckLast) THEN _clause := _clause || 'OR COUNT(cntct_last_name) > 1 '; END IF; IF (pCheckSuffix) THEN _clause := _clause || 'OR COUNT(cntct_suffix) > 1 '; END IF; IF (pCheckEmail) THEN _clause := _clause || 'OR COUNT(cntct_email) > 1 '; END IF; IF (pCheckPhone) THEN _clause := _clause || 'OR (COUNT(cntct_phone) > 1 AND LENGTH(cntct_phone) > 0) '; _clause := _clause || 'OR (COUNT(cntct_phone2) > 1 AND LENGTH(cntct_phone2) > 0) '; END IF; _clause := _clause || ') '; _clause := overlay(_clause placing '' from 9 for 2); IF (pCheckHnfc) THEN _clause := _clause || 'AND LENGTH(cntct_honorific) > 0 '; END IF; IF (pCheckFirst) THEN _clause := _clause || 'AND LENGTH(cntct_first_name) > 0 '; END IF; IF (pCheckMiddle) THEN _clause := _clause || 'AND LENGTH(cntct_middle) > 0 '; END IF; IF (pCheckLast) THEN _clause := _clause || 'AND LENGTH(cntct_last_name) > 0 '; END IF; IF (pCheckSuffix) THEN _clause := _clause || 'AND LENGTH(cntct_suffix) > 0 '; END IF; IF (pCheckEmail) THEN _clause := _clause || 'AND LENGTH(cntct_email) > 0 '; END IF; _qry := _qry || _clause; END IF; _qry := _qry || ' ORDER BY cntct_last_name, cntct_first_name;'; -- raise exception '%',_qry; FOR _cntct IN EXECUTE _qry LOOP RETURN NEXT _cntct; -- If duplicates, get duplicates IF (pIndentedDups) THEN _qry := 'SELECT cntct.*, crmacct_number, crmacct_name, addr.*, 1 AS cntctdup_level FROM cntct() LEFT OUTER JOIN crmacct ON (cntct_crmacct_id=crmacct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE (true) '; IF (pCheckHnfc) THEN _qry := _qry || ' AND (UPPER(cntct_honorific)=' || quote_literal(_cntct.cntct_honorific) || ')'; END IF; IF (pCheckFirst) THEN _qry := _qry || ' AND (UPPER(cntct_first_name)=' || quote_literal(_cntct.cntct_first_name) || ')'; END IF; IF (pCheckMiddle) THEN _qry := _qry || ' AND (UPPER(cntct_middle)=' || quote_literal(_cntct.cntct_middle) || ')'; END IF; IF (pCheckLast) THEN _qry := _qry || ' AND (UPPER(cntct_last_name)=' || quote_literal(_cntct.cntct_last_name) || ')'; END IF; IF (pCheckSuffix) THEN _qry := _qry || ' AND (UPPER(cntct_suffix)=' || quote_literal(_cntct.cntct_suffix) || ')'; END IF; IF (pCheckPhone) THEN _qry := _qry || ' AND (cntct_phone=' || quote_literal(_cntct.cntct_phone) || ')'; END IF; IF (pCheckEmail) THEN _qry := _qry || ' AND (UPPER(cntct_email)=' || quote_literal(_cntct.cntct_email) || ')'; END IF; -- raise exception '%',_qry; FOR _cntctdup IN EXECUTE _qry LOOP RETURN NEXT _cntctdup; END LOOP; END IF; END LOOP; RETURN; END; $_$; DROP FUNCTION public.cntctdups(text, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); publicadminfalse839922579k12551681994%cntctmerge(integer, integer, boolean)FUNCTION"2CREATE FUNCTION cntctmerge(integer, integer, boolean) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceCntctId ALIAS FOR $1; pTargetCntctId ALIAS FOR $2; pPurge ALIAS FOR $3; _fk RECORD; _pk RECORD; _sel RECORD; _seq INTEGER; _col TEXT; _pkcol TEXT; _qry TEXT; _multi BOOLEAN; BEGIN -- Validate IF (pSourceCntctId IS NULL) THEN RAISE EXCEPTION 'Source contact id can not be null'; ELSIF (pTargetCntctId IS NULL) THEN RAISE EXCEPTION 'Target contact id can not be null'; ELSIF (pPurge IS NULL) THEN RAISE EXCEPTION 'Purge flag can not be null'; END IF; -- Determine where this contact is used by analyzing foreign key linkages and update each FOR _fk IN SELECT pg_namespace.nspname AS schemaname, con.relname AS tablename, conkey AS seq, conrelid AS class_id FROM pg_constraint, pg_class f, pg_class con, pg_namespace WHERE confrelid=f.oid AND conrelid=con.oid AND f.relname = 'cntct' AND con.relnamespace=pg_namespace.oid AND con.relname NOT IN ('cntctsel', 'cntctmrgd', 'mrghist','trgthist') LOOP -- Validate IF (ARRAY_UPPER(_fk.seq,1) > 1) THEN RAISE EXCEPTION 'Updates to tables where the contact is one of multiple foreign key columns is not supported. Error on Table: %', pg_namespace.nspname || '.' || con.relname; END IF; _seq := _fk.seq[1]; -- Get the specific column name SELECT attname INTO _col FROM pg_attribute, pg_class WHERE ((attrelid=pg_class.oid) AND (pg_class.oid=_fk.class_id) AND (attnum=_seq)); IF (NOT pPurge) THEN -- Cache what we're going to do so we can restore if need be. -- Start by determining the primary key column for this table. _multi := false; _qry := 'SELECT pg_attribute.attname AS key FROM pg_attribute, pg_class WHERE pg_class.relnamespace = ( SELECT oid FROM pg_namespace WHERE pg_namespace.nspname = ''' || _fk.schemaname || ''') AND pg_class.oid IN ( SELECT indexrelid FROM pg_index WHERE indisprimary = true AND indrelid IN ( SELECT oid FROM pg_class WHERE lower(relname) = ''' || _fk.tablename || ''')) AND pg_attribute.attrelid = pg_class.oid AND pg_attribute.attisdropped = false ORDER BY pg_attribute.attnum;'; FOR _pk IN EXECUTE _qry LOOP IF (_multi) THEN RAISE EXCEPTION 'Reference tables with composite primary keys not supported. Try the merge and purge option.'; END IF; _pkcol := _pk.key; _multi := true; END LOOP; -- Gather and store the history _qry := 'INSERT INTO mrghist SELECT ' || pSourceCntctId || ', ''' || _fk.schemaname || '.' || _fk.tablename || ''', ''' || _pkcol || ''', ' || _pkcol || ', ''' || _col || ''' FROM ' || _fk.schemaname || '.' || _fk.tablename || ' WHERE (' || _col || '=' || pSourceCntctId || ');'; -- raise exception '%',_qry; EXECUTE _qry; END IF; -- Merge references _qry := 'UPDATE ' || _fk.schemaname || '.' || _fk.tablename || ' SET ' || _col || '=' || pTargetCntctId || ' WHERE (' || _col || '=' || pSourceCntctId || ');'; EXECUTE _qry; END LOOP; -- Merge cases with no foreign key IF (NOT pPurge) THEN INSERT INTO mrghist SELECT pSourceCntctId, 'comment', 'comment_id', comment_id, 'comment_source_id' FROM comment WHERE ((comment_source_id= pSourceCntctId) AND (comment_source='T')); INSERT INTO mrghist SELECT pSourceCntctId, 'docass', 'docass_id', docass_id, 'docass_source_id' FROM docass WHERE ((docass_source_id= pSourceCntctId) AND (docass_source_type='T')); INSERT INTO mrghist SELECT pSourceCntctId, 'docass', 'docass_id', docass_id, 'docass_target_id' FROM docass WHERE ((docass_target_id= pSourceCntctId) AND (docass_target_type='T')); INSERT INTO mrghist SELECT pSourceCntctId, 'vendinfo', 'vend_id', vend_id, 'vend_cntct1_id' FROM vendinfo WHERE (vend_cntct1_id=pSourceCntctId); INSERT INTO mrghist SELECT pSourceCntctId, 'vendinfo', 'vend_id', vend_id, 'vend_cntct2_id' FROM vendinfo WHERE (vend_cntct2_id=pSourceCntctId); IF (fetchMetricBool('EnableBatchManager') AND packageIsEnabled('xtbatch')) THEN INSERT INTO mrghist SELECT pSourceCntctId, 'xtbatch.emlassc', 'emlassc_id', emlassc_id, 'emlassc_assc_id' FROM xtbatch.emlassc WHERE ((emlassc_assc_id= pSourceCntctId) AND (emlassc_type='T')); END IF; END IF; UPDATE comment SET comment_source_id = pTargetCntctId WHERE ((comment_source = 'T') AND (comment_source_id = pSourceCntctId)); UPDATE docass SET docass_source_id = pTargetCntctId WHERE ((docass_source_type = 'T') AND (docass_source_id = pSourceCntctId)); UPDATE docass SET docass_target_id = pTargetCntctId WHERE ((docass_target_type = 'T') AND (docass_target_id = pSourceCntctId)); UPDATE vendinfo SET vend_cntct1_id = pTargetCntctId WHERE (vend_cntct1_id = pSourceCntctId); UPDATE vendinfo SET vend_cntct2_id = pTargetCntctId WHERE (vend_cntct2_id = pSourceCntctId); IF (fetchMetricBool('EnableBatchManager') AND packageIsEnabled('xtbatch')) THEN UPDATE xtbatch.emlassc SET emlassc_assc_id = pTargetCntctId WHERE ((emlassc_type = 'T') AND (emlassc_assc_id = pSourceCntctId)); END IF; IF (NOT pPurge) THEN -- Record that this has been merged if not already IF (SELECT (COUNT(cntctmrgd_cntct_id) = 0) FROM cntctmrgd WHERE (cntctmrgd_cntct_id=pSourceCntctId)) THEN INSERT INTO cntctmrgd VALUES (pSourceCntctId,false); END IF; END IF; -- Merge field detail to target SELECT * INTO _sel FROM cntctsel JOIN cntct ON (cntctsel_cntct_id=cntct_id) WHERE (cntctsel_cntct_id=pSourceCntctId); IF (FOUND) THEN IF (_sel.cntctsel_mrg_crmacct_id) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_crmacct_id', cntct_crmacct_id::text || '::integer' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_crmacct_id=_sel.cntct_crmacct_id WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_addr_id) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_addr_id', cntct_addr_id::text || '::integer' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_addr_id=_sel.cntct_addr_id WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_first_name) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_first_name', '''' || cntct_first_name || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_first_name=_sel.cntct_first_name WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_last_name) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_last_name', '''' || cntct_last_name || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_last_name=_sel.cntct_last_name WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_honorific) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_honorific', '''' || cntct_honorific || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_honorific=_sel.cntct_honorific WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_initials) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_initials', '''' || cntct_initials || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_initials=_sel.cntct_initials WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_phone) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_phone', '''' || cntct_phone || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_phone=_sel.cntct_phone WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_phone2) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_phone2', '''' || cntct_phone2 || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_phone2=_sel.cntct_phone2 WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_fax) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_fax', '''' || cntct_fax || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_fax=_sel.cntct_fax WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_email) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_email', '''' || cntct_email || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_email=_sel.cntct_email WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_webaddr) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_webaddr', '''' || cntct_webaddr || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_webaddr=_sel.cntct_webaddr WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_notes) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_notes', '''' || cntct_notes || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_notes=cntct_notes || ' ' || _sel.cntct_notes WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_title) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_title', '''' || cntct_title || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_title=_sel.cntct_title WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_middle) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_middle', '''' || cntct_middle || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_middle=_sel.cntct_middle WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_suffix) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_suffix', '''' || cntct_suffix || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_suffix=_sel.cntct_suffix WHERE (cntct_id=pTargetCntctId); END IF; IF (_sel.cntctsel_mrg_owner_username) THEN IF (NOT pPurge) THEN INSERT INTO trgthist SELECT pSourceCntctId,pTargetCntctId,'cntct_owner_username', '''' || cntct_owner_username || '''' FROM cntct WHERE (cntct_id=pTargetCntctId); END IF; UPDATE cntct SET cntct_owner_username=_sel.cntct_owner_username WHERE (cntct_id=pTargetCntctId); END IF; ELSE RAISE EXCEPTION 'Source Contact not Found'; END IF; -- Disposition source contact IF (pPurge) THEN DELETE FROM cntct WHERE cntct_id = pSourceCntctId; END IF; -- Deactivate contact UPDATE cntct SET cntct_active = false WHERE (cntct_id=pSourceCntctId); -- Clean up DELETE FROM cntctsel WHERE (cntctsel_cntct_id=pSourceCntctId); RETURN true; END; $_$; <DROP FUNCTION public.cntctmerge(integer, integer, boolean); publicadminfalse39928m12551681996cntctrestore(integer)FUNCTIONCREATE FUNCTION cntctrestore(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; _r RECORD; _qry TEXT; BEGIN -- Validate SELECT * INTO _r FROM cntctmrgd WHERE (cntctmrgd_cntct_id=pCntctId); IF (NOT FOUND) THEN RETURN false; END IF; -- Gather the list of affected records FOR _r IN SELECT * FROM mrghist WHERE (mrghist_cntct_id=pCntctId) LOOP -- Restore the old references _qry := 'UPDATE ' || _r.mrghist_table || ' SET ' || _r.mrghist_cntct_col || '=' || pCntctId || ' WHERE (' || _r.mrghist_pkey_col || '=' || _r.mrghist_pkey_id || ');'; EXECUTE _qry; END LOOP; -- Gather the list of affected fields FOR _r IN SELECT * FROM trgthist WHERE (trgthist_src_cntct_id=pCntctId) LOOP -- Restore the old values _qry := 'UPDATE cntct SET ' || _r.trgthist_col || '=' || _r.trgthist_value || ' WHERE (cntct_id=' || _r.trgthist_trgt_cntct_id || ');'; EXECUTE _qry; END LOOP; -- Clean up UPDATE cntct SET cntct_active=true WHERE (cntct_id=pCntctId); DELETE FROM mrghist WHERE (mrghist_cntct_id=pCntctId); DELETE FROM trgthist WHERE (trgthist_src_cntct_id=pCntctId); DELETE FROM cntctmrgd WHERE (cntctmrgd_cntct_id=pCntctId); RETURN true; END; $_$; ,DROP FUNCTION public.cntctrestore(integer); publicadminfalse8399212551681997cntctselect(integer, boolean)FUNCTIONCREATE FUNCTION cntctselect(integer, boolean) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; pTarget ALIAS FOR $2; BEGIN -- If target, delete any other targets IF (pTarget) THEN DELETE FROM cntctsel WHERE cntctsel_target; END IF; -- Delete any previous selection of this contact DELETE FROM cntctsel WHERE cntctsel_cntct_id=pCntctId; -- Add this contact in appropriate selection state INSERT INTO cntctsel VALUES (pCntctId,pTarget); RETURN true; END; $_$; 4DROP FUNCTION public.cntctselect(integer, boolean); publicadminfalse83992n12551681998 cntctselectcol(integer, integer)FUNCTION CREATE FUNCTION cntctselectcol(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; pColNumber ALIAS FOR $2; BEGIN IF (pColNumber = 2 OR pColNumber = 3) THEN UPDATE cntctsel SET cntctsel_mrg_crmacct_id=false WHERE (cntctsel_mrg_crmacct_id AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_crmacct_id=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 4) THEN UPDATE cntctsel SET cntctsel_mrg_honorific=false WHERE (cntctsel_mrg_honorific AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_honorific=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 5) THEN UPDATE cntctsel SET cntctsel_mrg_first_name=false WHERE (cntctsel_mrg_first_name AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_first_name=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 6) THEN UPDATE cntctsel SET cntctsel_mrg_middle=false WHERE (cntctsel_mrg_middle AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_middle=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 7) THEN UPDATE cntctsel SET cntctsel_mrg_last_name=false WHERE (cntctsel_mrg_last_name AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_last_name=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 8) THEN UPDATE cntctsel SET cntctsel_mrg_suffix=false WHERE (cntctsel_mrg_suffix AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_suffix=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 9) THEN UPDATE cntctsel SET cntctsel_mrg_initials=false WHERE (cntctsel_mrg_initials AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_initials=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 10) THEN UPDATE cntctsel SET cntctsel_mrg_phone=false WHERE (cntctsel_mrg_phone AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_phone=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 11) THEN UPDATE cntctsel SET cntctsel_mrg_phone2=false WHERE (cntctsel_mrg_phone2 AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_phone2=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 12) THEN UPDATE cntctsel SET cntctsel_mrg_fax=false WHERE (cntctsel_mrg_fax AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_fax=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 13) THEN UPDATE cntctsel SET cntctsel_mrg_email=false WHERE (cntctsel_mrg_email AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_email=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 14) THEN UPDATE cntctsel SET cntctsel_mrg_webaddr=false WHERE (cntctsel_mrg_webaddr AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_webaddr=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 15) THEN UPDATE cntctsel SET cntctsel_mrg_title=false WHERE (cntctsel_mrg_title AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_title=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 16) THEN UPDATE cntctsel SET cntctsel_mrg_owner_username=false WHERE (cntctsel_mrg_owner_username AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_owner_username=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber = 17) THEN UPDATE cntctsel SET cntctsel_mrg_notes=false WHERE (cntctsel_mrg_notes AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_notes=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; ELSIF (pColNumber >= 18) THEN UPDATE cntctsel SET cntctsel_mrg_addr_id=false WHERE (cntctsel_mrg_addr_id AND cntctsel_cntct_id != pCntctId); UPDATE cntctsel SET cntctsel_mrg_addr_id=true WHERE (cntctsel_cntct_id = pCntctId); RETURN true; END IF; RETURN false; END; $_$; 7DROP FUNCTION public.cntctselectcol(integer, integer); publicadminfalse83992q12551681999cntctused(integer)FUNCTION CREATE FUNCTION cntctused(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; _fk RECORD; _r RECORD; _seq INTEGER; _col TEXT; _qry TEXT; BEGIN -- Determine where this contact is used by analyzing foreign key linkages -- but ignore child tables and those with impermanent relationships FOR _fk IN SELECT pg_namespace.nspname AS schemaname, con.relname AS tablename, conkey AS seq, conrelid AS class_id FROM pg_constraint, pg_class f, pg_class con, pg_namespace WHERE confrelid=f.oid AND conrelid=con.oid AND f.relname = 'cntct' AND con.relnamespace=pg_namespace.oid AND con.relname NOT IN ('cntctaddr', 'cntctdata', 'cntcteml', 'cohead', 'pohead', 'quhead', 'tohead', 'cntctsel', 'cntctmrgd', 'mrghist', 'trgthist') LOOP -- Validate IF (ARRAY_UPPER(_fk.seq,1) > 1) THEN RAISE EXCEPTION 'Cannot check dependencies when the contact is one of multiple foreign key columns (%.%) [xtuple: fkeycheck, -1, %, %]', _fk.nspname, _fk.relname, _fk.nspname, _fk.relname; END IF; _seq := _fk.seq[1]; -- Get the specific column name SELECT attname INTO _col FROM pg_attribute, pg_class WHERE ((attrelid=pg_class.oid) AND (pg_class.oid=_fk.class_id) AND (attnum=_seq)); -- See if there are dependencies _qry := 'SELECT * FROM ' || _fk.schemaname || '.' || _fk.tablename || ' WHERE ('|| _col || '=' || pCntctId || ');'; FOR _r IN EXECUTE _qry LOOP RETURN true; END LOOP; END LOOP; RETURN false; END; $_$; )DROP FUNCTION public.cntctused(integer); publicadminfalse39928r12551682000coheadstatecolor(integer)FUNCTIONCREATE FUNCTION coheadstatecolor(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoheadId ALIAS FOR $1; _shipheadid INTEGER; _result TEXT := ''; BEGIN IF (pCoheadid IS NULL) THEN RAISE EXCEPTION 'Customer Id is required.'; END IF; SELECT shiphead_id INTO _shipheadid FROM cohead JOIN shiphead ON ((shiphead_order_id=cohead_id) AND (shiphead_order_type='SO')) JOIN shipitem ON (shiphead_id=shipitem_shiphead_id) WHERE ((cohead_id=pCoheadId) AND (NOT shipitem_invoiced)) ORDER BY shiphead_id DESC LIMIT 1; IF (FOUND) THEN SELECT CASE WHEN ((shiphead_shipped) AND (COALESCE(shiphead_order_id,0) > 0) AND (SUM(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) <= 0)) THEN 'altemphasis' WHEN ((COALESCE(cobmisc_cohead_id,0) > 0) AND (SUM(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) > 0)) THEN 'error' WHEN (NOT shiphead_shipped) THEN 'emphasis' END INTO _result FROM cohead JOIN coitem ON (cohead_id=coitem_cohead_id) JOIN shiphead ON ((shiphead_order_id=cohead_id) AND (shiphead_order_type='SO')) JOIN shipitem ON (shiphead_id=shipitem_shiphead_id) LEFT OUTER JOIN (SELECT DISTINCT cobmisc_cohead_id FROM cobmisc) AS cobmisc ON (cobmisc_cohead_id=cohead_id) WHERE (shiphead_id=_shipheadid) GROUP BY shiphead_id,shiphead_shipped,shiphead_order_id,cobmisc_cohead_id ORDER BY shiphead_id DESC; ELSE _result := ''; END IF; RETURN _result; END; $_$; 0DROP FUNCTION public.coheadstatecolor(integer); publicadminfalse83992!12551682001concataggsfunc(text, text)FUNCTIONJCREATE FUNCTION concataggsfunc(text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE prevstate ALIAS FOR $1; newval ALIAS FOR $2; BEGIN RETURN prevstate || newval; END; $_$; 1DROP FUNCTION public.concataggsfunc(text, text); publicadminfalse39928s12551682002consolidatelocations(integer)FUNCTIONCREATE FUNCTION consolidatelocations(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _r RECORD; BEGIN UPDATE itemloc SET itemloc_consolflag = TRUE WHERE (itemloc_itemsite_id=pItemsiteid); FOR _r IN SELECT itemloc_location_id, SUM(itemloc_qty) AS qty FROM itemloc WHERE (itemloc_itemsite_id=pItemsiteid) GROUP BY itemloc_location_id LOOP INSERT INTO itemloc ( itemloc_itemsite_id, itemloc_location_id, itemloc_expiration, itemloc_qty, itemloc_consolflag ) VALUES ( pItemsiteid, _r.itemloc_location_id, endOfTime(), _r.qty, FALSE ); END LOOP; DELETE FROM itemloc WHERE ( (itemloc_itemsite_id=pItemsiteid) AND (itemloc_consolflag) ); RETURN 1; END; $_$; 4DROP FUNCTION public.consolidatelocations(integer); publicadminfalse83992t12551682003"convertcustomertoprospect(integer)FUNCTIONCREATE FUNCTION convertcustomertoprospect(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustId ALIAS FOR $1; _c RECORD; BEGIN SELECT * INTO _c FROM custinfo WHERE (cust_id=pCustId); INSERT INTO prospect ( prospect_id, prospect_active, prospect_number, prospect_name, prospect_cntct_id, prospect_taxzone_id, prospect_salesrep_id, prospect_warehous_id, prospect_comments ) VALUES ( _c.cust_id, _c.cust_active, _c.cust_number, _c.cust_name, _c.cust_cntct_id, _c.cust_taxzone_id, CASE WHEN(_c.cust_salesrep_id > 0) THEN _c.cust_salesrep_id ELSE NULL END, CASE WHEN(_c.cust_preferred_warehous_id > 0) THEN _c.cust_preferred_warehous_id ELSE NULL END, _c.cust_comments); DELETE FROM custinfo WHERE (cust_id=pCustId); RETURN pCustId; END; $_$; 9DROP FUNCTION public.convertcustomertoprospect(integer); publicadminfalse83992%12551682004"convertprospecttocustomer(integer)FUNCTION"CREATE FUNCTION convertprospecttocustomer(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN convertProspectToCustomer($1, FALSE); END; $_$; 9DROP FUNCTION public.convertprospecttocustomer(integer); publicadminfalse83992z12551682005+convertprospecttocustomer(integer, boolean)FUNCTION CREATE FUNCTION convertprospecttocustomer(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pProspectId ALIAS FOR $1; pdoquotes ALIAS FOR $2; _p RECORD; _q RECORD; BEGIN SELECT * INTO _p FROM prospect WHERE (prospect_id=pProspectId); IF (EXISTS(SELECT cust_id FROM custinfo WHERE cust_id=pProspectId)) THEN RAISE EXCEPTION '[xtuple: convertProspectToCustomer, -10]'; END IF; INSERT INTO custinfo ( cust_id, cust_active, cust_number, cust_name, cust_cntct_id, cust_taxzone_id, cust_comments, cust_creditstatus, cust_salesrep_id, cust_preferred_warehous_id, cust_terms_id, cust_custtype_id, cust_shipform_id, cust_shipvia, cust_balmethod, cust_ffshipto, cust_backorder, cust_partialship, cust_creditlmt, cust_creditrating, cust_commprcnt, cust_discntprcnt, cust_blanketpos, cust_shipchrg_id, cust_ffbillto, cust_usespos, cust_emaildelivery, cust_autoupdatestatus,cust_autoholdorders, cust_soemaildelivery) SELECT _p.prospect_id, _p.prospect_active, _p.prospect_number, _p.prospect_name, _p.prospect_cntct_id, _p.prospect_taxzone_id, _p.prospect_comments, 'G', COALESCE(_p.prospect_salesrep_id, salesrep_id), COALESCE(_p.prospect_warehous_id, -1), FetchMetricValue('DefaultTerms'), FetchMetricValue('DefaultCustType'), FetchMetricValue('DefaultShipFormId'), COALESCE(FetchMetricValue('DefaultShipViaId'),-1), FetchMetricText('DefaultBalanceMethod'), FetchMetricBool('DefaultFreeFormShiptos'), FetchMetricBool('DefaultBackOrders'), FetchMetricBool('DefaultPartialShipments'), FetchMetricValue('SOCreditLimit'), FetchMetricText('SOCreditRate'), salesrep_commission, 0, false, -1,false,false,false,false, false, false FROM salesrep WHERE (salesrep_id=FetchMetricValue('DefaultSalesRep')); DELETE FROM prospect WHERE (prospect_id=pprospectId); IF (pdoquotes) THEN BEGIN FOR _q IN SELECT quhead_number, convertQuote(quhead_id) AS err FROM quhead WHERE ((COALESCE(quhead_expire, endOfTime()) >= CURRENT_DATE) AND (quhead_cust_id=pProspectId)) LOOP IF (_q.err < 0) THEN RAISE NOTICE 'Quote % for % didn''t convert to a Sales Order [xtuple: convertQuote, %]', _q.quhead_number, _p.prospect_number, _q.err; END IF; END LOOP; EXCEPTION WHEN OTHERS THEN RAISE NOTICE 'Ignored errors convering quotes: % %', SQLSTATE, SQLERRM; END; END IF; RETURN pProspectId; END; $_$; BDROP FUNCTION public.convertprospecttocustomer(integer, boolean); publicadminfalse39928&12551682006convertquote(integer)FUNCTION.CREATE FUNCTION convertquote(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; _soheadid INTEGER; _soitemid INTEGER; _orderid INTEGER; _ordertype CHARACTER(1); _creditstatus TEXT; _usespos BOOLEAN := false; _blanketpos BOOLEAN := true; _showConvertedQuote BOOLEAN := false; _prospectid INTEGER; _r RECORD; _soNum TEXT; BEGIN -- Check to make sure the quote has not expired IF (SELECT COALESCE(quhead_expire, endOfTime()) < CURRENT_DATE FROM quhead WHERE(quhead_id=pQuheadid)) THEN RETURN -6; END IF; -- Check to make sure that all of the quote items have a valid itemsite SELECT quitem_id INTO _r FROM quitem LEFT OUTER JOIN itemsite ON (quitem_itemsite_id=itemsite_id) WHERE ((itemsite_id IS NULL) AND (quitem_quhead_id=pQuheadid)); IF (FOUND) THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'Q', quhead_id, quhead_warehous_id, quhead_number FROM evntnot, evnttype, quhead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=quhead_warehous_id) AND (evnttype_name='CannotConvertQuote') AND (quhead_id=pQuheadid) ); RETURN -1; END IF; SELECT cust_creditstatus, cust_usespos, cust_blanketpos INTO _creditstatus, _usespos, _blanketpos FROM quhead, custinfo WHERE ((quhead_cust_id=cust_id) AND (quhead_id=pQuheadid)); IF (NOT FOUND) THEN SELECT prospect_id INTO _prospectid FROM quhead, prospect WHERE ((quhead_cust_id=prospect_id) AND (quhead_id=pQuheadid)); IF (NOT FOUND) THEN RETURN -2; ELSE RETURN -3; END IF; ELSIF (_creditstatus = 'H' AND NOT checkPrivilege('CreateSOForHoldCustomer')) THEN RETURN -4; ELSIF (_creditstatus = 'W' AND NOT checkPrivilege('CreateSOForWarnCustomer')) THEN RETURN -5; END IF; IF ( (_usespos) AND (NOT _blanketpos) ) THEN PERFORM cohead_id FROM quhead JOIN cohead ON ( (cohead_cust_id=quhead_cust_id) AND (UPPER(cohead_custponumber)=UPPER(quhead_custponumber)) ) WHERE (quhead_id=pQuheadid); IF (FOUND) THEN RAISE EXCEPTION 'Duplicate Customer PO'; END IF; END IF; PERFORM quhead_number, cohead_id FROM quhead, cohead WHERE quhead_id = pQuheadid AND cohead_number = quhead_number; IF (FOUND) THEN SELECT fetchSoNumber() INTO _soNum; ELSE SELECT quhead_number INTO _soNum FROM quhead WHERE quhead_id = pQuheadid; END IF; SELECT NEXTVAL('cohead_cohead_id_seq') INTO _soheadid; INSERT INTO cohead ( cohead_id, cohead_number, cohead_cust_id, cohead_orderdate, cohead_packdate, cohead_custponumber, cohead_warehous_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_billtocountry, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_shiptocountry, cohead_salesrep_id, cohead_commission, cohead_terms_id, cohead_shipchrg_id, cohead_shipform_id, cohead_fob, cohead_shipvia, cohead_ordercomments, cohead_shipcomments, cohead_freight, cohead_misc, cohead_misc_accnt_id, cohead_misc_descrip, cohead_holdtype, cohead_wasquote, cohead_quote_number, cohead_prj_id, cohead_curr_id, cohead_taxzone_id, cohead_taxtype_id, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_ophead_id, cohead_calcfreight, cohead_saletype_id, cohead_shipzone_id ) SELECT _soheadid, _soNum, quhead_cust_id, CURRENT_DATE, quhead_packdate, quhead_custponumber, quhead_warehous_id, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_billtocountry, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptocountry, quhead_salesrep_id, quhead_commission, quhead_terms_id, cust_shipchrg_id, cust_shipform_id, quhead_fob, quhead_shipvia, quhead_ordercomments, quhead_shipcomments, quhead_freight, quhead_misc, quhead_misc_accnt_id, quhead_misc_descrip, 'N', TRUE, quhead_number, quhead_prj_id, quhead_curr_id, quhead_taxzone_id, quhead_taxtype_id, quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email, quhead_ophead_id, quhead_calcfreight, quhead_saletype_id, quhead_shipzone_id FROM quhead JOIN custinfo ON (cust_id=quhead_cust_id) WHERE (quhead_id=pQuheadid); UPDATE url SET url_source_id = _soheadid, url_source = 'S' WHERE ((url_source='Q') AND (url_source_id = pQuheadid)); UPDATE imageass SET imageass_source_id = _soheadid, imageass_source = 'S' WHERE ((imageass_source='Q') AND (imageass_source_id = pQuheadid)); UPDATE docass SET docass_source_id = _soheadid, docass_source_type = 'S' WHERE ((docass_source_type='Q') AND (docass_source_id = pQuheadid)); -- Copy Comments INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text, comment_public ) SELECT comment_cmnttype_id, 'S', _soheadid, comment_date, comment_user, ('Quote-' || comment_text), comment_public FROM comment WHERE ( (comment_source='Q') AND (comment_source_id=pQuheadid) ); FOR _r IN SELECT quitem.*, quhead_number, quhead_prj_id, itemsite_item_id, itemsite_leadtime, itemsite_createsopo, itemsite_createsopr, item_type, COALESCE(quitem_itemsrc_id, itemsrc_id, -1) AS itemsrcid FROM quhead JOIN quitem ON (quitem_quhead_id=quhead_id) JOIN itemsite ON (itemsite_id=quitem_itemsite_id) JOIN item ON (item_id=itemsite_item_id) LEFT OUTER JOIN itemsrc ON ( (itemsrc_item_id=item_id) AND (itemsrc_default) ) WHERE (quhead_id=pQuheadid) ORDER BY quitem_linenumber LOOP SELECT NEXTVAL('coitem_coitem_id_seq') INTO _soitemid; INSERT INTO coitem ( coitem_id, coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_price, coitem_custprice, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_price_uom_id, coitem_price_invuomratio, coitem_unitcost, coitem_prcost, coitem_custpn, coitem_memo, coitem_taxtype_id, coitem_order_id ) VALUES ( _soitemid, _soheadid, _r.quitem_linenumber, _r.quitem_itemsite_id, 'O', _r.quitem_scheddate, _r.quitem_promdate, _r.quitem_price, _r.quitem_custprice, _r.quitem_qtyord, 0, 0, _r.quitem_qty_uom_id, _r.quitem_qty_invuomratio, _r.quitem_price_uom_id, _r.quitem_price_invuomratio, stdcost(_r.itemsite_item_id), _r.quitem_prcost, _r.quitem_custpn, _r.quitem_memo, _r.quitem_taxtype_id, -1 ); IF (fetchMetricBool('enablextcommissionission')) THEN PERFORM xtcommission.getSalesReps(quhead_cust_id, quhead_shipto_id, _r.itemsite_item_id, _r.quitem_price, _soitemid, 'SalesItem') FROM quhead WHERE (quhead_id=pQuheadid); END IF; INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default, charass_price) SELECT 'SI', _soitemid, charass_char_id, charass_value, charass_default, charass_price FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=_r.quitem_id)); -- Copy Comments INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text ) SELECT comment_cmnttype_id, 'SI', _soitemid, comment_date, comment_user, ('Quote-' || comment_text) FROM comment WHERE ( (comment_source='QI') AND (comment_source_id=_r.quitem_id) ); _orderid := -1; _ordertype := ''; IF (_r.quitem_createorder) THEN IF (_r.item_type IN ('M')) THEN SELECT createWo( CAST(_r.quhead_number AS INTEGER), supply.itemsite_id, 1, (_r.quitem_qtyord * _r.quitem_qty_invuomratio), _r.itemsite_leadtime, _r.quitem_scheddate, _r.quitem_memo, 'S', _soitemid, _r.quhead_prj_id ) INTO _orderId FROM itemsite sold, itemsite supply WHERE ((sold.itemsite_item_id=supply.itemsite_item_id) AND (supply.itemsite_warehous_id=_r.quitem_order_warehous_id) AND (sold.itemsite_id=_r.quitem_itemsite_id) ); _orderType := 'W'; INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT 'W', _orderId, charass_char_id, charass_value FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=_r.quitem_id)); ELSIF ( (_r.item_type IN ('P', 'O')) AND (_r.itemsite_createsopr) ) THEN SELECT createPr( CAST(_r.quhead_number AS INTEGER), _r.quitem_itemsite_id, (_r.quitem_qtyord * _r.quitem_qty_invuomratio), _r.quitem_scheddate, '', 'S', _soitemid ) INTO _orderId; _orderType := 'R'; UPDATE pr SET pr_prj_id=_r.quhead_prj_id WHERE pr_id=_orderId; ELSIF ( (_r.item_type IN ('P', 'O')) AND (_r.itemsite_createsopo) ) THEN IF (_r.quitem_prcost=0) THEN SELECT createPurchaseToSale(_soitemid, _r.itemsrcid, _r.quitem_dropship) INTO _orderId; ELSE SELECT createPurchaseToSale(_soitemid, _r.itemsrcid, _r.quitem_dropship, _r.quitem_prcost) INTO _orderId; END IF; _orderType := 'P'; END IF; UPDATE coitem SET coitem_order_type=_ordertype, coitem_order_id=_orderid WHERE (coitem_id=_soitemid); END IF; END LOOP; SELECT metric_value INTO _showConvertedQuote FROM metric WHERE metric_name = 'ShowQuotesAfterSO'; IF (_showConvertedQuote) THEN UPDATE quhead SET quhead_status= 'C' WHERE (quhead_id = pQuheadid); ELSE PERFORM deleteQuote(pQuheadid); END IF; RETURN _soheadid; END; $_$; ,DROP FUNCTION public.convertquote(integer); publicadminfalse83992q12551682008convertquotetoinvoice(integer)FUNCTION3CREATE FUNCTION convertquotetoinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; _iheadid INTEGER; _iitemid INTEGER; _orderid INTEGER; _ordertype CHARACTER(1); _creditstatus TEXT; _usespos BOOLEAN := false; _blanketpos BOOLEAN := true; _showConvertedQuote BOOLEAN := false; _prospectid INTEGER; _r RECORD; _inNum TEXT; BEGIN -- Check to make sure the quote has not expired IF (SELECT COALESCE(quhead_expire, endOfTime()) < CURRENT_DATE FROM quhead WHERE(quhead_id=pQuheadid)) THEN RETURN -6; END IF; -- Check to make sure that all of the quote items have a valid itemsite SELECT quitem_id INTO _r FROM quitem LEFT OUTER JOIN itemsite ON (quitem_itemsite_id=itemsite_id) WHERE ((itemsite_id IS NULL) AND (quitem_quhead_id=pQuheadid)); IF (FOUND) THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'Q', quhead_id, quhead_warehous_id, quhead_number FROM evntnot, evnttype, quhead WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=quhead_warehous_id) AND (evnttype_name='CannotConvertQuote') AND (quhead_id=pQuheadid) ); RETURN -1; END IF; -- Get Credit Stat, Uses POs and Blanket POs SELECT cust_creditstatus, cust_usespos, cust_blanketpos INTO _creditstatus, _usespos, _blanketpos FROM quhead, custinfo WHERE ((quhead_cust_id=cust_id) AND (quhead_id=pQuheadid)); -- Check to see if customer or prospect IF (NOT FOUND) THEN SELECT prospect_id INTO _prospectid FROM quhead, prospect WHERE ((quhead_cust_id=prospect_id) AND (quhead_id=pQuheadid)); IF (NOT FOUND) THEN RETURN -2; ELSE RETURN -3; END IF; ELSIF (_creditstatus = 'H' AND NOT hasPriv('CreateSOForHoldCustomer')) THEN RETURN -4; ELSIF (_creditstatus = 'W' AND NOT hasPriv('CreateSOForWarnCustomer')) THEN RETURN -5; END IF; -- PO/blanket PO checks IF ( (_usespos) AND (NOT _blanketpos) ) THEN PERFORM invchead_id FROM quhead JOIN invchead ON ( (invchead_cust_id=quhead_cust_id) AND (UPPER(invchead_custponumber)=UPPER(quhead_custponumber)) ) WHERE (quhead_id=pQuheadid); IF (FOUND) THEN RAISE EXCEPTION 'Duplicate Customer PO'; END IF; END IF; --Check to see if an invoice exists with the quote number PERFORM quhead_number, invchead_id FROM quhead, invchead WHERE quhead_id = pQuheadid AND invchead_invcnumber = quhead_number; -- If it does then get a new Invoice number otherwise use the quote number as the invoice number IF (FOUND) THEN SELECT fetchinvcnumber() INTO _inNum; ELSE SELECT quhead_number INTO _inNum FROM quhead WHERE quhead_id = pQuheadid; END IF; --Insert quote info into invoice tables SELECT NEXTVAL('invchead_invchead_id_seq') INTO _iheadid; INSERT INTO invchead ( invchead_ordernumber, invchead_shipdate, invchead_recurring, invchead_id, invchead_invcnumber, invchead_cust_id, invchead_orderdate, invchead_ponumber, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_country, invchead_shipto_id, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_country, invchead_salesrep_id, invchead_commission, invchead_terms_id, invchead_shipchrg_id, invchead_fob, invchead_shipvia, invchead_notes, invchead_freight, invchead_misc_amount, invchead_misc_accnt_id, invchead_misc_descrip, invchead_prj_id, invchead_curr_id, invchead_taxzone_id, invchead_posted, invchead_printed, invchead_invcdate, invchead_saletype_id, invchead_shipzone_id --invchead_taxtype_id, --invchead_shipto_cntct_id, invchead_shipto_cntct_honorific, invchead_shipto_cntct_first_name, --invchead_shipto_cntct_middle, invchead_shipto_cntct_last_name, invchead_shipto_cntct_suffix, --invchead_shipto_cntct_phone, invchead_shipto_cntct_title, invchead_shipto_cntct_fax, --invchead_shipto_cntct_email, --invchead_billto_cntct_id, invchead_billto_cntct_honorific, --invchead_billto_cntct_first_name, invchead_billto_cntct_middle, invchead_billto_cntct_last_name, --invchead_billto_cntct_suffix, invchead_billto_cntct_phone, invchead_billto_cntct_title, --invchead_billto_cntct_fax, invchead_billto_cntct_email, --invchead_ophead_id, --invchead_calcfreight ) SELECT quhead_number, quhead_packdate, 'f', _iheadid, _inNum, quhead_cust_id, CURRENT_DATE, quhead_custponumber, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_billtocountry, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptocountry, quhead_salesrep_id, quhead_commission, quhead_terms_id, cust_shipchrg_id, quhead_fob, quhead_shipvia, quhead_ordercomments, quhead_freight, quhead_misc, quhead_misc_accnt_id, quhead_misc_descrip, quhead_prj_id, quhead_curr_id, quhead_taxzone_id, 'f','f',current_date, quhead_saletype_id, quhead_shipzone_id --quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, --quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, --quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, --quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, --quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, --quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, --quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email, quhead_ophead_id, --quhead_calcfreight FROM quhead JOIN custinfo ON (cust_id=quhead_cust_id) WHERE (quhead_id=pQuheadid); -- Attachments on Invoice not supported but leaving this in for future use: /* UPDATE url SET url_source_id = _iheadid, url_source = 'I' WHERE ((url_source='Q') AND (url_source_id = pQuheadid)); UPDATE imageass SET imageass_source_id = _iheadid, imageass_source = 'I' WHERE ((imageass_source='Q') AND (imageass_source_id = pQuheadid)); UPDATE docass SET docass_source_id = _iheadid, docass_source_type = 'I' WHERE ((docass_source_type='Q') AND (docass_source_id = pQuheadid)); */ -- Comments not supported on Invoice but leaving this in for future use: /* INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text, comment_public ) SELECT comment_cmnttype_id, 'I', _iheadid, comment_date, comment_user, ('Quote-' || comment_text), comment_public FROM comment WHERE ( (comment_source='Q') AND (comment_source_id=pQuheadid) ); */ FOR _r IN SELECT quitem.*, quhead_number, quhead_prj_id, itemsite_item_id, itemsite_leadtime, itemsite_createsopo, itemsite_createsopr, item_type, COALESCE(quitem_itemsrc_id, itemsrc_id, -1) AS itemsrcid FROM quhead JOIN quitem ON (quitem_quhead_id=quhead_id) JOIN itemsite ON (itemsite_id=quitem_itemsite_id) JOIN item ON (item_id=itemsite_item_id) LEFT OUTER JOIN itemsrc ON ( (itemsrc_item_id=item_id) AND (itemsrc_default) ) WHERE (quhead_id=pQuheadid) LOOP SELECT NEXTVAL('invcitem_invcitem_id_seq') INTO _iitemid; INSERT INTO invcitem ( invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, --invcitem_status, --invcitem_scheddate, invcitem_promdate, invcitem_price, invcitem_custprice, invcitem_ordered, invcitem_billed, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_custpn, invcitem_notes, invcitem_taxtype_id ) VALUES ( _iitemid, _iheadid, _r.quitem_linenumber, (SELECT itemsite_item_id FROM itemsite WHERE itemsite_id = _r.quitem_itemsite_id), (SELECT itemsite_warehous_id FROM itemsite WHERE itemsite_id = _r.quitem_itemsite_id), --'O', --_r.quitem_scheddate, _r.quitem_promdate, _r.quitem_price, _r.quitem_custprice, _r.quitem_qtyord, _r.quitem_qtyord, _r.quitem_qty_uom_id, _r.quitem_qty_invuomratio, _r.quitem_price_uom_id, _r.quitem_price_invuomratio, _r.quitem_custpn, _r.quitem_memo, _r.quitem_taxtype_id ); IF (fetchMetricBool('enablextcommissionission')) THEN PERFORM xtcommission.getSalesReps(quhead_cust_id, quhead_shipto_id, _r.itemsite_item_id, _r.quitem_price, _iitemid, 'InvoiceItem') FROM quhead WHERE (quhead_id=pQuheadid); END IF; -- Chracteristics not supported on Invoice but leaving in for future use: /* INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default, charass_price) SELECT 'SI', _iitemid, charass_char_id, charass_value, charass_default, charass_price FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=_r.quitem_id)); */ -- Comments not supported but leaving in for future use /* INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text ) SELECT comment_cmnttype_id, 'SI', _iitemid, comment_date, comment_user, ('Quote-' || comment_text) FROM comment WHERE ( (comment_source='QI') AND (comment_source_id=_r.quitem_id) ); */ _orderid := -1; _ordertype := ''; IF (_r.quitem_createorder) THEN IF (_r.item_type IN ('M')) THEN SELECT createWo( CAST(_r.quhead_number AS INTEGER), supply.itemsite_id, 1, (_r.quitem_qtyord * _r.quitem_qty_invuomratio), _r.itemsite_leadtime, _r.quitem_scheddate, _r.quitem_memo, 'Q', _iitemid, _r.quhead_prj_id ) INTO _orderId FROM itemsite sold, itemsite supply WHERE ((sold.itemsite_item_id=supply.itemsite_item_id) AND (supply.itemsite_warehous_id=_r.quitem_order_warehous_id) AND (sold.itemsite_id=_r.quitem_itemsite_id) ); _orderType := 'W'; INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT 'W', _orderId, charass_char_id, charass_value FROM charass WHERE ((charass_target_type='QI') AND (charass_target_id=_r.quitem_id)); ELSIF ( (_r.item_type IN ('P', 'O')) AND (_r.itemsite_createsopr) ) THEN SELECT createPr( CAST(_r.quhead_number AS INTEGER), _r.quitem_itemsite_id, (_r.quitem_qtyord * _r.quitem_qty_invuomratio), _r.quitem_scheddate, '', 'S', _iitemid ) INTO _orderId; _orderType := 'R'; UPDATE pr SET pr_prj_id=_r.quhead_prj_id WHERE pr_id=_orderId; ELSIF ( (_r.item_type IN ('P', 'O')) AND (_r.itemsite_createsopo) ) THEN IF (_r.quitem_prcost=0) THEN -- For now quote to invoice/dropship will not be supported but with the creation of a createPurchaseToQuote() version of createPurchaseToSale() -- it can be -- SELECT createPurchaseToSale(_iitemid, _r.itemsrcid, _r.quitem_dropship) INTO _orderId; RAISE EXCEPTION 'Quote contains one or more dropship items that may not be converted from a Quote to an Invoice'; ELSE -- For now quote to invoice/dropship will not be supported but with the creation of a createPurchaseToQuote() version of createPurchaseToSale() -- it can be -- SELECT createPurchaseToSale(_iitemid, _r.itemsrcid, _r.quitem_dropship, _r.quitem_prcost) INTO _orderId; RAISE EXCEPTION 'Quote contains one or more dropship items that may not be converted from a Quote to an Invoice'; END IF; _orderType := 'P'; END IF; -- UPDATE invcitem SET invcitem_order_type=_ordertype, invcitem_order_id=_orderid -- WHERE (invcitem_id=_iitemid); END IF; END LOOP; SELECT metric_value INTO _showConvertedQuote FROM metric WHERE metric_name = 'ShowQuotesAfterSO'; IF (_showConvertedQuote) THEN UPDATE quhead SET quhead_status= 'C' WHERE (quhead_id = pQuheadid); ELSE PERFORM deleteQuote(pQuheadid); END IF; RETURN _iheadid; END; $_$; 5DROP FUNCTION public.convertquotetoinvoice(integer); publicadminfalse3992812551682010copybom(integer, integer)FUNCTIONfCREATE FUNCTION copybom(psitemid integer, ptitemid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _result INTEGER; BEGIN SELECT copyBOM (pSItemid, PTItemid, FALSE) into _result; RETURN _result; END; $$; BDROP FUNCTION public.copybom(psitemid integer, ptitemid integer); publicadminfalse8399212551682011"copybom(integer, integer, boolean)FUNCTIONCREATE FUNCTION copybom(psitemid integer, ptitemid integer, pcopyusedat boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _bh RECORD; _bi RECORD; _bomheadid INTEGER; _bomitemid INTEGER; _bomworksetid INTEGER; _temp INTEGER; _schedatwooper BOOLEAN; _booitemseqid INTEGER; BEGIN -- Cache source bomhead SELECT * INTO _bh FROM bomhead WHERE ((bomhead_item_id=pSItemid) AND (bomhead_rev_id=getActiveRevID('BOM', pSItemid))); IF (NOT FOUND) THEN RETURN -1; END IF; -- Make sure that source bomitems exist SELECT bomitem_id INTO _bomitemid FROM bomitem WHERE ((bomitem_parent_item_id=_bh.bomhead_item_id) AND (bomitem_rev_id=_bh.bomhead_rev_id)) LIMIT 1; IF (NOT FOUND) THEN RETURN -2; END IF; -- Make sure that target bomitems do not exist SELECT bomitem_id INTO _bomitemid FROM bomitem WHERE ((bomitem_parent_item_id=pTItemid) AND (bomitem_rev_id= -1)) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Make sure that the parent is not used in the component at some level IF ( SELECT (item_type IN ('M', 'F')) FROM item WHERE (item_id=pSItemid) ) THEN SELECT indentedWhereUsed(pTItemid) INTO _bomworksetid; SELECT bomwork_id INTO _temp FROM bomwork WHERE ( (bomwork_set_id=_bomworksetid) AND (bomwork_item_id=pSItemid) ) LIMIT 1; IF (FOUND) THEN PERFORM deleteBOMWorkset(_bomworksetid); RETURN -4; END IF; PERFORM deleteBOMWorkset(_bomworksetid); END IF; -- Check for existing target bomhead SELECT bomhead_id INTO _bomheadid FROM bomhead WHERE ((bomhead_item_id=pTItemid) AND (bomhead_rev_id= -1)); IF (NOT FOUND) THEN INSERT INTO bomhead ( bomhead_item_id, bomhead_serial, bomhead_docnum, bomhead_batchsize, bomhead_requiredqtyper ) VALUES ( pTItemid, _bh.bomhead_serial, _bh.bomhead_docnum, _bh.bomhead_batchsize, _bh.bomhead_requiredqtyper ); END IF; FOR _bi IN SELECT bomitem.* FROM bomitem(pSItemid) WHERE (bomitem_expires>CURRENT_DATE) LOOP SELECT NEXTVAL('bomitem_bomitem_id_seq') INTO _bomitemid; IF (pCopyUsedAt) THEN _schedatwooper := _bi.bomitem_schedatwooper; _booitemseqid := _bi.bomitem_booitem_seq_id; ELSE _schedatwooper := FALSE; _booitemseqid := -1; END IF; INSERT INTO bomitem ( bomitem_id, bomitem_parent_item_id, bomitem_seqnumber, bomitem_item_id, bomitem_uom_id, bomitem_qtyfxd, bomitem_qtyper, bomitem_scrap, bomitem_schedatwooper, bomitem_booitem_seq_id, bomitem_effective, bomitem_expires, bomitem_ecn, bomitem_createwo, bomitem_issuemethod, bomitem_moddate, bomitem_subtype, bomitem_notes, bomitem_ref ) VALUES ( _bomitemid, pTItemid, _bi.bomitem_seqnumber, _bi.bomitem_item_id, _bi.bomitem_uom_id, _bi.bomitem_qtyfxd, _bi.bomitem_qtyper, _bi.bomitem_scrap, _schedatwooper, _booitemseqid, CURRENT_DATE, _bi.bomitem_expires, _bi.bomitem_ecn, _bi.bomitem_createwo, _bi.bomitem_issuemethod, CURRENT_DATE, _bi.bomitem_subtype, _bi.bomitem_notes, _bi.bomitem_ref ); INSERT INTO bomitemsub ( bomitemsub_bomitem_id, bomitemsub_item_id, bomitemsub_uomratio, bomitemsub_rank ) SELECT _bomitemid, bomitemsub_item_id, bomitemsub_uomratio, bomitemsub_rank FROM bomitemsub WHERE (bomitemsub_bomitem_id=_bi.bomitem_id); END LOOP; RETURN pTItemid; END; $$; WDROP FUNCTION public.copybom(psitemid integer, ptitemid integer, pcopyusedat boolean); publicadminfalse8399212551682012(copybudget(integer, text, text, integer)FUNCTIONyCREATE FUNCTION copybudget(integer, text, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudgheadid ALIAS FOR $1; pName ALIAS FOR $2; pDescrip ALIAS FOR $3; pInterval ALIAS FOR $4; _budgheadid INTEGER; _periodid INTEGER; _result INTEGER; BEGIN SELECT 1 INTO _result FROM budgitem WHERE ((budgitem_budghead_id=pBudgheadid) AND (nextPeriodByInterval(budgitem_period_id, pInterval)=-1)) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; SELECT nextval('budghead_budghead_id_seq') INTO _budgheadid; INSERT INTO budghead (budghead_id, budghead_name, budghead_descrip) VALUES(_budgheadid, pName, pDescrip); INSERT INTO budgitem (budgitem_budghead_id, budgitem_period_id, budgitem_accnt_id, budgitem_amount) SELECT _budgheadid, nextPeriodByInterval(budgitem_period_id, pInterval), budgitem_accnt_id, budgitem_amount FROM budgitem WHERE (budgitem_budghead_id=pBudgheadid); RETURN _budgheadid; END; $_$; ?DROP FUNCTION public.copybudget(integer, text, text, integer); publicadminfalse8399212551682013copycmd(integer, text, text)FUNCTIONCREATE FUNCTION copycmd(integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmdId ALIAS FOR $1; pModule ALIAS FOR $2; pTitle ALIAS FOR $3; _cmdId INTEGER; BEGIN SELECT nextval('cmd_cmd_id_seq') INTO _cmdId; INSERT INTO cmd SELECT _cmdId, pModule, pTitle, cmd_descrip, cmd_privname, cmd_executable FROM cmd WHERE (cmd_id=pCmdId); INSERT INTO cmdarg (cmdarg_cmd_id, cmdarg_order, cmdarg_arg) SELECT _cmdId, cmdarg_order, cmdarg_arg FROM cmdarg WHERE (cmdarg_cmd_id=pCmdId); RETURN 1; END; $_$; 3DROP FUNCTION public.copycmd(integer, text, text); publicadminfalse8399212551744990'copycontract(integer, text, date, date)FUNCTION CREATE FUNCTION copycontract(pcontrctid integer, pnumber text, peffective date, pexpires date) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _contrctid INTEGER; _itemsrcid INTEGER; _r RECORD; BEGIN INSERT INTO contrct ( contrct_number, contrct_vend_id, contrct_descrip, contrct_effective, contrct_expires, contrct_note ) SELECT pNumber, contrct_vend_id, contrct_descrip, pEffective, pExpires, contrct_note FROM contrct WHERE (contrct_id=pContrctid) RETURNING contrct_id INTO _contrctid; FOR _r IN SELECT * FROM itemsrc WHERE (itemsrc_contrct_id=pContrctid) LOOP INSERT INTO itemsrc ( itemsrc_item_id, itemsrc_vend_id, itemsrc_vend_item_number, itemsrc_vend_item_descrip, itemsrc_comments, itemsrc_vend_uom, itemsrc_invvendoruomratio, itemsrc_minordqty, itemsrc_multordqty, itemsrc_leadtime, itemsrc_ranking, itemsrc_active, itemsrc_manuf_name, itemsrc_manuf_item_number, itemsrc_manuf_item_descrip, itemsrc_default, itemsrc_upccode, itemsrc_effective, itemsrc_expires, itemsrc_contrct_id ) VALUES ( _r.itemsrc_item_id, _r.itemsrc_vend_id, _r.itemsrc_vend_item_number, _r.itemsrc_vend_item_descrip, _r.itemsrc_comments, _r.itemsrc_vend_uom, _r.itemsrc_invvendoruomratio, _r.itemsrc_minordqty, _r.itemsrc_multordqty, _r.itemsrc_leadtime, _r.itemsrc_ranking, _r.itemsrc_active, _r.itemsrc_manuf_name, _r.itemsrc_manuf_item_number, _r.itemsrc_manuf_item_descrip, _r.itemsrc_default, _r.itemsrc_upccode, pEffective, pExpires, _contrctid ) RETURNING itemsrc_id INTO _itemsrcid; INSERT INTO itemsrcp ( itemsrcp_itemsrc_id, itemsrcp_qtybreak, itemsrcp_price, itemsrcp_updated, itemsrcp_curr_id, itemsrcp_dropship, itemsrcp_warehous_id, itemsrcp_type, itemsrcp_discntprcnt, itemsrcp_fixedamtdiscount ) SELECT _itemsrcid, itemsrcp_qtybreak, itemsrcp_price, CURRENT_DATE, itemsrcp_curr_id, itemsrcp_dropship, itemsrcp_warehous_id, itemsrcp_type, itemsrcp_discntprcnt, itemsrcp_fixedamtdiscount FROM itemsrcp WHERE (itemsrcp_itemsrc_id=_r.itemsrc_id); END LOOP; RETURN _contrctid; END; $$; eDROP FUNCTION public.copycontract(pcontrctid integer, pnumber text, peffective date, pexpires date); publicadminfalse8399212551682014-copyfinancialgroup(integer, integer, integer)FUNCTIONCREATE FUNCTION copyfinancialgroup(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceGroup ALIAS FOR $1; pFlheadid ALIAS FOR $2; pParentFlgrpid ALIAS FOR $3; _flgrpid INTEGER; BEGIN SELECT nextval('flgrp_flgrp_id_seq') INTO _flgrpid; -- Copy the group item INSERT INTO flgrp (flgrp_id, flgrp_flhead_id, flgrp_flgrp_id, flgrp_order, flgrp_name, flgrp_descrip, flgrp_subtotal, flgrp_summarize, flgrp_subtract, flgrp_showstart, flgrp_showend, flgrp_showdelta, flgrp_showbudget, flgrp_showdiff, flgrp_showcustom, flgrp_showstartprcnt, flgrp_showendprcnt, flgrp_showdeltaprcnt, flgrp_showbudgetprcnt, flgrp_showdiffprcnt, flgrp_showcustomprcnt, flgrp_usealtsubtotal, flgrp_altsubtotal,flgrp_prcnt_flgrp_id) SELECT _flgrpid, pFlheadid, pParentFlgrpid, flgrp_order, flgrp_name, flgrp_descrip, flgrp_subtotal, flgrp_summarize, flgrp_subtract, flgrp_showstart, flgrp_showend, flgrp_showdelta, flgrp_showbudget, flgrp_showdiff, flgrp_showcustom, flgrp_showstartprcnt, flgrp_showendprcnt, flgrp_showdeltaprcnt, flgrp_showbudgetprcnt, flgrp_showdiffprcnt, flgrp_showcustomprcnt, flgrp_usealtsubtotal, flgrp_altsubtotal,flgrp_prcnt_flgrp_id FROM flgrp WHERE (flgrp_id=pSourceGroup); -- Store temporary cross ref info EXECUTE ' INSERT INTO tmp_flgrpxref' || getEffectiveXtUser() || ' (flgrpxref_oldid,flgrpxref_newid) VALUES (' || pSourceGroup || ',' || _flgrpid || ');'; -- Copy any children flitems INSERT INTO flitem (flitem_flhead_id, flitem_flgrp_id, flitem_order, flitem_accnt_id, flitem_showstart, flitem_showend, flitem_showdelta, flitem_showbudget, flitem_showdiff, flitem_showcustom, flitem_subtract, flitem_showstartprcnt, flitem_showendprcnt, flitem_showdeltaprcnt, flitem_showbudgetprcnt, flitem_showdiffprcnt, flitem_showcustomprcnt, flitem_custom_source, flitem_company, flitem_profit, flitem_number, flitem_sub, flitem_type, flitem_subaccnttype_code, flitem_prcnt_flgrp_id) SELECT pFlheadid, _flgrpid, flitem_order, flitem_accnt_id, flitem_showstart, flitem_showend, flitem_showdelta, flitem_showbudget, flitem_showdiff, flitem_showcustom, flitem_subtract, flitem_showstartprcnt, flitem_showendprcnt, flitem_showdeltaprcnt, flitem_showbudgetprcnt, flitem_showdiffprcnt, flitem_showcustomprcnt, flitem_custom_source, flitem_company, flitem_profit, flitem_number, flitem_sub, flitem_type, flitem_subaccnttype_code, flitem_prcnt_flgrp_id FROM flitem WHERE (flitem_flgrp_id=pSourceGroup); -- Copy any children flspecs INSERT INTO flspec (flspec_flhead_id, flspec_flgrp_id, flspec_order, flspec_name, flspec_type, flspec_showstart, flspec_showend, flspec_showdelta, flspec_showbudget, flspec_showdiff, flspec_showcustom, flspec_subtract, flspec_showstartprcnt, flspec_showendprcnt, flspec_showdeltaprcnt, flspec_showbudgetprcnt, flspec_showdiffprcnt, flspec_showcustomprcnt, flspec_custom_source, flspec_prcnt_flgrp_id) SELECT pFlheadid, _flgrpid, flspec_order, flspec_name, flspec_type, flspec_showstart, flspec_showend, flspec_showdelta, flspec_showbudget, flspec_showdiff, flspec_showcustom, flspec_subtract, flspec_showstartprcnt, flspec_showendprcnt, flspec_showdeltaprcnt, flspec_showbudgetprcnt, flspec_showdiffprcnt, flspec_showcustomprcnt, flspec_custom_source, flspec_prcnt_flgrp_id FROM flspec WHERE (flspec_flgrp_id=pSourceGroup); -- Copy the groups PERFORM copyFinancialGroup(flgrp_id, pFlheadid, _flgrpid) FROM flgrp WHERE (flgrp_flgrp_id=pSourceGroup); RETURN _flgrpid; END; $_$; DDROP FUNCTION public.copyfinancialgroup(integer, integer, integer); publicadminfalse3992812551682015"copyfinanciallayout(integer, text)FUNCTIONCREATE FUNCTION copyfinanciallayout(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceFlheadid ALIAS FOR $1; pDestName ALIAS FOR $2; _flheadid INTEGER; _tblName TEXT; BEGIN -- Check for the flhead to be copy that it exists PERFORM flhead_id FROM flhead WHERE (flhead_id=pSourceFlheadid); IF (NOT FOUND) THEN RETURN -1; END IF; -- Check that the name is valid IF (pDestName IS NULL OR pDestName = '') THEN RETURN -2; END IF; -- Check for the name to copy to does not exist PERFORM flhead_id FROM flhead WHERE (flhead_name=pDestName); IF (FOUND) THEN RETURN -3; END IF; -- Copy the flhead record SELECT nextval('flhead_flhead_id_seq') INTO _flheadid; INSERT INTO flhead (flhead_id, flhead_name, flhead_descrip, flhead_showtotal, flhead_showstart, flhead_showend, flhead_showdelta, flhead_showbudget, flhead_showdiff, flhead_showcustom, flhead_custom_label, flhead_usealttotal, flhead_alttotal, flhead_usealtbegin, flhead_altbegin, flhead_usealtend, flhead_altend, flhead_usealtdebits, flhead_altdebits, flhead_usealtcredits, flhead_altcredits, flhead_usealtbudget, flhead_altbudget, flhead_usealtdiff, flhead_altdiff, flhead_type, flhead_active, flhead_sys ) SELECT _flheadid, pDestName, flhead_descrip, flhead_showtotal, flhead_showstart, flhead_showend, flhead_showdelta, flhead_showbudget, flhead_showdiff, flhead_showcustom, flhead_custom_label, flhead_usealttotal, flhead_alttotal, flhead_usealtbegin, flhead_altbegin, flhead_usealtend, flhead_altend, flhead_usealtdebits, flhead_altdebits, flhead_usealtcredits, flhead_altcredits, flhead_usealtbudget, flhead_altbudget, flhead_usealtdiff, flhead_altdiff, flhead_type, flhead_active, false FROM flhead WHERE (flhead_id=pSourceFlheadid); -- Create temporary table so old and new group ids can be stored SELECT relname FROM pg_class INTO _tblName WHERE relname = 'tmp_flgrpxref'; IF (_tblName IS NULL) THEN EXECUTE 'CREATE TEMPORARY TABLE tmp_flgrpxref' || getEffectiveXtUser() || ' ( flgrpxref_oldid int4, flgrpxref_newid int4 ) ON COMMIT DROP;'; END IF; -- Copy the top level groups PERFORM copyFinancialGroup(flgrp_id, _flheadid, -1) FROM flgrp WHERE ((flgrp_flhead_id=pSourceFlheadid) AND (flgrp_flgrp_id=-1)); -- Update Group Percent settings EXECUTE 'UPDATE flgrp SET flgrp_prcnt_flgrp_id=flgrpxref_newid FROM tmp_flgrpxref' || getEffectiveXtUser() || ' WHERE ((flgrp_flhead_id=' || _flheadid || ') AND (flgrp_prcnt_flgrp_id=flgrpxref_oldid));'; EXECUTE 'UPDATE flitem SET flitem_prcnt_flgrp_id=flgrpxref_newid FROM tmp_flgrpxref' || getEffectiveXtUser() || ' WHERE ((flitem_flhead_id=' || _flheadid || ') AND (flitem_prcnt_flgrp_id=flgrpxref_oldid));'; EXECUTE 'UPDATE flspec SET flspec_prcnt_flgrp_id=flgrpxref_newid FROM tmp_flgrpxref' || getEffectiveXtUser() || ' WHERE ((flspec_flhead_id=' || _flheadid || ') AND (flspec_prcnt_flgrp_id=flgrpxref_oldid));'; -- Copy Column Layounts INSERT INTO flcol (flcol_flhead_id, flcol_name, flcol_descrip, flcol_report_id, flcol_month, flcol_quarter, flcol_year, flcol_showdb, flcol_prcnt, flcol_priortype, flcol_priormonth, flcol_priorquarter, flcol_prioryear, flcol_priorprcnt, flcol_priordiff, flcol_priordiffprcnt, flcol_budget, flcol_budgetprcnt, flcol_budgetdiff, flcol_budgetdiffprcnt ) SELECT _flheadid,flcol_name,flcol_descrip, flcol_report_id,flcol_month,flcol_quarter, flcol_year,flcol_showdb,flcol_prcnt, flcol_priortype,flcol_priormonth,flcol_priorquarter, flcol_prioryear,flcol_priorprcnt,flcol_priordiff, flcol_priordiffprcnt,flcol_budget,flcol_budgetprcnt, flcol_budgetdiff,flcol_budgetdiffprcnt FROM flcol WHERE (flcol_flhead_id=pSourceFlheadid); RETURN _flheadid; END; $_$; 9DROP FUNCTION public.copyfinanciallayout(integer, text); publicadminfalse8399212551682016copyglseries(integer)FUNCTIONCREATE FUNCTION copyglseries(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _sequence INTEGER := fetchGLSequence(); _journal INTEGER; BEGIN SELECT gltrans_journalnumber INTO _journal FROM gltrans WHERE ( gltrans_sequence=pSequence ) LIMIT 1; IF (FOUND) THEN INSERT INTO glseries ( glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, glseries_notes, glseries_accnt_id, glseries_amount, glseries_distdate ) SELECT _sequence, gltrans_source, gltrans_doctype, gltrans_docnumber, gltrans_notes, gltrans_accnt_id, gltrans_amount, gltrans_date FROM gltrans WHERE ( gltrans_sequence=pSequence ); ELSE RAISE EXCEPTION 'g/l transaction sequence not found'; END IF; RETURN _sequence; END; $_$; ,DROP FUNCTION public.copyglseries(integer); publicadminfalse8399212551682017,copyincdt(integer, timestamp with time zone)FUNCTION^ CREATE FUNCTION copyincdt(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pparentid ALIAS FOR $1; ptimestamp TIMESTAMP WITH TIME ZONE := COALESCE($2, CURRENT_TIMESTAMP); _alarmid INTEGER; _incdtid INTEGER; _todoitemid INTEGER; BEGIN INSERT INTO incdt(incdt_number, incdt_crmacct_id, incdt_cntct_id, incdt_summary, incdt_descrip, incdt_item_id, incdt_timestamp, incdt_incdtcat_id, incdt_incdtseverity_id,incdt_incdtpriority_id, incdt_owner_username, incdt_recurring_incdt_id ) SELECT fetchIncidentNumber(), incdt_crmacct_id, incdt_cntct_id, incdt_summary, incdt_descrip, incdt_item_id, ptimestamp, incdt_incdtcat_id, incdt_incdtseverity_id,incdt_incdtpriority_id, incdt_owner_username, incdt_recurring_incdt_id FROM incdt WHERE (incdt_id=pparentid) RETURNING incdt_id INTO _incdtid; IF (_incdtid IS NULL) THEN RETURN -10; END IF; SELECT MIN(copyTodoitem(todoitem_id, CAST(ptimestamp AS DATE), _incdtid)) INTO _todoitemid FROM todoitem WHERE (todoitem_incdt_id=pparentid); IF (_todoitemid < 0) THEN RETURN _todoitemid; END IF; SELECT saveAlarm(NULL, NULL, CAST(ptimestamp AS DATE), CAST(alarm_time - DATE_TRUNC('day',alarm_time) AS TIME), alarm_time_offset, alarm_time_qualifier, alarm_event_recipient IS NOT NULL, alarm_event_recipient, alarm_email_recipient IS NOT NULL, alarm_email_recipient, alarm_sysmsg_recipient IS NOT NULL, alarm_sysmsg_recipient, 'INCDT', _incdtid, 'CHANGEONE') INTO _alarmid FROM alarm WHERE ((alarm_source='INCDT') AND (alarm_source_id=pparentid)); IF (_alarmid < 0) THEN RETURN _alarmid; END IF; INSERT INTO docass (docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose ) SELECT _incdtid, 'INCDT', docass_target_id, docass_target_type, docass_purpose FROM docass WHERE ((docass_source_id=pparentid) AND (docass_source_type='INCDT')); RETURN _incdtid; END; $_$; CDROP FUNCTION public.copyincdt(integer, timestamp with time zone); publicadminfalse3992812551682018copyinvoice(integer, date)FUNCTIONCREATE FUNCTION copyinvoice(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; _invcheadid INTEGER; _invcnumber TEXT; _invcdate DATE := COALESCE($2, CURRENT_DATE); _i RECORD; _l RECORD; _invcitemid INTEGER; BEGIN SELECT * INTO _i FROM invchead WHERE(invchead_id=pInvcheadid); IF(NOT FOUND) THEN RETURN -1; END IF; _invcnumber := fetchInvcNumber(); _invcheadid := nextval('invchead_invchead_id_seq'); INSERT INTO invchead (invchead_id, invchead_cust_id, invchead_shipto_id, invchead_ordernumber, invchead_orderdate, invchead_posted, invchead_printed, invchead_invcnumber, invchead_invcdate, invchead_shipdate, invchead_ponumber, invchead_shipvia, invchead_fob, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_phone, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_phone, invchead_salesrep_id, invchead_commission, invchead_terms_id, invchead_freight, invchead_misc_amount, invchead_misc_descrip, invchead_misc_accnt_id, invchead_payment, invchead_paymentref, invchead_notes, invchead_billto_country, invchead_shipto_country, invchead_prj_id, invchead_curr_id, invchead_taxzone_id, invchead_recurring_invchead_id, invchead_saletype_id, invchead_shipzone_id) VALUES(_invcheadid, _i.invchead_cust_id, _i.invchead_shipto_id, _i.invchead_ordernumber, _i.invchead_orderdate, false, false, _invcnumber, _invcdate, _i.invchead_shipdate, _i.invchead_ponumber, _i.invchead_shipvia, _i.invchead_fob, _i.invchead_billto_name, _i.invchead_billto_address1, _i.invchead_billto_address2, _i.invchead_billto_address3, _i.invchead_billto_city, _i.invchead_billto_state, _i.invchead_billto_zipcode, _i.invchead_billto_phone, _i.invchead_shipto_name, _i.invchead_shipto_address1, _i.invchead_shipto_address2, _i.invchead_shipto_address3, _i.invchead_shipto_city, _i.invchead_shipto_state, _i.invchead_shipto_zipcode, _i.invchead_shipto_phone, _i.invchead_salesrep_id, _i.invchead_commission, _i.invchead_terms_id, _i.invchead_freight, _i.invchead_misc_amount, _i.invchead_misc_descrip, _i.invchead_misc_accnt_id, _i.invchead_payment, _i.invchead_paymentref, _i.invchead_notes, _i.invchead_billto_country, _i.invchead_shipto_country, _i.invchead_prj_id, _i.invchead_curr_id, _i.invchead_taxzone_id, _i.invchead_recurring_invchead_id, _i.invchead_saletype_id, _i.invchead_shipzone_id); FOR _l IN SELECT * FROM invcitem WHERE (invcitem_invchead_id=pInvcheadid) LOOP SELECT NEXTVAL('invcitem_invcitem_id_seq') INTO _invcitemid; INSERT INTO invcitem (invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_custprice, invcitem_price, invcitem_notes, invcitem_salescat_id, invcitem_taxtype_id, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_coitem_id) VALUES (_invcitemid, _invcheadid, _l.invcitem_linenumber, _l.invcitem_item_id, _l.invcitem_warehous_id, _l.invcitem_custpn, _l.invcitem_number, _l.invcitem_descrip, _l.invcitem_ordered, _l.invcitem_billed, _l.invcitem_custprice, _l.invcitem_price, _l.invcitem_notes, _l.invcitem_salescat_id, _l.invcitem_taxtype_id, _l.invcitem_qty_uom_id, _l.invcitem_qty_invuomratio, _l.invcitem_price_uom_id, _l.invcitem_price_invuomratio, _l.invcitem_coitem_id); END LOOP; RETURN _invcheadid; END; $_$; 1DROP FUNCTION public.copyinvoice(integer, date); publicadminfalse83992,12551682019copyitem(integer, text)FUNCTIONH CREATE FUNCTION copyitem(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; _itemid INTEGER; _r RECORD; _id INTEGER; BEGIN SELECT NEXTVAL('item_item_id_seq') INTO _itemid; INSERT INTO item ( item_id, item_number, item_descrip1, item_descrip2, item_classcode_id, item_type, item_active, item_picklist, item_sold, item_fractional, item_maxcost, item_prodweight, item_packweight, item_prodcat_id,item_exclusive, item_listprice, item_listcost, item_config, item_comments, item_extdescrip, item_upccode, item_inv_uom_id, item_price_uom_id ) SELECT _itemid, pTItemNumber, item_descrip1, item_descrip2, item_classcode_id, item_type, item_active, item_picklist, item_sold, item_fractional, item_maxcost, item_prodweight, item_packweight, item_prodcat_id, item_exclusive, item_listprice, item_listcost, item_config, item_comments, item_extdescrip, item_upccode, item_inv_uom_id, item_price_uom_id FROM item WHERE (item_id=pSItemid); INSERT INTO imageass (imageass_source_id, imageass_source, imageass_image_id, imageass_purpose) SELECT _itemid, 'I', imageass_image_id, imageass_purpose FROM imageass WHERE ((imageass_source_id=pSItemid) AND (imageass_source='I')); INSERT INTO url (url_source_id, url_source, url_title, url_url) SELECT _itemid, 'I', url_title, url_url FROM url WHERE ((url_source_id=pSItemid) AND (url_source='I')); INSERT INTO itemtax (itemtax_item_id, itemtax_taxzone_id, itemtax_taxtype_id) SELECT _itemid, itemtax_taxzone_id, itemtax_taxtype_id FROM itemtax WHERE(itemtax_item_id=pSItemid); INSERT INTO charass ( charass_target_type, charass_target_id, charass_char_id, charass_value ) SELECT 'I', _itemid, charass_char_id, charass_value FROM charass WHERE ( (charass_target_type='I') AND (charass_target_id=pSItemid) ); FOR _r IN SELECT itemuomconv_id, itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional FROM itemuomconv WHERE(itemuomconv_item_id=pSItemid) LOOP SELECT nextval('itemuomconv_itemuomconv_id_seq') INTO _id; INSERT INTO itemuomconv (itemuomconv_id, itemuomconv_item_id, itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional) VALUES(_id, _itemid, _r.itemuomconv_from_uom_id, _r.itemuomconv_from_value, _r.itemuomconv_to_uom_id, _r.itemuomconv_to_value, _r.itemuomconv_fractional); INSERT INTO itemuom (itemuom_itemuomconv_id, itemuom_uomtype_id) SELECT _id, itemuom_uomtype_id FROM itemuom WHERE(itemuom_itemuomconv_id=_r.itemuomconv_id); END LOOP; RETURN _itemid; END; $_$; .DROP FUNCTION public.copyitem(integer, text); publicadminfalse39928125516820202copyitem(integer, text, boolean, boolean, boolean)FUNCTIONCREATE FUNCTION copyitem(integer, text, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; pCopyBOM ALIAS FOR $3; pCopyBOO ALIAS FOR $4; -- deprecated - xtmfg-specific pCopyCosts ALIAS FOR $5; BEGIN RAISE NOTICE 'copyItem(INTEGER, TEXT, BOOLEAN, BOOLEAN, BOOLEAN) has been deprecated. Use copyItem(INTEGER, TEXT) or copyItem(INTEGER, TEXT, BOOLEAN, BOOLEAN) or a package-specific version instead.'; RETURN copyItem(pSItemid, pTItemNumber, pCopyBOM, pCopyCosts); END; $_$; IDROP FUNCTION public.copyitem(integer, text, boolean, boolean, boolean); publicadminfalse3992812551682021;copyitem(integer, text, boolean, boolean, boolean, boolean)FUNCTION=CREATE FUNCTION copyitem(integer, text, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; pCopyBOM ALIAS FOR $3; pCopyBOO ALIAS FOR $4; -- deprecated - xtmfg-specific pCopyCosts ALIAS FOR $5; pCopyUsedAt ALIAS FOR $6; -- deprecated - xtmfg-specific BEGIN RETURN copyItem(pSItemid, pTItemNumber, pCopyBOM, pCopyCosts); END; $_$; RDROP FUNCTION public.copyitem(integer, text, boolean, boolean, boolean, boolean); publicadminfalse8399212551682022)copyitem(integer, text, boolean, boolean)FUNCTIONCREATE FUNCTION copyitem(integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; pCopyBOM ALIAS FOR $3; pCopyCosts ALIAS FOR $4; _itemid INTEGER; BEGIN _itemid := copyItem(pSItemid, pTItemNumber); IF (pCopyBOM) THEN PERFORM copyBOM(pSItemid, _itemid, FALSE); END IF; IF (pCopyCosts) THEN INSERT INTO itemcost ( itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_curr_id, itemcost_updated ) SELECT _itemid, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, CURRENT_DATE, itemcost_actcost, itemcost_curr_id, CURRENT_DATE FROM itemcost WHERE (itemcost_item_id=pSItemid); END IF; RETURN _itemid; END; $_$; @DROP FUNCTION public.copyitem(integer, text, boolean, boolean); publicadminfalse3992812551682023copyitemsite(integer, integer)FUNCTIONCREATE FUNCTION copyitemsite(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemsiteid ALIAS FOR $1; pdestwhsid ALIAS FOR $2; _destwhs whsinfo%ROWTYPE; _new itemsite%ROWTYPE; BEGIN -- make a copy of the old itemsite SELECT * INTO _new FROM itemsite WHERE (itemsite_id=pitemsiteid); IF (NOT FOUND) THEN RETURN -1; END IF; -- if there is no dest warehouse then perhaps the user is manually copying it IF (pdestwhsid IS NOT NULL) THEN SELECT * INTO _destwhs FROM whsinfo WHERE (warehous_id=pdestwhsid); IF (NOT FOUND) THEN RETURN -2; END IF; END IF; IF (NOT checkPrivilege('MaintainItemSites')) THEN RETURN -3; END IF; SELECT itemsite_id INTO _new.itemsite_id FROM itemsite WHERE ((itemsite_item_id=_new.itemsite_item_id) AND (itemsite_warehous_id=pdestwhsid OR (itemsite_warehous_id IS NULL AND pdestwhsid IS NULL))); IF (FOUND) THEN RETURN _new.itemsite_id; END IF; -- now override the things we know have to change _new.itemsite_id := NEXTVAL('itemsite_itemsite_id_seq'); _new.itemsite_warehous_id := pdestwhsid; _new.itemsite_qtyonhand := 0; _new.itemsite_value := 0; _new.itemsite_datelastcount := NULL; _new.itemsite_datelastused := NULL; _new.itemsite_nnqoh := 0; _new.itemsite_location_id := -1; IF (_destwhs.warehous_transit) THEN _new.itemsite_reorderlevel := 0; _new.itemsite_ordertoqty := 0; _new.itemsite_soldranking := NULL; _new.itemsite_posupply := FALSE; _new.itemsite_wosupply := FALSE; _new.itemsite_loccntrl := FALSE; _new.itemsite_safetystock := 0; _new.itemsite_minordqty := 0; _new.itemsite_multordqty := 0; _new.itemsite_leadtime := 0; _new.itemsite_controlmethod := 'R'; IF(_new.itemsite_costmethod='N') THEN _new.itemsite_costmethod := 'S'; END IF; _new.itemsite_active := TRUE; -- ? _new.itemsite_plancode_id := -1; -- ? _new.itemsite_costcat_id := -1; _new.itemsite_eventfence := 1; _new.itemsite_sold := FALSE; _new.itemsite_stocked := FALSE; _new.itemsite_location_id := -1; _new.itemsite_useparams := FALSE; _new.itemsite_useparamsmanual := FALSE; _new.itemsite_createpr := FALSE; _new.itemsite_location := NULL; _new.itemsite_location_comments := NULL; _new.itemsite_notes := 'Transit Warehouse'; _new.itemsite_nnqoh := 0; _new.itemsite_createwo := FALSE; _new.itemsite_costcat_id := _destwhs.warehous_costcat_id; END IF; INSERT INTO itemsite ( itemsite_id, itemsite_item_id, itemsite_warehous_id, itemsite_qtyonhand, itemsite_costmethod, itemsite_value, itemsite_reorderlevel, itemsite_ordertoqty, itemsite_cyclecountfreq, itemsite_datelastcount, itemsite_datelastused, itemsite_posupply, itemsite_wosupply, itemsite_loccntrl, itemsite_safetystock, itemsite_minordqty, itemsite_multordqty, itemsite_leadtime, itemsite_abcclass, itemsite_issuemethod, itemsite_controlmethod, itemsite_active, itemsite_plancode_id, itemsite_costcat_id, itemsite_eventfence, itemsite_sold, itemsite_stocked, itemsite_freeze, itemsite_location_id, itemsite_useparams, itemsite_useparamsmanual, itemsite_soldranking, itemsite_createpr, itemsite_location, itemsite_location_comments, itemsite_notes, itemsite_perishable, itemsite_nnqoh, itemsite_autoabcclass, itemsite_ordergroup, itemsite_disallowblankwip, itemsite_maxordqty, itemsite_mps_timefence, itemsite_createwo, itemsite_warrpurc, itemsite_autoreg, itemsite_planning_type, itemsite_supply_itemsite_id ) VALUES ( _new.itemsite_id, _new.itemsite_item_id, _new.itemsite_warehous_id, _new.itemsite_qtyonhand, _new.itemsite_costmethod, _new.itemsite_value, _new.itemsite_reorderlevel, _new.itemsite_ordertoqty, _new.itemsite_cyclecountfreq, _new.itemsite_datelastcount, _new.itemsite_datelastused, _new.itemsite_posupply, _new.itemsite_wosupply, _new.itemsite_loccntrl, _new.itemsite_safetystock, _new.itemsite_minordqty, _new.itemsite_multordqty, _new.itemsite_leadtime, _new.itemsite_abcclass, _new.itemsite_issuemethod, _new.itemsite_controlmethod, _new.itemsite_active, _new.itemsite_plancode_id, _new.itemsite_costcat_id, _new.itemsite_eventfence, _new.itemsite_sold, _new.itemsite_stocked, _new.itemsite_freeze, _new.itemsite_location_id, _new.itemsite_useparams, _new.itemsite_useparamsmanual, _new.itemsite_soldranking, _new.itemsite_createpr, _new.itemsite_location, _new.itemsite_location_comments, _new.itemsite_notes, _new.itemsite_perishable, _new.itemsite_nnqoh, _new.itemsite_autoabcclass, _new.itemsite_ordergroup, _new.itemsite_disallowblankwip, _new.itemsite_maxordqty, _new.itemsite_mps_timefence, _new.itemsite_createwo, _new.itemsite_warrpurc, _new.itemsite_autoreg, _new.itemsite_planning_type, _new.itemsite_supply_itemsite_id ); RETURN _new.itemsite_id; END; $_$; 5DROP FUNCTION public.copyitemsite(integer, integer); publicadminfalse3992812551682024copylocale(integer)FUNCTION CREATE FUNCTION copylocale(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocaleid ALIAS FOR $1; _localecode TEXT; _localeid INTEGER; BEGIN SELECT locale_code INTO _localecode FROM locale WHERE (locale_id=pLocaleid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Attempt to copy a non-existent locale-id.'; END IF; IF (EXISTS(SELECT locale_id FROM locale WHERE (locale_code = (_localecode || '-COPY')))) THEN RAISE EXCEPTION 'Attempt to copy a Locale Code that already exists.'; END IF; SELECT NEXTVAL('locale_locale_id_seq') INTO _localeid; INSERT INTO locale (locale_id, locale_code, locale_descrip, locale_lang_file, locale_dateformat, locale_currformat, locale_qtyformat, locale_comments, locale_qtyperformat, locale_salespriceformat, locale_extpriceformat, locale_timeformat, locale_timestampformat, local_costformat, locale_costformat, locale_purchpriceformat, locale_uomratioformat, locale_intervalformat, locale_lang_id, locale_country_id, locale_error_color, locale_warning_color, locale_emphasis_color, locale_altemphasis_color, locale_expired_color, locale_future_color, locale_curr_scale, locale_salesprice_scale, locale_purchprice_scale, locale_extprice_scale, locale_cost_scale, locale_qty_scale, locale_qtyper_scale, locale_uomratio_scale) SELECT _localeid, locale_code || '-COPY', '', locale_lang_file, locale_dateformat, locale_currformat, locale_qtyformat, locale_comments, locale_qtyperformat, locale_salespriceformat, locale_extpriceformat, locale_timeformat, locale_timestampformat, local_costformat, locale_costformat, locale_purchpriceformat, locale_uomratioformat, locale_intervalformat, locale_lang_id, locale_country_id, locale_error_color, locale_warning_color, locale_emphasis_color, locale_altemphasis_color, locale_expired_color, locale_future_color, locale_curr_scale, locale_salesprice_scale, locale_purchprice_scale, locale_extprice_scale, locale_cost_scale, locale_qty_scale, locale_qtyper_scale, locale_uomratio_scale FROM locale WHERE(locale_id=pLocaleid); RETURN _localeid; END; $_$; *DROP FUNCTION public.copylocale(integer); publicadminfalse8399212551682025'copypo(integer, integer, date, boolean)FUNCTION(#CREATE FUNCTION copypo(integer, integer, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSrcid ALIAS FOR $1; pVendid ALIAS FOR $2; pOrderdate ALIAS FOR $3; pRecheckVendinfo ALIAS FOR $4; _tgtid INTEGER; _orderdate DATE; _head RECORD; _itemsrc RECORD; _lineitem RECORD; _qty NUMERIC; _unitprice NUMERIC; _uomratio NUMERIC; _vend_restrictpurch BOOLEAN; BEGIN SELECT * INTO _head FROM pohead WHERE pohead_id = pSrcid; IF (NOT FOUND) THEN RETURN -1; END IF; IF (_head.pohead_vend_id != pVendid) THEN RETURN -2; -- not supported now but should be in the future END IF; -- when enabled, set pRecheckVendinfo if vendors don't match IF (pOrderdate IS NULL) THEN _orderdate := CURRENT_DATE; ELSE _orderdate := pOrderdate; END IF; INSERT INTO pohead (pohead_status, pohead_number, pohead_orderdate, pohead_vend_id, pohead_fob, pohead_shipvia, pohead_freight, pohead_printed, pohead_terms_id, pohead_warehous_id, pohead_vendaddr_id, pohead_agent_username, pohead_curr_id, pohead_saved, pohead_taxtype_id, pohead_taxzone_id, pohead_dropship, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry ) VALUES ( 'U', fetchPoNumber(), _orderdate, _head.pohead_vend_id, _head.pohead_fob, _head.pohead_shipvia, _head.pohead_freight, false, _head.pohead_terms_id, _head.pohead_warehous_id, _head.pohead_vendaddr_id, _head.pohead_agent_username, _head.pohead_curr_id, true, _head.pohead_taxtype_id, _head.pohead_taxzone_id, false, _head.pohead_vend_cntct_id, _head.pohead_vend_cntct_honorific, _head.pohead_vend_cntct_first_name, _head.pohead_vend_cntct_middle, _head.pohead_vend_cntct_last_name, _head.pohead_vend_cntct_suffix, _head.pohead_vend_cntct_phone, _head.pohead_vend_cntct_title, _head.pohead_vend_cntct_fax, _head.pohead_vend_cntct_email, _head.pohead_vendaddress1, _head.pohead_vendaddress2, _head.pohead_vendaddress3, _head.pohead_vendcity, _head.pohead_vendstate, _head.pohead_vendzipcode, _head.pohead_vendcountry, _head.pohead_shipto_cntct_id, _head.pohead_shipto_cntct_honorific, _head.pohead_shipto_cntct_first_name, _head.pohead_shipto_cntct_middle, _head.pohead_shipto_cntct_last_name, _head.pohead_shipto_cntct_suffix, _head.pohead_shipto_cntct_phone, _head.pohead_shipto_cntct_title, _head.pohead_shipto_cntct_fax, _head.pohead_shipto_cntct_email, _head.pohead_shiptoaddress_id, _head.pohead_shiptoaddress1, _head.pohead_shiptoaddress2, _head.pohead_shiptoaddress3, _head.pohead_shiptocity, _head.pohead_shiptostate, _head.pohead_shiptozipcode, _head.pohead_shiptocountry); _tgtid := CURRVAL('pohead_pohead_id_seq'); IF (pRecheckVendinfo) THEN SELECT vend_restrictpurch INTO _vend_restrictpurch FROM vendinfo WHERE (vend_id = pVendid); FOR _lineitem IN SELECT * FROM poitem WHERE (poitem_pohead_id = pSrcid) LOOP SELECT * INTO _itemsrc FROM itemsrc, itemsite WHERE (itemsrc_active AND (itemsrc_id = _lineitem.poitem_itemsrc_id) AND (itemsite_id = _lineitem.poitem_itemsite_id)); IF (NOT FOUND AND _vend_restrictpurch) THEN RETURN -3; END IF; -- handle changes to the uom ratio and consequent qty changes _uomratio := COALESCE(_itemsrc.itemsrc_invvendoruomratio, _lineitem.poitem_invvenduomratio); IF (_itemsrc.itemsrc_invvendoruomratio IS NULL OR _itemsrc.itemsrc_invvendoruomratio != _lineitem.poitem_invvenduomratio) THEN _qty := _lineitem.poitem_qty_ordered; ELSE _qty := _lineitem.poitem_qty_ordered * _lineitem.poitem_invvenduomratio / _itemsrc.itemsrc_invvendoruomratio; IF (_itemsrc.itemsrc_minordqty IS NOT NULL) THEN IF (_qty < _itemsrc.itemsrc_minordqty) THEN _qty := _itemsrc.itemsrc_minordqty; ELSIF (_itemsrc.itemsrc_multordqty > 0 AND _qty % _itemsrc.itemsrc_multordqty > 0) THEN _qty = _qty % _itemsrc.itemsrc_multordqty + _itemsrc.itemsrc_multordqty; END IF; END IF; END IF; IF (_itemsrc.itemsrc_id IS NULL) THEN _unitprice = _lineitem.poitem_unitprice; ELSE SELECT itemsrcPrice(_itemsrc.itemsrc_id, _head.pohead_warehous_id, _head.pohead_dropship, _lineitem.poitem_qty_ordered, _head.pohead_curr_id, CURRENT_DATE) INTO _unitprice; IF (_unitprice IS NULL) THEN RETURN -4; END IF; END IF; INSERT INTO poitem (poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_comments, poitem_expcat_id, poitem_itemsrc_id, poitem_freight, poitem_stdcost, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id ) VALUES ( 'U', _tgtid, _lineitem.poitem_linenumber, _orderdate + COALESCE(_itemsrc.itemsrc_leadtime, 0), _lineitem.poitem_itemsite_id, COALESCE(_itemsrc.itemsrc_vend_item_descrip, _lineitem.poitem_vend_item_descrip), COALESCE(_itemsrc.itemsrc_vend_uom, _lineitem.poitem_vend_uom), COALESCE(_itemsrc.itemsrc_invvendoruomratio, _lineitem.poitem_invvenduomratio), _qty, _unitprice, COALESCE(_itemsrc.itemsrc_vend_item_number, _lineitem.poitem_vend_item_number), _lineitem.poitem_comments, _lineitem.poitem_expcat_id, COALESCE(_itemsrc.itemsrc_id, -1), _lineitem.poitem_freight, stdcost(_itemsrc.itemsite_item_id), COALESCE(_itemsrc.itemsrc_manuf_name, _lineitem.poitem_manuf_name), COALESCE(_itemsrc.itemsrc_manuf_item_number, _lineitem.poitem_manuf_item_number), COALESCE(_itemsrc.itemsrc_manuf_item_descrip, _lineitem.poitem_manuf_item_descrip), _lineitem.poitem_taxtype_id); END LOOP; ELSE INSERT INTO poitem (poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_comments, poitem_expcat_id, poitem_itemsrc_id, poitem_freight, poitem_stdcost, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id ) SELECT 'U', _tgtid, poitem_linenumber, _orderdate + COALESCE(itemsrc_leadtime, 0), poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_comments, poitem_expcat_id, poitem_itemsrc_id, poitem_freight, stdcost(itemsite_item_id), poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id FROM poitem LEFT OUTER JOIN itemsrc ON (itemsrc_id=poitem_itemsrc_id) LEFT OUTER JOIN itemsite ON (itemsite_id=poitem_itemsite_id) WHERE (poitem_pohead_id = pSrcid); END IF; -- Todo: recalculate tax? RETURN _tgtid; END; $_$; >DROP FUNCTION public.copypo(integer, integer, date, boolean); publicadminfalse3992812551682027copypricingschedule(integer)FUNCTION CREATE FUNCTION copypricingschedule(pipsheadid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ipsheadid INTEGER; _ipsitemid INTEGER; _ipsfreightid INTEGER; _x RECORD; BEGIN _ipsheadid := nextval('ipshead_ipshead_id_seq'); INSERT INTO ipshead ( ipshead_id, ipshead_name, ipshead_descrip, ipshead_effective, ipshead_expires, ipshead_curr_id, ipshead_updated ) SELECT _ipsheadid, orig.ipshead_name || (SELECT CAST((COUNT(cnt.ipshead_id)+1) AS text) FROM ipshead cnt WHERE (SUBSTRING(cnt.ipshead_name FROM 0 FOR char_length(orig.ipshead_name)+1) = orig.ipshead_name)), orig.ipshead_descrip, orig.ipshead_effective, orig.ipshead_expires, orig.ipshead_curr_id, CURRENT_DATE FROM ipshead orig WHERE (orig.ipshead_id=pIpsheadId); FOR _x IN SELECT ipsitem_id FROM ipsiteminfo WHERE (ipsitem_ipshead_id=pIpsheadid) LOOP INSERT INTO ipsiteminfo (ipsitem_ipshead_id, ipsitem_item_id, ipsitem_prodcat_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_type, ipsitem_warehous_id) SELECT _ipsheadid, ipsitem_item_id, ipsitem_prodcat_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_type, ipsitem_warehous_id FROM ipsiteminfo WHERE (ipsitem_id=_x.ipsitem_id) RETURNING ipsitem_id INTO _ipsitemid; INSERT INTO ipsitemchar ( ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value, ipsitemchar_price) SELECT _ipsitemid, ipsitemchar_char_id, ipsitemchar_value, ipsitemchar_price FROM ipsitemchar WHERE (ipsitemchar_ipsitem_id=_x.ipsitem_id); END LOOP; FOR _x IN SELECT ipsfreight_id FROM ipsfreight WHERE (ipsfreight_ipshead_id=pIpsheadid) LOOP _ipsfreightid := nextval('ipsfreight_ipsfreight_id_seq'); INSERT INTO ipsfreight (ipsfreight_id, ipsfreight_ipshead_id, ipsfreight_qtybreak, ipsfreight_price, ipsfreight_type, ipsfreight_warehous_id, ipsfreight_shipzone_id,ipsfreight_freightclass_id, ipsfreight_shipvia) SELECT _ipsfreightid, _ipsheadid, ipsfreight_qtybreak, ipsfreight_price,ipsfreight_type, ipsfreight_warehous_id,ipsfreight_shipzone_id, ipsfreight_freightclass_id,ipsfreight_shipvia FROM ipsfreight WHERE (ipsfreight_id=_x.ipsfreight_id); END LOOP; RETURN _ipsheadid; END; $$; >DROP FUNCTION public.copypricingschedule(pipsheadid integer); publicadminfalse8399212551682028copyprj(integer, date)FUNCTIONV CREATE FUNCTION copyprj(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pparentid ALIAS FOR $1; _counter INTEGER; _duedate DATE := COALESCE($2, CURRENT_DATE); _alarmid INTEGER; _i INTEGER; _newnumber TEXT; _p RECORD; _prjid INTEGER; _testnumber TEXT; BEGIN RAISE DEBUG 'copyPrj(%, %) entered', pparentid, _duedate; SELECT * INTO _p FROM prj WHERE (prj_id=pparentid); -- new number = old number up to but not including -, followed by _duedate -- e.g. REPAIR-FRIDGE becomes REPAIR-2010-05-15 -- but REPAIR_FRIDGE becomes REPAIR_FRIDGE-2010-05-15 IF (_p.prj_recurring_prj_id IS NULL) THEN _newnumber := _p.prj_number; ELSE _newnumber := SUBSTRING(_p.prj_number FROM '[^-]*'); IF (_newnumber IS NULL) THEN _newnumber := _p.prj_number; END IF; END IF; _newnumber := _newnumber || '-' || to_char(_duedate, 'YYYY-MM-DD'); RAISE DEBUG 'copyPrj checking if _newnumber % exists', _newnumber; SELECT MAX(prj_number) INTO _testnumber FROM prj WHERE (prj_number ~ ('^' || _newnumber)); IF (_testnumber = _newnumber) THEN _newnumber := _newnumber || '-001'; ELSIF (_testnumber IS NOT NULL) THEN _counter := CAST(SUBSTRING(_testnumber FROM '...$') AS INTEGER); _counter := _counter + 1; _newnumber := REGEXP_REPLACE(_testnumber, '...$', to_char(_counter, 'FM009')); END IF; RAISE DEBUG 'copyPrj _newnumber is now %', _newnumber; INSERT INTO prj( prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po, prj_owner_username, prj_due_date, prj_username, prj_recurring_prj_id ) SELECT _newnumber, _p.prj_name, _p.prj_descrip, 'P', _p.prj_so, _p.prj_wo, _p.prj_po, _p.prj_owner_username, _duedate, _p.prj_username, _p. prj_recurring_prj_id FROM prj WHERE (prj_id=pparentid) RETURNING prj_id INTO _prjid; IF (_prjid IS NULL) THEN RETURN -1; END IF; SELECT saveAlarm(NULL, NULL, _duedate, CAST(alarm_time - DATE_TRUNC('day',alarm_time) AS TIME), alarm_time_offset, alarm_time_qualifier, alarm_event_recipient IS NOT NULL, alarm_event_recipient, alarm_email_recipient IS NOT NULL, alarm_email_recipient, alarm_sysmsg_recipient IS NOT NULL, alarm_sysmsg_recipient, 'J', _prjid, 'CHANGEONE') INTO _alarmid FROM alarm WHERE ((alarm_source='J') AND (alarm_source_id=pparentid)); IF (_alarmid < 0) THEN RETURN _alarmid; END IF; RETURN _prjid; END; $_$; -DROP FUNCTION public.copyprj(integer, date); publicadminfalse83992312551682029#copyproject(integer, text, integer)FUNCTION CREATE FUNCTION copyproject(integer, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrjId ALIAS FOR $1; pPrjNumber ALIAS FOR $2; pDueDateOffset ALIAS FOR $3; _prjid INTEGER; BEGIN IF (COALESCE(pPrjNumber, '') = '') THEN RETURN -1; END IF; IF (EXISTS(SELECT prj_id FROM prj WHERE UPPER(prj_number)=UPPER(pPrjNumber))) THEN RETURN -2; END IF; IF (NOT EXISTS(SELECT prj_id FROM prj WHERE prj_id=pPrjId)) THEN RETURN -3; END IF; SELECT NEXTVAL('prj_prj_id_seq') INTO _prjid; INSERT INTO prj ( prj_id, prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po, prj_owner_username, prj_start_date, prj_due_date, prj_assigned_date, prj_completed_date, prj_username, prj_recurring_prj_id, prj_crmacct_id, prj_cntct_id ) SELECT _prjid, UPPER(pPrjNumber), prj_name, prj_descrip, 'P', prj_so, prj_wo, prj_po, prj_owner_username, NULL, (prj_due_date + COALESCE(pDueDateOffset, 0)), CASE WHEN (prj_username IS NULL) THEN NULL ELSE CURRENT_DATE END, NULL, prj_username, prj_recurring_prj_id, prj_crmacct_id, prj_cntct_id FROM prj WHERE (prj_id=pPrjId); INSERT INTO prjtask ( prjtask_number, prjtask_name, prjtask_descrip, prjtask_prj_id, prjtask_anyuser, prjtask_status, prjtask_hours_budget, prjtask_hours_actual, prjtask_exp_budget, prjtask_exp_actual, prjtask_owner_username, prjtask_start_date, prjtask_due_date, prjtask_assigned_date, prjtask_completed_date, prjtask_username ) SELECT prjtask_number, prjtask_name, prjtask_descrip, _prjid, prjtask_anyuser, 'P', prjtask_hours_budget, 0.0, prjtask_exp_budget, 0.0, prjtask_owner_username, NULL, (prjtask_due_date + COALESCE(pDueDateOffset, 0)), CASE WHEN (prjtask_username IS NULL) THEN NULL ELSE CURRENT_DATE END, NULL, prjtask_username FROM prjtask WHERE (prjtask_prj_id=pPrjId); INSERT INTO docass ( docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose ) SELECT _prjid, docass_source_type, docass_target_id, docass_target_type, docass_purpose FROM docass WHERE ((docass_source_id=pPrjId) AND (docass_source_type='J')); RETURN _prjid; END; $_$; :DROP FUNCTION public.copyproject(integer, text, integer); publicadminfalse8399212551682030copyquote(integer, date)FUNCTIONCREATE FUNCTION copyquote(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pSchedDate ALIAS FOR $2; _quheadid INTEGER; _qunumber TEXT; BEGIN SELECT NEXTVAL('quhead_quhead_id_seq') INTO _quheadid; IF (fetchMetricText('QUNumberGeneration') = 'S') THEN SELECT fetchSoNumber() INTO _qunumber; ELSE SELECT fetchQuNumber() INTO _qunumber; END IF; INSERT INTO quhead ( quhead_id, quhead_number, quhead_cust_id, quhead_prj_id, quhead_quotedate, quhead_packdate, quhead_fob, quhead_warehous_id, quhead_terms_id, quhead_salesrep_id, quhead_custponumber, quhead_shipvia, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptophone, quhead_shiptocountry, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_misc_accnt_id, quhead_misc_descrip, quhead_misc, quhead_freight, quhead_commission, quhead_ordercomments, quhead_shipcomments, quhead_imported, quhead_curr_id, quhead_taxzone_id, quhead_taxtype_id, quhead_ophead_id, quhead_status, quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email ) SELECT _quheadid, _qunumber, quhead_cust_id, quhead_prj_id, CURRENT_DATE, COALESCE(pSchedDate, quhead_packdate), quhead_fob, quhead_warehous_id, quhead_terms_id, quhead_salesrep_id, quhead_custponumber, quhead_shipvia, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptophone, quhead_shiptocountry, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_misc_accnt_id, quhead_misc_descrip, quhead_misc, quhead_freight, quhead_commission, quhead_ordercomments, quhead_shipcomments, FALSE, quhead_curr_id, quhead_taxzone_id, quhead_taxtype_id, quhead_ophead_id, 'O', quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email FROM quhead WHERE (quhead_id=pQuheadid); INSERT INTO quitem ( quitem_quhead_id, quitem_linenumber, quitem_itemsite_id, quitem_scheddate, quitem_promdate, quitem_qtyord, quitem_price, quitem_custprice, quitem_unitcost, quitem_qty_uom_id, quitem_price_uom_id, quitem_qty_invuomratio, quitem_price_invuomratio, quitem_memo, quitem_custpn, quitem_imported, quitem_taxtype_id, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_dropship, quitem_itemsrc_id, quitem_pricemode ) SELECT _quheadid, quitem_linenumber, quitem_itemsite_id, COALESCE(pSchedDate, quitem_scheddate), quitem_promdate, quitem_qtyord, quitem_price, quitem_custprice, stdCost(itemsite_item_id), quitem_qty_uom_id, quitem_price_uom_id, quitem_qty_invuomratio, quitem_price_invuomratio, quitem_memo, quitem_custpn, FALSE, quitem_taxtype_id, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_dropship, quitem_itemsrc_id, quitem_pricemode FROM quitem, itemsite WHERE ( (quitem_itemsite_id=itemsite_id) AND (quitem_quhead_id=pQuheadid)); INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT charass_target_type, b.quitem_id, charass_char_id, charass_value FROM quitem a, charass, quitem b WHERE ((charass_target_type='SI') AND (charass_target_id=a.quitem_id) AND (a.quitem_quhead_id=pQuheadid) AND (b.quitem_quhead_id=_quheadid) AND (a.quitem_linenumber=b.quitem_linenumber) ); RETURN _quheadid; END; $_$; /DROP FUNCTION public.copyquote(integer, date); publicadminfalse8399212551682031copyso(integer, date)FUNCTIONCREATE FUNCTION copyso(psoheadid integer, pscheddate date) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _soheadid INTEGER; _soitemid INTEGER; _soitem RECORD; BEGIN SELECT NEXTVAL('cohead_cohead_id_seq') INTO _soheadid; INSERT INTO cohead ( cohead_id, cohead_number, cohead_cust_id, cohead_custponumber, cohead_type, cohead_orderdate, cohead_warehous_id, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_shiptoaddress4, cohead_shiptoaddress5, cohead_salesrep_id, cohead_terms_id, cohead_fob, cohead_shipvia, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_freight, cohead_misc, cohead_imported, cohead_ordercomments, cohead_shipcomments, cohead_shiptophone, cohead_shipchrg_id, cohead_shipform_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_misc_accnt_id, cohead_misc_descrip, cohead_commission, cohead_miscdate, cohead_holdtype, cohead_packdate, cohead_prj_id, cohead_wasquote, cohead_lastupdated, cohead_shipcomplete, cohead_created, cohead_creator, cohead_quote_number, cohead_billtocountry, cohead_shiptocountry, cohead_curr_id, cohead_calcfreight, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_taxzone_id, cohead_taxtype_id, cohead_ophead_id, cohead_status, cohead_saletype_id, cohead_shipzone_id ) SELECT _soheadid, fetchSoNumber(), cohead_cust_id, cohead_custponumber, cohead_type, CURRENT_DATE, cohead_warehous_id, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_shiptoaddress4, cohead_shiptoaddress5, cohead_salesrep_id, cohead_terms_id, cohead_fob, cohead_shipvia, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_freight, cohead_misc, FALSE, cohead_ordercomments, cohead_shipcomments, cohead_shiptophone, cohead_shipchrg_id, cohead_shipform_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_misc_accnt_id, cohead_misc_descrip, cohead_commission, cohead_miscdate, cohead_holdtype, COALESCE(pSchedDate, cohead_packdate), cohead_prj_id, FALSE, cohead_lastupdated, cohead_shipcomplete, NULL, getEffectiveXtUser(), NULL, cohead_billtocountry, cohead_shiptocountry, cohead_curr_id, cohead_calcfreight, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_taxzone_id, cohead_taxtype_id, cohead_ophead_id, cohead_status, cohead_saletype_id, cohead_shipzone_id FROM cohead WHERE (cohead_id=pSoheadid); FOR _soitem IN SELECT * FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE ( (coitem_cohead_id=pSoheadid) AND (coitem_status <> 'X') AND (coitem_subnumber = 0) ) LOOP SELECT NEXTVAL('coitem_coitem_id_seq') INTO _soitemid; -- insert characteristics first so they can be copied to associated supply order INSERT INTO charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT charass_target_type, _soitemid, charass_char_id, charass_value FROM charass WHERE ((charass_target_type='SI') AND (charass_target_id=_soitem.coitem_id)); INSERT INTO coitem ( coitem_id, coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_unitcost, coitem_price, coitem_custprice, coitem_qtyshipped, coitem_order_id, coitem_memo, coitem_imported, coitem_qtyreturned, coitem_closedate, coitem_custpn, coitem_order_type, coitem_close_username, -- coitem_lastupdated, coitem_substitute_item_id, coitem_created, coitem_creator, coitem_prcost, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_price_uom_id, coitem_price_invuomratio, coitem_warranty, coitem_cos_accnt_id, coitem_qtyreserved, coitem_subnumber, coitem_firm, coitem_taxtype_id ) VALUES ( _soitemid, _soheadid, _soitem.coitem_linenumber, _soitem.coitem_itemsite_id, 'O', COALESCE(pSchedDate, _soitem.coitem_scheddate), _soitem.coitem_promdate, _soitem.coitem_qtyord, stdCost(_soitem.itemsite_item_id), _soitem.coitem_price, _soitem.coitem_custprice, 0.0, -1, _soitem.coitem_memo, FALSE, 0.0, NULL, _soitem.coitem_custpn, _soitem.coitem_order_type, NULL, -- NULL, _soitem.coitem_substitute_item_id, NULL, getEffectiveXtUser(), _soitem.coitem_prcost, _soitem.coitem_qty_uom_id, _soitem.coitem_qty_invuomratio, _soitem.coitem_price_uom_id, _soitem.coitem_price_invuomratio, _soitem.coitem_warranty, _soitem.coitem_cos_accnt_id, 0.0, _soitem.coitem_subnumber, _soitem.coitem_firm, _soitem.coitem_taxtype_id ); END LOOP; RETURN _soheadid; END; $$; ADROP FUNCTION public.copyso(psoheadid integer, pscheddate date); publicadminfalse8399212551682032$copytodoitem(integer, date, integer)FUNCTIONCREATE FUNCTION copytodoitem(integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pparentid ALIAS FOR $1; _duedate DATE := COALESCE($2, CURRENT_DATE); pincdtid ALIAS FOR $3; _alarmid INTEGER; _todoitemid INTEGER; BEGIN INSERT INTO todoitem( todoitem_name, todoitem_description, todoitem_incdt_id, todoitem_creator_username, todoitem_status, todoitem_active, todoitem_due_date, todoitem_assigned_date, todoitem_seq, todoitem_notes, todoitem_crmacct_id, todoitem_ophead_id, todoitem_owner_username,todoitem_priority_id, todoitem_username, todoitem_recurring_todoitem_id ) SELECT todoitem_name, todoitem_description, CASE WHEN pincdtid IS NULL THEN todoitem_incdt_id ELSE pincdtid END, getEffectiveXtUser(), 'N', TRUE, _duedate, CASE WHEN (todoitem_username IS NOT NULL) THEN CURRENT_DATE ELSE NULL END, todoitem_seq, todoitem_notes, todoitem_crmacct_id, todoitem_ophead_id, todoitem_owner_username,todoitem_priority_id, todoitem_username, todoitem_recurring_todoitem_id FROM todoitem WHERE (todoitem_id=pparentid) RETURNING todoitem_id INTO _todoitemid; IF (_todoitemid IS NULL) THEN RETURN -10; END IF; SELECT saveAlarm(NULL, NULL, _duedate, CAST(alarm_time - DATE_TRUNC('day',alarm_time) AS TIME), alarm_time_offset, alarm_time_qualifier, alarm_event, alarm_event_recipient, alarm_email, alarm_email_recipient, alarm_sysmsg, alarm_sysmsg_recipient, 'TODO', _todoitemid, 'CHANGEONE') INTO _alarmid FROM alarm WHERE ((alarm_source='TODO') AND (alarm_source_id=pparentid)); IF (_alarmid < 0) THEN RETURN _alarmid; END IF; RETURN _todoitemid; END; $_$; ;DROP FUNCTION public.copytodoitem(integer, date, integer); publicadminfalse3992812551682033copyvoucher(integer, date)FUNCTION3 CREATE FUNCTION copyvoucher(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoheadid ALIAS FOR $1; _voheadid INTEGER; _vonumber TEXT; _vodate DATE := COALESCE($2, CURRENT_DATE); _i RECORD; _l RECORD; _vodistid INTEGER; BEGIN SELECT * INTO _i FROM vohead WHERE(vohead_id=pVoheadid); IF(NOT FOUND) THEN RETURN -1; END IF; _vonumber := fetchVoNumber(); _voheadid := nextval('vohead_vohead_id_seq'); INSERT INTO vohead (vohead_id, vohead_number, vohead_pohead_id, vohead_posted, vohead_duedate, vohead_invcnumber, vohead_amount, vohead_docdate, vohead_1099, vohead_distdate, vohead_reference, vohead_terms_id, vohead_vend_id, vohead_curr_id, vohead_adjtaxtype_id, vohead_freighttaxtype_id, vohead_gldistdate, vohead_misc, vohead_taxzone_id, vohead_taxtype_id, vohead_notes, vohead_recurring_vohead_id ) VALUES(_voheadid, _vonumber, _i.vohead_pohead_id, false, determineDueDate(_i.vohead_terms_id, _vodate), _i.vohead_invcnumber, _i.vohead_amount, _vodate, _i.vohead_1099, _vodate, _i.vohead_reference, _i.vohead_terms_id, _i.vohead_vend_id, _i.vohead_curr_id, _i.vohead_adjtaxtype_id, _i.vohead_freighttaxtype_id, _vodate, _i.vohead_misc, _i.vohead_taxzone_id, _i.vohead_taxtype_id, _i.vohead_notes, _i.vohead_recurring_vohead_id); FOR _l IN SELECT * FROM vodist WHERE (vodist_vohead_id=pVoheadid) LOOP SELECT NEXTVAL('vodist_vodist_id_seq') INTO _vodistid; INSERT INTO vodist (vodist_id, vodist_poitem_id, vodist_vohead_id, vodist_costelem_id, vodist_accnt_id, vodist_amount, vodist_qty, vodist_expcat_id, vodist_tax_id, vodist_discountable, vodist_notes) VALUES (_vodistid, _l.vodist_poitem_id, _voheadid, _l.vodist_costelem_id, _l.vodist_accnt_id, _l.vodist_amount, _l.vodist_qty, _l.vodist_expcat_id, _l.vodist_tax_id, _l.vodist_discountable, _l.vodist_notes); END LOOP; RETURN _voheadid; END; $_$; 1DROP FUNCTION public.copyvoucher(integer, date); publicadminfalse39928125516820344correctporeceipt(integer, numeric, numeric, integer)FUNCTIONCREATE FUNCTION correctporeceipt(integer, numeric, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPorecvid ALIAS FOR $1; pQty ALIAS FOR $2; pFreight ALIAS FOR $3; pItemlocSeries ALIAS FOR $4; BEGIN RETURN correctReceipt('PO', $1, $2, $3, $4, NULL, NULL); END; $_$; KDROP FUNCTION public.correctporeceipt(integer, numeric, numeric, integer); publicadminfalse8399212551682035Ccorrectporeceipt(integer, numeric, numeric, integer, integer, date)FUNCTIONKCREATE FUNCTION correctporeceipt(integer, numeric, numeric, integer, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN correctReceipt('PO', $1, $2, $3, $4, $5, $6); END; $_$; ZDROP FUNCTION public.correctporeceipt(integer, numeric, numeric, integer, integer, date); publicadminfalse83992125516820365correctproduction(integer, numeric, boolean, boolean)FUNCTIONCREATE FUNCTION correctproduction(integer, numeric, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'correctProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN) has been deprecated. Use corrrectProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER) or a package-specific version instead.'; RETURN correctProduction($1, $2, $3, 0, now()); END; $_$; LDROP FUNCTION public.correctproduction(integer, numeric, boolean, boolean); publicadminfalse39928512551682037>correctproduction(integer, numeric, boolean, boolean, integer)FUNCTION CREATE FUNCTION correctproduction(integer, numeric, boolean, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'correctProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN, INTEGER) has been deprecated. Use corrrectProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER) or a package-specific version instead.'; RETURN correctProduction($1, $2, $3, $5, now()); END; $_$; UDROP FUNCTION public.correctproduction(integer, numeric, boolean, boolean, integer); publicadminfalse8399212551682038Ocorrectproduction(integer, numeric, boolean, integer, timestamp with time zone)FUNCTIONCREATE FUNCTION correctproduction(integer, numeric, boolean, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pQty ALIAS FOR $2; pBackflush ALIAS FOR $3; pItemlocSeries ALIAS FOR $4; pGlDistTS ALIAS FOR $5; BEGIN RETURN correctProduction($1, $2, $3, $4, $5, NULL); END; $_$; fDROP FUNCTION public.correctproduction(integer, numeric, boolean, integer, timestamp with time zone); publicadminfalse83992612551682039Xcorrectproduction(integer, numeric, boolean, integer, timestamp with time zone, integer)FUNCTIONCREATE FUNCTION correctproduction(integer, numeric, boolean, integer, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pQty ALIAS FOR $2; pBackflush ALIAS FOR $3; pItemlocSeries ALIAS FOR $4; pGlDistTS ALIAS FOR $5; pInvhistId ALIAS FOR $6; _invhistid INTEGER; _itemlocSeries INTEGER; _r RECORD; _parentWIPAccntid INTEGER; _parentQty NUMERIC; _qty NUMERIC; _wipPost NUMERIC; _sense TEXT; _status TEXT; _type TEXT; _qtyfxd NUMERIC := 0; BEGIN -- Qty is positive for Assembly W/O -- Qty is negative for Disassembly W/O IF (pQty = 0) THEN RETURN pItemlocseries; ELSIF (pQty > 0) THEN _sense := 'from'; ELSE _sense := 'to'; END IF; SELECT item_type, roundQty(item_fractional, pQty), wo_status INTO _type, _parentQty, _status FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE (wo_id=pWoid); IF (_status != 'I') THEN RETURN -1; END IF; IF (_type = 'J') THEN RETURN -2; END IF; IF (pItemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; ELSE _itemlocSeries := pItemlocSeries; END IF; -- Calculate the WIP to correct SELECT CASE WHEN (wo_cosmethod = 'D') THEN wo_postedvalue ELSE round(((wo_postedvalue - wo_wipvalue) / wo_qtyrcv * _parentQty), 2) END INTO _wipPost FROM wo WHERE (wo_id=pWoid); -- Post the inventory transaction SELECT postInvTrans( itemsite_id, 'RM', (_parentQty * -1.0), 'W/O', 'WO', formatwonumber(pWoid), '', ('Correct Receive Inventory ' || item_number || ' ' || _sense || ' Manufacturing'), costcat_asset_accnt_id, getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), _itemlocSeries, pGlDistTS, (_wipPost * -1.0), -- only used when cost is average pInvhistId) INTO _invhistid FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN item ON (item_id=itemsite_item_id) JOIN costcat ON (costcat_id=itemsite_costcat_id) WHERE (wo_id=pWoid); -- Decrease this W/O's qty. received and increase its WIP value UPDATE wo SET wo_qtyrcv = (wo_qtyrcv - _parentQty), wo_wipvalue = (wo_wipvalue + (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _wipPost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _parentQty ELSE 0.0 END)) FROM itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (wo_id=pWoid) ); IF (pBackflush) THEN FOR _r IN SELECT item_id, item_fractional, itemsite_id, itemsite_warehous_id, itemsite_controlmethod, itemsite_loccntrl, itemsite_costmethod, wo_qtyrcv, wo_prj_id, womatl_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_issuemethod, womatl_uom_id FROM wo JOIN womatl ON (womatl_wo_id=wo_id AND womatl_issuemethod='L') JOIN itemsite ON (itemsite_id=womatl_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE (wo_id=pWoid) LOOP -- Cache the qty to be issued -- If going back to beginning, unissue fixed qty as well IF (_r.wo_qtyrcv - _parentQty > 0) THEN _qtyfxd := 0; ELSE _qtyfxd := _r.womatl_qtyfxd; END IF; _qty = roundQty(_r.item_fractional, (_qtyfxd + _parentQty * _r.womatl_qtyper) * (1 + _r.womatl_scrap)); IF (_qty > 0) THEN SELECT returnWoMaterial(_r.womatl_id, _qty, _itemlocSeries, pGlDistTS) INTO _itemlocSeries; END IF; END LOOP; -- BEGIN ROB Decrease this W/O's WIP value for custom costing UPDATE wo SET wo_wipvalue = (wo_wipvalue - (itemcost_stdcost * _parentQty)) FROM costelem, itemcost, costcat, itemsite, item WHERE ((wo_id=pWoid) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (costelem_id = itemcost_costelem_id) AND (itemcost_item_id = itemsite_item_id) AND (itemsite_costcat_id = costcat_id) AND (costelem_exp_accnt_id) IS NOT NULL AND (costelem_sys = false)); -- ROB Distribute to G/L - create Cost Variance, debit WIP PERFORM insertGLTransaction( 'W/O', 'WO', formatwonumber(pWoid), ('Correct Post Other Cost ' || item_number || ' ' || _sense || ' Manufacturing'), getPrjAccntId(wo_prj_id, costelem_exp_accnt_id), getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), _invhistid, ((itemcost_stdcost * _parentQty)* -1), CURRENT_DATE ) FROM wo, costelem, itemcost, costcat, itemsite, item WHERE ((wo_id=pWoid) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (costelem_id = itemcost_costelem_id) AND (itemcost_item_id = itemsite_item_id) AND (itemsite_costcat_id = costcat_id) AND (costelem_exp_accnt_id) IS NOT NULL AND (costelem_sys = false)); --End ROB END IF; RETURN _itemlocSeries; END; $_$; oDROP FUNCTION public.correctproduction(integer, numeric, boolean, integer, timestamp with time zone, integer); publicadminfalse8399212551682041Acorrectreceipt(integer, numeric, numeric, integer, integer, date)FUNCTIONCREATE FUNCTION correctreceipt(integer, numeric, numeric, integer, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ BEGIN RETURN correctReceipt($1, $2, $3, $4, $5, $6, NULL); END; $_$; XDROP FUNCTION public.correctreceipt(integer, numeric, numeric, integer, integer, date); publicadminfalse83992712551682042Jcorrectreceipt(integer, numeric, numeric, integer, integer, date, numeric)FUNCTION)CREATE FUNCTION correctreceipt(integer, numeric, numeric, integer, integer, date, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE precvid ALIAS FOR $1; pQty ALIAS FOR $2; pFreight ALIAS FOR $3; _itemlocSeries INTEGER := COALESCE($4, 0); _currid INTEGER := $5; pEffective ALIAS FOR $6; pRecvCost ALIAS FOR $7; _freight NUMERIC; _qty NUMERIC; _invhistid INTEGER; _o RECORD; _r RECORD; _recvcost NUMERIC; _tmp INTEGER; _pricevar NUMERIC := 0.00; _journalNumber INTEGER := fetchJournalNumber('GL-MISC'); BEGIN SELECT recv_qty, recv_date::DATE AS recv_date, recv_freight_curr_id, recv_orderitem_id, round(currToCurr(recv_freight_curr_id, COALESCE(_currid, recv_freight_curr_id), recv_freight, recv_date::DATE),2) AS recv_freight, recv_posted, recv_order_type, COALESCE(itemsite_id, -1) AS itemsiteid, itemsite_item_id, itemsite_costmethod, itemsite_controlmethod, (recv_splitfrom_id IS NOT NULL OR (SELECT (count(*) > 0) FROM recv WHERE (recv_splitfrom_id=recv_id))) AS split INTO _r FROM recv LEFT OUTER JOIN itemsite ON (recv_itemsite_id=itemsite_id) WHERE (recv_id=precvid); IF (NOT FOUND) THEN RETURN _itemlocSeries; END IF; IF (NOT _r.recv_order_type IN ('PO', 'RA', 'TO')) THEN RETURN -11; END IF; IF (_r.split) THEN RETURN -12; END IF; SELECT currToBase(orderitem_unitcost_curr_id, orderitem_unitcost, _r.recv_date::DATE) AS unitprice_base, orderhead_number, orderitem_linenumber, orderhead_curr_id AS freight_curr_id, orderitem_orderhead_type, orderitem_qty_invuomratio INTO _o FROM orderhead, orderitem WHERE ((orderhead_id=orderitem_orderhead_id) AND (orderhead_type=orderitem_orderhead_type) AND (orderitem_id=_r.recv_orderitem_id) AND (orderitem_orderhead_type=_r.recv_order_type)); IF (NOT FOUND) THEN RETURN _itemlocSeries; END IF; -- Default to _o.orderitem_unitcost if recv_purchcost is not supplied -- Note: this should never happen, a value is always supplied if (pRecvCost IS NULL) THEN _recvcost := _o.orderitem_unitcost; ELSE -- Note: if the receipt has already been posted, pRecvCost will always -- equal the original recv_purchcost (cannot be modified in GUI) _recvcost := pRecvCost; END IF; IF (_r.recv_posted) THEN _qty := (pQty - _r.recv_qty); IF (_qty <> 0) THEN IF (_r.itemsiteid = -1) THEN PERFORM insertGLTransaction( _journalNumber,'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory from ' || _r.recv_order_type, expcat_liability_accnt_id, getPrjAccntId(poitem_prj_id, expcat_exp_accnt_id), -1, ROUND(_o.unitprice_base * _qty, 2), pEffective ) FROM poitem, expcat WHERE ((poitem_expcat_id=expcat_id) AND (poitem_id=_r.recv_orderitem_id) AND (_o.orderitem_orderhead_type='PO')); UPDATE recv SET recv_qty=pQty, recv_value=(recv_value + ROUND(_o.unitprice_base * _qty, 2)), recv_date = pEffective WHERE (recv_id=precvid); ELSEIF (_r.itemsite_controlmethod = 'N') THEN PERFORM insertGLTransaction( _journalNumber,'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Controlled Inventory from ' || _r.recv_order_type, costcat_liability_accnt_id, getPrjAccntId(poitem_prj_id, costcat_exp_accnt_id), -1, ROUND(_o.unitprice_base * _qty, 2), pEffective ) FROM poitem, itemsite, costcat WHERE ((poitem_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (poitem_id=_r.recv_orderitem_id) AND (_o.orderitem_orderhead_type='PO')); UPDATE recv SET recv_qty=pQty, recv_value=(recv_value + ROUND(_o.unitprice_base * _qty, 2)), recv_date = pEffective WHERE (recv_id=precvid); ELSE IF (_itemlocSeries = 0 OR _itemlocSeries IS NULL) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; SELECT postInvTrans( itemsite_id, 'RP', (_qty * _o.orderitem_qty_invuomratio), 'S/R', _r.recv_order_type, _o.orderhead_number::TEXT || '-' || _o.orderitem_linenumber::TEXT, '', 'Receive Inventory from ' || _r.recv_order_type, costcat_asset_accnt_id, costcat_liability_accnt_id, _itemlocSeries, pEffective, ROUND(_recvcost * _qty, 2) -- alway passing since it is ignored if not average costed item ) INTO _tmp FROM itemsite, costcat WHERE ((itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsiteid) ); IF(_r.itemsite_costmethod='A') THEN UPDATE recv SET recv_qty=pQty, recv_value=(recv_value + _recvcost * _qty * _o.orderitem_qty_invuomratio), recv_date = pEffective WHERE(recv_id=precvid); ELSE UPDATE recv SET recv_qty=pQty, recv_value=(recv_value + stdcost(_r.itemsite_item_id) * _qty * _o.orderitem_qty_invuomratio), recv_date = pEffective WHERE(recv_id=precvid); END IF; END IF; IF (_r.recv_order_type = 'PO') THEN UPDATE poitem SET poitem_qty_received=(poitem_qty_received + _qty) WHERE (poitem_id=_r.recv_orderitem_id); ELSIF (_r.recv_order_type = 'RA' AND fetchMetricBool('EnableReturnAuth')) THEN UPDATE raitem SET raitem_qtyreceived=(raitem_qtyreceived + _qty) WHERE (raitem_id=_r.recv_orderitem_id); ELSIF (_r.recv_order_type = 'TO' AND fetchMetricBool('MultiWhs')) THEN UPDATE toitem SET toitem_qty_received=(toitem_qty_received + _qty) WHERE (toitem_id=_r.recv_orderitem_id); END IF; END IF; IF (fetchMetricBool('RecordPPVonReceipt')) THEN -- If the 'Purchase Price Variance on Receipt' option is true _invhistid := _tmp; -- Find the difference in the purchase price value expected from the P/O and the value of the transaction SELECT (((currToBase(pohead_curr_id, COALESCE(recv_purchcost, poitem_unitprice), recv_date::DATE)) * _qty) - (invhist_value_after - invhist_value_before)) INTO _pricevar FROM invhist, recv, pohead, poitem WHERE ((recv_orderitem_id=poitem_id) AND (poitem_pohead_id=pohead_id) AND (recv_id=precvid) AND (invhist_id = _invhistid)); -- If difference exists then IF (_pricevar <> 0.00) THEN -- Record an additional GL Transaction for the purchase price variance SELECT insertGLTransaction( _journalNumber, 'S/R', _r.recv_order_type, _o.orderhead_number, 'Purchase price variance adjusted for P/O ' || _o.orderhead_number || ' for item ' || _o.orderitem_linenumber::TEXT, costcat_liability_accnt_id, getPrjAccntId(poitem_prj_id, costcat_purchprice_accnt_id), -1, _pricevar, pEffective, false ) INTO _tmp FROM itemsite, costcat, poitem, recv WHERE ((itemsite_costcat_id=costcat_id) AND (recv_id=precvid) AND (recv_orderitem_id=poitem_id) AND (itemsite_id=recv_itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not insert G/L transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; END IF; END IF; _freight := (pFreight - _r.recv_freight); IF (_freight <> 0) THEN IF (_r.itemsiteid = -1) THEN PERFORM insertGLTransaction( _journalNumber,'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory Freight from ' || _r.recv_order_type, expcat_liability_accnt_id, getPrjAccntId(poitem_prj_id, expcat_freight_accnt_id), -1, ROUND(currToBase(_currid, _freight, pEffective), 2), pEffective ) FROM poitem, expcat WHERE ((poitem_expcat_id=expcat_id) AND (poitem_id=_r.recv_orderitem_id) AND (_r.recv_order_type='PO')); ELSE PERFORM insertGLTransaction(_journalNumber,'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory Freight from ' || _r.recv_order_type, costcat_liability_accnt_id, costcat_freight_accnt_id, -1, round(currToBase(_currid, _freight, pEffective), 2), pEffective ) FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsiteid) ); END IF; IF (_r.recv_order_type = 'PO') THEN UPDATE poitem SET poitem_freight_received=(poitem_freight_received + currToCurr(_currid, _o.freight_curr_id, _freight, pEffective)) WHERE (poitem_id=_r.recv_orderitem_id); -- raitem does not track freight ELSEIF (_r.recv_order_type = 'TO' AND fetchMetricBool('MultiWhs')) THEN UPDATE toitem SET toitem_freight_received=(toitem_freight_received + currToCurr(_currid, _o.freight_curr_id, _freight, pEffective)) WHERE (toitem_id=_r.recv_orderitem_id); END IF; UPDATE recv SET recv_freight=currToCurr(_currid, recv_freight_curr_id, pFreight, pEffective), recv_date = pEffective WHERE (recv_id=precvid); END IF; ELSE -- Receipt not posted yet UPDATE recv SET recv_qty=pQty, recv_freight=pFreight, recv_purchcost=_recvcost WHERE recv_id=precvid; END IF; RETURN _itemlocSeries; END; $_$; aDROP FUNCTION public.correctreceipt(integer, numeric, numeric, integer, integer, date, numeric); publicadminfalse8399212551682044$cosbycustomervalue(integer, integer)FUNCTION3CREATE FUNCTION cosbycustomervalue(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist WHERE ( (cohist_cust_id=pCustid) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; ;DROP FUNCTION public.cosbycustomervalue(integer, integer); publicadminfalse39928125516820454costsbycustomerbyitemsite(integer, integer, integer)FUNCTIONCREATE FUNCTION costsbycustomerbyitemsite(integer, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPeriodid ALIAS FOR $3; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist WHERE ( (cohist_itemsite_id<>pItemsiteid) AND (cohist_cust_id=pCustid) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; KDROP FUNCTION public.costsbycustomerbyitemsite(integer, integer, integer); publicadminfalse8399212551682046&costsbycustomervalue(integer, integer)FUNCTIONUCREATE FUNCTION costsbycustomervalue(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist WHERE ( (cohist_itemsite_id<>-1) AND (cohist_cust_id=pCustid) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; =DROP FUNCTION public.costsbycustomervalue(integer, integer); publicadminfalse8399212551682047/costsbycustomervalue(integer, integer, integer)FUNCTIONCREATE FUNCTION costsbycustomervalue(integer, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pProdcatid ALIAS FOR $3; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right DATE to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist, itemsite, item WHERE ( (cohist_cust_id=pCustid) AND (cohist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_prodcat_id=pProdcatid) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; FDROP FUNCTION public.costsbycustomervalue(integer, integer, integer); publicadminfalse8399212551682048,costsbycustomervalue(integer, integer, text)FUNCTIONCREATE FUNCTION costsbycustomervalue(integer, integer, text) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pProdcat ALIAS FOR $3; _value NUMERIC; _startDate DATE; _endDate DATE; BEGIN _startDate := findPeriodStart(pPeriodid); _endDate := findPeriodEnd(pPeriodid); -- Returns value in base currency -- ToDo: is cohist_shipdate the right date to use? SELECT SUM(cohist_qtyshipped * currToBase(cohist_curr_id, cohist_unitcost, cohist_shipdate)) INTO _value FROM cohist, itemsite, item, prodcat WHERE ( (cohist_cust_id=pCustid) AND (cohist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_prodcat_id=prodcat_id) AND (prodcat_code ~ pProdcat) AND (cohist_invcdate BETWEEN _startDate AND _endDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; CDROP FUNCTION public.costsbycustomervalue(integer, integer, text); publicadminfalse8399212551682049"createaccountingperiod(date, date)FUNCTIONuCREATE FUNCTION createaccountingperiod(date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; pEndDate ALIAS FOR $2; BEGIN RETURN createAccountingPeriod(pStartDate, pEndDate, NULL, NULL); END; $_$; 9DROP FUNCTION public.createaccountingperiod(date, date); publicadminfalse83992125516820504createaccountingperiod(date, date, integer, integer)FUNCTIONm CREATE FUNCTION createaccountingperiod(date, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; pEndDate ALIAS FOR $2; pYearPeriodId ALIAS FOR $3; pQuarter ALIAS FOR $4; _periodid INTEGER; _check INTEGER; _r RECORD; _initial BOOLEAN; _number INTEGER; BEGIN -- Make that the passed start date doesn't fall into any existing period SELECT period_id INTO _check FROM period WHERE (pStartDate BETWEEN period_start AND period_end); IF (FOUND) THEN RETURN -1; END IF; -- Make that the passed end date doesn't fall into any existing period SELECT period_id INTO _check FROM period WHERE (pEndDate BETWEEN period_start AND period_end); IF (FOUND) THEN RETURN -2; END IF; -- Make that the passed start and end dates don't enclose an existing period SELECT period_id INTO _check FROM period WHERE ( (period_start >= pStartDate) AND (period_end <= pEndDate) ); IF (FOUND) THEN RETURN -3; END IF; -- Make sure period is inside fiscal year SELECT yearperiod_id INTO _check FROM yearperiod WHERE ((yearperiod_id=pYearPeriodId) AND (pStartDate>=yearperiod_start) AND (pEndDate<=yearperiod_end)); IF NOT (FOUND) THEN RETURN -4; END IF; -- Determine if this is the initial accounting period SELECT CASE WHEN(count(*) > 0) THEN FALSE ELSE TRUE END INTO _initial FROM period; -- Determine the next number SELECT COALESCE(MAX(period_number),0) + 1 INTO _number FROM period WHERE (period_yearperiod_id=pYearPeriodId); -- Create the new accounting period SELECT NEXTVAL('period_period_id_seq') INTO _periodid; INSERT INTO period ( period_id, period_start, period_end, period_closed, period_freeze, period_initial, period_number, period_yearperiod_id, period_quarter ) VALUES ( _periodid, pStartDate, pEndDate, FALSE, FALSE, _initial, _number, pYearPeriodId, pQuarter ); -- Post any unposted G/L Transactions into the new period FOR _r IN SELECT DISTINCT gltrans_sequence FROM gltrans WHERE ( (NOT gltrans_posted) AND (gltrans_date BETWEEN pStartDate AND pEndDate) ) LOOP PERFORM postIntoTrialBalance(_r.gltrans_sequence); END LOOP; RETURN _periodid; END; $_$; KDROP FUNCTION public.createaccountingperiod(date, date, integer, integer); publicadminfalse8399212551682051&createaccountingyearperiod(date, date)FUNCTIONCREATE FUNCTION createaccountingyearperiod(date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; pEndDate ALIAS FOR $2; _yearperiodid INTEGER; _check INTEGER; _checkBool BOOLEAN; _r RECORD; _initial BOOLEAN; BEGIN -- Make that the passed start date doesn't fall into any existing yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE (pStartDate BETWEEN yearperiod_start AND yearperiod_end); IF (FOUND) THEN RETURN -1; END IF; -- Make that the passed end date doesn't fall into any existing yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE (pEndDate BETWEEN yearperiod_start AND yearperiod_end); IF (FOUND) THEN RETURN -2; END IF; -- Make that the passed start and end dates don't enclose an existing yearperiod SELECT yearperiod_id INTO _check FROM yearperiod WHERE ( (yearperiod_start >= pStartDate) AND (yearperiod_end <= pEndDate) ); IF (FOUND) THEN RETURN -3; END IF; -- Make sure that the passed start is prior to the end date SELECT (pStartDate > pEndDate) INTO _checkBool; IF (_checkBool) THEN RETURN -5; END IF; -- Determine if this is the initial accounting yearperiod SELECT CASE WHEN(count(*) > 0) THEN FALSE ELSE TRUE END INTO _initial FROM yearperiod; -- Create the new accounting yearperiod SELECT NEXTVAL('yearperiod_yearperiod_id_seq') INTO _yearperiodid; INSERT INTO yearperiod ( yearperiod_id, yearperiod_start, yearperiod_end, yearperiod_closed ) VALUES ( _yearperiodid, pStartDate, pEndDate, FALSE ); RETURN _yearperiodid; END; $_$; =DROP FUNCTION public.createaccountingyearperiod(date, date); publicadminfalse8399212551682052createapchecks(integer, date)FUNCTION[CREATE FUNCTION createapchecks(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'createAPChecks() is deprecated - use createChecks() instead'; RETURN createChecks($1, $2); END; $_$; 4DROP FUNCTION public.createapchecks(integer, date); publicadminfalse8399212551682053<createapcreditmemo(integer, text, text, date, numeric, text)FUNCTIONCREATE FUNCTION createapcreditmemo(integer, text, text, date, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; _result INTEGER; BEGIN SELECT createAPCreditMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, -1, pDocDate, -1, baseCurrId() ) INTO _result; RETURN _result; END; $_$; SDROP FUNCTION public.createapcreditmemo(integer, text, text, date, numeric, text); publicadminfalse8399212551682054Ecreateapcreditmemo(integer, integer, text, text, date, numeric, text)FUNCTION\CREATE FUNCTION createapcreditmemo(integer, integer, text, text, date, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; BEGIN RETURN createAPCreditMemo(pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, -1, pDocDate, -1, baseCurrId() ); END; $_$; \DROP FUNCTION public.createapcreditmemo(integer, integer, text, text, date, numeric, text); publicadminfalse8399212551682055Ecreateapcreditmemo(integer, text, text, date, numeric, text, integer)FUNCTIONCREATE FUNCTION createapcreditmemo(integer, text, text, date, numeric, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pAccntid ALIAS FOR $7; _result INTEGER; BEGIN SELECT createAPCreditMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDocDate, -1, baseCurrId() ) INTO _result; RETURN _result; END; $_$; \DROP FUNCTION public.createapcreditmemo(integer, text, text, date, numeric, text, integer); publicadminfalse3992812551682056Ncreateapcreditmemo(integer, integer, text, text, date, numeric, text, integer)FUNCTIONCREATE FUNCTION createapcreditmemo(integer, integer, text, text, date, numeric, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; BEGIN RETURN createAPCreditMemo( pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDocDate, -1, baseCurrId() ); END; $_$; eDROP FUNCTION public.createapcreditmemo(integer, integer, text, text, date, numeric, text, integer); publicadminfalse8399212551682057Tcreateapcreditmemo(integer, text, text, date, numeric, text, integer, date, integer)FUNCTIONCREATE FUNCTION createapcreditmemo(integer, text, text, date, numeric, text, integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pAccntid ALIAS FOR $7; pDueDate ALIAS FOR $8; pTermsid ALIAS FOR $9; _result INTEGER; BEGIN SELECT createAPCreditMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, baseCurrId() ) INTO _result; RETURN _result; END; $_$; kDROP FUNCTION public.createapcreditmemo(integer, text, text, date, numeric, text, integer, date, integer); publicadminfalse8399212551682058]createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer)FUNCTIONCREATE FUNCTION createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; pDueDate ALIAS FOR $9; pTermsid ALIAS FOR $10; BEGIN RETURN createAPCreditMemo( pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, baseCurrId() ); END; $_$; tDROP FUNCTION public.createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer); publicadminfalse3992812551682059fcreateapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer)FUNCTIONCREATE FUNCTION createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; pDueDate ALIAS FOR $9; pTermsid ALIAS FOR $10; pCurrId ALIAS FOR $11; BEGIN RETURN createAPCreditMemo( NULL, pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, pCurrId ); END; $_$; }DROP FUNCTION public.createapcreditmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer); publicadminfalse8399212551682060ocreateapcreditmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer)FUNCTION CREATE FUNCTION createapcreditmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pVendid ALIAS FOR $2; pJournalNumber ALIAS FOR $3; pDocNumber ALIAS FOR $4; pPoNumber ALIAS FOR $5; pDocDate ALIAS FOR $6; pAmount ALIAS FOR $7; pNotes ALIAS FOR $8; pAccntid ALIAS FOR $9; pDueDate ALIAS FOR $10; pTermsid ALIAS FOR $11; pCurrId ALIAS FOR $12; _vendName TEXT; _apAccntid INTEGER; _prepaidAccntid INTEGER; _accntid INTEGER; _glSequence INTEGER; _journalNumber INTEGER; _apopenid INTEGER; _baseAmount NUMERIC; _taxBaseValue NUMERIC; _test INTEGER; BEGIN _apopenid := pId; SELECT findAPAccount(pVendid) INTO _apAccntid; SELECT findAPPrepaidAccount(pVendid) INTO _prepaidAccntid; SELECT vend_name INTO _vendName FROM vendinfo WHERE (vend_id=pVendid); _accntid := pAccntid; PERFORM accnt_id FROM accnt WHERE (accnt_id=_accntid); IF (FOUND) THEN _prepaidAccntid := _accntid; ELSE _accntid := -1; END IF; IF(pJournalNumber IS NULL) THEN SELECT fetchJournalNumber('AP-MISC') INTO _journalNumber; ELSE _journalNumber := pJournalNumber; END IF; SELECT fetchGLSequence() INTO _glSequence; IF (_apopenid IS NOT NULL) THEN UPDATE apopen SET apopen_username=getEffectiveXtUser(), apopen_journalnumber=_journalNumber, apopen_vend_id=pVendid, apopen_docnumber=pDocNumber, apopen_doctype='C', apopen_ponumber=pPoNumber, apopen_docdate=pDocDate, apopen_duedate=pDueDate, apopen_distdate=pDocDate, apopen_terms_id=pTermsid, apopen_amount=pAmount, apopen_paid=0, apopen_open=(pAmount <> 0), apopen_notes=pNotes, apopen_accnt_id=_accntid, apopen_curr_id=pCurrId, apopen_closedate=CASE WHEN (pAmount = 0) THEN pDocdate END WHERE apopen_id = _apopenid; ELSE SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_accnt_id, apopen_curr_id, apopen_closedate ) VALUES ( _apopenid, getEffectiveXtUser(), _journalNumber, pVendid, pDocNumber, 'C', pPoNumber, pDocDate, pDueDate, pDocDate, pTermsid, pAmount, 0, (pAmount <> 0), pNotes, _accntid, pCurrId, CASE WHEN (pAmount = 0) THEN pDocDate END ); END IF; _baseAmount := round(currToBase(pCurrId, pAmount, pDocDate), 2); -- Debit the A/P account for the full amount SELECT insertIntoGLSeries ( _glSequence, 'A/P', 'CM', pDocNumber, _apAccntid, (_baseAmount * -1), pDocDate, (_vendName || ' ' || pNotes) ) INTO _test; -- Credit the Tax account for the tax amount _taxBaseValue := addTaxToGLSeries(_glSequence, 'A/P', 'CM', pDocNumber, pCurrId, pDocDate, pDocDate, 'apopentax', _apopenid, _vendName); UPDATE apopentax SET taxhist_journalnumber = _journalNumber WHERE taxhist_parent_id=_apopenid; -- Credit the Prepaid account for the basis amount SELECT insertIntoGLSeries ( _glSequence, 'A/P', 'CM', pDocNumber, _prepaidAccntid, (_baseAmount - _taxBaseValue), pDocDate, (_vendName || ' ' || pNotes) ) INTO _test; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _journalNumber) INTO _test; IF (_test < 0) THEN DELETE FROM apopen WHERE (apopen_id=_apopenid); PERFORM deleteGLSeries(_glSequence); RAISE EXCEPTION 'postGLSeries commit failed with %', _test; END IF; RETURN pJournalNumber; END; $_$; DROP FUNCTION public.createapcreditmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer); publicadminfalse8399212551682061Acreateapcreditmemoapplication(integer, integer, numeric, integer)FUNCTIONCREATE FUNCTION createapcreditmemoapplication(psourceapopenid integer, ptargetapopenid integer, pamount numeric, pcurrid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _apCreditApplyId INTEGER; BEGIN IF (pAmount > (SELECT currToCurr(apopen_curr_id, pCurrId, ROUND(apopen_amount - apopen_paid, 2), apopen_docdate) FROM apopen WHERE (apopen_id=pTargetApopenId))) THEN RETURN -1; END IF; IF (pAmount > (SELECT ROUND((apopen_amount - apopen_paid) - COALESCE(SUM(currToCurr(apcreditapply_curr_id, apopen_curr_id, apcreditapply_amount, apopen_docdate)), 0), 2) FROM apopen LEFT OUTER JOIN apcreditapply ON ((apcreditapply_source_apopen_id=apopen_id) AND (apcreditapply_target_apopen_id<>pTargetApopenId)) WHERE (apopen_id=pSourceApopenId) GROUP BY apopen_amount, apopen_paid)) THEN RETURN -2; END IF; SELECT apcreditapply_id INTO _apCreditApplyId FROM apcreditapply WHERE ((apcreditapply_source_apopen_id=pSourceApopenId) AND (apcreditapply_target_apopen_id=pTargetApopenId)); IF (FOUND) THEN UPDATE apcreditapply SET apcreditapply_amount=pAmount, apcreditapply_curr_id=pCurrId WHERE (apcreditapply_id=_apCreditApplyId); ELSE INSERT INTO apcreditapply ( apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id ) VALUES ( pSourceApopenId, pTargetApopenId, pAmount, pCurrId) RETURNING apcreditapply_id INTO _apCreditApplyId; END IF; RETURN _apCreditApplyId; END; $$; DROP FUNCTION public.createapcreditmemoapplication(psourceapopenid integer, ptargetapopenid integer, pamount numeric, pcurrid integer); publicadminfalse83992>12551682062;createapdebitmemo(integer, text, text, date, numeric, text)FUNCTIONCREATE FUNCTION createapdebitmemo(integer, text, text, date, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; _result INTEGER; BEGIN SELECT createAPDebitMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, -1, pDocDate, -1, baseCurrId() ) INTO _result; RETURN _result; END; $_$; RDROP FUNCTION public.createapdebitmemo(integer, text, text, date, numeric, text); publicadminfalse3992812551682063Dcreateapdebitmemo(integer, integer, text, text, date, numeric, text)FUNCTION\CREATE FUNCTION createapdebitmemo(integer, integer, text, text, date, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; BEGIN RETURN createAPDebitMemo(pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, -1, pDocDate, -1, baseCurrId() ); END; $_$; [DROP FUNCTION public.createapdebitmemo(integer, integer, text, text, date, numeric, text); publicadminfalse8399212551682064Dcreateapdebitmemo(integer, text, text, date, numeric, text, integer)FUNCTIONCREATE FUNCTION createapdebitmemo(integer, text, text, date, numeric, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pAccntid ALIAS FOR $7; _result INTEGER; BEGIN SELECT createAPDebitMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDocDate, -1, baseCurrId() ) INTO _result; RETURN _result; END; $_$; [DROP FUNCTION public.createapdebitmemo(integer, text, text, date, numeric, text, integer); publicadminfalse8399212551682065Mcreateapdebitmemo(integer, integer, text, text, date, numeric, text, integer)FUNCTIONCREATE FUNCTION createapdebitmemo(integer, integer, text, text, date, numeric, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; BEGIN RETURN createAPDebitMemo( pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDocDate, -1, baseCurrId() ); END; $_$; dDROP FUNCTION public.createapdebitmemo(integer, integer, text, text, date, numeric, text, integer); publicadminfalse8399212551682066Screateapdebitmemo(integer, text, text, date, numeric, text, integer, date, integer)FUNCTIONCREATE FUNCTION createapdebitmemo(integer, text, text, date, numeric, text, integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pPoNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pAccntid ALIAS FOR $7; pDueDate ALIAS FOR $8; pTermsid ALIAS FOR $9; _result INTEGER; BEGIN SELECT createAPDebitMemo( pVendid, fetchJournalNumber('AP-MISC'), pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, baseCurrId() ) INTO _result; RETURN _result; END; $_$; jDROP FUNCTION public.createapdebitmemo(integer, text, text, date, numeric, text, integer, date, integer); publicadminfalse3992812551682067\createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer)FUNCTIONCREATE FUNCTION createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; pDueDate ALIAS FOR $9; pTermsid ALIAS FOR $10; BEGIN RETURN createAPDebitMemo(pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, baseCurrId() ); END; $_$; sDROP FUNCTION public.createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer); publicadminfalse8399212551682068ecreateapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer)FUNCTIONCREATE FUNCTION createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pDocNumber ALIAS FOR $3; pPoNumber ALIAS FOR $4; pDocDate ALIAS FOR $5; pAmount ALIAS FOR $6; pNotes ALIAS FOR $7; pAccntid ALIAS FOR $8; pDueDate ALIAS FOR $9; pTermsid ALIAS FOR $10; pCurrId ALIAS FOR $11; BEGIN RETURN createAPDebitMemo(NULL, pVendid, pJournalNumber, pDocNumber, pPoNumber, pDocDate, pAmount, pNotes, pAccntid, pDueDate, pTermsid, pCurrId ); END; $_$; |DROP FUNCTION public.createapdebitmemo(integer, integer, text, text, date, numeric, text, integer, date, integer, integer); publicadminfalse8399212551682069ncreateapdebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer)FUNCTIONWCREATE FUNCTION createapdebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pVendid ALIAS FOR $2; pJournalNumber ALIAS FOR $3; pDocNumber ALIAS FOR $4; pPoNumber ALIAS FOR $5; pDocDate ALIAS FOR $6; pAmount ALIAS FOR $7; pNotes ALIAS FOR $8; pAccntid ALIAS FOR $9; pDueDate ALIAS FOR $10; pTermsid ALIAS FOR $11; pCurrId ALIAS FOR $12; _vendName TEXT; _apAccntid INTEGER; _prepaidAccntid INTEGER; _accntid INTEGER; _glSequence INTEGER; _journalNumber INTEGER; _apopenid INTEGER; _baseAmount NUMERIC; _taxBaseValue NUMERIC; _test INTEGER; BEGIN _apopenid := pId; SELECT findAPAccount(pVendid) INTO _apAccntid; SELECT findAPPrepaidAccount(pVendid) INTO _prepaidAccntid; SELECT vend_name INTO _vendName FROM vendinfo WHERE (vend_id=pVendid); _accntid := pAccntid; PERFORM accnt_id FROM accnt WHERE (accnt_id=_accntid); IF (FOUND) THEN _prepaidAccntid := _accntid; ELSE _accntid := -1; END IF; IF(pJournalNumber IS NULL) THEN SELECT fetchJournalNumber('AP-MISC') INTO _journalNumber; ELSE _journalNumber := pJournalNumber; END IF; SELECT fetchGLSequence() INTO _glSequence; IF (_apopenid IS NOT NULL) THEN UPDATE apopen SET apopen_username=getEffectiveXtUser(), apopen_journalnumber=_journalNumber, apopen_vend_id=pVendid, apopen_docnumber=pDocNumber, apopen_doctype='D', apopen_ponumber=pPoNumber, apopen_docdate=pDocDate, apopen_duedate=pDueDate, apopen_distdate=pDocDate, apopen_terms_id=pTermsid, apopen_amount=pAmount, apopen_paid=0, apopen_open=(pAmount <> 0), apopen_notes=pNotes, apopen_accnt_id=_accntid, apopen_curr_id=pCurrId, apopen_closedate=CASE WHEN (pAmount = 0) THEN pDocdate END WHERE apopen_id = _apopenid; ELSE SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_amount, apopen_paid, apopen_discountable_amount, apopen_open, apopen_notes, apopen_accnt_id, apopen_curr_id, apopen_closedate ) VALUES ( _apopenid, getEffectiveXtUser(), _journalNumber, pVendid, pDocNumber, 'D', pPoNumber, pDocDate, pDueDate, pDocDate, pTermsid, pAmount, 0, 0, (pAmount <> 0), pNotes, _accntid, pCurrId, CASE WHEN (pAmount = 0) THEN pDocDate END ); END IF; _baseAmount := round(currToBase(pCurrId, pAmount, pDocDate), 2); -- Credit the A/P account for the full amount SELECT insertIntoGLSeries ( _glSequence, 'A/P', 'DM', pDocNumber, _apAccntid, _baseAmount, pDocDate, (_vendName || ' ' || pNotes) ) INTO _test; -- Debit the Tax account for the tax amount _taxBaseValue := addTaxToGLSeries(_glSequence, 'A/P', 'DM', pDocNumber, pCurrId, pDocDate, pDocDate, 'apopentax', _apopenid, _vendName); UPDATE apopentax SET taxhist_journalnumber = _journalNumber WHERE taxhist_parent_id=_apopenid; -- Debit the Prepaid account for the basis amount -- Note, the taxBaseValue is negative so it is added SELECT insertIntoGLSeries ( _glSequence, 'A/P', 'DM', pDocNumber, _prepaidAccntid, (_baseAmount + _taxBaseValue) * -1, pDocDate, (_vendName || ' ' || pNotes) ) INTO _test; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _journalNumber) INTO _test; IF (_test < 0) THEN DELETE FROM apopen WHERE (apopen_id=_apopenid); PERFORM deleteGLSeries(_glSequence); RAISE EXCEPTION 'postGLSeries commit failed with %', _test; END IF; RETURN _apopenid; END; $_$; DROP FUNCTION public.createapdebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, date, integer, integer); publicadminfalse8399212551682070"createapdiscount(integer, numeric)FUNCTIONCREATE FUNCTION createapdiscount(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pAmount ALIAS FOR $2; _result INTEGER; BEGIN SELECT createAPDiscount(pApopenid, fetchJournalNumber('AP-MISC'), pAmount) INTO _result; RETURN _result; END; $_$; 9DROP FUNCTION public.createapdiscount(integer, numeric); publicadminfalse8399212551682071+createapdiscount(integer, integer, numeric)FUNCTION CREATE FUNCTION createapdiscount(integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pAmount ALIAS FOR $3; _ap RECORD; _sequence INTEGER; _apopenid INTEGER; _apcreditapplyid INTEGER; _result INTEGER; _crAccnt INTEGER; _dbAccnt INTEGER; _reference TEXT; _discountDateAmt NUMERIC; BEGIN SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; SELECT * INTO _ap FROM apopen WHERE (apopen_id = pApopenid); IF (NOT FOUND) THEN RETURN -1; END IF; _crAccnt := findAPDiscountAccount(_ap.apopen_vend_id); _dbAccnt := findAPAccount(_ap.apopen_vend_id); _reference := ('Discount for ' || _ap.apopen_doctype || ' ' || _ap.apopen_docnumber); SELECT fetchGLSequence() INTO _sequence; _discountDateAmt = round(pAmount / _ap.apopen_curr_rate, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'DS', _ap.apopen_docnumber, _dbAccnt, _discountDateAmt * -1, CURRENT_DATE, _reference); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'DS', _ap.apopen_docnumber, _crAccnt, _discountDateAmt, CURRENT_DATE, _reference); PERFORM postGLSeries(_sequence, pJournalNumber); INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_curr_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_discount, apopen_curr_rate ) SELECT _apopenid, getEffectiveXtUser(), pJournalNumber, apopen_vend_id, apopen_docnumber, 'C', apopen_ponumber, CURRENT_DATE, CURRENT_DATE, CURRENT_DATE, -1, apopen_curr_id, pAmount, 0, TRUE, _reference, TRUE, apopen_curr_rate FROM apopen WHERE (apopen_id=pApopenid); SELECT apcreditapply_id INTO _apcreditapplyid FROM apcreditapply WHERE ( (apcreditapply_source_apopen_id=_apopenid) AND (apcreditapply_target_apopen_id=pApopenid) ); IF (FOUND) THEN UPDATE apcreditapply SET apcreditapply_amount=pAmount WHERE (apcreditapply_id=_apcreditapplyid); ELSE SELECT nextval('apcreditapply_apcreditapply_id_seq') INTO _apcreditapplyid; INSERT INTO apcreditapply ( apcreditapply_id, apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id ) VALUES ( _apcreditapplyid, _apopenid, pApopenid, pAmount, _ap.apopen_curr_id ); END IF; SELECT postAPCreditMemoApplication(_apopenid) INTO _result; IF (_result < 0) THEN RETURN _result; END IF; RETURN pJournalNumber; END; $_$; BDROP FUNCTION public.createapdiscount(integer, integer, numeric); publicadminfalse8399212551682072Ocreatearcashdeposit(integer, text, text, date, numeric, text, integer, integer)FUNCTIONCREATE FUNCTION createarcashdeposit(integer, text, text, date, numeric, text, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pDocNumber ALIAS FOR $2; pOrderNumber ALIAS FOR $3; pDocDate ALIAS FOR $4; pAmount ALIAS FOR $5; pNotes ALIAS FOR $6; pJournalNumber ALIAS FOR $7; pCurrId ALIAS FOR $8; _prepaidaccntid INTEGER; _deferredaccntid INTEGER; _glSequence INTEGER; _aropenid INTEGER; BEGIN IF (pAmount <= 0) THEN RETURN 0; END IF; _prepaidaccntid := findPrepaidAccount(pCustid); IF (_prepaidaccntid = -1) THEN RAISE EXCEPTION 'There was an error creating the Customer Deposit GL Transactions. No Prepaid Account is assigned.'; END IF; _deferredaccntid := findDeferredAccount(pCustid); IF (_deferredaccntid = -1) THEN RAISE EXCEPTION 'There was an error creating the Customer Deposit GL Transactions. No Deferred Account is assigned.'; END IF; SELECT NEXTVAL('aropen_aropen_id_seq') INTO _aropenid; SELECT insertGLTransaction( pJournalNumber, 'A/R', 'CD', pDocNumber, pNotes, _deferredaccntid, _prepaidaccntid, _aropenid, round(currToBase(pCurrId, pAmount, pDocDate), 2), pDocDate) INTO _glSequence; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_cust_id, aropen_docnumber, aropen_doctype, aropen_ordernumber, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_salesrep_id, aropen_amount, aropen_paid, aropen_commission_due, aropen_commission_paid, aropen_applyto, aropen_ponumber, aropen_cobmisc_id, aropen_open, aropen_notes, aropen_rsncode_id, aropen_salescat_id, aropen_accnt_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), pJournalNumber, pCustid, pDocNumber, 'R', pOrderNumber, pDocDate, pDocDate, pDocDate, -1, NULL, round(pAmount, 2), 0, 0.0, FALSE, '', '', -1, TRUE, pNotes, -1, -1, -1, pCurrId ); RETURN _aropenid; END; $_$; fDROP FUNCTION public.createarcashdeposit(integer, text, text, date, numeric, text, integer, integer); publicadminfalse8399212551682073createarcreditmemo(integer, integer, text, text, date, numeric, text, integer, integer, integer, date, integer, integer, numeric, integer, integer, integer, integer)FUNCTIONCREATE FUNCTION createarcreditmemo(pid integer, pcustid integer, pdocnumber text, pordernumber text, pdocdate date, pamount numeric, pnotes text, prsncodeid integer, psalescatid integer, paccntid integer, pduedate date, ptermsid integer, psalesrepid integer, pcommissiondue numeric DEFAULT 0, pjournalnumber integer DEFAULT NULL::integer, pcurrid integer DEFAULT basecurrid(), paraccntid integer DEFAULT NULL::integer, pcoccpayid integer DEFAULT NULL::integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _accntid INTEGER; _arAccntid INTEGER; _aropenid INTEGER; _cohistid INTEGER; _custName TEXT; _duedate DATE := COALESCE(pDueDate, pDocDate); _glSequence INTEGER; _journalNumber INTEGER; _prepaidAccntid INTEGER; _salescatid INTEGER; _taxBaseValue NUMERIC; _test INTEGER; _tmp INTEGER; BEGIN _aropenid := pId; IF (pAmount <= 0) THEN RETURN 0; END IF; _arAccntid := COALESCE(pARAccntid, findARAccount(pCustid)); _prepaidAccntid := findPrepaidAccount(pCustid); _accntid := pAccntid; _salescatid := pSalescatid; SELECT cust_name INTO _custName FROM custinfo WHERE (cust_id=pCustid); IF EXISTS(SELECT 1 FROM accnt WHERE (accnt_id=_accntid)) THEN _prepaidAccntid := _accntid; ELSE _accntid := -1; END IF; SELECT accnt_id INTO _tmp FROM salescat, accnt WHERE ((salescat_prepaid_accnt_id=accnt_id) AND (salescat_id=_salescatid)); IF (FOUND) THEN _accntid := -1; _prepaidAccntid := _tmp; ELSE _salescatid = -1; END IF; IF(pJournalNumber IS NULL) THEN SELECT fetchJournalNumber('AR-MISC') INTO _journalNumber; ELSE _journalNumber := pJournalNumber; END IF; _glSequence := fetchGLSequence(); -- CreatelUpdate aropen for full amount IF (_aropenid IS NOT NULL) THEN UPDATE aropen SET aropen_username=getEffectiveXtUser(), aropen_journalnumber=_journalNumber, aropen_cust_id=pCustid, aropen_docnumber=pDocNumber, aropen_doctype='C', aropen_ordernumber=pOrderNumber,aropen_docdate=pDocDate, aropen_duedate=_duedate, aropen_distdate=pDocDate, aropen_terms_id=pTermsid, aropen_salesrep_id=pSalesrepid, aropen_amount=round(pAmount, 2), aropen_paid=0, aropen_commission_due=pCommissiondue, aropen_commission_paid=FALSE, aropen_applyto='', aropen_ponumber='', aropen_cobmisc_id=-1, aropen_open=TRUE, aropen_notes=pNotes, aropen_rsncode_id=pRsncodeid, aropen_salescat_id=_salescatid, aropen_accnt_id=_accntid, aropen_curr_id=pCurrId WHERE aropen_id = pId; ELSE SELECT NEXTVAL('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_cust_id, aropen_docnumber, aropen_doctype, aropen_ordernumber, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_salesrep_id, aropen_amount, aropen_paid, aropen_commission_due, aropen_commission_paid, aropen_applyto, aropen_ponumber, aropen_cobmisc_id, aropen_open, aropen_notes, aropen_rsncode_id, aropen_salescat_id, aropen_accnt_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), _journalNumber, pCustid, pDocNumber, 'C', pOrderNumber, pDocDate, _duedate, pDocDate, pTermsid, pSalesrepid, round(pAmount, 2), 0, pCommissiondue, FALSE, '', '', -1, TRUE, pNotes, pRsncodeid, _salescatid, _accntid, pCurrId ); END IF; -- Credit the A/R account for the full amount SELECT insertIntoGLSeries ( _glSequence, 'A/R', 'CM', pDocNumber, _arAccntid, round(currToBase(pCurrId, pAmount, pDocDate), 2), pDocDate, (_custName || ' ' || pNotes)) INTO _test; -- Debit the Tax account for the tax amount _taxBaseValue := addTaxToGLSeries(_glSequence, 'A/R', 'CM', pDocNumber, pCurrId, pDocDate, pDocDate, 'aropentax', _aropenid, (_custName || ' ' || pNotes)); UPDATE aropentax SET taxhist_journalnumber = _journalNumber WHERE taxhist_parent_id=_aropenid; -- Debit the Prepaid account for the basis amount -- Note, _taxBaseValue is negative so it is added to pAmount SELECT insertIntoGLSeries ( _glSequence, 'A/R', 'CM', pDocNumber, _prepaidAccntid, round(currToBase(pCurrId, pAmount * -1, pDocDate) + _taxBaseValue * -1, 2), pDocDate, (_custName || ' ' || pNotes)) INTO _test; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _journalNumber) INTO _test; IF (_test < 0) THEN DELETE FROM aropen WHERE (aropen_id=_aropenid); PERFORM deleteGLSeries(_glSequence); RAISE EXCEPTION 'postGLSeries commit failed with %', _test; END IF; -- Record Sales History INSERT INTO cohist ( cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_curr_id, cohist_sequence, cohist_cohead_ccpay_id) VALUES (CASE WHEN pCustid < 0 THEN NULL ELSE pCustid END, -1, -1, 'M', 'A/R Misc Credit Memo', pDocDate, '', pOrderNumber, '', pDocDate, 'C', pDocNumber, pDocDate, 1, (pAmount - _taxBaseValue) * -1, 0, CASE WHEN pSalesrepid < 0 THEN NULL ELSE pSalesrepid END, (pCommissiondue * -1.0), FALSE, pCurrId, _glSequence, pCoCcpayId) RETURNING cohist_id INTO _cohistid; INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM aropentax WHERE (taxhist_parent_id=_aropenid); RETURN _aropenid; END; $$; rDROP FUNCTION public.createarcreditmemo(pid integer, pcustid integer, pdocnumber text, pordernumber text, pdocdate date, pamount numeric, pnotes text, prsncodeid integer, psalescatid integer, paccntid integer, pduedate date, ptermsid integer, psalesrepid integer, pcommissiondue numeric, pjournalnumber integer, pcurrid integer, paraccntid integer, pcoccpayid integer); publicadminfalse83992D12551682075createardebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, integer, integer, date, integer, integer, numeric, integer)FUNCTIONGCREATE FUNCTION createardebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, integer, integer, date, integer, integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pCustid ALIAS FOR $2; pJournalNumber ALIAS FOR $3; pDocNumber ALIAS FOR $4; pOrderNumber ALIAS FOR $5; pDocDate ALIAS FOR $6; pAmount ALIAS FOR $7; pNotes ALIAS FOR $8; pRsncodeid ALIAS FOR $9; pSalescatid ALIAS FOR $10; pAccntid ALIAS FOR $11; pDueDate ALIAS FOR $12; pTermsid ALIAS FOR $13; pSalesrepid ALIAS FOR $14; pCommissiondue ALIAS FOR $15; pCurrId ALIAS FOR $16; _custName TEXT; _journalNumber INTEGER; _arAccntid INTEGER; _prepaidAccntid INTEGER; _salescatid INTEGER; _accntid INTEGER; _glSequence INTEGER; _aropenid INTEGER; _cohistid INTEGER; _tmp INTEGER; _test INTEGER; _taxBaseValue NUMERIC; BEGIN _aropenid=pId; IF (pAmount <= 0) THEN RETURN 0; END IF; SELECT findARAccount(pCustid) INTO _arAccntid; SELECT findPrepaidAccount(pCustid) INTO _prepaidAccntid; _accntid := pAccntid; _salescatid := pSalescatid; SELECT cust_name INTO _custName FROM custinfo WHERE (cust_id=pCustid); PERFORM accnt_id FROM accnt WHERE (accnt_id=_accntid); IF (FOUND) THEN _prepaidAccntid := _accntid; ELSE _accntid := -1; END IF; SELECT accnt_id INTO _tmp FROM salescat, accnt WHERE ((salescat_prepaid_accnt_id=accnt_id) AND (salescat_id=_salescatid)); IF (FOUND) THEN _accntid := -1; _prepaidAccntid := _tmp; ELSE _salescatid = -1; END IF; IF (pJournalNumber IS NULL) THEN _journalNumber := fetchJournalNumber('AR-MISC'); ELSE _journalNumber := pJournalNumber; END IF; SELECT fetchGLSequence() INTO _glSequence; -- CreatelUpdate aropen for full amount IF (_aropenid IS NOT NULL) THEN UPDATE aropen SET aropen_username=getEffectiveXtUser(), aropen_journalnumber=_journalNumber, aropen_cust_id=pCustid, aropen_docnumber=pDocNumber, aropen_doctype='D', aropen_ordernumber=pOrderNumber,aropen_docdate=pDocDate, aropen_duedate=pDueDate, aropen_distdate=pDocDate, aropen_terms_id=pTermsid, aropen_salesrep_id=pSalesrepid, aropen_amount=round(pAmount, 2), aropen_paid=0, aropen_commission_due=pCommissiondue, aropen_commission_paid=FALSE, aropen_applyto='', aropen_ponumber='', aropen_cobmisc_id=-1, aropen_open=TRUE, aropen_notes=pNotes, aropen_rsncode_id=pRsncodeid, aropen_salescat_id=_salescatid, aropen_accnt_id=_accntid, aropen_curr_id=pCurrId WHERE aropen_id = pId; ELSE SELECT NEXTVAL('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_cust_id, aropen_docnumber, aropen_doctype, aropen_ordernumber, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_salesrep_id, aropen_amount, aropen_paid, aropen_commission_due, aropen_commission_paid, aropen_applyto, aropen_ponumber, aropen_cobmisc_id, aropen_open, aropen_notes, aropen_rsncode_id, aropen_salescat_id, aropen_accnt_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), _journalNumber, pCustid, pDocNumber, 'D', pOrderNumber, pDocDate, pDueDate, pDocDate, pTermsid, pSalesrepid, round(pAmount, 2), 0, pCommissiondue, FALSE, '', '', -1, TRUE, pNotes, pRsncodeid, _salescatid, _accntid, pCurrId ); END IF; -- Debit the A/R account for the full amount SELECT insertIntoGLSeries ( _glSequence, 'A/R', 'DM', pDocNumber, _arAccntid, round(currToBase(pCurrId, pAmount, pDocDate) * -1, 2), pDocDate, (_custName || ' ' || pNotes)) INTO _test; -- Credit the Tax account for the tax amount _taxBaseValue := addTaxToGLSeries(_glSequence, 'A/R', 'DM', pDocNumber, pCurrId, pDocDate, pDocDate, 'aropentax', _aropenid, (_custName || ' ' || pNotes)); UPDATE aropentax SET taxhist_journalnumber = _journalNumber WHERE taxhist_parent_id=_aropenid; -- Credit the Prepaid account for the basis amount SELECT insertIntoGLSeries ( _glSequence, 'A/R', 'DM', pDocNumber, _prepaidAccntid, round(currToBase(pCurrId, (pAmount), pDocDate), 2) - _taxBaseValue, pDocDate, (_custName || ' ' || pNotes)) INTO _test; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _journalNumber) INTO _test; IF (_test < 0) THEN DELETE FROM aropen WHERE (aropen_id=_aropenid); PERFORM deleteGLSeries(_glSequence); RAISE EXCEPTION 'postGLSeries commit failed with %', _test; END IF; -- Record Sales History SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_curr_id, cohist_sequence ) VALUES ( _cohistid, pCustid, -1, -1, 'M', 'A/R Misc Debit Memo', pDocDate, '', '', '', pDocDate, 'D', pDocNumber, pDocDate, 1, (pAmount - _taxBaseValue), 0, pSalesrepid, pCommissiondue, FALSE, pCurrId, _glSequence ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM aropentax WHERE (taxhist_parent_id=_aropenid); RETURN _aropenid; END; $_$; DROP FUNCTION public.createardebitmemo(integer, integer, integer, text, text, date, numeric, text, integer, integer, integer, date, integer, integer, numeric, integer); publicadminfalse8399212551682077createbillingheader(integer)FUNCTIONCREATE FUNCTION createbillingheader(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; _cobmiscid INTEGER; _cohead cohead%ROWTYPE; _miscApplied NUMERIC := 0.0; _freight NUMERIC; _freighttypeid INTEGER; _invcDate DATE; _schedDate DATE; _shipDate DATE; _shipVia TEXT; _tax NUMERIC; BEGIN -- Fetch cohead SELECT * INTO _cohead FROM cohead WHERE (cohead_id=pSoheadid); -- Check for an existing cobmisc SELECT cobmisc_id INTO _cobmiscid FROM cobmisc WHERE ( (NOT cobmisc_posted) AND (cobmisc_cohead_id=pSoheadid) ); IF (FOUND) THEN -- Find a Shipping-Entered freight charge SELECT SUM(currToCurr(shiphead_freight_curr_id, _cohead.cohead_curr_id, shiphead_freight, CURRENT_DATE)) INTO _freight FROM ( SELECT shiphead_id, shiphead_freight_curr_id, shiphead_freight FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id AND NOT shipitem_invoiced) WHERE ((shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid)) GROUP BY shiphead_id, shiphead_freight_curr_id, shiphead_freight) AS data; IF (_freight IS NOT NULL) THEN UPDATE cobmisc SET cobmisc_freight = _freight WHERE (cobmisc_id=_cobmiscid); END IF; RETURN _cobmiscid; END IF; -- Find misc charges that have already been applied for the S/O SELECT COALESCE(SUM(cobmisc_misc), 0.0) INTO _miscApplied FROM cobmisc WHERE (cobmisc_cohead_id=pSoheadid); SELECT NEXTVAL('cobmisc_cobmisc_id_seq') INTO _cobmiscid; -- Check for a valid shipdate SELECT MIN(shiphead_shipdate) INTO _shipDate FROM shiphead, shipitem WHERE ( (shipitem_shiphead_id=shiphead_id) AND (NOT shipitem_invoiced) AND (shiphead_shipped) AND (shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid) ); -- Schema shouldn't allow, but we'll try for now IF (_shipDate IS NULL) THEN SELECT MAX(shipitem_shipdate) INTO _shipDate FROM shipitem, shiphead WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid) ); -- How about a transaction date IF (_shipDate IS NULL) THEN SELECT COALESCE(MAX(shipitem_transdate), CURRENT_DATE) INTO _shipDate FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid) ); END IF; END IF; -- Get the earliest schedule date for this order. SELECT MIN(coitem_scheddate) INTO _schedDate FROM coitem WHERE ((coitem_status <> 'X') AND (coitem_cohead_id=pSoheadid)); IF (_schedDate IS NULL) THEN _schedDate := _shipDate; END IF; -- Find a Shipping-Entered freight charge SELECT SUM(currToCurr(shiphead_freight_curr_id, _cohead.cohead_curr_id, shiphead_freight, CURRENT_DATE)), shiphead_shipvia INTO _freight, _shipVia FROM ( SELECT shiphead_id, shiphead_freight_curr_id, shiphead_freight, shiphead_shipvia FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id AND NOT shipitem_invoiced) WHERE ((shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid)) GROUP BY shiphead_id, shiphead_freight_curr_id, shiphead_freight, shiphead_shipvia) AS data GROUP BY shiphead_shipvia; -- Nope, use the cohead freight charge IF (_freight IS NULL) THEN _freight := _cohead.cohead_freight; END IF; -- Finally, look for a Shipping-Entered Ship Via SELECT shiphead_shipvia INTO _shipVia FROM shiphead, shipitem WHERE ( (shipitem_shiphead_id=shiphead_id) AND (NOT shipitem_invoiced) AND (shiphead_order_type='SO') AND (shiphead_order_id=pSoheadid) ) LIMIT 1; IF (NOT FOUND) THEN _shipVia := _cohead.cohead_shipvia; END IF; --Determine any tax SELECT getFreightTaxTypeId() INTO _freighttypeid; SELECT SUM(COALESCE(taxdetail_tax, 0.00)) INTO _tax FROM calculatetaxdetail(_cohead.cohead_taxzone_id, _freighttypeid, _cohead.cohead_orderdate,_cohead.cohead_curr_id, _freight); -- Determine if we are using the _shipDate or _schedDate or current_date for the _invcDate IF( fetchMetricText('InvoiceDateSource')='scheddate') THEN _invcDate := _schedDate; ELSIF( fetchMetricText('InvoiceDateSource')='shipdate') THEN _invcDate := _shipDate; ELSE _invcDate := current_date; END IF; INSERT INTO cobmisc ( cobmisc_id, cobmisc_cohead_id, cobmisc_shipvia, cobmisc_freight, cobmisc_misc, cobmisc_payment ,cobmisc_notes,cobmisc_shipdate ,cobmisc_invcdate,cobmisc_posted ,cobmisc_misc_accnt_id ,cobmisc_misc_descrip,cobmisc_closeorder,cobmisc_curr_id ,cobmisc_taxtype_id,cobmisc_taxzone_id ) SELECT _cobmiscid,_cohead.cohead_id,_shipVia,_freight, CASE WHEN (_cohead.cohead_misc - _miscApplied = 0.0) THEN 0.0 ELSE (_cohead.cohead_misc - _miscApplied) END,0, _cohead.cohead_ordercomments,_shipDate,_invcDate,FALSE,_cohead.cohead_misc_accnt_id, _cohead.cohead_misc_descrip,NOT(cust_backorder),_cohead.cohead_curr_id, _cohead.cohead_taxtype_id,_cohead.cohead_taxzone_id FROM custinfo WHERE (cust_id=_cohead.cohead_cust_id); RETURN _cobmiscid; END; $_$; 3DROP FUNCTION public.createbillingheader(integer); publicadminfalse83992E12551682079createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text)FUNCTIONCREATE FUNCTION createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pSeqNumber ALIAS FOR $4; pIssueMethod ALIAS FOR $5; pUomId ALIAS FOR $6; pQtyPer ALIAS FOR $7; pScrap ALIAS FOR $8; pEffective ALIAS FOR $9; pExpires ALIAS FOR $10; pCreateWo ALIAS FOR $11; pBOOItemseqid ALIAS FOR $12; pSchedAtWooper ALIAS FOR $13; pECN ALIAS FOR $14; pSubType ALIAS FOR $15; pRevisionid ALIAS FOR $16; pCharId ALIAS FOR $17; pCharVal ALIAS FOR $18; _bomworksetid INTEGER; _temp INTEGER; _bomitemid INTEGER; BEGIN SELECT createBOMItem( pBomitemid, pParentItemid, pComponentItemid, pSeqNumber, pIssueMethod, pUomId, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, pSchedAtWooper, pECN, pSubType, pRevisionid, pCharId, pCharVal, NULL, NULL ) INTO _bomitemid; RETURN _bomitemid; END; $_$; DROP FUNCTION public.createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text); publicadminfalse83992F12551682080createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text)FUNCTION2 CREATE FUNCTION createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pSeqNumber ALIAS FOR $4; pIssueMethod ALIAS FOR $5; pUomId ALIAS FOR $6; pQtyPer ALIAS FOR $7; pScrap ALIAS FOR $8; pEffective ALIAS FOR $9; pExpires ALIAS FOR $10; pCreateWo ALIAS FOR $11; pBOOItemseqid ALIAS FOR $12; pSchedAtWooper ALIAS FOR $13; pECN ALIAS FOR $14; pSubType ALIAS FOR $15; pRevisionid ALIAS FOR $16; pCharId ALIAS FOR $17; pCharVal ALIAS FOR $18; pNotes ALIAS FOR $19; pRef ALIAS FOR $20; _bomworksetid INTEGER; _temp INTEGER; BEGIN -- Make sure that the parent and component are not the same IF (pParentItemid = pComponentItemid) THEN RETURN -1; END IF; -- Make sure that the parent is not used in the component at some level IF ( SELECT (item_type IN ('M', 'F')) FROM item WHERE (item_id=pComponentItemid) ) THEN SELECT indentedWhereUsed(pParentItemid) INTO _bomworksetid; SELECT bomwork_id INTO _temp FROM bomwork WHERE ( (bomwork_set_id=_bomworksetid) AND (bomwork_item_id=pComponentItemid) ) LIMIT 1; IF (FOUND) THEN PERFORM deleteBOMWorkset(_bomworksetid); RETURN -2; END IF; END IF; PERFORM deleteBOMWorkset(_bomworksetid); -- Create the BOM Item INSERT INTO bomitem ( bomitem_id, bomitem_parent_item_id, bomitem_item_id, bomitem_seqnumber, bomitem_issuemethod, bomitem_uom_id, bomitem_qtyper, bomitem_scrap, bomitem_effective, bomitem_expires, bomitem_createwo, bomitem_booitem_seq_id, bomitem_schedatwooper, bomitem_ecn, bomitem_subtype, bomitem_moddate, bomitem_rev_id, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref ) VALUES ( pBomitemid, pParentItemid, pComponentItemid, pSeqNumber, pIssueMethod, pUomId, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, COALESCE(pSchedAtWooper, FALSE), pECN, pSubType, CURRENT_DATE, pRevisionid, pCharId,pCharVal,pNotes, pRef ); RETURN pBomitemid; END; $_$; DROP FUNCTION public.createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text); publicadminfalse39928G12551682081createbomitem(integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text)FUNCTIONCREATE FUNCTION createbomitem(integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pIssueMethod ALIAS FOR $4; pUomId ALIAS FOR $5; pQtyPer ALIAS FOR $6; pScrap ALIAS FOR $7; pEffective ALIAS FOR $8; pExpires ALIAS FOR $9; pCreateWo ALIAS FOR $10; pBOOItemseqid ALIAS FOR $11; pSchedAtWooper ALIAS FOR $12; pECN ALIAS FOR $13; pSubType ALIAS FOR $14; pRevisionid ALIAS FOR $15; pCharId ALIAS FOR $16; pCharVal ALIAS FOR $17; pNotes ALIAS FOR $18; pRef ALIAS FOR $19; _seqNumber INTEGER; _bomitemid INTEGER; BEGIN -- Grab the next Sequence Number, if any SELECT MAX(bomitem_seqnumber) INTO _seqNumber FROM bomitem(pParentItemid,pRevisionid); IF (_seqNumber IS NOT NULL) THEN _seqNumber := (_seqNumber + 10); ELSE _seqNumber := 10; END IF; SELECT createBOMItem( pBomitemid, pParentItemid, pComponentItemid, _seqNumber, pIssueMethod, pUomId, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, pSchedAtWooper, pECN, pSubType, pRevisionid, pCharId, pCharVal, pNotes, pRef ) INTO _bomitemid; RETURN _bomitemid; END; $_$; DROP FUNCTION public.createbomitem(integer, integer, integer, character, integer, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text); publicadminfalse8399212551682082createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text)FUNCTION CREATE FUNCTION createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pSeqNumber ALIAS FOR $4; pIssueMethod ALIAS FOR $5; pUomId ALIAS FOR $6; pQtyFxd ALIAS FOR $7; pQtyPer ALIAS FOR $8; pScrap ALIAS FOR $9; pEffective ALIAS FOR $10; pExpires ALIAS FOR $11; pCreateWo ALIAS FOR $12; pBOOItemseqid ALIAS FOR $13; pSchedAtWooper ALIAS FOR $14; pECN ALIAS FOR $15; pSubType ALIAS FOR $16; pRevisionid ALIAS FOR $17; pCharId ALIAS FOR $18; pCharVal ALIAS FOR $19; pNotes ALIAS FOR $20; pRef ALIAS FOR $21; _bomworksetid INTEGER; _temp INTEGER; BEGIN -- Make sure that the parent and component are not the same IF (pParentItemid = pComponentItemid) THEN RETURN -1; END IF; -- Make sure that the parent is not used in the component at some level IF ( SELECT (item_type IN ('M', 'F')) FROM item WHERE (item_id=pComponentItemid) ) THEN SELECT indentedWhereUsed(pParentItemid) INTO _bomworksetid; SELECT bomwork_id INTO _temp FROM bomwork WHERE ( (bomwork_set_id=_bomworksetid) AND (bomwork_item_id=pComponentItemid) ) LIMIT 1; IF (FOUND) THEN PERFORM deleteBOMWorkset(_bomworksetid); RETURN -2; END IF; END IF; PERFORM deleteBOMWorkset(_bomworksetid); -- Create the BOM Item INSERT INTO bomitem ( bomitem_id, bomitem_parent_item_id, bomitem_item_id, bomitem_seqnumber, bomitem_issuemethod, bomitem_uom_id, bomitem_qtyfxd, bomitem_qtyper, bomitem_scrap, bomitem_effective, bomitem_expires, bomitem_createwo, bomitem_booitem_seq_id, bomitem_schedatwooper, bomitem_ecn, bomitem_subtype, bomitem_moddate, bomitem_rev_id, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref ) VALUES ( pBomitemid, pParentItemid, pComponentItemid, pSeqNumber, pIssueMethod, pUomId, pQtyFxd, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, COALESCE(pSchedAtWooper, FALSE), pECN, pSubType, CURRENT_DATE, pRevisionid, pCharId,pCharVal,pNotes, pRef ); RETURN pBomitemid; END; $_$; DROP FUNCTION public.createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text); publicadminfalse3992812551682083createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text)FUNCTIONSCREATE FUNCTION createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pSeqNumber ALIAS FOR $4; pIssueMethod ALIAS FOR $5; pUomId ALIAS FOR $6; pQtyFxd ALIAS FOR $7; pQtyPer ALIAS FOR $8; pScrap ALIAS FOR $9; pEffective ALIAS FOR $10; pExpires ALIAS FOR $11; pCreateWo ALIAS FOR $12; pBOOItemseqid ALIAS FOR $13; pSchedAtWooper ALIAS FOR $14; pECN ALIAS FOR $15; pSubType ALIAS FOR $16; pRevisionid ALIAS FOR $17; pCharId ALIAS FOR $18; pCharVal ALIAS FOR $19; _bomworksetid INTEGER; _temp INTEGER; _bomitemid INTEGER; BEGIN SELECT createBOMItem( pBomitemid, pParentItemid, pComponentItemid, pSeqNumber, pIssueMethod, pUomId, pQtyFxd, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, pSchedAtWooper, pECN, pSubType, pRevisionid, pCharId, pCharVal, NULL, NULL ) INTO _bomitemid; RETURN _bomitemid; END; $_$; DROP FUNCTION public.createbomitem(integer, integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text); publicadminfalse8399212551682084createbomitem(integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text)FUNCTIONHCREATE FUNCTION createbomitem(integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; pParentItemid ALIAS FOR $2; pComponentItemid ALIAS FOR $3; pIssueMethod ALIAS FOR $4; pUomId ALIAS FOR $5; pQtyFxd ALIAS FOR $6; pQtyPer ALIAS FOR $7; pScrap ALIAS FOR $8; pEffective ALIAS FOR $9; pExpires ALIAS FOR $10; pCreateWo ALIAS FOR $11; pBOOItemseqid ALIAS FOR $12; pSchedAtWooper ALIAS FOR $13; pECN ALIAS FOR $14; pSubType ALIAS FOR $15; pRevisionid ALIAS FOR $16; pCharId ALIAS FOR $17; pCharVal ALIAS FOR $18; pNotes ALIAS FOR $19; pRef ALIAS FOR $20; _seqNumber INTEGER; _bomitemid INTEGER; BEGIN -- Grab the next Sequence Number, if any SELECT MAX(bomitem_seqnumber) INTO _seqNumber FROM bomitem(pParentItemid,pRevisionid); IF (_seqNumber IS NOT NULL) THEN _seqNumber := (_seqNumber + 10); ELSE _seqNumber := 10; END IF; SELECT createBOMItem( pBomitemid, pParentItemid, pComponentItemid, _seqNumber, pIssueMethod, pUomId, pQtyFxd, pQtyPer, pScrap, pEffective, pExpires, pCreateWo, pBOOItemseqid, pSchedAtWooper, pECN, pSubType, pRevisionid, pCharId, pCharVal, pNotes, pRef ) INTO _bomitemid; RETURN _bomitemid; END; $_$; DROP FUNCTION public.createbomitem(integer, integer, integer, character, integer, numeric, numeric, numeric, date, date, boolean, integer, boolean, text, character, integer, integer, text, text, text); publicadminfalse83992K12551682085bcreatecheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean)FUNCTION#CREATE FUNCTION createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; pRecipType ALIAS FOR $2; pRecipId ALIAS FOR $3; pCheckDate ALIAS FOR $4; pAmount ALIAS FOR $5; pCurrid ALIAS FOR $6; pExpcatid ALIAS FOR $7; _journalNumber INTEGER := $8; pFor ALIAS FOR $9; pNotes ALIAS FOR $10; pMisc ALIAS FOR $11; _checkid INTEGER; BEGIN SELECT createCheck(pBankaccntid,pRecipType,pRecipId,pCheckDate,pAmount,pCurrid,pExpcatid,_journalNumber,pFor,pNotes,pMisc,NULL) INTO _checkid; RETURN _checkid; END; $_$; yDROP FUNCTION public.createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean); publicadminfalse8399212551682086kcreatecheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean, integer)FUNCTIONCREATE FUNCTION createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; pRecipType ALIAS FOR $2; pRecipId ALIAS FOR $3; pCheckDate ALIAS FOR $4; pAmount ALIAS FOR $5; pCurrid ALIAS FOR $6; pExpcatid ALIAS FOR $7; _journalNumber INTEGER := $8; pFor ALIAS FOR $9; pNotes ALIAS FOR $10; pMisc ALIAS FOR $11; pAropenid ALIAS FOR $12; _checkid INTEGER; _check_curr_rate NUMERIC; _bankaccnt_currid INTEGER; BEGIN SELECT bankaccnt_curr_id,currRate(bankaccnt_curr_id,pCheckDate) INTO _bankaccnt_currid, _check_curr_rate FROM bankaccnt WHERE bankaccnt_id = pBankaccntid; IF (NOT FOUND) THEN RETURN -1; END IF; IF (pRecipType NOT IN ('C', 'T', 'V')) THEN RETURN -2; END IF; IF (pCheckDate IS NULL) THEN RETURN -3; END IF; IF (pAmount <= 0) THEN RETURN -4; END IF; IF (pCurrid IS NULL OR NOT EXISTS(SELECT * FROM curr_symbol WHERE (curr_id=pCurrid))) THEN RETURN -5; END IF; IF (pExpcatid IS NOT NULL AND NOT EXISTS(SELECT * FROM expcat WHERE (expcat_id=pExpcatid))) THEN RETURN -6; END IF; -- Do not assign Journal Number until check is posted -- if (_journalNumber IS NULL) THEN -- _journalNumber := fetchJournalNumber('AP-CK'); -- END IF; _checkid := NEXTVAL('checkhead_checkhead_id_seq'); INSERT INTO checkhead ( checkhead_id, checkhead_recip_type, checkhead_recip_id, checkhead_bankaccnt_id, checkhead_number, checkhead_amount, checkhead_checkdate, checkhead_misc, checkhead_expcat_id, checkhead_journalnumber, checkhead_for, checkhead_notes, checkhead_curr_id ) VALUES ( _checkid, pRecipType, pRecipId, pBankaccntid, -1, --fetchNextCheckNumber(pBankaccntid), currToCurr(pCurrid, _bankaccnt_currid, pAmount, pCheckDate), pCheckDate, COALESCE(pMisc, FALSE), pExpcatid, _journalNumber, pFor, pNotes, _bankaccnt_currid ); IF (pAropenid IS NOT NULL AND fetchmetricbool('EnableReturnAuth')) THEN INSERT INTO checkitem (checkitem_checkhead_id,checkitem_amount,checkitem_discount,checkitem_ponumber, checkitem_aropen_id,checkitem_docdate,checkitem_curr_id,checkitem_cmnumber, checkitem_ranumber, checkitem_curr_rate) SELECT _checkid, currToCurr(checkhead_curr_id, aropen_curr_id, pAmount, checkhead_checkdate), 0,cmhead_custponumber,pAropenid,aropen_docdate,aropen_curr_id,cmhead_number,rahead_number, 1 / (_check_curr_rate / aropen_curr_rate) FROM checkhead, aropen LEFT OUTER JOIN cmhead ON (aropen_docnumber=cmhead_number) LEFT OUTER JOIN rahead ON (cmhead_rahead_id=rahead_id) WHERE ((aropen_id=pAropenid) AND (checkhead_id=_checkid)); ELSIF (pAropenid IS NOT NULL) THEN INSERT INTO checkitem (checkitem_checkhead_id,checkitem_amount,checkitem_discount,checkitem_ponumber, checkitem_aropen_id,checkitem_docdate,checkitem_curr_id,checkitem_cmnumber, checkitem_ranumber, checkitem_curr_rate) SELECT _checkid,currToCurr(checkhead_curr_id, aropen_curr_id, pAmount, checkhead_checkdate), 0,cmhead_custponumber,pAropenid,aropen_docdate,aropen_curr_id,cmhead_number,NULL, 1 / (_check_curr_rate / aropen_curr_rate) FROM checkhead, aropen LEFT OUTER JOIN cmhead ON (aropen_docnumber=cmhead_number) WHERE ((aropen_id=pAropenid) AND (checkhead_id=_checkid)); END IF; RETURN _checkid; END; $_$; DROP FUNCTION public.createcheck(integer, text, integer, date, numeric, integer, integer, integer, text, text, boolean, integer); publicadminfalse8399212551682087createchecks(integer, date)FUNCTION CREATE FUNCTION createchecks(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; pCheckDate ALIAS FOR $2; _v RECORD; _r RECORD; _c RECORD; _checkid INTEGER; _counter INTEGER := 0; _check_curr_id INTEGER; _check_curr_rate NUMERIC; BEGIN SELECT bankaccnt_curr_id, currRate(bankaccnt_curr_id, pCheckDate) INTO _check_curr_id, _check_curr_rate FROM bankaccnt WHERE ( bankaccnt_id = pBankaccntid ); FOR _v IN SELECT DISTINCT vend_id, vend_number, vend_name FROM apselect JOIN apopen ON (apselect_apopen_id=apopen_id) JOIN vendinfo ON (apopen_vend_id=vend_id) WHERE ((apselect_bankaccnt_id=pBankaccntid) AND (apselect_date <= pCheckDate)) LOOP -- if we owe this vendor anything (we might not) then create a check IF ((SELECT SUM(apselect_amount * _check_curr_rate / apopen_curr_rate) FROM apselect, apopen WHERE ((apselect_apopen_id=apopen_id) AND (apopen_vend_id=_v.vend_id) AND (apselect_bankaccnt_id=pBankaccntid)) ) > 0) THEN -- 0.01 is a temporary amount; we''ll update the check amount later _checkid := createCheck(pBankaccntid, 'V', _v.vend_id, pCheckDate, 0.01, _check_curr_id, NULL, NULL, '', '', FALSE); FOR _r IN SELECT apopen_id, apselect_id, apopen_docnumber, apopen_invcnumber, apopen_ponumber, apopen_docdate, apselect_curr_id, apselect_amount, apselect_discount FROM apselect, apopen WHERE ( (apselect_apopen_id=apopen_id) AND (apopen_vend_id=_v.vend_id) AND (apselect_bankaccnt_id=pBankaccntid) ) LOOP INSERT INTO checkitem ( checkitem_checkhead_id, checkitem_apopen_id, checkitem_vouchernumber, checkitem_invcnumber, checkitem_ponumber, checkitem_amount, checkitem_discount, checkitem_docdate, checkitem_curr_id, checkitem_curr_rate ) VALUES ( _checkid, _r.apopen_id, _r.apopen_docnumber, _r.apopen_invcnumber, _r.apopen_ponumber, _r.apselect_amount, _r.apselect_discount, _r.apopen_docdate, _r.apselect_curr_id, 1 / (_check_curr_rate / currRate(_r.apselect_curr_id, pCheckdate)) ); DELETE FROM apselect WHERE (apselect_id=_r.apselect_id); END LOOP; -- one check can pay for purchases on multiple dates in multiple currencies UPDATE checkhead SET checkhead_amount = (SELECT SUM(checkitem_amount / checkitem_curr_rate) FROM checkitem WHERE (checkitem_checkhead_id=checkhead_id)) WHERE (checkhead_id=_checkid); _counter := (_counter + 1); END IF; END LOOP; RETURN _counter; END; $_$; 2DROP FUNCTION public.createchecks(integer, date); publicadminfalse83992O12551682088/createcounttag(integer, text, boolean, boolean)FUNCTIONCREATE FUNCTION createcounttag(integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pComments ALIAS FOR $2; pPriority ALIAS FOR $3; pFreeze ALIAS FOR $4; BEGIN RETURN createCountTag(pItemsiteid, pComments, pPriority, pFreeze, NULL); END; $_$; FDROP FUNCTION public.createcounttag(integer, text, boolean, boolean); publicadminfalse83992125516820898createcounttag(integer, text, boolean, boolean, integer)FUNCTIONCREATE FUNCTION createcounttag(integer, text, boolean, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pComments ALIAS FOR $2; pPriority ALIAS FOR $3; pFreeze ALIAS FOR $4; pLocationid ALIAS FOR $5; _invcntid INTEGER; _whs RECORD; _type CHARACTER; _controlmethod CHARACTER; BEGIN SELECT item_type, itemsite_controlmethod INTO _type, _controlmethod FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid)); IF (NOT FOUND OR _type IN ('F', 'R', 'L','J') OR _controlmethod = 'N') THEN RETURN 0; -- We simply do not do these item types. END IF; -- Test for existing tags IF (pLocationid IS NULL) THEN SELECT invcnt_id INTO _invcntid FROM invcnt WHERE ((NOT invcnt_posted) AND (invcnt_location_id IS NULL) AND (invcnt_itemsite_id=pItemsiteid)); ELSE SELECT invcnt_id INTO _invcntid FROM invcnt WHERE ((NOT invcnt_posted) AND (invcnt_itemsite_id=pItemsiteid) AND (invcnt_location_id=pLocationid)); END IF; IF (NOT FOUND) THEN SELECT NEXTVAL('invcnt_invcnt_id_seq') INTO _invcntid; SELECT whsinfo.* INTO _whs FROM whsinfo, itemsite WHERE ((warehous_id=itemsite_warehous_id) AND (itemsite_id=pItemsiteid)); INSERT INTO invcnt ( invcnt_id, invcnt_itemsite_id, invcnt_tagdate, invcnt_tagnumber, invcnt_tag_username, invcnt_posted, invcnt_priority, invcnt_comments, invcnt_location_id ) VALUES ( _invcntid, pItemsiteid, CURRENT_TIMESTAMP, (_whs.warehous_counttag_prefix || _whs.warehous_counttag_number::TEXT), getEffectiveXtUser(), FALSE, pPriority, pComments, pLocationid ); UPDATE whsinfo SET warehous_counttag_number=(warehous_counttag_number + 1) WHERE (warehous_id=_whs.warehous_id); IF (pFreeze) THEN UPDATE itemsite SET itemsite_freeze=TRUE WHERE (itemsite_id=pItemsiteid); END IF; END IF; RETURN _invcntid; END; $_$; ODROP FUNCTION public.createcounttag(integer, text, boolean, boolean, integer); publicadminfalse83992N12551682090createcustomer(integer)FUNCTIONCREATE FUNCTION createcustomer(integer) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pcrmacctId ALIAS FOR $1; _custId INTEGER := 0; BEGIN IF (pcrmacctId < 0 OR pcrmacctId IS NULL) THEN RETURN -1; END IF; SELECT crmacct_cust_id INTO _custId FROM crmacct WHERE crmacct_id = pcrmacctId; IF (_custId IS NOT NULL AND _custId <= 0) THEN RETURN -2; END IF; INSERT INTO _customer (active, customer_number, customer_name) SELECT crmacct_active, crmacct_number, crmacct_name FROM crmacct WHERE crmacct_id = pcrmacctId; _custId := CURRVAL('cust_cust_id_seq'); UPDATE crmacct SET crmacct_prospect_id = NULL, crmacct_cust_id = _custId WHERE crmacct_id = pcrmacctId; RETURN _custId; END; $_$; .DROP FUNCTION public.createcustomer(integer); publicadminfalse8399212551682091Fcreatecyclecountsbywarehouse(integer, integer, text, boolean, boolean)FUNCTIONCREATE FUNCTION createcyclecountsbywarehouse(integer, integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pMaxNumber ALIAS FOR $2; pComments ALIAS FOR $3; pPriority ALIAS FOR $4; pFreeze ALIAS FOR $5; BEGIN RETURN createCycleCountsByWarehouse(pWarehousid, pMaxNumber, pComments, pPriority, pFreeze, NULL, FALSE); END; $_$; ]DROP FUNCTION public.createcyclecountsbywarehouse(integer, integer, text, boolean, boolean); publicadminfalse39928 12551682092Ocreatecyclecountsbywarehouse(integer, integer, integer, text, boolean, boolean)FUNCTIONMCREATE FUNCTION createcyclecountsbywarehouse(integer, integer, integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pClasscodeid ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; BEGIN RETURN createCycleCountsByWarehouseByClassCode(pWarehousid, pClasscodeid, pMaxNumber, pComments, pPriority, pFreeze, NULL, FALSE); END; $_$; fDROP FUNCTION public.createcyclecountsbywarehouse(integer, integer, integer, text, boolean, boolean); publicadminfalse8399212551682093Lcreatecyclecountsbywarehouse(integer, text, integer, text, boolean, boolean)FUNCTIONTCREATE FUNCTION createcyclecountsbywarehouse(integer, text, integer, text, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pClasscodePattern ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; BEGIN RETURN createCycleCountsByWarehouseByClassCode(pWarehousid, pClasscodePattern, pMaxNumber, pComments, pPriority, pFreeze, NULL, FALSE); END; $_$; cDROP FUNCTION public.createcyclecountsbywarehouse(integer, text, integer, text, boolean, boolean); publicadminfalse83992 12551682094Xcreatecyclecountsbywarehouse(integer, integer, text, boolean, boolean, integer, boolean)FUNCTION2 CREATE FUNCTION createcyclecountsbywarehouse(integer, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pMaxNumber ALIAS FOR $2; pComments ALIAS FOR $3; pPriority ALIAS FOR $4; pFreeze ALIAS FOR $5; pLocationid ALIAS FOR $6; pIgnoreZeroBalance ALIAS FOR $7; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, itemloc WHERE ( (itemsite_active) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (pLocationid = itemloc_location_id) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; oDROP FUNCTION public.createcyclecountsbywarehouse(integer, integer, text, boolean, boolean, integer, boolean); publicadminfalse83992 12551682095lcreatecyclecountsbywarehousebyclasscode(integer, integer, integer, text, boolean, boolean, integer, boolean)FUNCTION CREATE FUNCTION createcyclecountsbywarehousebyclasscode(integer, integer, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pClasscodeid ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; pLocationid ALIAS FOR $7; pIgnoreZeroBalance ALIAS FOR $8; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) AND (item_classcode_id=pClasscodeid) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, item, itemloc WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (pLocationid = itemloc_location_id) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (item_classcode_id=pClasscodeid) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; DROP FUNCTION public.createcyclecountsbywarehousebyclasscode(integer, integer, integer, text, boolean, boolean, integer, boolean); publicadminfalse39928 12551682096icreatecyclecountsbywarehousebyclasscode(integer, text, integer, text, boolean, boolean, integer, boolean)FUNCTION CREATE FUNCTION createcyclecountsbywarehousebyclasscode(integer, text, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pClasscodePattern ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; pLocationid ALIAS FOR $7; pIgnoreZeroBalance ALIAS FOR $8; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item, classcode WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) AND (classcode_code ~ pClasscodePattern) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, item, classcode, itemloc WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (pLocationid = itemloc_location_id) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (classcode_code ~ pClasscodePattern) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; DROP FUNCTION public.createcyclecountsbywarehousebyclasscode(integer, text, integer, text, boolean, boolean, integer, boolean); publicadminfalse8399212551682097kcreatecyclecountsbywarehousebyplannercode(integer, text, integer, text, boolean, boolean, integer, boolean)FUNCTIONo CREATE FUNCTION createcyclecountsbywarehousebyplannercode(integer, text, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pPlancodePattern ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; pLocationid ALIAS FOR $7; pIgnoreZeroBalance ALIAS FOR $8; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item, plancode WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_plancode_id=plancode_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) AND (plancode_code ~ pPlancodePattern) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, plancode, itemloc WHERE ( (itemsite_active) AND (itemsite_plancode_id=plancode_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (pLocationid = itemloc_location_id) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (plancode_code ~ pPlancodePattern) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; DROP FUNCTION public.createcyclecountsbywarehousebyplannercode(integer, text, integer, text, boolean, boolean, integer, boolean); publicadminfalse39928 12551682098ncreatecyclecountsbywarehousebyplannercode(integer, integer, integer, text, boolean, boolean, integer, boolean)FUNCTION CREATE FUNCTION createcyclecountsbywarehousebyplannercode(integer, integer, integer, text, boolean, boolean, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pPlancodeid ALIAS FOR $2; pMaxNumber ALIAS FOR $3; pComments ALIAS FOR $4; pPriority ALIAS FOR $5; pFreeze ALIAS FOR $6; pLocationid ALIAS FOR $7; pIgnoreZeroBalance ALIAS FOR $8; _itemsites RECORD; _returnVal INTEGER; BEGIN IF (pLocationid IS NULL) THEN FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, itemsite_qtyonhand FROM itemsite, item WHERE ( (itemsite_active) AND (itemsite_item_id=item_id) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND (itemsite_id NOT IN ( SELECT invcnt_itemsite_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (invcnt_location_id IS NULL) AND (NOT invcnt_posted) ) ) ) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND ((pLocationid IS NULL) OR (validLocation(pLocationid, itemsite_id))) AND (itemsite_warehous_id=pWarehousid) AND (itemsite_plancode_id=pPlancodeid) ) ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass, item_number LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; ELSE FOR _itemsites IN SELECT itemsite_id, itemsite_warehous_id, SUM(itemloc_qty) FROM itemsite, itemloc WHERE ( (itemsite_active) AND (itemsite_cyclecountfreq > 0) AND ((COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq) < CURRENT_DATE) AND ((NOT pIgnoreZeroBalance) OR (itemsite_qtyonhand <> 0)) AND (itemloc_itemsite_id = itemsite_id) AND (itemsite_warehous_id=pWarehousid) AND (pLocationid = itemloc_location_id) AND (itemsite_plancode_id=pPlancodeid) ) GROUP BY itemsite_id, itemsite_warehous_id, itemsite_datelastcount, itemsite_cyclecountfreq, itemsite_abcclass ORDER BY (COALESCE(itemsite_datelastcount, startOfTime()) + itemsite_cyclecountfreq), itemsite_abcclass LIMIT pMaxNumber LOOP _returnVal := createCountTag(_itemsites.itemsite_id, pComments, pPriority, pFreeze, pLocationid); IF (_returnVal < 0) THEN RETURN _returnVal; END IF; END LOOP; END IF; RETURN 0; END; $_$; DROP FUNCTION public.createcyclecountsbywarehousebyplannercode(integer, integer, integer, text, boolean, boolean, integer, boolean); publicadminfalse83992S12551682099createfile(text, text, bytea)FUNCTIONvCREATE FUNCTION createfile(text, text, bytea) RETURNS integer LANGUAGE plpgsql AS $_$ declare pTitle ALIAS FOR $1; pDescription ALIAS FOR $2; pStream ALIAS FOR $3; _id integer; begin _id := nextval('file_file_id_seq'); insert into file (file_id, file_title, file_descrip, file_stream) values (_id, pTitle, pDescription, pStream); return _id; end; $_$; 4DROP FUNCTION public.createfile(text, text, bytea); publicadminfalse3992812551682100createinvoice(integer)FUNCTION)CREATE FUNCTION createinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; _invcheadid INTEGER; _invcitemid INTEGER; _qtyToInvoice NUMERIC; _r RECORD; _s RECORD; _lastlinenumber INTEGER := 1; BEGIN IF ( ( SELECT cobmisc_posted FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ) ) THEN RETURN -1; END IF; SELECT NEXTVAL('invchead_invchead_id_seq') INTO _invcheadid; -- Give this selection a number if it has not been assigned one UPDATE cobmisc SET cobmisc_invcnumber=fetchInvcNumber() WHERE ( (cobmisc_invcnumber IS NULL) AND (cobmisc_id=pCobmiscid) ); -- Create the Invoice header INSERT INTO invchead ( invchead_id,invchead_cust_id,invchead_shipto_id,invchead_ordernumber,invchead_orderdate, invchead_posted,invchead_printed,invchead_invcnumber,invchead_invcdate,invchead_shipdate, invchead_ponumber,invchead_shipvia,invchead_fob,invchead_billto_name,invchead_billto_address1, invchead_billto_address2,invchead_billto_address3,invchead_billto_city,invchead_billto_state,invchead_billto_zipcode, invchead_billto_phone,invchead_billto_country,invchead_shipto_name,invchead_shipto_address1,invchead_shipto_address2, invchead_shipto_address3,invchead_shipto_city,invchead_shipto_state,invchead_shipto_zipcode,invchead_shipto_phone, invchead_shipto_country,invchead_salesrep_id,invchead_commission,invchead_terms_id,invchead_freight, invchead_misc_amount,invchead_misc_descrip,invchead_misc_accnt_id,invchead_payment, invchead_paymentref,invchead_notes,invchead_prj_id,invchead_curr_id, invchead_taxzone_id, invchead_shipchrg_id, invchead_saletype_id, invchead_shipzone_id ) SELECT _invcheadid,cohead_cust_id,cohead_shipto_id,cohead_number,cohead_orderdate, FALSE,FALSE,cobmisc_invcnumber,cobmisc_invcdate,cobmisc_shipdate, cohead_custponumber,cobmisc_shipvia,cohead_fob,cohead_billtoname,cohead_billtoaddress1, cohead_billtoaddress2,cohead_billtoaddress3,cohead_billtocity,cohead_billtostate,cohead_billtozipcode, cntct_phone AS cust_phone,cohead_billtocountry,cohead_shiptoname,cohead_shiptoaddress1,cohead_shiptoaddress2, cohead_shiptoaddress3,cohead_shiptocity,cohead_shiptostate,cohead_shiptozipcode,cohead_shipto_cntct_phone, cohead_shiptocountry,cohead_salesrep_id,COALESCE(cohead_commission,0),cohead_terms_id,cobmisc_freight, COALESCE(cobmisc_misc, 0.00),cobmisc_misc_descrip,cobmisc_misc_accnt_id,cobmisc_payment, cobmisc_paymentref,cobmisc_notes,cohead_prj_id,cobmisc_curr_id, cobmisc_taxzone_id, cohead_shipchrg_id, cohead_saletype_id, cohead_shipzone_id FROM cobmisc, cohead, custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE ( (cobmisc_cohead_id=cohead_id) AND (cohead_cust_id=cust_id) AND (cobmisc_id=pCobmiscid) ); INSERT INTO invcheadtax(taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate) SELECT _invcheadid,taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate FROM cobmisctax WHERE taxhist_parent_id = pCobmiscid AND taxhist_taxtype_id = getadjustmenttaxtypeid(); -- Create the Invoice items FOR _r IN SELECT coitem_id, coitem_linenumber, coitem_subnumber, coitem_custpn, coitem_qtyord, cobill_qty, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_custprice, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_memo, coitem_rev_accnt_id, itemsite_item_id, itemsite_warehous_id, cobill_taxtype_id, formatSoItemNumber(coitem_id) AS ordnumber FROM coitem, cobill, itemsite WHERE ( (cobill_coitem_id=coitem_id) AND (coitem_itemsite_id=itemsite_id) AND (cobill_cobmisc_id=pCobmiscid) ) ORDER BY coitem_linenumber, coitem_subnumber LOOP SELECT NEXTVAL('invcitem_invcitem_id_seq') INTO _invcitemid; INSERT INTO invcitem ( invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_custprice, invcitem_price, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_notes, invcitem_taxtype_id, invcitem_coitem_id, invcitem_rev_accnt_id ) VALUES ( _invcitemid, _invcheadid, _lastlinenumber, _r.itemsite_item_id, _r.itemsite_warehous_id, _r.coitem_custpn, '', '', _r.coitem_qtyord, _r.cobill_qty, _r.coitem_qty_uom_id, _r.coitem_qty_invuomratio, _r.coitem_custprice, _r.coitem_price, _r.coitem_price_uom_id, _r.coitem_price_invuomratio, _r.coitem_memo, _r.cobill_taxtype_id, _r.coitem_id, _r.coitem_rev_accnt_id ); -- Find and mark any Lot/Serial invdetail records associated with this bill UPDATE invdetail SET invdetail_invcitem_id = _invcitemid WHERE (invdetail_id IN (SELECT invdetail_id FROM invhist JOIN invdetail ON (invdetail_invhist_id=invhist_id) WHERE ( (invhist_ordnumber = _r.ordnumber) AND (invhist_ordtype = 'SO') AND (invhist_transtype = 'SH') AND (invdetail_invcitem_id IS NULL) ) )); -- Mark any shipped, uninvoiced shipitems for the current coitem as invoiced _qtyToInvoice := _r.cobill_qty; FOR _s IN SELECT shipitem.*, shipitem_qty = _r.cobill_qty AS matched FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=_r.coitem_id) AND (shiphead_shipped) AND (shiphead_order_type='SO') AND (NOT shipitem_invoiced)) ORDER BY matched DESC, shipitem_qty DESC FOR UPDATE LOOP IF (_qtyToInvoice >= _s.shipitem_qty) THEN UPDATE shipitem SET shipitem_invoiced=TRUE, shipitem_invcitem_id=_invcitemid WHERE (shipitem_id=_s.shipitem_id); _qtyToInvoice := _qtyToInvoice - _s.shipitem_qty; END IF; IF (_qtyToInvoice <= 0) THEN EXIT; END IF; END LOOP; UPDATE cobill SET cobill_invcnum=cobmisc_invcnumber, cobill_invcitem_id=invcitem_id FROM invcitem, coitem, cobmisc WHERE ((invcitem_linenumber=_lastlinenumber) AND (coitem_id=cobill_coitem_id) AND (cobmisc_id=cobill_cobmisc_id) AND (cobill_cobmisc_id=pCobmiscid) AND (invcitem_invchead_id=_invcheadid)); _lastlinenumber := _lastlinenumber + 1; END LOOP; -- Close all requested coitem's IF ( ( SELECT cobmisc_closeorder FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ) ) THEN UPDATE coitem SET coitem_status='C' FROM cobmisc WHERE ( (coitem_status NOT IN ('C', 'X')) AND (coitem_cohead_id=cobmisc_cohead_id) AND (cobmisc_id=pCobmiscid) ); ELSE UPDATE coitem SET coitem_status='C' FROM cobill WHERE ( (cobill_coitem_id=coitem_id) AND (coitem_status <> 'X') AND (cobill_toclose) AND (cobill_cobmisc_id=pCobmiscid) ); END IF; -- Mark the cobmisc as posted UPDATE cobmisc SET cobmisc_posted=TRUE, cobmisc_invchead_id=_invcheadid WHERE (cobmisc_id=pCobmiscid); -- All done RETURN _invcheadid; END; $_$; -DROP FUNCTION public.createinvoice(integer); publicadminfalse8399212551682102"createinvoiceconsolidated(integer)FUNCTION3CREATE FUNCTION createinvoiceconsolidated(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _invcheadid INTEGER; _invcitemid INTEGER; _qtyToInvoice NUMERIC; _r RECORD; _s RECORD; _c RECORD; _i RECORD; _count INTEGER; _invcnumber INTEGER; _lastlinenumber INTEGER; BEGIN _count := 0; FOR _c IN SELECT min(cobmisc_id) AS cobmisc_id, count(*) AS cnt, -- there are the key values for consolidation cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cntct_phone AS cust_phone, cohead_billtocountry, cohead_salesrep_id, cohead_commission, cohead_terms_id, cobmisc_misc_accnt_id, cohead_prj_id, cobmisc_curr_id, cobmisc_taxzone_id, cohead_shipchrg_id, cohead_saletype_id, cohead_shipzone_id, -- the following are consolidated values to use in creating the header MIN(cohead_number) AS cohead_number, MIN(cohead_orderdate) AS cohead_orderdate, MIN(cobmisc_invcdate) AS cobmisc_invcdate, MIN(cobmisc_shipdate) AS cobmisc_shipdate, SUM(cobmisc_freight) AS cobmisc_freight, SUM(cobmisc_misc) AS cobmisc_misc, SUM(cobmisc_payment) AS cobmisc_payment FROM cobmisc JOIN cohead ON (cobmisc_cohead_id=cohead_id) JOIN custinfo ON (cohead_cust_id=cust_id) LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE(NOT cobmisc_posted AND (cohead_cust_id=pCustid) ) GROUP BY cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cust_phone, cohead_billtocountry, cohead_salesrep_id, cohead_commission, cohead_terms_id, cobmisc_misc_accnt_id, cohead_prj_id, cobmisc_curr_id, cobmisc_taxzone_id, cohead_shipchrg_id, cohead_saletype_id, cohead_shipzone_id LOOP IF(_c.cnt = 1) THEN PERFORM createInvoice(_c.cobmisc_id); _count := (_count + 1); ELSE SELECT NEXTVAL('invchead_invchead_id_seq'), fetchInvcNumber() INTO _invcheadid, _invcnumber; -- Create the Invoice header INSERT INTO invchead ( invchead_id, invchead_cust_id, invchead_shipto_id, invchead_ordernumber, invchead_orderdate, invchead_posted, invchead_printed, invchead_invcnumber, invchead_invcdate, invchead_shipdate, invchead_ponumber, invchead_shipvia, invchead_fob, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_phone, invchead_billto_country, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_phone, invchead_shipto_country, invchead_salesrep_id, invchead_commission, invchead_terms_id, invchead_freight, invchead_misc_amount, invchead_misc_descrip, invchead_misc_accnt_id, invchead_payment, invchead_paymentref, invchead_notes, invchead_prj_id, invchead_curr_id, invchead_taxzone_id, invchead_shipchrg_id, invchead_saletype_id, invchead_shipzone_id ) VALUES(_invcheadid, pCustid, -1, NULL, _c.cohead_orderdate, FALSE, FALSE, _invcnumber, _c.cobmisc_invcdate, _c.cobmisc_shipdate, 'MULTIPLE', '', '', _c.cohead_billtoname, _c.cohead_billtoaddress1, _c.cohead_billtoaddress2, _c.cohead_billtoaddress3, _c.cohead_billtocity, _c.cohead_billtostate, _c.cohead_billtozipcode, _c.cust_phone, _c.cohead_billtocountry, '', '', '', '', '', '', '', '', '', _c.cohead_salesrep_id, COALESCE(_c.cohead_commission, 0), _c.cohead_terms_id, _c.cobmisc_freight, _c.cobmisc_misc, CASE WHEN(_c.cobmisc_misc <> 0) THEN 'Multiple' ELSE '' END, _c.cobmisc_misc_accnt_id, _c.cobmisc_payment, '', 'Multiple Sales Order # Invoice', _c.cohead_prj_id, _c.cobmisc_curr_id, _c.cobmisc_taxzone_id, _c.cohead_shipchrg_id, _c.cohead_saletype_id, _c.cohead_shipzone_id ); _lastlinenumber := 1; FOR _i IN SELECT cobmisc_id FROM cobmisc JOIN cohead ON (cobmisc_cohead_id=cohead_id) JOIN custinfo ON (cohead_cust_id=cust_id) LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE(NOT cobmisc_posted AND (cohead_cust_id=pCustid) AND (COALESCE(cohead_billtoname,'') = COALESCE(_c.cohead_billtoname,'')) AND (COALESCE(cohead_billtoaddress1,'') = COALESCE(_c.cohead_billtoaddress1,'')) AND (COALESCE(cohead_billtoaddress2,'') = COALESCE(_c.cohead_billtoaddress2,'')) AND (COALESCE(cohead_billtoaddress3,'') = COALESCE(_c.cohead_billtoaddress3,'')) AND (COALESCE(cohead_billtocity,'') = COALESCE(_c.cohead_billtocity,'')) AND (COALESCE(cohead_billtostate,'') = COALESCE(_c.cohead_billtostate,'')) AND (COALESCE(cohead_billtozipcode,'') = COALESCE(_c.cohead_billtozipcode,'')) AND (COALESCE(cntct_phone,'') = COALESCE(_c.cust_phone,'')) AND (COALESCE(cohead_billtocountry,'') = COALESCE(_c.cohead_billtocountry,'')) AND (COALESCE(cohead_salesrep_id, 0) = COALESCE(_c.cohead_salesrep_id, 0)) AND (COALESCE(cohead_commission, 0) = COALESCE(_c.cohead_commission, 0)) AND (COALESCE(cohead_terms_id, 0) = COALESCE(_c.cohead_terms_id, 0)) AND (COALESCE(cobmisc_misc_accnt_id, 0) = COALESCE(_c.cobmisc_misc_accnt_id, 0)) AND (COALESCE(cohead_prj_id, 0) = COALESCE(_c.cohead_prj_id, 0)) AND (COALESCE(cobmisc_curr_id, 0) = COALESCE(_c.cobmisc_curr_id, 0)) AND (COALESCE(cobmisc_taxzone_id, 0) = COALESCE(_c.cobmisc_taxzone_id, 0)) AND (COALESCE(cohead_saletype_id, 0) = COALESCE(_c.cohead_saletype_id, 0)) AND (COALESCE(cohead_shipzone_id, 0) = COALESCE(_c.cohead_shipzone_id, 0)) ) LOOP -- Create the Invoice Head tax INSERT INTO invcheadtax(taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate) SELECT _invcheadid,taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate FROM cobmisctax WHERE taxhist_parent_id = _i.cobmisc_id AND taxhist_taxtype_id = getadjustmenttaxtypeid(); -- Give this selection a number if it has not been assigned one UPDATE cobmisc SET cobmisc_invcnumber=_invcnumber WHERE(cobmisc_id=_i.cobmisc_id); -- Create the Invoice items FOR _r IN SELECT coitem_id, coitem_linenumber, coitem_subnumber, coitem_custpn, coitem_qtyord, cobill_qty, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_custprice, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_memo, itemsite_item_id, itemsite_warehous_id, cobill_taxtype_id FROM cohead, coitem, cobill, itemsite WHERE((cobill_coitem_id=coitem_id) AND (cohead_id=coitem_cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (cobill_cobmisc_id=_i.cobmisc_id) ) ORDER BY cohead_number, coitem_linenumber, coitem_subnumber LOOP SELECT NEXTVAL('invcitem_invcitem_id_seq') INTO _invcitemid; INSERT INTO invcitem ( invcitem_id, invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_custprice, invcitem_price, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_notes, invcitem_taxtype_id, invcitem_coitem_id ) VALUES ( _invcitemid, _invcheadid, _lastlinenumber, _r.itemsite_item_id, _r.itemsite_warehous_id, _r.coitem_custpn, '', '', _r.coitem_qtyord, _r.cobill_qty, _r.coitem_qty_uom_id, _r.coitem_qty_invuomratio, _r.coitem_custprice, _r.coitem_price, _r.coitem_price_uom_id, _r.coitem_price_invuomratio, _r.coitem_memo, _r.cobill_taxtype_id, _r.coitem_id ); -- Find and mark any Lot/Serial invdetail records associated with this bill UPDATE invdetail SET invdetail_invcitem_id = _invcitemid WHERE (invdetail_id IN (SELECT invdetail_id FROM coitem, cohead, invhist, invdetail WHERE ((coitem_cohead_id=cohead_id) AND (invdetail_invhist_id=invhist_id) AND (invhist_ordnumber = text(cohead_number||'-'||formatSoLineNumber(coitem_id))) AND (invdetail_invcitem_id IS NULL) AND (coitem_id=_r.coitem_id)) ) ); -- Mark any shipped, uninvoiced shipitems for the current coitem as invoiced _qtyToInvoice := _r.cobill_qty; FOR _s IN SELECT shipitem.*, shipitem_qty = _r.cobill_qty AS matched FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=_r.coitem_id) AND (shiphead_shipped) AND (shiphead_order_type='SO') AND (NOT shipitem_invoiced)) ORDER BY matched DESC, shipitem_qty DESC FOR UPDATE LOOP IF (_qtyToInvoice >= _s.shipitem_qty) THEN UPDATE shipitem SET shipitem_invoiced=TRUE, shipitem_invcitem_id=_invcitemid WHERE (shipitem_id=_s.shipitem_id); _qtyToInvoice := _qtyToInvoice - _s.shipitem_qty; END IF; IF (_qtyToInvoice <= 0) THEN EXIT; END IF; END LOOP; UPDATE cobill SET cobill_invcnum=cobmisc_invcnumber, cobill_invcitem_id=invcitem_id FROM invcitem, coitem, cobmisc WHERE ((invcitem_linenumber=_lastlinenumber ) AND (coitem_id=cobill_coitem_id) AND (cobmisc_id=cobill_cobmisc_id) AND (cobill_cobmisc_id=_i.cobmisc_id) AND (invcitem_invchead_id=_invcheadid)); _lastlinenumber := _lastlinenumber + 1; END LOOP; -- Close all requested coitem's IF ( ( SELECT cobmisc_closeorder FROM cobmisc WHERE (cobmisc_id=_i.cobmisc_id) ) ) THEN UPDATE coitem SET coitem_status='C' FROM cobmisc WHERE ( (coitem_status NOT IN ('C', 'X')) AND (coitem_cohead_id=cobmisc_cohead_id) AND (cobmisc_id=_i.cobmisc_id) ); ELSE UPDATE coitem SET coitem_status='C' FROM cobill WHERE ( (cobill_coitem_id=coitem_id) AND (coitem_status <> 'X') AND (cobill_toclose) AND (cobill_cobmisc_id=_i.cobmisc_id) ); END IF; -- Mark the cobmisc as posted UPDATE cobmisc SET cobmisc_posted=TRUE, cobmisc_invchead_id=_invcheadid WHERE (cobmisc_id=_i.cobmisc_id); -- All done _count := (_count + 1); END LOOP; END IF; END LOOP; RETURN _count; END; $_$; 9DROP FUNCTION public.createinvoiceconsolidated(integer); publicadminfalse3992812551682104createinvoices()FUNCTION CREATE FUNCTION createinvoices() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _counter INTEGER; _cobmisc RECORD; BEGIN _counter := 0; FOR _cobmisc IN SELECT cobmisc_id FROM cobmisc WHERE (NOT cobmisc_posted) LOOP PERFORM createinvoice(_cobmisc.cobmisc_id); _counter := (_counter + 1); END LOOP; RETURN _counter; END; $$; 'DROP FUNCTION public.createinvoices(); publicadminfalse8399212551682105createinvoices(integer)FUNCTION CREATE FUNCTION createinvoices(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN createinvoices($1, false); END; $_$; .DROP FUNCTION public.createinvoices(integer); publicadminfalse3992812551682106 createinvoices(integer, boolean)FUNCTION&CREATE FUNCTION createinvoices(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustTypeId ALIAS FOR $1; pConsolidate ALIAS FOR $2; _counter INTEGER; _tcounter INTEGER; _cobmisc RECORD; BEGIN _counter := 0; IF (pConsolidate) THEN FOR _cobmisc IN SELECT DISTINCT cust_id FROM cobmisc, cohead, custinfo WHERE((NOT cobmisc_posted) AND (cohead_id=cobmisc_cohead_id) AND (cust_id=cohead_cust_id) AND (cust_custtype_id=pCustTypeId)) LOOP SELECT createinvoiceConsolidated(_cobmisc.cust_id) INTO _tcounter; _counter := (_counter + _tcounter); END LOOP; ELSE FOR _cobmisc IN SELECT cobmisc_id FROM cobmisc, cohead, custinfo WHERE((NOT cobmisc_posted) AND (cohead_id=cobmisc_cohead_id) AND (cust_id=cohead_cust_id) AND (cust_custtype_id=pCustTypeId)) LOOP PERFORM createinvoice(_cobmisc.cobmisc_id); _counter := (_counter + 1); END LOOP; END IF; RETURN _counter; END; $_$; 7DROP FUNCTION public.createinvoices(integer, boolean); publicadminfalse8399212551682107Gcreatemiscapcheck(integer, integer, date, numeric, integer, text, text)FUNCTIONCREATE FUNCTION createmiscapcheck(integer, integer, date, numeric, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'createMiscAPCheck() is deprecated - use createCheck() instead'; RETURN createCheck($1, 'V', $2, $3, $4, baseCurrId(), $5, NULL, $6, $7, FALSE); END; $_$; ^DROP FUNCTION public.createmiscapcheck(integer, integer, date, numeric, integer, text, text); publicadminfalse8399212551682108Pcreatemiscapcheck(integer, integer, date, numeric, integer, integer, text, text)FUNCTIONCREATE FUNCTION createmiscapcheck(integer, integer, date, numeric, integer, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'createMiscAPCheck() is deprecated - use createCheck() instead'; RETURN createCheck($1, 'V', $2, $3, pAmount, $5, $6, NULL, $7, $8, FALSE); END; $_$; gDROP FUNCTION public.createmiscapcheck(integer, integer, date, numeric, integer, integer, text, text); publicadminfalse8399212551682109createpkgschema(text, text)FUNCTION CREATE FUNCTION createpkgschema(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pname ALIAS FOR $1; pcomment ALIAS FOR $2; _createtable TEXT; _debug BOOL := true; _namespaceoid INTEGER := -1; _tabs TEXT[] := ARRAY['cmd', 'cmdarg', 'image', 'metasql', 'priv', 'report', 'script', 'uiform'] ; _pkgtab TEXT; BEGIN IF (LENGTH(COALESCE(pname, '')) <= 0) THEN RAISE EXCEPTION 'Cannot create a schema for this package without a name.'; END IF; SELECT oid INTO _namespaceoid FROM pg_namespace WHERE (LOWER(nspname)=LOWER(pname)); IF (NOT FOUND) THEN EXECUTE 'CREATE SCHEMA ' || LOWER(pname); EXECUTE 'GRANT ALL ON SCHEMA ' || LOWER(pname) || ' TO GROUP xtrole;'; SELECT oid INTO _namespaceoid FROM pg_namespace WHERE (LOWER(nspname)=LOWER(pname)); END IF; FOR i IN ARRAY_LOWER(_tabs,1)..ARRAY_UPPER(_tabs,1) LOOP _pkgtab := pname || '.pkg' || _tabs[i]; IF NOT EXISTS(SELECT oid FROM pg_class WHERE ((relname=_pkgtab) AND (relnamespace=_namespaceoid))) THEN _createtable := 'CREATE TABLE ' || _pkgtab || ' () INHERITS (' || _tabs[i] || ');'; IF (_debug) THEN RAISE NOTICE '%', _createtable; END IF; EXECUTE _createtable; EXECUTE 'ALTER TABLE ' || _pkgtab || ' ALTER ' || _tabs[i] || '_id SET NOT NULL,' || ' ADD PRIMARY KEY (' || _tabs[i] || '_id),' || ' ALTER ' || _tabs[i] || '_id SET DEFAULT NEXTVAL(''' || _tabs[i] || '_' || _tabs[i] || '_id_seq'');'; EXECUTE 'REVOKE ALL ON ' || _pkgtab || ' FROM PUBLIC;'; EXECUTE 'GRANT ALL ON ' || _pkgtab || ' TO GROUP xtrole;'; IF (_tabs[i] = 'cmdarg') THEN EXECUTE 'ALTER TABLE ' || _pkgtab || ' ADD FOREIGN KEY (cmdarg_cmd_id) REFERENCES ' || pname || '.pkgcmd(cmd_id);'; END IF; EXECUTE 'SELECT dropIfExists(''TRIGGER'', ''pkg' || _tabs[i] || 'beforetrigger'', ''' || pname || ''');' ; EXECUTE 'CREATE TRIGGER pkg' || _tabs[i] || 'beforetrigger ' || 'BEFORE INSERT OR UPDATE OR DELETE ON ' || _pkgtab || ' FOR EACH ROW EXECUTE PROCEDURE _pkg' || _tabs[i] || 'beforetrigger();'; EXECUTE 'SELECT dropIfExists(''TRIGGER'', ''pkg' || _tabs[i] || 'altertrigger'', ''' || pname || ''');' ; EXECUTE 'CREATE TRIGGER pkg' || _tabs[i] || 'altertrigger ' || 'BEFORE INSERT OR UPDATE OR DELETE ON ' || _pkgtab || ' FOR EACH ROW EXECUTE PROCEDURE _pkg' || _tabs[i] || 'altertrigger();'; EXECUTE 'SELECT dropIfExists(''TRIGGER'', ''pkg' || _tabs[i] || 'aftertrigger'', ''' || pname || ''');' ; EXECUTE 'CREATE TRIGGER pkg' || _tabs[i] || 'aftertrigger ' || 'AFTER INSERT OR UPDATE OR DELETE ON ' || _pkgtab || ' FOR EACH ROW EXECUTE PROCEDURE _pkg' || _tabs[i] || 'aftertrigger();'; END IF; END LOOP; EXECUTE 'COMMENT ON SCHEMA ' || quote_ident(pname) || ' IS ' || quote_literal(pcomment) || ';'; RETURN _namespaceoid; END; $_$; 2DROP FUNCTION public.createpkgschema(text, text); publicadminfalse8399212551682110/createpr(integer, integer, numeric, date, text)FUNCTIONCREATE FUNCTION createpr(integer, integer, numeric, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQty ALIAS FOR $3; pDueDate ALIAS FOR $4; pNotes ALIAS FOR $5; _prid INTEGER; BEGIN SELECT NEXTVAL('pr_pr_id_seq') INTO _prid; INSERT INTO pr ( pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_itemsite_id, pr_qtyreq, pr_duedate, pr_releasenote ) VALUES ( _prid, pOrderNumber, nextPrSubnumber(pOrderNumber), 'O', 'M', -1, pItemsiteid, pQty, pDuedate, pNotes); RETURN _prid; END; $_$; FDROP FUNCTION public.createpr(integer, integer, numeric, date, text); publicadminfalse3992812551682111%createpr(integer, character, integer)FUNCTION@CREATE FUNCTION createpr(integer, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderNumber ALIAS FOR $1; pParentType ALIAS FOR $2; pParentId ALIAS FOR $3; _parent RECORD; _prid INTEGER; _orderNumber INTEGER; BEGIN IF (pOrderNumber = -1) THEN SELECT fetchPrNumber() INTO _orderNumber; ELSE _orderNumber := pOrderNumber; END IF; IF (pParentType = 'W') THEN SELECT womatl_itemsite_id AS itemsiteid, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) AS qty, womatl_duedate AS duedate, wo_prj_id AS prjid, womatl_notes AS notes INTO _parent FROM wo, womatl, itemsite WHERE ((womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_id=pParentId)); ELSIF (pParentType = 'S') THEN SELECT coitem_itemsite_id AS itemsiteid, (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS qty, coitem_scheddate AS duedate, cohead_prj_id AS prjid, coitem_memo AS notes INTO _parent FROM coitem, cohead WHERE ((cohead_id=coitem_cohead_id) AND (coitem_id=pParentId)); ELSIF (pParentType = 'F') THEN SELECT planord_itemsite_id AS itemsiteid, planord_qty AS qty, planord_duedate AS duedate, NULL::INTEGER AS prjid, planord_comments AS notes INTO _parent FROM planord WHERE (planord_id=pParentId); ELSE RETURN -2; END IF; IF (NOT FOUND) THEN RETURN -1; END IF; SELECT NEXTVAL('pr_pr_id_seq') INTO _prid; INSERT INTO pr ( pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_prj_id, pr_itemsite_id, pr_qtyreq, pr_duedate, pr_releasenote ) VALUES ( _prid, _orderNumber, nextPrSubnumber(_orderNumber), 'O', pParentType, pParentId, _parent.prjid, _parent.itemsiteid, validateOrderQty(_parent.itemsiteid, _parent.qty, TRUE), _parent.duedate, _parent.notes ); RETURN _prid; END; $_$; <DROP FUNCTION public.createpr(integer, character, integer); publicadminfalse8399212551682112createpr(character, integer)FUNCTIONCREATE FUNCTION createpr(character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentType ALIAS FOR $1; pParentId ALIAS FOR $2; _orderNumber INTEGER; _prid INTEGER; BEGIN IF (pParentType = 'W') THEN SELECT wo_number INTO _orderNumber FROM wo, womatl WHERE ((womatl_wo_id=wo_id) AND (womatl_id=pParentId)); ELSIF (pParentType = 'S') THEN SELECT CAST(cohead_number AS INTEGER) INTO _orderNumber FROM cohead, coitem WHERE ((coitem_cohead_id=cohead_id) AND (coitem_id=pParentId)); ELSIF (pParentType = 'F') THEN SELECT fetchPrNumber() INTO _orderNumber; ELSE RETURN -2; END IF; IF (NOT FOUND) THEN RETURN -1; END IF; SELECT createPr(_orderNumber, pParentType, pParentId) INTO _prid; RETURN _prid; END; $_$; 3DROP FUNCTION public.createpr(character, integer); publicadminfalse8399212551682113Ccreatepr(integer, integer, numeric, date, text, character, integer)FUNCTIONGCREATE FUNCTION createpr(integer, integer, numeric, date, text, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQty ALIAS FOR $3; pDueDate ALIAS FOR $4; pNotes ALIAS FOR $5; pOrderType ALIAS FOR $6; pOrderId ALIAS FOR $7; _prid INTEGER; BEGIN SELECT NEXTVAL('pr_pr_id_seq') INTO _prid; INSERT INTO pr ( pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_itemsite_id, pr_qtyreq, pr_duedate, pr_releasenote ) VALUES ( _prid, pOrderNumber, nextPrSubnumber(pOrderNumber), 'O', pOrderType, pOrderId, pItemsiteid, pQty, pDuedate, pNotes ); RETURN _prid; END; $_$; ZDROP FUNCTION public.createpr(integer, integer, numeric, date, text, character, integer); publicadminfalse8399212551682114+createpr(integer, character, integer, text)FUNCTIONCREATE FUNCTION createpr(integer, character, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderNumber ALIAS FOR $1; pParentType ALIAS FOR $2; pParentId ALIAS FOR $3; pParentNotes ALIAS FOR $4; _parent RECORD; _prid INTEGER; _orderNumber INTEGER; BEGIN IF (pOrderNumber = -1) THEN SELECT fetchPrNumber() INTO _orderNumber; ELSE _orderNumber := pOrderNumber; END IF; IF (pParentType = 'W') THEN SELECT womatl_itemsite_id AS itemsiteid, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq) AS qty, womatl_duedate AS duedate, wo_prj_id AS prjid INTO _parent FROM wo, womatl, itemsite WHERE ((womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_id=pParentId)); ELSIF (pParentType = 'S') THEN SELECT coitem_itemsite_id AS itemsiteid, (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS qty, coitem_scheddate AS duedate, cohead_prj_id AS prjid INTO _parent FROM coitem, cohead WHERE ((cohead_id=coitem_cohead_id) AND (coitem_id=pParentId)); ELSIF (pParentType = 'F') THEN SELECT planord_itemsite_id AS itemsiteid, planord_qty AS qty, planord_duedate AS duedate, NULL::INTEGER AS prjid INTO _parent FROM planord WHERE (planord_id=pParentId); ELSE RETURN -2; END IF; IF (NOT FOUND) THEN RETURN -1; END IF; SELECT NEXTVAL('pr_pr_id_seq') INTO _prid; INSERT INTO pr ( pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_prj_id, pr_itemsite_id, pr_qtyreq, pr_duedate, pr_releasenote ) VALUES ( _prid, _orderNumber, nextPrSubnumber(_orderNumber), 'O', pParentType, pParentId, _parent.prjid, _parent.itemsiteid, validateOrderQty(_parent.itemsiteid, _parent.qty, TRUE), _parent.duedate, pParentNotes ); RETURN _prid; END; $_$; BDROP FUNCTION public.createpr(integer, character, integer, text); publicadminfalse83992P12551682115createpriv(text, text, text)FUNCTIONCREATE FUNCTION createpriv(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pModule ALIAS FOR $1; pName ALIAS FOR $2; pDesc ALIAS FOR $3; _id INTEGER; BEGIN SELECT priv_id INTO _id FROM priv WHERE(priv_name=pName); IF (FOUND) THEN UPDATE priv SET priv_module=pModule, priv_descrip=pDesc WHERE(priv_id=_id); ELSE SELECT nextval('priv_priv_id_seq') INTO _id; INSERT INTO priv (priv_id, priv_module, priv_name, priv_descrip) VALUES(_id, pModule, pName, pDesc); END IF; RETURN _id; END; $_$; 3DROP FUNCTION public.createpriv(text, text, text); publicadminfalse3992812551682116/createpurchasetosale(integer, integer, boolean)FUNCTIONCREATE FUNCTION createpurchasetosale(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoitemId ALIAS FOR $1; pItemSourceId ALIAS FOR $2; pDropShip ALIAS FOR $3; BEGIN RETURN createPurchaseToSale(pCoitemId, pItemSourceId, pDropShip, NULL, NULL, NULL); END; $_$; FDROP FUNCTION public.createpurchasetosale(integer, integer, boolean); publicadminfalse83992125516821178createpurchasetosale(integer, integer, boolean, numeric)FUNCTIONCREATE FUNCTION createpurchasetosale(integer, integer, boolean, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoitemId ALIAS FOR $1; pItemSourceId ALIAS FOR $2; pDropShip ALIAS FOR $3; pPrice ALIAS FOR $4; BEGIN RETURN createPurchaseToSale(pCoitemId, pItemSourceId, pDropShip, NULL, NULL, pPrice); END; $_$; ODROP FUNCTION public.createpurchasetosale(integer, integer, boolean, numeric); publicadminfalse3992812551833163Gcreatepurchasetosale(integer, integer, boolean, numeric, date, numeric)FUNCTIONQ5CREATE FUNCTION createpurchasetosale(integer, integer, boolean, numeric, date, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoitemId ALIAS FOR $1; pItemSourceId ALIAS FOR $2; pDropShip ALIAS FOR $3; pQty ALIAS FOR $4; pDueDate ALIAS FOR $5; pPrice ALIAS FOR $6; _s RECORD; _w RECORD; _i RECORD; _shipto RECORD; _poheadid INTEGER := -1; _poitemid INTEGER := -1; _taxtypeid INTEGER := -1; _polinenumber INTEGER; _ponumber NUMERIC; _price NUMERIC; _temp INTEGER; BEGIN -- Check for existing poitem for this coitem SELECT poitem_id INTO _poitemid FROM poitem WHERE (poitem_order_id=pCoitemId) AND (poitem_order_type='S'); IF (FOUND) THEN RETURN _poitemid; END IF; SELECT *, COALESCE(roundQty(item_fractional, (coitem_qtyord * coitem_qty_invuomratio)), 0.0) AS orderqty INTO _s FROM cohead JOIN coitem ON (cohead_id = coitem_cohead_id) LEFT OUTER JOIN shiptoinfo ON (cohead_shipto_id = shipto_id) LEFT OUTER JOIN itemsite ON (coitem_itemsite_id = itemsite_id) LEFT OUTER JOIN item ON (item_id = itemsite_item_id) WHERE (coitem_id = pCoitemId); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT * INTO _w FROM whsinfo JOIN addr ON (warehous_addr_id = addr_id) JOIN cntct ON (warehous_cntct_id = cntct_id) JOIN itemsite ON (warehous_id = itemsite_warehous_id) WHERE (itemsite_id = _s.itemsite_id); SELECT * INTO _i FROM itemsrc JOIN vendinfo ON (itemsrc_vend_id = vend_id) LEFT OUTER JOIN cntct ON (vend_cntct1_id = cntct_id) LEFT OUTER JOIN addr ON (vend_addr_id = addr_id) WHERE (itemsrc_id = pItemSourceId); IF (NOT FOUND) THEN RETURN -2; END IF; SELECT * INTO _shipto FROM shiptoinfo JOIN cntct ON (shipto_cntct_id = cntct_id) JOIN addr ON (shipto_addr_id = addr_id) RIGHT OUTER JOIN cohead ON (cohead_cust_id = shipto_cust_id) WHERE (cohead_id = _s.cohead_id) LIMIT 1; IF (pDropShip) THEN SELECT COALESCE(pohead_id, -1) INTO _temp FROM pohead WHERE ( (pohead_status = 'U') AND (pohead_vend_id = _i.itemsrc_vend_id) AND (pohead_shiptoaddress_id = _s.shipto_addr_id) ); ELSE SELECT COALESCE(pohead_id, -1) INTO _temp FROM pohead WHERE ( (pohead_status = 'U') AND (pohead_vend_id = _i.itemsrc_vend_id) AND (pohead_shiptoaddress_id = _w.addr_id) ); END IF; IF (FOUND) THEN _poheadid := _temp; UPDATE pohead SET pohead_dropship = pDropShip WHERE (pohead_id = _poheadid); ELSE SELECT NEXTVAL('pohead_pohead_id_seq') INTO _poheadid; SELECT fetchPoNumber() INTO _ponumber; IF (pDropShip) THEN INSERT INTO pohead ( pohead_id, pohead_number, pohead_status, pohead_dropship, pohead_agent_username, pohead_vend_id, pohead_taxzone_id, pohead_orderdate, pohead_curr_id, pohead_cohead_id, pohead_warehous_id, pohead_shipvia, pohead_terms_id, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry, pohead_comments ) VALUES ( _poheadid, _ponumber, 'U', pDropShip, getEffectiveXtUser(), _i.itemsrc_vend_id, _i.vend_taxzone_id, CURRENT_DATE, COALESCE(_i.vend_curr_id, basecurrid()), _s.cohead_id, COALESCE(_s.cohead_warehous_id, -1), COALESCE(_i.vend_shipvia, TEXT('')), COALESCE(_i.vend_terms_id, -1), COALESCE(_s.cohead_shipto_cntct_id, _shipto.shipto_cntct_id), COALESCE(_s.cohead_shipto_cntct_honorific, _shipto.cntct_honorific), COALESCE(_s.cohead_shipto_cntct_first_name, _shipto.cntct_first_name), COALESCE(_s.cohead_shipto_cntct_middle, _shipto.cntct_middle), COALESCE(_s.cohead_shipto_cntct_last_name, _shipto.cntct_last_name), COALESCE(_s.cohead_shipto_cntct_suffix, _shipto.cntct_suffix), COALESCE(_s.cohead_shipto_cntct_phone, _shipto.cntct_phone), COALESCE(_s.cohead_shipto_cntct_title, _shipto.cntct_title), COALESCE(_s.cohead_shipto_cntct_fax, _shipto.cntct_fax), COALESCE(_s.cohead_shipto_cntct_email, _shipto.cntct_email), COALESCE(_s.shipto_addr_id, _shipto.addr_id), COALESCE(_s.cohead_shiptoaddress1, _shipto.addr_line1), COALESCE(_s.cohead_shiptoaddress2, _shipto.addr_line2), COALESCE(_s.cohead_shiptoaddress3, _shipto.addr_line3), COALESCE(_s.cohead_shiptocity, _shipto.addr_city), COALESCE(_s.cohead_shiptostate, _shipto.addr_state), COALESCE(_s.cohead_shiptozipcode, _shipto.addr_postalcode), COALESCE(_s.cohead_shiptocountry, _shipto.addr_country), _i.cntct_id, COALESCE(_i.cntct_honorific, TEXT('')), COALESCE(_i.cntct_first_name, TEXT('')), COALESCE(_i.cntct_middle, TEXT('')), COALESCE(_i.cntct_last_name, TEXT('')), COALESCE(_i.cntct_suffix, TEXT('')), COALESCE(_i.cntct_phone, TEXT('')), COALESCE(_i.cntct_title, TEXT('')), COALESCE(_i.cntct_fax, TEXT('')), COALESCE(_i.cntct_email, TEXT('')), COALESCE(_i.addr_line1, TEXT('')), COALESCE(_i.addr_line2, TEXT('')), COALESCE(_i.addr_line3, TEXT('')), COALESCE(_i.addr_city, TEXT('')), COALESCE(_i.addr_state, TEXT('')), COALESCE(_i.addr_postalcode, TEXT('')), COALESCE(_i.addr_country, TEXT('')), COALESCE(_s.cohead_shipcomments, TEXT('')) ); ELSE INSERT INTO pohead ( pohead_id, pohead_number, pohead_status, pohead_dropship, pohead_agent_username, pohead_vend_id, pohead_taxzone_id, pohead_orderdate, pohead_curr_id, pohead_cohead_id, pohead_warehous_id, pohead_shipvia, pohead_terms_id, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry ) VALUES ( _poheadid, _ponumber, 'U', pDropShip, getEffectiveXtUser(), _i.itemsrc_vend_id, _i.vend_taxzone_id, CURRENT_DATE, COALESCE(_i.vend_curr_id, basecurrid()), _s.cohead_id, COALESCE(_s.cohead_warehous_id, -1), COALESCE(_i.vend_shipvia, TEXT('')), COALESCE(_i.vend_terms_id, -1), _w.cntct_id, _w.cntct_honorific, _w.cntct_first_name, _w.cntct_middle, _w.cntct_last_name, _w.cntct_suffix, _w.cntct_phone, _w.cntct_title, _w.cntct_fax, _w.cntct_email, _w.addr_id, _w.addr_line1, _w.addr_line2, _w.addr_line3, _w.addr_city, _w.addr_state, _w.addr_postalcode, _w.addr_country, _i.cntct_id, COALESCE(_i.cntct_honorific, TEXT('')), COALESCE(_i.cntct_first_name, TEXT('')), COALESCE(_i.cntct_middle, TEXT('')), COALESCE(_i.cntct_last_name, TEXT('')), COALESCE(_i.cntct_suffix, TEXT('')), COALESCE(_i.cntct_phone, TEXT('')), COALESCE(_i.cntct_title, TEXT('')), COALESCE(_i.cntct_fax, TEXT('')), COALESCE(_i.cntct_email, TEXT('')), COALESCE(_i.addr_line1, TEXT('')), COALESCE(_i.addr_line2, TEXT('')), COALESCE(_i.addr_line3, TEXT('')), COALESCE(_i.addr_city, TEXT('')), COALESCE(_i.addr_state, TEXT('')), COALESCE(_i.addr_postalcode, TEXT('')), COALESCE(_i.addr_country, TEXT('')) ); END IF; END IF; SELECT NEXTVAL('poitem_poitem_id_seq') INTO _poitemid; SELECT (COALESCE(MAX(poitem_linenumber), 0) + 1) INTO _polinenumber FROM poitem WHERE (poitem_pohead_id = _poheadid); SELECT COALESCE(itemtax_taxtype_id, -1) INTO _taxtypeid FROM itemtax WHERE (itemtax_item_id = _i.itemsrc_item_id); IF (pPrice IS NULL) THEN SELECT itemsrcPrice(pItemSourceId, COALESCE(_s.cohead_warehous_id, -1), pDropShip, COALESCE(pQty, _s.orderqty), COALESCE(_i.vend_curr_id, baseCurrId()), CURRENT_DATE) INTO _price; ELSE _price := pPrice; END IF; raise notice '_price=%', _price; IF (pDropShip) THEN INSERT INTO poitem ( poitem_id, poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_itemsrc_id, poitem_order_id, poitem_order_type, poitem_prj_id, poitem_stdcost, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id, poitem_comments ) VALUES ( _poitemid, 'U', _poheadid, _polinenumber, COALESCE(pDueDate, _s.coitem_scheddate), _s.coitem_itemsite_id, COALESCE(_i.itemsrc_vend_item_descrip, TEXT('')), COALESCE(_i.itemsrc_vend_uom, TEXT('')), COALESCE(_i.itemsrc_invvendoruomratio, 1.00), (COALESCE(pQty, _s.orderqty) / COALESCE(_i.itemsrc_invvendoruomratio, 1.00)), _price, COALESCE(_i.itemsrc_vend_item_number, TEXT('')), pItemSourceId, pCoitemId, 'S', _s.cohead_prj_id, stdcost(_i.itemsrc_item_id), COALESCE(_i.itemsrc_manuf_name, TEXT('')), COALESCE(_i.itemsrc_manuf_item_number, TEXT('')), COALESCE(_i.itemsrc_manuf_item_descrip, TEXT('')), _taxtypeid, COALESCE(_s.coitem_memo, TEXT(''))); ELSE INSERT INTO poitem ( poitem_id, poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_itemsrc_id, poitem_order_id, poitem_order_type, poitem_prj_id, poitem_stdcost, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id ) VALUES ( _poitemid, 'U', _poheadid, _polinenumber, COALESCE(pDueDate, _s.coitem_scheddate), _s.coitem_itemsite_id, COALESCE(_i.itemsrc_vend_item_descrip, TEXT('')), COALESCE(_i.itemsrc_vend_uom, TEXT('')), COALESCE(_i.itemsrc_invvendoruomratio, 1.00), (COALESCE(pQty, _s.orderqty) / COALESCE(_i.itemsrc_invvendoruomratio, 1.00)), _price, COALESCE(_i.itemsrc_vend_item_number, TEXT('')), pItemSourceId, pCoitemId, 'S', _s.cohead_prj_id, stdcost(_i.itemsrc_item_id), COALESCE(_i.itemsrc_manuf_name, TEXT('')), COALESCE(_i.itemsrc_manuf_item_number, TEXT('')), COALESCE(_i.itemsrc_manuf_item_descrip, TEXT('')), _taxtypeid ); END IF; -- Copy characteristics from the coitem to the poitem INSERT INTO charass ( charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default, charass_price ) SELECT 'PI', _poitemid, charass_char_id, charass_value, charass_default, charass_price FROM charass WHERE ( (charass_target_type='SI') AND (charass_target_id=pCoitemId) ); UPDATE coitem SET coitem_order_type = 'P', coitem_order_id = _poitemid WHERE ( coitem_id = pCoitemId ); -- Generate the PoItemCreatedBySo event notice INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id , 'P', poitem_id, itemsite_warehous_id, (pohead_number || '-' || poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id=evnttype_id) JOIN itemsite ON (evntnot_warehous_id=itemsite_warehous_id) JOIN item ON (itemsite_item_id=item_id) JOIN poitem ON (poitem_itemsite_id=itemsite_id) JOIN pohead ON (poitem_pohead_id=pohead_id) WHERE ( (poitem_id=_poitemid) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name='PoItemCreatedBySo') ); RETURN _poitemid; END; $_$; ^DROP FUNCTION public.createpurchasetosale(integer, integer, boolean, numeric, date, numeric); publicadminfalse8399212551682119createrecurringinvoices()FUNCTIONCREATE FUNCTION createrecurringinvoices() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'createRecurringInvoices() has been deprecated; use createRecurringItems(NULL, ''I'') instead.'; RETURN createRecurringItems(NULL, 'I'); END; $$; 0DROP FUNCTION public.createrecurringinvoices(); publicadminfalse8399212551682120#createrecurringitems(integer, text)FUNCTIONtCREATE FUNCTION createrecurringitems(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentid ALIAS FOR $1; -- if NULL then all items with the given pType pType TEXT := UPPER($2); -- if NULL then all types -- if both are null then all items of all types _copystmt TEXT; _count INTEGER := 0; _countstmt TEXT; _existcnt INTEGER; _id INTEGER; _interval TEXT; _last TIMESTAMP WITH TIME ZONE; _loopcount INTEGER := 1; _maxstmt TEXT; _maxdate TIMESTAMP WITH TIME ZONE := endOfTime(); _result INTEGER := 0; _next TIMESTAMP WITH TIME ZONE; _r RECORD; _rt RECORD; _tmp INTEGER; BEGIN RAISE DEBUG 'createRecurringItems(%, %) entered', pParentid, pType; FOR _r IN SELECT * FROM recur WHERE ((COALESCE(recur_end, endOfTime()) >= CURRENT_TIMESTAMP) AND (pParentid IS NULL OR recur_parent_id=pParentid) AND (pType IS NULL OR UPPER(recur_parent_type)=UPPER(pType))) LOOP RAISE DEBUG 'createRecurringItems looking at recur %, %', _r.recur_id, _r.recur_parent_type; _r.recur_max := COALESCE(_r.recur_max, CAST(fetchMetricValue('RecurringInvoiceBuffer') AS INTEGER), 1); _interval := CASE _r.recur_period WHEN 'Y' THEN ' year' WHEN 'M' THEN ' month' WHEN 'W' THEN ' week' WHEN 'D' THEN ' day' WHEN 'H' THEN ' hour' WHEN 'm' THEN ' minute' ELSE NULL END; IF (_interval IS NULL OR COALESCE(_r.recur_freq, 0) <= 0) THEN RAISE EXCEPTION 'Unknown recurrence frequency % % ON % %', _r.recur_freq, _r.recur_period, _r.recur_parent_type, _r.recur_parent_id; END IF; SELECT * INTO _rt FROM recurtype WHERE (UPPER(recurtype_type)=UPPER(pType)); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count <= 0) THEN RETURN -10; END IF; -- if the recurrence type has a max lookahead window, use it IF (_r.recur_parent_type = 'I') THEN _maxdate := CURRENT_TIMESTAMP + CAST(fetchMetricText('RecurringInvoiceBuffer') || ' days' AS INTERVAL); END IF; IF (_r.recur_parent_type = 'V') THEN _maxdate := CURRENT_TIMESTAMP + CAST(fetchMetricText('RecurringVoucherBuffer') || ' days' AS INTERVAL); END IF; IF (_maxdate > _r.recur_end) THEN -- if recur_end is null, _maxdate is ok _maxdate = _r.recur_end; END IF; -- build statements dynamically from the recurtype table because packages -- might also require recurring items. this way the algorithm is fixed -- and the details are data-driven _countstmt := 'SELECT COUNT(*) FROM [fulltable]' || ' WHERE (($1=[table]_recurring_[table]_id)' || ' AND NOT([done]) ' || ' AND ([limit]));'; _countstmt := REPLACE(_countstmt, '[fulltable]', _rt.recurtype_table); _countstmt := REPLACE(_countstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _countstmt := REPLACE(_countstmt, '[done]', _rt.recurtype_donecheck); _countstmt := REPLACE(_countstmt, '[limit]', COALESCE(_rt.recurtype_limit, 'TRUE')); _maxstmt := 'SELECT MAX([schedcol]) FROM [fulltable]' || ' WHERE (($1=[table]_recurring_[table]_id)' || ' AND ([limit]));'; _maxstmt := REPLACE(_maxstmt, '[schedcol]', _rt.recurtype_schedcol); _maxstmt := REPLACE(_maxstmt, '[fulltable]',_rt.recurtype_table); _maxstmt := REPLACE(_maxstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _maxstmt := REPLACE(_maxstmt, '[limit]', COALESCE(_rt.recurtype_limit, 'TRUE')); _copystmt := 'SELECT [copy]($1, [datetime] [more]);'; _copystmt := REPLACE(_copystmt, '[copy]', _rt.recurtype_copyfunc); _copystmt := REPLACE(_copystmt, '[datetime]', CASE WHEN UPPER(_rt.recurtype_copyargs[2])='DATE' THEN 'CAST(''$2'' AS DATE)' ELSE '''$2''' END); -- 8.4+: -- _copystmt := REPLACE(_copystmt, '[more]', -- REPEAT(', NULL', -- array_length(_rt.recurtype_copyargs) - 2)); _tmp := CAST(REPLACE(REGEXP_REPLACE(array_dims(_rt.recurtype_copyargs), '.*:', ''), ']', '') AS INTEGER); _copystmt := REPLACE(_copystmt, '[more]', REPEAT(', NULL', _tmp - 2)); EXECUTE REPLACE(_countstmt, '$1', _r.recur_parent_id::TEXT) INTO _existcnt; EXECUTE REPLACE(_maxstmt, '$1', _r.recur_parent_id::TEXT) INTO _last; RAISE DEBUG E'% got %, % got %', _countstmt, _existcnt, _maxstmt, _last; _next := _last; _loopcount := 1; WHILE (_existcnt < _r.recur_max AND _next < _maxdate) LOOP _next := _last + CAST(_r.recur_freq * _loopcount || _interval AS INTERVAL); RAISE DEBUG 'createrecurringitems looping, existcnt = %, max = %, is % between % and %?', _existcnt, _r.recur_max, _next, _r.recur_start, _r.recur_end; IF (_next BETWEEN _r.recur_start AND _maxdate) THEN RAISE DEBUG 'createrecurringitems executing % with % and %', _copystmt, _r.recur_parent_id, _next; -- 8.4+: EXECUTE _copystmt INTO _id USING _r.recur_parent_id, _next; EXECUTE REPLACE(REPLACE(_copystmt, '$1', _r.recur_parent_id::TEXT), '$2', _next::TEXT) INTO _id; RAISE DEBUG 'Copying for % returned %', _next, _id; _result := _result + 1; _existcnt := _existcnt + 1; END IF; _loopcount := _loopcount + 1; END LOOP; END LOOP; RETURN _result; END; $_$; :DROP FUNCTION public.createrecurringitems(integer, text); publicadminfalse8399212551682122|createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text)FUNCTIONCREATE FUNCTION createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN createTodoItem($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, NULL); END; $_$; DROP FUNCTION public.createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text); publicadminfalse83992 12551682123createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text, integer)FUNCTIONd CREATE FUNCTION createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoid ALIAS FOR $1; pusername ALIAS FOR $2; pname ALIAS FOR $3; pdesc ALIAS FOR $4; pincdtid ALIAS FOR $5; pcrmacctid ALIAS FOR $6; pOpheadid ALIAS FOR $7; pstarted ALIAS FOR $8; pdue ALIAS FOR $9; pstatus ALIAS FOR $10; passigned ALIAS FOR $11; pcompleted ALIAS FOR $12; ppriority ALIAS FOR $13; pnotes ALIAS FOR $14; powner ALIAS FOR $15; pcntctid ALIAS FOR $16; _todoid INTEGER; _priority INTEGER := ppriority; _status CHARACTER(1) := pstatus; _incdtid INTEGER := pincdtid; _crmacctid INTEGER := pcrmacctid; _opheadid INTEGER := pOpheadid; _assigned DATE := passigned; _result INTEGER; BEGIN IF (pusername IS NULL OR pusername = '') THEN RETURN -1; END IF; IF (pname IS NULL OR pname = '') THEN RETURN -2; END IF; IF (pdue IS NULL) THEN RETURN -3; END IF; IF (pcompleted IS NOT NULL) THEN _status := 'C'; ELSIF (pstatus IS NULL AND pstarted IS NOT NULL) THEN _status := 'I'; ELSIF (pstatus IS NULL) THEN _status := 'N'; END IF; IF (_incdtid <= 0) THEN _incdtid := NULL; END IF; IF (_crmacctid <= 0) THEN _crmacctid := NULL; END IF; IF (_opheadid <= 0) THEN _opheadid := NULL; END IF; IF (_priority <= 0) THEN _priority := NULL; END IF; IF (_assigned IS NULL) THEN _assigned := CURRENT_DATE; END IF; IF (ptodoid IS NULL) THEN SELECT NEXTVAL('todoitem_todoitem_id_seq') INTO _todoid; ELSE _todoid := ptodoid; END IF; INSERT INTO todoitem ( todoitem_id, todoitem_username, todoitem_name, todoitem_description, todoitem_incdt_id, todoitem_creator_username, todoitem_status, todoitem_active, todoitem_start_date, todoitem_due_date, todoitem_assigned_date, todoitem_completed_date, todoitem_priority_id, todoitem_notes, todoitem_crmacct_id, todoitem_ophead_id, todoitem_owner_username, todoitem_cntct_id ) VALUES ( _todoid, pusername, pname, pdesc, _incdtid, getEffectiveXtUser(), _status, TRUE, pstarted, pdue, _assigned, pcompleted, _priority, pnotes, _crmacctid, _opheadid, powner, pcntctid ); RETURN _todoid; END; $_$; DROP FUNCTION public.createtodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, text, integer); publicadminfalse83992W12551682124createurl(text, text)FUNCTION.CREATE FUNCTION createurl(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ declare pTitle ALIAS FOR $1; pUrl ALIAS FOR $2; _id integer; begin _id := nextval('urlinfo_url_id_seq'); insert into urlinfo (url_id, url_title, url_url) values (_id, pTitle, pUrl); return _id; end; $_$; ,DROP FUNCTION public.createurl(text, text); publicadminfalse8399212552005518createuser(text, boolean)FUNCTIONCREATE FUNCTION createuser(pusername text, pcreateusers boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pCreateUsers) THEN EXECUTE 'CREATE USER "' || pUsername || '" CREATEROLE IN GROUP xtrole;'; ELSE EXECUTE 'CREATE USER "' || pUsername || '" NOCREATEROLE IN GROUP xtrole;'; END IF; RETURN 1; END; $$; GDROP FUNCTION public.createuser(pusername text, pcreateusers boolean); publicadminfalse8399212551682126Lcreatewo(integer, integer, numeric, integer, date, text, character, integer)FUNCTIONCREATE FUNCTION createwo(integer, integer, numeric, integer, date, text, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQtyOrdered ALIAS FOR $3; pLeadTime ALIAS FOR $4; pDueDate ALIAS FOR $5; pProductionNotes ALIAS FOR $6; pParentType ALIAS FOR $7; pParentId ALIAS FOR $8; BEGIN RETURN createWo( pWoNumber, pItemsiteid, 1, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, pParentType, pParentId, -1 ); END; $_$; cDROP FUNCTION public.createwo(integer, integer, numeric, integer, date, text, character, integer); publicadminfalse39928125516821278createwo(integer, integer, numeric, integer, date, text)FUNCTION`CREATE FUNCTION createwo(integer, integer, numeric, integer, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQtyOrdered ALIAS FOR $3; pLeadTime ALIAS FOR $4; pDueDate ALIAS FOR $5; pProductionNotes ALIAS FOR $6; BEGIN RETURN createWo( pWoNumber, pItemsiteid, 1, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, NULL, NULL, -1 ); END; $_$; ODROP FUNCTION public.createwo(integer, integer, numeric, integer, date, text); publicadminfalse83992X125516821285createwo(integer, integer, numeric, date, date, text)FUNCTION=CREATE FUNCTION createwo(integer, integer, numeric, date, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pQtyOrdered ALIAS FOR $3; pStartDate ALIAS FOR $4; pDueDate ALIAS FOR $5; pProductionNotes ALIAS FOR $6; BEGIN RETURN createWo( pWoNumber, pItemsiteid, 1, pQtyOrdered, pStartDate, pDueDate, pProductionNotes, NULL, NULL, -1); END; $_$; LDROP FUNCTION public.createwo(integer, integer, numeric, date, date, text); publicadminfalse39928$12551682129Ucreatewo(integer, integer, integer, numeric, integer, date, text, character, integer)FUNCTIONCREATE FUNCTION createwo(integer, integer, integer, numeric, integer, date, text, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pLeadTime ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; BEGIN RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, pParentType, pParentId, -1); END; $_$; lDROP FUNCTION public.createwo(integer, integer, integer, numeric, integer, date, text, character, integer); publicadminfalse3992812551682130^createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer)FUNCTION CREATE FUNCTION createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pLeadTime ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; BEGIN RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, pParentType, pParentId, pProjectId); END; $_$; uDROP FUNCTION public.createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer); publicadminfalse39928'12551682131[createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer)FUNCTIONfCREATE FUNCTION createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pStartDate ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; _woid INTEGER; _result INTEGER; _parentType char(1); _bomrevid INTEGER; _boorevid INTEGER; BEGIN SELECT getActiveRevId('BOM',itemsite_item_id) INTO _bomrevid FROM itemsite WHERE (itemsite_id=pItemsiteid); SELECT getActiveRevId('BOO',itemsite_item_id) INTO _boorevid FROM itemsite WHERE (itemsite_id=pItemsiteid); RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, pStartDate, pDueDate, pProductionNotes, pParentType, pParentId, pProjectId, _bomrevid, _boorevid, NULL); END; $_$; rDROP FUNCTION public.createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer); publicadminfalse83992%12551682132pcreatewo(integer, integer, integer, numeric, integer, date, text, character, integer, integer, integer, integer)FUNCTIONmCREATE FUNCTION createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pLeadTime ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; pBomRevId ALIAS FOR $11; pBooRevId ALIAS FOR $12; BEGIN RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, (pDueDate - pLeadTime), pDueDate, pProductionNotes, pParentType, pParentId, pProjectId, pBomRevId, pBooRevId, NULL); END; $_$; DROP FUNCTION public.createwo(integer, integer, integer, numeric, integer, date, text, character, integer, integer, integer, integer); publicadminfalse83992=12551682133mcreatewo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer)FUNCTION^CREATE FUNCTION createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pStartDate ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; pBomRevId ALIAS FOR $11; pBooRevId ALIAS FOR $12; BEGIN RETURN createWo(pWoNumber, pItemsiteid, pPriority, pQtyOrdered, pStartDate, pDueDate, pProductionNotes, pParentType, pParentId, pProjectId, pBomRevId, pBooRevId, NULL); END; $_$; DROP FUNCTION public.createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer); publicadminfalse3992812551682134screatewo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer, text)FUNCTION CREATE FUNCTION createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pPriority ALIAS FOR $3; pQtyOrdered ALIAS FOR $4; pStartDate ALIAS FOR $5; pDueDate ALIAS FOR $6; pProductionNotes ALIAS FOR $7; pParentType ALIAS FOR $8; pParentId ALIAS FOR $9; pProjectId ALIAS FOR $10; pBomRevId ALIAS FOR $11; pBooRevId ALIAS FOR $12; pCosMethod ALIAS FOR $13; _startDate DATE; _woid INTEGER; _result INTEGER; _parentType char(1); _parentId INTEGER; _cosmethod char(1); _itemsite RECORD; BEGIN _parentType := COALESCE(pParentType, ' '); _parentId := COALESCE(pParentId, -1); SELECT * INTO _itemsite FROM itemsite WHERE itemsite_id = pItemsiteid; -- Check to make sure the itemsite specified is supplied at itemsite IF (NOT _itemsite.itemsite_wosupply) THEN RETURN -1; END IF; -- Check to make sure if this is a job item that it is tied to a sales order -- Or if it is just an avarage costed item IF (pCosMethod IN ('D', 'P')) THEN _cosmethod := pCosMethod; ELSE IF (_itemsite.itemsite_costmethod = 'J') THEN IF (_parentType = ' ' OR _parentId = -1) THEN RAISE EXCEPTION 'Work Orders for Item Sites that are Job cost must have a parent order.'; ELSE SELECT COALESCE(itemsite_cosdefault,fetchmetrictext('JobItemCosDefault'),'D') INTO _cosmethod FROM itemsite WHERE itemsite_id=pItemsiteid; END IF; ELSIF (_itemsite.itemsite_costmethod = 'A') THEN _cosmethod := COALESCE(_itemsite.itemsite_cosdefault,fetchmetrictext('JobItemCosDefault'),'D'); END IF; END IF; -- Check to see if the site calendar metric is set, and if so adjust the start date if necessary IF (fetchmetricbool('UseSiteCalendar')) THEN _startDate := calculatenextworkingdate(_itemsite.itemsite_warehous_id, pStartDate, 0); IF (_startDate != pStartDate) THEN _startDate := calculatenextworkingdate(_itemsite.itemsite_warehous_id, pDueDate, -_itemsite.itemsite_leadtime); END IF; ELSE _startDate := pStartDate; END IF; -- Grab the next wo_id SELECT NEXTVAL('wo_wo_id_seq') INTO _woid; -- Create the W/O INSERT INTO wo ( wo_id, wo_number, wo_subnumber, wo_itemsite_id, wo_priority, wo_ordtype, wo_ordid, wo_status, wo_startdate, wo_duedate, wo_qtyord, wo_qtyrcv, wo_prodnotes, wo_prj_id, wo_bom_rev_id, wo_boo_rev_id, wo_cosmethod ) SELECT _woid, pWoNumber, nextWoSubnumber(pWoNumber), itemsite_id, pPriority, _parentType, pParentId, 'O', _startDate, pDueDate, roundQty(item_fractional, pQtyOrdered), 0, pProductionNotes, pProjectId, pBomRevid, pBooRevid, _cosmethod FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid)); -- Explode the newly created W/O according to metrics IF ( ( SELECT (metric_value='t') FROM metric WHERE (metric_name='AutoExplodeWO') ) ) THEN SELECT explodeWo( _woid, ( SELECT (metric_value = 'M') FROM metric WHERE (metric_name='WOExplosionLevel') ) ) INTO _result; ELSE _result := _woid; END IF; RETURN _result; END; $_$; DROP FUNCTION public.createwo(integer, integer, integer, numeric, date, date, text, character, integer, integer, integer, integer, text); publicadminfalse83992^12551682135?createwomaterial(integer, integer, character, numeric, numeric)FUNCTIONCREATE FUNCTION createwomaterial(integer, integer, character, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pQtyPer ALIAS FOR $4; pScrap ALIAS FOR $5; _result INTEGER; BEGIN SELECT createWoMaterial(pWoid, pItemsiteid, pIssueMethod, item_inv_uom_id, pQtyPer, pScrap) INTO _result FROM itemsite JOIN item ON (itemsite_item_id=item_id) WHERE(itemsite_id=pItemsiteid); RETURN _result; END; $_$; VDROP FUNCTION public.createwomaterial(integer, integer, character, numeric, numeric); publicadminfalse83992_12551682136Hcreatewomaterial(integer, integer, character, integer, numeric, numeric)FUNCTIONCREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyPer ALIAS FOR $5; pScrap ALIAS FOR $6; _womatlid INTEGER; BEGIN SELECT createWoMaterial(pWoid,pItemsiteid,pIssueMethod,pUomId,pQtyPer,pScrap,-1, NULL, NULL) INTO _womatlid; RETURN _womatlid; END; $_$; _DROP FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric); publicadminfalse83992`12551682137Qcreatewomaterial(integer, integer, character, integer, numeric, numeric, integer)FUNCTIONCREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyPer ALIAS FOR $5; pScrap ALIAS FOR $6; pBomitemId ALIAS FOR $7; _womatlid INTEGER; BEGIN _womatlid := (SELECT NEXTVAL('womatl_womatl_id_seq')); INSERT INTO womatl ( womatl_id, womatl_wo_id, womatl_itemsite_id, womatl_issuemethod, womatl_uom_id, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_wooper_id, womatl_bomitem_id, womatl_duedate ) SELECT _womatlid, wo_id, pItemsiteid, pIssueMethod, pUomId, pQtyPer, pScrap, roundQty(item_fractional, (wo_qtyord * (pQtyPer * (1 + pScrap)))), 0, 0, -1, pBomitemId, wo_startdate FROM wo, itemsite, item WHERE ( (itemsite_item_id=item_id) AND (wo_id=pWoid) AND (itemsite_id=pItemsiteid) ); UPDATE wo SET wo_adhoc=TRUE WHERE (wo_id=pWoid); UPDATE wo SET wo_status='E' WHERE ( (wo_status='O') AND (wo_id=pWoid) ); RETURN _womatlid; END; $_$; hDROP FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric, integer); publicadminfalse39928a12551682138]createwomaterial(integer, integer, character, integer, numeric, numeric, integer, text, text)FUNCTION CREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyPer ALIAS FOR $5; pScrap ALIAS FOR $6; pBomitemId ALIAS FOR $7; pNotes ALIAS FOR $8; pRef ALIAS FOR $9; _womatlid INTEGER; _p RECORD; BEGIN _womatlid := (SELECT NEXTVAL('womatl_womatl_id_seq')); INSERT INTO womatl ( womatl_id, womatl_wo_id, womatl_itemsite_id, womatl_issuemethod, womatl_uom_id, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_wooper_id, womatl_bomitem_id, womatl_duedate, womatl_notes, womatl_ref ) SELECT _womatlid, wo_id, pItemsiteid, pIssueMethod, pUomId, pQtyPer, pScrap, roundQty(item_fractional, (wo_qtyord * (pQtyPer * (1 + pScrap)))), 0, 0, -1, pBomitemId, wo_startdate, pNotes, pRef FROM wo, itemsite, item WHERE ( (itemsite_item_id=item_id) AND (wo_id=pWoid) AND (itemsite_id=pItemsiteid) ); -- Handle all of the Phantom material requirements WHILE ( ( SELECT COUNT(*) FROM womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_wo_id=pWoid) AND (item_type='F') ) ) > 0 ) LOOP FOR _p IN SELECT wo_qtyord, wo_startdate, womatl_id, womatl_wooper_id FROM wo, womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_type='F') AND (womatl_wo_id=wo_id) AND (wo_id=pWoid) ) LOOP INSERT INTO womatl ( womatl_wo_id, womatl_itemsite_id, womatl_wooper_id, womatl_schedatwooper, womatl_duedate, womatl_uom_id, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_createwo, womatl_issuemethod, womatl_notes, womatl_ref ) SELECT pWoid, cs.itemsite_id, _p.womatl_wooper_id, womatl_schedatwooper, womatl_duedate, bomitem_uom_id, (bomitem_qtyper * womatl_qtyper), bomitem_scrap, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id), (_p.wo_qtyord * bomitem_qtyper * womatl_qtyper * (1 + bomitem_scrap))), 0, 0, startOfTime(), startOfTime(), 0, ci.item_picklist, ( (ci.item_type='M') AND (bomitem_createwo) ), bomitem_issuemethod, bomitem_notes, bomitem_ref FROM wo, womatl, bomitem, itemsite AS cs, itemsite AS ps, item AS ci, item AS pi WHERE ( (womatl_itemsite_id=ps.itemsite_id) AND (womatl_wo_id=wo_id) AND (bomitem_parent_item_id=pi.item_id) AND (bomitem_item_id=ci.item_id) AND (ps.itemsite_warehous_id=cs.itemsite_warehous_id) AND (cs.itemsite_item_id=ci.item_id) AND (ps.itemsite_item_id=pi.item_id) AND (woEffectiveDate(_p.wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (womatl_id=_p.womatl_id)); DELETE FROM womatl WHERE (womatl_id=_p.womatl_id); END LOOP; END LOOP; UPDATE wo SET wo_adhoc=TRUE WHERE (wo_id=pWoid); UPDATE wo SET wo_status='E' WHERE ( (wo_status='O') AND (wo_id=pWoid) ); RETURN _womatlid; END; $_$; tDROP FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric, integer, text, text); publicadminfalse8399212551682139Hcreatewomaterial(integer, integer, character, numeric, numeric, numeric)FUNCTIONCREATE FUNCTION createwomaterial(integer, integer, character, numeric, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pQtyFxd ALIAS FOR $4; pQtyPer ALIAS FOR $5; pScrap ALIAS FOR $6; _result INTEGER; BEGIN SELECT createWoMaterial(pWoid, pItemsiteid, pIssueMethod, item_inv_uom_id, pQtyFxd, pQtyPer, pScrap) INTO _result FROM itemsite JOIN item ON (itemsite_item_id=item_id) WHERE(itemsite_id=pItemsiteid); RETURN _result; END; $_$; _DROP FUNCTION public.createwomaterial(integer, integer, character, numeric, numeric, numeric); publicadminfalse83992]12551682140Qcreatewomaterial(integer, integer, character, integer, numeric, numeric, numeric)FUNCTIONzCREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyFxd ALIAS FOR $5; pQtyPer ALIAS FOR $6; pScrap ALIAS FOR $7; _womatlid INTEGER; BEGIN SELECT createWoMaterial(pWoid,pItemsiteid,pIssueMethod,pUomId,pQtyFxd,pQtyPer,pScrap,-1, NULL, NULL) INTO _womatlid; RETURN _womatlid; END; $_$; hDROP FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric, numeric); publicadminfalse83992>12551682141fcreatewomaterial(integer, integer, character, integer, numeric, numeric, numeric, integer, text, text)FUNCTIONCREATE FUNCTION createwomaterial(integer, integer, character, integer, numeric, numeric, numeric, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; pIssueMethod ALIAS FOR $3; pUomId ALIAS FOR $4; pQtyFxd ALIAS FOR $5; pQtyPer ALIAS FOR $6; pScrap ALIAS FOR $7; pBomitemId ALIAS FOR $8; pNotes ALIAS FOR $9; pRef ALIAS FOR $10; _womatlid INTEGER; BEGIN SELECT createWoMaterial(pWoid,pItemsiteid,pIssueMethod,pUomId,pQtyFxd,pQtyPer,pScrap,pBomitemId,pNotes,pRef,NULL,NULL) INTO _womatlid; RETURN _womatlid; END; $_$; }DROP FUNCTION public.createwomaterial(integer, integer, character, integer, numeric, numeric, numeric, integer, text, text); publicadminfalse8399212551834022xcreatewomaterial(integer, integer, character, integer, numeric, numeric, numeric, integer, text, text, integer, boolean)FUNCTIONCREATE FUNCTION createwomaterial(pwoid integer, pitemsiteid integer, pissuemethod character, puomid integer, pqtyfxd numeric, pqtyper numeric, pscrap numeric, pbomitemid integer, pnotes text, pref text, pwooperid integer, ppicklist boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _womatlid INTEGER; _p RECORD; BEGIN _womatlid := (SELECT NEXTVAL('womatl_womatl_id_seq')); INSERT INTO womatl ( womatl_id, womatl_wo_id, womatl_itemsite_id, womatl_issuemethod, womatl_uom_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_wooper_id, womatl_bomitem_id, womatl_duedate, womatl_notes, womatl_ref, womatl_picklist ) SELECT _womatlid, wo_id, pItemsiteid, pIssueMethod, pUomId, pQtyFxd, pQtyPer, pScrap, roundQty(item_fractional, (pQtyFxd + wo_qtyord * pQtyPer) * (1 + pScrap) ), 0, 0, COALESCE(pWooperId, -1), pBomitemId, wo_startdate, pNotes, pRef, COALESCE(pPickList, item_picklist) FROM wo, itemsite JOIN item ON (item_id=itemsite_item_id) WHERE ( (wo_id=pWoid) AND (itemsite_id=pItemsiteid) ); -- Handle all of the Phantom material requirements WHILE ( ( SELECT COUNT(*) FROM womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_wo_id=pWoid) AND (item_type='F') ) ) > 0 ) LOOP FOR _p IN SELECT wo_qtyord, wo_startdate, womatl_id, womatl_wooper_id FROM wo, womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_type='F') AND (womatl_wo_id=wo_id) AND (wo_id=pWoid) ) LOOP INSERT INTO womatl ( womatl_wo_id, womatl_itemsite_id, womatl_wooper_id, womatl_schedatwooper, womatl_duedate, womatl_uom_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_createwo, womatl_issuemethod, womatl_notes, womatl_ref ) SELECT pWoid, cs.itemsite_id, _p.womatl_wooper_id, womatl_schedatwooper, womatl_duedate, bomitem_uom_id, bomitem_qtyfxd, (bomitem_qtyper * womatl_qtyper), bomitem_scrap, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id), ((bomitem_qtyfxd + _p.wo_qtyord * bomitem_qtyper) * womatl_qtyper * (1 + bomitem_scrap))), 0, 0, startOfTime(), startOfTime(), 0, ci.item_picklist, ( (ci.item_type='M') AND (bomitem_createwo) ), bomitem_issuemethod, bomitem_notes, bomitem_ref FROM wo, womatl, bomitem, itemsite AS cs, itemsite AS ps, item AS ci, item AS pi WHERE ( (womatl_itemsite_id=ps.itemsite_id) AND (womatl_wo_id=wo_id) AND (bomitem_parent_item_id=pi.item_id) AND (bomitem_item_id=ci.item_id) AND (ps.itemsite_warehous_id=cs.itemsite_warehous_id) AND (cs.itemsite_item_id=ci.item_id) AND (ps.itemsite_item_id=pi.item_id) AND (woEffectiveDate(_p.wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (womatl_id=_p.womatl_id)); DELETE FROM womatl WHERE (womatl_id=_p.womatl_id); END LOOP; END LOOP; UPDATE wo SET wo_adhoc=TRUE WHERE (wo_id=pWoid); UPDATE wo SET wo_status='E' WHERE ( (wo_status='O') AND (wo_id=pWoid) ); RETURN _womatlid; END; $$; DROP FUNCTION public.createwomaterial(pwoid integer, pitemsiteid integer, pissuemethod character, puomid integer, pqtyfxd numeric, pqtyper numeric, pscrap numeric, pbomitemid integer, pnotes text, pref text, pwooperid integer, ppicklist boolean); publicadminfalse39928?12551682142creditmemototal(integer)FUNCTION!CREATE FUNCTION creditmemototal(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCreditmemoId ALIAS FOR $1; _result NUMERIC; BEGIN -- TO DO: Add in line item taxes SELECT COALESCE(cmhead_freight,0.0) + COALESCE(cmhead_misc,0.0) + ( SELECT COALESCE(ROUND(SUM((cmitem_qtycredit * cmitem_qty_invuomratio) * cmitem_unitprice / cmitem_price_invuomratio), 2), 0.0) FROM cmitem WHERE (cmitem_cmhead_id=cmhead_id) ) + (SELECT COALESCE(SUM(tax) * -1, 0) AS tax FROM ( SELECT ROUND(SUM(taxdetail_tax),2) AS tax FROM tax JOIN calculateTaxDetailSummary('CM', cmhead_id, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id) AS data) INTO _result FROM cmhead WHERE (cmhead_id=pCreditmemoId); IF (NOT FOUND) THEN return 0; ELSE RETURN _result; END IF; END; $_$; /DROP FUNCTION public.creditmemototal(integer); publicadminfalse8399212591682143crmacctTABLECREATE TABLE crmacct ( crmacct_id integer NOT NULL, crmacct_number text NOT NULL, crmacct_name text, crmacct_active boolean DEFAULT true, crmacct_type character(1), crmacct_cust_id integer, crmacct_competitor_id integer, crmacct_partner_id integer, crmacct_prospect_id integer, crmacct_vend_id integer, crmacct_cntct_id_1 integer, crmacct_cntct_id_2 integer, crmacct_parent_id integer, crmacct_notes text, crmacct_taxauth_id integer, crmacct_owner_username text, crmacct_emp_id integer, crmacct_salesrep_id integer, crmacct_usr_username text, CONSTRAINT crmacct_crmacct_number_check CHECK ((crmacct_number <> ''::text)), CONSTRAINT crmacct_crmacct_type_check CHECK ((crmacct_type = ANY (ARRAY['I'::bpchar, 'O'::bpchar]))), CONSTRAINT crmacct_crmacct_usr_username_check CHECK ((btrim(crmacct_usr_username) <> ''::text)), CONSTRAINT crmacct_owner_username_check CHECK ((btrim(crmacct_owner_username) <> ''::text)) ); DROP TABLE public.crmacct; publicadminfalse576257635764576557668!00 TABLE crmacctCOMMENTCOMMENT ON TABLE crmacct IS 'CRM Accounts are umbrella records that tie together people and organizations with whom we have business relationships.'; publicadminfalse153!00COLUMN crmacct.crmacct_idCOMMENTLCOMMENT ON COLUMN crmacct.crmacct_id IS 'Internal ID of this CRM Account.'; publicadminfalse153!00COLUMN crmacct.crmacct_numberCOMMENTkCOMMENT ON COLUMN crmacct.crmacct_number IS 'Abbreviated human-readable identifier for this CRM Account.'; publicadminfalse153!00COLUMN crmacct.crmacct_nameCOMMENTLCOMMENT ON COLUMN crmacct.crmacct_name IS 'Long name of this CRM Account.'; publicadminfalse153!00COLUMN crmacct.crmacct_activeCOMMENT_COMMENT ON COLUMN crmacct.crmacct_active IS 'This CRM Account is available for new activity.'; publicadminfalse153!00COLUMN crmacct.crmacct_typeCOMMENTCOMMENT ON COLUMN crmacct.crmacct_type IS 'This indicates whether the CRM Account represents an organization or an individual person.'; publicadminfalse153!00COLUMN crmacct.crmacct_cust_idCOMMENTeCOMMENT ON COLUMN crmacct.crmacct_cust_id IS 'If this is not null, this CRM Account is a Customer.'; publicadminfalse153!00$COLUMN crmacct.crmacct_competitor_idCOMMENTCOMMENT ON COLUMN crmacct.crmacct_competitor_id IS 'For now, > 0 indicates this CRM Account is a competitor. Eventually this may become a foreign key to a table of competitors.'; publicadminfalse153!00!COLUMN crmacct.crmacct_partner_idCOMMENTCOMMENT ON COLUMN crmacct.crmacct_partner_id IS 'For now, > 0 indicates this CRM Account is a partner. Eventually this may become a foreign key to a table of partners.'; publicadminfalse153!00"COLUMN crmacct.crmacct_prospect_idCOMMENTiCOMMENT ON COLUMN crmacct.crmacct_prospect_id IS 'If this is not null, this CRM Account is a Prospect.'; publicadminfalse153!00COLUMN crmacct.crmacct_vend_idCOMMENTcCOMMENT ON COLUMN crmacct.crmacct_vend_id IS 'If this is not null, this CRM Account is a Vendor.'; publicadminfalse153!00!COLUMN crmacct.crmacct_cntct_id_1COMMENT\COMMENT ON COLUMN crmacct.crmacct_cntct_id_1 IS 'The primary contact for the CRM Account.'; publicadminfalse153!00!COLUMN crmacct.crmacct_cntct_id_2COMMENT^COMMENT ON COLUMN crmacct.crmacct_cntct_id_2 IS 'The secondary contact for the CRM Account.'; publicadminfalse153!00 COLUMN crmacct.crmacct_parent_idCOMMENTCOMMENT ON COLUMN crmacct.crmacct_parent_id IS 'The internal ID of an (optional) parent CRM Account. For example, if the current CRM Account is a subsidiary of another company, the crmacct_parent_id points to the CRM Account representing that parent company.'; publicadminfalse153!00COLUMN crmacct.crmacct_notesCOMMENT`COMMENT ON COLUMN crmacct.crmacct_notes IS 'Free-form comments pertaining to the CRM Account.'; publicadminfalse153!00!COLUMN crmacct.crmacct_taxauth_idCOMMENTmCOMMENT ON COLUMN crmacct.crmacct_taxauth_id IS 'If this is not null, this CRM Account is a Tax Authority.'; publicadminfalse153!00%COLUMN crmacct.crmacct_owner_usernameCOMMENTnCOMMENT ON COLUMN crmacct.crmacct_owner_username IS 'The application User responsible for this CRM Account.'; publicadminfalse153!00COLUMN crmacct.crmacct_emp_idCOMMENTeCOMMENT ON COLUMN crmacct.crmacct_emp_id IS 'If this is not null, this CRM Account is an Employee.'; publicadminfalse153!00"COLUMN crmacct.crmacct_salesrep_idCOMMENTjCOMMENT ON COLUMN crmacct.crmacct_salesrep_id IS 'If this is not null, this CRM Account is a Sales Rep.'; publicadminfalse153!00#COLUMN crmacct.crmacct_usr_usernameCOMMENTsCOMMENT ON COLUMN crmacct.crmacct_usr_username IS 'If this is not null, this CRM Account is an application User.'; publicadminfalse153!00crmacctACLREVOKE ALL ON TABLE crmacct FROM PUBLIC; REVOKE ALL ON TABLE crmacct FROM admin; GRANT ALL ON TABLE crmacct TO admin; GRANT ALL ON TABLE crmacct TO xtrole; publicadminfalse153B12551682153 crmacct()FUNCTIONCREATE FUNCTION crmacct() RETURNS SETOF crmacct LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row crmacct%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllCRMAccounts','ViewAllCRMAccounts','MaintainPersonalCRMAccounts','ViewPersonalCRMAccounts') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM crmacct LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM crmacct WHERE crmacct_owner_username = getEffectiveXtUser() LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; DROP FUNCTION public.crmacct(); publicadminfalse399282627!00FUNCTION crmacct()COMMENTwCOMMENT ON FUNCTION crmacct() IS 'A table function that returns CRM Account results according to privilege settings.'; publicadminfalse1346e12551682154crypt(text, text)FUNCTIONvCREATE FUNCTION crypt(text, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_crypt'; (DROP FUNCTION public.crypt(text, text); publicadminfalse8d12551682155currconcat(integer)FUNCTIONCREATE FUNCTION currconcat(integer) RETURNS character varying LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE id ALIAS FOR $1; returnVal VARCHAR(15) := ''; BEGIN SELECT currConcat(curr_abbr, curr_symbol) INTO returnVal FROM curr_symbol WHERE curr_id = id; RETURN returnVal; END; $_$; *DROP FUNCTION public.currconcat(integer); publicadminfalse83992C125516821560currconcat(character varying, character varying)FUNCTIONCREATE FUNCTION currconcat(character varying, character varying) RETURNS character varying LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE curr_abbr ALIAS FOR $1; curr_symbol ALIAS FOR $2; returnVal VARCHAR(15) := ''; BEGIN IF length(trim(curr_abbr)) > 0 AND length(trim(curr_symbol)) > 0 THEN returnVal := trim(curr_abbr) || ' - ' || trim(curr_symbol); ELSIF length(trim(curr_abbr)) > 0 THEN returnVal := curr_abbr; ELSIF length(trim(curr_symbol)) > 0 THEN returnVal := curr_symbol; END IF; RETURN returnVal; END; $_$; GDROP FUNCTION public.currconcat(character varying, character varying); publicadminfalse83992D12551682157currentapmemonumber()FUNCTIONCREATE FUNCTION currentapmemonumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _number INTEGER; BEGIN SELECT orderseq_number INTO _number FROM orderseq WHERE (orderseq_name='APMemoNumber'); IF (NOT FOUND) THEN _number := 0; END IF; RETURN _number; END; $$; ,DROP FUNCTION public.currentapmemonumber(); publicadminfalse83992E12551682158currentarmemonumber()FUNCTIONCREATE FUNCTION currentarmemonumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _number INTEGER; BEGIN SELECT orderseq_number INTO _number FROM orderseq WHERE (orderseq_name='ARMemoNumber'); IF (NOT FOUND) THEN _number := 0; END IF; RETURN _number; END; $$; ,DROP FUNCTION public.currentarmemonumber(); publicadminfalse39928F12551682159currentcashrcptnumber()FUNCTIONCREATE FUNCTION currentcashrcptnumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _number INTEGER; BEGIN SELECT orderseq_number INTO _number FROM orderseq WHERE (orderseq_name='CashRcptNumber'); IF (NOT FOUND) THEN _number := 0; END IF; RETURN _number; END; $$; .DROP FUNCTION public.currentcashrcptnumber(); publicadminfalse83992U12551682160currentnumber(text)FUNCTIONCREATE FUNCTION currentnumber(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pName ALIAS FOR $1; _number INTEGER; BEGIN SELECT orderseq_number INTO _number FROM orderseq WHERE (orderseq_name=pName); IF (NOT FOUND) THEN _number := 0; END IF; RETURN _number; END; $_$; *DROP FUNCTION public.currentnumber(text); publicadminfalse83992[12551682161currexchangecheckoverlap()FUNCTIONCREATE FUNCTION currexchangecheckoverlap() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE numberOfOverlaps INTEGER NOT NULL := 0; curr_string VARCHAR(16); new_id INTEGER; BEGIN new_id := NEW.curr_id; -- ensure that effective date <= expiration date IF NEW.curr_effective > NEW.curr_expires THEN RAISE EXCEPTION 'Effective date % must be earlier than expiration date %', NEW.curr_effective, NEW.curr_expires; END IF; -- ensure new exchange rate does not overlap in time with any others SELECT count(*) INTO numberOfOverlaps FROM curr_rate WHERE curr_id = NEW.curr_id AND curr_rate_id != NEW.curr_rate_id AND ( (curr_effective BETWEEN NEW.curr_effective AND NEW.curr_expires OR curr_expires BETWEEN NEW.curr_effective AND NEW.curr_expires) OR (curr_effective <= NEW.curr_effective AND curr_expires >= NEW.curr_expires) ); IF numberOfOverlaps > 0 THEN SELECT currConcat(curr_symbol, curr_abbr) INTO curr_string FROM curr_symbol WHERE curr_id = new_id; RAISE EXCEPTION 'The date range % to % overlaps with another date range.', NEW.curr_effective, NEW.curr_expires; END IF; RETURN NEW; END; $$; 1DROP FUNCTION public.currexchangecheckoverlap(); publicadminfalse83992G12551682162&currgain(integer, numeric, date, date)FUNCTIONqCREATE FUNCTION currgain(integer, numeric, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pValue ALIAS FOR $2; pStart ALIAS FOR $3; pEnd ALIAS FOR $4; _start DATE; _end DATE; _gain NUMERIC; _multiplier INTEGER := 1; BEGIN IF (pEnd = pStart OR pValue = 0) THEN RETURN 0; END IF; IF (pStart > pEnd) THEN _start := pEnd; _end := pStart; _multiplier := -1; ELSE _start := pStart; _end := pEnd; END IF; _gain := currToBase(pId, pValue, _start) - currToBase(pId, pValue, _end); IF (_gain IS NULL) THEN RAISE EXCEPTION 'Missing exchange rate for curr_id % on % or %', pId, _start, _end; END IF; RETURN _gain * _multiplier; END; $_$; =DROP FUNCTION public.currgain(integer, numeric, date, date); publicadminfalse83992\12551682163 curronebase()FUNCTION#CREATE FUNCTION curronebase() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE baseCount INTEGER := 0; BEGIN IF NEW.curr_base = TRUE THEN SELECT count(*) INTO baseCount FROM curr_symbol WHERE curr_base = TRUE AND curr_id != NEW.curr_id; IF baseCount > 0 THEN RAISE EXCEPTION 'Cannot make % - % the base currency because one is already defined.', NEW.curr_symbol, NEW.curr_abbr; ELSE SELECT count(*) INTO baseCount FROM curr_rate WHERE curr_id = NEW.curr_id; IF baseCount = 0 THEN -- put a row in the curr_rate table to avoid special-case -- code for converting base currency to base currency INSERT INTO curr_rate (curr_id, curr_rate, curr_effective, curr_expires) VALUES (NEW.curr_id, 1, startOfTime(), endOfTime()); END IF; END IF; END IF; RETURN NEW; END; $$; $DROP FUNCTION public.curronebase(); publicadminfalse8399212551682164currrate(integer, date)FUNCTIONCREATE FUNCTION currrate(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN currRate($1, NULL, $2); END; $_$; .DROP FUNCTION public.currrate(integer, date); publicadminfalse83992I12551758224 currrate(integer, integer, date)FUNCTION~CREATE FUNCTION currrate(pfromcurr integer, ptocurr integer, pdate date) RETURNS numeric LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _fromRate NUMERIC := 1.0; _toRate NUMERIC := 1.0; _returnVal NUMERIC := 1.0; BEGIN IF pFromCurr = pToCurr THEN RETURN _returnVal; END IF; IF (pFromCurr IS NOT NULL) THEN SELECT curr_rate INTO _fromRate FROM curr_rate WHERE ( (curr_id=pFromCurr) AND (pDate BETWEEN curr_effective AND curr_expires) ); IF ( NOT FOUND) THEN RAISE EXCEPTION 'Currency exchange rate for currency % not found on %', pFromCurr, formatDate(pDate); END IF; END IF; IF (pToCurr IS NOT NULL) THEN SELECT curr_rate INTO _toRate FROM curr_rate WHERE ( (curr_id=pToCurr) AND (pDate BETWEEN curr_effective AND curr_expires) ); IF ( NOT FOUND) THEN RAISE EXCEPTION 'Currency exchange rate for currency % not found on %', pToCurr, formatDate(pDate); END IF; END IF; _returnVal := _fromRate / _toRate; RETURN _returnVal; END; $$; ODROP FUNCTION public.currrate(pfromcurr integer, ptocurr integer, pdate date); publicadminfalse83992J12551682165"currtobase(integer, numeric, date)FUNCTIONDCREATE FUNCTION currtobase(integer, numeric, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pValue ALIAS FOR $2; _date DATE; _output NUMERIC; BEGIN _date := $3; IF _date IS NULL THEN _date := 'now'; END IF; IF pValue = 0 OR pValue IS NULL THEN _output := 0; ELSIF (baseCurrId() = pId) THEN _output := pValue; ELSE SELECT pValue / curr_rate INTO _output FROM curr_rate WHERE curr_id = pId AND _date BETWEEN curr_effective AND curr_expires; IF (_output IS NULL OR NOT FOUND) THEN RAISE EXCEPTION 'No exchange rate for % on %', pId, _date; END IF; END IF; RETURN _output; END; $_$; 9DROP FUNCTION public.currtobase(integer, numeric, date); publicadminfalse83992K12551682166+currtocurr(integer, integer, numeric, date)FUNCTION_CREATE FUNCTION currtocurr(integer, integer, numeric, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFromCurr ALIAS FOR $1; pToCurr ALIAS FOR $2; pValue ALIAS FOR $3; pEffective ALIAS FOR $4; _convertedValue NUMERIC; _fromRate NUMERIC; _toRate NUMERIC; BEGIN IF pFromCurr = pToCurr THEN RETURN pValue; END IF; IF pValue = 0 OR pValue IS NULL THEN RETURN 0; END IF; SELECT curr_rate INTO _fromRate FROM curr_rate WHERE curr_id = pFromCurr AND pEffective BETWEEN curr_effective AND curr_expires; IF (NOT FOUND) THEN RAISE EXCEPTION 'No exchange rate for % on %', pFromCurr, pEffective; END IF; SELECT curr_rate INTO _toRate FROM curr_rate WHERE curr_id = pToCurr AND pEffective BETWEEN curr_effective AND curr_expires; IF (NOT FOUND) THEN RAISE EXCEPTION 'No exchange rate for % on %', pToCurr, pEffective; END IF; _convertedValue := pValue * _toRate / _fromRate; RETURN _convertedValue; END; $_$; BDROP FUNCTION public.currtocurr(integer, integer, numeric, date); publicadminfalse39928L12551682167#currtolocal(integer, numeric, date)FUNCTIONCREATE FUNCTION currtolocal(integer, numeric, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pId ALIAS FOR $1; pValue ALIAS FOR $2; _date DATE; _output NUMERIC; BEGIN _date := $3; IF _date IS NULL THEN _date := 'now'; END IF; IF pValue = 0 OR pValue IS NULL THEN _output := 0; ELSIF (baseCurrId() = pId) THEN _output := pValue; ELSE SELECT pValue * curr_rate INTO _output FROM curr_rate WHERE curr_id = pId AND _date BETWEEN curr_effective AND curr_expires; IF (_output IS NULL OR NOT FOUND) THEN RAISE EXCEPTION 'No exchange rate for % on %', pId, _date; END IF; END IF; RETURN _output; END; $_$; :DROP FUNCTION public.currtolocal(integer, numeric, date); publicadminfalse39928N12551682168 custitem(integer, integer, date)FUNCTION8CREATE FUNCTION custitem(cust_id integer, shipto_id integer DEFAULT (-1), asof date DEFAULT ('now'::text)::date) RETURNS SETOF integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. -- Non Exclusive SELECT item_id FROM item WHERE (NOT item_exclusive) AND (item_sold) UNION -- Exclusive, Shipto match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE (item_exclusive) AND (item_sold) AND ($2 != -1) AND (ipsass_shipto_id=$2) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE (item_exclusive) AND (item_sold) AND ($2 != -1) AND (ipsass_shipto_id=$2) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION -- Exclusive, Shipto pattern match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN shiptoinfo ON (shipto_num ~ ipsass_shipto_pattern) WHERE (item_exclusive) AND (item_sold) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (ipsass_cust_id=$1) AND ($2 != -1) AND (shipto_id=$2) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN shiptoinfo ON (shipto_num ~ ipsass_shipto_pattern) WHERE (item_exclusive) AND (item_sold) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (ipsass_cust_id=$1) AND ($2 != -1) AND (shipto_id=$2) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION -- Exclusive, Customer match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE (item_exclusive) AND (item_sold) AND (ipsass_cust_id=$1) AND (ipsass_shipto_id=-1) AND (ipsass_shipto_pattern='') AND (ipsass_custtype_id=-1) AND (ipsass_custtype_pattern='') AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) WHERE (item_exclusive) AND (item_sold) AND (ipsass_cust_id=$1) AND (ipsass_shipto_id=-1) AND (ipsass_shipto_pattern='') AND (ipsass_custtype_id=-1) AND (ipsass_custtype_pattern='') AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION -- Exclusive, Customer Type match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN custinfo ON (ipsass_custtype_id=cust_custtype_id) WHERE (item_exclusive) AND (item_sold) AND (cust_id=$1) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN custinfo ON (ipsass_custtype_id=cust_custtype_id) WHERE (item_exclusive) AND (item_sold) AND (cust_id=$1) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION -- Exclusive, Customer Type pattern match SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_item_id=item_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN custtype ON (custtype_code ~ ipsass_custtype_pattern) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE (item_exclusive) AND (item_sold) AND (COALESCE(length(ipsass_custtype_pattern), 0) > 0) AND (cust_id=$1) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) UNION SELECT item_id FROM item JOIN ipsiteminfo ON (ipsitem_prodcat_id=item_prodcat_id) JOIN ipshead ON (ipshead_id=ipsitem_ipshead_id) JOIN ipsass ON (ipsass_ipshead_id=ipshead_id) JOIN custtype ON (custtype_code ~ ipsass_custtype_pattern) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE (item_exclusive) AND (item_sold) AND (COALESCE(length(ipsass_custtype_pattern), 0) > 0) AND (cust_id=$1) AND ($3 BETWEEN ipshead_effective AND (ipshead_expires - 1)) $_$; NDROP FUNCTION public.custitem(cust_id integer, shipto_id integer, asof date); publicadminfalse8Q12551682169%customercanpurchase(integer, integer)FUNCTIONcCREATE FUNCTION customercanpurchase(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemid ALIAS FOR $1; pCustid ALIAS FOR $2; BEGIN RETURN customerCanPurchase(pitemid, pCustid, -1); END; $_$; <DROP FUNCTION public.customercanpurchase(integer, integer); publicadminfalse39928R12551682170.customercanpurchase(integer, integer, integer)FUNCTIONCREATE FUNCTION customercanpurchase(integer, integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemid ALIAS FOR $1; pCustid ALIAS FOR $2; pShiptoid AlIAS FOR $3; _id INTEGER; _item RECORD; BEGIN RETURN customerCanPurchase(pitemid, pCustid, pShiptoid, CURRENT_DATE); END; $_$; EDROP FUNCTION public.customercanpurchase(integer, integer, integer); publicadminfalse83992S125516821714customercanpurchase(integer, integer, integer, date)FUNCTIONCREATE FUNCTION customercanpurchase(integer, integer, integer, date) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemid ALIAS FOR $1; pCustid ALIAS FOR $2; pShiptoid AlIAS FOR $3; pAsOf ALIAS FOR $4; _id INTEGER; _item RECORD; BEGIN SELECT item_sold, item_exclusive INTO _item FROM item WHERE(item_id=pItemid); -- Make sure that this is at least a sold Item IF (NOT _item.item_sold) THEN RETURN FALSE; END IF; -- Everyone can purchase a non-exclusive item IF (NOT _item.item_exclusive) THEN RETURN TRUE; END IF; IF(pShiptoid != -1) THEN -- Check for a shipto Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsitem_item_id=pItemid) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=pShiptoid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (item_id=pItemid) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=pShiptoid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; -- Check for a Shipto Pattern Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass, shiptoinfo WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (shipto_num ~ ipsass_shipto_pattern) AND (ipsass_cust_id=pCustid) AND (ipsitem_item_id=pItemid) AND (shipto_id=pShiptoid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass, shiptoinfo WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (shipto_num ~ ipsass_shipto_pattern) AND (ipsass_cust_id=pCustid) AND (item_id=pItemid) AND (shipto_id=pShiptoid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; END IF; -- Check for a Customer Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsitem_item_id=pItemid) AND (COALESCE(length(ipsass_shipto_pattern), 0) = 0) AND (ipsass_cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (item_id=pItemid) AND (COALESCE(length(ipsass_shipto_pattern), 0) = 0) AND (ipsass_cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; -- Check for a Customer Type Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass, custinfo WHERE( (ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (ipsass_custtype_id != -1) AND (cust_custtype_id = ipsass_custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsitem_item_id=pItemid) AND (cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass, custinfo WHERE( (ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (ipsass_custtype_id != -1) AND (cust_custtype_id = ipsass_custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (item_id=pItemid) AND (cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; -- Check for a Customer Type Pattern Assigned Price SELECT ipsitem_id INTO _id FROM ipsiteminfo, ipshead, ipsass, custtype, custinfo WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (coalesce(length(ipsass_custtype_pattern), 0) > 0) AND (custtype_code ~ ipsass_custtype_pattern) AND (cust_custtype_id=custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsitem_item_id=pItemid) AND (cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT ipsitem_id INTO _id FROM ipsiteminfo, item, ipshead, ipsass, custtype, custinfo WHERE((ipsitem_ipshead_id=ipshead_id) AND (ipsitem_prodcat_id = item_prodcat_id) AND (ipsass_ipshead_id=ipshead_id) AND (coalesce(length(ipsass_custtype_pattern), 0) > 0) AND (custtype_code ~ ipsass_custtype_pattern) AND (cust_custtype_id=custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (item_id=pItemid) AND (cust_id=pCustid)) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; -- That's it, Sales don't count - yet RETURN FALSE; END; $_$; KDROP FUNCTION public.customercanpurchase(integer, integer, integer, date); publicadminfalse83992i12551682172 dearmor(text)FUNCTIONuCREATE FUNCTION dearmor(text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_dearmor'; $DROP FUNCTION public.dearmor(text); publicadminfalse8j12551682173decrypt(bytea, bytea, text)FUNCTIONCREATE FUNCTION decrypt(bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_decrypt'; 2DROP FUNCTION public.decrypt(bytea, bytea, text); publicadminfalse8k12551682174%decrypt_iv(bytea, bytea, bytea, text)FUNCTIONCREATE FUNCTION decrypt_iv(bytea, bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_decrypt_iv'; <DROP FUNCTION public.decrypt_iv(bytea, bytea, bytea, text); publicadminfalse8V12551682175defaultlocationname(integer)FUNCTIONKCREATE FUNCTION defaultlocationname(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _p RECORD; BEGIN SELECT itemsite_location_id, itemsite_location INTO _p FROM itemsite WHERE (itemsite_id=pItemsiteid); IF (NOT FOUND) THEN RETURN 'Error'; ELSIF (_p.itemsite_location_id = -1) THEN RETURN _p.itemsite_location; ELSE RETURN formatLocationName(_p.itemsite_location_id); END IF; END; $_$; 3DROP FUNCTION public.defaultlocationname(integer); publicadminfalse83992\12551682176deleteaccount(integer)FUNCTIONQCREATE FUNCTION deleteaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if the passed accnt is used in a Cost Category SELECT costcat_id INTO _check FROM costcat WHERE ( (costcat_asset_accnt_id=pAccntid) OR (costcat_liability_accnt_id=pAccntid) OR (costcat_adjustment_accnt_id=pAccntid) OR (costcat_purchprice_accnt_id=pAccntid) OR (costcat_laboroverhead_accnt_id=pAccntid) OR (costcat_scrap_accnt_id=pAccntid) OR (costcat_invcost_accnt_id=pAccntid) OR (costcat_wip_accnt_id=pAccntid) OR (costcat_shipasset_accnt_id=pAccntid) OR (costcat_mfgscrap_accnt_id=pAccntid) OR (costcat_transform_accnt_id=pAccntid) OR (costcat_freight_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Check to see if the passed accnt is used in a Sales Account Assignment SELECT salesaccnt_id INTO _check FROM salesaccnt WHERE ( (salesaccnt_sales_accnt_id=pAccntid) OR (salesaccnt_credit_accnt_id=pAccntid) OR (salesaccnt_cos_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to see if the passed accnt is used in a A/R Account Assignment SELECT araccnt_id INTO _check FROM araccnt WHERE ( (araccnt_freight_accnt_id=pAccntid) OR (araccnt_ar_accnt_id=pAccntid) OR (araccnt_prepaid_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to see if the passed accnt is used in a Warehouse IF EXISTS (SELECT 1 FROM whsinfo WHERE (warehous_default_accnt_id=pAccntid)) THEN RETURN -4; END IF; -- Check to see if the passed accnt is used in a Bank Account SELECT bankaccnt_id INTO _check FROM bankaccnt WHERE (bankaccnt_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; -- Check to see if the passed accnt is used in an Expense Category SELECT expcat_id INTO _check FROM expcat WHERE ( (expcat_exp_accnt_id=pAccntid) OR (expcat_liability_accnt_id=pAccntid) OR (expcat_purchprice_accnt_id=pAccntid) OR (expcat_freight_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; -- Check to see if the passed accnt is used in a Tax Code SELECT tax_id INTO _check FROM tax WHERE (tax_sales_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -7; END IF; -- Check to see if the passed accnt is used in a Standard Journal Item SELECT stdjrnlitem_id INTO _check FROM stdjrnlitem WHERE (stdjrnlitem_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -8; END IF; -- Check to see if the passed accnt is used in a A/P Account Assignment SELECT apaccnt_ap_accnt_id INTO _check FROM apaccnt WHERE ( (apaccnt_ap_accnt_id=pAccntid) OR (apaccnt_prepaid_accnt_id=pAccntid) OR (apaccnt_discount_accnt_id=pAccntid) ) LIMIT 1; IF (FOUND) THEN RETURN -9; END IF; -- Check to see if the passed accnt is used in an A/R Open Item record SELECT aropen_accnt_id INTO _check FROM aropen WHERE (aropen_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -11; END IF; -- Check to see if the passed accnt has been used in the G/L SELECT gltrans_accnt_id INTO _check FROM gltrans WHERE (gltrans_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -99; END IF; SELECT glseries_accnt_id INTO _check FROM glseries WHERE (glseries_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -99; END IF; SELECT trialbal_accnt_id INTO _check FROM trialbal WHERE (trialbal_accnt_id=pAccntid) AND (trialbal_beginning != 0 OR trialbal_ending != 0) LIMIT 1; IF (FOUND) THEN RETURN -99; END IF; SELECT cashrcptmisc_accnt_id INTO _check FROM cashrcptmisc WHERE (cashrcptmisc_accnt_id=pAccntid) LIMIT 1; IF (FOUND) THEN RETURN -99; END IF; -- Delete any non-critical use DELETE FROM flitem WHERE (flitem_accnt_id=pAccntid); -- only possible because of trialbal error-check above DELETE FROM trialbal WHERE (trialbal_accnt_id=pAccntid) AND (trialbal_beginning=0) AND (trialbal_ending=0); -- Delete the Account DELETE FROM accnt WHERE (accnt_id=pAccntid); RETURN 0; END; $_$; -DROP FUNCTION public.deleteaccount(integer); publicadminfalse83992^12551682177deleteaccountingperiod(integer)FUNCTION5CREATE FUNCTION deleteaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _check RECORD; BEGIN -- Check to make sure that the passed period is not closed IF ( ( SELECT period_closed FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Check to make sure that there are not any posted G/L Transactions -- in the period. SELECT gltrans_id INTO _check FROM gltrans, period WHERE ( (gltrans_date BETWEEN period_start AND period_end) AND (gltrans_posted) AND (period_id=pPeriodid) ) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT b.period_id INTO _check FROM period AS a, period AS b WHERE((a.period_id=pPeriodid) AND (a.period_end < b.period_start)) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; -- Delete the period DELETE FROM period WHERE (period_id=pPeriodid); RETURN 1; END; $_$; 6DROP FUNCTION public.deleteaccountingperiod(integer); publicadminfalse83992_12551682178#deleteaccountingyearperiod(integer)FUNCTIONCREATE FUNCTION deleteaccountingyearperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _check RECORD; BEGIN -- Check to make sure that the passed yearperiod is not closed IF ( ( SELECT yearperiod_closed FROM yearperiod WHERE (yearperiod_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- this yearperiod is in use by existing periods IF (EXISTS(SELECT period_id FROM period WHERE (period_yearperiod_id=pPeriodid))) THEN RETURN -2; END IF; -- Delete the yearperiod DELETE FROM yearperiod WHERE (yearperiod_id=pPeriodid); RETURN 1; END; $_$; :DROP FUNCTION public.deleteaccountingyearperiod(integer); publicadminfalse83992c12551682179deleteaddress(integer)FUNCTIONCREATE FUNCTION deleteaddress(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE paddrId ALIAS FOR $1; _count INTEGER := 0; BEGIN SELECT count(*) INTO _count FROM cntct WHERE (cntct_active AND (cntct_addr_id = paddrId)); IF (_count > 0) THEN RETURN -1; END IF; SELECT count(*) INTO _count FROM vendinfo WHERE (vend_active AND (vend_addr_id = paddrId)); IF (_count > 0) THEN RETURN -2; END IF; SELECT count(*) INTO _count FROM shiptoinfo WHERE (shipto_active AND (shipto_addr_id = paddrId)); IF (_count > 0) THEN RETURN -3; END IF; SELECT count(*) INTO _count FROM vendaddrinfo WHERE (vendaddr_addr_id = paddrId); IF (_count > 0) THEN RETURN -4; END IF; SELECT count(*) INTO _count FROM whsinfo WHERE (warehous_active AND (warehous_addr_id = paddrId)); IF (_count > 0) THEN RETURN -5; END IF; UPDATE cntct SET cntct_addr_id = NULL WHERE (cntct_addr_id = paddrId); UPDATE vendinfo SET vend_addr_id = NULL WHERE (vend_addr_id = paddrId); UPDATE shiptoinfo SET shipto_addr_id = NULL WHERE (shipto_addr_id =paddrId); UPDATE vendaddrinfo SET vendaddr_addr_id = NULL WHERE (vendaddr_addr_id = paddrId); UPDATE whsinfo SET warehous_addr_id = NULL WHERE (warehous_addr_id=paddrId); DELETE FROM addr WHERE addr_id = paddrId; RETURN 0; END; $_$; -DROP FUNCTION public.deleteaddress(integer); publicadminfalse83992o12551682180deleteapcheck(integer)FUNCTIONMCREATE FUNCTION deleteapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'deleteAPCheck() is deprecated - use deleteCheck() instead'; RETURN deleteCheck($1); END; $_$; -DROP FUNCTION public.deleteapcheck(integer); publicadminfalse83992f12551682181!deletebankadjustmenttype(integer)FUNCTIONCREATE FUNCTION deletebankadjustmenttype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankadjtypeid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if the the adjustment type is being used in any adjustments SELECT bankadj_bankadjtype_id INTO _check FROM bankadj WHERE (bankadj_bankadjtype_id=pBankadjtypeid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the Account DELETE FROM bankadjtype WHERE (bankadjtype_id=pbankadjtypeid); RETURN 0; END; $_$; 8DROP FUNCTION public.deletebankadjustmenttype(integer); publicadminfalse8399212551682182!deletebankreconciliation(integer)FUNCTIONCREATE FUNCTION deletebankreconciliation(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pbankrecid ALIAS FOR $1; BEGIN DELETE FROM bankrecitem WHERE bankrecitem_bankrec_id=pbankrecid; DELETE FROM bankrec WHERE bankrec_id=pbankrecid; RETURN 0; END; $_$; 8DROP FUNCTION public.deletebankreconciliation(integer); publicadminfalse39928g12551682183deletebom(integer)FUNCTIONCREATE FUNCTION deletebom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _result INTEGER; BEGIN IF (fetchmetricbool('RevControl')) THEN SELECT rev_id INTO _result FROM rev WHERE ((rev_target_id=pItemid) AND (rev_target_type = 'BOM')) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Bill of Materials has revision control records and may not be deleted.'; END IF; END IF; DELETE FROM bomhead WHERE (bomhead_item_id=pItemid); DELETE FROM bomitem WHERE (bomitem_parent_item_id=pItemid); RETURN 0; END; $_$; )DROP FUNCTION public.deletebom(integer); publicadminfalse83992i12551682184deletebomworkset(integer)FUNCTIONCREATE FUNCTION deletebomworkset(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWorksetid ALIAS FOR $1; BEGIN -- All done with the bomwork set indicated by pWorksetid, delete all of it DELETE FROM bomwork WHERE (bomwork_set_id=pWorksetid); RETURN 1; END; $_$; 0DROP FUNCTION public.deletebomworkset(integer); publicadminfalse83992j12551682185deletebudget(integer)FUNCTIONCREATE FUNCTION deletebudget(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudgheadid ALIAS FOR $1; BEGIN DELETE FROM budgitem WHERE (budgitem_budghead_id=pBudgheadid); DELETE FROM budghead WHERE (budghead_id=pBudgheadid); RETURN pBudgheadid; END; $_$; ,DROP FUNCTION public.deletebudget(integer); publicadminfalse8399212551682186deletebudgetitems(integer)FUNCTIONhCREATE FUNCTION deletebudgetitems(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudgheadid ALIAS FOR $1; BEGIN DELETE FROM budgitem WHERE (budgitem_budghead_id=pBudgheadid); RETURN pBudgheadid; END; $_$; 1DROP FUNCTION public.deletebudgetitems(integer); publicadminfalse83992m12551682187deletecashrcpt(integer)FUNCTIONiCREATE FUNCTION deletecashrcpt(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcashrcptid ALIAS FOR $1; _ccreceipt BOOLEAN; BEGIN IF EXISTS(SELECT cashrcpt_id FROM cashrcpt JOIN ccpay ON (cashrcpt_cust_id=ccpay_cust_id) AND ((CASE WHEN TRIM(COALESCE(cashrcpt_docnumber, ''))='' THEN TEXT(cashrcpt_id) ELSE cashrcpt_docnumber END)=ccpay_order_number) WHERE ((cashrcpt_fundstype IN ('A', 'D', 'M', 'V')) AND (ccpay_status NOT IN ('D', 'X')) AND (ccpay_id NOT IN (SELECT payco_ccpay_id FROM payco)) AND (cashrcpt_id=pcashrcptid))) THEN RETURN -1; END IF; IF EXISTS(SELECT cashrcpt_id FROM cashrcpt WHERE ( (cashrcpt_id=pcashrcptid) AND (cashrcpt_posted) )) THEN RETURN -2; END IF; -- If there are applications for this Cash Receipt then -- it has been posted and reversed. Void instead of delete. IF EXISTS(SELECT cashrcpt_id FROM cashrcpt JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id) JOIN arapply ON ((arapply_reftype='CRA') AND (arapply_ref_id=cashrcptitem_id)) WHERE (cashrcpt_id=pcashrcptid)) OR EXISTS(SELECT cashrcpt_id FROM cashrcpt JOIN cashrcptmisc ON (cashrcptmisc_cashrcpt_id=cashrcpt_id) JOIN arapply ON ((arapply_reftype='CRD') AND (arapply_ref_id=cashrcptmisc_id)) WHERE (cashrcpt_id=pcashrcptid)) THEN UPDATE cashrcpt SET cashrcpt_void = TRUE WHERE (cashrcpt_id=pcashrcptid); RETURN 1; END IF; DELETE FROM cashrcptitem WHERE (cashrcptitem_cashrcpt_id=pcashrcptid); DELETE FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pcashrcptid); DELETE FROM cashrcpt WHERE (cashrcpt_id=pcashrcptid); RETURN 1; END; $_$; .DROP FUNCTION public.deletecashrcpt(integer); publicadminfalse39928n12551682188deletecharacteristic(integer)FUNCTIONCREATE FUNCTION deletecharacteristic(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCharid ALIAS FOR $1; _check INTEGER; _r RECORD; BEGIN -- Cache the specifics of the characteristic SELECT * INTO _r FROM char WHERE (char_id=pCharid); IF (NOT(FOUND)) THEN RETURN 0; END IF; -- If the passed characteristic is used SELECT * INTO _r FROM charass WHERE (charass_char_id=pCharid) LIMIT 1; IF (FOUND) THEN IF (_r.charass_target_type = 'I') THEN RETURN -1; ELSIF (_r.charass_target_type = 'C') THEN RETURN -2; ELSIF (_r.charass_target_type = 'ADDR') THEN RETURN -3; ELSIF (_r.charass_target_type = 'CNTCT') THEN RETURN -4; ELSIF (_r.charass_target_type = 'CRMACCT') THEN RETURN -5; ELSIF (_r.charass_target_type = 'INCDT ') THEN RETURN -6; ELSIF (_r.charass_target_type = 'EMP') THEN RETURN -7; ELSE RETURN -99; END IF; END IF; -- Delete the passed characterisitic DELETE FROM char WHERE (char_id=pCharid); RETURN pCharid; END; $_$; 4DROP FUNCTION public.deletecharacteristic(integer); publicadminfalse83992o12551682189deletecheck(integer)FUNCTIONxCREATE FUNCTION deletecheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; BEGIN IF (SELECT (NOT checkhead_void) OR checkhead_posted OR checkhead_replaced OR checkhead_deleted OR (checkhead_ach_batch IS NOT NULL AND checkhead_printed) FROM checkhead WHERE (checkhead_id=pCheckid) ) THEN RETURN -1; END IF; UPDATE checkhead SET checkhead_deleted=TRUE WHERE (checkhead_id=pCheckid); RETURN 1; END; $_$; +DROP FUNCTION public.deletecheck(integer); publicadminfalse8399212551682190deleteclasscode(integer)FUNCTIONdCREATE FUNCTION deleteclasscode(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClasscodeid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if any items are assigned to the passed classcode SELECT item_id INTO _check FROM item WHERE (item_classcode_id=pClasscodeid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the passed classcode DELETE FROM classcode WHERE (classcode_id=pClasscodeid); RETURN pClasscodeid; END; $_$; /DROP FUNCTION public.deleteclasscode(integer); publicadminfalse8399212551682191deletecompany(integer)FUNCTION%CREATE FUNCTION deletecompany(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcompanyid ALIAS FOR $1; BEGIN IF (EXISTS(SELECT accnt_id FROM accnt, company WHERE ((accnt_company=company_number) AND (company_id=pcompanyid)) )) THEN RETURN -1; END IF; DELETE FROM company WHERE (company_id=pcompanyid); RETURN pcompanyid; END; $_$; -DROP FUNCTION public.deletecompany(integer); publicadminfalse8399212551682192deletecreditmemo(integer)FUNCTIONCREATE FUNCTION deletecreditmemo(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; BEGIN DELETE FROM cmitem WHERE (cmitem_cmhead_id=pCmheadid); DELETE FROM cmhead WHERE (cmhead_id=pCmheadid); RETURN TRUE; END; $_$; 0DROP FUNCTION public.deletecreditmemo(integer); publicadminfalse3992812551682193deletecustomer(integer)FUNCTIONPCREATE FUNCTION deletecustomer(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; BEGIN PERFORM shipto_id FROM shiptoinfo WHERE (shipto_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; PERFORM cohead_id FROM cohead WHERE (cohead_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; PERFORM cmhead_id FROM cmhead WHERE (cmhead_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; PERFORM cohist_id FROM cohist WHERE (cohist_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; PERFORM aropen_id FROM aropen WHERE (aropen_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; PERFORM checkhead_recip_id FROM checkhead WHERE ((checkhead_recip_id=pCustid) AND (checkhead_recip_type='C')) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; PERFORM invchead_id FROM invchead WHERE(invchead_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -7; END IF; PERFORM quhead_id FROM quhead WHERE(quhead_cust_id=pCustid) LIMIT 1; IF (FOUND) THEN RETURN -8; END IF; DELETE FROM taxreg WHERE ((taxreg_rel_type='C') AND (taxreg_rel_id=pCustid)); DELETE FROM ipsass WHERE (ipsass_cust_id=pCustid); DELETE FROM custinfo WHERE (cust_id=pCustid); UPDATE crmacct SET crmacct_cust_id = NULL WHERE (crmacct_cust_id=pCustid); RETURN 0; END; $_$; .DROP FUNCTION public.deletecustomer(integer); publicadminfalse83992s12551682194deletecustomertype(integer)FUNCTIONCREATE FUNCTION deletecustomertype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCusttypeid ALIAS FOR $1; BEGIN IF EXISTS(SELECT 1 FROM custinfo WHERE (cust_custtype_id=pCusttypeid)) THEN RETURN -1; END IF; DELETE FROM ipsass WHERE (ipsass_custtype_id=pCusttypeid); DELETE FROM salesaccnt WHERE (salesaccnt_custtype_id=pCusttypeid); DELETE FROM araccnt WHERE (araccnt_custtype_id=pCusttypeid); DELETE FROM custform WHERE (custform_custtype_id=pCusttypeid); DELETE FROM custtype WHERE (custtype_id=pCusttypeid); RETURN pCusttypeid; END; $_$; 2DROP FUNCTION public.deletecustomertype(integer); publicadminfalse83992t12551682195deleteempgrp(integer)FUNCTIONCREATE FUNCTION deleteempgrp(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pempgrpid ALIAS FOR $1; BEGIN -- Check to see if any employees are assigned to the passed empgrp PERFORM empgrpitem_emp_id FROM empgrpitem WHERE (empgrpitem_empgrp_id=pempgrpid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; DELETE FROM empgrp WHERE (empgrp_id=pempgrpid); RETURN 0; END; $_$; ,DROP FUNCTION public.deleteempgrp(integer); publicadminfalse83992w12551682196deleteexpiredips()FUNCTIONCREATE FUNCTION deleteexpiredips() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN FOR _r IN SELECT ipshead_id FROM ipshead WHERE (ipshead_expires <= current_date) LOOP DELETE FROM ipsass WHERE (ipsass_ipshead_id=_r.ipshead_id); DELETE FROM ipsiteminfo WHERE (ipsitem_ipshead_id=_r.ipshead_id); DELETE FROM ipsfreight WHERE (ipsfreight_ipshead_id=_r.ipshead_id); DELETE FROM ipshead WHERE (ipshead_id=_r.ipshead_id); END LOOP; RETURN TRUE; END; $$; )DROP FUNCTION public.deleteexpiredips(); publicadminfalse3992812551682197deletefile(integer)FUNCTIONCREATE FUNCTION deletefile(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ declare pId ALIAS FOR $1; begin delete from file where ( file_id in ( select file_id from file join docass on (docass_target_id=file_id) and (docass_target_type='FILE') where ( docass_id = pId ) ) ); delete from docass where docass_id = pId; return true; end; $_$; *DROP FUNCTION public.deletefile(integer); publicadminfalse8399212551682198deleteflgrp(integer)FUNCTION_CREATE FUNCTION deleteflgrp(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlgrpid ALIAS FOR $1; _r RECORD; BEGIN FOR _r IN SELECT flgrp_id FROM flgrp WHERE (flgrp_flgrp_id=pFlgrpid) LOOP PERFORM deleteFlgrp(_r.flgrp_id); END LOOP; DELETE FROM flitem WHERE (flitem_flgrp_id=pFlgrpid); DELETE FROM flspec WHERE (flspec_flgrp_id=pFlgrpid); DELETE FROM flgrp WHERE (flgrp_id=pFlgrpid); RETURN 1; END; $_$; +DROP FUNCTION public.deleteflgrp(integer); publicadminfalse39928x12551682199deleteform(integer)FUNCTIONCREATE FUNCTION deleteform(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFormid ALIAS FOR $1; _key TEXT; _check INTEGER; BEGIN -- Cache the key of the passed form SELECT form_key INTO _key FROM form WHERE (form_id=pFormid); IF (NOT(FOUND)) THEN RETURN 0; END IF; -- Handle checks based on the type of the form IF (_key='Chck') THEN SELECT bankaccnt_id INTO _check FROM bankaccnt WHERE (bankaccnt_check_form_id=pFormid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; END IF; -- Delete the form DELETE FROM form WHERE (form_id=pFormid); RETURN pFormid; END; $_$; *DROP FUNCTION public.deleteform(integer); publicadminfalse83992z12551682200deletefreightclass(integer)FUNCTIONCREATE FUNCTION deletefreightclass(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFreightClassid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if any items are assigned to the passed freightclass SELECT item_id INTO _check FROM item WHERE (item_freightclass_id=pFreightClassid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the passed freightclass DELETE FROM freightclass WHERE (freightclass_id=pFreightClassid); RETURN pFreightClassid; END; $_$; 2DROP FUNCTION public.deletefreightclass(integer); publicadminfalse83992u12551682201deleteglseries(integer)FUNCTIONCREATE FUNCTION deleteglseries(integer) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pSequence ALIAS FOR $1; BEGIN DELETE FROM glseries WHERE (glseries_sequence=pSequence); RETURN pSequence; END; $_$; .DROP FUNCTION public.deleteglseries(integer); publicadminfalse83992{12551682202deleteglseries(integer, text)FUNCTIONCREATE FUNCTION deleteglseries(integer, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pNotes ALIAS FOR $2; _trialbalid INTEGER; _count INTEGER; _r RECORD; BEGIN -- March through all of the G/L Transactions for the passed sequence FOR _r IN SELECT gltrans_id, gltrans_date, gltrans_accnt_id, gltrans_amount, gltrans_posted, gltrans_rec, accnt_forwardupdate, period_id, period_closed, period_freeze FROM accnt, gltrans LEFT OUTER JOIN period ON (gltrans_date BETWEEN period_start AND period_end) WHERE ( (gltrans_accnt_id=accnt_id) AND (NOT gltrans_deleted) AND (gltrans_sequence=pSequence) ) LOOP -- If we can post into a Trial Balance, do so IF ( (NOT _r.period_closed) AND ( (NOT _r.period_freeze) OR (checkPrivilege('PostFrozenPeriod')) ) AND ( NOT _r.gltrans_rec) AND ( _r.gltrans_posted ) ) THEN -- Try to find an existing trialbal SELECT trialbal_id INTO _trialbalid FROM trialbal WHERE ( (trialbal_period_id=_r.period_id) AND (trialbal_accnt_id=_r.gltrans_accnt_id) ); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count > 0) THEN -- We found a trialbal, update it with the G/L Transaction -- Note - two stage update to avoid any funny value caching logic IF (_r.gltrans_amount > 0) THEN UPDATE trialbal SET trialbal_credits = (trialbal_credits - _r.gltrans_amount) WHERE (trialbal_id=_trialbalid); ELSE UPDATE trialbal SET trialbal_debits = (trialbal_debits - (_r.gltrans_amount * -1)) WHERE (trialbal_id=_trialbalid); END IF; UPDATE trialbal SET trialbal_ending = (trialbal_beginning - trialbal_debits + trialbal_credits), trialbal_dirty=TRUE WHERE (trialbal_id=_trialbalid); ELSE RAISE EXCEPTION 'Can not delete G/L Series. Trial balance record not found.'; END IF; -- Forward update if we should IF (_r.accnt_forwardupdate AND fetchmetricbool('ManualForwardUpdate')) THEN PERFORM forwardUpdateTrialBalance(_trialbalid); END IF; -- Delete any bank reconciliation records if this was marked cleared but non reconciled DELETE FROM bankrecitem WHERE ((bankrecitem_source='GL') AND (bankrecitem_source_id=_r.gltrans_id)); -- Unflag any journals as posted as a result of this series UPDATE sltrans SET sltrans_posted=false, sltrans_gltrans_journalnumber=null FROM gltrans WHERE ((gltrans_sequence=pSequence) AND (sltrans_gltrans_journalnumber=gltrans_journalnumber)); -- Mark the G/L Transaction as deleted UPDATE gltrans SET gltrans_posted=false, gltrans_deleted=true, gltrans_notes=gltrans_notes || E'\n' || pNotes WHERE (gltrans_id=_r.gltrans_id); ELSIF (_r.period_freeze) THEN RAISE EXCEPTION 'Can not delete a G/L Transaction in a frozen period'; ELSIF (_r.period_closed) THEN RAISE EXCEPTION 'Can not delete a G/L Transaction on account % in a closed period', formatGlAccount(_r.gltrans_accnt_id); ELSIF (_r.gltrans_rec) THEN RAISE EXCEPTION 'Can not delete a G/L Transaction that has been reconciled'; ELSIF (NOT _r.gltrans_posted) THEN RAISE EXCEPTION 'Can not delete a G/L Transaction that has not been posted to Trial Balance'; END IF; END LOOP; RETURN true; END; $_$; 4DROP FUNCTION public.deleteglseries(integer, text); publicadminfalse83992}12551682203deleteincident(integer)FUNCTION5CREATE FUNCTION deleteincident(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pincdtid ALIAS FOR $1; _count INTEGER := 0; _incdtnbr INTEGER := 0; BEGIN SELECT COUNT(*) INTO _count FROM todoitem WHERE (todoitem_incdt_id=pincdtid); IF (_count > 0) THEN RETURN -1; END IF; DELETE FROM comment WHERE((comment_source='INCDT') AND (comment_source_id=pincdtid)); DELETE FROM incdthist WHERE (incdthist_incdt_id=pincdtid); DELETE FROM imageass WHERE ((imageass_source='INCDT') AND (imageass_source_id=pincdtid)); DELETE FROM url WHERE ((url_source='INCDT') AND (url_source_id=pincdtid)); SELECT incdt_number INTO _incdtnbr FROM incdt WHERE (incdt_id=pincdtid); DELETE FROM incdt WHERE (incdt_id=pincdtid); -- Incident #11538 needs to be fully resolved before release can be implemented -- PERFORM releaseIncidentNumber(_incdtnbr); RETURN 0; END; $_$; .DROP FUNCTION public.deleteincident(integer); publicadminfalse3992812551682204deleteinvoice(integer)FUNCTIONCREATE FUNCTION deleteinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; BEGIN UPDATE shipitem SET shipitem_invoiced=FALSE, shipitem_invcitem_id=NULL FROM invcitem WHERE ((shipitem_invoiced) AND (shipitem_invcitem_id=invcitem_id) AND (invcitem_invchead_id=pInvcheadid)); UPDATE coitem SET coitem_status = 'O' WHERE ((coitem_status = 'C') AND (coitem_id IN (SELECT cobill_coitem_id FROM cobill, invcitem WHERE ((cobill_invcitem_id=invcitem_id) AND (invcitem_invchead_id=pInvcheadid))))); UPDATE cobill SET cobill_invcnum=NULL, cobill_invcitem_id=NULL FROM invcitem WHERE ((cobill_invcitem_id=invcitem_id) AND (invcitem_invchead_id=pInvcheadid)); UPDATE invdetail SET invdetail_invcitem_id=NULL FROM invcitem WHERE ((invdetail_invcitem_id=invcitem_id) AND (invcitem_invchead_id=pInvcheadid)); UPDATE cobmisc SET cobmisc_invcnumber=NULL, cobmisc_invchead_id=NULL, cobmisc_posted=FALSE WHERE (cobmisc_invchead_id=pInvcheadid); DELETE FROM aropenalloc WHERE (aropenalloc_doctype='I') AND (aropenalloc_doc_id=pInvcheadid); DELETE FROM invcitem WHERE (invcitem_invchead_id=pInvcheadid); DELETE FROM invchead WHERE (invchead_id=pInvcheadid); RETURN pInvcheadid; END; $_$; -DROP FUNCTION public.deleteinvoice(integer); publicadminfalse83992u12551682205deleteipsitem(integer)FUNCTION>CREATE FUNCTION deleteipsitem(pipsitemid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN DELETE FROM ipsiteminfo WHERE ipsitem_id=pIpsItemId; RETURN 1; END; $$; 8DROP FUNCTION public.deleteipsitem(pipsitemid integer); publicadminfalse8399212551682206deleteipsprodcat(integer)FUNCTIONCCREATE FUNCTION deleteipsprodcat(pipsitemid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN DELETE FROM ipsiteminfo WHERE ipsitem_id=pIpsItemId; RETURN 1; END; $$; ;DROP FUNCTION public.deleteipsprodcat(pipsitemid integer); publicadminfalse8399212551682207deleteitem(integer)FUNCTIONCREATE FUNCTION deleteitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _result INTEGER; BEGIN SELECT bomitem_id INTO _result FROM bomitem WHERE (bomitem_item_id=pItemid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; SELECT itemsite_id INTO _result FROM itemsite WHERE (itemsite_item_id=pItemid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; SELECT itemsub_id INTO _result FROM itemsub WHERE (itemsub_sub_item_id=pItemid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; IF (fetchmetricbool('RevControl')) THEN SELECT rev_id INTO _result FROM rev WHERE ((rev_target_id=pItemid) AND (rev_target_type = 'BOM')) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; END IF; DELETE FROM bomhead WHERE (bomhead_item_id=pItemid); DELETE FROM bomitem WHERE (bomitem_item_id=pItemid); DELETE FROM itemcost WHERE (itemcost_item_id=pItemid); DELETE FROM costhist WHERE (costhist_item_id=pItemid); DELETE FROM itemsub WHERE (itemsub_parent_item_id=pItemid); DELETE FROM itemsub WHERE (itemsub_sub_item_id=pItemid); DELETE FROM itemsrcp WHERE (itemsrcp_itemsrc_id IN (SELECT itemsrc_id FROM itemsrc WHERE (itemsrc_item_id=pItemid))); DELETE FROM itemsrc WHERE (itemsrc_item_id=pItemid); DELETE FROM itemalias WHERE (itemalias_item_id=pItemid); DELETE FROM itemgrpitem WHERE (itemgrpitem_item_id=pItemid); DELETE FROM ipsiteminfo WHERE (ipsitem_item_id=pItemid); DELETE FROM imageass WHERE ( (imageass_source='I') AND (imageass_source_id=pItemid) ); DELETE FROM locitem WHERE (locitem_item_id=pItemid); DELETE FROM itemtax WHERE(itemtax_item_id=pItemid); DELETE FROM itemsite WHERE (itemsite_item_id=pItemid); DELETE FROM itemuom WHERE(itemuom_itemuomconv_id IN (SELECT itemuomconv_id FROM itemuomconv WHERE(itemuomconv_item_id=pItemid))); DELETE FROM itemuomconv WHERE(itemuomconv_item_id=pItemid); DELETE FROM item WHERE (item_id=pItemid); RETURN 0; END; $_$; *DROP FUNCTION public.deleteitem(integer); publicadminfalse3992812551682208 deleteitemcost(integer, integer)FUNCTIONCREATE FUNCTION deleteitemcost(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pCostElemId ALIAS FOR $2; _itemcost_id INTEGER; _postcost_return BOOLEAN; _std_cost NUMERIC; BEGIN SELECT itemcost_id INTO _itemcost_id FROM itemcost WHERE ( (itemcost_item_id = pItemId) AND (itemcost_costelem_id = pCostElemId) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'itemcost % not found for. ', pItemId || ' & ' || pCostElemId; END IF; SELECT itemcost_stdcost INTO _std_cost FROM itemcost WHERE (itemcost_id = _itemcost_id); IF (_std_cost > 0) THEN --Actual Cost is updated to zero to ensure inventory is valued correctly PERFORM updateCost(_itemcost_id, 0); END IF; DELETE FROM itemcost WHERE (itemcost_id=_itemcost_id); RETURN _itemcost_id; END; $_$; 7DROP FUNCTION public.deleteitemcost(integer, integer); publicadminfalse8399212551682209deleteitemsite(integer)FUNCTIONCREATE FUNCTION deleteitemsite(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _result INTEGER; _lotserial BOOLEAN; _bbom BOOLEAN; _mfg BOOLEAN; _standard BOOLEAN; BEGIN IF ( ( SELECT ( (itemsite_qtyonhand <> 0) OR (itemsite_nnqoh <> 0) ) FROM itemsite WHERE (itemsite_id=pItemsiteid) ) ) THEN RETURN -9; END IF; SELECT metric_value='t' INTO _bbom FROM metric WHERE (metric_name='BBOM'); SELECT metric_value='t' INTO _lotserial FROM metric WHERE (metric_name='LotSerialControl'); SELECT metric_value NOT IN ('PostBooks', 'Standard') INTO _mfg FROM metric WHERE (metric_name='Application'); SELECT metric_value='Standard' INTO _standard FROM metric WHERE (metric_name='Application'); SELECT invhist_id INTO _result FROM invhist WHERE (invhist_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; IF (_lotserial) THEN SELECT lsdetail_id INTO _result FROM lsdetail WHERE (lsdetail_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; END IF; SELECT wo_id INTO _result FROM wo WHERE (wo_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; SELECT womatl_id INTO _result FROM womatl WHERE (womatl_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; SELECT womatlvar_id INTO _result FROM womatlvar WHERE ( (womatlvar_parent_itemsite_id=pItemsiteid) OR (womatlvar_component_itemsite_id=pItemsiteid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; IF (_bbom) THEN SELECT brdvar_id INTO _result FROM xtmfg.brdvar WHERE ( (brdvar_itemsite_id=pItemsiteid) OR (brdvar_parent_itemsite_id=pItemsiteid) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; END IF; SELECT coitem_id INTO _result FROM coitem WHERE (coitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT cohist_id INTO _result FROM cohist WHERE (cohist_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT quitem_id INTO _result FROM quitem WHERE (quitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT cmitem_id INTO _result FROM cmitem WHERE (cmitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT poitem_id INTO _result FROM poitem WHERE (poitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT recv_id INTO _result FROM recv WHERE (recv_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT poreject_id INTO _result FROM poreject WHERE (poreject_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT pr_id INTO _result FROM pr WHERE (pr_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; IF (_mfg OR _standard) THEN SELECT planord_id INTO _result FROM planord WHERE (planord_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; END IF; IF (_mfg) THEN SELECT pschitem_id INTO _result FROM xtmfg.pschitem WHERE (pschitem_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; SELECT woopervar_id INTO _result FROM xtmfg.woopervar WHERE (woopervar_parent_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; END IF; IF (_mfg OR _standard) THEN SELECT itemsite_id INTO _result FROM itemsite WHERE (itemsite_supply_itemsite_id=pItemsiteid) LIMIT 1; IF (FOUND) THEN RETURN -7; END IF; END IF; DELETE FROM invcnt WHERE (invcnt_itemsite_id=pItemsiteid); DELETE FROM itemloc WHERE (itemloc_itemsite_id=pItemsiteid); DELETE FROM itemlocdist WHERE (itemlocdist_itemsite_id=pItemsiteid); IF (_bbom) THEN DELETE FROM xtmfg.brddist WHERE (brddist_itemsite_id=pItemsiteid); END IF; DELETE FROM itemsite WHERE (itemsite_id=pItemsiteid); RETURN 0; END; $_$; .DROP FUNCTION public.deleteitemsite(integer); publicadminfalse39928w12551682210deleteitemuom(integer)FUNCTIONKCREATE FUNCTION deleteitemuom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemuomid ALIAS FOR $1; BEGIN DELETE FROM itemuom WHERE itemuom_id=pItemuomid; RETURN 0; END; $_$; -DROP FUNCTION public.deleteitemuom(integer); publicadminfalse8399212551682211deleteitemuomconv(integer)FUNCTIONCREATE FUNCTION deleteitemuomconv(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemuomconvid ALIAS FOR $1; _fromuomid INTEGER; _invuomid INTEGER; _itemid INTEGER; _touomid INTEGER; BEGIN SELECT itemuomconv_item_id, item_inv_uom_id, itemuomconv_from_uom_id, itemuomconv_to_uom_id INTO _itemid, _invuomid, _fromuomid, _touomid FROM itemuomconv JOIN item ON (itemuomconv_item_id=item_id) WHERE (itemuomconv_id=pItemuomconvid); IF EXISTS(SELECT * FROM uomusedforitem(_itemid) WHERE ((uom_id IN (_fromuomid, _touomid)) AND (uom_id != _invuomid)) ) THEN RETURN -1; END IF; DELETE FROM itemuom WHERE itemuom_itemuomconv_id=pItemuomconvid; DELETE FROM itemuomconv WHERE itemuomconv_id=pItemuomconvid; RETURN 0; END; $_$; 1DROP FUNCTION public.deleteitemuomconv(integer); publicadminfalse8399212551682212deletelocation(integer)FUNCTIONCREATE FUNCTION deletelocation(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if any itemsite used the passed location as their default SELECT itemsite_id INTO _check FROM itemsite WHERE (itemsite_location_id=pLocationid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Check to see if any inventory is currently stored at the passed location SELECT itemloc_id INTO _check FROM itemloc WHERE (itemloc_location_id=pLocationid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to see if any undistributed inventory transactions are currently posted at the passed location SELECT itemlocdist_id INTO _check FROM itemlocdist WHERE ( (itemlocdist_source_type='L') AND (itemlocdist_source_id=pLocationid) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to see if the passed location has any Inventory Detail posted against it SELECT invdetail_id INTO _check FROM invdetail WHERE (invdetail_location_id=pLocationid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; -- Delete any associated locitem records DELETE FROM locitem WHERE (locitem_location_id=pLocationid); -- Delete the location record DELETE FROM location WHERE (location_id=pLocationid); RETURN pLocationid; END; $_$; .DROP FUNCTION public.deletelocation(integer); publicadminfalse83992{12551682213deletemetasql(integer)FUNCTION=CREATE FUNCTION deletemetasql(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pid ALIAS FOR $1; BEGIN DELETE FROM metasql WHERE metasql_id = pid; RETURN 0; END; $_$; -DROP FUNCTION public.deletemetasql(integer); publicadminfalse8399212551682214Jdeleteopenrecurringitems(integer, text, timestamp with time zone, boolean)FUNCTIONCREATE FUNCTION deleteopenrecurringitems(integer, text, timestamp with time zone, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentid ALIAS FOR $1; pType TEXT := UPPER($2); pDatetime TIMESTAMP WITH TIME ZONE := COALESCE($3, startOfTime()); pInclParent BOOLEAN := COALESCE($4, FALSE); _count INTEGER := 0; _delchildstmt TEXT; _delparentstmt TEXT; _rt RECORD; _tmp INTEGER; BEGIN RAISE DEBUG 'deleteOpenRecurringItems(%, %, %)', pParentid, pType, pDatetime; IF (pParentid IS NULL) THEN RETURN -11; END IF; SELECT * INTO _rt FROM recurtype WHERE (UPPER(recurtype_type)=pType); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count <= 0) THEN RETURN -10; END IF; -- 2 deletes avoid reparenting problems if the parent gets deleted first IF (_rt.recurtype_delfunc IS NULL) THEN _delchildstmt := 'DELETE FROM [fulltable] ' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>''$2'')' || ' AND ([table]_recurring_[table]_id=$1)' || ' AND ([table]_id!=$1));'; _delparentstmt := 'DELETE FROM [fulltable] USING recur' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>''$2'')' || ' AND ([table]_recurring_[table]_id=$1)' || ' AND ([table]_id=$1));'; ELSE _delchildstmt := 'SELECT [delfunc]([table]_id)' || ' FROM [fulltable] ' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>''$2'')' || ' AND ([table]_recurring_[table]_id=$1)' || ' AND ([table]_id!=$1));'; _delparentstmt := 'SELECT [delfunc]([table]_id)' || ' FROM [fulltable] ' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>''$2'')' || ' AND ([table]_recurring_[table]_id=$1)' || ' AND ([table]_id!=$1));'; _delchildstmt := REPLACE(_delchildstmt, '[delfunc]', _rt.recurtype_delfunc); _delparentstmt := REPLACE(_delparentstmt, '[delfunc]', _rt.recurtype_delfunc); END IF; RAISE DEBUG '_delchildstmt has been set to %', _delchildstmt; _delchildstmt := REPLACE(_delchildstmt, '[fulltable]', _rt.recurtype_table); _delchildstmt := REPLACE(_delchildstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _delchildstmt := REPLACE(_delchildstmt, '[done]', _rt.recurtype_donecheck); _delchildstmt := REPLACE(_delchildstmt, '[schedcol]', _rt.recurtype_schedcol); _delparentstmt := REPLACE(_delparentstmt, '[fulltable]', _rt.recurtype_table); _delparentstmt := REPLACE(_delparentstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _delparentstmt := REPLACE(_delparentstmt, '[done]', _rt.recurtype_donecheck); _delparentstmt := REPLACE(_delparentstmt, '[schedcol]', _rt.recurtype_schedcol); RAISE DEBUG 'substitutions changed _delchildstmt to %', _delchildstmt; IF (_rt.recurtype_delfunc IS NULL) THEN -- 8.4+: EXECUTE _delchildstmt USING pDatetime, pType; RAISE DEBUG '% with % and %', _delchildstmt, pType, pDatetime; EXECUTE REPLACE(REPLACE(_delchildstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT); GET DIAGNOSTICS _count = ROW_COUNT; IF (pInclParent) THEN -- 8.4+: EXECUTE _delparentstmt USING pDatetime, pType; RAISE DEBUG '% with % and %', _delparentstmt, pType, pDatetime; EXECUTE REPLACE(REPLACE(_delparentstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT); GET DIAGNOSTICS _tmp = ROW_COUNT; _count := _count + _tmp; END IF; ELSE -- 8.4+: FOR _tmp IN EXECUTE _delchildstmt USING pDatetime, pType LOOP FOR _tmp IN EXECUTE REPLACE(REPLACE(_delchildstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT) LOOP IF _tmp < 0 THEN RETURN _tmp; END IF; _count := _count + 1; END LOOP; IF (pInclParent) THEN -- 8.4+: EXECUTE _delparentstmt INTO _tmp USING pDatetime, pType; EXECUTE REPLACE(REPLACE(_delparentstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT) INTO _tmp; IF (_tmp < 0) THEN RETURN _tmp; END IF; _count := _count + 1; END IF; END IF; RAISE DEBUG 'deleteOpenrecurringItems() returning %', _count; RETURN _count; END; $_$; aDROP FUNCTION public.deleteopenrecurringitems(integer, text, timestamp with time zone, boolean); publicadminfalse8399212551682215deleteopportunity(integer)FUNCTIONCREATE FUNCTION deleteopportunity(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOpheadid ALIAS FOR $1; _test INTEGER; BEGIN SELECT todoitem_id INTO _test FROM todoitem WHERE(todoitem_ophead_id=pOpheadid) LIMIT 1; IF(FOUND) THEN RETURN -1; END IF; SELECT quhead_id INTO _test FROM quhead WHERE(quhead_ophead_id=pOpheadid) LIMIT 1; IF(FOUND) THEN RETURN -2; END IF; SELECT cohead_id INTO _test FROM cohead WHERE(cohead_ophead_id=pOpheadid) LIMIT 1; IF(FOUND) THEN RETURN -3; END IF; DELETE FROM charass WHERE((charass_target_type='OPP') AND (charass_target_id=pOpheadid)); DELETE FROM comment WHERE((comment_source='OPP') AND (comment_source_id=pOpheadid)); DELETE FROM ophead WHERE(ophead_id=pOpheadid); return 0; END; $_$; 1DROP FUNCTION public.deleteopportunity(integer); publicadminfalse3992812551682216deletepackage(integer)FUNCTIONCREATE FUNCTION deletepackage(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgheadid ALIAS FOR $1; _i INTEGER := 0; _pkgname TEXT; _r RECORD; _tabs TEXT[] := ARRAY['cmd', 'cmdarg', 'image', 'metasql', 'priv', 'report', 'script', 'uiform']; _debug BOOL := false; BEGIN IF (EXISTS(SELECT * FROM pkgdep WHERE (pkgdep_parent_pkghead_id=ppkgheadid))) THEN RETURN -1; END IF; SELECT pkghead_name INTO _pkgname FROM pkghead WHERE (pkghead_id=ppkgheadid); IF (NOT FOUND) THEN RETURN -2; END IF; IF (LOWER(_pkgname) = 'public' OR LOWER(_pkgname) = 'api') THEN RETURN -3; END IF; FOR _i IN ARRAY_LOWER(_tabs,1)..ARRAY_UPPER(_tabs,1) LOOP EXECUTE 'ALTER TABLE ' || _pkgname || '.pkg' || _tabs[_i] || ' DISABLE TRIGGER pkg' || _tabs[_i] || 'altertrigger;'; END LOOP; DELETE FROM pkghead WHERE pkghead_id=ppkgheadid; RETURN ppkgheadid; END; $_$; -DROP FUNCTION public.deletepackage(integer); publicadminfalse8399212551682217deletepo(integer)FUNCTION9CREATE FUNCTION deletepo(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; _poitemid INTEGER; BEGIN IF ( ( SELECT pohead_status FROM pohead WHERE (pohead_id=pPoheadid) ) = 'U' ) THEN -- Unlink from any Sales Orders UPDATE coitem SET coitem_order_type=NULL, coitem_order_id=NULL FROM poitem WHERE ( (coitem_order_type='P') AND (coitem_order_id=poitem_id) AND (poitem_pohead_id=pPoheadid) ); DELETE FROM poitem WHERE (poitem_pohead_id=pPoheadid); DELETE FROM pohead WHERE (pohead_id=pPoheadid); RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; (DROP FUNCTION public.deletepo(integer); publicadminfalse8399212551682218deletepoitem(integer)FUNCTIONCREATE FUNCTION deletepoitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoitemid ALIAS FOR $1; _poheadid INTEGER := -1; _status CHARACTER; BEGIN SELECT poitem_pohead_id, poitem_status INTO _poheadid, _status FROM poitem WHERE (poitem_id=pPoitemid); IF NOT(FOUND) THEN RETURN 0; END IF; IF ( _status = 'U' ) THEN DELETE FROM poitem WHERE (poitem_id=pPoitemid); ELSE IF ( _status = 'O' ) THEN PERFORM recv_id FROM recv WHERE ( (recv_order_type='PO') AND (recv_orderitem_id=pPoitemid) ); IF (FOUND) THEN RETURN -10; ELSE RETURN -20; END IF; ELSE RETURN -10; END IF; END IF; PERFORM poitem_id FROM poitem WHERE poitem_pohead_id = _poheadid; IF NOT(FOUND) THEN DELETE FROM pohead WHERE (pohead_id = _poheadid); END IF; RETURN 0; END; $_$; ,DROP FUNCTION public.deletepoitem(integer); publicadminfalse8399212551682219deletepr(character, integer)FUNCTIONCREATE FUNCTION deletepr(character, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentType ALIAS FOR $1; pParentId ALIAS FOR $2; BEGIN DELETE FROM pr WHERE ((pr_status='O') AND (pr_order_type=pParentType) AND (pr_order_id=pParentId)); RETURN TRUE; END; $_$; 3DROP FUNCTION public.deletepr(character, integer); publicadminfalse8399212551682220deletepr(integer)FUNCTIONVCREATE FUNCTION deletepr(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrid ALIAS FOR $1; BEGIN DELETE FROM pr WHERE ( (pr_status='O') AND (pr_id=pPrid) ); RETURN TRUE; END; $_$; (DROP FUNCTION public.deletepr(integer); publicadminfalse3992812551682221deleteproductcategory(integer)FUNCTIONCREATE FUNCTION deleteproductcategory(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pProdcatid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if any items are assigned to the passed classcode SELECT item_id INTO _check FROM item WHERE (item_prodcat_id=pProdcatid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete any assocated records DELETE FROM salesaccnt WHERE (salesaccnt_prodcat_id=pProdcatid); -- Delete the passed prodcat DELETE FROM prodcat WHERE (prodcat_id=pProdcatid); RETURN pProdcatid; END; $_$; 5DROP FUNCTION public.deleteproductcategory(integer); publicadminfalse3992812551682222deleteprofitcenter(integer)FUNCTIONCREATE FUNCTION deleteprofitcenter(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pid ALIAS FOR $1; BEGIN IF (EXISTS(SELECT accnt_id FROM accnt, prftcntr WHERE ((accnt_company=prftcntr_number) AND (prftcntr_id=pid)) )) THEN RETURN -1; END IF; DELETE FROM prftcntr WHERE (prftcntr_id=pid); RETURN pid; END; $_$; 2DROP FUNCTION public.deleteprofitcenter(integer); publicadminfalse8399212551682223deleteproject(integer)FUNCTIONCREATE FUNCTION deleteproject(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrjid ALIAS FOR $1; _result INTEGER; BEGIN SELECT quhead_id INTO _result FROM quhead WHERE (quhead_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; SELECT cohead_id INTO _result FROM cohead WHERE (cohead_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; SELECT wo_id INTO _result FROM wo WHERE (wo_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; SELECT pr_id INTO _result FROM pr WHERE (pr_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; SELECT poitem_id INTO _result FROM poitem WHERE (poitem_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; SELECT invchead_id INTO _result FROM invchead WHERE (invchead_prj_id=pPrjid) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; DELETE FROM comment WHERE ((comment_source='J') AND (comment_source_id=pPrjid)); DELETE FROM comment WHERE ((comment_source='TA') AND (comment_source_id IN ( SELECT prjtask_id FROM prjtask WHERE (prjtask_prj_id=pPrjId)))); DELETE FROM prjtask WHERE (prjtask_prj_id=pPrjid); UPDATE prj SET prj_recurring_prj_id=null WHERE(prj_recurring_prj_id=pPrjid); DELETE FROM prj WHERE (prj_id=pPrjid); RETURN pPrjid; END; $_$; -DROP FUNCTION public.deleteproject(integer); publicadminfalse39928}12551682224deleteprojecttask(integer)FUNCTIONCREATE FUNCTION deleteprojecttask(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrjtaskid ALIAS FOR $1; _row RECORD; _result INTEGER; BEGIN SELECT * INTO _row FROM prjtask WHERE (prjtask_id=pPrjtaskid) LIMIT 1; IF (NOT FOUND) THEN RETURN -1; END IF; IF (COALESCE(_row.prjtask_hours_actual, 0.0) > 0.0) THEN RETURN -2; END IF; IF (COALESCE(_row.prjtask_exp_actual, 0.0) > 0.0) THEN RETURN -3; END IF; DELETE FROM comment WHERE ((comment_source='TA') AND (comment_source_id=pPrjtaskid)); DELETE FROM prjtask WHERE (prjtask_id=pPrjtaskid); RETURN 0; END; $_$; 1DROP FUNCTION public.deleteprojecttask(integer); publicadminfalse3992812551682225deleteqryhead(integer)FUNCTIONCREATE FUNCTION deleteqryhead(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pqryheadid ALIAS FOR $1; BEGIN DELETE FROM qryitem WHERE (qryitem_qryhead_id=pqryheadid); DELETE FROM qryhead WHERE (qryhead_id=pqryheadid); RETURN pqryheadid; END; $_$; -DROP FUNCTION public.deleteqryhead(integer); publicadminfalse8399212551682226deletequote(integer, text)FUNCTIONCREATE FUNCTION deletequote(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pQuoteNumber ALIAS FOR $2; _quNumberScheme TEXT; _quoteNumber TEXT; _quitemid INTEGER; _result INTEGER; BEGIN SELECT fetchMetricText('QUNumberGeneration') INTO _quNumberScheme; IF (pQuoteNumber IS NULL) THEN SELECT quhead_number INTO _quoteNumber FROM quhead WHERE (quhead_id=pQuheadid); ELSE _quoteNumber := pQuoteNumber; END IF; DELETE FROM quitem WHERE (quitem_quhead_id=pQuheadid); DELETE FROM quhead WHERE (quhead_id=pQuheadid); IF (_quoteNumber IS NOT NULL) THEN IF (_quNumberScheme IN ('A', 'O')) THEN -- do not release quote # if quote converted to sales order IF (NOT EXISTS (SELECT cohead_id FROM cohead WHERE (cohead_number=_quoteNumber))) THEN _result = releaseQuNumber(_quoteNumber); END IF; ELSEIF (_quNumberScheme = 'S') THEN _result = releaseSoNumber(_quoteNumber); END IF; END IF; -- Don't care about result of release number RETURN 0; END; $_$; 1DROP FUNCTION public.deletequote(integer, text); publicadminfalse3992812552005519deletequote(integer)FUNCTION4CREATE FUNCTION deletequote(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; BEGIN RETURN deleteQuote(pQuheadid, NULL::TEXT); END; $_$; +DROP FUNCTION public.deletequote(integer); publicadminfalse8399212552005520deletequote(integer, integer)FUNCTIONbCREATE FUNCTION deletequote(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuheadid ALIAS FOR $1; pQuoteNumber ALIAS FOR $2; BEGIN RETURN deleteQuote(pQuheadid, pQuoteNumber::TEXT); END; $_$; 4DROP FUNCTION public.deletequote(integer, integer); publicadminfalse8399212551682229!deleterecvfororder(text, integer)FUNCTION7CREATE FUNCTION deleterecvfororder(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderid ALIAS FOR $2; BEGIN DELETE FROM recv USING orderitem WHERE ((recv_orderitem_id=orderitem_id) AND (recv_order_type=orderitem_orderhead_type) AND (NOT recv_posted) AND (orderitem_orderhead_id=porderid) AND (orderitem_orderhead_type=pordertype)); RETURN 0; END; $_$; 8DROP FUNCTION public.deleterecvfororder(text, integer); publicadminfalse8399212551682230deletesalescategory(integer)FUNCTIONCREATE FUNCTION deletesalescategory(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalescatid ALIAS FOR $1; BEGIN PERFORM invcitem_salescat_id FROM invchead, invcitem WHERE ( (invcitem_invchead_id=invchead_id) AND (NOT invchead_posted) AND (invcitem_salescat_id=pSalescatid) ); IF (FOUND) THEN RETURN -1; END IF; PERFORM invcitem_salescat_id FROM invchead, invcitem WHERE ( (invcitem_invchead_id=invchead_id) AND (invchead_posted) AND (invcitem_salescat_id=pSalescatid) ); IF (FOUND) THEN RETURN -2; END IF; PERFORM aropen_salescat_id FROM aropen WHERE (aropen_salescat_id=pSalescatid); IF (FOUND) THEN RETURN -3; END IF; DELETE FROM salescat WHERE (salescat_id=pSalescatid); RETURN 0; END; $_$; 3DROP FUNCTION public.deletesalescategory(integer); publicadminfalse8399212551682231deleteshippingcharge(integer)FUNCTIONCREATE FUNCTION deleteshippingcharge(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipchrgid ALIAS FOR $1; BEGIN IF EXISTS(SELECT 1 FROM custinfo WHERE (cust_shipchrg_id=pShipchrgid)) THEN RETURN -1; END IF; DELETE FROM shipchrg WHERE (shipchrg_id=pShipchrgid); RETURN pShipchrgid; END; $_$; 4DROP FUNCTION public.deleteshippingcharge(integer); publicadminfalse8399212551682232!deleteshippingchargetype(integer)FUNCTIONCREATE FUNCTION deleteshippingchargetype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipchrgid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if the passed shipchrg is used as a default for any customers SELECT cust_id INTO _check FROM custinfo WHERE (cust_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Check to see if the passed shipchrg is used as a default for any shiptos SELECT shipto_id INTO _check FROM shiptoinfo WHERE (shipto_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- Check to see if the passed shipchrg is used on any sales orders SELECT cohead_id INTO _check FROM cohead WHERE (cohead_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; -- Check to see if the passed shipchrg is used on any shippers SELECT shiphead_id INTO _check FROM shiphead WHERE (shiphead_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; -- Check to see if the passed shipchrg is used on any invoices SELECT invchead_id INTO _check FROM invchead WHERE (invchead_shipchrg_id=pShipchrgid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; -- Delete the passed shipchrg DELETE FROM shipchrg WHERE (shipchrg_id=pShipchrgid); RETURN pShipchrgid; END; $_$; 8DROP FUNCTION public.deleteshippingchargetype(integer); publicadminfalse8399212551682233deleteshipto(integer)FUNCTIONCREATE FUNCTION deleteshipto(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShiptoid ALIAS FOR $1; BEGIN PERFORM asohist_id FROM asohist WHERE (asohist_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; PERFORM cohead_id FROM cohead WHERE (cohead_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; PERFORM cmhead_id FROM cmhead WHERE (cmhead_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; PERFORM cohist_id FROM cohist WHERE (cohist_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -4; END IF; PERFORM quhead_id FROM quhead WHERE (quhead_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -5; END IF; PERFORM invchead_id FROM invchead WHERE (invchead_shipto_id=pShiptoid) LIMIT 1; IF (FOUND) THEN RETURN -6; END IF; DELETE FROM ipsass WHERE (ipsass_shipto_id=pShiptoid); DELETE FROM shiptoinfo WHERE (shipto_id=pShiptoid); RETURN 0; END; $_$; ,DROP FUNCTION public.deleteshipto(integer); publicadminfalse8399212551682234deleteso(integer)FUNCTION+CREATE FUNCTION deleteso(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; BEGIN RETURN deleteSo(pSoheadid, NULL); END; $_$; (DROP FUNCTION public.deleteso(integer); publicadminfalse8399212551682235deleteso(integer, text)FUNCTIONCREATE FUNCTION deleteso(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pSonumber ALIAS FOR $2; _r RECORD; _coitemid INTEGER; _result INTEGER; _poStatus INTEGER := 0; BEGIN -- Get cohead SELECT * INTO _r FROM cohead WHERE (cohead_id=pSoheadid); IF (NOT FOUND) THEN RETURN 0; END IF; -- Cannot delete if credit card payments IF (EXISTS(SELECT ccpay_id FROM ccpay, payco WHERE ((ccpay_status IN ('C')) AND (ccpay_id=payco_ccpay_id) AND (payco_cohead_id=pSoheadid)))) THEN RETURN -1; END IF; -- Cannot delete if credit card history IF (EXISTS(SELECT ccpay_id FROM ccpay, payco WHERE ((ccpay_status != 'C') AND (ccpay_id=payco_ccpay_id) AND (payco_cohead_id=pSoheadid)))) THEN RETURN -2; END IF; -- Delete Sales Order Items FOR _coitemid IN SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=pSoheadid) AND (coitem_subnumber=0) ) LOOP SELECT deleteSoItem(_coitemid) INTO _result; IF (_result < 0) THEN IF (_result = -20) THEN _poStatus := _poStatus - 1; ELSE RETURN _result; END IF; END IF; END LOOP; DELETE FROM pack WHERE (pack_head_id=pSoheadid and pack_head_type = 'SO'); DELETE FROM cohead WHERE (cohead_id=pSoheadid); IF (fetchMetricBool('AutoCreateProjectsForOrders')) THEN PERFORM deleteProject(_r.cohead_prj_id); END IF; DELETE FROM aropenalloc WHERE ((aropenalloc_doctype='S') AND (aropenalloc_doc_id=pSoheadid)); IF (COALESCE(pSonumber,'') != '') THEN _result = releaseSoNumber(pSonumber); ELSEIF (_r.cohead_number IS NOT NULL) THEN _result = releaseSoNumber(_r.cohead_number); END IF; IF (_poStatus < 0) THEN RETURN -20; ELSE RETURN 0; END IF; END; $_$; .DROP FUNCTION public.deleteso(integer, text); publicadminfalse3992812551682236deletesoitem(integer)FUNCTION CREATE FUNCTION deletesoitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; _r RECORD; _s RECORD; _result INTEGER; _deletePO INTEGER := 0; _recvId INTEGER := -1; _poStatus TEXT; _jobItem BOOLEAN; BEGIN -- Get coitem SELECT * INTO _r FROM coitem WHERE (coitem_id=pSoitemid); IF (NOT FOUND) THEN RETURN -999; END IF; -- Cannot delete if shipped IF (_r.coitem_qtyshipped > 0) THEN RETURN -101; END IF; -- Cannot delete if issued to shipping SELECT shipitem_id INTO _result FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id AND shiphead_order_type='SO') WHERE (shipitem_orderitem_id=pSoitemid) LIMIT 1; IF (FOUND) THEN RETURN -102; END IF; -- Cannot delete if returned IF (fetchMetricBool('MultiWhs')) THEN SELECT raitem_id INTO _result FROM raitem WHERE ( (raitem_orig_coitem_id=pSoitemid) OR (raitem_new_coitem_id=pSoitemid) ) LIMIT 1; IF (FOUND) THEN RETURN -103; END IF; END IF; -- Cannot delete if any inventory history SELECT invhist_id INTO _result FROM invhist WHERE ( (invhist_ordnumber=formatSoNumber(pSoitemid)) AND (invhist_ordtype='SO') ) LIMIT 1; IF (FOUND) THEN RETURN -105; END IF; -- If Kit, check deletion of component items IF (_r.coitem_subnumber = 0) THEN FOR _s IN SELECT * FROM coitem WHERE ((coitem_cohead_id = _r.coitem_cohead_id) AND (coitem_linenumber = _r.coitem_linenumber) AND (coitem_subnumber > 0)) LOOP IF ((COALESCE(_s.coitem_order_id, -1) > 0) AND (_s.coitem_order_type = 'P')) THEN SELECT poitem_status, COALESCE(recv_id, -1) INTO _poStatus, _recvId FROM poitem LEFT OUTER JOIN recv ON ((recv_orderitem_id=poitem_id) AND (recv_order_type='PO')) WHERE (poitem_id = _s.coitem_order_id); IF ((_recvId > 0) OR (_poStatus = 'C')) THEN RETURN -10; ELSIF ((_recvId = -1) AND (_poStatus = 'O')) THEN _deletePO := _deletePO - 1; END IF; END IF; END LOOP; END IF; SELECT (itemsite_costmethod='J') INTO _jobItem FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE (coitem_id=pSoitemid); IF (_jobItem AND _r.coitem_order_type='W') THEN -- Delete associated Job Work Order SELECT deleteWo(_r.coitem_order_id, TRUE, TRUE) INTO _result; IF (_result < 0) THEN RETURN -104; END IF; ELSIF (_r.coitem_order_type='W') THEN -- Delete associated Job Work Order SELECT deleteWo(_r.coitem_order_id, TRUE) INTO _result; IF (_result < 0) THEN -- Cannot delete so break association PERFORM changeWoProject(_r.coitem_order_id, -1, TRUE); END IF; ELSIF (_r.coitem_order_type='R') THEN -- Delete associated Purchase Request PERFORM deletePr(_r.coitem_order_id); ELSIF (_r.coitem_order_type='P') THEN -- Delete associated Purchase Order Item SELECT deletepoitem(_r.coitem_order_id) INTO _result; IF ((_result < 0) AND (_result <> -20)) THEN RETURN _result; ELSIF (_result = -20) THEN _deletePO := _deletePO - 1; END IF; END IF; -- Delete the coitem DELETE FROM coitem WHERE (coitem_id=pSoitemid); IF (_deletePO < 0) THEN RETURN -20; ELSE RETURN 0; END IF; END; $_$; ,DROP FUNCTION public.deletesoitem(integer); publicadminfalse8399212551682237deletestandardjournal(integer)FUNCTIONCREATE FUNCTION deletestandardjournal(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; BEGIN DELETE FROM stdjrnlitem WHERE (stdjrnlitem_stdjrnl_id=pStdjrnlid); DELETE FROM stdjrnlgrpitem WHERE (stdjrnlgrpitem_stdjrnl_id=pStdjrnlid); DELETE FROM stdjrnl WHERE (stdjrnl_id=pStdjrnlid); RETURN 1; END; $_$; 5DROP FUNCTION public.deletestandardjournal(integer); publicadminfalse8399212551682238#deletestandardjournalgroup(integer)FUNCTIONCREATE FUNCTION deletestandardjournalgroup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlgrpid ALIAS FOR $1; BEGIN DELETE FROM stdjrnlgrpitem WHERE (stdjrnlgrpitem_stdjrnlgrp_id=pStdjrnlgrpid); DELETE FROM stdjrnlgrp WHERE (stdjrnlgrp_id=pStdjrnlgrpid); RETURN 1; END; $_$; :DROP FUNCTION public.deletestandardjournalgroup(integer); publicadminfalse8399212551682239deletesubaccount(integer)FUNCTIONCREATE FUNCTION deletesubaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pid ALIAS FOR $1; BEGIN IF (EXISTS(SELECT accnt_id FROM accnt, subaccnt WHERE ((accnt_company=subaccnt_number) AND (subaccnt_id=pid)) )) THEN RETURN -1; END IF; DELETE FROM subaccnt WHERE (subaccnt_id=pid); RETURN pid; END; $_$; 0DROP FUNCTION public.deletesubaccount(integer); publicadminfalse8399212551682240deletesubaccounttype(integer)FUNCTIONCREATE FUNCTION deletesubaccounttype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSubAccntTypeid ALIAS FOR $1; _check INTEGER; BEGIN -- Check to see if the passed subaccnttype is used in any accounts SELECT accnt_id INTO _check FROM accnt, subaccnttype WHERE ( (accnt_subaccnttype_code=subaccnttype_code) AND (subaccnttype_id=pSubAccntTypeid) ) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the Sub Account Type DELETE FROM subaccnttype WHERE (subaccnttype_id=pSubAccntTypeid); RETURN 0; END; $_$; 4DROP FUNCTION public.deletesubaccounttype(integer); publicadminfalse8399212551682241deletetax(integer)FUNCTIONCREATE FUNCTION deletetax(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptaxid ALIAS FOR $1; BEGIN -- these checks allow nice error reporting instead of throwing an SQL error IF EXISTS(SELECT taxass_id FROM taxass WHERE (taxass_tax_id=ptaxid)) THEN RETURN -10; END IF; IF EXISTS(SELECT taxhist_id FROM taxhist WHERE (taxhist_tax_id=ptaxid)) THEN RETURN -20; END IF; DELETE FROM taxrate WHERE (taxrate_tax_id = ptaxid); DELETE FROM tax WHERE (tax_id = ptaxid); RETURN ptaxid; END; $_$; )DROP FUNCTION public.deletetax(integer); publicadminfalse8399212551682242deletetaxclass(integer)FUNCTIONSCREATE FUNCTION deletetaxclass(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxclassid ALIAS FOR $1; _result INTEGER; BEGIN -- Check to find if the tax class is used in any tax code SELECT tax_id INTO _result FROM tax WHERE (tax_taxclass_id = pTaxclassid); IF (FOUND) THEN RETURN -1; END IF; -- Delete the tax class if the above condition doesn't match DELETE FROM taxclass WHERE taxclass_id = pTaxclassid ; RETURN pTaxclassid; END; $_$; .DROP FUNCTION public.deletetaxclass(integer); publicadminfalse8399212551682243deletetaxtype(integer)FUNCTION$CREATE FUNCTION deletetaxtype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxtypeid ALIAS FOR $1; _result INTEGER; BEGIN SELECT taxtype_id INTO _result FROM taxtype WHERE ((taxtype_sys) AND (taxtype_id=pTaxtypeid)); IF (FOUND) THEN RETURN -1; END IF; SELECT taxass_id INTO _result FROM taxass WHERE (taxass_taxtype_id=pTaxtypeid); IF (FOUND) THEN RETURN -2; END IF; SELECT taxhist_id INTO _result FROM taxhist WHERE (taxhist_taxtype_id=pTaxtypeid); IF (FOUND) THEN RETURN -3; END IF; DELETE FROM taxtype WHERE (taxtype_id=pTaxtypeid); RETURN pTaxtypeid; END; $_$; -DROP FUNCTION public.deletetaxtype(integer); publicadminfalse8399212551682244deletetaxzone(integer)FUNCTIONCREATE FUNCTION deletetaxzone(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxzoneid ALIAS FOR $1; _result INTEGER; BEGIN -- Check to find if the tax zone is used in any tax assignment SELECT taxass_id INTO _result FROM taxass WHERE (taxass_taxzone_id=pTaxzoneid); IF (FOUND) THEN RETURN -1; END IF; -- Check to find if the tax zone has been referenced in any tax registration SELECT taxreg_id INTO _result FROM taxreg WHERE (taxreg_taxzone_id=pTaxzoneid); IF (FOUND) THEN RETURN -2; END IF; -- Delete the tax zone if none of the above conditions match DELETE FROM taxzone WHERE taxzone_id = pTaxzoneid ; RETURN pTaxzoneid; END; $_$; -DROP FUNCTION public.deletetaxzone(integer); publicadminfalse8399212551682245deletetodoitem(integer)FUNCTIONCREATE FUNCTION deletetodoitem(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoItemId ALIAS FOR $1; BEGIN DELETE FROM alarm WHERE ( (alarm_source='TODO') AND (alarm_source_id=ptodoItemId) ); DELETE FROM todoitem WHERE todoitem_id = ptodoItemId; RETURN 0; END; $_$; .DROP FUNCTION public.deletetodoitem(integer); publicadminfalse8399212551682246deleteunusedclasscodes()FUNCTION[CREATE FUNCTION deleteunusedclasscodes() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN DELETE FROM classcode WHERE (classcode_id NOT IN (SELECT DISTINCT item_classcode_id FROM item)); RETURN 0; END; $$; /DROP FUNCTION public.deleteunusedclasscodes(); publicadminfalse8399212551682247deleteunusedfreightclasses()FUNCTIONuCREATE FUNCTION deleteunusedfreightclasses() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN DELETE FROM freightclass WHERE (freightclass_id NOT IN (SELECT DISTINCT COALESCE(item_freightclass_id, 0) FROM item)); RETURN 0; END; $$; 3DROP FUNCTION public.deleteunusedfreightclasses(); publicadminfalse8399212551682248deleteunusedproductcategories()FUNCTIONCREATE FUNCTION deleteunusedproductcategories() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Delete any associated records DELETE FROM salesaccnt WHERE ( (salesaccnt_prodcat_id <> -1) AND (salesaccnt_prodcat_id NOT IN (SELECT DISTINCT item_prodcat_id FROM item)) ); DELETE FROM prodcat WHERE (prodcat_id NOT IN (SELECT DISTINCT item_prodcat_id FROM item)); RETURN 0; END; $$; 6DROP FUNCTION public.deleteunusedproductcategories(); publicadminfalse8399212551682249deleteuom(integer)FUNCTIONCREATE FUNCTION deleteuom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUomid ALIAS FOR $1; BEGIN DELETE FROM uomconv WHERE uomconv_from_uom_id=pUomid; DELETE FROM uomconv WHERE uomconv_to_uom_id=pUomid; DELETE FROM uom WHERE uom_id=pUomid; RETURN 0; END; $_$; )DROP FUNCTION public.deleteuom(integer); publicadminfalse8399212551682250deleteuomconv(integer)FUNCTIONKCREATE FUNCTION deleteuomconv(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUomconvid ALIAS FOR $1; BEGIN DELETE FROM uomconv WHERE uomconv_id=pUomconvid; RETURN 0; END; $_$; -DROP FUNCTION public.deleteuomconv(integer); publicadminfalse8399212551682251deleteurl(integer)FUNCTIONCREATE FUNCTION deleteurl(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ declare pId ALIAS FOR $1; begin delete from urlinfo where ( url_id in ( select url_id from urlinfo join docass on (docass_target_id=url_id) and (docass_target_type='URL') where ( docass_id = pId ) ) ); delete from docass where docass_id = pId; return true; end; $_$; )DROP FUNCTION public.deleteurl(integer); publicadminfalse8399212551682252deleteuserpreference(text)FUNCTIONCREATE FUNCTION deleteuserpreference(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrefname ALIAS FOR $1; _return BOOLEAN; BEGIN SELECT deleteUserPreference(getEffectiveXtUser(), pPrefname) INTO _return; RETURN _return; END; $_$; 1DROP FUNCTION public.deleteuserpreference(text); publicadminfalse8399212551682253 deleteuserpreference(text, text)FUNCTIONCREATE FUNCTION deleteuserpreference(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrefname ALIAS FOR $2; BEGIN DELETE FROM usrpref WHERE ( (usrpref_username=pUsername) AND (usrpref_name=pPrefname) ); RETURN TRUE; END; $_$; 7DROP FUNCTION public.deleteuserpreference(text, text); publicadminfalse8399212551682254deletevendoraddress(integer)FUNCTIONaCREATE FUNCTION deletevendoraddress(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendaddrid ALIAS FOR $1; _test INTEGER; BEGIN -- Check to see if the passed vendor address is used in pohead SELECT pohead_id INTO _test FROM pohead WHERE (pohead_vendaddr_id=pVendaddrid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the passed vendor address DELETE FROM vendaddrinfo WHERE (vendaddr_id=pVendaddrid); RETURN 0; END; $_$; 3DROP FUNCTION public.deletevendoraddress(integer); publicadminfalse8399212551682255deletevendortype(integer)FUNCTIONTCREATE FUNCTION deletevendortype(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendtypeid ALIAS FOR $1; _test INTEGER; BEGIN -- Check to see if the passed vendor type is used in vendinfo SELECT vend_id INTO _test FROM vendinfo WHERE (vend_vendtype_id=pVendtypeid) LIMIT 1; IF (FOUND) THEN RETURN -1; END IF; -- Delete the passed vendor type DELETE FROM vendtype WHERE (vendtype_id=pVendtypeid); RETURN 0; END; $_$; 0DROP FUNCTION public.deletevendortype(integer); publicadminfalse83992x12551682256deletewo(integer, boolean)FUNCTIONZCREATE FUNCTION deletewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; deleteChildren ALIAS FOR $2; BEGIN RETURN deleteWo(pWoid, deleteChildren, FALSE); END; $_$; 1DROP FUNCTION public.deletewo(integer, boolean); publicadminfalse8399212551682257#deletewo(integer, boolean, boolean)FUNCTION CREATE FUNCTION deletewo(integer, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; deleteChildren ALIAS FOR $2; deleteForce ALIAS FOR $3; woStatus CHAR(1); itemType CHAR(1); ordtype CHAR(1); ordid INTEGER; returnCode INTEGER; _wotcCnt INTEGER; _routings BOOLEAN; BEGIN SELECT wo_status, wo_ordtype, wo_ordid, item_type INTO woStatus, ordtype, ordid, itemType FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN item ON (item_id=itemsite_item_id) WHERE (wo_id=pWoid); IF (NOT woStatus IN ('O', 'E', 'C')) THEN RETURN -3; END IF; IF (NOT deleteForce) THEN IF (itemType = 'J') THEN RETURN -2; END IF; END IF; SELECT fetchMetricBool('Routings') INTO _routings; IF _routings THEN SELECT count(*) INTO _wotcCnt FROM xtmfg.wotc WHERE (wotc_wo_id=pWoid); IF (_wotcCnt > 0) THEN RETURN -1; END IF; END IF; IF (woStatus = 'R') THEN INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'W', wo_id, itemsite_warehous_id, formatWoNumber(wo_id) FROM evntnot, evnttype, itemsite, item, wo WHERE ( (evntnot_evnttype_id=evnttype_id) AND (evntnot_warehous_id=itemsite_warehous_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (evnttype_name='RWoRequestCancel') AND (wo_id=pWoid) ); RETURN 0; ELSE IF (woStatus = 'E') THEN returnCode := (SELECT implodeWo(pWoid, FALSE)); END IF; END IF; IF (woStatus IN ('O', 'E', 'C')) THEN DELETE FROM womatl WHERE (womatl_wo_id=pWoid); IF _routings THEN DELETE FROM xtmfg.wooper WHERE (wooper_wo_id=pWoid); END IF; IF (ordtype = 'S') THEN UPDATE coitem SET coitem_order_type=NULL, coitem_order_id=NULL WHERE coitem_id=ordid; END IF; DELETE FROM wo WHERE (wo_id=pWoid); END IF; IF (deleteChildren) THEN returnCode := (SELECT MAX(deleteWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); END IF; RETURN 0; END; $_$; :DROP FUNCTION public.deletewo(integer, boolean, boolean); publicadminfalse8399212551682258deletewomaterial(integer)FUNCTION CREATE FUNCTION deletewomaterial(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; BEGIN UPDATE wo SET wo_adhoc=TRUE FROM womatl WHERE ((womatl_wo_id=wo_id) AND (womatl_id=pWomatlid)); -- Delete any created P/R for this Womatl PERFORM deletePr('W', pWomatlid); DELETE FROM womatl WHERE (womatl_id=pWomatlid); RETURN 0; END; $_$; 0DROP FUNCTION public.deletewomaterial(integer); publicadminfalse8399212551682259,detachccpayfromso(integer, integer, integer)FUNCTIONCREATE FUNCTION detachccpayfromso(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcoheadid ALIAS FOR $1; pwarehousid ALIAS FOR $2; pcustid ALIAS FOR $3; BEGIN RAISE NOTICE 'detachCCPayFromSO(INTEGER, INTEGER, INTEGER): deprecated'; RETURN 0; END; $_$; CDROP FUNCTION public.detachccpayfromso(integer, integer, integer); publicadminfalse8399212551682260detachcontact(integer, integer)FUNCTIONCREATE FUNCTION detachcontact(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcntctId ALIAS FOR $1; pcrmacctId ALIAS FOR $2; BEGIN UPDATE cntct SET cntct_crmacct_id = NULL WHERE cntct_id = pcntctId AND cntct_crmacct_id = pcrmacctId; UPDATE crmacct SET crmacct_cntct_id_1 = NULL WHERE crmacct_id = pcrmacctId AND crmacct_cntct_id_1 = pcntctId; UPDATE crmacct SET crmacct_cntct_id_2 = NULL WHERE crmacct_id = pcrmacctId AND crmacct_cntct_id_2 = pcntctId; RETURN 0; END; $_$; 6DROP FUNCTION public.detachcontact(integer, integer); publicadminfalse8399212551682261 detag(text)FUNCTIONpCREATE FUNCTION detag(text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; _result TEXT := ''; BEGIN SELECT regexp_replace(pSource, E'<[^>]*>', '', 'g') INTO _result; RETURN _result; END; $_$; "DROP FUNCTION public.detag(text); publicadminfalse8399212551682262detailednnqoh(integer, boolean)FUNCTION"CREATE FUNCTION detailednnqoh(integer, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pABS ALIAS FOR $2; _qoh NUMERIC; BEGIN IF (pABS) THEN SELECT SUM(noNeg(itemloc_qty)) INTO _qoh FROM itemloc, location WHERE ( (itemloc_location_id=location_id) AND (NOT location_netable) AND (itemloc_itemsite_id=pItemsiteid) ); ELSE SELECT SUM(itemloc_qty) INTO _qoh FROM itemloc, location WHERE ( (itemloc_location_id=location_id) AND (NOT location_netable) AND (itemloc_itemsite_id=pItemsiteid) ); END IF; IF (_qoh IS NULL) THEN _qoh := 0; END IF; RETURN _qoh; END; $_$; 6DROP FUNCTION public.detailednnqoh(integer, boolean); publicadminfalse8399212551682263detailedqoh(integer, boolean)FUNCTIONdCREATE FUNCTION detailedqoh(integer, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pABS ALIAS FOR $2; _qoh NUMERIC; BEGIN IF (pABS) THEN SELECT SUM(noNeg(itemloc_qty)) INTO _qoh FROM itemloc LEFT OUTER JOIN location ON (itemloc_location_id=location_id) WHERE ( ( (location_id IS NULL) OR (location_netable) ) AND (itemloc_itemsite_id=pItemsiteid) ); ELSE SELECT SUM(itemloc_qty) INTO _qoh FROM itemloc LEFT OUTER JOIN location ON (itemloc_location_id=location_id) WHERE ( ( (location_id IS NULL) OR (location_netable) ) AND (itemloc_itemsite_id=pItemsiteid) ); END IF; IF (_qoh IS NULL) THEN _qoh := 0; END IF; RETURN _qoh; END; $_$; 4DROP FUNCTION public.detailedqoh(integer, boolean); publicadminfalse3992812551682264$determinediscountdate(integer, date)FUNCTIONCREATE FUNCTION determinediscountdate(integer, date) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTermsid ALIAS FOR $1; pSourceDate ALIAS FOR $2; _discDate DATE; _p RECORD; BEGIN SELECT terms_type, terms_discdays, terms_cutoffday INTO _p FROM terms WHERE (terms_id=pTermsid); IF (NOT FOUND) THEN _discDate := pSourceDate; -- Handle type D terms ELSIF (_p.terms_type = 'D') THEN _discDate := (pSourceDate + _p.terms_discdays); -- Handle type P terms ELSIF (_p.terms_type = 'P') THEN IF (date_part('day', pSourceDate) <= _p.terms_cutoffday) THEN _discDate := (DATE(date_trunc('month', pSourceDate)) + (_p.terms_discdays - 1)); ELSE _discDate := (DATE(date_trunc('month', pSourceDate)) + (_p.terms_discdays - 1) + INTERVAL '1 month'); END IF; -- Handle unknown terms ELSE _discDate := pSourceDate; END IF; RETURN _discDate; END; $_$; ;DROP FUNCTION public.determinediscountdate(integer, date); publicadminfalse8399212551682265determineduedate(integer, date)FUNCTIONCREATE FUNCTION determineduedate(integer, date) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTermsid ALIAS FOR $1; pSourceDate ALIAS FOR $2; _dueDate DATE; _p RECORD; BEGIN SELECT terms_type, terms_duedays, terms_cutoffday INTO _p FROM terms WHERE (terms_id=pTermsid); IF (NOT FOUND) THEN _dueDate := pSourceDate; -- Handle type D terms ELSIF (_p.terms_type = 'D') THEN _dueDate := (pSourceDate + _p.terms_duedays); -- Handle type P terms ELSIF (_p.terms_type = 'P') THEN IF (date_part('day', pSourceDate) <= _p.terms_cutoffday) THEN _dueDate := (DATE(date_trunc('month', pSourceDate)) + (_p.terms_duedays - 1)); ELSE _dueDate := (DATE(date_trunc('month', pSourceDate)) + (_p.terms_duedays - 1) + INTERVAL '1 month'); END IF; -- Handle unknown terms ELSE _dueDate := pSourceDate; END IF; RETURN _dueDate; END; $_$; 6DROP FUNCTION public.determineduedate(integer, date); publicadminfalse8399212551682266digest(text, text)FUNCTIONyCREATE FUNCTION digest(text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_digest'; )DROP FUNCTION public.digest(text, text); publicadminfalse812551682267digest(bytea, text)FUNCTIONzCREATE FUNCTION digest(bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_digest'; *DROP FUNCTION public.digest(bytea, text); publicadminfalse812551682268disablepackage(text)FUNCTIONCREATE FUNCTION disablepackage(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgname ALIAS FOR $1; _i INTEGER := 0; _tabs TEXT[] := ARRAY['cmd', 'cmdarg', 'image', 'metasql', 'priv', 'report', 'script', 'uiform']; BEGIN IF (version() < 'PostgreSQL 8.2') THEN RETURN -1; END IF; FOR _i IN ARRAY_LOWER(_tabs,1)..ARRAY_UPPER(_tabs,1) LOOP EXECUTE 'ALTER TABLE ' || ppkgname || '.pkg' || _tabs[_i] || ' NO INHERIT public.' || _tabs[_i] || ';'; END LOOP; RETURN 0; END; $_$; +DROP FUNCTION public.disablepackage(text); publicadminfalse8399212551682269disablepackage(integer)FUNCTIONCREATE FUNCTION disablepackage(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgheadid ALIAS FOR $1; _pkgname TEXT; BEGIN SELECT pkghead_name INTO _pkgname FROM pkghead WHERE (pkghead_id=ppkgheadid); IF (NOT FOUND) THEN RETURN -2; END IF; RETURN disablePackage(_pkgname); END; $_$; .DROP FUNCTION public.disablepackage(integer); publicadminfalse8399212551682270 distributeitemlocseries(integer)FUNCTION CREATE FUNCTION distributeitemlocseries(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocSeries ALIAS FOR $1; _distCounter INTEGER; _itemlocdist RECORD; _itemlocid INTEGER; _invhistid INTEGER; _check BOOLEAN; _debug BOOLEAN := true; BEGIN IF (_debug) THEN RAISE NOTICE 'distributeItemlocSeries, series=%', pItemlocSeries; END IF; _distCounter := 0; -- March through all of the itemlocdists for pItemlocSeries FOR _itemlocdist IN SELECT itemlocdist_id AS itemlocdistid, itemlocdist_source_type AS type, itemlocdist_source_id AS sourceid, itemlocdist_qty AS qty, itemlocdist_itemsite_id AS itemsiteid, itemsite_freeze, itemlocdist_invhist_id AS invhistid, itemlocdist_ls_id AS lotserialid, itemlocdist_expiration AS expiration, itemlocdist_flush, itemlocdist_warranty AS warranty, itemlocdist_series AS series FROM itemlocdist, itemsite WHERE ( (itemlocdist_itemsite_id=itemsite_id) AND (itemlocdist_series=pItemlocSeries) ) ORDER BY itemlocdist_flush DESC LOOP _distCounter := _distCounter + 1; IF (_debug) THEN RAISE NOTICE 'itemlocdist loop %', _distCounter; RAISE NOTICE 'itemlocdistid=%', _itemlocdist.itemlocdistid; RAISE NOTICE 'type=%', _itemlocdist.type; RAISE NOTICE 'sourceid=%', _itemlocdist.sourceid; RAISE NOTICE 'qty=%', _itemlocdist.qty; RAISE NOTICE 'itemsiteid=%', _itemlocdist.itemsiteid; RAISE NOTICE 'freeze=%', _itemlocdist.itemsite_freeze; RAISE NOTICE 'invhistid=%', _itemlocdist.invhistid; RAISE NOTICE 'lotserialid=%', _itemlocdist.lotserialid; RAISE NOTICE 'expiration=%', _itemlocdist.expiration; RAISE NOTICE 'flush=%', _itemlocdist.itemlocdist_flush; RAISE NOTICE 'warranty=%', _itemlocdist.warranty; END IF; -- Commit invhist to itemsite IF (NOT _itemlocdist.itemsite_freeze) THEN PERFORM postInvHist(_itemlocdist.invhistid); END IF; -- Mark the invhist tuple for the itemlocdist in question as having detail UPDATE invhist SET invhist_hasdetail=TRUE WHERE ( (NOT invhist_hasdetail) AND (invhist_id=_itemlocdist.invhistid) ); -- If this itemlocdist is a flush, write a invdetail tuple that records the empty IF (_itemlocdist.itemlocdist_flush) THEN INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc ) SELECT _itemlocdist.invhistid, itemloc_location_id, itemloc_ls_id, (itemloc_qty * -1), itemloc_qty, 0, itemloc_expiration, _itemlocdist.warranty FROM itemloc WHERE ( (itemloc_qty <> 0) AND (itemloc_id=_itemlocdist.sourceid) ); -- Delete the flushed itemloc if its parent itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN DELETE FROM itemloc WHERE (itemloc_id=_itemlocdist.sourceid); END IF; ELSE -- If this is a location type distribution, check to see if the target itemloc -- already exists IF (_itemlocdist.type = 'L') THEN SELECT itemloc_id INTO _itemlocid FROM itemloc WHERE ( (itemloc_itemsite_id=_itemlocdist.itemsiteid) AND (itemloc_location_id=_itemlocdist.sourceid) AND (COALESCE(itemloc_ls_id,-1)=COALESCE(_itemlocdist.lotserialid,-1)) AND (COALESCE(itemloc_expiration,endOfTime())=COALESCE(_itemlocdist.expiration,endOfTime())) AND (COALESCE(itemloc_warrpurc,endoftime())=COALESCE(_itemlocdist.warranty,endoftime())) ); -- Nope, create it IF (NOT FOUND) THEN SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _itemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_qty, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc ) VALUES ( _itemlocid, _itemlocdist.itemsiteid, _itemlocdist.sourceid, 0, _itemlocdist.lotserialid, _itemlocdist.expiration, _itemlocdist.warranty ); END IF; ELSE _itemlocid = _itemlocdist.sourceid; IF (_itemlocid IS NOT NULL AND (SELECT count(itemloc_id) = 0 FROM itemloc WHERE itemloc_id=_itemlocid)) THEN RAISE EXCEPTION 'No record to distribute against. Someone else may have already distributed this record.'; END IF; END IF; -- Record the invdetail INSERT INTO invdetail (invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc) SELECT _itemlocdist.invhistid, itemloc_location_id, _itemlocdist.lotserialid, _itemlocdist.qty, itemloc_qty, (itemloc_qty + _itemlocdist.qty), itemloc_expiration,_itemlocdist.warranty FROM itemloc WHERE (itemloc_id=_itemlocid); -- Update the itemloc_qty if its parent itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN UPDATE itemloc SET itemloc_qty = (itemloc_qty + _itemlocdist.qty) WHERE (itemloc_id=_itemlocid); END IF; -- Adjust QOH if this itemlocdist is to/from a non-netable location IF ( SELECT (NOT location_netable) FROM itemloc, location WHERE ( (itemloc_location_id=location_id) AND (itemloc_id=_itemlocid) ) ) THEN -- Record the netable->non-netable (or visaveras) invhist SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT _invhistid, itemsite_id, 'NN', (_itemlocdist.qty * -1), itemsite_qtyonhand, (itemsite_qtyonhand - _itemlocdist.qty), invhist_docnumber, invhist_comments, uom_name, stdCost(item_id), itemsite_costmethod, itemsite_value, (itemsite_value + (_itemlocdist.qty * -1 * CASE WHEN(itemsite_costmethod='A') THEN avgcost(itemsite_id) ELSE stdCost(itemsite_item_id) END)), _itemlocdist.series FROM item, itemsite, invhist, uom WHERE ((itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=_itemlocdist.itemsiteid) AND (invhist_id=_itemlocdist.invhistid)); -- Adjust the parent itemsite IF (NOT _itemlocdist.itemsite_freeze) THEN UPDATE itemsite SET itemsite_qtyonhand = (itemsite_qtyonhand - _itemlocdist.qty), itemsite_nnqoh = (itemsite_nnqoh + _itemlocdist.qty) FROM itemloc WHERE ((itemloc_itemsite_id=itemsite_id) AND (itemloc_id=_itemlocid)); END IF; END IF; END IF; -- If, after the distribution, the target itemloc_qty = 0, delete the itemloc -- if its parent itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN DELETE FROM itemloc WHERE ( (itemloc_qty=0) AND (itemloc_id=_itemlocid) ); END IF; END LOOP; DELETE FROM itemlocdist WHERE (itemlocdist_series=pItemlocSeries); RETURN _distCounter; END; $_$; 7DROP FUNCTION public.distributeitemlocseries(integer); publicadminfalse8399212551682272distributetodefault(integer)FUNCTIONJCREATE FUNCTION distributetodefault(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; BEGIN RETURN distributeToDefault(pItemlocdistid, 'O'); END; $_$; 3DROP FUNCTION public.distributetodefault(integer); publicadminfalse8399212551682273"distributetodefault(integer, text)FUNCTIONR CREATE FUNCTION distributetodefault(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; pTranstype ALIAS FOR $2; _locationid INTEGER; _itemlocdistid INTEGER; _qty NUMERIC; BEGIN -- Make sure that the itemsite in question has a default location SELECT CASE WHEN (pTranstype='R') THEN itemsite_recvlocation_id WHEN (pTranstype='I') THEN itemsite_issuelocation_id ELSE itemsite_location_id END INTO _locationid FROM itemlocdist, itemsite WHERE ( (itemlocdist_itemsite_id=itemsite_id) AND (itemlocdist_id=pItemlocdistid) ); IF ( (NOT FOUND) OR (_locationid = -1) ) THEN RETURN -1; END IF; -- Determine the remaining qty required to distribute SELECT (p.itemlocdist_qty - COALESCE(SUM(c.itemlocdist_qty), 0)) INTO _qty FROM itemlocdist AS p LEFT OUTER JOIN itemlocdist AS c ON (c.itemlocdist_itemlocdist_id=p.itemlocdist_id) WHERE (p.itemlocdist_id=pItemlocdistid) GROUP BY p.itemlocdist_qty; IF (_qty = 0) THEN RETURN -2; END IF; -- Check to see if an itemlocdist with the correct location/lotserial/expiration already exists SELECT target.itemlocdist_id INTO _itemlocdistid FROM itemlocdist AS source, itemlocdist AS target, itemloc, itemsite WHERE ( (target.itemlocdist_source_type='L') AND (target.itemlocdist_source_id=_locationid) AND (target.itemlocdist_itemsite_id=source.itemlocdist_itemsite_id) AND (COALESCE(target.itemlocdist_ls_id)=COALESCE(source.itemlocdist_ls_id)) AND (target.itemlocdist_expiration=source.itemlocdist_expiration) AND (target.itemlocdist_itemlocdist_id=source.itemlocdist_itemlocdist_id) AND (target.itemlocdist_itemsite_id=itemsite_id) AND (source.itemlocdist_id=pItemlocdistid) ); IF (FOUND) THEN UPDATE itemlocdist SET itemlocdist_qty = (itemlocdist_qty + _qty) WHERE (itemlocdist_id=_itemlocdistid); RETURN _itemlocdistid; END IF; -- Create a new itemlocdist SELECT NEXTVAL('itemlocdist_itemlocdist_id_seq') INTO _itemlocdistid; INSERT INTO itemlocdist ( itemlocdist_id, itemlocdist_itemlocdist_id, itemlocdist_source_type, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_qty ) SELECT _itemlocdistid, pItemlocdistid, 'L', itemlocdist_ls_id, itemlocdist_expiration, _locationid, itemlocdist_itemsite_id, _qty FROM itemlocdist WHERE (itemlocdist_id=pItemlocdistid); RETURN _itemlocdistid; END; $_$; 9DROP FUNCTION public.distributetodefault(integer, text); publicadminfalse8399212551682274#distributetodefaultitemloc(integer)FUNCTIONXCREATE FUNCTION distributetodefaultitemloc(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; BEGIN RETURN distributeToDefaultItemLoc(pItemlocdistid, 'O'); END; $_$; :DROP FUNCTION public.distributetodefaultitemloc(integer); publicadminfalse8399212551682275)distributetodefaultitemloc(integer, text)FUNCTION CREATE FUNCTION distributetodefaultitemloc(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; pTranstype ALIAS FOR $2; _itemlocid INTEGER; _itemlocdistid INTEGER; _qty NUMERIC; BEGIN -- Make sure that the itemsite in question has a default location SELECT itemloc_id INTO _itemlocid FROM itemlocdist, itemsite, itemloc WHERE ((itemlocdist_itemsite_id=itemsite_id) AND ( (itemsite_location_id=itemloc_location_id AND pTranstype='O') OR (itemsite_recvlocation_id=itemloc_location_id AND pTranstype='R') OR (itemsite_issuelocation_id=itemloc_location_id AND pTranstype='I') ) AND (itemloc_itemsite_id=itemsite_id) AND (itemlocdist_id=pItemlocdistid)); IF ( (NOT FOUND) OR (_itemlocid = -1) ) THEN RETURN -1; END IF; -- Determine the remaining qty required to distribute SELECT (p.itemlocdist_qty - COALESCE(SUM(c.itemlocdist_qty), 0)) INTO _qty FROM itemlocdist AS p LEFT OUTER JOIN itemlocdist AS c ON (c.itemlocdist_itemlocdist_id=p.itemlocdist_id) WHERE (p.itemlocdist_id=pItemlocdistid) GROUP BY p.itemlocdist_qty; IF (_qty = 0) THEN RETURN -2; END IF; -- Check to see if an itemlocdist with the correct location/lotserial/expiration already exists SELECT target.itemlocdist_id INTO _itemlocdistid FROM itemlocdist AS source, itemlocdist AS target WHERE ( (target.itemlocdist_source_type='I') AND (target.itemlocdist_source_id=_itemlocid) AND (COALESCE(target.itemlocdist_ls_id,-1)=COALESCE(source.itemlocdist_ls_id,-1)) AND (target.itemlocdist_expiration=source.itemlocdist_expiration) AND (target.itemlocdist_itemlocdist_id=source.itemlocdist_id) AND (source.itemlocdist_id=pItemlocdistid) ); IF (FOUND) THEN UPDATE itemlocdist SET itemlocdist_qty = (itemlocdist_qty + _qty) WHERE (itemlocdist_id=_itemlocdistid); RETURN _itemlocdistid; END IF; -- Create a new itemlocdist SELECT NEXTVAL('itemlocdist_itemlocdist_id_seq') INTO _itemlocdistid; INSERT INTO itemlocdist ( itemlocdist_id, itemlocdist_itemlocdist_id, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_qty, itemlocdist_expiration ) VALUES ( _itemlocdistid, pItemlocdistid, 'I', _itemlocid, _qty, endOfTime() ); RETURN _itemlocdistid; END; $_$; @DROP FUNCTION public.distributetodefaultitemloc(integer, text); publicadminfalse8399212551682276distributetolocations(integer)FUNCTION$CREATE FUNCTION distributetolocations(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocdistid ALIAS FOR $1; _distCounter INTEGER; _itemlocdist RECORD; _itemlocid INTEGER; _runningQty NUMERIC; _tmp RECORD; BEGIN _distCounter := 0; _runningQty := 0; -- A scenario can occur where two people try to post distributions -- to the same itemsite against two or more lot/serial/mlc locations -- leading to a deadlock. This line tries to prevent that by locking -- ahead of time all the itemsites that the transaction will need -- before any of the other tables are locked individually. SELECT itemsite_id INTO _tmp FROM itemsite WHERE(itemsite_id in (SELECT DISTINCT itemlocdist_itemsite_id FROM itemlocdist WHERE(itemlocdist_id=pItemlocdistid))) FOR UPDATE; -- March through all of the itemlocdist owned by the passed parent itemlocdist FOR _itemlocdist IN SELECT c.itemlocdist_id AS itemlocdistid, c.itemlocdist_source_type AS type, c.itemlocdist_source_id AS sourceid, c.itemlocdist_qty AS qty, p.itemlocdist_itemsite_id AS itemsiteid, itemsite_freeze, p.itemlocdist_invhist_id AS invhistid, p.itemlocdist_ls_id AS lotserialid, p.itemlocdist_expiration AS expiration, p.itemlocdist_warranty AS warranty, p.itemlocdist_order_type AS ordertype, p.itemlocdist_order_id AS orderid, p.itemlocdist_series AS series FROM itemlocdist AS c, itemlocdist AS p, itemsite WHERE ( (c.itemlocdist_itemlocdist_id=p.itemlocdist_id) AND (p.itemlocdist_source_type='O') AND (p.itemlocdist_itemsite_id=itemsite_id) AND (p.itemlocdist_id=pItemlocdistid) ) LOOP _distCounter := _distCounter + 1; -- If the target for this itemlocdist is a location, check to see if the -- required itemloc already exists IF (_itemlocdist.type = 'L') THEN SELECT itemloc_id INTO _itemlocid FROM itemloc WHERE ( (itemloc_itemsite_id=_itemlocdist.itemsiteid) AND (itemloc_location_id=_itemlocdist.sourceid) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(_itemlocdist.lotserialid, -1)) AND (COALESCE(itemloc_expiration,endOfTime())=COALESCE(_itemlocdist.expiration,endOfTime())) AND (COALESCE(itemloc_warrpurc,endoftime())=COALESCE(_itemlocdist.warranty,endoftime())) ); -- Nope, make it IF (NOT FOUND) THEN SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _itemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_qty, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc ) VALUES ( _itemlocid, _itemlocdist.itemsiteid, _itemlocdist.sourceid, 0, _itemlocdist.lotserialid, _itemlocdist.expiration, _itemlocdist.warranty ); END IF; ELSE -- Yep, cache it _itemlocid = _itemlocdist.sourceid; IF (_itemlocid IS NOT NULL AND (SELECT count(itemloc_id) = 0 FROM itemloc WHERE itemloc_id=_itemlocid)) THEN RAISE EXCEPTION 'No record to distribute against. Someone else may have already distributed this record.'; END IF; END IF; -- Record the invdetail for this itemlocdist INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc ) SELECT _itemlocdist.invhistid, itemloc_location_id, itemloc_ls_id, _itemlocdist.qty, itemloc_qty, (itemloc_qty + _itemlocdist.qty), itemloc_expiration,_itemlocdist.warranty FROM itemloc WHERE (itemloc_id=_itemlocid); -- Update the parent invhist to indicate that it has invdetail records UPDATE invhist SET invhist_hasdetail=TRUE WHERE ((invhist_hasdetail=FALSE) AND (invhist_id=_itemlocdist.invhistid)); -- Update the itemloc_qty if its parent itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN UPDATE itemloc SET itemloc_qty = (itemloc_qty + _itemlocdist.qty) WHERE (itemloc_id=_itemlocid); PERFORM postInvHist(_itemlocdist.invhistid); -- Handle reservation data IF ( (SELECT fetchMetricBool('EnableSOReservationsByLocation')) AND (_itemlocdist.qty < 0) ) THEN -- If a shipment on a sales order, record reservation change before updating -- so it can be reversed later if necessary IF (_itemlocdist.ordertype = 'SO') THEN INSERT INTO shipitemlocrsrv SELECT nextval('shipitemlocrsrv_shipitemlocrsrv_id_seq'), shipitem_id, itemloc_itemsite_id, itemloc_location_id, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc, least(_itemlocdist.qty, itemlocrsrv_qty) FROM shipitem, itemloc JOIN itemlocrsrv ON (itemloc_id=itemlocrsrv_itemloc_id) WHERE ( (shipitem_invhist_id=_itemlocdist.invhistid) AND (itemloc_id=_itemlocid) AND (itemlocrsrv_source=_itemlocdist.ordertype) AND (itemlocrsrv_source_id=_itemlocdist.orderid) ); END IF; -- Update the itemloc reservation UPDATE itemlocrsrv SET itemlocrsrv_qty = (itemlocrsrv_qty + _itemlocdist.qty) WHERE ( (itemlocrsrv_itemloc_id=_itemlocid) AND (itemlocrsrv_source=_itemlocdist.ordertype) AND (itemlocrsrv_source_id=_itemlocdist.orderid) ); -- Delete reservation if fully distributed DELETE FROM itemlocrsrv WHERE ( (itemlocrsrv_itemloc_id=_itemlocid) AND (itemlocrsrv_source=_itemlocdist.ordertype) AND (itemlocrsrv_source_id=_itemlocdist.orderid) AND (itemlocrsrv_qty=0) ); END IF; END IF; -- Adjust QOH if this itemlocdist is to/from a non-netable location IF ( SELECT (NOT location_netable) FROM itemloc, location WHERE ((itemloc_location_id=location_id) AND (itemloc_id=_itemlocid)) ) THEN -- Record the invhist record for the netable->non-netable (or visaversa) INSERT INTO invhist ( invhist_itemsite_id, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT itemsite_id, 'NN', (_itemlocdist.qty * -1), itemsite_qtyonhand, (itemsite_qtyonhand - _itemlocdist.qty), invhist_docnumber, invhist_comments, uom_name, stdCost(item_id), itemsite_costmethod, itemsite_value, (itemsite_value + (_itemlocdist.qty * -1 * CASE WHEN(itemsite_costmethod='A') THEN avgcost(itemsite_id) ELSE stdCost(itemsite_item_id) END)), _itemlocdist.series FROM item, itemsite, invhist, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=_itemlocdist.itemsiteid) AND (invhist_id=_itemlocdist.invhistid) ); -- Update the itemsite_qoh IF (NOT _itemlocdist.itemsite_freeze) THEN UPDATE itemsite SET itemsite_qtyonhand = (itemsite_qtyonhand - _itemlocdist.qty), itemsite_nnqoh = (itemsite_nnqoh + _itemlocdist.qty) FROM itemloc WHERE ((itemloc_itemsite_id=itemsite_id) AND (itemloc_id=_itemlocid)); END IF; END IF; -- Cache the running qty. _runningQty := _runningQty + _itemlocdist.qty; -- Dene with the child itemlocdist, so delete it DELETE FROM itemlocdist WHERE (itemlocdist_id=_itemlocdist.itemlocdistid); -- If the target itemloc is now at qty=0, delete it if its parent -- itemsite is not frozen IF (NOT _itemlocdist.itemsite_freeze) THEN DELETE FROM itemloc WHERE ( (itemloc_qty=0) AND (itemloc_id=_itemlocid) ); END IF; END LOOP; -- If the running qty for the detailed distributions is the same as the -- total qty to distribute indicated by the parent itemlocdist, then the -- parent itemlocdist has been fully distributed and should be deleted. IF ( ( SELECT itemlocdist_qty FROM itemlocdist WHERE (itemlocdist_id=pItemlocdistid) ) = _runningQty) THEN DELETE FROM itemlocdist WHERE (itemlocdist_id=pItemlocdistid); ELSE -- There is still some more qty to distribute in the parent itemlocdist. -- Update the qty to distribute with the qty that has been distributed. UPDATE itemlocdist SET itemlocdist_qty = (itemlocdist_qty - _runningQty) WHERE (itemlocdist_id=pItemlocdistid); END IF; RETURN _distCounter; END; $_$; 5DROP FUNCTION public.distributetolocations(integer); publicadminfalse83992125516822780distributevoucherline(integer, integer, integer)FUNCTIONCREATE FUNCTION distributevoucherline(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoucherId ALIAS FOR $1; pPoitemId ALIAS FOR $2; pCurrId ALIAS FOR $3; _count INTEGER; _costelemId INTEGER; _close BOOLEAN; _r RECORD; _qtyOrdered NUMERIC; _voitemId INTEGER; _taxtypeid INTEGER; BEGIN -- Make sure the P/O and Voucher are same currency SELECT COALESCE(COUNT(*),0) INTO _count FROM poitem JOIN pohead ON (pohead_id=poitem_pohead_id) WHERE ((poitem_id=pPoitemid) AND (pohead_curr_id=pCurrId)); IF (_count = 0) THEN RETURN -3; END IF; -- Validate and get cost element SELECT COALESCE(COUNT(*),0) INTO _count FROM itemcost, item, itemsite, poitem WHERE ((itemcost_item_id=item_id) AND (item_id=itemsite_item_id) AND (itemsite_id=poitem_itemsite_id) AND (poitem_id=pPoitemId)); IF (_count > 1) THEN RETURN -5; ELSEIF (_count = 1) THEN SELECT itemcost_costelem_id INTO _costelemId FROM itemcost, item, itemsite, poitem WHERE ((itemcost_item_id=item_id) AND (item_id=itemsite_item_id) AND (itemsite_id=poitem_itemsite_id) AND (poitem_id=pPoitemId)); ELSE SELECT costelem_id INTO _costelemId FROM costelem WHERE (costelem_type='Material'); END IF; -- Clear previous distributions UPDATE recv SET recv_vohead_id=NULL, recv_voitem_id=NULL WHERE ((recv_vohead_id=pVoucherId) AND (recv_orderitem_id=pPoitemId) AND (recv_order_type='PO')); UPDATE poreject SET poreject_vohead_id=NULL, poreject_voitem_id=NULL WHERE ((poreject_vohead_id=pVoucherId) AND (poreject_poitem_id=pPoitemId)); DELETE FROM vodist WHERE ((vodist_poitem_id=pPoitemId) AND (vodist_vohead_id=pVoucherId)); DELETE FROM voitem WHERE ((voitem_poitem_id=pPoitemId) AND (voitem_vohead_id=pVoucherId)); -- Determine Line balances SELECT COALESCE(SUM(qty_received),0) AS qty_received, COALESCE(SUM(qty_rejected),0) AS qty_rejected, COALESCE(SUM(qty_vouchered),0) AS qty_vouchered, round(COALESCE(SUM(balance),0),2) AS balance, round(COALESCE(SUM(freight),0),2) AS freight INTO _r FROM ( SELECT recv_qty AS qty_received, 0 AS qty_rejected, 0 AS qty_vouchered, (recv_qty * COALESCE(recv_purchcost, poitem_unitprice)) AS balance, recv_freight AS freight FROM poitem JOIN recv ON ((recv_orderitem_id=poitem_id) AND (recv_order_type='PO')) WHERE ( (recv_vohead_id IS NULL) AND (NOT recv_invoiced) AND (recv_posted) AND (poitem_id=pPoitemId) ) UNION ALL SELECT 0 AS qty_received, (poreject_qty) AS qty_rejected, 0 AS qty_vouchered, (poreject_qty * -1 * COALESCE(recv_purchcost, poitem_unitprice)) AS balance, 0 AS freight FROM poitem JOIN poreject ON (poreject_poitem_id=poitem_id) LEFT OUTER JOIN recv ON (recv_id=poreject_recv_id) WHERE ( (poreject_posted) AND (poreject_vohead_id IS NULL) AND (NOT poreject_invoiced) AND (poitem_id=pPoitemId) ) UNION ALL SELECT 0 AS qty_received, 0 AS qty_rejected, voitem_qty AS qty_vouchered, 0 AS balance, 0 AS freight FROM voitem, poitem WHERE ( (voitem_poitem_id=pPoitemId) AND (poitem_id=voitem_poitem_id) ) ) AS data; SELECT poitem_qty_ordered INTO _qtyOrdered FROM poitem WHERE (poitem_id=pPoitemId); IF _r.balance < 0 THEN RETURN -4; ELSEIF ( ((_r.qty_received <> 0) OR (_r.qty_received <> 0)) AND (_r.qty_received - _r.qty_rejected = 0) ) THEN RETURN -2; ELSEIF ((_r.qty_received - _r.qty_rejected) = 0) THEN RETURN 0; END IF; -- Determine whether to close P/O item IF (_r.qty_received -_r.qty_rejected + _r.qty_vouchered) >= _qtyOrdered THEN _close:=True; ELSE _close:=False; END IF; -- Create distribution INSERT INTO vodist (vodist_poitem_id,vodist_vohead_id,vodist_costelem_id,vodist_amount,vodist_qty,vodist_expcat_id) VALUES (pPoitemId,pVoucherId,_costelemId,_r.balance,(_r.qty_received -_r.qty_rejected),-1); -- Create voucher item SELECT poitem_taxtype_id INTO _taxtypeid FROM poitem WHERE (poitem_id=pPoitemId); SELECT NEXTVAL('voitem_voitem_id_seq') INTO _voitemId; INSERT INTO voitem (voitem_id,voitem_vohead_id,voitem_poitem_id,voitem_close,voitem_qty,voitem_freight, voitem_taxtype_id) VALUES (_voitemId,pVoucherId,pPoitemId,_close,(_r.qty_received -_r.qty_rejected),_r.freight, _taxtypeid); -- Tag receipt records UPDATE recv SET recv_vohead_id=pVoucherId, recv_voitem_id=_voitemId WHERE ((recv_orderitem_id=pPoitemId) AND (recv_order_type='PO') AND (recv_vohead_id IS NULL)); UPDATE poreject SET poreject_vohead_id=pVoucherId,poreject_voitem_id=_voitemId WHERE ((poreject_poitem_id=pPoitemId) AND (NOT poreject_invoiced) AND (poreject_vohead_id IS NULL)); RETURN 1; END; $_$; GDROP FUNCTION public.distributevoucherline(integer, integer, integer); publicadminfalse8399212551682279ndopostcosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)FUNCTIONcCREATE FUNCTION dopostcosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMaterial ALIAS FOR $1; plowerMaterial ALIAS FOR $2; pdirectLabor ALIAS FOR $3; plowerDirectLabor ALIAS FOR $4; poverhead ALIAS FOR $5; plowerOverhead ALIAS FOR $6; pmachOverhead ALIAS FOR $7; plowerMachOverhead ALIAS FOR $8; pUser ALIAS FOR $9; plowerUser ALIAS FOR $10; prollUp ALIAS FOR $11; _item RECORD; _result INTEGER := 0; BEGIN PERFORM resetLowLevelCode(-1); FOR _item IN SELECT costUpdate_item_id FROM costUpdate ORDER BY costUpdate_lowlevel_code DESC LOOP PERFORM doPostCosts(_item.costUpdate_item_id, FALSE, pMaterial, plowerMaterial, pdirectLabor, plowerDirectLabor, poverhead, plowerOverhead, pmachOverhead, plowerMachOverhead, puser, plowerUser, prollUp); END LOOP; RETURN _result; END; $_$; DROP FUNCTION public.dopostcosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); publicadminfalse8399212551682280dopostcosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)FUNCTIONT CREATE FUNCTION dopostcosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pResetLowLevel ALIAS FOR $2; pMaterial ALIAS FOR $3; plowerMaterial ALIAS FOR $4; pdirectLabor ALIAS FOR $5; plowerDirectLabor ALIAS FOR $6; poverhead ALIAS FOR $7; plowerOverhead ALIAS FOR $8; pmachOverhead ALIAS FOR $9; plowerMachOverhead ALIAS FOR $10; pUser ALIAS FOR $11; plowerUser ALIAS FOR $12; prollUp ALIAS FOR $13; _itemcost RECORD; _result INTEGER; BEGIN IF (pResetLowLevel) THEN PERFORM resetLowLevelCode(pItemId); END IF; FOR _itemcost IN SELECT itemcost_id, costelem_sys, costelem_type, itemcost_lowlevel, costUpdate_lowlevel_code, costUpdate_item_type FROM itemcost, costelem, costUpdate WHERE itemcost_item_id = pItemId AND costUpdate_item_id = itemcost_item_id AND itemcost_costelem_id = costelem_id LOOP IF (NOT _itemcost.costelem_sys) THEN IF ( (pUser) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerUser) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; IF (_itemcost.costelem_type = 'Material') THEN IF ( (pMaterial) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerMaterial) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; IF (_itemcost.costelem_type = 'Direct Labor') THEN IF ( (pdirectLabor) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerDirectLabor) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; IF (_itemcost.costelem_type = 'Overhead') THEN IF ( (poverhead) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerOverhead) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; IF (_itemcost.costelem_type = 'Machine Overhead') THEN IF ( (pmachOverhead) AND ( NOT _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; IF ( (plowerMachOverhead) AND ( _itemcost.itemcost_lowlevel) ) THEN PERFORM postCost(_itemcost.itemcost_id); _result := _result + 1; END IF; END IF; END LOOP; IF (prollUp) THEN PERFORM rollUpStandardCost(pItemId); _result := _result + 1; END IF; RETURN _result; END; $_$; DROP FUNCTION public.dopostcosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); publicadminfalse8399212551682281^doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)FUNCTIONCREATE FUNCTION doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE plowerMaterial ALIAS FOR $1; pdirectLabor ALIAS FOR $2; plowerDirectLabor ALIAS FOR $3; poverhead ALIAS FOR $4; plowerOverhead ALIAS FOR $5; pmachOverhead ALIAS FOR $6; plowerMachOverhead ALIAS FOR $7; plowerUser ALIAS FOR $8; prollUp ALIAS FOR $9; BEGIN RETURN doUpdateCosts(plowerMaterial, pdirectLabor, plowerDirectLabor, poverhead, plowerOverhead, pmachOverhead, plowerMachOverhead, plowerUser, prollUp, TRUE); END; $_$; uDROP FUNCTION public.doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); publicadminfalse8399212551682282pdoupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)FUNCTIONXCREATE FUNCTION doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pResetLowLevel ALIAS FOR $2; plowerMaterial ALIAS FOR $3; pdirectLabor ALIAS FOR $4; plowerDirectLabor ALIAS FOR $5; poverhead ALIAS FOR $6; plowerOverhead ALIAS FOR $7; pmachOverhead ALIAS FOR $8; plowerMachOverhead ALIAS FOR $9; plowerUser ALIAS FOR $10; prollUp ALIAS FOR $11; BEGIN RETURN doUpdateCosts(pItemId, pResetLowLevel, plowerMaterial, pdirectLabor, plowerDirectLabor, poverhead, plowerOverhead, pmachOverhead, plowerMachOverhead, plowerUser, prollUp, TRUE); END; $_$; DROP FUNCTION public.doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); publicadminfalse8399212551682283gdoupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)FUNCTION3CREATE FUNCTION doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE plowerMaterial ALIAS FOR $1; pdirectLabor ALIAS FOR $2; plowerDirectLabor ALIAS FOR $3; poverhead ALIAS FOR $4; plowerOverhead ALIAS FOR $5; pmachOverhead ALIAS FOR $6; plowerMachOverhead ALIAS FOR $7; plowerUser ALIAS FOR $8; prollUp ALIAS FOR $9; pActual ALIAS FOR $10; _item RECORD; _bom RECORD; _result INTEGER := 0; BEGIN PERFORM resetLowLevelCode(-1); FOR _item IN SELECT costUpdate_item_id FROM costUpdate ORDER BY costUpdate_lowlevel_code DESC LOOP PERFORM doUpdateCosts(_item.costUpdate_item_id, false, plowerMaterial, pdirectLabor, plowerDirectLabor, poverhead, plowerOverhead, pmachOverhead, plowerMachOverhead, plowerUser, prollUp, pActual); END LOOP; RETURN _result; END; $_$; ~DROP FUNCTION public.doupdatecosts(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); publicadminfalse8399212551682284ydoupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)FUNCTION CREATE FUNCTION doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pResetLowLevel ALIAS FOR $2; plowerMaterial ALIAS FOR $3; pdirectLabor ALIAS FOR $4; plowerDirectLabor ALIAS FOR $5; poverhead ALIAS FOR $6; plowerOverhead ALIAS FOR $7; pmachOverhead ALIAS FOR $8; plowerMachOverhead ALIAS FOR $9; plowerUser ALIAS FOR $10; prollUp ALIAS FOR $11; pUpdateActual ALIAS FOR $12; _item RECORD; _bom RECORD; _result INTEGER := 0; _resultFromReset INTEGER; _counterNum INTEGER; _feedBackNum INTEGER; BEGIN IF (pResetLowLevel) THEN PERFORM resetLowLevelCode(pItemId); END IF; SELECT costUpdate_item_id AS item_id, costUpdate_item_type AS item_type INTO _item FROM costUpdate WHERE costUpdate_item_id = pItemId; IF ((plowerMaterial) AND ((_item.item_type <> 'P') AND (_item.item_type <> 'O'))) THEN PERFORM updateSorACost(_item.item_id, 'Material', TRUE, lowerCost(_item.item_id, 'Material', pUpdateActual), pUpdateActual); END IF; IF (pdirectLabor) THEN PERFORM updateSorACost(_item.item_id, 'Direct Labor', FALSE, xtmfg.directLaborCost(_item.item_id), pUpdateActual); END IF; IF (plowerDirectLabor) THEN PERFORM updateSorACost(_item.item_id, 'Direct Labor', TRUE, lowerCost(_item.item_id, 'Direct Labor', pUpdateActual), pUpdateActual); END IF; IF (poverhead) THEN PERFORM updateSorACost(_item.item_id, 'Overhead', FALSE, xtmfg.overheadCost(_item.item_id), pUpdateActual); END IF; IF (plowerOverhead) THEN PERFORM updateSorACost(_item.item_id, 'Overhead', TRUE, lowerCost(_item.item_id, 'Overhead', pUpdateActual), pUpdateActual); END IF; IF (pmachOverhead) THEN PERFORM updateSorACost(_item.item_id, 'Machine Overhead', FALSE, xtmfg.machineOverheadCost(_item.item_id), pUpdateActual); END IF; IF (plowerMachOverhead) THEN PERFORM updateSorACost(_item.item_id, 'Machine Overhead', TRUE, lowerCost(_item.item_id, 'Machine Overhead', pUpdateActual), pUpdateActual); END IF; IF (plowerUser) THEN PERFORM updateLowerUserCosts(_item.item_id, pUpdateActual); END IF; IF (prollUp) THEN PERFORM rollUpSorACost(_item.item_id, pUpdateActual); END IF; RETURN _result; END; $_$; DROP FUNCTION public.doupdatecosts(integer, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean); publicadminfalse8399212551682285dropifexists(text, text)FUNCTIONCREATE FUNCTION dropifexists(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN dropIfExists($1, $2, 'public'); END; $_$; /DROP FUNCTION public.dropifexists(text, text); publicadminfalse8399212551682286dropifexists(text, text, text)FUNCTIONCREATE FUNCTION dropifexists(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN dropIfExists($1, $2, $3, false); END; $_$; 5DROP FUNCTION public.dropifexists(text, text, text); publicadminfalse8399212551682287'dropifexists(text, text, text, boolean)FUNCTIONCREATE FUNCTION dropifexists(text, text, text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pType ALIAS FOR $1; pObject ALIAS FOR $2; pSchema ALIAS FOR $3; pCascade ALIAS FOR $4; _table TEXT; _query TEXT; BEGIN IF (UPPER(pType) = 'INDEX') THEN _query = 'DROP INDEX ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_object OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSEIF (UPPER(pType) = 'TABLE') THEN _query = 'DROP TABLE ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pObject)); IF (pCascade) THEN _query = _query || ' CASCADE'; END IF; BEGIN EXECUTE _query; EXCEPTION WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'VIEW') THEN _query = 'DROP VIEW ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pObject)); IF (pCascade) THEN _query = _query || ' CASCADE'; END IF; BEGIN EXECUTE _query; EXCEPTION WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'TRIGGER') THEN SELECT relname INTO _table FROM pg_trigger, pg_class WHERE ((tgrelid=pg_class.oid) AND (UPPER(tgname)=UPPER(pObject))); IF (NOT FOUND) THEN _table := '[no table]'; END IF; _query = 'DROP TRIGGER ' || quote_ident(LOWER(pObject)) || ' ON ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(_table)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_object THEN RETURN 0; WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'FUNCTION') THEN _query = 'DROP FUNCTION ' || (LOWER(pSchema)) || '.' || (LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_object OR undefined_function OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'CONSTRAINT') THEN IF( (SELECT count(*) FROM pg_constraint, pg_class, pg_namespace WHERE((conrelid=pg_class.oid) AND (connamespace=pg_namespace.oid) AND (conname=pObject) AND (nspname=pSchema)) ) > 1 ) THEN RAISE EXCEPTION 'dropIfExists called on constraint name that matches more than 1 constraint.'; END IF; SELECT relname INTO _table FROM pg_constraint, pg_class, pg_namespace WHERE ((conrelid=pg_class.oid) AND (connamespace=pg_namespace.oid) AND (conname=pObject) AND (nspname=pSchema)); IF (NOT FOUND) THEN RETURN 0; END IF; _query = 'ALTER TABLE ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(_table)) || ' DROP CONSTRAINT ' || quote_ident(LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'SCHEMA') THEN _query = 'DROP SCHEMA ' || quote_ident(LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSIF (UPPER(pType) = 'TYPE') THEN _query = 'DROP TYPE ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pObject)); IF (pCascade) THEN _query = _query || ' CASCADE'; END IF; BEGIN EXECUTE _query; EXCEPTION WHEN undefined_object OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSE RAISE EXCEPTION 'dropIfExists(%, %): unknown pType %', pType, pObject, pType; END IF; RETURN 1; END; $_$; >DROP FUNCTION public.dropifexists(text, text, text, boolean); publicadminfalse8399212551682288$dropifexists(text, text, text, text)FUNCTIONCREATE FUNCTION dropifexists(text, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pType ALIAS FOR $1; pObject ALIAS FOR $2; pSchema ALIAS FOR $3; pRelation ALIAS FOR $4; _table TEXT; _query TEXT; BEGIN IF (UPPER(pType) = 'CONSTRAINT') THEN SELECT relname INTO _table FROM pg_constraint, pg_class, pg_namespace WHERE ((conrelid=pg_class.oid) AND (connamespace=pg_namespace.oid) AND (conname=pObject) AND (relname=pRelation) AND (nspname=pSchema)); IF (NOT FOUND) THEN RETURN 0; END IF; _query = 'ALTER TABLE ' || quote_ident(LOWER(pSchema)) || '.' || quote_ident(LOWER(pRelation)) || ' DROP CONSTRAINT ' || quote_ident(LOWER(pObject)); BEGIN EXECUTE _query; EXCEPTION WHEN undefined_table OR invalid_schema_name THEN RETURN 0; WHEN OTHERS THEN RAISE EXCEPTION '% %', SQLSTATE, SQLERRM; END; ELSE RAISE EXCEPTION 'dropIfExists(%, %, %, %): pType % is not supported when relation is specified', pType, pObject, pSchema, pRelation, pType; END IF; RETURN 1; END; $_$; ;DROP FUNCTION public.dropifexists(text, text, text, text); publicadminfalse8399212551682289dropstdopntable()FUNCTIONCREATE FUNCTION dropstdopntable() RETURNS boolean LANGUAGE plpgsql AS $$ BEGIN IF((SELECT metric_value != 'Manufacturing' FROM metric WHERE metric_name = 'Application')) THEN PERFORM dropIfExists('TABLE', 'stdopn'); RETURN true; END IF; RETURN false; END; $$; (DROP FUNCTION public.dropstdopntable(); publicadminfalse8399212551682290editccnumber(text, text)FUNCTION CREATE FUNCTION editccnumber(text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardnum ALIAS FOR $1; pCcardtype ALIAS FOR $2; card_length INTEGER; card_valid boolean := false; starting_digits TEXT; _sum INTEGER := 0; _digit INTEGER := 0; _timesTwo BOOLEAN := false; BEGIN -- Check the card type IF (pCcardtype NOT IN ('M', 'V', 'A', 'D')) THEN -- Unknown Card Type RETURN -1; END IF; card_length := length(pCcardnum); -- Process Master Card Checking length -- Process Master Card Starting digits IF (pCcardtype = 'M') THEN IF (card_length != 16) THEN -- Bad Card Length Card Type RETURN -2; END IF; starting_digits := substr(pCcardnum, 1, 2); IF (starting_digits < '51' OR starting_digits > '55') THEN -- Bad Starting digits RETURN -6; END IF; END IF; -- Process Visa Card Checking length -- Process Visa Card Starting digits IF (pCcardtype = 'V') THEN IF (card_length != 13 AND card_length != 16) THEN -- Bad Card Length Card Type RETURN -3; END IF; starting_digits := substr(pCcardnum, 1, 1); IF (starting_digits != '4') THEN -- Bad Starting digits RETURN -7; END IF; END IF; -- Process American Express Card Checking length -- Process American Express Card Starting digits IF (pCcardtype = 'A') THEN IF (card_length != 15) THEN -- Bad Card Length Card Type RETURN -4; END IF; starting_digits := substr(pCcardnum, 1, 2); IF (starting_digits != '34' AND starting_digits != '37') THEN -- Bad Starting digits RETURN -8; END IF; END IF; -- Process Discover Card Checking length -- Process Discover Card Starting digits IF (pCcardtype = 'D') THEN IF (card_length != 16) THEN -- Bad Card Length Card Type RETURN -5; END IF; starting_digits := substr(pCcardnum, 1, 4); IF (starting_digits != '6011') THEN -- Bad Starting digits RETURN -9; END IF; END IF; -- Now comes the fun part of doing the "check" for the check sum -- perform a luhn checksum FOR i IN REVERSE card_length .. 1 LOOP _digit := int4(substr(pCcardnum, i, 1)); IF (_timesTwo) THEN _digit := _digit * 2; IF (_digit > 9) THEN _digit := _digit - 9; END IF; END IF; _sum := _sum + _digit; _timesTwo := NOT _timesTwo; END LOOP; IF (mod(_sum, 10) != 0) THEN RETURN -10; END IF; RETURN 0; -- No Error END; $_$; /DROP FUNCTION public.editccnumber(text, text); publicadminfalse8399212551682291enablepackage(text)FUNCTIONCREATE FUNCTION enablepackage(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgname ALIAS FOR $1; _i INTEGER := 0; _tabs TEXT[] := ARRAY['cmd', 'cmdarg', 'image', 'metasql', 'priv', 'report', 'script', 'uiform']; BEGIN IF (version() < 'PostgreSQL 8.2') THEN RETURN -1; END IF; FOR _i IN ARRAY_LOWER(_tabs,1)..ARRAY_UPPER(_tabs,1) LOOP EXECUTE 'ALTER TABLE ' || ppkgname || '.pkg' || _tabs[_i] || ' INHERIT public.' || _tabs[_i] || ';'; END LOOP; RETURN 0; END; $_$; *DROP FUNCTION public.enablepackage(text); publicadminfalse83992 12551682292enablepackage(integer)FUNCTIONCREATE FUNCTION enablepackage(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgheadid ALIAS FOR $1; _pkgname TEXT; BEGIN SELECT pkghead_name INTO _pkgname FROM pkghead WHERE (pkghead_id=ppkgheadid); IF (NOT FOUND) THEN RETURN -2; END IF; RETURN enablePackage(_pkgname); END; $_$; -DROP FUNCTION public.enablepackage(integer); publicadminfalse8399212551682293encrypt(bytea, bytea, text)FUNCTIONCREATE FUNCTION encrypt(bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_encrypt'; 2DROP FUNCTION public.encrypt(bytea, bytea, text); publicadminfalse812551682294%encrypt_iv(bytea, bytea, bytea, text)FUNCTIONCREATE FUNCTION encrypt_iv(bytea, bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_encrypt_iv'; <DROP FUNCTION public.encrypt_iv(bytea, bytea, bytea, text); publicadminfalse8 12551682295 endoftime()FUNCTIONCREATE FUNCTION endoftime() RETURNS date LANGUAGE sql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT DATE('2100-01-01') as result; $$; "DROP FUNCTION public.endoftime(); publicadminfalse8 12551682296"entercount(integer, numeric, text)FUNCTIONDCREATE FUNCTION entercount(integer, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcntid ALIAS FOR $1; pQty ALIAS FOR $2; pComments ALIAS FOR $3; BEGIN UPDATE invcnt SET invcnt_qoh_after = pQty, invcnt_comments = CASE WHEN ( (LENGTH(invcnt_comments) = 0) AND (LENGTH(pComments) > 0) ) THEN pComments WHEN (LENGTH(pComments) > 0) THEN (invcnt_comments || E'\n' || pComments) ELSE invcnt_comments END, invcnt_cntdate = CURRENT_TIMESTAMP, invcnt_cnt_username = getEffectiveXtUser() WHERE (invcnt_id=pInvcntid); RETURN 0; END; $_$; 9DROP FUNCTION public.entercount(integer, numeric, text); publicadminfalse8399212551682297 enterporeceipt(integer, numeric)FUNCTION+CREATE FUNCTION enterporeceipt(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterReceipt('PO', $1, $2, 0.0, '', NULL, NULL); END; $_$; 7DROP FUNCTION public.enterporeceipt(integer, numeric); publicadminfalse8399212551682298&enterporeceipt(integer, numeric, text)FUNCTION3CREATE FUNCTION enterporeceipt(integer, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterPoReceipt('PO', $1, $2, 0.0, $3, NULL, NULL); END; $_$; =DROP FUNCTION public.enterporeceipt(integer, numeric, text); publicadminfalse8399212551682299/enterporeceipt(integer, numeric, numeric, text)FUNCTION;CREATE FUNCTION enterporeceipt(integer, numeric, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterPoReceipt('PO', $1, $2, $3, $4, NULL, NULL); END; $_$; FDROP FUNCTION public.enterporeceipt(integer, numeric, numeric, text); publicadminfalse8399212551682300>enterporeceipt(integer, numeric, numeric, text, integer, date)FUNCTIONDCREATE FUNCTION enterporeceipt(integer, numeric, numeric, text, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterReceipt('PO', $1, $2, $3, $4, $5, $6); END; $_$; UDROP FUNCTION public.enterporeceipt(integer, numeric, numeric, text, integer, date); publicadminfalse8399212551682301(enterporeturn(integer, numeric, integer)FUNCTION#CREATE FUNCTION enterporeturn(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterPoReturn($1, $2, $3, NULL); END; $_$; ?DROP FUNCTION public.enterporeturn(integer, numeric, integer); publicadminfalse83992125516823021enterporeturn(integer, numeric, integer, integer)FUNCTIONCREATE FUNCTION enterporeturn(integer, numeric, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoitemid ALIAS FOR $1; pQty ALIAS FOR $2; pRjctcodeid ALIAS FOR $3; pRecvid ALIAS FOR $4; _porejectid INTEGER; BEGIN SELECT NEXTVAL('poreject_poreject_id_seq') INTO _porejectid; INSERT INTO poreject ( poreject_id, poreject_date, poreject_ponumber, poreject_poitem_id, poreject_trans_username, poreject_agent_username, poreject_itemsite_id, poreject_vend_id, poreject_vend_item_number, poreject_vend_item_descrip, poreject_vend_uom, poreject_qty, poreject_rjctcode_id, poreject_posted, poreject_invoiced, poreject_recv_id ) SELECT _porejectid, CURRENT_TIMESTAMP, pohead_number, poitem_id, getEffectiveXtUser(), pohead_agent_username, poitem_itemsite_id, pohead_vend_id, poitem_vend_item_number, poitem_vend_item_descrip, poitem_vend_uom, pQty, pRjctcodeid, FALSE, FALSE, pRecvid FROM poitem JOIN pohead ON (pohead_id=poitem_pohead_id) WHERE (poitem_id=pPoitemid); RETURN _porejectid; END; $_$; HDROP FUNCTION public.enterporeturn(integer, numeric, integer, integer); publicadminfalse8399212551682303Benterreceipt(text, integer, numeric, numeric, text, integer, date)FUNCTIONLCREATE FUNCTION enterreceipt(text, integer, numeric, numeric, text, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN enterReceipt($1, $2, $3, $4, $5, $6, $7, NULL); END; $_$; YDROP FUNCTION public.enterreceipt(text, integer, numeric, numeric, text, integer, date); publicadminfalse8399212551682304Kenterreceipt(text, integer, numeric, numeric, text, integer, date, numeric)FUNCTIONCREATE FUNCTION enterreceipt(text, integer, numeric, numeric, text, integer, date, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; pQty ALIAS FOR $3; pFreight ALIAS FOR $4; pNotes ALIAS FOR $5; pcurrid ALIAS FOR $6; -- NULL is handled by SELECT ... INTO _o precvdate ALIAS FOR $7; -- NULL is handled by INSERT INTO recv pRecvCost ALIAS FOR $8; _timestamp TIMESTAMP; _o RECORD; _recvid INTEGER; _warehouseid INTEGER; _recvcost NUMERIC; BEGIN IF(precvdate IS NULL OR precvdate = CURRENT_DATE) THEN _timestamp := CURRENT_TIMESTAMP; ELSE _timestamp := precvdate; END IF; SELECT NEXTVAL('recv_recv_id_seq') INTO _recvid; DELETE FROM recv WHERE ((NOT recv_posted) AND (recv_order_type=pordertype) AND (recv_orderitem_id=porderitemid) ); IF (pQty > 0) THEN IF (pordertype='PO') THEN SELECT pohead_number AS orderhead_number, poitem_id AS orderitem_id, pohead_agent_username AS orderhead_agent_username, CASE WHEN (poitem_itemsite_id = -1) THEN NULL ELSE poitem_itemsite_id END AS itemsite_id, vend_id, COALESCE(poitem_vend_item_number, '') AS vend_item_number, COALESCE(poitem_vend_item_descrip, '') AS vend_item_descrip, COALESCE(poitem_vend_uom, '') AS vend_uom, poitem_duedate AS duedate, poitem_unitprice AS orderitem_unitcost, pohead_curr_id AS orderitem_unitcost_curr_id, pohead_curr_id AS freight_curr_id, poitem_rlsd_duedate AS rlsd_duedate INTO _o FROM pohead JOIN poitem ON (pohead_id=poitem_pohead_id) JOIN vendinfo ON (pohead_vend_id=vend_id) WHERE (poitem_id=porderitemid); ELSIF (pordertype='RA') THEN SELECT rahead_number AS orderhead_number, raitem_id AS orderitem_id, ''::text AS orderhead_agent_username, raitem_itemsite_id AS itemsite_id, NULL::integer AS vend_id, ''::text AS vend_item_number, ''::text AS vend_item_descrip, ''::text AS vend_uom, raitem_scheddate AS duedate, raitem_unitprice AS orderitem_unitcost, rahead_curr_id AS orderitem_unitcost_curr_id, rahead_curr_id AS freight_curr_id, raitem_scheddate AS rlsd_duedate INTO _o FROM rahead JOIN raitem ON (rahead_id=raitem_rahead_id) WHERE (raitem_id=porderitemid); ELSIF (pordertype='TO') THEN SELECT tohead_number AS orderhead_number, toitem_id AS orderitem_id, tohead_agent_username AS orderhead_agent_username, itemsite_id, NULL::integer AS vend_id, ''::text AS vend_item_number, ''::text AS vend_item_descrip, ''::text AS vend_uom, toitem_duedate AS duedate, toitem_stdcost AS orderitem_unitcost, baseCurrId() AS orderitem_unitcost_curr_id, toitem_freight_curr_id AS freight_curr_id, toitem_duedate AS rlsd_duedate INTO _o FROM itemsite, tohead JOIN toitem ON (tohead_id=toitem_tohead_id) WHERE ((toitem_id=porderitemid) AND (tohead_dest_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id)); END IF; --Make sure user has site privileges IF ((FOUND) AND (_o.itemsite_id IS NOT NULL)) THEN SELECT warehous_id INTO _warehouseid FROM itemsite,site() WHERE ((itemsite_id=_o.itemsite_id) AND (warehous_id=itemsite_warehous_id)); IF (NOT FOUND) THEN RETURN 0; END IF; END IF; --Make sure we aren't trying to receive a Kit IF ((FOUND) AND (_o.itemsite_id IS NOT NULL)) THEN IF (SELECT (item_type='K') FROM itemsite, item WHERE ((itemsite_id=_o.itemsite_id) AND (item_id=itemsite_item_id))) THEN RETURN 0; END IF; END IF; IF (NOT FOUND) THEN RETURN -1; END IF; -- default to orderitem_unitcost if recv_purchcost is not specified IF(pRecvCost IS NULL) THEN _recvcost := _o.orderitem_unitcost; ELSE _recvcost := pRecvCost; END IF; INSERT INTO recv ( recv_id, recv_date, recv_order_number, recv_order_type, recv_orderitem_id, recv_trans_usr_name, recv_agent_username, recv_itemsite_id, recv_vend_id, recv_vend_item_number, recv_vend_item_descrip, recv_vend_uom, recv_qty, recv_duedate, recv_purchcost, recv_purchcost_curr_id, recv_notes, recv_freight, recv_freight_curr_id, recv_rlsd_duedate ) VALUES ( _recvid, _timestamp, _o.orderhead_number, pordertype, _o.orderitem_id::INTEGER, getEffectiveXtUser(), _o.orderhead_agent_username, _o.itemsite_id::INTEGER, _o.vend_id::INTEGER, _o.vend_item_number, _o.vend_item_descrip, _o.vend_uom, pQty, _o.duedate, _recvcost, _o.orderitem_unitcost_curr_id::INTEGER, pNotes, pFreight, _o.freight_curr_id::INTEGER, _o.rlsd_duedate); END IF; RETURN _recvid; END; $_$; bDROP FUNCTION public.enterreceipt(text, integer, numeric, numeric, text, integer, date, numeric); publicadminfalse8399212551682305 expirecreditcard(integer, bytea)FUNCTIONiCREATE FUNCTION expirecreditcard(integer, bytea) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCust ALIAS FOR $1; pKey ALIAS FOR $2; num_updated INTEGER; cc_year INTEGER; cc_month INTEGER; cc_year_t TEXT; cc_month_t TEXT; _dr RECORD; _cc RECORD; bf TEXT; BEGIN num_updated := 0; bf := 'bf'; select cast(date_part('year', CURRENT_DATE) AS INTEGER) AS check_year, cast(date_part('month', CURRENT_DATE) AS INTEGER) AS check_month INTO _dr; FOR _cc IN SELECT ccard_id, decrypt(setbytea(ccard_month_expired), setbytea(pKey), 'bf') AS ccard_month_expired, decrypt(setbytea(ccard_year_expired), setbytea(pKey), 'bf') AS ccard_year_expired FROM ccard WHERE ( (ccard_cust_id=pCust) AND (ccard_active) ) LOOP SELECT formatbytea(_cc.ccard_month_expired) INTO cc_month_t; SELECT formatbytea(_cc.ccard_year_expired) INTO cc_year_t; SELECT cast(cc_month_t AS INTEGER) INTO cc_month; SELECT cast(cc_year_t AS INTEGER) INTO cc_year; IF (cc_year < _dr.check_year) THEN -- We have an expired card UPDATE ccard set ccard_active = FALSE where ccard_id = _cc.ccard_id; num_updated := num_updated + 1; ELSIF (cc_year = _dr.check_year AND cc_month < _dr.check_month) THEN -- We have an expired card UPDATE ccard set ccard_active = FALSE where ccard_id = _cc.ccard_id; num_updated := num_updated + 1; END IF; END LOOP; RETURN num_updated; END; $_$; 7DROP FUNCTION public.expirecreditcard(integer, bytea); publicadminfalse8399212551682306%explodebom(integer, integer, integer)FUNCTIONCREATE FUNCTION explodebom(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pParentid ALIAS FOR $2; pLevel ALIAS FOR $3; _revid INTEGER; BEGIN SELECT getActiveRevId('BOM',pItemid) INTO _revid; RETURN explodeBOM(pItemid, _revid, pParentid, pLevel); END; $_$; <DROP FUNCTION public.explodebom(integer, integer, integer); publicadminfalse8399212551682307.explodebom(integer, integer, integer, integer)FUNCTION CREATE FUNCTION explodebom(integer, integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; pParentid ALIAS FOR $3; pLevel ALIAS FOR $4; _bomworkid INTEGER; _level INTEGER; _p RECORD; _r RECORD; _temp TEXT; BEGIN _level := (pLevel + 1); -- Cache some parameters about the parent SELECT bomwork_item_id, bomwork_set_id, bomwork_qtyreq, bomwork_seqnumber, bomwork_effective, bomwork_expires INTO _p FROM bomwork WHERE (bomwork_id=pParentid); -- Step through all of the components of the parent component FOR _r IN SELECT bomitem.*, item_id, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, CASE WHEN (_p.bomwork_effective > bomitem_effective) THEN _p.bomwork_effective ELSE bomitem_effective END AS effective, CASE WHEN (_p.bomwork_expires < bomitem_expires) THEN _p.bomwork_expires ELSE bomitem_expires END AS expires, stdcost(item_id, bomitem_id) AS standardcost, actcost(item_id, bomitem_id) AS actualcost FROM bomitem(pItemid, pRevisionid), item WHERE ( (bomitem_item_id=item_id) AND (bomitem_expires > _p.bomwork_effective) ) LOOP -- Insert the current component and some bomitem parameters into the bomwork set SELECT NEXTVAL('bomwork_bomwork_id_seq') INTO _bomworkid; INSERT INTO bomwork ( bomwork_id, bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_parent_seqnumber, bomwork_seqnumber, bomwork_item_id, bomwork_createwo, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_stdunitcost, bomwork_actunitcost, bomwork_notes, bomwork_ref, bomwork_bomitem_id, bomwork_ecn ) VALUES ( _bomworkid, _p.bomwork_set_id, pParentid, _level, _p.bomwork_seqnumber, _r.bomitem_seqnumber, _r.item_id, _r.bomitem_createwo, (_p.bomwork_qtyreq * _r.qtyper + _r.qtyfxd), _r.qtyfxd, _r.qtyper, _r.bomitem_scrap, _r.bomitem_issuemethod, _r.effective, _r.expires, _r.standardcost, _r.actualcost, _r.bomitem_notes, _r.bomitem_ref, _r.bomitem_id, _r.bomitem_ecn ); -- Recursively repeat for this component's components PERFORM explodeBOM(_r.item_id, _bomworkid, _level); END LOOP; RETURN 1; END; $_$; EDROP FUNCTION public.explodebom(integer, integer, integer, integer); publicadminfalse83992125516823087explodekit(integer, integer, integer, integer, numeric)FUNCTIONCREATE FUNCTION explodekit(integer, integer, integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pLinenumber ALIAS FOR $2; pSubnumber ALIAS FOR $3; pItemsiteid ALIAS FOR $4; pQty ALIAS FOR $5; BEGIN RETURN explodeKit(pSoheadid, pLinenumber, pSubnumber, pItemsiteid, pQty, CURRENT_DATE, NULL); END; $_$; NDROP FUNCTION public.explodekit(integer, integer, integer, integer, numeric); publicadminfalse8399212551682309Cexplodekit(integer, integer, integer, integer, numeric, date, date)FUNCTION7CREATE FUNCTION explodekit(integer, integer, integer, integer, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pLinenumber ALIAS FOR $2; pSubnumber ALIAS FOR $3; pItemsiteid ALIAS FOR $4; pQty ALIAS FOR $5; pScheddate ALIAS FOR $6; pPromdate ALIAS FOR $7; BEGIN RETURN explodeKit(pSoheadid, pLinenumber, pSubnumber, pItemsiteid, pQty, CURRENT_DATE, NULL, ''); END; $_$; ZDROP FUNCTION public.explodekit(integer, integer, integer, integer, numeric, date, date); publicadminfalse8399212551682310Iexplodekit(integer, integer, integer, integer, numeric, date, date, text)FUNCTIONCREATE FUNCTION explodekit(integer, integer, integer, integer, numeric, date, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; pLinenumber ALIAS FOR $2; pSubnumber ALIAS FOR $3; pItemsiteid ALIAS FOR $4; pQty ALIAS FOR $5; pScheddate ALIAS FOR $6; pPromdate ALIAS FOR $7; pMemo ALIAS FOR $8; _subnumber INTEGER := COALESCE(pSubnumber,0); _revid INTEGER; _itemid INTEGER; _warehousid INTEGER; _item RECORD; _type TEXT; _coitemid INTEGER; _count INTEGER; _orderid INTEGER := 0; _itemsrcid INTEGER; BEGIN SELECT getActiveRevId('BOM',itemsite_item_id), itemsite_warehous_id, itemsite_item_id INTO _revid, _warehousid, _itemid FROM itemsite WHERE(itemsite_id=pItemsiteid); IF(NOT FOUND) THEN RAISE EXCEPTION 'No Item Site for the specified line was found.'; END IF; FOR _item IN SELECT bomitem_id, itemsite_id, itemsite_warehous_id, COALESCE((itemsite_active AND item_active), false) AS active, COALESCE((itemsite_sold AND item_sold), false) AS sold, item_id, item_type, item_price_uom_id, itemsite_createsopr,itemsite_createwo,itemsite_createsopo, itemsite_dropship, bomitem_uom_id, itemuomtouomratio(item_id, bomitem_uom_id, item_inv_uom_id) AS invuomratio, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id),(bomitem_qtyfxd + bomitem_qtyper * pQty) * (1 + bomitem_scrap)) AS qty FROM bomitem JOIN item ON (item_id=bomitem_item_id) LEFT OUTER JOIN itemsite ON ((itemsite_item_id=item_id) AND (itemsite_warehous_id=_warehousid)) WHERE((bomitem_parent_item_id=_itemid) AND (bomitem_rev_id=_revid) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1))) ORDER BY bomitem_seqnumber LOOP IF (NOT _item.active) THEN RAISE EXCEPTION 'One or more of the components for the kit is inactive for the selected item site.'; ELSIF (NOT _item.sold) THEN RAISE EXCEPTION 'One or more of the components for the kit is not sold for the selected item site.'; ELSIF (_item.item_type='F') THEN SELECT explodeKit(pSoheadid, pLinenumber, _subnumber, _item.itemsite_id, _item.qty) INTO _subnumber; ELSE IF (_item.itemsite_createsopr) THEN _type := 'R'; ELSIF (_item.itemsite_createsopo) THEN _type := 'P'; ELSIF (_item.itemsite_createwo) THEN _type := 'W'; ELSE _type := NULL; END IF; _subnumber := _subnumber + 1; _coitemid = nextval('coitem_coitem_id_seq'); raise notice 'coitem id: %',_coitemid; INSERT INTO coitem (coitem_id, coitem_cohead_id, coitem_linenumber, coitem_subnumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_qtyshipped, coitem_qtyreturned, coitem_unitcost, coitem_custprice, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_order_type, coitem_order_id, coitem_custpn, coitem_memo, coitem_prcost) VALUES (_coitemid, pSoheadid, pLinenumber, _subnumber, _item.itemsite_id, 'O', pScheddate, pPromdate, _item.qty, _item.bomitem_uom_id, _item.invuomratio, 0, 0, stdCost(_item.item_id), 0, 0, _item.item_price_uom_id, 1, _type, -1, '', pMemo, 0); IF (_item.itemsite_createsopr) THEN SELECT createPR(cohead_number::INTEGER, 'S', _coitemid) INTO _orderid FROM cohead WHERE (cohead_id=pSoheadid); IF (_orderid > 0) THEN UPDATE coitem SET coitem_order_id=_orderid WHERE (coitem_id=_coitemid); ELSE RAISE EXCEPTION 'Could not explode kit. CreatePR failed, result=%', _orderid; END IF; END IF; IF (_item.itemsite_createsopo) THEN SELECT itemsrc_id INTO _itemsrcid FROM itemsrc WHERE ((itemsrc_item_id=_item.item_id) AND (itemsrc_default)); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count > 0) THEN PERFORM createPurchaseToSale(_coitemid, _itemsrcid, _item.itemsite_dropship); ELSE RAISE WARNING 'One or more Kit items are flagged as purchase-to-order for this site, but no default item source is defined.'; END IF; END IF; END IF; END LOOP; RETURN _subnumber; END; $_$; `DROP FUNCTION public.explodekit(integer, integer, integer, integer, numeric, date, date, text); publicadminfalse8399212551682312.explodephantomorder(integer, integer, numeric)FUNCTIONcCREATE FUNCTION explodephantomorder(integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPlanordid ALIAS FOR $1; pPhantomid ALIAS FOR $2; pQty ALIAS FOR $3; _b RECORD; BEGIN FOR _b IN SELECT planord_number, c.itemsite_id AS componentsiteid, calculatenextworkingdate(c.itemsite_warehous_id, planord_startdate, (c.itemsite_leadtime * -1)) AS startdate, planord_startdate AS duedate, bomitem_createwo, c.itemsite_planning_type AS planningtype, (itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd + pQty * bomitem_qtyper) * (1 + bomitem_scrap))) AS qtyreq, item_type FROM bomitem, planord, itemsite AS p, itemsite AS c, item WHERE ((bomitem_parent_item_id=p.itemsite_item_id) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) AND (bomitem_item_id=c.itemsite_item_id) AND (p.itemsite_warehous_id=c.itemsite_warehous_id) AND (c.itemsite_item_id=item_id) AND (woEffectiveDate(planord_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (p.itemsite_id=pPhantomid) AND (planord_id=pPlanordid)) LOOP IF (_b.item_type = 'F') THEN PERFORM explodePhantomOrder(pPlanordid, _b.componentsiteid, _b.qtyreq); ELSE -- Create the Planned Requirement INSERT INTO planreq ( planreq_source, planreq_source_id, planreq_itemsite_id, planreq_qty ) VALUES ( 'P', pPlanordid, _b.componentsiteid, _b.qtyreq ); IF (_b.bomitem_createwo AND _b.planningtype != 'N') THEN PERFORM createPlannedOrder( pPlanordid, _b.planord_number, _b.componentsiteid, _b.qtyreq, _b.startdate, _b.duedate, FALSE, FALSE, NULL, NULL); END IF; END IF; END LOOP; RETURN pPlanordid; END; $_$; EDROP FUNCTION public.explodephantomorder(integer, integer, numeric); publicadminfalse8399212551682313explodewo(integer, boolean)FUNCTION01CREATE FUNCTION explodewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pExplodeChildren ALIAS FOR $2; resultCode INTEGER; newWo RECORD; _newwoid INTEGER; _p RECORD; _r RECORD; _bbom BOOLEAN; BEGIN -- Find out if Breeder BOMs are enabled SELECT metric_value='t' INTO _bbom FROM metric WHERE (metric_name='BBOM'); -- Make sure that this W/O is Open SELECT wo_id INTO resultCode FROM wo WHERE ((wo_status='O') AND (wo_id=pWoid)); IF (NOT FOUND) THEN RETURN -4; END IF; -- Make sure that all Component Item Sites exist and are valid -- Item Sites must be active and not Job Costed SELECT bomitem_id INTO resultCode FROM wo, bomitem, itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=bomitem_parent_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (wo_id=pWoid) AND (bomitem_rev_id=wo_bom_rev_id) AND (bomitem_item_id NOT IN ( SELECT component.itemsite_item_id FROM itemsite AS component, itemsite AS parent WHERE ( (wo_itemsite_id=parent.itemsite_id) AND (parent.itemsite_item_id=bomitem_parent_item_id) AND (bomitem_item_id=component.itemsite_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (component.itemsite_active) AND (component.itemsite_warehous_id=parent.itemsite_warehous_id) ) ) ) ) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; -- If the Parent Item is a Breeder, make sure that all the -- Co-Product/By-Product Item Sites exist IF (_bbom) THEN IF ( ( SELECT (item_type='B') FROM wo, itemsite, item WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (wo_id=pWoid) ) ) ) THEN SELECT bbomitem_id INTO resultCode FROM wo, xtmfg.bbomitem, itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=bbomitem_parent_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bbomitem_effective AND (bbomitem_expires - 1)) AND (wo_id=pWoid) AND (bbomitem_item_id NOT IN ( SELECT component.itemsite_item_id FROM itemsite AS component, itemsite AS parent WHERE ( (wo_itemsite_id=parent.itemsite_id) AND (parent.itemsite_item_id=bbomitem_parent_item_id) AND (bbomitem_item_id=component.itemsite_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bbomitem_effective AND (bbomitem_expires - 1)) AND (component.itemsite_active) AND (component.itemsite_warehous_id=parent.itemsite_warehous_id) ) ) ) ) LIMIT 1; IF (FOUND) THEN RETURN -3; END IF; END IF; END IF; -- Create the W/O Material Requirements INSERT INTO womatl ( womatl_wo_id, womatl_bomitem_id, womatl_wooper_id, womatl_schedatwooper, womatl_itemsite_id, womatl_duedate, womatl_uom_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_createwo, womatl_issuewo, womatl_issuemethod, womatl_notes, womatl_ref ) SELECT wo_id, bomitem_id, bomitem_booitem_seq_id, bomitem_schedatwooper, cs.itemsite_id, CASE WHEN bomitem_schedatwooper THEN COALESCE(calcWooperStartStub(wo_id,bomitem_booitem_seq_id), wo_startdate) ELSE wo_startdate END, bomitem_uom_id, bomitem_qtyfxd, bomitem_qtyper, bomitem_scrap, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id), (bomitem_qtyfxd + bomitem_qtyper * wo_qtyord) * (1 + bomitem_scrap)), 0, 0, startOfTime(), startOfTime(), 0, item_picklist, ( (item_type='M') AND (bomitem_createwo) ), CASE WHEN ( (item_type='M') AND (bomitem_issuewo) ) THEN TRUE WHEN (cs.itemsite_costmethod='J') THEN TRUE ELSE FALSE END, bomitem_issuemethod, bomitem_notes, bomitem_ref FROM bomitem, wo, itemsite AS ps, itemsite AS cs, item WHERE ( (wo_itemsite_id=ps.itemsite_id) AND (bomitem_parent_item_id=ps.itemsite_item_id) AND (bomitem_item_id=cs.itemsite_item_id) AND (bomitem_rev_id=wo_bom_rev_id) AND (ps.itemsite_warehous_id=cs.itemsite_warehous_id) AND (cs.itemsite_item_id=item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (wo_id=pWoid) AND ((bomitem_char_id IS NULL) OR EXISTS ( SELECT charass_id FROM coitem,charass WHERE ((charass_target_type='SI') AND (charass_target_id=coitem_id) AND (charass_char_id=bomitem_char_id) AND (charass_value=bomitem_value) AND (wo_ordtype='S') AND (coitem_id=wo_ordid)))) ); -- Update any created P/R's the have the project id as the parent WO. UPDATE pr SET pr_prj_id=wo_prj_id FROM womatl, wo WHERE ((wo_id=pWoid) AND (womatl_wo_id=wo_id) AND (pr_order_type='W') AND (pr_order_id=womatl_id)); -- If the parent Item is a Breeder, create the brddist -- records for the Co-Products and By-Products IF (_bbom) THEN INSERT INTO xtmfg.brddist ( brddist_wo_id, brddist_wo_qty, brddist_itemsite_id, brddist_stdqtyper, brddist_qty, brddist_posted ) SELECT wo_id, 0, cs.itemsite_id, bbomitem_qtyper, 0, FALSE FROM wo, xtmfg.bbomitem, itemsite AS ps, itemsite AS cs, item WHERE ( (bbomitem_parent_item_id=ps.itemsite_item_id) AND (wo_itemsite_id=ps.itemsite_id) AND (ps.itemsite_item_id=item_id) AND (item_type='B') AND (bbomitem_item_id=cs.itemsite_item_id) AND (cs.itemsite_warehous_id=ps.itemsite_warehous_id) AND (wo_id=pWoid) ); END IF; -- Insert the W/O Operations if routings enabled IF ( ( SELECT (metric_value='t') FROM metric WHERE (metric_name='Routings') ) ) THEN INSERT INTO xtmfg.wooper ( wooper_wo_id, wooper_booitem_id, wooper_seqnumber, wooper_wrkcnt_id, wooper_stdopn_id, wooper_descrip1, wooper_descrip2, wooper_toolref, wooper_sutime, wooper_sucosttype, wooper_surpt, wooper_rntime, wooper_rncosttype, wooper_rnrpt, wooper_rnqtyper, wooper_produom, wooper_invproduomratio, wooper_issuecomp, wooper_rcvinv, wooper_suconsumed, wooper_sucomplete, wooper_rnconsumed, wooper_rncomplete, wooper_qtyrcv, wooper_instruc, wooper_scheduled, wooper_wip_location_id ) SELECT wo_id, booitem_id, booitem_seqnumber, booitem_wrkcnt_id, booitem_stdopn_id, booitem_descrip1, booitem_descrip2, booitem_toolref, CASE WHEN (booitem_surpt) THEN booitem_sutime ELSE 0 END, booitem_sucosttype, booitem_surpt, CASE WHEN ((booitem_rnqtyper = 0) OR (booitem_invproduomratio = 0)) THEN 0 WHEN (NOT booitem_rnrpt) THEN 0 ELSE ( ( booitem_rntime / booitem_rnqtyper / booitem_invproduomratio ) * wo_qtyord ) END, booitem_rncosttype, booitem_rnrpt, CASE WHEN (booitem_rnqtyper = 0) THEN 0 WHEN (NOT booitem_rnrpt) THEN 0 ELSE (booitem_rntime / booitem_rnqtyper) END, booitem_produom, booitem_invproduomratio, booitem_issuecomp, booitem_rcvinv, 0::NUMERIC, FALSE, 0::NUMERIC, FALSE, 0::NUMERIC, booitem_instruc, calculatenextworkingdate(itemsite_warehous_id,wo_startdate,booitem_execday-1), booitem_wip_location_id FROM xtmfg.booitem, wo, itemsite WHERE ((wo_itemsite_id=itemsite_id) AND (itemsite_item_id=booitem_item_id) AND (booitem_rev_id=wo_boo_rev_id) AND (woEffectiveDate(wo_startdate) BETWEEN booitem_effective AND (booitem_expires - 1)) AND (wo_id=pWoid)); -- Update womatls item to link to wooper items when the respective -- bomitem record indicates a booitem issue link. UPDATE womatl SET womatl_wooper_id=wooper_id FROM wo,xtmfg.wooper,xtmfg.booitem WHERE ((womatl_wooper_id=booitem_seq_id) AND (wooper_booitem_id=booitem_id) AND (womatl_wo_id=wo_id) AND (wooper_wo_id=wo_id) AND (wo_boo_rev_id=booitem_rev_id) AND (wo_id=pWoid)); END IF; -- Handle all of the Phantom material requirements WHILE ( ( SELECT COUNT(*) FROM womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_wo_id=pWoid) AND (item_type='F') ) ) > 0 ) LOOP FOR _p IN SELECT wo_qtyord, wo_startdate, womatl_id, womatl_wooper_id FROM wo, womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_type='F') AND (womatl_wo_id=wo_id) AND (wo_id=pWoid) ) LOOP INSERT INTO womatl ( womatl_wo_id, womatl_itemsite_id, womatl_wooper_id, womatl_schedatwooper, womatl_duedate, womatl_uom_id, womatl_qtyfxd, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_createwo, womatl_issuewo, womatl_issuemethod, womatl_notes, womatl_ref ) SELECT pWoid, cs.itemsite_id, _p.womatl_wooper_id, womatl_schedatwooper, womatl_duedate, bomitem_uom_id, bomitem_qtyfxd, (bomitem_qtyper * womatl_qtyper), bomitem_scrap, roundQty(itemuomfractionalbyuom(bomitem_item_id, bomitem_uom_id), (bomitem_qtyfxd + _p.wo_qtyord * bomitem_qtyper * womatl_qtyper) * (1 + bomitem_scrap)), 0, 0, startOfTime(), startOfTime(), 0, ci.item_picklist, ( (ci.item_type='M') AND (bomitem_createwo) ), ( (ci.item_type='M') AND (bomitem_issuewo) ), bomitem_issuemethod, bomitem_notes, bomitem_ref FROM womatl JOIN wo ON (wo_id=womatl_wo_id) JOIN itemsite ps ON (ps.itemsite_id=womatl_itemsite_id) JOIN item pi ON (pi.item_id=ps.itemsite_item_id) JOIN bomitem ON ( (bomitem_parent_item_id=pi.item_id) AND (woEffectiveDate(_p.wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (bomitem_rev_id=getActiveRevId('BOM', pi.item_id)) ) JOIN item ci ON (ci.item_id=bomitem.bomitem_item_id) JOIN itemsite cs ON ( (cs.itemsite_item_id=ci.item_id) AND (cs.itemsite_warehous_id=ps.itemsite_warehous_id) ) WHERE (womatl_id=_p.womatl_id); DELETE FROM womatl WHERE (womatl_id=_p.womatl_id); END LOOP; END LOOP; -- Create W/Os for manufactured component items FOR newWo IN SELECT wo_number, nextWoSubnumber(wo_number) AS nextSubnumber, itemsite_id, itemsite_leadtime, womatl_duedate, womatl_wo_id, womatl_qtyreq, womatl_uom_id, wo_prj_id, item_id, item_inv_uom_id, womatl_id FROM womatl, wo, itemsite, item WHERE ( (womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_createwo) AND (itemsite_wosupply) AND (itemsite_item_id=item_id) AND (wo_id=pWoid) ) ORDER BY womatl_id LOOP SELECT createWo( newWo.wo_number, newWo.itemsite_id, 1, itemuomtouom(newWo.item_id,newWo.womatl_uom_id,newWo.item_inv_uom_id,newWo.womatl_qtyreq), newWo.itemsite_leadtime, newWo.womatl_duedate, '', 'W', newWo.womatl_wo_id, newWo.wo_prj_id ) INTO _newwoid; UPDATE wo SET wo_womatl_id = newWo.womatl_id WHERE wo_id=_newwoid; END LOOP; UPDATE wo SET wo_status='E', wo_adhoc=FALSE WHERE (wo_id=pWoid); IF (pExplodeChildren) THEN SELECT MAX(explodeWo(wo_id, TRUE)) INTO resultCode FROM wo WHERE ( (wo_ordtype='W') AND (wo_ordid=pWoid) ); END IF; RETURN pWoid; END; $_$; 2DROP FUNCTION public.explodewo(integer, boolean); publicadminfalse8399212551682315explodewoeffective()FUNCTIONhCREATE FUNCTION explodewoeffective() RETURNS text LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value TEXT; BEGIN SELECT metric_value INTO _value FROM metric WHERE (metric_name='ExplodeWOEffective'); RETURN _value; END; $$; +DROP FUNCTION public.explodewoeffective(); publicadminfalse8399212551682316fetchapmemonumber()FUNCTIONCREATE FUNCTION fetchapmemonumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('APMemoNumber')::INTEGER; $$; *DROP FUNCTION public.fetchapmemonumber(); publicadminfalse812551682317fetcharmemonumber()FUNCTIONCREATE FUNCTION fetcharmemonumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('ARMemoNumber'); $$; *DROP FUNCTION public.fetcharmemonumber(); publicadminfalse812551682318fetchcashrcptnumber()FUNCTIONCREATE FUNCTION fetchcashrcptnumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('CashRcptNumber'); $$; ,DROP FUNCTION public.fetchcashrcptnumber(); publicadminfalse812551682319fetchcmnumber()FUNCTIONCREATE FUNCTION fetchcmnumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('CmNumber'); $$; &DROP FUNCTION public.fetchcmnumber(); publicadminfalse812551682320fetchcrmaccountnumber()FUNCTIONCREATE FUNCTION fetchcrmaccountnumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('CRMAccountNumber')::INTEGER; $$; .DROP FUNCTION public.fetchcrmaccountnumber(); publicadminfalse812551682321fetchdefaultfob(integer)FUNCTION%CREATE FUNCTION fetchdefaultfob(pwarehousid integer) RETURNS text LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT warehous_fob FROM whsinfo WHERE (warehous_id=$1); $_$; ;DROP FUNCTION public.fetchdefaultfob(pwarehousid integer); publicadminfalse812551682322fetchdefaultshipvia()FUNCTIONCREATE FUNCTION fetchdefaultshipvia() RETURNS text LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal TEXT; BEGIN SELECT shipvia_code INTO _returnVal FROM shipvia WHERE shipvia_id= (SELECT CAST(metric_value AS integer) FROM metric WHERE metric_name = 'DefaultShipViaId'); RETURN _returnVal; END; $$; ,DROP FUNCTION public.fetchdefaultshipvia(); publicadminfalse8399212551682323fetchglsequence()FUNCTIONQCREATE FUNCTION fetchglsequence() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _sequence INTEGER; BEGIN SELECT NEXTVAL('gltrans_sequence_seq') INTO _sequence; RETURN _sequence; END; $$; (DROP FUNCTION public.fetchglsequence(); publicadminfalse8399212551682324fetchincidentnumber()FUNCTION CREATE FUNCTION fetchincidentnumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('IncidentNumber')::integer; $$; ,DROP FUNCTION public.fetchincidentnumber(); publicadminfalse812551682325fetchinvcnumber()FUNCTIONCREATE FUNCTION fetchinvcnumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('InvcNumber')::integer; $$; (DROP FUNCTION public.fetchinvcnumber(); publicadminfalse812551682326fetchitemuomconvtypes(integer)FUNCTION~CREATE FUNCTION fetchitemuomconvtypes(integer) RETURNS text[] LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemUomConvId ALIAS FOR $1; _p RECORD; _result text[]; _cnt INTEGER; BEGIN _cnt := 0; FOR _p IN SELECT uomtype_name FROM itemuomconv, itemuom, uomtype WHERE ((itemuomconv_id=pItemUomConvId) AND (itemuomconv_id=itemuom_itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id)) LOOP _result[_cnt] := _p.uomtype_name; _cnt := _cnt + 1; END LOOP; RETURN _result; END; $_$; 5DROP FUNCTION public.fetchitemuomconvtypes(integer); publicadminfalse8399212551682327fetchjournalnumber(text)FUNCTIONCREATE FUNCTION fetchjournalnumber(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUse ALIAS FOR $1; _number INTEGER; BEGIN SELECT nextval('journal_number_seq') INTO _number; INSERT INTO jrnluse (jrnluse_date, jrnluse_number, jrnluse_use) VALUES (CURRENT_TIMESTAMP, _number, pUse); RETURN _number; END; $_$; /DROP FUNCTION public.fetchjournalnumber(text); publicadminfalse8399212551682328fetchmetricbool(text)FUNCTIONCREATE FUNCTION fetchmetricbool(text) RETURNS boolean LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _pMetricName ALIAS FOR $1; _returnVal BOOLEAN; BEGIN SELECT CASE WHEN MIN(metric_value) = 't' THEN true ELSE false END INTO _returnVal FROM metric WHERE metric_name = _pMetricName; RETURN _returnVal; END; $_$; ,DROP FUNCTION public.fetchmetricbool(text); publicadminfalse83992 12551682329fetchmetrictext(text)FUNCTIONCREATE FUNCTION fetchmetrictext(text) RETURNS text LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _pMetricName ALIAS FOR $1; _returnVal TEXT; BEGIN SELECT metric_value::TEXT INTO _returnVal FROM metric WHERE metric_name = _pMetricName; RETURN _returnVal; END; $_$; ,DROP FUNCTION public.fetchmetrictext(text); publicadminfalse8399212551682330fetchmetricvalue(text)FUNCTIONCREATE FUNCTION fetchmetricvalue(text) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _pMetricName ALIAS FOR $1; _returnVal INTEGER; BEGIN SELECT CASE WHEN (isNumeric(metric_value)) THEN metric_value::INTEGER ELSE NULL END INTO _returnVal FROM metric WHERE metric_name = _pMetricName; RETURN _returnVal; END; $_$; -DROP FUNCTION public.fetchmetricvalue(text); publicadminfalse8399212551682331fetchnextchecknumber(integer)FUNCTION#CREATE FUNCTION fetchnextchecknumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; _nextChkNumber INTEGER; BEGIN SELECT bankaccnt_nextchknum INTO _nextChkNumber FROM bankaccnt WHERE (bankaccnt_id=pBankaccntid); UPDATE bankaccnt SET bankaccnt_nextchknum = (bankaccnt_nextchknum + 1) WHERE (bankaccnt_id=pBankaccntid); RETURN _nextChkNumber; END; $_$; 4DROP FUNCTION public.fetchnextchecknumber(integer); publicadminfalse8399212551682332fetchnextnumber(text)FUNCTIONCREATE FUNCTION fetchnextnumber(text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE psequence ALIAS FOR $1; _number TEXT; _numcol TEXT; _select TEXT; _table TEXT; _test TEXT; _nextnum INTEGER; _seqiss seqiss; __seqiss seqiss[]; _not_issued BOOLEAN; BEGIN SELECT CAST(orderseq_number AS text), orderseq_number, orderseq_table, orderseq_numcol, COALESCE(orderseq_seqiss, ARRAY[]::seqiss[]) INTO _number, _nextnum, _table, _numcol, __seqiss FROM orderseq WHERE (orderseq_name=psequence) FOR UPDATE; IF (NOT FOUND) THEN RAISE EXCEPTION 'Invalid orderseq_name %', psequence; END IF; LOOP _seqiss := (_nextnum, now()); SELECT count(*) = 0 INTO _not_issued FROM (SELECT UNNEST(__seqiss) AS issued) data WHERE (issued).seqiss_number = _nextnum; _nextnum := _nextnum + 1; -- Test if the number has been issued, but not committed IF (_not_issued) THEN -- Test if the number has been committed _select := 'SELECT ' || quote_ident(_numcol) || ' FROM ' || quote_ident(_table) || ' WHERE (' || quote_ident(_numcol) || '=' || quote_literal(_number) || ');'; EXECUTE _select INTO _test; IF (_test IS NULL OR NOT FOUND) THEN EXIT; END IF; END IF; -- Number in use, try again _number = _nextnum::text; END LOOP; UPDATE orderseq SET orderseq_number = _nextnum, orderseq_seqiss = orderseq_seqiss || _seqiss WHERE (orderseq_name=psequence); RETURN _number; END; $_$; ,DROP FUNCTION public.fetchnextnumber(text); publicadminfalse83992$12551682333fetchponumber()FUNCTIONCREATE FUNCTION fetchponumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('PoNumber'); $$; &DROP FUNCTION public.fetchponumber(); publicadminfalse812551682334fetchprefwarehousid()FUNCTIONCREATE FUNCTION fetchprefwarehousid() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _result INTEGER; BEGIN SELECT CAST(usrpref_value AS INTEGER) INTO _result FROM usrpref WHERE ((usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse')); RETURN _result; END; $$; ,DROP FUNCTION public.fetchprefwarehousid(); publicadminfalse8399212551682335fetchprnumber()FUNCTIONCREATE FUNCTION fetchprnumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('PrNumber')::INTEGER; $$; &DROP FUNCTION public.fetchprnumber(); publicadminfalse812551682336fetchqunumber()FUNCTIONCREATE FUNCTION fetchqunumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('QuNumber'); $$; &DROP FUNCTION public.fetchqunumber(); publicadminfalse812551682337fetchshipmentnumber()FUNCTIONCREATE FUNCTION fetchshipmentnumber() RETURNS text LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _number TEXT; _test INTEGER; BEGIN LOOP SELECT CAST(nextval('shipment_number_seq') AS TEXT) INTO _number; SELECT shiphead_id INTO _test FROM shiphead WHERE (shiphead_number=_number); IF (NOT FOUND) THEN EXIT; END IF; END LOOP; RETURN _number; END; $$; ,DROP FUNCTION public.fetchshipmentnumber(); publicadminfalse8399212551682338fetchsonumber()FUNCTIONCREATE FUNCTION fetchsonumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('SoNumber'); $$; &DROP FUNCTION public.fetchsonumber(); publicadminfalse812551682339fetchtonumber()FUNCTIONCREATE FUNCTION fetchtonumber() RETURNS text LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('ToNumber'); $$; &DROP FUNCTION public.fetchtonumber(); publicadminfalse8"12551682340fetchusrprefbool(text)FUNCTION CREATE FUNCTION fetchusrprefbool(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _pPrefName ALIAS FOR $1; _returnVal BOOLEAN; BEGIN SELECT CASE WHEN MIN(usrpref_value) = 't' THEN true ELSE false END INTO _returnVal FROM usrpref WHERE ( (usrpref_username=getEffectiveXtUser()) AND (usrpref_name=_pPrefName) ); RETURN _returnVal; END; $_$; -DROP FUNCTION public.fetchusrprefbool(text); publicadminfalse83992(12551682341fetchvonumber()FUNCTIONCREATE FUNCTION fetchvonumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('VcNumber')::INTEGER; $$; &DROP FUNCTION public.fetchvonumber(); publicadminfalse8)12551682342fetchwonumber()FUNCTIONCREATE FUNCTION fetchwonumber() RETURNS integer LANGUAGE sql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT fetchNextNumber('WoNumber')::INTEGER; $$; &DROP FUNCTION public.fetchwonumber(); publicadminfalse8112551682343*financialreport(integer, integer, integer)FUNCTIONCREATE FUNCTION financialreport(integer, integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pPrjid ALIAS FOR $3; _result bool; BEGIN SELECT financialreport(pFlheadid,pPeriodid,'M', pPrjid) INTO _result; RETURN _result; END; $_$; ADROP FUNCTION public.financialreport(integer, integer, integer); publicadminfalse83992%125516823445financialreport(integer, integer, character, integer)FUNCTION'CREATE FUNCTION financialreport(integer, integer, character, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pInterval ALIAS FOR $3; pPrjid ALIAS FOR $4; _r RECORD; _t RECORD; _s RECORD; BEGIN -- Validate Interval IF pInterval <> 'M' AND pInterval <> 'Q' AND pInterval <> 'Y' THEN RAISE EXCEPTION 'Invalid Interval --> %', pInterval; END IF; -- Get rid of any old reporting done by this user for the specified criteria DELETE FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodId) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())); -- Find out if we need to show a Grand Total and which if any of the values -- we want to show in that grand total. SELECT flhead_showtotal, CASE WHEN(flhead_showstart) THEN 0.00 ELSE NULL END AS beginning, CASE WHEN(flhead_showend) THEN 0.00 ELSE NULL END AS ending, CASE WHEN(flhead_showdelta) THEN 0.00 ELSE NULL END AS debits, CASE WHEN(flhead_showdelta) THEN 0.00 ELSE NULL END AS credits, CASE WHEN(flhead_showbudget) THEN 0.00 ELSE NULL END AS budget, CASE WHEN(flhead_showdiff) THEN 0.00 ELSE NULL END AS diff, CASE WHEN(flhead_showcustom) THEN 0.00 ELSE NULL END AS custom, CASE WHEN(flhead_usealttotal) THEN flhead_alttotal ELSE NULL END AS altname INTO _r FROM flhead WHERE (flhead_id=pFlheadid); IF (NOT FOUND) THEN return FALSE; END IF; -- If showing a Grand Total then create a record as a Group which acts -- as a parent to the whole report. This allows the code to update as -- it would for normal group total values. IF (_r.flhead_showtotal) THEN INSERT INTO flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_diff, flrpt_custom, flrpt_altname, flrpt_interval ) VALUES (pFlheadid, pPeriodid, getEffectiveXtUser(), 0, -1, 'G', -1, _r.beginning, _r.ending, _r.debits, _r.credits, _r.budget, _r.diff, _r.custom, _r.altname, pInterval ); END IF; PERFORM insertFlGroup(pFlheadid, pPeriodid, -1, 0, FALSE, pInterval, pPrjid); -- go through the list of records that need percentages calculated and perform -- those calculations. FOR _t IN SELECT flrpt_order, CASE WHEN(flgrp_prcnt_flgrp_id = -1) THEN flgrp_flgrp_id ELSE flgrp_prcnt_flgrp_id END AS flgrp_id FROM flrpt, flgrp WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=flgrp_id)) UNION SELECT flrpt_order, CASE WHEN(flitem_prcnt_flgrp_id = -1) THEN flitem_flgrp_id ELSE flitem_prcnt_flgrp_id END AS flgrp_id FROM flrpt, flitem WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='I') AND (flrpt_type_id=flitem_id)) UNION SELECT flrpt_order, CASE WHEN(flspec_prcnt_flgrp_id = -1) THEN flspec_flgrp_id ELSE flspec_prcnt_flgrp_id END AS flgrp_id FROM flrpt, flspec WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='S') AND (flrpt_type_id=flspec_id)) LOOP IF( (_t.flgrp_id=-1) OR (NOT (SELECT flgrp_summarize FROM flgrp WHERE flgrp_id=_t.flgrp_id)) ) THEN SELECT COALESCE(SUM(flrpt_beginning),0) AS beginningTotal, COALESCE(SUM(flrpt_ending),0) AS endingTotal, COALESCE(SUM(flrpt_debits),0) AS debitsTotal, COALESCE(SUM(flrpt_credits),0) AS creditsTotal, COALESCE(SUM(flrpt_budget),0) AS budgetTotal, COALESCE(SUM(flrpt_diff), 0) AS diffTotal, COALESCE(SUM(flrpt_custom), 0) AS customTotal INTO _s FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type != 'T') AND (flrpt_parent_id=_t.flgrp_id)); ELSE SELECT COALESCE(SUM(flrpt_beginning),0) AS beginningTotal, COALESCE(SUM(flrpt_ending),0) AS endingTotal, COALESCE(SUM(flrpt_debits),0) AS debitsTotal, COALESCE(SUM(flrpt_credits),0) AS creditsTotal, COALESCE(SUM(flrpt_budget),0) AS budgetTotal, COALESCE(SUM(flrpt_diff), 0) AS diffTotal, COALESCE(SUM(flrpt_custom), 0) AS customTotal INTO _s FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type = 'G') AND (flrpt_type_id=_t.flgrp_id)); END IF; UPDATE flrpt SET flrpt_beginningprcnt = flrpt_beginningprcnt + flrpt_beginning / CASE WHEN (_s.beginningTotal=0) THEN 1 ELSE _s.beginningTotal END, flrpt_endingprcnt = flrpt_endingprcnt + flrpt_ending / CASE WHEN (_s.endingTotal=0) THEN 1 ELSE _s.endingTotal END, flrpt_debitsprcnt = flrpt_debitsprcnt + flrpt_debits / CASE WHEN (_s.debitsTotal=0) THEN 1 ELSE _s.debitsTotal END, flrpt_creditsprcnt = flrpt_creditsprcnt + flrpt_credits / CASE WHEN (_s.creditsTotal=0) THEN 1 ELSE _s.creditsTotal END, flrpt_budgetprcnt = flrpt_budgetprcnt + flrpt_budget / CASE WHEN (_s.budgetTotal=0) THEN 1 ELSE _s.budgetTotal END, flrpt_diffprcnt = flrpt_diffprcnt + flrpt_diff / CASE WHEN (_s.diffTotal=0) THEN 1 ELSE _s.diffTotal END, flrpt_customprcnt = flrpt_customprcnt + flrpt_custom / CASE WHEN (_s.customTotal=0) THEN 1 ELSE _s.customTotal END WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_order=_t.flrpt_order)); END LOOP; -- Update any subtotal records to reflect the percentage values of the parents -- since those are calculated after the subtotal records were created. FOR _t IN SELECT a.flrpt_order AS flrpt_order, b.flrpt_beginningprcnt AS flrpt_beginningprcnt, b.flrpt_endingprcnt AS flrpt_endingprcnt, b.flrpt_debitsprcnt AS flrpt_debitsprcnt, b.flrpt_creditsprcnt AS flrpt_creditsprcnt, b.flrpt_budgetprcnt AS flrpt_budgetprcnt, b.flrpt_diffprcnt AS flrpt_diffprcnt, b.flrpt_customprcnt AS flrpt_customprcnt FROM flrpt AS a, flrpt AS b WHERE ((a.flrpt_flhead_id=pFlheadid) AND (a.flrpt_period_id=pPeriodid) AND (a.flrpt_interval=pInterval) AND (a.flrpt_username=getEffectiveXtUser()) AND (a.flrpt_type='T') AND (b.flrpt_flhead_id=a.flrpt_flhead_id) AND (b.flrpt_period_id=a.flrpt_period_id) AND (b.flrpt_interval=pInterval) AND (b.flrpt_username=a.flrpt_username) AND (b.flrpt_type='G') AND (b.flrpt_type_id=a.flrpt_parent_id)) LOOP UPDATE flrpt SET flrpt_beginningprcnt=flrpt_beginningprcnt + _t.flrpt_beginningprcnt, flrpt_endingprcnt=flrpt_endingprcnt + _t.flrpt_endingprcnt, flrpt_debitsprcnt=flrpt_debitsprcnt + _t.flrpt_debitsprcnt, flrpt_creditsprcnt=flrpt_creditsprcnt + _t.flrpt_creditsprcnt, flrpt_budgetprcnt=flrpt_budgetprcnt + _t.flrpt_budgetprcnt, flrpt_diffprcnt=flrpt_diffprcnt + _t.flrpt_diffprcnt, flrpt_customprcnt=flrpt_customprcnt + _t.flrpt_customprcnt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_order=_t.flrpt_order)); END LOOP; -- If showing a Grand total then move the record we created early to the -- end of the report and marked as a Total record. IF (_r.flhead_showtotal) THEN UPDATE flrpt SET flrpt_order = COALESCE((SELECT MAX(flrpt_order) FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ), 0) + 1, flrpt_level = 0, flrpt_type = 'T' WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_order=0) AND (flrpt_level = -1) AND (flrpt_type = 'G') AND (flrpt_type_id=-1)); END IF; return TRUE; END; $_$; LDROP FUNCTION public.financialreport(integer, integer, character, integer); publicadminfalse8399212551682348@financialreport(integer, integer[], character, boolean, integer)FUNCTION!CREATE FUNCTION financialreport(integer, integer[], character, boolean, integer) RETURNS SETOF fltrenditem LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadId ALIAS FOR $1; pPeriodIds ALIAS FOR $2; pInterval ALIAS FOR $3; pShowNumbers ALIAS FOR $4; pPrjid ALIAS FOR $5; _row fltrenditem%ROWTYPE; _type CHAR; _p RECORD; _count INTEGER; _n NUMERIC; _fld NUMERIC[]; _grndttl NUMERIC; _i INTEGER; _first BOOLEAN; _prevlevel INTEGER; _subgrp INTEGER; BEGIN _first := true; _subgrp := 0; IF ARRAY_UPPER(pPeriodIds,1) <= 12 THEN _count := ARRAY_UPPER(pPeriodIds,1); ELSE _count := 12; END IF; --Get Type SELECT flhead_type FROM flhead INTO _type WHERE flhead_id=pFlheadId; --Build Financial Data FOR _i IN 1.._count LOOP PERFORM financialreport(pFlheadId,pPeriodIds[_i],pInterval,pPrjid); END LOOP; --Get Row Data FOR _p IN SELECT flrpt_flhead_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, flrpt_accnt_id, formatindent(flgrp.flgrp_name,flrpt.flrpt_level) AS flrpt_name, CASE WHEN (flgrp_summarize AND (_type IN ('I','C'))) THEN (COALESCE(flrpt_diff,0)) WHEN (flgrp_summarize AND (_type = 'B')) THEN (COALESCE(flrpt_ending,0)) ELSE NULL END AS f_fld1, flgrp_summarize AS display FROM flrpt,flgrp WHERE ((flrpt_flhead_id=pFlheadId) AND (flgrp_id=flrpt_type_id) AND (flrpt_type='G') AND (flrpt_period_id=pPeriodIds[1]) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) UNION SELECT flrpt_flhead_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, flrpt_accnt_id, formatindent(accnt_descrip,flrpt.flrpt_level) AS flrpt_name, CASE WHEN (_type IN ('I','C')) THEN (COALESCE(flrpt_diff,0)) WHEN (_type = 'B') THEN (COALESCE(flrpt_ending,0)) ELSE NULL END AS f_fld1, true AS display FROM flrpt,flitem,accnt WHERE ((flrpt_flhead_id=pFlheadId) AND (flrpt_accnt_id=accnt_id) AND (flitem_id=flrpt_type_id) AND (flrpt_type='I') AND (flrpt_period_id=pPeriodIds[1]) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) UNION SELECT flrpt_flhead_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, flrpt_accnt_id, CASE WHEN (flrpt.flrpt_type='T' AND flrpt.flrpt_level=0) THEN COALESCE(flrpt.flrpt_altname, 'Total') WHEN (flrpt.flrpt_type='T') THEN formatindent(COALESCE(flrpt.flrpt_altname, 'Subtotal') ,flrpt.flrpt_level) ELSE formatindent(('Type ' || flrpt.flrpt_type || ' ' || text(flrpt.flrpt_type_id)), flrpt.flrpt_level) END AS flstmtitem_name, CASE WHEN (_type IN ('I','C')) THEN (COALESCE(flrpt_diff,0)) WHEN (_type = 'B') THEN (COALESCE(flrpt_ending,0)) ELSE NULL END AS f_fld1, true AS display FROM flrpt WHERE ((flrpt_flhead_id=pFlheadId) AND (flrpt_type NOT IN ('I','S','G')) AND (flrpt_period_id=pPeriodIds[1]) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ORDER BY flrpt_order LOOP IF _type IN ('I','C') THEN _grndttl := _p.f_fld1; END IF; --Loop through and calculate period column values IF (_p.display) THEN FOR _i IN 2.._count LOOP SELECT CASE WHEN (_type IN ('I','C')) THEN COALESCE(flrpt_diff,0) WHEN (_type = 'B') THEN COALESCE(flrpt_ending,0) ELSE NULL END INTO _n FROM flrpt WHERE ((flrpt_flhead_id=pFlheadId) AND (flrpt_period_id=pPeriodIds[_i]) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_order=_p.flrpt_order)); _fld[_i-1] := _n; IF _type IN ('I','C') THEN _grndttl := _grndttl+_n; END IF; END LOOP; END IF; --Send it all back to the caller IF _prevlevel > _p.flrpt_level THEN _subgrp := _subgrp+1; END IF; _prevlevel:=_p.flrpt_level; _row.fltrenditem_subgrp := _subgrp; IF NOT _first THEN RETURN NEXT _row; END IF; _first := FALSE; _row.fltrenditem_flhead_id := _p.flrpt_flhead_id; _row.fltrenditem_username := _p.flrpt_username; _row.fltrenditem_order := _p.flrpt_order; _row.fltrenditem_level := _p.flrpt_level; _row.fltrenditem_type := _p.flrpt_type; _row.fltrenditem_type_id := _p.flrpt_type_id; _row.fltrenditem_parent_id := _p.flrpt_parent_id; _row.fltrenditem_accnt_id := _p.flrpt_accnt_id; _row.fltrenditem_name := _p.flrpt_name; IF (_p.display) THEN _row.fltrenditem_fld1 := (_p.f_fld1); _row.fltrenditem_fld2 := (_fld[1]); _row.fltrenditem_fld3 := (_fld[2]); _row.fltrenditem_fld4 := (_fld[3]); _row.fltrenditem_fld5 := (_fld[4]); _row.fltrenditem_fld6 := (_fld[5]); _row.fltrenditem_fld7 := (_fld[6]); _row.fltrenditem_fld8 := (_fld[7]); _row.fltrenditem_fld9 := (_fld[8]); _row.fltrenditem_fld10 := (_fld[9]); _row.fltrenditem_fld11 := (_fld[10]); _row.fltrenditem_fld12 := (_fld[11]); _row.fltrenditem_grndttl := (_grndttl); ELSE _row.fltrenditem_fld1 := NULL; _row.fltrenditem_fld2 := NULL; _row.fltrenditem_fld3 := NULL; _row.fltrenditem_fld4 := NULL; _row.fltrenditem_fld5 := NULL; _row.fltrenditem_fld6 := NULL; _row.fltrenditem_fld7 := NULL; _row.fltrenditem_fld8 := NULL; _row.fltrenditem_fld9 := NULL; _row.fltrenditem_fld10 := NULL; _row.fltrenditem_fld11 := NULL; _row.fltrenditem_fld12 := NULL; _row.fltrenditem_grndttl := NULL; END IF; END LOOP; _row.fltrenditem_subgrp := _subgrp + 1; RETURN NEXT _row; END; $_$; WDROP FUNCTION public.financialreport(integer, integer[], character, boolean, integer); publicadminfalse83992260312552005526<financialreport(integer, integer, boolean, boolean, integer)FUNCTIONCREATE FUNCTION financialreport(integer, integer, boolean, boolean, integer) RETURNS SETOF flstmtitem LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlcolid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pShowNumbers ALIAS FOR $3; pIndentName ALIAS FOR $4; pPrjid ALIAS FOR $5; _row flstmtitem%ROWTYPE; _p RECORD; _x RECORD; _priorMoPeriodId INTEGER; _priorQtPeriodId INTEGER; _priorYrPeriodId INTEGER; _first BOOLEAN; _prevlevel INTEGER; _subgrp INTEGER; _qtrInterval TEXT; _yrInterval TEXT; BEGIN _priorMoPeriodId := -1; _priorQtPeriodId := -1; _priorYrPeriodId := -1; _first := TRUE; _prevlevel :=0; _subgrp := 0; --Get Layout Data SELECT flhead_id,flhead_type, flcol_month,flcol_quarter,flcol_year,flcol_priortype, flcol_priormonth,flcol_priorquarter,flcol_prioryear, flcol_priordiff,flcol_priordiffprcnt,flcol_priorprcnt, flcol_budget,flcol_budgetdiff,flcol_budgetdiffprcnt, flcol_budgetprcnt INTO _p FROM flhead,flcol WHERE ((flcol_id=pFlcolid) AND (flhead_id=flcol_flhead_id)); IF (_p.flhead_type='B') THEN _qtrInterval := 'M'; _yrInterval := 'M'; ELSE _qtrInterval := 'Q'; _yrInterval := 'Y'; END IF; --Delete old data from all periods DELETE FROM flrpt WHERE ((flrpt_username=getEffectiveXtUser()) AND (flrpt_flhead_id=_p.flhead_id)); --Populate report data... --...for Month IF (_p.flcol_month) THEN PERFORM financialreport(_p.flhead_id,pPeriodid,'M',pPrjid); IF ((_p.flcol_priortype = 'P') AND (_p.flcol_priormonth)) THEN SELECT COALESCE(pp.period_id,-1) INTO _priorMoPeriodId FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorMoPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorMoPeriodId,'M',pPrjid); END IF; ELSE IF ((_p.flcol_priortype='Y')AND (_p.flcol_priormonth)) THEN SELECT COALESCE(pp.period_id,-1) INTO _priorMoPeriodId FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_id != pp.period_id) AND (cp.period_start > pp.period_start) AND (cp.period_number = pp.period_number)) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorMoPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorMoPeriodId,'M',pPrjid); END IF; END IF; END IF; END IF; --...for Quarter IF (_p.flcol_quarter) THEN PERFORM financialreport(_p.flhead_id,pPeriodid,'Q',pPrjid); END IF; IF ((_p.flcol_priortype='P') AND (_p.flcol_priorquarter)) THEN SELECT COALESCE(pp.period_id,-1) INTO _priorQtPeriodId FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start) AND (pp.period_quarter= CASE WHEN cp.period_quarter > 1 THEN cp.period_quarter - 1 ELSE 4 END) AND (pp.period_start >= cp.period_start - interval '1 year')) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorQtPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorQtPeriodId,'Q',pPrjid); END IF; ELSE IF ((_p.flcol_priortype='Y')AND (_p.flcol_priorquarter)) THEN SELECT pp.period_id INTO _priorQtPeriodId FROM period cp, period pp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=cy.yearperiod_id) AND (pp.period_yearperiod_id=py.yearperiod_id) AND (cp.period_quarter=pp.period_quarter) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY py.yearperiod_start DESC, pp.period_start DESC LIMIT 1; IF (_priorQtPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorQtPeriodId,'Q',pPrjid); END IF; END IF; END IF; --...for Year IF (_p.flcol_year) THEN PERFORM financialreport(_p.flhead_id,pPeriodid,'Y',pPrjid); END IF; IF (_p.flcol_prioryear='D') THEN SELECT COALESCE(pp.period_id,-1) INTO _priorYrPeriodId FROM period cp, period pp WHERE ((cp.period_id = pPeriodId) AND (cp.period_number = pp.period_number) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorYrPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorYrPeriodId,'Y',pPrjid); END IF; ELSE IF (_p.flcol_prioryear='F') THEN SELECT pp.period_id INTO _priorYrPeriodId FROM period cp, period pp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=cy.yearperiod_id) AND (pp.period_yearperiod_id=py.yearperiod_id) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY pp.period_start DESC LIMIT 1; IF (_priorYrPeriodId IS NOT NULL) THEN PERFORM financialreport(_p.flhead_id,_priorYrPeriodId,'Y',pPrjid); END IF; END IF; END IF; --Return the data FOR _x IN SELECT flrpt.flrpt_flhead_id AS flstmtitem_flhead_id, flrpt.flrpt_period_id AS flstmtitem_period_id, flrpt.flrpt_username AS flstmtitem_username, flrpt.flrpt_order AS flstmtitem_order, flrpt.flrpt_level AS flstmtitem_level, flrpt.flrpt_type AS flstmtitem_type, flrpt.flrpt_type_id AS flstmtitem_type_id, flrpt.flrpt_parent_id AS flstmtitem_parent_id, NULL AS flstmtitem_accnt_id, CASE WHEN (pIndentName) THEN formatindent(flgrp.flgrp_name,flrpt.flrpt_level) ELSE flgrp.flgrp_name END AS flstmtitem_name, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C'))) THEN (COALESCE(flrptmo.flrpt_diff,0)) WHEN (flgrp_summarize AND (flhead_type = 'B')) THEN (COALESCE(flrptmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_month, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptmo.flrpt_debits,0)) ELSE NULL END AS flstmtitem_monthdb, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptmo.flrpt_credits,0)) ELSE NULL END AS flstmtitem_monthcr, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (COALESCE(flrptmo.flrpt_diffprcnt,0)) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (COALESCE(flrptmo.flrpt_endingprcnt,0)) ELSE NULL END AS flstmtitem_monthprcnt, CASE WHEN (flgrp_summarize) THEN (flrptmo.flrpt_budget) ELSE NULL END AS flstmtitem_monthbudget, CASE WHEN (flgrp_summarize) THEN (flrptmo.flrpt_budgetprcnt) ELSE NULL END AS flstmtitem_monthbudgetprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE((flrptmo.flrpt_diff-flrptmo.flrpt_budget),0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE((flrptmo.flrpt_ending-flrptmo.flrpt_budget),0)) ELSE NULL END AS flstmtitem_monthbudgetdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_diff-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) WHEN (flgrp_summarize AND (flhead_type='B') AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_ending-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) WHEN (flgrp_summarize AND (flrptmo.flrpt_budget = 0)) THEN NULL ELSE NULL END AS flstmtitem_monthbudgetdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_qtr, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptqt.flrpt_debits,0)) ELSE NULL END AS flstmtitem_qtrdb, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptqt.flrpt_credits,0)) ELSE NULL END AS flstmtitem_qtrcr, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (flrptqt.flrpt_diffprcnt) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (flrptqt.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_qtrprcnt, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptqt.flrpt_budget,0)) ELSE NULL END AS flstmtitem_qtrbudget, CASE WHEN (flgrp_summarize) THEN (flrptqt.flrpt_budgetprcnt) ELSE NULL END AS flstmtitem_qtrbudgetprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE((flrptqt.flrpt_diff-flrptqt.flrpt_budget),0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE((flrptqt.flrpt_ending-flrptqt.flrpt_budget),0)) ELSE NULL END AS flstmtitem_qtrbudgetdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_diff-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) WHEN (flgrp_summarize AND (flhead_type='B') AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_ending-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) ELSE NULL END AS flstmtitem_qtrbudgetdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptyr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_year, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptyr.flrpt_debits,0)) ELSE NULL END AS flstmtitem_yeardb, CASE WHEN (flgrp_summarize) THEN (COALESCE(flrptyr.flrpt_credits,0)) ELSE NULL END AS flstmtitem_yearcr, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (COALESCE(flrptyr.flrpt_diffprcnt,0)) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (COALESCE(flrptyr.flrpt_endingprcnt,0)) ELSE NULL END AS flstmtitem_yearprcnt, CASE WHEN (flgrp_summarize) THEN (flrptyr.flrpt_budget) ELSE NULL END AS flstmtitem_yearbudget, CASE WHEN (flgrp_summarize) THEN (flrptyr.flrpt_budgetprcnt) ELSE NULL END AS flstmtitem_yearbudgetprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE((flrptyr.flrpt_diff-flrptyr.flrpt_budget),0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE((flrptyr.flrpt_ending-flrptyr.flrpt_budget),0)) ELSE NULL END AS flstmtitem_yearbudgetdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_diff-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) WHEN (flgrp_summarize AND (flhead_type = 'B') AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_ending-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) WHEN (flgrp_summarize AND (flrptyr.flrpt_budget = 0)) THEN NULL ELSE NULL END AS flstmtitem_yearbudgetdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptprmo.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptprmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prmonth, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (flrptprmo.flrpt_diffprcnt) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (flrptprmo.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_prmonthprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff-flrptprmo.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptmo.flrpt_ending-flrptprmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prmonthdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptprmo.flrpt_diff > 0)) THEN (COALESCE((flrptmo.flrpt_diff-flrptprmo.flrpt_diff)/flrptprmo.flrpt_diff,0)) WHEN (flgrp_summarize AND (flhead_type = 'B') AND (flrptprmo.flrpt_ending > 0)) THEN (COALESCE((flrptmo.flrpt_ending-flrptprmo.flrpt_ending)/flrptprmo.flrpt_ending,0)) WHEN (flgrp_summarize AND (flrptprmo.flrpt_ending = 0)) THEN NULL ELSE NULL END AS flstmtitem_prmonthdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptprqt.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptprqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prqtr, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (flrptprqt.flrpt_diffprcnt) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (flrptprqt.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_prqtrprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff-flrptprqt.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptqt.flrpt_ending-flrptprqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prqtrdiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptprqt.flrpt_diff > 0)) THEN (COALESCE((flrptqt.flrpt_diff-flrptprqt.flrpt_diff)/flrptprqt.flrpt_diff,0)) WHEN (flgrp_summarize AND (flhead_type = 'B') AND (flrptprqt.flrpt_ending > 0)) THEN (COALESCE((flrptqt.flrpt_ending-flrptprqt.flrpt_ending)/flrptprqt.flrpt_ending,0)) WHEN (flgrp_summarize AND (flrptprqt.flrpt_ending = 0)) THEN NULL ELSE NULL END AS flstmtitem_prqtrdiffprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptpryr.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptpryr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_pryear, CASE WHEN (flgrp_summarize AND flgrp_showdiffprcnt) THEN (flrptpryr.flrpt_diffprcnt) WHEN (flgrp_summarize AND flgrp_showendprcnt) THEN (flrptpryr.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_pryearprcnt, CASE WHEN (flgrp_summarize AND flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff-flrptpryr.flrpt_diff,0)) WHEN (flgrp_summarize AND flhead_type = 'B') THEN (COALESCE(flrptyr.flrpt_ending-flrptpryr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_pryeardiff, CASE WHEN (flgrp_summarize AND (flhead_type IN ('I','C')) AND (flrptpryr.flrpt_diff > 0)) THEN (COALESCE((flrptyr.flrpt_diff-flrptpryr.flrpt_diff)/flrptpryr.flrpt_diff,0)) WHEN (flgrp_summarize AND (flhead_type = 'B' ) AND (flrptpryr.flrpt_ending > 0)) THEN (COALESCE((flrptyr.flrpt_ending-flrptpryr.flrpt_ending)/flrptpryr.flrpt_ending,0)) WHEN (flgrp_summarize AND (flrptpryr.flrpt_ending = 0)) THEN NULL ELSE NULL END AS flstmtitem_pryeardiffprcnt FROM flgrp,flhead, (SELECT DISTINCT flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id FROM flrpt WHERE ((flrpt_type='G') AND (flrpt_flhead_id=_p.flhead_id) AND (flrpt_period_id=pPeriodId) AND (flrpt_username=getEffectiveXtUser()))) AS flrpt LEFT OUTER JOIN flrpt flrptmo ON ((flrptmo.flrpt_type=flrpt.flrpt_type) AND (flrptmo.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptmo.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptmo.flrpt_interval='M') AND (flrptmo.flrpt_username=flrpt.flrpt_username) AND (flrptmo.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptqt ON ((flrptqt.flrpt_type=flrpt.flrpt_type) AND (flrptqt.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptqt.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptqt.flrpt_interval=_qtrInterval) AND (flrptqt.flrpt_username=flrpt.flrpt_username) AND (flrptqt.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptyr ON ((flrptyr.flrpt_type=flrpt.flrpt_type) AND (flrptyr.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptyr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptyr.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptyr.flrpt_interval=_yrInterval) AND (flrptyr.flrpt_username=flrpt.flrpt_username) AND (flrptyr.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptprmo ON ((flrptprmo.flrpt_type=flrpt.flrpt_type) AND (flrptprmo.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptprmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprmo.flrpt_period_id=_priorMoPeriodId) AND (flrptprmo.flrpt_interval='M') AND (flrptprmo.flrpt_username=flrpt.flrpt_username) AND (flrptprmo.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptprqt ON ((flrptprqt.flrpt_type=flrpt.flrpt_type) AND (flrptprqt.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptprqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprqt.flrpt_period_id=_priorQtPeriodId) AND (flrptprqt.flrpt_interval='Q') AND (flrptprqt.flrpt_username=flrpt.flrpt_username) AND (flrptprqt.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptpryr ON ((flrptpryr.flrpt_type=flrpt.flrpt_type) AND (flrptpryr.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptpryr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptpryr.flrpt_period_id=_priorYrPeriodId) AND (flrptpryr.flrpt_interval='Y') AND (flrptpryr.flrpt_username=flrpt.flrpt_username) AND (flrptpryr.flrpt_order=flrpt.flrpt_order)) WHERE ((flgrp_id = flrpt.flrpt_type_id) AND (flhead_id = flgrp_flhead_id)) UNION SELECT flrpt.flrpt_flhead_id AS flstmtitem_flhead_id, flrpt.flrpt_period_id AS flstmtitem_period_id, flrpt.flrpt_username AS flstmtitem_username, flrpt.flrpt_order AS flstmtitem_order, flrpt.flrpt_level AS flstmtitem_level, flrpt.flrpt_type AS flstmtitem_type, flrpt.flrpt_type_id AS flstmtitem_type_id, flrpt.flrpt_parent_id AS flstmtitem_parent_id, flrpt.flrpt_accnt_id AS flstmtitem_accnt_id, CASE WHEN (pIndentName) THEN formatindent(flrpt.flrpt_name,flrpt.flrpt_level) ELSE flrpt.flrpt_name END AS flstmtitem_name, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff,0)) ELSE (COALESCE(flrptmo.flrpt_ending,0)) END AS flstmtitem_month, (COALESCE(flrptmo.flrpt_debits,0)) AS flstmtitem_monthdb, (COALESCE(flrptmo.flrpt_credits,0)) AS flstmtitem_monthcr, CASE WHEN (flitem_showdiffprcnt) THEN (flrptmo.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptmo.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_monthprcnt, (COALESCE(flrptmo.flrpt_budget,0)) AS flstmtitem_monthbudget, (flrptmo.flrpt_budgetprcnt) AS flstmtitem_monthbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptmo.flrpt_diff-flrptmo.flrpt_budget),0)) ELSE (COALESCE((flrptmo.flrpt_ending-flrptmo.flrpt_budget),0)) END AS flstmtitem_monthbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_diff-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) WHEN ((flhead_type='B') AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_ending-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) ELSE NULL END AS flstmtitem_monthbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff,0)) ELSE (COALESCE(flrptqt.flrpt_ending,0)) END AS flstmtitem_qtr, (COALESCE(flrptqt.flrpt_debits,0)) AS flstmtitem_qtrdb, (COALESCE(flrptqt.flrpt_credits,0)) AS flstmtitem_qtrcr, CASE WHEN (flitem_showdiffprcnt) THEN (COALESCE(flrptqt.flrpt_diffprcnt,0)) WHEN (flitem_showendprcnt) THEN (COALESCE(flrptqt.flrpt_endingprcnt,0)) ELSE NULL END AS flstmtitem_qtrprcnt, (COALESCE(flrptqt.flrpt_budget,0)) AS flstmtitem_qtrbudget, (flrptqt.flrpt_budgetprcnt) AS flstmtitem_qtrbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptqt.flrpt_diff-flrptqt.flrpt_budget),0)) ELSE (COALESCE((flrptqt.flrpt_ending-flrptqt.flrpt_budget),0)) END AS flstmtitem_qtrbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_diff-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) WHEN ((flhead_type='B') AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_ending-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) ELSE NULL END AS flstmtitem_qtrbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff,0)) ELSE (COALESCE(flrptyr.flrpt_ending,0)) END AS flstmtitem_year, (COALESCE(flrptyr.flrpt_debits,0)) AS flstmtitem_yeardb, (COALESCE(flrptyr.flrpt_credits,0)) AS flstmtitem_yearcr, CASE WHEN (flitem_showdiffprcnt) THEN (flrptyr.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptyr.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_yearprcnt, (COALESCE(flrptyr.flrpt_budget,0)) AS flstmtitem_yearbudget, (flrptyr.flrpt_budgetprcnt) AS flstmtitem_yearbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptyr.flrpt_diff-flrptyr.flrpt_budget),0)) ELSE (COALESCE((flrptyr.flrpt_ending-flrptyr.flrpt_budget),0)) END AS flstmtitem_yearbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_diff-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) WHEN ((flhead_type = 'B') AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_ending-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) ELSE NULL END AS flstmtitem_yearbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptprmo.flrpt_diff,0)) ELSE (COALESCE(flrptprmo.flrpt_ending,0)) END AS flstmtitem_prmonth, CASE WHEN (flitem_showdiffprcnt) THEN (flrptprmo.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptprmo.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_prmonthprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff-flrptprmo.flrpt_diff,0)) ELSE (COALESCE(flrptmo.flrpt_ending-flrptprmo.flrpt_ending,0)) END AS flstmtitem_prmonthdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptprmo.flrpt_diff > 0)) THEN (COALESCE((flrptmo.flrpt_diff-flrptprmo.flrpt_diff)/flrptprmo.flrpt_diff,0)) WHEN ((flhead_type = 'B') AND (flrptprmo.flrpt_ending > 0)) THEN (COALESCE((flrptmo.flrpt_ending-flrptprmo.flrpt_ending)/flrptprmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prmonthdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptprqt.flrpt_diff,0)) ELSE (COALESCE(flrptprqt.flrpt_ending,0)) END AS flstmtitem_prqtr, CASE WHEN (flitem_showdiffprcnt) THEN (flrptprqt.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptprqt.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_prqtrprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff-flrptprqt.flrpt_diff,0)) ELSE (COALESCE(flrptqt.flrpt_ending-flrptprqt.flrpt_ending,0)) END AS flstmtitem_prqtrdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptprqt.flrpt_diff > 0)) THEN (COALESCE((flrptqt.flrpt_diff-flrptprqt.flrpt_diff)/flrptprqt.flrpt_diff,0)) WHEN ((flhead_type = 'B') AND (flrptprqt.flrpt_ending > 0)) THEN (COALESCE((flrptqt.flrpt_ending-flrptprqt.flrpt_ending)/flrptprqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prqtrdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptpryr.flrpt_diff,0)) ELSE (COALESCE(flrptpryr.flrpt_ending,0)) END AS flstmtitem_pryear, CASE WHEN (flitem_showdiffprcnt) THEN (flrptpryr.flrpt_diffprcnt) WHEN (flitem_showendprcnt) THEN (flrptpryr.flrpt_endingprcnt) ELSE NULL END AS flstmtitem_pryearprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptyr.flrpt_diff-flrptpryr.flrpt_diff),0)) ELSE (COALESCE((flrptyr.flrpt_ending-flrptpryr.flrpt_ending),0)) END AS flstmtitem_pryeardiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptpryr.flrpt_diff > 0)) THEN (COALESCE((flrptyr.flrpt_diff-flrptpryr.flrpt_diff)/flrptpryr.flrpt_diff,0)) WHEN ((flhead_type = 'B' ) AND (flrptpryr.flrpt_ending > 0)) THEN (COALESCE((flrptyr.flrpt_ending-flrptpryr.flrpt_ending)/flrptpryr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_pryeardiffprcnt FROM flitem,flhead, (SELECT DISTINCT flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, accnt_id AS flrpt_accnt_id, CASE WHEN (pShowNumbers) THEN (formatGLAccount(accnt_id) || '-' || accnt_descrip) ELSE accnt_descrip END AS flrpt_name FROM flrpt,accnt WHERE ((flrpt_type='I') AND (flrpt_flhead_id=_p.flhead_id) AND (flrpt_period_id=pPeriodid) AND (flrpt_username=getEffectiveXtUser()) AND (accnt_id=flrpt_accnt_id))) AS flrpt LEFT OUTER JOIN flrpt flrptmo ON ((flrptmo.flrpt_type=flrpt.flrpt_type) AND (flrptmo.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptmo.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptmo.flrpt_interval='M') AND (flrptmo.flrpt_username=flrpt.flrpt_username) AND (flrptmo.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptqt ON ((flrptqt.flrpt_type=flrpt.flrpt_type) AND (flrptqt.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptqt.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptqt.flrpt_interval=_qtrInterval) AND (flrptqt.flrpt_username=flrpt.flrpt_username) AND (flrptqt.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptyr ON ((flrptyr.flrpt_type=flrpt.flrpt_type) AND (flrptyr.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptyr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptyr.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptyr.flrpt_interval=_yrInterval) AND (flrptyr.flrpt_username=flrpt.flrpt_username) AND (flrptyr.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptprmo ON ((flrptprmo.flrpt_type=flrpt.flrpt_type) AND (flrptprmo.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptprmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprmo.flrpt_period_id=_priorMoPeriodId) AND (flrptprmo.flrpt_interval='M') AND (flrptprmo.flrpt_username=flrpt.flrpt_username) AND (flrptprmo.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptprqt ON ((flrptprqt.flrpt_type=flrpt.flrpt_type) AND (flrptprqt.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptprqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprqt.flrpt_period_id=_priorQtPeriodId) AND (flrptprqt.flrpt_interval='Q') AND (flrptprqt.flrpt_username=flrpt.flrpt_username) AND (flrptprqt.flrpt_order=flrpt.flrpt_order)) LEFT OUTER JOIN flrpt flrptpryr ON ((flrptpryr.flrpt_type=flrpt.flrpt_type) AND (flrptpryr.flrpt_type_id=flrpt.flrpt_type_id) AND (flrptpryr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptpryr.flrpt_period_id=_priorYrPeriodId) AND (flrptpryr.flrpt_interval='Y') AND (flrptpryr.flrpt_username=flrpt.flrpt_username) AND (flrptpryr.flrpt_order=flrpt.flrpt_order) ) WHERE ((flitem_id = flrpt.flrpt_type_id) AND (flhead_id = flitem_flhead_id)) UNION SELECT flrpt.flrpt_flhead_id AS flstmtitem_flhead_id, flrpt.flrpt_period_id AS flstmtitem_period_id, flrpt.flrpt_username AS flstmtitem_username, flrpt.flrpt_order AS flstmtitem_order, flrpt.flrpt_level AS flstmtitem_level, flrpt.flrpt_type AS flstmtitem_type, flrpt.flrpt_type_id AS flstmtitem_type_id, flrpt.flrpt_parent_id AS flstmtitem_parent_id, NULL AS flstmtitem_accnt_id, CASE WHEN(flrpt.flrpt_type='T' AND flrpt.flrpt_level=0) THEN COALESCE(flrpt.flrpt_altname, 'Total') WHEN(flrpt.flrpt_type='T') THEN formatindent(COALESCE(flrpt.flrpt_altname, 'Subtotal') , (CASE WHEN pIndentName THEN flrpt.flrpt_level ELSE 0 END)) ELSE formatindent(('Type ' || flrpt.flrpt_type || ' ' || text(flrpt.flrpt_type_id)), (CASE WHEN pIndentName THEN flrpt.flrpt_level ELSE 0 END)) END AS flstmtitem_name, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff,0)) ELSE (COALESCE(flrptmo.flrpt_ending,0)) END AS flstmtitem_month, (COALESCE(flrptmo.flrpt_debits,0)) AS flstmtitem_monthdb, (COALESCE(flrptmo.flrpt_credits,0)) AS flstmtitem_monthcr, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptmo.flrpt_diffprcnt) ELSE (flrptmo.flrpt_endingprcnt) END AS flstmtitem_monthprcnt, (COALESCE(flrptmo.flrpt_budget,0)) AS flstmtitem_monthbudget, (flrptmo.flrpt_budgetprcnt) AS flstmtitem_monthbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptmo.flrpt_diff-flrptmo.flrpt_budget),0)) ELSE (COALESCE((flrptmo.flrpt_ending-flrptmo.flrpt_budget),0)) END AS flstmtitem_monthbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_diff-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) WHEN ((flhead_type='B') AND (flrptmo.flrpt_budget > 0)) THEN (COALESCE(((flrptmo.flrpt_ending-flrptmo.flrpt_budget)/flrptmo.flrpt_budget),0)) ELSE NULL END AS flstmtitem_monthbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff,0)) ELSE (COALESCE(flrptqt.flrpt_ending,0)) END AS flstmtitem_qtr, (COALESCE(flrptqt.flrpt_debits,0)) AS flstmtitem_qtrdb, (COALESCE(flrptqt.flrpt_credits,0)) AS flstmtitem_qtrcr, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptqt.flrpt_diffprcnt) ELSE (flrptqt.flrpt_endingprcnt) END AS flstmtitem_qtrprcnt, (COALESCE(flrptqt.flrpt_budget,0)) AS flstmtitem_qtrbudget, (flrptqt.flrpt_budgetprcnt) AS flstmtitem_qtrbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptqt.flrpt_diff-flrptqt.flrpt_budget),0)) ELSE (COALESCE((flrptqt.flrpt_ending-flrptqt.flrpt_budget),0)) END AS flstmtitem_qtrbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_diff-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) WHEN ((flhead_type='B') AND (flrptqt.flrpt_budget > 0)) THEN (COALESCE(((flrptqt.flrpt_ending-flrptqt.flrpt_budget)/flrptqt.flrpt_budget),0)) ELSE NULL END AS flstmtitem_qtrbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff,0)) ELSE (COALESCE(flrptyr.flrpt_ending,0)) END AS flstmtitem_year, (COALESCE(flrptyr.flrpt_debits,0)) AS flstmtitem_yeardb, (COALESCE(flrptyr.flrpt_credits,0)) AS flstmtitem_yearcr, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptyr.flrpt_diffprcnt) ELSE (flrptyr.flrpt_endingprcnt) END AS flstmtitem_yearprcnt, (COALESCE(flrptyr.flrpt_budget,0)) AS flstmtitem_yearbudget, (flrptyr.flrpt_budgetprcnt) AS flstmtitem_yearbudgetprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE((flrptyr.flrpt_diff-flrptyr.flrpt_budget),0)) ELSE (COALESCE((flrptyr.flrpt_ending-flrptyr.flrpt_budget),0)) END AS flstmtitem_yearbudgetdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_diff-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) WHEN ((flhead_type = 'B') AND (flrptyr.flrpt_budget > 0)) THEN (COALESCE(((flrptyr.flrpt_ending-flrptyr.flrpt_budget)/flrptyr.flrpt_budget),0)) ELSE NULL END AS flstmtitem_yearbudgetdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptprmo.flrpt_diff,0)) ELSE (COALESCE(flrptprmo.flrpt_ending,0)) END AS flstmtitem_prmonth, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptprmo.flrpt_diffprcnt) ELSE (flrptprmo.flrpt_endingprcnt) END AS flstmtitem_prmonthprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptmo.flrpt_diff-flrptprmo.flrpt_diff,0)) ELSE (COALESCE(flrptmo.flrpt_ending-flrptprmo.flrpt_ending,0)) END AS flstmtitem_prmonthdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptprmo.flrpt_diff > 0)) THEN (COALESCE((flrptmo.flrpt_diff-flrptprmo.flrpt_diff)/flrptprmo.flrpt_diff,0)) WHEN ((flhead_type = 'B') AND (flrptprmo.flrpt_ending > 0)) THEN (COALESCE((flrptmo.flrpt_ending-flrptprmo.flrpt_ending)/flrptprmo.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prmonthdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptprqt.flrpt_diff,0)) ELSE (COALESCE(flrptprqt.flrpt_ending,0)) END AS flstmtitem_prqtr, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptprqt.flrpt_diffprcnt) ELSE (flrptprqt.flrpt_endingprcnt) END AS flstmtitem_prqtrprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptqt.flrpt_diff-flrptprqt.flrpt_diff,0)) ELSE (COALESCE(flrptqt.flrpt_ending-flrptprqt.flrpt_ending,0)) END AS flstmtitem_prqtrdiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptprqt.flrpt_diff > 0)) THEN (COALESCE((flrptqt.flrpt_diff-flrptprqt.flrpt_diff)/flrptprqt.flrpt_diff,0)) WHEN ((flhead_type = 'B') AND (flrptprqt.flrpt_ending > 0)) THEN (COALESCE((flrptqt.flrpt_ending-flrptprqt.flrpt_ending)/flrptprqt.flrpt_ending,0)) ELSE NULL END AS flstmtitem_prqtrdiffprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptpryr.flrpt_diff,0)) ELSE (COALESCE(flrptpryr.flrpt_ending,0)) END AS flstmtitem_pryear, CASE WHEN (flhead_type IN ('I','C')) THEN (flrptpryr.flrpt_diffprcnt) ELSE (flrptpryr.flrpt_endingprcnt) END AS flstmtitem_pryearprcnt, CASE WHEN (flhead_type IN ('I','C')) THEN (COALESCE(flrptyr.flrpt_diff-flrptpryr.flrpt_diff,0)) ELSE (COALESCE(flrptyr.flrpt_ending-flrptpryr.flrpt_ending,0)) END AS flstmtitem_pryeardiff, CASE WHEN ((flhead_type IN ('I','C')) AND (flrptpryr.flrpt_diff > 0)) THEN (COALESCE((flrptyr.flrpt_diff-flrptpryr.flrpt_diff)/flrptpryr.flrpt_diff,0)) WHEN ((flhead_type = 'B' ) AND (flrptpryr.flrpt_ending > 0)) THEN (COALESCE((flrptyr.flrpt_ending-flrptpryr.flrpt_ending)/flrptpryr.flrpt_ending,0)) ELSE NULL END AS flstmtitem_pryeardiffprcnt FROM flhead CROSS JOIN (SELECT DISTINCT flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_parent_id, flrpt_altname FROM flrpt WHERE ((NOT (flrpt_type IN ('G','I','S'))) AND (flrpt_flhead_id=_p.flhead_id) AND (flrpt_period_id=pPeriodId) AND (flrpt_username=getEffectiveXtUser()))) AS flrpt LEFT OUTER JOIN flrpt flrptmo ON ((flrptmo.flrpt_type=flrpt.flrpt_type) AND (flrptmo.flrpt_order=flrpt.flrpt_order) AND (flrptmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptmo.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptmo.flrpt_interval='M') AND (flrptmo.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptqt ON ((flrptqt.flrpt_type=flrpt.flrpt_type) AND (flrptqt.flrpt_order=flrpt.flrpt_order) AND (flrptqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptqt.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptqt.flrpt_interval=_qtrInterval) AND (flrptqt.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptyr ON ((flrptyr.flrpt_type=flrpt.flrpt_type) AND (flrptyr.flrpt_order=flrpt.flrpt_order) AND (flrptyr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptyr.flrpt_period_id=flrpt.flrpt_period_id) AND (flrptyr.flrpt_interval=_yrInterval) AND (flrptyr.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptprmo ON ((flrptprmo.flrpt_type=flrpt.flrpt_type) AND (flrptprmo.flrpt_order=flrpt.flrpt_order) AND (flrptprmo.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprmo.flrpt_period_id=_priorMoPeriodId) AND (flrptprmo.flrpt_interval='M') AND (flrptprmo.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptprqt ON ((flrptprqt.flrpt_type=flrpt.flrpt_type) AND (flrptprqt.flrpt_order=flrpt.flrpt_order) AND (flrptprqt.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptprqt.flrpt_period_id=_priorQtPeriodId) AND (flrptprqt.flrpt_interval='Q') AND (flrptprqt.flrpt_username=flrpt.flrpt_username)) LEFT OUTER JOIN flrpt flrptpryr ON ((flrptpryr.flrpt_type=flrpt.flrpt_type) AND (flrptpryr.flrpt_order=flrpt.flrpt_order) AND (flrptpryr.flrpt_flhead_id=flrpt.flrpt_flhead_id) AND (flrptpryr.flrpt_period_id=_priorYrPeriodId) AND (flrptpryr.flrpt_interval='Y') AND (flrptpryr.flrpt_username=flrpt.flrpt_username)) WHERE (flhead_id=flrpt.flrpt_flhead_id) ORDER BY flstmtitem_order LOOP IF _prevlevel > _x.flstmtitem_level THEN _subgrp := _subgrp+1; END IF; _prevlevel:=_x.flstmtitem_level; _row.flstmtitem_subgrp := _subgrp; IF NOT _first THEN RETURN NEXT _row; END IF; _first := FALSE; _row.flstmtitem_flhead_id := _x.flstmtitem_flhead_id; _row.flstmtitem_period_id := _x.flstmtitem_period_id; _row.flstmtitem_username := _x.flstmtitem_username; _row.flstmtitem_order := _x.flstmtitem_order; _row.flstmtitem_level := _x.flstmtitem_level; _row.flstmtitem_type := _x.flstmtitem_type; _row.flstmtitem_type_id := _x.flstmtitem_type_id; _row.flstmtitem_parent_id := _x.flstmtitem_parent_id; _row.flstmtitem_accnt_id := _x.flstmtitem_accnt_id; _row.flstmtitem_name := _x.flstmtitem_name; _row.flstmtitem_month := _x.flstmtitem_month; _row.flstmtitem_monthdb := _x.flstmtitem_monthdb; _row.flstmtitem_monthcr := _x.flstmtitem_monthcr; _row.flstmtitem_monthprcnt := _x.flstmtitem_monthprcnt; _row.flstmtitem_monthbudget := _x.flstmtitem_monthbudget; _row.flstmtitem_monthbudgetprcnt := _x.flstmtitem_monthbudgetprcnt; _row.flstmtitem_monthbudgetdiff := _x.flstmtitem_monthbudgetdiff; _row.flstmtitem_monthbudgetdiffprcnt := _x.flstmtitem_monthbudgetdiffprcnt; _row.flstmtitem_qtr := _x.flstmtitem_qtr; _row.flstmtitem_qtrdb := _x.flstmtitem_qtrdb; _row.flstmtitem_qtrcr := _x.flstmtitem_qtrcr; _row.flstmtitem_qtrprcnt := _x.flstmtitem_qtrprcnt; _row.flstmtitem_qtrbudget := _x.flstmtitem_qtrbudget; _row.flstmtitem_qtrbudgetprcnt := _x.flstmtitem_qtrbudgetprcnt; _row.flstmtitem_qtrbudgetdiff := _x.flstmtitem_qtrbudgetdiff; _row.flstmtitem_qtrbudgetdiffprcnt := _x.flstmtitem_qtrbudgetdiffprcnt; _row.flstmtitem_year := _x.flstmtitem_year; _row.flstmtitem_yeardb := _x.flstmtitem_yeardb; _row.flstmtitem_yearcr := _x.flstmtitem_yearcr; _row.flstmtitem_yearprcnt := _x.flstmtitem_yearprcnt; _row.flstmtitem_yearbudget := _x.flstmtitem_yearbudget; _row.flstmtitem_yearbudgetprcnt := _x.flstmtitem_yearbudgetprcnt; _row.flstmtitem_yearbudgetdiff := _x.flstmtitem_yearbudgetdiff; _row.flstmtitem_yearbudgetdiffprcnt := _x.flstmtitem_yearbudgetdiffprcnt; _row.flstmtitem_prmonth := _x.flstmtitem_prmonth; _row.flstmtitem_prmonthprcnt := _x.flstmtitem_prmonthprcnt; _row.flstmtitem_prmonthdiff := _x.flstmtitem_prmonthdiff; _row.flstmtitem_prmonthdiffprcnt := _x.flstmtitem_prmonthdiffprcnt; _row.flstmtitem_prqtr := _x.flstmtitem_prqtr; _row.flstmtitem_prqtrprcnt := _x.flstmtitem_prqtrprcnt; _row.flstmtitem_prqtrdiff := _x.flstmtitem_prqtrdiff; _row.flstmtitem_prqtrdiffprcnt := _x.flstmtitem_prqtrdiffprcnt; _row.flstmtitem_pryear := _x.flstmtitem_pryear; _row.flstmtitem_pryearprcnt := _x.flstmtitem_pryearprcnt; _row.flstmtitem_pryeardiff := _x.flstmtitem_pryeardiff; _row.flstmtitem_pryeardiffprcnt := _x.flstmtitem_pryeardiffprcnt; END LOOP; _row.flstmtitem_subgrp := _subgrp + 1; RETURN NEXT _row; END; $_$; SDROP FUNCTION public.financialreport(integer, integer, boolean, boolean, integer); publicadminfalse82583399212551682350findapaccount(integer)FUNCTION\CREATE FUNCTION findapaccount(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceAPToGL')) THEN RETURN 0; END IF; SELECT apaccnt_ap_accnt_id INTO _accntid FROM apaccnt JOIN vendinfo ON (apaccnt_vendtype_id=vend_vendtype_id) WHERE (vend_id=pVendid); IF (FOUND) THEN RETURN _accntid; END IF; SELECT apaccnt_ap_accnt_id INTO _accntid FROM apaccnt JOIN vendtype ON (vendtype_code ~ apaccnt_vendtype) JOIN vendinfo ON (vend_vendtype_id=vendtype_id) WHERE ((apaccnt_vendtype_id=-1) AND (vend_id=pVendid)); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; -DROP FUNCTION public.findapaccount(integer); publicadminfalse83992b12551682351findapdiscountaccount(integer)FUNCTIONiCREATE FUNCTION findapdiscountaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceAPToGL')) THEN RETURN 0; END IF; SELECT apaccnt_discount_accnt_id INTO _accntid FROM apaccnt JOIN vendinfo ON (apaccnt_vendtype_id=vend_vendtype_id) WHERE (vend_id=pVendid); IF (FOUND) THEN RETURN _accntid; END IF; SELECT apaccnt_discount_accnt_id INTO _accntid FROM apaccnt JOIN vendtype ON (vendtype_code ~ apaccnt_vendtype) JOIN vendinfo ON (vend_vendtype_id=vendtype_id) WHERE ((apaccnt_vendtype_id=-1) AND (vend_id=pVendid)); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; 5DROP FUNCTION public.findapdiscountaccount(integer); publicadminfalse83992h12551682352findapprepaidaccount(integer)FUNCTIONCREATE FUNCTION findapprepaidaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceAPToGL')) THEN RETURN 0; END IF; -- Check for a Vendor Type specific Account SELECT apaccnt_prepaid_accnt_id INTO _accntid FROM apaccnt JOIN vendinfo ON (apaccnt_vendtype_id=vend_vendtype_id) WHERE (vend_id=pVendid); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Vendor Type pattern SELECT apaccnt_prepaid_accnt_id INTO _accntid FROM apaccnt JOIN vendtype ON (vendtype_code ~ apaccnt_vendtype) JOIN vendinfo ON (vend_vendtype_id=vendtype_id) WHERE ((apaccnt_vendtype_id=-1) AND (vend_id=pVendid)); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; 4DROP FUNCTION public.findapprepaidaccount(integer); publicadminfalse8399212551682353findaraccount(integer)FUNCTIONCREATE FUNCTION findaraccount(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_ar_accnt_id INTO _accntid FROM araccnt, custinfo WHERE ( (araccnt_custtype_id=cust_custtype_id) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_ar_accnt_id INTO _accntid FROM araccnt, custinfo, custtype WHERE ( (custtype_code ~ araccnt_custtype) AND (araccnt_custtype_id=-1) AND (cust_custtype_id=custtype_id) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; -DROP FUNCTION public.findaraccount(integer); publicadminfalse8399212551682354findardiscountaccount(integer)FUNCTIONCREATE FUNCTION findardiscountaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_discount_accnt_id INTO _accntid FROM araccnt, custinfo WHERE ( (araccnt_custtype_id=cust_custtype_id) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_discount_accnt_id INTO _accntid FROM araccnt, custinfo, custtype WHERE ( (custtype_code ~ araccnt_custtype) AND (cust_custtype_id=custtype_id) AND (araccnt_custtype_id=-1) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; 5DROP FUNCTION public.findardiscountaccount(integer); publicadminfalse8399212551682355findcalendarorigin(integer)FUNCTIONKCREATE FUNCTION findcalendarorigin(integer) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCalheadid ALIAS FOR $1; _originType CHAR(1); _origin DATE; BEGIN SELECT calhead_origin INTO _originType FROM calhead WHERE (calhead_id=pCalheadid); IF (NOT FOUND) THEN _origin := NULL; ELSIF (_originType = 'D') THEN _origin := CURRENT_DATE; ELSIF (_originType = 'E') THEN _origin := (CURRENT_DATE + 1); ELSIF (_originType = 'W') THEN _origin := (CURRENT_DATE - EXTRACT(DOW FROM CURRENT_DATE)::INTEGER); ELSIF (_originType = 'X') THEN _origin := ((CURRENT_DATE - EXTRACT(DOW FROM CURRENT_DATE)::INTEGER) + INTERVAL '1 week'); ELSIF (_originType = 'M') THEN _origin := date_trunc('month', CURRENT_DATE); ELSIF (_originType = 'N') THEN _origin := (date_trunc('month', CURRENT_DATE) + INTERVAL '1 month'); ELSIF (_originType = 'L') THEN _origin := (date_trunc('year', CURRENT_DATE) - INTERVAL '1 year'); ELSIF (_originType = 'Y') THEN _origin := date_trunc('year', CURRENT_DATE); ELSIF (_originType = 'Z') THEN _origin := (date_trunc('year', CURRENT_DATE) + INTERVAL '1 year'); ELSE _origin := NULL; END IF; RETURN _origin; END; $_$; 2DROP FUNCTION public.findcalendarorigin(integer); publicadminfalse8399212551682356$findcustomerform(integer, character)FUNCTIONUCREATE FUNCTION findcustomerform(integer, character) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pFormtype ALIAS FOR $2; _f RECORD; _found BOOLEAN; BEGIN -- Check for a Customer Type specific Form SELECT custform.* INTO _f FROM custform JOIN custinfo ON (custform_custtype_id=cust_custtype_id) WHERE (cust_id=pCustid); IF (FOUND) THEN _found := TRUE; ELSE -- Check for a Customer Type pattern SELECT custform.* INTO _f FROM custform JOIN custtype ON (custtype_code ~ custform_custtype) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE ((custform_custtype_id=-1) AND (cust_id=pCustid)); IF (FOUND) THEN _found := TRUE; ELSE _found := FALSE; END IF; END IF; IF (_found) THEN IF ( (pFormType = 'I') AND (_f.custform_invoice_report_name IS NOT NULL) ) THEN RETURN _f.custform_invoice_report_name; ELSIF ( (pFormType = 'C') AND (_f.custform_creditmemo_report_name IS NOT NULL) ) THEN RETURN _f.custform_creditmemo_report_name; ELSIF ( (pFormType = 'S') AND (_f.custform_statement_report_name IS NOT NULL) ) THEN RETURN _f.custform_statement_report_name; ELSIF ( (pFormType = 'Q') AND (_f.custform_quote_report_name IS NOT NULL) ) THEN RETURN _f.custform_quote_report_name; ELSIF ( (pFormType = 'P') AND (_f.custform_packinglist_report_name IS NOT NULL) ) THEN RETURN _f.custform_packinglist_report_name; ELSIF ( (pFormType = 'L') AND (_f.custform_sopicklist_report_name IS NOT NULL) ) THEN RETURN _f.custform_sopicklist_report_name; END IF; END IF; IF (pFormType = 'I') THEN RETURN 'Invoice'; ELSIF (pFormType = 'C') THEN RETURN 'CreditMemo'; ELSIF (pFormType = 'S') THEN RETURN 'Statement'; ELSIF (pFormType = 'Q') THEN RETURN 'Quote'; ELSIF (pFormType = 'P') THEN RETURN 'PackingList-Shipment'; ELSIF (pFormType = 'L') THEN RETURN 'PackingList'; END IF; END; $_$; ;DROP FUNCTION public.findcustomerform(integer, character); publicadminfalse8399212551682357finddeferredaccount(integer)FUNCTIONCREATE FUNCTION finddeferredaccount(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_deferred_accnt_id INTO _accntid FROM araccnt JOIN custinfo ON (araccnt_custtype_id=cust_custtype_id) WHERE (cust_id=pCustid); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_deferred_accnt_id INTO _accntid FROM araccnt JOIN custtype ON (custtype_code ~ araccnt_custtype) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE ((araccnt_custtype_id=-1) AND (cust_id=pCustid)); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; 3DROP FUNCTION public.finddeferredaccount(integer); publicadminfalse8399212551682358findfreightaccount(integer)FUNCTIONWCREATE FUNCTION findfreightaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_freight_accnt_id INTO _accntid FROM araccnt, custinfo WHERE ( (araccnt_custtype_id=cust_custtype_id) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_freight_accnt_id INTO _accntid FROM araccnt, custinfo, custtype WHERE ( (custtype_code ~ araccnt_custtype) AND (cust_custtype_id=custtype_id) AND (araccnt_custtype_id=-1) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; -- Find the default SELECT metric_value::INTEGER INTO _accntid FROM metric WHERE (metric_name='FreightAccount'); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; 2DROP FUNCTION public.findfreightaccount(integer); publicadminfalse8399212551682359findperiodend(integer)FUNCTIONM CREATE FUNCTION findperiodend(integer) RETURNS date LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCalitemid ALIAS FOR $1; _calType CHAR(1); _calItem RECORD; _start DATE; _loop INTEGER; BEGIN SELECT calhead_type INTO _calType FROM calhead, acalitem WHERE ((acalitem_calhead_id=calhead_id) AND (acalitem_id=pCalitemid)); IF (NOT FOUND) THEN SELECT calhead_type INTO _calType FROM calhead, rcalitem WHERE ((rcalitem_calhead_id=calhead_id) AND (rcalitem_id=pCalitemid)); IF (NOT FOUND) THEN RETURN NULL; END IF; END IF; IF (_calType = 'A') THEN RETURN ( SELECT (findPeriodStart(acalitem_id) + acalitem_periodlength - 1) FROM acalitem WHERE (acalitem_id=pCalitemid) ); ELSIF (_calType = 'R') THEN -- Grab the relative calitem's particulars SELECT rcalitem_periodtype, rcalitem_periodcount INTO _calitem FROM rcalitem WHERE (rcalitem_id=pCalitemid); IF (NOT FOUND) THEN RETURN NULL; END If; -- Grab the origin of the calitem SELECT findPeriodStart(pCalitemid) INTO _start; IF (_start IS NULL) THEN -- If days... ELSIF (_calitem.rcalitem_periodtype = 'D') THEN _start := (_start + _calitem.rcalitem_periodcount - 1); -- If weeks... (gotta be a better way) ELSIF (_calitem.rcalitem_periodtype = 'W') THEN _loop := _calitem.rcalitem_periodcount; WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 week'); _loop := (_loop - 1); END LOOP; _start := (_start - 1); -- If months... (gotta be a better way) ELSIF (_calitem.rcalitem_periodtype = 'M') THEN _loop := _calitem.rcalitem_periodcount; WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 month'); _loop := (_loop - 1); END LOOP; _start := (_start - 1); -- If years... (gotta be a better way) ELSIF (_calitem.rcalitem_periodtype = 'Y') THEN _loop := _calitem.rcalitem_periodcount; WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 year'); _loop := (_loop - 1); END LOOP; _start := (_start - 1); ELSE _start := NULL; END IF; ELSE _start := NULL; END IF; RETURN _start; END; $_$; -DROP FUNCTION public.findperiodend(integer); publicadminfalse8399212551682360findperiodstart(integer)FUNCTION CREATE FUNCTION findperiodstart(integer) RETURNS date LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCalitemid ALIAS FOR $1; _calType CHAR(1); _calItem RECORD; _start DATE; _loop INTEGER; BEGIN SELECT calhead_type INTO _calType FROM calhead, acalitem WHERE ((acalitem_calhead_id=calhead_id) AND (acalitem_id=pCalitemid)); IF (NOT FOUND) THEN SELECT calhead_type INTO _calType FROM calhead, rcalitem WHERE ((rcalitem_calhead_id=calhead_id) AND (rcalitem_id=pCalitemid)); IF (NOT FOUND) THEN RETURN NULL; END IF; END IF; IF (_calType = 'A') THEN RETURN ( SELECT acalitem_periodstart FROM acalitem WHERE (acalitem_id=pCalitemid) ); ELSIF (_calType = 'R') THEN -- Grab the relative calitem's particulars SELECT rcalitem_offsettype, rcalitem_offsetcount INTO _calitem FROM rcalitem WHERE (rcalitem_id=pCalitemid); IF (NOT FOUND) THEN RETURN NULL; END If; -- Grab the origin of the calitem's parend calhead SELECT findCalendarOrigin(calhead_id) INTO _start FROM calhead, rcalitem WHERE ((rcalitem_calhead_id=calhead_id) AND (rcalitem_id=pCalitemid)); -- If days... IF (_calitem.rcalitem_offsettype = 'D') THEN _start := (_start + _calitem.rcalitem_offsetcount); -- If weeks... ELSIF (_calitem.rcalitem_offsettype = 'W') THEN _start := (_start + (_calitem.rcalitem_offsetcount * 7)); -- If months... (gotta be a better way) ELSIF (_calitem.rcalitem_offsettype = 'M') THEN _loop := _calitem.rcalitem_offsetcount; IF (_loop > 0) THEN WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 month'); _loop := _loop - 1; END LOOP; ELSE WHILE (_loop < 0) LOOP _start := (_start - INTERVAL '1 month'); _loop := _loop + 1; END LOOP; END IF; -- If years... (gotta be a better way) ELSIF (_calitem.rcalitem_offsettype = 'Y') THEN _loop := _calitem.rcalitem_offsetcount; IF (_loop > 0) THEN WHILE (_loop > 0) LOOP _start := (_start + INTERVAL '1 year'); _loop := _loop - 1; END LOOP; ELSE WHILE (_loop < 0) LOOP _start := (_start - INTERVAL '1 year'); _loop := _loop + 1; END LOOP; END IF; ELSE _start := NULL; END IF; ELSE _start := NULL; END IF; RETURN _start; END; $_$; /DROP FUNCTION public.findperiodstart(integer); publicadminfalse8399212551682361findprepaidaccount(integer)FUNCTIONCREATE FUNCTION findprepaidaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; _accntid INTEGER; BEGIN IF (NOT fetchMetricBool('InterfaceARToGL')) THEN RETURN 0; END IF; -- Check for a Customer Type specific Account SELECT araccnt_prepaid_accnt_id INTO _accntid FROM araccnt JOIN custinfo ON (araccnt_custtype_id=cust_custtype_id) WHERE (cust_id=pCustid); IF (FOUND) THEN RETURN _accntid; END IF; -- Check for a Customer Type pattern SELECT araccnt_prepaid_accnt_id INTO _accntid FROM araccnt JOIN custtype ON (custtype_code ~ araccnt_custtype) JOIN custinfo ON (cust_custtype_id=custtype_id) WHERE ((araccnt_custtype_id=-1) AND (cust_id=pCustid) ); IF (FOUND) THEN RETURN _accntid; END IF; RETURN -1; END; $_$; 2DROP FUNCTION public.findprepaidaccount(integer); publicadminfalse8399212551682362 findsalesaccnt(integer, integer)FUNCTION$CREATE FUNCTION findsalesaccnt(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN findSalesAccnt($1, 'IS', $2, NULL, NULL); END; $_$; 7DROP FUNCTION public.findsalesaccnt(integer, integer); publicadminfalse83992812551682363&findsalesaccnt(integer, text, integer)FUNCTION(CREATE FUNCTION findsalesaccnt(integer, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN findSalesAccnt($1, $2, $3, NULL, NULL); END; $_$; =DROP FUNCTION public.findsalesaccnt(integer, text, integer); publicadminfalse83992125517450138findsalesaccnt(integer, text, integer, integer, integer)FUNCTION CREATE FUNCTION findsalesaccnt(pid integer, pidtype text, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _s RECORD; BEGIN IF (pidType = 'I') THEN -- Check for a custtype specific rule SELECT salesaccnt_id, CASE WHEN (salesaccnt_warehous_id<>-1) THEN 1 ELSE 0 END + CASE WHEN (salesaccnt_custtype_id<>-1) THEN 2 ELSE 0 END + CASE WHEN (salesaccnt_prodcat_id<>-1) THEN 3 ELSE 0 END + CASE WHEN (salesaccnt_shipzone_id<>-1) THEN 4 ELSE 0 END + CASE WHEN (salesaccnt_saletype_id<>-1) THEN 5 ELSE 0 END AS orderby INTO _s FROM salesaccnt, item, prodcat, custinfo, custtype WHERE ( (salesaccnt_warehous_id=-1) AND (item_prodcat_id=prodcat_id) AND (cust_custtype_id=custtype_id) AND ( (salesaccnt_prodcat='.*') OR ( (salesaccnt_prodcat_id=-1) AND (salesaccnt_prodcat<>'') AND (prodcat_code ~ salesaccnt_prodcat) ) OR ( (salesaccnt_prodcat_id=prodcat_id) ) ) AND ( (salesaccnt_custtype='.*') OR ( (salesaccnt_custtype_id=-1) AND (salesaccnt_custtype<>'') AND (custtype_code ~ salesaccnt_custtype) ) OR ( (salesaccnt_custtype_id=custtype_id) ) ) AND ( (salesaccnt_shipzone_id=-1) OR (salesaccnt_shipzone_id=pShipzoneid) ) AND ( (salesaccnt_saletype_id=-1) OR (salesaccnt_saletype_id=pSaletypeid) ) AND (item_id=pid) AND (cust_id=pCustid) ) ORDER BY orderby DESC, salesaccnt_custtype DESC, salesaccnt_prodcat DESC, salesaccnt_saletype_id DESC, salesaccnt_shipzone_id DESC LIMIT 1; ELSIF (pidType = 'IS') THEN -- Check for a custtype specific rule SELECT salesaccnt_id, CASE WHEN (salesaccnt_warehous_id<>-1) THEN 1 ELSE 0 END + CASE WHEN (salesaccnt_custtype_id<>-1) THEN 2 ELSE 0 END + CASE WHEN (salesaccnt_prodcat_id<>-1) THEN 3 ELSE 0 END + CASE WHEN (salesaccnt_shipzone_id<>-1) THEN 4 ELSE 0 END + CASE WHEN (salesaccnt_saletype_id<>-1) THEN 5 ELSE 0 END AS orderby INTO _s FROM salesaccnt, itemsite, item, prodcat, custinfo, custtype WHERE ( ( (salesaccnt_warehous_id=-1) OR (salesaccnt_warehous_id=itemsite_warehous_id) ) AND (itemsite_item_id=item_id) AND (item_prodcat_id=prodcat_id) AND (cust_custtype_id=custtype_id) AND ( (salesaccnt_prodcat='.*') OR ( (salesaccnt_prodcat_id=-1) AND (salesaccnt_prodcat<>'') AND (prodcat_code ~ salesaccnt_prodcat) ) OR ( (salesaccnt_prodcat_id=prodcat_id) ) ) AND ( (salesaccnt_custtype='.*') OR ( (salesaccnt_custtype_id=-1) AND (salesaccnt_custtype<>'') AND (custtype_code ~ salesaccnt_custtype) ) OR ( (salesaccnt_custtype_id=custtype_id) ) ) AND ( (salesaccnt_shipzone_id=-1) OR (salesaccnt_shipzone_id=pShipzoneid) ) AND ( (salesaccnt_saletype_id=-1) OR (salesaccnt_saletype_id=pSaletypeid) ) AND (itemsite_id=pid) AND (cust_id=pCustid) ) ORDER BY orderby DESC, salesaccnt_custtype DESC, salesaccnt_prodcat DESC, salesaccnt_warehous_id DESC, salesaccnt_saletype_id DESC, salesaccnt_shipzone_id DESC LIMIT 1; ELSE RETURN -2; -- invalid pidType END IF; IF (FOUND) THEN RETURN _s.salesaccnt_id; END IF; RETURN -1; END; $$; {DROP FUNCTION public.findsalesaccnt(pid integer, pidtype text, pcustid integer, psaletypeid integer, pshipzoneid integer); publicadminfalse8399212551682364)findspecialfinancial(text, text, integer)FUNCTIONCREATE FUNCTION findspecialfinancial(text, text, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUnit ALIAS FOR $1; pType ALIAS FOR $2; pPeriodid ALIAS FOR $3; _value NUMERIC; BEGIN _value := 0.00; IF ('OpenAR' = pType) THEN IF ( pUnit IN ('D','E') ) THEN SELECT SUM( CASE WHEN (aropen_doctype IN ('C', 'R')) THEN ((aropen_amount - aropen_paid) * -1) ELSE (aropen_amount - aropen_paid) END ) INTO _value FROM aropen, period WHERE ((aropen_open) AND (aropen_duedate BETWEEN period_start AND period_end) AND (period_id=pPeriodid)); IF ('E' = pUnit) THEN _value := 0.00 - _value; END IF; END IF; END IF; IF ('OpenAP' = pType) THEN IF ( pUnit IN ('C','E') ) THEN SELECT SUM( CASE WHEN (apopen_doctype='C') THEN ((apopen_amount - apopen_paid) * -1) ELSE (apopen_amount - apopen_paid) END ) INTO _value FROM apopen, period WHERE ((apopen_open) AND (apopen_duedate BETWEEN period_start AND period_end) AND (period_id=pPeriodid)); END IF; END IF; RETURN _value; END; $_$; @DROP FUNCTION public.findspecialfinancial(text, text, integer); publicadminfalse83992912551682365!first_agg(anyelement, anyelement)FUNCTIONCREATE FUNCTION first_agg(anyelement, anyelement) RETURNS anyelement LANGUAGE sql STABLE AS $_$ SELECT CASE WHEN $1 IS NULL THEN $2 ELSE $1 END; $_$; 8DROP FUNCTION public.first_agg(anyelement, anyelement); publicadminfalse812551682366firstline(text)FUNCTIONCREATE FUNCTION firstline(text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; _result TEXT := ''; BEGIN SELECT regexp_replace(pSource, E'^(\r?\n)*([^\r\n]*)\r?\n.*', E'\\2') INTO _result; RETURN _result; END; $_$; &DROP FUNCTION public.firstline(text); publicadminfalse8399212551682367fixacl()FUNCTIONCREATE FUNCTION fixacl() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _count INTEGER := 0; _oldgrp BOOLEAN := false; _objtype TEXT; _table TEXT; _schema TEXT; BEGIN IF EXISTS(SELECT 1 FROM pg_group WHERE groname = 'openmfg') THEN _oldgrp := true; END IF; FOR _r IN SELECT relname, nspname, relkind, CASE relkind WHEN 'r' THEN 1 WHEN 'v' THEN 2 WHEN 'S' THEN 3 ELSE 4 END AS seq FROM pg_catalog.pg_class c, pg_namespace n WHERE ((n.oid=c.relnamespace) AND (nspname in ('public', 'api') OR nspname in (SELECT pkghead_name FROM pkghead)) AND (relkind in ('S', 'r', 'v'))) ORDER BY seq LOOP _schema := quote_ident(_r.nspname); _table := quote_ident(_r.relname); RAISE DEBUG '%.%', _schema, _table; IF (_oldgrp) THEN EXECUTE 'REVOKE ALL ON ' || _schema || '.' || _table || ' FROM openmfg;'; END IF; EXECUTE 'REVOKE ALL ON ' || _schema || '.' || _table || ' FROM PUBLIC;'; EXECUTE 'GRANT ALL ON ' || _schema || '.' || _table || ' TO GROUP xtrole;'; _count := _count + 1; _objtype := CASE _r.relkind WHEN 'S' THEN 'SEQUENCE' WHEN 'r' THEN 'TABLE' WHEN 'v' THEN 'VIEW' ELSE NULL END; IF (_objtype IS NOT NULL) THEN BEGIN EXECUTE 'ALTER ' || _objtype || ' ' || _schema || '.' || _table || ' OWNER TO admin;'; EXCEPTION WHEN OTHERS THEN RAISE WARNING 'Could not change ownership of %.% to admin', _schema, _table; END; END IF; END LOOP; RETURN _count; END; $$; DROP FUNCTION public.fixacl(); publicadminfalse8399212552005530'formatabachecks(integer, integer, text)FUNCTIONT1CREATE FUNCTION formatabachecks(integer, integer, text) RETURNS SETOF achline LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pbankaccntid ALIAS FOR $1; -- all unprinted checks for this bankaccnt pcheckheadid ALIAS FOR $2; -- but if 2nd arg not null then just 1 check penckey ALIAS FOR $3; _bank RECORD; _batchcount INTEGER := 0; _batchdate DATE; _check RECORD; _vendnumber TEXT; _vendname TEXT; _filenum TEXT; _prevsec TEXT; _row achline%ROWTYPE; _totalcr NUMERIC := 0; _totaldb NUMERIC := 0; _detailcount INTEGER := 0; -- count of type 1 entries _vendbsb TEXT; BEGIN -- General notes: -- Numeric values are formatted using RPAD(TO_CHAR(#, '0..0SG', #)). -- TO_CHAR(#, ...) (at least in the default server locale) puts a space at -- the beginning of the string for numbers >= 0 and '-' for numbers < 0. -- 'SG' pushes the sign char to the end, then RPAD cuts it off. -- This whole thing is for Australian bank transactions only, and generates entries for an ABA file. -- Currently restricted to checks to Vendor; there's no support for checks to -- customers or tax authorities, or for debits or corrections. -- This function has been adapted from the US-centric ACH formatACHChecks function. IF (NOT fetchMetricBool('ACHEnabled')) THEN RAISE EXCEPTION 'Cannot format the ABA file because the system is not configured for ABA file generation.'; END IF; IF (LENGTH(COALESCE(penckey, '')) <= 0) THEN RAISE EXCEPTION 'Cannot format the ABA file because there is no encryption key.'; END IF; SELECT * INTO _bank FROM bankaccnt WHERE (bankaccnt_id=pbankaccntid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not find the bank information to create the ABA file.'; ELSIF (NOT _bank.bankaccnt_ach_enabled) THEN RAISE EXCEPTION 'Cannot format the ABA file because the Bank Account % is not configured for ABA transactions.', _bank.bankaccnt_name; ELSIF (LENGTH(COALESCE(_bank.bankaccnt_routing, '')) <= 0) THEN RAISE EXCEPTION 'Cannot format the ABA file because the Bank Account % has no BSB number.', _bank.bankaccnt_name; END IF; -- Check the BSB number is in the right format and then re-format for output. -- Valid format is \d{3}-\d{3}|\d{6}000 IF (_bank.bankaccnt_routing ~ E'^(\\d{3})(?:-(?=\\d{3}$)|(?=\\d{3}0{3}$))(\\d{3})(0{3})?$') THEN _bank.bankaccnt_routing := regexp_replace( _bank.bankaccnt_routing, E'^(\\d{3})(?:-(?=\\d{3}$)|(?=\\d{3}0{3}$))(\\d{3})(0{3})?$', E'\\1-\\2' ); ELSE RAISE EXCEPTION 'Cannot format the ABA file because the Bank Account % has an invalid BSB number.', _bank.bankaccnt_name; END IF; _filenum := LPAD(fetchNextNumber('ACHBatch'), 8, '0'); IF (COALESCE(_bank.bankaccnt_ach_lastdate,startOfTime()) < CURRENT_DATE OR _bank.bankaccnt_ach_lastfileid IS NULL) THEN _bank.bankaccnt_ach_lastfileid = '0'; ELSIF (_bank.bankaccnt_ach_lastfileid = '9') THEN _bank.bankaccnt_ach_lastfileid = 'A'; ELSIF (_bank.bankaccnt_ach_lastfileid = 'Z') THEN RAISE EXCEPTION 'Cannot write % check % to an ABA file because too many files have been written for this bank already today.', _bank.bankaccnt_name, _check.checkhead_number; ELSE _bank.bankaccnt_ach_lastfileid = CHR(ASCII(_bank.bankaccnt_ach_lastfileid) + 1); END IF; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'HEADER'; _row.achline_value := RPAD( RPAD('0',18) -- Record Type 0 blank filled with 17 spaces || '01' -- Reel sequence number || RPAD(_bank.bankaccnt_bankname,3) -- Approved financial instition abbreviation. || RPAD('',7) -- blank filled || RPAD(fetchMetricText('ACHCompanyName'), 26) -- Name of user supplying ABA file || LPAD(fetchMetricText('ACHCompanyId'),6) -- User identification number APCA issued || RPAD('PAYMENT',12) -- description of entries on file -- currently only use payment description || TO_CHAR(CURRENT_DATE, 'DDMMYY'), -- date to be processed 120 -- blank filled to 120 characters ); RETURN NEXT _row; FOR _check IN SELECT * FROM checkhead JOIN vendinfo ON (checkhead_recip_type='V' AND checkhead_recip_id=vend_id AND vend_ach_enabled) JOIN curr_symbol ON (checkhead_curr_id=curr_id) LEFT OUTER JOIN crmacct ON (crmacct_vend_id=vend_id) WHERE ((checkhead_bankaccnt_id=pbankaccntid) AND (checkhead_amount > 0) AND (checkhead_id=pcheckheadid OR pcheckheadid IS NULL) AND NOT checkhead_posted AND NOT checkhead_replaced AND NOT checkhead_deleted AND NOT checkhead_void AND NOT checkhead_printed AND (LENGTH(COALESCE(checkhead_ach_batch,'')) <= 0) AND (curr_abbr='AUD')) ORDER BY checkhead_checkdate, vend_name LOOP IF (COALESCE(_check.checkhead_number, -1) <= 0 AND _bank.bankaccnt_ach_genchecknum) THEN _check.checkhead_number := fetchNextCheckNumber(_check.checkhead_bankaccnt_id); END IF; -- Although a crmacct record is not required for used in this function -- this code is retained for consistancy with the original formatachchecks function. IF (_check.crmacct_id IS NULL) THEN RAISE NOTICE 'Vendor % does not have a corresponding crmacct record.', _check.checkhead_recip_id; ELSIF (_check.crmacct_type IS NULL) THEN RAISE NOTICE 'crmacct for vendor % does not have a valid crmacct_type.', _check.checkhead_recip_id; END IF; _vendnumber := CASE WHEN _check.vend_ach_use_vendinfo THEN _check.vend_number ELSE _check.vend_ach_indiv_number END; _vendname := CASE WHEN _check.vend_ach_use_vendinfo THEN _check.vend_name ELSE _check.vend_ach_indiv_name END; IF (COALESCE(_check.vend_ach_routingnumber, '') = '') THEN RAISE EXCEPTION 'Cannot write % check % to an ABA file because the BSB number for % has not been supplied.', _bank.bankaccnt_name, _check.checkhead_number, _vendnumber; ELSIF (COALESCE(_check.vend_ach_accntnumber, '') = '') THEN RAISE EXCEPTION 'Cannot write % check % to an ABA file because the account number for % has not been supplied.', _bank.bankaccnt_name, _check.checkhead_number, _vendnumber; END IF; _check.vend_ach_routingnumber := decrypt(setbytea(_check.vend_ach_routingnumber), setbytea(penckey), 'bf'); _check.vend_ach_accntnumber := decrypt(setbytea(_check.vend_ach_accntnumber), setbytea(penckey), 'bf'); -- Check the BSB number is in the right format and then re-format for output. -- Valid format is \d{3}-\d{3}|\d{6}000 IF (formatbytea(_check.vend_ach_routingnumber) ~ E'^(\\d{3})(?:-(?=\\d{3}$)|(?=\\d{3}0{3}$))(\\d{3})(0{3})?$') THEN _vendbsb := regexp_replace( formatbytea(_check.vend_ach_routingnumber), E'^(\\d{3})(?:-(?=\\d{3}$)|(?=\\d{3}0{3}$))(\\d{3})(0{3})?$', E'\\1-\\2' ); ELSE RAISE EXCEPTION 'Cannot write % check % to an ABA file because the BSB number for % is not valid.', _bank.bankaccnt_name, _check.checkhead_number, _vendnumber; END IF; _row.achline_checkhead_id := _check.checkhead_id; _row.achline_batch := _filenum; _row.achline_type := 'DETAIL'; _totaldb := _totaldb + _check.checkhead_amount; -- Total debits for balancing entry _detailcount := _detailcount + 1; -- Detail record counter (type 1) _totalcr := _totalcr + _check.checkhead_amount; -- Total credits from payments _row.achline_value := RPAD('1' -- record type 1 || _vendbsb -- vendor BSB # || LPAD(formatbytea(_check.vend_ach_accntnumber), 9) -- vendor account no. ||' ' -- withholding tax indicator ||'50' -- transaction code, this should be calculated. || LPAD(to_char(_check.checkhead_amount,'FM99999999V99'),10,'0') -- amount || RPAD(_vendname, 32) -- vendor name || RPAD('Deposit',8) || RPAD('#' , 2) || LPAD (_filenum,8,' ') -- Lodgement Reference || _bank.bankaccnt_routing -- BSB # || RPAD(_bank.bankaccnt_accntnumber, 9) -- company account number || RPAD(fetchMetricText('ACHCompanyName'), 16) -- company account name || LPAD('', 8, '0'), -- Witholding Tax Amount 120 -- line width ); RETURN NEXT _row; UPDATE checkhead SET checkhead_ach_batch=_filenum, checkhead_number=_check.checkhead_number WHERE (checkhead_id=_check.checkhead_id); END LOOP; IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot write an ABA file for % because there are no checks pending in AUD for EFT-enabled Vendors.', _bank.bankaccnt_name; END IF; -- Place a final balancing detail record. -- Check that the balancing record actually balances. IF (_totalcr != _totaldb) THEN RAISE EXCEPTION 'Cannot write an ABA file for % because the total credits: % does not equal the total debits: %, file will not balance.', _bank.bankaccnt_name, _totalcr, _totaldb; END IF; _detailcount := _detailcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BALANCING'; -- keep in sync with the other batchcontrol record format above -- THE FOLLOWING IS THE DEBIT BALANCING RECORD _row.achline_value := RPAD('1' -- record type 1 || _bank.bankaccnt_routing -- Austalian BSB # || LPAD(_bank.bankaccnt_accntnumber, 9) -- company account no. || ' ' -- withholding tax indicator || '13' -- transaction code || to_char(_totaldb,'FM09999999V99') -- the balancing amount || RPAD(fetchMetricText('ACHCompanyName'), 32) -- company name || RPAD('DIRECT DEPOSIT',18) || _bank.bankaccnt_routing -- Austalian BSB # || RPAD(_bank.bankaccnt_accntnumber, 9) -- company account number || RPAD(fetchMetricText('ACHCompanyName'), 16) -- company account name || LPAD('', 8, '0'), -- Witholding Tax Amount 120 -- line width ); RETURN NEXT _row; RAISE DEBUG 'formatABAChecks building TRAILER with _totaldb %, _totalcr %, _detailcount %', _totaldb, _totalcr, _detailcount; -- file control record _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'TRAILER'; _row.achline_value := RPAD('7' -- record type 7 || RPAD('999-999', 7) -- BSB format filler || RPAD('' , 12) -- blank || LPAD(to_char((_totaldb - _totalcr),'FM09999999V99'),10,'0') -- net total amount || LPAD(to_char(_totalcr, 'FM09999999V99'),10,'0') -- total credit amount || LPAD(to_char(_totaldb, 'FM09999999V99'),10,'0') -- total debit amount || RPAD('', 24) -- blank || RPAD(to_char(_detailcount, 'FM000000'), 6,'0'), -- count of type 1 records 120 -- blank fill ); RETURN NEXT _row; UPDATE bankaccnt SET bankaccnt_ach_lastdate=CURRENT_DATE, bankaccnt_ach_lastfileid=_bank.bankaccnt_ach_lastfileid WHERE (bankaccnt_id=_bank.bankaccnt_id); RETURN; END; $_$; >DROP FUNCTION public.formatabachecks(integer, integer, text); publicadminfalse83992257112552005532'formatachchecks(integer, integer, text)FUNCTION~CCREATE FUNCTION formatachchecks(integer, integer, text) RETURNS SETOF achline LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pbankaccntid ALIAS FOR $1; -- all unprinted checks for this bankaccnt pcheckheadid ALIAS FOR $2; -- but if 2nd arg not null then just 1 check penckey ALIAS FOR $3; _bank RECORD; _batchcount INTEGER := 0; _batchcr NUMERIC := 0; _batchdate DATE; _batchdb NUMERIC := 0; _batchhash INTEGER := 0; _check RECORD; _ccdnumber TEXT; _ccdname TEXT; _entrycount INTEGER := 0; _filenum TEXT; _prevsec TEXT; _row achline%ROWTYPE; _rowcount INTEGER := 0; _sec TEXT; _serviceclass TEXT := '200'; -- 220 = credits, 225 = debits, 200 = mixed _totalcr NUMERIC := 0; _totaldb NUMERIC := 0; _totalentrycnt INTEGER := 0; _totalhash INTEGER := 0; _transactionprefix TEXT; BEGIN -- General notes: -- Numeric values are formatted using RPAD(TO_CHAR(#, '0..0SG', #)). -- TO_CHAR(#, ...) (at least in the default server locale) puts a space at -- the beginning of the string for numbers >= 0 and '-' for numbers < 0. -- 'SG' pushes the sign char to the end, then RPAD cuts it off. -- This whole thing is US-centric, as that's where the NACHA is. -- Currently restricted to checks to Vendor; there's no support for checks to -- customers or tax authorities, or for debits or corrections. IF (NOT fetchMetricBool('ACHEnabled')) THEN RAISE EXCEPTION 'Cannot format the ACH file because the system is not configured for ACH file generation.'; END IF; IF (LENGTH(COALESCE(penckey, '')) <= 0) THEN RAISE EXCEPTION 'Cannot format the ACH file because there is no encryption key.'; END IF; SELECT * INTO _bank FROM bankaccnt WHERE (bankaccnt_id=pbankaccntid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not find the bank information to create the ACH file.'; ELSIF (NOT _bank.bankaccnt_ach_enabled) THEN RAISE EXCEPTION 'Cannot format the ACH file because the Bank Account % is not configured for ACH transactions.', _bank.bankaccnt_name; ELSIF (LENGTH(COALESCE(_bank.bankaccnt_routing, '')) <= 0) THEN RAISE EXCEPTION 'Cannot format the ACH file because the Bank Account % has no routing number.', _bank.bankaccnt_name; END IF; _filenum := LPAD(fetchNextNumber('ACHBatch'), 8, '0'); IF (COALESCE(_bank.bankaccnt_ach_lastdate,startOfTime()) < CURRENT_DATE OR _bank.bankaccnt_ach_lastfileid IS NULL) THEN _bank.bankaccnt_ach_lastfileid = '0'; ELSIF (_bank.bankaccnt_ach_lastfileid = '9') THEN _bank.bankaccnt_ach_lastfileid = 'A'; ELSIF (_bank.bankaccnt_ach_lastfileid = 'Z') THEN RAISE EXCEPTION 'Cannot write % check % to an ACH file because too many files have been written for this bank already today.', _bank.bankaccnt_name, _check.checkhead_number; ELSE _bank.bankaccnt_ach_lastfileid = CHR(ASCII(_bank.bankaccnt_ach_lastfileid) + 1); END IF; _rowcount := _rowcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'FILEHEADER'; _row.achline_value := RPAD('1' || '01' || RPAD(CASE WHEN _bank.bankaccnt_ach_desttype = 'B' THEN ' ' || _bank.bankaccnt_routing WHEN _bank.bankaccnt_ach_desttype = 'F' THEN ' ' || _bank.bankaccnt_ach_fed_dest ELSE _bank.bankaccnt_ach_dest END, 10) || RPAD(CASE WHEN _bank.bankaccnt_ach_origintype = 'B' THEN ' ' || _bank.bankaccnt_routing WHEN _bank.bankaccnt_ach_origintype = 'I' THEN formatAchCompanyId() ELSE _bank.bankaccnt_ach_origin END, 10) || TO_CHAR(CURRENT_DATE, 'YYMMDD') || TO_CHAR(CURRENT_TIMESTAMP, 'HH24MM') || UPPER(_bank.bankaccnt_ach_lastfileid) || '094' || '10' || '1' || RPAD(CASE WHEN _bank.bankaccnt_ach_desttype = 'B' THEN _bank.bankaccnt_bankname WHEN _bank.bankaccnt_ach_desttype = 'F' THEN 'Federal Reserve' ELSE _bank.bankaccnt_ach_destname END, 23) || RPAD(CASE WHEN _bank.bankaccnt_ach_origintype = 'B' THEN ' ' || _bank.bankaccnt_bankname WHEN _bank.bankaccnt_ach_origintype = 'I' THEN fetchMetricText('ACHCompanyName') ELSE _bank.bankaccnt_ach_originname END, 23) || RPAD(_filenum, 8), 94); RETURN NEXT _row; FOR _check IN SELECT * FROM checkhead JOIN vendinfo ON (checkhead_recip_type='V' AND checkhead_recip_id=vend_id AND vend_ach_enabled) JOIN curr_symbol ON (checkhead_curr_id=curr_id) LEFT OUTER JOIN crmacct ON (crmacct_vend_id=vend_id) WHERE ((checkhead_bankaccnt_id=pbankaccntid) AND (checkhead_amount > 0) AND (checkhead_id=pcheckheadid OR pcheckheadid IS NULL) AND NOT checkhead_posted AND NOT checkhead_replaced AND NOT checkhead_deleted AND NOT checkhead_void AND NOT checkhead_printed AND (LENGTH(COALESCE(checkhead_ach_batch,'')) <= 0) AND (curr_abbr='USD')) ORDER BY checkhead_checkdate, vend_name LOOP IF (COALESCE(_check.checkhead_number, -1) <= 0 AND _bank.bankaccnt_ach_genchecknum) THEN _check.checkhead_number := fetchNextCheckNumber(_check.checkhead_bankaccnt_id); END IF; _prevsec := _sec; IF (_check.crmacct_type = 'I') THEN _sec := 'PPD'; ELSE _sec := 'CCD'; IF (_check.crmacct_id IS NULL) THEN RAISE NOTICE 'Vendor % does not have a corresponding crmacct record.', _check.checkhead_recip_id; ELSIF (_check.crmacct_type IS NULL) THEN RAISE NOTICE 'crmacct for vendor % does not have a valid crmacct_type.', _check.checkhead_recip_id; END IF; END IF; _ccdnumber := CASE WHEN _check.vend_ach_use_vendinfo THEN _check.vend_number ELSE _check.vend_ach_indiv_number END; _ccdname := CASE WHEN _check.vend_ach_use_vendinfo THEN _check.vend_name ELSE _check.vend_ach_indiv_name END; IF (COALESCE(_check.vend_ach_routingnumber, '') = '') THEN RAISE EXCEPTION 'Cannot write % check % to an ACH file because the routing number for % has not been supplied.', _bank.bankaccnt_name, _check.checkhead_number, _ccdnumber; ELSIF (COALESCE(_check.vend_ach_accntnumber, '') = '') THEN RAISE EXCEPTION 'Cannot write % check % to an ACH file because the account number for % has not been supplied.', _bank.bankaccnt_name, _check.checkhead_number, _ccdnumber; END IF; _check.vend_ach_routingnumber := decrypt(setbytea(_check.vend_ach_routingnumber), setbytea(penckey), 'bf'); _check.vend_ach_accntnumber := decrypt(setbytea(_check.vend_ach_accntnumber), setbytea(penckey), 'bf'); _transactionprefix := CASE WHEN (_check.vend_ach_accnttype = 'K') THEN '2' WHEN (_check.vend_ach_accnttype = 'C') THEN '3' END; -- create separate batches for each check date and for PPD vs CCD IF (COALESCE(_batchdate, startOfTime()) != _check.checkhead_checkdate OR (_prevsec != _sec)) THEN IF (_batchcount > 0) THEN _rowcount := _rowcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BATCHCONTROL'; -- keep in sync with the other batchcontrol record format below _row.achline_value := RPAD('8' || _serviceclass || RPAD(TO_CHAR(_entrycount, '000000SG'), 6) || RPAD(TO_CHAR(_batchhash % 10000000000, '0000000000SG'), 10) || RPAD(TO_CHAR(_batchdb, '0000000000V99SG'), 12) || RPAD(TO_CHAR(_batchcr, '0000000000V99SG'), 12) || RPAD(formatAchCompanyId(), 10) || RPAD(' ', 19) || RPAD(' ', 6) || RPAD(_bank.bankaccnt_routing, 8) || RPAD(TO_CHAR(_batchcount, '0000000SG'), 7), 94); RETURN NEXT _row; END IF; _batchhash := 0; _batchcr := 0; _batchdb := 0; _batchdate := _check.checkhead_checkdate; _entrycount := 0; _rowcount := _rowcount + 1; _batchcount := _batchcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BATCHHEADER'; -- effective entry date = 1 or 2 banking days after the banking day -- of processing (the following accounts for weekends but not holidays) _row.achline_value := RPAD('5' || _serviceclass || RPAD(fetchMetricText('ACHCompanyName'), 16) || RPAD('', 20) -- TODO: find a use || RPAD(formatAchCompanyId(), 10) || _sec || RPAD('xTuple ERP', 10) || TO_CHAR(_check.checkhead_checkdate, 'YYMMDD') || TO_CHAR(CURRENT_DATE + COALESCE(_bank.bankaccnt_ach_leadtime,1) + CASE WHEN EXTRACT(DOW FROM CURRENT_DATE) = 5 THEN 2 WHEN EXTRACT(DOW FROM CURRENT_DATE) = 6 THEN 1 ELSE 0 END, 'YYMMDD') || RPAD('', 3) || '1' || RPAD(_bank.bankaccnt_routing, 8) || RPAD(TO_CHAR(_batchcount, '0000000SG'), 7), 94); RETURN NEXT _row; END IF; _row.achline_checkhead_id := _check.checkhead_id; _row.achline_batch := _filenum; _row.achline_type := _sec; IF (_sec = 'CCD' OR _sec = 'PPD') THEN _rowcount := _rowcount + 1; _entrycount := _entrycount + 1; _totalentrycnt := _totalentrycnt + 1; _batchhash := _batchhash + CAST(SUBSTRING(_bank.bankaccnt_routing FOR 8) AS INTEGER); _totalhash := _totalhash + CAST(SUBSTRING(_bank.bankaccnt_routing FOR 8) AS INTEGER); _batchdb := _batchdb + _check.checkhead_amount; _totaldb := _totaldb + _check.checkhead_amount; _row.achline_value := RPAD('6' || _transactionprefix || '7' -- debit || RPAD(_bank.bankaccnt_routing, 9) -- 2 fields || RPAD(_bank.bankaccnt_accntnumber, 17) || RPAD(TO_CHAR(_check.checkhead_amount, '00000000V99SG'), 10) || RPAD(fetchMetricText('ACHCompanyId'), 15) || RPAD(fetchMetricText('ACHCompanyName'), 22) || RPAD(TO_CHAR(_check.checkhead_id % 100, '00SG'), 2) -- last 2 digits of checkhead_id || '0' || RPAD(_bank.bankaccnt_routing, 9) -- split field || RPAD(TO_CHAR(_entrycount, '000000SG'), 15-9), 94); RETURN NEXT _row; _rowcount := _rowcount + 1; _entrycount := _entrycount + 1; _totalentrycnt := _totalentrycnt + 1; _batchhash := _batchhash + CAST(SUBSTRING(formatbytea(_check.vend_ach_routingnumber) FOR 8) AS INTEGER); _totalhash := _totalhash + CAST(SUBSTRING(formatbytea(_check.vend_ach_routingnumber) FOR 8) AS INTEGER); _totalcr := _totalcr + _check.checkhead_amount; _batchcr := _batchcr + _check.checkhead_amount; _row.achline_value := RPAD('6' || _transactionprefix || '2' -- credit || RPAD(formatbytea(_check.vend_ach_routingnumber), 9) -- 2 fields || RPAD(formatbytea(_check.vend_ach_accntnumber), 17) || RPAD(TO_CHAR(_check.checkhead_amount, '00000000V99SG'), 10) || RPAD(_ccdnumber, 15) || RPAD(_ccdname, 22) || RPAD(TO_CHAR(_check.checkhead_id % 100, '00SG'), 2) -- last 2 digits of checkhead_id || '0' || RPAD(_bank.bankaccnt_routing, 9) -- split field || RPAD(TO_CHAR(_entrycount, '000000SG'), 15-9), 94); RETURN NEXT _row; ELSE RAISE EXCEPTION 'Cannot write % check % to an ACH file because % is not a supported SEC code.', _bank.bankaccnt_name, _check.checkhead_number, _sec; END IF; UPDATE checkhead SET checkhead_ach_batch=_filenum, checkhead_number=_check.checkhead_number WHERE (checkhead_id=_check.checkhead_id); END LOOP; IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot write an ACH file for % because there are no checks pending in USD for ACH-enabled Vendors.', _bank.bankaccnt_name; END IF; -- place a final batch control record IF (_batchcount > 0) THEN _rowcount := _rowcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BATCHCONTROL'; -- keep in sync with the other batchcontrol record format above _row.achline_value := RPAD('8' || _serviceclass || RPAD(TO_CHAR(_entrycount, '000000SG'), 6) || RPAD(TO_CHAR(_batchhash % 10000000000, '0000000000SG'), 10) || RPAD(TO_CHAR(_batchdb, '0000000000V99SG'), 12) || RPAD(TO_CHAR(_batchcr, '0000000000V99SG'), 12) || RPAD(formatAchCompanyId(), 10) || RPAD(' ', 19) || RPAD(' ', 6) || RPAD(_bank.bankaccnt_routing, 8) || RPAD(TO_CHAR(_batchcount, '0000000SG'), 7), 94); RETURN NEXT _row; END IF; -- and end with a file control record _rowcount := _rowcount + 1; _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'FILECONTROL'; _row.achline_value := RPAD('9' || RPAD(TO_CHAR(_batchcount, '000000SG'), 6) || RPAD(TO_CHAR(_rowcount, '000000SG'), 6) || RPAD(TO_CHAR(_totalentrycnt, '00000000SG'), 8) || RPAD(TO_CHAR(_totalhash % 10000000000, '0000000000SG'), 10) || RPAD(TO_CHAR(_totaldb, '0000000000V99SG'), 12) || RPAD(TO_CHAR(_totalcr, '0000000000V99SG'), 12) || RPAD('', 39), 94); RETURN NEXT _row; -- file must be a multiple of 10 lines long _row.achline_checkhead_id := NULL; _row.achline_batch := _filenum; _row.achline_type := 'BLOCKFILL'; WHILE (_rowcount % 10 > 0) LOOP _rowcount := _rowcount + 1; _row.achline_value := RPAD('99999999999999999999' || '99999999999999999999' || '99999999999999999999' || '99999999999999999999' || '99999999999999999999', 94); RETURN NEXT _row; END LOOP; UPDATE bankaccnt SET bankaccnt_ach_lastdate=CURRENT_DATE, bankaccnt_ach_lastfileid=_bank.bankaccnt_ach_lastfileid WHERE (bankaccnt_id=_bank.bankaccnt_id); RETURN; END; $_$; >DROP FUNCTION public.formatachchecks(integer, integer, text); publicadminfalse83992257112551682372formatachcompanyid()FUNCTIONCREATE FUNCTION formatachcompanyid() RETURNS text LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN CASE WHEN fetchMetricText('ACHCompanyIdType') = 'D' THEN '3' WHEN fetchMetricText('ACHCompanyIdType') = 'E' THEN '1' WHEN fetchMetricText('ACHCompanyIdType') = 'O' THEN '9' END || CASE WHEN fetchMetricText('ACHCompanyIdType') = 'D' OR fetchMetricText('ACHCompanyIdType') = 'E' THEN REPLACE(fetchMetricText('ACHCompanyId'), '-', '') ELSE fetchMetricText('ACHCompanyId') END; END; $$; +DROP FUNCTION public.formatachcompanyid(); publicadminfalse8399212551682373+formataddr(text, text, text, text, integer)FUNCTIONCREATE FUNCTION formataddr(text, text, text, text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE f_addr1 ALIAS FOR $1; f_addr2 ALIAS FOR $2; f_addr3 ALIAS FOR $3; csz ALIAS FOR $4; line ALIAS FOR $5; BEGIN RETURN formatAddr(f_addr1, f_addr2, f_addr3, csz, '', line); END; $_$; BDROP FUNCTION public.formataddr(text, text, text, text, integer); publicadminfalse83992!125516823741formataddr(text, text, text, text, text, integer)FUNCTION CREATE FUNCTION formataddr(text, text, text, text, text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE f_addr1 ALIAS FOR $1; f_addr2 ALIAS FOR $2; f_addr3 ALIAS FOR $3; csz ALIAS FOR $4; country ALIAS FOR $5; line ALIAS FOR $6; i int:=0; BEGIN IF (LENGTH(TRIM(both from f_addr1)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN f_addr1; END IF; IF (LENGTH(TRIM(both from f_addr2)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN f_addr2; END IF; IF (LENGTH(TRIM(both from f_addr3)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN f_addr3; END IF; IF (LENGTH(TRIM(both from csz)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN csz; END IF; IF (LENGTH(TRIM(both from country)) > 0) THEN i:=i+1; END IF; IF (i=line) THEN RETURN country; END IF; RETURN ' '; END; $_$; HDROP FUNCTION public.formataddr(text, text, text, text, text, integer); publicadminfalse83992412551682375(formataddr(text, text, text, text, text)FUNCTIONCREATE FUNCTION formataddr(text, text, text, text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE f_addr1 ALIAS FOR $1; f_addr2 ALIAS FOR $2; f_addr3 ALIAS FOR $3; csz ALIAS FOR $4; country ALIAS FOR $5; addr TEXT:=''; BEGIN IF (LENGTH(TRIM(both from f_addr1)) > 0) THEN addr:=f_addr1; END IF; IF (LENGTH(TRIM(both from f_addr2)) > 0) THEN IF (LENGTH(TRIM(both from addr)) > 0) THEN addr:=addr || E'\n'; END IF; addr:=addr || f_addr2; END IF; IF (LENGTH(TRIM(both from f_addr3)) > 0) THEN IF (LENGTH(TRIM(both from addr)) > 0) THEN addr:=addr || E'\n'; END IF; addr:=addr || f_addr3; END IF; IF (LENGTH(TRIM(both from csz)) > 0) THEN IF (LENGTH(TRIM(both from addr)) > 0) THEN addr:=addr || E'\n'; END IF; addr:=addr || csz; END IF; IF (LENGTH(TRIM(both from country)) > 0) THEN IF (LENGTH(TRIM(both from addr)) > 0) THEN addr:=addr || E'\n'; END IF; addr:=addr || country; END IF; RETURN addr; END; $_$; ?DROP FUNCTION public.formataddr(text, text, text, text, text); publicadminfalse8399212551682376formataddr(integer)FUNCTION"CREATE FUNCTION formataddr(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAddrId ALIAS FOR $1; _return TEXT; BEGIN -- US conventions SELECT formatAddr(addr_line1, addr_line2, addr_line3, addr_city || ', ' || addr_state || ' ' || addr_postalcode, addr_country) INTO _return FROM addr WHERE (addr_id=pAddrId); RETURN _return; END; $_$; *DROP FUNCTION public.formataddr(integer); publicadminfalse8399212551682377formatboolyn(boolean)FUNCTIONOCREATE FUNCTION formatboolyn(boolean) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBool ALIAS FOR $1; BEGIN IF (pBool) THEN RETURN 'Yes'; ELSE RETURN 'No'; END IF; END; $_$; ,DROP FUNCTION public.formatboolyn(boolean); publicadminfalse83992812551682378formatbooseq(integer, integer)FUNCTIONCREATE FUNCTION formatbooseq(integer, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pBooitemSeqId ALIAS FOR $2; _result TEXT; BEGIN IF (fetchMetricBool('Routings')) THEN SELECT booitem_seqnumber::text INTO _result FROM xtmfg.booitem(pItemid) WHERE (booitem_seq_id=pBooitemSeqId); RETURN _result; ELSE RETURN NULL; END IF; END; $_$; 5DROP FUNCTION public.formatbooseq(integer, integer); publicadminfalse83992912551682379formatbytea(bytea)FUNCTIONICREATE FUNCTION formatbytea(bytea) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pField ALIAS FOR $1; output_field TEXT; BEGIN output_field := pField; RETURN output_field; END; $_$; )DROP FUNCTION public.formatbytea(bytea); publicadminfalse83992M12551682380formatccdashes(text, text)FUNCTION!CREATE FUNCTION formatccdashes(text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCCard ALIAS FOR $1; pCCardType ALIAS FOR $2; _returnCard text; card_length integer; BEGIN IF (pCCardType = 'A') THEN _returnCard := pCCard; RETURN _returnCard; END IF; card_length := length(pCcard); if (card_length = 16) THEN _returnCard := substr(pCCard, 1, 4) || '-' || substr(pCCard, 5, 4) || '-' || substr(pCCard, 9, 4) || '-' || substr(pCCard, 13, 4); ELSE _returnCard := substr(pCCard, 1, 4) || '-' || substr(pCCard, 5, 4) || '-' || substr(pCCard, 9, 4) || '-' || substr(pCCard, 13, 1); END IF; RETURN _returnCard; END; $_$; 1DROP FUNCTION public.formatccdashes(text, text); publicadminfalse83992O12551682381formatccnumber(text)FUNCTIONCREATE FUNCTION formatccnumber(text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardnum ALIAS FOR $1; card_length INTEGER; output_cardnum TEXT; BEGIN card_length := length(pCcardnum); IF (card_length = 13) THEN output_cardnum := '*********' || substr(pCcardnum, 10, 4); END IF; IF (card_length = 14) THEN output_cardnum := '**********' || substr(pCcardnum, 11, 4); END IF; IF (card_length = 15) THEN output_cardnum := '***********' || substr(pCcardnum, 12, 4); END IF; IF (card_length = 16) THEN output_cardnum := '************' || substr(pCcardnum, 13, 4); END IF; RETURN output_cardnum; END; $_$; +DROP FUNCTION public.formatccnumber(text); publicadminfalse83992T12551682382formatccnumber(bytea)FUNCTIONCREATE FUNCTION formatccnumber(bytea) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardnum ALIAS FOR $1; card_length INTEGER; output_cardnum TEXT; BEGIN card_length := length(pCcardnum); IF (card_length = 13) THEN output_cardnum := '*********' || substr(pCcardnum, 10, 4); END IF; IF (card_length = 14) THEN output_cardnum := '**********' || substr(pCcardnum, 11, 4); END IF; IF (card_length = 15) THEN output_cardnum := '***********' || substr(pCcardnum, 12, 4); END IF; IF (card_length = 16) THEN output_cardnum := '************' || substr(pCcardnum, 13, 4); END IF; RETURN output_cardnum; END; $_$; ,DROP FUNCTION public.formatccnumber(bytea); publicadminfalse83992W12551682383formatcntctname(integer)FUNCTIONCREATE FUNCTION formatcntctname(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntctId ALIAS FOR $1; _r RECORD; _rows NUMERIC; BEGIN SELECT cntct_honorific, cntct_first_name, cntct_middle, cntct_last_name, cntct_suffix INTO _r FROM cntct WHERE (cntct_id=pCntctId); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0) THEN RETURN ''; END IF; RETURN formatCntctName(_r.cntct_honorific, _r.cntct_first_name, _r.cntct_middle, _r.cntct_last_name, _r.cntct_suffix); END; $_$; /DROP FUNCTION public.formatcntctname(integer); publicadminfalse83992~12551682384-formatcntctname(text, text, text, text, text)FUNCTIONACREATE FUNCTION formatcntctname(text, text, text, text, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pHonorific ALIAS FOR $1; pFirstName ALIAS FOR $2; pMiddle ALIAS FOR $3; pLastName ALIAS FOR $4; pSuffix ALIAS FOR $5; _name TEXT := ''; BEGIN IF (LENGTH(TRIM(both from COALESCE(pHonorific,''))) > 0) THEN IF (POSITION('.' IN COALESCE(pHonorific, '')) > 0) THEN _name:= pHonorific; ELSE _name:= pHonorific || '.'; END IF; END IF; IF (LENGTH(TRIM(both from COALESCE(pFirstName,''))) > 0) THEN IF (LENGTH(TRIM(both from _name)) > 0) THEN _name:=_name || ' '; END IF; _name:=_name || pFirstName; END IF; IF (LENGTH(TRIM(both from COALESCE(pMiddle,''))) > 0) THEN IF (LENGTH(TRIM(both from _name)) > 0) THEN _name:=_name || ' '; END IF; IF (POSITION('.' IN COALESCE(pHonorific, '')) > 0) THEN _name:=_name || pMiddle; ELSE _name:=_name || pMiddle || '.'; END IF; END IF; IF (LENGTH(TRIM(both from COALESCE(pLastName,''))) > 0) THEN IF (LENGTH(TRIM(both from _name)) > 0) THEN _name:=_name || ' '; END IF; _name:=_name || pLastName; END IF; IF (LENGTH(TRIM(both from COALESCE(pSuffix,''))) > 0) THEN IF (LENGTH(TRIM(both from _name)) > 0) THEN _name:=_name || ' '; END IF; _name:=_name || pSuffix; END IF; RETURN _name; END; $_$; DDROP FUNCTION public.formatcntctname(text, text, text, text, text); publicadminfalse8399212551682385formatcost(numeric)FUNCTIONCREATE FUNCTION formatcost(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'cost'); END;$_$; *DROP FUNCTION public.formatcost(numeric); publicadminfalse83992y12551682386formatcounttagbarcode(integer)FUNCTIONCREATE FUNCTION formatcounttagbarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCnttagid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138CTXX' || LTRIM(TO_CHAR(LENGTH(invcnt_tagnumber), '00')) || invcnt_tagnumber ) INTO _barcode FROM invcnt WHERE (invcnt_id=pCnttagid); RETURN _barcode; END; $_$; 5DROP FUNCTION public.formatcounttagbarcode(integer); publicadminfalse83992|12551682387formatcreditmemonumber(integer)FUNCTIONCREATE FUNCTION formatcreditmemonumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; BEGIN RETURN ( SELECT COALESCE(cmhead_number::TEXT, '') FROM cmhead WHERE (cmhead_id=pCmheadid) ); END; $_$; 6DROP FUNCTION public.formatcreditmemonumber(integer); publicadminfalse8399212551682388formatdate(date)FUNCTIONCREATE FUNCTION formatdate(date) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, COALESCE((SELECT locale_dateformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ), 'yyyy-mm-dd') ) AS result $_$; 'DROP FUNCTION public.formatdate(date); publicadminfalse812551682389formatdate(date, text)FUNCTIONCREATE FUNCTION formatdate(date, text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pDate ALIAS FOR $1; pString ALIAS FOR $2; BEGIN IF ( (pDate = startOfTime()) OR (pDate = endOfTime()) OR (pDate IS NULL) ) THEN RETURN pString; ELSE RETURN formatDate(pDate); END IF; END; $_$; -DROP FUNCTION public.formatdate(date, text); publicadminfalse8399212551682390$formatdate(timestamp with time zone)FUNCTIONCREATE FUNCTION formatdate(timestamp with time zone) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, COALESCE((SELECT locale_dateformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ), 'yyyy-mm-dd' )) AS result $_$; ;DROP FUNCTION public.formatdate(timestamp with time zone); publicadminfalse812551682391(formatdatetime(timestamp with time zone)FUNCTION"CREATE FUNCTION formatdatetime(timestamp with time zone) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, COALESCE((SELECT locale_timestampformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ), 'yyyy-mm-dd HH24:MI:SS')) AS result $_$; ?DROP FUNCTION public.formatdatetime(timestamp with time zone); publicadminfalse812551682392+formatdatetime(timestamp without time zone)FUNCTION%CREATE FUNCTION formatdatetime(timestamp without time zone) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, COALESCE((SELECT locale_timestampformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ), 'yyyy-mm-dd HH24:MI:SS')) AS result $_$; BDROP FUNCTION public.formatdatetime(timestamp without time zone); publicadminfalse812551682393formatextprice(numeric)FUNCTIONCREATE FUNCTION formatextprice(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'extprice'); END;$_$; .DROP FUNCTION public.formatextprice(numeric); publicadminfalse8399212551682394formatflitemdescrip(integer)FUNCTION CREATE FUNCTION formatflitemdescrip(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlitemId ALIAS FOR $1; _x RECORD; _descrip TEXT; BEGIN SELECT flitem_accnt_id, flitem_company, flitem_profit, flitem_number, flitem_sub, flitem_type, flitem_subaccnttype_code, accnt_id, accnt_descrip INTO _x FROM flitem LEFT OUTER JOIN accnt ON flitem_accnt_id=accnt_id WHERE flitem_id=pFlitemId; IF _x.flitem_accnt_id > -1 THEN SELECT (formatGLAccount(_x.accnt_id) || '-' || _x.accnt_descrip) INTO _descrip; ELSE _descrip:=''; IF _x.flitem_type = 'A' THEN _descrip:='Type=' || 'Asset'; ELSE IF _x.flitem_type='L' THEN _descrip:='Type=' || 'Liability'; ELSE IF _x.flitem_type='R' THEN _descrip:='Type=' || 'Revenue'; ELSE IF _x.flitem_type='E' THEN _descrip:='Type=' || 'Expense'; ELSE IF _x.flitem_type='Q' THEN _descrip:='Type=' || 'Equity'; END IF; END IF; END IF; END IF; END IF; IF _x.flitem_subaccnttype_code <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Sub Accnt Type=' || _x.flitem_subaccnttype_code; END IF; IF _x.flitem_company <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Company=' || _x.flitem_company; END IF; IF _x.flitem_profit <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Profit=' || _x.flitem_profit; END IF; IF _x.flitem_number <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Number=' || _x.flitem_number; END IF; IF _x.flitem_sub <> 'All' THEN IF (LENGTH(TRIM(both from _descrip)) > 0) THEN _descrip:=_descrip || ', '; END IF; _descrip:=_descrip || 'Sub Accnt=' || _x.flitem_sub; END IF; END IF; RETURN _descrip; END; $_$; 3DROP FUNCTION public.formatflitemdescrip(integer); publicadminfalse8399212551682396'formatglaccount(text, text, text, text)FUNCTIONCREATE FUNCTION formatglaccount(text, text, text, text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCompany ALIAS FOR $1; pProfit ALIAS FOR $2; pNumber ALIAS FOR $3; pSub ALIAS FOR $4; _number TEXT := ''; BEGIN IF ( ( SELECT metric_value::INTEGER FROM metric WHERE (metric_name='GLCompanySize') ) > 0 ) THEN _number := pCompany || '-'; END IF; IF ( ( SELECT metric_value::INTEGER FROM metric WHERE (metric_name='GLProfitSize') ) > 0 ) THEN _number := _number || pProfit || '-'; END IF; _number := _number || pNumber; IF ( ( SELECT metric_value::INTEGER FROM metric WHERE (metric_name='GLSubaccountSize') ) > 0 ) THEN _number := _number || '-' || pSub; END IF; RETURN _number; END; $_$; >DROP FUNCTION public.formatglaccount(text, text, text, text); publicadminfalse8399212551682397formatglaccountlong(integer)FUNCTIONCREATE FUNCTION formatglaccountlong(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntid ALIAS FOR $1; _result TEXT; BEGIN SELECT (formatGLAccount(accnt_id) || '-' || accnt_descrip) INTO _result FROM accnt WHERE (accnt_id=pAccntid); RETURN _result; END; $_$; 3DROP FUNCTION public.formatglaccountlong(integer); publicadminfalse83992V12551682398formatindent(text, integer)FUNCTIONCREATE FUNCTION formatindent(text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pText ALIAS FOR $1; pIndent ALIAS FOR $2; _i INTEGER; _result TEXT; BEGIN _result := ''; _i := 0; WHILE _i < pIndent LOOP _result := _result || ' '; _i := _i + 1; END LOOP; _result := _result || pText; RETURN _result; END; $_$; 2DROP FUNCTION public.formatindent(text, integer); publicadminfalse8399212551682399formatinterval(numeric)FUNCTION<CREATE FUNCTION formatinterval(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR(('@ ' || trunc($1) || ' min ' || ($1 - trunc($1)) * 60 || ' sec')::INTERVAL, ( SELECT locale_intervalformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ) ) AS result $_$; .DROP FUNCTION public.formatinterval(numeric); publicadminfalse812551682400formatinterval(interval)FUNCTIONCREATE FUNCTION formatinterval(interval) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, ( SELECT locale_intervalformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ) ) AS result $_$; /DROP FUNCTION public.formatinterval(interval); publicadminfalse8 12551682401formatinvcnumber(integer)FUNCTIONCREATE FUNCTION formatinvcnumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; BEGIN RETURN ( SELECT COALESCE(cobmisc_invcnumber::TEXT, '') FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ); END; $_$; 0DROP FUNCTION public.formatinvcnumber(integer); publicadminfalse8399212551682402formatitemsitebarcode(integer)FUNCTION|CREATE FUNCTION formatitemsitebarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138ISXX' || LTRIM(TO_CHAR(LENGTH(item_number), '00')) || LENGTH(warehous_code)::TEXT || item_number || warehous_code ) INTO _barcode FROM itemsite, item, whsinfo WHERE ( (itemsite_item_id=item_id) AND (itemsite_warehous_id=warehous_id) AND (itemsite_id=pItemsiteid) ); RETURN _barcode; END; $_$; 5DROP FUNCTION public.formatitemsitebarcode(integer); publicadminfalse8399212551682403formatlocationbarcode(integer)FUNCTION^CREATE FUNCTION formatlocationbarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138LOXX' || LENGTH(warehous_code)::TEXT || LTRIM(TO_CHAR(LENGTH(location_name::TEXT), '00')) || warehous_code || location_name ) INTO _barcode FROM location, whsinfo WHERE ( (location_warehous_id=warehous_id) AND (location_id=pLocationid) ); RETURN _barcode; END; $_$; 5DROP FUNCTION public.formatlocationbarcode(integer); publicadminfalse8399212551682404&formatlocationcontentsbarcode(integer)FUNCTION`CREATE FUNCTION formatlocationcontentsbarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138LOCN' || LENGTH(warehous_code)::TEXT || LTRIM(TO_CHAR(LENGTH(location_name), '00')) || warehous_code || location_name ) INTO _barcode FROM location, whsinfo WHERE ( (location_warehous_id=warehous_id) AND (location_id=pLocationid) ); RETURN _barcode; END; $_$; =DROP FUNCTION public.formatlocationcontentsbarcode(integer); publicadminfalse8399212551682405#formatlocationissuebarcode(integer)FUNCTION]CREATE FUNCTION formatlocationissuebarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138LOIS' || LENGTH(warehous_code)::TEXT || LTRIM(TO_CHAR(LENGTH(location_name), '00')) || warehous_code || location_name ) INTO _barcode FROM location, whsinfo WHERE ( (location_warehous_id=warehous_id) AND (location_id=pLocationid) ); RETURN _barcode; END; $_$; :DROP FUNCTION public.formatlocationissuebarcode(integer); publicadminfalse8399212551682407formatlotserialnumber(integer)FUNCTION CREATE FUNCTION formatlotserialnumber(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLotSerialId ALIAS FOR $1; _lotserial TEXT; BEGIN --See if lot serial control turned on (Postbooks will not ever have this) IF (fetchmetricbool('LotSerialControl')) THEN SELECT ls_number INTO _lotserial FROM ls WHERE (ls_id=pLotSerialId); END IF; RETURN COALESCE(_lotserial,''); END; $_$; 5DROP FUNCTION public.formatlotserialnumber(integer); publicadminfalse8399212551682408formatmoney(numeric)FUNCTIONCREATE FUNCTION formatmoney(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'curr'); END;$_$; +DROP FUNCTION public.formatmoney(numeric); publicadminfalse8399212551682409formatnumeric(numeric, text)FUNCTION} CREATE FUNCTION formatnumeric(numeric, text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC := $1; _type TEXT := LOWER(COALESCE($2, 'curr')); _abs NUMERIC; _magnitudecnt NUMERIC(1000); _wholefmt TEXT := '0'; _scale INTEGER; _neg TEXT; _decimal TEXT; _group TEXT; _string TEXT; _debug BOOL := false; _r RECORD; BEGIN -- If the value passed in is NULL then we want to pass back an empty string IF(_value IS NULL) THEN RETURN ''; END IF; SELECT * INTO _r FROM locale WHERE (locale_id=getUsrLocaleId()); _decimal := COALESCE(SUBSTRING(_r.locale_qtyformat FROM 1 FOR 1), '.'); _neg := COALESCE(SUBSTRING(_r.locale_qtyformat FROM 2 FOR 1), '-'); _group := COALESCE(SUBSTRING(_r.locale_qtyformat FROM 3 FOR 1), ','); _scale := CASE WHEN _type = 'cost' THEN _r.locale_cost_scale WHEN _type = 'extprice' THEN _r.locale_extprice_scale WHEN _type = 'percent' THEN _r.locale_percent_scale WHEN _type = 'purchprice' THEN _r.locale_purchprice_scale WHEN _type = 'qty' THEN _r.locale_qty_scale WHEN _type = 'qtyper' THEN _r.locale_qtyper_scale WHEN _type = 'salesprice' THEN _r.locale_salesprice_scale WHEN _type = 'uomratio' THEN _r.locale_uomratio_scale WHEN _type = 'weight' THEN _r.locale_weight_scale WHEN SUBSTRING(_type FOR 4) = 'curr' THEN _r.locale_curr_scale ELSE 2 END; _value := round(_value, _scale); _abs := ABS(_value); _magnitudecnt := TRUNC(_abs / 10); IF (_debug) THEN RAISE NOTICE '_value % _abs % _scale % _neg % _decimal % _group % ', _value, _abs, _scale, _decimal, _group, _scale; END IF; IF (_value < 0) THEN _string := _neg; ELSE _string := ''; END IF; WHILE (_magnitudecnt >= 1) LOOP _magnitudecnt := TRUNC(_magnitudecnt / 10); IF (LENGTH(_wholefmt) % 3 = 0) THEN _wholefmt := '"' || _group || '"' || _wholefmt; END IF; _wholefmt := '9' || _wholefmt; END LOOP; IF (_scale > 0) THEN _abs := (_abs * (10 ^ _scale)); _abs := TRUNC(_abs); _wholefmt := _wholefmt || '"' || _decimal || '"' || REPEAT('0', _scale); END IF; _wholefmt := 'FM' || _wholefmt; _string := _string || to_char(_abs, _wholefmt); RETURN _string; END;$_$; 3DROP FUNCTION public.formatnumeric(numeric, text); publicadminfalse8399212551682410$formatperiodname(integer, character)FUNCTION`CREATE FUNCTION formatperiodname(integer, character) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodId ALIAS FOR $1; pInterval ALIAS FOR $2; _result TEXT; BEGIN --...for Month IF (pInterval='M') THEN SELECT (CASE WHEN period_name='' THEN formatdate(period_start) || '-' || formatdate(period_end) ELSE period_name END) INTO _result FROM period WHERE (period_id=pPeriodId); RETURN _result; --...for Quarter ELSE IF (pInterval='Q') THEN SELECT ('Q' || period_quarter || '-' || EXTRACT(year from yearperiod_end)) INTO _result FROM period, yearperiod WHERE ((period_id=pPeriodId) AND (period_yearperiod_id=yearperiod_id)); RETURN _result; --...for Year ELSE SELECT EXTRACT(year FROM yearperiod_end) INTO _result FROM period,yearperiod WHERE ((period_id=pPeriodId) AND (period_yearperiod_id=yearperiod_id)); RETURN _result; END IF; END IF; RETURN 'Err'; END; $_$; ;DROP FUNCTION public.formatperiodname(integer, character); publicadminfalse8399212551682411formatplonumber(integer)FUNCTIONCREATE FUNCTION formatplonumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPlanordid ALIAS FOR $1; _result TEXT; BEGIN SELECT (TEXT(planord_number) || '-' || TEXT(planord_subnumber)) INTO _result FROM planord WHERE (planord_id=pPlanordid); RETURN _result; END; $_$; /DROP FUNCTION public.formatplonumber(integer); publicadminfalse8399212551682412formatprcnt(numeric)FUNCTIONCREATE FUNCTION formatprcnt(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric($1 * 100, 'percent') AS result $_$; +DROP FUNCTION public.formatprcnt(numeric); publicadminfalse812551682413formatprice(numeric)FUNCTIONCREATE FUNCTION formatprice(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric($1, 'salesprice') AS result; $_$; +DROP FUNCTION public.formatprice(numeric); publicadminfalse812551682414formatpurchprice(numeric)FUNCTIONCREATE FUNCTION formatpurchprice(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'purchprice'); END;$_$; 0DROP FUNCTION public.formatpurchprice(numeric); publicadminfalse8399212551682415formatqty(numeric)FUNCTION CREATE FUNCTION formatqty(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'qty'); END;$_$; )DROP FUNCTION public.formatqty(numeric); publicadminfalse8399212551682416formatqtyper(numeric)FUNCTIONCREATE FUNCTION formatqtyper(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'qtyper'); END;$_$; ,DROP FUNCTION public.formatqtyper(numeric); publicadminfalse8399212551682417formatratio(numeric)FUNCTIONCREATE FUNCTION formatratio(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric($1, 'uomratio'); $_$; +DROP FUNCTION public.formatratio(numeric); publicadminfalse812551682418formatrevnumber(text, integer)FUNCTIONMCREATE FUNCTION formatrevnumber(text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pRevType ALIAS FOR $1; pRevId ALIAS FOR $2; _revision TEXT; BEGIN --See if revision control turned on (Postbooks will not ever have this) IF (fetchmetricbool('RevControl')) THEN SELECT rev_number INTO _revision FROM rev WHERE ((rev_target_type=pRevType) AND (rev_id=pRevId)); END IF; RETURN COALESCE(_revision,''); END; $_$; 5DROP FUNCTION public.formatrevnumber(text, integer); publicadminfalse8399212551682419formatsalesprice(numeric)FUNCTIONCREATE FUNCTION formatsalesprice(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'salesprice'); END;$_$; 0DROP FUNCTION public.formatsalesprice(numeric); publicadminfalse8399212551682420formatscrap(numeric)FUNCTIONCREATE FUNCTION formatscrap(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric(($1 * 100), 'percent') AS result $_$; +DROP FUNCTION public.formatscrap(numeric); publicadminfalse812551682421formatshipmentnumber(integer)FUNCTIONCREATE FUNCTION formatshipmentnumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pshipheadid ALIAS FOR $1; BEGIN RETURN ( SELECT COALESCE(shiphead_number::TEXT, '') FROM shiphead WHERE (shiphead_id=pshipheadid) ); END; $_$; 4DROP FUNCTION public.formatshipmentnumber(integer); publicadminfalse3992812551682422formatsobarcode(integer)FUNCTIONCREATE FUNCTION formatsobarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138SOXX' || LENGTH(TEXT(cohead_number)) || TEXT(cohead_number) ) INTO _barcode FROM cohead WHERE (cohead_id=pSoheadid); RETURN _barcode; END; $_$; /DROP FUNCTION public.formatsobarcode(integer); publicadminfalse3992812551682423formatsoitembarcode(integer)FUNCTIONWCREATE FUNCTION formatsoitembarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138SOLI' || LENGTH(TEXT(cohead_number)) || LENGTH(formatsolinenumber(coitem_id)) || TEXT(cohead_number) || formatsolinenumber(coitem_id) ) INTO _barcode FROM cohead, coitem WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_id=pSoitemid) ); RETURN _barcode; END; $_$; 3DROP FUNCTION public.formatsoitembarcode(integer); publicadminfalse8399212551682424formatsoitemnumber(integer)FUNCTIONCREATE FUNCTION formatsoitemnumber(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE targetSoitemid ALIAS FOR $1; BEGIN RETURN ( SELECT (cohead_number::TEXT || '-' || formatsolinenumber(coitem_id)) FROM cohead, coitem WHERE ((coitem_cohead_id=cohead_id) AND (coitem_id=targetSoitemid)) ); END; $_$; 2DROP FUNCTION public.formatsoitemnumber(integer); publicadminfalse83992e12551682426formatsonumber(integer)FUNCTIONCREATE FUNCTION formatsonumber(integer) RETURNS text LANGUAGE sql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT COALESCE((SELECT (text(cohead_number) || '-' || formatSoLineNumber(coitem_id)) FROM coitem JOIN cohead ON (coitem_cohead_id=cohead_id) WHERE (coitem_id=($1))),'DELETED'); $_$; .DROP FUNCTION public.formatsonumber(integer); publicadminfalse8f12551682427$formattime(timestamp with time zone)FUNCTIONCREATE FUNCTION formattime(timestamp with time zone) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT TO_CHAR($1, ( SELECT locale_timeformat FROM locale, usr WHERE ((usr_locale_id=locale_id) AND (usr_username=getEffectiveXtUser())) ) ) AS result $_$; ;DROP FUNCTION public.formattime(timestamp with time zone); publicadminfalse812551682428formattime(numeric)FUNCTIONCREATE FUNCTION formattime(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT LTRIM(TO_CHAR(COALESCE($1, 0), '999999990.0')); $_$; *DROP FUNCTION public.formattime(numeric); publicadminfalse812551682429formatuomratio(numeric)FUNCTIONCREATE FUNCTION formatuomratio(numeric) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN formatNumeric($1, 'uomratio'); END;$_$; .DROP FUNCTION public.formatuomratio(numeric); publicadminfalse8399212551682430formatuserbarcode(integer)FUNCTIONCREATE FUNCTION formatuserbarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUserid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT formatUserBarcode(usr_username) INTO _barcode FROM usr WHERE(usr_id=pUserid); RETURN _barcode; END; $_$; 1DROP FUNCTION public.formatuserbarcode(integer); publicadminfalse8399212551682431formatuserbarcode(text)FUNCTIONCREATE FUNCTION formatuserbarcode(text) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; _barcode TEXT; BEGIN _barcode := ( E'\138USER' || LENGTH(pUsername)::TEXT || pUsername ); RETURN _barcode; END; $_$; .DROP FUNCTION public.formatuserbarcode(text); publicadminfalse8399212551682432formatweight(numeric)FUNCTION CREATE FUNCTION formatweight(numeric) RETURNS text LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT formatNumeric($1, 'weight') AS result $_$; ,DROP FUNCTION public.formatweight(numeric); publicadminfalse812551682433formatwobarcode(integer)FUNCTIONCREATE FUNCTION formatwobarcode(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; _barcode TEXT; BEGIN SELECT ( E'\138WOXX' || LENGTH(wo_number::TEXT) || LENGTH(wo_subnumber::TEXT) || wo_number::TEXT || wo_subnumber::TEXT ) INTO _barcode FROM wo WHERE (wo_id=pWoid); RETURN _barcode; END; $_$; /DROP FUNCTION public.formatwobarcode(integer); publicadminfalse8399212551682434formatwonumber(integer)FUNCTIONCREATE FUNCTION formatwonumber(integer) RETURNS text LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; BEGIN RETURN ( SELECT (wo_number::TEXT || '-' || wo_subnumber::TEXT) FROM wo WHERE (wo_id=pWoid) ); END; $_$; .DROP FUNCTION public.formatwonumber(integer); publicadminfalse3992812551682435formatwooperseq(integer)FUNCTIONCREATE FUNCTION formatwooperseq(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWooperId ALIAS FOR $1; _result TEXT; BEGIN IF pWooperId = -1 THEN RETURN ''; ELSE SELECT wooper_seqnumber INTO _result FROM xtmfg.wooper WHERE (wooper_id=pWooperId); END IF; RETURN _result; END; $_$; /DROP FUNCTION public.formatwooperseq(integer); publicadminfalse3992812551682436forwardupdateaccount(integer)FUNCTIONCREATE FUNCTION forwardupdateaccount(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntid ALIAS FOR $1; _r RECORD; _trialbalid INTEGER; BEGIN SELECT trialbal_id, trialbal_dirty, CASE WHEN (trialbal_dirty) THEN 0 ELSE 1 END AS dirty_seq INTO _r FROM trialbal, period WHERE ((trialbal_period_id=period_id) AND (trialbal_accnt_id=pAccntid)) ORDER BY dirty_seq, period_start LIMIT 1; IF (FOUND) THEN IF (_r.trialbal_dirty) THEN RETURN forwardUpdateTrialBalance(_r.trialbal_id); ELSE RETURN _r.trialbal_id; END IF; ELSE _trialbalid := nextval('trialbal_trialbal_id_seq'); INSERT INTO trialbal ( trialbal_id, trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_debits, trialbal_credits, trialbal_dirty ) SELECT _trialbalid, period_id, pAccntid, 0, 0, 0, 0, FALSE FROM period ORDER BY period_start LIMIT 1; RETURN forwardUpdateTrialBalance(_trialbalid); END IF; RETURN -1; END; $_$; 4DROP FUNCTION public.forwardupdateaccount(integer); publicadminfalse3992812551682437 forwardupdateinvbalance(integer)FUNCTION CREATE FUNCTION forwardupdateinvbalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvbalid ALIAS FOR $1; _p RECORD; _r RECORD; _qohEnding NUMERIC; _valueEnding NUMERIC; _nnEnding NUMERIC; _nnvalEnding NUMERIC; BEGIN SELECT invbal_itemsite_id, invbal_qoh_ending, invbal_value_ending, invbal_nn_ending, invbal_nnval_ending, period_end INTO _p FROM invbal JOIN period ON (invbal_period_id=period_id) JOIN itemsite ON (invbal_itemsite_id=itemsite_id) WHERE (invbal_id=pInvbalid); _qohEnding = _p.invbal_qoh_ending; _valueEnding = _p.invbal_value_ending; _nnEnding = _p.invbal_nn_ending; _nnvalEnding = _p.invbal_nnval_ending; -- Find all of the subsequent periods and their inventory balance, if they exist FOR _r IN SELECT period_id, period_end, invbal_id, invbal_qty_in, invbal_qty_out, invbal_value_in, invbal_value_out, invbal_nn_in, invbal_nn_out, invbal_nnval_in, invbal_nnval_out FROM period LEFT OUTER JOIN invbal ON ( (invbal_period_id=period_id) AND (invbal_itemsite_id=_p.invbal_itemsite_id) ) WHERE (period_start > _p.period_end) ORDER BY period_start LOOP IF (_r.invbal_id IS NULL) THEN INSERT INTO invbal ( invbal_period_id, invbal_itemsite_id, invbal_qoh_beginning, invbal_qoh_ending, invbal_qty_in, invbal_qty_out, invbal_value_beginning, invbal_value_ending, invbal_value_in, invbal_value_out, invbal_nn_beginning, invbal_nn_ending, invbal_nn_in, invbal_nn_out, invbal_nnval_beginning, invbal_nnval_ending, invbal_nnval_in, invbal_nnval_out, invbal_dirty ) VALUES ( _r.period_id, _p.invbal_itemsite_id, _qohEnding, _qohEnding, 0, 0, _valueEnding, _valueEnding, 0, 0, _nnEnding, _nnEnding, 0, 0, _nnvalEnding, _nnvalEnding, 0, 0, FALSE ); ELSE UPDATE invbal SET invbal_qoh_beginning = (_qohEnding), invbal_qoh_ending = (_qohEnding + _r.invbal_qty_in - _r.invbal_qty_out), invbal_value_beginning = (_valueEnding), invbal_value_ending = (_valueEnding + _r.invbal_value_in - _r.invbal_value_out), invbal_nn_beginning = (_nnEnding), invbal_nn_ending = (_nnEnding + _r.invbal_nn_in - _r.invbal_nn_out), invbal_nnval_beginning = (_nnvalEnding), invbal_nnval_ending = (_nnvalEnding + _r.invbal_nnval_in - _r.invbal_nnval_out), invbal_dirty = FALSE WHERE (invbal_id=_r.invbal_id); _qohEnding = (_qohEnding + _r.invbal_qty_in - _r.invbal_qty_out); _valueEnding = (_valueEnding + _r.invbal_value_in - _r.invbal_value_out); _nnEnding = (_nnEnding + _r.invbal_nn_in - _r.invbal_nn_out); _nnvalEnding = (_nnvalEnding + _r.invbal_nnval_in - _r.invbal_nnval_out); END IF; END LOOP; UPDATE invbal SET invbal_dirty = false WHERE (invbal_id=pInvbalid); RETURN pInvbalid; END; $_$; 7DROP FUNCTION public.forwardupdateinvbalance(integer); publicadminfalse39928l12551682438forwardupdateitemsite(integer)FUNCTIONPCREATE FUNCTION forwardupdateitemsite(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; _r RECORD; _invbalid INTEGER; BEGIN SELECT invbal_id INTO _r FROM invbal JOIN period ON (invbal_period_id=period_id) WHERE (invbal_itemsite_id=pItemsiteid) ORDER BY period_start LIMIT 1; IF (FOUND) THEN RETURN forwardUpdateInvbalance(_r.invbal_id); ELSE _invbalid := nextval('invbal_invbal_id_seq'); INSERT INTO invbal ( invbal_id, invbal_period_id, invbal_itemsite_id, invbal_qoh_beginning, invbal_qoh_ending, invbal_qty_in, invbal_qty_out, invbal_value_beginning, invbal_value_ending, invbal_value_in, invbal_value_out, invbal_nn_beginning, invbal_nn_ending, invbal_nn_in, invbal_nn_out, invbal_nnval_beginning, invbal_nnval_ending, invbal_nnval_in, invbal_nnval_out, invbal_dirty ) SELECT _invbalid, period_id, pItemsiteid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false FROM period ORDER BY period_start LIMIT 1; RETURN forwardUpdateInvbalance(_invbalid); END IF; RETURN -1; END; $_$; 5DROP FUNCTION public.forwardupdateitemsite(integer); publicadminfalse83992@12551682439"forwardupdatetrialbalance(integer)FUNCTION# CREATE FUNCTION forwardupdatetrialbalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTrialbalid ALIAS FOR $1; _p RECORD; _r RECORD; _ending NUMERIC; _prevYear INTEGER; _currYear INTEGER; _prevYearClosed BOOLEAN; _currYearClosed BOOLEAN; _result INTEGER; BEGIN SELECT trialbal_accnt_id, trialbal_ending, yearperiod_id, yearperiod_closed, period_end, accnt_type IN ('E', 'R') AS revexp INTO _p FROM trialbal, period, yearperiod, accnt WHERE ( (trialbal_period_id=period_id) AND (yearperiod_id=period_yearperiod_id) AND (trialbal_accnt_id=accnt_id) AND (trialbal_id=pTrialbalid) ); _ending = _p.trialbal_ending; SELECT yearperiod_id, yearperiod_closed INTO _prevYear, _prevYearClosed FROM yearperiod WHERE (_p.period_end BETWEEN yearperiod_start AND yearperiod_end); IF (NOT FOUND) THEN _prevYear := -1; _prevYearClosed := false; END IF; -- Find all of the subsequent periods and their trialbal, if they exist FOR _r IN SELECT period_id, period_end, trialbal_id, trialbal_debits, trialbal_credits, trialbal_yearend FROM period LEFT OUTER JOIN trialbal ON ( (trialbal_period_id=period_id) AND (trialbal_accnt_id=_p.trialbal_accnt_id) ) WHERE (period_start > _p.period_end) ORDER BY period_start LOOP SELECT yearperiod_id, yearperiod_closed INTO _currYear, _currYearClosed FROM yearperiod WHERE (_r.period_end BETWEEN yearperiod_start AND yearperiod_end); IF (NOT FOUND) THEN _currYear := -1; _currYearClosed := false; END IF; IF (_p.revexp AND _currYear != _prevYear) THEN _ending := 0; IF (_prevYearClosed) THEN SELECT updateRetainedEarnings(_prevYear) INTO _result; IF (_result < 0) THEN RETURN _result; END IF; END IF; END IF; _prevYear := _currYear; _prevYearClosed := _currYearClosed; IF (_r.trialbal_id IS NULL) THEN -- SELECT SUM(gltrans_amount) INTO _glAmount -- FROM gltrans -- WHERE ( (gltrans_date BETWEEN _r.period_start and _r.period_end ) -- AND (gltrans_accnt_id=_p.trialbal_accnt_id) -- AND (gltrans_posted) ); -- and change 2nd and 3rd VALUES line of INSERT to read -- _ending, _ending + _glAmount, -- noneg(0 - _glAmount), noneg(_glAmount), FALSE ); INSERT INTO trialbal ( trialbal_period_id, trialbal_accnt_id, trialbal_beginning, trialbal_ending, trialbal_debits, trialbal_credits, trialbal_dirty ) VALUES ( _r.period_id, _p.trialbal_accnt_id, _ending, _ending, 0, 0, FALSE ); ELSE UPDATE trialbal SET trialbal_beginning = (_ending + trialbal_yearend), trialbal_ending = (_ending + trialbal_yearend - _r.trialbal_debits + _r.trialbal_credits), trialbal_dirty = FALSE WHERE (trialbal_id=_r.trialbal_id); _ending = (_ending + _r.trialbal_yearend - _r.trialbal_debits + _r.trialbal_credits); END IF; END LOOP; UPDATE trialbal SET trialbal_dirty = FALSE WHERE (trialbal_id=pTrialbalid); RETURN pTrialbalid; END; $_$; 9DROP FUNCTION public.forwardupdatetrialbalance(integer); publicadminfalse39928A12551682440freezeaccountingperiod(integer)FUNCTIONHCREATE FUNCTION freezeaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; BEGIN -- Check to make use that the period is not already frozen IF ( ( SELECT period_freeze FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -2; END IF; -- Set the period_freeze flag UPDATE period SET period_freeze=TRUE WHERE (period_id=pPeriodid); RETURN pPeriodid; END; $_$; 6DROP FUNCTION public.freezeaccountingperiod(integer); publicadminfalse39928b12552005534Cfreightdetail(text, integer, integer, integer, date, text, integer)FUNCTION$CREATE FUNCTION freightdetail(text, integer, integer, integer, date, text, integer) RETURNS SETOF freightdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrderType ALIAS FOR $1; pOrderId ALIAS FOR $2; pCustId ALIAS FOR $3; pShiptoId ALIAS FOR $4; pOrderDate ALIAS FOR $5; pShipVia ALIAS FOR $6; pCurrId ALIAS FOR $7; _row freightData%ROWTYPE; _order RECORD; _weights RECORD; _includepkgweight BOOLEAN := FALSE; _qry TEXT; _debug BOOLEAN := FALSE; BEGIN IF (_debug) THEN RAISE NOTICE 'pOrderType = %', pOrderType; RAISE NOTICE 'pOrderId = %', pOrderId; RAISE NOTICE 'pCustId = %', pCustId; RAISE NOTICE 'pShiptoId = %', pShiptoId; RAISE NOTICE 'pOrderDate = %', pOrderDate; RAISE NOTICE 'pShipVia = %', pShipVia; RAISE NOTICE 'pCurrId = %', pCurrId; END IF; SELECT fetchMetricBool('IncludePackageWeight') INTO _includepkgweight; --Get the order header information need to match --against price schedules IF (pOrderType = 'SO') THEN SELECT cust_id AS cust_id, custtype_id, custtype_code, COALESCE(shipto_id, -1) AS shipto_id, COALESCE(shipto_num, '') AS shipto_num, COALESCE(pOrderDate, cohead_orderdate) AS orderdate, COALESCE(pShipVia, cohead_shipvia) AS shipvia, shipto_shipzone_id AS shipzone_id, COALESCE(pCurrId, cohead_curr_id) AS curr_id, currConcat(COALESCE(pCurrId, cohead_curr_id)) AS currAbbr INTO _order FROM cohead JOIN custinfo ON (cust_id=COALESCE(pCustId, cohead_cust_id)) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN shiptoinfo ON (shipto_id=COALESCE(pShiptoId, cohead_shipto_id)) WHERE (cohead_id=pOrderId); ELSIF (pOrderType = 'QU') THEN SELECT quhead_cust_id AS cust_id, custtype_id, custtype_code, COALESCE(shipto_id, -1) AS shipto_id, COALESCE(shipto_num, '') AS shipto_num, quhead_quotedate AS orderdate, quhead_shipvia AS shipvia, shipto_shipzone_id AS shipzone_id, quhead_curr_id AS curr_id, currConcat(quhead_curr_id) AS currAbbr INTO _order FROM quhead JOIN custinfo ON (cust_id=quhead_cust_id) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN shiptoinfo ON (shipto_id=quhead_shipto_id) WHERE (quhead_id=pOrderId); ELSIF (pOrderType = 'RA') THEN SELECT cust_id AS cust_id, custtype_id, custtype_code, COALESCE(shipto_id, -1) AS shipto_id, COALESCE(shipto_num, '') AS shipto_num, COALESCE(pOrderDate, rahead_authdate) AS orderdate, ''::text AS shipvia, shipto_shipzone_id AS shipzone_id, COALESCE(pCurrId, rahead_curr_id) AS curr_id, currConcat(COALESCE(pCurrId, rahead_curr_id)) AS currAbbr INTO _order FROM rahead JOIN custinfo ON (cust_id=COALESCE(pCustId, rahead_cust_id)) JOIN custtype ON (custtype_id=cust_custtype_id) LEFT OUTER JOIN shiptoinfo ON (shipto_id=COALESCE(pShiptoId, rahead_shipto_id)) WHERE (rahead_id=pOrderId); ELSE RAISE EXCEPTION 'Invalid order type.'; END IF; IF (_debug) THEN RAISE NOTICE 'cust_id = %', _order.cust_id; RAISE NOTICE 'custtype_id = %', _order.custtype_id; RAISE NOTICE 'shipto_id = %', _order.shipto_id; RAISE NOTICE 'shipto_num = %', _order.shipto_num; RAISE NOTICE 'orderdate = %', _order.orderdate; RAISE NOTICE 'shipvia = %', _order.shipvia; RAISE NOTICE 'shipzone_id = %', _order.shipzone_id; RAISE NOTICE 'curr_id = %', _order.curr_id; RAISE NOTICE 'currAbbr = %', _order.currAbbr; END IF; --Get a list of aggregated weights from sites and --freight classes used on order lines IF (_includePkgWeight) THEN _qry := 'SELECT SUM(orderitem_qty_ordered * orderitem_qty_invuomratio * (item_prodweight + item_packweight)) AS weight, '; ELSE _qry := 'SELECT SUM(orderitem_qty_ordered * orderitem_qty_invuomratio * item_prodweight) AS weight, '; END IF; _qry := _qry || 'itemsite_warehous_id, COALESCE(item_freightclass_id, -1) AS item_freightclass_id FROM orderitem JOIN itemsite ON (itemsite_id=orderitem_itemsite_id) JOIN item ON (item_id=itemsite_item_id) '; IF (pOrderType = 'RA') THEN _qry := _qry || 'JOIN raitem ON ((orderitem_id=raitem_id) AND (raitem_disposition IN (''C'',''R'',''P''))) '; END IF; _qry := _qry || ' WHERE ( (orderitem_orderhead_type=' || quote_literal(pOrderType) || ') AND (orderitem_orderhead_id=' || quote_literal(pOrderId) || ') AND (orderitem_status <> ''X'') ) GROUP BY itemsite_warehous_id, item_freightclass_id;'; FOR _weights IN EXECUTE _qry LOOP _row := calculateFreightDetail( _order.cust_id, --pCustId _order.custtype_id, --pCustTypeId _order.custtype_code, --pCustTypeCode _order.shipto_id, --pShiptoId _order.shipzone_id, --pShipZoneId _order.shipto_num, --pShiptoNum _order.orderdate, --pOrderDate _order.shipvia, --pShipVia _order.curr_id, --pCurrId _order.currAbbr, --pCurrAbbr _weights.itemsite_warehous_id, --pItemSiteWhsId _weights.item_freightclass_id, --pItemFreightclassId _weights.weight --pWeight ); RETURN NEXT _row; END LOOP; RETURN; END; $_$; ZDROP FUNCTION public.freightdetail(text, integer, integer, integer, date, text, integer); publicadminfalse839922587d12552005535Jfreightdetailquote(integer, text, integer, text, date, text, text, text[])FUNCTION'CREATE FUNCTION freightdetailquote(integer, text, integer, text, date, text, text, text[]) RETURNS SETOF freightdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustId ALIAS FOR $1; pCustNumber ALIAS FOR $2; pShiptoId ALIAS FOR $3; pShiptoNum ALIAS FOR $4; pOrderDate ALIAS FOR $5; pShipVia ALIAS FOR $6; pItemArrayType ALIAS FOR $7; pItemQty ALIAS FOR $8; -- Array item_id format = ARRAY[['300','3'],['310','50']] -- Array item_number format = ARRAY[['YTRUCK1','3'],['RTRUCK1','50']] -- Array itemsite_id format = ARRAY[['293','3'],['302','50']] _cust RECORD; _shipto RECORD; _curr RECORD; _includepkgweight BOOLEAN := FALSE; _order_date DATE; _ship_via TEXT; _item_num RECORD; _item_id RECORD; _weights RECORD; _row freightData%ROWTYPE; _debug BOOLEAN := FALSE; BEGIN -- Parameters are setup to allow this function to be called multiple ways. -- Check parameters and lookup what is NULL. -- Check pCustId and pCustNumber. IF (pCustId IS NULL AND (pCustNumber IS NULL OR pCustNumber = '')) THEN RAISE EXCEPTION 'You must specify a Customer ID or Number to get a freight quote.'; ELSIF (pCustId IS NULL AND pCustNumber IS NOT NULL) THEN -- Get customer info using pCustNumber. SELECT cust_id, cust_number, custtype_id, custtype_code, cust_curr_id, cust_shipvia INTO _cust FROM custinfo LEFT JOIN custtype ON cust_custtype_id = custtype_id WHERE 1=1 AND cust_number = pCustNumber; ELSE -- Get customer info using pCustId. SELECT cust_id, cust_number, custtype_id, custtype_code, cust_curr_id, cust_shipvia INTO _cust FROM custinfo LEFT JOIN custtype ON cust_custtype_id = custtype_id WHERE 1=1 AND cust_id = pCustId; END IF; IF(NOT FOUND) THEN RAISE EXCEPTION 'Invalid Customer specified when trying to get a freight quote.'; END IF; -- Check pShiptoId and pShiptoNum. IF (pShiptoId IS NULL AND (pShiptoNum IS NULL OR pShiptoNum = '')) THEN -- Get Customer's default shipto. SELECT shipto_id, shipto_name, shipto_shipzone_id, shipto_shipvia, shipto_num INTO _shipto FROM shiptoinfo WHERE 1=1 AND shipto_cust_id = _cust.cust_id AND shipto_default; ELSIF (pShiptoId IS NULL AND pShiptoNum IS NOT NULL) THEN -- Get shipto info using pShiptoNum. SELECT shipto_id, shipto_name, shipto_shipzone_id, shipto_shipvia, shipto_num INTO _shipto FROM shiptoinfo WHERE 1=1 AND shipto_cust_id = _cust.cust_id AND shipto_num = pShiptoNum; ELSE -- Get shipto info using pShiptoId. SELECT shipto_id, shipto_name, shipto_shipzone_id, shipto_shipvia, shipto_num INTO _shipto FROM shiptoinfo WHERE 1=1 AND shipto_cust_id = _cust.cust_id AND shipto_id = pShiptoId; END IF; IF(NOT FOUND) THEN RAISE EXCEPTION 'Invalid Ship-to specified when trying to get a freight quote.'; END IF; -- Get curr info. SELECT curr_id, curr_abbr INTO _curr FROM curr_symbol WHERE 1=1 AND curr_id = _cust.cust_curr_id; IF(NOT FOUND) THEN RAISE EXCEPTION 'Could not find currency when trying to get a freight quote.'; END IF; -- Check pOrderDate. IF (pOrderDate IS NULL) THEN _order_date := CURRENT_DATE; ELSE _order_date := pOrderDate; END IF; -- Check pShipVia. IF (pShipVia IS NULL OR pShipVia = '') THEN IF (_shipto.shipto_shipvia IS NULL OR _shipto.shipto_shipvia = '') THEN _ship_via := _cust.cust_shipvia; ELSE _ship_via := _shipto.shipto_shipvia; END IF; ELSE _ship_via := pShipVia; END IF; -- Determine if package weight should be included in freight calculation. SELECT fetchMetricBool('IncludePackageWeight') INTO _includepkgweight; -- Check pItemQty. IF (pItemQty IS NULL OR array_upper(pItemQty,1) IS NULL) THEN -- Item Array is NULL. RAISE EXCEPTION 'You must specify an Item ID, Item Number or Itemsite ID to get a freight quote.'; ELSIF (pItemArrayType = 'item_number' AND (array_upper(pItemQty,1) > 0)) THEN -- Using item_number. FOR _weights IN -- Get a list of aggregated weights from sites and freight classes for items. SELECT CASE WHEN _includepkgweight THEN SUM(qty * (item_prodweight + item_packweight)) ELSE SUM(qty * (item_prodweight)) END AS weight, itemsite_warehous_id, COALESCE(item_freightclass_id, -1) AS item_freightclass_id FROM -- Create item_number -> qty record from array. (SELECT unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][1])) AS item_number, unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][2:array_ndims(pItemQty)]))::numeric AS qty ) AS itemnum_qty JOIN item USING (item_number) JOIN itemsite ON item_id=itemsite_item_id WHERE 1=1 AND itemsite_warehous_id = fetchprefwarehousid() GROUP BY itemsite_warehous_id, item_freightclass_id LOOP -- Calculate the freight detail for these item weights. _row := calculateFreightDetail( _cust.cust_id, --pCustId _cust.custtype_id, --pCustTypeId _cust.custtype_code, --pCustTypeCode _shipto.shipto_id, --pShiptoId _shipto.shipto_shipzone_id, --pShipZoneId _shipto.shipto_num, --pShiptoNum _order_date, --pOrderDate _ship_via, --pShipVia _curr.curr_id, --pCurrId _curr.curr_abbr, --pCurrAbbr _weights.itemsite_warehous_id, --pItemSiteWhsId _weights.item_freightclass_id, --pItemFreightclassId _weights.weight --pWeight ); RETURN NEXT _row; END LOOP; ELSIF (pItemArrayType = 'item_id' AND (array_upper(pItemQty,1) > 0)) THEN -- Using item_id. FOR _weights IN -- Get a list of aggregated weights from sites and freight classes for items. SELECT CASE WHEN _includepkgweight THEN SUM(qty * (item_prodweight + item_packweight)) ELSE SUM(qty * (item_prodweight)) END AS weight, itemsite_warehous_id, COALESCE(item_freightclass_id, -1) AS item_freightclass_id FROM -- Create item_id -> qty record from array. (SELECT unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][1]))::integer AS item_id, unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][2:array_ndims(pItemQty)]))::numeric AS qty ) AS itemid_qty JOIN item USING (item_id) JOIN itemsite ON item_id=itemsite_item_id WHERE 1=1 AND itemsite_warehous_id = fetchprefwarehousid() GROUP BY itemsite_warehous_id, item_freightclass_id LOOP -- Calculate the freight detail for these item weights. _row := calculateFreightDetail( _cust.cust_id, --pCustId _cust.custtype_id, --pCustTypeId _cust.custtype_code, --pCustTypeCode _shipto.shipto_id, --pShiptoId _shipto.shipto_shipzone_id, --pShipZoneId _shipto.shipto_num, --pShiptoNum _order_date, --pOrderDate _ship_via, --pShipVia _curr.curr_id, --pCurrId _curr.curr_abbr, --pCurrAbbr _weights.itemsite_warehous_id, --pItemSiteWhsId _weights.item_freightclass_id, --pItemFreightclassId _weights.weight --pWeight ); RETURN NEXT _row; END LOOP; ELSIF (pItemArrayType = 'itemsite_id' AND (array_upper(pItemQty,1) > 0)) THEN -- Using itemsite_id. FOR _weights IN -- Get a list of aggregated weights from sites and freight classes for items. SELECT CASE WHEN _includepkgweight THEN SUM(qty * (item_prodweight + item_packweight)) ELSE SUM(qty * (item_prodweight)) END AS weight, itemsite_warehous_id, COALESCE(item_freightclass_id, -1) AS item_freightclass_id FROM -- Create itemsite_id -> qty record from array. (SELECT unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][1]))::integer AS itemsite_id, unnest((SELECT pItemQty[1:array_upper(pItemQty,1)][2:array_ndims(pItemQty)]))::numeric AS qty ) AS itemsiteid_qty JOIN itemsite USING (itemsite_id) JOIN item ON item_id=itemsite_item_id WHERE 1=1 GROUP BY itemsite_warehous_id, item_freightclass_id LOOP -- Calculate the freight detail for these item weights. _row := calculateFreightDetail( _cust.cust_id, --pCustId _cust.custtype_id, --pCustTypeId _cust.custtype_code, --pCustTypeCode _shipto.shipto_id, --pShiptoId _shipto.shipto_shipzone_id, --pShipZoneId _shipto.shipto_num, --pShiptoNum _order_date, --pOrderDate _ship_via, --pShipVia _curr.curr_id, --pCurrId _curr.curr_abbr, --pCurrAbbr _weights.itemsite_warehous_id, --pItemSiteWhsId _weights.item_freightclass_id, --pItemFreightclassId _weights.weight --pWeight ); RETURN NEXT _row; END LOOP; ELSE -- The item array provided is invalid. RAISE EXCEPTION 'The Item/Itemsite array provided when trying to get a freight quote is invalid.'; END IF; IF(NOT FOUND) THEN RAISE EXCEPTION 'Error trying to aggregated weights when getting a freight quote.'; END IF; -- Print debug. IF (_debug) THEN RAISE NOTICE 'pCustId = %', _cust.cust_id; RAISE NOTICE 'pCustTypeId = %', _cust.custtype_id; RAISE NOTICE 'pCustTypeCode = %', _cust.custtype_code; RAISE NOTICE 'pShiptoId = %', _shipto.shipto_id; RAISE NOTICE 'pShipZoneId = %', _shipto.shipto_shipzone_id; RAISE NOTICE 'pShiptoNum = %', _shipto.shipto_num; RAISE NOTICE 'pOrderDate = %', _order_date; RAISE NOTICE 'pShipVia = %', _ship_via; RAISE NOTICE 'pCurrId = %', _curr.curr_id; RAISE NOTICE 'pCurrAbbr = %', _curr.curr_abbr; END IF; RETURN; END; $_$; aDROP FUNCTION public.freightdetailquote(integer, text, integer, text, date, text, text, text[]); publicadminfalse825873992e12551682444&freightforrecv(text, integer, boolean)FUNCTIONCREATE FUNCTION freightforrecv(text, integer, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; pposted ALIAS FOR $3; _freight NUMERIC; BEGIN IF (pordertype = 'TO' AND NOT fetchMetricBool('MultiWhs')) THEN RETURN 0; ELSIF (pordertype = 'RA' AND NOT fetchMetricBool('EnableReturnAuth')) THEN RETURN 0; END IF; SELECT SUM(COALESCE(recv_freight, 0)) INTO _freight FROM recv WHERE ((recv_orderitem_id=porderitemid) AND (recv_posted = pposted) AND (recv_order_type=pordertype)); RETURN COALESCE(_freight, 0.0); END; $_$; =DROP FUNCTION public.freightforrecv(text, integer, boolean); publicadminfalse3992812551682445gen_salt(text)FUNCTIONlCREATE FUNCTION gen_salt(text) RETURNS text LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pg_gen_salt'; %DROP FUNCTION public.gen_salt(text); publicadminfalse812551682446gen_salt(text, integer)FUNCTION|CREATE FUNCTION gen_salt(text, integer) RETURNS text LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pg_gen_salt_rounds'; .DROP FUNCTION public.gen_salt(text, integer); publicadminfalse8k12551682447getactiverevid(text, integer)FUNCTIONCREATE FUNCTION getactiverevid(text, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetid ALIAS FOR $2; _revid INTEGER; BEGIN --See if revcontrol turned on IF (fetchmetricbool('RevControl')) THEN IF (pTargetType='BOM') THEN SELECT rev_id INTO _revid FROM rev WHERE ((rev_target_type='BOM') AND (rev_target_id=pTargetid) AND (rev_status='A')); IF (NOT FOUND) THEN _revid:=-1; END IF; ELSE IF (pTargetType='BOO') THEN SELECT rev_id INTO _revid FROM rev WHERE ((rev_target_type='BOO') AND (rev_target_id=pTargetid) AND (rev_status='A')); IF (NOT FOUND) THEN _revid:=-1; END IF; ELSE RAISE EXCEPTION 'Invalid Revision Type'; END IF; END IF; ELSE _revid:=-1; END IF; RETURN _revid; END; $_$; 4DROP FUNCTION public.getactiverevid(text, integer); publicadminfalse39928p12551682448getaddrid(text)FUNCTION;CREATE FUNCTION getaddrid(paddressnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pAddressNumber IS NULL OR pAddressNumber = '') THEN RETURN NULL; END IF; SELECT addr_id INTO _returnVal FROM addr WHERE (addr_number=pAddressNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Address Number % not found.', pAddressNumber; END IF; RETURN _returnVal; END; $$; 5DROP FUNCTION public.getaddrid(paddressnumber text); publicadminfalse83992q12551682449getadjustmenttaxtypeid()FUNCTIONCREATE FUNCTION getadjustmenttaxtypeid() RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _taxtypeid INTEGER; BEGIN SELECT taxtype_id INTO _taxtypeid FROM taxtype WHERE (taxtype_name='Adjustment'); RETURN _taxtypeid; END; $$; /DROP FUNCTION public.getadjustmenttaxtypeid(); publicadminfalse39928r12551682450"getaropenid(text, character, text)FUNCTIONCREATE FUNCTION getaropenid(text, character, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustNumber ALIAS FOR $1; pDocType ALIAS FOR $2; pDocNumber ALIAS FOR $3; _returnVal INTEGER; BEGIN IF ((pCustNumber IS NULL) OR (pDocType IS NULL) OR (pDocNumber IS NULL)) THEN RETURN NULL; END IF; SELECT aropen_id INTO _returnVal FROM aropen WHERE ((aropen_cust_id=getCustId(pCustNumber,true)) AND (UPPER(aropen_doctype)=UPPER(pDocType)) AND (UPPER(aropen_docnumber)=UPPER(pDocNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'AR Open Item % not found.', pDocNumber; END IF; RETURN _returnVal; END; $_$; 9DROP FUNCTION public.getaropenid(text, character, text); publicadminfalse39928u12551682451getbankaccntid(text)FUNCTIONJCREATE FUNCTION getbankaccntid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankAccntName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pBankAccntName IS NULL) THEN RETURN NULL; END IF; SELECT bankaccnt_id INTO _returnVal FROM bankaccnt WHERE (UPPER(bankaccnt_name)=UPPER(pBankAccntName)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Bank Account % not found.', pBankAccntName; END IF; RETURN _returnVal; END; $_$; +DROP FUNCTION public.getbankaccntid(text); publicadminfalse3992812551682452getbomitemid(text, text, text)FUNCTION<CREATE FUNCTION getbomitemid(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; pRevision ALIAS FOR $2; pSeqNumber ALIAS FOR $3; _returnVal INTEGER; BEGIN IF ((pItemNumber IS NULL) OR (pSeqNumber IS NULL) OR (pItemNumber = '') OR (pSeqNumber = '') ) THEN RETURN NULL; END IF; SELECT bomitem_id INTO _returnVal FROM bomitem(getItemId(pItemNumber),COALESCE(getRevId('BOM',pItemNumber,pRevision))) WHERE (bomitem_seqnumber=pSeqNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sequence % on Bill of Material % Revision % not found.', pSeqNumber, pItemNumber, pRevision; END IF; RETURN _returnVal; END; $_$; 5DROP FUNCTION public.getbomitemid(text, text, text); publicadminfalse3992812551682453getbooitemseqid(text, text)FUNCTIONCREATE FUNCTION getbooitemseqid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; pSeqNumber ALIAS FOR $2; _revid INTEGER; _returnVal INTEGER; BEGIN IF ((pItemNumber IS NULL) OR (pSeqNumber IS NULL)) THEN RETURN NULL; END IF; IF (NOT fetchMetricBool('Routings')) THEN RETURN -1; ELSE SELECT booitem_seq_id INTO _returnVal FROM booitem(getItemId(pItemNumber)) WHERE (booitem_seqnumber=CAST(pSeqNumber AS integer)); END IF; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Boo Sequence % for Item % not found.', pSeqNumber, pItemNumber; END IF; RETURN _returnVal; END; $_$; 2DROP FUNCTION public.getbooitemseqid(text, text); publicadminfalse3992812551682454getbudgheadid(text)FUNCTION#CREATE FUNCTION getbudgheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudghead ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pBudghead IS NULL) THEN RETURN NULL; END IF; SELECT budghead_id INTO _returnVal FROM budghead WHERE (budghead_name=(pBudghead)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Budget % not found.', pBudghead; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getbudgheadid(text); publicadminfalse3992812551682455getcashrcptid(text, text, text)FUNCTION"CREATE FUNCTION getcashrcptid(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustNumber ALIAS FOR $1; pFundsType ALIAS FOR $2; pDocNumber ALIAS FOR $3; _returnVal INTEGER; BEGIN IF ((pCustNumber IS NULL) OR (pFundsType IS NULL) OR (pDocNumber IS NULL)) THEN RETURN NULL; END IF; SELECT cashrcpt_id INTO _returnVal FROM cashrcpt WHERE ((cashrcpt_cust_id=getCustId(pCustNumber,true)) AND (UPPER(cashrcpt_fundstype)=UPPER(pFundsType)) AND (UPPER(cashrcpt_docnumber)=UPPER(pDocNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Cash Receipt % not found.', pDocNumber; END IF; RETURN _returnVal; END; $_$; 6DROP FUNCTION public.getcashrcptid(text, text, text); publicadminfalse3992812551682456getcharid(text, text)FUNCTIONCREATE FUNCTION getcharid(pchar text, ptype text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (COALESCE(pChar, '') = '') THEN RETURN NULL; END IF; SELECT char_id INTO _returnVal FROM char WHERE ((char_name=pChar) AND ((pType IN ('C','CT') AND char_customers) OR (pType IN ('I','SI','QI','W','PI','TI') AND char_items) OR (pType='CRMACCT' AND char_crmaccounts) OR (pType='ADDR' AND char_addresses) OR (pType='CNTCT' AND char_contacts) OR (pType='LS' AND char_lotserial) OR (pType='EMP' AND char_employees) OR (pType='INCDT' AND char_incidents) )) LIMIT 1; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Characteristic % not found.', pChar; END IF; RETURN _returnVal; END; $$; 8DROP FUNCTION public.getcharid(pchar text, ptype text); publicadminfalse8399212551682457getclasscodeid(text)FUNCTION-CREATE FUNCTION getclasscodeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClassCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pClassCode IS NULL) THEN RETURN NULL; END IF; SELECT classcode_id INTO _returnVal FROM classcode WHERE (classcode_code=pClassCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Class Code % not found.', pClassCode; END IF; RETURN _returnVal; END; $_$; +DROP FUNCTION public.getclasscodeid(text); publicadminfalse8399212551682458getcmheadid(text)FUNCTION;CREATE FUNCTION getcmheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCreditMemoNumber ALIAS FOR $1; BEGIN RETURN getCmheadId(pCreditMemoNumber, NULL); END; $_$; (DROP FUNCTION public.getcmheadid(text); publicadminfalse8399212551682459getcmheadid(text, boolean)FUNCTIONCREATE FUNCTION getcmheadid(text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCreditMemoNumber ALIAS FOR $1; pPosted ALIAS FOR $2; _returnVal INTEGER; BEGIN IF (pCreditMemoNumber IS NULL) THEN RETURN NULL; END IF; SELECT cmhead_id INTO _returnVal FROM cmhead WHERE (UPPER(cmhead_number)=UPPER(pCreditMemoNumber)) AND ((pPosted IS NULL) OR (cmhead_posted=pPosted)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Credit Memo % not found.', pCreditMemoNumber; END IF; RETURN _returnVal; END; $_$; 1DROP FUNCTION public.getcmheadid(text, boolean); publicadminfalse8399212551682460getcmnttypeid(text)FUNCTION@CREATE FUNCTION getcmnttypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmntType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pCmntType), '') = '') THEN RETURN NULL; END IF; SELECT cmnttype_id INTO _returnVal FROM cmnttype WHERE (cmnttype_name=pCmntType) LIMIT 1; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Comment Type % not found.', pCmntType; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getcmnttypeid(text); publicadminfalse8399212551682461getcntctid(text)FUNCTIONcCREATE FUNCTION getcntctid(pcontactnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT getCntctId(pContactNumber,true) INTO _returnVal; RETURN _returnVal; END; $$; 6DROP FUNCTION public.getcntctid(pcontactnumber text); publicadminfalse8399212551682462getcntctid(text, boolean)FUNCTIONCREATE FUNCTION getcntctid(pcontactnumber text, pnotfounderr boolean) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pContactNumber), '') = '') THEN RETURN NULL; END IF; SELECT cntct_id INTO _returnVal FROM cntct WHERE (cntct_number=pContactNumber); IF (_returnVal IS NULL AND pNotFoundErr) THEN RAISE EXCEPTION 'Contact Number % not found.', pContactNumber; ELSIF (_returnVal IS NULL) THEN RETURN NULL; END IF; RETURN _returnVal; END; $$; LDROP FUNCTION public.getcntctid(pcontactnumber text, pnotfounderr boolean); publicadminfalse8399212551682463getcoheadid(text)FUNCTION@CREATE FUNCTION getcoheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSalesOrderNumber IS NULL) THEN RETURN NULL; END IF; SELECT cohead_id INTO _returnVal FROM cohead WHERE (cohead_number=pSalesOrderNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Order % not found.', pSalesOrderNumber; END IF; RETURN _returnVal; END; $_$; (DROP FUNCTION public.getcoheadid(text); publicadminfalse8399212551682464getcoitemid(text, text)FUNCTIONCREATE FUNCTION getcoitemid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderNumber ALIAS FOR $1; pLineNumber ALIAS FOR $2; _linenumber INTEGER; _subnumber INTEGER; _returnVal INTEGER; BEGIN IF (pSalesOrderNumber IS NULL OR pLineNumber IS NULL) THEN RETURN NULL; END IF; --Parse Line Number IF (position('.' in pLineNumber) > 0) THEN _linenumber := CAST(substring(pLineNumber from 1 for position('.' in pLineNumber)-1) AS INTEGER); _subnumber := CAST(substring(pLineNumber from position('.' in pLineNumber)+1 for length(pLineNumber)) AS INTEGER); ELSE _linenumber := CAST(pLineNumber AS INTEGER); _subnumber := 0; END IF; SELECT coitem_id INTO _returnVal FROM cohead, coitem WHERE ((cohead_number=pSalesOrderNumber) AND (coitem_cohead_id=cohead_id) AND (coitem_linenumber=_linenumber) AND (coitem_subnumber=_subnumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Order % not found.', pSalesOrderNumber; END IF; RETURN _returnVal; END; $_$; .DROP FUNCTION public.getcoitemid(text, text); publicadminfalse8399212551844558getcontrcteffective(text)FUNCTION2CREATE FUNCTION getcontrcteffective(pcontrctnumber text) RETURNS date LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal DATE; BEGIN IF (pContrctNumber IS NULL) THEN RETURN NULL; END IF; SELECT contrct_effective INTO _returnVal FROM contrct WHERE (contrct_number=pContrctNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Contract Number % not found.', pContrctNumber; END IF; RETURN _returnVal; END; $$; ?DROP FUNCTION public.getcontrcteffective(pcontrctnumber text); publicadminfalse8399212551844559getcontrctexpires(text)FUNCTION.CREATE FUNCTION getcontrctexpires(pcontrctnumber text) RETURNS date LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal DATE; BEGIN IF (pContrctNumber IS NULL) THEN RETURN NULL; END IF; SELECT contrct_expires INTO _returnVal FROM contrct WHERE (contrct_number=pContrctNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Contract Number % not found.', pContrctNumber; END IF; RETURN _returnVal; END; $$; =DROP FUNCTION public.getcontrctexpires(pcontrctnumber text); publicadminfalse8399212551844560getcontrctid(text)FUNCTION*CREATE FUNCTION getcontrctid(pcontrctnumber text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pContrctNumber IS NULL) THEN RETURN NULL; END IF; SELECT contrct_id INTO _returnVal FROM contrct WHERE (contrct_number=pContrctNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Contract Number % not found.', pContrctNumber; END IF; RETURN _returnVal; END; $$; 8DROP FUNCTION public.getcontrctid(pcontrctnumber text); publicadminfalse3992812551682465getcostcatid(text)FUNCTION"CREATE FUNCTION getcostcatid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCostCat ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pCostCat IS NULL) THEN RETURN NULL; END IF; SELECT costcat_id INTO _returnVal FROM costcat WHERE (costcat_code=pCostCat); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Cost Category Code % not found.', pCostCat; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.getcostcatid(text); publicadminfalse8399212551682466getcostelemid(text)FUNCTION4CREATE FUNCTION getcostelemid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCostElemType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pCostElemType IS NULL) THEN RETURN NULL; END IF; SELECT costelem_id INTO _returnVal FROM costelem WHERE (costelem_type=pCostElemType); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Cost Element % not found.', pCostElemType; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getcostelemid(text); publicadminfalse8399212551682467getcrmacctid(text)FUNCTION@CREATE FUNCTION getcrmacctid(pacctnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pAcctNumber IS NULL) THEN RETURN NULL; END IF; SELECT crmacct_id INTO _returnVal FROM crmacct WHERE (UPPER(crmacct_number)=UPPER(pAcctNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'CRM Account Number % not found.', pAcctNumber; END IF; RETURN _returnVal; END; $$; 5DROP FUNCTION public.getcrmacctid(pacctnumber text); publicadminfalse8399212551682468getcurrid(text)FUNCTION CREATE FUNCTION getcurrid(pcurrname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pCurrName IS NULL) THEN RETURN NULL; END IF; SELECT curr_id INTO _returnVal FROM curr_symbol WHERE (curr_abbr=pCurrName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Currency % not found.', pCurrName; END IF; RETURN _returnVal; END; $$; 0DROP FUNCTION public.getcurrid(pcurrname text); publicadminfalse8399212551682469getcustid(text)FUNCTION_CREATE FUNCTION getcustid(pcustnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT getCustId(pCustNumber,false) INTO _returnVal; RETURN _returnVal; END; $$; 2DROP FUNCTION public.getcustid(pcustnumber text); publicadminfalse8399212551682470getcustid(text, boolean)FUNCTIONrCREATE FUNCTION getcustid(pcustnumber text, pinclprospects boolean) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pCustNumber IS NULL) THEN RETURN NULL; END IF; SELECT cust_id INTO _returnVal FROM custinfo WHERE (cust_number=UPPER(pCustNumber)); IF (_returnVal IS NULL) THEN IF (pInclProspects) THEN SELECT prospect_id INTO _returnVal FROM prospect WHERE (UPPER(prospect_number)=UPPER(pCustNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Neither Customer nor Prospect Number % found.', pCustNumber; END IF; ELSE RAISE EXCEPTION 'Customer Number % not found.', pCustNumber; END IF; END IF; RETURN _returnVal; END; $$; JDROP FUNCTION public.getcustid(pcustnumber text, pinclprospects boolean); publicadminfalse8399212551682471:getcustnamefrominfo(text, text, text, text, text, boolean)FUNCTIONC CREATE FUNCTION getcustnamefrominfo(text, text, text, text, text, boolean) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _email TEXT := COALESCE(UPPER($1), ''); _company TEXT := COALESCE(UPPER($2), ''); _first TEXT := COALESCE(UPPER($3), ''); _last TEXT := COALESCE(UPPER($4), ''); _fullname TEXT := COALESCE(UPPER($5), ''); _generate BOOLEAN := COALESCE($6, FALSE); _counter INTEGER; _custcount INTEGER := 0; _custname TEXT; _candidate RECORD; _r RECORD; BEGIN IF (_email != '') THEN SELECT count(*), cust_name INTO _custcount, _custname FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE (UPPER(cntct_email)=_email) GROUP BY cust_name; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custname; END IF; END IF; IF (_company != '') THEN SELECT count(*), cust_name INTO _custcount, _custname FROM custinfo WHERE (UPPER(cust_name)=_company) GROUP BY cust_name; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custname; END IF; END IF; IF (_fullname = '' AND (_first != '' OR _last != '')) THEN _fullname := TRIM(_first || ' ' || _last); END IF; IF (_custcount <= 0 AND _fullname != '') THEN SELECT count(*), cust_name INTO _custcount, _custname FROM custinfo WHERE (UPPER(cust_name)=_fullname) GROUP BY cust_name; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custname; END IF; END IF; IF (_custcount > 1) THEN RAISE EXCEPTION 'Found % possible Customers for % and % and %', _custcount, _email, _company, _fullname; END IF; IF (_custcount <= 0 AND _generate) THEN IF (_company != '') THEN RETURN _company; ELSIF (_email != '') THEN RETURN _email; ELSIF (_fullname != '') THEN RETURN _fullname; ELSE RAISE EXCEPTION 'Could not generate a new Customer Name without an email address or the name of a company or person'; END IF; END IF; IF (_custname IS NULL OR _custname = '') THEN RAISE EXCEPTION 'Could not find Customer Name for % and %', _company, _fullname; END IF; RETURN _custname; END; $_$; QDROP FUNCTION public.getcustnamefrominfo(text, text, text, text, text, boolean); publicadminfalse8399212551682472<getcustnumberfrominfo(text, text, text, text, text, boolean)FUNCTIONCREATE FUNCTION getcustnumberfrominfo(text, text, text, text, text, boolean) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _email TEXT := COALESCE(UPPER($1), ''); _company TEXT := COALESCE(UPPER($2), ''); _first TEXT := COALESCE(UPPER($3), ''); _last TEXT := COALESCE(UPPER($4), ''); _fullname TEXT := COALESCE(UPPER($5), TRIM(_first || ' ' || _last)); _generate BOOLEAN := COALESCE($6, FALSE); _counter INTEGER; _custcount INTEGER := 0; _custnumber TEXT; _candidate TEXT := ''; _loopmax INTEGER := 0; _minlength INTEGER := 5; _maxlength INTEGER := 8; _numformat TEXT := ''; _testme TEXT; BEGIN IF (_email != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) WHERE (UPPER(cntct_email)=_email) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_company != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo WHERE (UPPER(cust_name)=_company) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_fullname = '' AND (_first != '' OR _last != '')) THEN _fullname := TRIM(_first || ' ' || _last); END IF; IF (_custcount <= 0 AND _fullname != '') THEN SELECT count(*), cust_number INTO _custcount, _custnumber FROM custinfo WHERE (UPPER(cust_name)=_fullname) GROUP BY cust_number; IF (NOT FOUND) THEN _custcount := 0; ELSIF(_custcount = 1) THEN RETURN _custnumber; END IF; END IF; IF (_custcount > 1) THEN RAISE EXCEPTION 'Found % possible Customers for % and % and %', _custcount, _email, _company, _fullname; END IF; IF (_custcount <= 0 AND _generate) THEN IF (_maxlength < _minlength) THEN RAISE EXCEPTION 'Fix getCustNumberFromInfo: max length < min length'; END IF; IF (_company != '') THEN _candidate := _company; ELSIF (_email != '') THEN _candidate := SUBSTRING(_email FOR POSITION('@' IN _email) - 1); ELSIF (_last != '') THEN _candidate := _last; IF (_first != '') THEN _candidate := _candidate || _first; END IF; ELSIF (_fullname != '' AND (POSITION(' ' IN _fullname) > 0)) THEN _candidate := SUBSTRING(_fullname FROM POSITION(' ' IN _fullname) + 1) || SUBSTRING(_fullname FOR POSITION(' ' IN _fullname) - 1); END IF; WHILE (POSITION(' ' IN _candidate) > 0) LOOP _candidate := SUBSTRING(_candidate FOR POSITION(' ' IN _candidate) - 1) || SUBSTRING(_candidate FROM POSITION(' ' IN _candidate) + 1); END LOOP; FOR _counter IN _minlength.._maxlength LOOP _testme := SUBSTRING(_candidate FOR _counter); IF (NOT EXISTS(SELECT cust_number FROM custinfo WHERE (cust_number=_testme))) THEN _custnumber := _testme; EXIT; END IF; END LOOP; IF (_custnumber IS NULL OR _custnumber = '') THEN IF (LENGTH(_candidate) < _minlength) THEN _minlength := LENGTH(_candidate); END IF; FOR _counter IN _minlength.._maxlength LOOP _loopmax := _loopmax * 10 + 9; _numformat := _numformat || '0'; END LOOP; FOR _counter IN 1.._loopmax LOOP _testme := SUBSTRING(_candidate FOR _minlength) || TRIM(TO_CHAR(_counter, _numformat)); IF (NOT EXISTS(SELECT cust_number FROM custinfo WHERE (cust_number=_testme))) THEN _custnumber := _testme; EXIT; END IF; END LOOP; END IF; IF (_custnumber IS NULL OR _custnumber = '') THEN RAISE EXCEPTION 'Could not generate a new Customer Number'; END IF; END IF; IF (_custnumber IS NULL OR _custnumber = '') THEN RAISE EXCEPTION 'Could not find Customer Number for % and % and %', _email, _company, _fullname; END IF; RETURN _custnumber; END; $_$; SDROP FUNCTION public.getcustnumberfrominfo(text, text, text, text, text, boolean); publicadminfalse3992812551682473getcusttypeid(text)FUNCTION8CREATE FUNCTION getcusttypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustTypeCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pCustTypeCode IS NULL) THEN RETURN NULL; END IF; SELECT custtype_id INTO _returnVal FROM custtype WHERE (custtype_code=pCustTypeCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Customer Type % not found.', pCustTypeCode; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getcusttypeid(text); publicadminfalse8399212551682474getdeptid(text)FUNCTIONACREATE FUNCTION getdeptid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pDeptNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pDeptNumber), '') = '') THEN RETURN NULL; END IF; SELECT dept_id INTO _returnVal FROM dept WHERE (UPPER(dept_number)=UPPER(pDeptNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Department % not found.', pDeptNumber; END IF; RETURN _returnVal; END; $_$; &DROP FUNCTION public.getdeptid(text); publicadminfalse8399212551682475getediprofileid(text)FUNCTIONCREATE FUNCTION getediprofileid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pEdiProfileName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pEdiProfileName IS NULL) THEN RETURN NULL; END IF; SELECT pkghead_id INTO _returnVal FROM pkghead WHERE(pkghead_name='xtbatch'); IF(NOT FOUND) THEN RETURN NULL; END IF; SELECT ediprofile_id INTO _returnVal FROM xtbatch.ediprofile WHERE (ediprofile_name=pEdiProfileName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'EDI Profile % not found.', pEdiProfileName; END IF; RETURN _returnVal; END; $_$; ,DROP FUNCTION public.getediprofileid(text); publicadminfalse8399212551682476getediprofilename(integer)FUNCTIONfCREATE FUNCTION getediprofilename(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pEdiProfileId ALIAS FOR $1; _returnVal TEXT; BEGIN IF (pEdiProfileId IS NULL) THEN RETURN NULL; END IF; SELECT pkghead_name INTO _returnVal FROM pkghead WHERE(pkghead_name='xtbatch'); IF(NOT FOUND) THEN RETURN NULL; END IF; SELECT ediprofile_name INTO _returnVal FROM xtbatch.ediprofile WHERE (ediprofile_id=pEdiProfileId); RETURN _returnVal; END; $_$; 1DROP FUNCTION public.getediprofilename(integer); publicadminfalse8399212551682478getempid(text)FUNCTION-CREATE FUNCTION getempid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pEmpCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pEmpCode), '') = '') THEN RETURN NULL; END IF; SELECT emp_id INTO _returnVal FROM emp WHERE (UPPER(emp_code)=UPPER(pEmpCode)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Employee % not found.', pEmpCode; END IF; RETURN _returnVal; END; $_$; %DROP FUNCTION public.getempid(text); publicadminfalse8399212551682479getexpcatid(text)FUNCTIONFCREATE FUNCTION getexpcatid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pExpcatCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pExpcatCode), '') = '') THEN RETURN NULL; END IF; SELECT expcat_id INTO _returnVal FROM expcat WHERE (expcat_code=UPPER(pExpcatCode)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Expense Category % not found.', pExpcatCode; END IF; RETURN _returnVal; END; $_$; (DROP FUNCTION public.getexpcatid(text); publicadminfalse8399212552005537getflcoldata(integer, integer)FUNCTIONCREATE FUNCTION getflcoldata(integer, integer) RETURNS SETOF flcoldata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlcolid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _row flcoldata%ROWTYPE; _r RECORD; _start DATE; _end DATE; _col INTEGER := 1; _mult INTEGER; BEGIN --Get Layout Data SELECT * INTO _r FROM flcol WHERE (flcol_id=pFlcolid); -- Handle Month... IF (_r.flcol_month) THEN SELECT period_start, period_end INTO _start, _end FROM period WHERE (period_id=pPeriodid); IF (_r.flcol_showdb) THEN -- Debits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- Credits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; END IF; -- Month Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_prcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budget) THEN _col := _col + 1; IF (_r.flcol_budgetprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiff) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiffprcnt) THEN _col := _col + 1; END IF; END IF; END IF; -- Handle Quarter... IF (_r.flcol_quarter) THEN SELECT min(qtr.period_start), max(qtr.period_end) INTO _start, _end FROM period p JOIN period qtr ON (p.period_quarter=qtr.period_quarter) AND (p.period_yearperiod_id=qtr.period_yearperiod_id) WHERE (p.period_id=pPeriodid); IF (_r.flcol_showdb) THEN -- Debits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- Credits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; END IF; -- Quarter Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_prcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budget) THEN _col := _col + 1; IF (_r.flcol_budgetprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiff) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiffprcnt) THEN _col := _col + 1; END IF; END IF; END IF; -- Handle Year... IF (_r.flcol_year) THEN SELECT yearperiod_start, period_end INTO _start, _end FROM period p JOIN yearperiod ON (period_yearperiod_id=yearperiod_id) WHERE (p.period_id=pPeriodid); IF (_r.flcol_showdb) THEN -- Debits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- Credits Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; END IF; -- Year Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_prcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budget) THEN _col := _col + 1; IF (_r.flcol_budgetprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiff) THEN _col := _col + 1; END IF; IF (_r.flcol_budgetdiffprcnt) THEN _col := _col + 1; END IF; END IF; END IF; -- Handle Prior Month... IF (_r.flcol_priormonth) THEN SELECT prv.period_start, prv.period_end INTO _start, _end FROM period p JOIN period prv ON (prv.period_start < p.period_start) WHERE (p.period_id=pPeriodid) ORDER BY prv.period_start DESC LIMIT 1; -- Prior Month Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_priorprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_priordiff) THEN _col := _col + 1; END IF; IF (_r.flcol_priordiffprcnt) THEN _col := _col + 1; END IF; END IF; -- Handle Prior Quarter... IF (_r.flcol_priorquarter) THEN IF (_r.flcol_priortype = 'P') THEN -- Prior Quarter SELECT min(period_start), max(period_end) INTO _start, _end FROM ( SELECT prv.period_start, prv.period_end, prv.period_quarter, prv.period_yearperiod_id FROM period p JOIN period prv ON (prv.period_start < p.period_start) AND (prv.period_quarter != p.period_quarter) WHERE (p.period_id=pPeriodid)) data GROUP BY period_quarter, period_yearperiod_id ORDER BY min(period_start) DESC LIMIT 1; ELSE -- Prior Year Quarter SELECT min(period_start), max(period_end) INTO _start, _end FROM ( SELECT prv.period_start, prv.period_end, prv.period_quarter, prv.period_yearperiod_id FROM period p JOIN period prv ON (prv.period_start < p.period_start) AND (prv.period_yearperiod_id != p.period_yearperiod_id) AND (prv.period_quarter = p.period_quarter) WHERE (p.period_id=pPeriodid)) data GROUP BY period_quarter, period_yearperiod_id ORDER BY min(period_start) DESC LIMIT 1; END IF; -- Prior Quarter Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; -- These don't have drill down IF (_r.flcol_priorprcnt) THEN _col := _col + 1; END IF; IF (_r.flcol_priordiff) THEN _col := _col + 1; END IF; IF (_r.flcol_priordiffprcnt) THEN _col := _col + 1; END IF; END IF; -- Handle Prior Year... IF (_r.flcol_prioryear IN ('D','F')) THEN IF (_r.flcol_prioryear = 'D') THEN -- Prior Year to Date SELECT yearperiod_start, prv.period_end INTO _start, _end FROM period p JOIN period prv ON (prv.period_number = p.period_number) AND (prv.period_yearperiod_id != p.period_yearperiod_id) AND (prv.period_start < p.period_start) JOIN yearperiod ON (prv.period_yearperiod_id=yearperiod_id) WHERE (p.period_id=pPeriodid) ORDER BY prv.period_start DESC LIMIT 1; ELSE -- Prior Full Year SELECT prv.yearperiod_start, prv.yearperiod_end INTO _start, _end FROM period p JOIN yearperiod cur ON (cur.yearperiod_id=p.period_yearperiod_id) JOIN yearperiod prv ON (prv.yearperiod_start < cur.yearperiod_start) WHERE (p.period_id=pPeriodid) ORDER BY prv.yearperiod_start DESC LIMIT 1; END IF; -- Prior Year Column _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + 1; END IF; RETURN; END; $_$; 5DROP FUNCTION public.getflcoldata(integer, integer); publicadminfalse83992258112552005538+getflcoldata(character, integer[], boolean)FUNCTIONoCREATE FUNCTION getflcoldata(character, integer[], boolean) RETURNS SETOF flcoldata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInterval ALIAS FOR $1; pPeriodids ALIAS FOR $2; pBudgets ALIAS FOR $3; _row flcoldata%ROWTYPE; _r RECORD; _start DATE; _end DATE; _col INTEGER := 1; _count INTEGER; _i INTEGER := 1; _incr INTEGER := 1; BEGIN IF (pBudgets) THEN _col := 2; _incr := 2; END IF; _count := ARRAY_UPPER(pPeriodIds,1); IF (pInterval = 'M') THEN FOR _i IN 1.._count LOOP SELECT period_start, period_end INTO _start, _end FROM period WHERE (period_id=pPeriodids[_i]); _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + _incr; END LOOP; ELSIF (pInterval = 'Q') THEN FOR _i IN 1.._count LOOP SELECT min(qtr.period_start), max(qtr.period_end) INTO _start, _end FROM period cur JOIN period qtr ON (cur.period_yearperiod_id=qtr.period_yearperiod_id) AND (cur.period_quarter=qtr.period_quarter) WHERE (cur.period_id=pPeriodids[_i]); _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + _incr; END LOOP; ELSE FOR _i IN 1.._count LOOP SELECT yearperiod_start, yearperiod_end INTO _start, _end FROM period JOIN yearperiod ON (period_yearperiod_id=yearperiod_id) WHERE (period_id=pPeriodids[_i]); _row.flcoldata_column := _col; _row.flcoldata_start := _start; _row.flcoldata_end := _end; RETURN NEXT _row; _col := _col + _incr; END LOOP; END IF; RETURN; END; $_$; BDROP FUNCTION public.getflcoldata(character, integer[], boolean); publicadminfalse83992258112551682482getflstmthead(integer, integer)FUNCTIONtCREATE FUNCTION getflstmthead(integer, integer) RETURNS SETOF flstmthead LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlcolid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _row flstmthead%ROWTYPE; _p RECORD; _month TEXT; _qtr TEXT; _year TEXT; _prmonth TEXT; _prqtr TEXT; _pryear TEXT; _err TEXT; BEGIN SELECT 'No Data' INTO _err; --Get Layout Data SELECT flcol_priortype, flcol_prioryear INTO _p FROM flcol WHERE (flcol_id=pFlcolid); --get data... --...for current Month SELECT (CASE WHEN period_name='' THEN formatdate(period_start) || '-' || formatdate(period_end) ELSE period_name END) INTO _month FROM period WHERE (period_id=pPeriodId); IF _month IS NULL THEN _month := _err; END IF; --...for Quarter SELECT ('Q' || period_quarter || '-' || EXTRACT(year from yearperiod_end)) INTO _qtr FROM period, yearperiod WHERE ((period_id=pPeriodId) AND (period_yearperiod_id=yearperiod_id)); IF _qtr IS NULL THEN _qtr := _err; END IF; --...for Year SELECT COALESCE((CASE WHEN period_name='' THEN (formatdate(period_start) || '-' || formatdate(period_end) || ' YTD') ELSE (period_name || ' YTD') END),'No Data') INTO _year FROM period WHERE (period_id=pPeriodId); IF _year IS NULL THEN _year := _err; END IF; --...for prior month IF (_p.flcol_priortype = 'P') THEN SELECT (CASE WHEN pp.period_name='' THEN formatdate(pp.period_start) || '-' || formatdate(pp.period_end) ELSE pp.period_name END) INTO _prmonth FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1; ELSE SELECT (CASE WHEN pp.period_name='' THEN formatdate(pp.period_start) || '-' || formatdate(pp.period_end) ELSE pp.period_name END) INTO _prmonth FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_id != pp.period_id) AND (cp.period_start > pp.period_start) AND (cp.period_number = pp.period_number)) ORDER BY pp.period_start DESC LIMIT 1; END IF; IF _prmonth IS NULL THEN _prmonth := _err; END IF; --...for prior quarter IF (_p.flcol_priortype='P') THEN SELECT ('Q' || pp.period_quarter || '-' || EXTRACT(year from yearperiod_end)) INTO _prqtr FROM period cp, period pp, yearperiod WHERE ((cp.period_id=pPeriodId) AND (cp.period_start > pp.period_start) AND (pp.period_quarter= CASE WHEN cp.period_quarter > 1 THEN cp.period_quarter - 1 ELSE 4 END) AND (pp.period_start >= cp.period_start - interval '1 year') AND (pp.period_yearperiod_id=yearperiod_id)) ORDER BY pp.period_start DESC LIMIT 1; ELSE SELECT ('Q' || pp.period_quarter || '-' || EXTRACT(year from pp.period_start)) INTO _prqtr FROM period cp, period pp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=cy.yearperiod_id) AND (pp.period_yearperiod_id=py.yearperiod_id) AND (cp.period_quarter=pp.period_quarter) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY py.yearperiod_start DESC, pp.period_start DESC LIMIT 1; END IF; IF _prqtr IS NULL THEN _prqtr := _err; END IF; --...for prior year IF (_p.flcol_prioryear='F') THEN SELECT (EXTRACT(year from py.yearperiod_end)||'') INTO _pryear FROM period cp, yearperiod cy, yearperiod py WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id = cy.yearperiod_id) AND (cy.yearperiod_start > py.yearperiod_start)) ORDER BY py.yearperiod_start DESC LIMIT 1; ELSE SELECT (CASE WHEN pp.period_name='' THEN formatdate(pp.period_start) || '-' || formatdate(pp.period_end) || ' YTD' ELSE pp.period_name || ' YTD' END) INTO _pryear FROM period cp, period pp WHERE ((cp.period_id=pPeriodId) AND (cp.period_number = pp.period_number) AND (cp.period_start > pp.period_start)) ORDER BY pp.period_start DESC LIMIT 1; END IF; IF _pryear IS NULL THEN _pryear := _err; END IF; -- RETURN RESULTS SELECT flhead_id AS flstmthead_flhead_id, flcol_id AS flstmthead_flcol_id, pPeriodid AS flstmthead_period, getEffectiveXtUser() AS flstmthead_username, CASE WHEN flhead_type = 'I' THEN 'Income Statement' WHEN flhead_type = 'B' THEN 'Balance Sheet' WHEN flhead_type = 'C' THEN 'Cash Flow Statement' ELSE 'N/A' END AS flstmthead_flhead_typedescrip1, CASE WHEN flhead_type = 'I' THEN 'Income' WHEN flhead_type = 'B' THEN 'Balance' WHEN flhead_type = 'C' THEN 'Cash' ELSE 'N/A' END AS flstmthead_flhead_typedescrip2, flhead_name AS flstmthead_flhead_name, flcol_name AS flstmthead_flcol_name, _month AS flstmthead_month, _qtr AS flstmthead_qtr, _year AS flstmthead_year, _prmonth AS flstmthead_prmonth, _prqtr AS flstmthead_prqtr, _pryear AS flstmthead_pryear INTO _p FROM flhead,flcol WHERE ((flcol_id=pFlcolid) AND (flhead_id=flcol_flhead_id)); _row.flstmthead_flhead_id := _p.flstmthead_flhead_id; _row.flstmthead_flcol_id := _p.flstmthead_flcol_id; _row.flstmthead_period_id := _p.flstmthead_period; _row.flstmthead_username := _p.flstmthead_username; _row.flstmthead_typedescrip1 := _p.flstmthead_flhead_typedescrip1; _row.flstmthead_typedescrip2 := _p.flstmthead_flhead_typedescrip2; _row.flstmthead_flhead_name := _p.flstmthead_flhead_name; _row.flstmthead_flcol_name := _p.flstmthead_flcol_name; _row.flstmthead_month := _p.flstmthead_month; _row.flstmthead_qtr := _p.flstmthead_qtr; _row.flstmthead_year := _p.flstmthead_year; _row.flstmthead_prmonth := _p.flstmthead_prmonth; _row.flstmthead_prqtr := _p.flstmthead_prqtr; _row.flstmthead_pryear := _p.flstmthead_pryear; RETURN NEXT _row; END; $_$; 6DROP FUNCTION public.getflstmthead(integer, integer); publicadminfalse83992259512551682483-getfltrendhead(integer, integer[], character)FUNCTIONPCREATE FUNCTION getfltrendhead(integer, integer[], character) RETURNS SETOF fltrendhead LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodids ALIAS FOR $2; pInterval ALIAS FOR $3; _row fltrendhead%ROWTYPE; _p RECORD; _count INTEGER; _i INTEGER; _t TEXT; _fld TEXT[]; _type CHAR; BEGIN -- Validate Interval IF pInterval <> 'M' AND pInterval <> 'Q' AND pInterval <> 'Y' THEN RAISE EXCEPTION 'Invalid Interval --> %', pInterval; END IF; IF ARRAY_UPPER(pPeriodIds,1) <= 12 THEN _count := ARRAY_UPPER(pPeriodIds,1); ELSE _count := 12; END IF; SELECT flhead_type INTO _type FROM flhead WHERE flhead_id = pFlheadId; --get data... --...for Month IF (pInterval = 'M') THEN FOR _i IN 1.._count LOOP SELECT (CASE WHEN period_name='' THEN formatdate(period_start) || '-' || formatdate(period_end) ELSE period_name END) INTO _t FROM period WHERE (period_id=pPeriodIds[_i]); _fld[_i] := _t; END LOOP; --...for Quarter ELSE IF (pInterval = 'Q') THEN FOR _i IN 1.._count LOOP SELECT ('Q' || period_quarter || '-' || EXTRACT(year from yearperiod_end)) INTO _t FROM period, yearperiod WHERE ((period_id=pPeriodIds[_i]) AND (period_yearperiod_id=yearperiod_id)); _fld[_i] := _t; END LOOP; --...for Year ELSE FOR _i IN 1.._count LOOP SELECT (EXTRACT(year from yearperiod_end)||'') INTO _t FROM period, yearperiod WHERE ((period_id=pPeriodIds[_i]) AND (period_yearperiod_id=yearperiod_id)); _fld[_i] := _t; END LOOP; END IF; END IF; -- RETURN RESULTS SELECT flhead_id AS fltrendhead_flhead_id, getEffectiveXtUser() AS fltrendhead_username, CASE WHEN flhead_type = 'I' THEN 'Income Statement' WHEN flhead_type = 'B' THEN 'Balance Sheet' WHEN flhead_type = 'C' THEN 'Cash Flow Statement' ELSE 'Ad Hoc' END AS fltrendhead_flhead_typedescrip, flhead_name AS fltrendhead_flhead_name INTO _p FROM flhead WHERE (flhead_id=pFlheadId); _row.fltrendhead_flhead_id := _p.fltrendhead_flhead_id; _row.fltrendhead_username := _p.fltrendhead_username; _row.fltrendhead_typedescrip := _p.fltrendhead_flhead_typedescrip; _row.fltrendhead_flhead_name := _p.fltrendhead_flhead_name; _row.fltrendhead_fld1 := _fld[1]; _row.fltrendhead_fld2 := _fld[2]; _row.fltrendhead_fld3 := _fld[3]; _row.fltrendhead_fld4 := _fld[4]; _row.fltrendhead_fld5 := _fld[5]; _row.fltrendhead_fld6 := _fld[6]; _row.fltrendhead_fld7 := _fld[7]; _row.fltrendhead_fld8 := _fld[8]; _row.fltrendhead_fld9 := _fld[9]; _row.fltrendhead_fld10 := _fld[10]; _row.fltrendhead_fld11 := _fld[11]; _row.fltrendhead_fld12 := _fld[12]; IF (_type IN ('I','C')) THEN _row.fltrendhead_grndttl := 'Total'; END IF; RETURN NEXT _row; END; $_$; DDROP FUNCTION public.getfltrendhead(integer, integer[], character); publicadminfalse83992260112551682484getfreightclassid(text)FUNCTIONXCREATE FUNCTION getfreightclassid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFreightClassCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pFreightClassCode IS NULL) THEN RETURN NULL; END IF; SELECT freightclass_id INTO _returnVal FROM freightclass WHERE (freightclass_code=pFreightClassCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Freight Class % not found.', pFreightClassCode; END IF; RETURN _returnVal; END; $_$; .DROP FUNCTION public.getfreightclassid(text); publicadminfalse8399212551682485getfreighttaxtypeid()FUNCTION~CREATE FUNCTION getfreighttaxtypeid() RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _taxtypeid INTEGER; BEGIN SELECT taxtype_id INTO _taxtypeid FROM taxtype WHERE (taxtype_name='Freight'); RETURN _taxtypeid; END; $$; ,DROP FUNCTION public.getfreighttaxtypeid(); publicadminfalse8399212551682486getgainlossaccntid(integer)FUNCTION7CREATE FUNCTION getgainlossaccntid(integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntId ALIAS FOR $1; _returnVal INTEGER; BEGIN IF ( (pAccntId = 0) OR (pAccntId IS NULL) ) THEN RETURN 0; END IF; IF (fetchMetricValue('GLCompanySize') = 0) THEN _returnVal := fetchMetricValue('CurrencyGainLossAccount')::integer; ELSE SELECT company_gainloss_accnt_id INTO _returnVal FROM company JOIN accnt ON (company_number=accnt_company) WHERE (accnt_id=pAccntId); END IF; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Currency Gain/Loss Account not found for %', formatGlAccountLong(pAccntId); END IF; RETURN _returnVal; END; $_$; 2DROP FUNCTION public.getgainlossaccntid(integer); publicadminfalse8399212551682487getglaccntid(text)FUNCTION'CREATE FUNCTION getglaccntid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGlAccnt ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pGlAccnt IS NULL) THEN RETURN NULL; END IF; SELECT accnt_id INTO _returnVal FROM accnt WHERE (formatglaccount(accnt_id)=pGlAccnt); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Account Number % not found.', pGlAccnt; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.getglaccntid(text); publicadminfalse8399212551682488$getglaccntid(text, text, text, text)FUNCTIONCREATE FUNCTION getglaccntid(text, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCompany ALIAS FOR $1; pProfit ALIAS FOR $2; pGlAccnt ALIAS FOR $3; pSub ALIAS FOR $4; _account TEXT; _returnVal INTEGER; BEGIN IF (pGlAccnt IS NULL) THEN RETURN NULL; END IF; IF (pCompany is not null) THEN _account := pCompany || '-'; END IF; IF (pProfit is not null) THEN _account := _account || pProfit || '-'; END IF; IF (pGlAccnt is not null) THEN if (_account is null) then _account := pGlAccnt; else _account := _account || pGlAccnt; end if; END IF; IF (pSub is not null) THEN _account := _account || '-' || pSub; END IF; SELECT accnt_id INTO _returnVal FROM accnt WHERE (formatglaccount(accnt_id)=_account); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Account Number % not found.', _account; END IF; RETURN _returnVal; END; $_$; ;DROP FUNCTION public.getglaccntid(text, text, text, text); publicadminfalse8399212551682489getimageid(text)FUNCTION!CREATE FUNCTION getimageid(pimagename text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pImageName), '') = '') THEN RETURN NULL; END IF; SELECT image_id INTO _returnVal FROM image WHERE (image_name=pImageName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Image % not found.', pImageName; END IF; RETURN _returnVal; END; $$; 2DROP FUNCTION public.getimageid(pimagename text); publicadminfalse83992:12551682490getincdtcatid(text)FUNCTION3CREATE FUNCTION getincdtcatid(pincdtcatname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncdtCatName IS NULL) THEN RETURN NULL; END IF; SELECT incdtcat_id INTO _returnVal FROM incdtcat WHERE (incdtcat_name=pIncdtCatName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Category Name % not found.', pIncdtCatName; END IF; RETURN _returnVal; END; $$; 8DROP FUNCTION public.getincdtcatid(pincdtcatname text); publicadminfalse8399212551682491getincdtcrmacctid(integer)FUNCTION<CREATE FUNCTION getincdtcrmacctid(pincidentnumber integer) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncidentNumber IS NULL) THEN RETURN NULL; END IF; SELECT incdt_crmacct_id INTO _returnVal FROM incdt WHERE (incdt_number=pIncidentNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Number % not found.', pIncidentNumber; END IF; RETURN _returnVal; END; $$; ADROP FUNCTION public.getincdtcrmacctid(pincidentnumber integer); publicadminfalse8399212551682492getincdtpriorityid(text)FUNCTION[CREATE FUNCTION getincdtpriorityid(pincdtpriorityname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncdtPriorityName IS NULL) THEN RETURN NULL; END IF; SELECT incdtpriority_id INTO _returnVal FROM incdtpriority WHERE (incdtpriority_name=pIncdtPriorityName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Priority Name % not found.', pIncdtPriorityName; END IF; RETURN _returnVal; END; $$; BDROP FUNCTION public.getincdtpriorityid(pincdtpriorityname text); publicadminfalse8399212551682493getincdtresolutionid(text)FUNCTIONmCREATE FUNCTION getincdtresolutionid(pincdtresolutionname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncdtResolutionName IS NULL) THEN RETURN NULL; END IF; SELECT incdtresolution_id INTO _returnVal FROM incdtresolution WHERE (incdtresolution_name=pIncdtResolutionName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Resolution Name % not found.', pIncdtResolutionName; END IF; RETURN _returnVal; END; $$; FDROP FUNCTION public.getincdtresolutionid(pincdtresolutionname text); publicadminfalse8399212551682494getincdtseverityid(text)FUNCTION[CREATE FUNCTION getincdtseverityid(pincdtseverityname text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncdtSeverityName IS NULL) THEN RETURN NULL; END IF; SELECT incdtseverity_id INTO _returnVal FROM incdtseverity WHERE (incdtseverity_name=pIncdtSeverityName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Severity Name % not found.', pIncdtSeverityName; END IF; RETURN _returnVal; END; $$; BDROP FUNCTION public.getincdtseverityid(pincdtseverityname text); publicadminfalse8399212551682495getincidentid(integer)FUNCTION0CREATE FUNCTION getincidentid(pincidentnumber integer) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIncidentNumber IS NULL) THEN RETURN NULL; END IF; SELECT incdt_id INTO _returnVal FROM incdt WHERE (incdt_number=pIncidentNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Incident Number % not found.', pIncidentNumber; END IF; RETURN _returnVal; END; $$; =DROP FUNCTION public.getincidentid(pincidentnumber integer); publicadminfalse8399212551682496getinvcheadid(text)FUNCTION;CREATE FUNCTION getinvcheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pInvcNumber IS NULL) THEN RETURN NULL; END IF; SELECT invchead_id INTO _returnVal FROM invchead WHERE (UPPER(invchead_invcnumber)=UPPER(pInvcNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Invoice % not found.', pInvcNumber; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getinvcheadid(text); publicadminfalse83992 12551682497getinvcitemlotserial(integer)FUNCTIONACREATE FUNCTION getinvcitemlotserial(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcitemid ALIAS FOR $1; _lotserial text; _r RECORD; _first BOOLEAN; _newMethod BOOLEAN; BEGIN --Test to see if Lot/Serial Enabled SELECT metric_value INTO _lotserial FROM metric WHERE ((metric_name='LotSerialControl') AND (metric_value ='t')); IF (FOUND) THEN _lotserial := ''; _first := true; -- Two ways of doing this: old method and new method -- First, find out if new method employed. -- (new method is more accurate, but unfortunately no -- way to migrate or correct old data. Have to keep -- old method in case someone reprints an old invoice.) SELECT (COUNT(*) > 0) INTO _newMethod FROM shipitem WHERE ((shipitem_invcitem_id=pInvcitemid) AND (shipitem_invhist_id IS NOT NULL)); IF (_newMethod) THEN FOR _r IN SELECT DISTINCT ls_number FROM invdetail, invhist, shipitem, ls WHERE ((shipitem_invcitem_id=pInvcitemid) AND (shipitem_invhist_id=invhist_id) AND (invhist_id=invdetail_invhist_id) AND (invdetail_ls_id=ls_id)) LOOP IF (_first = false) THEN _lotserial := _lotserial || ', '; END IF; _lotserial := _lotserial || _r.ls_number; _first := false; END LOOP; RETURN _lotserial; ELSE -- Handle it old way FOR _r IN SELECT DISTINCT ls_number FROM ls, invdetail JOIN invhist ON (invdetail_invhist_id=invhist_id) WHERE ((invhist_transtype='SH') AND (invdetail_invcitem_id=pInvcitemid) AND (invdetail_ls_id=ls_id)) LOOP IF (_first = false) THEN _lotserial := _lotserial || ', '; END IF; _lotserial := _lotserial || _r.ls_number; _first := false; END LOOP; RETURN _lotserial; END IF; ELSE RETURN ''; END IF; END $_$; 4DROP FUNCTION public.getinvcitemlotserial(integer); publicadminfalse8399212551682498getipsheadid(text)FUNCTIONCREATE FUNCTION getipsheadid(pipsname text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIpsName IS NULL) THEN RETURN NULL; END IF; SELECT ipshead_id INTO _returnVal FROM ipshead WHERE (ipshead_name=pIpsName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Pricing Schedule % not found.', pIpsName; END IF; RETURN _returnVal; END; $$; 2DROP FUNCTION public.getipsheadid(pipsname text); publicadminfalse83992 12551682499-getipsitemid(text, text, numeric, text, text)FUNCTIONCREATE FUNCTION getipsitemid(pipsname text, pitemnumber text, pqtybreak numeric, pqtyuom text, ppriceuom text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIpsName IS NULL AND pItemNumber IS NULL AND pQtyBreak IS NULL AND pQtyUom IS NULL AND pPriceUom IS NULL) THEN RETURN NULL; END IF; SELECT ipsitem_id INTO _returnVal FROM ipsiteminfo WHERE ((ipsitem_ipshead_id=getIpsheadId(pIpsName)) AND (ipsitem_item_id=getItemId(pItemNumber)) AND (ipsitem_qtybreak=pQtyBreak) AND (ipsitem_qty_uom_id=getUomId(pQtyUom)) AND (ipsitem_price_uom_id=getUomId(pPriceUom))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Pricing Schedule Item for Schedule %, Item %,Qt Break %,Qty UOM %, Price UOM % not found.', pIpsName, pItemNumber, pQtyBreak, pQtyUom, pPriceUom; END IF; RETURN _returnVal; END; $$; uDROP FUNCTION public.getipsitemid(pipsname text, pitemnumber text, pqtybreak numeric, pqtyuom text, ppriceuom text); publicadminfalse8399212551682500$getipsprodcatid(text, text, numeric)FUNCTION$CREATE FUNCTION getipsprodcatid(pipsname text, pprodcat text, pqtybreak numeric) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pIpsName IS NULL AND pProdCat IS NULL AND pQtyBreak IS NULL) THEN RETURN NULL; END IF; SELECT ipsitem_id INTO _returnVal FROM ipsiteminfo WHERE ((ipsitem_ipshead_id=getIpsheadId(pIpsName)) AND (ipsitem_prodcat_id=getProdcatId(pProdCat)) AND (ipsitem_qtybreak=pQtyBreak)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Pricing Schedule Product Category for Schedule %, Product Category %,Qt Break % not found.', pIpsName, pProdCat, pQtyBreak; END IF; RETURN _returnVal; END; $$; WDROP FUNCTION public.getipsprodcatid(pipsname text, pprodcat text, pqtybreak numeric); publicadminfalse83992B12551682501getitemid(text)FUNCTION'CREATE FUNCTION getitemid(text) RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pItemNumber IS NULL) THEN RETURN NULL; END IF; SELECT item_id INTO _returnVal FROM item WHERE (item_number=UPPER(pItemNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Item % not found.', pItemNumber; END IF; RETURN _returnVal; END; $_$; &DROP FUNCTION public.getitemid(text); publicadminfalse8399212551682502getitemidfromupc(text)FUNCTIONCREATE FUNCTION getitemidfromupc(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemUPC ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pItemUPC IS NULL) THEN RETURN NULL; END IF; SELECT item_id INTO _returnVal FROM item WHERE (item_upccode=UPPER(pItemUPC)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Item % not found.', pItemUPC; END IF; RETURN _returnVal; END; $_$; -DROP FUNCTION public.getitemidfromupc(text); publicadminfalse8399212551682503getitemsiteid(text, text)FUNCTIONCREATE FUNCTION getitemsiteid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehouseCode ALIAS FOR $1; pItemNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN SELECT getItemsiteId(pWarehouseCode,pItemNumber,'ALL') INTO _returnVal; RETURN _returnVal; END; $_$; 0DROP FUNCTION public.getitemsiteid(text, text); publicadminfalse8399212551682504getitemsiteid(text, text, text)FUNCTION-CREATE FUNCTION getitemsiteid(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehouseCode ALIAS FOR $1; pItemNumber ALIAS FOR $2; pType ALIAS FOR $3; _type TEXT; _p RECORD; BEGIN IF ((pWarehouseCode IS NULL) OR (pItemNumber IS NULL)) THEN RETURN NULL; END IF; IF UPPER(pType) NOT IN ('ALL','ACTIVE','SOLD') THEN RAISE EXCEPTION 'Invalid Type %. Valid Itemsite types are ALL and SOLD', pType; END IF; SELECT * INTO _p FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_warehous_id=getWarehousId(pWarehouseCode,'ALL')) AND (item_number=UPPER(pItemNumber))); IF NOT (FOUND) THEN RAISE EXCEPTION 'Item % not found in Warehouse %', pItemNumber, pWarehouseCode; ELSIF ((UPPER(pType)='ACTIVE') OR (UPPER(pType)='SOLD')) THEN IF NOT (_p.item_active) THEN RAISE EXCEPTION 'Item % is inactive.', pItemNumber; ELSE IF NOT (_p.itemsite_active) THEN RAISE EXCEPTION 'Item % is inactive in Warehouse %', pItemNumber, pWarehouseCode; ELSE IF ((UPPER(pType)='SOLD') AND NOT _p.item_sold) THEN RAISE EXCEPTION 'Item % is not sold', pItemNumber; ELSE IF ((UPPER(pType)='SOLD') AND NOT _p.itemsite_sold) THEN RAISE EXCEPTION 'Item % is not sold from Warehouse %', pItemNumber, pWarehouseCode; END IF; END IF; END IF; END IF; END IF; RETURN _p.itemsite_id; END; $_$; 6DROP FUNCTION public.getitemsiteid(text, text, text); publicadminfalse8399212551682505getitemsrcid(text, text)FUNCTIONCREATE FUNCTION getitemsrcid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; pVendNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pItemNumber IS NULL) OR (pVendNumber IS NULL)) THEN RETURN NULL; END IF; SELECT itemsrc_id INTO _returnVal FROM itemsrc WHERE ((itemsrc_item_id=getItemId(pItemNumber)) AND (itemsrc_vend_id=getVendId(pVendNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Item Source Item % Vendor % not found.', pItemNumber,pVendNumber; END IF; RETURN _returnVal; END; $_$; /DROP FUNCTION public.getitemsrcid(text, text); publicadminfalse8399212551682507#getlasttrialbalid(integer, integer)FUNCTIONsCREATE FUNCTION getlasttrialbalid(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAccntId ALIAS FOR $1; pPeriodId ALIAS FOR $2; _p RECORD; _accntType TEXT; _result NUMERIC; BEGIN SELECT period_end,period_yearperiod_id INTO _p FROM period WHERE period_id=pPeriodId; SELECT accnt_type INTO _accntType FROM accnt WHERE accnt_id=pAccntId; IF (_accntType IN ('R','E')) THEN SELECT trialbal_id INTO _result FROM trialbal WHERE ((trialbal_accnt_id=pAccntId) AND (trialbal_period_id=pPeriodId)); ELSE SELECT trialbal_id INTO _result FROM (SELECT trialbal_id FROM trialbal,period WHERE ((trialbal_accnt_id=pAccntId) AND (trialbal_period_id=period_id) AND (period_end <= _p.period_end) AND (period_yearperiod_id=_p.period_yearperiod_id)) ORDER BY period_end DESC) AS data; END IF; RETURN _result; END; $_$; :DROP FUNCTION public.getlasttrialbalid(integer, integer); publicadminfalse8399212551682508getlocationid(text, text)FUNCTIONCREATE FUNCTION getlocationid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehouse ALIAS FOR $1; pLocation ALIAS FOR $2; _returnVal INTEGER; BEGIN IF (pLocation IS NULL) THEN RETURN NULL; END IF; SELECT location_id INTO _returnVal FROM location WHERE ((location_warehous_id=getWarehousId(pWarehouse,'ACTIVE')) AND (formatLocationname(location_id)=pLocation)) LIMIT 1; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Location % not found in Warehouse %.', pLocation, pWarehouse; END IF; RETURN _returnVal; END; $_$; 0DROP FUNCTION public.getlocationid(text, text); publicadminfalse8399212551682509getlotserialid(text, text)FUNCTIONCREATE FUNCTION getlotserialid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemNumber ALIAS FOR $1; pLotSerialNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pItemNumber IS NULL) OR (pLotSerialNumber IS NULL) OR (pLotSerialNumber='')) THEN RETURN NULL; END IF; SELECT ls_id INTO _returnVal FROM ls WHERE ((ls_item_id=getItemId(pItemNumber)) AND (UPPER(ls_number)=UPPER(pLotSerialNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'LotSerial % not found.', pLotSerialNumber; END IF; RETURN _returnVal; END; $_$; 1DROP FUNCTION public.getlotserialid(text, text); publicadminfalse8399212551682510getopheadid(text)FUNCTION>CREATE FUNCTION getopheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOpHeadName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pOpHeadName IS NULL) THEN RETURN NULL; END IF; SELECT ophead_id INTO _returnVal FROM ophead WHERE (UPPER(ophead_name)=UPPER(pOpHeadName)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Opportunity % not found.', pOpHeadName; END IF; RETURN _returnVal; END; $_$; (DROP FUNCTION public.getopheadid(text); publicadminfalse83992 12551682511%getpacklistcharname(integer, integer)FUNCTIONCREATE FUNCTION getpacklistcharname(integer, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadId ALIAS FOR $1; pOrderItemId ALIAS FOR $2; _charname text; _r RECORD; _first BOOLEAN; BEGIN -- If transfer order, get out SELECT shiphead_order_type INTO _r FROM shiphead WHERE ((shiphead_id=pShipheadId) AND (shiphead_order_type='TO')); IF (FOUND) THEN RETURN ''; END IF; _charname := ''; _first := true; FOR _r IN SELECT char_name FROM char, charass WHERE ((char_id=charass_char_id) AND (charass_target_type='SI') AND (charass_target_id=pOrderItemId)) LOOP IF (_first = false) THEN _charname := _charname || ' '; END IF; _charname := _charname || _r.char_name; _first := false; END LOOP; RETURN _charname; END $_$; <DROP FUNCTION public.getpacklistcharname(integer, integer); publicadminfalse83992!12551682512&getpacklistcharvalue(integer, integer)FUNCTIONCREATE FUNCTION getpacklistcharvalue(integer, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadId ALIAS FOR $1; pOrderItemId ALIAS FOR $2; _charval text; _r RECORD; _first BOOLEAN; BEGIN -- If transfer order, get out SELECT shiphead_order_type INTO _r FROM shiphead WHERE ((shiphead_id=pShipheadId) AND (shiphead_order_type='TO')); IF (FOUND) THEN RETURN ''; END IF; _charval := ''; _first := true; FOR _r IN SELECT charass_value FROM char, charass WHERE ((char_id=charass_char_id) AND (charass_target_type='SI') AND (charass_target_id=pOrderItemId)) LOOP IF (_first = false) THEN _charval := _charval || ' '; END IF; _charval := _charval || _r.charass_value; _first := false; END LOOP; RETURN _charval; END $_$; =DROP FUNCTION public.getpacklistcharvalue(integer, integer); publicadminfalse83992"12551682513*getpacklistitemlotserial(integer, integer)FUNCTIONCREATE FUNCTION getpacklistitemlotserial(integer, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadId ALIAS FOR $1; pOrderItemId ALIAS FOR $2; _lotserial text; _r RECORD; _first BOOLEAN; BEGIN --Test to see if Lot/Serial Enabled SELECT metric_value INTO _lotserial FROM metric WHERE ((metric_name='LotSerialControl') AND (metric_value ='t')); IF (FOUND) THEN _lotserial := ''; _first := true; FOR _r IN SELECT DISTINCT ls_number FROM invdetail, invhist, shipitem, ls WHERE ((shipitem_shiphead_id=pShipheadId) AND (shipitem_orderitem_id=pOrderItemId) AND (shipitem_invhist_id=invhist_id) AND (invhist_id=invdetail_invhist_id) AND (invdetail_ls_id=ls_id)) LOOP IF (_first = false) THEN _lotserial := _lotserial || ', '; END IF; _lotserial := _lotserial || _r.ls_number; _first := false; END LOOP; RETURN _lotserial; ELSE RETURN ''; END IF; END $_$; ADROP FUNCTION public.getpacklistitemlotserial(integer, integer); publicadminfalse83992#12551682514getperiodid(integer, character)FUNCTIONCREATE FUNCTION getperiodid(integer, character) RETURNS SETOF integer LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodId ALIAS FOR $1; pInterval ALIAS FOR $2; _x RECORD; BEGIN -- Validate Interval IF pInterval <> 'M' AND pInterval <> 'Q' AND pInterval <> 'Y' THEN RAISE EXCEPTION 'Invalid Interval --> %', pInterval; END IF; IF pInterval='M' THEN RETURN NEXT pPeriodId; ELSE IF pInterval='Q' THEN FOR _x IN SELECT qp.period_id AS period_id FROM period cp, period qp WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=qp.period_yearperiod_id) AND (cp.period_quarter=qp.period_quarter) AND (cp.period_start>=qp.period_start)) ORDER BY qp.period_start LOOP RETURN NEXT _x.period_id; END LOOP; ELSE FOR _x IN SELECT yp.period_id AS period_id FROM period cp, period yp WHERE ((cp.period_id=pPeriodId) AND (cp.period_yearperiod_id=yp.period_yearperiod_id) AND (cp.period_start>=yp.period_start)) ORDER BY yp.period_start LOOP RETURN NEXT _x.period_id; END LOOP; END IF; END IF; RETURN; END; $_$; 6DROP FUNCTION public.getperiodid(integer, character); publicadminfalse83992'12551682515getperiodid(date)FUNCTION?CREATE FUNCTION getperiodid(date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodDate ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pPeriodDate IS NULL) THEN RETURN NULL; END IF; SELECT period_id INTO _returnVal FROM period WHERE ((pPeriodDate) between period_start AND period_end); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Period for % not found.', pPeriodDate; END IF; RETURN _returnVal; END; $_$; (DROP FUNCTION public.getperiodid(date); publicadminfalse83992W12551682516getpkgheadid(text)FUNCTION+CREATE FUNCTION getpkgheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ppkgname ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (ppkgname IS NULL) THEN RETURN NULL; END IF; SELECT pkghead_id INTO _returnVal FROM pkghead WHERE (UPPER(pkghead_name)=UPPER(ppkgname)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Package % not found.', ppkgname; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.getpkgheadid(text); publicadminfalse8399212551682517getplancodeid(text)FUNCTION!CREATE FUNCTION getplancodeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPlanCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pPlanCode IS NULL) THEN RETURN NULL; END IF; SELECT plancode_id INTO _returnVal FROM plancode WHERE (plancode_code=pPlanCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Plan Code % not found.', pPlanCode; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getplancodeid(text); publicadminfalse83992(12551682518getpoheadid(text)FUNCTIONOCREATE FUNCTION getpoheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPurchaseOrderNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pPurchaseOrderNumber IS NULL) THEN RETURN NULL; END IF; SELECT pohead_id INTO _returnVal FROM pohead WHERE (pohead_number=pPurchaseOrderNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Purchase Order % not found.', pPurchaseOrderNumber; END IF; RETURN _returnVal; END; $_$; (DROP FUNCTION public.getpoheadid(text); publicadminfalse83992)12551682519getpoitemid(text, integer)FUNCTIONCREATE FUNCTION getpoitemid(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPurchaseOrderNumber ALIAS FOR $1; pLineNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF (pPurchaseOrderNumber IS NULL OR pLineNumber IS NULL) THEN RETURN NULL; END IF; SELECT poitem_id INTO _returnVal FROM pohead, poitem WHERE ((pohead_number=pPurchaseOrderNumber) AND (poitem_pohead_id=pohead_id) AND (poitem_linenumber=pLineNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Purchase Order % not found.', pSalesOrderNumber; END IF; RETURN _returnVal; END; $_$; 1DROP FUNCTION public.getpoitemid(text, integer); publicadminfalse83992p12551682520getprjaccntid(integer, integer)FUNCTIONCREATE FUNCTION getprjaccntid(integer, integer) RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrjid ALIAS FOR $1; pAccntid ALIAS FOR $2; BEGIN -- Project Accounting is required to fully implement this functionality RETURN pAccntId; END; $_$; 6DROP FUNCTION public.getprjaccntid(integer, integer); publicadminfalse83992*12551682521getprjid(text)FUNCTION CREATE FUNCTION getprjid(pprjnumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pPrjNumber IS NULL) THEN RETURN NULL; END IF; SELECT prj_id INTO _returnVal FROM prj WHERE (prj_number=pPrjNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Project Number % not found.', pPrjNumber; END IF; RETURN _returnVal; END; $$; 0DROP FUNCTION public.getprjid(pprjnumber text); publicadminfalse83992+12551682522getprjtaskid(text, text)FUNCTIONCREATE FUNCTION getprjtaskid(pprjnumber text, ptasknumber text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pPrjNumber IS NULL OR pTaskNumber IS NULL) THEN RETURN NULL; END IF; SELECT prjtask_id INTO _returnVal FROM prjtask JOIN prj ON (prj_id=prjtask_prj_id) WHERE ((prj_number=pPrjNumber) AND (prjtask_number=pTaskNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Project Task Number %-% not found.', pPrjNumber, pTaskNumber; END IF; RETURN _returnVal; END; $$; FDROP FUNCTION public.getprjtaskid(pprjnumber text, ptasknumber text); publicadminfalse83992,12551682523getprodcatid(text)FUNCTION#CREATE FUNCTION getprodcatid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pProdCat ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pProdCat IS NULL) THEN RETURN NULL; END IF; SELECT prodcat_id INTO _returnVal FROM prodcat WHERE (prodcat_code=pProdCat); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Product Category % not found.', pProdCat; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.getprodcatid(text); publicadminfalse83992-12551682524getprospectid(text)FUNCTIONRCREATE FUNCTION getprospectid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pProspectNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pProspectNumber IS NULL) THEN RETURN NULL; END IF; SELECT prospect_id INTO _returnVal FROM prospect WHERE(UPPER(prospect_number)=UPPER(pProspectNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Prospect Number % found.', pProspectNumber; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getprospectid(text); publicadminfalse83992.12551682525getquoteid(text)FUNCTION,CREATE FUNCTION getquoteid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuoteNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pQuoteNumber IS NULL) THEN RETURN NULL; END IF; SELECT quhead_id INTO _returnVal FROM quhead WHERE (quhead_number=pQuoteNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Quote Number % not found.', pQuoteNumber; END IF; RETURN _returnVal; END; $_$; 'DROP FUNCTION public.getquoteid(text); publicadminfalse83992/12551682526!getquotelineitemid(text, integer)FUNCTIONCREATE FUNCTION getquotelineitemid(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuoteNumber ALIAS FOR $1; pLineNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pQuoteNumber IS NULL) OR (pLineNumber IS NULL)) THEN RETURN NULL; END IF; SELECT quitem_id INTO _returnVal FROM quhead, quitem WHERE ((quhead_number=pQuoteNumber) AND (quhead_id=quitem_quhead_id) AND (quitem_linenumber=pLineNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Quote Line Item %-%not found.', pQuoteNumber,pLineNumber; END IF; RETURN _returnVal; END; $_$; 8DROP FUNCTION public.getquotelineitemid(text, integer); publicadminfalse83992012551682527getrevid(text, text, text)FUNCTIONDCREATE FUNCTION getrevid(text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pType ALIAS FOR $1; pItemNumber ALIAS FOR $2; pRevision ALIAS FOR $3; _returnVal INTEGER; BEGIN IF (pItemNumber IS NULL) THEN RETURN NULL; END IF; IF (NOT fetchMetricBool('RevControl')) THEN RETURN -1; ELSIF ( (pRevision IS NULL) OR (LENGTH(pRevision)=0) ) THEN SELECT getActiveRevId(pType, getItemId(pItemNumber)) INTO _returnVal; ELSE IF (pType='BOM') THEN SELECT rev_id INTO _returnVal FROM item, bomhead, rev WHERE ((item_id=bomhead_item_id) AND (bomhead_rev_id=rev_id) AND (UPPER(item_number)=UPPER(pItemNumber)) AND (rev_number=pRevision)); ELSIF (pType='BOO') THEN SELECT rev_id INTO _returnVal FROM item, xtmfg.boohead, rev WHERE ((item_id=boohead_item_id) AND (boohead_rev_id=rev_id) AND (UPPER(item_number)=UPPER(pItemNumber)) AND (rev_number=pRevision)); ELSE RAISE EXCEPTION 'Invalid Revision Type.'; END IF; END IF; IF (_returnVal IS NULL) THEN RAISE EXCEPTION '% revision % for % not found.', pType, pRevision, pItemNumber; END IF; RETURN _returnVal; END; $_$; 1DROP FUNCTION public.getrevid(text, text, text); publicadminfalse83992112551682528getrsnid(text)FUNCTIONCREATE FUNCTION getrsnid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pRsnCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pRsnCode IS NULL) THEN RETURN NULL; END IF; SELECT rsncode_id INTO _returnVal FROM rsncode WHERE (rsncode_code=pRsnCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Reason Code % not found.', pRsnCode; END IF; RETURN _returnVal; END; $_$; %DROP FUNCTION public.getrsnid(text); publicadminfalse83992212551682529getsalescatid(text)FUNCTION9CREATE FUNCTION getsalescatid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesCatName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSalesCatName IS NULL) THEN RETURN NULL; END IF; SELECT salescat_id INTO _returnVal FROM salescat WHERE (salescat_name=pSalesCatName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Category % not found.', pSalesCatName; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getsalescatid(text); publicadminfalse8399212551682530!getsaleslineitemid(text, integer)FUNCTIONCREATE FUNCTION getsaleslineitemid(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN getSalesLineItemId($1, $2, 0); END $_$; 8DROP FUNCTION public.getsaleslineitemid(text, integer); publicadminfalse83992312551682531getsaleslineitemid(text)FUNCTIONCREATE FUNCTION getsaleslineitemid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderItem ALIAS FOR $1; _delpos INTEGER = 0; _order TEXT; _part TEXT; _ln INTEGER; _sn INTEGER; BEGIN IF (pSalesOrderItem IS NULL) THEN RETURN NULL; END IF; _delpos := strpos(pSalesOrderItem, '-'); IF (_delpos > 0) THEN _order := substr(pSalesOrderItem, 1, (_delpos - 1)); _part := substr(pSalesOrderItem, (_delpos + 1)); _delpos := strpos(_part, '.'); IF (_delpos > 0) THEN _ln := CAST(substr(_part, 1, (_delpos - 1)) AS INTEGER); _sn := CAST(substr(_part, (_delpos + 1)) AS INTEGER); ELSE _ln := CAST(_part AS INTEGER); _sn := 0; END IF; RETURN getSalesLineItemId( _order, _ln, _sn ); END IF; RETURN 0; END; $_$; /DROP FUNCTION public.getsaleslineitemid(text); publicadminfalse83992412551682532*getsaleslineitemid(text, integer, integer)FUNCTION3CREATE FUNCTION getsaleslineitemid(text, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderNumber ALIAS FOR $1; pLineNumber ALIAS FOR $2; pSubNumber ALIAS FOR $3; _returnVal INTEGER; BEGIN IF ((pSalesOrderNumber IS NULL) OR (pLineNumber IS NULL)) THEN RETURN NULL; END IF; SELECT coitem_id INTO _returnVal FROM cohead, coitem WHERE ((cohead_number=pSalesOrderNumber) AND (cohead_id=coitem_cohead_id) AND (coitem_linenumber=pLineNumber) AND (coitem_subnumber=pSubNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Line Item %-%not found.', pSalesOrderNumber,pLineNumber; END IF; RETURN _returnVal; END; $_$; ADROP FUNCTION public.getsaleslineitemid(text, integer, integer); publicadminfalse83992512551682533getsalesorderid(text)FUNCTIONKCREATE FUNCTION getsalesorderid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesOrderNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSalesOrderNumber IS NULL) THEN RETURN NULL; END IF; SELECT cohead_id INTO _returnVal FROM cohead WHERE (cohead_number=pSalesOrderNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Order Number % not found.', pSalesOrderNumber; END IF; RETURN _returnVal; END; $_$; ,DROP FUNCTION public.getsalesorderid(text); publicadminfalse83992612551682534getsalesrepid(text)FUNCTIONECREATE FUNCTION getsalesrepid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSalesRepNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSalesRepNumber IS NULL) THEN RETURN NULL; END IF; SELECT salesrep_id INTO _returnVal FROM salesrep WHERE (salesrep_number=pSalesRepNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sales Rep Number % not found.', pSalesRepNumber; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getsalesrepid(text); publicadminfalse83992712551745024getsaletypeid(text)FUNCTIONCREATE FUNCTION getsaletypeid(psaletype text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pSaleType IS NULL) THEN RETURN NULL; END IF; SELECT saletype_id INTO _returnVal FROM saletype WHERE (saletype_code=UPPER(pSaleType)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Sale Type % not found.', pSaleType; END IF; RETURN _returnVal; END; $$; 4DROP FUNCTION public.getsaletypeid(psaletype text); publicadminfalse83992;12551682535getshiftid(text)FUNCTIONFCREATE FUNCTION getshiftid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShiftNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (COALESCE(TRIM(pShiftNumber), '') = '') THEN RETURN NULL; END IF; SELECT shift_id INTO _returnVal FROM shift WHERE (UPPER(shift_number)=UPPER(pShiftNumber)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Shift % not found.', pShiftNumber; END IF; RETURN _returnVal; END; $_$; 'DROP FUNCTION public.getshiftid(text); publicadminfalse83992<12551682536getshipchrgid(text)FUNCTION3CREATE FUNCTION getshipchrgid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipChrgName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pShipChrgName IS NULL) THEN RETURN NULL; END IF; SELECT shipchrg_id INTO _returnVal FROM shipchrg WHERE (shipchrg_name=pShipChrgName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Ship Charge % not found.', pShipChrgName; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getshipchrgid(text); publicadminfalse83992=12551682537getshipformid(text)FUNCTION9CREATE FUNCTION getshipformid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipFormName ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pShipFormName IS NULL) THEN RETURN NULL; END IF; SELECT shipform_id INTO _returnVal FROM shipform WHERE (shipform_name=pShipFormName) LIMIT 1; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Ship Form % not found.', pShipFormName; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getshipformid(text); publicadminfalse83992>12551682538getshipheadid(text)FUNCTIONUCREATE FUNCTION getshipheadid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipmentNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pShipmentNumber IS NULL OR pShipmentNumber = '') THEN RETURN NULL; END IF; SELECT shiphead_id INTO _returnVal FROM shiphead WHERE (shiphead_number=pShipmentNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Shipment % not found.', pShipmentNumber; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getshipheadid(text); publicadminfalse83992?12551682539getshiptoid(text, text)FUNCTIONCREATE FUNCTION getshiptoid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustNumber ALIAS FOR $1; pShiptoNumber ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pCustNumber IS NULL) OR (pShiptoNumber IS NULL)) THEN RETURN NULL; END IF; SELECT shipto_id INTO _returnVal FROM shiptoinfo WHERE ((shipto_cust_id=getCustId(pCustNumber,true)) AND (UPPER(shipto_num)=UPPER(pShiptoNumber))); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Shipto % not found.', pShiptoNumber; END IF; RETURN _returnVal; END; $_$; .DROP FUNCTION public.getshiptoid(text, text); publicadminfalse83992@12551682540wgetshiptonumberfrominfo(text, text, text, text, text, text, text, text, text, text, text, text, text, boolean, boolean)FUNCTION9CREATE FUNCTION getshiptonumberfrominfo(text, text, text, text, text, text, text, text, text, text, text, text, text, boolean, boolean) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _custname TEXT := COALESCE(TRIM(UPPER( $1)), ''); _email TEXT := COALESCE(TRIM(UPPER( $2)), ''); _company TEXT := COALESCE(TRIM(UPPER( $3)), ''); _first TEXT := COALESCE(TRIM(UPPER( $4)), ''); _last TEXT := COALESCE(TRIM(UPPER( $5)), ''); _fullname TEXT := COALESCE(TRIM(UPPER( $6)), ''); _addr1 TEXT := COALESCE(TRIM(UPPER( $7)), ''); _addr2 TEXT := COALESCE(TRIM(UPPER( $8)), ''); _addr3 TEXT := COALESCE(TRIM(UPPER( $9)), ''); _city TEXT := COALESCE(TRIM(UPPER($10)), ''); _state TEXT := COALESCE(TRIM(UPPER($11)), ''); _postalcode TEXT := COALESCE(TRIM(UPPER($12)), ''); _country TEXT := COALESCE(TRIM(UPPER($13)), ''); _generate BOOLEAN := COALESCE($14, FALSE); _create BOOLEAN := COALESCE($15, FALSE); _citytrunc TEXT; _counter INTEGER; _custid INTEGER; _custnumber TEXT; _candidate TEXT; _r RECORD; _statetrunc TEXT; BEGIN IF (_custname = '') THEN _custname := getCustNameFromInfo(_email, _company, _first, _last, _fullname, FALSE); END IF; SELECT COUNT(*) INTO _counter FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=UPPER(_custname)) AND UPPER(shipto_name)=UPPER(_fullname) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)); IF (_counter = 1) THEN SELECT shipto_num INTO _candidate FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=UPPER(_custname)) AND UPPER(shipto_name)=UPPER(_fullname) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)); RETURN _candidate; ELSE SELECT COUNT(*) INTO _counter FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=UPPER(_custname)) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)); IF (_counter = 1) THEN SELECT shipto_num INTO _candidate FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=UPPER(_custname)) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)); RETURN _candidate; ELSIF (_counter > 1) THEN SELECT shipto_num, CASE WHEN (UPPER(addr_country) = _country) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_postalcode) = _postalcode) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_state) = _state) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_city) = _city) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_line3) = _addr3) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_line2) = _addr2) THEN 1 ELSE 0 END + CASE WHEN (UPPER(addr_line1) = _addr1) THEN 1 ELSE 0 END AS maxquotient INTO _candidate, _counter FROM custinfo, shiptoinfo, addr WHERE ((UPPER(cust_name)=_custname) AND (cust_id=shipto_cust_id) AND (shipto_addr_id=addr_id)) ORDER BY maxquotient desc LIMIT 1; RETURN _candidate; END IF; END IF; IF (_generate) THEN SELECT cust_number, cust_id INTO _custnumber, _custid FROM custinfo WHERE (UPPER(cust_name)=_custname); -- keep the number short _citytrunc := SUBSTRING(_city FOR 5); _statetrunc := SUBSTRING(_state FOR 5); IF (LENGTH(_citytrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_citytrunc)) )) THEN _candidate := _citytrunc; ELSIF (LENGTH(_last || _citytrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_last || _citytrunc)) )) THEN _candidate := _last || _citytrunc; ELSIF (LENGTH(_statetrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_statetrunc)) )) THEN _candidate := _statetrunc; ELSIF (LENGTH(_last || _statetrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_last || _statetrunc)) )) THEN _candidate := _last || _statetrunc; ELSIF (LENGTH(_citytrunc || _statetrunc) > 0 AND NOT EXISTS(SELECT UPPER(shipto_num) FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (UPPER(shipto_num)=_citytrunc || _statetrunc)) )) THEN _candidate := _citytrunc || _statetrunc; ELSE SELECT CAST(COALESCE(MAX(CAST(shipto_num AS INTEGER)), 0) + 1 AS TEXT) INTO _candidate FROM shiptoinfo WHERE ((shipto_cust_id=_custid) AND (shipto_num~'^[0-9]*$')); END IF; IF (_create) THEN INSERT INTO api.custshipto ( customer_number, shipto_number, name, address1, address2, address3, city, state, postal_code, country, address_change, first, last, email, edi_profile ) VALUES ( _custnumber, _candidate, _candidate, _addr1, _addr2, _addr3, _city, _state, _postalcode, _country, 'CHANGEONE', _first, _last, LOWER(_email), 'No EDI' ); END IF; RETURN _candidate; END IF; RETURN ''; END; $_$; DROP FUNCTION public.getshiptonumberfrominfo(text, text, text, text, text, text, text, text, text, text, text, text, text, boolean, boolean); publicadminfalse83992C12551682541getshipviaid(text)FUNCTION,CREATE FUNCTION getshipviaid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipViaCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pShipViaCode IS NULL) THEN RETURN NULL; END IF; SELECT shipvia_id INTO _returnVal FROM shipvia WHERE (shipvia_code=pShipViaCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'ShipVia Code % not found.', pShipViaCode; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.getshipviaid(text); publicadminfalse83992D12551682542getshipzoneid(text)FUNCTION%CREATE FUNCTION getshipzoneid(pshipzonename text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN IF (pShipZoneName IS NULL) THEN RETURN NULL; END IF; SELECT shipzone_id INTO _returnVal FROM shipzone WHERE (shipzone_name=pShipZoneName); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Ship Zone % not found.', pShipZoneName; END IF; RETURN _returnVal; END; $$; 8DROP FUNCTION public.getshipzoneid(pshipzonename text); publicadminfalse83992E12551682543getsitetypeid(text)FUNCTION!CREATE FUNCTION getsitetypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSiteType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pSiteType IS NULL) THEN RETURN NULL; END IF; SELECT sitetype_id INTO _returnVal FROM sitetype WHERE (sitetype_name=pSiteType); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Site Type % not found.', pSiteType; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getsitetypeid(text); publicadminfalse83992F12551682544getsoscheddate(integer)FUNCTIONCREATE FUNCTION getsoscheddate(integer) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoheadid ALIAS FOR $1; _minscheddate DATE; BEGIN SELECT MIN(coitem_scheddate) INTO _minscheddate FROM coitem WHERE ( (coitem_cohead_id=pCoheadid) AND (coitem_status NOT IN ('C', 'X')) ); RETURN _minscheddate; END; $_$; .DROP FUNCTION public.getsoscheddate(integer); publicadminfalse83992G12551682545getsostatus(integer)FUNCTIONCREATE FUNCTION getsostatus(integer) RETURNS character LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCoheadid ALIAS FOR $1; _result char(1); BEGIN SELECT cohead_status INTO _result FROM cohead WHERE (cohead_id=pCoheadid); RETURN _result; END; $_$; +DROP FUNCTION public.getsostatus(integer); publicadminfalse83992H12552005539getsubtax(integer, integer)FUNCTIONeCREATE FUNCTION getsubtax(integer, integer) RETURNS SETOF subtax LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxCodeId ALIAS FOR $1; pLevel ALIAS FOR $2; _row subtax%ROWTYPE; _x RECORD; _y RECORD; BEGIN FOR _x IN --Select all tax codes whose calculation basis is pTaxCodeId SELECT tax_id, tax_code, tax_descrip FROM tax WHERE tax_basis_tax_id = pTaxCodeId LOOP _row.subtax_taxcode_id := _x.tax_id; _row.subtax_taxcode_code := _x.tax_code; _row.subtax_taxcode_descrip := _x.tax_descrip; _row.subtax_taxcode_level := pLevel + 1; RETURN NEXT _row; FOR _y IN SELECT * from getSubTax(_x.tax_id, pLevel + 1) --This is the recursive part. LOOP _row.subtax_taxcode_id := _y.subtax_taxcode_id; _row.subtax_taxcode_code := _y.subtax_taxcode_code ; _row.subtax_taxcode_descrip := _y.subtax_taxcode_descrip; _row.subtax_taxcode_level := pLevel + 2; RETURN NEXT _row; END LOOP; END LOOP; END; $_$; 2DROP FUNCTION public.getsubtax(integer, integer); publicadminfalse839922597I12551682547gettaxauthid(text)FUNCTION-CREATE FUNCTION gettaxauthid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxAuthCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTaxAuthCode IS NULL) THEN RETURN NULL; END IF; SELECT taxauth_id INTO _returnVal FROM taxauth WHERE (taxauth_code=pTaxAuthCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Tax Authority % not found.', pTaxAuthCode; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.gettaxauthid(text); publicadminfalse83992J12551682548gettaxid(text)FUNCTIONCREATE FUNCTION gettaxid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTaxCode IS NULL) THEN RETURN NULL; END IF; SELECT tax_id INTO _returnVal FROM tax WHERE (tax_code=pTaxCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Tax Code % not found.', pTaxCode; END IF; RETURN _returnVal; END; $_$; %DROP FUNCTION public.gettaxid(text); publicadminfalse83992K12551682549gettaxtypeid(text)FUNCTIONCREATE FUNCTION gettaxtypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTaxType IS NULL) THEN RETURN NULL; END IF; SELECT taxtype_id INTO _returnVal FROM taxtype WHERE (taxtype_name=pTaxType); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Tax Type % not found.', pTaxType; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.gettaxtypeid(text); publicadminfalse83992L12551682550gettaxzoneid(text)FUNCTIONCREATE FUNCTION gettaxzoneid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxZone ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTaxZone IS NULL) THEN RETURN NULL; END IF; SELECT taxzone_id INTO _returnVal FROM taxzone WHERE (taxzone_code=pTaxZone); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Tax Zone % not found.', pTaxZone; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.gettaxzoneid(text); publicadminfalse83992M12551682551gettermsid(text)FUNCTIONCREATE FUNCTION gettermsid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTermsCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pTermsCode IS NULL) THEN RETURN NULL; END IF; SELECT terms_id INTO _returnVal FROM terms WHERE (terms_code=pTermsCode); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Terms Code % not found.', pTermsCode; END IF; RETURN _returnVal; END; $_$; 'DROP FUNCTION public.gettermsid(text); publicadminfalse83992N12551682552getunassignedaccntid()FUNCTIONCREATE FUNCTION getunassignedaccntid() RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _test INTEGER; _returnVal INTEGER; BEGIN SELECT fetchMetricValue('UnassignedAccount') INTO _test; IF (_test IS NULL) THEN RAISE EXCEPTION 'Metric not found for UnassignedAccount'; END IF; SELECT accnt_id INTO _returnVal FROM accnt WHERE (accnt_id=_test); IF (NOT FOUND) THEN RAISE EXCEPTION 'Metric UnassignedAccount is an invalid G/L Account'; END IF; RETURN _returnVal; END; $$; -DROP FUNCTION public.getunassignedaccntid(); publicadminfalse83992r12551682553getuomid(text)FUNCTIONCREATE FUNCTION getuomid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUom ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pUom IS NULL) THEN RETURN NULL; END IF; SELECT uom_id INTO _returnVal FROM uom WHERE (uom_name=pUom); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Unit of Measure % not found.', pUom; END IF; RETURN _returnVal; END; $_$; %DROP FUNCTION public.getuomid(text); publicadminfalse83992A12551682554getuomtypeid(text)FUNCTION2CREATE FUNCTION getuomtypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUomType ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pUomType IS NULL) THEN RETURN NULL; END IF; SELECT uomtype_id INTO _returnVal FROM uomtype WHERE (UPPER(uomtype_name)=UPPER(pUomType)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Unit of Measuer Type % not found.', pUomType; END IF; RETURN _returnVal; END; $_$; )DROP FUNCTION public.getuomtypeid(text); publicadminfalse83992O12551682555getuomtypeid(text[])FUNCTIONCREATE FUNCTION getuomtypeid(text[]) RETURNS integer[] LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUomTypes ALIAS FOR $1; _returnVal INTEGER[]; _val INTEGER; _i INTEGER; BEGIN IF (pUomTypes IS NULL) OR (ARRAY_UPPER(pUomTypes,1) = 0) THEN RETURN NULL; END IF; FOR _i IN 1..ARRAY_UPPER(pUomTypes,1) LOOP SELECT uomtype_id INTO _val FROM uomtype WHERE (UPPER(uomtype_name)=UPPER(pUomTypes[_i])); IF (_val IS NULL) THEN RAISE EXCEPTION 'Unit of Measure Type % not found.', pUomTypes[_i]; ELSE _returnVal[_i] := _val; END IF; END LOOP; RETURN _returnVal; END; $_$; +DROP FUNCTION public.getuomtypeid(text[]); publicadminfalse83992P12551682556getusrid(text)FUNCTIONCREATE FUNCTION getusrid(pusr text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT usr_id INTO _returnVal FROM usr WHERE (usr_username=COALESCE(pUsr, getEffectiveXtUser())); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'User % not found.', pUsr; END IF; RETURN _returnVal; END; $$; *DROP FUNCTION public.getusrid(pusr text); publicadminfalse83992Q12551844564getusrlocaleid()FUNCTION'CREATE FUNCTION getusrlocaleid() RETURNS integer LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT CAST(usrpref_value AS INTEGER) FROM usrpref WHERE (usrpref_username=getEffectiveXTUser()) AND (usrpref_name='locale_id') INTO _returnVal; IF (_returnVal IS NULL) THEN SELECT locale_id FROM locale WHERE (LOWER(locale_code) = 'default') LIMIT 1 INTO _returnVal; END IF; IF (_returnVal IS NULL) THEN SELECT locale_id FROM locale ORDER BY locale_id LIMIT 1 INTO _returnVal; END IF; IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'User Locale not found.'; END IF; RETURN _returnVal; END; $$; 'DROP FUNCTION public.getusrlocaleid(); publicadminfalse83992R12551682557getvendaddrid(text, text)FUNCTIONCREATE FUNCTION getvendaddrid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendNumber ALIAS FOR $1; pVendAddrCode ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ( (pVendNumber IS NULL) OR (pVendAddrCode IS NULL) ) THEN RETURN NULL; END IF; SELECT vendaddr_id INTO _returnVal FROM vendaddrinfo JOIN vendinfo ON (vend_id=vendaddr_vend_id) WHERE ( (vendaddr_code=pVendAddrCode) AND (vend_number=pVendNumber) ); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Vendor Number % Address % not found.', pVendNumber, pVendAddrCode; END IF; RETURN _returnVal; END; $_$; 0DROP FUNCTION public.getvendaddrid(text, text); publicadminfalse83992S12551682558getvendid(text)FUNCTION,CREATE FUNCTION getvendid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendNumber ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pVendNumber IS NULL) THEN RETURN NULL; END IF; SELECT vend_id INTO _returnVal FROM vendinfo WHERE (vend_number=pVendNumber); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Vendor Number % not found.', pVendNumber; END IF; RETURN _returnVal; END; $_$; &DROP FUNCTION public.getvendid(text); publicadminfalse83992T12551682559getvendtypeid(text)FUNCTIONDCREATE FUNCTION getvendtypeid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendTypeCode ALIAS FOR $1; _returnVal INTEGER; BEGIN IF (pVendTypeCode IS NULL) THEN RETURN NULL; END IF; SELECT vendtype_id INTO _returnVal FROM vendtype WHERE (UPPER(vendtype_code)=UPPER(pVendTypeCode)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Vendor Type % not found.', pVendTypeCode; END IF; RETURN _returnVal; END; $_$; *DROP FUNCTION public.getvendtypeid(text); publicadminfalse83992U12551682560getwarehousid(text, text)FUNCTIONCREATE FUNCTION getwarehousid(pwarehouscode text, ptype text) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _active BOOL; _shipping BOOL; _returnVal INTEGER; BEGIN IF (pWarehousCode IS NULL) THEN RETURN NULL; END IF; IF (UPPER(pType) NOT IN ('ALL','ACTIVE','SHIPPING')) THEN RAISE EXCEPTION 'Warehouse lookip type % not valid. Valid types are ALL, ACTIVE and SHIPPING', pType; END IF; SELECT warehous_id, warehous_active, warehous_shipping INTO _returnVal, _active, _shipping FROM site() WHERE (warehous_code=UPPER(pWarehousCode)); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Warehouse Code % not found.', pWarehousCode; ELSE IF ((pType='SHIPPING') AND (_shipping=false)) THEN RAISE EXCEPTION 'Warehouse Code % is not a vaild shipping warehouse.', pWarehousCode; ELSE IF ((pType IN ('SHIPPING','ACTIVE')) AND (_active=false)) THEN RAISE EXCEPTION 'Warehouse Code % is inactive.', pWarehousCode; END IF; END IF; END IF; RETURN _returnVal; END; $$; DDROP FUNCTION public.getwarehousid(pwarehouscode text, ptype text); publicadminfalse8399212551682561getwhsezoneid(text, text)FUNCTIONCREATE FUNCTION getwhsezoneid(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWhseCode ALIAS FOR $1; pWhseZoneName ALIAS FOR $2; _returnVal INTEGER; BEGIN IF ((pWhseCode IS NULL) OR (pWhseZoneName IS NULL)) THEN RETURN NULL; END IF; SELECT whsezone_id INTO _returnVal FROM whsezone WHERE ( (whsezone_warehous_id=getWarehousId(pWhseCode, 'ACTIVE')) AND (UPPER(whsezone_name)=UPPER(pWhseZoneName)) ); IF (_returnVal IS NULL) THEN RAISE EXCEPTION 'Whsezone % not found.', pWhseZoneName; END IF; RETURN _returnVal; END; $_$; 0DROP FUNCTION public.getwhsezoneid(text, text); publicadminfalse83992X12551682562+grantallmodulecmnttypesource(integer, text)FUNCTIONCREATE FUNCTION grantallmodulecmnttypesource(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmnttypeid ALIAS FOR $1; pModuleName ALIAS FOR $2; _source RECORD; _sourceCounter INTEGER; BEGIN _sourceCounter := 0; FOR _source IN SELECT source_id FROM source WHERE (source_module=pModuleName) LOOP IF (SELECT grantCmnttypeSource(pCmnttypeid, _source.source_id)) THEN _sourceCounter := _sourceCounter + 1; END IF; END LOOP; RETURN _sourceCounter; END; $_$; BDROP FUNCTION public.grantallmodulecmnttypesource(integer, text); publicadminfalse83992z12551682563grantallmodulepriv(text, text)FUNCTIONmCREATE FUNCTION grantallmodulepriv(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pModuleName ALIAS FOR $2; _priv RECORD; _privCounter INTEGER; BEGIN _privCounter := 0; FOR _priv IN SELECT priv_id FROM priv WHERE (priv_module=pModuleName) LOOP IF (SELECT grantPriv(pUsername, _priv.priv_id)) THEN _privCounter := _privCounter + 1; END IF; END LOOP; RETURN _privCounter; END; $_$; 5DROP FUNCTION public.grantallmodulepriv(text, text); publicadminfalse83992*12551682564&grantallmoduleprivgroup(integer, text)FUNCTIONtCREATE FUNCTION grantallmoduleprivgroup(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGrpid ALIAS FOR $1; pModuleName ALIAS FOR $2; _priv RECORD; _privCounter INTEGER; BEGIN _privCounter := 0; FOR _priv IN SELECT priv_id FROM priv WHERE (priv_module=pModuleName) LOOP IF (SELECT grantPrivGroup(pGrpid, _priv.priv_id)) THEN _privCounter := _privCounter + 1; END IF; END LOOP; RETURN _privCounter; END; $_$; =DROP FUNCTION public.grantallmoduleprivgroup(integer, text); publicadminfalse83992Y12551682565%grantcmnttypesource(integer, integer)FUNCTIONCREATE FUNCTION grantcmnttypesource(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmnttypeid ALIAS FOR $1; pSourceid ALIAS FOR $2; _test INTEGER; BEGIN SELECT cmnttypesource_id INTO _test FROM cmnttypesource WHERE ( (cmnttypesource_cmnttype_id=pCmnttypeid) AND (cmnttypesource_source_id=pSourceid) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO cmnttypesource ( cmnttypesource_cmnttype_id, cmnttypesource_source_id ) VALUES ( pCmnttypeid, pSourceid ); RETURN TRUE; END; $_$; <DROP FUNCTION public.grantcmnttypesource(integer, integer); publicadminfalse83992Z12551682566grantgroup(text, integer)FUNCTIONFCREATE FUNCTION grantgroup(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pGrpid ALIAS FOR $2; _test INTEGER; BEGIN SELECT usrgrp_id INTO _test FROM usrgrp WHERE ( (usrgrp_username=pUsername) AND (usrgrp_grp_id=pGrpid) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO usrgrp ( usrgrp_username, usrgrp_grp_id ) VALUES ( pUsername, pGrpid ); RETURN TRUE; END; $_$; 0DROP FUNCTION public.grantgroup(text, integer); publicadminfalse83992[12551682567grantpriv(text, integer)FUNCTIONmCREATE FUNCTION grantpriv(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrivid ALIAS FOR $2; _test INTEGER; BEGIN SELECT usrpriv_id INTO _test FROM usrpriv WHERE ( (usrpriv_username=pUsername) AND (usrpriv_priv_id=pPrivid) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO usrpriv ( usrpriv_username, usrpriv_priv_id ) VALUES ( pUsername, pPrivid ); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; /DROP FUNCTION public.grantpriv(text, integer); publicadminfalse83992\12551682568grantpriv(text, text)FUNCTIONCREATE FUNCTION grantpriv(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrivname ALIAS FOR $2; _test INTEGER; BEGIN SELECT usrpriv_id INTO _test FROM usrpriv JOIN priv ON (usrpriv_priv_id=priv_id) WHERE ((usrpriv_username=pUsername) AND (priv_name=pPrivname) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO usrpriv ( usrpriv_username, usrpriv_priv_id ) SELECT pUsername, priv_id FROM priv WHERE (priv_name=pPrivname); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; ,DROP FUNCTION public.grantpriv(text, text); publicadminfalse83992]12551682569 grantprivgroup(integer, integer)FUNCTIONLCREATE FUNCTION grantprivgroup(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGrpid ALIAS FOR $1; pPrivid ALIAS FOR $2; _test INTEGER; BEGIN SELECT grppriv_id INTO _test FROM grppriv WHERE ( (grppriv_grp_id=pGrpid) AND (grppriv_priv_id=pPrivid) ); IF (FOUND) THEN RETURN FALSE; END IF; INSERT INTO grppriv ( grppriv_grp_id, grppriv_priv_id ) VALUES ( pGrpid, pPrivid ); RETURN TRUE; END; $_$; 7DROP FUNCTION public.grantprivgroup(integer, integer); publicadminfalse83992^12551682570 hasalarms()FUNCTIONCREATE FUNCTION hasalarms() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _alarm RECORD; _batchId INTEGER; _evntlogordtype TEXT; _evnttypeid INTEGER; _evnttypename TEXT; _fromEmail TEXT; _itemid INTEGER; _longsource TEXT; _msgId INTEGER; _recipient TEXT; _recipientPart INTEGER; _returnVal BOOLEAN := FALSE; _summary TEXT; _whsId INTEGER := -1; BEGIN FOR _alarm IN SELECT * FROM alarm WHERE ((alarm_creator=getEffectiveXtUser()) AND (CURRENT_TIMESTAMP > alarm_trigger)) LOOP _returnVal := TRUE; IF (_alarm.alarm_source = 'TODO') THEN SELECT (todoitem_name || '-' || todoitem_description), 'T', 'TodoAlarm', 'To-Do Item' INTO _summary, _evntlogordtype, _evnttypename, _longsource FROM todoitem WHERE (todoitem_id = _alarm.alarm_source_id); ELSIF (_alarm.alarm_source = 'INCDT') THEN SELECT (incdt_number || '-' || incdt_summary), 'I', 'IncidentAlarm', 'Incident' INTO _summary, _evntlogordtype, _evnttypename, _longsource FROM incdt WHERE (incdt_id = _alarm.alarm_source_id); ELSIF (_alarm.alarm_source = 'J') THEN SELECT (prj_number || ' ' || prj_name || '-' || prjtask_name), 'J', 'TaskAlarm', 'Project Task' INTO _summary, _evntlogordtype, _evnttypename, _longsource FROM prjtask JOIN prj ON (prj_id=prjtask_prj_id) WHERE (prjtask_id = _alarm.alarm_source_id); ELSE CONTINUE; -- there's nothing to do for this iteration of the loop END IF; -- if event alarm IF (_alarm.alarm_event) THEN SELECT evnttype_id INTO _evnttypeid FROM evnttype WHERE (evnttype_name=_evnttypename); _recipientPart := 1; LOOP _recipient := SPLIT_PART(_alarm.alarm_event_recipient, ',', _recipientPart); EXIT WHEN (LENGTH(_recipient) = 0); SELECT usrpref_value INTO _whsId FROM usrpref WHERE ( (usrpref_username = _recipient) AND (usrpref_name = 'PreferredWarehouse') ); INSERT INTO evntlog (evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) VALUES (CURRENT_TIMESTAMP, _recipient, _evnttypeid, _evntlogordtype, _alarm.alarm_source_id, _whsId, _summary); _recipientPart := _recipientPart + 1; END LOOP; END IF; IF (_alarm.alarm_email) THEN SELECT usr_email INTO _fromEmail FROM usr WHERE (usr_username = _alarm.alarm_creator); _recipientPart := 1; LOOP _recipient := SPLIT_PART(_alarm.alarm_email_recipient, ',', _recipientPart); EXIT WHEN (LENGTH(_recipient) <= 0); _batchId := xtbatch.submitEmailToBatch(_fromEmail, _recipient, '', _summary, 'Alarm reminder for ' || _longsource || '.', NULL, CURRENT_TIMESTAMP, FALSE, NULL, NULL); _recipientPart := _recipientPart + 1; END LOOP; END IF; IF (_alarm.alarm_sysmsg) THEN _recipientPart := 1; LOOP _recipient := SPLIT_PART(_alarm.alarm_sysmsg_recipient, ',', _recipientPart); EXIT WHEN (LENGTH(_recipient) <= 0); _msgId := postMessage(_recipient, (_longsource || ' - ' || _summary)); _recipientPart := _recipientPart + 1; END LOOP; END IF; DELETE FROM alarm WHERE alarm_id=_alarm.alarm_id; END LOOP; RETURN _returnVal; END; $$; "DROP FUNCTION public.hasalarms(); publicadminfalse39928f12551682571 hasevents()FUNCTIONsCREATE FUNCTION hasevents() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN PERFORM evntlog_id FROM evntlog WHERE ( (evntlog_dispatched IS NULL) AND (evntlog_username=getEffectiveXtUser()) ) LIMIT 1; RETURN FOUND; END; $$; "DROP FUNCTION public.hasevents(); publicadminfalse8399212551682572 hasmessages()FUNCTIONCREATE FUNCTION hasmessages() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN PERFORM msguser_id FROM msg, msguser WHERE ( (msguser_username=getEffectiveXtUser()) AND (msguser_msg_id=msg_id) AND (CURRENT_TIMESTAMP BETWEEN msg_scheduled AND msg_expires) AND (msguser_viewed IS NULL) ) LIMIT 1; RETURN FOUND; END; $$; $DROP FUNCTION public.hasmessages(); publicadminfalse83992_12551682573 haspriv(text)FUNCTIONCREATE FUNCTION haspriv(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrivName ALIAS FOR $1; _result INTEGER; _returnVal BOOLEAN; BEGIN RAISE NOTICE 'hasPriv(TEXT) is deprecated. Use checkPrivilege(TEXT) instead.'; SELECT priv_id INTO _result FROM priv, grppriv, usrgrp WHERE((usrgrp_grp_id=grppriv_grp_id) AND (grppriv_priv_id=priv_id) AND (priv_name=pPrivName) AND (usrgrp_username=getEffectiveXtUser())); IF (FOUND) THEN RETURN true; END IF; SELECT COALESCE(usrpriv_id, 0) != 0 INTO _returnVal FROM priv LEFT OUTER JOIN usrpriv ON (priv_id=usrpriv_priv_id AND usrpriv_username = getEffectiveXtUser()) WHERE (priv_name=pPrivName); IF (_returnVal IS NULL) THEN _returnVal := FALSE; END IF; RETURN _returnVal; END; $_$; $DROP FUNCTION public.haspriv(text); publicadminfalse3992812551682574*hasprivonobject(text, text, integer, text)FUNCTION'CREATE FUNCTION hasprivonobject(pprivtype text, pobjecttype text, pobjectid integer DEFAULT NULL::integer, puser text DEFAULT NULL::text) RETURNS boolean LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _haspriv BOOLEAN := FALSE; _privfound BOOLEAN := FALSE; _pkey TEXT[]; _privdesc RECORD; _qstr TEXT; BEGIN IF UPPER(pPrivType) NOT IN ('CREATE', 'EDIT', 'VIEW', 'DELETE') THEN RAISE EXCEPTION 'Cannot check if user has % on % [xtuple: hasPrivOnObject, -1, %, %]', pPrivType, pObjectType, pPrivType, pObjectType; END IF; /* TODO: create privdesc table? can't do it yet because this is a fix for a minor release NOTE: only include tables that have a single integer column as pkey NOTE: some of these are part of proprietary extensions. how do we make them part of the extension? */ FOR _privdesc IN WITH privdesc AS ( SELECT 'ADDR' AS otype, 'public' AS masterschema, 'addr' AS mastertable, 'MaintainAddressMasters' AS editall, 'ViewAddressMasters' AS viewall, NULL AS ownerfield, NULL AS editmine, NULL AS viewmine UNION ALL SELECT 'BBH', 'xtmfg', 'bbom', 'MaintainBBOMs', 'ViewBBOMs', NULL, NULL, NULL UNION ALL SELECT 'BBI', 'xtmfg', 'bbom', 'MaintainBBOMs', 'ViewBBOMs', NULL, NULL, NULL UNION ALL SELECT 'BMH', 'public', 'bom', 'MaintainBOMs', 'ViewBOMs', NULL, NULL, NULL UNION ALL SELECT 'BMI', 'public', 'bom', 'MaintainBOMs', 'ViewBOMs', NULL, NULL, NULL UNION ALL SELECT 'BOH', 'xtmfg', 'boo', 'MaintainBOOs', 'ViewBOOs', NULL, NULL, NULL UNION ALL SELECT 'BOI', 'xtmfg', 'boo', 'MaintainBOOs', 'ViewBOOs', NULL, NULL, NULL UNION ALL SELECT 'C', 'public', 'custinfo', 'MaintainCustomerMasters', 'ViewCustomerMasters', NULL, NULL, NULL UNION ALL SELECT 'CRMA', 'public', 'crmacct', 'MaintainAllCRMAccounts', 'ViewAllCRMAccounts', 'crmacct_owner_username', 'MaintainPersonalCRMAccounts', 'ViewPersonalCRMAccounts' UNION ALL SELECT 'EMP', 'public', 'emp', 'MaintainEmployees', 'ViewEmployees', NULL, NULL, NULL UNION ALL SELECT 'I', 'public', 'item', 'MaintainItemMasters', 'ViewItemMasters', NULL, NULL, NULL UNION ALL SELECT 'INCDT', 'public', 'incdt', 'MaintainAllIncidents', 'ViewAllIncidents', 'incdt_owner_username', 'MaintainPersonalIncidents', 'ViewPersonalIncidents' UNION ALL SELECT 'IR', 'public', 'itemsrc', 'MaintainItemSources', 'ViewItemSources', NULL, NULL, NULL UNION ALL SELECT 'IS', 'public', 'itemsite', 'MaintainItemSites', 'ViewItemSites', NULL, NULL, NULL UNION ALL SELECT 'J', 'public', 'prj', 'MaintainAllProjects', 'ViewAllProjects', 'prj_owner_username', 'MaintainPersonalProjects', 'ViewPersonalProjects' UNION ALL SELECT 'J', 'public', 'prj', 'MaintainAllProjects', 'ViewAllProjects', 'prj_username', 'MaintainPersonalProjects', 'ViewPersonalProjects' UNION ALL SELECT 'L', 'public', 'location', 'MaintainLocations', 'ViewLocations', NULL, NULL, NULL UNION ALL SELECT 'OPP', 'public', 'ophead', 'MaintainAllOpportunities', 'ViewAllOpportunities', 'ophead_owner_username', 'MaintainPersonalOpportunities', 'ViewPersonalOpportunities' UNION ALL SELECT 'P', 'public', 'pohead', 'MaintainPurchaseOrders', 'ViewPurchaseOrders', NULL, NULL, NULL UNION ALL SELECT 'PI', 'public', 'pohead', 'MaintainPurchaseOrders', 'ViewPurchaseOrders', NULL, NULL, NULL UNION ALL SELECT 'Q', 'public', 'quhead', 'MaintainQuotes', 'ViewQuotes', NULL, NULL, NULL UNION ALL SELECT 'QI', 'public', 'quhead', 'MaintainQuotes', 'ViewQuotes', NULL, NULL, NULL UNION ALL SELECT 'RA', 'public', 'rahead', 'MaintainReturns', 'ViewReturns', NULL, NULL, NULL UNION ALL SELECT 'RI', 'public', 'rahead', 'MaintainReturns', 'ViewReturns', NULL, NULL, NULL UNION ALL SELECT 'S', 'public', 'cohead', 'MaintainSalesOrders', 'ViewSalesOrders', NULL, NULL, NULL UNION ALL SELECT 'SI', 'public', 'cohead', 'MaintainSalesOrders', 'ViewSalesOrders', NULL, NULL, NULL UNION ALL SELECT 'T', 'public', 'cntct', 'MaintainAllContacts', 'ViewAllContacts', 'cntct_owner_username', 'MaintainPersonalContacts', 'ViewPersonalContacts' UNION ALL SELECT 'TE', 'te', 'tehead', 'MaintainTimeExpense', 'ViewTimeExpenseHistory', 'tehead_username', 'MaintainTimeExpenseSelf', NULL UNION ALL SELECT 'TE', 'te', 'tehead', 'MaintainTimeExpenseOthers', 'ViewTimeExpenseHistory', 'tehead_username', 'MaintainTimeExpenseSelf', NULL UNION ALL SELECT 'TI', 'public', 'tohead', 'MaintainTransferOrders', 'ViewTransferOrders', NULL, NULL, NULL UNION ALL SELECT 'TO', 'public', 'tohead', 'MaintainTransferOrders', 'ViewTransferOrders', NULL, NULL, NULL UNION ALL SELECT 'TODO', 'public', 'todoitem', 'MaintainAllToDoItems', 'ViewAllToDoItems', 'todoitem_owner_username', 'MaintainPersonalToDoItems', 'ViewPersonalToDoItems' UNION ALL SELECT 'V', 'public', 'vendinfo', 'MaintainVendors', 'ViewVendors', NULL, NULL, NULL UNION ALL SELECT 'W', 'public', 'wo', 'MaintainWorkOrders', 'ViewWorkOrders', NULL, NULL, NULL UNION ALL SELECT 'WH', 'public', 'whsinfo', 'MaintainWarehouses', 'ViewWarehouses', NULL, NULL, NULL) -- UNION ALL SELECT 'LS', 'public', 'ls', NULL, NULL, NULL, NULL, NULL -- UNION ALL SELECT 'P', 'public', 'pohead', 'MaintainPostedPurchaseOrders', 'ViewPurchaseOrders', NULL, NULL, NULL -- additional criteria? -- UNION ALL SELECT 'PI', 'public', 'pohead', 'MaintainPostedPurchaseOrders', 'ViewPurchaseOrders', NULL, NULL, NULL -- additional criteria? SELECT * FROM privdesc WHERE otype = pObjectType LOOP _privfound := TRUE; RAISE DEBUG '% % % % % % %', _privdesc.otype, _privdesc.masterschema, _privdesc.mastertable, _privdesc.editall, _privdesc.viewall, _privdesc.editmine, _privdesc.viewmine; IF checkPrivilege(CASE UPPER(pPrivType) WHEN 'CREATE' THEN _privdesc.editall WHEN 'EDIT' THEN _privdesc.editall WHEN 'DELETE' THEN _privdesc.editall WHEN 'VIEW' THEN _privdesc.viewall END) THEN _haspriv = TRUE; ELSIF checkPrivilege(CASE UPPER(pPrivType) WHEN 'CREATE' THEN _privdesc.editmine WHEN 'EDIT' THEN _privdesc.editmine WHEN 'DELETE' THEN _privdesc.editmine WHEN 'VIEW' THEN _privdesc.viewmine END) THEN IF pObjectId IS NULL THEN _haspriv = TRUE; ELSE _pkey := primaryKeyFields(_privdesc.masterschema, _privdesc.mastertable); -- SELECT ... FROM schema.table WHERE pkeyfield = pObjectId AND ownerfield = pUser _qstr := 'SELECT EXISTS(SELECT 1 FROM ' || quote_ident(_privdesc.masterschema) || '.' || quote_ident(_privdesc.mastertable) || ' WHERE ' || quote_ident(_pkey[1]) || ' = ' || pObjectId || ' AND ' || quote_ident(_privdesc.ownerfield) || '= ' || quote_literal(COALESCE(pUser, getEffectiveXtUser())) || ');'; RAISE DEBUG '%', _qstr; EXECUTE _qstr INTO _haspriv; END IF; END IF; EXIT WHEN _haspriv; END LOOP; RETURN _haspriv OR NOT _privfound; END; $$; gDROP FUNCTION public.hasprivonobject(pprivtype text, pobjecttype text, pobjectid integer, puser text); publicadminfalse83992!00YFUNCTION hasprivonobject(pprivtype text, pobjecttype text, pobjectid integer, puser text)COMMENToCOMMENT ON FUNCTION hasprivonobject(pprivtype text, pobjecttype text, pobjectid integer, puser text) IS 'Return if a user has permission to view or edit a specific database object. pPrivType is either CREATE, EDIT, DELETE, or VIEW, and controls which privilege is checked. pObjectType is one of the string constants used by the Documents widget, such as ADDR for Addresses. pObjectId is the internal id of the record in the table associated with pObjectType (defaults to NULL). pUser is the username to be checked for those pObjectTypes that restrict access to individual users (NULL == current user and is the default).'; publicadminfalse173612551682576hmac(text, text, text)FUNCTION{CREATE FUNCTION hmac(text, text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_hmac'; -DROP FUNCTION public.hmac(text, text, text); publicadminfalse812551682577hmac(bytea, bytea, text)FUNCTION}CREATE FUNCTION hmac(bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pg_hmac'; /DROP FUNCTION public.hmac(bytea, bytea, text); publicadminfalse8`12551682578implodewo(integer, boolean)FUNCTIONbCREATE FUNCTION implodewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; implodeChildren ALIAS FOR $2; resultCode INTEGER; _wotcCnt INTEGER; _routings BOOLEAN; BEGIN SELECT metric_value='t' INTO _routings FROM metric WHERE (metric_name='Routings'); IF ((SELECT wo_id FROM wo WHERE ((wo_status='E') AND (wo_id=pWoid))) IS NULL) THEN RETURN 0; END IF; IF (_routings) THEN SELECT count(*) INTO _wotcCnt FROM xtmfg.wotc WHERE (wotc_wo_id=pWoid); IF (_wotcCnt > 0) THEN RETURN -1; END IF; END IF; -- Delete any created P/R's for this W/O PERFORM deletePr('W', womatl_id) FROM womatl WHERE (womatl_wo_id=pWoid); DELETE FROM womatl WHERE (womatl_id IN ( SELECT womatl_id FROM womatl, wo WHERE ((womatl_wo_id=wo_id) AND (wo_status='E') AND (wo_id=pWoid)) )); IF _routings THEN DELETE FROM xtmfg.wooper WHERE (wooper_id IN ( SELECT wooper_id FROM xtmfg.wooper, wo WHERE ((wooper_wo_id=wo_id) AND (wo_status='E') AND (wo_id=pWoid)) )); END IF; UPDATE wo SET wo_status='O' WHERE (wo_id=pWoid); IF (implodeChildren) THEN resultCode := (SELECT MAX(implodeWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); resultCode := (SELECT MAX(deleteWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); END IF; RETURN 0; END; $_$; 2DROP FUNCTION public.implodewo(integer, boolean); publicadminfalse8399212591682579incdtTABLE CREATE TABLE incdt ( incdt_id integer NOT NULL, incdt_number integer NOT NULL, incdt_crmacct_id integer, incdt_cntct_id integer, incdt_summary text, incdt_descrip text, incdt_item_id integer, incdt_timestamp timestamp without time zone DEFAULT now() NOT NULL, incdt_status character(1) DEFAULT 'N'::bpchar NOT NULL, incdt_assigned_username text, incdt_incdtcat_id integer, incdt_incdtseverity_id integer, incdt_incdtpriority_id integer, incdt_incdtresolution_id integer, incdt_lotserial text, incdt_ls_id integer, incdt_aropen_id integer, incdt_owner_username text, incdt_recurring_incdt_id integer, incdt_updated timestamp without time zone DEFAULT now() NOT NULL, incdt_prj_id integer, incdt_public boolean ); DROP TABLE public.incdt; publicadminfalse5767576857698!00 TABLE incdtCOMMENT,COMMENT ON TABLE incdt IS 'Incident table'; publicadminfalse154!00COLUMN incdt.incdt_lotserialCOMMENTLCOMMENT ON COLUMN incdt.incdt_lotserial IS 'incdt_lotserial is deprecated'; publicadminfalse154!00%COLUMN incdt.incdt_recurring_incdt_idCOMMENTCOMMENT ON COLUMN incdt.incdt_recurring_incdt_id IS 'The first incdt record in the series if this is a recurring Incident. If the incdt_recurring_incdt_id is the same as the incdt_id, this record is the first in the series.'; publicadminfalse154!00incdtACLREVOKE ALL ON TABLE incdt FROM PUBLIC; REVOKE ALL ON TABLE incdt FROM admin; GRANT ALL ON TABLE incdt TO admin; GRANT ALL ON TABLE incdt TO xtrole; publicadminfalse15412551682588incdt()FUNCTION&CREATE FUNCTION incdt() RETURNS SETOF incdt LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row incdt%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllIncidents','ViewAllIncidents','MaintainPersonalIncidents','ViewPersonalIncidents') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM incdt LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM incdt WHERE getEffectiveXtUser() IN (incdt_owner_username, incdt_assigned_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; DROP FUNCTION public.incdt(); publicadminfalse839922630!00FUNCTION incdt()COMMENTrCOMMENT ON FUNCTION incdt() IS 'A table function that returns Incident results according to privilege settings.'; publicadminfalse1665a12551682589indentedbom(integer)FUNCTIONvCREATE FUNCTION indentedbom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _revid INTEGER; BEGIN SELECT getActiveRevId('BOM',pItemid) INTO _revid; RETURN indentedBOM(pItemid, _revid); END; $_$; +DROP FUNCTION public.indentedbom(integer); publicadminfalse83992b12551682590indentedbom(integer, integer)FUNCTION^ CREATE FUNCTION indentedbom(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; _bomworkid INTEGER; _indexid INTEGER; _r RECORD; _batchsize NUMERIC; BEGIN -- Get the batch quantity SELECT COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=pRevisionid)) LIMIT 1),1) INTO _batchsize; -- Check on the temporary workspace -- PERFORM maintainBOMWorkspace(); -- Grab a new index for this bomwork set SELECT NEXTVAL('misc_index_seq') INTO _indexid; -- Step through all of the components of the passed pItemid FOR _r IN SELECT bomitem.*, item_id, itemuomtouom(item_id, item_inv_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') AS qtyreq, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, stdcost(item_id, bomitem_id) AS standardcost, actcost(item_id, bomitem_id) AS actualcost FROM bomitem(pItemId, pRevisionid), item WHERE ( (bomitem_item_id=item_id) ) LOOP -- Insert the component and bomitem parameters SELECT NEXTVAL('bomwork_bomwork_id_seq') INTO _bomworkid; INSERT INTO bomwork ( bomwork_id, bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_parent_seqnumber, bomwork_seqnumber, bomwork_item_id, bomwork_createwo, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_stdunitcost, bomwork_actunitcost, bomwork_char_id, bomwork_value, bomwork_notes, bomwork_ref, bomwork_bomitem_id, bomwork_ecn ) VALUES ( _bomworkid, _indexid, -1, 1, 0, _r.bomitem_seqnumber, _r.item_id, _r.bomitem_createwo, _r.qtyreq, _r.qtyfxd, _r.qtyper, _r.bomitem_scrap, _r.bomitem_issuemethod, _r.bomitem_effective, _r.bomitem_expires, _r.standardcost, _r.actualcost, _r.bomitem_char_id, _r.bomitem_value, _r.bomitem_notes, _r.bomitem_ref, _r.bomitem_id, _r.bomitem_ecn ); -- Explode the components of the current component PERFORM explodeBOM(_r.item_id, _bomworkid, 1); END LOOP; -- Return a key to the result RETURN _indexid; END; $_$; 4DROP FUNCTION public.indentedbom(integer, integer); publicadminfalse83992c12552005541/indentedbom(integer, integer, integer, integer)FUNCTION$CREATE FUNCTION indentedbom(integer, integer, integer, integer) RETURNS SETOF bomdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; pExpiredDays ALIAS FOR $3; pFutureDays ALIAS FOR $4; _row bomdata%ROWTYPE; _bomworksetid INTEGER; _x RECORD; _check CHAR(1); _inactive BOOLEAN := FALSE; _batchsize NUMERIC; BEGIN IF (pRevisionid != -1) THEN --Is this a deactivated revision? SELECT rev_status INTO _check FROM rev WHERE ((rev_id=pRevisionid) AND (rev_status='I')); IF (FOUND) THEN _inactive := TRUE; END IF; END IF; -- Get the batch quantity SELECT COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=pRevisionid)) LIMIT 1),1) INTO _batchsize; IF NOT (_inactive) THEN --We can explode this out based on current data SELECT indentedBOM(pItemid, pRevisionid) INTO _bomworksetid; FOR _x IN SELECT bomwork_id, bomwork_parent_id, bomwork_level, bomworkSequence(bomwork_id) AS seq_ord, bomwork_seqnumber, item_id, item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_createwo, CASE WHEN (bomwork_issuemethod='S') THEN 'Push' WHEN (bomwork_issuemethod='L') THEN 'Pull' WHEN (bomwork_issuemethod='M') THEN 'Mixed' ELSE 'Special' END AS issuemethod, bomwork_effective, bomwork_expires, (bomwork_expires <= CURRENT_DATE) AS expired, (bomwork_effective > CURRENT_DATE) AS future, bomwork_actunitcost AS actunitcost, bomwork_stdunitcost AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(item_id, item_inv_uom_id, NULL, (bomwork_qtyfxd/_batchsize + bomwork_qtyper) * (1 + bomwork_scrap), 'qtyper') * bomwork_actunitcost ELSE 0.0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(item_id, item_inv_uom_id, NULL, (bomwork_qtyfxd/_batchsize + bomwork_qtyper) * (1 + bomwork_scrap), 'qtyper') * bomwork_stdunitcost ELSE 0.0 END AS stdextendedcost, bomwork_char_id, bomwork_value, bomwork_notes, bomwork_ref, bomwork_bomitem_id, bomwork_ecn FROM bomwork, item, uom WHERE ( (bomwork_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (bomwork_set_id=_bomworksetid) ) AND (bomwork_expires > (CURRENT_DATE - pExpiredDays)) AND (bomwork_effective <= (CURRENT_DATE + pFutureDays)) UNION SELECT -1, -1, 1, '0', NULL,-1, costelem_type AS bomdata_item_number, '', '', '', '', NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, false, false, currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actunitcost, itemcost_stdcost AS stdunitcost, currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actextendedcost, itemcost_stdcost AS stdextendedcost, NULL, NULL,NULL,NULL, NULL,NULL FROM itemcost, costelem WHERE ( (itemcost_costelem_id=costelem_id) AND (NOT itemcost_lowlevel) AND (itemcost_item_id=pItemid) ) ORDER BY seq_ord LOOP _row.bomdata_bomwork_id := _x.bomwork_id; _row.bomdata_bomwork_parent_id := _x.bomwork_parent_id; _row.bomdata_bomwork_level := _x.bomwork_level; _row.bomdata_bomwork_seqnumber := _x.bomwork_seqnumber; _row.bomdata_bomitem_id := _x.bomwork_bomitem_id; _row.bomdata_item_id := _x.item_id; _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_batchsize := _batchsize; _row.bomdata_qtyreq := _x.bomwork_qtyreq; _row.bomdata_qtyfxd := _x.bomwork_qtyfxd; _row.bomdata_qtyper := _x.bomwork_qtyper; _row.bomdata_scrap := _x.bomwork_scrap; _row.bomdata_createchild := _x.bomwork_createwo; _row.bomdata_issuemethod := _x.issuemethod; _row.bomdata_effective := _x.bomwork_effective; _row.bomdata_expires := _x.bomwork_expires; _row.bomdata_expired := _x.expired; _row.bomdata_future := _x.future; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_ecn := _x.bomwork_ecn; _row.bomdata_char_id := _x.bomwork_char_id; _row.bomdata_value := _x.bomwork_value; _row.bomdata_notes := _x.bomwork_notes; _row.bomdata_ref := _x.bomwork_ref; RETURN NEXT _row; END LOOP; PERFORM deleteBOMWorkset(_bomworksetid); ELSE -- Use historical snapshot for inactive revisions FOR _x IN SELECT bomhist_id, bomhist_parent_id, bomhist_level, bomhistSequence(bomhist_seq_id) AS seq_ord, bomhist_seqnumber, item_id, item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, bomhist_qtyreq, bomhist_qtyfxd, bomhist_qtyper, bomhist_scrap, bomhist_createwo, CASE WHEN (bomhist_issuemethod='S') THEN 'Push' WHEN (bomhist_issuemethod='L') THEN 'Pull' WHEN (bomhist_issuemethod='M') THEN 'Mixed' ELSE 'Special' END AS issuemethod, bomhist_effective, bomhist_expires, (bomhist_expires <= CURRENT_DATE) AS expired, (bomhist_effective > CURRENT_DATE) AS future, bomhist_actunitcost AS actunitcost, bomhist_stdunitcost AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN (bomist_qtyfxd/_batchsize + bomhist_qtyper) * (1 + bomhist_scrap) * bomhist_actunitcost ELSE 0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN (bomist_qtyfxd/_batchsize + bomhist_qtyper) * (1 + bomhist_scrap) * bomhist_stdunitcost ELSE 0 END AS stdextendedcost, bomhist_char_id, bomhist_value, bomhist_notes, bomhist_ref FROM bomhist, item, uom WHERE ( (bomhist_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (bomhist_rev_id=pRevisionid) ) AND (bomhist_expires > (CURRENT_DATE - pExpiredDays)) AND (bomhist_effective <= (CURRENT_DATE + pFutureDays)) UNION SELECT -1, -1, 1, '0', NULL,-1, costelem_type AS bomdata_item_number, '', '', '', '', NULL, NULL, NULL, NULL, false, '', NULL, NULL, false, false, bomhist_actunitcost AS actunitcost, bomhist_stdunitcost AS stdunitcost, bomhist_actunitcost AS actextendedcost, bomhist_stdunitcost AS stdextendedcost, NULL,NULL,NULL,NULL FROM bomhist, costelem WHERE ((bomhist_rev_id=pRevisionid) AND (costelem_id=bomhist_item_id)) ORDER BY seq_ord LOOP _row.bomdata_bomwork_id := _x.bomhist_id; _row.bomdata_bomwork_parent_id := _x.bomhist_parent_id; _row.bomdata_bomwork_level := _x.bomhist_level; _row.bomdata_bomwork_seqnumber := _x.bomhist_seqnumber; _row.bomdata_bomitem_id := -1; _row.bomdata_item_id := _x.item_id; _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_batchsize := _batchsize; _row.bomdata_qtyreq := _x.bomhist_qtyreq; _row.bomdata_qtyfxd := _x.bomist_qtyfxd; _row.bomdata_qtyper := _x.bomhist_qtyper; _row.bomdata_scrap := _x.bomhist_scrap; _row.bomdata_createchild := _x.bomhist_createwo; _row.bomdata_issuemethod := _x.issuemethod; _row.bomdata_effective := _x.bomhist_effective; _row.bomdata_expires := _x.bomhist_expires; _row.bomdata_expired := _x.expired; _row.bomdata_future := _x.future; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_ecn := ''; _row.bomdata_char_id := _x.bomhist_char_id; _row.bomdata_value := _x.bomhist_value; _row.bomdata_notes := _x.bomhist_notes; _row.bomdata_ref := _x.bomhist_ref; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; FDROP FUNCTION public.indentedbom(integer, integer, integer, integer); publicadminfalse399282577d12551682593indentedwhereused(integer)FUNCTIONM CREATE FUNCTION indentedwhereused(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _indexid INTEGER; _level INTEGER; BEGIN -- Check on the temporary workspace -- PERFORM maintainBOMWorkspace(); _indexid := (SELECT NEXTVAL('misc_index_seq')); _level := 1; INSERT INTO bomwork ( bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_seqnumber, bomwork_item_id, bomwork_item_type, bomwork_createwo, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_status, bomwork_stdunitcost, bomwork_actunitcost ) SELECT _indexid, -1, 1, bomitem_seqnumber, item_id, item_type, bomitem_createwo, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd), (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper), bomitem_scrap, bomitem_issuemethod, bomitem_effective, bomitem_expires, 'U', stdcost(item_id), actcost(item_id) FROM bomitem, item WHERE ((bomitem_item_id=pItemid) AND (bomitem_parent_item_id=item_id) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id))); WHILE ( ( SELECT count(*) FROM bomwork WHERE ((bomwork_item_type IN ('M', 'F')) AND (bomwork_status='U') AND (bomwork_set_id=_indexid)) ) > 0) LOOP _level := _level + 1; INSERT INTO bomwork ( bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_seqnumber, bomwork_item_id, bomwork_item_type, bomwork_createwo, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_status, bomwork_stdunitcost, bomwork_actunitcost ) SELECT _indexid, bomwork_id, _level, bomitem_seqnumber, item_id, item_type, bomitem_createwo, (bomwork_qtyper * (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd)), (bomwork_qtyper * (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper)), bomitem_scrap, bomitem_issuemethod, CASE WHEN bomitem_effective < bomwork_effective THEN bomwork_effective ELSE bomitem_effective END, CASE WHEN bomitem_expires > bomwork_expires THEN bomwork_expires ELSE bomitem_expires END, 'N', stdcost(item_id), actcost(item_id) FROM bomwork JOIN bomitem ON ( (bomitem_item_id=bomwork_item_id) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) ) JOIN item ON (item_id=bomitem_parent_item_id) WHERE ((bomwork_status='U') AND (bomwork_item_type IN ('M', 'F'))); UPDATE bomwork SET bomwork_status='C' WHERE ((bomwork_status='U') AND (bomwork_set_id=_indexid)); UPDATE bomwork SET bomwork_status='U' WHERE ((bomwork_status='N') AND (bomwork_set_id=_indexid)); END LOOP; RETURN _indexid; END; $_$; 1DROP FUNCTION public.indentedwhereused(integer); publicadminfalse83992g12552005543.indentedwo(integer, boolean, boolean, boolean)FUNCTIONCREATE FUNCTION indentedwo(integer, boolean, boolean, boolean) RETURNS SETOF wodata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; pshowops ALIAS FOR $2; pshowmatl ALIAS FOR $3; pshowindent ALIAS FOR $4; _row wodata%ROWTYPE; _subrow wodata%ROWTYPE; _opx wodata%ROWTYPE; _x RECORD; _level INTEGER; BEGIN --The wodata_id_type column is used to indicate the source of the wodata_id --there are three different tables used wo, womatl and womatlvar --wodata_id_type = 1 = wo_id --wodata_id_type = 2 = womatl_id --wodata_id_type = 3 = wooper_id --initialise values _level := 0; --get top level works orders FOR _x IN SELECT wo_id,wo_number,wo_subnumber,wo_status,wo_startdate, wo_duedate,wo_adhoc,wo_itemsite_id,itemsite_qtyonhand, wo_qtyord,wo_qtyrcv,wo_prodnotes, item_number, item_descrip1, item_descrip2, uom_name FROM wo, itemsite, item, uom WHERE ((wo_id = pwoid) AND (itemsite_id = wo_itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id)) ORDER BY wo_number, wo_subnumber LOOP _row.wodata_id := _x.wo_id; _row.wodata_id_type := 1; _row.wodata_number := _x.wo_number; _row.wodata_subnumber := _x.wo_subnumber; _row.wodata_itemnumber := _x.item_number; _row.wodata_descrip := _x.item_descrip1 || '-' || _x.item_descrip2; _row.wodata_status := _x.wo_status; _row.wodata_startdate := _x.wo_startdate; _row.wodata_duedate := _x.wo_duedate; _row.wodata_adhoc := _x.wo_adhoc; _row.wodata_itemsite_id := _x.wo_itemsite_id; _row.wodata_qoh := _x.itemsite_qtyonhand; _row.wodata_short := noneg(_x.wo_qtyord - _x.wo_qtyrcv); _row.wodata_qtyrcv := _x.wo_qtyrcv; _row.wodata_qtyordreq := _x.wo_qtyord; _row.wodata_qtyuom := _x.uom_name; _row.wodata_scrap := 0; _row.wodata_notes := _x.wo_prodnotes; _row.wodata_level := _level; RETURN NEXT _row; IF (pshowmatl AND NOT pshowops) THEN --expand materials FOR _subrow IN SELECT * FROM indentedwomatl(pwoid, _level) LOOP RETURN NEXT _subrow; END LOOP; END IF; IF ((pshowmatl OR pshowindent) AND NOT pshowops) THEN --expand next level down FOR _subrow IN SELECT * FROM indentedwo(_x.wo_id, NULL, _level + 1, pshowmatl, pshowindent) LOOP RETURN NEXT _subrow; END LOOP; END IF; IF (pshowops) THEN --expand materials not on operations IF (pshowmatl) THEN FOR _subrow IN SELECT * FROM indentedwomatl(pwoid, -1, _level) LOOP RETURN NEXT _subrow; END LOOP; END IF; IF (pshowmatl OR pshowindent) THEN --expand next level down FOR _subrow IN SELECT * FROM indentedwo(_x.wo_id, -1, _level + 1, pshowmatl, pshowindent) LOOP RETURN NEXT _subrow; END LOOP; END IF; --expand opeartions FOR _opx IN SELECT * FROM xtmfg.indentedwoops(pwoid,_level) LOOP RETURN NEXT _opx; IF (pshowmatl) THEN --expand materials on operations FOR _subrow IN SELECT * FROM indentedwomatl(pwoid, _opx.wodata_id, _level + 1) LOOP RETURN NEXT _subrow; END LOOP; END IF; IF (pshowmatl OR pshowindent) THEN --expand next level down FOR _subrow IN SELECT * FROM indentedwo(_x.wo_id, _opx.wodata_id, _level + 2, pshowmatl, pshowindent) LOOP RETURN NEXT _subrow; END LOOP; END IF; END LOOP; END IF; END LOOP; RETURN; END; $_$; EDROP FUNCTION public.indentedwo(integer, boolean, boolean, boolean); publicadminfalse839922611h125520055447indentedwo(integer, integer, integer, boolean, boolean)FUNCTIONCREATE FUNCTION indentedwo(integer, integer, integer, boolean, boolean) RETURNS SETOF wodata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; pwooperid ALIAS FOR $2; plevel ALIAS FOR $3; pshowmatl ALIAS FOR $4; pshowindent ALIAS FOR $5; _row wodata%ROWTYPE; _opx wodata%ROWTYPE; _x RECORD; _subx RECORD; _index INTEGER; _level INTEGER; _qry TEXT; BEGIN --The wodata id column is used to indicate the source of the id --there are three different tables used wo, womatl and womatlvar --wodata_id_type = 1 = wo_id --wodata_id_type = 2 = womatl_id --wodata_id_type = 3 = wooper_id _level := (plevel + 1); --find all WO with the ordid of the next level up _qry := 'SELECT wo_id,wo_number,wo_subnumber,wo_status,wo_startdate,wo_duedate, wo_adhoc,wo_itemsite_id,itemsite_qtyonhand,wo_qtyord,wo_qtyrcv, wo_prodnotes, item_number,item_descrip1, item_descrip2, uom_name, womatl_qtyiss, womatl_scrap, womatl_wooper_id FROM itemsite, wo, item, uom, womatl WHERE ((wo_ordid = ' || pwoid || ') AND (wo_ordtype = ''W'') AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (wo_womatl_id=womatl_id) AND (wo_itemsite_id = itemsite_id) '; IF (pwooperid IS NOT NULL) THEN _qry := _qry || ' AND (womatl_wooper_id=' || pwooperid || ') '; END IF; _qry := _qry || ') ORDER BY wo_number, wo_subnumber'; /* if (pwooperid IS NOT NULL) THEN raise exception 'stop %',_qry; END IF;*/ FOR _x IN EXECUTE _qry LOOP _row.wodata_id := _x.wo_id; _row.wodata_id_type := 1; _row.wodata_number := _x.wo_number; _row.wodata_subnumber := _x.wo_subnumber; _row.wodata_itemnumber := _x.item_number; _row.wodata_descrip := _x.item_descrip1 || '-' || _x.item_descrip2; _row.wodata_status := _x.wo_status; _row.wodata_startdate := _x.wo_startdate; _row.wodata_duedate := _x.wo_duedate; _row.wodata_adhoc := _x.wo_adhoc; _row.wodata_itemsite_id := _x.wo_itemsite_id; _row.wodata_qoh := _x.itemsite_qtyonhand; _row.wodata_short := noneg(_x.wo_qtyord - _x.wo_qtyrcv); _row.wodata_qtyiss := _x.womatl_qtyiss; _row.wodata_qtyrcv := _x.wo_qtyrcv; _row.wodata_qtyordreq := _x.wo_qtyord; _row.wodata_scrap := _x.womatl_scrap; _row.wodata_notes := _x.wo_prodnotes; _row.wodata_level := plevel; RETURN NEXT _row; --if indentation require expand next level IF (pshowindent AND pwooperid IS NULL) THEN IF (pshowmatl AND pshowindent) THEN --get materials for this level FOR _subx IN SELECT * FROM indentedwomatl(_x.wo_id, plevel) LOOP RETURN NEXT _subx; END LOOP; END IF; IF (pshowindent) THEN --expand lower levels FOR _subx IN SELECT * FROM indentedwo(_x.wo_id, NULL, _level, pshowmatl, pshowindent ) LOOP RETURN NEXT _subx; END LOOP; END IF; ELSIF (pshowindent) THEN --Handle operations --expand materials not on operations IF (pshowmatl) THEN FOR _subx IN SELECT * FROM indentedwomatl(_x.wo_id, -1, plevel) LOOP RETURN NEXT _subx; END LOOP; END IF; --expand next level down not on operations FOR _subx IN SELECT * FROM indentedwo(_x.wo_id, -1, _level, pshowmatl, pshowindent) LOOP RETURN NEXT _subx; END LOOP; --expand operations FOR _opx IN SELECT * FROM xtmfg.indentedwoops(_x.wo_id,plevel) LOOP RETURN NEXT _opx; IF (pshowmatl) THEN --expand materials on operations FOR _subx IN SELECT * FROM indentedwomatl(_x.wo_id, _opx.wodata_id, _level) LOOP RETURN NEXT _subx; -- raise exception 'stop %',_opx.wodata_id; END LOOP; END IF; --expand next level down FOR _subx IN SELECT * FROM indentedwo(_x.wo_id, _opx.wodata_id, _level + 2, pshowmatl, pshowindent) LOOP RETURN NEXT _subx; END LOOP; END LOOP; END IF; END LOOP; RETURN; END; $_$; NDROP FUNCTION public.indentedwo(integer, integer, integer, boolean, boolean); publicadminfalse839922611i12552005545 indentedwomatl(integer, integer)FUNCTIONCREATE FUNCTION indentedwomatl(integer, integer) RETURNS SETOF wodata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; plevel ALIAS FOR $2; _subx RECORD; BEGIN FOR _subx IN SELECT * FROM indentedwomatl(pwoid, NULL::integer, plevel) LOOP RETURN NEXT _subx; END LOOP; RETURN; END; $_$; 7DROP FUNCTION public.indentedwomatl(integer, integer); publicadminfalse839922611j12552005546)indentedwomatl(integer, integer, integer)FUNCTIONt CREATE FUNCTION indentedwomatl(integer, integer, integer) RETURNS SETOF wodata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; pwooperid ALIAS FOR $2; plevel ALIAS FOR $3; _status TEXT; _subrow wodata%ROWTYPE; _subx RECORD; _level INTEGER; _qry TEXT; BEGIN --The wodata id column is used to indicate the source of the id --there are three different tables used wo, womatl and womatlvar --wodata_id_type = 1 = wo_id --wodata_id_type = 2 = womatl_id --wodata_id_type = 3 = wooper_id _qry := 'SELECT womatl_id, wo_number, wo_subnumber, wo_startdate, womatl_duedate, womatl_itemsite_id, itemsite_qtyonhand, womatl_qtyreq, womatl_qtyiss, womatl_qtyper, womatl_qtyreq, womatl_scrap, womatl_ref, womatl_notes, item_number, item_descrip1, item_descrip2, uom_name FROM womatl, wo, itemsite, item, uom WHERE ((wo_id = womatl_wo_id) AND (wo_id = ' || pwoid || ') AND (womatl_itemsite_id = itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_uom_id=uom_id) '; -- Need to display in case child w/o is deleted -- AND (NOT womatl_createwo OR womatl_createwo IS NULL) '; IF (pwooperid IS NOT NULL) THEN _qry := _qry || 'AND (womatl_wooper_id=' || pwooperid || ')'; END IF; _qry := _qry || ') ORDER BY item_number;'; _level := plevel + 1; SELECT wo_status FROM wo WHERE wo_id = pwoid LIMIT 1 INTO _status; FOR _subx IN EXECUTE _qry LOOP _subrow.wodata_id := _subx.womatl_id; _subrow.wodata_id_type := 2; _subrow.wodata_number := _subx.wo_number; _subrow.wodata_subnumber := _subx.wo_subnumber; _subrow.wodata_itemnumber := _subx.item_number; _subrow.wodata_descrip := _subx.item_descrip1 || '-' || _subx.item_descrip2; _subrow.wodata_status := _status; _subrow.wodata_startdate := _subx.wo_startdate; _subrow.wodata_duedate := _subx.womatl_duedate; _subrow.wodata_itemsite_id := _subx.womatl_itemsite_id; _subrow.wodata_qoh := _subx.itemsite_qtyonhand; IF((_subx.itemsite_qtyonhand > (_subx.womatl_qtyreq - _subx.womatl_qtyiss))) THEN _subrow.wodata_short := 0; ELSE _subrow.wodata_short := (_subx.womatl_qtyreq - _subx.womatl_qtyiss) - _subx.itemsite_qtyonhand; END IF; _subrow.wodata_qtyper := _subx.womatl_qtyper; _subrow.wodata_qtyiss := _subx.womatl_qtyiss; _subrow.wodata_qtyordreq := _subx.womatl_qtyreq; _subrow.wodata_qtyuom := _subx.uom_name; _subrow.wodata_scrap := _subx.womatl_scrap; _subrow.wodata_notes := _subx.womatl_notes; _subrow.wodata_ref := _subx.womatl_ref; _subrow.wodata_level := _level; RETURN NEXT _subrow; END LOOP; RETURN; END; $_$; @DROP FUNCTION public.indentedwomatl(integer, integer, integer); publicadminfalse83992261112551682598initeffectivextuser()FUNCTIONCREATE FUNCTION initeffectivextuser() RETURNS void LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Effective users use a temporary table to store the user information -- and this function, called by the other functions, makes sure the temp -- tables exist first. PERFORM * FROM pg_catalog.pg_class WHERE relname = 'effective_user' AND relnamespace = pg_catalog.pg_my_temp_schema(); IF NOT FOUND THEN CREATE TEMPORARY TABLE effective_user ( effective_key TEXT, effective_value TEXT ); CREATE UNIQUE INDEX effective_user_pkey ON effective_user (effective_key); END IF; END; $$; ,DROP FUNCTION public.initeffectivextuser(); publicadminfalse83992m12551682599%initialdistribution(integer, integer)FUNCTIONCREATE FUNCTION initialdistribution(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLocationid ALIAS FOR $2; _itemlocid INTEGER; _invhistid INTEGER; _itemlocSeries INTEGER; _r RECORD; BEGIN -- Make sure the passed itemsite points to a real item IF ( (SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; _itemlocSeries := NEXTVAL('itemloc_series_seq'); -- Reassign the location_id for all existing itemlocs if -- the passed itemsite is already lot/serial controlled IF ( ( SELECT (itemsite_controlmethod IN ('L', 'S')) FROM itemsite WHERE (itemsite_id=pItemsiteid) ) ) THEN FOR _r IN SELECT itemloc_id, itemloc_ls_id, itemloc_qty FROM itemloc WHERE (itemloc_itemsite_id=pItemsiteid) LOOP -- Create the RL transaction SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_series, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after ) SELECT _invhistid, itemsite_id, _itemlocSeries, 'RL', 0, _r.itemloc_qty, _r.itemloc_qty, 'Initial Distribution', uom_name, stdCost(item_id), TRUE, itemsite_costmethod, itemsite_value, itemsite_value FROM item, itemsite, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=pItemsiteid) ); -- Update the itemloc UPDATE itemloc SET itemloc_location_id=pLocationid WHERE (itemloc_id=_r.itemloc_id); -- Record the detail transaction INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after ) VALUES ( _invhistid, pLocationid, _r.itemloc_ls_id, _r.itemloc_qty, 0, _r.itemloc_qty ); -- Adjust QOH if this itemlocdist is to/from a non-netable location IF ( SELECT (NOT location_netable) FROM location WHERE (location_id=pLocationid) ) THEN INSERT INTO invhist ( invhist_itemsite_id, invhist_series, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after ) SELECT itemsite_id, _itemlocSeries, 'NN', (_r.itemloc_qty * -1), _r.itemloc_qty, 0, 'Initial Distribution', uom_name, stdCost(item_id), itemsite_costmethod, itemsite_value, itemsite_value FROM itemsite, item, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=pItemsiteid) ); UPDATE itemsite SET itemsite_nnqoh = (itemsite_nnqoh + _r.itemloc_qty), itemsite_qtyonhand = (itemsite_qtyonhand - _r.itemloc_qty) WHERE (itemsite_id=pItemsiteid); END IF; END LOOP; ELSE -- The passed itemsite is not lot/serial controlled -- Make sure that there are not any stagnent itemlocs DELETE FROM itemloc WHERE (itemloc_itemsite_id=pItemsiteid); -- Create the RL transaction SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_series, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after ) SELECT _invhistid, itemsite_id, _itemlocSeries, 'RL', 0, itemsite_qtyonhand, itemsite_qtyonhand, 'Initial Distribution', uom_name, stdCost(item_id), TRUE, itemsite_costmethod, itemsite_value, itemsite_value FROM item, itemsite, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=pItemsiteid) ); -- Create the itemloc SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _itemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_expiration, itemloc_qty ) SELECT _itemlocid, itemsite_id, pLocationid, endOfTime(), itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=pItemsiteid); -- Record the detail transaction INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after ) SELECT _invhistid, pLocationid, itemsite_qtyonhand, 0, itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=pItemsiteid); -- Adjust QOH if this itemlocdist is to/from a non-netable location IF ( SELECT (NOT location_netable) FROM location WHERE (location_id=pLocationid) ) THEN INSERT INTO invhist ( invhist_itemsite_id, invhist_series, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after ) SELECT itemsite_id, _itemlocSeries, 'NN', (itemloc_qty * -1), itemloc_qty, 0, 'Initial Distribution', uom_name, stdCost(item_id), itemsite_costmethod, itemsite_value, itemsite_value FROM itemloc, itemsite, item, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemloc_itemsite_id=itemsite_id) AND (itemloc_id=_itemlocid) ); UPDATE itemsite SET itemsite_nnqoh = itemsite_qtyonhand, itemsite_qtyonhand = 0 FROM itemloc WHERE ( (itemloc_itemsite_id=itemsite_id) AND (itemloc_id=_itemlocid) ); END IF; END IF; RETURN _itemlocid; END; $_$; <DROP FUNCTION public.initialdistribution(integer, integer); publicadminfalse8399212591682600apopenTABLECREATE TABLE apopen ( apopen_id integer DEFAULT nextval(('"apopen_apopen_id_seq"'::text)::regclass) NOT NULL, apopen_docdate date, apopen_duedate date, apopen_terms_id integer, apopen_vend_id integer, apopen_doctype character(1), apopen_docnumber text, apopen_amount numeric(20,2), apopen_notes text, apopen_posted boolean, apopen_reference text, apopen_invcnumber text, apopen_ponumber text, apopen_journalnumber integer, apopen_paid numeric(20,2) DEFAULT 0, apopen_open boolean, apopen_username text, apopen_discount boolean DEFAULT false NOT NULL, apopen_accnt_id integer DEFAULT (-1), apopen_curr_id integer DEFAULT basecurrid(), apopen_closedate date, apopen_distdate date, apopen_void boolean DEFAULT false NOT NULL, apopen_curr_rate numeric NOT NULL, apopen_discountable_amount numeric(20,2) DEFAULT 0, apopen_status text, CONSTRAINT apopen_apopen_status_check CHECK ((((apopen_status = 'O'::text) OR (apopen_status = 'H'::text)) OR (apopen_status = 'C'::text))), CONSTRAINT apopen_apopen_status_notnull CHECK ((apopen_status IS NOT NULL)) ); DROP TABLE public.apopen; publicadminfalse5771577257735774577557765777577857798!00 TABLE apopenCOMMENTLCOMMENT ON TABLE apopen IS 'Accounts Payable (A/P) open Items information'; publicadminfalse155!00apopenACLREVOKE ALL ON TABLE apopen FROM PUBLIC; REVOKE ALL ON TABLE apopen FROM admin; GRANT ALL ON TABLE apopen TO admin; GRANT ALL ON TABLE apopen TO xtrole; publicadminfalse15512591682615 curr_symbolTABLECREATE TABLE curr_symbol ( curr_id integer NOT NULL, curr_base boolean DEFAULT false NOT NULL, curr_name character varying(50) NOT NULL, curr_symbol character varying(9) NOT NULL, curr_abbr character varying(3) NOT NULL ); DROP TABLE public.curr_symbol; publicadminfalse57818!00TABLE curr_symbolCOMMENTNCOMMENT ON TABLE curr_symbol IS 'Currency Names, Symbols, and Abbreviations'; publicadminfalse156!00 curr_symbolACLREVOKE ALL ON TABLE curr_symbol FROM PUBLIC; REVOKE ALL ON TABLE curr_symbol FROM admin; GRANT ALL ON TABLE curr_symbol TO admin; GRANT ALL ON TABLE curr_symbol TO xtrole; publicadminfalse15612591682619termsTABLECREATE TABLE terms ( terms_id integer DEFAULT nextval(('terms_terms_id_seq'::text)::regclass) NOT NULL, terms_code text NOT NULL, terms_descrip text, terms_type character(1), terms_duedays integer, terms_discdays integer, terms_discprcnt numeric(10,6), terms_cutoffday integer, terms_ap boolean, terms_ar boolean, CONSTRAINT terms_terms_code_check CHECK ((terms_code <> ''::text)) ); DROP TABLE public.terms; publicadminfalse578257838!00 TABLE termsCOMMENT7COMMENT ON TABLE terms IS 'Billing Terms information'; publicadminfalse157!00termsACLREVOKE ALL ON TABLE terms FROM PUBLIC; REVOKE ALL ON TABLE terms FROM admin; GRANT ALL ON TABLE terms TO admin; GRANT ALL ON TABLE terms TO xtrole; publicadminfalse15712591682626vendinfoTABLECREATE TABLE vendinfo ( vend_id integer DEFAULT nextval(('vend_vend_id_seq'::text)::regclass) NOT NULL, vend_name text, vend_lastpurchdate date, vend_active boolean, vend_po boolean, vend_comments text, vend_pocomments text, vend_number text NOT NULL, vend_1099 boolean, vend_exported boolean, vend_fobsource character(1), vend_fob text, vend_terms_id integer, vend_shipvia text, vend_vendtype_id integer, vend_qualified boolean, vend_ediemail text, vend_ediemailbody text, vend_edisubject text, vend_edifilename text, vend_accntnum text, vend_emailpodelivery boolean, vend_restrictpurch boolean, vend_edicc text, vend_curr_id integer DEFAULT basecurrid(), vend_cntct1_id integer, vend_cntct2_id integer, vend_addr_id integer, vend_match boolean DEFAULT false NOT NULL, vend_ach_enabled boolean DEFAULT false NOT NULL, vend_ach_accnttype text, vend_ach_use_vendinfo boolean DEFAULT true NOT NULL, vend_ach_indiv_number text DEFAULT ''::text NOT NULL, vend_ach_indiv_name text DEFAULT ''::text NOT NULL, vend_ediemailhtml boolean DEFAULT false NOT NULL, vend_ach_routingnumber bytea DEFAULT '\\000'::bytea NOT NULL, vend_ach_accntnumber bytea DEFAULT '\\000'::bytea NOT NULL, vend_taxzone_id integer, vend_accnt_id integer, vend_expcat_id integer DEFAULT (-1), vend_tax_id integer DEFAULT (-1), CONSTRAINT vendinfo_vend_ach_accnttype_check CHECK (((vend_ach_accnttype = 'K'::text) OR (vend_ach_accnttype = 'C'::text))), CONSTRAINT vendinfo_vend_number_check CHECK ((vend_number <> ''::text)) ); DROP TABLE public.vendinfo; publicadminfalse578457855786578757885789579057915792579357945795579657978!00TABLE vendinfoCOMMENT3COMMENT ON TABLE vendinfo IS 'Vendor information'; publicadminfalse158!00"COLUMN vendinfo.vend_ach_accnttypeCOMMENTCOMMENT ON COLUMN vendinfo.vend_ach_accnttype IS 'Type of bank account: K = checKing, C = Cash = savings. These values were chosen to be consistent with bankaccnt_type.'; publicadminfalse158!00vendinfoACLREVOKE ALL ON TABLE vendinfo FROM PUBLIC; REVOKE ALL ON TABLE vendinfo FROM admin; GRANT ALL ON TABLE vendinfo TO admin; GRANT ALL ON TABLE vendinfo TO xtrole; publicadminfalse15812591745327apmemoVIEW CREATE VIEW apmemo AS SELECT vendinfo.vend_number AS vendor_number, apopen.apopen_docdate AS document_date, apopen.apopen_duedate AS due_date, CASE WHEN (apopen.apopen_doctype = 'C'::bpchar) THEN 'Credit Memo'::text ELSE 'Debit Memo'::text END AS document_type, apopen.apopen_docnumber AS document_number, apopen.apopen_ponumber AS po_number, apopen.apopen_journalnumber AS journal_number, terms.terms_code AS terms, curr.curr_abbr AS currency, apopen.apopen_amount AS amount, apopen.apopen_paid AS paid, (apopen.apopen_amount - apopen.apopen_paid) AS balance, apopen.apopen_notes AS notes, CASE WHEN (apopen.apopen_accnt_id = (-1)) THEN NULL::text ELSE public.formatglaccount(apopen.apopen_accnt_id) END AS alternate_prepaid_account FROM (((public.apopen LEFT JOIN public.vendinfo ON ((vendinfo.vend_id = apopen.apopen_vend_id))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = apopen.apopen_curr_id))) LEFT JOIN public.terms ON ((terms.terms_id = apopen.apopen_terms_id))) WHERE (apopen.apopen_doctype = ANY (ARRAY['C'::bpchar, 'D'::bpchar])); DROP VIEW api.apmemo; apiadminfalse51526!00 VIEW apmemoCOMMENT7COMMENT ON VIEW apmemo IS 'A/P Credit and Debit Memo'; apiadminfalse723!00apmemoACLREVOKE ALL ON TABLE apmemo FROM PUBLIC; REVOKE ALL ON TABLE apmemo FROM admin; GRANT ALL ON TABLE apmemo TO admin; GRANT ALL ON TABLE apmemo TO xtrole; apiadminfalse72312551745332insertapmemo(api.apmemo)FUNCTIONiCREATE FUNCTION insertapmemo(api.apmemo) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; _result INTEGER; BEGIN IF (pNew.document_type = 'Credit Memo') THEN SELECT createAPCreditMemo( getVendId(pNew.vendor_number), pNew.document_number, pNew.po_number, pNew.document_date, pNew.amount, pNew.notes, getGLAccntId(pNew.alternate_prepaid_account), pNew.due_date, getTermsId(pNew.terms) ) INTO _result; IF (_result <= 0) THEN RAISE EXCEPTION 'Function createAPCreditMemo failed with result = %', _result; END IF; ELSE IF (pNew.document_type = 'Debit Memo') THEN SELECT createAPDebitMemo( null, getVendId(pNew.vendor_number), pNew.journal_number, pNew.document_number, pNew.po_number, pNew.document_date, pNew.amount, pNew.notes, getGLAccntId(pNew.alternate_prepaid_account), pNew.due_date, getTermsId(pNew.terms), COALESCE(getCurrId(pNew.currency), baseCurrId()) ) INTO _result; IF (_result <= 0) THEN RAISE EXCEPTION 'Function createAPDebitMemo failed with result = %', _result; END IF; ELSE RAISE EXCEPTION 'Function insertAPMemo failed, invalid Document Type'; END IF; END IF; RETURN TRUE; END; $_$; /DROP FUNCTION public.insertapmemo(api.apmemo); publicadminfalse83992398812591682651aropenTABLELCREATE TABLE aropen ( aropen_id integer DEFAULT nextval(('"aropen_aropen_id_seq"'::text)::regclass) NOT NULL, aropen_docdate date NOT NULL, aropen_duedate date NOT NULL, aropen_terms_id integer, aropen_cust_id integer, aropen_doctype character(1), aropen_docnumber text, aropen_applyto text, aropen_ponumber text, aropen_amount numeric(20,2) NOT NULL, aropen_notes text, aropen_posted boolean DEFAULT false NOT NULL, aropen_salesrep_id integer, aropen_commission_due numeric(20,2), aropen_commission_paid boolean DEFAULT false, aropen_ordernumber text, aropen_cobmisc_id integer DEFAULT (-1), aropen_journalnumber integer, aropen_paid numeric(20,2) DEFAULT 0, aropen_open boolean, aropen_username text, aropen_rsncode_id integer, aropen_salescat_id integer DEFAULT (-1), aropen_accnt_id integer DEFAULT (-1), aropen_curr_id integer DEFAULT basecurrid(), aropen_closedate date, aropen_distdate date, aropen_curr_rate numeric NOT NULL, aropen_discount boolean DEFAULT false NOT NULL ); DROP TABLE public.aropen; publicadminfalse5798579958005801580258035804580558068!00 TABLE aropenCOMMENTOCOMMENT ON TABLE aropen IS 'Accounts Receivable (A/R) open Items information'; publicadminfalse159!00aropenACLREVOKE ALL ON TABLE aropen FROM PUBLIC; REVOKE ALL ON TABLE aropen FROM admin; GRANT ALL ON TABLE aropen TO admin; GRANT ALL ON TABLE aropen TO xtrole; publicadminfalse15912591682666custinfoTABLECREATE TABLE custinfo ( cust_id integer DEFAULT nextval(('cust_cust_id_seq'::text)::regclass) NOT NULL, cust_active boolean NOT NULL, cust_custtype_id integer, cust_salesrep_id integer, cust_commprcnt numeric(10,6), cust_name text, cust_creditlmt integer, cust_creditrating text, cust_financecharge boolean, cust_backorder boolean NOT NULL, cust_partialship boolean NOT NULL, cust_terms_id integer, cust_discntprcnt numeric(10,6) NOT NULL, cust_balmethod character(1) NOT NULL, cust_ffshipto boolean NOT NULL, cust_shipform_id integer, cust_shipvia text, cust_blanketpos boolean NOT NULL, cust_shipchrg_id integer NOT NULL, cust_creditstatus character(1) NOT NULL, cust_comments text, cust_ffbillto boolean NOT NULL, cust_usespos boolean NOT NULL, cust_number text NOT NULL, cust_dateadded date DEFAULT ('now'::text)::date, cust_exported boolean DEFAULT false, cust_emaildelivery boolean DEFAULT false, cust_ediemail text, cust_edisubject text, cust_edifilename text, cust_ediemailbody text, cust_autoupdatestatus boolean NOT NULL, cust_autoholdorders boolean NOT NULL, cust_edicc text, cust_ediprofile_id integer, cust_preferred_warehous_id integer DEFAULT (-1) NOT NULL, cust_curr_id integer DEFAULT basecurrid(), cust_creditlmt_curr_id integer DEFAULT basecurrid(), cust_cntct_id integer, cust_corrcntct_id integer, cust_soemaildelivery boolean DEFAULT false, cust_soediemail text, cust_soedisubject text, cust_soedifilename text, cust_soediemailbody text, cust_soedicc text, cust_soediprofile_id integer, cust_gracedays integer, cust_ediemailhtml boolean DEFAULT false NOT NULL, cust_soediemailhtml boolean DEFAULT false NOT NULL, cust_taxzone_id integer, CONSTRAINT custinfo_balmethod_check CHECK (((cust_balmethod = 'B'::bpchar) OR (cust_balmethod = 'O'::bpchar))), CONSTRAINT custinfo_creditstatus_check CHECK ((((cust_creditstatus = 'G'::bpchar) OR (cust_creditstatus = 'W'::bpchar)) OR (cust_creditstatus = 'H'::bpchar))), CONSTRAINT custinfo_cust_number_check CHECK ((cust_number <> ''::text)) ); DROP TABLE public.custinfo; publicadminfalse58075808580958105811581258135814581558165817581858198!00TABLE custinfoCOMMENT5COMMENT ON TABLE custinfo IS 'Customer information'; publicadminfalse160!00COLUMN custinfo.cust_ediemailCOMMENTNCOMMENT ON COLUMN custinfo.cust_ediemail IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00COLUMN custinfo.cust_edisubjectCOMMENTPCOMMENT ON COLUMN custinfo.cust_edisubject IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00 COLUMN custinfo.cust_edifilenameCOMMENTQCOMMENT ON COLUMN custinfo.cust_edifilename IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00!COLUMN custinfo.cust_ediemailbodyCOMMENTRCOMMENT ON COLUMN custinfo.cust_ediemailbody IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00COLUMN custinfo.cust_ediccCOMMENTKCOMMENT ON COLUMN custinfo.cust_edicc IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00"COLUMN custinfo.cust_ediprofile_idCOMMENTSCOMMENT ON COLUMN custinfo.cust_ediprofile_id IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00COLUMN custinfo.cust_soediemailCOMMENTPCOMMENT ON COLUMN custinfo.cust_soediemail IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00!COLUMN custinfo.cust_soedisubjectCOMMENTRCOMMENT ON COLUMN custinfo.cust_soedisubject IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00"COLUMN custinfo.cust_soedifilenameCOMMENTSCOMMENT ON COLUMN custinfo.cust_soedifilename IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00#COLUMN custinfo.cust_soediemailbodyCOMMENTTCOMMENT ON COLUMN custinfo.cust_soediemailbody IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00COLUMN custinfo.cust_soediccCOMMENTMCOMMENT ON COLUMN custinfo.cust_soedicc IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00$COLUMN custinfo.cust_soediprofile_idCOMMENTUCOMMENT ON COLUMN custinfo.cust_soediprofile_id IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00!COLUMN custinfo.cust_ediemailhtmlCOMMENTRCOMMENT ON COLUMN custinfo.cust_ediemailhtml IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00#COLUMN custinfo.cust_soediemailhtmlCOMMENTTCOMMENT ON COLUMN custinfo.cust_soediemailhtml IS 'Deprecated column - DO NOT USE'; publicadminfalse160!00custinfoACLREVOKE ALL ON TABLE custinfo FROM PUBLIC; REVOKE ALL ON TABLE custinfo FROM admin; GRANT ALL ON TABLE custinfo TO admin; GRANT ALL ON TABLE custinfo TO xtrole; publicadminfalse16012591682684rsncodeTABLECREATE TABLE rsncode ( rsncode_id integer NOT NULL, rsncode_code text NOT NULL, rsncode_descrip text, rsncode_doctype text, CONSTRAINT rsncode_rsncode_code_check CHECK ((rsncode_code <> ''::text)) ); DROP TABLE public.rsncode; publicadminfalse58218!00 TABLE rsncodeCOMMENTICOMMENT ON TABLE rsncode IS 'Debit/Credit Memo Reason Code information'; publicadminfalse161!00rsncodeACLREVOKE ALL ON TABLE rsncode FROM PUBLIC; REVOKE ALL ON TABLE rsncode FROM admin; GRANT ALL ON TABLE rsncode TO admin; GRANT ALL ON TABLE rsncode TO xtrole; publicadminfalse16112591682690salescatTABLETCREATE TABLE salescat ( salescat_id integer NOT NULL, salescat_active boolean, salescat_name text NOT NULL, salescat_descrip text, salescat_sales_accnt_id integer, salescat_prepaid_accnt_id integer, salescat_ar_accnt_id integer, CONSTRAINT salescat_salescat_name_check CHECK ((salescat_name <> ''::text)) ); DROP TABLE public.salescat; publicadminfalse58238!00TABLE salescatCOMMENT;COMMENT ON TABLE salescat IS 'Sales Category information'; publicadminfalse162!00salescatACLREVOKE ALL ON TABLE salescat FROM PUBLIC; REVOKE ALL ON TABLE salescat FROM admin; GRANT ALL ON TABLE salescat TO admin; GRANT ALL ON TABLE salescat TO xtrole; publicadminfalse16212591682696salesrepTABLECREATE TABLE salesrep ( salesrep_id integer DEFAULT nextval(('salesrep_salesrep_id_seq'::text)::regclass) NOT NULL, salesrep_active boolean, salesrep_number text NOT NULL, salesrep_name text, salesrep_commission numeric(8,4), salesrep_method character(1), salesrep_emp_id integer, CONSTRAINT salesrep_salesrep_number_check CHECK ((salesrep_number <> ''::text)) ); DROP TABLE public.salesrep; publicadminfalse582458258!00TABLE salesrepCOMMENTACOMMENT ON TABLE salesrep IS 'Sales Representative information'; publicadminfalse163!00COLUMN salesrep.salesrep_emp_idCOMMENTCOMMENT ON COLUMN salesrep.salesrep_emp_id IS 'DEPRECATED - the relationship between Sales Rep and Employee is now maintained through the crmacct table.'; publicadminfalse163!00salesrepACLREVOKE ALL ON TABLE salesrep FROM PUBLIC; REVOKE ALL ON TABLE salesrep FROM admin; GRANT ALL ON TABLE salesrep TO admin; GRANT ALL ON TABLE salesrep TO xtrole; publicadminfalse16312591745337armemoVIEWCREATE VIEW armemo AS SELECT custinfo.cust_number AS customer_number, aropen.aropen_docdate AS document_date, aropen.aropen_duedate AS due_date, CASE WHEN (aropen.aropen_doctype = 'C'::bpchar) THEN 'Credit Memo'::text ELSE 'Debit Memo'::text END AS document_type, aropen.aropen_docnumber AS document_number, aropen.aropen_applyto AS order_number, aropen.aropen_journalnumber AS journal_number, rsncode.rsncode_code AS reason_code, terms.terms_code AS terms, salesrep.salesrep_number AS sales_rep, curr.curr_abbr AS currency, aropen.aropen_amount AS amount, aropen.aropen_paid AS paid, (aropen.aropen_amount - aropen.aropen_paid) AS balance, aropen.aropen_commission_due AS commission_due, aropen.aropen_commission_paid AS commission_paid, aropen.aropen_notes AS notes, salescat.salescat_name AS alternate_prepaid_sales_category, CASE WHEN (aropen.aropen_accnt_id = (-1)) THEN NULL::text ELSE public.formatglaccount(aropen.aropen_accnt_id) END AS alternate_prepaid_account FROM ((((((public.aropen LEFT JOIN public.custinfo ON ((custinfo.cust_id = aropen.aropen_cust_id))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = aropen.aropen_curr_id))) LEFT JOIN public.salesrep ON ((salesrep.salesrep_id = aropen.aropen_salesrep_id))) LEFT JOIN public.terms ON ((terms.terms_id = aropen.aropen_terms_id))) LEFT JOIN public.salescat ON ((salescat.salescat_id = aropen.aropen_salescat_id))) LEFT JOIN public.rsncode ON ((rsncode.rsncode_id = aropen.aropen_rsncode_id))) WHERE (aropen.aropen_doctype = ANY (ARRAY['C'::bpchar, 'D'::bpchar])); DROP VIEW api.armemo; apiadminfalse51566!00 VIEW armemoCOMMENT7COMMENT ON VIEW armemo IS 'A/R Credit and Debit Memo'; apiadminfalse724!00armemoACLREVOKE ALL ON TABLE armemo FROM PUBLIC; REVOKE ALL ON TABLE armemo FROM admin; GRANT ALL ON TABLE armemo TO admin; GRANT ALL ON TABLE armemo TO xtrole; apiadminfalse72412551745342insertarmemo(api.armemo)FUNCTION% CREATE FUNCTION insertarmemo(api.armemo) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; _result INTEGER; BEGIN IF (pNew.document_type = 'Credit Memo') THEN SELECT createARCreditMemo( NULL, getCustId(pNew.customer_number), pNew.document_number, pNew.order_number, pNew.document_date, pNew.amount, pNew.notes, getRsnId(pNew.reason_code), getSalescatId(pNew.alternate_prepaid_sales_category), getGLAccntId(pNew.alternate_prepaid_account), pNew.due_date, getTermsId(pNew.terms), getSalesrepId(pNew.sales_rep), pNew.commission_due, pNew.journal_number, COALESCE(getCurrId(pNew.currency), baseCurrId()) ) INTO _result; IF (_result <= 0) THEN RAISE EXCEPTION 'Function createARCreditMemo failed with result = %', _result; END IF; ELSE IF (pNew.document_type = 'Debit Memo') THEN SELECT createARDebitMemo( null, getCustId(pNew.customer_number), pNew.journal_number, pNew.document_number, pNew.order_number, pNew.document_date, pNew.amount, pNew.notes, getRsnId(pNew.reason_code), getSalescatId(pNew.alternate_prepaid_sales_category), getGLAccntId(pNew.alternate_prepaid_account), pNew.due_date, getTermsId(pNew.terms), getSalesrepId(pNew.sales_rep), pNew.commission_due, COALESCE(getCurrId(pNew.currency), baseCurrId()) ) INTO _result; IF (_result <= 0) THEN RAISE EXCEPTION 'Function createARDebitMemo failed with result = %', _result; END IF; ELSE RAISE EXCEPTION 'Function insertARMemo failed, invalid Document Type'; END IF; END IF; RETURN TRUE; END; $_$; /DROP FUNCTION public.insertarmemo(api.armemo); publicadminfalse83992399012551682709linsertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text)FUNCTIONCREATE FUNCTION insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustomer ALIAS FOR $1; pActive ALIAS FOR $2; pType ALIAS FOR $3; pNumber ALIAS FOR $4; pName ALIAS FOR $5; pAddr1 ALIAS FOR $6; pAddr2 ALIAS FOR $7; pCity ALIAS FOR $8; pState ALIAS FOR $9; pPostal ALIAS FOR $10; pCountry ALIAS FOR $11; pMonth ALIAS FOR $12; pYear ALIAS FOR $13; pKey ALIAS FOR $14; _type CHAR; _number TEXT; _month INTEGER; _year INTEGER; _result INTEGER; BEGIN --Initialize _number = CAST(encode(pNumber, 'escape') AS text); _month = CAST(encode(pMonth, 'escape') AS integer); _year = CAST(encode(pYear, 'escape') AS integer); -- Check Card holder info IF (pName IS NULL) THEN RAISE EXCEPTION 'The name of the card holder must be entered'; END IF; IF (pAddr1 IS NULL OR pAddr1 = '') THEN RAISE EXCEPTION 'The first address line must be entered'; END IF; IF (pCity IS NULL OR pCity = '') THEN RAISE EXCEPTION 'The city must be entered'; END IF; IF (pState IS NULL OR pState = '') THEN RAISE EXCEPTION 'The state must be entered'; END IF; IF (pPostal IS NULL OR pPostal = '') THEN RAISE EXCEPTION 'The zip code must be entered'; END IF; IF (pCountry IS NULL OR pCountry = '') THEN RAISE EXCEPTION 'The country must be entered'; END IF; IF (pMonth IS NULL OR pMonth = '') THEN RAISE EXCEPTION 'The Expiration Month must be entered'; END IF; IF (_month < 1 OR _month > 12) THEN RAISE EXCEPTION 'Valid Expiration Months are 01 through 12'; END IF; IF (LENGTH(_year::text) <> 4) THEN RAISE EXCEPTION 'Valid Expiration Years are CCYY in format'; END IF; IF (_year < 1970 OR _year > 2100) THEN RAISE EXCEPTION 'Valid Expiration Years are 1970 through 2100'; END IF; -- Check Number Length IF ((NOT _number ~ '[0-9]{13,16}') OR (LENGTH(_number) = 14) OR (LENGTH(_number) > 16)) THEN RAISE EXCEPTION 'The credit card number must be all numeric (no spaces or hyphens) and must be 13, 15 or 16 characters in length'; END IF; -- Convert Type IF (pType = 'Visa') THEN _type = 'V'; ELSE IF (pType = 'Master Card') THEN _type = 'M'; ELSE IF (pType = 'American Express') THEN _type = 'A'; ELSE IF (pType = 'Discover') THEN _type = 'D'; ELSE RAISE EXCEPTION 'You must select Master Card, Visa, American Express or Discover as the credit card type.'; END IF; END IF; END IF; END IF; -- Check Card Specific Data SELECT editccnumber(_number, _type) INTO _result; IF (_result = -1) THEN RAISE EXCEPTION 'You must select Master Card, Visa, American Express or Discover as the credit card type.'; END IF; IF (_result = -2) THEN RAISE EXCEPTION 'The length of a Master Card credit card number has to be 16 digits.'; END IF; IF (_result = -3) THEN RAISE EXCEPTION 'The length of a Visa credit card number has to be either 13 or 16 digits.'; END IF; IF (_result = -4) THEN RAISE EXCEPTION 'The length of an American Express credit card number has to be 15 digits.'; END IF; IF (_result = -5) THEN RAISE EXCEPTION 'The length of a Discover credit card number has to be 16 digits.'; END IF; IF (_result = -6) THEN RAISE EXCEPTION 'The first two digits for a valid Master Card number must be between 51 and 55'; END IF; IF (_result = -7) THEN RAISE EXCEPTION 'The first digit for a valid Visa number must be 4'; END IF; IF (_result = -8) THEN RAISE EXCEPTION 'The first two digits for a valid American Express number must be 34 or 37.'; END IF; IF (_result = -9) THEN RAISE EXCEPTION 'The first four digits for a valid Discover Express number must be 6011.'; END IF; IF ((_result = -10) AND NOT fetchmetricbool('CCTest')) THEN RAISE EXCEPTION 'The credit card number that you have provided is not valid.'; END IF; IF (_result < -10) THEN RAISE EXCEPTION 'Invalid Credit Card Information'; END IF; -- Insert Record INSERT INTO ccard ( ccard_seq, ccard_cust_id, ccard_active, ccard_name, ccard_address1, ccard_address2, ccard_city, ccard_state, ccard_zip, ccard_country, ccard_number, ccard_month_expired, ccard_year_expired, ccard_type) VALUES ((SELECT COALESCE(MAX(ccard_seq), 0) + 10 FROM ccard WHERE (ccard_cust_id =getCustId(pCustomer))), getCustId(pCustomer), COALESCE(pActive), encrypt(setbytea(pName), setbytea(pKey), 'bf'), encrypt(setbytea(pAddr1), setbytea(pKey), 'bf'), encrypt(setbytea(pAddr2), setbytea(pKey), 'bf'), encrypt(setbytea(pCity), setbytea(pKey), 'bf'), encrypt(setbytea(pState), setbytea(pKey), 'bf'), encrypt(setbytea(pPostal), setbytea(pKey), 'bf'), encrypt(setbytea(pCountry), setbytea(pKey), 'bf'), encrypt(setbytea(pNumber), setbytea(pKey), 'bf'), encrypt(setbytea(pMonth), setbytea(pKey), 'bf'), encrypt(setbytea(pYear), setbytea(pKey), 'bf'), _type ); RETURN true; END; $_$; DROP FUNCTION public.insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text); publicadminfalse83992!00uFUNCTION insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text)COMMENTCOMMENT ON FUNCTION insertccard(text, boolean, text, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, bytea, text) IS 'This function is generally used to support the _custcreditcard API view'; publicadminfalse127112591682711cmheadTABLECREATE TABLE cmhead ( cmhead_id integer DEFAULT nextval(('cmhead_cmhead_id_seq'::text)::regclass) NOT NULL, cmhead_number text NOT NULL, cmhead_posted boolean, cmhead_invcnumber text, cmhead_custponumber text, cmhead_cust_id integer, cmhead_docdate date, cmhead_shipto_id integer, cmhead_shipto_name text, cmhead_shipto_address1 text, cmhead_shipto_address2 text, cmhead_shipto_address3 text, cmhead_shipto_city text, cmhead_shipto_state text, cmhead_shipto_zipcode text, cmhead_salesrep_id integer, cmhead_freight numeric(16,4), cmhead_misc numeric(16,4), cmhead_comments text, cmhead_printed boolean, cmhead_billtoname text, cmhead_billtoaddress1 text, cmhead_billtoaddress2 text, cmhead_billtoaddress3 text, cmhead_billtocity text, cmhead_billtostate text, cmhead_billtozip text, cmhead_hold boolean, cmhead_commission numeric(8,4), cmhead_misc_accnt_id integer, cmhead_misc_descrip text, cmhead_rsncode_id integer, cmhead_curr_id integer DEFAULT basecurrid(), cmhead_freighttaxtype_id integer, cmhead_gldistdate date, cmhead_billtocountry text, cmhead_shipto_country text, cmhead_rahead_id integer, cmhead_taxzone_id integer, cmhead_prj_id integer, cmhead_void boolean DEFAULT false, cmhead_saletype_id integer, cmhead_shipzone_id integer, CONSTRAINT cmhead_cmhead_number_check CHECK ((cmhead_number <> ''::text)) ); DROP TABLE public.cmhead; publicadminfalse58265827582858298!00 TABLE cmheadCOMMENTACOMMENT ON TABLE cmhead IS 'S/O Credit Memo header information'; publicadminfalse164!00&COLUMN cmhead.cmhead_freighttaxtype_idCOMMENTWCOMMENT ON COLUMN cmhead.cmhead_freighttaxtype_id IS 'Deprecated column - DO NOT USE'; publicadminfalse164!00 COLUMN cmhead.cmhead_saletype_idCOMMENTXCOMMENT ON COLUMN cmhead.cmhead_saletype_id IS 'Associated sale type for credit memo.'; publicadminfalse164!00 COLUMN cmhead.cmhead_shipzone_idCOMMENT\COMMENT ON COLUMN cmhead.cmhead_shipzone_id IS 'Associated shipping zone for credit memo.'; publicadminfalse164!00cmheadACLREVOKE ALL ON TABLE cmhead FROM PUBLIC; REVOKE ALL ON TABLE cmhead FROM admin; GRANT ALL ON TABLE cmhead TO admin; GRANT ALL ON TABLE cmhead TO xtrole; publicadminfalse16412591682720 shiptoinfoTABLECREATE TABLE shiptoinfo ( shipto_id integer DEFAULT nextval(('shipto_shipto_id_seq'::text)::regclass) NOT NULL, shipto_cust_id integer NOT NULL, shipto_name text, shipto_salesrep_id integer, shipto_comments text, shipto_shipcomments text, shipto_shipzone_id integer, shipto_shipvia text, shipto_commission numeric(10,4) NOT NULL, shipto_shipform_id integer, shipto_shipchrg_id integer, shipto_active boolean NOT NULL, shipto_default boolean, shipto_num text, shipto_ediprofile_id integer, shipto_cntct_id integer, shipto_addr_id integer, shipto_taxzone_id integer ); DROP TABLE public.shiptoinfo; publicadminfalse58308!00TABLE shiptoinfoCOMMENT6COMMENT ON TABLE shiptoinfo IS 'Ship-To information'; publicadminfalse165!00&COLUMN shiptoinfo.shipto_ediprofile_idCOMMENTWCOMMENT ON COLUMN shiptoinfo.shipto_ediprofile_id IS 'Deprecated column - DO NOT USE'; publicadminfalse165!00 shiptoinfoACLREVOKE ALL ON TABLE shiptoinfo FROM PUBLIC; REVOKE ALL ON TABLE shiptoinfo FROM admin; GRANT ALL ON TABLE shiptoinfo TO admin; GRANT ALL ON TABLE shiptoinfo TO xtrole; publicadminfalse16512591682727taxzoneTABLECREATE TABLE taxzone ( taxzone_id integer NOT NULL, taxzone_code text NOT NULL, taxzone_descrip text, CONSTRAINT taxzone_taxzone_code_check CHECK ((taxzone_code <> ''::text)) ); DROP TABLE public.taxzone; publicadminfalse58328!00 TABLE taxzoneCOMMENT4COMMENT ON TABLE taxzone IS 'Tax zone information'; publicadminfalse166!00COLUMN taxzone.taxzone_idCOMMENT7COMMENT ON COLUMN taxzone.taxzone_id IS 'Primary key'; publicadminfalse166!00COLUMN taxzone.taxzone_codeCOMMENT2COMMENT ON COLUMN taxzone.taxzone_code IS 'Code'; publicadminfalse166!00COLUMN taxzone.taxzone_descripCOMMENT<COMMENT ON COLUMN taxzone.taxzone_descrip IS 'Description'; publicadminfalse166!00taxzoneACLREVOKE ALL ON TABLE taxzone FROM PUBLIC; REVOKE ALL ON TABLE taxzone FROM admin; GRANT ALL ON TABLE taxzone TO admin; GRANT ALL ON TABLE taxzone TO xtrole; publicadminfalse16612592005931 creditmemoVIEWCREATE VIEW creditmemo AS SELECT cmhead.cmhead_number AS memo_number, CASE WHEN (cmhead.cmhead_invcnumber = '-1'::text) THEN ''::text ELSE cmhead.cmhead_invcnumber END AS apply_to, cmhead.cmhead_docdate AS memo_date, CASE WHEN cmhead.cmhead_posted THEN 'Posted'::text ELSE 'Unposted'::text END AS status, salesrep.salesrep_number AS sales_rep, cmhead.cmhead_commission AS commission, COALESCE(taxzone.taxzone_code, 'None'::text) AS tax_zone, COALESCE(rsncode.rsncode_code, 'None'::text) AS reason_code, cmhead.cmhead_hold AS on_hold, custinfo.cust_number AS customer_number, cmhead.cmhead_billtoname AS billto_name, cmhead.cmhead_billtoaddress1 AS billto_address1, cmhead.cmhead_billtoaddress2 AS billto_address2, cmhead.cmhead_billtoaddress3 AS billto_address3, cmhead.cmhead_billtocity AS billto_city, cmhead.cmhead_billtostate AS billto_state, cmhead.cmhead_billtozip AS billto_postal_code, cmhead.cmhead_billtocountry AS billto_country, shiptoinfo.shipto_num AS shipto_number, cmhead.cmhead_shipto_name AS shipto_name, cmhead.cmhead_shipto_address1 AS shipto_address1, cmhead.cmhead_shipto_address2 AS shipto_address2, cmhead.cmhead_shipto_address3 AS shipto_address3, cmhead.cmhead_shipto_city AS shipto_city, cmhead.cmhead_shipto_state AS shipto_state, cmhead.cmhead_shipto_zipcode AS shipto_postal_code, cmhead.cmhead_shipto_country AS shipto_country, cmhead.cmhead_custponumber AS customer_po_number, cmhead.cmhead_comments AS notes, curr.curr_abbr AS currency, cmhead.cmhead_misc_descrip AS misc_charge_description, cmhead.cmhead_misc AS misc_charge_amount, CASE WHEN (cmhead.cmhead_misc_accnt_id = (-1)) THEN ''::text ELSE public.formatglaccount(cmhead.cmhead_misc_accnt_id) END AS misc_charge_credit_account, cmhead.cmhead_freight AS freight FROM ((((((public.cmhead LEFT JOIN public.custinfo ON ((custinfo.cust_id = cmhead.cmhead_cust_id))) LEFT JOIN public.shiptoinfo ON ((shiptoinfo.shipto_id = cmhead.cmhead_shipto_id))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = cmhead.cmhead_curr_id))) LEFT JOIN public.salesrep ON ((salesrep.salesrep_id = cmhead.cmhead_salesrep_id))) LEFT JOIN public.taxzone ON ((taxzone.taxzone_id = cmhead.cmhead_taxzone_id))) LEFT JOIN public.rsncode ON ((rsncode.rsncode_id = cmhead.cmhead_rsncode_id))); DROP VIEW api.creditmemo; apiadminfalse52446!00VIEW creditmemoCOMMENT4COMMENT ON VIEW creditmemo IS 'Credit Memo Header'; apiadminfalse763!00 creditmemoACLREVOKE ALL ON TABLE creditmemo FROM PUBLIC; REVOKE ALL ON TABLE creditmemo FROM admin; GRANT ALL ON TABLE creditmemo TO admin; GRANT ALL ON TABLE creditmemo TO xtrole; apiadminfalse76312552005936 insertcreditmemo(api.creditmemo)FUNCTIONCREATE FUNCTION insertcreditmemo(api.creditmemo) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; BEGIN -- NOTE: (SELECT getCustId(...)) seems redundant, but it actually produces -- a HUGE performance increase because it makes the Postgres query planner -- use an index scan rather than an sequential table scan on cust_id INSERT INTO cmhead ( cmhead_number, cmhead_posted, cmhead_invcnumber, cmhead_custponumber, cmhead_cust_id, cmhead_docdate, cmhead_shipto_id, cmhead_shipto_name, cmhead_shipto_address1, cmhead_shipto_address2, cmhead_shipto_address3, cmhead_shipto_city, cmhead_shipto_state, cmhead_shipto_zipcode, cmhead_shipto_country, cmhead_salesrep_id, cmhead_freight, cmhead_misc, cmhead_comments, cmhead_printed, cmhead_billtoname, cmhead_billtoaddress1, cmhead_billtoaddress2, cmhead_billtoaddress3, cmhead_billtocity, cmhead_billtostate, cmhead_billtozip, cmhead_billtocountry, cmhead_hold, cmhead_commission, cmhead_misc_accnt_id, cmhead_misc_descrip, cmhead_rsncode_id, cmhead_curr_id, cmhead_taxzone_id, cmhead_gldistdate, cmhead_rahead_id ) SELECT (CASE -- use a case here so we don't unnecessarily fetch a new CM number WHEN pNew.memo_number IS NULL THEN fetchCMNumber() ELSE pNew.memo_number END), FALSE, -- posted pNew.apply_to, pNew.customer_po_number, cust_id, COALESCE(pNew.memo_date, CURRENT_DATE), COALESCE(shipto_id,-1), pNew.shipto_name, pNew.shipto_address1, pNew.shipto_address2, pNew.shipto_address3, pNew.shipto_city, pNew.shipto_state, pNew.shipto_postal_code, pNew.shipto_country, COALESCE(getSalesRepId(pNew.sales_rep),shipto_salesrep_id,cust_salesrep_id), COALESCE(pNew.freight, 0), COALESCE(pNew.misc_charge_amount, 0), pNew.notes, FALSE, -- printed COALESCE(pNew.billto_name, invchead_billto_name, cust_name), COALESCE(pNew.billto_address1, invchead_billto_address1, addr_line1), COALESCE(pNew.billto_address2, invchead_billto_address2, addr_line2), COALESCE(pNew.billto_address3, invchead_billto_address3, addr_line3), COALESCE(pNew.billto_city, invchead_billto_city, addr_city), COALESCE(pNew.billto_state, invchead_billto_state, addr_state), COALESCE(pNew.billto_postal_code, invchead_billto_zipcode, addr_postalcode), COALESCE(pNew.billto_country, invchead_billto_country, addr_country), COALESCE(pNew.on_hold, FALSE), COALESCE(pNew.commission, 0), COALESCE(getGlAccntId(pNew.misc_charge_credit_account),-1), pNew.misc_charge_description, (SELECT rsncode_id FROM rsncode WHERE rsncode_code = pNew.reason_code), COALESCE(getCurrId(pNew.currency),cust_curr_id,basecurrid()), CASE WHEN pNew.tax_zone = 'None' THEN NULL ELSE COALESCE(getTaxZoneID(pNew.tax_zone),cust_taxzone_id) END, NULL, NULL FROM custinfo LEFT OUTER JOIN shiptoinfo ON (shipto_id=(SELECT CASE WHEN getShiptoId(pNew.customer_number,pNew.shipto_number) IS NOT NULL THEN getShiptoId(pNew.customer_number,pNew.shipto_number) ELSE (SELECT shipto_id FROM shiptoinfo WHERE shipto_cust_id=cust_id AND shipto_default) END)) LEFT OUTER JOIN invchead ON (invchead_id=getInvcheadId(pNEW.apply_to)) LEFT OUTER JOIN cntct ON (cntct_id=cust_cntct_id) LEFT OUTER JOIN addr ON (addr_id=cntct_addr_id) WHERE cust_id = (CASE WHEN pNew.customer_number IS NOT NULL THEN (SELECT getCustId(pNew.customer_number)) ELSE (SELECT invchead_cust_id FROM invchead WHERE invchead_invcnumber = pNew.apply_to) END); RETURN TRUE; END; $_$; 7DROP FUNCTION public.insertcreditmemo(api.creditmemo); publicadminfalse83992278512591682739cmitemTABLECREATE TABLE cmitem ( cmitem_id integer DEFAULT nextval(('cmitem_cmitem_id_seq'::text)::regclass) NOT NULL, cmitem_cmhead_id integer NOT NULL, cmitem_linenumber integer NOT NULL, cmitem_itemsite_id integer NOT NULL, cmitem_qtycredit numeric(18,6) NOT NULL, cmitem_qtyreturned numeric(18,6) NOT NULL, cmitem_unitprice numeric(16,4) NOT NULL, cmitem_comments text, cmitem_rsncode_id integer, cmitem_taxtype_id integer, cmitem_qty_uom_id integer NOT NULL, cmitem_qty_invuomratio numeric(20,10) NOT NULL, cmitem_price_uom_id integer NOT NULL, cmitem_price_invuomratio numeric(20,10) NOT NULL, cmitem_raitem_id integer, cmitem_updateinv boolean DEFAULT true NOT NULL ); DROP TABLE public.cmitem; publicadminfalse583358348!00 TABLE cmitemCOMMENTDCOMMENT ON TABLE cmitem IS 'S/O Credit Memo Line Item information'; publicadminfalse167!00cmitemACLREVOKE ALL ON TABLE cmitem FROM PUBLIC; REVOKE ALL ON TABLE cmitem FROM admin; GRANT ALL ON TABLE cmitem TO admin; GRANT ALL ON TABLE cmitem TO xtrole; publicadminfalse16712592005941creditmemolineVIEWCREATE VIEW creditmemoline AS SELECT cmhead.cmhead_number AS memo_number, cmitem.cmitem_linenumber AS line_number, item.item_number, whsinfo.warehous_code AS recv_site, rsncode.rsncode_code AS reason_code, cmitem.cmitem_qtyreturned AS qty_returned, cmitem.cmitem_qtycredit AS qty_to_credit, COALESCE(qty_uom.uom_name, 'None'::text) AS qty_uom, cmitem.cmitem_unitprice AS net_unit_price, COALESCE(price_uom.uom_name, 'None'::text) AS price_uom, COALESCE(taxtype.taxtype_name, 'None'::text) AS tax_type, cmitem.cmitem_comments AS notes FROM ((((((((public.cmitem LEFT JOIN public.cmhead ON ((cmitem.cmitem_cmhead_id = cmhead.cmhead_id))) LEFT JOIN public.itemsite ON ((itemsite.itemsite_id = cmitem.cmitem_itemsite_id))) LEFT JOIN public.item ON ((item.item_id = itemsite.itemsite_item_id))) LEFT JOIN public.whsinfo ON ((whsinfo.warehous_id = itemsite.itemsite_warehous_id))) LEFT JOIN public.rsncode ON ((rsncode.rsncode_id = cmitem.cmitem_rsncode_id))) LEFT JOIN public.taxtype ON ((taxtype.taxtype_id = cmitem.cmitem_taxtype_id))) LEFT JOIN public.uom qty_uom ON ((qty_uom.uom_id = cmitem.cmitem_qty_uom_id))) LEFT JOIN public.uom price_uom ON ((price_uom.uom_id = cmitem.cmitem_price_uom_id))); DROP VIEW api.creditmemoline; apiadminfalse52486!00VIEW creditmemolineCOMMENT6COMMENT ON VIEW creditmemoline IS 'Credit Memo Line'; apiadminfalse764!00creditmemolineACLREVOKE ALL ON TABLE creditmemoline FROM PUBLIC; REVOKE ALL ON TABLE creditmemoline FROM admin; GRANT ALL ON TABLE creditmemoline TO admin; GRANT ALL ON TABLE creditmemoline TO xtrole; apiadminfalse76412552005946(insertcreditmemoline(api.creditmemoline)FUNCTIONZ CREATE FUNCTION insertcreditmemoline(api.creditmemoline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; _check INTEGER; _r RECORD; BEGIN SELECT cmhead_id INTO _check FROM cmhead WHERE (cmhead_id=getCmheadId(pNew.memo_number, FALSE)); IF (NOT FOUND) THEN RAISE EXCEPTION 'Credit Memo # % not found', pNew.memo_number; END IF; INSERT INTO cmitem ( cmitem_cmhead_id, cmitem_linenumber, cmitem_itemsite_id, cmitem_qtycredit, cmitem_qtyreturned, cmitem_unitprice, cmitem_comments, cmitem_rsncode_id, cmitem_taxtype_id, cmitem_qty_uom_id, cmitem_qty_invuomratio, cmitem_price_uom_id, cmitem_price_invuomratio ) SELECT cmhead_id, COALESCE(pNew.line_number, (SELECT (COALESCE(MAX(cmitem_linenumber), 0) + 1) FROM cmitem WHERE (cmitem_cmhead_id=cmhead_id))), COALESCE(itemsite_id, -1), COALESCE(pNew.qty_to_credit, 0), COALESCE(pNew.qty_returned, 0), COALESCE(pNew.net_unit_price, 0), pNew.notes, getRsnId(pNew.reason_code), taxtype_id, COALESCE(getUomId(pNew.qty_uom), item_inv_uom_id), CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE(getUomId(pNew.qty_uom),item_inv_uom_id),item_inv_uom_id) ELSE 1 END, COALESCE(getUomId(pNew.price_uom),item_price_uom_id), CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE(getUomId(pNew.price_uom),item_price_uom_id),item_price_uom_id) ELSE 1 END FROM cmhead LEFT OUTER JOIN item ON (item_id=getItemId(pNew.item_number)) LEFT OUTER JOIN itemsite ON (itemsite_item_id=item_id AND itemsite_warehous_id=getWarehousId(pNew.recv_site, 'ALL')) LEFT OUTER JOIN taxtype ON (taxtype_id=CASE WHEN pNew.tax_type IS NULL THEN getItemTaxType(item_id,cmhead_taxzone_id) WHEN pNew.tax_type = 'None' THEN NULL ELSE getTaxTypeId(pNew.tax_type) END) WHERE (cmhead_id=getCmheadId(pNew.memo_number, FALSE)); RETURN TRUE; END; $_$; ?DROP FUNCTION public.insertcreditmemoline(api.creditmemoline); publicadminfalse83992278712551682829:insertflgroup(integer, integer, integer, integer, boolean)FUNCTIONCREATE FUNCTION insertflgroup(integer, integer, integer, integer, boolean) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pFlgrpid ALIAS FOR $3; pLevel ALIAS FOR $4; pSummarize ALIAS FOR $5; BEGIN RETURN insertFlGroup(pFlheadid, pPeriodid, pFlgrpid, pLevel, pSummarize, NULL); END; $_$; QDROP FUNCTION public.insertflgroup(integer, integer, integer, integer, boolean); publicadminfalse83992Y12551682830Einsertflgroup(integer, integer, integer, integer, boolean, character)FUNCTIONCREATE FUNCTION insertflgroup(integer, integer, integer, integer, boolean, character) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pFlgrpid ALIAS FOR $3; pLevel ALIAS FOR $4; pSummarize ALIAS FOR $5; pInterval ALIAS FOR $6; BEGIN RETURN insertFlGroup(pFlheadid, pPeriodid, pFlgrpid, pLevel, pSummarize, pInterval, NULL); END; $_$; \DROP FUNCTION public.insertflgroup(integer, integer, integer, integer, boolean, character); publicadminfalse83992p12551682831Ninsertflgroup(integer, integer, integer, integer, boolean, character, integer)FUNCTIONh`CREATE FUNCTION insertflgroup(integer, integer, integer, integer, boolean, character, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pFlgrpid ALIAS FOR $3; pLevel ALIAS FOR $4; pSummarize ALIAS FOR $5; pInterval ALIAS FOR $6; pPrjid ALIAS FOR $7; _subtotal BOOLEAN; _r RECORD; _g RECORD; _all BOOLEAN; BEGIN _all = COALESCE(pPrjid,-1) = -1; -- Check to see if this group wants a subtotal _subtotal := FALSE; IF (pFlgrpid != -1) THEN SELECT COALESCE(flgrp_subtotal, FALSE) INTO _subtotal FROM flgrp WHERE ((flgrp_flhead_id=pFlheadid) AND (flgrp_id=pFlgrpid)); END IF; FOR _r IN SELECT 'G' AS type, flgrp_id AS type_id, flgrp_order AS orderby, flgrp_summarize AS summarize, flgrp_subtract AS subtract, CASE WHEN(flgrp_summarize AND (NOT flgrp_showstart)) THEN NULL ELSE 0.00 END AS beginning, CASE WHEN(flgrp_summarize AND (NOT flgrp_showend)) THEN NULL ELSE 0.00 END AS ending, CASE WHEN(flgrp_summarize AND (NOT flgrp_showdelta)) THEN NULL ELSE 0.00 END AS debits, CASE WHEN(flgrp_summarize AND (NOT flgrp_showdelta)) THEN NULL ELSE 0.00 END AS credits, CASE WHEN(flgrp_summarize AND (NOT flgrp_showbudget)) THEN NULL ELSE 0.00 END AS budget, CASE WHEN(flgrp_summarize AND (NOT flgrp_showdiff)) THEN NULL ELSE 0.00 END AS diff, CASE WHEN(flgrp_summarize AND (NOT flgrp_showcustom)) THEN NULL ELSE 0.00 END AS custom, CASE WHEN(flgrp_showstartprcnt) THEN 0.00 ELSE NULL END AS beginningprcnt, CASE WHEN(flgrp_showendprcnt) THEN 0.00 ELSE NULL END AS endingprcnt, CASE WHEN(flgrp_showdeltaprcnt) THEN 0.00 ELSE NULL END AS debitsprcnt, CASE WHEN(flgrp_showdeltaprcnt) THEN 0.00 ELSE NULL END AS creditsprcnt, CASE WHEN(flgrp_showbudgetprcnt) THEN 0.00 ELSE NULL END AS budgetprcnt, CASE WHEN(flgrp_showdiffprcnt) THEN 0.00 ELSE NULL END AS diffprcnt, CASE WHEN(flgrp_showcustomprcnt) THEN 0.00 ELSE NULL END AS customprcnt, -1 AS accnt_id, '' AS accnt_number FROM flgrp WHERE ((flgrp_flgrp_id=pFlgrpid) AND (flgrp_flhead_id=pFlheadid)) UNION ALL SELECT 'I' AS type, flitem_id AS type_id, flitem_order AS orderby, FALSE AS summarize, flitem_subtract AS subtract, CASE WHEN (flitem_showstart AND (first_trialbal_id IS NULL)) THEN 0.00 WHEN (flitem_showstart) THEN normalizeTrialBal(first_trialbal_id, 'B') ELSE NULL END AS beginning, CASE WHEN (flitem_showend AND (last_trialbal_id IS NULL)) THEN 0.00 WHEN (flitem_showend) THEN normalizeTrialBal(last_trialbal_id, 'E') ELSE NULL END AS ending, CASE WHEN (flitem_showdelta) THEN sum_trialbal_debits ELSE NULL END AS debits, CASE WHEN (flitem_showdelta) THEN sum_trialbal_credits ELSE NULL END AS credits, CASE WHEN ((flitem_showbudget) AND (accnt_type IN ('R','E')) AND flhead_type IN ('I','C','A')) THEN COALESCE(sum_budget_amount,0) WHEN ((flitem_showbudget) AND (accnt_type IN ('R','E')) AND flhead_type = 'B' ) THEN (SELECT COALESCE(SUM(b.budget_amount),0) FROM budget b, (SELECT ytd.period_id AS ytd_period_id FROM period cp, period ytd WHERE ((cp.period_id = last_flitem_period_id) AND (ytd.period_start <= cp.period_start) AND (ytd.period_yearperiod_id = cp.period_yearperiod_id))) AS periods WHERE ((b.budget_accnt_id=accnt_id) AND (b.budget_period_id=ytd_period_id))) WHEN ((flitem_showbudget) AND (accnt_type IN ('A','L','Q')) AND flhead_type = 'C') THEN calccashbudget(accnt_id,last_flitem_period_id,pInterval) ELSE COALESCE(last_budget_amount,0) END AS budget, CASE WHEN (flitem_showdiff AND (first_trialbal_id IS NULL)) THEN 0.00 WHEN (flitem_showdiff) THEN COALESCE(normalizeTrialBal(last_trialbal_id, 'E') - normalizeTrialBal(first_trialbal_id, 'B'), 0.00) ELSE NULL END AS diff, CASE WHEN (NOT flitem_showcustom) THEN NULL WHEN (flitem_custom_source='S' AND (first_trialbal_id IS NOT NULL)) THEN normalizeTrialBal(first_trialbal_id, 'B') WHEN (flitem_custom_source='E' AND (first_trialbal_id IS NOT NULL)) THEN normalizeTrialBal(last_trialbal_id, 'E') WHEN (flitem_custom_source='D') THEN sum_trialbal_debits WHEN (flitem_custom_source='C') THEN sum_trialbal_credits WHEN (flitem_custom_source='B') THEN ( CASE WHEN (accnt_type IN ('R','E')) THEN sum_budget_amount ELSE last_budget_amount END) WHEN (flitem_custom_source='F' AND (first_trialbal_id IS NOT NULL)) THEN COALESCE(normalizeTrialBal(last_trialbal_id, 'E') - normalizeTrialBal(first_trialbal_id, 'B'), 0.00) ELSE 0.00 END AS custom, CASE WHEN(flitem_showstartprcnt) THEN 0.00 ELSE NULL END AS beginningprcnt, CASE WHEN(flitem_showendprcnt) THEN 0.00 ELSE NULL END AS endingprcnt, CASE WHEN(flitem_showdeltaprcnt) THEN 0.00 ELSE NULL END AS debitsprcnt, CASE WHEN(flitem_showdeltaprcnt) THEN 0.00 ELSE NULL END AS creditsprcnt, CASE WHEN(flitem_showbudgetprcnt) THEN 0.00 ELSE NULL END AS budgetprcnt, CASE WHEN(flitem_showdiffprcnt) THEN 0.00 ELSE NULL END AS diffprcnt, CASE WHEN(flitem_showcustomprcnt) THEN 0.00 ELSE NULL END AS customprcnt, accnt_id, public.formatglaccount(accnt_id) AS accnt_number FROM (SELECT flhead_type,flitem_id,flitem_order,flitem_subtract,flitem_showstart,flitem_showend, flitem_showdelta,flitem_showbudget,flitem_showdiff,flitem_showcustom, flitem_custom_source,flitem_showstartprcnt,flitem_showendprcnt,flitem_showdeltaprcnt, flitem_showbudgetprcnt,flitem_showdiffprcnt,flitem_showcustomprcnt, accnt_id,accnt_type, FIRST(trialbal_id) AS first_trialbal_id, LAST(trialbal_id) AS last_trialbal_id, SUM(trialbal_debits) AS sum_trialbal_debits, SUM(trialbal_credits) AS sum_trialbal_credits, LAST(flitem_period_id) AS last_flitem_period_id, SUM(budget_amount) AS sum_budget_amount, LAST(budget_amount) AS last_budget_amount FROM (SELECT period_id AS flitem_period_id, period_start,flhead_type,flitem_id,flitem_order,flitem_subtract,flitem_showstart,flitem_showend, flitem_showdelta,flitem_showbudget,flitem_showdiff,flitem_showcustom, flitem_custom_source,flitem_showstartprcnt,flitem_showendprcnt,flitem_showdeltaprcnt, flitem_showbudgetprcnt,flitem_showdiffprcnt,flitem_showcustomprcnt, accnt_id,accnt_type,COALESCE(trialbal_id,getlasttrialbalid(accnt_id,period_id)) as trialbal_id,COALESCE(trialbal_debits,0) as trialbal_debits, COALESCE(trialbal_credits,0) AS trialbal_credits,COALESCE(budget_amount,0) AS budget_amount FROM (SELECT period_id, period_start, flhead_type, flitem_id,flitem_order,flitem_subtract,flitem_showstart,flitem_showend, flitem_showdelta,flitem_showbudget,flitem_showdiff,flitem_showcustom,flitem_custom_source,flitem_showstartprcnt, flitem_showendprcnt,flitem_showdeltaprcnt,flitem_showbudgetprcnt,flitem_showdiffprcnt,flitem_showcustomprcnt, accnt_id, accnt_type FROM period,flaccnt WHERE ((flitem_flhead_id=pFlheadid) AND (flitem_flgrp_id=pFlgrpid) AND (_all OR prj_id=pPrjId) AND (period_id IN (SELECT * FROM getperiodid(pPeriodId,pInterval)))) ORDER BY flitem_id ) AS flitem LEFT OUTER JOIN trialbal ON ((trialbal_accnt_id=accnt_id) AND (trialbal_period_id=period_id)) LEFT OUTER JOIN budget ON ((budget_accnt_id=accnt_id) AND (budget_period_id=period_id)) ORDER BY accnt_id, period_start) AS data GROUP BY flhead_type,flitem_id,flitem_order,flitem_subtract,flitem_showstart,flitem_showend, flitem_showdelta,flitem_showbudget,flitem_showdiff,flitem_showcustom, flitem_custom_source,flitem_showstartprcnt,flitem_showendprcnt,flitem_showdeltaprcnt, flitem_showbudgetprcnt,flitem_showdiffprcnt,flitem_showcustomprcnt,accnt_id,accnt_type) AS agg UNION ALL SELECT 'S' AS type, flspec_id AS type_id, flspec_order AS orderby, FALSE AS summarize, flspec_subtract AS subtract, CASE WHEN (flspec_showstart) THEN findSpecialFinancial('S', flspec_type, pPeriodid) ELSE NULL END AS beginning, CASE WHEN (flspec_showend) THEN findSpecialFinancial('E', flspec_type, pPeriodid) ELSE NULL END AS ending, CASE WHEN (flspec_showdelta) THEN findSpecialFinancial('D', flspec_type, pPeriodid) ELSE NULL END AS debits, CASE WHEN (flspec_showdelta) THEN findSpecialFinancial('C', flspec_type, pPeriodid) ELSE NULL END AS credits, CASE WHEN (flspec_showbudget) THEN findSpecialFinancial('B', flspec_type, pPeriodid) ELSE NULL END AS budget, CASE WHEN (flspec_showdiff) THEN findSpecialFinancial('E', flspec_type, pPeriodid) - findSpecialFinancial('S', flspec_type, pPeriodid) ELSE NULL END AS diff, CASE WHEN (NOT flspec_showcustom) THEN NULL WHEN (flspec_custom_source='F') THEN findSpecialFinancial('E', flspec_type, pPeriodid) - findSpecialFinancial('S', flspec_type, pPeriodid) WHEN (flspec_custom_source IN ('S', 'E', 'D', 'C', 'B')) THEN findSpecialFinancial(flspec_custom_source, flspec_type, pPeriodid) ELSE 0.00 END AS custom, CASE WHEN(flspec_showstartprcnt) THEN 0.00 ELSE NULL END AS beginningprcnt, CASE WHEN(flspec_showendprcnt) THEN 0.00 ELSE NULL END AS endingprcnt, CASE WHEN(flspec_showdeltaprcnt) THEN 0.00 ELSE NULL END AS debitsprcnt, CASE WHEN(flspec_showdeltaprcnt) THEN 0.00 ELSE NULL END AS creditsprcnt, CASE WHEN(flspec_showbudgetprcnt) THEN 0.00 ELSE NULL END AS budgetprcnt, CASE WHEN(flspec_showdiffprcnt) THEN 0.00 ELSE NULL END AS diffprcnt, CASE WHEN(flspec_showcustomprcnt) THEN 0.00 ELSE NULL END AS customprcnt, -1 AS accnt_id, '' AS accnt_number FROM flspec WHERE ((flspec_flgrp_id=pFlgrpid) AND (flspec_flhead_id=pFlheadid)) ORDER BY orderby, accnt_number LOOP IF (_r.type = 'G') THEN -- Create a record for the items sub items to be attached to and be able to update the total INSERT INTO flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_diff, flrpt_custom, flrpt_beginningprcnt, flrpt_endingprcnt, flrpt_debitsprcnt, flrpt_creditsprcnt, flrpt_budgetprcnt, flrpt_diffprcnt, flrpt_customprcnt, flrpt_parent_id, flrpt_interval) VALUES (pFlheadid, pPeriodid, getEffectiveXtUser(), (COALESCE(( SELECT MAX(flrpt_order) FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ), 1) + 1), pLevel, _r.type, _r.type_id, _r.beginning, _r.ending, _r.debits, _r.credits, _r.budget, _r.diff, _r.custom, _r.beginningprcnt, _r.endingprcnt, _r.debitsprcnt, _r.creditsprcnt, _r.budgetprcnt, _r.diffprcnt, _r.customprcnt, pFlgrpid, pInterval); PERFORM insertFlGroup(pFlheadid, pPeriodid, _r.type_id, (pLevel + 1), (pSummarize OR _r.summarize), pInterval, pPrjid); -- Update the parent item SELECT COALESCE(flrpt_beginning, 0.00) AS beginning, COALESCE(flrpt_ending, 0.00) AS ending, COALESCE(flrpt_debits, 0.00) AS debits, COALESCE(flrpt_credits, 0.00) AS credits, COALESCE(flrpt_budget, 0.00) AS budget, COALESCE(flrpt_diff, 0.00) AS diff, COALESCE(flrpt_custom, 0.00) AS custom INTO _g FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type=_r.type) AND (flrpt_type_id=_r.type_id)); IF (_r.subtract) THEN UPDATE flrpt SET flrpt_beginning = flrpt_beginning - _g.beginning, flrpt_ending = flrpt_ending - _g.ending, flrpt_debits = flrpt_debits - _g.debits, flrpt_credits = flrpt_credits - _g.credits, flrpt_budget = flrpt_budget - _g.budget, flrpt_diff = flrpt_diff - _g.diff, flrpt_custom = flrpt_custom - _g.custom WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); ELSE UPDATE flrpt SET flrpt_beginning = flrpt_beginning + _g.beginning, flrpt_ending = flrpt_ending + _g.ending, flrpt_debits = flrpt_debits + _g.debits, flrpt_credits = flrpt_credits + _g.credits, flrpt_budget = flrpt_budget + _g.budget, flrpt_diff = flrpt_diff + _g.diff, flrpt_custom = flrpt_custom + _g.custom WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); END IF; -- If we are summarizing then we need to remove the record we created now that we have updated the total IF (pSummarize) THEN DELETE FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type=_r.type) AND (flrpt_type_id=_r.type_id)); END IF; ELSE IF (_r.type = 'I' OR _r.type = 'S' ) THEN -- If we are not summarizing then create a new entry for this record IF (NOT pSummarize) THEN INSERT INTO flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_diff, flrpt_custom, flrpt_beginningprcnt, flrpt_endingprcnt, flrpt_debitsprcnt, flrpt_creditsprcnt, flrpt_budgetprcnt, flrpt_diffprcnt, flrpt_customprcnt, flrpt_parent_id,flrpt_accnt_id,flrpt_interval) VALUES (pFlheadid, pPeriodid, getEffectiveXtUser(), (COALESCE(( SELECT MAX(flrpt_order) FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ), 1) + 1), pLevel, _r.type, _r.type_id, _r.beginning, _r.ending, _r.debits, _r.credits, _r.budget, _r.diff, _r.custom, _r.beginningprcnt, _r.endingprcnt, _r.debitsprcnt, _r.creditsprcnt, _r.budgetprcnt, _r.diffprcnt, _r.customprcnt, pFlgrpid,_r.accnt_id,pInterval); END IF; -- Update the parent item IF (_r.subtract) THEN UPDATE flrpt SET flrpt_beginning = flrpt_beginning - COALESCE(_r.beginning, 0.00), flrpt_ending = flrpt_ending - COALESCE(_r.ending, 0.00), flrpt_debits = flrpt_debits - COALESCE(_r.debits, 0.00), flrpt_credits = flrpt_credits - COALESCE(_r.credits, 0.00), flrpt_budget = flrpt_budget - COALESCE(_r.budget, 0.00), flrpt_diff = flrpt_diff - COALESCE(_r.diff, 0.00), flrpt_custom = flrpt_custom - COALESCE(_r.custom, 0.00) WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); ELSE UPDATE flrpt SET flrpt_beginning = flrpt_beginning + COALESCE(_r.beginning, 0.00), flrpt_ending = flrpt_ending + COALESCE(_r.ending, 0.00), flrpt_debits = flrpt_debits + COALESCE(_r.debits, 0.00), flrpt_credits = flrpt_credits + COALESCE(_r.credits, 0.00), flrpt_budget = flrpt_budget + COALESCE(_r.budget, 0.00), flrpt_diff = flrpt_diff + COALESCE(_r.diff, 0.00), flrpt_custom = flrpt_custom + COALESCE(_r.custom, 0.00) WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_interval=pInterval) AND (flrpt_period_id=pPeriodid) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); END IF; END IF; END IF; END LOOP; IF (NOT pSummarize) THEN -- If this group wants a summarized line create it here. IF (_subtotal) THEN INSERT INTO flrpt (flrpt_flhead_id, flrpt_period_id, flrpt_username, flrpt_order, flrpt_level, flrpt_type, flrpt_type_id, flrpt_beginning, flrpt_ending, flrpt_debits, flrpt_credits, flrpt_budget, flrpt_diff, flrpt_custom, flrpt_beginningprcnt, flrpt_endingprcnt, flrpt_debitsprcnt, flrpt_creditsprcnt, flrpt_budgetprcnt, flrpt_diffprcnt, flrpt_customprcnt, flrpt_parent_id, flrpt_altname,flrpt_interval ) SELECT pFlheadid, pPeriodid, getEffectiveXtUser(), (COALESCE(( SELECT MAX(flrpt_order) FROM flrpt WHERE ((flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser())) ), 1) + 1), pLevel, 'T', -1, CASE WHEN (flgrp_showstart) THEN flrpt_beginning ELSE NULL END, CASE WHEN (flgrp_showend) THEN flrpt_ending ELSE NULL END, CASE WHEN (flgrp_showdelta) THEN flrpt_debits ELSE NULL END, CASE WHEN (flgrp_showdelta) THEN flrpt_credits ELSE NULL END, CASE WHEN (flgrp_showbudget) THEN flrpt_budget ELSE NULL END, CASE WHEN (flgrp_showdiff) THEN flrpt_diff ELSE NULL END, CASE WHEN (flgrp_showcustom) THEN flrpt_custom ELSE NULL END, CASE WHEN (flgrp_showstartprcnt) THEN flrpt_beginningprcnt ELSE NULL END, CASE WHEN (flgrp_showendprcnt) THEN flrpt_endingprcnt ELSE NULL END, CASE WHEN (flgrp_showdeltaprcnt) THEN flrpt_debitsprcnt ELSE NULL END, CASE WHEN (flgrp_showdeltaprcnt) THEN flrpt_creditsprcnt ELSE NULL END, CASE WHEN (flgrp_showbudgetprcnt) THEN flrpt_budgetprcnt ELSE NULL END, CASE WHEN (flgrp_showdiffprcnt) THEN flrpt_diffprcnt ELSE NULL END, CASE WHEN (flgrp_showcustomprcnt) THEN flrpt_customprcnt ELSE NULL END, pFlgrpid, CASE WHEN (flgrp_usealtsubtotal) THEN flgrp_altsubtotal ELSE NULL END, pInterval FROM flrpt, flgrp WHERE ((flrpt_flhead_id=flgrp_flhead_id) AND (flrpt_type_id=flgrp_id) AND (flrpt_flhead_id=pFlheadid) AND (flrpt_period_id=pPeriodid) AND (flrpt_interval=pInterval) AND (flrpt_username=getEffectiveXtUser()) AND (flrpt_type='G') AND (flrpt_type_id=pFlgrpid)); END IF; END IF; return TRUE; END; $_$; eDROP FUNCTION public.insertflgroup(integer, integer, integer, integer, boolean, character, integer); publicadminfalse83992s12551682833Uinsertgltransaction(text, text, text, text, integer, integer, integer, numeric, date)FUNCTIONCREATE FUNCTION insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; pDocType ALIAS FOR $2; pDocNumber ALIAS FOR $3; pNotes ALIAS FOR $4; pCreditid ALIAS FOR $5; pDebitid ALIAS FOR $6; pMiscid ALIAS FOR $7; pAmount ALIAS FOR $8; pDistDate ALIAS FOR $9; _return INTEGER; BEGIN SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), pSource, pDocType, pDocNumber, pNotes, pCreditid, pDebitid, pMiscid, pAmount, pDistDate) INTO _return; RETURN _return; END; $_$; lDROP FUNCTION public.insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date); publicadminfalse83992u12551682834^insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date)FUNCTIONCREATE FUNCTION insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pJournalNumber ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pNotes ALIAS FOR $5; pCreditid ALIAS FOR $6; pDebitid ALIAS FOR $7; pMiscid ALIAS FOR $8; pAmount ALIAS FOR $9; pDistDate ALIAS FOR $10; _return INTEGER; BEGIN SELECT insertGLTransaction( pJournalNumber, pSource, pDocType, pDocNumber, pNotes, pCreditid, pDebitid, pMiscid, pAmount, pDistDate, TRUE) INTO _return; RETURN _return; END; $_$; uDROP FUNCTION public.insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date); publicadminfalse83992t12551682835^insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date, boolean)FUNCTIONNCREATE FUNCTION insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; pDocType ALIAS FOR $2; pDocNumber ALIAS FOR $3; pNotes ALIAS FOR $4; pCreditid ALIAS FOR $5; pDebitid ALIAS FOR $6; pMiscid ALIAS FOR $7; pAmount ALIAS FOR $8; pDistDate ALIAS FOR $9; pPostTrialBal ALIAS FOR $10; _return INTEGER; BEGIN SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), pSource, pDocType, pDocNumber, pNotes, pCreditid, pDebitid, pMiscid, pAmount, pDistDate, pPostTrialBal) INTO _return; RETURN _return; END; $_$; uDROP FUNCTION public.insertgltransaction(text, text, text, text, integer, integer, integer, numeric, date, boolean); publicadminfalse83992B12551682836ginsertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean)FUNCTIONTCREATE FUNCTION insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pJournalNumber ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pNotes ALIAS FOR $5; pCreditid ALIAS FOR $6; pDebitid ALIAS FOR $7; pMiscid ALIAS FOR $8; pAmount ALIAS FOR $9; pDistDate ALIAS FOR $10; pPostTrialBal ALIAS FOR $11; _return INTEGER; BEGIN SELECT insertGLTransaction( pJournalNumber, pSource, pDocType, pDocNumber, pNotes, pCreditid, pDebitid, pMiscid, pAmount, pDistDate, pPostTrialBal, false) INTO _return; RETURN _return; END; $_$; ~DROP FUNCTION public.insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean); publicadminfalse8399212551682837pinsertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean, boolean)FUNCTIONCREATE FUNCTION insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pJournalNumber ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pNotes ALIAS FOR $5; pCreditid ALIAS FOR $6; pDebitid ALIAS FOR $7; pMiscid ALIAS FOR $8; pAmount ALIAS FOR $9; pDistDate ALIAS FOR $10; pPostTrialBal ALIAS FOR $11; pOnlyGL ALIAS FOR $12; _debitid INTEGER; _creditid INTEGER; _sequence INTEGER; _check INTEGER; BEGIN -- Check GL Interface metric IF (fetchMetricBool('InterfaceToGL') = false AND pSource IN ('I/M', 'P/D', 'S/R', 'W/O')) THEN RETURN 0; END IF; IF (fetchMetricBool('InterfaceAPToGL') = false AND pSource = 'A/P') THEN RETURN 0; END IF; IF (fetchMetricBool('InterfaceARToGL') = false AND pSource IN ('A/R', 'S/O', 'S/R')) THEN RETURN 0; END IF; -- Is there anything to post? -- ToDo - 2 should really be the scale of the base currency IF (round(pAmount, 2) = 0) THEN RETURN -3; END IF; /* Make sure we don't create an imbalance across companies. The 'IgnoreCompanyBalance' metric is a back door mechanism to allow legacy users to create transactions accross companies if they have been using the company segment for something else and they MUST continue to be able to do so. It can only be implemented by direct sql update to the metric table and should otherwise be discouraged. */ IF (COALESCE(fetchMetricValue('GLCompanySize'),0) > 0 AND fetchMetricBool('IgnoreCompany') = false) THEN IF (SELECT (COALESCE(d.accnt_company,'') != COALESCE(c.accnt_company,'')) FROM accnt d, accnt c WHERE ((d.accnt_id=pDebitid) AND (c.accnt_id=pCreditid))) THEN RAISE EXCEPTION 'G/L Transaction can not be posted because accounts % and % reference two differnt companies.', formatGlaccount(pDebitid), formatGlaccount(pCreditid); END IF; END IF; -- Validate pDebitid IF (pDebitid IN (SELECT accnt_id FROM accnt)) THEN _debitid := pDebitid; ELSE SELECT getUnassignedAccntId() INTO _debitid; END IF; -- Validate pCreditid IF (pCreditid IN (SELECT accnt_id FROM accnt)) THEN _creditid := pCreditid; ELSE SELECT getUnassignedAccntId() INTO _creditid; END IF; -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id IN (_creditid, _debitid))) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', pDistDate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id IN (_creditid, _debitid))) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', pDistDate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into nonexistent periods IF NOT EXISTS(SELECT period_id FROM period WHERE (pDistDate BETWEEN period_start AND period_end)) THEN RAISE EXCEPTION 'Cannot post to nonexistent period (%).', pDistDate; END IF; -- Grab a sequence for the pair SELECT fetchGLSequence() INTO _sequence; IF (NOT pOnlyGL AND fetchMetricBool('UseJournals')) THEN -- First the credit INSERT INTO sltrans ( sltrans_journalnumber, sltrans_posted, sltrans_created, sltrans_date, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_doctype, sltrans_docnumber, sltrans_notes, sltrans_misc_id, sltrans_amount ) VALUES ( pJournalNumber, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _creditid, pSource, pDocType, pDocNumber, pNotes, pMiscid, pAmount ); -- Now the debit INSERT INTO sltrans ( sltrans_journalnumber, sltrans_posted, sltrans_created, sltrans_date, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_doctype, sltrans_docnumber, sltrans_notes, sltrans_misc_id, sltrans_amount ) VALUES ( pJournalNumber, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _debitid, pSource, pDocType, pDocNumber, pNotes, pMiscid, (pAmount * -1) ); ELSE -- First the credit INSERT INTO gltrans ( gltrans_journalnumber, gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_doctype, gltrans_docnumber, gltrans_notes, gltrans_misc_id, gltrans_amount ) VALUES ( pJournalNumber, FALSE, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _creditid, pSource, pDocType, pDocNumber, pNotes, pMiscid, pAmount ); -- Now the debit INSERT INTO gltrans ( gltrans_journalnumber, gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_doctype, gltrans_docnumber, gltrans_notes, gltrans_misc_id, gltrans_amount ) VALUES ( pJournalNumber, FALSE, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _debitid, pSource, pDocType, pDocNumber, pNotes, pMiscid, (pAmount * -1) ); IF (pPostTrialBal) THEN PERFORM postIntoTrialBalance(_sequence); END IF; END IF; RETURN _sequence; END; $_$; DROP FUNCTION public.insertgltransaction(integer, text, text, text, text, integer, integer, integer, numeric, date, boolean, boolean); publicadminfalse83992V12551682839?insertintoglseries(integer, text, text, text, integer, numeric)FUNCTIONCREATE FUNCTION insertintoglseries(integer, text, text, text, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pAccntid ALIAS FOR $5; pAmount ALIAS FOR $6; _returnValue INTEGER; BEGIN SELECT insertIntoGLSeries( pSequence, pSource, pDocType, pDocNumber, pAccntid, pAmount, CURRENT_DATE, '' ) INTO _returnValue; RETURN _returnValue; END; $_$; VDROP FUNCTION public.insertintoglseries(integer, text, text, text, integer, numeric); publicadminfalse8399212551682840Einsertintoglseries(integer, text, text, text, integer, numeric, date)FUNCTIONCREATE FUNCTION insertintoglseries(integer, text, text, text, integer, numeric, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pAccntid ALIAS FOR $5; pAmount ALIAS FOR $6; pDistDate ALIAS FOR $7; _returnValue INTEGER; BEGIN SELECT insertIntoGLSeries( pSequence, pSource, pDocType, pDocNumber, pAccntid, pAmount, pDistDate, '' ) INTO _returnValue; RETURN _returnValue; END; $_$; \DROP FUNCTION public.insertintoglseries(integer, text, text, text, integer, numeric, date); publicadminfalse83992n12551682841Kinsertintoglseries(integer, text, text, text, integer, numeric, date, text)FUNCTIONCREATE FUNCTION insertintoglseries(integer, text, text, text, integer, numeric, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pAccntid ALIAS FOR $5; pAmount ALIAS FOR $6; pDistDate ALIAS FOR $7; pNotes ALIAS FOR $8; _returnValue INTEGER; BEGIN SELECT insertIntoGLSeries( pSequence, pSource, pDocType, pDocNumber, pAccntid, pAmount, pDistDate, pNotes, NULL ) INTO _returnValue; RETURN _returnValue; END; $_$; bDROP FUNCTION public.insertintoglseries(integer, text, text, text, integer, numeric, date, text); publicadminfalse83992o12551682842Tinsertintoglseries(integer, text, text, text, integer, numeric, date, text, integer)FUNCTIONF CREATE FUNCTION insertintoglseries(integer, text, text, text, integer, numeric, date, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pSource ALIAS FOR $2; pDocType ALIAS FOR $3; pDocNumber ALIAS FOR $4; pAccntid ALIAS FOR $5; pAmount ALIAS FOR $6; pDistDate ALIAS FOR $7; pNotes ALIAS FOR $8; pMiscid ALIAS FOR $9; _glseriesid INTEGER; BEGIN -- Check GL Interface metric IF (fetchMetricBool('InterfaceToGL') = false AND pSource IN ('I/M', 'P/D', 'S/R', 'W/O')) THEN RETURN 0; END IF; IF (fetchMetricBool('InterfaceAPToGL') = false AND pSource = 'A/P') THEN RETURN 0; END IF; IF (fetchMetricBool('InterfaceARToGL') = false AND pSource IN ('A/R', 'S/O', 'S/R')) THEN RETURN 0; END IF; -- Verify the target accnt IF ( (pAccntid IS NULL) OR (pAccntid = -1) ) THEN RETURN -1; END IF; -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id = pAccntid)) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', pDistDate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id = pAccntid)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', pDistDate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into nonexistent periods IF NOT EXISTS(SELECT period_id FROM period WHERE (pDistDate BETWEEN period_start AND period_end)) THEN RAISE EXCEPTION 'Cannot post to nonexistent period (%).', pDistDate; END IF; -- Insert into the glseries SELECT NEXTVAL('glseries_glseries_id_seq') INTO _glseriesid; INSERT INTO glseries ( glseries_id, glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_amount, glseries_distdate, glseries_notes, glseries_misc_id ) VALUES ( _glseriesid, pSequence, pSource, pDocType, pDocNumber, pAccntid, pAmount, pDistDate, pNotes, pMiscid ); RETURN _glseriesid; END; $_$; kDROP FUNCTION public.insertintoglseries(integer, text, text, text, integer, numeric, date, text, integer); publicadminfalse8399212591682843invcheadTABLECREATE TABLE invchead ( invchead_id integer NOT NULL, invchead_cust_id integer NOT NULL, invchead_shipto_id integer, invchead_ordernumber text, invchead_orderdate date, invchead_posted boolean NOT NULL, invchead_printed boolean NOT NULL, invchead_invcnumber text NOT NULL, invchead_invcdate date NOT NULL, invchead_shipdate date, invchead_ponumber text, invchead_shipvia text, invchead_fob text, invchead_billto_name text, invchead_billto_address1 text, invchead_billto_address2 text, invchead_billto_address3 text, invchead_billto_city text, invchead_billto_state text, invchead_billto_zipcode text, invchead_billto_phone text, invchead_shipto_name text, invchead_shipto_address1 text, invchead_shipto_address2 text, invchead_shipto_address3 text, invchead_shipto_city text, invchead_shipto_state text, invchead_shipto_zipcode text, invchead_shipto_phone text, invchead_salesrep_id integer, invchead_commission numeric(20,10) NOT NULL, invchead_terms_id integer, invchead_freight numeric(16,2) NOT NULL, invchead_misc_amount numeric(16,2) NOT NULL, invchead_misc_descrip text, invchead_misc_accnt_id integer, invchead_payment numeric(16,2), invchead_paymentref text, invchead_notes text, invchead_billto_country text, invchead_shipto_country text, invchead_prj_id integer, invchead_curr_id integer DEFAULT basecurrid(), invchead_gldistdate date, invchead_recurring boolean DEFAULT false NOT NULL, invchead_recurring_interval integer, invchead_recurring_type text, invchead_recurring_until date, invchead_recurring_invchead_id integer, invchead_shipchrg_id integer, invchead_taxzone_id integer, invchead_void boolean DEFAULT false, invchead_saletype_id integer, invchead_shipzone_id integer, CONSTRAINT invchead_invchead_invcnumber_check CHECK ((invchead_invcnumber <> ''::text)) ); DROP TABLE public.invchead; publicadminfalse58885889589058928!00TABLE invcheadCOMMENT;COMMENT ON TABLE invchead IS 'Invoice header information'; publicadminfalse173!00"COLUMN invchead.invchead_recurringCOMMENT@COMMENT ON COLUMN invchead.invchead_recurring IS 'Deprecated.'; publicadminfalse173!00+COLUMN invchead.invchead_recurring_intervalCOMMENTICOMMENT ON COLUMN invchead.invchead_recurring_interval IS 'Deprecated.'; publicadminfalse173!00'COLUMN invchead.invchead_recurring_typeCOMMENTECOMMENT ON COLUMN invchead.invchead_recurring_type IS 'Deprecated.'; publicadminfalse173!00(COLUMN invchead.invchead_recurring_untilCOMMENTFCOMMENT ON COLUMN invchead.invchead_recurring_until IS 'Deprecated.'; publicadminfalse173!00$COLUMN invchead.invchead_saletype_idCOMMENTXCOMMENT ON COLUMN invchead.invchead_saletype_id IS 'Associated sale type for invoice.'; publicadminfalse173!00$COLUMN invchead.invchead_shipzone_idCOMMENT\COMMENT ON COLUMN invchead.invchead_shipzone_id IS 'Associated shipping zone for invoice.'; publicadminfalse173!00invcheadACLREVOKE ALL ON TABLE invchead FROM PUBLIC; REVOKE ALL ON TABLE invchead FROM admin; GRANT ALL ON TABLE invchead TO admin; GRANT ALL ON TABLE invchead TO xtrole; publicadminfalse17312591682852prjTABLECREATE TABLE prj ( prj_id integer NOT NULL, prj_number text NOT NULL, prj_name text NOT NULL, prj_descrip text, prj_status character(1) NOT NULL, prj_so boolean, prj_wo boolean, prj_po boolean, prj_owner_username text, prj_start_date date, prj_due_date date, prj_assigned_date date, prj_completed_date date, prj_username text, prj_recurring_prj_id integer, prj_crmacct_id integer, prj_cntct_id integer, CONSTRAINT prj_prj_number_check CHECK ((prj_number <> ''::text)), CONSTRAINT prj_prj_status_check CHECK ((prj_status = ANY (ARRAY['P'::bpchar, 'O'::bpchar, 'C'::bpchar]))) ); DROP TABLE public.prj; publicadminfalse589458958!00 TABLE prjCOMMENT/COMMENT ON TABLE prj IS 'Project information'; publicadminfalse174!00COLUMN prj.prj_recurring_prj_idCOMMENTCOMMENT ON COLUMN prj.prj_recurring_prj_id IS 'The first prj record in the series if this is a recurring Project. If the prj_recurring_prj_id is the same as the prj_id, this record is the first in the series.'; publicadminfalse174!00prjACLREVOKE ALL ON TABLE prj FROM PUBLIC; REVOKE ALL ON TABLE prj FROM admin; GRANT ALL ON TABLE prj TO admin; GRANT ALL ON TABLE prj TO xtrole; publicadminfalse17412591744596saletypeTABLECREATE TABLE saletype ( saletype_id integer NOT NULL, saletype_code text NOT NULL, saletype_descr text, saletype_active boolean DEFAULT true NOT NULL ); DROP TABLE public.saletype; publicadminfalse66358!00TABLE saletypeCOMMENT=COMMENT ON TABLE saletype IS 'Type or Origination of Sale.'; publicadminfalse722!00COLUMN saletype.saletype_idCOMMENTPCOMMENT ON COLUMN saletype.saletype_id IS 'Sequence identifier for sale type.'; publicadminfalse722!00COLUMN saletype.saletype_codeCOMMENTVCOMMENT ON COLUMN saletype.saletype_code IS 'User defined identifier for sale type.'; publicadminfalse722"00COLUMN saletype.saletype_descrCOMMENTKCOMMENT ON COLUMN saletype.saletype_descr IS 'Description for sale type.'; publicadminfalse722"00COLUMN saletype.saletype_activeCOMMENTTCOMMENT ON COLUMN saletype.saletype_active IS 'Boolean to deactivate a sale type.'; publicadminfalse722"00saletypeACLREVOKE ALL ON TABLE saletype FROM PUBLIC; REVOKE ALL ON TABLE saletype FROM admin; GRANT ALL ON TABLE saletype TO admin; GRANT ALL ON TABLE saletype TO xtrole; publicadminfalse72212591683870shipzoneTABLECREATE TABLE shipzone ( shipzone_id integer DEFAULT nextval(('shipzone_shipzone_id_seq'::text)::regclass) NOT NULL, shipzone_name text NOT NULL, shipzone_descrip text, CONSTRAINT shipzone_shipzone_name_check CHECK ((shipzone_name <> ''::text)) ); DROP TABLE public.shipzone; publicadminfalse604060418"00TABLE shipzoneCOMMENT:COMMENT ON TABLE shipzone IS 'Shipping Zone information'; publicadminfalse212"00shipzoneACLREVOKE ALL ON TABLE shipzone FROM PUBLIC; REVOKE ALL ON TABLE shipzone FROM admin; GRANT ALL ON TABLE shipzone TO admin; GRANT ALL ON TABLE shipzone TO xtrole; publicadminfalse21212592006109invoiceVIEW CREATE VIEW invoice AS SELECT invchead.invchead_invcnumber AS invoice_number, invchead.invchead_ordernumber AS order_number, invchead.invchead_invcdate AS invoice_date, invchead.invchead_shipdate AS ship_date, invchead.invchead_orderdate AS order_date, saletype.saletype_code AS sale_type, salesrep.salesrep_number AS sales_rep, invchead.invchead_commission AS commission, COALESCE(taxzone.taxzone_code, 'None'::text) AS tax_zone, terms.terms_code AS terms, custinfo.cust_number AS customer_number, invchead.invchead_billto_name AS billto_name, invchead.invchead_billto_address1 AS billto_address1, invchead.invchead_billto_address2 AS billto_address2, invchead.invchead_billto_address3 AS billto_address3, invchead.invchead_billto_city AS billto_city, invchead.invchead_billto_state AS billto_state, invchead.invchead_billto_zipcode AS billto_postal_code, invchead.invchead_billto_country AS billto_country, invchead.invchead_billto_phone AS billto_phone, shiptoinfo.shipto_num AS shipto_number, invchead.invchead_shipto_name AS shipto_name, invchead.invchead_shipto_address1 AS shipto_address1, invchead.invchead_shipto_address2 AS shipto_address2, invchead.invchead_shipto_address3 AS shipto_address3, invchead.invchead_shipto_city AS shipto_city, invchead.invchead_shipto_state AS shipto_state, invchead.invchead_shipto_zipcode AS shipto_postal_code, invchead.invchead_shipto_country AS shipto_country, shipzone.shipzone_name AS shipto_shipzone, invchead.invchead_shipto_phone AS shipto_phone, invchead.invchead_ponumber AS po_number, invchead.invchead_shipvia AS ship_via, prj.prj_number AS project_number, invchead.invchead_fob AS fob, invchead.invchead_misc_descrip AS misc_charge_description, invchead.invchead_misc_amount AS misc_charge, CASE WHEN (invchead.invchead_misc_accnt_id = (-1)) THEN NULL::text ELSE public.formatglaccount(invchead.invchead_misc_accnt_id) END AS misc_charge_account_number, invchead.invchead_freight AS freight, curr.curr_abbr AS currency, invchead.invchead_payment AS payment, invchead.invchead_notes AS notes FROM (((((((((public.invchead LEFT JOIN public.custinfo ON ((custinfo.cust_id = invchead.invchead_cust_id))) LEFT JOIN public.shiptoinfo ON ((shiptoinfo.shipto_id = invchead.invchead_shipto_id))) LEFT JOIN public.prj ON ((prj.prj_id = invchead.invchead_prj_id))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = invchead.invchead_curr_id))) LEFT JOIN public.salesrep ON ((salesrep.salesrep_id = invchead.invchead_salesrep_id))) LEFT JOIN public.terms ON ((terms.terms_id = invchead.invchead_terms_id))) LEFT JOIN public.taxzone ON ((taxzone.taxzone_id = invchead.invchead_taxzone_id))) LEFT JOIN public.saletype ON ((invchead.invchead_saletype_id = saletype.saletype_id))) LEFT JOIN public.shipzone ON ((invchead.invchead_shipzone_id = shipzone.shipzone_id))); DROP VIEW api.invoice; apiadminfalse53296"00 VIEW invoiceCOMMENTCOMMENT ON VIEW invoice IS ' This view can be used as an interface to import Invioce Header data directly into the system. Required fields will be checked and default values will be populated'; apiadminfalse785"00invoiceACLREVOKE ALL ON TABLE invoice FROM PUBLIC; REVOKE ALL ON TABLE invoice FROM admin; GRANT ALL ON TABLE invoice TO admin; GRANT ALL ON TABLE invoice TO xtrole; apiadminfalse78512552006114insertinvoice(api.invoice)FUNCTIONCREATE FUNCTION insertinvoice(api.invoice) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; BEGIN -- NOTE: (SELECT getCustId(...)) seems redundant, but it actually produces -- a HUGE performance increase because it makes the Postgres query planner -- use an index scan rather than an sequential table scan on cust_id INSERT INTO invchead ( invchead_invcnumber, invchead_ordernumber, invchead_invcdate, invchead_shipdate, invchead_orderdate, invchead_printed, invchead_posted, invchead_salesrep_id, invchead_commission, invchead_taxzone_id, invchead_terms_id, invchead_cust_id, invchead_billto_name, invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, invchead_billto_city, invchead_billto_state, invchead_billto_zipcode, invchead_billto_country, invchead_billto_phone, invchead_shipto_id, invchead_shipto_name, invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode, invchead_shipto_country, invchead_shipto_phone, invchead_ponumber, invchead_shipvia, invchead_prj_id, invchead_fob, invchead_misc_descrip, invchead_misc_amount, invchead_misc_accnt_id, invchead_freight, invchead_curr_id, invchead_payment, invchead_notes, invchead_saletype_id, invchead_shipzone_id ) SELECT (CASE -- use a case here so we don't unnecessarily fetch a new invoice number WHEN pNew.invoice_number IS NULL THEN CAST(fetchInvcNumber() AS TEXT) WHEN pNew.invoice_number = '' THEN CAST(fetchInvcNumber() AS TEXT) ELSE pNew.invoice_number END), pNew.order_number, COALESCE(pNew.invoice_date, CURRENT_DATE), pNew.ship_date, pNew.order_date, FALSE, FALSE, COALESCE(getSalesRepId(pNew.sales_rep),shipto_salesrep_id,cust_salesrep_id), COALESCE(pNew.commission, 0), CASE WHEN pNew.tax_zone = 'None' THEN NULL ELSE COALESCE(getTaxZoneId(pNew.tax_zone),shipto_taxzone_id,cust_taxzone_id) END, COALESCE(getTermsId(pNew.terms),cust_terms_id), (SELECT getCustId(pNew.customer_number)), COALESCE(pNew.billto_name, cohead_billtoname, cust_name), COALESCE(pNew.billto_address1, cohead_billtoaddress1, addr_line1), COALESCE(pNew.billto_address2, cohead_billtoaddress2, addr_line2), COALESCE(pNew.billto_address3, cohead_billtoaddress3, addr_line3), COALESCE(pNew.billto_city, cohead_billtocity, addr_city), COALESCE(pNew.billto_state, cohead_billtostate, addr_state), COALESCE(pNew.billto_postal_code, cohead_billtozipcode, addr_postalcode), COALESCE(pNew.billto_country, cohead_billtocountry, addr_country), COALESCE(pNew.billto_phone, ''), COALESCE(shipto_id,-1), pNew.shipto_name, pNew.shipto_address1, pNew.shipto_address2, pNew.shipto_address3, pNew.shipto_city, pNew.shipto_state, pNew.shipto_postal_code, pNew.shipto_country, pNew.shipto_phone, COALESCE(pNew.po_number, ''), COALESCE(pNew.ship_via,shipto_shipvia,cust_shipvia), COALESCE(getPrjId(pNew.project_number),-1), COALESCE(pNew.fob,fetchDefaultFob(( SELECT CAST(usrpref_value AS INTEGER) FROM usrpref, whsinfo WHERE ((warehous_id=CAST(usrpref_value AS INTEGER)) AND (warehous_shipping) AND (warehous_active) AND (usrpref_username=getEffectiveXtUser()) AND (usrpref_name='PreferredWarehouse') ) ))), pNew.misc_charge_description, COALESCE(pNew.misc_charge, 0), COALESCE(getGlAccntId(pNew.misc_charge_account_number),-1), COALESCE(pNew.freight, 0), COALESCE(getCurrId(pNew.currency),( SELECT cust_curr_id FROM custinfo WHERE (cust_id=(SELECT getCustId(pNew.customer_number))) ),basecurrid()), COALESCE(pNew.payment,0), COALESCE(pNew.notes,''), getSaleTypeId(pNew.sale_type), getShipZoneId(pNew.shipto_shipzone) FROM custinfo LEFT OUTER JOIN shiptoinfo ON (shipto_id=(SELECT CASE WHEN getShiptoId(pNew.customer_number,pNew.shipto_number) IS NOT NULL THEN getShiptoId(pNew.customer_number,pNew.shipto_number) ELSE (SELECT shipto_id FROM shiptoinfo WHERE shipto_cust_id=cust_id AND shipto_default) END)) LEFT OUTER JOIN cohead ON (cohead_number=pNEW.order_number) LEFT OUTER JOIN cntct ON (cntct_id=cust_cntct_id) LEFT OUTER JOIN addr ON (addr_id=cntct_addr_id) WHERE cust_id = (SELECT getCustId(pNew.customer_number)); RETURN TRUE; END; $_$; 1DROP FUNCTION public.insertinvoice(api.invoice); publicadminfalse83992287412591682865invcitemTABLEMCREATE TABLE invcitem ( invcitem_id integer NOT NULL, invcitem_invchead_id integer NOT NULL, invcitem_linenumber integer, invcitem_item_id integer, invcitem_warehous_id integer DEFAULT (-1), invcitem_custpn text, invcitem_number text, invcitem_descrip text, invcitem_ordered numeric(20,6) NOT NULL, invcitem_billed numeric(20,6) NOT NULL, invcitem_custprice numeric(20,4), invcitem_price numeric(20,4) NOT NULL, invcitem_notes text, invcitem_salescat_id integer, invcitem_taxtype_id integer, invcitem_qty_uom_id integer, invcitem_qty_invuomratio numeric(20,10) NOT NULL, invcitem_price_uom_id integer, invcitem_price_invuomratio numeric(20,10) NOT NULL, invcitem_coitem_id integer, invcitem_updateinv boolean DEFAULT false, invcitem_rev_accnt_id integer ); DROP TABLE public.invcitem; publicadminfalse589758988"00TABLE invcitemCOMMENT>COMMENT ON TABLE invcitem IS 'Invoice Line Item information'; publicadminfalse175"00invcitemACLREVOKE ALL ON TABLE invcitem FROM PUBLIC; REVOKE ALL ON TABLE invcitem FROM admin; GRANT ALL ON TABLE invcitem TO admin; GRANT ALL ON TABLE invcitem TO xtrole; publicadminfalse17512592006119 invoicelineVIEWCREATE VIEW invoiceline AS SELECT invchead.invchead_invcnumber AS invoice_number, invcitem.invcitem_linenumber AS line_number, item.item_number, invcitem.invcitem_number AS misc_item_number, whsinfo.warehous_code AS site, invcitem.invcitem_descrip AS misc_item_description, salescat.salescat_name AS sales_category, invcitem.invcitem_custpn AS customer_part_number, invcitem.invcitem_ordered AS qty_ordered, invcitem.invcitem_billed AS qty_billed, invcitem.invcitem_updateinv AS update_inventory, invcitem.invcitem_price AS net_unit_price, COALESCE(taxtype.taxtype_name, 'None'::text) AS tax_type, COALESCE(qty_uom.uom_name, 'None'::text) AS qty_uom, COALESCE(price_uom.uom_name, 'None'::text) AS price_uom, invcitem.invcitem_notes AS notes, CASE WHEN (invcitem.invcitem_rev_accnt_id IS NOT NULL) THEN public.formatglaccount(invcitem.invcitem_rev_accnt_id) ELSE NULL::text END AS alternate_rev_account FROM (((((((public.invcitem LEFT JOIN public.invchead ON ((invcitem.invcitem_invchead_id = invchead.invchead_id))) LEFT JOIN public.item ON ((item.item_id = invcitem.invcitem_item_id))) LEFT JOIN public.whsinfo ON ((invcitem.invcitem_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.salescat ON ((salescat.salescat_id = invcitem.invcitem_salescat_id))) LEFT JOIN public.taxtype ON ((taxtype.taxtype_id = invcitem.invcitem_taxtype_id))) LEFT JOIN public.uom qty_uom ON ((qty_uom.uom_id = invcitem.invcitem_qty_uom_id))) LEFT JOIN public.uom price_uom ON ((price_uom.uom_id = invcitem.invcitem_price_uom_id))); DROP VIEW api.invoiceline; apiadminfalse53336 "00VIEW invoicelineCOMMENTCOMMENT ON VIEW invoiceline IS ' This view can be used as an interface to import Invoice Line Items data directly into the system. Required fields will be checked and default values will be populated'; apiadminfalse786 "00 invoicelineACLREVOKE ALL ON TABLE invoiceline FROM PUBLIC; REVOKE ALL ON TABLE invoiceline FROM admin; GRANT ALL ON TABLE invoiceline TO admin; GRANT ALL ON TABLE invoiceline TO xtrole; apiadminfalse78612552006124&insertinvoicelineitem(api.invoiceline)FUNCTION CREATE FUNCTION insertinvoicelineitem(api.invoiceline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; _r RECORD; BEGIN INSERT INTO invcitem ( invcitem_invchead_id, invcitem_linenumber, invcitem_item_id, invcitem_warehous_id, invcitem_custpn, invcitem_number, invcitem_descrip, invcitem_ordered, invcitem_billed, invcitem_updateinv, invcitem_custprice, invcitem_price, invcitem_notes, invcitem_salescat_id, invcitem_taxtype_id, invcitem_qty_uom_id, invcitem_qty_invuomratio, invcitem_price_uom_id, invcitem_price_invuomratio, invcitem_rev_accnt_id ) SELECT invchead_id, COALESCE(pNew.line_number,( SELECT (COALESCE(MAX(invcitem_linenumber), 0) + 1) FROM invcitem WHERE (invcitem_invchead_id=invchead_id) )), COALESCE(item_id, -1), COALESCE(getwarehousid(pNew.site,'ALL'),-1), pNew.customer_part_number, (CASE WHEN item_id IS NULL THEN pNew.misc_item_number ELSE NULL END), (CASE WHEN item_id IS NULL THEN pNew.misc_item_description ELSE NULL END), pNew.qty_ordered, COALESCE(pNew.qty_billed, 0), COALESCE(pNew.update_inventory,FALSE), 0, -- invcitem_custprice COALESCE(pNew.net_unit_price,itemPrice(item_id,invchead_cust_id, invchead_shipto_id,pNew.qty_ordered,invchead_curr_id,invchead_orderdate)), COALESCE(pNew.notes,''), CASE WHEN item_id IS NULL THEN (SELECT salescat_id FROM salescat WHERE salescat_name = pNew.sales_category) ELSE NULL END, taxtype_id, CASE WHEN item_id IS NOT NULL THEN COALESCE((SELECT uom_id FROM uom WHERE (uom_name=pNew.qty_uom)), item_price_uom_id) ELSE NULL END, CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.qty_uom),item_price_uom_id), item_price_uom_id ) ELSE 1 END, CASE WHEN item_id IS NOT NULL THEN COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.price_uom),item_price_uom_id) ELSE NULL END, CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.price_uom),item_price_uom_id), item_price_uom_id ) ELSE 1 END, getGlAccntId(pNew.alternate_rev_account) FROM invchead LEFT OUTER JOIN item ON (item_id=getItemId(pNew.item_number)) LEFT OUTER JOIN taxtype ON (taxtype_id=CASE WHEN pNew.tax_type IS NULL THEN getItemTaxType(item_id,invchead_taxzone_id) WHEN pNew.tax_type = 'None' THEN NULL ELSE (SELECT taxtype_id FROM taxtype WHERE taxtype_name=pNew.tax_type) END) WHERE (invchead_invcnumber=pNew.invoice_number) AND (invchead_posted=FALSE); RETURN TRUE; END; $_$; =DROP FUNCTION public.insertinvoicelineitem(api.invoiceline); publicadminfalse839922876v12551682879;insertitemcost(integer, integer, integer, numeric, boolean)FUNCTION7 CREATE FUNCTION insertitemcost(integer, integer, integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pCostElemId ALIAS FOR $2; pCurrId ALIAS FOR $3; pCost ALIAS FOR $4; pPostToStandard ALIAS FOR $5; _itemcost_id INTEGER; _update_return INTEGER; _postcost_return BOOLEAN; --This function is used with the api.itemcost View for updating and inserting --into the itemcosts table BEGIN IF (pCost IS NULL OR pCost < 0) THEN RAISE EXCEPTION 'itemcost Actual Cost Invalid ', pCost; END IF; -- Check for uniqueness SELECT itemcost_id INTO _itemcost_id FROM itemcost WHERE ( (itemcost_item_id = pItemId) AND (itemcost_costelem_id = pCostElemId) AND (NOT itemcost_lowlevel) ); IF (FOUND) THEN RAISE EXCEPTION 'itemcost already exists for this Item and Cost Element'; END IF; -- Check for valid combination of item_type and costelem_type IF (SELECT (COUNT(*) > 0) FROM item, costelem WHERE (item_id=pItemId) AND (costelem_id=pCostElemId) AND (item_type IN ('M', 'F', 'B', 'C', 'T')) AND (costelem_type IN ('Material'))) THEN RAISE EXCEPTION 'itemcost of this type is invalid for Manufactured Item'; END IF; IF (SELECT (COUNT(*) > 0) FROM item, costelem WHERE (item_id=pItemId) AND (costelem_id=pCostElemId) AND (item_type IN ('O', 'P')) AND (costelem_type IN ('Direct Labor', 'Overhead', 'Machine Overhead'))) THEN RAISE EXCEPTION 'itemcost of this type is invalid for Purchased Item'; END IF; IF (pCost > 0) THEN SELECT NEXTVAL('itemcost_itemcost_id_seq') INTO _itemcost_id; INSERT INTO itemcost ( itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id ) VALUES ( _itemcost_id, pItemId, pCostElemId, FALSE, 0, startOfTime(), pCost, CURRENT_DATE, pCurrId ); --Only Post Cost to standard if the parameter is set to true IF (pPostToStandard) THEN IF (NOT checkPrivilege('PostStandardCosts')) THEN RAISE EXCEPTION 'You do not have privileges to poststandard itemcosts. Set api.itemcost post_to_standard to false'; END IF; SELECT postcost(_itemcost_id) INTO _postcost_return; IF (NOT _postcost_return) THEN RETURN -2; END IF; END IF; ELSE RETURN -1; END IF; RETURN _itemcost_id; END; $_$; RDROP FUNCTION public.insertitemcost(integer, integer, integer, numeric, boolean); publicadminfalse8399212551682947insertsalesline(api.salesline)FUNCTION CREATE FUNCTION insertsalesline(api.salesline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNEW ALIAS FOR $1; _r RECORD; BEGIN IF (NOT EXISTS (SELECT cohead_id FROM cohead WHERE cohead_number=pNEW.order_number)) THEN RAISE EXCEPTION 'Function insertSalesLine failed because Sales Order % not found', pNEW.order_number; END IF; IF (NOT EXISTS (SELECT item_id FROM item WHERE item_number=pNEW.item_number)) THEN RAISE EXCEPTION 'Function insertSalesLine failed because Item Number % not found', pNEW.item_number; END IF; SELECT * INTO _r FROM cohead, itemsite, item, whsinfo WHERE ((cohead_number=pNEW.order_number) AND (itemsite_warehous_id=warehous_id AND (itemsite_item_id=item_id) AND (itemsite_active) AND (item_number=pNEW.item_number) AND (warehous_active) AND (warehous_id=COALESCE(getWarehousId(pNEW.sold_from_site,'ALL'),cohead_warehous_id,fetchprefwarehousid())))); IF (NOT FOUND) THEN RAISE EXCEPTION 'Function insertSalesLine failed with unknown failure to retrieve Sales Order'; END IF; INSERT INTO coitem ( coitem_cohead_id, coitem_linenumber, coitem_itemsite_id, coitem_status, coitem_scheddate, coitem_promdate, coitem_qtyord, coitem_qty_uom_id, coitem_qty_invuomratio, coitem_qtyshipped, coitem_unitcost, coitem_price, coitem_price_uom_id, coitem_price_invuomratio, coitem_custprice, coitem_order_id, coitem_memo, coitem_imported, coitem_qtyreturned, coitem_custpn, coitem_order_type, coitem_substitute_item_id, coitem_prcost, coitem_taxtype_id, coitem_warranty, coitem_cos_accnt_id, coitem_rev_accnt_id) VALUES ( _r.cohead_id, pNEW.line_number::INTEGER, _r.itemsite_id, pNEW.status, pNEW.scheduled_date, pNEW.promise_date, pNEW.qty_ordered, COALESCE(getUomId(pNEW.qty_uom),_r.item_inv_uom_id), itemuomtouomratio(_r.item_id,COALESCE(getUomId(pNEW.qty_uom),_r.item_inv_uom_id),_r.item_inv_uom_id), 0, stdCost(_r.item_id), COALESCE(pNEW.net_unit_price,itemPrice(_r.item_id,_r.cohead_cust_id, _r.cohead_shipto_id,pNEW.qty_ordered,_r.cohead_curr_id,_r.cohead_orderdate)), COALESCE(getUomId(pNEW.price_uom),_r.item_price_uom_id), itemuomtouomratio(_r.item_id,COALESCE(getUomId(pNEW.price_uom),_r.item_price_uom_id),_r.item_price_uom_id), itemPrice(_r.item_id,_r.cohead_cust_id,_r.cohead_shipto_id,pNEW.qty_ordered,_r.cohead_curr_id,_r.cohead_orderdate), -1, pNEW.notes, true, 0, pNEW.customer_pn, CASE WHEN ((pNEW.create_order AND (_r.item_type = 'M')) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createwo)) THEN 'W' WHEN ((pNEW.create_order AND (_r.item_type = 'P')) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createsopr)) THEN 'R' WHEN ((pNEW.create_order AND (_r.item_type = 'P') AND (_r.itemsite_createsopo)) OR ((pNEW.create_order IS NULL) AND _r.itemsite_createsopo)) THEN 'P' END, getitemid(pNEW.substitute_for), pNEW.overwrite_po_price, COALESCE(getTaxTypeId(pNEW.tax_type), getItemTaxType(_r.itemsite_item_id, _r.cohead_taxzone_id)), pNEW.warranty, getGlAccntId(pNEW.alternate_cos_account), getGlAccntId(pNEW.alternate_rev_account) ); RETURN TRUE; END; $_$; 5DROP FUNCTION public.insertsalesline(api.salesline); publicadminfalse827243992w12551682948intervaltominutes(interval)FUNCTIONCREATE FUNCTION intervaltominutes(interval) RETURNS numeric LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT (EXTRACT(DAY FROM $1) * 24 * 60 + EXTRACT(HOUR FROM $1) * 60 + EXTRACT(MINUTE FROM $1) + ROUND((EXTRACT(SECOND FROM $1) / 60)::NUMERIC, 4))::NUMERIC AS result $_$; 2DROP FUNCTION public.intervaltominutes(interval); publicadminfalse8}12551682949+invadjustment(integer, numeric, text, text)FUNCTION=CREATE FUNCTION invadjustment(integer, numeric, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invAdjustment($1, $2, $3, $4, CURRENT_TIMESTAMP, NULL); END; $_$; BDROP FUNCTION public.invadjustment(integer, numeric, text, text); publicadminfalse83992x12551682950Einvadjustment(integer, numeric, text, text, timestamp with time zone)FUNCTIONHCREATE FUNCTION invadjustment(integer, numeric, text, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invAdjustment($1, $2, $3, $4, $5, NULL); END; $_$; \DROP FUNCTION public.invadjustment(integer, numeric, text, text, timestamp with time zone); publicadminfalse83992y12551682951Ninvadjustment(integer, numeric, text, text, timestamp with time zone, numeric)FUNCTIONCREATE FUNCTION invadjustment(integer, numeric, text, text, timestamp with time zone, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pDocumentNumber ALIAS FOR $3; pComments ALIAS FOR $4; pGlDistTS ALIAS FOR $5; pCostValue ALIAS FOR $6; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; SELECT postInvTrans( itemsite_id, 'AD', pQty, 'I/M', 'AD', pDocumentNumber, '', ('Miscellaneous Adjustment for item ' || item_number || E'\n' || pComments), costcat_asset_accnt_id, costcat_adjustment_accnt_id, _itemlocSeries, pGlDistTS, pCostValue) INTO _invhistid FROM itemsite, item, costcat WHERE ( (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) ); RETURN _itemlocSeries; END; $_$; eDROP FUNCTION public.invadjustment(integer, numeric, text, text, timestamp with time zone, numeric); publicadminfalse83992{12551682952Tinvexpense(integer, numeric, integer, text, text, timestamp with time zone, integer)FUNCTIONCREATE FUNCTION invexpense(pitemsiteid integer, pqty numeric, pexpcatid integer, pdocumentnumber text, pcomments text, pgldistts timestamp with time zone DEFAULT now(), pprjid integer DEFAULT NULL::integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; SELECT postInvTrans( itemsite_id, 'EX', pQty, 'I/M', 'EX', pDocumentNumber, '', CASE WHEN (pQty < 0) THEN ('Reverse Material Expense for item ' || item_number || E'\n' || pComments) ELSE ('Material Expense for item ' || item_number || E'\n' || pComments) END, getPrjAccntId(pPrjid, expcat_exp_accnt_id), costcat_asset_accnt_id, _itemlocSeries, pGlDistTS) INTO _invhistid FROM itemsite, item, costcat, expcat WHERE ( (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) AND (expcat_id=pExpcatid) ); INSERT INTO invhistexpcat (invhistexpcat_invhist_id, invhistexpcat_expcat_id) VALUES (_invhistid, pExpcatid); RETURN _itemlocSeries; END; $$; DROP FUNCTION public.invexpense(pitemsiteid integer, pqty numeric, pexpcatid integer, pdocumentnumber text, pcomments text, pgldistts timestamp with time zone, pprjid integer); publicadminfalse83992|12551682953invhistsense(integer)FUNCTIONCREATE FUNCTION invhistsense(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvhistId ALIAS FOR $1; _count INTEGER; _row RECORD; _sense INTEGER; BEGIN SELECT invhist_transtype, invhist_ordnumber, itemsite_warehous_id INTO _row FROM invhist JOIN itemsite ON (itemsite_id=invhist_itemsite_id) WHERE (invhist_id=pInvhistId); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count = 0) THEN RAISE EXCEPTION 'Record not found for invhist_id=%',pInvhistId; END IF; -- increase inventory: AD RM RT RP RR RS RX RB TR -- decrease inventory: IM IB IT SH SI EX RI -- TS and TR are special: shipShipment and recallShipment should not change -- QOH at the Transfer Order src whs (as this was done by issueToShipping) -- but postReceipt should change QOH at the transit whs IF (_row.invhist_transtype='TS') THEN _sense := CASE WHEN (SELECT tohead_trns_warehous_id=_row.itemsite_warehous_id FROM tohead WHERE (tohead_number=_row.invhist_ordnumber)) THEN -1 ELSE 0 END; ELSIF (_row.invhist_transtype='TR') THEN _sense := CASE WHEN (SELECT tohead_src_warehous_id=_row.itemsite_warehous_id FROM tohead WHERE (tohead_number=_row.invhist_ordnumber)) THEN 0 ELSE 1 END; ELSIF (_row.invhist_transtype IN ('IM', 'IB', 'IT', 'SH', 'SI', 'EX', 'RI')) THEN _sense := -1; ELSE _sense := 1; END IF; RETURN _sense; END; $_$; ,DROP FUNCTION public.invhistsense(integer); publicadminfalse83992r12551682954 invhisttrig()FUNCTIONCREATE FUNCTION invhisttrig() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN -- Need to allow 'temporary' negative for average costed item that has been frozen. -- Check at itemsite after all of the transactions have been thawed will ensure -- that final Qty On Hand is positive. -- IF (NEW.invhist_qoh_after < 0 AND NEW.invhist_costmethod = 'A') THEN -- RAISE EXCEPTION 'Invhist (%) is recording with average costing and is not allowed to have a negative quantity on hand.', NEW.invhist_id; -- END IF; IF ( ( SELECT itemsite_freeze FROM itemsite WHERE (itemsite_id=NEW.invhist_itemsite_id) ) ) THEN NEW.invhist_posted = FALSE; END IF; -- never change the created timestamp, which defaults to CURRENT_TIMESTAMP IF (TG_OP != 'INSERT') THEN NEW.invhist_created = OLD.invhist_created; ELSE -- Always need a series id for distribution posting IF (NEW.invhist_series IS NULL) THEN RAISE EXCEPTION 'Column invhist_series may not be null.'; END IF; END IF; RETURN NEW; END; $$; $DROP FUNCTION public.invhisttrig(); publicadminfalse83992}12551682955invoicetotal(integer)FUNCTION CREATE FUNCTION invoicetotal(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvoiceId ALIAS FOR $1; _linesum NUMERIC; _linetax NUMERIC; _result NUMERIC; _allocated NUMERIC; _posted BOOLEAN; BEGIN SELECT SUM(ROUND(COALESCE((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / COALESCE(invcitem_price_invuomratio,1)), 0),2)) INTO _linesum FROM invcitem WHERE (invcitem_invchead_id=pInvoiceId); -- TODO: why sum on the result of select round(sum(), 2)? SELECT SUM(tax) INTO _linetax FROM (SELECT ROUND(SUM(COALESCE(taxdetail_tax, 0)),2) AS tax FROM tax JOIN calculateTaxDetailSummary('I', pInvoiceId, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id) AS data; SELECT noNeg(invchead_freight + invchead_misc_amount + COALESCE(_linetax, 0) + COALESCE(_linesum, 0)), invchead_posted INTO _result, _posted FROM invchead WHERE (invchead_id=pInvoiceId); IF NOT FOUND THEN RETURN 0; END IF; IF (_posted) THEN SELECT COALESCE(SUM(currToCurr(arapply_curr_id, aropen_curr_id, arapply_applied, aropen_docdate)),0) INTO _allocated FROM arapply, aropen, invchead WHERE ( (invchead_posted) AND (invchead_id=pInvoiceId) AND (aropen_docnumber=invchead_invcnumber) AND (aropen_doctype='I') AND (arapply_target_aropen_id=aropen_id) AND (arapply_reftype='S') AND (invchead_posted) ) ; ELSE SELECT COALESCE(SUM(CASE WHEN((aropen_amount - aropen_paid) >= currToCurr(aropenalloc_curr_id, aropen_curr_id, aropenalloc_amount, aropen_docdate)) THEN currToCurr(aropenalloc_curr_id, invchead_curr_id, aropenalloc_amount, aropen_docdate) ELSE currToCurr(aropen_curr_id, invchead_curr_id, aropen_amount - aropen_paid, aropen_docdate) END),0) INTO _allocated FROM invchead LEFT OUTER JOIN cohead ON (cohead_number=invchead_ordernumber) JOIN aropenalloc ON ((aropenalloc_doctype='I' AND aropenalloc_doc_id=invchead_id) OR (aropenalloc_doctype='S' AND aropenalloc_doc_id=cohead_id)) JOIN aropen ON (aropen_id=aropenalloc_aropen_id AND (aropen_amount - aropen_paid) > 0.0) WHERE ( (NOT invchead_posted) AND (invchead_id=pInvoiceId) ); END IF; RETURN _result - COALESCE(_allocated, 0); END; $_$; ,DROP FUNCTION public.invoicetotal(integer); publicadminfalse83992~12551682956.invreceipt(integer, numeric, text, text, text)FUNCTIONACREATE FUNCTION invreceipt(integer, numeric, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invReceipt($1, $2, $3, $4, $5, CURRENT_TIMESTAMP, NULL); END; $_$; EDROP FUNCTION public.invreceipt(integer, numeric, text, text, text); publicadminfalse8399212551682957Hinvreceipt(integer, numeric, text, text, text, timestamp with time zone)FUNCTIONLCREATE FUNCTION invreceipt(integer, numeric, text, text, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invReceipt($1, $2, $3, $4, $5, $6, NULL); END; $_$; _DROP FUNCTION public.invreceipt(integer, numeric, text, text, text, timestamp with time zone); publicadminfalse8399212551682958Qinvreceipt(integer, numeric, text, text, text, timestamp with time zone, numeric)FUNCTION|CREATE FUNCTION invreceipt(integer, numeric, text, text, text, timestamp with time zone, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pOrdernumber ALIAS FOR $3; pDocumentNumber ALIAS FOR $4; pComments ALIAS FOR $5; pGlDistTS ALIAS FOR $6; pCostValue ALIAS FOR $7; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; SELECT postInvTrans( itemsite_id, 'RX', pQty, 'I/M', 'RX', pDocumentNumber, '', ('Miscellaneous Receipt for item ' || item_number || E'\n' || pComments), costcat_asset_accnt_id, costcat_liability_accnt_id, _itemlocSeries, pGlDistTS, pCostValue) INTO _invhistid FROM itemsite, item, costcat WHERE ( (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) ); RETURN _itemlocSeries; END; $_$; hDROP FUNCTION public.invreceipt(integer, numeric, text, text, text, timestamp with time zone, numeric); publicadminfalse83992Q12551682959&invscrap(integer, numeric, text, text)FUNCTION-CREATE FUNCTION invscrap(integer, numeric, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invScrap($1, $2, $3, $4, CURRENT_TIMESTAMP); END; $_$; =DROP FUNCTION public.invscrap(integer, numeric, text, text); publicadminfalse83992R12551682960@invscrap(integer, numeric, text, text, timestamp with time zone)FUNCTION>CREATE FUNCTION invscrap(integer, numeric, text, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invScrap($1, $2, $3, $4, $5, NULL); END; $_$; WDROP FUNCTION public.invscrap(integer, numeric, text, text, timestamp with time zone); publicadminfalse8399212551682961Iinvscrap(integer, numeric, text, text, timestamp with time zone, integer)FUNCTIONKCREATE FUNCTION invscrap(integer, numeric, text, text, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN invScrap($1, $2, $3, $4, $5, $6, NULL); END; $_$; `DROP FUNCTION public.invscrap(integer, numeric, text, text, timestamp with time zone, integer); publicadminfalse8399212551682962Rinvscrap(integer, numeric, text, text, timestamp with time zone, integer, integer)FUNCTIONCREATE FUNCTION invscrap(integer, numeric, text, text, timestamp with time zone, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pDocumentNumber ALIAS FOR $3; pComments ALIAS FOR $4; pGlDistTS ALIAS FOR $5; pInvHistId ALIAS FOR $6; pPrjid ALIAS FOR $7; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; IF (pInvHistId IS NOT NULL) THEN SELECT invhist_series INTO _itemlocSeries FROM invhist WHERE invhist_id=pInvHistId; ELSE SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( itemsite_id, 'SI', pQty, 'I/M', 'SI', pDocumentNumber, '', CASE WHEN (pQty < 0) THEN ('Reverse Material Scrap for item ' || item_number || E'\n' || pComments) ELSE ('Material Scrap for item ' || item_number || E'\n' || pComments) END, getPrjAccntId(pPrjid, costcat_scrap_accnt_id), costcat_asset_accnt_id, _itemlocSeries, pGlDistTS, NULL, pInvHistId) INTO _invhistid FROM itemsite, item, costcat WHERE ( (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) ); RETURN _itemlocSeries; END; $_$; iDROP FUNCTION public.invscrap(integer, numeric, text, text, timestamp with time zone, integer, integer); publicadminfalse8399212551745036 isdba(text)FUNCTIONCREATE FUNCTION isdba(text DEFAULT NULL::text) RETURNS boolean LANGUAGE sql AS $_$ SELECT (datdba=pg_roles.oid OR rolsuper) AS issuper FROM pg_database, pg_roles WHERE ((datname=current_database()) AND (rolname=COALESCE($1, getEffectiveXtUser()))); $_$; "DROP FUNCTION public.isdba(text); publicadminfalse812551682963 ismulticurr()FUNCTION#CREATE FUNCTION ismulticurr() RETURNS boolean LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN (SELECT (count(*) > 1) FROM curr_symbol); END; $$; $DROP FUNCTION public.ismulticurr(); publicadminfalse8399212551682964isnumeric(text)FUNCTIONvCREATE FUNCTION isnumeric(text) RETURNS boolean LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pText ALIAS FOR $1; _cursor INTEGER; BEGIN IF ( (LENGTH(pText) = 0) OR (pText IS NULL) ) THEN RETURN FALSE; END IF; FOR _cursor IN 1..LENGTH(pText) LOOP IF (SUBSTRING(pText FROM _cursor FOR 1) NOT IN ( '0', '1', '2', '3', '4', '5' ,'6' ,'7' ,'8' ,'9' )) THEN RETURN FALSE; END IF; END LOOP; RETURN TRUE; END; $_$; &DROP FUNCTION public.isnumeric(text); publicadminfalse83992v12551682965"issueallbalancetoshipping(integer)FUNCTION*CREATE FUNCTION issueallbalancetoshipping(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueAllBalanceToShipping('SO', $1, 0, NULL); END; $_$; 9DROP FUNCTION public.issueallbalancetoshipping(integer); publicadminfalse8399212551682966Kissueallbalancetoshipping(text, integer, integer, timestamp with time zone)FUNCTION1CREATE FUNCTION issueallbalancetoshipping(text, integer, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; pheadid ALIAS FOR $2; _itemlocSeries INTEGER := $3; _timestamp TIMESTAMP WITH TIME ZONE := $4; _s RECORD; BEGIN IF (pordertype = 'SO') THEN FOR _s IN SELECT coitem_id, noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ( (shipitem_orderitem_id=coitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) AND (shiphead_order_type=pordertype) ) ) ) AS balance FROM coitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id)) ON (coitem_itemsite_id=itemsite_id) WHERE ( (coitem_status NOT IN ('C','X')) AND (item_type != 'K') AND (coitem_cohead_id=pheadid) ) LOOP IF (_s.balance <> 0) THEN _itemlocSeries := issueToShipping(pordertype, _s.coitem_id, _s.balance, _itemlocSeries, _timestamp); IF (_itemlocSeries < 0) THEN EXIT; END IF; END IF; END LOOP; ELSEIF (pordertype = 'TO') THEN FOR _s IN SELECT toitem_id, noNeg( toitem_qty_ordered - toitem_qty_shipped - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ( (shipitem_orderitem_id=toitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) AND (shiphead_order_type=pordertype) ) ) ) AS balance FROM toitem WHERE ( (toitem_status NOT IN ('C','X')) AND (toitem_tohead_id=pheadid) ) LOOP IF (_s.balance <> 0) THEN _itemlocSeries := issueToShipping(pordertype, _s.toitem_id, _s.balance, _itemlocSeries, _timestamp); IF (_itemlocSeries < 0) THEN EXIT; END IF; END IF; END LOOP; ELSE RETURN -1; END IF; RETURN _itemlocSeries; END; $_$; bDROP FUNCTION public.issueallbalancetoshipping(text, integer, integer, timestamp with time zone); publicadminfalse8399212551682967#issuelinebalancetoshipping(integer)FUNCTION)CREATE FUNCTION issuelinebalancetoshipping(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueLineBalanceToShipping('SO', $1, NULL); END; $_$; :DROP FUNCTION public.issuelinebalancetoshipping(integer); publicadminfalse8399212551682968Cissuelinebalancetoshipping(text, integer, timestamp with time zone)FUNCTIONNCREATE FUNCTION issuelinebalancetoshipping(text, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueLineBalanceToShipping($1, $2, $3, 0, NULL); END; $_$; ZDROP FUNCTION public.issuelinebalancetoshipping(text, integer, timestamp with time zone); publicadminfalse8399212551682969Uissuelinebalancetoshipping(text, integer, timestamp with time zone, integer, integer)FUNCTIONACREATE FUNCTION issuelinebalancetoshipping(text, integer, timestamp with time zone, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; pitemid ALIAS FOR $2; ptimestamp ALIAS FOR $3; pitemlocseries ALIAS FOR $4; pinvhistid ALIAS FOR $5; _itemlocSeries INTEGER := 0; _qty NUMERIC; BEGIN _itemlocSeries := COALESCE(pitemlocseries,0); IF (pordertype = 'SO') THEN SELECT noNeg( coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ((shipitem_orderitem_id=coitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) ) ) ) INTO _qty FROM coitem WHERE (coitem_id=pitemid); ELSEIF (pordertype = 'TO') THEN SELECT noNeg( toitem_qty_ordered - toitem_qty_shipped - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ( (shipitem_orderitem_id=toitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) ) ) ) INTO _qty FROM toitem WHERE (toitem_id=pitemid); ELSE RETURN -1; END IF; IF (_qty > 0) THEN _itemlocSeries := issueToShipping(pordertype, pitemid, _qty, _itemlocSeries, ptimestamp, pinvhistid); END IF; RETURN _itemlocSeries; END; $_$; lDROP FUNCTION public.issuelinebalancetoshipping(text, integer, timestamp with time zone, integer, integer); publicadminfalse83992y12551682970 issues(text)FUNCTIONcCREATE FUNCTION issues(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('IM', 'IB', 'IT')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; #DROP FUNCTION public.issues(text); publicadminfalse8399212551682971!issuetoshipping(integer, numeric)FUNCTION0CREATE FUNCTION issuetoshipping(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueToShipping('SO', $1, $2, 0, CURRENT_TIMESTAMP); END; $_$; 8DROP FUNCTION public.issuetoshipping(integer, numeric); publicadminfalse8399212551682972*issuetoshipping(integer, numeric, integer)FUNCTION:CREATE FUNCTION issuetoshipping(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueToShipping('SO', $1, $2, $3, CURRENT_TIMESTAMP); END; $_$; ADROP FUNCTION public.issuetoshipping(integer, numeric, integer); publicadminfalse8399212551682973Jissuetoshipping(text, integer, numeric, integer, timestamp with time zone)FUNCTIONOCREATE FUNCTION issuetoshipping(text, integer, numeric, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueToShipping($1, $2, $3, $4, $5, NULL); END; $_$; aDROP FUNCTION public.issuetoshipping(text, integer, numeric, integer, timestamp with time zone); publicadminfalse83992T12551682974Sissuetoshipping(text, integer, numeric, integer, timestamp with time zone, integer)FUNCTION"CREATE FUNCTION issuetoshipping(text, integer, numeric, integer, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; pitemid ALIAS FOR $2; pQty ALIAS FOR $3; _itemlocSeries INTEGER := $4; _timestamp TIMESTAMP WITH TIME ZONE := $5; pinvhistid ALIAS FOR $6; _coholdtype TEXT; _invhistid INTEGER; _shipheadid INTEGER; _shipnumber INTEGER; _cntctid INTEGER; _p RECORD; _m RECORD; _value NUMERIC; _warehouseid INTEGER; _shipitemid INTEGER; _freight NUMERIC; BEGIN IF (_timestamp IS NULL) THEN _timestamp := CURRENT_TIMESTAMP; END IF; IF (_itemlocSeries = 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; IF (pordertype = 'SO') THEN -- Check site security SELECT warehous_id INTO _warehouseid FROM coitem,itemsite,site() WHERE ((coitem_id=pitemid) AND (itemsite_id=coitem_itemsite_id) AND (warehous_id=itemsite_warehous_id)); IF (NOT FOUND) THEN RETURN 0; END IF; -- Check for average cost items going negative IF ( SELECT ( (itemsite_costmethod='A') AND ((itemsite_qtyonhand - round(pQty * coitem_qty_invuomratio, 6)) < 0.0) ) FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE (coitem_id=pitemid) ) THEN RETURN -20; END IF; -- Check auto registration IF ( SELECT COALESCE(itemsite_autoreg, FALSE) FROM coitem JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE (coitem_id=pitemid) ) THEN SELECT COALESCE(crmacct_cntct_id_1, -1) INTO _cntctid FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id) JOIN crmacct ON (crmacct_cust_id=cohead_cust_id) WHERE (coitem_id=pitemid); IF (_cntctid = -1) THEN RETURN -15; END IF; END IF; SELECT shiphead_id INTO _shipheadid FROM shiphead, coitem WHERE ((shiphead_order_id=coitem_cohead_id) AND (NOT shiphead_shipped) AND (coitem_id=pitemid) AND (shiphead_order_type=pordertype)); IF (NOT FOUND) THEN SELECT NEXTVAL('shiphead_shiphead_id_seq') INTO _shipheadid; _shipnumber := fetchShipmentNumber(); IF (_shipnumber < 0) THEN RETURN -10; END IF; SELECT cohead_holdtype INTO _coholdtype FROM cohead, coitem WHERE ((cohead_id=coitem_cohead_id) AND (coitem_id=pitemid)); IF (_coholdtype = 'C') THEN RETURN -12; ELSIF (_coholdtype = 'P') THEN RETURN -13; ELSIF (_coholdtype = 'R') THEN RETURN -14; END IF; INSERT INTO shiphead ( shiphead_id, shiphead_number, shiphead_order_id, shiphead_order_type, shiphead_shipped, shiphead_sfstatus, shiphead_shipvia, shiphead_shipchrg_id, shiphead_freight, shiphead_freight_curr_id, shiphead_shipdate, shiphead_notes, shiphead_shipform_id ) SELECT _shipheadid, _shipnumber, coitem_cohead_id, pordertype, FALSE, 'N', cohead_shipvia, CASE WHEN (cohead_shipchrg_id <= 0) THEN NULL ELSE cohead_shipchrg_id END, cohead_freight, cohead_curr_id, _timestamp::DATE, cohead_shipcomments, CASE WHEN cohead_shipform_id = -1 THEN NULL ELSE cohead_shipform_id END FROM cohead, coitem WHERE ((coitem_cohead_id=cohead_id) AND (coitem_id=pitemid) ); UPDATE pack SET pack_shiphead_id = _shipheadid, pack_printed = FALSE FROM coitem WHERE ((pack_head_id=coitem_cohead_id) AND (pack_shiphead_id IS NULL) AND (pack_head_type='SO') AND (coitem_id=pitemid)); ELSE UPDATE pack SET pack_printed = FALSE FROM coitem WHERE ((pack_head_id=coitem_cohead_id) AND (pack_shiphead_id=_shipheadid) AND (pack_head_type='SO') AND (coitem_id=pitemid)); END IF; -- Handle g/l transaction SELECT postInvTrans( itemsite_id, 'SH', (pQty * coitem_qty_invuomratio), 'S/R', porderType, formatSoNumber(coitem_id), shiphead_number, ('Issue ' || item_number || ' to Shipping for customer ' || cohead_billtoname), getPrjAccntId(cohead_prj_id, costcat_shipasset_accnt_id), costcat_asset_accnt_id, _itemlocSeries, _timestamp, NULL, pinvhistid ) INTO _invhistid FROM coitem, cohead, itemsite, item, costcat, shiphead WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (coitem_id=pitemid) AND (shiphead_id=_shipheadid) ); SELECT (invhist_unitcost * invhist_invqty) INTO _value FROM invhist WHERE (invhist_id=_invhistid); _shipitemid := nextval('shipitem_shipitem_id_seq'); INSERT INTO shipitem ( shipitem_id, shipitem_shiphead_id, shipitem_orderitem_id, shipitem_qty, shipitem_transdate, shipitem_trans_username, shipitem_invoiced, shipitem_value, shipitem_invhist_id ) VALUES ( _shipitemid, _shipheadid, pitemid, pQty, _timestamp, getEffectiveXtUser(), FALSE, _value, CASE WHEN _invhistid = -1 THEN NULL ELSE _invhistid END ); -- Handle reservation IF (fetchmetricbool('EnableSOReservations')) THEN -- Remember what was reserved so we can re-reserve if this issue is returned INSERT INTO shipitemrsrv (shipitemrsrv_shipitem_id, shipitemrsrv_qty) SELECT _shipitemid, least(pQty,coitem_qtyreserved) FROM coitem WHERE ((coitem_id=pitemid) AND (coitem_qtyreserved > 0)); -- Update sales order UPDATE coitem SET coitem_qtyreserved = noNeg(coitem_qtyreserved - pQty) WHERE(coitem_id=pitemid); END IF; -- Calculate shipment freight SELECT calcShipFreight(_shipheadid) INTO _freight; UPDATE shiphead SET shiphead_freight=_freight WHERE (shiphead_id=_shipheadid); ELSEIF (pordertype = 'TO') THEN -- Check site security IF (fetchMetricBool('MultiWhs')) THEN SELECT warehous_id INTO _warehouseid FROM toitem, tohead, site() WHERE ( (toitem_id=pitemid) AND (tohead_id=toitem_tohead_id) AND (warehous_id=tohead_src_warehous_id) ); IF (NOT FOUND) THEN RETURN 0; END IF; END IF; SELECT postInvTrans( itemsite_id, 'SH', pQty, 'S/R', pordertype, formatToNumber(toitem_id), '', 'Issue to Shipping', costcat_shipasset_accnt_id, costcat_asset_accnt_id, _itemlocSeries, _timestamp) INTO _invhistid FROM tohead, toitem, itemsite, costcat WHERE ((tohead_id=toitem_tohead_id) AND (itemsite_item_id=toitem_item_id) AND (itemsite_warehous_id=tohead_src_warehous_id) AND (itemsite_costcat_id=costcat_id) AND (toitem_id=pitemid) ); SELECT shiphead_id INTO _shipheadid FROM shiphead, toitem WHERE ((shiphead_order_id=toitem_tohead_id) AND (NOT shiphead_shipped) AND (toitem_id=pitemid) AND (shiphead_order_type=pordertype)); IF (NOT FOUND) THEN _shipheadid := NEXTVAL('shiphead_shiphead_id_seq'); _shipnumber := fetchShipmentNumber(); IF (_shipnumber < 0) THEN RETURN -10; END IF; INSERT INTO shiphead ( shiphead_id, shiphead_number, shiphead_order_id, shiphead_order_type, shiphead_shipped, shiphead_sfstatus, shiphead_shipvia, shiphead_shipchrg_id, shiphead_freight, shiphead_freight_curr_id, shiphead_shipdate, shiphead_notes, shiphead_shipform_id ) SELECT _shipheadid, _shipnumber, tohead_id, pordertype, FALSE, 'N', tohead_shipvia, tohead_shipchrg_id, tohead_freight + SUM(toitem_freight), tohead_freight_curr_id, _timestamp::DATE, tohead_shipcomments, tohead_shipform_id FROM tohead, toitem WHERE ((toitem_tohead_id=tohead_id) AND (tohead_id IN (SELECT toitem_tohead_id FROM toitem WHERE (toitem_id=pitemid))) ) GROUP BY tohead_id, tohead_shipvia, tohead_shipchrg_id, tohead_freight, tohead_freight_curr_id, tohead_shipcomments, tohead_shipform_id; END IF; INSERT INTO shipitem ( shipitem_shiphead_id, shipitem_orderitem_id, shipitem_qty, shipitem_transdate, shipitem_trans_username, shipitem_value, shipitem_invhist_id ) SELECT _shipheadid, pitemid, pQty, _timestamp, getEffectiveXtUser(), invhist_invqty * invhist_unitcost, _invhistid FROM toitem, item, invhist WHERE ((toitem_id=pitemid) AND (item_id=toitem_item_id) AND (invhist_id=_invhistid)); ELSE RETURN -11; END IF; RETURN _itemlocSeries; END; $_$; jDROP FUNCTION public.issuetoshipping(text, integer, numeric, integer, timestamp with time zone, integer); publicadminfalse83992125516829763issuewomaterial(integer, numeric, integer, boolean)FUNCTIONCREATE FUNCTION issuewomaterial(integer, numeric, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; pMarkPush ALIAS FOR $4; _itemlocSeries INTEGER; BEGIN RETURN issueWoMaterial(pWomatlid, pQty, pItemlocSeries,now()); END; $_$; JDROP FUNCTION public.issuewomaterial(integer, numeric, integer, boolean); publicadminfalse8399212551682977*issuewomaterial(integer, numeric, integer)FUNCTIONCREATE FUNCTION issuewomaterial(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; _p RECORD; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN RETURN issueWoMaterial(pWomatlid, pQty, pItemlocSeries, now()); END; $_$; ADROP FUNCTION public.issuewomaterial(integer, numeric, integer); publicadminfalse8399212551682978*issuewomaterial(integer, numeric, boolean)FUNCTIONCREATE FUNCTION issuewomaterial(integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pMarkPush ALIAS FOR $3; _itemlocSeries INTEGER; BEGIN RETURN issueWoMaterial(pWomatlid, pQty, pMarkPush, now()); END; $_$; ADROP FUNCTION public.issuewomaterial(integer, numeric, boolean); publicadminfalse8399212551682979!issuewomaterial(integer, numeric)FUNCTIONCREATE FUNCTION issuewomaterial(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; _itemlocSeries INTEGER; BEGIN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; RETURN issueWoMaterial(pWomatlid, pQty, _itemlocSeries); END; $_$; 8DROP FUNCTION public.issuewomaterial(integer, numeric); publicadminfalse8399212551682980Missuewomaterial(integer, numeric, integer, boolean, timestamp with time zone)FUNCTIONCREATE FUNCTION issuewomaterial(integer, numeric, integer, boolean, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; pMarkPush ALIAS FOR $4; pGlDistTS ALIAS FOR $5; _itemlocSeries INTEGER; BEGIN SELECT issueWoMaterial(pWomatlid, pQty, pItemlocSeries, pGlDistTS) INTO _itemlocSeries; IF (pMarkPush) THEN UPDATE womatl SET womatl_issuemethod='S' WHERE ((womatl_issuemethod='M') AND (womatl_id=pWomatlid)); END IF; RETURN _itemlocSeries; END; $_$; dDROP FUNCTION public.issuewomaterial(integer, numeric, integer, boolean, timestamp with time zone); publicadminfalse8399212551682981Dissuewomaterial(integer, numeric, integer, timestamp with time zone)FUNCTIONECREATE FUNCTION issuewomaterial(integer, numeric, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN issueWoMaterial($1, $2, $3, $4, NULL); END; $_$; [DROP FUNCTION public.issuewomaterial(integer, numeric, integer, timestamp with time zone); publicadminfalse8399212551682982Dissuewomaterial(integer, numeric, boolean, timestamp with time zone)FUNCTIONCREATE FUNCTION issuewomaterial(integer, numeric, boolean, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pMarkPush ALIAS FOR $3; pGlDistTS ALIAS FOR $4; _itemlocSeries INTEGER; BEGIN SELECT issueWoMaterial(pWomatlid, pQty, 0, pGlDistTS) INTO _itemlocSeries; IF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; IF (pMarkPush) THEN UPDATE womatl SET womatl_issuemethod='S' WHERE ((womatl_issuemethod='M') AND (womatl_id=pWomatlid)); END IF; RETURN _itemlocSeries; END; $_$; [DROP FUNCTION public.issuewomaterial(integer, numeric, boolean, timestamp with time zone); publicadminfalse8399212551682983Missuewomaterial(integer, numeric, integer, timestamp with time zone, integer)FUNCTIONs CREATE FUNCTION issuewomaterial(integer, numeric, integer, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; pGlDistTS ALIAS FOR $4; pInvhistid ALIAS FOR $5; _p RECORD; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN SELECT item_id, itemsite_id AS c_itemsite_id, wo_itemsite_id AS p_itemsite_id, itemsite_loccntrl, itemsite_controlmethod, womatl_wo_id, womatl_qtyreq, itemsite_item_id, womatl_uom_id, wo_prj_id, roundQty(item_fractional, itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, pQty)) AS qty, formatWoNumber(wo_id) AS woNumber, CASE WHEN(itemsite_costmethod='J' AND item_type='P' AND poitem_id IS NOT NULL) THEN poitem_unitprice WHEN(itemsite_costmethod IN ('A','J')) THEN avgcost(itemsite_id) WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) ELSE 0.0 END AS cost, womatl_issuemethod AS issueMethod INTO _p FROM womatl JOIN wo ON (wo_id=womatl_wo_id) JOIN itemsite ON (itemsite_id=womatl_itemsite_id) JOIN item ON (item_id=itemsite_item_id) LEFT OUTER JOIN poitem ON (poitem_order_id=womatl_id AND poitem_order_type='W') WHERE (womatl_id=pWomatlid); IF (pQty < 0) THEN RETURN pItemlocSeries; END IF; IF (pItemlocSeries <> 0) THEN _itemlocSeries := pItemlocSeries; ELSE SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( ci.itemsite_id, 'IM', _p.qty, 'W/O', 'WO', _p.woNumber, '', ('Material ' || item_number || ' Issue to Work Order'), getPrjAccntId(_p.wo_prj_id, pc.costcat_wip_accnt_id), cc.costcat_asset_accnt_id, _itemlocSeries, pGlDistTS, NULL, pInvhistid ) INTO _invhistid FROM itemsite AS ci, itemsite AS pi, costcat AS cc, costcat AS pc, item WHERE ( (ci.itemsite_costcat_id=cc.costcat_id) AND (pi.itemsite_costcat_id=pc.costcat_id) AND (ci.itemsite_id=_p.c_itemsite_id) AND (pi.itemsite_id=_p.p_itemsite_id) AND (ci.itemsite_item_id=item_id) ); -- Create linkage to the transaction created IF (_invhistid != -1) THEN INSERT INTO womatlpost (womatlpost_womatl_id,womatlpost_invhist_id) VALUES (pWomatlid,_invhistid); END IF; -- Increase the parent W/O's WIP value by the value of the issued components UPDATE wo SET wo_wipvalue = (wo_wipvalue + (_p.cost * _p.qty)), wo_postedvalue = (wo_postedvalue + (_p.cost * _p.qty)) WHERE (wo_id=_p.womatl_wo_id); UPDATE womatl SET womatl_qtyiss = (womatl_qtyiss + itemuomtouom(_p.itemsite_item_id, NULL, _p.womatl_uom_id, _p.qty)), womatl_lastissue = pGlDistTS::DATE WHERE (womatl_id=pWomatlid); UPDATE wo SET wo_status='I' WHERE ( (wo_status <> 'I') AND (wo_id=_p.womatl_wo_id) ); RETURN _itemlocSeries; END; $_$; dDROP FUNCTION public.issuewomaterial(integer, numeric, integer, timestamp with time zone, integer); publicadminfalse8399212551682984issuewomaterialbatch(integer)FUNCTIONkCREATE FUNCTION issuewomaterialbatch(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; _itemlocSeries INTEGER; _r RECORD; _woNumber TEXT; BEGIN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; FOR _r IN SELECT womatl_id, CASE WHEN (womatl_qtyreq >= 0) THEN roundQty(itemuomfractionalbyuom(item_id, womatl_uom_id), noNeg(womatl_qtyreq - womatl_qtyiss)) ELSE roundQty(itemuomfractionalbyuom(item_id, womatl_uom_id), noNeg(womatl_qtyiss * -1)) END AS qty FROM womatl, itemsite, item WHERE ( (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_issuemethod IN ('S', 'M')) AND (womatl_wo_id=pWoid) ) LOOP IF (_r.qty > 0) THEN SELECT issueWoMaterial(_r.womatl_id, _r.qty, _itemlocSeries, TRUE) INTO _itemlocSeries; END IF; END LOOP; RETURN _itemlocSeries; END; $_$; 4DROP FUNCTION public.issuewomaterialbatch(integer); publicadminfalse8399212551682985itemaltcapinvrat(integer)FUNCTIONGCREATE FUNCTION itemaltcapinvrat(integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMRatioByType(pItemid, 'AltCapacity'); END; $_$; 0DROP FUNCTION public.itemaltcapinvrat(integer); publicadminfalse8399212551682986itemaltcapuom(integer)FUNCTION<CREATE FUNCTION itemaltcapuom(integer) RETURNS text LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMByType(pItemid, 'AltCapacity'); END; $_$; -DROP FUNCTION public.itemaltcapuom(integer); publicadminfalse8399212551682987itemcapinvrat(integer)FUNCTIONACREATE FUNCTION itemcapinvrat(integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMRatioByType(pItemid, 'Capacity'); END; $_$; -DROP FUNCTION public.itemcapinvrat(integer); publicadminfalse8399212551682988itemcapuom(integer)FUNCTION6CREATE FUNCTION itemcapuom(integer) RETURNS text LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMByType(pItemid, 'Capacity'); END; $_$; *DROP FUNCTION public.itemcapuom(integer); publicadminfalse8399212551682989Oitemcharprice(integer, integer, text, integer, integer, numeric, integer, date)FUNCTIONcCREATE FUNCTION itemcharprice(integer, integer, text, integer, integer, numeric, integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pShiptoid ALIAS FOR $5; pQty ALIAS FOR $6; pCurrid ALIAS FOR $7; pEffective ALIAS FOR $8; BEGIN RETURN itemCharPrice(pItemid, pCharid, pCharValue, pCustid, pShiptoid, pQty, pCurrid, CURRENT_DATE, CURRENT_DATE); END; $_$; fDROP FUNCTION public.itemcharprice(integer, integer, text, integer, integer, numeric, integer, date); publicadminfalse83992125516829907itemcharprice(integer, integer, text, integer, numeric)FUNCTIONCREATE FUNCTION itemcharprice(integer, integer, text, integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pQty ALIAS FOR $5; BEGIN RETURN itemCharPrice(pItemid, pCharid, pCharValue, pCustid, -1, pQty, baseCurrId(), CURRENT_DATE); END; $_$; NDROP FUNCTION public.itemcharprice(integer, integer, text, integer, numeric); publicadminfalse8399212551682991@itemcharprice(integer, integer, text, integer, integer, numeric)FUNCTIONCREATE FUNCTION itemcharprice(integer, integer, text, integer, integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pShiptoid ALIAS FOR $5; pQty ALIAS FOR $6; BEGIN RETURN itemCharPrice(pItemid, pCharid, pCharValue, pCustid, pShiptoid, pQty, baseCurrId(), CURRENT_DATE); END; $_$; WDROP FUNCTION public.itemcharprice(integer, integer, text, integer, integer, numeric); publicadminfalse8399212551682992Iitemcharprice(integer, integer, text, integer, integer, numeric, integer)FUNCTION4CREATE FUNCTION itemcharprice(integer, integer, text, integer, integer, numeric, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pShiptoid ALIAS FOR $5; pQty ALIAS FOR $6; pCurrid ALIAS FOR $7; BEGIN RETURN itemCharPrice(pItemid, pCharid, pCharValue, pCustid, pShiptoid, pQty, pCurrid, CURRENT_DATE); END; $_$; `DROP FUNCTION public.itemcharprice(integer, integer, text, integer, integer, numeric, integer); publicadminfalse8399212551682993Uitemcharprice(integer, integer, text, integer, integer, numeric, integer, date, date)FUNCTIONr"CREATE FUNCTION itemcharprice(integer, integer, text, integer, integer, numeric, integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharid ALIAS FOR $2; pCharValue ALIAS FOR $3; pCustid ALIAS FOR $4; pShiptoid ALIAS FOR $5; pQty ALIAS FOR $6; pCurrid ALIAS FOR $7; pEffective ALIAS FOR $8; pAsOf ALIAS FOR $9; _price NUMERIC; _sales NUMERIC; _item RECORD; _iteminvpricerat NUMERIC; BEGIN -- If the charass_value passed in is NULL, we can skip this function IF (pCharValue IS NULL) THEN RETURN 0; END IF; -- Return the itemCharPrice in the currency passed in as pCurrid -- Get a value here so we do not have to call the function several times SELECT iteminvpricerat(pItemid) INTO _iteminvpricerat; -- First get a sales price if any so we when we find other prices -- we can determine if we want that price or this price. -- Check for a Sale Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price - (ipsprice_price * cust_discntprcnt), pEffective) INTO _sales FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, sale, custinfo WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (sale_ipshead_id=ipshead_id) AND (pAsOf BETWEEN sale_startdate AND sale_enddate) AND (ipsprice_qtybreak <= pQty) AND (cust_id=pCustid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; -- Check for a Customer Shipto Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE ((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (ipsass_shipto_id != -1) AND (ipsass_shipto_id=pShiptoid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- Check for a Customer Shipto Pattern Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE ((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass, shiptoinfo WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (COALESCE(length(ipsass_shipto_pattern), 0) > 0) AND (shipto_num ~ ipsass_shipto_pattern) AND (ipsass_cust_id=pCustid) AND (shipto_id=pShiptoid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- Check for a Customer Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE ((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (COALESCE(length(ipsass_shipto_pattern), 0) = 0) AND (ipsass_cust_id=pCustid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- Check for a Customer Type Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass, custinfo WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (ipsass_custtype_id=cust_custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (cust_id=pCustid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- Check for a Customer Type Pattern Price SELECT currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) INTO _price FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) AS ipsprice_qtybreak, (ipsitemchar_price * itemuomtouomratio(ipsitem_item_id, NULL, ipsitem_price_uom_id)) * _iteminvpricerat AS ipsprice_price FROM ipsiteminfo,ipsitemchar WHERE ((ipsitem_item_id=pItemid) AND (ipsitemchar_char_id=pCharid) AND (ipsitemchar_value=pCharValue) AND (ipsitemchar_ipsitem_id=ipsitem_id)) ) AS ipsprice, ipshead, ipsass, custtype, custinfo WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (ipsass_ipshead_id=ipshead_id) AND (coalesce(length(ipsass_custtype_pattern), 0) > 0) AND (custtype_code ~ ipsass_custtype_pattern) AND (cust_custtype_id=custtype_id) AND (pAsOf BETWEEN ipshead_effective AND (ipshead_expires - 1)) AND (ipsprice_qtybreak <= pQty) AND (cust_id=pCustid) ) ORDER BY ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; IF (_price IS NOT NULL) THEN IF ((_sales IS NOT NULL) AND (_sales < _price)) THEN RETURN _sales; END IF; RETURN _price; END IF; -- If we have not found another price yet and we have a -- sales price we will use that. IF (_sales IS NOT NULL) THEN RETURN _sales; END IF; -- Check for a list price SELECT MIN(currToLocal(pCurrid, charass_price - (charass_price * COALESCE(cust_discntprcnt, 0)), pEffective)) AS price, item_exclusive INTO _item FROM charass,item LEFT OUTER JOIN custinfo ON (cust_id=pCustid) WHERE ((item_id=pItemid) AND (charass_char_id=pCharid) AND (charass_value=pCharValue) AND (charass_target_type='I') AND (charass_target_id=item_id)) GROUP BY item_exclusive; IF (FOUND) THEN IF (NOT _item.item_exclusive) THEN IF (_item.price < 0) THEN RETURN 0; ELSE RETURN _item.price; END IF; ELSE RETURN 0; END IF; ELSE RETURN 0; END IF; END; $_$; lDROP FUNCTION public.itemcharprice(integer, integer, text, integer, integer, numeric, integer, date, date); publicadminfalse8399212551682994itemcharvalue(integer, text)FUNCTION9CREATE FUNCTION itemcharvalue(integer, text) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCharName ALIAS FOR $2; _value TEXT; BEGIN SELECT charass_value INTO _value FROM charass, char WHERE ( (charass_char_id=char_id) AND (charass_target_type='I') AND (charass_target_id=pItemid) AND (char_name=pCharName) ); IF (NOT FOUND) THEN _value = ''; END IF; RETURN _value; END; $_$; 3DROP FUNCTION public.itemcharvalue(integer, text); publicadminfalse8399212551682995itemcost(integer)FUNCTIONCREATE FUNCTION itemcost(integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _cost NUMERIC; BEGIN SELECT CASE WHEN (itemsite_costmethod='A' AND itemsite_qtyonhand != 0.0) THEN (itemsite_value / itemsite_qtyonhand) WHEN (itemsite_costmethod='A' AND itemsite_qtyonhand = 0.0) THEN 0.0 WHEN (itemsite_costmethod='N') THEN 0.0 ELSE stdCost(itemsite_item_id) END INTO _cost FROM itemsite WHERE(itemsite_id=pItemsiteid); RETURN _cost; END; $_$; (DROP FUNCTION public.itemcost(integer); publicadminfalse8399212551682996iteminventoryuominuse(integer)FUNCTION CREATE FUNCTION iteminventoryuominuse(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _uomid INTEGER; _result INTEGER; BEGIN SELECT item_inv_uom_id INTO _uomid FROM item WHERE(item_id=pItemid); SELECT itemuomconv_id INTO _result FROM itemuomconv WHERE(itemuomconv_item_id=pItemid) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; SELECT itemsite_id INTO _result FROM itemsite WHERE ( (itemsite_item_id=pItemid) AND ((itemsite_qtyonhand <> 0) OR (itemsite_nnqoh <> 0)) ) LIMIT 1; IF (FOUND) THEN RETURN TRUE; END IF; RETURN FALSE; END; $_$; 5DROP FUNCTION public.iteminventoryuominuse(integer); publicadminfalse8399212551682997iteminvpricerat(integer)FUNCTION CREATE FUNCTION iteminvpricerat(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _fromUomid INTEGER; _toUomid INTEGER; _ratio NUMERIC; BEGIN IF(pItemid IS NULL) THEN RETURN 1.0; END IF; SELECT item_inv_uom_id, item_price_uom_id INTO _fromUomid, _toUomid FROM item WHERE(item_id=pItemid); IF(NOT FOUND) THEN RAISE EXCEPTION 'No item record found for item_id %', pItemid; END IF; IF(_fromUomid = _toUomid) THEN RETURN 1.0; END IF; -- Return the ration as inventory / price SELECT CASE WHEN(itemuomconv_from_uom_id=_fromUomid) THEN itemuomconv_from_value / itemuomconv_to_value ELSE itemuomconv_to_value / itemuomconv_from_value END INTO _ratio FROM itemuomconv WHERE((((itemuomconv_from_uom_id=_fromUomid) AND (itemuomconv_to_uom_id=_toUomid)) OR ((itemuomconv_from_uom_id=_toUomid) AND (itemuomconv_to_uom_id=_fromUomid))) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'No itemuomconv record found for item_id % to item_price_uomid %', pItemid, _toUomid; END IF; RETURN _ratio; END; $_$; /DROP FUNCTION public.iteminvpricerat(integer); publicadminfalse8399212552005551`itemipsprice(integer, integer, integer, numeric, integer, integer, integer, date, date, integer)FUNCTIONL#CREATE FUNCTION itemipsprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date, psiteid integer) RETURNS SETOF itemprice LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row itemprice%ROWTYPE; _sale RECORD; _ips RECORD; _item RECORD; _cust RECORD; _shipto RECORD; _iteminvpricerat NUMERIC := 1.0; _listprice NUMERIC := 0.0; _qty NUMERIC; _asof DATE; _wholesalepricecosting BOOLEAN := false; _long30markups BOOLEAN := false; _itempricingprecedence BOOLEAN := false; BEGIN _wholesalepricecosting := fetchMetricBool('WholesalePriceCosting'); _long30markups := fetchMetricBool('Long30Markups'); _itempricingprecedence := fetchMetricBool('ItemPricingPrecedence'); -- Return the itemPrice in the currency passed in as pCurrid _qty := itemuomtouom(pItemid, pQtyUOM, NULL, pQty); -- If no as of passed, use current date _asof := COALESCE(pAsOf, CURRENT_DATE); -- Cache Item, Customer and Shipto SELECT item.*, itemCost(itemsite_id) AS invcost INTO _item FROM item LEFT OUTER JOIN itemsite ON (itemsite_item_id=item_id AND itemsite_warehous_id=pSiteid) WHERE (item_id=pItemid); SELECT * INTO _cust FROM custinfo JOIN custtype ON (custtype_id=cust_custtype_id) WHERE (cust_id=pCustid); SELECT * INTO _shipto FROM shiptoinfo WHERE (shipto_id=pShiptoid); -- Get a value here so we do not have to call the function several times SELECT itemuomtouomratio(pItemid, pPriceUOM, _item.item_price_uom_id) AS ratio INTO _iteminvpricerat; -- First get a sales price if any so we when we find other prices -- we can determine if we want that price or this price. -- Check for a Sale Price SELECT INTO _sale currToCurr(ipshead_curr_id, pCurrid, ipsprice_price, pEffective) AS rightprice, ipsitem_type AS righttype FROM ( SELECT ipsitem_ipshead_id AS ipsprice_ipshead_id, ipsitem_type, CASE WHEN (ipsitem_type = 'N') THEN (ipsitem_price * itemuomtouomratio(_item.item_id, pPriceUOM, ipsitem_price_uom_id)) WHEN (ipsitem_type = 'D') THEN noNeg(_item.item_listprice - (_item.item_listprice * ipsitem_discntprcnt) - ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND _long30markups AND _wholesalepricecosting) THEN (_item.item_listcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND _long30markups) THEN (_item.invcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN (ipsitem_type = 'M' AND _wholesalepricecosting) THEN (_item.item_listcost + (_item.item_listcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN (ipsitem_type = 'M') THEN (_item.invcost + (_item.invcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat ELSE 0.00 END AS ipsprice_price, CASE WHEN (ipsitem_item_id=_item.item_id) THEN itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) ELSE ipsitem_qtybreak END AS ipsprice_qtybreak, (COALESCE(ipsitem_price_uom_id, -1)=COALESCE(pPriceUOM,-1)) AS uommatched, CASE WHEN (_itempricingprecedence) THEN (COALESCE(ipsitem_item_id, -1)=_item.item_id) ELSE true END AS itemmatched FROM ipsiteminfo WHERE(ipsitem_item_id=_item.item_id) OR (ipsitem_prodcat_id=_item.item_prodcat_id) ) AS ipsprice, ipshead, ipsass, sale WHERE ( (ipsprice_ipshead_id=ipshead_id) AND (sale_ipshead_id=ipsprice_ipshead_id) AND (_asof BETWEEN sale_startdate AND sale_enddate) AND (ipsprice_qtybreak <= _qty) AND (ipsass_ipshead_id=ipshead_id) AND ( (ipsass_shipto_id=_shipto.shipto_id) OR ((COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND (_shipto.shipto_num ~ ipsass_shipto_pattern)) OR (ipsass_cust_id=_cust.cust_id) OR (ipsass_custtype_id=_cust.cust_custtype_id) OR ((COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND (_cust.custtype_code ~ ipsass_custtype_pattern)) ) ) ORDER BY itemmatched DESC, uommatched DESC, ipsprice_qtybreak DESC, ipsprice_price ASC LIMIT 1; -- Find the best Price Schedule Price SELECT INTO _ips currToCurr(ipshead_curr_id, pCurrid, protoprice, pEffective) AS rightprice, ipsitem_type AS righttype FROM ( SELECT *, CASE WHEN (COALESCE(ipsass_shipto_id, -1) > 0) THEN 1 WHEN (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) THEN 2 WHEN (COALESCE(ipsass_cust_id, -1) > 0) THEN 3 WHEN (COALESCE(ipsass_custtype_id, -1) > 0) THEN 4 WHEN (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) THEN 5 ELSE 99 END AS assignseq, CASE WHEN (ipsitem_type = 'N') THEN (ipsitem_price * itemuomtouomratio(_item.item_id, pPriceUOM, ipsitem_price_uom_id)) WHEN (ipsitem_type = 'D') THEN noNeg(_item.item_listprice - (_item.item_listprice * ipsitem_discntprcnt) - ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND _long30markups AND _wholesalepricecosting) THEN (_item.item_listcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN ((ipsitem_type = 'M') AND (ipsitem_discntprcnt <= 0.5) AND _long30markups) THEN (_item.invcost / (1.0 - ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN (ipsitem_type = 'M' AND _wholesalepricecosting) THEN (_item.item_listcost + (_item.item_listcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat WHEN (ipsitem_type = 'M') THEN (_item.invcost + (_item.invcost * ipsitem_discntprcnt) + ipsitem_fixedamtdiscount) * _iteminvpricerat ELSE 0.00 END AS protoprice, CASE WHEN (ipsitem_item_id=_item.item_id) THEN itemuomtouom(ipsitem_item_id, ipsitem_qty_uom_id, NULL, ipsitem_qtybreak) ELSE ipsitem_qtybreak END AS protoqtybreak, (COALESCE(ipsitem_price_uom_id, -1)=COALESCE(pPriceUOM,-1)) AS uommatched, CASE WHEN (_itempricingprecedence) THEN (COALESCE(ipsitem_item_id, -1)=_item.item_id) ELSE true END AS itemmatched FROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id) JOIN ipsiteminfo ON (ipsitem_ipshead_id=ipshead_id) WHERE ((ipsitem_item_id=_item.item_id) OR (ipsitem_prodcat_id=_item.item_prodcat_id)) AND (_asof BETWEEN ipshead_effective AND ipshead_expires) AND ((ipsitem_warehous_id=pSiteid) OR (ipsitem_warehous_id IS NULL)) AND ( (ipsass_shipto_id=_shipto.shipto_id) OR ((COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) AND (_shipto.shipto_num ~ ipsass_shipto_pattern)) OR (ipsass_cust_id=_cust.cust_id) OR (ipsass_custtype_id=_cust.cust_custtype_id) OR ((COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0) AND (_cust.custtype_code ~ ipsass_custtype_pattern)) ) ) AS proto WHERE (protoqtybreak <= pQty) ORDER BY assignseq, itemmatched DESC, protoqtybreak DESC, rightprice LIMIT 1; IF (_ips.rightprice IS NOT NULL) THEN IF ((_sale.rightprice IS NOT NULL) AND (_sale.rightprice < _ips.rightprice)) THEN RAISE DEBUG 'itemprice, item=%, cust=%, shipto=%, sale price= %', pItemid, pCustid, pShiptoid, _sale.rightprice; _row.itemprice_price := _sale.rightprice; _row.itemprice_type := _sale.righttype; RETURN NEXT _row; END IF; RAISE DEBUG 'itemprice, item=%, cust=%, shipto=%, schedule price= %', pItemid, pCustid, pShiptoid, _ips.rightprice; _row.itemprice_price := _ips.rightprice; _row.itemprice_type := _ips.righttype; RETURN NEXT _row; END IF; -- If item is exclusive then list list price does not apply IF (_item.item_exclusive) THEN RAISE DEBUG 'itemprice, item=%, cust=%, shipto=%, item exclusive, price=-9999', pItemid, pCustid, pShiptoid; _row.itemprice_price := -9999.0; _row.itemprice_type := ''; RETURN NEXT _row; END IF; -- Check for a list price _listprice := noNeg(currToLocal(pCurrid, _item.item_listprice - (_item.item_listprice * COALESCE(_cust.cust_discntprcnt, 0.0)), pEffective) * itemuomtouomratio(pItemid, pPriceUOM, _item.item_price_uom_id)); RAISE DEBUG 'itemprice, item=%, cust=%, shipto=%, list price= %', pItemid, pCustid, pShiptoid, _listprice; _row.itemprice_price := _listprice; _row.itemprice_type := 'P'; RETURN NEXT _row; RETURN; END; $$; DROP FUNCTION public.itemipsprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date, psiteid integer); publicadminfalse83992256912551682998&itemlocdistqty(text, integer, integer)FUNCTION CREATE FUNCTION itemlocdistqty(text, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTypes ALIAS FOR $1; pLocationid ALIAS FOR $2; pParentid ALIAS FOR $3; _qty NUMERIC := 0; _tempQty NUMERIC; BEGIN IF (strpos(pTypes, 'L') > 0) THEN SELECT COALESCE(SUM(itemlocdist_qty), 0) INTO _tempQty FROM itemlocdist WHERE ( (itemlocdist_source_type='L') AND (itemlocdist_source_id=pLocationid) AND (itemlocdist_itemlocdist_id=pParentid) ); _qty := (_qty + _tempQty); END IF; IF (strpos(pTypes, 'I') > 0) THEN SELECT COALESCE(SUM(itemlocdist_qty), 0) INTO _tempQty FROM itemlocdist, itemloc WHERE ( (itemlocdist_source_type='I') AND (itemlocdist_source_id=itemloc_id) AND (itemloc_location_id=pLocationid) AND (itemlocdist_itemlocdist_id=pParentid) ); _qty := (_qty + _tempQty); END IF; RETURN _qty; END; $_$; =DROP FUNCTION public.itemlocdistqty(text, integer, integer); publicadminfalse8399212551682999 itemlocdistqty(integer, integer)FUNCTIONRCREATE FUNCTION itemlocdistqty(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; pParentid ALIAS FOR $2; _qty NUMERIC; _tempQty NUMERIC; BEGIN SELECT COALESCE(SUM(itemlocdist_qty), 0) INTO _qty FROM itemlocdist WHERE ( (itemlocdist_source_type='L') AND (itemlocdist_source_id=pLocationid) AND (itemlocdist_itemlocdist_id=pParentid) ); SELECT COALESCE(SUM(itemlocdist_qty), 0) INTO _tempQty FROM itemlocdist, itemloc WHERE ( (itemlocdist_source_type='I') AND (itemlocdist_source_id=itemloc_id) AND (itemloc_location_id=pLocationid) AND (itemlocdist_itemlocdist_id=pParentid) ); _qty := (_qty + _tempQty); RETURN _qty; END; $_$; 7DROP FUNCTION public.itemlocdistqty(integer, integer); publicadminfalse8399212552005553<itemprice(integer, integer, integer, numeric, integer, date)FUNCTIONdCREATE FUNCTION itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pcurrid integer, peffective date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _item RECORD; BEGIN SELECT item_inv_uom_id, item_price_uom_id INTO _item FROM item WHERE(item_id=pItemid); IF (FOUND) THEN RETURN itemPrice(pItemid, pCustid, pShiptoid, pQty, _item.item_inv_uom_id, _item.item_price_uom_id, pCurrid, pEffective); END IF; RETURN -9999; END; $$; DROP FUNCTION public.itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pcurrid integer, peffective date); publicadminfalse8399212552005554Nitemprice(integer, integer, integer, numeric, integer, integer, integer, date)FUNCTIONCREATE FUNCTION itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN RETURN itemPrice(pItemid, pCustid, pShiptoid, pQty, pQtyUOM, pPriceUOM, pCurrid, pEffective, CURRENT_DATE); END; $$; DROP FUNCTION public.itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date); publicadminfalse8399212552005555Titemprice(integer, integer, integer, numeric, integer, integer, integer, date, date)FUNCTIONCREATE FUNCTION itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN RETURN itemPrice(pItemid, pCustid, pShiptoid, pQty, pQtyUOM, pPriceUOM, pCurrid, pEffective, pAsOf, NULL); END; $$; DROP FUNCTION public.itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date); publicadminfalse8399212552005556]itemprice(integer, integer, integer, numeric, integer, integer, integer, date, date, integer)FUNCTIONPCREATE FUNCTION itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date, psiteid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN SELECT * FROM itemIpsPrice(pItemid, pCustid, pShiptoid, pQty, pQtyUOM, pPriceUOM, pCurrid, pEffective, pAsOf, pSiteid) INTO _r; RETURN _r.itemprice_price; END; $$; DROP FUNCTION public.itemprice(pitemid integer, pcustid integer, pshiptoid integer, pqty numeric, pqtyuom integer, ppriceuom integer, pcurrid integer, peffective date, pasof date, psiteid integer); publicadminfalse83992 12551683004itemsellinguom(integer)FUNCTION2CREATE FUNCTION itemsellinguom(integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN itemUOMByType(pItemid, 'Selling'); END; $_$; .DROP FUNCTION public.itemsellinguom(integer); publicadminfalse8399212551745042-itemsrcprice(integer, numeric, integer, date)FUNCTIONCREATE FUNCTION itemsrcprice(pitemsrcid integer, pqty numeric, pcurrid integer, peffective date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _price NUMERIC := 0.0; BEGIN SELECT itemsrcPrice(pItemsrcid, -1, FALSE, pQty, pCurrid, pEffective) INTO _price; RETURN _price; END; $$; gDROP FUNCTION public.itemsrcprice(pitemsrcid integer, pqty numeric, pcurrid integer, peffective date); publicadminfalse8399212551745043?itemsrcprice(integer, integer, boolean, numeric, integer, date)FUNCTIONCREATE FUNCTION itemsrcprice(pitemsrcid integer, psiteid integer, pdropship boolean, pqty numeric, pcurrid integer, peffective date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _price NUMERIC := 0.0; _r RECORD; _effective DATE; BEGIN -- If no pEffective passed, use current date _effective := COALESCE(pEffective, CURRENT_DATE); -- Cache Itemsrc and Item SELECT * INTO _r FROM itemsrc JOIN item ON (item_id=itemsrc_item_id) WHERE (itemsrc_id=pItemsrcid); IF (NOT FOUND) THEN RAISE EXCEPTION 'itemsrc % not found.', pItemsrcid; END IF; -- Determine price SELECT currToCurr(itemsrcp_curr_id, pCurrid, price, _effective) INTO _price FROM ( SELECT *, CASE itemsrcp_type WHEN ('N') THEN itemsrcp_price WHEN ('D') THEN (_r.item_listcost - (_r.item_listcost * itemsrcp_discntprcnt) - itemsrcp_fixedamtdiscount) ELSE 0.0 END AS price FROM itemsrcp WHERE ( (itemsrcp_itemsrc_id=_r.itemsrc_id) AND ((itemsrcp_warehous_id=pSiteid) OR (itemsrcp_warehous_id=-1)) AND ((itemsrcp_dropship=pDropship) OR (NOT itemsrcp_dropship)) AND (itemsrcp_qtybreak <= pQty) ) ORDER BY itemsrcp_qtybreak DESC LIMIT 1 ) AS data ; RETURN _price; END; $$; DROP FUNCTION public.itemsrcprice(pitemsrcid integer, psiteid integer, pdropship boolean, pqty numeric, pcurrid integer, peffective date); publicadminfalse8399212551683005itemuombytype(integer, text)FUNCTIONCREATE FUNCTION itemuombytype(integer, text) RETURNS text LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUomtype ALIAS FOR $2; _uom TEXT; BEGIN SELECT uom_name INTO _uom FROM ( SELECT uom_name FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN itemuom ON (itemuom_itemuomconv_id=itemuomconv_id) JOIN uomtype ON (itemuom_uomtype_id=uomtype_id) JOIN uom ON (itemuomconv_to_uom_id=uom_id) WHERE((item_id=pItemid) AND (uomtype_name=pUomtype) AND (item_inv_uom_id != itemuomconv_to_uom_id)) UNION SELECT uom_name FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN itemuom ON (itemuom_itemuomconv_id=itemuomconv_id) JOIN uomtype ON (itemuom_uomtype_id=uomtype_id) JOIN uom ON (itemuomconv_from_uom_id=uom_id) WHERE((item_id=pItemid) AND (uomtype_name=pUomtype) AND (item_inv_uom_id != itemuomconv_from_uom_id))) data LIMIT 1; IF (NOT FOUND) THEN SELECT uom_name INTO _uom FROM item JOIN uom ON (item_inv_uom_id=uom_id) WHERE(item_id=pItemid); END IF; RETURN _uom; END; $_$; 3DROP FUNCTION public.itemuombytype(integer, text); publicadminfalse8399212551683006&itemuomfractionalbytype(integer, text)FUNCTION#CREATE FUNCTION itemuomfractionalbytype(integer, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUomtype ALIAS FOR $2; _frac BOOLEAN; BEGIN SELECT itemuomconv_fractional INTO _frac FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN itemuom ON (itemuom_itemuomconv_id=itemuomconv_id) JOIN uomtype ON (itemuom_uomtype_id=uomtype_id) WHERE((item_id=pItemid) AND (uomtype_name=pUomtype)) LIMIT 1; IF (NOT FOUND) THEN SELECT item_fractional INTO _frac FROM item JOIN uom ON (item_inv_uom_id=uom_id) WHERE(item_id=pItemid); END IF; RETURN _frac; END; $_$; =DROP FUNCTION public.itemuomfractionalbytype(integer, text); publicadminfalse8399212551683007(itemuomfractionalbyuom(integer, integer)FUNCTION=CREATE FUNCTION itemuomfractionalbyuom(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUomid ALIAS FOR $2; _frac BOOLEAN; BEGIN SELECT itemuomconv_fractional INTO _frac FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) WHERE((item_id=pItemid) AND ((itemuomconv_from_uom_id=item_inv_uom_id AND itemuomconv_to_uom_id=pUomid) OR (itemuomconv_to_uom_id=item_inv_uom_id AND itemuomconv_from_uom_id=pUomid))) LIMIT 1; IF (NOT FOUND) THEN SELECT item_fractional INTO _frac FROM item JOIN uom ON (item_inv_uom_id=uom_id) WHERE(item_id=pItemid); END IF; RETURN _frac; END; $_$; ?DROP FUNCTION public.itemuomfractionalbyuom(integer, integer); publicadminfalse8399212551683008!itemuomratiobytype(integer, text)FUNCTIONCREATE FUNCTION itemuomratiobytype(integer, text) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUomtype ALIAS FOR $2; _ratio NUMERIC; BEGIN -- Return the ration as alternate / inventory uom SELECT CASE WHEN(itemuomconv_from_uom_id=item_inv_uom_id) THEN itemuomconv_to_value / itemuomconv_from_value ELSE itemuomconv_from_value / itemuomconv_to_value END INTO _ratio FROM item JOIN itemuomconv ON (itemuomconv_item_id=item_id) JOIN itemuom ON (itemuom_itemuomconv_id=itemuomconv_id) JOIN uomtype ON (itemuom_uomtype_id=uomtype_id) WHERE((item_id=pItemid) AND (uomtype_name=pUomtype)) LIMIT 1; IF (NOT FOUND) THEN _ratio := 1.0; END IF; RETURN _ratio; END; $_$; 8DROP FUNCTION public.itemuomratiobytype(integer, text); publicadminfalse83992125516830090itemuomtouom(integer, integer, integer, numeric)FUNCTION6CREATE FUNCTION itemuomtouom(integer, integer, integer, numeric) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN itemuomtouom($1, $2, $3, $4, 'qty'); END; $_$; GDROP FUNCTION public.itemuomtouom(integer, integer, integer, numeric); publicadminfalse83992125517582636itemuomtouom(integer, integer, integer, numeric, text)FUNCTIONCREATE FUNCTION itemuomtouom(pitemid integer, puomidfrom integer, puomidto integer, pqtyfrom numeric, plocale text) RETURNS numeric LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _uomidFrom INTEGER; _uomidTo INTEGER; _uomidInv INTEGER; _valueFrom NUMERIC := 0.0; _valueTo NUMERIC := 0.0; _value NUMERIC := 0.0; _item RECORD; _conv RECORD; _frac BOOLEAN := FALSE; BEGIN SELECT item_inv_uom_id, item_fractional INTO _item FROM item WHERE(item_id=pItemid); IF(NOT FOUND) THEN RAISE EXCEPTION 'No item record was found for item id %', pItemid; END IF; _uomidFrom := COALESCE(pUomidFrom, _item.item_inv_uom_id); _uomidTo := COALESCE(pUomidTo, _item.item_inv_uom_id); _uomidInv := _item.item_inv_uom_id; -- Should we round the qty here or not? IF(_uomidFrom = _uomidTo) THEN -- Both from/to are the same. If it is the item inv uom -- then use the item fractional value otherwise assume -- it is fractional for now so the user gets the same value back. IF(_uomidFrom = _item.item_inv_uom_id) THEN _frac := _item.item_fractional; ELSE _frac := true; END IF; RETURN roundLocale(_frac, pQtyFrom, pLocale); END IF; -- Try a direct conversion SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidFrom AND itemuomconv_to_uom_id=_uomidTo) OR (itemuomconv_from_uom_id=_uomidTo AND itemuomconv_to_uom_id=_uomidFrom)) AND (itemuomconv_item_id=pItemid)); IF(FOUND) THEN IF(_conv.itemuomconv_from_uom_id=_uomidFrom) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; -- If we are converting to the item inv uom use the item fractional value -- otherwise use the conversion fractional value. if(_uomidTo = _uomidInv) THEN _frac := _item.item_fractional; ELSE _frac := _conv.itemuomconv_fractional; END IF; _value := roundLocale(_frac, ((_valueTo/_valueFrom) * pQtyFrom), pLocale); ELSE -- Try to convert the from uom to the inventory uom SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidFrom AND itemuomconv_to_uom_id=_uomidInv) OR (itemuomconv_from_uom_id=_uomidInv AND itemuomconv_to_uom_id=_uomidFrom)) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'A conversion for item_id % from uom_id % to inv_uom_id % was not found.', pItemid, _uomidFrom, _uomidInv; END IF; IF(_conv.itemuomconv_from_uom_id=_uomidInv) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := (_valueTo / _valueFrom); IF (_conv.itemuomconv_fractional OR _item.item_fractional) THEN _frac := TRUE; END IF; -- Try to convert the to uom to the inventory uom SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value, itemuomconv_fractional INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidInv AND itemuomconv_to_uom_id=_uomidTo) OR (itemuomconv_from_uom_id=_uomidTo AND itemuomconv_to_uom_id=_uomidInv)) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'A conversion for item_id % from uom_id % to inv_uom_id % was not found.', pItemid, _uomidTo, _uomidInv; END IF; IF(_conv.itemuomconv_from_uom_id=_uomidInv) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := _value * (_valueTo / _valueFrom); IF (_conv.itemuomconv_fractional OR _item.item_fractional) THEN _frac := TRUE; END IF; _value := roundLocale(_frac, (_value * pQtyFrom), pLocale); END IF; RETURN _value; END; $$; zDROP FUNCTION public.itemuomtouom(pitemid integer, puomidfrom integer, puomidto integer, pqtyfrom numeric, plocale text); publicadminfalse8399212551683010,itemuomtouomratio(integer, integer, integer)FUNCTIONa CREATE FUNCTION itemuomtouomratio(pitemid integer, puomidfrom integer, puomidto integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _uomidFrom INTEGER; _uomidTo INTEGER; _uomidInv INTEGER; _valueFrom NUMERIC := 0.0; _valueTo NUMERIC := 0.0; _value NUMERIC := 0.0; _item RECORD; _conv RECORD; BEGIN SELECT item_inv_uom_id INTO _item FROM item WHERE(item_id=pItemid); IF(NOT FOUND) THEN RAISE EXCEPTION 'No item record was found for item id %', pItemid; END IF; _uomidFrom := COALESCE(pUomidFrom, _item.item_inv_uom_id); _uomidTo := COALESCE(pUomidTo, _item.item_inv_uom_id); _uomidInv := _item.item_inv_uom_id; IF(_uomidFrom = _uomidTo) THEN RETURN 1.0; END IF; -- Try a direct conversion SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidFrom AND itemuomconv_to_uom_id=_uomidTo) OR (itemuomconv_from_uom_id=_uomidTo AND itemuomconv_to_uom_id=_uomidFrom)) AND (itemuomconv_item_id=pItemid)); IF(FOUND) THEN IF(_conv.itemuomconv_from_uom_id=_uomidFrom) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := (_valueTo / _valueFrom); ELSE -- Try to convert the from uom to the inventory uom SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidFrom AND itemuomconv_to_uom_id=_uomidInv) OR (itemuomconv_from_uom_id=_uomidInv AND itemuomconv_to_uom_id=_uomidFrom)) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'A conversion for item_id % from uom_id % to inv_uom_id % was not found.', pItemid, _uomidFrom, _uomidInv; END IF; IF(_conv.itemuomconv_from_uom_id=_uomidInv) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := (_valueTo / _valueFrom); -- Try to convert the to uom to the inventory uom SELECT itemuomconv_from_uom_id, itemuomconv_from_value, itemuomconv_to_uom_id, itemuomconv_to_value INTO _conv FROM itemuomconv WHERE(((itemuomconv_from_uom_id=_uomidInv AND itemuomconv_to_uom_id=_uomidTo) OR (itemuomconv_from_uom_id=_uomidTo AND itemuomconv_to_uom_id=_uomidInv)) AND (itemuomconv_item_id=pItemid)); IF(NOT FOUND) THEN RAISE EXCEPTION 'A conversion for item_id % from uom_id % to inv_uom_id % was not found.', pItemid, _uomidTo, _uomidInv; END IF; IF(_conv.itemuomconv_from_uom_id=_uomidInv) THEN _valueFrom := _conv.itemuomconv_from_value; _valueTo := _conv.itemuomconv_to_value; ELSE _valueFrom := _conv.itemuomconv_to_value; _valueTo := _conv.itemuomconv_from_value; END IF; _value := _value * (_valueTo / _valueFrom); END IF; RETURN _value; END; $$; _DROP FUNCTION public.itemuomtouomratio(pitemid integer, puomidfrom integer, puomidto integer); publicadminfalse8399212551683011 last_agg(anyelement, anyelement)FUNCTIONyCREATE FUNCTION last_agg(anyelement, anyelement) RETURNS anyelement LANGUAGE sql STABLE AS $_$ SELECT $2; $_$; 7DROP FUNCTION public.last_agg(anyelement, anyelement); publicadminfalse812551683012login()FUNCTIONCREATE FUNCTION login() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _p RECORD; BEGIN RETURN login(false); END; $$; DROP FUNCTION public.login(); publicadminfalse8399212551833161login(boolean)FUNCTIONCREATE FUNCTION login(boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _setSearchPath ALIAS FOR $1; _p RECORD; BEGIN PERFORM pg_try_advisory_lock(datid::integer, procpid) FROM pg_stat_activity WHERE(procpid = pg_backend_pid()); -- This is new to version 9.0 and higher and will error on older versions IF (select CAST(split_part(split_part(version(), ' ', 2),'.',1) AS integer) >= 9) THEN SET bytea_output TO escape; END IF; -- this is temporary until either qt fixes the postgres driver or we find & -- fix all of the places in our app that can write strings with backslashes SET standard_conforming_strings TO false; SELECT usr_id, userCanLogin(usr_username) AS usr_active INTO _p FROM usr WHERE (usr_username=getEffectiveXtUser()); IF (NOT FOUND) THEN RETURN -1; ELSIF (NOT _p.usr_active) THEN IF(SELECT metric_value='AdminOnly' FROM metric WHERE metric_name='AllowedUserLogins') THEN RETURN -3; END IF; RETURN -2; END IF; IF (_setSearchPath) THEN IF EXISTS(SELECT 1 FROM pg_proc JOIN pg_namespace ON (pronamespace=pg_namespace.oid) WHERE nspname='public' AND proname='buildsearchpath') THEN EXECUTE 'SET SEARCH_PATH TO ' || public.buildSearchPath(); END IF; END IF; RETURN 1; END; $_$; %DROP FUNCTION public.login(boolean); publicadminfalse8399212551683013logout()FUNCTION\CREATE FUNCTION logout() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN PERFORM pg_advisory_unlock(datid::integer, procpid) FROM pg_stat_activity WHERE(procpid = pg_backend_pid()); RETURN 0; END; $$; DROP FUNCTION public.logout(); publicadminfalse8399212551683014lowercost(integer, text)FUNCTIONTCREATE FUNCTION lowercost(integer, text) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCosttype ALIAS FOR $2; BEGIN RETURN lowerCost(pItemid, pCosttype, TRUE); END; $_$; /DROP FUNCTION public.lowercost(integer, text); publicadminfalse8399212551683015!lowercost(integer, text, boolean)FUNCTION1CREATE FUNCTION lowercost(integer, text, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCosttype ALIAS FOR $2; pActual ALIAS FOR $3; _type CHAR(1); _actCost NUMERIC; _actCost1 NUMERIC; _actCost2 NUMERIC; _stdCost NUMERIC; _stdCost1 NUMERIC; _stdCost2 NUMERIC; _cost NUMERIC; _cost1 NUMERIC; _cost2 NUMERIC; _batchsize NUMERIC; BEGIN SELECT item_type INTO _type FROM item WHERE (item_id=pItemid); _batchsize := COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=getActiveRevId('BOM',pItemId))) LIMIT 1), 1); -- find the lowercost in the base currency at the current conversion rate IF (_type IN ('M', 'F', 'B', 'T')) THEN IF (pActual) THEN SELECT SUM( CASE WHEN (bomitemcost_id IS NOT NULL AND bc.costelem_id IS NOT NULL) THEN round(currToBase(bomitemcost_curr_id, bomitemcost_actcost, CURRENT_DATE),6) * itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') ELSE round(currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE),6) * itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') END ) INTO _cost FROM bomitem(pItemid) JOIN item ON (item_id=bomitem_item_id AND item_type <> 'T') JOIN itemcost ON (itemcost_item_id=bomitem_item_id) JOIN costelem ic ON (ic.costelem_id=itemcost_costelem_id AND ic.costelem_type=pCosttype) LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=bomitem_id) LEFT OUTER JOIN costelem bc ON (bc.costelem_id=bomitemcost_costelem_id AND bc.costelem_type=pCosttype) WHERE ( CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1) ); ELSE SELECT SUM( CASE WHEN (bomitemcost_id IS NOT NULL AND bc.costelem_id IS NOT NULL) THEN bomitemcost_stdcost * itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') ELSE itemcost_stdcost * itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') END ) INTO _cost FROM bomitem(pItemid) JOIN item ON (item_id=bomitem_item_id AND item_type <> 'T') JOIN itemcost ON (itemcost_item_id=bomitem_item_id) JOIN costelem ON (costelem_id=itemcost_costelem_id AND costelem_type=pCosttype) LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=bomitem_id) LEFT OUTER JOIN costelem bc ON (bc.costelem_id=bomitemcost_costelem_id AND bc.costelem_type=pCosttype) WHERE ( CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1) ); END IF; IF (NOT FOUND) THEN _cost := NULL; END IF; ELSIF (_type IN ('C')) THEN SELECT SUM(CASE WHEN (bbomitem_qtyper = 0) THEN 0 ELSE currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) / bbomitem_qtyper * bbomitem_costabsorb END), SUM(CASE WHEN (bbomitem_qtyper = 0) THEN 0 ELSE itemcost_stdcost / bbomitem_qtyper * bbomitem_costabsorb END) INTO _actCost1, _stdCost1 FROM itemcost JOIN costelem ON (itemcost_costelem_id=costelem_id) JOIN xtmfg.bbomitem ON (bbomitem_parent_item_id=itemcost_item_id) WHERE ( (bbomitem_item_id=pItemid) AND (CURRENT_DATE BETWEEN bbomitem_effective AND (bbomitem_expires - 1)) AND (costelem_type=pCosttype) ); SELECT SUM(CASE WHEN (t.bbomitem_qtyper = 0) THEN 0 ELSE currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) * s.bbomitem_qtyper / t.bbomitem_qtyper * t.bbomitem_costabsorb END), SUM(CASE WHEN (t.bbomitem_qtyper = 0) THEN 0 ELSE itemcost_stdcost * s.bbomitem_qtyper / t.bbomitem_qtyper * t.bbomitem_costabsorb END) INTO _actCost2, _stdCost2 FROM costelem JOIN itemcost ON (costelem_id=itemcost_costelem_id) JOIN xtmfg.bbomitem AS s ON (itemcost_item_id=s.bbomitem_item_id) JOIN xtmfg.bbomitem AS t ON (s.bbomitem_parent_item_id=t.bbomitem_parent_item_id) JOIN item ON (s.bbomitem_item_id=item_id) WHERE ( (t.bbomitem_item_id=pItemid) AND ( CURRENT_DATE BETWEEN s.bbomitem_effective AND (s.bbomitem_expires - 1) ) AND ( CURRENT_DATE BETWEEN t.bbomitem_effective AND (t.bbomitem_expires - 1) ) AND (item_type='Y') AND (costelem_type=pCosttype) ); IF (pActual) THEN _cost = _actCost; _cost1 = _actCost1; _cost2 = _actCost2; ELSE _cost = _stdCost; _cost1 = _stdCost1; _cost2 = _stdCost2; -- should this be std or act? END IF; IF (_cost1 IS NULL AND _cost2 IS NULL) THEN _cost = NULL; ELSE _cost = COALESCE(_cost1, 0) + COALESCE(_cost2, 0); END IF; ELSE RETURN NULL; END IF; RETURN round(_cost,6); END; $_$; 8DROP FUNCTION public.lowercost(integer, text, boolean); publicadminfalse83992|12551683016maintainbomworkspace()FUNCTIONCREATE FUNCTION maintainbomworkspace() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _test TEXT; BEGIN SELECT tablename INTO _test FROM pg_tables WHERE (tablename='bomwork'); IF (NOT FOUND) THEN CREATE TEMPORARY TABLE bomwork ( bomwork_id INTEGER, bomwork_set_id INTEGER, bomwork_parent_id INTEGER, bomwork_seqnumber INTEGER, bomwork_parent_seqnumber INTEGER, bomwork_item_id INTEGER, bomwork_item_type CHARACTER(1), bomwork_status CHARACTER(1), bomwork_qtyper NUMERIC(20, 8), bomwork_scrap NUMERIC(20, 10), bomwork_level INTEGER, bomwork_effective DATE, bomwork_expires DATE, bomwork_stdunitcost NUMERIC(16, 4), bomwork_actunitcost NUMERIC(16, 4), bomwork_createwo BOOLEAN, bomwork_issuemethod CHARACTER(1) ); CREATE INDEX bomwork_set_id_idx ON bomwork(bomwork_set_id); END IF; RETURN 1; END; $$; -DROP FUNCTION public.maintainbomworkspace(); publicadminfalse8399212551683017markapcheckasposted(integer)FUNCTIONfCREATE FUNCTION markapcheckasposted(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'markAPCheckAsPosted() is deprecated - use markCheckAsPosted() instead'; RETURN markCheckAsPosted($1); END; $_$; 3DROP FUNCTION public.markapcheckasposted(integer); publicadminfalse8399212551683018markapcheckasprinted(integer)FUNCTIONaCREATE FUNCTION markapcheckasprinted(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'markAPCheckAsPrinted() is deprecated - use markCheckAsPrinted()'; RETURN markCheckAsPrinted($1); END; $_$; 4DROP FUNCTION public.markapcheckasprinted(integer); publicadminfalse83992 12551683019markcheckasposted(integer)FUNCTIONlCREATE FUNCTION markcheckasposted(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; BEGIN UPDATE checkhead SET checkhead_posted=TRUE WHERE (checkhead_id=pCheckid); RETURN 1; END; $_$; 1DROP FUNCTION public.markcheckasposted(integer); publicadminfalse83992!12551683020markcheckasprinted(integer)FUNCTIONnCREATE FUNCTION markcheckasprinted(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; BEGIN UPDATE checkhead SET checkhead_printed=TRUE WHERE (checkhead_id=pCheckid); RETURN 1; END; $_$; 2DROP FUNCTION public.markcheckasprinted(integer); publicadminfalse8399212551683021&massexpirebomitem(integer, date, text)FUNCTION"CREATE FUNCTION massexpirebomitem(integer, date, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pExpireDate ALIAS FOR $2; pECN ALIAS FOR $3; BEGIN UPDATE bomitem SET bomitem_expires=pExpireDate WHERE ( (bomitem_expires >= CURRENT_DATE) AND (bomitem_item_id=pItemid) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) ); RETURN TRUE; END; $_$; =DROP FUNCTION public.massexpirebomitem(integer, date, text); publicadminfalse83992125516830220massreplacebomitem(integer, integer, date, text)FUNCTIONCREATE FUNCTION massreplacebomitem(integer, integer, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNewItemid ALIAS FOR $1; pOriginalItemid ALIAS FOR $2; pEffectiveDate ALIAS FOR $3; pECN ALIAS FOR $4; _effectiveDate DATE; _result INTEGER; BEGIN _effectiveDate := COALESCE(pEffectiveDate, CURRENT_DATE); IF (BOMContains(pOriginalItemid, pNewItemid) OR BOMContains(pNewItemid, pOriginalItemid)) THEN RETURN -1; END IF; INSERT INTO bomitem ( bomitem_parent_item_id, bomitem_seqnumber, bomitem_item_id, bomitem_qtyfxd, bomitem_qtyper, bomitem_uom_id, bomitem_scrap, bomitem_effective, bomitem_expires, bomitem_ecn, bomitem_createwo, bomitem_issuemethod, bomitem_subtype, bomitem_booitem_seq_id, bomitem_schedatwooper, bomitem_moddate, bomitem_rev_id, bomitem_char_id, bomitem_value ) SELECT bomitem_parent_item_id, bomitem_seqnumber, pNewItemid, bomitem_qtyfxd, bomitem_qtyper, bomitem_uom_id, bomitem_scrap, _effectiveDate, endOfTime(), pECN, bomitem_createwo, bomitem_issuemethod, 'I', bomitem_booitem_seq_id, bomitem_schedatwooper, CURRENT_DATE, getActiveRevId('BOM',bomitem_parent_item_id), bomitem_char_id, bomitem_value FROM bomitem WHERE ( (_effectiveDate < bomitem_expires) AND (bomitem_item_id=pOriginalItemid) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) ); UPDATE bomitem SET bomitem_expires=_effectiveDate WHERE ( (_effectiveDate < bomitem_expires) AND (bomitem_item_id=pOriginalItemid) AND (bomitem_rev_id=getActiveRevid('BOM',bomitem_parent_item_id)) ); RETURN 1; END; $_$; GDROP FUNCTION public.massreplacebomitem(integer, integer, date, text); publicadminfalse8399212551683023)merge2crmaccts(integer, integer, boolean)FUNCTIONo0CREATE FUNCTION merge2crmaccts(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceId ALIAS FOR $1; pTargetId ALIAS FOR $2; _purge BOOLEAN := COALESCE($3, FALSE); _coldesc RECORD; _count INTEGER := 0; _hassubtype BOOLEAN; _mrgcol BOOLEAN; _result INTEGER := 0; _sel RECORD; _colname TEXT; _tmpid INTEGER; BEGIN -- Validate IF (pSourceId = pTargetId) THEN RAISE NOTICE 'Tried to merge a CRM Account with itself: %.', pSourceId; RETURN 0; ELSIF (pSourceId IS NULL) THEN RAISE EXCEPTION 'Merge source id cannot be null [xtuple: merge, -1]'; ELSIF NOT(EXISTS(SELECT 1 FROM crmacct WHERE crmacct_id=pSourceId)) THEN RAISE EXCEPTION 'Merge source % not found [xtuple: merge, -2, %]', pSourceId, pSourceId; ELSIF (pTargetId IS NULL) THEN RAISE EXCEPTION 'Merge target id cannot be null [xtuple: merge, -3]'; ELSIF NOT(EXISTS(SELECT 1 FROM crmacct WHERE crmacct_id=pTargetId)) THEN RAISE EXCEPTION 'Merge target % not found [xtuple: merge, -4, %]', pTargetId, pTargetId; ELSIF NOT(EXISTS(SELECT 1 FROM crmacctsel WHERE (crmacctsel_src_crmacct_id=pSourceId) AND (crmacctsel_dest_crmacct_id=pTargetId))) THEN RAISE EXCEPTION 'Source % and target % have not been selected for merging [xtuple: merge, -5, %, %]', pSourceId, pTargetId, pSourceId, pTargetId; END IF; _result:= changeFkeyPointers('public', 'crmacct', pSourceId, pTargetId, ARRAY[ 'crmacctsel', 'crmacctmrgd' ], _purge) + changePseudoFKeyPointers('public', 'alarm', 'alarm_source_id', pSourceId, 'public', 'crmacct', pTargetId, 'alarm_source', 'CRMA', _purge) + changePseudoFKeyPointers('public', 'charass', 'charass_target_id', pSourceId, 'public', 'crmacct', pTargetId, 'charass_target_type', 'CRMACCT', _purge) + changePseudoFKeyPointers('public', 'comment', 'comment_source_id', pSourceId, 'public', 'crmacct', pTargetId, 'comment_source', 'CRMA', _purge) + changePseudoFKeyPointers('public', 'docass', 'docass_source_id', pSourceId, 'public', 'crmacct', pTargetId, 'docass_source_type', 'CRMA', _purge) + changePseudoFKeyPointers('public', 'docass', 'docass_target_id', pSourceId, 'public', 'crmacct', pTargetId, 'docass_target_type', 'CRMA', _purge) + changePseudoFKeyPointers('public', 'imageass', 'imageass_source_id', pSourceId, 'public', 'crmacct', pTargetId, 'imageass_source', 'CRMA', _purge) ; -- TODO: find a generic way to handle pseudofkeys in packages - see 9401 IF (fetchMetricBool('EnableBatchManager') AND packageIsEnabled('xtbatch')) THEN _result:= _result + changePseudoFKeyPointers('xtbatch', 'emlassc', 'emlassc_assc_id', pSourceId, 'public', 'crmacct', pTargetId, 'emlassc_type', 'CRMA', _purge); END IF; -- back up all of the values in the target record that are about to be changed FOR _coldesc IN SELECT attname, typname FROM pg_attribute JOIN pg_type ON (atttypid=pg_type.oid) JOIN pg_class ON (attrelid=pg_class.oid) JOIN pg_namespace ON (relnamespace=pg_namespace.oid) WHERE (attnum >= 0) AND (relname='crmacct') AND (nspname='public') AND (attname NOT IN ('crmacct_id', 'crmacct_number')) LOOP -- if we're supposed to merge this column at all EXECUTE 'SELECT ' || quote_ident('crmacctsel_mrg_' || _coldesc.attname) || ' FROM crmacctsel WHERE ((crmacctsel_src_crmacct_id=' || pSourceId || ') AND (crmacctsel_dest_crmacct_id=' || pTargetId || '))' INTO _mrgcol; IF (_mrgcol) THEN _colname := REPLACE(_coldesc.attname, 'crmacctsel_mrg_', ''); -- optionally back up the old value from the destination -- we'll back up the old value from the source further down IF (NOT _purge) THEN BEGIN EXECUTE 'INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT ''public'', ''crmacct'', ''crmacct_id'', crmacct_id, ' || quote_literal(_colname) || ', ' || quote_ident(_colname) || ', ' || quote_literal(_coldesc.typname) || ', ''public'', ''crmacct'', crmacct_id FROM crmacct WHERE (crmacct_id=' || pTargetId || ');' ; EXCEPTION WHEN unique_violation THEN RAISE EXCEPTION 'Could not make a backup copy of % when merging % into % [xtuple: merge, -8, %, %, public, crmacct, %]', _colname, pSourceId, pTargetId, _colname, pSourceId, pTargetId; END; END IF; -- TODO: what do we do about users? /* update the destination crmacct in one of 3 different ways: - crmacct_notes might be concatenated from more than one source record - foreign keys to crm account subtype records (e.g. crmacct_cust_id) must not leave orphaned records and must avoid uniqueness violations - some fields can simply be updated in place */ IF (_colname = 'crmacct_notes') THEN EXECUTE 'UPDATE crmacct dest SET ' || quote_ident(_colname) || '=dest.' || quote_ident(_colname) || E' || E''\\n'' || src.' || _colname || ' FROM crmacct src JOIN crmacctsel ON (src.crmacct_id=crmacctsel_src_crmacct_id) WHERE ((dest.crmacct_id=crmacctsel_dest_crmacct_id) AND (dest.crmacct_id!=crmacctsel_src_crmacct_id));'; ELSIF (_colname IN ('crmacct_cust_id', 'crmacct_prospect_id', 'crmacct_vend_id', 'crmacct_taxauth_id', 'crmacct_emp_id', 'crmacct_salesrep_id')) THEN IF (_colname IN ('crmacct_cust_id', 'crmacct_prospect_id')) THEN EXECUTE 'SELECT src.' || quote_ident(_colname) || ' IS NOT NULL AND (dest.crmacct_prospect_id IS NOT NULL OR dest.crmacct_cust_id IS NOT NULL) FROM crmacct src JOIN crmacctsel ON (src.crmacct_id=crmacctsel_src_crmacct_id) JOIN crmacct dest ON (crmacctsel_dest_crmacct_id=dest.crmacct_id) WHERE ((src.crmacct_id=' || pSourceId || ') AND (dest.crmacct_id=' || pTargetId || '))' INTO _hassubtype; IF (_hassubtype) THEN RAISE EXCEPTION 'Cannot merge two CRM Accounts that both refer to Customers and/or Prospects [xtuple: merge, -6, %, %]', pSourceId, pTargetId; END IF; ELSE EXECUTE 'SELECT src.' || quote_ident(_colname) || ' IS NOT NULL AND dest.'|| quote_ident(_colname) || ' IS NOT NULL FROM crmacct src JOIN crmacctsel ON (src.crmacct_id=crmacctsel_src_crmacct_id) JOIN crmacct dest ON (crmacctsel_dest_crmacct_id=dest.crmacct_id) WHERE ((src.crmacct_id=' || pSourceId || ') AND (dest.crmacct_id=' || pTargetId || '))' INTO _hassubtype; IF (_hassubtype) THEN RAISE EXCEPTION 'Cannot merge CRM Accounts until the % child records have been merged [xtuple: merge, -7, %, %, %]', _colname, _colname, pSourceId, pTargetId; END IF; END IF; /* clearing the source separately from setting the target avoids problems with triggers updating the wrong records */ EXECUTE 'SELECT ' || quote_ident(_colname) || ' FROM crmacct WHERE crmacct_id=' || pSourceId INTO _tmpid; -- now we have the data to back up the source IF (NOT _purge) THEN BEGIN EXECUTE 'INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT ''public'', ''crmacct'', ''crmacct_id'', crmacct_id, ' || quote_literal(_colname) || ', ' || quote_ident(_colname) || ', ' || quote_literal(_coldesc.typname) || ', ''public'', ''crmacct'', ' || pTargetId || ' FROM crmacct WHERE (crmacct_id=' || pSourceId || ');' ; EXCEPTION WHEN unique_violation THEN RAISE EXCEPTION 'Could not make a backup copy of % when merging % into % [xtuple: merge, -8, %, %, public, crmacct, %]', _colname, pSourceId, pTargetId, _colname, pSourceId, pTargetId; END; END IF; EXECUTE 'UPDATE crmacct SET ' || quote_ident(_colname) || '=NULL WHERE (crmacct_id=' || pSourceId || ');'; EXECUTE 'UPDATE crmacct SET ' || quote_ident(_colname) || '=' || quote_literal(_tmpid) || ' WHERE (crmacct_id=' || pTargetId || ');'; ELSE EXECUTE 'UPDATE crmacct dest SET ' || quote_ident(_colname) || ' =src.' || quote_ident(_colname) || ' FROM crmacct src WHERE ((dest.crmacct_id=' || pTargetId || ') AND (src.crmacct_id=' || pSourceId || '));'; END IF; GET DIAGNOSTICS _count = ROW_COUNT; _result := _result + _count; END IF; END LOOP; IF (_purge) THEN DELETE FROM crmacct WHERE crmacct = pSourceId; ELSE INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) SELECT 'public', 'crmacct', 'crmacct_id', pSourceId, 'crmacct_active', crmacct_active, 'bool', 'public', 'crmacct', pTargetId FROM crmacct WHERE crmacct_active AND (crmacct_id = pSourceId); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count > 0) THEN _result := _result + _count; UPDATE crmacct SET crmacct_active = false WHERE (crmacct_id=pSourceId); END IF; -- make a special record of the source crm account so we can delete it later INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id ) VALUES ( 'public', 'crmacct', 'crmacct_id', pSourceId, NULL, NULL, NULL, 'public', 'crmacct', pTargetId); END IF; DELETE FROM crmacctsel WHERE (crmacctsel_src_crmacct_id=pSourceId); RETURN _result; END; $_$; @DROP FUNCTION public.merge2crmaccts(integer, integer, boolean); publicadminfalse83992 "002FUNCTION merge2crmaccts(integer, integer, boolean)COMMENTCOMMENT ON FUNCTION merge2crmaccts(integer, integer, boolean) IS 'This function merges two crmacct records as decribed in crmacctsel records. For each field in the crmacctsel record marked TRUE, the data are copied from the crmacct record with crmacct_id=pSourceId to the record with crmacct_id=pTargetId. If the purge argument is TRUE, the source record is deleted. If it is FALSE, then mrgundo records are created so the merge can later be undone.'; publicadminfalse129612551683025mergecrmaccts(integer, boolean)FUNCTIONHCREATE FUNCTION mergecrmaccts(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetId ALIAS FOR $1; _purge BOOLEAN := COALESCE($2, FALSE); _retval INTEGER; BEGIN /* if crmacctsel says the target should not keep its original notes, clear them. notes are special because the merge allows concatenating them from multiple sources. this needs to be kept in sync with merge2crmaccts' similar check. */ IF NOT (SELECT crmacctsel_mrg_crmacct_notes FROM crmacctsel WHERE crmacctsel_src_crmacct_id=crmacctsel_dest_crmacct_id AND crmacctsel_dest_crmacct_id=pTargetId) THEN IF (NOT _purge) THEN INSERT INTO mrgundo ( mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type, mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id) SELECT 'public', 'crmacct', crmacct_id, 'public', 'crmacct', 'crmacct_id', crmacct_id, 'crmacct_notes', crmacct_notes, 'text', 'public', 'crmacct', crmacct_id FROM crmacct WHERE (crmacct_id=pTargetId); END IF; UPDATE crmacct SET crmacct_notes = '' WHERE (crmacct_id=pTargetId); END IF; -- merge the data from the various source records SELECT SUM(merge2crmaccts(crmacctsel_src_crmacct_id, pTargetId, _purge)) INTO _retval FROM crmacctsel WHERE ((crmacctsel_dest_crmacct_id=pTargetId) AND (crmacctsel_dest_crmacct_id!=crmacctsel_src_crmacct_id)); DELETE FROM crmacctsel WHERE crmacctsel_dest_crmacct_id=pTargetId; RETURN COALESCE(_retval, 0); END; $_$; 6DROP FUNCTION public.mergecrmaccts(integer, boolean); publicadminfalse83992 "00(FUNCTION mergecrmaccts(integer, boolean)COMMENTfCOMMENT ON FUNCTION mergecrmaccts(integer, boolean) IS 'This function uses the crmacctsel table to merge multiple crmacct records together. Only the merges into the specified target account are performed. Most of the work is done by repeated calls to the merge2crmaccts function. If the purge argument is FALSE, data are kept to allow reversing the merge.'; publicadminfalse172112551683026movebomitemdown(integer)FUNCTIONCREATE FUNCTION movebomitemdown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; _nextBomitem RECORD; BEGIN SELECT nextbomitem.bomitem_seqnumber AS next_seqnumber, thisbomitem.bomitem_seqnumber AS this_seqnumber, thisbomitem.bomitem_parent_item_id AS parent_item_id, thisbomitem.bomitem_rev_id AS rev_id INTO _nextBomitem FROM bomitem AS nextbomitem, bomitem AS thisbomitem WHERE ((nextbomitem.bomitem_seqnumber > thisbomitem.bomitem_seqnumber) AND (nextbomitem.bomitem_parent_item_id=thisbomitem.bomitem_parent_item_id) AND (nextbomitem.bomitem_rev_id=thisbomitem.bomitem_rev_id) AND (thisbomitem.bomitem_id=pBomitemid)) ORDER BY next_seqnumber LIMIT 1; IF (FOUND) THEN -- Swap the seqnumber of the current bomitem and the next bomitem -- There is the potential for multiple bomitems with the same seqnumber UPDATE bomitem SET bomitem_seqnumber=0 WHERE (bomitem_seqnumber=_nextBomitem.next_seqnumber) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); UPDATE bomitem SET bomitem_seqnumber=_nextBomitem.next_seqnumber WHERE (bomitem_seqnumber=_nextBomitem.this_seqnumber) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); UPDATE bomitem SET bomitem_seqnumber=_nextBomitem.this_seqnumber WHERE (bomitem_seqnumber=0) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); END IF; RETURN 1; END; $_$; /DROP FUNCTION public.movebomitemdown(integer); publicadminfalse8399212551683027movebomitemup(integer)FUNCTIONCREATE FUNCTION movebomitemup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; _nextBomitem RECORD; BEGIN SELECT nextbomitem.bomitem_seqnumber AS next_seqnumber, thisbomitem.bomitem_seqnumber AS this_seqnumber, thisbomitem.bomitem_parent_item_id AS parent_item_id, thisbomitem.bomitem_rev_id AS rev_id INTO _nextBomitem FROM bomitem AS nextbomitem, bomitem AS thisbomitem WHERE ((nextbomitem.bomitem_seqnumber < thisbomitem.bomitem_seqnumber) AND (nextbomitem.bomitem_parent_item_id=thisbomitem.bomitem_parent_item_id) AND (nextbomitem.bomitem_rev_id=thisbomitem.bomitem_rev_id) AND (thisbomitem.bomitem_id=pBomitemid)) ORDER BY next_seqnumber DESC LIMIT 1; IF (FOUND) THEN -- Swap the seqnumber of the current bomitem and the next bomitem -- There is the potential for multiple bomitems with the same seqnumber UPDATE bomitem SET bomitem_seqnumber=0 WHERE (bomitem_seqnumber=_nextBomitem.next_seqnumber) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); UPDATE bomitem SET bomitem_seqnumber=_nextBomitem.next_seqnumber WHERE (bomitem_seqnumber=_nextBomitem.this_seqnumber) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); UPDATE bomitem SET bomitem_seqnumber=_nextBomitem.this_seqnumber WHERE (bomitem_seqnumber=0) AND (bomitem_parent_item_id=_nextBomitem.parent_item_id) AND (bomitem_rev_id=_nextBomitem.rev_id); END IF; RETURN 1; END; $_$; -DROP FUNCTION public.movebomitemup(integer); publicadminfalse8399212551683028moveccarddown(integer)FUNCTIONCREATE FUNCTION moveccarddown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardid ALIAS FOR $1; _nextCcard RECORD; BEGIN SELECT nextCcard.ccard_id, nextCcard.ccard_seq AS next_seqnumber, thisCcard.ccard_seq AS this_seqnumber INTO _nextCcard FROM Ccard AS nextCcard, Ccard AS thisCcard WHERE ((nextCcard.ccard_seq > thisCcard.ccard_seq) AND (nextCcard.ccard_cust_id=thisCcard.ccard_cust_id) AND (thisCcard.ccard_id=pCcardid)) ORDER BY next_seqnumber LIMIT 1; IF (FOUND) THEN -- Swap the seqnumber of the current Ccard and the next Ccard UPDATE Ccard SET ccard_seq=_nextCcard.next_seqnumber WHERE (ccard_id=pCcardid); UPDATE Ccard SET ccard_seq=_nextCcard.this_seqnumber WHERE (ccard_id=_nextCcard.ccard_id); END IF; RETURN 1; END; $_$; -DROP FUNCTION public.moveccarddown(integer); publicadminfalse83992'12551683029moveccardup(integer)FUNCTIONCREATE FUNCTION moveccardup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCcardid ALIAS FOR $1; _nextCcard RECORD; BEGIN SELECT nextCcard.ccard_id AS ccard_id, nextCcard.ccard_seq AS next_seqnumber, thisCcard.ccard_seq AS this_seqnumber INTO _nextCcard FROM ccard AS nextCcard, ccard AS thisCcard WHERE ((nextCcard.ccard_seq < thisCcard.ccard_seq) AND (nextCcard.ccard_cust_id=thisCcard.ccard_cust_id) AND (thisCcard.ccard_id=pCcardid)) ORDER BY next_seqnumber DESC LIMIT 1; IF (FOUND) THEN -- Swap the seqnumber of the current Ccard and the next Ccard UPDATE Ccard SET ccard_seq=_nextCcard.next_seqnumber WHERE (ccard_id=pCcardid); UPDATE Ccard SET ccard_seq=_nextCcard.this_seqnumber WHERE (ccard_id=_nextCcard.ccard_id); END IF; RETURN 1; END; $_$; +DROP FUNCTION public.moveccardup(integer); publicadminfalse8399212551683030moveflgroupdown(integer)FUNCTIONCREATE FUNCTION moveflgroupdown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlgrpid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flgrp_id AS id, flgrp_flhead_id AS flhead_id, flgrp_flgrp_id AS flgrp_id, flgrp_order AS ord INTO _from FROM flgrp WHERE (flgrp_id=pFlgrpid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord > _from.ord) ORDER BY ord LIMIT 1; IF (FOUND) THEN UPDATE flgrp SET flgrp_order=_to.ord WHERE (flgrp_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; /DROP FUNCTION public.moveflgroupdown(integer); publicadminfalse8399212551683031moveflgroupup(integer)FUNCTION CREATE FUNCTION moveflgroupup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlgrpid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flgrp_id AS id, flgrp_flhead_id AS flhead_id, flgrp_flgrp_id AS flgrp_id, flgrp_order AS ord INTO _from FROM flgrp WHERE (flgrp_id=pFlgrpid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord < _from.ord) ORDER BY ord DESC LIMIT 1; IF (FOUND) THEN UPDATE flgrp SET flgrp_order=_to.ord WHERE (flgrp_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; -DROP FUNCTION public.moveflgroupup(integer); publicadminfalse8399212551683032moveflitemdown(integer)FUNCTIONCREATE FUNCTION moveflitemdown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlitemid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flitem_id AS id, flitem_flhead_id AS flhead_id, flitem_flgrp_id AS flgrp_id, flitem_order AS ord INTO _from FROM flitem WHERE (flitem_id=pFlitemid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord > _from.ord) ORDER BY ord LIMIT 1; IF (FOUND) THEN UPDATE flitem SET flitem_order=_to.ord WHERE (flitem_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; .DROP FUNCTION public.moveflitemdown(integer); publicadminfalse8399212551683033moveflitemup(integer)FUNCTIONCREATE FUNCTION moveflitemup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlitemid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flitem_id AS id, flitem_flhead_id AS flhead_id, flitem_flgrp_id AS flgrp_id, flitem_order AS ord INTO _from FROM flitem WHERE (flitem_id=pFlitemid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord < _from.ord) ORDER BY ord DESC LIMIT 1; IF (FOUND) THEN UPDATE flitem SET flitem_order=_to.ord WHERE (flitem_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; ,DROP FUNCTION public.moveflitemup(integer); publicadminfalse8399212551683034moveflspecdown(integer)FUNCTIONCREATE FUNCTION moveflspecdown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlspecid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flspec_id AS id, flspec_flhead_id AS flhead_id, flspec_flgrp_id AS flgrp_id, flspec_order AS ord INTO _from FROM flspec WHERE (flspec_id=pFlspecid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord > _from.ord) ORDER BY ord LIMIT 1; IF (FOUND) THEN UPDATE flspec SET flspec_order=_to.ord WHERE (flspec_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; .DROP FUNCTION public.moveflspecdown(integer); publicadminfalse8399212551683035moveflspecup(integer)FUNCTIONCREATE FUNCTION moveflspecup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pFlspecid ALIAS FOR $1; _from RECORD; _to RECORD; BEGIN SELECT flspec_id AS id, flspec_flhead_id AS flhead_id, flspec_flgrp_id AS flgrp_id, flspec_order AS ord INTO _from FROM flspec WHERE (flspec_id=pFlspecid); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT id, type, ord INTO _to FROM (SELECT flitem_id AS id, 'I' AS type, flitem_order AS ord FROM flitem WHERE ((flitem_flgrp_id=_from.flgrp_id) AND (flitem_flhead_id=_from.flhead_id)) UNION SELECT flgrp_id AS id, 'G' AS type, flgrp_order AS ord FROM flgrp WHERE ((flgrp_flgrp_id=_from.flgrp_id) AND (flgrp_flhead_id=_from.flhead_id)) UNION SELECT flspec_id AS id, 'S' AS type, flspec_order AS ord FROM flspec WHERE ((flspec_flgrp_id=_from.flgrp_id) AND (flspec_flhead_id=_from.flhead_id)) ) AS data WHERE (ord < _from.ord) ORDER BY ord DESC LIMIT 1; IF (FOUND) THEN UPDATE flspec SET flspec_order=_to.ord WHERE (flspec_id=_from.id); IF (_to.type='I') THEN UPDATE flitem SET flitem_order=_from.ord WHERE (flitem_id=_to.id); ELSE IF (_to.type='G') THEN UPDATE flgrp SET flgrp_order=_from.ord WHERE (flgrp_id=_to.id); ELSE IF (_to.type='S') THEN UPDATE flspec SET flspec_order=_from.ord WHERE (flspec_id=_to.id); END IF; END IF; END IF; END IF; RETURN 0; END; $_$; ,DROP FUNCTION public.moveflspecup(integer); publicadminfalse8399212551683036%movescript(integer, integer, integer)FUNCTION CREATE FUNCTION movescript(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pscriptid ALIAS FOR $1; poldpkgid ALIAS FOR $2; pnewpkgid ALIAS FOR $3; _deletestr TEXT; _destination TEXT; _insertstr TEXT; _rows INTEGER; _selectstr TEXT; _source TEXT; _record RECORD; BEGIN IF (poldpkgid = pnewpkgid) THEN RETURN 0; END IF; IF (poldpkgid = -1) THEN _source = 'public.script'; ELSE SELECT pkghead_name || '.pkgscript' INTO _source FROM pkghead WHERE pkghead_id=poldpkgid; IF NOT FOUND THEN RETURN -1; END IF; END IF; IF (pnewpkgid = -1) THEN _destination = 'public.script'; ELSE SELECT pkghead_name || '.pkgscript' INTO _destination FROM pkghead WHERE pkghead_id=pnewpkgid; IF NOT FOUND THEN RETURN -2; END IF; END IF; _selectstr := ' SELECT * FROM ' || _source || ' WHERE script_id = ' || pscriptid; EXECUTE _selectstr INTO _record; _deletestr := 'DELETE FROM ONLY ' || _source || ' WHERE script_id = ' || pscriptid; EXECUTE _deletestr; GET DIAGNOSTICS _rows = ROW_COUNT; RAISE NOTICE '% rows from %', _rows, _deletestr; IF (_rows < 1) THEN RETURN -3; ELSIF (_rows > 1) THEN RAISE EXCEPTION 'Tried to delete % scripts with the id % when there should be exactly 1', _rows, pscriptid; END IF; _insertstr := 'INSERT INTO ' || _destination || ' (script_id, script_name, script_order, script_enabled, ' || ' script_source, script_notes) VALUES (' || _record.script_id || ',' || quote_literal(_record.script_name) || ',' || _record.script_order || ',' || _record.script_enabled || ',' || quote_literal(_record.script_source) || ',' || quote_literal(_record.script_notes ) || ');' ; EXECUTE _insertstr; GET DIAGNOSTICS _rows = ROW_COUNT; RAISE NOTICE '% rows from %', _rows, _insertstr; IF (_rows < 1) THEN RETURN -4; ELSIF (_rows > 1) THEN RAISE EXCEPTION 'Tried to insert % scripts with the id % when there should be exactly 1', _rows, pscriptid; END IF; RETURN pscriptid; END; $_$; <DROP FUNCTION public.movescript(integer, integer, integer); publicadminfalse8399212551683037%moveuiform(integer, integer, integer)FUNCTION CREATE FUNCTION moveuiform(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE puiformid ALIAS FOR $1; poldpkgid ALIAS FOR $2; pnewpkgid ALIAS FOR $3; _deletestr TEXT; _destination TEXT; _insertstr TEXT; _rows INTEGER; _selectstr TEXT; _source TEXT; _record RECORD; BEGIN IF (poldpkgid = pnewpkgid) THEN RETURN 0; END IF; IF (poldpkgid = -1) THEN _source = 'public.uiform'; ELSE SELECT pkghead_name || '.pkguiform' INTO _source FROM pkghead WHERE pkghead_id=poldpkgid; IF NOT FOUND THEN RETURN -1; END IF; END IF; IF (pnewpkgid = -1) THEN _destination = 'public.uiform'; ELSE SELECT pkghead_name || '.pkguiform' INTO _destination FROM pkghead WHERE pkghead_id=pnewpkgid; IF NOT FOUND THEN RETURN -2; END IF; END IF; _selectstr := ' SELECT * FROM ' || _source || ' WHERE uiform_id = ' || puiformid; EXECUTE _selectstr INTO _record; _deletestr := 'DELETE FROM ONLY ' || _source || ' WHERE uiform_id = ' || puiformid; EXECUTE _deletestr; GET DIAGNOSTICS _rows = ROW_COUNT; RAISE NOTICE '% rows from %', _rows, _deletestr; IF (_rows < 1) THEN RETURN -3; ELSIF (_rows > 1) THEN RAISE EXCEPTION 'Tried to delete % uiforms with the id % when there should be exactly 1', _rows, puiformid; END IF; _insertstr := 'INSERT INTO ' || _destination || ' (uiform_id, uiform_name, uiform_order, uiform_enabled, ' || ' uiform_source, uiform_notes) VALUES (' || _record.uiform_id || ',' || quote_literal(_record.uiform_name) || ',' || _record.uiform_order || ',' || _record.uiform_enabled || ',' || quote_literal(_record.uiform_source) || ',' || quote_literal(_record.uiform_notes ) || ');' ; EXECUTE _insertstr; GET DIAGNOSTICS _rows = ROW_COUNT; RAISE NOTICE '% rows from %', _rows, _insertstr; IF (_rows < 1) THEN RETURN -4; ELSIF (_rows > 1) THEN RAISE EXCEPTION 'Tried to insert % uiforms with the id % when there should be exactly 1', _rows, puiformid; END IF; RETURN puiformid; END; $_$; <DROP FUNCTION public.moveuiform(integer, integer, integer); publicadminfalse83992125516830387moveupdown(integer, text, text, text, text, text, text)FUNCTIONB CREATE FUNCTION moveupdown(pid integer, pschema text, ptable text, pseqcol text, pjoincol text, pextra text, pdir text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE _keyfield TEXT; _keysize INTEGER; _qry TEXT; _r RECORD; _rowcnt INTEGER; _schema TEXT := COALESCE(pSchema, 'public'); BEGIN RAISE DEBUG 'moveUpDown(%, %, %, %, %, %, %) entered', pId, pSchema, pTable, pSeqCol, pJoinCol, pExtra, pDir; IF (UPPER(pDir) NOT IN ('UP', 'DOWN')) THEN RAISE EXCEPTION 'Cannot change the order of records; unsure what % means for sequencing [xtuple: moveUpDown, -1, %, %.%]', pDir, pDir, _schema, pTable; END IF; SELECT attname, ARRAY_UPPER(conkey, 1) INTO _keyfield, _keysize FROM pg_attribute JOIN pg_constraint ON (attrelid=conrelid AND attnum=conkey[1]) JOIN pg_class ON (conrelid=pg_class.oid) JOIN pg_namespace ON (relnamespace=pg_namespace.oid) WHERE ((contype='p') AND (nspname=_schema) AND (relname=pTable)); RAISE DEBUG 'SELECT attname... returned %, %', _keyfield, _keysize; IF (_keysize > 1) THEN RAISE EXCEPTION 'Cannot change the order of records because %.% has a composite primary key [xtuple: moveUpDown, -2, %.%]', _schema, pTable, _schema, pTable; END IF; /* SELECT next._keyfield AS nextid, next.pSeqCol AS nextseq, this.pSeqCol AS thisseq FROM _schema.pTable AS next, _schema.pTable AS this WHERE (this._keyfield=$1) AND (next.pSeqCol [> or <] this.pSeqCol) [ AND (next.pJoinCol=this.pJoinCol) ] [ AND (pExtra) ] ORDER BY nextseq [ DESC or ASC ] LIMIT 1; */ _qry := 'SELECT next.' || quote_ident(_keyfield) || ' AS nextid, next.' || quote_ident(pSeqCol) || ' AS nextseq, this.' || quote_ident(pSeqCol) || ' AS thisseq FROM ' || _schema || '.' || quote_ident(pTable) || ' AS next, ' || _schema || '.' || quote_ident(pTable) || ' AS this WHERE ((this.' || quote_ident(_keyfield) || '=$1) AND (next.' || quote_ident(pSeqCol) || CASE pDir WHEN 'UP' THEN ' < ' ELSE ' > ' END || 'this.' || quote_ident(pSeqCol) || ')' || CASE WHEN pJoinCol IS NULL THEN '' ELSE ' AND (next.' || quote_ident(pJoinCol) || '=this.' || quote_ident(pJoinCol) || ')' END || ' AND (' || COALESCE(pExtra, 'TRUE') || ')) ORDER BY nextseq ' || CASE pDir WHEN 'UP' THEN 'DESC' ELSE 'ASC' END || ' LIMIT 1;'; RAISE DEBUG 'moveUpDown about to use % when running %', pId, _qry; EXECUTE _qry INTO _r USING pId; GET DIAGNOSTICS _rowcnt = ROW_COUNT; RAISE DEBUG 'next id %, next seq %, this id %, this seq %', _r.nextid, _r.nextseq, pId, _r.thisseq; IF (_rowcnt > 0) THEN _qry := 'UPDATE ' || _schema || '.' || quote_ident(pTable) || ' SET ' || pSeqCol || '=CAST($1 AS INTEGER) WHERE (' || quote_ident(_keyfield) || '=$2);'; EXECUTE _qry USING -1, _r.nextid; EXECUTE _qry USING _r.nextseq, pId; EXECUTE _qry USING _r.thisseq, _r.nextid; RETURN _r.nextid; END IF; RETURN pId; END; $_$; ~DROP FUNCTION public.moveupdown(pid integer, pschema text, ptable text, pseqcol text, pjoincol text, pextra text, pdir text); publicadminfalse83992 "00pFUNCTION moveupdown(pid integer, pschema text, ptable text, pseqcol text, pjoincol text, pextra text, pdir text)COMMENT4COMMENT ON FUNCTION moveupdown(pid integer, pschema text, ptable text, pseqcol text, pjoincol text, pextra text, pdir text) IS 'moveUpDown moves a particular record up or down in an ordered list. pId argument names the record to move. pSchema (uses public if NULL) and pTable name the table holding the list. pSeqCol is the column that holds the sequence number. pJoinCol is the column that distinguishes one list from another in the same table, or NULL if the table holds only one list. pExtra is an extra join clause that may be required, or NULL. pDir is either UP, meaning move the pId record closer to the beginning, or DOWN. Returns the id of the record with which pId was swapped, or pId if the record was already at the end in the specified direction.'; publicadminfalse173312551683039&nextperiodbyinterval(integer, integer)FUNCTIONYCREATE FUNCTION nextperiodbyinterval(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; pInterval ALIAS FOR $2; _periodid INTEGER; BEGIN SELECT b.period_id INTO _periodid FROM period AS a, period AS b WHERE ((a.period_id=pPeriodid) AND (b.period_start >= a.period_start)) ORDER BY b.period_start LIMIT 1 OFFSET pInterval; IF (NOT FOUND) THEN RETURN -1; END IF; RETURN _periodid; END; $_$; =DROP FUNCTION public.nextperiodbyinterval(integer, integer); publicadminfalse83992812551683040nextprsubnumber(integer)FUNCTIONCREATE FUNCTION nextprsubnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrNumber ALIAS FOR $1; _subNumber INTEGER; BEGIN SELECT MAX(pr_subnumber) INTO _subNumber FROM pr WHERE (pr_number=pPrNumber); IF (_subNumber IS NULL) THEN _subNumber := 0; END IF; RETURN (_subNumber + 1); END; $_$; /DROP FUNCTION public.nextprsubnumber(integer); publicadminfalse8399212551683041nextwosubnumber(integer)FUNCTION&CREATE FUNCTION nextwosubnumber(integer) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT COALESCE((MAX(wo_subnumber) + 1), 1) FROM wo WHERE (wo_number=($1)); $_$; /DROP FUNCTION public.nextwosubnumber(integer); publicadminfalse812551683042noneg(numeric)FUNCTIONSCREATE FUNCTION noneg(numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pValue ALIAS FOR $1; BEGIN IF (pValue < 0) THEN RETURN 0; ELSE RETURN pValue; END IF; END; $_$; %DROP FUNCTION public.noneg(numeric); publicadminfalse8399212551683043nopos(numeric)FUNCTIONSCREATE FUNCTION nopos(numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pValue ALIAS FOR $1; BEGIN IF (pValue > 0) THEN RETURN 0; ELSE RETURN pValue; END IF; END; $_$; %DROP FUNCTION public.nopos(numeric); publicadminfalse8399212551683044%normalizetrialbal(integer, character)FUNCTIONCREATE FUNCTION normalizetrialbal(integer, character) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTrialbalid ALIAS FOR $1; pSide ALIAS FOR $2; _value NUMERIC; _r RECORD; BEGIN SELECT accnt_type, trialbal_beginning, trialbal_ending INTO _r FROM trialbal, accnt WHERE ( (trialbal_accnt_id=accnt_id) AND (trialbal_id=pTrialbalid) ); IF (NOT FOUND) THEN RETURN -1; END IF; -- If we are looking for the Ending Balance, cache it IF (pSide = 'E') THEN _value = _r.trialbal_ending; -- We had better been looking for the Beginning Balance! ELSE _value = _r.trialbal_beginning; END IF; -- If the accnt_type is Asset or Expense, swap the sense IF (_r.accnt_type IN ('A', 'E')) THEN _value := (_value * -1); END IF; RETURN _value; END; $_$; <DROP FUNCTION public.normalizetrialbal(integer, character); publicadminfalse8399212551683045numofdatabaseusers()FUNCTIONCREATE FUNCTION numofdatabaseusers() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _count INTEGER; BEGIN SELECT count(*) INTO _count FROM pg_stat_activity, pg_locks WHERE((database=datid) AND (classid=datid) AND (objsubid=2) AND (procpid = pg_backend_pid())); IF (_count IS NULL) THEN _count := 0; END IF; RETURN _count; END; $$; +DROP FUNCTION public.numofdatabaseusers(); publicadminfalse8399212551683046numofserverusers()FUNCTION}CREATE FUNCTION numofserverusers() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _count INTEGER; BEGIN SELECT COUNT(*) INTO _count FROM pg_stat_activity; IF (_count IS NULL) THEN _count := 0; END IF; RETURN _count; END; $$; )DROP FUNCTION public.numofserverusers(); publicadminfalse8399212551683047openaccountingperiod(integer)FUNCTIONCREATE FUNCTION openaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _r RECORD; BEGIN -- Check to make use that the period is closed IF ( ( SELECT (NOT period_closed) FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; IF ( ( SELECT (count(period_id) > 0) FROM period WHERE ((period_end > ( SELECT period_end FROM period WHERE (period_id=pPeriodId)) ) AND (period_closed)) ) ) THEN RETURN -3; END IF; -- Make sure the year is open IF ( ( SELECT (yearperiod_closed) FROM yearperiod JOIN period ON (period_yearperiod_id=yearperiod_id) WHERE (period_id=pPeriodid) ) ) THEN RETURN -4; END IF; -- Reset the period_closed flag UPDATE period SET period_closed=FALSE WHERE (period_id=pPeriodid); -- Post any unposted G/L Transactions into the new period FOR _r IN SELECT DISTINCT gltrans_sequence FROM gltrans, period WHERE ( (NOT gltrans_posted) AND (gltrans_date BETWEEN period_start AND period_end) AND (period_id=pPeriodid) ) LOOP PERFORM postIntoTrialBalance(_r.gltrans_sequence); END LOOP; RETURN pPeriodid; END; $_$; 4DROP FUNCTION public.openaccountingperiod(integer); publicadminfalse8399212551683048!openaccountingyearperiod(integer)FUNCTIONCREATE FUNCTION openaccountingyearperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pYearPeriodId ALIAS FOR $1; _r RECORD; BEGIN -- Check to make use that the yearperiod is closed IF ( ( SELECT (NOT yearperiod_closed) FROM yearperiod WHERE (yearperiod_id=pYearPeriodId) ) ) THEN RETURN -1; END IF; IF ( ( SELECT (count(yearperiod_id) > 0) FROM yearperiod WHERE ((yearperiod_end> ( SELECT yearperiod_end FROM yearperiod WHERE (yearperiod_id=pYearPeriodId)) ) AND (yearperiod_closed)) ) ) THEN RETURN -2; END IF; -- Reset the yearperiod_closed flag UPDATE yearperiod SET yearperiod_closed=FALSE WHERE (yearperiod_id=pYearPeriodId); RETURN pYearPeriodid; END; $_$; 8DROP FUNCTION public.openaccountingyearperiod(integer); publicadminfalse83992&12551683049"openapitemsvalue(integer, integer)FUNCTIONCREATE FUNCTION openapitemsvalue(pvendid integer, pperiodid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC; BEGIN SELECT SUM( (apopen_amount - apopen_paid) / apopen_curr_rate * CASE WHEN (apopen_doctype IN ('D', 'V')) THEN 1 ELSE -1 END ) INTO _value FROM apopen WHERE ( (apopen_open) AND (apopen_vend_id=pVendid) AND (apopen_duedate BETWEEN findPeriodStart(pPeriodid) AND findPeriodEnd(pPeriodid)) ); RETURN COALESCE(_value, 0.0); END; $$; KDROP FUNCTION public.openapitemsvalue(pvendid integer, pperiodid integer); publicadminfalse8399212551683050"openaritemsvalue(integer, integer)FUNCTIONCREATE FUNCTION openaritemsvalue(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; pPeriodid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT SUM( CASE WHEN (aropen_doctype IN ('C', 'R')) THEN ((aropen_amount - aropen_paid) * -1) ELSE (aropen_amount - aropen_paid) END ) INTO _value FROM aropen WHERE ( (aropen_open) AND (aropen_cust_id=pCustid) AND (aropen_duedate BETWEEN findPeriodStart(pPeriodid) AND findPeriodEnd(pPeriodid)) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; 9DROP FUNCTION public.openaritemsvalue(integer, integer); publicadminfalse8399212551683051;openrecurringitems(integer, text, timestamp with time zone)FUNCTIONCREATE FUNCTION openrecurringitems(integer, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentid ALIAS FOR $1; pType TEXT := UPPER($2); pDatetime TIMESTAMP WITH TIME ZONE := COALESCE($3, CURRENT_TIMESTAMP); _count INTEGER := -1; _countstmt TEXT; _rt RECORD; BEGIN IF (pParentid IS NULL) THEN RETURN -11; END IF; SELECT * INTO _rt FROM recurtype WHERE (UPPER(recurtype_type)=pType); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count <= 0) THEN RETURN -10; END IF; _countstmt := 'SELECT COUNT(*) FROM [fulltable]' || ' WHERE (NOT ([done])' || ' AND ([schedcol]>=''$1'')' || ' AND ([table]_recurring_[table]_id=''$2''));'; _countstmt := REPLACE(_countstmt, '[fulltable]', _rt.recurtype_table); _countstmt := REPLACE(_countstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _countstmt := REPLACE(_countstmt, '[done]', _rt.recurtype_donecheck); _countstmt := REPLACE(_countstmt, '[schedcol]', _rt.recurtype_schedcol); -- 8.4+: EXECUTE _countstmt INTO _count USING pDatetime, pParentid; EXECUTE REPLACE(REPLACE(_countstmt, '$1', pDatetime::TEXT), '$2', pParentid::TEXT) INTO _count; RETURN _count; END; $_$; RDROP FUNCTION public.openrecurringitems(integer, text, timestamp with time zone); publicadminfalse8399212591683052opheadTABLECREATE TABLE ophead ( ophead_id integer NOT NULL, ophead_name text NOT NULL, ophead_crmacct_id integer, ophead_owner_username text, ophead_opstage_id integer, ophead_opsource_id integer, ophead_optype_id integer, ophead_probability_prcnt integer, ophead_amount numeric(20,4), ophead_target_date date, ophead_actual_date date, ophead_notes text, ophead_curr_id integer, ophead_active boolean DEFAULT true, ophead_cntct_id integer, ophead_username text, ophead_start_date date, ophead_assigned_date date, ophead_priority_id integer, ophead_number text NOT NULL, CONSTRAINT ophead_ophead_number_check CHECK ((ophead_number <> ''::text)) ); DROP TABLE public.ophead; publicadminfalse594259438"00 TABLE opheadCOMMENT2COMMENT ON TABLE ophead IS 'Opportunity header.'; publicadminfalse181"00opheadACLREVOKE ALL ON TABLE ophead FROM PUBLIC; REVOKE ALL ON TABLE ophead FROM admin; GRANT ALL ON TABLE ophead TO admin; GRANT ALL ON TABLE ophead TO xtrole; publicadminfalse18112551683059ophead()FUNCTION3CREATE FUNCTION ophead() RETURNS SETOF ophead LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row ophead%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllOpportunities','ViewAllOpportunities','MaintainPersonalOpportunities','ViewPersonalOpportunities') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM ophead LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM ophead WHERE getEffectiveXtUser() IN (ophead_owner_username, ophead_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; DROP FUNCTION public.ophead(); publicadminfalse839922726"00FUNCTION ophead()COMMENTvCOMMENT ON FUNCTION ophead() IS 'A table function that returns Opportunity results according to privilege settings.'; publicadminfalse174512551683060 orderedbypo(integer, date, date)FUNCTIONpCREATE FUNCTION orderedbypo(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _qty NUMERIC; BEGIN SELECT COALESCE(SUM(noNeg(poitem_qty_ordered - poitem_qty_received) * poitem_invvenduomratio), 0.0) INTO _qty FROM poitem WHERE ( (poitem_itemsite_id=pItemsiteid) AND (poitem_status <> 'C') AND (poitem_duedate BETWEEN pStartDate AND pEndDate) ); RETURN _qty; END; $_$; 7DROP FUNCTION public.orderedbypo(integer, date, date); publicadminfalse8399212551683061orderedbypo(integer, integer)FUNCTIONCREATE FUNCTION orderedbypo(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAhead ALIAS FOR $2; _qty NUMERIC; BEGIN SELECT orderedByPo(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookAhead)) INTO _qty; RETURN _qty; END; $_$; 4DROP FUNCTION public.orderedbypo(integer, integer); publicadminfalse8399212551683062orderedbywo(integer, integer)FUNCTIONCREATE FUNCTION orderedbywo(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAheadDays ALIAS FOR $2; BEGIN RETURN orderedByWo(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookAheadDays)); END; $_$; 4DROP FUNCTION public.orderedbywo(integer, integer); publicadminfalse8399212551683063 orderedbywo(integer, date, date)FUNCTION CREATE FUNCTION orderedbywo(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _itemType CHARACTER(1); _qty NUMERIC := 0; BEGIN SELECT item_type INTO _itemType FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ); IF (_itemType NOT IN ('C','T')) THEN SELECT COALESCE(SUM(noNeg(wo_qtyord - wo_qtyrcv)), 0.0) INTO _qty FROM wo WHERE ( (wo_status <> 'C') AND (wo_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ); ELSIF (_itemType = 'C') THEN SELECT COALESCE(SUM((noNeg(wo_qtyord - wo_qtyrcv) * brddist_stdqtyper)), 0.0) INTO _qty FROM wo, xtmfg.brddist WHERE ( (wo_status <> 'C') AND (brddist_wo_id=wo_id) AND (brddist_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ); ELSIF (_itemType = 'T' AND fetchMetricBool('Routings')) THEN -- Tooling: Determine quantity already returned SELECT -- Qty Required COALESCE(SUM(noNeg(womatl_qtyreq)),0) - -- Qty Returned (SELECT COALESCE(SUM(abs(invhist_invqty)),0) FROM wo JOIN womatl ON (womatl_wo_id=wo_id) JOIN womatlpost ON (womatl_id=womatlpost_womatl_id) JOIN invhist ON ((womatlpost_invhist_id=invhist_id) AND (invhist_invqty < 0)) LEFT OUTER JOIN xtmfg.wooper ON (womatl_wooper_id=wooper_id) WHERE ( NOT (COALESCE(wooper_rncomplete,wo_status = 'C')) AND (womatl_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ) ) INTO _qty FROM wo JOIN womatl ON (womatl_wo_id=wo_id) LEFT OUTER JOIN xtmfg.wooper ON (womatl_wooper_id=wooper_id) WHERE ( NOT (COALESCE(wooper_rncomplete,wo_status = 'C')) AND (womatl_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ) GROUP BY womatl_qtyreq; ELSIF (_itemType = 'T') THEN -- Tooling: Determine quantity already returned SELECT -- Qty Required COALESCE(SUM(noNeg(womatl_qtyreq)),0) - -- Qty Returned (SELECT COALESCE(SUM(abs(invhist_invqty)),0) FROM wo JOIN womatl ON (womatl_wo_id=wo_id) JOIN womatlpost ON (womatl_id=womatlpost_womatl_id) JOIN invhist ON ((womatlpost_invhist_id=invhist_id) AND (invhist_invqty < 0)) WHERE ( NOT (wo_status = 'C') AND (womatl_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ) ) INTO _qty FROM wo JOIN womatl ON (womatl_wo_id=wo_id) WHERE ( NOT (wo_status = 'C') AND (womatl_itemsite_id=pItemsiteid) AND (wo_duedate BETWEEN pStartDate AND pEndDate) ) GROUP BY womatl_qtyreq; END IF; RETURN COALESCE(_qty,0); END; $_$; 7DROP FUNCTION public.orderedbywo(integer, date, date); publicadminfalse8399212552005559 orderhead()FUNCTION( CREATE FUNCTION orderhead() RETURNS SETOF ordhead LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row ordhead%ROWTYPE; _query TEXT; BEGIN _query := ' SELECT DISTINCT * FROM ( SELECT pohead_id AS orderhead_id, ''PO'' AS orderhead_type, pohead_number AS orderhead_number, pohead_status AS orderhead_status, pohead_orderdate AS orderhead_orderdate, (SELECT count(*) FROM poitem WHERE poitem_pohead_id=pohead_id) AS orderhead_linecount, pohead_vend_id AS orderhead_from_id, vend_name AS orderhead_from, NULL AS orderhead_to_id, '''' AS orderhead_to, pohead_curr_id AS orderhead_curr_id, pohead_agent_username AS orderhead_agent_username, pohead_shipvia AS orderhead_shipvia FROM pohead LEFT OUTER JOIN vendinfo ON (pohead_vend_id=vend_id) UNION SELECT cohead_id AS orderhead_id, ''SO'' AS orderhead_type, cohead_number AS orderhead_number, COALESCE(coitem_status,''C'') AS orderhead_status, cohead_orderdate AS orderhead_orderdate, (SELECT count(*) FROM coitem WHERE coitem_cohead_id=cohead_id) AS orderhead_linecount, NULL AS orderhead_from_id, '''' AS orderhead_from, cohead_cust_id AS orderhead_to_id, cust_name AS orderhead_to, cohead_curr_id AS orderhead_curr_id, '''' AS orderhead_agent_username, cohead_shipvia AS orderhead_shipvia FROM cohead LEFT OUTER JOIN custinfo ON (cohead_cust_id=cust_id) LEFT OUTER JOIN coitem ON ((cohead_id=coitem_cohead_id) AND (coitem_status=''O''))'; IF (fetchmetricbool('MultiWhs')) THEN _query := _query || ' UNION SELECT tohead_id AS orderhead_id, ''TO'' AS orderhead_type, tohead_number AS orderhead_number, tohead_status AS orderhead_status, tohead_orderdate AS orderhead_orderdate, (SELECT count(*) FROM toitem WHERE toitem_tohead_id=tohead_id) AS orderhead_linecount, tohead_src_warehous_id AS orderhead_from_id, tohead_srcname AS orderhead_from, tohead_dest_warehous_id AS orderhead_to_id, tohead_destname AS orderhead_to, tohead_freight_curr_id AS orderhead_curr_id, tohead_agent_username AS orderhead_agent_username, tohead_shipvia AS orderhead_shipvia FROM tohead'; END IF; IF (fetchmetricbool('EnableReturnAuth')) THEN _query := _query || ' UNION SELECT rahead_id AS orderhead_id, ''RA'' AS orderhead_type, rahead_number AS orderhead_number, COALESCE(raitem_status,''C'') AS orderhead_status, rahead_authdate AS orderhead_orderdate, (SELECT count(*) FROM raitem WHERE raitem_rahead_id=rahead_id) AS orderhead_linecount, rahead_cust_id AS orderhead_from_id, cust_name AS orderhead_from, NULL AS orderhead_to_id, '''' AS orderhead_to, rahead_curr_id AS orderhead_curr_id, '''' AS orderhead_agent_username, '''' AS orderhead_shipvia FROM rahead LEFT OUTER JOIN custinfo ON (rahead_cust_id=cust_id) LEFT OUTER JOIN raitem ON ((rahead_id=raitem_rahead_id) AND (raitem_status=''O''))'; END IF; _query := _query || ') AS data ORDER BY orderhead_type, orderhead_number ;'; FOR _row IN EXECUTE _query LOOP RETURN NEXT _row; END LOOP; RETURN; END; $$; "DROP FUNCTION public.orderhead(); publicadminfalse83992258912552005560 orderitem()FUNCTIONCREATE FUNCTION orderitem() RETURNS SETOF orditem LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row orditem%ROWTYPE; _query TEXT; BEGIN _query := ' SELECT poitem_id AS orderitem_id, ''PO'' AS orderitem_orderhead_type, poitem_pohead_id AS orderitem_orderhead_id, poitem_linenumber AS orderitem_linenumber, poitem_status AS orderitem_status, poitem_itemsite_id AS orderitem_itemsite_id, poitem_duedate AS orderitem_scheddate, poitem_qty_ordered AS orderitem_qty_ordered, poitem_qty_returned AS orderitem_qty_shipped, poitem_qty_received AS orderitem_qty_received, uom_id AS orderitem_qty_uom_id, poitem_invvenduomratio AS orderitem_qty_invuomratio, poitem_unitprice AS orderitem_unitcost, pohead_curr_id AS orderitem_unitcost_curr_id, poitem_freight AS orderitem_freight, poitem_freight_received AS orderitem_freight_received, pohead_curr_id AS orderitem_freight_curr_id FROM poitem LEFT OUTER JOIN pohead ON (poitem_pohead_id=pohead_id) LEFT OUTER JOIN uom ON (uom_name=poitem_vend_uom) UNION SELECT coitem_id AS orderitem_id, ''SO'' AS orderitem_orderhead_type, coitem_cohead_id AS orderitem_orderhead_id, coitem_linenumber AS orderitem_linenumber, coitem_status AS orderitem_status, coitem_itemsite_id AS orderitem_itemsite_id, coitem_scheddate AS orderitem_scheddate, coitem_qtyord AS orderitem_qty_ordered, coitem_qtyshipped AS orderitem_qty_shipped, coitem_qtyreturned AS orderitem_qty_received, coitem_qty_uom_id AS orderitem_qty_uom_id, coitem_qty_invuomratio AS orderitem_qty_invuomratio, coitem_unitcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL AS orderitem_freight, NULL AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM coitem'; IF (fetchmetricbool('MultiWhs')) THEN _query := _query || ' UNION SELECT toitem_id AS orderitem_id, ''TO'' AS orderitem_orderhead_type, toitem_tohead_id AS orderitem_orderhead_id, toitem_linenumber AS orderitem_linenumber, toitem_status AS orderitem_status, itemsite_id AS orderitem_itemsite_id, toitem_duedate AS orderitem_scheddate, toitem_qty_ordered AS orderitem_qty_ordered, toitem_qty_shipped AS orderitem_qty_shipped, toitem_qty_received AS orderitem_qty_received, uom_id AS orderitem_qty_uom_id, 1 AS orderitem_qty_invuomratio, toitem_stdcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, toitem_freight AS orderitem_freight, toitem_freight_received AS orderitem_freight_received, toitem_freight_curr_id AS orderitem_freight_curr_id FROM tohead, itemsite, toitem LEFT OUTER JOIN uom ON (uom_name=toitem_uom) WHERE ((toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id)) '; END IF; IF (fetchmetricbool('EnableReturnAuth')) THEN _query := _query || ' UNION SELECT raitem_id AS orderitem_id, ''RA'' AS orderitem_orderhead_type, raitem_rahead_id AS orderitem_orderhead_id, raitem_linenumber AS orderitem_linenumber, raitem_status AS orderitem_status, raitem_itemsite_id AS orderitem_itemsite_id, raitem_scheddate AS orderitem_scheddate, raitem_qtyauthorized AS orderitem_qty_ordered, 0 AS orderitem_qty_shipped, raitem_qtyreceived AS orderitem_qty_received, raitem_qty_uom_id AS orderitem_qty_uom_id, raitem_qty_invuomratio AS orderitem_qty_invuomratio, raitem_unitprice AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL AS orderitem_freight, NULL AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM raitem'; END IF; FOR _row IN EXECUTE _query LOOP RETURN NEXT _row; END LOOP; RETURN; END; $$; "DROP FUNCTION public.orderitem(); publicadminfalse83992259112551683066%orderitemdata(text, integer, integer)FUNCTION(CREATE FUNCTION orderitemdata(text, integer, integer) RETURNS SETOF orderitemtype LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pOrdertype ALIAS FOR $1; pOrderheadid ALIAS FOR $2; pOrderitemid ALIAS FOR $3; _row orderitemtype%ROWTYPE; _set RECORD; BEGIN IF(UPPER(pOrdertype)='PO') THEN FOR _set IN SELECT poitem_id AS orderitem_id, 'PO' AS orderitem_orderhead_type, poitem_pohead_id AS orderitem_orderhead_id, poitem_linenumber AS orderitem_linenumber, poitem_status AS orderitem_status, poitem_itemsite_id AS orderitem_itemsite_id, poitem_duedate AS orderitem_scheddate, poitem_qty_ordered AS orderitem_qty_ordered, poitem_qty_returned AS orderitem_qty_shipped, poitem_qty_received AS orderitem_qty_received, uom_id AS orderitem_qty_uom_id, poitem_invvenduomratio AS orderitem_qty_invuomratio, poitem_unitprice AS orderitem_unitcost, (SELECT pohead_curr_id FROM pohead WHERE pohead_id=poitem_pohead_id) AS orderitem_unitcost_curr_id, poitem_freight AS orderitem_freight, poitem_freight_received AS orderitem_freight_received, (SELECT pohead_curr_id FROM pohead WHERE pohead_id=poitem_pohead_id) AS orderitem_freight_curr_id FROM poitem LEFT OUTER JOIN uom ON (uom_name=poitem_vend_uom) WHERE(((pOrderheadid IS NULL) OR (poitem_pohead_id=pOrderheadid)) AND ((pOrderitemid IS NULL) OR (poitem_id=pOrderitemid))) LOOP _row.orderitem_id := _set.orderitem_id; _row.orderitem_orderhead_type := _set.orderitem_orderhead_type; _row.orderitem_orderhead_id := _set.orderitem_orderhead_id; _row.orderitem_linenumber := _set.orderitem_linenumber; _row.orderitem_status := _set.orderitem_status; _row.orderitem_itemsite_id := _set.orderitem_itemsite_id; _row.orderitem_scheddate := _set.orderitem_scheddate; _row.orderitem_qty_ordered := _set.orderitem_qty_ordered; _row.orderitem_qty_shipped := _set.orderitem_qty_shipped; _row.orderitem_qty_received := _set.orderitem_qty_received; _row.orderitem_qty_uom_id := _set.orderitem_qty_uom_id; _row.orderitem_qty_invuomratio := _set.orderitem_qty_invuomratio; _row.orderitem_unitcost := _set.orderitem_unitcost; _row.orderitem_unitcost_curr_id := _set.orderitem_unitcost_curr_id; _row.orderitem_freight := _set.orderitem_freight; _row.orderitem_freight_received := _set.orderitem_freight_received; _row.orderitem_freight_curr_id := _set.orderitem_freight_curr_id; RETURN NEXT _row; END LOOP; ELSEIF(UPPER(pOrdertype)='SO') THEN FOR _set IN SELECT coitem_id AS orderitem_id, 'SO' AS orderitem_orderhead_type, coitem_cohead_id AS orderitem_orderhead_id, coitem_linenumber AS orderitem_linenumber, coitem_status AS orderitem_status, coitem_itemsite_id AS orderitem_itemsite_id, coitem_scheddate AS orderitem_scheddate, coitem_qtyord AS orderitem_qty_ordered, coitem_qtyshipped AS orderitem_qty_shipped, coitem_qtyreturned AS orderitem_qty_received, coitem_qty_uom_id AS orderitem_qty_uom_id, coitem_qty_invuomratio AS orderitem_qty_invuomratio, coitem_unitcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL AS orderitem_freight, NULL AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM coitem WHERE(((pOrderheadid IS NULL) OR (coitem_cohead_id=pOrderheadid)) AND ((pOrderitemid IS NULL) OR (coitem_id=pOrderitemid))) LOOP _row.orderitem_id := _set.orderitem_id; _row.orderitem_orderhead_type := _set.orderitem_orderhead_type; _row.orderitem_orderhead_id := _set.orderitem_orderhead_id; _row.orderitem_linenumber := _set.orderitem_linenumber; _row.orderitem_status := _set.orderitem_status; _row.orderitem_itemsite_id := _set.orderitem_itemsite_id; _row.orderitem_scheddate := _set.orderitem_scheddate; _row.orderitem_qty_ordered := _set.orderitem_qty_ordered; _row.orderitem_qty_shipped := _set.orderitem_qty_shipped; _row.orderitem_qty_received := _set.orderitem_qty_received; _row.orderitem_qty_uom_id := _set.orderitem_qty_uom_id; _row.orderitem_qty_invuomratio := _set.orderitem_qty_invuomratio; _row.orderitem_unitcost := _set.orderitem_unitcost; _row.orderitem_unitcost_curr_id := _set.orderitem_unitcost_curr_id; _row.orderitem_freight := _set.orderitem_freight; _row.orderitem_freight_received := _set.orderitem_freight_received; _row.orderitem_freight_curr_id := _set.orderitem_freight_curr_id; RETURN NEXT _row; END LOOP; ELSEIF(UPPER(pOrdertype)='RA') THEN FOR _set IN SELECT raitem_id AS orderitem_id, 'RA' AS orderitem_orderhead_type, raitem_rahead_id AS orderitem_orderhead_id, raitem_linenumber AS orderitem_linenumber, raitem_status AS orderitem_status, raitem_itemsite_id AS orderitem_itemsite_id, raitem_scheddate AS orderitem_scheddate, raitem_qtyauthorized AS orderitem_qty_ordered, 0 AS orderitem_qty_shipped, raitem_qtyreceived AS orderitem_qty_received, raitem_qty_uom_id AS orderitem_qty_uom_id, raitem_qty_invuomratio AS orderitem_qty_invuomratio, raitem_unitprice AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL AS orderitem_freight, NULL AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM raitem WHERE(((pOrderheadid IS NULL) OR (raitem_rahead_id=pOrderheadid)) AND ((pOrderitemid IS NULL) OR (raitem_id=pOrderitemid))) LOOP _row.orderitem_id := _set.orderitem_id; _row.orderitem_orderhead_type := _set.orderitem_orderhead_type; _row.orderitem_orderhead_id := _set.orderitem_orderhead_id; _row.orderitem_linenumber := _set.orderitem_linenumber; _row.orderitem_status := _set.orderitem_status; _row.orderitem_itemsite_id := _set.orderitem_itemsite_id; _row.orderitem_scheddate := _set.orderitem_scheddate; _row.orderitem_qty_ordered := _set.orderitem_qty_ordered; _row.orderitem_qty_shipped := _set.orderitem_qty_shipped; _row.orderitem_qty_received := _set.orderitem_qty_received; _row.orderitem_qty_uom_id := _set.orderitem_qty_uom_id; _row.orderitem_qty_invuomratio := _set.orderitem_qty_invuomratio; _row.orderitem_unitcost := _set.orderitem_unitcost; _row.orderitem_unitcost_curr_id := _set.orderitem_unitcost_curr_id; _row.orderitem_freight := _set.orderitem_freight; _row.orderitem_freight_received := _set.orderitem_freight_received; _row.orderitem_freight_curr_id := _set.orderitem_freight_curr_id; RETURN NEXT _row; END LOOP; ELSEIF(UPPER(pOrdertype)='TO') THEN FOR _set IN SELECT toitem_id AS orderitem_id, 'TO' AS orderitem_orderhead_type, toitem_tohead_id AS orderitem_orderhead_id, toitem_linenumber AS orderitem_linenumber, toitem_status AS orderitem_status, itemsite_id AS orderitem_itemsite_id, toitem_duedate AS orderitem_scheddate, toitem_qty_ordered AS orderitem_qty_ordered, toitem_qty_shipped AS orderitem_qty_shipped, toitem_qty_received AS orderitem_qty_received, uom_id AS orderitem_qty_uom_id, 1 AS orderitem_qty_invuomratio, toitem_stdcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, toitem_freight AS orderitem_freight, toitem_freight_received AS orderitem_freight_received, toitem_freight_curr_id AS orderitem_freight_curr_id FROM tohead, itemsite, toitem LEFT OUTER JOIN uom ON (uom_name=toitem_uom) WHERE((toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id) AND ((pOrderheadid IS NULL) OR (toitem_tohead_id=pOrderheadid)) AND ((pOrderitemid IS NULL) OR (toitem_id=pOrderitemid))) LOOP _row.orderitem_id := _set.orderitem_id; _row.orderitem_orderhead_type := _set.orderitem_orderhead_type; _row.orderitem_orderhead_id := _set.orderitem_orderhead_id; _row.orderitem_linenumber := _set.orderitem_linenumber; _row.orderitem_status := _set.orderitem_status; _row.orderitem_itemsite_id := _set.orderitem_itemsite_id; _row.orderitem_scheddate := _set.orderitem_scheddate; _row.orderitem_qty_ordered := _set.orderitem_qty_ordered; _row.orderitem_qty_shipped := _set.orderitem_qty_shipped; _row.orderitem_qty_received := _set.orderitem_qty_received; _row.orderitem_qty_uom_id := _set.orderitem_qty_uom_id; _row.orderitem_qty_invuomratio := _set.orderitem_qty_invuomratio; _row.orderitem_unitcost := _set.orderitem_unitcost; _row.orderitem_unitcost_curr_id := _set.orderitem_unitcost_curr_id; _row.orderitem_freight := _set.orderitem_freight; _row.orderitem_freight_received := _set.orderitem_freight_received; _row.orderitem_freight_curr_id := _set.orderitem_freight_curr_id; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; <DROP FUNCTION public.orderitemdata(text, integer, integer); publicadminfalse83992260712551683067packageisenabled(integer)FUNCTIONCREATE FUNCTION packageisenabled(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT COUNT(*) >= 8 FROM pg_inherits, pg_class, pg_namespace, pkghead WHERE ((inhrelid=pg_class.oid) AND (relnamespace=pg_namespace.oid) AND (nspname=lower(pkghead_name)) AND (pkghead_id=$1)); $_$; 0DROP FUNCTION public.packageisenabled(integer); publicadminfalse812551683068packageisenabled(text)FUNCTIONCREATE FUNCTION packageisenabled(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT COUNT(*) >= 8 FROM pg_inherits, pg_class, pg_namespace WHERE ((inhrelid=pg_class.oid) AND (relnamespace=pg_namespace.oid) AND (nspname=lower($1))); $_$; -DROP FUNCTION public.packageisenabled(text); publicadminfalse8(12551683069pgp_key_id(bytea)FUNCTIONzCREATE FUNCTION pgp_key_id(bytea) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_key_id_w'; (DROP FUNCTION public.pgp_key_id(bytea); publicadminfalse8)12551683070pgp_pub_decrypt(bytea, bytea)FUNCTIONCREATE FUNCTION pgp_pub_decrypt(bytea, bytea) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'; 4DROP FUNCTION public.pgp_pub_decrypt(bytea, bytea); publicadminfalse8*12551683071#pgp_pub_decrypt(bytea, bytea, text)FUNCTIONCREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'; :DROP FUNCTION public.pgp_pub_decrypt(bytea, bytea, text); publicadminfalse8+12551683072)pgp_pub_decrypt(bytea, bytea, text, text)FUNCTIONCREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_text'; @DROP FUNCTION public.pgp_pub_decrypt(bytea, bytea, text, text); publicadminfalse8,12551683073#pgp_pub_decrypt_bytea(bytea, bytea)FUNCTIONCREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'; :DROP FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea); publicadminfalse8-12551683074)pgp_pub_decrypt_bytea(bytea, bytea, text)FUNCTIONCREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'; @DROP FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea, text); publicadminfalse8.12551683075/pgp_pub_decrypt_bytea(bytea, bytea, text, text)FUNCTIONCREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_pub_decrypt_bytea'; FDROP FUNCTION public.pgp_pub_decrypt_bytea(bytea, bytea, text, text); publicadminfalse8/12551683076pgp_pub_encrypt(text, bytea)FUNCTIONCREATE FUNCTION pgp_pub_encrypt(text, bytea) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_pub_encrypt_text'; 3DROP FUNCTION public.pgp_pub_encrypt(text, bytea); publicadminfalse8012551683077"pgp_pub_encrypt(text, bytea, text)FUNCTIONCREATE FUNCTION pgp_pub_encrypt(text, bytea, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_pub_encrypt_text'; 9DROP FUNCTION public.pgp_pub_encrypt(text, bytea, text); publicadminfalse8112551683078#pgp_pub_encrypt_bytea(bytea, bytea)FUNCTIONCREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_pub_encrypt_bytea'; :DROP FUNCTION public.pgp_pub_encrypt_bytea(bytea, bytea); publicadminfalse8212551683079)pgp_pub_encrypt_bytea(bytea, bytea, text)FUNCTIONCREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_pub_encrypt_bytea'; @DROP FUNCTION public.pgp_pub_encrypt_bytea(bytea, bytea, text); publicadminfalse8312551683080pgp_sym_decrypt(bytea, text)FUNCTIONCREATE FUNCTION pgp_sym_decrypt(bytea, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_sym_decrypt_text'; 3DROP FUNCTION public.pgp_sym_decrypt(bytea, text); publicadminfalse8412551683081"pgp_sym_decrypt(bytea, text, text)FUNCTIONCREATE FUNCTION pgp_sym_decrypt(bytea, text, text) RETURNS text LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_sym_decrypt_text'; 9DROP FUNCTION public.pgp_sym_decrypt(bytea, text, text); publicadminfalse8512551683082"pgp_sym_decrypt_bytea(bytea, text)FUNCTIONCREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_sym_decrypt_bytea'; 9DROP FUNCTION public.pgp_sym_decrypt_bytea(bytea, text); publicadminfalse8612551683083(pgp_sym_decrypt_bytea(bytea, text, text)FUNCTIONCREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text, text) RETURNS bytea LANGUAGE c IMMUTABLE STRICT AS '$libdir/pgcrypto', 'pgp_sym_decrypt_bytea'; ?DROP FUNCTION public.pgp_sym_decrypt_bytea(bytea, text, text); publicadminfalse8712551683084pgp_sym_encrypt(text, text)FUNCTIONCREATE FUNCTION pgp_sym_encrypt(text, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_sym_encrypt_text'; 2DROP FUNCTION public.pgp_sym_encrypt(text, text); publicadminfalse8812551683085!pgp_sym_encrypt(text, text, text)FUNCTIONCREATE FUNCTION pgp_sym_encrypt(text, text, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_sym_encrypt_text'; 8DROP FUNCTION public.pgp_sym_encrypt(text, text, text); publicadminfalse8912551683086"pgp_sym_encrypt_bytea(bytea, text)FUNCTIONCREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_sym_encrypt_bytea'; 9DROP FUNCTION public.pgp_sym_encrypt_bytea(bytea, text); publicadminfalse8:12551683087(pgp_sym_encrypt_bytea(bytea, text, text)FUNCTIONCREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text, text) RETURNS bytea LANGUAGE c STRICT AS '$libdir/pgcrypto', 'pgp_sym_encrypt_bytea'; ?DROP FUNCTION public.pgp_sym_encrypt_bytea(bytea, text, text); publicadminfalse812551683088pkgmaybemodified(name)FUNCTIONCREATE FUNCTION pkgmaybemodified(name) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pschemaname ALIAS FOR $1; _returnval BOOLEAN; BEGIN SELECT pkghead_indev INTO _returnval FROM pkghead WHERE (pkghead_name=pschemaname); IF (NOT FOUND) THEN RETURN FALSE; END IF; RETURN _returnval; END; $_$; -DROP FUNCTION public.pkgmaybemodified(name); publicadminfalse83992;12551683089plpgsql_call_handler()FUNCTIONCREATE FUNCTION plpgsql_call_handler() RETURNS language_handler LANGUAGE c AS '$libdir/plpgsql', 'plpgsql_call_handler'; -DROP FUNCTION public.plpgsql_call_handler(); publicadminfalse8<12551683090plpgsql_validator(oid)FUNCTIONrCREATE FUNCTION plpgsql_validator(oid) RETURNS void LANGUAGE c AS '$libdir/plpgsql', 'plpgsql_validator'; -DROP FUNCTION public.plpgsql_validator(oid); publicadminfalse8S12551683091postapcheck(integer)FUNCTIONbCREATE FUNCTION postapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postAPCheck() is deprecated - use postCheck() instead'; RETURN postCheck($1, fetchJournalNumber('AP-CK')); END; $_$; +DROP FUNCTION public.postapcheck(integer); publicadminfalse8399212551683092postapcheck(integer, integer)FUNCTIONRCREATE FUNCTION postapcheck(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postAPCheck() is deprecated - use postCheck() instead'; RETURN postCheck($1, $2); END; $_$; 4DROP FUNCTION public.postapcheck(integer, integer); publicadminfalse8399212551683093postapchecks(integer)FUNCTIONKCREATE FUNCTION postapchecks(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postAPChecks() is deprecated - use postChecks() instead'; RETURN postChecks($1); END; $_$; ,DROP FUNCTION public.postapchecks(integer); publicadminfalse8399212551683094$postapcreditmemoapplication(integer)FUNCTIONCREATE FUNCTION postapcreditmemoapplication(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; _src RECORD; _r RECORD; _totalAmount NUMERIC := 0.0; _exchGain NUMERIC := 0.0; _apaccntid INTEGER; BEGIN SELECT apopen_docnumber, (apopen_amount - apopen_paid) AS balance, -- SUM(currtocurr(apcreditapply_curr_id, apopen_curr_id, -- apcreditapply_amount, CURRENT_DATE)) AS toApply, SUM(apcreditapply_amount) AS toApply, apopen_curr_rate INTO _src FROM apopen, apcreditapply WHERE ( (apcreditapply_source_apopen_id=apopen_id) AND (apopen_id=pApopenid) ) GROUP BY apopen_docnumber, apopen_amount, apopen_paid, apopen_curr_rate; IF (NOT FOUND) THEN RETURN -1; ELSIF (_src.toApply = 0) THEN RETURN -2; ELSIF (_src.toApply > _src.balance) THEN RETURN -3; -- ELSIF (_src.toApply IS NULL AND _src.junk IS NOT NULL) THEN -- RETURN -4; -- missing exchange rate ELSIF (_src.toApply IS NULL) THEN RETURN -6; -- amount to apply is NULL for some unknown reason END IF; SELECT apopen_id, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_amount, apopen_curr_id, apopen_curr_rate, apopen_docdate, apopen_accnt_id INTO _src FROM apopen WHERE (apopen_id=pApopenid); IF (NOT FOUND) THEN RETURN -5; END IF; FOR _r IN SELECT apcreditapply_id, apcreditapply_target_apopen_id, apcreditapply_amount AS apply_amountSource, currToCurr(apcreditapply_curr_id, apopen_curr_id, apcreditapply_amount, CURRENT_DATE) AS apply_amountTarget, apopen_id, apopen_doctype, apopen_docnumber, apopen_curr_id, apopen_curr_rate, apopen_docdate FROM apcreditapply, apopen WHERE ( (apcreditapply_source_apopen_id=pApopenid) AND (apcreditapply_target_apopen_id=apopen_id) ) LOOP IF (_r.apply_amountTarget IS NULL) THEN RETURN -4; -- missing exchange rate END IF; IF (_r.apply_amountTarget > 0) THEN -- Update the apopen item to post the paid amount UPDATE apopen SET apopen_paid = (apopen_paid + _r.apply_amountTarget) WHERE (apopen_id=_r.apcreditapply_target_apopen_id); UPDATE apopen SET apopen_open = false, apopen_closedate = current_date WHERE ( (apopen_id=_r.apcreditapply_target_apopen_id) AND (apopen_amount <= apopen_paid) ); -- Cache the running amount posted _totalAmount := (_totalAmount + _r.apply_amountSource); -- Record the application INSERT INTO apapply ( apapply_vend_id, apapply_amount, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_postdate, apapply_journalnumber, apapply_username, apapply_curr_id ) VALUES ( _src.apopen_vend_id, round(_r.apply_amountSource, 2), pApopenid, 'C', _src.apopen_docnumber, _r.apopen_id, _r.apopen_doctype, _r.apopen_docnumber, CURRENT_DATE, 0, getEffectiveXtUser(), _src.apopen_curr_id ); END IF; -- Delete the posted apcreditapply record DELETE FROM apcreditapply WHERE (apcreditapply_id=_r.apcreditapply_id); END LOOP; -- Record the amount posted and mark the source apopen as closed if it is completely posted UPDATE apopen SET apopen_paid = (apopen_paid + _totalAmount) WHERE (apopen_id=pApopenid); UPDATE apopen SET apopen_open = false, apopen_closedate = current_date WHERE ( (apopen_id=pApopenid) AND (apopen_amount <= apopen_paid) ); IF (_r.apopen_curr_id = _src.apopen_curr_id) THEN IF (_r.apopen_docdate > _src.apopen_docdate) THEN _exchGain := (_totalAmount / _r.apopen_curr_rate - _totalAmount / _src.apopen_curr_rate) * -1; ELSE _exchGain := _totalAmount / _src.apopen_curr_rate - _totalAmount / _r.apopen_curr_rate; END IF; END IF; IF (_src.apopen_accnt_id > -1) THEN _apaccntid := _src.apopen_accnt_id; ELSE _apaccntid := findAPAccount(_src.apopen_vend_id); END IF; PERFORM insertGLTransaction(fetchJournalNumber('AP-MISC'), 'A/P', 'CM', _src.apopen_docnumber, 'CM Application', _apaccntid, getGainLossAccntId(_apaccntid), -1, _exchGain, CURRENT_DATE); RETURN pApopenid; END; $_$; ;DROP FUNCTION public.postapcreditmemoapplication(integer); publicadminfalse8399212551683095postapopenitems()FUNCTION8CREATE FUNCTION postapopenitems() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE apopen SET apopen_posted=TRUE WHERE (NOT apopen_posted); RETURN TRUE; END; $$; (DROP FUNCTION public.postapopenitems(); publicadminfalse8399212551683096$postarcreditmemoapplication(integer)FUNCTIONVCREATE FUNCTION postarcreditmemoapplication(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenid ALIAS FOR $1; BEGIN RETURN postARCreditMemoApplication(pAropenid, CURRENT_DATE); END; $_$; ;DROP FUNCTION public.postarcreditmemoapplication(integer); publicadminfalse83992\12551683097*postarcreditmemoapplication(integer, date)FUNCTIONCREATE FUNCTION postarcreditmemoapplication(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAropenid ALIAS FOR $1; _applyDate DATE := COALESCE($2, CURRENT_DATE); _p RECORD; _r RECORD; _totalAmount NUMERIC := 0; _totalTarget NUMERIC := 0; _exchGain NUMERIC := 0; _result NUMERIC; _araccntid INTEGER; BEGIN SELECT aropen_docnumber, ROUND(aropen_amount - aropen_paid, 2) AS balance, aropen_open, aropen_curr_rate, ROUND(SUM(currToCurr(arcreditapply_curr_id, aropen_curr_id, COALESCE(arcreditapply_amount, 0), _applyDate)), 2) AS toApply INTO _p FROM aropen, arcreditapply WHERE ( (arcreditapply_source_aropen_id=aropen_id) AND (aropen_id=pAropenid) ) GROUP BY aropen_docnumber, aropen_amount, aropen_paid, aropen_open, aropen_curr_rate; IF (NOT FOUND) THEN RETURN -1; ELSIF (_p.toApply = 0) THEN RETURN -2; ELSIF (_p.toApply > _p.balance) THEN RETURN -3; END IF; SELECT aropen_cust_id, aropen_docnumber, aropen_doctype, aropen_amount, aropen_curr_id, aropen_docdate, aropen_accnt_id, aropen_cust_id, aropen_curr_rate INTO _p FROM aropen WHERE (aropen_id=pAropenid); IF (NOT FOUND) THEN RETURN -5; END IF; FOR _r IN SELECT arcreditapply_id, arcreditapply_target_aropen_id, arcreditapply_amount AS arcreditapply_amountSource, arcreditapply_reftype, arcreditapply_ref_id, currToCurr(arcreditapply_curr_id, aropen_curr_id, arcreditapply_amount, _applyDate) AS arcreditapply_amountTarget, aropen_id, aropen_doctype, aropen_docnumber, aropen_docdate, aropen_curr_rate FROM arcreditapply, aropen WHERE ( (arcreditapply_source_aropen_id=pAropenid) AND (arcreditapply_target_aropen_id=aropen_id) ) LOOP IF (_r.arcreditapply_amountTarget IS NULL) THEN RETURN -4; END IF; IF (_r.arcreditapply_amountTarget > 0) THEN -- Update the aropen item to post the paid amount UPDATE aropen SET aropen_paid = round(aropen_paid + _r.arcreditapply_amountTarget, 2) WHERE (aropen_id=_r.arcreditapply_target_aropen_id); UPDATE aropen SET aropen_open = (round(aropen_amount, 2) > round(aropen_paid, 2)) WHERE (aropen_id=_r.arcreditapply_target_aropen_id); -- Cache the running amount posted _totalAmount := (_totalAmount + _r.arcreditapply_amountSource); _totalTarget := (_totalTarget + _r.arcreditapply_amountTarget); -- Record the application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id, arapply_reftype, arapply_ref_id ) VALUES ( _p.aropen_cust_id, pAropenid, _p.aropen_doctype, _p.aropen_docnumber, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, '', '', round(_r.arcreditapply_amountSource, 2), TRUE, _applyDate, _applyDate, 0, getEffectiveXtUser(), _p.aropen_curr_id, _r.arcreditapply_reftype, _r.arcreditapply_ref_id ); END IF; -- Delete the posted arcreditapply record DELETE FROM arcreditapply WHERE (arcreditapply_id=_r.arcreditapply_id); IF (_r.aropen_docdate > _p.aropen_docdate) THEN _exchGain := (_totalTarget / _r.aropen_curr_rate - _totalAmount / _p.aropen_curr_rate) * -1; ELSE _exchGain := _totalAmount / _p.aropen_curr_rate - _totalTarget / _r.aropen_curr_rate; END IF; IF (_p.aropen_accnt_id > -1) THEN _araccntid := _p.aropen_accnt_id; ELSE _araccntid := findARAccount(_p.aropen_cust_id); END IF; IF (_exchGain <> 0) THEN PERFORM insertGLTransaction(fetchJournalNumber('AR-MISC'), 'A/R', 'CR', _p.aropen_docnumber, 'CM Application', _araccntid, getGainLossAccntId(_araccntid), -1, _exchGain * -1, _applyDate); END IF; END LOOP; -- TODO: If this is a Customer Deposit (aropen_doctype='R') -- the we need to convert the total to a base transaction IF(_p.aropen_doctype='R') THEN SELECT insertGLTransaction(fetchJournalNumber('AR-MISC'), 'A/R', 'CD', _p.aropen_docnumber, 'CM Application', cr.accnt_id, db.accnt_id, -1, currToBase(_p.aropen_curr_id, _totalAmount, _p.aropen_docdate), _applyDate) INTO _result FROM accnt AS cr, accnt AS db WHERE ((db.accnt_id = findDeferredAccount(_p.aropen_cust_id)) AND (cr.accnt_id = findARAccount(_p.aropen_cust_id)) ); IF(NOT FOUND OR _result < 0) THEN RAISE EXCEPTION 'There was an error posting the Customer Deposit GL Transactions.'; END IF; END IF; -- Record the amount posted and mark the source aropen as closed if it is completely posted UPDATE aropen SET aropen_paid = round(aropen_paid + _totalAmount, 2) WHERE (aropen_id=pAropenid); UPDATE aropen SET aropen_open = (round(aropen_amount, 2) > round(aropen_paid, 2)) WHERE (aropen_id=pAropenid); RETURN pAropenid; END; $_$; ADROP FUNCTION public.postarcreditmemoapplication(integer, date); publicadminfalse8399212551683099postaropenitems()FUNCTION8CREATE FUNCTION postaropenitems() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE aropen SET aropen_posted=TRUE WHERE (NOT aropen_posted); RETURN TRUE; END; $$; (DROP FUNCTION public.postaropenitems(); publicadminfalse8399212551683100postbankadjustment(integer)FUNCTIONCREATE FUNCTION postbankadjustment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankadjid ALIAS FOR $1; _sequence INTEGER; _r RECORD; BEGIN -- Post the G/L transaction SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), 'G/L', 'AD', bankadj_docnumber, (bankadjtype_name || '-' || bankadj_notes), bankadjtype_accnt_id, bankaccnt_accnt_id, bankadj_id, round(currToBase(bankaccnt_curr_id, CASE WHEN(bankadjtype_iscredit) THEN (bankadj_amount * -1) ELSE bankadj_amount END, bankadj_date), 2), bankadj_date, TRUE, TRUE ) INTO _sequence FROM bankadj, bankaccnt, bankadjtype WHERE ( (bankadj_bankaccnt_id=bankaccnt_id) AND (bankadj_bankadjtype_id=bankadjtype_id) AND (NOT bankadj_posted) AND (bankadj_id=pBankadjid) ); IF ( NOT FOUND ) THEN RETURN -1; END IF; IF (_sequence >= 0) THEN -- Update the bankadj record with this sequence and mark it posted UPDATE bankadj SET bankadj_sequence = _sequence, bankadj_posted = TRUE WHERE bankadj_id=pBankadjid; END IF; RETURN _sequence; END; $_$; 2DROP FUNCTION public.postbankadjustment(integer); publicadminfalse8399212551683101postbankreconciliation(integer)FUNCTION. CREATE FUNCTION postbankreconciliation(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankrecid ALIAS FOR $1; _accntid INTEGER; _sequence INTEGER; _gltransid INTEGER; _r RECORD; BEGIN -- Check the accnt information to make sure it is valid SELECT accnt_id INTO _accntid FROM bankrec, bankaccnt, accnt WHERE ( (bankaccnt_accnt_id=accnt_id) AND (bankrec_bankaccnt_id=bankaccnt_id) AND (bankrec_id=pBankrecid) ); IF ( NOT FOUND ) THEN RETURN -1; END IF; -- Delete any bankrecitem records that are not marked as cleared for cleanliness DELETE FROM bankrecitem WHERE ( (NOT bankrecitem_cleared) AND (bankrecitem_bankrec_id=pBankrecid) ); -- Post any bankadj items that were marked as cleared and convert the bankrecitem FOR _r IN SELECT bankrecitem_id, bankrecitem_source_id FROM bankrecitem, bankadj WHERE ( (bankrecitem_source = 'AD') AND (bankrecitem_source_id=bankadj_id) AND (bankrecitem_cleared) AND (NOT bankadj_posted) AND (bankrecitem_bankrec_id=pBankrecid) ) LOOP SELECT postBankAdjustment(_r.bankrecitem_source_id) INTO _sequence; IF (_sequence < 0) THEN RETURN -10; END IF; SELECT gltrans_id INTO _gltransid FROM gltrans WHERE ( (gltrans_sequence=_sequence) AND (gltrans_accnt_id=_accntid) ); IF ( NOT FOUND ) THEN RETURN -11; END IF; UPDATE bankrecitem SET bankrecitem_source = 'GL', bankrecitem_source_id=_gltransid WHERE (bankrecitem_id=_r.bankrecitem_id); END LOOP; -- Mark all the gltrans items that have been cleared as reconciled. UPDATE gltrans SET gltrans_rec = TRUE WHERE ( (gltrans_id IN (SELECT bankrecitem_source_id FROM bankrecitem WHERE ((bankrecitem_source = 'GL') AND (bankrecitem_cleared) AND (bankrecitem_bankrec_id=pBankrecid) ) ) ) AND (gltrans_accnt_id=_accntid) ) ; -- Mark all the sltrans items that have been cleared as reconciled. UPDATE sltrans SET sltrans_rec = TRUE WHERE ( (sltrans_id IN (SELECT bankrecitem_source_id FROM bankrecitem WHERE ((bankrecitem_source = 'SL') AND (bankrecitem_cleared) AND (bankrecitem_bankrec_id=pBankrecid) ) ) ) AND (sltrans_accnt_id=_accntid) ) ; -- Mark the bankrec record as posted UPDATE bankrec SET bankrec_posted = TRUE, bankrec_postdate = now() WHERE (bankrec_id=pBankrecid); RETURN pBankrecid; END; $_$; 6DROP FUNCTION public.postbankreconciliation(integer); publicadminfalse8399212551683102postbillingselection(integer)FUNCTIONCREATE FUNCTION postbillingselection(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; BEGIN RAISE NOTICE 'postBillingselection(integer) has been deprecated. Please use createInvoice(integer).'; RETURN createInvoice(pCobmiscid); END; $_$; 4DROP FUNCTION public.postbillingselection(integer); publicadminfalse8399212551683103)postbillingselectionconsolidated(integer)FUNCTIONCREATE FUNCTION postbillingselectionconsolidated(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustid ALIAS FOR $1; BEGIN RAISE NOTICE 'postBillingselectionConsolidated(integer) has been deprecated. Please use createInvoiceConsolidated(integer).'; RETURN createInvoiceConsolidated(pCustid); END; $_$; @DROP FUNCTION public.postbillingselectionconsolidated(integer); publicadminfalse8399212551683104postbillingselections()FUNCTIONbCREATE FUNCTION postbillingselections() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postBillingselections() has been deprecated. Please use createInvoices().'; RETURN createInvoices(); END; $$; .DROP FUNCTION public.postbillingselections(); publicadminfalse8399212551683105postbillingselections(integer)FUNCTIONvCREATE FUNCTION postbillingselections(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postBillingselections(int) has been deprecated. Please use createInvoices(int).'; RETURN createInvoices($1, false); END; $_$; 5DROP FUNCTION public.postbillingselections(integer); publicadminfalse8399212551683106'postbillingselections(integer, boolean)FUNCTIONCREATE FUNCTION postbillingselections(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCustTypeId ALIAS FOR $1; pConsolidate ALIAS FOR $2; BEGIN RAISE NOTICE 'postBillingselections(int,bool) has been deprecated. Please use createInvoices(int,bool).'; RETURN createInvoices(pCustTypeId, pConsolidate); END; $_$; >DROP FUNCTION public.postbillingselections(integer, boolean); publicadminfalse83992g12551683107!postcashreceipt(integer, integer)FUNCTION@CREATE FUNCTION postcashreceipt(pcashrcptid integer, pjournalnumber integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ccpayid INTEGER; _cctype TEXT; _p RECORD; _r RECORD; _t RECORD; _v RECORD; _postToAR NUMERIC; _postToMisc NUMERIC; _postToCM NUMERIC; _posted_base NUMERIC := 0; _posted NUMERIC := 0; _sequence INTEGER; _aropenid INTEGER; _arMemoNumber TEXT; _arAccntid INTEGER; _closed BOOLEAN; _debitAccntid INTEGER; _exchGain NUMERIC; _comment TEXT; _predist BOOLEAN; _check INTEGER; BEGIN _posted := 0; _posted_base := 0; SELECT fetchGLSequence() INTO _sequence; SELECT accnt_id INTO _arAccntid FROM cashrcpt, accnt, salescat WHERE ((cashrcpt_salescat_id=salescat_id) AND (salescat_ar_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid)); IF (NOT FOUND) THEN SELECT accnt_id INTO _arAccntid FROM cashrcpt LEFT OUTER JOIN accnt ON (accnt_id=findARAccount(cashrcpt_cust_id)) WHERE ( (findARAccount(cashrcpt_cust_id)=0 OR accnt_id > 0) -- G/L interface might be disabled AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -5; END IF; END IF; SELECT cashrcpt_cust_id, (cust_number||'-'||cust_name) AS custnote, cashrcpt_fundstype, cashrcpt_number, cashrcpt_docnumber, cashrcpt_distdate, cashrcpt_amount, cashrcpt_discount, (cashrcpt_amount / cashrcpt_curr_rate) AS cashrcpt_amount_base, (cashrcpt_discount / cashrcpt_curr_rate) AS cashrcpt_discount_base, cashrcpt_notes, cashrcpt_bankaccnt_id AS bankaccnt_id, accnt_id AS prepaid_accnt_id, cashrcpt_usecustdeposit, COALESCE(cashrcpt_applydate, cashrcpt_distdate) AS applydate, cashrcpt_curr_id, cashrcpt_curr_rate, cashrcpt_posted, cashrcpt_void INTO _p FROM cashrcpt LEFT OUTER JOIN custinfo ON (cashrcpt_cust_id=cust_id) LEFT OUTER JOIN accnt ON (accnt_id=findPrepaidAccount(cashrcpt_cust_id)) WHERE ( (findPrepaidAccount(cashrcpt_cust_id)=0 OR accnt_id > 0) -- G/L interface might be disabled AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -7; END IF; IF (COALESCE(_p.cashrcpt_distdate > _p.applydate, false)) THEN RAISE EXCEPTION 'Cannot post cashrcpt % because application date is before distribution date.', _p.cashrcpt_docnumber; END IF; IF (COALESCE(_p.cashrcpt_posted, false)) THEN RAISE EXCEPTION 'Cannot post cashrcpt % because the document has already been posted.', _p.cashrcpt_docnumber; END IF; IF (COALESCE(_p.cashrcpt_void, false)) THEN RAISE EXCEPTION 'Cannot post cashrcpt % because the document has been voided.', _p.cashrcpt_docnumber; END IF; _predist := COALESCE(_p.cashrcpt_distdate < _p.applydate, false); IF (_p.cashrcpt_fundstype IN ('A', 'D', 'M', 'V')) THEN SELECT ccpay_id, ccpay_type INTO _ccpayid, _cctype FROM ccpay WHERE ((ccpay_r_ordernum IN (CAST(pCashrcptid AS TEXT), _p.cashrcpt_docnumber)) AND (ccpay_status IN ('C', 'A'))); IF NOT FOUND THEN -- the following select seems to work except for xikar - bug 8848. why? -- raise warning so there is some visibility if people fall into this path. SELECT ccpay_id, ccpay_type INTO _ccpayid, _cctype FROM ccpay WHERE ((ccpay_order_number IN (CAST(pCashrcptid AS TEXT), _p.cashrcpt_docnumber)) AND (ccpay_status IN ('C', 'A'))); IF (NOT FOUND) THEN RETURN -8; ELSE RAISE NOTICE 'PostCashReceipt() found ccpay_id % for order number %/% (ref 8848).', _ccpayid, pCashrcptid, _p.cashrcpt_docnumber; END IF; END IF; -- If there is a ccpay entry and the card was charged directly, use the prepaid account IF (_cctype = 'C' ) THEN _debitAccntid := findPrepaidAccount(_p.cashrcpt_cust_id); -- If there is a ccpay entry and the card was preauthed and then charged, use the Bank account ELSE SELECT accnt_id INTO _debitAccntid FROM cashrcpt, bankaccnt, accnt WHERE ( (cashrcpt_bankaccnt_id=bankaccnt_id) AND (bankaccnt_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -6; END IF; END IF; ELSE SELECT accnt_id INTO _debitAccntid FROM cashrcpt, bankaccnt, accnt WHERE ( (cashrcpt_bankaccnt_id=bankaccnt_id) AND (bankaccnt_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -6; END IF; END IF; -- Determine the amount to post to A/R Open Items SELECT COALESCE(SUM(cashrcptitem_amount), 0) INTO _postToAR FROM cashrcptitem JOIN aropen ON (aropen_id=cashrcptitem_aropen_id) WHERE (cashrcptitem_cashrcpt_id=pCashrcptid); IF (NOT FOUND) THEN _postToAR := 0; END IF; -- Determine the amount to post to Misc. Distributions SELECT COALESCE(SUM(cashrcptmisc_amount), 0) INTO _postToMisc FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid); IF (NOT FOUND) THEN _postToMisc := 0; END IF; -- Determine the amount to post to Discount Credit Memo SELECT COALESCE(SUM(cashrcptitem_discount), 0) INTO _postToCM FROM cashrcptitem JOIN aropen ON ( (aropen_id=cashrcptitem_aropen_id) AND (aropen_doctype IN ('I', 'D')) ) WHERE (cashrcptitem_cashrcpt_id=pCashrcptid); IF (NOT FOUND) THEN _postToCM := 0; END IF; -- Check to see if the C/R is over applied IF ((_postToAR + _postToMisc) > _p.cashrcpt_amount) THEN RETURN -1; END IF; -- Check to see if the C/R is positive amount IF (_p.cashrcpt_amount <= 0) THEN RETURN -2; END IF; -- Distribute A/R Applications FOR _r IN SELECT aropen_id, aropen_doctype, aropen_docnumber, aropen_docdate, aropen_duedate, aropen_curr_id, aropen_curr_rate, aropen_amount, round(aropen_amount - aropen_paid, 2) <= round(currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_amount + cashrcptitem_discount),_p.cashrcpt_distdate),2) AS closed, cashrcptitem_id, cashrcptitem_amount, cashrcptitem_discount, (cashrcptitem_amount / _p.cashrcpt_curr_rate) AS cashrcptitem_amount_base, (cashrcptitem_discount / _p.cashrcpt_curr_rate) AS cashrcptitem_discount_base, round(aropen_paid + currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_amount),_p.cashrcpt_distdate),2) AS new_paid, round(currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,cashrcptitem_discount,_p.cashrcpt_distdate),2) AS new_discount FROM cashrcptitem JOIN aropen ON (aropen_id=cashrcptitem_aropen_id) WHERE ((cashrcptitem_cashrcpt_id=pCashrcptid) AND (NOT _predist OR aropen_doctype IN ('C','R'))) LOOP -- Handle discount IF (_r.cashrcptitem_discount_base > 0) THEN PERFORM postCashReceiptDisc(_r.cashrcptitem_id, pJournalNumber); END IF; -- Update the aropen item to post the paid amount UPDATE aropen SET aropen_paid = _r.new_paid + _r.new_discount, aropen_open = (NOT _r.closed), aropen_closedate = CASE WHEN _r.closed THEN _p.cashrcpt_distdate END WHERE (aropen_id=_r.aropen_id); -- Cache the running amount posted _posted_base := _posted_base + _r.cashrcptitem_amount_base; _posted := _posted + _r.cashrcptitem_amount; -- Record the cashrcpt application IF (_r.aropen_doctype IN ('I','D')) THEN INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_reftype, arapply_ref_id, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id ) VALUES ( _p.cashrcpt_cust_id, -1, 'K', _p.cashrcpt_number, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, _p.cashrcpt_fundstype, _p.cashrcpt_docnumber, 'CRA', _r.cashrcptitem_id, round(_r.cashrcptitem_amount, 2), _r.closed, _p.applydate, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id); ELSE INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_reftype, arapply_ref_id, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id ) VALUES ( _p.cashrcpt_cust_id, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, -1, 'R', _p.cashrcpt_number, '', '', 'CRA', _r.cashrcptitem_id, round(abs(_r.cashrcptitem_amount), 2), _r.closed, _p.applydate, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id ); END IF; _exchGain := arCurrGain(_r.aropen_id,_p.cashrcpt_curr_id, abs(_r.cashrcptitem_amount), _p.cashrcpt_distdate); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', (_r.aropen_doctype || '-' || _r.aropen_docnumber), CASE WHEN _r.aropen_doctype != 'R' THEN _arAccntid ELSE findDeferredAccount(_p.cashrcpt_cust_id) END, round(_r.cashrcptitem_amount_base + _exchGain, 2), _p.cashrcpt_distdate, _p.custnote, pCashrcptid ); IF (_exchGain <> 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/R', 'CR', _r.aropen_doctype || '-' || _r.aropen_docnumber, getGainLossAccntId( CASE WHEN _r.aropen_doctype != 'R' THEN _arAccntid ELSE findDeferredAccount(_p.cashrcpt_cust_id) END ), round(_exchGain, 2) * -1, _p.cashrcpt_distdate, _p.custnote, pCashrcptid); END IF; END LOOP; -- Distribute Misc. Applications FOR _r IN SELECT cashrcptmisc_id, cashrcptmisc_accnt_id, cashrcptmisc_amount, (cashrcptmisc_amount / cashrcpt_curr_rate) AS cashrcptmisc_amount_base, cashrcptmisc_notes, cashrcpt_curr_id FROM cashrcptmisc JOIN cashrcpt ON (cashrcptmisc_cashrcpt_id = cashrcpt_id) WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid) LOOP -- Cache the running amount posted _posted_base := (_posted_base + _r.cashrcptmisc_amount_base); _posted := (_posted + _r.cashrcptmisc_amount); -- Record the cashrcpt application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id, arapply_reftype, arapply_ref_id ) VALUES ( _p.cashrcpt_cust_id, -1, 'K', '', -1, 'Misc.', '', _p.cashrcpt_fundstype, _p.cashrcpt_docnumber, round(_r.cashrcptmisc_amount, 2), TRUE, _p.applydate, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _r.cashrcpt_curr_id, 'CRD', _r.cashrcptmisc_id ); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', _r.cashrcptmisc_notes, _r.cashrcptmisc_accnt_id, round(_r.cashrcptmisc_amount_base, 2), _p.cashrcpt_distdate, _p.custnote, pCashrcptid ); END LOOP; -- Post any remaining Cash to an A/R Cash Despoit (Credit Memo) -- this credit memo may absorb an occasional currency exchange rounding error IF (round(_posted_base, 2) < round(_p.cashrcpt_amount_base, 2)) THEN _comment := ('Unapplied from ' || _p.cashrcpt_fundstype || '-' || _p.cashrcpt_docnumber); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', _comment, _p.prepaid_accnt_id, round(_p.cashrcpt_amount_base, 2) - round(_posted_base, 2), _p.cashrcpt_distdate, _p.custnote, pCashrcptid ); SELECT fetchArMemoNumber() INTO _arMemoNumber; IF(_p.cashrcpt_usecustdeposit) THEN -- Post Customer Deposit SELECT createARCashDeposit(_p.cashrcpt_cust_id, _arMemoNumber, '', _p.cashrcpt_distdate, (_p.cashrcpt_amount - _posted), _comment, pJournalNumber, _p.cashrcpt_curr_id) INTO _aropenid; ELSE -- Post A/R Credit Memo _aropenid := createARCreditMemo(NULL, _p.cashrcpt_cust_id, _arMemoNumber, '', _p.cashrcpt_distdate, (_p.cashrcpt_amount - _posted), _comment, -1, -1, -1, _p.cashrcpt_distdate, -1, NULL, 0, pJournalNumber, _p.cashrcpt_curr_id, _arAccntid); END IF; IF (_ccpayid IS NOT NULL) THEN INSERT INTO payaropen (payaropen_ccpay_id, payaropen_aropen_id, payaropen_amount, payaropen_curr_id ) VALUES (_ccpayid, _aropenid, _p.cashrcpt_amount, _p.cashrcpt_curr_id); END IF; -- Create Cash Receipt Item to capture posting IF (_predist=false) THEN INSERT INTO cashrcptitem ( cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount, cashrcptitem_applied ) VALUES ( pCashrcptid, _aropenid, (_p.cashrcpt_amount - _posted), false ); END IF; ELSIF (round(_posted_base, 2) > round((_p.cashrcpt_amount_base), 2)) THEN PERFORM insertIntoGLSeries(_sequence, 'A/R', 'CR', 'Currency Exchange Rounding - ' || _p.cashrcpt_docnumber, getGainLossAccntId(_debitAccntid), round(_posted_base, 2) - round((_p.cashrcpt_amount_base + _p.cashrcpt_discount_base), 2), _p.cashrcpt_distdate, _p.custnote, pCashrcptid); END IF; -- Debit Cash PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', (_p.cashrcpt_fundstype || '-' || _p.cashrcpt_docnumber), _debitAccntid, round(_p.cashrcpt_amount_base, 2) * -1, _p.cashrcpt_distdate, _p.custnote, pCashrcptid ); PERFORM postGLSeries(_sequence, pJournalNumber); -- convert the cashrcptitem records to applications against the cm/cd if we are _predist IF(_predist=true) THEN FOR _r IN SELECT * FROM cashrcptitem WHERE ((cashrcptitem_cashrcpt_id=pCashrcptid) AND (cashrcptitem_amount > 0)) LOOP -- Handle discount if applicable IF (_r.cashrcptitem_discount > 0) THEN PERFORM postCashReceiptDisc(_r.cashrcptitem_id, pJournalNumber); END IF; INSERT INTO arcreditapply (arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id) VALUES(_aropenid, _r.cashrcptitem_aropen_id, _r.cashrcptitem_amount, _p.cashrcpt_curr_id); _posted := (_posted + _r.cashrcptitem_amount); END LOOP; PERFORM postArCreditMemoApplication(_aropenid, _p.applydate); -- If there is any left over go ahead and create an additional cashrcptitem record for it with the amount IF (round(_posted, 2) < round(_p.cashrcpt_amount, 2)) THEN INSERT INTO cashrcptitem ( cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount, cashrcptitem_applied ) VALUES ( pCashrcptid, _aropenid, (_p.cashrcpt_amount - _posted), false ); END IF; END IF; -- Update the posted cashrcpt UPDATE cashrcpt SET cashrcpt_posted=TRUE, cashrcpt_posteddate=CURRENT_DATE, cashrcpt_postedby=getEffectiveXtUser() WHERE (cashrcpt_id=pCashrcptid); RETURN 1; END; $$; SDROP FUNCTION public.postcashreceipt(pcashrcptid integer, pjournalnumber integer); publicadminfalse8399212551683109%postcashreceiptdisc(integer, integer)FUNCTIONCREATE FUNCTION postcashreceiptdisc(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptItemId ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _r RECORD; _t RECORD; _v RECORD; _ardiscountid INTEGER; _arMemoNumber TEXT; _arAccntid INTEGER; _discountAccntid INTEGER; _comment TEXT; _discprcnt NUMERIC; _check INTEGER; BEGIN -- Fetch base records for processing SELECT aropen_id, aropen_doctype, aropen_amount, cashrcptitem_discount, cashrcpt_cust_id, cashrcpt_distdate, cashrcpt_applydate, cashrcpt_curr_id, cashrcpt_fundstype, cashrcpt_docnumber, round(currToCurr(cashrcpt_curr_id, aropen_curr_id, cashrcptitem_discount, cashrcpt_distdate),2) AS aropen_discount INTO _r FROM cashrcptitem JOIN cashrcpt ON (cashrcptitem_cashrcpt_id=cashrcpt_id) JOIN aropen ON ( (aropen_id=cashrcptitem_aropen_id) AND (aropen_doctype IN ('I', 'D')) ) WHERE (cashrcptitem_id=pCashrcptItemId); -- Get discount account _discountAccntid := findardiscountaccount(_r.cashrcpt_cust_id); IF (_r.cashrcptitem_discount > 0) THEN -- Determine discount percentage _discprcnt := _r.aropen_discount / _r.aropen_amount; SELECT fetchArMemoNumber() INTO _arMemoNumber; _comment := 'Discount Credit from ' || _r.cashrcpt_fundstype || '-' || _r.cashrcpt_docnumber; -- Create misc credit memo record _ardiscountid := nextval('aropen_aropen_id_seq'); INSERT INTO aropen ( aropen_id, aropen_docdate, aropen_duedate, aropen_doctype, aropen_docnumber, aropen_curr_id, aropen_posted, aropen_amount) VALUES ( _ardiscountid, _r.cashrcpt_distdate, _r.cashrcpt_distdate, 'C', _arMemoNumber, _r.cashrcpt_curr_id, false,_r.cashrcptitem_discount); IF (fetchMetricBool('CreditTaxDiscount')) THEN -- proportional tax credits calculated and implemented for the credit memo generated by the discount IF (_r.aropen_doctype = 'I') THEN -- Tax for invoices SELECT aropen_cobmisc_id AS invcheadid, invchead_curr_id, invchead_invcdate INTO _t FROM aropen LEFT OUTER JOIN invchead ON (aropen_cobmisc_id = invchead_id) LEFT OUTER JOIN invcitem ON (invchead_id = invcitem_invchead_id) WHERE aropen_id = _r.aropen_id; FOR _v IN SELECT tax_sales_accnt_id, tax_id, round(sum(taxdetail_tax), 2) AS tax, currToBase(_t.invchead_curr_id, round(sum(taxdetail_tax), 2), _t.invchead_invcdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('I', _t.invcheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP INSERT INTO aropentax( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_basis) VALUES ( _ardiscountid, getadjustmenttaxtypeid(), _v.tax_id, 0.00, 0.00, (round((_v.tax * _discprcnt), 2) * -1), _r.cashrcpt_distdate, 0.00); END LOOP; ELSIF (_r.aropen_doctype = 'D') THEN -- Tax for debit memos INSERT INTO aropentax( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_basis) SELECT _ardiscountid, taxhist_taxtype_id, taxhist_tax_id, 0.00, 0.00, (round((taxhist_tax * _discprcnt), 2) * -1), _r.cashrcpt_distdate, 0.00 FROM aropentax WHERE (taxhist_parent_id=_r.aropen_id); END IF; END IF; -- End taxes -- Create credit memo for discount SELECT createARCreditMemo(_ardiscountid, _r.cashrcpt_cust_id, _arMemoNumber, '', _r.cashrcpt_distdate, _r.cashrcptitem_discount, _comment, -1, -1, _discountAccntid, _r.cashrcpt_distdate, -1, NULL, 0, pJournalNumber, _r.cashrcpt_curr_id) INTO _ardiscountid; -- Apply discount credit memo INSERT INTO arcreditapply ( arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id ) VALUES ( _ardiscountid, _r.aropen_id, _r.cashrcptitem_discount, _r.cashrcpt_curr_id ); SELECT postARCreditMemoApplication(_ardiscountid, _r.cashrcpt_applydate) INTO _check; IF (_check < 0) THEN RAISE EXCEPTION 'Error posting discount credit memo application. Code %', _check; END IF; END IF; -- End handle Discount RETURN 1; END; $_$; <DROP FUNCTION public.postcashreceiptdisc(integer, integer); publicadminfalse83992125516831112postcccashreceipt(integer, integer, text, numeric)FUNCTIONLCREATE FUNCTION postcccashreceipt(pccpay integer, pdocid integer, pdoctype text DEFAULT NULL::text, pamount numeric DEFAULT NULL::numeric) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _aropenid INTEGER; _bankaccnt_id INTEGER; _c RECORD; _ccOrderDesc TEXT; _journal INTEGER; _realaccnt INTEGER; _return INTEGER := 0; BEGIN SELECT * INTO _c FROM ccpay, ccard, custinfo WHERE ( (ccpay_id = pCCpay) AND (ccpay_ccard_id = ccard_id) AND (ccpay_cust_id = cust_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot find the Credit Card transaction information [xtuple: postCCcashReceipt, -11, %]', pCCpay; END IF; IF (pamount IS NOT NULL) THEN _c.ccpay_amount = pamount; END IF; SELECT bankaccnt_id, bankaccnt_accnt_id INTO _bankaccnt_id, _realaccnt FROM ccbank JOIN bankaccnt ON (ccbank_bankaccnt_id=bankaccnt_id) WHERE (ccbank_ccard_type=_c.ccard_type); IF (_bankaccnt_id IS NULL) THEN RAISE EXCEPTION 'Cannot find the default Bank Account for this Credit Card [xtuple: postCCcredit, -1, %]', _c.ccard_type; END IF; _ccOrderDesc := (_c.ccard_type || '-' || _c.ccpay_order_number::TEXT || '-' || _c.ccpay_order_number_seq::TEXT); _journal := fetchJournalNumber('C/R'); IF (pdoctype = 'cashrcpt') THEN IF (COALESCE(pdocid, -1) < 0) THEN INSERT INTO cashrcpt ( cashrcpt_cust_id, cashrcpt_amount, cashrcpt_curr_id, cashrcpt_fundstype, cashrcpt_docnumber, cashrcpt_notes, cashrcpt_distdate, cashrcpt_bankaccnt_id, cashrcpt_usecustdeposit ) VALUES ( _c.ccpay_cust_id, _c.ccpay_amount, _c.ccpay_curr_id, _c.ccard_type, _c.ccpay_r_ordernum, _ccOrderDesc, CURRENT_DATE, _bankaccnt_id, fetchMetricBool('EnableCustomerDeposits')) RETURNING cashrcpt_id INTO _return; ELSE UPDATE cashrcpt SET cashrcpt_cust_id=_c.ccpay_cust_id, cashrcpt_amount=_c.ccpay_amount, cashrcpt_curr_id=_c.ccpay_curr_id, cashrcpt_fundstype=_c.ccard_type, cashrcpt_docnumber=_c.ccpay_r_ordernum, cashrcpt_notes=_ccOrderDesc, cashrcpt_distdate=CURRENT_DATE, cashrcpt_bankaccnt_id=_bankaccnt_id WHERE (cashrcpt_id=pdocid); _return := pdocid; END IF; ELSIF (pdoctype = 'cohead') THEN SELECT createARCreditMemo(NULL, _c.ccpay_cust_id, fetchArMemoNumber(), cohead_number, CURRENT_DATE, _c.ccpay_amount, 'Unapplied from ' || _ccOrderDesc, NULL, NULL, NULL, CURRENT_DATE, NULL, cohead_salesrep_id, NULL, _journal, _c.ccpay_curr_id, NULL, pCCpay) INTO _aropenid FROM cohead WHERE cohead_id = pdocid; IF (COALESCE(_aropenid, -1) < 0) THEN -- coalesce handles not-found case RAISE EXCEPTION '[xtuple: createARCreditMemo, %]', _aropenid; END IF; INSERT INTO payaropen (payaropen_ccpay_id, payaropen_aropen_id, payaropen_amount, payaropen_curr_id) VALUES (pccpay, _aropenid, _c.ccpay_amount, _c.ccpay_curr_id); INSERT INTO aropenalloc (aropenalloc_aropen_id, aropenalloc_doctype, aropenalloc_doc_id, aropenalloc_amount, aropenalloc_curr_id) VALUES (_aropenid, 'S', pdocid, _c.ccpay_amount, _c.ccpay_curr_id); _return := _aropenid; END IF; PERFORM insertGLTransaction(_journal, 'A/R', 'CR', _ccOrderDesc, ('Cash Receipt from Credit Card ' || _c.cust_name), findPrepaidAccount(_c.ccpay_cust_id), _realaccnt, NULL, ROUND(currToBase(_c.ccpay_curr_id, _c.ccpay_amount, _c.ccpay_transaction_datetime::DATE),2), CURRENT_DATE); RETURN _return; END; $$; hDROP FUNCTION public.postcccashreceipt(pccpay integer, pdocid integer, pdoctype text, pamount numeric); publicadminfalse8399212551683112$postcccredit(integer, text, integer)FUNCTIONCREATE FUNCTION postcccredit(integer, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCCpay ALIAS FOR $1; preftype ALIAS FOR $2; prefid ALIAS FOR $3; _c RECORD; _ccOrderDesc TEXT; _cglaccnt INTEGER; _dglaccnt INTEGER; _glseriesres INTEGER; _notes TEXT := 'Credit via Credit Card'; _r RECORD; _sequence INTEGER; _dmaropenid INTEGER; BEGIN IF ((preftype = 'cohead') AND NOT EXISTS(SELECT cohead_id FROM cohead WHERE (cohead_id=prefid))) THEN RAISE EXCEPTION 'Cannot find original Sales Order for this Credit Card credit [xtuple: postCCcredit, -2, %, %, %]', pCCpay, preftype, prefid; ELSIF ((preftype = 'aropen') AND NOT EXISTS(SELECT aropen_id FROM aropen WHERE (aropen_id=prefid))) THEN RAISE EXCEPTION 'Cannot find original A/R Open record for this Credit Card credit [xtuple: postCCcredit, -2, %, %, %]', pCCpay, preftype, prefid; ELSIF ((preftype = 'cmhead') AND NOT EXISTS(SELECT cmhead_id FROM cmhead WHERE cmhead_id=prefid)) THEN RAISE EXCEPTION 'Cannot find original Credit Memo record for this Credit Card credit [xtuple: postCCcredit, -2, %, %, %]', pCCpay, preftype, prefid; END IF; SELECT * INTO _c FROM ccpay JOIN ccard ON (ccpay_ccard_id = ccard_id) JOIN ccbank ON (ccard_type=ccbank_ccard_type) WHERE (ccpay_id = pCCpay); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot find the record for this Credit Card credit [xtuple: postCCcredit, -3, %, %, %]', pCCpay, preftype, prefid; END IF; IF (preftype = 'cohead') THEN _dglaccnt := findPrepaidAccount(_c.ccpay_cust_id); ELSE _dglaccnt := findARAccount(_c.ccpay_cust_id); END IF; SELECT bankaccnt_accnt_id INTO _cglaccnt FROM bankaccnt WHERE (bankaccnt_id=_c.ccbank_bankaccnt_id); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot find the default Bank Account for this Credit Card [xtuple: postCCcredit, -1, %]', pCCpay; END IF; IF (_c.ccpay_type != 'R') THEN RAISE EXCEPTION 'This Credit Card transaction is not a credit/refund [xtuple: postCCcredit, -4, %]', pCCpay; END IF; _sequence := fetchGLSequence(); IF (_c.ccpay_r_ref IS NOT NULL) THEN _ccOrderDesc := (_c.ccard_type || '-' || _c.ccpay_r_ref); ELSE _ccOrderDesc := (_c.ccard_type || '-' || _c.ccpay_order_number::TEXT || '-' || COALESCE(_c.ccpay_order_number_seq::TEXT, '')); END IF; _glseriesres := insertIntoGLSeries(_sequence, 'A/R', 'CC', _ccOrderDesc, _dglaccnt, ROUND(currToBase(_c.ccpay_curr_id, _c.ccpay_amount, _c.ccpay_transaction_datetime::DATE), 2) * -1, CURRENT_DATE, _notes); IF (_glseriesres < 0) THEN RAISE EXCEPTION 'Could not write debit side of Credit Card credit to the G/L [xtuple: insertIntoGLSeries, %]', _glseriesres; END IF; _glseriesres := insertIntoGLSeries(_sequence, 'A/R', 'CC', _ccOrderDesc, _cglaccnt, ROUND(currToBase(_c.ccpay_curr_id, _c.ccpay_amount, _c.ccpay_transaction_datetime::DATE),2), CURRENT_DATE, _notes); IF (_glseriesres < 0) THEN RAISE EXCEPTION 'Could not write credit side of Credit Card credit to the G/L [xtuple: insertIntoGLSeries, %]', _glseriesres; END IF; _glseriesres := postGLSeries(_sequence, fetchJournalNumber('C/R') ); IF (_glseriesres < 0) THEN RAISE EXCEPTION 'Could not post Credit Card credit to the G/L [xtuple: postglseries, %]', _glseriesres; END IF; IF (preftype = 'aropen') THEN SELECT * INTO _r FROM aropen WHERE (aropen_id=prefid); ELSE SELECT aropen.* INTO _r FROM ccpay n JOIN ccpay o ON (o.ccpay_id=n.ccpay_ccpay_id) JOIN payaropen ON (payaropen_ccpay_id=o.ccpay_id) JOIN aropen ON (payaropen_aropen_id=aropen_id) WHERE (n.ccpay_id=pCCpay); END IF; IF (FOUND) THEN SELECT createardebitmemo( NULL, _r.aropen_cust_id, NULL, fetchARMemoNumber(), _r.aropen_ordernumber, current_date, _c.ccpay_amount, _notes, -1, -1, -1, CURRENT_DATE, -1, NULL, 0, _r.aropen_curr_id) INTO _dmaropenid; IF (_r.aropen_open) THEN PERFORM applyARCreditMemoToBalance(_r.aropen_id, _dmaropenid); PERFORM postARCreditMemoApplication(_r.aropen_id); END IF; END IF; IF (preftype = 'cohead') THEN INSERT INTO payco ( payco_ccpay_id, payco_cohead_id, payco_amount, payco_curr_id ) VALUES ( pCCpay, prefid, 0 - _c.ccpay_amount, _c.ccpay_curr_id ); END IF; RETURN 0; END; $_$; ;DROP FUNCTION public.postcccredit(integer, text, integer); publicadminfalse8399212551683113postccvoid(integer)FUNCTIONCREATE FUNCTION postccvoid(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pccpayid ALIAS FOR $1; BEGIN -- for now this is very simple: mark the ccpay record voided. -- in the future this might be expanded to back out changes to other tables -- but for now the VOID request is sent to the credit card processing company -- before those other tables are modified. UPDATE ccpay SET ccpay_status = 'V' WHERE (ccpay_id=pccpayid); IF (NOT FOUND) THEN RETURN -1; END IF; RETURN 0; END; $_$; *DROP FUNCTION public.postccvoid(integer); publicadminfalse8399212551683114postcheck(integer, integer)FUNCTION^*CREATE FUNCTION postcheck(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcheckid ALIAS FOR $1; _journalNumber INTEGER := $2; _amount_base NUMERIC := 0; _credit_glaccnt INTEGER; _exchGain NUMERIC := 0; _exchGainTmp NUMERIC := 0; _gltransNote TEXT; _p RECORD; _r RECORD; _t RECORD; _sequence INTEGER; _test INTEGER; _cm BOOLEAN; _amount_check NUMERIC := 0; BEGIN _cm := FALSE; SELECT fetchGLSequence() INTO _sequence; IF (_journalNumber IS NULL) THEN _journalNumber := fetchJournalNumber('AP-CK'); END IF; SELECT checkhead.*, checkhead_amount / checkhead_curr_rate AS checkhead_amount_base, bankaccnt_accnt_id AS bankaccntid INTO _p FROM checkhead JOIN bankaccnt ON (checkhead_bankaccnt_id=bankaccnt_id) WHERE (checkhead_id=pcheckid); IF (FOUND) THEN IF (_p.checkhead_recip_type = 'V') THEN SELECT vend_number AS checkrecip_number, vend_name AS checkrecip_name, findAPAccount(vend_id) AS checkrecip_accnt_id, 'A/P'::text AS checkrecip_gltrans_source INTO _t FROM vendinfo WHERE (vend_id=_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'C') THEN SELECT cust_number AS checkrecip_number, cust_name AS checkrecip_name, findARAccount(cust_id) AS checkrecip_accnt_id, 'A/R'::text AS checkrecip_gltrans_source INTO _t FROM custinfo WHERE (cust_id=_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'T') THEN SELECT taxauth_code AS checkrecip_number, taxauth_name AS checkrecip_name, taxauth_accnt_id AS checkrecip_accnt_id, 'G/L'::text AS checkrecip_gltrans_source INTO _t FROM taxauth WHERE (taxauth_id=_p.checkhead_recip_id); ELSE RETURN -11; END IF; ELSE RETURN -11; END IF; IF (_p.checkhead_posted) THEN RETURN -10; END IF; IF (_p.checkhead_recip_type = 'C') THEN SELECT checkitem_id FROM checkitem INTO _test WHERE (checkitem_checkhead_id=pcheckid) LIMIT 1; IF (FOUND) THEN _cm := TRUE; END IF; END IF; _gltransNote := _t.checkrecip_number || '-' || _t.checkrecip_name; IF (_p.checkhead_misc AND NOT _cm) THEN IF (COALESCE(_p.checkhead_expcat_id, -1) < 0) THEN IF (_p.checkhead_recip_type = 'V') THEN PERFORM createAPCreditMemo( _p.checkhead_recip_id, _journalNumber, CAST(fetchAPMemoNumber() AS text), '', _p.checkhead_checkdate, _p.checkhead_amount, _gltransNote || ' ' || _p.checkhead_notes, -1, _p.checkhead_checkdate, -1, _p.checkhead_curr_id ); _credit_glaccnt := findAPPrepaidAccount(_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'C') THEN PERFORM createARDebitMemo(NULL, _p.checkhead_recip_id, NULL, fetchARMemoNumber(), '', _p.checkhead_checkdate, _p.checkhead_amount, _gltransNote || ' ' || _p.checkhead_notes, -1, -1, -1, _p.checkhead_checkdate, -1, NULL, 0, _p.checkhead_curr_id ); _credit_glaccnt := findPrepaidAccount(_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'T') THEN -- TODO: should we create a credit memo for the tax authority? how? _credit_glaccnt := _t.checkrecip_accnt_id; END IF; -- recip type ELSE IF (_cm) THEN _credit_glaccnt := findARAccount(_p.checkhead_recip_id); ELSE SELECT expcat_exp_accnt_id INTO _credit_glaccnt FROM expcat WHERE (expcat_id=_p.checkhead_expcat_id); IF (NOT FOUND) THEN RETURN -12; END IF; END IF; END IF; IF (COALESCE(_credit_glaccnt, -1) < 0) THEN RETURN -13; END IF; PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), _credit_glaccnt, round(_p.checkhead_amount_base, 2) * -1, _p.checkhead_checkdate, _gltransNote, pcheckid ); _amount_base := _p.checkhead_amount_base; ELSE FOR _r IN SELECT checkitem_amount, checkitem_discount, CASE WHEN (checkitem_apopen_id IS NOT NULL) THEN checkitem_amount / apopen_curr_rate ELSE currToBase(checkitem_curr_id, checkitem_amount, COALESCE(checkitem_docdate, _p.checkhead_checkdate)) END AS checkitem_amount_base, currTocurr(checkitem_curr_id, _p.checkhead_curr_id, checkitem_amount, _p.checkhead_checkdate) AS amount_check, apopen_id, apopen_doctype, apopen_docnumber, aropen_id, aropen_doctype, aropen_docnumber, checkitem_curr_id, checkitem_curr_rate, apopen_curr_rate, COALESCE(checkitem_docdate, _p.checkhead_checkdate) AS docdate FROM (checkitem LEFT OUTER JOIN apopen ON (checkitem_apopen_id=apopen_id)) LEFT OUTER JOIN aropen ON (checkitem_aropen_id=aropen_id) WHERE (checkitem_checkhead_id=pcheckid) LOOP _exchGainTmp := 0; IF (_r.apopen_id IS NOT NULL) THEN -- take the discount if specified before we do anything else IF(_r.checkitem_discount > 0.0) THEN PERFORM createAPDiscount(_r.apopen_id, _r.checkitem_discount); END IF; UPDATE apopen SET apopen_paid = round(apopen_paid + _r.checkitem_amount, 2), apopen_open = round(apopen_amount, 2) > round(apopen_paid + _r.checkitem_amount, 2), apopen_closedate = CASE WHEN (round(apopen_amount, 2) <= round(apopen_paid + _r.checkitem_amount, 2)) THEN _p.checkhead_checkdate END WHERE (apopen_id=_r.apopen_id); -- Post the application INSERT INTO apapply ( apapply_vend_id, apapply_postdate, apapply_username, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_journalnumber, apapply_amount, apapply_curr_id, apapply_checkhead_id ) VALUES ( _p.checkhead_recip_id, _p.checkhead_checkdate, getEffectiveXtUser(), -1, 'K', _p.checkhead_number, _r.apopen_id, _r.apopen_doctype, _r.apopen_docnumber, _journalNumber, _r.checkitem_amount, _r.checkitem_curr_id, _p.checkhead_id ); END IF; -- if check item's apopen_id is not null IF (_r.aropen_id IS NOT NULL) THEN UPDATE aropen SET aropen_paid = round(aropen_paid + _r.checkitem_amount, 2), aropen_open = round(aropen_amount, 2) > round(aropen_paid + _r.checkitem_amount, 2), aropen_closedate = CASE WHEN (round(aropen_amount, 2) <= round(aropen_paid + _r.checkitem_amount, 2)) THEN _p.checkhead_checkdate END WHERE (aropen_id=_r.aropen_id); -- Post the application INSERT INTO arapply ( arapply_cust_id, arapply_postdate, arapply_distdate, arapply_username, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_journalnumber, arapply_applied, arapply_curr_id ) VALUES ( _p.checkhead_recip_id, _p.checkhead_checkdate, _p.checkhead_checkdate, getEffectiveXtUser(), _r.aropen_id,_r.aropen_doctype, _r.aropen_docnumber, -1, 'K',_p.checkhead_number , _journalNumber, _r.checkitem_amount, _r.checkitem_curr_id ); END IF; -- if check item's aropen_id is not null IF (_r.apopen_id IS NOT NULL) THEN SELECT apCurrGain(_r.apopen_id,_r.checkitem_curr_id, _r.checkitem_amount, _p.checkhead_checkdate) INTO _exchGainTmp; ELSIF (_r.aropen_id IS NOT NULL) THEN SELECT arCurrGain(_r.aropen_id,_r.checkitem_curr_id, _r.checkitem_amount, _p.checkhead_checkdate) INTO _exchGainTmp; END IF; _exchGain := _exchGain + _exchGainTmp; PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), _t.checkrecip_accnt_id, round(_r.checkitem_amount_base, 2) * -1, _p.checkhead_checkdate, _gltransNote, pcheckid ); IF (_exchGainTmp <> 0) THEN PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), getGainLossAccntId(_t.checkrecip_accnt_id), round(_exchGainTmp,2), _p.checkhead_checkdate, _gltransNote, pcheckid ); END IF; _amount_check := (_amount_check + _r.amount_check); _amount_base := (_amount_base + _r.checkitem_amount_base); END LOOP; IF( (_amount_check - _p.checkhead_amount) <> 0.0 ) THEN _exchGainTmp := currToBase(_p.checkhead_curr_id, _amount_check - _p.checkhead_amount, _p.checkhead_checkdate); _exchGain := _exchGain + _exchGainTmp; END IF; -- ensure that the check balances, attribute rounding errors to gain/loss IF round(_amount_base, 2) - round(_exchGain, 2) <> round(_p.checkhead_amount_base, 2) THEN IF round(_amount_base - _exchGain, 2) = round(_p.checkhead_amount_base, 2) THEN PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), getGainLossAccntId(_p.bankaccntid), round(_amount_base, 2) - round(_exchGain, 2) - round(_p.checkhead_amount_base, 2), _p.checkhead_checkdate, _gltransNote, pcheckid ); ELSE RAISE EXCEPTION 'checkhead_id % does not balance (% - % <> %)', pcheckid, _amount_base, _exchGain, _p.checkhead_amount_base; END IF; END IF; END IF; PERFORM insertIntoGLSeries( _sequence, _t.checkrecip_gltrans_source, 'CK', CAST(_p.checkhead_number AS TEXT), _p.bankaccntid, round(_p.checkhead_amount_base, 2), _p.checkhead_checkdate, _gltransNote, pcheckid ); PERFORM postGLSeries(_sequence, _journalNumber); UPDATE checkhead SET checkhead_posted=TRUE, checkhead_journalnumber=_journalNumber WHERE (checkhead_id=pcheckid); RETURN _journalNumber; END; $_$; 2DROP FUNCTION public.postcheck(integer, integer); publicadminfalse8399212551683116postchecks(integer)FUNCTIONOCREATE FUNCTION postchecks(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; _journalNumber INTEGER; BEGIN SELECT fetchJournalNumber('AP-CK') INTO _journalNumber; PERFORM postCheck(checkhead_id, _journalNumber) FROM checkhead WHERE ( (NOT checkhead_void) AND (NOT checkhead_posted) AND (checkhead_printed) AND (checkhead_bankaccnt_id=pBankaccntid) ); RETURN _journalNumber; END; $_$; *DROP FUNCTION public.postchecks(integer); publicadminfalse8399212551683117)postcomment(integer, text, integer, text)FUNCTIONhCREATE FUNCTION postcomment(pcmnttypeid integer, psource text, psourceid integer, ptext text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE BEGIN RETURN postComment(pCmnttypeid, pSource, pSourceid, pText, NULL); END $$; dDROP FUNCTION public.postcomment(pcmnttypeid integer, psource text, psourceid integer, ptext text); publicadminfalse83992125516831182postcomment(integer, text, integer, text, boolean)FUNCTIONCREATE FUNCTION postcomment(pcmnttypeid integer, psource text, psourceid integer, ptext text, ppublic boolean) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _commentid INTEGER; _public BOOLEAN; BEGIN _public := COALESCE(pPublic, fetchmetricbool('CommentPublicDefault')); INSERT INTO comment ( comment_cmnttype_id, comment_source, comment_source_id, comment_date, comment_user, comment_text, comment_public ) VALUES ( pCmnttypeid, pSource, pSourceid, CURRENT_TIMESTAMP, getEffectiveXtUser(), pText, _public ) RETURNING comment_id INTO _commentid; RETURN _commentid; END; $$; uDROP FUNCTION public.postcomment(pcmnttypeid integer, psource text, psourceid integer, ptext text, ppublic boolean); publicadminfalse8399212551745052&postcomment(text, text, integer, text)FUNCTION<CREATE FUNCTION postcomment(pcmnttypename text, psource text, psourceid integer, ptext text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cmnttypeid INTEGER; BEGIN SELECT cmnttype_id INTO _cmnttypeid FROM cmnttype WHERE (cmnttype_name=pCmnttypename); IF (NOT FOUND) THEN RAISE EXCEPTION 'Comment type % not found.', pCmnttypename; END IF; RETURN postComment(_cmnttypeid, pSource, pSourceid, pText, NULL); END $$; cDROP FUNCTION public.postcomment(pcmnttypename text, psource text, psourceid integer, ptext text); publicadminfalse8399212551683119postcost(integer)FUNCTIONCREATE FUNCTION postcost(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemcostid ALIAS FOR $1; _p RECORD; BEGIN SELECT round(currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE),6) AS newcost, itemcost_curr_id, CURRENT_DATE AS effective, item_number, itemcost_stdcost AS oldcost INTO _p FROM itemcost, item WHERE ((itemcost_item_id=item_id) AND (itemcost_id=pItemcostid)); IF (_p.newcost IS NULL) THEN RAISE EXCEPTION 'There is no valid Exchange Rate for this currency. (%, %)', _p.itemcost_curr_id, _p.effective; RETURN FALSE; END IF; RETURN updateStdCost(pItemcostid, _p.newcost, _p.oldcost, 'Post Cost', ('Post Actual Cost to Standard for item ' || _p.item_number)); END; $_$; (DROP FUNCTION public.postcost(integer); publicadminfalse8399212551683120postcountslip(integer)FUNCTIONACREATE FUNCTION postcountslip(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCntslipid ALIAS FOR $1; _p RECORD; _comments TEXT; _temp TEXT; BEGIN SELECT itemsite_loccntrl, itemsite_controlmethod, cntslip_posted, cntslip_lotserial, cntslip_comments, cntslip_number, cntslip_qty INTO _p FROM cntslip, invcnt, itemsite WHERE ( (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id) AND (cntslip_id=pCntslipid) ); IF (NOT _p.cntslip_posted) THEN SELECT ( E'\nCount Slip #' || _p.cntslip_number || ' counted ' || formatQty(_p.cntslip_qty) ) INTO _comments; -- Add the Location name if the itemsite is MLC IF (_p.itemsite_loccntrl) THEN SELECT ( ', Location:' || location_name ) INTO _temp FROM location, cntslip WHERE ( (cntslip_location_id=location_id) AND (cntslip_id=pCntslipid) ); _comments := (_comments || _temp); END IF; -- Add the Lot/Serial if the itemsite is Lot or Serial controlled IF (_p.itemsite_controlmethod = 'L') THEN _comments := (_comments || ( ', Lot #:' || _p.cntslip_lotserial)); ELSIF (_p.itemsite_controlmethod = 'S') THEN _comments := (_comments || ( ', Serial #:' || _p.cntslip_lotserial)); END IF; _comments := (_comments || ' ' || _p.cntslip_comments); UPDATE cntslip SET cntslip_posted=TRUE WHERE (cntslip_id=pCntslipid); UPDATE invcnt SET invcnt_qoh_after = ( COALESCE(invcnt_qoh_after, 0) + cntslip_qty), invcnt_comments = (invcnt_comments || _comments) FROM cntslip WHERE ( (cntslip_cnttag_id=invcnt_id) AND (cntslip_id=pCntslipid) ); RETURN 1; ELSE RETURN -1; END IF; END; $_$; -DROP FUNCTION public.postcountslip(integer); publicadminfalse8399212551683121postcounttag(integer, boolean)FUNCTIONX'CREATE FUNCTION postcounttag(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcntid ALIAS FOR $1; pThaw ALIAS FOR $2; _avgCostingMethod TEXT; _invhistid INTEGER; _postDate TIMESTAMP; _runningQty NUMERIC; _errorCode INTEGER; _itemlocSeries INTEGER := 0; _hasDetail BOOLEAN; _p RECORD; _itemloc RECORD; _cntslip RECORD; _lsid INTEGER; BEGIN SELECT COALESCE(fetchMetricText('CountAvgCostMethod'), 'STD') INTO _avgCostingMethod; SELECT invcnt_id, invcnt_tagnumber, invcnt_qoh_after, invcnt_location_id, item_number, itemsite_id, itemsite_freeze, itemsite_qtyonhand, itemsite_loccntrl, itemsite_location_id, CASE WHEN (itemsite_costmethod = 'N') THEN 0 WHEN ( (itemsite_costmethod = 'A') AND (itemsite_qtyonhand = 0) AND (_avgCostingMethod = 'ACT') ) THEN actcost(itemsite_item_id) WHEN ( (itemsite_costmethod = 'A') AND (_avgCostingMethod IN ('ACT', 'AVG')) ) THEN avgcost(itemsite_id) ELSE stdcost(itemsite_item_id) END AS cost, itemsite_costmethod, itemsite_controlmethod, itemsite_value INTO _p FROM invcnt, itemsite, item WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invcnt_qoh_after IS NOT NULL) AND (NOT invcnt_posted) AND (invcnt_id=pInvcntid) ); IF (FOUND) THEN -- If the invcnt_location_id is not null then -- call a separate function so as not to affect -- the existing functionality. IF (_p.invcnt_location_id IS NOT NULL) THEN RETURN postCountTagLocation(pInvcntid, pThaw); END IF; SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; IF (_p.itemsite_freeze) THEN SELECT invcnt_tagdate INTO _postDate FROM invcnt WHERE (invcnt_id=pInvcntid) ; ELSE _postDate = CURRENT_TIMESTAMP; END IF; _hasDetail = FALSE; -- Post the detail indicated by cntslips IF ( (_p.itemsite_loccntrl) OR (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; -- Adjust any existing detail to 0 FOR _itemloc IN SELECT itemloc_id, itemloc_location_id, itemloc_ls_id, itemloc_qty FROM itemloc WHERE (itemloc_itemsite_id=_p.itemsite_id) LOOP _hasDetail = TRUE; -- Create the itemlocdist flushing records INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_expiration, itemlocdist_itemsite_id, itemlocdist_invhist_id, itemlocdist_flush ) VALUES ( _itemlocSeries, 'I', _itemloc.itemloc_id, endOfTime(), _p.itemsite_id, _invhistid, TRUE ); END LOOP; -- Clear the running detail Qty _runningQty := 0; -- Adjust the detail to the cntslip indicated value FOR _cntslip IN SELECT cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, SUM(cntslip_qty) AS qty, itemsite_item_id FROM cntslip, invcnt, itemsite WHERE ((cntslip_cnttag_id=pInvcntid) AND (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id)) GROUP BY cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc,itemsite_item_id LOOP -- Handle the LotSerial IF (LENGTH(_cntslip.cntslip_lotserial)>0) THEN SELECT ls_id INTO _lsid FROM ls WHERE ((ls_item_id=_cntslip.itemsite_item_id) AND (UPPER(ls_number)=UPPER(_cntslip.cntslip_lotserial))); IF (NOT FOUND) THEN _lsid := NEXTVAL('ls_ls_id_seq'); INSERT INTO ls VALUES (_lsid,_cntslip.itemsite_item_id,UPPER(_cntslip.cntslip_lotserial)); END IF; END IF; -- Track the running Qty _runningQty := (_runningQty + _cntslip.qty); _hasDetail = TRUE; -- Create the itemlocdist populating record INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_warranty, itemlocdist_qty, itemlocdist_invhist_id ) VALUES ( _itemlocSeries, 'L', _cntslip.cntslip_location_id, _p.itemsite_id, _lsid, COALESCE(_cntslip.cntslip_lotserial_expiration, endOfTime()), _cntslip.cntslip_lotserial_warrpurc,_cntslip.qty, _invhistid ); END LOOP; IF (_runningQty > _p.invcnt_qoh_after) THEN -- The total Count Slip Qty is greater than the Count Tag Qty, -- Don't post the Count. _errorCode = -1; ELSIF ( (_runningQty < _p.invcnt_qoh_after) AND (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and the Item Site is Lot/Serial controlled. -- Don't post the Count. _errorCode = -2; ELSIF (_runningQty < _p.invcnt_qoh_after) THEN IF ( (NOT _p.itemsite_loccntrl) OR (_p.itemsite_location_id = -1) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and there isn't a default location to post into. -- Don't post the Count. _errorCode = -3; ELSIF ( SELECT (metric_value='f') FROM metric WHERE (metric_name='PostCountTagToDefault') ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and we don't post Count Tags to default Locations -- Don't post the Count. _errorCode = -4; ELSE -- Distribute the remaining qty into the default location. INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_expiration, itemlocdist_qty, itemlocdist_invhist_id ) SELECT _itemlocSeries, 'L', _p.itemsite_location_id, _p.itemsite_id, endOfTime(), (_p.invcnt_qoh_after - _runningQty), _invhistid; _hasDetail = TRUE; _errorCode = 0; END IF; ELSE -- The Count Slip Qty. must equal the Count Tag Qty. _errorCode = 0; END IF; -- If we shouldn't post the count then delete the itemlocdist records, -- and return with the error. IF (_errorCode <> 0) THEN DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); RETURN _errorCode; END IF; END IF; -- Mod. the Count Tag. UPDATE invcnt SET invcnt_qoh_before=_p.itemsite_qtyonhand, invcnt_postdate=_postDate, invcnt_posted=TRUE, invcnt_invhist_id=_invhistid, invcnt_post_username=getEffectiveXtUser() WHERE (invcnt_id=pInvcntid); -- Create the CC transaction INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT _invhistid, itemsite_id, _postDate, 'CC', (invcnt_qoh_after - invcnt_qoh_before), invcnt_qoh_before, invcnt_qoh_after, invcnt_tagnumber, invcnt_comments, uom_name, _p.cost, _hasDetail, _p.itemsite_costmethod, _p.itemsite_value, _p.itemsite_value + (_p.cost * (invcnt_qoh_after - invcnt_qoh_before)), _itemlocSeries FROM itemsite, invcnt, item, uom WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (invcnt_id=pInvcntid) ); IF ( SELECT metric_value FROM metric WHERE ((metric_name = 'EnableAsOfQOH') AND (metric_value = 't'))) THEN IF (NOT postIntoInvBalance(_invhistid)) THEN RAISE EXCEPTION 'Post into Inventory Balance for invhist_id=% was unsuccessful',_invhistid; END IF; END IF; -- Update the QOH -- Avoid negative value when average cost item UPDATE itemsite SET itemsite_qtyonhand=_p.invcnt_qoh_after, itemsite_nnqoh = 0, itemsite_value = CASE WHEN ((itemsite_costmethod='A') AND (_p.itemsite_value + (_p.cost * (_p.invcnt_qoh_after - itemsite_qtyonhand))) < 0.0) THEN 0.0 ELSE (_p.itemsite_value + (_p.cost * (_p.invcnt_qoh_after - itemsite_qtyonhand))) END, itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); -- Post the detail, if any IF (_hasDetail) THEN PERFORM distributeItemlocSeries(_itemlocSeries); END IF; -- Thaw the itemsite if it's frozen IF (pThaw) THEN PERFORM thawItemSite(invcnt_itemsite_id) FROM invcnt WHERE (invcnt_id=pInvcntid); END IF; -- Distribute to G/L PERFORM insertGLTransaction( 'I/M', 'CT', _p.invcnt_tagnumber, ('Post Count Tag #' || _p.invcnt_tagnumber || ' for Item ' || _p.item_number), costcat_adjustment_accnt_id, costcat_asset_accnt_id, _invhistid, ( (_p.invcnt_qoh_after - _p.itemsite_qtyonhand) * _p.cost), _postDate::DATE ) FROM invcnt, itemsite, costcat WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (invcnt_id=pInvcntid) ); RETURN 0; ELSE RETURN -9; END IF; END; $_$; 5DROP FUNCTION public.postcounttag(integer, boolean); publicadminfalse8399212551683123&postcounttaglocation(integer, boolean)FUNCTION%CREATE FUNCTION postcounttaglocation(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcntid ALIAS FOR $1; pThaw ALIAS FOR $2; _avgCostingMethod TEXT; _invhistid INTEGER; _postDate TIMESTAMP; _runningQty NUMERIC; _errorCode INTEGER; _itemlocSeries INTEGER := 0; _hasDetail BOOLEAN; _p RECORD; _itemloc RECORD; _cntslip RECORD; _origLocQty NUMERIC; _netable BOOLEAN; _lsid INTEGER; BEGIN SELECT COALESCE(fetchMetricText('CountAvgCostMethod'), 'STD') INTO _avgCostingMethod; SELECT invcnt_id, invcnt_tagnumber, invcnt_qoh_after, invcnt_location_id, invcnt_tagdate, item_number, itemsite_id, itemsite_freeze, itemsite_qtyonhand, itemsite_loccntrl, COALESCE(invcnt_location_id, -1) AS itemsite_location_id, CASE WHEN (itemsite_costmethod = 'N') THEN 0 WHEN ( (itemsite_costmethod = 'A') AND (itemsite_qtyonhand = 0) AND (_avgCostingMethod = 'ACT') ) THEN actcost(itemsite_item_id) WHEN ( (itemsite_costmethod = 'A') AND (_avgCostingMethod IN ('ACT', 'AVG')) ) THEN avgcost(itemsite_id) ELSE stdcost(itemsite_item_id) END AS cost, itemsite_costmethod, itemsite_controlmethod, itemsite_value INTO _p FROM invcnt, itemsite, item WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invcnt_qoh_after IS NOT NULL) AND (NOT invcnt_posted) AND (invcnt_id=pInvcntid) ); IF (NOT FOUND) THEN RETURN -9; END IF; SELECT COALESCE(SUM(itemloc_qty),0.0), location_netable INTO _origLocQty,_netable FROM itemloc,location WHERE ((itemloc_itemsite_id=_p.itemsite_id) AND (location_id=itemloc_location_id) AND (itemloc_location_id=_p.invcnt_location_id)) GROUP BY location_netable; IF (NOT FOUND) THEN _origLocQty := 0.0; _netable := TRUE; END IF; SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; IF (_p.itemsite_freeze) THEN _postDate := _p.invcnt_tagdate; ELSE _postDate := CURRENT_TIMESTAMP; END IF; _hasDetail = FALSE; -- Post the detail indicated by cntslips IF ( (_p.itemsite_loccntrl) OR (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; -- Adjust any existing detail to 0 FOR _itemloc IN SELECT itemloc_id, itemloc_location_id, itemloc_ls_id, itemloc_qty FROM itemloc WHERE ((itemloc_itemsite_id=_p.itemsite_id) AND (itemloc_location_id=_p.invcnt_location_id)) LOOP _hasDetail = TRUE; -- Create the itemlocdist flushing records INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_expiration, itemlocdist_itemsite_id, itemlocdist_invhist_id, itemlocdist_flush ) VALUES ( _itemlocSeries, 'I', _itemloc.itemloc_id, endOfTime(), _p.itemsite_id, _invhistid, TRUE ); END LOOP; -- Clear the running detail Qty _runningQty := 0; -- Adjust the detail to the cntslip indicated value FOR _cntslip IN SELECT cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, SUM(cntslip_qty) AS qty, itemsite_item_id FROM cntslip,invcnt,itemsite WHERE ((cntslip_cnttag_id=pInvcntid) AND (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id)) GROUP BY cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, itemsite_item_id LOOP -- Handle the LotSerial IF (LENGTH(_cntslip.cntslip_lotserial)>0) THEN SELECT ls_id INTO _lsid FROM ls WHERE ((ls_item_id=_cntslip.itemsite_item_id) AND (UPPER(ls_number)=UPPER(_cntslip.cntslip_lotserial))); IF (NOT FOUND) THEN _lsid := NEXTVAL('ls_ls_id_seq'); INSERT INTO ls VALUES (_lsid,_cntslip.itemsite_item_id,UPPER(_cntslip.cntslip_lotserial)); END IF; END IF; -- Track the running Qty _runningQty := (_runningQty + _cntslip.qty); _hasDetail = TRUE; -- Create the itemlocdist populating record INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_warranty, itemlocdist_qty, itemlocdist_invhist_id ) VALUES ( _itemlocSeries, 'L', _cntslip.cntslip_location_id, _p.itemsite_id, _lsid, COALESCE(_cntslip.cntslip_lotserial_expiration, endOfTime()), _cntslip.cntslip_lotserial_warrpurc, _cntslip.qty, _invhistid ); END LOOP; IF (_runningQty > _p.invcnt_qoh_after) THEN -- The total Count Slip Qty is greater than the Count Tag Qty, -- Don't post the Count. _errorCode = -1; ELSIF ( (_runningQty < _p.invcnt_qoh_after) AND (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and the Item Site is Lot/Serial controlled. -- Don't post the Count. _errorCode = -2; ELSIF (_runningQty < _p.invcnt_qoh_after) THEN IF ( (NOT _p.itemsite_loccntrl) OR (_p.itemsite_location_id = -1) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and there isn't a default location to post into. -- Don't post the Count. _errorCode = -3; ELSIF ( SELECT (metric_value='f') FROM metric WHERE (metric_name='PostCountTagToDefault') ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and we don't post Count Tags to default Locations -- Don't post the Count. _errorCode = -4; ELSE -- Distribute the remaining qty into the default location. INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_qty, itemlocdist_invhist_id ) SELECT _itemlocSeries, 'L', _p.itemsite_location_id, _p.itemsite_id, _lsid, endOfTime(), (_p.invcnt_qoh_after - _runningQty), _invhistid; _hasDetail = TRUE; _errorCode = 0; END IF; ELSE -- The Count Slip Qty. must equal the Count Tag Qty. _errorCode = 0; END IF; -- If we shouldn't post the count then delete the itemlocdist records, -- and return with the error. IF (_errorCode <> 0) THEN DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); RETURN _errorCode; END IF; END IF; -- Mod. the Count Tag. UPDATE invcnt SET invcnt_qoh_before=_origLocQty, invcnt_postdate=_postDate, invcnt_posted=TRUE, invcnt_invhist_id=_invhistid, invcnt_post_username=getEffectiveXtUser() WHERE (invcnt_id=pInvcntid); -- Create the CC transaction INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT _invhistid, itemsite_id, _postDate, 'CC', (invcnt_qoh_after - invcnt_qoh_before), invcnt_qoh_before, invcnt_qoh_after, invcnt_tagnumber, invcnt_comments, uom_name, _p.cost, _hasDetail, _p.itemsite_costmethod, _p.itemsite_value, _p.itemsite_value + (_p.cost * (invcnt_qoh_after - invcnt_qoh_before)), _itemlocSeries FROM itemsite, invcnt, item, uom WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (invcnt_id=pInvcntid) ); -- Update the QOH IF (_netable) THEN UPDATE itemsite SET itemsite_qtyonhand= itemsite_qtyonhand + (_p.invcnt_qoh_after - _origLocQty), itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); ELSE UPDATE itemsite SET itemsite_nnqoh = itemsite_nnqoh - _origLocQty, itemsite_qtyonhand = itemsite_qtyonhand + _p.invcnt_qoh_after, itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); END IF; -- Post the detail, if any IF (_hasDetail) THEN PERFORM distributeItemlocSeries(_itemlocSeries); END IF; -- Thaw the itemsite if it's frozen IF (pThaw) THEN PERFORM thawItemSite(invcnt_itemsite_id) FROM invcnt WHERE (invcnt_id=pInvcntid); END IF; -- Distribute to G/L PERFORM insertGLTransaction( 'I/M', 'CT', _p.invcnt_tagnumber, ('Post Count Tag #' || _p.invcnt_tagnumber || ' for Item ' || _p.item_number), costcat_adjustment_accnt_id, costcat_asset_accnt_id, _invhistid, ( (_p.invcnt_qoh_after - _origLocQty) * _p.cost), CURRENT_DATE ) FROM invcnt, itemsite, costcat WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (invcnt_id=pInvcntid) ); RETURN 0; END; $_$; =DROP FUNCTION public.postcounttaglocation(integer, boolean); publicadminfalse83992H12551683125,postcounttaglocation(integer, boolean, text)FUNCTION$CREATE FUNCTION postcounttaglocation(integer, boolean, text) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pInvcntid ALIAS FOR $1; pThaw ALIAS FOR $2; pAvgCostingMethod ALIAS FOR $3; _invhistid INTEGER; _postDate TIMESTAMP; _runningQty NUMERIC; _errorCode INTEGER; _itemlocSeries INTEGER := 0; _hasDetail BOOLEAN; _p RECORD; _itemloc RECORD; _cntslip RECORD; _origLocQty NUMERIC; _netable BOOLEAN; _lsid INTEGER; BEGIN SELECT invcnt_id, invcnt_tagnumber, invcnt_qoh_after, invcnt_location_id, invcnt_tagdate, item_number, itemsite_id, itemsite_freeze, itemsite_qtyonhand, itemsite_loccntrl, COALESCE(invcnt_location_id, -1) AS itemsite_location_id, CASE WHEN (itemsite_costmethod = 'N') THEN 0 WHEN ( (itemsite_costmethod = 'A') AND (itemsite_qtyonhand = 0) AND (pAvgCostingMethod = 'ACT') ) THEN actcost(itemsite_item_id) WHEN ( (itemsite_costmethod = 'A') AND (pAvgCostingMethod IN ('ACT', 'AVG')) ) THEN avgcost(itemsite_id) ELSE stdcost(itemsite_item_id) END AS cost, itemsite_costmethod, itemsite_controlmethod, itemsite_value INTO _p FROM invcnt, itemsite, item WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invcnt_qoh_after IS NOT NULL) AND (NOT invcnt_posted) AND (invcnt_id=pInvcntid) ); IF (NOT FOUND) THEN RETURN -9; END IF; SELECT COALESCE(SUM(itemloc_qty),0.0), location_netable INTO _origLocQty,_netable FROM itemloc,location WHERE ((itemloc_itemsite_id=_p.itemsite_id) AND (location_id=itemloc_location_id) AND (itemloc_location_id=_p.invcnt_location_id)) GROUP BY location_netable; IF (NOT FOUND) THEN _origLocQty := 0.0; _netable := TRUE; END IF; SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; IF (_p.itemsite_freeze) THEN _postDate := _p.invcnt_tagdate; ELSE _postDate := CURRENT_TIMESTAMP; END IF; _hasDetail = FALSE; -- Post the detail indicated by cntslips IF ( (_p.itemsite_loccntrl) OR (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; -- Adjust any existing detail to 0 FOR _itemloc IN SELECT itemloc_id, itemloc_location_id, itemloc_ls_id, itemloc_qty FROM itemloc WHERE ((itemloc_itemsite_id=_p.itemsite_id) AND (itemloc_location_id=_p.invcnt_location_id)) LOOP _hasDetail = TRUE; -- Create the itemlocdist flushing records INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_expiration, itemlocdist_itemsite_id, itemlocdist_invhist_id, itemlocdist_flush ) VALUES ( _itemlocSeries, 'I', _itemloc.itemloc_id, endOfTime(), _p.itemsite_id, _invhistid, TRUE ); END LOOP; -- Clear the running detail Qty _runningQty := 0; -- Adjust the detail to the cntslip indicated value FOR _cntslip IN SELECT cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, SUM(cntslip_qty) AS qty, itemsite_item_id FROM cntslip,invcnt,itemsite WHERE ((cntslip_cnttag_id=pInvcntid) AND (cntslip_cnttag_id=invcnt_id) AND (invcnt_itemsite_id=itemsite_id)) GROUP BY cntslip_location_id, cntslip_lotserial, cntslip_lotserial_expiration, cntslip_lotserial_warrpurc, itemsite_item_id LOOP -- Handle the LotSerial IF (LENGTH(_cntslip.cntslip_lotserial)>0) THEN SELECT ls_id INTO _lsid FROM ls WHERE ((ls_item_id=_cntslip.itemsite_item_id) AND (UPPER(ls_number)=UPPER(_cntslip.cntslip_lotserial))); IF (NOT FOUND) THEN _lsid := NEXTVAL('ls_ls_id_seq'); INSERT INTO ls VALUES (_lsid,_cntslip.itemsite_item_id,UPPER(_cntslip.cntslip_lotserial)); END IF; END IF; -- Track the running Qty _runningQty := (_runningQty + _cntslip.qty); _hasDetail = TRUE; -- Create the itemlocdist populating record INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_warranty, itemlocdist_qty, itemlocdist_invhist_id ) VALUES ( _itemlocSeries, 'L', _cntslip.cntslip_location_id, _p.itemsite_id, _lsid, COALESCE(_cntslip.cntslip_lotserial_expiration, endOfTime()), _cntslip.cntslip_lotserial_warrpurc, _cntslip.qty, _invhistid ); END LOOP; IF (_runningQty > _p.invcnt_qoh_after) THEN -- The total Count Slip Qty is greater than the Count Tag Qty, -- Don't post the Count. _errorCode = -1; ELSIF ( (_runningQty < _p.invcnt_qoh_after) AND (_p.itemsite_controlmethod IN ('L', 'S')) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and the Item Site is Lot/Serial controlled. -- Don't post the Count. _errorCode = -2; ELSIF (_runningQty < _p.invcnt_qoh_after) THEN IF ( (NOT _p.itemsite_loccntrl) OR (_p.itemsite_location_id = -1) ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and there isn't a default location to post into. -- Don't post the Count. _errorCode = -3; ELSIF ( SELECT (metric_value='f') FROM metric WHERE (metric_name='PostCountTagToDefault') ) THEN -- The total Count Slip Qty is less than the Count Tag Qty, -- and we don't post Count Tags to default Locations -- Don't post the Count. _errorCode = -4; ELSE -- Distribute the remaining qty into the default location. INSERT INTO itemlocdist ( itemlocdist_series, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_qty, itemlocdist_invhist_id ) SELECT _itemlocSeries, 'L', _p.itemsite_location_id, _p.itemsite_id, _lsid, endOfTime(), (_p.invcnt_qoh_after - _runningQty), _invhistid; _hasDetail = TRUE; _errorCode = 0; END IF; ELSE -- The Count Slip Qty. must equal the Count Tag Qty. _errorCode = 0; END IF; -- If we shouldn't post the count then delete the itemlocdist records, -- and return with the error. IF (_errorCode <> 0) THEN DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); RETURN _errorCode; END IF; END IF; -- Mod. the Count Tag. UPDATE invcnt SET invcnt_qoh_before=_origLocQty, invcnt_postdate=_postDate, invcnt_posted=TRUE, invcnt_invhist_id=_invhistid, invcnt_post_username=CURRENT_USER WHERE (invcnt_id=pInvcntid); -- Create the CC transaction INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_hasdetail, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) SELECT _invhistid, itemsite_id, _postDate, 'CC', (invcnt_qoh_after - invcnt_qoh_before), invcnt_qoh_before, invcnt_qoh_after, invcnt_tagnumber, invcnt_comments, uom_name, _p.cost, _hasDetail, _p.itemsite_costmethod, _p.itemsite_value, _p.itemsite_value + (_p.cost * (invcnt_qoh_after - invcnt_qoh_before)), _itemlocSeries FROM itemsite, invcnt, item, uom WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (invcnt_id=pInvcntid) ); -- Update the QOH IF (_netable) THEN UPDATE itemsite SET itemsite_qtyonhand= itemsite_qtyonhand + (_p.invcnt_qoh_after - _origLocQty), itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); ELSE UPDATE itemsite SET itemsite_nnqoh = itemsite_nnqoh - _origLocQty, itemsite_qtyonhand = itemsite_qtyonhand + _p.invcnt_qoh_after, itemsite_datelastcount=_postDate WHERE (itemsite_id=_p.itemsite_id); END IF; -- Post the detail, if any IF (_hasDetail) THEN PERFORM distributeItemlocSeries(_itemlocSeries); END IF; -- Thaw the itemsite if it's frozen IF (pThaw) THEN PERFORM thawItemSite(invcnt_itemsite_id) FROM invcnt WHERE (invcnt_id=pInvcntid); END IF; -- Distribute to G/L PERFORM insertGLTransaction( 'I/M', 'CT', _p.invcnt_tagnumber, ('Post Count Tag #' || _p.invcnt_tagnumber || ' for Item ' || _p.item_number), costcat_adjustment_accnt_id, costcat_asset_accnt_id, _invhistid, ( (_p.invcnt_qoh_after - _origLocQty) * _p.cost), CURRENT_DATE ) FROM invcnt, itemsite, costcat WHERE ( (invcnt_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (invcnt_id=pInvcntid) ); RETURN 0; END; $_$; CDROP FUNCTION public.postcounttaglocation(integer, boolean, text); publicadminfalse8399212551683127postcounttags(integer, boolean)FUNCTIONNCREATE FUNCTION postcounttags(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pThaw ALIAS FOR $2; _invcnt RECORD; _result INTEGER := 0; _return INTEGER := 0; BEGIN FOR _invcnt IN SELECT invcnt_id FROM invcnt, itemsite WHERE ( (invcnt_itemsite_id=itemsite_id) AND ( (pWarehousid=-1) OR (itemsite_warehous_id=pWarehousid) ) AND (invcnt_qoh_after IS NOT NULL) AND (NOT invcnt_posted) ) LOOP SELECT postCountTag(_invcnt.invcnt_id, pThaw) INTO _result; IF (_result < _return) THEN _return := _result; END IF; END LOOP; RETURN _return; END; $_$; 6DROP FUNCTION public.postcounttags(integer, boolean); publicadminfalse8399212551683128 postcreditmemo(integer, integer)FUNCTIONCREATE FUNCTION postcreditmemo(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; pItemlocSeries ALIAS FOR $2; _return INTEGER; BEGIN SELECT postCreditMemo(pCmheadid, fetchJournalNumber('AR-CM'), pItemlocSeries) INTO _return; RETURN _return; END; $_$; 7DROP FUNCTION public.postcreditmemo(integer, integer); publicadminfalse8399212551683129)postcreditmemo(integer, integer, integer)FUNCTION0UCREATE FUNCTION postcreditmemo(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; _r RECORD; _p RECORD; _aropenid INTEGER; _cohistid INTEGER; _sequence INTEGER; _itemlocSeries INTEGER; _invhistid INTEGER; _test INTEGER; _totalAmount NUMERIC := 0; _commissionDue NUMERIC := 0; _toApply NUMERIC; _toClose BOOLEAN; _glDate DATE; _taxBaseValue NUMERIC := 0; BEGIN -- Cache some parameters SELECT cmhead.*, findARAccount(cmhead_cust_id) AS ar_accnt_id, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM cmheadtax WHERE ( (taxhist_parent_id = cmhead_id) AND (taxhist_taxtype_id = getAdjustmentTaxtypeId()) ) ) AS adjtax INTO _p FROM cmhead WHERE (cmhead_id=pCmheadid); IF (_p.cmhead_posted) THEN RETURN -10; END IF; IF (_p.cmhead_hold) THEN RETURN -11; END IF; _glDate := COALESCE(_p.cmhead_gldistdate, _p.cmhead_docdate); _itemlocSeries = pItemlocSeries; SELECT fetchGLSequence() INTO _sequence; -- Start by handling taxes FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.cmhead_curr_id, round(sum(taxdetail_tax),2), _p.cmhead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('CM', pCmheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, _r.tax_sales_accnt_id, _r.taxbasevalue, _glDate, _p.cmhead_billtoname ); _totalAmount := _totalAmount + _r.tax * -1; END LOOP; -- Update item tax records with posting data UPDATE cmitemtax SET taxhist_docdate=_p.cmhead_docdate, taxhist_distdate=_glDate, taxhist_curr_id=_p.cmhead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM cmhead JOIN cmitem ON (cmhead_id=cmitem_cmhead_id), curr_rate WHERE ((cmhead_id=pCmheadId) AND (taxhist_parent_id=cmitem_id) AND (_p.cmhead_curr_id=curr_id) AND (_p.cmhead_docdate BETWEEN curr_effective AND curr_expires) ); -- Update Header taxes (Freight and Adjustments) with posting data UPDATE cmheadtax SET taxhist_docdate=_p.cmhead_docdate, taxhist_distdate=_glDate, taxhist_curr_id=_p.cmhead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM curr_rate WHERE ((taxhist_parent_id=pCmheadId) AND (_p.cmhead_curr_id=curr_id) AND (_p.cmhead_docdate BETWEEN curr_effective AND curr_expires) ); -- Process line items -- Always use std cost FOR _r IN SELECT *, stdCost(item_id) AS std_cost FROM creditmemoitem WHERE ( (cmitem_cmhead_id=pCmheadid) AND (cmitem_qtycredit <> 0 ) ) LOOP -- Calcuate the Commission to be debited _commissionDue := (_commissionDue + (_r.extprice * _p.cmhead_commission)); IF (_r.extprice <> 0) THEN -- Debit the Sales Account for the current cmitem SELECT insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, CASE WHEN _p.cmhead_rahead_id IS NULL THEN getPrjAccntId(_p.cmhead_prj_id, salesaccnt_credit_accnt_id) ELSE getPrjAccntId(_p.cmhead_prj_id, salesaccnt_returns_accnt_id) END, round(currToBase(_p.cmhead_curr_id, _r.extprice * -1, _p.cmhead_docdate), 2), _glDate, _p.cmhead_billtoname) INTO _test FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.cmitem_itemsite_id, 'IS', _p.cmhead_cust_id, _p.cmhead_saletype_id, _p.cmhead_shipzone_id)); IF (NOT FOUND) THEN PERFORM deleteGLSeries(_sequence); RETURN -12; END IF; END IF; -- Record Sales History for this C/M Item SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.cmhead_cust_id, _r.cmitem_itemsite_id, _p.cmhead_shipto_id, _p.cmhead_docdate, '', _p.cmhead_number, _p.cmhead_custponumber, _p.cmhead_docdate, 'C', _p.cmhead_invcnumber, _p.cmhead_docdate, (_r.qty * -1), _r.unitprice, _r.std_cost, _p.cmhead_salesrep_id, (_p.cmhead_commission * _r.extprice * -1), FALSE, _p.cmhead_billtoname, _p.cmhead_billtoaddress1, _p.cmhead_billtoaddress2, _p.cmhead_billtoaddress3, _p.cmhead_billtocity, _p.cmhead_billtostate, _p.cmhead_billtozip, _p.cmhead_shipto_name, _p.cmhead_shipto_address1, _p.cmhead_shipto_address2, _p.cmhead_shipto_address3, _p.cmhead_shipto_city, _p.cmhead_shipto_state, _p.cmhead_shipto_zipcode, _p.cmhead_curr_id, _r.cmitem_taxtype_id, _p.cmhead_taxzone_id, _p.cmhead_shipzone_id, _p.cmhead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM cmitemtax WHERE (taxhist_parent_id=_r.cmitem_id); _totalAmount := _totalAmount + round(_r.extprice, 2); END LOOP; -- Credit the Misc. Account for Miscellaneous Charges IF (_p.cmhead_misc <> 0) THEN SELECT insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, getPrjAccntId(_p.cmhead_prj_id, accnt_id), round(currToBase(_p.cmhead_curr_id, _p.cmhead_misc * -1, _p.cmhead_docdate), 2), _glDate, _p.cmhead_billtoname) INTO _test FROM accnt WHERE (accnt_id=_p.cmhead_misc_accnt_id); -- If the Misc. Charges Account was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_sequence); RETURN -14; END IF; -- Record the Sales History for any Misc. Charge INSERT INTO cohist ( cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _p.cmhead_cust_id, -1, _p.cmhead_shipto_id, 'M', _p.cmhead_misc_descrip, _p.cmhead_misc_accnt_id, _p.cmhead_docdate, '', _p.cmhead_number, _p.cmhead_custponumber, _p.cmhead_docdate, 'C', _p.cmhead_invcnumber, _p.cmhead_docdate, 1, (_p.cmhead_misc * -1), (_p.cmhead_misc * -1), _p.cmhead_salesrep_id, 0, FALSE, _p.cmhead_billtoname, _p.cmhead_billtoaddress1, _p.cmhead_billtoaddress2, _p.cmhead_billtoaddress3, _p.cmhead_billtocity, _p.cmhead_billtostate, _p.cmhead_billtozip, _p.cmhead_shipto_name, _p.cmhead_shipto_address1, _p.cmhead_shipto_address2, _p.cmhead_shipto_address3, _p.cmhead_shipto_city, _p.cmhead_shipto_state, _p.cmhead_shipto_zipcode, _p.cmhead_curr_id, _p.cmhead_shipzone_id, _p.cmhead_saletype_id ); -- Cache the Misc. Amount distributed _totalAmount := _totalAmount + _p.cmhead_misc; END IF; -- Credit Tax Adjustments IF (_p.adjtax <> 0) THEN -- Record the Sales History for Tax Adjustment SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.cmhead_cust_id, -1, _p.cmhead_shipto_id, 'T', 'Misc Tax Adjustment', _p.cmhead_docdate, '', _p.cmhead_number, _p.cmhead_custponumber, _p.cmhead_docdate, 'C', _p.cmhead_invcnumber, _p.cmhead_docdate, 0, 0, 0, _p.cmhead_salesrep_id, 0, FALSE, _p.cmhead_billtoname, _p.cmhead_billtoaddress1, _p.cmhead_billtoaddress2, _p.cmhead_billtoaddress3, _p.cmhead_billtocity, _p.cmhead_billtostate, _p.cmhead_billtozip, _p.cmhead_shipto_name, _p.cmhead_shipto_address1, _p.cmhead_shipto_address2, _p.cmhead_shipto_address3, _p.cmhead_shipto_city, _p.cmhead_shipto_state, _p.cmhead_shipto_zipcode, _p.cmhead_curr_id, getAdjustmentTaxtypeId(), _p.cmhead_taxzone_id, _p.cmhead_shipzone_id, _p.cmhead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, (taxhist_basis * -1), taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM cmheadtax WHERE ( (taxhist_parent_id=_p.cmhead_id) AND (taxhist_taxtype_id=getAdjustmentTaxtypeId()) ); END IF; -- Debit the Freight Account IF (_p.cmhead_freight <> 0) THEN SELECT insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, getPrjAccntId(_p.cmhead_prj_id, accnt_id), round(currToBase(_p.cmhead_curr_id, _p.cmhead_freight * -1, _p.cmhead_docdate), 2), _glDate, _p.cmhead_billtoname) INTO _test FROM accnt WHERE (accnt_id=findFreightAccount(_p.cmhead_cust_id)); -- If the Freight Charges Account was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_sequence); RETURN -16; END IF; -- Cache the Amount Distributed to Freight _totalAmount := _totalAmount + _p.cmhead_freight; -- Record the Sales History for any Freight SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.cmhead_cust_id, -1, _p.cmhead_shipto_id, 'F', 'Freight Charge', _p.cmhead_docdate, '', _p.cmhead_number, _p.cmhead_custponumber, _p.cmhead_docdate, 'C', _p.cmhead_invcnumber, _p.cmhead_docdate, 1, (_p.cmhead_freight * -1), (_p.cmhead_freight * -1), _p.cmhead_salesrep_id, 0, FALSE, _p.cmhead_billtoname, _p.cmhead_billtoaddress1, _p.cmhead_billtoaddress2, _p.cmhead_billtoaddress3, _p.cmhead_billtocity, _p.cmhead_billtostate, _p.cmhead_billtozip, _p.cmhead_shipto_name, _p.cmhead_shipto_address1, _p.cmhead_shipto_address2, _p.cmhead_shipto_address3, _p.cmhead_shipto_city, _p.cmhead_shipto_state, _p.cmhead_shipto_zipcode, _p.cmhead_curr_id, getFreightTaxtypeId(), _p.cmhead_taxzone_id, _p.cmhead_shipzone_id, _p.cmhead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, (taxhist_basis * -1), taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM cmheadtax WHERE ( (taxhist_parent_id=_p.cmhead_id) AND (taxhist_taxtype_id=getFreightTaxtypeId()) ); END IF; _totalAmount := _totalAmount; -- Credit the A/R for the total Amount IF (_totalAmount <> 0) THEN IF (_p.ar_accnt_id != -1) THEN PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CM', _p.cmhead_number, _p.ar_accnt_id, round(currToBase(_p.cmhead_curr_id, _totalAmount, _p.cmhead_docdate), 2), _glDate, _p.cmhead_billtoname); ELSE PERFORM deleteGLSeries(_sequence); RETURN -18; END IF; END IF; -- Commit the GLSeries; PERFORM postGLSeries(_sequence, pJournalNumber); -- Create the Invoice aropen item SELECT NEXTVAL('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_open, aropen_posted, aropen_cust_id, aropen_ponumber, aropen_docnumber, aropen_applyto, aropen_doctype, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_amount, aropen_paid, aropen_salesrep_id, aropen_commission_due, aropen_commission_paid, aropen_ordernumber, aropen_notes, aropen_rsncode_id, aropen_curr_id ) SELECT _aropenid, getEffectiveXtUser(), pJournalNumber, TRUE, FALSE, cmhead_cust_id, cmhead_custponumber, cmhead_number, CASE WHEN (cmhead_invcnumber='-1') THEN 'OPEN' ELSE (cmhead_invcnumber::TEXT) END, 'C', cmhead_docdate, cmhead_docdate, _glDate, -1, _totalAmount, 0, cmhead_salesrep_id, (_commissionDue * -1), FALSE, cmhead_number::TEXT, cmhead_comments, cmhead_rsncode_id, cmhead_curr_id FROM cmhead WHERE (cmhead_id=pCmheadid); -- Handle the Inventory and G/L Transactions for any returned Inventory where cmitem_updateinv is true FOR _r IN SELECT cmitem_itemsite_id AS itemsite_id, cmitem_id, (cmitem_qtyreturned * cmitem_qty_invuomratio) AS qty, cmhead_number, cmhead_cust_id AS cust_id, item_number, cmhead_saletype_id AS saletype_id, cmhead_shipzone_id AS shipzone_id, stdCost(item_id) AS std_cost, cmhead_prj_id, itemsite_costmethod FROM cmhead, cmitem, itemsite, item WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (cmitem_qtyreturned <> 0) AND (cmitem_updateinv) AND (cmhead_id=pCmheadid) ) LOOP -- Return credited stock to inventory IF (_itemlocSeries = 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; IF (_r.itemsite_costmethod != 'J') THEN SELECT postInvTrans(itemsite_id, 'RS', _r.qty, 'S/O', 'CM', _r.cmhead_number, '', ('Credit Return ' || _r.item_number), costcat_asset_accnt_id, getPrjAccntId(_r.cmhead_prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)), _itemlocSeries, _glDate, _r.std_cost) INTO _invhistid FROM itemsite, costcat WHERE ((itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id)); ELSE RAISE DEBUG 'postCreditMemo(%, %, %) tried to postInvTrans a %-costed item', pCmheadid, pJournalNumber, pItemlocSeries, _r.itemsite_costmethod; END IF; END LOOP; -- Update coitem to reflect the returned qty where cmitem_updateinv is true FOR _r IN SELECT cmitem_qtyreturned, cmitem_itemsite_id, cohead_id FROM cmitem, cmhead, invchead, cohead WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmhead_invcnumber=invchead_invcnumber) AND (invchead_ordernumber=cohead_number) AND (cmitem_qtyreturned <> 0) AND (cmitem_updateinv) AND (cmhead_id=pCmheadid) ) LOOP UPDATE coitem SET coitem_qtyreturned = (coitem_qtyreturned + _r.cmitem_qtyreturned) WHERE coitem_id IN ( SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=_r.cohead_id) AND (coitem_itemsite_id = _r.cmitem_itemsite_id) ) LIMIT 1 ); END LOOP; -- Mark the cmhead as posted UPDATE cmhead SET cmhead_posted=TRUE, cmhead_gldistdate=_glDate WHERE (cmhead_id=pCmheadid); -- Find the apply-to document and make the application SELECT cmhead_number, cmhead_curr_id, cmhead_docdate, aropen_id, aropen_cust_id, aropen_docnumber, currToCurr(aropen_curr_id, cmhead_curr_id, aropen_amount - aropen_paid, cmhead_docdate) AS balance INTO _p FROM aropen, cmhead WHERE ( (aropen_doctype='I') AND (aropen_docnumber=cmhead_invcnumber) AND (cmhead_id=pCmheadid) ); IF (FOUND) THEN IF round(_totalAmount, 2) <= round(_p.balance, 2) THEN _toApply = _totalAmount; ELSE _toApply = _p.balance; END IF; UPDATE aropen SET aropen_paid = round(aropen_paid + currToCurr(_p.cmhead_curr_id, aropen_curr_id, _toApply, _p.cmhead_docdate), 2) WHERE (aropen_id=_p.aropen_id); -- Alter the new A/R Open Item to reflect the application UPDATE aropen SET aropen_paid = round(currToCurr(_p.cmhead_curr_id, aropen_curr_id, _toApply, _p.cmhead_docdate), 2) WHERE (aropen_id=_aropenid); -- Record the application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_curr_id ) VALUES ( _p.aropen_cust_id, _aropenid, 'C', _p.cmhead_number, _p.aropen_id, 'I', _p.aropen_docnumber, '', '', round(_toApply, 2), _toClose, CURRENT_DATE, _p.cmhead_docdate, 0, _p.cmhead_curr_id ); END IF; RETURN _itemlocSeries; END; $_$; @DROP FUNCTION public.postcreditmemo(integer, integer, integer); publicadminfalse8399212551683131postcreditmemos(boolean)FUNCTION]CREATE FUNCTION postcreditmemos(boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; _cmhead RECORD; _result INTEGER; _return INTEGER := 0; _itemlocSeries INTEGER := 0; BEGIN _itemlocSeries := 0; FOR _cmhead IN SELECT cmhead_id FROM cmhead WHERE ( (NOT cmhead_posted) AND (NOT cmhead_hold) AND (checkCreditMemoSitePrivs(cmhead_id)) AND ((pPostUnprinted) OR (cmhead_printed)) ) LOOP SELECT postCreditMemo(_cmhead.cmhead_id, _itemlocSeries) INTO _result; IF (_result < _return) THEN _return := _result; END IF; END LOOP; RETURN _return; END; $_$; /DROP FUNCTION public.postcreditmemos(boolean); publicadminfalse8399212551683132!postcreditmemos(boolean, integer)FUNCTIONCREATE FUNCTION postcreditmemos(boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _r RECORD; _itemlocSeries INTEGER := 0; BEGIN _itemlocSeries := 0; FOR _r IN SELECT cmhead_id FROM cmhead WHERE ( (NOT cmhead_posted) AND (NOT cmhead_hold) AND (checkCreditMemoSitePrivs(cmhead_id)) AND ((pPostUnprinted) OR (cmhead_printed)) ) LOOP SELECT postCreditMemo(_r.cmhead_id, pJournalNumber, _itemlocSeries) INTO _itemlocSeries; END LOOP; RETURN _itemlocSeries; END; $_$; 8DROP FUNCTION public.postcreditmemos(boolean, integer); publicadminfalse8399212551683133postglseries(integer)FUNCTIONCREATE FUNCTION postglseries(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _journalNumber INTEGER; _returnValue INTEGER; BEGIN SELECT postGLSeries(pSequence, fetchJournalNumber('G/L')) INTO _returnValue; RETURN _returnValue; END; $_$; ,DROP FUNCTION public.postglseries(integer); publicadminfalse8399212551683134postglseries(integer, integer)FUNCTIONCREATE FUNCTION postglseries(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _returnValue INTEGER; BEGIN SELECT postGLSeries(pSequence, pJournalNumber, true) INTO _returnValue; RETURN _returnValue; END; $_$; 5DROP FUNCTION public.postglseries(integer, integer); publicadminfalse8399212551683135'postglseries(integer, integer, boolean)FUNCTIONCCREATE FUNCTION postglseries(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pPostZero ALIAS FOR $3; _glseries RECORD; _transCount INTEGER := 0; _delta NUMERIC; _discrepDate DATE; _discrepAccntid INTEGER; _rows INTEGER; BEGIN /* Make sure we don't create an imbalance across companies. The 'IgnoreCompanyBalance' metric is a back door mechanism to allow legacy users to create transactions accross companies if they have been using the company segment for something else and they MUST continue to be able to do so. It can only be implemented by direct sql update to the metric table and should otherwise be discouraged. */ IF (COALESCE(fetchMetricValue('GLCompanySize'),0) > 0 AND fetchMetricBool('IgnoreCompany') = false) THEN SELECT count(accnt_company) INTO _rows FROM ( SELECT DISTINCT accnt_company FROM accnt JOIN glseries ON (glseries_accnt_id=accnt_id) WHERE (glseries_sequence=pSequence)) _data; IF (_rows > 1) THEN RAISE EXCEPTION 'G/L Series can not be posted because multiple companies are referenced in the same series.'; END IF; END IF; -- Make sure that we balance SELECT SUM(glseries_amount), MAX(glseries_distdate) INTO _delta, _discrepDate FROM glseries WHERE (glseries_sequence=pSequence); IF ( _delta <> 0 ) THEN IF (COALESCE(fetchMetricValue('GLCompanySize'),0) = 0) THEN SELECT accnt_id INTO _discrepAccntid FROM accnt, metric WHERE ((metric_name='GLSeriesDiscrepancyAccount') AND (accnt_id=CAST(metric_value AS INTEGER))); ELSE SELECT company_dscrp_accnt_id INTO _discrepAccntid FROM company JOIN accnt ON (accnt_company=company_number) JOIN glseries ON (glseries_accnt_id=accnt_id) WHERE (glseries_sequence=pSequence) LIMIT 1; END IF; IF (NOT FOUND) THEN RETURN -5; END IF; INSERT INTO glseries ( glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_amount, glseries_distdate, glseries_notes ) SELECT glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, _discrepAccntid, (_delta * -1), _discrepDate, 'G/L Series Discrepancy' FROM glseries WHERE (glseries_sequence=pSequence) LIMIT 1; END IF; -- March through the glseries members, posting them one at a time FOR _glseries IN SELECT glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_distdate, glseries_notes, glseries_misc_id, SUM(glseries_amount) as amount FROM glseries WHERE ((glseries_amount<>0.0) AND (glseries_sequence=pSequence)) GROUP BY glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_distdate, glseries_notes, glseries_misc_id LOOP -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (_glseries.glseries_distdate BETWEEN period_start AND period_end) WHERE (accnt_id = _glseries.glseries_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', _glseries.glseries_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (_glseries.glseries_distdate BETWEEN period_start AND period_end) WHERE (accnt_id = _glseries.glseries_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', _glseries.glseries_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into nonexistent periods IF NOT EXISTS(SELECT period_id FROM period WHERE (_glseries.glseries_distdate BETWEEN period_start AND period_end)) THEN RAISE EXCEPTION 'Cannot post to nonexistent period (%).', pDistDate; END IF; IF (_glseries.amount != 0 OR pPostZero) THEN IF (fetchMetricBool('UseJournals')) THEN INSERT INTO sltrans ( sltrans_posted, sltrans_created, sltrans_date, sltrans_misc_id, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_notes, sltrans_doctype, sltrans_docnumber, sltrans_amount, sltrans_journalnumber ) VALUES ( FALSE, CURRENT_TIMESTAMP, _glseries.glseries_distdate, _glseries.glseries_misc_id, pSequence, _glseries.glseries_accnt_id, _glseries.glseries_source, _glseries.glseries_notes, _glseries.glseries_doctype, _glseries.glseries_docnumber, _glseries.amount, pJournalNumber ); ELSE INSERT INTO gltrans ( gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_misc_id, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_notes, gltrans_doctype, gltrans_docnumber, gltrans_amount, gltrans_journalnumber ) VALUES ( FALSE, FALSE, CURRENT_TIMESTAMP, _glseries.glseries_distdate, _glseries.glseries_misc_id, pSequence, _glseries.glseries_accnt_id, _glseries.glseries_source, _glseries.glseries_notes, _glseries.glseries_doctype, _glseries.glseries_docnumber, _glseries.amount, pJournalNumber ); END IF; _transCount := _transCount + 1; END IF; END LOOP; -- Delete all of the posted glseries members DELETE FROM glseries WHERE (glseries_sequence=pSequence); PERFORM postIntoTrialBalance(pSequence); RETURN _transCount; END; $_$; >DROP FUNCTION public.postglseries(integer, integer, boolean); publicadminfalse8399212551683137postglseriesnosumm(integer)FUNCTIONCREATE FUNCTION postglseriesnosumm(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _journalNumber INTEGER; _returnValue INTEGER; BEGIN SELECT postGLSeriesNoSumm(pSequence, fetchJournalNumber('G/L')) INTO _returnValue; RETURN _returnValue; END; $_$; 2DROP FUNCTION public.postglseriesnosumm(integer); publicadminfalse8399212551683138$postglseriesnosumm(integer, integer)FUNCTIONgCREATE FUNCTION postglseriesnosumm(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _glseries RECORD; _transCount INTEGER := 0; _rows INTEGER; BEGIN /* Make sure we don't create an imbalance across companies. The 'IgnoreCompanyBalance' metric is a back door mechanism to allow legacy users to create transactions accross companies if they have been using the company segment for something else and they MUST continue to be able to do so. It can only be implemented by direct sql update to the metric table and should otherwise be discouraged. */ IF (COALESCE(fetchMetricValue('GLCompanySize'),0) > 0 AND fetchMetricBool('IgnoreCompany') = false) THEN SELECT count(accnt_company) INTO _rows FROM ( SELECT DISTINCT accnt_company FROM accnt JOIN glseries ON (glseries_accnt_id=accnt_id) WHERE (glseries_sequence=pSequence)) _data; IF (_rows > 1) THEN RAISE EXCEPTION 'G/L Series can not be posted because multiple companies are referenced in the same series.'; END IF; END IF; -- Make sure that we balance IF ( ( SELECT SUM(glseries_amount) FROM glseries WHERE (glseries_sequence=pSequence) ) <> 0 ) THEN RETURN -1; END IF; -- March through the glseries members, posting them one at a time FOR _glseries IN SELECT glseries_source, glseries_doctype, glseries_docnumber, glseries_accnt_id, glseries_distdate, glseries_notes, glseries_misc_id, glseries_amount as amount FROM glseries WHERE ((glseries_amount<>0.0) AND (glseries_sequence=pSequence)) LOOP -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (_glseries.glseries_distdate BETWEEN period_start AND period_end) WHERE (accnt_id = _glseries.glseries_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', _glseries.glseries_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (_glseries.glseries_distdate BETWEEN period_start AND period_end) WHERE (accnt_id = _glseries.glseries_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', _glseries.glseries_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into nonexistent periods IF NOT EXISTS(SELECT period_id FROM period WHERE (_glseries.glseries_distdate BETWEEN period_start AND period_end)) THEN RAISE EXCEPTION 'Cannot post to nonexistent period (%).', pDistDate; END IF; IF (fetchMetricBool('UseJournals')) THEN INSERT INTO sltrans ( sltrans_posted, sltrans_created, sltrans_date, sltrans_misc_id, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_notes, sltrans_doctype, sltrans_docnumber, sltrans_amount, sltrans_journalnumber ) VALUES ( FALSE, CURRENT_TIMESTAMP, _glseries.glseries_distdate, _glseries.glseries_misc_id, pSequence, _glseries.glseries_accnt_id, _glseries.glseries_source, _glseries.glseries_notes, _glseries.glseries_doctype, _glseries.glseries_docnumber, _glseries.amount, pJournalNumber ); ELSE INSERT INTO gltrans ( gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_misc_id, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_notes, gltrans_doctype, gltrans_docnumber, gltrans_amount, gltrans_journalnumber ) VALUES ( FALSE, FALSE, CURRENT_TIMESTAMP, _glseries.glseries_distdate, _glseries.glseries_misc_id, pSequence, _glseries.glseries_accnt_id, _glseries.glseries_source, _glseries.glseries_notes, _glseries.glseries_doctype, _glseries.glseries_docnumber, _glseries.amount, pJournalNumber ); END IF; _transCount := _transCount + 1; END LOOP; -- Delete all of the posted glseries members DELETE FROM glseries WHERE (glseries_sequence=pSequence); PERFORM postIntoTrialBalance(pSequence); RETURN _transCount; END; $_$; ;DROP FUNCTION public.postglseriesnosumm(integer, integer); publicadminfalse83992t12551683140postintoinvbalance(integer)FUNCTIONCREATE FUNCTION postintoinvbalance(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvhistId ALIAS FOR $1; _invbalid INTEGER; _r RECORD; _count INTEGER; _qty NUMERIC; BEGIN -- Grab the invhist record to post -- Special fix for transit sites when transtype=TS and invqty<0 -- Set the sense to 1 to correct invhist populated incorrectly. SELECT invhist.*, CASE WHEN (invhist_transtype='TS' AND invhist_invqty < 0.0 AND warehous_transit) THEN 1 ELSE invhistSense(invhist_id) END AS sense, period_id INTO _r FROM invhist JOIN itemsite ON (itemsite_id=invhist_itemsite_id) JOIN whsinfo ON (warehous_id=itemsite_warehous_id) LEFT OUTER JOIN period ON (invhist_transdate::date BETWEEN period_start AND period_end) WHERE ( invhist_id=pInvhistId ); GET DIAGNOSTICS _count = ROW_COUNT; -- If we can post into a Inv Balance, do so IF ( _count > 0 ) THEN -- Validate IF (_r.period_id IS NULL) THEN RAISE EXCEPTION 'No accounting period exists for invhist_id %, transaction date %. Transaction can not be posted.', _r.invhist_id, formatDate(_r.invhist_transdate); END IF; -- If cycle count, then we need to reference balance which needs to be accurate -- IF (_r.invhist_transtype = 'CC') THEN -- PERFORM forwardupdateitemsite(_r.invhist_itemsite_id); -- END IF; -- Try to find an existing invbal SELECT invbal_id, -- CASE WHEN (_r.invhist_transtype != 'CC') THEN _r.invhist_invqty ELSE _r.invhist_invqty - invbal_qoh_ending END _r.invhist_invqty INTO _invbalid, _qty FROM invbal WHERE ( (invbal_period_id=_r.period_id) AND (invbal_itemsite_id=_r.invhist_itemsite_id) ); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count > 0) THEN -- We found a invbal, update it with the Inventory Transaction -- Note - two stage update to avoid any funny value caching logic IF (_r.sense * _qty > 0) THEN UPDATE invbal SET invbal_qty_in = (invbal_qty_in + abs(_qty)), invbal_value_in = (invbal_value_in + abs(_qty) * _r.invhist_unitcost) WHERE (invbal_id=_invbalid); ELSIF (_r.sense * _qty < 0) THEN UPDATE invbal SET invbal_qty_out = (invbal_qty_out + abs(_qty)), invbal_value_out = (invbal_value_out + abs(_qty) * _r.invhist_unitcost) WHERE (invbal_id=_invbalid); END IF; -- Non-netable transactions have their own balances IF (_r.invhist_transtype = 'NN') THEN UPDATE invbal SET invbal_nn_in = (invbal_nn_in + _qty * -1), invbal_nnval_in = (invbal_nnval_in + _qty * -1 * _r.invhist_unitcost) WHERE (invbal_id=_invbalid); END IF; UPDATE invbal SET invbal_qoh_ending = (invbal_qoh_beginning + invbal_qty_in - invbal_qty_out), invbal_value_ending = (invbal_value_beginning + invbal_value_in - invbal_value_out), invbal_nn_ending = (invbal_nn_beginning + invbal_nn_in - invbal_nn_out), invbal_nnval_ending = (invbal_nnval_beginning + invbal_nnval_in - invbal_nnval_out), invbal_dirty=true WHERE (invbal_id=_invbalid); ELSE -- No existing invbal, make one SELECT NEXTVAL('invbal_invbal_id_seq') INTO _invbalid; INSERT INTO invbal ( invbal_id, invbal_itemsite_id, invbal_period_id, invbal_qoh_beginning, invbal_qoh_ending, invbal_qty_in, invbal_qty_out, invbal_value_beginning, invbal_value_ending, invbal_value_in, invbal_value_out, invbal_nn_beginning, invbal_nn_ending, invbal_nn_in, invbal_nn_out, invbal_nnval_beginning, invbal_nnval_ending, invbal_nnval_in, invbal_nnval_out, invbal_dirty ) VALUES ( _invbalid, _r.invhist_itemsite_id, _r.period_id, -- Netable 0, _r.invhist_invqty * _r.sense, CASE WHEN (_r.sense > 0) THEN _r.invhist_invqty ELSE 0 END, CASE WHEN (_r.sense < 0) THEN (_r.invhist_invqty) ELSE 0 END, 0, _r.invhist_invqty * _r.invhist_unitcost * _r.sense, CASE WHEN (_r.sense > 0) THEN _r.invhist_invqty * _r.invhist_unitcost ELSE 0 END, CASE WHEN (_r.sense < 0) THEN (_r.invhist_invqty * _r.invhist_unitcost) ELSE 0 END, -- Non netable 0, CASE WHEN (_r.invhist_transtype='NN') THEN _r.invhist_invqty * -1 ELSE 0 END, CASE WHEN (_r.sense > 0 AND _r.invhist_transtype='NN') THEN _r.invhist_invqty * -1 ELSE 0 END, CASE WHEN (_r.sense < 0 AND _r.invhist_transtype='NN') THEN _r.invhist_invqty * -1 ELSE 0 END, 0, CASE WHEN (_r.invhist_transtype='NN') THEN _r.invhist_invqty * _r.invhist_unitcost * -1 ELSE 0 END, CASE WHEN (_r.sense > 0 AND _r.invhist_transtype='NN') THEN _r.invhist_invqty * -1 * _r.invhist_unitcost ELSE 0 END, CASE WHEN (_r.sense < 0 AND _r.invhist_transtype='NN') THEN (_r.invhist_invqty * -1 * _r.invhist_unitcost) ELSE 0 END, true ); END IF; ELSE RETURN FALSE; END IF; RETURN TRUE; END; $_$; 2DROP FUNCTION public.postintoinvbalance(integer); publicadminfalse8399212551683141postintotrialbalance(integer)FUNCTION CREATE FUNCTION postintotrialbalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _trialbalid INTEGER; _r RECORD; BEGIN -- March through all of the G/L Transactions for the passed sequence that are not posted FOR _r IN SELECT gltrans_id, gltrans_date, gltrans_accnt_id, gltrans_amount, accnt_forwardupdate, period_id, period_closed, period_freeze FROM accnt, gltrans LEFT OUTER JOIN period ON (gltrans_date BETWEEN period_start AND period_end) WHERE ( (gltrans_accnt_id=accnt_id) AND (NOT gltrans_posted) AND (NOT gltrans_deleted) AND (gltrans_sequence=pSequence) ) LOOP -- If we can post into a Trial Balance, do so IF ( (NOT _r.period_closed) AND ( (NOT _r.period_freeze) OR (checkPrivilege('PostFrozenPeriod')) ) ) THEN -- Try to find an existing trialbal SELECT trialbal_id INTO _trialbalid FROM trialbal WHERE ( (trialbal_period_id=_r.period_id) AND (trialbal_accnt_id=_r.gltrans_accnt_id) ); IF (FOUND) THEN -- We found a trialbal, update it with the G/L Transaction -- Note - two stage update to avoid any funny value caching logic IF (_r.gltrans_amount > 0) THEN UPDATE trialbal SET trialbal_credits = (trialbal_credits + _r.gltrans_amount) WHERE (trialbal_id=_trialbalid); ELSE UPDATE trialbal SET trialbal_debits = (trialbal_debits + (_r.gltrans_amount * -1)) WHERE (trialbal_id=_trialbalid); END IF; UPDATE trialbal SET trialbal_ending = (trialbal_beginning - trialbal_debits + trialbal_credits), trialbal_dirty=TRUE WHERE (trialbal_id=_trialbalid); ELSE -- No existing trialbal, make one SELECT NEXTVAL('trialbal_trialbal_id_seq') INTO _trialbalid; INSERT INTO trialbal ( trialbal_id, trialbal_accnt_id, trialbal_period_id, trialbal_beginning, trialbal_dirty, trialbal_ending, trialbal_credits, trialbal_debits ) VALUES ( _trialbalid, _r.gltrans_accnt_id, _r.period_id, 0, TRUE, _r.gltrans_amount, CASE WHEN (_r.gltrans_amount > 0) THEN _r.gltrans_amount ELSE 0 END, CASE WHEN (_r.gltrans_amount < 0) THEN (_r.gltrans_amount * -1) ELSE 0 END ); END IF; -- Forward update if we should IF (_r.accnt_forwardupdate AND fetchmetricbool('ManualForwardUpdate')) THEN PERFORM forwardUpdateTrialBalance(_trialbalid); END IF; -- Mark the G/L Transaction as posted UPDATE gltrans SET gltrans_posted=TRUE WHERE (gltrans_id=_r.gltrans_id); END IF; END LOOP; RETURN 1; END; $_$; 4DROP FUNCTION public.postintotrialbalance(integer); publicadminfalse83992u12551683142postinvhist(integer)FUNCTIONgCREATE FUNCTION postinvhist(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvhistId ALIAS FOR $1; _r RECORD; BEGIN IF ( SELECT metric_value FROM metric WHERE ((metric_name = 'EnableAsOfQOH') AND (metric_value = 't'))) THEN IF (NOT postIntoInvBalance(pInvhistId)) THEN RAISE EXCEPTION 'Post into Inventory Balance for invhist_id=% was unsuccessful',pInvhistId; END IF; END IF; --Update itemsite qoh and change posted flag UPDATE itemsite SET itemsite_qtyonhand = (itemsite_qtyonhand + (invhist_invqty * invhistSense(invhist_id))), itemsite_value = itemsite_value + invhist_value_after - invhist_value_before FROM invhist WHERE ( (itemsite_id=invhist_itemsite_id) AND (invhist_id=pInvhistId) AND (NOT invhist_posted) ); --Flag as posted UPDATE invhist SET invhist_posted=TRUE WHERE ( (invhist_id=pInvhistId) AND (invhist_posted=FALSE) ); RETURN TRUE; END; $_$; +DROP FUNCTION public.postinvhist(integer); publicadminfalse83992v12551683143postinvoice(integer)FUNCTIONCREATE FUNCTION postinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; _return INTEGER; BEGIN SELECT postInvoice(pInvcheadid, fetchJournalNumber('AR-IN')) INTO _return; RETURN _return; END; $_$; +DROP FUNCTION public.postinvoice(integer); publicadminfalse83992w12551683144postinvoice(integer, integer)FUNCTIONCREATE FUNCTION postinvoice(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _itemlocSeries INTEGER; _return INTEGER; BEGIN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; SELECT postInvoice(pInvcheadid, pJournalNumber, _itemlocseries) INTO _return; RETURN _return; END; $_$; 4DROP FUNCTION public.postinvoice(integer, integer); publicadminfalse83992x12551683145&postinvoice(integer, integer, integer)FUNCTIONrCREATE FUNCTION postinvoice(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; _aropenid INTEGER; _cohistid INTEGER; _itemlocSeries INTEGER := 0; _invhistid INTEGER := 0; _amount NUMERIC; _roundedBase NUMERIC; _sequence INTEGER; _r RECORD; _p RECORD; _test INTEGER; _totalAmount NUMERIC := 0; _totalRoundedBase NUMERIC := 0; _totalAmountBase NUMERIC := 0; _appliedAmount NUMERIC := 0; _commissionDue NUMERIC := 0; _tmpAccntId INTEGER; _tmpCurrId INTEGER; _firstExchDate DATE; _glDate DATE; _exchGain NUMERIC := 0; BEGIN IF ( ( SELECT invchead_posted FROM invchead WHERE (invchead_id=pInvcheadid) ) ) THEN RETURN -10; END IF; -- Cache some parameters SELECT invchead.*, fetchGLSequence() AS sequence, findFreightAccount(invchead_cust_id) AS freightaccntid, findARAccount(invchead_cust_id) AS araccntid, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM invcheadtax WHERE ( (taxhist_parent_id = invchead_id) AND (taxhist_taxtype_id = getFreightTaxtypeId()) ) ) AS freighttax, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM invcheadtax WHERE ( (taxhist_parent_id = invchead_id) AND (taxhist_taxtype_id = getAdjustmentTaxtypeId()) ) ) AS adjtax INTO _p FROM invchead WHERE (invchead_id=pInvcheadid); _itemlocSeries = pItemlocSeries; _glDate := COALESCE(_p.invchead_gldistdate, _p.invchead_invcdate); IF (_p.invchead_salesrep_id < 0) THEN RAISE NOTICE 'Patch negative invchead_salesrep_id until invchead_salesrep_id is a true fkey'; _p.invchead_salesrep_id := NULL; END IF; -- the 1st MC iteration used the cohead_orderdate so we could get curr exch -- gain/loss between the sales and invoice dates, but see issue 3892. leave -- this condition TRUE until we make this configurable or decide not to. IF TRUE THEN _firstExchDate := _p.invchead_invcdate; ELSE -- can we save a select by using: _firstExchDate := _p.invchead_orderdate; SELECT cohead_orderdate INTO _firstExchDate FROM cohead JOIN invchead ON (cohead_number = invchead_ordernumber) WHERE (invchead_id = pInvcheadid); END IF; -- Start by handling taxes FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.invchead_curr_id, round(sum(taxdetail_tax),2), _firstExchDate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('I', pInvcheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, _r.tax_sales_accnt_id, _r.taxbasevalue, _glDate, _p.invchead_billto_name ); _totalAmount := _totalAmount + _r.tax; _totalRoundedBase := _totalRoundedBase + _r.taxbasevalue; END LOOP; -- Update item tax records with posting data UPDATE invcitemtax SET taxhist_docdate=_firstExchDate, taxhist_distdate=_glDate, taxhist_curr_id=_p.invchead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM invchead JOIN invcitem ON (invchead_id=invcitem_invchead_id), curr_rate WHERE ((invchead_id=pInvcheadId) AND (taxhist_parent_id=invcitem_id) AND (_p.invchead_curr_id=curr_id) AND ( _firstExchDate BETWEEN curr_effective AND curr_expires) ); -- Update Invchead taxes (Freight and Adjustments) with posting data UPDATE invcheadtax SET taxhist_docdate=_firstExchDate, taxhist_distdate=_glDate, taxhist_curr_id=_p.invchead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM curr_rate WHERE ((taxhist_parent_id=pInvcheadid) AND (_p.invchead_curr_id=curr_id) AND ( _firstExchDate BETWEEN curr_effective AND curr_expires) ); -- March through the Non-Misc. Invcitems FOR _r IN SELECT * FROM invoiceitem WHERE ( (invcitem_invchead_id = pInvcheadid) AND (invcitem_item_id <> -1) ) LOOP -- Cache the amount due for this line _amount := _r.extprice; IF (_amount > 0) THEN -- Credit the Sales Account for the invcitem item IF (_r.invcitem_rev_accnt_id IS NOT NULL) THEN SELECT getPrjAccntId(_p.invchead_prj_id, _r.invcitem_rev_accnt_id) INTO _tmpAccntId; ELSEIF (_r.itemsite_id IS NULL) THEN SELECT getPrjAccntId(_p.invchead_prj_id, salesaccnt_sales_accnt_id) INTO _tmpAccntId FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.invcitem_item_id, 'I', _p.invchead_cust_id, _p.invchead_saletype_id, _p.invchead_shipzone_id)); ELSE SELECT getPrjAccntId(_p.invchead_prj_id, salesaccnt_sales_accnt_id) INTO _tmpAccntId FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.itemsite_id, 'IS', _p.invchead_cust_id, _p.invchead_saletype_id, _p.invchead_shipzone_id)); END IF; -- If the Sales Account Assignment was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN -11; END IF; _roundedBase := round(currToBase(_p.invchead_curr_id, _amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, _tmpAccntId, _roundedBase, _glDate, _p.invchead_billto_name ) INTO _test; _totalAmount := (_totalAmount + _amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; _commissionDue := (_commissionDue + (_amount * _p.invchead_commission)); END IF; _totalAmount := _totalAmount; _totalRoundedBase := _totalRoundedBase; -- Record Sales History for this S/O Item SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.invchead_cust_id, _r.itemsite_id, _p.invchead_shipto_id, _p.invchead_shipdate, _p.invchead_shipvia, COALESCE(_p.invchead_ordernumber, _r.cohead_number), _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, _r.qty, _r.unitprice, _r.unitcost, _p.invchead_salesrep_id, (_p.invchead_commission * _r.extprice), FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, _r.invcitem_taxtype_id, _p.invchead_taxzone_id, _p.invchead_shipzone_id, _p.invchead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM invcitemtax WHERE (taxhist_parent_id=_r.invcitem_id); END LOOP; -- March through the Misc. Invcitems FOR _r IN SELECT * FROM invoiceitem JOIN salescat ON (salescat_id = invcitem_salescat_id) WHERE ( (invcitem_item_id = -1) AND (invcitem_invchead_id=pInvcheadid) ) LOOP -- Cache the amount due for this line and the commission due for such _amount := _r.extprice; IF (_amount > 0) THEN -- Credit the Sales Account for the invcitem item _roundedBase = round(currToBase(_p.invchead_curr_id, _amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id, COALESCE(_r.invcitem_rev_accnt_id, _r.salescat_sales_accnt_id)), _roundedBase, _glDate, _p.invchead_billto_name ) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; _totalAmount := (_totalAmount + _amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; _commissionDue := (_commissionDue + (_amount * _p.invchead_commission)); END IF; -- Record Sales History for this S/O Item SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.invchead_cust_id, -1, _p.invchead_shipto_id, 'M', (_r.invcitem_number || '-' || _r.invcitem_descrip), _p.invchead_shipdate, _p.invchead_shipvia, COALESCE(_p.invchead_ordernumber, _r.cohead_number), _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, _r.qty, _r.unitprice, 0, _p.invchead_salesrep_id, (_p.invchead_commission * _r.extprice), FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, _r.invcitem_taxtype_id, _p.invchead_taxzone_id, _p.invchead_shipzone_id, _p.invchead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM invcitemtax WHERE (taxhist_parent_id=_r.invcitem_id); END LOOP; -- Credit the Freight Account for Freight Charges IF (_p.invchead_freight <> 0) THEN IF (_p.freightaccntid <> -1) THEN _roundedBase = round(currToBase(_p.invchead_curr_id, _p.invchead_freight, _firstExchDate), 2); SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id,_p.freightaccntid), _roundedBase, _glDate, _p.invchead_billto_name ) INTO _test; -- Cache the Freight Amount distributed _totalAmount := (_totalAmount + _p.invchead_freight); _totalRoundedBase := _totalRoundedBase + _roundedBase; ELSE _test := -14; END IF; -- If the Freight Account was not found then punt IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; -- Record Sales History for the Freight SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.invchead_cust_id, -1, _p.invchead_shipto_id, 'F', 'Freight', _p.invchead_shipdate, _p.invchead_shipvia, _p.invchead_ordernumber, _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, 1, _p.invchead_freight, _p.invchead_freight, _p.invchead_salesrep_id, 0, FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, getFreightTaxtypeId(), _p.invchead_taxzone_id, _p.invchead_shipzone_id, _p.invchead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM invcheadtax WHERE ( (taxhist_parent_id=_p.invchead_id) AND (taxhist_taxtype_id=getFreightTaxtypeId()) ); END IF; -- Credit the Misc. Account for Miscellaneous Charges IF (_p.invchead_misc_amount <> 0) THEN _roundedBase := round(currToBase(_p.invchead_curr_id, _p.invchead_misc_amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id, _p.invchead_misc_accnt_id), _roundedBase, _glDate, _p.invchead_billto_name ) INTO _test; -- If the Misc. Charges Account was not found then punt IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; -- Cache the Misc. Amount distributed _totalAmount := (_totalAmount + _p.invchead_misc_amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; -- Record Sales History for the Misc. Charge INSERT INTO cohist ( cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _p.invchead_cust_id, -1, _p.invchead_shipto_id, 'M', _p.invchead_misc_descrip, _p.invchead_misc_accnt_id, _p.invchead_shipdate, _p.invchead_shipvia, _p.invchead_ordernumber, _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, 1, _p.invchead_misc_amount, _p.invchead_misc_amount, _p.invchead_salesrep_id, 0, FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, _p.invchead_shipzone_id, _p.invchead_saletype_id ); END IF; -- Record Sales History for the Tax Adjustment IF (_p.adjtax <> 0) THEN SELECT nextval('cohist_cohist_id_seq') INTO _cohistid; INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipto_id, cohist_misc_type, cohist_misc_descrip, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_ponumber, cohist_orderdate, cohist_doctype, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_salesrep_id, cohist_commission, cohist_commissionpaid, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_curr_id, cohist_sequence, cohist_taxtype_id, cohist_taxzone_id, cohist_shipzone_id, cohist_saletype_id ) VALUES ( _cohistid, _p.invchead_cust_id, -1, _p.invchead_shipto_id, 'T', 'Misc Tax Adjustment', _p.invchead_shipdate, _p.invchead_shipvia, _p.invchead_ordernumber, _p.invchead_ponumber, _p.invchead_orderdate, 'I', _p.invchead_invcnumber, _p.invchead_invcdate, 1, 0.0, 0.0, _p.invchead_salesrep_id, 0, FALSE, _p.invchead_billto_name, _p.invchead_billto_address1, _p.invchead_billto_address2, _p.invchead_billto_address3, _p.invchead_billto_city, _p.invchead_billto_state, _p.invchead_billto_zipcode, _p.invchead_shipto_name, _p.invchead_shipto_address1, _p.invchead_shipto_address2, _p.invchead_shipto_address3, _p.invchead_shipto_city, _p.invchead_shipto_state, _p.invchead_shipto_zipcode, _p.invchead_curr_id, _p.sequence, getAdjustmentTaxtypeId(), _p.invchead_taxzone_id, _p.invchead_shipzone_id, _p.invchead_saletype_id ); INSERT INTO cohisttax ( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT _cohistid, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM invcheadtax WHERE ( (taxhist_parent_id=_p.invchead_id) AND (taxhist_taxtype_id=getAdjustmentTaxtypeId()) ); END IF; -- ToDo: handle rounding errors _exchGain := currGain(_p.invchead_curr_id, _totalAmount, _firstExchDate, _glDate); IF (_exchGain <> 0) THEN SELECT insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, getGainLossAccntId(_p.araccntid), round(_exchGain, 2) * -1, _glDate, _p.invchead_billto_name ) INTO _test ; IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; END IF; -- Debit A/R for the total Amount IF (_totalRoundedBase <> 0) THEN IF (_p.araccntid != -1) THEN PERFORM insertIntoGLSeries( _p.sequence, 'A/R', 'IN', _p.invchead_invcnumber, _p.araccntid, round(_totalRoundedBase * -1, 2), _glDate, _p.invchead_billto_name ); ELSE PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN -17; END IF; END IF; -- Commit the GLSeries; SELECT postGLSeries(_p.sequence, pJournalNumber) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_p.sequence); DELETE FROM cohist WHERE ((cohist_sequence=_p.sequence) AND (cohist_invcnumber=_p.invchead_invcnumber)); RETURN _test; END IF; -- Create the Invoice aropen item SELECT nextval('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_open, aropen_posted, aropen_cust_id, aropen_ponumber, aropen_docnumber, aropen_applyto, aropen_doctype, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_amount, aropen_paid, aropen_salesrep_id, aropen_commission_due, aropen_commission_paid, aropen_ordernumber, aropen_notes, aropen_cobmisc_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), pJournalNumber, TRUE, FALSE, _p.invchead_cust_id, _p.invchead_ponumber, _p.invchead_invcnumber, _p.invchead_invcnumber, 'I', _p.invchead_invcdate, determineDueDate(_p.invchead_terms_id, _p.invchead_invcdate), _glDate, _p.invchead_terms_id, round(_totalAmount, 2), 0, _p.invchead_salesrep_id, _commissionDue, FALSE, _p.invchead_ordernumber::text, _p.invchead_notes, pInvcheadid, _p.invchead_curr_id ); -- Handle the Inventory and G/L Transactions for any billed Inventory where invcitem_updateinv is true FOR _r IN SELECT itemsite_id AS itemsite_id, invcitem_id, (invcitem_billed * invcitem_qty_invuomratio) AS qty, invchead_invcnumber, invchead_cust_id AS cust_id, item_number, invchead_saletype_id AS saletype_id, invchead_shipzone_id AS shipzone_id, invchead_prj_id, itemsite_costmethod FROM invchead JOIN invcitem ON ( (invcitem_invchead_id=invchead_id) AND (invcitem_billed <> 0) AND (invcitem_updateinv) ) JOIN itemsite ON ( (itemsite_item_id=invcitem_item_id) AND (itemsite_warehous_id=invcitem_warehous_id) ) JOIN item ON (item_id=invcitem_item_id) WHERE (invchead_id=pInvcheadid) LOOP -- Issue billed stock from inventory IF (_itemlocSeries = 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; IF (_r.itemsite_costmethod != 'J') THEN SELECT postInvTrans(itemsite_id, 'SH', _r.qty, 'S/O', 'IN', _r.invchead_invcnumber, '', ('Invoice Billed ' || _r.item_number), getPrjAccntId(_r.invchead_prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)), costcat_asset_accnt_id, _itemlocSeries, _glDate) INTO _invhistid FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); ELSE RAISE DEBUG 'postInvoice(%, %, %) tried to postInvTrans a %-costed item', pInvcheadid, pJournalNumber, pItemlocSeries, _r.itemsite_costmethod; END IF; END LOOP; -- Mark the invoice as posted UPDATE invchead SET invchead_posted=TRUE, invchead_gldistdate=_glDate WHERE (invchead_id=pInvcheadid); IF (_totalAmount > 0) THEN -- get a list of allocated CMs FOR _r IN SELECT aropen_id, CASE WHEN((aropen_amount - aropen_paid) >= aropenalloc_amount / (1 / aropen_curr_rate / currRate(aropenalloc_curr_id,_firstExchDate))) THEN aropenalloc_amount / (1 / aropen_curr_rate / currRate(aropenalloc_curr_id,_firstExchDate)) ELSE (aropen_amount - aropen_paid) END AS balance, aropen_curr_id, aropen_curr_rate, aropenalloc_doctype, aropenalloc_doc_id FROM aropenalloc, aropen WHERE ( (aropenalloc_aropen_id=aropen_id) AND ((aropenalloc_doctype='S' AND aropenalloc_doc_id=(SELECT cohead_id FROM cohead WHERE cohead_number=_p.invchead_ordernumber)) OR (aropenalloc_doctype='I' AND aropenalloc_doc_id=_p.invchead_id)) ) LOOP _appliedAmount := _r.balance; IF (_totalAmount < _appliedAmount / (1 / currRate(_r.aropen_curr_id,_firstExchDate) / _r.aropen_curr_rate)) THEN _appliedAmount := _totalAmount; _tmpCurrId := _p.invchead_curr_id; ELSE _tmpCurrId := _r.aropen_curr_id; END IF; -- ignore if no appliable balance IF (_appliedAmount > 0) THEN -- create an arcreditapply record linking the source c/m and the target invoice -- for an amount that is equal to the balance on the invoice or the balance on -- c/m whichever is greater. INSERT INTO arcreditapply (arcreditapply_source_aropen_id, arcreditapply_target_aropen_id, arcreditapply_amount, arcreditapply_curr_id, arcreditapply_reftype, arcreditapply_ref_id) VALUES(_r.aropen_id, _aropenid, _appliedAmount, _tmpCurrId, 'S', _r.aropenalloc_doc_id); -- call postARCreditMemoApplication(aropen_id of C/M) SELECT postARCreditMemoApplication(_r.aropen_id) into _test; -- if no error decrement the balance and contiue on IF (_test >= 0) THEN _totalAmount := _totalAmount - currToCurr(_tmpCurrId, _p.invchead_curr_id, _appliedAmount, _firstExchDate); END IF; END IF; END LOOP; END IF; RETURN _itemlocSeries; END; $_$; =DROP FUNCTION public.postinvoice(integer, integer, integer); publicadminfalse83992y12551683147postinvoices(boolean)FUNCTION;CREATE FUNCTION postinvoices(boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; BEGIN RETURN postInvoices(pPostUnprinted, FALSE); END; $_$; ,DROP FUNCTION public.postinvoices(boolean); publicadminfalse8399212551683148postinvoices(boolean, boolean)FUNCTIONCREATE FUNCTION postinvoices(boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; pInclZeros ALIAS FOR $2; BEGIN RETURN postInvoices(pPostUnprinted, pInclZeros, fetchJournalNumber('AR-IN')); END; $_$; 5DROP FUNCTION public.postinvoices(boolean, boolean); publicadminfalse8399212551683149'postinvoices(boolean, boolean, integer)FUNCTIONCREATE FUNCTION postinvoices(boolean, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostUnprinted ALIAS FOR $1; pInclZeros ALIAS FOR $2; pJournalNumber ALIAS FOR $3; _invcheadid INTEGER; _itemlocSeries INTEGER; _counter INTEGER; _r RECORD; BEGIN _itemlocSeries := 0; IF (pInclZeros) THEN FOR _invcheadid IN SELECT invchead_id FROM invchead WHERE ( (NOT invchead_posted) AND (checkInvoiceSitePrivs(invchead_id)) AND (pPostUnprinted OR invchead_printed) ) LOOP SELECT postInvoice(_invcheadid, pJournalNumber, _itemlocSeries) INTO _itemlocSeries; IF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; END LOOP; ELSE FOR _invcheadid IN SELECT invchead_id FROM invchead LEFT OUTER JOIN invcitem ON (invchead_id=invcitem_invchead_id) LEFT OUTER JOIN item ON (invcitem_item_id=item_id) WHERE((NOT invchead_posted) AND (checkInvoiceSitePrivs(invchead_id)) AND (pPostUnprinted OR invchead_printed)) GROUP BY invchead_id, invchead_freight, invchead_misc_amount HAVING (COALESCE(SUM(round((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / CASE WHEN (item_id IS NULL) THEN 1 ELSE invcitem_price_invuomratio END), 2)),0) + invchead_freight + invchead_misc_amount) > 0 LOOP SELECT postInvoice(_invcheadid, pJournalNumber, _itemlocSeries) INTO _itemlocSeries; IF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; END LOOP; END IF; RETURN _itemlocSeries; END; $_$; >DROP FUNCTION public.postinvoices(boolean, boolean, integer); publicadminfalse8399212551683150postinvtrans(integer, text, numeric, text, text, text, text, text, integer, integer, integer, timestamp with time zone, numeric, integer)FUNCTIONT"CREATE FUNCTION postinvtrans(pitemsiteid integer, ptranstype text, pqty numeric, pmodule text, pordertype text, pordernumber text, pdocnumber text, pcomments text, pdebitid integer, pcreditid integer, pitemlocseries integer, ptimestamp timestamp with time zone DEFAULT now(), pcostovrld numeric DEFAULT NULL::numeric, pinvhistid integer DEFAULT NULL::integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. -- pInvhistid is the original transaction to be returned, reversed, etc. DECLARE _creditid INTEGER; _debitid INTEGER; _glreturn INTEGER; _invhistid INTEGER; _itemlocdistid INTEGER; _r RECORD; _sense INTEGER; -- direction in which to adjust inventory QOH _t RECORD; _timestamp TIMESTAMP WITH TIME ZONE; _xferwhsid INTEGER; BEGIN -- Cache item and itemsite info SELECT CASE WHEN(itemsite_costmethod IN ('A','J')) THEN COALESCE(abs(pCostOvrld / pQty), avgcost(itemsite_id)) ELSE stdCost(itemsite_item_id) END AS cost, itemsite_costmethod, itemsite_qtyonhand, itemsite_warehous_id, ( (item_type = 'R') OR (itemsite_controlmethod = 'N') ) AS nocontrol, (itemsite_controlmethod IN ('L', 'S')) AS lotserial, (itemsite_loccntrl) AS loccntrl, itemsite_freeze AS frozen INTO _r FROM itemsite JOIN item ON (item_id=itemsite_item_id) WHERE (itemsite_id=pItemsiteid); --Post the Inventory Transactions IF (_r.nocontrol) THEN RETURN -1; -- non-fatal error so dont throw an exception? END IF; IF (COALESCE(pItemlocSeries,0) = 0) THEN RAISE EXCEPTION 'Transaction series must be provided'; END IF; SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; IF ((pTimestamp IS NULL) OR (CAST(pTimestamp AS date)=CURRENT_DATE)) THEN _timestamp := CURRENT_TIMESTAMP; ELSE _timestamp := pTimestamp; END IF; IF (pTransType = 'TS' OR pTransType = 'TR') THEN SELECT * INTO _t FROM tohead WHERE (tohead_number=pDocNumber); IF (pTransType = 'TS') THEN _xferwhsid := CASE WHEN (_t.tohead_src_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_trns_warehous_id WHEN (_t.tohead_trns_warehous_id=_r.itemsite_warehous_id AND pComments ~* 'recall') THEN _t.tohead_src_warehous_id WHEN (_t.tohead_trns_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_dest_warehous_id WHEN (_t.tohead_dest_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_trns_warehous_id ELSE NULL END; ELSIF (pTransType = 'TR') THEN _xferwhsid := CASE WHEN (_t.tohead_src_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_trns_warehous_id WHEN (_t.tohead_trns_warehous_id=_r.itemsite_warehous_id AND pComments ~* 'recall') THEN _t.tohead_dest_warehous_id WHEN (_t.tohead_trns_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_src_warehous_id WHEN (_t.tohead_dest_warehous_id=_r.itemsite_warehous_id) THEN _t.tohead_trns_warehous_id ELSE NULL END; END IF; END IF; -- increase inventory: AD RM RT RP RR RS RX RB TR -- decrease inventory: IM IB IT SH SI EX RI -- TS and TR are special: shipShipment and recallShipment should not change -- QOH at the Transfer Order src whs (as this was done by issueToShipping) -- but postReceipt should change QOH at the transit whs IF (pTransType='TS') THEN _sense := CASE WHEN (SELECT tohead_trns_warehous_id=_r.itemsite_warehous_id FROM tohead WHERE (tohead_number=pDocNumber)) THEN -1 ELSE 0 END; ELSIF (pTransType='TR') THEN _sense := CASE WHEN (SELECT tohead_src_warehous_id=_r.itemsite_warehous_id FROM tohead WHERE (tohead_number=pDocNumber)) THEN 0 ELSE 1 END; ELSIF (pTransType IN ('IM', 'IB', 'IT', 'SH', 'SI', 'EX', 'RI')) THEN _sense := -1; ELSE _sense := 1; END IF; IF((_r.itemsite_costmethod='A') AND (_r.itemsite_qtyonhand + round(_sense * pQty, 6)) < 0) THEN -- Can not let average costed itemsites go negative RAISE EXCEPTION 'This transaction will cause an Average Costed item to go negative which is not allowed [xtuple: postinvtrans, -2]'; END IF; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transtype, invhist_transdate, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_ordtype, invhist_ordnumber, invhist_docnumber, invhist_comments, invhist_invuom, invhist_unitcost, invhist_xfer_warehous_id, invhist_posted, invhist_series ) SELECT _invhistid, itemsite_id, pTransType, _timestamp, pQty, itemsite_qtyonhand, (itemsite_qtyonhand + (_sense * pQty)), itemsite_costmethod, itemsite_value, itemsite_value + (_r.cost * _sense * pQty), pOrderType, pOrderNumber, pDocNumber, pComments, uom_name, _r.cost, _xferwhsid, FALSE, pItemlocSeries FROM itemsite, item, uom WHERE ( (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_id=pItemsiteid) ); IF (pCreditid IN (SELECT accnt_id FROM accnt)) THEN _creditid = pCreditid; ELSE SELECT warehous_default_accnt_id INTO _creditid FROM itemsite, whsinfo WHERE ( (itemsite_warehous_id=warehous_id) AND (itemsite_id=pItemsiteid) ); END IF; IF (pDebitid IN (SELECT accnt_id FROM accnt)) THEN _debitid = pDebitid; ELSE SELECT warehous_default_accnt_id INTO _debitid FROM itemsite, whsinfo WHERE ( (itemsite_warehous_id=warehous_id) AND (itemsite_id=pItemsiteid) ); END IF; -- Post the G/L Transaction IF (_creditid <> _debitid) THEN SELECT insertGLTransaction(pModule, pOrderType, pOrderNumber, pComments, _creditid, _debitid, _invhistid, (_r.cost * pQty), _timestamp::DATE, FALSE) INTO _glreturn; END IF; -- Distribute this if this itemsite is controlled IF ( _r.lotserial OR _r.loccntrl ) THEN _itemlocdistid := nextval('itemlocdist_itemlocdist_id_seq'); INSERT INTO itemlocdist ( itemlocdist_id, itemlocdist_itemsite_id, itemlocdist_source_type, itemlocdist_reqlotserial, itemlocdist_distlotserial, itemlocdist_expiration, itemlocdist_qty, itemlocdist_series, itemlocdist_invhist_id, itemlocdist_order_type, itemlocdist_order_id ) SELECT _itemlocdistid, pItemsiteid, 'O', (((pQty * _sense) > 0) AND _r.lotserial), ((pQty * _sense) < 0), endOfTime(), (_sense * pQty), pItemlocSeries, _invhistid, pOrderType, CASE WHEN pOrderType='SO' THEN getSalesLineItemId(pOrderNumber) ELSE NULL END; -- populate distributions if invhist_id parameter passed to undo IF (pInvhistid IS NOT NULL) THEN INSERT INTO itemlocdist ( itemlocdist_itemlocdist_id, itemlocdist_source_type, itemlocdist_source_id, itemlocdist_itemsite_id, itemlocdist_ls_id, itemlocdist_expiration, itemlocdist_qty, itemlocdist_series, itemlocdist_invhist_id ) SELECT _itemlocdistid, 'L', COALESCE(invdetail_location_id, -1), invhist_itemsite_id, invdetail_ls_id, COALESCE(invdetail_expiration, endoftime()), (invdetail_qty * -1.0), pItemlocSeries, _invhistid FROM invhist JOIN invdetail ON (invdetail_invhist_id=invhist_id) WHERE (invhist_id=pInvhistid); IF ( _r.lotserial) THEN INSERT INTO lsdetail ( lsdetail_itemsite_id, lsdetail_ls_id, lsdetail_created, lsdetail_source_type, lsdetail_source_id, lsdetail_source_number ) SELECT invhist_itemsite_id, invdetail_ls_id, CURRENT_TIMESTAMP, 'I', _itemlocdistid, '' FROM invhist JOIN invdetail ON (invdetail_invhist_id=invhist_id) WHERE (invhist_id=pInvhistid); END IF; PERFORM distributeitemlocseries(pItemlocSeries); END IF; END IF; -- end of distributions -- These records will be used for posting G/L transactions to trial balance after records committed. -- If we try to do it now concurrency locking prevents any transactions while -- user enters item distribution information. Cant have that. INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _glreturn, pItemlocSeries ); RETURN _invhistid; END; $$; 4DROP FUNCTION public.postinvtrans(pitemsiteid integer, ptranstype text, pqty numeric, pmodule text, pordertype text, pordernumber text, pdocnumber text, pcomments text, pdebitid integer, pcreditid integer, pitemlocseries integer, ptimestamp timestamp with time zone, pcostovrld numeric, pinvhistid integer); publicadminfalse8399212551683152postitemlocseries(integer)FUNCTION|CREATE FUNCTION postitemlocseries(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemlocseries ALIAS FOR $1; _result INTEGER; BEGIN PERFORM postIntoTrialBalance(itemlocpost_glseq) FROM ( SELECT DISTINCT itemlocpost_glseq, gltrans_accnt_id FROM itemlocpost JOIN gltrans ON (itemlocpost_glseq=gltrans_sequence) WHERE (itemlocpost_itemlocseries=pItemlocseries) ORDER BY gltrans_accnt_id ) AS data; PERFORM postInvHist(invhist_id) FROM invhist JOIN itemsite ON (invhist_itemsite_id=itemsite_id) WHERE ( (invhist_series=pItemlocseries) AND ( NOT invhist_posted) AND ( NOT itemsite_freeze) ); DELETE FROM itemlocpost WHERE (itemlocpost_itemlocseries=pItemlocseries); RETURN TRUE; END; $_$; 1DROP FUNCTION public.postitemlocseries(integer); publicadminfalse8399212551683153postjournals(integer)FUNCTION CREATE FUNCTION postjournals(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; _transCount INTEGER := 0; _journalnumber INTEGER := fetchJournalNumber('J/P'); _sequence INTEGER := fetchGLSequence(); _sltrans RECORD; BEGIN -- Make sure that we balance IF (SELECT SUM(sltrans_amount) != 0 FROM sltrans WHERE ((NOT sltrans_posted ) AND (sltrans_sequence=pSequence))) THEN RAISE EXCEPTION 'Can not post journals. Transactions do not balance in selected date range.'; END IF; -- March through the sltrans members, posting them one at a time FOR _sltrans IN SELECT sltrans_source, sltrans_accnt_id, SUM(sltrans_amount) as amount FROM sltrans WHERE ((sltrans_amount<>0.0) AND (NOT sltrans_posted) AND (sltrans_sequence=pSequence)) GROUP BY sltrans_source, sltrans_accnt_id LOOP -- refuse to accept postings into closed periods IF (SELECT BOOL_AND(COALESCE(period_closed, FALSE)) FROM accnt LEFT OUTER JOIN period ON (CURRENT_DATE BETWEEN period_start AND period_end) WHERE (accnt_id = _sltrans.sltrans_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to closed period (%).', _sltrans.sltrans_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; -- refuse to accept postings into frozen periods without proper priv IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (CURRENT_DATE BETWEEN period_start AND period_end) WHERE (accnt_id = _sltrans.sltrans_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', _sltrans.sltrans_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; IF (_sltrans.amount != 0) THEN INSERT INTO gltrans ( gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_notes, gltrans_doctype, gltrans_docnumber, gltrans_amount, gltrans_journalnumber, gltrans_rec ) VALUES ( FALSE, FALSE, CURRENT_TIMESTAMP, CURRENT_DATE, _sequence, _sltrans.sltrans_accnt_id, _sltrans.sltrans_source, 'Journal Posting', 'JP', _journalnumber, _sltrans.amount, _journalnumber, TRUE ); _transCount := _transCount + 1; END IF; END LOOP; -- Update all of the posted sltrans members UPDATE sltrans SET sltrans_posted=true, sltrans_gltrans_journalnumber=_journalnumber WHERE ((NOT sltrans_posted) AND (sltrans_sequence=pSequence)); PERFORM postIntoTrialBalance(_sequence); RETURN _journalnumber; END; $_$; ,DROP FUNCTION public.postjournals(integer); publicadminfalse83992"12551683154&postjournals(text[], date, date, date)FUNCTIONCREATE FUNCTION postjournals(text[], date, date, date) RETURNS SETOF integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSources ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; pDistDate ALIAS FOR $4; _i INTEGER; BEGIN FOR _i IN 1..ARRAY_UPPER(pSources,1) LOOP RETURN NEXT postJournals(pSources[_i], pStartDate, pEndDate, pDistDate); END LOOP; RETURN; END; $_$; =DROP FUNCTION public.postjournals(text[], date, date, date); publicadminfalse8399212551683155$postjournals(text, date, date, date)FUNCTION CREATE FUNCTION postjournals(text, date, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; pDistDate ALIAS FOR $4; _transCount INTEGER := 0; _journalnumber INTEGER := fetchJournalNumber('J/P'); _sequence INTEGER := fetchGLSequence(); _sltrans RECORD; BEGIN -- Make sure that we balance IF (SELECT SUM(sltrans_amount) != 0 FROM sltrans WHERE ((NOT sltrans_posted ) AND (sltrans_source=pSource) AND (sltrans_date BETWEEN pStartDate AND pEndDate))) THEN RAISE EXCEPTION 'Can not post journals. Transactions do not balance in selected date range.'; END IF; -- March through the sltrans members, posting them one at a time FOR _sltrans IN SELECT sltrans_source, sltrans_accnt_id, SUM(sltrans_amount) as amount FROM sltrans WHERE ((sltrans_amount<>0.0) AND (NOT sltrans_posted) AND (sltrans_source=pSource) AND (sltrans_date BETWEEN pStartDate AND pEndDate)) GROUP BY sltrans_source, sltrans_accnt_id LOOP -- refuse to accept postings into frozen periods if any of the accounts disallow it IF (SELECT NOT BOOL_AND(checkPrivilege('PostFrozenPeriod')) AND BOOL_AND(COALESCE(period_freeze, FALSE)) FROM accnt LEFT OUTER JOIN period ON (pDistDate BETWEEN period_start AND period_end) WHERE (accnt_id = _sltrans.sltrans_accnt_id)) THEN RAISE EXCEPTION 'Cannot post to frozen period (%).', _sltrans.sltrans_distdate; RETURN -4; -- remove raise exception when all callers check return code END IF; IF (_sltrans.amount != 0) THEN INSERT INTO gltrans ( gltrans_posted, gltrans_exported, gltrans_created, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_notes, gltrans_doctype, gltrans_docnumber, gltrans_amount, gltrans_journalnumber ) VALUES ( FALSE, FALSE, CURRENT_TIMESTAMP, pDistDate, _sequence, _sltrans.sltrans_accnt_id, _sltrans.sltrans_source, 'Journal Posting', 'JP', _journalnumber, _sltrans.amount, _journalnumber ); _transCount := _transCount + 1; END IF; END LOOP; -- Update all of the posted sltrans members UPDATE sltrans SET sltrans_posted=true, sltrans_gltrans_journalnumber=_journalnumber WHERE ((NOT sltrans_posted) AND (sltrans_source=pSource) AND (sltrans_date BETWEEN pStartDate AND pEndDate)); PERFORM postIntoTrialBalance(_sequence); RETURN _journalnumber; END; $_$; ;DROP FUNCTION public.postjournals(text, date, date, date); publicadminfalse8399212551683156Kpostmessage(timestamp without time zone, timestamp without time zone, text)FUNCTION/CREATE FUNCTION postmessage(timestamp without time zone, timestamp without time zone, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pScheduled ALIAS FOR $1; pExpires ALIAS FOR $2; pText ALIAS FOR $3; _msgid INTEGER; BEGIN SELECT NEXTVAL('msg_msg_id_seq') INTO _msgid; INSERT INTO msg (msg_id, msg_posted, msg_scheduled, msg_expires, msg_username, msg_text) VALUES (_msgid, CURRENT_TIMESTAMP, pScheduled, pExpires, getEffectiveXtUser(), pText); INSERT INTO msguser ( msguser_msg_id, msguser_username ) SELECT _msgid, usr_username FROM usr WHERE (usr_username <> getEffectiveXtUser()); NOTIFY "messagePosted"; RETURN _msgid; END; $_$; bDROP FUNCTION public.postmessage(timestamp without time zone, timestamp without time zone, text); publicadminfalse8399212551683157postmessage(text, text)FUNCTIONCREATE FUNCTION postmessage(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pText ALIAS FOR $2; _msgid INTEGER; BEGIN SELECT NEXTVAL('msg_msg_id_seq') INTO _msgid; INSERT INTO msg (msg_id, msg_posted, msg_scheduled, msg_expires, msg_username, msg_text) VALUES (_msgid, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, endOfTime(), getEffectiveXtUser(), pText); INSERT INTO msguser ( msguser_msg_id, msguser_username ) VALUES ( _msgid, pUsername ); NOTIFY "messagePosted"; RETURN _msgid; END; $_$; .DROP FUNCTION public.postmessage(text, text); publicadminfalse8399212551683158Qpostmessage(timestamp without time zone, timestamp without time zone, text, text)FUNCTIONCREATE FUNCTION postmessage(timestamp without time zone, timestamp without time zone, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pScheduled ALIAS FOR $1; pExpires ALIAS FOR $2; pUsername ALIAS FOR $3; pText ALIAS FOR $4; _msgid INTEGER; BEGIN SELECT NEXTVAL('msg_msg_id_seq') INTO _msgid; INSERT INTO msg (msg_id, msg_posted, msg_scheduled, msg_expires, msg_username, msg_text) VALUES (_msgid, CURRENT_TIMESTAMP, pScheduled, pExpires, getEffectiveXtUser(), pText); INSERT INTO msguser ( msguser_msg_id, msguser_username ) VALUES ( _msgid, pUsername ); NOTIFY "messagePosted"; RETURN _msgid; END; $_$; hDROP FUNCTION public.postmessage(timestamp without time zone, timestamp without time zone, text, text); publicadminfalse8399212551683159%postmisccount(integer, numeric, text)FUNCTIONnCREATE FUNCTION postmisccount(pitemsiteid integer, pqty numeric, pcomments text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pComments ALIAS FOR $3; _invcntid INTEGER; _result INTEGER; BEGIN -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; SELECT invcnt_id INTO _invcntid FROM invcnt WHERE ( (NOT invcnt_posted) AND (invcnt_itemsite_id=pItemsiteid) ); IF (_invcntid IS NULL) THEN _invcntid := NEXTVAL('invcnt_invcnt_id_seq'); INSERT INTO invcnt ( invcnt_id, invcnt_itemsite_id, invcnt_tagdate, invcnt_qoh_before, invcnt_qoh_after, invcnt_tag_username, invcnt_cntdate, invcnt_cnt_username, invcnt_postdate, invcnt_post_username, invcnt_posted, invcnt_priority, invcnt_comments ) SELECT _invcntid, pItemsiteid, now(), itemsite_qtyonhand, pQty, getEffectiveXtUser(), now(), getEffectiveXtUser(), now(), getEffectiveXtUser(), FALSE, FALSE, pComments FROM itemsite WHERE (itemsite_id=pItemsiteid); SELECT postCountTag(_invcntid, FALSE) INTO _result; IF (_result < 0) THEN DELETE FROM invcnt WHERE (invcnt_id=_invcntid); END IF; RETURN _result; ELSE RETURN -2; END IF; END; $_$; WDROP FUNCTION public.postmisccount(pitemsiteid integer, pqty numeric, pcomments text); publicadminfalse8399212551683160postpogltransactions()FUNCTIONCREATE FUNCTION postpogltransactions() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE gltrans SET gltrans_exported=TRUE WHERE ( (NOT gltrans_exported) AND (gltrans_source='A/P') AND (gltrans_doctype IN ('VO')) ); RETURN TRUE; END; $$; -DROP FUNCTION public.postpogltransactions(); publicadminfalse8399212551683161postporeceipt(integer, integer)FUNCTIONCREATE FUNCTION postporeceipt(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN postReceipt($1, $2); END; $_$; 6DROP FUNCTION public.postporeceipt(integer, integer); publicadminfalse8399212551683162postporeceipts(integer)FUNCTIONCREATE FUNCTION postporeceipts(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN postReceipts('PO', $1, NULL); END; $_$; .DROP FUNCTION public.postporeceipts(integer); publicadminfalse8399212551683163postporeturncreditmemo(integer)FUNCTIONICREATE FUNCTION postporeturncreditmemo(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPorejectId ALIAS FOR $1; BEGIN RETURN postPoReturnCreditMemo(pPorejectId, NULL); END; $_$; 6DROP FUNCTION public.postporeturncreditmemo(integer); publicadminfalse8399212551683164(postporeturncreditmemo(integer, numeric)FUNCTIONCREATE FUNCTION postporeturncreditmemo(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPorejectId ALIAS FOR $1; pAmount ALIAS FOR $2; _p RECORD; _a RECORD; _itemsiteId INTEGER; _docNumber TEXT; _sequence INTEGER; _journalNumber INTEGER; _apopenid INTEGER; _exchGainItem NUMERIC; _itemAmount_base NUMERIC; _itemAmount NUMERIC; _glseriesTotal NUMERIC; _tmpTotal NUMERIC; _test INTEGER; _exchDate DATE; _tax RECORD; _taxAmount NUMERIC := 0; _taxAmount_base NUMERIC; _apaccntid INTEGER; BEGIN --Set things up SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; SELECT fetchGLSequence() INTO _sequence; SELECT fetchJournalNumber('AP-MISC') INTO _journalNumber; SELECT fetchapmemonumber() INTO _docNumber; _glseriesTotal := 0; --Get poreject data SELECT pohead_vend_id, pohead_number, pohead_curr_id, pohead_orderdate, pohead_taxzone_id, poitem_id, poitem_itemsite_id,poitem_expcat_id, poitem_taxtype_id, itemsite_costcat_id, poreject_qty, poreject_date, ('Return of Item ' || COALESCE(item_number,poitem_vend_item_number) || ', qty. ' || formatqty(poreject_qty)) AS notes, poreject_value AS value, currToBase(pohead_curr_id,(poitem_unitprice * poreject_qty),CURRENT_DATE) AS itemAmount_base, (poitem_unitprice * poreject_qty) AS itemAmount INTO _p FROM pohead, poreject, poitem LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) LEFT OUTER JOIN item ON (itemsite_item_id=item_id) WHERE ((poreject_poitem_id=poitem_id) AND (pohead_id=poitem_pohead_id) AND (poreject_id=pPorejectId)); _itemAmount := _p.itemAmount; _itemAmount_base := _p.itemAmount_base; IF (pAmount IS NOT NULL) THEN _itemAmount := pAmount; _itemAmount_base := currToBase(_p.pohead_curr_id, pAmount, CURRENT_DATE); END IF; -- Grab the G/L Accounts IF (COALESCE(_p.poitem_itemsite_id, -1) = -1) THEN SELECT pp.accnt_id AS pp_accnt_id, lb.accnt_id AS lb_accnt_id INTO _a FROM expcat, accnt AS pp, accnt AS lb WHERE ( (expcat_purchprice_accnt_id=pp.accnt_id) AND (expcat_liability_accnt_id=lb.accnt_id) AND (expcat_id=_p.poitem_expcat_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Credit Memo due to unassigned G/L Accounts.'; END IF; ELSE SELECT pp.accnt_id AS pp_accnt_id, lb.accnt_id AS lb_accnt_id INTO _a FROM costcat, accnt AS pp, accnt AS lb WHERE ( (costcat_purchprice_accnt_id=pp.accnt_id) AND (costcat_liability_accnt_id=lb.accnt_id) AND (costcat_id=_p.itemsite_costcat_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Credit Memo due to unassigned G/L Accounts.'; END IF; END IF; -- AP Open Item record INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_accnt_id, apopen_curr_id, apopen_closedate ) VALUES ( _apopenid, getEffectiveXtUser(), _journalNumber, _p.pohead_vend_id, _docNumber, 'C', _p.pohead_number, CURRENT_DATE, CURRENT_DATE, CURRENT_DATE, -1, round(_itemAmount, 2), 0, (round(_itemAmount, 2) <> 0), _p.notes, -1, _p.pohead_curr_id, CASE WHEN (round(_itemAmount, 2) = 0) THEN _p.poreject_date END ); -- Taxes FOR _tax IN SELECT taxdetail_tax_id, sum(taxdetail_tax) AS taxdetail_tax, currToBase(_p.pohead_curr_id, round(sum(taxdetail_tax),2), current_date) AS taxbasevalue FROM calculateTaxDetail(_p.pohead_taxzone_id, _p.poitem_taxtype_id, current_date, _p.pohead_curr_id, _itemAmount) GROUP BY taxdetail_tax_id LOOP INSERT INTO apopentax (taxhist_basis,taxhist_percent,taxhist_amount,taxhist_docdate, taxhist_tax_id, taxhist_tax, taxhist_taxtype_id, taxhist_parent_id, taxhist_journalnumber ) VALUES (0, 0, 0, current_date, _tax.taxdetail_tax_id, _tax.taxdetail_tax, getadjustmenttaxtypeid(), _apopenid, _journalNumber); _taxAmount := _taxAmount + _tax.taxdetail_tax; END LOOP; _taxAmount_base := addTaxToGLSeries(_sequence, 'A/P', 'CM', _docNumber, _p.pohead_curr_id, current_date, current_date, 'apopentax', _apopenid, _p.notes); UPDATE apopen SET apopen_amount = round(_itemAmount + _taxAmount,2) WHERE (apopen_id = _apopenid); -- Distribute from the clearing account PERFORM insertIntoGLSeries( _sequence, 'A/P', 'CM', _docNumber, _a.lb_accnt_id, round(_p.value, 2), current_date, _p.notes ); _glseriesTotal := _glseriesTotal + round(_p.value, 2); -- Distribute the remaining variance to the Purchase Price Variance account IF (round(_itemAmount_base, 2) <> round(_p.value, 2)) THEN _tmpTotal := round(_itemAmount_base, 2) - round(_p.value, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'CM', _docNumber, _a.pp_accnt_id, _tmpTotal, current_date, _p.notes ); _glseriesTotal := _glseriesTotal + _tmpTotal; END IF; -- Post the reject item for this P/O Item as Invoiced UPDATE poreject SET poreject_invoiced=TRUE WHERE poreject_id=pPorejectId; -- Update the qty vouchered field UPDATE poitem SET poitem_qty_vouchered = (poitem_qty_vouchered - _p.poreject_qty) WHERE (poitem_id=_p.poitem_id); -- Post to A/P SELECT findAPAccount(_p.pohead_vend_id) INTO _apaccntid; IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Credit Memo due to an unassigned A/P Account.'; END IF; SELECT insertIntoGLSeries( _sequence, 'A/P', 'CM', _docNumber, _apaccntid, round(_itemAmount_base + _taxAmount_base, 2) *-1, current_date, _p.notes ) INTO _test; IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Credit Memo.'; END IF; -- Clean up loose ends _glseriesTotal := _glseriesTotal + round(_itemAmount_base, 2)*-1; IF (round(_glseriesTotal, 2) != 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/P', 'CM', 'Currency Exchange Rounding - ' || _docNumber, getGainLossAccntId(_apaccntid), round(_glseriesTotal, 2) * -1, current_date, _p.notes); END IF; -- Post it all PERFORM postGLSeries(_sequence, _journalNumber); RETURN _journalNumber; END; $_$; ?DROP FUNCTION public.postporeturncreditmemo(integer, numeric); publicadminfalse8399212551683166postporeturns(integer)FUNCTIONCREATE FUNCTION postporeturns(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; _itemlocSeries INTEGER; _p RECORD; _returnval INTEGER; BEGIN _itemlocSeries := 0; SELECT postPoReturns(pPoheadid,false) INTO _itemlocseries; RETURN _itemlocSeries; END; $_$; -DROP FUNCTION public.postporeturns(integer); publicadminfalse83992X12551683167postporeturns(integer, boolean)FUNCTIONoCREATE FUNCTION postporeturns(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; pCreateMemo ALIAS FOR $2; _itemlocSeries INTEGER; _p RECORD; _returnval INTEGER; _tmp INTEGER; _pricevar NUMERIC := 0.00; _invhistid INTEGER; _journalNumber INTEGER := fetchJournalNumber('GL-MISC'); BEGIN _itemlocSeries := 0; FOR _p IN SELECT pohead_number, pohead_curr_id, poreject_id, poitem_prj_id, poreject_poitem_id, poitem_id, poitem_expcat_id, poitem_linenumber, currToBase(COALESCE(recv_purchcost_curr_id, pohead_curr_id), COALESCE(recv_purchcost, poitem_unitprice), pohead_orderdate) AS poitem_unitprice_base, COALESCE(itemsite_id, -1) AS itemsiteid, poitem_invvenduomratio, SUM(poreject_qty) AS totalqty, itemsite_item_id, itemsite_costmethod, itemsite_controlmethod, recv_date FROM pohead JOIN poitem ON (poitem_pohead_id=pohead_id) JOIN poreject ON (poreject_poitem_id=poitem_id AND NOT poreject_posted) LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) LEFT OUTER JOIN recv ON (recv_id=poreject_recv_id) WHERE (pohead_id=pPoheadid) GROUP BY poreject_id, pohead_number, poreject_poitem_id, poitem_id, poitem_prj_id, poitem_expcat_id, poitem_linenumber, poitem_unitprice, pohead_curr_id, pohead_orderdate, itemsite_id, poitem_invvenduomratio, itemsite_item_id, itemsite_costmethod, itemsite_controlmethod, recv_date, recv_purchcost_curr_id, recv_purchcost LOOP IF (_p.itemsiteid = -1) THEN SELECT insertGLTransaction( 'S/R', 'PO', _p.pohead_number, 'Return Non-Inventory to P/O', expcat_liability_accnt_id, getPrjAccntId(_p.poitem_prj_id, expcat_exp_accnt_id), -1, round(_p.poitem_unitprice_base * _p.totalqty * -1, 2), CURRENT_DATE ) INTO _returnval FROM expcat WHERE (expcat_id=_p.poitem_expcat_id); UPDATE poreject SET poreject_posted=TRUE, poreject_value= round(_p.poitem_unitprice_base * _p.totalqty, 2) WHERE (poreject_id=_p.poreject_id); ELSEIF (_p.itemsite_controlmethod='N') THEN SELECT insertGLTransaction('S/R', 'PO', _p.pohead_number, 'Return Non-Controlled Inventory from PO', costcat_liability_accnt_id, getPrjAccntId(_p.poitem_prj_id, costcat_exp_accnt_id), -1, round((_p.poitem_unitprice_base * _p.totalqty * -1), 2), CURRENT_DATE ) INTO _returnval FROM itemsite, costcat WHERE((itemsite_costcat_id=costcat_id) AND (itemsite_id=_p.itemsiteid)); IF (_returnval = -3) THEN -- zero value transaction _returnval := 0; END IF; UPDATE poreject SET poreject_posted=TRUE, poreject_value= round(_p.poitem_unitprice_base * _p.totalqty, 2) WHERE (poreject_id=_p.poreject_id); ELSE IF (_itemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( itemsite_id, 'RP', (_p.totalqty * _p.poitem_invvenduomratio * -1), 'S/R', 'PO', (_p.pohead_number || '-' || _p.poitem_linenumber::TEXT), '', 'Return Inventory to P/O', costcat_asset_accnt_id, costcat_liability_accnt_id, _itemlocSeries, CURRENT_TIMESTAMP) INTO _returnval FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_p.itemsiteid) ); UPDATE poreject SET poreject_posted=TRUE, poreject_value=(invhist_unitcost *_p.totalqty * _p.poitem_invvenduomratio) FROM invhist WHERE ((poreject_id=_p.poreject_id) AND (invhist_id=_returnval)); END IF; IF (_returnval < 0) THEN RETURN _returnval; END IF; UPDATE poitem SET poitem_qty_returned=(poitem_qty_returned + _p.totalqty), poitem_status='O' WHERE (poitem_id=_p.poitem_id); IF (fetchMetricBool('RecordPPVonReceipt')) THEN -- If the 'Purchase Price Variance on Receipt' option is true _invhistid := _returnval; -- Find the difference in the purchase price value expected from the P/O and the value of the transaction SELECT ((_p.poitem_unitprice_base * poitem_qty_returned) - (invhist_value_before - invhist_value_after)) INTO _pricevar FROM invhist, poitem WHERE ((invhist_id = _invhistid) AND (poitem_id=_p.poitem_id)); -- If difference exists then IF (_pricevar <> 0.00) THEN -- Record an additional GL Transaction for the purchase price variance SELECT insertGLTransaction( _journalNumber, 'S/R', 'PO', _p.pohead_number, 'Purchase price variance adjusted for P/O ' || _p.pohead_number || ' for item ' || _p.poitem_linenumber::TEXT, costcat_liability_accnt_id, getPrjAccntId(_p.poitem_prj_id, costcat_purchprice_accnt_id), -1, _pricevar, CURRENT_DATE, false ) INTO _tmp FROM itemsite, costcat, poitem WHERE ((itemsite_costcat_id=costcat_id) AND (itemsite_id=poitem_itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not insert G/L transaction: no cost category found for itemsite_id %', _p.itemsiteid; ELSIF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; END IF; END IF; IF (pCreateMemo) THEN SELECT postPoReturnCreditMemo(_p.poreject_id) INTO _returnval; END IF; IF (_returnval < 0) THEN RETURN _returnval; END IF; END LOOP; RETURN _itemlocSeries; END; $_$; 6DROP FUNCTION public.postporeturns(integer, boolean); publicadminfalse83992125516831682postproduction(integer, numeric, boolean, boolean)FUNCTIONCREATE FUNCTION postproduction(integer, numeric, boolean, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN) is deprecated. please use postProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER, TIMESTAMP WITH TIME ZONE) instead'; RETURN postProduction($1, $2, $3, 0, now()); END; $_$; IDROP FUNCTION public.postproduction(integer, numeric, boolean, boolean); publicadminfalse83992.12551683169;postproduction(integer, numeric, boolean, boolean, integer)FUNCTIONCREATE FUNCTION postproduction(integer, numeric, boolean, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN, INTEGER) is deprecated. please use postProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER, TIMESTAMP WITH TIME ZONE) instead'; RETURN postProduction($1, $2, $3, $5, now()); END; $_$; RDROP FUNCTION public.postproduction(integer, numeric, boolean, boolean, integer); publicadminfalse8399212551683170Gpostproduction(integer, numeric, boolean, boolean, integer, text, text)FUNCTIONCREATE FUNCTION postproduction(integer, numeric, boolean, boolean, integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'postProduction(INTEGER, NUMERIC, BOOLEAN, BOOLEAN, INTEGER, TEXT, TEXT) is deprecated. please use postProduction(INTEGER, NUMERIC, BOOLEAN, INTEGER, TIMESTAMP WITH TIME ZONE) instead'; RETURN postProduction($1, $2, $3, $5, now()); END; $_$; ^DROP FUNCTION public.postproduction(integer, numeric, boolean, boolean, integer, text, text); publicadminfalse8399212551683171Lpostproduction(integer, numeric, boolean, integer, timestamp with time zone)FUNCTIONCREATE FUNCTION postproduction(integer, numeric, boolean, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pQty ALIAS FOR $2; pBackflush ALIAS FOR $3; pItemlocSeries ALIAS FOR $4; pGlDistTS ALIAS FOR $5; _test INTEGER; _invhistid INTEGER; _itemlocSeries INTEGER; _parentQty NUMERIC; _r RECORD; _sense TEXT; _wipPost NUMERIC; _woNumber TEXT; _ucost NUMERIC; BEGIN IF (pQty = 0) THEN RETURN 0; ELSIF (pQty > 0) THEN _sense = 'from'; ELSE _sense = 'to'; END IF; IF ( ( SELECT wo_status FROM wo WHERE (wo_id=pWoid) ) NOT IN ('R','E','I') ) THEN RETURN -1; END IF; -- Make sure that all Component Item Sites exist SELECT bomitem_id INTO _test FROM wo, bomitem, itemsite WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=bomitem_parent_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (wo_id=pWoid) AND (bomitem_rev_id=wo_bom_rev_id) AND (bomitem_item_id NOT IN ( SELECT component.itemsite_item_id FROM itemsite AS component, itemsite AS parent WHERE ( (wo_itemsite_id=parent.itemsite_id) AND (parent.itemsite_item_id=bomitem_parent_item_id) AND (bomitem_item_id=component.itemsite_item_id) AND (woEffectiveDate(wo_startdate) BETWEEN bomitem_effective AND (bomitem_expires - 1)) AND (bomitem_rev_id=wo_bom_rev_id) AND (component.itemsite_active) AND (component.itemsite_warehous_id=parent.itemsite_warehous_id) ) ) ) ) LIMIT 1; IF (FOUND AND pBackflush) THEN RETURN -2; END IF; SELECT formatWoNumber(pWoid) INTO _woNumber; SELECT roundQty(item_fractional, pQty) INTO _parentQty FROM wo, itemsite, item WHERE ((wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (wo_id=pWoid)); -- Create the material receipt transaction IF (pItemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; ELSE _itemlocSeries = pItemlocSeries; END IF; IF (pBackflush) THEN FOR _r IN SELECT womatl_id, womatl_qtyiss + (CASE WHEN (womatl_qtywipscrap > ((womatl_qtyfxd + (_parentQty + wo_qtyrcv) * womatl_qtyper) * womatl_scrap)) THEN (womatl_qtyfxd + (_parentQty + wo_qtyrcv) * womatl_qtyper) * womatl_scrap ELSE womatl_qtywipscrap END) AS consumed, (womatl_qtyfxd + ((_parentQty + wo_qtyrcv) * womatl_qtyper)) * (1 + womatl_scrap) AS expected FROM womatl, wo, itemsite, item WHERE ((womatl_issuemethod IN ('L', 'M')) AND (womatl_wo_id=pWoid) AND (womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id)) LOOP -- Don't issue more than should have already been consumed at this point IF (pQty > 0) THEN IF (noNeg(_r.expected - _r.consumed) > 0) THEN SELECT issueWoMaterial(_r.womatl_id, noNeg(_r.expected - _r.consumed), _itemlocSeries, pGlDistTS) INTO _itemlocSeries; END IF; ELSE -- Used by postMiscProduction of disassembly SELECT returnWoMaterial(_r.womatl_id, (_r.expected * -1.0), _itemlocSeries, CURRENT_TIMESTAMP, true) INTO _itemlocSeries; END IF; UPDATE womatl SET womatl_issuemethod='L' WHERE ( (womatl_issuemethod='M') AND (womatl_id=_r.womatl_id) ); END LOOP; END IF; SELECT CASE WHEN (pQty < 0 AND itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * pQty WHEN (pQty < 0) THEN avgcost(itemsite_id) * pQty WHEN (wo_cosmethod = 'D') THEN wo_wipvalue ELSE round((wo_wipvalue - (wo_postedvalue / wo_qtyord * (wo_qtyord - CASE WHEN (wo_qtyord < wo_qtyrcv + pQty) THEN wo_qtyord ELSE wo_qtyrcv + pQty END ))),2) END INTO _wipPost FROM wo JOIN itemsite ON (wo_itemsite_id=itemsite_id) WHERE (wo_id=pWoid); SELECT postInvTrans( itemsite_id, 'RM', _parentQty, 'W/O', 'WO', _woNumber, '', ('Receive Inventory ' || item_number || ' ' || _sense || ' Manufacturing'), costcat_asset_accnt_id, getPrjAccntId(wo_prj_id, costcat_wip_accnt_id), _itemlocSeries, pGlDistTS, -- the following is only actually used when the item is average or job costed _wipPost ) INTO _invhistid FROM wo, itemsite, item, costcat WHERE ( (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (wo_id=pWoid) ); IF (pQty < 0 ) THEN _wipPost := _wipPost * -1; END IF; -- Increase this W/O's received qty decrease its WIP value UPDATE wo SET wo_qtyrcv = (wo_qtyrcv + _parentQty), wo_wipvalue = (wo_wipvalue - (CASE WHEN (itemsite_costmethod IN ('A','J')) THEN _wipPost WHEN (itemsite_costmethod='S') THEN (stdcost(itemsite_item_id) * _parentQty) ELSE 0.0 END)) FROM itemsite, item WHERE ((wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (wo_id=pWoid)); -- ROB Increase this W/O's WIP value for custom costing SELECT SUM(itemcost_stdcost * _parentQty) INTO _ucost FROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id) JOIN itemcost ON (itemcost_item_id=itemsite_item_id) JOIN costelem ON ((costelem_id=itemcost_costelem_id) AND (costelem_exp_accnt_id IS NOT NULL) AND (NOT costelem_sys)) WHERE (wo_id=pWoid); UPDATE wo SET wo_wipvalue = (wo_wipvalue + coalesce(_ucost,0)) WHERE (wo_id=pWoid); -- ROB Distribute to G/L - create Cost Variance, debit WIP PERFORM insertGLTransaction( 'W/O', 'WO', _woNumber, ('Post Other Cost ' || item_number || ' ' || _sense || ' Manufacturing'), getPrjAccntId(wo_prj_id, costelem_exp_accnt_id), getPrjAccntId(wo_prj_id,costcat_wip_accnt_id), _invhistid, (itemcost_stdcost * _parentQty), pGlDistTS::DATE ) FROM wo, costelem, itemcost, costcat, itemsite, item WHERE ((wo_id=pWoid) AND (wo_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (costelem_id = itemcost_costelem_id) AND (itemcost_item_id = itemsite_item_id) AND (itemsite_costcat_id = costcat_id) AND (costelem_exp_accnt_id) IS NOT NULL AND (costelem_sys = false)); --End -- Make sure the W/O is at issue status UPDATE wo SET wo_status='I' WHERE (wo_id=pWoid); RETURN _itemlocSeries; END; $_$; cDROP FUNCTION public.postproduction(integer, numeric, boolean, integer, timestamp with time zone); publicadminfalse8399212551683173postreceipt(integer, integer)FUNCTIONcCREATE FUNCTION postreceipt(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2011 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE precvid ALIAS FOR $1; _itemlocSeries INTEGER := COALESCE($2, 0); _freightAccnt INTEGER; _glDate TIMESTAMP WITH TIME ZONE; _o RECORD; _ordertypeabbr TEXT; _r RECORD; _ra RECORD; _recvinvqty NUMERIC := 0.00; _recvvalue NUMERIC := 0.00; _pricevar NUMERIC := 0.00; _tmp INTEGER; _toitemitemid INTEGER; _coheadid INTEGER; _coitemid INTEGER; _linenumber INTEGER; _invhistid INTEGER; _shipheadid INTEGER; _ship BOOLEAN; _i RECORD; BEGIN SELECT recv_id, recv_order_type, recv_orderitem_id, recv_qty, round(currToBase(recv_freight_curr_id, recv_freight, recv_date::DATE), 2) AS recv_freight_base, recv_freight, recv_freight_curr_id, recv_date, recv_gldistdate, itemsite_id, itemsite_item_id, item_inv_uom_id, itemsite_costmethod, itemsite_controlmethod, vend_name, item_number, item_fractional INTO _r FROM recv LEFT OUTER JOIN itemsite ON (recv_itemsite_id=itemsite_id) LEFT OUTER JOIN item ON (itemsite_item_id=item_id) LEFT OUTER JOIN vendinfo ON (recv_vend_id=vend_id) WHERE ((recv_id=precvid) AND (NOT recv_posted)); IF (NOT FOUND) THEN IF (_itemlocSeries = 0) THEN RETURN -10; END IF; RETURN _itemlocSeries; ELSEIF (_r.recv_qty <= 0) THEN RETURN -11; ELSIF (_r.recv_order_type ='PO') THEN _ordertypeabbr := ('P/O for ' || _r.vend_name || ' for item ' || _r.item_number); SELECT pohead_number AS orderhead_number, poitem_id AS orderitem_id, poitem_linenumber AS orderitem_linenumber, currToBase(pohead_curr_id, COALESCE(recv_purchcost, poitem_unitprice), recv_date::DATE) AS item_unitprice_base, poitem_invvenduomratio AS invvenduomratio, pohead_orderdate AS orderdate, pohead_dropship, poitem_prj_id AS prj_id INTO _o FROM recv, pohead, poitem WHERE ((recv_orderitem_id=poitem_id) AND (poitem_pohead_id=pohead_id) AND (NOT recv_posted) AND (recv_id=precvid)); ELSIF (_r.recv_order_type ='RA') THEN _ordertypeabbr := 'R/A for item ' || _r.item_number; SELECT rahead_id AS orderhead_id, rahead_number AS orderhead_number, raitem_id AS orderitem_id, raitem_linenumber AS orderitem_linenumber, currToBase(rahead_curr_id, raitem_unitprice, recv_date::DATE) AS item_unitprice_base, raitem_qty_invuomratio AS invvenduomratio, rahead_authdate AS orderdate, raitem_unitcost AS unitcost, rahead_prj_id AS prj_id INTO _o FROM recv, rahead, raitem WHERE ((recv_orderitem_id=raitem_id) AND (raitem_rahead_id=rahead_id) AND (NOT recv_posted) AND (recv_id=precvid)); ELSIF (_r.recv_order_type ='TO') THEN _ordertypeabbr := 'T/O for item ' || _r.item_number; SELECT tohead_number AS orderhead_number, toitem_id AS orderitem_id, toitem_linenumber AS orderitem_linenumber, toitem_stdcost AS item_unitprice_base, 1.0 AS invvenduomratio, tohead_orderdate AS orderdate, NULL AS prj_id INTO _o FROM recv, tohead, toitem WHERE ((recv_orderitem_id=toitem_id) AND (toitem_tohead_id=tohead_id) AND (NOT recv_posted) AND (recv_id=precvid)); ELSE RETURN -13; -- don't know how to handle this order type END IF; IF (NOT FOUND) THEN IF (_itemlocSeries = 0) THEN RETURN -10; END IF; RETURN _itemlocSeries; END IF; IF (_itemlocSeries = 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); ELSEIF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; _glDate := COALESCE(_r.recv_gldistdate, _r.recv_date); _recvinvqty := roundQty(_r.item_fractional, (_r.recv_qty * _o.invvenduomratio)); IF ( (_r.recv_order_type = 'PO') AND (_r.itemsite_id = -1 OR _r.itemsite_id IS NULL OR _r.itemsite_controlmethod = 'N') ) THEN IF (_r.itemsite_id IS NOT NULL) THEN SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Controlled Inventory from ' || _ordertypeabbr, costcat_liability_accnt_id, getPrjAccntId(_o.prj_id, costcat_exp_accnt_id), -1, round((_o.item_unitprice_base * _r.recv_qty),2), _glDate::DATE, false ) INTO _tmp FROM poitem, itemsite, costcat WHERE((poitem_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (poitem_id=_o.orderitem_id)); ELSE SELECT insertGLTransaction(fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory from ' || 'P/O for ' || _r.vend_name || ' for ' || expcat_code, expcat_liability_accnt_id, getPrjAccntId(_o.prj_id, expcat_exp_accnt_id), -1, round((_o.item_unitprice_base * _r.recv_qty),2), _glDate::DATE, false ) INTO _tmp FROM poitem, expcat WHERE((poitem_expcat_id=expcat_id) AND (poitem_id=_o.orderitem_id)); END IF; IF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Non-Inventory Freight from ' || _ordertypeabbr, expcat_liability_accnt_id, getPrjAccntId(_o.prj_id, expcat_freight_accnt_id), -1, _r.recv_freight_base, _glDate::DATE, false ), expcat_freight_accnt_id INTO _tmp, _freightAccnt FROM poitem, expcat WHERE((poitem_expcat_id=expcat_id) AND (poitem_id=_o.orderitem_id)); IF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; _recvvalue := ROUND((_o.item_unitprice_base * _r.recv_qty),2); UPDATE poitem SET poitem_qty_received = (poitem_qty_received + _r.recv_qty), poitem_freight_received = (poitem_freight_received + _r.recv_freight_base) WHERE (poitem_id=_o.orderitem_id); ELSEIF ( (_r.recv_order_type = 'RA') AND (_r.itemsite_id = -1 OR _r.itemsite_id IS NULL OR _r.itemsite_controlmethod = 'N') ) THEN RAISE NOTICE 'itemsite controlmethod is %, cannot post receipt.', _r.itemsite_controlmethod; RETURN -14; -- otherwise how do we get the accounts? ELSEIF ( (_r.recv_order_type = 'TO') AND (_r.itemsite_id = -1 OR _r.itemsite_id IS NULL) ) THEN RAISE NOTICE 'itemsite missing'; RETURN -14; -- otherwise how do we get the accounts? ELSE -- not ELSIF: some code is shared between diff order types IF (_r.recv_order_type = 'PO') THEN SELECT postInvTrans( itemsite_id, 'RP'::TEXT, _recvinvqty, 'S/R'::TEXT, _r.recv_order_type::TEXT, _o.orderhead_number::TEXT || '-' || _o.orderitem_linenumber::TEXT, ''::TEXT, 'Receive Inventory from ' || _ordertypeabbr, costcat_asset_accnt_id, costcat_liability_accnt_id, _itemlocSeries, _glDate, round((_o.item_unitprice_base * _r.recv_qty),2) -- always passing this in since it is ignored if it is not average costed item ) INTO _tmp FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not post inventory transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < -1) THEN -- less than -1 because -1 means it is a none controlled item IF(_tmp = -3) THEN RETURN -12; -- The GL trans value was 0 which means we likely do not have a std cost END IF; RETURN _tmp; END IF; -- If the 'Purchase Price Variance on Receipt' option is true IF (fetchMetricBool('RecordPPVonReceipt')) THEN _invhistid := _tmp; -- Find the difference in the purchase price value expected from the P/O and the value of the transaction SELECT ((_o.item_unitprice_base * _r.recv_qty) - (invhist_value_after - invhist_value_before)) INTO _pricevar FROM invhist WHERE (invhist_id = _invhistid); -- If difference exists then IF (_pricevar <> 0.00) THEN -- Record an additional GL Transaction for the purchase price variance SELECT insertGLTransaction( fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Purchase price variance adjusted for P/O ' || _o.orderhead_number || ' for item ' || _r.item_number, costcat_liability_accnt_id, getPrjAccntId(_o.prj_id, costcat_purchprice_accnt_id), -1, _pricevar, _glDate::DATE, false ) INTO _tmp FROM itemsite, costcat WHERE ((itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not insert G/L transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; END IF; END IF; SELECT insertGLTransaction(fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Inventory Freight from ' || _o.orderhead_number || ' for item ' || _r.item_number, costcat_liability_accnt_id, getPrjAccntId(_o.prj_id, costcat_freight_accnt_id), -1, _r.recv_freight_base, _glDate::DATE, false ), costcat_freight_accnt_id INTO _tmp, _freightAccnt FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not insert G/L transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; UPDATE poitem SET poitem_qty_received = (poitem_qty_received + _r.recv_qty), poitem_freight_received = (poitem_freight_received + _r.recv_freight_base) WHERE (poitem_id=_o.orderitem_id); ELSIF (_r.recv_order_type = 'RA') THEN SELECT rahead.*, raitem.* INTO _ra FROM rahead, raitem WHERE ((rahead_id=raitem_rahead_id) AND (raitem_id=_r.recv_orderitem_id)); SELECT postInvTrans(_r.itemsite_id, 'RR', _recvinvqty, 'S/R', _r.recv_order_type, _ra.rahead_number::TEXT || '-' || _ra.raitem_linenumber::TEXT, '', 'Receive Inventory from ' || _ordertypeabbr, costcat_asset_accnt_id, CASE WHEN(COALESCE(_ra.raitem_cos_accnt_id, -1) != -1) THEN getPrjAccntId(_o.prj_id, _ra.raitem_cos_accnt_id) WHEN (_ra.raitem_warranty) THEN getPrjAccntId(_o.prj_id, resolveCOWAccount(_r.itemsite_id, _ra.rahead_cust_id, _ra.rahead_saletype_id, _ra.rahead_shipzone_id)) ELSE getPrjAccntId(_o.prj_id, resolveCORAccount(_r.itemsite_id, _ra.rahead_cust_id, _ra.rahead_saletype_id, _ra.rahead_shipzone_id)) END, _itemlocSeries, _glDate, COALESCE(_o.unitcost,stdcost(itemsite_item_id)) * _recvinvqty) INTO _tmp FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Could not post inventory transaction: no cost category found for itemsite_id %', _r.itemsite_id; ELSIF (_tmp < -1) THEN -- less than -1 because -1 means it is a none controlled item IF(_tmp = -3) THEN RAISE NOTICE 'The GL trans value was 0 which means we likely do not have a std cost'; RETURN -12; -- The GL trans value was 0 which means we likely do not have a std cost END IF; RETURN _tmp; END IF; INSERT INTO rahist (rahist_itemsite_id, rahist_date, rahist_descrip, rahist_qty, rahist_uom_id, rahist_source, rahist_source_id, rahist_rahead_id ) VALUES (_r.itemsite_id, _glDate, 'Receive Inventory from ' || _ordertypeabbr, _recvinvqty, _r.item_inv_uom_id, 'RR', _r.recv_id, _ra.rahead_id ); SELECT insertGLTransaction(fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Inventory Freight from ' || _o.orderhead_number || ' for item ' || _r.item_number, costcat_liability_accnt_id, getPrjAccntId(_o.prj_id, costcat_freight_accnt_id), -1, _r.recv_freight_base, _glDate::DATE, false ), costcat_freight_accnt_id INTO _tmp, _freightAccnt FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; INSERT INTO rahist (rahist_date, rahist_descrip, rahist_source, rahist_source_id, rahist_curr_id, rahist_amount, rahist_rahead_id ) VALUES (_glDate, 'Receive Inventory Freight from ' || _ordertypeabbr, 'RR', _r.recv_id, _r.recv_freight_curr_id, _r.recv_freight, _ra.rahead_id ); UPDATE raitem SET raitem_qtyreceived = (raitem_qtyreceived + _r.recv_qty) WHERE (raitem_id=_o.orderitem_id); -- Expire date doesn't mean anything once the RA is received -- WARNING: INSERTING 'NULL' MIGHT CAUSE PROBLEMS!! UPDATE rahead SET rahead_expiredate = NULL WHERE (rahead_id=_o.orderhead_id); -- Look for 'ship' lines SELECT (count(*) > 0) INTO _ship FROM raitem WHERE ((raitem_disposition = 'S') AND (raitem_new_coitem_id IS NULL) AND (raitem_rahead_id=_ra.rahead_id)); -- If receiving a qty on a shippable and upon receipt item, create coitem IF ((_ra.rahead_timing='R') AND (_ship OR ( (_ra.raitem_disposition IN ('P','V')) AND (_ra.raitem_new_coitem_id IS NULL) AND (_ra.raitem_qtyauthorized > 0)))) THEN IF (_ra.rahead_new_cohead_id IS NOT NULL) THEN _coheadid = _ra.rahead_new_cohead_id; ELSE -- No header, so create a Sales Order header first. SELECT nextval('cohead_cohead_id_seq') INTO _coheadid; INSERT INTO cohead ( cohead_id,cohead_number,cohead_cust_id,cohead_custponumber, cohead_orderdate,cohead_salesrep_id,cohead_terms_id, cohead_shipvia,cohead_shipto_id,cohead_shiptoname, cohead_shiptoaddress1,cohead_shiptoaddress2,cohead_shiptoaddress3, cohead_shiptocity,cohead_shiptostate,cohead_shiptozipcode, cohead_shiptocountry,cohead_freight,cohead_shiptophone, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_shipchrg_id, cohead_shipform_id,cohead_billtoname, cohead_billtoaddress1,cohead_billtoaddress2,cohead_billtoaddress3, cohead_billtocity,cohead_billtostate,cohead_billtozipcode, cohead_billtocountry,cohead_misc_accnt_id,cohead_misc_descrip, cohead_commission,cohead_holdtype,cohead_prj_id,cohead_shipcomplete, cohead_curr_id,cohead_taxzone_id,cohead_saletype_id,cohead_shipzone_id) SELECT _coheadid,fetchsonumber(),rahead_cust_id,rahead_custponumber, current_date,rahead_salesrep_id,COALESCE(cohead_terms_id,cust_terms_id), COALESCE(cohead_shipvia,cust_shipvia),rahead_shipto_id,rahead_shipto_name, rahead_shipto_address1,rahead_shipto_address2,rahead_shipto_address3, rahead_shipto_city,rahead_shipto_state,rahead_shipto_zipcode, rahead_shipto_country,0,COALESCE(cohead_shiptophone,''), cntct_id, cntct_honorific, cntct_first_name, cntct_middle, cntct_last_name, cntct_suffix, cntct_phone, cntct_title, cntct_fax, cntct_email, COALESCE(cohead_shipchrg_id,cust_shipchrg_id), COALESCE(cohead_shipform_id,cust_shipform_id), rahead_billtoname,rahead_billtoaddress1,rahead_billtoaddress2,rahead_billtoaddress3, rahead_billtocity,rahead_billtostate,rahead_billtozip, rahead_billtocountry,NULL,'',rahead_commission, 'N', rahead_prj_id, COALESCE(cohead_shipcomplete, CASE WHEN cust_partialship THEN false ELSE true END),rahead_curr_id,rahead_taxzone_id,rahead_saletype_id,rahead_shipzone_id FROM rahead JOIN custinfo ON (rahead_cust_id=cust_id) LEFT OUTER JOIN cohead ON (rahead_orig_cohead_id=cohead_id) LEFT OUTER JOIN shiptoinfo ON (rahead_shipto_id=shipto_id) LEFT OUTER JOIN cntct ON (shipto_cntct_id=cntct_id) WHERE (rahead_id=_ra.rahead_id); UPDATE rahead SET rahead_new_cohead_id=_coheadid WHERE rahead_id=_ra.rahead_id; END IF; -- Now enter the line item(s) IF (_ra.raitem_disposition IN ('P','V')) AND (_ra.raitem_new_coitem_id IS NULL) AND (_ra.raitem_qtyauthorized > 0) THEN SELECT nextval('coitem_coitem_id_seq') INTO _coitemid; SELECT COALESCE(MAX(coitem_linenumber),0)+1 INTO _linenumber FROM coitem WHERE (coitem_cohead_id=_coheadid); INSERT INTO coitem ( coitem_id,coitem_cohead_id,coitem_linenumber,coitem_itemsite_id, coitem_status,coitem_scheddate,coitem_promdate, coitem_qtyord, coitem_unitcost,coitem_price,coitem_custprice,coitem_qtyshipped, coitem_order_id,coitem_memo,coitem_qtyreturned, coitem_taxtype_id,coitem_qty_uom_id,coitem_qty_invuomratio, coitem_price_uom_id,coitem_price_invuomratio,coitem_warranty, coitem_cos_accnt_id,coitem_order_type, coitem_custpn) SELECT _coitemid,_coheadid,_linenumber,_ra.raitem_coitem_itemsite_id, 'O',_ra.raitem_scheddate,_ra.raitem_scheddate,_ra.raitem_qtyauthorized, stdcost(itemsite_item_id),COALESCE(_ra.raitem_saleprice,0),0,0, -1,_ra.raitem_notes,0, _ra.raitem_taxtype_id,_ra.raitem_qty_uom_id,_ra.raitem_qty_invuomratio, _ra.raitem_price_uom_id,_ra.raitem_price_invuomratio,_ra.raitem_warranty, _ra.raitem_cos_accnt_id, CASE WHEN itemsite_createwo THEN 'W' ELSE NULL END, _ra.raitem_custpn FROM itemsite WHERE (itemsite_id=_ra.raitem_coitem_itemsite_id); UPDATE raitem SET raitem_new_coitem_id=_coitemid WHERE (raitem_id=_ra.raitem_id); END IF; -- Create items to ship that have no direct relation to receipts. IF (_ship) THEN FOR _i IN SELECT raitem_id FROM raitem WHERE ((raitem_rahead_id=_ra.rahead_id) AND (raitem_disposition = 'S') AND (raitem_new_coitem_id IS NULL)) LOOP SELECT nextval('coitem_coitem_id_seq') INTO _coitemid; SELECT COALESCE(MAX(coitem_linenumber),0)+1 INTO _linenumber FROM coitem WHERE (coitem_cohead_id=_coheadid); INSERT INTO coitem ( coitem_id,coitem_cohead_id,coitem_linenumber,coitem_itemsite_id, coitem_status,coitem_scheddate,coitem_promdate, coitem_qtyord, coitem_unitcost,coitem_price,coitem_custprice,coitem_qtyshipped, coitem_order_id,coitem_memo,coitem_qtyreturned, coitem_taxtype_id,coitem_qty_uom_id,coitem_qty_invuomratio, coitem_price_uom_id,coitem_price_invuomratio,coitem_warranty, coitem_cos_accnt_id,coitem_order_type,coitem_custpn) SELECT _coitemid,_coheadid,_linenumber,raitem_coitem_itemsite_id, 'O',raitem_scheddate,raitem_scheddate,raitem_qtyauthorized, stdcost(itemsite_item_id),COALESCE(raitem_saleprice,0),0,0, -1,raitem_notes,0, raitem_taxtype_id,raitem_qty_uom_id,raitem_qty_invuomratio, raitem_price_uom_id,raitem_price_invuomratio,raitem_warranty, raitem_cos_accnt_id, CASE WHEN itemsite_createwo THEN 'W' ELSE NULL END,raitem_custpn FROM raitem JOIN itemsite ON (itemsite_id=raitem_itemsite_id) WHERE (raitem_id=_i.raitem_id); UPDATE raitem SET raitem_new_coitem_id=_coitemid WHERE (raitem_id=_i.raitem_id); END LOOP; END IF; END IF; ELSIF (_r.recv_order_type = 'TO' AND fetchMetricBool('MultiWhs')) THEN SELECT interWarehouseTransfer(toitem_item_id, tohead_trns_warehous_id, tohead_dest_warehous_id, _r.recv_qty, 'TO', formatToNumber(toitem_id), 'Receive from Transit To Dest Warehouse', _itemlocSeries, _glDate ) INTO _tmp FROM tohead, toitem WHERE ((tohead_id=toitem_tohead_id) AND (toitem_id=_r.recv_orderitem_id)); IF (_tmp < 0) THEN RETURN _tmp; END IF; SELECT insertGLTransaction(fetchJournalNumber('GL-MISC'), 'S/R', _r.recv_order_type, _o.orderhead_number, 'Receive Inventory Freight from ' || _o.orderhead_number || ' for item ' || _r.item_number, costcat_toliability_accnt_id, costcat_freight_accnt_id, -1, _r.recv_freight_base, _glDate::DATE, false ), costcat_freight_accnt_id INTO _tmp, _freightAccnt FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); IF (_tmp < 0 AND _tmp != -3) THEN -- error but not 0-value transaction RETURN _tmp; ELSE -- Posting to trial balance is deferred to prevent locking INSERT INTO itemlocpost ( itemlocpost_glseq, itemlocpost_itemlocseries) VALUES ( _tmp, _itemlocSeries ); END IF; UPDATE toitem SET toitem_qty_received = (toitem_qty_received + _r.recv_qty), toitem_freight_received = (toitem_freight_received + currToCurr(_r.recv_freight_curr_id, toitem_freight_curr_id, _r.recv_freight, _glDate::DATE)) WHERE (toitem_id=_o.orderitem_id); END IF; IF(_r.itemsite_costmethod='A') THEN _recvvalue := ROUND((_o.item_unitprice_base * _r.recv_qty),2); ELSIF (fetchMetricBool('RecordPPVonReceipt')) THEN _recvvalue := ROUND((_o.item_unitprice_base * _r.recv_qty), 2); ELSE _recvvalue := ROUND(stdcost(_r.itemsite_item_id) * _recvinvqty, 2); END IF; END IF; UPDATE recv SET recv_value=_recvvalue, recv_recvcost=_recvvalue / recv_qty, recv_posted=TRUE, recv_gldistdate=_glDate::DATE WHERE (recv_id=precvid); IF (_r.recv_order_type = 'PO') THEN -- If this is a drop-shipped PO, then Issue the item to Shipping and Ship the item IF (_o.pohead_dropship = TRUE) THEN -- Generate the PoItemDropShipped event INSERT INTO evntlog ( evntlog_evnttime, evntlog_username, evntlog_evnttype_id, evntlog_ordtype, evntlog_ord_id, evntlog_warehous_id, evntlog_number ) SELECT CURRENT_TIMESTAMP, evntnot_username, evnttype_id, 'P', _o.orderitem_id, evntnot_warehous_id, (pohead_number || '-' || poitem_linenumber || ': ' || item_number) FROM evntnot JOIN evnttype ON (evntnot_evnttype_id = evnttype_id) JOIN itemsite ON (evntnot_warehous_id = itemsite_warehous_id) JOIN item ON (itemsite_item_id = item_id) JOIN poitem ON (poitem_itemsite_id = itemsite_id) JOIN pohead ON (poitem_pohead_id = pohead_id) WHERE( (poitem_id = _o.orderitem_id) AND (poitem_duedate <= (CURRENT_DATE + itemsite_eventfence)) AND (evnttype_name = 'PoItemDropShipped') ); END IF; END IF; RETURN _itemlocSeries; END; $_$; 4DROP FUNCTION public.postreceipt(integer, integer); publicadminfalse8399212551683175$postreceipts(text, integer, integer)FUNCTIONCREATE FUNCTION postreceipts(text, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderid ALIAS FOR $2; _itemlocSeries INTEGER := $3; _qtyToRecv NUMERIC; _r RECORD; BEGIN SELECT SUM(qtyToReceive(pordertype, recv_orderitem_id)) INTO _qtyToRecv FROM recv, orderitem WHERE ((recv_orderitem_id=orderitem_id) AND (recv_order_type=pordertype) AND (orderitem_orderhead_type=pordertype) AND (orderitem_orderhead_id=porderid)); IF (_qtyToRecv <= 0) THEN RETURN -11; END IF; IF (_itemlocSeries IS NULL OR _itemlocSeries <= 0) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; FOR _r IN SELECT postReceipt(recv_id, _itemlocSeries) AS postResult FROM recv, orderitem WHERE ((recv_orderitem_id=orderitem_id) AND (orderitem_orderhead_id=porderid) AND (orderitem_orderhead_type=pordertype) AND (NOT recv_posted) -- Check for multiple users receiving the same order AND (recv_trans_usr_name=getEffectiveXtUser()) AND (recv_order_type=pordertype)) LOOP IF (_r.postResult < 0 AND _r.postResult != -11) THEN RETURN _r.postResult; -- fail on 1st error but ignore lines with qty == 0 END IF; END LOOP; RETURN _itemlocSeries; END; $_$; ;DROP FUNCTION public.postreceipts(text, integer, integer); publicadminfalse8399212551683176postsogltransactions()FUNCTIONCREATE FUNCTION postsogltransactions() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN UPDATE gltrans SET gltrans_exported=TRUE WHERE ( (NOT gltrans_exported) AND (gltrans_source='A/R') AND (gltrans_doctype IN ('IN', 'CM')) ); RETURN TRUE; END; $$; -DROP FUNCTION public.postsogltransactions(); publicadminfalse83992125516831777postsoitemproduction(integer, timestamp with time zone)FUNCTIONACREATE FUNCTION postsoitemproduction(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemId ALIAS FOR $1; pGlDistTS ALIAS FOR $2; _qty NUMERIC; BEGIN -- Issuing all, so determine line balance SELECT noNeg( coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - ( SELECT COALESCE(SUM(shipitem_qty), 0) FROM shipitem, shiphead WHERE ((shipitem_orderitem_id=coitem_id) AND (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) ) ) ) INTO _qty FROM coitem WHERE (coitem_id=pSoitemId); RETURN postSoItemProduction($1, _qty, $2); END; $_$; NDROP FUNCTION public.postsoitemproduction(integer, timestamp with time zone); publicadminfalse8399212551683178@postsoitemproduction(integer, numeric, timestamp with time zone)FUNCTIONCREATE FUNCTION postsoitemproduction(integer, numeric, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemId ALIAS FOR $1; pQty ALIAS FOR $2; pGlDistTS ALIAS FOR $3; _itemlocSeries INTEGER := 0; BEGIN --If this cost method is not Job then we are using the wrong function IF (NOT EXISTS(SELECT itemsite_costmethod FROM coitem,itemsite WHERE ((coitem_id=pSoitemId) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_costmethod = 'J')))) THEN RAISE EXCEPTION 'The postSoLineBalanceProduction function may only be used with Job costed item sites'; END IF; IF (pQty > 0) THEN SELECT COALESCE(postProduction(wo_id, (pQty * coitem_qty_invuomratio), true, 0, pGlDistTS),-1) INTO _itemlocSeries FROM wo, coitem WHERE ((wo_ordid=pSoItemid) AND (wo_ordtype='S') AND (coitem_id=pSoItemid)); UPDATE wo SET wo_status = 'C' WHERE ((wo_ordid=pSoItemid) AND (wo_ordtype='S') AND (wo_qtyrcv >= wo_qtyord)); END IF; RETURN _itemlocSeries; END; $_$; WDROP FUNCTION public.postsoitemproduction(integer, numeric, timestamp with time zone); publicadminfalse83992Z12551683179"poststandardjournal(integer, date)FUNCTIONCREATE FUNCTION poststandardjournal(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; pDate ALIAS FOR $2; _returnValue INTEGER; BEGIN SELECT postStandardJournal(pStdjrnlid, pDate, FALSE, fetchGLSequence()) INTO _returnValue; RETURN _returnValue; END; $_$; 9DROP FUNCTION public.poststandardjournal(integer, date); publicadminfalse83992 12551683180+poststandardjournal(integer, date, integer)FUNCTIONCREATE FUNCTION poststandardjournal(integer, date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; pDate ALIAS FOR $2; pGlSequence ALIAS FOR $3; BEGIN RETURN postStandardJournal(pStdjrnlid, pDate, FALSE, pGLSequence); END; $_$; BDROP FUNCTION public.poststandardjournal(integer, date, integer); publicadminfalse83992 12551683181+poststandardjournal(integer, date, boolean)FUNCTIONCREATE FUNCTION poststandardjournal(integer, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; pDate ALIAS FOR $2; pReverse ALIAS FOR $3; _returnValue INTEGER; BEGIN RETURN postStandardJournal(pStdjrnlid, pDate, pReverse, fetchGLSequence()); END; $_$; BDROP FUNCTION public.poststandardjournal(integer, date, boolean); publicadminfalse83992 125516831824poststandardjournal(integer, date, boolean, integer)FUNCTIONCREATE FUNCTION poststandardjournal(integer, date, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlid ALIAS FOR $1; pDate ALIAS FOR $2; pReverse ALIAS FOR $3; pGlSequence ALIAS FOR $4; BEGIN INSERT INTO glseries ( glseries_sequence, glseries_source, glseries_doctype, glseries_docnumber, glseries_notes, glseries_accnt_id, glseries_amount, glseries_distdate ) SELECT pGlSequence, 'G/L', 'ST', stdjrnl_name, stdjrnlitem_notes, stdjrnlitem_accnt_id, CASE WHEN (pReverse=TRUE) THEN (stdjrnlitem_amount * -1) ELSE stdjrnlitem_amount END, pDate FROM stdjrnlitem, stdjrnl WHERE ( (stdjrnlitem_stdjrnl_id=stdjrnl_id) AND (stdjrnl_id=pStdjrnlid) ); RETURN pGlSequence; END; $_$; KDROP FUNCTION public.poststandardjournal(integer, date, boolean, integer); publicadminfalse8399212551683183'poststandardjournalgroup(integer, date)FUNCTIONtCREATE FUNCTION poststandardjournalgroup(integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlgrpid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN postStandardJournalGroup(pStdjrnlgrpid, pDate, FALSE); END; $_$; >DROP FUNCTION public.poststandardjournalgroup(integer, date); publicadminfalse83992125516831840poststandardjournalgroup(integer, date, boolean)FUNCTIONmCREATE FUNCTION poststandardjournalgroup(integer, date, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStdjrnlgrpid ALIAS FOR $1; pDate ALIAS FOR $2; pReverse ALIAS FOR $3; _r RECORD; _glSequence INTEGER := -1; BEGIN FOR _r IN SELECT stdjrnlgrpitem_id, stdjrnlgrpitem_stdjrnl_id FROM stdjrnlgrpitem WHERE ( (stdjrnlgrpitem_stdjrnlgrp_id=pStdjrnlgrpid) AND (CURRENT_DATE BETWEEN stdjrnlgrpitem_effective AND (stdjrnlgrpitem_expires - 1)) AND ( (stdjrnlgrpitem_toapply = -1) OR (stdjrnlgrpitem_toapply > stdjrnlgrpitem_applied) ) ) LOOP IF (_glSequence = -1) THEN SELECT fetchGLSequence() INTO _glSequence; END IF; PERFORM postStandardJournal(_r.stdjrnlgrpitem_stdjrnl_id, pDate, pReverse, _glSequence); UPDATE stdjrnlgrpitem SET stdjrnlgrpitem_applied=(stdjrnlgrpitem_applied + 1) WHERE (stdjrnlgrpitem_id=_r.stdjrnlgrpitem_id); END LOOP; RETURN _glSequence; END; $_$; GDROP FUNCTION public.poststandardjournalgroup(integer, date, boolean); publicadminfalse8399212551683185Jpostvalueintoinvbalance(integer, date, numeric, numeric, numeric, numeric)FUNCTION1 CREATE FUNCTION postvalueintoinvbalance(integer, date, numeric, numeric, numeric, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteId ALIAS FOR $1; pDate ALIAS FOR $2; pQoh ALIAS FOR $3; pNn ALIAS FOR $4; pOldCost ALIAS FOR $5; pNewCost ALIAS FOR $6; _invbalid INTEGER; _r RECORD; _count INTEGER; _valChange NUMERIC; _nnvalChange NUMERIC; BEGIN -- Grab the costhist record to post SELECT period_id INTO _r FROM period WHERE (pDate BETWEEN period_start AND period_end); GET DIAGNOSTICS _count = ROW_COUNT; -- Find an inventory balance to post into IF ( _count > 0 ) THEN -- Try to find an existing invbal SELECT invbal_id INTO _invbalid FROM invbal WHERE ( (invbal_period_id=_r.period_id) AND (invbal_itemsite_id=pItemsiteId) ); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count = 0) THEN -- Wasn't there, so forward update PERFORM forwardUpdateItemsite(pItemsiteId); -- Try to find an existing invbal again SELECT invbal_id INTO _invbalid FROM invbal WHERE ( (invbal_period_id=_r.period_id) AND (invbal_itemsite_id=pItemsiteId) ); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count = 0) THEN RAISE EXCEPTION 'An inventory balance record was not found for updating standard costs'; END IF; END IF; _valChange := round((pNewCost - pOldCost) * pQoh, 2); _nnvalChange := round((pNewCost - pOldCost) * pNn, 2); -- We found an invbal, update it with the change IF (_valChange > 0) THEN UPDATE invbal SET invbal_value_in = (invbal_value_in + _valChange) WHERE (invbal_id=_invbalid); ELSE UPDATE invbal SET invbal_value_out = (invbal_value_out - _valChange) WHERE (invbal_id=_invbalid); END IF; IF (_nnvalChange > 0) THEN UPDATE invbal SET invbal_nnval_in = (invbal_nnval_in + _nnvalChange) WHERE (invbal_id=_invbalid); ELSE UPDATE invbal SET invbal_nnval_out = (invbal_nnval_out - _nnvalChange) WHERE (invbal_id=_invbalid); END IF; UPDATE invbal SET invbal_value_ending = (invbal_value_beginning + invbal_value_in - invbal_value_out), invbal_nnval_ending = (invbal_nnval_beginning + invbal_nnval_in - invbal_nnval_out), invbal_dirty=true WHERE (invbal_id=_invbalid); ELSE RAISE EXCEPTION 'No period exists for date %.', pDate; END IF; RETURN TRUE; END; $_$; aDROP FUNCTION public.postvalueintoinvbalance(integer, date, numeric, numeric, numeric, numeric); publicadminfalse8399212551683186postvoucher(integer, boolean)FUNCTIONvCREATE FUNCTION postvoucher(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoheadid ALIAS FOR $1; pPostCosts ALIAS FOR $2; BEGIN RETURN postVoucher(pVoheadid, fetchJournalNumber('AP-VO'), pPostCosts); END; $_$; 4DROP FUNCTION public.postvoucher(integer, boolean); publicadminfalse83992]12551683187&postvoucher(integer, integer, boolean)FUNCTIONDCREATE FUNCTION postvoucher(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVoheadid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pPostCosts ALIAS FOR $3; _sequence INTEGER; _totalAmount_base NUMERIC; _totalAmount NUMERIC; _itemAmount_base NUMERIC; _itemAmount NUMERIC; _totalDiscountableAmount NUMERIC; _test INTEGER; _a RECORD; _d RECORD; _g RECORD; _p RECORD; _r RECORD; _costx RECORD; _pPostCosts BOOLEAN; _pExplain BOOLEAN; _pLowLevel BOOLEAN; _exchGainFreight NUMERIC; _taxBaseValue NUMERIC; _firstExchDateFreight DATE; _tmpTotal NUMERIC; _glDate DATE; BEGIN RAISE DEBUG 'postVoucher(%, %, %)', pVoheadid, pJournalNumber, pPostCosts; _pPostCosts := TRUE; _totalAmount_base := 0; _totalAmount := 0; _totalDiscountableAmount := 0; SELECT fetchGLSequence() INTO _sequence; -- Cache Voucher Infomation SELECT vohead.*, vend_number || '-' || vend_name || ' ' || vohead_reference AS glnotes, COALESCE(pohead_orderdate, vohead_docdate) AS pohead_orderdate, COALESCE(pohead_curr_id, vohead_curr_id) AS pohead_curr_id INTO _p FROM vendinfo, vohead LEFT OUTER JOIN pohead ON (vohead_pohead_id = pohead_id) WHERE ( (vohead_id=pVoheadid) AND (vend_id=vohead_vend_id) ) FOR UPDATE OF vohead; IF (_p.vohead_posted) THEN RAISE EXCEPTION 'Cannot post Voucher #% as it is already posted [xtuple: postVoucher, -10, %]', _p.vohead_number, _p.vohead_number; END IF; _glDate := COALESCE(_p.vohead_gldistdate, _p.vohead_distdate); -- If the vohead_distdate is NULL, assume that this is a NULL vohead and quietly delete it IF (_p.vohead_distdate IS NULL) THEN DELETE FROM vohead WHERE vohead_id = pVoheadid; RETURN 0; END IF; IF (_p.vohead_amount <= 0) THEN RAISE EXCEPTION 'Cannot Post Voucher #% for a negative or zero amount (%) [xtuple: postVoucher, -1, %, %]', _p.vohead_number, _p.vohead_amount, _p.vohead_number, _p.vohead_amount; END IF; -- there is no currency gain/loss on items, see issue 3892, -- but there might be on freight, which is first encountered at p/o receipt SELECT recv_date::DATE INTO _firstExchDateFreight FROM recv WHERE (recv_vohead_id = pVoheadid); SELECT round(SUM(amount),4) INTO _tmpTotal FROM ( SELECT SUM(vodist_amount) AS amount FROM vodist WHERE ( (vodist_vohead_id=pVoheadid) AND (vodist_tax_id=-1) ) UNION ALL SELECT SUM(voitem_freight) AS amount FROM voitem WHERE (voitem_vohead_id=pVoheadid) UNION ALL SELECT SUM(tax*-1) FROM (SELECT round(sum(taxdetail_tax),2) AS tax, currToBase(_p.vohead_curr_id, round(sum(taxdetail_tax),2), _p.vohead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('VO', pVoheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id ) AS taxdata ) AS data; IF (_tmpTotal IS NULL OR _tmpTotal <= 0) THEN RAISE EXCEPTION 'Cannot Post Voucher #% with negative or zero distributions (%) [xtuple: postVoucher, -2, %, %]', _p.vohead_number, _tmpTotal, _p.vohead_number, _tmpTotal; END IF; IF (_tmpTotal > _p.vohead_amount) THEN RAISE EXCEPTION 'Cannot Post Voucher #% with distributions greater than the voucher amount (% > %) [xtuple: postVoucher, -3, %, %, %]', _p.vohead_number, _tmpTotal, _p.vohead_amount, _p.vohead_number, _tmpTotal, _p.vohead_amount; END IF; IF (_tmpTotal < _p.vohead_amount) THEN RAISE EXCEPTION 'Cannot Post Voucher #% with distributions less than the voucher amount (% < %) [xtuple: postVoucher, -4, %, %, %]', _p.vohead_number, _tmpTotal, _p.vohead_amount, _p.vohead_number, _tmpTotal, _p.vohead_amount; END IF; SELECT DISTINCT poitem_linenumber INTO _test FROM vodist, voitem, poitem WHERE ( (vodist_poitem_id=poitem_id) AND (voitem_poitem_id=poitem_id) AND (voitem_vohead_id=vodist_vohead_id) AND ((poitem_qty_received - poitem_qty_vouchered) = 0) AND (vodist_vohead_id=pVoheadid) ) LIMIT 1; IF (FOUND) THEN RAISE EXCEPTION 'Cannot Post Voucher #% as one or more of the line items have already been fully vouchered. Check P/O Line #% [postVoucher, -6, %, %]', _p.vohead_number, _test, _p.vohead_number, _test; END IF; -- Start by handling taxes FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.vohead_curr_id, round(sum(taxdetail_tax),2), _p.vohead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('VO', pVoheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', _p.vohead_number, _r.tax_sales_accnt_id, _r.taxbasevalue, _glDate, _p.glnotes ); RAISE DEBUG 'postVoucher: _r.tax=%', _r.tax; _totalAmount_base := (_totalAmount_base - _r.taxbasevalue); _totalAmount := (_totalAmount - _r.tax); END LOOP; -- Update item tax records with posting data UPDATE voitemtax SET taxhist_docdate=_p.vohead_docdate, taxhist_distdate=_glDate, taxhist_curr_id=_p.vohead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM vohead JOIN voitem ON (vohead_id=voitem_vohead_id), curr_rate WHERE ((vohead_id=pVoheadId) AND (taxhist_parent_id=voitem_id) AND (_p.vohead_curr_id=curr_id) AND (_p.vohead_docdate BETWEEN curr_effective AND curr_expires) ); -- Update Misc distributions with posting data UPDATE voheadtax SET taxhist_docdate=_p.vohead_docdate, taxhist_distdate=_glDate, taxhist_curr_id=_p.vohead_curr_id, taxhist_curr_rate=curr_rate, taxhist_journalnumber=pJournalNumber FROM curr_rate WHERE ((taxhist_parent_id=pVoheadid) AND (_p.vohead_curr_id=curr_id) AND (_p.vohead_docdate BETWEEN curr_effective AND curr_expires) ); -- Loop through the vodist records for the passed vohead that -- are posted against a P/O Item FOR _g IN SELECT DISTINCT poitem_id, voitem_id, voitem_qty, poitem_expcat_id, poitem_invvenduomratio, poitem_prj_id, COALESCE(itemsite_id, -1) AS itemsiteid, COALESCE(itemsite_costcat_id, -1) AS costcatid, COALESCE(itemsite_item_id, -1) AS itemsite_item_id, (SELECT SUM(value) FROM ( SELECT SUM(recv_value) AS value FROM recv WHERE (recv_voitem_id=voitem_id) UNION SELECT SUM(poreject_value)*-1 AS value FROM poreject WHERE (poreject_voitem_id=voitem_id)) as data) AS value_base, (poitem_freight_received - poitem_freight_vouchered) / (poitem_qty_received - poitem_qty_vouchered) * voitem_qty AS vouchered_freight, currToBase(_p.pohead_curr_id, (poitem_freight_received - poitem_freight_vouchered) / (poitem_qty_received - poitem_qty_vouchered) * voitem_qty, _firstExchDateFreight ) AS vouchered_freight_base, voitem_freight, currToBase(_p.vohead_curr_id, voitem_freight, _p.vohead_distdate) AS voitem_freight_base FROM vodist, voitem, poitem LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) WHERE ( (vodist_poitem_id=poitem_id) AND (voitem_poitem_id=poitem_id) AND (voitem_vohead_id=vodist_vohead_id) AND (vodist_vohead_id=pVoheadid)) LOOP -- Grab the G/L Accounts IF (_g.costcatid = -1) THEN SELECT getPrjAccntId(_g.poitem_prj_id, pp.accnt_id) AS pp_accnt_id, lb.accnt_id AS lb_accnt_id, fr.accnt_id AS freight_accnt_id INTO _a FROM expcat, accnt AS pp, accnt AS lb, accnt AS fr WHERE ( (expcat_purchprice_accnt_id=pp.accnt_id) AND (expcat_liability_accnt_id=lb.accnt_id) AND (expcat_freight_accnt_id=fr.accnt_id) AND (expcat_id=_g.poitem_expcat_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Voucher #% due to unassigned G/L Accounts [xtuple: postVoucher, -7, %]', _p.vohead_number, _p.vohead_number; END IF; ELSE SELECT getPrjAccntId(_g.poitem_prj_id, costcat_purchprice_accnt_id) AS pp_accnt_id, getPrjAccntId(_g.poitem_prj_id, costcat_liability_accnt_id) AS lb_accnt_id, getPrjAccntId(_g.poitem_prj_id, costcat_freight_accnt_id) AS freight_accnt_id INTO _a FROM costcat WHERE (costcat_id=_g.costcatid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Voucher #% due to unassigned G/L Accounts [xtuple: postVoucher, -8, %]', _p.vohead_number, _p.vohead_number; END IF; END IF; -- Clear the Item Amount accumulator _itemAmount_base := 0; _itemAmount := 0; -- Figure out the total posted value for this line item FOR _d IN SELECT vodist_id, vodist_amount, vodist_discountable, _p.vohead_curr_id, vodist_costelem_id, currToBase(_p.vohead_curr_id, vodist_amount, _p.vohead_distdate) AS vodist_amount_base FROM vodist WHERE ( (vodist_vohead_id=pVoheadid) AND (vodist_poitem_id=_g.poitem_id) ) LOOP _pExplain := FALSE; SELECT * INTO _costx FROM itemcost WHERE ( (itemcost_item_id = _g.itemsite_item_id) AND (itemcost_costelem_id = _d.vodist_costelem_id) ); IF (FOUND) THEN _pExplain := _costx.itemcost_lowlevel; END IF; -- Post the cost to the Actual if requested -- IF ( (pPostCosts) AND (_d.vodist_costelem_id <> -1) ) THEN IF ( (_d.vodist_costelem_id <> -1) AND (_g.itemsite_item_id <> -1) ) THEN PERFORM updateCost( _g.itemsite_item_id, _d.vodist_costelem_id, _pExplain, (_d.vodist_amount / (_g.voitem_qty * _g.poitem_invvenduomratio)), _p.vohead_curr_id ); END IF; -- Add the Distribution Amount to the Item Amount RAISE DEBUG 'postVoucher: _d.vodist_amount=%', _d.vodist_amount; _itemAmount_base := _itemAmount_base + ROUND(_d.vodist_amount_base, 2); _itemAmount := _itemAmount + _d.vodist_amount; IF (_d.vodist_discountable) THEN _totalDiscountableAmount := (_totalDiscountableAmount + _d.vodist_amount); END IF; END LOOP; -- Distribute from the clearing account PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.lb_accnt_id, round(_g.value_base + _g.vouchered_freight_base, 2) * -1, _glDate, _p.glnotes ); -- Attribute the correct portion to currency gain/loss _exchGainFreight := 0; SELECT currGain(_p.pohead_curr_id, _g.vouchered_freight, _firstExchDateFreight, _p.vohead_distdate ) INTO _exchGainFreight; IF (round(_exchGainFreight, 2) <> 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/P', 'VO', text(_p.vohead_number), getGainLossAccntId(_a.lb_accnt_id), round(_exchGainFreight, 2), _glDate, _p.glnotes); END IF; -- Distribute the remaining variance to the Purchase Price Variance account IF (round(_itemAmount_base, 2) <> round(_g.value_base, 2)) THEN _tmpTotal := round(_itemAmount_base, 2) - round(_g.value_base, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.pp_accnt_id, _tmpTotal * -1, _glDate, _p.glnotes ); END IF; -- Distribute the remaining freight variance to the Purchase Price Variance account IF (round(_g.voitem_freight_base + _exchGainFreight, 2) <> round(_g.vouchered_freight_base, 2)) THEN _tmpTotal := round(_g.voitem_freight_base + _exchGainFreight, 2) - round(_g.vouchered_freight_base, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.freight_accnt_id, _tmpTotal * -1, _glDate, _p.glnotes ); END IF; -- Add the distribution amount to the total amount to distribute RAISE DEBUG 'postVoucher: _itemAmount=%', _itemAmount; _totalAmount_base := (_totalAmount_base + _itemAmount_base + _g.voitem_freight_base); _totalAmount := (_totalAmount + _itemAmount + _g.voitem_freight); -- Post all the Tagged Receivings for this P/O Item as Invoiced and -- record the purchase and receive costs -- Comment out because recv cost is set at receiving now. UPDATE recv SET recv_invoiced=TRUE, recv_recvcost_curr_id=basecurrid(), recv_recvcost=round(_g.value_base / _g.voitem_qty, 2) FROM poitem WHERE ((recv_orderitem_id=poitem_id) AND (recv_order_type='PO') AND (recv_orderitem_id=_g.poitem_id) AND (recv_vohead_id=pVoheadid) ); -- Post all the Tagged Rejections for this P/O Item as Invoiced UPDATE poreject SET poreject_invoiced=TRUE WHERE ( (poreject_poitem_id=_g.poitem_id) AND (poreject_vohead_id=pVoheadid) ); -- Update the qty and freight vouchered fields UPDATE poitem SET poitem_qty_vouchered = (poitem_qty_vouchered + _g.voitem_qty), poitem_freight_vouchered = (poitem_freight_vouchered + _g.vouchered_freight) WHERE (poitem_id=_g.poitem_id); END LOOP; -- Loop through the vodist records for the passed vohead that -- are not posted against a P/O Item -- Skip the tax distributions FOR _d IN SELECT vodist_id, vodist_discountable, currToBase(_p.vohead_curr_id, vodist_amount, _p.vohead_distdate) AS vodist_amount_base, vodist_amount, vodist_accnt_id, vodist_expcat_id FROM vodist WHERE ( (vodist_vohead_id=pVoheadid) AND (vodist_poitem_id=-1) AND (vodist_tax_id=-1) ) LOOP -- Distribute from the misc. account IF (_d.vodist_accnt_id = -1) THEN PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), expcat_exp_accnt_id, round(_d.vodist_amount_base, 2) * -1, _glDate, _p.glnotes ) FROM expcat WHERE (expcat_id=_d.vodist_expcat_id); ELSE PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _d.vodist_accnt_id, round(_d.vodist_amount_base, 2) * -1, _glDate, _p.glnotes ); END IF; -- Add the Distribution Amount to the Total Amount RAISE DEBUG 'postVoucher: _d.vodist_amount=%', _d.vodist_amount; _totalAmount_base := _totalAmount_base + ROUND(_d.vodist_amount_base, 2); _totalAmount := _totalAmount + _d.vodist_amount; IF (_d.vodist_discountable) THEN _totalDiscountableAmount := (_totalDiscountableAmount + _d.vodist_amount); END IF; END LOOP; SELECT insertIntoGLSeries( _sequence, 'A/P', 'VO', text(vohead_number), accnt_id, round(_totalAmount_base, 2), _glDate, _p.glnotes ) INTO _test FROM vohead LEFT OUTER JOIN accnt ON (accnt_id=findAPAccount(vohead_vend_id)) WHERE ( (findAPAccount(vohead_vend_id)=0 OR accnt_id > 0) -- G/L interface might be disabled AND (vohead_id=pVoheadid) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Post Voucher #% due to an unassigned A/P Account [xtuple: postVoucher, -9, %]', _p.vohead_number, _p.vohead_number; END IF; PERFORM postGLSeries(_sequence, pJournalNumber); -- Create the A/P Open Item RAISE DEBUG 'postVoucher: _totalAmount=%, _totalDiscountableAmount=%', _totalAmount, _totalDiscountableAmount; INSERT INTO apopen ( apopen_journalnumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_open, apopen_terms_id, apopen_vend_id, apopen_doctype, apopen_docnumber, apopen_invcnumber, apopen_ponumber, apopen_reference, apopen_amount, apopen_paid, apopen_notes, apopen_username, apopen_posted, apopen_curr_id, apopen_discountable_amount ) -- TODO: SELECT pJournalNumber, vohead_docdate, vohead_duedate, _glDate, TRUE, vohead_terms_id, vohead_vend_id, 'V', vohead_number, vohead_invcnumber, COALESCE(TEXT(pohead_number), 'Misc.'), vohead_reference, round(_totalAmount, 2), 0, '', getEffectiveXtUser(), FALSE, vohead_curr_id, round(_totalDiscountableAmount, 2) FROM vohead LEFT OUTER JOIN pohead ON (vohead_pohead_id=pohead_id) WHERE (vohead_id=pVoheadid); -- Close all of the P/O Items that should be closed by this Voucher UPDATE poitem SET poitem_status='C' FROM voitem WHERE ( (voitem_poitem_id=poitem_id) AND (voitem_close) AND (voitem_vohead_id=pVoheadid) ); -- Check the P/O items and if they are all closed go ahead -- and close the P/O head. IF ( (SELECT (count(*) < 1) FROM vohead, poitem WHERE ((vohead_pohead_id=poitem_pohead_id) AND (poitem_status<>'C') AND (vohead_id=pVoheadid) ) ) ) THEN PERFORM closePo(vohead_pohead_id) FROM vohead WHERE (vohead_id=pVoheadid); END IF; -- Set the vohead as posted UPDATE vohead SET vohead_posted=TRUE, vohead_gldistdate=_glDate WHERE (vohead_id=pVoheadid); RETURN pJournalNumber; END; $_$; =DROP FUNCTION public.postvoucher(integer, integer, boolean); publicadminfalse8399212551683189postvouchers(boolean)FUNCTIONCREATE FUNCTION postvouchers(boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPostCosts ALIAS FOR $1; _journalNumber INTEGER; BEGIN SELECT fetchJournalNumber('AP-VO') INTO _journalNumber; PERFORM postVoucher(vohead_id, _journalNumber, pPostCosts) FROM vohead WHERE (NOT vohead_posted); RETURN _journalNumber; END; $_$; ,DROP FUNCTION public.postvouchers(boolean); publicadminfalse8399212551683190primarykeyfields(text, text)FUNCTION@CREATE FUNCTION primarykeyfields(text, text) RETURNS text[] LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSchema ALIAS FOR $1; pRelation ALIAS FOR $2; _colname TEXT; _counter INTEGER := 0; _result TEXT[]; BEGIN EXECUTE 'SELECT ARRAY(SELECT attname FROM pg_attribute JOIN pg_class idx ON (attrelid = idx.oid) JOIN pg_namespace ON (idx.relnamespace = pg_namespace.oid) JOIN pg_index ON (idx.oid = indexrelid) JOIN pg_class tab ON (indrelid = tab.oid) WHERE NOT attisdropped AND nspname = ''' || pSchema || ''' AND indisprimary AND LOWER(tab.relname) = ''' || pRelation || ''' ORDER BY attnum);' INTO _result; RETURN _result; END; $_$; 3DROP FUNCTION public.primarykeyfields(text, text); publicadminfalse83992"00%FUNCTION primarykeyfields(text, text)COMMENTCOMMENT ON FUNCTION primarykeyfields(text, text) IS 'Return an array containing the names of the primary key fields of pSchema.pRelation. The first key field is in _result[1].'; publicadminfalse180912551683191prj()FUNCTION CREATE FUNCTION prj() RETURNS SETOF prj LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row prj%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllProjects','ViewAllProjects','MaintainPersonalProjects','ViewPersonalProjects') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM prj LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM prj WHERE getEffectiveXtUser() IN (prj_owner_username, prj_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; DROP FUNCTION public.prj(); publicadminfalse839922700"00FUNCTION prj()COMMENToCOMMENT ON FUNCTION prj() IS 'A table function that returns Project results according to privilege settings.'; publicadminfalse181012591683192prjtaskTABLECREATE TABLE prjtask ( prjtask_id integer NOT NULL, prjtask_number text NOT NULL, prjtask_name text NOT NULL, prjtask_descrip text, prjtask_prj_id integer NOT NULL, prjtask_anyuser boolean, prjtask_status character(1) NOT NULL, prjtask_hours_budget numeric(18,6) NOT NULL, prjtask_hours_actual numeric(18,6) NOT NULL, prjtask_exp_budget numeric(16,4) NOT NULL, prjtask_exp_actual numeric(16,4) NOT NULL, prjtask_owner_username text, prjtask_start_date date, prjtask_due_date date, prjtask_assigned_date date, prjtask_completed_date date, prjtask_username text, CONSTRAINT prjtask_prjtask_status_check CHECK ((prjtask_status = ANY (ARRAY['P'::bpchar, 'O'::bpchar, 'C'::bpchar]))) ); DROP TABLE public.prjtask; publicadminfalse59458"00 TABLE prjtaskCOMMENT8COMMENT ON TABLE prjtask IS 'Project Task information'; publicadminfalse182"00prjtaskACLREVOKE ALL ON TABLE prjtask FROM PUBLIC; REVOKE ALL ON TABLE prjtask FROM admin; GRANT ALL ON TABLE prjtask TO admin; GRANT ALL ON TABLE prjtask TO xtrole; publicadminfalse18212551683199 prjtask()FUNCTIONtCREATE FUNCTION prjtask() RETURNS SETOF prjtask LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row prjtask%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllProjects','ViewAllProjects','MaintainPersonalProjects','ViewPersonalProjects') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM prjtask LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT prjtask.* FROM prjtask JOIN prj ON prj_id=prjtask_prj_id WHERE getEffectiveXtUser() IN (prjtask_owner_username,prjtask_username,prj_username,prj_owner_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; DROP FUNCTION public.prjtask(); publicadminfalse839922729"00FUNCTION prjtask()COMMENTsCOMMENT ON FUNCTION prjtask() IS 'A table function that returns Project results according to privilege settings.'; publicadminfalse181612551683200purgecreditmemos(date)FUNCTIONWCREATE FUNCTION purgecreditmemos(date) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; BEGIN DELETE FROM cmitem WHERE (cmitem_id IN ( SELECT cmitem_id FROM cmitem, cmhead WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmhead_posted) AND (cmhead_printed) AND (cmhead_docdate<=pCutoffDate) AND (checkCreditMemoSitePrivs(cmhead_id)) ) ) ); DELETE FROM cmhead WHERE ( (cmhead_posted) AND (cmhead_printed) AND (cmhead_docdate<=pCutoffDate) AND (checkCreditMemoSitePrivs(cmhead_id)) ); RETURN TRUE; END; $_$; -DROP FUNCTION public.purgecreditmemos(date); publicadminfalse83992#12551683201purgecrmacctmerge(integer)FUNCTION CREATE FUNCTION purgecrmacctmerge(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pDestid ALIAS FOR $1; _result INTEGER := 0; _tmpcount INTEGER := 0; BEGIN IF EXISTS(SELECT 1 FROM crmacctsel WHERE crmacctsel_dest_crmacct_id=pDestid) THEN DELETE FROM crmacctsel WHERE crmacctsel_dest_crmacct_id = pDestid; GET DIAGNOSTICS _result = ROW_COUNT; ELSIF EXISTS(SELECT 1 FROM mrgundo WHERE mrgundo_base_schema='public' AND mrgundo_base_table='crmacct' AND mrgundo_base_id=pDestid) THEN DELETE FROM crmacct WHERE crmacct_id IN ( SELECT mrgundo_pkey_id FROM mrgundo WHERE mrgundo_schema = 'public' AND mrgundo_table = 'crmacct' and mrgundo_pkey_col = 'crmacct_id' AND mrgundo_col IS NULL AND mrgundo_base_schema = 'public' AND mrgundo_base_table = 'crmacct' AND mrgundo_base_id = pDestid) AND crmacct_id != pDestid; GET DIAGNOSTICS _result = ROW_COUNT; DELETE FROM mrgundo WHERE mrgundo_base_schema ='public' AND mrgundo_base_table ='crmacct' AND mrgundo_base_id = pDestid; GET DIAGNOSTICS _tmpcount = ROW_COUNT; _result := _result + _tmpcount; END IF; RETURN _result; END; $_$; 1DROP FUNCTION public.purgecrmacctmerge(integer); publicadminfalse83992$12551683202!purgeinvoicerecord(date, integer)FUNCTION!BCREATE FUNCTION purgeinvoicerecord(date, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; pInvcheadId ALIAS FOR $2; _r RECORD; _ra RECORD; _raheadid INTEGER; _result INTEGER; _debug BOOLEAN := FALSE; BEGIN -- Purge records where the entire Invoice, Billing, Shipper, Sales Order -- chain of associated documents are closed and complete FOR _r IN SELECT invchead_id, cobmisc_id, shiphead_id, ordershipped.cohead_id AS ordship_id, orderinvoiced.cohead_id AS ordinv_id FROM invchead LEFT OUTER JOIN invcitem ON (invcitem_invchead_id=invchead_id) LEFT OUTER JOIN cobmisc ON (cobmisc_invcnumber::TEXT=invchead_invcnumber) LEFT OUTER JOIN shipitem ON (shipitem_invcitem_id=invcitem_id) LEFT OUTER JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) LEFT OUTER JOIN cohead ordershipped ON (ordershipped.cohead_id=shiphead_order_id) LEFT OUTER JOIN coitem ON (coitem_id=invcitem_coitem_id) LEFT OUTER JOIN cohead orderinvoiced ON (orderinvoiced.cohead_id=coitem_cohead_id) WHERE ( (invchead_id = pInvcheadId) AND (invchead_posted) AND (checkInvoiceSitePrivs(invchead_id)) ) GROUP BY invchead_id, cobmisc_id, shiphead_id, ordship_id, ordinv_id LOOP -- Check Billing -- Billing header (cobmisc) must be posted SELECT cobmisc_id INTO _result FROM cobmisc WHERE ( (cobmisc_id=_r.cobmisc_id) AND (NOT cobmisc_posted) ); IF (FOUND) THEN RETURN 'Billing not closed'; END IF; -- Billing line items (cobill), associated Invoice line items, and -- associated Sales Order line items must be closed, posted, and after cutoff date SELECT cobill_id INTO _result FROM cobill JOIN invcitem ON (invcitem_id=cobill_invcitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) JOIN coitem ON ( (coitem_id=cobill_coitem_id) AND (coitem_status NOT IN ('C', 'X')) ) WHERE (cobill_cobmisc_id=_r.cobmisc_id); IF (FOUND) THEN RETURN 'Invoice/Sales Order associated with Billing not closed'; END IF; -- Check Shipping -- Shipping header (shiphead) must be shipped SELECT shiphead_id INTO _result FROM shiphead WHERE ( (shiphead_id=_r.shiphead_id) AND (NOT shiphead_shipped) ); IF (FOUND) THEN RETURN 'Shipper not closed'; END IF; -- Shipping line items (shipitem) and associated Sales Order line items -- must be closed SELECT shiphead_id INTO _result FROM shiphead, cohead, coitem WHERE ( (shiphead_id=_r.shiphead_id) AND ( (shiphead_order_type='SO') AND (shiphead_order_id=cohead_id) ) AND (coitem_cohead_id=cohead_id) AND (coitem_status NOT IN ('C', 'X')) ); IF (FOUND) THEN RETURN 'Sales Order associated with Shipper not closed'; END IF; -- Shipping line items (shipitem) and associated Invoices must be posted -- and after cutoff date SELECT shiphead_id INTO _result FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id) JOIN invcitem ON (invcitem_id=shipitem_invcitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (shiphead_id=_r.shiphead_id); IF (FOUND) THEN RETURN 'Invoice associated with Shipper not closed'; END IF; -- Check Sales Order -- Sales Order line items (coitem) must be closed SELECT cohead_id INTO _result FROM cohead JOIN coitem ON ( (coitem_cohead_id=cohead_id) AND (coitem_status NOT IN ('C', 'X')) ) WHERE (cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped Sales Order not closed'; END IF; SELECT cohead_id INTO _result FROM cohead JOIN coitem ON ( (coitem_cohead_id=cohead_id) AND (coitem_status NOT IN ('C', 'X')) ) WHERE (cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced Sales Order not closed'; END IF; IF (fetchMetricBool('MultiWhs')) THEN -- Check Original Return Authorization and cross check to New Sales Order SELECT rahead_id INTO _result FROM rahead JOIN raitem ON ( (raitem_rahead_id=rahead_id) AND (raitem_status NOT IN ('C', 'X')) ) JOIN coitem ON ( (coitem_id=raitem_new_coitem_id) AND (coitem_status NOT IN ('C', 'X')) ) JOIN invcitem ON (invcitem_coitem_id=coitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (rahead_orig_cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped Original Return Authorization not closed'; END IF; SELECT rahead_id INTO _result FROM rahead JOIN raitem ON ( (raitem_rahead_id=rahead_id) AND (raitem_status NOT IN ('C', 'X')) ) JOIN coitem ON ( (coitem_id=raitem_new_coitem_id) AND (coitem_status NOT IN ('C', 'X')) ) JOIN invcitem ON (invcitem_coitem_id=coitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (rahead_orig_cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced Original Return Authorization not closed'; END IF; -- Check New Return Authorization SELECT rahead_id INTO _result FROM rahead JOIN raitem ON ( (raitem_rahead_id=rahead_id) AND (NOT raitem_status IN ('C', 'X')) ) JOIN coitem ON ( (coitem_id=raitem_orig_coitem_id) AND (NOT coitem_status IN ('C', 'X')) ) JOIN invcitem ON (invcitem_coitem_id=coitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (rahead_new_cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped New Return Authorization not closed'; END IF; SELECT rahead_id INTO _result FROM rahead JOIN raitem ON ( (raitem_rahead_id=rahead_id) AND (NOT raitem_status IN ('C', 'X')) ) JOIN coitem ON ( (coitem_id=raitem_orig_coitem_id) AND (NOT coitem_status IN ('C', 'X')) ) JOIN invcitem ON (invcitem_coitem_id=coitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND ((NOT invchead_posted) OR (invchead_invcdate > pCutoffDate)) ) WHERE (rahead_new_cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced New Return Authorization not closed'; END IF; END IF; -- Check Lot/Serial Registration IF (fetchMetricBool('MultiWhs')) THEN -- Registration associated with Sales Order must be expired SELECT lsreg_id INTO _result FROM lsreg WHERE ( (lsreg_cohead_id=_r.ordship_id) AND (lsreg_expiredate > CURRENT_DATE) ); IF (FOUND) THEN RETURN 'Shipped Sales Order Lot/Serial Registration not closed'; END IF; SELECT lsreg_id INTO _result FROM lsreg WHERE ( (lsreg_cohead_id=_r.ordinv_id) AND (lsreg_expiredate > CURRENT_DATE) ); IF (FOUND) THEN RETURN 'Invoiced Sales Order Lot/Serial Registration not closed'; END IF; -- Registration associated with Shipping must be expired SELECT lsreg_id INTO _result FROM lsreg WHERE ( (lsreg_cohead_id=_r.shiphead_id) AND (lsreg_expiredate > CURRENT_DATE) ); IF (FOUND) THEN RETURN 'Shipper Lot/Serial Registration not closed'; END IF; END IF; IF (fetchMetricBool('MultiWhs')) THEN -- Registration associated with Original Return Authorization must be expired SELECT rahead_id INTO _result FROM rahead JOIN raitem ON (raitem_rahead_id=rahead_id) JOIN raitemls ON (raitemls_raitem_id=raitem_id) JOIN lsreg ON ( (lsreg_ls_id=raitemls_ls_id) AND (lsreg_expiredate > CURRENT_DATE) ) WHERE (rahead_orig_cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped Original Return Authorization Lot/Serial Registration not closed'; END IF; SELECT rahead_id INTO _result FROM rahead JOIN raitem ON (raitem_rahead_id=rahead_id) JOIN raitemls ON (raitemls_raitem_id=raitem_id) JOIN lsreg ON ( (lsreg_ls_id=raitemls_ls_id) AND (lsreg_expiredate > CURRENT_DATE) ) WHERE (rahead_orig_cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced Original Return Authorization Lot/Serial Registration not closed'; END IF; -- Registration associated with New Return Authorization must be expired SELECT rahead_id INTO _result FROM rahead JOIN raitem ON (raitem_rahead_id=rahead_id) JOIN raitemls ON (raitemls_raitem_id=raitem_id) JOIN lsreg ON ( (lsreg_ls_id=raitemls_ls_id) AND (lsreg_expiredate > CURRENT_DATE) ) WHERE (rahead_new_cohead_id=_r.ordship_id); IF (FOUND) THEN RETURN 'Shipped New Return Authorization Lot/Serial Registration not closed'; END IF; SELECT rahead_id INTO _result FROM rahead JOIN raitem ON (raitem_rahead_id=rahead_id) JOIN raitemls ON (raitemls_raitem_id=raitem_id) JOIN lsreg ON ( (lsreg_ls_id=raitemls_ls_id) AND (lsreg_expiredate > CURRENT_DATE) ) WHERE (rahead_new_cohead_id=_r.ordinv_id); IF (FOUND) THEN RETURN 'Invoiced New Return Authorization Lot/Serial Registration not closed'; END IF; END IF; -- Cash Advances associated with Sales Order cannot exist SELECT aropenalloc_doc_id INTO _result FROM aropenalloc WHERE ((aropenalloc_doctype='S') AND (aropenalloc_doc_id=_r.ordship_id)); IF (FOUND) THEN RETURN 'Shipped Cash Advance not closed'; END IF; SELECT aropenalloc_doc_id INTO _result FROM aropenalloc WHERE ((aropenalloc_doctype='S') AND (aropenalloc_doc_id=_r.ordinv_id)); IF (FOUND) THEN RETURN 'Invoiced Cash Advance not closed'; END IF; END LOOP; -- Everything is OK, delete the chain FOR _r IN SELECT invchead_id, cobmisc_id, shiphead_id, ordershipped.cohead_id AS ordship_id, orderinvoiced.cohead_id AS ordinv_id FROM invchead LEFT OUTER JOIN invcitem ON (invcitem_invchead_id=invchead_id) LEFT OUTER JOIN cobmisc ON (cobmisc_invcnumber::TEXT=invchead_invcnumber) LEFT OUTER JOIN shipitem ON (shipitem_invcitem_id=invcitem_id) LEFT OUTER JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) LEFT OUTER JOIN cohead ordershipped ON (ordershipped.cohead_id=shiphead_order_id) LEFT OUTER JOIN coitem ON (coitem_id=invcitem_coitem_id) LEFT OUTER JOIN cohead orderinvoiced ON (orderinvoiced.cohead_id=coitem_cohead_id) WHERE ( (invchead_id = pInvcheadId) AND (invchead_posted) AND (checkInvoiceSitePrivs(invchead_id)) ) GROUP BY invchead_id, cobmisc_id, shiphead_id, ordship_id, ordinv_id LOOP IF (fetchMetricBool('MultiWhs')) THEN FOR _ra IN SELECT rahead_id FROM rahead WHERE (rahead_orig_cohead_id=_r.ordship_id) LOOP IF (_debug) THEN RAISE NOTICE 'Deleting Original Return head id %', _ra.rahead_id; END IF; DELETE FROM raitemls WHERE (raitemls_raitem_id IN (SELECT raitem_id FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id))); DELETE FROM rahist WHERE (rahist_rahead_id=_ra.rahead_id); DELETE FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id); DELETE FROM rahead WHERE (rahead_id=_ra.rahead_id); END LOOP; FOR _ra IN SELECT rahead_id FROM rahead WHERE (rahead_orig_cohead_id=_r.ordinv_id) LOOP IF (_debug) THEN RAISE NOTICE 'Deleting Original Return head id %', _ra.rahead_id; END IF; DELETE FROM raitemls WHERE (raitemls_raitem_id IN (SELECT raitem_id FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id))); DELETE FROM rahist WHERE (rahist_rahead_id=_ra.rahead_id); DELETE FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id); DELETE FROM rahead WHERE (rahead_id=_ra.rahead_id); END LOOP; FOR _ra IN SELECT rahead_id FROM rahead WHERE (rahead_new_cohead_id=_r.ordship_id) LOOP IF (_debug) THEN RAISE NOTICE 'Deleting New Return head id %', _ra.rahead_id; END IF; DELETE FROM raitemls WHERE (raitemls_raitem_id IN (SELECT raitem_id FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id))); DELETE FROM rahist WHERE (rahist_rahead_id=_ra.rahead_id); DELETE FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id); DELETE FROM rahead WHERE (rahead_id=_ra.rahead_id); END LOOP; FOR _ra IN SELECT rahead_id FROM rahead WHERE (rahead_new_cohead_id=_r.ordinv_id) LOOP IF (_debug) THEN RAISE NOTICE 'Deleting New Return head id %', _ra.rahead_id; END IF; DELETE FROM raitemls WHERE (raitemls_raitem_id IN (SELECT raitem_id FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id))); DELETE FROM rahist WHERE (rahist_rahead_id=_ra.rahead_id); DELETE FROM raitem WHERE (raitem_rahead_id=_ra.rahead_id); DELETE FROM rahead WHERE (rahead_id=_ra.rahead_id); END LOOP; END IF; IF (fetchMetricBool('MultiWhs')) THEN IF (_debug) THEN RAISE NOTICE 'Deleting Lot/Serial Registrations'; END IF; DELETE FROM lsreg WHERE (lsreg_cohead_id=_r.ordship_id); DELETE FROM lsreg WHERE (lsreg_cohead_id=_r.ordinv_id); DELETE FROM lsreg WHERE (lsreg_shiphead_id=_r.shiphead_id); END IF; IF (_debug) THEN RAISE NOTICE 'Deleting Shipped Sales Order head id %', _r.ordship_id; END IF; DELETE FROM payco WHERE (payco_cohead_id=_r.ordship_id); -- Delete kit components first DELETE FROM coitem WHERE (coitem_cohead_id=_r.ordship_id AND coitem_subnumber > 0); DELETE FROM coitem WHERE (coitem_cohead_id=_r.ordship_id); DELETE FROM cohead WHERE (cohead_id=_r.ordship_id); IF (_debug) THEN RAISE NOTICE 'Deleting Sales Order head id %', _r.ordinv_id; END IF; DELETE FROM payco WHERE (payco_cohead_id=_r.ordinv_id); -- Delete kit components first DELETE FROM coitem WHERE (coitem_cohead_id=_r.ordinv_id AND coitem_subnumber > 0); DELETE FROM coitem WHERE (coitem_cohead_id=_r.ordinv_id); DELETE FROM cohead WHERE (cohead_id=_r.ordinv_id); IF (_debug) THEN RAISE NOTICE 'Deleting Ship head id %', _r.shiphead_id; END IF; DELETE FROM shipitem WHERE (shipitem_shiphead_id=_r.shiphead_id); DELETE FROM pack WHERE (pack_shiphead_id=_r.shiphead_id); DELETE FROM shiphead WHERE (shiphead_id=_r.shiphead_id); IF (_debug) THEN RAISE NOTICE 'Deleting Billing head id %', _r.cobmisc_id; END IF; DELETE FROM cobill WHERE (cobill_cobmisc_id=_r.cobmisc_id); DELETE FROM cobmisc WHERE (cobmisc_id=_r.cobmisc_id); END LOOP; -- Everything is OK, delete the Invoice IF (_debug) THEN RAISE NOTICE 'Deleting Invoice head id %', _r.invchead_id; END IF; DELETE FROM invcitem WHERE (invcitem_invchead_id=_r.invchead_id); DELETE FROM invchead WHERE (invchead_id=_r.invchead_id); RETURN 'Purged'; END; $_$; 8DROP FUNCTION public.purgeinvoicerecord(date, integer); publicadminfalse83992%12551683204purgeinvoicerecords(date)FUNCTIONCREATE FUNCTION purgeinvoicerecords(date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; BEGIN -- Remove the shipitem records DELETE FROM shipitem WHERE (shipitem_invcitem_id IN (SELECT invcitem_id FROM invcitem WHERE invcitem_invchead_id IN ( SELECT invchead_id FROM invchead WHERE ( (invchead_invcdate <= pCutoffDate) AND (checkInvoiceSitePrivs(invchead_id)) AND (invchead_posted) ) ) ) ); -- Remove the cobill and cobmisc records DELETE FROM cobill WHERE (cobill_cobmisc_id IN ( SELECT cobmisc_id FROM cobmisc, invchead WHERE ( (invchead_invcnumber=cobmisc_invcnumber::TEXT) AND (checkInvoiceSitePrivs(invchead_id)) AND (cobmisc_invcdate <= pCutoffDate) AND (cobmisc_posted)) ) ); DELETE FROM cobmisc WHERE ( (checkInvoiceSitePrivs(getInvcheadId(cobmisc_invcnumber::TEXT))) AND (cobmisc_invcdate <= pCutoffDate) AND (cobmisc_posted) ); -- Remove the invchead and invcitem records DELETE FROM invcitem WHERE (invcitem_invchead_id IN ( SELECT invchead_id FROM invchead WHERE ( (invchead_invcdate <= pCutoffDate) AND (checkInvoiceSitePrivs(invchead_id)) AND (invchead_posted) ) ) ); DELETE FROM invchead WHERE ( (invchead_invcdate <= pCutoffDate) AND (checkInvoiceSitePrivs(invchead_id)) AND (invchead_posted) ); RETURN 1; END; $_$; 0DROP FUNCTION public.purgeinvoicerecords(date); publicadminfalse83992&12551683205$purgepostedcountslips(date, integer)FUNCTIONCREATE FUNCTION purgepostedcountslips(date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; pWarehousid ALIAS FOR $2; BEGIN IF (pWarehousid = -1) THEN DELETE FROM cntslip WHERE (cntslip_id IN ( SELECT cntslip_id FROM cntslip, invcnt WHERE ( (cntslip_cnttag_id=invcnt_id) AND (invcnt_posted) AND (cntslip_posted) AND (date(invcnt_postdate) <= pCutoffDate) ) ) ); ELSE DELETE FROM cntslip WHERE (cntslip_id IN ( SELECT cntslip_id FROM invcnt, itemsite WHERE ( (cntslip_cnttag_id=invcnt_id) AND (invcnt_posted) AND (cntslip_posted) AND (invcnt_itemsite_id=itemsite_id) AND (date(invcnt_postdate) <= pCutoffDate) AND (itemsite_warehous_id=pWarehousid) ) ) ); END IF; RETURN 1; END; $_$; ;DROP FUNCTION public.purgepostedcountslips(date, integer); publicadminfalse83992(12551683206#purgepostedcounttags(date, integer)FUNCTIONCREATE FUNCTION purgepostedcounttags(date, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCutoffDate ALIAS FOR $1; pWarehousid ALIAS FOR $2; BEGIN IF (pWarehousid = -1) THEN DELETE FROM cntslip WHERE (cntslip_cnttag_id IN ( SELECT invcnt_id FROM invcnt WHERE ( (invcnt_posted) AND (date(invcnt_postdate) <= pCutoffDate) ) ) ); DELETE FROM invcnt WHERE ((invcnt_posted) AND (date(invcnt_postdate) <= pCutoffDate)); ELSE DELETE FROM cntslip WHERE (cntslip_cnttag_id IN ( SELECT invcnt_id FROM invcnt, itemsite WHERE ( (invcnt_posted) AND (invcnt_itemsite_id=itemsite_id) AND (date(invcnt_postdate) <= pCutoffDate) AND (itemsite_warehous_id=pWarehousid) ) ) ); DELETE FROM invcnt WHERE (invcnt_id IN ( SELECT invcnt_id FROM invcnt, itemsite WHERE ( (invcnt_posted) AND (invcnt_itemsite_id=itemsite_id) AND (date(invcnt_postdate) <= pCutoffDate) AND (itemsite_warehous_id=pWarehousid) ) ) ); END IF; RETURN 1; END; $_$; :DROP FUNCTION public.purgepostedcounttags(date, integer); publicadminfalse83992)12551683207purgeshipments(date)FUNCTIONCREATE FUNCTION purgeshipments(date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pcutoff ALIAS FOR $1; _r RECORD; BEGIN -- Used for transfer orders shipments (which are never invoiced) FOR _r IN SELECT shiphead_id FROM shiphead WHERE ( (shiphead_order_type='TO') AND (shiphead_shipped) AND (shiphead_shipdate <= pcutoff) ) LOOP DELETE FROM shipitem WHERE (shipitem_shiphead_id=_r.shiphead_id); DELETE FROM shiphead WHERE (shiphead_id=_r.shiphead_id); END LOOP; RETURN 0; END; $_$; +DROP FUNCTION public.purgeshipments(date); publicadminfalse8399212551683208qtyallocated(integer, integer)FUNCTIONCREATE FUNCTION qtyallocated(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAheaddays ALIAS FOR $2; BEGIN RETURN qtyAllocated(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookAheadDays)); END; $_$; 5DROP FUNCTION public.qtyallocated(integer, integer); publicadminfalse8399212551683209qtyallocated(integer, date)FUNCTIONcCREATE FUNCTION qtyallocated(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN qtyAllocated(pItemsiteid, startOfTime(), pDate); END; $_$; 2DROP FUNCTION public.qtyallocated(integer, date); publicadminfalse83992*12551683210!qtyallocated(integer, date, date)FUNCTIONCREATE FUNCTION qtyallocated(integer, date, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; BEGIN IF ( fetchMetricBool('MultiWhs')) THEN IF ( SELECT item_sold FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid)) ) THEN RETURN (allocatedForTo(pItemsiteid, pStartDate, pEndDate) + allocatedForWo(pItemsiteid, pStartDate, pEndDate) + allocatedForSo(pItemsiteid, pStartDate, pEndDate)); ELSE RETURN (allocatedForTo(pItemsiteid, pStartDate, pEndDate) + allocatedForWo(pItemsiteid, pStartDate, pEndDate)); END IF; ELSE IF ( SELECT item_sold FROM itemsite, item WHERE ((itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid)) ) THEN RETURN (allocatedForWo(pItemsiteid, pStartDate, pEndDate) + allocatedForSo(pItemsiteid, pStartDate, pEndDate)); ELSE RETURN (allocatedForWo(pItemsiteid, pStartDate, pEndDate)); END IF; END IF; END; $_$; 8DROP FUNCTION public.qtyallocated(integer, date, date); publicadminfalse83992+12551683211qtyatshipping(integer)FUNCTION CREATE FUNCTION qtyatshipping(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN qtyAtShipping('SO', $1); END; $_$; -DROP FUNCTION public.qtyatshipping(integer); publicadminfalse83992,12551683212qtyatshipping(text, integer)FUNCTIONCREATE FUNCTION qtyatshipping(text, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN qtyAtShipping($1, $2, 'U'); END; $_$; 3DROP FUNCTION public.qtyatshipping(text, integer); publicadminfalse83992-12551683213"qtyatshipping(text, integer, text)FUNCTIONCREATE FUNCTION qtyatshipping(text, integer, text) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; plineitemid ALIAS FOR $2; pstatus ALIAS FOR $3; _qty NUMERIC := 0.0; BEGIN -- pstatus U=unshipped -- S=shipped -- B=both unshipped and shipped IF (pordertype NOT IN ('SO', 'TO')) THEN RAISE EXCEPTION '% is not a valid order type', pordertype; END IF; IF (pstatus NOT IN ('U', 'S', 'B')) THEN RAISE EXCEPTION '% is not a valid status', pstatus; END IF; SELECT COALESCE(SUM(shipitem_qty), 0.0) INTO _qty FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type=pordertype) AND (shipitem_orderitem_id=plineitemid) AND (((shiphead_shipped) AND (pstatus IN ('S', 'B'))) OR ((NOT shiphead_shipped) AND (pstatus IN ('U', 'B')))) ); RETURN _qty; END; $_$; 9DROP FUNCTION public.qtyatshipping(text, integer, text); publicadminfalse83992/12551683214qtyavailable(integer, integer)FUNCTION-CREATE FUNCTION qtyavailable(integer, integer) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAheadDays ALIAS FOR $2; BEGIN RETURN ( ( SELECT itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=pItemsiteid) ) + (SELECT qtyOrdered(pItemsiteid, pLookAheadDays)) - (SELECT qtyAllocated(pitemsiteid, pLookAheadDays)) ); END; $_$; 5DROP FUNCTION public.qtyavailable(integer, integer); publicadminfalse83992012551683215qtyavailable(integer, date)FUNCTION1CREATE FUNCTION qtyavailable(integer, date) RETURNS numeric LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN ( ( SELECT itemsite_qtyonhand FROM itemsite WHERE (itemsite_id=pItemsiteid) ) + (SELECT qtyOrdered(pItemsiteid, (pDate - CURRENT_DATE))) - (SELECT qtyAllocated(pItemsiteid, (pDate - CURRENT_DATE))) ); END; $_$; 2DROP FUNCTION public.qtyavailable(integer, date); publicadminfalse83992112551683216%qtyinshipment(text, integer, integer)FUNCTION CREATE FUNCTION qtyinshipment(text, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; plineitemid ALIAS FOR $2; pshipheadid ALIAS FOR $3; _qty NUMERIC; BEGIN IF (pordertype NOT IN ('SO', 'TO')) THEN RAISE EXCEPTION '% is not a valid order type', pordertype; END IF; IF (pshipheadid IS NULL) THEN RAISE EXCEPTION 'Cannot calculate quantity in a shipment with a NULL shipment'; END IF; SELECT SUM(COALESCE(shipitem_qty, 0.0)) INTO _qty FROM shipitem, shiphead WHERE ((shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type=pordertype) AND (shipitem_orderitem_id=plineitemid) AND (shiphead_id=pshipheadid)); IF (NOT FOUND) THEN RAISE NOTICE 'Quantity of % item % is 0 because shipment % does not exist.', pordertype, plineitemid, pshipheadid; END IF; RETURN _qty; END; $_$; <DROP FUNCTION public.qtyinshipment(text, integer, integer); publicadminfalse83992212551683217Jqtylocation(integer, integer, date, date, integer, text, integer, integer)FUNCTION CREATE FUNCTION qtylocation(integer, integer, date, date, integer, text, integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationId ALIAS FOR $1; pLsId ALIAS FOR $2; pExpiration ALIAS FOR $3; pWarranty ALIAS FOR $4; pItemsiteId ALIAS FOR $5; pOrderType ALIAS FOR $6; pOrderId ALIAS FOR $7; pItemlocdistId ALIAS FOR $8; _qty NUMERIC = 0.0; _qtyDist NUMERIC = 0.0; _qtyReserved NUMERIC = 0.0; BEGIN -- Summarize itemloc qty for this location/itemsite SELECT COALESCE(SUM(itemloc_qty), 0) INTO _qty FROM itemloc WHERE ( (itemloc_itemsite_id=pItemsiteId) AND (itemloc_location_id=pLocationId) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(pLsId, itemloc_ls_id, -1)) AND (COALESCE(itemloc_expiration, endoftime())=COALESCE(pExpiration, itemloc_expiration, endoftime())) AND (COALESCE(itemloc_warrpurc, endoftime())=COALESCE(pWarranty, itemloc_warrpurc, endoftime())) ); -- Summarize qty distributed but not yet committed by previous distributions SELECT COALESCE(SUM(loc.itemlocdist_qty), 0) INTO _qtyDist FROM itemlocdist loc JOIN itemlocdist ls ON ((ls.itemlocdist_source_type='O') AND (ls.itemlocdist_id=loc.itemlocdist_itemlocdist_id)) WHERE ( (ls.itemlocdist_itemsite_id=pItemsiteId) AND (loc.itemlocdist_source_type='L') AND (loc.itemlocdist_source_id=pLocationId) AND (COALESCE(ls.itemlocdist_ls_id, -1)=COALESCE(pLsId, ls.itemlocdist_ls_id, -1)) AND (COALESCE(ls.itemlocdist_expiration, endoftime())=COALESCE(pExpiration, ls.itemlocdist_expiration, endoftime())) AND (COALESCE(ls.itemlocdist_warranty, endoftime())=COALESCE(pWarranty, ls.itemlocdist_warranty, endoftime())) AND (ls.itemlocdist_id != pItemlocdistId ) ); -- Summarize itemlocrsrv qty for this location/itemsite -- that is reserved for a different order IF (fetchMetricBool('EnableSOReservationsByLocation')) THEN SELECT COALESCE(SUM(itemlocrsrv_qty), 0) INTO _qtyReserved FROM itemloc JOIN itemlocrsrv ON ( (itemlocrsrv_itemloc_id=itemloc_id) AND ((itemlocrsrv_source <> COALESCE(pOrderType, '')) OR (itemlocrsrv_source_id <> COALESCE(pOrderId, -1))) ) WHERE ( (itemloc_itemsite_id=pItemsiteId) AND (itemloc_location_id=pLocationId) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(pLsId, itemloc_ls_id, -1)) AND (COALESCE(itemloc_expiration, endoftime())=COALESCE(pExpiration, itemloc_expiration, endoftime())) AND (COALESCE(itemloc_warrpurc, endoftime())=COALESCE(pWarranty, itemloc_warrpurc, endoftime())) ); END IF; RETURN (_qty + _qtyDist - _qtyReserved); END; $_$; aDROP FUNCTION public.qtylocation(integer, integer, date, date, integer, text, integer, integer); publicadminfalse83992312551683218qtyordered(integer, integer)FUNCTIONCREATE FUNCTION qtyordered(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookahead ALIAS FOR $2; _itemType TEXT; _result NUMERIC; BEGIN RETURN qtyOrdered(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookahead)); END; $_$; 3DROP FUNCTION public.qtyordered(integer, integer); publicadminfalse8399212551683219qtyordered(integer, date)FUNCTION_CREATE FUNCTION qtyordered(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN qtyOrdered(pItemsiteid, startOfTime(), pDate); END; $_$; 0DROP FUNCTION public.qtyordered(integer, date); publicadminfalse83992412551683220qtyordered(integer, date, date)FUNCTIONCREATE FUNCTION qtyordered(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _itemType TEXT; BEGIN SELECT item_type INTO _itemType FROM item, itemsite WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ); IF ( SELECT metric_value FROM metric WHERE ((metric_name = 'MultiWhs') AND (metric_value = 't'))) THEN RETURN orderedByPo(pItemsiteid, pStartDate, pEndDate) + orderedByWo(pItemsiteid, pStartDate, pEndDate) + orderedByTo(pItemsiteid, pStartDate, pEndDate); ELSE RETURN orderedByPo(pItemsiteid, pStartDate, pEndDate) + orderedByWo(pItemsiteid, pStartDate, pEndDate); END IF; END; $_$; 6DROP FUNCTION public.qtyordered(integer, date, date); publicadminfalse83992512551683221qtypr(integer, integer)FUNCTIONrCREATE FUNCTION qtypr(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookahead ALIAS FOR $2; BEGIN RETURN qtypr(pItemsiteid, startOfTime(), (CURRENT_DATE + pLookahead)); END; $_$; .DROP FUNCTION public.qtypr(integer, integer); publicadminfalse83992612551683222qtypr(integer, date)FUNCTIONSCREATE FUNCTION qtypr(integer, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDate ALIAS FOR $2; BEGIN RETURN qtypr(pItemsiteid, startOfTime(), pDate); END; $_$; +DROP FUNCTION public.qtypr(integer, date); publicadminfalse83992712551683223qtypr(integer, date, date)FUNCTIONICREATE FUNCTION qtypr(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _prtotal NUMERIC; BEGIN SELECT SUM(pr_qtyreq) INTO _prtotal FROM pr WHERE ((pr_status = 'O') AND (pr_itemsite_id=pItemsiteid) AND (pr_duedate BETWEEN pStartDate AND pEndDate)); IF (_prtotal IS NULL) THEN RETURN 0.0; END IF; RETURN _prtotal; END; $_$; 1DROP FUNCTION public.qtypr(integer, date, date); publicadminfalse83992912551683224qtytoreceive(text, integer)FUNCTIONCREATE FUNCTION qtytoreceive(text, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; _qty NUMERIC; BEGIN IF (pordertype = 'TO' AND NOT fetchMetricBool('MultiWhs')) THEN RETURN 0; END IF; IF (pordertype = 'RA' AND NOT fetchMetricBool('EnableReturnAuth')) THEN RETURN 0; END IF; SELECT SUM(recv_qty) INTO _qty FROM recv WHERE ((recv_orderitem_id=porderitemid) AND (NOT recv_posted) AND (recv_order_type=pordertype)); RETURN COALESCE(_qty, 0.0); END; $_$; 2DROP FUNCTION public.qtytoreceive(text, integer); publicadminfalse8399212551683225recallshipment(integer)FUNCTIONCREATE FUNCTION recallshipment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN recallShipment($1, CURRENT_TIMESTAMP); END; $_$; .DROP FUNCTION public.recallshipment(integer); publicadminfalse83992125516832261recallshipment(integer, timestamp with time zone)FUNCTION'CREATE FUNCTION recallshipment(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pshipheadid ALIAS FOR $1; _timestamp TIMESTAMP WITH TIME ZONE := $2; _allInvoiced BOOLEAN; _invoicePosted BOOLEAN; _in RECORD; _co RECORD; _cobill RECORD; _h RECORD; _result INTEGER; _invhistid INTEGER; _itemlocSeries INTEGER; _qty NUMERIC; _qtyToBill NUMERIC; _shiphead RECORD; _to RECORD; _ti RECORD; _value NUMERIC; BEGIN IF (_timestamp IS NULL) THEN _timestamp := CURRENT_TIMESTAMP; END IF; SELECT * INTO _shiphead FROM shiphead WHERE (shiphead_id=pshipheadid); IF (NOT FOUND OR NOT _shiphead.shiphead_shipped) THEN RETURN -1; END IF; IF (_shiphead.shiphead_order_type = 'SO') THEN SELECT cohead_number AS head_number, cohead_cust_id AS cust_id, cohead_prj_id AS prj_id, cohead_saletype_id AS saletype_id, cohead_shipzone_id AS shipzone_id INTO _h FROM cohead WHERE (cohead_id=_shiphead.shiphead_order_id); IF (NOT FOUND) THEN RETURN -1; END IF; SELECT COALESCE(BOOL_AND(shipitem_invoiced), FALSE) INTO _allInvoiced FROM cobill, shipitem WHERE ((cobill_coitem_id=shipitem_orderitem_id) AND (shipitem_shiphead_id=pshipheadid)); IF (_allInvoiced AND NOT checkPrivilege('RecallInvoicedShipment')) THEN RETURN -2; END IF; -- Check for any associated posted Invoices SELECT COALESCE(BOOL_AND(invchead_posted), FALSE) INTO _invoicePosted FROM shipitem JOIN invcitem ON (invcitem_id=shipitem_invcitem_id) JOIN invchead ON (invchead_id=invcitem_invchead_id) WHERE (shipitem_shiphead_id=pshipheadid); IF (_invoicePosted) THEN RETURN -4; END IF; -- Delete any associated unposted Invoices FOR _in IN SELECT DISTINCT invchead_id FROM shipitem JOIN invcitem ON (invcitem_id=shipitem_invcitem_id) JOIN invchead ON ( (invchead_id=invcitem_invchead_id) AND (NOT invchead_posted) ) WHERE (shipitem_shiphead_id=pshipheadid) LOOP SELECT deleteInvoice(_in.invchead_id) INTO _result; IF (_result < 0) THEN RETURN _result; END IF; END LOOP; FOR _co IN SELECT coitem_id, coitem_itemsite_id, coitem_qty_invuomratio, coitem_warranty, coitem_cos_accnt_id, itemsite_controlmethod FROM coitem JOIN itemsite ON (coitem_itemsite_id=itemsite_id) WHERE(coitem_id IN (SELECT shipitem_orderitem_id FROM shipitem, shiphead WHERE((shipitem_shiphead_id=shiphead_id) AND (shiphead_shipped) AND (shiphead_id=pshipheadid)))) FOR UPDATE LOOP SELECT SUM(shipitem_qty),SUM(COALESCE(shipitem_value, 0)) INTO _qty, _value FROM shipitem WHERE ( (shipitem_orderitem_id=_co.coitem_id) AND (shipitem_shiphead_id=pshipheadid) ); UPDATE coitem SET coitem_qtyshipped = (coitem_qtyshipped - _qty) WHERE (coitem_id=_co.coitem_id); _qtyToBill := _qty; FOR _cobill IN SELECT cobill_id, cobill_qty FROM cobill, shipitem WHERE ((cobill_coitem_id=shipitem_orderitem_id) AND (shipitem_shiphead_id=pshipheadid) AND (cobill_coitem_id=_co.coitem_id)) FOR UPDATE LOOP IF (noNeg(_cobill.cobill_qty - _qtyToBill) = 0) THEN DELETE FROM cobill WHERE (cobill_id=_cobill.cobill_id); ELSE UPDATE cobill SET cobill_qty = noNeg(cobill_qty - _qtyToBill) WHERE (cobill_id=_cobill.cobill_id); END IF; _qtyToBill = _qtyToBill - _cobill.cobill_qty; EXIT WHEN (_qtyToBill <= 0.0); END LOOP; -- Check to see if all of the cobills have been deleted for this cobmisc IF (EXISTS(SELECT cobmisc_id FROM cobmisc JOIN cobill ON (cobill_cobmisc_id=cobmisc_id) WHERE (cobmisc_cohead_id=_shiphead.shiphead_order_id AND NOT cobmisc_posted))) THEN -- Lines exist, update the freight UPDATE cobmisc SET cobmisc_freight = (cobmisc_freight - _shiphead.shiphead_freight) WHERE (cobmisc_cohead_id=_shiphead.shiphead_order_id AND NOT cobmisc_posted); ELSE -- No lines exist, delete the cobmisc DELETE FROM cobmisc WHERE (cobmisc_cohead_id=_shiphead.shiphead_order_id AND NOT cobmisc_posted); END IF; -- Distribute to G/L, debit Shipping Asset, credit COS IF (_co.itemsite_controlmethod != 'N') THEN PERFORM insertGLTransaction( 'S/R', _shiphead.shiphead_order_type, _h.head_number::TEXT, 'Recall Shipment', CASE WHEN(COALESCE(_co.coitem_cos_accnt_id, -1) != -1) THEN getPrjAccntId(_h.prj_id, _co.coitem_cos_accnt_id) WHEN(_co.coitem_warranty = TRUE) THEN getPrjAccntId(_h.prj_id, resolveCOWAccount(itemsite_id, _h.cust_id, _h.saletype_id, _h.shipzone_id)) ELSE getPrjAccntId(_h.prj_id, resolveCOSAccount(itemsite_id, _h.cust_id, _h.saletype_id, _h.shipzone_id)) END, getPrjAccntId(_h.prj_id,costcat_shipasset_accnt_id), -1, _value, _timestamp::DATE ) FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_co.coitem_itemsite_id) ); END IF; END LOOP; -- Kit billing selection -- Set kit billing qty to zero since kits are shipped complete FOR _cobill IN SELECT cobill_id, cobill_qty FROM shipitem JOIN coitem sub ON (sub.coitem_id=shipitem_orderitem_id) JOIN coitem kit ON (kit.coitem_id <> sub.coitem_id AND kit.coitem_cohead_id = sub.coitem_cohead_id AND kit.coitem_linenumber = sub.coitem_linenumber AND kit.coitem_subnumber = 0) JOIN cobill ON (cobill_coitem_id=kit.coitem_id) WHERE (shipitem_shiphead_id=pshipheadid) AND (sub.coitem_subnumber > 0) GROUP BY cobill_id, cobill_qty LOOP UPDATE cobill SET cobill_qty = 0.0 WHERE (cobill_id=_cobill.cobill_id); END LOOP; ELSEIF (_shiphead.shiphead_order_type = 'TO') THEN SELECT * INTO _to FROM tohead WHERE (tohead_id=_shiphead.shiphead_order_id); IF (NOT FOUND) THEN RETURN -1; END IF; IF (_to.tohead_status = 'C') THEN RETURN -6; END IF; FOR _ti IN SELECT toitem_id, sis.itemsite_id AS src_itemsite_id, tis.itemsite_id AS trns_itemsite_id, scc.costcat_shipasset_accnt_id AS src_shipasset_accnt_id, tcc.costcat_asset_accnt_id AS trns_asset_accnt_id, itemcost(tis.itemsite_id) AS trns_cost, SUM(shipitem_qty) AS recall_qty FROM shipitem JOIN toitem ON (toitem_id=shipitem_orderitem_id) JOIN itemsite sis ON (sis.itemsite_item_id=toitem_item_id AND sis.itemsite_warehous_id=_to.tohead_src_warehous_id) JOIN itemsite tis ON (tis.itemsite_item_id=toitem_item_id AND tis.itemsite_warehous_id=_to.tohead_trns_warehous_id) JOIN costcat scc ON (scc.costcat_id=sis.itemsite_costcat_id) JOIN costcat tcc ON (tcc.costcat_id=tis.itemsite_costcat_id) WHERE (shipitem_shiphead_id=pshipheadid) GROUP BY toitem_id, sis.itemsite_id, tis.itemsite_id, scc.costcat_shipasset_accnt_id, tcc.costcat_asset_accnt_id LOOP _itemlocSeries := NEXTVAL('itemloc_series_seq'); SELECT postInvTrans(_ti.src_itemsite_id, 'TS', (_ti.recall_qty * -1.0), 'I/M', _shiphead.shiphead_order_type, formatToNumber(_ti.toitem_id), _to.tohead_number, 'Recall TO Shipment To Src Warehouse', _ti.trns_asset_accnt_id, _ti.src_shipasset_accnt_id, _itemlocSeries, _timestamp, (_ti.trns_cost * _ti.recall_qty * -1.0)) INTO _invhistid; IF (_invhistid < 0) THEN RETURN _invhistid; END IF; -- post the inventory history if lot/serial or location control PERFORM postItemlocseries(_itemlocSeries); -- record inventory history and qoh changes at transit warehouse but -- there is only one g/l account to touch SELECT postInvTrans(_ti.trns_itemsite_id, 'TR', (_ti.recall_qty * -1.0), 'I/M', _shiphead.shiphead_order_type, formatToNumber(_ti.toitem_id), _to.tohead_number, 'Recall TO Shipment From Transit Warehouse', _ti.trns_asset_accnt_id, _ti.trns_asset_accnt_id, _itemlocSeries, _timestamp, (_ti.trns_cost * _ti.recall_qty * -1.0)) INTO _invhistid; IF (_invhistid < 0) THEN RETURN _invhistid; END IF; -- post the inventory history if lot/serial or location control PERFORM postItemlocseries(_itemlocSeries); UPDATE toitem SET toitem_qty_shipped = (toitem_qty_shipped - _ti.recall_qty) WHERE (toitem_id=_ti.toitem_id); UPDATE shipitem SET shipitem_shipdate=NULL, shipitem_shipped=FALSE, shipitem_value=(shipitem_qty * _ti.trns_cost) WHERE ((shipitem_orderitem_id=_ti.toitem_id) AND (shipitem_shiphead_id=pshipheadid)); DELETE FROM recv WHERE ((recv_orderitem_id=_ti.toitem_id) AND (recv_order_type='TO') AND (NOT recv_posted)); END LOOP; END IF; UPDATE shiphead SET shiphead_shipped=FALSE WHERE (shiphead_id=pshipheadid); RETURN _itemlocSeries; END; $_$; HDROP FUNCTION public.recallshipment(integer, timestamp with time zone); publicadminfalse83992:12551683228recallwo(integer, boolean)FUNCTIONjCREATE FUNCTION recallwo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; recallChildren ALIAS FOR $2; returnCode INTEGER; BEGIN UPDATE wo SET wo_status='E' WHERE ((wo_status='R') AND (wo_id=pWoid)); IF (recallChildren) THEN returnCode := (SELECT MAX(recallWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); END IF; RETURN 0; END; $_$; 1DROP FUNCTION public.recallwo(integer, boolean); publicadminfalse83992;12551683229receipts(text)FUNCTION}CREATE FUNCTION receipts(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('RM', 'RB', 'RT', 'RP', 'RR', 'RX', 'TR')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; %DROP FUNCTION public.receipts(text); publicadminfalse83992<12551683230releaseapmemonumber(integer)FUNCTIONCREATE FUNCTION releaseapmemonumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('APMemoNumber', $1::INTEGER) > 0; $_$; 3DROP FUNCTION public.releaseapmemonumber(integer); publicadminfalse812551683231releasearmemonumber(integer)FUNCTIONCREATE FUNCTION releasearmemonumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. select releaseNumber('ARMemoNumber', $1::INTEGER) > 0; $_$; 3DROP FUNCTION public.releasearmemonumber(integer); publicadminfalse812551683232releasecashrcptnumber(integer)FUNCTIONCREATE FUNCTION releasecashrcptnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('CashRcptNumber', $1) > 0; $_$; 5DROP FUNCTION public.releasecashrcptnumber(integer); publicadminfalse8=12551683233releasecmnumber(integer)FUNCTIONCREATE FUNCTION releasecmnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('CmNumber', $1) > 0; $_$; /DROP FUNCTION public.releasecmnumber(integer); publicadminfalse8>12551683234releasecmnumber(text)FUNCTION CREATE FUNCTION releasecmnumber(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('CmNumber', $1::INTEGER) > 0; $_$; ,DROP FUNCTION public.releasecmnumber(text); publicadminfalse8?12551683235 releasecrmaccountnumber(integer)FUNCTIONCREATE FUNCTION releasecrmaccountnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('CRMAccountNumber', $1::INTEGER) > 0; $_$; 7DROP FUNCTION public.releasecrmaccountnumber(integer); publicadminfalse8@12551683236releaseincidentnumber(integer)FUNCTIONCREATE FUNCTION releaseincidentnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('IncidentNumber', $1) = 1; $_$; 5DROP FUNCTION public.releaseincidentnumber(integer); publicadminfalse8A12551683237releaseinvcnumber(integer)FUNCTION CREATE FUNCTION releaseinvcnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('InvcNumber', $1) > 0; $_$; 1DROP FUNCTION public.releaseinvcnumber(integer); publicadminfalse8B12551683238releaseinvcnumber(text)FUNCTIONCREATE FUNCTION releaseinvcnumber(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('InvcNumber', $1::INTEGER) > 0; $_$; .DROP FUNCTION public.releaseinvcnumber(text); publicadminfalse8C12551683239releasenumber(text, integer)FUNCTIONCREATE FUNCTION releasenumber(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE psequence ALIAS FOR $1; pnumber ALIAS FOR $2; BEGIN -- drop the number back into the pool if it was not committed PERFORM clearNumberIssue(psequence, pnumber); UPDATE orderseq SET orderseq_number = LEAST(pnumber, orderseq_number) WHERE (orderseq_name=psequence); RETURN 1; END; $_$; 3DROP FUNCTION public.releasenumber(text, integer); publicadminfalse83992D12551683240releaseponumber(integer)FUNCTIONCREATE FUNCTION releaseponumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('PoNumber', $1) > 0; $_$; /DROP FUNCTION public.releaseponumber(integer); publicadminfalse8E12551683241releaseponumber(text)FUNCTION CREATE FUNCTION releaseponumber(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('PoNumber', $1::INTEGER) > 0; $_$; ,DROP FUNCTION public.releaseponumber(text); publicadminfalse8F12551683242releaseprnumber(integer)FUNCTIONCREATE FUNCTION releaseprnumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('PrNumber', $1) > 0; $_$; /DROP FUNCTION public.releaseprnumber(integer); publicadminfalse8G12551683243releasepurchaseorder(integer)FUNCTIONCREATE FUNCTION releasepurchaseorder(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPoheadid ALIAS FOR $1; BEGIN IF ( ( SELECT (COUNT(*) = 0) FROM poitem WHERE ( (poitem_pohead_id=pPoheadid) AND (poitem_status='U') ) ) ) THEN RETURN -1; END IF; IF ( ( SELECT (pohead_status='U') FROM pohead WHERE (pohead_id=pPoheadid) ) ) THEN --update status and store the date that the order was released on UPDATE pohead SET pohead_status='O', pohead_released = current_date WHERE (pohead_id=pPoheadid); END IF; --update status and store the duedates at release UPDATE poitem SET poitem_status='O', poitem_rlsd_duedate = poitem_duedate WHERE (poitem_pohead_id=pPoheadid); RETURN 1; END; $_$; 4DROP FUNCTION public.releasepurchaseorder(integer); publicadminfalse83992`12551683244releasequnumber(integer)FUNCTIONCREATE FUNCTION releasequnumber(integer) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('QuNumber', $1); $_$; /DROP FUNCTION public.releasequnumber(integer); publicadminfalse8a12551683245releasequnumber(text)FUNCTIONCREATE FUNCTION releasequnumber(text) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('QuNumber', $1::INTEGER); $_$; ,DROP FUNCTION public.releasequnumber(text); publicadminfalse8H12551683246releaseshipmentnumber(integer)FUNCTIONCREATE FUNCTION releaseshipmentnumber(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _test INTEGER; BEGIN -- Check to see if a Shipment exists with the passed number SELECT shiphead_id INTO _test FROM shiphead WHERE (shiphead_number=pNumber); IF (FOUND) THEN RETURN FALSE; END IF; -- Check to see if ShipmentNumber orderseq has been incremented past the passed number SELECT orderseq_number INTO _test FROM orderseq WHERE (orderseq_name='ShipmentNumber'); IF ((_test - 1) <> pNumber) THEN RETURN FALSE; END IF; -- Decrement the orderseq, releasing the passed number UPDATE orderseq SET orderseq_number = (orderseq_number - 1) WHERE (orderseq_name='ShipmentNumber'); RETURN TRUE; END; $_$; 5DROP FUNCTION public.releaseshipmentnumber(integer); publicadminfalse83992I12551683247releasesohead(integer)FUNCTIONCREATE FUNCTION releasesohead(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; BEGIN DELETE FROM soheadlock WHERE ( (soheadlock_sohead_id=pSoheadid) AND (soheadlock_username=getEffectiveXtUser()) AND (soheadlock_procpid=pg_backend_pid()) ); RETURN TRUE; END; $_$; -DROP FUNCTION public.releasesohead(integer); publicadminfalse83992J12551683248releasesonumber(integer)FUNCTIONCREATE FUNCTION releasesonumber(integer) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('SoNumber', $1); $_$; /DROP FUNCTION public.releasesonumber(integer); publicadminfalse8K12551683249releasesonumber(text)FUNCTIONtCREATE FUNCTION releasesonumber(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (COALESCE($1, '') = '' OR $1 ~ '[^0-9]') THEN --do nothing; RETURN 1; ELSE RETURN releaseNumber('SoNumber', $1::INTEGER); END IF; END; $_$; ,DROP FUNCTION public.releasesonumber(text); publicadminfalse83992L12551683250#releaseunusedbillingheader(integer)FUNCTIONtCREATE FUNCTION releaseunusedbillingheader(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCobmiscid ALIAS FOR $1; _p RECORD; BEGIN IF ( ( SELECT cobmisc_posted FROM cobmisc WHERE (cobmisc_id=pCobmiscid) ) ) THEN RETURN -1; END IF; SELECT cobill_id INTO _p FROM cobill WHERE (cobill_cobmisc_id=pCobmiscid) LIMIT 1; IF (FOUND) THEN RETURN -2; END IF; DELETE FROM cobmisc WHERE (cobmisc_id=pCobmiscid); RETURN 0; END; $_$; :DROP FUNCTION public.releaseunusedbillingheader(integer); publicadminfalse83992M12551683251releasevonumber(integer)FUNCTIONCREATE FUNCTION releasevonumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('VcNumber', $1) > 0; $_$; /DROP FUNCTION public.releasevonumber(integer); publicadminfalse8N12551683252releasewo(integer, boolean)FUNCTIONlCREATE FUNCTION releasewo(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; releaseChildren ALIAS FOR $2; returnCode INTEGER; BEGIN UPDATE wo SET wo_status='R' WHERE ((wo_status='E') AND (wo_id=pWoid)); IF (releaseChildren) THEN returnCode := (SELECT MAX(releaseWo(wo_id, TRUE)) FROM wo WHERE ((wo_ordtype='W') AND (wo_ordid=pWoid))); END IF; RETURN 0; END; $_$; 2DROP FUNCTION public.releasewo(integer, boolean); publicadminfalse83992O12551683253releasewonumber(integer)FUNCTIONCREATE FUNCTION releasewonumber(integer) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT releaseNumber('WoNumber', $1) > 0; $_$; /DROP FUNCTION public.releasewonumber(integer); publicadminfalse8P12551683254;relocateinventory(integer, integer, integer, numeric, text)FUNCTIONOCREATE FUNCTION relocateinventory(integer, integer, integer, numeric, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN relocateInventory($1, $2, $3, $4, $5, CURRENT_TIMESTAMP); END; $_$; RDROP FUNCTION public.relocateinventory(integer, integer, integer, numeric, text); publicadminfalse8399212551683255Urelocateinventory(integer, integer, integer, numeric, text, timestamp with time zone)FUNCTIONCREATE FUNCTION relocateinventory(integer, integer, integer, numeric, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSourceItemlocid ALIAS FOR $1; pTargetLocationid ALIAS FOR $2; pItemsiteid ALIAS FOR $3; pQty ALIAS FOR $4; pComments ALIAS FOR $5; _GlDistTS TIMESTAMP WITH TIME ZONE := $6; _targetItemlocid INTEGER; _invhistid INTEGER; _p RECORD; _qty NUMERIC; _itemlocSeries INTEGER := NEXTVAL('itemloc_series_seq'); BEGIN IF ((_GlDistTS IS NULL) OR (CAST(_GlDistTS AS date)=CURRENT_DATE)) THEN _GlDistTS := CURRENT_TIMESTAMP; END IF; -- Make sure the passed itemsite points to a real item IF ( ( SELECT (item_type IN ('R', 'F') OR itemsite_costmethod = 'J') FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; -- Cache some parameters SELECT itemloc_ls_id, itemloc_itemsite_id AS itemsiteid, itemloc_expiration, itemloc_warrpurc, itemloc_qty, sourceloc.location_netable AS sourcenet, targetloc.location_netable AS targetnet INTO _p FROM itemloc, location AS sourceloc, location AS targetloc WHERE ( (itemloc_location_id=sourceloc.location_id) AND (targetloc.location_id=pTargetLocationid) AND (itemloc_id=pSourceItemlocid) ); -- Check to make sure the qty being transfered exists IF (_p.itemloc_qty < pQty) THEN RETURN -1; END IF; -- Create the RL transaction SELECT NEXTVAL('invhist_invhist_id_seq') INTO _invhistid; INSERT INTO invhist ( invhist_id, invhist_itemsite_id, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_comments, invhist_transdate, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series) SELECT _invhistid, itemsite_id, 'RL', 0, itemsite_qtyonhand, itemsite_qtyonhand, pComments, _GlDistTS, uom_name, CASE WHEN (itemsite_costmethod='A') THEN avgcost(itemsite_id) ELSE stdCost(item_id) END, itemsite_costmethod, itemsite_value, itemsite_value, _itemlocSeries FROM item, itemsite, uom WHERE ((itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=pItemsiteid)); -- Relocate the inventory from the source and record the transactions INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc ) SELECT _invhistid, itemloc_location_id, itemloc_ls_id, (pQty * -1), itemloc_qty, (itemloc_qty - pQty), itemloc_expiration, itemloc_warrpurc FROM itemloc WHERE (itemloc_id=pSourceItemlocid); UPDATE itemloc SET itemloc_qty=(itemloc_qty - pQty) FROM itemsite WHERE ( (itemloc_itemsite_id=itemsite_id) AND (NOT itemsite_freeze) AND (itemloc_id=pSourceItemlocid) ); -- Check to see if there is anything left at the source Itemloc and delete if not DELETE FROM itemloc WHERE ( (itemloc_qty=0) AND (itemloc_id=pSourceItemlocid) ); -- Check to see if any of the current Lot/Serial #/Expiration exists at the target location SELECT itemloc_id INTO _targetItemlocid FROM itemloc WHERE ( (COALESCE(itemloc_ls_id, -1)=COALESCE(_p.itemloc_ls_id,-1)) AND (COALESCE(itemloc_expiration,endOfTime())=COALESCE(_p.itemloc_expiration,endOfTime())) AND (COALESCE(itemloc_warrpurc,endOfTime())=COALESCE(_p.itemloc_warrpurc,endOfTime())) AND (itemloc_itemsite_id=pItemsiteid) AND (itemloc_location_id=pTargetLocationid) ); IF (NOT FOUND) THEN SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _targetItemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_ls_id, itemloc_expiration, itemloc_warrpurc, itemloc_qty ) VALUES ( _targetItemlocid, pItemsiteid, pTargetLocationid, _p.itemloc_ls_id, _p.itemloc_expiration, _p.itemloc_warrpurc, 0 ); END IF; -- Relocate the inventory to the resultant target and record the transactions INSERT INTO invdetail ( invdetail_invhist_id, invdetail_location_id, invdetail_ls_id, invdetail_qty, invdetail_qty_before, invdetail_qty_after, invdetail_expiration, invdetail_warrpurc ) SELECT _invhistid, pTargetLocationid, _p.itemloc_ls_id, pQty, itemloc_qty, (itemloc_qty + pQty), _p.itemloc_expiration, _p.itemloc_warrpurc FROM itemloc WHERE (itemloc_id=_targetItemlocid); UPDATE itemloc SET itemloc_qty=(itemloc_qty + pQty) FROM itemsite WHERE ( (itemloc_itemsite_id=itemsite_id) AND (NOT itemsite_freeze) AND (itemloc_id=_targetItemlocid) ); UPDATE invhist SET invhist_hasdetail=TRUE WHERE (invhist_id=_invhistid); -- Post in incomming or outgoing NN transaction if required IF (_p.sourcenet <> _p.targetnet) THEN IF (_p.targetnet) THEN _qty = (pQty * -1); ELSE _qty = pQty; END IF; INSERT INTO invhist ( invhist_itemsite_id, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_docnumber, invhist_comments, invhist_transdate, invhist_invuom, invhist_unitcost, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series) SELECT itemsite_id, 'NN', (_qty * -1), itemsite_qtyonhand, (itemsite_qtyonhand - _qty), '', '', _GlDistTS, uom_name, CASE WHEN (itemsite_costmethod='A') THEN avgcost(itemsite_id) ELSE stdCost(item_id) END, itemsite_costmethod, itemsite_value, itemsite_value, _itemlocSeries FROM item, itemsite, uom WHERE ( (itemsite_item_id=item_id) ANd (item_inv_uom_id=uom_id) AND (itemsite_controlmethod <> 'N') AND (itemsite_id=_p.itemsiteid) ); UPDATE itemsite SET itemsite_qtyonhand = (itemsite_qtyonhand - _qty), itemsite_nnqoh = (itemsite_nnqoh + _qty) WHERE (itemsite_id=_p.itemsiteid); END IF; -- Check to see if there is anything left at the target Itemloc and delete if not -- Could be zero if relocate increased a negative quantity to zero DELETE FROM itemloc WHERE ( (itemloc_qty=0) AND (itemloc_id=_targetItemlocid) ); -- Return the invhist_id RETURN _invhistid; END; $_$; lDROP FUNCTION public.relocateinventory(integer, integer, integer, numeric, text, timestamp with time zone); publicadminfalse83992Q12551683257&reorderdate(integer, integer, boolean)FUNCTIONOCREATE FUNCTION reorderdate(integer, integer, boolean) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pLookAhead ALIAS FOR $2; pIncludePlanned ALIAS FOR $3; _runningAvailability NUMERIC; _reorderLevel NUMERIC; _availability RECORD; BEGIN -- Make sure that we know how to handle the passed part IF ( SELECT (NOT (item_type IN ('M', 'P'))) FROM item, itemsite WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) THEN RETURN NULL; END IF; -- Load the initial QOH SELECT itemsite_qtyonhand INTO _runningAvailability FROM itemsite WHERE (itemsite_id=pItemsiteid); -- Grab the Reorder Level, if any IF ( ( SELECT itemsite_useparams FROM itemsite WHERE (itemsite_id=pItemsiteid) ) ) THEN SELECT itemsite_reorderlevel INTO _reorderLevel FROM itemsite WHERE (itemsite_id=pItemsiteid); ELSE _reorderLevel := 0; END IF; -- If we are already below the Reorder Level then we should order ASAP IF (_runningAvailability <= _reorderLevel) THEN RETURN CURRENT_DATE; END IF; -- Grab all of the availability trigger points FOR _availability IN SELECT 1 AS seq, wo_duedate AS orderdate, (noNeg(wo_qtyord - wo_qtyrcv)) AS balance FROM wo WHERE ((wo_status IN ('O', 'E', 'R', 'I')) AND (wo_duedate <= (CURRENT_DATE + pLookAhead)) AND (wo_itemsite_id=pItemsiteid)) UNION SELECT 2 AS seq, womatl_duedate AS orderdate, (noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq - womatl_qtyiss)) * -1) AS balance FROM womatl, wo, itemsite WHERE ((wo_status IN ('O', 'E', 'R', 'I')) AND (womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_duedate <= (CURRENT_DATE + pLookahead)) AND (womatl_itemsite_id=pItemsiteid)) UNION SELECT 1 AS seq, poitem_duedate AS orderdate, (noNeg(poitem_qty_ordered - poitem_qty_received) * poitem_invvenduomratio) AS balance FROM pohead, poitem WHERE ((poitem_pohead_id=pohead_id) AND (poitem_status = 'O') AND (poitem_duedate <= (CURRENT_DATE + pLookAhead)) AND (poitem_itemsite_id=pItemsiteid)) UNION SELECT 2 AS seq, coitem_scheddate AS orderdate, (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * -1) AS balance FROM coitem, cohead WHERE ((coitem_status = 'O') AND (coitem_cohead_id=cohead_id) AND (coitem_scheddate <= (CURRENT_DATE + pLookAhead)) AND (coitem_itemsite_id=pItemsiteid)) UNION SELECT 2 AS seq, planord_startdate AS orderdate, (planreq_qty * -1) AS balance FROM planreq, planord WHERE ( (pIncludePlanned) AND (planreq_source='P') AND (planreq_source_id=planord_id) AND (planord_startdate <= (CURRENT_DATE + pLookAhead)) AND (planord_itemsite_id=pItemsiteid) ) UNION SELECT 1 AS seq, planord_duedate AS orderdate, planord_qty AS balance FROM planord WHERE ( (pIncludePlanned) AND (planord_duedate <= (CURRENT_DATE + pLookAhead)) AND (planord_itemsite_id=pItemsiteid) ) ORDER BY orderdate, seq LOOP -- Calculate the new projected availability _runningAvailability := (_runningAvailability + _availability.balance); -- Check to see if the project availability drop below the reorder level IF (_runningAvailability < _reorderLevel) THEN RETURN _availability.orderdate; END IF; END LOOP; -- The reorder level was not reached within the look ahead period RETURN NULL; END; $_$; =DROP FUNCTION public.reorderdate(integer, integer, boolean); publicadminfalse83992R12551683258!replaceallvoidedapchecks(integer)FUNCTIONyCREATE FUNCTION replaceallvoidedapchecks(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'replaceAllVoidedAPChecks() is deprecated - use replaceAllVoidedChecks() instead'; RETURN replaceAllVoidedChecks($1); END; $_$; 8DROP FUNCTION public.replaceallvoidedapchecks(integer); publicadminfalse83992T12551683259replaceallvoidedchecks(integer)FUNCTIONSCREATE FUNCTION replaceallvoidedchecks(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; _returnValue INTEGER := 0; BEGIN SELECT MIN(replaceVoidedCheck(checkhead_id)) INTO _returnValue FROM checkhead WHERE ( (checkhead_void) AND (NOT checkhead_posted) AND (NOT checkhead_replaced) AND (NOT checkhead_deleted) AND (checkhead_bankaccnt_id=pBankaccntid) ); RETURN _returnValue; END; $_$; 6DROP FUNCTION public.replaceallvoidedchecks(integer); publicadminfalse83992U12551683260replacevoidedapcheck(integer)FUNCTIONaCREATE FUNCTION replacevoidedapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'replaceVoidedAPCheck() is deprecated - use replaceVoidedCheck()'; RETURN replaceVoidedCheck($1); END; $_$; 4DROP FUNCTION public.replacevoidedapcheck(integer); publicadminfalse83992V12551683261replacevoidedcheck(integer)FUNCTION, CREATE FUNCTION replacevoidedcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; _newCheckid INTEGER; BEGIN IF ( ( SELECT ( (NOT checkhead_void) OR checkhead_posted OR checkhead_replaced ) FROM checkhead WHERE (checkhead_id=pCheckid) ) ) THEN RETURN -1; END IF; -- has someone created a new check for one of the items while this was void? IF EXISTS (SELECT dup.checkitem_id FROM checkitem orig, checkitem dup, checkhead AS duphead WHERE ((COALESCE(orig.checkitem_aropen_id,-1)=COALESCE(dup.checkitem_aropen_id,-1)) AND (COALESCE(orig.checkitem_apopen_id,-1)=COALESCE(dup.checkitem_apopen_id,-1)) AND (orig.checkitem_checkhead_id!=dup.checkitem_checkhead_id) AND (dup.checkitem_checkhead_id=duphead.checkhead_id) AND (NOT duphead.checkhead_void) AND (orig.checkitem_checkhead_id=pCheckid))) THEN RETURN -2; END IF; SELECT NEXTVAL('checkhead_checkhead_id_seq') INTO _newCheckid; INSERT INTO checkhead ( checkhead_id, checkhead_recip_id, checkhead_recip_type, checkhead_bankaccnt_id, checkhead_checkdate, checkhead_number, checkhead_amount, checkhead_for, checkhead_journalnumber, checkhead_notes, checkhead_misc, checkhead_expcat_id, checkhead_curr_id ) SELECT _newCheckid, checkhead_recip_id, checkhead_recip_type, checkhead_bankaccnt_id, checkhead_checkdate, -1, -- fetchNextCheckNumber(checkhead_bankaccnt_id), checkhead_amount, checkhead_for, checkhead_journalnumber, checkhead_notes || ' Replaces voided check ' || checkhead_number, checkhead_misc, checkhead_expcat_id, checkhead_curr_id FROM checkhead WHERE (checkhead_id=pCheckid); INSERT INTO checkitem ( checkitem_checkhead_id, checkitem_amount, checkitem_discount, checkitem_ponumber, checkitem_vouchernumber, checkitem_invcnumber, checkitem_apopen_id, checkitem_aropen_id, checkitem_docdate, checkitem_curr_id, checkitem_curr_rate ) SELECT _newCheckid, checkitem_amount, checkitem_discount, checkitem_ponumber, checkitem_vouchernumber, checkitem_invcnumber, checkitem_apopen_id, checkitem_aropen_id, checkitem_docdate, checkitem_curr_id, checkitem_curr_rate FROM checkitem WHERE (checkitem_checkhead_id=pCheckid); UPDATE checkhead SET checkhead_replaced=TRUE WHERE (checkhead_id=pCheckid); RETURN _newCheckid; END; $_$; 2DROP FUNCTION public.replacevoidedcheck(integer); publicadminfalse83992W12551683262)reprioritizewo(integer, integer, boolean)FUNCTIONRCREATE FUNCTION reprioritizewo(integer, integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; pPriority ALIAS FOR $2; pChangeChildren ALIAS FOR $3; _status CHAR(1); _result INTEGER; BEGIN SELECT wo_status INTO _status FROM wo WHERE (wo_id=pWoid); IF (NOT (_status IN ('O', 'E','R','I'))) THEN return -1; END IF; UPDATE wo SET wo_priority=pPriority WHERE (wo_id=pWoid); IF ( (_status IN ('E','R','I')) AND (pChangeChildren) ) THEN SELECT COALESCE(MIN(reprioritizeWo(wo_id, pPriority, TRUE)), 1) INTO _result FROM wo WHERE ( (wo_ordtype='W') AND (wo_ordid=pWoid) ); ELSE _result = 1; END IF; RETURN _result; END; $_$; @DROP FUNCTION public.reprioritizewo(integer, integer, boolean); publicadminfalse83992X12551683263resetdbobjperms(text)FUNCTIONCREATE FUNCTION resetdbobjperms(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pObjname ALIAS FOR $1; BEGIN EXECUTE 'ALTER TABLE ' || pObjname || ' OWNER TO ' || getEffectiveXtUser() || ';'; EXECUTE 'REVOKE ALL ON ' || pObjname || ' FROM PUBLIC;'; EXECUTE 'GRANT ALL ON ' || pObjname || ' TO GROUP xtrole;'; RETURN 1; END; $_$; ,DROP FUNCTION public.resetdbobjperms(text); publicadminfalse83992Y12551683264resetdbobjperms()FUNCTIONCREATE FUNCTION resetdbobjperms() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _count INTEGER := 0; BEGIN SELECT SUM(resetDBObjPerms(nspname || '.' || relname)) INTO _count FROM pg_catalog.pg_class, pg_catalog.pg_namespace WHERE (relkind IN ('r', 'S', 'v') AND (relnamespace=pg_namespace.oid) AND (nspname IN ('public', 'api'))); RETURN _count; END; $$; (DROP FUNCTION public.resetdbobjperms(); publicadminfalse83992Z12551683265resetlowlevelcode(integer)FUNCTIONCREATE FUNCTION resetlowlevelcode(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; _result INTEGER; _counterNum INTEGER := 1; _feedBackNum INTEGER := 1; _r RECORD; BEGIN DELETE FROM costUpdate; IF pItemId = -1 THEN -- -1 is an invalid item_id => do them all INSERT INTO costUpdate ( costUpdate_item_id, costUpdate_item_type ) SELECT item_id, item_type FROM item; -- Recalculate the Item Lowlevel codes WHILE _feedBackNum > 0 LOOP SELECT updateLowlevel(_counterNum) INTO _feedBackNum; _counterNum := _counterNum + 1; END LOOP; ELSE INSERT INTO costUpdate ( costUpdate_item_id, costUpdate_item_type ) SELECT item_id, item_type FROM item WHERE (item_id=pItemId); FOR _r IN SELECT item_id, bomdata_bomwork_level, item_type FROM item, indentedBOM(pItemId, getActiveRevId('BOM',pItemId),0,0) WHERE (bomdata_item_id=item_id) ORDER BY bomdata_bomwork_level LOOP -- this only works because of the ORDER BY in the loop SELECT UPDATE costUpdate SET costupdate_lowlevel_code = _r.bomdata_bomwork_level WHERE (costupdate_item_id=_r.item_id); IF (NOT FOUND) THEN INSERT INTO costUpdate ( costUpdate_item_id, costUpdate_lowlevel_code, costUpdate_item_type ) VALUES ( _r.item_id, _r.bomdata_bomwork_level, _r.item_type ); END IF; END LOOP; END IF; SELECT count(*) INTO _result FROM costUpdate; RETURN _result; END; $_$; 1DROP FUNCTION public.resetlowlevelcode(integer); publicadminfalse83992[12551683266resetqohbalance(integer)FUNCTIONCREATE FUNCTION resetqohbalance(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resetQOHBalance($1, CURRENT_TIMESTAMP); END; $_$; /DROP FUNCTION public.resetqohbalance(integer); publicadminfalse83992]125516832672resetqohbalance(integer, timestamp with time zone)FUNCTIONCREATE FUNCTION resetqohbalance(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pGlDistTS ALIAS FOR $2; _invhistid INTEGER; _itemlocSeries INTEGER; BEGIN IF ( ( SELECT ( (itemsite_controlmethod IN ('L', 'S')) OR (item_type = 'R') OR (itemsite_costmethod = 'J') OR (itemsite_loccntrl) OR (itemsite_qtyonhand > 0) ) FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ) ) ) THEN RETURN 0; END IF; _itemlocSeries := NEXTVAL('itemloc_series_seq'); SELECT postInvTrans( itemsite_id, 'AD', (itemsite_qtyonhand * -1), 'I/M', '', '', 'RESET', 'Reset QOH Balance to 0', costcat_asset_accnt_id, costcat_adjustment_accnt_id, _itemlocSeries, pGlDistTS ) INTO _invhistid FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=pItemsiteid) ); PERFORM postItemLocSeries(_itemlocSeries); RETURN _invhistid; END; $_$; IDROP FUNCTION public.resetqohbalance(integer, timestamp with time zone); publicadminfalse83992^12551683268#resolvecosaccount(integer, integer)FUNCTION)CREATE FUNCTION resolvecosaccount(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resolveCOSAccount($1, $2, -1, -1); END; $_$; :DROP FUNCTION public.resolvecosaccount(integer, integer); publicadminfalse83992125517450685resolvecosaccount(integer, integer, integer, integer)FUNCTIONCREATE FUNCTION resolvecosaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql STABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _salesaccntid INTEGER; _accntid INTEGER; BEGIN SELECT findSalesAccnt(pItemsiteid, 'IS', pCustid, pSaletypeid, pShipzoneid) INTO _salesaccntid; IF (_salesaccntid = -1) THEN SELECT getUnassignedAccntId() INTO _accntid; ELSE SELECT salesaccnt_cos_accnt_id INTO _accntid FROM salesaccnt WHERE (salesaccnt_id=_salesaccntid); END IF; RETURN _accntid; END; $$; xDROP FUNCTION public.resolvecosaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer); publicadminfalse83992_12551683269#resolvecowaccount(integer, integer)FUNCTION)CREATE FUNCTION resolvecowaccount(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resolveCOWAccount($1, $2, -1, -1); END; $_$; :DROP FUNCTION public.resolvecowaccount(integer, integer); publicadminfalse83992`125517450695resolvecowaccount(integer, integer, integer, integer)FUNCTIONCREATE FUNCTION resolvecowaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _salesaccntid INTEGER; _accntid INTEGER; BEGIN SELECT findSalesAccnt(pItemsiteid, 'IS', pCustid, pSaletypeid, pShipzoneid) INTO _salesaccntid; IF (_salesaccntid = -1) THEN SELECT getUnassignedAccntId() INTO _accntid; ELSE SELECT salesaccnt_cow_accnt_id INTO _accntid FROM salesaccnt WHERE (salesaccnt_id=_salesaccntid); END IF; RETURN _accntid; END; $$; xDROP FUNCTION public.resolvecowaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer); publicadminfalse83992a12551683270&resolvecreditaccount(integer, integer)FUNCTION/CREATE FUNCTION resolvecreditaccount(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resolveCreditAccount($1, $2, -1, -1); END; $_$; =DROP FUNCTION public.resolvecreditaccount(integer, integer); publicadminfalse83992b125517450708resolvecreditaccount(integer, integer, integer, integer)FUNCTIONCREATE FUNCTION resolvecreditaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _salesaccntid INTEGER; _accntid INTEGER; BEGIN SELECT findSalesAccnt(pItemsiteid, 'IS', pCustid, pSaletypeid, pShipzoneid) INTO _salesaccntid; IF (_salesaccntid = -1) THEN SELECT getUnassignedAccntId() INTO _accntid; ELSE SELECT salesaccnt_credit_accnt_id INTO _accntid FROM salesaccnt WHERE (salesaccnt_id=_salesaccntid); END IF; RETURN _accntid; END; $$; {DROP FUNCTION public.resolvecreditaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer); publicadminfalse83992c12551683271%resolvesalesaccount(integer, integer)FUNCTION-CREATE FUNCTION resolvesalesaccount(integer, integer) RETURNS integer LANGUAGE plpgsql STABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN resolveSalesAccount($1, $2, -1, -1); END; $_$; <DROP FUNCTION public.resolvesalesaccount(integer, integer); publicadminfalse83992d125517450717resolvesalesaccount(integer, integer, integer, integer)FUNCTIONCREATE FUNCTION resolvesalesaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _salesaccntid INTEGER; _accntid INTEGER; BEGIN SELECT findSalesAccnt(pItemsiteid, 'IS', pCustid, pSaletypeid, pShipzoneid) INTO _salesaccntid; IF (_salesaccntid = -1) THEN SELECT getUnassignedAccntId() INTO _accntid; ELSE SELECT salesaccnt_sales_accnt_id INTO _accntid FROM salesaccnt WHERE (salesaccnt_id=_salesaccntid); END IF; RETURN _accntid; END; $$; zDROP FUNCTION public.resolvesalesaccount(pitemsiteid integer, pcustid integer, psaletypeid integer, pshipzoneid integer); publicadminfalse83992e12551683272restoresaleshistory(integer)FUNCTIONCREATE FUNCTION restoresaleshistory(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAsohistid ALIAS FOR $1; BEGIN INSERT INTO cohist ( cohist_id, cohist_cust_id, cohist_itemsite_id, cohist_shipdate, cohist_invcdate, cohist_duedate, cohist_promisedate, cohist_ordernumber, cohist_invcnumber, cohist_qtyshipped, cohist_unitprice, cohist_unitcost, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_shipto_id, cohist_shipvia, cohist_salesrep_id, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_commission, cohist_commissionpaid, cohist_doctype, cohist_orderdate, cohist_imported, cohist_ponumber, cohist_curr_id, cohist_taxtype_id, cohist_taxzone_id ) SELECT asohist_id, CASE asohist_cust_id WHEN -1 THEN NULL ELSE asohist_cust_id END, asohist_itemsite_id, asohist_shipdate, asohist_invcdate, asohist_duedate, asohist_promisedate, asohist_ordernumber, asohist_invcnumber, asohist_qtyshipped, asohist_unitprice, asohist_unitcost, asohist_billtoname, asohist_billtoaddress1, asohist_billtoaddress2, asohist_billtoaddress3, asohist_billtocity, asohist_billtostate, asohist_billtozip, asohist_shiptoname, asohist_shiptoaddress1, asohist_shiptoaddress2, asohist_shiptoaddress3, asohist_shiptocity, asohist_shiptostate, asohist_shiptozip, asohist_shipto_id, asohist_shipvia, CASE asohist_salesrep_id WHEN -1 THEN NULL ELSE asohist_salesrep_id END, asohist_misc_type, asohist_misc_descrip, asohist_misc_id, asohist_commission, asohist_commissionpaid, asohist_doctype, asohist_orderdate, asohist_imported, asohist_ponumber, asohist_curr_id, asohist_taxtype_id, asohist_taxzone_id FROM asohist WHERE (asohist_id=pAsohistid); INSERT INTO cohisttax ( taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber ) SELECT taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber FROM asohisttax WHERE (taxhist_parent_id=pAsohistid); DELETE FROM asohisttax WHERE (taxhist_parent_id=pAsohistid); DELETE FROM asohist WHERE (asohist_id=pAsohistid); RETURN pAsohistid; END; $_$; 3DROP FUNCTION public.restoresaleshistory(integer); publicadminfalse8399212551683273returncompleteshipment(integer)FUNCTION+CREATE FUNCTION returncompleteshipment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnCompleteShipment($1, 0, CURRENT_TIMESTAMP); END; $_$; 6DROP FUNCTION public.returncompleteshipment(integer); publicadminfalse83992h12551683274Breturncompleteshipment(integer, integer, timestamp with time zone)FUNCTIONKCREATE FUNCTION returncompleteshipment(integer, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pshipheadid ALIAS FOR $1; _itemlocSeries INTEGER := $2; _timestamp TIMESTAMP WITH TIME ZONE := $3; _r RECORD; _result RECORD; _shiphead_number TEXT := ''; _count INTEGER := 0; _countsum INTEGER := 0; BEGIN FOR _r IN SELECT shipitem_id FROM shipitem, shiphead WHERE ( (shipitem_shiphead_id=shiphead_id) AND (NOT shiphead_shipped) AND (shiphead_id=pshipheadid) ) LOOP _itemlocSeries := returnShipmentTransaction(_r.shipitem_id, _itemlocSeries, _timestamp); END LOOP; FOR _result IN SELECT shiphead_number FROM shiphead WHERE ( (shiphead_id=pshipheadid) ) LOOP _shiphead_number := _result.shiphead_number; END LOOP; SELECT COUNT(*) INTO _count FROM shipdata WHERE(shipdata_shiphead_number=_shiphead_number); SELECT COUNT(*) INTO _countsum FROM shipdatasum WHERE(shipdatasum_shiphead_number=_shiphead_number); IF (_count > 0) THEN DELETE FROM shipdata WHERE(shipdata_shiphead_number=_shiphead_number); END IF; IF (_countsum > 0) THEN DELETE FROM shipdatasum WHERE(shipdatasum_shiphead_number=_shiphead_number); END IF; DELETE FROM pack WHERE(pack_shiphead_id=pshipheadid); DELETE FROM shiphead WHERE (shiphead_id=pshipheadid); RETURN _itemlocSeries; END; $_$; YDROP FUNCTION public.returncompleteshipment(integer, integer, timestamp with time zone); publicadminfalse83992i12551683275%returnitemshipments(integer, integer)FUNCTION5CREATE FUNCTION returnitemshipments(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnItemShipments('SO', $1, $2, CURRENT_TIMESTAMP); END; $_$; <DROP FUNCTION public.returnitemshipments(integer, integer); publicadminfalse83992v12551683276returnitemshipments(integer)FUNCTION+CREATE FUNCTION returnitemshipments(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnItemShipments('SO', $1, 0, CURRENT_TIMESTAMP); END; $_$; 3DROP FUNCTION public.returnitemshipments(integer); publicadminfalse83992j12551683277Ereturnitemshipments(text, integer, integer, timestamp with time zone)FUNCTIONCREATE FUNCTION returnitemshipments(text, integer, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; pitemid ALIAS FOR $2; _itemlocSeries INTEGER := $3; _timestamp TIMESTAMP WITH TIME ZONE := $4; _invhistid INTEGER; _r RECORD; BEGIN IF (COALESCE(_itemlocSeries,0) = 0 ) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); END IF; FOR _r IN SELECT shipitem_id FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) WHERE ((NOT shiphead_shipped) AND (shiphead_order_type=pordertype) AND (shipitem_orderitem_id=pitemid)) LOOP SELECT returnShipmentTransaction(_r.shipitem_id, _itemlocSeries, _timestamp) INTO _itemlocSeries; IF (_itemlocSeries < 0) THEN RETURN _itemlocSeries; END IF; END LOOP; RETURN _itemlocSeries; END; $_$; \DROP FUNCTION public.returnitemshipments(text, integer, integer, timestamp with time zone); publicadminfalse8399212551683278"returnshipmenttransaction(integer)FUNCTION1CREATE FUNCTION returnshipmenttransaction(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnShipmentTransaction($1, 0, CURRENT_TIMESTAMP); END; $_$; 9DROP FUNCTION public.returnshipmenttransaction(integer); publicadminfalse8399212551683279+returnshipmenttransaction(integer, integer)FUNCTION;CREATE FUNCTION returnshipmenttransaction(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN returnShipmentTransaction($1, $2, CURRENT_TIMESTAMP); END; $_$; BDROP FUNCTION public.returnshipmenttransaction(integer, integer); publicadminfalse8399212551683280Ereturnshipmenttransaction(integer, integer, timestamp with time zone)FUNCTION$CREATE FUNCTION returnshipmenttransaction(integer, integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipitemId ALIAS FOR $1; pItemlocSeries ALIAS FOR $2; pTimestamp ALIAS FOR $3; _itemlocSeries INTEGER; _invhistid INTEGER; _itemlocrsrvid INTEGER; _coheadid INTEGER; _rows INTEGER; _r RECORD; _rsrv RECORD; BEGIN IF (COALESCE(pItemlocSeries, 0) = 0 ) THEN _itemlocSeries := NEXTVAL('itemloc_series_seq'); ELSE _itemlocSeries := pItemlocSeries; END IF; -- Find the shipment transaction record SELECT shipitem.*, shiphead_id, shiphead_number, shiphead_order_type, invhist_series, itemsite_loccntrl, itemsite_costmethod, itemsite_controlmethod, cohead_prj_id AS prj_id INTO _r FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) JOIN invhist ON (invhist_id=shipitem_invhist_id) JOIN itemsite ON (itemsite_id=invhist_itemsite_id) LEFT OUTER JOIN cohead ON ((shiphead_order_type = 'SO') AND (shiphead_order_id = cohead_id)) WHERE ((NOT shiphead_shipped) AND (shipitem_id=pShipitemId)); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0 ) THEN -- Was it a non-controlled sales order item? SELECT shipitem.*, shiphead_id, shiphead_number, shiphead_order_type, itemsite_loccntrl, itemsite_costmethod, itemsite_controlmethod, cohead_prj_id AS prj_id INTO _r FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) JOIN coitem ON (shipitem_orderitem_id=coitem_id) JOIN cohead ON (cohead_id=coitem_cohead_id) JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE ((NOT shiphead_shipped) AND (shipitem_id=pShipitemId) AND (shiphead_order_type = 'SO')); END IF; GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0 AND fetchmetricbool('MultiWhs') ) THEN -- Was it a non-controlled transfer order item? SELECT shipitem.*, shiphead_id, shiphead_number, shiphead_order_type, itemsite_loccntrl, itemsite_costmethod, itemsite_controlmethod, NULL AS prj_id INTO _r FROM shipitem JOIN shiphead ON (shiphead_id=shipitem_shiphead_id) JOIN toitem ON (shipitem_orderitem_id=toitem_id) JOIN itemsite ON (itemsite_id=coitem_itemsite_id) WHERE ((NOT shiphead_shipped) AND (shipitem_id=pShipitemId) AND (shiphead_order_type = 'TO')); END IF; IF (_rows > 0 ) THEN IF (_r.shiphead_order_type = 'SO') THEN -- Handle inventory transaction IF (_r.itemsite_controlmethod != 'N' OR _r.itemsite_costmethod = 'J') THEN SELECT postInvTrans( itemsite_id, 'RS', (_r.shipitem_qty * coitem_qty_invuomratio), 'S/R', _r.shiphead_order_type, formatSoNumber(_r.shipitem_orderitem_id), shiphead_number, 'Return from Shipping', costcat_asset_accnt_id, getPrjAccntId(_r.prj_id, costcat_shipasset_accnt_id), _itemlocSeries, pTimestamp, _r.shipitem_value, _r.shipitem_invhist_id ) INTO _invhistid FROM coitem, itemsite, costcat, shiphead, shipitem WHERE ((coitem_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (coitem_id=_r.shipitem_orderitem_id) AND (shiphead_order_type=_r.shiphead_order_type) AND (shiphead_id=shipitem_shiphead_id) AND (shipitem_orderitem_id=_r.shipitem_orderitem_id)); -- We know the distribution so post this through so the any w/o activity knows about it PERFORM postItemlocseries(_itemlocSeries); END IF; IF (_r.itemsite_costmethod = 'J') THEN -- Reopen the work order UPDATE wo SET wo_status = 'I' WHERE ((wo_ordtype='S') AND (wo_ordid=_r.shipitem_orderitem_id)); -- Job cost, so correct Production Posting referencing original receipt for reverse info. PERFORM correctProduction(wo_id, invhist_invqty, false, _itemlocSeries, pTimestamp, invhist_id) FROM wo, invhist WHERE ((wo_ordtype = 'S') AND (wo_ordid = _r.shipitem_orderitem_id) AND (invhist_series=_r.invhist_series) AND (invhist_transtype='RM')); -- Return eligble material PERFORM returnWoMaterial(womatlpost_womatl_id, _itemlocSeries, pTimestamp, womatlpost_invhist_id) FROM womatlpost, invhist m, invhist s WHERE ((womatlpost_invhist_id=m.invhist_id) AND (m.invhist_series=s.invhist_series) AND (m.invhist_transtype='IM') AND (s.invhist_id=_r.shipitem_invhist_id)); END IF; -- end Job Costing ELSIF (_r.shiphead_order_type = 'TO') THEN SELECT postInvTrans(itemsite_id, 'RS', _r.shipitem_qty, 'S/R', _r.shiphead_order_type, formatToNumber(toitem_id), tohead_number, 'Return from Shipping', costcat_asset_accnt_id, costcat_shipasset_accnt_id, _itemlocSeries, pTimestamp, _r.shipitem_value, _r.shipitem_invhist_id ) INTO _invhistid FROM toitem, tohead, itemsite, costcat WHERE ((toitem_item_id=itemsite_item_id) AND (toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (itemsite_costcat_id=costcat_id) AND (toitem_id=_r.shipitem_orderitem_id)); ELSE -- Don't know what kind of order this is RETURN -11; END IF; UPDATE shiphead SET shiphead_sfstatus='D' WHERE ((shiphead_id=_r.shiphead_id) AND (shiphead_sfstatus='P')); -- Handle reservation if applicable IF (fetchmetricbool('EnableSOReservations')) THEN UPDATE coitem SET coitem_qtyreserved = (coitem_qtyreserved + shipitemrsrv_qty) FROM shipitemrsrv WHERE ((coitem_id=_r.shipitem_orderitem_id) AND (shipitemrsrv_shipitem_id=_r.shipitem_id)); -- Handle location reservations if applicable FOR _rsrv IN SELECT * FROM shipitemlocrsrv WHERE (shipitemlocrsrv_shipitem_id=_r.shipitem_id) LOOP -- See if a reservation record still exists SELECT itemlocrsrv_id, itemlocrsrv_qty INTO _itemlocrsrvid FROM itemlocrsrv JOIN itemloc ON (itemlocrsrv_itemloc_id=itemloc_id) WHERE ((itemlocrsrv_source = 'SO') AND (itemlocrsrv_source_id = _r.shipitem_orderitem_id ) AND (itemloc_itemsite_id=_rsrv.shipitemlocrsrv_itemsite_id) AND (itemloc_location_id=_rsrv.shipitemlocrsrv_location_id) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(_rsrv.shipitemlocrsrv_ls_id, -1)) AND (COALESCE(itemloc_expiration, endOfTime())=COALESCE(_rsrv.shipitemlocrsrv_expiration, endOfTime())) AND (COALESCE(itemloc_warrpurc, endoftime())=COALESCE(_rsrv.shipitemlocrsrv_warrpurc, endoftime())) ); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows > 0 ) THEN -- Update existing UPDATE itemlocrsrv SET itemlocrsrv_qty = (itemlocrsrv_qty + _rsrv.shipitemlocrsrv_qty) WHERE (itemlocrsrv_id=_itemlocrsvrid); ELSE -- Recreate record INSERT INTO itemlocrsrv SELECT nextval('itemlocrsrv_itemlocrsrv_id_seq'), 'SO', _r.shipitem_orderitem_id, itemloc_id, _rsrv.shipitemlocrsrv_qty FROM itemloc WHERE ((itemloc_itemsite_id=_rsrv.shipitemlocrsrv_itemsite_id) AND (itemloc_location_id=_rsrv.shipitemlocrsrv_location_id) AND (COALESCE(itemloc_ls_id, -1)=COALESCE(_rsrv.shipitemlocrsrv_ls_id, -1)) AND (COALESCE(itemloc_expiration, endOfTime())=COALESCE(_rsrv.shipitemlocrsrv_expiration, endOfTime())) AND (COALESCE(itemloc_warrpurc, endoftime())=COALESCE(_rsrv.shipitemlocrsrv_warrpurc, endoftime())) ); END IF; END LOOP; END IF; DELETE FROM shipitem WHERE (shipitem_id = _r.shipitem_id ); -- Clean up if this is the last shipitem on the shipment IF (NOT EXISTS(SELECT shipitem_shiphead_id FROM shipitem WHERE (shipitem_shiphead_id=_r.shiphead_id))) THEN DELETE FROM shipdata WHERE(shipdata_shiphead_number=_r.shiphead_number); DELETE FROM shipdatasum WHERE(shipdatasum_shiphead_number=_r.shiphead_number); DELETE FROM pack WHERE(pack_shiphead_id=_r.shiphead_id); DELETE FROM shiphead WHERE (shiphead_id=_r.shiphead_id); END IF; END IF; RETURN _itemlocSeries; END; $_$; \DROP FUNCTION public.returnshipmenttransaction(integer, integer, timestamp with time zone); publicadminfalse83992k12551683283<returnwomaterial(integer, numeric, timestamp with time zone)FUNCTIONCREATE FUNCTION returnwomaterial(integer, numeric, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pGlDistTS ALIAS FOR $3; _itemlocSeries INTEGER; BEGIN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; RETURN returnWoMaterial(pWomatlid, pQty, _itemlocSeries, pGlDistTS); END; $_$; SDROP FUNCTION public.returnwomaterial(integer, numeric, timestamp with time zone); publicadminfalse83992l12551683284Ereturnwomaterial(integer, integer, timestamp with time zone, integer)FUNCTIONCREATE FUNCTION returnwomaterial(integer, integer, timestamp with time zone, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pItemlocSeries ALIAS FOR $2; pGlDistTS ALIAS FOR $3; pInvhistId ALIAS FOR $4; _woNumber TEXT; _invhistid INTEGER; _itemlocSeries INTEGER; _invqty NUMERIC; _womatlqty NUMERIC; _cost NUMERIC := 0; _rows INTEGER; BEGIN _itemlocSeries := 0; SELECT invhist_invqty, invhist_invqty * invhist_unitcost INTO _invqty, _cost FROM invhist WHERE (invhist_id=pInvhistId); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0) THEN RAISE EXCEPTION 'No transaction found for invhist_id %', pInvhistId; END IF; SELECT itemuomtouom(itemsite_item_id, NULL, womatl_uom_id, _invqty) INTO _womatlqty FROM womatl, itemsite WHERE((womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid)); GET DIAGNOSTICS _rows = ROW_COUNT; IF (_rows = 0) THEN _womatlqty := _invqty; END IF; IF ( SELECT ( CASE WHEN (womatl_qtyreq >= 0) THEN womatl_qtyiss < _womatlqty ELSE womatl_qtyiss > _womatlqty END ) FROM womatl WHERE ( womatl_id=pWomatlid ) ) THEN RETURN pItemlocSeries; END IF; SELECT formatWoNumber(womatl_wo_id) INTO _woNumber FROM womatl WHERE (womatl_id=pWomatlid); IF (pItemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; ELSE _itemlocSeries = pItemlocSeries; END IF; -- Post the transaction SELECT postInvTrans( ci.itemsite_id, 'IM', (_invqty * -1), 'W/O', 'WO', _woNumber, '', ('Return ' || item_number || ' from Work Order'), getPrjAccntId(wo_prj_id, pc.costcat_wip_accnt_id), cc.costcat_asset_accnt_id, _itemlocSeries, pGlDistTS, -- Cost will be ignored by Standard Cost items sites _cost, pInvhistId) INTO _invhistid FROM womatl, wo, itemsite AS ci, costcat AS cc, itemsite AS pi, costcat AS pc, item WHERE((womatl_itemsite_id=ci.itemsite_id) AND (ci.itemsite_costcat_id=cc.costcat_id) AND (womatl_wo_id=wo_id) AND (wo_itemsite_id=pi.itemsite_id) AND (pi.itemsite_costcat_id=pc.costcat_id) AND (ci.itemsite_item_id=item_id) AND (womatl_id=pWomatlid) ); -- Create linkage to the transaction created INSERT INTO womatlpost (womatlpost_womatl_id,womatlpost_invhist_id) VALUES (pWomatlid,_invhistid); -- Decrease the parent W/O's WIP value by the value of the returned components UPDATE wo SET wo_wipvalue = (wo_wipvalue - (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _cost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _invqty ELSE 0.0 END )), wo_postedvalue = (wo_postedvalue - (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _cost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _invqty ELSE 0.0 END )) FROM womatl, itemsite WHERE ( (wo_id=womatl_wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid) ); UPDATE womatl SET womatl_qtyiss = (womatl_qtyiss - _womatlqty), womatl_lastreturn = CURRENT_DATE WHERE (womatl_id=pWomatlid); RETURN _itemlocSeries; END; $_$; \DROP FUNCTION public.returnwomaterial(integer, integer, timestamp with time zone, integer); publicadminfalse83992"00NFUNCTION returnwomaterial(integer, integer, timestamp with time zone, integer)COMMENTCOMMENT ON FUNCTION returnwomaterial(integer, integer, timestamp with time zone, integer) IS 'Returns material by reversing a specific historical transaction'; publicadminfalse1900m12551758288Nreturnwomaterial(integer, numeric, integer, timestamp with time zone, boolean)FUNCTION CREATE FUNCTION returnwomaterial(integer, numeric, integer, timestamp with time zone, boolean DEFAULT false) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pItemlocSeries ALIAS FOR $3; pGlDistTS ALIAS FOR $4; pReqStdCost ALIAS FOR $5; _woNumber TEXT; _invhistid INTEGER; _itemlocSeries INTEGER; _qty NUMERIC; _cost NUMERIC := 0; BEGIN _itemlocSeries := 0; IF ( SELECT ( CASE WHEN (womatl_qtyreq >= 0) THEN womatl_qtyiss < pQty ELSE womatl_qtyiss > pQty END ) FROM womatl WHERE ( womatl_id=pWomatlid ) ) THEN RETURN pItemlocSeries; END IF; SELECT itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, pQty) INTO _qty FROM womatl, itemsite WHERE((womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid)); IF (NOT FOUND) THEN _qty := pQty; END IF; SELECT formatWoNumber(womatl_wo_id) INTO _woNumber FROM womatl WHERE (womatl_id=pWomatlid); IF (pItemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; ELSE _itemlocSeries = pItemlocSeries; END IF; -- Get the cost average IF (pReqStdCost) THEN SELECT stdcost(itemsite_item_id) * _qty INTO _cost FROM womatl, itemsite WHERE((womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid)); ELSE SELECT SUM(invhist_value_before - invhist_value_after) / SUM(invhist_qoh_before - invhist_qoh_after) * _qty INTO _cost FROM invhist, womatlpost, womatl WHERE((womatlpost_womatl_id=womatl_id) AND (womatlpost_invhist_id=invhist_id) AND (invhist_qoh_before > invhist_qoh_after) AND (womatl_id=pWomatlId)); END IF; _cost := COALESCE(_cost, 0); -- make sure it's not a null value -- Post the transaction SELECT postInvTrans( ci.itemsite_id, 'IM', (_qty * -1), 'W/O', 'WO', _woNumber, '', ('Return ' || item_number || ' from Work Order'), getPrjAccntId(wo_prj_id, pc.costcat_wip_accnt_id), cc.costcat_asset_accnt_id, _itemlocSeries, pGlDistTS, -- Cost will be ignored by Standard Cost items sites _cost) INTO _invhistid FROM womatl, wo, itemsite AS ci, costcat AS cc, itemsite AS pi, costcat AS pc, item WHERE((womatl_itemsite_id=ci.itemsite_id) AND (ci.itemsite_costcat_id=cc.costcat_id) AND (womatl_wo_id=wo_id) AND (wo_itemsite_id=pi.itemsite_id) AND (pi.itemsite_costcat_id=pc.costcat_id) AND (ci.itemsite_item_id=item_id) AND (womatl_id=pWomatlid) ); -- Create linkage to the transaction created IF (_invhistid != -1) THEN INSERT INTO womatlpost (womatlpost_womatl_id,womatlpost_invhist_id) VALUES (pWomatlid,_invhistid); END IF; -- Decrease the parent W/O's WIP value by the value of the returned components UPDATE wo SET wo_wipvalue = (wo_wipvalue - (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _cost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _qty ELSE 0.0 END )), wo_postedvalue = (wo_postedvalue - (CASE WHEN(itemsite_costmethod IN ('A','J')) THEN _cost WHEN(itemsite_costmethod='S') THEN stdcost(itemsite_item_id) * _qty ELSE 0.0 END )) FROM womatl, itemsite WHERE ( (wo_id=womatl_wo_id) AND (womatl_itemsite_id=itemsite_id) AND (womatl_id=pWomatlid) ); UPDATE womatl SET womatl_qtyiss = (womatl_qtyiss - pQty), womatl_lastreturn = CURRENT_DATE WHERE (womatl_id=pWomatlid); RETURN _itemlocSeries; END; $_$; eDROP FUNCTION public.returnwomaterial(integer, numeric, integer, timestamp with time zone, boolean); publicadminfalse83992n12551683285returnwomaterialbatch(integer)FUNCTIONCREATE FUNCTION returnwomaterialbatch(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoid ALIAS FOR $1; _itemlocSeries INTEGER; _woid INTEGER; _r RECORD; BEGIN SELECT wo_id INTO _woid FROM wo WHERE ( (wo_status IN ('E','I')) AND (wo_id=pWoid) ); IF (FOUND) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; FOR _r IN SELECT womatl_id, CASE WHEN wo_qtyord >= 0 THEN womatl_qtyiss ELSE ((womatl_qtyreq - womatl_qtyiss) * -1) END AS qty FROM wo, womatl, itemsite WHERE ((wo_id=womatl_wo_id) AND (womatl_itemsite_id=itemsite_id) AND ( (wo_qtyord < 0) OR (womatl_issuemethod IN ('S','M')) ) AND (womatl_wo_id=pWoid)) LOOP IF (_r.qty != 0) THEN PERFORM returnWoMaterial(_r.womatl_id, _r.qty, _itemlocSeries, now()); END IF; END LOOP; -- Reset the W/O Status to E UPDATE wo SET wo_status='E' WHERE (wo_id=pWoid); RETURN _itemlocSeries; ELSE RETURN -1; END IF; END; $_$; 5DROP FUNCTION public.returnwomaterialbatch(integer); publicadminfalse8399212551683286$reversecashreceipt(integer, integer)FUNCTION.CREATE FUNCTION reversecashreceipt(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _p RECORD; _r RECORD; _postToAR NUMERIC; _postToMisc NUMERIC; _posted_base NUMERIC := 0; _posted NUMERIC := 0; _sequence INTEGER; _aropenid INTEGER; _arMemoNumber TEXT; _arAccntid INTEGER; _closed BOOLEAN; _debitAccntid INTEGER; _exchGain NUMERIC; _comment TEXT; BEGIN _posted := 0; _posted_base := 0; SELECT fetchGLSequence() INTO _sequence; SELECT accnt_id INTO _arAccntid FROM cashrcpt, accnt, salescat WHERE ((cashrcpt_salescat_id=salescat_id) AND (salescat_ar_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid)); IF (NOT FOUND) THEN SELECT accnt_id INTO _arAccntid FROM cashrcpt, accnt WHERE ( (findARAccount(cashrcpt_cust_id)=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -5; END IF; END IF; SELECT cashrcpt_cust_id, ('Reverse Cash Receipt posting for ' || cust_number||'-'||cust_name) AS custnote, cashrcpt_fundstype, cashrcpt_number, cashrcpt_docnumber, cashrcpt_distdate, cashrcpt_amount, cashrcpt_discount, (cashrcpt_amount / cashrcpt_curr_rate) AS cashrcpt_amount_base, (cashrcpt_discount / cashrcpt_curr_rate) AS cashrcpt_discount_base, cashrcpt_notes, cashrcpt_bankaccnt_id AS bankaccnt_id, accnt_id AS prepaid_accnt_id, cashrcpt_usecustdeposit, cashrcpt_curr_id, cashrcpt_curr_rate INTO _p FROM accnt, cashrcpt LEFT OUTER JOIN custinfo ON (cashrcpt_cust_id=cust_id) WHERE ( (findPrepaidAccount(cashrcpt_cust_id)=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -7; END IF; IF (_p.cashrcpt_fundstype IN ('A', 'D', 'M', 'V')) THEN IF NOT EXISTS(SELECT ccpay_id FROM ccpay WHERE ((ccpay_order_number=CAST(pCashrcptid AS TEXT)) AND (ccpay_status IN ('C', 'A')))) THEN RETURN -8; END IF; _debitAccntid := findPrepaidAccount(_p.cashrcpt_cust_id); ELSE SELECT accnt_id INTO _debitAccntid FROM cashrcpt, bankaccnt, accnt WHERE ( (cashrcpt_bankaccnt_id=bankaccnt_id) AND (bankaccnt_accnt_id=accnt_id) AND (cashrcpt_id=pCashrcptid) ); IF (NOT FOUND) THEN RETURN -6; END IF; END IF; -- Determine the amount to post to A/R Open Items SELECT COALESCE(SUM(cashrcptitem_amount),0) INTO _postToAR FROM cashrcptitem JOIN aropen ON (aropen_id=cashrcptitem_aropen_id) WHERE ((cashrcptitem_cashrcpt_id=pCashrcptid) AND (cashrcptitem_applied)); IF (NOT FOUND) THEN _postToAR := 0; END IF; -- Determine the amount to post to Misc. Distributions SELECT COALESCE(SUM(cashrcptmisc_amount),0) INTO _postToMisc FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid); IF (NOT FOUND) THEN _postToMisc := 0; END IF; -- Check to see if the C/R is over applied IF ((_postToAR + _postToMisc) > _p.cashrcpt_amount) THEN RETURN -1; END IF; -- Check to see if the C/R is positive amount IF (_p.cashrcpt_amount <= 0) THEN RETURN -2; END IF; -- Distribute A/R Applications FOR _r IN SELECT aropen_id, aropen_doctype, aropen_docnumber, aropen_docdate, aropen_duedate, aropen_curr_id, aropen_curr_rate, round(aropen_amount - aropen_paid, 2) <= round(aropen_paid + currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_amount + cashrcptitem_discount),_p.cashrcpt_distdate),2) AS closed, cashrcptitem_id, cashrcptitem_amount, cashrcptitem_discount, (cashrcptitem_amount / _p.cashrcpt_curr_rate) AS cashrcptitem_amount_base, (cashrcptitem_discount / _p.cashrcpt_curr_rate) AS cashrcptitem_discount_base, round(aropen_paid - currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_amount),_p.cashrcpt_distdate),2) AS new_paid, round(currToCurr(_p.cashrcpt_curr_id, aropen_curr_id,abs(cashrcptitem_discount),_p.cashrcpt_distdate),2) AS new_discount FROM cashrcptitem JOIN aropen ON (cashrcptitem_aropen_id=aropen_id) WHERE ((cashrcptitem_cashrcpt_id=pCashrcptid) AND (cashrcptitem_applied)) LOOP -- Handle discount IF (_r.cashrcptitem_discount_base > 0) THEN PERFORM reverseCashReceiptDisc(_r.cashrcptitem_id, pJournalNumber); END IF; -- Update the aropen item to post the paid amount UPDATE aropen SET aropen_paid = _r.new_paid - _r.new_discount, aropen_open = TRUE, aropen_closedate = NULL WHERE (aropen_id=_r.aropen_id); -- Cache the running amount posted _posted_base := _posted_base + _r.cashrcptitem_amount_base; _posted := _posted + _r.cashrcptitem_amount; -- Record the cashrcpt application IF (_r.aropen_doctype IN ('I','D')) THEN INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_reftype, arapply_ref_id, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id ) VALUES ( _p.cashrcpt_cust_id, -1, 'K', _p.cashrcpt_number, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, _p.cashrcpt_fundstype, _p.cashrcpt_docnumber, 'CRA', _r.cashrcptitem_id, (round(_r.cashrcptitem_amount, 2) * -1.0), _r.closed, CURRENT_DATE, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id ); ELSE INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_reftype, arapply_ref_id, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id ) VALUES ( _p.cashrcpt_cust_id, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, -1, 'R', _p.cashrcpt_number, '', '', 'CRA', _r.cashrcptitem_id, (round(abs(_r.cashrcptitem_amount), 2) * -1.0), _r.closed, CURRENT_DATE, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id ); END IF; _exchGain := arCurrGain(_r.aropen_id,_p.cashrcpt_curr_id, abs(_r.cashrcptitem_amount), _p.cashrcpt_distdate); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', (_r.aropen_doctype || '-' || _r.aropen_docnumber), CASE WHEN _r.aropen_doctype != 'R' THEN _arAccntid ELSE findDeferredAccount(_p.cashrcpt_cust_id) END, (round(_r.cashrcptitem_amount_base + _exchGain, 2) * -1.0), _p.cashrcpt_distdate, _p.custnote ); IF (_exchGain <> 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/R', 'CR', _r.aropen_doctype || '-' || _r.aropen_docnumber, getGainLossAccntId( CASE WHEN _r.aropen_doctype != 'R' THEN _arAccntid ELSE findDeferredAccount(_p.cashrcpt_cust_id) END ), round(_exchGain, 2), _p.cashrcpt_distdate, _p.custnote); END IF; END LOOP; -- Distribute Misc. Applications FOR _r IN SELECT cashrcptmisc_id, cashrcptmisc_accnt_id, cashrcptmisc_amount, (cashrcptmisc_amount / _p.cashrcpt_curr_rate) AS cashrcptmisc_amount_base, cashrcptmisc_notes FROM cashrcptmisc WHERE (cashrcptmisc_cashrcpt_id=pCashrcptid) LOOP -- Cache the running amount posted _posted_base := (_posted_base + _r.cashrcptmisc_amount_base); _posted := (_posted + _r.cashrcptmisc_amount); -- Record the cashrcpt application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_username, arapply_curr_id, arapply_reftype, arapply_ref_id ) VALUES ( _p.cashrcpt_cust_id, -1, 'K', '', -1, 'Misc.', '', _p.cashrcpt_fundstype, _p.cashrcpt_docnumber, (round(_r.cashrcptmisc_amount, 2) * -1.0), TRUE, CURRENT_DATE, _p.cashrcpt_distdate, pJournalNumber, getEffectiveXtUser(), _p.cashrcpt_curr_id, 'CRD', _r.cashrcptmisc_id ); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', _r.cashrcptmisc_notes, _r.cashrcptmisc_accnt_id, (round(_r.cashrcptmisc_amount_base, 2) * -1.0), _p.cashrcpt_distdate, _p.custnote ); END LOOP; -- Post any remaining Cash to an A/R Debit Memo -- this credit memo may absorb an occasional currency exchange rounding error IF (round(_posted_base, 2) < round(_p.cashrcpt_amount_base, 2)) THEN _comment := ('Unapplied from ' || _p.cashrcpt_fundstype || '-' || _p.cashrcpt_docnumber); PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', _comment, _p.prepaid_accnt_id, ((round(_p.cashrcpt_amount_base, 2) - round(_posted_base, 2)) * -1.0), _p.cashrcpt_distdate, _p.custnote ); SELECT fetchArMemoNumber() INTO _arMemoNumber; -- Post A/R Debit Memo SELECT createARDebitMemo(NULL, _p.cashrcpt_cust_id, pJournalNumber, _arMemoNumber, '', _p.cashrcpt_distdate, (_p.cashrcpt_amount - _posted), _comment, -1, -1, -1, _p.cashrcpt_distdate, -1, NULL, 0, _p.cashrcpt_curr_id) INTO _aropenid; -- Create Cash Receipt Item to capture posting INSERT INTO cashrcptitem ( cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount ) VALUES ( pCashrcptid, _aropenid, ((_p.cashrcpt_amount - _posted) * 1.0) ); ELSIF (round(_posted_base, 2) > round(_p.cashrcpt_amount_base, 2)) THEN PERFORM insertIntoGLSeries(_sequence, 'A/R', 'CR', 'Currency Exchange Rounding - ' || _p.cashrcpt_docnumber, getGainLossAccntId(_debitAccntid), ((round(_posted_base, 2) - round((_p.cashrcpt_amount_base + _p.cashrcpt_discount_base), 2)) * 1.0), _p.cashrcpt_distdate, _p.custnote); END IF; -- Debit Cash PERFORM insertIntoGLSeries( _sequence, 'A/R', 'CR', (_p.cashrcpt_fundstype || '-' || _p.cashrcpt_docnumber), _debitAccntid, round(_p.cashrcpt_amount_base, 2), _p.cashrcpt_distdate, _p.custnote ); PERFORM postGLSeries(_sequence, pJournalNumber); -- Update and void the posted cashrcpt UPDATE cashrcpt SET cashrcpt_posted=FALSE, cashrcpt_posteddate=NULL, cashrcpt_postedby=NULL, cashrcpt_void=TRUE WHERE (cashrcpt_id=pCashrcptid); RETURN 1; END; $_$; ;DROP FUNCTION public.reversecashreceipt(integer, integer); publicadminfalse83992o12551683288(reversecashreceiptdisc(integer, integer)FUNCTIONCREATE FUNCTION reversecashreceiptdisc(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCashrcptItemId ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _r RECORD; _t RECORD; _v RECORD; _ardiscountid INTEGER; _arMemoNumber TEXT; _arAccntid INTEGER; _discountAccntid INTEGER; _comment TEXT; _discprcnt NUMERIC; _check INTEGER; BEGIN -- Fetch base records for processing SELECT aropen_id, aropen_doctype, aropen_amount, cashrcptitem_discount, cashrcpt_cust_id, cashrcpt_distdate, cashrcpt_applydate, cashrcpt_curr_id, cashrcpt_fundstype, cashrcpt_docnumber, round(currToCurr(cashrcpt_curr_id, aropen_curr_id, cashrcptitem_discount, cashrcpt_distdate),2) AS aropen_discount INTO _r FROM cashrcptitem JOIN cashrcpt ON (cashrcptitem_cashrcpt_id=cashrcpt_id) JOIN aropen ON ( (aropen_id=cashrcptitem_aropen_id) AND (aropen_doctype IN ('I', 'D')) ) WHERE (cashrcptitem_id=pCashrcptItemId); -- Get discount account _discountAccntid := findardiscountaccount(_r.cashrcpt_cust_id); IF (_r.cashrcptitem_discount > 0) THEN -- Determine discount percentage _discprcnt := _r.aropen_discount / _r.aropen_amount; SELECT fetchArMemoNumber() INTO _arMemoNumber; _comment := 'Discount Credit Reversal from ' || _r.cashrcpt_fundstype || '-' || _r.cashrcpt_docnumber; -- Create misc debit memo record _ardiscountid := nextval('aropen_aropen_id_seq'); INSERT INTO aropen ( aropen_id, aropen_docdate, aropen_duedate, aropen_doctype, aropen_docnumber, aropen_curr_id, aropen_posted, aropen_amount ) VALUES ( _ardiscountid, _r.cashrcpt_distdate, _r.cashrcpt_distdate, 'D', _arMemoNumber, _r.cashrcpt_curr_id, false,_r.cashrcptitem_discount); IF (fetchMetricBool('CreditTaxDiscount')) THEN -- proportional tax credits calculated and implemented for the debit memo generated by the discount IF (_r.aropen_doctype = 'I') THEN -- Tax for invoices SELECT aropen_cobmisc_id AS invcheadid, invchead_curr_id, invchead_invcdate INTO _t FROM aropen LEFT OUTER JOIN invchead ON (aropen_cobmisc_id = invchead_id) LEFT OUTER JOIN invcitem ON (invchead_id = invcitem_invchead_id) WHERE aropen_id = _r.aropen_id; FOR _v IN SELECT tax_sales_accnt_id, tax_id, round(sum(taxdetail_tax), 2) AS tax, currToBase(_t.invchead_curr_id, round(sum(taxdetail_tax), 2), _t.invchead_invcdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('I', _t.invcheadid, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP INSERT INTO aropentax( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_basis) VALUES ( _ardiscountid, getadjustmenttaxtypeid(), _v.tax_id, 0.00, 0.00, (round((_v.tax * _discprcnt), 2)), _r.cashrcpt_distdate, 0.00); END LOOP; ELSIF (_r.aropen_doctype = 'D') THEN -- Tax for debit memos INSERT INTO aropentax( taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_basis) SELECT _ardiscountid, taxhist_taxtype_id, taxhist_tax_id, 0.00, 0.00, (round((taxhist_tax * _discprcnt), 2)), _r.cashrcpt_distdate, 0.00 FROM aropentax WHERE (taxhist_parent_id=_r.aropen_id); END IF; END IF; -- End taxes -- Create debit memo for discount SELECT createARDebitMemo(_ardiscountid, _r.cashrcpt_cust_id, pJournalNumber, _arMemoNumber, '', _r.cashrcpt_distdate, _r.cashrcptitem_discount, _comment, -1, -1, _discountAccntid, _r.cashrcpt_distdate, -1, NULL, 0, _r.cashrcpt_curr_id) INTO _ardiscountid; END IF; -- End handle Discount RETURN 1; END; $_$; ?DROP FUNCTION public.reversecashreceiptdisc(integer, integer); publicadminfalse83992p12551683289$reverseglseries(integer, date, text)FUNCTIONp CREATE FUNCTION reverseglseries(integer, date, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSequence ALIAS FOR $1; pDistDate ALIAS FOR $2; pNotes ALIAS FOR $3; _sequence INTEGER := fetchGLSequence(); _journal INTEGER; BEGIN IF (SELECT COUNT(gltrans_sequence) > 0 FROM gltrans WHERE gltrans_sequence = pSequence) THEN SELECT fetchJournalNumber(jrnluse_use) INTO _journal FROM gltrans JOIN jrnluse ON (gltrans_journalnumber=jrnluse_number) WHERE (gltrans_sequence=pSequence) LIMIT 1; INSERT INTO gltrans (gltrans_created, gltrans_posted, gltrans_exported, gltrans_date, gltrans_sequence, gltrans_accnt_id, gltrans_source, gltrans_docnumber, gltrans_misc_id, gltrans_amount, gltrans_notes, gltrans_journalnumber, gltrans_doctype) SELECT CURRENT_TIMESTAMP, FALSE, FALSE, pDistDate, _sequence, gltrans_accnt_id, gltrans_source, gltrans_docnumber, gltrans_misc_id, (gltrans_amount * -1), pNotes, _journal, gltrans_doctype FROM gltrans WHERE (gltrans_sequence=pSequence); PERFORM postIntoTrialBalance(_sequence); ELSE SELECT fetchJournalNumber(jrnluse_use) INTO _journal FROM sltrans JOIN jrnluse ON (sltrans_journalnumber=jrnluse_number) WHERE (sltrans_sequence=pSequence) LIMIT 1; INSERT INTO sltrans (sltrans_created, sltrans_posted, sltrans_date, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_docnumber, sltrans_misc_id, sltrans_amount, sltrans_notes, sltrans_journalnumber, sltrans_doctype) SELECT CURRENT_TIMESTAMP, FALSE, pDistDate, _sequence, sltrans_accnt_id, sltrans_source, sltrans_docnumber, sltrans_misc_id, (sltrans_amount * -1), pNotes, _journal, sltrans_doctype FROM sltrans WHERE (sltrans_sequence=pSequence); END IF; RETURN _journal; END; $_$; ;DROP FUNCTION public.reverseglseries(integer, date, text); publicadminfalse83992q12551683290,revokeallmodulecmnttypesource(integer, text)FUNCTIONCREATE FUNCTION revokeallmodulecmnttypesource(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmnttypeid ALIAS FOR $1; pModuleName ALIAS FOR $2; BEGIN DELETE FROM cmnttypesource WHERE (cmnttypesource_id IN ( SELECT cmnttypesource_id FROM cmnttypesource, source WHERE ( (cmnttypesource_source_id=source_id) AND (cmnttypesource_cmnttype_id=pCmnttypeid) AND (source_module=pModuleName) ) ) ); RETURN 1; END; $_$; CDROP FUNCTION public.revokeallmodulecmnttypesource(integer, text); publicadminfalse83992r12551683291revokeallmodulepriv(text, text)FUNCTION|CREATE FUNCTION revokeallmodulepriv(text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pModuleName ALIAS FOR $2; BEGIN DELETE FROM usrpriv WHERE (usrpriv_id IN ( SELECT usrpriv_id FROM usrpriv, priv WHERE ( (usrpriv_priv_id=priv_id) AND (usrpriv_username=pUsername) AND (priv_module=pModuleName) ) ) ); NOTIFY "usrprivUpdated"; RETURN 1; END; $_$; 6DROP FUNCTION public.revokeallmodulepriv(text, text); publicadminfalse8399212551683292'revokeallmoduleprivgroup(integer, text)FUNCTION`CREATE FUNCTION revokeallmoduleprivgroup(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGrpid ALIAS FOR $1; pModuleName ALIAS FOR $2; BEGIN DELETE FROM grppriv WHERE (grppriv_id IN ( SELECT grppriv_id FROM grppriv, priv WHERE ( (grppriv_priv_id=priv_id) AND (grppriv_grp_id=pGrpid) AND (priv_module=pModuleName) ) ) ); RETURN 1; END; $_$; >DROP FUNCTION public.revokeallmoduleprivgroup(integer, text); publicadminfalse83992s12551683293&revokecmnttypesource(integer, integer)FUNCTIONCREATE FUNCTION revokecmnttypesource(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmnttypeid ALIAS FOR $1; pSourceid ALIAS FOR $2; BEGIN DELETE FROM cmnttypesource WHERE ( (cmnttypesource_cmnttype_id=pCmnttypeid) AND (cmnttypesource_source_id=pSourceid) ); RETURN TRUE; END; $_$; =DROP FUNCTION public.revokecmnttypesource(integer, integer); publicadminfalse83992z12551683294revokegroup(text, integer)FUNCTIONCREATE FUNCTION revokegroup(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pGrpid ALIAS FOR $2; BEGIN DELETE FROM usrgrp WHERE ( (usrgrp_username=pUsername) AND (usrgrp_grp_id=pGrpid) ); RETURN TRUE; END; $_$; 1DROP FUNCTION public.revokegroup(text, integer); publicadminfalse83992{12551683295revokepriv(text, integer)FUNCTIONCREATE FUNCTION revokepriv(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrivid ALIAS FOR $2; BEGIN DELETE FROM usrpriv WHERE ( (usrpriv_username=pUsername) AND (usrpriv_priv_id=pPrivid) ); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; 0DROP FUNCTION public.revokepriv(text, integer); publicadminfalse83992|12551683296revokepriv(text, text)FUNCTIONCREATE FUNCTION revokepriv(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrivname ALIAS FOR $2; BEGIN DELETE FROM usrpriv WHERE ( (usrpriv_username=pUsername) AND (usrpriv_priv_id IN (SELECT priv_id FROM priv WHERE priv_name=pPrivname) )); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; -DROP FUNCTION public.revokepriv(text, text); publicadminfalse83992~12551683297!revokeprivgroup(integer, integer)FUNCTIONCREATE FUNCTION revokeprivgroup(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGrpid ALIAS FOR $1; pPrivid ALIAS FOR $2; BEGIN DELETE FROM grppriv WHERE ( (grppriv_grp_id=pGrpid) AND (grppriv_priv_id=pPrivid) ); NOTIFY "usrprivUpdated"; RETURN TRUE; END; $_$; 8DROP FUNCTION public.revokeprivgroup(integer, integer); publicadminfalse8399212551683298rollupactualcost(integer)FUNCTION7CREATE FUNCTION rollupactualcost(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN rollUpSorACost(pitemid, TRUE); END; $_$; 0DROP FUNCTION public.rollupactualcost(integer); publicadminfalse8399212551683299 rollupsoracost(integer, boolean)FUNCTIONCREATE FUNCTION rollupsoracost(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pActual ALIAS FOR $2; _counter INTEGER; _setid INTEGER; _consumers RECORD; BEGIN _counter := 0; SELECT indentedWhereUsed(pItemid) INTO _setid; FOR _consumers IN SELECT bomwork_item_id FROM bomwork WHERE (bomwork_set_id=_setid) ORDER BY bomwork_level LOOP PERFORM updateSorACost( _consumers.bomwork_item_id, costelem_type, TRUE, lowerCost(_consumers.bomwork_item_id, costelem_type, pActual), pActual ) FROM costelem WHERE (costelem_sys); PERFORM updateLowerUserCosts(_consumers.bomwork_item_id, pActual); _counter := _counter + 1; END LOOP; PERFORM deleteBOMWorkset(_setid); RETURN _counter; END; $_$; 7DROP FUNCTION public.rollupsoracost(integer, boolean); publicadminfalse8399212551683300rollupstandardcost(integer)FUNCTION:CREATE FUNCTION rollupstandardcost(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN rollUpSorACost(pItemid, FALSE); END; $_$; 2DROP FUNCTION public.rollupstandardcost(integer); publicadminfalse8399212551683301roundcost(numeric)FUNCTIONCREATE FUNCTION roundcost(pcost numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _scale INTEGER; BEGIN IF (pCost IS NULL) THEN RETURN NULL; END IF; SELECT locale_cost_scale INTO _scale FROM locale WHERE (locale_id=getUsrLocaleId()); RETURN ROUND(pCost, _scale); END; $$; /DROP FUNCTION public.roundcost(pcost numeric); publicadminfalse8399212551758290#roundlocale(boolean, numeric, text)FUNCTIONCREATE FUNCTION roundlocale(pfractional boolean, pqty numeric, plocale text) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _scale INTEGER; BEGIN IF (pFractional) THEN SELECT * INTO _r FROM locale WHERE (locale_id=getUsrLocaleId()); _scale := CASE pLocale WHEN 'qtyper' THEN _r.locale_qtyper_scale WHEN 'cost' THEN _r.locale_cost_scale ELSE _r.locale_qty_scale END; RETURN ROUND(pQty, _scale); ELSE IF (TRUNC(pQty) < pQty) THEN RETURN (TRUNC(pQty) + 1); ELSE RETURN TRUNC(pQty); END IF; END IF; END; $$; SDROP FUNCTION public.roundlocale(pfractional boolean, pqty numeric, plocale text); publicadminfalse8399212551683302roundqty(boolean, numeric)FUNCTIONBCREATE FUNCTION roundqty(pfractional boolean, pqty numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _scale INTEGER; BEGIN SELECT locale_qty_scale INTO _scale FROM locale WHERE (locale_id=getUsrLocaleId()); IF (pFractional) THEN RETURN ROUND(pQty, _scale); ELSE IF (TRUNC(pQty) < ROUND(pQty, _scale)) THEN RETURN (TRUNC(pQty) + 1); ELSE RETURN TRUNC(pQty); END IF; END IF; END; $$; BDROP FUNCTION public.roundqty(pfractional boolean, pqty numeric); publicadminfalse8399212551683303roundsale(numeric)FUNCTIONCREATE FUNCTION roundsale(psale numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _scale INTEGER; BEGIN IF (pSale IS NULL) THEN RETURN NULL; END IF; SELECT locale_salesprice_scale INTO _scale FROM locale WHERE (locale_id=getUsrLocaleId()); RETURN ROUND(pSale, _scale); END; $$; /DROP FUNCTION public.roundsale(psale numeric); publicadminfalse8399212551683304roundup(numeric)FUNCTIONCREATE FUNCTION roundup(numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pValue ALIAS FOR $1; _checkValue integer; BEGIN _checkValue := pValue::integer; IF (_checkValue::numeric < pValue) THEN RETURN (_checkValue + 1)::numeric; ELSE RETURN _checkValue::numeric; END IF; END; $_$; 'DROP FUNCTION public.roundup(numeric); publicadminfalse8399212551683305Vsaveaddr(integer, text, text, text, text, text, text, text, text, boolean, text, text)FUNCTIONCREATE FUNCTION saveaddr(integer, text, text, text, text, text, text, text, text, boolean, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAddrId ALIAS FOR $1; pNumber ALIAS FOR $2; pAddr1 ALIAS FOR $3; pAddr2 ALIAS FOR $4; pAddr3 ALIAS FOR $5; pCity ALIAS FOR $6; pState ALIAS FOR $7; pPostalCode ALIAS FOR $8; pCountry ALIAS FOR $9; pActive ALIAS FOR $10; pNotes ALIAS FOR $11; pFlag ALIAS FOR $12; _addrId INTEGER; _addrNumber INTEGER; _flag TEXT; _p RECORD; _cnt INTEGER; _notes TEXT; BEGIN --Validate IF ((pFlag IS NULL) OR (pFlag = '') OR (pFlag = 'CHECK') OR (pFlag = 'CHANGEONE') OR (pFlag = 'CHANGEALL')) THEN IF (pFlag='') THEN _flag := 'CHECK'; ELSE _flag := COALESCE(pFlag,'CHECK'); END IF; ELSE RAISE EXCEPTION 'Invalid Flag (%). Valid flags are CHECK, CHANGEONE or CHANGEALL', pFlag; END IF; _notes := COALESCE(pNotes,''); --If there is nothing here, get out IF ( (pNumber = '' OR pNumber IS NULL) AND (pAddr1 = '' OR pAddr1 IS NULL) AND (pAddr2 = '' OR pAddr2 IS NULL) AND (pAddr3 = '' OR pAddr3 IS NULL) AND (pCity = '' OR pCity IS NULL) AND (pState = '' OR pState IS NULL) AND (pPostalCode = '' OR pPostalCode IS NULL) AND (pCountry = '' OR pCountry IS NULL) ) THEN RETURN NULL; END IF; _addrId := COALESCE(pAddrId,-1); --If we have an ID see if anything has changed, if not get out IF (_addrId >= 0) THEN SELECT * FROM addr INTO _p WHERE ((pAddrId=addr_id) AND (COALESCE(pNumber,addr_number)=addr_number) AND (COALESCE(pAddr1, '')=COALESCE(addr_line1, '')) AND (COALESCE(pAddr2, '')=COALESCE(addr_line2, '')) AND (COALESCE(pAddr3, '')=COALESCE(addr_line3, '')) AND (COALESCE(pCity, '')=COALESCE(addr_city, '')) AND (COALESCE(pState, '')=COALESCE(addr_state, '')) AND (COALESCE(pPostalCode, '')=COALESCE(addr_postalcode, '')) AND (COALESCE(pCountry, '')=COALESCE(addr_country, '')) AND (pActive=addr_active) AND (_notes=COALESCE(addr_notes,''))); IF (FOUND) THEN RETURN _addrId; END IF; END IF; --Check to see if duplicate address exists SELECT addr_id, addr_notes INTO _p FROM addr WHERE ((_addrId <> addr_id) AND (COALESCE(UPPER(addr_line1),'') = COALESCE(UPPER(pAddr1),'')) AND (COALESCE(UPPER(addr_line2),'') = COALESCE(UPPER(pAddr2),'')) AND (COALESCE(UPPER(addr_line3),'') = COALESCE(UPPER(pAddr3),'')) AND (COALESCE(UPPER(addr_city),'') = COALESCE(UPPER(pCity),'')) AND (COALESCE(UPPER(addr_state),'') = COALESCE(UPPER(pState),'')) AND (COALESCE(UPPER(addr_postalcode),'') = COALESCE(UPPER(pPostalcode),'')) AND (COALESCE(UPPER(addr_country),'') = COALESCE(UPPER(pCountry),''))); IF (FOUND) THEN --Note: To prevent overwriting of existing notes, the application --needs to load any existing notes for a matching address before altering them. IF (_notes <> _p.addr_notes) THEN UPDATE addr SET addr_notes=addr_notes || ' ' || _notes WHERE addr_id=_p.addr_id; END IF; RETURN _p.addr_id; --A matching address exits END IF; IF (_addrId < 0) THEN _flag := 'CHANGEONE'; END IF; IF (_flag = 'CHECK') THEN IF addrUseCount(_addrId) > 1 THEN RETURN -2; ELSIF (SELECT COUNT(addr_id)=0 FROM addr WHERE (addr_id=_addrId)) THEN _flag := 'CHANGEONE'; ELSE _flag := 'CHANGEALL'; END IF; END IF; IF (_flag = 'CHANGEALL') THEN _addrNumber := pNumber; IF (_addrNumber IS NULL) THEN SELECT addr_number INTO _addrNumber FROM addr WHERE(addr_id = _addrId); IF (_addrNumber IS NULL) THEN _addrNumber := fetchNextNumber('AddressNumber'); END IF; END IF; UPDATE addr SET addr_line1 = pAddr1, addr_line2 = pAddr2, addr_line3 = pAddr3, addr_city = pCity, addr_state = pState, addr_postalcode = pPostalcode, addr_country = pCountry, addr_active = pActive, addr_notes = pNotes WHERE addr_id = _addrId; RETURN _addrId; ELSE SELECT NEXTVAL('addr_addr_id_seq') INTO _addrId; IF (_flag = 'CHANGEONE') THEN _addrNumber := fetchNextNumber('AddressNumber'); ELSE _addrNumber := COALESCE(pNumber::text,fetchNextNumber('AddressNumber')); END IF; INSERT INTO addr ( addr_id, addr_number, addr_line1, addr_line2, addr_line3, addr_city, addr_state, addr_postalcode, addr_country, addr_active, addr_notes ) VALUES ( _addrId, _addrNumber, pAddr1, pAddr2, pAddr3, pCity, pState, pPostalcode, pCountry, pActive, _notes); RETURN _addrId; END IF; END; $_$; mDROP FUNCTION public.saveaddr(integer, text, text, text, text, text, text, text, text, boolean, text, text); publicadminfalse8399212551683306Gsaveaddr(integer, text, text, text, text, text, text, text, text, text)FUNCTIONCREATE FUNCTION saveaddr(integer, text, text, text, text, text, text, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAddrId ALIAS FOR $1; pNumber ALIAS FOR $2; pAddr1 ALIAS FOR $3; pAddr2 ALIAS FOR $4; pAddr3 ALIAS FOR $5; pCity ALIAS FOR $6; pState ALIAS FOR $7; pPostalCode ALIAS FOR $8; pCountry ALIAS FOR $9; pFlag ALIAS FOR $10; _returnVal INTEGER; BEGIN SELECT saveAddr(pAddrId,pNumber, pAddr1,pAddr2,pAddr3,pCity,pState,pPostalCode,pCountry,true,'',pFlag) INTO _returnVal; RETURN _returnVal; END; $_$; ^DROP FUNCTION public.saveaddr(integer, text, text, text, text, text, text, text, text, text); publicadminfalse8399212551683307savealarm(integer, text, date, time without time zone, integer, text, boolean, text, boolean, text, boolean, text, text, integer, text)FUNCTIONCREATE FUNCTION savealarm(integer, text, date, time without time zone, integer, text, boolean, text, boolean, text, boolean, text, text, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAlarmId ALIAS FOR $1; pAlarmNumber ALIAS FOR $2; pDate ALIAS FOR $3; pTime ALIAS FOR $4; pOffset ALIAS FOR $5; pQualifier ALIAS FOR $6; pEvent ALIAS FOR $7; pEventRecipient ALIAS FOR $8; pEmail ALIAS FOR $9; pEmailRecipient ALIAS FOR $10; pSysmsg ALIAS FOR $11; pSysmsgRecipient ALIAS FOR $12; pSource ALIAS FOR $13; pSourceId ALIAS FOR $14; pFlag ALIAS FOR $15; _alarmId INTEGER; _alarmNumber TEXT; _alarmTime TIMESTAMP; _alarmInterval INTERVAL; _alarmTrigger TIMESTAMP; _isNew BOOLEAN; _flag TEXT; _alarmCount INTEGER := 0; _debug BOOLEAN := false; BEGIN IF (_debug) THEN RAISE NOTICE 'pAlarmId = %', pAlarmId; RAISE NOTICE 'pAlarmNumber = %', pAlarmNumber; RAISE NOTICE 'pDate = %', pDate; RAISE NOTICE 'pTime = %', pTime; RAISE NOTICE 'pOffset = %', pOffset; RAISE NOTICE 'pQualifier = %', pQualifier; RAISE NOTICE 'pEvent = %', pEvent; RAISE NOTICE 'pEventRecipient = %', pEventRecipient; RAISE NOTICE 'pEmail = %', pEmail; RAISE NOTICE 'pEmailRecipient = %', pEmailRecipient; RAISE NOTICE 'pSysmsg = %', pSysmsg; RAISE NOTICE 'pSysmsgRecipient = %', pSysmsgRecipient; RAISE NOTICE 'pSource = %', pSource; RAISE NOTICE 'pSourceId = %', pSourceId; RAISE NOTICE 'pFlag = %', pFlag; END IF; --Validate IF ((pFlag IS NULL) OR (pFlag = '') OR (pFlag = 'CHECK') OR (pFlag = 'CHANGEONE') OR (pFlag = 'CHANGEALL')) THEN IF (pFlag='') THEN _flag := 'CHECK'; ELSE _flag := COALESCE(pFlag,'CHECK'); END IF; ELSE RAISE EXCEPTION 'Invalid Flag (%). Valid flags are CHECK, CHANGEONE or CHANGEALL', pFlag; END IF; --If there is nothing here get out IF ( (pAlarmId IS NULL OR pAlarmId = -1) AND (pOffset IS NULL) AND (pSourceId IS NULL) AND (COALESCE(pQualifier, '') = '') AND (COALESCE(pEventRecipient, '') = '') AND (COALESCE(pEmailRecipient, '') = '') AND (COALESCE(pSysmsgRecipient, '') = '') AND (COALESCE(pSource, '') = '') ) THEN RETURN NULL; END IF; IF (pAlarmId IS NULL OR pAlarmId = -1) THEN _isNew := true; _alarmId := nextval('alarm_alarm_id_seq'); _alarmNumber := fetchNextNumber('AlarmNumber'); ELSE SELECT COUNT(alarm_id) INTO _alarmCount FROM alarm WHERE ((alarm_id=pAlarmId) AND (alarm_source=pSource) AND (alarm_source_id=pSourceId)); -- ask whether new or update if name changes -- but only if this isn't a new record with a pre-allocated id IF (_alarmCount < 1 AND _flag = 'CHECK') THEN IF (EXISTS(SELECT alarm_id FROM alarm WHERE (alarm_id=pAlarmId))) THEN RETURN -10; ELSE _isNew := true; _alarmNumber := fetchNextNumber('AlarmNumber'); END IF; ELSIF (_flag = 'CHANGEONE') THEN _isNew := true; _alarmId := nextval('alarm_alarm_id_seq'); _alarmNumber := fetchNextNumber('AlarmNumber'); END IF; END IF; _alarmNumber := COALESCE(_alarmNumber,pAlarmNumber,fetchNextNumber('AlarmNumber')); _alarmTime := COALESCE(pDate, CURRENT_DATE) + COALESCE(pTime, CURRENT_TIME); IF (COALESCE(pOffset, 0) > 0) THEN _alarmInterval := CASE WHEN (pQualifier IN ('MB', 'MA')) THEN CAST(pOffset AS TEXT) || ' minutes' WHEN (pQualifier IN ('HB', 'HA')) THEN CAST(pOffset AS TEXT) || ' hours' WHEN (pQualifier IN ('DB', 'DA')) THEN CAST(pOffset AS TEXT) || ' days' ELSE '' END; _alarmTrigger := CASE WHEN (pQualifier IN ('MB', 'HB', 'DB')) THEN _alarmTime - _alarmInterval WHEN (pQualifier IN ('MA', 'HA', 'DA')) THEN _alarmTime + _alarmInterval ELSE _alarmTime END; ELSE _alarmTrigger := _alarmTime; END IF; IF (_isNew) THEN _alarmId := COALESCE(_alarmId,pAlarmId,nextval('alarm_alarm_id_seq')); INSERT INTO alarm ( alarm_id,alarm_number, alarm_event, alarm_email, alarm_sysmsg, alarm_trigger, alarm_time, alarm_time_offset, alarm_time_qualifier, alarm_creator, alarm_event_recipient, alarm_email_recipient, alarm_sysmsg_recipient, alarm_source, alarm_source_id ) VALUES ( _alarmId, _alarmNumber, pEvent, pEmail, pSysmsg, _alarmTrigger, _alarmTime, pOffset, pQualifier, getEffectiveXtUser(), pEventRecipient, pEmailRecipient, pSysmsgRecipient, pSource, pSourceId ); RETURN _alarmId; ELSE UPDATE alarm SET alarm_number=_alarmNumber, alarm_event=COALESCE(pEvent, alarm_event), alarm_email=COALESCE(pEmail, alarm_event), alarm_sysmsg=COALESCE(pSysmsg, alarm_event), alarm_trigger=_alarmTrigger, alarm_time=_alarmTime, alarm_time_offset=COALESCE(pOffset, alarm_time_offset), alarm_time_qualifier=COALESCE(pQualifier, alarm_time_qualifier), alarm_event_recipient=COALESCE(pEventRecipient, alarm_event_recipient), alarm_email_recipient=COALESCE(pEmailRecipient, alarm_email_recipient), alarm_sysmsg_recipient=COALESCE(pSysmsgRecipient, alarm_sysmsg_recipient) WHERE (alarm_id=pAlarmId); RETURN pAlarmId; END IF; END; $_$; DROP FUNCTION public.savealarm(integer, text, date, time without time zone, integer, text, boolean, text, boolean, text, boolean, text, text, integer, text); publicadminfalse83992125516833098savebomhead(integer, text, date, text, numeric, numeric)FUNCTIONCREATE FUNCTION savebomhead(integer, text, date, text, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevision ALIAS FOR $2; pRevisionDate ALIAS FOR $3; pDocumentNumber ALIAS FOR $4; pBatchSize ALIAS FOR $5; pRequiredQtyPer ALIAS FOR $6; _seq INTEGER; _p RECORD; _revid INTEGER; BEGIN IF (NOT fetchMetricBool('RevControl')) THEN -- Deal with BOM if Rev Control Turned off SELECT bomhead_id INTO _seq FROM bomhead WHERE (bomhead_item_id=pItemid); IF (NOT FOUND) THEN -- No bomhead exists _seq := NEXTVAL('bomhead_bomhead_id_seq'); INSERT INTO bomhead (bomhead_id,bomhead_item_id,bomhead_docnum,bomhead_revision, bomhead_revisiondate,bomhead_batchsize,bomhead_requiredqtyper,bomhead_rev_id) VALUES (_seq,pItemid, pDocumentNumber, pRevision, pRevisionDate, pBatchSize, pRequiredQtyPer,-1); ELSE UPDATE bomhead SET bomhead_revision = pRevision, bomhead_revisiondate = pRevisionDate, bomhead_docnum = pDocumentNumber, bomhead_batchsize = pBatchSize, bomhead_requiredqtyper = pRequiredQtyPer WHERE (bomhead_id=_seq); END IF; RETURN _seq; ELSE -- Deal with Revision Control IF (COALESCE(pRevision,'') = '' AND getActiveRevId('BOM',pItemid) != -1) THEN RAISE EXCEPTION 'Revision Control records exist for item. You must provide a new or existing revision number.'; END IF; SELECT * INTO _p FROM bomhead LEFT OUTER JOIN rev ON (bomhead_rev_id=rev_id), item WHERE ((bomhead_item_id=pItemid) AND (COALESCE(bomhead_revision,'')=COALESCE(pRevision,'')) AND (bomhead_item_id=item_id)); IF (NOT FOUND) THEN -- This is a new bomhead record IF LENGTH(pRevision) > 0 THEN -- We need to create a revision record SELECT createbomrev(pItemid, pRevision) INTO _revid; UPDATE bomhead SET bomhead_revisiondate = pRevisiondate, bomhead_docnum = pDocumentNumber, bomhead_batchsize = pBatchsize, bomhead_requiredqtyper = pRequiredqtyper WHERE (bomhead_rev_id=_revid); SELECT bomhead_id INTO _seq FROM bomhead WHERE (bomhead_rev_id=_revid); RETURN _seq; ELSE -- Just create a regular bom header record _seq := NEXTVAL('bomhead_bomhead_id_seq'); INSERT INTO bomhead (bomhead_id,bomhead_item_id,bomhead_docnum,bomhead_revision, bomhead_revisiondate,bomhead_batchsize,bomhead_requiredqtyper,bomhead_rev_id) VALUES (_seq,pItemid, pDocumentNumber, pRevision, pRevisionDate, pBatchSize, pRequiredQtyPer,-1); RETURN _seq; END IF; ELSE -- We need to update a record IF (_p.rev_status = 'I') THEN RAISE EXCEPTION 'Revision % for % is inactive. Update not allowed.', _p.rev_number, _p.item_number; ELSIF (COALESCE(pRevision,'') = COALESCE(_p.bomhead_revision,'')) THEN -- No change, just update UPDATE bomhead SET bomhead_revisiondate = pRevisiondate, bomhead_docnum = pDocumentNumber, bomhead_batchsize = pBatchSize, bomhead_requiredqtyper = pRequiredqtyper WHERE (bomhead_id=_p.bomhead_id); RETURN _p.bomhead_id; ELSE -- Need a new revision SELECT createbomrev(pItemid, pRevision) INTO _revid; UPDATE bomhead SET bomhead_revisiondate = pRevisiondate, bomhead_docnum = pDocumentNumber, bomhead_batchsize = pBatchSize, bomhead_requiredqtyper = pRequiredqtyper WHERE (bomhead_rev_id=_revid); SELECT bomhead_id INTO _seq FROM bomhead WHERE (bomhead_rev_id=_revid); RETURN _seq; END IF; END IF; END IF; RETURN _seq; END; $_$; ODROP FUNCTION public.savebomhead(integer, text, date, text, numeric, numeric); publicadminfalse8399212551683310savecntct(integer, text, integer, integer, text, text, text, text, text, text, boolean, text, text, text, text, text, text, text, text)FUNCTION CREATE FUNCTION savecntct(pcntctid integer, pcontactnumber text, pcrmacctid integer, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pinitials text, pactive boolean, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, pnotes text, ptitle text, pflag text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT saveCntct( pCntctId, pContactNumber, pCrmAcctId, pAddrId, pHonorific, pFirstName, pMiddleName, pLastName, pSuffix, pInitials, pActive, pPhone, pPhone2, pFax, pEmail, pWebAddr, pNotes, pTitle, pFlag, NULL) INTO _returnVal; RETURN _returnVal; END; $$; GDROP FUNCTION public.savecntct(pcntctid integer, pcontactnumber text, pcrmacctid integer, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pinitials text, pactive boolean, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, pnotes text, ptitle text, pflag text); publicadminfalse8399212551683311isavecntct(integer, text, integer, text, text, text, text, text, text, text, text, text, text, text, text)FUNCTIONCREATE FUNCTION savecntct(pcntctid integer, pcontactnumber text, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, ptitle text, pflag text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _returnVal INTEGER; BEGIN SELECT saveCntct(pCntctId,pContactNumber,NULL,pAddrId,pHonorific,pFirstName,pMiddleName,pLastName,pSuffix,NULL, NULL,pPhone,pPhone2,pFax,pEmail,pWebAddr,NULL,pTitle,pFlag, NULL) INTO _returnVal; RETURN _returnVal; END; $$; DROP FUNCTION public.savecntct(pcntctid integer, pcontactnumber text, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, ptitle text, pflag text); publicadminfalse8399212551683312savecntct(integer, text, integer, integer, text, text, text, text, text, text, boolean, text, text, text, text, text, text, text, text, text)FUNCTIONCREATE FUNCTION savecntct(pcntctid integer, pcontactnumber text, pcrmacctid integer, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pinitials text, pactive boolean, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, pnotes text, ptitle text, pflag text, pownerusername text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _cntctId INTEGER; _cntctNumber TEXT; _isNew BOOLEAN; _flag TEXT; _contactCount INTEGER := 0; BEGIN --Validate IF ((pFlag IS NULL) OR (pFlag = '') OR (pFlag = 'CHECK') OR (pFlag = 'CHANGEONE') OR (pFlag = 'CHANGEALL')) THEN IF (pFlag='') THEN _flag := 'CHECK'; ELSE _flag := COALESCE(pFlag,'CHECK'); END IF; ELSE RAISE EXCEPTION 'Invalid Flag (%). Valid flags are CHECK, CHANGEONE or CHANGEALL', pFlag; END IF; --If there is nothing here get out IF ( (pCntctId IS NULL OR pCntctId = -1) AND (pAddrId IS NULL) AND (COALESCE(pFirstName, '') = '') AND (COALESCE(pMiddleName, '') = '') AND (COALESCE(pLastName, '') = '') AND (COALESCE(pSuffix, '') = '') AND (COALESCE(pHonorific, '') = '') AND (COALESCE(pInitials, '') = '') AND (COALESCE(pPhone, '') = '') AND (COALESCE(pPhone2, '') = '') AND (COALESCE(pFax, '') = '') AND (COALESCE(pEmail, '') = '') AND (COALESCE(pWebAddr, '') = '') AND (COALESCE(pNotes, '') = '') AND (COALESCE(pTitle, '') = '') ) THEN RETURN NULL; END IF; IF (pCntctId IS NULL OR pCntctId = -1) THEN _isNew := true; _cntctId := nextval('cntct_cntct_id_seq'); _cntctNumber := COALESCE(pContactNumber,fetchNextNumber('ContactNumber')); ELSE SELECT COUNT(cntct_id) INTO _contactCount FROM cntct WHERE ((cntct_id=pCntctId) AND (cntct_first_name=pFirstName) AND (cntct_last_name=pLastName)); -- ask whether new or update if name changes -- but only if this isn't a new record with a pre-allocated id IF (_contactCount < 1 AND _flag = 'CHECK') THEN IF (EXISTS(SELECT cntct_id FROM cntct WHERE (cntct_id=pCntctId))) THEN RETURN -10; ELSE _isNew := true; _cntctNumber := fetchNextNumber('ContactNumber'); END IF; ELSIF (_flag = 'CHANGEONE') THEN _isNew := true; _cntctId := nextval('cntct_cntct_id_seq'); _cntctNumber := fetchNextNumber('ContactNumber'); ELSIF (_flag = 'CHANGEALL') THEN _isNew := false; END IF; END IF; IF (pContactNumber = '') THEN _cntctNumber := fetchNextNumber('ContactNumber'); ELSE _cntctNumber := COALESCE(_cntctNumber,pContactNumber,fetchNextNumber('ContactNumber')); END IF; IF (_isNew) THEN _cntctId := COALESCE(_cntctId,pCntctId,nextval('cntct_cntct_id_seq')); INSERT INTO cntct ( cntct_id,cntct_number, cntct_crmacct_id,cntct_addr_id,cntct_first_name, cntct_last_name,cntct_honorific,cntct_initials, cntct_active,cntct_phone,cntct_phone2, cntct_fax,cntct_email,cntct_webaddr, cntct_notes,cntct_title,cntct_middle,cntct_suffix, cntct_owner_username ) VALUES ( _cntctId, COALESCE(_cntctNumber,fetchNextNumber('ContactNumber')) ,pCrmAcctId,pAddrId, pFirstName,pLastName,pHonorific, pInitials,COALESCE(pActive,true),pPhone,pPhone2,pFax, pEmail,pWebAddr,pNotes,pTitle,pMiddleName,pSuffix,pOwnerUsername ); RETURN _cntctId; ELSE UPDATE cntct SET cntct_number=COALESCE(_cntctNumber,fetchNextNumber('ContactNumber')), cntct_crmacct_id=COALESCE(pCrmAcctId,cntct_crmacct_id), cntct_addr_id=COALESCE(pAddrId,cntct_addr_id), cntct_first_name=COALESCE(pFirstName,cntct_first_name), cntct_last_name=COALESCE(pLastName,cntct_last_name), cntct_honorific=COALESCE(pHonorific,cntct_honorific), cntct_initials=COALESCE(pInitials,cntct_initials), cntct_active=COALESCE(pActive,cntct_active), cntct_phone=COALESCE(pPhone,cntct_phone), cntct_phone2=COALESCE(pPhone2,cntct_phone2), cntct_fax=COALESCE(pFax,cntct_fax), cntct_email=COALESCE(pEmail,cntct_email), cntct_webaddr=COALESCE(pWebAddr,cntct_webaddr), cntct_notes=COALESCE(pNotes,cntct_notes), cntct_title=COALESCE(pTitle,cntct_title), cntct_middle=COALESCE(pMiddleName,cntct_middle), cntct_suffix=COALESCE(pSuffix,cntct_suffix), cntct_owner_username=COALESCE(pOwnerUsername, cntct_owner_username) WHERE (cntct_id=pCntctId); RETURN pCntctId; END IF; END; $$; \DROP FUNCTION public.savecntct(pcntctid integer, pcontactnumber text, pcrmacctid integer, paddrid integer, phonorific text, pfirstname text, pmiddlename text, plastname text, psuffix text, pinitials text, pactive boolean, pphone text, pphone2 text, pfax text, pemail text, pwebaddr text, pnotes text, ptitle text, pflag text, pownerusername text); publicadminfalse8399212551683314/saveimageass(text, integer, character, integer)FUNCTION*CREATE FUNCTION saveimageass(text, integer, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSource ALIAS FOR $1; pSourceId ALIAS FOR $2; pPurpose ALIAS FOR $3; pImageid ALIAS FOR $4; _imageassId INTEGER = 0; BEGIN -- See if this link already exists SELECT imageass_id INTO _imageassId FROM imageass WHERE ((imageass_source_id=pSourceId) AND (imageass_source=pSource) AND (imageass_image_id=pImageId) AND (imageass_purpose=pPurpose)); IF (FOUND) THEN RETURN _imageassId; END IF; -- See if a record with this purpose already exists (item only) IF (pSource = 'I' AND pPurpose != 'M') THEN SELECT imageass_id INTO _imageassId FROM imageass WHERE ((imageass_source_id=pSourceId) AND (imageass_source=pSource) AND (imageass_purpose=pPurpose)); END IF; IF (_imageassId > 0) THEN UPDATE imageass SET imageass_image_id=pImageId WHERE (imageass_id=_imageassId); ELSE _imageassId := NEXTVAL('imageass_imageass_id_seq'); INSERT INTO imageass VALUES (_imageassId,pSourceId,pSource,pImageid,CASE WHEN pSource='I' THEN pPurpose ELSE 'M' END); END IF; RETURN _imageassId; END; $_$; FDROP FUNCTION public.saveimageass(text, integer, character, integer); publicadminfalse83992~12551683315Jsaveipsitem(integer, integer, integer, numeric, numeric, integer, integer)FUNCTIONCREATE FUNCTION saveipsitem(integer, integer, integer, numeric, numeric, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pIpsItemId ALIAS FOR $1; pIpsHeadId ALIAS FOR $2; pItemId ALIAS FOR $3; pQtyBreak ALIAS FOR $4; pPrice ALIAS FOR $5; pQtyUomId ALIAS FOR $6; pPriceUomId ALIAS FOR $7; _ipsitemid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(item_id)=0 FROM item WHERE (item_id=pItemId)) THEN RAISE EXCEPTION 'You must provide a valid Item'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pPrice,0) < 0) THEN RAISE EXCEPTION 'Price must be a negative value'; ELSIF ((pQtyUomId IS NOT NULL) AND (SELECT COUNT(item_id)=0 FROM (SELECT item_id FROM item WHERE ((item_id=pItemId) AND (item_inv_uom_id=pQtyUomId)) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_from_uom_id=pQtyUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling')) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_to_uom_id=pQtyUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling'))) AS data)) THEN RAISE EXCEPTION 'Qty UOM Must be a valid Selling UOM for the Item'; ELSIF ((pPriceUomId IS NOT NULL) AND (SELECT COUNT(item_id)=0 FROM (SELECT item_id FROM item WHERE ((item_id=pItemId) AND (item_inv_uom_id=pPriceUomId)) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_from_uom_id=pPriceUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling')) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_to_uom_id=pPriceUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling'))) AS data)) THEN RAISE EXCEPTION 'Price UOM Must be a valid Selling UOM for the Item'; END IF; _new := TRUE; IF (pIpsItemId IS NOT NULL) THEN SELECT ipsitem_id INTO _ipsitemid FROM ipsitem WHERE (ipsitem_id=pIpsItemId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Item not found.'; END IF; ELSE SELECT ipsitem_id INTO _ipsitemid FROM ipsitem WHERE ((ipsitem_ipshead_id = pIpsheadId) AND (ipsitem_item_id = pItemId) AND (ipsitem_qtybreak = pQtyBreak) AND (ipsitem_qty_uom_id = COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId))) AND (ipsitem_price_uom_id = CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END)); END IF; IF (FOUND) THEN _new := false; ELSE _ipsitemid := nextval('ipsitem_ipsitem_id_seq'); END IF; IF (_new) THEN INSERT INTO ipsitem ( ipsitem_id, ipsitem_ipshead_id, ipsitem_item_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount) VALUES ( _ipsitemid, pIpsheadId, pItemId, pQtyBreak, pPrice, COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)), CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END, 0.0, 0.0); ELSE UPDATE ipsitem SET ipsitem_qtybreak = pQtyBreak, ipsitem_price = pPrice, ipsitem_qty_uom_id = COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)), ipsitem_price_uom_id = CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END WHERE (ipsitem_id=_ipsitemid); END IF; RETURN _ipsitemid; END; $_$; aDROP FUNCTION public.saveipsitem(integer, integer, integer, numeric, numeric, integer, integer); publicadminfalse8399212551745076bsaveipsitem(integer, integer, integer, numeric, numeric, integer, integer, numeric, numeric, text)FUNCTIONCREATE FUNCTION saveipsitem(pipsitemid integer, pipsheadid integer, pitemid integer, pqtybreak numeric, pprice numeric, pqtyuomid integer, ppriceuomid integer, ppercent numeric, pfixedamt numeric, ptype text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ipsitemid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(item_id)=0 FROM item WHERE (item_id=pItemId)) THEN RAISE EXCEPTION 'You must provide a valid Item'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pPrice,0) < 0) THEN RAISE EXCEPTION 'Price must be a negative value'; ELSIF ((pQtyUomId IS NOT NULL) AND (SELECT COUNT(item_id)=0 FROM (SELECT item_id FROM item WHERE ((item_id=pItemId) AND (item_inv_uom_id=pQtyUomId)) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_from_uom_id=pQtyUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling')) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_to_uom_id=pQtyUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling'))) AS data)) THEN RAISE EXCEPTION 'Qty UOM Must be a valid Selling UOM for the Item'; ELSIF ((pPriceUomId IS NOT NULL) AND (SELECT COUNT(item_id)=0 FROM (SELECT item_id FROM item WHERE ((item_id=pItemId) AND (item_inv_uom_id=pPriceUomId)) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_from_uom_id=pPriceUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling')) UNION SELECT item_id FROM item,itemuomconv,itemuom,uomtype WHERE ((item_id=pItemId) AND (itemuomconv_item_id=item_id) AND (itemuomconv_to_uom_id=pPriceUomId) AND (itemuom_itemuomconv_id=itemuomconv_id) AND (itemuom_uomtype_id=uomtype_id) AND (uomtype_name='Selling'))) AS data)) THEN RAISE EXCEPTION 'Price UOM Must be a valid Selling UOM for the Item'; END IF; _new := TRUE; IF (pIpsItemId IS NOT NULL) THEN SELECT ipsitem_id INTO _ipsitemid FROM ipsiteminfo WHERE (ipsitem_id=pIpsItemId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Item not found.'; END IF; ELSE SELECT ipsitem_id INTO _ipsitemid FROM ipsiteminfo WHERE ((ipsitem_ipshead_id = pIpsheadId) AND (ipsitem_item_id = pItemId) AND (ipsitem_qtybreak = pQtyBreak) AND (ipsitem_qty_uom_id = COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId))) AND (ipsitem_price_uom_id = CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END)); END IF; IF (FOUND) THEN _new := false; END IF; IF (_new) THEN INSERT INTO ipsiteminfo ( ipsitem_ipshead_id, ipsitem_item_id, ipsitem_qtybreak, ipsitem_price, ipsitem_qty_uom_id, ipsitem_price_uom_id, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_type) VALUES ( pIpsheadId, pItemId, pQtyBreak, pPrice, COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)), CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END, pPercent, pFixedAmt, pType) RETURNING ipsitem_id INTO _ipsitemid; ELSE UPDATE ipsiteminfo SET ipsitem_qtybreak = pQtyBreak, ipsitem_price = pPrice, ipsitem_qty_uom_id = COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)), ipsitem_price_uom_id = CASE WHEN (pQtyUomId = (SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) THEN COALESCE(pPriceUomId,pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) ELSE COALESCE(pQtyUomId,(SELECT item_inv_uom_id FROM item WHERE item_id = pItemId)) END, ipsitem_discntprcnt=pPercent, ipsitem_fixedamtdiscount=pFixedAmt, ipsitem_type=pType WHERE (ipsitem_id=_ipsitemid); END IF; RETURN _ipsitemid; END; $$; DROP FUNCTION public.saveipsitem(pipsitemid integer, pipsheadid integer, pitemid integer, pqtybreak numeric, pprice numeric, pqtyuomid integer, ppriceuomid integer, ppercent numeric, pfixedamt numeric, ptype text); publicadminfalse8399212551683316;saveipsprodcat(integer, integer, integer, numeric, numeric)FUNCTION(CREATE FUNCTION saveipsprodcat(integer, integer, integer, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ DECLARE pIpsProdcatId ALIAS FOR $1; pIpsHeadId ALIAS FOR $2; pProdCatId ALIAS FOR $3; pQtyBreak ALIAS FOR $4; pDiscount ALIAS FOR $5; _ipsprodcatid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(*)=0 FROM prodcat WHERE (prodcat_id=pProdcatId)) THEN RAISE EXCEPTION 'You must provide a valid Product Category'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pDiscount,0) < 0) THEN RAISE EXCEPTION 'Discount must be a negative value'; END IF; _new := TRUE; IF (pIpsProdcatId IS NOT NULL) THEN SELECT ipsprodcat_id INTO _ipsprodcatid FROM ipsprodcat WHERE (ipsprodcat_id=pIpsprodcatId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Product Category not found'; END IF; ELSE SELECT ipsprodcat_id INTO _ipsprodcatid FROM ipsprodcat WHERE ((ipsprodcat_ipshead_id=pIpsheadId) AND (ipsprodcat_prodcat_id=pProdcatId) AND (ipsprodcat_qtybreak=pQtyBreak)); IF (FOUND) THEN _new := false; ELSE _ipsprodcatid := nextval('ipsprodcat_ipsprodcat_id_seq'); END IF; END IF; IF (_new) THEN INSERT INTO ipsprodcat ( ipsprodcat_id, ipsprodcat_ipshead_id, ipsprodcat_prodcat_id, ipsprodcat_qtybreak, ipsprodcat_discntprcnt) VALUES ( _ipsprodcatid, pIpsheadId, pProdcatId, pQtyBreak, pDiscount * .01); ELSE UPDATE ipsprodcat SET ipsprodcat_qtybreak = pQtyBreak, ipsprodcat_discntprcnt = pDiscount * .01 WHERE (ipsprodcat_id=_ipsprodcatid); END IF; RETURN _ipsprodcatid; END; $_$; RDROP FUNCTION public.saveipsprodcat(integer, integer, integer, numeric, numeric); publicadminfalse8399212551683317Dsaveipsprodcat(integer, integer, integer, numeric, numeric, numeric)FUNCTION\CREATE FUNCTION saveipsprodcat(integer, integer, integer, numeric, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pIpsProdcatId ALIAS FOR $1; pIpsHeadId ALIAS FOR $2; pProdCatId ALIAS FOR $3; pQtyBreak ALIAS FOR $4; pDiscount ALIAS FOR $5; pFixedAmtDiscount ALIAS FOR $6; _ipsprodcatid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(*)=0 FROM prodcat WHERE (prodcat_id=pProdcatId)) THEN RAISE EXCEPTION 'You must provide a valid Product Category'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pDiscount,0) < 0) THEN RAISE EXCEPTION 'Discount must be a negative value'; END IF; _new := TRUE; IF (pIpsProdcatId IS NOT NULL) THEN SELECT ipsprodcat_id INTO _ipsprodcatid FROM ipsprodcat WHERE (ipsprodcat_id=pIpsprodcatId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Product Category not found'; END IF; ELSE SELECT ipsprodcat_id INTO _ipsprodcatid FROM ipsprodcat WHERE ((ipsprodcat_ipshead_id=pIpsheadId) AND (ipsprodcat_prodcat_id=pProdcatId) AND (ipsprodcat_qtybreak=pQtyBreak)); IF (FOUND) THEN _new := false; ELSE _ipsprodcatid := nextval('ipsprodcat_ipsprodcat_id_seq'); END IF; END IF; IF (_new) THEN INSERT INTO ipsprodcat ( ipsprodcat_id, ipsprodcat_ipshead_id, ipsprodcat_prodcat_id, ipsprodcat_qtybreak, ipsprodcat_discntprcnt, ipsprodcat_fixedamtdiscount) VALUES ( _ipsprodcatid, pIpsheadId, pProdcatId, pQtyBreak, pDiscount * .01, pFixedAmtDiscount); ELSE UPDATE ipsprodcat SET ipsprodcat_qtybreak = pQtyBreak, ipsprodcat_discntprcnt = pDiscount * .01, ipsprodcat_fixedamtdiscount = pFixedAmtDiscount WHERE (ipsprodcat_id=_ipsprodcatid); END IF; RETURN _ipsprodcatid; END; $_$; [DROP FUNCTION public.saveipsprodcat(integer, integer, integer, numeric, numeric, numeric); publicadminfalse8399212551745077Jsaveipsprodcat(integer, integer, integer, numeric, numeric, numeric, text)FUNCTION CREATE FUNCTION saveipsprodcat(pipsprodcatid integer, pipsheadid integer, pprodcatid integer, pqtybreak numeric, pdiscount numeric, pfixedamtdiscount numeric, ptype text) RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _ipsitemid INTEGER; _new BOOLEAN; BEGIN -- Validation IF (SELECT COUNT(*)=0 FROM prodcat WHERE (prodcat_id=pProdcatId)) THEN RAISE EXCEPTION 'You must provide a valid Product Category'; ELSIF (COALESCE(pQtyBreak,0) < 0) THEN RAISE EXCEPTION 'Quantity can not be a negative value'; ELSIF (COALESCE(pDiscount,0) < 0) THEN RAISE EXCEPTION 'Discount must be a negative value'; END IF; _new := TRUE; IF (pIpsProdcatId IS NOT NULL) THEN SELECT ipsitem_id INTO _ipsitemid FROM ipsiteminfo WHERE (ipsprodcat_id=pIpsprodcatId); IF (FOUND) THEN _new := FALSE; ELSE RAISE EXCEPTION 'Pricing Schedule Product Category not found'; END IF; ELSE SELECT ipsitem_id INTO _ipsitemid FROM ipsiteminfo WHERE ((ipsitem_ipshead_id=pIpsheadId) AND (ipsitem_prodcat_id=pProdcatId) AND (ipsitem_qtybreak=pQtyBreak)); IF (FOUND) THEN _new := false; ELSE _ipsitemid := nextval('ipsitem_ipsitem_id_seq'); END IF; END IF; IF (_new) THEN INSERT INTO ipsiteminfo ( ipsitem_id, ipsitem_ipshead_id, ipsitem_prodcat_id, ipsitem_qtybreak, ipsitem_price, ipsitem_discntprcnt, ipsitem_fixedamtdiscount, ipsitem_type) VALUES ( _ipsitemid, pIpsheadId, pProdcatId, pQtyBreak, 0.0, pDiscount * .01, pFixedAmtDiscount, pType); ELSE UPDATE ipsiteminfo SET ipsitem_qtybreak = pQtyBreak, ipsitem_discntprcnt = pDiscount * .01, ipsitem_fixedamtdiscount = pFixedAmtDiscount, ipsitem_type = pType WHERE (ipsitem_id=_ipsitemid); END IF; RETURN _ipsitemid; END; $$; DROP FUNCTION public.saveipsprodcat(pipsprodcatid integer, pipsheadid integer, pprodcatid integer, pqtybreak numeric, pdiscount numeric, pfixedamtdiscount numeric, ptype text); publicadminfalse8399212551683318*saveitemimage(integer, character, integer)FUNCTION_CREATE FUNCTION saveitemimage(integer, character, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pPurpose ALIAS FOR $2; pImageid ALIAS FOR $3; _itemimageId INTEGER; BEGIN -- See if a record with this purpose already exists SELECT imageass_id INTO _itemimageId FROM imageass WHERE ( (imageass_source='I') AND (imageass_source_id=pItemid) AND (imageass_purpose=pPurpose) ); IF (FOUND) THEN UPDATE imageass SET imageass_image_id=pImageId WHERE (imageass_id=_itemimageId); ELSE _itemimageId := NEXTVAL('imageass_imageass_id_seq'); INSERT INTO imageass VALUES (_itemimageId,pItemid,'I',pImageid,pPurpose); END IF; RETURN _itemimageId; END; $_$; ADROP FUNCTION public.saveitemimage(integer, character, integer); publicadminfalse8399212551683319Psaveitemuomconv(integer, integer, numeric, integer, numeric, boolean, integer[])FUNCTIONZ CREATE FUNCTION saveitemuomconv(integer, integer, numeric, integer, numeric, boolean, integer[]) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pFromUomId ALIAS FOR $2; pFromValue ALIAS FOR $3; pToUomId ALIAS FOR $4; pToValue ALIAS FOR $5; pFractional ALIAS FOR $6; pUomTypes ALIAS FOR $7; _p RECORD; _fromUomId INTEGER; _fromValue NUMERIC; _toUomId INTEGER; _toValue NUMERIC; _fractional BOOLEAN; _seq INTEGER; _i INTEGER; _uomtype TEXT; BEGIN -- Make sure we have some itemtypes IF (pUomTypes IS NULL) OR (ARRAY_UPPER(pUomTypes,1) = 0) THEN RAISE EXCEPTION 'You must include at least one item type.'; END IF; -- If this is a global UOM, over-ride with global data. SELECT * INTO _p FROM uomconv WHERE ((((uomconv_from_uom_id=pFromUomId) AND (uomconv_to_uom_id=pToUomId)) OR ((uomconv_from_uom_id=pToUomId) AND (uomconv_to_uom_id=pFromUomId)))); IF (FOUND) THEN _fromUomId := _p.uomconv_from_uom_id; _toUomId := _p.uomconv_to_uom_id; _fromValue := _p.uomconv_from_value; _toValue := _p.uomconv_to_value; _fractional := _p.uomconv_fractional; RAISE NOTICE 'Defaulted to global Unit of Measure conversion ratios.'; ELSE _fromUomId := pFromUomId; _fromValue := pFromValue; _toUomId := pToUomId; _toValue := pToValue; _fractional := pFractional; END IF; -- See if an item conversion exists going the other way SELECT f.uom_name AS f_uom, t.uom_name as t_uom INTO _p FROM itemuomconv,uom f, uom t WHERE ((itemuomconv_item_id=pItemId) AND (itemuomconv_from_uom_id=_toUomId) AND (itemuomconv_to_uom_id=_fromUomId) AND (f.uom_id=itemuomconv_from_uom_id) AND (t.uom_id=itemuomconv_to_uom_id)); IF (FOUND) THEN RAISE EXCEPTION 'Unit of measure conversion already exists going from % to %.',_p.f_uom,_p.t_uom; END IF; -- See if an item conversion record exists SELECT * INTO _p FROM itemuomconv WHERE ((itemuomconv_item_id=pItemId) AND (itemuomconv_from_uom_id=_fromUomId) AND (itemuomconv_to_uom_id=_toUomId)); -- Update if found IF (FOUND) THEN UPDATE itemuomconv SET itemuomconv_from_value=_fromValue, itemuomconv_to_value=_toValue, itemuomconv_fractional=_fractional WHERE (itemuomconv_id=_p.itemuomconv_id); _seq := _p.itemuomconv_id; --Delete old type list DELETE FROM itemuom WHERE itemuom_itemuomconv_id=_p.itemuomconv_id; ELSE -- Otherwise create a new one SELECT NEXTVAL('itemuomconv_itemuomconv_id_seq') INTO _seq; INSERT INTO itemuomconv VALUES (_seq, pItemId,_fromUomId,_fromValue,_toUomId,_toValue,_fractional); END IF; -- Build new type list FOR _i IN 1..ARRAY_UPPER(pUomTypes,1) LOOP SELECT uomtype_name INTO _uomtype FROM itemuomconv, itemuom, uomtype WHERE ((itemuom_uomtype_id=uomtype_id) AND (itemuomconv_id=itemuom_itemuomconv_id) AND (itemuomconv_item_id=pItemId) AND (uomtype_name != 'Selling') AND (itemuom_uomtype_id=pUomTypes[_i])); IF (FOUND) THEN RAISE EXCEPTION 'Unit of Measure Type % is already used on this item',_uomtype; ELSE INSERT INTO itemuom (itemuom_itemuomconv_id,itemuom_uomtype_id) VALUES (_seq,pUomTypes[_i]); END IF; END LOOP; RETURN _seq; END; $_$; gDROP FUNCTION public.saveitemuomconv(integer, integer, numeric, integer, numeric, boolean, integer[]); publicadminfalse8399212551683320#savemetasql(text, text, text, text)FUNCTION)CREATE FUNCTION savemetasql(text, text, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN saveMetasql($1, $2, $3, $4, true, NULL, 0); END; $_$; :DROP FUNCTION public.savemetasql(text, text, text, text); publicadminfalse8399212551683321,savemetasql(text, text, text, text, boolean)FUNCTION0CREATE FUNCTION savemetasql(text, text, text, text, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN saveMetasql($1, $2, $3, $4, $5, NULL, 0); END; $_$; CDROP FUNCTION public.savemetasql(text, text, text, text, boolean); publicadminfalse83992125516833222savemetasql(text, text, text, text, boolean, text)FUNCTION4CREATE FUNCTION savemetasql(text, text, text, text, boolean, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN saveMetasql($1, $2, $3, $4, $5, $6, 0); END; $_$; IDROP FUNCTION public.savemetasql(text, text, text, text, boolean, text); publicadminfalse8399212551683323;savemetasql(text, text, text, text, boolean, text, integer)FUNCTIONCREATE FUNCTION savemetasql(text, text, text, text, boolean, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pGroup ALIAS FOR $1; pName ALIAS FOR $2; pNotes ALIAS FOR $3; pQuery ALIAS FOR $4; pSystem ALIAS FOR $5; pSchema ALIAS FOR $6; pGrade ALIAS FOR $7; _metasqlid INTEGER; _debug BOOL := false; _grade INTEGER; _insertstr TEXT; _table TEXT; BEGIN --See if Query already exists SELECT metasql_id INTO _metasqlid FROM metasql WHERE ((metasql_group=pGroup) AND (metasql_name=pName) AND (metasql_grade=pGrade)); IF (FOUND) THEN IF (_debug) THEN RAISE NOTICE 'update metasql'; END IF; UPDATE metasql SET metasql_group=pGroup, metasql_name=pName, metasql_notes=pNotes, metasql_query=pQuery WHERE (metasql_id=_metasqlid); ELSE IF (COALESCE(pSchema, 'public') = 'public' OR TRIM(pSchema) = '') THEN _table := 'metasql'; ELSE _table := pSchema || '.pkgmetasql'; END IF; IF (pGrade IS NULL) THEN SELECT MAX(metasql_grade) + 1 INTO _grade FROM metasql WHERE ((metasql_group=pGroup) AND (metasql_name=pName)); ELSE _grade := pGrade; END IF; _insertstr := 'INSERT INTO ' || _table || ' (metasql_group, metasql_name, metasql_notes, ' || ' metasql_query, metasql_grade) VALUES (' || COALESCE(quote_literal(pGroup),'NULL') || ',' || COALESCE(quote_literal(pName), 'NULL') || ',' || COALESCE(quote_literal(pNotes), 'NULL') || ',' || COALESCE(quote_literal(pQuery), 'NULL') ||',' || COALESCE(quote_literal(_grade), 'NULL') || ') RETURNING metasql_id;' ; IF (_debug) THEN RAISE NOTICE '%', _insertstr; END IF; EXECUTE _insertstr INTO _metasqlid; END IF; RETURN _metasqlid; END; $_$; RDROP FUNCTION public.savemetasql(text, text, text, text, boolean, text, integer); publicadminfalse8399212551683324 scraps(text)FUNCTIONcCREATE FUNCTION scraps(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('SI', 'SM', 'EX')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; #DROP FUNCTION public.scraps(text); publicadminfalse8399212551683325!scrapwomaterial(integer, numeric)FUNCTION'CREATE FUNCTION scrapwomaterial(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN scrapWoMaterial($1, $2, CURRENT_TIMESTAMP); END; $_$; 8DROP FUNCTION public.scrapwomaterial(integer, numeric); publicadminfalse8399212551683326;scrapwomaterial(integer, numeric, timestamp with time zone)FUNCTION CREATE FUNCTION scrapwomaterial(integer, numeric, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWomatlid ALIAS FOR $1; pQty ALIAS FOR $2; pGlDistTS ALIAS FOR $3; _costmethod CHAR(1); _scrapValue NUMERIC; _r RECORD; BEGIN -- Validate IF (pQty <= 0) THEN RAISE EXCEPTION 'Scrap quantity must be a positive number'; ELSIF ( ( SELECT (womatl_qtyiss < pQty) FROM womatl WHERE (womatl_id=pWomatlid) ) ) THEN RAISE EXCEPTION 'You may not scrap more material than has been issued'; END IF; -- Get the wip G/L account SELECT costcat_wip_accnt_id INTO _r FROM womatl, wo, itemsite, costcat WHERE((womatl_wo_id=wo_id) AND (wo_itemsite_id=itemsite_id) AND (itemsite_costcat_id=costcat_id) AND (womatl_id=pWomatlid)); -- Calculate scrap value SELECT itemsite_costmethod INTO _costmethod FROM womatl JOIN itemsite ON (womatl_itemsite_id=itemsite_id) WHERE (womatl_id=pWomatlid); IF (_costmethod = 'S') THEN SELECT ROUND((stdCost(itemsite_item_id) * itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, pQty)),2) INTO _scrapValue FROM womatl JOIN itemsite ON (womatl_itemsite_id=itemsite_id) WHERE (womatl_id=pWomatlid); ELSIF (_costmethod = 'A') THEN SELECT ROUND((SUM(invhist_invqty * invhist_unitcost)-womatl_scrapvalue)/ (CASE WHEN (SUM(invhist_invqty)-itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtywipscrap) = 0) THEN 1 ELSE SUM(invhist_invqty)-itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtywipscrap) END),2) * itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, pQty) INTO _scrapValue FROM womatl JOIN womatlpost ON (womatl_id=womatlpost_womatl_id) JOIN invhist ON (womatlpost_invhist_id=invhist_id) JOIN itemsite ON (womatl_itemsite_id=itemsite_id) WHERE (womatl_id=pWomatlid) GROUP BY itemsite_item_id,womatl_uom_id,womatl_qtywipscrap,womatl_scrapvalue; ELSE RAISE EXCEPTION 'Cost method not supported to scrap this item'; END IF; -- Distribute to G/L PERFORM insertGLTransaction( 'W/O', 'WO', formatWoNumber(womatl_wo_id), ('Scrap ' || item_number || ' from Work Order'), getPrjAccntId(wo_prj_id, _r.costcat_wip_accnt_id), getPrjAccntId(wo_prj_id, costcat_mfgscrap_accnt_id), -1, _scrapValue, date(pGlDistTS) ) FROM wo, womatl, itemsite, item, costcat WHERE ( (wo_id=womatl_wo_id) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (itemsite_costcat_id=costcat_id) AND (womatl_id=pWomatlid) ); UPDATE womatl SET womatl_qtywipscrap=(womatl_qtywipscrap + pQty), womatl_scrapvalue = womatl_scrapvalue + _scrapValue, womatl_qtyiss=(womatl_qtyiss - pQty) WHERE (womatl_id=pWomatlid); UPDATE wo SET wo_wipvalue = wo_wipvalue-_scrapValue, wo_postedvalue = wo_postedvalue-_scrapValue FROM womatl WHERE ((womatl_id=pWomatlid) AND (wo_id=womatl_wo_id)); RETURN pWomatlid; END; $_$; RDROP FUNCTION public.scrapwomaterial(integer, numeric, timestamp with time zone); publicadminfalse8399212551683327 selectbalanceforbilling(integer)FUNCTION CREATE FUNCTION selectbalanceforbilling(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoheadid ALIAS FOR $1; _returnval BOOLEAN := TRUE; _doSelect BOOLEAN; _result INTEGER; _soitem RECORD; BEGIN FOR _soitem IN -- Get the shipments for this SO. Kits are not shipped SELECT cust_partialship, coitem_id, coitem_linenumber, 'NOTK' AS item_type, SUM(shipitem_qty) AS qty, ( (SUM(shipitem_qty) >= (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned + SUM(shipitem_qty))) OR (NOT cust_partialship) ) AS toclose FROM cohead JOIN custinfo ON (cust_id=cohead_cust_id) JOIN coitem ON (coitem_cohead_id=cohead_id) JOIN shipitem ON ( (shipitem_orderitem_id=coitem_id) AND (NOT shipitem_invoiced) ) JOIN shiphead ON ( (shiphead_id=shipitem_shiphead_id) AND (shiphead_order_type='SO') AND (shiphead_shipped) ) WHERE (cohead_id=pSoheadid) GROUP BY cust_partialship, coitem_id, item_type, coitem_linenumber, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned UNION -- Get the Kits for this SO SELECT cust_partialship, coitem_id, coitem_linenumber, 'K' AS item_type, coitem_qtyord AS qty, TRUE AS toclose FROM cohead JOIN custinfo ON (cust_id=cohead_cust_id) JOIN coitem ON (coitem_cohead_id=cohead_id AND coitem_status='O') JOIN itemsite ON (itemsite_id=coitem_itemsite_id) JOIN item ON ( (item_id=itemsite_item_id) AND (item_type='K') ) WHERE (cohead_id=pSoheadid) LOOP _doSelect := true; IF(_soitem.item_type = 'K') THEN -- see if all the sub items are shipped SELECT coitem_id INTO _result FROM coitem WHERE((coitem_cohead_id=pSoheadid) AND (coitem_linenumber=_soitem.coitem_linenumber) AND (coitem_subnumber > 0) AND ((coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) > 0)) LIMIT 1; IF( FOUND ) THEN _doSelect := false; END IF; END IF; IF (_doSelect) THEN -- do as much as we can but still report errors if they occur IF (selectForBilling(_soitem.coitem_id, _soitem.qty, _soitem.toclose) < 0) THEN _returnval := FALSE; END IF; END IF; END LOOP; RETURN _returnval; END; $_$; 7DROP FUNCTION public.selectbalanceforbilling(integer); publicadminfalse8399212551683328/selectdiscountitemsforpayment(integer, integer)FUNCTIONCREATE FUNCTION selectdiscountitemsforpayment(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pBankaccntid ALIAS FOR $2; _currid INTEGER; _r RECORD; BEGIN SELECT bankaccnt_curr_id INTO _currid FROM bankaccnt WHERE (bankaccnt_id=pBankaccntid); FOR _r IN SELECT apopen_id FROM apopen, terms WHERE((CURRENT_DATE <= determineDiscountDate(apopen_terms_id, apopen_docdate)) AND (terms_discprcnt > 0.0) AND (apopen_terms_id=terms_id) AND (apopen_open) AND (apopen_status = 'O') AND (apopen_doctype IN ('V', 'D')) AND (apopen_vend_id=pVendid) AND (apopen_curr_id=_currid) ) LOOP PERFORM selectPayment(_r.apopen_id, pBankaccntid); END LOOP; RETURN 1; END; $_$; FDROP FUNCTION public.selectdiscountitemsforpayment(integer, integer); publicadminfalse8399212551683329*selectdueitemsforpayment(integer, integer)FUNCTIONCREATE FUNCTION selectdueitemsforpayment(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pVendid ALIAS FOR $1; pBankaccntid ALIAS FOR $2; _currid INTEGER; BEGIN SELECT bankaccnt_curr_id INTO _currid FROM bankaccnt WHERE (bankaccnt_id=pBankaccntid); PERFORM selectPayment(apopen_id, pBankaccntid) FROM apopen WHERE((apopen_open) AND (apopen_vend_id=pVendid) AND (apopen_duedate <= CURRENT_DATE) AND (apopen_status = 'O') AND (apopen_doctype IN ('V', 'D')) AND (apopen_curr_id=_currid) ); RETURN 1; END; $_$; ADROP FUNCTION public.selectdueitemsforpayment(integer, integer); publicadminfalse8399212551683330+selectforbilling(integer, numeric, boolean)FUNCTIONPCREATE FUNCTION selectforbilling(integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; pQty ALIAS FOR $2; pClose ALIAS FOR $3; _itemid INTEGER := NULL; _taxzoneid INTEGER := NULL; _taxid INTEGER := NULL; _taxtypeid INTEGER := NULL; BEGIN SELECT cobmisc_taxzone_id, item_id, coitem_taxtype_id INTO _taxzoneid, _itemid, _taxtypeid FROM cobmisc, coitem, itemsite, item WHERE ((cobmisc_cohead_id = coitem_cohead_id) AND (NOT cobmisc_posted) AND (coitem_itemsite_id = itemsite_id) AND (itemsite_item_id = item_id) AND (coitem_id = pSoitemid) ) LIMIT 1; RETURN selectforbilling(pSoitemid, pQty, pClose, _taxtypeid); END; $_$; BDROP FUNCTION public.selectforbilling(integer, numeric, boolean); publicadminfalse83992125516833314selectforbilling(integer, numeric, boolean, integer)FUNCTIONCREATE FUNCTION selectforbilling(integer, numeric, boolean, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoitemid ALIAS FOR $1; pQty ALIAS FOR $2; pClose ALIAS FOR $3; ptaxtypeid ALIAS FOR $4; _cobillid INTEGER; _r RECORD; BEGIN -- Get some information SELECT cobmisc_id, cobmisc_taxzone_id, coitem_id, coitem_price, coitem_price_invuomratio AS invpricerat, coitem_qty_invuomratio, item_id INTO _r FROM cobmisc, coitem, itemsite, item, site() WHERE ((cobmisc_cohead_id = coitem_cohead_id) AND (NOT cobmisc_posted) AND (coitem_itemsite_id = itemsite_id) AND (itemsite_item_id = item_id) AND (coitem_id = pSoitemid) AND (itemsite_warehous_id = warehous_id) ) LIMIT 1; -- check to make sure the qty to bill for is not less than -- the total un-invoiced shipped amount IF ((SELECT (pQty < SUM(shipitem_qty)) FROM shipitem, shiphead, coitem WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shiphead_order_type='SO') AND (shiphead_order_id=coitem_cohead_id) AND (shipitem_orderitem_id=coitem_id) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_id=pSoitemid) ) ) ) THEN RETURN -1; END IF; SELECT cobill_id INTO _cobillid FROM cobill, cobmisc, coitem WHERE ((cobill_cobmisc_id = cobmisc_id) AND (cobmisc_cohead_id = coitem_cohead_id) AND (cobill_coitem_id = coitem_id) AND (NOT cobmisc_posted) AND (coitem_id = pSoitemid)); IF (FOUND) THEN UPDATE cobill SET cobill_selectdate = CURRENT_DATE, cobill_select_username = getEffectiveXtUser(), cobill_qty = pQty, cobill_toclose = pClose, cobill_taxtype_id = ptaxtypeid WHERE (cobill_id=_cobillid); ELSE SELECT NEXTVAL('cobill_cobill_id_seq') INTO _cobillid; INSERT INTO cobill (cobill_id, cobill_coitem_id, cobill_cobmisc_id, cobill_selectdate, cobill_select_username, cobill_qty, cobill_toclose, cobill_taxtype_id) VALUES (_cobillid, _r.coitem_id, _r.cobmisc_id, CURRENT_DATE, getEffectiveXtUser(), pQty, pClose, ptaxtypeid); END IF; RETURN _cobillid; END; $_$; KDROP FUNCTION public.selectforbilling(integer, numeric, boolean, integer); publicadminfalse8399212551683332selectpayment(integer, integer)FUNCTION2 CREATE FUNCTION selectpayment(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pBankaccntid ALIAS FOR $2; _p RECORD; _apselectid INTEGER; _amount NUMERIC; _discount NUMERIC; BEGIN SELECT apopen_amount, apopen_paid, apopen_doctype, apopen_docdate, apopen_curr_id, apopen_amount - apopen_paid - COALESCE((SELECT SUM(currToCurr(checkitem_curr_id, apopen_curr_id, checkitem_amount + checkitem_discount, checkhead_checkdate)) FROM checkitem, checkhead WHERE((checkitem_checkhead_id=checkhead_id) AND (checkitem_apopen_id=apopen_id) AND (NOT checkhead_deleted) AND (NOT checkhead_replaced) AND (NOT checkhead_posted)) ),0) AS balance, noNeg(COALESCE(apopen_discountable_amount, 0) * CASE WHEN (CURRENT_DATE <= determineDiscountDate(apopen_terms_id, apopen_docdate)) THEN terms_discprcnt ELSE 0.0 END - discount_applied) AS discount_available INTO _p FROM apopen LEFT OUTER JOIN terms ON (apopen_terms_id=terms_id), (SELECT COALESCE(SUM(apapply_amount),0) AS discount_applied FROM apapply, apopen WHERE((apapply_target_apopen_id=pApopenid) AND (apapply_source_apopen_id=apopen_id) AND (apopen_discount)) ) AS data WHERE(apopen_id=pApopenid); IF(NOT FOUND OR (NOT _p.apopen_doctype IN ('V','D'))) THEN RETURN -1; END IF; _discount := round(_p.discount_available, 2); _amount := noNeg(round(_p.balance, 2) - _discount); IF (round(_p.balance,2) < (_discount + _amount)) THEN RETURN -2; END IF; IF (_amount > 0) THEN SELECT apselect_id INTO _apselectid FROM apselect WHERE (apselect_apopen_id=pApopenid); IF (FOUND) THEN UPDATE apselect SET apselect_amount=_amount, apselect_discount=_discount, apselect_curr_id = _p.apopen_curr_id WHERE(apselect_id=_apselectid); ELSE SELECT NEXTVAL('apselect_apselect_id_seq') INTO _apselectid; INSERT INTO apselect ( apselect_id, apselect_apopen_id, apselect_amount, apselect_discount, apselect_bankaccnt_id, apselect_curr_id, apselect_date ) VALUES ( _apselectid, pApopenid, _amount, _discount, pBankaccntid, _p.apopen_curr_id, _p.apopen_docdate ); END IF; ELSE _apselectid := 0; END IF; RETURN _apselectid; END; $_$; 6DROP FUNCTION public.selectpayment(integer, integer); publicadminfalse8399212551683333!selectuninvoicedshipment(integer)FUNCTIONCREATE FUNCTION selectuninvoicedshipment(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipheadid ALIAS FOR $1; _cobmiscid INTEGER; _coheadid INTEGER; _r RECORD; _cobillid INTEGER; BEGIN -- make a cobmisc head if it doesn't already exist for this cohead SELECT shiphead_order_id, createBillingHeader(shiphead_order_id) INTO _coheadid, _cobmiscid FROM shiphead JOIN shipitem ON (shipitem_shiphead_id=shiphead_id) WHERE (shiphead_shipped AND NOT shipitem_invoiced AND (shiphead_id=pShipheadid)); -- Grab all of the uninvoiced shipitem records FOR _r IN SELECT cohead_id, coitem_id, SUM(shipitem_qty) AS qty, coitem_price, coitem_price_invuomratio AS invpricerat, coitem_qty_invuomratio, item_id, ( ((coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) <= 0) OR (NOT cust_partialship) ) AS toclose, coitem_taxtype_id FROM shiphead, shipitem, coitem, cohead, custinfo, itemsite, item WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (coitem_cohead_id=cohead_id) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (cohead_cust_id=cust_id) AND (item_type != 'K') AND (cohead_id=_coheadid) AND (shiphead_id=pShipheadid) ) GROUP BY cohead_id, coitem_id, cust_partialship, coitem_taxtype_id, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned, coitem_price, invpricerat, coitem_qty_invuomratio, item_id UNION SELECT cohead_id, coitem_id, coitem_qtyord AS qty, coitem_price, coitem_price_invuomratio AS invpricerat, coitem_qty_invuomratio, item_id, true AS toclose, coitem_taxtype_id FROM shiphead, cohead, custinfo, itemsite, item, coitem AS kit WHERE((shiphead_order_id=cohead_id) AND (coitem_cohead_id=cohead_id) AND (coitem_status='O') AND (shiphead_shipped) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (cohead_cust_id=cust_id) AND (item_type = 'K') AND (cohead_id=_coheadid) AND (shiphead_id=pShipheadid) AND (coitem_linenumber NOT IN (SELECT sub.coitem_linenumber FROM coitem AS sub WHERE sub.coitem_cohead_id=cohead_id -- cohead for kit AND sub.coitem_linenumber=kit.coitem_linenumber AND sub.coitem_subnumber > 0 AND ((sub.coitem_qtyord - sub.coitem_qtyshipped + sub.coitem_qtyreturned) > 0) LIMIT 1) )) GROUP BY cohead_id, coitem_id, cust_partialship, coitem_taxtype_id, coitem_qtyord, coitem_qtyshipped, coitem_qtyreturned, coitem_price, invpricerat, coitem_qty_invuomratio, item_id, coitem_linenumber LOOP SELECT cobill_id INTO _cobillid FROM cobill, cobmisc, coitem WHERE ((cobill_cobmisc_id=cobmisc_id) AND (cobmisc_cohead_id=coitem_cohead_id) AND (cobill_coitem_id=coitem_id) AND (NOT cobmisc_posted) AND (cobill_cobmisc_id=_cobmiscid) AND (coitem_id=_r.coitem_id)) LIMIT 1; IF (FOUND) THEN UPDATE cobill SET cobill_selectdate = CURRENT_DATE, cobill_select_username = getEffectiveXtUser(), cobill_qty = cobill_qty + _r.qty, cobill_toclose = _r.toclose, cobill_taxtype_id = _r.coitem_taxtype_id WHERE (cobill_id=_cobillid); ELSE -- Now insert the cobill line INSERT INTO cobill ( cobill_cobmisc_id, cobill_coitem_id, cobill_selectdate, cobill_select_username, cobill_qty, cobill_toclose, cobill_taxtype_id ) VALUES ( _cobmiscid, _r.coitem_id, CURRENT_DATE, getEffectiveXtUser(), _r.qty, _r.toclose, _r.coitem_taxtype_id ); END IF; END LOOP; RETURN _cobmiscid; END; $_$; 8DROP FUNCTION public.selectuninvoicedshipment(integer); publicadminfalse8399212551683334(selectuninvoicedshipments(integer, text)FUNCTIONCREATE FUNCTION selectuninvoicedshipments(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pCusttype ALIAS FOR $2; _r RECORD; _recordCounter INTEGER := 0; BEGIN -- Grab all of the uninvoiced shipitem records FOR _r IN SELECT DISTINCT shiphead_id FROM shiphead, shipitem, coitem, itemsite, cohead, custinfo, custtype WHERE ( (shiphead_order_type='SO') AND (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'C') AND (coitem_cohead_id=cohead_id) AND (cohead_cust_id=cust_id) AND (cust_custtype_id=custtype_id) AND ( (pWarehousid = -1) OR (itemsite_warehous_id=pWarehousid) ) AND (custtype_code ~ pCusttype) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_id NOT IN ( SELECT cobill_coitem_id FROM cobmisc, cobill WHERE ((cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) ) ) ) LOOP PERFORM selectUninvoicedShipment(_r.shiphead_id); _recordCounter := _recordCounter + 1; END LOOP; RETURN _recordCounter; END; $_$; ?DROP FUNCTION public.selectuninvoicedshipments(integer, text); publicadminfalse8399212551683335"selectuninvoicedshipments(integer)FUNCTIONCREATE FUNCTION selectuninvoicedshipments(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; _r RECORD; _recordCounter INTEGER := 0; BEGIN -- Grab all of the uninvoiced shipitem records FOR _r IN SELECT DISTINCT shiphead_id FROM shiphead, shipitem, coitem, itemsite WHERE ( (shiphead_order_type='SO') AND (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'C') AND ( (pWarehousid = -1) OR (itemsite_warehous_id=pWarehousid) ) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_id NOT IN ( SELECT cobill_coitem_id FROM cobmisc, cobill WHERE ((cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) ) ) ) LOOP PERFORM selectUninvoicedShipment(_r.shiphead_id); _recordCounter := _recordCounter + 1; END LOOP; RETURN _recordCounter; END; $_$; 9DROP FUNCTION public.selectuninvoicedshipments(integer); publicadminfalse8399212551683336+selectuninvoicedshipments(integer, integer)FUNCTIONCREATE FUNCTION selectuninvoicedshipments(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWarehousid ALIAS FOR $1; pCusttypeid ALIAS FOR $2; _r RECORD; _recordCounter INTEGER := 0; BEGIN -- Grab all of the uninvoiced shipitem records FOR _r IN SELECT DISTINCT shiphead_id FROM shiphead, shipitem, coitem, itemsite, cohead, custinfo WHERE ( (shiphead_order_type='SO') AND (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'C') AND (coitem_cohead_id=cohead_id) AND (cohead_cust_id=cust_id) AND (cust_custtype_id=pCusttypeid) AND ( (pWarehousid = -1) OR (itemsite_warehous_id=pWarehousid) ) AND (shiphead_shipped) AND (NOT shipitem_invoiced) AND (coitem_id NOT IN ( SELECT cobill_coitem_id FROM cobmisc, cobill WHERE ((cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) ) ) ) LOOP PERFORM selectUninvoicedShipment(_r.shiphead_id); _recordCounter := _recordCounter + 1; END LOOP; RETURN _recordCounter; END; $_$; BDROP FUNCTION public.selectuninvoicedshipments(integer, integer); publicadminfalse8399212551683337setapjournalnumber()FUNCTIONCREATE FUNCTION setapjournalnumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _journalNumber INTEGER; _r RECORD; BEGIN -- Fetch the next Journal Number SELECT fetchJournalNumber('A/P') INTO _journalNumber; -- Walk through all of the A/P Open Items FOR _r IN SELECT apopen_id, apopen_docnumber FROM apopen WHERE (NOT apopen_posted) LOOP -- Set the Journal Number for all of the G/L Transactions -- for the A/P Open Item UPDATE gltrans SET gltrans_journalnumber=_journalNumber WHERE ( (gltrans_source='P/O') AND (gltrans_doctype IN ('VO')) AND (gltrans_docnumber=_r.apopen_docnumber) AND (NOT gltrans_exported) ); -- Set the Journal Number for the A/P Open Item UPDATE apopen SET apopen_journalnumber=_journalNumber WHERE (apopen_id=_r.apopen_id); END LOOP; RETURN _journalNumber; END; $$; +DROP FUNCTION public.setapjournalnumber(); publicadminfalse8399212551683338setarjournalnumber()FUNCTIONCREATE FUNCTION setarjournalnumber() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _journalNumber INTEGER; _r RECORD; BEGIN -- Fetch the next Journal Number SELECT fetchJournalNumber('A/R') INTO _journalNumber; -- Walk through all of the A/R Open Items FOR _r IN SELECT aropen_id, aropen_docnumber FROM aropen WHERE (NOT aropen_posted) LOOP -- Set the Journal Number for all of the G/L Transactions -- for the A/R Open Item UPDATE gltrans SET gltrans_journalnumber=_journalNumber WHERE ( (gltrans_source='S/O') AND (gltrans_doctype IN ('CM', 'IN')) AND (gltrans_docnumber=_r.aropen_docnumber) AND (NOT gltrans_exported) ); -- Set the Journal Number for the A/R Open Item UPDATE aropen SET aropen_journalnumber=_journalNumber WHERE (aropen_id=_r.aropen_id); END LOOP; RETURN _journalNumber; END; $$; +DROP FUNCTION public.setarjournalnumber(); publicadminfalse8399212551683339$setbudget(integer, integer, numeric)FUNCTION~CREATE FUNCTION setbudget(integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; pAccntid ALIAS FOR $2; pAmount ALIAS FOR $3; BEGIN RETURN setBudget(1, pPeriodid, pAccntid, pAmount); END; $_$; ;DROP FUNCTION public.setbudget(integer, integer, numeric); publicadminfalse8399212551683340-setbudget(integer, integer, integer, numeric)FUNCTIONCREATE FUNCTION setbudget(integer, integer, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBudgheadid ALIAS FOR $1; pPeriodid ALIAS FOR $2; pAccntid ALIAS FOR $3; pAmount ALIAS FOR $4; _budgetid INTEGER; BEGIN SELECT budgitem_id INTO _budgetid FROM budgitem WHERE ((budgitem_period_id=pPeriodid) AND (budgitem_budghead_id=pBudgheadid) AND (budgitem_accnt_id=pAccntid)); IF (FOUND) THEN UPDATE budgitem SET budgitem_amount = pAmount WHERE (budgitem_id=_budgetid); ELSE SELECT nextval('budgitem_budgitem_id_seq') INTO _budgetid; INSERT INTO budgitem (budgitem_id, budgitem_budghead_id, budgitem_period_id, budgitem_accnt_id, budgitem_amount) VALUES(_budgetid, pBudgheadid, pPeriodid, pAccntid, pAmount); END IF; RETURN _budgetid; END; $_$; DDROP FUNCTION public.setbudget(integer, integer, integer, numeric); publicadminfalse8399212551683341setbytea(text)FUNCTIONQCREATE FUNCTION setbytea(text) RETURNS bytea LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMetricName ALIAS FOR $1; _value bytea; BEGIN _value := decode(pMetricName, 'escape'); RETURN _value; END; $_$; %DROP FUNCTION public.setbytea(text); publicadminfalse8399212551683342setbytea(bytea)FUNCTION@CREATE FUNCTION setbytea(bytea) RETURNS bytea LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMetricName ALIAS FOR $1; _value bytea; BEGIN _value := pMetricName; RETURN _value; END; $_$; &DROP FUNCTION public.setbytea(bytea); publicadminfalse8399212551683343setccbankaccnt(text, integer)FUNCTION#CREATE FUNCTION setccbankaccnt(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pccardtype ALIAS FOR $1; pbankaccntid ALIAS FOR $2; _ccbankid INTEGER; _numfound INTEGER; BEGIN RAISE DEBUG 'setCCBankAccount(%, %) entered', pccardtype, pbankaccntid; UPDATE ccbank SET ccbank_bankaccnt_id=pbankaccntid WHERE ccbank_ccard_type=pccardtype RETURNING ccbank_id INTO _ccbankid; GET DIAGNOSTICS _numfound = ROW_COUNT; IF (_numfound <= 0) THEN INSERT INTO ccbank (ccbank_ccard_type, ccbank_bankaccnt_id) VALUES (pccardtype, pbankaccntid) RETURNING _ccbankid; END IF; RETURN _ccbankid; END; $_$; 4DROP FUNCTION public.setccbankaccnt(text, integer); publicadminfalse8399212551683344seteffectivextuser(text)FUNCTIONzCREATE FUNCTION seteffectivextuser(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; BEGIN PERFORM initEffectiveXtUser(); PERFORM * FROM effective_user WHERE effective_key = 'username'; IF FOUND THEN UPDATE effective_user SET effective_value = pUsername WHERE effective_key = 'username'; ELSE INSERT INTO effective_user (effective_key, effective_value) VALUES('username', pUsername); END IF; RETURN true; END; $_$; /DROP FUNCTION public.seteffectivextuser(text); publicadminfalse8399212551683345setgljournalnumber(date, date)FUNCTIONCREATE FUNCTION setgljournalnumber(date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; pEndDate ALIAS FOR $2; _journalNumber INTEGER; BEGIN -- Fetch the next Journal Number SELECT fetchJournalNumber('G/L') INTO _journalNumber; -- Set the Journal Number for all of the unposted G/L Transactions -- in the passed date range. UPDATE gltrans SET gltrans_journalnumber=_journalNumber WHERE ( (NOT gltrans_exported) AND (gltrans_date BETWEEN pStartDate and pEndDate) ); RETURN _journalNumber; END; $_$; 5DROP FUNCTION public.setgljournalnumber(date, date); publicadminfalse8399212551683346setmetric(text, text)FUNCTION{CREATE FUNCTION setmetric(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMetricName ALIAS FOR $1; pMetricValue ALIAS FOR $2; _metricid INTEGER; BEGIN SELECT metric_id INTO _metricid FROM metric WHERE (metric_name=pMetricName); IF (FOUND) THEN UPDATE metric SET metric_value=pMetricValue WHERE (metric_id=_metricid); ELSE INSERT INTO metric (metric_name, metric_value) VALUES (pMetricName, pMetricValue); END IF; RETURN TRUE; END; $_$; ,DROP FUNCTION public.setmetric(text, text); publicadminfalse8399212551683347setmetricenc(text, text, text)FUNCTIONICREATE FUNCTION setmetricenc(text, text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMetricName ALIAS FOR $1; pMetricValue ALIAS FOR $2; pMetricEnc ALIAS FOR $3; _metricid INTEGER; _value bytea; _key bytea; BEGIN _value = decode(pMetricValue, 'escape'); _key = decode(pMetricEnc, 'escape'); SELECT metricenc_id INTO _metricid FROM metricenc WHERE (metricenc_name=pMetricName); IF (FOUND) THEN UPDATE metricenc SET metricenc_value=encrypt(_value, _key, 'bf') WHERE (metricenc_id=_metricid); ELSE INSERT INTO metricenc (metricenc_name, metricenc_value) VALUES (pMetricName, encrypt(_value, _key, 'bf')); END IF; RETURN TRUE; END; $_$; 5DROP FUNCTION public.setmetricenc(text, text, text); publicadminfalse8399212551683348setnextapmemonumber(integer)FUNCTIONwCREATE FUNCTION setnextapmemonumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='APMemoNumber'); IF (FOUND) THEN UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_id=_orderseqid); ELSE INSERT INTO orderseq (orderseq_name, orderseq_number) VALUES ('APMemoNumber', pNumber); END IF; RETURN 1; END; $_$; 3DROP FUNCTION public.setnextapmemonumber(integer); publicadminfalse8399212551683349setnextarmemonumber(integer)FUNCTIONwCREATE FUNCTION setnextarmemonumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='ARMemoNumber'); IF (FOUND) THEN UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_id=_orderseqid); ELSE INSERT INTO orderseq (orderseq_name, orderseq_number) VALUES ('ARMemoNumber', pNumber); END IF; RETURN 1; END; $_$; 3DROP FUNCTION public.setnextarmemonumber(integer); publicadminfalse8399212551683350setnextcashrcptnumber(integer)FUNCTION}CREATE FUNCTION setnextcashrcptnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='CashRcptNumber'); IF (FOUND) THEN UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_id=_orderseqid); ELSE INSERT INTO orderseq (orderseq_name, orderseq_number) VALUES ('CashRcptNumber', pNumber); END IF; RETURN 1; END; $_$; 5DROP FUNCTION public.setnextcashrcptnumber(integer); publicadminfalse8399212551683351$setnextchecknumber(integer, integer)FUNCTIONCREATE FUNCTION setnextchecknumber(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankaccntid ALIAS FOR $1; pNextCheckNumber ALIAS FOR $2; BEGIN UPDATE bankaccnt SET bankaccnt_nextchknum=pNextCheckNumber WHERE (bankaccnt_id=pBankaccntid); RETURN TRUE; END; $_$; ;DROP FUNCTION public.setnextchecknumber(integer, integer); publicadminfalse8399212551683352setnextcmnumber(integer)FUNCTIONCREATE FUNCTION setnextcmnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='CmNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'CmNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='CmNumber'); END IF; RETURN _orderseqid; END; $_$; /DROP FUNCTION public.setnextcmnumber(integer); publicadminfalse8399212551683353 setnextcrmaccountnumber(integer)FUNCTIONCREATE FUNCTION setnextcrmaccountnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='CRMAccountNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'CRMAccountNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='CRMAccountNumber'); END IF; RETURN _orderseqid; END; $_$; 7DROP FUNCTION public.setnextcrmaccountnumber(integer); publicadminfalse8399212551683354setnextincidentnumber(integer)FUNCTIONCREATE FUNCTION setnextincidentnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='IncidentNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'IncidentNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='IncidentNumber'); END IF; RETURN _orderseqid; END; $_$; 5DROP FUNCTION public.setnextincidentnumber(integer); publicadminfalse8399212551683355setnextinvcnumber(integer)FUNCTIONCREATE FUNCTION setnextinvcnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='InvcNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'InvcNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='InvcNumber'); END IF; RETURN _orderseqid; END; $_$; 1DROP FUNCTION public.setnextinvcnumber(integer); publicadminfalse8399212551683356setnextnumber(text, integer)FUNCTION CREATE FUNCTION setnextnumber(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE psequence ALIAS FOR $1; pnumber ALIAS FOR $2; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name=psequence); IF (NOT FOUND) THEN INSERT INTO orderseq (orderseq_name, orderseq_number, orderseq_table, orderseq_numcol) VALUES (psequence, pnumber, CASE WHEN (psequence='APMemoNumber') THEN 'apopen' WHEN (psequence='ARMemoNumber') THEN 'aropen' WHEN (psequence='CmNumber') THEN 'cmhead' WHEN (psequence='IncidentNumber') THEN 'incdt' WHEN (psequence='InvcNumber') THEN 'invchead' WHEN (psequence='JournalNumber') THEN 'gltrans' WHEN (psequence='PlanNumber') THEN 'planord' WHEN (psequence='PoNumber') THEN 'pohead' WHEN (psequence='PrNumber') THEN 'pr' WHEN (psequence='QuNumber') THEN 'quhead' WHEN (psequence='ShipmentNumber') THEN 'shiphead' WHEN (psequence='SoNumber') THEN 'cohead' WHEN (psequence='ToNumber') THEN 'tohead' WHEN (psequence='VcNumber') THEN 'vohead' WHEN (psequence='WoNumber') THEN 'wo' ELSE '' END, CASE WHEN (psequence='APMemoNumber') THEN 'apopen_docnumber' WHEN (psequence='ARMemoNumber') THEN 'aropen_docnumber' WHEN (psequence='CmNumber') THEN 'cmhead_number' WHEN (psequence='IncidentNumber') THEN 'incdt_number' WHEN (psequence='InvcNumber') THEN 'invchead_invcnumber' WHEN (psequence='JournalNumber') THEN 'gltrans_journalnumber' WHEN (psequence='PlanNumber') THEN 'planord_number' WHEN (psequence='PoNumber') THEN 'pohead_number' WHEN (psequence='PrNumber') THEN 'pr_number' WHEN (psequence='QuNumber') THEN 'quhead_number' WHEN (psequence='ShipmentNumber') THEN 'shiphead_number' WHEN (psequence='SoNumber') THEN 'cohead_number' WHEN (psequence='ToNumber') THEN 'tohead_number' WHEN (psequence='VcNumber') THEN 'vohead_number' WHEN (psequence='WoNumber') THEN 'wo_number' ELSE '' END ); ELSE UPDATE orderseq SET orderseq_number=pnumber WHERE (orderseq_name=psequence); END IF; RETURN 0; END; $_$; 3DROP FUNCTION public.setnextnumber(text, integer); publicadminfalse8399212551683357setnextponumber(integer)FUNCTIONCREATE FUNCTION setnextponumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='PoNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'PoNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='PoNumber'); END IF; RETURN _orderseqid; END; $_$; /DROP FUNCTION public.setnextponumber(integer); publicadminfalse8399212551683358setnextprnumber(integer)FUNCTIONCREATE FUNCTION setnextprnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='PrNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'PrNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='PrNumber'); END IF; RETURN _orderseqid; END; $_$; /DROP FUNCTION public.setnextprnumber(integer); publicadminfalse8399212551683359setnextqunumber(integer)FUNCTIONCREATE FUNCTION setnextqunumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pQuNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='QuNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'QuNumber', pQuNumber); ELSE UPDATE orderseq SET orderseq_number=pQuNumber WHERE (orderseq_name='QuNumber'); END IF; RETURN _orderseqid; END; $_$; /DROP FUNCTION public.setnextqunumber(integer); publicadminfalse8399212551683360setnextshipmentnumber(integer)FUNCTIONCREATE FUNCTION setnextshipmentnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pShipmentNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='ShipmentNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'ShipmentNumber', pShipmentNumber); ELSE UPDATE orderseq SET orderseq_number=pShipmentNumber WHERE (orderseq_name='ShipmentNumber'); END IF; RETURN _orderseqid; END; $_$; 5DROP FUNCTION public.setnextshipmentnumber(integer); publicadminfalse8399212551683361setnextsonumber(integer)FUNCTIONCREATE FUNCTION setnextsonumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSoNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='SoNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'SoNumber', pSoNumber); ELSE UPDATE orderseq SET orderseq_number=pSoNumber WHERE (orderseq_name='SoNumber'); END IF; RETURN _orderseqid; END; $_$; /DROP FUNCTION public.setnextsonumber(integer); publicadminfalse8399212551683362setnextvcnumber(integer)FUNCTIONCREATE FUNCTION setnextvcnumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='VcNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'VcNumber', pNumber); ELSE UPDATE orderseq SET orderseq_number=pNumber WHERE (orderseq_name='VcNumber'); END IF; RETURN _orderseqid; END; $_$; /DROP FUNCTION public.setnextvcnumber(integer); publicadminfalse8399212551683363setnextwonumber(integer)FUNCTIONCREATE FUNCTION setnextwonumber(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pWoNumber ALIAS FOR $1; _orderseqid INTEGER; BEGIN SELECT orderseq_id INTO _orderseqid FROM orderseq WHERE (orderseq_name='WoNumber'); IF (NOT FOUND) THEN SELECT NEXTVAL('orderseq_orderseq_id_seq') INTO _orderseqid; INSERT INTO orderseq (orderseq_id, orderseq_name, orderseq_number) VALUES (_orderseqid, 'WoNumber', pWoNumber); ELSE UPDATE orderseq SET orderseq_number=pWoNumber WHERE (orderseq_name='WoNumber'); END IF; RETURN _orderseqid; END; $_$; /DROP FUNCTION public.setnextwonumber(integer); publicadminfalse8399212552005585$setusercancreateusers(text, boolean)FUNCTIONCREATE FUNCTION setusercancreateusers(pusername text, pcreateuser boolean) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN IF (pCreateUser) THEN EXECUTE 'ALTER USER "' || pUsername || '" CREATEROLE;'; ELSE EXECUTE 'ALTER USER "' || pUsername || '" NOCREATEROLE;'; END IF; RETURN TRUE; END; $$; QDROP FUNCTION public.setusercancreateusers(pusername text, pcreateuser boolean); publicadminfalse8399212551683365setuserpreference(text, text)FUNCTIONvCREATE FUNCTION setuserpreference(text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPrefName ALIAS FOR $1; pPrefValue ALIAS FOR $2; BEGIN RETURN setUserPreferences(getEffectiveXtUser(), pPrefName, pPrefValue); END; $_$; 4DROP FUNCTION public.setuserpreference(text, text); publicadminfalse8399212551683366#setuserpreference(text, text, text)FUNCTIONCREATE FUNCTION setuserpreference(text, text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; pPrefName ALIAS FOR $2; pPrefValue ALIAS FOR $3; _usrprefid INTEGER; BEGIN SELECT usrpref_id INTO _usrprefid FROM usrpref WHERE ( (usrpref_username=pUsername) AND (usrpref_name=pPrefName) ); IF (FOUND) THEN UPDATE usrpref SET usrpref_value=pPrefValue WHERE (usrpref_id=_usrprefid); ELSE INSERT INTO usrpref (usrpref_username, usrpref_name, usrpref_value) VALUES (pUsername, pPrefName, pPrefValue); END IF; RETURN TRUE; END; $_$; :DROP FUNCTION public.setuserpreference(text, text, text); publicadminfalse8399212551683367shipments(text)FUNCTIONrCREATE FUNCTION shipments(text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; BEGIN IF (pTransType IN ('SC', 'SV', 'SH', 'RS', 'TS')) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; &DROP FUNCTION public.shipments(text); publicadminfalse83992:12551683368shipshipment(integer)FUNCTIONCREATE FUNCTION shipshipment(integer) RETURNS integer LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT shipShipment($1, CURRENT_TIMESTAMP); $_$; ,DROP FUNCTION public.shipshipment(integer); publicadminfalse8;12551683369/shipshipment(integer, timestamp with time zone)FUNCTION5CREATE FUNCTION shipshipment(integer, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pshipheadid ALIAS FOR $1; _timestamp TIMESTAMP WITH TIME ZONE := $2; _billedQty NUMERIC; _c RECORD; _coholdtype TEXT; _gldate DATE; _invhistid INTEGER; _itemlocSeries INTEGER; _lineitemsToClose INTEGER[]; _newQty NUMERIC; _result INTEGER; _s RECORD; _shipcomplete BOOLEAN; _shiphead RECORD; _ti RECORD; _to RECORD; _variance NUMERIC; _k RECORD; BEGIN IF (_timestamp IS NULL) THEN _timestamp := CURRENT_TIMESTAMP; END IF; _gldate := _timestamp::DATE; SELECT * INTO _shiphead FROM shiphead WHERE (shiphead_id=pshipheadid); IF (NOT FOUND) THEN RETURN -50; END IF; IF (_shiphead.shiphead_order_type = 'SO') THEN SELECT cohead_shipcomplete, cohead_holdtype INTO _shipcomplete, _coholdtype FROM cohead, shiphead WHERE ((shiphead_order_id=cohead_id) AND (NOT shiphead_shipped) AND (shiphead_order_type=_shiphead.shiphead_order_type) AND (shiphead_id=pshipheadid)); IF (_coholdtype = 'C') THEN RETURN -12; ELSIF (_coholdtype = 'P') THEN RETURN -13; ELSIF (_coholdtype = 'R') THEN RETURN -14; ELSIF (_coholdtype = 'S') THEN RETURN -15; END IF; ---Must Ship Kit components (coitem_subnumber <> 0 complete--------------- IF (( -- Test to see if order's customer accepts backorders and partials -- If not then test for shipping kit components complete SELECT cohead_number FROM shiphead, cohead, custinfo WHERE (shiphead_order_id = cohead_id) AND (cohead_cust_id = cust_id) AND (shiphead_order_type = 'SO') AND (cust_partialship) AND (cust_backorder) AND (shiphead_id = pshipheadid) ) IS NULL) THEN FOR _k IN SELECT (coitem_qtyord - (COALESCE(SUM(shipitem_qty),0) + (coitem_qtyshipped - coitem_qtyreturned))) AS remain FROM (coitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id)) ON (coitem_itemsite_id=itemsite_id)) LEFT OUTER JOIN shipitem ON (shipitem_orderitem_id=coitem_id AND shipitem_shiphead_id=pshipheadid) WHERE ((coitem_status NOT IN ('C','X')) AND (item_type != 'K') AND (coitem_cohead_id=_shiphead.shiphead_order_id) AND (coitem_subnumber <> 0) ) GROUP BY coitem_id, coitem_qtyshipped, coitem_qtyord, coitem_qtyreturned LOOP IF (_k.remain > 0) THEN RAISE EXCEPTION 'Kit component item not shipped complete. Kits must be shipped and shipped complete or closed on the order.'; END IF; END LOOP; END IF; ---End-------------------------------------------------------------------- IF ( _shipcomplete ) THEN FOR _c IN SELECT (coitem_qtyord - (COALESCE(SUM(shipitem_qty),0) + (coitem_qtyshipped - coitem_qtyreturned))) AS remain FROM (coitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id)) ON (coitem_itemsite_id=itemsite_id)) LEFT OUTER JOIN shipitem ON (shipitem_orderitem_id=coitem_id AND shipitem_shiphead_id=pshipheadid) WHERE ((coitem_status<>'X') AND (item_type != 'K') AND (coitem_cohead_id=_shiphead.shiphead_order_id)) GROUP BY coitem_id, coitem_qtyshipped, coitem_qtyord, coitem_qtyreturned LOOP IF (_c.remain > 0) THEN RETURN -99; END IF; END LOOP; END IF; FOR _c IN SELECT coitem_id, cohead_number, cohead_cust_id, cohead_billtoname, cohead_prj_id, cohead_saletype_id, cohead_shipzone_id, itemsite_id, itemsite_item_id, coitem_qty_invuomratio, coitem_warranty, coitem_cos_accnt_id, SUM(shipitem_qty) AS _qty, SUM(shipitem_value) AS _value FROM coitem, cohead, shiphead, shipitem, itemsite WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (shiphead_order_id=cohead_id) AND (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=coitem_id) AND (NOT shiphead_shipped) AND (shiphead_id=pshipheadid) ) GROUP BY coitem_id, coitem_qty_invuomratio, cohead_number, cohead_cust_id, cohead_billtoname, itemsite_id, itemsite_item_id, coitem_warranty, coitem_cos_accnt_id, cohead_prj_id, cohead_saletype_id, cohead_shipzone_id LOOP IF _c._value > 0 THEN -- Distribute to G/L, credit Shipping Asset, debit COS SELECT MIN(insertGLTransaction( 'S/R', 'SH', _shiphead.shiphead_number, ('Ship Order ' || _c.cohead_number || ' for Customer ' || _c.cohead_billtoname), getPrjAccntId(_c.cohead_prj_id, costcat_shipasset_accnt_id), CASE WHEN (COALESCE(_c.coitem_cos_accnt_id, -1) != -1) THEN getPrjAccntId(_c.cohead_prj_id, _c.coitem_cos_accnt_id) WHEN (_c.coitem_warranty=TRUE) THEN getPrjAccntId(_c.cohead_prj_id, resolveCOWAccount(itemsite_id, _c.cohead_cust_id, _c.cohead_saletype_id, _c.cohead_shipzone_id)) ELSE getPrjAccntId(_c.cohead_prj_id, resolveCOSAccount(itemsite_id, _c.cohead_cust_id, _c.cohead_saletype_id, _c.cohead_shipzone_id)) END, -1, _c._value, _gldate )) INTO _result FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_c.itemsite_id) ); IF (_result < 0 AND _result != -3) THEN -- ignore -3 as it just means it's not posting a 0 value RETURN _result; END IF; END IF; UPDATE coitem SET coitem_qtyshipped = (coitem_qtyshipped + _c._qty) WHERE (coitem_id=_c.coitem_id); -- check to see if we have more invoiced than shipped items -- if we do we will need to mark some of these records as invoiced SELECT noNeg(( SELECT COALESCE(SUM(cobill_qty), 0.0) FROM cobill, cobmisc, coitem WHERE ( (cobill_cobmisc_id=cobmisc_id) AND (cobmisc_cohead_id=coitem_cohead_id) AND (cobill_coitem_id=coitem_id) AND (cobmisc_posted) AND (coitem_id=_c.coitem_id) ) ) - ( SELECT COALESCE(SUM(shipitem_qty), 0.0) FROM shipitem, shiphead, coitem WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shiphead_order_id=coitem_cohead_id) AND (shipitem_orderitem_id=coitem_id) AND (shiphead_order_type=_shiphead.shiphead_order_type) AND (shiphead_shipped) AND (coitem_id=_c.coitem_id) ) ) ) INTO _billedQty; IF (_billedQty > 0.0) THEN FOR _s IN SELECT shipitem_id, shipitem_qty FROM shipitem, shiphead WHERE ( (shipitem_shiphead_id=shiphead_id) AND (shipitem_orderitem_id=_c.coitem_id) AND (shiphead_order_type=_shiphead.shiphead_order_type) AND (NOT shiphead_shipped) AND (shiphead_id=pshipheadid) ) ORDER BY shipitem_qty LOOP IF (_billedQty > 0.0) THEN IF (_billedQty >= _s.shipitem_qty) THEN UPDATE shipitem SET shipitem_invoiced=TRUE WHERE shipitem_id=_s.shipitem_id; -- must wait to close coitems until after shiphead_shipped -> true _lineitemsToClose := _lineitemsToClose || _c.coitem_id; ELSE _newQty := _s.shipitem_qty - _billedQty; UPDATE shipitem SET shipitem_invoiced=TRUE, shipitem_qty=_billedQty WHERE shipitem_id=_s.shipitem_id; INSERT INTO shipitem ( shipitem_orderitem_id, shipitem_shipdate, shipitem_qty, shipitem_transdate, shipitem_invoiced, shipitem_shiphead_id, shipitem_trans_username) SELECT shipitem_orderitem_id, shipitem_shipdate, _newQty, shipitem_transdate, FALSE, shipitem_shiphead_id, shipitem_trans_username FROM shipitem WHERE (shipitem_id=_s.shipitem_id); END IF; _billedQty := _billedQty - _s.shipitem_qty; END IF; END LOOP; END IF; END LOOP; ELSEIF (_shiphead.shiphead_order_type = 'TO') THEN IF (_shiphead.shiphead_shipped) THEN RETURN -8; END IF; SELECT tohead.* INTO _to FROM tohead WHERE (tohead_id=_shiphead.shiphead_order_id); IF ( _to.tohead_shipcomplete ) THEN -- use sufficientInventory...()? FOR _ti IN SELECT (toitem_qty_ordered - (COALESCE(SUM(shipitem_qty),0) + toitem_qty_shipped)) AS remain FROM toitem LEFT OUTER JOIN shipitem ON (shipitem_orderitem_id=toitem_id) WHERE ((toitem_status<>'X') AND (toitem_tohead_id=_shiphead.shiphead_order_id)) GROUP BY toitem_qty_shipped, toitem_qty_ordered LOOP IF (_ti.remain > 0) THEN RETURN -99; END IF; END LOOP; END IF; FOR _ti IN SELECT toitem_id, toitem_item_id, SUM(shipitem_qty) AS qty, SUM(shipitem_value) AS value FROM toitem, shipitem WHERE ((toitem_tohead_id=_to.tohead_id) AND (shipitem_orderitem_id=toitem_id) AND (shipitem_shiphead_id=pshipheadid)) GROUP BY toitem_id, toitem_item_id LOOP IF (NOT EXISTS(SELECT itemsite_id FROM itemsite WHERE ((itemsite_item_id=_ti.toitem_item_id) AND (itemsite_warehous_id = _to.tohead_trns_warehous_id)) )) THEN RETURN -6; END IF; _itemlocSeries := NEXTVAL('itemloc_series_seq'); SELECT postInvTrans(si.itemsite_id, 'TS', _ti.qty, 'I/M', _shiphead.shiphead_order_type, formatToNumber(_ti.toitem_id), _to.tohead_number, 'Ship from Src to Transit Warehouse', tc.costcat_asset_accnt_id, sc.costcat_shipasset_accnt_id, _itemlocSeries, _timestamp, _ti.value) INTO _invhistid FROM itemsite AS ti, costcat AS tc, itemsite AS si, costcat AS sc WHERE ( (ti.itemsite_costcat_id=tc.costcat_id) AND (si.itemsite_costcat_id=sc.costcat_id) AND (ti.itemsite_item_id=_ti.toitem_item_id) AND (si.itemsite_item_id=_ti.toitem_item_id) AND (ti.itemsite_warehous_id=_to.tohead_trns_warehous_id) AND (si.itemsite_warehous_id=_to.tohead_src_warehous_id) ); --We do not need to distribute lot/serial info for transit, post trans and discard dist detail PERFORM postIntoTrialBalance(itemlocpost_glseq) FROM itemlocpost WHERE (itemlocpost_itemlocseries=_itemlocSeries); PERFORM postInvHist(_invhistid); DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); DELETE FROM itemlocpost WHERE (itemlocpost_itemlocSeries=_itemlocSeries); IF (_result < 0) THEN RETURN _result; END IF; -- record inventory history and qoh changes at transit warehouse but -- there is only one g/l account to touch SELECT postInvTrans(ti.itemsite_id, 'TR', _ti.qty, 'I/M', _shiphead.shiphead_order_type, formatToNumber(_ti.toitem_id), _to.tohead_number, 'Receive into Transit from Src Warehouse', tc.costcat_asset_accnt_id, tc.costcat_asset_accnt_id, _itemlocSeries, _timestamp, _ti.value) INTO _invhistid FROM itemsite AS ti, costcat AS tc WHERE ((ti.itemsite_costcat_id=tc.costcat_id) AND (ti.itemsite_item_id=_ti.toitem_item_id) AND (ti.itemsite_warehous_id=_to.tohead_trns_warehous_id)); --We do not need to distribute lot/serial info for transit, post trans and discard dist detail PERFORM postIntoTrialBalance(itemlocpost_glseq) FROM itemlocpost WHERE (itemlocpost_itemlocseries=_itemlocSeries); PERFORM postInvHist(_invhistid); DELETE FROM itemlocdist WHERE (itemlocdist_series=_itemlocSeries); DELETE FROM itemlocpost WHERE (itemlocpost_itemlocSeries=_itemlocSeries); --See if there was a change in values during the transfer, if so record the variance SELECT (invhist_invqty * invhist_unitcost - _ti.value) INTO _variance FROM invhist WHERE (invhist_id=_invhistid); IF (_variance > 0) THEN PERFORM insertGLTransaction( 'S/R', _shiphead.shiphead_order_type, _to.tohead_number, 'Transfer Order - Transfer Variance', tc.costcat_invcost_accnt_id, tc.costcat_asset_accnt_id, _invhistid, _variance, CAST(_timestamp AS DATE) ) FROM itemsite AS ti, costcat AS tc WHERE ( (ti.itemsite_costcat_id=tc.costcat_id) AND (ti.itemsite_item_id=_ti.toitem_item_id) AND (ti.itemsite_warehous_id=_to.tohead_trns_warehous_id) ); END IF; IF (_result < 0) THEN RETURN _result; END IF; UPDATE shipitem SET shipitem_shipdate=_timestamp, shipitem_shipped=TRUE WHERE ((shipitem_orderitem_id=_ti.toitem_id) AND (shipitem_shiphead_id=pshipheadid)); UPDATE toitem SET toitem_qty_shipped = (toitem_qty_shipped + _ti.qty) WHERE (toitem_id=_ti.toitem_id); END LOOP; END IF; UPDATE shiphead SET shiphead_shipped=TRUE, shiphead_shipdate=_gldate WHERE (shiphead_id=pshipheadid); -- now try to close line items that are fully shipped and invoiced IF (_shiphead.shiphead_order_type = 'SO') THEN UPDATE coitem SET coitem_status='C' WHERE ((coitem_id = ANY (_lineitemsToClose)) AND (coitem_qtyshipped >= coitem_qtyord)); END IF; RETURN _itemlocSeries; END; $_$; FDROP FUNCTION public.shipshipment(integer, timestamp with time zone); publicadminfalse8399212551683371Asinglecharacteristicstostring(text, integer, text, text, integer)FUNCTIONCREATE FUNCTION singlecharacteristicstostring(text, integer, text, text, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetId ALIAS FOR $2; pValKeySep ALIAS FOR $3; pPairSep ALIAS FOR $4; pCharId ALIAS FOR $5; _string TEXT := ''; _extra BOOLEAN := false; _r RECORD; BEGIN FOR _r IN SELECT char_name, charass_value FROM charass, char WHERE ((charass_char_id=char_id) AND (charass_char_id=pCharId) AND (charass_target_type=pTargetType) AND (charass_target_id=pTargetId)) LOOP IF(_extra) THEN _string := _string || pPairSep; END IF; _extra := true; _string := _string || _r.char_name || pValKeySep || _r.charass_value; END LOOP; RETURN _string; END; $_$; XDROP FUNCTION public.singlecharacteristicstostring(text, integer, text, text, integer); publicadminfalse83992125520055872singlelevelbom(integer, integer, integer, integer)FUNCTION%CREATE FUNCTION singlelevelbom(integer, integer, integer, integer) RETURNS SETOF bomdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; pExpiredDays ALIAS FOR $3; pFutureDays ALIAS FOR $4; _row bomdata%ROWTYPE; _bomworksetid INTEGER; _x RECORD; _check CHAR(1); _inactive BOOLEAN; _batchsize NUMERIC; BEGIN _inactive := FALSE; IF (pRevisionid != -1) THEN --Is this a deactivated revision? SELECT rev_status INTO _check FROM rev WHERE ((rev_id=pRevisionid) AND (rev_status='I')); IF (FOUND) THEN _inactive := TRUE; END IF; END IF; -- Get the batch quantity SELECT COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=pRevisionid))),1) INTO _batchsize; IF NOT (_inactive) THEN FOR _x IN SELECT bomitem_id, bomitem_seqnumber, bomitem_seqnumber AS f_bomitem_seqnumber, item_id, item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, bomitem_scrap, bomitem_createwo, CASE WHEN (bomitem_issuemethod='S') THEN 'Push' WHEN (bomitem_issuemethod='L') THEN 'Pull' WHEN (bomitem_issuemethod='M') THEN 'Mixed' ELSE 'Special' END AS issuemethod, bomitem_effective, bomitem_expires, CASE WHEN (bomitem_expires <= CURRENT_DATE) THEN TRUE ELSE FALSE END AS expired, CASE WHEN (bomitem_effective > CURRENT_DATE) THEN TRUE ELSE FALSE END AS future, actcost(bomitem_item_id, bomitem_id) AS actunitcost, stdcost(bomitem_item_id, bomitem_id) AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * actcost(bomitem_item_id, bomitem_id) ELSE 0.0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * stdcost(bomitem_item_id, bomitem_id) ELSE 0.0 END AS stdextendedcost, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref FROM bomitem(pItemid,pRevisionid), item, uom WHERE ( (item_inv_uom_id=uom_id) AND (bomitem_item_id=item_id) AND (bomitem_expires > (CURRENT_DATE - pExpiredDays)) AND (bomitem_effective <= (CURRENT_DATE + pFutureDays)) ) UNION SELECT -1, -1, NULL, -1, costelem_type AS bomdata_item_number, '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, false,false, currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actunitcost, itemcost_stdcost AS stdunitcost, currToBase(itemcost_curr_id, itemcost_actcost, CURRENT_DATE) AS actextendedcost, itemcost_stdcost AS stdextendedcost, NULL, NULL, NULL, NULL FROM itemcost, costelem WHERE ( (itemcost_costelem_id=costelem_id) AND (NOT itemcost_lowlevel) AND (itemcost_item_id=pItemid) ) ORDER BY bomitem_seqnumber, bomitem_effective, item_number LOOP _row.bomdata_bomitem_id := _x.bomitem_id; _row.bomdata_bomwork_seqnumber := _x.f_bomitem_seqnumber; _row.bomdata_item_id := _x.item_id; _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_batchsize := _batchsize; _row.bomdata_qtyfxd := _x.qtyfxd; _row.bomdata_qtyper := _x.qtyper; _row.bomdata_scrap := _x.bomitem_scrap; _row.bomdata_createchild := _x.bomitem_createwo; _row.bomdata_issuemethod := _x.issuemethod; _row.bomdata_effective := _x.bomitem_effective; _row.bomdata_expires := _x.bomitem_expires; _row.bomdata_expired := _x.expired; _row.bomdata_future := _x.future; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_char_id := _x.bomitem_char_id; _row.bomdata_value := _x.bomitem_value; _row.bomdata_notes := _x.bomitem_notes; _row.bomdata_ref := _x.bomitem_ref; RETURN NEXT _row; END LOOP; ELSE -- Use historical snapshot for inactive revisions FOR _x IN SELECT bomitem_id, bomitem_seqnumber, bomitem_seqnumber AS f_bomitem_seqnumber, item_id, item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, bomitem_scrap, bomitem_createwo, CASE WHEN (bomitem_issuemethod='S') THEN 'Push' WHEN (bomitem_issuemethod='L') THEN 'Pull' WHEN (bomitem_issuemethod='M') THEN 'Mixed' ELSE 'Special' END AS issuemethod, bomitem_effective, bomitem_expires, CASE WHEN (bomitem_expires <= CURRENT_DATE) THEN TRUE ELSE FALSE END AS expired, CASE WHEN (bomitem_effective > CURRENT_DATE) THEN TRUE ELSE FALSE END AS future, actcost(bomitem_item_id) AS actunitcost, stdcost(bomitem_item_id) AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * actcost(bomitem_item_id) ELSE 0.0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd/_batchsize + bomitem_qtyper) * (1 + bomitem_scrap), 'qtyper') * stdcost(bomitem_item_id) ELSE 0.0 END AS stdextendedcost, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref FROM bomitem(pItemid,pRevisionid), item, uom WHERE ( (item_inv_uom_id=uom_id) AND (bomitem_item_id=item_id) AND (bomitem_expires > (CURRENT_DATE - pExpiredDays)) AND (bomitem_effective <= (CURRENT_DATE + pFutureDays)) ) UNION SELECT -1, -1, NULL, -1, costelem_type AS bomdata_item_number, '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, false,false, bomhist_actunitcost AS actunitcost, bomhist_stdunitcost AS stdunitcost, bomhist_actunitcost AS actextendedcost, bomhist_stdunitcost AS stdextendedcost, NULL, NULL, NULL, NULL FROM bomhist, costelem WHERE ( (bomhist_item_id=costelem_id) AND (bomhist_item_type='E') AND (bomhist_rev_id=pRevisionid) ) ORDER BY bomitem_seqnumber, bomitem_effective, item_number LOOP _row.bomdata_bomitem_id := _x.bomitem_id; _row.bomdata_bomwork_seqnumber := _x.f_bomitem_seqnumber; _row.bomdata_item_id := _x.item_id; _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_batchsize := _batchsize; _row.bomdata_qtyfxd := _x.qtyfxd; _row.bomdata_qtyper := _x.qtyper; _row.bomdata_scrap := _x.bomitem_scrap; _row.bomdata_createchild := _x.bomitem_createwo; _row.bomdata_issuemethod := _x.issuemethod; _row.bomdata_effective := _x.bomitem_effective; _row.bomdata_expires := _x.bomitem_expires; _row.bomdata_expired := _x.expired; _row.bomdata_future := _x.future; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_char_id := _x.bomitem_char_id; _row.bomdata_value := _x.bomitem_value; _row.bomdata_notes := _x.bomitem_notes; _row.bomdata_ref := _x.bomitem_ref; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; IDROP FUNCTION public.singlelevelbom(integer, integer, integer, integer); publicadminfalse83992257712551683374site()FUNCTIONKCREATE FUNCTION site() RETURNS SETOF whsinfo LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row whsinfo%ROWTYPE; _r RECORD; BEGIN IF ( (fetchMetricBool('MultiWhs')) AND (SELECT (COUNT(usrpref_id)=1) FROM usrpref WHERE ((usrpref_name='selectedSites') AND (usrpref_value='t') AND (usrpref_username=getEffectiveXtUser()))) ) THEN FOR _r IN SELECT * FROM whsinfo,usrsite WHERE ((warehous_id=usrsite_warehous_id) AND (usrsite_username=getEffectiveXtUser())) LOOP _row.warehous_id:=_r.warehous_id; _row.warehous_code:=_r.warehous_code; _row.warehous_descrip:=_r.warehous_descrip; _row.warehous_fob:=_r.warehous_fob; _row.warehous_active:=_r.warehous_active; _row.warehous_counttag_prefix:=_r.warehous_counttag_prefix; _row.warehous_counttag_number:=_r.warehous_counttag_number; _row.warehous_bol_prefix:=_r.warehous_bol_prefix; _row.warehous_bol_number:=_r.warehous_bol_number; _row.warehous_shipping:=_r.warehous_shipping; _row.warehous_useslips:=_r.warehous_useslips; _row.warehous_usezones:=_r.warehous_usezones; _row.warehous_aislesize:=_r.warehous_aislesize; _row.warehous_racksize:=_r.warehous_racksize; _row.warehous_binsize:=_r.warehous_binsize; _row.warehous_binalpha:=_r.warehous_binalpha; _row.warehous_locationsize:=_r.warehous_locationsize; _row.warehous_locationalpha:=_r.warehous_locationalpha; _row.warehous_enforcearbl:=_r.warehous_enforcearbl; _row.warehous_default_accnt_id:=_r.warehous_default_accnt_id; _row.warehous_shipping_commission:=_r.warehous_shipping_commission; _row.warehous_cntct_id:=_r.warehous_cntct_id; _row.warehous_addr_id:=_r.warehous_addr_id; _row.warehous_taxzone_id:=_r.warehous_taxzone_id; _row.warehous_transit:=_r.warehous_transit; _row.warehous_shipform_id:=_r.warehous_shipform_id; _row.warehous_shipvia_id:=_r.warehous_shipvia_id; _row.warehous_shipcomments:=_r.warehous_shipcomments; _row.warehous_costcat_id:=_r.warehous_costcat_id; _row.warehous_sitetype_id:=_r.warehous_sitetype_id; RETURN NEXT _row; END LOOP; ELSE FOR _r IN SELECT * FROM whsinfo LOOP _row.warehous_id:=_r.warehous_id; _row.warehous_code:=_r.warehous_code; _row.warehous_descrip:=_r.warehous_descrip; _row.warehous_fob:=_r.warehous_fob; _row.warehous_active:=_r.warehous_active; _row.warehous_counttag_prefix:=_r.warehous_counttag_prefix; _row.warehous_counttag_number:=_r.warehous_counttag_number; _row.warehous_bol_prefix:=_r.warehous_bol_prefix; _row.warehous_bol_number:=_r.warehous_bol_number; _row.warehous_shipping:=_r.warehous_shipping; _row.warehous_useslips:=_r.warehous_useslips; _row.warehous_usezones:=_r.warehous_usezones; _row.warehous_aislesize:=_r.warehous_aislesize; _row.warehous_racksize:=_r.warehous_racksize; _row.warehous_binsize:=_r.warehous_binsize; _row.warehous_binalpha:=_r.warehous_binalpha; _row.warehous_locationsize:=_r.warehous_locationsize; _row.warehous_locationalpha:=_r.warehous_locationalpha; _row.warehous_enforcearbl:=_r.warehous_enforcearbl; _row.warehous_default_accnt_id:=_r.warehous_default_accnt_id; _row.warehous_shipping_commission:=_r.warehous_shipping_commission; _row.warehous_cntct_id:=_r.warehous_cntct_id; _row.warehous_addr_id:=_r.warehous_addr_id; _row.warehous_taxzone_id:=_r.warehous_taxzone_id; _row.warehous_transit:=_r.warehous_transit; _row.warehous_shipform_id:=_r.warehous_shipform_id; _row.warehous_shipvia_id:=_r.warehous_shipvia_id; _row.warehous_shipcomments:=_r.warehous_shipcomments; _row.warehous_costcat_id:=_r.warehous_costcat_id; _row.warehous_sitetype_id:=_r.warehous_sitetype_id; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; DROP FUNCTION public.site(); publicadminfalse83992269212551683375snoozemessage(integer)FUNCTIONCREATE FUNCTION snoozemessage(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pMsgid ALIAS FOR $1; snooze INTERVAL := '10 minutes'; BEGIN UPDATE msg SET msg_scheduled=(msg_scheduled + snooze) WHERE (msg_id=pMsgid); RETURN TRUE; END; $_$; -DROP FUNCTION public.snoozemessage(integer); publicadminfalse8399212551683376spellamount(numeric)FUNCTION CREATE FUNCTION spellamount(numeric) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN spellAmount($1, baseCurrId()); END; $_$; +DROP FUNCTION public.spellamount(numeric); publicadminfalse8399212551683377spellamount(numeric, integer)FUNCTIONCREATE FUNCTION spellamount(numeric, integer) RETURNS text LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pN ALIAS FOR $1; pCurrId ALIAS FOR $2; _t text; _dollars text; _cents text; _l integer; _p integer; _words text; _word text; _hundreds char; _tens char; _ones char; _fractionalPartName text; _curr curr_symbol%ROWTYPE; BEGIN _t := ltrim(to_char(pN, '999999999990D99'),' '); IF strpos(_t, '.') > 0 THEN _dollars := split_part(_t, '.', 1); _cents := split_part(_t, '.', 2); ELSIF strpos(_t, ',') > 0 THEN _dollars := split_part(_t, ',', 1); _cents := split_part(_t, ',', 2); END IF; _p := 0; _l := length(_dollars); _words := ''; WHILE (_p < _l) LOOP IF((_l - _p - 2) < 1) THEN _hundreds := '0'; ELSE _hundreds := substr(_dollars, _l - _p - 2, 1); END IF; IF((_l - _p - 1) < 1) THEN _tens := '0'; ELSE _tens := substr(_dollars, _l - _p - 1, 1); END IF; IF((_l - _p) < 1) THEN _ones := '0'; ELSE _ones := substr(_dollars, _l - _p, 1); END IF; IF(_hundreds != '0' OR _tens != '0' OR _ones != '0') THEN IF (_p = 3) THEN _words := 'thousand ' || _words; ELSIF (_p = 6) THEN _words := 'million ' || _words; ELSIF (_p = 9) THEN _words := 'billion ' || _words; END IF; _word := ''; IF(_tens = '1') THEN IF(_ones = '0') THEN _word := 'ten'; ELSIF(_ones = '1') THEN _word := 'eleven'; ELSIF(_ones = '2') THEN _word := 'twelve'; ELSIF(_ones = '3') THEN _word := 'thirteen'; ELSIF(_ones = '4') THEN _word := 'fourteen'; ELSIF(_ones = '5') THEN _word := 'fifteen'; ELSIF(_ones = '6') THEN _word := 'sixteen'; ELSIF(_ones = '7') THEN _word := 'seventeen'; ELSIF(_ones = '8') THEN _word := 'eighteen'; ELSIF(_ones = '9') THEN _word := 'nineteen'; ELSE _word := 'ERROR'; END IF; ELSE IF(_ones = '1') THEN _word := 'one'; ELSIF(_ones = '2') THEN _word := 'two'; ELSIF(_ones = '3') THEN _word := 'three'; ELSIF(_ones = '4') THEN _word := 'four'; ELSIF(_ones = '5') THEN _word := 'five'; ELSIF(_ones = '6') THEN _word := 'six'; ELSIF(_ones = '7') THEN _word := 'seven'; ELSIF(_ones = '8') THEN _word := 'eight'; ELSIF(_ones = '9') THEN _word := 'nine'; ELSIF(_ones != '0') THEN _word := 'ERROR'; END IF; if(_tens != '0') THEN _word := '-' || _word; END IF; IF(_tens = '2') THEN _word := 'twenty' || _word; ELSIF(_tens = '3') THEN _word := 'thirty' || _word; ELSIF(_tens = '4') THEN _word := 'forty' || _word; ELSIF(_tens = '5') THEN _word := 'fifty' || _word; ELSIF(_tens = '6') THEN _word := 'sixty' || _word; ELSIF(_tens = '7') THEN _word := 'seventy' || _word; ELSIF(_tens = '8') THEN _word := 'eighty' || _word; ELSIF(_tens = '9') THEN _word := 'ninety' || _word; ELSIF(_tens != '0' AND _tens != '1') THEN _word := 'ERROR' || _word; END IF; END IF; if(_word != '') THEN _words := _word || ' ' || _words; END IF; _word := ''; IF(_hundreds = '1') THEN _word := 'one hundred'; ELSIF(_hundreds = '2') THEN _word := 'two hundred'; ELSIF(_hundreds = '3') THEN _word := 'three hundred'; ELSIF(_hundreds = '4') THEN _word := 'four hundred'; ELSIF(_hundreds = '5') THEN _word := 'five hundred'; ELSIF(_hundreds = '6') THEN _word := 'six hundred'; ELSIF(_hundreds = '7') THEN _word := 'seven hundred'; ELSIF(_hundreds = '8') THEN _word := 'eight hundred'; ELSIF(_hundreds = '9') THEN _word := 'nine hundred'; ELSIF(_hundreds != '0') THEN _words := 'ERROR'; END IF; if(_word != '') THEN _words := _word || ' ' || _words; END IF; END IF; _p := _p + 3; END LOOP; _words := rtrim(_words, ' '); IF(_words = '') THEN _words := 'zero'; END IF; SELECT * INTO _curr FROM curr_symbol WHERE curr_id = pCurrId; IF(_words = 'one') AND TRIM(_curr.curr_name) ~ '.*s' THEN _word := rtrim(_curr.curr_name, ' s'); ELSE _word := trim(_curr.curr_name); END IF; IF _curr.curr_abbr = 'USD' OR _curr.curr_abbr = 'CAD' THEN IF (_cents = '1') THEN _fractionalPartName = ' cent'; ELSE _fractionalPartName = ' cents'; END IF; ELSE _fractionalPartName = ' / 100 '; END IF; RETURN _words || ' ' || _word || ' and ' || _cents || _fractionalPartName; END; $_$; 4DROP FUNCTION public.spellamount(numeric, integer); publicadminfalse8399212551683378'splitreceipt(integer, numeric, numeric)FUNCTIONaCREATE FUNCTION splitreceipt(integer, numeric, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE precvid ALIAS FOR $1; pqty ALIAS FOR $2; pfreight ALIAS FOR $3; _check RECORD; _seq INTEGER; BEGIN -- validate IF (COALESCE(pQty,0) <= 0) THEN RETURN -7; END IF; SELECT * INTO _check FROM recv WHERE (recv_id=precvid); IF (FOUND) THEN IF (_check.recv_order_type != 'PO') THEN RETURN -1; ELSIF ( NOT _check.recv_posted) THEN RETURN -2; ELSIF ( (_check.recv_invoiced) OR (_check.recv_vohead_id IS NOT NULL) OR (_check.recv_voitem_id IS NOT NULL) ) THEN RETURN -3; ELSIF (pqty >= _check.recv_qty) THEN RETURN -4; ELSIF (COALESCE(pfreight,0) > _check.recv_freight) THEN RETURN -5; END IF; ELSE RETURN -6; END IF; -- Create new receipt record _seq := nextval('recv_recv_id_seq'); INSERT INTO recv SELECT _seq, recv_order_type,recv_order_number, recv_orderitem_id, recv_agent_username, recv_itemsite_id, recv_vend_id, recv_vend_item_number, recv_vend_item_descrip, recv_vend_uom, recv_purchcost, recv_purchcost_curr_id, recv_duedate, pqty, recv_recvcost, recv_recvcost_curr_id, COALESCE(pfreight,0), recv_freight_curr_id, recv_date, ROUND(recv_value/recv_qty * pqty, 2), TRUE, FALSE, NULL, NULL, recv_trans_usr_name, recv_notes, recv_gldistdate, precvid FROM recv WHERE (recv_id=precvid); -- Update qty and value of old record UPDATE recv SET recv_qty = recv_qty-pqty, recv_value = recv_value - ROUND(recv_value/recv_qty * pqty, 2), recv_freight = recv_freight - COALESCE(pfreight,0) WHERE (recv_id=precvid); RETURN _seq; END; $_$; >DROP FUNCTION public.splitreceipt(integer, numeric, numeric); publicadminfalse83992125516833798splitrecurrence(integer, text, timestamp with time zone)FUNCTION CREATE FUNCTION splitrecurrence(integer, text, timestamp with time zone) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pParentid ALIAS FOR $1; pType TEXT := UPPER($2); pDatetime TIMESTAMP WITH TIME ZONE := COALESCE($3, CURRENT_TIMESTAMP); _count INTEGER; _newrecurid INTEGER; _newparentid INTEGER; _newparentstmt TEXT; _rt RECORD; _updchildstmt TEXT; BEGIN IF (pParentid IS NULL) THEN RETURN -11; END IF; SELECT * INTO _rt FROM recurtype WHERE (UPPER(recurtype_type)=pType); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count <= 0) THEN RETURN -10; END IF; _newparentstmt := 'SELECT [table]_id FROM [fulltable]' || ' WHERE (([table]_recurring_[table]_id=$1)' || ' AND NOT ([done])' || ' AND ([schedcol]>=''$2''))' || ' ORDER BY [schedcol]' || ' LIMIT 1;'; _newparentstmt := REPLACE(_newparentstmt, '[fulltable]', _rt.recurtype_table); _newparentstmt := REPLACE(_newparentstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _newparentstmt := REPLACE(_newparentstmt, '[done]', _rt.recurtype_donecheck); _newparentstmt := REPLACE(_newparentstmt, '[schedcol]', _rt.recurtype_schedcol); _updchildstmt := 'UPDATE [fulltable] SET [table]_recurring_[table]_id=$1' || ' WHERE (([table]_recurring_[table]_id=$2)' || ' AND NOT ([done])' || ' AND ([schedcol] > ''$3''));'; _updchildstmt := REPLACE(_updchildstmt, '[fulltable]', _rt.recurtype_table); _updchildstmt := REPLACE(_updchildstmt, '[table]', REGEXP_REPLACE(_rt.recurtype_table, E'.*\\.', '')); _updchildstmt := REPLACE(_updchildstmt, '[done]', _rt.recurtype_donecheck); _updchildstmt := REPLACE(_updchildstmt, '[schedcol]', _rt.recurtype_schedcol); -- 8.4+: EXECUTE _newparentstmt INTO _newparentid USING pParentid, pDatetime; EXECUTE REPLACE(REPLACE(_newparentstmt, '$1', pParentid::TEXT), '$2', pDatetime::TEXT) INTO _newparentid; -- if nothing to split IF (_newparentid = pParentid OR _newparentid IS NULL) THEN SELECT recur_id INTO _newrecurid FROM recur WHERE ((recur_parent_id=pParentid) AND (recur_parent_type=pType)); ELSE INSERT INTO recur (recur_parent_id, recur_parent_type, recur_period, recur_freq, recur_start, recur_end, recur_max, recur_data ) SELECT _newparentid, pType, recur_period, recur_freq, pDatetime, recur_end, recur_max, recur_data FROM recur WHERE ((recur_parent_id=pParentid) AND (recur_parent_type=pType)) RETURNING recur_id INTO _newrecurid; UPDATE recur SET recur_end=pDatetime WHERE ((recur_parent_id=pParentid) AND (recur_parent_type=pType)); -- 8.4+: EXECUTE _updchildstmt USING _newparentid, pParentid, pDatetime; EXECUTE REPLACE(REPLACE(REPLACE(_updchildstmt, '$1', _newparentid::TEXT), '$2', pParentid::TEXT), '$3', pDatetime::TEXT); END IF; RETURN _newrecurid; END; $_$; ODROP FUNCTION public.splitrecurrence(integer, text, timestamp with time zone); publicadminfalse8399212551683380 startoftime()FUNCTIONCREATE FUNCTION startoftime() RETURNS date LANGUAGE sql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT DATE('1970-01-01') AS return; $$; $DROP FUNCTION public.startoftime(); publicadminfalse8"12551683381stdcost(integer)FUNCTIONCREATE FUNCTION stdcost(integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN stdCost($1, NULL); END; $_$; 'DROP FUNCTION public.stdcost(integer); publicadminfalse8399212551683382stdcost(integer, integer)FUNCTIONzCREATE FUNCTION stdcost(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pBomitemid ALIAS FOR $2; _cost NUMERIC; BEGIN SELECT SUM(COALESCE(bomitemcost_stdcost, itemcost_stdcost)) INTO _cost FROM itemcost LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=pBomitemid AND bomitemcost_costelem_id=itemcost_costelem_id) WHERE (itemcost_item_id=pItemid); IF (_cost IS NULL) THEN RETURN 0; ELSE RETURN _cost; END IF; END; $_$; 0DROP FUNCTION public.stdcost(integer, integer); publicadminfalse83992#12551683383,sufficientinventorytoshipitem(text, integer)FUNCTIONCREATE FUNCTION sufficientinventorytoshipitem(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; BEGIN RETURN sufficientInventoryToShipItem(pordertype, porderitemid, NULL); END; $_$; CDROP FUNCTION public.sufficientinventorytoshipitem(text, integer); publicadminfalse83992125516833845sufficientinventorytoshipitem(text, integer, numeric)FUNCTION*CREATE FUNCTION sufficientinventorytoshipitem(text, integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderitemid ALIAS FOR $2; pqty ALIAS FOR $3; _returnVal INTEGER; _isqtyavail BOOLEAN; BEGIN IF (porderitemid IS NULL) THEN RETURN -1; END IF; IF (pordertype = 'SO') THEN IF ( SELECT fetchMetricBool('EnableSOReservations') ) THEN IF (SELECT (itemsite_costmethod = 'J') FROM coitem JOIN itemsite ON (coitem_itemsite_id=itemsite_id) WHERE (coitem_id=porderitemid)) THEN RETURN 0; END IF; SELECT (((COALESCE(pqty, roundQty(item_fractional, noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(pordertype, coitem_id) ))) - coitem_qtyreserved) * coitem_qty_invuomratio ) <= itemsite_qtyonhand) AND (((COALESCE(pqty, roundQty(item_fractional, noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(pordertype, coitem_id) ))) - coitem_qtyreserved) * coitem_qty_invuomratio ) <= qtyunreserved(itemsite_id)) INTO _isqtyavail FROM coitem, itemsite, item WHERE ((coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'X') AND (NOT ((item_type IN ('R','J')) OR (itemsite_controlmethod = 'N'))) AND (itemsite_item_id=item_id) AND (coitem_id=porderitemid)); ELSE SELECT (COALESCE(pqty, roundQty(item_fractional, noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(pordertype, coitem_id) - coitem_qtyreserved ) * coitem_qty_invuomratio ) ) <= itemsite_qtyonhand) INTO _isqtyavail FROM coitem, itemsite, item WHERE ((coitem_itemsite_id=itemsite_id) AND (coitem_status <> 'X') AND (NOT ((item_type IN ('R','J')) OR (itemsite_controlmethod = 'N'))) AND (itemsite_item_id=item_id) AND (coitem_id=porderitemid)); END IF; ELSEIF (pordertype = 'TO') THEN SELECT (COALESCE(pqty, roundQty(item_fractional, noNeg(toitem_qty_ordered - toitem_qty_shipped - qtyAtShipping(pordertype, toitem_id) ) ) ) <= itemsite_qtyonhand) INTO _isqtyavail FROM toitem, tohead, itemsite, item WHERE ((toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id) AND (itemsite_warehous_id=tohead_src_warehous_id) AND (itemsite_item_id=item_id) AND (toitem_status <> 'X') AND (NOT ((item_type IN ('R','J')) OR (itemsite_controlmethod = 'N'))) AND (toitem_id=porderitemid)); ELSE RETURN -11; END IF; IF (NOT _isqtyavail) THEN RETURN -2; END IF; IF (pordertype = 'SO') THEN SELECT (COALESCE((SELECT SUM(itemloc_qty) FROM itemloc WHERE (itemloc_itemsite_id=itemsite_id)), 0.0) >= roundQty(item_fractional, COALESCE(pQty, noNeg( coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping(pordertype, coitem_id) )) * coitem_qty_invuomratio )) INTO _isqtyavail FROM coitem, itemsite, item WHERE ((coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (NOT ((item_type ='R') OR (itemsite_controlmethod = 'N'))) AND ((itemsite_controlmethod IN ('L', 'S')) OR (itemsite_loccntrl)) AND (coitem_id=porderitemid)); ELSEIF (pordertype = 'TO') THEN SELECT (COALESCE((SELECT SUM(itemloc_qty) FROM itemloc WHERE (itemloc_itemsite_id=itemsite_id)), 0.0) >= roundQty(item_fractional, noNeg( toitem_qty_ordered - toitem_qty_shipped - qtyAtShipping(pordertype, toitem_id) ) )) INTO _isqtyavail FROM toitem, tohead, itemsite, item WHERE ((toitem_tohead_id=tohead_id) AND (tohead_src_warehous_id=itemsite_warehous_id) AND (toitem_item_id=itemsite_item_id) AND (itemsite_item_id=item_id) AND (toitem_status <> 'X') AND (NOT ((item_type ='R') OR (itemsite_costmethod = 'J') OR (itemsite_controlmethod = 'N'))) AND ((itemsite_controlmethod IN ('L', 'S')) OR (itemsite_loccntrl)) AND (toitem_id=porderitemid)); END IF; IF (NOT _isqtyavail) THEN RETURN -3; END IF; RETURN 0; END; $_$; LDROP FUNCTION public.sufficientinventorytoshipitem(text, integer, numeric); publicadminfalse8399212551683385-sufficientinventorytoshiporder(text, integer)FUNCTIONCREATE FUNCTION sufficientinventorytoshiporder(text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pordertype ALIAS FOR $1; porderid ALIAS FOR $2; _s RECORD; _returnVal INTEGER := 0; BEGIN IF (pordertype = 'SO') THEN FOR _s IN SELECT coitem_id FROM coitem JOIN itemsite ON (coitem_itemsite_id=itemsite_id) WHERE((coitem_cohead_id=porderid) AND (itemsite_costmethod != 'J')) LOOP _returnVal := sufficientInventoryToShipItem(pordertype, _s.coitem_id); EXIT WHEN (_returnVal < 0); END LOOP; ELSEIF (pordertype = 'TO') THEN FOR _s IN SELECT toitem_id FROM toitem WHERE(toitem_tohead_id=porderid) LOOP _returnVal := sufficientInventoryToShipItem(pordertype, _s.toitem_id); EXIT WHEN (_returnVal < 0); END LOOP; END IF; RETURN _returnVal; END; $_$; DDROP FUNCTION public.sufficientinventorytoshiporder(text, integer); publicadminfalse8399212551683386summarizedbom(integer)FUNCTION|CREATE FUNCTION summarizedbom(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; _revid INTEGER; BEGIN SELECT getActiveRevId('BOM',pItemid) INTO _revid; RETURN summarizedBOM(pItemid, _revid); END; $_$; -DROP FUNCTION public.summarizedbom(integer); publicadminfalse8399212551683387(summarizedbom(integer, integer, integer)FUNCTIONCREATE FUNCTION summarizedbom(integer, integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pExpired ALIAS FOR $2; pFuture ALIAS FOR $3; _revid INTEGER; BEGIN SELECT getActiveRevId('BOM',pItemid) INTO _revid; RETURN summarizedBOM(pItemid, _revid, pExpired, pFuture); END; $_$; ?DROP FUNCTION public.summarizedbom(integer, integer, integer); publicadminfalse8399212551683388summarizedbom(integer, integer)FUNCTIONCREATE FUNCTION summarizedbom(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; _bomworkid INTEGER; _indexid INTEGER; _r RECORD; BEGIN -- Check on the temporary workspace -- PERFORM maintainBOMWorkspace(); -- Grab a new index for this bomwork set SELECT NEXTVAL('misc_index_seq') INTO _indexid; -- Step through all of the components of the passed pItemid FOR _r IN SELECT bomitem.*, item_id, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS qtyfxd, (itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS qtyper, stdcost(item_id, bomitem_id) AS standardcost, actcost(item_id, bomitem_id) AS actualcost FROM bomitem(pItemid, pRevisionid), item WHERE (bomitem_item_id=item_id) LOOP -- Insert the component and bomitem parameters SELECT NEXTVAL('bomwork_bomwork_id_seq') INTO _bomworkid; INSERT INTO bomwork ( bomwork_id, bomwork_set_id, bomwork_parent_id, bomwork_level, bomwork_parent_seqnumber, bomwork_seqnumber, bomwork_item_id, bomwork_createwo, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_issuemethod, bomwork_effective, bomwork_expires, bomwork_stdunitcost, bomwork_actunitcost ) VALUES ( _bomworkid, _indexid, -1, 1, 0, _r.bomitem_seqnumber, _r.item_id, _r.bomitem_createwo, (_r.qtyfxd + _r.qtyper), _r.qtyfxd, _r.qtyper, _r.bomitem_scrap, _r.bomitem_issuemethod, _r.bomitem_effective, _r.bomitem_expires, _r.standardcost, _r.actualcost, _r.bomitem_char_id, _r.bomitem_value, _r.bomitem_notes, _r.bomitem_ref, _r.bomitem_id, _r.bomitem_ecn ); -- Explode the components of the current component PERFORM explodeBOM(_r.item_id, _bomworkid, 1); END LOOP; -- Return a key to the result RETURN _indexid; END; $_$; 6DROP FUNCTION public.summarizedbom(integer, integer); publicadminfalse83992125520055891summarizedbom(integer, integer, integer, integer)FUNCTIONCREATE FUNCTION summarizedbom(integer, integer, integer, integer) RETURNS SETOF bomdata LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pRevisionid ALIAS FOR $2; pExpiredDays INTEGER := COALESCE($3, 0); pFutureDays INTEGER := COALESCE($4, 0); _row bomdata%ROWTYPE; _bomworksetid INTEGER; _x RECORD; _check CHAR(1); _inactive BOOLEAN := FALSE; _batchsize NUMERIC; BEGIN IF (pRevisionid != -1) THEN --Is this a deactivated revision? SELECT rev_status INTO _check FROM rev WHERE ((rev_id=pRevisionid) AND (rev_status='I')); IF (FOUND) THEN _inactive := TRUE; END IF; END IF; -- Get the batch quantity SELECT COALESCE( ( SELECT bomhead_batchsize FROM bomhead WHERE ((bomhead_item_id=pItemId) AND (bomhead_rev_id=pRevisionid))),1) INTO _batchsize; IF NOT (_inactive) THEN --We can explode this out based on current data SELECT indentedBOM(pItemid, pRevisionid) INTO _bomworksetid; FOR _x IN SELECT item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, SUM(bomwork_qtyreq) AS qtyreq, SUM(bomwork_qtyfxd * (1 + bomwork_scrap)) AS qtyfxd, SUM(bomwork_qtyper * (1 + bomwork_scrap)) AS qtyper, MAX(bomwork_actunitcost) AS actunitcost, MAX(bomwork_stdunitcost) AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN SUM(bomwork_actunitcost * bomwork_qtyreq) ELSE 0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN SUM(bomwork_stdunitcost * bomwork_qtyreq) ELSE 0 END AS stdextendedcost, bomwork_effective, bomwork_expires, bomwork_effective > CURRENT_DATE AS future, bomwork_expires <= CURRENT_DATE AS expired FROM ( SELECT item_number, item_type, uom_name, item_descrip1, item_descrip2, bomwork_qtyreq, bomwork_qtyfxd, bomwork_qtyper, bomwork_scrap, bomwork_actunitcost, bomwork_stdunitcost, CASE WHEN (bomwork_effective > CURRENT_DATE) THEN (CURRENT_DATE + 1) ELSE CURRENT_DATE END AS bomwork_effective, CASE WHEN (bomwork_expires <= CURRENT_DATE) THEN (CURRENT_DATE - 1) ELSE (CURRENT_DATE + 1) END AS bomwork_expires FROM bomwork, item, uom WHERE ( (bomwork_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (bomwork_set_id=_bomworksetid) ) AND (bomwork_expires > (CURRENT_DATE - pExpiredDays)) AND (bomwork_effective <= (CURRENT_DATE + pFutureDays)) ) AS data GROUP BY item_number, uom_name, item_type, item_descrip1, item_descrip2, bomwork_effective, bomwork_expires ORDER BY item_number LOOP _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_qtyreq := _x.qtyreq; _row.bomdata_qtyfxd := _x.qtyfxd; _row.bomdata_qtyper := _x.qtyper; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; _row.bomdata_effective := _x.bomwork_effective; _row.bomdata_expires := _x.bomwork_expires; _row.bomdata_future := _x.future; _row.bomdata_expired := _x.expired; RETURN NEXT _row; END LOOP; PERFORM deleteBOMWorkset(_bomworksetid); ELSE -- Use historical snapshot for inactive revisions FOR _x IN SELECT item_number, uom_name, item_descrip1, item_descrip2, (item_descrip1 || ' ' || item_descrip2) AS itemdescription, SUM(bomhist_qtyreq * (1 + bomhist_scrap)) AS qtyreq, SUM(bomhist_qtyfxd * (1 + bomhist_scrap)) AS qtyfxd, SUM(bomhist_qtyper * (1 + bomhist_scrap)) AS qtyper, MAX(bomhist_actunitcost) AS actunitcost, MAX(bomhist_stdunitcost) AS stdunitcost, CASE WHEN item_type NOT IN ('R','T') THEN MAX(bomhist_actunitcost) * SUM((bomhist_qtyfxd/_batchsize + bomhist_qtyper) * (1 + bomhist_scrap)) ELSE 0 END AS actextendedcost, CASE WHEN item_type NOT IN ('R','T') THEN MAX(bomhist_stdunitcost) * SUM((bomhist_qtyfxd/_batchsize + bomhist_qtyper) * (1 + bomhist_scrap)) ELSE 0 END AS stdextendedcost FROM bomhist, item, uom WHERE ( (bomhist_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (bomhist_rev_id=pRevisionid) ) AND (bomhist_expires > (CURRENT_DATE - pExpiredDays)) AND (bomhist_effective <= (CURRENT_DATE + pFutureDays)) GROUP BY item_number, uom_name, item_type, item_descrip1, item_descrip2 ORDER BY item_number LOOP _row.bomdata_item_number := _x.item_number; _row.bomdata_uom_name := _x.uom_name; _row.bomdata_item_descrip1 := _x.item_descrip1; _row.bomdata_item_descrip2 := _x.item_descrip2; _row.bomdata_itemdescription := _x.itemdescription; _row.bomdata_qtyreq := _x.qtyreq; _row.bomdata_qtyfxd := _x.qtyfxd; _row.bomdata_qtyper := _x.qtyper; _row.bomdata_actunitcost := _x.actunitcost; _row.bomdata_stdunitcost := _x.stdunitcost; _row.bomdata_actextendedcost := _x.actextendedcost; _row.bomdata_stdextendedcost := _x.stdextendedcost; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; HDROP FUNCTION public.summarizedbom(integer, integer, integer, integer); publicadminfalse83992257712551683390*summarizetransactions(integer, date, date)FUNCTION CREATE FUNCTION summarizetransactions(integer, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _startDate DATE; _endDate DATE; _invhist RECORD; _itemuom TEXT; _transCounter INTEGER; _itemlocSeries INTEGER; BEGIN -- Cache the uom_name SELECT uom_name INTO _itemuom FROM itemsite, item, uom WHERE ((itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) AND (itemsite_id=pItemsiteid)); -- Can't summarize into the future... IF (pEndDate > CURRENT_DATE) THEN _endDate := CURRENT_DATE; ELSE _endDate := pEndDate; END IF; -- Verify date bounds IF (pStartDate > pEndDate) THEN _startDate := pEndDate; ELSE _startDate := pStartDate; END IF; -- Verify that history is not referenced elsewhere SELECT invhist_id INTO _transCounter FROM invhist JOIN womatlpost ON (womatlpost_invhist_id=invhist_id) WHERE ((invhist_itemsite_id=pItemsiteid) AND (invhist_transdate::DATE BETWEEN _startDate AND _endDate)) LIMIT 1; IF (FOUND) THEN RETURN 0; END IF; SELECT invhist_id INTO _transCounter FROM invhist JOIN shipitem ON (shipitem_invhist_id=invhist_id) WHERE ((invhist_itemsite_id=pItemsiteid) AND (invhist_transdate::DATE BETWEEN _startDate AND _endDate)) LIMIT 1; IF (FOUND) THEN RETURN 0; END IF; _transCounter := 0; _itemlocSeries := NEXTVAL('itemloc_series_seq'); FOR _invhist IN SELECT invhist_transtype, invhist_costmethod, SUM(invhist_invqty) AS qty FROM invhist WHERE ((invhist_itemsite_id=pItemsiteid) AND (invhist_transdate::DATE BETWEEN _startDate AND _endDate)) GROUP BY invhist_transtype, invhist_costmethod LOOP DELETE FROM invhist WHERE ((invhist_transdate::DATE BETWEEN _startDate AND _endDate) AND (invhist_transtype=_invhist.invhist_transtype) AND (invhist_itemsite_id=pItemsiteid)); INSERT INTO invhist ( invhist_itemsite_id, invhist_transdate, invhist_transtype, invhist_invqty, invhist_qoh_before, invhist_qoh_after, invhist_invuom, invhist_user, invhist_ordnumber, invhist_costmethod, invhist_value_before, invhist_value_after, invhist_series ) VALUES ( pItemsiteid, _endDate, _invhist.invhist_transtype, _invhist.qty, 0, 0, _itemuom, getEffectiveXtUser(), 'Summary', _invhist.invhist_costmethod, 0, 0, _itemlocSeries ); _transCounter := (_transCounter + 1); END LOOP; RETURN _transCounter; END; $_$; ADROP FUNCTION public.summarizetransactions(integer, date, date); publicadminfalse8399212551683391summdemand(integer, date, date)FUNCTIONgCREATE FUNCTION summdemand(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(wo_qtyord - wo_qtyrcv) INTO _value FROM wo WHERE ( (wo_itemsite_id=pItemsiteid) AND (wo_status IN ('R', 'I')) AND (wo_startdate::DATE BETWEEN pStartDate AND pEndDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; 6DROP FUNCTION public.summdemand(integer, date, date); publicadminfalse8399212551683392summdemand(integer, integer)FUNCTIONCREATE FUNCTION summdemand(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summDemand(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; 3DROP FUNCTION public.summdemand(integer, integer); publicadminfalse8399212551683393summprod(integer, date, date)FUNCTIONwCREATE FUNCTION summprod(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteid) AND (invhist_transtype IN ('RM', 'RB')) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; 4DROP FUNCTION public.summprod(integer, date, date); publicadminfalse8399212551683394summprod(integer, integer)FUNCTIONCREATE FUNCTION summprod(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summProd(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; 1DROP FUNCTION public.summprod(integer, integer); publicadminfalse83992!12551683395summtransa(integer, date, date)FUNCTIONwCREATE FUNCTION summtransa(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ((invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('AD', 'CC')) AND (invhist_itemsite_id=pItemsiteid)); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; 6DROP FUNCTION public.summtransa(integer, date, date); publicadminfalse8399212551683396summtransa(integer, integer)FUNCTIONCREATE FUNCTION summtransa(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransA(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; 3DROP FUNCTION public.summtransa(integer, integer); publicadminfalse8399212551683397summtransc(integer, date, date)FUNCTIONqCREATE FUNCTION summtransc(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDAte ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ((invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('SI')) AND (invhist_itemsite_id=pItemsiteid)); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; 6DROP FUNCTION public.summtransc(integer, date, date); publicadminfalse8399212551683398summtransc(integer, integer)FUNCTIONCREATE FUNCTION summtransc(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransC(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; 3DROP FUNCTION public.summtransc(integer, integer); publicadminfalse8399212551683399summtransi(integer, date, date)FUNCTIONwCREATE FUNCTION summtransi(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ((invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('IM', 'IC')) AND (invhist_itemsite_id=pItemsiteid)); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; 6DROP FUNCTION public.summtransi(integer, date, date); publicadminfalse83992"12551683400summtransi(integer, integer)FUNCTIONCREATE FUNCTION summtransi(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransI(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; 3DROP FUNCTION public.summtransi(integer, integer); publicadminfalse8399212551683401summtransr(integer, date, date)FUNCTION~CREATE FUNCTION summtransr(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM(invhist_invqty) INTO _value FROM invhist WHERE ((invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('RM', 'RP', 'RX')) AND (invhist_itemsite_id=pItemsiteid) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; 6DROP FUNCTION public.summtransr(integer, date, date); publicadminfalse8399212551683402summtransr(integer, integer)FUNCTIONCREATE FUNCTION summtransr(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransR(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; 3DROP FUNCTION public.summtransr(integer, integer); publicadminfalse8399212551683403summtranss(integer, date, date)FUNCTIONCREATE FUNCTION summtranss(pitemsiteid integer, pstartdate date, penddate date) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC; BEGIN SELECT SUM( CASE WHEN (invhist_transtype = 'RS') THEN (invhist_invqty * -1) ELSE (invhist_invqty) END ) INTO _value FROM invhist WHERE ( (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('SC', 'SH', 'SV', 'RS')) AND (invhist_ordtype != 'TO') AND (invhist_itemsite_id=pItemsiteid) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $$; VDROP FUNCTION public.summtranss(pitemsiteid integer, pstartdate date, penddate date); publicadminfalse8399212551683404summtranss(integer, integer)FUNCTIONCREATE FUNCTION summtranss(pitemsiteid integer, pcalitemid integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransS(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; JDROP FUNCTION public.summtranss(pitemsiteid integer, pcalitemid integer); publicadminfalse8399212551683405summtranst(integer, date, date)FUNCTIONCREATE FUNCTION summtranst(integer, date, date) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pStartDate ALIAS FOR $2; pEndDate ALIAS FOR $3; _value NUMERIC; BEGIN SELECT SUM( CASE WHEN (invhist_transtype = 'TS') THEN (invhist_invqty * -1) ELSE (invhist_invqty) END ) INTO _value FROM invhist WHERE ( (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND (invhist_transtype IN ('TS', 'TR', 'TW')) AND (invhist_itemsite_id=pItemsiteid) ); IF (_value IS NULL) THEN _value := 0; END IF; RETURN _value; END; $_$; 6DROP FUNCTION public.summtranst(integer, date, date); publicadminfalse8399212551683406summtranst(integer, integer)FUNCTIONCREATE FUNCTION summtranst(integer, integer) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pCalitemid ALIAS FOR $2; _value NUMERIC; BEGIN SELECT summTransT(pItemsiteid, findPeriodStart(pCalitemid), findPeriodEnd(pCalitemid)) INTO _value; RETURN _value; END; $_$; 3DROP FUNCTION public.summtranst(integer, integer); publicadminfalse8399212552005590 taxassignments(integer, integer)FUNCTIONCREATE FUNCTION taxassignments(integer, integer) RETURNS SETOF taxassign LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTaxZoneId ALIAS FOR $1; pTaxTypeId ALIAS FOR $2; _row taxassign%ROWTYPE; _qry text; _x RECORD; _y RECORD; _z RECORD; BEGIN _qry = 'SELECT DISTINCT COALESCE(taxass_taxzone_id, -1) AS taxass_taxzone_id, COALESCE(taxass_taxtype_id, -1) AS taxass_taxtype_id, '; _qry = _qry || 'taxzone_code, taxtype_name FROM taxass LEFT OUTER JOIN taxzone ON (taxass_taxzone_id=taxzone_id) '; _qry = _qry || 'LEFT OUTER JOIN taxtype ON (taxass_taxtype_id=taxtype_id) '; IF ((pTaxZoneId > 0) OR (pTaxTypeId > 0)) THEN _qry := _qry || ' WHERE '; IF (pTaxZoneId > 0) THEN _qry := _qry || ' (taxass_taxzone_id = ' || pTaxZoneId ||')'; IF (pTaxTypeId > 0) THEN _qry := _qry || ' AND '; END IF; END IF; IF (pTaxTypeId > 0) THEN _qry := _qry || ' (taxass_taxtype_id = ' || pTaxTypeId || ')'; END IF; END IF; --This first query gets all the distinct tax zone and type groupings as if it were its own table. --This allows us to have a level 0 record as pictured in Tax Assignments window that code assignements will --Subordinate to. FOR _x IN EXECUTE _qry LOOP --Map values to _row here _row.taxassign_taxzone_id = _x.taxass_taxzone_id; _row.taxassign_taxtype_id = _x.taxass_taxtype_id; _row.taxassign_level = 0; _row.taxassign_zone_code = _x.taxzone_code; _row.taxassign_type_descrip = _x.taxtype_name; _row.taxassign_taxclass_code = ''; _row.taxassign_taxclass_sequence = NULL; RETURN NEXT _row; --so we get a level tax zone/type 0 record. -- Now get all the tax code assignments that belong to this Zone and Type pair FOR _y IN SELECT taxass_id, COALESCE(taxzone_id, -1) AS taxzone_id, tax_id, tax_code, tax_descrip, COALESCE(taxtype_id, -1) AS taxtype_id, taxzone_code, taxtype_descrip, taxclass_code, COALESCE(taxclass_sequence, 0) AS taxclass_sequence FROM taxass JOIN tax LEFT OUTER JOIN taxclass ON (tax_taxclass_id = taxclass_id) ON (taxass_tax_id = tax_id) LEFT OUTER JOIN taxzone ON (taxass_taxzone_id = taxzone_id) LEFT OUTER JOIN taxtype ON (taxass_taxtype_id = taxtype_id) WHERE COALESCE(taxass_taxzone_id, -1) = _x.taxass_taxzone_id AND COALESCE(taxass_taxtype_id, -1) = _x.taxass_taxtype_id LOOP --Map results to _row _row.taxassign_taxzone_id = _y.taxzone_id; _row.taxassign_taxtype_id = _y.taxtype_id; _row.taxassign_level = 1; _row.taxassign_zone_code = _y.tax_code; _row.taxassign_type_descrip = _y.tax_descrip; _row.taxassign_taxclass_code = _y.taxclass_code; _row.taxassign_taxclass_sequence = _y.taxclass_sequence; RETURN NEXT _row; --to get code detail record; FOR _z IN SELECT * FROM getsubtax(_y.tax_id, 1) --a new recursive function described above LOOP --Map results to _row _row.taxassign_taxzone_id = _y.taxzone_id; _row.taxassign_taxtype_id = _y.taxtype_id; _row.taxassign_level = _z.subtax_taxcode_level; _row.taxassign_zone_code = _z.subtax_taxcode_code; _row.taxassign_type_descrip = _z.subtax_taxcode_descrip; _row.taxassign_taxclass_code = _y.taxclass_code; _row.taxassign_taxclass_sequence = _y.taxclass_sequence; RETURN NEXT _row; END LOOP; END LOOP; END LOOP; END; $_$; 7DROP FUNCTION public.taxassignments(integer, integer); publicadminfalse83992259912551683408thawaccountingperiod(integer)FUNCTIONCREATE FUNCTION thawaccountingperiod(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pPeriodid ALIAS FOR $1; _r RECORD; BEGIN -- Check to make sure that the period is frozen IF ( ( SELECT (NOT period_freeze) FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -2; END IF; -- Check to make sure that the period is not closed IF ( ( SELECT (period_closed) FROM period WHERE (period_id=pPeriodid) ) ) THEN RETURN -1; END IF; -- Reset the period_freeze flag UPDATE period SET period_freeze=FALSE WHERE (period_id=pPeriodid); -- Post any unposted G/L Transactions into the period FOR _r IN SELECT DISTINCT gltrans_sequence FROM gltrans, accnt, period WHERE ( (gltrans_accnt_id=accnt_id) AND (NOT gltrans_posted) AND (gltrans_date BETWEEN period_start AND period_end) AND (period_id=pPeriodid) ) LOOP PERFORM postIntoTrialBalance(_r.gltrans_sequence); END LOOP; RETURN pPeriodid; END; $_$; 4DROP FUNCTION public.thawaccountingperiod(integer); publicadminfalse83992W12551683409thawitemsite(integer)FUNCTIONCREATE FUNCTION thawitemsite(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _qoh NUMERIC := 0; _netable_qoh NUMERIC := 0; _nonnetable_qoh NUMERIC := 0; _value NUMERIC := 0; _itemlocid INTEGER; _itemloc RECORD; _invhist RECORD; _coarse RECORD; _fine RECORD; BEGIN IF ( SELECT itemsite_freeze FROM itemsite WHERE (itemsite_id=pItemsiteid) ) THEN SELECT invhist_id INTO _invhist FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteid) AND (NOT invhist_posted) ) LIMIT 1; IF (NOT FOUND) THEN UPDATE itemsite SET itemsite_freeze=FALSE WHERE (itemsite_id=pItemsiteid); END IF; -- Run through any invdetail if this itemsite is still MLC and/or Lot/Serial IF ( SELECT ( (itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S')) ) FROM itemsite WHERE (itemsite_id=pItemsiteid) ) THEN -- Grab all of the itemsite/location/lot/serial combinations -- that have unposted detail FOR _coarse IN SELECT DISTINCT invdetail_location_id, invdetail_ls_id, invdetail_expiration, invdetail_warrpurc FROM invhist, invdetail WHERE ( (invdetail_invhist_id=invhist_id) AND (NOT invhist_posted) AND (invhist_itemsite_id=pItemsiteid) ) ORDER BY invdetail_location_id, invdetail_ls_id LOOP -- Cache the initial qty of the itemloc specified by the -- itemsite/location/lot/serial SELECT itemloc_id, itemloc_qty, COALESCE(location_netable, TRUE) AS location_netable INTO _itemloc FROM itemloc LEFT OUTER JOIN location ON (location_id=itemloc_location_id) WHERE ( (itemloc_itemsite_id=pItemsiteid) AND (itemloc_location_id=_coarse.invdetail_location_id) AND (COALESCE(itemloc_ls_id,-1)=COALESCE(_coarse.invdetail_ls_id,-1)) AND (COALESCE(itemloc_expiration,endOfTime())=COALESCE(_coarse.invdetail_expiration,endOfTime())) AND (COALESCE(itemloc_warrpurc,endOfTime())=COALESCE(_coarse.invdetail_warrpurc,endOfTime())) ); -- If the itemloc in question cannot be found, create it IF (NOT FOUND) THEN SELECT NEXTVAL('itemloc_itemloc_id_seq') INTO _itemlocid; INSERT INTO itemloc ( itemloc_id, itemloc_itemsite_id, itemloc_location_id, itemloc_ls_id, itemloc_qty, itemloc_expiration ) VALUES ( _itemlocid, pItemsiteid, _coarse.invdetail_location_id, _coarse.invdetail_ls_id, 0, endOfTime() ); _qoh := 0.0; _netable_qoh := 0.0; _nonnetable_qoh := 0.0; ELSE _itemlocid := _itemloc.itemloc_id; _qoh := _itemloc.itemloc_qty; IF (_itemloc.location_netable) THEN _netable_qoh := _itemloc.itemloc_qty; ELSE _nonnetable_qoh := _itemloc.itemloc_qty; END IF; END IF; -- Now step through each unposted invdetail record for a given -- itemsite/location/lot/serial FOR _fine IN SELECT invdetail_id, invdetail_qty FROM invhist, invdetail WHERE ( (invdetail_invhist_id=invhist_id) AND (NOT invhist_posted) AND (invhist_itemsite_id=pItemsiteid) AND (invdetail_location_id=_coarse.invdetail_location_id) AND (COALESCE(invdetail_ls_id,-1)=COALESCE(_coarse.invdetail_ls_id,-1)) AND (COALESCE(invdetail_expiration,endOfTime())=COALESCE(_coarse.invdetail_expiration,endOfTime())) AND (COALESCE(invdetail_warrpurc,endOfTime())=COALESCE(_coarse.invdetail_warrpurc,endOfTime())) ) ORDER BY invhist_transdate LOOP -- Update the running qoh fields in the detail record UPDATE invdetail SET invdetail_qty_before = _qoh, invdetail_qty_after = (_qoh + invdetail_qty) WHERE (invdetail_id=_fine.invdetail_id); -- Update the running qoh _qoh = (_qoh + _fine.invdetail_qty); IF (_itemloc.location_netable) THEN _netable_qoh := (_netable_qoh + _fine.invdetail_qty); ELSE _nonnetable_qoh := (_nonnetable_qoh + _fine.invdetail_qty); END IF; END LOOP; -- If the running qoh end up at 0, delete the itemloc in question IF (_qoh = 0) THEN DELETE FROM itemloc WHERE (itemloc_id=_itemlocid); -- Otherwise, update the itemloc in question with the resultant qty ELSE UPDATE itemloc SET itemloc_qty=_qoh WHERE (itemloc_id=_itemlocid); END IF; END LOOP; END IF; -- Cache the inital qoh of the itemsite SELECT itemsite_qtyonhand, itemsite_value INTO _qoh, _value FROM itemsite WHERE (itemsite_id=pItemsiteid); -- We have to un-freeze the itemsite before update-ing its QOH -- so that that itemsite trigger won't block the QOH update. -- Also so the invhist trigger won't block the posted update. UPDATE itemsite SET itemsite_freeze=FALSE WHERE (itemsite_id=pItemsiteid); FOR _invhist IN SELECT invhist_id, invhist_qoh_before, invhist_qoh_after, invhist_value_before, invhist_value_after FROM invhist WHERE((invhist_itemsite_id=pItemsiteid) AND (NOT invhist_posted)) ORDER BY invhist_transdate LOOP UPDATE invhist SET invhist_qoh_before = _qoh, invhist_qoh_after = ( _qoh + _invhist.invhist_qoh_after - _invhist.invhist_qoh_before ), invhist_value_before = _value, invhist_value_after = ( _value + _invhist.invhist_value_after - _invhist.invhist_value_before ), invhist_posted = TRUE WHERE (invhist_id=_invhist.invhist_id); _qoh := (_qoh + (_invhist.invhist_qoh_after - _invhist.invhist_qoh_before)); _value := (_value + (_invhist.invhist_value_after - _invhist.invhist_value_before)); END LOOP; -- _qoh can be used for the netable qoh because of the negative NN transactions UPDATE itemsite SET itemsite_qtyonhand = _qoh, itemsite_nnqoh = _nonnetable_qoh, itemsite_value = CASE WHEN ((itemsite_costmethod='A') AND (_value < 0.0)) THEN 0.0 ELSE _value END WHERE(itemsite_id=pItemsiteid); END IF; RETURN pItemsiteid; END; $_$; ,DROP FUNCTION public.thawitemsite(integer); publicadminfalse8399212591683411todoitemTABLECREATE TABLE todoitem ( todoitem_id integer NOT NULL, todoitem_name text NOT NULL, todoitem_description text, todoitem_incdt_id integer, todoitem_creator_username text DEFAULT geteffectivextuser() NOT NULL, todoitem_status character(1), todoitem_active boolean DEFAULT true NOT NULL, todoitem_start_date date, todoitem_due_date date, todoitem_assigned_date date, todoitem_completed_date date, todoitem_seq integer DEFAULT 0 NOT NULL, todoitem_notes text, todoitem_crmacct_id integer, todoitem_ophead_id integer, todoitem_owner_username text, todoitem_priority_id integer, todoitem_username text, todoitem_recurring_todoitem_id integer, todoitem_cntct_id integer ); DROP TABLE public.todoitem; publicadminfalse5946594759488"00TABLE todoitemCOMMENT2COMMENT ON TABLE todoitem IS 'To-Do List items.'; publicadminfalse183"00.COLUMN todoitem.todoitem_recurring_todoitem_idCOMMENTCOMMENT ON COLUMN todoitem.todoitem_recurring_todoitem_id IS 'The first todoitem record in the series if this is a recurring To-Do item. If the todoitem_recurring_todoitem_id is the same as the todoitem_id, this record is the first in the series.'; publicadminfalse183"00todoitemACLREVOKE ALL ON TABLE todoitem FROM PUBLIC; REVOKE ALL ON TABLE todoitem FROM admin; GRANT ALL ON TABLE todoitem TO admin; GRANT ALL ON TABLE todoitem TO xtrole; publicadminfalse183&12551683420 todoitem()FUNCTION1CREATE FUNCTION todoitem() RETURNS SETOF todoitem LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _row todoitem%ROWTYPE; _priv TEXT; _grant BOOLEAN; BEGIN -- This query will give us the most permissive privilege the user has been granted SELECT privilege, granted INTO _priv, _grant FROM privgranted WHERE privilege IN ('MaintainAllToDoItems','ViewAllToDoItems','MaintainPersonalToDoItems','ViewPersonalToDoItems') ORDER BY granted DESC, sequence LIMIT 1; -- If have an 'All' privilege return all results IF (_priv ~ 'All' AND _grant) THEN FOR _row IN SELECT * FROM todoitem LOOP RETURN NEXT _row; END LOOP; -- Otherwise if have any other grant, must be personal privilege. ELSIF (_grant) THEN FOR _row IN SELECT * FROM todoitem WHERE getEffectiveXtUser() IN (todoitem_owner_username, todoitem_username) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $$; !DROP FUNCTION public.todoitem(); publicadminfalse839922732"00FUNCTION todoitem()COMMENTxCOMMENT ON FUNCTION todoitem() IS 'A table function that returns To Do Items results according to privilege settings.'; publicadminfalse208612551683421todoitemmove(integer, integer)FUNCTIONCREATE FUNCTION todoitemmove(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoItemId ALIAS FOR $1; pHowFar ALIAS FOR $2; -- -1 moves toward front of list, +1 toward back _howFar INTEGER := pHowFar; _username TEXT; _currseq INTEGER; BEGIN SELECT todoitem_username, todoitem_seq INTO _username, _currseq FROM todoitem WHERE todoitem_id = ptodoItemId; IF NOT FOUND THEN RETURN -1; END IF; IF (_currseq + pHowFar <= 0) THEN _howFar = 1 - _currseq; -- move to beginning END IF; UPDATE todoitem SET todoitem_seq=todoitem_seq - _howFar WHERE todoitem_seq >= _currseq + _howFar AND todoitem_id != ptodoItemId AND todoitem_username = _username AND todoitem_status != 'C'; UPDATE todoitem SET todoitem_seq=_currseq + _howFar WHERE todoitem_id = ptodoItemId; RETURN 0; END; $_$; 5DROP FUNCTION public.todoitemmove(integer, integer); publicadminfalse8399212551683422todoitemmovedown(integer)FUNCTIONWCREATE FUNCTION todoitemmovedown(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoItemId ALIAS FOR $1; BEGIN RETURN todoItemMove(ptodoItemId, 1); -- move toward end of list END; $_$; 0DROP FUNCTION public.todoitemmovedown(integer); publicadminfalse8399212551683423todoitemmoveup(integer)FUNCTIONWCREATE FUNCTION todoitemmoveup(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoItemId ALIAS FOR $1; BEGIN RETURN todoItemMove(ptodoItemId, -1); -- move toward front of list END; $_$; .DROP FUNCTION public.todoitemmoveup(integer); publicadminfalse8399212551683424,togglebankreccleared(integer, text, integer)FUNCTIONrCREATE FUNCTION togglebankreccleared(integer, text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ DECLARE pBankrecid ALIAS FOR $1; pSource ALIAS FOR $2; pSourceid ALIAS FOR $3; _cleared BOOLEAN; _r RECORD; BEGIN SELECT bankrecitem_id, bankrecitem_cleared INTO _r FROM bankrecitem WHERE ( (bankrecitem_bankrec_id=pBankrecid) AND (bankrecitem_source=pSource) AND (bankrecitem_source_id=pSourceid) ); IF ( NOT FOUND ) THEN _cleared := TRUE; INSERT INTO bankrecitem (bankrecitem_bankrec_id, bankrecitem_source, bankrecitem_source_id, bankrecitem_cleared) VALUES (pBankrecid, pSource, pSourceid, _cleared); ELSE _cleared := (NOT _r.bankrecitem_cleared); UPDATE bankrecitem SET bankrecitem_cleared=_cleared WHERE (bankrecitem_id=_r.bankrecitem_id); END IF; RETURN _cleared; END; $_$; CDROP FUNCTION public.togglebankreccleared(integer, text, integer); publicadminfalse83992125516834255togglebankreccleared(integer, text, integer, numeric)FUNCTIONCREATE FUNCTION togglebankreccleared(integer, text, integer, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ DECLARE pBankrecid ALIAS FOR $1; pSource ALIAS FOR $2; pSourceid ALIAS FOR $3; pCurrrate ALIAS FOR $4; _cleared BOOLEAN; _r RECORD; BEGIN SELECT bankrecitem_id, bankrecitem_cleared INTO _r FROM bankrecitem WHERE ( (bankrecitem_bankrec_id=pBankrecid) AND (bankrecitem_source=pSource) AND (bankrecitem_source_id=pSourceid) ); IF ( NOT FOUND ) THEN _cleared := TRUE; INSERT INTO bankrecitem (bankrecitem_bankrec_id, bankrecitem_source, bankrecitem_source_id, bankrecitem_cleared, bankrecitem_curr_rate) VALUES (pBankrecid, pSource, pSourceid, _cleared, pCurrrate); ELSE _cleared := (NOT _r.bankrecitem_cleared); UPDATE bankrecitem SET bankrecitem_cleared=_cleared, bankrecitem_curr_rate=pCurrrate WHERE (bankrecitem_id=_r.bankrecitem_id); END IF; RETURN _cleared; END; $_$; LDROP FUNCTION public.togglebankreccleared(integer, text, integer, numeric); publicadminfalse8399212551683426>togglebankreccleared(integer, text, integer, numeric, numeric)FUNCTIONNCREATE FUNCTION togglebankreccleared(integer, text, integer, numeric, numeric) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBankrecid ALIAS FOR $1; pSource ALIAS FOR $2; pSourceid ALIAS FOR $3; pCurrrate ALIAS FOR $4; pAmount ALIAS FOR $5; _cleared BOOLEAN; _r RECORD; BEGIN SELECT bankrecitem_id, bankrecitem_cleared INTO _r FROM bankrecitem WHERE ( (bankrecitem_bankrec_id=pBankrecid) AND (bankrecitem_source=pSource) AND (bankrecitem_source_id=pSourceid) ); IF ( NOT FOUND ) THEN _cleared := TRUE; INSERT INTO bankrecitem (bankrecitem_bankrec_id, bankrecitem_source, bankrecitem_source_id, bankrecitem_cleared, bankrecitem_curr_rate, bankrecitem_amount) VALUES (pBankrecid, pSource, pSourceid, _cleared, pCurrrate, pAmount); ELSE _cleared := FALSE; DELETE FROM bankrecitem WHERE bankrecitem_id = _r.bankrecitem_id; END IF; RETURN _cleared; END; $_$; UDROP FUNCTION public.togglebankreccleared(integer, text, integer, numeric, numeric); publicadminfalse8399212551683427#togglebomitemcost(integer, boolean)FUNCTIONCREATE FUNCTION togglebomitemcost(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pBomitemid ALIAS FOR $1; pEnabled ALIAS FOR $2; BEGIN IF (pEnabled) THEN INSERT INTO bomitemcost (bomitemcost_bomitem_id, bomitemcost_costelem_id, bomitemcost_lowlevel, bomitemcost_stdcost, bomitemcost_posted, bomitemcost_actcost, bomitemcost_updated, bomitemcost_curr_id) SELECT bomitem_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id FROM bomitem JOIN itemcost ON (itemcost_item_id=bomitem_item_id) WHERE (bomitem_id=pBomitemid); ELSE DELETE FROM bomitemcost WHERE (bomitemcost_bomitem_id=pBomitemid); END IF; RETURN 0; END; $_$; :DROP FUNCTION public.togglebomitemcost(integer, boolean); publicadminfalse83992P12551683428tonumeric(text, numeric)FUNCTIONCREATE FUNCTION tonumeric(text, numeric) RETURNS numeric LANGUAGE plpgsql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pText ALIAS FOR $1; pDefault ALIAS FOR $2; BEGIN IF (isNumeric(pText)) THEN RETURN TO_NUMBER(pText, '999999999999'); ELSE RETURN pDefault; END IF; END; $_$; /DROP FUNCTION public.tonumeric(text, numeric); publicadminfalse8399212551683429 transitwhs()FUNCTIONnCREATE FUNCTION transitwhs() RETURNS integer LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _id INTEGER; BEGIN _id = fetchMetricValue('TransitWarehouse'); IF (_id IS NOT NULL AND EXISTS(SELECT warehous_id FROM whsinfo WHERE (warehous_id=_id)) ) THEN RETURN _id; END IF; SELECT warehous_id INTO _id FROM whsinfo WHERE warehous_transit; IF (NOT FOUND) THEN _id := NEXTVAL('warehous_warehous_id_seq'); INSERT INTO whsinfo ( warehous_id, warehous_code, warehous_descrip, --warehous_fob, warehous_active, --warehous_counttag_prefix, --warehous_counttag_number, --warehous_bol_prefix, --warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, --warehous_aislesize, --warehous_aislealpha, --warehous_racksize, --warehous_rackalpha, --warehous_binsize, --warehous_binalpha, --warehous_locationsize, --warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, --warehous_shipping_commission, --warehous_cntct_id, --warehous_addr_id, warehous_taxzone_id ) VALUES ( _id, 'TRANSIT', 'Intermediate Warehouse for Inter-Warehouse Transfers', --text, TRUE, --text, --integer, --text, --integer, TRUE, FALSE, FALSE, --integer, --boolean, --integer, --boolean, --integer, --boolean, --integer, --boolean, FALSE, fetchMetricValue('UnassignedAccount'), --numeric(8,4) default 0.00, --integer, --integer, NULL ); END IF; PERFORM setMetric('TransitWarehouse', _id); RETURN _id; END; $$; #DROP FUNCTION public.transitwhs(); publicadminfalse8399212551683430transtype(text, integer)FUNCTIONCREATE FUNCTION transtype(text, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTransType ALIAS FOR $1; pTargetType ALIAS FOR $2; BEGIN IF (pTargetType = 255) THEN RETURN TRUE; ELSIF (pTargetType = 1) THEN RETURN receipts(pTransType); ELSIF (pTargetType = 2) THEN RETURN issues(pTransType); ELSIF (pTargetType = 4) THEN RETURN shipments(pTransType); ELSIF (pTargetType = 8) THEN RETURN adjustments(pTransType); ELSIF (pTargetType = 16) THEN RETURN transfers(pTransType); ELSIF (pTargetType = 32) THEN RETURN scraps(pTransType); ELSE RETURN TRUE; END IF; END; $_$; /DROP FUNCTION public.transtype(text, integer); publicadminfalse83992U12551683431trylock(integer, integer)FUNCTIONCREATE FUNCTION trylock(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pKey1 ALIAS FOR $1; pKey2 ALIAS FOR $2; _pid integer; BEGIN /* The standard try lock ignores locks made by the current user in same session. Check for ANY lock on this id, whether by this user or not */ SELECT pid INTO _pid FROM pg_locks WHERE ((classid=pKey1) AND (objid=pKey2) AND (objsubid=2)); IF (FOUND) THEN RETURN false; ELSE RETURN pg_try_advisory_lock(pKey1,pKey2); END IF; END; $_$; 0DROP FUNCTION public.trylock(integer, integer); publicadminfalse8399212551683432undomerge(text, text, integer)FUNCTIONfCREATE FUNCTION undomerge(text, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSchema ALIAS FOR $1; pTable ALIAS FOR $2; pId ALIAS FOR $3; _qry TEXT; _r RECORD; _result INTEGER; BEGIN FOR _r IN SELECT * FROM mrgundo WHERE mrgundo_base_schema = pSchema AND mrgundo_base_table = pTable AND mrgundo_base_id = pId AND mrgundo_col IS NOT NULL -- NULL mrgundo_col signals a row to delete on purge LOOP IF (_r.mrgundo_value IS NULL) THEN _qry := 'UPDATE ' || quote_ident(_r.mrgundo_schema) || '.' || quote_ident(_r.mrgundo_table) || ' SET ' || quote_ident(_r.mrgundo_col) || '= NULL WHERE (' || _r.mrgundo_pkey_col || '=' || _r.mrgundo_pkey_id || ');'; ELSE _qry := 'UPDATE ' || quote_ident(_r.mrgundo_schema) || '.' || quote_ident(_r.mrgundo_table) || ' SET ' || quote_ident(_r.mrgundo_col) || '= CAST(' || quote_literal(_r.mrgundo_value) || ' AS ' || quote_ident(_r.mrgundo_type) || ') WHERE (' || _r.mrgundo_pkey_col || '=' || _r.mrgundo_pkey_id || ');'; END IF; EXECUTE _qry; END LOOP; DELETE FROM mrgundo WHERE mrgundo_base_schema = pSchema AND mrgundo_base_table = pTable AND mrgundo_base_id = pId; GET DIAGNOSTICS _result = ROW_COUNT; RETURN _result; END; $_$; 5DROP FUNCTION public.undomerge(text, text, integer); publicadminfalse8399212551683433uomusedforitem(integer)FUNCTION CREATE FUNCTION uomusedforitem(integer) RETURNS SETOF uom LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pitemid ALIAS FOR $1; _row uom%ROWTYPE; BEGIN FOR _row IN SELECT DISTINCT * FROM uom WHERE uom_id IN ( SELECT bomitem_uom_id AS uom_id FROM bomitem WHERE (bomitem_item_id=pitemid) UNION SELECT cmitem_qty_uom_id FROM cmitem, itemsite WHERE ((cmitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT cmitem_price_uom_id FROM cmitem, itemsite WHERE ((cmitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT coitem_qty_uom_id FROM coitem, itemsite WHERE ((coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT coitem_price_uom_id FROM coitem, itemsite WHERE ((coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT invcitem_qty_uom_id FROM invcitem WHERE ((invcitem_item_id=pitemid)) UNION SELECT invcitem_price_uom_id FROM invcitem WHERE ((invcitem_item_id=pitemid)) UNION SELECT ipsitem_qty_uom_id FROM ipsiteminfo WHERE (ipsitem_item_id=pitemid) UNION SELECT ipsitem_price_uom_id FROM ipsiteminfo WHERE (ipsitem_item_id=pitemid) UNION SELECT quitem_qty_uom_id FROM quitem, itemsite WHERE ((quitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT quitem_price_uom_id FROM quitem, itemsite WHERE ((quitem_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) UNION SELECT womatl_uom_id FROM womatl, itemsite WHERE ((womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) ) LOOP RETURN NEXT _row; END LOOP; IF (fetchmetricbool('MultiWhs')) THEN FOR _row IN SELECT DISTINCT * FROM uom WHERE uom_id IN ( SELECT rahist_uom_id FROM rahist, itemsite WHERE ((rahist_itemsite_id=itemsite_id) AND (itemsite_item_id=pitemid)) ) LOOP RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; .DROP FUNCTION public.uomusedforitem(integer); publicadminfalse839922689125516834342updateabcclass(text, numeric, numeric, date, date)FUNCTION"CREATE FUNCTION updateabcclass(text, numeric, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClassCodePattern ALIAS FOR $1; pACutoff ALIAS FOR $2; pBCutoff ALIAS FOR $3; pStartDate ALIAS FOR $4; pEndDate ALIAS FOR $5; _result INTEGER; BEGIN SELECT updateABCClass(pClassCodePattern, -1, pACutoff, pBCutoff, pStartDate, pEndDate) INTO _result; RETURN _result; END; $_$; IDROP FUNCTION public.updateabcclass(text, numeric, numeric, date, date); publicadminfalse8399212551683435;updateabcclass(text, integer, numeric, numeric, date, date)FUNCTIONNCREATE FUNCTION updateabcclass(text, integer, numeric, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClassCodePattern ALIAS FOR $1; pWarehousid ALIAS FOR $2; pACutoff ALIAS FOR $3; pBCutoff ALIAS FOR $4; pStartDate ALIAS FOR $5; pEndDate ALIAS FOR $6; _updateCount INTEGER; _totalValue NUMERIC; _cumulativeValue NUMERIC; _itemsite RECORD; BEGIN SELECT COUNT(*) INTO _updateCount FROM itemsite, item, classcode WHERE ( (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (itemsite_autoabcclass) AND (classcode_code ~ pClassCodePattern) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); IF (_updateCount IS NULL) THEN RETURN 0; ELSE UPDATE itemsite SET itemsite_abcclass='T' FROM item, classcode WHERE ( (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (itemsite_autoabcclass) AND (classcode_code ~ pClassCodePattern) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); SELECT SUM(ABS(invhist_qoh_before - invhist_qoh_after) * invhist_unitcost) INTO _totalValue FROM invhist, itemsite, item, classcode WHERE ( (invhist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (invhist_analyze) AND (invhist_transtype ~ '^[IR]') AND (itemsite_autoabcclass) AND (classcode_code ~ pClassCodePattern) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); IF ( (_totalValue IS NULL) OR (_totalValue = 0) ) THEN UPDATE itemsite SET itemsite_abcclass='A' WHERE (itemsite_abcclass='T'); ELSE _cumulativeValue := 0; FOR _itemsite IN SELECT itemsite_id, item_number, SUM(ABS(invhist_qoh_before - invhist_qoh_after) * invhist_unitcost) AS value FROM invhist, itemsite, item, classcode WHERE ( (invhist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_classcode_id=classcode_id) AND (invhist_analyze) AND (invhist_transtype ~ '^[IR]') AND (itemsite_autoabcclass) AND (classcode_code ~ pClassCodePattern) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ) GROUP BY itemsite_id, item_number ORDER BY value DESC LOOP IF (_itemsite.value IS NOT NULL) THEN _cumulativeValue := _cumulativeValue + _itemsite.value; END IF; IF ((_cumulativeValue / _totalValue) <= pACutoff) THEN UPDATE itemsite SET itemsite_abcclass='A' WHERE (itemsite_id=_itemsite.itemsite_id); ELSE IF ((_cumulativeValue / _totalValue) <= pBCutoff) THEN UPDATE itemsite SET itemsite_abcclass='B' WHERE (itemsite_id=_itemsite.itemsite_id); ELSE UPDATE itemsite SET itemsite_abcclass='C' WHERE (itemsite_id=_itemsite.itemsite_id); END IF; END IF; END LOOP; UPDATE itemsite SET itemsite_abcclass='C' WHERE (itemsite_abcclass='T'); END IF; END IF; RETURN _updateCount; END; $_$; RDROP FUNCTION public.updateabcclass(text, integer, numeric, numeric, date, date); publicadminfalse839925125516834365updateabcclass(integer, numeric, numeric, date, date)FUNCTIONCREATE FUNCTION updateabcclass(integer, numeric, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClasscodeid ALIAS FOR $1; pACutoff ALIAS FOR $2; pBCutoff ALIAS FOR $3; pStartDate ALIAS FOR $4; pEndDate ALIAS FOR $5; _result INTEGER; BEGIN SELECT updateABCClass(pClassCodeid, -1, pACutoff, pBCutoff, pStartDate, pEndDate) INTO _result; RETURN _result; END; $_$; LDROP FUNCTION public.updateabcclass(integer, numeric, numeric, date, date); publicadminfalse8399212551683437>updateabcclass(integer, integer, numeric, numeric, date, date)FUNCTION' CREATE FUNCTION updateabcclass(integer, integer, numeric, numeric, date, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pClasscodeid ALIAS FOR $1; pWarehousid ALIAS FOR $2; pACutoff ALIAS FOR $3; pBCutoff ALIAS FOR $4; pStartDate ALIAS FOR $5; pEndDate ALIAS FOR $6; _updateCount INTEGER; _totalValue NUMERIC; _cumulativeValue NUMERIC; _itemsite RECORD; BEGIN SELECT COUNT(*) INTO _updateCount FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND ((item_classcode_id=pClasscodeid) OR (pClasscodeid=-1)) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); IF (_updateCount IS NULL) THEN _updateCount := 0; ELSE UPDATE itemsite SET itemsite_abcclass='T' FROM item WHERE ( (itemsite_item_id=item_id) AND ((item_classcode_id=pClasscodeid) OR (pClasscodeid=-1)) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); SELECT SUM(ABS(invhist_qoh_before - invhist_qoh_after) * invhist_unitcost) INTO _totalValue FROM invhist, itemsite, item WHERE ( (invhist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invhist_analyze) AND (invhist_transtype ~ '^[IR]') AND ((item_classcode_id=pClasscodeid) OR (pClasscodeid=-1)) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ); IF ( (_totalValue IS NULL) OR (_totalValue = 0) ) THEN UPDATE itemsite SET itemsite_abcclass='A' WHERE (itemsite_abcclass='T'); ELSE _cumulativeValue := 0; FOR _itemsite IN SELECT itemsite_id, item_number, SUM(ABS(invhist_qoh_before - invhist_qoh_after) * invhist_unitcost) AS value FROM invhist, itemsite, item WHERE ( (invhist_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (invhist_analyze) AND (invhist_transtype ~ '^[IR]') AND ((item_classcode_id=pClasscodeid) OR (pClasscodeid=-1)) AND (invhist_transdate::DATE BETWEEN pStartDate AND pEndDate) AND ((itemsite_warehous_id=pWarehousid) OR (pWarehousid=-1)) ) GROUP BY itemsite_id, item_number ORDER BY value DESC LOOP IF (_itemsite.value IS NOT NULL) THEN _cumulativeValue := _cumulativeValue + _itemsite.value; END IF; IF ((_cumulativeValue / _totalValue) <= pACutoff) THEN UPDATE itemsite SET itemsite_abcclass='A' WHERE (itemsite_id=_itemsite.itemsite_id); ELSE IF ((_cumulativeValue / _totalValue) <= pBCutoff) THEN UPDATE itemsite SET itemsite_abcclass='B' WHERE (itemsite_id=_itemsite.itemsite_id); ELSE UPDATE itemsite SET itemsite_abcclass='C' WHERE (itemsite_id=_itemsite.itemsite_id); END IF; END IF; END LOOP; UPDATE itemsite SET itemsite_abcclass='C' WHERE (itemsite_abcclass='T'); END IF; END IF; RETURN _updateCount; END; $_$; UDROP FUNCTION public.updateabcclass(integer, integer, numeric, numeric, date, date); publicadminfalse83992Y125516834382updatecharassignment(text, integer, integer, text)FUNCTIONCREATE FUNCTION updatecharassignment(text, integer, integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetId ALIAS FOR $2; pCharId ALIAS FOR $3; pValue ALIAS FOR $4; _charassid INTEGER; BEGIN SELECT updateCharAssignment(pTargetType, pTargetId, pCharId, pValue, 0) INTO _charassid; RETURN _charassid; END; $_$; IDROP FUNCTION public.updatecharassignment(text, integer, integer, text); publicadminfalse8399212551683439;updatecharassignment(text, integer, integer, text, numeric)FUNCTIONLCREATE FUNCTION updatecharassignment(text, integer, integer, text, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTargetType ALIAS FOR $1; pTargetId ALIAS FOR $2; pCharId ALIAS FOR $3; pValue ALIAS FOR $4; pPrice ALIAS FOR $5; _charassid INTEGER; _charassprice NUMERIC; _explodedJob BOOLEAN = FALSE; _value TEXT; BEGIN -- Check for Valid Assignment IF (pTargetType='SI') THEN SELECT (item_config AND wo_status != 'O') INTO _explodedJob FROM coitem,itemsite,item,wo WHERE ((coitem_id=pTargetId) AND (itemsite_id=coitem_itemsite_id) AND (item_id=itemsite_item_id) AND (wo_ordtype='S') AND (wo_ordid=coitem_id)); END IF; SELECT charass_id,charass_value INTO _charassid, _value FROM charass WHERE ((charass_target_type=pTargetType) AND (charass_target_id=pTargetId) AND (charass_char_id=pCharId) ) LIMIT 1; IF (FOUND) THEN IF (_explodedJob AND pValue != _value) THEN RAISE EXCEPTION 'Characteristic may not be updated for Configured Item with exploded Work Order.'; ELSIF(COALESCE(pValue, '')!='') THEN UPDATE charass SET charass_value = pValue, charass_price = pPrice WHERE (charass_id=_charassid); ELSE DELETE FROM charass WHERE (charass_id=_charassid); _charassid := 0; END IF; ELSE IF ( (_explodedJob) AND (COALESCE(pValue, '')!='') ) THEN RAISE EXCEPTION 'Characteristics may not be updated for Configured Item with exploded Work Order.'; ELSIF(COALESCE(pValue, '')!='') THEN SELECT nextval('charass_charass_id_seq') INTO _charassid; INSERT INTO charass (charass_id, charass_target_type, charass_target_id, charass_char_id, charass_value, charass_price) VALUES(_charassid, pTargetType, pTargetId, pCharId, pValue, pPrice); ELSE _charassid := 0; END IF; END IF; RETURN _charassid; END; $_$; RDROP FUNCTION public.updatecharassignment(text, integer, integer, text, numeric); publicadminfalse8399212551683440updatecost(integer, numeric)FUNCTION_CREATE FUNCTION updatecost(integer, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemcostid ALIAS FOR $1; pCost ALIAS FOR $2; BEGIN RETURN updateCost(pItemcostid, pCost, baseCurrId()); END; $_$; 3DROP FUNCTION public.updatecost(integer, numeric); publicadminfalse83992[12551683441+updatecost(integer, text, boolean, numeric)FUNCTIONpCREATE FUNCTION updatecost(integer, text, boolean, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE returnVal INTEGER; BEGIN SELECT updateCost($1, $2, $3, $4, baseCurrId()) INTO returnVal; RETURN returnVal; END; $_$; BDROP FUNCTION public.updatecost(integer, text, boolean, numeric); publicadminfalse8399212551683442.updatecost(integer, integer, boolean, numeric)FUNCTIONsCREATE FUNCTION updatecost(integer, integer, boolean, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE returnVal INTEGER; BEGIN SELECT updateCost($1, $2, $3, $4, baseCurrId()) INTO returnVal; RETURN returnVal; END; $_$; EDROP FUNCTION public.updatecost(integer, integer, boolean, numeric); publicadminfalse8399212551683443%updatecost(integer, numeric, integer)FUNCTIONCREATE FUNCTION updatecost(integer, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemcostid ALIAS FOR $1; pCost ALIAS FOR $2; pCurrId ALIAS FOR $3; BEGIN IF ( ( SELECT (itemcost_stdcost > 0) FROM itemcost WHERE (itemcost_id=pItemcostid) ) OR (pCost > 0) ) THEN UPDATE itemcost SET itemcost_actcost=pCost, itemcost_updated=CURRENT_DATE, itemcost_curr_id=pCurrId WHERE (itemcost_id=pItemcostid); RETURN pItemcostid; ELSE DELETE FROM itemcost WHERE (itemcost_id=pItemcostid); RETURN -1; END IF; END; $_$; <DROP FUNCTION public.updatecost(integer, numeric, integer); publicadminfalse83992125516834444updatecost(integer, text, boolean, numeric, integer)FUNCTIONCREATE FUNCTION updatecost(integer, text, boolean, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCosttype ALIAS FOR $2; pLevel ALIAS FOR $3; pCost ALIAS FOR $4; pCurrid ALIAS FOR $5; _cost NUMERIC; _currId INTEGER; _p RECORD; _itemcostid INTEGER; BEGIN IF (pCost IS NULL) THEN _cost = 0; ELSE _cost = pCost; END IF; IF (pCurrId IS NULL) THEN _currId := baseCurrID(); ELSE _currId := pCurrId; END IF; SELECT itemcost_id, itemcost_stdcost INTO _p FROM itemcost, costelem WHERE ( (itemcost_costelem_id=costelem_id) AND (itemcost_item_id=pItemid) AND (itemcost_lowlevel=pLevel) AND (costelem_type=pCosttype) ); IF (NOT FOUND) THEN IF (_cost > 0) THEN SELECT NEXTVAL('itemcost_itemcost_id_seq') INTO _itemcostid; INSERT INTO itemcost ( itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id ) SELECT _itemcostid, pItemid, costelem_id, pLevel, 0, startOfTime(), _cost, CURRENT_DATE, _currId FROM costelem WHERE (costelem_type=pCosttype); RETURN _itemcostid; ELSE RETURN -1; END IF; ELSIF ( (_p.itemcost_stdcost > 0) OR (_cost > 0) ) THEN UPDATE itemcost SET itemcost_actcost=_cost, itemcost_curr_id = _currId, itemcost_updated=CURRENT_DATE WHERE (itemcost_id=_p.itemcost_id); RETURN _p.itemcost_id; ELSE DELETE FROM itemcost WHERE (itemcost_id=_p.itemcost_id); RETURN -1; END IF; END; $_$; KDROP FUNCTION public.updatecost(integer, text, boolean, numeric, integer); publicadminfalse83992125516834457updatecost(integer, integer, boolean, numeric, integer)FUNCTIONCREATE FUNCTION updatecost(integer, integer, boolean, numeric, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCostelemid ALIAS FOR $2; pLevel ALIAS FOR $3; pCost ALIAS FOR $4; pCurrid ALIAS FOR $5; _cost NUMERIC; _currId INTEGER; _p RECORD; _itemcostid INTEGER; BEGIN IF (pCost IS NULL) THEN _cost = 0; ELSE _cost = pCost; END IF; IF (pCurrId IS NULL) THEN _currId := baseCurrID(); ELSE _currId := pCurrId; END IF; SELECT itemcost_id, itemcost_stdcost INTO _p FROM itemcost WHERE ((itemcost_costelem_id=pCostelemid) AND (itemcost_item_id=pItemid) AND (itemcost_lowlevel=pLevel) ); IF (NOT FOUND) THEN IF (_cost > 0) THEN SELECT NEXTVAL('itemcost_itemcost_id_seq') INTO _itemcostid; INSERT INTO itemcost ( itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated, itemcost_curr_id ) SELECT _itemcostid, pItemid, costelem_id, pLevel, 0, startOfTime(), _cost, CURRENT_DATE, _currId FROM costelem WHERE (costelem_id=pCostelemid); RETURN _itemcostid; ELSE RETURN -1; END IF; ELSIF ( (_p.itemcost_stdcost > 0) OR (_cost > 0) ) THEN UPDATE itemcost SET itemcost_actcost=_cost, itemcost_curr_id = _currId, itemcost_updated=CURRENT_DATE WHERE (itemcost_id=_p.itemcost_id); RETURN _p.itemcost_id; ELSE DELETE FROM itemcost WHERE (itemcost_id=_p.itemcost_id); RETURN -1; END IF; END; $_$; NDROP FUNCTION public.updatecost(integer, integer, boolean, numeric, integer); publicadminfalse8399212552005947<updatecreditmemoline(api.creditmemoline, api.creditmemoline)FUNCTIONh CREATE FUNCTION updatecreditmemoline(api.creditmemoline, api.creditmemoline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; pOld ALIAS FOR $2; _check INTEGER; _r RECORD; BEGIN SELECT cmitem_id INTO _check FROM cmitem WHERE ( (cmitem_cmhead_id=getCmheadId(pOld.memo_number, FALSE)) AND (cmitem_linenumber=pOld.line_number) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Credit Memo # % Line Number # not found', pOld.memo_number, pOld.line_number; END IF; UPDATE cmitem SET cmitem_itemsite_id=COALESCE(itemsite_id, -1), cmitem_qtycredit=pNew.qty_to_credit, cmitem_qtyreturned=pNew.qty_returned, cmitem_unitprice=pNew.net_unit_price, cmitem_comments=pNew.notes, cmitem_rsncode_id=getRsnId(pNew.reason_code), cmitem_taxtype_id=taxtype_id, cmitem_qty_uom_id=COALESCE(getUomId(pNew.qty_uom), item_inv_uom_id), cmitem_qty_invuomratio=CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE(getUomId(pNew.qty_uom),item_inv_uom_id),item_inv_uom_id) ELSE 1 END, cmitem_price_uom_id=COALESCE(getUomId(pNew.price_uom),item_price_uom_id), cmitem_price_invuomratio=CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE(getUomId(pNew.price_uom),item_price_uom_id),item_price_uom_id) ELSE 1 END FROM cmhead LEFT OUTER JOIN item ON (item_id=getItemId(pNew.item_number)) LEFT OUTER JOIN itemsite ON (itemsite_item_id=item_id AND itemsite_warehous_id=getWarehousId(pNew.recv_site, 'ALL')) LEFT OUTER JOIN taxtype ON (taxtype_id=CASE WHEN pNew.tax_type IS NULL THEN getItemTaxType(item_id,cmhead_taxzone_id) WHEN pNew.tax_type = 'None' THEN NULL ELSE getTaxTypeId(pNew.tax_type) END) WHERE cmitem_cmhead_id=cmhead_id AND cmhead_number=pOld.memo_number AND cmitem_linenumber=pOld.line_number AND cmhead_posted=FALSE; RETURN TRUE; END; $_$; SDROP FUNCTION public.updatecreditmemoline(api.creditmemoline, api.creditmemoline); publicadminfalse8399227872787 12551683447updatecustomprivs()FUNCTIONCREATE FUNCTION updatecustomprivs() RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; BEGIN FOR _r IN SELECT priv_id FROM priv WHERE ((priv_name IN (SELECT priv_name FROM priv WHERE (priv_module='Custom') EXCEPT SELECT ('Custom'||cmd_privname) FROM cmd)) AND (priv_module='Custom')) LOOP -- TODO: something here DELETE FROM grppriv WHERE grppriv_priv_id=_r.priv_id; DELETE FROM usrpriv WHERE usrpriv_priv_id=_r.priv_id; DELETE FROM priv WHERE priv_id=_r.priv_id; END LOOP; FOR _r IN SELECT ('Custom'||cmd_privname) AS privname FROM cmd EXCEPT SELECT priv_name FROM priv WHERE (priv_module='Custom') LOOP -- TODO: something here INSERT INTO priv (priv_module, priv_name, priv_descrip) VALUES ('Custom', _r.privname, 'Auto Generated Custom Priv.'); END LOOP; RETURN TRUE; END; $$; *DROP FUNCTION public.updatecustomprivs(); publicadminfalse83992125520061257updateinvoicelineitem(api.invoiceline, api.invoiceline)FUNCTION CREATE FUNCTION updateinvoicelineitem(api.invoiceline, api.invoiceline) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pNew ALIAS FOR $1; pOld ALIAS FOR $2; _r RECORD; BEGIN UPDATE invcitem SET invcitem_linenumber=pNew.line_number, invcitem_item_id=COALESCE(item_id, -1), invcitem_custpn=pNew.customer_part_number, invcitem_number=(CASE WHEN item_id IS NULL THEN pNew.misc_item_number ELSE NULL END), invcitem_warehous_id=(CASE WHEN invcitem_warehous_id IS NULL THEN COALESCE(getwarehousid(pNew.site,'ALL'),-1) ELSE NULL END), invcitem_descrip=(CASE WHEN item_id IS NULL THEN pNew.misc_item_description ELSE NULL END), invcitem_ordered=pNew.qty_ordered, invcitem_billed=COALESCE(pNew.qty_billed, 0), invcitem_updateinv=COALESCE(pNew.update_inventory,FALSE), invcitem_price=COALESCE(pNew.net_unit_price,itemPrice(item_id,invchead_cust_id, invchead_shipto_id,pNew.qty_ordered,invchead_curr_id,invchead_orderdate)), invcitem_notes=COALESCE(pNew.notes,''), invcitem_salescat_id=CASE WHEN item_id IS NULL THEN (SELECT salescat_id FROM salescat WHERE salescat_name = pNew.sales_category) ELSE NULL END, invcitem_taxtype_id=taxtype_id, invcitem_qty_uom_id=CASE WHEN item_id IS NOT NULL THEN COALESCE((SELECT uom_id FROM uom WHERE (uom_name=pNew.qty_uom)), item_price_uom_id) ELSE NULL END, invcitem_qty_invuomratio=CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.qty_uom),item_price_uom_id), item_price_uom_id ) ELSE 1 END, invcitem_price_uom_id=CASE WHEN item_id IS NOT NULL THEN COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.price_uom),item_price_uom_id) ELSE NULL END, invcitem_price_invuomratio=CASE WHEN item_id IS NOT NULL THEN itemuomtouomratio(item_id, COALESCE((SELECT uom_id FROM uom WHERE uom_name=pNew.price_uom),item_price_uom_id), item_price_uom_id ) ELSE 1 END, invcitem_rev_accnt_id=getGlAccntId(alternate_rev_account) FROM invchead LEFT OUTER JOIN item ON (item_id=getItemId(pNew.item_number)) LEFT OUTER JOIN taxtype ON (taxtype_id=CASE WHEN pNew.tax_type IS NULL THEN getItemTaxType(item_id,invchead_taxzone_id) WHEN pNew.tax_type = 'None' THEN NULL ELSE (SELECT taxtype_id FROM taxtype WHERE taxtype_name=pNew.tax_type) END) WHERE invcitem_invchead_id=invchead_id AND invcitem_linenumber=pOld.line_number AND invchead_invcnumber=pOld.invoice_number AND invchead_posted=FALSE; RETURN TRUE; END; $_$; NDROP FUNCTION public.updateinvoicelineitem(api.invoiceline, api.invoiceline); publicadminfalse287683992287612551683449;updateitemcost(integer, integer, integer, numeric, boolean)FUNCTIONCREATE FUNCTION updateitemcost(integer, integer, integer, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemId ALIAS FOR $1; pCostElemId ALIAS FOR $2; pCurrId ALIAS FOR $3; pCost ALIAS FOR $4; pPostToStandard ALIAS FOR $5; _itemcost_id INTEGER; _update_return INTEGER; _postcost_return BOOLEAN; --This function is used with the api.itemcost View for updating --the itemcost table BEGIN SELECT itemcost_id INTO _itemcost_id FROM itemcost WHERE ( (itemcost_item_id = pItemId) AND (itemcost_costelem_id = pCostElemId) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'itemcost % not found for. ', pItemId || ' & ' || pCostElemId; END IF; IF (pCost IS NULL OR pCost < 0) THEN RAISE EXCEPTION 'itemcost Actual Cost Invalid ', pCost; END IF; IF (pCost > 0) THEN UPDATE itemcost SET itemcost_actcost=pCost, itemcost_curr_id = pCurrId WHERE (itemcost_id=_itemcost_id); --Only Post Cost to standard if the parameter is set to true IF (pPostToStandard) THEN IF (NOT checkPrivilege('PostStandardCosts')) THEN RAISE EXCEPTION 'You do not have privileges to poststandard itemcosts. Set api.itemcost post_to_standard to false'; END IF; SELECT postcost(_itemcost_id) INTO _postcost_return; IF (NOT _postcost_return) THEN RETURN -2; END IF; END IF; ELSE RETURN -1; END IF; RETURN _itemcost_id; END; $_$; RDROP FUNCTION public.updateitemcost(integer, integer, integer, numeric, boolean); publicadminfalse8399212551683450(updateitemsiteleadtime(integer, integer)FUNCTION*CREATE FUNCTION updateitemsiteleadtime(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pPad ALIAS FOR $2; _p RECORD; _materialLeadTime INTEGER; _productionLeadTime INTEGER; _leadTime INTEGER; BEGIN SELECT item_type, itemsite_wosupply INTO _p FROM item, itemsite WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pitemsiteid) ); IF ( (_p.item_type IN ('M', 'P')) ) THEN IF (_p.item_type = 'M') THEN SELECT COALESCE(MAX(component.itemsite_leadtime), 0) INTO _materialLeadTime FROM bomitem, itemsite AS parent, itemsite AS component WHERE ( (bomitem_parent_item_id=parent.itemsite_item_id) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) AND (bomitem_item_id=component.itemsite_item_id) AND (parent.itemsite_warehous_id=component.itemsite_warehous_id) AND (parent.itemsite_id=pItemsiteid) ); SELECT COALESCE(MAX(booitem_execday), 0) INTO _productionLeadTime FROM xtmfg.booitem, itemsite WHERE ( (booitem_item_id=itemsite_item_id) AND (booitem_rev_id=getActiveRevId('BOO',booitem_item_id)) AND (itemsite_id=pItemsiteid) ); _leadTime := (_materialLeadTime + _productionLeadTime + pPad); ELSIF (_p.item_type IN ('P')) THEN SELECT COALESCE(MAX(itemsrc_leadtime), 0) INTO _leadTime FROM itemsrc, itemsite WHERE ( (itemsite_item_id=itemsrc_item_id) AND (itemsite_id=pItemsiteid) ); _leadTime := (_leadTime + pPad); END IF; ELSE _leadTime = pPad; END IF; UPDATE itemsite SET itemsite_leadtime=_leadTime WHERE (itemsite_id=pItemsiteid); RETURN _leadTime; END; $_$; ?DROP FUNCTION public.updateitemsiteleadtime(integer, integer); publicadminfalse8399212551683451!updatelistprice(integer, numeric)FUNCTIONCREATE FUNCTION updatelistprice(integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUpdateBy ALIAS FOR $2; BEGIN UPDATE item SET item_listprice = (item_listprice * pUpdateBy) WHERE (item_id=pItemid); RETURN 1; END; $_$; 8DROP FUNCTION public.updatelistprice(integer, numeric); publicadminfalse83992A12551683452updatelowerusercosts(integer)FUNCTION?CREATE FUNCTION updatelowerusercosts(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; BEGIN RETURN updateLowerUserCosts(pItemid, TRUE); END; $_$; 4DROP FUNCTION public.updatelowerusercosts(integer); publicadminfalse8399212551683453&updatelowerusercosts(integer, boolean)FUNCTION= CREATE FUNCTION updatelowerusercosts(integer, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pUpdateActual ALIAS FOR $2; _bomitem RECORD; _type CHAR(1); BEGIN SELECT item_type INTO _type FROM item WHERE (item_id=pItemid); IF (_type IN ('M', 'F', 'B', 'T')) THEN FOR _bomitem IN SELECT DISTINCT costelem_type FROM ( SELECT COALESCE(bc.costelem_type, ic.costelem_type) AS costelem_type FROM bomitem(pItemid) JOIN item ON (item_id=bomitem_item_id AND item_type <> 'T') JOIN itemcost ON (itemcost_item_id=bomitem_item_id) JOIN costelem ic ON (ic.costelem_id=itemcost_costelem_id AND NOT ic.costelem_sys) LEFT OUTER JOIN bomitemcost ON (bomitemcost_bomitem_id=bomitem_id) LEFT OUTER JOIN costelem bc ON (bc.costelem_id=bomitemcost_costelem_id AND NOT bc.costelem_sys) WHERE ( CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1) ) UNION SELECT costelem_type FROM itemcost, costelem WHERE ( (itemcost_costelem_id=costelem_id) AND (itemcost_item_id=pItemid) ) ) AS data LOOP PERFORM updateSorACost( pItemid, _bomitem.costelem_type, TRUE, lowerCost(pItemid, _bomitem.costelem_type, pUpdateActual), pUpdateActual); END LOOP; ELSIF (_type = 'C') THEN FOR _bomitem IN SELECT DISTINCT costelem_type FROM ( SELECT costelem_type FROM itemcost, costelem, xtmfg.bbomitem WHERE ( (bbomitem_item_id=pItemid) AND ( CURRENT_DATE BETWEEN bbomitem_effective AND (bbomitem_expires - 1) ) AND (NOT costelem_sys) AND (bbomitem_item_id=itemcost_item_id) AND (itemcost_costelem_id=costelem_id) ) UNION SELECT costelem_type FROM itemcost, costelem, xtmfg.bbomitem AS t, xtmfg.bbomitem AS s WHERE ( (t.bbomitem_item_id=pItemid) AND ( CURRENT_DATE BETWEEN s.bbomitem_effective AND (s.bbomitem_expires - 1) ) AND ( CURRENT_DATE BETWEEN t.bbomitem_effective AND (t.bbomitem_expires - 1) ) AND (s.bbomitem_parent_item_id=t.bbomitem_parent_item_id) AND (NOT costelem_sys) AND (s.bbomitem_item_id=itemcost_item_id) AND (itemcost_costelem_id=costelem_id) ) ) AS data LOOP PERFORM updateSorACost( pItemid, _bomitem.costelem_type, TRUE, lowerCost(pItemid, _bomitem.costelem_type, pUpdateActual), pUpdateActual); END LOOP; END IF; RETURN 1; END; $_$; =DROP FUNCTION public.updatelowerusercosts(integer, boolean); publicadminfalse8399212551683454updatelowlevel(integer)FUNCTIONaCREATE FUNCTION updatelowlevel(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLowlevel ALIAS FOR $1; _num_back INTEGER; BEGIN UPDATE costUpdate SET costUpdate_lowlevel_code = (pLowlevel + 1) WHERE costUpdate_item_id IN ( SELECT bomitem_item_id FROM bomitem JOIN costUpdate ON (bomitem_parent_item_id = costUpdate_item_id) WHERE ((costUpdate_lowlevel_code = pLowlevel) AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id)) AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires - 1)))) AND costUpdate_lowlevel_code >= pLowlevel; GET DIAGNOSTICS _num_back = ROW_COUNT; RETURN _num_back; END; $_$; .DROP FUNCTION public.updatelowlevel(integer); publicadminfalse8399212551683455+updateoutlevel(integer, integer, integer[])FUNCTIONCREATE FUNCTION updateoutlevel(integer, integer, integer[]) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDays ALIAS FOR $2; pPeriods ALIAS FOR $3; _cursor INTEGER; _periodid INTEGER; _usage NUMERIC; _totalUsage NUMERIC; _totalDays INTEGER; _outLevel NUMERIC; _averageUsage NUMERIC; BEGIN _cursor := 1; _totalUsage := 0; _totalDays := 0; _periodid = pPeriods[_cursor]; WHILE (_periodid IS NOT NULL) LOOP SELECT COALESCE(SUM(invhist_invqty), 0) INTO _usage FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteid) AND ( invhist_transdate::DATE BETWEEN findPeriodStart(_periodid) AND findPeriodEnd(_periodid) ) AND (invhist_transtype IN ('SH', 'IM')) ); _totalUsage := (_totalUsage + _usage); _totalDays := ( _totalDays + ( findPeriodEnd(_periodid) - findPeriodStart(_periodid) + 1 ) ); _cursor := (_cursor + 1); _periodid = pPeriods[_cursor]; END LOOP; IF (_totalDays > 0) THEN _outLevel := round(_totalUsage / _totalDays * pDays); IF (_outLevel > 0) THEN UPDATE itemsite SET itemsite_ordertoqty = _outLevel WHERE (itemsite_id=pItemsiteid); ELSE UPDATE itemsite SET itemsite_ordertoqty = 0 WHERE (itemsite_id=pItemsiteid); END IF; RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; BDROP FUNCTION public.updateoutlevel(integer, integer, integer[]); publicadminfalse8399212551683456updateprice(integer, numeric)FUNCTIONcCREATE FUNCTION updateprice(integer, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pIpsitemid ALIAS FOR $1; pUpdateBy ALIAS FOR $2; BEGIN RETURN updatePrice(pIpsitemid, 'P', pUpdateBy); END; $_$; 4DROP FUNCTION public.updateprice(integer, numeric); publicadminfalse8399212551683457(updateprice(integer, character, numeric)FUNCTIONvCREATE FUNCTION updateprice(integer, character, numeric) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pIpsitemid ALIAS FOR $1; pUpdateType ALIAS FOR $2; pUpdateBy ALIAS FOR $3; BEGIN IF (pUpdateType IN('V')) THEN UPDATE ipsitem SET ipsitem_price = (ipsitem_price + pUpdateBy) WHERE (ipsitem_id=pIpsitemid); RETURN 1; ELSE UPDATE ipsitem SET ipsitem_price = (ipsitem_price * pUpdateBy) WHERE (ipsitem_id=pIpsitemid); RETURN 1; END IF; END; $_$; ?DROP FUNCTION public.updateprice(integer, character, numeric); publicadminfalse8399212551683458Cupdatepricesbypricingschedule(integer, character, numeric, boolean)FUNCTIONCREATE FUNCTION updatepricesbypricingschedule(pipsheadid integer, pupdatetype character, pupdateby numeric, pupdatecharprices boolean) RETURNS numeric LANGUAGE plpgsql AS $$ DECLARE _percentMultiplier NUMERIC; _currencyDecimals INTEGER; _itemRows INTEGER :=0; _charRows INTEGER :=0; BEGIN IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; -- Get the current user's currency precision SELECT COALESCE(locale_curr_scale, 2) INTO _currencyDecimals FROM locale, usr WHERE usr_locale_id = locale_id AND usr_username = CURRENT_USER; IF (pUpdateType = 'V') THEN UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price + pUpdateBy), _currencyDecimals)) WHERE (ipsitem_ipshead_id = pIpsHeadId); GET DIAGNOSTICS _itemRows = ROW_COUNT; ELSE _percentMultiplier := (1.0 + (pUpdateBy / 100.0)); UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price * _percentMultiplier), _currencyDecimals)) WHERE (ipsitem_ipshead_id = pIpsHeadId); GET DIAGNOSTICS _itemRows = ROW_COUNT; IF (pUpdateCharPrices) THEN UPDATE ipsitemchar SET ipsitemchar_price = noNeg(ROUND( (ipsitemchar_price * _percentMultiplier), _currencyDecimals)) FROM ipsitem WHERE ipsitemchar_ipsitem_id = ipsitem_id AND ipsitem_ipshead_id = pIpsHeadId; GET DIAGNOSTICS _charRows = ROW_COUNT; END IF; END IF; RETURN _itemRows + _charRows; END; $$; DROP FUNCTION public.updatepricesbypricingschedule(pipsheadid integer, pupdatetype character, pupdateby numeric, pupdatecharprices boolean); publicadminfalse8399212551683459Iupdatepricesbyproductcategory(integer, text, character, numeric, boolean)FUNCTION CREATE FUNCTION updatepricesbyproductcategory(pprodcatid integer, pprodcatpattern text, pupdatetype character, pupdateby numeric, pupdatecharprices boolean) RETURNS numeric LANGUAGE plpgsql AS $$ DECLARE _percentMultiplier NUMERIC; _currencyDecimals INTEGER; _itemRows INTEGER :=0; _charRows INTEGER :=0; BEGIN IF NOT (checkPrivilege('MaintainPricingSchedules')) THEN RAISE EXCEPTION 'You do not have privileges to maintain Price Schedules.'; END IF; -- Get the current user's currency precision SELECT COALESCE(locale_curr_scale, 2) INTO _currencyDecimals FROM locale, usr WHERE usr_locale_id = locale_id AND usr_username = CURRENT_USER; _percentMultiplier := (1.0 + (pUpdateBy / 100.0)); IF (pUpdateType = 'V') THEN IF (pProdCatId IS NOT NULL) THEN -- Specified category id UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price + pUpdateBy), _currencyDecimals )) FROM item WHERE ipsitem_item_id = item_id AND item_prodcat_id = pProdCatId; ELSIF (pProdCatPattern IS NOT NULL) THEN -- Pattern match category UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price + pUpdateBy), _currencyDecimals )) FROM item WHERE ipsitem_item_id = item_id AND item_prodcat_id IN ( SELECT prodcat_id FROM prodcat WHERE (prodcat_code ~ pProdCatPattern) ); ELSE -- All categories UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price + pUpdateBy), _currencyDecimals )); END IF; GET DIAGNOSTICS _itemRows = ROW_COUNT; ELSE IF (pProdCatId IS NOT NULL) THEN -- Specified category id UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price * _percentMultiplier), _currencyDecimals )) FROM item WHERE ipsitem_item_id = item_id AND item_prodcat_id = pProdCatId; GET DIAGNOSTICS _itemRows = ROW_COUNT; IF(pUpdateCharPrices) THEN UPDATE ipsitemchar SET ipsitemchar_price = noNeg(ROUND( (ipsitemchar_price * _percentMultiplier), _currencyDecimals )) FROM ipsitem, item WHERE item_prodcat_id = pProdCatId AND ipsitem_item_id = item_id AND ipsitemchar_ipsitem_id = ipsitem_id; GET DIAGNOSTICS _charRows = ROW_COUNT; END IF; ELSIF (pProdCatPattern IS NOT NULL) THEN -- Pattern match category UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price * _percentMultiplier), _currencyDecimals )) FROM item WHERE item_prodcat_id IN ( SELECT prodcat_id FROM prodcat WHERE (prodcat_code ~ pProdCatPattern ) ) AND ipsitem_item_id = item_id; GET DIAGNOSTICS _itemRows = ROW_COUNT; IF(pUpdateCharPrices) THEN UPDATE ipsitemchar SET ipsitemchar_price = noNeg(ROUND( (ipsitemchar_price * _percentMultiplier), _currencyDecimals )) FROM ipsitem, item WHERE item_prodcat_id IN ( SELECT prodcat_id FROM prodcat WHERE (prodcat_code ~ pProdCatPattern ) ) AND ipsitem_item_id = item_id AND ipsitemchar_ipsitem_id = ipsitem_id; GET DIAGNOSTICS _charRows = ROW_COUNT; END IF; ELSE -- All categories UPDATE ipsitem SET ipsitem_price = noNeg(ROUND( (ipsitem_price * _percentMultiplier), _currencyDecimals )); GET DIAGNOSTICS _itemRows = ROW_COUNT; IF(pUpdateCharPrices) THEN UPDATE ipsitemchar SET ipsitemchar_price = noNeg(ROUND( (ipsitemchar_price * _percentMultiplier), _currencyDecimals )); GET DIAGNOSTICS _charRows = ROW_COUNT; END IF; END IF; END IF; RETURN _itemRows + _charRows; END; $$; DROP FUNCTION public.updatepricesbyproductcategory(pprodcatid integer, pprodcatpattern text, pupdatetype character, pupdateby numeric, pupdatecharprices boolean); publicadminfalse83992 12551683460/updatereorderlevel(integer, integer, integer[])FUNCTIONCREATE FUNCTION updatereorderlevel(integer, integer, integer[]) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pDays ALIAS FOR $2; pPeriods ALIAS FOR $3; _cursor INTEGER; _periodid INTEGER; _usage NUMERIC; _totalUsage NUMERIC; _totalDays INTEGER; _reorderLevel INTEGER; _averageUsage NUMERIC; _result TEXT; BEGIN _cursor := 1; _totalUsage := 0; _totalDays := 0; _periodid = pPeriods[_cursor]; WHILE (_periodid IS NOT NULL) LOOP SELECT COALESCE(SUM(invhist_invqty), 0) INTO _usage FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteid) AND ( invhist_transdate::DATE BETWEEN findPeriodStart(_periodid) AND findPeriodEnd(_periodid) ) AND (invhist_transtype IN ('SH', 'IM')) ); _totalUsage := (_totalUsage + _usage); _totalDays := ( _totalDays + ( findPeriodEnd(_periodid) - findPeriodStart(_periodid) + 1 ) ); _cursor := (_cursor + 1); _periodid = pPeriods[_cursor]; END LOOP; IF (_totalDays > 0) THEN _reorderLevel := round(_totalUsage / _totalDays * pDays); SELECT itemsite_stocked INTO _result from itemsite WHERE (itemsite_id=pItemsiteid); IF (_reorderLevel = 0 AND _result='t') THEN _reorderLevel := 1; END IF; IF (_reorderLevel > 0) THEN UPDATE itemsite SET itemsite_reorderlevel = _reorderLevel WHERE (itemsite_id=pItemsiteid); ELSE UPDATE itemsite SET itemsite_reorderlevel = 0 WHERE (itemsite_id=pItemsiteid); END IF; RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; FDROP FUNCTION public.updatereorderlevel(integer, integer, integer[]); publicadminfalse83992 12552005592:updatereorderlevel(integer[], integer, boolean, integer[])FUNCTION CREATE FUNCTION updatereorderlevel(integer[], integer, boolean, integer[]) RETURNS SETOF reordlvl LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteids ALIAS FOR $1; pDays ALIAS FOR $2; pAddLeadtime ALIAS FOR $3; pPeriodIds ALIAS FOR $4; _icursor INTEGER := 1; _pcursor INTEGER := 1; _totalUsage NUMERIC := 0; _totalDays INTEGER := 0; _reorderLevel INTEGER := 0; _result TEXT; _usage NUMERIC; _averageUsage NUMERIC; _row reordlvl %ROWTYPE; BEGIN -- Validate IF (pItemsiteIds[1] IS NULL OR pPeriodIds[1] IS NULL) THEN RETURN; END IF; -- Calculate total days FOR _pcursor IN 1..ARRAY_UPPER(pPeriodIds,1) LOOP _totalDays := ( _totalDays + ( findPeriodEnd(pPeriodIds[_pcursor]) - findPeriodStart(pPeriodIds[_pcursor]) + 1 ) ); END LOOP; -- Loop through each itemsite id FOR _icursor IN 1..ARRAY_UPPER(pItemsiteIds,1) LOOP -- Get itemsite data SELECT itemsite_id, item_id, warehous_code, item_number, item_descrip1, itemsite_leadtime, 0, itemsite_reorderlevel, 0, 0, 0 INTO _row FROM itemsite JOIN item ON (itemsite_item_id=item_id) JOIN whsinfo ON (itemsite_warehous_id=warehous_id) WHERE (itemsite_id=pItemsiteIds[_icursor]); IF (FOUND) THEN IF (pAddLeadtime) THEN _row.reordlvl_daysofstock := pDays + _row.reordlvl_leadtime; ELSE _row.reordlvl_daysofstock := pDays; END IF; -- Loop through each period id FOR _pcursor IN 1..ARRAY_UPPER(pPeriodIds,1) LOOP -- Sum days and usage shipping and inventory transactions SELECT COALESCE(SUM(invhist_invqty), 0) INTO _usage FROM invhist WHERE ( (invhist_itemsite_id=pItemsiteIds[_icursor]) AND ( invhist_transdate::DATE BETWEEN findPeriodStart(pPeriodIds[_pcursor]) AND findPeriodEnd(pPeriodIds[_pcursor]) ) AND (invhist_transtype IN ('SH', 'IM')) ); _totalUsage := (_totalUsage + _usage); END LOOP; -- Calculate reorder level IF (_totalDays > 0) THEN _reorderLevel := round(_totalUsage / _totalDays * _row.reordlvl_daysofstock); END IF; IF (_reorderLevel <= 0) THEN _reorderLevel := 0; END IF; SELECT itemsite_stocked INTO _result from itemsite WHERE (itemsite_id=pItemsiteIds[_icursor]); IF (_reorderLevel = 0 AND _result='t') THEN _reorderLevel := 1; END IF; -- Set values _row.reordlvl_total_days := _totalDays; _row.reordlvl_total_usage := _totalUsage; _row.reordlvl_calc_level := _reorderLevel; -- Return result RETURN NEXT _row; END IF; _usage := 0; _averageUsage := 0; _totalUsage := 0; _reorderLevel := 0; END LOOP; RETURN; END; $_$; QDROP FUNCTION public.updatereorderlevel(integer[], integer, boolean, integer[]); publicadminfalse839922593 12551683462updateretainedearnings(integer)FUNCTION|CREATE FUNCTION updateretainedearnings(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pYearPeriodid ALIAS FOR $1; _r RECORD; _n RECORD; _c RECORD; _beginningPeriodid INTEGER; _trialbalid INTEGER; _accntid INTEGER; _totalProfitLoss NUMERIC; _periodid INTEGER; _forwardupdate INTEGER; BEGIN -- First thing we need to do is to get the yearperiod SELECT * INTO _r FROM yearperiod where yearperiod_id = pYearPeriodid; IF (NOT FOUND) THEN RETURN -6; END IF; -- Now we need to find the next yearperiod SELECT * INTO _n FROM yearperiod WHERE yearperiod_start = _r.yearperiod_end + interval '1 day'; IF (NOT FOUND) THEN RETURN -4; END IF; -- Now we have to find where to stick the end of year data SELECT period_id INTO _periodid FROM period WHERE period_start = _n.yearperiod_start; IF (NOT FOUND) THEN RETURN -8; END IF; -- Loop through companies and process each one IF (coalesce(fetchMetricValue('GLCompanySize'),0) = 0) THEN -- Process for installs not using company segment -- Now we need to get the default account number for year end closing SELECT CAST ( metric_value AS integer ) INTO _accntid FROM metric WHERE metric_name = 'YearEndEquityAccount'; IF (NOT FOUND) THEN RETURN -7; END IF; -- So far so good. Now we need to calculate the profit-loss for the year that we are closing SELECT SUM(gltrans_amount) INTO _totalProfitLoss FROM gltrans, accnt WHERE ( (gltrans_accnt_id = accnt_id) AND (accnt_type IN ( 'R', 'E' ) ) AND (gltrans_posted) AND (NOT gltrans_deleted) AND (gltrans_date between _r.yearperiod_start and _r.yearperiod_end ) ); IF (_totalProfitLoss IS NULL) THEN _totalProfitLoss := 0; END IF; -- Get the trailbal_id SELECT trialbal_id INTO _trialbalid FROM trialbal WHERE ( (trialbal_period_id = _periodid ) AND (trialbal_accnt_id = _accntid) ); IF (NOT FOUND) THEN RETURN -9; END IF; -- Lets do the update for the trialbal UPDATE trialbal SET trialbal_beginning = trialbal_beginning - trialbal_yearend + _totalProfitLoss, trialbal_ending = trialbal_beginning - trialbal_yearend - trialbal_debits + trialbal_credits + _totalProfitLoss, trialbal_yearend = _totalProfitLoss WHERE trialbal_id = _trialbalid; -- Now the forward update SELECT forwardupdatetrialbalance(_trialbalid) INTO _forwardupdate; ELSE -- Process for a multi-company set up FOR _c IN SELECT company_number, company_yearend_accnt_id FROM company LOOP -- Calculate the profit-loss for the year that we are closing SELECT SUM(gltrans_amount) INTO _totalProfitLoss FROM gltrans, accnt WHERE ( (gltrans_accnt_id = accnt_id) AND (accnt_type IN ( 'R', 'E' ) ) AND (gltrans_posted) AND (NOT gltrans_deleted) AND (accnt_company = _c.company_number) AND (gltrans_date between _r.yearperiod_start and _r.yearperiod_end ) ); IF(_totalProfitLoss IS NULL) THEN _totalProfitLoss := 0; END IF; -- Get the trailbal_id SELECT trialbal_id INTO _trialbalid FROM trialbal JOIN accnt ON (trialbal_accnt_id=accnt_id) WHERE ( (trialbal_period_id = _periodid ) AND (trialbal_accnt_id = _c.company_yearend_accnt_id) ); IF (NOT FOUND) THEN -- Create a trial balance record SELECT NEXTVAL('trialbal_trialbal_id_seq') INTO _trialbalid; INSERT INTO trialbal ( trialbal_id, trialbal_accnt_id, trialbal_period_id, trialbal_beginning, trialbal_dirty, trialbal_ending, trialbal_credits, trialbal_debits, trialbal_yearend ) VALUES ( _trialbalid, _c.company_yearend_accnt_id, _periodid, _totalProfitLoss, TRUE, _totalProfitLoss, 0, 0, _totalProfitLoss ); ELSE -- Lets do the update for the trialbal UPDATE trialbal SET trialbal_beginning = trialbal_beginning - trialbal_yearend + _totalProfitLoss, trialbal_ending = trialbal_beginning - trialbal_yearend - trialbal_debits + trialbal_credits + _totalProfitLoss, trialbal_yearend = _totalProfitLoss WHERE trialbal_id = _trialbalid; END IF; -- Now the forward update SELECT forwardupdatetrialbalance(_trialbalid) INTO _forwardupdate; END LOOP; END IF; RETURN 0; END; $_$; 6DROP FUNCTION public.updateretainedearnings(integer); publicadminfalse83992h125516834638updatesoracost(integer, text, boolean, numeric, boolean)FUNCTION2CREATE FUNCTION updatesoracost(integer, text, boolean, numeric, boolean) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCosttype ALIAS FOR $2; pLevel ALIAS FOR $3; pCost ALIAS FOR $4; pUpdateActual ALIAS FOR $5; BEGIN IF (pUpdateActual) THEN RETURN updateCost(pItemid, pCosttype, pLevel, pCost); ELSE RETURN updateStdCost(pItemid, pCosttype, pLevel, pCost); END IF; END; $_$; ODROP FUNCTION public.updatesoracost(integer, text, boolean, numeric, boolean); publicadminfalse83992 125516834644updatestdcost(integer, numeric, numeric, text, text)FUNCTION CREATE FUNCTION updatestdcost(integer, numeric, numeric, text, text) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemcostid ALIAS FOR $1; pNewcost ALIAS FOR $2; pOldcost ALIAS FOR $3; pDocNumber ALIAS FOR $4; pNotes ALIAS FOR $5; _itemcostid INTEGER; _r RECORD; _newcost NUMERIC; _oldcost NUMERIC; BEGIN IF (pNewcost IS NULL) THEN _newcost := 0; ELSE _newcost := pNewcost; END IF; IF (pOldcost IS NULL) THEN _oldcost := 0; ELSE _oldcost := pOldcost; END IF; IF (_newcost > 0) THEN UPDATE itemcost SET itemcost_stdcost=_newcost, itemcost_posted=CURRENT_DATE WHERE (itemcost_id=pItemcostid); END IF; -- Distribute to G/L, debit Inventory Asset, credit Inventory Cost Variance FOR _r IN SELECT itemsite_id, (itemsite_qtyonhand + itemsite_nnqoh) AS totalQty, costcat_invcost_accnt_id, costcat_asset_accnt_id, itemsite_costmethod FROM itemcost, itemsite, costcat WHERE ( (itemsite_item_id=itemcost_item_id) AND (itemsite_costcat_id=costcat_id) AND (itemsite_costmethod != 'A') AND ((itemsite_qtyonhand + itemsite_nnqoh) <> 0) AND (itemcost_id=pItemcostid) ) LOOP -- IF (_newcost <> _oldcost) THEN -- RAISE NOTICE 'itemcost_id = %, Qty = %, Old Cost = %, New Cost = %', pItemcostid, _r.totalQty, _oldcost, _newcost; -- END IF; PERFORM insertGLTransaction( 'P/D', '', pDocNumber, pNotes, _r.costcat_invcost_accnt_id, _r.costcat_asset_accnt_id, _r.itemsite_id, ((_newcost - _oldcost) * _r.totalQty), CURRENT_DATE ); -- Update Itemsite Value if not Average Cost IF (_r.itemsite_costmethod <> 'A') THEN -- RAISE NOTICE 'itemsite_id = %, Qty = %, New Cost = %', _r.itemsite_id, _r.totalQty, _newcost; UPDATE itemsite SET itemsite_value=(_r.totalQty * stdCost(itemsite_item_id)) WHERE (itemsite_id=_r.itemsite_id); END IF; END LOOP; IF (_newcost = 0) THEN DELETE FROM itemcost WHERE (itemcost_id=pItemcostid); RETURN FALSE; END IF; IF ( SELECT metric_value FROM metric WHERE ((metric_name = 'EnableAsOfQOH') AND (metric_value = 't'))) THEN IF (pNewcost IS NOT NULL) THEN _newcost := pNewcost; END IF; IF (pOldcost IS NULL) THEN _oldcost := 0; ELSE _oldcost := pOldcost; END IF; -- Distribute to G/L, debit Inventory Asset, credit Inventory Cost Variance PERFORM postValueIntoInvBalance( itemsite_id, current_date, asofinvqty(itemsite_id,current_date), asofinvnn(itemsite_id,current_date), _oldcost, _newcost) FROM itemsite JOIN item ON (itemsite_item_id=item_id) JOIN itemcost ON (itemcost_item_id=item_id) WHERE((itemsite_costmethod = 'S') AND (itemcost_id=pItemcostid)); END IF; RETURN TRUE; END; $_$; KDROP FUNCTION public.updatestdcost(integer, numeric, numeric, text, text); publicadminfalse8399212551683465.updatestdcost(integer, text, boolean, numeric)FUNCTIONJCREATE FUNCTION updatestdcost(integer, text, boolean, numeric) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemid ALIAS FOR $1; pCostType ALIAS FOR $2; pLevel ALIAS FOR $3; pCost ALIAS FOR $4; _newCost NUMERIC; _oldCost NUMERIC := 0; _itemcostid INTEGER; _updateRet BOOLEAN; _itemNumber TEXT; BEGIN IF (pCost IS NULL) THEN _newCost = 0; ELSE _newCost = pCost; END IF; SELECT itemcost_id, itemcost_stdCost, item_number INTO _itemcostid, _oldCost, _itemNumber FROM itemcost, costelem, item WHERE ((itemcost_costelem_id=costelem_id) AND (itemcost_item_id=item_id) AND (item_id=pItemid) AND (itemcost_lowlevel=pLevel) AND (costelem_type=pCosttype)); -- RAISE NOTICE 'updateStdCost(%, %, %, %) has itemcost_id % and stdcost %', -- pItemid, pCostType, plevel, _newCost, _itemcostid, _oldCost; IF (NOT FOUND) AND (_newCost > 0) THEN SELECT NEXTVAL('itemcost_itemcost_id_seq') INTO _itemcostid; RAISE NOTICE 'updateStdCost() inserting itemcost_id %', _itemcostid; INSERT INTO itemcost (itemcost_id, itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel, itemcost_stdcost, itemcost_posted, itemcost_actcost, itemcost_updated) SELECT _itemcostid, pItemid, costelem_id, pLevel, _newCost, CURRENT_DATE, 0, CURRENT_DATE FROM costelem WHERE (costelem_type=pCosttype); END IF; IF (_itemcostid IS NOT NULL) THEN SELECT updateStdCost(_itemcostid, _newCost, _oldCost, 'Post Cost', ('Set Standard Cost - ' || pCosttype || ' for item ' || _itemNumber)) INTO _updateRet; IF (_updateRet) THEN RETURN _itemcostid; END IF; END IF; RETURN -1; END; $_$; EDROP FUNCTION public.updatestdcost(integer, text, boolean, numeric); publicadminfalse83992l12551683466updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text)FUNCTIONCREATE FUNCTION updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN updateTodoItem($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, NULL); END; $_$; DROP FUNCTION public.updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text); publicadminfalse8399212551683467updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text, integer)FUNCTION# CREATE FUNCTION updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE ptodoitemid ALIAS FOR $1; pusername ALIAS FOR $2; pname ALIAS FOR $3; pdesc ALIAS FOR $4; pincdtid ALIAS FOR $5; pcrmacctid ALIAS FOR $6; pOpheadid ALIAS FOR $7; pstarted ALIAS FOR $8; pdue ALIAS FOR $9; pstatus ALIAS FOR $10; passigned ALIAS FOR $11; pcompleted ALIAS FOR $12; ppriority ALIAS FOR $13; pnotes ALIAS FOR $14; pactive ALIAS FOR $15; powner ALIAS FOR $16; pcntctid ALIAS FOR $17; _priority INTEGER := ppriority; _status CHARACTER(1) := pstatus; _incdtid INTEGER := pincdtid; _crmacctid INTEGER := pcrmacctid; _opheadid INTEGER := pOpheadid; _assigned DATE := passigned; _active BOOL := pactive; _result INTEGER; BEGIN IF (pusername IS NULL OR pusername = '') THEN RETURN -1; END IF; IF (pname IS NULL OR pname = '') THEN RETURN -2; END IF; IF (pdue IS NULL) THEN RETURN -3; END IF; IF (ptodoitemid IS NULL OR ptodoitemid <= 0) THEN RETURN -10; END IF; IF (pcompleted IS NOT NULL) THEN _status := 'C'; ELSIF (pstatus IS NULL AND pstarted IS NOT NULL) THEN _status := 'I'; ELSIF (pstatus IS NULL) THEN _status := 'N'; END IF; IF (_incdtid <= 0) THEN _incdtid := NULL; END IF; IF (_crmacctid <= 0) THEN _crmacctid := NULL; END IF; IF (_opheadid <= 0) THEN _opheadid := NULL; END IF; IF (_priority <= 0) THEN _priority := NULL; END IF; IF (_assigned IS NULL) THEN _assigned := CURRENT_DATE; END IF; IF (_active IS NULL) THEN _active := TRUE; END IF; UPDATE todoitem SET todoitem_username=pusername, todoitem_name=pname, todoitem_description=pdesc, todoitem_incdt_id=_incdtid, todoitem_status=_status, todoitem_active=_active, todoitem_start_date=pstarted, todoitem_due_date=pdue, todoitem_assigned_date=_assigned, todoitem_completed_date=pcompleted, todoitem_priority_id=_priority, todoitem_notes=pnotes, todoitem_crmacct_id=_crmacctid, todoitem_ophead_id=_opheadid, todoitem_owner_username=powner, todoitem_cntct_id=pcntctid WHERE (todoitem_id=ptodoitemid); RETURN ptodoitemid; END; $_$; DROP FUNCTION public.updatetodoitem(integer, text, text, text, integer, integer, integer, date, date, character, date, date, integer, text, boolean, text, integer); publicadminfalse83992#12551683468usedefaultlocation(integer)FUNCTIONrCREATE FUNCTION usedefaultlocation(integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; _p RECORD; BEGIN SELECT itemsite_location_id, LENGTH(itemsite_location) AS locationlength INTO _p FROM itemsite WHERE (itemsite_id=pItemsiteid); IF (NOT FOUND) THEN RETURN FALSE; ELSIF (_p.itemsite_location_id <> -1) THEN RETURN TRUE; ELSIF (_p.locationlength > 0) THEN RETURN TRUE; ELSE RETURN FALSE; END IF; END; $_$; 2DROP FUNCTION public.usedefaultlocation(integer); publicadminfalse83992P12551683469usercancreateusers(text)FUNCTION CREATE FUNCTION usercancreateusers(text) RETURNS boolean LANGUAGE sql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT rolcreaterole OR rolsuper FROM pg_roles WHERE rolname=($1); $_$; /DROP FUNCTION public.usercancreateusers(text); publicadminfalse812552005593usercanlogin(text)FUNCTIONCREATE FUNCTION usercanlogin(pusername text) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _isactive BOOLEAN; _mode TEXT; BEGIN IF (isDBA(pUsername) OR userCanCreateUsers(pUsername)) THEN RETURN TRUE; ELSIF (pg_has_role(pUsername, 'xtrole', 'member')) THEN _mode := COALESCE(fetchMetricText('AllowedUserLogins'), ''); IF (_mode = 'AdminOnly') THEN RETURN FALSE; -- administrators were checked above END IF; IF (_mode NOT IN ('AdminOnly','ActiveOnly','Any')) THEN _mode := 'ActiveOnly'; END IF; SELECT (usrpref_value = 't') INTO _isactive FROM usrpref WHERE usrpref_username = pUsername AND usrpref_name = 'active'; IF (_isactive OR _mode = 'Any') THEN RETURN TRUE; END IF; END IF; RETURN FALSE; END; $$; 3DROP FUNCTION public.usercanlogin(pusername text); publicadminfalse83992Q12551683471 userid(text)FUNCTIONCREATE FUNCTION userid(text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pUsername ALIAS FOR $1; _userId INTEGER; BEGIN SELECT usesysid INTO _userId FROM pg_user WHERE (usename=pUsername); IF (FOUND) THEN RETURN _userId; ELSE RETURN -1; END IF; END; $_$; #DROP FUNCTION public.userid(text); publicadminfalse8399212551683472+validateorderqty(integer, numeric, boolean)FUNCTIONHCREATE FUNCTION validateorderqty(integer, numeric, boolean) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pItemsiteid ALIAS FOR $1; pQty ALIAS FOR $2; pManual ALIAS FOR $3; _p RECORD; _qty NUMERIC; BEGIN _qty := pQty; SELECT itemsite_useparams, CASE WHEN (itemsite_useparams) THEN itemsite_useparamsmanual ELSE FALSE END AS itemsite_useparamsmanual, CASE WHEN (itemsite_useparams) THEN itemsite_minordqty ELSE 0.0 END AS itemsite_minordqty, CASE WHEN (itemsite_useparams) THEN itemsite_multordqty ELSE 0.0 END AS itemsite_multordqty, item_fractional, item_type INTO _p FROM itemsite, item WHERE ( (itemsite_item_id=item_id) AND (itemsite_id=pItemsiteid) ); IF ( (pManual AND (_p.itemsite_useparamsmanual)) OR ((NOT pManual) AND (_p.itemsite_useparams)) ) THEN IF (_qty < _p.itemsite_minordqty) THEN _qty := _p.itemsite_minordqty; END IF; IF ( (_p.itemsite_multordqty > 0) AND ((_qty % _p.itemsite_multordqty) > 0) ) THEN _qty := ((TRUNC(_qty / _p.itemsite_multordqty) * _p.itemsite_multordqty) + _p.itemsite_multordqty); END IF; END IF; _qty := roundQty(_p.item_fractional, _qty); RETURN _qty; END; $_$; BDROP FUNCTION public.validateorderqty(integer, numeric, boolean); publicadminfalse83992R12551683473validlocation(integer, integer)FUNCTIONCREATE FUNCTION validlocation(integer, integer) RETURNS boolean LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pLocationid ALIAS FOR $1; pItemsiteid ALIAS FOR $2; _p RECORD; BEGIN SELECT location_restrict INTO _p FROM location, itemsite WHERE ( (location_warehous_id=itemsite_warehous_id) AND (itemsite_id=pItemsiteid) AND (location_id=pLocationid) ); IF (FOUND) THEN IF (_p.location_restrict) THEN SELECT locitem_id INTO _p FROM locitem, itemsite WHERE ( (locitem_item_id=itemsite_item_id) AND (itemsite_id=pItemsiteid) AND (locitem_location_id=pLocationid) ); IF (FOUND) THEN RETURN TRUE; END IF; ELSE RETURN TRUE; END IF; ELSE RETURN FALSE; END IF; RETURN FALSE; END; $_$; 6DROP FUNCTION public.validlocation(integer, integer); publicadminfalse8399212551683474valueatshipping(integer)FUNCTION CREATE FUNCTION valueatshipping(plineitemid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RETURN valueAtShipping('SO', plineitemid); END; $$; ;DROP FUNCTION public.valueatshipping(plineitemid integer); publicadminfalse8399212551683475valueatshipping(text, integer)FUNCTIONCREATE FUNCTION valueatshipping(pordertype text, plineitemid integer) RETURNS numeric LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _value NUMERIC := 0.0; BEGIN IF (pordertype NOT IN ('SO', 'TO')) THEN RAISE EXCEPTION '% is not a valid order type', pordertype; END IF; SELECT COALESCE(SUM(shipitem_value), 0.0) INTO _value FROM shipitem JOIN shiphead ON (shipitem_shiphead_id=shiphead_id) WHERE ( (NOT shiphead_shipped) AND (shiphead_order_type=pordertype) AND (shipitem_orderitem_id=plineitemid) ); RETURN _value; END; $$; LDROP FUNCTION public.valueatshipping(pordertype text, plineitemid integer); publicadminfalse8399212551683476voidapcheck(integer)FUNCTIONECREATE FUNCTION voidapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'voidAPCheck() is deprecated - use voidCheck() instead'; RETURN voidCheck($1); END; $_$; +DROP FUNCTION public.voidapcheck(integer); publicadminfalse8399212551683477voidapopenvoucher(integer)FUNCTIONQCREATE FUNCTION voidapopenvoucher(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; BEGIN RETURN voidApopenVoucher(pApopenid, fetchJournalNumber('AP-VO')); END; $_$; 1DROP FUNCTION public.voidapopenvoucher(integer); publicadminfalse83992'12551683478#voidapopenvoucher(integer, integer)FUNCTION5CREATE FUNCTION voidapopenvoucher(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pApopenid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; _apopenid INTEGER; _apcreditapplyid INTEGER; _reference TEXT; _result INTEGER; _sequence INTEGER; _totalAmount_base NUMERIC; _totalAmount NUMERIC; _itemAmount_base NUMERIC; _itemAmount NUMERIC; _test INTEGER; _a RECORD; _d RECORD; _g RECORD; _p RECORD; _n RECORD; _r RECORD; _costx RECORD; _pExplain BOOLEAN; _pLowLevel BOOLEAN; _exchGainFreight NUMERIC; _firstExchDateFreight DATE; _tmpTotal NUMERIC; _glDate DATE; BEGIN _totalAmount_base := 0; _totalAmount := 0; SELECT fetchGLSequence() INTO _sequence; -- Cache APOpen Information SELECT apopen.* INTO _n FROM apopen WHERE ( (apopen_doctype='V') AND (apopen_id=pApopenid) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% as apopen not found', pApopenid; END IF; -- Cache Voucher Infomation SELECT vohead.*, vend_number || '-' || vend_name || ' ' || vohead_reference AS glnotes, COALESCE(pohead_orderdate, vohead_docdate) AS pohead_orderdate, COALESCE(pohead_curr_id, vohead_curr_id) AS pohead_curr_id INTO _p FROM vohead JOIN vendinfo ON (vend_id=vohead_vend_id) LEFT OUTER JOIN pohead ON (vohead_pohead_id = pohead_id) WHERE (vohead_number=_n.apopen_docnumber); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% as vohead not found', _n.apopen_docnumber; END IF; _glDate := COALESCE(_p.vohead_gldistdate, _p.vohead_distdate); -- there is no currency gain/loss on items, see issue 3892, -- but there might be on freight, which is first encountered at p/o receipt SELECT recv_date::DATE INTO _firstExchDateFreight FROM recv WHERE (recv_vohead_id = _p.vohead_id); -- Start by handling taxes FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.vohead_curr_id, round(sum(taxdetail_tax),2), _p.vohead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('VO', _p.vohead_id, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', _p.vohead_number, _r.tax_sales_accnt_id, (_r.taxbasevalue * -1), _glDate, _p.glnotes ); _totalAmount_base := (_totalAmount_base - _r.taxbasevalue); _totalAmount := (_totalAmount - _r.tax); END LOOP; -- Loop through the vodist records for the passed vohead that -- are posted against a P/O Item FOR _g IN SELECT DISTINCT poitem_id, voitem_qty, poitem_expcat_id, poitem_invvenduomratio, COALESCE(itemsite_id, -1) AS itemsiteid, COALESCE(itemsite_costcat_id, -1) AS costcatid, COALESCE(itemsite_item_id, -1) AS itemsite_item_id, (SELECT SUM(value) FROM ( SELECT SUM(recv_value) AS value FROM recv WHERE (recv_voitem_id=voitem_id) UNION SELECT SUM(poreject_value)*-1 AS value FROM poreject WHERE (poreject_voitem_id=voitem_id)) as data) AS value_base, (poitem_freight_vouchered / poitem_qty_vouchered) * voitem_qty AS vouchered_freight, currToBase(_p.pohead_curr_id, (poitem_freight_vouchered / poitem_qty_vouchered) * voitem_qty, _firstExchDateFreight ) AS vouchered_freight_base, voitem_freight, currToBase(_p.vohead_curr_id, voitem_freight, _p.vohead_distdate) AS voitem_freight_base FROM vodist, voitem, poitem LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id) WHERE ( (vodist_poitem_id=poitem_id) AND (voitem_poitem_id=poitem_id) AND (voitem_vohead_id=vodist_vohead_id) AND (vodist_vohead_id=_p.vohead_id)) LOOP -- Grab the G/L Accounts IF (_g.costcatid = -1) THEN SELECT pp.accnt_id AS pp_accnt_id, lb.accnt_id AS lb_accnt_id INTO _a FROM expcat, accnt AS pp, accnt AS lb WHERE ( (expcat_purchprice_accnt_id=pp.accnt_id) AND (expcat_liability_accnt_id=lb.accnt_id) AND (expcat_id=_g.poitem_expcat_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% due to unassigned G/L Accounts.', _p.vohead_number; END IF; ELSE SELECT pp.accnt_id AS pp_accnt_id, lb.accnt_id AS lb_accnt_id INTO _a FROM costcat, accnt AS pp, accnt AS lb WHERE ( (costcat_purchprice_accnt_id=pp.accnt_id) AND (costcat_liability_accnt_id=lb.accnt_id) AND (costcat_id=_g.costcatid) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% due to unassigned G/L Accounts.', _p.vohead_number; END IF; END IF; -- Clear the Item Amount accumulator _itemAmount_base := 0; _itemAmount := 0; -- Figure out the total posted value for this line item FOR _d IN SELECT vodist_id, vodist_amount, _p.vohead_curr_id, vodist_costelem_id, currToBase(_p.vohead_curr_id, vodist_amount, _p.vohead_distdate) AS vodist_amount_base FROM vodist WHERE ( (vodist_vohead_id=_p.vohead_id) AND (vodist_poitem_id=_g.poitem_id) ) LOOP _pExplain := TRUE; SELECT * INTO _costx FROM itemcost WHERE ( (itemcost_item_id = _g.itemsite_item_id) AND (itemcost_costelem_id = _d.vodist_costelem_id) ); IF (FOUND) THEN _pExplain := _costx.itemcost_lowlevel; END IF; -- Add the Distribution Amount to the Item Amount _itemAmount_base := _itemAmount_base + ROUND(_d.vodist_amount_base, 2); _itemAmount := _itemAmount + _d.vodist_amount; END LOOP; -- Distribute from the clearing account PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.lb_accnt_id, round(_g.value_base + _g.vouchered_freight_base, 2), _glDate, _p.glnotes ); -- Attribute the correct portion to currency gain/loss _exchGainFreight := 0; SELECT currGain(_p.pohead_curr_id, _g.vouchered_freight, _firstExchDateFreight, _p.vohead_distdate ) INTO _exchGainFreight; IF (round(_exchGainFreight, 2) <> 0) THEN PERFORM insertIntoGLSeries(_sequence, 'A/P', 'VO', text(_p.vohead_number), getGainLossAccntId(_a.lb_accnt_id), round(_exchGainFreight, 2) * -1, _glDate, _p.glnotes); END IF; -- Distribute the remaining variance to the Purchase Price Variance account IF (round(_itemAmount_base, 2) <> round(_g.value_base, 2)) THEN _tmpTotal := round(_itemAmount_base, 2) - round(_g.value_base, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.pp_accnt_id, _tmpTotal, _glDate, _p.glnotes ); END IF; -- Distribute the remaining freight variance to the Purchase Price Variance account IF (round(_g.voitem_freight_base + _exchGainFreight, 2) <> round(_g.vouchered_freight_base, 2)) THEN _tmpTotal := round(_g.voitem_freight_base + _exchGainFreight, 2) - round(_g.vouchered_freight_base, 2); PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _a.pp_accnt_id, _tmpTotal, _glDate, _p.glnotes ); END IF; -- Add the distribution amount to the total amount to distribute _totalAmount_base := (_totalAmount_base + _itemAmount_base + _g.voitem_freight_base); _totalAmount := (_totalAmount + _itemAmount + _g.voitem_freight); -- Reverse the posting for all the Tagged Receivings for this P/O Item UPDATE recv SET recv_invoiced=FALSE, recv_recvcost_curr_id=basecurrid(), recv_recvcost=0, recv_vohead_id=NULL, recv_voitem_id=NULL FROM poitem WHERE ( (recv_orderitem_id=poitem_id) AND (recv_order_type='PO') AND (recv_orderitem_id=_g.poitem_id) AND (recv_vohead_id=_p.vohead_id) ); -- Reverse the posting for all the Tagged Rejections for this P/O Item UPDATE poreject SET poreject_invoiced=FALSE, poreject_vohead_id=NULL, poreject_voitem_id=NULL WHERE ( (poreject_poitem_id=_g.poitem_id) AND (poreject_vohead_id=_p.vohead_id) ); -- Update the qty and freight vouchered fields UPDATE poitem SET poitem_qty_vouchered = (poitem_qty_vouchered - _g.voitem_qty), poitem_freight_vouchered = (poitem_freight_vouchered - _g.voitem_freight) WHERE (poitem_id=_g.poitem_id); END LOOP; -- Loop through the vodist records for the passed vohead that -- are not posted against a P/O Item -- Skip the tax distributions FOR _d IN SELECT vodist_id, currToBase(_p.vohead_curr_id, vodist_amount, _p.vohead_distdate) AS vodist_amount_base, vodist_amount, vodist_accnt_id, vodist_expcat_id FROM vodist WHERE ( (vodist_vohead_id=_p.vohead_id) AND (vodist_poitem_id=-1) AND (vodist_tax_id=-1) ) LOOP -- Distribute from the misc. account IF (_d.vodist_accnt_id = -1) THEN PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), expcat_exp_accnt_id, round(_d.vodist_amount_base, 2), _glDate, _p.glnotes ) FROM expcat WHERE (expcat_id=_d.vodist_expcat_id); ELSE PERFORM insertIntoGLSeries( _sequence, 'A/P', 'VO', text(_p.vohead_number), _d.vodist_accnt_id, round(_d.vodist_amount_base, 2), _glDate, _p.glnotes ); END IF; -- Add the Distribution Amount to the Total Amount _totalAmount_base := _totalAmount_base + ROUND(_d.vodist_amount_base, 2); _totalAmount := _totalAmount + _d.vodist_amount; END LOOP; SELECT insertIntoGLSeries( _sequence, 'A/P', 'VO', text(vohead_number), accnt_id, round(_totalAmount_base, 2) * -1, _glDate, _p.glnotes ) INTO _test FROM vohead LEFT OUTER JOIN accnt ON (accnt_id=findAPAccount(vohead_vend_id)) WHERE ( (findAPAccount(vohead_vend_id)=0 OR accnt_id > 0) -- G/L interface might be disabled AND (vohead_id=_p.vohead_id) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Voucher #% due to an unassigned A/P Account.', _p.vohead_number; END IF; PERFORM postGLSeries(_sequence, pJournalNumber); -- Create the A/P Open Item SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; _reference := ('Void Voucher #' || _n.apopen_docnumber); INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_curr_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_discount, apopen_curr_rate ) SELECT _apopenid, getEffectiveXtUser(), pJournalnumber, apopen_vend_id, apopen_docnumber, 'C', apopen_ponumber, CURRENT_DATE, CURRENT_DATE, CURRENT_DATE, -1, apopen_curr_id, apopen_amount - apopen_paid, 0, TRUE, _reference, TRUE, apopen_curr_rate FROM apopen WHERE (apopen_id=_n.apopen_id); SELECT apcreditapply_id INTO _apcreditapplyid FROM apcreditapply WHERE ( (apcreditapply_source_apopen_id=_apopenid) AND (apcreditapply_target_apopen_id=_n.apopen_id) ); IF (FOUND) THEN UPDATE apcreditapply SET apcreditapply_amount=_n.apopen_amount-_n.apopen_paid WHERE (apcreditapply_id=_apcreditapplyid); ELSE SELECT nextval('apcreditapply_apcreditapply_id_seq') INTO _apcreditapplyid; INSERT INTO apcreditapply ( apcreditapply_id, apcreditapply_source_apopen_id, apcreditapply_target_apopen_id, apcreditapply_amount, apcreditapply_curr_id ) VALUES ( _apcreditapplyid, _apopenid, _n.apopen_id, _n.apopen_amount-_n.apopen_paid, _n.apopen_curr_id ); END IF; SELECT postAPCreditMemoApplication(_apopenid) INTO _result; IF (_result < 0) THEN RAISE EXCEPTION 'Credit application failed with result %.', _result; END IF; -- Reopen all of the P/O Items that were closed by this Voucher UPDATE poitem SET poitem_status='O' FROM voitem WHERE ( (voitem_poitem_id=poitem_id) AND (voitem_close) AND (voitem_vohead_id=_p.vohead_id) ); -- Reopen the P/O UPDATE pohead SET pohead_status='O' WHERE (pohead_id=_p.vohead_pohead_id); -- Mark as voided UPDATE apopen SET apopen_void=TRUE WHERE (apopen_id=_n.apopen_id); RETURN pJournalNumber; END; $_$; :DROP FUNCTION public.voidapopenvoucher(integer, integer); publicadminfalse8399212551683480voidcheck(integer)FUNCTIONCREATE FUNCTION voidcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; BEGIN IF ( SELECT (checkhead_void OR checkhead_posted OR checkhead_replaced) FROM checkhead WHERE (checkhead_id=pCheckid) ) THEN RETURN -1; END IF; UPDATE checkhead SET checkhead_void=TRUE WHERE (checkhead_id=pCheckid); RETURN 1; END; $_$; )DROP FUNCTION public.voidcheck(integer); publicadminfalse83992S12551683481voidcreditmemo(integer)FUNCTION$CREATE FUNCTION voidcreditmemo(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCmheadid ALIAS FOR $1; _r RECORD; _p RECORD; _n RECORD; _glSequence INTEGER := 0; _glJournal INTEGER := 0; _itemlocSeries INTEGER := 0; _invhistid INTEGER; _test INTEGER; _amount NUMERIC; _roundedBase NUMERIC; _totalAmount NUMERIC := 0; _totalRoundedBase NUMERIC := 0; _commissionDue NUMERIC := 0; _toApply NUMERIC; _toClose BOOLEAN; _glDate DATE; _taxBaseValue NUMERIC := 0; BEGIN -- Cache C/M information SELECT cmhead.*, findARAccount(cmhead_cust_id) AS ar_accnt_id, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM cmheadtax WHERE ( (taxhist_parent_id = cmhead_id) AND (taxhist_taxtype_id = getAdjustmentTaxtypeId()) ) ) AS adjtax INTO _p FROM cmhead WHERE (cmhead_id=pCmheadid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Credit Memo as cmhead not found'; END IF; IF (NOT _p.cmhead_posted) THEN RETURN -10; END IF; -- Cache AROpen Information SELECT aropen.* INTO _n FROM aropen WHERE ( (aropen_doctype='C') AND (aropen_docnumber=_p.cmhead_number) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Credit Memo as aropen not found'; END IF; -- Check for ARApplications SELECT arapply_id INTO _test FROM arapply WHERE (arapply_target_aropen_id=_n.aropen_id) OR (arapply_source_aropen_id=_n.aropen_id) LIMIT 1; IF (FOUND) THEN RETURN -20; END IF; _glDate := COALESCE(_p.cmhead_gldistdate, _p.cmhead_docdate); SELECT fetchGLSequence() INTO _glSequence; SELECT fetchJournalNumber('AR-IN') INTO _glJournal; -- Start by handling taxes (reverse sense) FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.cmhead_curr_id, round(sum(taxdetail_tax),2), _p.cmhead_docdate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('CM', _p.cmhead_id, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, _r.tax_sales_accnt_id, (_r.taxbasevalue * -1.0), _glDate, ('Void-' || _p.cmhead_billtoname) ); _totalAmount := _totalAmount + _r.tax * -1; _totalRoundedBase := _totalRoundedBase + _r.taxbasevalue * -1; END LOOP; -- Process line items FOR _r IN SELECT * FROM creditmemoitem WHERE ( (cmitem_cmhead_id=_p.cmhead_id) AND (cmitem_qtycredit <> 0 ) ) LOOP IF (_r.extprice <> 0) THEN -- Debit the Sales Account for the current cmitem (reverse sense) _roundedBase := round(currToBase(_p.cmhead_curr_id, _r.extprice, _p.cmhead_docdate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, CASE WHEN _p.cmhead_rahead_id IS NULL THEN getPrjAccntId(_p.cmhead_prj_id, salesaccnt_credit_accnt_id) ELSE getPrjAccntId(_p.cmhead_prj_id, salesaccnt_returns_accnt_id) END, _roundedBase, _glDate, ('Void-' || _p.cmhead_billtoname) ) INTO _test FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.cmitem_itemsite_id, 'IS', _p.cmhead_cust_id, _p.cmhead_saletype_id, _p.cmhead_shipzone_id)); IF (NOT FOUND) THEN PERFORM deleteGLSeries(_glSequence); RETURN -11; END IF; END IF; _totalAmount := _totalAmount + round(_r.extprice, 2); _totalRoundedBase := _totalRoundedBase + _roundedBase; END LOOP; -- Credit the Misc. Account for Miscellaneous Charges (reverse sense) IF (_p.cmhead_misc <> 0) THEN _roundedBase := round(currToBase(_p.cmhead_curr_id, _p.cmhead_misc, _p.cmhead_docdate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, getPrjAccntId(_p.cmhead_prj_id, accnt_id), _roundedBase, _glDate, ('Void-' ||_p.cmhead_billtoname) ) INTO _test FROM accnt WHERE (accnt_id=_p.cmhead_misc_accnt_id); -- If the Misc. Charges Account was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Cache the Misc. Amount distributed _totalAmount := _totalAmount + _p.cmhead_misc; _totalRoundedBase := _totalRoundedBase + _roundedBase; END IF; -- Debit the Freight Account (reverse sense) IF (_p.cmhead_freight <> 0) THEN _roundedBase := round(currToBase(_p.cmhead_curr_id, _p.cmhead_freight, _p.cmhead_docdate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, getPrjAccntId(_p.cmhead_prj_id, accnt_id), _roundedBase, _glDate, ('Void-' || _p.cmhead_billtoname) ) INTO _test FROM accnt WHERE (accnt_id=findFreightAccount(_p.cmhead_cust_id)); -- If the Freight Charges Account was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Cache the Amount Distributed to Freight _totalAmount := _totalAmount + _p.cmhead_freight; _totalRoundedBase := _totalRoundedBase + _roundedBase; END IF; _totalAmount := _totalAmount; -- Credit the A/R for the total Amount (reverse sense) IF (_totalAmount <> 0) THEN IF (_p.ar_accnt_id != -1) THEN SELECT insertIntoGLSeries( _glSequence, 'A/R', 'CM', _p.cmhead_number, _p.ar_accnt_id, (_totalRoundedBase * -1.0), _glDate, ('Void-' || _p.cmhead_billtoname) ) INTO _test; ELSE PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; END IF; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _glJournal) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Delete sales history DELETE FROM cohisttax WHERE (taxhist_parent_id IN (SELECT cohist_id FROM cohist WHERE (cohist_doctype='C' AND cohist_ordernumber=_p.cmhead_number))); DELETE FROM cohist WHERE (cohist_doctype='C' AND cohist_ordernumber=_p.cmhead_number); -- Delete the Invoice aropen item DELETE FROM aropen WHERE (aropen_doctype='C' AND aropen_docnumber=_p.cmhead_number); -- Handle the Inventory and G/L Transactions for any returned Inventory where cmitem_updateinv is true (reverse sense) FOR _r IN SELECT cmitem_itemsite_id AS itemsite_id, cmitem_id, (cmitem_qtyreturned * cmitem_qty_invuomratio) AS qty, cmhead_number, cmhead_cust_id AS cust_id, item_number, cmhead_prj_id AS prj_id, cmhead_saletype_id AS saletype_id, cmhead_shipzone_id AS shipzone_id FROM cmhead, cmitem, itemsite, item WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (cmitem_qtyreturned <> 0) AND (cmitem_updateinv) AND (cmhead_id=_p.cmhead_id) ) LOOP -- Return credited stock to inventory IF (_itemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( itemsite_id, 'RS', (_r.qty * -1), 'S/O', 'CM', _r.cmhead_number, '', ('Credit Voided ' || _r.item_number), costcat_asset_accnt_id, getPrjAccntId(_r.prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)), _itemlocSeries, _glDate) INTO _invhistid FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); END LOOP; -- Update coitem to reflect the returned qty where cmitem_updateinv is true (reverse sense) FOR _r IN SELECT cmitem_qtyreturned, cmitem_itemsite_id, cohead_id FROM cmitem, cmhead, invchead, cohead WHERE ( (cmitem_cmhead_id=cmhead_id) AND (cmhead_invcnumber=invchead_invcnumber) AND (invchead_ordernumber=cohead_number) AND (cmitem_qtyreturned <> 0) AND (cmitem_updateinv) AND (cmhead_id=_p.cmhead_id) ) LOOP UPDATE coitem SET coitem_qtyreturned = (coitem_qtyreturned + (_r.cmitem_qtyreturned * -1.0)) WHERE coitem_id IN ( SELECT coitem_id FROM coitem WHERE ( (coitem_cohead_id=_r.cohead_id) AND (coitem_itemsite_id = _r.cmitem_itemsite_id) ) LIMIT 1 ); END LOOP; -- Mark the cmhead as voided UPDATE cmhead SET cmhead_void=TRUE WHERE (cmhead_id=_p.cmhead_id); RETURN _itemlocSeries; END; $_$; .DROP FUNCTION public.voidcreditmemo(integer); publicadminfalse83992X12551683483voidinvoice(integer)FUNCTIONV9CREATE FUNCTION voidinvoice(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pInvcheadid ALIAS FOR $1; _glSequence INTEGER := 0; _glJournal INTEGER := 0; _itemlocSeries INTEGER := 0; _aropenid INTEGER := 0; _invhistid INTEGER := 0; _amount NUMERIC; _roundedBase NUMERIC; _r RECORD; _p RECORD; _n RECORD; _test INTEGER; _totalAmount NUMERIC := 0; _totalRoundedBase NUMERIC := 0; _totalAmountBase NUMERIC := 0; _appliedAmount NUMERIC := 0; _commissionDue NUMERIC := 0; _tmpAccntId INTEGER; _tmpCurrId INTEGER; _firstExchDate DATE; _glDate DATE; _exchGain NUMERIC := 0; BEGIN -- Cache Invoice information SELECT invchead.*, findFreightAccount(invchead_cust_id) AS freightaccntid, findARAccount(invchead_cust_id) AS araccntid, aropen_id, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM invcheadtax WHERE ( (taxhist_parent_id = invchead_id) AND (taxhist_taxtype_id = getFreightTaxtypeId()) ) ) AS freighttax, ( SELECT COALESCE(SUM(taxhist_tax), 0) FROM invcheadtax WHERE ( (taxhist_parent_id = invchead_id) AND (taxhist_taxtype_id = getAdjustmentTaxtypeId()) ) ) AS adjtax INTO _p FROM invchead JOIN aropen ON (aropen_doctype='I' AND aropen_docnumber=invchead_invcnumber) WHERE (invchead_id=pInvcheadid); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Invoice as invchead not found'; END IF; IF (NOT _p.invchead_posted) THEN RETURN -10; END IF; -- Cache AROpen Information SELECT aropen.* INTO _n FROM aropen WHERE ( (aropen_doctype='I') AND (aropen_docnumber=_p.invchead_invcnumber) ); IF (NOT FOUND) THEN RAISE EXCEPTION 'Cannot Void Invoice as aropen not found'; END IF; -- Check for ARApplications SELECT arapply_id INTO _test FROM arapply WHERE (arapply_target_aropen_id=_n.aropen_id) LIMIT 1; IF (FOUND) THEN RETURN -20; END IF; SELECT fetchGLSequence() INTO _glSequence; SELECT fetchJournalNumber('AR-IN') INTO _glJournal; _glDate := COALESCE(_p.invchead_gldistdate, _p.invchead_invcdate); -- the 1st MC iteration used the cohead_orderdate so we could get curr exch -- gain/loss between the sales and invoice dates, but see issue 3892. leave -- this condition TRUE until we make this configurable or decide not to. IF TRUE THEN _firstExchDate := _p.invchead_invcdate; ELSE -- can we save a select by using: _firstExchDate := _p.invchead_orderdate; SELECT cohead_orderdate INTO _firstExchDate FROM cohead WHERE (cohead_number = _p.invchead_ordernumber); END IF; -- Start by handling taxes (reverse sense) FOR _r IN SELECT tax_sales_accnt_id, round(sum(taxdetail_tax),2) AS tax, currToBase(_p.invchead_curr_id, round(sum(taxdetail_tax),2), _firstExchDate) AS taxbasevalue FROM tax JOIN calculateTaxDetailSummary('I', _p.invchead_id, 'T') ON (taxdetail_tax_id=tax_id) GROUP BY tax_id, tax_sales_accnt_id LOOP PERFORM insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, _r.tax_sales_accnt_id, (_r.taxbasevalue * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ); _totalAmount := _totalAmount + _r.tax; _totalRoundedBase := _totalRoundedBase + _r.taxbasevalue; END LOOP; -- March through the Non-Misc. Invcitems FOR _r IN SELECT * FROM invoiceitem WHERE ( (invcitem_invchead_id = _p.invchead_id) AND (invcitem_item_id <> -1) ) LOOP -- Cache the amount due for this line _amount := _r.extprice; IF (_amount > 0) THEN -- Credit the Sales Account for the invcitem item (reverse sense) IF (_r.itemsite_id IS NULL) THEN SELECT getPrjAccntId(_p.invchead_prj_id, salesaccnt_sales_accnt_id) INTO _tmpAccntId FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.invcitem_item_id, 'I', _p.invchead_cust_id, _p.invchead_saletype_id, _p.invchead_shipzone_id)); ELSE SELECT getPrjAccntId(_p.invchead_prj_id, salesaccnt_sales_accnt_id) INTO _tmpAccntId FROM salesaccnt WHERE (salesaccnt_id=findSalesAccnt(_r.itemsite_id, 'IS', _p.invchead_cust_id, _p.invchead_saletype_id, _p.invchead_shipzone_id)); END IF; -- If the Sales Account Assignment was not found then punt IF (NOT FOUND) THEN PERFORM deleteGLSeries(_glSequence); RETURN -11; END IF; _roundedBase := round(currToBase(_p.invchead_curr_id, _amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, _tmpAccntId, (_roundedBase * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; _totalAmount := (_totalAmount + _amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; _commissionDue := (_commissionDue + (_amount * _p.invchead_commission)); END IF; _totalAmount := _totalAmount; _totalRoundedBase := _totalRoundedBase; END LOOP; -- March through the Misc. Invcitems FOR _r IN SELECT * FROM invoiceitem JOIN salescat ON (salescat_id = invcitem_salescat_id) WHERE ( (invcitem_item_id = -1) AND (invcitem_invchead_id=_p.invchead_id) ) LOOP -- Cache the amount due for this line and the commission due for such _amount := _r.extprice; IF (_amount > 0) THEN -- Credit the Sales Account for the invcitem item (reverse sense) _roundedBase = round(currToBase(_p.invchead_curr_id, _amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id, _r.salescat_sales_accnt_id), (_roundedBase * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; _totalAmount := (_totalAmount + _amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; _commissionDue := (_commissionDue + (_amount * _p.invchead_commission)); END IF; END LOOP; -- Credit the Freight Account for Freight Charges (reverse sense) IF (_p.invchead_freight <> 0) THEN IF (_p.freightaccntid <> -1) THEN _roundedBase = round(currToBase(_p.invchead_curr_id, _p.invchead_freight, _firstExchDate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id,_p.freightaccntid), (_roundedBase * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; -- Cache the Freight Amount distributed _totalAmount := (_totalAmount + _p.invchead_freight); _totalRoundedBase := _totalRoundedBase + _roundedBase; ELSE _test := -14; END IF; -- If the Freight Account was not found then punt IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; END IF; -- Credit the Misc. Account for Miscellaneous Charges (reverse sense) IF (_p.invchead_misc_amount <> 0) THEN _roundedBase := round(currToBase(_p.invchead_curr_id, _p.invchead_misc_amount, _firstExchDate), 2); SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, getPrjAccntId(_p.invchead_prj_id, _p.invchead_misc_accnt_id), (_roundedBase * -1.0), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; -- If the Misc. Charges Account was not found then punt IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Cache the Misc. Amount distributed _totalAmount := (_totalAmount + _p.invchead_misc_amount); _totalRoundedBase := _totalRoundedBase + _roundedBase; END IF; -- ToDo: handle rounding errors (reverse sense) _exchGain := currGain(_p.invchead_curr_id, _totalAmount, _firstExchDate, _glDate); IF (_exchGain <> 0) THEN SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, getGainLossAccntId(_p.araccntid), round(_exchGain, 2), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test ; IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; END IF; -- Debit A/R for the total Amount (reverse sense) IF (_totalRoundedBase <> 0) THEN IF (_p.araccntid != -1) THEN SELECT insertIntoGLSeries( _glSequence, 'A/R', 'IN', _p.invchead_invcnumber, _p.araccntid, round(_totalRoundedBase, 2), _glDate, ('Void-' || _p.invchead_billto_name) ) INTO _test; ELSE PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; END IF; -- Commit the GLSeries; SELECT postGLSeries(_glSequence, _glJournal) INTO _test; IF (_test < 0) THEN PERFORM deleteGLSeries(_glSequence); RETURN _test; END IF; -- Delete sales history DELETE FROM cohisttax WHERE (taxhist_parent_id IN (SELECT cohist_id FROM cohist WHERE (cohist_doctype='I' AND cohist_invcnumber=_p.invchead_invcnumber))); DELETE FROM cohist WHERE (cohist_doctype='I' AND cohist_invcnumber=_p.invchead_invcnumber); -- Create the Credit aropen item SELECT nextval('aropen_aropen_id_seq') INTO _aropenid; INSERT INTO aropen ( aropen_id, aropen_username, aropen_journalnumber, aropen_open, aropen_posted, aropen_cust_id, aropen_ponumber, aropen_docnumber, aropen_applyto, aropen_doctype, aropen_docdate, aropen_duedate, aropen_distdate, aropen_terms_id, aropen_amount, aropen_paid, aropen_salesrep_id, aropen_commission_due, aropen_commission_paid, aropen_ordernumber, aropen_notes, aropen_cobmisc_id, aropen_curr_id ) VALUES ( _aropenid, getEffectiveXtUser(), _glJournal, TRUE, FALSE, _p.invchead_cust_id, _p.invchead_ponumber, _p.invchead_invcnumber, _p.invchead_invcnumber, 'C', _p.invchead_invcdate, determineDueDate(_p.invchead_terms_id, _p.invchead_invcdate), _glDate, _p.invchead_terms_id, round(_totalAmount, 2), round(_totalAmount, 2), _p.invchead_salesrep_id, _commissionDue, FALSE, _p.invchead_ordernumber::text, _p.invchead_notes, pInvcheadid, _p.invchead_curr_id ); -- Alter the Invoice A/R Open Item to reflect the application UPDATE aropen SET aropen_paid = round(_totalAmount, 2) WHERE (aropen_id=_p.aropen_id); -- Record the application INSERT INTO arapply ( arapply_cust_id, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_fundstype, arapply_refnumber, arapply_applied, arapply_closed, arapply_postdate, arapply_distdate, arapply_journalnumber, arapply_curr_id ) VALUES ( _p.invchead_cust_id, _aropenid, 'C', _p.invchead_invcnumber, _p.aropen_id, 'I', _p.invchead_invcnumber, '', '', round(_totalAmount, 2), TRUE, CURRENT_DATE, _p.invchead_invcdate, 0, _p.invchead_curr_id ); -- Handle the Inventory and G/L Transactions for any billed Inventory where invcitem_updateinv is true (reverse sense) FOR _r IN SELECT itemsite_id AS itemsite_id, invcitem_id, (invcitem_billed * invcitem_qty_invuomratio) AS qty, invchead_invcnumber, invchead_cust_id AS cust_id, item_number, invchead_prj_id AS prj_id, invchead_saletype_id AS saletype_id, invchead_shipzone_id AS shipzone_id FROM invchead JOIN invcitem ON ( (invcitem_invchead_id=invchead_id) AND (invcitem_billed <> 0) AND (invcitem_updateinv) ) JOIN itemsite ON ( (itemsite_item_id=invcitem_item_id) AND (itemsite_warehous_id=invcitem_warehous_id) ) JOIN item ON (item_id=invcitem_item_id) WHERE (invchead_id=_p.invchead_id) LOOP -- Issue billed stock from inventory IF (_itemlocSeries = 0) THEN SELECT NEXTVAL('itemloc_series_seq') INTO _itemlocSeries; END IF; SELECT postInvTrans( itemsite_id, 'SH', (_r.qty * -1.0), 'S/O', 'IN', _r.invchead_invcnumber, '', ('Invoice Voided ' || _r.item_number), getPrjAccntId(_r.prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)), costcat_asset_accnt_id, _itemlocSeries, _glDate) INTO _invhistid FROM itemsite, costcat WHERE ( (itemsite_costcat_id=costcat_id) AND (itemsite_id=_r.itemsite_id) ); END LOOP; -- Reopen Billing UPDATE shipitem SET shipitem_invoiced=FALSE, shipitem_invcitem_id=NULL WHERE (shipitem_invcitem_id IN (SELECT invcitem_id FROM invcitem WHERE (invcitem_invchead_id=_p.invchead_id))); UPDATE cobill SET cobill_invcnum=NULL, cobill_invcitem_id=NULL WHERE (cobill_invcitem_id IN (SELECT invcitem_id FROM invcitem WHERE (invcitem_invchead_id=_p.invchead_id))); UPDATE cobmisc SET cobmisc_posted=FALSE, cobmisc_invcnumber=NULL, cobmisc_invchead_id=NULL WHERE (cobmisc_invchead_id=_p.invchead_id); -- Mark the invoice as voided UPDATE invchead SET invchead_void=TRUE, invchead_notes=(invchead_notes || 'Voided on ' || current_date || ' by ' || getEffectiveXtUser()) WHERE (invchead_id=_p.invchead_id); RETURN _itemlocSeries; END; $_$; +DROP FUNCTION public.voidinvoice(integer); publicadminfalse83992Y12551683485voidpostedapcheck(integer)FUNCTIONCREATE FUNCTION voidpostedapcheck(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'voidPostedAPCheck() is deprecated - use voidPostedCheck() instead'; RETURN voidPostedCheck($1, fetchJournalNumber('AP-CK'), CURRENT_DATE); END; $_$; 1DROP FUNCTION public.voidpostedapcheck(integer); publicadminfalse8399212551683486#voidpostedapcheck(integer, integer)FUNCTIONxCREATE FUNCTION voidpostedapcheck(integer, integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'voidPostedAPCheck() is deprecated - use voidPostedCheck() instead'; RETURN voidPostedCheck($1, $2, CURRENT_DATE); END; $_$; :DROP FUNCTION public.voidpostedapcheck(integer, integer); publicadminfalse8399212551683487)voidpostedapcheck(integer, integer, date)FUNCTIONtCREATE FUNCTION voidpostedapcheck(integer, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. BEGIN RAISE NOTICE 'voidPostedAPCheck() is deprecated - use voidPostedCheck() instead'; RETURN voidPostedCheck($1, $2, $3); END; $_$; @DROP FUNCTION public.voidpostedapcheck(integer, integer, date); publicadminfalse83992Z12551683488'voidpostedcheck(integer, integer, date)FUNCTION1CREATE FUNCTION voidpostedcheck(integer, integer, date) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pCheckid ALIAS FOR $1; pJournalNumber ALIAS FOR $2; pVoidDate ALIAS FOR $3; _amount_base NUMERIC := 0; _result INTEGER; _apopenid INTEGER; _credit_glaccnt INTEGER; _docnumber TEXT; _exchGain NUMERIC := 0; _exchGainTmp NUMERIC := 0; _gltransNote TEXT; _p RECORD; _r RECORD; _sequence INTEGER; _amount_check NUMERIC := 0; BEGIN SELECT fetchGLSequence() INTO _sequence; SELECT checkhead.*, checkhead_amount / checkhead_curr_rate AS checkhead_amount_base, bankaccnt_accnt_id AS bankaccntid, findPrepaidAccount(checkhead_recip_id) AS prepaidaccntid, checkrecip.* INTO _p FROM bankaccnt, checkhead LEFT OUTER JOIN checkrecip ON ((checkrecip_type=checkhead_recip_type) AND (checkrecip_id=checkhead_recip_id)) WHERE ((checkhead_bankaccnt_id=bankaccnt_id) AND (checkhead_id=pCheckid)); IF (NOT _p.checkhead_posted) THEN RETURN -10; END IF; IF (_p.checkrecip_id IS NULL) THEN -- outer join failed RETURN -11; END IF; -- Cannot void if already reconciled SELECT trans_id INTO _result FROM ( SELECT gltrans_id AS trans_id FROM gltrans WHERE ((gltrans_doctype='CK') AND (gltrans_misc_id=_p.checkhead_id) AND (gltrans_rec)) UNION ALL SELECT sltrans_id AS trans_id FROM sltrans WHERE ((sltrans_doctype='CK') AND (sltrans_misc_id=_p.checkhead_id) AND (sltrans_rec)) ) AS data; IF (FOUND) THEN RETURN -14; END IF; _gltransNote := 'Void Posted Check #' || _p.checkhead_number || ' ' || _p.checkrecip_number || '-' || _p.checkrecip_name; IF (_p.checkhead_misc) THEN IF (COALESCE(_p.checkhead_expcat_id, -1) < 0) THEN IF (_p.checkhead_recip_type = 'V') THEN PERFORM createAPDebitMemo(_p.checkhead_recip_id, pJournalNumber, CAST(fetchAPMemoNumber() AS text), '', pVoidDate, _p.checkhead_amount, _gltransNote || ' '|| _p.checkhead_notes, -1, pVoidDate, -1, _p.checkhead_curr_id ); _credit_glaccnt := findAPPrepaidAccount(_p.checkhead_recip_id); ELSIF (_p.checkhead_recip_type = 'C') THEN PERFORM createARCreditMemo(NULL, _p.checkhead_recip_id, fetchARMemoNumber(), '', pVoidDate, _p.checkhead_amount, _gltransNote || ' '|| _p.checkhead_notes, -1, -1, -1, pVoidDate, -1, NULL, 0.0, pJournalNumber, _p.checkhead_curr_id ); _credit_glaccnt := _p.prepaidaccntid; ELSIF (_p.checkhead_recip_type = 'T') THEN -- TODO: should we create a debit memo for the tax authority? how? _credit_glaccnt := _p.checkrecip_accnt_id; END IF; -- recip type ELSE SELECT expcat_exp_accnt_id INTO _credit_glaccnt FROM expcat WHERE (expcat_id=_p.checkhead_expcat_id); IF (NOT FOUND) THEN RETURN -12; END IF; END IF; IF (COALESCE(_credit_glaccnt, -1) < 0) THEN RETURN -13; END IF; PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), _credit_glaccnt, round(_p.checkhead_amount_base, 2), pVoidDate, _gltransNote, pCheckid); _amount_base := _p.checkhead_amount_base; ELSE FOR _r IN SELECT checkitem_amount, checkitem_discount, CASE WHEN (checkitem_apopen_id IS NOT NULL) THEN checkitem_amount / apopen_curr_rate ELSE currToBase(checkitem_curr_id, checkitem_amount, COALESCE(checkitem_docdate, _p.checkhead_checkdate)) END AS checkitem_amount_base, checkitem_amount / checkitem_curr_rate AS amount_check, apopen_id, apopen_doctype, apopen_docnumber, apopen_curr_rate, apopen_docdate, aropen_id, aropen_doctype, aropen_docnumber, checkitem_curr_id, checkitem_curr_rate, COALESCE(checkitem_docdate, _p.checkhead_checkdate) AS docdate FROM (checkitem LEFT OUTER JOIN apopen ON (checkitem_apopen_id=apopen_id)) LEFT OUTER JOIN aropen ON (checkitem_aropen_id=aropen_id) WHERE (checkitem_checkhead_id=pcheckid) LOOP _exchGainTmp := 0; IF (_r.apopen_id IS NOT NULL) THEN -- undo the APDiscount Credit Memo if a discount was taken IF(_r.checkitem_discount > 0) THEN SELECT NEXTVAL('apopen_apopen_id_seq') INTO _apopenid; SELECT fetchAPMemoNumber() INTO _docnumber; INSERT INTO apopen ( apopen_id, apopen_username, apopen_journalnumber, apopen_vend_id, apopen_docnumber, apopen_doctype, apopen_ponumber, apopen_docdate, apopen_duedate, apopen_distdate, apopen_terms_id, apopen_amount, apopen_paid, apopen_open, apopen_notes, apopen_accnt_id, apopen_curr_id, apopen_discount, apopen_curr_rate, apopen_closedate ) VALUES ( _apopenid, getEffectiveXtUser(), pJournalNumber, _p.checkhead_recip_id, _docnumber, 'D', '', pVoidDate, pVoidDate, pVoidDate, -1, _r.checkitem_discount, _r.checkitem_discount, FALSE, ('Reverse Posted Discount ' || _r.apopen_doctype || ' ' || _r.apopen_docnumber), -1, _p.checkhead_curr_id, TRUE, _r.apopen_curr_rate, current_date ); PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'DS', _r.apopen_docnumber, findAPDiscountAccount(_p.checkhead_recip_id), round(_r.checkitem_discount / _r.apopen_curr_rate, 2) * -1, pVoidDate, _gltransNote, pCheckid); PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'DS', _r.apopen_docnumber, findAPAccount(_p.checkhead_recip_id), round(_r.checkitem_discount / _r.apopen_curr_rate, 2), pVoidDate, _gltransNote, pCheckid); -- Post the application INSERT INTO apapply ( apapply_vend_id, apapply_postdate, apapply_username, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_journalnumber, apapply_amount, apapply_curr_id ) VALUES ( _p.checkhead_recip_id, pVoidDate, getEffectiveXtUser(), _apopenid, 'D', _docnumber, _r.apopen_id, _r.apopen_doctype, _r.apopen_docnumber, pJournalNumber, (_r.checkitem_discount * -1), _r.checkitem_curr_id ); END IF; -- discount was taken UPDATE apopen SET apopen_paid = round(apopen_paid - (_r.checkitem_amount + noNeg(_r.checkitem_discount)), 2), apopen_open = round(apopen_amount, 2) > round(apopen_paid - (_r.checkitem_amount + noNeg(_r.checkitem_discount)), 2), apopen_closedate = CASE WHEN (round(apopen_amount, 2) > round(apopen_paid - (_r.checkitem_amount + noNeg(_r.checkitem_discount)))) THEN NULL ELSE apopen_closedate END WHERE (apopen_id=_r.apopen_id); -- Post the application INSERT INTO apapply ( apapply_vend_id, apapply_postdate, apapply_username, apapply_source_apopen_id, apapply_source_doctype, apapply_source_docnumber, apapply_target_apopen_id, apapply_target_doctype, apapply_target_docnumber, apapply_journalnumber, apapply_amount, apapply_curr_id ) VALUES ( _p.checkhead_recip_id, pVoidDate, getEffectiveXtUser(), -1, 'K', _p.checkhead_number, _r.apopen_id, _r.apopen_doctype, _r.apopen_docnumber, pJournalNumber, (_r.checkitem_amount * -1), _r.checkitem_curr_id ); END IF; -- if check item's apopen_id is not null IF (_r.aropen_id IS NOT NULL) THEN UPDATE aropen SET aropen_paid = round(aropen_paid -_r.checkitem_amount, 2), aropen_open = round(aropen_amount, 2) > round(aropen_paid - _r.checkitem_amount, 2) WHERE (aropen_id=_r.aropen_id); -- Post the application INSERT INTO arapply ( arapply_cust_id, arapply_postdate, arapply_distdate, arapply_username, arapply_source_aropen_id, arapply_source_doctype, arapply_source_docnumber, arapply_target_aropen_id, arapply_target_doctype, arapply_target_docnumber, arapply_journalnumber, arapply_applied, arapply_curr_id ) VALUES ( _p.checkhead_recip_id, pVoidDate, pVoidDate, getEffectiveXtUser(), -1, 'K', _p.checkhead_number, _r.aropen_id, _r.aropen_doctype, _r.aropen_docnumber, pJournalNumber, (_r.checkitem_amount * -1), _r.checkitem_curr_id ); END IF; -- if check item's aropen_id is not null -- calculate currency gain/loss IF (_r.apopen_id IS NOT NULL) THEN IF (_p.checkhead_curr_id = _r.checkitem_curr_id) THEN IF (_r.apopen_docdate > _p.checkhead_checkdate) THEN _exchGainTmp := ((_r.checkitem_amount/_p.checkhead_curr_rate) - (_r.checkitem_amount / _r.apopen_curr_rate)) * -1; ELSE _exchGainTmp := ((_r.checkitem_amount / _r.apopen_curr_rate) - (_r.checkitem_amount/_p.checkhead_curr_rate)); END IF; ELSE -- unusual condition where bank overridden and different currency from voucher IF (_r.apopen_docdate > _p.checkhead_checkdate) THEN _exchGainTmp := ((_r.checkitem_amount/_r.checkitem_curr_rate) - (_r.checkitem_amount / _r.apopen_curr_rate)) * -1; ELSE _exchGainTmp := ((_r.checkitem_amount / _r.apopen_curr_rate) - (_r.checkitem_amount/_r.checkitem_curr_rate)); END IF; END IF; ELSE SELECT arCurrGain(_r.aropen_id,_r.checkitem_curr_id, _r.checkitem_amount, _p.checkhead_checkdate) INTO _exchGainTmp; END IF; _exchGain := _exchGain + _exchGainTmp; PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), _p.checkrecip_accnt_id, round(_r.checkitem_amount_base, 2), pVoidDate, _gltransNote, pCheckid); IF (_exchGainTmp <> 0) THEN PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), getGainLossAccntId(_p.checkrecip_accnt_id), round(_exchGainTmp, 2) * -1, pVoidDate, _gltransNote, pCheckid); END IF; _amount_check := (_amount_check + _r.amount_check); _amount_base := (_amount_base + _r.checkitem_amount_base); END LOOP; IF( (_amount_check - _p.checkhead_amount) <> 0.0 ) THEN _exchGainTmp := (_amount_check - _p.checkhead_amount) / _p.checkhead_curr_rate; _exchGain := _exchGain + _exchGainTmp; END IF; -- ensure that the check balances, attribute rounding errors to gain/loss IF round(_amount_base, 2) - round(_exchGain, 2) <> round(_p.checkhead_amount_base, 2) THEN IF round(_amount_base - _exchGain, 2) = round(_p.checkhead_amount_base, 2) THEN PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), getGainLossAccntId(_p.bankaccntid), (round(_amount_base, 2) - round(_exchGain, 2) - round(_p.checkhead_amount_base, 2)) * -1, pVoidDate, _gltransNote, pCheckid); ELSE RAISE EXCEPTION 'checkhead_id % does not balance (% - % <> %)', pCheckid, _amount_base, _exchGain, _p.checkhead_amount_base; END IF; END IF; END IF; PERFORM insertIntoGLSeries( _sequence, _p.checkrecip_gltrans_source, 'CK', text(_p.checkhead_number), _p.bankaccntid, round(_p.checkhead_amount_base, 2) * -1, pVoidDate, _gltransNote, pCheckid); PERFORM postGLSeries(_sequence, pJournalNumber); UPDATE gltrans SET gltrans_misc_id=pCheckid WHERE gltrans_sequence=_sequence; UPDATE checkhead SET checkhead_posted=false, checkhead_void=true, checkhead_journalnumber=pJournalNumber WHERE (checkhead_id=pCheckid); RETURN pJournalNumber; END; $_$; >DROP FUNCTION public.voidpostedcheck(integer, integer, date); publicadminfalse8399212551683490woeffectivedate(date)FUNCTIONqCREATE FUNCTION woeffectivedate(date) RETURNS date LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pStartDate ALIAS FOR $1; BEGIN IF (explodeWoEffective() = 'E') THEN RETURN CURRENT_DATE; ELSE RETURN pStartDate; END IF; END; $_$; ,DROP FUNCTION public.woeffectivedate(date); publicadminfalse83992125520055987woinvavail(integer, boolean, boolean, boolean, boolean)FUNCTIONCREATE FUNCTION woinvavail(integer, boolean, boolean, boolean, boolean) RETURNS SETOF woinvav LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; pshowchildindent ALIAS FOR $2; pshowchildsum ALIAS FOR $3; pshowshortage ALIAS FOR $4; pshowlowinventory ALIAS FOR $5; _row woinvav%ROWTYPE; _subrow woinvav%ROWTYPE; _wonumber TEXT; _x RECORD; _subx RECORD; _qry TEXT; BEGIN IF(pshowchildindent) THEN --get top level order FOR _x IN SELECT wo_id, itemsite_id, item_type, wo_number, wo_subnumber, item_number, item_descrip1, item_descrip2, uom_name, qoh, wobalance, allocated, ordered, reorderlevel, (qoh + ordered - wobalance) AS woavail, (qoh + ordered - allocated) AS totalavail FROM(SELECT wo_id, itemsite_id, item_type, wo_number, wo_subnumber, item_number, item_descrip1, item_descrip2, uom_name, noNeg(itemsite_qtyonhand) AS qoh, noNeg(wo_qtyord - wo_qtyrcv) AS wobalance, qtyAllocated(itemsite_id, wo_duedate) AS allocated, qtyOrdered(itemsite_id, wo_duedate) AS ordered, CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel FROM wo, itemsite, item, uom WHERE ((wo_id = pwoid) AND (itemsite_id = wo_itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id)) ORDER BY wo_number, wo_subnumber) AS data LOOP _row.woinvav_itemsite_id := _x.itemsite_id; _row.woinvav_womatl_id := -1; _row.woinvav_type := _x.item_type; _row.woinvav_item_wo_number := _x.wo_number || '-' || _x.wo_subnumber; _row.woinvav_descrip := _x.item_descrip1 || ' ' || _x.item_descrip2; _row.woinvav_uomname := _x.uom_name; _row.woinvav_qoh := _x.qoh; _row.woinvav_balance := _x.wobalance; _row.woinvav_allocated := _x.allocated; _row.woinvav_ordered := _x.ordered; _row.woinvav_woavail := _x.woavail; _row.woinvav_totalavail := _x.totalavail; _row.woinvav_reorderlevel := _x.reorderlevel; _row.woinvav_level := 0; RETURN NEXT _row; --get materials for this level FOR _subx IN SELECT * FROM woinvavailmatl(_x.wo_id, 1, pshowshortage, pshowlowinventory) LOOP RETURN NEXT _subx; END LOOP; FOR _subx IN SELECT * FROM woinvavail(_x.wo_id, 1, pshowshortage, pshowlowinventory) LOOP RETURN NEXT _subx; END LOOP; END LOOP; ELSE SELECT wo_number FROM wo WHERE wo_id=pwoid LIMIT 1 INTO _wonumber; --display a single level sum of work order requirements _qry := 'SELECT wo_id, itemsite_id, womatl_id, item_type, wo_number, item_number, item_descrip1, item_descrip2, uom_name, qoh, wobalance, allocated, ordered, reorderlevel, (qoh + ordered - wobalance) AS woavail, (qoh + ordered - allocated) AS totalavail FROM (SELECT wo_id, itemsite_id, womatl_id, item_type, wo_number, item_number, item_descrip1, item_descrip2, uom_name, noNeg(itemsite_qtyonhand) AS qoh, noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq - womatl_qtyiss)) AS wobalance, qtyAllocated(itemsite_id, womatl_duedate) AS allocated, qtyOrdered(itemsite_id, womatl_duedate) AS ordered, CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel FROM wo, womatl, itemsite, item, uom WHERE (womatl_wo_id=wo_id) AND (womatl_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id) '; IF(pshowchildsum) THEN _qry := _qry || ' AND (wo_number=' || _wonumber || ')'; ELSE _qry := _qry || ' AND (womatl_wo_id=' || pwoid || ')'; END IF; _qry := _qry || ' ORDER BY item_number) AS data '; IF(pshowshortage) THEN _qry := _qry || ' WHERE (((qoh + ordered - allocated) < 0) OR ((qoh + ordered - wobalance) < 0)) '; END IF; IF(pshowlowinventory AND NOT pshowshortage) THEN _qry := _qry || ' WHERE (((qoh - allocated) < 0) OR ((qoh - wobalance) < 0)) '; END IF; FOR _x IN EXECUTE _qry LOOP _row.woinvav_itemsite_id := _x.itemsite_id; _row.woinvav_womatl_id := _x.womatl_id; _row.woinvav_type := _x.item_type; _row.woinvav_item_wo_number := _x.item_number; _row.woinvav_descrip := _x.item_descrip1 || ' ' || _x.item_descrip2; _row.woinvav_uomname := _x.uom_name; _row.woinvav_qoh := _x.qoh; _row.woinvav_balance := _x.wobalance; _row.woinvav_allocated := _x.allocated; _row.woinvav_ordered := _x.ordered; _row.woinvav_woavail := _x.woavail; _row.woinvav_totalavail := _x.totalavail; _row.woinvav_reorderlevel := _x.reorderlevel; _row.woinvav_level := 0; RETURN NEXT _row; END LOOP; END IF; RETURN; END; $_$; NDROP FUNCTION public.woinvavail(integer, boolean, boolean, boolean, boolean); publicadminfalse83992261312552005599.woinvavail(integer, integer, boolean, boolean)FUNCTION: CREATE FUNCTION woinvavail(integer, integer, boolean, boolean) RETURNS SETOF woinvav LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; plevel ALIAS FOR $2; pshowshortage ALIAS FOR $3; pshowlowinventory ALIAS FOR $4; _row woinvav%ROWTYPE; _x RECORD; _subx RECORD; _index INTEGER; _level INTEGER; _qry TEXT; BEGIN FOR _x IN SELECT wo_id, itemsite_id, item_type, wo_number, wo_subnumber, item_number, item_descrip1, item_descrip2, uom_name, qoh, wobalance, allocated, ordered, reorderlevel, (qoh + ordered - wobalance) AS woavail, (qoh + ordered - allocated) AS totalavail FROM(SELECT wo_id, itemsite_id, item_type, wo_number, wo_subnumber, item_number, item_descrip1, item_descrip2, uom_name, noNeg(itemsite_qtyonhand) AS qoh, noNeg(wo_qtyord - wo_qtyrcv) AS wobalance, qtyAllocated(itemsite_id, wo_duedate) AS allocated, qtyOrdered(itemsite_id, wo_duedate) AS ordered, CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel FROM wo, itemsite, item, uom WHERE ((wo_ordid = pwoid) AND NOT (wo_status = 'C') AND (itemsite_id = wo_itemsite_id) AND (itemsite_item_id=item_id) AND (item_inv_uom_id=uom_id)) ORDER BY wo_number, wo_subnumber) AS data LOOP _row.woinvav_itemsite_id := _x.itemsite_id; _row.woinvav_womatl_id := -1; _row.woinvav_type := _x.item_type; _row.woinvav_item_wo_number := _x.wo_number || '-' || _x.wo_subnumber; _row.woinvav_descrip := _x.item_descrip1 || ' ' || _x.item_descrip2; _row.woinvav_uomname := _x.uom_name; _row.woinvav_qoh := _x.qoh; _row.woinvav_balance := _x.wobalance; _row.woinvav_allocated := _x.allocated; _row.woinvav_ordered := _x.ordered; _row.woinvav_woavail := _x.woavail; _row.woinvav_totalavail := _x.totalavail; _row.woinvav_reorderlevel := _x.reorderlevel; _row.woinvav_level := plevel; RETURN NEXT _row; --get materials for this level FOR _subx IN SELECT * FROM woinvavailmatl(_x.wo_id, plevel + 1, pshowshortage, pshowlowinventory) LOOP RETURN NEXT _subx; END LOOP; --get next level wo FOR _subx IN SELECT * FROM woinvavail(_x.wo_id, plevel + 1, pshowshortage, pshowlowinventory) LOOP RETURN NEXT _subx; END LOOP; END LOOP; RETURN; END; $_$; EDROP FUNCTION public.woinvavail(integer, integer, boolean, boolean); publicadminfalse839922613 125520056002woinvavailmatl(integer, integer, boolean, boolean)FUNCTION CREATE FUNCTION woinvavailmatl(integer, integer, boolean, boolean) RETURNS SETOF woinvav LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pwoid ALIAS FOR $1; plevel ALIAS FOR $2; pshowshortage ALIAS FOR $3; pshowlowinventory ALIAS FOR $4; _subrow woinvav%ROWTYPE; _subx RECORD; _qry TEXT; BEGIN _qry := 'SELECT itemsite_id, womatl_id, item_type, wo_number, wo_subnumber, womatl_ref, womatl_notes, item_number, item_descrip1, item_descrip2, uom_name, qoh, wobalance, allocated, ordered, (qoh + ordered - wobalance) AS woavail, (qoh + ordered - allocated) AS totalavail, reorderlevel FROM(SELECT itemsite_id, womatl_id, item_type, wo_number, wo_subnumber, womatl_ref, womatl_notes, item_number, item_descrip1, item_descrip2, uom_name, noNeg(itemsite_qtyonhand) AS qoh, noNeg(itemuomtouom(itemsite_item_id, womatl_uom_id, NULL, womatl_qtyreq - womatl_qtyiss)) AS wobalance, qtyAllocated(itemsite_id, womatl_duedate) AS allocated, qtyOrdered(itemsite_id, womatl_duedate) AS ordered, CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel FROM womatl, wo, itemsite, item, uom WHERE ((wo_id = womatl_wo_id) AND (womatl_itemsite_id = itemsite_id) AND (itemsite_item_id=item_id) AND (womatl_uom_id=uom_id) AND (NOT womatl_createwo OR womatl_createwo IS NULL))'; _qry := _qry || ' AND (wo_id=' || pwoid || ') ORDER BY item_number) AS data'; IF(pshowshortage) THEN _qry := _qry || ' WHERE (((qoh + ordered - allocated) < 0) OR ((qoh + ordered - wobalance) < 0)) '; END IF; IF(pshowlowinventory AND NOT pshowshortage) THEN _qry := _qry || ' WHERE (((qoh - allocated) < 0) OR ((qoh - wobalance) < 0)) '; END IF; FOR _subx IN EXECUTE _qry LOOP _subrow.woinvav_itemsite_id := _subx.itemsite_id; _subrow.woinvav_womatl_id := _subx.womatl_id; _subrow.woinvav_type := _subx.item_type; _subrow.woinvav_item_wo_number := _subx.item_number; _subrow.woinvav_descrip := _subx.item_descrip1 || ' ' || _subx.item_descrip2; _subrow.woinvav_uomname := _subx.uom_name; _subrow.woinvav_qoh := _subx.qoh; _subrow.woinvav_balance := _subx.wobalance; _subrow.woinvav_allocated := _subx.allocated; _subrow.woinvav_ordered := _subx.ordered; _subrow.woinvav_woavail := _subx.woavail; _subrow.woinvav_totalavail := _subx.totalavail; _subrow.woinvav_reorderlevel := _subx.reorderlevel; _subrow.woinvav_level := plevel; RETURN NEXT _subrow; END LOOP; RETURN; END; $_$; IDROP FUNCTION public.woinvavailmatl(integer, integer, boolean, boolean); publicadminfalse839922613y12551683494wostarted(integer)FUNCTIONCREATE FUNCTION wostarted(pwoid integer) RETURNS boolean LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _result BOOLEAN := FALSE; BEGIN -- is it really this simple? SELECT (wo_wipvalue > 0) INTO _result FROM wo WHERE wo_id=pWoid; RETURN COALESCE(_result, FALSE); END; $$; /DROP FUNCTION public.wostarted(pwoid integer); publicadminfalse8399212551683495calcrate(numeric, character)FUNCTIONtCREATE FUNCTION calcrate(numeric, character) RETURNS numeric LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pAmount ALIAS FOR $1; pPeriod ALIAS FOR $2; _state integer; _count integer; BEGIN -- Convert amount to hourly rate IF (pPeriod = 'H') THEN -- hourly RETURN round(pAmount,2); ELSIF (pPeriod = 'D') THEN -- daily RETURN round(pAmount / 8, 2); ELSIF (pPeriod = 'W') THEN -- weekly RETURN round(pAmount / 40, 2); ELSIF (pPeriod = 'BW') THEN -- bi-weekly RETURN round(pAmount / 80, 2); ELSIF (pPeriod = 'M') THEN -- monthly RETURN round(pAmount / 160, 2); ELSIF (pPeriod = 'Y') THEN -- annually RETURN round(pAmount / 2080, 2); ELSE RAISE EXCEPTION 'Unknown period type passed: %', pPeriod; END IF; END; $_$; /DROP FUNCTION te.calcrate(numeric, character); teadminfalse9399212551683496copyitem(integer, text)FUNCTIONCREATE FUNCTION copyitem(integer, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pSItemid ALIAS FOR $1; pTItemNumber ALIAS FOR $2; _itemid INTEGER; _r RECORD; _id INTEGER; BEGIN _itemid := public.copyItem(pSItemid, pTItemNumber); INSERT INTO te.teexp SELECT _itemid, teexp_expcat_id, teexp_accnt_id FROM te.teexp src WHERE (src.teexp_id=pSItemid); RETURN _itemid; END; $_$; *DROP FUNCTION te.copyitem(integer, text); teadminfalse93992w12551683497invoicesheets(integer[])FUNCTIONCREATE FUNCTION invoicesheets(integer[]) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pHeadIDs ALIAS FOR $1; _invcnum text; _invcheadid integer; _invcitemid integer; _s record; _t record; _linenum integer; BEGIN -- Loop through time sheet items with matching criteria and make invoices FOR _s in SELECT DISTINCT teitem_cust_id, teitem_po, prj_id, teitem_curr_id FROM te.tehead JOIN te.teitem ON (teitem_tehead_id=tehead_id AND teitem_billable) JOIN prjtask ON (teitem_prjtask_id=prjtask_id) JOIN prj ON (prjtask_prj_id=prj_id) WHERE ((tehead_id IN (SELECT * FROM te.unnest(pHeadIDs) ) ) AND (teitem_billable) AND (teitem_invcitem_id IS NULL)) -- loop thru records and create invoices by customer, by PO for the provided headid LOOP --select nextval('invchead_invchead_id_seq') into _invcid; _invcnum := CAST(fetchInvcNumber() AS TEXT); _invcheadid := nextval('invchead_invchead_id_seq'); _linenum := 1; INSERT INTO invchead SELECT _invcheadid, cust_id, -1, '', current_date, false, false, _invcnum, current_date, current_date, _s.teitem_po, '', '', cust_name, COALESCE(addr_line1,''), COALESCE(addr_line2,''), COALESCE(addr_line3,''), COALESCE(addr_city,''), COALESCE(addr_state,''), COALESCE(addr_postalcode,''), cntct_phone, '', '', '', '', '', '', '', '', cust_salesrep_id, salesrep_commission, cust_terms_id, 0, 0, '', -1, 0, '', '', COALESCE(addr_country,''), '', _s.prj_id, _s.teitem_curr_id, current_date, false, null, null, null, null, null, cust_taxzone_id FROM custinfo JOIN salesrep ON (cust_salesrep_id=salesrep_id) LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id) LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id) WHERE (cust_id=_s.teitem_cust_id); -- loop thru all lines of the sheet FOR _t IN SELECT teitem_id, teitem_linenumber, tehead_warehous_id, teitem_type, tehead_emp_id, cust_taxzone_id, item_number, teitem_cust_id, teitem_po, teitem_item_id, teitem_qty, teitem_uom_id, teitem_rate, teitem_notes FROM te.teitem JOIN te.tehead ON (teitem_tehead_id = tehead_id) JOIN custinfo ON (cust_id = teitem_cust_id) JOIN item ON (item_id = teitem_item_id) JOIN prjtask ON (teitem_prjtask_id=prjtask_id) JOIN prj ON (prjtask_prj_id=prj_id) WHERE ((tehead_id IN (SELECT * FROM te.unnest(pHeadIDs) ) ) AND (teitem_billable) AND (teitem_invcitem_id IS NULL) AND (item_id = teitem_item_id) AND (teitem_cust_id = _s.teitem_cust_id) AND (teitem_po = _s.teitem_po) AND (prj_id = _s.prj_id) AND (teitem_curr_id = _s.teitem_curr_id)) ORDER BY teitem_linenumber LOOP _invcitemid := nextval('invcitem_invcitem_id_seq'); INSERT INTO invcitem SELECT _invcitemid, _invcheadid, _linenum, _t.teitem_item_id, _t.tehead_warehous_id, '', '', '', _t.teitem_qty, _t.teitem_qty, _t.teitem_rate, _t.teitem_rate, _t.teitem_notes, -1, getItemTaxType(item_id, _t.cust_taxzone_id), _t.teitem_uom_id, itemuomtouomratio(item_id, _t.teitem_uom_id, item_inv_uom_id), _t.teitem_uom_id, itemuomtouomratio(item_id, _t.teitem_uom_id, item_inv_uom_id), null FROM item WHERE (item_id=_t.teitem_item_id); _linenum := _linenum + 1; -- Update the time sheet item record UPDATE te.teitem SET teitem_invcitem_id = _invcitemid WHERE (teitem_id = _t.teitem_id); END LOOP; END LOOP; RETURN 1; END; $_$; +DROP FUNCTION te.invoicesheets(integer[]); teadminfalse39929x12551683498postsheet(integer, text, text)FUNCTION CREATE FUNCTION postsheet(integer, text, text) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTeheadId ALIAS FOR $1; pPhrase1 ALIAS FOR $2; pPhrase2 ALIAS FOR $3; _r record; _notes TEXT; _value NUMERIC; _olaccntid INTEGER; _expaccntid INTEGER; _count INTEGER; BEGIN -- Validate: No posting for contractors IF (SELECT (count(teemp_id) > 0) FROM te.tehead JOIN te.teemp ON (tehead_emp_id=teemp_emp_id) WHERE ((tehead_id=pTeheadId) AND (teemp_contractor))) THEN RAISE EXCEPTION 'Time and Expense Sheets can not be posted for contractors. Voucher instead.'; END IF; -- Get labor and overhead account SELECT accnt_id INTO _olaccntid FROM accnt WHERE (accnt_id=fetchmetricvalue('PrjLaborAndOverhead')); GET DIAGNOSTICS _count = ROW_COUNT; IF (_count = 0) THEN RAISE EXCEPTION 'No valid Project Labor and Overhead Account Defined'; END IF; -- Get applicable time sheets FOR _r IN SELECT tehead_number, teitem_id, teitem_linenumber, teitem_type, teitem_notes, item_descrip1, teitem_qty, teexp_expcat_id, teexp_accnt_id, emp_code, emp_wage, emp_wage_period, prj_id, prj_number FROM te.tehead JOIN te.teitem ON (teitem_tehead_id=tehead_id) JOIN item ON (teitem_item_id=item_id) JOIN te.teexp ON (teitem_item_id=teexp_id) JOIN emp ON (tehead_emp_id=emp_id) JOIN prjtask ON (prjtask_id=teitem_prjtask_id) JOIN prj ON (prj_id=prjtask_prj_id) WHERE ((tehead_id = pTeheadId) AND (NOT teitem_posted) AND (teitem_vodist_id IS NULL) AND (teitem_type = 'T')) LOOP -- Determine value _value := te.calcRate(_r.emp_wage, _r.emp_wage_period) * _r.teitem_qty; -- Determine G/L account to post to IF (_r.teexp_accnt_id > 1) THEN _expaccntid := getPrjAccntId(_r.prj_id, _r.teexp_accnt_id); ELSE SELECT getPrjAccntId(_r.prj_id, expcat_exp_accnt_id) INTO _expaccntid FROM expcat WHERE (expcat_id=_r.teexp_expcat_id); END IF; -- Execute the posting _notes := (pPhrase1 || _r.item_descrip1 || '/' || _r.emp_code || pPhrase2 || ' ' || _r.prj_number); PERFORM insertGLTransaction( 'T/E', 'TE', _r.tehead_number, _notes, _olaccntid, _expaccntid, -1, _value, current_date ); -- Update the time sheet item UPDATE te.teitem SET teitem_posted = true, teitem_postedvalue = teitem_postedvalue + _value WHERE (teitem_id=_r.teitem_id); END LOOP; RETURN 1; END; $_$; 1DROP FUNCTION te.postsheet(integer, text, text); teadminfalse93992}12551683499sheetstate(integer, character)FUNCTIONCREATE FUNCTION sheetstate(integer, character) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pTeheadId ALIAS FOR $1; pType ALIAS FOR $2; _state INTEGER := -1; BEGIN -- Check and return the process state of the sheet -- 1 = All processed -- 0 = Processing required -- -1 = Not Applicable IF (pType = 'I') THEN SELECT MIN(CASE teitem_invcitem_id IS NULL WHEN TRUE THEN 0 ELSE 1 END) INTO _state FROM te.teitem WHERE ((teitem_tehead_id=pTeheadId) AND (teitem_billable) AND (teitem_qty >= 0)); ELSIF (pType = 'V') THEN -- todo: why outer join then check teitem_type and vend_id is not null? SELECT MIN(CASE teitem_vodist_id IS NULL WHEN TRUE THEN 0 ELSE 1 END) INTO _state FROM te.tehead JOIN emp ON (tehead_emp_id=emp_id) LEFT OUTER JOIN te.teemp ON (emp_id=teemp_emp_id) LEFT OUTER JOIN te.teitem ON (teitem_tehead_id=tehead_id) LEFT OUTER JOIN vendinfo ON (UPPER(emp_number)=UPPER(vend_number)) WHERE ((teitem_tehead_id=pTeheadId) AND ((teitem_type = 'E' AND NOT teitem_prepaid) OR (teitem_type = 'T' AND COALESCE(teemp_contractor,false))) AND (vend_id IS NOT NULL) AND (teitem_qty > 0)); ELSIF (pType = 'P') THEN SELECT MIN(CASE teitem_posted WHEN FALSE THEN 0 ELSE 1 END) INTO _state FROM te.teitem JOIN te.tehead ON (teitem_tehead_id=tehead_id) JOIN te.teemp ON (tehead_emp_id=teemp_emp_id) WHERE ((teitem_tehead_id=pTeheadId) AND (teitem_type = 'T') AND (NOT teemp_contractor)); ELSE -- TODO: either make ErrorReporter::error find this or use xtuple RAISE EXCEPTION 'Unknown process type % [xtte: sheetstate, -2, %]', pType, pType; END IF; RETURN _state; END; $_$; 1DROP FUNCTION te.sheetstate(integer, character); teadminfalse93992~12551683500triggertehead()FUNCTIONCREATE FUNCTION triggertehead() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _sense INTEGER := 0; BEGIN -- Determine whether we are adding or subtracting totals IF (TG_OP = 'UPDATE') THEN IF (OLD.tehead_status = 'O' AND NEW.tehead_status = 'A') THEN -- Approving so add _sense := 1; ELSIF (OLD.tehead_status = 'A' AND NEW.tehead_status = 'O') THEN -- Unapproving so subtract _sense := -1; END IF; END IF; IF (_sense != 0) THEN -- Loop thru all lines of the sheet and update project FOR _r in SELECT teitem_prjtask_id, teitem_type, teitem_qty, teitem_total FROM te.teitem WHERE teitem_tehead_id = NEW.tehead_id LOOP IF (_r.teitem_type = 'T') THEN UPDATE prjtask SET prjtask_hours_actual = prjtask_hours_actual + _r.teitem_qty * _sense WHERE prjtask_id = _r.teitem_prjtask_id; ELSE UPDATE prjtask SET prjtask_exp_actual = prjtask_exp_actual + _r.teitem_total * _sense WHERE prjtask_id = _r.teitem_prjtask_id; END IF; END LOOP; END IF; RETURN NEW; END; $$; "DROP FUNCTION te.triggertehead(); teadminfalse39929q12551683501triggerteitem()FUNCTION> CREATE FUNCTION triggerteitem() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _r RECORD; _status CHAR(1) := 'O'; BEGIN -- Validate whether we can take this action IF (TG_OP = 'UPDATE') THEN IF ((OLD.teitem_type != NEW.teitem_type) OR (OLD.teitem_workdate != NEW.teitem_workdate) OR (OLD.teitem_cust_id != NEW.teitem_cust_id) OR (OLD.teitem_po != NEW.teitem_po) OR (OLD.teitem_item_id != NEW.teitem_item_id) OR (OLD.teitem_qty != NEW.teitem_qty) OR (OLD.teitem_rate != NEW.teitem_rate) OR (OLD.teitem_total != NEW.teitem_total) OR (OLD.teitem_billable != NEW.teitem_billable) OR (OLD.teitem_prepaid != NEW.teitem_prepaid) OR (OLD.teitem_notes != NEW.teitem_notes)) THEN SELECT tehead_status INTO _status FROM te.tehead WHERE tehead_id=NEW.teitem_tehead_id; END IF; ELSIF (TG_OP = 'INSERT') THEN SELECT tehead_status INTO _status FROM te.tehead WHERE tehead_id=NEW.teitem_tehead_id; ELSE -- Must be delete SELECT tehead_status INTO _status FROM te.tehead WHERE tehead_id=OLD.teitem_tehead_id; END IF; IF (_status != 'O') THEN RAISE EXCEPTION 'Time and Expense Sheets may only be edited or deleted when the status is Open'; END IF; _status := 'C'; -- Update header status, default is to close if all processing complete IF (TG_OP = 'UPDATE') THEN IF ((COALESCE(OLD.teitem_invcitem_id,-1) != COALESCE(NEW.teitem_invcitem_id,-1)) OR (COALESCE(OLD.teitem_vodist_id,-1) != COALESCE(NEW.teitem_vodist_id,-1)) OR (OLD.teitem_posted != NEW.teitem_posted)) THEN SELECT te.sheetstate(NEW.teitem_tehead_id, 'I') AS invoiced, te.sheetstate(NEW.teitem_tehead_id, 'V') AS vouchered, te.sheetstate(NEW.teitem_tehead_id, 'P') AS posted INTO _r; IF (_r.invoiced = 0 OR _r.vouchered = 0 OR _r.posted = 0) THEN _status := 'A'; -- Something is still open, so approved END IF; UPDATE te.tehead SET tehead_status = _status WHERE (tehead_id=NEW.teitem_tehead_id); END IF; END IF; -- Update header with last use info IF (TG_OP = 'DELETE') THEN UPDATE te.tehead SET tehead_lastupdated=('now'::text)::timestamp(6) with time zone WHERE (tehead_id=OLD.teitem_tehead_id); ELSE UPDATE te.tehead SET tehead_lastupdated=('now'::text)::timestamp(6) with time zone, tehead_username=current_user WHERE (tehead_id=NEW.teitem_tehead_id); END IF; RETURN NEW; END; $$; "DROP FUNCTION te.triggerteitem(); teadminfalse93992r12551683502triggerteprj()FUNCTIONCREATE FUNCTION triggerteprj() RETURNS trigger LANGUAGE plpgsql AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _update BOOLEAN := false; BEGIN IF (TG_OP = 'INSERT') THEN _update = true; ELSIF (TG_OP = 'UPDATE') THEN IF (COALESCE(OLD.teprj_cust_id,-1) != COALESCE(NEW.teprj_cust_id,-1)) THEN _update = true; END IF; END IF; IF (_update) THEN UPDATE te.teprjtask SET teprjtask_cust_id=NEW.teprj_cust_id FROM prjtask WHERE ((teprjtask_prjtask_id=prjtask_id) AND (prjtask_prj_id=NEW.teprj_prj_id)); END IF; RETURN NEW; END; $$; !DROP FUNCTION te.triggerteprj(); teadminfalse3992912551683503unnest(anyarray)FUNCTIONGCREATE FUNCTION unnest(anyarray) RETURNS SETOF anyelement LANGUAGE sql IMMUTABLE AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. SELECT $1[i] FROM generate_series(array_lower($1,1), array_upper($1,1)) i; $_$; #DROP FUNCTION te.unnest(anyarray); teadminfalse9m12551683504vouchersheet(integer)FUNCTIONCREATE FUNCTION vouchersheet(integer) RETURNS integer LANGUAGE plpgsql AS $_$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE pHeadID ALIAS FOR $1; _distamt NUMERIC; _glaccnt INTEGER; _notes TEXT; _s RECORD; _total NUMERIC := 0; _v RECORD; _vodistid INTEGER; _voheadid INTEGER; BEGIN FOR _v IN -- distinct filters duplicate rows returned because of the teitem join -- TODO: can we push the teitem down into the loop and avoid the distinct? SELECT DISTINCT tehead_id, tehead_number, tehead_weekending, tehead_notes, teitem_curr_id, emp_wage, emp_wage_period, vend_id, vend_taxzone_id, vend_terms_id, vend_number, vend_1099, COALESCE(teemp_contractor, false) AS isContractor FROM te.tehead JOIN te.teitem ON (teitem_tehead_id=tehead_id) JOIN emp ON (tehead_emp_id=emp_id) JOIN vendinfo ON (UPPER(emp_number)=UPPER(vend_number)) LEFT OUTER JOIN te.teemp ON (emp_id=teemp_emp_id) WHERE ((tehead_id = pHeadID) AND (teitem_prepaid = false) AND (teitem_vodist_id IS NULL) AND (teitem_type = 'E' OR (COALESCE(teemp_contractor,false) AND (teitem_empcost > 0 OR emp_wage > 0 )))) LOOP INSERT INTO vohead (vohead_id, vohead_number, vohead_vend_id, vohead_distdate, vohead_docdate, vohead_duedate, vohead_terms_id, vohead_taxzone_id, vohead_invcnumber, vohead_reference, vohead_amount, vohead_1099, vohead_curr_id, vohead_notes, vohead_posted, vohead_misc, vohead_pohead_id) VALUES (DEFAULT, fetchVoNumber(), _v.vend_id, _v.tehead_weekending, _v.tehead_weekending, determineDueDate(_v.vend_terms_id, _v.tehead_weekending), _v.vend_terms_id, _v.vend_taxzone_id, 'N/A', ('T&E Sheet ' || _v.tehead_number), 0, _v.vend_1099, _v.teitem_curr_id, _v.tehead_notes, false, true, -1) RETURNING vohead_id INTO _voheadid; FOR _s IN SELECT teitem_id, teitem_linenumber, teitem_workdate, teitem_type, item_number, teitem_item_id, teitem_qty, prjtask_prj_id, CASE WHEN teitem_empcost > 0 THEN teitem_empcost ELSE te.calcRate(_v.emp_wage, _v.emp_wage_period) END AS rate, teitem_total, teitem_type, teexp_expcat_id, teexp_accnt_id FROM te.teitem JOIN te.teexp ON (teitem_item_id=teexp_id) JOIN item ON (teitem_item_id=item_id) JOIN prjtask ON (teitem_prjtask_id=prjtask_id) WHERE ((teitem_tehead_id = _v.tehead_id) AND (teitem_curr_id = _v.teitem_curr_id) AND (teitem_prepaid = false) AND (teitem_vodist_id IS NULL) AND (teitem_type = 'E' OR (_v.isContractor AND (teitem_empcost > 0 OR _v.emp_wage > 0 )))) -- Loop thru records and create vouchers by supplier for the provided headid LOOP -- insert vodist records here _vodistid = nextval('vodist_vodist_id_seq'); -- Map expense directly to account so we can get project account mapping if applicable IF (_s.teexp_accnt_id > 1) THEN _glaccnt := getPrjAccntId(_s.prjtask_prj_id, _s.teexp_accnt_id); ELSE SELECT getPrjAccntId(_s.prjtask_prj_id, expcat_exp_accnt_id) INTO _glaccnt FROM expcat WHERE (expcat_id=_s.teexp_expcat_id); END IF; IF (_s.teitem_type = 'T') THEN -- Time sheet record _notes := formatdate(_s.teitem_workdate) || E'\t' || _s.item_number || E'\t' || formatQty(_s.teitem_qty) || ' hours' || E'\t'; _distamt := _s.rate * _s.teitem_qty; ELSE -- Expense record _notes := formatdate(_s.teitem_workdate) || E'\t' || _s.item_number || E'\t' || E'\t'; _distamt := _s.teitem_total; END IF; INSERT INTO vodist (vodist_id, vodist_vohead_id, vodist_poitem_id, vodist_costelem_id, vodist_accnt_id, vodist_amount, vodist_expcat_id, vodist_notes) VALUES (_vodistid, _voheadid, -1, -1, _glaccnt, _distamt, -1, _notes); _total := _total + _distamt; -- Update the te.teitem record with the relationship UPDATE te.teitem SET teitem_vodist_id = _vodistid WHERE teitem_id = _s.teitem_id; END LOOP; UPDATE vohead SET vohead_amount = _total WHERE (vohead_id=_voheadid); _total := 0; END LOOP; RETURN 1; END; $_$; (DROP FUNCTION te.vouchersheet(integer); teadminfalse9399212551683506fetchwelcomehtml()FUNCTIONUCREATE FUNCTION fetchwelcomehtml() RETURNS text LANGUAGE plpgsql IMMUTABLE AS $$ -- Copyright (c) 1999-2012 by OpenMFG LLC, d/b/a xTuple. -- See www.xtuple.com/CPAL for the full text of the software license. DECLARE _html TEXT; BEGIN _html := '

Welcome to xTuple


You are not connected to the internet at this time

'; RETURN _html; END; $$; ,DROP FUNCTION xtdesktop.fetchwelcomehtml();  xtdesktopadminfalse10399212552005505concatagg(text) AGGREGATEfCREATE AGGREGATE concatagg(text) ( SFUNC = concataggsfunc, STYPE = text, INITCOND = '' ); 'DROP AGGREGATE public.concatagg(text); publicadminfalse8105712552005529first(anyelement) AGGREGATEVCREATE AGGREGATE first(anyelement) ( SFUNC = first_agg, STYPE = anyelement ); )DROP AGGREGATE public.first(anyelement); publicadminfalse8159312552005557last(anyelement) AGGREGATETCREATE AGGREGATE last(anyelement) ( SFUNC = last_agg, STYPE = anyelement ); (DROP AGGREGATE public.last(anyelement); publicadminfalse8181812591683537addrTABLECREATE TABLE addr ( addr_id integer NOT NULL, addr_active boolean DEFAULT true, addr_line1 text DEFAULT ''::text, addr_line2 text DEFAULT ''::text, addr_line3 text DEFAULT ''::text, addr_city text DEFAULT ''::text, addr_state text DEFAULT ''::text, addr_postalcode text DEFAULT ''::text, addr_country text DEFAULT ''::text, addr_notes text DEFAULT ''::text, addr_number text NOT NULL, CONSTRAINT addr_addr_number_check CHECK ((addr_number <> ''::text)) ); DROP TABLE public.addr; publicadminfalse59505951595259535954595559565957595859608"00 TABLE addrCOMMENT+COMMENT ON TABLE addr IS 'Postal Address'; publicadminfalse184"00addrACLREVOKE ALL ON TABLE addr FROM PUBLIC; REVOKE ALL ON TABLE addr FROM admin; GRANT ALL ON TABLE addr TO admin; GRANT ALL ON TABLE addr TO xtrole; publicadminfalse18412592005769accountVIEW CREATE VIEW account AS SELECT (c.crmacct_number)::character varying AS account_number, p.crmacct_number AS parent_account, c.crmacct_name AS account_name, c.crmacct_active AS active, CASE WHEN (c.crmacct_type = 'O'::bpchar) THEN 'Organization'::text ELSE 'Individual'::text END AS type, pc.cntct_number AS primary_contact_number, pc.cntct_honorific AS primary_contact_honorific, pc.cntct_first_name AS primary_contact_first, pc.cntct_middle AS primary_contact_middle, pc.cntct_last_name AS primary_contact_last, pc.cntct_suffix AS primary_contact_suffix, pc.cntct_title AS primary_contact_job_title, pc.cntct_phone AS primary_contact_voice, pc.cntct_fax AS primary_contact_fax, pc.cntct_email AS primary_contact_email, ''::text AS primary_contact_change, m.addr_number AS primary_contact_address_number, m.addr_line1 AS primary_contact_address1, m.addr_line2 AS primary_contact_address2, m.addr_line3 AS primary_contact_address3, m.addr_city AS primary_contact_city, m.addr_state AS primary_contact_state, m.addr_postalcode AS primary_contact_postalcode, m.addr_country AS primary_contact_country, ''::text AS primary_contact_address_change, sc.cntct_number AS secondary_contact_number, sc.cntct_honorific AS secondary_contact_honorific, sc.cntct_first_name AS secondary_contact_first, sc.cntct_middle AS secondary_contact_middle, sc.cntct_last_name AS secondary_contact_last, sc.cntct_suffix AS secondary_contact_suffix, sc.cntct_title AS secondary_contact_job_title, sc.cntct_phone AS secondary_contact_voice, sc.cntct_fax AS secondary_contact_fax, sc.cntct_email AS secondary_contact_email, sc.cntct_webaddr AS secondary_contact_web, ''::text AS secondary_contact_change, s.addr_number AS secondary_contact_address_number, s.addr_line1 AS secondary_contact_address1, s.addr_line2 AS secondary_contact_address2, s.addr_line3 AS secondary_contact_address3, s.addr_city AS secondary_contact_city, s.addr_state AS secondary_contact_state, s.addr_postalcode AS secondary_contact_postalcode, s.addr_country AS secondary_contact_country, ''::text AS secondary_contact_address_change, c.crmacct_notes AS notes FROM (((((public.crmacct c LEFT JOIN public.crmacct p ON ((c.crmacct_id = p.crmacct_parent_id))) LEFT JOIN public.cntct pc ON ((c.crmacct_cntct_id_1 = pc.cntct_id))) LEFT JOIN public.addr m ON ((pc.cntct_addr_id = m.addr_id))) LEFT JOIN public.cntct sc ON ((c.crmacct_cntct_id_2 = sc.cntct_id))) LEFT JOIN public.addr s ON ((sc.cntct_addr_id = s.addr_id))); DROP VIEW api.account; apiadminfalse51646"00 VIEW accountCOMMENT&COMMENT ON VIEW account IS 'Account'; apiadminfalse743"00accountACLREVOKE ALL ON TABLE account FROM PUBLIC; REVOKE ALL ON TABLE account FROM admin; GRANT ALL ON TABLE account TO admin; GRANT ALL ON TABLE account TO xtrole; apiadminfalse74312591683557charTABLECREATE TABLE "char" ( char_id integer NOT NULL, char_name text NOT NULL, char_items boolean, char_options boolean, char_attributes boolean, char_lotserial boolean, char_notes text, char_customers boolean, char_crmaccounts boolean, char_addresses boolean, char_contacts boolean, char_opportunity boolean, char_employees boolean DEFAULT false, char_mask text, char_validator text, char_incidents boolean DEFAULT false, char_type integer DEFAULT 0 NOT NULL, char_order integer DEFAULT 0 NOT NULL, char_search boolean DEFAULT true NOT NULL, CONSTRAINT char_char_name_check CHECK ((char_name <> ''::text)) ); DROP TABLE public."char"; publicadminfalse5961596259635964596559678"00 TABLE "char"COMMENT9COMMENT ON TABLE "char" IS 'Characteristic information'; publicadminfalse185 "00charACLREVOKE ALL ON TABLE "char" FROM PUBLIC; REVOKE ALL ON TABLE "char" FROM admin; GRANT ALL ON TABLE "char" TO admin; GRANT ALL ON TABLE "char" TO xtrole; publicadminfalse18512591683568charassTABLECREATE TABLE charass ( charass_id integer NOT NULL, charass_target_type text, charass_target_id integer, charass_char_id integer, charass_value text, charass_default boolean DEFAULT false NOT NULL, charass_price numeric(16,4) DEFAULT 0 NOT NULL ); DROP TABLE public.charass; publicadminfalse596959708!"00 TABLE charassCOMMENTECOMMENT ON TABLE charass IS 'Characteristic assignment information'; publicadminfalse186""00charassACLREVOKE ALL ON TABLE charass FROM PUBLIC; REVOKE ALL ON TABLE charass FROM admin; GRANT ALL ON TABLE charass TO admin; GRANT ALL ON TABLE charass TO xtrole; publicadminfalse18612592005779 accountcharVIEWCREATE VIEW accountchar AS SELECT (crmacct.crmacct_number)::character varying AS account_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.crmacct, public."char", public.charass WHERE ((('CRMACCT'::text = charass.charass_target_type) AND (crmacct.crmacct_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); DROP VIEW api.accountchar; apiadminfalse51686#"00VIEW accountcharCOMMENT:COMMENT ON VIEW accountchar IS 'Account Characteristics'; apiadminfalse744$"00 accountcharACLREVOKE ALL ON TABLE accountchar FROM PUBLIC; REVOKE ALL ON TABLE accountchar FROM admin; GRANT ALL ON TABLE accountchar TO admin; GRANT ALL ON TABLE accountchar TO xtrole; apiadminfalse74412591683580cmnttypeTABLEoCREATE TABLE cmnttype ( cmnttype_id integer NOT NULL, cmnttype_name text NOT NULL, cmnttype_descrip text NOT NULL, cmnttype_usedin text, cmnttype_sys boolean DEFAULT false NOT NULL, cmnttype_editable boolean DEFAULT false NOT NULL, cmnttype_order integer, CONSTRAINT cmnttype_cmnttype_name_check CHECK ((cmnttype_name <> ''::text)) ); DROP TABLE public.cmnttype; publicadminfalse5972597359748%"00TABLE cmnttypeCOMMENT9COMMENT ON TABLE cmnttype IS 'Comment Type information'; publicadminfalse187&"00cmnttypeACLREVOKE ALL ON TABLE cmnttype FROM PUBLIC; REVOKE ALL ON TABLE cmnttype FROM admin; GRANT ALL ON TABLE cmnttype TO admin; GRANT ALL ON TABLE cmnttype TO xtrole; publicadminfalse18712591683588commentTABLEFCREATE TABLE comment ( comment_id integer DEFAULT nextval(('"comment_comment_id_seq"'::text)::regclass) NOT NULL, comment_source_id integer, comment_date timestamp with time zone, comment_user text, comment_text text, comment_cmnttype_id integer, comment_source text, comment_public boolean ); DROP TABLE public.comment; publicadminfalse59758'"00 TABLE commentCOMMENT3COMMENT ON TABLE comment IS 'Comment information'; publicadminfalse188("00commentACLREVOKE ALL ON TABLE comment FROM PUBLIC; REVOKE ALL ON TABLE comment FROM admin; GRANT ALL ON TABLE comment TO admin; GRANT ALL ON TABLE comment TO xtrole; publicadminfalse18812592005786accountcommentVIEWCREATE VIEW accountcomment AS SELECT (crmacct.crmacct_number)::character varying AS account_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.crmacct, public.cmnttype, public.comment WHERE (((comment.comment_source = 'CRMA'::text) AND (comment.comment_source_id = crmacct.crmacct_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.accountcomment; apiadminfalse51726)"00VIEW accountcommentCOMMENT5COMMENT ON VIEW accountcomment IS 'Account Comment'; apiadminfalse745*"00accountcommentACLREVOKE ALL ON TABLE accountcomment FROM PUBLIC; REVOKE ALL ON TABLE accountcomment FROM admin; GRANT ALL ON TABLE accountcomment TO admin; GRANT ALL ON TABLE accountcomment TO xtrole; apiadminfalse74512591683599docassTABLEsCREATE TABLE docass ( docass_id integer NOT NULL, docass_source_id integer NOT NULL, docass_source_type text NOT NULL, docass_target_id integer NOT NULL, docass_target_type text DEFAULT 'URL'::text NOT NULL, docass_purpose character(1) DEFAULT 'S'::bpchar NOT NULL, CONSTRAINT docass_docass_purpose_check CHECK (((((((((docass_purpose = 'I'::bpchar) OR (docass_purpose = 'E'::bpchar)) OR (docass_purpose = 'M'::bpchar)) OR (docass_purpose = 'P'::bpchar)) OR (docass_purpose = 'A'::bpchar)) OR (docass_purpose = 'C'::bpchar)) OR (docass_purpose = 'S'::bpchar)) OR (docass_purpose = 'D'::bpchar))) ); DROP TABLE public.docass; publicadminfalse5977597859798+"00 TABLE docassCOMMENT>COMMENT ON TABLE docass IS 'Document Assignement References'; publicadminfalse189,"00docassACLREVOKE ALL ON TABLE docass FROM PUBLIC; REVOKE ALL ON TABLE docass FROM admin; GRANT ALL ON TABLE docass TO admin; GRANT ALL ON TABLE docass TO xtrole; publicadminfalse18912591683608fileTABLECREATE TABLE file ( file_id integer NOT NULL, file_title text NOT NULL, file_stream bytea, file_descrip text NOT NULL ); DROP TABLE public.file; publicadminfalse8-"00fileACLREVOKE ALL ON TABLE file FROM PUBLIC; REVOKE ALL ON TABLE file FROM admin; GRANT ALL ON TABLE file TO admin; GRANT ALL ON TABLE file TO xtrole; publicadminfalse19012591683614urlinfoTABLEnCREATE TABLE urlinfo ( url_id integer NOT NULL, url_title text NOT NULL, url_url text NOT NULL ); DROP TABLE public.urlinfo; publicadminfalse8."00urlinfoACLREVOKE ALL ON TABLE urlinfo FROM PUBLIC; REVOKE ALL ON TABLE urlinfo FROM admin; GRANT ALL ON TABLE urlinfo TO admin; GRANT ALL ON TABLE urlinfo TO xtrole; publicadminfalse19112591683620urlVIEWCREATE VIEW url AS SELECT docass.docass_id AS url_id, docass.docass_source_id AS url_source_id, docass.docass_source_type AS url_source, file.file_title AS url_title, file.file_descrip AS url_url, file.file_stream AS url_stream FROM (file JOIN docass ON (((docass.docass_target_id = file.file_id) AND (docass.docass_target_type = 'FILE'::text)))) UNION ALL SELECT docass.docass_id AS url_id, docass.docass_source_id AS url_source_id, docass.docass_source_type AS url_source, urlinfo.url_title, urlinfo.url_url, NULL::unknown AS url_stream FROM (urlinfo JOIN docass ON (((docass.docass_target_id = urlinfo.url_id) AND (docass.docass_target_type = 'URL'::text)))); DROP VIEW public.url; publicadminfalse51368/"00urlACLREVOKE ALL ON TABLE url FROM PUBLIC; REVOKE ALL ON TABLE url FROM admin; GRANT ALL ON TABLE url TO admin; GRANT ALL ON TABLE url TO xtrole; publicadminfalse19212592005793 accountfileVIEWCREATE VIEW accountfile AS SELECT crmacct.crmacct_number AS account_number, url.url_title AS title, url.url_url AS url FROM public.crmacct, public.url WHERE ((crmacct.crmacct_id = url.url_source_id) AND (url.url_source = 'CRMA'::text)); DROP VIEW api.accountfile; apiadminfalse517660"00VIEW accountfileCOMMENT/COMMENT ON VIEW accountfile IS 'Account File'; apiadminfalse7461"00 accountfileACLREVOKE ALL ON TABLE accountfile FROM PUBLIC; REVOKE ALL ON TABLE accountfile FROM admin; GRANT ALL ON TABLE accountfile TO admin; GRANT ALL ON TABLE accountfile TO xtrole; apiadminfalse74612591683629docass_docass_id_seqSEQUENCEvCREATE SEQUENCE docass_docass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.docass_docass_id_seq; publicadminfalse81892"00docass_docass_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE docass_docass_id_seq OWNED BY docass.docass_id; publicadminfalse1933"00docass_docass_id_seq SEQUENCE SET;SELECT pg_catalog.setval('docass_docass_id_seq', 7, true); publicadminfalse1934"00docass_docass_id_seqACLREVOKE ALL ON SEQUENCE docass_docass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE docass_docass_id_seq FROM admin; GRANT ALL ON SEQUENCE docass_docass_id_seq TO admin; GRANT ALL ON SEQUENCE docass_docass_id_seq TO xtrole; publicadminfalse19312591683631imageTABLECREATE TABLE image ( image_id integer DEFAULT nextval(('"image_image_id_seq"'::text)::regclass) NOT NULL, image_name text, image_descrip text, image_data text ); DROP TABLE public.image; publicadminfalse598285"00 TABLE imageCOMMENT/COMMENT ON TABLE image IS 'Image information'; publicadminfalse1946"00imageACLREVOKE ALL ON TABLE image FROM PUBLIC; REVOKE ALL ON TABLE image FROM admin; GRANT ALL ON TABLE image TO admin; GRANT ALL ON TABLE image TO xtrole; publicadminfalse19412591683638imageassTABLEqCREATE TABLE imageass ( imageass_id integer DEFAULT nextval('docass_docass_id_seq'::regclass) NOT NULL, imageass_source_id integer NOT NULL, imageass_source text NOT NULL, imageass_image_id integer NOT NULL, imageass_purpose character(1) NOT NULL, CONSTRAINT imageass_imageass_purpose_check CHECK (((((((((imageass_purpose = 'I'::bpchar) OR (imageass_purpose = 'E'::bpchar)) OR (imageass_purpose = 'M'::bpchar)) OR (imageass_purpose = 'P'::bpchar)) OR (imageass_purpose = 'A'::bpchar)) OR (imageass_purpose = 'C'::bpchar)) OR (imageass_purpose = 'D'::bpchar)) OR (imageass_purpose = 'S'::bpchar))) ); DROP TABLE public.imageass; publicadminfalse5983598487"00TABLE imageassCOMMENT=COMMENT ON TABLE imageass IS 'Image Assignement References'; publicadminfalse1958"00imageassACLREVOKE ALL ON TABLE imageass FROM PUBLIC; REVOKE ALL ON TABLE imageass FROM admin; GRANT ALL ON TABLE imageass TO admin; GRANT ALL ON TABLE imageass TO xtrole; publicadminfalse19512592005800 accountimageVIEW3CREATE VIEW accountimage AS SELECT crmacct.crmacct_number AS account_number, image.image_name FROM public.crmacct, public.imageass, public.image WHERE (((crmacct.crmacct_id = imageass.imageass_source_id) AND (imageass.imageass_source = 'CRMA'::text)) AND (imageass.imageass_image_id = image.image_id)); DROP VIEW api.accountimage; apiadminfalse518069"00VIEW accountimageCOMMENT1COMMENT ON VIEW accountimage IS 'Account Image'; apiadminfalse747:"00 accountimageACLREVOKE ALL ON TABLE accountimage FROM PUBLIC; REVOKE ALL ON TABLE accountimage FROM admin; GRANT ALL ON TABLE accountimage TO admin; GRANT ALL ON TABLE accountimage TO xtrole; apiadminfalse74712592005807addressVIEWCREATE VIEW address AS SELECT (addr.addr_number)::character varying AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postal_code, addr.addr_country AS country, addr.addr_active AS active, addr.addr_notes AS notes, ''::text AS change FROM public.addr; DROP VIEW api.address; apiadminfalse51846;"00 VIEW addressCOMMENT&COMMENT ON VIEW address IS 'Address'; apiadminfalse748<"00addressACLREVOKE ALL ON TABLE address FROM PUBLIC; REVOKE ALL ON TABLE address FROM admin; GRANT ALL ON TABLE address TO admin; GRANT ALL ON TABLE address TO xtrole; apiadminfalse74812592005814 addresscharVIEW}CREATE VIEW addresschar AS SELECT (addr.addr_number)::character varying AS address_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.addr, public."char", public.charass WHERE ((('ADDR'::text = charass.charass_target_type) AND (addr.addr_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); DROP VIEW api.addresschar; apiadminfalse51886="00VIEW addresscharCOMMENT:COMMENT ON VIEW addresschar IS 'Address Characteristics'; apiadminfalse749>"00 addresscharACLREVOKE ALL ON TABLE addresschar FROM PUBLIC; REVOKE ALL ON TABLE addresschar FROM admin; GRANT ALL ON TABLE addresschar TO admin; GRANT ALL ON TABLE addresschar TO xtrole; apiadminfalse74912592005821addresscommentVIEWCREATE VIEW addresscomment AS SELECT (addr.addr_number)::character varying AS address_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.addr, public.cmnttype, public.comment WHERE (((comment.comment_source = 'ADDR'::text) AND (comment.comment_source_id = addr.addr_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.addresscomment; apiadminfalse51926?"00VIEW addresscommentCOMMENT5COMMENT ON VIEW addresscomment IS 'Address Comment'; apiadminfalse750@"00addresscommentACLREVOKE ALL ON TABLE addresscomment FROM PUBLIC; REVOKE ALL ON TABLE addresscomment FROM admin; GRANT ALL ON TABLE addresscomment TO admin; GRANT ALL ON TABLE addresscomment TO xtrole; apiadminfalse75012591683662bomheadTABLECREATE TABLE bomhead ( bomhead_id integer DEFAULT nextval(('"bomhead_bomhead_id_seq"'::text)::regclass) NOT NULL, bomhead_item_id integer NOT NULL, bomhead_serial integer, bomhead_docnum text, bomhead_revision text, bomhead_revisiondate date, bomhead_batchsize numeric(18,6), bomhead_requiredqtyper numeric(20,8), bomhead_rev_id integer DEFAULT (-1), CONSTRAINT bomhead_bomhead_batchsize_check CHECK ((bomhead_batchsize > (0)::numeric)) ); DROP TABLE public.bomhead; publicadminfalse5985598659878A"00 TABLE bomheadCOMMENTJCOMMENT ON TABLE bomhead IS 'Bill of Materials (BOM) header information'; publicadminfalse196B"00bomheadACLREVOKE ALL ON TABLE bomhead FROM PUBLIC; REVOKE ALL ON TABLE bomhead FROM admin; GRANT ALL ON TABLE bomhead TO admin; GRANT ALL ON TABLE bomhead TO xtrole; publicadminfalse19612592005831bomVIEWCREATE VIEW bom AS SELECT (item.item_number)::character varying AS item_number, (bomhead.bomhead_revision)::character varying AS revision, bomhead.bomhead_docnum AS document_number, bomhead.bomhead_revisiondate AS revision_date, bomhead.bomhead_batchsize AS batch_size, bomhead.bomhead_requiredqtyper AS total_qty_per FROM public.bomhead, public.item WHERE (bomhead.bomhead_item_id = item.item_id); DROP VIEW api.bom; apiadminfalse51966C"00VIEW bomCOMMENT2COMMENT ON VIEW bom IS 'Bill of Material Header'; apiadminfalse751D"00bomACLREVOKE ALL ON TABLE bom FROM PUBLIC; REVOKE ALL ON TABLE bom FROM admin; GRANT ALL ON TABLE bom TO admin; GRANT ALL ON TABLE bom TO xtrole; apiadminfalse75112592005838bomitemVIEWCREATE VIEW bomitem AS SELECT bomitem.bomitem_id AS id, (p.item_number)::character varying AS bom_item_number, (bomhead.bomhead_revision)::character varying AS bom_revision, bomitem.bomitem_seqnumber AS sequence_number, i.item_number, CASE WHEN (bomitem.bomitem_effective = public.startoftime()) THEN 'Always'::text ELSE public.formatdate(bomitem.bomitem_effective) END AS effective, CASE WHEN (bomitem.bomitem_expires = public.endoftime()) THEN 'Never'::text ELSE public.formatdate(bomitem.bomitem_expires) END AS expires, bomitem.bomitem_qtyper AS qty_per, uom.uom_name AS issue_uom, bomitem.bomitem_scrap AS scrap, bomitem.bomitem_createwo AS create_child_wo, CASE WHEN (bomitem.bomitem_issuemethod = 'M'::bpchar) THEN 'Mixed'::text WHEN (bomitem.bomitem_issuemethod = 'L'::bpchar) THEN 'Pull'::text WHEN (bomitem.bomitem_issuemethod = 'S'::bpchar) THEN 'Push'::text ELSE NULL::text END AS issue_method, public.formatbooseq(p.item_id, bomitem.bomitem_booitem_seq_id) AS used_at, bomitem.bomitem_schedatwooper AS schedule_at_wo_operation, bomitem.bomitem_ecn AS ecn_number, bomitem.bomitem_notes AS notes, bomitem.bomitem_ref AS reference, CASE WHEN (bomitem.bomitem_subtype = 'N'::bpchar) THEN 'No'::text WHEN (bomitem.bomitem_subtype = 'I'::bpchar) THEN 'Item-Defined'::text WHEN (bomitem.bomitem_subtype = 'B'::bpchar) THEN 'BOM-Defined'::text ELSE NULL::text END AS substitutions, "char".char_name AS characteristic, bomitem.bomitem_value AS value FROM ((public.bomitem LEFT JOIN public.bomhead ON (((bomitem.bomitem_parent_item_id = bomhead.bomhead_item_id) AND (bomitem.bomitem_rev_id = bomhead.bomhead_rev_id)))) LEFT JOIN public."char" ON ((bomitem.bomitem_char_id = "char".char_id))), public.item p, public.item i, public.uom WHERE (((bomitem.bomitem_parent_item_id = p.item_id) AND (bomitem.bomitem_item_id = i.item_id)) AND (bomitem.bomitem_uom_id = uom.uom_id)) ORDER BY p.item_number, bomitem.bomitem_seqnumber; DROP VIEW api.bomitem; apiadminfalse52006E"00 VIEW bomitemCOMMENT4COMMENT ON VIEW bomitem IS 'Bill of Material Item'; apiadminfalse752F"00bomitemACLREVOKE ALL ON TABLE bomitem FROM PUBLIC; REVOKE ALL ON TABLE bomitem FROM admin; GRANT ALL ON TABLE bomitem TO admin; GRANT ALL ON TABLE bomitem TO xtrole; apiadminfalse75212592005848bomitemcommentVIEWCREATE VIEW bomitemcomment AS SELECT bomitem.bomitem_id, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM (public.bomitem LEFT JOIN public.bomhead ON (((bomitem.bomitem_parent_item_id = bomhead.bomhead_item_id) AND (bomitem.bomitem_rev_id = bomhead.bomhead_rev_id)))), public.item, public.cmnttype, public.comment WHERE ((((comment.comment_source = 'BMI'::text) AND (comment.comment_source_id = bomitem.bomitem_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)) AND (bomitem.bomitem_parent_item_id = item.item_id)) ORDER BY item.item_number, bomhead.bomhead_revision, bomitem.bomitem_seqnumber, comment.comment_date; DROP VIEW api.bomitemcomment; apiadminfalse52046G"00VIEW bomitemcommentCOMMENT>COMMENT ON VIEW bomitemcomment IS 'Bill of Material Comment'; apiadminfalse753H"00bomitemcommentACLREVOKE ALL ON TABLE bomitemcomment FROM PUBLIC; REVOKE ALL ON TABLE bomitemcomment FROM admin; GRANT ALL ON TABLE bomitemcomment TO admin; GRANT ALL ON TABLE bomitemcomment TO xtrole; apiadminfalse75312591683685 bomitemsubTABLECREATE TABLE bomitemsub ( bomitemsub_id integer NOT NULL, bomitemsub_bomitem_id integer NOT NULL, bomitemsub_item_id integer NOT NULL, bomitemsub_uomratio numeric(20,10) NOT NULL, bomitemsub_rank integer NOT NULL ); DROP TABLE public.bomitemsub; publicadminfalse8I"00TABLE bomitemsubCOMMENT\COMMENT ON TABLE bomitemsub IS 'Bill of Materials (BOM) defined Substitutions information'; publicadminfalse197J"00 bomitemsubACLREVOKE ALL ON TABLE bomitemsub FROM PUBLIC; REVOKE ALL ON TABLE bomitemsub FROM admin; GRANT ALL ON TABLE bomitemsub TO admin; GRANT ALL ON TABLE bomitemsub TO xtrole; publicadminfalse19712592005856bomitemsubstituteVIEWCREATE VIEW bomitemsubstitute AS SELECT bomitem.bomitem_id, (p.item_number)::character varying AS bom_item_number, (bomhead.bomhead_revision)::character varying AS bom_revision, bomitem.bomitem_seqnumber AS sequence_number, (s.item_number)::character varying AS substitute_item_number, bomitemsub.bomitemsub_uomratio AS sub_parent_uom_ratio, bomitemsub.bomitemsub_rank AS ranking FROM public.item p, public.item s, (public.bomitem LEFT JOIN public.bomhead ON (((bomitem.bomitem_parent_item_id = bomhead.bomhead_item_id) AND (bomitem.bomitem_rev_id = bomhead.bomhead_rev_id)))), public.bomitemsub WHERE (((p.item_id = bomitem.bomitem_parent_item_id) AND (s.item_id = bomitemsub.bomitemsub_item_id)) AND (bomitemsub.bomitemsub_bomitem_id = bomitem.bomitem_id)); !DROP VIEW api.bomitemsubstitute; apiadminfalse52086K"00VIEW bomitemsubstituteCOMMENTICOMMENT ON VIEW bomitemsubstitute IS 'Bill of Material Item Substitute'; apiadminfalse754L"00bomitemsubstituteACLREVOKE ALL ON TABLE bomitemsubstitute FROM PUBLIC; REVOKE ALL ON TABLE bomitemsubstitute FROM admin; GRANT ALL ON TABLE bomitemsubstitute TO admin; GRANT ALL ON TABLE bomitemsubstitute TO xtrole; apiadminfalse75412591683693budgheadTABLECREATE TABLE budghead ( budghead_id integer NOT NULL, budghead_name text NOT NULL, budghead_descrip text, CONSTRAINT budghead_budghead_name_check CHECK ((budghead_name <> ''::text)) ); DROP TABLE public.budghead; publicadminfalse59908M"00budgheadACLREVOKE ALL ON TABLE budghead FROM PUBLIC; REVOKE ALL ON TABLE budghead FROM admin; GRANT ALL ON TABLE budghead TO admin; GRANT ALL ON TABLE budghead TO xtrole; publicadminfalse19812592005864budgetVIEWCREATE VIEW budget AS SELECT budghead.budghead_name AS name, budghead.budghead_descrip AS description FROM public.budghead ORDER BY budghead.budghead_name; DROP VIEW api.budget; apiadminfalse52126N"00 VIEW budgetCOMMENT+COMMENT ON VIEW budget IS 'Budget Header'; apiadminfalse755O"00budgetACLREVOKE ALL ON TABLE budget FROM PUBLIC; REVOKE ALL ON TABLE budget FROM admin; GRANT ALL ON TABLE budget TO admin; GRANT ALL ON TABLE budget TO xtrole; apiadminfalse75512591683703accntTABLEyCREATE TABLE accnt ( accnt_id integer DEFAULT nextval(('accnt_accnt_id_seq'::text)::regclass) NOT NULL, accnt_number text, accnt_descrip text, accnt_comments text, accnt_profit text, accnt_sub text, accnt_type character(1) NOT NULL, accnt_extref text, accnt_company text, accnt_forwardupdate boolean, accnt_subaccnttype_code text, accnt_curr_id integer DEFAULT basecurrid(), accnt_active boolean DEFAULT true NOT NULL, accnt_name text, CONSTRAINT accnt_accnt_type_check CHECK ((accnt_type = ANY (ARRAY['A'::bpchar, 'E'::bpchar, 'L'::bpchar, 'Q'::bpchar, 'R'::bpchar]))) ); DROP TABLE public.accnt; publicadminfalse59915992599359948P"00 TABLE accntCOMMENTMCOMMENT ON TABLE accnt IS 'General Ledger (G/L) Account Number information'; publicadminfalse199Q"00accntACLREVOKE ALL ON TABLE accnt FROM PUBLIC; REVOKE ALL ON TABLE accnt FROM admin; GRANT ALL ON TABLE accnt TO admin; GRANT ALL ON TABLE accnt TO xtrole; publicadminfalse19912591683713budgitemTABLECREATE TABLE budgitem ( budgitem_id integer NOT NULL, budgitem_budghead_id integer NOT NULL, budgitem_period_id integer NOT NULL, budgitem_accnt_id integer NOT NULL, budgitem_amount numeric(20,4) NOT NULL ); DROP TABLE public.budgitem; publicadminfalse8R"00budgitemACLREVOKE ALL ON TABLE budgitem FROM PUBLIC; REVOKE ALL ON TABLE budgitem FROM admin; GRANT ALL ON TABLE budgitem TO admin; GRANT ALL ON TABLE budgitem TO xtrole; publicadminfalse20012591683716periodTABLE<CREATE TABLE period ( period_id integer NOT NULL, period_start date, period_end date, period_closed boolean, period_freeze boolean, period_initial boolean DEFAULT false, period_name text, period_yearperiod_id integer, period_quarter integer, period_number integer NOT NULL ); DROP TABLE public.period; publicadminfalse59978S"00 TABLE periodCOMMENT<COMMENT ON TABLE period IS 'Accounting Period information'; publicadminfalse201T"00periodACLREVOKE ALL ON TABLE period FROM PUBLIC; REVOKE ALL ON TABLE period FROM admin; GRANT ALL ON TABLE period TO admin; GRANT ALL ON TABLE period TO xtrole; publicadminfalse20112592005871 budgetentryVIEWCREATE VIEW budgetentry AS SELECT budghead.budghead_name AS name, public.formatglaccount(accnt.accnt_id) AS account, period.period_start, budgitem.budgitem_amount AS amount FROM public.budgitem, public.budghead, public.period, public.accnt WHERE (((budgitem.budgitem_budghead_id = budghead.budghead_id) AND (budgitem.budgitem_period_id = period.period_id)) AND (budgitem.budgitem_accnt_id = accnt.accnt_id)) ORDER BY budghead.budghead_name, period.period_start, public.formatglaccount(accnt.accnt_id); DROP VIEW api.budgetentry; apiadminfalse52166U"00VIEW budgetentryCOMMENT/COMMENT ON VIEW budgetentry IS 'Budget Entry'; apiadminfalse756V"00 budgetentryACLREVOKE ALL ON TABLE budgetentry FROM PUBLIC; REVOKE ALL ON TABLE budgetentry FROM admin; GRANT ALL ON TABLE budgetentry TO admin; GRANT ALL ON TABLE budgetentry TO xtrole; apiadminfalse75612591683727 bankaccntTABLEvCREATE TABLE bankaccnt ( bankaccnt_id integer NOT NULL, bankaccnt_name text NOT NULL, bankaccnt_descrip text, bankaccnt_bankname text, bankaccnt_accntnumber text, bankaccnt_ar boolean, bankaccnt_ap boolean, bankaccnt_nextchknum integer, bankaccnt_type character(1), bankaccnt_accnt_id integer, bankaccnt_check_form_id integer, bankaccnt_userec boolean, bankaccnt_rec_accnt_id integer, bankaccnt_curr_id integer DEFAULT basecurrid(), bankaccnt_notes text, bankaccnt_routing text DEFAULT ''::text NOT NULL, bankaccnt_ach_enabled boolean DEFAULT false NOT NULL, bankaccnt_ach_origin text DEFAULT ''::text NOT NULL, bankaccnt_ach_genchecknum boolean DEFAULT false NOT NULL, bankaccnt_ach_leadtime integer, bankaccnt_ach_lastdate date, bankaccnt_ach_lastfileid character(1), bankaccnt_ach_origintype text, bankaccnt_ach_originname text, bankaccnt_ach_desttype text, bankaccnt_ach_fed_dest text, bankaccnt_ach_destname text, bankaccnt_ach_dest text, CONSTRAINT bankaccnt_bankaccnt_name_check CHECK ((bankaccnt_name <> ''::text)) ); DROP TABLE public.bankaccnt; publicadminfalse5998599960006001600260048W"00TABLE bankaccntCOMMENT:COMMENT ON TABLE bankaccnt IS 'Bank Account information'; publicadminfalse202X"00 bankaccntACLREVOKE ALL ON TABLE bankaccnt FROM PUBLIC; REVOKE ALL ON TABLE bankaccnt FROM admin; GRANT ALL ON TABLE bankaccnt TO admin; GRANT ALL ON TABLE bankaccnt TO xtrole; publicadminfalse20212591683738cashrcptTABLECREATE TABLE cashrcpt ( cashrcpt_id integer NOT NULL, cashrcpt_cust_id integer NOT NULL, cashrcpt_amount numeric(20,2) NOT NULL, cashrcpt_fundstype character(1) NOT NULL, cashrcpt_docnumber text, cashrcpt_bankaccnt_id integer NOT NULL, cashrcpt_notes text, cashrcpt_distdate date DEFAULT ('now'::text)::date, cashrcpt_salescat_id integer DEFAULT (-1), cashrcpt_curr_id integer DEFAULT basecurrid(), cashrcpt_usecustdeposit boolean DEFAULT false NOT NULL, cashrcpt_void boolean DEFAULT false NOT NULL, cashrcpt_number text NOT NULL, cashrcpt_docdate date, cashrcpt_posted boolean DEFAULT false NOT NULL, cashrcpt_posteddate date, cashrcpt_postedby text, cashrcpt_applydate date, cashrcpt_discount numeric(20,2) DEFAULT 0.00 NOT NULL, cashrcpt_curr_rate numeric NOT NULL, CONSTRAINT cashrcpt_cashrcpt_number_check CHECK ((cashrcpt_number <> ''::text)) ); DROP TABLE public.cashrcpt; publicadminfalse600560066007600860096010601160138Y"00TABLE cashrcptCOMMENTuCOMMENT ON TABLE cashrcpt IS 'Temporary table for storing Cash Receipt information before Cash Receipts are posted'; publicadminfalse203Z"00cashrcptACLREVOKE ALL ON TABLE cashrcpt FROM PUBLIC; REVOKE ALL ON TABLE cashrcpt FROM admin; GRANT ALL ON TABLE cashrcpt TO admin; GRANT ALL ON TABLE cashrcpt TO xtrole; publicadminfalse20312592005878 cashreceiptVIEWCREATE VIEW cashreceipt AS SELECT (custinfo.cust_number)::character varying AS customer_number, CASE WHEN (cashrcpt.cashrcpt_fundstype = 'C'::bpchar) THEN 'Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'T'::bpchar) THEN 'Certified Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'M'::bpchar) THEN 'Master Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'V'::bpchar) THEN 'Visa'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'A'::bpchar) THEN 'American Express'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'D'::bpchar) THEN 'Discover Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'R'::bpchar) THEN 'Other Credit Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'K'::bpchar) THEN 'Cash'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'W'::bpchar) THEN 'Wire Transfer'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'O'::bpchar) THEN 'Other'::character varying ELSE NULL::character varying END AS funds_type, (cashrcpt.cashrcpt_docnumber)::character varying AS check_document_number, custinfo.cust_name AS customer_name, m.addr_line1 AS customer_address, curr_symbol.curr_abbr AS currency, cashrcpt.cashrcpt_amount AS amount_received, bankaccnt.bankaccnt_name AS post_to, public.formatdate(cashrcpt.cashrcpt_distdate) AS distribution_date, CASE WHEN cashrcpt.cashrcpt_usecustdeposit THEN 'Customer Deposit'::text ELSE 'Credit Memo'::text END AS apply_balance_as, salescat.salescat_name AS sales_category, cashrcpt.cashrcpt_notes AS notes FROM ((((((public.cashrcpt LEFT JOIN public.custinfo ON ((custinfo.cust_id = cashrcpt.cashrcpt_cust_id))) LEFT JOIN public.cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN public.addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN public.curr_symbol ON ((curr_symbol.curr_id = cashrcpt.cashrcpt_curr_id))) LEFT JOIN public.bankaccnt ON ((bankaccnt.bankaccnt_id = cashrcpt.cashrcpt_bankaccnt_id))) LEFT JOIN public.salescat ON ((salescat.salescat_id = cashrcpt.cashrcpt_salescat_id))); DROP VIEW api.cashreceipt; apiadminfalse52206["00VIEW cashreceiptCOMMENTCOMMENT ON VIEW cashreceipt IS ' This view can be used as an interface to import Cash Receipt data directly into the system. Required fields will be checked and default values will be populated'; apiadminfalse757\"00 cashreceiptACLREVOKE ALL ON TABLE cashreceipt FROM PUBLIC; REVOKE ALL ON TABLE cashreceipt FROM admin; GRANT ALL ON TABLE cashreceipt TO admin; GRANT ALL ON TABLE cashreceipt TO xtrole; apiadminfalse75712591683756 cashrcptitemTABLE>CREATE TABLE cashrcptitem ( cashrcptitem_id integer NOT NULL, cashrcptitem_cashrcpt_id integer NOT NULL, cashrcptitem_aropen_id integer NOT NULL, cashrcptitem_amount numeric(20,2) NOT NULL, cashrcptitem_discount numeric(20,2) DEFAULT 0.00 NOT NULL, cashrcptitem_applied boolean DEFAULT true ); DROP TABLE public.cashrcptitem; publicadminfalse601560168]"00TABLE cashrcptitemCOMMENTCOMMENT ON TABLE cashrcptitem IS 'Temporary table for storing information about applications of Cash Receipts before Cash Receipts are posted'; publicadminfalse204^"00 cashrcptitemACLREVOKE ALL ON TABLE cashrcptitem FROM PUBLIC; REVOKE ALL ON TABLE cashrcptitem FROM admin; GRANT ALL ON TABLE cashrcptitem TO admin; GRANT ALL ON TABLE cashrcptitem TO xtrole; publicadminfalse20412592005889cashreceiptapplyVIEW CREATE VIEW cashreceiptapply AS SELECT (custinfo.cust_number)::character varying AS customer_number, CASE WHEN (cashrcpt.cashrcpt_fundstype = 'C'::bpchar) THEN 'Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'T'::bpchar) THEN 'Certified Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'M'::bpchar) THEN 'Master Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'V'::bpchar) THEN 'Visa'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'A'::bpchar) THEN 'American Express'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'D'::bpchar) THEN 'Discover Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'R'::bpchar) THEN 'Other Credit Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'K'::bpchar) THEN 'Cash'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'W'::bpchar) THEN 'Wire Transfer'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'O'::bpchar) THEN 'Other'::character varying ELSE NULL::character varying END AS funds_type, (cashrcpt.cashrcpt_docnumber)::character varying AS check_document_number, (aropen.aropen_doctype)::character varying AS doc_type, (aropen.aropen_docnumber)::character varying AS doc_number, custinfo.cust_name AS customer_name, m.addr_line1 AS customer_address, public.formatdate(aropen.aropen_docdate) AS doc_date, public.formatdate(aropen.aropen_duedate) AS due_date, curr_symbol.curr_abbr AS currency, aropen.aropen_amount AS open_amount, cashrcptitem.cashrcptitem_amount AS amount_to_apply, cashrcptitem.cashrcptitem_discount FROM ((((((public.cashrcptitem LEFT JOIN public.cashrcpt ON ((cashrcpt.cashrcpt_id = cashrcptitem.cashrcptitem_cashrcpt_id))) LEFT JOIN public.custinfo ON ((custinfo.cust_id = cashrcpt.cashrcpt_cust_id))) LEFT JOIN public.cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN public.addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN public.curr_symbol ON ((curr_symbol.curr_id = cashrcpt.cashrcpt_curr_id))) LEFT JOIN public.aropen ON ((aropen.aropen_id = cashrcptitem.cashrcptitem_aropen_id))); DROP VIEW api.cashreceiptapply; apiadminfalse52246_"00VIEW cashreceiptapplyCOMMENTCOMMENT ON VIEW cashreceiptapply IS ' This view can be used as an interface to import Cash Receipt Application data directly into the system. Required fields will be checked and default values will be populated'; apiadminfalse758`"00cashreceiptapplyACLREVOKE ALL ON TABLE cashreceiptapply FROM PUBLIC; REVOKE ALL ON TABLE cashreceiptapply FROM admin; GRANT ALL ON TABLE cashreceiptapply TO admin; GRANT ALL ON TABLE cashreceiptapply TO xtrole; apiadminfalse75812591683766 cashrcptmiscTABLECREATE TABLE cashrcptmisc ( cashrcptmisc_id integer NOT NULL, cashrcptmisc_cashrcpt_id integer NOT NULL, cashrcptmisc_accnt_id integer NOT NULL, cashrcptmisc_amount numeric(20,2) NOT NULL, cashrcptmisc_notes text ); DROP TABLE public.cashrcptmisc; publicadminfalse8a"00TABLE cashrcptmiscCOMMENTWCOMMENT ON TABLE cashrcptmisc IS 'Cash Receipt Miscellaneous Application information'; publicadminfalse205b"00 cashrcptmiscACLREVOKE ALL ON TABLE cashrcptmisc FROM PUBLIC; REVOKE ALL ON TABLE cashrcptmisc FROM admin; GRANT ALL ON TABLE cashrcptmisc TO admin; GRANT ALL ON TABLE cashrcptmisc TO xtrole; publicadminfalse20512592005899cashreceiptapplymiscVIEWCREATE VIEW cashreceiptapplymisc AS SELECT (custinfo.cust_number)::character varying AS customer_number, CASE WHEN (cashrcpt.cashrcpt_fundstype = 'C'::bpchar) THEN 'Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'T'::bpchar) THEN 'Certified Check'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'M'::bpchar) THEN 'Master Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'V'::bpchar) THEN 'Visa'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'A'::bpchar) THEN 'American Express'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'D'::bpchar) THEN 'Discover Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'R'::bpchar) THEN 'Other Credit Card'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'K'::bpchar) THEN 'Cash'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'W'::bpchar) THEN 'Wire Transfer'::character varying WHEN (cashrcpt.cashrcpt_fundstype = 'O'::bpchar) THEN 'Other'::character varying ELSE NULL::character varying END AS funds_type, (cashrcpt.cashrcpt_docnumber)::character varying AS check_document_number, (public.formatglaccount(accnt.accnt_id))::character varying AS account, custinfo.cust_name AS customer_name, m.addr_line1 AS customer_address, accnt.accnt_descrip AS account_description, curr_symbol.curr_abbr AS currency, cashrcptmisc.cashrcptmisc_amount AS amount_to_distribute, cashrcptmisc.cashrcptmisc_notes AS notes FROM ((((((public.cashrcptmisc LEFT JOIN public.cashrcpt ON ((cashrcpt.cashrcpt_id = cashrcptmisc.cashrcptmisc_cashrcpt_id))) LEFT JOIN public.custinfo ON ((custinfo.cust_id = cashrcpt.cashrcpt_cust_id))) LEFT JOIN public.cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN public.addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN public.curr_symbol ON ((curr_symbol.curr_id = cashrcpt.cashrcpt_curr_id))) LEFT JOIN public.accnt ON ((accnt.accnt_id = cashrcptmisc.cashrcptmisc_accnt_id))); $DROP VIEW api.cashreceiptapplymisc; apiadminfalse52286c"00VIEW cashreceiptapplymiscCOMMENTCOMMENT ON VIEW cashreceiptapplymisc IS ' This view can be used as an interface to import Cash Receipt Miscellaneous Application data directly into the system. Required fields will be checked and default values will be populated'; apiadminfalse759d"00cashreceiptapplymiscACLREVOKE ALL ON TABLE cashreceiptapplymisc FROM PUBLIC; REVOKE ALL ON TABLE cashreceiptapplymisc FROM admin; GRANT ALL ON TABLE cashreceiptapplymisc TO admin; GRANT ALL ON TABLE cashreceiptapplymisc TO xtrole; apiadminfalse75912592005909contactVIEWCREATE VIEW contact AS SELECT (cntct.cntct_number)::character varying AS contact_number, cntct.cntct_honorific AS honorific, cntct.cntct_first_name AS first, cntct.cntct_middle AS middle, cntct.cntct_last_name AS last, cntct.cntct_suffix AS suffix, cntct.cntct_initials AS initials, crmacct.crmacct_number AS crm_account, cntct.cntct_active AS active, cntct.cntct_title AS job_title, cntct.cntct_phone AS voice, cntct.cntct_phone2 AS alternate, cntct.cntct_fax AS fax, cntct.cntct_email AS email, cntct.cntct_webaddr AS web, ''::text AS contact_change, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postal_code, addr.addr_country AS country, cntct.cntct_notes AS notes, ''::text AS address_change FROM ((public.cntct LEFT JOIN public.addr ON ((cntct.cntct_addr_id = addr.addr_id))) LEFT JOIN public.crmacct ON ((cntct.cntct_crmacct_id = crmacct.crmacct_id))); DROP VIEW api.contact; apiadminfalse52326e"00 VIEW contactCOMMENT&COMMENT ON VIEW contact IS 'Contact'; apiadminfalse760f"00contactACLREVOKE ALL ON TABLE contact FROM PUBLIC; REVOKE ALL ON TABLE contact FROM admin; GRANT ALL ON TABLE contact TO admin; GRANT ALL ON TABLE contact TO xtrole; apiadminfalse76012592005917 contactcharVIEWnCREATE VIEW contactchar AS SELECT cntct.cntct_number AS contact_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.cntct, public."char", public.charass WHERE ((('CNTCT'::text = charass.charass_target_type) AND (cntct.cntct_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); DROP VIEW api.contactchar; apiadminfalse52366g"00VIEW contactcharCOMMENT:COMMENT ON VIEW contactchar IS 'Contact Characteristics'; apiadminfalse761h"00 contactcharACLREVOKE ALL ON TABLE contactchar FROM PUBLIC; REVOKE ALL ON TABLE contactchar FROM admin; GRANT ALL ON TABLE contactchar TO admin; GRANT ALL ON TABLE contactchar TO xtrole; apiadminfalse76112592005924contactcommentVIEWCREATE VIEW contactcomment AS SELECT cntct.cntct_number AS contact_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.cntct, public.cmnttype, public.comment WHERE (((comment.comment_source = 'T'::text) AND (comment.comment_source_id = cntct.cntct_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.contactcomment; apiadminfalse52406i"00VIEW contactcommentCOMMENT5COMMENT ON VIEW contactcomment IS 'Contact Comment'; apiadminfalse762j"00contactcommentACLREVOKE ALL ON TABLE contactcomment FROM PUBLIC; REVOKE ALL ON TABLE contactcomment FROM admin; GRANT ALL ON TABLE contactcomment TO admin; GRANT ALL ON TABLE contactcomment TO xtrole; apiadminfalse76212592005951custcharVIEWCREATE VIEW custchar AS SELECT (custinfo.cust_number)::character varying AS customer_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.custinfo, public."char", public.charass WHERE ((('C'::text = charass.charass_target_type) AND (custinfo.cust_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); DROP VIEW api.custchar; apiadminfalse52526k"00 VIEW custcharCOMMENT8COMMENT ON VIEW custchar IS 'Customer Characteristics'; apiadminfalse765l"00custcharACLREVOKE ALL ON TABLE custchar FROM PUBLIC; REVOKE ALL ON TABLE custchar FROM admin; GRANT ALL ON TABLE custchar TO admin; GRANT ALL ON TABLE custchar TO xtrole; apiadminfalse76512592005958 custcommentVIEWCREATE VIEW custcomment AS SELECT (custinfo.cust_number)::character varying AS customer_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.custinfo, public.cmnttype, public.comment WHERE (((comment.comment_source = 'C'::text) AND (comment.comment_source_id = custinfo.cust_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.custcomment; apiadminfalse52566m"00VIEW custcommentCOMMENT3COMMENT ON VIEW custcomment IS 'Customer Comment'; apiadminfalse766n"00 custcommentACLREVOKE ALL ON TABLE custcomment FROM PUBLIC; REVOKE ALL ON TABLE custcomment FROM admin; GRANT ALL ON TABLE custcomment TO admin; GRANT ALL ON TABLE custcomment TO xtrole; apiadminfalse76612591683798ccardTABLEgCREATE TABLE ccard ( ccard_id integer NOT NULL, ccard_seq integer DEFAULT 10 NOT NULL, ccard_cust_id integer NOT NULL, ccard_active boolean DEFAULT true, ccard_name bytea, ccard_address1 bytea, ccard_address2 bytea, ccard_city bytea, ccard_state bytea, ccard_zip bytea, ccard_country bytea, ccard_number bytea, ccard_debit boolean DEFAULT false, ccard_month_expired bytea, ccard_year_expired bytea, ccard_type character(1) NOT NULL, ccard_date_added timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, ccard_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, ccard_added_by_username text DEFAULT geteffectivextuser() NOT NULL, ccard_last_updated_by_username text DEFAULT geteffectivextuser() NOT NULL ); DROP TABLE public.ccard; publicadminfalse60186019602060216022602360248o"00 TABLE ccardCOMMENTSCOMMENT ON TABLE ccard IS 'Credit Card Information - all bytea data is encrypted'; publicadminfalse206p"00ccardACLREVOKE ALL ON TABLE ccard FROM PUBLIC; REVOKE ALL ON TABLE ccard FROM admin; GRANT ALL ON TABLE ccard TO admin; GRANT ALL ON TABLE ccard TO xtrole; publicadminfalse20612592005965custcreditcardVIEWCREATE VIEW custcreditcard AS SELECT (custinfo.cust_number)::character varying AS customer_number, CASE WHEN (ccard.ccard_type = 'V'::bpchar) THEN 'Visa'::text WHEN (ccard.ccard_type = 'M'::bpchar) THEN 'Master Card'::text WHEN (ccard.ccard_type = 'A'::bpchar) THEN 'American Express'::text WHEN (ccard.ccard_type = 'D'::bpchar) THEN 'Discover'::text ELSE 'Not Supported'::text END AS credit_card_type, ccard.ccard_active AS active, ccard.ccard_number AS credit_card_number, ccard.ccard_name AS name, ccard.ccard_address1 AS street_address1, ccard.ccard_address2 AS street_address2, ccard.ccard_city AS city, ccard.ccard_state AS state, ccard.ccard_zip AS postal_code, ccard.ccard_country AS country, ccard.ccard_month_expired AS expiration_month, ccard.ccard_year_expired AS expiration_year, ''::text AS key FROM public.ccard, public.custinfo WHERE (ccard.ccard_cust_id = custinfo.cust_id); DROP VIEW api.custcreditcard; apiadminfalse52606q"00VIEW custcreditcardCOMMENT<COMMENT ON VIEW custcreditcard IS 'Customer Credit Cards.'; apiadminfalse767r"00custcreditcardACLREVOKE ALL ON TABLE custcreditcard FROM PUBLIC; REVOKE ALL ON TABLE custcreditcard FROM admin; GRANT ALL ON TABLE custcreditcard TO admin; GRANT ALL ON TABLE custcreditcard TO xtrole; apiadminfalse76712591683816custtypeTABLEBCREATE TABLE custtype ( custtype_id integer DEFAULT nextval(('custtype_custtype_id_seq'::text)::regclass) NOT NULL, custtype_code text NOT NULL, custtype_descrip text NOT NULL, custtype_char boolean DEFAULT false NOT NULL, CONSTRAINT custtype_custtype_code_check CHECK ((custtype_code <> ''::text)) ); DROP TABLE public.custtype; publicadminfalse6026602760288s"00TABLE custtypeCOMMENT:COMMENT ON TABLE custtype IS 'Customer Type information'; publicadminfalse207t"00custtypeACLREVOKE ALL ON TABLE custtype FROM PUBLIC; REVOKE ALL ON TABLE custtype FROM admin; GRANT ALL ON TABLE custtype TO admin; GRANT ALL ON TABLE custtype TO xtrole; publicadminfalse20712591683824shipchrgTABLECREATE TABLE shipchrg ( shipchrg_id integer NOT NULL, shipchrg_name text NOT NULL, shipchrg_descrip text, shipchrg_custfreight boolean, shipchrg_handling character(1), CONSTRAINT shipchrg_shipchrg_name_check CHECK ((shipchrg_name <> ''::text)) ); DROP TABLE public.shipchrg; publicadminfalse60308u"00TABLE shipchrgCOMMENT<COMMENT ON TABLE shipchrg IS 'Shipping Charge information'; publicadminfalse208v"00shipchrgACLREVOKE ALL ON TABLE shipchrg FROM PUBLIC; REVOKE ALL ON TABLE shipchrg FROM admin; GRANT ALL ON TABLE shipchrg TO admin; GRANT ALL ON TABLE shipchrg TO xtrole; publicadminfalse20812591683830shipformTABLE-CREATE TABLE shipform ( shipform_id integer DEFAULT nextval(('"shipform_shipform_id_seq"'::text)::regclass) NOT NULL, shipform_name text NOT NULL, shipform_report_id integer, shipform_report_name text, CONSTRAINT shipform_shipform_name_check CHECK ((shipform_name <> ''::text)) ); DROP TABLE public.shipform; publicadminfalse603160328w"00TABLE shipformCOMMENT:COMMENT ON TABLE shipform IS 'Shipping Form information'; publicadminfalse209x"00"COLUMN shipform.shipform_report_idCOMMENThCOMMENT ON COLUMN shipform.shipform_report_id IS 'Obsolete -- reference shipform_report_name instead.'; publicadminfalse209y"00shipformACLREVOKE ALL ON TABLE shipform FROM PUBLIC; REVOKE ALL ON TABLE shipform FROM admin; GRANT ALL ON TABLE shipform TO admin; GRANT ALL ON TABLE shipform TO xtrole; publicadminfalse20912592005973customerVIEWCREATE VIEW customer AS SELECT (custinfo.cust_number)::character varying AS customer_number, custtype.custtype_code AS customer_type, custinfo.cust_name AS customer_name, custinfo.cust_active AS active, salesrep.salesrep_number AS sales_rep, (custinfo.cust_commprcnt * (100)::numeric) AS commission, custinfo.cust_shipvia AS ship_via, shipform.shipform_name AS ship_form, shipchrg.shipchrg_name AS shipping_charges, custinfo.cust_backorder AS accepts_backorders, custinfo.cust_partialship AS accepts_partial_shipments, custinfo.cust_ffshipto AS allow_free_form_shipto, custinfo.cust_ffbillto AS allow_free_form_billto, whsinfo.warehous_code AS preferred_selling_site, taxzone.taxzone_code AS default_tax_zone, terms.terms_code AS default_terms, CASE WHEN (custinfo.cust_balmethod = 'B'::bpchar) THEN 'Balance Forward'::text ELSE 'Open Item'::text END AS balance_method, custinfo.cust_discntprcnt AS default_discount, dc.curr_abbr AS default_currency, clc.curr_abbr AS credit_limit_currency, custinfo.cust_creditlmt AS credit_limit, CASE WHEN (COALESCE(custinfo.cust_gracedays, 0) > 0) THEN custinfo.cust_gracedays ELSE NULL::integer END AS alternate_grace_days, custinfo.cust_creditrating AS credit_rating, CASE WHEN (custinfo.cust_creditstatus = 'G'::bpchar) THEN 'In Good Standing'::text WHEN (custinfo.cust_creditstatus = 'W'::bpchar) THEN 'On Credit Warning'::text ELSE 'On Credit Hold'::text END AS credit_status, custinfo.cust_autoupdatestatus AS credit_status_exceed_warn, custinfo.cust_autoholdorders AS credit_status_exceed_hold, custinfo.cust_usespos AS uses_purchase_orders, custinfo.cust_blanketpos AS uses_blanket_pos, mc.cntct_number AS billing_contact_number, mc.cntct_honorific AS billing_contact_honorific, mc.cntct_first_name AS billing_contact_first, mc.cntct_middle AS billing_contact_middle, mc.cntct_last_name AS billing_contact_last, mc.cntct_suffix AS billing_contact_suffix, mc.cntct_title AS billing_contact_job_title, mc.cntct_phone AS billing_contact_voice, mc.cntct_phone2 AS billing_contact_alternate, mc.cntct_fax AS billing_contact_fax, mc.cntct_email AS billing_contact_email, mc.cntct_webaddr AS billing_contact_web, ''::text AS billing_contact_change, m.addr_number AS billing_contact_address_number, m.addr_line1 AS billing_contact_address1, m.addr_line2 AS billing_contact_address2, m.addr_line3 AS billing_contact_address3, m.addr_city AS billing_contact_city, m.addr_state AS billing_contact_state, m.addr_postalcode AS billing_contact_postalcode, m.addr_country AS billing_contact_country, ''::text AS billing_contact_address_change, cc.cntct_number AS correspond_contact_number, cc.cntct_honorific AS correspond_contact_honorific, cc.cntct_first_name AS correspond_contact_first, cc.cntct_middle AS correspond_contact_middle, cc.cntct_last_name AS correspond_contact_last, cc.cntct_suffix AS correspond_contact_suffix, cc.cntct_title AS correspond_contact_job_title, cc.cntct_phone AS correspond_contact_voice, cc.cntct_phone2 AS correspond_contact_alternate, cc.cntct_fax AS correspond_contact_fax, cc.cntct_email AS correspond_contact_email, cc.cntct_webaddr AS correspond_contact_web, ''::text AS correspond_contact_change, c.addr_number AS correspond_contact_address_number, c.addr_line1 AS correspond_contact_address1, c.addr_line2 AS correspond_contact_address2, c.addr_line3 AS correspond_contact_address3, c.addr_city AS correspond_contact_city, c.addr_state AS correspond_contact_state, c.addr_postalcode AS correspond_contact_postalcode, c.addr_country AS correspond_contact_country, ''::text AS correspond_contact_address_change, custinfo.cust_comments AS notes FROM ((((((((public.custinfo LEFT JOIN public.shipchrg ON ((custinfo.cust_shipchrg_id = shipchrg.shipchrg_id))) LEFT JOIN public.whsinfo ON ((custinfo.cust_preferred_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN public.addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN public.cntct cc ON ((custinfo.cust_corrcntct_id = cc.cntct_id))) LEFT JOIN public.addr c ON ((cc.cntct_addr_id = c.addr_id))) LEFT JOIN public.taxzone ON ((custinfo.cust_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.shipform ON ((custinfo.cust_shipform_id = shipform.shipform_id))), public.custtype, public.salesrep, public.curr_symbol dc, public.curr_symbol clc, public.terms WHERE (((((custinfo.cust_custtype_id = custtype.custtype_id) AND (custinfo.cust_salesrep_id = salesrep.salesrep_id)) AND (custinfo.cust_curr_id = dc.curr_id)) AND (custinfo.cust_creditlmt_curr_id = clc.curr_id)) AND (custinfo.cust_terms_id = terms.terms_id)); DROP VIEW api.customer; apiadminfalse52646z"00 VIEW customerCOMMENT(COMMENT ON VIEW customer IS 'Customer'; apiadminfalse768{"00customerACLREVOKE ALL ON TABLE customer FROM PUBLIC; REVOKE ALL ON TABLE customer FROM admin; GRANT ALL ON TABLE customer TO admin; GRANT ALL ON TABLE customer TO xtrole; apiadminfalse76812591683842taxauthTABLEICREATE TABLE taxauth ( taxauth_id integer NOT NULL, taxauth_code text NOT NULL, taxauth_name text, taxauth_extref text, taxauth_addr_id integer, taxauth_curr_id integer, taxauth_county text, taxauth_accnt_id integer, CONSTRAINT taxauth_taxauth_code_check CHECK ((taxauth_code <> ''::text)) ); DROP TABLE public.taxauth; publicadminfalse60348|"00 TABLE taxauthCOMMENT8COMMENT ON TABLE taxauth IS 'The Tax Authority table.'; publicadminfalse210}"00COLUMN taxauth.taxauth_curr_idCOMMENTCOMMENT ON COLUMN taxauth.taxauth_curr_id IS 'The required currency for recording tax information as. NULL means no preference.'; publicadminfalse210~"00taxauthACLREVOKE ALL ON TABLE taxauth FROM PUBLIC; REVOKE ALL ON TABLE taxauth FROM admin; GRANT ALL ON TABLE taxauth TO admin; GRANT ALL ON TABLE taxauth TO xtrole; publicadminfalse21012591683848taxregTABLECREATE TABLE taxreg ( taxreg_id integer NOT NULL, taxreg_rel_id integer NOT NULL, taxreg_rel_type character(1), taxreg_taxauth_id integer, taxreg_number text NOT NULL, taxreg_taxzone_id integer, taxreg_effective date DEFAULT startoftime(), taxreg_expires date DEFAULT endoftime(), taxreg_notes text DEFAULT ''::text, CONSTRAINT taxreg_taxreg_number_check CHECK ((taxreg_number <> ''::text)) ); DROP TABLE public.taxreg; publicadminfalse60356036603760398"00 TABLE taxregCOMMENTCOMMENT ON TABLE taxreg IS 'Stores Tax Registration numbers related to objects and a given tax authority. The rel_id specifies the object id and teh rel_type specifies the object type. See column comment for additional detail on types.'; publicadminfalse211"00COLUMN taxreg.taxreg_rel_typeCOMMENTCOMMENT ON COLUMN taxreg.taxreg_rel_type IS 'The type of relation this record is for. Known values are C=Customer, V=Vendor, NULL=This Manufacturer in which case taxreg_rel_id is meaningless and should be -1.'; publicadminfalse211"00taxregACLREVOKE ALL ON TABLE taxreg FROM PUBLIC; REVOKE ALL ON TABLE taxreg FROM admin; GRANT ALL ON TABLE taxreg TO admin; GRANT ALL ON TABLE taxreg TO xtrole; publicadminfalse21112592005983customertaxregVIEWCREATE VIEW customertaxreg AS SELECT (custinfo.cust_number)::character varying AS customer_number, (COALESCE(taxzone.taxzone_code, 'Any'::text))::character varying AS tax_zone, (taxauth.taxauth_code)::character varying AS tax_authority, taxreg.taxreg_number AS registration_number, CASE WHEN (taxreg.taxreg_effective = public.startoftime()) THEN 'Always'::text ELSE public.formatdate(taxreg.taxreg_effective) END AS start_date, CASE WHEN (taxreg.taxreg_expires = public.endoftime()) THEN 'Never'::text ELSE public.formatdate(taxreg.taxreg_expires) END AS end_date, taxreg.taxreg_notes AS notes FROM (((public.taxreg LEFT JOIN public.custinfo ON ((custinfo.cust_id = taxreg.taxreg_rel_id))) LEFT JOIN public.taxauth ON ((taxauth.taxauth_id = taxreg.taxreg_taxauth_id))) LEFT JOIN public.taxzone ON ((taxzone.taxzone_id = taxreg.taxreg_taxzone_id))) WHERE (taxreg.taxreg_rel_type = 'C'::bpchar) ORDER BY custinfo.cust_number, taxreg.taxreg_number; DROP VIEW api.customertaxreg; apiadminfalse52686"00VIEW customertaxregCOMMENT@COMMENT ON VIEW customertaxreg IS 'Customer Tax Registrations'; apiadminfalse769"00customertaxregACLREVOKE ALL ON TABLE customertaxreg FROM PUBLIC; REVOKE ALL ON TABLE customertaxreg FROM admin; GRANT ALL ON TABLE customertaxreg TO admin; GRANT ALL ON TABLE customertaxreg TO xtrole; apiadminfalse76912592005990 customertypeVIEWCREATE VIEW customertype AS SELECT (custtype.custtype_code)::character varying AS code, custtype.custtype_descrip AS description, custtype.custtype_char AS enable_characteristics_profile FROM public.custtype ORDER BY custtype.custtype_code; DROP VIEW api.customertype; apiadminfalse52706"00VIEW customertypeCOMMENT1COMMENT ON VIEW customertype IS 'Customer Type'; apiadminfalse770"00 customertypeACLREVOKE ALL ON TABLE customertype FROM PUBLIC; REVOKE ALL ON TABLE customertype FROM admin; GRANT ALL ON TABLE customertype TO admin; GRANT ALL ON TABLE customertype TO xtrole; apiadminfalse77012592005997customertypecharVIEWCREATE VIEW customertypechar AS SELECT (custtype.custtype_code)::character varying AS customer_type, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value, charass.charass_default AS is_default FROM public.custtype, public."char", public.charass WHERE ((('CT'::text = charass.charass_target_type) AND (custtype.custtype_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); DROP VIEW api.customertypechar; apiadminfalse52746"00VIEW customertypecharCOMMENTECOMMENT ON VIEW customertypechar IS 'Customer Type Characteristics'; apiadminfalse771"00customertypecharACLREVOKE ALL ON TABLE customertypechar FROM PUBLIC; REVOKE ALL ON TABLE customertypechar FROM admin; GRANT ALL ON TABLE customertypechar TO admin; GRANT ALL ON TABLE customertypechar TO xtrole; apiadminfalse77112592006004 custshiptoVIEWcCREATE VIEW custshipto AS SELECT (custinfo.cust_number)::character varying AS customer_number, (shiptoinfo.shipto_num)::character varying AS shipto_number, shiptoinfo.shipto_active AS active, shiptoinfo.shipto_name AS name, shiptoinfo.shipto_default AS default_flag, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postal_code, addr.addr_country AS country, ''::text AS address_change, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS honorific, cntct.cntct_first_name AS first, cntct.cntct_middle AS middle, cntct.cntct_last_name AS last, cntct.cntct_suffix AS suffix, cntct.cntct_title AS job_title, cntct.cntct_phone AS phone, cntct.cntct_fax AS fax, cntct.cntct_email AS email, ''::text AS contact_change, salesrep.salesrep_number AS sales_rep, (shiptoinfo.shipto_commission * 100.0) AS commission, shipzone.shipzone_name AS zone, taxzone.taxzone_code AS tax_zone, shiptoinfo.shipto_shipvia AS ship_via, shipform.shipform_name AS ship_form, shipchrg.shipchrg_name AS shipping_charges, CASE WHEN (shiptoinfo.shipto_ediprofile_id = (-1)) THEN 'No EDI'::text WHEN (shiptoinfo.shipto_ediprofile_id = (-2)) THEN 'Use Customer Master'::text ELSE public.getediprofilename(shiptoinfo.shipto_ediprofile_id) END AS edi_profile, shiptoinfo.shipto_comments AS general_notes, shiptoinfo.shipto_shipcomments AS shipping_notes FROM public.custinfo, ((((((public.shiptoinfo LEFT JOIN public.shipchrg ON ((shiptoinfo.shipto_shipchrg_id = shipchrg.shipchrg_id))) LEFT JOIN public.cntct ON ((shiptoinfo.shipto_cntct_id = cntct.cntct_id))) LEFT JOIN public.addr ON ((shiptoinfo.shipto_addr_id = addr.addr_id))) LEFT JOIN public.taxzone ON ((shiptoinfo.shipto_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.shipzone ON ((shiptoinfo.shipto_shipzone_id = shipzone.shipzone_id))) LEFT JOIN public.salesrep ON ((shiptoinfo.shipto_salesrep_id = salesrep.salesrep_id))), public.shipform WHERE ((custinfo.cust_id = shiptoinfo.shipto_cust_id) AND (custinfo.cust_shipform_id = shipform.shipform_id)); DROP VIEW api.custshipto; apiadminfalse52786"00VIEW custshiptoCOMMENT9COMMENT ON VIEW custshipto IS 'Customer Shipto Address'; apiadminfalse772"00 custshiptoACLREVOKE ALL ON TABLE custshipto FROM PUBLIC; REVOKE ALL ON TABLE custshipto FROM admin; GRANT ALL ON TABLE custshipto TO admin; GRANT ALL ON TABLE custshipto TO xtrole; apiadminfalse77212592006014custtaxVIEWCREATE VIEW custtax AS SELECT (custinfo.cust_number)::character varying AS customer_number, (taxauth.taxauth_code)::character varying AS tax_authority, taxreg.taxreg_number AS registration_number FROM public.custinfo, public.taxauth, public.taxreg WHERE (((taxreg.taxreg_rel_type = 'C'::bpchar) AND (taxreg.taxreg_rel_id = custinfo.cust_id)) AND (taxreg.taxreg_taxauth_id = taxauth.taxauth_id)); DROP VIEW api.custtax; apiadminfalse52826"00 VIEW custtaxCOMMENT8COMMENT ON VIEW custtax IS 'Customer Tax Registration'; apiadminfalse773"00custtaxACLREVOKE ALL ON TABLE custtax FROM PUBLIC; REVOKE ALL ON TABLE custtax FROM admin; GRANT ALL ON TABLE custtax TO admin; GRANT ALL ON TABLE custtax TO xtrole; apiadminfalse77312591683886deptTABLECREATE TABLE dept ( dept_id integer NOT NULL, dept_number text NOT NULL, dept_name text NOT NULL, CONSTRAINT dept_dept_number_check CHECK ((dept_number <> ''::text)) ); DROP TABLE public.dept; publicadminfalse60438"00 TABLE deptCOMMENT0COMMENT ON TABLE dept IS 'List of Departments'; publicadminfalse213"00deptACLREVOKE ALL ON TABLE dept FROM PUBLIC; REVOKE ALL ON TABLE dept FROM admin; GRANT ALL ON TABLE dept TO admin; GRANT ALL ON TABLE dept TO xtrole; publicadminfalse21312591683892empTABLECREATE TABLE emp ( emp_id integer NOT NULL, emp_code text NOT NULL, emp_number text NOT NULL, emp_active boolean DEFAULT true NOT NULL, emp_cntct_id integer, emp_warehous_id integer, emp_mgr_emp_id integer, emp_wage_type text NOT NULL, emp_wage numeric, emp_wage_curr_id integer DEFAULT basecurrid(), emp_wage_period text NOT NULL, emp_dept_id integer, emp_shift_id integer, emp_notes text, emp_image_id integer, emp_username text, emp_extrate numeric, emp_extrate_period text NOT NULL, emp_startdate date DEFAULT ('now'::text)::date, emp_name text NOT NULL, CONSTRAINT emp_check CHECK (((((COALESCE(emp_wage_type, ''::text) = ''::text) OR (COALESCE(emp_wage_type, ''::text) = 'H'::text)) OR (COALESCE(emp_wage_type, ''::text) = 'S'::text)) AND ((COALESCE(emp_wage, (0)::numeric) = (0)::numeric) OR ((COALESCE(emp_wage_type, ''::text) <> ''::text) AND (emp_wage IS NOT NULL))))), CONSTRAINT emp_emp_code_check CHECK ((emp_code <> ''::text)), CONSTRAINT emp_emp_number_check CHECK ((emp_number <> ''::text)), CONSTRAINT emp_emp_wage_period_check CHECK ((((((((COALESCE(emp_wage_period, ''::text) = ''::text) OR (COALESCE(emp_wage_period, ''::text) = 'H'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'D'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'W'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'BW'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'M'::text)) OR (COALESCE(emp_wage_period, ''::text) = 'Y'::text))) ); DROP TABLE public.emp; publicadminfalse60446045604660486049605060518"00 TABLE empCOMMENT~COMMENT ON TABLE emp IS 'Employee table describing the basic properties of an employee. Employees need not be system users.'; publicadminfalse214"00COLUMN emp.emp_codeCOMMENTCOMMENT ON COLUMN emp.emp_code IS 'Short, human-readable name for employee. This value is kept synchronized with usr_username and salesrep_number, and so is unique across all three tables emp, usr, and salesrep.'; publicadminfalse214"00COLUMN emp.emp_numberCOMMENTCOMMENT ON COLUMN emp.emp_number IS 'Official employee number. This might be used for ID badges, payroll accounting, or other purposes.'; publicadminfalse214"00COLUMN emp.emp_mgr_emp_idCOMMENT_COMMENT ON COLUMN emp.emp_mgr_emp_id IS 'Internal ID of this employee''s manager/supervisor.'; publicadminfalse214"00COLUMN emp.emp_wage_typeCOMMENTCOMMENT ON COLUMN emp.emp_wage_type IS 'The nature of the wage or employment agreement. ''H'' indicates this employee is paid on an hourly basis (or some other period) while ''S'' indicates this employee is salaried.'; publicadminfalse214"00COLUMN emp.emp_wage_periodCOMMENTCOMMENT ON COLUMN emp.emp_wage_period IS 'The periodicity of wage payment: ''H'' for hourly, ''D'' for daily, ''W'' for weekly, ''BW'' for biweekly, ''M'' for monthly, ''Y'' for yearly.'; publicadminfalse214"00COLUMN emp.emp_usernameCOMMENTCOMMENT ON COLUMN emp.emp_username IS 'DEPRECATED - the relationship between Employee and User is now maintained through the crmacct table.'; publicadminfalse214"00COLUMN emp.emp_extrate_periodCOMMENTCOMMENT ON COLUMN emp.emp_extrate_period IS 'The periodicity of external rate payment: ''H'' for hourly, ''D'' for daily, ''W'' for weekly, ''BW'' for biweekly, ''M'' for monthly, ''Y'' for yearly.'; publicadminfalse214"00empACLREVOKE ALL ON TABLE emp FROM PUBLIC; REVOKE ALL ON TABLE emp FROM admin; GRANT ALL ON TABLE emp TO admin; GRANT ALL ON TABLE emp TO xtrole; publicadminfalse21412591683903shiftTABLECREATE TABLE shift ( shift_id integer NOT NULL, shift_number text NOT NULL, shift_name text NOT NULL, CONSTRAINT shift_shift_number_check CHECK ((shift_number <> ''::text)) ); DROP TABLE public.shift; publicadminfalse60538"00 TABLE shiftCOMMENT1COMMENT ON TABLE shift IS 'List of work Shifts'; publicadminfalse215"00shiftACLREVOKE ALL ON TABLE shift FROM PUBLIC; REVOKE ALL ON TABLE shift FROM admin; GRANT ALL ON TABLE shift TO admin; GRANT ALL ON TABLE shift TO xtrole; publicadminfalse21512592006021employeeVIEW@ CREATE VIEW employee AS SELECT (e.emp_code)::character varying AS code, (e.emp_number)::character varying AS number, e.emp_active AS active, e.emp_startdate AS start_date, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS honorific, cntct.cntct_first_name AS first, cntct.cntct_middle AS middle, cntct.cntct_last_name AS last, cntct.cntct_suffix AS suffix, cntct.cntct_title AS job_title, cntct.cntct_phone AS voice, cntct.cntct_phone2 AS alternate, cntct.cntct_fax AS fax, cntct.cntct_email AS email, cntct.cntct_webaddr AS web, ''::text AS contact_change, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postalcode, addr.addr_country AS country, ''::text AS address_change, whsinfo.warehous_code AS site, m.emp_code AS manager_code, CASE WHEN (e.emp_wage_type = 'H'::text) THEN 'Hourly'::text WHEN (e.emp_wage_type = 'S'::text) THEN 'Salaried'::text WHEN (e.emp_wage_type IS NULL) THEN NULL::text ELSE 'Error'::text END AS wage_type, e.emp_wage AS wage, curr_symbol.curr_abbr AS wage_currency, CASE WHEN (e.emp_wage_period = 'H'::text) THEN 'Hour'::text WHEN (e.emp_wage_period = 'D'::text) THEN 'Day'::text WHEN (e.emp_wage_period = 'W'::text) THEN 'Week'::text WHEN (e.emp_wage_period = 'BW'::text) THEN 'Biweek'::text WHEN (e.emp_wage_period = 'M'::text) THEN 'Month'::text WHEN (e.emp_wage_period = 'Y'::text) THEN 'Year'::text WHEN (e.emp_wage_period IS NULL) THEN NULL::text ELSE 'Error'::text END AS wage_period, dept.dept_number AS department, shift.shift_number AS shift, (crmacct.crmacct_usr_username IS NOT NULL) AS is_user, (salesrep.salesrep_id IS NOT NULL) AS is_salesrep, (vendinfo.vend_id IS NOT NULL) AS is_vendor, e.emp_notes AS notes, image.image_name AS image, e.emp_extrate AS rate, curr_symbol.curr_abbr AS billing_currency, CASE WHEN (e.emp_extrate_period = 'H'::text) THEN 'Hour'::text WHEN (e.emp_extrate_period = 'D'::text) THEN 'Day'::text WHEN (e.emp_extrate_period = 'W'::text) THEN 'Week'::text WHEN (e.emp_extrate_period = 'BW'::text) THEN 'Biweek'::text WHEN (e.emp_extrate_period = 'M'::text) THEN 'Month'::text WHEN (e.emp_extrate_period = 'Y'::text) THEN 'Year'::text WHEN (e.emp_extrate_period IS NULL) THEN NULL::text ELSE 'Error'::text END AS billing_period FROM (((((((((((public.emp e JOIN public.crmacct ON ((e.emp_id = crmacct.crmacct_emp_id))) LEFT JOIN public.cntct ON ((e.emp_cntct_id = cntct.cntct_id))) LEFT JOIN public.addr ON ((cntct.cntct_addr_id = addr.addr_id))) LEFT JOIN public.whsinfo ON ((e.emp_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.emp m ON ((e.emp_mgr_emp_id = m.emp_id))) LEFT JOIN public.dept ON ((e.emp_dept_id = dept.dept_id))) LEFT JOIN public.shift ON ((e.emp_shift_id = shift.shift_id))) LEFT JOIN public.salesrep ON ((crmacct.crmacct_salesrep_id = salesrep.salesrep_id))) LEFT JOIN public.vendinfo ON ((crmacct.crmacct_vend_id = vendinfo.vend_id))) LEFT JOIN public.image ON ((e.emp_image_id = image.image_id))) JOIN public.curr_symbol ON ((e.emp_wage_curr_id = curr_symbol.curr_id))); DROP VIEW api.employee; apiadminfalse52866"00 VIEW employeeCOMMENT(COMMENT ON VIEW employee IS 'Employee'; apiadminfalse774"00employeeACLREVOKE ALL ON TABLE employee FROM PUBLIC; REVOKE ALL ON TABLE employee FROM admin; GRANT ALL ON TABLE employee TO admin; GRANT ALL ON TABLE employee TO xtrole; apiadminfalse77412592006031 employeecharVIEWuCREATE VIEW employeechar AS SELECT (emp.emp_code)::character varying AS employee_code, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.emp, public."char", public.charass WHERE ((('EMP'::text = charass.charass_target_type) AND (emp.emp_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); DROP VIEW api.employeechar; apiadminfalse52906"00VIEW employeecharCOMMENT<COMMENT ON VIEW employeechar IS 'Employee Characteristics'; apiadminfalse775"00 employeecharACLREVOKE ALL ON TABLE employeechar FROM PUBLIC; REVOKE ALL ON TABLE employeechar FROM admin; GRANT ALL ON TABLE employeechar TO admin; GRANT ALL ON TABLE employeechar TO xtrole; apiadminfalse77512592006038employeecommentVIEWCREATE VIEW employeecomment AS SELECT (emp.emp_code)::character varying AS code, (cmnttype.cmnttype_name)::character varying AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.emp, public.cmnttype, public.comment WHERE (((comment.comment_source = 'EMP'::text) AND (comment.comment_source_id = emp.emp_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.employeecomment; apiadminfalse52946"00VIEW employeecommentCOMMENT7COMMENT ON VIEW employeecomment IS 'Employee Comment'; apiadminfalse776"00employeecommentACLREVOKE ALL ON TABLE employeecomment FROM PUBLIC; REVOKE ALL ON TABLE employeecomment FROM admin; GRANT ALL ON TABLE employeecomment TO admin; GRANT ALL ON TABLE employeecomment TO xtrole; apiadminfalse77612591683922shipdataTABLECREATE TABLE shipdata ( shipdata_cohead_number text NOT NULL, shipdata_cosmisc_tracknum text NOT NULL, shipdata_cosmisc_packnum_tracknum text NOT NULL, shipdata_weight numeric(16,4), shipdata_base_freight numeric(16,4), shipdata_total_freight numeric(16,4), shipdata_shipper text DEFAULT 'UPS'::text, shipdata_billing_option text, shipdata_package_type text, shipdata_void_ind character(1) NOT NULL, shipdata_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, shipdata_shiphead_number text, shipdata_base_freight_curr_id integer DEFAULT basecurrid(), shipdata_total_freight_curr_id integer DEFAULT basecurrid() ); DROP TABLE public.shipdata; publicadminfalse60546055605660578"00TABLE shipdataCOMMENTCOMMENT ON TABLE shipdata IS 'Shipping Interface information - note that the shipdata_cohead_nember is text and not int. That is due to ODBC chopping off during the transfer'; publicadminfalse216"00shipdataACLREVOKE ALL ON TABLE shipdata FROM PUBLIC; REVOKE ALL ON TABLE shipdata FROM admin; GRANT ALL ON TABLE shipdata TO admin; GRANT ALL ON TABLE shipdata TO xtrole; publicadminfalse216 12592006045 extshipmaintVIEW&CREATE VIEW extshipmaint AS SELECT (shipdata.shipdata_cohead_number)::character varying AS so_number, (shipdata.shipdata_shiphead_number)::character varying AS shipment_number, (shipdata.shipdata_shipper)::character varying AS shipper, (shipdata.shipdata_cosmisc_packnum_tracknum)::character varying AS package_tracking_number, shipdata.shipdata_void_ind AS void, shipdata.shipdata_billing_option AS billing_option, shipdata.shipdata_weight AS weight, shipdata.shipdata_base_freight AS base_freight, base.curr_abbr AS base_freight_currency, shipdata.shipdata_total_freight AS total_freight, total.curr_abbr AS total_freight_currency, shipdata.shipdata_package_type AS package_type, shipdata.shipdata_cosmisc_tracknum AS tracking_number, shipdata.shipdata_lastupdated AS last_updated FROM public.shipdata, public.curr_symbol base, public.curr_symbol total WHERE ((shipdata.shipdata_base_freight_curr_id = base.curr_id) AND (shipdata.shipdata_total_freight_curr_id = total.curr_id)) ORDER BY shipdata.shipdata_cohead_number, shipdata.shipdata_shiphead_number; DROP VIEW api.extshipmaint; apiadminfalse52986"00VIEW extshipmaintCOMMENTACOMMENT ON VIEW extshipmaint IS 'External Shipping Maintenance'; apiadminfalse777"00 extshipmaintACLREVOKE ALL ON TABLE extshipmaint FROM PUBLIC; REVOKE ALL ON TABLE extshipmaint FROM admin; GRANT ALL ON TABLE extshipmaint TO admin; GRANT ALL ON TABLE extshipmaint TO xtrole; apiadminfalse77712591683936 freightclassTABLECREATE TABLE freightclass ( freightclass_id integer NOT NULL, freightclass_code text NOT NULL, freightclass_descrip text, CONSTRAINT freightclass_freightclass_code_check CHECK ((freightclass_code <> ''::text)) ); DROP TABLE public.freightclass; publicadminfalse60598"00TABLE freightclassCOMMENTOCOMMENT ON TABLE freightclass IS 'This table is the freight price schedules.'; publicadminfalse217"00 freightclassACLREVOKE ALL ON TABLE freightclass FROM PUBLIC; REVOKE ALL ON TABLE freightclass FROM admin; GRANT ALL ON TABLE freightclass TO admin; GRANT ALL ON TABLE freightclass TO xtrole; publicadminfalse21712591683942 ipsfreightTABLECREATE TABLE ipsfreight ( ipsfreight_id integer NOT NULL, ipsfreight_ipshead_id integer NOT NULL, ipsfreight_qtybreak numeric DEFAULT 0 NOT NULL, ipsfreight_price numeric DEFAULT 0 NOT NULL, ipsfreight_type character(1) NOT NULL, ipsfreight_warehous_id integer, ipsfreight_shipzone_id integer, ipsfreight_freightclass_id integer, ipsfreight_shipvia text ); DROP TABLE public.ipsfreight; publicadminfalse606160628"00 ipsfreightACLREVOKE ALL ON TABLE ipsfreight FROM PUBLIC; REVOKE ALL ON TABLE ipsfreight FROM admin; GRANT ALL ON TABLE ipsfreight TO admin; GRANT ALL ON TABLE ipsfreight TO xtrole; publicadminfalse21812591683950ipsheadTABLECREATE TABLE ipshead ( ipshead_id integer DEFAULT nextval(('"ipshead_ipshead_id_seq"'::text)::regclass) NOT NULL, ipshead_name text NOT NULL, ipshead_descrip text, ipshead_effective date, ipshead_expires date, ipshead_curr_id integer DEFAULT basecurrid() NOT NULL, ipshead_updated date, CONSTRAINT ipshead_ipshead_name_check CHECK ((ipshead_name <> ''::text)) ); DROP TABLE public.ipshead; publicadminfalse6063606460658"00 TABLE ipsheadCOMMENTCCOMMENT ON TABLE ipshead IS 'Pricing Schedule header information'; publicadminfalse219"00ipsheadACLREVOKE ALL ON TABLE ipshead FROM PUBLIC; REVOKE ALL ON TABLE ipshead FROM admin; GRANT ALL ON TABLE ipshead TO admin; GRANT ALL ON TABLE ipshead TO xtrole; publicadminfalse219 12592006052freightpricingscheduleitemVIEW;CREATE VIEW freightpricingscheduleitem AS SELECT (ipshead.ipshead_name)::character varying AS pricing_schedule, ipsfreight.ipsfreight_qtybreak AS qty_break, (qtyuom.uom_name)::character varying AS qty_uom, ipsfreight.ipsfreight_price AS price, CASE WHEN (ipsfreight.ipsfreight_type = 'F'::bpchar) THEN 'Flat Rate'::text ELSE 'Price Per UOM'::text END AS price_type, COALESCE(whsinfo.warehous_code, 'Any'::text) AS from_site, COALESCE(shipzone.shipzone_name, 'Any'::text) AS to_shipzone, COALESCE(ipsfreight.ipsfreight_shipvia, 'Any'::text) AS ship_via, COALESCE(freightclass.freightclass_code, 'Any'::text) AS freight_class FROM (((((public.ipsfreight JOIN public.ipshead ON ((ipsfreight.ipsfreight_ipshead_id = ipshead.ipshead_id))) LEFT JOIN public.uom qtyuom ON (qtyuom.uom_item_weight)) LEFT JOIN public.whsinfo ON ((whsinfo.warehous_id = ipsfreight.ipsfreight_warehous_id))) LEFT JOIN public.shipzone ON ((shipzone.shipzone_id = ipsfreight.ipsfreight_shipzone_id))) LEFT JOIN public.freightclass ON ((freightclass.freightclass_id = ipsfreight.ipsfreight_freightclass_id))); *DROP VIEW api.freightpricingscheduleitem; apiadminfalse53026"00VIEW freightpricingscheduleitemCOMMENTOCOMMENT ON VIEW freightpricingscheduleitem IS 'Freight Pricing Schedule Item'; apiadminfalse778"00freightpricingscheduleitemACLREVOKE ALL ON TABLE freightpricingscheduleitem FROM PUBLIC; REVOKE ALL ON TABLE freightpricingscheduleitem FROM admin; GRANT ALL ON TABLE freightpricingscheduleitem TO admin; GRANT ALL ON TABLE freightpricingscheduleitem TO xtrole; apiadminfalse778 12592006062 glaccountVIEWCREATE VIEW glaccount AS SELECT (accnt.accnt_company)::character varying AS company, (accnt.accnt_profit)::character varying AS profit_center, (accnt.accnt_number)::character varying AS account_number, (accnt.accnt_sub)::character varying AS sub_account, accnt.accnt_descrip AS description, accnt.accnt_extref AS ext_reference, CASE WHEN (accnt.accnt_type = 'A'::bpchar) THEN 'Asset'::text WHEN (accnt.accnt_type = 'L'::bpchar) THEN 'Liability'::text WHEN (accnt.accnt_type = 'E'::bpchar) THEN 'Expense'::text WHEN (accnt.accnt_type = 'R'::bpchar) THEN 'Revenue'::text WHEN (accnt.accnt_type = 'Q'::bpchar) THEN 'Equity'::text ELSE '?'::text END AS type, accnt.accnt_subaccnttype_code AS sub_type, accnt.accnt_forwardupdate AS forward_update_trial_balances, accnt.accnt_comments AS notes FROM public.accnt ORDER BY accnt.accnt_company, accnt.accnt_profit, accnt.accnt_number, accnt.accnt_sub; DROP VIEW api.glaccount; apiadminfalse53066"00VIEW glaccountCOMMENT+COMMENT ON VIEW glaccount IS 'GL Account'; apiadminfalse779"00 glaccountACLREVOKE ALL ON TABLE glaccount FROM PUBLIC; REVOKE ALL ON TABLE glaccount FROM admin; GRANT ALL ON TABLE glaccount TO admin; GRANT ALL ON TABLE glaccount TO xtrole; apiadminfalse77912591683968incdtcatTABLE CREATE TABLE incdtcat ( incdtcat_id integer NOT NULL, incdtcat_name text NOT NULL, incdtcat_order integer, incdtcat_descrip text, incdtcat_ediprofile_id integer, CONSTRAINT incdtcat_incdtcat_name_check CHECK ((incdtcat_name <> ''::text)) ); DROP TABLE public.incdtcat; publicadminfalse60678"00TABLE incdtcatCOMMENT8COMMENT ON TABLE incdtcat IS 'Incident Category table'; publicadminfalse220"00incdtcatACLREVOKE ALL ON TABLE incdtcat FROM PUBLIC; REVOKE ALL ON TABLE incdtcat FROM admin; GRANT ALL ON TABLE incdtcat TO admin; GRANT ALL ON TABLE incdtcat TO xtrole; publicadminfalse22012591683974 incdtpriorityTABLE CREATE TABLE incdtpriority ( incdtpriority_id integer NOT NULL, incdtpriority_name text NOT NULL, incdtpriority_order integer, incdtpriority_descrip text, CONSTRAINT incdtpriority_incdtpriority_name_check CHECK ((incdtpriority_name <> ''::text)) ); !DROP TABLE public.incdtpriority; publicadminfalse60698"00TABLE incdtpriorityCOMMENT=COMMENT ON TABLE incdtpriority IS 'Incident Priority table'; publicadminfalse221"00 incdtpriorityACLREVOKE ALL ON TABLE incdtpriority FROM PUBLIC; REVOKE ALL ON TABLE incdtpriority FROM admin; GRANT ALL ON TABLE incdtpriority TO admin; GRANT ALL ON TABLE incdtpriority TO xtrole; publicadminfalse22112591683980incdtresolutionTABLECREATE TABLE incdtresolution ( incdtresolution_id integer NOT NULL, incdtresolution_name text NOT NULL, incdtresolution_order integer, incdtresolution_descrip text, CONSTRAINT incdtresolution_incdtresolution_name_check CHECK ((incdtresolution_name <> ''::text)) ); #DROP TABLE public.incdtresolution; publicadminfalse60718"00TABLE incdtresolutionCOMMENTACOMMENT ON TABLE incdtresolution IS 'Incident Resolution table'; publicadminfalse222"00incdtresolutionACLREVOKE ALL ON TABLE incdtresolution FROM PUBLIC; REVOKE ALL ON TABLE incdtresolution FROM admin; GRANT ALL ON TABLE incdtresolution TO admin; GRANT ALL ON TABLE incdtresolution TO xtrole; publicadminfalse22212591683986 incdtseverityTABLE CREATE TABLE incdtseverity ( incdtseverity_id integer NOT NULL, incdtseverity_name text NOT NULL, incdtseverity_order integer, incdtseverity_descrip text, CONSTRAINT incdtseverity_incdtseverity_name_check CHECK ((incdtseverity_name <> ''::text)) ); !DROP TABLE public.incdtseverity; publicadminfalse60738"00TABLE incdtseverityCOMMENT=COMMENT ON TABLE incdtseverity IS 'Incident Severity table'; publicadminfalse223"00 incdtseverityACLREVOKE ALL ON TABLE incdtseverity FROM PUBLIC; REVOKE ALL ON TABLE incdtseverity FROM admin; GRANT ALL ON TABLE incdtseverity TO admin; GRANT ALL ON TABLE incdtseverity TO xtrole; publicadminfalse223 12592006071incidentVIEWCREATE VIEW incident AS SELECT incdt.incdt_number AS incident_number, incdtcat.incdtcat_name AS category, incdt.incdt_summary AS description, crmacct.crmacct_number AS crm_account, incdt.incdt_assigned_username AS assigned_to, CASE WHEN (incdt.incdt_status = 'N'::bpchar) THEN 'New'::text WHEN (incdt.incdt_status = 'F'::bpchar) THEN 'Feedback'::text WHEN (incdt.incdt_status = 'C'::bpchar) THEN 'Confirmed'::text WHEN (incdt.incdt_status = 'A'::bpchar) THEN 'Assigned'::text WHEN (incdt.incdt_status = 'R'::bpchar) THEN 'Resolved'::text WHEN (incdt.incdt_status = 'L'::bpchar) THEN 'Closed'::text ELSE '?'::text END AS status, incdtseverity.incdtseverity_name AS severity, incdtpriority.incdtpriority_name AS priority, incdtresolution.incdtresolution_name AS resolution, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS honorific, cntct.cntct_first_name AS first, cntct.cntct_middle AS middle, cntct.cntct_last_name AS last, cntct.cntct_suffix AS suffix, cntct.cntct_title AS job_title, cntct.cntct_phone AS phone, cntct.cntct_fax AS fax, cntct.cntct_email AS email, ''::text AS contact_change, incdt.incdt_descrip AS notes, item.item_number, incdt.incdt_lotserial AS lot_serial_number, CASE WHEN (aropen.aropen_doctype = 'C'::bpchar) THEN 'C/M'::text WHEN (aropen.aropen_doctype = 'D'::bpchar) THEN 'D/M'::text WHEN (aropen.aropen_doctype = 'I'::bpchar) THEN 'Invoice'::text WHEN (aropen.aropen_doctype = 'R'::bpchar) THEN 'C/D'::text ELSE ''::text END AS ar_doc_type, aropen.aropen_docnumber AS ar_doc_number FROM ((((((((public.incdt LEFT JOIN public.incdtcat ON ((incdtcat.incdtcat_id = incdt.incdt_incdtcat_id))) LEFT JOIN public.crmacct ON ((crmacct.crmacct_id = incdt.incdt_crmacct_id))) LEFT JOIN public.incdtseverity ON ((incdtseverity.incdtseverity_id = incdt.incdt_incdtseverity_id))) LEFT JOIN public.incdtpriority ON ((incdtpriority.incdtpriority_id = incdt.incdt_incdtpriority_id))) LEFT JOIN public.incdtresolution ON ((incdtresolution.incdtresolution_id = incdt.incdt_incdtresolution_id))) LEFT JOIN public.cntct ON ((cntct.cntct_id = incdt.incdt_cntct_id))) LEFT JOIN public.item ON ((item.item_id = incdt.incdt_item_id))) LEFT JOIN public.aropen ON ((aropen.aropen_id = incdt.incdt_aropen_id))); DROP VIEW api.incident; apiadminfalse53096"00 VIEW incidentCOMMENT(COMMENT ON VIEW incident IS 'Incident'; apiadminfalse780"00incidentACLREVOKE ALL ON TABLE incident FROM PUBLIC; REVOKE ALL ON TABLE incident FROM admin; GRANT ALL ON TABLE incident TO admin; GRANT ALL ON TABLE incident TO xtrole; apiadminfalse780 12592006081 incidentcharVIEWpCREATE VIEW incidentchar AS SELECT incdt.incdt_number AS incident_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value FROM public.incdt, public."char", public.charass WHERE ((('INCDT'::text = charass.charass_target_type) AND (incdt.incdt_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); DROP VIEW api.incidentchar; apiadminfalse53136"00VIEW incidentcharCOMMENT<COMMENT ON VIEW incidentchar IS 'Incident Characteristics'; apiadminfalse781"00 incidentcharACLREVOKE ALL ON TABLE incidentchar FROM PUBLIC; REVOKE ALL ON TABLE incidentchar FROM admin; GRANT ALL ON TABLE incidentchar TO admin; GRANT ALL ON TABLE incidentchar TO xtrole; apiadminfalse78112592006088incidentcommentVIEWCREATE VIEW incidentcomment AS SELECT incdt.incdt_number AS incident_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text, comment.comment_public AS public FROM public.incdt, public.cmnttype, public.comment WHERE (((comment.comment_source = 'INCDT'::text) AND (comment.comment_source_id = incdt.incdt_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.incidentcomment; apiadminfalse53176"00VIEW incidentcommentCOMMENT7COMMENT ON VIEW incidentcomment IS 'Incident Comment'; apiadminfalse782"00incidentcommentACLREVOKE ALL ON TABLE incidentcomment FROM PUBLIC; REVOKE ALL ON TABLE incidentcomment FROM admin; GRANT ALL ON TABLE incidentcomment TO admin; GRANT ALL ON TABLE incidentcomment TO xtrole; apiadminfalse78212592006095 incidentfileVIEWCREATE VIEW incidentfile AS SELECT incdt.incdt_number AS incident_number, url.url_title AS title, url.url_url AS url FROM public.incdt, public.url WHERE ((incdt.incdt_id = url.url_source_id) AND (url.url_source = 'INCDT'::text)); DROP VIEW api.incidentfile; apiadminfalse53216"00VIEW incidentfileCOMMENT1COMMENT ON VIEW incidentfile IS 'Incident File'; apiadminfalse783"00 incidentfileACLREVOKE ALL ON TABLE incidentfile FROM PUBLIC; REVOKE ALL ON TABLE incidentfile FROM admin; GRANT ALL ON TABLE incidentfile TO admin; GRANT ALL ON TABLE incidentfile TO xtrole; apiadminfalse78312592006102 incidentimageVIEW,CREATE VIEW incidentimage AS SELECT incdt.incdt_number AS incident_number, image.image_name FROM public.incdt, public.imageass, public.image WHERE (((incdt.incdt_id = imageass.imageass_source_id) AND (imageass.imageass_source = 'INCDT'::text)) AND (imageass.imageass_image_id = image.image_id)); DROP VIEW api.incidentimage; apiadminfalse53256"00VIEW incidentimageCOMMENT3COMMENT ON VIEW incidentimage IS 'Incident Image'; apiadminfalse784"00 incidentimageACLREVOKE ALL ON TABLE incidentimage FROM PUBLIC; REVOKE ALL ON TABLE incidentimage FROM admin; GRANT ALL ON TABLE incidentimage TO admin; GRANT ALL ON TABLE incidentimage TO xtrole; apiadminfalse78412591684013 classcodeTABLECREATE TABLE classcode ( classcode_id integer DEFAULT nextval(('classcode_classcode_id_seq'::text)::regclass) NOT NULL, classcode_code text NOT NULL, classcode_descrip text, classcode_mfg boolean, classcode_creator text, classcode_created timestamp without time zone, classcode_modifier text, classcode_modified timestamp without time zone, classcode_type text, CONSTRAINT classcode_classcode_code_check CHECK ((classcode_code <> ''::text)) ); DROP TABLE public.classcode; publicadminfalse607460758"00TABLE classcodeCOMMENT8COMMENT ON TABLE classcode IS 'Class Code information'; publicadminfalse224"00 classcodeACLREVOKE ALL ON TABLE classcode FROM PUBLIC; REVOKE ALL ON TABLE classcode FROM admin; GRANT ALL ON TABLE classcode TO admin; GRANT ALL ON TABLE classcode TO xtrole; publicadminfalse22412591684020prodcatTABLECREATE TABLE prodcat ( prodcat_id integer DEFAULT nextval(('prodcat_prodcat_id_seq'::text)::regclass) NOT NULL, prodcat_code text NOT NULL, prodcat_descrip text, CONSTRAINT prodcat_prodcat_code_check CHECK ((prodcat_code <> ''::text)) ); DROP TABLE public.prodcat; publicadminfalse607660778"00 TABLE prodcatCOMMENT<COMMENT ON TABLE prodcat IS 'Product Category information'; publicadminfalse225"00prodcatACLREVOKE ALL ON TABLE prodcat FROM PUBLIC; REVOKE ALL ON TABLE prodcat FROM admin; GRANT ALL ON TABLE prodcat TO admin; GRANT ALL ON TABLE prodcat TO xtrole; publicadminfalse22512592006129itemVIEWxCREATE VIEW item AS SELECT (item.item_number)::character varying AS item_number, item.item_active AS active, item.item_descrip1 AS description1, item.item_descrip2 AS description2, CASE WHEN (item.item_type = 'P'::bpchar) THEN 'Purchased'::text WHEN (item.item_type = 'M'::bpchar) THEN 'Manufactured'::text WHEN (item.item_type = 'J'::bpchar) THEN 'Job'::text WHEN (item.item_type = 'K'::bpchar) THEN 'Kit'::text WHEN (item.item_type = 'F'::bpchar) THEN 'Phantom'::text WHEN (item.item_type = 'R'::bpchar) THEN 'Reference'::text WHEN (item.item_type = 'S'::bpchar) THEN 'Costing'::text WHEN (item.item_type = 'T'::bpchar) THEN 'Tooling'::text WHEN (item.item_type = 'O'::bpchar) THEN 'Outside Process'::text WHEN (item.item_type = 'L'::bpchar) THEN 'Planning'::text WHEN (item.item_type = 'B'::bpchar) THEN 'Breeder'::text WHEN (item.item_type = 'C'::bpchar) THEN 'Co-Product'::text WHEN (item.item_type = 'Y'::bpchar) THEN 'By-Product'::text ELSE NULL::text END AS item_type, item.item_maxcost AS maximum_desired_cost, classcode.classcode_code AS class_code, i.uom_name AS inventory_uom, item.item_picklist AS pick_list_item, item.item_fractional AS fractional, item.item_config AS configured, item.item_sold AS item_is_sold, prodcat.prodcat_code AS product_category, item.item_exclusive AS exclusive, item.item_listprice AS list_price, item.item_listcost AS list_cost, p.uom_name AS list_price_uom, item.item_upccode AS upc_code, item.item_prodweight AS product_weight, item.item_packweight AS packaging_weight, item.item_comments AS notes, item.item_extdescrip AS ext_description FROM (public.item LEFT JOIN public.prodcat ON ((item.item_prodcat_id = prodcat.prodcat_id))), public.classcode, public.uom i, public.uom p WHERE (((item.item_classcode_id = classcode.classcode_id) AND (item.item_inv_uom_id = i.uom_id)) AND (item.item_price_uom_id = p.uom_id)) ORDER BY (item.item_number)::character varying; DROP VIEW api.item; apiadminfalse53376"00 VIEW itemCOMMENT COMMENT ON VIEW item IS 'Item'; apiadminfalse787"00itemACLREVOKE ALL ON TABLE item FROM PUBLIC; REVOKE ALL ON TABLE item FROM admin; GRANT ALL ON TABLE item TO admin; GRANT ALL ON TABLE item TO xtrole; apiadminfalse78712591684032 itemaliasTABLECREATE TABLE itemalias ( itemalias_id integer DEFAULT nextval(('"itemalias_itemalias_id_seq"'::text)::regclass) NOT NULL, itemalias_item_id integer NOT NULL, itemalias_number text NOT NULL, itemalias_comments text, itemalias_usedescrip boolean NOT NULL, itemalias_descrip1 text, itemalias_descrip2 text, CONSTRAINT itemalias_itemalias_number_check CHECK ((itemalias_number <> ''::text)) ); DROP TABLE public.itemalias; publicadminfalse607860798"00TABLE itemaliasCOMMENT8COMMENT ON TABLE itemalias IS 'Item Alias information'; publicadminfalse226"00 itemaliasACLREVOKE ALL ON TABLE itemalias FROM PUBLIC; REVOKE ALL ON TABLE itemalias FROM admin; GRANT ALL ON TABLE itemalias TO admin; GRANT ALL ON TABLE itemalias TO xtrole; publicadminfalse22612592006139 itemaliasVIEWCREATE VIEW itemalias AS SELECT (item.item_number)::character varying AS item_number, itemalias.itemalias_number AS alias_number, itemalias.itemalias_usedescrip AS use_description, itemalias.itemalias_descrip1 AS description1, itemalias.itemalias_descrip2 AS description2, itemalias.itemalias_comments AS comments FROM public.item, public.itemalias WHERE (item.item_id = itemalias.itemalias_item_id); DROP VIEW api.itemalias; apiadminfalse53416"00VIEW itemaliasCOMMENT+COMMENT ON VIEW itemalias IS 'Item Alias'; apiadminfalse788"00 itemaliasACLREVOKE ALL ON TABLE itemalias FROM PUBLIC; REVOKE ALL ON TABLE itemalias FROM admin; GRANT ALL ON TABLE itemalias TO admin; GRANT ALL ON TABLE itemalias TO xtrole; apiadminfalse78812592006146itemcharVIEWCREATE VIEW itemchar AS SELECT (item.item_number)::character varying AS item_number, ("char".char_name)::character varying AS characteristic, charass.charass_value AS value, charass.charass_default AS is_default FROM public.item, public."char", public.charass WHERE ((('I'::text = charass.charass_target_type) AND (item.item_id = charass.charass_target_id)) AND (charass.charass_char_id = "char".char_id)); DROP VIEW api.itemchar; apiadminfalse53456"00 VIEW itemcharCOMMENT3COMMENT ON VIEW itemchar IS 'Item Characteristic'; apiadminfalse789"00itemcharACLREVOKE ALL ON TABLE itemchar FROM PUBLIC; REVOKE ALL ON TABLE itemchar FROM admin; GRANT ALL ON TABLE itemchar TO admin; GRANT ALL ON TABLE itemchar TO xtrole; apiadminfalse78912592006153 itemcommentVIEWCREATE VIEW itemcomment AS SELECT (item.item_number)::character varying AS item_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.item, public.cmnttype, public.comment WHERE (((comment.comment_source = 'I'::text) AND (comment.comment_source_id = item.item_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.itemcomment; apiadminfalse53496"00VIEW itemcommentCOMMENT0COMMENT ON VIEW itemcomment IS 'Item Comments'; apiadminfalse790"00 itemcommentACLREVOKE ALL ON TABLE itemcomment FROM PUBLIC; REVOKE ALL ON TABLE itemcomment FROM admin; GRANT ALL ON TABLE itemcomment TO admin; GRANT ALL ON TABLE itemcomment TO xtrole; apiadminfalse79012591684051costelemTABLECREATE TABLE costelem ( costelem_id integer DEFAULT nextval(('costelem_costelem_id_seq'::text)::regclass) NOT NULL, costelem_type text NOT NULL, costelem_sys boolean, costelem_po boolean, costelem_active boolean, costelem_exp_accnt_id integer, costelem_cost_item_id integer, CONSTRAINT costelem_costelem_type_check CHECK ((costelem_type <> ''::text)) ); DROP TABLE public.costelem; publicadminfalse608060818"00TABLE costelemCOMMENT<COMMENT ON TABLE costelem IS 'Costing Element information'; publicadminfalse227"00costelemACLREVOKE ALL ON TABLE costelem FROM PUBLIC; REVOKE ALL ON TABLE costelem FROM admin; GRANT ALL ON TABLE costelem TO admin; GRANT ALL ON TABLE costelem TO xtrole; publicadminfalse22712591684058itemcostTABLECREATE TABLE itemcost ( itemcost_id integer DEFAULT nextval(('itemcost_itemcost_id_seq'::text)::regclass) NOT NULL, itemcost_item_id integer NOT NULL, itemcost_costelem_id integer NOT NULL, itemcost_lowlevel boolean DEFAULT false NOT NULL, itemcost_stdcost numeric(16,6) DEFAULT 0 NOT NULL, itemcost_posted date, itemcost_actcost numeric(16,6) DEFAULT 0 NOT NULL, itemcost_updated date, itemcost_curr_id integer DEFAULT basecurrid() NOT NULL ); DROP TABLE public.itemcost; publicadminfalse608260836084608560868"00TABLE itemcostCOMMENT6COMMENT ON TABLE itemcost IS 'Item Cost information'; publicadminfalse228"00itemcostACLREVOKE ALL ON TABLE itemcost FROM PUBLIC; REVOKE ALL ON TABLE itemcost FROM admin; GRANT ALL ON TABLE itemcost TO admin; GRANT ALL ON TABLE itemcost TO xtrole; publicadminfalse22812592006160itemcostVIEW|CREATE VIEW itemcost AS SELECT (item.item_number)::character varying(100) AS item_number, (costelem.costelem_type)::character varying(100) AS costing_element, itemcost.itemcost_actcost AS actual_cost, curr_symbol.curr_abbr AS currency, false AS post_to_standard FROM (((public.itemcost LEFT JOIN public.item ON ((itemcost.itemcost_item_id = item.item_id))) LEFT JOIN public.costelem ON ((itemcost.itemcost_costelem_id = costelem.costelem_id))) LEFT JOIN public.curr_symbol ON ((itemcost.itemcost_curr_id = curr_symbol.curr_id))) ORDER BY (item.item_number)::character varying(100), (costelem.costelem_type)::character varying(100); DROP VIEW api.itemcost; apiadminfalse53536"00 VIEW itemcostCOMMENT)COMMENT ON VIEW itemcost IS 'Item Cost'; apiadminfalse791"00itemcostACLREVOKE ALL ON TABLE itemcost FROM PUBLIC; REVOKE ALL ON TABLE itemcost FROM admin; GRANT ALL ON TABLE itemcost TO admin; GRANT ALL ON TABLE itemcost TO xtrole; apiadminfalse79112592006168itemfileVIEWCREATE VIEW itemfile AS SELECT (item.item_number)::character varying AS item_number, url.url_title AS title, url.url_url AS url FROM public.item, public.url WHERE ((item.item_id = url.url_source_id) AND (url.url_source = 'I'::text)); DROP VIEW api.itemfile; apiadminfalse53576"00 VIEW itemfileCOMMENT)COMMENT ON VIEW itemfile IS 'Item File'; apiadminfalse792"00itemfileACLREVOKE ALL ON TABLE itemfile FROM PUBLIC; REVOKE ALL ON TABLE itemfile FROM admin; GRANT ALL ON TABLE itemfile TO admin; GRANT ALL ON TABLE itemfile TO xtrole; apiadminfalse79212592006175 itemimageVIEWCREATE VIEW itemimage AS SELECT (item.item_number)::character varying AS item_number, CASE WHEN (imageass.imageass_purpose = 'P'::bpchar) THEN 'Product Description'::text WHEN (imageass.imageass_purpose = 'I'::bpchar) THEN 'Inventory Description'::text WHEN (imageass.imageass_purpose = 'E'::bpchar) THEN 'Engineering Reference'::text WHEN (imageass.imageass_purpose = 'M'::bpchar) THEN 'Miscellaneous'::text ELSE 'Other'::text END AS purpose, image.image_name FROM public.item, public.imageass, public.image WHERE (((item.item_id = imageass.imageass_source_id) AND (imageass.imageass_source = 'I'::text)) AND (imageass.imageass_image_id = image.image_id)); DROP VIEW api.itemimage; apiadminfalse53616"00VIEW itemimageCOMMENT+COMMENT ON VIEW itemimage IS 'Item Image'; apiadminfalse793"00 itemimageACLREVOKE ALL ON TABLE itemimage FROM PUBLIC; REVOKE ALL ON TABLE itemimage FROM admin; GRANT ALL ON TABLE itemimage TO admin; GRANT ALL ON TABLE itemimage TO xtrole; apiadminfalse79312591684079costcatTABLEDCREATE TABLE costcat ( costcat_id integer DEFAULT nextval(('costcat_costcat_id_seq'::text)::regclass) NOT NULL, costcat_code text NOT NULL, costcat_descrip text, costcat_asset_accnt_id integer, costcat_liability_accnt_id integer, costcat_adjustment_accnt_id integer, costcat_matusage_accnt_id integer, costcat_purchprice_accnt_id integer, costcat_laboroverhead_accnt_id integer, costcat_scrap_accnt_id integer, costcat_invcost_accnt_id integer, costcat_wip_accnt_id integer, costcat_shipasset_accnt_id integer, costcat_mfgscrap_accnt_id integer, costcat_transform_accnt_id integer, costcat_freight_accnt_id integer, costcat_toliability_accnt_id integer, costcat_exp_accnt_id integer, CONSTRAINT costcat_costcat_code_check CHECK ((costcat_code <> ''::text)) ); DROP TABLE public.costcat; publicadminfalse608760888"00 TABLE costcatCOMMENT9COMMENT ON TABLE costcat IS 'Cost Category information'; publicadminfalse229"00costcatACLREVOKE ALL ON TABLE costcat FROM PUBLIC; REVOKE ALL ON TABLE costcat FROM admin; GRANT ALL ON TABLE costcat TO admin; GRANT ALL ON TABLE costcat TO xtrole; publicadminfalse22912591684086locationTABLECREATE TABLE location ( location_id integer DEFAULT nextval(('location_location_id_seq'::text)::regclass) NOT NULL, location_warehous_id integer NOT NULL, location_name text NOT NULL, location_descrip text, location_restrict boolean, location_netable boolean, location_whsezone_id integer, location_aisle text, location_rack text, location_bin text ); DROP TABLE public.location; publicadminfalse60898"00TABLE locationCOMMENT?COMMENT ON TABLE location IS 'Warehouse Location information'; publicadminfalse230"00locationACLREVOKE ALL ON TABLE location FROM PUBLIC; REVOKE ALL ON TABLE location FROM admin; GRANT ALL ON TABLE location TO admin; GRANT ALL ON TABLE location TO xtrole; publicadminfalse23012591684093plancodeTABLECREATE TABLE plancode ( plancode_id integer DEFAULT nextval(('plancode_plancode_id_seq'::text)::regclass) NOT NULL, plancode_code text NOT NULL, plancode_name text, plancode_mpsexplosion character(1), plancode_consumefcst boolean, plancode_mrpexcp_resched boolean, plancode_mrpexcp_delete boolean, CONSTRAINT plancode_plancode_code_check CHECK ((plancode_code <> ''::text)) ); DROP TABLE public.plancode; publicadminfalse609060918"00TABLE plancodeCOMMENT9COMMENT ON TABLE plancode IS 'Planner Code information'; publicadminfalse231"00plancodeACLREVOKE ALL ON TABLE plancode FROM PUBLIC; REVOKE ALL ON TABLE plancode FROM admin; GRANT ALL ON TABLE plancode TO admin; GRANT ALL ON TABLE plancode TO xtrole; publicadminfalse23112592006182itemsiteVIEW CREATE VIEW itemsite AS SELECT (item.item_number)::character varying AS item_number, (whsinfo.warehous_code)::character varying AS site, itemsite.itemsite_active AS active, itemsite.itemsite_wosupply AS wo_supplied_at_site, itemsite.itemsite_createwo AS create_wos, itemsite.itemsite_posupply AS po_supplied_at_site, itemsite.itemsite_createpr AS create_prs, itemsite.itemsite_createsopr AS create_soprs, itemsite.itemsite_createsopo AS create_sopos, itemsite.itemsite_dropship AS dropship, itemsite.itemsite_sold AS sold_from_site, itemsite.itemsite_soldranking AS ranking, CASE WHEN (itemsite.itemsite_costmethod = 'N'::bpchar) THEN 'None'::text WHEN (itemsite.itemsite_costmethod = 'A'::bpchar) THEN 'Average'::text WHEN (itemsite.itemsite_costmethod = 'S'::bpchar) THEN 'Standard'::text WHEN (itemsite.itemsite_costmethod = 'J'::bpchar) THEN 'Job'::text ELSE NULL::text END AS cost_method, CASE WHEN (itemsite.itemsite_controlmethod = 'N'::bpchar) THEN 'None'::text WHEN (itemsite.itemsite_controlmethod = 'R'::bpchar) THEN 'Regular'::text WHEN (itemsite.itemsite_controlmethod = 'S'::bpchar) THEN 'Serial #'::text WHEN (itemsite.itemsite_controlmethod = 'L'::bpchar) THEN 'Lot #'::text ELSE NULL::text END AS control_method, plancode.plancode_code AS planner_code, costcat.costcat_code AS cost_category, itemsite.itemsite_stocked AS stocked, itemsite.itemsite_abcclass AS abc_class, itemsite.itemsite_autoabcclass AS allow_automatic_updates, itemsite.itemsite_cyclecountfreq AS cycl_cnt_freq, itemsite.itemsite_eventfence AS event_fence, itemsite.itemsite_loccntrl AS multiple_location_control, public.formatlocationname(itemsite.itemsite_location_id) AS location, itemsite.itemsite_location AS user_defined_location, itemsite.itemsite_location_comments AS location_comment, itemsite.itemsite_disallowblankwip AS disallow_blank_wip_locations, itemsite.itemsite_useparams AS enforce_order_parameters, itemsite.itemsite_reorderlevel AS reorder_level, itemsite.itemsite_ordertoqty AS order_up_to, itemsite.itemsite_minordqty AS minimum_order, itemsite.itemsite_maxordqty AS maximum_order, itemsite.itemsite_multordqty AS order_multiple, itemsite.itemsite_useparamsmanual AS enforce_on_manual_orders, CASE WHEN (itemsite.itemsite_planning_type = 'N'::bpchar) THEN 'None'::text WHEN (itemsite.itemsite_planning_type = 'M'::bpchar) THEN 'MRP'::text WHEN (itemsite.itemsite_planning_type = 'S'::bpchar) THEN 'MPS'::text ELSE NULL::text END AS planning_system, itemsite.itemsite_ordergroup AS group_mps_mrp_orders, itemsite.itemsite_ordergroup_first AS first_group, itemsite.itemsite_mps_timefence AS mps_time_fence, itemsite.itemsite_leadtime AS lead_time, itemsite.itemsite_safetystock AS safety_stock, COALESCE((SELECT whsinfo.warehous_code FROM (public.itemsite supplysite JOIN public.whsinfo ON ((whsinfo.warehous_id = supplysite.itemsite_warehous_id))) WHERE (supplysite.itemsite_id = itemsite.itemsite_supply_itemsite_id)), 'None'::text) AS supplied_from_site, itemsite.itemsite_notes AS notes, itemsite.itemsite_perishable AS perishable, itemsite.itemsite_warrpurc AS require_warranty, itemsite.itemsite_autoreg AS auto_register FROM public.item, (public.itemsite LEFT JOIN public.location ON ((itemsite.itemsite_location_id = location.location_id))), public.plancode, public.costcat, public.whsinfo WHERE ((((item.item_id = itemsite.itemsite_item_id) AND (itemsite.itemsite_plancode_id = plancode.plancode_id)) AND (itemsite.itemsite_costcat_id = costcat.costcat_id)) AND (itemsite.itemsite_warehous_id = whsinfo.warehous_id)); DROP VIEW api.itemsite; apiadminfalse53656"00 VIEW itemsiteCOMMENT)COMMENT ON VIEW itemsite IS 'Item Site'; apiadminfalse794"00itemsiteACLREVOKE ALL ON TABLE itemsite FROM PUBLIC; REVOKE ALL ON TABLE itemsite FROM admin; GRANT ALL ON TABLE itemsite TO admin; GRANT ALL ON TABLE itemsite TO xtrole; apiadminfalse79412592006192itemsitecommentVIEWrCREATE VIEW itemsitecomment AS SELECT (item.item_number)::character varying AS item_number, (whsinfo.warehous_code)::character varying AS site, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.itemsite, public.item, public.whsinfo, public.cmnttype, public.comment WHERE ((itemsite.itemsite_item_id = item.item_id) AND ((((itemsite.itemsite_warehous_id = whsinfo.warehous_id) AND (comment.comment_source = 'IS'::text)) AND (comment.comment_source_id = itemsite.itemsite_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id))); DROP VIEW api.itemsitecomment; apiadminfalse53696"00VIEW itemsitecommentCOMMENT9COMMENT ON VIEW itemsitecomment IS 'Item Site Comments'; apiadminfalse795"00itemsitecommentACLREVOKE ALL ON TABLE itemsitecomment FROM PUBLIC; REVOKE ALL ON TABLE itemsitecomment FROM admin; GRANT ALL ON TABLE itemsitecomment TO admin; GRANT ALL ON TABLE itemsitecomment TO xtrole; apiadminfalse79512591744579contrctTABLECREATE TABLE contrct ( contrct_id integer NOT NULL, contrct_number text NOT NULL, contrct_vend_id integer NOT NULL, contrct_descrip text, contrct_effective date NOT NULL, contrct_expires date NOT NULL, contrct_note text ); DROP TABLE public.contrct; publicadminfalse8"00 TABLE contrctCOMMENTqCOMMENT ON TABLE contrct IS 'Grouping of Item Sources for a Vendor with common effective and expiration dates.'; publicadminfalse720"00COLUMN contrct.contrct_idCOMMENTMCOMMENT ON COLUMN contrct.contrct_id IS 'Sequence identifier for contract.'; publicadminfalse720"00COLUMN contrct.contrct_numberCOMMENTUCOMMENT ON COLUMN contrct.contrct_number IS 'User defined identifier for contract.'; publicadminfalse720"00COLUMN contrct.contrct_vend_idCOMMENTQCOMMENT ON COLUMN contrct.contrct_vend_id IS 'Vendor associated with contract.'; publicadminfalse720"00COLUMN contrct.contrct_descripCOMMENTJCOMMENT ON COLUMN contrct.contrct_descrip IS 'Description for contract.'; publicadminfalse720"00 COLUMN contrct.contrct_effectiveCOMMENThCOMMENT ON COLUMN contrct.contrct_effective IS 'Effective date for contract. Constraint for overlap.'; publicadminfalse720"00COLUMN contrct.contrct_expiresCOMMENTgCOMMENT ON COLUMN contrct.contrct_expires IS 'Expiration date for contract. Constraint for overlap.'; publicadminfalse720"00COLUMN contrct.contrct_noteCOMMENTACOMMENT ON COLUMN contrct.contrct_note IS 'Notes for contract.'; publicadminfalse720"00contrctACLREVOKE ALL ON TABLE contrct FROM PUBLIC; REVOKE ALL ON TABLE contrct FROM admin; GRANT ALL ON TABLE contrct TO admin; GRANT ALL ON TABLE contrct TO xtrole; publicadminfalse72012591684110itemsrcTABLECREATE TABLE itemsrc ( itemsrc_id integer DEFAULT nextval(('"itemsrc_itemsrc_id_seq"'::text)::regclass) NOT NULL, itemsrc_item_id integer NOT NULL, itemsrc_vend_id integer NOT NULL, itemsrc_vend_item_number text, itemsrc_vend_item_descrip text, itemsrc_comments text, itemsrc_vend_uom text NOT NULL, itemsrc_invvendoruomratio numeric(20,10) NOT NULL, itemsrc_minordqty numeric(18,6) NOT NULL, itemsrc_multordqty numeric(18,6) NOT NULL, itemsrc_leadtime integer NOT NULL, itemsrc_ranking integer NOT NULL, itemsrc_active boolean NOT NULL, itemsrc_manuf_name text DEFAULT ''::text NOT NULL, itemsrc_manuf_item_number text DEFAULT ''::text NOT NULL, itemsrc_manuf_item_descrip text, itemsrc_default boolean, itemsrc_upccode text, itemsrc_effective date DEFAULT startoftime() NOT NULL, itemsrc_expires date DEFAULT endoftime() NOT NULL, itemsrc_contrct_id integer ); DROP TABLE public.itemsrc; publicadminfalse609260936094609560968"00 TABLE itemsrcCOMMENT7COMMENT ON TABLE itemsrc IS 'Item Source information'; publicadminfalse232"00 COLUMN itemsrc.itemsrc_effectiveCOMMENTkCOMMENT ON COLUMN itemsrc.itemsrc_effective IS 'Effective date for item source. Constraint for overlap.'; publicadminfalse232"00COLUMN itemsrc.itemsrc_expiresCOMMENTjCOMMENT ON COLUMN itemsrc.itemsrc_expires IS 'Expiration date for item source. Constraint for overlap.'; publicadminfalse232"00!COLUMN itemsrc.itemsrc_contrct_idCOMMENTCOMMENT ON COLUMN itemsrc.itemsrc_contrct_id IS 'Associated contract for item source. Inherits effective, expiration dates.'; publicadminfalse232"00itemsrcACLREVOKE ALL ON TABLE itemsrc FROM PUBLIC; REVOKE ALL ON TABLE itemsrc FROM admin; GRANT ALL ON TABLE itemsrc TO admin; GRANT ALL ON TABLE itemsrc TO xtrole; publicadminfalse23212592006200 itemsourceVIEW(CREATE VIEW itemsource AS SELECT (item.item_number)::character varying AS item_number, (vendinfo.vend_number)::character varying AS vendor, itemsrc.itemsrc_vend_item_number AS vendor_item_number, itemsrc.itemsrc_active AS active, itemsrc.itemsrc_default, itemsrc.itemsrc_vend_uom AS vendor_uom, itemsrc.itemsrc_invvendoruomratio AS inventory_vendor_uom_ratio, itemsrc.itemsrc_minordqty AS minimum_order, itemsrc.itemsrc_multordqty AS order_multiple, itemsrc.itemsrc_ranking AS vendor_ranking, itemsrc.itemsrc_leadtime AS lead_time, itemsrc.itemsrc_comments AS notes, itemsrc.itemsrc_vend_item_descrip AS vendor_description, itemsrc.itemsrc_manuf_name AS manufacturer_name, itemsrc.itemsrc_manuf_item_number AS manufacturer_item_number, itemsrc.itemsrc_manuf_item_descrip AS manufacturer_description, itemsrc.itemsrc_upccode AS bar_code, contrct.contrct_number AS contract_number, itemsrc.itemsrc_effective AS effective_date, itemsrc.itemsrc_expires AS expires_date FROM (((public.itemsrc LEFT JOIN public.item ON ((itemsrc.itemsrc_item_id = item.item_id))) LEFT JOIN public.vendinfo ON ((itemsrc.itemsrc_vend_id = vendinfo.vend_id))) LEFT JOIN public.contrct ON ((itemsrc.itemsrc_contrct_id = contrct.contrct_id))) ORDER BY (item.item_number)::character varying(100), (vendinfo.vend_number)::character varying(100); DROP VIEW api.itemsource; apiadminfalse53736"00VIEW itemsourceCOMMENT-COMMENT ON VIEW itemsource IS 'Item Source'; apiadminfalse796"00 itemsourceACLREVOKE ALL ON TABLE itemsource FROM PUBLIC; REVOKE ALL ON TABLE itemsource FROM admin; GRANT ALL ON TABLE itemsource TO admin; GRANT ALL ON TABLE itemsource TO xtrole; apiadminfalse79612591684124itemsrcpTABLECREATE TABLE itemsrcp ( itemsrcp_id integer DEFAULT nextval(('itemsrcp_itemsrcp_id_seq'::text)::regclass) NOT NULL, itemsrcp_itemsrc_id integer NOT NULL, itemsrcp_qtybreak numeric(18,6) NOT NULL, itemsrcp_price numeric(16,6), itemsrcp_updated date, itemsrcp_curr_id integer DEFAULT basecurrid() NOT NULL, itemsrcp_dropship boolean DEFAULT false NOT NULL, itemsrcp_warehous_id integer DEFAULT (-1) NOT NULL, itemsrcp_type character(1) NOT NULL, itemsrcp_discntprcnt numeric(16,6), itemsrcp_fixedamtdiscount numeric(16,6), CONSTRAINT valid_itemsrcp_type CHECK ((itemsrcp_type = ANY (ARRAY['N'::bpchar, 'D'::bpchar]))) ); DROP TABLE public.itemsrcp; publicadminfalse609760986099610061018"00TABLE itemsrcpCOMMENT>COMMENT ON TABLE itemsrcp IS 'Item Source Price information'; publicadminfalse233"00!COLUMN itemsrcp.itemsrcp_dropshipCOMMENTCOMMENT ON COLUMN itemsrcp.itemsrcp_dropship IS 'Used to determine if item source price applies only to drop ship purchase orders.'; publicadminfalse233"00$COLUMN itemsrcp.itemsrcp_warehous_idCOMMENTCOMMENT ON COLUMN itemsrcp.itemsrcp_warehous_id IS 'Used to determine if item source price applies only to specific site on purchase orders.'; publicadminfalse233"00COLUMN itemsrcp.itemsrcp_typeCOMMENTCOMMENT ON COLUMN itemsrcp.itemsrcp_type IS 'Pricing type for item source price. Valid values are N-nominal and D-discount.'; publicadminfalse233"00$COLUMN itemsrcp.itemsrcp_discntprcntCOMMENT^COMMENT ON COLUMN itemsrcp.itemsrcp_discntprcnt IS 'Discount percent for item source price.'; publicadminfalse233"00)COLUMN itemsrcp.itemsrcp_fixedamtdiscountCOMMENThCOMMENT ON COLUMN itemsrcp.itemsrcp_fixedamtdiscount IS 'Fixed amount discount for item source price.'; publicadminfalse233"00itemsrcpACLREVOKE ALL ON TABLE itemsrcp FROM PUBLIC; REVOKE ALL ON TABLE itemsrcp FROM admin; GRANT ALL ON TABLE itemsrcp TO admin; GRANT ALL ON TABLE itemsrcp TO xtrole; publicadminfalse23312592006210itemsourcepriceVIEWCREATE VIEW itemsourceprice AS SELECT (item.item_number)::character varying AS item_number, (vendinfo.vend_number)::character varying AS vendor, itemsrcp.itemsrcp_qtybreak AS qty_break, CASE WHEN (itemsrcp.itemsrcp_type = 'N'::bpchar) THEN 'Nominal'::text ELSE 'Discount'::text END AS pricing_type, CASE WHEN (itemsrcp.itemsrcp_warehous_id = (-1)) THEN 'All'::text ELSE whsinfo.warehous_code END AS pricing_site, itemsrcp.itemsrcp_dropship AS dropship_only, itemsrcp.itemsrcp_price AS price_per_unit, curr_symbol.curr_abbr AS currency, (itemsrcp.itemsrcp_discntprcnt * 100.0) AS discount_percent, itemsrcp.itemsrcp_fixedamtdiscount AS discount_fixed_amount FROM (((((public.itemsrcp LEFT JOIN public.itemsrc ON ((itemsrc.itemsrc_id = itemsrcp.itemsrcp_itemsrc_id))) LEFT JOIN public.item ON ((itemsrc.itemsrc_item_id = item.item_id))) LEFT JOIN public.vendinfo ON ((itemsrc.itemsrc_vend_id = vendinfo.vend_id))) LEFT JOIN public.curr_symbol ON ((itemsrcp.itemsrcp_curr_id = curr_symbol.curr_id))) LEFT JOIN public.whsinfo ON ((itemsrcp.itemsrcp_warehous_id = whsinfo.warehous_id))) ORDER BY (item.item_number)::character varying(100), (vendinfo.vend_number)::character varying(100); DROP VIEW api.itemsourceprice; apiadminfalse53776"00VIEW itemsourcepriceCOMMENT8COMMENT ON VIEW itemsourceprice IS 'Item Source Price'; apiadminfalse797"00itemsourcepriceACLREVOKE ALL ON TABLE itemsourceprice FROM PUBLIC; REVOKE ALL ON TABLE itemsourceprice FROM admin; GRANT ALL ON TABLE itemsourceprice TO admin; GRANT ALL ON TABLE itemsourceprice TO xtrole; apiadminfalse79712591684134itemsubTABLECREATE TABLE itemsub ( itemsub_id integer DEFAULT nextval(('itemsub_itemsub_id_seq'::text)::regclass) NOT NULL, itemsub_parent_item_id integer NOT NULL, itemsub_sub_item_id integer NOT NULL, itemsub_uomratio numeric(20,10) NOT NULL, itemsub_rank integer NOT NULL ); DROP TABLE public.itemsub; publicadminfalse61028"00 TABLE itemsubCOMMENT<COMMENT ON TABLE itemsub IS 'Item Substitutes information'; publicadminfalse234"00itemsubACLREVOKE ALL ON TABLE itemsub FROM PUBLIC; REVOKE ALL ON TABLE itemsub FROM admin; GRANT ALL ON TABLE itemsub TO admin; GRANT ALL ON TABLE itemsub TO xtrole; publicadminfalse23412592006220itemsubstituteVIEWCREATE VIEW itemsubstitute AS SELECT (p.item_number)::character varying AS root_item_number, (s.item_number)::character varying AS substitute_item_number, itemsub.itemsub_uomratio AS sub_parent_uom_ratio, itemsub.itemsub_rank AS ranking FROM public.item p, public.item s, public.itemsub WHERE ((p.item_id = itemsub.itemsub_parent_item_id) AND (s.item_id = itemsub.itemsub_sub_item_id)); DROP VIEW api.itemsubstitute; apiadminfalse53816"00VIEW itemsubstituteCOMMENT5COMMENT ON VIEW itemsubstitute IS 'Item Substitute'; apiadminfalse798"00itemsubstituteACLREVOKE ALL ON TABLE itemsubstitute FROM PUBLIC; REVOKE ALL ON TABLE itemsubstitute FROM admin; GRANT ALL ON TABLE itemsubstitute TO admin; GRANT ALL ON TABLE itemsubstitute TO xtrole; apiadminfalse79812591684142itemtaxTABLECREATE TABLE itemtax ( itemtax_id integer NOT NULL, itemtax_item_id integer NOT NULL, itemtax_taxtype_id integer NOT NULL, itemtax_taxzone_id integer ); DROP TABLE public.itemtax; publicadminfalse8"00 TABLE itemtaxCOMMENTpCOMMENT ON TABLE itemtax IS 'This table associates tax types in a specified tax authority for the given item.'; publicadminfalse235"00itemtaxACLREVOKE ALL ON TABLE itemtax FROM PUBLIC; REVOKE ALL ON TABLE itemtax FROM admin; GRANT ALL ON TABLE itemtax TO admin; GRANT ALL ON TABLE itemtax TO xtrole; publicadminfalse23512592006227 itemtaxtypeVIEWCREATE VIEW itemtaxtype AS SELECT (item.item_number)::character varying AS item_number, CASE WHEN (taxzone.taxzone_id IS NULL) THEN 'Any'::character varying ELSE (taxzone.taxzone_code)::character varying END AS tax_zone, taxtype.taxtype_name AS tax_type FROM public.item, (public.itemtax LEFT JOIN public.taxzone ON ((itemtax.itemtax_taxzone_id = taxzone.taxzone_id))), public.taxtype WHERE ((item.item_id = itemtax.itemtax_item_id) AND (itemtax.itemtax_taxtype_id = taxtype.taxtype_id)); DROP VIEW api.itemtaxtype; apiadminfalse53856"00VIEW itemtaxtypeCOMMENT0COMMENT ON VIEW itemtaxtype IS 'Item Tax Type'; apiadminfalse799#00 itemtaxtypeACLREVOKE ALL ON TABLE itemtaxtype FROM PUBLIC; REVOKE ALL ON TABLE itemtaxtype FROM admin; GRANT ALL ON TABLE itemtaxtype TO admin; GRANT ALL ON TABLE itemtaxtype TO xtrole; apiadminfalse79912591684149 itemuomconvTABLECREATE TABLE itemuomconv ( itemuomconv_id integer NOT NULL, itemuomconv_item_id integer NOT NULL, itemuomconv_from_uom_id integer NOT NULL, itemuomconv_from_value numeric(20,10) NOT NULL, itemuomconv_to_uom_id integer NOT NULL, itemuomconv_to_value numeric(20,10) NOT NULL, itemuomconv_fractional boolean DEFAULT false NOT NULL, CONSTRAINT itemuomconv_uom CHECK ((itemuomconv_from_uom_id <> itemuomconv_to_uom_id)) ); DROP TABLE public.itemuomconv; publicadminfalse610561068#00TABLE itemuomconvCOMMENTfCOMMENT ON TABLE itemuomconv IS 'UOM conversion information. From Unit to To Unit with a value per.'; publicadminfalse236#00 itemuomconvACLREVOKE ALL ON TABLE itemuomconv FROM PUBLIC; REVOKE ALL ON TABLE itemuomconv FROM admin; GRANT ALL ON TABLE itemuomconv TO admin; GRANT ALL ON TABLE itemuomconv TO xtrole; publicadminfalse236 12592006234itemuomconversionVIEWgCREATE VIEW itemuomconversion AS SELECT (item.item_number)::character varying AS item_number, (f.uom_name)::character varying AS uom, itemuomconv.itemuomconv_from_value AS uom_value, p.uom_name AS per_uom, itemuomconv.itemuomconv_to_value AS per_uom_value, itemuomconv.itemuomconv_fractional AS fractional, public.fetchitemuomconvtypes(itemuomconv.itemuomconv_id) AS selected_types FROM public.item, public.itemuomconv, public.uom f, public.uom p WHERE (((item.item_id = itemuomconv.itemuomconv_item_id) AND (itemuomconv.itemuomconv_from_uom_id = f.uom_id)) AND (itemuomconv.itemuomconv_to_uom_id = p.uom_id)); !DROP VIEW api.itemuomconversion; apiadminfalse53896#00VIEW itemuomconversionCOMMENTHCOMMENT ON VIEW itemuomconversion IS 'Item Unit of Measure Conversion'; apiadminfalse800#00itemuomconversionACLREVOKE ALL ON TABLE itemuomconversion FROM PUBLIC; REVOKE ALL ON TABLE itemuomconversion FROM admin; GRANT ALL ON TABLE itemuomconversion TO admin; GRANT ALL ON TABLE itemuomconversion TO xtrole; apiadminfalse80012591684158gltransTABLECREATE TABLE gltrans ( gltrans_id integer DEFAULT nextval(('"gltrans_gltrans_id_seq"'::text)::regclass) NOT NULL, gltrans_exported boolean, gltrans_created timestamp with time zone, gltrans_date date NOT NULL, gltrans_sequence integer, gltrans_accnt_id integer NOT NULL, gltrans_source text, gltrans_docnumber text, gltrans_misc_id integer, gltrans_amount numeric(20,2) NOT NULL, gltrans_notes text, gltrans_journalnumber integer, gltrans_posted boolean NOT NULL, gltrans_doctype text, gltrans_rec boolean DEFAULT false NOT NULL, gltrans_username text DEFAULT geteffectivextuser() NOT NULL, gltrans_deleted boolean DEFAULT false ); DROP TABLE public.gltrans; publicadminfalse61076108610961108#00 TABLE gltransCOMMENTLCOMMENT ON TABLE gltrans IS 'General Ledger (G/L) transaction information'; publicadminfalse237#00gltransACLREVOKE ALL ON TABLE gltrans FROM PUBLIC; REVOKE ALL ON TABLE gltrans FROM admin; GRANT ALL ON TABLE gltrans TO admin; GRANT ALL ON TABLE gltrans TO xtrole; publicadminfalse237!12592006241 journalentryVIEWCREATE VIEW journalentry AS SELECT curr_symbol.curr_abbr AS currency, c.gltrans_amount AS amount, c.gltrans_date AS dist_date, c.gltrans_docnumber AS doc_number, public.formatglaccount(da.accnt_id) AS debit, public.formatglaccount(ca.accnt_id) AS credit, c.gltrans_notes AS notes FROM public.gltrans d, public.gltrans c, public.accnt da, public.accnt ca, public.curr_symbol WHERE ((((((((d.gltrans_sequence = c.gltrans_sequence) AND (d.gltrans_accnt_id = da.accnt_id)) AND (c.gltrans_accnt_id = ca.accnt_id)) AND (d.gltrans_amount < (0)::numeric)) AND (c.gltrans_amount > (0)::numeric)) AND (d.gltrans_doctype = 'JE'::text)) AND (c.gltrans_doctype = 'JE'::text)) AND (curr_symbol.curr_id = public.basecurrid())) ORDER BY d.gltrans_date DESC; DROP VIEW api.journalentry; apiadminfalse53936#00VIEW journalentryCOMMENT1COMMENT ON VIEW journalentry IS 'Journal Entry'; apiadminfalse801#00 journalentryACLREVOKE ALL ON TABLE journalentry FROM PUBLIC; REVOKE ALL ON TABLE journalentry FROM admin; GRANT ALL ON TABLE journalentry TO admin; GRANT ALL ON TABLE journalentry TO xtrole; apiadminfalse80112591684173whsezoneTABLECREATE TABLE whsezone ( whsezone_id integer NOT NULL, whsezone_warehous_id integer NOT NULL, whsezone_name text NOT NULL, whsezone_descrip text ); DROP TABLE public.whsezone; publicadminfalse8 #00TABLE whsezoneCOMMENT;COMMENT ON TABLE whsezone IS 'Warehouse Zone information'; publicadminfalse238 #00whsezoneACLREVOKE ALL ON TABLE whsezone FROM PUBLIC; REVOKE ALL ON TABLE whsezone FROM admin; GRANT ALL ON TABLE whsezone TO admin; GRANT ALL ON TABLE whsezone TO xtrole; publicadminfalse238"12592006249locationVIEWCREATE VIEW location AS SELECT (whsinfo.warehous_code)::character varying AS site, (location.location_aisle)::character varying AS aisle, (location.location_rack)::character varying AS rack, (location.location_bin)::character varying AS bin, (location.location_name)::character varying AS location, whsezone.whsezone_name AS zone, location.location_netable AS netable, location.location_restrict AS restricted, location.location_descrip AS description FROM ((public.location LEFT JOIN public.whsinfo ON ((whsinfo.warehous_id = location.location_warehous_id))) LEFT JOIN public.whsezone ON ((whsezone.whsezone_id = location.location_whsezone_id))); DROP VIEW api.location; apiadminfalse53976 #00 VIEW locationCOMMENT(COMMENT ON VIEW location IS 'Location'; apiadminfalse802 #00locationACLREVOKE ALL ON TABLE location FROM PUBLIC; REVOKE ALL ON TABLE location FROM admin; GRANT ALL ON TABLE location TO admin; GRANT ALL ON TABLE location TO xtrole; apiadminfalse802#12592006257 misccounttagVIEWCREATE VIEW misccounttag AS SELECT 'This view is for inserts only'::text AS site, 'This view is for inserts only'::text AS item_number, (0)::numeric AS quantity, 'This view is for inserts only'::text AS comment; DROP VIEW api.misccounttag; apiadminfalse54016 #00VIEW misccounttagCOMMENT;COMMENT ON VIEW misccounttag IS 'Miscellaneous Count Tag'; apiadminfalse803#00 misccounttagACLREVOKE ALL ON TABLE misccounttag FROM PUBLIC; REVOKE ALL ON TABLE misccounttag FROM admin; GRANT ALL ON TABLE misccounttag TO admin; GRANT ALL ON TABLE misccounttag TO xtrole; apiadminfalse803$12592006265pricingscheduleVIEWCREATE VIEW pricingschedule AS SELECT (ipshead.ipshead_name)::character varying AS name, ipshead.ipshead_descrip AS description, public.formatdate(ipshead.ipshead_effective, 'Always'::text) AS effective, public.formatdate(ipshead.ipshead_expires, 'Never'::text) AS expires, curr_symbol.curr_abbr AS currency FROM public.ipshead, public.curr_symbol WHERE (curr_symbol.curr_id = ipshead.ipshead_curr_id); DROP VIEW api.pricingschedule; apiadminfalse54056#00VIEW pricingscheduleCOMMENT7COMMENT ON VIEW pricingschedule IS 'Pricing Schedule'; apiadminfalse804#00pricingscheduleACLREVOKE ALL ON TABLE pricingschedule FROM PUBLIC; REVOKE ALL ON TABLE pricingschedule FROM admin; GRANT ALL ON TABLE pricingschedule TO admin; GRANT ALL ON TABLE pricingschedule TO xtrole; apiadminfalse80412591684192ipsassTABLE CREATE TABLE ipsass ( ipsass_id integer NOT NULL, ipsass_ipshead_id integer NOT NULL, ipsass_cust_id integer, ipsass_custtype_id integer, ipsass_custtype_pattern text, ipsass_shipto_id integer DEFAULT (-1), ipsass_shipto_pattern text ); DROP TABLE public.ipsass; publicadminfalse61138#00 TABLE ipsassCOMMENTFCOMMENT ON TABLE ipsass IS 'Pricing Schedule assignment information'; publicadminfalse239#00ipsassACLREVOKE ALL ON TABLE ipsass FROM PUBLIC; REVOKE ALL ON TABLE ipsass FROM admin; GRANT ALL ON TABLE ipsass TO admin; GRANT ALL ON TABLE ipsass TO xtrole; publicadminfalse239%12592006273pricingscheduleassignVIEWCREATE VIEW pricingscheduleassign AS SELECT (COALESCE(custinfo.cust_number, 'Any'::text))::character varying AS customer_number, (COALESCE(shiptoinfo.shipto_num, 'Any'::text))::character varying AS customer_shipto, (COALESCE(ipsass.ipsass_shipto_pattern, 'N/A'::text))::character varying AS customer_shipto_pattern, (COALESCE(custtype.custtype_code, 'N/A'::text))::character varying AS customer_type, (COALESCE(ipsass.ipsass_custtype_pattern, 'N/A'::text))::character varying AS customer_type_pattern, (ipshead.ipshead_name)::character varying AS pricing_schedule FROM ((((public.ipshead JOIN public.ipsass ON ((ipshead.ipshead_id = ipsass.ipsass_ipshead_id))) LEFT JOIN public.custinfo ON ((ipsass.ipsass_cust_id = custinfo.cust_id))) LEFT JOIN public.custtype ON ((ipsass.ipsass_custtype_id = custtype.custtype_id))) LEFT JOIN public.shiptoinfo ON ((ipsass.ipsass_shipto_id = shiptoinfo.shipto_id))) ORDER BY (COALESCE(custinfo.cust_number, 'Any'::text))::character varying, (COALESCE(shiptoinfo.shipto_num, 'Any'::text))::character varying, (COALESCE(custtype.custtype_code, 'N/A'::text))::character varying, (COALESCE(ipsass.ipsass_custtype_pattern, 'N/A'::text))::character varying, (ipshead.ipshead_name)::character varying; %DROP VIEW api.pricingscheduleassign; apiadminfalse54096#00VIEW pricingscheduleassignCOMMENTICOMMENT ON VIEW pricingscheduleassign IS 'Pricing Schedule Assignments'; apiadminfalse805#00pricingscheduleassignACLREVOKE ALL ON TABLE pricingscheduleassign FROM PUBLIC; REVOKE ALL ON TABLE pricingscheduleassign FROM admin; GRANT ALL ON TABLE pricingscheduleassign TO admin; GRANT ALL ON TABLE pricingscheduleassign TO xtrole; apiadminfalse80512591684204 ipsiteminfoTABLECREATE TABLE ipsiteminfo ( ipsitem_id integer DEFAULT nextval(('"ipsitem_ipsitem_id_seq"'::text)::regclass) NOT NULL, ipsitem_ipshead_id integer, ipsitem_item_id integer, ipsitem_qtybreak numeric(18,6) NOT NULL, ipsitem_price numeric(16,4) NOT NULL, ipsitem_qty_uom_id integer, ipsitem_price_uom_id integer, ipsitem_discntprcnt numeric(10,6) DEFAULT 0.00 NOT NULL, ipsitem_fixedamtdiscount numeric(16,4) DEFAULT 0.00 NOT NULL, ipsitem_prodcat_id integer, ipsitem_type character(1) NOT NULL, ipsitem_warehous_id integer, CONSTRAINT valid_ipsitem_type CHECK ((ipsitem_type = ANY (ARRAY['N'::bpchar, 'D'::bpchar, 'M'::bpchar]))) ); DROP TABLE public.ipsiteminfo; publicadminfalse61146115611661178#00TABLE ipsiteminfoCOMMENTECOMMENT ON TABLE ipsiteminfo IS 'Pricing Schedule Item information'; publicadminfalse240#00%COLUMN ipsiteminfo.ipsitem_prodcat_idCOMMENTcCOMMENT ON COLUMN ipsiteminfo.ipsitem_prodcat_id IS 'Product category for pricing schedule item.'; publicadminfalse240#00COLUMN ipsiteminfo.ipsitem_typeCOMMENTCOMMENT ON COLUMN ipsiteminfo.ipsitem_type IS 'Pricing type for pricing schedule item. Valid values are N-nominal, D-discount, and M-markup'; publicadminfalse240#00&COLUMN ipsiteminfo.ipsitem_warehous_idCOMMENTvCOMMENT ON COLUMN ipsiteminfo.ipsitem_warehous_id IS 'Site for pricing schedule item which enables pricing by site.'; publicadminfalse240#00 ipsiteminfoACLREVOKE ALL ON TABLE ipsiteminfo FROM PUBLIC; REVOKE ALL ON TABLE ipsiteminfo FROM admin; GRANT ALL ON TABLE ipsiteminfo TO admin; GRANT ALL ON TABLE ipsiteminfo TO xtrole; publicadminfalse240&12592006282pricingscheduleitemVIEWCREATE VIEW pricingscheduleitem AS SELECT (ipshead.ipshead_name)::character varying AS pricing_schedule, CASE WHEN (COALESCE(ipsiteminfo.ipsitem_item_id, (-1)) > 0) THEN 'Item'::character varying ELSE 'Product Category'::character varying END AS type, (COALESCE(item.item_number, ''::text))::character varying AS item_number, (COALESCE(prodcat.prodcat_code, ''::text))::character varying AS product_category, ipsiteminfo.ipsitem_qtybreak AS qty_break, (qtyuom.uom_name)::character varying AS qty_uom, (priceuom.uom_name)::character varying AS price_uom, ipsiteminfo.ipsitem_price AS price, ipsiteminfo.ipsitem_discntprcnt AS percent, ipsiteminfo.ipsitem_fixedamtdiscount AS fixedamt, CASE WHEN (ipsiteminfo.ipsitem_type = 'N'::bpchar) THEN 'Nominal'::character varying WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN 'Discount'::character varying WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN 'Markup'::character varying ELSE NULL::character varying END AS pricing_type FROM (((((public.ipsiteminfo JOIN public.ipshead ON ((ipsiteminfo.ipsitem_ipshead_id = ipshead.ipshead_id))) LEFT JOIN public.item ON ((ipsiteminfo.ipsitem_item_id = item.item_id))) LEFT JOIN public.prodcat ON ((ipsiteminfo.ipsitem_prodcat_id = prodcat.prodcat_id))) LEFT JOIN public.uom qtyuom ON ((ipsiteminfo.ipsitem_qty_uom_id = qtyuom.uom_id))) LEFT JOIN public.uom priceuom ON ((ipsiteminfo.ipsitem_price_uom_id = priceuom.uom_id))); #DROP VIEW api.pricingscheduleitem; apiadminfalse54136#00VIEW pricingscheduleitemCOMMENT@COMMENT ON VIEW pricingscheduleitem IS 'Pricing Schedule Item'; apiadminfalse806#00pricingscheduleitemACLREVOKE ALL ON TABLE pricingscheduleitem FROM PUBLIC; REVOKE ALL ON TABLE pricingscheduleitem FROM admin; GRANT ALL ON TABLE pricingscheduleitem TO admin; GRANT ALL ON TABLE pricingscheduleitem TO xtrole; apiadminfalse80612591684219 ipsitemcharTABLECREATE TABLE ipsitemchar ( ipsitemchar_id integer NOT NULL, ipsitemchar_ipsitem_id integer NOT NULL, ipsitemchar_char_id integer NOT NULL, ipsitemchar_value text NOT NULL, ipsitemchar_price numeric(16,4) ); DROP TABLE public.ipsitemchar; publicadminfalse8#00TABLE ipsitemcharCOMMENTNCOMMENT ON TABLE ipsitemchar IS 'Item Price Schedule Characteristic Prices.'; publicadminfalse242#00 ipsitemcharACLREVOKE ALL ON TABLE ipsitemchar FROM PUBLIC; REVOKE ALL ON TABLE ipsitemchar FROM admin; GRANT ALL ON TABLE ipsitemchar TO admin; GRANT ALL ON TABLE ipsitemchar TO xtrole; publicadminfalse242'12592006292pricingscheduleitemcharVIEWCREATE VIEW pricingscheduleitemchar AS SELECT (ipshead.ipshead_name)::character varying AS pricing_schedule, (item.item_number)::character varying AS item_number, ipsiteminfo.ipsitem_qtybreak AS qty_break, (qtyuom.uom_name)::character varying AS qty_uom, (priceuom.uom_name)::character varying AS price_uom, ("char".char_name)::character varying AS characteristic, (ipsitemchar.ipsitemchar_value)::character varying AS value, ipsitemchar.ipsitemchar_price AS price FROM public.ipshead, public.ipsiteminfo, public.ipsitemchar, public.item, public."char", public.uom qtyuom, public.uom priceuom WHERE ((((((ipshead.ipshead_id = ipsiteminfo.ipsitem_ipshead_id) AND (ipsiteminfo.ipsitem_id = ipsitemchar.ipsitemchar_ipsitem_id)) AND (ipsiteminfo.ipsitem_item_id = item.item_id)) AND (ipsiteminfo.ipsitem_qty_uom_id = qtyuom.uom_id)) AND (ipsiteminfo.ipsitem_price_uom_id = priceuom.uom_id)) AND (ipsitemchar.ipsitemchar_char_id = "char".char_id)); 'DROP VIEW api.pricingscheduleitemchar; apiadminfalse54176#00VIEW pricingscheduleitemcharCOMMENTTCOMMENT ON VIEW pricingscheduleitemchar IS 'Pricing Schedule Item Characteristics'; apiadminfalse807#00pricingscheduleitemcharACLREVOKE ALL ON TABLE pricingscheduleitemchar FROM PUBLIC; REVOKE ALL ON TABLE pricingscheduleitemchar FROM admin; GRANT ALL ON TABLE pricingscheduleitemchar TO admin; GRANT ALL ON TABLE pricingscheduleitemchar TO xtrole; apiadminfalse807(12592006300projectVIEWnCREATE VIEW project AS SELECT prj.prj_number AS number, prj.prj_name AS name, prj.prj_descrip AS description, prj.prj_owner_username AS owner, prj.prj_username AS assigned_to, prj.prj_so AS sales_orders, prj.prj_wo AS work_orders, prj.prj_po AS purchase_orders, CASE WHEN (prj.prj_status = 'P'::bpchar) THEN 'Concept'::text WHEN (prj.prj_status = 'O'::bpchar) THEN 'In-Process'::text WHEN (prj.prj_status = 'C'::bpchar) THEN 'Closed'::text ELSE 'Error'::text END AS status, prj.prj_due_date AS due, prj.prj_assigned_date AS assigned, prj.prj_start_date AS started, prj.prj_completed_date AS completed FROM public.prj; DROP VIEW api.project; apiadminfalse54216 #00 VIEW projectCOMMENT&COMMENT ON VIEW project IS 'Project'; apiadminfalse808!#00projectACLREVOKE ALL ON TABLE project FROM PUBLIC; REVOKE ALL ON TABLE project FROM admin; GRANT ALL ON TABLE project TO admin; GRANT ALL ON TABLE project TO xtrole; apiadminfalse808)12592006307projectcommentVIEWCREATE VIEW projectcomment AS SELECT (prj.prj_number)::character varying AS project_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.prj, public.cmnttype, public.comment WHERE (((comment.comment_source = 'J'::text) AND (comment.comment_source_id = prj.prj_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.projectcomment; apiadminfalse54256"#00VIEW projectcommentCOMMENT5COMMENT ON VIEW projectcomment IS 'Project Comment'; apiadminfalse809##00projectcommentACLREVOKE ALL ON TABLE projectcomment FROM PUBLIC; REVOKE ALL ON TABLE projectcomment FROM admin; GRANT ALL ON TABLE projectcomment TO admin; GRANT ALL ON TABLE projectcomment TO xtrole; apiadminfalse80912591684238cust_cust_id_seqSEQUENCErCREATE SEQUENCE cust_cust_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.cust_cust_id_seq; publicadminfalse8$#00cust_cust_id_seq SEQUENCE SET9SELECT pg_catalog.setval('cust_cust_id_seq', 123, true); publicadminfalse243%#00cust_cust_id_seqACLREVOKE ALL ON SEQUENCE cust_cust_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cust_cust_id_seq FROM admin; GRANT ALL ON SEQUENCE cust_cust_id_seq TO admin; GRANT ALL ON SEQUENCE cust_cust_id_seq TO xtrole; publicadminfalse24312591684240prospectTABLECREATE TABLE prospect ( prospect_id integer DEFAULT nextval('cust_cust_id_seq'::regclass) NOT NULL, prospect_active boolean DEFAULT true NOT NULL, prospect_number text NOT NULL, prospect_name text NOT NULL, prospect_cntct_id integer, prospect_comments text, prospect_created date DEFAULT ('now'::text)::date NOT NULL, prospect_salesrep_id integer, prospect_warehous_id integer, prospect_taxzone_id integer, CONSTRAINT prospect_prospect_number_check CHECK ((prospect_number <> ''::text)) ); DROP TABLE public.prospect; publicadminfalse61216122612361248&#00TABLE prospectCOMMENT5COMMENT ON TABLE prospect IS 'Prospect Information'; publicadminfalse244'#00prospectACLREVOKE ALL ON TABLE prospect FROM PUBLIC; REVOKE ALL ON TABLE prospect FROM admin; GRANT ALL ON TABLE prospect TO admin; GRANT ALL ON TABLE prospect TO xtrole; publicadminfalse244*12592006314prospectVIEWCREATE VIEW prospect AS SELECT (prospect.prospect_number)::character varying AS prospect_number, prospect.prospect_name, prospect.prospect_active AS active, salesrep.salesrep_number AS sales_rep, whsinfo.warehous_code AS site_code, taxzone.taxzone_code AS default_tax_zone, prospect.prospect_comments AS notes, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS contact_honorific, cntct.cntct_first_name AS contact_first, cntct.cntct_middle AS contact_middle, cntct.cntct_last_name AS contact_last, cntct.cntct_suffix AS contact_suffix, cntct.cntct_title AS contact_job_title, cntct.cntct_phone AS contact_voice, cntct.cntct_phone2 AS contact_alternate, cntct.cntct_fax AS contact_fax, cntct.cntct_email AS contact_email, cntct.cntct_webaddr AS contact_web, ''::text AS contact_change, addr.addr_number AS contact_address_number, addr.addr_line1 AS contact_address1, addr.addr_line2 AS contact_address2, addr.addr_line3 AS contact_address3, addr.addr_city AS contact_city, addr.addr_state AS contact_state, addr.addr_postalcode AS contact_postalcode, addr.addr_country AS contact_country, ''::text AS contact_address_change FROM (((((public.prospect LEFT JOIN public.cntct ON ((prospect.prospect_cntct_id = cntct.cntct_id))) LEFT JOIN public.addr ON ((cntct.cntct_addr_id = addr.addr_id))) LEFT JOIN public.taxzone ON ((prospect.prospect_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.salesrep ON ((prospect.prospect_salesrep_id = salesrep.salesrep_id))) LEFT JOIN public.whsinfo ON ((prospect.prospect_warehous_id = whsinfo.warehous_id))); DROP VIEW api.prospect; apiadminfalse54296(#00 VIEW prospectCOMMENT(COMMENT ON VIEW prospect IS 'Prospect'; apiadminfalse810)#00prospectACLREVOKE ALL ON TABLE prospect FROM PUBLIC; REVOKE ALL ON TABLE prospect FROM admin; GRANT ALL ON TABLE prospect TO admin; GRANT ALL ON TABLE prospect TO xtrole; apiadminfalse81012591684254expcatTABLEkCREATE TABLE expcat ( expcat_id integer NOT NULL, expcat_code text NOT NULL, expcat_descrip text, expcat_exp_accnt_id integer, expcat_liability_accnt_id integer, expcat_active boolean, expcat_purchprice_accnt_id integer, expcat_freight_accnt_id integer, CONSTRAINT expcat_expcat_code_check CHECK ((expcat_code <> ''::text)) ); DROP TABLE public.expcat; publicadminfalse61268*#00 TABLE expcatCOMMENT;COMMENT ON TABLE expcat IS 'Expense Category information'; publicadminfalse245+#00expcatACLREVOKE ALL ON TABLE expcat FROM PUBLIC; REVOKE ALL ON TABLE expcat FROM admin; GRANT ALL ON TABLE expcat TO admin; GRANT ALL ON TABLE expcat TO xtrole; publicadminfalse24512591684260womatlTABLECREATE TABLE womatl ( womatl_id integer DEFAULT nextval(('womatl_womatl_id_seq'::text)::regclass) NOT NULL, womatl_wo_id integer, womatl_itemsite_id integer, womatl_qtyper numeric(20,8) NOT NULL, womatl_scrap numeric(8,4) NOT NULL, womatl_qtyreq numeric(18,6) NOT NULL, womatl_qtyiss numeric(18,6) NOT NULL, womatl_qtywipscrap numeric(18,6) NOT NULL, womatl_lastissue date, womatl_lastreturn date, womatl_cost numeric(16,6), womatl_picklist boolean, womatl_status character(1), womatl_imported boolean DEFAULT false, womatl_createwo boolean, womatl_issuemethod character(1), womatl_wooper_id integer, womatl_bomitem_id integer, womatl_duedate date, womatl_schedatwooper boolean, womatl_uom_id integer NOT NULL, womatl_notes text, womatl_ref text, womatl_scrapvalue numeric(16,6) DEFAULT 0, womatl_qtyfxd numeric(20,8) DEFAULT 0 NOT NULL, womatl_issuewo boolean DEFAULT false NOT NULL ); DROP TABLE public.womatl; publicadminfalse612761286129613061318,#00 TABLE womatlCOMMENTKCOMMENT ON TABLE womatl IS 'Work Order Material Requirements information'; publicadminfalse246-#00COLUMN womatl.womatl_qtyfxdCOMMENTICOMMENT ON COLUMN womatl.womatl_qtyfxd IS 'The fixed quantity required'; publicadminfalse246.#00womatlACLREVOKE ALL ON TABLE womatl FROM PUBLIC; REVOKE ALL ON TABLE womatl FROM admin; GRANT ALL ON TABLE womatl TO admin; GRANT ALL ON TABLE womatl TO xtrole; publicadminfalse246+12592006324 purchaselineVIEWCREATE VIEW purchaseline AS SELECT (pohead.pohead_number)::character varying AS order_number, poitem.poitem_linenumber AS line_number, item.item_number, whsinfo.warehous_code AS site, expcat.expcat_code AS expense_category, poitem.poitem_qty_ordered AS qty_ordered, poitem.poitem_unitprice AS unit_price, poitem.poitem_freight AS freight, poitem.poitem_duedate AS due_date, prj.prj_number AS project_number, poitem.poitem_vend_item_number AS vend_item_number, poitem.poitem_vend_item_descrip AS vendor_description, poitem.poitem_manuf_name AS manufacturer_name, poitem.poitem_manuf_item_number AS manufacturer_item_number, poitem.poitem_manuf_item_descrip AS manufacturer_description, poitem.poitem_comments AS notes, public.formatrevnumber('BOM'::text, poitem.poitem_bom_rev_id) AS bill_of_materials_revision, public.formatrevnumber('BOO'::text, poitem.poitem_boo_rev_id) AS bill_of_operations_revision, public.formatsonumber(coitem.coitem_id) AS sales_order_number, public.formatwonumber(womatl.womatl_wo_id) AS work_order_number FROM ((((((((public.pohead JOIN public.poitem ON ((pohead.pohead_id = poitem.poitem_pohead_id))) LEFT JOIN public.prj ON ((poitem.poitem_prj_id = prj.prj_id))) LEFT JOIN public.expcat ON ((poitem.poitem_expcat_id = expcat.expcat_id))) LEFT JOIN public.itemsite ON ((poitem.poitem_itemsite_id = itemsite.itemsite_id))) LEFT JOIN public.item ON ((itemsite.itemsite_item_id = item.item_id))) LEFT JOIN public.whsinfo ON ((itemsite.itemsite_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.coitem ON (((coitem.coitem_id = poitem.poitem_order_id) AND (poitem.poitem_order_type = 'S'::bpchar)))) LEFT JOIN public.womatl ON (((womatl.womatl_id = poitem.poitem_order_id) AND (poitem.poitem_order_type = 'W'::bpchar)))) ORDER BY pohead.pohead_number, poitem.poitem_linenumber; DROP VIEW api.purchaseline; apiadminfalse54336/#00VIEW purchaselineCOMMENT7COMMENT ON VIEW purchaseline IS 'Purchase Order Line'; apiadminfalse8110#00 purchaselineACLREVOKE ALL ON TABLE purchaseline FROM PUBLIC; REVOKE ALL ON TABLE purchaseline FROM admin; GRANT ALL ON TABLE purchaseline TO admin; GRANT ALL ON TABLE purchaseline TO xtrole; apiadminfalse811,12592006336purchaselinecharVIEWYCREATE VIEW purchaselinechar AS SELECT (data.order_number)::character varying AS order_number, data.line_number, data.characteristic, COALESCE(pi.charass_value, i3.charass_value) AS value FROM (((((SELECT DISTINCT "char".char_id, poitem.poitem_id, poitem.poitem_itemsite_id, pohead.pohead_number AS order_number, poitem.poitem_linenumber AS line_number, "char".char_name AS characteristic FROM public.pohead, public.poitem, public.itemsite, public.item, public.charass, public."char" WHERE ((((((pohead.pohead_id = poitem.poitem_pohead_id) AND (poitem.poitem_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (charass.charass_char_id = "char".char_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id))) data LEFT JOIN public.charass pi ON ((((data.poitem_id = pi.charass_target_id) AND ('PI'::text = pi.charass_target_type)) AND (pi.charass_char_id = data.char_id)))) LEFT JOIN public.itemsite i1 ON ((data.poitem_itemsite_id = i1.itemsite_id))) LEFT JOIN public.item i2 ON ((i1.itemsite_item_id = i2.item_id))) LEFT JOIN public.charass i3 ON (((((i2.item_id = i3.charass_target_id) AND ('I'::text = i3.charass_target_type)) AND (i3.charass_char_id = data.char_id)) AND i3.charass_default))) ORDER BY (data.order_number)::character varying, data.line_number, data.characteristic; DROP VIEW api.purchaselinechar; apiadminfalse543861#00VIEW purchaselinecharCOMMENTOCOMMENT ON VIEW purchaselinechar IS 'Purchase Order Line Item Characteristic'; apiadminfalse8122#00purchaselinecharACLREVOKE ALL ON TABLE purchaselinechar FROM PUBLIC; REVOKE ALL ON TABLE purchaselinechar FROM admin; GRANT ALL ON TABLE purchaselinechar TO admin; GRANT ALL ON TABLE purchaselinechar TO xtrole; apiadminfalse812-12592006346purchaselinecommentVIEWuCREATE VIEW purchaselinecomment AS SELECT (pohead.pohead_number)::character varying AS order_number, poitem.poitem_linenumber AS line_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.pohead, public.poitem, public.cmnttype, public.comment WHERE ((((pohead.pohead_id = poitem.poitem_pohead_id) AND (comment.comment_source = 'PI'::text)) AND (comment.comment_source_id = poitem.poitem_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)) ORDER BY pohead.pohead_number, poitem.poitem_linenumber, comment.comment_date DESC; #DROP VIEW api.purchaselinecomment; apiadminfalse544263#00VIEW purchaselinecommentCOMMENTKCOMMENT ON VIEW purchaselinecomment IS 'Purchase Order Line Item Comment'; apiadminfalse8134#00purchaselinecommentACLREVOKE ALL ON TABLE purchaselinecomment FROM PUBLIC; REVOKE ALL ON TABLE purchaselinecomment FROM admin; GRANT ALL ON TABLE purchaselinecomment TO admin; GRANT ALL ON TABLE purchaselinecomment TO xtrole; apiadminfalse81312591684286taxTABLESCREATE TABLE tax ( tax_id integer DEFAULT nextval(('"tax_tax_id_seq"'::text)::regclass) NOT NULL, tax_code text NOT NULL, tax_descrip text, tax_sales_accnt_id integer, tax_taxclass_id integer, tax_taxauth_id integer, tax_basis_tax_id integer, CONSTRAINT tax_tax_code_check CHECK ((tax_code <> ''::text)) ); DROP TABLE public.tax; publicadminfalse6132613385#00 TABLE taxCOMMENT+COMMENT ON TABLE tax IS 'Tax information'; publicadminfalse2476#00COLUMN tax.tax_sales_accnt_idCOMMENTNCOMMENT ON COLUMN tax.tax_sales_accnt_id IS 'Deprecated column - DO NOT USE'; publicadminfalse2477#00taxACLREVOKE ALL ON TABLE tax FROM PUBLIC; REVOKE ALL ON TABLE tax FROM admin; GRANT ALL ON TABLE tax TO admin; GRANT ALL ON TABLE tax TO xtrole; publicadminfalse24712591684293 vendaddrinfoTABLEFCREATE TABLE vendaddrinfo ( vendaddr_id integer DEFAULT nextval(('vendaddr_vendaddr_id_seq'::text)::regclass) NOT NULL, vendaddr_vend_id integer, vendaddr_code text, vendaddr_name text, vendaddr_comments text, vendaddr_cntct_id integer, vendaddr_addr_id integer, vendaddr_taxzone_id integer ); DROP TABLE public.vendaddrinfo; publicadminfalse613488#00TABLE vendaddrinfoCOMMENT?COMMENT ON TABLE vendaddrinfo IS 'Vendor Address information'; publicadminfalse2489#00 vendaddrinfoACLREVOKE ALL ON TABLE vendaddrinfo FROM PUBLIC; REVOKE ALL ON TABLE vendaddrinfo FROM admin; GRANT ALL ON TABLE vendaddrinfo TO admin; GRANT ALL ON TABLE vendaddrinfo TO xtrole; publicadminfalse248.12592006355 purchaseorderVIEWCREATE VIEW purchaseorder AS SELECT (pohead.pohead_number)::character varying AS order_number, pohead.pohead_orderdate AS order_date, terms.terms_code AS terms, taxzone.taxzone_code AS tax_zone, whsinfo.warehous_code AS receiving_site, pohead.pohead_agent_username AS purchasing_agent, vendinfo.vend_number AS vendor_number, COALESCE(ua.vendaddr_code, 'MAIN'::text) AS alt_address, pohead.pohead_fob AS fob, pohead.pohead_shipvia AS ship_via, curr_symbol.curr_abbr AS currency, (SELECT COALESCE(sum(data.tax), 0.00) AS tax FROM (SELECT round(sum(calculatetaxdetailsummary.taxdetail_tax), 2) AS tax FROM (public.tax JOIN public.calculatetaxdetailsummary('PO'::text, pohead.pohead_id, 'T'::text) calculatetaxdetailsummary(taxdetail_tax_id, taxdetail_tax_code, taxdetail_tax_descrip, taxdetail_tax_basis_tax_id, taxdetail_taxrate_percent, taxdetail_taxrate_amount, taxdetail_level, taxdetail_taxclass_id, taxdetail_taxclass_code, taxdetail_taxclass_sequence, taxdetail_tax, taxdetail_curr_id, taxdetail_curr_abbr) ON ((calculatetaxdetailsummary.taxdetail_tax_id = tax.tax_id))) GROUP BY tax.tax_id) data) AS tax, pohead.pohead_freight AS freight, pohead.pohead_comments AS notes, pohead.pohead_dropship AS dropship, vc.cntct_number AS vend_contact_number, pohead.pohead_vend_cntct_honorific AS vend_cntct_honorific, pohead.pohead_vend_cntct_first_name AS vend_cntct_first_name, pohead.pohead_vend_cntct_middle AS vend_cntct_middle, pohead.pohead_vend_cntct_last_name AS vend_cntct_last_name, pohead.pohead_vend_cntct_suffix AS vend_cntct_suffix, pohead.pohead_vend_cntct_phone AS vend_cntct_phone, pohead.pohead_vend_cntct_title AS vend_cntct_title, pohead.pohead_vend_cntct_fax AS vend_cntct_fax, pohead.pohead_vend_cntct_email AS vend_cntct_email, pohead.pohead_vendaddress1 AS vendaddress1, pohead.pohead_vendaddress2 AS vendaddress2, pohead.pohead_vendaddress3 AS vendaddress3, pohead.pohead_vendcity AS vendcity, pohead.pohead_vendstate AS vendstate, pohead.pohead_vendzipcode AS vendzipcode, pohead.pohead_vendcountry AS vendcountry, sc.cntct_number AS shipto_contact_number, pohead.pohead_shipto_cntct_honorific AS shipto_cntct_honorific, pohead.pohead_shipto_cntct_first_name AS shipto_cntct_first_name, pohead.pohead_shipto_cntct_middle AS shipto_cntct_middle, pohead.pohead_shipto_cntct_last_name AS shipto_cntct_last_name, pohead.pohead_shipto_cntct_suffix AS shipto_cntct_suffix, pohead.pohead_shipto_cntct_phone AS shipto_cntct_phone, pohead.pohead_shipto_cntct_title AS shipto_cntct_title, pohead.pohead_shipto_cntct_fax AS shipto_cntct_fax, pohead.pohead_shipto_cntct_email AS shipto_cntct_email, addr.addr_number AS shiptoaddress_number, pohead.pohead_shiptoaddress1 AS shiptoaddress1, pohead.pohead_shiptoaddress2 AS shiptoaddress2, pohead.pohead_shiptoaddress3 AS shiptoaddress3, pohead.pohead_shiptocity AS shiptocity, pohead.pohead_shiptostate AS shiptostate, pohead.pohead_shiptozipcode AS shiptozipcode, pohead.pohead_shiptocountry AS shiptocountry, cohead.cohead_number AS sales_order_number FROM ((((((((((public.pohead LEFT JOIN public.cntct vc ON ((pohead.pohead_vend_cntct_id = vc.cntct_id))) LEFT JOIN public.cntct sc ON ((pohead.pohead_shipto_cntct_id = sc.cntct_id))) LEFT JOIN public.addr ON ((pohead.pohead_shiptoaddress_id = addr.addr_id))) LEFT JOIN public.terms ON ((pohead.pohead_terms_id = terms.terms_id))) LEFT JOIN public.taxzone ON ((pohead.pohead_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.whsinfo ON ((pohead.pohead_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.vendaddrinfo ua ON ((pohead.pohead_vendaddr_id = ua.vendaddr_id))) LEFT JOIN public.cohead ON ((pohead.pohead_cohead_id = cohead.cohead_id))) JOIN public.vendinfo ON ((pohead.pohead_vend_id = vendinfo.vend_id))) JOIN public.curr_symbol ON ((pohead.pohead_curr_id = curr_symbol.curr_id))) ORDER BY pohead.pohead_number; DROP VIEW api.purchaseorder; apiadminfalse54466:#00VIEW purchaseorderCOMMENT3COMMENT ON VIEW purchaseorder IS 'Purchase Order'; apiadminfalse814;#00 purchaseorderACLREVOKE ALL ON TABLE purchaseorder FROM PUBLIC; REVOKE ALL ON TABLE purchaseorder FROM admin; GRANT ALL ON TABLE purchaseorder TO admin; GRANT ALL ON TABLE purchaseorder TO xtrole; apiadminfalse814/12592006365purchaseordercommentVIEWCREATE VIEW purchaseordercomment AS SELECT (pohead.pohead_number)::character varying AS order_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.pohead, public.cmnttype, public.comment WHERE (((comment.comment_source = 'P'::text) AND (comment.comment_source_id = pohead.pohead_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); $DROP VIEW api.purchaseordercomment; apiadminfalse54506<#00VIEW purchaseordercommentCOMMENTBCOMMENT ON VIEW purchaseordercomment IS 'Purchase Order Comment'; apiadminfalse815=#00purchaseordercommentACLREVOKE ALL ON TABLE purchaseordercomment FROM PUBLIC; REVOKE ALL ON TABLE purchaseordercomment FROM admin; GRANT ALL ON TABLE purchaseordercomment TO admin; GRANT ALL ON TABLE purchaseordercomment TO xtrole; apiadminfalse81512591684309quheadTABLE CREATE TABLE quhead ( quhead_id integer DEFAULT nextval(('"quhead_quhead_id_seq"'::text)::regclass) NOT NULL, quhead_number text NOT NULL, quhead_cust_id integer NOT NULL, quhead_quotedate date, quhead_shipto_id integer, quhead_shiptoname text, quhead_shiptoaddress1 text, quhead_shiptoaddress2 text, quhead_shiptoaddress3 text, quhead_shiptocity text, quhead_shiptostate text, quhead_shiptozipcode text, quhead_shiptophone text, quhead_salesrep_id integer, quhead_terms_id integer, quhead_freight numeric(16,4), quhead_ordercomments text, quhead_shipcomments text, quhead_billtoname text, quhead_billtoaddress1 text, quhead_billtoaddress2 text, quhead_billtoaddress3 text, quhead_billtocity text, quhead_billtostate text, quhead_billtozip text, quhead_commission numeric(16,4), quhead_custponumber text, quhead_fob text, quhead_shipvia text, quhead_warehous_id integer, quhead_packdate date, quhead_prj_id integer, quhead_misc numeric(16,4) DEFAULT 0 NOT NULL, quhead_misc_accnt_id integer, quhead_misc_descrip text, quhead_billtocountry text, quhead_shiptocountry text, quhead_curr_id integer DEFAULT basecurrid(), quhead_imported boolean DEFAULT false, quhead_expire date, quhead_calcfreight boolean DEFAULT false NOT NULL, quhead_shipto_cntct_id integer, quhead_shipto_cntct_honorific text, quhead_shipto_cntct_first_name text, quhead_shipto_cntct_middle text, quhead_shipto_cntct_last_name text, quhead_shipto_cntct_suffix text, quhead_shipto_cntct_phone text, quhead_shipto_cntct_title text, quhead_shipto_cntct_fax text, quhead_shipto_cntct_email text, quhead_billto_cntct_id integer, quhead_billto_cntct_honorific text, quhead_billto_cntct_first_name text, quhead_billto_cntct_middle text, quhead_billto_cntct_last_name text, quhead_billto_cntct_suffix text, quhead_billto_cntct_phone text, quhead_billto_cntct_title text, quhead_billto_cntct_fax text, quhead_billto_cntct_email text, quhead_taxzone_id integer, quhead_taxtype_id integer, quhead_ophead_id integer, quhead_status text, quhead_saletype_id integer, quhead_shipzone_id integer, CONSTRAINT quhead_check CHECK ((((quhead_misc = (0)::numeric) AND (quhead_misc_accnt_id IS NULL)) OR ((quhead_misc <> (0)::numeric) AND (quhead_misc_accnt_id IS NOT NULL)))), CONSTRAINT quhead_quhead_number_check CHECK ((quhead_number <> ''::text)), CONSTRAINT quhead_quhead_status_check CHECK ((((quhead_status = 'O'::text) OR (quhead_status = 'C'::text)) OR (quhead_status = 'X'::text))) ); DROP TABLE public.quhead; publicadminfalse613561366137613861396140614161428>#00 TABLE quheadCOMMENT7COMMENT ON TABLE quhead IS 'Quote header information'; publicadminfalse249?#00 COLUMN quhead.quhead_saletype_idCOMMENTRCOMMENT ON COLUMN quhead.quhead_saletype_id IS 'Associated sale type for quote.'; publicadminfalse249@#00 COLUMN quhead.quhead_shipzone_idCOMMENTVCOMMENT ON COLUMN quhead.quhead_shipzone_id IS 'Associated shipping zone for quote.'; publicadminfalse249A#00quheadACLREVOKE ALL ON TABLE quhead FROM PUBLIC; REVOKE ALL ON TABLE quhead FROM admin; GRANT ALL ON TABLE quhead TO admin; GRANT ALL ON TABLE quhead TO xtrole; publicadminfalse249012592006372quoteVIEW CREATE VIEW quote AS SELECT (quhead.quhead_number)::character varying AS quote_number, whsinfo.warehous_code AS site, quhead.quhead_quotedate AS quote_date, quhead.quhead_packdate AS pack_date, saletype.saletype_code AS sale_type, salesrep.salesrep_number AS sales_rep, quhead.quhead_commission AS commission, taxzone.taxzone_code AS tax_zone, taxtype.taxtype_name AS tax_type, terms.terms_code AS terms, prj.prj_number AS project_number, COALESCE(custinfo.cust_number, prospect.prospect_number) AS customer_number, quhead.quhead_billtoname AS billto_name, quhead.quhead_billtoaddress1 AS billto_address1, quhead.quhead_billtoaddress2 AS billto_address2, quhead.quhead_billtoaddress3 AS billto_address3, quhead.quhead_billtocity AS billto_city, quhead.quhead_billtostate AS billto_state, quhead.quhead_billtozip AS billto_postal_code, quhead.quhead_billtocountry AS billto_country, shiptoinfo.shipto_num AS shipto_number, quhead.quhead_shiptoname AS shipto_name, quhead.quhead_shiptophone AS shipto_phone, quhead.quhead_shiptoaddress1 AS shipto_address1, quhead.quhead_shiptoaddress2 AS shipto_address2, quhead.quhead_shiptoaddress3 AS shipto_address3, quhead.quhead_shiptocity AS shipto_city, quhead.quhead_shiptostate AS shipto_state, quhead.quhead_shiptozipcode AS shipto_postal_code, quhead.quhead_shiptocountry AS shipto_country, shipzone.shipzone_name AS shipto_shipzone, quhead.quhead_custponumber AS cust_po_number, quhead.quhead_fob AS fob, quhead.quhead_shipvia AS ship_via, curr_symbol.curr_abbr AS currency, quhead.quhead_misc_descrip AS misc_charge_description, CASE WHEN (quhead.quhead_misc_accnt_id IS NULL) THEN NULL::text ELSE public.formatglaccount(quhead.quhead_misc_accnt_id) END AS misc_account_number, quhead.quhead_misc AS misc_charge, quhead.quhead_freight AS freight, quhead.quhead_ordercomments AS order_notes, quhead.quhead_shipcomments AS shipping_notes, false AS add_to_packing_list_batch, quhead.quhead_expire AS expire_date, CASE WHEN (quhead.quhead_status = 'C'::text) THEN 'Converted'::text ELSE 'Open'::text END AS status FROM public.curr_symbol, (((((((((((public.quhead LEFT JOIN public.whsinfo ON ((quhead.quhead_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.prj ON ((quhead.quhead_prj_id = prj.prj_id))) LEFT JOIN public.shiptoinfo ON ((quhead.quhead_shipto_id = shiptoinfo.shipto_id))) LEFT JOIN public.taxzone ON ((quhead.quhead_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.taxtype ON ((quhead.quhead_taxtype_id = taxtype.taxtype_id))) LEFT JOIN public.custinfo ON ((quhead.quhead_cust_id = custinfo.cust_id))) LEFT JOIN public.prospect ON ((quhead.quhead_cust_id = prospect.prospect_id))) LEFT JOIN public.salesrep ON ((quhead.quhead_salesrep_id = salesrep.salesrep_id))) LEFT JOIN public.terms ON ((quhead.quhead_terms_id = terms.terms_id))) LEFT JOIN public.saletype ON ((quhead.quhead_saletype_id = saletype.saletype_id))) LEFT JOIN public.shipzone ON ((quhead.quhead_shipzone_id = shipzone.shipzone_id))) WHERE (quhead.quhead_curr_id = curr_symbol.curr_id); DROP VIEW api.quote; apiadminfalse54546B#00 VIEW quoteCOMMENT"COMMENT ON VIEW quote IS 'Quote'; apiadminfalse816C#00quoteACLREVOKE ALL ON TABLE quote FROM PUBLIC; REVOKE ALL ON TABLE quote FROM admin; GRANT ALL ON TABLE quote TO admin; GRANT ALL ON TABLE quote TO xtrole; apiadminfalse816112592006382 quotecommentVIEWCREATE VIEW quotecomment AS SELECT quhead.quhead_number AS quote_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.quhead, public.cmnttype, public.comment WHERE (((comment.comment_source = 'Q'::text) AND (comment.comment_source_id = quhead.quhead_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.quotecomment; apiadminfalse54586D#00VIEW quotecommentCOMMENT1COMMENT ON VIEW quotecomment IS 'Quote Comment'; apiadminfalse817E#00 quotecommentACLREVOKE ALL ON TABLE quotecomment FROM PUBLIC; REVOKE ALL ON TABLE quotecomment FROM admin; GRANT ALL ON TABLE quotecomment TO admin; GRANT ALL ON TABLE quotecomment TO xtrole; apiadminfalse81712591684331quitemTABLE9CREATE TABLE quitem ( quitem_id integer DEFAULT nextval(('"quitem_quitem_id_seq"'::text)::regclass) NOT NULL, quitem_quhead_id integer, quitem_linenumber integer, quitem_itemsite_id integer, quitem_scheddate date, quitem_qtyord numeric(18,6), quitem_unitcost numeric(16,6), quitem_price numeric(16,4), quitem_custprice numeric(16,4), quitem_memo text, quitem_custpn text, quitem_createorder boolean, quitem_order_warehous_id integer, quitem_item_id integer, quitem_prcost numeric(16,6), quitem_imported boolean DEFAULT false, quitem_qty_uom_id integer NOT NULL, quitem_qty_invuomratio numeric(20,10) NOT NULL, quitem_price_uom_id integer NOT NULL, quitem_price_invuomratio numeric(20,10) NOT NULL, quitem_promdate date, quitem_taxtype_id integer, quitem_dropship boolean DEFAULT false, quitem_itemsrc_id integer, quitem_pricemode character(1) DEFAULT 'D'::bpchar NOT NULL, CONSTRAINT valid_quitem_pricemode CHECK ((quitem_pricemode = ANY (ARRAY['D'::bpchar, 'M'::bpchar]))) ); DROP TABLE public.quitem; publicadminfalse614361446145614661478F#00 TABLE quitemCOMMENT:COMMENT ON TABLE quitem IS 'Quote Line Item information'; publicadminfalse250G#00COLUMN quitem.quitem_pricemodeCOMMENTxCOMMENT ON COLUMN quitem.quitem_pricemode IS 'Pricing mode for quote item. Valid values are D-discount, and M-markup'; publicadminfalse250H#00quitemACLREVOKE ALL ON TABLE quitem FROM PUBLIC; REVOKE ALL ON TABLE quitem FROM admin; GRANT ALL ON TABLE quitem TO admin; GRANT ALL ON TABLE quitem TO xtrole; publicadminfalse250212592006389 quotelineVIEWCREATE VIEW quoteline AS SELECT quhead.quhead_number AS quote_number, quitem.quitem_linenumber AS line_number, l.item_number, quitem.quitem_custpn AS customer_pn, i.warehous_code AS sold_from_site, quitem.quitem_qtyord AS qty_ordered, q.uom_name AS qty_uom, quitem.quitem_price AS net_unit_price, p.uom_name AS price_uom, quitem.quitem_scheddate AS scheduled_date, COALESCE((SELECT taxtype.taxtype_name FROM public.taxtype WHERE (taxtype.taxtype_id = public.getitemtaxtype(l.item_id, quhead.quhead_taxzone_id))), 'None'::text) AS tax_type, CASE WHEN (quitem.quitem_price = (0)::numeric) THEN '100'::text WHEN (quitem.quitem_custprice = (0)::numeric) THEN 'N/A'::text ELSE (round((((1)::numeric - (quitem.quitem_price / quitem.quitem_custprice)) * (100)::numeric), 4))::text END AS discount_pct_from_list, quitem.quitem_createorder AS create_order, s.warehous_code AS supplying_site, quitem.quitem_prcost AS overwrite_po_price, quitem.quitem_memo AS notes FROM public.quhead, public.uom q, public.uom p, (public.quitem LEFT JOIN public.whsinfo s ON ((quitem.quitem_order_warehous_id = s.warehous_id))), public.itemsite il, public.item l, public.whsinfo i WHERE ((((((quhead.quhead_id = quitem.quitem_quhead_id) AND (quitem.quitem_itemsite_id = il.itemsite_id)) AND (il.itemsite_item_id = l.item_id)) AND (il.itemsite_warehous_id = i.warehous_id)) AND (quitem.quitem_qty_uom_id = q.uom_id)) AND (quitem.quitem_price_uom_id = p.uom_id)) ORDER BY quhead.quhead_number, quitem.quitem_linenumber; DROP VIEW api.quoteline; apiadminfalse54626I#00VIEW quotelineCOMMENT0COMMENT ON VIEW quoteline IS 'Quote Line Item'; apiadminfalse818J#00 quotelineACLREVOKE ALL ON TABLE quoteline FROM PUBLIC; REVOKE ALL ON TABLE quoteline FROM admin; GRANT ALL ON TABLE quoteline TO admin; GRANT ALL ON TABLE quoteline TO xtrole; apiadminfalse818312592006399 quotelinecharVIEWCREATE VIEW quotelinechar AS SELECT DISTINCT quhead.quhead_number AS quote_number, quitem.quitem_linenumber AS line_number, "char".char_name AS characteristic, COALESCE((SELECT b.charass_value FROM public.charass b WHERE (((b.charass_target_type = 'QI'::text) AND (b.charass_target_id = quitem.quitem_id)) AND (b.charass_char_id = "char".char_id))), (SELECT c.charass_value FROM public.charass c WHERE ((((c.charass_target_type = 'I'::text) AND (c.charass_target_id = item.item_id)) AND c.charass_default) AND (c.charass_char_id = "char".char_id)) LIMIT 1)) AS value FROM public.quhead, public.quitem, public.itemsite, public.item, public.charass a, public."char" WHERE ((((((quhead.quhead_id = quitem.quitem_quhead_id) AND (quitem.quitem_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (a.charass_char_id = "char".char_id)) AND (a.charass_target_type = 'I'::text)) AND (a.charass_target_id = item.item_id)) ORDER BY quhead.quhead_number, quitem.quitem_linenumber, "char".char_name; DROP VIEW api.quotelinechar; apiadminfalse54666K#00VIEW quotelinecharCOMMENTDCOMMENT ON VIEW quotelinechar IS 'Quote Line Item Characteristics'; apiadminfalse819L#00 quotelinecharACLREVOKE ALL ON TABLE quotelinechar FROM PUBLIC; REVOKE ALL ON TABLE quotelinechar FROM admin; GRANT ALL ON TABLE quotelinechar TO admin; GRANT ALL ON TABLE quotelinechar TO xtrole; apiadminfalse819412592006409quotelinecommentVIEW]CREATE VIEW quotelinecomment AS SELECT quhead.quhead_number AS quote_number, quitem.quitem_linenumber AS line_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.quhead, public.quitem, public.cmnttype, public.comment WHERE ((((quhead.quhead_id = quitem.quitem_quhead_id) AND (comment.comment_source = 'QI'::text)) AND (comment.comment_source_id = quitem.quitem_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)) ORDER BY quhead.quhead_number, quitem.quitem_linenumber, comment.comment_date DESC; DROP VIEW api.quotelinecomment; apiadminfalse54706M#00VIEW quotelinecommentCOMMENT?COMMENT ON VIEW quotelinecomment IS 'Quote Line Item Comment'; apiadminfalse820N#00quotelinecommentACLREVOKE ALL ON TABLE quotelinecomment FROM PUBLIC; REVOKE ALL ON TABLE quotelinecomment FROM admin; GRANT ALL ON TABLE quotelinecomment TO admin; GRANT ALL ON TABLE quotelinecomment TO xtrole; apiadminfalse82012591684355 aropenallocTABLECREATE TABLE aropenalloc ( aropenalloc_aropen_id integer NOT NULL, aropenalloc_doctype character(1) NOT NULL, aropenalloc_doc_id integer NOT NULL, aropenalloc_amount numeric(20,2) DEFAULT 0.00 NOT NULL, aropenalloc_curr_id integer DEFAULT basecurrid() ); DROP TABLE public.aropenalloc; publicadminfalse614861498O#00 aropenallocACLREVOKE ALL ON TABLE aropenalloc FROM PUBLIC; REVOKE ALL ON TABLE aropenalloc FROM admin; GRANT ALL ON TABLE aropenalloc TO admin; GRANT ALL ON TABLE aropenalloc TO xtrole; publicadminfalse251512592006417 salescreditVIEWCREATE VIEW salescredit AS SELECT custinfo.cust_number AS customer_number, aropen.aropen_docnumber AS cm_number, cohead.cohead_number AS so_number, (aropenalloc.aropenalloc_amount)::numeric(16,4) AS amount, curr.curr_abbr AS currency FROM ((((public.aropenalloc LEFT JOIN public.aropen ON ((aropen.aropen_id = aropenalloc.aropenalloc_aropen_id))) LEFT JOIN public.custinfo ON ((custinfo.cust_id = aropen.aropen_cust_id))) LEFT JOIN public.cohead ON (((aropenalloc.aropenalloc_doctype = 'S'::bpchar) AND (cohead.cohead_id = aropenalloc.aropenalloc_doc_id)))) LEFT JOIN public.curr_symbol curr ON ((curr.curr_id = aropenalloc.aropenalloc_curr_id))) WHERE (aropenalloc.aropenalloc_doctype = 'S'::bpchar); DROP VIEW api.salescredit; apiadminfalse54746P#00VIEW salescreditCOMMENTVCOMMENT ON VIEW salescredit IS 'Payments (credit memos) pre-applied to sales orders'; apiadminfalse821Q#00 salescreditACLREVOKE ALL ON TABLE salescredit FROM PUBLIC; REVOKE ALL ON TABLE salescredit FROM admin; GRANT ALL ON TABLE salescredit TO admin; GRANT ALL ON TABLE salescredit TO xtrole; apiadminfalse82112591684365cohistTABLECREATE TABLE cohist ( cohist_id integer DEFAULT nextval(('cohist_cohist_id_seq'::text)::regclass) NOT NULL, cohist_cust_id integer, cohist_itemsite_id integer, cohist_shipdate date, cohist_shipvia text, cohist_ordernumber text, cohist_orderdate date, cohist_invcnumber text, cohist_invcdate date, cohist_qtyshipped numeric(18,6), cohist_unitprice numeric(16,4), cohist_shipto_id integer, cohist_salesrep_id integer, cohist_duedate date, cohist_imported boolean DEFAULT false, cohist_billtoname text, cohist_billtoaddress1 text, cohist_billtoaddress2 text, cohist_billtoaddress3 text, cohist_billtocity text, cohist_billtostate text, cohist_billtozip text, cohist_shiptoname text, cohist_shiptoaddress1 text, cohist_shiptoaddress2 text, cohist_shiptoaddress3 text, cohist_shiptocity text, cohist_shiptostate text, cohist_shiptozip text, cohist_commission numeric(16,4), cohist_commissionpaid boolean, cohist_unitcost numeric(18,6), cohist_misc_type character(1), cohist_misc_descrip text, cohist_misc_id integer, cohist_doctype text, cohist_promisedate date, cohist_ponumber text, cohist_curr_id integer DEFAULT basecurrid(), cohist_sequence integer, cohist_taxtype_id integer, cohist_taxzone_id integer, cohist_cohead_ccpay_id integer, cohist_saletype_id integer, cohist_shipzone_id integer ); DROP TABLE public.cohist; publicadminfalse6150615161528R#00 TABLE cohistCOMMENT2COMMENT ON TABLE cohist IS 'Sales Order history'; publicadminfalse252S#00$COLUMN cohist.cohist_cohead_ccpay_idCOMMENTCOMMENT ON COLUMN cohist.cohist_cohead_ccpay_id IS 'Credit card payments made at sales order time (as opposed to invoice time) need special treatment. This field allows checking for this case.'; publicadminfalse252T#00 COLUMN cohist.cohist_saletype_idCOMMENTZCOMMENT ON COLUMN cohist.cohist_saletype_id IS 'Associated sale type for sales history.'; publicadminfalse252U#00 COLUMN cohist.cohist_shipzone_idCOMMENT^COMMENT ON COLUMN cohist.cohist_shipzone_id IS 'Associated shipping zone for sales history.'; publicadminfalse252V#00cohistACLREVOKE ALL ON TABLE cohist FROM PUBLIC; REVOKE ALL ON TABLE cohist FROM admin; GRANT ALL ON TABLE cohist TO admin; GRANT ALL ON TABLE cohist TO xtrole; publicadminfalse25212591684374taxhistTABLE-CREATE TABLE taxhist ( taxhist_id integer NOT NULL, taxhist_parent_id integer NOT NULL, taxhist_taxtype_id integer, taxhist_tax_id integer NOT NULL, taxhist_basis numeric(16,2) NOT NULL, taxhist_basis_tax_id integer, taxhist_sequence integer, taxhist_percent numeric(10,6) NOT NULL, taxhist_amount numeric(16,2) NOT NULL, taxhist_tax numeric(16,6) NOT NULL, taxhist_docdate date NOT NULL, taxhist_distdate date, taxhist_curr_id integer, taxhist_curr_rate numeric, taxhist_journalnumber integer ); DROP TABLE public.taxhist; publicadminfalse8W#00 TABLE taxhistCOMMENTCOMMENT ON TABLE taxhist IS 'A table type to record tax transaction history. Inherited by other tables that actually record history. As the parent, queries can be run against it that will join all child tables. '; publicadminfalse253X#00COLUMN taxhist.taxhist_idCOMMENT7COMMENT ON COLUMN taxhist.taxhist_id IS 'Primary key'; publicadminfalse253Y#00 COLUMN taxhist.taxhist_parent_idCOMMENTDCOMMENT ON COLUMN taxhist.taxhist_parent_id IS 'Source parent id.'; publicadminfalse253Z#00!COLUMN taxhist.taxhist_taxtype_idCOMMENT?COMMENT ON COLUMN taxhist.taxhist_taxtype_id IS 'Tax type id'; publicadminfalse253[#00COLUMN taxhist.taxhist_tax_idCOMMENT<COMMENT ON COLUMN taxhist.taxhist_tax_id IS 'Tax code id.'; publicadminfalse253\#00COLUMN taxhist.taxhist_basisCOMMENTgCOMMENT ON COLUMN taxhist.taxhist_basis IS 'Base price amount on which the tax calculation is based.'; publicadminfalse253]#00#COLUMN taxhist.taxhist_basis_tax_idCOMMENTCOMMENT ON COLUMN taxhist.taxhist_basis_tax_id IS 'Tax rate calculation basis. If null, then the amount of the parent document, otherwise calculated on the result amount of the tax code id referenced.'; publicadminfalse253^#00COLUMN taxhist.taxhist_amountCOMMENT@COMMENT ON COLUMN taxhist.taxhist_amount IS 'Flat tax amount.'; publicadminfalse253_#00COLUMN taxhist.taxhist_taxCOMMENTCCOMMENT ON COLUMN taxhist.taxhist_tax IS 'Calculated tax amount.'; publicadminfalse253`#00COLUMN taxhist.taxhist_docdateCOMMENTQCOMMENT ON COLUMN taxhist.taxhist_docdate IS 'The date of the parent document.'; publicadminfalse253a#00COLUMN taxhist.taxhist_distdateCOMMENTcCOMMENT ON COLUMN taxhist.taxhist_distdate IS 'The G/L distribution date of the parent document.'; publicadminfalse253b#00taxhistACLREVOKE ALL ON TABLE taxhist FROM PUBLIC; REVOKE ALL ON TABLE taxhist FROM admin; GRANT ALL ON TABLE taxhist TO admin; GRANT ALL ON TABLE taxhist TO xtrole; publicadminfalse25312591684380taxhist_taxhist_id_seqSEQUENCExCREATE SEQUENCE taxhist_taxhist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.taxhist_taxhist_id_seq; publicadminfalse8253c#00taxhist_taxhist_id_seqSEQUENCE OWNED BYCALTER SEQUENCE taxhist_taxhist_id_seq OWNED BY taxhist.taxhist_id; publicadminfalse254d#00taxhist_taxhist_id_seq SEQUENCE SET?SELECT pg_catalog.setval('taxhist_taxhist_id_seq', 528, true); publicadminfalse254e#00taxhist_taxhist_id_seqACLREVOKE ALL ON SEQUENCE taxhist_taxhist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxhist_taxhist_id_seq FROM admin; GRANT ALL ON SEQUENCE taxhist_taxhist_id_seq TO admin; GRANT ALL ON SEQUENCE taxhist_taxhist_id_seq TO xtrole; publicadminfalse25412591684382 cohisttaxTABLE/CREATE TABLE cohisttax ( ) INHERITS (taxhist); DROP TABLE public.cohisttax; publicadminfalse61548253f#00 cohisttaxACLREVOKE ALL ON TABLE cohisttax FROM PUBLIC; REVOKE ALL ON TABLE cohisttax FROM admin; GRANT ALL ON TABLE cohisttax TO admin; GRANT ALL ON TABLE cohisttax TO xtrole; publicadminfalse255612592006423 saleshistoryVIEW) CREATE VIEW saleshistory AS SELECT custinfo.cust_number AS customer_number, item.item_number, whsinfo.warehous_code AS site_code, cohist.cohist_shipdate AS ship_date, cohist.cohist_shipvia AS ship_via, cohist.cohist_ordernumber AS order_number, cohist.cohist_ponumber AS purchase_order_number, cohist.cohist_orderdate AS order_date, cohist.cohist_invcnumber AS invoice_number, cohist.cohist_invcdate AS invoice_date, cohist.cohist_qtyshipped AS quantity_shipped, cohist.cohist_unitprice AS unit_price, shiptoinfo.shipto_num AS shipto_number, salesrep.salesrep_number AS sales_rep, cohist.cohist_duedate AS due_date, cohist.cohist_promisedate AS promise_date, cohist.cohist_imported AS imported, cohist.cohist_billtoname AS billto_name, cohist.cohist_billtoaddress1 AS billto_address1, cohist.cohist_billtoaddress2 AS billto_address2, cohist.cohist_billtoaddress3 AS billto_address3, cohist.cohist_billtocity AS billto_city, cohist.cohist_billtostate AS billto_state, cohist.cohist_billtozip AS billto_zip, cohist.cohist_shiptoname AS shipto_name, cohist.cohist_shiptoaddress1 AS shipto_address1, cohist.cohist_shiptoaddress2 AS shipto_address2, cohist.cohist_shiptoaddress3 AS shipto_address3, cohist.cohist_shiptocity AS shipto_city, cohist.cohist_shiptostate AS shipto_state, cohist.cohist_shiptozip AS shipto_zip, cohist.cohist_commission AS commission, cohist.cohist_commissionpaid AS commission_paid, cohist.cohist_unitcost AS unit_cost, CASE WHEN (cohist.cohist_misc_type IS NULL) THEN ''::text WHEN (cohist.cohist_misc_type = 'M'::bpchar) THEN 'Misc. Charge'::text WHEN (cohist.cohist_misc_type = 'F'::bpchar) THEN 'Freight'::text ELSE 'Unknown'::text END AS misc_type, cohist.cohist_misc_descrip AS misc_description, CASE WHEN (cohist.cohist_misc_id IS NULL) THEN ''::text WHEN (cohist.cohist_misc_type = 'M'::bpchar) THEN public.formatglaccount(cohist.cohist_misc_id) ELSE 'Unknown'::text END AS misc_info, taxzone.taxzone_code AS tax_zone, taxtype.taxtype_name AS tax_type, CASE WHEN (cohist.cohist_doctype = 'I'::text) THEN 'Invoice'::text WHEN (cohist.cohist_doctype = 'C'::text) THEN 'Credit Memo'::text ELSE 'Unknown'::text END AS document_type, curr_symbol.curr_abbr AS currency, cohist.cohist_sequence AS gl_sequence, (SELECT sum(cohisttax.taxhist_tax) AS sum FROM public.cohisttax WHERE (cohisttax.taxhist_parent_id = cohist.cohist_id)) AS tax FROM (((((((((public.cohist LEFT JOIN public.custinfo ON ((cohist.cohist_cust_id = custinfo.cust_id))) LEFT JOIN public.shiptoinfo ON ((cohist.cohist_shipto_id = shiptoinfo.shipto_id))) LEFT JOIN public.taxzone ON ((cohist.cohist_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.taxtype ON ((cohist.cohist_taxtype_id = taxtype.taxtype_id))) LEFT JOIN public.salesrep ON ((cohist.cohist_salesrep_id = salesrep.salesrep_id))) LEFT JOIN public.itemsite ON ((cohist.cohist_itemsite_id = itemsite.itemsite_id))) LEFT JOIN public.item ON ((itemsite.itemsite_item_id = item.item_id))) LEFT JOIN public.whsinfo ON ((itemsite.itemsite_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.curr_symbol ON ((cohist.cohist_curr_id = curr_symbol.curr_id))); DROP VIEW api.saleshistory; apiadminfalse54766g#00VIEW saleshistoryCOMMENT1COMMENT ON VIEW saleshistory IS 'Sales History'; apiadminfalse822h#00 saleshistoryACLREVOKE ALL ON TABLE saleshistory FROM PUBLIC; REVOKE ALL ON TABLE saleshistory FROM admin; GRANT ALL ON TABLE saleshistory TO admin; GRANT ALL ON TABLE saleshistory TO xtrole; apiadminfalse822712592006434 saleslinecharVIEWCREATE VIEW saleslinechar AS SELECT (data.order_number)::character varying AS order_number, data.line_number, data.characteristic, COALESCE(si.charass_value, i3.charass_value) AS value, (COALESCE(si.charass_price, public.itemcharprice(data.item_id, data.char_id, COALESCE(si.charass_value, i3.charass_value), data.cohead_cust_id, data.cohead_shipto_id, data.coitem_qtyord, data.cohead_curr_id, data.cohead_orderdate), (0)::numeric))::numeric(16,4) AS price FROM (((((SELECT DISTINCT cohead.cohead_cust_id, cohead.cohead_shipto_id, cohead.cohead_curr_id, cohead.cohead_orderdate, coitem.coitem_id, coitem.coitem_itemsite_id, coitem.coitem_qtyord, "char".char_id, item.item_id, cohead.cohead_number AS order_number, CASE WHEN (coitem.coitem_subnumber = 0) THEN ((coitem.coitem_linenumber)::character varying)::text ELSE ((((coitem.coitem_linenumber)::character varying)::text || ('.'::character varying)::text) || ((coitem.coitem_subnumber)::character varying)::text) END AS line_number, "char".char_name AS characteristic FROM public.cohead, public.coitem, public.itemsite, public.item, public.charass, public."char" WHERE ((((((cohead.cohead_id = coitem.coitem_cohead_id) AND (coitem.coitem_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (charass.charass_char_id = "char".char_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id))) data LEFT JOIN public.charass si ON ((((data.coitem_id = si.charass_target_id) AND ('SI'::text = si.charass_target_type)) AND (si.charass_char_id = data.char_id)))) LEFT JOIN public.itemsite i1 ON ((data.coitem_itemsite_id = i1.itemsite_id))) LEFT JOIN public.item i2 ON ((i1.itemsite_item_id = i2.item_id))) LEFT JOIN public.charass i3 ON (((((i2.item_id = i3.charass_target_id) AND ('I'::text = i3.charass_target_type)) AND (i3.charass_char_id = data.char_id)) AND i3.charass_default))) ORDER BY (data.order_number)::character varying, data.line_number, data.characteristic; DROP VIEW api.saleslinechar; apiadminfalse54806i#00VIEW saleslinecharCOMMENTICOMMENT ON VIEW saleslinechar IS 'Sales Order Line Item Characteristic'; apiadminfalse823j#00 saleslinecharACLREVOKE ALL ON TABLE saleslinechar FROM PUBLIC; REVOKE ALL ON TABLE saleslinechar FROM admin; GRANT ALL ON TABLE saleslinechar TO admin; GRANT ALL ON TABLE saleslinechar TO xtrole; apiadminfalse823812592006444saleslinecommentVIEWYCREATE VIEW saleslinecomment AS SELECT (cohead.cohead_number)::character varying AS order_number, CASE WHEN (coitem.coitem_subnumber = 0) THEN ((coitem.coitem_linenumber)::character varying)::text ELSE ((((coitem.coitem_linenumber)::character varying)::text || ('.'::character varying)::text) || ((coitem.coitem_subnumber)::character varying)::text) END AS line_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.cohead, public.coitem, public.cmnttype, public.comment WHERE ((((cohead.cohead_id = coitem.coitem_cohead_id) AND (comment.comment_source = 'SI'::text)) AND (comment.comment_source_id = coitem.coitem_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)) ORDER BY cohead.cohead_number, coitem.coitem_linenumber, comment.comment_date DESC; DROP VIEW api.saleslinecomment; apiadminfalse54846k#00VIEW saleslinecommentCOMMENTECOMMENT ON VIEW saleslinecomment IS 'Sales Order Line Item Comment'; apiadminfalse824l#00saleslinecommentACLREVOKE ALL ON TABLE saleslinecomment FROM PUBLIC; REVOKE ALL ON TABLE saleslinecomment FROM admin; GRANT ALL ON TABLE saleslinecomment TO admin; GRANT ALL ON TABLE saleslinecomment TO xtrole; apiadminfalse824912592006452 salesorderVIEW9CREATE VIEW salesorder AS SELECT (cohead.cohead_number)::character varying AS order_number, whsinfo.warehous_code AS site, cohead.cohead_orderdate AS order_date, cohead.cohead_packdate AS pack_date, saletype.saletype_code AS sale_type, salesrep.salesrep_number AS sales_rep, cohead.cohead_commission AS commission, COALESCE(taxzone.taxzone_code, 'None'::text) AS tax_zone, terms.terms_code AS terms, prj.prj_number AS project_number, custinfo.cust_number AS customer_number, bc.cntct_number AS billto_contact_number, cohead.cohead_billto_cntct_honorific AS billto_contact_name, cohead.cohead_billto_cntct_first_name AS billto_contact_first, cohead.cohead_billto_cntct_middle AS billto_contact_middle, cohead.cohead_billto_cntct_last_name AS billto_contact_last, cohead.cohead_billto_cntct_suffix AS billto_contact_suffix, cohead.cohead_billto_cntct_phone AS billto_contact_phone, cohead.cohead_billto_cntct_title AS billto_contact_title, cohead.cohead_billto_cntct_fax AS billto_contct_fax, cohead.cohead_billto_cntct_email AS billto_contact_email, cohead.cohead_billtoname AS billto_name, cohead.cohead_billtoaddress1 AS billto_address1, cohead.cohead_billtoaddress2 AS billto_address2, cohead.cohead_billtoaddress3 AS billto_address3, cohead.cohead_billtocity AS billto_city, cohead.cohead_billtostate AS billto_state, cohead.cohead_billtozipcode AS billto_postal_code, cohead.cohead_billtocountry AS billto_country, shiptoinfo.shipto_num AS shipto_number, sc.cntct_number AS shipto_contact_number, cohead.cohead_shipto_cntct_honorific AS shipto_contact_honorific, cohead.cohead_shipto_cntct_first_name AS shipto_contact_first, cohead.cohead_shipto_cntct_middle AS shipto_contact_middle, cohead.cohead_shipto_cntct_last_name AS shipto_contact_last, cohead.cohead_shipto_cntct_suffix AS shipto_contact_suffix, cohead.cohead_shipto_cntct_phone AS shipto_contact_phone, cohead.cohead_shipto_cntct_title AS shipto_contact_title, cohead.cohead_shipto_cntct_fax AS shipto_contact_fax, cohead.cohead_shipto_cntct_email AS shipto_contact_email, cohead.cohead_shiptoname AS shipto_name, cohead.cohead_shiptophone AS shipto_phone, cohead.cohead_shiptoaddress1 AS shipto_address1, cohead.cohead_shiptoaddress2 AS shipto_address2, cohead.cohead_shiptoaddress3 AS shipto_address3, cohead.cohead_shiptocity AS shipto_city, cohead.cohead_shiptostate AS shipto_state, cohead.cohead_shiptozipcode AS shipto_postal_code, cohead.cohead_shiptocountry AS shipto_country, shipzone.shipzone_name AS shipto_shipzone, cohead.cohead_custponumber AS cust_po_number, cohead.cohead_fob AS fob, cohead.cohead_shipvia AS ship_via, CASE WHEN (cohead.cohead_holdtype = 'N'::bpchar) THEN 'None'::text WHEN (cohead.cohead_holdtype = 'C'::bpchar) THEN 'Credit'::text WHEN (cohead.cohead_holdtype = 'S'::bpchar) THEN 'Shipping'::text WHEN (cohead.cohead_holdtype = 'P'::bpchar) THEN 'Packing'::text WHEN (cohead.cohead_holdtype = 'R'::bpchar) THEN 'Return'::text ELSE 'Error'::text END AS hold_type, shipchrg.shipchrg_name AS shipping_chgs, shipform.shipform_name AS shipping_form, cohead.cohead_shipcomplete AS ship_complete, curr_symbol.curr_abbr AS currency, cohead.cohead_misc_descrip AS misc_charge_description, CASE WHEN (cohead.cohead_misc_accnt_id IS NULL) THEN NULL::text ELSE public.formatglaccount(cohead.cohead_misc_accnt_id) END AS misc_account_number, cohead.cohead_misc AS misc_charge, cohead.cohead_freight AS freight, cohead.cohead_calcfreight AS calculate_freight, cohead.cohead_ordercomments AS order_notes, cohead.cohead_shipcomments AS shipping_notes, false AS add_to_packing_list_batch FROM (((((((((public.cohead LEFT JOIN public.cntct bc ON ((cohead.cohead_billto_cntct_id = bc.cntct_id))) LEFT JOIN public.cntct sc ON ((cohead.cohead_shipto_cntct_id = sc.cntct_id))) LEFT JOIN public.whsinfo ON ((cohead.cohead_warehous_id = whsinfo.warehous_id))) LEFT JOIN public.prj ON ((cohead.cohead_prj_id = prj.prj_id))) LEFT JOIN public.shiptoinfo ON ((cohead.cohead_shipto_id = shiptoinfo.shipto_id))) LEFT JOIN public.shipchrg ON ((cohead.cohead_shipchrg_id = shipchrg.shipchrg_id))) LEFT JOIN public.taxzone ON ((cohead.cohead_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.saletype ON ((cohead.cohead_saletype_id = saletype.saletype_id))) LEFT JOIN public.shipzone ON ((cohead.cohead_shipzone_id = shipzone.shipzone_id))), public.custinfo, public.shipform, public.salesrep, public.terms, public.curr_symbol WHERE (((((cohead.cohead_cust_id = custinfo.cust_id) AND (cohead.cohead_shipform_id = shipform.shipform_id)) AND (cohead.cohead_salesrep_id = salesrep.salesrep_id)) AND (cohead.cohead_terms_id = terms.terms_id)) AND (cohead.cohead_curr_id = curr_symbol.curr_id)); DROP VIEW api.salesorder; apiadminfalse54886m#00VIEW salesorderCOMMENT-COMMENT ON VIEW salesorder IS 'Sales Order'; apiadminfalse825n#00 salesorderACLREVOKE ALL ON TABLE salesorder FROM PUBLIC; REVOKE ALL ON TABLE salesorder FROM admin; GRANT ALL ON TABLE salesorder TO admin; GRANT ALL ON TABLE salesorder TO xtrole; apiadminfalse825:12592006462salesordercommentVIEWCREATE VIEW salesordercomment AS SELECT (cohead.cohead_number)::character varying AS order_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.cohead, public.cmnttype, public.comment WHERE (((comment.comment_source = 'S'::text) AND (comment.comment_source_id = cohead.cohead_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); !DROP VIEW api.salesordercomment; apiadminfalse54926o#00VIEW salesordercommentCOMMENT<COMMENT ON VIEW salesordercomment IS 'Sales Order Comment'; apiadminfalse826p#00salesordercommentACLREVOKE ALL ON TABLE salesordercomment FROM PUBLIC; REVOKE ALL ON TABLE salesordercomment FROM admin; GRANT ALL ON TABLE salesordercomment TO admin; GRANT ALL ON TABLE salesordercomment TO xtrole; apiadminfalse826;12592006469salesrepVIEW~CREATE VIEW salesrep AS SELECT (salesrep.salesrep_number)::character varying AS number, salesrep.salesrep_active AS active, salesrep.salesrep_name AS name, (salesrep.salesrep_commission * (100)::numeric) AS commission_percent, emp.emp_number AS employee FROM (public.salesrep LEFT JOIN public.emp ON ((emp.emp_id = salesrep.salesrep_emp_id))) ORDER BY salesrep.salesrep_number; DROP VIEW api.salesrep; apiadminfalse54966q#00 VIEW salesrepCOMMENT)COMMENT ON VIEW salesrep IS 'Sales Rep'; apiadminfalse827r#00salesrepACLREVOKE ALL ON TABLE salesrep FROM PUBLIC; REVOKE ALL ON TABLE salesrep FROM admin; GRANT ALL ON TABLE salesrep TO admin; GRANT ALL ON TABLE salesrep TO xtrole; apiadminfalse82712591684417shipviaTABLECREATE TABLE shipvia ( shipvia_id integer DEFAULT nextval(('shipvia_shipvia_id_seq'::text)::regclass) NOT NULL, shipvia_code text NOT NULL, shipvia_descrip text, CONSTRAINT shipvia_shipvia_code_check CHECK ((shipvia_code <> ''::text)) ); DROP TABLE public.shipvia; publicadminfalse615561568s#00 TABLE shipviaCOMMENT4COMMENT ON TABLE shipvia IS 'Ship Via information'; publicadminfalse256t#00shipviaACLREVOKE ALL ON TABLE shipvia FROM PUBLIC; REVOKE ALL ON TABLE shipvia FROM admin; GRANT ALL ON TABLE shipvia TO admin; GRANT ALL ON TABLE shipvia TO xtrole; publicadminfalse25612591684424sitetypeTABLECREATE TABLE sitetype ( sitetype_id integer NOT NULL, sitetype_name text NOT NULL, sitetype_descrip text, CONSTRAINT sitetype_sitetype_name_check CHECK ((sitetype_name <> ''::text)) ); DROP TABLE public.sitetype; publicadminfalse61588u#00TABLE sitetypeCOMMENTLCOMMENT ON TABLE sitetype IS 'This table is the different types of sites.'; publicadminfalse257v#00sitetypeACLREVOKE ALL ON TABLE sitetype FROM PUBLIC; REVOKE ALL ON TABLE sitetype FROM admin; GRANT ALL ON TABLE sitetype TO admin; GRANT ALL ON TABLE sitetype TO xtrole; publicadminfalse257<12592006477siteVIEWCREATE VIEW site AS SELECT (whsinfo.warehous_code)::character varying AS code, st.sitetype_name AS type, whsinfo.warehous_active AS active, whsinfo.warehous_descrip AS description, m.addr_number AS address_number, m.addr_line1 AS address1, m.addr_line2 AS address2, m.addr_line3 AS address3, m.addr_city AS city, m.addr_state AS state, m.addr_postalcode AS postal_code, m.addr_country AS country, ''::text AS address_change, c.cntct_number AS contact_number, c.cntct_honorific AS honorific, c.cntct_first_name AS first, c.cntct_middle AS middle, c.cntct_last_name AS last, c.cntct_suffix AS suffix, c.cntct_title AS job_title, c.cntct_phone AS phone, c.cntct_fax AS fax, c.cntct_email AS email, ''::text AS contact_change, public.formatglaccount(a.accnt_id) AS post_unassigned_transactions_to, a.accnt_descrip AS post_unassigned_transactions_to_description, whsinfo.warehous_transit AS transit_type, CASE WHEN whsinfo.warehous_transit THEN false ELSE true END AS inventory_type, CASE WHEN whsinfo.warehous_transit THEN ''::text ELSE whsinfo.warehous_bol_prefix END AS next_bill_of_lading_prefix, CASE WHEN whsinfo.warehous_transit THEN 0 ELSE whsinfo.warehous_bol_number END AS next_bill_of_lading_number, CASE WHEN whsinfo.warehous_transit THEN false ELSE whsinfo.warehous_shipping END AS shipping_site, CASE WHEN whsinfo.warehous_transit THEN ''::text ELSE whsinfo.warehous_counttag_prefix END AS next_count_tag_prefix, CASE WHEN whsinfo.warehous_transit THEN 0 ELSE whsinfo.warehous_counttag_number END AS next_count_tag_number, CASE WHEN whsinfo.warehous_transit THEN false ELSE whsinfo.warehous_useslips END AS force_the_use_of_count_slips, CASE WHEN whsinfo.warehous_transit THEN false ELSE whsinfo.warehous_usezones END AS force_the_use_of_zones, CASE WHEN whsinfo.warehous_transit THEN 0 ELSE whsinfo.warehous_sequence END AS scheduling_sequence, CASE WHEN whsinfo.warehous_transit THEN (0)::numeric ELSE (whsinfo.warehous_shipping_commission * 100.0) END AS shipping_commission, CASE WHEN whsinfo.warehous_transit THEN ''::text ELSE t.taxzone_code END AS tax_zone, CASE WHEN whsinfo.warehous_transit THEN ''::text ELSE whsinfo.warehous_fob END AS default_fob, CASE WHEN whsinfo.warehous_transit THEN s.shipvia_code ELSE ''::text END AS default_ship_via, CASE WHEN whsinfo.warehous_transit THEN f.shipform_name ELSE ''::text END AS default_shipping_form, CASE WHEN whsinfo.warehous_transit THEN cc.costcat_code ELSE ''::text END AS default_cost_category, CASE WHEN whsinfo.warehous_transit THEN whsinfo.warehous_shipcomments ELSE ''::text END AS shipping_comments, CASE WHEN whsinfo.warehous_transit THEN false ELSE whsinfo.warehous_enforcearbl END AS enforce_arbl_naming_convention, CASE WHEN whsinfo.warehous_transit THEN 0 WHEN whsinfo.warehous_enforcearbl THEN whsinfo.warehous_aislesize ELSE 0 END AS aisle_size, CASE WHEN whsinfo.warehous_transit THEN false WHEN (whsinfo.warehous_enforcearbl AND whsinfo.warehous_aislealpha) THEN true ELSE false END AS aisle_allow_alpha_characters, CASE WHEN whsinfo.warehous_transit THEN 0 WHEN whsinfo.warehous_enforcearbl THEN whsinfo.warehous_racksize ELSE 0 END AS rack_size, CASE WHEN whsinfo.warehous_transit THEN false WHEN (whsinfo.warehous_enforcearbl AND whsinfo.warehous_rackalpha) THEN true ELSE false END AS rack_allow_alpha_characters, CASE WHEN whsinfo.warehous_transit THEN 0 WHEN whsinfo.warehous_enforcearbl THEN whsinfo.warehous_binsize ELSE 0 END AS bin_size, CASE WHEN whsinfo.warehous_transit THEN false WHEN (whsinfo.warehous_enforcearbl AND whsinfo.warehous_binalpha) THEN true ELSE false END AS bin_allow_alpha_characters, CASE WHEN whsinfo.warehous_transit THEN 0 WHEN whsinfo.warehous_enforcearbl THEN whsinfo.warehous_locationsize ELSE 0 END AS location_size, CASE WHEN whsinfo.warehous_transit THEN false WHEN (whsinfo.warehous_enforcearbl AND whsinfo.warehous_locationalpha) THEN true ELSE false END AS location_allow_alpha_characters FROM ((((((((public.whsinfo LEFT JOIN public.addr m ON ((whsinfo.warehous_addr_id = m.addr_id))) LEFT JOIN public.cntct c ON ((whsinfo.warehous_cntct_id = c.cntct_id))) LEFT JOIN public.accnt a ON ((whsinfo.warehous_default_accnt_id = a.accnt_id))) LEFT JOIN public.taxzone t ON ((whsinfo.warehous_taxzone_id = t.taxzone_id))) LEFT JOIN public.shipvia s ON ((whsinfo.warehous_shipvia_id = s.shipvia_id))) LEFT JOIN public.shipform f ON ((whsinfo.warehous_shipform_id = f.shipform_id))) LEFT JOIN public.costcat cc ON ((whsinfo.warehous_costcat_id = cc.costcat_id))) LEFT JOIN public.sitetype st ON ((whsinfo.warehous_sitetype_id = st.sitetype_id))) ORDER BY whsinfo.warehous_code; DROP VIEW api.site; apiadminfalse55006w#00 VIEW siteCOMMENT COMMENT ON VIEW site IS 'Site'; apiadminfalse828x#00siteACLREVOKE ALL ON TABLE site FROM PUBLIC; REVOKE ALL ON TABLE site FROM admin; GRANT ALL ON TABLE site TO admin; GRANT ALL ON TABLE site TO xtrole; apiadminfalse828=12592006487sitezoneVIEW!CREATE VIEW sitezone AS SELECT (whsinfo.warehous_code)::character varying AS site, (whsezone.whsezone_name)::character varying AS name, whsezone.whsezone_descrip AS description FROM (public.whsezone LEFT JOIN public.whsinfo ON ((whsinfo.warehous_id = whsezone.whsezone_warehous_id))); DROP VIEW api.sitezone; apiadminfalse55046y#00 VIEW sitezoneCOMMENT)COMMENT ON VIEW sitezone IS 'Site Zone'; apiadminfalse829z#00sitezoneACLREVOKE ALL ON TABLE sitezone FROM PUBLIC; REVOKE ALL ON TABLE sitezone FROM admin; GRANT ALL ON TABLE sitezone TO admin; GRANT ALL ON TABLE sitezone TO xtrole; apiadminfalse829>12592006494taskVIEWCREATE VIEW task AS SELECT prj.prj_number AS project_number, prjtask.prjtask_number AS number, CASE WHEN (prjtask.prjtask_status = 'P'::bpchar) THEN 'Concept'::text WHEN (prjtask.prjtask_status = 'O'::bpchar) THEN 'In-Process'::text WHEN (prjtask.prjtask_status = 'C'::bpchar) THEN 'Closed'::text ELSE 'Error'::text END AS status, prjtask.prjtask_name AS name, prjtask.prjtask_descrip AS description, prjtask.prjtask_owner_username AS owner, prjtask.prjtask_username AS assigned_to, prjtask.prjtask_hours_budget AS hours_budgeted, prjtask.prjtask_hours_actual AS hours_actual, prjtask.prjtask_exp_budget AS expenses_budgeted, prjtask.prjtask_exp_actual AS expenses_actual, prjtask.prjtask_due_date AS due, prjtask.prjtask_assigned_date AS assigned, prjtask.prjtask_start_date AS started, prjtask.prjtask_completed_date AS completed FROM (public.prjtask JOIN public.prj ON ((prj.prj_id = prjtask.prjtask_prj_id))); DROP VIEW api.task; apiadminfalse55086{#00 VIEW taskCOMMENT COMMENT ON VIEW task IS 'Task'; apiadminfalse830|#00taskACLREVOKE ALL ON TABLE task FROM PUBLIC; REVOKE ALL ON TABLE task FROM admin; GRANT ALL ON TABLE task TO admin; GRANT ALL ON TABLE task TO xtrole; apiadminfalse830?12592006504 taskcommentVIEW"CREATE VIEW taskcomment AS SELECT (prj.prj_number)::character varying AS project_number, (prjtask.prjtask_number)::character varying AS task_number, cmnttype.cmnttype_name AS type, comment.comment_date AS date, comment.comment_user AS username, comment.comment_text AS text FROM public.prj, public.prjtask, public.cmnttype, public.comment WHERE ((((comment.comment_source = 'TA'::text) AND (prj.prj_id = prjtask.prjtask_prj_id)) AND (comment.comment_source_id = prjtask.prjtask_id)) AND (comment.comment_cmnttype_id = cmnttype.cmnttype_id)); DROP VIEW api.taskcomment; apiadminfalse55126}#00VIEW taskcommentCOMMENT/COMMENT ON VIEW taskcomment IS 'Task Comment'; apiadminfalse831~#00 taskcommentACLREVOKE ALL ON TABLE taskcomment FROM PUBLIC; REVOKE ALL ON TABLE taskcomment FROM admin; GRANT ALL ON TABLE taskcomment TO admin; GRANT ALL ON TABLE taskcomment TO xtrole; apiadminfalse831@12592006511todoVIEWCREATE VIEW todo AS SELECT todoitem.todoitem_id AS task_number, todoitem.todoitem_owner_username AS owner, todoitem.todoitem_username AS assigned_to, todoitem.todoitem_name AS task_name, incdtpriority.incdtpriority_name AS priority, incdt.incdt_number AS incident, ophead.ophead_name AS opportunity, crmacct.crmacct_number AS account, public.formatdate(todoitem.todoitem_due_date) AS date_due, public.formatdate(todoitem.todoitem_assigned_date) AS date_assigned, public.formatdate(todoitem.todoitem_start_date) AS date_started, public.formatdate(todoitem.todoitem_completed_date) AS date_completed, CASE WHEN (todoitem.todoitem_status = 'P'::bpchar) THEN 'Pending Input'::text WHEN (todoitem.todoitem_status = 'D'::bpchar) THEN 'Deferred'::text ELSE 'Neither'::text END AS status, todoitem.todoitem_active AS active, todoitem.todoitem_description AS description, todoitem.todoitem_notes AS notes FROM ((((public.todoitem LEFT JOIN public.incdt ON ((incdt.incdt_id = todoitem.todoitem_incdt_id))) LEFT JOIN public.ophead ON ((ophead.ophead_id = todoitem.todoitem_ophead_id))) LEFT JOIN public.crmacct ON ((crmacct.crmacct_id = todoitem.todoitem_crmacct_id))) LEFT JOIN public.incdtpriority ON ((incdtpriority.incdtpriority_id = todoitem.todoitem_priority_id))); DROP VIEW api.todo; apiadminfalse55166#00 VIEW todoCOMMENT&COMMENT ON VIEW todo IS 'To-Do List'; apiadminfalse832#00todoACLREVOKE ALL ON TABLE todo FROM PUBLIC; REVOKE ALL ON TABLE todo FROM admin; GRANT ALL ON TABLE todo TO admin; GRANT ALL ON TABLE todo TO xtrole; apiadminfalse83212591684453vendtypeTABLECREATE TABLE vendtype ( vendtype_id integer NOT NULL, vendtype_code text NOT NULL, vendtype_descrip text, CONSTRAINT vendtype_vendtype_code_check CHECK ((vendtype_code <> ''::text)) ); DROP TABLE public.vendtype; publicadminfalse61608#00TABLE vendtypeCOMMENT8COMMENT ON TABLE vendtype IS 'Vendor Type information'; publicadminfalse258#00vendtypeACLREVOKE ALL ON TABLE vendtype FROM PUBLIC; REVOKE ALL ON TABLE vendtype FROM admin; GRANT ALL ON TABLE vendtype TO admin; GRANT ALL ON TABLE vendtype TO xtrole; publicadminfalse258A12592006520vendorVIEW[ CREATE VIEW vendor AS SELECT (vendinfo.vend_number)::character varying AS vendor_number, vendtype.vendtype_code AS vendor_type, vendinfo.vend_name AS vendor_name, vendinfo.vend_active AS active, vendinfo.vend_accntnum AS account_number, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postalcode, addr.addr_country AS country, ''::text AS address_change, terms.terms_code AS default_terms, vendinfo.vend_shipvia AS ship_via, curr_symbol.curr_abbr AS default_currency, CASE WHEN (vendinfo.vend_fobsource = 'W'::bpchar) THEN 'Receiving Site'::text ELSE vendinfo.vend_fob END AS default_fob, vendinfo.vend_po AS sells_purchase_order_items, vendinfo.vend_restrictpurch AS may_only_sell_item_source, vendinfo.vend_qualified AS qualified, vendinfo.vend_match AS matching_vo_po_amounts, vendinfo.vend_1099 AS receives_1099, taxzone.taxzone_code AS default_tax_zone, CASE WHEN (accnt.accnt_id IS NULL) THEN 'N/A'::text ELSE public.formatglaccount(accnt.accnt_id) END AS default_dist_gl_account, CASE WHEN (expcat.expcat_id IS NULL) THEN 'N/A'::text ELSE expcat.expcat_code END AS default_dist_expense_category, CASE WHEN (tax.tax_id IS NULL) THEN 'N/A'::text ELSE tax.tax_code END AS default_dist_tax_code, c1.cntct_number AS contact1_number, c1.cntct_honorific AS contact1_honorific, c1.cntct_first_name AS contact1_first, c1.cntct_middle AS contact1_middle, c1.cntct_last_name AS contact1_last, c1.cntct_suffix AS contact1_suffix, c1.cntct_title AS contact1_job_title, c1.cntct_phone AS contact1_voice, c1.cntct_phone2 AS contact1_alternate, c1.cntct_fax AS contact1_fax, c1.cntct_email AS contact1_email, c1.cntct_webaddr AS contact1_web, ''::text AS contact1_change, c2.cntct_number AS contact2_number, c2.cntct_honorific AS contact2_honorific, c2.cntct_first_name AS contact2_first, c2.cntct_middle AS contact2_middle, c2.cntct_last_name AS contact2_last, c2.cntct_suffix AS contact2_suffix, c2.cntct_title AS contact2_job_title, c2.cntct_phone AS contact2_voice, c2.cntct_phone2 AS contact2_alternate, c2.cntct_fax AS contact2_fax, c2.cntct_email AS contact2_email, c2.cntct_webaddr AS contact2_web, ''::text AS contact2_change, vendinfo.vend_comments AS notes, vendinfo.vend_pocomments AS po_comments, vendinfo.vend_emailpodelivery AS allow_email_po_delivery, vendinfo.vend_ediemail AS po_edi_email, vendinfo.vend_edicc AS po_edi_cc, vendinfo.vend_edisubject AS po_edi_subject, vendinfo.vend_edifilename AS po_edi_filename, vendinfo.vend_ediemailbody AS po_edi_emailbody FROM ((((((((((public.vendinfo LEFT JOIN public.addr ON ((vendinfo.vend_addr_id = addr.addr_id))) LEFT JOIN public.cntct c1 ON ((vendinfo.vend_cntct1_id = c1.cntct_id))) LEFT JOIN public.cntct c2 ON ((vendinfo.vend_cntct2_id = c2.cntct_id))) LEFT JOIN public.taxzone ON ((vendinfo.vend_taxzone_id = taxzone.taxzone_id))) LEFT JOIN public.curr_symbol ON ((vendinfo.vend_curr_id = curr_symbol.curr_id))) LEFT JOIN public.terms ON ((vendinfo.vend_terms_id = terms.terms_id))) LEFT JOIN public.vendtype ON ((vendinfo.vend_vendtype_id = vendtype.vendtype_id))) LEFT JOIN public.accnt ON ((vendinfo.vend_accnt_id = accnt.accnt_id))) LEFT JOIN public.expcat ON ((vendinfo.vend_expcat_id = expcat.expcat_id))) LEFT JOIN public.tax ON ((vendinfo.vend_tax_id = tax.tax_id))) ORDER BY vendinfo.vend_number; DROP VIEW api.vendor; apiadminfalse55206#00 VIEW vendorCOMMENT$COMMENT ON VIEW vendor IS 'vendor'; apiadminfalse833#00vendorACLREVOKE ALL ON TABLE vendor FROM PUBLIC; REVOKE ALL ON TABLE vendor FROM admin; GRANT ALL ON TABLE vendor TO admin; GRANT ALL ON TABLE vendor TO xtrole; apiadminfalse833B12592006530 vendoraddressVIEWLCREATE VIEW vendoraddress AS SELECT (vendinfo.vend_number)::character varying AS vendor_number, vendinfo.vend_name AS vendor_name, (vendaddrinfo.vendaddr_code)::character varying AS vendor_address_number, vendaddrinfo.vendaddr_name AS vendor_address_name, addr.addr_number AS address_number, addr.addr_line1 AS address1, addr.addr_line2 AS address2, addr.addr_line3 AS address3, addr.addr_city AS city, addr.addr_state AS state, addr.addr_postalcode AS postalcode, addr.addr_country AS country, ''::text AS address_change, cntct.cntct_number AS contact_number, cntct.cntct_honorific AS contact_honorific, cntct.cntct_first_name AS contact_first, cntct.cntct_middle AS contact_middle, cntct.cntct_last_name AS contact_last, cntct.cntct_suffix AS contact_suffix, cntct.cntct_title AS contact_job_title, cntct.cntct_phone AS contact_voice, cntct.cntct_phone2 AS contact_alternate, cntct.cntct_fax AS contact_fax, cntct.cntct_email AS contact_email, cntct.cntct_webaddr AS contact_web, ''::text AS contact_change, vendaddrinfo.vendaddr_comments AS notes FROM (((public.vendaddrinfo LEFT JOIN public.vendinfo ON ((vendinfo.vend_id = vendaddrinfo.vendaddr_vend_id))) LEFT JOIN public.addr ON ((vendaddrinfo.vendaddr_addr_id = addr.addr_id))) LEFT JOIN public.cntct ON ((vendaddrinfo.vendaddr_cntct_id = cntct.cntct_id))) ORDER BY vendaddrinfo.vendaddr_code; DROP VIEW api.vendoraddress; apiadminfalse55246#00VIEW vendoraddressCOMMENT3COMMENT ON VIEW vendoraddress IS 'vendor address'; apiadminfalse834#00 vendoraddressACLREVOKE ALL ON TABLE vendoraddress FROM PUBLIC; REVOKE ALL ON TABLE vendoraddress FROM admin; GRANT ALL ON TABLE vendoraddress TO admin; GRANT ALL ON TABLE vendoraddress TO xtrole; apiadminfalse834C12592006538 vendortypeVIEWCREATE VIEW vendortype AS SELECT (vendtype.vendtype_code)::character varying AS code, vendtype.vendtype_descrip AS description FROM public.vendtype ORDER BY vendtype.vendtype_code; DROP VIEW api.vendortype; apiadminfalse55286#00VIEW vendortypeCOMMENT-COMMENT ON VIEW vendortype IS 'Vendor Type'; apiadminfalse835#00 vendortypeACLREVOKE ALL ON TABLE vendortype FROM PUBLIC; REVOKE ALL ON TABLE vendortype FROM admin; GRANT ALL ON TABLE vendortype TO admin; GRANT ALL ON TABLE vendortype TO xtrole; apiadminfalse83512591684473cmdTABLECREATE TABLE cmd ( cmd_id integer NOT NULL, cmd_module text NOT NULL, cmd_title text NOT NULL, cmd_descrip text, cmd_privname text, cmd_executable text NOT NULL, cmd_name text ); DROP TABLE public.cmd; publicadminfalse8#00 TABLE cmdCOMMENT6COMMENT ON TABLE cmd IS 'Custom menu command table.'; publicadminfalse259#00cmdACLREVOKE ALL ON TABLE cmd FROM PUBLIC; REVOKE ALL ON TABLE cmd FROM admin; GRANT ALL ON TABLE cmd TO admin; GRANT ALL ON TABLE cmd TO xtrole; publicadminfalse25912591684479cmd_cmd_id_seqSEQUENCEpCREATE SEQUENCE cmd_cmd_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; %DROP SEQUENCE public.cmd_cmd_id_seq; publicadminfalse8259#00cmd_cmd_id_seqSEQUENCE OWNED BY3ALTER SEQUENCE cmd_cmd_id_seq OWNED BY cmd.cmd_id; publicadminfalse260#00cmd_cmd_id_seq SEQUENCE SET6SELECT pg_catalog.setval('cmd_cmd_id_seq', 16, true); publicadminfalse260#00cmd_cmd_id_seqACLREVOKE ALL ON SEQUENCE cmd_cmd_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmd_cmd_id_seq FROM admin; GRANT ALL ON SEQUENCE cmd_cmd_id_seq TO admin; GRANT ALL ON SEQUENCE cmd_cmd_id_seq TO xtrole; publicadminfalse26026041684481cmd_idDEFAULTUALTER TABLE cmd ALTER COLUMN cmd_id SET DEFAULT nextval('cmd_cmd_id_seq'::regclass); 9ALTER TABLE public.cmd ALTER COLUMN cmd_id DROP DEFAULT; publicadminfalse26025912591684482pkgcmdTABLEuCREATE TABLE pkgcmd ( cmd_id integer DEFAULT nextval('public.cmd_cmd_id_seq'::regclass) ) INHERITS (public.cmd); DROP TABLE fixcountry.pkgcmd;  fixcountryadminfalse61627259#00pkgcmdACLREVOKE ALL ON TABLE pkgcmd FROM PUBLIC; REVOKE ALL ON TABLE pkgcmd FROM admin; GRANT ALL ON TABLE pkgcmd TO admin; GRANT ALL ON TABLE pkgcmd TO xtrole;  fixcountryadminfalse26112591684489cmdargTABLECREATE TABLE cmdarg ( cmdarg_id integer NOT NULL, cmdarg_cmd_id integer NOT NULL, cmdarg_order integer NOT NULL, cmdarg_arg text NOT NULL ); DROP TABLE public.cmdarg; publicadminfalse8#00 TABLE cmdargCOMMENTNCOMMENT ON TABLE cmdarg IS 'Command argument for custom menu command table.'; publicadminfalse262#00cmdargACLREVOKE ALL ON TABLE cmdarg FROM PUBLIC; REVOKE ALL ON TABLE cmdarg FROM admin; GRANT ALL ON TABLE cmdarg TO admin; GRANT ALL ON TABLE cmdarg TO xtrole; publicadminfalse26212591684495cmdarg_cmdarg_id_seqSEQUENCEvCREATE SEQUENCE cmdarg_cmdarg_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.cmdarg_cmdarg_id_seq; publicadminfalse8262#00cmdarg_cmdarg_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE cmdarg_cmdarg_id_seq OWNED BY cmdarg.cmdarg_id; publicadminfalse263#00cmdarg_cmdarg_id_seq SEQUENCE SET<SELECT pg_catalog.setval('cmdarg_cmdarg_id_seq', 14, true); publicadminfalse263#00cmdarg_cmdarg_id_seqACLREVOKE ALL ON SEQUENCE cmdarg_cmdarg_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmdarg_cmdarg_id_seq FROM admin; GRANT ALL ON SEQUENCE cmdarg_cmdarg_id_seq TO admin; GRANT ALL ON SEQUENCE cmdarg_cmdarg_id_seq TO xtrole; publicadminfalse26326041684497 cmdarg_idDEFAULTaALTER TABLE cmdarg ALTER COLUMN cmdarg_id SET DEFAULT nextval('cmdarg_cmdarg_id_seq'::regclass); ?ALTER TABLE public.cmdarg ALTER COLUMN cmdarg_id DROP DEFAULT; publicadminfalse26326212591684498 pkgcmdargTABLECREATE TABLE pkgcmdarg ( cmdarg_id integer DEFAULT nextval('public.cmdarg_cmdarg_id_seq'::regclass) ) INHERITS (public.cmdarg); !DROP TABLE fixcountry.pkgcmdarg;  fixcountryadminfalse61647262#00 pkgcmdargACLREVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC; REVOKE ALL ON TABLE pkgcmdarg FROM admin; GRANT ALL ON TABLE pkgcmdarg TO admin; GRANT ALL ON TABLE pkgcmdarg TO xtrole;  fixcountryadminfalse264 12591684505image_image_id_seqSEQUENCE|CREATE SEQUENCE image_image_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; )DROP SEQUENCE public.image_image_id_seq; publicadminfalse8#00image_image_id_seq SEQUENCE SET<SELECT pg_catalog.setval('image_image_id_seq', 6645, true); publicadminfalse265#00image_image_id_seqACLREVOKE ALL ON SEQUENCE image_image_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE image_image_id_seq FROM admin; GRANT ALL ON SEQUENCE image_image_id_seq TO admin; GRANT ALL ON SEQUENCE image_image_id_seq TO xtrole; publicadminfalse265 12591684507pkgimageTABLECREATE TABLE pkgimage ( image_id integer DEFAULT nextval('public.image_image_id_seq'::regclass) ) INHERITS (public.image); DROP TABLE fixcountry.pkgimage;  fixcountryadminfalse61657194#00pkgimageACLREVOKE ALL ON TABLE pkgimage FROM PUBLIC; REVOKE ALL ON TABLE pkgimage FROM admin; GRANT ALL ON TABLE pkgimage TO admin; GRANT ALL ON TABLE pkgimage TO xtrole;  fixcountryadminfalse266 12591684514metasqlTABLECREATE TABLE metasql ( metasql_id integer NOT NULL, metasql_group text, metasql_name text, metasql_notes text, metasql_query text, metasql_lastuser text, metasql_lastupdate date, metasql_grade integer DEFAULT 0 NOT NULL ); DROP TABLE public.metasql; publicadminfalse61678#00 TABLE metasqlCOMMENT-COMMENT ON TABLE metasql IS 'MetaSQL Table'; publicadminfalse267#00metasqlACLREVOKE ALL ON TABLE metasql FROM PUBLIC; REVOKE ALL ON TABLE metasql FROM admin; GRANT ALL ON TABLE metasql TO admin; GRANT ALL ON TABLE metasql TO xtrole; publicadminfalse267 12591684521metasql_metasql_id_seqSEQUENCExCREATE SEQUENCE metasql_metasql_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.metasql_metasql_id_seq; publicadminfalse8267#00metasql_metasql_id_seqSEQUENCE OWNED BYCALTER SEQUENCE metasql_metasql_id_seq OWNED BY metasql.metasql_id; publicadminfalse268#00metasql_metasql_id_seq SEQUENCE SET?SELECT pg_catalog.setval('metasql_metasql_id_seq', 571, true); publicadminfalse268#00metasql_metasql_id_seqACLREVOKE ALL ON SEQUENCE metasql_metasql_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE metasql_metasql_id_seq FROM admin; GRANT ALL ON SEQUENCE metasql_metasql_id_seq TO admin; GRANT ALL ON SEQUENCE metasql_metasql_id_seq TO xtrole; publicadminfalse26826041684523 metasql_idDEFAULTeALTER TABLE metasql ALTER COLUMN metasql_id SET DEFAULT nextval('metasql_metasql_id_seq'::regclass); AALTER TABLE public.metasql ALTER COLUMN metasql_id DROP DEFAULT; publicadminfalse268267 12591684524 pkgmetasqlTABLECREATE TABLE pkgmetasql ( metasql_id integer DEFAULT nextval('public.metasql_metasql_id_seq'::regclass) ) INHERITS (public.metasql); "DROP TABLE fixcountry.pkgmetasql;  fixcountryadminfalse616861697267#00 pkgmetasqlACLREVOKE ALL ON TABLE pkgmetasql FROM PUBLIC; REVOKE ALL ON TABLE pkgmetasql FROM admin; GRANT ALL ON TABLE pkgmetasql TO admin; GRANT ALL ON TABLE pkgmetasql TO xtrole;  fixcountryadminfalse26912591684532privTABLECREATE TABLE priv ( priv_id integer DEFAULT nextval(('priv_priv_id_seq'::text)::regclass) NOT NULL, priv_module text, priv_name text, priv_descrip text, priv_seq integer ); DROP TABLE public.priv; publicadminfalse61708#00 TABLE privCOMMENT9COMMENT ON TABLE priv IS 'System Privilege information'; publicadminfalse270#00privACLREVOKE ALL ON TABLE priv FROM PUBLIC; REVOKE ALL ON TABLE priv FROM admin; GRANT ALL ON TABLE priv TO admin; GRANT ALL ON TABLE priv TO xtrole; publicadminfalse27012591684539priv_priv_id_seqSEQUENCEzCREATE SEQUENCE priv_priv_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 'DROP SEQUENCE public.priv_priv_id_seq; publicadminfalse8#00priv_priv_id_seq SEQUENCE SET9SELECT pg_catalog.setval('priv_priv_id_seq', 680, true); publicadminfalse271#00priv_priv_id_seqACLREVOKE ALL ON SEQUENCE priv_priv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE priv_priv_id_seq FROM admin; GRANT ALL ON SEQUENCE priv_priv_id_seq TO admin; GRANT ALL ON SEQUENCE priv_priv_id_seq TO xtrole; publicadminfalse27112591684541pkgprivTABLEzCREATE TABLE pkgpriv ( priv_id integer DEFAULT nextval('public.priv_priv_id_seq'::regclass) ) INHERITS (public.priv); DROP TABLE fixcountry.pkgpriv;  fixcountryadminfalse61717270#00pkgprivACLREVOKE ALL ON TABLE pkgpriv FROM PUBLIC; REVOKE ALL ON TABLE pkgpriv FROM admin; GRANT ALL ON TABLE pkgpriv TO admin; GRANT ALL ON TABLE pkgpriv TO xtrole;  fixcountryadminfalse27212591684548reportTABLE%CREATE TABLE report ( report_id integer DEFAULT nextval(('report_report_id_seq'::text)::regclass) NOT NULL, report_name text, report_sys boolean, report_source text, report_descrip text, report_grade integer NOT NULL, report_loaddate timestamp without time zone ); DROP TABLE public.report; publicadminfalse61728#00 TABLE reportCOMMENT<COMMENT ON TABLE report IS 'Report definition information'; publicadminfalse273#00reportACLREVOKE ALL ON TABLE report FROM PUBLIC; REVOKE ALL ON TABLE report FROM admin; GRANT ALL ON TABLE report TO admin; GRANT ALL ON TABLE report TO xtrole; publicadminfalse27312591684555report_report_id_seqSEQUENCE~CREATE SEQUENCE report_report_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.report_report_id_seq; publicadminfalse8#00report_report_id_seq SEQUENCE SET=SELECT pg_catalog.setval('report_report_id_seq', 510, true); publicadminfalse274#00report_report_id_seqACLREVOKE ALL ON SEQUENCE report_report_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE report_report_id_seq FROM admin; GRANT ALL ON SEQUENCE report_report_id_seq TO admin; GRANT ALL ON SEQUENCE report_report_id_seq TO xtrole; publicadminfalse27412591684557 pkgreportTABLECREATE TABLE pkgreport ( report_id integer DEFAULT nextval('public.report_report_id_seq'::regclass) ) INHERITS (public.report); !DROP TABLE fixcountry.pkgreport;  fixcountryadminfalse61737273#00 pkgreportACLREVOKE ALL ON TABLE pkgreport FROM PUBLIC; REVOKE ALL ON TABLE pkgreport FROM admin; GRANT ALL ON TABLE pkgreport TO admin; GRANT ALL ON TABLE pkgreport TO xtrole;  fixcountryadminfalse27512591684564scriptTABLECREATE TABLE script ( script_id integer NOT NULL, script_name text NOT NULL, script_order integer NOT NULL, script_enabled boolean DEFAULT false NOT NULL, script_source text NOT NULL, script_notes text ); DROP TABLE public.script; publicadminfalse61758#00scriptACLREVOKE ALL ON TABLE script FROM PUBLIC; REVOKE ALL ON TABLE script FROM admin; GRANT ALL ON TABLE script TO admin; GRANT ALL ON TABLE script TO xtrole; publicadminfalse27612591684571script_script_id_seqSEQUENCEvCREATE SEQUENCE script_script_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.script_script_id_seq; publicadminfalse8276#00script_script_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE script_script_id_seq OWNED BY script.script_id; publicadminfalse277#00script_script_id_seq SEQUENCE SET=SELECT pg_catalog.setval('script_script_id_seq', 428, true); publicadminfalse277#00script_script_id_seqACLREVOKE ALL ON SEQUENCE script_script_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE script_script_id_seq FROM admin; GRANT ALL ON SEQUENCE script_script_id_seq TO admin; GRANT ALL ON SEQUENCE script_script_id_seq TO xtrole; publicadminfalse27726041684573 script_idDEFAULTaALTER TABLE script ALTER COLUMN script_id SET DEFAULT nextval('script_script_id_seq'::regclass); ?ALTER TABLE public.script ALTER COLUMN script_id DROP DEFAULT; publicadminfalse27727612591684574 pkgscriptTABLECREATE TABLE pkgscript ( script_id integer DEFAULT nextval('public.script_script_id_seq'::regclass) ) INHERITS (public.script); !DROP TABLE fixcountry.pkgscript;  fixcountryadminfalse617661777276#00 pkgscriptACLREVOKE ALL ON TABLE pkgscript FROM PUBLIC; REVOKE ALL ON TABLE pkgscript FROM admin; GRANT ALL ON TABLE pkgscript TO admin; GRANT ALL ON TABLE pkgscript TO xtrole;  fixcountryadminfalse27812591684582uiformTABLECREATE TABLE uiform ( uiform_id integer NOT NULL, uiform_name text NOT NULL, uiform_order integer NOT NULL, uiform_enabled boolean DEFAULT false NOT NULL, uiform_source text NOT NULL, uiform_notes text ); DROP TABLE public.uiform; publicadminfalse61798#00uiformACLREVOKE ALL ON TABLE uiform FROM PUBLIC; REVOKE ALL ON TABLE uiform FROM admin; GRANT ALL ON TABLE uiform TO admin; GRANT ALL ON TABLE uiform TO xtrole; publicadminfalse27912591684589uiform_uiform_id_seqSEQUENCEvCREATE SEQUENCE uiform_uiform_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.uiform_uiform_id_seq; publicadminfalse8279#00uiform_uiform_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE uiform_uiform_id_seq OWNED BY uiform.uiform_id; publicadminfalse280#00uiform_uiform_id_seq SEQUENCE SET=SELECT pg_catalog.setval('uiform_uiform_id_seq', 205, true); publicadminfalse280#00uiform_uiform_id_seqACLREVOKE ALL ON SEQUENCE uiform_uiform_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE uiform_uiform_id_seq FROM admin; GRANT ALL ON SEQUENCE uiform_uiform_id_seq TO admin; GRANT ALL ON SEQUENCE uiform_uiform_id_seq TO xtrole; publicadminfalse280"26041684591 uiform_idDEFAULTaALTER TABLE uiform ALTER COLUMN uiform_id SET DEFAULT nextval('uiform_uiform_id_seq'::regclass); ?ALTER TABLE public.uiform ALTER COLUMN uiform_id DROP DEFAULT; publicadminfalse28027912591684592 pkguiformTABLECREATE TABLE pkguiform ( uiform_id integer DEFAULT nextval('public.uiform_uiform_id_seq'::regclass) ) INHERITS (public.uiform); !DROP TABLE fixcountry.pkguiform;  fixcountryadminfalse618061817279#00 pkguiformACLREVOKE ALL ON TABLE pkguiform FROM PUBLIC; REVOKE ALL ON TABLE pkguiform FROM admin; GRANT ALL ON TABLE pkguiform TO admin; GRANT ALL ON TABLE pkguiform TO xtrole;  fixcountryadminfalse28112591684600acalitemTABLECREATE TABLE acalitem ( acalitem_id integer DEFAULT nextval(('"xcalitem_xcalitem_id_seq"'::text)::regclass) NOT NULL, acalitem_calhead_id integer, acalitem_periodstart date, acalitem_periodlength integer, acalitem_name text ); DROP TABLE public.acalitem; publicadminfalse61828#00TABLE acalitemCOMMENTCCOMMENT ON TABLE acalitem IS 'Absolute Calendar Item information'; publicadminfalse282#00acalitemACLREVOKE ALL ON TABLE acalitem FROM PUBLIC; REVOKE ALL ON TABLE acalitem FROM admin; GRANT ALL ON TABLE acalitem TO admin; GRANT ALL ON TABLE acalitem TO xtrole; publicadminfalse28212591684607accnt_accnt_id_seqSEQUENCE|CREATE SEQUENCE accnt_accnt_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; )DROP SEQUENCE public.accnt_accnt_id_seq; publicadminfalse8#00accnt_accnt_id_seq SEQUENCE SET;SELECT pg_catalog.setval('accnt_accnt_id_seq', 161, true); publicadminfalse283#00accnt_accnt_id_seqACLREVOKE ALL ON SEQUENCE accnt_accnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE accnt_accnt_id_seq FROM admin; GRANT ALL ON SEQUENCE accnt_accnt_id_seq TO admin; GRANT ALL ON SEQUENCE accnt_accnt_id_seq TO xtrole; publicadminfalse28312591684609addr_addr_id_seqSEQUENCErCREATE SEQUENCE addr_addr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.addr_addr_id_seq; publicadminfalse8184#00addr_addr_id_seqSEQUENCE OWNED BY7ALTER SEQUENCE addr_addr_id_seq OWNED BY addr.addr_id; publicadminfalse284#00addr_addr_id_seq SEQUENCE SET8SELECT pg_catalog.setval('addr_addr_id_seq', 45, true); publicadminfalse284#00addr_addr_id_seqACLREVOKE ALL ON SEQUENCE addr_addr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE addr_addr_id_seq FROM admin; GRANT ALL ON SEQUENCE addr_addr_id_seq TO admin; GRANT ALL ON SEQUENCE addr_addr_id_seq TO xtrole; publicadminfalse284D12592006545addressVIEW_CREATE VIEW address AS SELECT addresses.addr_id, addresses.addr_active, addresses.addr_line1, addresses.addr_line2, addresses.addr_line3, addresses.addr_city, addresses.addr_state, addresses.addr_postalcode, addresses.addr_country, addresses.addr_notes, addresses.addr_number, addresses.crmacct_id, addresses.crmacct_number, addresses.crmacct_name FROM ((((SELECT base.addr_id, base.addr_active, base.addr_line1, base.addr_line2, base.addr_line3, base.addr_city, base.addr_state, base.addr_postalcode, base.addr_country, base.addr_notes, base.addr_number, base.crmacct_id, base.crmacct_number, base.crmacct_name FROM ((((SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, COALESCE(crmacct.crmacct_id, (-1)) AS crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr LEFT JOIN cntct ON ((cntct.cntct_addr_id = addr.addr_id))) LEFT JOIN crmacct ON ((crmacct.crmacct_id = cntct.cntct_crmacct_id))) EXCEPT SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, (-1), NULL::unknown, NULL::unknown FROM ((addr JOIN vendinfo ON ((vendinfo.vend_addr_id = addr.addr_id))) JOIN crmacct ON ((vendinfo.vend_id = crmacct.crmacct_vend_id)))) EXCEPT SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, (-1), NULL::unknown, NULL::unknown FROM ((addr JOIN vendaddrinfo ON ((vendaddrinfo.vendaddr_addr_id = addr.addr_id))) JOIN crmacct ON ((vendaddrinfo.vendaddr_vend_id = crmacct.crmacct_vend_id)))) EXCEPT SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, (-1), NULL::unknown, NULL::unknown FROM ((addr JOIN taxauth ON ((taxauth.taxauth_addr_id = addr.addr_id))) JOIN crmacct ON ((taxauth.taxauth_id = crmacct.crmacct_taxauth_id)))) EXCEPT SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, (-1), NULL::unknown, NULL::unknown FROM ((addr JOIN shiptoinfo ON ((shiptoinfo.shipto_addr_id = addr.addr_id))) JOIN crmacct ON ((shiptoinfo.shipto_cust_id = crmacct.crmacct_cust_id)))) base UNION SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, crmacct.crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr JOIN vendinfo ON ((vendinfo.vend_addr_id = addr.addr_id))) JOIN crmacct ON ((vendinfo.vend_id = crmacct.crmacct_vend_id)))) UNION SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, crmacct.crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr JOIN vendaddrinfo ON ((vendaddrinfo.vendaddr_addr_id = addr.addr_id))) JOIN crmacct ON ((vendaddrinfo.vendaddr_vend_id = crmacct.crmacct_vend_id)))) UNION SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, crmacct.crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr JOIN taxauth ON ((taxauth.taxauth_addr_id = addr.addr_id))) JOIN crmacct ON ((taxauth.taxauth_id = crmacct.crmacct_taxauth_id)))) UNION SELECT addr.addr_id, addr.addr_active, addr.addr_line1, addr.addr_line2, addr.addr_line3, addr.addr_city, addr.addr_state, addr.addr_postalcode, addr.addr_country, addr.addr_notes, addr.addr_number, crmacct.crmacct_id, crmacct.crmacct_number, crmacct.crmacct_name FROM ((addr JOIN shiptoinfo ON ((shiptoinfo.shipto_addr_id = addr.addr_id))) JOIN crmacct ON ((shiptoinfo.shipto_cust_id = crmacct.crmacct_cust_id)))) addresses ORDER BY addresses.addr_country, addresses.addr_state, addresses.addr_postalcode, addresses.addr_line1, addresses.addr_line2, addresses.addr_line3; DROP VIEW public.address; publicadminfalse55328#00addressACLREVOKE ALL ON TABLE address FROM PUBLIC; REVOKE ALL ON TABLE address FROM admin; GRANT ALL ON TABLE address TO admin; GRANT ALL ON TABLE address TO xtrole; publicadminfalse83612591684616alarmTABLE'CREATE TABLE alarm ( alarm_id integer NOT NULL, alarm_number text NOT NULL, alarm_event boolean DEFAULT false NOT NULL, alarm_email boolean DEFAULT false NOT NULL, alarm_sysmsg boolean DEFAULT false NOT NULL, alarm_trigger timestamp with time zone, alarm_time timestamp with time zone, alarm_time_offset integer, alarm_time_qualifier text, alarm_creator text, alarm_event_recipient text, alarm_email_recipient text, alarm_sysmsg_recipient text, alarm_source text, alarm_source_id integer ); DROP TABLE public.alarm; publicadminfalse6183618461858#00 TABLE alarmCOMMENT<COMMENT ON TABLE alarm IS 'This table is the open alarms.'; publicadminfalse285#00alarmACLREVOKE ALL ON TABLE alarm FROM PUBLIC; REVOKE ALL ON TABLE alarm FROM admin; GRANT ALL ON TABLE alarm TO admin; GRANT ALL ON TABLE alarm TO xtrole; publicadminfalse28512591684625alarm_alarm_id_seqSEQUENCEtCREATE SEQUENCE alarm_alarm_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.alarm_alarm_id_seq; publicadminfalse8285#00alarm_alarm_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE alarm_alarm_id_seq OWNED BY alarm.alarm_id; publicadminfalse286#00alarm_alarm_id_seq SEQUENCE SET9SELECT pg_catalog.setval('alarm_alarm_id_seq', 1, true); publicadminfalse286#00alarm_alarm_id_seqACLREVOKE ALL ON SEQUENCE alarm_alarm_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE alarm_alarm_id_seq FROM admin; GRANT ALL ON SEQUENCE alarm_alarm_id_seq TO admin; GRANT ALL ON SEQUENCE alarm_alarm_id_seq TO xtrole; publicadminfalse28612591684627apaccntTABLECREATE TABLE apaccnt ( apaccnt_id integer NOT NULL, apaccnt_vendtype_id integer, apaccnt_vendtype text, apaccnt_ap_accnt_id integer NOT NULL, apaccnt_prepaid_accnt_id integer, apaccnt_discount_accnt_id integer ); DROP TABLE public.apaccnt; publicadminfalse8#00 TABLE apaccntCOMMENTUCOMMENT ON TABLE apaccnt IS 'Accounts Payable (A/P) Account assignment information'; publicadminfalse287#00apaccntACLREVOKE ALL ON TABLE apaccnt FROM PUBLIC; REVOKE ALL ON TABLE apaccnt FROM admin; GRANT ALL ON TABLE apaccnt TO admin; GRANT ALL ON TABLE apaccnt TO xtrole; publicadminfalse287 12591684633apaccnt_apaccnt_id_seqSEQUENCExCREATE SEQUENCE apaccnt_apaccnt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.apaccnt_apaccnt_id_seq; publicadminfalse8287#00apaccnt_apaccnt_id_seqSEQUENCE OWNED BYCALTER SEQUENCE apaccnt_apaccnt_id_seq OWNED BY apaccnt.apaccnt_id; publicadminfalse288#00apaccnt_apaccnt_id_seq SEQUENCE SET>SELECT pg_catalog.setval('apaccnt_apaccnt_id_seq', 20, true); publicadminfalse288#00apaccnt_apaccnt_id_seqACLREVOKE ALL ON SEQUENCE apaccnt_apaccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apaccnt_apaccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE apaccnt_apaccnt_id_seq TO admin; GRANT ALL ON SEQUENCE apaccnt_apaccnt_id_seq TO xtrole; publicadminfalse288!12591684635apapplyTABLE!CREATE TABLE apapply ( apapply_id integer NOT NULL, apapply_vend_id integer, apapply_postdate date, apapply_username text, apapply_source_apopen_id integer, apapply_source_doctype text, apapply_source_docnumber text, apapply_target_apopen_id integer, apapply_target_doctype text, apapply_target_docnumber text, apapply_journalnumber integer, apapply_amount numeric(20,2), apapply_curr_id integer DEFAULT basecurrid(), apapply_target_paid numeric(20,2), apapply_checkhead_id integer ); DROP TABLE public.apapply; publicadminfalse61898#00 TABLE apapplyCOMMENTxCOMMENT ON TABLE apapply IS 'Applications (e.g., Payments, A/P Credit Memos) made to Accounts Payable (A/P) Documents'; publicadminfalse289#00'COLUMN apapply.apapply_source_apopen_idCOMMENTCOMMENT ON COLUMN apapply.apapply_source_apopen_id IS 'If apapply_source_doctype is "C" (credit memo) then apapply_source_apopen_id acts as a foreign key to the apopen table. If the source doctype is "K" (check) then the apapply_source_apopen_id acts as a foreign key to the checkhead table. If the apapply_source_apopen_id is -1 then the internal id of the source document is not known (always the case for checks posted before release 3.2.0BETA).'; publicadminfalse289#00apapplyACLREVOKE ALL ON TABLE apapply FROM PUBLIC; REVOKE ALL ON TABLE apapply FROM admin; GRANT ALL ON TABLE apapply TO admin; GRANT ALL ON TABLE apapply TO xtrole; publicadminfalse289"12591684642apapply_apapply_id_seqSEQUENCExCREATE SEQUENCE apapply_apapply_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.apapply_apapply_id_seq; publicadminfalse8289#00apapply_apapply_id_seqSEQUENCE OWNED BYCALTER SEQUENCE apapply_apapply_id_seq OWNED BY apapply.apapply_id; publicadminfalse290#00apapply_apapply_id_seq SEQUENCE SET?SELECT pg_catalog.setval('apapply_apapply_id_seq', 192, true); publicadminfalse290#00apapply_apapply_id_seqACLREVOKE ALL ON SEQUENCE apapply_apapply_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apapply_apapply_id_seq FROM admin; GRANT ALL ON SEQUENCE apapply_apapply_id_seq TO admin; GRANT ALL ON SEQUENCE apapply_apapply_id_seq TO xtrole; publicadminfalse290\12591684879 checkheadTABLECREATE TABLE checkhead ( checkhead_id integer NOT NULL, checkhead_recip_id integer NOT NULL, checkhead_recip_type text NOT NULL, checkhead_bankaccnt_id integer NOT NULL, checkhead_printed boolean DEFAULT false NOT NULL, checkhead_checkdate date NOT NULL, checkhead_number integer NOT NULL, checkhead_amount numeric(20,2) NOT NULL, checkhead_void boolean DEFAULT false NOT NULL, checkhead_replaced boolean DEFAULT false NOT NULL, checkhead_posted boolean DEFAULT false NOT NULL, checkhead_rec boolean DEFAULT false NOT NULL, checkhead_misc boolean DEFAULT false NOT NULL, checkhead_expcat_id integer, checkhead_for text NOT NULL, checkhead_notes text NOT NULL, checkhead_journalnumber integer, checkhead_curr_id integer DEFAULT basecurrid() NOT NULL, checkhead_deleted boolean DEFAULT false NOT NULL, checkhead_ach_batch text, checkhead_curr_rate numeric NOT NULL, CONSTRAINT checkhead_checkhead_amount_check CHECK ((checkhead_amount > (0)::numeric)), CONSTRAINT checkhead_checkhead_recip_type_check CHECK ((((checkhead_recip_type = 'C'::text) OR (checkhead_recip_type = 'V'::text)) OR (checkhead_recip_type = 'T'::text))) ); DROP TABLE public.checkhead; publicadminfalse62456246624762486249625062516252625462558#00TABLE checkheadCOMMENTDCOMMENT ON TABLE checkhead IS 'Accounts Payable Check Information'; publicadminfalse348#00 checkheadACLREVOKE ALL ON TABLE checkhead FROM PUBLIC; REVOKE ALL ON TABLE checkhead FROM admin; GRANT ALL ON TABLE checkhead TO admin; GRANT ALL ON TABLE checkhead TO xtrole; publicadminfalse348T12592006624apchkVIEWCREATE VIEW apchk AS SELECT checkhead.checkhead_id AS apchk_id, checkhead.checkhead_recip_id AS apchk_vend_id, checkhead.checkhead_bankaccnt_id AS apchk_bankaccnt_id, checkhead.checkhead_printed AS apchk_printed, checkhead.checkhead_checkdate AS apchk_checkdate, checkhead.checkhead_number AS apchk_number, checkhead.checkhead_amount AS apchk_amount, checkhead.checkhead_void AS apchk_void, checkhead.checkhead_replaced AS apchk_replaced, checkhead.checkhead_posted AS apchk_posted, checkhead.checkhead_rec AS apchk_rec, checkhead.checkhead_misc AS apchk_misc, checkhead.checkhead_expcat_id AS apchk_expcat_id, checkhead.checkhead_for AS apchk_for, checkhead.checkhead_notes AS apchk_notes, checkhead.checkhead_journalnumber AS apchk_journalnumber, checkhead.checkhead_curr_id AS apchk_curr_id, checkhead.checkhead_deleted AS apchk_deleted FROM checkhead WHERE (checkhead.checkhead_recip_type = 'V'::text); DROP VIEW public.apchk; publicadminfalse55488#00apchkACLREVOKE ALL ON TABLE apchk FROM PUBLIC; REVOKE ALL ON TABLE apchk FROM admin; GRANT ALL ON TABLE apchk TO admin; GRANT ALL ON TABLE apchk TO xtrole; publicadminfalse852^12591684897 checkitemTABLECREATE TABLE checkitem ( checkitem_id integer NOT NULL, checkitem_checkhead_id integer NOT NULL, checkitem_amount numeric(20,2) DEFAULT 0.0 NOT NULL, checkitem_discount numeric(20,2) DEFAULT 0.0 NOT NULL, checkitem_ponumber text, checkitem_vouchernumber text, checkitem_invcnumber text, checkitem_apopen_id integer, checkitem_aropen_id integer, checkitem_docdate date, checkitem_curr_id integer DEFAULT basecurrid() NOT NULL, checkitem_cmnumber text, checkitem_ranumber text, checkitem_curr_rate numeric, CONSTRAINT checkitem_check CHECK ((NOT ((checkitem_apopen_id IS NOT NULL) AND (checkitem_aropen_id IS NOT NULL)))) ); DROP TABLE public.checkitem; publicadminfalse62566257625862608#00TABLE checkitemCOMMENTNCOMMENT ON TABLE checkitem IS 'Accounts Payable Check Line Item Information'; publicadminfalse350#00 checkitemACLREVOKE ALL ON TABLE checkitem FROM PUBLIC; REVOKE ALL ON TABLE checkitem FROM admin; GRANT ALL ON TABLE checkitem TO admin; GRANT ALL ON TABLE checkitem TO xtrole; publicadminfalse350U12592006628 apchkitemVIEWCREATE VIEW apchkitem AS SELECT checkitem.checkitem_id AS apchkitem_id, checkitem.checkitem_checkhead_id AS apchkitem_apchk_id, checkitem.checkitem_vouchernumber AS apchkitem_vouchernumber, checkitem.checkitem_ponumber AS apchkitem_ponumber, checkitem.checkitem_amount AS apchkitem_amount, checkitem.checkitem_invcnumber AS apchkitem_invcnumber, checkitem.checkitem_apopen_id AS apchkitem_apopen_id, checkitem.checkitem_docdate AS apchkitem_docdate, checkitem.checkitem_curr_id AS apchkitem_curr_id, checkitem.checkitem_discount AS apchkitem_discount FROM checkhead, checkitem WHERE ((checkitem.checkitem_checkhead_id = checkhead.checkhead_id) AND (checkhead.checkhead_recip_type = 'V'::text)); DROP VIEW public.apchkitem; publicadminfalse55498#00 apchkitemACLREVOKE ALL ON TABLE apchkitem FROM PUBLIC; REVOKE ALL ON TABLE apchkitem FROM admin; GRANT ALL ON TABLE apchkitem TO admin; GRANT ALL ON TABLE apchkitem TO xtrole; publicadminfalse853#12591684644 apcreditapplyTABLECREATE TABLE apcreditapply ( apcreditapply_id integer NOT NULL, apcreditapply_source_apopen_id integer, apcreditapply_target_apopen_id integer, apcreditapply_amount numeric(20,2), apcreditapply_curr_id integer DEFAULT basecurrid() ); !DROP TABLE public.apcreditapply; publicadminfalse61918#00TABLE apcreditapplyCOMMENTCOMMENT ON TABLE apcreditapply IS 'Temporary table for storing details of Accounts Payable (A/P) Credit Memo applications before those applications are posted'; publicadminfalse291#00 apcreditapplyACLREVOKE ALL ON TABLE apcreditapply FROM PUBLIC; REVOKE ALL ON TABLE apcreditapply FROM admin; GRANT ALL ON TABLE apcreditapply TO admin; GRANT ALL ON TABLE apcreditapply TO xtrole; publicadminfalse291$12591684648"apcreditapply_apcreditapply_id_seqSEQUENCECREATE SEQUENCE apcreditapply_apcreditapply_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 9DROP SEQUENCE public.apcreditapply_apcreditapply_id_seq; publicadminfalse8291#00"apcreditapply_apcreditapply_id_seqSEQUENCE OWNED BY[ALTER SEQUENCE apcreditapply_apcreditapply_id_seq OWNED BY apcreditapply.apcreditapply_id; publicadminfalse292#00"apcreditapply_apcreditapply_id_seq SEQUENCE SETJSELECT pg_catalog.setval('apcreditapply_apcreditapply_id_seq', 69, true); publicadminfalse292#00"apcreditapply_apcreditapply_id_seqACLREVOKE ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq FROM admin; GRANT ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq TO admin; GRANT ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq TO xtrole; publicadminfalse292%12591684650apmemoVIEWCREATE VIEW apmemo AS SELECT apopen.apopen_id, apopen.apopen_docnumber FROM apopen WHERE (apopen.apopen_doctype = ANY (ARRAY['D'::bpchar, 'C'::bpchar])); DROP VIEW public.apmemo; publicadminfalse51378#00apmemoACLREVOKE ALL ON TABLE apmemo FROM PUBLIC; REVOKE ALL ON TABLE apmemo FROM admin; GRANT ALL ON TABLE apmemo TO admin; GRANT ALL ON TABLE apmemo TO xtrole; publicadminfalse293&12591684654apopen_apopen_id_seqSEQUENCEvCREATE SEQUENCE apopen_apopen_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.apopen_apopen_id_seq; publicadminfalse8#00apopen_apopen_id_seq SEQUENCE SET=SELECT pg_catalog.setval('apopen_apopen_id_seq', 262, true); publicadminfalse294#00apopen_apopen_id_seqACLREVOKE ALL ON SEQUENCE apopen_apopen_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apopen_apopen_id_seq FROM admin; GRANT ALL ON SEQUENCE apopen_apopen_id_seq TO admin; GRANT ALL ON SEQUENCE apopen_apopen_id_seq TO xtrole; publicadminfalse294'12591684656 apopentaxTABLE/CREATE TABLE apopentax ( ) INHERITS (taxhist); DROP TABLE public.apopentax; publicadminfalse61928253#00 apopentaxACLREVOKE ALL ON TABLE apopentax FROM PUBLIC; REVOKE ALL ON TABLE apopentax FROM admin; GRANT ALL ON TABLE apopentax TO admin; GRANT ALL ON TABLE apopentax TO xtrole; publicadminfalse295(12591684662apselectTABLE9CREATE TABLE apselect ( apselect_id integer NOT NULL, apselect_apopen_id integer NOT NULL, apselect_amount numeric(20,2) NOT NULL, apselect_bankaccnt_id integer, apselect_curr_id integer DEFAULT basecurrid(), apselect_date date, apselect_discount numeric(20,2) DEFAULT 0.0 NOT NULL ); DROP TABLE public.apselect; publicadminfalse619461958#00TABLE apselectCOMMENTqCOMMENT ON TABLE apselect IS 'Temporary table for storing details of Accounts Payable (A/P) Payment selections'; publicadminfalse296#00apselectACLREVOKE ALL ON TABLE apselect FROM PUBLIC; REVOKE ALL ON TABLE apselect FROM admin; GRANT ALL ON TABLE apselect TO admin; GRANT ALL ON TABLE apselect TO xtrole; publicadminfalse296)12591684667apselect_apselect_id_seqSEQUENCEzCREATE SEQUENCE apselect_apselect_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.apselect_apselect_id_seq; publicadminfalse8296#00apselect_apselect_id_seqSEQUENCE OWNED BYGALTER SEQUENCE apselect_apselect_id_seq OWNED BY apselect.apselect_id; publicadminfalse297#00apselect_apselect_id_seq SEQUENCE SETASELECT pg_catalog.setval('apselect_apselect_id_seq', 629, true); publicadminfalse297#00apselect_apselect_id_seqACLREVOKE ALL ON SEQUENCE apselect_apselect_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE apselect_apselect_id_seq FROM admin; GRANT ALL ON SEQUENCE apselect_apselect_id_seq TO admin; GRANT ALL ON SEQUENCE apselect_apselect_id_seq TO xtrole; publicadminfalse297*12591684669araccntTABLEmCREATE TABLE araccnt ( araccnt_id integer DEFAULT nextval(('araccnt_araccnt_id_seq'::text)::regclass) NOT NULL, araccnt_custtype_id integer, araccnt_custtype text, araccnt_freight_accnt_id integer, araccnt_ar_accnt_id integer, araccnt_prepaid_accnt_id integer, araccnt_deferred_accnt_id integer, araccnt_discount_accnt_id integer ); DROP TABLE public.araccnt; publicadminfalse61968#00 TABLE araccntCOMMENTXCOMMENT ON TABLE araccnt IS 'Accounts Receivable (A/R) Account assignment information'; publicadminfalse298#00araccntACLREVOKE ALL ON TABLE araccnt FROM PUBLIC; REVOKE ALL ON TABLE araccnt FROM admin; GRANT ALL ON TABLE araccnt TO admin; GRANT ALL ON TABLE araccnt TO xtrole; publicadminfalse298+12591684676araccnt_araccnt_id_seqSEQUENCExCREATE SEQUENCE araccnt_araccnt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.araccnt_araccnt_id_seq; publicadminfalse8#00araccnt_araccnt_id_seq SEQUENCE SET>SELECT pg_catalog.setval('araccnt_araccnt_id_seq', 38, true); publicadminfalse299#00araccnt_araccnt_id_seqACLREVOKE ALL ON SEQUENCE araccnt_araccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE araccnt_araccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE araccnt_araccnt_id_seq TO admin; GRANT ALL ON SEQUENCE araccnt_araccnt_id_seq TO xtrole; publicadminfalse299,12591684678arapplyTABLECREATE TABLE arapply ( arapply_id integer NOT NULL, arapply_postdate date, arapply_cust_id integer, arapply_source_doctype text, arapply_source_docnumber text, arapply_target_doctype text, arapply_target_docnumber text, arapply_fundstype text, arapply_refnumber text, arapply_applied numeric(20,2), arapply_closed boolean, arapply_journalnumber text, arapply_source_aropen_id integer, arapply_target_aropen_id integer, arapply_username text, arapply_curr_id integer DEFAULT basecurrid(), arapply_distdate date NOT NULL, arapply_target_paid numeric(20,2), arapply_reftype text, arapply_ref_id integer ); DROP TABLE public.arapply; publicadminfalse61988#00 TABLE arapplyCOMMENTCOMMENT ON TABLE arapply IS 'Applications (e.g., Cash Receipts, A/R Credit Memos) made to Accounts Receivable (A/R) Documents'; publicadminfalse300#00arapplyACLREVOKE ALL ON TABLE arapply FROM PUBLIC; REVOKE ALL ON TABLE arapply FROM admin; GRANT ALL ON TABLE arapply TO admin; GRANT ALL ON TABLE arapply TO xtrole; publicadminfalse300-12591684685arapply_arapply_id_seqSEQUENCExCREATE SEQUENCE arapply_arapply_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.arapply_arapply_id_seq; publicadminfalse8300#00arapply_arapply_id_seqSEQUENCE OWNED BYCALTER SEQUENCE arapply_arapply_id_seq OWNED BY arapply.arapply_id; publicadminfalse301#00arapply_arapply_id_seq SEQUENCE SET?SELECT pg_catalog.setval('arapply_arapply_id_seq', 166, true); publicadminfalse301#00arapply_arapply_id_seqACLREVOKE ALL ON SEQUENCE arapply_arapply_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE arapply_arapply_id_seq FROM admin; GRANT ALL ON SEQUENCE arapply_arapply_id_seq TO admin; GRANT ALL ON SEQUENCE arapply_arapply_id_seq TO xtrole; publicadminfalse301.12591684687 cashrcptitem_cashrcptitem_id_seqSEQUENCECREATE SEQUENCE cashrcptitem_cashrcptitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 7DROP SEQUENCE public.cashrcptitem_cashrcptitem_id_seq; publicadminfalse8204#00 cashrcptitem_cashrcptitem_id_seqSEQUENCE OWNED BYWALTER SEQUENCE cashrcptitem_cashrcptitem_id_seq OWNED BY cashrcptitem.cashrcptitem_id; publicadminfalse302#00 cashrcptitem_cashrcptitem_id_seq SEQUENCE SETISELECT pg_catalog.setval('cashrcptitem_cashrcptitem_id_seq', 318, true); publicadminfalse302#00 cashrcptitem_cashrcptitem_id_seqACL REVOKE ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq FROM admin; GRANT ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq TO admin; GRANT ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq TO xtrole; publicadminfalse302/12591684689 arcreditapplyTABLE~CREATE TABLE arcreditapply ( arcreditapply_id integer DEFAULT nextval('cashrcptitem_cashrcptitem_id_seq'::regclass) NOT NULL, arcreditapply_source_aropen_id integer, arcreditapply_target_aropen_id integer, arcreditapply_amount numeric(20,2), arcreditapply_curr_id integer DEFAULT basecurrid(), arcreditapply_reftype text, arcreditapply_ref_id integer ); !DROP TABLE public.arcreditapply; publicadminfalse619962008#00TABLE arcreditapplyCOMMENTCOMMENT ON TABLE arcreditapply IS 'Temporary table for storing details of Accounts Receivable (A/R) Credit Memo applications before those applications are posted'; publicadminfalse303#00 arcreditapplyACLREVOKE ALL ON TABLE arcreditapply FROM PUBLIC; REVOKE ALL ON TABLE arcreditapply FROM admin; GRANT ALL ON TABLE arcreditapply TO admin; GRANT ALL ON TABLE arcreditapply TO xtrole; publicadminfalse303012591684697"arcreditapply_arcreditapply_id_seqSEQUENCECREATE SEQUENCE arcreditapply_arcreditapply_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 9DROP SEQUENCE public.arcreditapply_arcreditapply_id_seq; publicadminfalse8303#00"arcreditapply_arcreditapply_id_seqSEQUENCE OWNED BY[ALTER SEQUENCE arcreditapply_arcreditapply_id_seq OWNED BY arcreditapply.arcreditapply_id; publicadminfalse304#00"arcreditapply_arcreditapply_id_seq SEQUENCE SETJSELECT pg_catalog.setval('arcreditapply_arcreditapply_id_seq', 48, true); publicadminfalse304#00"arcreditapply_arcreditapply_id_seqACLREVOKE ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq FROM admin; GRANT ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq TO admin; GRANT ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq TO xtrole; publicadminfalse304112591684699armemoVIEW CREATE VIEW armemo AS SELECT aropen.aropen_id, aropen.aropen_docnumber FROM aropen WHERE (aropen.aropen_doctype = ANY (ARRAY['D'::bpchar, 'C'::bpchar, 'R'::bpchar])) UNION SELECT cmhead.cmhead_id AS aropen_id, cmhead.cmhead_number AS aropen_docnumber FROM cmhead; DROP VIEW public.armemo; publicadminfalse51388#00armemoACLREVOKE ALL ON TABLE armemo FROM PUBLIC; REVOKE ALL ON TABLE armemo FROM admin; GRANT ALL ON TABLE armemo TO admin; GRANT ALL ON TABLE armemo TO xtrole; publicadminfalse305212591684703aropen_aropen_id_seqSEQUENCE~CREATE SEQUENCE aropen_aropen_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.aropen_aropen_id_seq; publicadminfalse8#00aropen_aropen_id_seq SEQUENCE SET=SELECT pg_catalog.setval('aropen_aropen_id_seq', 452, true); publicadminfalse306#00aropen_aropen_id_seqACLREVOKE ALL ON SEQUENCE aropen_aropen_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE aropen_aropen_id_seq FROM admin; GRANT ALL ON SEQUENCE aropen_aropen_id_seq TO admin; GRANT ALL ON SEQUENCE aropen_aropen_id_seq TO xtrole; publicadminfalse306312591684705 aropentaxTABLE/CREATE TABLE aropentax ( ) INHERITS (taxhist); DROP TABLE public.aropentax; publicadminfalse62018253#00 aropentaxACLREVOKE ALL ON TABLE aropentax FROM PUBLIC; REVOKE ALL ON TABLE aropentax FROM admin; GRANT ALL ON TABLE aropentax TO admin; GRANT ALL ON TABLE aropentax TO xtrole; publicadminfalse307412591684711asohistTABLE#CREATE TABLE asohist ( asohist_id integer NOT NULL, asohist_cust_id integer, asohist_itemsite_id integer, asohist_shipdate date, asohist_invcdate date, asohist_duedate date, asohist_promisedate date, asohist_ordernumber text, asohist_invcnumber text, asohist_qtyshipped numeric(18,6), asohist_unitprice numeric(16,4), asohist_unitcost numeric(16,6), asohist_billtoname text, asohist_billtoaddress1 text, asohist_billtoaddress2 text, asohist_billtoaddress3 text, asohist_billtocity text, asohist_billtostate text, asohist_billtozip text, asohist_shiptoname text, asohist_shiptoaddress1 text, asohist_shiptoaddress2 text, asohist_shiptoaddress3 text, asohist_shiptocity text, asohist_shiptostate text, asohist_shiptozip text, asohist_shipto_id integer, asohist_shipvia text, asohist_salesrep_id integer, asohist_misc_type character(1), asohist_misc_descrip text, asohist_misc_id integer, asohist_commission numeric(16,4), asohist_commissionpaid boolean, asohist_doctype text, asohist_orderdate date, asohist_imported boolean, asohist_ponumber text, asohist_curr_id integer DEFAULT basecurrid(), asohist_taxtype_id integer, asohist_taxzone_id integer ); DROP TABLE public.asohist; publicadminfalse62038#00 TABLE asohistCOMMENT6COMMENT ON TABLE asohist IS 'Archived Sales history'; publicadminfalse308#00asohistACLREVOKE ALL ON TABLE asohist FROM PUBLIC; REVOKE ALL ON TABLE asohist FROM admin; GRANT ALL ON TABLE asohist TO admin; GRANT ALL ON TABLE asohist TO xtrole; publicadminfalse308512591684718asohist_asohist_id_seqSEQUENCExCREATE SEQUENCE asohist_asohist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.asohist_asohist_id_seq; publicadminfalse8308#00asohist_asohist_id_seqSEQUENCE OWNED BYCALTER SEQUENCE asohist_asohist_id_seq OWNED BY asohist.asohist_id; publicadminfalse309#00asohist_asohist_id_seq SEQUENCE SET>SELECT pg_catalog.setval('asohist_asohist_id_seq', 1, false); publicadminfalse309#00asohist_asohist_id_seqACLREVOKE ALL ON SEQUENCE asohist_asohist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE asohist_asohist_id_seq FROM admin; GRANT ALL ON SEQUENCE asohist_asohist_id_seq TO admin; GRANT ALL ON SEQUENCE asohist_asohist_id_seq TO xtrole; publicadminfalse309612591684720 asohisttaxTABLE0CREATE TABLE asohisttax ( ) INHERITS (taxhist); DROP TABLE public.asohisttax; publicadminfalse62048253#00 asohisttaxACLREVOKE ALL ON TABLE asohisttax FROM PUBLIC; REVOKE ALL ON TABLE asohisttax FROM admin; GRANT ALL ON TABLE asohisttax TO admin; GRANT ALL ON TABLE asohisttax TO xtrole; publicadminfalse310712591684726atlasmapTABLErCREATE TABLE atlasmap ( atlasmap_id integer NOT NULL, atlasmap_name text NOT NULL, atlasmap_filter text NOT NULL, atlasmap_filtertype text NOT NULL, atlasmap_atlas text NOT NULL, atlasmap_map text NOT NULL, atlasmap_headerline boolean DEFAULT false NOT NULL, CONSTRAINT atlasmap_atlasmap_name_check CHECK ((atlasmap_name <> ''::text)) ); DROP TABLE public.atlasmap; publicadminfalse620662078#00TABLE atlasmapCOMMENT.COMMENT ON TABLE atlasmap IS 'Describes heuristics for finding a CSVImp atlas for a given CSV file. When looking for a CSV Atlas to use when importing a CSV file, the first atlasmap record found that matches the CSV file is used to select the Atlas file and Map in that Atlas to import the CSV file.'; publicadminfalse311#00COLUMN atlasmap.atlasmap_idCOMMENT[COMMENT ON COLUMN atlasmap.atlasmap_id IS 'The internal id of this CSVImp atlas mapping.'; publicadminfalse311#00COLUMN atlasmap.atlasmap_nameCOMMENT^COMMENT ON COLUMN atlasmap.atlasmap_name IS 'The human-readable name of this atlas mapping.'; publicadminfalse311#00COLUMN atlasmap.atlasmap_filterCOMMENTCOMMENT ON COLUMN atlasmap.atlasmap_filter IS 'A regular expression that should match the CSV file. Which part of the file that matches is determined by the filter type.'; publicadminfalse311#00#COLUMN atlasmap.atlasmap_filtertypeCOMMENT4COMMENT ON COLUMN atlasmap.atlasmap_filtertype IS 'A description of what aspect of the CSV file the filter should be compared with. Handled values are: ''filename'' - the filter is matched against the name of the file; and ''firstline'' - the filter is matched against the first line of the file contents.'; publicadminfalse311#00COLUMN atlasmap.atlasmap_atlasCOMMENTHCOMMENT ON COLUMN atlasmap.atlasmap_atlas IS 'The name of the CSVImp Atlas file. This should be a simple pathname, not an absolute or relative name if possible. The full path will be determined by concatenating the operating-system-specific CSV Atlas default directory with the value here unless this is an absolute pathname.'; publicadminfalse311#00COLUMN atlasmap.atlasmap_mapCOMMENTCOMMENT ON COLUMN atlasmap.atlasmap_map IS 'The name of the Map inside the Atlas to use if the filter and filter type match the CVS file.'; publicadminfalse311$00#COLUMN atlasmap.atlasmap_headerlineCOMMENTCOMMENT ON COLUMN atlasmap.atlasmap_headerline IS 'An indicator of whether the first line of the CSV file should be treated as a header line or as data.'; publicadminfalse311$00atlasmapACLREVOKE ALL ON TABLE atlasmap FROM PUBLIC; REVOKE ALL ON TABLE atlasmap FROM admin; GRANT ALL ON TABLE atlasmap TO admin; GRANT ALL ON TABLE atlasmap TO xtrole; publicadminfalse311812591684733atlasmap_atlasmap_id_seqSEQUENCEzCREATE SEQUENCE atlasmap_atlasmap_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.atlasmap_atlasmap_id_seq; publicadminfalse8311$00atlasmap_atlasmap_id_seqSEQUENCE OWNED BYGALTER SEQUENCE atlasmap_atlasmap_id_seq OWNED BY atlasmap.atlasmap_id; publicadminfalse312$00atlasmap_atlasmap_id_seq SEQUENCE SET@SELECT pg_catalog.setval('atlasmap_atlasmap_id_seq', 1, false); publicadminfalse312$00atlasmap_atlasmap_id_seqACLREVOKE ALL ON SEQUENCE atlasmap_atlasmap_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE atlasmap_atlasmap_id_seq FROM admin; GRANT ALL ON SEQUENCE atlasmap_atlasmap_id_seq TO admin; GRANT ALL ON SEQUENCE atlasmap_atlasmap_id_seq TO xtrole; publicadminfalse312912591684735 backup_usrTABLE2CREATE TABLE backup_usr ( usr_id integer, usr_username text, usr_propername text, usr_passwd text, usr_locale_id integer, usr_initials text, usr_agent boolean, usr_active boolean, usr_email text, usr_dept_id integer, usr_shift_id integer, usr_window text ); DROP TABLE public.backup_usr; publicadminfalse8$00 backup_usrACLREVOKE ALL ON TABLE backup_usr FROM PUBLIC; REVOKE ALL ON TABLE backup_usr FROM admin; GRANT ALL ON TABLE backup_usr TO admin; GRANT ALL ON TABLE backup_usr TO xtrole; publicadminfalse313:12591684741bankaccnt_bankaccnt_id_seqSEQUENCE|CREATE SEQUENCE bankaccnt_bankaccnt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.bankaccnt_bankaccnt_id_seq; publicadminfalse8202$00bankaccnt_bankaccnt_id_seqSEQUENCE OWNED BYKALTER SEQUENCE bankaccnt_bankaccnt_id_seq OWNED BY bankaccnt.bankaccnt_id; publicadminfalse314$00bankaccnt_bankaccnt_id_seq SEQUENCE SETBSELECT pg_catalog.setval('bankaccnt_bankaccnt_id_seq', 15, true); publicadminfalse314$00bankaccnt_bankaccnt_id_seqACLREVOKE ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq TO admin; GRANT ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq TO xtrole; publicadminfalse314;12591684743bankadjTABLE<CREATE TABLE bankadj ( bankadj_id integer NOT NULL, bankadj_bankaccnt_id integer NOT NULL, bankadj_bankadjtype_id integer NOT NULL, bankadj_created timestamp without time zone DEFAULT now() NOT NULL, bankadj_username text DEFAULT geteffectivextuser() NOT NULL, bankadj_date date NOT NULL, bankadj_docnumber text, bankadj_amount numeric(10,2) NOT NULL, bankadj_notes text, bankadj_sequence integer, bankadj_posted boolean DEFAULT false NOT NULL, bankadj_curr_id integer DEFAULT basecurrid(), bankadj_curr_rate numeric ); DROP TABLE public.bankadj; publicadminfalse62086209621062118 $00 TABLE bankadjCOMMENT<COMMENT ON TABLE bankadj IS 'Bank Adjustments information'; publicadminfalse315 $00bankadjACLREVOKE ALL ON TABLE bankadj FROM PUBLIC; REVOKE ALL ON TABLE bankadj FROM admin; GRANT ALL ON TABLE bankadj TO admin; GRANT ALL ON TABLE bankadj TO xtrole; publicadminfalse315<12591684753bankadj_bankadj_id_seqSEQUENCExCREATE SEQUENCE bankadj_bankadj_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.bankadj_bankadj_id_seq; publicadminfalse8315 $00bankadj_bankadj_id_seqSEQUENCE OWNED BYCALTER SEQUENCE bankadj_bankadj_id_seq OWNED BY bankadj.bankadj_id; publicadminfalse316 $00bankadj_bankadj_id_seq SEQUENCE SET>SELECT pg_catalog.setval('bankadj_bankadj_id_seq', 1, false); publicadminfalse316 $00bankadj_bankadj_id_seqACLREVOKE ALL ON SEQUENCE bankadj_bankadj_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankadj_bankadj_id_seq FROM admin; GRANT ALL ON SEQUENCE bankadj_bankadj_id_seq TO admin; GRANT ALL ON SEQUENCE bankadj_bankadj_id_seq TO xtrole; publicadminfalse316=12591684755 bankadjtypeTABLEBCREATE TABLE bankadjtype ( bankadjtype_id integer NOT NULL, bankadjtype_name text NOT NULL, bankadjtype_descrip text, bankadjtype_accnt_id integer NOT NULL, bankadjtype_iscredit boolean DEFAULT false NOT NULL, CONSTRAINT bankadjtype_bankadjtype_name_check CHECK ((bankadjtype_name <> ''::text)) ); DROP TABLE public.bankadjtype; publicadminfalse621462158$00TABLE bankadjtypeCOMMENTECOMMENT ON TABLE bankadjtype IS 'Bank Adjustment Types information'; publicadminfalse317$00 bankadjtypeACLREVOKE ALL ON TABLE bankadjtype FROM PUBLIC; REVOKE ALL ON TABLE bankadjtype FROM admin; GRANT ALL ON TABLE bankadjtype TO admin; GRANT ALL ON TABLE bankadjtype TO xtrole; publicadminfalse317>12591684762bankadjtype_bankadjtype_id_seqSEQUENCECREATE SEQUENCE bankadjtype_bankadjtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.bankadjtype_bankadjtype_id_seq; publicadminfalse8317$00bankadjtype_bankadjtype_id_seqSEQUENCE OWNED BYSALTER SEQUENCE bankadjtype_bankadjtype_id_seq OWNED BY bankadjtype.bankadjtype_id; publicadminfalse318$00bankadjtype_bankadjtype_id_seq SEQUENCE SETESELECT pg_catalog.setval('bankadjtype_bankadjtype_id_seq', 1, true); publicadminfalse318$00bankadjtype_bankadjtype_id_seqACLREVOKE ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq FROM admin; GRANT ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq TO admin; GRANT ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq TO xtrole; publicadminfalse318?12591684764bankrecTABLECREATE TABLE bankrec ( bankrec_id integer NOT NULL, bankrec_created timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, bankrec_username text DEFAULT geteffectivextuser() NOT NULL, bankrec_bankaccnt_id integer, bankrec_opendate date, bankrec_enddate date, bankrec_openbal numeric(20,2), bankrec_endbal numeric(20,2), bankrec_posted boolean DEFAULT false, bankrec_postdate timestamp without time zone ); DROP TABLE public.bankrec; publicadminfalse6216621762188$00 TABLE bankrecCOMMENTCCOMMENT ON TABLE bankrec IS 'Bank Reconciliation posting history'; publicadminfalse319$00bankrecACLREVOKE ALL ON TABLE bankrec FROM PUBLIC; REVOKE ALL ON TABLE bankrec FROM admin; GRANT ALL ON TABLE bankrec TO admin; GRANT ALL ON TABLE bankrec TO xtrole; publicadminfalse319@12591684773bankrec_bankrec_id_seqSEQUENCExCREATE SEQUENCE bankrec_bankrec_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.bankrec_bankrec_id_seq; publicadminfalse8319$00bankrec_bankrec_id_seqSEQUENCE OWNED BYCALTER SEQUENCE bankrec_bankrec_id_seq OWNED BY bankrec.bankrec_id; publicadminfalse320$00bankrec_bankrec_id_seq SEQUENCE SET>SELECT pg_catalog.setval('bankrec_bankrec_id_seq', 40, true); publicadminfalse320$00bankrec_bankrec_id_seqACLREVOKE ALL ON SEQUENCE bankrec_bankrec_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankrec_bankrec_id_seq FROM admin; GRANT ALL ON SEQUENCE bankrec_bankrec_id_seq TO admin; GRANT ALL ON SEQUENCE bankrec_bankrec_id_seq TO xtrole; publicadminfalse320A12591684775 bankrecitemTABLE3CREATE TABLE bankrecitem ( bankrecitem_id integer NOT NULL, bankrecitem_bankrec_id integer NOT NULL, bankrecitem_source text NOT NULL, bankrecitem_source_id integer NOT NULL, bankrecitem_cleared boolean DEFAULT false, bankrecitem_curr_rate numeric, bankrecitem_amount numeric ); DROP TABLE public.bankrecitem; publicadminfalse62218$00TABLE bankrecitemCOMMENTTCOMMENT ON TABLE bankrecitem IS 'Posted Bank Reconciliation Line Item information'; publicadminfalse321$00 bankrecitemACLREVOKE ALL ON TABLE bankrecitem FROM PUBLIC; REVOKE ALL ON TABLE bankrecitem FROM admin; GRANT ALL ON TABLE bankrecitem TO admin; GRANT ALL ON TABLE bankrecitem TO xtrole; publicadminfalse321B12591684782bankrecitem_bankrecitem_id_seqSEQUENCECREATE SEQUENCE bankrecitem_bankrecitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.bankrecitem_bankrecitem_id_seq; publicadminfalse8321$00bankrecitem_bankrecitem_id_seqSEQUENCE OWNED BYSALTER SEQUENCE bankrecitem_bankrecitem_id_seq OWNED BY bankrecitem.bankrecitem_id; publicadminfalse322$00bankrecitem_bankrecitem_id_seq SEQUENCE SETGSELECT pg_catalog.setval('bankrecitem_bankrecitem_id_seq', 337, true); publicadminfalse322$00bankrecitem_bankrecitem_id_seqACLREVOKE ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq FROM admin; GRANT ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq TO admin; GRANT ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq TO xtrole; publicadminfalse322C12591684784bomhead_bomhead_id_seqSEQUENCECREATE SEQUENCE bomhead_bomhead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.bomhead_bomhead_id_seq; publicadminfalse8$00bomhead_bomhead_id_seq SEQUENCE SET>SELECT pg_catalog.setval('bomhead_bomhead_id_seq', 71, true); publicadminfalse323$00bomhead_bomhead_id_seqACLREVOKE ALL ON SEQUENCE bomhead_bomhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomhead_bomhead_id_seq FROM admin; GRANT ALL ON SEQUENCE bomhead_bomhead_id_seq TO admin; GRANT ALL ON SEQUENCE bomhead_bomhead_id_seq TO xtrole; publicadminfalse323D12591684786bomitem_bomitem_id_seqSEQUENCECREATE SEQUENCE bomitem_bomitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.bomitem_bomitem_id_seq; publicadminfalse8$00bomitem_bomitem_id_seq SEQUENCE SET?SELECT pg_catalog.setval('bomitem_bomitem_id_seq', 266, true); publicadminfalse324 $00bomitem_bomitem_id_seqACLREVOKE ALL ON SEQUENCE bomitem_bomitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomitem_bomitem_id_seq FROM admin; GRANT ALL ON SEQUENCE bomitem_bomitem_id_seq TO admin; GRANT ALL ON SEQUENCE bomitem_bomitem_id_seq TO xtrole; publicadminfalse324E12591684788 bomitemcostTABLECREATE TABLE bomitemcost ( bomitemcost_id integer NOT NULL, bomitemcost_bomitem_id integer NOT NULL, bomitemcost_costelem_id integer NOT NULL, bomitemcost_lowlevel boolean DEFAULT false NOT NULL, bomitemcost_stdcost numeric(16,6) DEFAULT 0 NOT NULL, bomitemcost_posted date, bomitemcost_actcost numeric(16,6) DEFAULT 0 NOT NULL, bomitemcost_updated date, bomitemcost_curr_id integer DEFAULT basecurrid() NOT NULL ); DROP TABLE public.bomitemcost; publicadminfalse62226223622462258!$00TABLE bomitemcostCOMMENT<COMMENT ON TABLE bomitemcost IS 'Bomitem Cost information'; publicadminfalse325"$00 bomitemcostACLREVOKE ALL ON TABLE bomitemcost FROM PUBLIC; REVOKE ALL ON TABLE bomitemcost FROM admin; GRANT ALL ON TABLE bomitemcost TO admin; GRANT ALL ON TABLE bomitemcost TO xtrole; publicadminfalse325F12591684795bomitemcost_bomitemcost_id_seqSEQUENCECREATE SEQUENCE bomitemcost_bomitemcost_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.bomitemcost_bomitemcost_id_seq; publicadminfalse8325#$00bomitemcost_bomitemcost_id_seqSEQUENCE OWNED BYSALTER SEQUENCE bomitemcost_bomitemcost_id_seq OWNED BY bomitemcost.bomitemcost_id; publicadminfalse326$$00bomitemcost_bomitemcost_id_seq SEQUENCE SETFSELECT pg_catalog.setval('bomitemcost_bomitemcost_id_seq', 1, false); publicadminfalse326%$00bomitemcost_bomitemcost_id_seqACLREVOKE ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq FROM admin; GRANT ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq TO admin; GRANT ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq TO xtrole; publicadminfalse326G12591684797bomitemsub_bomitemsub_id_seqSEQUENCE~CREATE SEQUENCE bomitemsub_bomitemsub_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 3DROP SEQUENCE public.bomitemsub_bomitemsub_id_seq; publicadminfalse8197&$00bomitemsub_bomitemsub_id_seqSEQUENCE OWNED BYOALTER SEQUENCE bomitemsub_bomitemsub_id_seq OWNED BY bomitemsub.bomitemsub_id; publicadminfalse327'$00bomitemsub_bomitemsub_id_seq SEQUENCE SETCSELECT pg_catalog.setval('bomitemsub_bomitemsub_id_seq', 3, true); publicadminfalse327($00bomitemsub_bomitemsub_id_seqACLREVOKE ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq FROM admin; GRANT ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq TO admin; GRANT ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq TO xtrole; publicadminfalse327H12591684799bomworkTABLEFCREATE TABLE bomwork ( bomwork_id integer NOT NULL, bomwork_set_id integer, bomwork_seqnumber integer, bomwork_item_id integer, bomwork_item_type character(1), bomwork_qtyper numeric(20,8), bomwork_scrap numeric(20,10), bomwork_status character(1), bomwork_level integer, bomwork_parent_id integer, bomwork_effective date, bomwork_expires date, bomwork_stdunitcost numeric(16,6), bomwork_actunitcost numeric(16,6), bomwork_parent_seqnumber integer, bomwork_createwo boolean, bomwork_issuemethod character(1), bomwork_char_id integer, bomwork_value text, bomwork_notes text, bomwork_ref text, bomwork_bomitem_id integer, bomwork_ecn text, bomwork_qtyfxd numeric(20,8) DEFAULT 0 NOT NULL, bomwork_qtyreq numeric(20,8) DEFAULT 0 NOT NULL ); DROP TABLE public.bomwork; publicadminfalse622862298)$00 TABLE bomworkCOMMENTCOMMENT ON TABLE bomwork IS 'Temporary table for storing information requested by Bill of Materials (BOM) displays and reports'; publicadminfalse328*$00COLUMN bomwork.bomwork_qtyfxdCOMMENTKCOMMENT ON COLUMN bomwork.bomwork_qtyfxd IS 'The fixed quantity required'; publicadminfalse328+$00COLUMN bomwork.bomwork_qtyreqCOMMENTKCOMMENT ON COLUMN bomwork.bomwork_qtyreq IS 'The total quantity required'; publicadminfalse328,$00bomworkACLREVOKE ALL ON TABLE bomwork FROM PUBLIC; REVOKE ALL ON TABLE bomwork FROM admin; GRANT ALL ON TABLE bomwork TO admin; GRANT ALL ON TABLE bomwork TO xtrole; publicadminfalse328I12591684807bomwork_bomwork_id_seqSEQUENCExCREATE SEQUENCE bomwork_bomwork_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.bomwork_bomwork_id_seq; publicadminfalse8328-$00bomwork_bomwork_id_seqSEQUENCE OWNED BYCALTER SEQUENCE bomwork_bomwork_id_seq OWNED BY bomwork.bomwork_id; publicadminfalse329.$00bomwork_bomwork_id_seq SEQUENCE SET@SELECT pg_catalog.setval('bomwork_bomwork_id_seq', 3872, true); publicadminfalse329/$00bomwork_bomwork_id_seqACLREVOKE ALL ON SEQUENCE bomwork_bomwork_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE bomwork_bomwork_id_seq FROM admin; GRANT ALL ON SEQUENCE bomwork_bomwork_id_seq TO admin; GRANT ALL ON SEQUENCE bomwork_bomwork_id_seq TO xtrole; publicadminfalse329E12592006550budgetVIEWCREATE VIEW budget AS SELECT budgitem.budgitem_id AS budget_id, budgitem.budgitem_period_id AS budget_period_id, budgitem.budgitem_accnt_id AS budget_accnt_id, budgitem.budgitem_amount AS budget_amount FROM budgitem; DROP VIEW public.budget; publicadminfalse553380$00budgetACLREVOKE ALL ON TABLE budget FROM PUBLIC; REVOKE ALL ON TABLE budget FROM admin; GRANT ALL ON TABLE budget TO admin; GRANT ALL ON TABLE budget TO xtrole; publicadminfalse837J12591684813budghead_budghead_id_seqSEQUENCEzCREATE SEQUENCE budghead_budghead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.budghead_budghead_id_seq; publicadminfalse81981$00budghead_budghead_id_seqSEQUENCE OWNED BYGALTER SEQUENCE budghead_budghead_id_seq OWNED BY budghead.budghead_id; publicadminfalse3302$00budghead_budghead_id_seq SEQUENCE SET?SELECT pg_catalog.setval('budghead_budghead_id_seq', 2, true); publicadminfalse3303$00budghead_budghead_id_seqACLREVOKE ALL ON SEQUENCE budghead_budghead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE budghead_budghead_id_seq FROM admin; GRANT ALL ON SEQUENCE budghead_budghead_id_seq TO admin; GRANT ALL ON SEQUENCE budghead_budghead_id_seq TO xtrole; publicadminfalse330K12591684815budgitem_budgitem_id_seqSEQUENCEzCREATE SEQUENCE budgitem_budgitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.budgitem_budgitem_id_seq; publicadminfalse82004$00budgitem_budgitem_id_seqSEQUENCE OWNED BYGALTER SEQUENCE budgitem_budgitem_id_seq OWNED BY budgitem.budgitem_id; publicadminfalse3315$00budgitem_budgitem_id_seq SEQUENCE SET?SELECT pg_catalog.setval('budgitem_budgitem_id_seq', 1, true); publicadminfalse3316$00budgitem_budgitem_id_seqACLREVOKE ALL ON SEQUENCE budgitem_budgitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE budgitem_budgitem_id_seq FROM admin; GRANT ALL ON SEQUENCE budgitem_budgitem_id_seq TO admin; GRANT ALL ON SEQUENCE budgitem_budgitem_id_seq TO xtrole; publicadminfalse331L12591684817calheadTABLE@CREATE TABLE calhead ( calhead_id integer DEFAULT nextval(('"calhead_calhead_id_seq"'::text)::regclass) NOT NULL, calhead_type character(1), calhead_name text NOT NULL, calhead_descrip text, calhead_origin character(1), CONSTRAINT calhead_calhead_name_check CHECK ((calhead_name <> ''::text)) ); DROP TABLE public.calhead; publicadminfalse6230623187$00 TABLE calheadCOMMENT;COMMENT ON TABLE calhead IS 'Calendar header information'; publicadminfalse3328$00calheadACLREVOKE ALL ON TABLE calhead FROM PUBLIC; REVOKE ALL ON TABLE calhead FROM admin; GRANT ALL ON TABLE calhead TO admin; GRANT ALL ON TABLE calhead TO xtrole; publicadminfalse332M12591684824calhead_calhead_id_seqSEQUENCECREATE SEQUENCE calhead_calhead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.calhead_calhead_id_seq; publicadminfalse89$00calhead_calhead_id_seq SEQUENCE SET>SELECT pg_catalog.setval('calhead_calhead_id_seq', 55, true); publicadminfalse333:$00calhead_calhead_id_seqACLREVOKE ALL ON SEQUENCE calhead_calhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE calhead_calhead_id_seq FROM admin; GRANT ALL ON SEQUENCE calhead_calhead_id_seq TO admin; GRANT ALL ON SEQUENCE calhead_calhead_id_seq TO xtrole; publicadminfalse333N12591684826carrier_carrier_id_seqSEQUENCECREATE SEQUENCE carrier_carrier_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.carrier_carrier_id_seq; publicadminfalse8;$00carrier_carrier_id_seq SEQUENCE SET>SELECT pg_catalog.setval('carrier_carrier_id_seq', 16, true); publicadminfalse334<$00carrier_carrier_id_seqACLREVOKE ALL ON SEQUENCE carrier_carrier_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE carrier_carrier_id_seq FROM admin; GRANT ALL ON SEQUENCE carrier_carrier_id_seq TO admin; GRANT ALL ON SEQUENCE carrier_carrier_id_seq TO xtrole; publicadminfalse334O12591684828cashrcpt_cashrcpt_id_seqSEQUENCEzCREATE SEQUENCE cashrcpt_cashrcpt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.cashrcpt_cashrcpt_id_seq; publicadminfalse8203=$00cashrcpt_cashrcpt_id_seqSEQUENCE OWNED BYGALTER SEQUENCE cashrcpt_cashrcpt_id_seq OWNED BY cashrcpt.cashrcpt_id; publicadminfalse335>$00cashrcpt_cashrcpt_id_seq SEQUENCE SETASELECT pg_catalog.setval('cashrcpt_cashrcpt_id_seq', 252, true); publicadminfalse335?$00cashrcpt_cashrcpt_id_seqACLREVOKE ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq FROM admin; GRANT ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq TO admin; GRANT ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq TO xtrole; publicadminfalse335P12591684830 cashrcptmisc_cashrcptmisc_id_seqSEQUENCECREATE SEQUENCE cashrcptmisc_cashrcptmisc_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 7DROP SEQUENCE public.cashrcptmisc_cashrcptmisc_id_seq; publicadminfalse8205@$00 cashrcptmisc_cashrcptmisc_id_seqSEQUENCE OWNED BYWALTER SEQUENCE cashrcptmisc_cashrcptmisc_id_seq OWNED BY cashrcptmisc.cashrcptmisc_id; publicadminfalse336A$00 cashrcptmisc_cashrcptmisc_id_seq SEQUENCE SETHSELECT pg_catalog.setval('cashrcptmisc_cashrcptmisc_id_seq', 28, true); publicadminfalse336B$00 cashrcptmisc_cashrcptmisc_id_seqACL REVOKE ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq FROM admin; GRANT ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq TO admin; GRANT ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq TO xtrole; publicadminfalse336Q12591684832ccard_ccard_id_seqSEQUENCEtCREATE SEQUENCE ccard_ccard_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.ccard_ccard_id_seq; publicadminfalse8206C$00ccard_ccard_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE ccard_ccard_id_seq OWNED BY ccard.ccard_id; publicadminfalse337D$00ccard_ccard_id_seq SEQUENCE SET9SELECT pg_catalog.setval('ccard_ccard_id_seq', 8, true); publicadminfalse337E$00ccard_ccard_id_seqACLREVOKE ALL ON SEQUENCE ccard_ccard_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ccard_ccard_id_seq FROM admin; GRANT ALL ON SEQUENCE ccard_ccard_id_seq TO admin; GRANT ALL ON SEQUENCE ccard_ccard_id_seq TO xtrole; publicadminfalse337R12591684834ccardaudTABLECREATE TABLE ccardaud ( ccardaud_id integer NOT NULL, ccardaud_ccard_id integer, ccardaud_ccard_seq_old integer, ccardaud_ccard_seq_new integer, ccardaud_ccard_cust_id_old integer, ccardaud_ccard_cust_id_new integer, ccardaud_ccard_active_old boolean, ccardaud_ccard_active_new boolean, ccardaud_ccard_name_old bytea, ccardaud_ccard_name_new bytea, ccardaud_ccard_address1_old bytea, ccardaud_ccard_address1_new bytea, ccardaud_ccard_address2_old bytea, ccardaud_ccard_address2_new bytea, ccardaud_ccard_city_old bytea, ccardaud_ccard_city_new bytea, ccardaud_ccard_state_old bytea, ccardaud_ccard_state_new bytea, ccardaud_ccard_zip_old bytea, ccardaud_ccard_zip_new bytea, ccardaud_ccard_country_old bytea, ccardaud_ccard_country_new bytea, ccardaud_ccard_number_old bytea, ccardaud_ccard_number_new bytea, ccardaud_ccard_debit_old boolean, ccardaud_ccard_debit_new boolean, ccardaud_ccard_month_expired_old bytea, ccardaud_ccard_month_expired_new bytea, ccardaud_ccard_year_expired_old bytea, ccardaud_ccard_year_expired_new bytea, ccardaud_ccard_type_old character(1), ccardaud_ccard_type_new character(1), ccardaud_ccard_last_updated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, ccardaud_ccard_last_updated_by_username text DEFAULT geteffectivextuser() NOT NULL ); DROP TABLE public.ccardaud; publicadminfalse623362348F$00TABLE ccardaudCOMMENTFCOMMENT ON TABLE ccardaud IS 'Credit Card Information tracking data'; publicadminfalse338G$00ccardaudACLREVOKE ALL ON TABLE ccardaud FROM PUBLIC; REVOKE ALL ON TABLE ccardaud FROM admin; GRANT ALL ON TABLE ccardaud TO admin; GRANT ALL ON TABLE ccardaud TO xtrole; publicadminfalse338S12591684842ccardaud_ccardaud_id_seqSEQUENCEzCREATE SEQUENCE ccardaud_ccardaud_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.ccardaud_ccardaud_id_seq; publicadminfalse8338H$00ccardaud_ccardaud_id_seqSEQUENCE OWNED BYGALTER SEQUENCE ccardaud_ccardaud_id_seq OWNED BY ccardaud.ccardaud_id; publicadminfalse339I$00ccardaud_ccardaud_id_seq SEQUENCE SET@SELECT pg_catalog.setval('ccardaud_ccardaud_id_seq', 20, true); publicadminfalse339J$00ccardaud_ccardaud_id_seqACLREVOKE ALL ON SEQUENCE ccardaud_ccardaud_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ccardaud_ccardaud_id_seq FROM admin; GRANT ALL ON SEQUENCE ccardaud_ccardaud_id_seq TO admin; GRANT ALL ON SEQUENCE ccardaud_ccardaud_id_seq TO xtrole; publicadminfalse339T12591684844ccbankTABLECREATE TABLE ccbank ( ccbank_id integer NOT NULL, ccbank_ccard_type text NOT NULL, ccbank_bankaccnt_id integer, CONSTRAINT ccbank_ccbank_ccard_type_check CHECK ((ccbank_ccard_type = ANY (ARRAY['A'::text, 'D'::text, 'M'::text, 'P'::text, 'V'::text]))) ); DROP TABLE public.ccbank; publicadminfalse62368K$00ccbankACLREVOKE ALL ON TABLE ccbank FROM PUBLIC; REVOKE ALL ON TABLE ccbank FROM admin; GRANT ALL ON TABLE ccbank TO admin; GRANT ALL ON TABLE ccbank TO xtrole; publicadminfalse340U12591684851ccbank_ccbank_id_seqSEQUENCEvCREATE SEQUENCE ccbank_ccbank_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.ccbank_ccbank_id_seq; publicadminfalse8340L$00ccbank_ccbank_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE ccbank_ccbank_id_seq OWNED BY ccbank.ccbank_id; publicadminfalse341M$00ccbank_ccbank_id_seq SEQUENCE SET;SELECT pg_catalog.setval('ccbank_ccbank_id_seq', 5, true); publicadminfalse341N$00ccbank_ccbank_id_seqACLREVOKE ALL ON SEQUENCE ccbank_ccbank_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ccbank_ccbank_id_seq FROM admin; GRANT ALL ON SEQUENCE ccbank_ccbank_id_seq TO admin; GRANT ALL ON SEQUENCE ccbank_ccbank_id_seq TO xtrole; publicadminfalse341V12591684853ccpayTABLECREATE TABLE ccpay ( ccpay_id integer NOT NULL, ccpay_ccard_id integer, ccpay_cust_id integer, ccpay_amount numeric(20,2) DEFAULT 0.00 NOT NULL, ccpay_auth boolean DEFAULT true NOT NULL, ccpay_status character(1) NOT NULL, ccpay_type character(1) NOT NULL, ccpay_auth_charge character(1) NOT NULL, ccpay_order_number text, ccpay_order_number_seq integer, ccpay_r_avs text, ccpay_r_ordernum text, ccpay_r_error text, ccpay_r_approved text, ccpay_r_code text, ccpay_r_message text, ccpay_yp_r_time timestamp without time zone, ccpay_r_ref text, ccpay_yp_r_tdate text, ccpay_r_tax text, ccpay_r_shipping text, ccpay_yp_r_score integer, ccpay_transaction_datetime timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, ccpay_by_username text DEFAULT geteffectivextuser() NOT NULL, ccpay_curr_id integer DEFAULT basecurrid(), ccpay_ccpay_id integer ); DROP TABLE public.ccpay; publicadminfalse623762386239624062418O$00 TABLE ccpayCOMMENT<COMMENT ON TABLE ccpay IS 'Track Credit Card PAYments, although really this table tracs communications with Credit Card processing companies. Records in this table may progress from preauthorizations through captures to credits, or they may simply remain in their original state if there is no further processing.'; publicadminfalse342P$00COLUMN ccpay.ccpay_idCOMMENTICOMMENT ON COLUMN ccpay.ccpay_id IS 'Internal ID of this ccpay record.'; publicadminfalse342Q$00COLUMN ccpay.ccpay_ccard_idCOMMENTgCOMMENT ON COLUMN ccpay.ccpay_ccard_id IS 'Internal ID of the Credit Card used for this transaction.'; publicadminfalse342R$00COLUMN ccpay.ccpay_cust_idCOMMENT_COMMENT ON COLUMN ccpay.ccpay_cust_id IS 'Internal ID of the Customer owning the Credit Card'; publicadminfalse342S$00COLUMN ccpay.ccpay_amountCOMMENTNCOMMENT ON COLUMN ccpay.ccpay_amount IS 'Actual amount of this transaction.'; publicadminfalse342T$00COLUMN ccpay.ccpay_authCOMMENTCOMMENT ON COLUMN ccpay.ccpay_auth IS 'Boolean indicator of whether this transaction started out as a pre-authorization or not.'; publicadminfalse342U$00COLUMN ccpay.ccpay_statusCOMMENTCOMMENT ON COLUMN ccpay.ccpay_status IS 'The status of the last attempted transaction for this record. Values include A = Authorized, C = Charged, D = Declined or otherwise rejected, V = Voided, X = Error.'; publicadminfalse342V$00COLUMN ccpay.ccpay_typeCOMMENTCOMMENT ON COLUMN ccpay.ccpay_type IS 'The most recent type of transaction attempted with this record. Values include A = Authorize, C = Capture or Charge, R = cRedit, V = reVerse or Void.'; publicadminfalse342W$00COLUMN ccpay.ccpay_auth_chargeCOMMENTCOMMENT ON COLUMN ccpay.ccpay_auth_charge IS 'The original type of transaction attempted with this record. Values are the same as for ccpay_type.'; publicadminfalse342X$00COLUMN ccpay.ccpay_order_numberCOMMENTCOMMENT ON COLUMN ccpay.ccpay_order_number IS 'The original xTuple ERP order for which this credit card transaction applies. This will usually be either a Sales Order number or Credit Memo number.'; publicadminfalse342Y$00#COLUMN ccpay.ccpay_order_number_seqCOMMENTCOMMENT ON COLUMN ccpay.ccpay_order_number_seq IS 'A sequence number to differentiate between different transactions for the same ccpay_order_number. For example, if a Customer makes a down payment and a final payment for a single order, there will be two distinct ccpay records with the same ccpay_order_number but different ccpay_order_number_seq values (1 and 2, respectively).'; publicadminfalse342Z$00COLUMN ccpay.ccpay_r_avsCOMMENTCOMMENT ON COLUMN ccpay.ccpay_r_avs IS 'The Address Verification System code returned by the credit card processing company.'; publicadminfalse342[$00COLUMN ccpay.ccpay_r_ordernumCOMMENTCOMMENT ON COLUMN ccpay.ccpay_r_ordernum IS 'A transaction ID returned by the credit card processing company to be used when referring to this transaction later. It may be used for voiding, crediting, or capturing previous transactions.'; publicadminfalse342\$00COLUMN ccpay.ccpay_r_errorCOMMENTCOMMENT ON COLUMN ccpay.ccpay_r_error IS 'Error message, if any, describing why this record failed to be processed properly.'; publicadminfalse342]$00COLUMN ccpay.ccpay_r_approvedCOMMENTCOMMENT ON COLUMN ccpay.ccpay_r_approved IS 'English text stating whether the transaction was approved, declined, hit an error, or was held for review. Specific values differ depending on the credit card processor.'; publicadminfalse342^$00COLUMN ccpay.ccpay_r_codeCOMMENTCOMMENT ON COLUMN ccpay.ccpay_r_code IS 'The transaction Approval code returned by the credit card processor. Specific values differ depending on the credit card processor.'; publicadminfalse342_$00COLUMN ccpay.ccpay_r_messageCOMMENTCOMMENT ON COLUMN ccpay.ccpay_r_message IS 'Additional text that describes the status of the transaction. This may be empty.'; publicadminfalse342`$00COLUMN ccpay.ccpay_yp_r_timeCOMMENTCOMMENT ON COLUMN ccpay.ccpay_yp_r_time IS 'The time the transaction was posted according to the credit card processing company. May be blank.'; publicadminfalse342a$00COLUMN ccpay.ccpay_r_refCOMMENTCOMMENT ON COLUMN ccpay.ccpay_r_ref IS 'An additional reference number assigned to this transaction by the credit card processing company.'; publicadminfalse342b$00COLUMN ccpay.ccpay_yp_r_tdateCOMMENTCOMMENT ON COLUMN ccpay.ccpay_yp_r_tdate IS 'The date the transaction was posted according to the credit card processing company. May be blank.'; publicadminfalse342c$00COLUMN ccpay.ccpay_r_taxCOMMENT9COMMENT ON COLUMN ccpay.ccpay_r_tax IS '[ deprecated ]'; publicadminfalse342d$00COLUMN ccpay.ccpay_r_shippingCOMMENT>COMMENT ON COLUMN ccpay.ccpay_r_shipping IS '[ deprecated ]'; publicadminfalse342e$00COLUMN ccpay.ccpay_yp_r_scoreCOMMENTzCOMMENT ON COLUMN ccpay.ccpay_yp_r_score IS 'A potential fraud score returned by the credit card company. May be blank.'; publicadminfalse342f$00'COLUMN ccpay.ccpay_transaction_datetimeCOMMENTCOMMENT ON COLUMN ccpay.ccpay_transaction_datetime IS 'The date and time this record was created, unless explicitly set by the application.'; publicadminfalse342g$00COLUMN ccpay.ccpay_by_usernameCOMMENT|COMMENT ON COLUMN ccpay.ccpay_by_username IS 'The user who created this record, unless explicitly set by the application.'; publicadminfalse342h$00COLUMN ccpay.ccpay_curr_idCOMMENTaCOMMENT ON COLUMN ccpay.ccpay_curr_id IS 'The internal ID of the currency of the ccpay_amount.'; publicadminfalse342i$00COLUMN ccpay.ccpay_ccpay_idCOMMENTCOMMENT ON COLUMN ccpay.ccpay_ccpay_id IS 'Foreign key to another ccpay record. This will have a value if a new ccpay record is created to record a Refund for part or all of another ccpay record.'; publicadminfalse342j$00ccpayACLREVOKE ALL ON TABLE ccpay FROM PUBLIC; REVOKE ALL ON TABLE ccpay FROM admin; GRANT ALL ON TABLE ccpay TO admin; GRANT ALL ON TABLE ccpay TO xtrole; publicadminfalse342W12591684864ccpay_ccpay_id_seqSEQUENCEtCREATE SEQUENCE ccpay_ccpay_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.ccpay_ccpay_id_seq; publicadminfalse8342k$00ccpay_ccpay_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE ccpay_ccpay_id_seq OWNED BY ccpay.ccpay_id; publicadminfalse343l$00ccpay_ccpay_id_seq SEQUENCE SET:SELECT pg_catalog.setval('ccpay_ccpay_id_seq', 54, true); publicadminfalse343m$00ccpay_ccpay_id_seqACLREVOKE ALL ON SEQUENCE ccpay_ccpay_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ccpay_ccpay_id_seq FROM admin; GRANT ALL ON SEQUENCE ccpay_ccpay_id_seq TO admin; GRANT ALL ON SEQUENCE ccpay_ccpay_id_seq TO xtrole; publicadminfalse343X12591684866char_char_id_seqSEQUENCErCREATE SEQUENCE char_char_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.char_char_id_seq; publicadminfalse8185n$00char_char_id_seqSEQUENCE OWNED BY9ALTER SEQUENCE char_char_id_seq OWNED BY "char".char_id; publicadminfalse344o$00char_char_id_seq SEQUENCE SET8SELECT pg_catalog.setval('char_char_id_seq', 24, true); publicadminfalse344p$00char_char_id_seqACLREVOKE ALL ON SEQUENCE char_char_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE char_char_id_seq FROM admin; GRANT ALL ON SEQUENCE char_char_id_seq TO admin; GRANT ALL ON SEQUENCE char_char_id_seq TO xtrole; publicadminfalse344Y12591684868charass_charass_id_seqSEQUENCExCREATE SEQUENCE charass_charass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.charass_charass_id_seq; publicadminfalse8186q$00charass_charass_id_seqSEQUENCE OWNED BYCALTER SEQUENCE charass_charass_id_seq OWNED BY charass.charass_id; publicadminfalse345r$00charass_charass_id_seq SEQUENCE SET?SELECT pg_catalog.setval('charass_charass_id_seq', 332, true); publicadminfalse345s$00charass_charass_id_seqACLREVOKE ALL ON SEQUENCE charass_charass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE charass_charass_id_seq FROM admin; GRANT ALL ON SEQUENCE charass_charass_id_seq TO admin; GRANT ALL ON SEQUENCE charass_charass_id_seq TO xtrole; publicadminfalse345Z12591684870charoptTABLECREATE TABLE charopt ( charopt_id integer NOT NULL, charopt_char_id integer, charopt_value text NOT NULL, charopt_order integer DEFAULT 0 NOT NULL ); DROP TABLE public.charopt; publicadminfalse62448t$00 TABLE charoptCOMMENTGCOMMENT ON TABLE charopt IS 'Stores list options for characteristics'; publicadminfalse346u$00COLUMN charopt.charopt_idCOMMENT7COMMENT ON COLUMN charopt.charopt_id IS 'Primary key'; publicadminfalse346v$00COLUMN charopt.charopt_char_idCOMMENTHCOMMENT ON COLUMN charopt.charopt_char_id IS 'Reference to char table'; publicadminfalse346w$00COLUMN charopt.charopt_valueCOMMENT;COMMENT ON COLUMN charopt.charopt_value IS 'Option value'; publicadminfalse346x$00COLUMN charopt.charopt_orderCOMMENT@COMMENT ON COLUMN charopt.charopt_order IS 'Option sort order'; publicadminfalse346y$00charoptACLREVOKE ALL ON TABLE charopt FROM PUBLIC; REVOKE ALL ON TABLE charopt FROM admin; GRANT ALL ON TABLE charopt TO admin; GRANT ALL ON TABLE charopt TO xtrole; publicadminfalse346[12591684877charopt_charopt_id_seqSEQUENCExCREATE SEQUENCE charopt_charopt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.charopt_charopt_id_seq; publicadminfalse8346z$00charopt_charopt_id_seqSEQUENCE OWNED BYCALTER SEQUENCE charopt_charopt_id_seq OWNED BY charopt.charopt_id; publicadminfalse347{$00charopt_charopt_id_seq SEQUENCE SET>SELECT pg_catalog.setval('charopt_charopt_id_seq', 1, false); publicadminfalse347|$00charopt_charopt_id_seqACLREVOKE ALL ON SEQUENCE charopt_charopt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE charopt_charopt_id_seq FROM admin; GRANT ALL ON SEQUENCE charopt_charopt_id_seq TO admin; GRANT ALL ON SEQUENCE charopt_charopt_id_seq TO xtrole; publicadminfalse347]12591684895checkhead_checkhead_id_seqSEQUENCE|CREATE SEQUENCE checkhead_checkhead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.checkhead_checkhead_id_seq; publicadminfalse8348}$00checkhead_checkhead_id_seqSEQUENCE OWNED BYKALTER SEQUENCE checkhead_checkhead_id_seq OWNED BY checkhead.checkhead_id; publicadminfalse349~$00checkhead_checkhead_id_seq SEQUENCE SETCSELECT pg_catalog.setval('checkhead_checkhead_id_seq', 225, true); publicadminfalse349$00checkhead_checkhead_id_seqACLREVOKE ALL ON SEQUENCE checkhead_checkhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE checkhead_checkhead_id_seq FROM admin; GRANT ALL ON SEQUENCE checkhead_checkhead_id_seq TO admin; GRANT ALL ON SEQUENCE checkhead_checkhead_id_seq TO xtrole; publicadminfalse349_12591684907checkitem_checkitem_id_seqSEQUENCE|CREATE SEQUENCE checkitem_checkitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.checkitem_checkitem_id_seq; publicadminfalse8350$00checkitem_checkitem_id_seqSEQUENCE OWNED BYKALTER SEQUENCE checkitem_checkitem_id_seq OWNED BY checkitem.checkitem_id; publicadminfalse351$00checkitem_checkitem_id_seq SEQUENCE SETCSELECT pg_catalog.setval('checkitem_checkitem_id_seq', 390, true); publicadminfalse351$00checkitem_checkitem_id_seqACLREVOKE ALL ON SEQUENCE checkitem_checkitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE checkitem_checkitem_id_seq FROM admin; GRANT ALL ON SEQUENCE checkitem_checkitem_id_seq TO admin; GRANT ALL ON SEQUENCE checkitem_checkitem_id_seq TO xtrole; publicadminfalse351F12592006554 checkrecipVIEWCREATE VIEW checkrecip AS (SELECT custinfo.cust_id AS checkrecip_id, 'C' AS checkrecip_type, custinfo.cust_number AS checkrecip_number, custinfo.cust_name AS checkrecip_name, 'A/R' AS checkrecip_gltrans_source, findaraccount(custinfo.cust_id) AS checkrecip_accnt_id, cntct.cntct_addr_id AS checkrecip_addr_id FROM (custinfo LEFT JOIN cntct ON ((custinfo.cust_cntct_id = cntct.cntct_id))) UNION ALL SELECT taxauth.taxauth_id AS checkrecip_id, 'T' AS checkrecip_type, taxauth.taxauth_code AS checkrecip_number, taxauth.taxauth_name AS checkrecip_name, 'G/L' AS checkrecip_gltrans_source, taxauth.taxauth_accnt_id AS checkrecip_accnt_id, taxauth.taxauth_addr_id AS checkrecip_addr_id FROM taxauth) UNION ALL SELECT vendinfo.vend_id AS checkrecip_id, 'V' AS checkrecip_type, vendinfo.vend_number AS checkrecip_number, vendinfo.vend_name AS checkrecip_name, 'A/P' AS checkrecip_gltrans_source, findapaccount(vendinfo.vend_id) AS checkrecip_accnt_id, vendaddrinfo.vendaddr_addr_id AS checkrecip_addr_id FROM (vendinfo LEFT JOIN vendaddrinfo ON (((vendinfo.vend_id = vendaddrinfo.vendaddr_vend_id) AND (upper(vendaddrinfo.vendaddr_code) = 'REMIT'::text)))); DROP VIEW public.checkrecip; publicadminfalse55348$00 checkrecipACLREVOKE ALL ON TABLE checkrecip FROM PUBLIC; REVOKE ALL ON TABLE checkrecip FROM admin; GRANT ALL ON TABLE checkrecip TO admin; GRANT ALL ON TABLE checkrecip TO xtrole; publicadminfalse838`12591684914classcode_classcode_id_seqSEQUENCECREATE SEQUENCE classcode_classcode_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 1DROP SEQUENCE public.classcode_classcode_id_seq; publicadminfalse8$00classcode_classcode_id_seq SEQUENCE SETBSELECT pg_catalog.setval('classcode_classcode_id_seq', 39, true); publicadminfalse352$00classcode_classcode_id_seqACLREVOKE ALL ON SEQUENCE classcode_classcode_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE classcode_classcode_id_seq FROM admin; GRANT ALL ON SEQUENCE classcode_classcode_id_seq TO admin; GRANT ALL ON SEQUENCE classcode_classcode_id_seq TO xtrole; publicadminfalse352a12591684916cmhead_cmhead_id_seqSEQUENCE~CREATE SEQUENCE cmhead_cmhead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.cmhead_cmhead_id_seq; publicadminfalse8$00cmhead_cmhead_id_seq SEQUENCE SET=SELECT pg_catalog.setval('cmhead_cmhead_id_seq', 209, true); publicadminfalse353$00cmhead_cmhead_id_seqACLREVOKE ALL ON SEQUENCE cmhead_cmhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmhead_cmhead_id_seq FROM admin; GRANT ALL ON SEQUENCE cmhead_cmhead_id_seq TO admin; GRANT ALL ON SEQUENCE cmhead_cmhead_id_seq TO xtrole; publicadminfalse353b12591684918 cmheadtaxTABLE/CREATE TABLE cmheadtax ( ) INHERITS (taxhist); DROP TABLE public.cmheadtax; publicadminfalse62618253$00 cmheadtaxACLREVOKE ALL ON TABLE cmheadtax FROM PUBLIC; REVOKE ALL ON TABLE cmheadtax FROM admin; GRANT ALL ON TABLE cmheadtax TO admin; GRANT ALL ON TABLE cmheadtax TO xtrole; publicadminfalse354c12591684924cmitem_cmitem_id_seqSEQUENCE~CREATE SEQUENCE cmitem_cmitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.cmitem_cmitem_id_seq; publicadminfalse8$00cmitem_cmitem_id_seq SEQUENCE SET<SELECT pg_catalog.setval('cmitem_cmitem_id_seq', 84, true); publicadminfalse355$00cmitem_cmitem_id_seqACLREVOKE ALL ON SEQUENCE cmitem_cmitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmitem_cmitem_id_seq FROM admin; GRANT ALL ON SEQUENCE cmitem_cmitem_id_seq TO admin; GRANT ALL ON SEQUENCE cmitem_cmitem_id_seq TO xtrole; publicadminfalse355d12591684926 cmitemtaxTABLE/CREATE TABLE cmitemtax ( ) INHERITS (taxhist); DROP TABLE public.cmitemtax; publicadminfalse62628253$00 cmitemtaxACLREVOKE ALL ON TABLE cmitemtax FROM PUBLIC; REVOKE ALL ON TABLE cmitemtax FROM admin; GRANT ALL ON TABLE cmitemtax TO admin; GRANT ALL ON TABLE cmitemtax TO xtrole; publicadminfalse356e12591684932cmnttype_cmnttype_id_seqSEQUENCEzCREATE SEQUENCE cmnttype_cmnttype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.cmnttype_cmnttype_id_seq; publicadminfalse8187$00cmnttype_cmnttype_id_seqSEQUENCE OWNED BYGALTER SEQUENCE cmnttype_cmnttype_id_seq OWNED BY cmnttype.cmnttype_id; publicadminfalse357$00cmnttype_cmnttype_id_seq SEQUENCE SET@SELECT pg_catalog.setval('cmnttype_cmnttype_id_seq', 10, true); publicadminfalse357$00cmnttype_cmnttype_id_seqACLREVOKE ALL ON SEQUENCE cmnttype_cmnttype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmnttype_cmnttype_id_seq FROM admin; GRANT ALL ON SEQUENCE cmnttype_cmnttype_id_seq TO admin; GRANT ALL ON SEQUENCE cmnttype_cmnttype_id_seq TO xtrole; publicadminfalse357f12591684934cmnttypesourceTABLECREATE TABLE cmnttypesource ( cmnttypesource_id integer NOT NULL, cmnttypesource_cmnttype_id integer, cmnttypesource_source_id integer ); "DROP TABLE public.cmnttypesource; publicadminfalse8$00TABLE cmnttypesourceCOMMENTFCOMMENT ON TABLE cmnttypesource IS 'Comment Type/Source association'; publicadminfalse358$00cmnttypesourceACLREVOKE ALL ON TABLE cmnttypesource FROM PUBLIC; REVOKE ALL ON TABLE cmnttypesource FROM admin; GRANT ALL ON TABLE cmnttypesource TO admin; GRANT ALL ON TABLE cmnttypesource TO xtrole; publicadminfalse358g12591684937$cmnttypesource_cmnttypesource_id_seqSEQUENCECREATE SEQUENCE cmnttypesource_cmnttypesource_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ;DROP SEQUENCE public.cmnttypesource_cmnttypesource_id_seq; publicadminfalse8358$00$cmnttypesource_cmnttypesource_id_seqSEQUENCE OWNED BY_ALTER SEQUENCE cmnttypesource_cmnttypesource_id_seq OWNED BY cmnttypesource.cmnttypesource_id; publicadminfalse359$00$cmnttypesource_cmnttypesource_id_seq SEQUENCE SETMSELECT pg_catalog.setval('cmnttypesource_cmnttypesource_id_seq', 162, true); publicadminfalse359$00$cmnttypesource_cmnttypesource_id_seqACLREVOKE ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq FROM admin; GRANT ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq TO admin; GRANT ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq TO xtrole; publicadminfalse359h12591684939cntct_cntct_id_seqSEQUENCEtCREATE SEQUENCE cntct_cntct_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.cntct_cntct_id_seq; publicadminfalse8152$00cntct_cntct_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE cntct_cntct_id_seq OWNED BY cntct.cntct_id; publicadminfalse360$00cntct_cntct_id_seq SEQUENCE SET:SELECT pg_catalog.setval('cntct_cntct_id_seq', 36, true); publicadminfalse360$00cntct_cntct_id_seqACLREVOKE ALL ON SEQUENCE cntct_cntct_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntct_cntct_id_seq FROM admin; GRANT ALL ON SEQUENCE cntct_cntct_id_seq TO admin; GRANT ALL ON SEQUENCE cntct_cntct_id_seq TO xtrole; publicadminfalse360i12591684941 cntctaddrTABLECREATE TABLE cntctaddr ( cntctaddr_id integer NOT NULL, cntctaddr_cntct_id integer, cntctaddr_primary boolean NOT NULL, cntctaddr_addr_id integer NOT NULL, cntctaddr_type character(2) NOT NULL ); DROP TABLE public.cntctaddr; publicadminfalse8$00 cntctaddrACLREVOKE ALL ON TABLE cntctaddr FROM PUBLIC; REVOKE ALL ON TABLE cntctaddr FROM admin; GRANT ALL ON TABLE cntctaddr TO admin; GRANT ALL ON TABLE cntctaddr TO xtrole; publicadminfalse361j12591684944cntctaddr_cntctaddr_id_seqSEQUENCE|CREATE SEQUENCE cntctaddr_cntctaddr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.cntctaddr_cntctaddr_id_seq; publicadminfalse8361$00cntctaddr_cntctaddr_id_seqSEQUENCE OWNED BYKALTER SEQUENCE cntctaddr_cntctaddr_id_seq OWNED BY cntctaddr.cntctaddr_id; publicadminfalse362$00cntctaddr_cntctaddr_id_seq SEQUENCE SETBSELECT pg_catalog.setval('cntctaddr_cntctaddr_id_seq', 1, false); publicadminfalse362$00cntctaddr_cntctaddr_id_seqACLREVOKE ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq FROM admin; GRANT ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq TO admin; GRANT ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq TO xtrole; publicadminfalse362k12591684946 cntctdataTABLECREATE TABLE cntctdata ( cntctdata_id integer NOT NULL, cntctdata_cntct_id integer, cntctdata_primary boolean NOT NULL, cntctdata_text text NOT NULL, cntctdata_type character(2) NOT NULL ); DROP TABLE public.cntctdata; publicadminfalse8$00 cntctdataACLREVOKE ALL ON TABLE cntctdata FROM PUBLIC; REVOKE ALL ON TABLE cntctdata FROM admin; GRANT ALL ON TABLE cntctdata TO admin; GRANT ALL ON TABLE cntctdata TO xtrole; publicadminfalse363l12591684952cntctdata_cntctdata_id_seqSEQUENCE|CREATE SEQUENCE cntctdata_cntctdata_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.cntctdata_cntctdata_id_seq; publicadminfalse8363$00cntctdata_cntctdata_id_seqSEQUENCE OWNED BYKALTER SEQUENCE cntctdata_cntctdata_id_seq OWNED BY cntctdata.cntctdata_id; publicadminfalse364$00cntctdata_cntctdata_id_seq SEQUENCE SETBSELECT pg_catalog.setval('cntctdata_cntctdata_id_seq', 1, false); publicadminfalse364$00cntctdata_cntctdata_id_seqACLREVOKE ALL ON SEQUENCE cntctdata_cntctdata_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntctdata_cntctdata_id_seq FROM admin; GRANT ALL ON SEQUENCE cntctdata_cntctdata_id_seq TO admin; GRANT ALL ON SEQUENCE cntctdata_cntctdata_id_seq TO xtrole; publicadminfalse364m12591684954cntctemlTABLECREATE TABLE cntcteml ( cntcteml_id integer NOT NULL, cntcteml_cntct_id integer, cntcteml_primary boolean DEFAULT false NOT NULL, cntcteml_email text NOT NULL ); DROP TABLE public.cntcteml; publicadminfalse62678$00TABLE cntctemlCOMMENTDCOMMENT ON TABLE cntcteml IS 'Stores email addresses for contacts'; publicadminfalse365$00COLUMN cntcteml.cntcteml_idCOMMENT9COMMENT ON COLUMN cntcteml.cntcteml_id IS 'Primary key'; publicadminfalse365$00!COLUMN cntcteml.cntcteml_cntct_idCOMMENTNCOMMENT ON COLUMN cntcteml.cntcteml_cntct_id IS 'Reference to contact table'; publicadminfalse365$00 COLUMN cntcteml.cntcteml_primaryCOMMENTbCOMMENT ON COLUMN cntcteml.cntcteml_primary IS 'Flags whether this is the primary email address'; publicadminfalse365$00COLUMN cntcteml.cntcteml_emailCOMMENTFCOMMENT ON COLUMN cntcteml.cntcteml_email IS 'Alternate information'; publicadminfalse365$00cntctemlACLREVOKE ALL ON TABLE cntcteml FROM PUBLIC; REVOKE ALL ON TABLE cntcteml FROM admin; GRANT ALL ON TABLE cntcteml TO admin; GRANT ALL ON TABLE cntcteml TO xtrole; publicadminfalse365n12591684961cntcteml_cntcteml_id_seqSEQUENCEzCREATE SEQUENCE cntcteml_cntcteml_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.cntcteml_cntcteml_id_seq; publicadminfalse8365$00cntcteml_cntcteml_id_seqSEQUENCE OWNED BYGALTER SEQUENCE cntcteml_cntcteml_id_seq OWNED BY cntcteml.cntcteml_id; publicadminfalse366$00cntcteml_cntcteml_id_seq SEQUENCE SET@SELECT pg_catalog.setval('cntcteml_cntcteml_id_seq', 21, true); publicadminfalse366$00cntcteml_cntcteml_id_seqACLREVOKE ALL ON SEQUENCE cntcteml_cntcteml_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntcteml_cntcteml_id_seq FROM admin; GRANT ALL ON SEQUENCE cntcteml_cntcteml_id_seq TO admin; GRANT ALL ON SEQUENCE cntcteml_cntcteml_id_seq TO xtrole; publicadminfalse366o12591684963 cntctmrgdTABLEoCREATE TABLE cntctmrgd ( cntctmrgd_cntct_id integer NOT NULL, cntctmrgd_error boolean DEFAULT false ); DROP TABLE public.cntctmrgd; publicadminfalse62688$00 cntctmrgdACLREVOKE ALL ON TABLE cntctmrgd FROM PUBLIC; REVOKE ALL ON TABLE cntctmrgd FROM admin; GRANT ALL ON TABLE cntctmrgd TO admin; GRANT ALL ON TABLE cntctmrgd TO xtrole; publicadminfalse367p12591684967cntctselTABLEbCREATE TABLE cntctsel ( cntctsel_cntct_id integer NOT NULL, cntctsel_target boolean, cntctsel_mrg_crmacct_id boolean DEFAULT false, cntctsel_mrg_addr_id boolean DEFAULT false, cntctsel_mrg_first_name boolean DEFAULT false, cntctsel_mrg_last_name boolean DEFAULT false, cntctsel_mrg_honorific boolean DEFAULT false, cntctsel_mrg_initials boolean DEFAULT false, cntctsel_mrg_phone boolean DEFAULT false, cntctsel_mrg_phone2 boolean DEFAULT false, cntctsel_mrg_fax boolean DEFAULT false, cntctsel_mrg_email boolean DEFAULT false, cntctsel_mrg_webaddr boolean DEFAULT false, cntctsel_mrg_notes boolean DEFAULT false, cntctsel_mrg_title boolean DEFAULT false, cntctsel_mrg_middle boolean DEFAULT false, cntctsel_mrg_suffix boolean DEFAULT false, cntctsel_mrg_owner_username boolean DEFAULT false ); DROP TABLE public.cntctsel; publicadminfalse62696270627162726273627462756276627762786279628062816282628362848$00cntctselACLREVOKE ALL ON TABLE cntctsel FROM PUBLIC; REVOKE ALL ON TABLE cntctsel FROM admin; GRANT ALL ON TABLE cntctsel TO admin; GRANT ALL ON TABLE cntctsel TO xtrole; publicadminfalse368r12591684993cntslip_cntslip_id_seqSEQUENCECREATE SEQUENCE cntslip_cntslip_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.cntslip_cntslip_id_seq; publicadminfalse8$00cntslip_cntslip_id_seq SEQUENCE SET>SELECT pg_catalog.setval('cntslip_cntslip_id_seq', 97, true); publicadminfalse370$00cntslip_cntslip_id_seqACLREVOKE ALL ON SEQUENCE cntslip_cntslip_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cntslip_cntslip_id_seq FROM admin; GRANT ALL ON SEQUENCE cntslip_cntslip_id_seq TO admin; GRANT ALL ON SEQUENCE cntslip_cntslip_id_seq TO xtrole; publicadminfalse370s12591684995cobillTABLECREATE TABLE cobill ( cobill_id integer DEFAULT nextval(('cobill_cobill_id_seq'::text)::regclass) NOT NULL, cobill_coitem_id integer, cobill_selectdate timestamp with time zone, cobill_qty numeric(18,6), cobill_invcnum integer, cobill_toclose boolean, cobill_cobmisc_id integer, cobill_select_username text, cobill_invcitem_id integer, cobill_taxtype_id integer ); DROP TABLE public.cobill; publicadminfalse62868$00 TABLE cobillCOMMENTFCOMMENT ON TABLE cobill IS 'Billing Selection Line Item information'; publicadminfalse371$00cobillACLREVOKE ALL ON TABLE cobill FROM PUBLIC; REVOKE ALL ON TABLE cobill FROM admin; GRANT ALL ON TABLE cobill TO admin; GRANT ALL ON TABLE cobill TO xtrole; publicadminfalse371t12591685002cobill_cobill_id_seqSEQUENCE~CREATE SEQUENCE cobill_cobill_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.cobill_cobill_id_seq; publicadminfalse8$00cobill_cobill_id_seq SEQUENCE SET=SELECT pg_catalog.setval('cobill_cobill_id_seq', 664, true); publicadminfalse372$00cobill_cobill_id_seqACLREVOKE ALL ON SEQUENCE cobill_cobill_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cobill_cobill_id_seq FROM admin; GRANT ALL ON SEQUENCE cobill_cobill_id_seq TO admin; GRANT ALL ON SEQUENCE cobill_cobill_id_seq TO xtrole; publicadminfalse372u12591685004 cobilltaxTABLE/CREATE TABLE cobilltax ( ) INHERITS (taxhist); DROP TABLE public.cobilltax; publicadminfalse62878253$00 cobilltaxACLREVOKE ALL ON TABLE cobilltax FROM PUBLIC; REVOKE ALL ON TABLE cobilltax FROM admin; GRANT ALL ON TABLE cobilltax TO admin; GRANT ALL ON TABLE cobilltax TO xtrole; publicadminfalse373v12591685010cobmiscTABLECREATE TABLE cobmisc ( cobmisc_id integer DEFAULT nextval(('cobmisc_cobmisc_id_seq'::text)::regclass) NOT NULL, cobmisc_cohead_id integer, cobmisc_shipvia text, cobmisc_freight numeric(16,4), cobmisc_misc numeric(16,4), cobmisc_payment numeric(16,4), cobmisc_paymentref text, cobmisc_notes text, cobmisc_shipdate date, cobmisc_invcnumber integer, cobmisc_invcdate date, cobmisc_posted boolean, cobmisc_misc_accnt_id integer, cobmisc_misc_descrip text, cobmisc_closeorder boolean, cobmisc_curr_id integer DEFAULT basecurrid(), cobmisc_invchead_id integer, cobmisc_taxzone_id integer, cobmisc_taxtype_id integer ); DROP TABLE public.cobmisc; publicadminfalse628862898$00 TABLE cobmiscCOMMENTLCOMMENT ON TABLE cobmisc IS 'General information about Billing Selections'; publicadminfalse374$00cobmiscACLREVOKE ALL ON TABLE cobmisc FROM PUBLIC; REVOKE ALL ON TABLE cobmisc FROM admin; GRANT ALL ON TABLE cobmisc TO admin; GRANT ALL ON TABLE cobmisc TO xtrole; publicadminfalse374w12591685018cobmisc_cobmisc_id_seqSEQUENCECREATE SEQUENCE cobmisc_cobmisc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.cobmisc_cobmisc_id_seq; publicadminfalse8$00cobmisc_cobmisc_id_seq SEQUENCE SET?SELECT pg_catalog.setval('cobmisc_cobmisc_id_seq', 302, true); publicadminfalse375$00cobmisc_cobmisc_id_seqACLREVOKE ALL ON SEQUENCE cobmisc_cobmisc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cobmisc_cobmisc_id_seq FROM admin; GRANT ALL ON SEQUENCE cobmisc_cobmisc_id_seq TO admin; GRANT ALL ON SEQUENCE cobmisc_cobmisc_id_seq TO xtrole; publicadminfalse375x12591685020 cobmisctaxTABLE0CREATE TABLE cobmisctax ( ) INHERITS (taxhist); DROP TABLE public.cobmisctax; publicadminfalse62908253$00 cobmisctaxACLREVOKE ALL ON TABLE cobmisctax FROM PUBLIC; REVOKE ALL ON TABLE cobmisctax FROM admin; GRANT ALL ON TABLE cobmisctax TO admin; GRANT ALL ON TABLE cobmisctax TO xtrole; publicadminfalse376y12591685026cohead_cohead_id_seqSEQUENCE~CREATE SEQUENCE cohead_cohead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.cohead_cohead_id_seq; publicadminfalse8$00cohead_cohead_id_seq SEQUENCE SET>SELECT pg_catalog.setval('cohead_cohead_id_seq', 3232, true); publicadminfalse377$00cohead_cohead_id_seqACLREVOKE ALL ON SEQUENCE cohead_cohead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cohead_cohead_id_seq FROM admin; GRANT ALL ON SEQUENCE cohead_cohead_id_seq TO admin; GRANT ALL ON SEQUENCE cohead_cohead_id_seq TO xtrole; publicadminfalse377z12591685028cohist_cohist_id_seqSEQUENCE~CREATE SEQUENCE cohist_cohist_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.cohist_cohist_id_seq; publicadminfalse8$00cohist_cohist_id_seq SEQUENCE SET=SELECT pg_catalog.setval('cohist_cohist_id_seq', 821, true); publicadminfalse378$00cohist_cohist_id_seqACLREVOKE ALL ON SEQUENCE cohist_cohist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cohist_cohist_id_seq FROM admin; GRANT ALL ON SEQUENCE cohist_cohist_id_seq TO admin; GRANT ALL ON SEQUENCE cohist_cohist_id_seq TO xtrole; publicadminfalse378{12591685030coitem_coitem_id_seqSEQUENCE~CREATE SEQUENCE coitem_coitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.coitem_coitem_id_seq; publicadminfalse8$00coitem_coitem_id_seq SEQUENCE SET=SELECT pg_catalog.setval('coitem_coitem_id_seq', 802, true); publicadminfalse379$00coitem_coitem_id_seqACLREVOKE ALL ON SEQUENCE coitem_coitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE coitem_coitem_id_seq FROM admin; GRANT ALL ON SEQUENCE coitem_coitem_id_seq TO admin; GRANT ALL ON SEQUENCE coitem_coitem_id_seq TO xtrole; publicadminfalse379|12591685032comment_comment_id_seqSEQUENCExCREATE SEQUENCE comment_comment_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.comment_comment_id_seq; publicadminfalse8$00comment_comment_id_seq SEQUENCE SET@SELECT pg_catalog.setval('comment_comment_id_seq', 2401, true); publicadminfalse380$00comment_comment_id_seqACLREVOKE ALL ON SEQUENCE comment_comment_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE comment_comment_id_seq FROM admin; GRANT ALL ON SEQUENCE comment_comment_id_seq TO admin; GRANT ALL ON SEQUENCE comment_comment_id_seq TO xtrole; publicadminfalse380}12591685034companyTABLECREATE TABLE company ( company_id integer NOT NULL, company_number text NOT NULL, company_descrip text, company_external boolean DEFAULT false NOT NULL, company_server text, company_port integer, company_database text, company_curr_id integer, company_yearend_accnt_id integer, company_gainloss_accnt_id integer, company_dscrp_accnt_id integer, company_unrlzgainloss_accnt_id integer, CONSTRAINT company_company_number_check CHECK ((company_number <> ''::text)) ); DROP TABLE public.company; publicadminfalse629262938$00 TABLE companyCOMMENT3COMMENT ON TABLE company IS 'Company information'; publicadminfalse381$00companyACLREVOKE ALL ON TABLE company FROM PUBLIC; REVOKE ALL ON TABLE company FROM admin; GRANT ALL ON TABLE company TO admin; GRANT ALL ON TABLE company TO xtrole; publicadminfalse381~12591685041company_company_id_seqSEQUENCExCREATE SEQUENCE company_company_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.company_company_id_seq; publicadminfalse8381$00company_company_id_seqSEQUENCE OWNED BYCALTER SEQUENCE company_company_id_seq OWNED BY company.company_id; publicadminfalse382$00company_company_id_seq SEQUENCE SET=SELECT pg_catalog.setval('company_company_id_seq', 1, true); publicadminfalse382$00company_company_id_seqACLREVOKE ALL ON SEQUENCE company_company_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE company_company_id_seq FROM admin; GRANT ALL ON SEQUENCE company_company_id_seq TO admin; GRANT ALL ON SEQUENCE company_company_id_seq TO xtrole; publicadminfalse38212591744577contrct_contrct_id_seqSEQUENCExCREATE SEQUENCE contrct_contrct_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.contrct_contrct_id_seq; publicadminfalse8720$00contrct_contrct_id_seqSEQUENCE OWNED BYCALTER SEQUENCE contrct_contrct_id_seq OWNED BY contrct.contrct_id; publicadminfalse719$00contrct_contrct_id_seq SEQUENCE SET>SELECT pg_catalog.setval('contrct_contrct_id_seq', 1, false); publicadminfalse719$00contrct_contrct_id_seqACLREVOKE ALL ON SEQUENCE contrct_contrct_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE contrct_contrct_id_seq FROM admin; GRANT ALL ON SEQUENCE contrct_contrct_id_seq TO admin; GRANT ALL ON SEQUENCE contrct_contrct_id_seq TO xtrole; publicadminfalse719`12591686022shipheadTABLECREATE TABLE shiphead ( shiphead_id integer NOT NULL, shiphead_order_id integer NOT NULL, shiphead_order_type text NOT NULL, shiphead_number text NOT NULL, shiphead_shipvia text, shiphead_freight numeric(16,4) DEFAULT 0.0 NOT NULL, shiphead_freight_curr_id integer DEFAULT basecurrid() NOT NULL, shiphead_notes text, shiphead_shipped boolean DEFAULT false NOT NULL, shiphead_shipdate date, shiphead_shipchrg_id integer, shiphead_shipform_id integer, shiphead_sfstatus character(1) NOT NULL, shiphead_tracknum text, CONSTRAINT shiphead_shiphead_number_check CHECK ((shiphead_number <> ''::text)), CONSTRAINT shiphead_shiphead_order_type_check CHECK (((shiphead_order_type = 'SO'::text) OR (shiphead_order_type = 'TO'::text))), CONSTRAINT shiphead_shiphead_sfstatus_check CHECK ((((shiphead_sfstatus = 'D'::bpchar) OR (shiphead_sfstatus = 'N'::bpchar)) OR (shiphead_sfstatus = 'P'::bpchar))) ); DROP TABLE public.shiphead; publicadminfalse6534653565366538653965408$00TABLE shipheadCOMMENTDCOMMENT ON TABLE shiphead IS 'General information about Shipments'; publicadminfalse608$00shipheadACLREVOKE ALL ON TABLE shiphead FROM PUBLIC; REVOKE ALL ON TABLE shiphead FROM admin; GRANT ALL ON TABLE shiphead TO admin; GRANT ALL ON TABLE shiphead TO xtrole; publicadminfalse60812591685483shipitemTABLECREATE TABLE shipitem ( shipitem_id integer NOT NULL, shipitem_orderitem_id integer NOT NULL, shipitem_shiphead_id integer NOT NULL, shipitem_qty numeric(18,6) NOT NULL, shipitem_shipped boolean DEFAULT false NOT NULL, shipitem_shipdate timestamp with time zone, shipitem_transdate timestamp with time zone, shipitem_trans_username text, shipitem_invoiced boolean DEFAULT false NOT NULL, shipitem_invcitem_id integer, shipitem_value numeric(18,6), shipitem_invhist_id integer ); DROP TABLE public.shipitem; publicadminfalse643864398$00TABLE shipitemCOMMENTFCOMMENT ON TABLE shipitem IS 'Information about Shipment Line Items'; publicadminfalse474$00shipitemACLREVOKE ALL ON TABLE shipitem FROM PUBLIC; REVOKE ALL ON TABLE shipitem FROM admin; GRANT ALL ON TABLE shipitem TO admin; GRANT ALL ON TABLE shipitem TO xtrole; publicadminfalse474V12592006632coshipVIEWCREATE VIEW coship AS SELECT shipitem.shipitem_id AS coship_id, shipitem.shipitem_orderitem_id AS coship_coitem_id, shipitem.shipitem_shipdate AS coship_shipdate, shipitem.shipitem_qty AS coship_qty, shipitem.shipitem_transdate AS coship_transdate, shipitem.shipitem_shipped AS coship_shipped, shipitem.shipitem_invoiced AS coship_invoiced, shipitem.shipitem_shiphead_id AS coship_cosmisc_id, shipitem.shipitem_trans_username AS coship_trans_username, shipitem.shipitem_invcitem_id AS coship_invcitem_id FROM shipitem, shiphead WHERE ((shipitem.shipitem_shiphead_id = shiphead.shiphead_id) AND (shiphead.shiphead_order_type = 'SO'::text)); DROP VIEW public.coship; publicadminfalse55508$00coshipACLREVOKE ALL ON TABLE coship FROM PUBLIC; REVOKE ALL ON TABLE coship FROM admin; GRANT ALL ON TABLE coship TO admin; GRANT ALL ON TABLE coship TO xtrole; publicadminfalse85412591685043coship_coship_id_seqSEQUENCE~CREATE SEQUENCE coship_coship_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.coship_coship_id_seq; publicadminfalse8$00coship_coship_id_seq SEQUENCE SET=SELECT pg_catalog.setval('coship_coship_id_seq', 502, true); publicadminfalse383$00coship_coship_id_seqACLREVOKE ALL ON SEQUENCE coship_coship_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE coship_coship_id_seq FROM admin; GRANT ALL ON SEQUENCE coship_coship_id_seq TO admin; GRANT ALL ON SEQUENCE coship_coship_id_seq TO xtrole; publicadminfalse383W12592006636cosmiscVIEWCREATE VIEW cosmisc AS SELECT shiphead.shiphead_id AS cosmisc_id, shiphead.shiphead_order_id AS cosmisc_cohead_id, shiphead.shiphead_shipvia AS cosmisc_shipvia, shiphead.shiphead_freight AS cosmisc_freight, shiphead.shiphead_notes AS cosmisc_notes, shiphead.shiphead_shipdate AS cosmisc_shipdate, shiphead.shiphead_shipchrg_id AS cosmisc_shipchrg_id, shiphead.shiphead_shipform_id AS cosmisc_shipform_id, shiphead.shiphead_shipped AS cosmisc_shipped, shiphead.shiphead_sfstatus AS cosmisc_sfstatus, shiphead.shiphead_tracknum AS cosmisc_tracknum, shiphead.shiphead_number AS cosmisc_number FROM shiphead WHERE (shiphead.shiphead_order_type = 'SO'::text); DROP VIEW public.cosmisc; publicadminfalse55518$00cosmiscACLREVOKE ALL ON TABLE cosmisc FROM PUBLIC; REVOKE ALL ON TABLE cosmisc FROM admin; GRANT ALL ON TABLE cosmisc TO admin; GRANT ALL ON TABLE cosmisc TO xtrole; publicadminfalse85512591685045cosmisc_cosmisc_id_seqSEQUENCECREATE SEQUENCE cosmisc_cosmisc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.cosmisc_cosmisc_id_seq; publicadminfalse8$00cosmisc_cosmisc_id_seq SEQUENCE SET?SELECT pg_catalog.setval('cosmisc_cosmisc_id_seq', 240, true); publicadminfalse384$00cosmisc_cosmisc_id_seqACLREVOKE ALL ON SEQUENCE cosmisc_cosmisc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cosmisc_cosmisc_id_seq FROM admin; GRANT ALL ON SEQUENCE cosmisc_cosmisc_id_seq TO admin; GRANT ALL ON SEQUENCE cosmisc_cosmisc_id_seq TO xtrole; publicadminfalse38412591685047cosrc_cosrc_id_seqSEQUENCE|CREATE SEQUENCE cosrc_cosrc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; )DROP SEQUENCE public.cosrc_cosrc_id_seq; publicadminfalse8$00cosrc_cosrc_id_seq SEQUENCE SET:SELECT pg_catalog.setval('cosrc_cosrc_id_seq', 1, false); publicadminfalse385$00cosrc_cosrc_id_seqACLREVOKE ALL ON SEQUENCE cosrc_cosrc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cosrc_cosrc_id_seq FROM admin; GRANT ALL ON SEQUENCE cosrc_cosrc_id_seq TO admin; GRANT ALL ON SEQUENCE cosrc_cosrc_id_seq TO xtrole; publicadminfalse38512591685049costcat_costcat_id_seqSEQUENCECREATE SEQUENCE costcat_costcat_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.costcat_costcat_id_seq; publicadminfalse8$00costcat_costcat_id_seq SEQUENCE SET>SELECT pg_catalog.setval('costcat_costcat_id_seq', 35, true); publicadminfalse386$00costcat_costcat_id_seqACLREVOKE ALL ON SEQUENCE costcat_costcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE costcat_costcat_id_seq FROM admin; GRANT ALL ON SEQUENCE costcat_costcat_id_seq TO admin; GRANT ALL ON SEQUENCE costcat_costcat_id_seq TO xtrole; publicadminfalse38612591685051costelem_costelem_id_seqSEQUENCECREATE SEQUENCE costelem_costelem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.costelem_costelem_id_seq; publicadminfalse8$00costelem_costelem_id_seq SEQUENCE SET@SELECT pg_catalog.setval('costelem_costelem_id_seq', 21, true); publicadminfalse387$00costelem_costelem_id_seqACLREVOKE ALL ON SEQUENCE costelem_costelem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE costelem_costelem_id_seq FROM admin; GRANT ALL ON SEQUENCE costelem_costelem_id_seq TO admin; GRANT ALL ON SEQUENCE costelem_costelem_id_seq TO xtrole; publicadminfalse38712591685053costhistTABLECREATE TABLE costhist ( costhist_id integer DEFAULT nextval(('"costhist_costhist_id_seq"'::text)::regclass) NOT NULL, costhist_item_id integer, costhist_costelem_id integer, costhist_type character(1), costhist_date timestamp with time zone, costhist_oldcost numeric(16,6), costhist_newcost numeric(16,6), costhist_lowlevel boolean, costhist_oldcurr_id integer DEFAULT basecurrid(), costhist_newcurr_id integer DEFAULT basecurrid(), costhist_username text ); DROP TABLE public.costhist; publicadminfalse6294629562968$00TABLE costhistCOMMENT2COMMENT ON TABLE costhist IS 'Item Cost history'; publicadminfalse388$00costhistACLREVOKE ALL ON TABLE costhist FROM PUBLIC; REVOKE ALL ON TABLE costhist FROM admin; GRANT ALL ON TABLE costhist TO admin; GRANT ALL ON TABLE costhist TO xtrole; publicadminfalse38812591685062costhist_costhist_id_seqSEQUENCEzCREATE SEQUENCE costhist_costhist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.costhist_costhist_id_seq; publicadminfalse8$00costhist_costhist_id_seq SEQUENCE SETBSELECT pg_catalog.setval('costhist_costhist_id_seq', 1640, true); publicadminfalse389$00costhist_costhist_id_seqACLREVOKE ALL ON SEQUENCE costhist_costhist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE costhist_costhist_id_seq FROM admin; GRANT ALL ON SEQUENCE costhist_costhist_id_seq TO admin; GRANT ALL ON SEQUENCE costhist_costhist_id_seq TO xtrole; publicadminfalse38912591685064 costupdateTABLECREATE TABLE costupdate ( costupdate_item_id integer, costupdate_lowlevel_code integer DEFAULT 1 NOT NULL, costupdate_item_type character(1) ); DROP TABLE public.costupdate; publicadminfalse62978$00TABLE costupdateCOMMENTYCOMMENT ON TABLE costupdate IS 'Scratch area for sequencing the updating of item costs'; publicadminfalse390$00 costupdateACLREVOKE ALL ON TABLE costupdate FROM PUBLIC; REVOKE ALL ON TABLE costupdate FROM admin; GRANT ALL ON TABLE costupdate TO admin; GRANT ALL ON TABLE costupdate TO xtrole; publicadminfalse39012591685068countryTABLECREATE TABLE country ( country_id integer NOT NULL, country_abbr character(2), country_name text, country_curr_abbr character(3), country_curr_name text, country_curr_number character(3), country_curr_symbol character varying(9), country_qt_number integer, CONSTRAINT country_country_abbr_check CHECK ((country_abbr <> ''::bpchar)), CONSTRAINT country_country_name_check CHECK ((country_name <> ''::text)) ); DROP TABLE public.country; publicadminfalse629963008$00 TABLE countryCOMMENTQCOMMENT ON TABLE country IS 'Basic information and properties about countries.'; publicadminfalse391$00countryACLREVOKE ALL ON TABLE country FROM PUBLIC; REVOKE ALL ON TABLE country FROM admin; GRANT ALL ON TABLE country TO admin; GRANT ALL ON TABLE country TO xtrole; publicadminfalse39112591685074country_country_id_seqSEQUENCExCREATE SEQUENCE country_country_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.country_country_id_seq; publicadminfalse8391$00country_country_id_seqSEQUENCE OWNED BYCALTER SEQUENCE country_country_id_seq OWNED BY country.country_id; publicadminfalse392$00country_country_id_seq SEQUENCE SET?SELECT pg_catalog.setval('country_country_id_seq', 242, true); publicadminfalse392$00country_country_id_seqACLREVOKE ALL ON SEQUENCE country_country_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE country_country_id_seq FROM admin; GRANT ALL ON SEQUENCE country_country_id_seq TO admin; GRANT ALL ON SEQUENCE country_country_id_seq TO xtrole; publicadminfalse39212591685076 salesaccntTABLEYCREATE TABLE salesaccnt ( salesaccnt_id integer DEFAULT nextval(('"salesaccnt_salesaccnt_id_seq"'::text)::regclass) NOT NULL, salesaccnt_custtype_id integer, salesaccnt_prodcat_id integer, salesaccnt_warehous_id integer, salesaccnt_sales_accnt_id integer, salesaccnt_credit_accnt_id integer, salesaccnt_cos_accnt_id integer, salesaccnt_custtype text, salesaccnt_prodcat text, salesaccnt_returns_accnt_id integer, salesaccnt_cor_accnt_id integer, salesaccnt_cow_accnt_id integer, salesaccnt_saletype_id integer, salesaccnt_shipzone_id integer ); DROP TABLE public.salesaccnt; publicadminfalse63018$00TABLE salesaccntCOMMENTGCOMMENT ON TABLE salesaccnt IS 'Sales Account assignment information'; publicadminfalse393$00(COLUMN salesaccnt.salesaccnt_saletype_idCOMMENTbCOMMENT ON COLUMN salesaccnt.salesaccnt_saletype_id IS 'Associated sale type for sales account.'; publicadminfalse393$00(COLUMN salesaccnt.salesaccnt_shipzone_idCOMMENTfCOMMENT ON COLUMN salesaccnt.salesaccnt_shipzone_id IS 'Associated shipping zone for sales account.'; publicadminfalse393$00 salesaccntACLREVOKE ALL ON TABLE salesaccnt FROM PUBLIC; REVOKE ALL ON TABLE salesaccnt FROM admin; GRANT ALL ON TABLE salesaccnt TO admin; GRANT ALL ON TABLE salesaccnt TO xtrole; publicadminfalse393G12592006559creditmemoeditlistVIEWCREATE VIEW creditmemoeditlist AS ((((SELECT cmhead.cmhead_id AS orderid, (-2) AS itemid, ('C/M-'::text || formatcreditmemonumber(cmhead.cmhead_id)) AS documentnumber, custinfo.cust_number, cmhead.cmhead_billtoname AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, '' AS item, '' AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, '' AS price, formatmoney((((calccmheadamt(cmhead.cmhead_id) + cmhead.cmhead_freight) + cmhead.cmhead_misc) + calccmheadtax(cmhead.cmhead_id))) AS extprice, 'Credit' AS sence, COALESCE((SELECT formatglaccountlong(accnt.accnt_id) AS formatglaccountlong FROM accnt WHERE (accnt.accnt_id = findaraccount(custinfo.cust_id))), 'Not Assigned'::text) AS account FROM custinfo, cmhead WHERE ((((cmhead.cmhead_cust_id = custinfo.cust_id) AND (cmhead.cmhead_cust_id = custinfo.cust_id)) AND (NOT cmhead.cmhead_posted)) AND (NOT cmhead.cmhead_hold)) UNION SELECT cmhead.cmhead_id AS orderid, (-1) AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, 'Freight' AS item, 'Freight Charge' AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, formatmoney(cmhead.cmhead_freight) AS price, formatmoney(cmhead.cmhead_freight) AS extprice, 'Debit' AS sence, CASE WHEN (accnt.accnt_id IS NULL) THEN 'Not Assigned'::text ELSE formatglaccountlong(accnt.accnt_id) END AS account FROM (cmhead LEFT JOIN accnt ON ((accnt.accnt_id = findfreightaccount(cmhead.cmhead_cust_id)))) WHERE (((NOT cmhead.cmhead_posted) AND (NOT cmhead.cmhead_hold)) AND (cmhead.cmhead_freight <> (0)::numeric))) UNION SELECT cmhead.cmhead_id AS orderid, (-1) AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, 'Misc. Charge' AS item, cmhead.cmhead_misc_descrip AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, formatmoney(cmhead.cmhead_misc) AS price, formatmoney(cmhead.cmhead_misc) AS extprice, 'Debit' AS sence, formatglaccountlong(cmhead.cmhead_misc_accnt_id) AS account FROM cmhead WHERE (((NOT cmhead.cmhead_posted) AND (NOT cmhead.cmhead_hold)) AND (cmhead.cmhead_misc <> (0)::numeric))) UNION SELECT cmhead.cmhead_id AS orderid, (-1) AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, 'Sales Tax' AS item, tax.tax_descrip AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, formatmoney((cmheadtax.taxhist_tax * (-1.0))) AS price, formatmoney((cmheadtax.taxhist_tax * (-1.0))) AS extprice, 'Debit' AS sence, CASE WHEN (accnt.accnt_id IS NULL) THEN 'Not Assigned'::text ELSE ((formatglaccountlong(accnt.accnt_id) || ' - '::text) || accnt.accnt_descrip) END AS account FROM (((cmhead JOIN cmheadtax ON ((cmheadtax.taxhist_parent_id = cmhead.cmhead_id))) JOIN tax ON ((tax.tax_id = cmheadtax.taxhist_tax_id))) LEFT JOIN accnt ON ((accnt.accnt_id = tax.tax_sales_accnt_id))) WHERE ((NOT cmhead.cmhead_posted) AND (NOT cmhead.cmhead_hold))) UNION SELECT cmhead.cmhead_id AS orderid, (-1) AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, (-1) AS linenumber, 'Sales Tax' AS item, tax.tax_descrip AS itemdescrip, '' AS iteminvuom, '' AS qtytobill, formatmoney((cmitemtax.taxhist_tax * (-1.0))) AS price, formatmoney((cmitemtax.taxhist_tax * (-1.0))) AS extprice, 'Debit' AS sence, CASE WHEN (accnt.accnt_id IS NULL) THEN 'Not Assigned'::text ELSE ((formatglaccountlong(accnt.accnt_id) || ' - '::text) || accnt.accnt_descrip) END AS account FROM ((((cmhead JOIN cmitem ON ((cmitem.cmitem_cmhead_id = cmhead.cmhead_id))) JOIN cmitemtax ON ((cmitemtax.taxhist_parent_id = cmitem.cmitem_id))) JOIN tax ON ((tax.tax_id = cmitemtax.taxhist_tax_id))) LEFT JOIN accnt ON ((accnt.accnt_id = tax.tax_sales_accnt_id))) WHERE ((NOT cmhead.cmhead_posted) AND (NOT cmhead.cmhead_hold))) UNION SELECT cmhead.cmhead_id AS orderid, cmitem.cmitem_id AS itemid, '' AS documentnumber, '' AS cust_number, '' AS billtoname, cmhead.cmhead_number AS ordernumber, cmitem.cmitem_linenumber AS linenumber, item.item_number AS item, item.item_descrip1 AS itemdescrip, uom.uom_name AS iteminvuom, formatqty(COALESCE((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio), (0)::numeric)) AS qtytobill, formatprice(COALESCE((cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio), (0)::numeric)) AS price, formatmoney(COALESCE(round(((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio) * (cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio)), 2), (0)::numeric)) AS extprice, 'Debit' AS sence, COALESCE((SELECT formatglaccountlong(accnt.accnt_id) AS formatglaccountlong FROM accnt, salesaccnt WHERE ((salesaccnt.salesaccnt_sales_accnt_id = accnt.accnt_id) AND (salesaccnt.salesaccnt_id = findsalesaccnt(cmitem.cmitem_itemsite_id, 'IS'::text, cmhead.cmhead_cust_id, cmhead.cmhead_saletype_id, cmhead.cmhead_shipzone_id)))), 'Not Assigned'::text) AS account FROM item, itemsite, cmhead, cmitem, uom WHERE ((((((cmitem.cmitem_cmhead_id = cmhead.cmhead_id) AND (cmitem.cmitem_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (item.item_inv_uom_id = uom.uom_id)) AND (NOT cmhead.cmhead_posted)) AND (NOT cmhead.cmhead_hold)) ORDER BY 6, 7; %DROP VIEW public.creditmemoeditlist; publicadminfalse55358$00creditmemoeditlistACLREVOKE ALL ON TABLE creditmemoeditlist FROM PUBLIC; REVOKE ALL ON TABLE creditmemoeditlist FROM admin; GRANT ALL ON TABLE creditmemoeditlist TO admin; GRANT ALL ON TABLE creditmemoeditlist TO xtrole; publicadminfalse839H12592006564creditmemoitemVIEWCREATE VIEW creditmemoitem AS SELECT cmitem.cmitem_id, cmitem.cmitem_cmhead_id, cmitem.cmitem_linenumber, cmitem.cmitem_itemsite_id, cmitem.cmitem_qtycredit, cmitem.cmitem_qtyreturned, cmitem.cmitem_unitprice, cmitem.cmitem_comments, cmitem.cmitem_rsncode_id, cmitem.cmitem_taxtype_id, cmitem.cmitem_qty_uom_id, cmitem.cmitem_qty_invuomratio, cmitem.cmitem_price_uom_id, cmitem.cmitem_price_invuomratio, cmitem.cmitem_raitem_id, cmitem.cmitem_updateinv, itemsite.itemsite_item_id AS item_id, COALESCE((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio), (0)::numeric) AS qty, COALESCE((cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio), (0)::numeric) AS unitprice, COALESCE(round(((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio) * (cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio)), 2), (0)::numeric) AS extprice, currtobase(cmhead.cmhead_curr_id, COALESCE(round(((cmitem.cmitem_qtycredit * cmitem.cmitem_qty_invuomratio) * (cmitem.cmitem_unitprice / cmitem.cmitem_price_invuomratio)), 2), (0)::numeric), cmhead.cmhead_docdate) AS baseextprice, (SELECT COALESCE(sum(cmitemtax.taxhist_tax), (0)::numeric) AS "coalesce" FROM cmitemtax WHERE (cmitemtax.taxhist_parent_id = cmitem.cmitem_id)) AS tax, CASE WHEN (itemsite.itemsite_costmethod = 'A'::bpchar) THEN avgcost(itemsite.itemsite_id) ELSE stdcost(itemsite.itemsite_item_id) END AS unitcost FROM ((cmitem JOIN cmhead ON ((cmhead.cmhead_id = cmitem.cmitem_cmhead_id))) LEFT JOIN itemsite ON ((itemsite.itemsite_id = cmitem.cmitem_itemsite_id))); !DROP VIEW public.creditmemoitem; publicadminfalse55368$00VIEW creditmemoitemCOMMENT^COMMENT ON VIEW creditmemoitem IS 'Single point for credit memo item (cmitem) calculations.'; publicadminfalse840$00creditmemoitemACLREVOKE ALL ON TABLE creditmemoitem FROM PUBLIC; REVOKE ALL ON TABLE creditmemoitem FROM admin; GRANT ALL ON TABLE creditmemoitem TO admin; GRANT ALL ON TABLE creditmemoitem TO xtrole; publicadminfalse84012591685093crmacct_crmacct_id_seqSEQUENCExCREATE SEQUENCE crmacct_crmacct_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.crmacct_crmacct_id_seq; publicadminfalse8153$00crmacct_crmacct_id_seqSEQUENCE OWNED BYCALTER SEQUENCE crmacct_crmacct_id_seq OWNED BY crmacct.crmacct_id; publicadminfalse394$00crmacct_crmacct_id_seq SEQUENCE SET>SELECT pg_catalog.setval('crmacct_crmacct_id_seq', 43, true); publicadminfalse394$00crmacct_crmacct_id_seqACLREVOKE ALL ON SEQUENCE crmacct_crmacct_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE crmacct_crmacct_id_seq FROM admin; GRANT ALL ON SEQUENCE crmacct_crmacct_id_seq TO admin; GRANT ALL ON SEQUENCE crmacct_crmacct_id_seq TO xtrole; publicadminfalse39412591685095 crmacctselTABLEGCREATE TABLE crmacctsel ( crmacctsel_src_crmacct_id integer NOT NULL, crmacctsel_dest_crmacct_id integer, crmacctsel_mrg_crmacct_active boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_cntct_id_1 boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_cntct_id_2 boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_competitor_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_cust_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_emp_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_name boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_notes boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_owner_username boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_parent_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_partner_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_prospect_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_salesrep_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_taxauth_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_type boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_usr_username boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_vend_id boolean DEFAULT false NOT NULL, crmacctsel_mrg_crmacct_number boolean DEFAULT false NOT NULL ); DROP TABLE public.crmacctsel; publicadminfalse6302630363046305630663076308630963106311631263136314631563166317631863198$00TABLE crmacctselCOMMENT6COMMENT ON TABLE crmacctsel IS 'This table records the proposed conditions of a CRM Account merge. When this merge is performed, the BOOLEAN columns in this table indicate which values in the crmacct table will be copied to the target record. Data in this table are temporary and will be removed by a purge.'; publicadminfalse395$00+COLUMN crmacctsel.crmacctsel_src_crmacct_idCOMMENTCOMMENT ON COLUMN crmacctsel.crmacctsel_src_crmacct_id IS 'This is the internal ID of the CRM Account record the data will come from during the merge.'; publicadminfalse395$00,COLUMN crmacctsel.crmacctsel_dest_crmacct_idCOMMENTCOMMENT ON COLUMN crmacctsel.crmacctsel_dest_crmacct_id IS 'This is the internal ID of the CRM Account record the data will go to during the merge. If crmacctsel_src_crmacct_id = crmacctsel_dest_crmacct_id, they indicate which crmacct record is the destination of the merge, meaning this is the record that will remain in the database after the merge has been completed and the intermediate data have been purged.'; publicadminfalse395$00 crmacctselACLREVOKE ALL ON TABLE crmacctsel FROM PUBLIC; REVOKE ALL ON TABLE crmacctsel FROM admin; GRANT ALL ON TABLE crmacctsel TO admin; GRANT ALL ON TABLE crmacctsel TO xtrole; publicadminfalse39512591685116 curr_rateTABLECREATE TABLE curr_rate ( curr_rate_id integer NOT NULL, curr_id integer NOT NULL, curr_rate numeric(16,8) NOT NULL, curr_effective date NOT NULL, curr_expires date NOT NULL, CONSTRAINT curr_rate_curr_rate_check CHECK ((curr_rate > (0)::numeric)) ); DROP TABLE public.curr_rate; publicadminfalse63218$00TABLE curr_rateCOMMENTTCOMMENT ON TABLE curr_rate IS 'Exchange Rates Between Base and Foreign Currencies'; publicadminfalse396$00 curr_rateACLREVOKE ALL ON TABLE curr_rate FROM PUBLIC; REVOKE ALL ON TABLE curr_rate FROM admin; GRANT ALL ON TABLE curr_rate TO admin; GRANT ALL ON TABLE curr_rate TO xtrole; publicadminfalse39612591685120curr_rate_curr_rate_id_seqSEQUENCE|CREATE SEQUENCE curr_rate_curr_rate_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.curr_rate_curr_rate_id_seq; publicadminfalse8396$00curr_rate_curr_rate_id_seqSEQUENCE OWNED BYKALTER SEQUENCE curr_rate_curr_rate_id_seq OWNED BY curr_rate.curr_rate_id; publicadminfalse397$00curr_rate_curr_rate_id_seq SEQUENCE SETBSELECT pg_catalog.setval('curr_rate_curr_rate_id_seq', 18, true); publicadminfalse397$00curr_rate_curr_rate_id_seqACLREVOKE ALL ON SEQUENCE curr_rate_curr_rate_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE curr_rate_curr_rate_id_seq FROM admin; GRANT ALL ON SEQUENCE curr_rate_curr_rate_id_seq TO admin; GRANT ALL ON SEQUENCE curr_rate_curr_rate_id_seq TO xtrole; publicadminfalse39712591685122curr_symbol_curr_id_seqSEQUENCEyCREATE SEQUENCE curr_symbol_curr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; .DROP SEQUENCE public.curr_symbol_curr_id_seq; publicadminfalse8156$00curr_symbol_curr_id_seqSEQUENCE OWNED BYEALTER SEQUENCE curr_symbol_curr_id_seq OWNED BY curr_symbol.curr_id; publicadminfalse398$00curr_symbol_curr_id_seq SEQUENCE SET>SELECT pg_catalog.setval('curr_symbol_curr_id_seq', 3, true); publicadminfalse398$00curr_symbol_curr_id_seqACLREVOKE ALL ON SEQUENCE curr_symbol_curr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE curr_symbol_curr_id_seq FROM admin; GRANT ALL ON SEQUENCE curr_symbol_curr_id_seq TO admin; GRANT ALL ON SEQUENCE curr_symbol_curr_id_seq TO xtrole; publicadminfalse398X12592006640custVIEW>CREATE VIEW cust AS SELECT custinfo.cust_id, custinfo.cust_active, custinfo.cust_custtype_id, custinfo.cust_salesrep_id, custinfo.cust_commprcnt, custinfo.cust_name, m.addr_line1 AS cust_address1, m.addr_line2 AS cust_address2, m.addr_line3 AS cust_address3, m.addr_city AS cust_city, m.addr_state AS cust_state, m.addr_postalcode AS cust_zipcode, btrim(((mc.cntct_first_name || ' '::text) || mc.cntct_last_name)) AS cust_contact, mc.cntct_phone AS cust_phone, mc.cntct_fax AS cust_fax, mc.cntct_email AS cust_email, c.addr_line1 AS cust_corraddress1, c.addr_line2 AS cust_corraddress2, c.addr_line3 AS cust_corraddress3, c.addr_city AS cust_corrcity, c.addr_state AS cust_corrstate, c.addr_postalcode AS cust_corrzipcode, btrim(((cc.cntct_first_name || ' '::text) || cc.cntct_last_name)) AS cust_corrcontact, cc.cntct_phone AS cust_corrphone, cc.cntct_fax AS cust_corrfax, cc.cntct_email AS cust_corremail, custinfo.cust_creditlmt, custinfo.cust_creditrating, custinfo.cust_financecharge, custinfo.cust_backorder, custinfo.cust_partialship, custinfo.cust_terms_id, custinfo.cust_discntprcnt, custinfo.cust_taxzone_id, custinfo.cust_balmethod, custinfo.cust_ffshipto, custinfo.cust_shipform_id, custinfo.cust_shipvia, custinfo.cust_blanketpos, custinfo.cust_shipchrg_id, custinfo.cust_creditstatus, custinfo.cust_comments, custinfo.cust_ffbillto, m.addr_country AS cust_country, c.addr_country AS cust_corrcountry, custinfo.cust_usespos, custinfo.cust_number, custinfo.cust_dateadded, custinfo.cust_exported, custinfo.cust_emaildelivery, custinfo.cust_ediemail, custinfo.cust_edisubject, custinfo.cust_edifilename, custinfo.cust_ediemailbody, custinfo.cust_autoupdatestatus, custinfo.cust_autoholdorders, custinfo.cust_edicc, custinfo.cust_ediprofile_id, custinfo.cust_preferred_warehous_id, custinfo.cust_curr_id, custinfo.cust_creditlmt_curr_id FROM ((((custinfo LEFT JOIN cntct mc ON ((custinfo.cust_cntct_id = mc.cntct_id))) LEFT JOIN addr m ON ((mc.cntct_addr_id = m.addr_id))) LEFT JOIN cntct cc ON ((custinfo.cust_corrcntct_id = cc.cntct_id))) LEFT JOIN addr c ON ((cc.cntct_addr_id = c.addr_id))); DROP VIEW public.cust; publicadminfalse55528$00custACLREVOKE ALL ON TABLE cust FROM PUBLIC; REVOKE ALL ON TABLE cust FROM admin; GRANT ALL ON TABLE cust TO admin; GRANT ALL ON TABLE cust TO xtrole; publicadminfalse85612591685124cust_serial_seqSEQUENCEyCREATE SEQUENCE cust_serial_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; &DROP SEQUENCE public.cust_serial_seq; publicadminfalse8$00cust_serial_seq SEQUENCE SET7SELECT pg_catalog.setval('cust_serial_seq', 1, false); publicadminfalse399$00cust_serial_seqACLREVOKE ALL ON SEQUENCE cust_serial_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE cust_serial_seq FROM admin; GRANT ALL ON SEQUENCE cust_serial_seq TO admin; GRANT ALL ON SEQUENCE cust_serial_seq TO xtrole; publicadminfalse39912591685126custformTABLECREATE TABLE custform ( custform_id integer DEFAULT nextval(('"custform_custform_id_seq"'::text)::regclass) NOT NULL, custform_custtype_id integer, custform_custtype text, custform_invoice_report_id integer, custform_creditmemo_report_id integer, custform_quote_report_id integer, custform_packinglist_report_id integer, custform_statement_report_id integer, custform_sopicklist_report_id integer, custform_invoice_report_name text, custform_creditmemo_report_name text, custform_quote_report_name text, custform_packinglist_report_name text, custform_statement_report_name text, custform_sopicklist_report_name text ); DROP TABLE public.custform; publicadminfalse63228$00TABLE custformCOMMENTECOMMENT ON TABLE custform IS 'Customer Form assignment information'; publicadminfalse400$00*COLUMN custform.custform_invoice_report_idCOMMENTxCOMMENT ON COLUMN custform.custform_invoice_report_id IS 'Obsolete -- reference custform_invoice_report_name instead.'; publicadminfalse400$00-COLUMN custform.custform_creditmemo_report_idCOMMENT~COMMENT ON COLUMN custform.custform_creditmemo_report_id IS 'Obsolete -- reference custform_creditmemo_report_name instead.'; publicadminfalse400$00(COLUMN custform.custform_quote_report_idCOMMENTtCOMMENT ON COLUMN custform.custform_quote_report_id IS 'Obsolete -- reference custform_quote_report_name instead.'; publicadminfalse400$00.COLUMN custform.custform_packinglist_report_idCOMMENTCOMMENT ON COLUMN custform.custform_packinglist_report_id IS 'Obsolete -- reference custform_packinglist_report_name instead.'; publicadminfalse400$00,COLUMN custform.custform_statement_report_idCOMMENT|COMMENT ON COLUMN custform.custform_statement_report_id IS 'Obsolete -- reference custform_statement_report_name instead.'; publicadminfalse400%00-COLUMN custform.custform_sopicklist_report_idCOMMENT~COMMENT ON COLUMN custform.custform_sopicklist_report_id IS 'Obsolete -- reference custform_sopicklist_report_name instead.'; publicadminfalse400%00custformACLREVOKE ALL ON TABLE custform FROM PUBLIC; REVOKE ALL ON TABLE custform FROM admin; GRANT ALL ON TABLE custform TO admin; GRANT ALL ON TABLE custform TO xtrole; publicadminfalse40012591685133custform_custform_id_seqSEQUENCEzCREATE SEQUENCE custform_custform_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.custform_custform_id_seq; publicadminfalse8%00custform_custform_id_seq SEQUENCE SET?SELECT pg_catalog.setval('custform_custform_id_seq', 8, true); publicadminfalse401%00custform_custform_id_seqACLREVOKE ALL ON SEQUENCE custform_custform_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE custform_custform_id_seq FROM admin; GRANT ALL ON SEQUENCE custform_custform_id_seq TO admin; GRANT ALL ON SEQUENCE custform_custform_id_seq TO xtrole; publicadminfalse40112591685135custgrpTABLECREATE TABLE custgrp ( custgrp_id integer DEFAULT nextval(('"custgrp_custgrp_id_seq"'::text)::regclass) NOT NULL, custgrp_name text NOT NULL, custgrp_descrip text, CONSTRAINT custgrp_custgrp_name_check CHECK ((custgrp_name <> ''::text)) ); DROP TABLE public.custgrp; publicadminfalse632363248%00 TABLE custgrpCOMMENT:COMMENT ON TABLE custgrp IS 'Customer Group information'; publicadminfalse402%00custgrpACLREVOKE ALL ON TABLE custgrp FROM PUBLIC; REVOKE ALL ON TABLE custgrp FROM admin; GRANT ALL ON TABLE custgrp TO admin; GRANT ALL ON TABLE custgrp TO xtrole; publicadminfalse40212591685142custgrp_custgrp_id_seqSEQUENCExCREATE SEQUENCE custgrp_custgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.custgrp_custgrp_id_seq; publicadminfalse8%00custgrp_custgrp_id_seq SEQUENCE SET>SELECT pg_catalog.setval('custgrp_custgrp_id_seq', 25, true); publicadminfalse403%00custgrp_custgrp_id_seqACLREVOKE ALL ON SEQUENCE custgrp_custgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE custgrp_custgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE custgrp_custgrp_id_seq TO admin; GRANT ALL ON SEQUENCE custgrp_custgrp_id_seq TO xtrole; publicadminfalse40312591685144 custgrpitemTABLECREATE TABLE custgrpitem ( custgrpitem_id integer DEFAULT nextval(('"custgrpitem_custgrpitem_id_seq"'::text)::regclass) NOT NULL, custgrpitem_custgrp_id integer, custgrpitem_cust_id integer ); DROP TABLE public.custgrpitem; publicadminfalse63258%00TABLE custgrpitemCOMMENTCCOMMENT ON TABLE custgrpitem IS 'Customer Group Item information'; publicadminfalse404 %00 custgrpitemACLREVOKE ALL ON TABLE custgrpitem FROM PUBLIC; REVOKE ALL ON TABLE custgrpitem FROM admin; GRANT ALL ON TABLE custgrpitem TO admin; GRANT ALL ON TABLE custgrpitem TO xtrole; publicadminfalse40412591685148custgrpitem_custgrpitem_id_seqSEQUENCECREATE SEQUENCE custgrpitem_custgrpitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.custgrpitem_custgrpitem_id_seq; publicadminfalse8 %00custgrpitem_custgrpitem_id_seq SEQUENCE SETFSELECT pg_catalog.setval('custgrpitem_custgrpitem_id_seq', 48, true); publicadminfalse405 %00custgrpitem_custgrpitem_id_seqACLREVOKE ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq FROM admin; GRANT ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq TO admin; GRANT ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq TO xtrole; publicadminfalse40512591685150custtype_custtype_id_seqSEQUENCECREATE SEQUENCE custtype_custtype_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.custtype_custtype_id_seq; publicadminfalse8 %00custtype_custtype_id_seq SEQUENCE SET@SELECT pg_catalog.setval('custtype_custtype_id_seq', 20, true); publicadminfalse406 %00custtype_custtype_id_seqACLREVOKE ALL ON SEQUENCE custtype_custtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE custtype_custtype_id_seq FROM admin; GRANT ALL ON SEQUENCE custtype_custtype_id_seq TO admin; GRANT ALL ON SEQUENCE custtype_custtype_id_seq TO xtrole; publicadminfalse40612591685152dept_dept_id_seqSEQUENCErCREATE SEQUENCE dept_dept_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.dept_dept_id_seq; publicadminfalse8213%00dept_dept_id_seqSEQUENCE OWNED BY7ALTER SEQUENCE dept_dept_id_seq OWNED BY dept.dept_id; publicadminfalse407%00dept_dept_id_seq SEQUENCE SET7SELECT pg_catalog.setval('dept_dept_id_seq', 4, true); publicadminfalse407%00dept_dept_id_seqACLREVOKE ALL ON SEQUENCE dept_dept_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE dept_dept_id_seq FROM admin; GRANT ALL ON SEQUENCE dept_dept_id_seq TO admin; GRANT ALL ON SEQUENCE dept_dept_id_seq TO xtrole; publicadminfalse40712591685154 destinationTABLECREATE TABLE destination ( destination_id integer DEFAULT nextval(('"destination_destination_id_seq"'::text)::regclass) NOT NULL, destination_name text, destination_city text, destination_state text, destination_comments text ); DROP TABLE public.destination; publicadminfalse63268%00TABLE destinationCOMMENT;COMMENT ON TABLE destination IS 'Destination information'; publicadminfalse408%00 destinationACLREVOKE ALL ON TABLE destination FROM PUBLIC; REVOKE ALL ON TABLE destination FROM admin; GRANT ALL ON TABLE destination TO admin; GRANT ALL ON TABLE destination TO xtrole; publicadminfalse40812591685161destination_destination_id_seqSEQUENCECREATE SEQUENCE destination_destination_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 5DROP SEQUENCE public.destination_destination_id_seq; publicadminfalse8%00destination_destination_id_seq SEQUENCE SETFSELECT pg_catalog.setval('destination_destination_id_seq', 13, true); publicadminfalse409%00destination_destination_id_seqACLREVOKE ALL ON SEQUENCE destination_destination_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE destination_destination_id_seq FROM admin; GRANT ALL ON SEQUENCE destination_destination_id_seq TO admin; GRANT ALL ON SEQUENCE destination_destination_id_seq TO xtrole; publicadminfalse40912591685163woTABLECREATE TABLE wo ( wo_id integer DEFAULT nextval(('wo_wo_id_seq'::text)::regclass) NOT NULL, wo_number integer, wo_subnumber integer, wo_status character(1), wo_itemsite_id integer, wo_startdate date, wo_duedate date, wo_ordtype character(1), wo_ordid integer, wo_qtyord numeric(18,6), wo_qtyrcv numeric(18,6), wo_adhoc boolean, wo_itemcfg_series integer, wo_imported boolean, wo_wipvalue numeric(16,6) DEFAULT 0, wo_postedvalue numeric(16,6) DEFAULT 0, wo_prodnotes text, wo_prj_id integer, wo_priority integer DEFAULT 1 NOT NULL, wo_brdvalue numeric(16,6) DEFAULT 0, wo_bom_rev_id integer DEFAULT (-1), wo_boo_rev_id integer DEFAULT (-1), wo_cosmethod character(1), wo_womatl_id integer, wo_username text DEFAULT geteffectivextuser(), CONSTRAINT chk_wo_cosmethod CHECK ((((wo_cosmethod = NULL::bpchar) OR (wo_cosmethod = 'D'::bpchar)) OR (wo_cosmethod = 'P'::bpchar))) ); DROP TABLE public.wo; publicadminfalse6327632863296330633163326333633463358%00TABLE woCOMMENT1COMMENT ON TABLE wo IS 'Work Order information'; publicadminfalse410%00woACLREVOKE ALL ON TABLE wo FROM PUBLIC; REVOKE ALL ON TABLE wo FROM admin; GRANT ALL ON TABLE wo TO admin; GRANT ALL ON TABLE wo TO xtrole; publicadminfalse410I12592006569docinfoVIEW@CREATE VIEW docinfo AS (((((((((((((((((((((((((((((SELECT imageass.imageass_id AS id, (image.image_id)::text AS target_number, 'IMG' AS target_type, imageass.imageass_image_id AS target_id, imageass.imageass_source AS source_type, imageass.imageass_source_id AS source_id, image.image_name AS name, image.image_descrip AS description, imageass.imageass_purpose AS purpose FROM imageass, image WHERE (imageass.imageass_image_id = image.image_id) UNION ALL SELECT url.url_id AS id, (url.url_id)::text AS target_number, 'URL' AS target_type, url.url_id AS target_id, url.url_source AS source_type, url.url_source_id AS source_id, url.url_title AS name, url.url_url AS description, 'S' AS purpose FROM url WHERE (url.url_stream IS NULL)) UNION ALL SELECT url.url_id AS id, (url.url_id)::text AS target_number, 'FILE' AS target_type, url.url_id AS target_id, url.url_source AS source_type, url.url_source_id AS source_id, url.url_title AS name, url.url_url AS description, 'S' AS purpose FROM url WHERE (url.url_stream IS NOT NULL)) UNION ALL SELECT docass.docass_id AS id, (incdt.incdt_number)::text AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, incdt.incdt_summary AS name, firstline(incdt.incdt_descrip) AS description, docass.docass_purpose AS purpose FROM docass, incdt WHERE ((docass.docass_target_type = 'INCDT'::text) AND (docass.docass_target_id = incdt.incdt_id))) UNION ALL SELECT docass.docass_id AS id, (incdt.incdt_number)::text AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, incdt.incdt_summary AS name, firstline(incdt.incdt_descrip) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, incdt WHERE ((docass.docass_source_type = 'INCDT'::text) AND (docass.docass_source_id = incdt.incdt_id))) UNION ALL SELECT docass.docass_id AS id, (todoitem.todoitem_id)::text AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, todoitem.todoitem_name AS name, firstline(todoitem.todoitem_description) AS description, docass.docass_purpose AS purpose FROM docass, todoitem WHERE ((docass.docass_target_type = 'TODO'::text) AND (docass.docass_target_id = todoitem.todoitem_id))) UNION ALL SELECT docass.docass_id AS id, (todoitem.todoitem_id)::text AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, todoitem.todoitem_name AS name, firstline(todoitem.todoitem_description) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, todoitem WHERE ((docass.docass_source_type = 'TODO'::text) AND (docass.docass_source_id = todoitem.todoitem_id))) UNION ALL SELECT docass.docass_id AS id, prj.prj_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, prj.prj_name AS name, firstline(prj.prj_descrip) AS description, docass.docass_purpose AS purpose FROM docass, prj WHERE ((docass.docass_target_type = 'J'::text) AND (docass.docass_target_id = prj.prj_id))) UNION ALL SELECT docass.docass_id AS id, prj.prj_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, prj.prj_name AS name, firstline(prj.prj_descrip) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, prj WHERE ((docass.docass_source_type = 'J'::text) AND (docass.docass_source_id = prj.prj_id))) UNION ALL SELECT docass.docass_id AS id, item.item_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, firstline(item.item_descrip1) AS name, firstline(item.item_descrip2) AS description, docass.docass_purpose AS purpose FROM docass, item WHERE ((docass.docass_target_type = 'I'::text) AND (docass.docass_target_id = item.item_id))) UNION ALL SELECT docass.docass_id AS id, item.item_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, firstline(item.item_descrip1) AS name, firstline(item.item_descrip2) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, item WHERE ((docass.docass_source_type = 'I'::text) AND (docass.docass_source_id = item.item_id))) UNION ALL SELECT docass.docass_id AS id, crmacct.crmacct_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, crmacct.crmacct_name AS name, firstline(crmacct.crmacct_notes) AS description, docass.docass_purpose AS purpose FROM docass, crmacct WHERE ((docass.docass_target_type = 'CRMA'::text) AND (docass.docass_target_id = crmacct.crmacct_id))) UNION ALL SELECT docass.docass_id AS id, crmacct.crmacct_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, crmacct.crmacct_name AS name, firstline(crmacct.crmacct_notes) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, crmacct WHERE ((docass.docass_source_type = 'CRMA'::text) AND (docass.docass_source_id = crmacct.crmacct_id))) UNION SELECT docass.docass_id AS id, custinfo.cust_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, custinfo.cust_name AS name, firstline(custinfo.cust_comments) AS description, docass.docass_purpose AS purpose FROM docass, custinfo WHERE ((docass.docass_target_type = 'C'::text) AND (docass.docass_target_id = custinfo.cust_id))) UNION ALL SELECT docass.docass_id AS id, custinfo.cust_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, custinfo.cust_name AS name, firstline(custinfo.cust_comments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, custinfo WHERE ((docass.docass_source_type = 'C'::text) AND (docass.docass_source_id = custinfo.cust_id))) UNION ALL SELECT docass.docass_id AS id, vendinfo.vend_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, vendinfo.vend_name AS name, firstline(vendinfo.vend_comments) AS description, docass.docass_purpose AS purpose FROM docass, vendinfo WHERE ((docass.docass_target_type = 'V'::text) AND (docass.docass_target_id = vendinfo.vend_id))) UNION ALL SELECT docass.docass_id AS id, vendinfo.vend_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, vendinfo.vend_name AS name, firstline(vendinfo.vend_comments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, vendinfo WHERE ((docass.docass_source_type = 'V'::text) AND (docass.docass_source_id = vendinfo.vend_id))) UNION ALL SELECT docass.docass_id AS id, cntct.cntct_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, cntct.cntct_name AS name, cntct.cntct_title AS description, docass.docass_purpose AS purpose FROM docass, cntct WHERE ((docass.docass_target_type = 'T'::text) AND (docass.docass_target_id = cntct.cntct_id))) UNION ALL SELECT docass.docass_id AS id, cntct.cntct_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, cntct.cntct_name AS name, cntct.cntct_title AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, cntct WHERE ((docass.docass_source_type = 'T'::text) AND (docass.docass_source_id = cntct.cntct_id))) UNION ALL SELECT docass.docass_id AS id, (ophead.ophead_id)::text AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, ophead.ophead_name AS name, firstline(ophead.ophead_notes) AS description, docass.docass_purpose AS purpose FROM docass, ophead WHERE ((docass.docass_target_type = 'OPP'::text) AND (docass.docass_target_id = ophead.ophead_id))) UNION ALL SELECT docass.docass_id AS id, (ophead.ophead_id)::text AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, ophead.ophead_name AS name, firstline(ophead.ophead_notes) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, ophead WHERE ((docass.docass_source_type = 'OPP'::text) AND (docass.docass_source_id = ophead.ophead_id))) UNION ALL SELECT docass.docass_id AS id, quhead.quhead_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, custinfo.cust_name AS name, firstline(quhead.quhead_ordercomments) AS description, docass.docass_purpose AS purpose FROM docass, quhead, custinfo WHERE (((docass.docass_target_type = 'Q'::text) AND (docass.docass_target_id = quhead.quhead_id)) AND (custinfo.cust_id = quhead.quhead_cust_id))) UNION ALL SELECT docass.docass_id AS id, quhead.quhead_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, custinfo.cust_name AS name, firstline(quhead.quhead_ordercomments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, quhead, custinfo WHERE (((docass.docass_source_type = 'Q'::text) AND (docass.docass_source_id = quhead.quhead_id)) AND (custinfo.cust_id = quhead.quhead_cust_id))) UNION ALL SELECT docass.docass_id AS id, cohead.cohead_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, custinfo.cust_name AS name, firstline(cohead.cohead_ordercomments) AS description, docass.docass_purpose AS purpose FROM docass, cohead, custinfo WHERE (((docass.docass_target_type = 'S'::text) AND (docass.docass_target_id = cohead.cohead_id)) AND (custinfo.cust_id = cohead.cohead_cust_id))) UNION ALL SELECT docass.docass_id AS id, cohead.cohead_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, custinfo.cust_name AS name, firstline(cohead.cohead_ordercomments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, cohead, custinfo WHERE (((docass.docass_source_type = 'S'::text) AND (docass.docass_source_id = cohead.cohead_id)) AND (custinfo.cust_id = cohead.cohead_cust_id))) UNION ALL SELECT docass.docass_id AS id, pohead.pohead_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, vendinfo.vend_name AS name, firstline(pohead.pohead_comments) AS description, docass.docass_purpose AS purpose FROM docass, pohead, vendinfo WHERE (((docass.docass_target_type = 'P'::text) AND (docass.docass_target_id = pohead.pohead_id)) AND (vendinfo.vend_id = pohead.pohead_vend_id))) UNION ALL SELECT docass.docass_id AS id, pohead.pohead_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, vendinfo.vend_name AS name, firstline(pohead.pohead_comments) AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, pohead, vendinfo WHERE (((docass.docass_source_type = 'P'::text) AND (docass.docass_source_id = pohead.pohead_id)) AND (vendinfo.vend_id = pohead.pohead_vend_id))) UNION ALL SELECT docass.docass_id AS id, formatwonumber(wo.wo_id) AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, item.item_descrip1 AS name, item.item_descrip2 AS description, docass.docass_purpose AS purpose FROM docass, wo, itemsite, item WHERE ((((docass.docass_target_type = 'W'::text) AND (docass.docass_target_id = wo.wo_id)) AND (wo.wo_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id))) UNION ALL SELECT docass.docass_id AS id, formatwonumber(wo.wo_id) AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, item.item_descrip1 AS name, item.item_descrip2 AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, wo, itemsite, item WHERE ((((docass.docass_source_type = 'W'::text) AND (docass.docass_source_id = wo.wo_id)) AND (wo.wo_itemsite_id = itemsite.itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id))) UNION ALL SELECT docass.docass_id AS id, emp.emp_number AS target_number, docass.docass_target_type AS target_type, docass.docass_target_id AS target_id, docass.docass_source_type AS source_type, docass.docass_source_id AS source_id, cntct.cntct_name AS name, cntct.cntct_title AS description, docass.docass_purpose AS purpose FROM docass, (emp LEFT JOIN cntct ON ((emp.emp_cntct_id = cntct.cntct_id))) WHERE ((docass.docass_target_type = 'EMP'::text) AND (docass.docass_target_id = emp.emp_id))) UNION ALL SELECT docass.docass_id AS id, emp.emp_number AS target_number, docass.docass_source_type AS target_type, docass.docass_source_id AS target_id, docass.docass_target_type AS source_type, docass.docass_target_id AS source_id, cntct.cntct_name AS name, cntct.cntct_title AS description, CASE WHEN (docass.docass_purpose = 'A'::bpchar) THEN 'C'::bpchar WHEN (docass.docass_purpose = 'C'::bpchar) THEN 'A'::bpchar ELSE docass.docass_purpose END AS purpose FROM docass, (emp LEFT JOIN cntct ON ((emp.emp_cntct_id = cntct.cntct_id))) WHERE ((docass.docass_source_type = 'EMP'::text) AND (docass.docass_source_id = emp.emp_id)); DROP VIEW public.docinfo; publicadminfalse55378%00docinfoACLREVOKE ALL ON TABLE docinfo FROM PUBLIC; REVOKE ALL ON TABLE docinfo FROM admin; GRANT ALL ON TABLE docinfo TO admin; GRANT ALL ON TABLE docinfo TO xtrole; publicadminfalse84112591685183emp_emp_id_seqSEQUENCEpCREATE SEQUENCE emp_emp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; %DROP SEQUENCE public.emp_emp_id_seq; publicadminfalse8214%00emp_emp_id_seqSEQUENCE OWNED BY3ALTER SEQUENCE emp_emp_id_seq OWNED BY emp.emp_id; publicadminfalse411%00emp_emp_id_seq SEQUENCE SET5SELECT pg_catalog.setval('emp_emp_id_seq', 3, true); publicadminfalse411%00emp_emp_id_seqACLREVOKE ALL ON SEQUENCE emp_emp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE emp_emp_id_seq FROM admin; GRANT ALL ON SEQUENCE emp_emp_id_seq TO admin; GRANT ALL ON SEQUENCE emp_emp_id_seq TO xtrole; publicadminfalse41112591685185empgrpTABLECREATE TABLE empgrp ( empgrp_id integer NOT NULL, empgrp_name text NOT NULL, empgrp_descrip text NOT NULL, CONSTRAINT empgrp_empgrp_name_check CHECK ((empgrp_name <> ''::text)) ); DROP TABLE public.empgrp; publicadminfalse63378%00empgrpACLREVOKE ALL ON TABLE empgrp FROM PUBLIC; REVOKE ALL ON TABLE empgrp FROM admin; GRANT ALL ON TABLE empgrp TO admin; GRANT ALL ON TABLE empgrp TO xtrole; publicadminfalse41212591685191empgrp_empgrp_id_seqSEQUENCEvCREATE SEQUENCE empgrp_empgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.empgrp_empgrp_id_seq; publicadminfalse8412%00empgrp_empgrp_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE empgrp_empgrp_id_seq OWNED BY empgrp.empgrp_id; publicadminfalse413%00empgrp_empgrp_id_seq SEQUENCE SET<SELECT pg_catalog.setval('empgrp_empgrp_id_seq', 1, false); publicadminfalse413%00empgrp_empgrp_id_seqACLREVOKE ALL ON SEQUENCE empgrp_empgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE empgrp_empgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE empgrp_empgrp_id_seq TO admin; GRANT ALL ON SEQUENCE empgrp_empgrp_id_seq TO xtrole; publicadminfalse41312591685193 empgrpitemTABLECREATE TABLE empgrpitem ( empgrpitem_id integer NOT NULL, empgrpitem_empgrp_id integer NOT NULL, empgrpitem_emp_id integer NOT NULL ); DROP TABLE public.empgrpitem; publicadminfalse8%00 empgrpitemACLREVOKE ALL ON TABLE empgrpitem FROM PUBLIC; REVOKE ALL ON TABLE empgrpitem FROM admin; GRANT ALL ON TABLE empgrpitem TO admin; GRANT ALL ON TABLE empgrpitem TO xtrole; publicadminfalse41412591685196empgrpitem_empgrpitem_id_seqSEQUENCE~CREATE SEQUENCE empgrpitem_empgrpitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 3DROP SEQUENCE public.empgrpitem_empgrpitem_id_seq; publicadminfalse8414 %00empgrpitem_empgrpitem_id_seqSEQUENCE OWNED BYOALTER SEQUENCE empgrpitem_empgrpitem_id_seq OWNED BY empgrpitem.empgrpitem_id; publicadminfalse415!%00empgrpitem_empgrpitem_id_seq SEQUENCE SETDSELECT pg_catalog.setval('empgrpitem_empgrpitem_id_seq', 1, false); publicadminfalse415"%00empgrpitem_empgrpitem_id_seqACLREVOKE ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq FROM admin; GRANT ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq TO admin; GRANT ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq TO xtrole; publicadminfalse41512591685198evntlogTABLE!CREATE TABLE evntlog ( evntlog_id integer DEFAULT nextval(('evntlog_evntlog_id_seq'::text)::regclass) NOT NULL, evntlog_evnttime timestamp with time zone, evntlog_evnttype_id integer, evntlog_ord_id integer, evntlog_dispatched timestamp with time zone, evntlog_action text, evntlog_warehous_id integer, evntlog_number text, evntlog_newvalue numeric(20,10), evntlog_oldvalue numeric(20,10), evntlog_newdate date, evntlog_olddate date, evntlog_ordtype character(2), evntlog_username text ); DROP TABLE public.evntlog; publicadminfalse63398#%00 TABLE evntlogCOMMENT:COMMENT ON TABLE evntlog IS 'Event Notification history'; publicadminfalse416$%00evntlogACLREVOKE ALL ON TABLE evntlog FROM PUBLIC; REVOKE ALL ON TABLE evntlog FROM admin; GRANT ALL ON TABLE evntlog TO admin; GRANT ALL ON TABLE evntlog TO xtrole; publicadminfalse41612591685205evntlog_evntlog_id_seqSEQUENCECREATE SEQUENCE evntlog_evntlog_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.evntlog_evntlog_id_seq; publicadminfalse8%%00evntlog_evntlog_id_seq SEQUENCE SET@SELECT pg_catalog.setval('evntlog_evntlog_id_seq', 1880, true); publicadminfalse417&%00evntlog_evntlog_id_seqACLREVOKE ALL ON SEQUENCE evntlog_evntlog_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE evntlog_evntlog_id_seq FROM admin; GRANT ALL ON SEQUENCE evntlog_evntlog_id_seq TO admin; GRANT ALL ON SEQUENCE evntlog_evntlog_id_seq TO xtrole; publicadminfalse41712591685207evntnotTABLECREATE TABLE evntnot ( evntnot_id integer DEFAULT nextval(('evntnot_evntnot_id_seq'::text)::regclass) NOT NULL, evntnot_evnttype_id integer, evntnot_warehous_id integer, evntnot_username text ); DROP TABLE public.evntnot; publicadminfalse63408'%00 TABLE evntnotCOMMENTpCOMMENT ON TABLE evntnot IS 'Temporary table for storing information about user Event Notification selections'; publicadminfalse418(%00evntnotACLREVOKE ALL ON TABLE evntnot FROM PUBLIC; REVOKE ALL ON TABLE evntnot FROM admin; GRANT ALL ON TABLE evntnot TO admin; GRANT ALL ON TABLE evntnot TO xtrole; publicadminfalse41812591685214evntnot_evntnot_id_seqSEQUENCECREATE SEQUENCE evntnot_evntnot_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.evntnot_evntnot_id_seq; publicadminfalse8)%00evntnot_evntnot_id_seq SEQUENCE SET@SELECT pg_catalog.setval('evntnot_evntnot_id_seq', 1093, true); publicadminfalse419*%00evntnot_evntnot_id_seqACLREVOKE ALL ON SEQUENCE evntnot_evntnot_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE evntnot_evntnot_id_seq FROM admin; GRANT ALL ON SEQUENCE evntnot_evntnot_id_seq TO admin; GRANT ALL ON SEQUENCE evntnot_evntnot_id_seq TO xtrole; publicadminfalse41912591685216evnttypeTABLE!CREATE TABLE evnttype ( evnttype_id integer DEFAULT nextval(('evnttype_evnttype_id_seq'::text)::regclass) NOT NULL, evnttype_name text NOT NULL, evnttype_descrip text, evnttype_module text, CONSTRAINT evnttype_evnttype_name_check CHECK ((evnttype_name <> ''::text)) ); DROP TABLE public.evnttype; publicadminfalse634163428+%00TABLE evnttypeCOMMENT7COMMENT ON TABLE evnttype IS 'Event Type information'; publicadminfalse420,%00evnttypeACLREVOKE ALL ON TABLE evnttype FROM PUBLIC; REVOKE ALL ON TABLE evnttype FROM admin; GRANT ALL ON TABLE evnttype TO admin; GRANT ALL ON TABLE evnttype TO xtrole; publicadminfalse42012591685223evnttype_evnttype_id_seqSEQUENCECREATE SEQUENCE evnttype_evnttype_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.evnttype_evnttype_id_seq; publicadminfalse8-%00evnttype_evnttype_id_seq SEQUENCE SET@SELECT pg_catalog.setval('evnttype_evnttype_id_seq', 45, true); publicadminfalse421.%00evnttype_evnttype_id_seqACLREVOKE ALL ON SEQUENCE evnttype_evnttype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE evnttype_evnttype_id_seq FROM admin; GRANT ALL ON SEQUENCE evnttype_evnttype_id_seq TO admin; GRANT ALL ON SEQUENCE evnttype_evnttype_id_seq TO xtrole; publicadminfalse42112591685225expcat_expcat_id_seqSEQUENCEvCREATE SEQUENCE expcat_expcat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.expcat_expcat_id_seq; publicadminfalse8245/%00expcat_expcat_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE expcat_expcat_id_seq OWNED BY expcat.expcat_id; publicadminfalse4220%00expcat_expcat_id_seq SEQUENCE SET<SELECT pg_catalog.setval('expcat_expcat_id_seq', 25, true); publicadminfalse4221%00expcat_expcat_id_seqACLREVOKE ALL ON SEQUENCE expcat_expcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE expcat_expcat_id_seq FROM admin; GRANT ALL ON SEQUENCE expcat_expcat_id_seq TO admin; GRANT ALL ON SEQUENCE expcat_expcat_id_seq TO xtrole; publicadminfalse42212591685227file_file_id_seqSEQUENCErCREATE SEQUENCE file_file_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.file_file_id_seq; publicadminfalse81902%00file_file_id_seqSEQUENCE OWNED BY7ALTER SEQUENCE file_file_id_seq OWNED BY file.file_id; publicadminfalse4233%00file_file_id_seq SEQUENCE SET7SELECT pg_catalog.setval('file_file_id_seq', 1, true); publicadminfalse4234%00file_file_id_seqACLREVOKE ALL ON SEQUENCE file_file_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE file_file_id_seq FROM admin; GRANT ALL ON SEQUENCE file_file_id_seq TO admin; GRANT ALL ON SEQUENCE file_file_id_seq TO xtrole; publicadminfalse42312591685229filterTABLECREATE TABLE filter ( filter_id integer NOT NULL, filter_screen text NOT NULL, filter_value text NOT NULL, filter_username text, filter_name text NOT NULL, filter_selected boolean DEFAULT false ); DROP TABLE public.filter; publicadminfalse634485%00filterACLREVOKE ALL ON TABLE filter FROM PUBLIC; REVOKE ALL ON TABLE filter FROM admin; GRANT ALL ON TABLE filter TO admin; GRANT ALL ON TABLE filter TO xtrole; publicadminfalse42412591685236filter_filter_id_seqSEQUENCEvCREATE SEQUENCE filter_filter_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.filter_filter_id_seq; publicadminfalse84246%00filter_filter_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE filter_filter_id_seq OWNED BY filter.filter_id; publicadminfalse4257%00filter_filter_id_seq SEQUENCE SET;SELECT pg_catalog.setval('filter_filter_id_seq', 5, true); publicadminfalse4258%00filter_filter_id_seqACLREVOKE ALL ON SEQUENCE filter_filter_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE filter_filter_id_seq FROM admin; GRANT ALL ON SEQUENCE filter_filter_id_seq TO admin; GRANT ALL ON SEQUENCE filter_filter_id_seq TO xtrole; publicadminfalse42512591685238flheadTABLE:CREATE TABLE flhead ( flhead_id integer NOT NULL, flhead_name text NOT NULL, flhead_descrip text, flhead_showtotal boolean DEFAULT false NOT NULL, flhead_showstart boolean DEFAULT true NOT NULL, flhead_showend boolean DEFAULT true NOT NULL, flhead_showdelta boolean DEFAULT true NOT NULL, flhead_showbudget boolean DEFAULT true NOT NULL, flhead_showdiff boolean DEFAULT false NOT NULL, flhead_showcustom boolean DEFAULT false NOT NULL, flhead_custom_label text, flhead_usealttotal boolean DEFAULT false NOT NULL, flhead_alttotal text, flhead_usealtbegin boolean DEFAULT false NOT NULL, flhead_altbegin text, flhead_usealtend boolean DEFAULT false NOT NULL, flhead_altend text, flhead_usealtdebits boolean DEFAULT false NOT NULL, flhead_altdebits text, flhead_usealtcredits boolean DEFAULT false NOT NULL, flhead_altcredits text, flhead_usealtbudget boolean DEFAULT false NOT NULL, flhead_altbudget text, flhead_usealtdiff boolean DEFAULT false NOT NULL, flhead_altdiff text, flhead_type character(1) DEFAULT 'A'::bpchar NOT NULL, flhead_active boolean DEFAULT true NOT NULL, flhead_sys boolean DEFAULT false, flhead_notes text DEFAULT ''::text, CONSTRAINT flhead_flhead_name_check CHECK ((flhead_name <> ''::text)) ); DROP TABLE public.flhead; publicadminfalse634563466347634863496350635163526353635463556356635763586359636063616362636489%00 TABLE flheadCOMMENTBCOMMENT ON TABLE flhead IS 'Financial Layout header information'; publicadminfalse426:%00flheadACLREVOKE ALL ON TABLE flhead FROM PUBLIC; REVOKE ALL ON TABLE flhead FROM admin; GRANT ALL ON TABLE flhead TO admin; GRANT ALL ON TABLE flhead TO xtrole; publicadminfalse42612591685262flitemTABLE0CREATE TABLE flitem ( flitem_id integer NOT NULL, flitem_flhead_id integer, flitem_flgrp_id integer, flitem_order integer, flitem_accnt_id integer, flitem_showstart boolean, flitem_showend boolean, flitem_showdelta boolean, flitem_showbudget boolean DEFAULT false NOT NULL, flitem_subtract boolean DEFAULT false NOT NULL, flitem_showstartprcnt boolean DEFAULT false NOT NULL, flitem_showendprcnt boolean DEFAULT false NOT NULL, flitem_showdeltaprcnt boolean DEFAULT false NOT NULL, flitem_showbudgetprcnt boolean DEFAULT false NOT NULL, flitem_prcnt_flgrp_id integer DEFAULT (-1) NOT NULL, flitem_showdiff boolean DEFAULT false NOT NULL, flitem_showdiffprcnt boolean DEFAULT false NOT NULL, flitem_showcustom boolean DEFAULT false NOT NULL, flitem_showcustomprcnt boolean DEFAULT false NOT NULL, flitem_custom_source character(1), flitem_company text, flitem_profit text, flitem_number text, flitem_sub text, flitem_type character(1), flitem_subaccnttype_code text ); DROP TABLE public.flitem; publicadminfalse636563666367636863696370637163726373637463758;%00 TABLE flitemCOMMENTCCOMMENT ON TABLE flitem IS 'Financial Layout Account information'; publicadminfalse427<%00flitemACLREVOKE ALL ON TABLE flitem FROM PUBLIC; REVOKE ALL ON TABLE flitem FROM admin; GRANT ALL ON TABLE flitem TO admin; GRANT ALL ON TABLE flitem TO xtrole; publicadminfalse427J12592006574flaccntVIEW CREATE VIEW flaccnt AS SELECT flhead.flhead_type, flitem.flitem_id, flitem.flitem_flhead_id, flitem.flitem_flgrp_id, flitem.flitem_order, flitem.flitem_accnt_id, flitem.flitem_showstart, flitem.flitem_showend, flitem.flitem_showdelta, flitem.flitem_showbudget, flitem.flitem_subtract, flitem.flitem_showstartprcnt, flitem.flitem_showendprcnt, flitem.flitem_showdeltaprcnt, flitem.flitem_showbudgetprcnt, flitem.flitem_prcnt_flgrp_id, flitem.flitem_showdiff, flitem.flitem_showdiffprcnt, flitem.flitem_showcustom, flitem.flitem_showcustomprcnt, flitem.flitem_custom_source, flitem.flitem_company, flitem.flitem_profit, flitem.flitem_number, flitem.flitem_sub, flitem.flitem_type, flitem.flitem_subaccnttype_code, accnt.accnt_id, accnt.accnt_type, accnt.accnt_company, accnt.accnt_profit, accnt.accnt_number, accnt.accnt_sub, (-1) AS prj_id FROM ((flhead JOIN flitem ON ((flhead.flhead_id = flitem.flitem_flhead_id))) JOIN accnt ON ((flitem.flitem_accnt_id = accnt.accnt_id))) UNION ALL SELECT flhead.flhead_type, flitem.flitem_id, flitem.flitem_flhead_id, flitem.flitem_flgrp_id, flitem.flitem_order, flitem.flitem_accnt_id, flitem.flitem_showstart, flitem.flitem_showend, flitem.flitem_showdelta, flitem.flitem_showbudget, flitem.flitem_subtract, flitem.flitem_showstartprcnt, flitem.flitem_showendprcnt, flitem.flitem_showdeltaprcnt, flitem.flitem_showbudgetprcnt, flitem.flitem_prcnt_flgrp_id, flitem.flitem_showdiff, flitem.flitem_showdiffprcnt, flitem.flitem_showcustom, flitem.flitem_showcustomprcnt, flitem.flitem_custom_source, flitem.flitem_company, flitem.flitem_profit, flitem.flitem_number, flitem.flitem_sub, flitem.flitem_type, flitem.flitem_subaccnttype_code, accnt.accnt_id, accnt.accnt_type, accnt.accnt_company, accnt.accnt_profit, accnt.accnt_number, accnt.accnt_sub, (-1) AS prj_id FROM (flhead JOIN flitem ON ((flhead.flhead_id = flitem.flitem_flhead_id))), accnt WHERE (((((((flitem.flitem_accnt_id = (-1)) AND ((flitem.flitem_type = ''::bpchar) OR (accnt.accnt_type = flitem.flitem_type))) AND ((flitem.flitem_company = 'All'::text) OR (accnt.accnt_company = flitem.flitem_company))) AND ((flitem.flitem_profit = 'All'::text) OR (accnt.accnt_profit = flitem.flitem_profit))) AND ((flitem.flitem_number = 'All'::text) OR (accnt.accnt_number = flitem.flitem_number))) AND ((flitem.flitem_sub = 'All'::text) OR (accnt.accnt_sub = flitem.flitem_sub))) AND ((flitem.flitem_subaccnttype_code = 'All'::text) OR (accnt.accnt_subaccnttype_code = flitem.flitem_subaccnttype_code))) ORDER BY 30, 31, 32, 33; DROP VIEW public.flaccnt; publicadminfalse55388=%00flaccntACLREVOKE ALL ON TABLE flaccnt FROM PUBLIC; REVOKE ALL ON TABLE flaccnt FROM admin; GRANT ALL ON TABLE flaccnt TO admin; GRANT ALL ON TABLE flaccnt TO xtrole; publicadminfalse84212591685284flcolTABLE~CREATE TABLE flcol ( flcol_id integer NOT NULL, flcol_flhead_id integer NOT NULL, flcol_name text, flcol_descrip text, flcol_report_id integer, flcol_month boolean, flcol_quarter boolean, flcol_year boolean, flcol_showdb boolean, flcol_prcnt boolean, flcol_priortype character(1), flcol_priormonth boolean, flcol_priorquarter boolean, flcol_prioryear character(1), flcol_priorprcnt boolean, flcol_priordiff boolean, flcol_priordiffprcnt boolean, flcol_budget boolean, flcol_budgetprcnt boolean, flcol_budgetdiff boolean, flcol_budgetdiffprcnt boolean ); DROP TABLE public.flcol; publicadminfalse8>%00flcolACLREVOKE ALL ON TABLE flcol FROM PUBLIC; REVOKE ALL ON TABLE flcol FROM admin; GRANT ALL ON TABLE flcol TO admin; GRANT ALL ON TABLE flcol TO xtrole; publicadminfalse42812591685290flcol_flcol_id_seqSEQUENCEtCREATE SEQUENCE flcol_flcol_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.flcol_flcol_id_seq; publicadminfalse8428?%00flcol_flcol_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE flcol_flcol_id_seq OWNED BY flcol.flcol_id; publicadminfalse429@%00flcol_flcol_id_seq SEQUENCE SET:SELECT pg_catalog.setval('flcol_flcol_id_seq', 59, true); publicadminfalse429A%00flcol_flcol_id_seqACLREVOKE ALL ON SEQUENCE flcol_flcol_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flcol_flcol_id_seq FROM admin; GRANT ALL ON SEQUENCE flcol_flcol_id_seq TO admin; GRANT ALL ON SEQUENCE flcol_flcol_id_seq TO xtrole; publicadminfalse42912591685292flgrpTABLEdCREATE TABLE flgrp ( flgrp_id integer NOT NULL, flgrp_flhead_id integer, flgrp_flgrp_id integer, flgrp_order integer, flgrp_name text, flgrp_descrip text, flgrp_subtotal boolean DEFAULT false NOT NULL, flgrp_summarize boolean DEFAULT false NOT NULL, flgrp_subtract boolean DEFAULT false NOT NULL, flgrp_showstart boolean DEFAULT true NOT NULL, flgrp_showend boolean DEFAULT true NOT NULL, flgrp_showdelta boolean DEFAULT true NOT NULL, flgrp_showbudget boolean DEFAULT true NOT NULL, flgrp_showstartprcnt boolean DEFAULT false NOT NULL, flgrp_showendprcnt boolean DEFAULT false NOT NULL, flgrp_showdeltaprcnt boolean DEFAULT false NOT NULL, flgrp_showbudgetprcnt boolean DEFAULT false NOT NULL, flgrp_prcnt_flgrp_id integer DEFAULT (-1) NOT NULL, flgrp_showdiff boolean DEFAULT false NOT NULL, flgrp_showdiffprcnt boolean DEFAULT false NOT NULL, flgrp_showcustom boolean DEFAULT false NOT NULL, flgrp_showcustomprcnt boolean DEFAULT false NOT NULL, flgrp_usealtsubtotal boolean DEFAULT false NOT NULL, flgrp_altsubtotal text ); DROP TABLE public.flgrp; publicadminfalse637863796380638163826383638463856386638763886389639063916392639363948B%00 TABLE flgrpCOMMENT@COMMENT ON TABLE flgrp IS 'Financial Layout Group information'; publicadminfalse430C%00flgrpACLREVOKE ALL ON TABLE flgrp FROM PUBLIC; REVOKE ALL ON TABLE flgrp FROM admin; GRANT ALL ON TABLE flgrp TO admin; GRANT ALL ON TABLE flgrp TO xtrole; publicadminfalse43012591685315flgrp_flgrp_id_seqSEQUENCEtCREATE SEQUENCE flgrp_flgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.flgrp_flgrp_id_seq; publicadminfalse8430D%00flgrp_flgrp_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE flgrp_flgrp_id_seq OWNED BY flgrp.flgrp_id; publicadminfalse431E%00flgrp_flgrp_id_seq SEQUENCE SET;SELECT pg_catalog.setval('flgrp_flgrp_id_seq', 233, true); publicadminfalse431F%00flgrp_flgrp_id_seqACLREVOKE ALL ON SEQUENCE flgrp_flgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flgrp_flgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE flgrp_flgrp_id_seq TO admin; GRANT ALL ON SEQUENCE flgrp_flgrp_id_seq TO xtrole; publicadminfalse43112591685317flhead_flhead_id_seqSEQUENCEvCREATE SEQUENCE flhead_flhead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.flhead_flhead_id_seq; publicadminfalse8426G%00flhead_flhead_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE flhead_flhead_id_seq OWNED BY flhead.flhead_id; publicadminfalse432H%00flhead_flhead_id_seq SEQUENCE SET<SELECT pg_catalog.setval('flhead_flhead_id_seq', 27, true); publicadminfalse432I%00flhead_flhead_id_seqACLREVOKE ALL ON SEQUENCE flhead_flhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flhead_flhead_id_seq FROM admin; GRANT ALL ON SEQUENCE flhead_flhead_id_seq TO admin; GRANT ALL ON SEQUENCE flhead_flhead_id_seq TO xtrole; publicadminfalse43212591685319flitem_flitem_id_seqSEQUENCEvCREATE SEQUENCE flitem_flitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.flitem_flitem_id_seq; publicadminfalse8427J%00flitem_flitem_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE flitem_flitem_id_seq OWNED BY flitem.flitem_id; publicadminfalse433K%00flitem_flitem_id_seq SEQUENCE SET=SELECT pg_catalog.setval('flitem_flitem_id_seq', 338, true); publicadminfalse433L%00flitem_flitem_id_seqACLREVOKE ALL ON SEQUENCE flitem_flitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flitem_flitem_id_seq FROM admin; GRANT ALL ON SEQUENCE flitem_flitem_id_seq TO admin; GRANT ALL ON SEQUENCE flitem_flitem_id_seq TO xtrole; publicadminfalse43312591685321flnotesTABLECREATE TABLE flnotes ( flnotes_id integer NOT NULL, flnotes_flhead_id integer, flnotes_period_id integer, flnotes_notes text DEFAULT ''::text ); DROP TABLE public.flnotes; publicadminfalse63978M%00flnotesACLREVOKE ALL ON TABLE flnotes FROM PUBLIC; REVOKE ALL ON TABLE flnotes FROM admin; GRANT ALL ON TABLE flnotes TO admin; GRANT ALL ON TABLE flnotes TO xtrole; publicadminfalse43412591685328flnotes_flnotes_id_seqSEQUENCExCREATE SEQUENCE flnotes_flnotes_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.flnotes_flnotes_id_seq; publicadminfalse8434N%00flnotes_flnotes_id_seqSEQUENCE OWNED BYCALTER SEQUENCE flnotes_flnotes_id_seq OWNED BY flnotes.flnotes_id; publicadminfalse435O%00flnotes_flnotes_id_seq SEQUENCE SET>SELECT pg_catalog.setval('flnotes_flnotes_id_seq', 1, false); publicadminfalse435P%00flnotes_flnotes_id_seqACLREVOKE ALL ON SEQUENCE flnotes_flnotes_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flnotes_flnotes_id_seq FROM admin; GRANT ALL ON SEQUENCE flnotes_flnotes_id_seq TO admin; GRANT ALL ON SEQUENCE flnotes_flnotes_id_seq TO xtrole; publicadminfalse43512591685330flrptTABLE/CREATE TABLE flrpt ( flrpt_flhead_id integer NOT NULL, flrpt_period_id integer NOT NULL, flrpt_username text NOT NULL, flrpt_order integer NOT NULL, flrpt_level integer NOT NULL, flrpt_type text NOT NULL, flrpt_type_id integer NOT NULL, flrpt_beginning numeric, flrpt_ending numeric, flrpt_debits numeric, flrpt_credits numeric, flrpt_budget numeric, flrpt_beginningprcnt numeric, flrpt_endingprcnt numeric, flrpt_debitsprcnt numeric, flrpt_creditsprcnt numeric, flrpt_budgetprcnt numeric, flrpt_parent_id integer, flrpt_diff numeric, flrpt_diffprcnt numeric, flrpt_custom numeric, flrpt_customprcnt numeric, flrpt_altname text, flrpt_accnt_id integer, flrpt_interval character(1), flrpt_id integer NOT NULL ); DROP TABLE public.flrpt; publicadminfalse8Q%00 TABLE flrptCOMMENTvCOMMENT ON TABLE flrpt IS 'Scratch table where financial reporting information is processed before being displayed.'; publicadminfalse436R%00flrptACLREVOKE ALL ON TABLE flrpt FROM PUBLIC; REVOKE ALL ON TABLE flrpt FROM admin; GRANT ALL ON TABLE flrpt TO admin; GRANT ALL ON TABLE flrpt TO xtrole; publicadminfalse43612591685336flrpt_flrpt_id_seqSEQUENCEtCREATE SEQUENCE flrpt_flrpt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.flrpt_flrpt_id_seq; publicadminfalse8436S%00flrpt_flrpt_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE flrpt_flrpt_id_seq OWNED BY flrpt.flrpt_id; publicadminfalse437T%00flrpt_flrpt_id_seq SEQUENCE SET<SELECT pg_catalog.setval('flrpt_flrpt_id_seq', 9046, true); publicadminfalse437U%00flrpt_flrpt_id_seqACLREVOKE ALL ON SEQUENCE flrpt_flrpt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flrpt_flrpt_id_seq FROM admin; GRANT ALL ON SEQUENCE flrpt_flrpt_id_seq TO admin; GRANT ALL ON SEQUENCE flrpt_flrpt_id_seq TO xtrole; publicadminfalse43712591685338flspecTABLECREATE TABLE flspec ( flspec_id integer NOT NULL, flspec_flhead_id integer NOT NULL, flspec_flgrp_id integer NOT NULL, flspec_order integer NOT NULL, flspec_name text, flspec_type text, flspec_showstart boolean DEFAULT true NOT NULL, flspec_showend boolean DEFAULT true NOT NULL, flspec_showdelta boolean DEFAULT true NOT NULL, flspec_showbudget boolean DEFAULT false NOT NULL, flspec_subtract boolean DEFAULT false NOT NULL, flspec_showstartprcnt boolean DEFAULT false NOT NULL, flspec_showendprcnt boolean DEFAULT false NOT NULL, flspec_showdeltaprcnt boolean DEFAULT false NOT NULL, flspec_showbudgetprcnt boolean DEFAULT false NOT NULL, flspec_showdiff boolean DEFAULT false NOT NULL, flspec_showdiffprcnt boolean DEFAULT false NOT NULL, flspec_prcnt_flgrp_id integer DEFAULT (-1) NOT NULL, flspec_showcustom boolean DEFAULT false NOT NULL, flspec_showcustomprcnt boolean DEFAULT false NOT NULL, flspec_custom_source character(1) ); DROP TABLE public.flspec; publicadminfalse639964006401640264036404640564066407640864096410641164128V%00 TABLE flspecCOMMENT@COMMENT ON TABLE flspec IS 'Financial Layout Special entries.'; publicadminfalse438W%00flspecACLREVOKE ALL ON TABLE flspec FROM PUBLIC; REVOKE ALL ON TABLE flspec FROM admin; GRANT ALL ON TABLE flspec TO admin; GRANT ALL ON TABLE flspec TO xtrole; publicadminfalse43812591685358flspec_flspec_id_seqSEQUENCEvCREATE SEQUENCE flspec_flspec_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.flspec_flspec_id_seq; publicadminfalse8438X%00flspec_flspec_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE flspec_flspec_id_seq OWNED BY flspec.flspec_id; publicadminfalse439Y%00flspec_flspec_id_seq SEQUENCE SET<SELECT pg_catalog.setval('flspec_flspec_id_seq', 1, false); publicadminfalse439Z%00flspec_flspec_id_seqACLREVOKE ALL ON SEQUENCE flspec_flspec_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE flspec_flspec_id_seq FROM admin; GRANT ALL ON SEQUENCE flspec_flspec_id_seq TO admin; GRANT ALL ON SEQUENCE flspec_flspec_id_seq TO xtrole; publicadminfalse43912591685360formTABLE?CREATE TABLE form ( form_id integer DEFAULT nextval(('"form_form_id_seq"'::text)::regclass) NOT NULL, form_name text NOT NULL, form_descrip text, form_report_id integer, form_key character varying(4), form_report_name text, CONSTRAINT form_form_name_check CHECK ((form_name <> ''::text)) ); DROP TABLE public.form; publicadminfalse641464158[%00 TABLE formCOMMENT-COMMENT ON TABLE form IS 'Form information'; publicadminfalse440\%00COLUMN form.form_report_idCOMMENT\COMMENT ON COLUMN form.form_report_id IS 'Obsolete -- reference form_report_name instead.'; publicadminfalse440]%00formACLREVOKE ALL ON TABLE form FROM PUBLIC; REVOKE ALL ON TABLE form FROM admin; GRANT ALL ON TABLE form TO admin; GRANT ALL ON TABLE form TO xtrole; publicadminfalse44012591685367form_form_id_seqSEQUENCEzCREATE SEQUENCE form_form_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 'DROP SEQUENCE public.form_form_id_seq; publicadminfalse8^%00form_form_id_seq SEQUENCE SET8SELECT pg_catalog.setval('form_form_id_seq', 23, true); publicadminfalse441_%00form_form_id_seqACLREVOKE ALL ON SEQUENCE form_form_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE form_form_id_seq FROM admin; GRANT ALL ON SEQUENCE form_form_id_seq TO admin; GRANT ALL ON SEQUENCE form_form_id_seq TO xtrole; publicadminfalse44112591685369 freightclass_freightclass_id_seqSEQUENCECREATE SEQUENCE freightclass_freightclass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 7DROP SEQUENCE public.freightclass_freightclass_id_seq; publicadminfalse8217`%00 freightclass_freightclass_id_seqSEQUENCE OWNED BYWALTER SEQUENCE freightclass_freightclass_id_seq OWNED BY freightclass.freightclass_id; publicadminfalse442a%00 freightclass_freightclass_id_seq SEQUENCE SETGSELECT pg_catalog.setval('freightclass_freightclass_id_seq', 3, true); publicadminfalse442b%00 freightclass_freightclass_id_seqACL REVOKE ALL ON SEQUENCE freightclass_freightclass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE freightclass_freightclass_id_seq FROM admin; GRANT ALL ON SEQUENCE freightclass_freightclass_id_seq TO admin; GRANT ALL ON SEQUENCE freightclass_freightclass_id_seq TO xtrole; publicadminfalse44212591685371glseriesTABLECREATE TABLE glseries ( glseries_id integer DEFAULT nextval(('"glseries_glseries_id_seq"'::text)::regclass) NOT NULL, glseries_sequence integer, glseries_doctype character(2), glseries_docnumber text, glseries_accnt_id integer, glseries_amount numeric(20,2), glseries_source text, glseries_distdate date, glseries_notes text, glseries_misc_id integer ); DROP TABLE public.glseries; publicadminfalse64168c%00TABLE glseriesCOMMENTCOMMENT ON TABLE glseries IS 'Temporary table for storing information about General Ledger (G/L) Series Entries before Series Entries are posted'; publicadminfalse443d%00glseriesACLREVOKE ALL ON TABLE glseries FROM PUBLIC; REVOKE ALL ON TABLE glseries FROM admin; GRANT ALL ON TABLE glseries TO admin; GRANT ALL ON TABLE glseries TO xtrole; publicadminfalse44312591685378glseries_glseries_id_seqSEQUENCECREATE SEQUENCE glseries_glseries_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.glseries_glseries_id_seq; publicadminfalse8e%00glseries_glseries_id_seq SEQUENCE SETBSELECT pg_catalog.setval('glseries_glseries_id_seq', 3511, true); publicadminfalse444f%00glseries_glseries_id_seqACLREVOKE ALL ON SEQUENCE glseries_glseries_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE glseries_glseries_id_seq FROM admin; GRANT ALL ON SEQUENCE glseries_glseries_id_seq TO admin; GRANT ALL ON SEQUENCE glseries_glseries_id_seq TO xtrole; publicadminfalse44412591685380gltrans_gltrans_id_seqSEQUENCECREATE SEQUENCE gltrans_gltrans_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.gltrans_gltrans_id_seq; publicadminfalse8g%00gltrans_gltrans_id_seq SEQUENCE SETASELECT pg_catalog.setval('gltrans_gltrans_id_seq', 13062, true); publicadminfalse445h%00gltrans_gltrans_id_seqACLREVOKE ALL ON SEQUENCE gltrans_gltrans_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE gltrans_gltrans_id_seq FROM admin; GRANT ALL ON SEQUENCE gltrans_gltrans_id_seq TO admin; GRANT ALL ON SEQUENCE gltrans_gltrans_id_seq TO xtrole; publicadminfalse44512591685382gltrans_sequence_seqSEQUENCE~CREATE SEQUENCE gltrans_sequence_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.gltrans_sequence_seq; publicadminfalse8i%00gltrans_sequence_seq SEQUENCE SET>SELECT pg_catalog.setval('gltrans_sequence_seq', 6420, true); publicadminfalse446j%00gltrans_sequence_seqACLREVOKE ALL ON SEQUENCE gltrans_sequence_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE gltrans_sequence_seq FROM admin; GRANT ALL ON SEQUENCE gltrans_sequence_seq TO admin; GRANT ALL ON SEQUENCE gltrans_sequence_seq TO xtrole; publicadminfalse44612591685384grpTABLECREATE TABLE grp ( grp_id integer NOT NULL, grp_name text NOT NULL, grp_descrip text, CONSTRAINT grp_grp_name_check CHECK ((grp_name <> ''::text)) ); DROP TABLE public.grp; publicadminfalse64188k%00 TABLE grpCOMMENTFCOMMENT ON TABLE grp IS 'This table is the basic group information.'; publicadminfalse447l%00grpACLREVOKE ALL ON TABLE grp FROM PUBLIC; REVOKE ALL ON TABLE grp FROM admin; GRANT ALL ON TABLE grp TO admin; GRANT ALL ON TABLE grp TO xtrole; publicadminfalse44712591685390grp_grp_id_seqSEQUENCEpCREATE SEQUENCE grp_grp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; %DROP SEQUENCE public.grp_grp_id_seq; publicadminfalse8447m%00grp_grp_id_seqSEQUENCE OWNED BY3ALTER SEQUENCE grp_grp_id_seq OWNED BY grp.grp_id; publicadminfalse448n%00grp_grp_id_seq SEQUENCE SET5SELECT pg_catalog.setval('grp_grp_id_seq', 1, true); publicadminfalse448o%00grp_grp_id_seqACLREVOKE ALL ON SEQUENCE grp_grp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE grp_grp_id_seq FROM admin; GRANT ALL ON SEQUENCE grp_grp_id_seq TO admin; GRANT ALL ON SEQUENCE grp_grp_id_seq TO xtrole; publicadminfalse44812591685392grpprivTABLECREATE TABLE grppriv ( grppriv_id integer NOT NULL, grppriv_grp_id integer NOT NULL, grppriv_priv_id integer NOT NULL ); DROP TABLE public.grppriv; publicadminfalse8p%00 TABLE grpprivCOMMENTMCOMMENT ON TABLE grppriv IS 'This is a specific priv for a specific group.'; publicadminfalse449q%00grpprivACLREVOKE ALL ON TABLE grppriv FROM PUBLIC; REVOKE ALL ON TABLE grppriv FROM admin; GRANT ALL ON TABLE grppriv TO admin; GRANT ALL ON TABLE grppriv TO xtrole; publicadminfalse44912591685395grppriv_grppriv_id_seqSEQUENCExCREATE SEQUENCE grppriv_grppriv_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.grppriv_grppriv_id_seq; publicadminfalse8449r%00grppriv_grppriv_id_seqSEQUENCE OWNED BYCALTER SEQUENCE grppriv_grppriv_id_seq OWNED BY grppriv.grppriv_id; publicadminfalse450s%00grppriv_grppriv_id_seq SEQUENCE SET?SELECT pg_catalog.setval('grppriv_grppriv_id_seq', 521, true); publicadminfalse450t%00grppriv_grppriv_id_seqACLREVOKE ALL ON SEQUENCE grppriv_grppriv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE grppriv_grppriv_id_seq FROM admin; GRANT ALL ON SEQUENCE grppriv_grppriv_id_seq TO admin; GRANT ALL ON SEQUENCE grppriv_grppriv_id_seq TO xtrole; publicadminfalse45012591685397hnfcTABLECREATE TABLE hnfc ( hnfc_id integer NOT NULL, hnfc_code text NOT NULL, CONSTRAINT hnfc_hnfc_code_check CHECK ((hnfc_code <> ''::text)) ); DROP TABLE public.hnfc; publicadminfalse64218u%00 TABLE hnfcCOMMENTTCOMMENT ON TABLE hnfc IS 'List of personal titles/honorifics used in cntct table.'; publicadminfalse451v%00hnfcACLREVOKE ALL ON TABLE hnfc FROM PUBLIC; REVOKE ALL ON TABLE hnfc FROM admin; GRANT ALL ON TABLE hnfc TO admin; GRANT ALL ON TABLE hnfc TO xtrole; publicadminfalse45112591685403hnfc_hnfc_id_seqSEQUENCErCREATE SEQUENCE hnfc_hnfc_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.hnfc_hnfc_id_seq; publicadminfalse8451w%00hnfc_hnfc_id_seqSEQUENCE OWNED BY7ALTER SEQUENCE hnfc_hnfc_id_seq OWNED BY hnfc.hnfc_id; publicadminfalse452x%00hnfc_hnfc_id_seq SEQUENCE SET7SELECT pg_catalog.setval('hnfc_hnfc_id_seq', 5, true); publicadminfalse452y%00hnfc_hnfc_id_seqACLREVOKE ALL ON SEQUENCE hnfc_hnfc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE hnfc_hnfc_id_seq FROM admin; GRANT ALL ON SEQUENCE hnfc_hnfc_id_seq TO admin; GRANT ALL ON SEQUENCE hnfc_hnfc_id_seq TO xtrole; publicadminfalse45212591685405incdt_incdt_id_seqSEQUENCEtCREATE SEQUENCE incdt_incdt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.incdt_incdt_id_seq; publicadminfalse8154z%00incdt_incdt_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE incdt_incdt_id_seq OWNED BY incdt.incdt_id; publicadminfalse453{%00incdt_incdt_id_seq SEQUENCE SET9SELECT pg_catalog.setval('incdt_incdt_id_seq', 5, true); publicadminfalse453|%00incdt_incdt_id_seqACLREVOKE ALL ON SEQUENCE incdt_incdt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdt_incdt_id_seq FROM admin; GRANT ALL ON SEQUENCE incdt_incdt_id_seq TO admin; GRANT ALL ON SEQUENCE incdt_incdt_id_seq TO xtrole; publicadminfalse45312591685407incdtcat_incdtcat_id_seqSEQUENCEzCREATE SEQUENCE incdtcat_incdtcat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.incdtcat_incdtcat_id_seq; publicadminfalse8220}%00incdtcat_incdtcat_id_seqSEQUENCE OWNED BYGALTER SEQUENCE incdtcat_incdtcat_id_seq OWNED BY incdtcat.incdtcat_id; publicadminfalse454~%00incdtcat_incdtcat_id_seq SEQUENCE SET?SELECT pg_catalog.setval('incdtcat_incdtcat_id_seq', 5, true); publicadminfalse454%00incdtcat_incdtcat_id_seqACLREVOKE ALL ON SEQUENCE incdtcat_incdtcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdtcat_incdtcat_id_seq FROM admin; GRANT ALL ON SEQUENCE incdtcat_incdtcat_id_seq TO admin; GRANT ALL ON SEQUENCE incdtcat_incdtcat_id_seq TO xtrole; publicadminfalse45412591685409 incdthistTABLEVCREATE TABLE incdthist ( incdthist_id integer NOT NULL, incdthist_incdt_id integer NOT NULL, incdthist_change character(1), incdthist_target_id integer, incdthist_timestamp timestamp without time zone DEFAULT now() NOT NULL, incdthist_username text DEFAULT geteffectivextuser() NOT NULL, incdthist_descrip text ); DROP TABLE public.incdthist; publicadminfalse642364248%00TABLE incdthistCOMMENT:COMMENT ON TABLE incdthist IS 'Incident history changes'; publicadminfalse455%00 incdthistACLREVOKE ALL ON TABLE incdthist FROM PUBLIC; REVOKE ALL ON TABLE incdthist FROM admin; GRANT ALL ON TABLE incdthist TO admin; GRANT ALL ON TABLE incdthist TO xtrole; publicadminfalse45512591685417incdthist_incdthist_id_seqSEQUENCE|CREATE SEQUENCE incdthist_incdthist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.incdthist_incdthist_id_seq; publicadminfalse8455%00incdthist_incdthist_id_seqSEQUENCE OWNED BYKALTER SEQUENCE incdthist_incdthist_id_seq OWNED BY incdthist.incdthist_id; publicadminfalse456%00incdthist_incdthist_id_seq SEQUENCE SETBSELECT pg_catalog.setval('incdthist_incdthist_id_seq', 26, true); publicadminfalse456%00incdthist_incdthist_id_seqACLREVOKE ALL ON SEQUENCE incdthist_incdthist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdthist_incdthist_id_seq FROM admin; GRANT ALL ON SEQUENCE incdthist_incdthist_id_seq TO admin; GRANT ALL ON SEQUENCE incdthist_incdthist_id_seq TO xtrole; publicadminfalse45612591685419"incdtpriority_incdtpriority_id_seqSEQUENCECREATE SEQUENCE incdtpriority_incdtpriority_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 9DROP SEQUENCE public.incdtpriority_incdtpriority_id_seq; publicadminfalse8221%00"incdtpriority_incdtpriority_id_seqSEQUENCE OWNED BY[ALTER SEQUENCE incdtpriority_incdtpriority_id_seq OWNED BY incdtpriority.incdtpriority_id; publicadminfalse457%00"incdtpriority_incdtpriority_id_seq SEQUENCE SETISELECT pg_catalog.setval('incdtpriority_incdtpriority_id_seq', 5, true); publicadminfalse457%00"incdtpriority_incdtpriority_id_seqACLREVOKE ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq FROM admin; GRANT ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq TO admin; GRANT ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq TO xtrole; publicadminfalse45712591685421&incdtresolution_incdtresolution_id_seqSEQUENCECREATE SEQUENCE incdtresolution_incdtresolution_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; =DROP SEQUENCE public.incdtresolution_incdtresolution_id_seq; publicadminfalse8222%00&incdtresolution_incdtresolution_id_seqSEQUENCE OWNED BYcALTER SEQUENCE incdtresolution_incdtresolution_id_seq OWNED BY incdtresolution.incdtresolution_id; publicadminfalse458%00&incdtresolution_incdtresolution_id_seq SEQUENCE SETMSELECT pg_catalog.setval('incdtresolution_incdtresolution_id_seq', 4, true); publicadminfalse458%00&incdtresolution_incdtresolution_id_seqACL$REVOKE ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq FROM admin; GRANT ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq TO admin; GRANT ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq TO xtrole; publicadminfalse45812591685423"incdtseverity_incdtseverity_id_seqSEQUENCECREATE SEQUENCE incdtseverity_incdtseverity_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 9DROP SEQUENCE public.incdtseverity_incdtseverity_id_seq; publicadminfalse8223%00"incdtseverity_incdtseverity_id_seqSEQUENCE OWNED BY[ALTER SEQUENCE incdtseverity_incdtseverity_id_seq OWNED BY incdtseverity.incdtseverity_id; publicadminfalse459%00"incdtseverity_incdtseverity_id_seq SEQUENCE SETISELECT pg_catalog.setval('incdtseverity_incdtseverity_id_seq', 5, true); publicadminfalse459%00"incdtseverity_incdtseverity_id_seqACLREVOKE ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq FROM admin; GRANT ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq TO admin; GRANT ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq TO xtrole; publicadminfalse45912591685425invbal_invbal_id_seqSEQUENCEvCREATE SEQUENCE invbal_invbal_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.invbal_invbal_id_seq; publicadminfalse8150%00invbal_invbal_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE invbal_invbal_id_seq OWNED BY invbal.invbal_id; publicadminfalse460%00invbal_invbal_id_seq SEQUENCE SET<SELECT pg_catalog.setval('invbal_invbal_id_seq', 1, false); publicadminfalse460%00invbal_invbal_id_seqACLREVOKE ALL ON SEQUENCE invbal_invbal_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invbal_invbal_id_seq FROM admin; GRANT ALL ON SEQUENCE invbal_invbal_id_seq TO admin; GRANT ALL ON SEQUENCE invbal_invbal_id_seq TO xtrole; publicadminfalse46012591685427invc_invc_id_seqSEQUENCEzCREATE SEQUENCE invc_invc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 'DROP SEQUENCE public.invc_invc_id_seq; publicadminfalse8%00invc_invc_id_seq SEQUENCE SET8SELECT pg_catalog.setval('invc_invc_id_seq', 1, false); publicadminfalse461%00invc_invc_id_seqACLREVOKE ALL ON SEQUENCE invc_invc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invc_invc_id_seq FROM admin; GRANT ALL ON SEQUENCE invc_invc_id_seq TO admin; GRANT ALL ON SEQUENCE invc_invc_id_seq TO xtrole; publicadminfalse46112591685429invchead_invchead_id_seqSEQUENCEzCREATE SEQUENCE invchead_invchead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.invchead_invchead_id_seq; publicadminfalse8173%00invchead_invchead_id_seqSEQUENCE OWNED BYGALTER SEQUENCE invchead_invchead_id_seq OWNED BY invchead.invchead_id; publicadminfalse462%00invchead_invchead_id_seq SEQUENCE SETASELECT pg_catalog.setval('invchead_invchead_id_seq', 127, true); publicadminfalse462%00invchead_invchead_id_seqACLREVOKE ALL ON SEQUENCE invchead_invchead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invchead_invchead_id_seq FROM admin; GRANT ALL ON SEQUENCE invchead_invchead_id_seq TO admin; GRANT ALL ON SEQUENCE invchead_invchead_id_seq TO xtrole; publicadminfalse46212591685431 invcheadtaxTABLE1CREATE TABLE invcheadtax ( ) INHERITS (taxhist); DROP TABLE public.invcheadtax; publicadminfalse64258253%00 invcheadtaxACLREVOKE ALL ON TABLE invcheadtax FROM PUBLIC; REVOKE ALL ON TABLE invcheadtax FROM admin; GRANT ALL ON TABLE invcheadtax TO admin; GRANT ALL ON TABLE invcheadtax TO xtrole; publicadminfalse46312591685437invcitem_invcitem_id_seqSEQUENCEzCREATE SEQUENCE invcitem_invcitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.invcitem_invcitem_id_seq; publicadminfalse8175%00invcitem_invcitem_id_seqSEQUENCE OWNED BYGALTER SEQUENCE invcitem_invcitem_id_seq OWNED BY invcitem.invcitem_id; publicadminfalse464%00invcitem_invcitem_id_seq SEQUENCE SETASELECT pg_catalog.setval('invcitem_invcitem_id_seq', 153, true); publicadminfalse464%00invcitem_invcitem_id_seqACLREVOKE ALL ON SEQUENCE invcitem_invcitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invcitem_invcitem_id_seq FROM admin; GRANT ALL ON SEQUENCE invcitem_invcitem_id_seq TO admin; GRANT ALL ON SEQUENCE invcitem_invcitem_id_seq TO xtrole; publicadminfalse46412591685439 invcitemtaxTABLE1CREATE TABLE invcitemtax ( ) INHERITS (taxhist); DROP TABLE public.invcitemtax; publicadminfalse64268253%00 invcitemtaxACLREVOKE ALL ON TABLE invcitemtax FROM PUBLIC; REVOKE ALL ON TABLE invcitemtax FROM admin; GRANT ALL ON TABLE invcitemtax TO admin; GRANT ALL ON TABLE invcitemtax TO xtrole; publicadminfalse46512591685452invcnt_invcnt_id_seqSEQUENCE~CREATE SEQUENCE invcnt_invcnt_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.invcnt_invcnt_id_seq; publicadminfalse8%00invcnt_invcnt_id_seq SEQUENCE SET=SELECT pg_catalog.setval('invcnt_invcnt_id_seq', 225, true); publicadminfalse467%00invcnt_invcnt_id_seqACLREVOKE ALL ON SEQUENCE invcnt_invcnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invcnt_invcnt_id_seq FROM admin; GRANT ALL ON SEQUENCE invcnt_invcnt_id_seq TO admin; GRANT ALL ON SEQUENCE invcnt_invcnt_id_seq TO xtrole; publicadminfalse46712591685454 invdetailTABLECREATE TABLE invdetail ( invdetail_id integer DEFAULT nextval(('"invdetail_invdetail_id_seq"'::text)::regclass) NOT NULL, invdetail_transtype character(2), invdetail_invhist_id integer, invdetail_location_id integer, invdetail_qty numeric(18,6), invdetail_comments text, invdetail_qty_before numeric(18,6), invdetail_qty_after numeric(18,6), invdetail_invcitem_id integer, invdetail_expiration date, invdetail_warrpurc date, invdetail_ls_id integer ); DROP TABLE public.invdetail; publicadminfalse64288%00TABLE invdetailCOMMENTCOMMENT ON TABLE invdetail IS 'Detailed Inventory transaction information for Lot/Serial and Multiple Location Control (MLC) Items'; publicadminfalse468%00 invdetailACLREVOKE ALL ON TABLE invdetail FROM PUBLIC; REVOKE ALL ON TABLE invdetail FROM admin; GRANT ALL ON TABLE invdetail TO admin; GRANT ALL ON TABLE invdetail TO xtrole; publicadminfalse46812591685461invdetail_invdetail_id_seqSEQUENCECREATE SEQUENCE invdetail_invdetail_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 1DROP SEQUENCE public.invdetail_invdetail_id_seq; publicadminfalse8%00invdetail_invdetail_id_seq SEQUENCE SETDSELECT pg_catalog.setval('invdetail_invdetail_id_seq', 1629, true); publicadminfalse469%00invdetail_invdetail_id_seqACLREVOKE ALL ON SEQUENCE invdetail_invdetail_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invdetail_invdetail_id_seq FROM admin; GRANT ALL ON SEQUENCE invdetail_invdetail_id_seq TO admin; GRANT ALL ON SEQUENCE invdetail_invdetail_id_seq TO xtrole; publicadminfalse46912591685463invhistTABLE:CREATE TABLE invhist ( invhist_id integer DEFAULT nextval(('invhist_invhist_id_seq'::text)::regclass) NOT NULL, invhist_itemsite_id integer, invhist_transdate timestamp with time zone DEFAULT ('now'::text)::timestamp(6) with time zone, invhist_transtype character(2), invhist_invqty numeric(18,6), invhist_invuom text, invhist_ordnumber text, invhist_docnumber text, invhist_qoh_before numeric(18,6), invhist_qoh_after numeric(18,6), invhist_unitcost numeric(16,6), invhist_acct_id integer, invhist_xfer_warehous_id integer, invhist_comments text, invhist_posted boolean DEFAULT true, invhist_imported boolean, invhist_hasdetail boolean DEFAULT false, invhist_ordtype text, invhist_analyze boolean DEFAULT true, invhist_user text DEFAULT geteffectivextuser(), invhist_created timestamp with time zone DEFAULT now() NOT NULL, invhist_costmethod character(1) NOT NULL, invhist_value_before numeric(12,2) NOT NULL, invhist_value_after numeric(12,2) NOT NULL, invhist_series integer ); DROP TABLE public.invhist; publicadminfalse64296430643164326433643464358%00 TABLE invhistCOMMENT=COMMENT ON TABLE invhist IS 'Inventory transaction history'; publicadminfalse470%00invhistACLREVOKE ALL ON TABLE invhist FROM PUBLIC; REVOKE ALL ON TABLE invhist FROM admin; GRANT ALL ON TABLE invhist TO admin; GRANT ALL ON TABLE invhist TO xtrole; publicadminfalse47012591685476invhist_invhist_id_seqSEQUENCECREATE SEQUENCE invhist_invhist_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.invhist_invhist_id_seq; publicadminfalse8%00invhist_invhist_id_seq SEQUENCE SET@SELECT pg_catalog.setval('invhist_invhist_id_seq', 4120, true); publicadminfalse471%00invhist_invhist_id_seqACLREVOKE ALL ON SEQUENCE invhist_invhist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invhist_invhist_id_seq FROM admin; GRANT ALL ON SEQUENCE invhist_invhist_id_seq TO admin; GRANT ALL ON SEQUENCE invhist_invhist_id_seq TO xtrole; publicadminfalse47112591685478 invhistexpcatTABLECREATE TABLE invhistexpcat ( invhistexpcat_id integer NOT NULL, invhistexpcat_invhist_id integer NOT NULL, invhistexpcat_expcat_id integer NOT NULL ); !DROP TABLE public.invhistexpcat; publicadminfalse8%00TABLE invhistexpcatCOMMENTCOMMENT ON TABLE invhistexpcat IS 'Track the relationship between an EX transaction in the invhist table and the corresponding Expense Category.'; publicadminfalse472%00 invhistexpcatACLREVOKE ALL ON TABLE invhistexpcat FROM PUBLIC; REVOKE ALL ON TABLE invhistexpcat FROM admin; GRANT ALL ON TABLE invhistexpcat TO admin; GRANT ALL ON TABLE invhistexpcat TO xtrole; publicadminfalse47212591685481"invhistexpcat_invhistexpcat_id_seqSEQUENCECREATE SEQUENCE invhistexpcat_invhistexpcat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 9DROP SEQUENCE public.invhistexpcat_invhistexpcat_id_seq; publicadminfalse8472%00"invhistexpcat_invhistexpcat_id_seqSEQUENCE OWNED BY[ALTER SEQUENCE invhistexpcat_invhistexpcat_id_seq OWNED BY invhistexpcat.invhistexpcat_id; publicadminfalse473%00"invhistexpcat_invhistexpcat_id_seq SEQUENCE SETJSELECT pg_catalog.setval('invhistexpcat_invhistexpcat_id_seq', 1, false); publicadminfalse473%00"invhistexpcat_invhistexpcat_id_seqACLREVOKE ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq FROM admin; GRANT ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq TO admin; GRANT ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq TO xtrole; publicadminfalse473K12592006579 invoiceitemVIEWCREATE VIEW invoiceitem AS SELECT invcitem.invcitem_id, invcitem.invcitem_invchead_id, invcitem.invcitem_linenumber, invcitem.invcitem_item_id, invcitem.invcitem_warehous_id, invcitem.invcitem_custpn, invcitem.invcitem_number, invcitem.invcitem_descrip, invcitem.invcitem_ordered, invcitem.invcitem_billed, invcitem.invcitem_custprice, invcitem.invcitem_price, invcitem.invcitem_notes, invcitem.invcitem_salescat_id, invcitem.invcitem_taxtype_id, invcitem.invcitem_qty_uom_id, invcitem.invcitem_qty_invuomratio, invcitem.invcitem_price_uom_id, invcitem.invcitem_price_invuomratio, invcitem.invcitem_coitem_id, invcitem.invcitem_updateinv, invcitem.invcitem_rev_accnt_id, itemsite.itemsite_id, cohead.cohead_number, COALESCE((invcitem.invcitem_billed * invcitem.invcitem_qty_invuomratio), (0)::numeric) AS qty, COALESCE((invcitem.invcitem_price / invcitem.invcitem_price_invuomratio), (0)::numeric) AS unitprice, COALESCE(round(((invcitem.invcitem_billed * invcitem.invcitem_qty_invuomratio) * (invcitem.invcitem_price / invcitem.invcitem_price_invuomratio)), 2), (0)::numeric) AS extprice, currtobase(invchead.invchead_curr_id, COALESCE(round(((invcitem.invcitem_billed * invcitem.invcitem_qty_invuomratio) * (invcitem.invcitem_price / invcitem.invcitem_price_invuomratio)), 2), (0)::numeric), invchead.invchead_invcdate) AS baseextprice, (SELECT COALESCE(sum(invcitemtax.taxhist_tax), (0)::numeric) AS "coalesce" FROM invcitemtax WHERE (invcitemtax.taxhist_parent_id = invcitem.invcitem_id)) AS tax, ((SELECT COALESCE(sum(shipitem.shipitem_value), (itemcost(itemsite.itemsite_id) * invcitem.invcitem_billed), (0)::numeric) AS "coalesce" FROM shipitem WHERE (shipitem.shipitem_invcitem_id = invcitem.invcitem_id)) / CASE WHEN (invcitem.invcitem_billed <> (0)::numeric) THEN (invcitem.invcitem_billed * invcitem.invcitem_qty_invuomratio) ELSE (1)::numeric END) AS unitcost FROM ((((invcitem JOIN invchead ON ((invchead.invchead_id = invcitem.invcitem_invchead_id))) LEFT JOIN coitem ON ((coitem.coitem_id = invcitem.invcitem_coitem_id))) LEFT JOIN cohead ON ((cohead.cohead_id = coitem.coitem_cohead_id))) LEFT JOIN itemsite ON (((itemsite.itemsite_item_id = invcitem.invcitem_item_id) AND (itemsite.itemsite_warehous_id = invcitem.invcitem_warehous_id)))); DROP VIEW public.invoiceitem; publicadminfalse55398%00VIEW invoiceitemCOMMENTYCOMMENT ON VIEW invoiceitem IS 'Single point for invoice item (invcitem) calculations.'; publicadminfalse843%00 invoiceitemACLREVOKE ALL ON TABLE invoiceitem FROM PUBLIC; REVOKE ALL ON TABLE invoiceitem FROM admin; GRANT ALL ON TABLE invoiceitem TO admin; GRANT ALL ON TABLE invoiceitem TO xtrole; publicadminfalse84312591685496ipsass_ipsass_id_seqSEQUENCEvCREATE SEQUENCE ipsass_ipsass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.ipsass_ipsass_id_seq; publicadminfalse8239%00ipsass_ipsass_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE ipsass_ipsass_id_seq OWNED BY ipsass.ipsass_id; publicadminfalse475%00ipsass_ipsass_id_seq SEQUENCE SET;SELECT pg_catalog.setval('ipsass_ipsass_id_seq', 5, true); publicadminfalse475%00ipsass_ipsass_id_seqACLREVOKE ALL ON SEQUENCE ipsass_ipsass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsass_ipsass_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsass_ipsass_id_seq TO admin; GRANT ALL ON SEQUENCE ipsass_ipsass_id_seq TO xtrole; publicadminfalse47512591685498ipsctyp_ipsctyp_id_seqSEQUENCExCREATE SEQUENCE ipsctyp_ipsctyp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.ipsctyp_ipsctyp_id_seq; publicadminfalse8%00ipsctyp_ipsctyp_id_seq SEQUENCE SET>SELECT pg_catalog.setval('ipsctyp_ipsctyp_id_seq', 16, true); publicadminfalse476%00ipsctyp_ipsctyp_id_seqACLREVOKE ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq TO admin; GRANT ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq TO xtrole; publicadminfalse47612591685500ipscust_ipscust_id_seqSEQUENCExCREATE SEQUENCE ipscust_ipscust_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.ipscust_ipscust_id_seq; publicadminfalse8%00ipscust_ipscust_id_seq SEQUENCE SET>SELECT pg_catalog.setval('ipscust_ipscust_id_seq', 21, true); publicadminfalse477%00ipscust_ipscust_id_seqACLREVOKE ALL ON SEQUENCE ipscust_ipscust_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipscust_ipscust_id_seq FROM admin; GRANT ALL ON SEQUENCE ipscust_ipscust_id_seq TO admin; GRANT ALL ON SEQUENCE ipscust_ipscust_id_seq TO xtrole; publicadminfalse47712591685502ipsfreight_ipsfreight_id_seqSEQUENCE~CREATE SEQUENCE ipsfreight_ipsfreight_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 3DROP SEQUENCE public.ipsfreight_ipsfreight_id_seq; publicadminfalse8218%00ipsfreight_ipsfreight_id_seqSEQUENCE OWNED BYOALTER SEQUENCE ipsfreight_ipsfreight_id_seq OWNED BY ipsfreight.ipsfreight_id; publicadminfalse478%00ipsfreight_ipsfreight_id_seq SEQUENCE SETCSELECT pg_catalog.setval('ipsfreight_ipsfreight_id_seq', 4, true); publicadminfalse478%00ipsfreight_ipsfreight_id_seqACLREVOKE ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq TO admin; GRANT ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq TO xtrole; publicadminfalse47812591685504ipshead_ipshead_id_seqSEQUENCExCREATE SEQUENCE ipshead_ipshead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.ipshead_ipshead_id_seq; publicadminfalse8%00ipshead_ipshead_id_seq SEQUENCE SET>SELECT pg_catalog.setval('ipshead_ipshead_id_seq', 65, true); publicadminfalse479%00ipshead_ipshead_id_seqACLREVOKE ALL ON SEQUENCE ipshead_ipshead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipshead_ipshead_id_seq FROM admin; GRANT ALL ON SEQUENCE ipshead_ipshead_id_seq TO admin; GRANT ALL ON SEQUENCE ipshead_ipshead_id_seq TO xtrole; publicadminfalse47912591685511ipsitem_ipsitem_id_seqSEQUENCExCREATE SEQUENCE ipsitem_ipsitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.ipsitem_ipsitem_id_seq; publicadminfalse8%00ipsitem_ipsitem_id_seq SEQUENCE SET>SELECT pg_catalog.setval('ipsitem_ipsitem_id_seq', 78, true); publicadminfalse480%00ipsitem_ipsitem_id_seqACLREVOKE ALL ON SEQUENCE ipsitem_ipsitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsitem_ipsitem_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsitem_ipsitem_id_seq TO admin; GRANT ALL ON SEQUENCE ipsitem_ipsitem_id_seq TO xtrole; publicadminfalse48012591685513ipsitemchar_ipsitemchar_id_seqSEQUENCECREATE SEQUENCE ipsitemchar_ipsitemchar_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.ipsitemchar_ipsitemchar_id_seq; publicadminfalse2428%00ipsitemchar_ipsitemchar_id_seqSEQUENCE OWNED BYSALTER SEQUENCE ipsitemchar_ipsitemchar_id_seq OWNED BY ipsitemchar.ipsitemchar_id; publicadminfalse481%00ipsitemchar_ipsitemchar_id_seq SEQUENCE SETFSELECT pg_catalog.setval('ipsitemchar_ipsitemchar_id_seq', 1, false); publicadminfalse481%00ipsitemchar_ipsitemchar_id_seqACLREVOKE ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq TO admin; GRANT ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq TO xtrole; publicadminfalse481L12592006584ipspriceVIEW CREATE VIEW ipsprice AS SELECT ipsiteminfo.ipsitem_id AS ipsprice_id, 'I' AS ipsprice_source, ipsiteminfo.ipsitem_ipshead_id AS ipsprice_ipshead_id, ipsiteminfo.ipsitem_item_id AS ipsprice_item_id, itemuomtouom(ipsiteminfo.ipsitem_item_id, ipsiteminfo.ipsitem_qty_uom_id, NULL::integer, ipsiteminfo.ipsitem_qtybreak) AS ipsprice_qtybreak, CASE WHEN (ipsiteminfo.ipsitem_type = 'N'::bpchar) THEN ((ipsiteminfo.ipsitem_price * itemuomtouomratio(ipsiteminfo.ipsitem_item_id, NULL::integer, ipsiteminfo.ipsitem_price_uom_id)) * iteminvpricerat(ipsiteminfo.ipsitem_item_id)) WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN ((item.item_listprice - (item.item_listprice * ipsiteminfo.ipsitem_discntprcnt)) - ipsiteminfo.ipsitem_fixedamtdiscount) WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN ((item.item_listcost + (item.item_listcost * ipsiteminfo.ipsitem_discntprcnt)) + ipsiteminfo.ipsitem_fixedamtdiscount) ELSE NULL::numeric END AS ipsprice_price, ipsiteminfo.ipsitem_qtybreak AS ipsprice_uomqtybreak, ipsiteminfo.ipsitem_qty_uom_id AS ipsprice_uomqtybreak_uom_id, CASE WHEN (ipsiteminfo.ipsitem_type = 'N'::bpchar) THEN ipsiteminfo.ipsitem_price WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN ((item.item_listprice - (item.item_listprice * ipsiteminfo.ipsitem_discntprcnt)) - ipsiteminfo.ipsitem_fixedamtdiscount) WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN ((item.item_listcost + (item.item_listcost * ipsiteminfo.ipsitem_discntprcnt)) + ipsiteminfo.ipsitem_fixedamtdiscount) ELSE NULL::numeric END AS ipsprice_uomprice, ipsiteminfo.ipsitem_price_uom_id AS ipsprice_uomprice_uom_id, ipsiteminfo.ipsitem_discntprcnt AS ipsprice_discountpercent, ipsiteminfo.ipsitem_fixedamtdiscount AS ipsprice_discountfixed, ipsiteminfo.ipsitem_type AS ipsprice_type FROM (ipsiteminfo JOIN item ON ((item.item_id = ipsiteminfo.ipsitem_item_id))) UNION SELECT ipsiteminfo.ipsitem_id AS ipsprice_id, 'P' AS ipsprice_source, ipsiteminfo.ipsitem_ipshead_id AS ipsprice_ipshead_id, item.item_id AS ipsprice_item_id, ipsiteminfo.ipsitem_qtybreak AS ipsprice_qtybreak, CASE WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN ((item.item_listprice - (item.item_listprice * ipsiteminfo.ipsitem_discntprcnt)) - ipsiteminfo.ipsitem_fixedamtdiscount) WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN ((item.item_listcost + (item.item_listcost * ipsiteminfo.ipsitem_discntprcnt)) + ipsiteminfo.ipsitem_fixedamtdiscount) ELSE NULL::numeric END AS ipsprice_price, ipsiteminfo.ipsitem_qtybreak AS ipsprice_uomqtybreak, item.item_inv_uom_id AS ipsprice_uomqtybreak_uom_id, CASE WHEN (ipsiteminfo.ipsitem_type = 'D'::bpchar) THEN ((item.item_listprice - (item.item_listprice * ipsiteminfo.ipsitem_discntprcnt)) - ipsiteminfo.ipsitem_fixedamtdiscount) WHEN (ipsiteminfo.ipsitem_type = 'M'::bpchar) THEN ((item.item_listcost + (item.item_listcost * ipsiteminfo.ipsitem_discntprcnt)) + ipsiteminfo.ipsitem_fixedamtdiscount) ELSE NULL::numeric END AS ipsprice_uomprice, item.item_price_uom_id AS ipsprice_uomprice_uom_id, ipsiteminfo.ipsitem_discntprcnt AS ipsprice_discountpercent, ipsiteminfo.ipsitem_fixedamtdiscount AS ipsprice_discountfixed, ipsiteminfo.ipsitem_type AS ipsprice_type FROM (ipsiteminfo JOIN item ON ((ipsiteminfo.ipsitem_prodcat_id = item.item_prodcat_id))); DROP VIEW public.ipsprice; publicadminfalse55408%00ipspriceACLREVOKE ALL ON TABLE ipsprice FROM PUBLIC; REVOKE ALL ON TABLE ipsprice FROM admin; GRANT ALL ON TABLE ipsprice TO admin; GRANT ALL ON TABLE ipsprice TO xtrole; publicadminfalse84412591684210ipsprodcat_bakTABLEDCREATE TABLE ipsprodcat_bak ( ipsprodcat_id integer NOT NULL, ipsprodcat_ipshead_id integer NOT NULL, ipsprodcat_prodcat_id integer NOT NULL, ipsprodcat_qtybreak numeric(18,6) NOT NULL, ipsprodcat_discntprcnt numeric(10,6) NOT NULL, ipsprodcat_fixedamtdiscount numeric(16,4) DEFAULT 0.00 NOT NULL ); "DROP TABLE public.ipsprodcat_bak; publicadminfalse61198%00TABLE ipsprodcat_bakCOMMENTUCOMMENT ON TABLE ipsprodcat_bak IS 'Pricing Schedule Product Category information.'; publicadminfalse241%00ipsprodcat_bakACLREVOKE ALL ON TABLE ipsprodcat_bak FROM PUBLIC; REVOKE ALL ON TABLE ipsprodcat_bak FROM admin; GRANT ALL ON TABLE ipsprodcat_bak TO admin; GRANT ALL ON TABLE ipsprodcat_bak TO xtrole; publicadminfalse24112591685520ipsprodcat_ipsprodcat_id_seqSEQUENCE~CREATE SEQUENCE ipsprodcat_ipsprodcat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 3DROP SEQUENCE public.ipsprodcat_ipsprodcat_id_seq; publicadminfalse8241%00ipsprodcat_ipsprodcat_id_seqSEQUENCE OWNED BYSALTER SEQUENCE ipsprodcat_ipsprodcat_id_seq OWNED BY ipsprodcat_bak.ipsprodcat_id; publicadminfalse482%00ipsprodcat_ipsprodcat_id_seq SEQUENCE SETDSELECT pg_catalog.setval('ipsprodcat_ipsprodcat_id_seq', 1, false); publicadminfalse482%00ipsprodcat_ipsprodcat_id_seqACLREVOKE ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq FROM admin; GRANT ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq TO admin; GRANT ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq TO xtrole; publicadminfalse48212591685522item_item_id_seqSEQUENCEzCREATE SEQUENCE item_item_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 'DROP SEQUENCE public.item_item_id_seq; publicadminfalse8%00item_item_id_seq SEQUENCE SET9SELECT pg_catalog.setval('item_item_id_seq', 345, true); publicadminfalse483%00item_item_id_seqACLREVOKE ALL ON SEQUENCE item_item_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE item_item_id_seq FROM admin; GRANT ALL ON SEQUENCE item_item_id_seq TO admin; GRANT ALL ON SEQUENCE item_item_id_seq TO xtrole; publicadminfalse48312591685524itemalias_itemalias_id_seqSEQUENCECREATE SEQUENCE itemalias_itemalias_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 1DROP SEQUENCE public.itemalias_itemalias_id_seq; publicadminfalse8%00itemalias_itemalias_id_seq SEQUENCE SETBSELECT pg_catalog.setval('itemalias_itemalias_id_seq', 15, true); publicadminfalse484%00itemalias_itemalias_id_seqACLREVOKE ALL ON SEQUENCE itemalias_itemalias_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemalias_itemalias_id_seq FROM admin; GRANT ALL ON SEQUENCE itemalias_itemalias_id_seq TO admin; GRANT ALL ON SEQUENCE itemalias_itemalias_id_seq TO xtrole; publicadminfalse48412591685526itematr_itematr_id_seqSEQUENCECREATE SEQUENCE itematr_itematr_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.itematr_itematr_id_seq; publicadminfalse8%00itematr_itematr_id_seq SEQUENCE SET>SELECT pg_catalog.setval('itematr_itematr_id_seq', 29, true); publicadminfalse485%00itematr_itematr_id_seqACLREVOKE ALL ON SEQUENCE itematr_itematr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itematr_itematr_id_seq FROM admin; GRANT ALL ON SEQUENCE itematr_itematr_id_seq TO admin; GRANT ALL ON SEQUENCE itematr_itematr_id_seq TO xtrole; publicadminfalse48512591685528itemcost_itemcost_id_seqSEQUENCECREATE SEQUENCE itemcost_itemcost_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.itemcost_itemcost_id_seq; publicadminfalse8%00itemcost_itemcost_id_seq SEQUENCE SETASELECT pg_catalog.setval('itemcost_itemcost_id_seq', 429, true); publicadminfalse486%00itemcost_itemcost_id_seqACLREVOKE ALL ON SEQUENCE itemcost_itemcost_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemcost_itemcost_id_seq FROM admin; GRANT ALL ON SEQUENCE itemcost_itemcost_id_seq TO admin; GRANT ALL ON SEQUENCE itemcost_itemcost_id_seq TO xtrole; publicadminfalse48612591685530itemfrez_itemfrez_seqSEQUENCECREATE SEQUENCE itemfrez_itemfrez_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; ,DROP SEQUENCE public.itemfrez_itemfrez_seq; publicadminfalse8%00itemfrez_itemfrez_seq SEQUENCE SET=SELECT pg_catalog.setval('itemfrez_itemfrez_seq', 1, false); publicadminfalse487%00itemfrez_itemfrez_seqACLREVOKE ALL ON SEQUENCE itemfrez_itemfrez_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemfrez_itemfrez_seq FROM admin; GRANT ALL ON SEQUENCE itemfrez_itemfrez_seq TO admin; GRANT ALL ON SEQUENCE itemfrez_itemfrez_seq TO xtrole; publicadminfalse48712591685532itemgrpTABLECREATE TABLE itemgrp ( itemgrp_id integer DEFAULT nextval(('"itemgrp_itemgrp_id_seq"'::text)::regclass) NOT NULL, itemgrp_name text NOT NULL, itemgrp_descrip text, CONSTRAINT itemgrp_itemgrp_name_check CHECK ((itemgrp_name <> ''::text)) ); DROP TABLE public.itemgrp; publicadminfalse644064418%00 TABLE itemgrpCOMMENT6COMMENT ON TABLE itemgrp IS 'Item Group information'; publicadminfalse488%00itemgrpACLREVOKE ALL ON TABLE itemgrp FROM PUBLIC; REVOKE ALL ON TABLE itemgrp FROM admin; GRANT ALL ON TABLE itemgrp TO admin; GRANT ALL ON TABLE itemgrp TO xtrole; publicadminfalse48812591685539itemgrp_itemgrp_id_seqSEQUENCECREATE SEQUENCE itemgrp_itemgrp_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.itemgrp_itemgrp_id_seq; publicadminfalse8%00itemgrp_itemgrp_id_seq SEQUENCE SET>SELECT pg_catalog.setval('itemgrp_itemgrp_id_seq', 24, true); publicadminfalse489%00itemgrp_itemgrp_id_seqACLREVOKE ALL ON SEQUENCE itemgrp_itemgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemgrp_itemgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE itemgrp_itemgrp_id_seq TO admin; GRANT ALL ON SEQUENCE itemgrp_itemgrp_id_seq TO xtrole; publicadminfalse48912591685541 itemgrpitemTABLECREATE TABLE itemgrpitem ( itemgrpitem_id integer DEFAULT nextval(('"itemgrpitem_itemgrpitem_id_seq"'::text)::regclass) NOT NULL, itemgrpitem_itemgrp_id integer, itemgrpitem_item_id integer ); DROP TABLE public.itemgrpitem; publicadminfalse64428%00TABLE itemgrpitemCOMMENT?COMMENT ON TABLE itemgrpitem IS 'Item Group Item information'; publicadminfalse490%00 itemgrpitemACLREVOKE ALL ON TABLE itemgrpitem FROM PUBLIC; REVOKE ALL ON TABLE itemgrpitem FROM admin; GRANT ALL ON TABLE itemgrpitem TO admin; GRANT ALL ON TABLE itemgrpitem TO xtrole; publicadminfalse49012591685545itemgrpitem_itemgrpitem_id_seqSEQUENCECREATE SEQUENCE itemgrpitem_itemgrpitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 5DROP SEQUENCE public.itemgrpitem_itemgrpitem_id_seq; publicadminfalse8%00itemgrpitem_itemgrpitem_id_seq SEQUENCE SETGSELECT pg_catalog.setval('itemgrpitem_itemgrpitem_id_seq', 143, true); publicadminfalse491%00itemgrpitem_itemgrpitem_id_seqACLREVOKE ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq FROM admin; GRANT ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq TO admin; GRANT ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq TO xtrole; publicadminfalse49112591685547 itemimageVIEWCREATE VIEW itemimage AS SELECT imageass.imageass_id AS itemimage_id, imageass.imageass_source_id AS itemimage_item_id, imageass.imageass_image_id AS itemimage_image_id, imageass.imageass_purpose AS itemimage_purpose FROM imageass WHERE (imageass.imageass_source = 'I'::text); DROP VIEW public.itemimage; publicadminfalse51398%00VIEW itemimageCOMMENTCOMMENT ON VIEW itemimage IS 'Itemimage view for legacy support. Use of itemimage is deprecated. Use imageass table for future development'; publicadminfalse492%00 itemimageACLREVOKE ALL ON TABLE itemimage FROM PUBLIC; REVOKE ALL ON TABLE itemimage FROM admin; GRANT ALL ON TABLE itemimage TO admin; GRANT ALL ON TABLE itemimage TO xtrole; publicadminfalse49212591685551itemimage_itemimage_id_seqSEQUENCE|CREATE SEQUENCE itemimage_itemimage_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.itemimage_itemimage_id_seq; publicadminfalse8%00itemimage_itemimage_id_seq SEQUENCE SETBSELECT pg_catalog.setval('itemimage_itemimage_id_seq', 29, true); publicadminfalse493%00itemimage_itemimage_id_seqACLREVOKE ALL ON SEQUENCE itemimage_itemimage_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemimage_itemimage_id_seq FROM admin; GRANT ALL ON SEQUENCE itemimage_itemimage_id_seq TO admin; GRANT ALL ON SEQUENCE itemimage_itemimage_id_seq TO xtrole; publicadminfalse49312591685553itemlocTABLEpCREATE TABLE itemloc ( itemloc_id integer DEFAULT nextval(('"itemloc_itemloc_id_seq"'::text)::regclass) NOT NULL, itemloc_itemsite_id integer NOT NULL, itemloc_location_id integer NOT NULL, itemloc_qty numeric(18,6) NOT NULL, itemloc_expiration date NOT NULL, itemloc_consolflag boolean, itemloc_ls_id integer, itemloc_warrpurc date ); DROP TABLE public.itemloc; publicadminfalse64438%00 TABLE itemlocCOMMENTvCOMMENT ON TABLE itemloc IS 'Detailed Location information for Lot/Serial and Multiple Location Control (MLC) Items'; publicadminfalse494%00itemlocACLREVOKE ALL ON TABLE itemloc FROM PUBLIC; REVOKE ALL ON TABLE itemloc FROM admin; GRANT ALL ON TABLE itemloc TO admin; GRANT ALL ON TABLE itemloc TO xtrole; publicadminfalse49412591685557itemloc_itemloc_id_seqSEQUENCExCREATE SEQUENCE itemloc_itemloc_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.itemloc_itemloc_id_seq; publicadminfalse8%00itemloc_itemloc_id_seq SEQUENCE SET?SELECT pg_catalog.setval('itemloc_itemloc_id_seq', 667, true); publicadminfalse495%00itemloc_itemloc_id_seqACLREVOKE ALL ON SEQUENCE itemloc_itemloc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemloc_itemloc_id_seq FROM admin; GRANT ALL ON SEQUENCE itemloc_itemloc_id_seq TO admin; GRANT ALL ON SEQUENCE itemloc_itemloc_id_seq TO xtrole; publicadminfalse49512591685559itemloc_series_seqSEQUENCE|CREATE SEQUENCE itemloc_series_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; )DROP SEQUENCE public.itemloc_series_seq; publicadminfalse8%00itemloc_series_seq SEQUENCE SET<SELECT pg_catalog.setval('itemloc_series_seq', 1660, true); publicadminfalse496%00itemloc_series_seqACLREVOKE ALL ON SEQUENCE itemloc_series_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemloc_series_seq FROM admin; GRANT ALL ON SEQUENCE itemloc_series_seq TO admin; GRANT ALL ON SEQUENCE itemloc_series_seq TO xtrole; publicadminfalse49612591685561 itemlocdistTABLECREATE TABLE itemlocdist ( itemlocdist_id integer DEFAULT nextval(('"itemlocdist_itemlocdist_id_seq"'::text)::regclass) NOT NULL, itemlocdist_itemlocdist_id integer, itemlocdist_source_type character(1), itemlocdist_source_id integer, itemlocdist_qty numeric(18,6), itemlocdist_series integer, itemlocdist_invhist_id integer, itemlocdist_itemsite_id integer, itemlocdist_reqlotserial boolean DEFAULT false, itemlocdist_flush boolean DEFAULT false, itemlocdist_expiration date, itemlocdist_distlotserial boolean, itemlocdist_warranty date, itemlocdist_ls_id integer, itemlocdist_order_type text, itemlocdist_order_id integer ); DROP TABLE public.itemlocdist; publicadminfalse6444644564468%00TABLE itemlocdistCOMMENTCOMMENT ON TABLE itemlocdist IS 'Temporary table for storing information about Inventory distributions involving Lot/Serial and Multiple Location Control (MLC) Items'; publicadminfalse497%00 itemlocdistACLREVOKE ALL ON TABLE itemlocdist FROM PUBLIC; REVOKE ALL ON TABLE itemlocdist FROM admin; GRANT ALL ON TABLE itemlocdist TO admin; GRANT ALL ON TABLE itemlocdist TO xtrole; publicadminfalse49712591685570itemlocdist_itemlocdist_id_seqSEQUENCECREATE SEQUENCE itemlocdist_itemlocdist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.itemlocdist_itemlocdist_id_seq; publicadminfalse8%00itemlocdist_itemlocdist_id_seq SEQUENCE SETHSELECT pg_catalog.setval('itemlocdist_itemlocdist_id_seq', 2614, true); publicadminfalse498%00itemlocdist_itemlocdist_id_seqACLREVOKE ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq FROM admin; GRANT ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq TO admin; GRANT ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq TO xtrole; publicadminfalse49812591685572 itemlocpostTABLECREATE TABLE itemlocpost ( itemlocpost_id integer NOT NULL, itemlocpost_itemlocseries integer, itemlocpost_glseq integer ); DROP TABLE public.itemlocpost; publicadminfalse8%00TABLE itemlocpostCOMMENTCOMMENT ON TABLE itemlocpost IS 'Temporary table for storing information about Inventory distribution G/L postings involving Lot/Serial and Multiple Location Control (MLC) Items'; publicadminfalse499%00 itemlocpostACLREVOKE ALL ON TABLE itemlocpost FROM PUBLIC; REVOKE ALL ON TABLE itemlocpost FROM admin; GRANT ALL ON TABLE itemlocpost TO admin; GRANT ALL ON TABLE itemlocpost TO xtrole; publicadminfalse49912591685575itemlocpost_itemlocpost_id_seqSEQUENCECREATE SEQUENCE itemlocpost_itemlocpost_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.itemlocpost_itemlocpost_id_seq; publicadminfalse8499%00itemlocpost_itemlocpost_id_seqSEQUENCE OWNED BYSALTER SEQUENCE itemlocpost_itemlocpost_id_seq OWNED BY itemlocpost.itemlocpost_id; publicadminfalse500%00itemlocpost_itemlocpost_id_seq SEQUENCE SETGSELECT pg_catalog.setval('itemlocpost_itemlocpost_id_seq', 277, true); publicadminfalse500%00itemlocpost_itemlocpost_id_seqACLREVOKE ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq FROM admin; GRANT ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq TO admin; GRANT ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq TO xtrole; publicadminfalse50012591685577itemopn_itemopn_id_seqSEQUENCECREATE SEQUENCE itemopn_itemopn_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.itemopn_itemopn_id_seq; publicadminfalse8%00itemopn_itemopn_id_seq SEQUENCE SET>SELECT pg_catalog.setval('itemopn_itemopn_id_seq', 39, true); publicadminfalse501%00itemopn_itemopn_id_seqACLREVOKE ALL ON SEQUENCE itemopn_itemopn_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemopn_itemopn_id_seq FROM admin; GRANT ALL ON SEQUENCE itemopn_itemopn_id_seq TO admin; GRANT ALL ON SEQUENCE itemopn_itemopn_id_seq TO xtrole; publicadminfalse50112591685579itemsite_itemsite_id_seqSEQUENCECREATE SEQUENCE itemsite_itemsite_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.itemsite_itemsite_id_seq; publicadminfalse8%00itemsite_itemsite_id_seq SEQUENCE SETASELECT pg_catalog.setval('itemsite_itemsite_id_seq', 385, true); publicadminfalse502%00itemsite_itemsite_id_seqACLREVOKE ALL ON SEQUENCE itemsite_itemsite_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemsite_itemsite_id_seq FROM admin; GRANT ALL ON SEQUENCE itemsite_itemsite_id_seq TO admin; GRANT ALL ON SEQUENCE itemsite_itemsite_id_seq TO xtrole; publicadminfalse50212591685581itemsrc_itemsrc_id_seqSEQUENCECREATE SEQUENCE itemsrc_itemsrc_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.itemsrc_itemsrc_id_seq; publicadminfalse8%00itemsrc_itemsrc_id_seq SEQUENCE SET?SELECT pg_catalog.setval('itemsrc_itemsrc_id_seq', 107, true); publicadminfalse503%00itemsrc_itemsrc_id_seqACLREVOKE ALL ON SEQUENCE itemsrc_itemsrc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemsrc_itemsrc_id_seq FROM admin; GRANT ALL ON SEQUENCE itemsrc_itemsrc_id_seq TO admin; GRANT ALL ON SEQUENCE itemsrc_itemsrc_id_seq TO xtrole; publicadminfalse50312591685583itemsrcp_itemsrcp_id_seqSEQUENCECREATE SEQUENCE itemsrcp_itemsrcp_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.itemsrcp_itemsrcp_id_seq; publicadminfalse8%00itemsrcp_itemsrcp_id_seq SEQUENCE SETASELECT pg_catalog.setval('itemsrcp_itemsrcp_id_seq', 105, true); publicadminfalse504%00itemsrcp_itemsrcp_id_seqACLREVOKE ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq FROM admin; GRANT ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq TO admin; GRANT ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq TO xtrole; publicadminfalse50412591685585itemsub_itemsub_id_seqSEQUENCECREATE SEQUENCE itemsub_itemsub_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.itemsub_itemsub_id_seq; publicadminfalse8%00itemsub_itemsub_id_seq SEQUENCE SET>SELECT pg_catalog.setval('itemsub_itemsub_id_seq', 18, true); publicadminfalse505%00itemsub_itemsub_id_seqACLREVOKE ALL ON SEQUENCE itemsub_itemsub_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemsub_itemsub_id_seq FROM admin; GRANT ALL ON SEQUENCE itemsub_itemsub_id_seq TO admin; GRANT ALL ON SEQUENCE itemsub_itemsub_id_seq TO xtrole; publicadminfalse50512591685587itemtax_itemtax_id_seqSEQUENCExCREATE SEQUENCE itemtax_itemtax_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.itemtax_itemtax_id_seq; publicadminfalse8235%00itemtax_itemtax_id_seqSEQUENCE OWNED BYCALTER SEQUENCE itemtax_itemtax_id_seq OWNED BY itemtax.itemtax_id; publicadminfalse506%00itemtax_itemtax_id_seq SEQUENCE SET=SELECT pg_catalog.setval('itemtax_itemtax_id_seq', 9, true); publicadminfalse506%00itemtax_itemtax_id_seqACLREVOKE ALL ON SEQUENCE itemtax_itemtax_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemtax_itemtax_id_seq FROM admin; GRANT ALL ON SEQUENCE itemtax_itemtax_id_seq TO admin; GRANT ALL ON SEQUENCE itemtax_itemtax_id_seq TO xtrole; publicadminfalse50612591685589 itemtransTABLECREATE TABLE itemtrans ( itemtrans_id integer NOT NULL, itemtrans_source_item_id integer, itemtrans_target_item_id integer ); DROP TABLE public.itemtrans; publicadminfalse8%00TABLE itemtransCOMMENTACOMMENT ON TABLE itemtrans IS 'Item Transformation information'; publicadminfalse507%00 itemtransACLREVOKE ALL ON TABLE itemtrans FROM PUBLIC; REVOKE ALL ON TABLE itemtrans FROM admin; GRANT ALL ON TABLE itemtrans TO admin; GRANT ALL ON TABLE itemtrans TO xtrole; publicadminfalse50712591685592itemtrans_itemtrans_id_seqSEQUENCE|CREATE SEQUENCE itemtrans_itemtrans_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.itemtrans_itemtrans_id_seq; publicadminfalse8507%00itemtrans_itemtrans_id_seqSEQUENCE OWNED BYKALTER SEQUENCE itemtrans_itemtrans_id_seq OWNED BY itemtrans.itemtrans_id; publicadminfalse508%00itemtrans_itemtrans_id_seq SEQUENCE SETASELECT pg_catalog.setval('itemtrans_itemtrans_id_seq', 2, true); publicadminfalse508%00itemtrans_itemtrans_id_seqACLREVOKE ALL ON SEQUENCE itemtrans_itemtrans_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemtrans_itemtrans_id_seq FROM admin; GRANT ALL ON SEQUENCE itemtrans_itemtrans_id_seq TO admin; GRANT ALL ON SEQUENCE itemtrans_itemtrans_id_seq TO xtrole; publicadminfalse50812591685594itemuomTABLECREATE TABLE itemuom ( itemuom_id integer NOT NULL, itemuom_itemuomconv_id integer NOT NULL, itemuom_uomtype_id integer NOT NULL ); DROP TABLE public.itemuom; publicadminfalse8%00 TABLE itemuomCOMMENTNCOMMENT ON TABLE itemuom IS 'A UOM type relation for a specific conversion.'; publicadminfalse509%00itemuomACLREVOKE ALL ON TABLE itemuom FROM PUBLIC; REVOKE ALL ON TABLE itemuom FROM admin; GRANT ALL ON TABLE itemuom TO admin; GRANT ALL ON TABLE itemuom TO xtrole; publicadminfalse50912591685597itemuom_itemuom_id_seqSEQUENCExCREATE SEQUENCE itemuom_itemuom_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.itemuom_itemuom_id_seq; publicadminfalse8509%00itemuom_itemuom_id_seqSEQUENCE OWNED BYCALTER SEQUENCE itemuom_itemuom_id_seq OWNED BY itemuom.itemuom_id; publicadminfalse510%00itemuom_itemuom_id_seq SEQUENCE SET=SELECT pg_catalog.setval('itemuom_itemuom_id_seq', 2, true); publicadminfalse510%00itemuom_itemuom_id_seqACLREVOKE ALL ON SEQUENCE itemuom_itemuom_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemuom_itemuom_id_seq FROM admin; GRANT ALL ON SEQUENCE itemuom_itemuom_id_seq TO admin; GRANT ALL ON SEQUENCE itemuom_itemuom_id_seq TO xtrole; publicadminfalse51012591685599itemuomconv_itemuomconv_id_seqSEQUENCECREATE SEQUENCE itemuomconv_itemuomconv_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.itemuomconv_itemuomconv_id_seq; publicadminfalse8236%00itemuomconv_itemuomconv_id_seqSEQUENCE OWNED BYSALTER SEQUENCE itemuomconv_itemuomconv_id_seq OWNED BY itemuomconv.itemuomconv_id; publicadminfalse511&00itemuomconv_itemuomconv_id_seq SEQUENCE SETESELECT pg_catalog.setval('itemuomconv_itemuomconv_id_seq', 2, true); publicadminfalse511&00itemuomconv_itemuomconv_id_seqACLREVOKE ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq FROM admin; GRANT ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq TO admin; GRANT ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq TO xtrole; publicadminfalse51112591685601journal_number_seqSEQUENCEtCREATE SEQUENCE journal_number_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.journal_number_seq; publicadminfalse8&00journal_number_seq SEQUENCE SET<SELECT pg_catalog.setval('journal_number_seq', 6964, true); publicadminfalse512&00journal_number_seqACLREVOKE ALL ON SEQUENCE journal_number_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE journal_number_seq FROM admin; GRANT ALL ON SEQUENCE journal_number_seq TO admin; GRANT ALL ON SEQUENCE journal_number_seq TO xtrole; publicadminfalse51212591685603jrnluseTABLECREATE TABLE jrnluse ( jrnluse_id integer DEFAULT nextval(('"jrnluse_jrnluse_id_seq"'::text)::regclass) NOT NULL, jrnluse_date timestamp without time zone, jrnluse_number integer, jrnluse_use text ); DROP TABLE public.jrnluse; publicadminfalse64508&00 TABLE jrnluseCOMMENTACOMMENT ON TABLE jrnluse IS 'Journal entry and use information'; publicadminfalse513&00jrnluseACLREVOKE ALL ON TABLE jrnluse FROM PUBLIC; REVOKE ALL ON TABLE jrnluse FROM admin; GRANT ALL ON TABLE jrnluse TO admin; GRANT ALL ON TABLE jrnluse TO xtrole; publicadminfalse51312591685610jrnluse_jrnluse_id_seqSEQUENCExCREATE SEQUENCE jrnluse_jrnluse_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.jrnluse_jrnluse_id_seq; publicadminfalse8&00jrnluse_jrnluse_id_seq SEQUENCE SET@SELECT pg_catalog.setval('jrnluse_jrnluse_id_seq', 4975, true); publicadminfalse514&00jrnluse_jrnluse_id_seqACLREVOKE ALL ON SEQUENCE jrnluse_jrnluse_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE jrnluse_jrnluse_id_seq FROM admin; GRANT ALL ON SEQUENCE jrnluse_jrnluse_id_seq TO admin; GRANT ALL ON SEQUENCE jrnluse_jrnluse_id_seq TO xtrole; publicadminfalse51412591685612labeldefTABLECREATE TABLE labeldef ( labeldef_id integer NOT NULL, labeldef_name text NOT NULL, labeldef_papersize text NOT NULL, labeldef_columns integer NOT NULL, labeldef_rows integer NOT NULL, labeldef_width integer NOT NULL, labeldef_height integer NOT NULL, labeldef_start_offset_x integer NOT NULL, labeldef_start_offset_y integer NOT NULL, labeldef_horizontal_gap integer NOT NULL, labeldef_vertical_gap integer NOT NULL ); DROP TABLE public.labeldef; publicadminfalse8&00labeldefACLREVOKE ALL ON TABLE labeldef FROM PUBLIC; REVOKE ALL ON TABLE labeldef FROM admin; GRANT ALL ON TABLE labeldef TO admin; GRANT ALL ON TABLE labeldef TO xtrole; publicadminfalse51512591685618labeldef_labeldef_id_seqSEQUENCEzCREATE SEQUENCE labeldef_labeldef_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.labeldef_labeldef_id_seq; publicadminfalse8515 &00labeldef_labeldef_id_seqSEQUENCE OWNED BYGALTER SEQUENCE labeldef_labeldef_id_seq OWNED BY labeldef.labeldef_id; publicadminfalse516 &00labeldef_labeldef_id_seq SEQUENCE SET?SELECT pg_catalog.setval('labeldef_labeldef_id_seq', 4, true); publicadminfalse516 &00labeldef_labeldef_id_seqACLREVOKE ALL ON SEQUENCE labeldef_labeldef_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE labeldef_labeldef_id_seq FROM admin; GRANT ALL ON SEQUENCE labeldef_labeldef_id_seq TO admin; GRANT ALL ON SEQUENCE labeldef_labeldef_id_seq TO xtrole; publicadminfalse51612591685620 labelformTABLEVCREATE TABLE labelform ( labelform_id integer DEFAULT nextval(('"labelform_labelform_id_seq"'::text)::regclass) NOT NULL, labelform_name text NOT NULL, labelform_report_id integer, labelform_perpage integer, labelform_report_name text, CONSTRAINT labelform_labelform_name_check CHECK ((labelform_name <> ''::text)) ); DROP TABLE public.labelform; publicadminfalse645264538 &00TABLE labelformCOMMENT8COMMENT ON TABLE labelform IS 'Label Form information'; publicadminfalse517 &00$COLUMN labelform.labelform_report_idCOMMENTkCOMMENT ON COLUMN labelform.labelform_report_id IS 'Obsolete -- reference labelform_report_name instead.'; publicadminfalse517&00 labelformACLREVOKE ALL ON TABLE labelform FROM PUBLIC; REVOKE ALL ON TABLE labelform FROM admin; GRANT ALL ON TABLE labelform TO admin; GRANT ALL ON TABLE labelform TO xtrole; publicadminfalse51712591685627labelform_labelform_id_seqSEQUENCE|CREATE SEQUENCE labelform_labelform_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.labelform_labelform_id_seq; publicadminfalse8&00labelform_labelform_id_seq SEQUENCE SETASELECT pg_catalog.setval('labelform_labelform_id_seq', 6, true); publicadminfalse518&00labelform_labelform_id_seqACLREVOKE ALL ON SEQUENCE labelform_labelform_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE labelform_labelform_id_seq FROM admin; GRANT ALL ON SEQUENCE labelform_labelform_id_seq TO admin; GRANT ALL ON SEQUENCE labelform_labelform_id_seq TO xtrole; publicadminfalse51812591685629langTABLECREATE TABLE lang ( lang_id integer NOT NULL, lang_qt_number integer, lang_abbr3 text, lang_abbr2 text, lang_name text NOT NULL ); DROP TABLE public.lang; publicadminfalse8&00 TABLE langCOMMENTCOMMENT ON TABLE lang IS 'Table mapping ISO 639-1 and 639-2 language codes to Qt''s enum QLocale::Language integer values. See http://www.loc.gov/standards/iso639-2/php/code_list.php and the QLocale documentation..'; publicadminfalse519&00COLUMN lang.lang_abbr3COMMENTCOMMENT ON COLUMN lang.lang_abbr3 IS 'ISO 639-2 code for language. Where there is a choice between bibliographic (B) and terminology (T) usage, this value is the T code'; publicadminfalse519&00COLUMN lang.lang_abbr2COMMENTDCOMMENT ON COLUMN lang.lang_abbr2 IS 'ISO 639-1 code for language'; publicadminfalse519&00COLUMN lang.lang_nameCOMMENThCOMMENT ON COLUMN lang.lang_name IS 'Name of a human language, taken from the ISO 639-2 documentation'; publicadminfalse519&00langACLREVOKE ALL ON TABLE lang FROM PUBLIC; REVOKE ALL ON TABLE lang FROM admin; GRANT ALL ON TABLE lang TO admin; GRANT ALL ON TABLE lang TO xtrole; publicadminfalse51912591685635lang_lang_id_seqSEQUENCErCREATE SEQUENCE lang_lang_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.lang_lang_id_seq; publicadminfalse8519&00lang_lang_id_seqSEQUENCE OWNED BY7ALTER SEQUENCE lang_lang_id_seq OWNED BY lang.lang_id; publicadminfalse520&00lang_lang_id_seq SEQUENCE SET9SELECT pg_catalog.setval('lang_lang_id_seq', 499, true); publicadminfalse520&00lang_lang_id_seqACLREVOKE ALL ON SEQUENCE lang_lang_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE lang_lang_id_seq FROM admin; GRANT ALL ON SEQUENCE lang_lang_id_seq TO admin; GRANT ALL ON SEQUENCE lang_lang_id_seq TO xtrole; publicadminfalse520 12591685637localeTABLECREATE TABLE locale ( locale_id integer DEFAULT nextval(('locale_locale_id_seq'::text)::regclass) NOT NULL, locale_code text NOT NULL, locale_descrip text, locale_lang_file text, locale_dateformat text, locale_currformat text, locale_qtyformat text, locale_comments text, locale_qtyperformat text, locale_salespriceformat text, locale_extpriceformat text, locale_timeformat text, locale_timestampformat text, local_costformat text, locale_costformat text, locale_purchpriceformat text, locale_uomratioformat text, locale_intervalformat text, locale_lang_id integer, locale_country_id integer, locale_error_color text, locale_warning_color text, locale_emphasis_color text, locale_altemphasis_color text, locale_expired_color text, locale_future_color text, locale_curr_scale integer, locale_salesprice_scale integer, locale_purchprice_scale integer, locale_extprice_scale integer, locale_cost_scale integer, locale_qty_scale integer, locale_qtyper_scale integer, locale_uomratio_scale integer, locale_percent_scale integer DEFAULT 2, locale_weight_scale integer DEFAULT 2 NOT NULL, CONSTRAINT locale_locale_code_check CHECK ((locale_code <> ''::text)) ); DROP TABLE public.locale; publicadminfalse64556456645764588&00 TABLE localeCOMMENT5COMMENT ON TABLE locale IS 'The locale table holds information required to show data to the user in a localized format. Colors are either names documented by the WWW Consortium or RGB colors. Format for RGB colors is #RGB, #RRGGBB, or #RRRGGGBBB, where the letters R, G, and B stand for hexidecimal digits.'; publicadminfalse521&00COLUMN locale.locale_lang_fileCOMMENT;COMMENT ON COLUMN locale.locale_lang_file IS 'Deprecated'; publicadminfalse521&00COLUMN locale.locale_dateformatCOMMENT<COMMENT ON COLUMN locale.locale_dateformat IS 'Deprecated'; publicadminfalse521&00COLUMN locale.locale_currformatCOMMENT<COMMENT ON COLUMN locale.locale_currformat IS 'Deprecated'; publicadminfalse521&00COLUMN locale.locale_qtyformatCOMMENT;COMMENT ON COLUMN locale.locale_qtyformat IS 'Deprecated'; publicadminfalse521&00!COLUMN locale.locale_qtyperformatCOMMENT>COMMENT ON COLUMN locale.locale_qtyperformat IS 'Deprecated'; publicadminfalse521&00%COLUMN locale.locale_salespriceformatCOMMENTBCOMMENT ON COLUMN locale.locale_salespriceformat IS 'Deprecated'; publicadminfalse521 &00#COLUMN locale.locale_extpriceformatCOMMENT@COMMENT ON COLUMN locale.locale_extpriceformat IS 'Deprecated'; publicadminfalse521!&00COLUMN locale.locale_timeformatCOMMENT<COMMENT ON COLUMN locale.locale_timeformat IS 'Deprecated'; publicadminfalse521"&00$COLUMN locale.locale_timestampformatCOMMENTACOMMENT ON COLUMN locale.locale_timestampformat IS 'Deprecated'; publicadminfalse521#&00COLUMN locale.local_costformatCOMMENT;COMMENT ON COLUMN locale.local_costformat IS 'Deprecated'; publicadminfalse521$&00COLUMN locale.locale_costformatCOMMENT<COMMENT ON COLUMN locale.locale_costformat IS 'Deprecated'; publicadminfalse521%&00%COLUMN locale.locale_purchpriceformatCOMMENTBCOMMENT ON COLUMN locale.locale_purchpriceformat IS 'Deprecated'; publicadminfalse521&&00#COLUMN locale.locale_uomratioformatCOMMENT@COMMENT ON COLUMN locale.locale_uomratioformat IS 'Deprecated'; publicadminfalse521'&00#COLUMN locale.locale_intervalformatCOMMENT@COMMENT ON COLUMN locale.locale_intervalformat IS 'Deprecated'; publicadminfalse521(&00 COLUMN locale.locale_error_colorCOMMENTnCOMMENT ON COLUMN locale.locale_error_color IS 'Color to use to mark data that require immediate attention.'; publicadminfalse521)&00"COLUMN locale.locale_warning_colorCOMMENTkCOMMENT ON COLUMN locale.locale_warning_color IS 'Color to use to mark data that require attention soon.'; publicadminfalse521*&00#COLUMN locale.locale_emphasis_colorCOMMENT|COMMENT ON COLUMN locale.locale_emphasis_color IS 'Color to use to mark data that need to stand out but are not in error.'; publicadminfalse521+&00&COLUMN locale.locale_altemphasis_colorCOMMENTCOMMENT ON COLUMN locale.locale_altemphasis_color IS 'Color to use to mark data that need to stand out and be differentiated from other emphasized data.'; publicadminfalse521,&00"COLUMN locale.locale_expired_colorCOMMENTjCOMMENT ON COLUMN locale.locale_expired_color IS 'Color to use to mark data that are no longer current.'; publicadminfalse521-&00!COLUMN locale.locale_future_colorCOMMENTCOMMENT ON COLUMN locale.locale_future_color IS 'Color to use to mark data that will not be effective until some point in the future.'; publicadminfalse521.&00COLUMN locale.locale_curr_scaleCOMMENTsCOMMENT ON COLUMN locale.locale_curr_scale IS 'Number of decimal places to show when displaying Currency values.'; publicadminfalse521/&00%COLUMN locale.locale_salesprice_scaleCOMMENTvCOMMENT ON COLUMN locale.locale_salesprice_scale IS 'Number of decimal places to show when displaying Sales Prices.'; publicadminfalse5210&00%COLUMN locale.locale_purchprice_scaleCOMMENTyCOMMENT ON COLUMN locale.locale_purchprice_scale IS 'Number of decimal places to show when displaying Purchase Prices.'; publicadminfalse5211&00#COLUMN locale.locale_extprice_scaleCOMMENTwCOMMENT ON COLUMN locale.locale_extprice_scale IS 'Number of decimal places to show when displaying Extended Prices.'; publicadminfalse5212&00COLUMN locale.locale_cost_scaleCOMMENTiCOMMENT ON COLUMN locale.locale_cost_scale IS 'Number of decimal places to show when displaying Costs.'; publicadminfalse5213&00COLUMN locale.locale_qty_scaleCOMMENTmCOMMENT ON COLUMN locale.locale_qty_scale IS 'Number of decimal places to show when displaying Quantities.'; publicadminfalse5214&00!COLUMN locale.locale_qtyper_scaleCOMMENTtCOMMENT ON COLUMN locale.locale_qtyper_scale IS 'Number of decimal places to show when displaying Quantities Per.'; publicadminfalse5215&00#COLUMN locale.locale_uomratio_scaleCOMMENTrCOMMENT ON COLUMN locale.locale_uomratio_scale IS 'Number of decimal places to show when displaying UOM Ratios.'; publicadminfalse5216&00localeACLREVOKE ALL ON TABLE locale FROM PUBLIC; REVOKE ALL ON TABLE locale FROM admin; GRANT ALL ON TABLE locale TO admin; GRANT ALL ON TABLE locale TO xtrole; publicadminfalse521 12591685646locale_locale_id_seqSEQUENCE~CREATE SEQUENCE locale_locale_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.locale_locale_id_seq; publicadminfalse87&00locale_locale_id_seq SEQUENCE SET<SELECT pg_catalog.setval('locale_locale_id_seq', 30, true); publicadminfalse5228&00locale_locale_id_seqACLREVOKE ALL ON SEQUENCE locale_locale_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE locale_locale_id_seq FROM admin; GRANT ALL ON SEQUENCE locale_locale_id_seq TO admin; GRANT ALL ON SEQUENCE locale_locale_id_seq TO xtrole; publicadminfalse522 12591685648location_location_id_seqSEQUENCECREATE SEQUENCE location_location_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.location_location_id_seq; publicadminfalse89&00location_location_id_seq SEQUENCE SETASELECT pg_catalog.setval('location_location_id_seq', 131, true); publicadminfalse523:&00location_location_id_seqACLREVOKE ALL ON SEQUENCE location_location_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE location_location_id_seq FROM admin; GRANT ALL ON SEQUENCE location_location_id_seq TO admin; GRANT ALL ON SEQUENCE location_location_id_seq TO xtrole; publicadminfalse523 12591685650locitemTABLECREATE TABLE locitem ( locitem_id integer DEFAULT nextval(('"locitem_locitem_id_seq"'::text)::regclass) NOT NULL, locitem_location_id integer, locitem_item_id integer ); DROP TABLE public.locitem; publicadminfalse64598;&00 TABLE locitemCOMMENTYCOMMENT ON TABLE locitem IS 'Restricted Warehouse Location Allowable Items information'; publicadminfalse524<&00locitemACLREVOKE ALL ON TABLE locitem FROM PUBLIC; REVOKE ALL ON TABLE locitem FROM admin; GRANT ALL ON TABLE locitem TO admin; GRANT ALL ON TABLE locitem TO xtrole; publicadminfalse524 12591685654locitem_locitem_id_seqSEQUENCECREATE SEQUENCE locitem_locitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.locitem_locitem_id_seq; publicadminfalse8=&00locitem_locitem_id_seq SEQUENCE SET>SELECT pg_catalog.setval('locitem_locitem_id_seq', 25, true); publicadminfalse525>&00locitem_locitem_id_seqACLREVOKE ALL ON SEQUENCE locitem_locitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE locitem_locitem_id_seq FROM admin; GRANT ALL ON SEQUENCE locitem_locitem_id_seq TO admin; GRANT ALL ON SEQUENCE locitem_locitem_id_seq TO xtrole; publicadminfalse52512591685656log_log_id_seqSEQUENCExCREATE SEQUENCE log_log_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; %DROP SEQUENCE public.log_log_id_seq; publicadminfalse8?&00log_log_id_seq SEQUENCE SET7SELECT pg_catalog.setval('log_log_id_seq', 747, true); publicadminfalse526@&00log_log_id_seqACLREVOKE ALL ON SEQUENCE log_log_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE log_log_id_seq FROM admin; GRANT ALL ON SEQUENCE log_log_id_seq TO admin; GRANT ALL ON SEQUENCE log_log_id_seq TO xtrole; publicadminfalse52612591685658metricTABLE CREATE TABLE metric ( metric_id integer DEFAULT nextval(('metric_metric_id_seq'::text)::regclass) NOT NULL, metric_name text NOT NULL, metric_value text, metric_module text, CONSTRAINT metric_metric_name_check CHECK ((metric_name <> ''::text)) ); DROP TABLE public.metric; publicadminfalse646064618A&00 TABLE metricCOMMENTDCOMMENT ON TABLE metric IS 'Application-wide settings information'; publicadminfalse527B&00metricACLREVOKE ALL ON TABLE metric FROM PUBLIC; REVOKE ALL ON TABLE metric FROM admin; GRANT ALL ON TABLE metric TO admin; GRANT ALL ON TABLE metric TO xtrole; publicadminfalse52712591685665metric_metric_id_seqSEQUENCE~CREATE SEQUENCE metric_metric_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.metric_metric_id_seq; publicadminfalse8C&00metric_metric_id_seq SEQUENCE SET=SELECT pg_catalog.setval('metric_metric_id_seq', 296, true); publicadminfalse528D&00metric_metric_id_seqACLREVOKE ALL ON SEQUENCE metric_metric_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE metric_metric_id_seq FROM admin; GRANT ALL ON SEQUENCE metric_metric_id_seq TO admin; GRANT ALL ON SEQUENCE metric_metric_id_seq TO xtrole; publicadminfalse52812591685667 metricencTABLECREATE TABLE metricenc ( metricenc_id integer NOT NULL, metricenc_name text NOT NULL, metricenc_value bytea, metricenc_module text, CONSTRAINT metricenc_metricenc_name_check CHECK ((metricenc_name <> ''::text)) ); DROP TABLE public.metricenc; publicadminfalse64638E&00TABLE metricencCOMMENTVCOMMENT ON TABLE metricenc IS 'Application-wide settings information encrypted data'; publicadminfalse529F&00 metricencACLREVOKE ALL ON TABLE metricenc FROM PUBLIC; REVOKE ALL ON TABLE metricenc FROM admin; GRANT ALL ON TABLE metricenc TO admin; GRANT ALL ON TABLE metricenc TO xtrole; publicadminfalse52912591685673metricenc_metricenc_id_seqSEQUENCE|CREATE SEQUENCE metricenc_metricenc_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.metricenc_metricenc_id_seq; publicadminfalse8529G&00metricenc_metricenc_id_seqSEQUENCE OWNED BYKALTER SEQUENCE metricenc_metricenc_id_seq OWNED BY metricenc.metricenc_id; publicadminfalse530H&00metricenc_metricenc_id_seq SEQUENCE SETBSELECT pg_catalog.setval('metricenc_metricenc_id_seq', 11, true); publicadminfalse530I&00metricenc_metricenc_id_seqACLREVOKE ALL ON SEQUENCE metricenc_metricenc_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE metricenc_metricenc_id_seq FROM admin; GRANT ALL ON SEQUENCE metricenc_metricenc_id_seq TO admin; GRANT ALL ON SEQUENCE metricenc_metricenc_id_seq TO xtrole; publicadminfalse53012591685675misc_index_seqSEQUENCExCREATE SEQUENCE misc_index_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; %DROP SEQUENCE public.misc_index_seq; publicadminfalse8J&00misc_index_seq SEQUENCE SET8SELECT pg_catalog.setval('misc_index_seq', 2236, true); publicadminfalse531K&00misc_index_seqACLREVOKE ALL ON SEQUENCE misc_index_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE misc_index_seq FROM admin; GRANT ALL ON SEQUENCE misc_index_seq TO admin; GRANT ALL ON SEQUENCE misc_index_seq TO xtrole; publicadminfalse53112591685677mrghistTABLECREATE TABLE mrghist ( mrghist_cntct_id integer NOT NULL, mrghist_table text NOT NULL, mrghist_pkey_col text NOT NULL, mrghist_pkey_id integer NOT NULL, mrghist_cntct_col text NOT NULL ); DROP TABLE public.mrghist; publicadminfalse8L&00mrghistACLREVOKE ALL ON TABLE mrghist FROM PUBLIC; REVOKE ALL ON TABLE mrghist FROM admin; GRANT ALL ON TABLE mrghist TO admin; GRANT ALL ON TABLE mrghist TO xtrole; publicadminfalse53212591685683mrgundoTABLECREATE TABLE mrgundo ( mrgundo_base_schema text, mrgundo_base_table text, mrgundo_base_id integer, mrgundo_schema text, mrgundo_table text, mrgundo_pkey_col text, mrgundo_pkey_id integer, mrgundo_col text, mrgundo_value text, mrgundo_type text ); DROP TABLE public.mrgundo; publicadminfalse8M&00 TABLE mrgundoCOMMENT COMMENT ON TABLE mrgundo IS 'This table keeps track of the original values of changes made while merging two records. It is a generalization of mrghist and trgthist, which are specific to merging contacts. The schema, table, and pkey_id columns uniquely identify the record that was changed while the _base_ columns identify the merge target. The _base_ columns are required to allow finding all of the records that pertain to a particular merge (e.g. find changes to the comment table that pertain to a crmacct merge).'; publicadminfalse533N&00"COLUMN mrgundo.mrgundo_base_schemaCOMMENTbCOMMENT ON COLUMN mrgundo.mrgundo_base_schema IS 'The schema in which the merge target resides.'; publicadminfalse533O&00!COLUMN mrgundo.mrgundo_base_tableCOMMENT`COMMENT ON COLUMN mrgundo.mrgundo_base_table IS 'The table in which the merge target resides.'; publicadminfalse533P&00COLUMN mrgundo.mrgundo_base_idCOMMENT\COMMENT ON COLUMN mrgundo.mrgundo_base_id IS 'The internal id of the merge target record.'; publicadminfalse533Q&00COLUMN mrgundo.mrgundo_schemaCOMMENTkCOMMENT ON COLUMN mrgundo.mrgundo_schema IS 'The name of the schema in which the modified table resides.'; publicadminfalse533R&00COLUMN mrgundo.mrgundo_tableCOMMENTfCOMMENT ON COLUMN mrgundo.mrgundo_table IS 'The name of the table that was modified during a merge.'; publicadminfalse533S&00COLUMN mrgundo.mrgundo_pkey_colCOMMENTCOMMENT ON COLUMN mrgundo.mrgundo_pkey_col IS 'The name of the primary key column in the modified table. This could be derived during the undo processing but it is simpler just to store it during the merge.'; publicadminfalse533T&00COLUMN mrgundo.mrgundo_pkey_idCOMMENTXCOMMENT ON COLUMN mrgundo.mrgundo_pkey_id IS 'The primary key of the modified record.'; publicadminfalse533U&00COLUMN mrgundo.mrgundo_colCOMMENTJCOMMENT ON COLUMN mrgundo.mrgundo_col IS 'The column that was modified.'; publicadminfalse533V&00COLUMN mrgundo.mrgundo_valueCOMMENTYCOMMENT ON COLUMN mrgundo.mrgundo_value IS 'The value of the column before the change.'; publicadminfalse533W&00COLUMN mrgundo.mrgundo_typeCOMMENTCOMMENT ON COLUMN mrgundo.mrgundo_type IS 'The data type of the modified column. This could be derived during the undo processing but it is simpler just to store it during the merge.'; publicadminfalse533X&00mrgundoACLREVOKE ALL ON TABLE mrgundo FROM PUBLIC; REVOKE ALL ON TABLE mrgundo FROM admin; GRANT ALL ON TABLE mrgundo TO admin; GRANT ALL ON TABLE mrgundo TO xtrole; publicadminfalse53312591685689msgTABLECREATE TABLE msg ( msg_id integer DEFAULT nextval(('"msg_msg_id_seq"'::text)::regclass) NOT NULL, msg_posted timestamp with time zone, msg_scheduled timestamp with time zone, msg_text text, msg_expires timestamp with time zone, msg_username text ); DROP TABLE public.msg; publicadminfalse64648Y&00 TABLE msgCOMMENT6COMMENT ON TABLE msg IS 'System Message information'; publicadminfalse534Z&00msgACLREVOKE ALL ON TABLE msg FROM PUBLIC; REVOKE ALL ON TABLE msg FROM admin; GRANT ALL ON TABLE msg TO admin; GRANT ALL ON TABLE msg TO xtrole; publicadminfalse53412591685696msg_msg_id_seqSEQUENCExCREATE SEQUENCE msg_msg_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; %DROP SEQUENCE public.msg_msg_id_seq; publicadminfalse8[&00msg_msg_id_seq SEQUENCE SET6SELECT pg_catalog.setval('msg_msg_id_seq', 29, true); publicadminfalse535\&00msg_msg_id_seqACLREVOKE ALL ON SEQUENCE msg_msg_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE msg_msg_id_seq FROM admin; GRANT ALL ON SEQUENCE msg_msg_id_seq TO admin; GRANT ALL ON SEQUENCE msg_msg_id_seq TO xtrole; publicadminfalse53512591685698msguserTABLECREATE TABLE msguser ( msguser_id integer DEFAULT nextval(('"msguser_msguser_id_seq"'::text)::regclass) NOT NULL, msguser_msg_id integer, msguser_viewed timestamp with time zone, msguser_username text ); DROP TABLE public.msguser; publicadminfalse64658]&00 TABLE msguserCOMMENT?COMMENT ON TABLE msguser IS 'System Message user information'; publicadminfalse536^&00msguserACLREVOKE ALL ON TABLE msguser FROM PUBLIC; REVOKE ALL ON TABLE msguser FROM admin; GRANT ALL ON TABLE msguser TO admin; GRANT ALL ON TABLE msguser TO xtrole; publicadminfalse53612591685705msguser_msguser_id_seqSEQUENCECREATE SEQUENCE msguser_msguser_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.msguser_msguser_id_seq; publicadminfalse8_&00msguser_msguser_id_seq SEQUENCE SET>SELECT pg_catalog.setval('msguser_msguser_id_seq', 25, true); publicadminfalse537`&00msguser_msguser_id_seqACLREVOKE ALL ON SEQUENCE msguser_msguser_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE msguser_msguser_id_seq FROM admin; GRANT ALL ON SEQUENCE msguser_msguser_id_seq TO admin; GRANT ALL ON SEQUENCE msguser_msguser_id_seq TO xtrole; publicadminfalse53712591685707nvend_nvend_id_seqSEQUENCE|CREATE SEQUENCE nvend_nvend_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; )DROP SEQUENCE public.nvend_nvend_id_seq; publicadminfalse8a&00nvend_nvend_id_seq SEQUENCE SET:SELECT pg_catalog.setval('nvend_nvend_id_seq', 1, false); publicadminfalse538b&00nvend_nvend_id_seqACLREVOKE ALL ON SEQUENCE nvend_nvend_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE nvend_nvend_id_seq FROM admin; GRANT ALL ON SEQUENCE nvend_nvend_id_seq TO admin; GRANT ALL ON SEQUENCE nvend_nvend_id_seq TO xtrole; publicadminfalse53812591685709 obsolete_taxTABLECREATE TABLE obsolete_tax ( tax_id integer DEFAULT nextval(('"tax_tax_id_seq"'::text)::regclass) NOT NULL, tax_code text, tax_descrip text, tax_ratea numeric(8,4), tax_sales_accnt_id integer, tax_freight boolean DEFAULT false NOT NULL, tax_cumulative boolean DEFAULT false NOT NULL, tax_rateb numeric(8,4), tax_salesb_accnt_id integer, tax_ratec numeric(8,4), tax_salesc_accnt_id integer ); DROP TABLE public.obsolete_tax; publicadminfalse6466646764688c&00TABLE obsolete_taxCOMMENTOCOMMENT ON TABLE obsolete_tax IS 'Tax information. Obsolete table structure.'; publicadminfalse539d&00COLUMN obsolete_tax.tax_freightCOMMENTCOMMENT ON COLUMN obsolete_tax.tax_freight IS 'Deprecated in 2.1 and moved to taxsel table where taxtype is the system defined Freight.'; publicadminfalse539e&00 obsolete_taxACLREVOKE ALL ON TABLE obsolete_tax FROM PUBLIC; REVOKE ALL ON TABLE obsolete_tax FROM admin; GRANT ALL ON TABLE obsolete_tax TO admin; GRANT ALL ON TABLE obsolete_tax TO xtrole; publicadminfalse53912591685718ophead_ophead_id_seqSEQUENCEvCREATE SEQUENCE ophead_ophead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.ophead_ophead_id_seq; publicadminfalse8181f&00ophead_ophead_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE ophead_ophead_id_seq OWNED BY ophead.ophead_id; publicadminfalse540g&00ophead_ophead_id_seq SEQUENCE SET;SELECT pg_catalog.setval('ophead_ophead_id_seq', 4, true); publicadminfalse540h&00ophead_ophead_id_seqACLREVOKE ALL ON SEQUENCE ophead_ophead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE ophead_ophead_id_seq FROM admin; GRANT ALL ON SEQUENCE ophead_ophead_id_seq TO admin; GRANT ALL ON SEQUENCE ophead_ophead_id_seq TO xtrole; publicadminfalse54012591685720opsourceTABLECREATE TABLE opsource ( opsource_id integer NOT NULL, opsource_name text NOT NULL, opsource_descrip text, CONSTRAINT opsource_opsource_name_check CHECK ((opsource_name <> ''::text)) ); DROP TABLE public.opsource; publicadminfalse64708i&00TABLE opsourceCOMMENT@COMMENT ON TABLE opsource IS 'Opportunity Lead Source values.'; publicadminfalse541j&00opsourceACLREVOKE ALL ON TABLE opsource FROM PUBLIC; REVOKE ALL ON TABLE opsource FROM admin; GRANT ALL ON TABLE opsource TO admin; GRANT ALL ON TABLE opsource TO xtrole; publicadminfalse54112591685726opsource_opsource_id_seqSEQUENCEzCREATE SEQUENCE opsource_opsource_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.opsource_opsource_id_seq; publicadminfalse5418k&00opsource_opsource_id_seqSEQUENCE OWNED BYGALTER SEQUENCE opsource_opsource_id_seq OWNED BY opsource.opsource_id; publicadminfalse542l&00opsource_opsource_id_seq SEQUENCE SET?SELECT pg_catalog.setval('opsource_opsource_id_seq', 3, true); publicadminfalse542m&00opsource_opsource_id_seqACLREVOKE ALL ON SEQUENCE opsource_opsource_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE opsource_opsource_id_seq FROM admin; GRANT ALL ON SEQUENCE opsource_opsource_id_seq TO admin; GRANT ALL ON SEQUENCE opsource_opsource_id_seq TO xtrole; publicadminfalse54212591685728opstageTABLECREATE TABLE opstage ( opstage_id integer NOT NULL, opstage_name text NOT NULL, opstage_descrip text, opstage_order integer DEFAULT 0 NOT NULL, opstage_opinactive boolean DEFAULT false, CONSTRAINT opstage_opstage_name_check CHECK ((opstage_name <> ''::text)) ); DROP TABLE public.opstage; publicadminfalse6472647364748n&00 TABLE opstageCOMMENT9COMMENT ON TABLE opstage IS 'Opportunity stage values.'; publicadminfalse543o&00opstageACLREVOKE ALL ON TABLE opstage FROM PUBLIC; REVOKE ALL ON TABLE opstage FROM admin; GRANT ALL ON TABLE opstage TO admin; GRANT ALL ON TABLE opstage TO xtrole; publicadminfalse543 12591685736opstage_opstage_id_seqSEQUENCExCREATE SEQUENCE opstage_opstage_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.opstage_opstage_id_seq; publicadminfalse8543p&00opstage_opstage_id_seqSEQUENCE OWNED BYCALTER SEQUENCE opstage_opstage_id_seq OWNED BY opstage.opstage_id; publicadminfalse544q&00opstage_opstage_id_seq SEQUENCE SET=SELECT pg_catalog.setval('opstage_opstage_id_seq', 4, true); publicadminfalse544r&00opstage_opstage_id_seqACLREVOKE ALL ON SEQUENCE opstage_opstage_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE opstage_opstage_id_seq FROM admin; GRANT ALL ON SEQUENCE opstage_opstage_id_seq TO admin; GRANT ALL ON SEQUENCE opstage_opstage_id_seq TO xtrole; publicadminfalse544!12591685738optypeTABLECREATE TABLE optype ( optype_id integer NOT NULL, optype_name text NOT NULL, optype_descrip text, CONSTRAINT optype_optype_name_check CHECK ((optype_name <> ''::text)) ); DROP TABLE public.optype; publicadminfalse64768s&00 TABLE optypeCOMMENT7COMMENT ON TABLE optype IS 'Opportunity Type values.'; publicadminfalse545t&00optypeACLREVOKE ALL ON TABLE optype FROM PUBLIC; REVOKE ALL ON TABLE optype FROM admin; GRANT ALL ON TABLE optype TO admin; GRANT ALL ON TABLE optype TO xtrole; publicadminfalse545"12591685744optype_optype_id_seqSEQUENCEvCREATE SEQUENCE optype_optype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.optype_optype_id_seq; publicadminfalse8545u&00optype_optype_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE optype_optype_id_seq OWNED BY optype.optype_id; publicadminfalse546v&00optype_optype_id_seq SEQUENCE SET;SELECT pg_catalog.setval('optype_optype_id_seq', 3, true); publicadminfalse546w&00optype_optype_id_seqACLREVOKE ALL ON SEQUENCE optype_optype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE optype_optype_id_seq FROM admin; GRANT ALL ON SEQUENCE optype_optype_id_seq TO admin; GRANT ALL ON SEQUENCE optype_optype_id_seq TO xtrole; publicadminfalse546M12592006589 orderheadVIEWCREATE VIEW orderhead AS SELECT DISTINCT data.orderhead_id, data.orderhead_type, data.orderhead_number, data.orderhead_status, data.orderhead_orderdate, data.orderhead_linecount, data.orderhead_from_id, data.orderhead_from, data.orderhead_to_id, data.orderhead_to, data.orderhead_curr_id, data.orderhead_agent_username, data.orderhead_shipvia FROM (SELECT pohead.pohead_id AS orderhead_id, 'PO'::text AS orderhead_type, pohead.pohead_number AS orderhead_number, pohead.pohead_status AS orderhead_status, pohead.pohead_orderdate AS orderhead_orderdate, (SELECT count(*) AS count FROM poitem WHERE (poitem.poitem_pohead_id = pohead.pohead_id)) AS orderhead_linecount, pohead.pohead_vend_id AS orderhead_from_id, vendinfo.vend_name AS orderhead_from, NULL::integer AS orderhead_to_id, ''::text AS orderhead_to, pohead.pohead_curr_id AS orderhead_curr_id, pohead.pohead_agent_username AS orderhead_agent_username, pohead.pohead_shipvia AS orderhead_shipvia FROM (pohead LEFT JOIN vendinfo ON ((pohead.pohead_vend_id = vendinfo.vend_id))) UNION ALL SELECT cohead.cohead_id AS orderhead_id, 'SO'::text AS orderhead_type, cohead.cohead_number AS orderhead_number, cohead.cohead_status AS orderhead_status, cohead.cohead_orderdate AS orderhead_orderdate, (SELECT count(*) AS count FROM coitem WHERE (coitem.coitem_cohead_id = cohead.cohead_id)) AS orderhead_linecount, NULL::unknown AS orderhead_from_id, ''::text AS orderhead_from, cohead.cohead_cust_id AS orderhead_to_id, CASE WHEN (length(cohead.cohead_shiptoname) > 0) THEN cohead.cohead_shiptoname ELSE cohead.cohead_billtoname END AS orderhead_to, cohead.cohead_curr_id AS orderhead_curr_id, ''::text AS orderhead_agent_username, cohead.cohead_shipvia AS orderhead_shipvia FROM cohead) data; DROP VIEW public.orderhead; publicadminfalse55418x&00VIEW orderheadCOMMENTCOMMENT ON VIEW orderhead IS 'Union of all orders for use by widgets and stored procedures which process multiple types of order'; publicadminfalse845y&00 orderheadACLREVOKE ALL ON TABLE orderhead FROM PUBLIC; REVOKE ALL ON TABLE orderhead FROM admin; GRANT ALL ON TABLE orderhead TO admin; GRANT ALL ON TABLE orderhead TO xtrole; publicadminfalse845N12592006594 orderitemVIEW CREATE VIEW orderitem AS (SELECT poitem.poitem_id AS orderitem_id, 'PO' AS orderitem_orderhead_type, poitem.poitem_pohead_id AS orderitem_orderhead_id, poitem.poitem_linenumber AS orderitem_linenumber, poitem.poitem_status AS orderitem_status, poitem.poitem_itemsite_id AS orderitem_itemsite_id, poitem.poitem_duedate AS orderitem_scheddate, poitem.poitem_qty_ordered AS orderitem_qty_ordered, poitem.poitem_qty_returned AS orderitem_qty_shipped, poitem.poitem_qty_received AS orderitem_qty_received, uom.uom_id AS orderitem_qty_uom_id, poitem.poitem_invvenduomratio AS orderitem_qty_invuomratio, poitem.poitem_unitprice AS orderitem_unitcost, pohead.pohead_curr_id AS orderitem_unitcost_curr_id, poitem.poitem_freight AS orderitem_freight, poitem.poitem_freight_received AS orderitem_freight_received, pohead.pohead_curr_id AS orderitem_freight_curr_id FROM ((poitem LEFT JOIN pohead ON ((poitem.poitem_pohead_id = pohead.pohead_id))) LEFT JOIN uom ON ((uom.uom_name = poitem.poitem_vend_uom))) UNION ALL SELECT coitem.coitem_id AS orderitem_id, 'SO' AS orderitem_orderhead_type, coitem.coitem_cohead_id AS orderitem_orderhead_id, coitem.coitem_linenumber AS orderitem_linenumber, coitem.coitem_status AS orderitem_status, coitem.coitem_itemsite_id AS orderitem_itemsite_id, coitem.coitem_scheddate AS orderitem_scheddate, coitem.coitem_qtyord AS orderitem_qty_ordered, coitem.coitem_qtyshipped AS orderitem_qty_shipped, coitem.coitem_qtyreturned AS orderitem_qty_received, coitem.coitem_qty_uom_id AS orderitem_qty_uom_id, coitem.coitem_qty_invuomratio AS orderitem_qty_invuomratio, coitem.coitem_unitcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL::unknown AS orderitem_freight, NULL::unknown AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM coitem) UNION ALL SELECT quitem.quitem_id AS orderitem_id, 'QU' AS orderitem_orderhead_type, quitem.quitem_quhead_id AS orderitem_orderhead_id, quitem.quitem_linenumber AS orderitem_linenumber, 'O' AS orderitem_status, quitem.quitem_itemsite_id AS orderitem_itemsite_id, quitem.quitem_scheddate AS orderitem_scheddate, quitem.quitem_qtyord AS orderitem_qty_ordered, 0 AS orderitem_qty_shipped, 0 AS orderitem_qty_received, quitem.quitem_qty_uom_id AS orderitem_qty_uom_id, quitem.quitem_qty_invuomratio AS orderitem_qty_invuomratio, quitem.quitem_unitcost AS orderitem_unitcost, basecurrid() AS orderitem_unitcost_curr_id, NULL::unknown AS orderitem_freight, NULL::unknown AS orderitem_freight_received, basecurrid() AS orderitem_freight_curr_id FROM quitem; DROP VIEW public.orderitem; publicadminfalse55428z&00VIEW orderitemCOMMENTCOMMENT ON VIEW orderitem IS 'Union of all order line items for use by widgets and stored procedures which process multiple types of order'; publicadminfalse846{&00 orderitemACLREVOKE ALL ON TABLE orderitem FROM PUBLIC; REVOKE ALL ON TABLE orderitem FROM admin; GRANT ALL ON TABLE orderitem TO admin; GRANT ALL ON TABLE orderitem TO xtrole; publicadminfalse846#12591685756orderseqTABLEZCREATE TABLE orderseq ( orderseq_id integer DEFAULT nextval(('orderseq_orderseq_id_seq'::text)::regclass) NOT NULL, orderseq_name text NOT NULL, orderseq_number integer, orderseq_table text, orderseq_numcol text, orderseq_seqiss seqiss[], CONSTRAINT orderseq_orderseq_name_check CHECK ((orderseq_name <> ''::text)) ); DROP TABLE public.orderseq; publicadminfalse6477647826108|&00TABLE orderseqCOMMENTYCOMMENT ON TABLE orderseq IS 'Configuration information for common numbering sequences'; publicadminfalse547}&00orderseqACLREVOKE ALL ON TABLE orderseq FROM PUBLIC; REVOKE ALL ON TABLE orderseq FROM admin; GRANT ALL ON TABLE orderseq TO admin; GRANT ALL ON TABLE orderseq TO xtrole; publicadminfalse547$12591685763orderseq_orderseq_id_seqSEQUENCECREATE SEQUENCE orderseq_orderseq_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.orderseq_orderseq_id_seq; publicadminfalse8~&00orderseq_orderseq_id_seq SEQUENCE SET@SELECT pg_catalog.setval('orderseq_orderseq_id_seq', 24, true); publicadminfalse548&00orderseq_orderseq_id_seqACLREVOKE ALL ON SEQUENCE orderseq_orderseq_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE orderseq_orderseq_id_seq FROM admin; GRANT ALL ON SEQUENCE orderseq_orderseq_id_seq TO admin; GRANT ALL ON SEQUENCE orderseq_orderseq_id_seq TO xtrole; publicadminfalse548%12591685765packTABLE;CREATE TABLE pack ( pack_id integer NOT NULL, pack_head_id integer NOT NULL, pack_head_type text NOT NULL, pack_shiphead_id integer, pack_printed boolean DEFAULT false NOT NULL, CONSTRAINT pack_pack_head_type_check CHECK (((pack_head_type = 'SO'::text) OR (pack_head_type = 'TO'::text))) ); DROP TABLE public.pack; publicadminfalse648064818&00 TABLE packCOMMENTqCOMMENT ON TABLE pack IS 'Temporary table for storing information about Orders added to the Packing List Batch'; publicadminfalse549&00packACLREVOKE ALL ON TABLE pack FROM PUBLIC; REVOKE ALL ON TABLE pack FROM admin; GRANT ALL ON TABLE pack TO admin; GRANT ALL ON TABLE pack TO xtrole; publicadminfalse549&12591685773pack_pack_id_seqSEQUENCErCREATE SEQUENCE pack_pack_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.pack_pack_id_seq; publicadminfalse8549&00pack_pack_id_seqSEQUENCE OWNED BY7ALTER SEQUENCE pack_pack_id_seq OWNED BY pack.pack_id; publicadminfalse550&00pack_pack_id_seq SEQUENCE SET7SELECT pg_catalog.setval('pack_pack_id_seq', 2, true); publicadminfalse550&00pack_pack_id_seqACLREVOKE ALL ON SEQUENCE pack_pack_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pack_pack_id_seq FROM admin; GRANT ALL ON SEQUENCE pack_pack_id_seq TO admin; GRANT ALL ON SEQUENCE pack_pack_id_seq TO xtrole; publicadminfalse550'12591685775 payaropenTABLECREATE TABLE payaropen ( payaropen_ccpay_id integer NOT NULL, payaropen_aropen_id integer NOT NULL, payaropen_amount numeric(20,2) DEFAULT 0.00 NOT NULL, payaropen_curr_id integer DEFAULT basecurrid() ); DROP TABLE public.payaropen; publicadminfalse648264838&00TABLE payaropenCOMMENTOCOMMENT ON TABLE payaropen IS 'Credit Card payment to credit memo join table'; publicadminfalse551&00 payaropenACLREVOKE ALL ON TABLE payaropen FROM PUBLIC; REVOKE ALL ON TABLE payaropen FROM admin; GRANT ALL ON TABLE payaropen TO admin; GRANT ALL ON TABLE payaropen TO xtrole; publicadminfalse551(12591685780paycoTABLECREATE TABLE payco ( payco_ccpay_id integer NOT NULL, payco_cohead_id integer NOT NULL, payco_amount numeric(20,2) DEFAULT 0.00 NOT NULL, payco_curr_id integer DEFAULT basecurrid() ); DROP TABLE public.payco; publicadminfalse648464858&00 TABLE paycoCOMMENTKCOMMENT ON TABLE payco IS 'Credit Card payment to sales order join table'; publicadminfalse552&00paycoACLREVOKE ALL ON TABLE payco FROM PUBLIC; REVOKE ALL ON TABLE payco FROM admin; GRANT ALL ON TABLE payco TO admin; GRANT ALL ON TABLE payco TO xtrole; publicadminfalse552)12591685785period_period_id_seqSEQUENCEvCREATE SEQUENCE period_period_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.period_period_id_seq; publicadminfalse8201&00period_period_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE period_period_id_seq OWNED BY period.period_id; publicadminfalse553&00period_period_id_seq SEQUENCE SET=SELECT pg_catalog.setval('period_period_id_seq', 128, true); publicadminfalse553&00period_period_id_seqACLREVOKE ALL ON SEQUENCE period_period_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE period_period_id_seq FROM admin; GRANT ALL ON SEQUENCE period_period_id_seq TO admin; GRANT ALL ON SEQUENCE period_period_id_seq TO xtrole; publicadminfalse553*12591685787pkgdepTABLECREATE TABLE pkgdep ( pkgdep_id integer NOT NULL, pkgdep_pkghead_id integer NOT NULL, pkgdep_parent_pkghead_id integer NOT NULL ); DROP TABLE public.pkgdep; publicadminfalse8&00 TABLE pkgdepCOMMENTyCOMMENT ON TABLE pkgdep IS 'Package Dependencies list describing which packages are dependent on which other packages.'; publicadminfalse554&00COLUMN pkgdep.pkgdep_pkghead_idCOMMENTCOMMENT ON COLUMN pkgdep.pkgdep_pkghead_id IS 'This is the internal ID of a package which requires at least one other package to be installed first to operate successfully'; publicadminfalse554&00&COLUMN pkgdep.pkgdep_parent_pkghead_idCOMMENTCOMMENT ON COLUMN pkgdep.pkgdep_parent_pkghead_id IS 'This is the internal ID of a package which must be installed for the package pointed to by pkgdep_pkghead_id to operate successfully.'; publicadminfalse554&00pkgdepACLREVOKE ALL ON TABLE pkgdep FROM PUBLIC; REVOKE ALL ON TABLE pkgdep FROM admin; GRANT ALL ON TABLE pkgdep TO admin; GRANT ALL ON TABLE pkgdep TO xtrole; publicadminfalse554+12591685790pkgdep_pkgdep_id_seqSEQUENCEvCREATE SEQUENCE pkgdep_pkgdep_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.pkgdep_pkgdep_id_seq; publicadminfalse8554&00pkgdep_pkgdep_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE pkgdep_pkgdep_id_seq OWNED BY pkgdep.pkgdep_id; publicadminfalse555&00pkgdep_pkgdep_id_seq SEQUENCE SET<SELECT pg_catalog.setval('pkgdep_pkgdep_id_seq', 1, false); publicadminfalse555&00pkgdep_pkgdep_id_seqACLREVOKE ALL ON SEQUENCE pkgdep_pkgdep_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pkgdep_pkgdep_id_seq FROM admin; GRANT ALL ON SEQUENCE pkgdep_pkgdep_id_seq TO admin; GRANT ALL ON SEQUENCE pkgdep_pkgdep_id_seq TO xtrole; publicadminfalse555,12591685792pkgheadTABLECREATE TABLE pkghead ( pkghead_id integer NOT NULL, pkghead_name text NOT NULL, pkghead_descrip text, pkghead_version text NOT NULL, pkghead_developer text NOT NULL, pkghead_notes text, pkghead_created timestamp with time zone, pkghead_updated timestamp with time zone, pkghead_indev boolean DEFAULT false NOT NULL, CONSTRAINT pkghead_pkghead_name_check CHECK ((pkghead_name <> ''::text)) ); DROP TABLE public.pkghead; publicadminfalse648864898&00 TABLE pkgheadCOMMENTYCOMMENT ON TABLE pkghead IS 'Information about non-core Packages added to the database'; publicadminfalse556&00COLUMN pkghead.pkghead_indevCOMMENTCOMMENT ON COLUMN pkghead.pkghead_indev IS 'Flag indicating whether the contents of this package may be modified in-place - this package is /in dev/elopment.'; publicadminfalse556&00pkgheadACLREVOKE ALL ON TABLE pkghead FROM PUBLIC; REVOKE ALL ON TABLE pkghead FROM admin; GRANT ALL ON TABLE pkghead TO admin; GRANT ALL ON TABLE pkghead TO xtrole; publicadminfalse556-12591685800pkghead_pkghead_id_seqSEQUENCExCREATE SEQUENCE pkghead_pkghead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.pkghead_pkghead_id_seq; publicadminfalse8556&00pkghead_pkghead_id_seqSEQUENCE OWNED BYCALTER SEQUENCE pkghead_pkghead_id_seq OWNED BY pkghead.pkghead_id; publicadminfalse557&00pkghead_pkghead_id_seq SEQUENCE SET>SELECT pg_catalog.setval('pkghead_pkghead_id_seq', 15, true); publicadminfalse557&00pkghead_pkghead_id_seqACLREVOKE ALL ON SEQUENCE pkghead_pkghead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pkghead_pkghead_id_seq FROM admin; GRANT ALL ON SEQUENCE pkghead_pkghead_id_seq TO admin; GRANT ALL ON SEQUENCE pkghead_pkghead_id_seq TO xtrole; publicadminfalse557.12591685802pkgitemTABLECREATE TABLE pkgitem ( pkgitem_id integer NOT NULL, pkgitem_pkghead_id integer, pkgitem_type text, pkgitem_item_id integer NOT NULL, pkgitem_name text NOT NULL, pkgitem_descrip text, CONSTRAINT pkgitem_pkgitem_type_check CHECK (((((((((((((pkgitem_type = 'C'::text) OR (pkgitem_type = 'D'::text)) OR (pkgitem_type = 'F'::text)) OR (pkgitem_type = 'G'::text)) OR (pkgitem_type = 'I'::text)) OR (pkgitem_type = 'M'::text)) OR (pkgitem_type = 'P'::text)) OR (pkgitem_type = 'R'::text)) OR (pkgitem_type = 'S'::text)) OR (pkgitem_type = 'T'::text)) OR (pkgitem_type = 'U'::text)) OR (pkgitem_type = 'V'::text))) ); DROP TABLE public.pkgitem; publicadminfalse64918&00 TABLE pkgitemCOMMENTCOMMENT ON TABLE pkgitem IS 'Deprecated - the pkgitem table is no longer used to track package contents. It has been replaced by direct queries to the database schema and component tables. This table will be removed when all users have switched to Updater 2.2.0 or later.'; publicadminfalse558&00pkgitemACLREVOKE ALL ON TABLE pkgitem FROM PUBLIC; REVOKE ALL ON TABLE pkgitem FROM admin; GRANT ALL ON TABLE pkgitem TO admin; GRANT ALL ON TABLE pkgitem TO xtrole; publicadminfalse558/12591685809pkgitem_pkgitem_id_seqSEQUENCExCREATE SEQUENCE pkgitem_pkgitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.pkgitem_pkgitem_id_seq; publicadminfalse8558&00pkgitem_pkgitem_id_seqSEQUENCE OWNED BYCALTER SEQUENCE pkgitem_pkgitem_id_seq OWNED BY pkgitem.pkgitem_id; publicadminfalse559&00pkgitem_pkgitem_id_seq SEQUENCE SET?SELECT pg_catalog.setval('pkgitem_pkgitem_id_seq', 199, true); publicadminfalse559&00pkgitem_pkgitem_id_seqACLREVOKE ALL ON SEQUENCE pkgitem_pkgitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pkgitem_pkgitem_id_seq FROM admin; GRANT ALL ON SEQUENCE pkgitem_pkgitem_id_seq TO admin; GRANT ALL ON SEQUENCE pkgitem_pkgitem_id_seq TO xtrole; publicadminfalse559012591685811plancode_plancode_id_seqSEQUENCEzCREATE SEQUENCE plancode_plancode_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.plancode_plancode_id_seq; publicadminfalse8&00plancode_plancode_id_seq SEQUENCE SET@SELECT pg_catalog.setval('plancode_plancode_id_seq', 28, true); publicadminfalse560&00plancode_plancode_id_seqACLREVOKE ALL ON SEQUENCE plancode_plancode_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE plancode_plancode_id_seq FROM admin; GRANT ALL ON SEQUENCE plancode_plancode_id_seq TO admin; GRANT ALL ON SEQUENCE plancode_plancode_id_seq TO xtrole; publicadminfalse560112591685813planord_planord_id_seqSEQUENCECREATE SEQUENCE planord_planord_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.planord_planord_id_seq; publicadminfalse8&00planord_planord_id_seq SEQUENCE SET@SELECT pg_catalog.setval('planord_planord_id_seq', 1476, true); publicadminfalse561&00planord_planord_id_seqACLREVOKE ALL ON SEQUENCE planord_planord_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE planord_planord_id_seq FROM admin; GRANT ALL ON SEQUENCE planord_planord_id_seq TO admin; GRANT ALL ON SEQUENCE planord_planord_id_seq TO xtrole; publicadminfalse561212591685815pohead_pohead_id_seqSEQUENCE~CREATE SEQUENCE pohead_pohead_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.pohead_pohead_id_seq; publicadminfalse8&00pohead_pohead_id_seq SEQUENCE SET=SELECT pg_catalog.setval('pohead_pohead_id_seq', 572, true); publicadminfalse562&00pohead_pohead_id_seqACLREVOKE ALL ON SEQUENCE pohead_pohead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pohead_pohead_id_seq FROM admin; GRANT ALL ON SEQUENCE pohead_pohead_id_seq TO admin; GRANT ALL ON SEQUENCE pohead_pohead_id_seq TO xtrole; publicadminfalse562312591685817poitem_poitem_id_seqSEQUENCE~CREATE SEQUENCE poitem_poitem_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.poitem_poitem_id_seq; publicadminfalse8&00poitem_poitem_id_seq SEQUENCE SET=SELECT pg_catalog.setval('poitem_poitem_id_seq', 607, true); publicadminfalse563&00poitem_poitem_id_seqACLREVOKE ALL ON SEQUENCE poitem_poitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE poitem_poitem_id_seq FROM admin; GRANT ALL ON SEQUENCE poitem_poitem_id_seq TO admin; GRANT ALL ON SEQUENCE poitem_poitem_id_seq TO xtrole; publicadminfalse563O12591685941recvTABLEzCREATE TABLE recv ( recv_id integer NOT NULL, recv_order_type text NOT NULL, recv_order_number text NOT NULL, recv_orderitem_id integer NOT NULL, recv_agent_username text, recv_itemsite_id integer, recv_vend_id integer, recv_vend_item_number text, recv_vend_item_descrip text, recv_vend_uom text, recv_purchcost numeric(16,6), recv_purchcost_curr_id integer, recv_duedate date, recv_qty numeric(18,6), recv_recvcost numeric(16,6), recv_recvcost_curr_id integer, recv_freight numeric(16,4), recv_freight_curr_id integer, recv_date timestamp with time zone, recv_value numeric(18,6), recv_posted boolean DEFAULT false NOT NULL, recv_invoiced boolean DEFAULT false NOT NULL, recv_vohead_id integer, recv_voitem_id integer, recv_trans_usr_name text DEFAULT geteffectivextuser() NOT NULL, recv_notes text, recv_gldistdate date, recv_splitfrom_id integer, recv_rlsd_duedate date, CONSTRAINT recv_recv_order_type_check CHECK ((((recv_order_type = 'PO'::text) OR (recv_order_type = 'RA'::text)) OR (recv_order_type = 'TO'::text))) ); DROP TABLE public.recv; publicadminfalse65176518651965218&00 TABLE recvCOMMENT?COMMENT ON TABLE recv IS 'Information about Received Orders.'; publicadminfalse591&00recvACLREVOKE ALL ON TABLE recv FROM PUBLIC; REVOKE ALL ON TABLE recv FROM admin; GRANT ALL ON TABLE recv TO admin; GRANT ALL ON TABLE recv TO xtrole; publicadminfalse591Y12592006645porecvVIEW4CREATE VIEW porecv AS SELECT recv.recv_id AS porecv_id, recv.recv_date AS porecv_date, recv.recv_rlsd_duedate AS porecv_rlsd_duedate, pohead.pohead_orderdate AS porecv_orderdate, pohead.pohead_released AS porecv_released, recv.recv_order_number AS porecv_ponumber, recv.recv_itemsite_id AS porecv_itemsite_id, recv.recv_vend_id AS porecv_vend_id, item.item_number AS porecv_item_number, recv.recv_vend_item_number AS porecv_vend_item_number, COALESCE(item.item_descrip1, recv.recv_vend_item_descrip) AS porecv_vend_item_descrip, recv.recv_vend_uom AS porecv_vend_uom, recv.recv_qty AS porecv_qty, recv.recv_posted AS porecv_posted, recv.recv_invoiced AS porecv_invoiced, (pg_user.usesysid)::integer AS porecv_trans_usr_id, recv.recv_orderitem_id AS porecv_poitem_id, NULL::integer AS porecv_linenumber, recv.recv_purchcost AS porecv_purchcost, recv.recv_vohead_id AS porecv_vohead_id, recv.recv_recvcost AS porecv_recvcost, recv.recv_duedate AS porecv_duedate, recv.recv_agent_username AS porecv_agent_username, recv.recv_notes AS porecv_notes, recv.recv_freight AS porecv_freight, recv.recv_freight_curr_id AS porecv_curr_id, recv.recv_gldistdate AS porecv_gldistdate, recv.recv_voitem_id AS porecv_voitem_id, recv.recv_value AS porecv_value FROM ((((recv LEFT JOIN pg_user ON ((recv.recv_trans_usr_name = (pg_user.usename)::text))) LEFT JOIN pohead ON ((recv.recv_order_number = pohead.pohead_number))) LEFT JOIN itemsite ON ((recv.recv_itemsite_id = itemsite.itemsite_id))) LEFT JOIN item ON ((itemsite.itemsite_item_id = item.item_id))) WHERE (recv.recv_order_type = 'PO'::text); DROP VIEW public.porecv; publicadminfalse55538&00porecvACLREVOKE ALL ON TABLE porecv FROM PUBLIC; REVOKE ALL ON TABLE porecv FROM admin; GRANT ALL ON TABLE porecv TO admin; GRANT ALL ON TABLE porecv TO xtrole; publicadminfalse857412591685819porecv_porecv_id_seqSEQUENCE~CREATE SEQUENCE porecv_porecv_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.porecv_porecv_id_seq; publicadminfalse8&00porecv_porecv_id_seq SEQUENCE SET=SELECT pg_catalog.setval('porecv_porecv_id_seq', 180, true); publicadminfalse564&00porecv_porecv_id_seqACLREVOKE ALL ON SEQUENCE porecv_porecv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE porecv_porecv_id_seq FROM admin; GRANT ALL ON SEQUENCE porecv_porecv_id_seq TO admin; GRANT ALL ON SEQUENCE porecv_porecv_id_seq TO xtrole; publicadminfalse564512591685821porejectTABLECREATE TABLE poreject ( poreject_id integer DEFAULT nextval(('"poreject_poreject_id_seq"'::text)::regclass) NOT NULL, poreject_date timestamp with time zone, poreject_ponumber text, poreject_itemsite_id integer, poreject_vend_id integer, poreject_vend_item_number text, poreject_vend_item_descrip text, poreject_vend_uom text, poreject_qty numeric(18,6), poreject_posted boolean, poreject_rjctcode_id integer, poreject_poitem_id integer, poreject_invoiced boolean, poreject_vohead_id integer, poreject_agent_username text, poreject_voitem_id integer, poreject_value numeric(18,6), poreject_trans_username text, poreject_recv_id integer ); DROP TABLE public.poreject; publicadminfalse64928&00TABLE porejectCOMMENTqCOMMENT ON TABLE poreject IS 'The poreject table describes Purchase Order Items that were returned to Vendors.'; publicadminfalse565&00COLUMN poreject.poreject_idCOMMENT]COMMENT ON COLUMN poreject.poreject_id IS 'This is the internal id of this poreject record'; publicadminfalse565&00COLUMN poreject.poreject_dateCOMMENTrCOMMENT ON COLUMN poreject.poreject_date IS 'This is the date and time the return was entered into the database'; publicadminfalse565&00!COLUMN poreject.poreject_ponumberCOMMENTrCOMMENT ON COLUMN poreject.poreject_ponumber IS 'This is the number of the original Purchase Order of this item'; publicadminfalse565&00$COLUMN poreject.poreject_itemsite_idCOMMENTrCOMMENT ON COLUMN poreject.poreject_itemsite_id IS 'This is the Item Site into which the item had been received'; publicadminfalse565&00 COLUMN poreject.poreject_vend_idCOMMENTlCOMMENT ON COLUMN poreject.poreject_vend_id IS 'This is the Vendor from which the item had been purchased'; publicadminfalse565&00)COLUMN poreject.poreject_vend_item_numberCOMMENTkCOMMENT ON COLUMN poreject.poreject_vend_item_number IS 'This is the Vendor''s item number for this item'; publicadminfalse565&00*COLUMN poreject.poreject_vend_item_descripCOMMENTkCOMMENT ON COLUMN poreject.poreject_vend_item_descrip IS 'This is the Vendor''s description of this item'; publicadminfalse565&00!COLUMN poreject.poreject_vend_uomCOMMENTrCOMMENT ON COLUMN poreject.poreject_vend_uom IS 'This is the Unit of Measure in which the Vendor sold this item'; publicadminfalse565&00COLUMN poreject.poreject_qtyCOMMENTaCOMMENT ON COLUMN poreject.poreject_qty IS 'This is the quantity of the item that was returned'; publicadminfalse565&00COLUMN poreject.poreject_postedCOMMENTCOMMENT ON COLUMN poreject.poreject_posted IS 'This indicates whether or not the return has been recorded in the General Ledger, Inventory History, and Purchase Order Item'; publicadminfalse565&00$COLUMN poreject.poreject_rjctcode_idCOMMENT_COMMENT ON COLUMN poreject.poreject_rjctcode_id IS 'This indicates the reason for the return'; publicadminfalse565&00"COLUMN poreject.poreject_poitem_idCOMMENTpCOMMENT ON COLUMN poreject.poreject_poitem_id IS 'This is the internal id of the original Purchase Order Item'; publicadminfalse565&00!COLUMN poreject.poreject_invoicedCOMMENTCOMMENT ON COLUMN poreject.poreject_invoiced IS 'This indicates whether the Credit Memo associated with the return has been posted'; publicadminfalse565&00"COLUMN poreject.poreject_vohead_idCOMMENTpCOMMENT ON COLUMN poreject.poreject_vohead_id IS 'This is the Voucher associated with the Purchase Order Item'; publicadminfalse565&00'COLUMN poreject.poreject_agent_usernameCOMMENTCOMMENT ON COLUMN poreject.poreject_agent_username IS 'This is the Purchase Order Agent responsible for the original Purchase Order'; publicadminfalse565&00"COLUMN poreject.poreject_voitem_idCOMMENTuCOMMENT ON COLUMN poreject.poreject_voitem_id IS 'This is the Voucher Item associated with the Purchase Order Item'; publicadminfalse565&00COLUMN poreject.poreject_valueCOMMENTCOMMENT ON COLUMN poreject.poreject_value IS 'This is the value (in base currency) of the return at the time it was posted to the General Ledger'; publicadminfalse565&00'COLUMN poreject.poreject_trans_usernameCOMMENTbCOMMENT ON COLUMN poreject.poreject_trans_username IS 'This is the user who recorded the return'; publicadminfalse565&00porejectACLREVOKE ALL ON TABLE poreject FROM PUBLIC; REVOKE ALL ON TABLE poreject FROM admin; GRANT ALL ON TABLE poreject TO admin; GRANT ALL ON TABLE poreject TO xtrole; publicadminfalse565612591685828poreject_poreject_id_seqSEQUENCECREATE SEQUENCE poreject_poreject_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.poreject_poreject_id_seq; publicadminfalse8&00poreject_poreject_id_seq SEQUENCE SET@SELECT pg_catalog.setval('poreject_poreject_id_seq', 42, true); publicadminfalse566&00poreject_poreject_id_seqACLREVOKE ALL ON SEQUENCE poreject_poreject_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE poreject_poreject_id_seq FROM admin; GRANT ALL ON SEQUENCE poreject_poreject_id_seq TO admin; GRANT ALL ON SEQUENCE poreject_poreject_id_seq TO xtrole; publicadminfalse566712591685830potypeTABLEgCREATE TABLE potype ( potype_id integer NOT NULL, potype_name text, potype_descrip text ); DROP TABLE public.potype; publicadminfalse8&00 TABLE potypeCOMMENT>COMMENT ON TABLE potype IS 'Purchase Order Type information'; publicadminfalse567&00potypeACLREVOKE ALL ON TABLE potype FROM PUBLIC; REVOKE ALL ON TABLE potype FROM admin; GRANT ALL ON TABLE potype TO admin; GRANT ALL ON TABLE potype TO xtrole; publicadminfalse567812591685836potype_potype_id_seqSEQUENCEvCREATE SEQUENCE potype_potype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.potype_potype_id_seq; publicadminfalse8567&00potype_potype_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE potype_potype_id_seq OWNED BY potype.potype_id; publicadminfalse568&00potype_potype_id_seq SEQUENCE SET<SELECT pg_catalog.setval('potype_potype_id_seq', 1, false); publicadminfalse568&00potype_potype_id_seqACLREVOKE ALL ON SEQUENCE potype_potype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE potype_potype_id_seq FROM admin; GRANT ALL ON SEQUENCE potype_potype_id_seq TO admin; GRANT ALL ON SEQUENCE potype_potype_id_seq TO xtrole; publicadminfalse568912591685838prTABLECREATE TABLE pr ( pr_id integer DEFAULT nextval(('"pr_pr_id_seq"'::text)::regclass) NOT NULL, pr_number integer, pr_subnumber integer, pr_status character(1), pr_order_type character(1), pr_order_id integer, pr_poitem_id integer, pr_duedate date, pr_itemsite_id integer, pr_qtyreq numeric(18,6), pr_prj_id integer, pr_releasenote text, pr_createdate timestamp without time zone DEFAULT now() ); DROP TABLE public.pr; publicadminfalse649464958&00TABLE prCOMMENT7COMMENT ON TABLE pr IS 'Purchase Request information'; publicadminfalse569&00prACLREVOKE ALL ON TABLE pr FROM PUBLIC; REVOKE ALL ON TABLE pr FROM admin; GRANT ALL ON TABLE pr TO admin; GRANT ALL ON TABLE pr TO xtrole; publicadminfalse569:12591685846 pr_pr_id_seqSEQUENCEnCREATE SEQUENCE pr_pr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; #DROP SEQUENCE public.pr_pr_id_seq; publicadminfalse8&00 pr_pr_id_seq SEQUENCE SET5SELECT pg_catalog.setval('pr_pr_id_seq', 294, true); publicadminfalse570&00 pr_pr_id_seqACLREVOKE ALL ON SEQUENCE pr_pr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE pr_pr_id_seq FROM admin; GRANT ALL ON SEQUENCE pr_pr_id_seq TO admin; GRANT ALL ON SEQUENCE pr_pr_id_seq TO xtrole; publicadminfalse570;12591685848prftcntrTABLECREATE TABLE prftcntr ( prftcntr_id integer NOT NULL, prftcntr_number text NOT NULL, prftcntr_descrip text, CONSTRAINT prftcntr_prftcntr_number_check CHECK ((prftcntr_number <> ''::text)) ); DROP TABLE public.prftcntr; publicadminfalse64978&00TABLE prftcntrCOMMENT:COMMENT ON TABLE prftcntr IS 'Profit Center information'; publicadminfalse571&00prftcntrACLREVOKE ALL ON TABLE prftcntr FROM PUBLIC; REVOKE ALL ON TABLE prftcntr FROM admin; GRANT ALL ON TABLE prftcntr TO admin; GRANT ALL ON TABLE prftcntr TO xtrole; publicadminfalse571<12591685854prftcntr_prftcntr_id_seqSEQUENCEzCREATE SEQUENCE prftcntr_prftcntr_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.prftcntr_prftcntr_id_seq; publicadminfalse8571&00prftcntr_prftcntr_id_seqSEQUENCE OWNED BYGALTER SEQUENCE prftcntr_prftcntr_id_seq OWNED BY prftcntr.prftcntr_id; publicadminfalse572&00prftcntr_prftcntr_id_seq SEQUENCE SET?SELECT pg_catalog.setval('prftcntr_prftcntr_id_seq', 2, true); publicadminfalse572&00prftcntr_prftcntr_id_seqACLREVOKE ALL ON SEQUENCE prftcntr_prftcntr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prftcntr_prftcntr_id_seq FROM admin; GRANT ALL ON SEQUENCE prftcntr_prftcntr_id_seq TO admin; GRANT ALL ON SEQUENCE prftcntr_prftcntr_id_seq TO xtrole; publicadminfalse572=12591685856usrgrpTABLECREATE TABLE usrgrp ( usrgrp_id integer NOT NULL, usrgrp_grp_id integer NOT NULL, usrgrp_username text NOT NULL ); DROP TABLE public.usrgrp; publicadminfalse8&00 TABLE usrgrpCOMMENTECOMMENT ON TABLE usrgrp IS 'This is which group a user belongs to.'; publicadminfalse573&00usrgrpACLREVOKE ALL ON TABLE usrgrp FROM PUBLIC; REVOKE ALL ON TABLE usrgrp FROM admin; GRANT ALL ON TABLE usrgrp TO admin; GRANT ALL ON TABLE usrgrp TO xtrole; publicadminfalse573>12591685862usrprivTABLECREATE TABLE usrpriv ( usrpriv_id integer DEFAULT nextval(('usrpriv_usrpriv_id_seq'::text)::regclass) NOT NULL, usrpriv_priv_id integer, usrpriv_username text ); DROP TABLE public.usrpriv; publicadminfalse64998&00 TABLE usrprivCOMMENT;COMMENT ON TABLE usrpriv IS 'User Privileges information'; publicadminfalse574&00usrprivACLREVOKE ALL ON TABLE usrpriv FROM PUBLIC; REVOKE ALL ON TABLE usrpriv FROM admin; GRANT ALL ON TABLE usrpriv TO admin; GRANT ALL ON TABLE usrpriv TO xtrole; publicadminfalse574O12592006599 privgrantedVIEW'CREATE VIEW privgranted AS SELECT priv.priv_name AS privilege, (COALESCE(usrpriv.usrpriv_priv_id, grppriv.grppriv_priv_id, (-1)) > 0) AS granted, priv.priv_seq AS sequence FROM ((priv LEFT JOIN usrpriv ON (((priv.priv_id = usrpriv.usrpriv_priv_id) AND (usrpriv.usrpriv_username = geteffectivextuser())))) LEFT JOIN (SELECT DISTINCT grppriv.grppriv_priv_id FROM (grppriv JOIN usrgrp ON (((grppriv.grppriv_grp_id = usrgrp.usrgrp_grp_id) AND (usrgrp.usrgrp_username = geteffectivextuser()))))) grppriv ON ((grppriv.grppriv_priv_id = priv.priv_id))); DROP VIEW public.privgranted; publicadminfalse55438&00 privgrantedACLREVOKE ALL ON TABLE privgranted FROM PUBLIC; REVOKE ALL ON TABLE privgranted FROM admin; GRANT ALL ON TABLE privgranted TO admin; GRANT ALL ON TABLE privgranted TO xtrole; publicadminfalse847?12591685874prj_prj_id_seqSEQUENCEpCREATE SEQUENCE prj_prj_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; %DROP SEQUENCE public.prj_prj_id_seq; publicadminfalse8174&00prj_prj_id_seqSEQUENCE OWNED BY3ALTER SEQUENCE prj_prj_id_seq OWNED BY prj.prj_id; publicadminfalse575&00prj_prj_id_seq SEQUENCE SET5SELECT pg_catalog.setval('prj_prj_id_seq', 6, true); publicadminfalse575&00prj_prj_id_seqACLREVOKE ALL ON SEQUENCE prj_prj_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prj_prj_id_seq FROM admin; GRANT ALL ON SEQUENCE prj_prj_id_seq TO admin; GRANT ALL ON SEQUENCE prj_prj_id_seq TO xtrole; publicadminfalse575@12591685876prjtask_prjtask_id_seqSEQUENCExCREATE SEQUENCE prjtask_prjtask_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.prjtask_prjtask_id_seq; publicadminfalse8182&00prjtask_prjtask_id_seqSEQUENCE OWNED BYCALTER SEQUENCE prjtask_prjtask_id_seq OWNED BY prjtask.prjtask_id; publicadminfalse576&00prjtask_prjtask_id_seq SEQUENCE SET=SELECT pg_catalog.setval('prjtask_prjtask_id_seq', 7, true); publicadminfalse576&00prjtask_prjtask_id_seqACLREVOKE ALL ON SEQUENCE prjtask_prjtask_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prjtask_prjtask_id_seq FROM admin; GRANT ALL ON SEQUENCE prjtask_prjtask_id_seq TO admin; GRANT ALL ON SEQUENCE prjtask_prjtask_id_seq TO xtrole; publicadminfalse576A12591685878 prjtaskuserTABLECREATE TABLE prjtaskuser ( prjtaskuser_id integer NOT NULL, prjtaskuser_prjtask_id integer, prjtaskuser_username text ); DROP TABLE public.prjtaskuser; publicadminfalse8&00TABLE prjtaskuserCOMMENTACOMMENT ON TABLE prjtaskuser IS 'Project Task user information'; publicadminfalse577&00 prjtaskuserACLREVOKE ALL ON TABLE prjtaskuser FROM PUBLIC; REVOKE ALL ON TABLE prjtaskuser FROM admin; GRANT ALL ON TABLE prjtaskuser TO admin; GRANT ALL ON TABLE prjtaskuser TO xtrole; publicadminfalse577B12591685884prjtaskuser_prjtaskuser_id_seqSEQUENCECREATE SEQUENCE prjtaskuser_prjtaskuser_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.prjtaskuser_prjtaskuser_id_seq; publicadminfalse5778&00prjtaskuser_prjtaskuser_id_seqSEQUENCE OWNED BYSALTER SEQUENCE prjtaskuser_prjtaskuser_id_seq OWNED BY prjtaskuser.prjtaskuser_id; publicadminfalse578&00prjtaskuser_prjtaskuser_id_seq SEQUENCE SETFSELECT pg_catalog.setval('prjtaskuser_prjtaskuser_id_seq', 1, false); publicadminfalse578&00prjtaskuser_prjtaskuser_id_seqACLREVOKE ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq FROM admin; GRANT ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq TO admin; GRANT ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq TO xtrole; publicadminfalse578C12591685886prodcat_prodcat_id_seqSEQUENCECREATE SEQUENCE prodcat_prodcat_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.prodcat_prodcat_id_seq; publicadminfalse8&00prodcat_prodcat_id_seq SEQUENCE SET>SELECT pg_catalog.setval('prodcat_prodcat_id_seq', 33, true); publicadminfalse579&00prodcat_prodcat_id_seqACLREVOKE ALL ON SEQUENCE prodcat_prodcat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE prodcat_prodcat_id_seq FROM admin; GRANT ALL ON SEQUENCE prodcat_prodcat_id_seq TO admin; GRANT ALL ON SEQUENCE prodcat_prodcat_id_seq TO xtrole; publicadminfalse579D12591685888qryheadTABLEZCREATE TABLE qryhead ( qryhead_id integer NOT NULL, qryhead_name text NOT NULL, qryhead_descrip text, qryhead_notes text, qryhead_username text DEFAULT geteffectivextuser() NOT NULL, qryhead_updated date DEFAULT ('now'::text)::date NOT NULL, CONSTRAINT qryhead_qryhead_name_check CHECK ((qryhead_name <> ''::text)) ); DROP TABLE public.qryhead; publicadminfalse6502650365048&00 TABLE qryheadCOMMENTxCOMMENT ON TABLE qryhead IS 'A header record for a set of queries to be run sequentially. One use is for data export.'; publicadminfalse580&00COLUMN qryhead.qryhead_idCOMMENTzCOMMENT ON COLUMN qryhead.qryhead_id IS 'The primary key, holding an internal value used to cross-reference this table.'; publicadminfalse580&00COLUMN qryhead.qryhead_nameCOMMENTcCOMMENT ON COLUMN qryhead.qryhead_name IS 'The user-assigned short name for this set of queries.'; publicadminfalse580&00COLUMN qryhead.qryhead_descripCOMMENTjCOMMENT ON COLUMN qryhead.qryhead_descrip IS 'A long description of the purpose of this set of queries.'; publicadminfalse580&00COLUMN qryhead.qryhead_notesCOMMENTWCOMMENT ON COLUMN qryhead.qryhead_notes IS 'General information about this queryset.'; publicadminfalse580&00COLUMN qryhead.qryhead_usernameCOMMENTmCOMMENT ON COLUMN qryhead.qryhead_username IS 'The name of the user who last modified this qryhead record.'; publicadminfalse580&00COLUMN qryhead.qryhead_updatedCOMMENTYCOMMENT ON COLUMN qryhead.qryhead_updated IS 'The date this qryhead was last modified.'; publicadminfalse580&00qryheadACLREVOKE ALL ON TABLE qryhead FROM PUBLIC; REVOKE ALL ON TABLE qryhead FROM admin; GRANT ALL ON TABLE qryhead TO admin; GRANT ALL ON TABLE qryhead TO xtrole; publicadminfalse580E12591685896qryhead_qryhead_id_seqSEQUENCExCREATE SEQUENCE qryhead_qryhead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.qryhead_qryhead_id_seq; publicadminfalse8580&00qryhead_qryhead_id_seqSEQUENCE OWNED BYCALTER SEQUENCE qryhead_qryhead_id_seq OWNED BY qryhead.qryhead_id; publicadminfalse581&00qryhead_qryhead_id_seq SEQUENCE SET=SELECT pg_catalog.setval('qryhead_qryhead_id_seq', 3, true); publicadminfalse581&00qryhead_qryhead_id_seqACLREVOKE ALL ON SEQUENCE qryhead_qryhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE qryhead_qryhead_id_seq FROM admin; GRANT ALL ON SEQUENCE qryhead_qryhead_id_seq TO admin; GRANT ALL ON SEQUENCE qryhead_qryhead_id_seq TO xtrole; publicadminfalse581F12591685898qryitemTABLECREATE TABLE qryitem ( qryitem_id integer NOT NULL, qryitem_qryhead_id integer NOT NULL, qryitem_name text NOT NULL, qryitem_order integer NOT NULL, qryitem_src text NOT NULL, qryitem_group text, qryitem_detail text NOT NULL, qryitem_notes text DEFAULT ''::text NOT NULL, qryitem_username text DEFAULT geteffectivextuser() NOT NULL, qryitem_updated date DEFAULT ('now'::text)::date NOT NULL, CONSTRAINT qryitem_qryitem_detail_check CHECK ((btrim(qryitem_detail) <> ''::text)), CONSTRAINT qryitem_qryitem_src_check CHECK ((qryitem_src = ANY (ARRAY['REL'::text, 'MQL'::text, 'CUSTOM'::text]))) ); DROP TABLE public.qryitem; publicadminfalse650565066507650965108&00 TABLE qryitemCOMMENTdCOMMENT ON TABLE qryitem IS 'The description of a query to be run as part of a set (see qryhead).'; publicadminfalse582&00COLUMN qryitem.qryitem_idCOMMENTzCOMMENT ON COLUMN qryitem.qryitem_id IS 'The primary key, holding an internal value used to cross-reference this table.'; publicadminfalse582&00!COLUMN qryitem.qryitem_qryhead_idCOMMENT|COMMENT ON COLUMN qryitem.qryitem_qryhead_id IS 'The primary key of the query set to which this individual query belongs.'; publicadminfalse582&00COLUMN qryitem.qryitem_orderCOMMENToCOMMENT ON COLUMN qryitem.qryitem_order IS 'The order in which query items within a query set should be run.'; publicadminfalse582&00COLUMN qryitem.qryitem_srcCOMMENTCOMMENT ON COLUMN qryitem.qryitem_src IS 'The source of the query. If the qryitem_src is "REL" then the qryitem_group and _detail name a particular table or view and all rows will be returned. If the source is "MQL" then the qryitem_group and _detail name a pre-defined MetaSQL query in the metasql table. If the source is "CUSTOM" then the qryitem_detail contains the full MetaSQL text of the query to run.'; publicadminfalse582&00COLUMN qryitem.qryitem_groupCOMMENTCOMMENT ON COLUMN qryitem.qryitem_group IS 'Information to help find the query to run. If the qryitem_src is "REL" then this is the schema in which to find the table or view to query and all rows will be returned (the qryitem_detail names the table or view). If the qryitem_src is "MQL" then this is the group of the query in the metasql table to run (the name is in qryitem_detail). If the qryitem_src IS "CUSTOM" then this ignored.'; publicadminfalse582&00COLUMN qryitem.qryitem_detailCOMMENTwCOMMENT ON COLUMN qryitem.qryitem_detail IS 'The particular query to run. If the qryitem_src is "REL" then this is the name of the table or view to query and all rows will be returned. If the qryitem_src is "MQL" then this is the name of the query in the metasql table to run. If the qryitem_src IS "CUSTOM" then this is the actual MetaSQL query text to be parsed and run.'; publicadminfalse582&00COLUMN qryitem.qryitem_notesCOMMENTTCOMMENT ON COLUMN qryitem.qryitem_notes IS 'General information about this query.'; publicadminfalse582&00COLUMN qryitem.qryitem_usernameCOMMENTmCOMMENT ON COLUMN qryitem.qryitem_username IS 'The name of the user who last modified this qryitem record.'; publicadminfalse582&00COLUMN qryitem.qryitem_updatedCOMMENTYCOMMENT ON COLUMN qryitem.qryitem_updated IS 'The date this qryitem was last modified.'; publicadminfalse582&00qryitemACLREVOKE ALL ON TABLE qryitem FROM PUBLIC; REVOKE ALL ON TABLE qryitem FROM admin; GRANT ALL ON TABLE qryitem TO admin; GRANT ALL ON TABLE qryitem TO xtrole; publicadminfalse582G12591685909qryitem_qryitem_id_seqSEQUENCExCREATE SEQUENCE qryitem_qryitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.qryitem_qryitem_id_seq; publicadminfalse8582&00qryitem_qryitem_id_seqSEQUENCE OWNED BYCALTER SEQUENCE qryitem_qryitem_id_seq OWNED BY qryitem.qryitem_id; publicadminfalse583&00qryitem_qryitem_id_seq SEQUENCE SET=SELECT pg_catalog.setval('qryitem_qryitem_id_seq', 4, true); publicadminfalse583&00qryitem_qryitem_id_seqACLREVOKE ALL ON SEQUENCE qryitem_qryitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE qryitem_qryitem_id_seq FROM admin; GRANT ALL ON SEQUENCE qryitem_qryitem_id_seq TO admin; GRANT ALL ON SEQUENCE qryitem_qryitem_id_seq TO xtrole; publicadminfalse583H12591685911quhead_quhead_id_seqSEQUENCEvCREATE SEQUENCE quhead_quhead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.quhead_quhead_id_seq; publicadminfalse8&00quhead_quhead_id_seq SEQUENCE SET=SELECT pg_catalog.setval('quhead_quhead_id_seq', 124, true); publicadminfalse584&00quhead_quhead_id_seqACLREVOKE ALL ON SEQUENCE quhead_quhead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE quhead_quhead_id_seq FROM admin; GRANT ALL ON SEQUENCE quhead_quhead_id_seq TO admin; GRANT ALL ON SEQUENCE quhead_quhead_id_seq TO xtrole; publicadminfalse584I12591685913quitem_quitem_id_seqSEQUENCEvCREATE SEQUENCE quitem_quitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.quitem_quitem_id_seq; publicadminfalse8&00quitem_quitem_id_seq SEQUENCE SET=SELECT pg_catalog.setval('quitem_quitem_id_seq', 119, true); publicadminfalse585&00quitem_quitem_id_seqACLREVOKE ALL ON SEQUENCE quitem_quitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE quitem_quitem_id_seq FROM admin; GRANT ALL ON SEQUENCE quitem_quitem_id_seq TO admin; GRANT ALL ON SEQUENCE quitem_quitem_id_seq TO xtrole; publicadminfalse585J12591685915rcalitemTABLEECREATE TABLE rcalitem ( rcalitem_id integer DEFAULT nextval(('"xcalitem_xcalitem_id_seq"'::text)::regclass) NOT NULL, rcalitem_calhead_id integer, rcalitem_offsettype character(1), rcalitem_offsetcount integer, rcalitem_periodtype character(1), rcalitem_periodcount integer, rcalitem_name text ); DROP TABLE public.rcalitem; publicadminfalse65118&00TABLE rcalitemCOMMENTCCOMMENT ON TABLE rcalitem IS 'Relative Calendar Item information'; publicadminfalse586&00rcalitemACLREVOKE ALL ON TABLE rcalitem FROM PUBLIC; REVOKE ALL ON TABLE rcalitem FROM admin; GRANT ALL ON TABLE rcalitem TO admin; GRANT ALL ON TABLE rcalitem TO xtrole; publicadminfalse586K12591685922recurTABLECREATE TABLE recur ( recur_id integer NOT NULL, recur_parent_id integer NOT NULL, recur_parent_type text NOT NULL, recur_period text NOT NULL, recur_freq integer DEFAULT 1 NOT NULL, recur_start timestamp with time zone DEFAULT now(), recur_end timestamp with time zone, recur_max integer, recur_data text, CONSTRAINT recur_recur_period_check CHECK ((recur_period = ANY (ARRAY['m'::text, 'H'::text, 'D'::text, 'W'::text, 'M'::text, 'Y'::text, 'C'::text]))) ); DROP TABLE public.recur; publicadminfalse6513651465158'00 TABLE recurCOMMENTACOMMENT ON TABLE recur IS 'Track recurring events and objects.'; publicadminfalse587'00COLUMN recur.recur_idCOMMENTNCOMMENT ON COLUMN recur.recur_id IS 'Internal ID of this recurrence record.'; publicadminfalse587'00COLUMN recur.recur_parent_idCOMMENT_COMMENT ON COLUMN recur.recur_parent_id IS 'The internal ID of the event/object that recurs.'; publicadminfalse587'00COLUMN recur.recur_parent_typeCOMMENTiCOMMENT ON COLUMN recur.recur_parent_type IS 'The table in which the parent event or object is stored.'; publicadminfalse587'00COLUMN recur.recur_periodCOMMENTCOMMENT ON COLUMN recur.recur_period IS 'With recur_freq, how often this event recurs. Values are "m" for every minute, "H" for every hour, "D" for daily, "W" for weekly, "M" for monthly, "Y" for yearly, and "C" for customized or complex.'; publicadminfalse587'00COLUMN recur.recur_freqCOMMENTCOMMENT ON COLUMN recur.recur_freq IS 'With recur_period, how often this event recurs. Values are integers counts of recur_periods. For example, if recur_freq = 2 and recur_period = w then the event recurs every 2 weeks.'; publicadminfalse587'00COLUMN recur.recur_startCOMMENT[COMMENT ON COLUMN recur.recur_start IS 'The first date/time when the event should occur.'; publicadminfalse587'00COLUMN recur.recur_endCOMMENTCOMMENT ON COLUMN recur.recur_end IS 'The last date/time when the event should occur. NULL means there is no end date/time and the event should recur forever.'; publicadminfalse587'00COLUMN recur.recur_maxCOMMENTCOMMENT ON COLUMN recur.recur_max IS 'The maximum number of recurrence events to create at one time. If this is NULL then when new events are created, a system-wide default will limit the number.'; publicadminfalse587 '00COLUMN recur.recur_dataCOMMENTCOMMENT ON COLUMN recur.recur_data IS 'Not yet used and format still undetermined. Additional data to describe how to apply the period and frequency, particularly when period = "C".'; publicadminfalse587 '00recurACLREVOKE ALL ON TABLE recur FROM PUBLIC; REVOKE ALL ON TABLE recur FROM admin; GRANT ALL ON TABLE recur TO admin; GRANT ALL ON TABLE recur TO xtrole; publicadminfalse587L12591685931recur_recur_id_seqSEQUENCEtCREATE SEQUENCE recur_recur_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.recur_recur_id_seq; publicadminfalse8587 '00recur_recur_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE recur_recur_id_seq OWNED BY recur.recur_id; publicadminfalse588 '00recur_recur_id_seq SEQUENCE SET:SELECT pg_catalog.setval('recur_recur_id_seq', 1, false); publicadminfalse588 '00recur_recur_id_seqACLREVOKE ALL ON SEQUENCE recur_recur_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE recur_recur_id_seq FROM admin; GRANT ALL ON SEQUENCE recur_recur_id_seq TO admin; GRANT ALL ON SEQUENCE recur_recur_id_seq TO xtrole; publicadminfalse588M12591685933 recurtypeTABLETCREATE TABLE recurtype ( recurtype_id integer NOT NULL, recurtype_type text NOT NULL, recurtype_table text NOT NULL, recurtype_donecheck text NOT NULL, recurtype_schedcol text NOT NULL, recurtype_limit text, recurtype_copyfunc text NOT NULL, recurtype_copyargs text[] NOT NULL, recurtype_delfunc text ); DROP TABLE public.recurtype; publicadminfalse8'00TABLE recurtypeCOMMENTCOMMENT ON TABLE recurtype IS 'Describes the properties of recurring items/events in way that can be used by stored procedures to maintain the recurrence.'; publicadminfalse589'00COLUMN recurtype.recurtype_idCOMMENT_COMMENT ON COLUMN recurtype.recurtype_id IS 'The internal id of this recurrence description.'; publicadminfalse589'00COLUMN recurtype.recurtype_typeCOMMENTCOMMENT ON COLUMN recurtype.recurtype_type IS 'A code value used by the RecurrenceWidget and the code that uses it to describe the item/event that will recur. Examples include "INCDT" for CRM Incidents and "J" for Projects.'; publicadminfalse589'00 COLUMN recurtype.recurtype_tableCOMMENTgCOMMENT ON COLUMN recurtype.recurtype_table IS 'The table that holds the item/event that will recur.'; publicadminfalse589'00$COLUMN recurtype.recurtype_donecheckCOMMENTCOMMENT ON COLUMN recurtype.recurtype_donecheck IS 'A boolean expression that returns TRUE if an individual item/event record in the recurtype_table has already been completed.'; publicadminfalse589'00#COLUMN recurtype.recurtype_schedcolCOMMENTCOMMENT ON COLUMN recurtype.recurtype_schedcol IS 'The name of the column in the recurtype_table holding the date or timestamp by which the item is scheduled to be completed or at which the event is supposed to occur.'; publicadminfalse589'00 COLUMN recurtype.recurtype_limitCOMMENTCOMMENT ON COLUMN recurtype.recurtype_limit IS 'A boolean expression that returns TRUE if the current user should see the row in the recurtype_table. NULL indicates there is no specific limitation. For example, the maintainance of recurring TODO items should restricted to those items belonging to the user unless s/he has been granted the privilege to modify other people''s todo lists.'; publicadminfalse589'00#COLUMN recurtype.recurtype_copyfuncCOMMENTXCOMMENT ON COLUMN recurtype.recurtype_copyfunc IS 'The name of the function to copy an existing item/event record. The copy function is expected to take at least 2 arguments: the id of the item to copy and the new date/timestamp. If the function accepts more than 2, it must be able to accept NULL values for the 3rd and following arguments.'; publicadminfalse589'00#COLUMN recurtype.recurtype_copyargsCOMMENTCOMMENT ON COLUMN recurtype.recurtype_copyargs IS 'An abbreviated argument list for the copy function. This is used to determine whether the second argument must be cast to a date or a timestamp, and to figure out how many additional arguments to pass.'; publicadminfalse589'00"COLUMN recurtype.recurtype_delfuncCOMMENTCOMMENT ON COLUMN recurtype.recurtype_delfunc IS 'The name of the function to delete an existing item/event record. The function is expected to take exactly one argument: the id of the item to delete. NULL indicates there is no delete function and that an SQL DELETE statement can be used. In this case, the id column name will be built as the recurtype_table concatenated with the "_id" suffix.'; publicadminfalse589'00 recurtypeACLREVOKE ALL ON TABLE recurtype FROM PUBLIC; REVOKE ALL ON TABLE recurtype FROM admin; GRANT ALL ON TABLE recurtype TO admin; GRANT ALL ON TABLE recurtype TO xtrole; publicadminfalse589N12591685939recurtype_recurtype_id_seqSEQUENCE|CREATE SEQUENCE recurtype_recurtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.recurtype_recurtype_id_seq; publicadminfalse8589'00recurtype_recurtype_id_seqSEQUENCE OWNED BYKALTER SEQUENCE recurtype_recurtype_id_seq OWNED BY recurtype.recurtype_id; publicadminfalse590'00recurtype_recurtype_id_seq SEQUENCE SETBSELECT pg_catalog.setval('recurtype_recurtype_id_seq', 59, true); publicadminfalse590'00recurtype_recurtype_id_seqACLREVOKE ALL ON SEQUENCE recurtype_recurtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE recurtype_recurtype_id_seq FROM admin; GRANT ALL ON SEQUENCE recurtype_recurtype_id_seq TO admin; GRANT ALL ON SEQUENCE recurtype_recurtype_id_seq TO xtrole; publicadminfalse590P12591685951recv_recv_id_seqSEQUENCErCREATE SEQUENCE recv_recv_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.recv_recv_id_seq; publicadminfalse8591'00recv_recv_id_seqSEQUENCE OWNED BY7ALTER SEQUENCE recv_recv_id_seq OWNED BY recv.recv_id; publicadminfalse592'00recv_recv_id_seq SEQUENCE SET9SELECT pg_catalog.setval('recv_recv_id_seq', 363, true); publicadminfalse592'00recv_recv_id_seqACLREVOKE ALL ON SEQUENCE recv_recv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE recv_recv_id_seq FROM admin; GRANT ALL ON SEQUENCE recv_recv_id_seq TO admin; GRANT ALL ON SEQUENCE recv_recv_id_seq TO xtrole; publicadminfalse592P12592006604remittoVIEW"CREATE VIEW remitto AS SELECT (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_name'::text)) AS remitto_name, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_address1'::text)) AS remitto_address1, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_address2'::text)) AS remitto_address2, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_address3'::text)) AS remitto_address3, (((((SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_city'::text)) || ' '::text) || (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_state'::text))) || ' '::text) || (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_zipcode'::text))) AS remitto_citystatezip, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_country'::text)) AS remitto_country, (SELECT metric.metric_value FROM metric WHERE (metric.metric_name = 'remitto_phone'::text)) AS remitto_phone; DROP VIEW public.remitto; publicadminfalse55448'00remittoACLREVOKE ALL ON TABLE remitto FROM PUBLIC; REVOKE ALL ON TABLE remitto FROM admin; GRANT ALL ON TABLE remitto TO admin; GRANT ALL ON TABLE remitto TO xtrole; publicadminfalse848Q12591685957rjctcodeTABLE CREATE TABLE rjctcode ( rjctcode_id integer DEFAULT nextval(('"rjctcode_rjctcode_id_seq"'::text)::regclass) NOT NULL, rjctcode_code text NOT NULL, rjctcode_descrip text, CONSTRAINT rjctcode_rjctcode_code_check CHECK ((rjctcode_code <> ''::text)) ); DROP TABLE public.rjctcode; publicadminfalse652265238 '00TABLE rjctcodeCOMMENT8COMMENT ON TABLE rjctcode IS 'Reject Code information'; publicadminfalse593!'00rjctcodeACLREVOKE ALL ON TABLE rjctcode FROM PUBLIC; REVOKE ALL ON TABLE rjctcode FROM admin; GRANT ALL ON TABLE rjctcode TO admin; GRANT ALL ON TABLE rjctcode TO xtrole; publicadminfalse593R12591685964rjctcode_rjctcode_id_seqSEQUENCECREATE SEQUENCE rjctcode_rjctcode_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.rjctcode_rjctcode_id_seq; publicadminfalse8"'00rjctcode_rjctcode_id_seq SEQUENCE SET@SELECT pg_catalog.setval('rjctcode_rjctcode_id_seq', 21, true); publicadminfalse594#'00rjctcode_rjctcode_id_seqACLREVOKE ALL ON SEQUENCE rjctcode_rjctcode_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE rjctcode_rjctcode_id_seq FROM admin; GRANT ALL ON SEQUENCE rjctcode_rjctcode_id_seq TO admin; GRANT ALL ON SEQUENCE rjctcode_rjctcode_id_seq TO xtrole; publicadminfalse594S12591685966rsncode_rsncode_id_seqSEQUENCExCREATE SEQUENCE rsncode_rsncode_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.rsncode_rsncode_id_seq; publicadminfalse8161$'00rsncode_rsncode_id_seqSEQUENCE OWNED BYCALTER SEQUENCE rsncode_rsncode_id_seq OWNED BY rsncode.rsncode_id; publicadminfalse595%'00rsncode_rsncode_id_seq SEQUENCE SET=SELECT pg_catalog.setval('rsncode_rsncode_id_seq', 2, true); publicadminfalse595&'00rsncode_rsncode_id_seqACLREVOKE ALL ON SEQUENCE rsncode_rsncode_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE rsncode_rsncode_id_seq FROM admin; GRANT ALL ON SEQUENCE rsncode_rsncode_id_seq TO admin; GRANT ALL ON SEQUENCE rsncode_rsncode_id_seq TO xtrole; publicadminfalse595T12591685968saleTABLE2CREATE TABLE sale ( sale_id integer DEFAULT nextval(('"sale_sale_id_seq"'::text)::regclass) NOT NULL, sale_name text NOT NULL, sale_descrip text, sale_ipshead_id integer, sale_startdate date, sale_enddate date, CONSTRAINT sale_sale_name_check CHECK ((sale_name <> ''::text)) ); DROP TABLE public.sale; publicadminfalse652465258''00 TABLE saleCOMMENT-COMMENT ON TABLE sale IS 'Sale information'; publicadminfalse596('00saleACLREVOKE ALL ON TABLE sale FROM PUBLIC; REVOKE ALL ON TABLE sale FROM admin; GRANT ALL ON TABLE sale TO admin; GRANT ALL ON TABLE sale TO xtrole; publicadminfalse596U12591685975sale_sale_id_seqSEQUENCErCREATE SEQUENCE sale_sale_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE public.sale_sale_id_seq; publicadminfalse8)'00sale_sale_id_seq SEQUENCE SET8SELECT pg_catalog.setval('sale_sale_id_seq', 12, true); publicadminfalse597*'00sale_sale_id_seqACLREVOKE ALL ON SEQUENCE sale_sale_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE sale_sale_id_seq FROM admin; GRANT ALL ON SEQUENCE sale_sale_id_seq TO admin; GRANT ALL ON SEQUENCE sale_sale_id_seq TO xtrole; publicadminfalse597V12591685977salesaccnt_salesaccnt_id_seqSEQUENCECREATE SEQUENCE salesaccnt_salesaccnt_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 3DROP SEQUENCE public.salesaccnt_salesaccnt_id_seq; publicadminfalse8+'00salesaccnt_salesaccnt_id_seq SEQUENCE SETDSELECT pg_catalog.setval('salesaccnt_salesaccnt_id_seq', 40, true); publicadminfalse598,'00salesaccnt_salesaccnt_id_seqACLREVOKE ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq TO admin; GRANT ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq TO xtrole; publicadminfalse598W12591685979salescat_salescat_id_seqSEQUENCEzCREATE SEQUENCE salescat_salescat_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.salescat_salescat_id_seq; publicadminfalse8162-'00salescat_salescat_id_seqSEQUENCE OWNED BYGALTER SEQUENCE salescat_salescat_id_seq OWNED BY salescat.salescat_id; publicadminfalse599.'00salescat_salescat_id_seq SEQUENCE SET?SELECT pg_catalog.setval('salescat_salescat_id_seq', 2, true); publicadminfalse599/'00salescat_salescat_id_seqACLREVOKE ALL ON SEQUENCE salescat_salescat_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE salescat_salescat_id_seq FROM admin; GRANT ALL ON SEQUENCE salescat_salescat_id_seq TO admin; GRANT ALL ON SEQUENCE salescat_salescat_id_seq TO xtrole; publicadminfalse599Q12592006608 saleshistoryVIEWCREATE VIEW saleshistory AS SELECT cohist.cohist_id, cohist.cohist_cust_id, cohist.cohist_itemsite_id, cohist.cohist_shipdate, cohist.cohist_shipvia, cohist.cohist_ordernumber, cohist.cohist_orderdate, cohist.cohist_invcnumber, cohist.cohist_invcdate, cohist.cohist_qtyshipped, cohist.cohist_unitprice, cohist.cohist_shipto_id, cohist.cohist_salesrep_id, cohist.cohist_duedate, cohist.cohist_imported, cohist.cohist_billtoname, cohist.cohist_billtoaddress1, cohist.cohist_billtoaddress2, cohist.cohist_billtoaddress3, cohist.cohist_billtocity, cohist.cohist_billtostate, cohist.cohist_billtozip, cohist.cohist_shiptoname, cohist.cohist_shiptoaddress1, cohist.cohist_shiptoaddress2, cohist.cohist_shiptoaddress3, cohist.cohist_shiptocity, cohist.cohist_shiptostate, cohist.cohist_shiptozip, cohist.cohist_commission, cohist.cohist_commissionpaid, cohist.cohist_unitcost, cohist.cohist_misc_type, cohist.cohist_misc_descrip, cohist.cohist_misc_id, cohist.cohist_doctype, cohist.cohist_promisedate, cohist.cohist_ponumber, cohist.cohist_curr_id, cohist.cohist_sequence, cohist.cohist_taxtype_id, cohist.cohist_taxzone_id, cohist.cohist_cohead_ccpay_id, cohist.cohist_saletype_id, cohist.cohist_shipzone_id, CASE WHEN (cohist.cohist_invcnumber = '-1'::text) THEN 'Credit'::text ELSE cohist.cohist_invcnumber END AS invoicenumber, custinfo.cust_id, custinfo.cust_number, custinfo.cust_name, custinfo.cust_curr_id, custinfo.cust_custtype_id, custtype.custtype_code, custtype.custtype_descrip, salesrep.salesrep_number, salesrep.salesrep_name, shipzone.shipzone_id, shipzone.shipzone_name, shipzone.shipzone_descrip, itemsite.itemsite_warehous_id, itemsite.itemsite_item_id, item.item_id, item.item_number, item.item_descrip1, ((item.item_descrip1 || ' '::text) || item.item_descrip2) AS itemdescription, item.item_prodcat_id, site.warehous_code, site.warehous_descrip, prodcat.prodcat_code, currtobase(cohist.cohist_curr_id, cohist.cohist_commission, cohist.cohist_invcdate) AS basecommission, currtobase(cohist.cohist_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate) AS baseunitprice, currtocurr(cohist.cohist_curr_id, custinfo.cust_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate) AS custunitprice, round((cohist.cohist_qtyshipped * cohist.cohist_unitprice), 2) AS extprice, round((cohist.cohist_qtyshipped * currtobase(cohist.cohist_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate)), 2) AS baseextprice, round((cohist.cohist_qtyshipped * currtocurr(cohist.cohist_curr_id, custinfo.cust_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate)), 2) AS custextprice, round((cohist.cohist_qtyshipped * cohist.cohist_unitcost), 4) AS extcost, currconcat(cohist.cohist_curr_id) AS currabbr, 'Return'::text AS cohist_invcdate_xtnullrole, 'qty'::text AS cohist_qtyshipped_xtnumericrole, 'salesprice'::text AS cohist_unitprice_xtnumericrole, 'salesprice'::text AS baseunitprice_xtnumericrole, 'curr'::text AS custunitprice_xtnumericrole, 'curr'::text AS custextprice_xtnumericrole, 'curr'::text AS extprice_xtnumericrole, 'curr'::text AS baseextprice_xtnumericrole, 'cost'::text AS cohist_unitcost_xtnumericrole, 'curr'::text AS extcost_xtnumericrole, 'curr'::text AS cohist_commission_xtnumericrole, 'curr'::text AS basecommission_xtnumericrole, 0 AS cohist_qtyshipped_xttotalrole, 0 AS custextprice_xttotalrole, 0 AS baseextprice_xttotalrole, 0 AS extcost_xttotalrole, 0 AS basecommission_xttotalrole FROM (((((((((cohist JOIN custinfo ON ((custinfo.cust_id = cohist.cohist_cust_id))) JOIN custtype ON ((custtype.custtype_id = custinfo.cust_custtype_id))) JOIN salesrep ON ((salesrep.salesrep_id = cohist.cohist_salesrep_id))) JOIN itemsite ON ((itemsite.itemsite_id = cohist.cohist_itemsite_id))) JOIN site() site(warehous_id, warehous_code, warehous_descrip, warehous_fob, warehous_active, warehous_counttag_prefix, warehous_counttag_number, warehous_bol_prefix, warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, warehous_aislesize, warehous_aislealpha, warehous_racksize, warehous_rackalpha, warehous_binsize, warehous_binalpha, warehous_locationsize, warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, warehous_shipping_commission, warehous_cntct_id, warehous_addr_id, warehous_transit, warehous_shipform_id, warehous_shipvia_id, warehous_shipcomments, warehous_costcat_id, warehous_sitetype_id, warehous_taxzone_id, warehous_sequence) ON ((site.warehous_id = itemsite.itemsite_warehous_id))) JOIN item ON ((item.item_id = itemsite.itemsite_item_id))) JOIN prodcat ON ((prodcat.prodcat_id = item.item_prodcat_id))) LEFT JOIN shiptoinfo ON ((shiptoinfo.shipto_id = cohist.cohist_shipto_id))) LEFT JOIN shipzone ON ((shipzone.shipzone_id = shiptoinfo.shipto_shipzone_id))); DROP VIEW public.saleshistory; publicadminfalse554580'00VIEW saleshistoryCOMMENTPCOMMENT ON VIEW saleshistory IS 'Single point for sales history calculations.'; publicadminfalse8491'00 saleshistoryACLREVOKE ALL ON TABLE saleshistory FROM PUBLIC; REVOKE ALL ON TABLE saleshistory FROM admin; GRANT ALL ON TABLE saleshistory TO admin; GRANT ALL ON TABLE saleshistory TO xtrole; publicadminfalse849R12592006613saleshistorymiscVIEWJCREATE VIEW saleshistorymisc AS SELECT cohist.cohist_id, cohist.cohist_cust_id, cohist.cohist_itemsite_id, cohist.cohist_shipdate, cohist.cohist_shipvia, cohist.cohist_ordernumber, cohist.cohist_orderdate, cohist.cohist_invcnumber, cohist.cohist_invcdate, cohist.cohist_qtyshipped, cohist.cohist_unitprice, cohist.cohist_shipto_id, cohist.cohist_salesrep_id, cohist.cohist_duedate, cohist.cohist_imported, cohist.cohist_billtoname, cohist.cohist_billtoaddress1, cohist.cohist_billtoaddress2, cohist.cohist_billtoaddress3, cohist.cohist_billtocity, cohist.cohist_billtostate, cohist.cohist_billtozip, cohist.cohist_shiptoname, cohist.cohist_shiptoaddress1, cohist.cohist_shiptoaddress2, cohist.cohist_shiptoaddress3, cohist.cohist_shiptocity, cohist.cohist_shiptostate, cohist.cohist_shiptozip, cohist.cohist_commission, cohist.cohist_commissionpaid, cohist.cohist_unitcost, cohist.cohist_misc_type, cohist.cohist_misc_descrip, cohist.cohist_misc_id, cohist.cohist_doctype, cohist.cohist_promisedate, cohist.cohist_ponumber, cohist.cohist_curr_id, cohist.cohist_sequence, cohist.cohist_taxtype_id, cohist.cohist_taxzone_id, cohist.cohist_cohead_ccpay_id, cohist.cohist_saletype_id, cohist.cohist_shipzone_id, CASE WHEN (cohist.cohist_invcnumber = '-1'::text) THEN 'Credit'::text ELSE cohist.cohist_invcnumber END AS invoicenumber, custinfo.cust_id, custinfo.cust_number, custinfo.cust_name, custinfo.cust_curr_id, custinfo.cust_custtype_id, custtype.custtype_code, salesrep.salesrep_number, salesrep.salesrep_name, shipzone.shipzone_id, shipzone.shipzone_name, itemsite.itemsite_warehous_id, itemsite.itemsite_item_id, item.item_number, item.item_descrip1, ((item.item_descrip1 || ' '::text) || item.item_descrip2) AS itemdescription, item.item_prodcat_id, site.warehous_code, prodcat.prodcat_code, currtobase(cohist.cohist_curr_id, cohist.cohist_commission, cohist.cohist_invcdate) AS basecommission, currtobase(cohist.cohist_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate) AS baseunitprice, currtocurr(cohist.cohist_curr_id, custinfo.cust_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate) AS custunitprice, round((cohist.cohist_qtyshipped * cohist.cohist_unitprice), 2) AS extprice, round((cohist.cohist_qtyshipped * currtobase(cohist.cohist_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate)), 2) AS baseextprice, round((cohist.cohist_qtyshipped * currtocurr(cohist.cohist_curr_id, custinfo.cust_curr_id, cohist.cohist_unitprice, cohist.cohist_invcdate)), 2) AS custextprice, round((cohist.cohist_qtyshipped * cohist.cohist_unitcost), 4) AS extcost, currconcat(cohist.cohist_curr_id) AS currabbr, 'Return'::text AS cohist_invcdate_xtnullrole, 'qty'::text AS cohist_qtyshipped_xtnumericrole, 'salesprice'::text AS cohist_unitprice_xtnumericrole, 'salesprice'::text AS baseunitprice_xtnumericrole, 'curr'::text AS custunitprice_xtnumericrole, 'curr'::text AS custextprice_xtnumericrole, 'curr'::text AS extprice_xtnumericrole, 'curr'::text AS baseextprice_xtnumericrole, 'cost'::text AS cohist_unitcost_xtnumericrole, 'curr'::text AS extcost_xtnumericrole, 'curr'::text AS cohist_commission_xtnumericrole, 'curr'::text AS basecommission_xtnumericrole, 0 AS cohist_qtyshipped_xttotalrole, 0 AS custextprice_xttotalrole, 0 AS baseextprice_xttotalrole, 0 AS extcost_xttotalrole, 0 AS basecommission_xttotalrole FROM (((((((((cohist JOIN custinfo ON ((custinfo.cust_id = cohist.cohist_cust_id))) JOIN custtype ON ((custtype.custtype_id = custinfo.cust_custtype_id))) JOIN salesrep ON ((salesrep.salesrep_id = cohist.cohist_salesrep_id))) LEFT JOIN itemsite ON ((itemsite.itemsite_id = cohist.cohist_itemsite_id))) LEFT JOIN site() site(warehous_id, warehous_code, warehous_descrip, warehous_fob, warehous_active, warehous_counttag_prefix, warehous_counttag_number, warehous_bol_prefix, warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, warehous_aislesize, warehous_aislealpha, warehous_racksize, warehous_rackalpha, warehous_binsize, warehous_binalpha, warehous_locationsize, warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, warehous_shipping_commission, warehous_cntct_id, warehous_addr_id, warehous_transit, warehous_shipform_id, warehous_shipvia_id, warehous_shipcomments, warehous_costcat_id, warehous_sitetype_id, warehous_taxzone_id, warehous_sequence) ON ((site.warehous_id = itemsite.itemsite_warehous_id))) LEFT JOIN item ON ((item.item_id = itemsite.itemsite_item_id))) LEFT JOIN prodcat ON ((prodcat.prodcat_id = item.item_prodcat_id))) LEFT JOIN shiptoinfo ON ((shiptoinfo.shipto_id = cohist.cohist_shipto_id))) LEFT JOIN shipzone ON ((shipzone.shipzone_id = shiptoinfo.shipto_shipzone_id))); #DROP VIEW public.saleshistorymisc; publicadminfalse554682'00VIEW saleshistorymiscCOMMENTlCOMMENT ON VIEW saleshistorymisc IS 'Single point for sales history (including misc. items) calculations.'; publicadminfalse8503'00saleshistorymiscACLREVOKE ALL ON TABLE saleshistorymisc FROM PUBLIC; REVOKE ALL ON TABLE saleshistorymisc FROM admin; GRANT ALL ON TABLE saleshistorymisc TO admin; GRANT ALL ON TABLE saleshistorymisc TO xtrole; publicadminfalse850X12591685991salesrep_salesrep_id_seqSEQUENCEzCREATE SEQUENCE salesrep_salesrep_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.salesrep_salesrep_id_seq; publicadminfalse84'00salesrep_salesrep_id_seq SEQUENCE SET@SELECT pg_catalog.setval('salesrep_salesrep_id_seq', 31, true); publicadminfalse6005'00salesrep_salesrep_id_seqACLREVOKE ALL ON SEQUENCE salesrep_salesrep_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE salesrep_salesrep_id_seq FROM admin; GRANT ALL ON SEQUENCE salesrep_salesrep_id_seq TO admin; GRANT ALL ON SEQUENCE salesrep_salesrep_id_seq TO xtrole; publicadminfalse60012591744594saletype_saletype_id_seqSEQUENCEzCREATE SEQUENCE saletype_saletype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.saletype_saletype_id_seq; publicadminfalse87226'00saletype_saletype_id_seqSEQUENCE OWNED BYGALTER SEQUENCE saletype_saletype_id_seq OWNED BY saletype.saletype_id; publicadminfalse7217'00saletype_saletype_id_seq SEQUENCE SET?SELECT pg_catalog.setval('saletype_saletype_id_seq', 3, true); publicadminfalse7218'00saletype_saletype_id_seqACLREVOKE ALL ON SEQUENCE saletype_saletype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE saletype_saletype_id_seq FROM admin; GRANT ALL ON SEQUENCE saletype_saletype_id_seq TO admin; GRANT ALL ON SEQUENCE saletype_saletype_id_seq TO xtrole; publicadminfalse721Y12591685993 schemaordTABLE/CREATE TABLE schemaord ( schemaord_id integer NOT NULL, schemaord_name text NOT NULL, schemaord_order integer NOT NULL, CONSTRAINT schemaord_schemaord_name_check CHECK ((length(schemaord_name) > 0)), CONSTRAINT schemaord_schemaord_name_check1 CHECK ((schemaord_name <> ''::text)) ); DROP TABLE public.schemaord; publicadminfalse6527652889'00TABLE schemaordCOMMENTnCOMMENT ON TABLE schemaord IS 'Set the order in which db schemas will appear in the search path after login'; publicadminfalse601:'00 schemaordACLREVOKE ALL ON TABLE schemaord FROM PUBLIC; REVOKE ALL ON TABLE schemaord FROM admin; GRANT ALL ON TABLE schemaord TO admin; GRANT ALL ON TABLE schemaord TO xtrole; publicadminfalse601Z12591686000schemaord_schemaord_id_seqSEQUENCE|CREATE SEQUENCE schemaord_schemaord_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 1DROP SEQUENCE public.schemaord_schemaord_id_seq; publicadminfalse8601;'00schemaord_schemaord_id_seqSEQUENCE OWNED BYKALTER SEQUENCE schemaord_schemaord_id_seq OWNED BY schemaord.schemaord_id; publicadminfalse602<'00schemaord_schemaord_id_seq SEQUENCE SETBSELECT pg_catalog.setval('schemaord_schemaord_id_seq', 1, false); publicadminfalse602='00schemaord_schemaord_id_seqACLREVOKE ALL ON SEQUENCE schemaord_schemaord_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE schemaord_schemaord_id_seq FROM admin; GRANT ALL ON SEQUENCE schemaord_schemaord_id_seq TO admin; GRANT ALL ON SEQUENCE schemaord_schemaord_id_seq TO xtrole; publicadminfalse602[12591686002sequenceTABLE6CREATE TABLE sequence ( sequence_value integer ); DROP TABLE public.sequence; publicadminfalse8>'00TABLE sequenceCOMMENTxCOMMENT ON TABLE sequence IS 'Pre-populated list of sequence numbers (1-1000) used for printing Labels and other uses'; publicadminfalse603?'00sequenceACLREVOKE ALL ON TABLE sequence FROM PUBLIC; REVOKE ALL ON TABLE sequence FROM admin; GRANT ALL ON TABLE sequence TO admin; GRANT ALL ON TABLE sequence TO xtrole; publicadminfalse603\12591686005shift_shift_id_seqSEQUENCEtCREATE SEQUENCE shift_shift_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.shift_shift_id_seq; publicadminfalse8215@'00shift_shift_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE shift_shift_id_seq OWNED BY shift.shift_id; publicadminfalse604A'00shift_shift_id_seq SEQUENCE SET9SELECT pg_catalog.setval('shift_shift_id_seq', 2, true); publicadminfalse604B'00shift_shift_id_seqACLREVOKE ALL ON SEQUENCE shift_shift_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shift_shift_id_seq FROM admin; GRANT ALL ON SEQUENCE shift_shift_id_seq TO admin; GRANT ALL ON SEQUENCE shift_shift_id_seq TO xtrole; publicadminfalse604]12591686007shipchrg_shipchrg_id_seqSEQUENCEzCREATE SEQUENCE shipchrg_shipchrg_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.shipchrg_shipchrg_id_seq; publicadminfalse8208C'00shipchrg_shipchrg_id_seqSEQUENCE OWNED BYGALTER SEQUENCE shipchrg_shipchrg_id_seq OWNED BY shipchrg.shipchrg_id; publicadminfalse605D'00shipchrg_shipchrg_id_seq SEQUENCE SET?SELECT pg_catalog.setval('shipchrg_shipchrg_id_seq', 4, true); publicadminfalse605E'00shipchrg_shipchrg_id_seqACLREVOKE ALL ON SEQUENCE shipchrg_shipchrg_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipchrg_shipchrg_id_seq FROM admin; GRANT ALL ON SEQUENCE shipchrg_shipchrg_id_seq TO admin; GRANT ALL ON SEQUENCE shipchrg_shipchrg_id_seq TO xtrole; publicadminfalse605^12591686009 shipdatasumTABLECREATE TABLE shipdatasum ( shipdatasum_cohead_number text NOT NULL, shipdatasum_cosmisc_tracknum text NOT NULL, shipdatasum_cosmisc_packnum_tracknum text NOT NULL, shipdatasum_weight numeric(16,4), shipdatasum_base_freight numeric(16,4), shipdatasum_total_freight numeric(16,4), shipdatasum_shipper text DEFAULT 'UPS'::text, shipdatasum_billing_option text, shipdatasum_package_type text, shipdatasum_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, shipdatasum_shipped boolean DEFAULT false, shipdatasum_shiphead_number text, shipdatasum_base_freight_curr_id integer DEFAULT basecurrid(), shipdatasum_total_freight_curr_id integer DEFAULT basecurrid() ); DROP TABLE public.shipdatasum; publicadminfalse652965306531653265338F'00TABLE shipdatasumCOMMENTCCOMMENT ON TABLE shipdatasum IS 'Shipping Interface information.'; publicadminfalse606G'00 shipdatasumACLREVOKE ALL ON TABLE shipdatasum FROM PUBLIC; REVOKE ALL ON TABLE shipdatasum FROM admin; GRANT ALL ON TABLE shipdatasum TO admin; GRANT ALL ON TABLE shipdatasum TO xtrole; publicadminfalse606_12591686020shipform_shipform_id_seqSEQUENCECREATE SEQUENCE shipform_shipform_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.shipform_shipform_id_seq; publicadminfalse8H'00shipform_shipform_id_seq SEQUENCE SET@SELECT pg_catalog.setval('shipform_shipform_id_seq', 13, true); publicadminfalse607I'00shipform_shipform_id_seqACLREVOKE ALL ON SEQUENCE shipform_shipform_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipform_shipform_id_seq FROM admin; GRANT ALL ON SEQUENCE shipform_shipform_id_seq TO admin; GRANT ALL ON SEQUENCE shipform_shipform_id_seq TO xtrole; publicadminfalse607a12591686033shiphead_shiphead_id_seqSEQUENCEzCREATE SEQUENCE shiphead_shiphead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.shiphead_shiphead_id_seq; publicadminfalse8608J'00shiphead_shiphead_id_seqSEQUENCE OWNED BYGALTER SEQUENCE shiphead_shiphead_id_seq OWNED BY shiphead.shiphead_id; publicadminfalse609K'00shiphead_shiphead_id_seq SEQUENCE SETASELECT pg_catalog.setval('shiphead_shiphead_id_seq', 323, true); publicadminfalse609L'00shiphead_shiphead_id_seqACLREVOKE ALL ON SEQUENCE shiphead_shiphead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shiphead_shiphead_id_seq FROM admin; GRANT ALL ON SEQUENCE shiphead_shiphead_id_seq TO admin; GRANT ALL ON SEQUENCE shiphead_shiphead_id_seq TO xtrole; publicadminfalse609b12591686035shipitem_shipitem_id_seqSEQUENCEzCREATE SEQUENCE shipitem_shipitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.shipitem_shipitem_id_seq; publicadminfalse8474M'00shipitem_shipitem_id_seqSEQUENCE OWNED BYGALTER SEQUENCE shipitem_shipitem_id_seq OWNED BY shipitem.shipitem_id; publicadminfalse610N'00shipitem_shipitem_id_seq SEQUENCE SETASELECT pg_catalog.setval('shipitem_shipitem_id_seq', 626, true); publicadminfalse610O'00shipitem_shipitem_id_seqACLREVOKE ALL ON SEQUENCE shipitem_shipitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipitem_shipitem_id_seq FROM admin; GRANT ALL ON SEQUENCE shipitem_shipitem_id_seq TO admin; GRANT ALL ON SEQUENCE shipitem_shipitem_id_seq TO xtrole; publicadminfalse610c12591686037shipment_number_seqSEQUENCEuCREATE SEQUENCE shipment_number_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; *DROP SEQUENCE public.shipment_number_seq; publicadminfalse8P'00shipment_number_seq SEQUENCE SET>SELECT pg_catalog.setval('shipment_number_seq', 60088, true); publicadminfalse611Q'00shipment_number_seqACLREVOKE ALL ON SEQUENCE shipment_number_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipment_number_seq FROM admin; GRANT ALL ON SEQUENCE shipment_number_seq TO admin; GRANT ALL ON SEQUENCE shipment_number_seq TO xtrole; publicadminfalse611Z12592006650shiptoVIEWCREATE VIEW shipto AS SELECT shiptoinfo.shipto_id, shiptoinfo.shipto_cust_id, shiptoinfo.shipto_name, m.addr_line1 AS shipto_address1, m.addr_line2 AS shipto_address2, m.addr_line3 AS shipto_address3, m.addr_city AS shipto_city, m.addr_state AS shipto_state, m.addr_postalcode AS shipto_zipcode, shiptoinfo.shipto_taxzone_id, shiptoinfo.shipto_salesrep_id, c1.cntct_phone AS shipto_phone, shiptoinfo.shipto_comments, shiptoinfo.shipto_shipcomments, btrim(((c1.cntct_first_name || ' '::text) || c1.cntct_last_name)) AS shipto_contact, c1.cntct_fax AS shipto_fax, c1.cntct_email AS shipto_email, shiptoinfo.shipto_shipzone_id, shiptoinfo.shipto_shipvia, shiptoinfo.shipto_commission, shiptoinfo.shipto_shipform_id, shiptoinfo.shipto_shipchrg_id, shiptoinfo.shipto_active, shiptoinfo.shipto_default, shiptoinfo.shipto_num, shiptoinfo.shipto_ediprofile_id, m.addr_country AS shipto_country FROM ((shiptoinfo LEFT JOIN cntct c1 ON ((shiptoinfo.shipto_cntct_id = c1.cntct_id))) LEFT JOIN addr m ON ((shiptoinfo.shipto_addr_id = m.addr_id))); DROP VIEW public.shipto; publicadminfalse55548R'00shiptoACLREVOKE ALL ON TABLE shipto FROM PUBLIC; REVOKE ALL ON TABLE shipto FROM admin; GRANT ALL ON TABLE shipto TO admin; GRANT ALL ON TABLE shipto TO xtrole; publicadminfalse858d12591686039shipto_shipto_id_seqSEQUENCE~CREATE SEQUENCE shipto_shipto_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.shipto_shipto_id_seq; publicadminfalse8S'00shipto_shipto_id_seq SEQUENCE SET<SELECT pg_catalog.setval('shipto_shipto_id_seq', 35, true); publicadminfalse612T'00shipto_shipto_id_seqACLREVOKE ALL ON SEQUENCE shipto_shipto_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipto_shipto_id_seq FROM admin; GRANT ALL ON SEQUENCE shipto_shipto_id_seq TO admin; GRANT ALL ON SEQUENCE shipto_shipto_id_seq TO xtrole; publicadminfalse612e12591686041shipvia_shipvia_id_seqSEQUENCECREATE SEQUENCE shipvia_shipvia_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.shipvia_shipvia_id_seq; publicadminfalse8U'00shipvia_shipvia_id_seq SEQUENCE SET>SELECT pg_catalog.setval('shipvia_shipvia_id_seq', 14, true); publicadminfalse613V'00shipvia_shipvia_id_seqACLREVOKE ALL ON SEQUENCE shipvia_shipvia_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipvia_shipvia_id_seq FROM admin; GRANT ALL ON SEQUENCE shipvia_shipvia_id_seq TO admin; GRANT ALL ON SEQUENCE shipvia_shipvia_id_seq TO xtrole; publicadminfalse613f12591686043shipzone_shipzone_id_seqSEQUENCECREATE SEQUENCE shipzone_shipzone_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.shipzone_shipzone_id_seq; publicadminfalse8W'00shipzone_shipzone_id_seq SEQUENCE SET@SELECT pg_catalog.setval('shipzone_shipzone_id_seq', 37, true); publicadminfalse614X'00shipzone_shipzone_id_seqACLREVOKE ALL ON SEQUENCE shipzone_shipzone_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE shipzone_shipzone_id_seq FROM admin; GRANT ALL ON SEQUENCE shipzone_shipzone_id_seq TO admin; GRANT ALL ON SEQUENCE shipzone_shipzone_id_seq TO xtrole; publicadminfalse614g12591686045sitetype_sitetype_id_seqSEQUENCEzCREATE SEQUENCE sitetype_sitetype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.sitetype_sitetype_id_seq; publicadminfalse8257Y'00sitetype_sitetype_id_seqSEQUENCE OWNED BYGALTER SEQUENCE sitetype_sitetype_id_seq OWNED BY sitetype.sitetype_id; publicadminfalse615Z'00sitetype_sitetype_id_seq SEQUENCE SET?SELECT pg_catalog.setval('sitetype_sitetype_id_seq', 5, true); publicadminfalse615['00sitetype_sitetype_id_seqACLREVOKE ALL ON SEQUENCE sitetype_sitetype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE sitetype_sitetype_id_seq FROM admin; GRANT ALL ON SEQUENCE sitetype_sitetype_id_seq TO admin; GRANT ALL ON SEQUENCE sitetype_sitetype_id_seq TO xtrole; publicadminfalse615h12591686047sltransTABLECREATE TABLE sltrans ( sltrans_id integer DEFAULT nextval('gltrans_gltrans_id_seq'::regclass) NOT NULL, sltrans_created timestamp with time zone, sltrans_date date NOT NULL, sltrans_sequence integer, sltrans_accnt_id integer NOT NULL, sltrans_source text, sltrans_docnumber text, sltrans_misc_id integer, sltrans_amount numeric(20,2) NOT NULL, sltrans_notes text, sltrans_journalnumber integer, sltrans_posted boolean NOT NULL, sltrans_doctype text, sltrans_username text DEFAULT geteffectivextuser() NOT NULL, sltrans_gltrans_journalnumber integer, sltrans_rec boolean DEFAULT false NOT NULL ); DROP TABLE public.sltrans; publicadminfalse6541654265438\'00 TABLE sltransCOMMENT?COMMENT ON TABLE sltrans IS 'Journal transaction information'; publicadminfalse616]'00sltransACLREVOKE ALL ON TABLE sltrans FROM PUBLIC; REVOKE ALL ON TABLE sltrans FROM admin; GRANT ALL ON TABLE sltrans TO admin; GRANT ALL ON TABLE sltrans TO xtrole; publicadminfalse616i12591686056sltrans_backupTABLEXCREATE TABLE sltrans_backup ( sltrans_old_id integer, sltrans_new_id integer ); "DROP TABLE public.sltrans_backup; publicadminfalse8^'00TABLE sltrans_backupCOMMENTjCOMMENT ON TABLE sltrans_backup IS 'backup cross references of old and new ids for sltrans 4.0 upgrade.'; publicadminfalse617[12592006655sopackVIEWCREATE VIEW sopack AS SELECT pack.pack_id AS sopack_id, pack.pack_head_id AS sopack_sohead_id, pack.pack_printed AS sopack_printed, pack.pack_shiphead_id AS sopack_cosmisc_id FROM pack WHERE (pack.pack_head_type = 'SO'::text); DROP VIEW public.sopack; publicadminfalse55558_'00sopackACLREVOKE ALL ON TABLE sopack FROM PUBLIC; REVOKE ALL ON TABLE sopack FROM admin; GRANT ALL ON TABLE sopack TO admin; GRANT ALL ON TABLE sopack TO xtrole; publicadminfalse859j12591686059sopack_sopack_id_seqSEQUENCEvCREATE SEQUENCE sopack_sopack_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.sopack_sopack_id_seq; publicadminfalse8`'00sopack_sopack_id_seq SEQUENCE SET<SELECT pg_catalog.setval('sopack_sopack_id_seq', 65, true); publicadminfalse618a'00sopack_sopack_id_seqACLREVOKE ALL ON SEQUENCE sopack_sopack_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE sopack_sopack_id_seq FROM admin; GRANT ALL ON SEQUENCE sopack_sopack_id_seq TO admin; GRANT ALL ON SEQUENCE sopack_sopack_id_seq TO xtrole; publicadminfalse618k12591686061sourceTABLECREATE TABLE source ( source_id integer NOT NULL, source_module text, source_name text NOT NULL, source_descrip text, CONSTRAINT source_source_name_check CHECK ((source_name <> ''::text)) ); DROP TABLE public.source; publicadminfalse65458b'00 TABLE sourceCOMMENT4COMMENT ON TABLE source IS 'Tax class information'; publicadminfalse619c'00COLUMN source.source_idCOMMENT5COMMENT ON COLUMN source.source_id IS 'Primary key'; publicadminfalse619d'00COLUMN source.source_moduleCOMMENT@COMMENT ON COLUMN source.source_module IS 'Application module'; publicadminfalse619e'00COLUMN source.source_nameCOMMENT0COMMENT ON COLUMN source.source_name IS 'Name'; publicadminfalse619f'00COLUMN source.source_descripCOMMENT:COMMENT ON COLUMN source.source_descrip IS 'Description'; publicadminfalse619g'00sourceACLREVOKE ALL ON TABLE source FROM PUBLIC; REVOKE ALL ON TABLE source FROM admin; GRANT ALL ON TABLE source TO admin; GRANT ALL ON TABLE source TO xtrole; publicadminfalse619l12591686067source_source_id_seqSEQUENCEvCREATE SEQUENCE source_source_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.source_source_id_seq; publicadminfalse8619h'00source_source_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE source_source_id_seq OWNED BY source.source_id; publicadminfalse620i'00source_source_id_seq SEQUENCE SET<SELECT pg_catalog.setval('source_source_id_seq', 38, true); publicadminfalse620j'00source_source_id_seqACLREVOKE ALL ON SEQUENCE source_source_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE source_source_id_seq FROM admin; GRANT ALL ON SEQUENCE source_source_id_seq TO admin; GRANT ALL ON SEQUENCE source_source_id_seq TO xtrole; publicadminfalse620m12591686069stateTABLECREATE TABLE state ( state_id integer NOT NULL, state_name text NOT NULL, state_abbr text, state_country_id integer, CONSTRAINT state_state_name_check CHECK ((state_name <> ''::text)) ); DROP TABLE public.state; publicadminfalse65478k'00 TABLE stateCOMMENTkCOMMENT ON TABLE state IS 'List of states, provinces, and territories associated with various countries.'; publicadminfalse621l'00stateACLREVOKE ALL ON TABLE state FROM PUBLIC; REVOKE ALL ON TABLE state FROM admin; GRANT ALL ON TABLE state TO admin; GRANT ALL ON TABLE state TO xtrole; publicadminfalse621n12591686075state_state_id_seqSEQUENCEtCREATE SEQUENCE state_state_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.state_state_id_seq; publicadminfalse8621m'00state_state_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE state_state_id_seq OWNED BY state.state_id; publicadminfalse622n'00state_state_id_seq SEQUENCE SET;SELECT pg_catalog.setval('state_state_id_seq', 158, true); publicadminfalse622o'00state_state_id_seqACLREVOKE ALL ON SEQUENCE state_state_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE state_state_id_seq FROM admin; GRANT ALL ON SEQUENCE state_state_id_seq TO admin; GRANT ALL ON SEQUENCE state_state_id_seq TO xtrole; publicadminfalse622o12591686077statusTABLECREATE TABLE status ( status_id integer NOT NULL, status_type text NOT NULL, status_code character(1) NOT NULL, status_name text, status_seq integer, status_color text DEFAULT 'white'::text ); DROP TABLE public.status; publicadminfalse65498p'00statusACLREVOKE ALL ON TABLE status FROM PUBLIC; REVOKE ALL ON TABLE status FROM admin; GRANT ALL ON TABLE status TO admin; GRANT ALL ON TABLE status TO xtrole; publicadminfalse623p12591686084status_status_id_seqSEQUENCEvCREATE SEQUENCE status_status_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.status_status_id_seq; publicadminfalse8623q'00status_status_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE status_status_id_seq OWNED BY status.status_id; publicadminfalse624r'00status_status_id_seq SEQUENCE SET;SELECT pg_catalog.setval('status_status_id_seq', 6, true); publicadminfalse624s'00status_status_id_seqACLREVOKE ALL ON SEQUENCE status_status_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE status_status_id_seq FROM admin; GRANT ALL ON SEQUENCE status_status_id_seq TO admin; GRANT ALL ON SEQUENCE status_status_id_seq TO xtrole; publicadminfalse624q12591686086stdjrnlTABLECREATE TABLE stdjrnl ( stdjrnl_id integer NOT NULL, stdjrnl_name text NOT NULL, stdjrnl_descrip text, stdjrnl_notes text, CONSTRAINT stdjrnl_stdjrnl_name_check CHECK ((stdjrnl_name <> ''::text)) ); DROP TABLE public.stdjrnl; publicadminfalse65518t'00 TABLE stdjrnlCOMMENT<COMMENT ON TABLE stdjrnl IS 'Standard Journal information'; publicadminfalse625u'00stdjrnlACLREVOKE ALL ON TABLE stdjrnl FROM PUBLIC; REVOKE ALL ON TABLE stdjrnl FROM admin; GRANT ALL ON TABLE stdjrnl TO admin; GRANT ALL ON TABLE stdjrnl TO xtrole; publicadminfalse625r12591686092stdjrnl_stdjrnl_id_seqSEQUENCExCREATE SEQUENCE stdjrnl_stdjrnl_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.stdjrnl_stdjrnl_id_seq; publicadminfalse8625v'00stdjrnl_stdjrnl_id_seqSEQUENCE OWNED BYCALTER SEQUENCE stdjrnl_stdjrnl_id_seq OWNED BY stdjrnl.stdjrnl_id; publicadminfalse626w'00stdjrnl_stdjrnl_id_seq SEQUENCE SET>SELECT pg_catalog.setval('stdjrnl_stdjrnl_id_seq', 33, true); publicadminfalse626x'00stdjrnl_stdjrnl_id_seqACLREVOKE ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq FROM admin; GRANT ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq TO admin; GRANT ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq TO xtrole; publicadminfalse626s12591686094 stdjrnlgrpTABLECREATE TABLE stdjrnlgrp ( stdjrnlgrp_id integer NOT NULL, stdjrnlgrp_name text NOT NULL, stdjrnlgrp_descrip text, CONSTRAINT stdjrnlgrp_stdjrnlgrp_name_check CHECK ((stdjrnlgrp_name <> ''::text)) ); DROP TABLE public.stdjrnlgrp; publicadminfalse65538y'00TABLE stdjrnlgrpCOMMENTECOMMENT ON TABLE stdjrnlgrp IS 'Standard Journal Group information'; publicadminfalse627z'00 stdjrnlgrpACLREVOKE ALL ON TABLE stdjrnlgrp FROM PUBLIC; REVOKE ALL ON TABLE stdjrnlgrp FROM admin; GRANT ALL ON TABLE stdjrnlgrp TO admin; GRANT ALL ON TABLE stdjrnlgrp TO xtrole; publicadminfalse627t12591686100stdjrnlgrp_stdjrnlgrp_id_seqSEQUENCE~CREATE SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 3DROP SEQUENCE public.stdjrnlgrp_stdjrnlgrp_id_seq; publicadminfalse6278{'00stdjrnlgrp_stdjrnlgrp_id_seqSEQUENCE OWNED BYOALTER SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq OWNED BY stdjrnlgrp.stdjrnlgrp_id; publicadminfalse628|'00stdjrnlgrp_stdjrnlgrp_id_seq SEQUENCE SETDSELECT pg_catalog.setval('stdjrnlgrp_stdjrnlgrp_id_seq', 13, true); publicadminfalse628}'00stdjrnlgrp_stdjrnlgrp_id_seqACLREVOKE ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq TO admin; GRANT ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq TO xtrole; publicadminfalse628u12591686102stdjrnlgrpitemTABLE%CREATE TABLE stdjrnlgrpitem ( stdjrnlgrpitem_id integer NOT NULL, stdjrnlgrpitem_stdjrnl_id integer, stdjrnlgrpitem_toapply integer, stdjrnlgrpitem_applied integer, stdjrnlgrpitem_effective date, stdjrnlgrpitem_expires date, stdjrnlgrpitem_stdjrnlgrp_id integer ); "DROP TABLE public.stdjrnlgrpitem; publicadminfalse8~'00TABLE stdjrnlgrpitemCOMMENTNCOMMENT ON TABLE stdjrnlgrpitem IS 'Standard Journal Group Item information'; publicadminfalse629'00stdjrnlgrpitemACLREVOKE ALL ON TABLE stdjrnlgrpitem FROM PUBLIC; REVOKE ALL ON TABLE stdjrnlgrpitem FROM admin; GRANT ALL ON TABLE stdjrnlgrpitem TO admin; GRANT ALL ON TABLE stdjrnlgrpitem TO xtrole; publicadminfalse629v12591686105$stdjrnlgrpitem_stdjrnlgrpitem_id_seqSEQUENCECREATE SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; ;DROP SEQUENCE public.stdjrnlgrpitem_stdjrnlgrpitem_id_seq; publicadminfalse8629'00$stdjrnlgrpitem_stdjrnlgrpitem_id_seqSEQUENCE OWNED BY_ALTER SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq OWNED BY stdjrnlgrpitem.stdjrnlgrpitem_id; publicadminfalse630'00$stdjrnlgrpitem_stdjrnlgrpitem_id_seq SEQUENCE SETLSELECT pg_catalog.setval('stdjrnlgrpitem_stdjrnlgrpitem_id_seq', 19, true); publicadminfalse630'00$stdjrnlgrpitem_stdjrnlgrpitem_id_seqACLREVOKE ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq FROM admin; GRANT ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq TO admin; GRANT ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq TO xtrole; publicadminfalse630w12591686107 stdjrnlitemTABLECREATE TABLE stdjrnlitem ( stdjrnlitem_id integer NOT NULL, stdjrnlitem_stdjrnl_id integer NOT NULL, stdjrnlitem_accnt_id integer NOT NULL, stdjrnlitem_amount numeric(20,2) NOT NULL, stdjrnlitem_notes text ); DROP TABLE public.stdjrnlitem; publicadminfalse8'00TABLE stdjrnlitemCOMMENTECOMMENT ON TABLE stdjrnlitem IS 'Standard Journal Item information'; publicadminfalse631'00 stdjrnlitemACLREVOKE ALL ON TABLE stdjrnlitem FROM PUBLIC; REVOKE ALL ON TABLE stdjrnlitem FROM admin; GRANT ALL ON TABLE stdjrnlitem TO admin; GRANT ALL ON TABLE stdjrnlitem TO xtrole; publicadminfalse631x12591686113stdjrnlitem_stdjrnlitem_id_seqSEQUENCECREATE SEQUENCE stdjrnlitem_stdjrnlitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 5DROP SEQUENCE public.stdjrnlitem_stdjrnlitem_id_seq; publicadminfalse8631'00stdjrnlitem_stdjrnlitem_id_seqSEQUENCE OWNED BYSALTER SEQUENCE stdjrnlitem_stdjrnlitem_id_seq OWNED BY stdjrnlitem.stdjrnlitem_id; publicadminfalse632'00stdjrnlitem_stdjrnlitem_id_seq SEQUENCE SETFSELECT pg_catalog.setval('stdjrnlitem_stdjrnlitem_id_seq', 40, true); publicadminfalse632'00stdjrnlitem_stdjrnlitem_id_seqACLREVOKE ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq FROM admin; GRANT ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq TO admin; GRANT ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq TO xtrole; publicadminfalse632y12591686115subaccntTABLECREATE TABLE subaccnt ( subaccnt_id integer NOT NULL, subaccnt_number text NOT NULL, subaccnt_descrip text, CONSTRAINT subaccnt_subaccnt_number_check CHECK ((subaccnt_number <> ''::text)) ); DROP TABLE public.subaccnt; publicadminfalse65578'00TABLE subaccntCOMMENT7COMMENT ON TABLE subaccnt IS 'Subaccount information'; publicadminfalse633'00subaccntACLREVOKE ALL ON TABLE subaccnt FROM PUBLIC; REVOKE ALL ON TABLE subaccnt FROM admin; GRANT ALL ON TABLE subaccnt TO admin; GRANT ALL ON TABLE subaccnt TO xtrole; publicadminfalse633z12591686121subaccnt_subaccnt_id_seqSEQUENCEzCREATE SEQUENCE subaccnt_subaccnt_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.subaccnt_subaccnt_id_seq; publicadminfalse8633'00subaccnt_subaccnt_id_seqSEQUENCE OWNED BYGALTER SEQUENCE subaccnt_subaccnt_id_seq OWNED BY subaccnt.subaccnt_id; publicadminfalse634'00subaccnt_subaccnt_id_seq SEQUENCE SET?SELECT pg_catalog.setval('subaccnt_subaccnt_id_seq', 1, true); publicadminfalse634'00subaccnt_subaccnt_id_seqACLREVOKE ALL ON SEQUENCE subaccnt_subaccnt_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE subaccnt_subaccnt_id_seq FROM admin; GRANT ALL ON SEQUENCE subaccnt_subaccnt_id_seq TO admin; GRANT ALL ON SEQUENCE subaccnt_subaccnt_id_seq TO xtrole; publicadminfalse634{12591686123 subaccnttypeTABLECREATE TABLE subaccnttype ( subaccnttype_id integer NOT NULL, subaccnttype_accnt_type character(1) NOT NULL, subaccnttype_code text NOT NULL, subaccnttype_descrip text ); DROP TABLE public.subaccnttype; publicadminfalse8'00TABLE subaccnttypeCOMMENTDCOMMENT ON TABLE subaccnttype IS 'User defined Sub Account Types.'; publicadminfalse635'00 subaccnttypeACLREVOKE ALL ON TABLE subaccnttype FROM PUBLIC; REVOKE ALL ON TABLE subaccnttype FROM admin; GRANT ALL ON TABLE subaccnttype TO admin; GRANT ALL ON TABLE subaccnttype TO xtrole; publicadminfalse635|12591686129 subaccnttype_subaccnttype_id_seqSEQUENCECREATE SEQUENCE subaccnttype_subaccnttype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 7DROP SEQUENCE public.subaccnttype_subaccnttype_id_seq; publicadminfalse8635'00 subaccnttype_subaccnttype_id_seqSEQUENCE OWNED BYWALTER SEQUENCE subaccnttype_subaccnttype_id_seq OWNED BY subaccnttype.subaccnttype_id; publicadminfalse636'00 subaccnttype_subaccnttype_id_seq SEQUENCE SETHSELECT pg_catalog.setval('subaccnttype_subaccnttype_id_seq', 21, true); publicadminfalse636'00 subaccnttype_subaccnttype_id_seqACL REVOKE ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq FROM admin; GRANT ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq TO admin; GRANT ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq TO xtrole; publicadminfalse636}12591686131tax_tax_id_seqSEQUENCEpCREATE SEQUENCE tax_tax_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; %DROP SEQUENCE public.tax_tax_id_seq; publicadminfalse8'00tax_tax_id_seq SEQUENCE SET6SELECT pg_catalog.setval('tax_tax_id_seq', 18, true); publicadminfalse637'00tax_tax_id_seqACLREVOKE ALL ON SEQUENCE tax_tax_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE tax_tax_id_seq FROM admin; GRANT ALL ON SEQUENCE tax_tax_id_seq TO admin; GRANT ALL ON SEQUENCE tax_tax_id_seq TO xtrole; publicadminfalse637~12591686133taxassTABLECREATE TABLE taxass ( taxass_id integer NOT NULL, taxass_taxzone_id integer, taxass_taxtype_id integer, taxass_tax_id integer NOT NULL ); DROP TABLE public.taxass; publicadminfalse8'00 TABLE taxassCOMMENTCOMMENT ON TABLE taxass IS 'The tax assignment table associates different tax zones and tax types to a given set of tax codes.'; publicadminfalse638'00COLUMN taxass.taxass_taxzone_idCOMMENTjCOMMENT ON COLUMN taxass.taxass_taxzone_id IS 'The id of the tax zone. If NULL any tax zone will apply.'; publicadminfalse638'00COLUMN taxass.taxass_taxtype_idCOMMENTjCOMMENT ON COLUMN taxass.taxass_taxtype_id IS 'The id of the tax type. If NULL any tax type will apply.'; publicadminfalse638'00COLUMN taxass.taxass_tax_idCOMMENTECOMMENT ON COLUMN taxass.taxass_tax_id IS 'The id of the tax code.'; publicadminfalse638'00taxassACLREVOKE ALL ON TABLE taxass FROM PUBLIC; REVOKE ALL ON TABLE taxass FROM admin; GRANT ALL ON TABLE taxass TO admin; GRANT ALL ON TABLE taxass TO xtrole; publicadminfalse63812591686136taxass_taxass_id_seqSEQUENCEvCREATE SEQUENCE taxass_taxass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.taxass_taxass_id_seq; publicadminfalse8638'00taxass_taxass_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE taxass_taxass_id_seq OWNED BY taxass.taxass_id; publicadminfalse639'00taxass_taxass_id_seq SEQUENCE SET;SELECT pg_catalog.setval('taxass_taxass_id_seq', 4, true); publicadminfalse639'00taxass_taxass_id_seqACLREVOKE ALL ON SEQUENCE taxass_taxass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxass_taxass_id_seq FROM admin; GRANT ALL ON SEQUENCE taxass_taxass_id_seq TO admin; GRANT ALL ON SEQUENCE taxass_taxass_id_seq TO xtrole; publicadminfalse63912591686138taxauth_taxauth_id_seqSEQUENCExCREATE SEQUENCE taxauth_taxauth_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.taxauth_taxauth_id_seq; publicadminfalse8210'00taxauth_taxauth_id_seqSEQUENCE OWNED BYCALTER SEQUENCE taxauth_taxauth_id_seq OWNED BY taxauth.taxauth_id; publicadminfalse640'00taxauth_taxauth_id_seq SEQUENCE SET=SELECT pg_catalog.setval('taxauth_taxauth_id_seq', 3, true); publicadminfalse640'00taxauth_taxauth_id_seqACLREVOKE ALL ON SEQUENCE taxauth_taxauth_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxauth_taxauth_id_seq FROM admin; GRANT ALL ON SEQUENCE taxauth_taxauth_id_seq TO admin; GRANT ALL ON SEQUENCE taxauth_taxauth_id_seq TO xtrole; publicadminfalse64012591686140taxclassTABLECREATE TABLE taxclass ( taxclass_id integer NOT NULL, taxclass_code text NOT NULL, taxclass_descrip text, taxclass_sequence integer, CONSTRAINT taxclass_taxclass_code_check CHECK ((taxclass_code <> ''::text)) ); DROP TABLE public.taxclass; publicadminfalse65618'00TABLE taxclassCOMMENT6COMMENT ON TABLE taxclass IS 'Tax class information'; publicadminfalse641'00COLUMN taxclass.taxclass_idCOMMENT9COMMENT ON COLUMN taxclass.taxclass_id IS 'Primary key'; publicadminfalse641'00COLUMN taxclass.taxclass_codeCOMMENT4COMMENT ON COLUMN taxclass.taxclass_code IS 'Code'; publicadminfalse641'00 COLUMN taxclass.taxclass_descripCOMMENT>COMMENT ON COLUMN taxclass.taxclass_descrip IS 'Description'; publicadminfalse641'00!COLUMN taxclass.taxclass_sequenceCOMMENTBCOMMENT ON COLUMN taxclass.taxclass_sequence IS 'Group sequence'; publicadminfalse641'00taxclassACLREVOKE ALL ON TABLE taxclass FROM PUBLIC; REVOKE ALL ON TABLE taxclass FROM admin; GRANT ALL ON TABLE taxclass TO admin; GRANT ALL ON TABLE taxclass TO xtrole; publicadminfalse64112591686146taxclass_taxclass_id_seqSEQUENCEzCREATE SEQUENCE taxclass_taxclass_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.taxclass_taxclass_id_seq; publicadminfalse8641'00taxclass_taxclass_id_seqSEQUENCE OWNED BYGALTER SEQUENCE taxclass_taxclass_id_seq OWNED BY taxclass.taxclass_id; publicadminfalse642'00taxclass_taxclass_id_seq SEQUENCE SET?SELECT pg_catalog.setval('taxclass_taxclass_id_seq', 3, true); publicadminfalse642'00taxclass_taxclass_id_seqACLREVOKE ALL ON SEQUENCE taxclass_taxclass_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxclass_taxclass_id_seq FROM admin; GRANT ALL ON SEQUENCE taxclass_taxclass_id_seq TO admin; GRANT ALL ON SEQUENCE taxclass_taxclass_id_seq TO xtrole; publicadminfalse64212591686148taxrateTABLE CREATE TABLE taxrate ( taxrate_id integer NOT NULL, taxrate_tax_id integer NOT NULL, taxrate_percent numeric(10,6) NOT NULL, taxrate_curr_id integer, taxrate_amount numeric(16,2) NOT NULL, taxrate_effective date, taxrate_expires date ); DROP TABLE public.taxrate; publicadminfalse8'00 TABLE taxrateCOMMENT*COMMENT ON TABLE taxrate IS 'Tax rates.'; publicadminfalse643'00COLUMN taxrate.taxrate_idCOMMENT8COMMENT ON COLUMN taxrate.taxrate_id IS 'Primary key.'; publicadminfalse643'00COLUMN taxrate.taxrate_tax_idCOMMENTNCOMMENT ON COLUMN taxrate.taxrate_tax_id IS 'The id of the parent tax code.'; publicadminfalse643'00COLUMN taxrate.taxrate_percentCOMMENTECOMMENT ON COLUMN taxrate.taxrate_percent IS 'Tax rate percentage.'; publicadminfalse643'00COLUMN taxrate.taxrate_curr_idCOMMENTYCOMMENT ON COLUMN taxrate.taxrate_curr_id IS 'The currency id of the flat rate amount.'; publicadminfalse643'00COLUMN taxrate.taxrate_amountCOMMENTECOMMENT ON COLUMN taxrate.taxrate_amount IS 'Flat tax rate amount.'; publicadminfalse643'00 COLUMN taxrate.taxrate_effectiveCOMMENTpCOMMENT ON COLUMN taxrate.taxrate_effective IS 'The effective date of the tax rate. NULL value means always.'; publicadminfalse643'00COLUMN taxrate.taxrate_expiresCOMMENTjCOMMENT ON COLUMN taxrate.taxrate_expires IS 'The expire date of the tax rate. NULL value means never.'; publicadminfalse643'00taxrateACLREVOKE ALL ON TABLE taxrate FROM PUBLIC; REVOKE ALL ON TABLE taxrate FROM admin; GRANT ALL ON TABLE taxrate TO admin; GRANT ALL ON TABLE taxrate TO xtrole; publicadminfalse64312591686151taxrate_taxrate_id_seqSEQUENCExCREATE SEQUENCE taxrate_taxrate_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.taxrate_taxrate_id_seq; publicadminfalse8643'00taxrate_taxrate_id_seqSEQUENCE OWNED BYCALTER SEQUENCE taxrate_taxrate_id_seq OWNED BY taxrate.taxrate_id; publicadminfalse644'00taxrate_taxrate_id_seq SEQUENCE SET=SELECT pg_catalog.setval('taxrate_taxrate_id_seq', 6, true); publicadminfalse644'00taxrate_taxrate_id_seqACLREVOKE ALL ON SEQUENCE taxrate_taxrate_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxrate_taxrate_id_seq FROM admin; GRANT ALL ON SEQUENCE taxrate_taxrate_id_seq TO admin; GRANT ALL ON SEQUENCE taxrate_taxrate_id_seq TO xtrole; publicadminfalse64412591686153taxreg_taxreg_id_seqSEQUENCEvCREATE SEQUENCE taxreg_taxreg_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.taxreg_taxreg_id_seq; publicadminfalse8211'00taxreg_taxreg_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE taxreg_taxreg_id_seq OWNED BY taxreg.taxreg_id; publicadminfalse645'00taxreg_taxreg_id_seq SEQUENCE SET<SELECT pg_catalog.setval('taxreg_taxreg_id_seq', 1, false); publicadminfalse645'00taxreg_taxreg_id_seqACLREVOKE ALL ON SEQUENCE taxreg_taxreg_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxreg_taxreg_id_seq FROM admin; GRANT ALL ON SEQUENCE taxreg_taxreg_id_seq TO admin; GRANT ALL ON SEQUENCE taxreg_taxreg_id_seq TO xtrole; publicadminfalse64512591686155taxtype_taxtype_id_seqSEQUENCExCREATE SEQUENCE taxtype_taxtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.taxtype_taxtype_id_seq; publicadminfalse8170'00taxtype_taxtype_id_seqSEQUENCE OWNED BYCALTER SEQUENCE taxtype_taxtype_id_seq OWNED BY taxtype.taxtype_id; publicadminfalse646'00taxtype_taxtype_id_seq SEQUENCE SET=SELECT pg_catalog.setval('taxtype_taxtype_id_seq', 3, true); publicadminfalse646'00taxtype_taxtype_id_seqACLREVOKE ALL ON SEQUENCE taxtype_taxtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxtype_taxtype_id_seq FROM admin; GRANT ALL ON SEQUENCE taxtype_taxtype_id_seq TO admin; GRANT ALL ON SEQUENCE taxtype_taxtype_id_seq TO xtrole; publicadminfalse64612591686157taxzone_taxzone_id_seqSEQUENCExCREATE SEQUENCE taxzone_taxzone_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.taxzone_taxzone_id_seq; publicadminfalse8166'00taxzone_taxzone_id_seqSEQUENCE OWNED BYCALTER SEQUENCE taxzone_taxzone_id_seq OWNED BY taxzone.taxzone_id; publicadminfalse647'00taxzone_taxzone_id_seq SEQUENCE SET=SELECT pg_catalog.setval('taxzone_taxzone_id_seq', 4, true); publicadminfalse647'00taxzone_taxzone_id_seqACLREVOKE ALL ON SEQUENCE taxzone_taxzone_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE taxzone_taxzone_id_seq FROM admin; GRANT ALL ON SEQUENCE taxzone_taxzone_id_seq TO admin; GRANT ALL ON SEQUENCE taxzone_taxzone_id_seq TO xtrole; publicadminfalse64712591686159terms_terms_id_seqSEQUENCE|CREATE SEQUENCE terms_terms_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; )DROP SEQUENCE public.terms_terms_id_seq; publicadminfalse8'00terms_terms_id_seq SEQUENCE SET:SELECT pg_catalog.setval('terms_terms_id_seq', 44, true); publicadminfalse648'00terms_terms_id_seqACLREVOKE ALL ON SEQUENCE terms_terms_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE terms_terms_id_seq FROM admin; GRANT ALL ON SEQUENCE terms_terms_id_seq TO admin; GRANT ALL ON SEQUENCE terms_terms_id_seq TO xtrole; publicadminfalse64812591686161todoitem_todoitem_id_seqSEQUENCEzCREATE SEQUENCE todoitem_todoitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.todoitem_todoitem_id_seq; publicadminfalse8183'00todoitem_todoitem_id_seqSEQUENCE OWNED BYGALTER SEQUENCE todoitem_todoitem_id_seq OWNED BY todoitem.todoitem_id; publicadminfalse649'00todoitem_todoitem_id_seq SEQUENCE SET@SELECT pg_catalog.setval('todoitem_todoitem_id_seq', 15, true); publicadminfalse649'00todoitem_todoitem_id_seqACLREVOKE ALL ON SEQUENCE todoitem_todoitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE todoitem_todoitem_id_seq FROM admin; GRANT ALL ON SEQUENCE todoitem_todoitem_id_seq TO admin; GRANT ALL ON SEQUENCE todoitem_todoitem_id_seq TO xtrole; publicadminfalse64912591686163trgthistTABLECREATE TABLE trgthist ( trgthist_src_cntct_id integer NOT NULL, trgthist_trgt_cntct_id integer NOT NULL, trgthist_col text NOT NULL, trgthist_value text NOT NULL ); DROP TABLE public.trgthist; publicadminfalse8'00trgthistACLREVOKE ALL ON TABLE trgthist FROM PUBLIC; REVOKE ALL ON TABLE trgthist FROM admin; GRANT ALL ON TABLE trgthist TO admin; GRANT ALL ON TABLE trgthist TO xtrole; publicadminfalse65012591686169trialbalTABLEaCREATE TABLE trialbal ( trialbal_id integer NOT NULL, trialbal_period_id integer, trialbal_accnt_id integer, trialbal_beginning numeric(20,2), trialbal_ending numeric(20,2), trialbal_credits numeric(20,2), trialbal_debits numeric(20,2), trialbal_dirty boolean, trialbal_yearend numeric(20,2) DEFAULT 0.00 NOT NULL ); DROP TABLE public.trialbal; publicadminfalse65648'00TABLE trialbalCOMMENT:COMMENT ON TABLE trialbal IS 'Trial Balance information'; publicadminfalse651'00trialbalACLREVOKE ALL ON TABLE trialbal FROM PUBLIC; REVOKE ALL ON TABLE trialbal FROM admin; GRANT ALL ON TABLE trialbal TO admin; GRANT ALL ON TABLE trialbal TO xtrole; publicadminfalse65112591686173trialbal_trialbal_id_seqSEQUENCEzCREATE SEQUENCE trialbal_trialbal_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.trialbal_trialbal_id_seq; publicadminfalse8651'00trialbal_trialbal_id_seqSEQUENCE OWNED BYGALTER SEQUENCE trialbal_trialbal_id_seq OWNED BY trialbal.trialbal_id; publicadminfalse652'00trialbal_trialbal_id_seq SEQUENCE SETCSELECT pg_catalog.setval('trialbal_trialbal_id_seq', 21430, true); publicadminfalse652'00trialbal_trialbal_id_seqACLREVOKE ALL ON SEQUENCE trialbal_trialbal_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE trialbal_trialbal_id_seq FROM admin; GRANT ALL ON SEQUENCE trialbal_trialbal_id_seq TO admin; GRANT ALL ON SEQUENCE trialbal_trialbal_id_seq TO xtrole; publicadminfalse65212591686175uom_uom_id_seqSEQUENCEpCREATE SEQUENCE uom_uom_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; %DROP SEQUENCE public.uom_uom_id_seq; publicadminfalse8171'00uom_uom_id_seqSEQUENCE OWNED BY3ALTER SEQUENCE uom_uom_id_seq OWNED BY uom.uom_id; publicadminfalse653'00uom_uom_id_seq SEQUENCE SET6SELECT pg_catalog.setval('uom_uom_id_seq', 14, true); publicadminfalse653'00uom_uom_id_seqACLREVOKE ALL ON SEQUENCE uom_uom_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE uom_uom_id_seq FROM admin; GRANT ALL ON SEQUENCE uom_uom_id_seq TO admin; GRANT ALL ON SEQUENCE uom_uom_id_seq TO xtrole; publicadminfalse65312591686177uomconvTABLE!CREATE TABLE uomconv ( uomconv_id integer NOT NULL, uomconv_from_uom_id integer NOT NULL, uomconv_from_value numeric(20,10) NOT NULL, uomconv_to_uom_id integer NOT NULL, uomconv_to_value numeric(20,10) NOT NULL, uomconv_fractional boolean DEFAULT false NOT NULL ); DROP TABLE public.uomconv; publicadminfalse65668'00 TABLE uomconvCOMMENThCOMMENT ON TABLE uomconv IS 'UOM conversion information. From Unit to To Unit with a value per ratio.'; publicadminfalse654'00uomconvACLREVOKE ALL ON TABLE uomconv FROM PUBLIC; REVOKE ALL ON TABLE uomconv FROM admin; GRANT ALL ON TABLE uomconv TO admin; GRANT ALL ON TABLE uomconv TO xtrole; publicadminfalse65412591686181uomconv_uomconv_id_seqSEQUENCExCREATE SEQUENCE uomconv_uomconv_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.uomconv_uomconv_id_seq; publicadminfalse8654'00uomconv_uomconv_id_seqSEQUENCE OWNED BYCALTER SEQUENCE uomconv_uomconv_id_seq OWNED BY uomconv.uomconv_id; publicadminfalse655'00uomconv_uomconv_id_seq SEQUENCE SET=SELECT pg_catalog.setval('uomconv_uomconv_id_seq', 3, true); publicadminfalse655'00uomconv_uomconv_id_seqACLREVOKE ALL ON SEQUENCE uomconv_uomconv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE uomconv_uomconv_id_seq FROM admin; GRANT ALL ON SEQUENCE uomconv_uomconv_id_seq TO admin; GRANT ALL ON SEQUENCE uomconv_uomconv_id_seq TO xtrole; publicadminfalse65512591686183uomtypeTABLECREATE TABLE uomtype ( uomtype_id integer NOT NULL, uomtype_name text NOT NULL, uomtype_descrip text, uomtype_multiple boolean DEFAULT false NOT NULL, CONSTRAINT uomtype_uomtype_name_check CHECK ((uomtype_name <> ''::text)) ); DROP TABLE public.uomtype; publicadminfalse656865698'00 TABLE uomtypeCOMMENT0COMMENT ON TABLE uomtype IS 'UOM Type values.'; publicadminfalse656'00uomtypeACLREVOKE ALL ON TABLE uomtype FROM PUBLIC; REVOKE ALL ON TABLE uomtype FROM admin; GRANT ALL ON TABLE uomtype TO admin; GRANT ALL ON TABLE uomtype TO xtrole; publicadminfalse65612591686190uomtype_uomtype_id_seqSEQUENCExCREATE SEQUENCE uomtype_uomtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.uomtype_uomtype_id_seq; publicadminfalse8656'00uomtype_uomtype_id_seqSEQUENCE OWNED BYCALTER SEQUENCE uomtype_uomtype_id_seq OWNED BY uomtype.uomtype_id; publicadminfalse657'00uomtype_uomtype_id_seq SEQUENCE SET=SELECT pg_catalog.setval('uomtype_uomtype_id_seq', 4, true); publicadminfalse657'00uomtype_uomtype_id_seqACLREVOKE ALL ON SEQUENCE uomtype_uomtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE uomtype_uomtype_id_seq FROM admin; GRANT ALL ON SEQUENCE uomtype_uomtype_id_seq TO admin; GRANT ALL ON SEQUENCE uomtype_uomtype_id_seq TO xtrole; publicadminfalse65712591686192urlinfo_url_id_seqSEQUENCEtCREATE SEQUENCE urlinfo_url_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; )DROP SEQUENCE public.urlinfo_url_id_seq; publicadminfalse8191'00urlinfo_url_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE urlinfo_url_id_seq OWNED BY urlinfo.url_id; publicadminfalse658'00urlinfo_url_id_seq SEQUENCE SET9SELECT pg_catalog.setval('urlinfo_url_id_seq', 1, true); publicadminfalse658'00urlinfo_url_id_seqACLREVOKE ALL ON SEQUENCE urlinfo_url_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE urlinfo_url_id_seq FROM admin; GRANT ALL ON SEQUENCE urlinfo_url_id_seq TO admin; GRANT ALL ON SEQUENCE urlinfo_url_id_seq TO xtrole; publicadminfalse65812591686194usrprefTABLECREATE TABLE usrpref ( usrpref_id integer DEFAULT nextval(('usrpref_usrpref_id_seq'::text)::regclass) NOT NULL, usrpref_name text, usrpref_value text, usrpref_username text ); DROP TABLE public.usrpref; publicadminfalse65708'00 TABLE usrprefCOMMENT<COMMENT ON TABLE usrpref IS 'User Preferences information'; publicadminfalse659'00usrprefACLREVOKE ALL ON TABLE usrpref FROM PUBLIC; REVOKE ALL ON TABLE usrpref FROM admin; GRANT ALL ON TABLE usrpref TO admin; GRANT ALL ON TABLE usrpref TO xtrole; publicadminfalse659S12592006619usrVIEWCREATE VIEW usr AS SELECT (pg_user.usesysid)::integer AS usr_id, (pg_user.usename)::text AS usr_username, COALESCE((SELECT usrpref.usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'propername'::text))), ''::text) AS usr_propername, NULL::text AS usr_passwd, COALESCE((SELECT (usrpref.usrpref_value)::integer AS usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'locale_id'::text))), COALESCE((SELECT locale.locale_id FROM locale WHERE (lower(locale.locale_code) = 'default'::text) LIMIT 1), (SELECT locale.locale_id FROM locale ORDER BY locale.locale_id LIMIT 1))) AS usr_locale_id, COALESCE((SELECT usrpref.usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'initials'::text))), ''::text) AS usr_initials, COALESCE((SELECT CASE WHEN (usrpref.usrpref_value = 't'::text) THEN true ELSE false END AS "case" FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'agent'::text))), false) AS usr_agent, COALESCE((SELECT CASE WHEN (usrpref.usrpref_value = 't'::text) THEN true ELSE false END AS "case" FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'active'::text))), usercanlogin((pg_user.usename)::text)) AS usr_active, COALESCE((SELECT usrpref.usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'email'::text))), ''::text) AS usr_email, COALESCE((SELECT usrpref.usrpref_value FROM usrpref WHERE ((usrpref.usrpref_username = (pg_user.usename)::text) AND (usrpref.usrpref_name = 'window'::text))), ''::text) AS usr_window FROM pg_user; DROP VIEW public.usr; publicadminfalse55478'00usrACLREVOKE ALL ON TABLE usr FROM PUBLIC; REVOKE ALL ON TABLE usr FROM admin; GRANT ALL ON TABLE usr TO admin; GRANT ALL ON TABLE usr TO xtrole; publicadminfalse85112591686206usr_bakTABLE]CREATE TABLE usr_bak ( usr_id integer DEFAULT nextval(('usr_usr_id_seq'::text)::regclass) NOT NULL, usr_username text NOT NULL, usr_propername text, usr_passwd text, usr_locale_id integer NOT NULL, usr_initials text, usr_agent boolean NOT NULL, usr_active boolean NOT NULL, usr_email text, usr_window text ); DROP TABLE public.usr_bak; publicadminfalse65718'00 TABLE usr_bakCOMMENT0COMMENT ON TABLE usr_bak IS 'User information'; publicadminfalse660'00usr_bakACLREVOKE ALL ON TABLE usr_bak FROM PUBLIC; REVOKE ALL ON TABLE usr_bak FROM admin; GRANT ALL ON TABLE usr_bak TO admin; GRANT ALL ON TABLE usr_bak TO xtrole; publicadminfalse66012591686213usr_usr_id_seqSEQUENCExCREATE SEQUENCE usr_usr_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; %DROP SEQUENCE public.usr_usr_id_seq; publicadminfalse8'00usr_usr_id_seq SEQUENCE SET5SELECT pg_catalog.setval('usr_usr_id_seq', 9, true); publicadminfalse661'00usr_usr_id_seqACLREVOKE ALL ON SEQUENCE usr_usr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE usr_usr_id_seq FROM admin; GRANT ALL ON SEQUENCE usr_usr_id_seq TO admin; GRANT ALL ON SEQUENCE usr_usr_id_seq TO xtrole; publicadminfalse66112591686215usrgrp_usrgrp_id_seqSEQUENCEvCREATE SEQUENCE usrgrp_usrgrp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.usrgrp_usrgrp_id_seq; publicadminfalse8573'00usrgrp_usrgrp_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE usrgrp_usrgrp_id_seq OWNED BY usrgrp.usrgrp_id; publicadminfalse662'00usrgrp_usrgrp_id_seq SEQUENCE SET;SELECT pg_catalog.setval('usrgrp_usrgrp_id_seq', 3, true); publicadminfalse662'00usrgrp_usrgrp_id_seqACLREVOKE ALL ON SEQUENCE usrgrp_usrgrp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE usrgrp_usrgrp_id_seq FROM admin; GRANT ALL ON SEQUENCE usrgrp_usrgrp_id_seq TO admin; GRANT ALL ON SEQUENCE usrgrp_usrgrp_id_seq TO xtrole; publicadminfalse66212591686217usrpref_usrpref_id_seqSEQUENCECREATE SEQUENCE usrpref_usrpref_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.usrpref_usrpref_id_seq; publicadminfalse8'00usrpref_usrpref_id_seq SEQUENCE SET@SELECT pg_catalog.setval('usrpref_usrpref_id_seq', 1672, true); publicadminfalse663'00usrpref_usrpref_id_seqACLREVOKE ALL ON SEQUENCE usrpref_usrpref_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE usrpref_usrpref_id_seq FROM admin; GRANT ALL ON SEQUENCE usrpref_usrpref_id_seq TO admin; GRANT ALL ON SEQUENCE usrpref_usrpref_id_seq TO xtrole; publicadminfalse66312591686219usrpriv_usrpriv_id_seqSEQUENCECREATE SEQUENCE usrpriv_usrpriv_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; -DROP SEQUENCE public.usrpriv_usrpriv_id_seq; publicadminfalse8'00usrpriv_usrpriv_id_seq SEQUENCE SET@SELECT pg_catalog.setval('usrpriv_usrpriv_id_seq', 3847, true); publicadminfalse664'00usrpriv_usrpriv_id_seqACLREVOKE ALL ON SEQUENCE usrpriv_usrpriv_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE usrpriv_usrpriv_id_seq FROM admin; GRANT ALL ON SEQUENCE usrpriv_usrpriv_id_seq TO admin; GRANT ALL ON SEQUENCE usrpriv_usrpriv_id_seq TO xtrole; publicadminfalse664\12592006659vendVIEWCREATE VIEW vend AS SELECT vendinfo.vend_id, vendinfo.vend_name, m.addr_line1 AS vend_address1, m.addr_line2 AS vend_address2, m.addr_line3 AS vend_address3, m.addr_city AS vend_city, m.addr_state AS vend_state, m.addr_postalcode AS vend_zip, btrim(((c1.cntct_first_name || ' '::text) || c1.cntct_last_name)) AS vend_contact1, c1.cntct_phone AS vend_phone1, btrim(((c2.cntct_first_name || ' '::text) || c2.cntct_last_name)) AS vend_contact2, c2.cntct_phone AS vend_phone2, vendinfo.vend_lastpurchdate, vendinfo.vend_active, vendinfo.vend_po, vendinfo.vend_comments, vendinfo.vend_pocomments, vendinfo.vend_number, c1.cntct_fax AS vend_fax1, c2.cntct_fax AS vend_fax2, c1.cntct_email AS vend_email1, c2.cntct_email AS vend_email2, vendinfo.vend_1099, vendinfo.vend_exported, vendinfo.vend_fobsource, vendinfo.vend_fob, vendinfo.vend_terms_id, vendinfo.vend_shipvia, vendinfo.vend_vendtype_id, vendinfo.vend_qualified, vendinfo.vend_ediemail, vendinfo.vend_ediemailbody, vendinfo.vend_edisubject, vendinfo.vend_edifilename, vendinfo.vend_accntnum, vendinfo.vend_emailpodelivery, vendinfo.vend_restrictpurch, vendinfo.vend_edicc, m.addr_country AS vend_country, vendinfo.vend_curr_id, vendinfo.vend_taxzone_id FROM (((vendinfo LEFT JOIN cntct c1 ON ((vendinfo.vend_cntct1_id = c1.cntct_id))) LEFT JOIN addr m ON ((vendinfo.vend_addr_id = m.addr_id))) LEFT JOIN cntct c2 ON ((vendinfo.vend_cntct2_id = c2.cntct_id))); DROP VIEW public.vend; publicadminfalse55568'00vendACLREVOKE ALL ON TABLE vend FROM PUBLIC; REVOKE ALL ON TABLE vend FROM admin; GRANT ALL ON TABLE vend TO admin; GRANT SELECT,INSERT,REFERENCES,DELETE,TRIGGER,UPDATE ON TABLE vend TO xtrole; publicadminfalse86012591686221vend_vend_id_seqSEQUENCEzCREATE SEQUENCE vend_vend_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 'DROP SEQUENCE public.vend_vend_id_seq; publicadminfalse8'00vend_vend_id_seq SEQUENCE SET8SELECT pg_catalog.setval('vend_vend_id_seq', 97, true); publicadminfalse665'00vend_vend_id_seqACLREVOKE ALL ON SEQUENCE vend_vend_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vend_vend_id_seq FROM admin; GRANT ALL ON SEQUENCE vend_vend_id_seq TO admin; GRANT ALL ON SEQUENCE vend_vend_id_seq TO xtrole; publicadminfalse665]12592006664vendaddrVIEWCREATE VIEW vendaddr AS SELECT vendaddrinfo.vendaddr_id, vendaddrinfo.vendaddr_vend_id, vendaddrinfo.vendaddr_code, vendaddrinfo.vendaddr_name, m.addr_line1 AS vendaddr_address1, m.addr_line2 AS vendaddr_address2, m.addr_line3 AS vendaddr_address3, btrim(((c1.cntct_first_name || ' '::text) || c1.cntct_last_name)) AS vendaddr_contact1, c1.cntct_phone AS vendaddr_phone1, c1.cntct_fax AS vendaddr_fax1, m.addr_city AS vendaddr_city, m.addr_state AS vendaddr_state, m.addr_postalcode AS vendaddr_zipcode, m.addr_country AS vendaddr_country FROM ((vendaddrinfo LEFT JOIN cntct c1 ON ((vendaddrinfo.vendaddr_cntct_id = c1.cntct_id))) LEFT JOIN addr m ON ((vendaddrinfo.vendaddr_addr_id = m.addr_id))); DROP VIEW public.vendaddr; publicadminfalse55578'00vendaddrACLREVOKE ALL ON TABLE vendaddr FROM PUBLIC; REVOKE ALL ON TABLE vendaddr FROM admin; GRANT ALL ON TABLE vendaddr TO admin; GRANT ALL ON TABLE vendaddr TO xtrole; publicadminfalse86112591686223vendaddr_vendaddr_id_seqSEQUENCECREATE SEQUENCE vendaddr_vendaddr_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.vendaddr_vendaddr_id_seq; publicadminfalse8'00vendaddr_vendaddr_id_seq SEQUENCE SET@SELECT pg_catalog.setval('vendaddr_vendaddr_id_seq', 36, true); publicadminfalse666'00vendaddr_vendaddr_id_seqACLREVOKE ALL ON SEQUENCE vendaddr_vendaddr_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vendaddr_vendaddr_id_seq FROM admin; GRANT ALL ON SEQUENCE vendaddr_vendaddr_id_seq TO admin; GRANT ALL ON SEQUENCE vendaddr_vendaddr_id_seq TO xtrole; publicadminfalse66612591686225vendtype_vendtype_id_seqSEQUENCEzCREATE SEQUENCE vendtype_vendtype_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.vendtype_vendtype_id_seq; publicadminfalse8258'00vendtype_vendtype_id_seqSEQUENCE OWNED BYGALTER SEQUENCE vendtype_vendtype_id_seq OWNED BY vendtype.vendtype_id; publicadminfalse667'00vendtype_vendtype_id_seq SEQUENCE SET@SELECT pg_catalog.setval('vendtype_vendtype_id_seq', 22, true); publicadminfalse667'00vendtype_vendtype_id_seqACLREVOKE ALL ON SEQUENCE vendtype_vendtype_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vendtype_vendtype_id_seq FROM admin; GRANT ALL ON SEQUENCE vendtype_vendtype_id_seq TO admin; GRANT ALL ON SEQUENCE vendtype_vendtype_id_seq TO xtrole; publicadminfalse66712591686227vodistTABLECREATE TABLE vodist ( vodist_id integer DEFAULT nextval(('"vodist_vodist_id_seq"'::text)::regclass) NOT NULL, vodist_poitem_id integer, vodist_vohead_id integer, vodist_costelem_id integer, vodist_accnt_id integer, vodist_amount numeric(18,6), vodist_qty numeric(18,6), vodist_expcat_id integer DEFAULT (-1), vodist_tax_id integer DEFAULT (-1), vodist_discountable boolean DEFAULT true NOT NULL, vodist_notes text ); DROP TABLE public.vodist; publicadminfalse65726573657465758'00 TABLE vodistCOMMENT?COMMENT ON TABLE vodist IS 'Voucher distribution information'; publicadminfalse668'00vodistACLREVOKE ALL ON TABLE vodist FROM PUBLIC; REVOKE ALL ON TABLE vodist FROM admin; GRANT ALL ON TABLE vodist TO admin; GRANT ALL ON TABLE vodist TO xtrole; publicadminfalse66812591686237vodist_vodist_id_seqSEQUENCEvCREATE SEQUENCE vodist_vodist_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.vodist_vodist_id_seq; publicadminfalse8'00vodist_vodist_id_seq SEQUENCE SET=SELECT pg_catalog.setval('vodist_vodist_id_seq', 350, true); publicadminfalse669'00vodist_vodist_id_seqACLREVOKE ALL ON SEQUENCE vodist_vodist_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vodist_vodist_id_seq FROM admin; GRANT ALL ON SEQUENCE vodist_vodist_id_seq TO admin; GRANT ALL ON SEQUENCE vodist_vodist_id_seq TO xtrole; publicadminfalse66912591686239voheadTABLE<CREATE TABLE vohead ( vohead_id integer DEFAULT nextval(('vohead_vohead_id_seq'::text)::regclass) NOT NULL, vohead_number text NOT NULL, vohead_pohead_id integer, vohead_posted boolean, vohead_duedate date, vohead_invcnumber text, vohead_amount numeric(16,4), vohead_docdate date, vohead_1099 boolean, vohead_distdate date, vohead_reference text, vohead_terms_id integer, vohead_vend_id integer, vohead_curr_id integer DEFAULT basecurrid(), vohead_adjtaxtype_id integer, vohead_freighttaxtype_id integer, vohead_gldistdate date, vohead_misc boolean, vohead_taxzone_id integer, vohead_taxtype_id integer, vohead_notes text, vohead_recurring_vohead_id integer, CONSTRAINT vohead_vohead_number_check CHECK ((vohead_number <> ''::text)) ); DROP TABLE public.vohead; publicadminfalse6576657765788'00 TABLE voheadCOMMENT9COMMENT ON TABLE vohead IS 'Voucher header information'; publicadminfalse670'00voheadACLREVOKE ALL ON TABLE vohead FROM PUBLIC; REVOKE ALL ON TABLE vohead FROM admin; GRANT ALL ON TABLE vohead TO admin; GRANT ALL ON TABLE vohead TO xtrole; publicadminfalse67012591686247vohead_vohead_id_seqSEQUENCEvCREATE SEQUENCE vohead_vohead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.vohead_vohead_id_seq; publicadminfalse8'00vohead_vohead_id_seq SEQUENCE SET=SELECT pg_catalog.setval('vohead_vohead_id_seq', 452, true); publicadminfalse671'00vohead_vohead_id_seqACLREVOKE ALL ON SEQUENCE vohead_vohead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE vohead_vohead_id_seq FROM admin; GRANT ALL ON SEQUENCE vohead_vohead_id_seq TO admin; GRANT ALL ON SEQUENCE vohead_vohead_id_seq TO xtrole; publicadminfalse67112591686249 voheadtaxTABLE/CREATE TABLE voheadtax ( ) INHERITS (taxhist); DROP TABLE public.voheadtax; publicadminfalse65798253'00 voheadtaxACLREVOKE ALL ON TABLE voheadtax FROM PUBLIC; REVOKE ALL ON TABLE voheadtax FROM admin; GRANT ALL ON TABLE voheadtax TO admin; GRANT ALL ON TABLE voheadtax TO xtrole; publicadminfalse67212591686255voitemTABLE>CREATE TABLE voitem ( voitem_id integer DEFAULT nextval(('"voitem_voitem_id_seq"'::text)::regclass) NOT NULL, voitem_vohead_id integer, voitem_poitem_id integer, voitem_close boolean, voitem_qty numeric(18,6), voitem_freight numeric(16,4) DEFAULT 0.0 NOT NULL, voitem_taxtype_id integer ); DROP TABLE public.voitem; publicadminfalse658065818'00 TABLE voitemCOMMENT<COMMENT ON TABLE voitem IS 'Voucher Line Item information'; publicadminfalse673'00voitemACLREVOKE ALL ON TABLE voitem FROM PUBLIC; REVOKE ALL ON TABLE voitem FROM admin; GRANT ALL ON TABLE voitem TO admin; GRANT ALL ON TABLE voitem TO xtrole; publicadminfalse67312591686260voitem_voitem_id_seqSEQUENCEvCREATE SEQUENCE voitem_voitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; +DROP SEQUENCE public.voitem_voitem_id_seq; publicadminfalse8'00voitem_voitem_id_seq SEQUENCE SET=SELECT pg_catalog.setval('voitem_voitem_id_seq', 277, true); publicadminfalse674'00voitem_voitem_id_seqACLREVOKE ALL ON SEQUENCE voitem_voitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE voitem_voitem_id_seq FROM admin; GRANT ALL ON SEQUENCE voitem_voitem_id_seq TO admin; GRANT ALL ON SEQUENCE voitem_voitem_id_seq TO xtrole; publicadminfalse67412591686262 voitemtaxTABLE/CREATE TABLE voitemtax ( ) INHERITS (taxhist); DROP TABLE public.voitemtax; publicadminfalse65828253'00 voitemtaxACLREVOKE ALL ON TABLE voitemtax FROM PUBLIC; REVOKE ALL ON TABLE voitemtax FROM admin; GRANT ALL ON TABLE voitemtax TO admin; GRANT ALL ON TABLE voitemtax TO xtrole; publicadminfalse675^12592006669warehousVIEWdCREATE VIEW warehous AS SELECT whsinfo.warehous_id, whsinfo.warehous_code, whsinfo.warehous_descrip, m.addr_line1 AS warehous_addr1, m.addr_line2 AS warehous_addr2, m.addr_line3 AS warehous_addr3, m.addr_city AS warehous_addr4, m.addr_city AS warehous_city, m.addr_state AS warehous_state, m.addr_postalcode AS warehous_zip, m.addr_country AS warehous_country, whsinfo.warehous_fob, whsinfo.warehous_active, whsinfo.warehous_sitetype_id, whsinfo.warehous_counttag_prefix, whsinfo.warehous_counttag_number, whsinfo.warehous_bol_prefix, whsinfo.warehous_bol_number, whsinfo.warehous_shipping, whsinfo.warehous_useslips, whsinfo.warehous_usezones, whsinfo.warehous_aislesize, whsinfo.warehous_aislealpha, whsinfo.warehous_racksize, whsinfo.warehous_rackalpha, whsinfo.warehous_binsize, whsinfo.warehous_binalpha, whsinfo.warehous_locationsize, whsinfo.warehous_locationalpha, whsinfo.warehous_enforcearbl, whsinfo.warehous_default_accnt_id, whsinfo.warehous_shipping_commission FROM ((whsinfo LEFT JOIN cntct c1 ON ((whsinfo.warehous_cntct_id = c1.cntct_id))) LEFT JOIN addr m ON ((whsinfo.warehous_addr_id = m.addr_id))); DROP VIEW public.warehous; publicadminfalse55588'00warehousACLREVOKE ALL ON TABLE warehous FROM PUBLIC; REVOKE ALL ON TABLE warehous FROM admin; GRANT ALL ON TABLE warehous TO admin; GRANT ALL ON TABLE warehous TO xtrole; publicadminfalse86212591686273warehous_warehous_id_seqSEQUENCECREATE SEQUENCE warehous_warehous_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; /DROP SEQUENCE public.warehous_warehous_id_seq; publicadminfalse8'00warehous_warehous_id_seq SEQUENCE SET@SELECT pg_catalog.setval('warehous_warehous_id_seq', 40, true); publicadminfalse676'00warehous_warehous_id_seqACLREVOKE ALL ON SEQUENCE warehous_warehous_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE warehous_warehous_id_seq FROM admin; GRANT ALL ON SEQUENCE warehous_warehous_id_seq TO admin; GRANT ALL ON SEQUENCE warehous_warehous_id_seq TO xtrole; publicadminfalse67612591686275whsezone_whsezone_id_seqSEQUENCEzCREATE SEQUENCE whsezone_whsezone_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.whsezone_whsezone_id_seq; publicadminfalse8238(00whsezone_whsezone_id_seqSEQUENCE OWNED BYGALTER SEQUENCE whsezone_whsezone_id_seq OWNED BY whsezone.whsezone_id; publicadminfalse677(00whsezone_whsezone_id_seq SEQUENCE SET?SELECT pg_catalog.setval('whsezone_whsezone_id_seq', 9, true); publicadminfalse677(00whsezone_whsezone_id_seqACLREVOKE ALL ON SEQUENCE whsezone_whsezone_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE whsezone_whsezone_id_seq FROM admin; GRANT ALL ON SEQUENCE whsezone_whsezone_id_seq TO admin; GRANT ALL ON SEQUENCE whsezone_whsezone_id_seq TO xtrole; publicadminfalse67712591686277 wo_wo_id_seqSEQUENCEvCREATE SEQUENCE wo_wo_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; #DROP SEQUENCE public.wo_wo_id_seq; publicadminfalse8(00 wo_wo_id_seq SEQUENCE SET5SELECT pg_catalog.setval('wo_wo_id_seq', 615, true); publicadminfalse678(00 wo_wo_id_seqACLREVOKE ALL ON SEQUENCE wo_wo_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE wo_wo_id_seq FROM admin; GRANT ALL ON SEQUENCE wo_wo_id_seq TO admin; GRANT ALL ON SEQUENCE wo_wo_id_seq TO xtrole; publicadminfalse67812591686279womatl_womatl_id_seqSEQUENCE~CREATE SEQUENCE womatl_womatl_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; +DROP SEQUENCE public.womatl_womatl_id_seq; publicadminfalse8(00womatl_womatl_id_seq SEQUENCE SET>SELECT pg_catalog.setval('womatl_womatl_id_seq', 1906, true); publicadminfalse679(00womatl_womatl_id_seqACLREVOKE ALL ON SEQUENCE womatl_womatl_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE womatl_womatl_id_seq FROM admin; GRANT ALL ON SEQUENCE womatl_womatl_id_seq TO admin; GRANT ALL ON SEQUENCE womatl_womatl_id_seq TO xtrole; publicadminfalse67912591686281 womatlpostTABLECREATE TABLE womatlpost ( womatlpost_id integer NOT NULL, womatlpost_womatl_id integer, womatlpost_invhist_id integer ); DROP TABLE public.womatlpost; publicadminfalse8(00TABLE womatlpostCOMMENTtCOMMENT ON TABLE womatlpost IS 'Table to tie work order to work order material transactions for efficient queries'; publicadminfalse680(00 womatlpostACLREVOKE ALL ON TABLE womatlpost FROM PUBLIC; REVOKE ALL ON TABLE womatlpost FROM admin; GRANT ALL ON TABLE womatlpost TO admin; GRANT ALL ON TABLE womatlpost TO xtrole; publicadminfalse68012591686284womatlpost_womatlpost_id_seqSEQUENCE~CREATE SEQUENCE womatlpost_womatlpost_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 3DROP SEQUENCE public.womatlpost_womatlpost_id_seq; publicadminfalse8680 (00womatlpost_womatlpost_id_seqSEQUENCE OWNED BYOALTER SEQUENCE womatlpost_womatlpost_id_seq OWNED BY womatlpost.womatlpost_id; publicadminfalse681 (00womatlpost_womatlpost_id_seq SEQUENCE SETESELECT pg_catalog.setval('womatlpost_womatlpost_id_seq', 215, true); publicadminfalse681 (00womatlpost_womatlpost_id_seqACLREVOKE ALL ON SEQUENCE womatlpost_womatlpost_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE womatlpost_womatlpost_id_seq FROM admin; GRANT ALL ON SEQUENCE womatlpost_womatlpost_id_seq TO admin; GRANT ALL ON SEQUENCE womatlpost_womatlpost_id_seq TO xtrole; publicadminfalse68112591686286 womatlvarTABLECREATE TABLE womatlvar ( womatlvar_id integer DEFAULT nextval(('"womatlvar_womatlvar_id_seq"'::text)::regclass) NOT NULL, womatlvar_number integer, womatlvar_subnumber integer, womatlvar_posted date, womatlvar_parent_itemsite_id integer, womatlvar_component_itemsite_id integer, womatlvar_qtyord numeric(18,6), womatlvar_qtyrcv numeric(18,6), womatlvar_qtyiss numeric(18,6), womatlvar_qtyper numeric(18,6), womatlvar_scrap numeric(18,6), womatlvar_wipscrap numeric(18,6), womatlvar_bomitem_id integer, womatlvar_ref text, womatlvar_notes text, womatlvar_qtyfxd numeric(20,8) DEFAULT 0 NOT NULL ); DROP TABLE public.womatlvar; publicadminfalse658465858 (00TABLE womatlvarCOMMENTWCOMMENT ON TABLE womatlvar IS 'Work Order Material Requirements Variance information'; publicadminfalse682 (00!COLUMN womatlvar.womatlvar_qtyfxdCOMMENTOCOMMENT ON COLUMN womatlvar.womatlvar_qtyfxd IS 'The fixed quantity required'; publicadminfalse682(00 womatlvarACLREVOKE ALL ON TABLE womatlvar FROM PUBLIC; REVOKE ALL ON TABLE womatlvar FROM admin; GRANT ALL ON TABLE womatlvar TO admin; GRANT ALL ON TABLE womatlvar TO xtrole; publicadminfalse68212591686294womatlvar_womatlvar_id_seqSEQUENCECREATE SEQUENCE womatlvar_womatlvar_id_seq START WITH 1 INCREMENT BY 1 MAXVALUE 2147483647 NO MINVALUE CACHE 1; 1DROP SEQUENCE public.womatlvar_womatlvar_id_seq; publicadminfalse8(00womatlvar_womatlvar_id_seq SEQUENCE SETCSELECT pg_catalog.setval('womatlvar_womatlvar_id_seq', 312, true); publicadminfalse683(00womatlvar_womatlvar_id_seqACLREVOKE ALL ON SEQUENCE womatlvar_womatlvar_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE womatlvar_womatlvar_id_seq FROM admin; GRANT ALL ON SEQUENCE womatlvar_womatlvar_id_seq TO admin; GRANT ALL ON SEQUENCE womatlvar_womatlvar_id_seq TO xtrole; publicadminfalse68312591686296xcalitem_xcalitem_id_seqSEQUENCEzCREATE SEQUENCE xcalitem_xcalitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE public.xcalitem_xcalitem_id_seq; publicadminfalse8(00xcalitem_xcalitem_id_seq SEQUENCE SETASELECT pg_catalog.setval('xcalitem_xcalitem_id_seq', 217, true); publicadminfalse684(00xcalitem_xcalitem_id_seqACLREVOKE ALL ON SEQUENCE xcalitem_xcalitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE xcalitem_xcalitem_id_seq FROM admin; GRANT ALL ON SEQUENCE xcalitem_xcalitem_id_seq TO admin; GRANT ALL ON SEQUENCE xcalitem_xcalitem_id_seq TO xtrole; publicadminfalse68412591686298xsltmapTABLE"CREATE TABLE xsltmap ( xsltmap_id integer NOT NULL, xsltmap_name text NOT NULL, xsltmap_doctype text NOT NULL, xsltmap_system text NOT NULL, xsltmap_import text NOT NULL, xsltmap_export text DEFAULT ''::text NOT NULL, CONSTRAINT xsltmap_check CHECK (((xsltmap_doctype <> ''::text) OR (xsltmap_system <> ''::text))), CONSTRAINT xsltmap_xsltmap_importexport_check CHECK (((xsltmap_import <> ''::text) OR (xsltmap_export <> ''::text))), CONSTRAINT xsltmap_xsltmap_name_check CHECK ((xsltmap_name <> ''::text)) ); DROP TABLE public.xsltmap; publicadminfalse65876588658965908(00 TABLE xsltmapCOMMENT^COMMENT ON TABLE xsltmap IS 'Mapping of XML System identifiers to XSLT transformation files'; publicadminfalse685(00xsltmapACLREVOKE ALL ON TABLE xsltmap FROM PUBLIC; REVOKE ALL ON TABLE xsltmap FROM admin; GRANT ALL ON TABLE xsltmap TO admin; GRANT ALL ON TABLE xsltmap TO xtrole; publicadminfalse68512591686308xsltmap_xsltmap_id_seqSEQUENCExCREATE SEQUENCE xsltmap_xsltmap_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE public.xsltmap_xsltmap_id_seq; publicadminfalse8685(00xsltmap_xsltmap_id_seqSEQUENCE OWNED BYCALTER SEQUENCE xsltmap_xsltmap_id_seq OWNED BY xsltmap.xsltmap_id; publicadminfalse686(00xsltmap_xsltmap_id_seq SEQUENCE SET=SELECT pg_catalog.setval('xsltmap_xsltmap_id_seq', 1, true); publicadminfalse686(00xsltmap_xsltmap_id_seqACLREVOKE ALL ON SEQUENCE xsltmap_xsltmap_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE xsltmap_xsltmap_id_seq FROM admin; GRANT ALL ON SEQUENCE xsltmap_xsltmap_id_seq TO admin; GRANT ALL ON SEQUENCE xsltmap_xsltmap_id_seq TO xtrole; publicadminfalse68612591686310 yearperiodTABLECREATE TABLE yearperiod ( yearperiod_id integer NOT NULL, yearperiod_start date NOT NULL, yearperiod_end date NOT NULL, yearperiod_closed boolean DEFAULT false NOT NULL ); DROP TABLE public.yearperiod; publicadminfalse65928(00TABLE yearperiodCOMMENTFCOMMENT ON TABLE yearperiod IS 'Accounting Year Periods information'; publicadminfalse687(00 yearperiodACLREVOKE ALL ON TABLE yearperiod FROM PUBLIC; REVOKE ALL ON TABLE yearperiod FROM admin; GRANT ALL ON TABLE yearperiod TO admin; GRANT ALL ON TABLE yearperiod TO xtrole; publicadminfalse68712591686314yearperiod_yearperiod_id_seqSEQUENCE~CREATE SEQUENCE yearperiod_yearperiod_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 3DROP SEQUENCE public.yearperiod_yearperiod_id_seq; publicadminfalse8687(00yearperiod_yearperiod_id_seqSEQUENCE OWNED BYOALTER SEQUENCE yearperiod_yearperiod_id_seq OWNED BY yearperiod.yearperiod_id; publicadminfalse688(00yearperiod_yearperiod_id_seq SEQUENCE SETDSELECT pg_catalog.setval('yearperiod_yearperiod_id_seq', 14, true); publicadminfalse688(00yearperiod_yearperiod_id_seqACLREVOKE ALL ON SEQUENCE yearperiod_yearperiod_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE yearperiod_yearperiod_id_seq FROM admin; GRANT ALL ON SEQUENCE yearperiod_yearperiod_id_seq TO admin; GRANT ALL ON SEQUENCE yearperiod_yearperiod_id_seq TO xtrole; publicadminfalse68812591686316pkgcmdTABLEuCREATE TABLE pkgcmd ( cmd_id integer DEFAULT nextval('public.cmd_cmd_id_seq'::regclass) ) INHERITS (public.cmd); DROP TABLE te.pkgcmd; teadminfalse65939259(00pkgcmdACLREVOKE ALL ON TABLE pkgcmd FROM PUBLIC; REVOKE ALL ON TABLE pkgcmd FROM admin; GRANT ALL ON TABLE pkgcmd TO admin; GRANT ALL ON TABLE pkgcmd TO xtrole; teadminfalse68912591686323 pkgcmdargTABLECREATE TABLE pkgcmdarg ( cmdarg_id integer DEFAULT nextval('public.cmdarg_cmdarg_id_seq'::regclass) ) INHERITS (public.cmdarg); DROP TABLE te.pkgcmdarg; teadminfalse65949262(00 pkgcmdargACLREVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC; REVOKE ALL ON TABLE pkgcmdarg FROM admin; GRANT ALL ON TABLE pkgcmdarg TO admin; GRANT ALL ON TABLE pkgcmdarg TO xtrole; teadminfalse69012591686330pkgimageTABLECREATE TABLE pkgimage ( image_id integer DEFAULT nextval('public.image_image_id_seq'::regclass) ) INHERITS (public.image); DROP TABLE te.pkgimage; teadminfalse65959194(00pkgimageACLREVOKE ALL ON TABLE pkgimage FROM PUBLIC; REVOKE ALL ON TABLE pkgimage FROM admin; GRANT ALL ON TABLE pkgimage TO admin; GRANT ALL ON TABLE pkgimage TO xtrole; teadminfalse69112591686337 pkgmetasqlTABLECREATE TABLE pkgmetasql ( metasql_id integer DEFAULT nextval('public.metasql_metasql_id_seq'::regclass) ) INHERITS (public.metasql); DROP TABLE te.pkgmetasql; teadminfalse659665979267 (00 pkgmetasqlACLREVOKE ALL ON TABLE pkgmetasql FROM PUBLIC; REVOKE ALL ON TABLE pkgmetasql FROM admin; GRANT ALL ON TABLE pkgmetasql TO admin; GRANT ALL ON TABLE pkgmetasql TO xtrole; teadminfalse69212591686345pkgprivTABLEzCREATE TABLE pkgpriv ( priv_id integer DEFAULT nextval('public.priv_priv_id_seq'::regclass) ) INHERITS (public.priv); DROP TABLE te.pkgpriv; teadminfalse65989270!(00pkgprivACLREVOKE ALL ON TABLE pkgpriv FROM PUBLIC; REVOKE ALL ON TABLE pkgpriv FROM admin; GRANT ALL ON TABLE pkgpriv TO admin; GRANT ALL ON TABLE pkgpriv TO xtrole; teadminfalse69312591686352 pkgreportTABLECREATE TABLE pkgreport ( report_id integer DEFAULT nextval('public.report_report_id_seq'::regclass) ) INHERITS (public.report); DROP TABLE te.pkgreport; teadminfalse65999273"(00 pkgreportACLREVOKE ALL ON TABLE pkgreport FROM PUBLIC; REVOKE ALL ON TABLE pkgreport FROM admin; GRANT ALL ON TABLE pkgreport TO admin; GRANT ALL ON TABLE pkgreport TO xtrole; teadminfalse69412591686359 pkgscriptTABLECREATE TABLE pkgscript ( script_id integer DEFAULT nextval('public.script_script_id_seq'::regclass) ) INHERITS (public.script); DROP TABLE te.pkgscript; teadminfalse660066019276#(00 pkgscriptACLREVOKE ALL ON TABLE pkgscript FROM PUBLIC; REVOKE ALL ON TABLE pkgscript FROM admin; GRANT ALL ON TABLE pkgscript TO admin; GRANT ALL ON TABLE pkgscript TO xtrole; teadminfalse69512591686367 pkguiformTABLECREATE TABLE pkguiform ( uiform_id integer DEFAULT nextval('public.uiform_uiform_id_seq'::regclass) ) INHERITS (public.uiform); DROP TABLE te.pkguiform; teadminfalse660266039279$(00 pkguiformACLREVOKE ALL ON TABLE pkguiform FROM PUBLIC; REVOKE ALL ON TABLE pkguiform FROM admin; GRANT ALL ON TABLE pkguiform TO admin; GRANT ALL ON TABLE pkguiform TO xtrole; teadminfalse69612591686375 tecustrateTABLECREATE TABLE tecustrate ( tecustrate_cust_id integer NOT NULL, tecustrate_rate numeric(16,4) NOT NULL, tecustrate_id integer NOT NULL, tecustrate_curr_id integer DEFAULT public.basecurrid() NOT NULL ); DROP TABLE te.tecustrate; teadminfalse66059%(00TABLE tecustrateCOMMENTQCOMMENT ON TABLE tecustrate IS 'Default Customer Billing rate for Time/Expense'; teadminfalse697&(00 tecustrateACLREVOKE ALL ON TABLE tecustrate FROM PUBLIC; REVOKE ALL ON TABLE tecustrate FROM admin; GRANT ALL ON TABLE tecustrate TO admin; GRANT ALL ON TABLE tecustrate TO xtrole; teadminfalse69712591686379tecustrate_tecustrate_id_seqSEQUENCE~CREATE SEQUENCE tecustrate_tecustrate_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; /DROP SEQUENCE te.tecustrate_tecustrate_id_seq; teadminfalse6979'(00tecustrate_tecustrate_id_seqSEQUENCE OWNED BYOALTER SEQUENCE tecustrate_tecustrate_id_seq OWNED BY tecustrate.tecustrate_id; teadminfalse698((00tecustrate_tecustrate_id_seq SEQUENCE SETDSELECT pg_catalog.setval('tecustrate_tecustrate_id_seq', 1, false); teadminfalse69812591686381teempTABLE|CREATE TABLE teemp ( teemp_id integer NOT NULL, teemp_emp_id integer, teemp_contractor boolean DEFAULT false ); DROP TABLE te.teemp; teadminfalse66079)(00teempACLREVOKE ALL ON TABLE teemp FROM PUBLIC; REVOKE ALL ON TABLE teemp FROM admin; GRANT ALL ON TABLE teemp TO admin; GRANT ALL ON TABLE teemp TO xtrole; teadminfalse69912591686385teemp_teemp_id_seqSEQUENCEtCREATE SEQUENCE teemp_teemp_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; %DROP SEQUENCE te.teemp_teemp_id_seq; teadminfalse9699*(00teemp_teemp_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE teemp_teemp_id_seq OWNED BY teemp.teemp_id; teadminfalse700+(00teemp_teemp_id_seq SEQUENCE SET9SELECT pg_catalog.setval('teemp_teemp_id_seq', 1, true); teadminfalse700,(00teemp_teemp_id_seqACLREVOKE ALL ON SEQUENCE teemp_teemp_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE teemp_teemp_id_seq FROM admin; GRANT ALL ON SEQUENCE teemp_teemp_id_seq TO admin; GRANT ALL ON SEQUENCE teemp_teemp_id_seq TO xtrole; teadminfalse70012591686387teexpTABLEoCREATE TABLE teexp ( teexp_id integer NOT NULL, teexp_expcat_id integer, teexp_accnt_id integer ); DROP TABLE te.teexp; teadminfalse9-(00 TABLE teexpCOMMENT*COMMENT ON TABLE teexp IS 'Expense/Item'; teadminfalse701.(00teexpACLREVOKE ALL ON TABLE teexp FROM PUBLIC; REVOKE ALL ON TABLE teexp FROM admin; GRANT ALL ON TABLE teexp TO admin; GRANT ALL ON TABLE teexp TO xtrole; teadminfalse70112591686390 timesheet_seqSEQUENCErCREATE SEQUENCE timesheet_seq START WITH 1000 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; DROP SEQUENCE te.timesheet_seq; teadminfalse9/(00 timesheet_seq SEQUENCE SET7SELECT pg_catalog.setval('timesheet_seq', 1001, true); teadminfalse7020(00 timesheet_seqACLREVOKE ALL ON SEQUENCE timesheet_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE timesheet_seq FROM admin; GRANT ALL ON SEQUENCE timesheet_seq TO admin; GRANT ALL ON SEQUENCE timesheet_seq TO xtrole; teadminfalse70212591686392teheadTABLE.CREATE TABLE tehead ( tehead_id integer NOT NULL, tehead_number text DEFAULT nextval('timesheet_seq'::regclass), tehead_weekending date, tehead_lastupdated timestamp without time zone DEFAULT now() NOT NULL, tehead_notes text, tehead_status character(1) DEFAULT 'O'::bpchar NOT NULL, tehead_emp_id integer, tehead_warehous_id integer NOT NULL, tehead_username text DEFAULT "current_user"() NOT NULL, CONSTRAINT tehead_tehead_status_check CHECK ((tehead_status = ANY (ARRAY['O'::bpchar, 'A'::bpchar, 'C'::bpchar]))) ); DROP TABLE te.tehead; teadminfalse6608660966106611661391(00 TABLE teheadCOMMENT2COMMENT ON TABLE tehead IS 'time/expense header'; teadminfalse7032(00teheadACLREVOKE ALL ON TABLE tehead FROM PUBLIC; REVOKE ALL ON TABLE tehead FROM admin; GRANT ALL ON TABLE tehead TO admin; GRANT ALL ON TABLE tehead TO xtrole; teadminfalse70312591686403tehead_tehead_id_seqSEQUENCEvCREATE SEQUENCE tehead_tehead_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE te.tehead_tehead_id_seq; teadminfalse97033(00tehead_tehead_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE tehead_tehead_id_seq OWNED BY tehead.tehead_id; teadminfalse7044(00tehead_tehead_id_seq SEQUENCE SET;SELECT pg_catalog.setval('tehead_tehead_id_seq', 2, true); teadminfalse7045(00tehead_tehead_id_seqACLREVOKE ALL ON SEQUENCE tehead_tehead_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE tehead_tehead_id_seq FROM admin; GRANT ALL ON SEQUENCE tehead_tehead_id_seq TO admin; GRANT ALL ON SEQUENCE tehead_tehead_id_seq TO xtrole; teadminfalse70412591686405teitemTABLECREATE TABLE teitem ( teitem_id integer NOT NULL, teitem_tehead_id integer, teitem_linenumber integer NOT NULL, teitem_type character(1) NOT NULL, teitem_workdate date, teitem_cust_id integer, teitem_vend_id integer, teitem_po text, teitem_item_id integer NOT NULL, teitem_qty numeric NOT NULL, teitem_rate numeric NOT NULL, teitem_total numeric NOT NULL, teitem_prjtask_id numeric, teitem_lastupdated timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL, teitem_billable boolean, teitem_prepaid boolean, teitem_notes text, teitem_posted boolean DEFAULT false, teitem_curr_id integer DEFAULT public.basecurrid() NOT NULL, teitem_uom_id integer, teitem_invcitem_id integer, teitem_vodist_id integer, teitem_postedvalue numeric DEFAULT 0 NOT NULL, teitem_empcost numeric ); DROP TABLE te.teitem; teadminfalse661466156616661796(00 TABLE teitemCOMMENT2COMMENT ON TABLE teitem IS 'time/expense detail'; teadminfalse7057(00COLUMN teitem.teitem_typeCOMMENT2COMMENT ON COLUMN teitem.teitem_type IS 'T or E'; teadminfalse7058(00COLUMN teitem.teitem_vend_idCOMMENT^COMMENT ON COLUMN teitem.teitem_vend_id IS 'future use - for payment of vendor for expenses'; teadminfalse7059(00COLUMN teitem.teitem_prepaidCOMMENTjCOMMENT ON COLUMN teitem.teitem_prepaid IS 'Used for expenses only. CC paid expenses would be prepaid.'; teadminfalse705:(00teitemACLREVOKE ALL ON TABLE teitem FROM PUBLIC; REVOKE ALL ON TABLE teitem FROM admin; GRANT ALL ON TABLE teitem TO admin; GRANT ALL ON TABLE teitem TO xtrole; teadminfalse70512591686415teitem_teitem_id_seqSEQUENCEvCREATE SEQUENCE teitem_teitem_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; 'DROP SEQUENCE te.teitem_teitem_id_seq; teadminfalse9705;(00teitem_teitem_id_seqSEQUENCE OWNED BY?ALTER SEQUENCE teitem_teitem_id_seq OWNED BY teitem.teitem_id; teadminfalse706<(00teitem_teitem_id_seq SEQUENCE SET;SELECT pg_catalog.setval('teitem_teitem_id_seq', 4, true); teadminfalse706=(00teitem_teitem_id_seqACLREVOKE ALL ON SEQUENCE teitem_teitem_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE teitem_teitem_id_seq FROM admin; GRANT ALL ON SEQUENCE teitem_teitem_id_seq TO admin; GRANT ALL ON SEQUENCE teitem_teitem_id_seq TO xtrole; teadminfalse70612591686417teprjTABLECREATE TABLE teprj ( teprj_id integer NOT NULL, teprj_prj_id integer, teprj_cust_id integer, teprj_rate numeric, teprj_curr_id integer ); DROP TABLE te.teprj; teadminfalse9>(00 TABLE teprjCOMMENT:COMMENT ON TABLE teprj IS 't/e information for projects'; teadminfalse707?(00teprjACLREVOKE ALL ON TABLE teprj FROM PUBLIC; REVOKE ALL ON TABLE teprj FROM admin; GRANT ALL ON TABLE teprj TO admin; GRANT ALL ON TABLE teprj TO xtrole; teadminfalse70712591686423teprj_teprj_id_seqSEQUENCEtCREATE SEQUENCE teprj_teprj_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; %DROP SEQUENCE te.teprj_teprj_id_seq; teadminfalse9707@(00teprj_teprj_id_seqSEQUENCE OWNED BY;ALTER SEQUENCE teprj_teprj_id_seq OWNED BY teprj.teprj_id; teadminfalse708A(00teprj_teprj_id_seq SEQUENCE SET9SELECT pg_catalog.setval('teprj_teprj_id_seq', 3, true); teadminfalse708B(00teprj_teprj_id_seqACLREVOKE ALL ON SEQUENCE teprj_teprj_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE teprj_teprj_id_seq FROM admin; GRANT ALL ON SEQUENCE teprj_teprj_id_seq TO admin; GRANT ALL ON SEQUENCE teprj_teprj_id_seq TO xtrole; teadminfalse70812591686425 teprjtaskTABLECREATE TABLE teprjtask ( teprjtask_id integer NOT NULL, teprjtask_cust_id integer, teprjtask_rate numeric, teprjtask_item_id integer, teprjtask_prjtask_id integer, teprjtask_curr_id integer DEFAULT public.basecurrid() ); DROP TABLE te.teprjtask; teadminfalse66219C(00TABLE teprjtaskCOMMENT;COMMENT ON TABLE teprjtask IS 't/e information for tasks'; teadminfalse709D(00 teprjtaskACLREVOKE ALL ON TABLE teprjtask FROM PUBLIC; REVOKE ALL ON TABLE teprjtask FROM admin; GRANT ALL ON TABLE teprjtask TO admin; GRANT ALL ON TABLE teprjtask TO xtrole; teadminfalse70912591686432teprjtask_teprjtask_id_seqSEQUENCE|CREATE SEQUENCE teprjtask_teprjtask_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE NO MINVALUE CACHE 1; -DROP SEQUENCE te.teprjtask_teprjtask_id_seq; teadminfalse9709E(00teprjtask_teprjtask_id_seqSEQUENCE OWNED BYKALTER SEQUENCE teprjtask_teprjtask_id_seq OWNED BY teprjtask.teprjtask_id; teadminfalse710F(00teprjtask_teprjtask_id_seq SEQUENCE SETASELECT pg_catalog.setval('teprjtask_teprjtask_id_seq', 7, true); teadminfalse710G(00teprjtask_teprjtask_id_seqACLREVOKE ALL ON SEQUENCE teprjtask_teprjtask_id_seq FROM PUBLIC; REVOKE ALL ON SEQUENCE teprjtask_teprjtask_id_seq FROM admin; GRANT ALL ON SEQUENCE teprjtask_teprjtask_id_seq TO admin; GRANT ALL ON SEQUENCE teprjtask_teprjtask_id_seq TO xtrole; teadminfalse71012591686434pkgcmdTABLEuCREATE TABLE pkgcmd ( cmd_id integer DEFAULT nextval('public.cmd_cmd_id_seq'::regclass) ) INHERITS (public.cmd); DROP TABLE xtdesktop.pkgcmd;  xtdesktopadminfalse662210259H(00pkgcmdACLREVOKE ALL ON TABLE pkgcmd FROM PUBLIC; REVOKE ALL ON TABLE pkgcmd FROM admin; GRANT ALL ON TABLE pkgcmd TO admin; GRANT ALL ON TABLE pkgcmd TO xtrole;  xtdesktopadminfalse71112591686441 pkgcmdargTABLECREATE TABLE pkgcmdarg ( cmdarg_id integer DEFAULT nextval('public.cmdarg_cmdarg_id_seq'::regclass) ) INHERITS (public.cmdarg); DROP TABLE xtdesktop.pkgcmdarg;  xtdesktopadminfalse662310262I(00 pkgcmdargACLREVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC; REVOKE ALL ON TABLE pkgcmdarg FROM admin; GRANT ALL ON TABLE pkgcmdarg TO admin; GRANT ALL ON TABLE pkgcmdarg TO xtrole;  xtdesktopadminfalse71212591686448pkgimageTABLECREATE TABLE pkgimage ( image_id integer DEFAULT nextval('public.image_image_id_seq'::regclass) ) INHERITS (public.image); DROP TABLE xtdesktop.pkgimage;  xtdesktopadminfalse662410194J(00pkgimageACLREVOKE ALL ON TABLE pkgimage FROM PUBLIC; REVOKE ALL ON TABLE pkgimage FROM admin; GRANT ALL ON TABLE pkgimage TO admin; GRANT ALL ON TABLE pkgimage TO xtrole;  xtdesktopadminfalse71312591686455 pkgmetasqlTABLECREATE TABLE pkgmetasql ( metasql_id integer DEFAULT nextval('public.metasql_metasql_id_seq'::regclass) ) INHERITS (public.metasql); !DROP TABLE xtdesktop.pkgmetasql;  xtdesktopadminfalse6625662610267K(00 pkgmetasqlACLREVOKE ALL ON TABLE pkgmetasql FROM PUBLIC; REVOKE ALL ON TABLE pkgmetasql FROM admin; GRANT ALL ON TABLE pkgmetasql TO admin; GRANT ALL ON TABLE pkgmetasql TO xtrole;  xtdesktopadminfalse71412591686463pkgprivTABLEzCREATE TABLE pkgpriv ( priv_id integer DEFAULT nextval('public.priv_priv_id_seq'::regclass) ) INHERITS (public.priv); DROP TABLE xtdesktop.pkgpriv;  xtdesktopadminfalse662710270L(00pkgprivACLREVOKE ALL ON TABLE pkgpriv FROM PUBLIC; REVOKE ALL ON TABLE pkgpriv FROM admin; GRANT ALL ON TABLE pkgpriv TO admin; GRANT ALL ON TABLE pkgpriv TO xtrole;  xtdesktopadminfalse71512591686470 pkgreportTABLECREATE TABLE pkgreport ( report_id integer DEFAULT nextval('public.report_report_id_seq'::regclass) ) INHERITS (public.report); DROP TABLE xtdesktop.pkgreport;  xtdesktopadminfalse662810273M(00 pkgreportACLREVOKE ALL ON TABLE pkgreport FROM PUBLIC; REVOKE ALL ON TABLE pkgreport FROM admin; GRANT ALL ON TABLE pkgreport TO admin; GRANT ALL ON TABLE pkgreport TO xtrole;  xtdesktopadminfalse71612591686477 pkgscriptTABLECREATE TABLE pkgscript ( script_id integer DEFAULT nextval('public.script_script_id_seq'::regclass) ) INHERITS (public.script); DROP TABLE xtdesktop.pkgscript;  xtdesktopadminfalse6629663010276N(00 pkgscriptACLREVOKE ALL ON TABLE pkgscript FROM PUBLIC; REVOKE ALL ON TABLE pkgscript FROM admin; GRANT ALL ON TABLE pkgscript TO admin; GRANT ALL ON TABLE pkgscript TO xtrole;  xtdesktopadminfalse71712591686485 pkguiformTABLECREATE TABLE pkguiform ( uiform_id integer DEFAULT nextval('public.uiform_uiform_id_seq'::regclass) ) INHERITS (public.uiform); DROP TABLE xtdesktop.pkguiform;  xtdesktopadminfalse6631663210279O(00 pkguiformACLREVOKE ALL ON TABLE pkguiform FROM PUBLIC; REVOKE ALL ON TABLE pkguiform FROM admin; GRANT ALL ON TABLE pkguiform TO admin; GRANT ALL ON TABLE pkguiform TO xtrole;  xtdesktopadminfalse718G26041686679addr_idDEFAULTYALTER TABLE addr ALTER COLUMN addr_id SET DEFAULT nextval('addr_addr_id_seq'::regclass); ;ALTER TABLE public.addr ALTER COLUMN addr_id DROP DEFAULT; publicadminfalse284184*26041686680alarm_idDEFAULT]ALTER TABLE alarm ALTER COLUMN alarm_id SET DEFAULT nextval('alarm_alarm_id_seq'::regclass); =ALTER TABLE public.alarm ALTER COLUMN alarm_id DROP DEFAULT; publicadminfalse286285+26041686681 apaccnt_idDEFAULTeALTER TABLE apaccnt ALTER COLUMN apaccnt_id SET DEFAULT nextval('apaccnt_apaccnt_id_seq'::regclass); AALTER TABLE public.apaccnt ALTER COLUMN apaccnt_id DROP DEFAULT; publicadminfalse288287,26041686682 apapply_idDEFAULTeALTER TABLE apapply ALTER COLUMN apapply_id SET DEFAULT nextval('apapply_apapply_id_seq'::regclass); AALTER TABLE public.apapply ALTER COLUMN apapply_id DROP DEFAULT; publicadminfalse290289.26041686683apcreditapply_idDEFAULT}ALTER TABLE apcreditapply ALTER COLUMN apcreditapply_id SET DEFAULT nextval('apcreditapply_apcreditapply_id_seq'::regclass); MALTER TABLE public.apcreditapply ALTER COLUMN apcreditapply_id DROP DEFAULT; publicadminfalse292291126041686684 apselect_idDEFAULTiALTER TABLE apselect ALTER COLUMN apselect_id SET DEFAULT nextval('apselect_apselect_id_seq'::regclass); CALTER TABLE public.apselect ALTER COLUMN apselect_id DROP DEFAULT; publicadminfalse297296526041686685 arapply_idDEFAULTeALTER TABLE arapply ALTER COLUMN arapply_id SET DEFAULT nextval('arapply_arapply_id_seq'::regclass); AALTER TABLE public.arapply ALTER COLUMN arapply_id DROP DEFAULT; publicadminfalse301300:26041686686 asohist_idDEFAULTeALTER TABLE asohist ALTER COLUMN asohist_id SET DEFAULT nextval('asohist_asohist_id_seq'::regclass); AALTER TABLE public.asohist ALTER COLUMN asohist_id DROP DEFAULT; publicadminfalse309308=26041686687 atlasmap_idDEFAULTiALTER TABLE atlasmap ALTER COLUMN atlasmap_id SET DEFAULT nextval('atlasmap_atlasmap_id_seq'::regclass); CALTER TABLE public.atlasmap ALTER COLUMN atlasmap_id DROP DEFAULT; publicadminfalse312311s26041686688 bankaccnt_idDEFAULTmALTER TABLE bankaccnt ALTER COLUMN bankaccnt_id SET DEFAULT nextval('bankaccnt_bankaccnt_id_seq'::regclass); EALTER TABLE public.bankaccnt ALTER COLUMN bankaccnt_id DROP DEFAULT; publicadminfalse314202D26041686689 bankadj_idDEFAULTeALTER TABLE bankadj ALTER COLUMN bankadj_id SET DEFAULT nextval('bankadj_bankadj_id_seq'::regclass); AALTER TABLE public.bankadj ALTER COLUMN bankadj_id DROP DEFAULT; publicadminfalse316315E26041686690bankadjtype_idDEFAULTuALTER TABLE bankadjtype ALTER COLUMN bankadjtype_id SET DEFAULT nextval('bankadjtype_bankadjtype_id_seq'::regclass); IALTER TABLE public.bankadjtype ALTER COLUMN bankadjtype_id DROP DEFAULT; publicadminfalse318317K26041686691 bankrec_idDEFAULTeALTER TABLE bankrec ALTER COLUMN bankrec_id SET DEFAULT nextval('bankrec_bankrec_id_seq'::regclass); AALTER TABLE public.bankrec ALTER COLUMN bankrec_id DROP DEFAULT; publicadminfalse320319L26041686692bankrecitem_idDEFAULTuALTER TABLE bankrecitem ALTER COLUMN bankrecitem_id SET DEFAULT nextval('bankrecitem_bankrecitem_id_seq'::regclass); IALTER TABLE public.bankrecitem ALTER COLUMN bankrecitem_id DROP DEFAULT; publicadminfalse322321R26041686693bomitemcost_idDEFAULTuALTER TABLE bomitemcost ALTER COLUMN bomitemcost_id SET DEFAULT nextval('bomitemcost_bomitemcost_id_seq'::regclass); IALTER TABLE public.bomitemcost ALTER COLUMN bomitemcost_id DROP DEFAULT; publicadminfalse326325d26041686694 bomitemsub_idDEFAULTqALTER TABLE bomitemsub ALTER COLUMN bomitemsub_id SET DEFAULT nextval('bomitemsub_bomitemsub_id_seq'::regclass); GALTER TABLE public.bomitemsub ALTER COLUMN bomitemsub_id DROP DEFAULT; publicadminfalse327197S26041686695 bomwork_idDEFAULTeALTER TABLE bomwork ALTER COLUMN bomwork_id SET DEFAULT nextval('bomwork_bomwork_id_seq'::regclass); AALTER TABLE public.bomwork ALTER COLUMN bomwork_id DROP DEFAULT; publicadminfalse329328e26041686696 budghead_idDEFAULTiALTER TABLE budghead ALTER COLUMN budghead_id SET DEFAULT nextval('budghead_budghead_id_seq'::regclass); CALTER TABLE public.budghead ALTER COLUMN budghead_id DROP DEFAULT; publicadminfalse330198k26041686697 budgitem_idDEFAULTiALTER TABLE budgitem ALTER COLUMN budgitem_id SET DEFAULT nextval('budgitem_budgitem_id_seq'::regclass); CALTER TABLE public.budgitem ALTER COLUMN budgitem_id DROP DEFAULT; publicadminfalse331200|26041686698 cashrcpt_idDEFAULTiALTER TABLE cashrcpt ALTER COLUMN cashrcpt_id SET DEFAULT nextval('cashrcpt_cashrcpt_id_seq'::regclass); CALTER TABLE public.cashrcpt ALTER COLUMN cashrcpt_id DROP DEFAULT; publicadminfalse335203~26041686699cashrcptitem_idDEFAULTyALTER TABLE cashrcptitem ALTER COLUMN cashrcptitem_id SET DEFAULT nextval('cashrcptitem_cashrcptitem_id_seq'::regclass); KALTER TABLE public.cashrcptitem ALTER COLUMN cashrcptitem_id DROP DEFAULT; publicadminfalse30220426041686700cashrcptmisc_idDEFAULTyALTER TABLE cashrcptmisc ALTER COLUMN cashrcptmisc_id SET DEFAULT nextval('cashrcptmisc_cashrcptmisc_id_seq'::regclass); KALTER TABLE public.cashrcptmisc ALTER COLUMN cashrcptmisc_id DROP DEFAULT; publicadminfalse33620526041686701ccard_idDEFAULT]ALTER TABLE ccard ALTER COLUMN ccard_id SET DEFAULT nextval('ccard_ccard_id_seq'::regclass); =ALTER TABLE public.ccard ALTER COLUMN ccard_id DROP DEFAULT; publicadminfalse337206X26041686702 ccardaud_idDEFAULTiALTER TABLE ccardaud ALTER COLUMN ccardaud_id SET DEFAULT nextval('ccardaud_ccardaud_id_seq'::regclass); CALTER TABLE public.ccardaud ALTER COLUMN ccardaud_id DROP DEFAULT; publicadminfalse339338[26041686703 ccbank_idDEFAULTaALTER TABLE ccbank ALTER COLUMN ccbank_id SET DEFAULT nextval('ccbank_ccbank_id_seq'::regclass); ?ALTER TABLE public.ccbank ALTER COLUMN ccbank_id DROP DEFAULT; publicadminfalse341340b26041686704ccpay_idDEFAULT]ALTER TABLE ccpay ALTER COLUMN ccpay_id SET DEFAULT nextval('ccpay_ccpay_id_seq'::regclass); =ALTER TABLE public.ccpay ALTER COLUMN ccpay_id DROP DEFAULT; publicadminfalse343342N26041686705char_idDEFAULT[ALTER TABLE "char" ALTER COLUMN char_id SET DEFAULT nextval('char_char_id_seq'::regclass); =ALTER TABLE public."char" ALTER COLUMN char_id DROP DEFAULT; publicadminfalse344185P26041686706 charass_idDEFAULTeALTER TABLE charass ALTER COLUMN charass_id SET DEFAULT nextval('charass_charass_id_seq'::regclass); AALTER TABLE public.charass ALTER COLUMN charass_id DROP DEFAULT; publicadminfalse345186c26041686707 charopt_idDEFAULTeALTER TABLE charopt ALTER COLUMN charopt_id SET DEFAULT nextval('charopt_charopt_id_seq'::regclass); AALTER TABLE public.charopt ALTER COLUMN charopt_id DROP DEFAULT; publicadminfalse347346m26041686708 checkhead_idDEFAULTmALTER TABLE checkhead ALTER COLUMN checkhead_id SET DEFAULT nextval('checkhead_checkhead_id_seq'::regclass); EALTER TABLE public.checkhead ALTER COLUMN checkhead_id DROP DEFAULT; publicadminfalse349348s26041686709 checkitem_idDEFAULTmALTER TABLE checkitem ALTER COLUMN checkitem_id SET DEFAULT nextval('checkitem_checkitem_id_seq'::regclass); EALTER TABLE public.checkitem ALTER COLUMN checkitem_id DROP DEFAULT; publicadminfalse351350S26041686710 cmnttype_idDEFAULTiALTER TABLE cmnttype ALTER COLUMN cmnttype_id SET DEFAULT nextval('cmnttype_cmnttype_id_seq'::regclass); CALTER TABLE public.cmnttype ALTER COLUMN cmnttype_id DROP DEFAULT; publicadminfalse357187w26041686711cmnttypesource_idDEFAULTALTER TABLE cmnttypesource ALTER COLUMN cmnttypesource_id SET DEFAULT nextval('cmnttypesource_cmnttypesource_id_seq'::regclass); OALTER TABLE public.cmnttypesource ALTER COLUMN cmnttypesource_id DROP DEFAULT; publicadminfalse35935826041686712cntct_idDEFAULT]ALTER TABLE cntct ALTER COLUMN cntct_id SET DEFAULT nextval('cntct_cntct_id_seq'::regclass); =ALTER TABLE public.cntct ALTER COLUMN cntct_id DROP DEFAULT; publicadminfalse360152x26041686713 cntctaddr_idDEFAULTmALTER TABLE cntctaddr ALTER COLUMN cntctaddr_id SET DEFAULT nextval('cntctaddr_cntctaddr_id_seq'::regclass); EALTER TABLE public.cntctaddr ALTER COLUMN cntctaddr_id DROP DEFAULT; publicadminfalse362361y26041686714 cntctdata_idDEFAULTmALTER TABLE cntctdata ALTER COLUMN cntctdata_id SET DEFAULT nextval('cntctdata_cntctdata_id_seq'::regclass); EALTER TABLE public.cntctdata ALTER COLUMN cntctdata_id DROP DEFAULT; publicadminfalse364363z26041686715 cntcteml_idDEFAULTiALTER TABLE cntcteml ALTER COLUMN cntcteml_id SET DEFAULT nextval('cntcteml_cntcteml_id_seq'::regclass); CALTER TABLE public.cntcteml ALTER COLUMN cntcteml_id DROP DEFAULT; publicadminfalse36636526041686716 company_idDEFAULTeALTER TABLE company ALTER COLUMN company_id SET DEFAULT nextval('company_company_id_seq'::regclass); AALTER TABLE public.company ALTER COLUMN company_id DROP DEFAULT; publicadminfalse38238126041744582 contrct_idDEFAULTeALTER TABLE contrct ALTER COLUMN contrct_id SET DEFAULT nextval('contrct_contrct_id_seq'::regclass); AALTER TABLE public.contrct ALTER COLUMN contrct_id DROP DEFAULT; publicadminfalse72071972026041686717 country_idDEFAULTeALTER TABLE country ALTER COLUMN country_id SET DEFAULT nextval('country_country_id_seq'::regclass); AALTER TABLE public.country ALTER COLUMN country_id DROP DEFAULT; publicadminfalse39239126041686718 crmacct_idDEFAULTeALTER TABLE crmacct ALTER COLUMN crmacct_id SET DEFAULT nextval('crmacct_crmacct_id_seq'::regclass); AALTER TABLE public.crmacct ALTER COLUMN crmacct_id DROP DEFAULT; publicadminfalse39415326041686719 curr_rate_idDEFAULTmALTER TABLE curr_rate ALTER COLUMN curr_rate_id SET DEFAULT nextval('curr_rate_curr_rate_id_seq'::regclass); EALTER TABLE public.curr_rate ALTER COLUMN curr_rate_id DROP DEFAULT; publicadminfalse39739626041686720curr_idDEFAULTgALTER TABLE curr_symbol ALTER COLUMN curr_id SET DEFAULT nextval('curr_symbol_curr_id_seq'::regclass); BALTER TABLE public.curr_symbol ALTER COLUMN curr_id DROP DEFAULT; publicadminfalse39815626041686721dept_idDEFAULTYALTER TABLE dept ALTER COLUMN dept_id SET DEFAULT nextval('dept_dept_id_seq'::regclass); ;ALTER TABLE public.dept ALTER COLUMN dept_id DROP DEFAULT; publicadminfalse407213X26041686722 docass_idDEFAULTaALTER TABLE docass ALTER COLUMN docass_id SET DEFAULT nextval('docass_docass_id_seq'::regclass); ?ALTER TABLE public.docass ALTER COLUMN docass_id DROP DEFAULT; publicadminfalse19318926041686723emp_idDEFAULTUALTER TABLE emp ALTER COLUMN emp_id SET DEFAULT nextval('emp_emp_id_seq'::regclass); 9ALTER TABLE public.emp ALTER COLUMN emp_id DROP DEFAULT; publicadminfalse41121426041686724 empgrp_idDEFAULTaALTER TABLE empgrp ALTER COLUMN empgrp_id SET DEFAULT nextval('empgrp_empgrp_id_seq'::regclass); ?ALTER TABLE public.empgrp ALTER COLUMN empgrp_id DROP DEFAULT; publicadminfalse41341226041686725 empgrpitem_idDEFAULTqALTER TABLE empgrpitem ALTER COLUMN empgrpitem_id SET DEFAULT nextval('empgrpitem_empgrpitem_id_seq'::regclass); GALTER TABLE public.empgrpitem ALTER COLUMN empgrpitem_id DROP DEFAULT; publicadminfalse41541426041686726 expcat_idDEFAULTaALTER TABLE expcat ALTER COLUMN expcat_id SET DEFAULT nextval('expcat_expcat_id_seq'::regclass); ?ALTER TABLE public.expcat ALTER COLUMN expcat_id DROP DEFAULT; publicadminfalse422245\26041686727file_idDEFAULTYALTER TABLE file ALTER COLUMN file_id SET DEFAULT nextval('file_file_id_seq'::regclass); ;ALTER TABLE public.file ALTER COLUMN file_id DROP DEFAULT; publicadminfalse42319026041686728 filter_idDEFAULTaALTER TABLE filter ALTER COLUMN filter_id SET DEFAULT nextval('filter_filter_id_seq'::regclass); ?ALTER TABLE public.filter ALTER COLUMN filter_id DROP DEFAULT; publicadminfalse42542426041686729flcol_idDEFAULT]ALTER TABLE flcol ALTER COLUMN flcol_id SET DEFAULT nextval('flcol_flcol_id_seq'::regclass); =ALTER TABLE public.flcol ALTER COLUMN flcol_id DROP DEFAULT; publicadminfalse42942826041686730flgrp_idDEFAULT]ALTER TABLE flgrp ALTER COLUMN flgrp_id SET DEFAULT nextval('flgrp_flgrp_id_seq'::regclass); =ALTER TABLE public.flgrp ALTER COLUMN flgrp_id DROP DEFAULT; publicadminfalse43143026041686731 flhead_idDEFAULTaALTER TABLE flhead ALTER COLUMN flhead_id SET DEFAULT nextval('flhead_flhead_id_seq'::regclass); ?ALTER TABLE public.flhead ALTER COLUMN flhead_id DROP DEFAULT; publicadminfalse43242626041686732 flitem_idDEFAULTaALTER TABLE flitem ALTER COLUMN flitem_id SET DEFAULT nextval('flitem_flitem_id_seq'::regclass); ?ALTER TABLE public.flitem ALTER COLUMN flitem_id DROP DEFAULT; publicadminfalse43342726041686733 flnotes_idDEFAULTeALTER TABLE flnotes ALTER COLUMN flnotes_id SET DEFAULT nextval('flnotes_flnotes_id_seq'::regclass); AALTER TABLE public.flnotes ALTER COLUMN flnotes_id DROP DEFAULT; publicadminfalse43543426041686734flrpt_idDEFAULT]ALTER TABLE flrpt ALTER COLUMN flrpt_id SET DEFAULT nextval('flrpt_flrpt_id_seq'::regclass); =ALTER TABLE public.flrpt ALTER COLUMN flrpt_id DROP DEFAULT; publicadminfalse437436 26041686735 flspec_idDEFAULTaALTER TABLE flspec ALTER COLUMN flspec_id SET DEFAULT nextval('flspec_flspec_id_seq'::regclass); ?ALTER TABLE public.flspec ALTER COLUMN flspec_id DROP DEFAULT; publicadminfalse43943826041686736freightclass_idDEFAULTyALTER TABLE freightclass ALTER COLUMN freightclass_id SET DEFAULT nextval('freightclass_freightclass_id_seq'::regclass); KALTER TABLE public.freightclass ALTER COLUMN freightclass_id DROP DEFAULT; publicadminfalse44221726041686737grp_idDEFAULTUALTER TABLE grp ALTER COLUMN grp_id SET DEFAULT nextval('grp_grp_id_seq'::regclass); 9ALTER TABLE public.grp ALTER COLUMN grp_id DROP DEFAULT; publicadminfalse44844726041686738 grppriv_idDEFAULTeALTER TABLE grppriv ALTER COLUMN grppriv_id SET DEFAULT nextval('grppriv_grppriv_id_seq'::regclass); AALTER TABLE public.grppriv ALTER COLUMN grppriv_id DROP DEFAULT; publicadminfalse45044926041686739hnfc_idDEFAULTYALTER TABLE hnfc ALTER COLUMN hnfc_id SET DEFAULT nextval('hnfc_hnfc_id_seq'::regclass); ;ALTER TABLE public.hnfc ALTER COLUMN hnfc_id DROP DEFAULT; publicadminfalse45245126041686740incdt_idDEFAULT]ALTER TABLE incdt ALTER COLUMN incdt_id SET DEFAULT nextval('incdt_incdt_id_seq'::regclass); =ALTER TABLE public.incdt ALTER COLUMN incdt_id DROP DEFAULT; publicadminfalse45315426041686741 incdtcat_idDEFAULTiALTER TABLE incdtcat ALTER COLUMN incdtcat_id SET DEFAULT nextval('incdtcat_incdtcat_id_seq'::regclass); CALTER TABLE public.incdtcat ALTER COLUMN incdtcat_id DROP DEFAULT; publicadminfalse45422026041686742 incdthist_idDEFAULTmALTER TABLE incdthist ALTER COLUMN incdthist_id SET DEFAULT nextval('incdthist_incdthist_id_seq'::regclass); EALTER TABLE public.incdthist ALTER COLUMN incdthist_id DROP DEFAULT; publicadminfalse45645526041686743incdtpriority_idDEFAULT}ALTER TABLE incdtpriority ALTER COLUMN incdtpriority_id SET DEFAULT nextval('incdtpriority_incdtpriority_id_seq'::regclass); MALTER TABLE public.incdtpriority ALTER COLUMN incdtpriority_id DROP DEFAULT; publicadminfalse45722126041686744incdtresolution_idDEFAULTALTER TABLE incdtresolution ALTER COLUMN incdtresolution_id SET DEFAULT nextval('incdtresolution_incdtresolution_id_seq'::regclass); QALTER TABLE public.incdtresolution ALTER COLUMN incdtresolution_id DROP DEFAULT; publicadminfalse45822226041686745incdtseverity_idDEFAULT}ALTER TABLE incdtseverity ALTER COLUMN incdtseverity_id SET DEFAULT nextval('incdtseverity_incdtseverity_id_seq'::regclass); MALTER TABLE public.incdtseverity ALTER COLUMN incdtseverity_id DROP DEFAULT; publicadminfalse459223v26041686746 invbal_idDEFAULTaALTER TABLE invbal ALTER COLUMN invbal_id SET DEFAULT nextval('invbal_invbal_id_seq'::regclass); ?ALTER TABLE public.invbal ALTER COLUMN invbal_id DROP DEFAULT; publicadminfalse46015026041686747 invchead_idDEFAULTiALTER TABLE invchead ALTER COLUMN invchead_id SET DEFAULT nextval('invchead_invchead_id_seq'::regclass); CALTER TABLE public.invchead ALTER COLUMN invchead_id DROP DEFAULT; publicadminfalse46217326041686748 invcitem_idDEFAULTiALTER TABLE invcitem ALTER COLUMN invcitem_id SET DEFAULT nextval('invcitem_invcitem_id_seq'::regclass); CALTER TABLE public.invcitem ALTER COLUMN invcitem_id DROP DEFAULT; publicadminfalse464175$26041686749invhistexpcat_idDEFAULT}ALTER TABLE invhistexpcat ALTER COLUMN invhistexpcat_id SET DEFAULT nextval('invhistexpcat_invhistexpcat_id_seq'::regclass); MALTER TABLE public.invhistexpcat ALTER COLUMN invhistexpcat_id DROP DEFAULT; publicadminfalse47347226041686750 ipsass_idDEFAULTaALTER TABLE ipsass ALTER COLUMN ipsass_id SET DEFAULT nextval('ipsass_ipsass_id_seq'::regclass); ?ALTER TABLE public.ipsass ALTER COLUMN ipsass_id DROP DEFAULT; publicadminfalse47523926041686751 ipsfreight_idDEFAULTqALTER TABLE ipsfreight ALTER COLUMN ipsfreight_id SET DEFAULT nextval('ipsfreight_ipsfreight_id_seq'::regclass); GALTER TABLE public.ipsfreight ALTER COLUMN ipsfreight_id DROP DEFAULT; publicadminfalse47821826041686752ipsitemchar_idDEFAULTuALTER TABLE ipsitemchar ALTER COLUMN ipsitemchar_id SET DEFAULT nextval('ipsitemchar_ipsitemchar_id_seq'::regclass); IALTER TABLE public.ipsitemchar ALTER COLUMN ipsitemchar_id DROP DEFAULT; publicadminfalse48124226041686753 ipsprodcat_idDEFAULTuALTER TABLE ipsprodcat_bak ALTER COLUMN ipsprodcat_id SET DEFAULT nextval('ipsprodcat_ipsprodcat_id_seq'::regclass); KALTER TABLE public.ipsprodcat_bak ALTER COLUMN ipsprodcat_id DROP DEFAULT; publicadminfalse482241/26041686754itemlocpost_idDEFAULTuALTER TABLE itemlocpost ALTER COLUMN itemlocpost_id SET DEFAULT nextval('itemlocpost_itemlocpost_id_seq'::regclass); IALTER TABLE public.itemlocpost ALTER COLUMN itemlocpost_id DROP DEFAULT; publicadminfalse50049926041686755 itemtax_idDEFAULTeALTER TABLE itemtax ALTER COLUMN itemtax_id SET DEFAULT nextval('itemtax_itemtax_id_seq'::regclass); AALTER TABLE public.itemtax ALTER COLUMN itemtax_id DROP DEFAULT; publicadminfalse506235026041686756 itemtrans_idDEFAULTmALTER TABLE itemtrans ALTER COLUMN itemtrans_id SET DEFAULT nextval('itemtrans_itemtrans_id_seq'::regclass); EALTER TABLE public.itemtrans ALTER COLUMN itemtrans_id DROP DEFAULT; publicadminfalse508507126041686757 itemuom_idDEFAULTeALTER TABLE itemuom ALTER COLUMN itemuom_id SET DEFAULT nextval('itemuom_itemuom_id_seq'::regclass); AALTER TABLE public.itemuom ALTER COLUMN itemuom_id DROP DEFAULT; publicadminfalse51050926041686758itemuomconv_idDEFAULTuALTER TABLE itemuomconv ALTER COLUMN itemuomconv_id SET DEFAULT nextval('itemuomconv_itemuomconv_id_seq'::regclass); IALTER TABLE public.itemuomconv ALTER COLUMN itemuomconv_id DROP DEFAULT; publicadminfalse511236326041686759 labeldef_idDEFAULTiALTER TABLE labeldef ALTER COLUMN labeldef_id SET DEFAULT nextval('labeldef_labeldef_id_seq'::regclass); CALTER TABLE public.labeldef ALTER COLUMN labeldef_id DROP DEFAULT; publicadminfalse516515626041686760lang_idDEFAULTYALTER TABLE lang ALTER COLUMN lang_id SET DEFAULT nextval('lang_lang_id_seq'::regclass); ;ALTER TABLE public.lang ALTER COLUMN lang_id DROP DEFAULT; publicadminfalse520519>26041686761 metricenc_idDEFAULTmALTER TABLE metricenc ALTER COLUMN metricenc_id SET DEFAULT nextval('metricenc_metricenc_id_seq'::regclass); EALTER TABLE public.metricenc ALTER COLUMN metricenc_id DROP DEFAULT; publicadminfalse530529526041686762 ophead_idDEFAULTaALTER TABLE ophead ALTER COLUMN ophead_id SET DEFAULT nextval('ophead_ophead_id_seq'::regclass); ?ALTER TABLE public.ophead ALTER COLUMN ophead_id DROP DEFAULT; publicadminfalse540181E26041686763 opsource_idDEFAULTiALTER TABLE opsource ALTER COLUMN opsource_id SET DEFAULT nextval('opsource_opsource_id_seq'::regclass); CALTER TABLE public.opsource ALTER COLUMN opsource_id DROP DEFAULT; publicadminfalse542541G26041686764 opstage_idDEFAULTeALTER TABLE opstage ALTER COLUMN opstage_id SET DEFAULT nextval('opstage_opstage_id_seq'::regclass); AALTER TABLE public.opstage ALTER COLUMN opstage_id DROP DEFAULT; publicadminfalse544543K26041686765 optype_idDEFAULTaALTER TABLE optype ALTER COLUMN optype_id SET DEFAULT nextval('optype_optype_id_seq'::regclass); ?ALTER TABLE public.optype ALTER COLUMN optype_id DROP DEFAULT; publicadminfalse546545O26041686766pack_idDEFAULTYALTER TABLE pack ALTER COLUMN pack_id SET DEFAULT nextval('pack_pack_id_seq'::regclass); ;ALTER TABLE public.pack ALTER COLUMN pack_id DROP DEFAULT; publicadminfalse550549l26041686767 period_idDEFAULTaALTER TABLE period ALTER COLUMN period_id SET DEFAULT nextval('period_period_id_seq'::regclass); ?ALTER TABLE public.period ALTER COLUMN period_id DROP DEFAULT; publicadminfalse553201V26041686768 pkgdep_idDEFAULTaALTER TABLE pkgdep ALTER COLUMN pkgdep_id SET DEFAULT nextval('pkgdep_pkgdep_id_seq'::regclass); ?ALTER TABLE public.pkgdep ALTER COLUMN pkgdep_id DROP DEFAULT; publicadminfalse555554W26041686769 pkghead_idDEFAULTeALTER TABLE pkghead ALTER COLUMN pkghead_id SET DEFAULT nextval('pkghead_pkghead_id_seq'::regclass); AALTER TABLE public.pkghead ALTER COLUMN pkghead_id DROP DEFAULT; publicadminfalse557556Z26041686770 pkgitem_idDEFAULTeALTER TABLE pkgitem ALTER COLUMN pkgitem_id SET DEFAULT nextval('pkgitem_pkgitem_id_seq'::regclass); AALTER TABLE public.pkgitem ALTER COLUMN pkgitem_id DROP DEFAULT; publicadminfalse559558]26041686771 potype_idDEFAULTaALTER TABLE potype ALTER COLUMN potype_id SET DEFAULT nextval('potype_potype_id_seq'::regclass); ?ALTER TABLE public.potype ALTER COLUMN potype_id DROP DEFAULT; publicadminfalse568567`26041686772 prftcntr_idDEFAULTiALTER TABLE prftcntr ALTER COLUMN prftcntr_id SET DEFAULT nextval('prftcntr_prftcntr_id_seq'::regclass); CALTER TABLE public.prftcntr ALTER COLUMN prftcntr_id DROP DEFAULT; publicadminfalse57257126041686773prj_idDEFAULTUALTER TABLE prj ALTER COLUMN prj_id SET DEFAULT nextval('prj_prj_id_seq'::regclass); 9ALTER TABLE public.prj ALTER COLUMN prj_id DROP DEFAULT; publicadminfalse575174826041686774 prjtask_idDEFAULTeALTER TABLE prjtask ALTER COLUMN prjtask_id SET DEFAULT nextval('prjtask_prjtask_id_seq'::regclass); AALTER TABLE public.prjtask ALTER COLUMN prjtask_id DROP DEFAULT; publicadminfalse576182d26041686775prjtaskuser_idDEFAULTuALTER TABLE prjtaskuser ALTER COLUMN prjtaskuser_id SET DEFAULT nextval('prjtaskuser_prjtaskuser_id_seq'::regclass); IALTER TABLE public.prjtaskuser ALTER COLUMN prjtaskuser_id DROP DEFAULT; publicadminfalse578577e26041686776 qryhead_idDEFAULTeALTER TABLE qryhead ALTER COLUMN qryhead_id SET DEFAULT nextval('qryhead_qryhead_id_seq'::regclass); AALTER TABLE public.qryhead ALTER COLUMN qryhead_id DROP DEFAULT; publicadminfalse581580l26041686777 qryitem_idDEFAULTeALTER TABLE qryitem ALTER COLUMN qryitem_id SET DEFAULT nextval('qryitem_qryitem_id_seq'::regclass); AALTER TABLE public.qryitem ALTER COLUMN qryitem_id DROP DEFAULT; publicadminfalse583582p26041686778recur_idDEFAULT]ALTER TABLE recur ALTER COLUMN recur_id SET DEFAULT nextval('recur_recur_id_seq'::regclass); =ALTER TABLE public.recur ALTER COLUMN recur_id DROP DEFAULT; publicadminfalse588587t26041686779 recurtype_idDEFAULTmALTER TABLE recurtype ALTER COLUMN recurtype_id SET DEFAULT nextval('recurtype_recurtype_id_seq'::regclass); EALTER TABLE public.recurtype ALTER COLUMN recurtype_id DROP DEFAULT; publicadminfalse590589x26041686780recv_idDEFAULTYALTER TABLE recv ALTER COLUMN recv_id SET DEFAULT nextval('recv_recv_id_seq'::regclass); ;ALTER TABLE public.recv ALTER COLUMN recv_id DROP DEFAULT; publicadminfalse59259126041686781 rsncode_idDEFAULTeALTER TABLE rsncode ALTER COLUMN rsncode_id SET DEFAULT nextval('rsncode_rsncode_id_seq'::regclass); AALTER TABLE public.rsncode ALTER COLUMN rsncode_id DROP DEFAULT; publicadminfalse59516126041686782 salescat_idDEFAULTiALTER TABLE salescat ALTER COLUMN salescat_id SET DEFAULT nextval('salescat_salescat_id_seq'::regclass); CALTER TABLE public.salescat ALTER COLUMN salescat_id DROP DEFAULT; publicadminfalse59916226041744599 saletype_idDEFAULTiALTER TABLE saletype ALTER COLUMN saletype_id SET DEFAULT nextval('saletype_saletype_id_seq'::regclass); CALTER TABLE public.saletype ALTER COLUMN saletype_id DROP DEFAULT; publicadminfalse722721722~26041686783 schemaord_idDEFAULTmALTER TABLE schemaord ALTER COLUMN schemaord_id SET DEFAULT nextval('schemaord_schemaord_id_seq'::regclass); EALTER TABLE public.schemaord ALTER COLUMN schemaord_id DROP DEFAULT; publicadminfalse60260126041686784shift_idDEFAULT]ALTER TABLE shift ALTER COLUMN shift_id SET DEFAULT nextval('shift_shift_id_seq'::regclass); =ALTER TABLE public.shift ALTER COLUMN shift_id DROP DEFAULT; publicadminfalse60421526041686785 shipchrg_idDEFAULTiALTER TABLE shipchrg ALTER COLUMN shipchrg_id SET DEFAULT nextval('shipchrg_shipchrg_id_seq'::regclass); CALTER TABLE public.shipchrg ALTER COLUMN shipchrg_id DROP DEFAULT; publicadminfalse60520826041686786 shiphead_idDEFAULTiALTER TABLE shiphead ALTER COLUMN shiphead_id SET DEFAULT nextval('shiphead_shiphead_id_seq'::regclass); CALTER TABLE public.shiphead ALTER COLUMN shiphead_id DROP DEFAULT; publicadminfalse609608%26041686787 shipitem_idDEFAULTiALTER TABLE shipitem ALTER COLUMN shipitem_id SET DEFAULT nextval('shipitem_shipitem_id_seq'::regclass); CALTER TABLE public.shipitem ALTER COLUMN shipitem_id DROP DEFAULT; publicadminfalse610474 26041686788 sitetype_idDEFAULTiALTER TABLE sitetype ALTER COLUMN sitetype_id SET DEFAULT nextval('sitetype_sitetype_id_seq'::regclass); CALTER TABLE public.sitetype ALTER COLUMN sitetype_id DROP DEFAULT; publicadminfalse61525726041686789 source_idDEFAULTaALTER TABLE source ALTER COLUMN source_id SET DEFAULT nextval('source_source_id_seq'::regclass); ?ALTER TABLE public.source ALTER COLUMN source_id DROP DEFAULT; publicadminfalse62061926041686790state_idDEFAULT]ALTER TABLE state ALTER COLUMN state_id SET DEFAULT nextval('state_state_id_seq'::regclass); =ALTER TABLE public.state ALTER COLUMN state_id DROP DEFAULT; publicadminfalse62262126041686791 status_idDEFAULTaALTER TABLE status ALTER COLUMN status_id SET DEFAULT nextval('status_status_id_seq'::regclass); ?ALTER TABLE public.status ALTER COLUMN status_id DROP DEFAULT; publicadminfalse62462326041686792 stdjrnl_idDEFAULTeALTER TABLE stdjrnl ALTER COLUMN stdjrnl_id SET DEFAULT nextval('stdjrnl_stdjrnl_id_seq'::regclass); AALTER TABLE public.stdjrnl ALTER COLUMN stdjrnl_id DROP DEFAULT; publicadminfalse62662526041686793 stdjrnlgrp_idDEFAULTqALTER TABLE stdjrnlgrp ALTER COLUMN stdjrnlgrp_id SET DEFAULT nextval('stdjrnlgrp_stdjrnlgrp_id_seq'::regclass); GALTER TABLE public.stdjrnlgrp ALTER COLUMN stdjrnlgrp_id DROP DEFAULT; publicadminfalse62862726041686794stdjrnlgrpitem_idDEFAULTALTER TABLE stdjrnlgrpitem ALTER COLUMN stdjrnlgrpitem_id SET DEFAULT nextval('stdjrnlgrpitem_stdjrnlgrpitem_id_seq'::regclass); OALTER TABLE public.stdjrnlgrpitem ALTER COLUMN stdjrnlgrpitem_id DROP DEFAULT; publicadminfalse63062926041686795stdjrnlitem_idDEFAULTuALTER TABLE stdjrnlitem ALTER COLUMN stdjrnlitem_id SET DEFAULT nextval('stdjrnlitem_stdjrnlitem_id_seq'::regclass); IALTER TABLE public.stdjrnlitem ALTER COLUMN stdjrnlitem_id DROP DEFAULT; publicadminfalse63263126041686796 subaccnt_idDEFAULTiALTER TABLE subaccnt ALTER COLUMN subaccnt_id SET DEFAULT nextval('subaccnt_subaccnt_id_seq'::regclass); CALTER TABLE public.subaccnt ALTER COLUMN subaccnt_id DROP DEFAULT; publicadminfalse63463326041686797subaccnttype_idDEFAULTyALTER TABLE subaccnttype ALTER COLUMN subaccnttype_id SET DEFAULT nextval('subaccnttype_subaccnttype_id_seq'::regclass); KALTER TABLE public.subaccnttype ALTER COLUMN subaccnttype_id DROP DEFAULT; publicadminfalse63663526041686798 taxass_idDEFAULTaALTER TABLE taxass ALTER COLUMN taxass_id SET DEFAULT nextval('taxass_taxass_id_seq'::regclass); ?ALTER TABLE public.taxass ALTER COLUMN taxass_id DROP DEFAULT; publicadminfalse63963826041686799 taxauth_idDEFAULTeALTER TABLE taxauth ALTER COLUMN taxauth_id SET DEFAULT nextval('taxauth_taxauth_id_seq'::regclass); AALTER TABLE public.taxauth ALTER COLUMN taxauth_id DROP DEFAULT; publicadminfalse64021026041686800 taxclass_idDEFAULTiALTER TABLE taxclass ALTER COLUMN taxclass_id SET DEFAULT nextval('taxclass_taxclass_id_seq'::regclass); CALTER TABLE public.taxclass ALTER COLUMN taxclass_id DROP DEFAULT; publicadminfalse642641 26041686577 taxhist_idDEFAULTeALTER TABLE taxhist ALTER COLUMN taxhist_id SET DEFAULT nextval('taxhist_taxhist_id_seq'::regclass); AALTER TABLE public.taxhist ALTER COLUMN taxhist_id DROP DEFAULT; publicadminfalse25425326041686801 taxrate_idDEFAULTeALTER TABLE taxrate ALTER COLUMN taxrate_id SET DEFAULT nextval('taxrate_taxrate_id_seq'::regclass); AALTER TABLE public.taxrate ALTER COLUMN taxrate_id DROP DEFAULT; publicadminfalse64464326041686802 taxreg_idDEFAULTaALTER TABLE taxreg ALTER COLUMN taxreg_id SET DEFAULT nextval('taxreg_taxreg_id_seq'::regclass); ?ALTER TABLE public.taxreg ALTER COLUMN taxreg_id DROP DEFAULT; publicadminfalse64521126041686803 taxtype_idDEFAULTeALTER TABLE taxtype ALTER COLUMN taxtype_id SET DEFAULT nextval('taxtype_taxtype_id_seq'::regclass); AALTER TABLE public.taxtype ALTER COLUMN taxtype_id DROP DEFAULT; publicadminfalse64617026041686804 taxzone_idDEFAULTeALTER TABLE taxzone ALTER COLUMN taxzone_id SET DEFAULT nextval('taxzone_taxzone_id_seq'::regclass); AALTER TABLE public.taxzone ALTER COLUMN taxzone_id DROP DEFAULT; publicadminfalse647166=26041686805 todoitem_idDEFAULTiALTER TABLE todoitem ALTER COLUMN todoitem_id SET DEFAULT nextval('todoitem_todoitem_id_seq'::regclass); CALTER TABLE public.todoitem ALTER COLUMN todoitem_id DROP DEFAULT; publicadminfalse64918326041686806 trialbal_idDEFAULTiALTER TABLE trialbal ALTER COLUMN trialbal_id SET DEFAULT nextval('trialbal_trialbal_id_seq'::regclass); CALTER TABLE public.trialbal ALTER COLUMN trialbal_id DROP DEFAULT; publicadminfalse65265126041686807uom_idDEFAULTUALTER TABLE uom ALTER COLUMN uom_id SET DEFAULT nextval('uom_uom_id_seq'::regclass); 9ALTER TABLE public.uom ALTER COLUMN uom_id DROP DEFAULT; publicadminfalse65317126041686808 uomconv_idDEFAULTeALTER TABLE uomconv ALTER COLUMN uomconv_id SET DEFAULT nextval('uomconv_uomconv_id_seq'::regclass); AALTER TABLE public.uomconv ALTER COLUMN uomconv_id DROP DEFAULT; publicadminfalse65565426041686809 uomtype_idDEFAULTeALTER TABLE uomtype ALTER COLUMN uomtype_id SET DEFAULT nextval('uomtype_uomtype_id_seq'::regclass); AALTER TABLE public.uomtype ALTER COLUMN uomtype_id DROP DEFAULT; publicadminfalse657656]26041686810url_idDEFAULT]ALTER TABLE urlinfo ALTER COLUMN url_id SET DEFAULT nextval('urlinfo_url_id_seq'::regclass); =ALTER TABLE public.urlinfo ALTER COLUMN url_id DROP DEFAULT; publicadminfalse658191b26041686811 usrgrp_idDEFAULTaALTER TABLE usrgrp ALTER COLUMN usrgrp_id SET DEFAULT nextval('usrgrp_usrgrp_id_seq'::regclass); ?ALTER TABLE public.usrgrp ALTER COLUMN usrgrp_id DROP DEFAULT; publicadminfalse66257326041686812 vendtype_idDEFAULTiALTER TABLE vendtype ALTER COLUMN vendtype_id SET DEFAULT nextval('vendtype_vendtype_id_seq'::regclass); CALTER TABLE public.vendtype ALTER COLUMN vendtype_id DROP DEFAULT; publicadminfalse66725826041686813 whsezone_idDEFAULTiALTER TABLE whsezone ALTER COLUMN whsezone_id SET DEFAULT nextval('whsezone_whsezone_id_seq'::regclass); CALTER TABLE public.whsezone ALTER COLUMN whsezone_id DROP DEFAULT; publicadminfalse67723826041686814 womatlpost_idDEFAULTqALTER TABLE womatlpost ALTER COLUMN womatlpost_id SET DEFAULT nextval('womatlpost_womatlpost_id_seq'::regclass); GALTER TABLE public.womatlpost ALTER COLUMN womatlpost_id DROP DEFAULT; publicadminfalse68168026041686815 xsltmap_idDEFAULTeALTER TABLE xsltmap ALTER COLUMN xsltmap_id SET DEFAULT nextval('xsltmap_xsltmap_id_seq'::regclass); AALTER TABLE public.xsltmap ALTER COLUMN xsltmap_id DROP DEFAULT; publicadminfalse68668526041686816 yearperiod_idDEFAULTqALTER TABLE yearperiod ALTER COLUMN yearperiod_id SET DEFAULT nextval('yearperiod_yearperiod_id_seq'::regclass); GALTER TABLE public.yearperiod ALTER COLUMN yearperiod_id DROP DEFAULT; publicadminfalse68868726041686817 tecustrate_idDEFAULTqALTER TABLE tecustrate ALTER COLUMN tecustrate_id SET DEFAULT nextval('tecustrate_tecustrate_id_seq'::regclass); CALTER TABLE te.tecustrate ALTER COLUMN tecustrate_id DROP DEFAULT; teadminfalse69869726041686818teemp_idDEFAULT]ALTER TABLE teemp ALTER COLUMN teemp_id SET DEFAULT nextval('teemp_teemp_id_seq'::regclass); 9ALTER TABLE te.teemp ALTER COLUMN teemp_id DROP DEFAULT; teadminfalse70069926041686819 tehead_idDEFAULTaALTER TABLE tehead ALTER COLUMN tehead_id SET DEFAULT nextval('tehead_tehead_id_seq'::regclass); ;ALTER TABLE te.tehead ALTER COLUMN tehead_id DROP DEFAULT; teadminfalse70470326041686820 teitem_idDEFAULTaALTER TABLE teitem ALTER COLUMN teitem_id SET DEFAULT nextval('teitem_teitem_id_seq'::regclass); ;ALTER TABLE te.teitem ALTER COLUMN teitem_id DROP DEFAULT; teadminfalse70670526041686821teprj_idDEFAULT]ALTER TABLE teprj ALTER COLUMN teprj_id SET DEFAULT nextval('teprj_teprj_id_seq'::regclass); 9ALTER TABLE te.teprj ALTER COLUMN teprj_id DROP DEFAULT; teadminfalse70870726041686822 teprjtask_idDEFAULTmALTER TABLE teprjtask ALTER COLUMN teprjtask_id SET DEFAULT nextval('teprjtask_teprjtask_id_seq'::regclass); AALTER TABLE te.teprjtask ALTER COLUMN teprjtask_id DROP DEFAULT; teadminfalse710709 01684482pkgcmd TABLE DATAmCOPY pkgcmd (cmd_id, cmd_module, cmd_title, cmd_descrip, cmd_privname, cmd_executable, cmd_name) FROM stdin; fixcountryadminfalse261@8F 01684498 pkgcmdarg TABLE DATAPCOPY pkgcmdarg (cmdarg_id, cmdarg_cmd_id, cmdarg_order, cmdarg_arg) FROM stdin; fixcountryadminfalse264]8F 01684507pkgimage TABLE DATALCOPY pkgimage (image_id, image_name, image_descrip, image_data) FROM stdin; fixcountryadminfalse266z8F 01684524 pkgmetasql TABLE DATACOPY pkgmetasql (metasql_id, metasql_group, metasql_name, metasql_notes, metasql_query, metasql_lastuser, metasql_lastupdate, metasql_grade) FROM stdin; fixcountryadminfalse2698F 01684541pkgpriv TABLE DATASCOPY pkgpriv (priv_id, priv_module, priv_name, priv_descrip, priv_seq) FROM stdin; fixcountryadminfalse272;F 01684557 pkgreport TABLE DATA~COPY pkgreport (report_id, report_name, report_sys, report_source, report_descrip, report_grade, report_loaddate) FROM stdin; fixcountryadminfalse275;F 01684574 pkgscript TABLE DATAoCOPY pkgscript (script_id, script_name, script_order, script_enabled, script_source, script_notes) FROM stdin; fixcountryadminfalse278S 01684532priv TABLE DATAPCOPY priv (priv_id, priv_module, priv_name, priv_descrip, priv_seq) FROM stdin; publicadminfalse270vSN 01682852prj TABLE DATACOPY prj (prj_id, prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po, prj_owner_username, prj_start_date, prj_due_date, prj_assigned_date, prj_completed_date, prj_username, prj_recurring_prj_id, prj_crmacct_id, prj_cntct_id) FROM stdin; publicadminfalse174kSU 01683192prjtask TABLE DATAYCOPY prjtask (prjtask_id, prjtask_number, prjtask_name, prjtask_descrip, prjtask_prj_id, prjtask_anyuser, prjtask_status, prjtask_hours_budget, prjtask_hours_actual, prjtask_exp_budget, prjtask_exp_actual, prjtask_owner_username, prjtask_start_date, prjtask_due_date, prjtask_assigned_date, prjtask_completed_date, prjtask_username) FROM stdin; publicadminfalse182WS !01685878 prjtaskuser TABLE DATA\COPY prjtaskuser (prjtaskuser_id, prjtaskuser_prjtask_id, prjtaskuser_username) FROM stdin; publicadminfalse577S~ 01684020prodcat TABLE DATAECOPY prodcat (prodcat_id, prodcat_code, prodcat_descrip) FROM stdin; publicadminfalse225S 01684240prospect TABLE DATACOPY prospect (prospect_id, prospect_active, prospect_number, prospect_name, prospect_cntct_id, prospect_comments, prospect_created, prospect_salesrep_id, prospect_warehous_id, prospect_taxzone_id) FROM stdin; publicadminfalse244S!!01685888qryhead TABLE DATAwCOPY qryhead (qryhead_id, qryhead_name, qryhead_descrip, qryhead_notes, qryhead_username, qryhead_updated) FROM stdin; publicadminfalse580S"!01685898qryitem TABLE DATACOPY qryitem (qryitem_id, qryitem_qryhead_id, qryitem_name, qryitem_order, qryitem_src, qryitem_group, qryitem_detail, qryitem_notes, qryitem_username, qryitem_updated) FROM stdin; publicadminfalse582S 01684309quhead TABLE DATACOPY quhead (quhead_id, quhead_number, quhead_cust_id, quhead_quotedate, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptophone, quhead_salesrep_id, quhead_terms_id, quhead_freight, quhead_ordercomments, quhead_shipcomments, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_commission, quhead_custponumber, quhead_fob, quhead_shipvia, quhead_warehous_id, quhead_packdate, quhead_prj_id, quhead_misc, quhead_misc_accnt_id, quhead_misc_descrip, quhead_billtocountry, quhead_shiptocountry, quhead_curr_id, quhead_imported, quhead_expire, quhead_calcfreight, quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email, quhead_taxzone_id, quhead_taxtype_id, quhead_ophead_id, quhead_status, quhead_saletype_id, quhead_shipzone_id) FROM stdin; publicadminfalse2498S 01684331quitem TABLE DATACOPY quitem (quitem_id, quitem_quhead_id, quitem_linenumber, quitem_itemsite_id, quitem_scheddate, quitem_qtyord, quitem_unitcost, quitem_price, quitem_custprice, quitem_memo, quitem_custpn, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_imported, quitem_qty_uom_id, quitem_qty_invuomratio, quitem_price_uom_id, quitem_price_invuomratio, quitem_promdate, quitem_taxtype_id, quitem_dropship, quitem_itemsrc_id, quitem_pricemode) FROM stdin; publicadminfalse250S#!01685915rcalitem TABLE DATACOPY rcalitem (rcalitem_id, rcalitem_calhead_id, rcalitem_offsettype, rcalitem_offsetcount, rcalitem_periodtype, rcalitem_periodcount, rcalitem_name) FROM stdin; publicadminfalse586S$!01685922recur TABLE DATACOPY recur (recur_id, recur_parent_id, recur_parent_type, recur_period, recur_freq, recur_start, recur_end, recur_max, recur_data) FROM stdin; publicadminfalse587S%!01685933 recurtype TABLE DATACOPY recurtype (recurtype_id, recurtype_type, recurtype_table, recurtype_donecheck, recurtype_schedcol, recurtype_limit, recurtype_copyfunc, recurtype_copyargs, recurtype_delfunc) FROM stdin; publicadminfalse589S&!01685941recv TABLE DATACOPY recv (recv_id, recv_order_type, recv_order_number, recv_orderitem_id, recv_agent_username, recv_itemsite_id, recv_vend_id, recv_vend_item_number, recv_vend_item_descrip, recv_vend_uom, recv_purchcost, recv_purchcost_curr_id, recv_duedate, recv_qty, recv_recvcost, recv_recvcost_curr_id, recv_freight, recv_freight_curr_id, recv_date, recv_value, recv_posted, recv_invoiced, recv_vohead_id, recv_voitem_id, recv_trans_usr_name, recv_notes, recv_gldistdate, recv_splitfrom_id, recv_rlsd_duedate) FROM stdin; publicadminfalse591̷S 01684548report TABLE DATA{COPY report (report_id, report_name, report_sys, report_source, report_descrip, report_grade, report_loaddate) FROM stdin; publicadminfalse273S'!01685957rjctcode TABLE DATAICOPY rjctcode (rjctcode_id, rjctcode_code, rjctcode_descrip) FROM stdin; publicadminfalse593OXA 01682684rsncode TABLE DATAVCOPY rsncode (rsncode_id, rsncode_code, rsncode_descrip, rsncode_doctype) FROM stdin; publicadminfalse161`PX(!01685968sale TABLE DATAhCOPY sale (sale_id, sale_name, sale_descrip, sale_ipshead_id, sale_startdate, sale_enddate) FROM stdin; publicadminfalse596PX 01685076 salesaccnt TABLE DATAkCOPY salesaccnt (salesaccnt_id, salesaccnt_custtype_id, salesaccnt_prodcat_id, salesaccnt_warehous_id, salesaccnt_sales_accnt_id, salesaccnt_credit_accnt_id, salesaccnt_cos_accnt_id, salesaccnt_custtype, salesaccnt_prodcat, salesaccnt_returns_accnt_id, salesaccnt_cor_accnt_id, salesaccnt_cow_accnt_id, salesaccnt_saletype_id, salesaccnt_shipzone_id) FROM stdin; publicadminfalse393PXB 01682690salescat TABLE DATACOPY salescat (salescat_id, salescat_active, salescat_name, salescat_descrip, salescat_sales_accnt_id, salescat_prepaid_accnt_id, salescat_ar_accnt_id) FROM stdin; publicadminfalse162rQXC 01682696salesrep TABLE DATACOPY salesrep (salesrep_id, salesrep_active, salesrep_number, salesrep_name, salesrep_commission, salesrep_method, salesrep_emp_id) FROM stdin; publicadminfalse163QXb!01744596saletype TABLE DATAXCOPY saletype (saletype_id, saletype_code, saletype_descr, saletype_active) FROM stdin; publicadminfalse722LRX)!01685993 schemaord TABLE DATAKCOPY schemaord (schemaord_id, schemaord_name, schemaord_order) FROM stdin; publicadminfalse601RX 01684564script TABLE DATAlCOPY script (script_id, script_name, script_order, script_enabled, script_source, script_notes) FROM stdin; publicadminfalse276RX*!01686002sequence TABLE DATA+COPY sequence (sequence_value) FROM stdin; publicadminfalse603PbXt 01683903shift TABLE DATA<COPY shift (shift_id, shift_number, shift_name) FROM stdin; publicadminfalse215iXm 01683824shipchrg TABLE DATArCOPY shipchrg (shipchrg_id, shipchrg_name, shipchrg_descrip, shipchrg_custfreight, shipchrg_handling) FROM stdin; publicadminfalse208iXu 01683922shipdata TABLE DATAuCOPY shipdata (shipdata_cohead_number, shipdata_cosmisc_tracknum, shipdata_cosmisc_packnum_tracknum, shipdata_weight, shipdata_base_freight, shipdata_total_freight, shipdata_shipper, shipdata_billing_option, shipdata_package_type, shipdata_void_ind, shipdata_lastupdated, shipdata_shiphead_number, shipdata_base_freight_curr_id, shipdata_total_freight_curr_id) FROM stdin; publicadminfalse216.jX+!01686009 shipdatasum TABLE DATACOPY shipdatasum (shipdatasum_cohead_number, shipdatasum_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum, shipdatasum_weight, shipdatasum_base_freight, shipdatasum_total_freight, shipdatasum_shipper, shipdatasum_billing_option, shipdatasum_package_type, shipdatasum_lastupdated, shipdatasum_shipped, shipdatasum_shiphead_number, shipdatasum_base_freight_curr_id, shipdatasum_total_freight_curr_id) FROM stdin; publicadminfalse606jXn 01683830shipform TABLE DATAaCOPY shipform (shipform_id, shipform_name, shipform_report_id, shipform_report_name) FROM stdin; publicadminfalse209kX,!01686022shiphead TABLE DATA&COPY shiphead (shiphead_id, shiphead_order_id, shiphead_order_type, shiphead_number, shiphead_shipvia, shiphead_freight, shiphead_freight_curr_id, shiphead_notes, shiphead_shipped, shiphead_shipdate, shiphead_shipchrg_id, shiphead_shipform_id, shiphead_sfstatus, shiphead_tracknum) FROM stdin; publicadminfalse608kX 01685483shipitem TABLE DATACOPY shipitem (shipitem_id, shipitem_orderitem_id, shipitem_shiphead_id, shipitem_qty, shipitem_shipped, shipitem_shipdate, shipitem_transdate, shipitem_trans_username, shipitem_invoiced, shipitem_invcitem_id, shipitem_value, shipitem_invhist_id) FROM stdin; publicadminfalse474sXE 01682720 shiptoinfo TABLE DATASCOPY shiptoinfo (shipto_id, shipto_cust_id, shipto_name, shipto_salesrep_id, shipto_comments, shipto_shipcomments, shipto_shipzone_id, shipto_shipvia, shipto_commission, shipto_shipform_id, shipto_shipchrg_id, shipto_active, shipto_default, shipto_num, shipto_ediprofile_id, shipto_cntct_id, shipto_addr_id, shipto_taxzone_id) FROM stdin; publicadminfalse165(X 01684417shipvia TABLE DATAECOPY shipvia (shipvia_id, shipvia_code, shipvia_descrip) FROM stdin; publicadminfalse256[Xq 01683870shipzone TABLE DATAICOPY shipzone (shipzone_id, shipzone_name, shipzone_descrip) FROM stdin; publicadminfalse212X 01684424sitetype TABLE DATAICOPY sitetype (sitetype_id, sitetype_name, sitetype_descrip) FROM stdin; publicadminfalse257X-!01686047sltrans TABLE DATA2COPY sltrans (sltrans_id, sltrans_created, sltrans_date, sltrans_sequence, sltrans_accnt_id, sltrans_source, sltrans_docnumber, sltrans_misc_id, sltrans_amount, sltrans_notes, sltrans_journalnumber, sltrans_posted, sltrans_doctype, sltrans_username, sltrans_gltrans_journalnumber, sltrans_rec) FROM stdin; publicadminfalse616OX.!01686056sltrans_backup TABLE DATAACOPY sltrans_backup (sltrans_old_id, sltrans_new_id) FROM stdin; publicadminfalse617lX/!01686061source TABLE DATAPCOPY source (source_id, source_module, source_name, source_descrip) FROM stdin; publicadminfalse619X0!01686069state TABLE DATALCOPY state (state_id, state_name, state_abbr, state_country_id) FROM stdin; publicadminfalse621yX1!01686077status TABLE DATAeCOPY status (status_id, status_type, status_code, status_name, status_seq, status_color) FROM stdin; publicadminfalse623֋X2!01686086stdjrnl TABLE DATATCOPY stdjrnl (stdjrnl_id, stdjrnl_name, stdjrnl_descrip, stdjrnl_notes) FROM stdin; publicadminfalse625jX3!01686094 stdjrnlgrp TABLE DATAQCOPY stdjrnlgrp (stdjrnlgrp_id, stdjrnlgrp_name, stdjrnlgrp_descrip) FROM stdin; publicadminfalse627X4!01686102stdjrnlgrpitem TABLE DATACOPY stdjrnlgrpitem (stdjrnlgrpitem_id, stdjrnlgrpitem_stdjrnl_id, stdjrnlgrpitem_toapply, stdjrnlgrpitem_applied, stdjrnlgrpitem_effective, stdjrnlgrpitem_expires, stdjrnlgrpitem_stdjrnlgrp_id) FROM stdin; publicadminfalse6297X5!01686107 stdjrnlitem TABLE DATACOPY stdjrnlitem (stdjrnlitem_id, stdjrnlitem_stdjrnl_id, stdjrnlitem_accnt_id, stdjrnlitem_amount, stdjrnlitem_notes) FROM stdin; publicadminfalse631TX6!01686115subaccnt TABLE DATAKCOPY subaccnt (subaccnt_id, subaccnt_number, subaccnt_descrip) FROM stdin; publicadminfalse633X7!01686123 subaccnttype TABLE DATArCOPY subaccnttype (subaccnttype_id, subaccnttype_accnt_type, subaccnttype_code, subaccnttype_descrip) FROM stdin; publicadminfalse635?X 01684286tax TABLE DATA|COPY tax (tax_id, tax_code, tax_descrip, tax_sales_accnt_id, tax_taxclass_id, tax_taxauth_id, tax_basis_tax_id) FROM stdin; publicadminfalse247X8!01686133taxass TABLE DATAYCOPY taxass (taxass_id, taxass_taxzone_id, taxass_taxtype_id, taxass_tax_id) FROM stdin; publicadminfalse638Xo 01683842taxauth TABLE DATACOPY taxauth (taxauth_id, taxauth_code, taxauth_name, taxauth_extref, taxauth_addr_id, taxauth_curr_id, taxauth_county, taxauth_accnt_id) FROM stdin; publicadminfalse210+X9!01686140taxclass TABLE DATA\COPY taxclass (taxclass_id, taxclass_code, taxclass_descrip, taxclass_sequence) FROM stdin; publicadminfalse641X 01684374taxhist TABLE DATA COPY taxhist (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; publicadminfalse253X:!01686148taxrate TABLE DATACOPY taxrate (taxrate_id, taxrate_tax_id, taxrate_percent, taxrate_curr_id, taxrate_amount, taxrate_effective, taxrate_expires) FROM stdin; publicadminfalse643Xp 01683848taxreg TABLE DATACOPY taxreg (taxreg_id, taxreg_rel_id, taxreg_rel_type, taxreg_taxauth_id, taxreg_number, taxreg_taxzone_id, taxreg_effective, taxreg_expires, taxreg_notes) FROM stdin; publicadminfalse211}XJ 01682798taxtype TABLE DATARCOPY taxtype (taxtype_id, taxtype_name, taxtype_descrip, taxtype_sys) FROM stdin; publicadminfalse170XF 01682727taxzone TABLE DATAECOPY taxzone (taxzone_id, taxzone_code, taxzone_descrip) FROM stdin; publicadminfalse166X= 01682619terms TABLE DATACOPY terms (terms_id, terms_code, terms_descrip, terms_type, terms_duedays, terms_discdays, terms_discprcnt, terms_cutoffday, terms_ap, terms_ar) FROM stdin; publicadminfalse157pXV 01683411todoitem TABLE DATACOPY todoitem (todoitem_id, todoitem_name, todoitem_description, todoitem_incdt_id, todoitem_creator_username, todoitem_status, todoitem_active, todoitem_start_date, todoitem_due_date, todoitem_assigned_date, todoitem_completed_date, todoitem_seq, todoitem_notes, todoitem_crmacct_id, todoitem_ophead_id, todoitem_owner_username, todoitem_priority_id, todoitem_username, todoitem_recurring_todoitem_id, todoitem_cntct_id) FROM stdin; publicadminfalse183X;!01686163trgthist TABLE DATAhCOPY trgthist (trgthist_src_cntct_id, trgthist_trgt_cntct_id, trgthist_col, trgthist_value) FROM stdin; publicadminfalse650LX!01686183uomtype TABLE DATAWCOPY uomtype (uomtype_id, uomtype_name, uomtype_descrip, uomtype_multiple) FROM stdin; publicadminfalse656QY^ 01683614urlinfo TABLE DATA6COPY urlinfo (url_id, url_title, url_url) FROM stdin; publicadminfalse191RY@!01686206usr_bak TABLE DATACOPY usr_bak (usr_id, usr_username, usr_propername, usr_passwd, usr_locale_id, usr_initials, usr_agent, usr_active, usr_email, usr_window) FROM stdin; publicadminfalse660RY!01685856usrgrp TABLE DATADCOPY usrgrp (usrgrp_id, usrgrp_grp_id, usrgrp_username) FROM stdin; publicadminfalse573 SY?!01686194usrpref TABLE DATAUCOPY usrpref (usrpref_id, usrpref_name, usrpref_value, usrpref_username) FROM stdin; publicadminfalse6597SY!01685862usrpriv TABLE DATAICOPY usrpriv (usrpriv_id, usrpriv_priv_id, usrpriv_username) FROM stdin; publicadminfalse574͍Y 01684293 vendaddrinfo TABLE DATACOPY vendaddrinfo (vendaddr_id, vendaddr_vend_id, vendaddr_code, vendaddr_name, vendaddr_comments, vendaddr_cntct_id, vendaddr_addr_id, vendaddr_taxzone_id) FROM stdin; publicadminfalse248'Y> 01682626vendinfo TABLE DATACOPY vendinfo (vend_id, vend_name, vend_lastpurchdate, vend_active, vend_po, vend_comments, vend_pocomments, vend_number, vend_1099, vend_exported, vend_fobsource, vend_fob, vend_terms_id, vend_shipvia, vend_vendtype_id, vend_qualified, vend_ediemail, vend_ediemailbody, vend_edisubject, vend_edifilename, vend_accntnum, vend_emailpodelivery, vend_restrictpurch, vend_edicc, vend_curr_id, vend_cntct1_id, vend_cntct2_id, vend_addr_id, vend_match, vend_ach_enabled, vend_ach_accnttype, vend_ach_use_vendinfo, vend_ach_indiv_number, vend_ach_indiv_name, vend_ediemailhtml, vend_ach_routingnumber, vend_ach_accntnumber, vend_taxzone_id, vend_accnt_id, vend_expcat_id, vend_tax_id) FROM stdin; publicadminfalse158Y 01684453vendtype TABLE DATAICOPY vendtype (vendtype_id, vendtype_code, vendtype_descrip) FROM stdin; publicadminfalse258HYA!01686227vodist TABLE DATACOPY vodist (vodist_id, vodist_poitem_id, vodist_vohead_id, vodist_costelem_id, vodist_accnt_id, vodist_amount, vodist_qty, vodist_expcat_id, vodist_tax_id, vodist_discountable, vodist_notes) FROM stdin; publicadminfalse668ќYB!01686239vohead TABLE DATACOPY vohead (vohead_id, vohead_number, vohead_pohead_id, vohead_posted, vohead_duedate, vohead_invcnumber, vohead_amount, vohead_docdate, vohead_1099, vohead_distdate, vohead_reference, vohead_terms_id, vohead_vend_id, vohead_curr_id, vohead_adjtaxtype_id, vohead_freighttaxtype_id, vohead_gldistdate, vohead_misc, vohead_taxzone_id, vohead_taxtype_id, vohead_notes, vohead_recurring_vohead_id) FROM stdin; publicadminfalse670YC!01686249 voheadtax TABLE DATA"COPY voheadtax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; publicadminfalse6726YD!01686255voitem TABLE DATACOPY voitem (voitem_id, voitem_vohead_id, voitem_poitem_id, voitem_close, voitem_qty, voitem_freight, voitem_taxtype_id) FROM stdin; publicadminfalse673YE!01686262 voitemtax TABLE DATA"COPY voitemtax (taxhist_id, taxhist_parent_id, taxhist_taxtype_id, taxhist_tax_id, taxhist_basis, taxhist_basis_tax_id, taxhist_sequence, taxhist_percent, taxhist_amount, taxhist_tax, taxhist_docdate, taxhist_distdate, taxhist_curr_id, taxhist_curr_rate, taxhist_journalnumber) FROM stdin; publicadminfalse675>Y 01684173whsezone TABLE DATA_COPY whsezone (whsezone_id, whsezone_warehous_id, whsezone_name, whsezone_descrip) FROM stdin; publicadminfalse2381YL 01682812whsinfo TABLE DATACOPY whsinfo (warehous_id, warehous_code, warehous_descrip, warehous_fob, warehous_active, warehous_counttag_prefix, warehous_counttag_number, warehous_bol_prefix, warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, warehous_aislesize, warehous_aislealpha, warehous_racksize, warehous_rackalpha, warehous_binsize, warehous_binalpha, warehous_locationsize, warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, warehous_shipping_commission, warehous_cntct_id, warehous_addr_id, warehous_transit, warehous_shipform_id, warehous_shipvia_id, warehous_shipcomments, warehous_costcat_id, warehous_sitetype_id, warehous_taxzone_id, warehous_sequence) FROM stdin; publicadminfalse172Y 01685163wo TABLE DATAWCOPY wo (wo_id, wo_number, wo_subnumber, wo_status, wo_itemsite_id, wo_startdate, wo_duedate, wo_ordtype, wo_ordid, wo_qtyord, wo_qtyrcv, wo_adhoc, wo_itemcfg_series, wo_imported, wo_wipvalue, wo_postedvalue, wo_prodnotes, wo_prj_id, wo_priority, wo_brdvalue, wo_bom_rev_id, wo_boo_rev_id, wo_cosmethod, wo_womatl_id, wo_username) FROM stdin; publicadminfalse410Y 01684260womatl TABLE DATACOPY womatl (womatl_id, womatl_wo_id, womatl_itemsite_id, womatl_qtyper, womatl_scrap, womatl_qtyreq, womatl_qtyiss, womatl_qtywipscrap, womatl_lastissue, womatl_lastreturn, womatl_cost, womatl_picklist, womatl_status, womatl_imported, womatl_createwo, womatl_issuemethod, womatl_wooper_id, womatl_bomitem_id, womatl_duedate, womatl_schedatwooper, womatl_uom_id, womatl_notes, womatl_ref, womatl_scrapvalue, womatl_qtyfxd, womatl_issuewo) FROM stdin; publicadminfalse246VYF!01686281 womatlpost TABLE DATAYCOPY womatlpost (womatlpost_id, womatlpost_womatl_id, womatlpost_invhist_id) FROM stdin; publicadminfalse680mYG!01686286 womatlvar TABLE DATAWCOPY womatlvar (womatlvar_id, womatlvar_number, womatlvar_subnumber, womatlvar_posted, womatlvar_parent_itemsite_id, womatlvar_component_itemsite_id, womatlvar_qtyord, womatlvar_qtyrcv, womatlvar_qtyiss, womatlvar_qtyper, womatlvar_scrap, womatlvar_wipscrap, womatlvar_bomitem_id, womatlvar_ref, womatlvar_notes, womatlvar_qtyfxd) FROM stdin; publicadminfalse682ALTER TABLE ONLY public.apaccnt DROP CONSTRAINT apaccnt_pkey; publicadminfalse28728726061687204 apapply_pkey CONSTRAINTSALTER TABLE ONLY apapply ADD CONSTRAINT apapply_pkey PRIMARY KEY (apapply_id); >ALTER TABLE ONLY public.apapply DROP CONSTRAINT apapply_pkey; publicadminfalse28928926061687206apcreditapply_pkey CONSTRAINTeALTER TABLE ONLY apcreditapply ADD CONSTRAINT apcreditapply_pkey PRIMARY KEY (apcreditapply_id); JALTER TABLE ONLY public.apcreditapply DROP CONSTRAINT apcreditapply_pkey; publicadminfalse29129126061687208 apopen_pkey CONSTRAINTPALTER TABLE ONLY apopen ADD CONSTRAINT apopen_pkey PRIMARY KEY (apopen_id); <ALTER TABLE ONLY public.apopen DROP CONSTRAINT apopen_pkey; publicadminfalse15515526061687210apopentax_pkey CONSTRAINTWALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_pkey PRIMARY KEY (taxhist_id); BALTER TABLE ONLY public.apopentax DROP CONSTRAINT apopentax_pkey; publicadminfalse29529526061687212apselect_apselect_apopen_id_key CONSTRAINTjALTER TABLE ONLY apselect ADD CONSTRAINT apselect_apselect_apopen_id_key UNIQUE (apselect_apopen_id); RALTER TABLE ONLY public.apselect DROP CONSTRAINT apselect_apselect_apopen_id_key; publicadminfalse29629626061687214 apselect_pkey CONSTRAINTVALTER TABLE ONLY apselect ADD CONSTRAINT apselect_pkey PRIMARY KEY (apselect_id); @ALTER TABLE ONLY public.apselect DROP CONSTRAINT apselect_pkey; publicadminfalse29629626061687216 araccnt_pkey CONSTRAINTSALTER TABLE ONLY araccnt ADD CONSTRAINT araccnt_pkey PRIMARY KEY (araccnt_id); >ALTER TABLE ONLY public.araccnt DROP CONSTRAINT araccnt_pkey; publicadminfalse29829826061687218 arapply_pkey CONSTRAINTSALTER TABLE ONLY arapply ADD CONSTRAINT arapply_pkey PRIMARY KEY (arapply_id); >ALTER TABLE ONLY public.arapply DROP CONSTRAINT arapply_pkey; publicadminfalse30030026061687220arcreditapply_pkey CONSTRAINTeALTER TABLE ONLY arcreditapply ADD CONSTRAINT arcreditapply_pkey PRIMARY KEY (arcreditapply_id); JALTER TABLE ONLY public.arcreditapply DROP CONSTRAINT arcreditapply_pkey; publicadminfalse30330326061687222 aropen_pkey CONSTRAINTPALTER TABLE ONLY aropen ADD CONSTRAINT aropen_pkey PRIMARY KEY (aropen_id); <ALTER TABLE ONLY public.aropen DROP CONSTRAINT aropen_pkey; publicadminfalse159159n26061687224aropenalloc_pkey CONSTRAINTALTER TABLE ONLY aropenalloc ADD CONSTRAINT aropenalloc_pkey PRIMARY KEY (aropenalloc_aropen_id, aropenalloc_doctype, aropenalloc_doc_id); FALTER TABLE ONLY public.aropenalloc DROP CONSTRAINT aropenalloc_pkey; publicadminfalse25125125125126061687226aropentax_pkey CONSTRAINTWALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_pkey PRIMARY KEY (taxhist_id); BALTER TABLE ONLY public.aropentax DROP CONSTRAINT aropentax_pkey; publicadminfalse30730726061687228 asohist_pkey CONSTRAINTSALTER TABLE ONLY asohist ADD CONSTRAINT asohist_pkey PRIMARY KEY (asohist_id); >ALTER TABLE ONLY public.asohist DROP CONSTRAINT asohist_pkey; publicadminfalse30830826061687230asohisttax_pkey CONSTRAINTYALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_pkey PRIMARY KEY (taxhist_id); DALTER TABLE ONLY public.asohisttax DROP CONSTRAINT asohisttax_pkey; publicadminfalse31031026061687232atlasmap_atlasmap_name_key CONSTRAINT`ALTER TABLE ONLY atlasmap ADD CONSTRAINT atlasmap_atlasmap_name_key UNIQUE (atlasmap_name); MALTER TABLE ONLY public.atlasmap DROP CONSTRAINT atlasmap_atlasmap_name_key; publicadminfalse31131126061687234 atlasmap_pkey CONSTRAINTVALTER TABLE ONLY atlasmap ADD CONSTRAINT atlasmap_pkey PRIMARY KEY (atlasmap_id); @ALTER TABLE ONLY public.atlasmap DROP CONSTRAINT atlasmap_pkey; publicadminfalse31131126061687236bankaccnt_bankaccnt_name_key CONSTRAINTdALTER TABLE ONLY bankaccnt ADD CONSTRAINT bankaccnt_bankaccnt_name_key UNIQUE (bankaccnt_name); PALTER TABLE ONLY public.bankaccnt DROP CONSTRAINT bankaccnt_bankaccnt_name_key; publicadminfalse20220226061687238bankaccnt_pkey CONSTRAINTYALTER TABLE ONLY bankaccnt ADD CONSTRAINT bankaccnt_pkey PRIMARY KEY (bankaccnt_id); BALTER TABLE ONLY public.bankaccnt DROP CONSTRAINT bankaccnt_pkey; publicadminfalse20220226061687240 bankadj_pkey CONSTRAINTSALTER TABLE ONLY bankadj ADD CONSTRAINT bankadj_pkey PRIMARY KEY (bankadj_id); >ALTER TABLE ONLY public.bankadj DROP CONSTRAINT bankadj_pkey; publicadminfalse31531526061687242 bankadjtype_bankadjtype_name_key CONSTRAINTlALTER TABLE ONLY bankadjtype ADD CONSTRAINT bankadjtype_bankadjtype_name_key UNIQUE (bankadjtype_name); VALTER TABLE ONLY public.bankadjtype DROP CONSTRAINT bankadjtype_bankadjtype_name_key; publicadminfalse31731726061687244bankadjtype_pkey CONSTRAINT_ALTER TABLE ONLY bankadjtype ADD CONSTRAINT bankadjtype_pkey PRIMARY KEY (bankadjtype_id); FALTER TABLE ONLY public.bankadjtype DROP CONSTRAINT bankadjtype_pkey; publicadminfalse31731726061687246 bankrec_pkey CONSTRAINTSALTER TABLE ONLY bankrec ADD CONSTRAINT bankrec_pkey PRIMARY KEY (bankrec_id); >ALTER TABLE ONLY public.bankrec DROP CONSTRAINT bankrec_pkey; publicadminfalse31931926061687248bankrecitem_pkey CONSTRAINT_ALTER TABLE ONLY bankrecitem ADD CONSTRAINT bankrecitem_pkey PRIMARY KEY (bankrecitem_id); FALTER TABLE ONLY public.bankrecitem DROP CONSTRAINT bankrecitem_pkey; publicadminfalse32132126061687250 bomhead_pkey CONSTRAINTSALTER TABLE ONLY bomhead ADD CONSTRAINT bomhead_pkey PRIMARY KEY (bomhead_id); >ALTER TABLE ONLY public.bomhead DROP CONSTRAINT bomhead_pkey; publicadminfalse19619626061687252 bomitem_pkey CONSTRAINTSALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_pkey PRIMARY KEY (bomitem_id); >ALTER TABLE ONLY public.bomitem DROP CONSTRAINT bomitem_pkey; publicadminfalse15115126061687254bomitemcost_pkey CONSTRAINT_ALTER TABLE ONLY bomitemcost ADD CONSTRAINT bomitemcost_pkey PRIMARY KEY (bomitemcost_id); FALTER TABLE ONLY public.bomitemcost DROP CONSTRAINT bomitemcost_pkey; publicadminfalse32532526061687256bomitemsub_pkey CONSTRAINT\ALTER TABLE ONLY bomitemsub ADD CONSTRAINT bomitemsub_pkey PRIMARY KEY (bomitemsub_id); DALTER TABLE ONLY public.bomitemsub DROP CONSTRAINT bomitemsub_pkey; publicadminfalse19719726061687258 bomwork_pkey CONSTRAINTSALTER TABLE ONLY bomwork ADD CONSTRAINT bomwork_pkey PRIMARY KEY (bomwork_id); >ALTER TABLE ONLY public.bomwork DROP CONSTRAINT bomwork_pkey; publicadminfalse32832826061687260budghead_budghead_name_key CONSTRAINT`ALTER TABLE ONLY budghead ADD CONSTRAINT budghead_budghead_name_key UNIQUE (budghead_name); MALTER TABLE ONLY public.budghead DROP CONSTRAINT budghead_budghead_name_key; publicadminfalse19819826061687262 budghead_pkey CONSTRAINTVALTER TABLE ONLY budghead ADD CONSTRAINT budghead_pkey PRIMARY KEY (budghead_id); @ALTER TABLE ONLY public.budghead DROP CONSTRAINT budghead_pkey; publicadminfalse19819826061687264 budgitem_pkey CONSTRAINTVALTER TABLE ONLY budgitem ADD CONSTRAINT budgitem_pkey PRIMARY KEY (budgitem_id); @ALTER TABLE ONLY public.budgitem DROP CONSTRAINT budgitem_pkey; publicadminfalse20020026061687266 calhead_pkey CONSTRAINTSALTER TABLE ONLY calhead ADD CONSTRAINT calhead_pkey PRIMARY KEY (calhead_id); >ALTER TABLE ONLY public.calhead DROP CONSTRAINT calhead_pkey; publicadminfalse33233226061687268cashrcpt_cashrcpt_number_key CONSTRAINTdALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_cashrcpt_number_key UNIQUE (cashrcpt_number); OALTER TABLE ONLY public.cashrcpt DROP CONSTRAINT cashrcpt_cashrcpt_number_key; publicadminfalse20320326061687270 cashrcpt_pkey CONSTRAINTVALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_pkey PRIMARY KEY (cashrcpt_id); @ALTER TABLE ONLY public.cashrcpt DROP CONSTRAINT cashrcpt_pkey; publicadminfalse20320326061687272cashrcptitem_pkey CONSTRAINTbALTER TABLE ONLY cashrcptitem ADD CONSTRAINT cashrcptitem_pkey PRIMARY KEY (cashrcptitem_id); HALTER TABLE ONLY public.cashrcptitem DROP CONSTRAINT cashrcptitem_pkey; publicadminfalse20420426061687274cashrcptmisc_pkey CONSTRAINTbALTER TABLE ONLY cashrcptmisc ADD CONSTRAINT cashrcptmisc_pkey PRIMARY KEY (cashrcptmisc_id); HALTER TABLE ONLY public.cashrcptmisc DROP CONSTRAINT cashrcptmisc_pkey; publicadminfalse20520526061687276 ccard_pkey CONSTRAINTMALTER TABLE ONLY ccard ADD CONSTRAINT ccard_pkey PRIMARY KEY (ccard_id); :ALTER TABLE ONLY public.ccard DROP CONSTRAINT ccard_pkey; publicadminfalse20620626061687278ccardaud_ccard_pkey CONSTRAINT\ALTER TABLE ONLY ccardaud ADD CONSTRAINT ccardaud_ccard_pkey PRIMARY KEY (ccardaud_id); FALTER TABLE ONLY public.ccardaud DROP CONSTRAINT ccardaud_ccard_pkey; publicadminfalse33833826061687280ccbank_ccbank_ccard_type_key CONSTRAINTdALTER TABLE ONLY ccbank ADD CONSTRAINT ccbank_ccbank_ccard_type_key UNIQUE (ccbank_ccard_type); MALTER TABLE ONLY public.ccbank DROP CONSTRAINT ccbank_ccbank_ccard_type_key; publicadminfalse34034026061687282 ccbank_pkey CONSTRAINTPALTER TABLE ONLY ccbank ADD CONSTRAINT ccbank_pkey PRIMARY KEY (ccbank_id); <ALTER TABLE ONLY public.ccbank DROP CONSTRAINT ccbank_pkey; publicadminfalse34034026061687284 ccpay_pkey CONSTRAINTMALTER TABLE ONLY ccpay ADD CONSTRAINT ccpay_pkey PRIMARY KEY (ccpay_id); :ALTER TABLE ONLY public.ccpay DROP CONSTRAINT ccpay_pkey; publicadminfalse34234226061687286char_char_name_key CONSTRAINTRALTER TABLE ONLY "char" ADD CONSTRAINT char_char_name_key UNIQUE (char_name); CALTER TABLE ONLY public."char" DROP CONSTRAINT char_char_name_key; publicadminfalse18518526061687288 char_pkey CONSTRAINTLALTER TABLE ONLY "char" ADD CONSTRAINT char_pkey PRIMARY KEY (char_id); :ALTER TABLE ONLY public."char" DROP CONSTRAINT char_pkey; publicadminfalse18518526061687290 charass_pkey CONSTRAINTSALTER TABLE ONLY charass ADD CONSTRAINT charass_pkey PRIMARY KEY (charass_id); >ALTER TABLE ONLY public.charass DROP CONSTRAINT charass_pkey; publicadminfalse18618626061687292 charopt_pkey CONSTRAINTSALTER TABLE ONLY charopt ADD CONSTRAINT charopt_pkey PRIMARY KEY (charopt_id); >ALTER TABLE ONLY public.charopt DROP CONSTRAINT charopt_pkey; publicadminfalse34634626061687294checkhead_pkey CONSTRAINTYALTER TABLE ONLY checkhead ADD CONSTRAINT checkhead_pkey PRIMARY KEY (checkhead_id); BALTER TABLE ONLY public.checkhead DROP CONSTRAINT checkhead_pkey; publicadminfalse34834826061687296checkitem_pkey CONSTRAINTYALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_pkey PRIMARY KEY (checkitem_id); BALTER TABLE ONLY public.checkitem DROP CONSTRAINT checkitem_pkey; publicadminfalse350350 26061744780classcode_classcode_code_key CONSTRAINTdALTER TABLE ONLY classcode ADD CONSTRAINT classcode_classcode_code_key UNIQUE (classcode_code); PALTER TABLE ONLY public.classcode DROP CONSTRAINT classcode_classcode_code_key; publicadminfalse224224 26061687298classcode_pkey CONSTRAINTYALTER TABLE ONLY classcode ADD CONSTRAINT classcode_pkey PRIMARY KEY (classcode_id); BALTER TABLE ONLY public.classcode DROP CONSTRAINT classcode_pkey; publicadminfalse22422426061687300cmd_pkey CONSTRAINTGALTER TABLE ONLY cmd ADD CONSTRAINT cmd_pkey PRIMARY KEY (cmd_id); 6ALTER TABLE ONLY public.cmd DROP CONSTRAINT cmd_pkey; publicadminfalse25925926061687302 cmdarg_pkey CONSTRAINTPALTER TABLE ONLY cmdarg ADD CONSTRAINT cmdarg_pkey PRIMARY KEY (cmdarg_id); <ALTER TABLE ONLY public.cmdarg DROP CONSTRAINT cmdarg_pkey; publicadminfalse262262.26061744783cmhead_cmhead_number_key CONSTRAINT\ALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_number_key UNIQUE (cmhead_number); IALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_cmhead_number_key; publicadminfalse164164126061687304 cmhead_pkey CONSTRAINTPALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_pkey PRIMARY KEY (cmhead_id); <ALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_pkey; publicadminfalse16416426061687306cmheadtax_pkey CONSTRAINTWALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_pkey PRIMARY KEY (taxhist_id); BALTER TABLE ONLY public.cmheadtax DROP CONSTRAINT cmheadtax_pkey; publicadminfalse354354;26061687308"cmitem_cmhead_id_linenumber_unique CONSTRAINT|ALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmhead_id_linenumber_unique UNIQUE (cmitem_cmhead_id, cmitem_linenumber); SALTER TABLE ONLY public.cmitem DROP CONSTRAINT cmitem_cmhead_id_linenumber_unique; publicadminfalse167167167=26061687310 cmitem_pkey CONSTRAINTPALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_pkey PRIMARY KEY (cmitem_id); <ALTER TABLE ONLY public.cmitem DROP CONSTRAINT cmitem_pkey; publicadminfalse16716726061687312cmitemtax_pkey CONSTRAINTWALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_pkey PRIMARY KEY (taxhist_id); BALTER TABLE ONLY public.cmitemtax DROP CONSTRAINT cmitemtax_pkey; publicadminfalse35635626061687314cmnttype_cmnttype_name_key CONSTRAINT`ALTER TABLE ONLY cmnttype ADD CONSTRAINT cmnttype_cmnttype_name_key UNIQUE (cmnttype_name); MALTER TABLE ONLY public.cmnttype DROP CONSTRAINT cmnttype_cmnttype_name_key; publicadminfalse18718726061687316 cmnttype_pkey CONSTRAINTVALTER TABLE ONLY cmnttype ADD CONSTRAINT cmnttype_pkey PRIMARY KEY (cmnttype_id); @ALTER TABLE ONLY public.cmnttype DROP CONSTRAINT cmnttype_pkey; publicadminfalse18718726061687318cmnttypesource_pkey CONSTRAINThALTER TABLE ONLY cmnttypesource ADD CONSTRAINT cmnttypesource_pkey PRIMARY KEY (cmnttypesource_id); LALTER TABLE ONLY public.cmnttypesource DROP CONSTRAINT cmnttypesource_pkey; publicadminfalse35835826061687320cntct_cntct_number_key CONSTRAINTXALTER TABLE ONLY cntct ADD CONSTRAINT cntct_cntct_number_key UNIQUE (cntct_number); FALTER TABLE ONLY public.cntct DROP CONSTRAINT cntct_cntct_number_key; publicadminfalse15215226061687322 cntct_pkey CONSTRAINTMALTER TABLE ONLY cntct ADD CONSTRAINT cntct_pkey PRIMARY KEY (cntct_id); :ALTER TABLE ONLY public.cntct DROP CONSTRAINT cntct_pkey; publicadminfalse15215226061687324cntctaddr_pkey CONSTRAINTYALTER TABLE ONLY cntctaddr ADD CONSTRAINT cntctaddr_pkey PRIMARY KEY (cntctaddr_id); BALTER TABLE ONLY public.cntctaddr DROP CONSTRAINT cntctaddr_pkey; publicadminfalse36136126061687326cntctdata_pkey CONSTRAINTYALTER TABLE ONLY cntctdata ADD CONSTRAINT cntctdata_pkey PRIMARY KEY (cntctdata_id); BALTER TABLE ONLY public.cntctdata DROP CONSTRAINT cntctdata_pkey; publicadminfalse36336326061687328 cntcteml_pkey CONSTRAINTVALTER TABLE ONLY cntcteml ADD CONSTRAINT cntcteml_pkey PRIMARY KEY (cntcteml_id); @ALTER TABLE ONLY public.cntcteml DROP CONSTRAINT cntcteml_pkey; publicadminfalse36536526061687330cntctmrgd_pkey CONSTRAINT_ALTER TABLE ONLY cntctmrgd ADD CONSTRAINT cntctmrgd_pkey PRIMARY KEY (cntctmrgd_cntct_id); BALTER TABLE ONLY public.cntctmrgd DROP CONSTRAINT cntctmrgd_pkey; publicadminfalse36736726061687332 cntctsel_pkey CONSTRAINT\ALTER TABLE ONLY cntctsel ADD CONSTRAINT cntctsel_pkey PRIMARY KEY (cntctsel_cntct_id); @ALTER TABLE ONLY public.cntctsel DROP CONSTRAINT cntctsel_pkey; publicadminfalse36836826061687334 cntslip_pkey CONSTRAINTSALTER TABLE ONLY cntslip ADD CONSTRAINT cntslip_pkey PRIMARY KEY (cntslip_id); >ALTER TABLE ONLY public.cntslip DROP CONSTRAINT cntslip_pkey; publicadminfalse36936926061687336 cobill_pkey CONSTRAINTPALTER TABLE ONLY cobill ADD CONSTRAINT cobill_pkey PRIMARY KEY (cobill_id); <ALTER TABLE ONLY public.cobill DROP CONSTRAINT cobill_pkey; publicadminfalse371371 26061687338cobilltax_pkey CONSTRAINTWALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_pkey PRIMARY KEY (taxhist_id); BALTER TABLE ONLY public.cobilltax DROP CONSTRAINT cobilltax_pkey; publicadminfalse373373 26061687340 cobmisc_pkey CONSTRAINTSALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_pkey PRIMARY KEY (cobmisc_id); >ALTER TABLE ONLY public.cobmisc DROP CONSTRAINT cobmisc_pkey; publicadminfalse37437426061687342cobmisctax_pkey CONSTRAINTYALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_pkey PRIMARY KEY (taxhist_id); DALTER TABLE ONLY public.cobmisctax DROP CONSTRAINT cobmisctax_pkey; publicadminfalse376376j26061687344cohead_cohead_number_key CONSTRAINT\ALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_number_key UNIQUE (cohead_number); IALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_number_key; publicadminfalse176176p26061687346 cohead_pkey CONSTRAINTPALTER TABLE ONLY cohead ADD CONSTRAINT cohead_pkey PRIMARY KEY (cohead_id); <ALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_pkey; publicadminfalse176176s26061687348 cohist_pkey CONSTRAINTPALTER TABLE ONLY cohist ADD CONSTRAINT cohist_pkey PRIMARY KEY (cohist_id); <ALTER TABLE ONLY public.cohist DROP CONSTRAINT cohist_pkey; publicadminfalse252252y26061687350cohisttax_pkey CONSTRAINTWALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_pkey PRIMARY KEY (taxhist_id); BALTER TABLE ONLY public.cohisttax DROP CONSTRAINT cohisttax_pkey; publicadminfalse255255w26061687352 coitem_pkey CONSTRAINTPALTER TABLE ONLY coitem ADD CONSTRAINT coitem_pkey PRIMARY KEY (coitem_id); <ALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_pkey; publicadminfalse17717726061687354 comment_pkey CONSTRAINTSALTER TABLE ONLY comment ADD CONSTRAINT comment_pkey PRIMARY KEY (comment_id); >ALTER TABLE ONLY public.comment DROP CONSTRAINT comment_pkey; publicadminfalse18818826061687356company_company_number_key CONSTRAINT`ALTER TABLE ONLY company ADD CONSTRAINT company_company_number_key UNIQUE (company_number); LALTER TABLE ONLY public.company DROP CONSTRAINT company_company_number_key; publicadminfalse38138126061687358 company_pkey CONSTRAINTSALTER TABLE ONLY company ADD CONSTRAINT company_pkey PRIMARY KEY (company_id); >ALTER TABLE ONLY public.company DROP CONSTRAINT company_pkey; publicadminfalse38138126061744587 contrct_pkey CONSTRAINTSALTER TABLE ONLY contrct ADD CONSTRAINT contrct_pkey PRIMARY KEY (contrct_id); >ALTER TABLE ONLY public.contrct DROP CONSTRAINT contrct_pkey; publicadminfalse72072026061744789costcat_costcat_code_key CONSTRAINT\ALTER TABLE ONLY costcat ADD CONSTRAINT costcat_costcat_code_key UNIQUE (costcat_code); JALTER TABLE ONLY public.costcat DROP CONSTRAINT costcat_costcat_code_key; publicadminfalse22922926061687360 costcat_pkey CONSTRAINTSALTER TABLE ONLY costcat ADD CONSTRAINT costcat_pkey PRIMARY KEY (costcat_id); >ALTER TABLE ONLY public.costcat DROP CONSTRAINT costcat_pkey; publicadminfalse22922926061744792costelem_costelem_type_key CONSTRAINT`ALTER TABLE ONLY costelem ADD CONSTRAINT costelem_costelem_type_key UNIQUE (costelem_type); MALTER TABLE ONLY public.costelem DROP CONSTRAINT costelem_costelem_type_key; publicadminfalse22722726061687362 costelem_pkey CONSTRAINTVALTER TABLE ONLY costelem ADD CONSTRAINT costelem_pkey PRIMARY KEY (costelem_id); @ALTER TABLE ONLY public.costelem DROP CONSTRAINT costelem_pkey; publicadminfalse22722726061687364 costhist_pkey CONSTRAINTVALTER TABLE ONLY costhist ADD CONSTRAINT costhist_pkey PRIMARY KEY (costhist_id); @ALTER TABLE ONLY public.costhist DROP CONSTRAINT costhist_pkey; publicadminfalse38838826061687366!costupdate_costupdate_item_id_key CONSTRAINTnALTER TABLE ONLY costupdate ADD CONSTRAINT costupdate_costupdate_item_id_key UNIQUE (costupdate_item_id); VALTER TABLE ONLY public.costupdate DROP CONSTRAINT costupdate_costupdate_item_id_key; publicadminfalse39039026061687368country_country_abbr_key CONSTRAINT\ALTER TABLE ONLY country ADD CONSTRAINT country_country_abbr_key UNIQUE (country_abbr); JALTER TABLE ONLY public.country DROP CONSTRAINT country_country_abbr_key; publicadminfalse39139126061687370country_country_name_key CONSTRAINT\ALTER TABLE ONLY country ADD CONSTRAINT country_country_name_key UNIQUE (country_name); JALTER TABLE ONLY public.country DROP CONSTRAINT country_country_name_key; publicadminfalse39139126061687372 country_pkey CONSTRAINTSALTER TABLE ONLY country ADD CONSTRAINT country_pkey PRIMARY KEY (country_id); >ALTER TABLE ONLY public.country DROP CONSTRAINT country_pkey; publicadminfalse39139126061687374crmacct_crmacct_number_key CONSTRAINT`ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_number_key UNIQUE (crmacct_number); LALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_number_key; publicadminfalse15315326061687376 crmacct_pkey CONSTRAINTSALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_pkey PRIMARY KEY (crmacct_id); >ALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_pkey; publicadminfalse153153#26061687378crmacctsel_pkey CONSTRAINThALTER TABLE ONLY crmacctsel ADD CONSTRAINT crmacctsel_pkey PRIMARY KEY (crmacctsel_src_crmacct_id); DALTER TABLE ONLY public.crmacctsel DROP CONSTRAINT crmacctsel_pkey; publicadminfalse395395%26061687380curr_rate_curr_id_key CONSTRAINTfALTER TABLE ONLY curr_rate ADD CONSTRAINT curr_rate_curr_id_key UNIQUE (curr_id, curr_effective); IALTER TABLE ONLY public.curr_rate DROP CONSTRAINT curr_rate_curr_id_key; publicadminfalse396396396'26061687382curr_rate_pkey CONSTRAINTYALTER TABLE ONLY curr_rate ADD CONSTRAINT curr_rate_pkey PRIMARY KEY (curr_rate_id); BALTER TABLE ONLY public.curr_rate DROP CONSTRAINT curr_rate_pkey; publicadminfalse39639626061687384curr_symbol_curr_abbr_key CONSTRAINT^ALTER TABLE ONLY curr_symbol ADD CONSTRAINT curr_symbol_curr_abbr_key UNIQUE (curr_abbr); OALTER TABLE ONLY public.curr_symbol DROP CONSTRAINT curr_symbol_curr_abbr_key; publicadminfalse156156 26061687386curr_symbol_curr_name_key CONSTRAINT^ALTER TABLE ONLY curr_symbol ADD CONSTRAINT curr_symbol_curr_name_key UNIQUE (curr_name); OALTER TABLE ONLY public.curr_symbol DROP CONSTRAINT curr_symbol_curr_name_key; publicadminfalse156156 26061687388curr_symbol_pkey CONSTRAINTXALTER TABLE ONLY curr_symbol ADD CONSTRAINT curr_symbol_pkey PRIMARY KEY (curr_id); FALTER TABLE ONLY public.curr_symbol DROP CONSTRAINT curr_symbol_pkey; publicadminfalse15615626061687390 cust_pkey CONSTRAINTNALTER TABLE ONLY custinfo ADD CONSTRAINT cust_pkey PRIMARY KEY (cust_id); <ALTER TABLE ONLY public.custinfo DROP CONSTRAINT cust_pkey; publicadminfalse160160)26061687392 custform_pkey CONSTRAINTVALTER TABLE ONLY custform ADD CONSTRAINT custform_pkey PRIMARY KEY (custform_id); @ALTER TABLE ONLY public.custform DROP CONSTRAINT custform_pkey; publicadminfalse400400+26061687394 custgrp_pkey CONSTRAINTSALTER TABLE ONLY custgrp ADD CONSTRAINT custgrp_pkey PRIMARY KEY (custgrp_id); >ALTER TABLE ONLY public.custgrp DROP CONSTRAINT custgrp_pkey; publicadminfalse402402-26061687396custgrpitem_pkey CONSTRAINT_ALTER TABLE ONLY custgrpitem ADD CONSTRAINT custgrpitem_pkey PRIMARY KEY (custgrpitem_id); FALTER TABLE ONLY public.custgrpitem DROP CONSTRAINT custgrpitem_pkey; publicadminfalse404404 26061687398custinfo_cust_number_key CONSTRAINT\ALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_number_key UNIQUE (cust_number); KALTER TABLE ONLY public.custinfo DROP CONSTRAINT custinfo_cust_number_key; publicadminfalse16016026061687400custtype_custtype_code_key CONSTRAINT`ALTER TABLE ONLY custtype ADD CONSTRAINT custtype_custtype_code_key UNIQUE (custtype_code); MALTER TABLE ONLY public.custtype DROP CONSTRAINT custtype_custtype_code_key; publicadminfalse20720726061687402 custtype_pkey CONSTRAINTVALTER TABLE ONLY custtype ADD CONSTRAINT custtype_pkey PRIMARY KEY (custtype_id); @ALTER TABLE ONLY public.custtype DROP CONSTRAINT custtype_pkey; publicadminfalse20720726061687404dept_dept_number_key CONSTRAINTTALTER TABLE ONLY dept ADD CONSTRAINT dept_dept_number_key UNIQUE (dept_number); CALTER TABLE ONLY public.dept DROP CONSTRAINT dept_dept_number_key; publicadminfalse21321326061687406 dept_pkey CONSTRAINTJALTER TABLE ONLY dept ADD CONSTRAINT dept_pkey PRIMARY KEY (dept_id); 8ALTER TABLE ONLY public.dept DROP CONSTRAINT dept_pkey; publicadminfalse213213/26061687408destination_pkey CONSTRAINT_ALTER TABLE ONLY destination ADD CONSTRAINT destination_pkey PRIMARY KEY (destination_id); FALTER TABLE ONLY public.destination DROP CONSTRAINT destination_pkey; publicadminfalse40840826061687410 docass_pkey CONSTRAINTPALTER TABLE ONLY docass ADD CONSTRAINT docass_pkey PRIMARY KEY (docass_id); <ALTER TABLE ONLY public.docass DROP CONSTRAINT docass_pkey; publicadminfalse18918926061687412emp_emp_code_key CONSTRAINTLALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_code_key UNIQUE (emp_code); >ALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_code_key; publicadminfalse21421426061687414emp_emp_number_key CONSTRAINTPALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_number_key UNIQUE (emp_number); @ALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_number_key; publicadminfalse21421426061687416emp_pkey CONSTRAINTGALTER TABLE ONLY emp ADD CONSTRAINT emp_pkey PRIMARY KEY (emp_id); 6ALTER TABLE ONLY public.emp DROP CONSTRAINT emp_pkey; publicadminfalse214214826061687418empgrp_empgrp_name_key CONSTRAINTXALTER TABLE ONLY empgrp ADD CONSTRAINT empgrp_empgrp_name_key UNIQUE (empgrp_name); GALTER TABLE ONLY public.empgrp DROP CONSTRAINT empgrp_empgrp_name_key; publicadminfalse412412:26061687420 empgrp_pkey CONSTRAINTPALTER TABLE ONLY empgrp ADD CONSTRAINT empgrp_pkey PRIMARY KEY (empgrp_id); <ALTER TABLE ONLY public.empgrp DROP CONSTRAINT empgrp_pkey; publicadminfalse412412<26061687422empgrpitem_pkey CONSTRAINT\ALTER TABLE ONLY empgrpitem ADD CONSTRAINT empgrpitem_pkey PRIMARY KEY (empgrpitem_id); DALTER TABLE ONLY public.empgrpitem DROP CONSTRAINT empgrpitem_pkey; publicadminfalse414414@26061687424 evntlog_pkey CONSTRAINTSALTER TABLE ONLY evntlog ADD CONSTRAINT evntlog_pkey PRIMARY KEY (evntlog_id); >ALTER TABLE ONLY public.evntlog DROP CONSTRAINT evntlog_pkey; publicadminfalse416416C26061687426 evntnot_pkey CONSTRAINTSALTER TABLE ONLY evntnot ADD CONSTRAINT evntnot_pkey PRIMARY KEY (evntnot_id); >ALTER TABLE ONLY public.evntnot DROP CONSTRAINT evntnot_pkey; publicadminfalse418418F26061744805evnttype_evnttype_name_key CONSTRAINT`ALTER TABLE ONLY evnttype ADD CONSTRAINT evnttype_evnttype_name_key UNIQUE (evnttype_name); MALTER TABLE ONLY public.evnttype DROP CONSTRAINT evnttype_evnttype_name_key; publicadminfalse420420H26061687428 evnttype_pkey CONSTRAINTVALTER TABLE ONLY evnttype ADD CONSTRAINT evnttype_pkey PRIMARY KEY (evnttype_id); @ALTER TABLE ONLY public.evnttype DROP CONSTRAINT evnttype_pkey; publicadminfalse420420Y26061687430expcat_expcat_code_key CONSTRAINTXALTER TABLE ONLY expcat ADD CONSTRAINT expcat_expcat_code_key UNIQUE (expcat_code); GALTER TABLE ONLY public.expcat DROP CONSTRAINT expcat_expcat_code_key; publicadminfalse245245[26061687432 expcat_pkey CONSTRAINTPALTER TABLE ONLY expcat ADD CONSTRAINT expcat_pkey PRIMARY KEY (expcat_id); <ALTER TABLE ONLY public.expcat DROP CONSTRAINT expcat_pkey; publicadminfalse24524526061687434 file_pkey CONSTRAINTJALTER TABLE ONLY file ADD CONSTRAINT file_pkey PRIMARY KEY (file_id); 8ALTER TABLE ONLY public.file DROP CONSTRAINT file_pkey; publicadminfalse190190K26061687436 filter_pkey CONSTRAINTPALTER TABLE ONLY filter ADD CONSTRAINT filter_pkey PRIMARY KEY (filter_id); <ALTER TABLE ONLY public.filter DROP CONSTRAINT filter_pkey; publicadminfalse424424S26061687438fkey_flcol_key CONSTRAINTQALTER TABLE ONLY flcol ADD CONSTRAINT fkey_flcol_key PRIMARY KEY (flcol_id); >ALTER TABLE ONLY public.flcol DROP CONSTRAINT fkey_flcol_key; publicadminfalse428428U26061687440 flgrp_pkey CONSTRAINTMALTER TABLE ONLY flgrp ADD CONSTRAINT flgrp_pkey PRIMARY KEY (flgrp_id); :ALTER TABLE ONLY public.flgrp DROP CONSTRAINT flgrp_pkey; publicadminfalse430430M26061687442flhead_flhead_name_key CONSTRAINTXALTER TABLE ONLY flhead ADD CONSTRAINT flhead_flhead_name_key UNIQUE (flhead_name); GALTER TABLE ONLY public.flhead DROP CONSTRAINT flhead_flhead_name_key; publicadminfalse426426O26061687444 flhead_pkey CONSTRAINTPALTER TABLE ONLY flhead ADD CONSTRAINT flhead_pkey PRIMARY KEY (flhead_id); <ALTER TABLE ONLY public.flhead DROP CONSTRAINT flhead_pkey; publicadminfalse426426Q26061687446 flitem_pkey CONSTRAINTPALTER TABLE ONLY flitem ADD CONSTRAINT flitem_pkey PRIMARY KEY (flitem_id); <ALTER TABLE ONLY public.flitem DROP CONSTRAINT flitem_pkey; publicadminfalse427427W26061687448flnotes_flnotes_flhead_id_key CONSTRAINTyALTER TABLE ONLY flnotes ADD CONSTRAINT flnotes_flnotes_flhead_id_key UNIQUE (flnotes_flhead_id, flnotes_period_id); OALTER TABLE ONLY public.flnotes DROP CONSTRAINT flnotes_flnotes_flhead_id_key; publicadminfalse434434434Y26061687450 flrpt_pkey CONSTRAINTMALTER TABLE ONLY flrpt ADD CONSTRAINT flrpt_pkey PRIMARY KEY (flrpt_id); :ALTER TABLE ONLY public.flrpt DROP CONSTRAINT flrpt_pkey; publicadminfalse436436[26061687452 flspec_pkey CONSTRAINTPALTER TABLE ONLY flspec ADD CONSTRAINT flspec_pkey PRIMARY KEY (flspec_id); <ALTER TABLE ONLY public.flspec DROP CONSTRAINT flspec_pkey; publicadminfalse438438]26061744810form_form_name_key CONSTRAINTPALTER TABLE ONLY form ADD CONSTRAINT form_form_name_key UNIQUE (form_name); AALTER TABLE ONLY public.form DROP CONSTRAINT form_form_name_key; publicadminfalse440440_26061687454 form_pkey CONSTRAINTJALTER TABLE ONLY form ADD CONSTRAINT form_pkey PRIMARY KEY (form_id); 8ALTER TABLE ONLY public.form DROP CONSTRAINT form_pkey; publicadminfalse44044026061687456"freightclass_freightclass_code_key CONSTRAINTpALTER TABLE ONLY freightclass ADD CONSTRAINT freightclass_freightclass_code_key UNIQUE (freightclass_code); YALTER TABLE ONLY public.freightclass DROP CONSTRAINT freightclass_freightclass_code_key; publicadminfalse21721726061687458freightclass_pkey CONSTRAINTbALTER TABLE ONLY freightclass ADD CONSTRAINT freightclass_pkey PRIMARY KEY (freightclass_id); HALTER TABLE ONLY public.freightclass DROP CONSTRAINT freightclass_pkey; publicadminfalse217217a26061687460 glseries_pkey CONSTRAINTVALTER TABLE ONLY glseries ADD CONSTRAINT glseries_pkey PRIMARY KEY (glseries_id); @ALTER TABLE ONLY public.glseries DROP CONSTRAINT glseries_pkey; publicadminfalse443443?26061687462 gltrans_pkey CONSTRAINTSALTER TABLE ONLY gltrans ADD CONSTRAINT gltrans_pkey PRIMARY KEY (gltrans_id); >ALTER TABLE ONLY public.gltrans DROP CONSTRAINT gltrans_pkey; publicadminfalse237237c26061687464grp_grp_name_key CONSTRAINTLALTER TABLE ONLY grp ADD CONSTRAINT grp_grp_name_key UNIQUE (grp_name); >ALTER TABLE ONLY public.grp DROP CONSTRAINT grp_grp_name_key; publicadminfalse447447e26061687466grp_pkey CONSTRAINTGALTER TABLE ONLY grp ADD CONSTRAINT grp_pkey PRIMARY KEY (grp_id); 6ALTER TABLE ONLY public.grp DROP CONSTRAINT grp_pkey; publicadminfalse447447g26061687468 grppriv_pkey CONSTRAINTSALTER TABLE ONLY grppriv ADD CONSTRAINT grppriv_pkey PRIMARY KEY (grppriv_id); >ALTER TABLE ONLY public.grppriv DROP CONSTRAINT grppriv_pkey; publicadminfalse449449i26061744815hnfc_hnfc_code_key CONSTRAINTPALTER TABLE ONLY hnfc ADD CONSTRAINT hnfc_hnfc_code_key UNIQUE (hnfc_code); AALTER TABLE ONLY public.hnfc DROP CONSTRAINT hnfc_hnfc_code_key; publicadminfalse451451k26061687470 hnfc_pkey CONSTRAINTJALTER TABLE ONLY hnfc ADD CONSTRAINT hnfc_pkey PRIMARY KEY (hnfc_id); 8ALTER TABLE ONLY public.hnfc DROP CONSTRAINT hnfc_pkey; publicadminfalse45145126061687472 image_pkey CONSTRAINTMALTER TABLE ONLY image ADD CONSTRAINT image_pkey PRIMARY KEY (image_id); :ALTER TABLE ONLY public.image DROP CONSTRAINT image_pkey; publicadminfalse19419426061687474 imageass_pkey CONSTRAINTVALTER TABLE ONLY imageass ADD CONSTRAINT imageass_pkey PRIMARY KEY (imageass_id); @ALTER TABLE ONLY public.imageass DROP CONSTRAINT imageass_pkey; publicadminfalse19519526061687476incdt_incdt_number_key CONSTRAINTXALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_number_key UNIQUE (incdt_number); FALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_number_key; publicadminfalse15415426061687478 incdt_pkey CONSTRAINTMALTER TABLE ONLY incdt ADD CONSTRAINT incdt_pkey PRIMARY KEY (incdt_id); :ALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_pkey; publicadminfalse15415426061687480incdtcat_incdtcat_name_key CONSTRAINT`ALTER TABLE ONLY incdtcat ADD CONSTRAINT incdtcat_incdtcat_name_key UNIQUE (incdtcat_name); MALTER TABLE ONLY public.incdtcat DROP CONSTRAINT incdtcat_incdtcat_name_key; publicadminfalse22022026061687482 incdtcat_pkey CONSTRAINTVALTER TABLE ONLY incdtcat ADD CONSTRAINT incdtcat_pkey PRIMARY KEY (incdtcat_id); @ALTER TABLE ONLY public.incdtcat DROP CONSTRAINT incdtcat_pkey; publicadminfalse220220m26061687484incdthist_pkey CONSTRAINTYALTER TABLE ONLY incdthist ADD CONSTRAINT incdthist_pkey PRIMARY KEY (incdthist_id); BALTER TABLE ONLY public.incdthist DROP CONSTRAINT incdthist_pkey; publicadminfalse45545526061687486$incdtpriority_incdtpriority_name_key CONSTRAINTtALTER TABLE ONLY incdtpriority ADD CONSTRAINT incdtpriority_incdtpriority_name_key UNIQUE (incdtpriority_name); \ALTER TABLE ONLY public.incdtpriority DROP CONSTRAINT incdtpriority_incdtpriority_name_key; publicadminfalse22122126061687488incdtpriority_pkey CONSTRAINTeALTER TABLE ONLY incdtpriority ADD CONSTRAINT incdtpriority_pkey PRIMARY KEY (incdtpriority_id); JALTER TABLE ONLY public.incdtpriority DROP CONSTRAINT incdtpriority_pkey; publicadminfalse22122126061687490(incdtresolution_incdtresolution_name_key CONSTRAINT|ALTER TABLE ONLY incdtresolution ADD CONSTRAINT incdtresolution_incdtresolution_name_key UNIQUE (incdtresolution_name); bALTER TABLE ONLY public.incdtresolution DROP CONSTRAINT incdtresolution_incdtresolution_name_key; publicadminfalse22222226061687492incdtresolution_pkey CONSTRAINTkALTER TABLE ONLY incdtresolution ADD CONSTRAINT incdtresolution_pkey PRIMARY KEY (incdtresolution_id); NALTER TABLE ONLY public.incdtresolution DROP CONSTRAINT incdtresolution_pkey; publicadminfalse22222226061687494$incdtseverity_incdtseverity_name_key CONSTRAINTtALTER TABLE ONLY incdtseverity ADD CONSTRAINT incdtseverity_incdtseverity_name_key UNIQUE (incdtseverity_name); \ALTER TABLE ONLY public.incdtseverity DROP CONSTRAINT incdtseverity_incdtseverity_name_key; publicadminfalse22322326061687496incdtseverity_pkey CONSTRAINTeALTER TABLE ONLY incdtseverity ADD CONSTRAINT incdtseverity_pkey PRIMARY KEY (incdtseverity_id); JALTER TABLE ONLY public.incdtseverity DROP CONSTRAINT incdtseverity_pkey; publicadminfalse22322326061687498 invbal_pkey CONSTRAINTPALTER TABLE ONLY invbal ADD CONSTRAINT invbal_pkey PRIMARY KEY (invbal_id); <ALTER TABLE ONLY public.invbal DROP CONSTRAINT invbal_pkey; publicadminfalse150150\26061687500invchead_invcnumber_unique CONSTRAINTfALTER TABLE ONLY invchead ADD CONSTRAINT invchead_invcnumber_unique UNIQUE (invchead_invcnumber); MALTER TABLE ONLY public.invchead DROP CONSTRAINT invchead_invcnumber_unique; publicadminfalse173173^26061687502 invchead_pkey CONSTRAINTVALTER TABLE ONLY invchead ADD CONSTRAINT invchead_pkey PRIMARY KEY (invchead_id); @ALTER TABLE ONLY public.invchead DROP CONSTRAINT invchead_pkey; publicadminfalse173173o26061687504invcheadtax_pkey CONSTRAINT[ALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_pkey PRIMARY KEY (taxhist_id); FALTER TABLE ONLY public.invcheadtax DROP CONSTRAINT invcheadtax_pkey; publicadminfalse463463d26061687506&invcitem_invchead_id_linenumber_unique CONSTRAINTALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invchead_id_linenumber_unique UNIQUE (invcitem_invchead_id, invcitem_linenumber); YALTER TABLE ONLY public.invcitem DROP CONSTRAINT invcitem_invchead_id_linenumber_unique; publicadminfalse175175175h26061687508 invcitem_pkey CONSTRAINTVALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_pkey PRIMARY KEY (invcitem_id); @ALTER TABLE ONLY public.invcitem DROP CONSTRAINT invcitem_pkey; publicadminfalse175175q26061687510invcitemtax_pkey CONSTRAINT[ALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_pkey PRIMARY KEY (taxhist_id); FALTER TABLE ONLY public.invcitemtax DROP CONSTRAINT invcitemtax_pkey; publicadminfalse465465t26061687512 invcnt_pkey CONSTRAINTPALTER TABLE ONLY invcnt ADD CONSTRAINT invcnt_pkey PRIMARY KEY (invcnt_id); <ALTER TABLE ONLY public.invcnt DROP CONSTRAINT invcnt_pkey; publicadminfalse466466x26061687514invdetail_pkey CONSTRAINTYALTER TABLE ONLY invdetail ADD CONSTRAINT invdetail_pkey PRIMARY KEY (invdetail_id); BALTER TABLE ONLY public.invdetail DROP CONSTRAINT invdetail_pkey; publicadminfalse468468}26061687516 invhist_pkey CONSTRAINTSALTER TABLE ONLY invhist ADD CONSTRAINT invhist_pkey PRIMARY KEY (invhist_id); >ALTER TABLE ONLY public.invhist DROP CONSTRAINT invhist_pkey; publicadminfalse47047026061687518"invhistexpcat_invhist_id_expcat_id CONSTRAINTALTER TABLE ONLY invhistexpcat ADD CONSTRAINT invhistexpcat_invhist_id_expcat_id UNIQUE (invhistexpcat_invhist_id, invhistexpcat_expcat_id); ZALTER TABLE ONLY public.invhistexpcat DROP CONSTRAINT invhistexpcat_invhist_id_expcat_id; publicadminfalse47247247226061687520invhistexpcat_pkey CONSTRAINTeALTER TABLE ONLY invhistexpcat ADD CONSTRAINT invhistexpcat_pkey PRIMARY KEY (invhistexpcat_id); JALTER TABLE ONLY public.invhistexpcat DROP CONSTRAINT invhistexpcat_pkey; publicadminfalse472472D26061687522ipsass_ipsass_ipshead_id_key CONSTRAINTALTER TABLE ONLY ipsass ADD CONSTRAINT ipsass_ipsass_ipshead_id_key UNIQUE (ipsass_ipshead_id, ipsass_cust_id, ipsass_custtype_id, ipsass_custtype_pattern, ipsass_shipto_id, ipsass_shipto_pattern); MALTER TABLE ONLY public.ipsass DROP CONSTRAINT ipsass_ipsass_ipshead_id_key; publicadminfalse239239239239239239239F26061687524 ipsass_pkey CONSTRAINTPALTER TABLE ONLY ipsass ADD CONSTRAINT ipsass_pkey PRIMARY KEY (ipsass_id); <ALTER TABLE ONLY public.ipsass DROP CONSTRAINT ipsass_pkey; publicadminfalse23923926061687526ipsfreight_pkey CONSTRAINT\ALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_pkey PRIMARY KEY (ipsfreight_id); DALTER TABLE ONLY public.ipsfreight DROP CONSTRAINT ipsfreight_pkey; publicadminfalse21821826061687528ipshead_ipshead_name_key CONSTRAINT\ALTER TABLE ONLY ipshead ADD CONSTRAINT ipshead_ipshead_name_key UNIQUE (ipshead_name); JALTER TABLE ONLY public.ipshead DROP CONSTRAINT ipshead_ipshead_name_key; publicadminfalse21921926061687530 ipshead_pkey CONSTRAINTSALTER TABLE ONLY ipshead ADD CONSTRAINT ipshead_pkey PRIMARY KEY (ipshead_id); >ALTER TABLE ONLY public.ipshead DROP CONSTRAINT ipshead_pkey; publicadminfalse219219I26061744639ipsitem_ipsitem_ipshead_id_key CONSTRAINTALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipsitem_ipshead_id_key UNIQUE (ipsitem_ipshead_id, ipsitem_item_id, ipsitem_prodcat_id, ipsitem_qtybreak, ipsitem_qty_uom_id, ipsitem_price_uom_id); TALTER TABLE ONLY public.ipsiteminfo DROP CONSTRAINT ipsitem_ipsitem_ipshead_id_key; publicadminfalse240240240240240240240K26061687534 ipsitem_pkey CONSTRAINTWALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_pkey PRIMARY KEY (ipsitem_id); BALTER TABLE ONLY public.ipsiteminfo DROP CONSTRAINT ipsitem_pkey; publicadminfalse240240O26061687536&ipsitemchar_ipsitemchar_ipsitem_id_key CONSTRAINTALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_key UNIQUE (ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value); \ALTER TABLE ONLY public.ipsitemchar DROP CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_key; publicadminfalse242242242242Q26061687538'ipsitemchar_ipsitemchar_ipsitem_id_key1 CONSTRAINTALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_key1 UNIQUE (ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value); ]ALTER TABLE ONLY public.ipsitemchar DROP CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_key1; publicadminfalse242242242242S26061687540ipsitemchar_pkey CONSTRAINT_ALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_pkey PRIMARY KEY (ipsitemchar_id); FALTER TABLE ONLY public.ipsitemchar DROP CONSTRAINT ipsitemchar_pkey; publicadminfalse242242M26061687542ipsprodcat_pkey CONSTRAINT`ALTER TABLE ONLY ipsprodcat_bak ADD CONSTRAINT ipsprodcat_pkey PRIMARY KEY (ipsprodcat_id); HALTER TABLE ONLY public.ipsprodcat_bak DROP CONSTRAINT ipsprodcat_pkey; publicadminfalse241241@26061687544item_item_number_key CONSTRAINTTALTER TABLE ONLY item ADD CONSTRAINT item_item_number_key UNIQUE (item_number); CALTER TABLE ONLY public.item DROP CONSTRAINT item_item_number_key; publicadminfalse168168C26061687546 item_pkey CONSTRAINTJALTER TABLE ONLY item ADD CONSTRAINT item_pkey PRIMARY KEY (item_id); 8ALTER TABLE ONLY public.item DROP CONSTRAINT item_pkey; publicadminfalse16816826061687548itemalias_itemalias_item_id_key CONSTRAINT|ALTER TABLE ONLY itemalias ADD CONSTRAINT itemalias_itemalias_item_id_key UNIQUE (itemalias_item_id, itemalias_number); SALTER TABLE ONLY public.itemalias DROP CONSTRAINT itemalias_itemalias_item_id_key; publicadminfalse22622622626061687550itemalias_pkey CONSTRAINTYALTER TABLE ONLY itemalias ADD CONSTRAINT itemalias_pkey PRIMARY KEY (itemalias_id); BALTER TABLE ONLY public.itemalias DROP CONSTRAINT itemalias_pkey; publicadminfalse22622626061687552 itemcost_pkey CONSTRAINTVALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_pkey PRIMARY KEY (itemcost_id); @ALTER TABLE ONLY public.itemcost DROP CONSTRAINT itemcost_pkey; publicadminfalse22822826061744826itemgrp_itemgrp_name_key CONSTRAINT\ALTER TABLE ONLY itemgrp ADD CONSTRAINT itemgrp_itemgrp_name_key UNIQUE (itemgrp_name); JALTER TABLE ONLY public.itemgrp DROP CONSTRAINT itemgrp_itemgrp_name_key; publicadminfalse48848826061687554 itemgrp_pkey CONSTRAINTSALTER TABLE ONLY itemgrp ADD CONSTRAINT itemgrp_pkey PRIMARY KEY (itemgrp_id); >ALTER TABLE ONLY public.itemgrp DROP CONSTRAINT itemgrp_pkey; publicadminfalse48848826061687556itemgrpitem_pkey CONSTRAINT_ALTER TABLE ONLY itemgrpitem ADD CONSTRAINT itemgrpitem_pkey PRIMARY KEY (itemgrpitem_id); FALTER TABLE ONLY public.itemgrpitem DROP CONSTRAINT itemgrpitem_pkey; publicadminfalse49049026061687558 itemloc_pkey CONSTRAINTSALTER TABLE ONLY itemloc ADD CONSTRAINT itemloc_pkey PRIMARY KEY (itemloc_id); >ALTER TABLE ONLY public.itemloc DROP CONSTRAINT itemloc_pkey; publicadminfalse49449426061687560itemlocdist_pkey CONSTRAINT_ALTER TABLE ONLY itemlocdist ADD CONSTRAINT itemlocdist_pkey PRIMARY KEY (itemlocdist_id); FALTER TABLE ONLY public.itemlocdist DROP CONSTRAINT itemlocdist_pkey; publicadminfalse49749726061687562itemlocpost_pkey CONSTRAINT_ALTER TABLE ONLY itemlocpost ADD CONSTRAINT itemlocpost_pkey PRIMARY KEY (itemlocpost_id); FALTER TABLE ONLY public.itemlocpost DROP CONSTRAINT itemlocpost_pkey; publicadminfalse499499J26061687564 itemsite_pkey CONSTRAINTVALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_pkey PRIMARY KEY (itemsite_id); @ALTER TABLE ONLY public.itemsite DROP CONSTRAINT itemsite_pkey; publicadminfalse169169(26061744655itemsrc_itemsrc_vend_id_key CONSTRAINTALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_itemsrc_vend_id_key UNIQUE (itemsrc_vend_id, itemsrc_item_id, itemsrc_effective, itemsrc_expires, itemsrc_vend_item_number, itemsrc_manuf_name, itemsrc_manuf_item_number); MALTER TABLE ONLY public.itemsrc DROP CONSTRAINT itemsrc_itemsrc_vend_id_key; publicadminfalse232232232232232232232232*26061687568 itemsrc_pkey CONSTRAINTSALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_pkey PRIMARY KEY (itemsrc_id); >ALTER TABLE ONLY public.itemsrc DROP CONSTRAINT itemsrc_pkey; publicadminfalse232232.26061744660 itemsrcp_itemsrcp_itemsrc_id_key CONSTRAINTALTER TABLE ONLY itemsrcp ADD CONSTRAINT itemsrcp_itemsrcp_itemsrc_id_key UNIQUE (itemsrcp_itemsrc_id, itemsrcp_warehous_id, itemsrcp_dropship, itemsrcp_qtybreak); SALTER TABLE ONLY public.itemsrcp DROP CONSTRAINT itemsrcp_itemsrcp_itemsrc_id_key; publicadminfalse233233233233233026061687572 itemsrcp_pkey CONSTRAINTVALTER TABLE ONLY itemsrcp ADD CONSTRAINT itemsrcp_pkey PRIMARY KEY (itemsrcp_id); @ALTER TABLE ONLY public.itemsrcp DROP CONSTRAINT itemsrcp_pkey; publicadminfalse233233226061687574"itemsub_itemsub_parent_item_id_key CONSTRAINTALTER TABLE ONLY itemsub ADD CONSTRAINT itemsub_itemsub_parent_item_id_key UNIQUE (itemsub_parent_item_id, itemsub_sub_item_id); TALTER TABLE ONLY public.itemsub DROP CONSTRAINT itemsub_itemsub_parent_item_id_key; publicadminfalse234234234526061687576 itemsub_pkey CONSTRAINTSALTER TABLE ONLY itemsub ADD CONSTRAINT itemsub_pkey PRIMARY KEY (itemsub_id); >ALTER TABLE ONLY public.itemsub DROP CONSTRAINT itemsub_pkey; publicadminfalse234234826061687578 itemtax_pkey CONSTRAINTSALTER TABLE ONLY itemtax ADD CONSTRAINT itemtax_pkey PRIMARY KEY (itemtax_id); >ALTER TABLE ONLY public.itemtax DROP CONSTRAINT itemtax_pkey; publicadminfalse23523526061687580&itemtrans_itemtrans_source_item_id_key CONSTRAINTALTER TABLE ONLY itemtrans ADD CONSTRAINT itemtrans_itemtrans_source_item_id_key UNIQUE (itemtrans_source_item_id, itemtrans_target_item_id); ZALTER TABLE ONLY public.itemtrans DROP CONSTRAINT itemtrans_itemtrans_source_item_id_key; publicadminfalse50750750726061687582itemtrans_pkey CONSTRAINTYALTER TABLE ONLY itemtrans ADD CONSTRAINT itemtrans_pkey PRIMARY KEY (itemtrans_id); BALTER TABLE ONLY public.itemtrans DROP CONSTRAINT itemtrans_pkey; publicadminfalse50750726061687584 itemuom_pkey CONSTRAINTSALTER TABLE ONLY itemuom ADD CONSTRAINT itemuom_pkey PRIMARY KEY (itemuom_id); >ALTER TABLE ONLY public.itemuom DROP CONSTRAINT itemuom_pkey; publicadminfalse509509:26061687586itemuomconv_pkey CONSTRAINT_ALTER TABLE ONLY itemuomconv ADD CONSTRAINT itemuomconv_pkey PRIMARY KEY (itemuomconv_id); FALTER TABLE ONLY public.itemuomconv DROP CONSTRAINT itemuomconv_pkey; publicadminfalse23623626061687588 jrnluse_pkey CONSTRAINTSALTER TABLE ONLY jrnluse ADD CONSTRAINT jrnluse_pkey PRIMARY KEY (jrnluse_id); >ALTER TABLE ONLY public.jrnluse DROP CONSTRAINT jrnluse_pkey; publicadminfalse51351326061687590 labeldef_pkey CONSTRAINTVALTER TABLE ONLY labeldef ADD CONSTRAINT labeldef_pkey PRIMARY KEY (labeldef_id); @ALTER TABLE ONLY public.labeldef DROP CONSTRAINT labeldef_pkey; publicadminfalse51551526061744829labelform_labelform_name_key CONSTRAINTdALTER TABLE ONLY labelform ADD CONSTRAINT labelform_labelform_name_key UNIQUE (labelform_name); PALTER TABLE ONLY public.labelform DROP CONSTRAINT labelform_labelform_name_key; publicadminfalse51751726061687592labelform_pkey CONSTRAINTYALTER TABLE ONLY labelform ADD CONSTRAINT labelform_pkey PRIMARY KEY (labelform_id); BALTER TABLE ONLY public.labelform DROP CONSTRAINT labelform_pkey; publicadminfalse51751726061687594 lang_pkey CONSTRAINTJALTER TABLE ONLY lang ADD CONSTRAINT lang_pkey PRIMARY KEY (lang_id); 8ALTER TABLE ONLY public.lang DROP CONSTRAINT lang_pkey; publicadminfalse51951926061744832locale_locale_code_key CONSTRAINTXALTER TABLE ONLY locale ADD CONSTRAINT locale_locale_code_key UNIQUE (locale_code); GALTER TABLE ONLY public.locale DROP CONSTRAINT locale_locale_code_key; publicadminfalse52152126061687596 locale_pkey CONSTRAINTPALTER TABLE ONLY locale ADD CONSTRAINT locale_pkey PRIMARY KEY (locale_id); <ALTER TABLE ONLY public.locale DROP CONSTRAINT locale_pkey; publicadminfalse521521!26061687598 location_pkey CONSTRAINTVALTER TABLE ONLY location ADD CONSTRAINT location_pkey PRIMARY KEY (location_id); @ALTER TABLE ONLY public.location DROP CONSTRAINT location_pkey; publicadminfalse23023026061687600 locitem_pkey CONSTRAINTSALTER TABLE ONLY locitem ADD CONSTRAINT locitem_pkey PRIMARY KEY (locitem_id); >ALTER TABLE ONLY public.locitem DROP CONSTRAINT locitem_pkey; publicadminfalse52452426061687602$metasql_metasql_group_name_grade_key CONSTRAINTALTER TABLE ONLY metasql ADD CONSTRAINT metasql_metasql_group_name_grade_key UNIQUE (metasql_group, metasql_name, metasql_grade); VALTER TABLE ONLY public.metasql DROP CONSTRAINT metasql_metasql_group_name_grade_key; publicadminfalse26726726726726061687604 metasql_pkey CONSTRAINTSALTER TABLE ONLY metasql ADD CONSTRAINT metasql_pkey PRIMARY KEY (metasql_id); >ALTER TABLE ONLY public.metasql DROP CONSTRAINT metasql_pkey; publicadminfalse26726726061744835metric_metric_name_key CONSTRAINTXALTER TABLE ONLY metric ADD CONSTRAINT metric_metric_name_key UNIQUE (metric_name); GALTER TABLE ONLY public.metric DROP CONSTRAINT metric_metric_name_key; publicadminfalse52752726061687606 metric_pkey CONSTRAINTPALTER TABLE ONLY metric ADD CONSTRAINT metric_pkey PRIMARY KEY (metric_id); <ALTER TABLE ONLY public.metric DROP CONSTRAINT metric_pkey; publicadminfalse52752726061744838metricenc_metricenc_name_key CONSTRAINTdALTER TABLE ONLY metricenc ADD CONSTRAINT metricenc_metricenc_name_key UNIQUE (metricenc_name); PALTER TABLE ONLY public.metricenc DROP CONSTRAINT metricenc_metricenc_name_key; publicadminfalse52952926061687608metricenc_pkey CONSTRAINTYALTER TABLE ONLY metricenc ADD CONSTRAINT metricenc_pkey PRIMARY KEY (metricenc_id); BALTER TABLE ONLY public.metricenc DROP CONSTRAINT metricenc_pkey; publicadminfalse52952926061687610 mrghist_pkey CONSTRAINTALTER TABLE ONLY mrghist ADD CONSTRAINT mrghist_pkey PRIMARY KEY (mrghist_cntct_id, mrghist_table, mrghist_pkey_col, mrghist_pkey_id, mrghist_cntct_col); >ALTER TABLE ONLY public.mrghist DROP CONSTRAINT mrghist_pkey; publicadminfalse53253253253253253226061687612mrgundo_mrgundo_schema_key CONSTRAINTALTER TABLE ONLY mrgundo ADD CONSTRAINT mrgundo_mrgundo_schema_key UNIQUE (mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col); LALTER TABLE ONLY public.mrgundo DROP CONSTRAINT mrgundo_mrgundo_schema_key; publicadminfalse53353353353353353326061687614msg_pkey CONSTRAINTGALTER TABLE ONLY msg ADD CONSTRAINT msg_pkey PRIMARY KEY (msg_id); 6ALTER TABLE ONLY public.msg DROP CONSTRAINT msg_pkey; publicadminfalse53453426061687616 msguser_pkey CONSTRAINTSALTER TABLE ONLY msguser ADD CONSTRAINT msguser_pkey PRIMARY KEY (msguser_id); >ALTER TABLE ONLY public.msguser DROP CONSTRAINT msguser_pkey; publicadminfalse53653626061687618obsolete_tax_pkey CONSTRAINTYALTER TABLE ONLY obsolete_tax ADD CONSTRAINT obsolete_tax_pkey PRIMARY KEY (tax_id); HALTER TABLE ONLY public.obsolete_tax DROP CONSTRAINT obsolete_tax_pkey; publicadminfalse53953926061687620ophead_ophead_number_key CONSTRAINT\ALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_number_key UNIQUE (ophead_number); IALTER TABLE ONLY public.ophead DROP CONSTRAINT ophead_ophead_number_key; publicadminfalse18118126061687622 ophead_pkey CONSTRAINTPALTER TABLE ONLY ophead ADD CONSTRAINT ophead_pkey PRIMARY KEY (ophead_id); <ALTER TABLE ONLY public.ophead DROP CONSTRAINT ophead_pkey; publicadminfalse18118126061687624opsource_opsource_name_key CONSTRAINT`ALTER TABLE ONLY opsource ADD CONSTRAINT opsource_opsource_name_key UNIQUE (opsource_name); MALTER TABLE ONLY public.opsource DROP CONSTRAINT opsource_opsource_name_key; publicadminfalse54154126061687626 opsource_pkey CONSTRAINTVALTER TABLE ONLY opsource ADD CONSTRAINT opsource_pkey PRIMARY KEY (opsource_id); @ALTER TABLE ONLY public.opsource DROP CONSTRAINT opsource_pkey; publicadminfalse54154126061687628opstage_opstage_name_key CONSTRAINT\ALTER TABLE ONLY opstage ADD CONSTRAINT opstage_opstage_name_key UNIQUE (opstage_name); JALTER TABLE ONLY public.opstage DROP CONSTRAINT opstage_opstage_name_key; publicadminfalse54354326061687630 opstage_pkey CONSTRAINTSALTER TABLE ONLY opstage ADD CONSTRAINT opstage_pkey PRIMARY KEY (opstage_id); >ALTER TABLE ONLY public.opstage DROP CONSTRAINT opstage_pkey; publicadminfalse54354326061687632optype_optype_name_key CONSTRAINTXALTER TABLE ONLY optype ADD CONSTRAINT optype_optype_name_key UNIQUE (optype_name); GALTER TABLE ONLY public.optype DROP CONSTRAINT optype_optype_name_key; publicadminfalse54554526061687634 optype_pkey CONSTRAINTPALTER TABLE ONLY optype ADD CONSTRAINT optype_pkey PRIMARY KEY (optype_id); <ALTER TABLE ONLY public.optype DROP CONSTRAINT optype_pkey; publicadminfalse54554526061744845orderseq_orderseq_name_key CONSTRAINT`ALTER TABLE ONLY orderseq ADD CONSTRAINT orderseq_orderseq_name_key UNIQUE (orderseq_name); MALTER TABLE ONLY public.orderseq DROP CONSTRAINT orderseq_orderseq_name_key; publicadminfalse54754726061687636 orderseq_pkey CONSTRAINTVALTER TABLE ONLY orderseq ADD CONSTRAINT orderseq_pkey PRIMARY KEY (orderseq_id); @ALTER TABLE ONLY public.orderseq DROP CONSTRAINT orderseq_pkey; publicadminfalse54754726061687638 pack_pkey CONSTRAINTJALTER TABLE ONLY pack ADD CONSTRAINT pack_pkey PRIMARY KEY (pack_id); 8ALTER TABLE ONLY public.pack DROP CONSTRAINT pack_pkey; publicadminfalse54954926061687640payaropen_pkey CONSTRAINTtALTER TABLE ONLY payaropen ADD CONSTRAINT payaropen_pkey PRIMARY KEY (payaropen_ccpay_id, payaropen_aropen_id); BALTER TABLE ONLY public.payaropen DROP CONSTRAINT payaropen_pkey; publicadminfalse55155155126061687642 period_pkey CONSTRAINTPALTER TABLE ONLY period ADD CONSTRAINT period_pkey PRIMARY KEY (period_id); <ALTER TABLE ONLY public.period DROP CONSTRAINT period_pkey; publicadminfalse20120126061687644 pkgdep_pkey CONSTRAINTPALTER TABLE ONLY pkgdep ADD CONSTRAINT pkgdep_pkey PRIMARY KEY (pkgdep_id); <ALTER TABLE ONLY public.pkgdep DROP CONSTRAINT pkgdep_pkey; publicadminfalse55455426061687646 pkghead_pkey CONSTRAINTSALTER TABLE ONLY pkghead ADD CONSTRAINT pkghead_pkey PRIMARY KEY (pkghead_id); >ALTER TABLE ONLY public.pkghead DROP CONSTRAINT pkghead_pkey; publicadminfalse55655626061687648 pkgitem_pkey CONSTRAINTSALTER TABLE ONLY pkgitem ADD CONSTRAINT pkgitem_pkey PRIMARY KEY (pkgitem_id); >ALTER TABLE ONLY public.pkgitem DROP CONSTRAINT pkgitem_pkey; publicadminfalse55855826061687650pkgitem_pkgitem_pkghead_id_key CONSTRAINTALTER TABLE ONLY pkgitem ADD CONSTRAINT pkgitem_pkgitem_pkghead_id_key UNIQUE (pkgitem_pkghead_id, pkgitem_type, pkgitem_name); PALTER TABLE ONLY public.pkgitem DROP CONSTRAINT pkgitem_pkgitem_pkghead_id_key; publicadminfalse55855855855826061687652pkgitem_pkgitem_pkghead_id_key1 CONSTRAINTALTER TABLE ONLY pkgitem ADD CONSTRAINT pkgitem_pkgitem_pkghead_id_key1 UNIQUE (pkgitem_pkghead_id, pkgitem_type, pkgitem_item_id); QALTER TABLE ONLY public.pkgitem DROP CONSTRAINT pkgitem_pkgitem_pkghead_id_key1; publicadminfalse558558558558$26061687654 plancode_pkey CONSTRAINTVALTER TABLE ONLY plancode ADD CONSTRAINT plancode_pkey PRIMARY KEY (plancode_id); @ALTER TABLE ONLY public.plancode DROP CONSTRAINT plancode_pkey; publicadminfalse231231&26061687656plancode_plancode_code_key CONSTRAINT`ALTER TABLE ONLY plancode ADD CONSTRAINT plancode_plancode_code_key UNIQUE (plancode_code); MALTER TABLE ONLY public.plancode DROP CONSTRAINT plancode_plancode_code_key; publicadminfalse231231z26061687658 pohead_pkey CONSTRAINTPALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pkey PRIMARY KEY (pohead_id); <ALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pkey; publicadminfalse178178|26061687660pohead_pohead_number_key CONSTRAINT\ALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_number_key UNIQUE (pohead_number); IALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_number_key; publicadminfalse17817826061687662 poitem_pkey CONSTRAINTPALTER TABLE ONLY poitem ADD CONSTRAINT poitem_pkey PRIMARY KEY (poitem_id); <ALTER TABLE ONLY public.poitem DROP CONSTRAINT poitem_pkey; publicadminfalse17917926061687664poitem_poitem_pohead_id_key CONSTRAINTuALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_pohead_id_key UNIQUE (poitem_pohead_id, poitem_linenumber); LALTER TABLE ONLY public.poitem DROP CONSTRAINT poitem_poitem_pohead_id_key; publicadminfalse17917917926061687666 poreject_pkey CONSTRAINTVALTER TABLE ONLY poreject ADD CONSTRAINT poreject_pkey PRIMARY KEY (poreject_id); @ALTER TABLE ONLY public.poreject DROP CONSTRAINT poreject_pkey; publicadminfalse56556526061687668 potype_pkey CONSTRAINTPALTER TABLE ONLY potype ADD CONSTRAINT potype_pkey PRIMARY KEY (potype_id); <ALTER TABLE ONLY public.potype DROP CONSTRAINT potype_pkey; publicadminfalse56756726061687670pr_pkey CONSTRAINTDALTER TABLE ONLY pr ADD CONSTRAINT pr_pkey PRIMARY KEY (pr_id); 4ALTER TABLE ONLY public.pr DROP CONSTRAINT pr_pkey; publicadminfalse56956926061687672 prftcntr_pkey CONSTRAINTVALTER TABLE ONLY prftcntr ADD CONSTRAINT prftcntr_pkey PRIMARY KEY (prftcntr_id); @ALTER TABLE ONLY public.prftcntr DROP CONSTRAINT prftcntr_pkey; publicadminfalse57157126061687674prftcntr_prftcntr_number_key CONSTRAINTdALTER TABLE ONLY prftcntr ADD CONSTRAINT prftcntr_prftcntr_number_key UNIQUE (prftcntr_number); OALTER TABLE ONLY public.prftcntr DROP CONSTRAINT prftcntr_prftcntr_number_key; publicadminfalse57157126061687676 priv_pkey CONSTRAINTJALTER TABLE ONLY priv ADD CONSTRAINT priv_pkey PRIMARY KEY (priv_id); 8ALTER TABLE ONLY public.priv DROP CONSTRAINT priv_pkey; publicadminfalse270270`26061687678prj_pkey CONSTRAINTGALTER TABLE ONLY prj ADD CONSTRAINT prj_pkey PRIMARY KEY (prj_id); 6ALTER TABLE ONLY public.prj DROP CONSTRAINT prj_pkey; publicadminfalse174174b26061687680prj_prj_number_key CONSTRAINTPALTER TABLE ONLY prj ADD CONSTRAINT prj_prj_number_key UNIQUE (prj_number); @ALTER TABLE ONLY public.prj DROP CONSTRAINT prj_prj_number_key; publicadminfalse17417426061687682 prjtask_pkey CONSTRAINTSALTER TABLE ONLY prjtask ADD CONSTRAINT prjtask_pkey PRIMARY KEY (prjtask_id); >ALTER TABLE ONLY public.prjtask DROP CONSTRAINT prjtask_pkey; publicadminfalse18218226061687684prjtask_prjtask_prj_id_key CONSTRAINTpALTER TABLE ONLY prjtask ADD CONSTRAINT prjtask_prjtask_prj_id_key UNIQUE (prjtask_prj_id, prjtask_number); LALTER TABLE ONLY public.prjtask DROP CONSTRAINT prjtask_prjtask_prj_id_key; publicadminfalse18218218226061687686prjtaskuser_pkey CONSTRAINT_ALTER TABLE ONLY prjtaskuser ADD CONSTRAINT prjtaskuser_pkey PRIMARY KEY (prjtaskuser_id); FALTER TABLE ONLY public.prjtaskuser DROP CONSTRAINT prjtaskuser_pkey; publicadminfalse577577 26061687688 prodcat_pkey CONSTRAINTSALTER TABLE ONLY prodcat ADD CONSTRAINT prodcat_pkey PRIMARY KEY (prodcat_id); >ALTER TABLE ONLY public.prodcat DROP CONSTRAINT prodcat_pkey; publicadminfalse22522526061744853prodcat_prodcat_code_key CONSTRAINT\ALTER TABLE ONLY prodcat ADD CONSTRAINT prodcat_prodcat_code_key UNIQUE (prodcat_code); JALTER TABLE ONLY public.prodcat DROP CONSTRAINT prodcat_prodcat_code_key; publicadminfalse225225U26061687690 prospect_pkey CONSTRAINTVALTER TABLE ONLY prospect ADD CONSTRAINT prospect_pkey PRIMARY KEY (prospect_id); @ALTER TABLE ONLY public.prospect DROP CONSTRAINT prospect_pkey; publicadminfalse244244W26061687692prospect_prospect_number_key CONSTRAINTdALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_number_key UNIQUE (prospect_number); OALTER TABLE ONLY public.prospect DROP CONSTRAINT prospect_prospect_number_key; publicadminfalse24424426061687694 qryhead_pkey CONSTRAINTSALTER TABLE ONLY qryhead ADD CONSTRAINT qryhead_pkey PRIMARY KEY (qryhead_id); >ALTER TABLE ONLY public.qryhead DROP CONSTRAINT qryhead_pkey; publicadminfalse58058026061687696qryhead_qryhead_name_key CONSTRAINT\ALTER TABLE ONLY qryhead ADD CONSTRAINT qryhead_qryhead_name_key UNIQUE (qryhead_name); JALTER TABLE ONLY public.qryhead DROP CONSTRAINT qryhead_qryhead_name_key; publicadminfalse58058026061687698qryitem_qryitem_qryhead_id_key CONSTRAINTvALTER TABLE ONLY qryitem ADD CONSTRAINT qryitem_qryitem_qryhead_id_key UNIQUE (qryitem_qryhead_id, qryitem_name); PALTER TABLE ONLY public.qryitem DROP CONSTRAINT qryitem_qryitem_qryhead_id_key; publicadminfalse58258258226061687700qryitem_qryitem_qryhead_id_key1 CONSTRAINTxALTER TABLE ONLY qryitem ADD CONSTRAINT qryitem_qryitem_qryhead_id_key1 UNIQUE (qryitem_qryhead_id, qryitem_order); QALTER TABLE ONLY public.qryitem DROP CONSTRAINT qryitem_qryitem_qryhead_id_key1; publicadminfalse582582582e26061687702 quhead_pkey CONSTRAINTPALTER TABLE ONLY quhead ADD CONSTRAINT quhead_pkey PRIMARY KEY (quhead_id); <ALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_pkey; publicadminfalse249249g26061687704quhead_quhead_number_key CONSTRAINT\ALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_number_key UNIQUE (quhead_number); IALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_number_key; publicadminfalse249249i26061687706 quitem_pkey CONSTRAINTPALTER TABLE ONLY quitem ADD CONSTRAINT quitem_pkey PRIMARY KEY (quitem_id); <ALTER TABLE ONLY public.quitem DROP CONSTRAINT quitem_pkey; publicadminfalse25025026061687708 rcalitem_pkey CONSTRAINTVALTER TABLE ONLY rcalitem ADD CONSTRAINT rcalitem_pkey PRIMARY KEY (rcalitem_id); @ALTER TABLE ONLY public.rcalitem DROP CONSTRAINT rcalitem_pkey; publicadminfalse58658626061687710 recur_pkey CONSTRAINTMALTER TABLE ONLY recur ADD CONSTRAINT recur_pkey PRIMARY KEY (recur_id); :ALTER TABLE ONLY public.recur DROP CONSTRAINT recur_pkey; publicadminfalse58758726061687712recur_recur_parent_id_key CONSTRAINTqALTER TABLE ONLY recur ADD CONSTRAINT recur_recur_parent_id_key UNIQUE (recur_parent_id, recur_parent_type); IALTER TABLE ONLY public.recur DROP CONSTRAINT recur_recur_parent_id_key; publicadminfalse58758758726061687714recurtype_pkey CONSTRAINTYALTER TABLE ONLY recurtype ADD CONSTRAINT recurtype_pkey PRIMARY KEY (recurtype_id); BALTER TABLE ONLY public.recurtype DROP CONSTRAINT recurtype_pkey; publicadminfalse58958926061687716recurtype_recurtype_type_key CONSTRAINTdALTER TABLE ONLY recurtype ADD CONSTRAINT recurtype_recurtype_type_key UNIQUE (recurtype_type); PALTER TABLE ONLY public.recurtype DROP CONSTRAINT recurtype_recurtype_type_key; publicadminfalse58958926061687718 recv_pkey CONSTRAINTJALTER TABLE ONLY recv ADD CONSTRAINT recv_pkey PRIMARY KEY (recv_id); 8ALTER TABLE ONLY public.recv DROP CONSTRAINT recv_pkey; publicadminfalse59159126061687720 report_pkey CONSTRAINTPALTER TABLE ONLY report ADD CONSTRAINT report_pkey PRIMARY KEY (report_id); <ALTER TABLE ONLY public.report DROP CONSTRAINT report_pkey; publicadminfalse273273 26061687722 rjctcode_pkey CONSTRAINTVALTER TABLE ONLY rjctcode ADD CONSTRAINT rjctcode_pkey PRIMARY KEY (rjctcode_id); @ALTER TABLE ONLY public.rjctcode DROP CONSTRAINT rjctcode_pkey; publicadminfalse593593 26061687724rjctcode_rjctcode_code_key CONSTRAINT`ALTER TABLE ONLY rjctcode ADD CONSTRAINT rjctcode_rjctcode_code_key UNIQUE (rjctcode_code); MALTER TABLE ONLY public.rjctcode DROP CONSTRAINT rjctcode_rjctcode_code_key; publicadminfalse593593"26061687726 rsncode_pkey CONSTRAINTSALTER TABLE ONLY rsncode ADD CONSTRAINT rsncode_pkey PRIMARY KEY (rsncode_id); >ALTER TABLE ONLY public.rsncode DROP CONSTRAINT rsncode_pkey; publicadminfalse161161$26061744860rsncode_rsncode_code_key CONSTRAINT\ALTER TABLE ONLY rsncode ADD CONSTRAINT rsncode_rsncode_code_key UNIQUE (rsncode_code); JALTER TABLE ONLY public.rsncode DROP CONSTRAINT rsncode_rsncode_code_key; publicadminfalse161161 26061687728 sale_pkey CONSTRAINTJALTER TABLE ONLY sale ADD CONSTRAINT sale_pkey PRIMARY KEY (sale_id); 8ALTER TABLE ONLY public.sale DROP CONSTRAINT sale_pkey; publicadminfalse59659626061744863sale_sale_name_key CONSTRAINTPALTER TABLE ONLY sale ADD CONSTRAINT sale_sale_name_key UNIQUE (sale_name); AALTER TABLE ONLY public.sale DROP CONSTRAINT sale_sale_name_key; publicadminfalse59659626061687730salesaccnt_pkey CONSTRAINT\ALTER TABLE ONLY salesaccnt ADD CONSTRAINT salesaccnt_pkey PRIMARY KEY (salesaccnt_id); DALTER TABLE ONLY public.salesaccnt DROP CONSTRAINT salesaccnt_pkey; publicadminfalse393393&26061687732 salescat_pkey CONSTRAINTVALTER TABLE ONLY salescat ADD CONSTRAINT salescat_pkey PRIMARY KEY (salescat_id); @ALTER TABLE ONLY public.salescat DROP CONSTRAINT salescat_pkey; publicadminfalse162162(26061744866salescat_salescat_name_key CONSTRAINT`ALTER TABLE ONLY salescat ADD CONSTRAINT salescat_salescat_name_key UNIQUE (salescat_name); MALTER TABLE ONLY public.salescat DROP CONSTRAINT salescat_salescat_name_key; publicadminfalse162162*26061687734 salesrep_pkey CONSTRAINTVALTER TABLE ONLY salesrep ADD CONSTRAINT salesrep_pkey PRIMARY KEY (salesrep_id); @ALTER TABLE ONLY public.salesrep DROP CONSTRAINT salesrep_pkey; publicadminfalse163163,26061687736salesrep_salesrep_number_key CONSTRAINTdALTER TABLE ONLY salesrep ADD CONSTRAINT salesrep_salesrep_number_key UNIQUE (salesrep_number); OALTER TABLE ONLY public.salesrep DROP CONSTRAINT salesrep_salesrep_number_key; publicadminfalse16316326061744605 saletype_pkey CONSTRAINTVALTER TABLE ONLY saletype ADD CONSTRAINT saletype_pkey PRIMARY KEY (saletype_id); @ALTER TABLE ONLY public.saletype DROP CONSTRAINT saletype_pkey; publicadminfalse72272226061687738schemaord_pkey CONSTRAINTYALTER TABLE ONLY schemaord ADD CONSTRAINT schemaord_pkey PRIMARY KEY (schemaord_id); BALTER TABLE ONLY public.schemaord DROP CONSTRAINT schemaord_pkey; publicadminfalse60160126061687740schemaord_schemaord_name_key CONSTRAINTdALTER TABLE ONLY schemaord ADD CONSTRAINT schemaord_schemaord_name_key UNIQUE (schemaord_name); PALTER TABLE ONLY public.schemaord DROP CONSTRAINT schemaord_schemaord_name_key; publicadminfalse60160126061687742schemaord_schemaord_order_key CONSTRAINTfALTER TABLE ONLY schemaord ADD CONSTRAINT schemaord_schemaord_order_key UNIQUE (schemaord_order); QALTER TABLE ONLY public.schemaord DROP CONSTRAINT schemaord_schemaord_order_key; publicadminfalse60160126061687744 script_pkey CONSTRAINTPALTER TABLE ONLY script ADD CONSTRAINT script_pkey PRIMARY KEY (script_id); <ALTER TABLE ONLY public.script DROP CONSTRAINT script_pkey; publicadminfalse27627626061687746 shift_pkey CONSTRAINTMALTER TABLE ONLY shift ADD CONSTRAINT shift_pkey PRIMARY KEY (shift_id); :ALTER TABLE ONLY public.shift DROP CONSTRAINT shift_pkey; publicadminfalse21521526061687748 shipchrg_pkey CONSTRAINTVALTER TABLE ONLY shipchrg ADD CONSTRAINT shipchrg_pkey PRIMARY KEY (shipchrg_id); @ALTER TABLE ONLY public.shipchrg DROP CONSTRAINT shipchrg_pkey; publicadminfalse20820826061687750 shipdata_pkey CONSTRAINTALTER TABLE ONLY shipdata ADD CONSTRAINT shipdata_pkey PRIMARY KEY (shipdata_cohead_number, shipdata_cosmisc_tracknum, shipdata_cosmisc_packnum_tracknum, shipdata_void_ind); @ALTER TABLE ONLY public.shipdata DROP CONSTRAINT shipdata_pkey; publicadminfalse21621621621621626061687752shipdatasum_pkey CONSTRAINTALTER TABLE ONLY shipdatasum ADD CONSTRAINT shipdatasum_pkey PRIMARY KEY (shipdatasum_cohead_number, shipdatasum_cosmisc_tracknum, shipdatasum_cosmisc_packnum_tracknum); FALTER TABLE ONLY public.shipdatasum DROP CONSTRAINT shipdatasum_pkey; publicadminfalse60660660660626061687754 shipform_pkey CONSTRAINTVALTER TABLE ONLY shipform ADD CONSTRAINT shipform_pkey PRIMARY KEY (shipform_id); @ALTER TABLE ONLY public.shipform DROP CONSTRAINT shipform_pkey; publicadminfalse20920926061687756shipform_shipform_name_key CONSTRAINT`ALTER TABLE ONLY shipform ADD CONSTRAINT shipform_shipform_name_key UNIQUE (shipform_name); MALTER TABLE ONLY public.shipform DROP CONSTRAINT shipform_shipform_name_key; publicadminfalse20920926061687758 shiphead_pkey CONSTRAINTVALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_pkey PRIMARY KEY (shiphead_id); @ALTER TABLE ONLY public.shiphead DROP CONSTRAINT shiphead_pkey; publicadminfalse60860826061687760shiphead_shiphead_number_key CONSTRAINTdALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_shiphead_number_key UNIQUE (shiphead_number); OALTER TABLE ONLY public.shiphead DROP CONSTRAINT shiphead_shiphead_number_key; publicadminfalse60860826061687762 shipitem_pkey CONSTRAINTVALTER TABLE ONLY shipitem ADD CONSTRAINT shipitem_pkey PRIMARY KEY (shipitem_id); @ALTER TABLE ONLY public.shipitem DROP CONSTRAINT shipitem_pkey; publicadminfalse474474326061687764shipto_num_cust_unique CONSTRAINTkALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shipto_num_cust_unique UNIQUE (shipto_cust_id, shipto_num); KALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shipto_num_cust_unique; publicadminfalse165165165526061687766 shipto_pkey CONSTRAINTTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shipto_pkey PRIMARY KEY (shipto_id); @ALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shipto_pkey; publicadminfalse165165{26061687768 shipvia_pkey CONSTRAINTSALTER TABLE ONLY shipvia ADD CONSTRAINT shipvia_pkey PRIMARY KEY (shipvia_id); >ALTER TABLE ONLY public.shipvia DROP CONSTRAINT shipvia_pkey; publicadminfalse256256}26061744878shipvia_shipvia_code_key CONSTRAINT\ALTER TABLE ONLY shipvia ADD CONSTRAINT shipvia_shipvia_code_key UNIQUE (shipvia_code); JALTER TABLE ONLY public.shipvia DROP CONSTRAINT shipvia_shipvia_code_key; publicadminfalse25625626061687770 shipzone_pkey CONSTRAINTVALTER TABLE ONLY shipzone ADD CONSTRAINT shipzone_pkey PRIMARY KEY (shipzone_id); @ALTER TABLE ONLY public.shipzone DROP CONSTRAINT shipzone_pkey; publicadminfalse21221226061744881shipzone_shipzone_name_key CONSTRAINT`ALTER TABLE ONLY shipzone ADD CONSTRAINT shipzone_shipzone_name_key UNIQUE (shipzone_name); MALTER TABLE ONLY public.shipzone DROP CONSTRAINT shipzone_shipzone_name_key; publicadminfalse21221226061687772 sitetype_pkey CONSTRAINTVALTER TABLE ONLY sitetype ADD CONSTRAINT sitetype_pkey PRIMARY KEY (sitetype_id); @ALTER TABLE ONLY public.sitetype DROP CONSTRAINT sitetype_pkey; publicadminfalse25725726061687774sitetype_sitetype_name_key CONSTRAINT`ALTER TABLE ONLY sitetype ADD CONSTRAINT sitetype_sitetype_name_key UNIQUE (sitetype_name); MALTER TABLE ONLY public.sitetype DROP CONSTRAINT sitetype_sitetype_name_key; publicadminfalse257257!26061687776 sltrans_pkey CONSTRAINTSALTER TABLE ONLY sltrans ADD CONSTRAINT sltrans_pkey PRIMARY KEY (sltrans_id); >ALTER TABLE ONLY public.sltrans DROP CONSTRAINT sltrans_pkey; publicadminfalse616616'26061687778 source_pkey CONSTRAINTPALTER TABLE ONLY source ADD CONSTRAINT source_pkey PRIMARY KEY (source_id); <ALTER TABLE ONLY public.source DROP CONSTRAINT source_pkey; publicadminfalse619619)26061687780source_source_name_key CONSTRAINTXALTER TABLE ONLY source ADD CONSTRAINT source_source_name_key UNIQUE (source_name); GALTER TABLE ONLY public.source DROP CONSTRAINT source_source_name_key; publicadminfalse619619+26061687782 state_pkey CONSTRAINTMALTER TABLE ONLY state ADD CONSTRAINT state_pkey PRIMARY KEY (state_id); :ALTER TABLE ONLY public.state DROP CONSTRAINT state_pkey; publicadminfalse621621-26061687784state_state_country_id_key CONSTRAINTlALTER TABLE ONLY state ADD CONSTRAINT state_state_country_id_key UNIQUE (state_country_id, state_name); JALTER TABLE ONLY public.state DROP CONSTRAINT state_state_country_id_key; publicadminfalse621621621/26061687786 status_pkey CONSTRAINTPALTER TABLE ONLY status ADD CONSTRAINT status_pkey PRIMARY KEY (status_id); <ALTER TABLE ONLY public.status DROP CONSTRAINT status_pkey; publicadminfalse623623126061687788status_status_type_key CONSTRAINTeALTER TABLE ONLY status ADD CONSTRAINT status_status_type_key UNIQUE (status_type, status_code); GALTER TABLE ONLY public.status DROP CONSTRAINT status_status_type_key; publicadminfalse623623623326061687790 stdjrnl_pkey CONSTRAINTSALTER TABLE ONLY stdjrnl ADD CONSTRAINT stdjrnl_pkey PRIMARY KEY (stdjrnl_id); >ALTER TABLE ONLY public.stdjrnl DROP CONSTRAINT stdjrnl_pkey; publicadminfalse625625526061744887stdjrnl_stdjrnl_name_key CONSTRAINT\ALTER TABLE ONLY stdjrnl ADD CONSTRAINT stdjrnl_stdjrnl_name_key UNIQUE (stdjrnl_name); JALTER TABLE ONLY public.stdjrnl DROP CONSTRAINT stdjrnl_stdjrnl_name_key; publicadminfalse625625726061687792stdjrnlgrp_pkey CONSTRAINT\ALTER TABLE ONLY stdjrnlgrp ADD CONSTRAINT stdjrnlgrp_pkey PRIMARY KEY (stdjrnlgrp_id); DALTER TABLE ONLY public.stdjrnlgrp DROP CONSTRAINT stdjrnlgrp_pkey; publicadminfalse627627926061744890stdjrnlgrp_stdjrnlgrp_name_key CONSTRAINThALTER TABLE ONLY stdjrnlgrp ADD CONSTRAINT stdjrnlgrp_stdjrnlgrp_name_key UNIQUE (stdjrnlgrp_name); SALTER TABLE ONLY public.stdjrnlgrp DROP CONSTRAINT stdjrnlgrp_stdjrnlgrp_name_key; publicadminfalse627627;26061687794stdjrnlgrpitem_pkey CONSTRAINThALTER TABLE ONLY stdjrnlgrpitem ADD CONSTRAINT stdjrnlgrpitem_pkey PRIMARY KEY (stdjrnlgrpitem_id); LALTER TABLE ONLY public.stdjrnlgrpitem DROP CONSTRAINT stdjrnlgrpitem_pkey; publicadminfalse629629=26061687796stdjrnlitem_pkey CONSTRAINT_ALTER TABLE ONLY stdjrnlitem ADD CONSTRAINT stdjrnlitem_pkey PRIMARY KEY (stdjrnlitem_id); FALTER TABLE ONLY public.stdjrnlitem DROP CONSTRAINT stdjrnlitem_pkey; publicadminfalse631631?26061687798 subaccnt_pkey CONSTRAINTVALTER TABLE ONLY subaccnt ADD CONSTRAINT subaccnt_pkey PRIMARY KEY (subaccnt_id); @ALTER TABLE ONLY public.subaccnt DROP CONSTRAINT subaccnt_pkey; publicadminfalse633633A26061687800subaccnt_subaccnt_number_key CONSTRAINTdALTER TABLE ONLY subaccnt ADD CONSTRAINT subaccnt_subaccnt_number_key UNIQUE (subaccnt_number); OALTER TABLE ONLY public.subaccnt DROP CONSTRAINT subaccnt_subaccnt_number_key; publicadminfalse633633D26061687802subaccnttype_pkey CONSTRAINTbALTER TABLE ONLY subaccnttype ADD CONSTRAINT subaccnttype_pkey PRIMARY KEY (subaccnttype_id); HALTER TABLE ONLY public.subaccnttype DROP CONSTRAINT subaccnttype_pkey; publicadminfalse635635a26061687804tax_pkey CONSTRAINTGALTER TABLE ONLY tax ADD CONSTRAINT tax_pkey PRIMARY KEY (tax_id); 6ALTER TABLE ONLY public.tax DROP CONSTRAINT tax_pkey; publicadminfalse247247F26061687806 taxass_pkey CONSTRAINTPALTER TABLE ONLY taxass ADD CONSTRAINT taxass_pkey PRIMARY KEY (taxass_id); <ALTER TABLE ONLY public.taxass DROP CONSTRAINT taxass_pkey; publicadminfalse638638H26061687808taxass_taxass_taxzone_id_key CONSTRAINTALTER TABLE ONLY taxass ADD CONSTRAINT taxass_taxass_taxzone_id_key UNIQUE (taxass_taxzone_id, taxass_taxtype_id, taxass_tax_id); MALTER TABLE ONLY public.taxass DROP CONSTRAINT taxass_taxass_taxzone_id_key; publicadminfalse63863863863826061687810 taxauth_pkey CONSTRAINTSALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_pkey PRIMARY KEY (taxauth_id); >ALTER TABLE ONLY public.taxauth DROP CONSTRAINT taxauth_pkey; publicadminfalse21021026061687812taxauth_taxauth_code_key CONSTRAINT\ALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_taxauth_code_key UNIQUE (taxauth_code); JALTER TABLE ONLY public.taxauth DROP CONSTRAINT taxauth_taxauth_code_key; publicadminfalse210210J26061687814 taxclass_pkey CONSTRAINTVALTER TABLE ONLY taxclass ADD CONSTRAINT taxclass_pkey PRIMARY KEY (taxclass_id); @ALTER TABLE ONLY public.taxclass DROP CONSTRAINT taxclass_pkey; publicadminfalse641641L26061744896taxclass_taxclass_code_key CONSTRAINT`ALTER TABLE ONLY taxclass ADD CONSTRAINT taxclass_taxclass_code_key UNIQUE (taxclass_code); MALTER TABLE ONLY public.taxclass DROP CONSTRAINT taxclass_taxclass_code_key; publicadminfalse641641w26061687816 taxhist_pkey CONSTRAINTSALTER TABLE ONLY taxhist ADD CONSTRAINT taxhist_pkey PRIMARY KEY (taxhist_id); >ALTER TABLE ONLY public.taxhist DROP CONSTRAINT taxhist_pkey; publicadminfalse253253N26061687818 taxrate_pkey CONSTRAINTSALTER TABLE ONLY taxrate ADD CONSTRAINT taxrate_pkey PRIMARY KEY (taxrate_id); >ALTER TABLE ONLY public.taxrate DROP CONSTRAINT taxrate_pkey; publicadminfalse64364326061687820 taxreg_pkey CONSTRAINTPALTER TABLE ONLY taxreg ADD CONSTRAINT taxreg_pkey PRIMARY KEY (taxreg_id); <ALTER TABLE ONLY public.taxreg DROP CONSTRAINT taxreg_pkey; publicadminfalse211211N26061687822 taxtype_pkey CONSTRAINTSALTER TABLE ONLY taxtype ADD CONSTRAINT taxtype_pkey PRIMARY KEY (taxtype_id); >ALTER TABLE ONLY public.taxtype DROP CONSTRAINT taxtype_pkey; publicadminfalse170170P26061687824taxtype_taxtype_name_key CONSTRAINT\ALTER TABLE ONLY taxtype ADD CONSTRAINT taxtype_taxtype_name_key UNIQUE (taxtype_name); JALTER TABLE ONLY public.taxtype DROP CONSTRAINT taxtype_taxtype_name_key; publicadminfalse170170726061687826 taxzone_pkey CONSTRAINTSALTER TABLE ONLY taxzone ADD CONSTRAINT taxzone_pkey PRIMARY KEY (taxzone_id); >ALTER TABLE ONLY public.taxzone DROP CONSTRAINT taxzone_pkey; publicadminfalse166166926061744901taxzone_taxzone_code_key CONSTRAINT\ALTER TABLE ONLY taxzone ADD CONSTRAINT taxzone_taxzone_code_key UNIQUE (taxzone_code); JALTER TABLE ONLY public.taxzone DROP CONSTRAINT taxzone_taxzone_code_key; publicadminfalse166166 26061687828 terms_pkey CONSTRAINTMALTER TABLE ONLY terms ADD CONSTRAINT terms_pkey PRIMARY KEY (terms_id); :ALTER TABLE ONLY public.terms DROP CONSTRAINT terms_pkey; publicadminfalse15715726061687830terms_terms_code_key CONSTRAINTTALTER TABLE ONLY terms ADD CONSTRAINT terms_terms_code_key UNIQUE (terms_code); DALTER TABLE ONLY public.terms DROP CONSTRAINT terms_terms_code_key; publicadminfalse15715726061687832 todoitem_pkey CONSTRAINTVALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_pkey PRIMARY KEY (todoitem_id); @ALTER TABLE ONLY public.todoitem DROP CONSTRAINT todoitem_pkey; publicadminfalse183183Q26061687834 trialbal_pkey CONSTRAINTVALTER TABLE ONLY trialbal ADD CONSTRAINT trialbal_pkey PRIMARY KEY (trialbal_id); @ALTER TABLE ONLY public.trialbal DROP CONSTRAINT trialbal_pkey; publicadminfalse65165126061687836 uiform_pkey CONSTRAINTPALTER TABLE ONLY uiform ADD CONSTRAINT uiform_pkey PRIMARY KEY (uiform_id); <ALTER TABLE ONLY public.uiform DROP CONSTRAINT uiform_pkey; publicadminfalse279279R26061687838uom_pkey CONSTRAINTGALTER TABLE ONLY uom ADD CONSTRAINT uom_pkey PRIMARY KEY (uom_id); 6ALTER TABLE ONLY public.uom DROP CONSTRAINT uom_pkey; publicadminfalse171171T26061687840uom_uom_name_key CONSTRAINTLALTER TABLE ONLY uom ADD CONSTRAINT uom_uom_name_key UNIQUE (uom_name); >ALTER TABLE ONLY public.uom DROP CONSTRAINT uom_uom_name_key; publicadminfalse171171S26061687842 uomconv_pkey CONSTRAINTSALTER TABLE ONLY uomconv ADD CONSTRAINT uomconv_pkey PRIMARY KEY (uomconv_id); >ALTER TABLE ONLY public.uomconv DROP CONSTRAINT uomconv_pkey; publicadminfalse654654U26061687844 uomtype_pkey CONSTRAINTSALTER TABLE ONLY uomtype ADD CONSTRAINT uomtype_pkey PRIMARY KEY (uomtype_id); >ALTER TABLE ONLY public.uomtype DROP CONSTRAINT uomtype_pkey; publicadminfalse656656W26061687846uomtype_uomtype_name_key CONSTRAINT\ALTER TABLE ONLY uomtype ADD CONSTRAINT uomtype_uomtype_name_key UNIQUE (uomtype_name); JALTER TABLE ONLY public.uomtype DROP CONSTRAINT uomtype_uomtype_name_key; publicadminfalse65665626061687848 urlinfo_pkey CONSTRAINTOALTER TABLE ONLY urlinfo ADD CONSTRAINT urlinfo_pkey PRIMARY KEY (url_id); >ALTER TABLE ONLY public.urlinfo DROP CONSTRAINT urlinfo_pkey; publicadminfalse191191\26061687850usr_pkey CONSTRAINTKALTER TABLE ONLY usr_bak ADD CONSTRAINT usr_pkey PRIMARY KEY (usr_id); :ALTER TABLE ONLY public.usr_bak DROP CONSTRAINT usr_pkey; publicadminfalse660660^26061687852usr_usr_username_key CONSTRAINTXALTER TABLE ONLY usr_bak ADD CONSTRAINT usr_usr_username_key UNIQUE (usr_username); FALTER TABLE ONLY public.usr_bak DROP CONSTRAINT usr_usr_username_key; publicadminfalse66066026061687854 usrgrp_pkey CONSTRAINTPALTER TABLE ONLY usrgrp ADD CONSTRAINT usrgrp_pkey PRIMARY KEY (usrgrp_id); <ALTER TABLE ONLY public.usrgrp DROP CONSTRAINT usrgrp_pkey; publicadminfalse573573Y26061687856 usrpref_pkey CONSTRAINTSALTER TABLE ONLY usrpref ADD CONSTRAINT usrpref_pkey PRIMARY KEY (usrpref_id); >ALTER TABLE ONLY public.usrpref DROP CONSTRAINT usrpref_pkey; publicadminfalse65965926061687858 usrpriv_pkey CONSTRAINTSALTER TABLE ONLY usrpriv ADD CONSTRAINT usrpriv_pkey PRIMARY KEY (usrpriv_id); >ALTER TABLE ONLY public.usrpriv DROP CONSTRAINT usrpriv_pkey; publicadminfalse57457426061687860 vend_pkey CONSTRAINTNALTER TABLE ONLY vendinfo ADD CONSTRAINT vend_pkey PRIMARY KEY (vend_id); <ALTER TABLE ONLY public.vendinfo DROP CONSTRAINT vend_pkey; publicadminfalse158158c26061687862 vendaddr_pkey CONSTRAINTZALTER TABLE ONLY vendaddrinfo ADD CONSTRAINT vendaddr_pkey PRIMARY KEY (vendaddr_id); DALTER TABLE ONLY public.vendaddrinfo DROP CONSTRAINT vendaddr_pkey; publicadminfalse24824826061687864vendinfo_vend_number_key CONSTRAINT\ALTER TABLE ONLY vendinfo ADD CONSTRAINT vendinfo_vend_number_key UNIQUE (vend_number); KALTER TABLE ONLY public.vendinfo DROP CONSTRAINT vendinfo_vend_number_key; publicadminfalse15815826061687866 vendtype_pkey CONSTRAINTVALTER TABLE ONLY vendtype ADD CONSTRAINT vendtype_pkey PRIMARY KEY (vendtype_id); @ALTER TABLE ONLY public.vendtype DROP CONSTRAINT vendtype_pkey; publicadminfalse25825826061744908vendtype_vendtype_code_key CONSTRAINT`ALTER TABLE ONLY vendtype ADD CONSTRAINT vendtype_vendtype_code_key UNIQUE (vendtype_code); MALTER TABLE ONLY public.vendtype DROP CONSTRAINT vendtype_vendtype_code_key; publicadminfalse258258`26061687868 vodist_pkey CONSTRAINTPALTER TABLE ONLY vodist ADD CONSTRAINT vodist_pkey PRIMARY KEY (vodist_id); <ALTER TABLE ONLY public.vodist DROP CONSTRAINT vodist_pkey; publicadminfalse668668b26061687870 vohead_pkey CONSTRAINTPALTER TABLE ONLY vohead ADD CONSTRAINT vohead_pkey PRIMARY KEY (vohead_id); <ALTER TABLE ONLY public.vohead DROP CONSTRAINT vohead_pkey; publicadminfalse670670d26061687872vohead_vohead_number_key CONSTRAINT\ALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_number_key UNIQUE (vohead_number); IALTER TABLE ONLY public.vohead DROP CONSTRAINT vohead_vohead_number_key; publicadminfalse670670f26061687874voheadtax_pkey CONSTRAINTWALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_pkey PRIMARY KEY (taxhist_id); BALTER TABLE ONLY public.voheadtax DROP CONSTRAINT voheadtax_pkey; publicadminfalse672672h26061687876 voitem_pkey CONSTRAINTPALTER TABLE ONLY voitem ADD CONSTRAINT voitem_pkey PRIMARY KEY (voitem_id); <ALTER TABLE ONLY public.voitem DROP CONSTRAINT voitem_pkey; publicadminfalse673673j26061687878voitemtax_pkey CONSTRAINTWALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_pkey PRIMARY KEY (taxhist_id); BALTER TABLE ONLY public.voitemtax DROP CONSTRAINT voitemtax_pkey; publicadminfalse675675W26061687880 warehous_pkey CONSTRAINTUALTER TABLE ONLY whsinfo ADD CONSTRAINT warehous_pkey PRIMARY KEY (warehous_id); ?ALTER TABLE ONLY public.whsinfo DROP CONSTRAINT warehous_pkey; publicadminfalse172172B26061687882 whsezone_pkey CONSTRAINTVALTER TABLE ONLY whsezone ADD CONSTRAINT whsezone_pkey PRIMARY KEY (whsezone_id); @ALTER TABLE ONLY public.whsezone DROP CONSTRAINT whsezone_pkey; publicadminfalse238238Y26061687884whsinfo_warehous_code_key CONSTRAINT^ALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_code_key UNIQUE (warehous_code); KALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_code_key; publicadminfalse172172426061687886wo_pkey CONSTRAINTDALTER TABLE ONLY wo ADD CONSTRAINT wo_pkey PRIMARY KEY (wo_id); 4ALTER TABLE ONLY public.wo DROP CONSTRAINT wo_pkey; publicadminfalse410410^26061687888 womatl_pkey CONSTRAINTPALTER TABLE ONLY womatl ADD CONSTRAINT womatl_pkey PRIMARY KEY (womatl_id); <ALTER TABLE ONLY public.womatl DROP CONSTRAINT womatl_pkey; publicadminfalse246246l26061687890womatlpost_pkey CONSTRAINT\ALTER TABLE ONLY womatlpost ADD CONSTRAINT womatlpost_pkey PRIMARY KEY (womatlpost_id); DALTER TABLE ONLY public.womatlpost DROP CONSTRAINT womatlpost_pkey; publicadminfalse680680n26061687892womatlvar_pkey CONSTRAINTYALTER TABLE ONLY womatlvar ADD CONSTRAINT womatlvar_pkey PRIMARY KEY (womatlvar_id); BALTER TABLE ONLY public.womatlvar DROP CONSTRAINT womatlvar_pkey; publicadminfalse682682p26061687894xsltmap_name_key CONSTRAINTTALTER TABLE ONLY xsltmap ADD CONSTRAINT xsltmap_name_key UNIQUE (xsltmap_name); BALTER TABLE ONLY public.xsltmap DROP CONSTRAINT xsltmap_name_key; publicadminfalse685685r26061687896 xsltmap_pkey CONSTRAINTSALTER TABLE ONLY xsltmap ADD CONSTRAINT xsltmap_pkey PRIMARY KEY (xsltmap_id); >ALTER TABLE ONLY public.xsltmap DROP CONSTRAINT xsltmap_pkey; publicadminfalse685685t26061687898yearperiod_pkey CONSTRAINT\ALTER TABLE ONLY yearperiod ADD CONSTRAINT yearperiod_pkey PRIMARY KEY (yearperiod_id); DALTER TABLE ONLY public.yearperiod DROP CONSTRAINT yearperiod_pkey; publicadminfalse687687v26061687900 pkgcmd_pkey CONSTRAINTMALTER TABLE ONLY pkgcmd ADD CONSTRAINT pkgcmd_pkey PRIMARY KEY (cmd_id); 8ALTER TABLE ONLY te.pkgcmd DROP CONSTRAINT pkgcmd_pkey; teadminfalse689689x26061687902pkgcmdarg_pkey CONSTRAINTVALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_pkey PRIMARY KEY (cmdarg_id); >ALTER TABLE ONLY te.pkgcmdarg DROP CONSTRAINT pkgcmdarg_pkey; teadminfalse690690z26061687904 pkgimage_pkey CONSTRAINTSALTER TABLE ONLY pkgimage ADD CONSTRAINT pkgimage_pkey PRIMARY KEY (image_id); <ALTER TABLE ONLY te.pkgimage DROP CONSTRAINT pkgimage_pkey; teadminfalse691691|26061687906pkgmetasql_pkey CONSTRAINTYALTER TABLE ONLY pkgmetasql ADD CONSTRAINT pkgmetasql_pkey PRIMARY KEY (metasql_id); @ALTER TABLE ONLY te.pkgmetasql DROP CONSTRAINT pkgmetasql_pkey; teadminfalse692692~26061687908 pkgpriv_pkey CONSTRAINTPALTER TABLE ONLY pkgpriv ADD CONSTRAINT pkgpriv_pkey PRIMARY KEY (priv_id); :ALTER TABLE ONLY te.pkgpriv DROP CONSTRAINT pkgpriv_pkey; teadminfalse69369326061687910pkgreport_pkey CONSTRAINTVALTER TABLE ONLY pkgreport ADD CONSTRAINT pkgreport_pkey PRIMARY KEY (report_id); >ALTER TABLE ONLY te.pkgreport DROP CONSTRAINT pkgreport_pkey; teadminfalse69469426061687912pkgscript_pkey CONSTRAINTVALTER TABLE ONLY pkgscript ADD CONSTRAINT pkgscript_pkey PRIMARY KEY (script_id); >ALTER TABLE ONLY te.pkgscript DROP CONSTRAINT pkgscript_pkey; teadminfalse69569526061687914pkguiform_pkey CONSTRAINTVALTER TABLE ONLY pkguiform ADD CONSTRAINT pkguiform_pkey PRIMARY KEY (uiform_id); >ALTER TABLE ONLY te.pkguiform DROP CONSTRAINT pkguiform_pkey; teadminfalse69669626061687916tecustrate_pkey CONSTRAINTaALTER TABLE ONLY tecustrate ADD CONSTRAINT tecustrate_pkey PRIMARY KEY (tecustrate_cust_id); @ALTER TABLE ONLY te.tecustrate DROP CONSTRAINT tecustrate_pkey; teadminfalse69769726061687918 teexp_pkey CONSTRAINTMALTER TABLE ONLY teexp ADD CONSTRAINT teexp_pkey PRIMARY KEY (teexp_id); 6ALTER TABLE ONLY te.teexp DROP CONSTRAINT teexp_pkey; teadminfalse70170126061687920 tehead_pkey CONSTRAINTPALTER TABLE ONLY tehead ADD CONSTRAINT tehead_pkey PRIMARY KEY (tehead_id); 8ALTER TABLE ONLY te.tehead DROP CONSTRAINT tehead_pkey; teadminfalse70370326061687922 teitem_pkey CONSTRAINTPALTER TABLE ONLY teitem ADD CONSTRAINT teitem_pkey PRIMARY KEY (teitem_id); 8ALTER TABLE ONLY te.teitem DROP CONSTRAINT teitem_pkey; teadminfalse70570526061687924 teprj_pkey CONSTRAINTMALTER TABLE ONLY teprj ADD CONSTRAINT teprj_pkey PRIMARY KEY (teprj_id); 6ALTER TABLE ONLY te.teprj DROP CONSTRAINT teprj_pkey; teadminfalse70770726061687926teprjtask_pkey CONSTRAINTYALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_pkey PRIMARY KEY (teprjtask_id); >ALTER TABLE ONLY te.teprjtask DROP CONSTRAINT teprjtask_pkey; teadminfalse70970926061687928"teprjtask_teprjtask_prjtask_id_key CONSTRAINTpALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_teprjtask_prjtask_id_key UNIQUE (teprjtask_prjtask_id); RALTER TABLE ONLY te.teprjtask DROP CONSTRAINT teprjtask_teprjtask_prjtask_id_key; teadminfalse70970926061687930 pkgcmd_pkey CONSTRAINTMALTER TABLE ONLY pkgcmd ADD CONSTRAINT pkgcmd_pkey PRIMARY KEY (cmd_id); ?ALTER TABLE ONLY xtdesktop.pkgcmd DROP CONSTRAINT pkgcmd_pkey;  xtdesktopadminfalse71171126061687932pkgcmdarg_pkey CONSTRAINTVALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_pkey PRIMARY KEY (cmdarg_id); EALTER TABLE ONLY xtdesktop.pkgcmdarg DROP CONSTRAINT pkgcmdarg_pkey;  xtdesktopadminfalse71271226061687934 pkgimage_pkey CONSTRAINTSALTER TABLE ONLY pkgimage ADD CONSTRAINT pkgimage_pkey PRIMARY KEY (image_id); CALTER TABLE ONLY xtdesktop.pkgimage DROP CONSTRAINT pkgimage_pkey;  xtdesktopadminfalse71371326061687936pkgmetasql_pkey CONSTRAINTYALTER TABLE ONLY pkgmetasql ADD CONSTRAINT pkgmetasql_pkey PRIMARY KEY (metasql_id); GALTER TABLE ONLY xtdesktop.pkgmetasql DROP CONSTRAINT pkgmetasql_pkey;  xtdesktopadminfalse71471426061687938 pkgpriv_pkey CONSTRAINTPALTER TABLE ONLY pkgpriv ADD CONSTRAINT pkgpriv_pkey PRIMARY KEY (priv_id); AALTER TABLE ONLY xtdesktop.pkgpriv DROP CONSTRAINT pkgpriv_pkey;  xtdesktopadminfalse71571526061687940pkgreport_pkey CONSTRAINTVALTER TABLE ONLY pkgreport ADD CONSTRAINT pkgreport_pkey PRIMARY KEY (report_id); EALTER TABLE ONLY xtdesktop.pkgreport DROP CONSTRAINT pkgreport_pkey;  xtdesktopadminfalse71671626061687942pkgscript_pkey CONSTRAINTVALTER TABLE ONLY pkgscript ADD CONSTRAINT pkgscript_pkey PRIMARY KEY (script_id); EALTER TABLE ONLY xtdesktop.pkgscript DROP CONSTRAINT pkgscript_pkey;  xtdesktopadminfalse71771726061687944pkguiform_pkey CONSTRAINTVALTER TABLE ONLY pkguiform ADD CONSTRAINT pkguiform_pkey PRIMARY KEY (uiform_id); EALTER TABLE ONLY xtdesktop.pkguiform DROP CONSTRAINT pkguiform_pkey;  xtdesktopadminfalse71871812591687991accnt_unique_idxINDEXrCREATE UNIQUE INDEX accnt_unique_idx ON accnt USING btree (accnt_number, accnt_profit, accnt_sub, accnt_company); $DROP INDEX public.accnt_unique_idx; publicadminfalse19919919919912591687992apopen_apopen_open_idxINDEXICREATE INDEX apopen_apopen_open_idx ON apopen USING btree (apopen_open); *DROP INDEX public.apopen_apopen_open_idx; publicadminfalse15512591687993apopen_apopen_vend_id_idxINDEXOCREATE INDEX apopen_apopen_vend_id_idx ON apopen USING btree (apopen_vend_id); -DROP INDEX public.apopen_apopen_vend_id_idx; publicadminfalse15512591687994apselect_apselect_apopen_id_idxINDEX[CREATE INDEX apselect_apselect_apopen_id_idx ON apselect USING btree (apselect_apopen_id); 3DROP INDEX public.apselect_apselect_apopen_id_idx; publicadminfalse29612591687995$arapply_arapply_target_docnumber_idxINDEXeCREATE INDEX arapply_arapply_target_docnumber_idx ON arapply USING btree (arapply_target_docnumber); 8DROP INDEX public.arapply_arapply_target_docnumber_idx; publicadminfalse30012591687996aropen_aropen_cust_id_idxINDEXOCREATE INDEX aropen_aropen_cust_id_idx ON aropen USING btree (aropen_cust_id); -DROP INDEX public.aropen_aropen_cust_id_idx; publicadminfalse15912591687997aropen_aropen_docnumber_idxINDEXSCREATE INDEX aropen_aropen_docnumber_idx ON aropen USING btree (aropen_docnumber); /DROP INDEX public.aropen_aropen_docnumber_idx; publicadminfalse15912591687998aropen_aropen_doctype_idxINDEXOCREATE INDEX aropen_aropen_doctype_idx ON aropen USING btree (aropen_doctype); -DROP INDEX public.aropen_aropen_doctype_idx; publicadminfalse15912591687999aropen_aropen_open_idxINDEXICREATE INDEX aropen_aropen_open_idx ON aropen USING btree (aropen_open); *DROP INDEX public.aropen_aropen_open_idx; publicadminfalse15912591688000aropen_posted_idxINDEXFCREATE INDEX aropen_posted_idx ON aropen USING btree (aropen_posted); %DROP INDEX public.aropen_posted_idx; publicadminfalse159k12591688001aropenalloc_aropen_id_idxINDEX[CREATE INDEX aropenalloc_aropen_id_idx ON aropenalloc USING btree (aropenalloc_aropen_id); -DROP INDEX public.aropenalloc_aropen_id_idx; publicadminfalse251l12591688002aropenalloc_doc_id_idxINDEXUCREATE INDEX aropenalloc_doc_id_idx ON aropenalloc USING btree (aropenalloc_doc_id); *DROP INDEX public.aropenalloc_doc_id_idx; publicadminfalse25112591688003bomitem_bomitem_item_id_idxINDEXSCREATE INDEX bomitem_bomitem_item_id_idx ON bomitem USING btree (bomitem_item_id); /DROP INDEX public.bomitem_bomitem_item_id_idx; publicadminfalse15112591688004bomitem_effective_keyINDEXOCREATE INDEX bomitem_effective_key ON bomitem USING btree (bomitem_effective); )DROP INDEX public.bomitem_effective_key; publicadminfalse15112591688005bomitem_expires_keyINDEXKCREATE INDEX bomitem_expires_key ON bomitem USING btree (bomitem_expires); 'DROP INDEX public.bomitem_expires_key; publicadminfalse15112591688006bomitem_parent_item_idINDEXUCREATE INDEX bomitem_parent_item_id ON bomitem USING btree (bomitem_parent_item_id); *DROP INDEX public.bomitem_parent_item_id; publicadminfalse15112591688007bomitemcost_bomitem_id_keyINDEX]CREATE INDEX bomitemcost_bomitem_id_key ON bomitemcost USING btree (bomitemcost_bomitem_id); .DROP INDEX public.bomitemcost_bomitem_id_key; publicadminfalse32512591688008bomitemcost_master_idxINDEXCREATE UNIQUE INDEX bomitemcost_master_idx ON bomitemcost USING btree (bomitemcost_bomitem_id, bomitemcost_costelem_id, bomitemcost_lowlevel); *DROP INDEX public.bomitemcost_master_idx; publicadminfalse32532532512591688009ccard_cust_id_idxINDEXECREATE INDEX ccard_cust_id_idx ON ccard USING btree (ccard_cust_id); %DROP INDEX public.ccard_cust_id_idx; publicadminfalse20612591688010ccardaud_ccard_cust_id_idxINDEX^CREATE INDEX ccardaud_ccard_cust_id_idx ON ccardaud USING btree (ccardaud_ccard_cust_id_new); .DROP INDEX public.ccardaud_ccard_cust_id_idx; publicadminfalse33812591688011ccardaud_ccard_id_idxINDEXPCREATE INDEX ccardaud_ccard_id_idx ON ccardaud USING btree (ccardaud_ccard_id); )DROP INDEX public.ccardaud_ccard_id_idx; publicadminfalse33812591688012ccpay_ccard_id_idxINDEXGCREATE INDEX ccpay_ccard_id_idx ON ccpay USING btree (ccpay_ccard_id); &DROP INDEX public.ccpay_ccard_id_idx; publicadminfalse34212591688013ccpay_cust_id_idxINDEXECREATE INDEX ccpay_cust_id_idx ON ccpay USING btree (ccpay_cust_id); %DROP INDEX public.ccpay_cust_id_idx; publicadminfalse34212591688014ccpay_order_number_idxINDEXOCREATE INDEX ccpay_order_number_idx ON ccpay USING btree (ccpay_order_number); *DROP INDEX public.ccpay_order_number_idx; publicadminfalse34212591688015charass_target_idxINDEXaCREATE INDEX charass_target_idx ON charass USING btree (charass_target_type, charass_target_id); &DROP INDEX public.charass_target_idx; publicadminfalse18618612591688016checkhead_posted_idxINDEXOCREATE INDEX checkhead_posted_idx ON checkhead USING btree (checkhead_posted); (DROP INDEX public.checkhead_posted_idx; publicadminfalse34812591688017checkhead_replaced_idxINDEXSCREATE INDEX checkhead_replaced_idx ON checkhead USING btree (checkhead_replaced); *DROP INDEX public.checkhead_replaced_idx; publicadminfalse34812591688018checkitem_apopenitem_id_idxINDEXYCREATE INDEX checkitem_apopenitem_id_idx ON checkitem USING btree (checkitem_apopen_id); /DROP INDEX public.checkitem_apopenitem_id_idx; publicadminfalse350/12591688019cmhead_invcnumber_idxINDEXNCREATE INDEX cmhead_invcnumber_idx ON cmhead USING btree (cmhead_invcnumber); )DROP INDEX public.cmhead_invcnumber_idx; publicadminfalse16412591688020cntct_email_idxINDEXACREATE INDEX cntct_email_idx ON cntct USING btree (cntct_email); #DROP INDEX public.cntct_email_idx; publicadminfalse15212591688021cntct_name_idxINDEX?CREATE INDEX cntct_name_idx ON cntct USING btree (cntct_name); "DROP INDEX public.cntct_name_idx; publicadminfalse15212591688022cobill_cobmisc_idINDEXJCREATE INDEX cobill_cobmisc_id ON cobill USING btree (cobill_cobmisc_id); %DROP INDEX public.cobill_cobmisc_id; publicadminfalse37112591688023cobill_coitem_idINDEXHCREATE INDEX cobill_coitem_id ON cobill USING btree (cobill_coitem_id); $DROP INDEX public.cobill_coitem_id; publicadminfalse371 12591688024cobmisc_cohead_idINDEXKCREATE INDEX cobmisc_cohead_id ON cobmisc USING btree (cobmisc_cohead_id); %DROP INDEX public.cobmisc_cohead_id; publicadminfalse374 12591688025cobmisc_postedINDEXECREATE INDEX cobmisc_posted ON cobmisc USING btree (cobmisc_posted); "DROP INDEX public.cobmisc_posted; publicadminfalse374k12591688026cohead_cohead_status_idxINDEXMCREATE INDEX cohead_cohead_status_idx ON cohead USING btree (cohead_status); ,DROP INDEX public.cohead_cohead_status_idx; publicadminfalse176l12591688027cohead_cust_id_keyINDEXHCREATE INDEX cohead_cust_id_key ON cohead USING btree (cohead_cust_id); &DROP INDEX public.cohead_cust_id_key; publicadminfalse176m12591688028cohead_custponumber_idxINDEXRCREATE INDEX cohead_custponumber_idx ON cohead USING btree (cohead_custponumber); +DROP INDEX public.cohead_custponumber_idx; publicadminfalse176n12591688029cohead_number_idxINDEXMCREATE UNIQUE INDEX cohead_number_idx ON cohead USING btree (cohead_number); %DROP INDEX public.cohead_number_idx; publicadminfalse176q12591688030cohead_shipto_idINDEXHCREATE INDEX cohead_shipto_id ON cohead USING btree (cohead_shipto_id); $DROP INDEX public.cohead_shipto_id; publicadminfalse176o12591688031cohist_cust_idINDEXDCREATE INDEX cohist_cust_id ON cohist USING btree (cohist_cust_id); "DROP INDEX public.cohist_cust_id; publicadminfalse252p12591688032cohist_invcnumberINDEXJCREATE INDEX cohist_invcnumber ON cohist USING btree (cohist_invcnumber); %DROP INDEX public.cohist_invcnumber; publicadminfalse252q12591688033cohist_itemsite_idINDEXLCREATE INDEX cohist_itemsite_id ON cohist USING btree (cohist_itemsite_id); &DROP INDEX public.cohist_itemsite_id; publicadminfalse252t12591688034cohist_shipdateINDEXFCREATE INDEX cohist_shipdate ON cohist USING btree (cohist_shipdate); #DROP INDEX public.cohist_shipdate; publicadminfalse252u12591688035cohist_shipto_idINDEXHCREATE INDEX cohist_shipto_id ON cohist USING btree (cohist_shipto_id); $DROP INDEX public.cohist_shipto_id; publicadminfalse252r12591688036coitem_cohead_id_keyINDEXLCREATE INDEX coitem_cohead_id_key ON coitem USING btree (coitem_cohead_id); (DROP INDEX public.coitem_cohead_id_key; publicadminfalse177s12591688037coitem_coitem_cohead_id_keyINDEXCREATE UNIQUE INDEX coitem_coitem_cohead_id_key ON coitem USING btree (coitem_cohead_id, coitem_linenumber, coitem_subnumber); /DROP INDEX public.coitem_coitem_cohead_id_key; publicadminfalse177177177t12591688038coitem_itemsite_idINDEXLCREATE INDEX coitem_itemsite_id ON coitem USING btree (coitem_itemsite_id); &DROP INDEX public.coitem_itemsite_id; publicadminfalse177u12591688039coitem_linenumber_keyINDEXNCREATE INDEX coitem_linenumber_key ON coitem USING btree (coitem_linenumber); )DROP INDEX public.coitem_linenumber_key; publicadminfalse177x12591688040coitem_status_keyINDEXFCREATE INDEX coitem_status_key ON coitem USING btree (coitem_status); %DROP INDEX public.coitem_status_key; publicadminfalse17712591688041comment_comment_source_idxINDEXdCREATE INDEX comment_comment_source_idx ON comment USING btree (comment_source, comment_source_id); .DROP INDEX public.comment_comment_source_idx; publicadminfalse18818812591744593contrct_master_idxINDEXaCREATE UNIQUE INDEX contrct_master_idx ON contrct USING btree (contrct_number, contrct_vend_id); &DROP INDEX public.contrct_master_idx; publicadminfalse72072012591688042cust_number_idxINDEXKCREATE UNIQUE INDEX cust_number_idx ON custinfo USING btree (cust_number); #DROP INDEX public.cust_number_idx; publicadminfalse160=12591688043evntlog_dispatched_idxINDEXQCREATE INDEX evntlog_dispatched_idx ON evntlog USING btree (evntlog_dispatched); *DROP INDEX public.evntlog_dispatched_idx; publicadminfalse416>12592005436evntlog_evntlog_username_idxINDEXUCREATE INDEX evntlog_evntlog_username_idx ON evntlog USING btree (evntlog_username); 0DROP INDEX public.evntlog_evntlog_username_idx; publicadminfalse416A12591688044evntnot_evnttype_id_idxINDEXSCREATE INDEX evntnot_evnttype_id_idx ON evntnot USING btree (evntnot_evnttype_id); +DROP INDEX public.evntnot_evnttype_id_idx; publicadminfalse418D12591688045evntnot_warehous_id_idxINDEXSCREATE INDEX evntnot_warehous_id_idx ON evntnot USING btree (evntnot_warehous_id); +DROP INDEX public.evntnot_warehous_id_idx; publicadminfalse418I12591688047 filter_idxINDEX]CREATE INDEX filter_idx ON filter USING btree (filter_screen, filter_username, filter_name); DROP INDEX public.filter_idx; publicadminfalse424424424;12591688048gltrans_gltrans_accnt_id_idxINDEXUCREATE INDEX gltrans_gltrans_accnt_id_idx ON gltrans USING btree (gltrans_accnt_id); 0DROP INDEX public.gltrans_gltrans_accnt_id_idx; publicadminfalse237<12591688049gltrans_gltrans_date_idxINDEXMCREATE INDEX gltrans_gltrans_date_idx ON gltrans USING btree (gltrans_date); ,DROP INDEX public.gltrans_gltrans_date_idx; publicadminfalse237=12591688050!gltrans_gltrans_journalnumber_idxINDEX_CREATE INDEX gltrans_gltrans_journalnumber_idx ON gltrans USING btree (gltrans_journalnumber); 5DROP INDEX public.gltrans_gltrans_journalnumber_idx; publicadminfalse237@12591688051gltrans_sequence_idxINDEXMCREATE INDEX gltrans_sequence_idx ON gltrans USING btree (gltrans_sequence); (DROP INDEX public.gltrans_sequence_idx; publicadminfalse237Z12591688052!invchead_invchead_ordernumber_idxINDEX_CREATE INDEX invchead_invchead_ordernumber_idx ON invchead USING btree (invchead_ordernumber); 5DROP INDEX public.invchead_invchead_ordernumber_idx; publicadminfalse173e12591688053!invcitem_invcitem_invchead_id_idxINDEX_CREATE INDEX invcitem_invcitem_invchead_id_idx ON invcitem USING btree (invcitem_invchead_id); 5DROP INDEX public.invcitem_invcitem_invchead_id_idx; publicadminfalse175f12591688054!invcitem_invcitem_itemsite_id_idxINDEXqCREATE INDEX invcitem_invcitem_itemsite_id_idx ON invcitem USING btree (invcitem_item_id, invcitem_warehous_id); 5DROP INDEX public.invcitem_invcitem_itemsite_id_idx; publicadminfalse175175r12592005437!invcitemtax_taxhist_parent_id_idxINDEX_CREATE INDEX invcitemtax_taxhist_parent_id_idx ON invcitemtax USING btree (taxhist_parent_id); 5DROP INDEX public.invcitemtax_taxhist_parent_id_idx; publicadminfalse465u12591688055#invdetail_invdetail_invcitem_id_idxINDEXcCREATE INDEX invdetail_invdetail_invcitem_id_idx ON invdetail USING btree (invdetail_invcitem_id); 7DROP INDEX public.invdetail_invdetail_invcitem_id_idx; publicadminfalse468v12591688056"invdetail_invdetail_invhist_id_idxINDEXaCREATE INDEX invdetail_invdetail_invhist_id_idx ON invdetail USING btree (invdetail_invhist_id); 6DROP INDEX public.invdetail_invdetail_invhist_id_idx; publicadminfalse468y12591688057invhist_hasdetailINDEXKCREATE INDEX invhist_hasdetail ON invhist USING btree (invhist_hasdetail); %DROP INDEX public.invhist_hasdetail; publicadminfalse470z12591688058invhist_invhist_ordnumber_idxINDEXWCREATE INDEX invhist_invhist_ordnumber_idx ON invhist USING btree (invhist_ordnumber); 1DROP INDEX public.invhist_invhist_ordnumber_idx; publicadminfalse470{12591688059invhist_itemsite_idINDEXOCREATE INDEX invhist_itemsite_id ON invhist USING btree (invhist_itemsite_id); 'DROP INDEX public.invhist_itemsite_id; publicadminfalse470~12591688060invhist_seriesINDEXECREATE INDEX invhist_series ON invhist USING btree (invhist_series); "DROP INDEX public.invhist_series; publicadminfalse47012591688061invhist_transdateINDEXKCREATE INDEX invhist_transdate ON invhist USING btree (invhist_transdate); %DROP INDEX public.invhist_transdate; publicadminfalse47012591688062invhist_transtypeINDEXKCREATE INDEX invhist_transtype ON invhist USING btree (invhist_transtype); %DROP INDEX public.invhist_transtype; publicadminfalse470G12591688063ipsitem_ipshead_id_idxINDEXUCREATE INDEX ipsitem_ipshead_id_idx ON ipsiteminfo USING btree (ipsitem_ipshead_id); *DROP INDEX public.ipsitem_ipshead_id_idx; publicadminfalse240>12591688064item_classcode_idINDEXHCREATE INDEX item_classcode_id ON item USING btree (item_classcode_id); %DROP INDEX public.item_classcode_id; publicadminfalse168A12591688065item_number_idxINDEXGCREATE UNIQUE INDEX item_number_idx ON item USING btree (item_number); #DROP INDEX public.item_number_idx; publicadminfalse168D12591688066item_prodcat_id_idxINDEXHCREATE INDEX item_prodcat_id_idx ON item USING btree (item_prodcat_id); 'DROP INDEX public.item_prodcat_id_idx; publicadminfalse168E12591688067item_upccode_idxINDEXBCREATE INDEX item_upccode_idx ON item USING btree (item_upccode); $DROP INDEX public.item_upccode_idx; publicadminfalse16812591688068itemcost_item_id_keyINDEXNCREATE INDEX itemcost_item_id_key ON itemcost USING btree (itemcost_item_id); (DROP INDEX public.itemcost_item_id_key; publicadminfalse22812591688069itemcost_master_idxINDEX}CREATE UNIQUE INDEX itemcost_master_idx ON itemcost USING btree (itemcost_item_id, itemcost_costelem_id, itemcost_lowlevel); 'DROP INDEX public.itemcost_master_idx; publicadminfalse22822822812591688070itemgrpitem_itemgrp_item_id_idxINDEX~CREATE UNIQUE INDEX itemgrpitem_itemgrp_item_id_idx ON itemgrpitem USING btree (itemgrpitem_itemgrp_id, itemgrpitem_item_id); 3DROP INDEX public.itemgrpitem_itemgrp_item_id_idx; publicadminfalse49049012591688071itemloc_itemsite_idxINDEXPCREATE INDEX itemloc_itemsite_idx ON itemloc USING btree (itemloc_itemsite_id); (DROP INDEX public.itemloc_itemsite_idx; publicadminfalse49412591688072itemloc_location_idxINDEXPCREATE INDEX itemloc_location_idx ON itemloc USING btree (itemloc_location_id); (DROP INDEX public.itemloc_location_idx; publicadminfalse494F12591688073itemsite_active_keyINDEXLCREATE INDEX itemsite_active_key ON itemsite USING btree (itemsite_active); 'DROP INDEX public.itemsite_active_key; publicadminfalse169G12591688074itemsite_item_id_keyINDEXNCREATE INDEX itemsite_item_id_key ON itemsite USING btree (itemsite_item_id); (DROP INDEX public.itemsite_item_id_key; publicadminfalse169H12591688075itemsite_item_warehous_id_keyINDEXtCREATE UNIQUE INDEX itemsite_item_warehous_id_key ON itemsite USING btree (itemsite_item_id, itemsite_warehous_id); 1DROP INDEX public.itemsite_item_warehous_id_key; publicadminfalse169169K12591688076itemsite_plancode_id_keyINDEXVCREATE INDEX itemsite_plancode_id_key ON itemsite USING btree (itemsite_plancode_id); ,DROP INDEX public.itemsite_plancode_id_key; publicadminfalse169L12591688077itemsite_warehous_id_keyINDEXVCREATE INDEX itemsite_warehous_id_key ON itemsite USING btree (itemsite_warehous_id); ,DROP INDEX public.itemsite_warehous_id_key; publicadminfalse169+12591688078itemsrc_vend_id_idxINDEXKCREATE INDEX itemsrc_vend_id_idx ON itemsrc USING btree (itemsrc_vend_id); 'DROP INDEX public.itemsrc_vend_id_idx; publicadminfalse232,12591688079itemsrcp_itemsrc_id_keyINDEXTCREATE INDEX itemsrcp_itemsrc_id_key ON itemsrcp USING btree (itemsrcp_itemsrc_id); +DROP INDEX public.itemsrcp_itemsrc_id_key; publicadminfalse233312591688080itemsub_parent_item_id_keyINDEXYCREATE INDEX itemsub_parent_item_id_key ON itemsub USING btree (itemsub_parent_item_id); .DROP INDEX public.itemsub_parent_item_id_key; publicadminfalse234612591688081itemsub_sub_item_id_keyINDEXSCREATE INDEX itemsub_sub_item_id_key ON itemsub USING btree (itemsub_sub_item_id); +DROP INDEX public.itemsub_sub_item_id_key; publicadminfalse234"12591688082location_warehous_idxINDEXSCREATE INDEX location_warehous_idx ON location USING btree (location_warehous_id); )DROP INDEX public.location_warehous_idx; publicadminfalse23012591688085payaropen_aropen_id_idxINDEXUCREATE INDEX payaropen_aropen_id_idx ON payaropen USING btree (payaropen_aropen_id); +DROP INDEX public.payaropen_aropen_id_idx; publicadminfalse55112591688086payaropen_ccpay_id_idxINDEXSCREATE INDEX payaropen_ccpay_id_idx ON payaropen USING btree (payaropen_ccpay_id); *DROP INDEX public.payaropen_ccpay_id_idx; publicadminfalse55112591688087payco_ccpay_id_idxINDEXGCREATE INDEX payco_ccpay_id_idx ON payco USING btree (payco_ccpay_id); &DROP INDEX public.payco_ccpay_id_idx; publicadminfalse55212591688088payco_cohead_id_idxINDEXICREATE INDEX payco_cohead_id_idx ON payco USING btree (payco_cohead_id); 'DROP INDEX public.payco_cohead_id_idx; publicadminfalse552}12591688089pohead_pohead_status_idxINDEXMCREATE INDEX pohead_pohead_status_idx ON pohead USING btree (pohead_status); ,DROP INDEX public.pohead_pohead_status_idx; publicadminfalse178~12591688090poitem_itemsite_id_keyINDEXPCREATE INDEX poitem_itemsite_id_key ON poitem USING btree (poitem_itemsite_id); *DROP INDEX public.poitem_itemsite_id_key; publicadminfalse17912591688091"poitem_itemsite_status_duedate_keyINDEX{CREATE INDEX poitem_itemsite_status_duedate_key ON poitem USING btree (poitem_itemsite_id, poitem_status, poitem_duedate); 6DROP INDEX public.poitem_itemsite_status_duedate_key; publicadminfalse17917917912591688092poitem_pohead_id_keyINDEXLCREATE INDEX poitem_pohead_id_key ON poitem USING btree (poitem_pohead_id); (DROP INDEX public.poitem_pohead_id_key; publicadminfalse17912591688093poitem_status_keyINDEXFCREATE INDEX poitem_status_key ON poitem USING btree (poitem_status); %DROP INDEX public.poitem_status_key; publicadminfalse17912591688094 priv_name_idxINDEXCCREATE UNIQUE INDEX priv_name_idx ON priv USING btree (priv_name); !DROP INDEX public.priv_name_idx; publicadminfalse270j12591688095quitem_quhead_id_keyINDEXLCREATE INDEX quitem_quhead_id_key ON quitem USING btree (quitem_quhead_id); (DROP INDEX public.quitem_quhead_id_key; publicadminfalse25012591688096recv_ordertypeid_idxINDEX\CREATE INDEX recv_ordertypeid_idx ON recv USING btree (recv_order_type, recv_orderitem_id); (DROP INDEX public.recv_ordertypeid_idx; publicadminfalse59159112591688097report_name_grade_idxINDEX]CREATE UNIQUE INDEX report_name_grade_idx ON report USING btree (report_name, report_grade); )DROP INDEX public.report_name_grade_idx; publicadminfalse273273 12591688098salesaccnt_prodcat_id_idxINDEXZCREATE INDEX salesaccnt_prodcat_id_idx ON salesaccnt USING btree (salesaccnt_prodcat_id); -DROP INDEX public.salesaccnt_prodcat_id_idx; publicadminfalse393!12591688099salesaccnt_warehous_id_idxINDEX\CREATE INDEX salesaccnt_warehous_id_idx ON salesaccnt USING btree (salesaccnt_warehous_id); .DROP INDEX public.salesaccnt_warehous_id_idx; publicadminfalse39312591688100shipdata_cohead_number_idxINDEXZCREATE INDEX shipdata_cohead_number_idx ON shipdata USING btree (shipdata_cohead_number); .DROP INDEX public.shipdata_cohead_number_idx; publicadminfalse21612591688101shipdatasum_cohead_number_idxINDEXcCREATE INDEX shipdatasum_cohead_number_idx ON shipdatasum USING btree (shipdatasum_cohead_number); 1DROP INDEX public.shipdatasum_cohead_number_idx; publicadminfalse60612591688102 shipdatasum_cosmisc_tracknum_idxINDEXiCREATE INDEX shipdatasum_cosmisc_tracknum_idx ON shipdatasum USING btree (shipdatasum_cosmisc_tracknum); 4DROP INDEX public.shipdatasum_cosmisc_tracknum_idx; publicadminfalse60612591688103shiphead_order_id_idxINDEXPCREATE INDEX shiphead_order_id_idx ON shiphead USING btree (shiphead_order_id); )DROP INDEX public.shiphead_order_id_idx; publicadminfalse60812591688104shiphead_shipped_idxINDEXNCREATE INDEX shiphead_shipped_idx ON shiphead USING btree (shiphead_shipped); (DROP INDEX public.shiphead_shipped_idx; publicadminfalse60812592005439shipitem_invcitem_id_idxINDEXVCREATE INDEX shipitem_invcitem_id_idx ON shipitem USING btree (shipitem_invcitem_id); ,DROP INDEX public.shipitem_invcitem_id_idx; publicadminfalse47412592005438shipitem_orderitem_id_idxINDEXXCREATE INDEX shipitem_orderitem_id_idx ON shipitem USING btree (shipitem_orderitem_id); -DROP INDEX public.shipitem_orderitem_id_idx; publicadminfalse47412591688106shipitem_shiphead_id_idxINDEXVCREATE INDEX shipitem_shiphead_id_idx ON shipitem USING btree (shipitem_shiphead_id); ,DROP INDEX public.shipitem_shiphead_id_idx; publicadminfalse474"12591688107sltrans_sequence_idxINDEXMCREATE INDEX sltrans_sequence_idx ON sltrans USING btree (sltrans_sequence); (DROP INDEX public.sltrans_sequence_idx; publicadminfalse616#12591688108sltrans_sltrans_accnt_id_idxINDEXUCREATE INDEX sltrans_sltrans_accnt_id_idx ON sltrans USING btree (sltrans_accnt_id); 0DROP INDEX public.sltrans_sltrans_accnt_id_idx; publicadminfalse616$12591688109sltrans_sltrans_date_idxINDEXMCREATE INDEX sltrans_sltrans_date_idx ON sltrans USING btree (sltrans_date); ,DROP INDEX public.sltrans_sltrans_date_idx; publicadminfalse616%12591688110!sltrans_sltrans_journalnumber_idxINDEX_CREATE INDEX sltrans_sltrans_journalnumber_idx ON sltrans USING btree (sltrans_journalnumber); 5DROP INDEX public.sltrans_sltrans_journalnumber_idx; publicadminfalse616B12591688111subaccnttype_code_idxINDEX[CREATE UNIQUE INDEX subaccnttype_code_idx ON subaccnttype USING btree (subaccnttype_code); )DROP INDEX public.subaccnttype_code_idx; publicadminfalse63512591688112todoitem_todoitem_username_idxINDEXYCREATE INDEX todoitem_todoitem_username_idx ON todoitem USING btree (todoitem_username); 2DROP INDEX public.todoitem_todoitem_username_idx; publicadminfalse183O12591688113trialbal_accnt_period_idxINDEXoCREATE UNIQUE INDEX trialbal_accnt_period_idx ON trialbal USING btree (trialbal_accnt_id, trialbal_period_id); -DROP INDEX public.trialbal_accnt_period_idx; publicadminfalse651651Z12591688114usrpref_userpref_name_idxINDEXNCREATE INDEX usrpref_userpref_name_idx ON usrpref USING btree (usrpref_name); -DROP INDEX public.usrpref_userpref_name_idx; publicadminfalse65912591688115vend_number_idxINDEXKCREATE UNIQUE INDEX vend_number_idx ON vendinfo USING btree (vend_number); #DROP INDEX public.vend_number_idx; publicadminfalse158U12591688116warehous_code_keyINDEXRCREATE INDEX warehous_code_key ON whsinfo USING btree (warehous_code bpchar_ops); %DROP INDEX public.warehous_code_key; publicadminfalse172012591688117 wo_duedateINDEX8CREATE INDEX wo_duedate ON wo USING btree (wo_duedate); DROP INDEX public.wo_duedate; publicadminfalse410112591688118wo_itemsite_idINDEX@CREATE INDEX wo_itemsite_id ON wo USING btree (wo_itemsite_id); "DROP INDEX public.wo_itemsite_id; publicadminfalse410212591688119 wo_ordtypeINDEX8CREATE INDEX wo_ordtype ON wo USING btree (wo_ordtype); DROP INDEX public.wo_ordtype; publicadminfalse410512591688120 wo_startdateINDEX<CREATE INDEX wo_startdate ON wo USING btree (wo_startdate); DROP INDEX public.wo_startdate; publicadminfalse410612591688121 wo_statusINDEX6CREATE INDEX wo_status ON wo USING btree (wo_status); DROP INDEX public.wo_status; publicadminfalse410\12591688122womatl_itemsite_id_keyINDEXPCREATE INDEX womatl_itemsite_id_key ON womatl USING btree (womatl_itemsite_id); *DROP INDEX public.womatl_itemsite_id_key; publicadminfalse246_12591688123womatl_wo_id_keyINDEXDCREATE INDEX womatl_wo_id_key ON womatl USING btree (womatl_wo_id); $DROP INDEX public.womatl_wo_id_key; publicadminfalse24612591688124teitem_teitem_tehead_id_idxINDEXSCREATE INDEX teitem_teitem_tehead_id_idx ON teitem USING btree (teitem_tehead_id); +DROP INDEX te.teitem_teitem_tehead_id_idx; teadminfalse70526181688126_DELETERULE!CREATE RULE "_DELETE" AS ON DELETE TO salesline DO INSTEAD DELETE FROM public.coitem WHERE (((coitem.coitem_cohead_id = public.getcoheadid((old.order_number)::text)) AND (((coitem.coitem_linenumber)::character varying)::text = (old.line_number)::text)) AND (coitem.coitem_subnumber = 0)); &DROP RULE "_DELETE" ON api.salesline; apiadminfalse1801771771771456180180180#26181745336_DELETERULEACREATE RULE "_DELETE" AS ON DELETE TO apmemo DO INSTEAD NOTHING; #DROP RULE "_DELETE" ON api.apmemo; apiadminfalse723723723'26181745345_DELETERULEACREATE RULE "_DELETE" AS ON DELETE TO armemo DO INSTEAD NOTHING; #DROP RULE "_DELETE" ON api.armemo; apiadminfalse724724724+26181845297_DELETERULEGCREATE RULE "_DELETE" AS ON DELETE TO physinvcount DO INSTEAD NOTHING; )DROP RULE "_DELETE" ON api.physinvcount; apiadminfalse725725725/26182005778_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO account DO INSTEAD DELETE FROM public.crmacct WHERE (crmacct.crmacct_number = (old.account_number)::text); $DROP RULE "_DELETE" ON api.account; apiadminfalse743153743743326182005785_DELETERULECCREATE RULE "_DELETE" AS ON DELETE TO accountchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'CRMACCT'::text) AND (charass.charass_target_id = public.getcrmacctid((old.account_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CRMACCT'::text))); (DROP RULE "_DELETE" ON api.accountchar; apiadminfalse74414311861861867447441471744726182005792_DELETERULEICREATE RULE "_DELETE" AS ON DELETE TO accountcomment DO INSTEAD NOTHING; +DROP RULE "_DELETE" ON api.accountcomment; apiadminfalse745745745;26182005799_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO accountfile DO INSTEAD DELETE FROM public.url WHERE ((((url.url_source_id = public.getcrmacctid(old.account_number)) AND (url.url_source = 'CRMA'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); (DROP RULE "_DELETE" ON api.accountfile; apiadminfalse7467461921471746192192192746746?26182005806_DELETERULE CREATE RULE "_DELETE" AS ON DELETE TO accountimage DO INSTEAD DELETE FROM public.imageass WHERE (((imageass.imageass_source_id = public.getcrmacctid(old.account_number)) AND (imageass.imageass_source = 'CRMA'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); )DROP RULE "_DELETE" ON api.accountimage; apiadminfalse74719574714711537195195747747C26182005813_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO address DO INSTEAD SELECT public.deleteaddress(public.getaddrid((old.address_number)::text)) AS deleteaddress; $DROP RULE "_DELETE" ON api.address; apiadminfalse74874813797481392G26182005820_DELETERULE:CREATE RULE "_DELETE" AS ON DELETE TO addresschar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'ADDR'::text) AND (charass.charass_target_id = public.getaddrid((old.address_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'ADDR'::text))); (DROP RULE "_DELETE" ON api.addresschar; apiadminfalse74974914317491392186186186749K26182005827_DELETERULEICREATE RULE "_DELETE" AS ON DELETE TO addresscomment DO INSTEAD NOTHING; +DROP RULE "_DELETE" ON api.addresscomment; apiadminfalse750750750O26182005837_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO bom DO INSTEAD SELECT public.deletebom(public.getitemid((old.item_number)::text)) AS deletebom; DROP RULE "_DELETE" ON api.bom; apiadminfalse75175113837511602S26182005847_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO bomitem DO INSTEAD DELETE FROM public.bomitem WHERE ((bomitem.bomitem_id = old.id) AND public.fetchmetricbool('AllowBOMItemDelete'::text)); $DROP RULE "_DELETE" ON api.bomitem; apiadminfalse7527521511032752W26182005855_DELETERULEICREATE RULE "_DELETE" AS ON DELETE TO bomitemcomment DO INSTEAD NOTHING; +DROP RULE "_DELETE" ON api.bomitemcomment; apiadminfalse753753753[26182005863_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO bomitemsubstitute DO INSTEAD DELETE FROM public.bomitemsub WHERE ((bomitemsub.bomitemsub_bomitem_id = old.bomitem_id) AND (bomitemsub.bomitemsub_item_id = public.getitemid((old.substitute_item_number)::text))); .DROP RULE "_DELETE" ON api.bomitemsubstitute; apiadminfalse7541602197754197754754_26182005870_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO budget DO INSTEAD DELETE FROM public.budghead WHERE (budghead.budghead_name = old.name); #DROP RULE "_DELETE" ON api.budget; apiadminfalse755755198755c26182005877_DELETERULE2CREATE RULE "_DELETE" AS ON DELETE TO budgetentry DO INSTEAD DELETE FROM public.budgitem WHERE (((budgitem.budgitem_budghead_id = public.getbudgheadid(old.name)) AND (budgitem.budgitem_period_id = public.getperiodid(old.period_start))) AND (budgitem.budgitem_accnt_id = public.getglaccntid(old.account))); (DROP RULE "_DELETE" ON api.budgetentry; apiadminfalse756756153520020075675675620014281575g26182005887_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO cashreceipt DO INSTEAD SELECT public.deletecashrcpt(cashrcpt.cashrcpt_id) AS deletecashrcpt FROM public.cashrcpt WHERE (cashrcpt.cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)); (DROP RULE "_DELETE" ON api.cashreceipt; apiadminfalse75775714292037577571389757k26182005898_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO cashreceiptapply DO INSTEAD DELETE FROM public.cashrcptitem WHERE ((cashrcptitem.cashrcptitem_cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)) AND (cashrcptitem.cashrcptitem_aropen_id = public.getaropenid((old.customer_number)::text, (old.doc_type)::bpchar, (old.doc_number)::text))); -DROP RULE "_DELETE" ON api.cashreceiptapply; apiadminfalse75813942047587587587582047581429758o26182005908_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO cashreceiptapplymisc DO INSTEAD DELETE FROM public.cashrcptmisc WHERE ((cashrcptmisc.cashrcptmisc_cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)) AND (cashrcptmisc.cashrcptmisc_accnt_id = public.getglaccntid((old.account)::text))); 1DROP RULE "_DELETE" ON api.cashreceiptapplymisc; apiadminfalse75914297597592052057597591535759s26182005916_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO contact DO INSTEAD DELETE FROM public.cntct WHERE (cntct.cntct_number = (old.contact_number)::text); $DROP RULE "_DELETE" ON api.contact; apiadminfalse760760760152w26182005923_DELETERULE5CREATE RULE "_DELETE" AS ON DELETE TO contactchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'CNTCT'::text) AND (charass.charass_target_id = public.getcntctid(old.contact_number))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CNTCT'::text))); (DROP RULE "_DELETE" ON api.contactchar; apiadminfalse76118676115581861867611431761{26182005930_DELETERULEICREATE RULE "_DELETE" AS ON DELETE TO contactcomment DO INSTEAD NOTHING; +DROP RULE "_DELETE" ON api.contactcomment; apiadminfalse76276276226182005940_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO creditmemo DO INSTEAD SELECT public.deletecreditmemo(cmhead.cmhead_id) AS deletecreditmemo FROM public.cmhead WHERE ((cmhead.cmhead_number = old.memo_number) AND (cmhead.cmhead_posted = false)); 'DROP RULE "_DELETE" ON api.creditmemo; apiadminfalse763164146276316416476326182005950_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO creditmemoline DO INSTEAD DELETE FROM public.cmitem WHERE ((cmitem.cmitem_cmhead_id = public.getcmheadid(old.memo_number, false)) AND (cmitem.cmitem_linenumber = old.line_number)); +DROP RULE "_DELETE" ON api.creditmemoline; apiadminfalse764167764764143916776426182005957_DELETERULE2CREATE RULE "_DELETE" AS ON DELETE TO custchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'C'::text) AND (charass.charass_target_id = public.getcustid((old.customer_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'C'::text))); %DROP RULE "_DELETE" ON api.custchar; apiadminfalse7657651867651861431765166418626182005964_DELETERULEFCREATE RULE "_DELETE" AS ON DELETE TO custcomment DO INSTEAD NOTHING; (DROP RULE "_DELETE" ON api.custcomment; apiadminfalse76676676626182005972_DELETERULEICREATE RULE "_DELETE" AS ON DELETE TO custcreditcard DO INSTEAD NOTHING; +DROP RULE "_DELETE" ON api.custcreditcard; apiadminfalse76776776726182005982_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO customer DO INSTEAD DELETE FROM public.custinfo WHERE (custinfo.cust_number = (old.customer_number)::text); %DROP RULE "_DELETE" ON api.customer; apiadminfalse76876876816026182005996_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO customertype DO INSTEAD DELETE FROM public.custtype WHERE (custtype.custtype_code = (old.code)::text); )DROP RULE "_DELETE" ON api.customertype; apiadminfalse77020777077026182006003_DELETERULE>CREATE RULE "_DELETE" AS ON DELETE TO customertypechar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'CT'::text) AND (charass.charass_target_id = public.getcusttypeid((old.customer_type)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CT'::text))); -DROP RULE "_DELETE" ON api.customertypechar; apiadminfalse7717717711861216771143118618626182006013_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO custshipto DO INSTEAD SELECT public.deleteshipto(public.getshiptoid((old.customer_number)::text, (old.shipto_number)::text)) AS deleteshipto; 'DROP RULE "_DELETE" ON api.custshipto; apiadminfalse7727721599772147377226182006020_DELETERULE CREATE RULE "_DELETE" AS ON DELETE TO custtax DO INSTEAD DELETE FROM public.taxreg WHERE (((taxreg.taxreg_rel_type = 'C'::bpchar) AND (taxreg.taxreg_rel_id = public.getcustid((old.customer_number)::text))) AND (taxreg.taxreg_taxauth_id = public.gettaxauthid((old.tax_authority)::text))); $DROP RULE "_DELETE" ON api.custtax; apiadminfalse7732117732117731664160921177326182006030_DELETERULEzCREATE RULE "_DELETE" AS ON DELETE TO employee DO INSTEAD DELETE FROM public.emp WHERE (emp.emp_code = (old.code)::text); %DROP RULE "_DELETE" ON api.employee; apiadminfalse77477421477426182006037_DELETERULE7CREATE RULE "_DELETE" AS ON DELETE TO employeechar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'EMP'::text) AND (charass.charass_target_id = public.getempid((old.employee_code)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'EMP'::text))); )DROP RULE "_DELETE" ON api.employeechar; apiadminfalse7751861518775775143177518618626182006044_DELETERULEJCREATE RULE "_DELETE" AS ON DELETE TO employeecomment DO INSTEAD NOTHING; ,DROP RULE "_DELETE" ON api.employeecomment; apiadminfalse77677677626182006051_DELETERULEtCREATE RULE "_DELETE" AS ON DELETE TO extshipmaint DO INSTEAD DELETE FROM public.shipdata WHERE ((((shipdata.shipdata_cohead_number = (old.so_number)::text) AND (shipdata.shipdata_shiphead_number = (old.shipment_number)::text)) AND (shipdata.shipdata_shipper = (old.shipper)::text)) AND (shipdata.shipdata_cosmisc_packnum_tracknum = (old.package_tracking_number)::text)); )DROP RULE "_DELETE" ON api.extshipmaint; apiadminfalse77777721621677721677721677777726182006060_DELETERULE2CREATE RULE "_DELETE" AS ON DELETE TO freightpricingscheduleitem DO INSTEAD DELETE FROM public.ipsfreight WHERE (((((((((ipsfreight.ipsfreight_ipshead_id = public.getipsheadid((old.pricing_schedule)::text)) AND (ipsfreight.ipsfreight_qtybreak = old.qty_break)) AND (ipsfreight.ipsfreight_price = old.price)) AND ((ipsfreight.ipsfreight_type)::text = CASE WHEN (old.price_type = 'Flat Rate'::text) THEN 'F'::text WHEN (old.price_type = 'Price Per UOM'::text) THEN 'P'::text ELSE NULL::text END)) AND ((ipsfreight.ipsfreight_warehous_id IS NULL) AND (old.from_site = 'Any'::text))) OR ((ipsfreight.ipsfreight_warehous_id = CASE WHEN (old.from_site = 'Any'::text) THEN 0 ELSE public.getwarehousid(old.from_site, 'All'::text) END) AND ((ipsfreight.ipsfreight_shipzone_id IS NULL) AND (old.to_shipzone = 'Any'::text)))) OR ((ipsfreight.ipsfreight_shipzone_id = CASE WHEN (old.to_shipzone = 'Any'::text) THEN 0 ELSE public.getshipzoneid(old.to_shipzone) END) AND ((ipsfreight.ipsfreight_freightclass_id IS NULL) AND (old.freight_class = 'Any'::text)))) OR ((ipsfreight.ipsfreight_freightclass_id = CASE WHEN (old.freight_class = 'Any'::text) THEN 0 ELSE public.getfreightclassid(old.freight_class) END) AND ((ipsfreight.ipsfreight_shipvia IS NULL) AND (old.ship_via = 'Any'::text)))) OR (ipsfreight.ipsfreight_shipvia = old.ship_via)); 7DROP RULE "_DELETE" ON api.freightpricingscheduleitem; apiadminfalse778160421877877815317787787781690218218218778162121821821821877877877826182006080_DELETERULECCREATE RULE "_DELETE" AS ON DELETE TO incident DO INSTEAD NOTHING; %DROP RULE "_DELETE" ON api.incident; apiadminfalse78078078026182006087_DELETERULE:CREATE RULE "_DELETE" AS ON DELETE TO incidentchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'INCDT'::text) AND (charass.charass_target_id = public.getincidentid(old.incident_number))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'INCDT'::text))); )DROP RULE "_DELETE" ON api.incidentchar; apiadminfalse7811431781186186781186154378126182006092_DELETERULEJCREATE RULE "_DELETE" AS ON DELETE TO incidentcomment DO INSTEAD NOTHING; ,DROP RULE "_DELETE" ON api.incidentcomment; apiadminfalse78278278226182006101_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO incidentfile DO INSTEAD DELETE FROM public.url WHERE ((((url.url_source_id = public.getincidentid(old.incident_number)) AND (url.url_source = 'INCDT'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); )DROP RULE "_DELETE" ON api.incidentfile; apiadminfalse783192783783192192783154319278326182006108_DELETERULE$CREATE RULE "_DELETE" AS ON DELETE TO incidentimage DO INSTEAD DELETE FROM public.imageass WHERE (((imageass.imageass_source_id = public.getincidentid(old.incident_number)) AND (imageass.imageass_source = 'INCDT'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); *DROP RULE "_DELETE" ON api.incidentimage; apiadminfalse7847841951537195154319578478426182006118_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO invoice DO INSTEAD SELECT public.deleteinvoice(invchead.invchead_id) AS deleteinvoice FROM public.invchead WHERE ((invchead.invchead_invcnumber = old.invoice_number) AND (invchead.invchead_posted = false)); $DROP RULE "_DELETE" ON api.invoice; apiadminfalse785173785141017317378526182006128_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO invoiceline DO INSTEAD DELETE FROM public.invcitem WHERE (invcitem.invcitem_invchead_id = (SELECT invchead.invchead_id FROM public.invchead WHERE ((invchead.invchead_invcnumber = old.invoice_number) AND (invchead.invchead_posted = false)))); (DROP RULE "_DELETE" ON api.invoiceline; apiadminfalse78678617378617317517326182006138_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO item DO INSTEAD SELECT public.deleteitem(public.getitemid((old.item_number)::text)) AS deleteitem; !DROP RULE "_DELETE" ON api.item; apiadminfalse7871602141278778726182006145_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemalias DO INSTEAD DELETE FROM public.itemalias WHERE ((itemalias.itemalias_item_id = public.getitemid((old.item_number)::text)) AND (itemalias.itemalias_number = old.alias_number)); &DROP RULE "_DELETE" ON api.itemalias; apiadminfalse788788226788160222678826182006152_DELETERULE.CREATE RULE "_DELETE" AS ON DELETE TO itemchar DO INSTEAD DELETE FROM public.charass WHERE (((charass.charass_target_type = 'I'::text) AND (charass.charass_target_id = public.getitemid((old.item_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'I'::text))); %DROP RULE "_DELETE" ON api.itemchar; apiadminfalse7897891867891431160218618678926182006159_DELETERULEFCREATE RULE "_DELETE" AS ON DELETE TO itemcomment DO INSTEAD NOTHING; (DROP RULE "_DELETE" ON api.itemcomment; apiadminfalse79079079026182006167_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemcost DO INSTEAD SELECT public.deleteitemcost(public.getitemid((old.item_number)::text), public.getcostelemid((old.costing_element)::text)) AS deleteitemcost; %DROP RULE "_DELETE" ON api.itemcost; apiadminfalse79179179114661413160279126182006174_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemfile DO INSTEAD DELETE FROM public.url WHERE ((((url.url_source_id = public.getitemid((old.item_number)::text)) AND (url.url_source = 'I'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); %DROP RULE "_DELETE" ON api.itemfile; apiadminfalse792792792192792192192792192160226182006181_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemimage DO INSTEAD DELETE FROM public.imageass WHERE (((imageass.imageass_source_id = public.getitemid((old.item_number)::text)) AND (imageass.imageass_source = 'I'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); &DROP RULE "_DELETE" ON api.itemimage; apiadminfalse7937931951957931602195153779326182006191_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemsite DO INSTEAD SELECT public.deleteitemsite(public.getitemsiteid((old.site)::text, (old.item_number)::text)) AS deleteitemsite; %DROP RULE "_DELETE" ON api.itemsite; apiadminfalse7941023794794141479426182006199_DELETERULEJCREATE RULE "_DELETE" AS ON DELETE TO itemsitecomment DO INSTEAD NOTHING; ,DROP RULE "_DELETE" ON api.itemsitecomment; apiadminfalse79579579526182006209_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemsource DO INSTEAD DELETE FROM public.itemsrc WHERE (((((itemsrc.itemsrc_item_id = public.getitemid((old.item_number)::text)) AND (itemsrc.itemsrc_vend_id = public.getvendid((old.vendor)::text))) AND (itemsrc.itemsrc_vend_item_number = old.vendor_item_number)) AND (itemsrc.itemsrc_manuf_name = old.manufacturer_name)) AND (itemsrc.itemsrc_manuf_item_number = old.manufacturer_item_number)); 'DROP RULE "_DELETE" ON api.itemsource; apiadminfalse7962321602796232232796796796796232232796161926182006219_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemsourceprice DO INSTEAD DELETE FROM public.itemsrcp WHERE ((itemsrcp.itemsrcp_itemsrc_id = public.getitemsrcid((old.item_number)::text, (old.vendor)::text)) AND (itemsrcp.itemsrcp_qtybreak = old.qty_break)); ,DROP RULE "_DELETE" ON api.itemsourceprice; apiadminfalse797797233797797797233156226182006226_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemsubstitute DO INSTEAD DELETE FROM public.itemsub WHERE ((itemsub.itemsub_parent_item_id = public.getitemid((old.root_item_number)::text)) AND (itemsub.itemsub_sub_item_id = public.getitemid((old.substitute_item_number)::text))); +DROP RULE "_DELETE" ON api.itemsubstitute; apiadminfalse7982341602234798798798 26182006233_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO itemtaxtype DO INSTEAD DELETE FROM public.itemtax WHERE (((itemtax.itemtax_item_id = public.getitemid((old.item_number)::text)) AND CASE WHEN ((old.tax_zone)::text = 'Any'::text) THEN (itemtax.itemtax_taxzone_id IS NULL) ELSE (itemtax.itemtax_taxzone_id = public.gettaxzoneid((old.tax_zone)::text)) END) AND (itemtax.itemtax_taxtype_id = public.gettaxtypeid(old.tax_type))); (DROP RULE "_DELETE" ON api.itemtaxtype; apiadminfalse79923523579979979916022357991611161226182006240_DELETERULE0CREATE RULE "_DELETE" AS ON DELETE TO itemuomconversion DO INSTEAD SELECT public.deleteitemuomconv(itemuomconv.itemuomconv_id) AS deleteitemuomconv FROM public.itemuomconv WHERE ((itemuomconv.itemuomconv_item_id = public.getitemid((old.item_number)::text)) AND (((itemuomconv.itemuomconv_from_uom_id = public.getuomid((old.uom)::text)) AND (itemuomconv.itemuomconv_to_uom_id = public.getuomid(old.per_uom))) OR ((itemuomconv.itemuomconv_from_uom_id = public.getuomid(old.per_uom)) AND (itemuomconv.itemuomconv_to_uom_id = public.getuomid((old.uom)::text))))); .DROP RULE "_DELETE" ON api.itemuomconversion; apiadminfalse80080023623680080080016022362361650141526182006248_DELETERULEGCREATE RULE "_DELETE" AS ON DELETE TO journalentry DO INSTEAD NOTHING; )DROP RULE "_DELETE" ON api.journalentry; apiadminfalse80180180126182006256_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO location DO INSTEAD DELETE FROM public.location WHERE ((location.location_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (location.location_name = (old.location)::text)); %DROP RULE "_DELETE" ON api.location; apiadminfalse802162123023080280280226182006263_DELETERULEGCREATE RULE "_DELETE" AS ON DELETE TO misccounttag DO INSTEAD NOTHING; )DROP RULE "_DELETE" ON api.misccounttag; apiadminfalse803803803 26182006272_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO pricingschedule DO INSTEAD DELETE FROM public.ipshead WHERE ((old.name)::text = ipshead.ipshead_name); ,DROP RULE "_DELETE" ON api.pricingschedule; apiadminfalse804219804804$26182006281_DELETERULE7CREATE RULE "_DELETE" AS ON DELETE TO pricingscheduleassign DO INSTEAD DELETE FROM public.ipsass WHERE ((((((ipsass.ipsass_ipshead_id = public.getipsheadid((old.pricing_schedule)::text)) AND (ipsass.ipsass_cust_id = CASE WHEN ((old.customer_number)::text = 'Any'::text) THEN (-1) ELSE public.getcustid((old.customer_number)::text) END)) AND (ipsass.ipsass_custtype_id = CASE WHEN ((old.customer_type)::text = 'N/A'::text) THEN (-1) ELSE public.getcusttypeid((old.customer_type)::text) END)) AND (ipsass.ipsass_custtype_pattern = (old.customer_type_pattern)::text)) AND (ipsass.ipsass_shipto_id = CASE WHEN ((old.customer_shipto)::text = 'Any'::text) THEN (-1) ELSE public.getshiptoid((old.customer_number)::text, (old.customer_shipto)::text) END)) AND (ipsass.ipsass_shipto_pattern = (old.customer_shipto_pattern)::text)); 2DROP RULE "_DELETE" ON api.pricingscheduleassign; apiadminfalse8052392398058058051664159916901216805239239239239805805805(26182006291_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO pricingscheduleitem DO INSTEAD SELECT CASE WHEN ((old.type)::text = 'Item'::text) THEN public.deleteipsitem(public.getipsitemid((old.pricing_schedule)::text, (old.item_number)::text, old.qty_break, (old.qty_uom)::text, (old.price_uom)::text)) WHEN ((old.type)::text = 'Product Category'::text) THEN public.deleteipsprodcat(public.getipsprodcatid((old.pricing_schedule)::text, (old.product_category)::text, old.qty_break)) ELSE NULL::integer END AS result; 0DROP RULE "_DELETE" ON api.pricingscheduleitem; apiadminfalse8068068068068068061559806114115468061411806,26182006299_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO pricingscheduleitemchar DO INSTEAD DELETE FROM public.ipsitemchar WHERE (((ipsitemchar.ipsitemchar_ipsitem_id = public.getipsitemid((old.pricing_schedule)::text, (old.item_number)::text, old.qty_break, (old.qty_uom)::text, (old.price_uom)::text)) AND (ipsitemchar.ipsitemchar_char_id = public.getcharid((old.characteristic)::text, 'I'::text))) AND (ipsitemchar.ipsitemchar_value = (old.value)::text)); 4DROP RULE "_DELETE" ON api.pricingscheduleitemchar; apiadminfalse80780780780724280780780715461431807807242242026182006306_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO project DO INSTEAD SELECT public.deleteproject(public.getprjid(old.number)) AS deleteproject; $DROP RULE "_DELETE" ON api.project; apiadminfalse80815788081444808426182006313_DELETERULEICREATE RULE "_DELETE" AS ON DELETE TO projectcomment DO INSTEAD NOTHING; +DROP RULE "_DELETE" ON api.projectcomment; apiadminfalse809809809826182006323_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO prospect DO INSTEAD DELETE FROM public.prospect WHERE (prospect.prospect_number = (old.prospect_number)::text); %DROP RULE "_DELETE" ON api.prospect; apiadminfalse810810244810=26182006335_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO purchaseline DO INSTEAD DELETE FROM public.poitem WHERE (poitem.poitem_id = public.getpoitemid((old.order_number)::text, old.line_number)); )DROP RULE "_DELETE" ON api.purchaseline; apiadminfalse8118118118111791577A26182006345_DELETERULEKCREATE RULE "_DELETE" AS ON DELETE TO purchaselinechar DO INSTEAD NOTHING; -DROP RULE "_DELETE" ON api.purchaselinechar; apiadminfalse812812812E26182006354_DELETERULENCREATE RULE "_DELETE" AS ON DELETE TO purchaselinecomment DO INSTEAD NOTHING; 0DROP RULE "_DELETE" ON api.purchaselinecomment; apiadminfalse813813813I26182006364_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO purchaseorder DO INSTEAD SELECT public.deletepo(pohead.pohead_id) AS deletepo FROM public.pohead WHERE (pohead.pohead_number = (old.order_number)::text); *DROP RULE "_DELETE" ON api.purchaseorder; apiadminfalse8148141781781426814M26182006371_DELETERULEOCREATE RULE "_DELETE" AS ON DELETE TO purchaseordercomment DO INSTEAD NOTHING; 1DROP RULE "_DELETE" ON api.purchaseordercomment; apiadminfalse815815815Q26182006381_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO quote DO INSTEAD SELECT public.deletequote(quhead.quhead_id, (old.quote_number)::text) AS deletequote FROM public.quhead WHERE (quhead.quhead_number = (old.quote_number)::text); "DROP RULE "_DELETE" ON api.quote; apiadminfalse816816249816923249U26182006388_DELETERULEGCREATE RULE "_DELETE" AS ON DELETE TO quotecomment DO INSTEAD NOTHING; )DROP RULE "_DELETE" ON api.quotecomment; apiadminfalse817817817Y26182006398_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO quoteline DO INSTEAD DELETE FROM public.quitem WHERE ((quitem.quitem_quhead_id = public.getquoteid(old.quote_number)) AND (quitem.quitem_linenumber = old.line_number)); &DROP RULE "_DELETE" ON api.quoteline; apiadminfalse8188182501582250818818]26182006408_DELETERULEHCREATE RULE "_DELETE" AS ON DELETE TO quotelinechar DO INSTEAD NOTHING; *DROP RULE "_DELETE" ON api.quotelinechar; apiadminfalse819819819a26182006416_DELETERULEKCREATE RULE "_DELETE" AS ON DELETE TO quotelinecomment DO INSTEAD NOTHING; -DROP RULE "_DELETE" ON api.quotelinecomment; apiadminfalse820820820g26182006431_DELETERULEGCREATE RULE "_DELETE" AS ON DELETE TO saleshistory DO INSTEAD NOTHING; )DROP RULE "_DELETE" ON api.saleshistory; apiadminfalse822822822k26182006443_DELETERULEHCREATE RULE "_DELETE" AS ON DELETE TO saleslinechar DO INSTEAD NOTHING; *DROP RULE "_DELETE" ON api.saleslinechar; apiadminfalse823823823o26182006451_DELETERULEKCREATE RULE "_DELETE" AS ON DELETE TO saleslinecomment DO INSTEAD NOTHING; -DROP RULE "_DELETE" ON api.saleslinecomment; apiadminfalse824824824s26182006461_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO salesorder DO INSTEAD SELECT public.deleteso(cohead.cohead_id, (old.order_number)::text) AS deleteso FROM public.cohead WHERE (cohead.cohead_number = (old.order_number)::text); 'DROP RULE "_DELETE" ON api.salesorder; apiadminfalse8251474825176825176w26182006468_DELETERULELCREATE RULE "_DELETE" AS ON DELETE TO salesordercomment DO INSTEAD NOTHING; .DROP RULE "_DELETE" ON api.salesordercomment; apiadminfalse826826826{26182006476_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO salesrep DO INSTEAD DELETE FROM public.salesrep WHERE (salesrep.salesrep_number = (old.number)::text); %DROP RULE "_DELETE" ON api.salesrep; apiadminfalse82716382782726182006486_DELETERULE7CREATE RULE "_DELETE" AS ON DELETE TO site DO NOTHING; !DROP RULE "_DELETE" ON api.site; apiadminfalse82882882826182006493_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO sitezone DO INSTEAD DELETE FROM public.whsezone WHERE ((whsezone.whsezone_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (whsezone.whsezone_name = (old.name)::text)); %DROP RULE "_DELETE" ON api.sitezone; apiadminfalse829238829238829829162126182006503_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO task DO INSTEAD DELETE FROM public.prjtask WHERE ((prjtask.prjtask_prj_id = public.getprjid(old.project_number)) AND (prjtask.prjtask_number = old.number)); !DROP RULE "_DELETE" ON api.task; apiadminfalse830830157883018218283026182006510_DELETERULEFCREATE RULE "_DELETE" AS ON DELETE TO taskcomment DO INSTEAD NOTHING; (DROP RULE "_DELETE" ON api.taskcomment; apiadminfalse83183183126182006519_DELETERULEwCREATE RULE "_DELETE" AS ON DELETE TO todo DO INSTEAD SELECT public.deletetodoitem(old.task_number) AS deletetodoitem; !DROP RULE "_DELETE" ON api.todo; apiadminfalse832148683283226182006529_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO vendor DO INSTEAD DELETE FROM public.vendinfo WHERE (vendinfo.vend_number = (old.vendor_number)::text); #DROP RULE "_DELETE" ON api.vendor; apiadminfalse83383383315826182006537_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO vendoraddress DO INSTEAD SELECT public.deletevendoraddress(public.getvendaddrid((old.vendor_number)::text, (old.vendor_address_number)::text)) AS deletevendoraddress; *DROP RULE "_DELETE" ON api.vendoraddress; apiadminfalse8341618834834834150026182006544_DELETERULECREATE RULE "_DELETE" AS ON DELETE TO vendortype DO INSTEAD SELECT public.deletevendortype(public.getvendtypeid((old.code)::text)) AS deletevendortype; 'DROP RULE "_DELETE" ON api.vendortype; apiadminfalse8351620150183583526181688222_INSERTRULEtCREATE RULE "_INSERT" AS ON INSERT TO salesline DO INSTEAD SELECT public.insertsalesline(new.*) AS insertsalesline; &DROP RULE "_INSERT" ON api.salesline; apiadminfalse1801276180180!26181745333_INSERTRULEkCREATE RULE "_INSERT" AS ON INSERT TO apmemo DO INSTEAD SELECT public.insertapmemo(new.*) AS insertapmemo; #DROP RULE "_INSERT" ON api.apmemo; apiadminfalse7237237232251%26181745343_INSERTRULEkCREATE RULE "_INSERT" AS ON INSERT TO armemo DO INSTEAD SELECT public.insertarmemo(new.*) AS insertarmemo; #DROP RULE "_INSERT" ON api.armemo; apiadminfalse7247242281724)26181845295_INSERTRULEvCREATE RULE "_INSERT" AS ON INSERT TO physinvcount DO INSTEAD SELECT insertphysinvcount(new.*) AS insertphysinvcount; )DROP RULE "_INSERT" ON api.physinvcount; apiadminfalse7257257252284-26182005774_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO account DO INSTEAD INSERT INTO public.crmacct (crmacct_number, crmacct_parent_id, crmacct_name, crmacct_active, crmacct_type, crmacct_cntct_id_1, crmacct_cntct_id_2, crmacct_notes) VALUES (COALESCE(new.account_number, ((public.fetchcrmaccountnumber())::text)::character varying), public.getcrmacctid(new.parent_account), new.account_name, COALESCE(new.active, true), CASE WHEN (new.type = 'Individual'::text) THEN 'I'::text ELSE 'O'::text END, public.savecntct(public.getcntctid(new.primary_contact_number), new.primary_contact_number, public.saveaddr(public.getaddrid(new.primary_contact_address_number), new.primary_contact_address_number, new.primary_contact_address1, new.primary_contact_address2, new.primary_contact_address3, new.primary_contact_city, new.primary_contact_state, new.primary_contact_postalcode, new.primary_contact_country, new.primary_contact_address_change), new.primary_contact_honorific, new.primary_contact_first, new.primary_contact_middle, new.primary_contact_last, new.primary_contact_suffix, new.primary_contact_voice, NULL::text, new.primary_contact_fax, new.primary_contact_email, NULL::text, new.primary_contact_job_title, new.primary_contact_change), public.savecntct(public.getcntctid(new.secondary_contact_number), new.secondary_contact_number, public.saveaddr(public.getaddrid(new.secondary_contact_address_number), new.secondary_contact_address_number, new.secondary_contact_address1, new.secondary_contact_address2, new.secondary_contact_address3, new.secondary_contact_city, new.secondary_contact_state, new.secondary_contact_postalcode, new.secondary_contact_country, new.secondary_contact_address_change), new.secondary_contact_honorific, new.secondary_contact_first, new.secondary_contact_middle, new.secondary_contact_last, new.secondary_contact_suffix, new.secondary_contact_voice, NULL::text, new.secondary_contact_fax, new.secondary_contact_email, NULL::text, new.secondary_contact_job_title, new.secondary_contact_change), new.notes); $DROP RULE "_INSERT" ON api.account; apiadminfalse74374313921558147119311537437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437437431924991126182005783_INSERTRULENCREATE RULE "_INSERT" AS ON INSERT TO accountchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('CRMACCT'::text, public.getcrmacctid((new.account_number)::text), public.getcharid((new.characteristic)::text, 'CRMACCT'::text), new.value, false); (DROP RULE "_INSERT" ON api.accountchar; apiadminfalse74414311867447447447441471526182005790_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO accountcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'CRMA'::text, public.getcrmacctid((new.account_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); +DROP RULE "_INSERT" ON api.accountcomment; apiadminfalse745745745157474514491471188745745745926182005797_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO accountfile DO INSTEAD INSERT INTO public.url (url_source_id, url_source, url_title, url_url) VALUES (public.getcrmacctid(new.account_number), 'CRMA'::text, new.title, new.url); (DROP RULE "_INSERT" ON api.accountfile; apiadminfalse7467467461921471746746=26182005804_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO accountimage DO INSTEAD SELECT public.saveimageass('CRMA'::text, public.getcrmacctid(new.account_number), 'M'::bpchar, public.getimageid(new.image_name)) AS saveimageass; )DROP RULE "_INSERT" ON api.accountimage; apiadminfalse747747153714711932747747A26182005811_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO address DO INSTEAD SELECT public.saveaddr(NULL::integer, (new.address_number)::text, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, COALESCE(new.active, true), new.notes, NULL::text) AS saveaddr; $DROP RULE "_INSERT" ON api.address; apiadminfalse7487487487487481923748748748748748748748E26182005818_INSERTRULEECREATE RULE "_INSERT" AS ON INSERT TO addresschar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('ADDR'::text, public.getaddrid((new.address_number)::text), public.getcharid((new.characteristic)::text, 'ADDR'::text), new.value, false); (DROP RULE "_INSERT" ON api.addresschar; apiadminfalse74974974914311392186749749I26182005825_INSERTRULE}CREATE RULE "_INSERT" AS ON INSERT TO addresscomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'ADDR'::text, public.getaddrid((new.address_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); +DROP RULE "_INSERT" ON api.addresscomment; apiadminfalse750750157475075013921449188750750750M26182005835_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO bom DO INSTEAD SELECT public.savebomhead(public.getitemid((new.item_number)::text), (new.revision)::text, new.revision_date, new.document_number, COALESCE(new.batch_size, (0)::numeric), new.total_qty_per) AS savebomhead; DROP RULE "_INSERT" ON api.bom; apiadminfalse75116021926751751751751751751751Q26182005843_INSERTRULEGCREATE RULE "_INSERT" AS ON INSERT TO bomitem DO INSTEAD SELECT public.createbomitem(COALESCE(new.id, (nextval('public.bomitem_bomitem_id_seq'::regclass))::integer), public.getitemid((new.bom_item_number)::text), public.getitemid(new.item_number), COALESCE(new.sequence_number, (SELECT (max(bomitem.bomitem_seqnumber) + 10) FROM public.bomitem(public.getitemid((new.bom_item_number)::text), COALESCE(public.getrevid('BOM'::text, (new.bom_item_number)::text, (new.bom_revision)::text))) bomitem(bomitem_id, bomitem_parent_item_id, bomitem_seqnumber, bomitem_item_id, bomitem_qtyper, bomitem_scrap, bomitem_status, bomitem_effective, bomitem_expires, bomitem_createwo, bomitem_issuemethod, bomitem_schedatwooper, bomitem_ecn, bomitem_moddate, bomitem_subtype, bomitem_uom_id, bomitem_rev_id, bomitem_booitem_seq_id, bomitem_char_id, bomitem_value, bomitem_notes, bomitem_ref, bomitem_qtyfxd, bomitem_issuewo)), 10), (CASE WHEN (new.issue_method = 'Mixed'::text) THEN 'M'::text WHEN (new.issue_method = 'Push'::text) THEN 'S'::text WHEN (new.issue_method = 'Pull'::text) THEN 'L'::text ELSE public.fetchmetrictext('DefaultWomatlIssueMethod'::text) END)::bpchar, COALESCE(public.getuomid(new.issue_uom), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid(new.item_number)))), new.qty_per, new.scrap, CASE WHEN (new.effective = 'Always'::text) THEN public.startoftime() ELSE COALESCE((new.effective)::date, public.startoftime()) END, CASE WHEN (new.expires = 'Never'::text) THEN public.endoftime() ELSE COALESCE((new.expires)::date, public.endoftime()) END, COALESCE(new.create_child_wo, false), COALESCE(public.getbooitemseqid((new.bom_item_number)::text, new.used_at), (-1)), COALESCE(new.schedule_at_wo_operation, false), new.ecn_number, (CASE WHEN (new.substitutions = 'No'::text) THEN 'N'::text WHEN (new.substitutions = 'BOM-Defined'::text) THEN 'B'::text ELSE 'I'::text END)::bpchar, COALESCE(public.getrevid('BOM'::text, (new.bom_item_number)::text, (new.bom_revision)::text)), public.getcharid(new.characteristic, 'I'::text), new.value, new.notes, new.reference) AS createbomitem; $DROP RULE "_INSERT" ON api.bomitem; apiadminfalse752752752168752752103475275275298210941548142214311602165020001683247527527527527527527527527527527527527521584752U26182005853_INSERTRULE^CREATE RULE "_INSERT" AS ON INSERT TO bomitemcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'BMI'::text, new.bomitem_id, COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); +DROP RULE "_INSERT" ON api.bomitemcomment; apiadminfalse75315747537537531449188753753753Y26182005861_INSERTRULENCREATE RULE "_INSERT" AS ON INSERT TO bomitemsubstitute DO INSTEAD INSERT INTO public.bomitemsub (bomitemsub_bomitem_id, bomitemsub_item_id, bomitemsub_uomratio, bomitemsub_rank) VALUES (new.bomitem_id, public.getitemid((new.substitute_item_number)::text), COALESCE(new.sub_parent_uom_ratio, (1)::numeric), COALESCE(new.ranking, 1)); .DROP RULE "_INSERT" ON api.bomitemsubstitute; apiadminfalse7547541602197754754754754]26182005868_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO budget DO INSTEAD INSERT INTO public.budghead (budghead_name, budghead_descrip) VALUES (new.name, new.description); #DROP RULE "_INSERT" ON api.budget; apiadminfalse755755755755198a26182005875_INSERTRULE%CREATE RULE "_INSERT" AS ON INSERT TO budgetentry DO INSTEAD INSERT INTO public.budgitem (budgitem_budghead_id, budgitem_period_id, budgitem_accnt_id, budgitem_amount) VALUES (public.getbudgheadid(new.name), public.getperiodid(new.period_start), public.getglaccntid(new.account), new.amount); (DROP RULE "_INSERT" ON api.budgetentry; apiadminfalse756756153520075675675675614281575e26182005883_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO cashreceipt DO INSTEAD INSERT INTO public.cashrcpt (cashrcpt_cust_id, cashrcpt_amount, cashrcpt_fundstype, cashrcpt_docnumber, cashrcpt_bankaccnt_id, cashrcpt_notes, cashrcpt_distdate, cashrcpt_salescat_id, cashrcpt_curr_id, cashrcpt_usecustdeposit) VALUES (public.getcustid((new.customer_number)::text), COALESCE(new.amount_received, (0)::numeric), CASE WHEN ((new.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((new.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((new.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((new.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((new.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((new.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((new.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((new.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((new.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, COALESCE(new.check_document_number, ''::character varying), public.getbankaccntid(new.post_to), COALESCE(new.notes, ''::text), CASE WHEN (new.distribution_date > ''::text) THEN ((new.distribution_date)::date)::timestamp with time zone ELSE now() END, COALESCE(public.getsalescatid(new.sales_category), (-1)), public.getcurrid((new.currency)::text), CASE WHEN (new.apply_balance_as = 'Customer Deposit'::text) THEN true ELSE false END); (DROP RULE "_INSERT" ON api.cashreceipt; apiadminfalse7577577571472166415867577577577577577577577572037571397i26182005894_INSERTRULETCREATE RULE "_INSERT" AS ON INSERT TO cashreceiptapply DO INSTEAD INSERT INTO public.cashrcptitem (cashrcptitem_cashrcpt_id, cashrcptitem_aropen_id, cashrcptitem_amount, cashrcptitem_discount) VALUES (public.getcashrcptid((new.customer_number)::text, CASE WHEN ((new.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((new.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((new.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((new.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((new.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((new.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((new.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((new.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((new.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (new.check_document_number)::text), public.getaropenid((new.customer_number)::text, (new.doc_type)::bpchar, (new.doc_number)::text), COALESCE(new.amount_to_apply, (0)::numeric), COALESCE(new.cashrcptitem_discount, (0)::numeric)); -DROP RULE "_INSERT" ON api.cashreceiptapply; apiadminfalse75875814297587587587587587587581394204m26182005904_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO cashreceiptapplymisc DO INSTEAD INSERT INTO public.cashrcptmisc (cashrcptmisc_cashrcpt_id, cashrcptmisc_accnt_id, cashrcptmisc_amount, cashrcptmisc_notes) VALUES (public.getcashrcptid((new.customer_number)::text, CASE WHEN ((new.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((new.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((new.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((new.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((new.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((new.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((new.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((new.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((new.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (new.check_document_number)::text), public.getglaccntid((new.account)::text), COALESCE(new.amount_to_distribute, (0)::numeric), COALESCE(new.notes, ''::text)); 1DROP RULE "_INSERT" ON api.cashreceiptapplymisc; apiadminfalse75975914291535759759759759205759759q26182005914_INSERTRULE7CREATE RULE "_INSERT" AS ON INSERT TO contact DO INSTEAD SELECT public.savecntct(NULL::integer, (new.contact_number)::text, public.getcrmacctid(new.crm_account), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), new.honorific, new.first, new.middle, new.last, new.suffix, new.initials, COALESCE(new.active, true), new.voice, new.alternate, new.fax, new.email, new.web, new.notes, new.job_title, new.contact_change) AS savecntct; $DROP RULE "_INSERT" ON api.contact; apiadminfalse7601924760760760760760760760760760760760760193076076014717607601392760760760760760760760760760760760u26182005921_INSERTRULE@CREATE RULE "_INSERT" AS ON INSERT TO contactchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('CNTCT'::text, public.getcntctid(new.contact_number), public.getcharid((new.characteristic)::text, 'CNTCT'::text), new.value, false); (DROP RULE "_INSERT" ON api.contactchar; apiadminfalse76118615581431761761761761y26182005928_INSERTRULEsCREATE RULE "_INSERT" AS ON INSERT TO contactcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'T'::text, public.getcntctid(new.contact_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); +DROP RULE "_INSERT" ON api.contactcomment; apiadminfalse762762762188157476215581449762762762}26182005937_INSERTRULEwCREATE RULE "_INSERT" AS ON INSERT TO creditmemo DO INSTEAD SELECT public.insertcreditmemo(new.*) AS insertcreditmemo; 'DROP RULE "_INSERT" ON api.creditmemo; apiadminfalse763225276376326182005948_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO creditmemoline DO INSTEAD SELECT public.insertcreditmemoline(new.*) AS insertcreditmemoline; +DROP RULE "_INSERT" ON api.creditmemoline; apiadminfalse764225376476426182005955_INSERTRULE=CREATE RULE "_INSERT" AS ON INSERT TO custchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('C'::text, public.getcustid((new.customer_number)::text), public.getcharid((new.characteristic)::text, 'C'::text), new.value, false); %DROP RULE "_INSERT" ON api.custchar; apiadminfalse7651431166418676576576576526182005962_INSERTRULExCREATE RULE "_INSERT" AS ON INSERT TO custcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'C'::text, public.getcustid((new.customer_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); (DROP RULE "_INSERT" ON api.custcomment; apiadminfalse76614497667661887661664157476676676626182005970_INSERTRULE\CREATE RULE "_INSERT" AS ON INSERT TO custcreditcard DO INSTEAD SELECT public.insertccard((new.customer_number)::text, new.active, new.credit_card_type, new.credit_card_number, new.name, new.street_address1, new.street_address2, new.city, new.state, new.postal_code, new.country, new.expiration_month, new.expiration_year, new.key) AS insertccard; +DROP RULE "_INSERT" ON api.custcreditcard; apiadminfalse767767767767767767767767767127176776776776776776776726182005978_INSERTRULE0CREATE RULE "_INSERT" AS ON INSERT TO customer DO INSTEAD INSERT INTO public.custinfo (cust_active, cust_custtype_id, cust_salesrep_id, cust_commprcnt, cust_name, cust_creditlmt, cust_creditrating, cust_backorder, cust_partialship, cust_terms_id, cust_discntprcnt, cust_balmethod, cust_ffshipto, cust_shipform_id, cust_shipvia, cust_blanketpos, cust_shipchrg_id, cust_creditstatus, cust_comments, cust_ffbillto, cust_usespos, cust_number, cust_autoupdatestatus, cust_autoholdorders, cust_preferred_warehous_id, cust_curr_id, cust_creditlmt_curr_id, cust_cntct_id, cust_corrcntct_id, cust_taxzone_id, cust_gracedays) VALUES (COALESCE(new.active, true), COALESCE((public.getcusttypeid(new.customer_type))::numeric, public.fetchmetricvalue('DefaultCustType'::text)), COALESCE((public.getsalesrepid(new.sales_rep))::numeric, public.fetchmetricvalue('DefaultSalesRep'::text)), COALESCE((new.commission * 0.01), (SELECT salesrep.salesrep_commission FROM public.salesrep WHERE (salesrep.salesrep_id = public.getsalesrepid(new.sales_rep)))), COALESCE(new.customer_name, ''::text), COALESCE((new.credit_limit)::numeric, public.fetchmetricvalue('SOCreditLimit'::text)), COALESCE(new.credit_rating, public.fetchmetrictext('SOCreditRate'::text)), COALESCE(new.accepts_backorders, public.fetchmetricbool('DefaultBackOrders'::text), false), COALESCE(new.accepts_partial_shipments, public.fetchmetricbool('DefaultPartialShipments'::text), false), COALESCE((public.gettermsid(new.default_terms))::numeric, public.fetchmetricvalue('DefaultTerms'::text)), COALESCE(new.default_discount, (0)::numeric), CASE WHEN (new.balance_method = 'Balance Forward'::text) THEN 'B'::text WHEN (new.balance_method = 'Open Items'::text) THEN 'O'::text ELSE COALESCE(public.fetchmetrictext('DefaultBalanceMethod'::text), 'B'::text) END, COALESCE(new.allow_free_form_shipto, public.fetchmetricbool('DefaultFreeFormShiptos'::text), false), COALESCE((public.getshipformid(new.ship_form))::numeric, public.fetchmetricvalue('DefaultShipFormId'::text)), COALESCE(new.ship_via, public.fetchdefaultshipvia()), COALESCE(new.uses_blanket_pos, false), COALESCE(public.getshipchrgid(new.shipping_charges), (-1)), CASE WHEN (new.credit_status = 'On Credit Warning'::text) THEN 'W'::text WHEN (new.credit_status = 'On Credit Hold'::text) THEN 'H'::text ELSE 'G'::text END, COALESCE(new.notes, ''::text), COALESCE(new.allow_free_form_billto, false), COALESCE(new.uses_purchase_orders, false), COALESCE(upper((new.customer_number)::text), (public.fetchcrmaccountnumber())::text), COALESCE(new.credit_status_exceed_warn, false), COALESCE(new.credit_status_exceed_hold, false), COALESCE(public.getwarehousid(new.preferred_selling_site, 'ACTIVE'::text), (-1)), COALESCE(public.getcurrid((new.default_currency)::text), public.basecurrid()), COALESCE(public.getcurrid((new.credit_limit_currency)::text), public.basecurrid()), public.savecntct(public.getcntctid(new.billing_contact_number, false), new.billing_contact_number, public.saveaddr(public.getaddrid(new.billing_contact_address_number), new.billing_contact_address_number, new.billing_contact_address1, new.billing_contact_address2, new.billing_contact_address3, new.billing_contact_city, new.billing_contact_state, new.billing_contact_postalcode, new.billing_contact_country, new.billing_contact_address_change), new.billing_contact_honorific, new.billing_contact_first, new.billing_contact_middle, new.billing_contact_last, new.billing_contact_suffix, new.billing_contact_voice, new.billing_contact_alternate, new.billing_contact_fax, new.billing_contact_email, new.billing_contact_web, new.billing_contact_job_title, new.billing_contact_change), public.savecntct(public.getcntctid(new.correspond_contact_number, false), new.correspond_contact_number, public.saveaddr(public.getaddrid(new.correspond_contact_address_number), new.correspond_contact_address_number, new.correspond_contact_address1, new.correspond_contact_address2, new.correspond_contact_address3, new.correspond_contact_city, new.correspond_contact_state, new.correspond_contact_postalcode, new.correspond_contact_country, new.correspond_contact_address_change), new.correspond_contact_honorific, new.correspond_contact_first, new.correspond_contact_middle, new.correspond_contact_last, new.correspond_contact_suffix, new.correspond_contact_voice, new.correspond_contact_alternate, new.correspond_contact_fax, new.correspond_contact_email, new.correspond_contact_web, new.correspond_contact_job_title, new.correspond_contact_change), public.gettaxzoneid(new.default_tax_zone), CASE WHEN (COALESCE(new.alternate_grace_days, 0) > 0) THEN new.alternate_grace_days ELSE NULL::integer END); %DROP RULE "_INSERT" ON api.customer; apiadminfalse768161376876876876876876876876876876876876876876876876876876819247687687687687687687687687687687687687681607687687687687687687687687687681637681637687687681392159099610347681014991103210381450147212161596159716121621193176876876876876876876876876876876876876876876876876876876876876876876876876876876876826182005988_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO customertaxreg DO INSTEAD INSERT INTO public.taxreg (taxreg_rel_id, taxreg_rel_type, taxreg_taxauth_id, taxreg_taxzone_id, taxreg_number, taxreg_effective, taxreg_expires, taxreg_notes) VALUES (public.getcustid((new.customer_number)::text), 'C'::bpchar, public.gettaxauthid((new.tax_authority)::text), (SELECT custinfo.cust_taxzone_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text))), COALESCE(new.registration_number, ''::text), CASE WHEN (new.start_date = 'Always'::text) THEN public.startoftime() ELSE COALESCE((new.start_date)::date, public.startoftime()) END, CASE WHEN (new.end_date = 'Never'::text) THEN public.endoftime() ELSE COALESCE((new.end_date)::date, public.endoftime()) END, new.notes); +DROP RULE "_INSERT" ON api.customertaxreg; apiadminfalse769769769769160916021115487691664200016076976976926182005994_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO customertype DO INSTEAD INSERT INTO public.custtype (custtype_code, custtype_descrip, custtype_char) VALUES (new.code, COALESCE(new.description, ''::text), COALESCE(new.enable_characteristics_profile, false)); )DROP RULE "_INSERT" ON api.customertype; apiadminfalse77077020777077077026182006001_INSERTRULEcCREATE RULE "_INSERT" AS ON INSERT TO customertypechar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('CT'::text, public.getcusttypeid((new.customer_type)::text), public.getcharid((new.characteristic)::text, 'CT'::text), new.value, COALESCE(new.is_default, false)); -DROP RULE "_INSERT" ON api.customertypechar; apiadminfalse7717717717711216143118677177126182006009_INSERTRULE CREATE RULE "_INSERT" AS ON INSERT TO custshipto DO INSTEAD INSERT INTO public.shiptoinfo (shipto_cust_id, shipto_name, shipto_salesrep_id, shipto_comments, shipto_shipcomments, shipto_shipzone_id, shipto_shipvia, shipto_commission, shipto_shipform_id, shipto_shipchrg_id, shipto_active, shipto_default, shipto_num, shipto_ediprofile_id, shipto_cntct_id, shipto_addr_id, shipto_taxzone_id) VALUES (public.getcustid((new.customer_number)::text), COALESCE(new.name, ''::text), COALESCE(public.getsalesrepid(new.sales_rep), (SELECT custinfo.cust_salesrep_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text)))), COALESCE(new.general_notes, ''::text), COALESCE(new.shipping_notes, ''::text), public.getshipzoneid(new.zone), COALESCE(new.ship_via, (SELECT custinfo.cust_shipvia FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text)))), COALESCE((new.commission / 100.0), (0)::numeric), COALESCE(public.getshipformid(new.ship_form), (SELECT custinfo.cust_shipform_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text)))), COALESCE(public.getshipchrgid(new.shipping_charges), (SELECT custinfo.cust_shipchrg_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text)))), COALESCE(new.active, true), COALESCE(new.default_flag, false), COALESCE(new.shipto_number, (((SELECT (COALESCE(max((shiptoinfo.shipto_num)::integer), 0) + 1) FROM public.shiptoinfo WHERE ((shiptoinfo.shipto_cust_id = public.getcustid((new.customer_number)::text)) AND (shiptoinfo.shipto_num ~ '^[0-9]*$'::text))))::text)::character varying), CASE WHEN (new.edi_profile = 'No EDI'::text) THEN (-1) WHEN (new.edi_profile = 'Use Customer Master'::text) THEN (-2) ELSE public.getediprofileid(new.edi_profile) END, public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), COALESCE(public.gettaxzoneid(new.tax_zone), (SELECT custinfo.cust_taxzone_id FROM public.custinfo WHERE (custinfo.cust_id = public.getcustid((new.customer_number)::text))))); 'DROP RULE "_INSERT" ON api.custshipto; apiadminfalse7727727727727727727727727727727727727727727721604165772772161216016016016019311597159077213921558166415061596192416016016577277277277277277277277277277277277277277277277277277277226182006018_INSERTRULE$CREATE RULE "_INSERT" AS ON INSERT TO custtax DO INSTEAD INSERT INTO public.taxreg (taxreg_rel_type, taxreg_rel_id, taxreg_taxauth_id, taxreg_number) VALUES ('C'::bpchar, public.getcustid((new.customer_number)::text), public.gettaxauthid((new.tax_authority)::text), new.registration_number); $DROP RULE "_INSERT" ON api.custtax; apiadminfalse7737737731664160921177377326182006026_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO employee DO INSTEAD INSERT INTO public.emp (emp_code, emp_number, emp_active, emp_cntct_id, emp_warehous_id, emp_mgr_emp_id, emp_wage_type, emp_wage, emp_wage_curr_id, emp_wage_period, emp_dept_id, emp_shift_id, emp_image_id, emp_extrate, emp_extrate_period, emp_startdate, emp_notes) VALUES (new.code, new.number, COALESCE(new.active, true), public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.honorific, new.first, new.middle, new.last, new.suffix, new.voice, new.alternate, new.fax, new.email, new.web, new.job_title, new.contact_change), public.getwarehousid(new.site, 'ALL'::text), (SELECT emp.emp_id FROM public.emp WHERE (emp.emp_code = new.manager_code)), CASE WHEN (new.wage_type = 'Hourly'::text) THEN 'H'::text WHEN (new.wage_type = 'Salaried'::text) THEN 'S'::text ELSE NULL::text END, new.wage, COALESCE(public.getcurrid((new.wage_currency)::text), public.basecurrid()), CASE WHEN (new.wage_period = 'Hour'::text) THEN 'H'::text WHEN (new.wage_period = 'Day'::text) THEN 'D'::text WHEN (new.wage_period = 'Week'::text) THEN 'W'::text WHEN (new.wage_period = 'Biweek'::text) THEN 'BW'::text WHEN (new.wage_period = 'Month'::text) THEN 'M'::text WHEN (new.wage_period = 'Year'::text) THEN 'Y'::text ELSE NULL::text END, public.getdeptid(new.department), public.getshiftid(new.shift), public.getimageid(new.image), new.rate, CASE WHEN (new.billing_period = 'Hour'::text) THEN 'H'::text WHEN (new.billing_period = 'Day'::text) THEN 'D'::text WHEN (new.billing_period = 'Week'::text) THEN 'W'::text WHEN (new.billing_period = 'Biweek'::text) THEN 'BW'::text WHEN (new.billing_period = 'Month'::text) THEN 'M'::text WHEN (new.billing_period = 'Year'::text) THEN 'Y'::text ELSE NULL::text END, new.start_date, COALESCE(new.notes, ''::text)); %DROP RULE "_INSERT" ON api.employee; apiadminfalse774774101413921472148915371621192419312147747747747747747747747747747747747747747747747747747747747747747747747747747747747747747747747747747747747747747741595214155826182006035_INSERTRULEBCREATE RULE "_INSERT" AS ON INSERT TO employeechar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('EMP'::text, public.getempid((new.employee_code)::text), public.getcharid((new.characteristic)::text, 'EMP'::text), new.value, false); )DROP RULE "_INSERT" ON api.employeechar; apiadminfalse7751518775775143177518677526182006042_INSERTRULEzCREATE RULE "_INSERT" AS ON INSERT TO employeecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'EMP'::text, public.getempid((new.code)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid((new.type)::text), new.text); ,DROP RULE "_INSERT" ON api.employeecomment; apiadminfalse77677615747767761887761449151877677626182006049_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO extshipmaint DO INSTEAD INSERT INTO public.shipdata (shipdata_cohead_number, shipdata_shiphead_number, shipdata_void_ind, shipdata_shipper, shipdata_billing_option, shipdata_weight, shipdata_base_freight, shipdata_base_freight_curr_id, shipdata_total_freight, shipdata_total_freight_curr_id, shipdata_package_type, shipdata_cosmisc_tracknum, shipdata_cosmisc_packnum_tracknum, shipdata_lastupdated) VALUES (new.so_number, new.shipment_number, new.void, new.shipper, new.billing_option, new.weight, new.base_freight, public.getcurrid((new.base_freight_currency)::text), new.total_freight, public.getcurrid((new.total_freight_currency)::text), new.package_type, new.tracking_number, new.package_tracking_number, new.last_updated); )DROP RULE "_INSERT" ON api.extshipmaint; apiadminfalse777777777777777777147221677777777777777777777777777777726182006057_INSERTRULEhCREATE RULE "_INSERT" AS ON INSERT TO freightpricingscheduleitem DO INSTEAD INSERT INTO public.ipsfreight (ipsfreight_ipshead_id, ipsfreight_qtybreak, ipsfreight_price, ipsfreight_type, ipsfreight_warehous_id, ipsfreight_shipzone_id, ipsfreight_freightclass_id, ipsfreight_shipvia) VALUES (public.getipsheadid((new.pricing_schedule)::text), new.qty_break, new.price, CASE WHEN (new.price_type = 'Flat Rate'::text) THEN 'F'::text ELSE 'P'::text END, CASE WHEN (new.from_site = 'Any'::text) THEN NULL::integer ELSE public.getwarehousid(new.from_site, 'All'::text) END, CASE WHEN (new.to_shipzone = 'Any'::text) THEN NULL::integer ELSE public.getshipzoneid(new.to_shipzone) END, CASE WHEN (new.freight_class = 'Any'::text) THEN NULL::integer ELSE public.getfreightclassid(new.freight_class) END, CASE WHEN (new.ship_via = 'Any'::text) THEN NULL::text ELSE new.ship_via END); 7DROP RULE "_INSERT" ON api.freightpricingscheduleitem; apiadminfalse778218778778169077816217781531778160477877877877826182006067_INSERTRULE0CREATE RULE "_INSERT" AS ON INSERT TO glaccount DO INSTEAD INSERT INTO public.accnt (accnt_number, accnt_descrip, accnt_comments, accnt_profit, accnt_sub, accnt_type, accnt_extref, accnt_company, accnt_forwardupdate, accnt_subaccnttype_code) VALUES (COALESCE(new.account_number, ''::character varying), COALESCE(new.description, ''::text), COALESCE(new.notes, ''::text), new.profit_center, new.sub_account, CASE WHEN (new.type = 'Asset'::text) THEN 'A'::text WHEN (new.type = 'Liability'::text) THEN 'L'::text WHEN (new.type = 'Expense'::text) THEN 'E'::text WHEN (new.type = 'Revenue'::text) THEN 'R'::text WHEN (new.type = 'Equity'::text) THEN 'Q'::text ELSE NULL::text END, COALESCE(new.ext_reference, ''::text), new.company, COALESCE(new.forward_update_trial_balances, false), COALESCE(new.sub_type, ''::text)); &DROP RULE "_INSERT" ON api.glaccount; apiadminfalse77977977977977977977919977977977977977926182006076_INSERTRULElCREATE RULE "_INSERT" AS ON INSERT TO incident DO INSTEAD INSERT INTO public.incdt (incdt_number, incdt_crmacct_id, incdt_cntct_id, incdt_summary, incdt_descrip, incdt_item_id, incdt_status, incdt_assigned_username, incdt_incdtcat_id, incdt_incdtseverity_id, incdt_incdtpriority_id, incdt_incdtresolution_id, incdt_lotserial, incdt_ls_id) VALUES (new.incident_number, public.getcrmacctid(new.crm_account), public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), COALESCE(new.description, ''::text), COALESCE(new.notes, ''::text), public.getitemid(new.item_number), CASE WHEN (new.status = 'New'::text) THEN 'N'::text WHEN (new.status = 'Feedback'::text) THEN 'F'::text WHEN (new.status = 'Confirmed'::text) THEN 'C'::text WHEN (new.status = 'Assigned'::text) THEN 'A'::text WHEN (new.status = 'Resolved'::text) THEN 'R'::text WHEN (new.status = 'Closed'::text) THEN 'L'::text ELSE ''::text END, COALESCE(new.assigned_to, ''::text), public.getincdtcatid(new.category), public.getincdtseverityid(new.severity), public.getincdtpriorityid(new.priority), public.getincdtresolutionid(new.resolution), COALESCE(new.lot_serial_number, ''::text), public.getlotserialid(new.item_number, new.lot_serial_number)); %DROP RULE "_INSERT" ON api.incident; apiadminfalse78078078078078078078015411931155815401602780780780780156678078078078014711594154215478078078078078078078078078078026182006085_INSERTRULEECREATE RULE "_INSERT" AS ON INSERT TO incidentchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('INCDT'::text, public.getincidentid(new.incident_number), public.getcharid((new.characteristic)::text, 'INCDT'::text), new.value, false); )DROP RULE "_INSERT" ON api.incidentchar; apiadminfalse7811867817817811431154378126182006093_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO incidentcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text, comment_public) VALUES (COALESCE(new.date, now()), 'INCDT'::text, public.getincidentid(new.incident_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text, COALESCE(new.public, true)); ,DROP RULE "_INSERT" ON api.incidentcomment; apiadminfalse78278278278278215431574144978218878278226182006099_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO incidentfile DO INSTEAD INSERT INTO public.url (url_source_id, url_source, url_title, url_url) VALUES (public.getincidentid(new.incident_number), 'INCDT'::text, new.title, new.url); )DROP RULE "_INSERT" ON api.incidentfile; apiadminfalse783192154378378378378326182006106_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO incidentimage DO INSTEAD SELECT public.saveimageass('INCDT'::text, public.getincidentid(new.incident_number), 'M'::bpchar, public.getimageid(new.image_name)) AS saveimageass; *DROP RULE "_INSERT" ON api.incidentimage; apiadminfalse78478419327841537154378426182006115_INSERTRULEnCREATE RULE "_INSERT" AS ON INSERT TO invoice DO INSTEAD SELECT public.insertinvoice(new.*) AS insertinvoice; $DROP RULE "_INSERT" ON api.invoice; apiadminfalse785785785226226182006126_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO invoiceline DO INSTEAD SELECT public.insertinvoicelineitem(new.*) AS insertinvoicelineitem; (DROP RULE "_INSERT" ON api.invoiceline; apiadminfalse786786786226326182006134_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO item DO INSTEAD INSERT INTO public.item (item_number, item_active, item_descrip1, item_descrip2, item_type, item_maxcost, item_classcode_id, item_inv_uom_id, item_picklist, item_fractional, item_config, item_sold, item_prodcat_id, item_exclusive, item_listprice, item_listcost, item_price_uom_id, item_upccode, item_prodweight, item_packweight, item_comments, item_extdescrip) VALUES (upper((new.item_number)::text), COALESCE(new.active, true), COALESCE(new.description1, ''::text), COALESCE(new.description2, ''::text), CASE WHEN (new.item_type = 'Purchased'::text) THEN 'P'::text WHEN (new.item_type = 'Manufactured'::text) THEN 'M'::text WHEN (new.item_type = 'Job'::text) THEN 'J'::text WHEN (new.item_type = 'Kit'::text) THEN 'K'::text WHEN (new.item_type = 'Phantom'::text) THEN 'F'::text WHEN (new.item_type = 'Reference'::text) THEN 'R'::text WHEN (new.item_type = 'Costing'::text) THEN 'S'::text WHEN (new.item_type = 'Tooling'::text) THEN 'T'::text WHEN (new.item_type = 'Outside Process'::text) THEN 'O'::text WHEN (new.item_type = 'Planning'::text) THEN 'L'::text WHEN (new.item_type = 'Breeder'::text) THEN 'B'::text WHEN (new.item_type = 'Co-Product'::text) THEN 'C'::text WHEN (new.item_type = 'By-Product'::text) THEN 'Y'::text ELSE NULL::text END, COALESCE(new.maximum_desired_cost, (0)::numeric), public.getclasscodeid(new.class_code), public.getuomid(new.inventory_uom), COALESCE(new.pick_list_item, true), COALESCE(new.fractional, false), COALESCE(new.configured, false), COALESCE(new.item_is_sold, true), COALESCE(public.getprodcatid(new.product_category), (-1)), COALESCE(new.exclusive, false), COALESCE(new.list_price, (0)::numeric), COALESCE(new.list_cost, (0)::numeric), COALESCE(public.getuomid(new.list_price_uom), public.getuomid(new.inventory_uom)), new.upc_code, COALESCE(new.product_weight, (0)::numeric), COALESCE(new.packaging_weight, (0)::numeric), new.notes, new.ext_description); !DROP RULE "_INSERT" ON api.item; apiadminfalse78778778778778778778778778778778714387877871681650787787787158078778778778778778778778726182006143_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO itemalias DO INSTEAD INSERT INTO public.itemalias (itemalias_item_id, itemalias_number, itemalias_usedescrip, itemalias_descrip1, itemalias_descrip2, itemalias_comments) VALUES (public.getitemid((new.item_number)::text), new.alias_number, COALESCE(new.use_description, false), COALESCE(new.description1, ''::text), COALESCE(new.description2, ''::text), new.comments); &DROP RULE "_INSERT" ON api.itemalias; apiadminfalse788788788788160278822678878878826182006150_INSERTRULESCREATE RULE "_INSERT" AS ON INSERT TO itemchar DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value, charass_default) VALUES ('I'::text, public.getitemid((new.item_number)::text), public.getcharid((new.characteristic)::text, 'I'::text), new.value, COALESCE(new.is_default, false)); %DROP RULE "_INSERT" ON api.itemchar; apiadminfalse7891602789789789143178918678926182006157_INSERTRULEuCREATE RULE "_INSERT" AS ON INSERT TO itemcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'IS'::text, public.getitemid((new.item_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); (DROP RULE "_INSERT" ON api.itemcomment; apiadminfalse79079079079079018816021574144979079026182006165_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO itemcost DO INSTEAD SELECT public.insertitemcost(public.getitemid((new.item_number)::text), public.getcostelemid((new.costing_element)::text), public.getcurrid((new.currency)::text), new.actual_cost, new.post_to_standard) AS insertitemcost; %DROP RULE "_INSERT" ON api.itemcost; apiadminfalse791147216021654791791791791146679179126182006172_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO itemfile DO INSTEAD INSERT INTO public.url (url_source_id, url_source, url_title, url_url) VALUES (public.getitemid((new.item_number)::text), 'I'::text, new.title, new.url); %DROP RULE "_INSERT" ON api.itemfile; apiadminfalse792792792160219279279226182006179_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO itemimage DO INSTEAD SELECT public.saveimageass('I'::text, public.getitemid((new.item_number)::text), (CASE WHEN (new.purpose = 'Product Description'::text) THEN 'P'::text WHEN (new.purpose = 'Inventory Description'::text) THEN 'I'::text WHEN (new.purpose = 'Engineering Reference'::text) THEN 'E'::text WHEN (new.purpose = 'Miscellaneous'::text) THEN 'M'::text ELSE 'X'::text END)::bpchar, public.getimageid(new.image_name)) AS saveimageass; &DROP RULE "_INSERT" ON api.itemimage; apiadminfalse79315377931602193279379379326182006187_INSERTRULE CREATE RULE "_INSERT" AS ON INSERT TO itemsite DO INSTEAD INSERT INTO public.itemsite (itemsite_item_id, itemsite_warehous_id, itemsite_active, itemsite_dropship, itemsite_posupply, itemsite_createpr, itemsite_wosupply, itemsite_createwo, itemsite_createsopr, itemsite_createsopo, itemsite_sold, itemsite_soldranking, itemsite_costmethod, itemsite_controlmethod, itemsite_perishable, itemsite_plancode_id, itemsite_costcat_id, itemsite_loccntrl, itemsite_location_id, itemsite_location, itemsite_location_comments, itemsite_disallowblankwip, itemsite_stocked, itemsite_abcclass, itemsite_autoabcclass, itemsite_cyclecountfreq, itemsite_eventfence, itemsite_useparams, itemsite_reorderlevel, itemsite_ordertoqty, itemsite_minordqty, itemsite_maxordqty, itemsite_multordqty, itemsite_useparamsmanual, itemsite_ordergroup, itemsite_ordergroup_first, itemsite_mps_timefence, itemsite_leadtime, itemsite_safetystock, itemsite_supply_itemsite_id, itemsite_notes, itemsite_qtyonhand, itemsite_warrpurc, itemsite_autoreg, itemsite_freeze, itemsite_value, itemsite_planning_type) VALUES (public.getitemid((new.item_number)::text), public.getwarehousid((new.site)::text, 'ACTIVE'::text), COALESCE(new.active, true), COALESCE(new.dropship, false), COALESCE(new.po_supplied_at_site, false), COALESCE(new.create_prs, false), COALESCE(new.wo_supplied_at_site, false), COALESCE(new.create_wos, false), COALESCE(new.create_soprs, false), COALESCE(new.create_sopos, false), COALESCE(new.sold_from_site, true), COALESCE(new.ranking, 1), CASE WHEN (new.cost_method = 'None'::text) THEN 'N'::text WHEN (new.cost_method = 'Average'::text) THEN 'A'::text WHEN (new.cost_method = 'Standard'::text) THEN 'S'::text WHEN (new.cost_method = 'Job'::text) THEN 'J'::text ELSE NULL::text END, CASE WHEN (new.control_method = 'None'::text) THEN 'N'::text WHEN (new.control_method = 'Regular'::text) THEN 'R'::text WHEN (new.control_method = 'Serial #'::text) THEN 'S'::text WHEN (new.control_method = 'Lot #'::text) THEN 'L'::text ELSE NULL::text END, COALESCE(new.perishable, false), public.getplancodeid(new.planner_code), public.getcostcatid(new.cost_category), COALESCE(new.multiple_location_control, false), COALESCE(public.getlocationid((new.site)::text, new.location), (-1)), COALESCE(new.user_defined_location, ''::text), COALESCE(new.location_comment, ''::text), COALESCE(new.disallow_blank_wip_locations, false), COALESCE(new.stocked, false), COALESCE(new.abc_class, 'A'::bpchar), COALESCE(new.allow_automatic_updates, false), COALESCE(new.cycl_cnt_freq, 0), COALESCE((new.event_fence)::numeric, public.fetchmetricvalue('DefaultEventFence'::text)), COALESCE(new.enforce_order_parameters, false), COALESCE(new.reorder_level, (0)::numeric), COALESCE(new.order_up_to, (0)::numeric), COALESCE(new.minimum_order, (0)::numeric), COALESCE(new.maximum_order, (0)::numeric), COALESCE(new.order_multiple, (0)::numeric), COALESCE(new.enforce_on_manual_orders, false), COALESCE(new.group_mps_mrp_orders, 0), COALESCE(new.first_group, false), COALESCE(new.mps_time_fence, 0), COALESCE(new.lead_time, 0), COALESCE(new.safety_stock, (0)::numeric), CASE WHEN (new.supplied_from_site = 'None'::text) THEN NULL::integer WHEN (new.supplied_from_site = ''::text) THEN NULL::integer ELSE public.getitemsiteid(new.supplied_from_site, (new.item_number)::text) END, COALESCE(new.notes, ''::text), 0, COALESCE(new.require_warranty, false), COALESCE(new.auto_register, false), false, 0, CASE WHEN (new.planning_system = 'None'::text) THEN 'N'::text WHEN (new.planning_system = 'MPS'::text) THEN 'S'::text ELSE 'M'::text END); %DROP RULE "_INSERT" ON api.itemsite; apiadminfalse794794794794102379479479479479416979412131038794794160279479417087947947947947947947947947947947947947947947947947941565162179479479479479479479479479479479479479479479426182006197_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO itemsitecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'IS'::text, public.getitemsiteid((new.site)::text, (new.item_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); ,DROP RULE "_INSERT" ON api.itemsitecomment; apiadminfalse79515747951449102379579579579518879579526182006205_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO itemsource DO INSTEAD INSERT INTO public.itemsrc (itemsrc_item_id, itemsrc_vend_id, itemsrc_vend_item_number, itemsrc_vend_item_descrip, itemsrc_comments, itemsrc_vend_uom, itemsrc_invvendoruomratio, itemsrc_minordqty, itemsrc_multordqty, itemsrc_leadtime, itemsrc_ranking, itemsrc_active, itemsrc_default, itemsrc_manuf_name, itemsrc_manuf_item_number, itemsrc_manuf_item_descrip, itemsrc_upccode, itemsrc_contrct_id, itemsrc_effective, itemsrc_expires) VALUES (public.getitemid((new.item_number)::text), public.getvendid((new.vendor)::text), new.vendor_item_number, COALESCE(new.vendor_description, ''::text), COALESCE(new.notes, ''::text), new.vendor_uom, new.inventory_vendor_uom_ratio, new.minimum_order, new.order_multiple, new.lead_time, new.vendor_ranking, COALESCE(new.active, true), COALESCE(new.itemsrc_default, true), COALESCE(new.manufacturer_name, ''::text), COALESCE(new.manufacturer_item_number, ''::text), new.manufacturer_description, new.bar_code, public.getcontrctid(new.contract_number), COALESCE(public.getcontrcteffective(new.contract_number), new.effective_date), COALESCE(public.getcontrctexpires(new.contract_number), new.expires_date)); 'DROP RULE "_INSERT" ON api.itemsource; apiadminfalse7967967967967967961457796796232796796796796796796160279614597967961619145879679679679679626182006215_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO itemsourceprice DO INSTEAD INSERT INTO public.itemsrcp (itemsrcp_itemsrc_id, itemsrcp_qtybreak, itemsrcp_price, itemsrcp_curr_id, itemsrcp_updated, itemsrcp_dropship, itemsrcp_warehous_id, itemsrcp_type, itemsrcp_discntprcnt, itemsrcp_fixedamtdiscount) VALUES (public.getitemsrcid((new.item_number)::text, (new.vendor)::text), new.qty_break, new.price_per_unit, public.getcurrid((new.currency)::text), now(), COALESCE(new.dropship_only, false), CASE WHEN (new.pricing_site = 'All'::text) THEN (-1) ELSE COALESCE(public.getwarehousid(new.pricing_site, 'ALL'::text), (-1)) END, CASE WHEN (new.pricing_type = 'Discount'::text) THEN 'D'::text ELSE 'N'::text END, (COALESCE(new.discount_percent, 0.0) / 100.0), new.discount_fixed_amount); ,DROP RULE "_INSERT" ON api.itemsourceprice; apiadminfalse79779779779779779779779779779714721621797156223379726182006224_INSERTRULEdCREATE RULE "_INSERT" AS ON INSERT TO itemsubstitute DO INSTEAD INSERT INTO public.itemsub (itemsub_parent_item_id, itemsub_sub_item_id, itemsub_uomratio, itemsub_rank) VALUES (public.getitemid((new.root_item_number)::text), public.getitemid((new.substitute_item_number)::text), COALESCE(new.sub_parent_uom_ratio, (1)::numeric), COALESCE(new.ranking, 1)); +DROP RULE "_INSERT" ON api.itemsubstitute; apiadminfalse7987982347987987987981602 26182006231_INSERTRULE_CREATE RULE "_INSERT" AS ON INSERT TO itemtaxtype DO INSTEAD INSERT INTO public.itemtax (itemtax_item_id, itemtax_taxzone_id, itemtax_taxtype_id) VALUES (public.getitemid((new.item_number)::text), CASE WHEN ((new.tax_zone)::text = 'Any'::text) THEN NULL::integer ELSE public.gettaxzoneid((new.tax_zone)::text) END, public.gettaxtypeid(new.tax_type)); (DROP RULE "_INSERT" ON api.itemtaxtype; apiadminfalse79979979979916121602161123579926182006238_INSERTRULErCREATE RULE "_INSERT" AS ON INSERT TO itemuomconversion DO INSTEAD SELECT public.saveitemuomconv(public.getitemid((new.item_number)::text), COALESCE(public.getuomid((new.uom)::text), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid((new.item_number)::text)))), COALESCE(new.uom_value, (1)::numeric), COALESCE(public.getuomid(new.per_uom), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid((new.item_number)::text)))), COALESCE(new.per_uom_value, (1)::numeric), COALESCE(new.fractional, false), public.getuomtypeid(new.selected_types)) AS saveitemuomconv; .DROP RULE "_INSERT" ON api.itemuomconversion; apiadminfalse800160219358008008008008001688008001650168161580026182006246_INSERTRULEXCREATE RULE "_INSERT" AS ON INSERT TO journalentry DO INSTEAD SELECT public.insertgltransaction('G/L'::text, 'JE'::text, new.doc_number, new.notes, public.getglaccntid(new.credit), public.getglaccntid(new.debit), (-1), public.currtobase(public.getcurrid((new.currency)::text), new.amount, new.dist_date), new.dist_date) AS insertgltransaction; )DROP RULE "_INSERT" ON api.journalentry; apiadminfalse801801165180180180180180180180114721354153526182006254_INSERTRULE|CREATE RULE "_INSERT" AS ON INSERT TO location DO INSTEAD INSERT INTO public.location (location_warehous_id, location_name, location_descrip, location_restrict, location_netable, location_whsezone_id, location_aisle, location_rack, location_bin) VALUES (public.getwarehousid((new.site)::text, 'ACTIVE'::text), COALESCE(new.location, ''::character varying), COALESCE(new.description, ''::text), COALESCE(new.restricted, false), COALESCE(new.netable, true), public.getwhsezoneid((new.site)::text, new.zone), COALESCE(new.aisle, ''::character varying), COALESCE(new.rack, ''::character varying), COALESCE(new.bin, ''::character varying)); %DROP RULE "_INSERT" ON api.location; apiadminfalse8028028028021621802802802802230172980280280226182006261_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO misccounttag DO INSTEAD SELECT public.postmisccount(public.getitemsiteid(COALESCE(new.site, (SELECT whsinfo.warehous_code FROM public.usrpref, public.whsinfo WHERE (((usrpref.usrpref_username = public.geteffectivextuser()) AND (usrpref.usrpref_name = 'PreferredWarehouse'::text)) AND (whsinfo.warehous_id = (usrpref.usrpref_value)::integer)))), new.item_number), new.quantity, new.comment) AS postmisccount; )DROP RULE "_INSERT" ON api.misccounttag; apiadminfalse80365980380380365980365917217210231574179080326182006269_INSERTRULEqCREATE RULE "_INSERT" AS ON INSERT TO pricingschedule DO INSTEAD INSERT INTO public.ipshead (ipshead_id, ipshead_name, ipshead_descrip, ipshead_effective, ipshead_expires, ipshead_curr_id, ipshead_updated) VALUES (nextval('public.ipshead_ipshead_id_seq'::regclass), new.name, new.description, CASE WHEN (new.effective = 'Always'::text) THEN '1970-01-01'::date ELSE (COALESCE(new.effective, '1970-01-01'::text))::date END, CASE WHEN (new.expires = 'Never'::text) THEN '2100-01-01'::date ELSE (COALESCE(new.expires, '2100-01-01'::text))::date END, COALESCE(public.getcurrid((new.currency)::text), public.basecurrid()), now()); ,DROP RULE "_INSERT" ON api.pricingschedule; apiadminfalse80447980414728048048048048042191014"26182006278_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO pricingscheduleassign DO INSTEAD INSERT INTO public.ipsass (ipsass_ipshead_id, ipsass_cust_id, ipsass_custtype_id, ipsass_custtype_pattern, ipsass_shipto_id, ipsass_shipto_pattern) VALUES (public.getipsheadid((new.pricing_schedule)::text), CASE WHEN ((new.customer_number)::text = 'Any'::text) THEN (-1) ELSE public.getcustid((new.customer_number)::text) END, CASE WHEN ((new.customer_type)::text = 'N/A'::text) THEN (-1) ELSE public.getcusttypeid((new.customer_type)::text) END, new.customer_type_pattern, CASE WHEN (((new.customer_number)::text = 'Any'::text) OR ((new.customer_shipto)::text = 'Any'::text)) THEN (-1) ELSE public.getshiptoid((new.customer_number)::text, (new.customer_shipto)::text) END, new.customer_shipto_pattern); 2DROP RULE "_INSERT" ON api.pricingscheduleassign; apiadminfalse8058052398051216805166480515991690805805805&26182006287_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO pricingscheduleitem DO INSTEAD SELECT CASE WHEN ((new.type)::text = 'Item'::text) THEN public.saveipsitem(NULL::integer, public.getipsheadid((new.pricing_schedule)::text), public.getitemid((new.item_number)::text), COALESCE(new.qty_break, (0)::numeric), COALESCE(new.price, (0)::numeric), public.getuomid((new.qty_uom)::text), public.getuomid((new.price_uom)::text), new.percent, new.fixedamt, CASE new.pricing_type WHEN 'Nominal'::text THEN 'N'::text WHEN 'Discount'::text THEN 'D'::text WHEN 'Markup'::text THEN 'M'::text ELSE '?'::text END) WHEN ((new.type)::text = 'Product Category'::text) THEN public.saveipsprodcat(NULL::integer, public.getipsheadid((new.pricing_schedule)::text), public.getprodcatid((new.product_category)::text), new.qty_break, new.percent, new.fixedamt, CASE new.pricing_type WHEN 'Nominal'::text THEN 'N'::text WHEN 'Discount'::text THEN 'D'::text WHEN 'Markup'::text THEN 'M'::text ELSE '?'::text END) ELSE NULL::integer END AS "case"; 0DROP RULE "_INSERT" ON api.pricingscheduleitem; apiadminfalse806806165080680680616021690806806158019561934806806806806806806*26182006297_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO pricingscheduleitemchar DO INSTEAD INSERT INTO public.ipsitemchar (ipsitemchar_ipsitem_id, ipsitemchar_char_id, ipsitemchar_value, ipsitemchar_price) VALUES (public.getipsitemid((new.pricing_schedule)::text, (new.item_number)::text, new.qty_break, (new.qty_uom)::text, (new.price_uom)::text), public.getcharid((new.characteristic)::text, 'I'::text), new.value, COALESCE(new.price, (0)::numeric)); 4DROP RULE "_INSERT" ON api.pricingscheduleitemchar; apiadminfalse80780780780780780715468072421431807807807.26182006304_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO project DO INSTEAD INSERT INTO public.prj (prj_number, prj_name, prj_descrip, prj_owner_username, prj_username, prj_so, prj_wo, prj_po, prj_status, prj_due_date, prj_assigned_date, prj_start_date, prj_completed_date) VALUES (new.number, COALESCE(new.name, ''::text), COALESCE(new.description, ''::text), COALESCE(new.owner, public.geteffectivextuser()), COALESCE(new.assigned_to, public.geteffectivextuser()), COALESCE(new.sales_orders, true), COALESCE(new.work_orders, true), COALESCE(new.purchase_orders, true), CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, new.due, new.assigned, new.started, new.completed); $DROP RULE "_INSERT" ON api.project; apiadminfalse8088081574808174808808808808808808808808808808808808226182006311_INSERTRULEyCREATE RULE "_INSERT" AS ON INSERT TO projectcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'J'::text, public.getprjid((new.project_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); +DROP RULE "_INSERT" ON api.projectcomment; apiadminfalse809809809809157480980918880915781449626182006319_INSERTRULEICREATE RULE "_INSERT" AS ON INSERT TO prospect DO INSTEAD INSERT INTO public.prospect (prospect_number, prospect_name, prospect_active, prospect_cntct_id, prospect_taxzone_id, prospect_salesrep_id, prospect_warehous_id, prospect_comments) VALUES (upper((new.prospect_number)::text), COALESCE(new.prospect_name, ''::text), COALESCE(new.active, true), public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.contact_address_number), new.contact_address_number, new.contact_address1, new.contact_address2, new.contact_address3, new.contact_city, new.contact_state, new.contact_postalcode, new.contact_country, new.contact_address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), public.gettaxzoneid(new.default_tax_zone), public.getsalesrepid(new.sales_rep), public.getwarehousid(new.site_code, 'ACTIVE'::text), COALESCE(new.notes, ''::text)); %DROP RULE "_INSERT" ON api.prospect; apiadminfalse8108108108108108108108108108108101612193181081019241392155816211590810244810810810810810810810810810810810810810810810810810:26182006329_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO purchaseline DO INSTEAD INSERT INTO public.poitem (poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_qty_ordered, poitem_unitprice, poitem_vend_item_number, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_comments, poitem_expcat_id, poitem_freight, poitem_prj_id, poitem_bom_rev_id, poitem_boo_rev_id) VALUES (public.getpoheadid((new.order_number)::text), new.line_number, new.due_date, public.getitemsiteid(COALESCE(new.site, (SELECT whsinfo.warehous_code FROM (public.pohead JOIN public.whsinfo ON ((whsinfo.warehous_id = pohead.pohead_warehous_id))) WHERE (pohead.pohead_id = public.getpoheadid((new.order_number)::text))), (SELECT whsinfo.warehous_code FROM public.whsinfo WHERE (whsinfo.warehous_id = public.fetchprefwarehousid()))), new.item_number), new.vendor_description, new.qty_ordered, new.unit_price, new.vend_item_number, new.manufacturer_name, new.manufacturer_item_number, new.manufacturer_description, new.notes, public.getexpcatid(new.expense_category), new.freight, public.getprjid(new.project_number), public.getrevid('BOM'::text, new.item_number, new.bill_of_materials_revision), public.getrevid('BOO'::text, new.item_number, new.bill_of_operations_revision)); )DROP RULE "_INSERT" ON api.purchaseline; apiadminfalse811157610231050157881115848118111781721788111798118118118118118118118118118118111728118118118111519?26182006341_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO purchaselinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('PI'::text, poitem.poitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.pohead, public.poitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((pohead.pohead_number = (new.order_number)::text) AND (pohead.pohead_id = poitem.poitem_pohead_id)) AND (poitem.poitem_linenumber = new.line_number)) AND (poitem.poitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = new.characteristic)); -DROP RULE "_INSERT" ON api.purchaselinechar; apiadminfalse8121791691681798121851781691791798128121868121369178812186185186C26182006351_INSERTRULEsCREATE RULE "_INSERT" AS ON INSERT TO purchaselinecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) SELECT COALESCE(new.date, (('now'::text)::date)::timestamp with time zone) AS "coalesce", 'PI', poitem.poitem_id, COALESCE(new.username, public.geteffectivextuser()) AS "coalesce", public.getcmnttypeid(new.type) AS getcmnttypeid, new.text FROM public.poitem, public.pohead WHERE (((pohead.pohead_number = (new.order_number)::text) AND (poitem.poitem_pohead_id = pohead.pohead_id)) AND (poitem.poitem_linenumber = new.line_number)); 0DROP RULE "_INSERT" ON api.purchaselinecomment; apiadminfalse81381381381317917817917815741449813813188813813179G26182006360_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO purchaseorder DO INSTEAD INSERT INTO public.pohead (pohead_number, pohead_orderdate, pohead_status, pohead_terms_id, pohead_taxzone_id, pohead_warehous_id, pohead_agent_username, pohead_vend_id, pohead_vendaddr_id, pohead_fob, pohead_shipvia, pohead_curr_id, pohead_freight, pohead_comments, pohead_dropship, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry, pohead_cohead_id) SELECT new.order_number, COALESCE(new.order_date, ('now'::text)::date) AS "coalesce", 'U', COALESCE(public.gettermsid(new.terms), vendinfo.vend_terms_id) AS "coalesce", COALESCE(public.gettaxzoneid(new.tax_zone), vendinfo.vend_taxzone_id) AS "coalesce", COALESCE(public.getwarehousid(new.receiving_site, 'ALL'::text), public.fetchprefwarehousid()) AS "coalesce", COALESCE(new.purchasing_agent, public.geteffectivextuser()) AS "coalesce", public.getvendid(new.vendor_number) AS getvendid, CASE WHEN (new.alt_address = 'MAIN'::text) THEN NULL::integer ELSE public.getvendaddrid(new.vendor_number, new.alt_address) END AS getvendaddrid, COALESCE(new.fob, CASE WHEN (vendinfo.vend_fobsource = 'W'::bpchar) THEN (SELECT whsinfo.warehous_fob FROM public.whsinfo WHERE (whsinfo.warehous_id = COALESCE(public.getwarehousid(new.receiving_site, 'ALL'::text), public.fetchprefwarehousid()))) ELSE vendinfo.vend_fob END) AS "coalesce", COALESCE(new.ship_via, vendinfo.vend_shipvia) AS "coalesce", COALESCE(public.getcurrid((new.currency)::text), vendinfo.vend_curr_id) AS "coalesce", COALESCE(new.freight, (0)::numeric) AS "coalesce", new.notes, COALESCE(new.dropship, false) AS "coalesce", public.getcntctid(new.vend_contact_number) AS getcntctid, COALESCE(new.vend_cntct_honorific, ''::text) AS "coalesce", COALESCE(new.vend_cntct_first_name, ''::text) AS "coalesce", COALESCE(new.vend_cntct_middle, ''::text) AS "coalesce", COALESCE(new.vend_cntct_last_name, ''::text) AS "coalesce", COALESCE(new.vend_cntct_suffix, ''::text) AS "coalesce", COALESCE(new.vend_cntct_phone, ''::text) AS "coalesce", COALESCE(new.vend_cntct_title, ''::text) AS "coalesce", COALESCE(new.vend_cntct_fax, ''::text) AS "coalesce", COALESCE(new.vend_cntct_email, ''::text) AS "coalesce", COALESCE(new.vendaddress1, ''::text) AS "coalesce", COALESCE(new.vendaddress2, ''::text) AS "coalesce", COALESCE(new.vendaddress3, ''::text) AS "coalesce", COALESCE(new.vendcity, ''::text) AS "coalesce", COALESCE(new.vendstate, ''::text) AS "coalesce", COALESCE(new.vendzipcode, ''::text) AS "coalesce", COALESCE(new.vendcountry, ''::text) AS "coalesce", public.getcntctid(new.shipto_contact_number) AS getcntctid, COALESCE(new.shipto_cntct_honorific, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_first_name, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_middle, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_last_name, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_suffix, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_phone, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_title, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_fax, ''::text) AS "coalesce", COALESCE(new.shipto_cntct_email, ''::text) AS "coalesce", public.getaddrid(new.shiptoaddress_number) AS getaddrid, COALESCE(new.shiptoaddress1, ''::text) AS "coalesce", COALESCE(new.shiptoaddress2, ''::text) AS "coalesce", COALESCE(new.shiptoaddress3, ''::text) AS "coalesce", COALESCE(new.shiptocity, ''::text) AS "coalesce", COALESCE(new.shiptostate, ''::text) AS "coalesce", COALESCE(new.shiptozipcode, ''::text) AS "coalesce", COALESCE(new.shiptocountry, ''::text) AS "coalesce", public.getcoheadid(new.sales_order_number) AS getcoheadid FROM public.vendinfo WHERE (vendinfo.vend_id = public.getvendid(new.vendor_number)); *DROP RULE "_INSERT" ON api.purchaseorder; apiadminfalse81417215815741581050139214721721612814155814568148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148148141788148141581581619161815815815816218148148148141613814814K26182006369_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO purchaseordercomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'P'::text, public.getpoheadid((new.order_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); 1DROP RULE "_INSERT" ON api.purchaseordercomment; apiadminfalse815815815815188815157415768151449815O26182006377_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO quote DO INSTEAD INSERT INTO public.quhead (quhead_number, quhead_cust_id, quhead_custponumber, quhead_quotedate, quhead_warehous_id, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_salesrep_id, quhead_terms_id, quhead_fob, quhead_shipvia, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_freight, quhead_misc, quhead_ordercomments, quhead_shipcomments, quhead_shiptophone, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_misc_accnt_id, quhead_misc_descrip, quhead_commission, quhead_packdate, quhead_prj_id, quhead_billtocountry, quhead_shiptocountry, quhead_curr_id, quhead_taxzone_id, quhead_taxtype_id, quhead_imported, quhead_expire, quhead_status, quhead_saletype_id, quhead_shipzone_id) VALUES (new.quote_number, public.getcustid(new.customer_number, true), new.cust_po_number, new.quote_date, public.getwarehousid(new.site, 'SHIPPING'::text), public.getshiptoid(new.customer_number, new.shipto_number), new.shipto_name, new.shipto_address1, new.shipto_address2, new.shipto_address3, public.getsalesrepid(new.sales_rep), public.gettermsid(new.terms), new.fob, new.ship_via, new.shipto_city, new.shipto_state, new.shipto_postal_code, new.freight, new.misc_charge, new.order_notes, new.shipping_notes, new.shipto_phone, new.billto_name, new.billto_address1, new.billto_address2, new.billto_address3, new.billto_city, new.billto_state, new.billto_postal_code, public.getglaccntid(new.misc_account_number), new.misc_charge_description, new.commission, new.pack_date, public.getprjid(new.project_number), new.billto_country, new.shipto_country, public.getcurrid((new.currency)::text), public.gettaxzoneid(new.tax_zone), public.gettaxtypeid(new.tax_type), true, new.expire_date, CASE WHEN (new.status = 'Converted'::text) THEN 'C'::text ELSE 'O'::text END, public.getsaletypeid(new.sale_type), public.getshipzoneid(new.shipto_shipzone)); "DROP RULE "_INSERT" ON api.quote; apiadminfalse816147781681681681681681681681681681681681681681681681681681681681681681681681615788168168168168168168161604249816816159116131612162115901599816816816161181681681681681681615351472816816S26182006386_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO quotecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'Q'::text, public.getquoteid(new.quote_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); )DROP RULE "_INSERT" ON api.quotecomment; apiadminfalse817144981718881781715828171574817817W26182006394_INSERTRULE CREATE RULE "_INSERT" AS ON INSERT TO quoteline DO INSTEAD INSERT INTO public.quitem (quitem_quhead_id, quitem_linenumber, quitem_itemsite_id, quitem_scheddate, quitem_qtyord, quitem_unitcost, quitem_price, quitem_custprice, quitem_memo, quitem_imported, quitem_custpn, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_taxtype_id, quitem_qty_uom_id, quitem_qty_invuomratio, quitem_price_uom_id, quitem_price_invuomratio) SELECT public.getquoteid(new.quote_number) AS getquoteid, COALESCE(new.line_number, (SELECT (COALESCE(max(quitem.quitem_linenumber), 0) + 1) FROM public.quitem WHERE (quitem.quitem_quhead_id = public.getquoteid(new.quote_number)))) AS "coalesce", itemsite.itemsite_id, COALESCE(new.scheduled_date, (SELECT min(quitem.quitem_scheddate) AS min FROM public.quitem WHERE (quitem.quitem_quhead_id = public.getquoteid(new.quote_number)))) AS "coalesce", new.qty_ordered, public.stdcost(item.item_id) AS stdcost, COALESCE(new.net_unit_price, public.itemprice(public.getitemid(new.item_number), quhead.quhead_cust_id, quhead.quhead_shipto_id, new.qty_ordered, quhead.quhead_curr_id, quhead.quhead_quotedate)) AS "coalesce", public.itemprice(public.getitemid(new.item_number), quhead.quhead_cust_id, quhead.quhead_shipto_id, new.qty_ordered, quhead.quhead_curr_id, quhead.quhead_quotedate) AS itemprice, COALESCE(new.notes, ''::text) AS "coalesce", true AS bool, new.customer_pn, COALESCE(new.create_order, false) AS "coalesce", COALESCE(public.getwarehousid(new.supplying_site, 'SHIPPING'::text), itemsite.itemsite_warehous_id) AS "coalesce", public.getitemid(new.item_number) AS getitemid, COALESCE(new.overwrite_po_price, (0)::numeric) AS "coalesce", COALESCE(public.gettaxtypeid(new.tax_type), public.getitemtaxtype(itemsite.itemsite_item_id, quhead.quhead_taxzone_id)) AS "coalesce", COALESCE(public.getuomid(new.qty_uom), item.item_inv_uom_id) AS "coalesce", public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.qty_uom), item.item_inv_uom_id), item.item_inv_uom_id) AS itemuomtouomratio, COALESCE(public.getuomid(new.price_uom), item.item_price_uom_id) AS "coalesce", public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.price_uom), item.item_price_uom_id), item.item_price_uom_id) AS itemuomtouomratio FROM public.quhead, public.itemsite, public.item, public.whsinfo WHERE ((quhead.quhead_number = new.quote_number) AND (((((((itemsite.itemsite_warehous_id = whsinfo.warehous_id) AND (itemsite.itemsite_item_id = item.item_id)) AND itemsite.itemsite_active) AND (item.item_number = new.item_number)) AND whsinfo.warehous_active) AND whsinfo.warehous_shipping) AND (whsinfo.warehous_code = COALESCE(new.sold_from_site, (SELECT whsinfo.warehous_code FROM public.usrpref, public.whsinfo WHERE (((usrpref.usrpref_username = public.geteffectivextuser()) AND (usrpref.usrpref_name = 'PreferredWarehouse'::text)) AND (whsinfo.warehous_id = (usrpref.usrpref_value)::integer))))))); &DROP RULE "_INSERT" ON api.quoteline; apiadminfalse8181602168169249249172168168181716817281825081865981881881881881881881816981815742491650818161115821563162113141704169172172169249659249250250249818659818818818818[26182006404_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO quotelinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('QI'::text, quitem.quitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.quhead, public.quitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((quhead.quhead_number = new.quote_number) AND (quhead.quhead_id = quitem.quitem_quhead_id)) AND (quitem.quitem_linenumber = new.line_number)) AND (quitem.quitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = new.characteristic)); *DROP RULE "_INSERT" ON api.quotelinechar; apiadminfalse8198191861862508192501858192491692501688192508191369169186185249_26182006414_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO quotelinecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'QI'::text, public.getquotelineitemid(new.quote_number, new.line_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -DROP RULE "_INSERT" ON api.quotelinecomment; apiadminfalse820144982082018815838208201574820820820c26182006422_INSERTRULExCREATE RULE "_INSERT" AS ON INSERT TO salescredit DO INSTEAD INSERT INTO public.aropenalloc (aropenalloc_aropen_id, aropenalloc_doctype, aropenalloc_doc_id, aropenalloc_amount, aropenalloc_curr_id) VALUES (public.getaropenid(new.customer_number, 'C'::bpchar, new.cm_number), 'S'::bpchar, public.getcoheadid(new.so_number), new.amount, public.getcurrid((new.currency)::text)); (DROP RULE "_INSERT" ON api.salescredit; apiadminfalse821139482114721456821821821821251821e26182006428_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO saleshistory DO INSTEAD INSERT INTO public.cohist (cohist_cust_id, cohist_itemsite_id, cohist_shipdate, cohist_shipvia, cohist_ordernumber, cohist_orderdate, cohist_invcnumber, cohist_invcdate, cohist_qtyshipped, cohist_unitprice, cohist_shipto_id, cohist_salesrep_id, cohist_duedate, cohist_imported, cohist_billtoname, cohist_billtoaddress1, cohist_billtoaddress2, cohist_billtoaddress3, cohist_billtocity, cohist_billtostate, cohist_billtozip, cohist_shiptoname, cohist_shiptoaddress1, cohist_shiptoaddress2, cohist_shiptoaddress3, cohist_shiptocity, cohist_shiptostate, cohist_shiptozip, cohist_commission, cohist_commissionpaid, cohist_unitcost, cohist_misc_type, cohist_misc_descrip, cohist_misc_id, cohist_doctype, cohist_promisedate, cohist_ponumber, cohist_curr_id, cohist_sequence, cohist_taxzone_id, cohist_taxtype_id) VALUES (public.getcustid(new.customer_number), public.getitemsiteid(new.site_code, new.item_number), new.ship_date, new.ship_via, new.order_number, new.order_date, new.invoice_number, new.invoice_date, new.quantity_shipped, COALESCE(new.unit_price, (0)::numeric), public.getshiptoid(new.customer_number, new.shipto_number), public.getsalesrepid(new.sales_rep), new.due_date, true, new.billto_name, new.billto_address1, new.billto_address2, new.billto_address3, new.billto_city, new.billto_state, new.billto_zip, new.shipto_name, new.shipto_address1, new.shipto_address2, new.shipto_address3, new.shipto_city, new.shipto_state, new.shipto_zip, COALESCE(new.commission, (0)::numeric), COALESCE(new.commission_paid, false), COALESCE(new.unit_cost, (0)::numeric), CASE WHEN (new.misc_type = 'Misc. Charge'::text) THEN 'M'::text WHEN (new.misc_type = 'Freight'::text) THEN 'F'::text ELSE NULL::text END, new.misc_description, CASE WHEN (new.misc_type = 'Misc. Charge'::text) THEN public.getglaccntid(new.misc_info) ELSE NULL::integer END, CASE WHEN (new.document_type = 'Invoice'::text) THEN 'I'::text WHEN (new.document_type = 'Credit Memo'::text) THEN 'C'::text ELSE NULL::text END, new.promise_date, new.purchase_order_number, COALESCE(public.getcurrid((new.currency)::text), public.basecurrid()), new.gl_sequence, public.gettaxzoneid(new.tax_zone), public.gettaxtypeid(new.tax_type)); )DROP RULE "_INSERT" ON api.saleshistory; apiadminfalse822822822822822822822822822822822822822822161182282282282282282282282282282282282282282282282282216121590159910238228221472252101482215358228228228228228221664822822822i26182006439_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO saleslinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('SI'::text, coitem.coitem_id, charass.charass_char_id, new.value, public.itemcharprice(item.item_id, "char".char_id, new.value, cohead.cohead_cust_id, cohead.cohead_shipto_id, coitem.coitem_qtyord, cohead.cohead_curr_id, cohead.cohead_orderdate)) AS updatecharassignment FROM public.cohead, public.coitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((cohead.cohead_number = (new.order_number)::text) AND (cohead.cohead_id = coitem.coitem_cohead_id)) AND (coitem.coitem_id = public.getcoitemid((new.order_number)::text, new.line_number))) AND (coitem.coitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = new.characteristic)); *DROP RULE "_INSERT" ON api.saleslinechar; apiadminfalse823168176176186823146516917616917617617618517717717718518618682382317716942043823823m26182006449_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO saleslinecomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'SI'::text, public.getcoitemid((new.order_number)::text, new.line_number), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); -DROP RULE "_INSERT" ON api.saleslinecomment; apiadminfalse824188144982482415748241465824824824824q26182006457_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO salesorder DO INSTEAD INSERT INTO public.cohead (cohead_number, cohead_cust_id, cohead_custponumber, cohead_orderdate, cohead_warehous_id, cohead_shipto_id, cohead_shiptoname, cohead_shiptoaddress1, cohead_shiptoaddress2, cohead_shiptoaddress3, cohead_salesrep_id, cohead_terms_id, cohead_fob, cohead_shipvia, cohead_shiptocity, cohead_shiptostate, cohead_shiptozipcode, cohead_freight, cohead_calcfreight, cohead_misc, cohead_imported, cohead_ordercomments, cohead_shipcomments, cohead_shiptophone, cohead_shipchrg_id, cohead_shipform_id, cohead_billtoname, cohead_billtoaddress1, cohead_billtoaddress2, cohead_billtoaddress3, cohead_billtocity, cohead_billtostate, cohead_billtozipcode, cohead_misc_accnt_id, cohead_misc_descrip, cohead_commission, cohead_holdtype, cohead_packdate, cohead_prj_id, cohead_shipcomplete, cohead_billtocountry, cohead_shiptocountry, cohead_curr_id, cohead_taxzone_id, cohead_shipto_cntct_id, cohead_shipto_cntct_honorific, cohead_shipto_cntct_first_name, cohead_shipto_cntct_middle, cohead_shipto_cntct_last_name, cohead_shipto_cntct_suffix, cohead_shipto_cntct_phone, cohead_shipto_cntct_title, cohead_shipto_cntct_fax, cohead_shipto_cntct_email, cohead_billto_cntct_id, cohead_billto_cntct_honorific, cohead_billto_cntct_first_name, cohead_billto_cntct_middle, cohead_billto_cntct_last_name, cohead_billto_cntct_suffix, cohead_billto_cntct_phone, cohead_billto_cntct_title, cohead_billto_cntct_fax, cohead_billto_cntct_email, cohead_saletype_id, cohead_shipzone_id) SELECT new.order_number, public.getcustid(new.customer_number) AS getcustid, new.cust_po_number, new.order_date, public.getwarehousid(new.site, 'SHIPPING'::text) AS getwarehousid, public.getshiptoid(new.customer_number, new.shipto_number) AS getshiptoid, new.shipto_name, new.shipto_address1, new.shipto_address2, new.shipto_address3, public.getsalesrepid(new.sales_rep) AS getsalesrepid, public.gettermsid(new.terms) AS gettermsid, new.fob, new.ship_via, new.shipto_city, new.shipto_state, new.shipto_postal_code, CASE WHEN COALESCE(new.calculate_freight, public.fetchmetricbool('CalculateFreight'::text)) THEN (0)::numeric ELSE new.freight END AS freight, COALESCE(new.calculate_freight, public.fetchmetricbool('CalculateFreight'::text)) AS "coalesce", new.misc_charge, true AS bool, new.order_notes, new.shipping_notes, new.shipto_phone, public.getshipchrgid(new.shipping_chgs) AS getshipchrgid, public.getshipformid(new.shipping_form) AS getshipformid, new.billto_name, new.billto_address1, new.billto_address2, new.billto_address3, new.billto_city, new.billto_state, new.billto_postal_code, public.getglaccntid(new.misc_account_number) AS getglaccntid, new.misc_charge_description, new.commission, CASE WHEN (new.hold_type = 'Credit'::text) THEN 'C'::text WHEN (new.hold_type = 'Shipping'::text) THEN 'S'::text WHEN (new.hold_type = 'Packing'::text) THEN 'P'::text ELSE 'N'::text END AS "case", new.pack_date, public.getprjid(new.project_number) AS getprjid, new.ship_complete, new.billto_country, new.shipto_country, public.getcurrid((new.currency)::text) AS getcurrid, CASE WHEN (new.tax_zone = 'None'::text) THEN (-1) ELSE public.gettaxzoneid(new.tax_zone) END AS gettaxzoneid, public.getcntctid(new.shipto_contact_number) AS getcntctid, new.shipto_contact_honorific, new.shipto_contact_first, new.shipto_contact_middle, new.shipto_contact_last, new.shipto_contact_suffix, new.shipto_contact_phone, new.shipto_contact_title, new.shipto_contact_fax, new.shipto_contact_email, public.getcntctid(new.billto_contact_number) AS getcntctid, new.billto_contact_name, new.billto_contact_first, new.billto_contact_middle, new.billto_contact_last, new.billto_contact_suffix, new.billto_contact_phone, new.billto_contact_title, new.billto_contct_fax, new.billto_contact_email, public.getsaletypeid(new.sale_type) AS getsaletypeid, public.getshipzoneid(new.shipto_shipzone) AS getshipzoneid FROM public.custinfo WHERE (custinfo.cust_number = new.customer_number); 'DROP RULE "_INSERT" ON api.salesorder; apiadminfalse825825825825825825825825825825825825825825825825825825825825825825825176825160825159114721613159782582582582582582582515908258258258251664161216048258251558825103282582582582515351599825825825825825825825825825825825825825162182582582582515968251578825825825825825825u26182006466_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO salesordercomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, (('now'::text)::date)::timestamp with time zone), 'S'::text, public.getsalesorderid((new.order_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); .DROP RULE "_INSERT" ON api.salesordercomment; apiadminfalse826157482682682615898261449826826188y26182006474_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO salesrep DO INSTEAD INSERT INTO public.salesrep (salesrep_active, salesrep_number, salesrep_name, salesrep_commission, salesrep_method, salesrep_emp_id) VALUES (COALESCE(new.active, true), COALESCE(new.number, ''::character varying), COALESCE(new.name, ''::text), COALESCE((new.commission_percent * 0.01), (0)::numeric), ''::bpchar, public.getempid(new.employee)); %DROP RULE "_INSERT" ON api.salesrep; apiadminfalse8278278271518163827827827827}26182006482_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO site DO INSTEAD INSERT INTO public.whsinfo (warehous_code, warehous_descrip, warehous_fob, warehous_active, warehous_counttag_prefix, warehous_counttag_number, warehous_bol_prefix, warehous_bol_number, warehous_shipping, warehous_useslips, warehous_usezones, warehous_aislesize, warehous_aislealpha, warehous_racksize, warehous_rackalpha, warehous_binsize, warehous_binalpha, warehous_locationsize, warehous_locationalpha, warehous_enforcearbl, warehous_default_accnt_id, warehous_shipping_commission, warehous_cntct_id, warehous_addr_id, warehous_taxzone_id, warehous_transit, warehous_shipform_id, warehous_shipvia_id, warehous_shipcomments, warehous_costcat_id, warehous_sitetype_id, warehous_sequence) VALUES (COALESCE(new.code, ''::character varying), COALESCE(new.description, ''::text), CASE WHEN new.inventory_type THEN COALESCE(new.default_fob, ''::text) ELSE ''::text END, COALESCE(new.active, true), CASE WHEN new.inventory_type THEN COALESCE(new.next_count_tag_prefix, ''::text) ELSE ''::text END, CASE WHEN new.inventory_type THEN COALESCE(new.next_count_tag_number, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.next_bill_of_lading_prefix, ''::text) ELSE ''::text END, CASE WHEN new.inventory_type THEN COALESCE(new.next_bill_of_lading_number, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.shipping_site, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.force_the_use_of_count_slips, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.force_the_use_of_zones, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.aisle_size, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.aisle_allow_alpha_characters, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.rack_size, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.rack_allow_alpha_characters, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.bin_size, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.bin_allow_alpha_characters, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.location_size, 0) ELSE 0 END, CASE WHEN new.inventory_type THEN COALESCE(new.location_allow_alpha_characters, false) ELSE false END, CASE WHEN new.inventory_type THEN COALESCE(new.enforce_arbl_naming_convention, false) ELSE false END, COALESCE(public.getglaccntid(new.post_unassigned_transactions_to), (-1)), CASE WHEN new.inventory_type THEN COALESCE((new.shipping_commission * 0.01), (0)::numeric) ELSE (0)::numeric END, public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), CASE WHEN new.inventory_type THEN COALESCE(public.gettaxzoneid(new.tax_zone), (-1)) ELSE NULL::integer END, CASE WHEN new.inventory_type THEN false WHEN new.transit_type THEN true ELSE false END, CASE WHEN new.transit_type THEN COALESCE((public.getshipformid(new.default_shipping_form))::numeric, public.fetchmetricvalue('DefaultShipFormId'::text)) ELSE NULL::numeric END, CASE WHEN new.transit_type THEN COALESCE((public.getshipviaid(new.default_ship_via))::numeric, public.fetchmetricvalue('DefaultShipViaId'::text)) ELSE NULL::numeric END, CASE WHEN new.transit_type THEN COALESCE(new.shipping_comments, ''::text) ELSE ''::text END, CASE WHEN new.transit_type THEN COALESCE(public.getcostcatid(new.default_cost_category), (-1)) ELSE NULL::integer END, COALESCE(public.getsitetypeid(new.type), (-1)), COALESCE(new.scheduling_sequence, 0)); !DROP RULE "_INSERT" ON api.site; apiadminfalse8288288288288288288288288288288288288288288288288288288288288288288288288281612159715351392828121315588281605828828828828828828828828828828828828828828828828828828828192482882817219318288281603103882882882826182006491_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO sitezone DO INSTEAD INSERT INTO public.whsezone (whsezone_warehous_id, whsezone_name, whsezone_descrip) VALUES (public.getwarehousid((new.site)::text, 'ACTIVE'::text), COALESCE(new.name, ''::character varying), COALESCE(new.description, ''::text)); %DROP RULE "_INSERT" ON api.sitezone; apiadminfalse829829829162123882982926182006499_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO task DO INSTEAD INSERT INTO public.prjtask (prjtask_prj_id, prjtask_number, prjtask_name, prjtask_descrip, prjtask_owner_username, prjtask_username, prjtask_hours_budget, prjtask_hours_actual, prjtask_exp_budget, prjtask_exp_actual, prjtask_status, prjtask_due_date, prjtask_assigned_date, prjtask_start_date, prjtask_completed_date) VALUES (public.getprjid(new.project_number), new.number, COALESCE(new.name, ''::text), COALESCE(new.description, ''::text), COALESCE(new.owner, public.geteffectivextuser()), COALESCE(new.assigned_to, public.geteffectivextuser()), COALESCE(new.hours_budgeted, (0)::numeric), COALESCE(new.hours_actual, (0)::numeric), COALESCE(new.expenses_budgeted, (0)::numeric), COALESCE(new.expenses_actual, (0)::numeric), CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, new.due, new.assigned, new.started, new.completed); !DROP RULE "_INSERT" ON api.task; apiadminfalse8308308308308308301821578157483083083083083083083083083083083026182006508_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO taskcomment DO INSTEAD INSERT INTO public.comment (comment_date, comment_source, comment_source_id, comment_user, comment_cmnttype_id, comment_text) VALUES (COALESCE(new.date, now()), 'TA'::text, public.getprjtaskid((new.project_number)::text, (new.task_number)::text), COALESCE(new.username, public.geteffectivextuser()), public.getcmnttypeid(new.type), new.text); (DROP RULE "_INSERT" ON api.taskcomment; apiadminfalse83183183115748318318311881449831831157926182006516_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO todo DO INSTEAD SELECT public.createtodoitem(NULL::integer, new.assigned_to, COALESCE(new.task_name, ''::text), COALESCE(new.description, ''::text), public.getincidentid(new.incident), COALESCE(public.getincdtcrmacctid(new.incident), public.getcrmacctid(new.account)), public.getopheadid(new.opportunity), CASE WHEN (new.date_started > ''::text) THEN (new.date_started)::date ELSE NULL::date END, CASE WHEN (new.date_due > ''::text) THEN (new.date_due)::date ELSE NULL::date END, (CASE WHEN (new.status = 'Pending Input'::text) THEN 'P'::text WHEN (new.status = 'Deferred'::text) THEN 'D'::text ELSE 'N'::text END)::bpchar, CASE WHEN (new.date_assigned > ''::text) THEN (new.date_assigned)::date ELSE NULL::date END, CASE WHEN (new.date_completed > ''::text) THEN (new.date_completed)::date ELSE NULL::date END, public.getincdtpriorityid(new.priority), COALESCE(new.notes, ''::text), new.owner) AS createtodoitem; !DROP RULE "_INSERT" ON api.todo; apiadminfalse83215401543832832832832832156715398328328321471131183283283283283283283226182006525_INSERTRULEd CREATE RULE "_INSERT" AS ON INSERT TO vendor DO INSTEAD INSERT INTO public.vendinfo (vend_name, vend_lastpurchdate, vend_active, vend_po, vend_comments, vend_pocomments, vend_number, vend_1099, vend_exported, vend_fobsource, vend_fob, vend_terms_id, vend_shipvia, vend_vendtype_id, vend_qualified, vend_ediemail, vend_ediemailbody, vend_edisubject, vend_edifilename, vend_accntnum, vend_emailpodelivery, vend_restrictpurch, vend_edicc, vend_curr_id, vend_cntct1_id, vend_cntct2_id, vend_addr_id, vend_match, vend_taxzone_id, vend_ach_routingnumber, vend_ach_accntnumber, vend_accnt_id, vend_expcat_id, vend_tax_id) VALUES (COALESCE(new.vendor_name, ''::text), NULL::date, COALESCE(new.active, true), COALESCE(new.sells_purchase_order_items, false), COALESCE(new.notes, ''::text), COALESCE(new.po_comments, ''::text), COALESCE(new.vendor_number, ''::character varying), COALESCE(new.receives_1099, false), false, CASE WHEN (new.default_fob = 'Receiving Site'::text) THEN 'W'::text ELSE 'V'::text END, CASE WHEN (new.default_fob = 'Receiving Site'::text) THEN ''::text ELSE new.default_fob END, COALESCE((public.gettermsid(new.default_terms))::numeric, public.fetchmetricvalue('DefaultTerms'::text)), COALESCE(new.ship_via, public.fetchdefaultshipvia()), public.getvendtypeid(new.vendor_type), COALESCE(new.qualified, false), COALESCE(new.po_edi_email, ''::text), COALESCE(new.po_edi_emailbody, ''::text), COALESCE(new.po_edi_subject, ''::text), COALESCE(new.po_edi_filename, ''::text), COALESCE(new.account_number, ''::text), COALESCE(new.allow_email_po_delivery, false), COALESCE(new.may_only_sell_item_source, false), COALESCE(new.po_edi_cc, ''::text), COALESCE(public.getcurrid((new.default_currency)::text), public.basecurrid()), public.savecntct(public.getcntctid(new.contact1_number), new.contact1_number, NULL::integer, new.contact1_honorific, new.contact1_first, new.contact1_middle, new.contact1_last, new.contact1_suffix, new.contact1_voice, new.contact1_alternate, new.contact1_fax, new.contact1_email, new.contact1_web, new.contact1_job_title, new.contact1_change), public.savecntct(public.getcntctid(new.contact2_number), new.contact2_number, NULL::integer, new.contact2_honorific, new.contact2_first, new.contact2_middle, new.contact2_last, new.contact2_suffix, new.contact2_voice, new.contact2_alternate, new.contact2_fax, new.contact2_email, new.contact2_web, new.contact2_job_title, new.contact2_change), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), COALESCE(new.matching_vo_po_amounts, false), public.gettaxzoneid(new.default_tax_zone), ''::bytea, ''::bytea, COALESCE(public.getglaccntid(new.default_dist_gl_account), (-1)), COALESCE(public.getexpcatid(new.default_dist_expense_category), (-1)), COALESCE(public.gettaxid(new.default_dist_tax_code), (-1))); #DROP RULE "_INSERT" ON api.vendor; apiadminfalse833833833833833833833833103883383383383383383383383383383313928331613101415588338338338338338338338338338338338338338339968338338338331620147219241581931833161083383383383383383383383383383383383383383383315198338338338338338338338331612833153583326182006535_INSERTRULE7CREATE RULE "_INSERT" AS ON INSERT TO vendoraddress DO INSTEAD INSERT INTO public.vendaddrinfo (vendaddr_vend_id, vendaddr_code, vendaddr_name, vendaddr_comments, vendaddr_cntct_id, vendaddr_addr_id) VALUES (public.getvendid((new.vendor_number)::text), COALESCE(new.vendor_address_number, ''::character varying), COALESCE(new.vendor_address_name, ''::text), COALESCE(new.notes, ''::text), public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change)); *DROP RULE "_INSERT" ON api.vendoraddress; apiadminfalse8348348348341392834834834834834834193183483416198348348348348348348348348348348348348348341924834248155883426182006542_INSERTRULECREATE RULE "_INSERT" AS ON INSERT TO vendortype DO INSTEAD INSERT INTO public.vendtype (vendtype_code, vendtype_descrip) VALUES (new.code, COALESCE(new.description, ''::text)); 'DROP RULE "_INSERT" ON api.vendortype; apiadminfalse835835835258835;26182006331 _INSERT_CHARRULECREATE RULE "_INSERT_CHAR" AS ON INSERT TO purchaseline DO INSTEAD INSERT INTO public.charass (charass_target_type, charass_target_id, charass_char_id, charass_value) SELECT 'PI', poitem.poitem_id, "char".char_id, charass.charass_value FROM public.pohead, public.poitem, public.charass, public."char", public.itemsite, public.item WHERE (((((((((pohead.pohead_number = (new.order_number)::text) AND (poitem.poitem_pohead_id = pohead.pohead_id)) AND (poitem.poitem_linenumber = new.line_number)) AND (itemsite.itemsite_id = poitem.poitem_itemsite_id)) AND (itemsite.itemsite_item_id = item.item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND charass.charass_default) AND ("char".char_id = charass.charass_char_id)); .DROP RULE "_INSERT_CHAR" ON api.purchaseline; apiadminfalse81117817816817916918617917918618518618681181181116918617926181688348_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO salesline DO INSTEAD UPDATE public.coitem SET coitem_status = new.status, coitem_scheddate = new.scheduled_date, coitem_promdate = new.promise_date, coitem_qtyord = new.qty_ordered, coitem_qty_uom_id = public.getuomid(new.qty_uom), coitem_qty_invuomratio = public.itemuomtouomratio(item.item_id, public.getuomid(new.qty_uom), item.item_inv_uom_id), coitem_price = new.net_unit_price, coitem_price_uom_id = public.getuomid(new.price_uom), coitem_price_invuomratio = public.itemuomtouomratio(item.item_id, public.getuomid(new.price_uom), item.item_price_uom_id), coitem_memo = new.notes, coitem_order_type = CASE WHEN (((NOT old.create_order) AND new.create_order) AND (item.item_type = 'M'::bpchar)) THEN 'W'::text WHEN ((((NOT old.create_order) AND new.create_order) AND (item.item_type = 'P'::bpchar)) AND itemsite.itemsite_createsopo) THEN 'P'::text WHEN (((NOT old.create_order) AND new.create_order) AND (item.item_type = 'P'::bpchar)) THEN 'R'::text ELSE NULL::text END, coitem_substitute_item_id = public.getitemid(new.substitute_for), coitem_prcost = new.overwrite_po_price, coitem_taxtype_id = CASE WHEN (new.tax_type = 'None'::text) THEN NULL::integer ELSE public.gettaxtypeid(new.tax_type) END, coitem_warranty = new.warranty, coitem_cos_accnt_id = public.getglaccntid(new.alternate_cos_account), coitem_rev_accnt_id = public.getglaccntid(new.alternate_rev_account) FROM (public.item JOIN public.itemsite ON ((item.item_id = itemsite.itemsite_item_id))) WHERE ((((item.item_number = old.item_number) AND (coitem.coitem_cohead_id = public.getcoheadid((old.order_number)::text))) AND (coitem.coitem_id = public.getcoitemid((old.order_number)::text, (old.line_number)::text))) AND (coitem.coitem_subnumber = 0)); &DROP RULE "_UPDATE" ON api.salesline; apiadminfalse1801681681817145616501801611146516021535180169169168168177180177177180180180180180180180180180180180180180180180180168"26181745334_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO apmemo DO INSTEAD UPDATE public.apopen SET apopen_duedate = new.due_date, apopen_terms_id = public.gettermsid(new.terms), apopen_amount = new.amount, apopen_notes = new.notes WHERE ((apopen.apopen_docnumber = old.document_number) AND ((apopen.apopen_doctype)::text = CASE WHEN (old.document_type = 'Credit Memo'::text) THEN 'C'::text WHEN (old.document_type = 'Debit Memo'::text) THEN 'D'::text ELSE ''::text END)); #DROP RULE "_UPDATE" ON api.apmemo; apiadminfalse7237237231613155723155723723723723&26181745344_UPDATERULEbCREATE RULE "_UPDATE" AS ON UPDATE TO armemo DO INSTEAD UPDATE public.aropen SET aropen_duedate = new.due_date, aropen_terms_id = public.gettermsid(new.terms), aropen_salesrep_id = public.getsalesrepid(new.sales_rep), aropen_amount = new.amount, aropen_commission_due = new.commission_due, aropen_notes = new.notes, aropen_rsncode_id = public.getrsnid(new.reason_code) WHERE ((aropen.aropen_docnumber = old.document_number) AND ((aropen.aropen_doctype)::text = CASE WHEN (old.document_type = 'Credit Memo'::text) THEN 'C'::text WHEN (old.document_type = 'Debit Memo'::text) THEN 'D'::text ELSE ''::text END)); #DROP RULE "_UPDATE" ON api.armemo; apiadminfalse724159724724159072472472472415851613159724724724724*26181845296_UPDATERULEGCREATE RULE "_UPDATE" AS ON UPDATE TO physinvcount DO INSTEAD NOTHING; )DROP RULE "_UPDATE" ON api.physinvcount; apiadminfalse725725725.26182005776_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO account DO INSTEAD UPDATE public.crmacct SET crmacct_number = new.account_number, crmacct_parent_id = public.getcrmacctid(new.parent_account), crmacct_name = new.account_name, crmacct_active = new.active, crmacct_type = CASE WHEN (new.type = 'Individual'::text) THEN 'I'::text ELSE 'O'::text END, crmacct_cntct_id_1 = public.savecntct(public.getcntctid(new.primary_contact_number), new.primary_contact_number, public.saveaddr(public.getaddrid(new.primary_contact_address_number), new.primary_contact_address_number, new.primary_contact_address1, new.primary_contact_address2, new.primary_contact_address3, new.primary_contact_city, new.primary_contact_state, new.primary_contact_postalcode, new.primary_contact_country, new.primary_contact_address_change), new.primary_contact_honorific, new.primary_contact_first, new.primary_contact_middle, new.primary_contact_last, new.primary_contact_suffix, new.primary_contact_voice, NULL::text, new.primary_contact_fax, new.primary_contact_email, NULL::text, new.primary_contact_job_title, new.primary_contact_change), crmacct_cntct_id_2 = public.savecntct(public.getcntctid(new.secondary_contact_number), new.secondary_contact_number, public.saveaddr(public.getaddrid(new.secondary_contact_address_number), new.secondary_contact_address_number, new.secondary_contact_address1, new.secondary_contact_address2, new.secondary_contact_address3, new.secondary_contact_city, new.secondary_contact_state, new.secondary_contact_postalcode, new.secondary_contact_country, new.secondary_contact_address_change), new.secondary_contact_honorific, new.secondary_contact_first, new.secondary_contact_middle, new.secondary_contact_last, new.secondary_contact_suffix, new.secondary_contact_voice, NULL::text, new.secondary_contact_fax, new.secondary_contact_email, NULL::text, new.secondary_contact_job_title, new.secondary_contact_change), crmacct_notes = new.notes WHERE (crmacct.crmacct_number = (old.account_number)::text); $DROP RULE "_UPDATE" ON api.account; apiadminfalse74374313921558192415374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374374314717431931743226182005784_UPDATERULE\CREATE RULE "_UPDATE" AS ON UPDATE TO accountchar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'CRMACCT'::text) AND (charass.charass_target_id = public.getcrmacctid((old.account_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CRMACCT'::text))); (DROP RULE "_UPDATE" ON api.accountchar; apiadminfalse74418674414711861867447447441431626182005791_UPDATERULEICREATE RULE "_UPDATE" AS ON UPDATE TO accountcomment DO INSTEAD NOTHING; +DROP RULE "_UPDATE" ON api.accountcomment; apiadminfalse745745745:26182005798_UPDATERULE'CREATE RULE "_UPDATE" AS ON UPDATE TO accountfile DO INSTEAD UPDATE public.url SET url_title = new.title, url_url = new.url WHERE ((((url.url_source_id = public.getcrmacctid(old.account_number)) AND (url.url_source = 'CRMA'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); (DROP RULE "_UPDATE" ON api.accountfile; apiadminfalse7467461927461471192192192746746>26182005805_UPDATERULEUCREATE RULE "_UPDATE" AS ON UPDATE TO accountimage DO INSTEAD UPDATE public.imageass SET imageass_image_id = public.getimageid(new.image_name) WHERE (((imageass.imageass_source_id = public.getcrmacctid(old.account_number)) AND (imageass.imageass_source = 'CRMA'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); )DROP RULE "_UPDATE" ON api.accountimage; apiadminfalse74774719574714711537195195747B26182005812_UPDATERULE'CREATE RULE "_UPDATE" AS ON UPDATE TO address DO INSTEAD SELECT public.saveaddr(public.getaddrid((new.address_number)::text), (new.address_number)::text, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.active, new.notes, new.change) AS saveaddr; $DROP RULE "_UPDATE" ON api.address; apiadminfalse74874874874874874813927481923748748748748748748F26182005819_UPDATERULESCREATE RULE "_UPDATE" AS ON UPDATE TO addresschar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'ADDR'::text) AND (charass.charass_target_id = public.getaddrid((old.address_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'ADDR'::text))); (DROP RULE "_UPDATE" ON api.addresschar; apiadminfalse74974918618674913921431186749749J26182005826_UPDATERULEICREATE RULE "_UPDATE" AS ON UPDATE TO addresscomment DO INSTEAD NOTHING; +DROP RULE "_UPDATE" ON api.addresscomment; apiadminfalse750750750N26182005836_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO bom DO INSTEAD SELECT public.savebomhead(public.getitemid((new.item_number)::text), (new.revision)::text, new.revision_date, new.document_number, COALESCE(new.batch_size, (0)::numeric), new.total_qty_per) AS savebomhead; DROP RULE "_UPDATE" ON api.bom; apiadminfalse75175116027511926751751751751751R26182005845_UPDATERULE^CREATE RULE "_UPDATE" AS ON UPDATE TO bomitem DO INSTEAD UPDATE public.bomitem SET bomitem_issuemethod = CASE WHEN (new.issue_method = 'Mixed'::text) THEN 'M'::text WHEN (new.issue_method = 'Push'::text) THEN 'S'::text WHEN (new.issue_method = 'Pull'::text) THEN 'L'::text ELSE NULL::text END, bomitem_uom_id = public.getuomid(new.issue_uom), bomitem_qtyper = new.qty_per, bomitem_scrap = new.scrap, bomitem_effective = CASE WHEN (new.effective = 'Always'::text) THEN public.startoftime() ELSE (new.effective)::date END, bomitem_expires = CASE WHEN (new.expires = 'Never'::text) THEN public.endoftime() ELSE (new.expires)::date END, bomitem_createwo = new.create_child_wo, bomitem_booitem_seq_id = COALESCE(public.getbooitemseqid((new.bom_item_number)::text, new.used_at), (-1)), bomitem_schedatwooper = new.schedule_at_wo_operation, bomitem_ecn = new.ecn_number, bomitem_subtype = CASE WHEN (new.substitutions = 'No'::text) THEN 'N'::text WHEN (new.substitutions = 'Item-Defined'::text) THEN 'I'::text WHEN (new.substitutions = 'BOM-Defined'::text) THEN 'B'::text ELSE NULL::text END, bomitem_rev_id = public.getrevid('BOM'::text, (new.bom_item_number)::text, (new.bom_revision)::text), bomitem_char_id = public.getcharid(new.characteristic, 'I'::text), bomitem_value = new.value, bomitem_notes = new.notes, bomitem_ref = new.reference WHERE (bomitem.bomitem_id = old.id); $DROP RULE "_UPDATE" ON api.bomitem; apiadminfalse752752752752752752200075215481431158416501517527527527527527527527527527527527527521422V26182005854_UPDATERULEICREATE RULE "_UPDATE" AS ON UPDATE TO bomitemcomment DO INSTEAD NOTHING; +DROP RULE "_UPDATE" ON api.bomitemcomment; apiadminfalse753753753Z26182005862_UPDATERULEFCREATE RULE "_UPDATE" AS ON UPDATE TO bomitemsubstitute DO INSTEAD UPDATE public.bomitemsub SET bomitemsub_uomratio = new.sub_parent_uom_ratio, bomitemsub_rank = new.ranking WHERE ((bomitemsub.bomitemsub_bomitem_id = old.bomitem_id) AND (bomitemsub.bomitemsub_item_id = public.getitemid((old.substitute_item_number)::text))); .DROP RULE "_UPDATE" ON api.bomitemsubstitute; apiadminfalse7541602197754754754754754197^26182005869_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO budget DO INSTEAD UPDATE public.budghead SET budghead_name = new.name, budghead_descrip = new.description WHERE (budghead.budghead_name = old.name); #DROP RULE "_UPDATE" ON api.budget; apiadminfalse755755755198755b26182005876_UPDATERULENCREATE RULE "_UPDATE" AS ON UPDATE TO budgetentry DO INSTEAD UPDATE public.budgitem SET budgitem_amount = new.amount WHERE (((budgitem.budgitem_budghead_id = public.getbudgheadid(old.name)) AND (budgitem.budgitem_period_id = public.getperiodid(old.period_start))) AND (budgitem.budgitem_accnt_id = public.getglaccntid(old.account))); (DROP RULE "_UPDATE" ON api.budgetentry; apiadminfalse756142815752007567567561535756756200200f26182005885_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO cashreceipt DO INSTEAD UPDATE public.cashrcpt SET cashrcpt_amount = new.amount_received, cashrcpt_fundstype = CASE WHEN ((new.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((new.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((new.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((new.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((new.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((new.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((new.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((new.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((new.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, cashrcpt_docnumber = new.check_document_number, cashrcpt_bankaccnt_id = public.getbankaccntid(new.post_to), cashrcpt_notes = new.notes, cashrcpt_distdate = CASE WHEN (new.distribution_date > ''::text) THEN (new.distribution_date)::date ELSE NULL::date END, cashrcpt_salescat_id = public.getsalescatid(new.sales_category), cashrcpt_curr_id = public.getcurrid((new.currency)::text), cashrcpt_usecustdeposit = CASE WHEN (new.apply_balance_as = 'Customer Deposit'::text) THEN true ELSE false END WHERE (cashrcpt.cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)); (DROP RULE "_UPDATE" ON api.cashreceipt; apiadminfalse7577571429757757757757757757757757757203757139715861472j26182005896_UPDATERULEECREATE RULE "_UPDATE" AS ON UPDATE TO cashreceiptapply DO INSTEAD UPDATE public.cashrcptitem SET cashrcptitem_amount = new.amount_to_apply, cashrcptitem_discount = new.cashrcptitem_discount WHERE ((cashrcptitem.cashrcptitem_cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)) AND (cashrcptitem.cashrcptitem_aropen_id = public.getaropenid((old.customer_number)::text, (old.doc_type)::bpchar, (old.doc_number)::text))); -DROP RULE "_UPDATE" ON api.cashreceiptapply; apiadminfalse75813941429204758758758758758758758758204n26182005906_UPDATERULEECREATE RULE "_UPDATE" AS ON UPDATE TO cashreceiptapplymisc DO INSTEAD UPDATE public.cashrcptmisc SET cashrcptmisc_accnt_id = public.getglaccntid((new.account)::text), cashrcptmisc_amount = new.amount_to_distribute, cashrcptmisc_notes = new.notes WHERE ((cashrcptmisc.cashrcptmisc_cashrcpt_id = public.getcashrcptid((old.customer_number)::text, CASE WHEN ((old.funds_type)::text = 'Check'::text) THEN 'C'::text WHEN ((old.funds_type)::text = 'Certified Check'::text) THEN 'T'::text WHEN ((old.funds_type)::text = 'Master Card'::text) THEN 'M'::text WHEN ((old.funds_type)::text = 'Visa'::text) THEN 'V'::text WHEN ((old.funds_type)::text = 'American Express'::text) THEN 'A'::text WHEN ((old.funds_type)::text = 'Discover Card'::text) THEN 'D'::text WHEN ((old.funds_type)::text = 'Other Credit Card'::text) THEN 'R'::text WHEN ((old.funds_type)::text = 'Cash'::text) THEN 'K'::text WHEN ((old.funds_type)::text = 'Wire Transfer'::text) THEN 'W'::text ELSE 'O'::text END, (old.check_document_number)::text)) AND (cashrcptmisc.cashrcptmisc_accnt_id = public.getglaccntid((old.account)::text))); 1DROP RULE "_UPDATE" ON api.cashreceiptapplymisc; apiadminfalse75975915352057597597597597597591429205r26182005915_UPDATERULEGCREATE RULE "_UPDATE" AS ON UPDATE TO contact DO INSTEAD SELECT public.savecntct(public.getcntctid((new.contact_number)::text), (new.contact_number)::text, public.getcrmacctid(new.crm_account), public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), new.honorific, new.first, new.middle, new.last, new.suffix, new.initials, new.active, new.voice, new.alternate, new.fax, new.email, new.web, new.notes, new.job_title, new.contact_change) AS savecntct; $DROP RULE "_UPDATE" ON api.contact; apiadminfalse76076076076076015587607607607607607607607607607601924147176019301392760760760760760760760760760760760760v26182005922_UPDATERULENCREATE RULE "_UPDATE" AS ON UPDATE TO contactchar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'CNTCT'::text) AND (charass.charass_target_id = public.getcntctid(old.contact_number))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CNTCT'::text))); (DROP RULE "_UPDATE" ON api.contactchar; apiadminfalse76176115581431186186761761761186z26182005929_UPDATERULEICREATE RULE "_UPDATE" AS ON UPDATE TO contactcomment DO INSTEAD NOTHING; +DROP RULE "_UPDATE" ON api.contactcomment; apiadminfalse762762762~26182005938_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO creditmemo DO INSTEAD UPDATE public.cmhead SET cmhead_custponumber = new.customer_po_number, cmhead_docdate = new.memo_date, cmhead_shipto_id = COALESCE(public.getshiptoid(new.customer_number, new.shipto_number), (-1)), cmhead_shipto_name = new.shipto_name, cmhead_shipto_address1 = new.shipto_address1, cmhead_shipto_address2 = new.shipto_address2, cmhead_shipto_address3 = new.shipto_address3, cmhead_shipto_city = new.shipto_city, cmhead_shipto_state = new.shipto_state, cmhead_shipto_zipcode = new.shipto_postal_code, cmhead_shipto_country = new.shipto_country, cmhead_salesrep_id = public.getsalesrepid(new.sales_rep), cmhead_freight = COALESCE(new.freight, (0)::numeric), cmhead_misc = COALESCE(new.misc_charge_amount, (0)::numeric), cmhead_comments = new.notes, cmhead_billtoname = new.billto_name, cmhead_billtoaddress1 = new.billto_address1, cmhead_billtoaddress2 = new.billto_address2, cmhead_billtoaddress3 = new.billto_address3, cmhead_billtocity = new.billto_city, cmhead_billtostate = new.billto_state, cmhead_billtozip = new.billto_postal_code, cmhead_billtocountry = new.billto_country, cmhead_hold = COALESCE(new.on_hold, false), cmhead_commission = COALESCE(new.commission, (0)::numeric), cmhead_misc_accnt_id = COALESCE(public.getglaccntid(new.misc_charge_credit_account), (-1)), cmhead_misc_descrip = new.misc_charge_description, cmhead_rsncode_id = (SELECT rsncode.rsncode_id FROM public.rsncode WHERE (rsncode.rsncode_code = new.reason_code)), cmhead_curr_id = COALESCE(public.getcurrid((new.currency)::text), (-1)), cmhead_taxzone_id = public.gettaxzoneid(NULLIF(new.tax_zone, 'None'::text)) WHERE ((cmhead.cmhead_number = old.memo_number) AND (cmhead.cmhead_posted = false)); 'DROP RULE "_UPDATE" ON api.creditmemo; apiadminfalse7637637637637637637637637637637637637637637637637637631611535147216176376376376376376376376376376376376376316121599164164763159076376326182005949_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO creditmemoline DO INSTEAD SELECT public.updatecreditmemoline(new.*, old.*) AS updatecreditmemoline; +DROP RULE "_UPDATE" ON api.creditmemoline; apiadminfalse764764226176426182005956_UPDATERULEKCREATE RULE "_UPDATE" AS ON UPDATE TO custchar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'C'::text) AND (charass.charass_target_id = public.getcustid((old.customer_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'C'::text))); %DROP RULE "_UPDATE" ON api.custchar; apiadminfalse7657651664186186765765765143118626182005963_UPDATERULEFCREATE RULE "_UPDATE" AS ON UPDATE TO custcomment DO INSTEAD NOTHING; (DROP RULE "_UPDATE" ON api.custcomment; apiadminfalse76676676626182005971_UPDATERULEICREATE RULE "_UPDATE" AS ON UPDATE TO custcreditcard DO INSTEAD NOTHING; +DROP RULE "_UPDATE" ON api.custcreditcard; apiadminfalse76776776726182005980_UPDATERULE CREATE RULE "_UPDATE" AS ON UPDATE TO customer DO INSTEAD UPDATE public.custinfo SET cust_active = new.active, cust_custtype_id = public.getcusttypeid(new.customer_type), cust_salesrep_id = public.getsalesrepid(new.sales_rep), cust_commprcnt = (new.commission * 0.01), cust_name = new.customer_name, cust_creditlmt = new.credit_limit, cust_creditrating = new.credit_rating, cust_backorder = new.accepts_backorders, cust_partialship = new.accepts_partial_shipments, cust_terms_id = public.gettermsid(new.default_terms), cust_discntprcnt = new.default_discount, cust_balmethod = CASE WHEN (new.balance_method = 'Balance Forward'::text) THEN 'B'::text WHEN (new.balance_method = 'Open Items'::text) THEN 'O'::text ELSE NULL::text END, cust_ffshipto = new.allow_free_form_shipto, cust_shipform_id = public.getshipformid(new.ship_form), cust_shipvia = new.ship_via, cust_blanketpos = new.uses_blanket_pos, cust_shipchrg_id = COALESCE(public.getshipchrgid(new.shipping_charges), (-1)), cust_creditstatus = CASE WHEN (new.credit_status = 'On Credit Warning'::text) THEN 'W'::text WHEN (new.credit_status = 'On Credit Hold'::text) THEN 'H'::text ELSE 'G'::text END, cust_comments = new.notes, cust_ffbillto = new.allow_free_form_billto, cust_usespos = new.uses_purchase_orders, cust_number = new.customer_number, cust_autoupdatestatus = new.credit_status_exceed_warn, cust_autoholdorders = new.credit_status_exceed_hold, cust_preferred_warehous_id = COALESCE(public.getwarehousid(new.preferred_selling_site, 'ACTIVE'::text), (-1)), cust_curr_id = public.getcurrid((new.default_currency)::text), cust_creditlmt_curr_id = public.getcurrid((new.credit_limit_currency)::text), cust_cntct_id = public.savecntct(public.getcntctid(new.billing_contact_number, false), new.billing_contact_number, public.saveaddr(public.getaddrid(new.billing_contact_address_number), new.billing_contact_address_number, new.billing_contact_address1, new.billing_contact_address2, new.billing_contact_address3, new.billing_contact_city, new.billing_contact_state, new.billing_contact_postalcode, new.billing_contact_country, new.billing_contact_address_change), new.billing_contact_honorific, new.billing_contact_first, new.billing_contact_middle, new.billing_contact_last, new.billing_contact_suffix, new.billing_contact_voice, new.billing_contact_alternate, new.billing_contact_fax, new.billing_contact_email, new.billing_contact_web, new.billing_contact_job_title, new.billing_contact_change), cust_corrcntct_id = public.savecntct(public.getcntctid(new.correspond_contact_number, false), new.correspond_contact_number, public.saveaddr(public.getaddrid(new.correspond_contact_address_number), new.correspond_contact_address_number, new.correspond_contact_address1, new.correspond_contact_address2, new.correspond_contact_address3, new.correspond_contact_city, new.correspond_contact_state, new.correspond_contact_postalcode, new.correspond_contact_country, new.correspond_contact_address_change), new.correspond_contact_honorific, new.correspond_contact_first, new.correspond_contact_middle, new.correspond_contact_last, new.correspond_contact_suffix, new.correspond_contact_voice, new.correspond_contact_alternate, new.correspond_contact_fax, new.correspond_contact_email, new.correspond_contact_web, new.correspond_contact_job_title, new.correspond_contact_change), cust_taxzone_id = public.gettaxzoneid(new.default_tax_zone), cust_gracedays = CASE WHEN (COALESCE(new.alternate_grace_days, 0) > 0) THEN new.alternate_grace_days ELSE NULL::integer END WHERE (custinfo.cust_id = public.getcustid((old.customer_number)::text)); %DROP RULE "_UPDATE" ON api.customer; apiadminfalse768768768768768768768768768768768768768768768768768768768768768768768768768768768768192476876876876876876876876876816076876876876876876876816131590159716641450139276814721216159616121621193176876876876876876876876876876876876876876876876876876876876876876876876876876876876876876826182005995_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO customertype DO INSTEAD UPDATE public.custtype SET custtype_code = new.code, custtype_descrip = new.description, custtype_char = new.enable_characteristics_profile WHERE (custtype.custtype_code = (old.code)::text); )DROP RULE "_UPDATE" ON api.customertype; apiadminfalse77020777077077077026182006002_UPDATERULEyCREATE RULE "_UPDATE" AS ON UPDATE TO customertypechar DO INSTEAD UPDATE public.charass SET charass_value = new.value, charass_default = new.is_default WHERE (((charass.charass_target_type = 'CT'::text) AND (charass.charass_target_id = public.getcusttypeid((old.customer_type)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'CT'::text))); -DROP RULE "_UPDATE" ON api.customertypechar; apiadminfalse7717711216771143118618618677177177126182006011_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO custshipto DO INSTEAD UPDATE public.shiptoinfo SET shipto_cust_id = public.getcustid((new.customer_number)::text), shipto_name = new.name, shipto_salesrep_id = public.getsalesrepid(new.sales_rep), shipto_comments = new.general_notes, shipto_shipcomments = new.shipping_notes, shipto_shipzone_id = public.getshipzoneid(new.zone), shipto_shipvia = new.ship_via, shipto_commission = (new.commission / (100)::numeric), shipto_shipform_id = public.getshipformid(new.ship_form), shipto_shipchrg_id = public.getshipchrgid(new.shipping_charges), shipto_active = new.active, shipto_default = new.default_flag, shipto_num = old.shipto_number, shipto_ediprofile_id = CASE WHEN (new.edi_profile = 'No EDI'::text) THEN (-1) WHEN (new.edi_profile = 'Use Customer Master'::text) THEN (-2) ELSE public.getediprofileid(new.edi_profile) END, shipto_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), shipto_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), shipto_taxzone_id = public.gettaxzoneid(new.tax_zone) WHERE (shiptoinfo.shipto_id = public.getshiptoid((old.customer_number)::text, (old.shipto_number)::text)); 'DROP RULE "_UPDATE" ON api.custshipto; apiadminfalse77277277277277277277277277277277277277277277277277277277277277277277215901392192419311651604159615971664772155815061599161277277277277277277277277277277277277277226182006019_UPDATERULEGCREATE RULE "_UPDATE" AS ON UPDATE TO custtax DO INSTEAD UPDATE public.taxreg SET taxreg_number = new.registration_number WHERE (((taxreg.taxreg_rel_type = 'C'::bpchar) AND (taxreg.taxreg_rel_id = public.getcustid((old.customer_number)::text))) AND (taxreg.taxreg_taxauth_id = public.gettaxauthid((old.tax_authority)::text))); $DROP RULE "_UPDATE" ON api.custtax; apiadminfalse7732117737737731664160921121177326182006028_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO employee DO INSTEAD UPDATE public.emp SET emp_code = new.code, emp_number = new.number, emp_active = new.active, emp_startdate = new.start_date, emp_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.honorific, new.first, new.middle, new.last, new.suffix, new.voice, new.alternate, new.fax, new.email, new.web, new.job_title, new.contact_change), emp_warehous_id = public.getwarehousid(new.site, 'ALL'::text), emp_mgr_emp_id = (SELECT emp.emp_id FROM public.emp WHERE (emp.emp_code = new.manager_code)), emp_wage_type = CASE WHEN (new.wage_type = 'Hourly'::text) THEN 'H'::text WHEN (new.wage_type = 'Salaried'::text) THEN 'S'::text ELSE NULL::text END, emp_wage = new.wage, emp_wage_curr_id = COALESCE(public.getcurrid((new.wage_currency)::text), public.basecurrid()), emp_wage_period = CASE WHEN (new.wage_period = 'Hour'::text) THEN 'H'::text WHEN (new.wage_period = 'Day'::text) THEN 'D'::text WHEN (new.wage_period = 'Week'::text) THEN 'W'::text WHEN (new.wage_period = 'Biweek'::text) THEN 'BW'::text WHEN (new.wage_period = 'Month'::text) THEN 'M'::text WHEN (new.wage_period = 'Year'::text) THEN 'Y'::text ELSE NULL::text END, emp_dept_id = public.getdeptid(new.department), emp_shift_id = public.getshiftid(new.shift), emp_image_id = public.getimageid(new.image), emp_extrate = new.rate, emp_extrate_period = CASE WHEN (new.billing_period = 'Hour'::text) THEN 'H'::text WHEN (new.billing_period = 'Day'::text) THEN 'D'::text WHEN (new.billing_period = 'Week'::text) THEN 'W'::text WHEN (new.billing_period = 'Biweek'::text) THEN 'BW'::text WHEN (new.billing_period = 'Month'::text) THEN 'M'::text WHEN (new.billing_period = 'Year'::text) THEN 'Y'::text ELSE NULL::text END, emp_notes = COALESCE(new.notes, ''::text) WHERE (emp.emp_code = (old.code)::text); %DROP RULE "_UPDATE" ON api.employee; apiadminfalse774159577477477477477477477477477415581537774101413921489192419312142147747747747747747747747747747747747747747747747747747747747747747747747747747747741472162177477426182006036_UPDATERULEPCREATE RULE "_UPDATE" AS ON UPDATE TO employeechar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'EMP'::text) AND (charass.charass_target_id = public.getempid((old.employee_code)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'EMP'::text))); )DROP RULE "_UPDATE" ON api.employeechar; apiadminfalse7757751431186186775775775186151826182006043_UPDATERULEJCREATE RULE "_UPDATE" AS ON UPDATE TO employeecomment DO INSTEAD NOTHING; ,DROP RULE "_UPDATE" ON api.employeecomment; apiadminfalse77677677626182006050_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO extshipmaint DO INSTEAD UPDATE public.shipdata SET shipdata_cohead_number = new.so_number, shipdata_shiphead_number = new.shipment_number, shipdata_void_ind = new.void, shipdata_shipper = new.shipper, shipdata_billing_option = new.billing_option, shipdata_weight = new.weight, shipdata_base_freight = new.base_freight, shipdata_base_freight_curr_id = public.getcurrid((new.base_freight_currency)::text), shipdata_total_freight = new.total_freight, shipdata_total_freight_curr_id = public.getcurrid((new.total_freight_currency)::text), shipdata_package_type = new.package_type, shipdata_cosmisc_tracknum = new.tracking_number, shipdata_cosmisc_packnum_tracknum = new.package_tracking_number, shipdata_lastupdated = new.last_updated WHERE ((((shipdata.shipdata_cohead_number = (old.so_number)::text) AND (shipdata.shipdata_shiphead_number = (old.shipment_number)::text)) AND (shipdata.shipdata_shipper = (old.shipper)::text)) AND (shipdata.shipdata_cosmisc_packnum_tracknum = (old.package_tracking_number)::text)); )DROP RULE "_UPDATE" ON api.extshipmaint; apiadminfalse777777777216777777216777777147277777721621677777777777777777777726182006058_UPDATERULEjCREATE RULE "_UPDATE" AS ON UPDATE TO freightpricingscheduleitem DO INSTEAD UPDATE public.ipsfreight SET ipsfreight_ipshead_id = public.getipsheadid((old.pricing_schedule)::text), ipsfreight_qtybreak = new.qty_break, ipsfreight_price = new.price, ipsfreight_type = CASE WHEN (new.price_type = 'Flat Rate'::text) THEN 'F'::text WHEN (new.price_type = 'Price Per UOM'::text) THEN 'P'::text ELSE NULL::text END, ipsfreight_warehous_id = CASE WHEN (new.from_site = 'Any'::text) THEN NULL::integer ELSE public.getwarehousid(new.from_site, 'All'::text) END, ipsfreight_shipzone_id = CASE WHEN (new.to_shipzone = 'Any'::text) THEN NULL::integer ELSE public.getshipzoneid(new.to_shipzone) END, ipsfreight_freightclass_id = CASE WHEN (new.freight_class = 'Any'::text) THEN NULL::integer ELSE public.getfreightclassid(new.freight_class) END, ipsfreight_shipvia = CASE WHEN (new.ship_via = 'Any'::text) THEN NULL::text ELSE new.ship_via END WHERE (((((((((ipsfreight.ipsfreight_ipshead_id = public.getipsheadid((old.pricing_schedule)::text)) AND (ipsfreight.ipsfreight_qtybreak = old.qty_break)) AND (ipsfreight.ipsfreight_price = old.price)) AND ((ipsfreight.ipsfreight_type)::text = CASE WHEN (old.price_type = 'Flat Rate'::text) THEN 'F'::text WHEN (old.price_type = 'Price Per UOM'::text) THEN 'P'::text ELSE NULL::text END)) AND ((ipsfreight.ipsfreight_warehous_id IS NULL) AND (old.from_site = 'Any'::text))) OR ((ipsfreight.ipsfreight_warehous_id = CASE WHEN (old.from_site = 'Any'::text) THEN 0 ELSE public.getwarehousid(old.from_site, 'All'::text) END) AND ((ipsfreight.ipsfreight_shipzone_id IS NULL) AND (old.to_shipzone = 'Any'::text)))) OR ((ipsfreight.ipsfreight_shipzone_id = CASE WHEN (old.to_shipzone = 'Any'::text) THEN 0 ELSE public.getshipzoneid(old.to_shipzone) END) AND ((ipsfreight.ipsfreight_freightclass_id IS NULL) AND (old.freight_class = 'Any'::text)))) OR ((ipsfreight.ipsfreight_freightclass_id = CASE WHEN (old.freight_class = 'Any'::text) THEN 0 ELSE public.getfreightclassid(old.freight_class) END) AND ((ipsfreight.ipsfreight_shipvia IS NULL) AND (old.ship_via = 'Any'::text)))) OR (ipsfreight.ipsfreight_shipvia = old.ship_via)); 7DROP RULE "_UPDATE" ON api.freightpricingscheduleitem; apiadminfalse778160421821821877816217782187787787781531169021821821821877877877877826182006069_UPDATERULE?CREATE RULE "_UPDATE" AS ON UPDATE TO glaccount DO INSTEAD UPDATE public.accnt SET accnt_number = new.account_number, accnt_descrip = new.description, accnt_comments = new.notes, accnt_profit = new.profit_center, accnt_sub = new.sub_account, accnt_type = CASE WHEN (new.type = 'Asset'::text) THEN 'A'::text WHEN (new.type = 'Liability'::text) THEN 'L'::text WHEN (new.type = 'Expense'::text) THEN 'E'::text WHEN (new.type = 'Revenue'::text) THEN 'R'::text WHEN (new.type = 'Equity'::text) THEN 'Q'::text ELSE NULL::text END, accnt_extref = new.ext_reference, accnt_company = new.company, accnt_forwardupdate = new.forward_update_trial_balances, accnt_subaccnttype_code = new.sub_type WHERE (accnt.accnt_id = public.getglaccntid((old.company)::text, (old.profit_center)::text, (old.account_number)::text, (old.sub_account)::text)); &DROP RULE "_UPDATE" ON api.glaccount; apiadminfalse779779153619977977977977977977977977977977926182006078_UPDATERULE@CREATE RULE "_UPDATE" AS ON UPDATE TO incident DO INSTEAD UPDATE public.incdt SET incdt_crmacct_id = public.getcrmacctid(new.crm_account), incdt_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), incdt_descrip = new.notes, incdt_summary = new.description, incdt_item_id = public.getitemid(new.item_number), incdt_status = CASE WHEN (new.status = 'New'::text) THEN 'N'::text WHEN (new.status = 'Feedback'::text) THEN 'F'::text WHEN (new.status = 'Confirmed'::text) THEN 'C'::text WHEN (new.status = 'Assigned'::text) THEN 'A'::text WHEN (new.status = 'Resolved'::text) THEN 'R'::text WHEN (new.status = 'Closed'::text) THEN 'L'::text ELSE NULL::text END, incdt_assigned_username = new.assigned_to, incdt_incdtcat_id = public.getincdtcatid(new.category), incdt_incdtseverity_id = public.getincdtseverityid(new.severity), incdt_incdtpriority_id = public.getincdtpriorityid(new.priority), incdt_incdtresolution_id = public.getincdtresolutionid(new.resolution), incdt_lotserial = new.lot_serial_number, incdt_ls_id = public.getlotserialid(new.item_number, new.lot_serial_number) WHERE (incdt.incdt_id = public.getincidentid(old.incident_number)); %DROP RULE "_UPDATE" ON api.incident; apiadminfalse780147115411542780780780780780780780780780780780780780780154159415437801558154016021566193178078078078078078078078078026182006086_UPDATERULESCREATE RULE "_UPDATE" AS ON UPDATE TO incidentchar DO INSTEAD UPDATE public.charass SET charass_value = new.value WHERE (((charass.charass_target_type = 'INCDT'::text) AND (charass.charass_target_id = public.getincidentid(old.incident_number))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'INCDT'::text))); )DROP RULE "_UPDATE" ON api.incidentchar; apiadminfalse7817811543186186781143118678178126182006094_UPDATERULEJCREATE RULE "_UPDATE" AS ON UPDATE TO incidentcomment DO INSTEAD NOTHING; ,DROP RULE "_UPDATE" ON api.incidentcomment; apiadminfalse78278278226182006100_UPDATERULE+CREATE RULE "_UPDATE" AS ON UPDATE TO incidentfile DO INSTEAD UPDATE public.url SET url_title = new.title, url_url = new.url WHERE ((((url.url_source_id = public.getincidentid(old.incident_number)) AND (url.url_source = 'INCDT'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); )DROP RULE "_UPDATE" ON api.incidentfile; apiadminfalse783783783192192154319219278378326182006107_UPDATERULEYCREATE RULE "_UPDATE" AS ON UPDATE TO incidentimage DO INSTEAD UPDATE public.imageass SET imageass_image_id = public.getimageid(new.image_name) WHERE (((imageass.imageass_source_id = public.getincidentid(old.incident_number)) AND (imageass.imageass_source = 'INCDT'::text)) AND (imageass.imageass_image_id = public.getimageid(old.image_name))); *DROP RULE "_UPDATE" ON api.incidentimage; apiadminfalse7847841951537784195154319578426182006116_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO invoice DO INSTEAD UPDATE public.invchead SET invchead_invcnumber = old.invoice_number, invchead_ordernumber = new.order_number, invchead_invcdate = new.invoice_date, invchead_shipdate = new.ship_date, invchead_orderdate = new.order_date, invchead_salesrep_id = public.getsalesrepid(new.sales_rep), invchead_commission = new.commission, invchead_taxzone_id = public.gettaxzoneid(NULLIF(new.tax_zone, 'None'::text)), invchead_terms_id = public.gettermsid(new.terms), invchead_cust_id = (SELECT public.getcustid(new.customer_number) AS getcustid), invchead_billto_name = new.billto_name, invchead_billto_address1 = new.billto_address1, invchead_billto_address2 = new.billto_address2, invchead_billto_address3 = new.billto_address3, invchead_billto_city = new.billto_city, invchead_billto_state = new.billto_state, invchead_billto_zipcode = new.billto_postal_code, invchead_billto_country = new.billto_country, invchead_billto_phone = new.billto_phone, invchead_shipto_id = COALESCE(public.getshiptoid(new.customer_number, new.shipto_number), (-1)), invchead_shipto_name = new.shipto_name, invchead_shipto_address1 = new.shipto_address1, invchead_shipto_address2 = new.shipto_address2, invchead_shipto_address3 = new.shipto_address3, invchead_shipto_city = new.shipto_city, invchead_shipto_state = new.shipto_state, invchead_shipto_zipcode = new.shipto_postal_code, invchead_shipto_country = new.shipto_country, invchead_shipto_phone = new.shipto_phone, invchead_ponumber = new.po_number, invchead_shipvia = new.ship_via, invchead_prj_id = COALESCE(public.getprjid(new.project_number), (-1)), invchead_fob = new.fob, invchead_misc_descrip = new.misc_charge_description, invchead_misc_amount = new.misc_charge, invchead_misc_accnt_id = COALESCE(public.getglaccntid(new.misc_charge_account_number), (-1)), invchead_freight = new.freight, invchead_curr_id = COALESCE(public.getcurrid((new.currency)::text), (-1)), invchead_payment = new.payment, invchead_notes = new.notes, invchead_saletype_id = public.getsaletypeid(new.sale_type), invchead_shipzone_id = public.getshipzoneid(new.shipto_shipzone) WHERE ((invchead.invchead_invcnumber = old.invoice_number) AND (invchead.invchead_posted = false)); $DROP RULE "_UPDATE" ON api.invoice; apiadminfalse785147278578578517378578578578578578578578578578578578578578578578578578578578516131590153578578578578578516041612166415781599159117378578578578578578578578578578578578578578578526182006127_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO invoiceline DO INSTEAD SELECT public.updateinvoicelineitem(new.*, old.*) AS updateinvoicelineitem; (DROP RULE "_UPDATE" ON api.invoiceline; apiadminfalse786786786226426182006136_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO item DO INSTEAD UPDATE public.item SET item_active = new.active, item_descrip1 = new.description1, item_descrip2 = new.description2, item_type = CASE WHEN (new.item_type = 'Purchased'::text) THEN 'P'::text WHEN (new.item_type = 'Manufactured'::text) THEN 'M'::text WHEN (new.item_type = 'Job'::text) THEN 'J'::text WHEN (new.item_type = 'Kit'::text) THEN 'K'::text WHEN (new.item_type = 'Phantom'::text) THEN 'F'::text WHEN (new.item_type = 'Reference'::text) THEN 'R'::text WHEN (new.item_type = 'Costing'::text) THEN 'S'::text WHEN (new.item_type = 'Tooling'::text) THEN 'T'::text WHEN (new.item_type = 'Outside Process'::text) THEN 'O'::text WHEN (new.item_type = 'Planning'::text) THEN 'L'::text WHEN (new.item_type = 'Breeder'::text) THEN 'B'::text WHEN (new.item_type = 'Co-Product'::text) THEN 'C'::text WHEN (new.item_type = 'By-Product'::text) THEN 'Y'::text ELSE NULL::text END, item_maxcost = new.maximum_desired_cost, item_classcode_id = public.getclasscodeid(new.class_code), item_inv_uom_id = public.getuomid(new.inventory_uom), item_picklist = new.pick_list_item, item_fractional = new.fractional, item_config = new.configured, item_sold = new.item_is_sold, item_prodcat_id = COALESCE(public.getprodcatid(new.product_category), (-1)), item_exclusive = new.exclusive, item_listprice = new.list_price, item_listcost = new.list_cost, item_price_uom_id = public.getuomid(new.list_price_uom), item_upccode = new.upc_code, item_prodweight = new.product_weight, item_packweight = new.packaging_weight, item_comments = new.notes, item_extdescrip = new.ext_description WHERE (item.item_id = public.getitemid((old.item_number)::text)); !DROP RULE "_UPDATE" ON api.item; apiadminfalse787787787787787787787787787787787787787787158016501681602787143878778778778778778778778778726182006144_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO itemalias DO INSTEAD UPDATE public.itemalias SET itemalias_number = new.alias_number, itemalias_usedescrip = new.use_description, itemalias_descrip1 = new.description1, itemalias_descrip2 = new.description2, itemalias_comments = new.comments WHERE ((itemalias.itemalias_item_id = public.getitemid((old.item_number)::text)) AND (itemalias.itemalias_number = old.alias_number)); &DROP RULE "_UPDATE" ON api.itemalias; apiadminfalse788788788788788788788226226160278826182006151_UPDATERULEiCREATE RULE "_UPDATE" AS ON UPDATE TO itemchar DO INSTEAD UPDATE public.charass SET charass_value = new.value, charass_default = new.is_default WHERE (((charass.charass_target_type = 'I'::text) AND (charass.charass_target_id = public.getitemid((old.item_number)::text))) AND (charass.charass_char_id = public.getcharid((old.characteristic)::text, 'I'::text))); %DROP RULE "_UPDATE" ON api.itemchar; apiadminfalse7897897897897891602789186186143118626182006158_UPDATERULEFCREATE RULE "_UPDATE" AS ON UPDATE TO itemcomment DO INSTEAD NOTHING; (DROP RULE "_UPDATE" ON api.itemcomment; apiadminfalse79079079026182006166_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO itemcost DO INSTEAD SELECT public.updateitemcost(public.getitemid((new.item_number)::text), public.getcostelemid((new.costing_element)::text), public.getcurrid((new.currency)::text), new.actual_cost, new.post_to_standard) AS updateitemcost; %DROP RULE "_UPDATE" ON api.itemcost; apiadminfalse791791791204879179179114727911466160226182006173_UPDATERULE#CREATE RULE "_UPDATE" AS ON UPDATE TO itemfile DO INSTEAD UPDATE public.url SET url_title = new.title, url_url = new.url WHERE ((((url.url_source_id = public.getitemid((old.item_number)::text)) AND (url.url_source = 'I'::text)) AND (url.url_title = old.title)) AND (url.url_url = old.url)); %DROP RULE "_UPDATE" ON api.itemfile; apiadminfalse792192192192792192160279279279226182006180_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO itemimage DO INSTEAD SELECT public.saveimageass('I'::text, public.getitemid((new.item_number)::text), (CASE WHEN (new.purpose = 'Product Description'::text) THEN 'P'::text WHEN (new.purpose = 'Inventory Description'::text) THEN 'I'::text WHEN (new.purpose = 'Engineering Reference'::text) THEN 'E'::text WHEN (new.purpose = 'Miscellaneous'::text) THEN 'M'::text ELSE 'X'::text END)::bpchar, public.getimageid(new.image_name)) AS saveimageass; &DROP RULE "_UPDATE" ON api.itemimage; apiadminfalse79379316021932793793793153726182006189_UPDATERULE- CREATE RULE "_UPDATE" AS ON UPDATE TO itemsite DO INSTEAD UPDATE public.itemsite SET itemsite_active = new.active, itemsite_dropship = new.dropship, itemsite_posupply = new.po_supplied_at_site, itemsite_createpr = new.create_prs, itemsite_wosupply = new.wo_supplied_at_site, itemsite_createwo = new.create_wos, itemsite_createsopr = new.create_soprs, itemsite_createsopo = new.create_sopos, itemsite_sold = new.sold_from_site, itemsite_soldranking = new.ranking, itemsite_costmethod = CASE WHEN (new.cost_method = 'None'::text) THEN 'N'::text WHEN (new.cost_method = 'Average'::text) THEN 'A'::text WHEN (new.cost_method = 'Standard'::text) THEN 'S'::text WHEN (new.cost_method = 'Job'::text) THEN 'J'::text ELSE NULL::text END, itemsite_controlmethod = CASE WHEN (new.control_method = 'None'::text) THEN 'N'::text WHEN (new.control_method = 'Regular'::text) THEN 'R'::text WHEN (new.control_method = 'Serial #'::text) THEN 'S'::text WHEN (new.control_method = 'Lot #'::text) THEN 'L'::text ELSE NULL::text END, itemsite_perishable = new.perishable, itemsite_plancode_id = public.getplancodeid(new.planner_code), itemsite_costcat_id = public.getcostcatid(new.cost_category), itemsite_loccntrl = new.multiple_location_control, itemsite_location_id = CASE WHEN (new.location = 'N/A'::text) THEN (-1) ELSE public.getlocationid((new.site)::text, new.location) END, itemsite_location = new.user_defined_location, itemsite_location_comments = new.user_defined_location, itemsite_disallowblankwip = new.disallow_blank_wip_locations, itemsite_stocked = new.stocked, itemsite_abcclass = new.abc_class, itemsite_autoabcclass = new.allow_automatic_updates, itemsite_cyclecountfreq = new.cycl_cnt_freq, itemsite_eventfence = new.event_fence, itemsite_useparams = new.enforce_order_parameters, itemsite_reorderlevel = new.reorder_level, itemsite_ordertoqty = new.order_up_to, itemsite_minordqty = new.minimum_order, itemsite_maxordqty = new.maximum_order, itemsite_multordqty = new.order_multiple, itemsite_useparamsmanual = new.enforce_on_manual_orders, itemsite_ordergroup = new.group_mps_mrp_orders, itemsite_ordergroup_first = new.first_group, itemsite_mps_timefence = new.mps_time_fence, itemsite_leadtime = new.lead_time, itemsite_safetystock = new.safety_stock, itemsite_supply_itemsite_id = CASE WHEN (new.supplied_from_site = 'None'::text) THEN NULL::integer WHEN (new.supplied_from_site = ''::text) THEN NULL::integer ELSE public.getitemsiteid(new.supplied_from_site, (new.item_number)::text) END, itemsite_notes = new.notes, itemsite_warrpurc = new.require_warranty, itemsite_autoreg = new.auto_register, itemsite_planning_type = CASE WHEN (new.planning_system = 'None'::text) THEN 'N'::text WHEN (new.planning_system = 'MPS'::text) THEN 'S'::text ELSE 'M'::text END WHERE (itemsite.itemsite_id = public.getitemsiteid((old.site)::text, (old.item_number)::text)); %DROP RULE "_UPDATE" ON api.itemsite; apiadminfalse794794794794794794794794794794794794169794794794794794794794794794794794794794794794794794794156517087947947947947947947947947947947947947947941213794102326182006198_UPDATERULEJCREATE RULE "_UPDATE" AS ON UPDATE TO itemsitecomment DO INSTEAD NOTHING; ,DROP RULE "_UPDATE" ON api.itemsitecomment; apiadminfalse79579579526182006207_UPDATERULE/CREATE RULE "_UPDATE" AS ON UPDATE TO itemsource DO INSTEAD UPDATE public.itemsrc SET itemsrc_vend_item_number = new.vendor_item_number, itemsrc_vend_item_descrip = new.vendor_description, itemsrc_comments = new.notes, itemsrc_vend_uom = new.vendor_uom, itemsrc_invvendoruomratio = new.inventory_vendor_uom_ratio, itemsrc_minordqty = new.minimum_order, itemsrc_multordqty = new.order_multiple, itemsrc_leadtime = new.lead_time, itemsrc_ranking = new.vendor_ranking, itemsrc_active = new.active, itemsrc_default = new.itemsrc_default, itemsrc_manuf_name = new.manufacturer_name, itemsrc_manuf_item_number = new.manufacturer_item_number, itemsrc_manuf_item_descrip = new.manufacturer_description, itemsrc_upccode = new.bar_code, itemsrc_contrct_id = public.getcontrctid(new.contract_number), itemsrc_effective = COALESCE(public.getcontrcteffective(new.contract_number), new.effective_date), itemsrc_expires = COALESCE(public.getcontrctexpires(new.contract_number), new.expires_date) WHERE (((((itemsrc.itemsrc_item_id = public.getitemid((old.item_number)::text)) AND (itemsrc.itemsrc_vend_id = public.getvendid((old.vendor)::text))) AND (itemsrc.itemsrc_vend_item_number = old.vendor_item_number)) AND (itemsrc.itemsrc_manuf_name = old.manufacturer_name)) AND (itemsrc.itemsrc_manuf_item_number = old.manufacturer_item_number)); 'DROP RULE "_UPDATE" ON api.itemsource; apiadminfalse7967961458796796161979679679679679679679679679623223223279614572327967967961602145923279679679679679626182006217_UPDATERULEFCREATE RULE "_UPDATE" AS ON UPDATE TO itemsourceprice DO INSTEAD UPDATE public.itemsrcp SET itemsrcp_qtybreak = new.qty_break, itemsrcp_price = new.price_per_unit, itemsrcp_updated = now(), itemsrcp_curr_id = public.getcurrid((new.currency)::text), itemsrcp_dropship = COALESCE(new.dropship_only, false), itemsrcp_warehous_id = CASE WHEN (new.pricing_site = 'All'::text) THEN (-1) ELSE COALESCE(public.getwarehousid(new.pricing_site, 'ALL'::text), (-1)) END, itemsrcp_type = CASE WHEN (new.pricing_type = 'Discount'::text) THEN 'D'::text ELSE 'N'::text END, itemsrcp_discntprcnt = (COALESCE(new.discount_percent, 0.0) / 100.0), itemsrcp_fixedamtdiscount = new.discount_fixed_amount WHERE ((itemsrcp.itemsrcp_itemsrc_id = public.getitemsrcid((old.item_number)::text, (new.vendor)::text)) AND (itemsrcp.itemsrcp_qtybreak = old.qty_break)); ,DROP RULE "_UPDATE" ON api.itemsourceprice; apiadminfalse79779723379779779779779779779779779715621472162123379726182006225_UPDATERULEVCREATE RULE "_UPDATE" AS ON UPDATE TO itemsubstitute DO INSTEAD UPDATE public.itemsub SET itemsub_uomratio = new.sub_parent_uom_ratio, itemsub_rank = new.ranking WHERE ((itemsub.itemsub_parent_item_id = public.getitemid((old.root_item_number)::text)) AND (itemsub.itemsub_sub_item_id = public.getitemid((old.substitute_item_number)::text))); +DROP RULE "_UPDATE" ON api.itemsubstitute; apiadminfalse7987987987982347981602234798 26182006232_UPDATERULE^CREATE RULE "_UPDATE" AS ON UPDATE TO itemtaxtype DO INSTEAD UPDATE public.itemtax SET itemtax_taxzone_id = CASE WHEN ((new.tax_zone)::text = 'Any'::text) THEN NULL::integer ELSE public.gettaxzoneid((new.tax_zone)::text) END, itemtax_taxtype_id = public.gettaxtypeid(new.tax_type) WHERE (((itemtax.itemtax_item_id = public.getitemid((old.item_number)::text)) AND CASE WHEN ((old.tax_zone)::text = 'Any'::text) THEN (itemtax.itemtax_taxzone_id IS NULL) ELSE (itemtax.itemtax_taxzone_id = public.gettaxzoneid((old.tax_zone)::text)) END) AND (itemtax.itemtax_taxtype_id = public.gettaxtypeid(old.tax_type))); (DROP RULE "_UPDATE" ON api.itemtaxtype; apiadminfalse79916021611161279923523523579979979926182006239_UPDATERULErCREATE RULE "_UPDATE" AS ON UPDATE TO itemuomconversion DO INSTEAD SELECT public.saveitemuomconv(public.getitemid((new.item_number)::text), COALESCE(public.getuomid((new.uom)::text), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid((new.item_number)::text)))), COALESCE(new.uom_value, (1)::numeric), COALESCE(public.getuomid(new.per_uom), (SELECT item.item_inv_uom_id FROM public.item WHERE (item.item_id = public.getitemid((new.item_number)::text)))), COALESCE(new.per_uom_value, (1)::numeric), COALESCE(new.fractional, false), public.getuomtypeid(new.selected_types)) AS saveitemuomconv; .DROP RULE "_UPDATE" ON api.itemuomconversion; apiadminfalse800800193580080080080016880080016501602161516880026182006247_UPDATERULEGCREATE RULE "_UPDATE" AS ON UPDATE TO journalentry DO INSTEAD NOTHING; )DROP RULE "_UPDATE" ON api.journalentry; apiadminfalse80180180126182006255_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO location DO INSTEAD UPDATE public.location SET location_name = new.location, location_descrip = new.description, location_restrict = new.restricted, location_netable = new.netable, location_whsezone_id = public.getwhsezoneid((new.site)::text, new.zone), location_aisle = new.aisle, location_rack = new.rack, location_bin = new.bin WHERE ((location.location_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (location.location_name = (old.location)::text)); %DROP RULE "_UPDATE" ON api.location; apiadminfalse8028028022308028028028021621172923080280280280226182006262_UPDATERULEGCREATE RULE "_UPDATE" AS ON UPDATE TO misccounttag DO INSTEAD NOTHING; )DROP RULE "_UPDATE" ON api.misccounttag; apiadminfalse80380380326182006270_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO pricingschedule DO INSTEAD UPDATE public.ipshead SET ipshead_descrip = new.description, ipshead_effective = CASE WHEN (new.effective = 'Always'::text) THEN '1970-01-01'::date ELSE (new.effective)::date END, ipshead_expires = CASE WHEN (new.expires = 'Never'::text) THEN '2100-01-01'::date ELSE (new.expires)::date END, ipshead_updated = now(), ipshead_curr_id = CASE WHEN (SELECT (count(ipsiteminfo.ipsitem_id) = 0) FROM public.ipsiteminfo WHERE (ipsiteminfo.ipsitem_ipshead_id = public.getipsheadid((old.name)::text))) THEN COALESCE(public.getcurrid((new.currency)::text), public.basecurrid()) ELSE public.getcurrid((old.currency)::text) END WHERE (ipshead.ipshead_name = (old.name)::text); ,DROP RULE "_UPDATE" ON api.pricingschedule; apiadminfalse804147210148042402191690804240804804804804#26182006279_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO pricingscheduleassign DO INSTEAD UPDATE public.ipsass SET ipsass_ipshead_id = public.getipsheadid((new.pricing_schedule)::text), ipsass_cust_id = CASE WHEN ((new.customer_number)::text = 'Any'::text) THEN (-1) ELSE public.getcustid((new.customer_number)::text) END, ipsass_custtype_id = CASE WHEN ((new.customer_type)::text = 'N/A'::text) THEN (-1) ELSE public.getcusttypeid((new.customer_type)::text) END, ipsass_custtype_pattern = new.customer_type_pattern, ipsass_shipto_id = CASE WHEN (((new.customer_number)::text = 'Any'::text) OR ((new.customer_shipto)::text = 'Any'::text)) THEN (-1) ELSE public.getshiptoid((new.customer_number)::text, (new.customer_shipto)::text) END, ipsass_shipto_pattern = new.customer_shipto_pattern WHERE ((((((ipsass.ipsass_ipshead_id = public.getipsheadid((old.pricing_schedule)::text)) AND (ipsass.ipsass_cust_id = CASE WHEN ((old.customer_number)::text = 'Any'::text) THEN (-1) ELSE public.getcustid((old.customer_number)::text) END)) AND (ipsass.ipsass_custtype_id = CASE WHEN ((old.customer_type)::text = 'N/A'::text) THEN (-1) ELSE public.getcusttypeid((old.customer_type)::text) END)) AND (ipsass.ipsass_custtype_pattern = (old.customer_type_pattern)::text)) AND (ipsass.ipsass_shipto_id = CASE WHEN ((old.customer_shipto)::text = 'Any'::text) THEN (-1) ELSE public.getshiptoid((old.customer_number)::text, (old.customer_shipto)::text) END)) AND (ipsass.ipsass_shipto_pattern = (old.customer_shipto_pattern)::text)); 2DROP RULE "_UPDATE" ON api.pricingscheduleassign; apiadminfalse8058058058052392398051664169023915991216239239239805805805'26182006289_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO pricingscheduleitem DO INSTEAD SELECT CASE WHEN ((old.type)::text = 'Item'::text) THEN public.saveipsitem(public.getipsitemid((old.pricing_schedule)::text, (old.item_number)::text, old.qty_break, (old.qty_uom)::text, (old.price_uom)::text), public.getipsheadid((new.pricing_schedule)::text), public.getitemid((new.item_number)::text), new.qty_break, new.price, public.getuomid((new.qty_uom)::text), public.getuomid((new.price_uom)::text), new.percent, new.fixedamt, CASE new.pricing_type WHEN 'Nominal'::text THEN 'N'::text WHEN 'Discount'::text THEN 'D'::text WHEN 'Markup'::text THEN 'M'::text ELSE '?'::text END) WHEN ((old.type)::text = 'Product Category'::text) THEN public.saveipsprodcat(public.getipsprodcatid((old.pricing_schedule)::text, (old.product_category)::text, old.qty_break), public.getipsheadid((new.pricing_schedule)::text), public.getprodcatid((new.product_category)::text), new.qty_break, new.percent, new.fixedamt, CASE new.pricing_type WHEN 'Nominal'::text THEN 'N'::text WHEN 'Discount'::text THEN 'D'::text WHEN 'Markup'::text THEN 'M'::text ELSE '?'::text END) ELSE NULL::integer END AS result; 0DROP RULE "_UPDATE" ON api.pricingscheduleitem; apiadminfalse80680680680680680680680619341546155980616908061580195616028061650806806+26182006298_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO pricingscheduleitemchar DO INSTEAD UPDATE public.ipsitemchar SET ipsitemchar_price = new.price WHERE (((ipsitemchar.ipsitemchar_ipsitem_id = public.getipsitemid((old.pricing_schedule)::text, (old.item_number)::text, old.qty_break, (old.qty_uom)::text, (old.price_uom)::text)) AND (ipsitemchar.ipsitemchar_char_id = public.getcharid((old.characteristic)::text, 'I'::text))) AND (ipsitemchar.ipsitemchar_value = (old.value)::text)); 4DROP RULE "_UPDATE" ON api.pricingscheduleitemchar; apiadminfalse80780780780780714318078078072422422421546807807/26182006305_UPDATERULEGCREATE RULE "_UPDATE" AS ON UPDATE TO project DO INSTEAD UPDATE public.prj SET prj_name = new.name, prj_descrip = new.description, prj_owner_username = new.owner, prj_username = new.assigned_to, prj_so = new.sales_orders, prj_wo = new.work_orders, prj_po = new.purchase_orders, prj_status = CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, prj_due_date = new.due, prj_assigned_date = new.assigned, prj_start_date = new.started, prj_completed_date = new.completed WHERE (prj.prj_number = old.number); $DROP RULE "_UPDATE" ON api.project; apiadminfalse808808808808808808808808174808808808808808808808326182006312_UPDATERULEICREATE RULE "_UPDATE" AS ON UPDATE TO projectcomment DO INSTEAD NOTHING; +DROP RULE "_UPDATE" ON api.projectcomment; apiadminfalse809809809726182006321_UPDATERULE_CREATE RULE "_UPDATE" AS ON UPDATE TO prospect DO INSTEAD UPDATE public.prospect SET prospect_number = upper((new.prospect_number)::text), prospect_name = new.prospect_name, prospect_active = new.active, prospect_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.contact_address_number), new.contact_address_number, new.contact_address1, new.contact_address2, new.contact_address3, new.contact_city, new.contact_state, new.contact_postalcode, new.contact_country, new.contact_address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), prospect_taxzone_id = public.gettaxzoneid(new.default_tax_zone), prospect_salesrep_id = public.getsalesrepid(new.sales_rep), prospect_warehous_id = public.getwarehousid(new.site_code, 'ACTIVE'::text), prospect_comments = new.notes WHERE (prospect.prospect_id = public.getprospectid((old.prospect_number)::text)); %DROP RULE "_UPDATE" ON api.prospect; apiadminfalse81081016218101931810810810810161281081081081081081081081081081081081081081081081013928108108108102441924810158181081081015581590<26182006333_UPDATERULEPCREATE RULE "_UPDATE" AS ON UPDATE TO purchaseline DO INSTEAD UPDATE public.poitem SET poitem_duedate = new.due_date, poitem_qty_ordered = new.qty_ordered, poitem_unitprice = new.unit_price, poitem_vend_item_number = new.vend_item_number, poitem_vend_item_descrip = new.vendor_description, poitem_manuf_name = new.manufacturer_name, poitem_manuf_item_number = new.manufacturer_item_number, poitem_manuf_item_descrip = new.manufacturer_description, poitem_comments = new.notes, poitem_freight = new.freight, poitem_prj_id = public.getprjid(new.project_number), poitem_bom_rev_id = public.getrevid('BOM'::text, old.item_number, new.bill_of_materials_revision), poitem_boo_rev_id = public.getrevid('BOO'::text, old.item_number, new.bill_of_operations_revision) WHERE (poitem.poitem_id = public.getpoitemid((old.order_number)::text, old.line_number)); )DROP RULE "_UPDATE" ON api.purchaseline; apiadminfalse811811158481181181181181117981181181181181181181181181181181115781577@26182006343_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO purchaselinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('PI'::text, poitem.poitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.pohead, public.poitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((pohead.pohead_number = (old.order_number)::text) AND (pohead.pohead_id = poitem.poitem_pohead_id)) AND (poitem.poitem_linenumber = old.line_number)) AND (poitem.poitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic)); -DROP RULE "_UPDATE" ON api.purchaselinechar; apiadminfalse8121691798121851791858128121691861798121781681861788121369186179D26182006353_UPDATERULENCREATE RULE "_UPDATE" AS ON UPDATE TO purchaselinecomment DO INSTEAD NOTHING; 0DROP RULE "_UPDATE" ON api.purchaselinecomment; apiadminfalse813813813H26182006362_UPDATERULE CREATE RULE "_UPDATE" AS ON UPDATE TO purchaseorder DO INSTEAD UPDATE public.pohead SET pohead_terms_id = public.gettermsid(new.terms), pohead_taxzone_id = public.gettaxzoneid(new.tax_zone), pohead_warehous_id = public.getwarehousid(new.receiving_site, 'ALL'::text), pohead_agent_username = new.purchasing_agent, pohead_vendaddr_id = CASE WHEN (new.alt_address = 'MAIN'::text) THEN NULL::integer ELSE public.getvendaddrid(old.vendor_number, new.alt_address) END, pohead_fob = new.fob, pohead_shipvia = new.ship_via, pohead_curr_id = public.getcurrid((new.currency)::text), pohead_freight = new.freight, pohead_comments = new.notes, pohead_dropship = new.dropship, pohead_vend_cntct_id = public.getcntctid(new.vend_contact_number), pohead_vend_cntct_honorific = new.vend_cntct_honorific, pohead_vend_cntct_first_name = new.vend_cntct_first_name, pohead_vend_cntct_middle = new.vend_cntct_middle, pohead_vend_cntct_last_name = new.vend_cntct_last_name, pohead_vend_cntct_suffix = new.vend_cntct_suffix, pohead_vend_cntct_phone = new.vend_cntct_phone, pohead_vend_cntct_title = new.vend_cntct_title, pohead_vend_cntct_fax = new.vend_cntct_fax, pohead_vend_cntct_email = new.vend_cntct_email, pohead_vendaddress1 = new.vendaddress1, pohead_vendaddress2 = new.vendaddress2, pohead_vendaddress3 = new.vendaddress3, pohead_vendcity = new.vendcity, pohead_vendstate = new.vendstate, pohead_vendzipcode = new.vendzipcode, pohead_vendcountry = new.vendcountry, pohead_shipto_cntct_id = public.getcntctid(new.shipto_contact_number), pohead_shipto_cntct_honorific = new.shipto_cntct_honorific, pohead_shipto_cntct_first_name = new.shipto_cntct_first_name, pohead_shipto_cntct_middle = new.shipto_cntct_middle, pohead_shipto_cntct_last_name = new.shipto_cntct_last_name, pohead_shipto_cntct_suffix = new.shipto_cntct_suffix, pohead_shipto_cntct_phone = new.shipto_cntct_phone, pohead_shipto_cntct_title = new.shipto_cntct_title, pohead_shipto_cntct_fax = new.shipto_cntct_fax, pohead_shipto_cntct_email = new.shipto_cntct_email, pohead_shiptoaddress_id = public.getaddrid(new.shiptoaddress_number), pohead_shiptoaddress1 = new.shiptoaddress1, pohead_shiptoaddress2 = new.shiptoaddress2, pohead_shiptoaddress3 = new.shiptoaddress3, pohead_shiptocity = new.shiptocity, pohead_shiptostate = new.shiptostate, pohead_shiptozipcode = new.shiptozipcode, pohead_shiptocountry = new.shiptocountry, pohead_cohead_id = public.getcoheadid(new.sales_order_number) WHERE (pohead.pohead_number = (old.order_number)::text); *DROP RULE "_UPDATE" ON api.purchaseorder; apiadminfalse81481481481481481481481481481481481481481481415588141472814139281416131612814814145681481481481481481416218141618814178814814814814814814814814814814814814814814814814814814814814814814814L26182006370_UPDATERULEOCREATE RULE "_UPDATE" AS ON UPDATE TO purchaseordercomment DO INSTEAD NOTHING; 1DROP RULE "_UPDATE" ON api.purchaseordercomment; apiadminfalse815815815P26182006379_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO quote DO INSTEAD UPDATE public.quhead SET quhead_number = old.quote_number, quhead_cust_id = public.getcustid(new.customer_number, true), quhead_custponumber = new.cust_po_number, quhead_quotedate = new.quote_date, quhead_warehous_id = public.getwarehousid(new.site, 'SHIPPING'::text), quhead_shipto_id = public.getshiptoid(new.customer_number, new.shipto_number), quhead_shiptoname = new.shipto_name, quhead_shiptoaddress1 = new.shipto_address1, quhead_shiptoaddress2 = new.shipto_address2, quhead_shiptoaddress3 = new.shipto_address3, quhead_salesrep_id = public.getsalesrepid(new.sales_rep), quhead_terms_id = public.gettermsid(new.terms), quhead_fob = new.fob, quhead_shipvia = new.ship_via, quhead_shiptocity = new.shipto_city, quhead_shiptostate = new.shipto_state, quhead_shiptozipcode = new.shipto_postal_code, quhead_freight = new.freight, quhead_misc = new.misc_charge, quhead_ordercomments = new.order_notes, quhead_shipcomments = new.shipping_notes, quhead_shiptophone = new.shipto_phone, quhead_billtoname = new.billto_name, quhead_billtoaddress1 = new.billto_address1, quhead_billtoaddress2 = new.billto_address2, quhead_billtoaddress3 = new.billto_address3, quhead_billtocity = new.billto_city, quhead_billtostate = new.billto_state, quhead_billtozip = new.billto_postal_code, quhead_misc_accnt_id = public.getglaccntid(new.misc_account_number), quhead_misc_descrip = new.misc_charge_description, quhead_commission = new.commission, quhead_packdate = new.pack_date, quhead_prj_id = public.getprjid(new.project_number), quhead_billtocountry = new.billto_country, quhead_shiptocountry = new.shipto_country, quhead_curr_id = public.getcurrid((new.currency)::text), quhead_taxzone_id = public.gettaxzoneid(new.tax_zone), quhead_taxtype_id = public.gettaxtypeid(new.tax_type), quhead_expire = new.expire_date, quhead_saletype_id = public.getsaletypeid(new.sale_type), quhead_shipzone_id = public.getshipzoneid(new.shipto_shipzone) WHERE (quhead.quhead_number = (old.quote_number)::text); "DROP RULE "_UPDATE" ON api.quote; apiadminfalse816159916118161612816153515901578161314721621816816816816816816147781681681681681681624981681681681681681681681615918168168168168168168168168168168168168168168168168168168168161604816T26182006387_UPDATERULEGCREATE RULE "_UPDATE" AS ON UPDATE TO quotecomment DO INSTEAD NOTHING; )DROP RULE "_UPDATE" ON api.quotecomment; apiadminfalse817817817X26182006396_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO quoteline DO INSTEAD UPDATE public.quitem SET quitem_scheddate = new.scheduled_date, quitem_qtyord = new.qty_ordered, quitem_qty_uom_id = public.getuomid(new.qty_uom), quitem_qty_invuomratio = public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.qty_uom), item.item_inv_uom_id), item.item_inv_uom_id), quitem_price = new.net_unit_price, quitem_price_uom_id = public.getuomid(new.price_uom), quitem_price_invuomratio = public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.price_uom), item.item_inv_uom_id), item.item_inv_uom_id), quitem_memo = new.notes, quitem_createorder = new.create_order, quitem_order_warehous_id = public.getwarehousid(new.supplying_site, 'SHIPPING'::text), quitem_prcost = new.overwrite_po_price, quitem_taxtype_id = public.gettaxtypeid(new.tax_type) FROM public.item WHERE ((quitem.quitem_quhead_id = public.getquoteid(old.quote_number)) AND (quitem.quitem_linenumber = old.line_number)); &DROP RULE "_UPDATE" ON api.quoteline; apiadminfalse81818178181611818818818818168818818165015828181621818818818818818168250250\26182006406_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO quotelinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('QI'::text, quitem.quitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.quhead, public.quitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((quhead.quhead_number = old.quote_number) AND (quhead.quhead_id = quitem.quitem_quhead_id)) AND (quitem.quitem_linenumber = old.line_number)) AND (quitem.quitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic)); *DROP RULE "_UPDATE" ON api.quotelinechar; apiadminfalse8191369250250185169169185250249819250819819819186186186249168819`26182006415_UPDATERULEKCREATE RULE "_UPDATE" AS ON UPDATE TO quotelinecomment DO INSTEAD NOTHING; -DROP RULE "_UPDATE" ON api.quotelinecomment; apiadminfalse820820820f26182006430_UPDATERULEGCREATE RULE "_UPDATE" AS ON UPDATE TO saleshistory DO INSTEAD NOTHING; )DROP RULE "_UPDATE" ON api.saleshistory; apiadminfalse822822822j26182006441_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO saleslinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('SI'::text, coitem.coitem_id, charass.charass_char_id, new.value, public.itemcharprice(item.item_id, "char".char_id, new.value, cohead.cohead_cust_id, cohead.cohead_shipto_id, coitem.coitem_qtyord, cohead.cohead_curr_id, cohead.cohead_orderdate)) AS updatecharassignment FROM public.cohead, public.coitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((cohead.cohead_number = (old.order_number)::text) AND (cohead.cohead_id = coitem.coitem_cohead_id)) AND (coitem.coitem_id = public.getcoitemid((old.order_number)::text, old.line_number))) AND (coitem.coitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic)); *DROP RULE "_UPDATE" ON api.saleslinechar; apiadminfalse823176823169417717782382317620431465176185177185823186823186177176169169168176186176n26182006450_UPDATERULEKCREATE RULE "_UPDATE" AS ON UPDATE TO saleslinecomment DO INSTEAD NOTHING; -DROP RULE "_UPDATE" ON api.saleslinecomment; apiadminfalse824824824r26182006459_UPDATERULERCREATE RULE "_UPDATE" AS ON UPDATE TO salesorder DO INSTEAD UPDATE public.cohead SET cohead_number = old.order_number, cohead_cust_id = public.getcustid(new.customer_number), cohead_custponumber = new.cust_po_number, cohead_orderdate = new.order_date, cohead_warehous_id = public.getwarehousid(new.site, 'SHIPPING'::text), cohead_shipto_id = public.getshiptoid(new.customer_number, new.shipto_number), cohead_shiptoname = new.shipto_name, cohead_shiptoaddress1 = new.shipto_address1, cohead_shiptoaddress2 = new.shipto_address2, cohead_shiptoaddress3 = new.shipto_address3, cohead_salesrep_id = public.getsalesrepid(new.sales_rep), cohead_terms_id = public.gettermsid(new.terms), cohead_fob = new.fob, cohead_shipvia = new.ship_via, cohead_shiptocity = new.shipto_city, cohead_shiptostate = new.shipto_state, cohead_shiptozipcode = new.shipto_postal_code, cohead_freight = CASE WHEN new.calculate_freight THEN COALESCE((SELECT sum(freightdetail.freightdata_total) AS sum FROM public.freightdetail('SO'::text, public.getcoheadid((old.order_number)::text), public.getcustid(new.customer_number), public.getshiptoid(new.customer_number, new.shipto_number), new.order_date, new.ship_via, public.getcurrid((new.currency)::text)) freightdetail(freightdata_schedule, freightdata_from, freightdata_to, freightdata_shipvia, freightdata_freightclass, freightdata_weight, freightdata_uom, freightdata_price, freightdata_type, freightdata_total, freightdata_currency)), (0)::numeric) ELSE new.freight END, cohead_calcfreight = new.calculate_freight, cohead_misc = new.misc_charge, cohead_ordercomments = new.order_notes, cohead_shipcomments = new.shipping_notes, cohead_shiptophone = new.shipto_phone, cohead_shipchrg_id = public.getshipchrgid(new.shipping_chgs), cohead_shipform_id = public.getshipformid(new.shipping_form), cohead_billtoname = new.billto_name, cohead_billtoaddress1 = new.billto_address1, cohead_billtoaddress2 = new.billto_address2, cohead_billtoaddress3 = new.billto_address3, cohead_billtocity = new.billto_city, cohead_billtostate = new.billto_state, cohead_billtozipcode = new.billto_postal_code, cohead_misc_accnt_id = public.getglaccntid(new.misc_account_number), cohead_misc_descrip = new.misc_charge_description, cohead_commission = new.commission, cohead_holdtype = CASE WHEN (new.hold_type = 'Credit'::text) THEN 'C'::text WHEN (new.hold_type = 'Shipping'::text) THEN 'S'::text WHEN (new.hold_type = 'Packing'::text) THEN 'P'::text ELSE 'N'::text END, cohead_packdate = new.pack_date, cohead_prj_id = public.getprjid(new.project_number), cohead_shipcomplete = new.ship_complete, cohead_billtocountry = new.billto_country, cohead_shiptocountry = new.shipto_country, cohead_curr_id = public.getcurrid((new.currency)::text), cohead_taxzone_id = public.gettaxzoneid(new.tax_zone), cohead_lastupdated = ('now'::text)::timestamp(6) with time zone, cohead_shipto_cntct_id = public.getcntctid(new.shipto_contact_number), cohead_shipto_cntct_honorific = new.shipto_contact_honorific, cohead_shipto_cntct_first_name = new.shipto_contact_first, cohead_shipto_cntct_middle = new.shipto_contact_middle, cohead_shipto_cntct_last_name = new.shipto_contact_last, cohead_shipto_cntct_suffix = new.shipto_contact_suffix, cohead_shipto_cntct_phone = new.shipto_contact_phone, cohead_shipto_cntct_title = new.shipto_contact_title, cohead_shipto_cntct_fax = new.shipto_contact_fax, cohead_shipto_cntct_email = new.shipto_contact_email, cohead_billto_cntct_id = public.getcntctid(new.billto_contact_number), cohead_billto_cntct_honorific = new.billto_contact_name, cohead_billto_cntct_first_name = new.billto_contact_first, cohead_billto_cntct_middle = new.billto_contact_middle, cohead_billto_cntct_last_name = new.billto_contact_last, cohead_billto_cntct_suffix = new.billto_contact_suffix, cohead_billto_cntct_phone = new.billto_contact_phone, cohead_billto_cntct_title = new.billto_contact_title, cohead_billto_cntct_fax = new.billto_contct_fax, cohead_billto_cntct_email = new.billto_contact_email, cohead_saletype_id = public.getsaletypeid(new.sale_type), cohead_shipzone_id = public.getshipzoneid(new.shipto_shipzone) WHERE (cohead.cohead_number = (old.order_number)::text); 'DROP RULE "_UPDATE" ON api.salesorder; apiadminfalse8258258258258258251621825825825825825825825825825825145682582514728258251590155817616128251599825825160482515781378161382582582582582516641591159782582582582582515358258258258258258258258258258258258258258258258258258258258258258251596825825825825825825825825825825825v26182006467_UPDATERULELCREATE RULE "_UPDATE" AS ON UPDATE TO salesordercomment DO INSTEAD NOTHING; .DROP RULE "_UPDATE" ON api.salesordercomment; apiadminfalse826826826z26182006475_UPDATERULEICREATE RULE "_UPDATE" AS ON UPDATE TO salesrep DO INSTEAD UPDATE public.salesrep SET salesrep_active = new.active, salesrep_number = new.number, salesrep_name = new.name, salesrep_commission = (new.commission_percent * 0.01), salesrep_emp_id = public.getempid(new.employee) WHERE (salesrep.salesrep_number = (old.number)::text); %DROP RULE "_UPDATE" ON api.salesrep; apiadminfalse8278271638278271518827827827~26182006484_UPDATERULE CREATE RULE "_UPDATE" AS ON UPDATE TO site DO INSTEAD UPDATE public.whsinfo SET warehous_descrip = new.description, warehous_fob = CASE WHEN new.inventory_type THEN new.default_fob ELSE NULL::text END, warehous_active = new.active, warehous_counttag_prefix = CASE WHEN new.inventory_type THEN new.next_count_tag_prefix ELSE NULL::text END, warehous_counttag_number = CASE WHEN new.inventory_type THEN new.next_count_tag_number ELSE NULL::integer END, warehous_bol_prefix = CASE WHEN new.inventory_type THEN new.next_bill_of_lading_prefix ELSE NULL::text END, warehous_bol_number = CASE WHEN new.inventory_type THEN new.next_bill_of_lading_number ELSE NULL::integer END, warehous_shipping = CASE WHEN new.inventory_type THEN new.shipping_site ELSE NULL::boolean END, warehous_useslips = CASE WHEN new.inventory_type THEN new.force_the_use_of_count_slips ELSE NULL::boolean END, warehous_usezones = CASE WHEN new.inventory_type THEN new.force_the_use_of_zones ELSE NULL::boolean END, warehous_aislesize = CASE WHEN new.inventory_type THEN new.aisle_size ELSE NULL::integer END, warehous_aislealpha = CASE WHEN new.inventory_type THEN new.aisle_allow_alpha_characters ELSE NULL::boolean END, warehous_racksize = CASE WHEN new.inventory_type THEN new.rack_size ELSE NULL::integer END, warehous_rackalpha = CASE WHEN new.inventory_type THEN new.rack_allow_alpha_characters ELSE NULL::boolean END, warehous_binsize = CASE WHEN new.inventory_type THEN new.bin_size ELSE NULL::integer END, warehous_binalpha = CASE WHEN new.inventory_type THEN new.bin_allow_alpha_characters ELSE NULL::boolean END, warehous_locationsize = CASE WHEN new.inventory_type THEN new.location_size ELSE NULL::integer END, warehous_locationalpha = CASE WHEN new.inventory_type THEN new.location_allow_alpha_characters ELSE NULL::boolean END, warehous_enforcearbl = CASE WHEN new.inventory_type THEN new.enforce_arbl_naming_convention ELSE NULL::boolean END, warehous_default_accnt_id = public.getglaccntid(new.post_unassigned_transactions_to), warehous_shipping_commission = CASE WHEN new.inventory_type THEN (new.shipping_commission * 0.01) ELSE NULL::numeric END, warehous_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), warehous_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), warehous_taxzone_id = CASE WHEN new.inventory_type THEN public.gettaxzoneid(new.tax_zone) ELSE NULL::integer END, warehous_transit = CASE WHEN new.inventory_type THEN false WHEN new.transit_type THEN true ELSE NULL::boolean END, warehous_shipform_id = CASE WHEN new.transit_type THEN public.getshipformid(new.default_shipping_form) ELSE NULL::integer END, warehous_shipvia_id = CASE WHEN new.transit_type THEN public.getshipviaid(new.default_ship_via) ELSE NULL::integer END, warehous_shipcomments = CASE WHEN new.transit_type THEN new.shipping_comments ELSE NULL::text END, warehous_costcat_id = CASE WHEN new.transit_type THEN public.getcostcatid(new.default_cost_category) ELSE NULL::integer END, warehous_sitetype_id = public.getsitetypeid(new.type), warehous_sequence = new.scheduling_sequence WHERE (whsinfo.warehous_id = public.getwarehousid((old.code)::text, 'ALL'::text)); !DROP RULE "_UPDATE" ON api.site; apiadminfalse8288288288288288288288288288288288288288288288288288288288288288288288288288288288281924193116211535121382815978288281612160382882882815588281605828828828828828828828828828828828828828828828139217282882882826182006492_UPDATERULE CREATE RULE "_UPDATE" AS ON UPDATE TO sitezone DO INSTEAD UPDATE public.whsezone SET whsezone_descrip = new.description WHERE ((whsezone.whsezone_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (whsezone.whsezone_name = (old.name)::text)); %DROP RULE "_UPDATE" ON api.sitezone; apiadminfalse829238162182982982923882926182006501_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO task DO INSTEAD UPDATE public.prjtask SET prjtask_name = new.name, prjtask_descrip = new.description, prjtask_owner_username = new.owner, prjtask_username = new.assigned_to, prjtask_hours_budget = new.hours_budgeted, prjtask_hours_actual = new.hours_actual, prjtask_exp_budget = new.expenses_budgeted, prjtask_exp_actual = new.expenses_actual, prjtask_status = CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, prjtask_due_date = new.due, prjtask_assigned_date = new.assigned, prjtask_start_date = new.started, prjtask_completed_date = new.completed WHERE ((prjtask.prjtask_prj_id = public.getprjid(old.project_number)) AND (prjtask.prjtask_number = old.number)); !DROP RULE "_UPDATE" ON api.task; apiadminfalse830830830830830830830830830830157883018283018283083083083083026182006509_UPDATERULEFCREATE RULE "_UPDATE" AS ON UPDATE TO taskcomment DO INSTEAD NOTHING; (DROP RULE "_UPDATE" ON api.taskcomment; apiadminfalse83183183126182006517_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO todo DO INSTEAD SELECT public.updatetodoitem(old.task_number, old.assigned_to, new.task_name, new.description, public.getincidentid(new.incident), COALESCE(public.getincdtcrmacctid(new.incident), public.getcrmacctid(new.account)), public.getopheadid(new.opportunity), CASE WHEN (new.date_started > ''::text) THEN (new.date_started)::date ELSE NULL::date END, CASE WHEN (new.date_due > ''::text) THEN (new.date_due)::date ELSE NULL::date END, (CASE WHEN (new.status = 'Pending Input'::text) THEN 'P'::text WHEN (new.status = 'Deferred'::text) THEN 'D'::text WHEN (new.status = 'Neither'::text) THEN 'N'::text ELSE NULL::text END)::bpchar, CASE WHEN (new.date_assigned > ''::text) THEN (new.date_assigned)::date ELSE NULL::date END, CASE WHEN (new.date_completed > ''::text) THEN (new.date_completed)::date ELSE NULL::date END, public.getincdtpriorityid(new.priority), new.notes, new.active, new.owner) AS updatetodoitem; !DROP RULE "_UPDATE" ON api.todo; apiadminfalse83215391540832832832832832156783283283213881543147183283283283283283283283283226182006527_UPDATERULE CREATE RULE "_UPDATE" AS ON UPDATE TO vendor DO INSTEAD UPDATE public.vendinfo SET vend_name = new.vendor_name, vend_active = new.active, vend_po = new.sells_purchase_order_items, vend_comments = new.notes, vend_pocomments = new.po_comments, vend_1099 = new.receives_1099, vend_fobsource = CASE WHEN (new.default_fob IS NULL) THEN NULL::text WHEN (new.default_fob = 'Receiving Site'::text) THEN 'W'::text ELSE 'V'::text END, vend_fob = CASE WHEN (new.default_fob IS NULL) THEN NULL::text WHEN (new.default_fob = 'Receiving Site'::text) THEN ''::text ELSE new.default_fob END, vend_terms_id = public.gettermsid(new.default_terms), vend_shipvia = new.ship_via, vend_vendtype_id = public.getvendtypeid(new.vendor_type), vend_qualified = new.qualified, vend_ediemail = new.po_edi_email, vend_ediemailbody = new.po_edi_emailbody, vend_edisubject = new.po_edi_subject, vend_edifilename = new.po_edi_filename, vend_accntnum = new.account_number, vend_emailpodelivery = new.allow_email_po_delivery, vend_restrictpurch = new.may_only_sell_item_source, vend_edicc = new.po_edi_cc, vend_curr_id = public.getcurrid((new.default_currency)::text), vend_cntct1_id = public.savecntct(public.getcntctid(new.contact1_number), new.contact1_number, NULL::integer, new.contact1_honorific, new.contact1_first, new.contact1_middle, new.contact1_last, new.contact1_suffix, new.contact1_voice, new.contact1_alternate, new.contact1_fax, new.contact1_email, new.contact1_web, new.contact1_job_title, new.contact1_change), vend_cntct2_id = public.savecntct(public.getcntctid(new.contact2_number), new.contact2_number, NULL::integer, new.contact2_honorific, new.contact2_first, new.contact2_middle, new.contact2_last, new.contact2_suffix, new.contact2_voice, new.contact2_alternate, new.contact2_fax, new.contact2_email, new.contact2_web, new.contact2_job_title, new.contact2_change), vend_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), vend_match = new.matching_vo_po_amounts, vend_taxzone_id = public.gettaxzoneid(new.default_tax_zone), vend_accnt_id = COALESCE(public.getglaccntid(new.default_dist_gl_account), (-1)), vend_expcat_id = COALESCE(public.getexpcatid(new.default_dist_expense_category), (-1)), vend_tax_id = COALESCE(public.gettaxid(new.default_dist_tax_code), (-1)) WHERE (vendinfo.vend_id = public.getvendid((old.vendor_number)::text)); #DROP RULE "_UPDATE" ON api.vendor; apiadminfalse83313928331558833153583383383316108338331612833833833833833151916208338338338338338338331924833833833833833833833833833833833833833833833833833833833833833193183316138331472833833833833833833833833833833833833833833833833158833833161983383326182006536_UPDATERULE_CREATE RULE "_UPDATE" AS ON UPDATE TO vendoraddress DO INSTEAD UPDATE public.vendaddrinfo SET vendaddr_vend_id = public.getvendid((new.vendor_number)::text), vendaddr_code = new.vendor_address_number, vendaddr_name = new.vendor_address_name, vendaddr_comments = new.notes, vendaddr_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), vendaddr_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change) WHERE (vendaddrinfo.vendaddr_id = public.getvendaddrid((old.vendor_number)::text, (old.vendor_address_number)::text)); *DROP RULE "_UPDATE" ON api.vendoraddress; apiadminfalse83483419248348348348341558834193183483483483483483483483483483483483483483483424816191618834834139283483483483426182006543_UPDATERULECREATE RULE "_UPDATE" AS ON UPDATE TO vendortype DO INSTEAD UPDATE public.vendtype SET vendtype_code = new.code, vendtype_descrip = new.description WHERE (vendtype.vendtype_code = (old.code)::text); 'DROP RULE "_UPDATE" ON api.vendortype; apiadminfalse83525883583583526181688471_DELETERULE>CREATE RULE "_DELETE" AS ON DELETE TO url DO INSTEAD NOTHING; #DROP RULE "_DELETE" ON public.url; publicadminfalse19219219226181688473 _DELETE_FILERULECREATE RULE "_DELETE_FILE" AS ON DELETE TO url WHERE (old.url_stream IS NOT NULL) DO INSTEAD SELECT deletefile(old.url_id) AS deletefile; (DROP RULE "_DELETE_FILE" ON public.url; publicadminfalse192192192146319226181688474 _DELETE_URLRULECREATE RULE "_DELETE_URL" AS ON DELETE TO url WHERE (old.url_stream IS NULL) DO INSTEAD SELECT deleteurl(old.url_id) AS deleteurl; 'DROP RULE "_DELETE_URL" ON public.url; publicadminfalse192149719219219226181688475_INSERTRULE>CREATE RULE "_INSERT" AS ON INSERT TO url DO INSTEAD NOTHING; #DROP RULE "_INSERT" ON public.url; publicadminfalse19219219226181688477 _INSERT_FILERULECREATE RULE "_INSERT_FILE" AS ON INSERT TO url WHERE (new.url_stream IS NOT NULL) DO INSTEAD INSERT INTO docass (docass_id, docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose) VALUES (COALESCE((new.url_id)::bigint, nextval('docass_docass_id_seq'::regclass)), new.url_source_id, new.url_source, createfile(new.url_title, new.url_url, new.url_stream), 'FILE'::text, 'S'::bpchar); (DROP RULE "_INSERT_FILE" ON public.url; publicadminfalse192192110719218919219219219319219219226181688478 _INSERT_URLRULECREATE RULE "_INSERT_URL" AS ON INSERT TO url WHERE (new.url_stream IS NULL) DO INSTEAD INSERT INTO docass (docass_id, docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose) VALUES (COALESCE((new.url_id)::bigint, nextval('docass_docass_id_seq'::regclass)), new.url_source_id, new.url_source, createurl(new.url_title, new.url_url), 'URL'::text, 'S'::bpchar); 'DROP RULE "_INSERT_URL" ON public.url; publicadminfalse192111119218919219219219219219219326181688479_UPDATERULE>CREATE RULE "_UPDATE" AS ON UPDATE TO url DO INSTEAD NOTHING; #DROP RULE "_UPDATE" ON public.url; publicadminfalse19219219226181688481 _UPDATE_FILERULE9CREATE RULE "_UPDATE_FILE" AS ON UPDATE TO url WHERE (new.url_stream IS NOT NULL) DO INSTEAD UPDATE file SET file_title = new.url_title, file_stream = new.url_stream FROM docass WHERE (((docass.docass_id = old.url_id) AND (docass.docass_target_id = file.file_id)) AND (docass.docass_target_type = 'FILE'::text)); (DROP RULE "_UPDATE_FILE" ON public.url; publicadminfalse19219218918918919219219019219226181688482 _UPDATE_URLRULE0CREATE RULE "_UPDATE_URL" AS ON UPDATE TO url WHERE (new.url_stream IS NULL) DO INSTEAD UPDATE urlinfo SET url_title = new.url_title, url_url = new.url_url FROM docass WHERE (((docass.docass_id = old.url_id) AND (docass.docass_target_id = urlinfo.url_id)) AND (docass.docass_target_type = 'URL'::text)); 'DROP RULE "_UPDATE_URL" ON public.url; publicadminfalse19218918918919219119219219219226201688508pkgcmdaftertriggerTRIGGERCREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger(); 6DROP TRIGGER pkgcmdaftertrigger ON fixcountry.pkgcmd;  fixcountryadminfalse261222726201688509pkgcmdaltertriggerTRIGGERCREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger(); 6DROP TRIGGER pkgcmdaltertrigger ON fixcountry.pkgcmd;  fixcountryadminfalse261227426201688510pkgcmdargaftertriggerTRIGGERCREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger(); <DROP TRIGGER pkgcmdargaftertrigger ON fixcountry.pkgcmdarg;  fixcountryadminfalse264219826201688511pkgcmdargaltertriggerTRIGGERCREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger(); <DROP TRIGGER pkgcmdargaltertrigger ON fixcountry.pkgcmdarg;  fixcountryadminfalse264226926201688512pkgcmdargbeforetriggerTRIGGERCREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger(); =DROP TRIGGER pkgcmdargbeforetrigger ON fixcountry.pkgcmdarg;  fixcountryadminfalse264226826201688513pkgcmdbeforetriggerTRIGGERCREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger(); 7DROP TRIGGER pkgcmdbeforetrigger ON fixcountry.pkgcmd;  fixcountryadminfalse226726126201688514pkgimageaftertriggerTRIGGERCREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger(); :DROP TRIGGER pkgimageaftertrigger ON fixcountry.pkgimage;  fixcountryadminfalse227026626201688515pkgimagealtertriggerTRIGGERCREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger(); :DROP TRIGGER pkgimagealtertrigger ON fixcountry.pkgimage;  fixcountryadminfalse218526626201688516pkgimagebeforetriggerTRIGGERCREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger(); ;DROP TRIGGER pkgimagebeforetrigger ON fixcountry.pkgimage;  fixcountryadminfalse266218426201688517pkgmetasqlaftertriggerTRIGGERCREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger(); >DROP TRIGGER pkgmetasqlaftertrigger ON fixcountry.pkgmetasql;  fixcountryadminfalse269227526201688518pkgmetasqlaltertriggerTRIGGERCREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger(); >DROP TRIGGER pkgmetasqlaltertrigger ON fixcountry.pkgmetasql;  fixcountryadminfalse269218726201688519pkgmetasqlbeforetriggerTRIGGERCREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger(); ?DROP TRIGGER pkgmetasqlbeforetrigger ON fixcountry.pkgmetasql;  fixcountryadminfalse218626926201688520pkgprivaftertriggerTRIGGERCREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger(); 8DROP TRIGGER pkgprivaftertrigger ON fixcountry.pkgpriv;  fixcountryadminfalse272223826201688521pkgprivaltertriggerTRIGGERCREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger(); 8DROP TRIGGER pkgprivaltertrigger ON fixcountry.pkgpriv;  fixcountryadminfalse218927226201688522pkgprivbeforetriggerTRIGGERCREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger(); 9DROP TRIGGER pkgprivbeforetrigger ON fixcountry.pkgpriv;  fixcountryadminfalse218827226201688523pkgreportaftertriggerTRIGGERCREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger(); <DROP TRIGGER pkgreportaftertrigger ON fixcountry.pkgreport;  fixcountryadminfalse275227626201688524pkgreportaltertriggerTRIGGERCREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger(); <DROP TRIGGER pkgreportaltertrigger ON fixcountry.pkgreport;  fixcountryadminfalse219127526201688525pkgreportbeforetriggerTRIGGERCREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger(); =DROP TRIGGER pkgreportbeforetrigger ON fixcountry.pkgreport;  fixcountryadminfalse275219026201688526pkgscriptaftertriggerTRIGGERCREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger(); <DROP TRIGGER pkgscriptaftertrigger ON fixcountry.pkgscript;  fixcountryadminfalse227127826201688527pkgscriptaltertriggerTRIGGERCREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger(); <DROP TRIGGER pkgscriptaltertrigger ON fixcountry.pkgscript;  fixcountryadminfalse278221126201688528pkgscriptbeforetriggerTRIGGERCREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger(); =DROP TRIGGER pkgscriptbeforetrigger ON fixcountry.pkgscript;  fixcountryadminfalse278227826201688529pkguiformaftertriggerTRIGGERCREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger(); <DROP TRIGGER pkguiformaftertrigger ON fixcountry.pkguiform;  fixcountryadminfalse281227226201688530pkguiformaltertriggerTRIGGERCREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger(); <DROP TRIGGER pkguiformaltertrigger ON fixcountry.pkguiform;  fixcountryadminfalse281219326201688531pkguiformbeforetriggerTRIGGERCREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger(); =DROP TRIGGER pkguiformbeforetrigger ON fixcountry.pkguiform;  fixcountryadminfalse219228126202005603accntdeletetriggerTRIGGER{CREATE TRIGGER accntdeletetrigger BEFORE DELETE ON accnt FOR EACH ROW EXECUTE PROCEDURE _accntdeletetrigger(); 1DROP TRIGGER accntdeletetrigger ON public.accnt; publicadminfalse208519926202005601 accnttriggerTRIGGERyCREATE TRIGGER accnttrigger BEFORE INSERT OR UPDATE ON accnt FOR EACH ROW EXECUTE PROCEDURE _accnttrigger(); +DROP TRIGGER accnttrigger ON public.accnt; publicadminfalse208419926202005602accntuniquetriggerTRIGGER{CREATE TRIGGER accntuniquetrigger BEFORE INSERT ON accnt FOR EACH ROW EXECUTE PROCEDURE _accntuniquetrigger(); 1DROP TRIGGER accntuniquetrigger ON public.accnt; publicadminfalse199209326202005604 addrtriggerTRIGGERCREATE TRIGGER addrtrigger BEFORE INSERT OR DELETE OR UPDATE ON addr FOR EACH ROW EXECUTE PROCEDURE _addrtrigger(); )DROP TRIGGER addrtrigger ON public.addr; publicadminfalse184208826202005605alarmbeforetriggerTRIGGER{CREATE TRIGGER alarmbeforetrigger BEFORE INSERT ON alarm FOR EACH ROW EXECUTE PROCEDURE _alarmbeforetrigger(); 1DROP TRIGGER alarmbeforetrigger ON public.alarm; publicadminfalse210228526202005606apapplytriggerTRIGGERCREATE TRIGGER apapplytrigger BEFORE INSERT OR UPDATE ON apapply FOR EACH ROW EXECUTE PROCEDURE _apapplytrigger(); /DROP TRIGGER apapplytrigger ON public.apapply; publicadminfalse2892089Z26202005607 apopentriggerTRIGGER|CREATE TRIGGER apopentrigger BEFORE INSERT OR UPDATE ON apopen FOR EACH ROW EXECUTE PROCEDURE _apopentrigger(); -DROP TRIGGER apopentrigger ON public.apopen; publicadminfalse209015526202005608arapplytriggerTRIGGERCREATE TRIGGER arapplytrigger BEFORE INSERT OR UPDATE ON arapply FOR EACH ROW EXECUTE PROCEDURE _arapplytrigger(); /DROP TRIGGER arapplytrigger ON public.arapply; publicadminfalse2091300b26202005611aropenaftertriggerTRIGGERCREATE TRIGGER aropenaftertrigger AFTER INSERT OR UPDATE ON aropen FOR EACH ROW EXECUTE PROCEDURE _aropenaftertrigger(); 2DROP TRIGGER aropenaftertrigger ON public.aropen; publicadminfalse1592092a26202005610 aropentriggerTRIGGER|CREATE TRIGGER aropentrigger BEFORE INSERT OR UPDATE ON aropen FOR EACH ROW EXECUTE PROCEDURE _aropentrigger(); -DROP TRIGGER aropentrigger ON public.aropen; publicadminfalse217615926202005612bomheadtriggerTRIGGERCREATE TRIGGER bomheadtrigger AFTER INSERT OR DELETE OR UPDATE ON bomhead FOR EACH ROW EXECUTE PROCEDURE _bomheadtrigger(); /DROP TRIGGER bomheadtrigger ON public.bomhead; publicadminfalse1962149P26202005615bomitemaftertriggerTRIGGERCREATE TRIGGER bomitemaftertrigger AFTER INSERT OR UPDATE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitemaftertrigger(); 4DROP TRIGGER bomitemaftertrigger ON public.bomitem; publicadminfalse1512095Q26202005616bomitembeforedeletetriggerTRIGGERCREATE TRIGGER bomitembeforedeletetrigger BEFORE DELETE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitembeforedeletetrigger(); ;DROP TRIGGER bomitembeforedeletetrigger ON public.bomitem; publicadminfalse2096151O26202005614bomitembeforetriggerTRIGGERCREATE TRIGGER bomitembeforetrigger BEFORE INSERT OR UPDATE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitembeforetrigger(); 5DROP TRIGGER bomitembeforetrigger ON public.bomitem; publicadminfalse151209426202005617bomitemsubtriggerTRIGGERCREATE TRIGGER bomitemsubtrigger BEFORE INSERT OR DELETE OR UPDATE ON bomitemsub FOR EACH ROW EXECUTE PROCEDURE _bomitemsubtrigger(); 5DROP TRIGGER bomitemsubtrigger ON public.bomitemsub; publicadminfalse197209726202005620cashrcptitemaftertriggerTRIGGERCREATE TRIGGER cashrcptitemaftertrigger AFTER INSERT OR UPDATE ON cashrcptitem FOR EACH ROW EXECUTE PROCEDURE _cashrcptitemaftertrigger(); >DROP TRIGGER cashrcptitemaftertrigger ON public.cashrcptitem; publicadminfalse210020426202005619cashrcptitemtriggerTRIGGERCREATE TRIGGER cashrcptitemtrigger BEFORE INSERT OR UPDATE ON cashrcptitem FOR EACH ROW EXECUTE PROCEDURE _cashrcptitemtrigger(); 9DROP TRIGGER cashrcptitemtrigger ON public.cashrcptitem; publicadminfalse209920426202005621cashrcptmisctriggerTRIGGERCREATE TRIGGER cashrcptmisctrigger BEFORE INSERT OR UPDATE ON cashrcptmisc FOR EACH ROW EXECUTE PROCEDURE _cashrcptmisctrigger(); 9DROP TRIGGER cashrcptmisctrigger ON public.cashrcptmisc; publicadminfalse205210326202005618cashrcpttriggerTRIGGERCREATE TRIGGER cashrcpttrigger BEFORE INSERT OR UPDATE ON cashrcpt FOR EACH ROW EXECUTE PROCEDURE _cashrcpttrigger(); 1DROP TRIGGER cashrcpttrigger ON public.cashrcpt; publicadminfalse209820326202005622 ccardtriggerTRIGGERyCREATE TRIGGER ccardtrigger BEFORE INSERT OR UPDATE ON ccard FOR EACH ROW EXECUTE PROCEDURE _ccardtrigger(); +DROP TRIGGER ccardtrigger ON public.ccard; publicadminfalse206210426202005625charasshistorytriggerTRIGGERCREATE TRIGGER charasshistorytrigger BEFORE INSERT OR DELETE OR UPDATE ON charass FOR EACH ROW EXECUTE PROCEDURE _charasshistorytrigger(); 6DROP TRIGGER charasshistorytrigger ON public.charass; publicadminfalse186210826202005624charasstriggerTRIGGER~CREATE TRIGGER charasstrigger AFTER INSERT OR UPDATE ON charass FOR EACH ROW EXECUTE PROCEDURE _charasstrigger(); /DROP TRIGGER charasstrigger ON public.charass; publicadminfalse186210526202005623charbeforetriggerTRIGGERCREATE TRIGGER charbeforetrigger BEFORE INSERT OR UPDATE ON "char" FOR EACH ROW EXECUTE PROCEDURE _charbeforetrigger(); 1DROP TRIGGER charbeforetrigger ON public."char"; publicadminfalse211418526202005626charopttriggerTRIGGER~CREATE TRIGGER charopttrigger AFTER DELETE OR UPDATE ON charopt FOR EACH ROW EXECUTE PROCEDURE _charopttrigger(); /DROP TRIGGER charopttrigger ON public.charopt; publicadminfalse346211926202005627checkheadbeforetriggerTRIGGERCREATE TRIGGER checkheadbeforetrigger BEFORE INSERT OR UPDATE ON checkhead FOR EACH ROW EXECUTE PROCEDURE _checkheadbeforetrigger(); 9DROP TRIGGER checkheadbeforetrigger ON public.checkhead; publicadminfalse2109348j26202005628cmheadbeforetriggerTRIGGERCREATE TRIGGER cmheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cmhead FOR EACH ROW EXECUTE PROCEDURE _cmheadbeforetrigger(); 3DROP TRIGGER cmheadbeforetrigger ON public.cmhead; publicadminfalse1642163k26202005629 cmheadtriggerTRIGGERCREATE TRIGGER cmheadtrigger AFTER INSERT OR DELETE OR UPDATE ON cmhead FOR EACH ROW EXECUTE PROCEDURE _cmheadtrigger(); -DROP TRIGGER cmheadtrigger ON public.cmhead; publicadminfalse2110164m26202005630cmitembeforetriggerTRIGGERCREATE TRIGGER cmitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cmitem FOR EACH ROW EXECUTE PROCEDURE _cmitembeforetrigger(); 3DROP TRIGGER cmitembeforetrigger ON public.cmitem; publicadminfalse1672111n26202005631 cmitemtriggerTRIGGERCREATE TRIGGER cmitemtrigger AFTER INSERT OR DELETE OR UPDATE ON cmitem FOR EACH ROW EXECUTE PROCEDURE _cmitemtrigger(); -DROP TRIGGER cmitemtrigger ON public.cmitem; publicadminfalse2112167R26202005632 cntcttriggerTRIGGERyCREATE TRIGGER cntcttrigger BEFORE INSERT OR UPDATE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttrigger(); +DROP TRIGGER cntcttrigger ON public.cntct; publicadminfalse1522115T26202005634cntcttriggerafterTRIGGERCREATE TRIGGER cntcttriggerafter AFTER INSERT OR DELETE OR UPDATE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttriggerafter(); 0DROP TRIGGER cntcttriggerafter ON public.cntct; publicadminfalse2117152S26202005633cntcttriggerbeforedeleteTRIGGERCREATE TRIGGER cntcttriggerbeforedelete BEFORE DELETE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttriggerbeforedelete(); 7DROP TRIGGER cntcttriggerbeforedelete ON public.cntct; publicadminfalse211615226202005635cntsliptriggerTRIGGERCREATE TRIGGER cntsliptrigger BEFORE INSERT OR DELETE OR UPDATE ON cntslip FOR EACH ROW EXECUTE PROCEDURE _cntsliptrigger(); /DROP TRIGGER cntsliptrigger ON public.cntslip; publicadminfalse211836926202005636cobillbeforetriggerTRIGGERCREATE TRIGGER cobillbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cobill FOR EACH ROW EXECUTE PROCEDURE _cobillbeforetrigger(); 3DROP TRIGGER cobillbeforetrigger ON public.cobill; publicadminfalse371217026202005637 cobilltriggerTRIGGERCREATE TRIGGER cobilltrigger AFTER INSERT OR DELETE OR UPDATE ON cobill FOR EACH ROW EXECUTE PROCEDURE _cobilltrigger(); -DROP TRIGGER cobilltrigger ON public.cobill; publicadminfalse371217726202005638cobmiscbeforetriggerTRIGGERCREATE TRIGGER cobmiscbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cobmisc FOR EACH ROW EXECUTE PROCEDURE _cobmiscbeforetrigger(); 5DROP TRIGGER cobmiscbeforetrigger ON public.cobmisc; publicadminfalse374217826202005639cobmisctriggerTRIGGERCREATE TRIGGER cobmisctrigger AFTER INSERT OR DELETE OR UPDATE ON cobmisc FOR EACH ROW EXECUTE PROCEDURE _cobmisctrigger(); /DROP TRIGGER cobmisctrigger ON public.cobmisc; publicadminfalse212037426202005651commenttriggerTRIGGER~CREATE TRIGGER commenttrigger AFTER INSERT OR UPDATE ON comment FOR EACH ROW EXECUTE PROCEDURE _commenttrigger(); /DROP TRIGGER commenttrigger ON public.comment; publicadminfalse188212726202005652companytriggerTRIGGERuCREATE TRIGGER companytrigger BEFORE UPDATE ON company FOR EACH ROW EXECUTE PROCEDURE _companytrigger(); /DROP TRIGGER companytrigger ON public.company; publicadminfalse21323814 26202005653contrctaftertriggerTRIGGER~CREATE TRIGGER contrctaftertrigger AFTER UPDATE ON contrct FOR EACH ROW EXECUTE PROCEDURE _contrctaftertrigger(); 4DROP TRIGGER contrctaftertrigger ON public.contrct; publicadminfalse7202133V26202005656crmacctaftertriggerTRIGGERCREATE TRIGGER crmacctaftertrigger AFTER INSERT OR DELETE OR UPDATE ON crmacct FOR EACH ROW EXECUTE PROCEDURE _crmacctaftertrigger(); 4DROP TRIGGER crmacctaftertrigger ON public.crmacct; publicadminfalse2181153U26202005654crmacctbeforetriggerTRIGGERCREATE TRIGGER crmacctbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON crmacct FOR EACH ROW EXECUTE PROCEDURE _crmacctbeforetrigger(); 5DROP TRIGGER crmacctbeforetrigger ON public.crmacct; publicadminfalse213415326202005657currexchangecheckoverlapTRIGGERCREATE TRIGGER currexchangecheckoverlap BEFORE INSERT OR UPDATE ON curr_rate FOR EACH ROW EXECUTE PROCEDURE currexchangecheckoverlap(); ;DROP TRIGGER currexchangecheckoverlap ON public.curr_rate; publicadminfalse2139396[26202005658 curronebaseTRIGGER{CREATE TRIGGER curronebase AFTER INSERT OR UPDATE ON curr_symbol FOR EACH ROW EXECUTE PROCEDURE curronebase(); 0DROP TRIGGER curronebase ON public.curr_symbol; publicadminfalse2140156d26202005661custaftertriggerTRIGGERCREATE TRIGGER custaftertrigger AFTER INSERT OR UPDATE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custaftertrigger(); 2DROP TRIGGER custaftertrigger ON public.custinfo; publicadminfalse1602182f26202005663custinfoafterdeletetriggerTRIGGERCREATE TRIGGER custinfoafterdeletetrigger AFTER DELETE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custinfoafterdeletetrigger(); <DROP TRIGGER custinfoafterdeletetrigger ON public.custinfo; publicadminfalse2144160e26202005662custinfobeforedeletetriggerTRIGGERCREATE TRIGGER custinfobeforedeletetrigger BEFORE DELETE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custinfobeforedeletetrigger(); =DROP TRIGGER custinfobeforedeletetrigger ON public.custinfo; publicadminfalse1602142c26202005659 custtriggerTRIGGERzCREATE TRIGGER custtrigger BEFORE INSERT OR UPDATE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custtrigger(); -DROP TRIGGER custtrigger ON public.custinfo; publicadminfalse214116026202005665custtypeafterdeletetriggerTRIGGERCREATE TRIGGER custtypeafterdeletetrigger AFTER DELETE ON custtype FOR EACH ROW EXECUTE PROCEDURE _custtypeafterdeletetrigger(); <DROP TRIGGER custtypeafterdeletetrigger ON public.custtype; publicadminfalse144620726202005664custtypetriggerTRIGGERCREATE TRIGGER custtypetrigger BEFORE INSERT OR UPDATE ON custtype FOR EACH ROW EXECUTE PROCEDURE _custtypetrigger(); 1DROP TRIGGER custtypetrigger ON public.custtype; publicadminfalse214520726202005666 docasstriggerTRIGGER{CREATE TRIGGER docasstrigger AFTER INSERT OR UPDATE ON docass FOR EACH ROW EXECUTE PROCEDURE _docasstrigger(); -DROP TRIGGER docasstrigger ON public.docass; publicadminfalse214618926202005670empafterdeletetriggerTRIGGER~CREATE TRIGGER empafterdeletetrigger AFTER DELETE ON emp FOR EACH ROW EXECUTE PROCEDURE _empafterdeletetrigger(); 2DROP TRIGGER empafterdeletetrigger ON public.emp; publicadminfalse215621426202005668empaftertriggerTRIGGER|CREATE TRIGGER empaftertrigger AFTER INSERT OR UPDATE ON emp FOR EACH ROW EXECUTE PROCEDURE _empaftertrigger(); ,DROP TRIGGER empaftertrigger ON public.emp; publicadminfalse214821426202005669empbeforedeletetriggerTRIGGERCREATE TRIGGER empbeforedeletetrigger BEFORE DELETE ON emp FOR EACH ROW EXECUTE PROCEDURE _empbeforedeletetrigger(); 3DROP TRIGGER empbeforedeletetrigger ON public.emp; publicadminfalse214215026202005667empbeforetriggerTRIGGERCREATE TRIGGER empbeforetrigger BEFORE INSERT OR UPDATE ON emp FOR EACH ROW EXECUTE PROCEDURE _empbeforetrigger(); -DROP TRIGGER empbeforetrigger ON public.emp; publicadminfalse214721426202005672gltransaltertriggerTRIGGERCREATE TRIGGER gltransaltertrigger BEFORE DELETE OR UPDATE ON gltrans FOR EACH ROW EXECUTE PROCEDURE _gltransaltertrigger(); 4DROP TRIGGER gltransaltertrigger ON public.gltrans; publicadminfalse237215226202005671gltransinserttriggerTRIGGERCREATE TRIGGER gltransinserttrigger BEFORE INSERT ON gltrans FOR EACH ROW EXECUTE PROCEDURE _gltransinserttrigger(); 5DROP TRIGGER gltransinserttrigger ON public.gltrans; publicadminfalse237215126202005673grpprivtriggerTRIGGERCREATE TRIGGER grpprivtrigger BEFORE INSERT OR UPDATE ON grppriv FOR EACH ROW EXECUTE PROCEDURE _grpprivtrigger(); /DROP TRIGGER grpprivtrigger ON public.grppriv; publicadminfalse215344926202005674imageasstriggerTRIGGERCREATE TRIGGER imageasstrigger AFTER INSERT OR UPDATE ON imageass FOR EACH ROW EXECUTE PROCEDURE _imageasstrigger(); 1DROP TRIGGER imageasstrigger ON public.imageass; publicadminfalse2197195X26202005676incdtbeforedeletetriggerTRIGGERCREATE TRIGGER incdtbeforedeletetrigger BEFORE DELETE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdtbeforedeletetrigger(); 7DROP TRIGGER incdtbeforedeletetrigger ON public.incdt; publicadminfalse1542155W26202005675incdtbeforetriggerTRIGGERCREATE TRIGGER incdtbeforetrigger BEFORE INSERT OR UPDATE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdtbeforetrigger(); 1DROP TRIGGER incdtbeforetrigger ON public.incdt; publicadminfalse2154154Y26202005678 incdttriggerTRIGGERCREATE TRIGGER incdttrigger AFTER INSERT OR DELETE OR UPDATE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdttrigger(); +DROP TRIGGER incdttrigger ON public.incdt; publicadminfalse154939v26202005681invcheadaftertriggerTRIGGERCREATE TRIGGER invcheadaftertrigger AFTER UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadaftertrigger(); 6DROP TRIGGER invcheadaftertrigger ON public.invchead; publicadminfalse2159173t26202005679invcheadbeforetriggerTRIGGERCREATE TRIGGER invcheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadbeforetrigger(); 7DROP TRIGGER invcheadbeforetrigger ON public.invchead; publicadminfalse1732157u26202005680invcheadtriggerTRIGGERCREATE TRIGGER invcheadtrigger AFTER INSERT OR DELETE OR UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadtrigger(); 1DROP TRIGGER invcheadtrigger ON public.invchead; publicadminfalse1732158y26202005682invcitembeforetriggerTRIGGERCREATE TRIGGER invcitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON invcitem FOR EACH ROW EXECUTE PROCEDURE _invcitembeforetrigger(); 7DROP TRIGGER invcitembeforetrigger ON public.invcitem; publicadminfalse2160175z26202005683invcitemtriggerTRIGGERCREATE TRIGGER invcitemtrigger AFTER INSERT OR DELETE OR UPDATE ON invcitem FOR EACH ROW EXECUTE PROCEDURE _invcitemtrigger(); 1DROP TRIGGER invcitemtrigger ON public.invcitem; publicadminfalse216117526202005684invhisttriggerTRIGGER{CREATE TRIGGER invhisttrigger BEFORE INSERT OR UPDATE ON invhist FOR EACH ROW EXECUTE PROCEDURE invhisttrig(); /DROP TRIGGER invhisttrigger ON public.invhist; publicadminfalse470216226202005685ipsassbeforetriggerTRIGGERCREATE TRIGGER ipsassbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsass FOR EACH ROW EXECUTE PROCEDURE _ipsassbeforetrigger(); 3DROP TRIGGER ipsassbeforetrigger ON public.ipsass; publicadminfalse239216426202005686ipsheadbeforetriggerTRIGGERCREATE TRIGGER ipsheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipshead FOR EACH ROW EXECUTE PROCEDURE _ipsheadbeforetrigger(); 5DROP TRIGGER ipsheadbeforetrigger ON public.ipshead; publicadminfalse219220426202005687ipsitemcharbeforetriggerTRIGGERCREATE TRIGGER ipsitemcharbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsitemchar FOR EACH ROW EXECUTE PROCEDURE _ipsitemcharbeforetrigger(); =DROP TRIGGER ipsitemcharbeforetrigger ON public.ipsitemchar; publicadminfalse216524226202005688ipsiteminfobeforetriggerTRIGGERCREATE TRIGGER ipsiteminfobeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsiteminfo FOR EACH ROW EXECUTE PROCEDURE _ipsiteminfobeforetrigger(); =DROP TRIGGER ipsiteminfobeforetrigger ON public.ipsiteminfo; publicadminfalse2402171p26202005691itemaftertriggerTRIGGERCREATE TRIGGER itemaftertrigger AFTER INSERT OR DELETE OR UPDATE ON item FOR EACH ROW EXECUTE PROCEDURE _itemaftertrigger(); .DROP TRIGGER itemaftertrigger ON public.item; publicadminfalse168217226202005693itemcostaftertriggerTRIGGERCREATE TRIGGER itemcostaftertrigger AFTER INSERT OR UPDATE ON itemcost FOR EACH ROW EXECUTE PROCEDURE _itemcostaftertrigger(); 6DROP TRIGGER itemcostaftertrigger ON public.itemcost; publicadminfalse228222626202005692itemcosttriggerTRIGGERCREATE TRIGGER itemcosttrigger BEFORE INSERT OR DELETE OR UPDATE ON itemcost FOR EACH ROW EXECUTE PROCEDURE _itemcosttrigger(); 1DROP TRIGGER itemcosttrigger ON public.itemcost; publicadminfalse2282167r26202005696itemsiteaftertriggerTRIGGERCREATE TRIGGER itemsiteaftertrigger AFTER INSERT OR UPDATE ON itemsite FOR EACH ROW EXECUTE PROCEDURE _itemsiteaftertrigger(); 6DROP TRIGGER itemsiteaftertrigger ON public.itemsite; publicadminfalse1692255q26202005694itemsitetriggerTRIGGERCREATE TRIGGER itemsitetrigger BEFORE INSERT OR UPDATE ON itemsite FOR EACH ROW EXECUTE PROCEDURE _itemsitetrigger(); 1DROP TRIGGER itemsitetrigger ON public.itemsite; publicadminfalse225416926202005698itemsrcaftertriggerTRIGGERCREATE TRIGGER itemsrcaftertrigger AFTER INSERT OR UPDATE ON itemsrc FOR EACH ROW EXECUTE PROCEDURE _itemsrcaftertrigger(); 4DROP TRIGGER itemsrcaftertrigger ON public.itemsrc; publicadminfalse232225726202005699itemsrcptriggerTRIGGERCREATE TRIGGER itemsrcptrigger BEFORE INSERT OR UPDATE ON itemsrcp FOR EACH ROW EXECUTE PROCEDURE _itemsrcptrigger(); 1DROP TRIGGER itemsrcptrigger ON public.itemsrcp; publicadminfalse221723326202005697itemsrctriggerTRIGGERCREATE TRIGGER itemsrctrigger BEFORE INSERT OR UPDATE ON itemsrc FOR EACH ROW EXECUTE PROCEDURE _itemsrctrigger(); /DROP TRIGGER itemsrctrigger ON public.itemsrc; publicadminfalse232225626202005700itemsubtriggerTRIGGER~CREATE TRIGGER itemsubtrigger AFTER INSERT OR UPDATE ON itemsub FOR EACH ROW EXECUTE PROCEDURE _itemsubtrigger(); /DROP TRIGGER itemsubtrigger ON public.itemsub; publicadminfalse218323426202005701itemtaxtriggerTRIGGER~CREATE TRIGGER itemtaxtrigger AFTER INSERT OR UPDATE ON itemtax FOR EACH ROW EXECUTE PROCEDURE _itemtaxtrigger(); /DROP TRIGGER itemtaxtrigger ON public.itemtax; publicadminfalse2258235o26202005689 itemtriggerTRIGGERvCREATE TRIGGER itemtrigger BEFORE INSERT OR UPDATE ON item FOR EACH ROW EXECUTE PROCEDURE _itemtrigger(); )DROP TRIGGER itemtrigger ON public.item; publicadminfalse168216626202005702itemuomconvtriggerTRIGGERCREATE TRIGGER itemuomconvtrigger AFTER INSERT OR UPDATE ON itemuomconv FOR EACH ROW EXECUTE PROCEDURE _itemuomconvtrigger(); 7DROP TRIGGER itemuomconvtrigger ON public.itemuomconv; publicadminfalse236225926202005704locationaftertriggerTRIGGERCREATE TRIGGER locationaftertrigger AFTER INSERT OR UPDATE ON location FOR EACH ROW EXECUTE PROCEDURE _locationaftertrigger(); 6DROP TRIGGER locationaftertrigger ON public.location; publicadminfalse230216826202005703locationtriggerTRIGGERCREATE TRIGGER locationtrigger BEFORE INSERT OR UPDATE ON location FOR EACH ROW EXECUTE PROCEDURE _locationtrigger(); 1DROP TRIGGER locationtrigger ON public.location; publicadminfalse226523026202006850metasqlaltertriggerTRIGGERCREATE TRIGGER metasqlaltertrigger BEFORE INSERT OR UPDATE ON metasql FOR EACH ROW EXECUTE PROCEDURE _metasqlaltertrigger(); 4DROP TRIGGER metasqlaltertrigger ON public.metasql; publicadminfalse267228526202006849metasqltriggerTRIGGERCREATE TRIGGER metasqltrigger BEFORE INSERT OR UPDATE ON metasql FOR EACH ROW EXECUTE PROCEDURE _metasqltrigger(); /DROP TRIGGER metasqltrigger ON public.metasql; publicadminfalse267226626202005706opheadaftertriggerTRIGGERCREATE TRIGGER opheadaftertrigger AFTER INSERT OR DELETE OR UPDATE ON ophead FOR EACH ROW EXECUTE PROCEDURE _opheadaftertrigger(); 2DROP TRIGGER opheadaftertrigger ON public.ophead; publicadminfalse217418126202005705opheadbeforetriggerTRIGGERCREATE TRIGGER opheadbeforetrigger BEFORE INSERT OR UPDATE ON ophead FOR EACH ROW EXECUTE PROCEDURE _opheadbeforetrigger(); 3DROP TRIGGER opheadbeforetrigger ON public.ophead; publicadminfalse181217326202005707packbeforetriggerTRIGGERCREATE TRIGGER packbeforetrigger BEFORE INSERT OR UPDATE ON pack FOR EACH ROW EXECUTE PROCEDURE _packbeforetrigger(); /DROP TRIGGER packbeforetrigger ON public.pack; publicadminfalse217554926202005708periodaftertriggerTRIGGERCREATE TRIGGER periodaftertrigger AFTER INSERT OR DELETE OR UPDATE ON period FOR EACH STATEMENT EXECUTE PROCEDURE _periodaftertrigger(); 2DROP TRIGGER periodaftertrigger ON public.period; publicadminfalse217920126202005709pkgheadbeforetriggerTRIGGERCREATE TRIGGER pkgheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkghead FOR EACH ROW EXECUTE PROCEDURE _pkgheadbeforetrigger(); 5DROP TRIGGER pkgheadbeforetrigger ON public.pkghead; publicadminfalse556218026202005711pkgitembeforetriggerTRIGGERCREATE TRIGGER pkgitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgitem FOR EACH ROW EXECUTE PROCEDURE _pkgitembeforetrigger(); 5DROP TRIGGER pkgitembeforetrigger ON public.pkgitem; publicadminfalse223755826202005712 poheadtriggerTRIGGERCREATE TRIGGER poheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON pohead FOR EACH ROW EXECUTE PROCEDURE _poheadtrigger(); -DROP TRIGGER poheadtrigger ON public.pohead; publicadminfalse178219426202005713poheadtriggerafterTRIGGER{CREATE TRIGGER poheadtriggerafter AFTER UPDATE ON pohead FOR EACH ROW EXECUTE PROCEDURE _poheadtriggerafter(); 2DROP TRIGGER poheadtriggerafter ON public.pohead; publicadminfalse178219526202005715 poitemtriggerTRIGGERCREATE TRIGGER poitemtrigger BEFORE INSERT OR DELETE OR UPDATE ON poitem FOR EACH ROW EXECUTE PROCEDURE _poitemtrigger(); -DROP TRIGGER poitemtrigger ON public.poitem; publicadminfalse2243179x26202005718prjaftertriggerTRIGGER|CREATE TRIGGER prjaftertrigger AFTER INSERT OR UPDATE ON prj FOR EACH ROW EXECUTE PROCEDURE _prjaftertrigger(); ,DROP TRIGGER prjaftertrigger ON public.prj; publicadminfalse2200174w26202005717prjbeforedeletetriggerTRIGGERCREATE TRIGGER prjbeforedeletetrigger BEFORE DELETE ON prj FOR EACH ROW EXECUTE PROCEDURE _prjbeforedeletetrigger(); 3DROP TRIGGER prjbeforedeletetrigger ON public.prj; publicadminfalse174219926202005720prjtaskaftertriggerTRIGGERCREATE TRIGGER prjtaskaftertrigger AFTER INSERT OR UPDATE ON prjtask FOR EACH ROW EXECUTE PROCEDURE _prjtaskaftertrigger(); 4DROP TRIGGER prjtaskaftertrigger ON public.prjtask; publicadminfalse182227926202005719prjtasktriggerTRIGGERCREATE TRIGGER prjtasktrigger BEFORE INSERT OR UPDATE ON prjtask FOR EACH ROW EXECUTE PROCEDURE _prjtasktrigger(); /DROP TRIGGER prjtasktrigger ON public.prjtask; publicadminfalse220118226202005724prospectafterdeletetriggerTRIGGERCREATE TRIGGER prospectafterdeletetrigger AFTER DELETE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectafterdeletetrigger(); <DROP TRIGGER prospectafterdeletetrigger ON public.prospect; publicadminfalse244220526202005722prospectaftertriggerTRIGGERCREATE TRIGGER prospectaftertrigger AFTER INSERT OR UPDATE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectaftertrigger(); 6DROP TRIGGER prospectaftertrigger ON public.prospect; publicadminfalse244220226202005723prospectbeforedeletetriggerTRIGGERCREATE TRIGGER prospectbeforedeletetrigger BEFORE DELETE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectbeforedeletetrigger(); =DROP TRIGGER prospectbeforedeletetrigger ON public.prospect; publicadminfalse220324426202005721prospecttriggerTRIGGERCREATE TRIGGER prospecttrigger BEFORE INSERT OR UPDATE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospecttrigger(); 1DROP TRIGGER prospecttrigger ON public.prospect; publicadminfalse244224926202005716 prtriggerTRIGGEReCREATE TRIGGER prtrigger AFTER INSERT ON pr FOR EACH ROW EXECUTE PROCEDURE _prtrigger(); %DROP TRIGGER prtrigger ON public.pr; publicadminfalse569219626202005726 quheadtriggerTRIGGERCREATE TRIGGER quheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON quhead FOR EACH ROW EXECUTE PROCEDURE _quheadtrigger(); -DROP TRIGGER quheadtrigger ON public.quhead; publicadminfalse249226026202005729quitemaftertriggerTRIGGERCREATE TRIGGER quitemaftertrigger AFTER INSERT OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitemaftertrigger(); 2DROP TRIGGER quitemaftertrigger ON public.quitem; publicadminfalse220825026202005728quitembeforetriggerTRIGGERCREATE TRIGGER quitembeforetrigger BEFORE INSERT OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitembeforetrigger(); 3DROP TRIGGER quitembeforetrigger ON public.quitem; publicadminfalse250220726202005727 quitemtriggerTRIGGERCREATE TRIGGER quitemtrigger BEFORE INSERT OR DELETE OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitemtrigger(); -DROP TRIGGER quitemtrigger ON public.quitem; publicadminfalse250220626202005730recuraftertriggerTRIGGERxCREATE TRIGGER recuraftertrigger AFTER DELETE ON recur FOR EACH ROW EXECUTE PROCEDURE _recuraftertrigger(); 0DROP TRIGGER recuraftertrigger ON public.recur; publicadminfalse227358726202005731 reporttriggerTRIGGER|CREATE TRIGGER reporttrigger BEFORE INSERT OR UPDATE ON report FOR EACH ROW EXECUTE PROCEDURE _reporttrigger(); -DROP TRIGGER reporttrigger ON public.report; publicadminfalse2732209i26202005734salesrepafterdeletetriggerTRIGGERCREATE TRIGGER salesrepafterdeletetrigger AFTER DELETE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepafterdeletetrigger(); <DROP TRIGGER salesrepafterdeletetrigger ON public.salesrep; publicadminfalse2213163h26202005733salesrepaftertriggerTRIGGERCREATE TRIGGER salesrepaftertrigger AFTER INSERT OR UPDATE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepaftertrigger(); 6DROP TRIGGER salesrepaftertrigger ON public.salesrep; publicadminfalse2212163g26202005732salesrepbeforetriggerTRIGGERCREATE TRIGGER salesrepbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepbeforetrigger(); 7DROP TRIGGER salesrepbeforetrigger ON public.salesrep; publicadminfalse22101635 26202005735saletypebeforedeletetriggerTRIGGERCREATE TRIGGER saletypebeforedeletetrigger BEFORE DELETE ON saletype FOR EACH ROW EXECUTE PROCEDURE _saletypebeforedeletetrigger(); =DROP TRIGGER saletypebeforedeletetrigger ON public.saletype; publicadminfalse221472226202005737shipdatasumtriggerTRIGGERCREATE TRIGGER shipdatasumtrigger BEFORE INSERT OR UPDATE ON shipdatasum FOR EACH ROW EXECUTE PROCEDURE _shipdatasumtrigger(); 7DROP TRIGGER shipdatasumtrigger ON public.shipdatasum; publicadminfalse606221626202005736shipdatatriggerTRIGGERCREATE TRIGGER shipdatatrigger BEFORE INSERT OR UPDATE ON shipdata FOR EACH ROW EXECUTE PROCEDURE _shipdatatrigger(); 1DROP TRIGGER shipdatatrigger ON public.shipdata; publicadminfalse221521626202005738shipformafterdeletetriggerTRIGGERCREATE TRIGGER shipformafterdeletetrigger AFTER DELETE ON shipform FOR EACH ROW EXECUTE PROCEDURE _shipformafterdeletetrigger(); <DROP TRIGGER shipformafterdeletetrigger ON public.shipform; publicadminfalse221820926202005739shipheadbeforetriggerTRIGGERCREATE TRIGGER shipheadbeforetrigger BEFORE INSERT OR UPDATE ON shiphead FOR EACH ROW EXECUTE PROCEDURE _shipheadbeforetrigger(); 7DROP TRIGGER shipheadbeforetrigger ON public.shiphead; publicadminfalse2219608l26202005740shiptoinfoaftertriggerTRIGGERCREATE TRIGGER shiptoinfoaftertrigger AFTER INSERT OR UPDATE ON shiptoinfo FOR EACH ROW EXECUTE PROCEDURE _shiptoinfoaftertrigger(); :DROP TRIGGER shiptoinfoaftertrigger ON public.shiptoinfo; publicadminfalse222016526202005741shipviaafterdeletetriggerTRIGGERCREATE TRIGGER shipviaafterdeletetrigger AFTER DELETE ON shipvia FOR EACH ROW EXECUTE PROCEDURE _shipviaafterdeletetrigger(); :DROP TRIGGER shipviaafterdeletetrigger ON public.shipvia; publicadminfalse256222126202005743sltransaltertriggerTRIGGERCREATE TRIGGER sltransaltertrigger BEFORE DELETE OR UPDATE ON sltrans FOR EACH ROW EXECUTE PROCEDURE _sltransaltertrigger(); 4DROP TRIGGER sltransaltertrigger ON public.sltrans; publicadminfalse616222326202005742sltransinserttriggerTRIGGERCREATE TRIGGER sltransinserttrigger BEFORE INSERT ON sltrans FOR EACH ROW EXECUTE PROCEDURE _sltransinserttrigger(); 5DROP TRIGGER sltransinserttrigger ON public.sltrans; publicadminfalse2222616{26202005641 soheadtriggerTRIGGERCREATE TRIGGER soheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON cohead FOR EACH ROW EXECUTE PROCEDURE _soheadtrigger(); -DROP TRIGGER soheadtrigger ON public.cohead; publicadminfalse2121176|26202005642soheadtriggerafterTRIGGER{CREATE TRIGGER soheadtriggerafter AFTER UPDATE ON cohead FOR EACH ROW EXECUTE PROCEDURE _soheadtriggerafter(); 2DROP TRIGGER soheadtriggerafter ON public.cohead; publicadminfalse212217626202005650soitemafterdeletetriggerTRIGGERCREATE TRIGGER soitemafterdeletetrigger AFTER DELETE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemafterdeletetrigger(); 8DROP TRIGGER soitemafterdeletetrigger ON public.coitem; publicadminfalse177214326202005648soitemaftertriggerTRIGGERCREATE TRIGGER soitemaftertrigger AFTER INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemaftertrigger(); 2DROP TRIGGER soitemaftertrigger ON public.coitem; publicadminfalse212517726202005649soitembeforedeletetriggerTRIGGERCREATE TRIGGER soitembeforedeletetrigger BEFORE DELETE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitembeforedeletetrigger(); 9DROP TRIGGER soitembeforedeletetrigger ON public.coitem; publicadminfalse2126177~26202005646soitembeforetriggerTRIGGERCREATE TRIGGER soitembeforetrigger BEFORE INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitembeforetrigger(); 3DROP TRIGGER soitembeforetrigger ON public.coitem; publicadminfalse2124177}26202005644 soitemtriggerTRIGGER|CREATE TRIGGER soitemtrigger BEFORE INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemtrigger(); -DROP TRIGGER soitemtrigger ON public.coitem; publicadminfalse212317726202005747taxauthafterdeletetriggerTRIGGERCREATE TRIGGER taxauthafterdeletetrigger AFTER DELETE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthafterdeletetrigger(); :DROP TRIGGER taxauthafterdeletetrigger ON public.taxauth; publicadminfalse210223926202005745taxauthaftertriggerTRIGGERCREATE TRIGGER taxauthaftertrigger AFTER INSERT OR UPDATE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthaftertrigger(); 4DROP TRIGGER taxauthaftertrigger ON public.taxauth; publicadminfalse210222426202005746taxauthbeforedeletetriggerTRIGGERCREATE TRIGGER taxauthbeforedeletetrigger BEFORE DELETE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthbeforedeletetrigger(); ;DROP TRIGGER taxauthbeforedeletetrigger ON public.taxauth; publicadminfalse222521026202005744taxauthbeforetriggerTRIGGERCREATE TRIGGER taxauthbeforetrigger BEFORE INSERT OR UPDATE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthbeforetrigger(); 5DROP TRIGGER taxauthbeforetrigger ON public.taxauth; publicadminfalse2277210\26202005748termsafterdeletetriggerTRIGGERCREATE TRIGGER termsafterdeletetrigger AFTER DELETE ON terms FOR EACH ROW EXECUTE PROCEDURE _termsafterdeletetrigger(); 6DROP TRIGGER termsafterdeletetrigger ON public.terms; publicadminfalse157222826202005749todoitemtriggerTRIGGERxCREATE TRIGGER todoitemtrigger BEFORE DELETE ON todoitem FOR EACH ROW EXECUTE PROCEDURE _todoitemtrigger(); 1DROP TRIGGER todoitemtrigger ON public.todoitem; publicadminfalse183222926202005750 uomconvupdateTRIGGERsCREATE TRIGGER uomconvupdate BEFORE UPDATE ON uomconv FOR EACH ROW EXECUTE PROCEDURE _uomconvupdate(); .DROP TRIGGER uomconvupdate ON public.uomconv; publicadminfalse654223026202005752usrprefaftertriggerTRIGGERCREATE TRIGGER usrprefaftertrigger AFTER INSERT OR DELETE OR UPDATE ON usrpref FOR EACH ROW EXECUTE PROCEDURE _usrprefaftertrigger(); 4DROP TRIGGER usrprefaftertrigger ON public.usrpref; publicadminfalse223265926202005751usrprefbeforetriggerTRIGGERCREATE TRIGGER usrprefbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON usrpref FOR EACH ROW EXECUTE PROCEDURE _usrprefbeforetrigger(); 5DROP TRIGGER usrprefbeforetrigger ON public.usrpref; publicadminfalse659223126202005753usrprivtriggerTRIGGERCREATE TRIGGER usrprivtrigger BEFORE INSERT OR UPDATE ON usrpriv FOR EACH ROW EXECUTE PROCEDURE _usrprivtrigger(); /DROP TRIGGER usrprivtrigger ON public.usrpriv; publicadminfalse574223326202005758vendaddrtriggerTRIGGERCREATE TRIGGER vendaddrtrigger BEFORE INSERT OR DELETE OR UPDATE ON vendaddrinfo FOR EACH ROW EXECUTE PROCEDURE _vendaddrtrigger(); 5DROP TRIGGER vendaddrtrigger ON public.vendaddrinfo; publicadminfalse2241248^26202005755vendaftertriggerTRIGGERCREATE TRIGGER vendaftertrigger AFTER INSERT OR UPDATE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendaftertrigger(); 2DROP TRIGGER vendaftertrigger ON public.vendinfo; publicadminfalse1582235`26202005757vendinfoafterdeletetriggerTRIGGERCREATE TRIGGER vendinfoafterdeletetrigger AFTER DELETE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendinfoafterdeletetrigger(); <DROP TRIGGER vendinfoafterdeletetrigger ON public.vendinfo; publicadminfalse2240158_26202005756vendinfobeforedeletetriggerTRIGGERCREATE TRIGGER vendinfobeforedeletetrigger BEFORE DELETE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendinfobeforedeletetrigger(); =DROP TRIGGER vendinfobeforedeletetrigger ON public.vendinfo; publicadminfalse1582236]26202005754 vendtriggerTRIGGERzCREATE TRIGGER vendtrigger BEFORE INSERT OR UPDATE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendtrigger(); -DROP TRIGGER vendtrigger ON public.vendinfo; publicadminfalse158223426202005760vodistaftertriggerTRIGGERCREATE TRIGGER vodistaftertrigger AFTER INSERT OR DELETE OR UPDATE ON vodist FOR EACH ROW EXECUTE PROCEDURE _vodistaftertrigger(); 2DROP TRIGGER vodistaftertrigger ON public.vodist; publicadminfalse668224226202005759vodistbeforetriggerTRIGGERCREATE TRIGGER vodistbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON vodist FOR EACH ROW EXECUTE PROCEDURE _vodistbeforetrigger(); 3DROP TRIGGER vodistbeforetrigger ON public.vodist; publicadminfalse228066826202005762voheadaftertriggerTRIGGERCREATE TRIGGER voheadaftertrigger AFTER INSERT OR DELETE OR UPDATE ON vohead FOR EACH ROW EXECUTE PROCEDURE _voheadaftertrigger(); 2DROP TRIGGER voheadaftertrigger ON public.vohead; publicadminfalse670224526202005761voheadbeforetriggerTRIGGERCREATE TRIGGER voheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON vohead FOR EACH ROW EXECUTE PROCEDURE _voheadbeforetrigger(); 3DROP TRIGGER voheadbeforetrigger ON public.vohead; publicadminfalse2244670 26202005764voitemaftertriggerTRIGGERCREATE TRIGGER voitemaftertrigger AFTER INSERT OR DELETE OR UPDATE ON voitem FOR EACH ROW EXECUTE PROCEDURE _voitemaftertrigger(); 2DROP TRIGGER voitemaftertrigger ON public.voitem; publicadminfalse673224626202005763voitembeforetriggerTRIGGERCREATE TRIGGER voitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON voitem FOR EACH ROW EXECUTE PROCEDURE _voitembeforetrigger(); 3DROP TRIGGER voitembeforetrigger ON public.voitem; publicadminfalse2282673s26202005766warehoustriggerTRIGGERCREATE TRIGGER warehoustrigger BEFORE INSERT OR UPDATE ON whsinfo FOR EACH ROW EXECUTE PROCEDURE _warehoustrigger(); 0DROP TRIGGER warehoustrigger ON public.whsinfo; publicadminfalse224817226202005765whsezonetriggerTRIGGERCREATE TRIGGER whsezonetrigger BEFORE INSERT OR UPDATE ON whsezone FOR EACH ROW EXECUTE PROCEDURE _whsezonetrigger(); 1DROP TRIGGER whsezonetrigger ON public.whsezone; publicadminfalse238224726202005768womatlaftertriggerTRIGGERCREATE TRIGGER womatlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON womatl FOR EACH ROW EXECUTE PROCEDURE _womatlaftertrigger(); 2DROP TRIGGER womatlaftertrigger ON public.womatl; publicadminfalse246228326202005767 wotriggerTRIGGERzCREATE TRIGGER wotrigger BEFORE INSERT OR DELETE OR UPDATE ON wo FOR EACH ROW EXECUTE PROCEDURE _wotrigger(); %DROP TRIGGER wotrigger ON public.wo; publicadminfalse4102250 26201688680pkgcmdaftertriggerTRIGGERCREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger(); .DROP TRIGGER pkgcmdaftertrigger ON te.pkgcmd; teadminfalse2227689 26201688681pkgcmdaltertriggerTRIGGERCREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger(); .DROP TRIGGER pkgcmdaltertrigger ON te.pkgcmd; teadminfalse6892274 26201688682pkgcmdargaftertriggerTRIGGERCREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger(); 4DROP TRIGGER pkgcmdargaftertrigger ON te.pkgcmdarg; teadminfalse2198690 26201688683pkgcmdargaltertriggerTRIGGERCREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger(); 4DROP TRIGGER pkgcmdargaltertrigger ON te.pkgcmdarg; teadminfalse2269690 26201688684pkgcmdargbeforetriggerTRIGGERCREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger(); 5DROP TRIGGER pkgcmdargbeforetrigger ON te.pkgcmdarg; teadminfalse2268690 26201688685pkgcmdbeforetriggerTRIGGERCREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger(); /DROP TRIGGER pkgcmdbeforetrigger ON te.pkgcmd; teadminfalse2267689 26201688686pkgimageaftertriggerTRIGGERCREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger(); 2DROP TRIGGER pkgimageaftertrigger ON te.pkgimage; teadminfalse2270691 26201688687pkgimagealtertriggerTRIGGERCREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger(); 2DROP TRIGGER pkgimagealtertrigger ON te.pkgimage; teadminfalse2185691 26201688688pkgimagebeforetriggerTRIGGERCREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger(); 3DROP TRIGGER pkgimagebeforetrigger ON te.pkgimage; teadminfalse6912184 26201688689pkgmetasqlaftertriggerTRIGGERCREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger(); 6DROP TRIGGER pkgmetasqlaftertrigger ON te.pkgmetasql; teadminfalse6922275 26201688690pkgmetasqlaltertriggerTRIGGERCREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger(); 6DROP TRIGGER pkgmetasqlaltertrigger ON te.pkgmetasql; teadminfalse6922187 26201688691pkgmetasqlbeforetriggerTRIGGERCREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger(); 7DROP TRIGGER pkgmetasqlbeforetrigger ON te.pkgmetasql; teadminfalse2186692 26201688692pkgprivaftertriggerTRIGGERCREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger(); 0DROP TRIGGER pkgprivaftertrigger ON te.pkgpriv; teadminfalse2238693 26201688693pkgprivaltertriggerTRIGGERCREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger(); 0DROP TRIGGER pkgprivaltertrigger ON te.pkgpriv; teadminfalse2189693 26201688694pkgprivbeforetriggerTRIGGERCREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger(); 1DROP TRIGGER pkgprivbeforetrigger ON te.pkgpriv; teadminfalse2188693 26201688695pkgreportaftertriggerTRIGGERCREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger(); 4DROP TRIGGER pkgreportaftertrigger ON te.pkgreport; teadminfalse6942276 26201688696pkgreportaltertriggerTRIGGERCREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger(); 4DROP TRIGGER pkgreportaltertrigger ON te.pkgreport; teadminfalse2191694 26201688697pkgreportbeforetriggerTRIGGERCREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger(); 5DROP TRIGGER pkgreportbeforetrigger ON te.pkgreport; teadminfalse6942190 26201688698pkgscriptaftertriggerTRIGGERCREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger(); 4DROP TRIGGER pkgscriptaftertrigger ON te.pkgscript; teadminfalse2271695 26201688699pkgscriptaltertriggerTRIGGERCREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger(); 4DROP TRIGGER pkgscriptaltertrigger ON te.pkgscript; teadminfalse2211695 26201688700pkgscriptbeforetriggerTRIGGERCREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger(); 5DROP TRIGGER pkgscriptbeforetrigger ON te.pkgscript; teadminfalse2278695 26201688701pkguiformaftertriggerTRIGGERCREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger(); 4DROP TRIGGER pkguiformaftertrigger ON te.pkguiform; teadminfalse2272696 26201688702pkguiformaltertriggerTRIGGERCREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger(); 4DROP TRIGGER pkguiformaltertrigger ON te.pkguiform; teadminfalse2193696 26201688703pkguiformbeforetriggerTRIGGERCREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger(); 5DROP TRIGGER pkguiformbeforetrigger ON te.pkguiform; teadminfalse6962192 26201757941 teheadtriggerTRIGGERzCREATE TRIGGER teheadtrigger AFTER INSERT OR UPDATE ON tehead FOR EACH ROW EXECUTE PROCEDURE triggertehead(); )DROP TRIGGER teheadtrigger ON te.tehead; teadminfalse894703 26201757942 teitemtriggerTRIGGERCREATE TRIGGER teitemtrigger AFTER INSERT OR DELETE OR UPDATE ON teitem FOR EACH ROW EXECUTE PROCEDURE triggerteitem(); )DROP TRIGGER teitemtrigger ON te.teitem; teadminfalse881705 26201757943 teprjtriggerTRIGGERwCREATE TRIGGER teprjtrigger AFTER INSERT OR UPDATE ON teprj FOR EACH ROW EXECUTE PROCEDURE triggerteprj(); 'DROP TRIGGER teprjtrigger ON te.teprj; teadminfalse882707 26201688707pkgcmdaftertriggerTRIGGERCREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger(); 5DROP TRIGGER pkgcmdaftertrigger ON xtdesktop.pkgcmd;  xtdesktopadminfalse7112227 26201688708pkgcmdaltertriggerTRIGGERCREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger(); 5DROP TRIGGER pkgcmdaltertrigger ON xtdesktop.pkgcmd;  xtdesktopadminfalse2274711 26201688709pkgcmdargaftertriggerTRIGGERCREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger(); ;DROP TRIGGER pkgcmdargaftertrigger ON xtdesktop.pkgcmdarg;  xtdesktopadminfalse2198712 26201688710pkgcmdargaltertriggerTRIGGERCREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger(); ;DROP TRIGGER pkgcmdargaltertrigger ON xtdesktop.pkgcmdarg;  xtdesktopadminfalse7122269! 26201688711pkgcmdargbeforetriggerTRIGGERCREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger(); <DROP TRIGGER pkgcmdargbeforetrigger ON xtdesktop.pkgcmdarg;  xtdesktopadminfalse7122268 26201688712pkgcmdbeforetriggerTRIGGERCREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger(); 6DROP TRIGGER pkgcmdbeforetrigger ON xtdesktop.pkgcmd;  xtdesktopadminfalse7112267" 26201688713pkgimageaftertriggerTRIGGERCREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger(); 9DROP TRIGGER pkgimageaftertrigger ON xtdesktop.pkgimage;  xtdesktopadminfalse2270713# 26201688714pkgimagealtertriggerTRIGGERCREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger(); 9DROP TRIGGER pkgimagealtertrigger ON xtdesktop.pkgimage;  xtdesktopadminfalse2185713$ 26201688715pkgimagebeforetriggerTRIGGERCREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger(); :DROP TRIGGER pkgimagebeforetrigger ON xtdesktop.pkgimage;  xtdesktopadminfalse2184713& 26201688716pkgmetasqlaftertriggerTRIGGERCREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger(); =DROP TRIGGER pkgmetasqlaftertrigger ON xtdesktop.pkgmetasql;  xtdesktopadminfalse7142275% 26201688717pkgmetasqlaltertriggerTRIGGERCREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger(); =DROP TRIGGER pkgmetasqlaltertrigger ON xtdesktop.pkgmetasql;  xtdesktopadminfalse7142187' 26201688718pkgmetasqlbeforetriggerTRIGGERCREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger(); >DROP TRIGGER pkgmetasqlbeforetrigger ON xtdesktop.pkgmetasql;  xtdesktopadminfalse7142186) 26201688719pkgprivaftertriggerTRIGGERCREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger(); 7DROP TRIGGER pkgprivaftertrigger ON xtdesktop.pkgpriv;  xtdesktopadminfalse2238715( 26201688720pkgprivaltertriggerTRIGGERCREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger(); 7DROP TRIGGER pkgprivaltertrigger ON xtdesktop.pkgpriv;  xtdesktopadminfalse2189715* 26201688721pkgprivbeforetriggerTRIGGERCREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger(); 8DROP TRIGGER pkgprivbeforetrigger ON xtdesktop.pkgpriv;  xtdesktopadminfalse2188715+ 26201688722pkgreportaftertriggerTRIGGERCREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger(); ;DROP TRIGGER pkgreportaftertrigger ON xtdesktop.pkgreport;  xtdesktopadminfalse7162276, 26201688723pkgreportaltertriggerTRIGGERCREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger(); ;DROP TRIGGER pkgreportaltertrigger ON xtdesktop.pkgreport;  xtdesktopadminfalse7162191- 26201688724pkgreportbeforetriggerTRIGGERCREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger(); <DROP TRIGGER pkgreportbeforetrigger ON xtdesktop.pkgreport;  xtdesktopadminfalse2190716. 26201688725pkgscriptaftertriggerTRIGGERCREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger(); ;DROP TRIGGER pkgscriptaftertrigger ON xtdesktop.pkgscript;  xtdesktopadminfalse7172271/ 26201688726pkgscriptaltertriggerTRIGGERCREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger(); ;DROP TRIGGER pkgscriptaltertrigger ON xtdesktop.pkgscript;  xtdesktopadminfalse71722110 26201688727pkgscriptbeforetriggerTRIGGERCREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger(); <DROP TRIGGER pkgscriptbeforetrigger ON xtdesktop.pkgscript;  xtdesktopadminfalse71722781 26201688728pkguiformaftertriggerTRIGGERCREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger(); ;DROP TRIGGER pkguiformaftertrigger ON xtdesktop.pkguiform;  xtdesktopadminfalse71822722 26201688729pkguiformaltertriggerTRIGGERCREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger(); ;DROP TRIGGER pkguiformaltertrigger ON xtdesktop.pkguiform;  xtdesktopadminfalse71821933 26201688730pkguiformbeforetriggerTRIGGERCREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger(); <DROP TRIGGER pkguiformbeforetrigger ON xtdesktop.pkguiform;  xtdesktopadminfalse718219226061688762pkgcmdarg_cmdarg_cmd_id_fkey FK CONSTRAINTALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id); TALTER TABLE ONLY fixcountry.pkgcmdarg DROP CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey;  fixcountryadminfalse2642617048B26061688767accnt_accnt_company_fkey FK CONSTRAINTALTER TABLE ONLY accnt ADD CONSTRAINT accnt_accnt_company_fkey FOREIGN KEY (accnt_company) REFERENCES company(company_number) ON UPDATE CASCADE; HALTER TABLE ONLY public.accnt DROP CONSTRAINT accnt_accnt_company_fkey; publicadminfalse1993817184C26061688772accnt_to_curr_symbol FK CONSTRAINT|ALTER TABLE ONLY accnt ADD CONSTRAINT accnt_to_curr_symbol FOREIGN KEY (accnt_curr_id) REFERENCES curr_symbol(curr_id); DALTER TABLE ONLY public.accnt DROP CONSTRAINT accnt_to_curr_symbol; publicadminfalse666619915626061688777!apapply_apapply_checkhead_id_fkey FK CONSTRAINTALTER TABLE ONLY apapply ADD CONSTRAINT apapply_apapply_checkhead_id_fkey FOREIGN KEY (apapply_checkhead_id) REFERENCES checkhead(checkhead_id); SALTER TABLE ONLY public.apapply DROP CONSTRAINT apapply_apapply_checkhead_id_fkey; publicadminfalse289348714726061688782apapply_apapply_vend_id_fkey FK CONSTRAINTALTER TABLE ONLY apapply ADD CONSTRAINT apapply_apapply_vend_id_fkey FOREIGN KEY (apapply_vend_id) REFERENCES vendinfo(vend_id); NALTER TABLE ONLY public.apapply DROP CONSTRAINT apapply_apapply_vend_id_fkey; publicadminfalse289158667326061688787apapply_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY apapply ADD CONSTRAINT apapply_to_curr_symbol FOREIGN KEY (apapply_curr_id) REFERENCES curr_symbol(curr_id); HALTER TABLE ONLY public.apapply DROP CONSTRAINT apapply_to_curr_symbol; publicadminfalse289156666626061688792apcreditapply_curr_symbol FK CONSTRAINTALTER TABLE ONLY apcreditapply ADD CONSTRAINT apcreditapply_curr_symbol FOREIGN KEY (apcreditapply_curr_id) REFERENCES curr_symbol(curr_id); QALTER TABLE ONLY public.apcreditapply DROP CONSTRAINT apcreditapply_curr_symbol; publicadminfalse291156666626061688797apopen_apopen_vend_id_fkey FK CONSTRAINTALTER TABLE ONLY apopen ADD CONSTRAINT apopen_apopen_vend_id_fkey FOREIGN KEY (apopen_vend_id) REFERENCES vendinfo(vend_id); KALTER TABLE ONLY public.apopen DROP CONSTRAINT apopen_apopen_vend_id_fkey; publicadminfalse155158667326061688802apopen_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY apopen ADD CONSTRAINT apopen_to_curr_symbol FOREIGN KEY (apopen_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.apopen DROP CONSTRAINT apopen_to_curr_symbol; publicadminfalse155156666626061688807#apopentax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); WALTER TABLE ONLY public.apopentax DROP CONSTRAINT apopentax_taxhist_basis_tax_id_fkey; publicadminfalse295247700826061688812 apopentax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES apopen(apopen_id) ON DELETE CASCADE; TALTER TABLE ONLY public.apopentax DROP CONSTRAINT apopentax_taxhist_parent_id_fkey; publicadminfalse666029515526061688817apopentax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); QALTER TABLE ONLY public.apopentax DROP CONSTRAINT apopentax_taxhist_tax_id_fkey; publicadminfalse295247700826061688822!apopentax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY apopentax ADD CONSTRAINT apopentax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.apopentax DROP CONSTRAINT apopentax_taxhist_taxtype_id_fkey; publicadminfalse295170673326061688827apselect_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY apselect ADD CONSTRAINT apselect_to_curr_symbol FOREIGN KEY (apselect_curr_id) REFERENCES curr_symbol(curr_id); JALTER TABLE ONLY public.apselect DROP CONSTRAINT apselect_to_curr_symbol; publicadminfalse296156666626061688832arapply_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY arapply ADD CONSTRAINT arapply_to_curr_symbol FOREIGN KEY (arapply_curr_id) REFERENCES curr_symbol(curr_id); HALTER TABLE ONLY public.arapply DROP CONSTRAINT arapply_to_curr_symbol; publicadminfalse300156666626061688837arcreditapply_curr_symbol FK CONSTRAINTALTER TABLE ONLY arcreditapply ADD CONSTRAINT arcreditapply_curr_symbol FOREIGN KEY (arcreditapply_curr_id) REFERENCES curr_symbol(curr_id); QALTER TABLE ONLY public.arcreditapply DROP CONSTRAINT arcreditapply_curr_symbol; publicadminfalse303156666626061688842aropen_aropen_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY aropen ADD CONSTRAINT aropen_aropen_cust_id_fkey FOREIGN KEY (aropen_cust_id) REFERENCES custinfo(cust_id); KALTER TABLE ONLY public.aropen DROP CONSTRAINT aropen_aropen_cust_id_fkey; publicadminfalse159160668526061688847aropen_aropen_salesrep_id_fkey FK CONSTRAINTALTER TABLE ONLY aropen ADD CONSTRAINT aropen_aropen_salesrep_id_fkey FOREIGN KEY (aropen_salesrep_id) REFERENCES salesrep(salesrep_id); OALTER TABLE ONLY public.aropen DROP CONSTRAINT aropen_aropen_salesrep_id_fkey; publicadminfalse159163669726061688852aropen_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY aropen ADD CONSTRAINT aropen_to_curr_symbol FOREIGN KEY (aropen_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.aropen DROP CONSTRAINT aropen_to_curr_symbol; publicadminfalse159156666626061688857#aropentax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); WALTER TABLE ONLY public.aropentax DROP CONSTRAINT aropentax_taxhist_basis_tax_id_fkey; publicadminfalse307247700826061688862 aropentax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES aropen(aropen_id) ON DELETE CASCADE; TALTER TABLE ONLY public.aropentax DROP CONSTRAINT aropentax_taxhist_parent_id_fkey; publicadminfalse307159668126061688867aropentax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); QALTER TABLE ONLY public.aropentax DROP CONSTRAINT aropentax_taxhist_tax_id_fkey; publicadminfalse307247700826061688872!aropentax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY aropentax ADD CONSTRAINT aropentax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.aropentax DROP CONSTRAINT aropentax_taxhist_taxtype_id_fkey; publicadminfalse307170673326061688877asohist_asohist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY asohist ADD CONSTRAINT asohist_asohist_taxtype_id_fkey FOREIGN KEY (asohist_taxtype_id) REFERENCES taxtype(taxtype_id); QALTER TABLE ONLY public.asohist DROP CONSTRAINT asohist_asohist_taxtype_id_fkey; publicadminfalse308170673326061688882asohist_asohist_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY asohist ADD CONSTRAINT asohist_asohist_taxzone_id_fkey FOREIGN KEY (asohist_taxzone_id) REFERENCES taxzone(taxzone_id); QALTER TABLE ONLY public.asohist DROP CONSTRAINT asohist_asohist_taxzone_id_fkey; publicadminfalse308166671026061688887asohist_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY asohist ADD CONSTRAINT asohist_to_curr_symbol FOREIGN KEY (asohist_curr_id) REFERENCES curr_symbol(curr_id); HALTER TABLE ONLY public.asohist DROP CONSTRAINT asohist_to_curr_symbol; publicadminfalse308156666626061688892$asohisttax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); YALTER TABLE ONLY public.asohisttax DROP CONSTRAINT asohisttax_taxhist_basis_tax_id_fkey; publicadminfalse310247700826061688897!asohisttax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES asohist(asohist_id) ON DELETE CASCADE; VALTER TABLE ONLY public.asohisttax DROP CONSTRAINT asohisttax_taxhist_parent_id_fkey; publicadminfalse310308710626061688902asohisttax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); SALTER TABLE ONLY public.asohisttax DROP CONSTRAINT asohisttax_taxhist_tax_id_fkey; publicadminfalse310247700826061688907"asohisttax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY asohisttax ADD CONSTRAINT asohisttax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); WALTER TABLE ONLY public.asohisttax DROP CONSTRAINT asohisttax_taxhist_taxtype_id_fkey; publicadminfalse3101706733F26061688912bankaccnt_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY bankaccnt ADD CONSTRAINT bankaccnt_to_curr_symbol FOREIGN KEY (bankaccnt_curr_id) REFERENCES curr_symbol(curr_id); LALTER TABLE ONLY public.bankaccnt DROP CONSTRAINT bankaccnt_to_curr_symbol; publicadminfalse202156666626061688917bankadj_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY bankadj ADD CONSTRAINT bankadj_to_curr_symbol FOREIGN KEY (bankadj_curr_id) REFERENCES curr_symbol(curr_id); HALTER TABLE ONLY public.bankadj DROP CONSTRAINT bankadj_to_curr_symbol; publicadminfalse3151566666?26061688922bomhead_bomhead_item_id_fkey FK CONSTRAINTALTER TABLE ONLY bomhead ADD CONSTRAINT bomhead_bomhead_item_id_fkey FOREIGN KEY (bomhead_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE; NALTER TABLE ONLY public.bomhead DROP CONSTRAINT bomhead_bomhead_item_id_fkey; publicadminfalse196168672226061688927bomitem_bomitem_char_id_fkey FK CONSTRAINTALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_bomitem_char_id_fkey FOREIGN KEY (bomitem_char_id) REFERENCES "char"(char_id); NALTER TABLE ONLY public.bomitem DROP CONSTRAINT bomitem_bomitem_char_id_fkey; publicadminfalse151185680726061688932bomitem_bomitem_item_id_fkey FK CONSTRAINTALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_bomitem_item_id_fkey FOREIGN KEY (bomitem_item_id) REFERENCES item(item_id); NALTER TABLE ONLY public.bomitem DROP CONSTRAINT bomitem_bomitem_item_id_fkey; publicadminfalse151168672226061688937#bomitem_bomitem_parent_item_id_fkey FK CONSTRAINTALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_bomitem_parent_item_id_fkey FOREIGN KEY (bomitem_parent_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE; UALTER TABLE ONLY public.bomitem DROP CONSTRAINT bomitem_bomitem_parent_item_id_fkey; publicadminfalse151168672226061688942bomitem_bomitem_uom_id_fkey FK CONSTRAINT}ALTER TABLE ONLY bomitem ADD CONSTRAINT bomitem_bomitem_uom_id_fkey FOREIGN KEY (bomitem_uom_id) REFERENCES uom(uom_id); MALTER TABLE ONLY public.bomitem DROP CONSTRAINT bomitem_bomitem_uom_id_fkey; publicadminfalse151171673726061688947'bomitemcost_bomitemcost_bomitem_id_fkey FK CONSTRAINTALTER TABLE ONLY bomitemcost ADD CONSTRAINT bomitemcost_bomitemcost_bomitem_id_fkey FOREIGN KEY (bomitemcost_bomitem_id) REFERENCES bomitem(bomitem_id); ]ALTER TABLE ONLY public.bomitemcost DROP CONSTRAINT bomitemcost_bomitemcost_bomitem_id_fkey; publicadminfalse325151664226061688952(bomitemcost_bomitemcost_costelem_id_fkey FK CONSTRAINTALTER TABLE ONLY bomitemcost ADD CONSTRAINT bomitemcost_bomitemcost_costelem_id_fkey FOREIGN KEY (bomitemcost_costelem_id) REFERENCES costelem(costelem_id); ^ALTER TABLE ONLY public.bomitemcost DROP CONSTRAINT bomitemcost_bomitemcost_costelem_id_fkey; publicadminfalse325227693426061688957$bomitemcost_bomitemcost_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY bomitemcost ADD CONSTRAINT bomitemcost_bomitemcost_curr_id_fkey FOREIGN KEY (bomitemcost_curr_id) REFERENCES curr_symbol(curr_id); ZALTER TABLE ONLY public.bomitemcost DROP CONSTRAINT bomitemcost_bomitemcost_curr_id_fkey; publicadminfalse3251566666A26061688962%bomitemsub_bomitemsub_bomitem_id_fkey FK CONSTRAINTALTER TABLE ONLY bomitemsub ADD CONSTRAINT bomitemsub_bomitemsub_bomitem_id_fkey FOREIGN KEY (bomitemsub_bomitem_id) REFERENCES bomitem(bomitem_id) ON UPDATE RESTRICT ON DELETE CASCADE; ZALTER TABLE ONLY public.bomitemsub DROP CONSTRAINT bomitemsub_bomitemsub_bomitem_id_fkey; publicadminfalse6642197151@26061688967"bomitemsub_bomitemsub_item_id_fkey FK CONSTRAINTALTER TABLE ONLY bomitemsub ADD CONSTRAINT bomitemsub_bomitemsub_item_id_fkey FOREIGN KEY (bomitemsub_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE; WALTER TABLE ONLY public.bomitemsub DROP CONSTRAINT bomitemsub_bomitemsub_item_id_fkey; publicadminfalse197168672226061688972bomwork_bomwork_char_id_fkey FK CONSTRAINTALTER TABLE ONLY bomwork ADD CONSTRAINT bomwork_bomwork_char_id_fkey FOREIGN KEY (bomwork_char_id) REFERENCES "char"(char_id); NALTER TABLE ONLY public.bomwork DROP CONSTRAINT bomwork_bomwork_char_id_fkey; publicadminfalse3281856807E26061688977"budgitem_budgitem_budghead_id_fkey FK CONSTRAINTALTER TABLE ONLY budgitem ADD CONSTRAINT budgitem_budgitem_budghead_id_fkey FOREIGN KEY (budgitem_budghead_id) REFERENCES budghead(budghead_id); UALTER TABLE ONLY public.budgitem DROP CONSTRAINT budgitem_budgitem_budghead_id_fkey; publicadminfalse2001986835D26061688982 budgitem_budgitem_period_id_fkey FK CONSTRAINTALTER TABLE ONLY budgitem ADD CONSTRAINT budgitem_budgitem_period_id_fkey FOREIGN KEY (budgitem_period_id) REFERENCES period(period_id); SALTER TABLE ONLY public.budgitem DROP CONSTRAINT budgitem_budgitem_period_id_fkey; publicadminfalse2002016842G26061688987$cashrcpt_bankaccnt_bankaccnt_id_fkey FK CONSTRAINTALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_bankaccnt_bankaccnt_id_fkey FOREIGN KEY (cashrcpt_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id); WALTER TABLE ONLY public.cashrcpt DROP CONSTRAINT cashrcpt_bankaccnt_bankaccnt_id_fkey; publicadminfalse2032026846H26061688992cashrcpt_cust_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_cust_cust_id_fkey FOREIGN KEY (cashrcpt_cust_id) REFERENCES custinfo(cust_id); MALTER TABLE ONLY public.cashrcpt DROP CONSTRAINT cashrcpt_cust_cust_id_fkey; publicadminfalse2031606685I26061688997cashrcpt_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY cashrcpt ADD CONSTRAINT cashrcpt_to_curr_symbol FOREIGN KEY (cashrcpt_curr_id) REFERENCES curr_symbol(curr_id); JALTER TABLE ONLY public.cashrcpt DROP CONSTRAINT cashrcpt_to_curr_symbol; publicadminfalse2031566666K26061689002"cashrcptitem_aropen_aropen_id_fkey FK CONSTRAINTALTER TABLE ONLY cashrcptitem ADD CONSTRAINT cashrcptitem_aropen_aropen_id_fkey FOREIGN KEY (cashrcptitem_aropen_id) REFERENCES aropen(aropen_id); YALTER TABLE ONLY public.cashrcptitem DROP CONSTRAINT cashrcptitem_aropen_aropen_id_fkey; publicadminfalse2041596681J26061689007&cashrcptitem_cashrcpt_cashrcpt_id_fkey FK CONSTRAINTALTER TABLE ONLY cashrcptitem ADD CONSTRAINT cashrcptitem_cashrcpt_cashrcpt_id_fkey FOREIGN KEY (cashrcptitem_cashrcpt_id) REFERENCES cashrcpt(cashrcpt_id); ]ALTER TABLE ONLY public.cashrcptitem DROP CONSTRAINT cashrcptitem_cashrcpt_cashrcpt_id_fkey; publicadminfalse2042036850M26061689012 cashrcptmisc_accnt_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY cashrcptmisc ADD CONSTRAINT cashrcptmisc_accnt_accnt_id_fkey FOREIGN KEY (cashrcptmisc_accnt_id) REFERENCES accnt(accnt_id); WALTER TABLE ONLY public.cashrcptmisc DROP CONSTRAINT cashrcptmisc_accnt_accnt_id_fkey; publicadminfalse2051996837L26061689017&cashrcptmisc_cashrcpt_cashrcpt_id_fkey FK CONSTRAINTALTER TABLE ONLY cashrcptmisc ADD CONSTRAINT cashrcptmisc_cashrcpt_cashrcpt_id_fkey FOREIGN KEY (cashrcptmisc_cashrcpt_id) REFERENCES cashrcpt(cashrcpt_id); ]ALTER TABLE ONLY public.cashrcptmisc DROP CONSTRAINT cashrcptmisc_cashrcpt_cashrcpt_id_fkey; publicadminfalse2052036850N26061689022ccard_ccard_cust_id_fkey FK CONSTRAINT}ALTER TABLE ONLY ccard ADD CONSTRAINT ccard_ccard_cust_id_fkey FOREIGN KEY (ccard_cust_id) REFERENCES custinfo(cust_id); HALTER TABLE ONLY public.ccard DROP CONSTRAINT ccard_ccard_cust_id_fkey; publicadminfalse160206668526061689027ccbank_ccbank_bankaccnt_id_fkey FK CONSTRAINTALTER TABLE ONLY ccbank ADD CONSTRAINT ccbank_ccbank_bankaccnt_id_fkey FOREIGN KEY (ccbank_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id); PALTER TABLE ONLY public.ccbank DROP CONSTRAINT ccbank_ccbank_bankaccnt_id_fkey; publicadminfalse340202684626061689032charopt_charopt_char_id_fkey FK CONSTRAINTALTER TABLE ONLY charopt ADD CONSTRAINT charopt_charopt_char_id_fkey FOREIGN KEY (charopt_char_id) REFERENCES "char"(char_id) ON DELETE CASCADE; NALTER TABLE ONLY public.charopt DROP CONSTRAINT charopt_charopt_char_id_fkey; publicadminfalse680734618526061689037%checkhead_checkhead_bankaccnt_id_fkey FK CONSTRAINTALTER TABLE ONLY checkhead ADD CONSTRAINT checkhead_checkhead_bankaccnt_id_fkey FOREIGN KEY (checkhead_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id); YALTER TABLE ONLY public.checkhead DROP CONSTRAINT checkhead_checkhead_bankaccnt_id_fkey; publicadminfalse348202684626061689042 checkhead_checkhead_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY checkhead ADD CONSTRAINT checkhead_checkhead_curr_id_fkey FOREIGN KEY (checkhead_curr_id) REFERENCES curr_symbol(curr_id); TALTER TABLE ONLY public.checkhead DROP CONSTRAINT checkhead_checkhead_curr_id_fkey; publicadminfalse348156666626061689047"checkhead_checkhead_expcat_id_fkey FK CONSTRAINTALTER TABLE ONLY checkhead ADD CONSTRAINT checkhead_checkhead_expcat_id_fkey FOREIGN KEY (checkhead_expcat_id) REFERENCES expcat(expcat_id); VALTER TABLE ONLY public.checkhead DROP CONSTRAINT checkhead_checkhead_expcat_id_fkey; publicadminfalse700234824526061689052"checkitem_checkitem_apopen_id_fkey FK CONSTRAINTALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_checkitem_apopen_id_fkey FOREIGN KEY (checkitem_apopen_id) REFERENCES apopen(apopen_id); VALTER TABLE ONLY public.checkitem DROP CONSTRAINT checkitem_checkitem_apopen_id_fkey; publicadminfalse350155666026061689057"checkitem_checkitem_aropen_id_fkey FK CONSTRAINTALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_checkitem_aropen_id_fkey FOREIGN KEY (checkitem_aropen_id) REFERENCES aropen(aropen_id); VALTER TABLE ONLY public.checkitem DROP CONSTRAINT checkitem_checkitem_aropen_id_fkey; publicadminfalse350159668126061689062%checkitem_checkitem_checkhead_id_fkey FK CONSTRAINTALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_checkitem_checkhead_id_fkey FOREIGN KEY (checkitem_checkhead_id) REFERENCES checkhead(checkhead_id); YALTER TABLE ONLY public.checkitem DROP CONSTRAINT checkitem_checkitem_checkhead_id_fkey; publicadminfalse350348714726061689067 checkitem_checkitem_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY checkitem ADD CONSTRAINT checkitem_checkitem_curr_id_fkey FOREIGN KEY (checkitem_curr_id) REFERENCES curr_symbol(curr_id); TALTER TABLE ONLY public.checkitem DROP CONSTRAINT checkitem_checkitem_curr_id_fkey; publicadminfalse666635015626061689072cmdarg_cmdarg_cmd_id_fkey FK CONSTRAINTALTER TABLE ONLY cmdarg ADD CONSTRAINT cmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES cmd(cmd_id) ON DELETE CASCADE; JALTER TABLE ONLY public.cmdarg DROP CONSTRAINT cmdarg_cmdarg_cmd_id_fkey; publicadminfalse262259704626061689077cmhead_cmhead_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_cust_id_fkey FOREIGN KEY (cmhead_cust_id) REFERENCES custinfo(cust_id); KALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_cmhead_cust_id_fkey; publicadminfalse164160668526061689082$cmhead_cmhead_freighttaxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_freighttaxtype_id_fkey FOREIGN KEY (cmhead_freighttaxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_cmhead_freighttaxtype_id_fkey; publicadminfalse164170673326061689087cmhead_cmhead_prj_id_fkey FK CONSTRAINTyALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_prj_id_fkey FOREIGN KEY (cmhead_prj_id) REFERENCES prj(prj_id); JALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_cmhead_prj_id_fkey; publicadminfalse164174675126061689092cmhead_cmhead_salesrep_id_fkey FK CONSTRAINTALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_salesrep_id_fkey FOREIGN KEY (cmhead_salesrep_id) REFERENCES salesrep(salesrep_id); OALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_cmhead_salesrep_id_fkey; publicadminfalse164163669726061744606cmhead_cmhead_saletype_id_fkey FK CONSTRAINTALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_saletype_id_fkey FOREIGN KEY (cmhead_saletype_id) REFERENCES saletype(saletype_id); OALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_cmhead_saletype_id_fkey; publicadminfalse164722759126061744611cmhead_cmhead_shipzone_id_fkey FK CONSTRAINTALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_shipzone_id_fkey FOREIGN KEY (cmhead_shipzone_id) REFERENCES shipzone(shipzone_id); OALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_cmhead_shipzone_id_fkey; publicadminfalse164212687526061689097cmhead_cmhead_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_cmhead_taxzone_id_fkey FOREIGN KEY (cmhead_taxzone_id) REFERENCES taxzone(taxzone_id); NALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_cmhead_taxzone_id_fkey; publicadminfalse164166671026061689102cmhead_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY cmhead ADD CONSTRAINT cmhead_to_curr_symbol FOREIGN KEY (cmhead_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.cmhead DROP CONSTRAINT cmhead_to_curr_symbol; publicadminfalse164156666626061689107#cmheadtax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); WALTER TABLE ONLY public.cmheadtax DROP CONSTRAINT cmheadtax_taxhist_basis_tax_id_fkey; publicadminfalse354247700826061689112 cmheadtax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cmhead(cmhead_id) ON DELETE CASCADE; TALTER TABLE ONLY public.cmheadtax DROP CONSTRAINT cmheadtax_taxhist_parent_id_fkey; publicadminfalse164670435426061689117cmheadtax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); QALTER TABLE ONLY public.cmheadtax DROP CONSTRAINT cmheadtax_taxhist_tax_id_fkey; publicadminfalse354247700826061689122!cmheadtax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cmheadtax ADD CONSTRAINT cmheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.cmheadtax DROP CONSTRAINT cmheadtax_taxhist_taxtype_id_fkey; publicadminfalse170673335426061689127cmitem_cmhead_id_fkey FK CONSTRAINTALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmhead_id_fkey FOREIGN KEY (cmitem_cmhead_id) REFERENCES cmhead(cmhead_id) ON UPDATE CASCADE ON DELETE CASCADE; FALTER TABLE ONLY public.cmitem DROP CONSTRAINT cmitem_cmhead_id_fkey; publicadminfalse167164670426061689132cmitem_cmitem_price_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmitem_price_uom_id_fkey FOREIGN KEY (cmitem_price_uom_id) REFERENCES uom(uom_id); PALTER TABLE ONLY public.cmitem DROP CONSTRAINT cmitem_cmitem_price_uom_id_fkey; publicadminfalse167171673726061689137cmitem_cmitem_qty_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmitem_qty_uom_id_fkey FOREIGN KEY (cmitem_qty_uom_id) REFERENCES uom(uom_id); NALTER TABLE ONLY public.cmitem DROP CONSTRAINT cmitem_cmitem_qty_uom_id_fkey; publicadminfalse167171673726061689142cmitem_cmitem_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cmitem ADD CONSTRAINT cmitem_cmitem_taxtype_id_fkey FOREIGN KEY (cmitem_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.cmitem DROP CONSTRAINT cmitem_cmitem_taxtype_id_fkey; publicadminfalse167170673326061689147#cmitemtax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); WALTER TABLE ONLY public.cmitemtax DROP CONSTRAINT cmitemtax_taxhist_basis_tax_id_fkey; publicadminfalse356247700826061689152 cmitemtax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cmitem(cmitem_id) ON DELETE CASCADE; TALTER TABLE ONLY public.cmitemtax DROP CONSTRAINT cmitemtax_taxhist_parent_id_fkey; publicadminfalse356167671626061689157cmitemtax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); QALTER TABLE ONLY public.cmitemtax DROP CONSTRAINT cmitemtax_taxhist_tax_id_fkey; publicadminfalse356247700826061689162!cmitemtax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cmitemtax ADD CONSTRAINT cmitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.cmitemtax DROP CONSTRAINT cmitemtax_taxhist_taxtype_id_fkey; publicadminfalse356170673326061689167cntct_cntct_addr_id_fkey FK CONSTRAINTyALTER TABLE ONLY cntct ADD CONSTRAINT cntct_cntct_addr_id_fkey FOREIGN KEY (cntct_addr_id) REFERENCES addr(addr_id); HALTER TABLE ONLY public.cntct DROP CONSTRAINT cntct_cntct_addr_id_fkey; publicadminfalse152184680326061689172cntct_cntct_crmacct_id_fkey FK CONSTRAINTALTER TABLE ONLY cntct ADD CONSTRAINT cntct_cntct_crmacct_id_fkey FOREIGN KEY (cntct_crmacct_id) REFERENCES crmacct(crmacct_id); KALTER TABLE ONLY public.cntct DROP CONSTRAINT cntct_cntct_crmacct_id_fkey; publicadminfalse152153665226061689177 cntctaddr_cntctaddr_addr_id_fkey FK CONSTRAINTALTER TABLE ONLY cntctaddr ADD CONSTRAINT cntctaddr_cntctaddr_addr_id_fkey FOREIGN KEY (cntctaddr_addr_id) REFERENCES addr(addr_id); TALTER TABLE ONLY public.cntctaddr DROP CONSTRAINT cntctaddr_cntctaddr_addr_id_fkey; publicadminfalse361184680326061689182!cntctaddr_cntctaddr_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY cntctaddr ADD CONSTRAINT cntctaddr_cntctaddr_cntct_id_fkey FOREIGN KEY (cntctaddr_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; UALTER TABLE ONLY public.cntctaddr DROP CONSTRAINT cntctaddr_cntctaddr_cntct_id_fkey; publicadminfalse361152664826061689187!cntctdata_cntctdata_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY cntctdata ADD CONSTRAINT cntctdata_cntctdata_cntct_id_fkey FOREIGN KEY (cntctdata_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; UALTER TABLE ONLY public.cntctdata DROP CONSTRAINT cntctdata_cntctdata_cntct_id_fkey; publicadminfalse363152664826061689192cntcteml_cntcteml_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY cntcteml ADD CONSTRAINT cntcteml_cntcteml_cntct_id_fkey FOREIGN KEY (cntcteml_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; RALTER TABLE ONLY public.cntcteml DROP CONSTRAINT cntcteml_cntcteml_cntct_id_fkey; publicadminfalse365152664826061689197!cntctmrgd_cntctmrgd_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY cntctmrgd ADD CONSTRAINT cntctmrgd_cntctmrgd_cntct_id_fkey FOREIGN KEY (cntctmrgd_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; UALTER TABLE ONLY public.cntctmrgd DROP CONSTRAINT cntctmrgd_cntctmrgd_cntct_id_fkey; publicadminfalse367152664826061689202cntctsel_cntctsel_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY cntctsel ADD CONSTRAINT cntctsel_cntctsel_cntct_id_fkey FOREIGN KEY (cntctsel_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; RALTER TABLE ONLY public.cntctsel DROP CONSTRAINT cntctsel_cntctsel_cntct_id_fkey; publicadminfalse368152664826061689207cobill_cobill_invcitem_id_fkey FK CONSTRAINTALTER TABLE ONLY cobill ADD CONSTRAINT cobill_cobill_invcitem_id_fkey FOREIGN KEY (cobill_invcitem_id) REFERENCES invcitem(invcitem_id); OALTER TABLE ONLY public.cobill DROP CONSTRAINT cobill_cobill_invcitem_id_fkey; publicadminfalse371175675926061689212cobill_cobill_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cobill ADD CONSTRAINT cobill_cobill_taxtype_id_fkey FOREIGN KEY (cobill_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.cobill DROP CONSTRAINT cobill_cobill_taxtype_id_fkey; publicadminfalse371170673326061689217#cobilltax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); WALTER TABLE ONLY public.cobilltax DROP CONSTRAINT cobilltax_taxhist_basis_tax_id_fkey; publicadminfalse373247700826061689222 cobilltax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cobill(cobill_id) ON DELETE CASCADE; TALTER TABLE ONLY public.cobilltax DROP CONSTRAINT cobilltax_taxhist_parent_id_fkey; publicadminfalse373371717426061689227cobilltax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); QALTER TABLE ONLY public.cobilltax DROP CONSTRAINT cobilltax_taxhist_tax_id_fkey; publicadminfalse373247700826061689232!cobilltax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cobilltax ADD CONSTRAINT cobilltax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.cobilltax DROP CONSTRAINT cobilltax_taxhist_taxtype_id_fkey; publicadminfalse373170673326061689237 cobmisc_cobmisc_invchead_id_fkey FK CONSTRAINTALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_cobmisc_invchead_id_fkey FOREIGN KEY (cobmisc_invchead_id) REFERENCES invchead(invchead_id); RALTER TABLE ONLY public.cobmisc DROP CONSTRAINT cobmisc_cobmisc_invchead_id_fkey; publicadminfalse374173674926061689242cobmisc_cobmisc_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_cobmisc_taxtype_id_fkey FOREIGN KEY (cobmisc_taxtype_id) REFERENCES taxtype(taxtype_id); QALTER TABLE ONLY public.cobmisc DROP CONSTRAINT cobmisc_cobmisc_taxtype_id_fkey; publicadminfalse374170673326061689247cobmisc_cobmisc_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_cobmisc_taxzone_id_fkey FOREIGN KEY (cobmisc_taxzone_id) REFERENCES taxzone(taxzone_id); QALTER TABLE ONLY public.cobmisc DROP CONSTRAINT cobmisc_cobmisc_taxzone_id_fkey; publicadminfalse374166671026061689252cobmisc_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY cobmisc ADD CONSTRAINT cobmisc_to_curr_symbol FOREIGN KEY (cobmisc_curr_id) REFERENCES curr_symbol(curr_id); HALTER TABLE ONLY public.cobmisc DROP CONSTRAINT cobmisc_to_curr_symbol; publicadminfalse374156666626061689257$cobmisctax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); YALTER TABLE ONLY public.cobmisctax DROP CONSTRAINT cobmisctax_taxhist_basis_tax_id_fkey; publicadminfalse376247700826061689262!cobmisctax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cobmisc(cobmisc_id) ON DELETE CASCADE; VALTER TABLE ONLY public.cobmisctax DROP CONSTRAINT cobmisctax_taxhist_parent_id_fkey; publicadminfalse376374717926061689267cobmisctax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); SALTER TABLE ONLY public.cobmisctax DROP CONSTRAINT cobmisctax_taxhist_tax_id_fkey; publicadminfalse376247700826061689272"cobmisctax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cobmisctax ADD CONSTRAINT cobmisctax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); WALTER TABLE ONLY public.cobmisctax DROP CONSTRAINT cobmisctax_taxhist_taxtype_id_fkey; publicadminfalse3761706733 26061689277"cohead_cohead_billto_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_billto_cntct_id_fkey FOREIGN KEY (cohead_billto_cntct_id) REFERENCES cntct(cntct_id); SALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_billto_cntct_id_fkey; publicadminfalse1761526648 26061689282cohead_cohead_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_cust_id_fkey FOREIGN KEY (cohead_cust_id) REFERENCES custinfo(cust_id); KALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_cust_id_fkey; publicadminfalse1761606685 26061689287 cohead_cohead_misc_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_misc_accnt_id_fkey FOREIGN KEY (cohead_misc_accnt_id) REFERENCES accnt(accnt_id); QALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_misc_accnt_id_fkey; publicadminfalse1761996837 26061689292cohead_cohead_ophead_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_ophead_id_fkey FOREIGN KEY (cohead_ophead_id) REFERENCES ophead(ophead_id); MALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_ophead_id_fkey; publicadminfalse176181679226061689297cohead_cohead_prj_id_fkey FK CONSTRAINTyALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_prj_id_fkey FOREIGN KEY (cohead_prj_id) REFERENCES prj(prj_id); JALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_prj_id_fkey; publicadminfalse176174675126061689302cohead_cohead_salesrep_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_salesrep_id_fkey FOREIGN KEY (cohead_salesrep_id) REFERENCES salesrep(salesrep_id); OALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_salesrep_id_fkey; publicadminfalse176163669726061744616cohead_cohead_saletype_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_saletype_id_fkey FOREIGN KEY (cohead_saletype_id) REFERENCES saletype(saletype_id); OALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_saletype_id_fkey; publicadminfalse176722759126061689307cohead_cohead_shipform_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_shipform_id_fkey FOREIGN KEY (cohead_shipform_id) REFERENCES shipform(shipform_id); OALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_shipform_id_fkey; publicadminfalse176209686526061689312"cohead_cohead_shipto_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_shipto_cntct_id_fkey FOREIGN KEY (cohead_shipto_cntct_id) REFERENCES cntct(cntct_id); SALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_shipto_cntct_id_fkey; publicadminfalse176152664826061689317cohead_cohead_shipto_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_shipto_id_fkey FOREIGN KEY (cohead_shipto_id) REFERENCES shiptoinfo(shipto_id); MALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_shipto_id_fkey; publicadminfalse176165670826061744621cohead_cohead_shipzone_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_shipzone_id_fkey FOREIGN KEY (cohead_shipzone_id) REFERENCES shipzone(shipzone_id); OALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_shipzone_id_fkey; publicadminfalse176212687526061689322cohead_cohead_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_taxtype_id_fkey FOREIGN KEY (cohead_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_taxtype_id_fkey; publicadminfalse176170673326061689327cohead_cohead_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_taxzone_id_fkey FOREIGN KEY (cohead_taxzone_id) REFERENCES taxzone(taxzone_id); NALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_taxzone_id_fkey; publicadminfalse176166671026061689332cohead_cohead_terms_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_terms_id_fkey FOREIGN KEY (cohead_terms_id) REFERENCES terms(terms_id); LALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_terms_id_fkey; publicadminfalse176157666826061689337cohead_cohead_warehous_id_fkey FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_cohead_warehous_id_fkey FOREIGN KEY (cohead_warehous_id) REFERENCES whsinfo(warehous_id); OALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_cohead_warehous_id_fkey; publicadminfalse176172674226061689342cohead_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY cohead ADD CONSTRAINT cohead_to_curr_symbol FOREIGN KEY (cohead_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.cohead DROP CONSTRAINT cohead_to_curr_symbol; publicadminfalse176156666626061689347"cohist_cohist_cohead_ccpay_id_fkey FK CONSTRAINTALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_cohead_ccpay_id_fkey FOREIGN KEY (cohist_cohead_ccpay_id) REFERENCES ccpay(ccpay_id); SALTER TABLE ONLY public.cohist DROP CONSTRAINT cohist_cohist_cohead_ccpay_id_fkey; publicadminfalse252342714326061689352cohist_cohist_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_cust_id_fkey FOREIGN KEY (cohist_cust_id) REFERENCES custinfo(cust_id); KALTER TABLE ONLY public.cohist DROP CONSTRAINT cohist_cohist_cust_id_fkey; publicadminfalse252160668526061689357cohist_cohist_salesrep_id_fkey FK CONSTRAINTALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_salesrep_id_fkey FOREIGN KEY (cohist_salesrep_id) REFERENCES salesrep(salesrep_id); OALTER TABLE ONLY public.cohist DROP CONSTRAINT cohist_cohist_salesrep_id_fkey; publicadminfalse252163669726061689362cohist_cohist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_taxtype_id_fkey FOREIGN KEY (cohist_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.cohist DROP CONSTRAINT cohist_cohist_taxtype_id_fkey; publicadminfalse252170673326061689367cohist_cohist_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY cohist ADD CONSTRAINT cohist_cohist_taxzone_id_fkey FOREIGN KEY (cohist_taxzone_id) REFERENCES taxzone(taxzone_id); NALTER TABLE ONLY public.cohist DROP CONSTRAINT cohist_cohist_taxzone_id_fkey; publicadminfalse252166671026061689372cohist_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY cohist ADD CONSTRAINT cohist_to_curr_symbol FOREIGN KEY (cohist_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.cohist DROP CONSTRAINT cohist_to_curr_symbol; publicadminfalse252156666626061689377#cohisttax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); WALTER TABLE ONLY public.cohisttax DROP CONSTRAINT cohisttax_taxhist_basis_tax_id_fkey; publicadminfalse255247700826061689382 cohisttax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cohist(cohist_id) ON DELETE CASCADE; TALTER TABLE ONLY public.cohisttax DROP CONSTRAINT cohisttax_taxhist_parent_id_fkey; publicadminfalse255252702626061689387cohisttax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); QALTER TABLE ONLY public.cohisttax DROP CONSTRAINT cohisttax_taxhist_tax_id_fkey; publicadminfalse255247700826061689392!cohisttax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY cohisttax ADD CONSTRAINT cohisttax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.cohisttax DROP CONSTRAINT cohisttax_taxhist_taxtype_id_fkey; publicadminfalse255170673326061689397coitem_coitem_cohead_id_fkey FK CONSTRAINTALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_cohead_id_fkey FOREIGN KEY (coitem_cohead_id) REFERENCES cohead(cohead_id) ON DELETE CASCADE; MALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_coitem_cohead_id_fkey; publicadminfalse177176676726061689402coitem_coitem_cos_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_cos_accnt_id_fkey FOREIGN KEY (coitem_cos_accnt_id) REFERENCES accnt(accnt_id); PALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_coitem_cos_accnt_id_fkey; publicadminfalse177199683726061689407coitem_coitem_itemsite_id_fkey FK CONSTRAINTALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_itemsite_id_fkey FOREIGN KEY (coitem_itemsite_id) REFERENCES itemsite(itemsite_id); OALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_coitem_itemsite_id_fkey; publicadminfalse177169672926061689412coitem_coitem_price_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_price_uom_id_fkey FOREIGN KEY (coitem_price_uom_id) REFERENCES uom(uom_id); PALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_coitem_price_uom_id_fkey; publicadminfalse177171673726061689417coitem_coitem_qty_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_qty_uom_id_fkey FOREIGN KEY (coitem_qty_uom_id) REFERENCES uom(uom_id); NALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_coitem_qty_uom_id_fkey; publicadminfalse177171673726061689422coitem_coitem_rev_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_rev_accnt_id_fkey FOREIGN KEY (coitem_rev_accnt_id) REFERENCES accnt(accnt_id); PALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_coitem_rev_accnt_id_fkey; publicadminfalse1771996837 26061689427%coitem_coitem_substitute_item_id_fkey FK CONSTRAINTALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_substitute_item_id_fkey FOREIGN KEY (coitem_substitute_item_id) REFERENCES item(item_id); VALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_coitem_substitute_item_id_fkey; publicadminfalse1771686722!26061689432coitem_coitem_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY coitem ADD CONSTRAINT coitem_coitem_taxtype_id_fkey FOREIGN KEY (coitem_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.coitem DROP CONSTRAINT coitem_coitem_taxtype_id_fkey; publicadminfalse1771706733>26061689437 comment_comment_cmnttype_id_fkey FK CONSTRAINTALTER TABLE ONLY comment ADD CONSTRAINT comment_comment_cmnttype_id_fkey FOREIGN KEY (comment_cmnttype_id) REFERENCES cmnttype(cmnttype_id); RALTER TABLE ONLY public.comment DROP CONSTRAINT comment_comment_cmnttype_id_fkey; publicadminfalse188187681426061689442company_company_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY company ADD CONSTRAINT company_company_curr_id_fkey FOREIGN KEY (company_curr_id) REFERENCES curr_symbol(curr_id); NALTER TABLE ONLY public.company DROP CONSTRAINT company_company_curr_id_fkey; publicadminfalse381156666626061689447#company_company_dscrp_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY company ADD CONSTRAINT company_company_dscrp_accnt_id_fkey FOREIGN KEY (company_dscrp_accnt_id) REFERENCES accnt(accnt_id); UALTER TABLE ONLY public.company DROP CONSTRAINT company_company_dscrp_accnt_id_fkey; publicadminfalse381199683726061689452&company_company_gainloss_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY company ADD CONSTRAINT company_company_gainloss_accnt_id_fkey FOREIGN KEY (company_gainloss_accnt_id) REFERENCES accnt(accnt_id); XALTER TABLE ONLY public.company DROP CONSTRAINT company_company_gainloss_accnt_id_fkey; publicadminfalse381199683726061689457+company_company_unrlzgainloss_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY company ADD CONSTRAINT company_company_unrlzgainloss_accnt_id_fkey FOREIGN KEY (company_unrlzgainloss_accnt_id) REFERENCES accnt(accnt_id); ]ALTER TABLE ONLY public.company DROP CONSTRAINT company_company_unrlzgainloss_accnt_id_fkey; publicadminfalse381199683726061689462%company_company_yearend_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY company ADD CONSTRAINT company_company_yearend_accnt_id_fkey FOREIGN KEY (company_yearend_accnt_id) REFERENCES accnt(accnt_id); WALTER TABLE ONLY public.company DROP CONSTRAINT company_company_yearend_accnt_id_fkey; publicadminfalse3811996837N26061744588contrct_contrct_vend_id_fkey FK CONSTRAINTALTER TABLE ONLY contrct ADD CONSTRAINT contrct_contrct_vend_id_fkey FOREIGN KEY (contrct_vend_id) REFERENCES vendinfo(vend_id); NALTER TABLE ONLY public.contrct DROP CONSTRAINT contrct_contrct_vend_id_fkey; publicadminfalse720158667326061689467costhist_new_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY costhist ADD CONSTRAINT costhist_new_to_curr_symbol FOREIGN KEY (costhist_newcurr_id) REFERENCES curr_symbol(curr_id); NALTER TABLE ONLY public.costhist DROP CONSTRAINT costhist_new_to_curr_symbol; publicadminfalse388156666626061689472costhist_old_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY costhist ADD CONSTRAINT costhist_old_to_curr_symbol FOREIGN KEY (costhist_oldcurr_id) REFERENCES curr_symbol(curr_id); NALTER TABLE ONLY public.costhist DROP CONSTRAINT costhist_old_to_curr_symbol; publicadminfalse388156666626061689477crmacct_crmacct_cntct_id_1_fkey FK CONSTRAINTALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_cntct_id_1_fkey FOREIGN KEY (crmacct_cntct_id_1) REFERENCES cntct(cntct_id); QALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_cntct_id_1_fkey; publicadminfalse153152664826061689482crmacct_crmacct_cntct_id_2_fkey FK CONSTRAINTALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_cntct_id_2_fkey FOREIGN KEY (crmacct_cntct_id_2) REFERENCES cntct(cntct_id); QALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_cntct_id_2_fkey; publicadminfalse153152664826061689487crmacct_crmacct_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_cust_id_fkey FOREIGN KEY (crmacct_cust_id) REFERENCES custinfo(cust_id); NALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_cust_id_fkey; publicadminfalse153160668526061689492crmacct_crmacct_emp_id_fkey FK CONSTRAINT}ALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_emp_id_fkey FOREIGN KEY (crmacct_emp_id) REFERENCES emp(emp_id); MALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_emp_id_fkey; publicadminfalse153214688726061689497crmacct_crmacct_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_parent_id_fkey FOREIGN KEY (crmacct_parent_id) REFERENCES crmacct(crmacct_id); PALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_parent_id_fkey; publicadminfalse153153665226061689502 crmacct_crmacct_prospect_id_fkey FK CONSTRAINTALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_prospect_id_fkey FOREIGN KEY (crmacct_prospect_id) REFERENCES prospect(prospect_id); RALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_prospect_id_fkey; publicadminfalse153244699626061689507 crmacct_crmacct_salesrep_id_fkey FK CONSTRAINTALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_salesrep_id_fkey FOREIGN KEY (crmacct_salesrep_id) REFERENCES salesrep(salesrep_id); RALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_salesrep_id_fkey; publicadminfalse153163669726061689512crmacct_crmacct_taxauth_id_fkey FK CONSTRAINTALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_taxauth_id_fkey FOREIGN KEY (crmacct_taxauth_id) REFERENCES taxauth(taxauth_id); QALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_taxauth_id_fkey; publicadminfalse153210686926061689517crmacct_crmacct_vend_id_fkey FK CONSTRAINTALTER TABLE ONLY crmacct ADD CONSTRAINT crmacct_crmacct_vend_id_fkey FOREIGN KEY (crmacct_vend_id) REFERENCES vendinfo(vend_id); NALTER TABLE ONLY public.crmacct DROP CONSTRAINT crmacct_crmacct_vend_id_fkey; publicadminfalse153158667326061689522*crmacctsel_crmacctsel_dest_crmacct_id_fkey FK CONSTRAINTALTER TABLE ONLY crmacctsel ADD CONSTRAINT crmacctsel_crmacctsel_dest_crmacct_id_fkey FOREIGN KEY (crmacctsel_dest_crmacct_id) REFERENCES crmacct(crmacct_id) ON DELETE CASCADE; _ALTER TABLE ONLY public.crmacctsel DROP CONSTRAINT crmacctsel_crmacctsel_dest_crmacct_id_fkey; publicadminfalse395153665226061689527)crmacctsel_crmacctsel_src_crmacct_id_fkey FK CONSTRAINTALTER TABLE ONLY crmacctsel ADD CONSTRAINT crmacctsel_crmacctsel_src_crmacct_id_fkey FOREIGN KEY (crmacctsel_src_crmacct_id) REFERENCES crmacct(crmacct_id) ON DELETE CASCADE; ^ALTER TABLE ONLY public.crmacctsel DROP CONSTRAINT crmacctsel_crmacctsel_src_crmacct_id_fkey; publicadminfalse395153665226061689532curr_rate_to_curr_symbol FK CONSTRAINT~ALTER TABLE ONLY curr_rate ADD CONSTRAINT curr_rate_to_curr_symbol FOREIGN KEY (curr_id) REFERENCES curr_symbol(curr_id); LALTER TABLE ONLY public.curr_rate DROP CONSTRAINT curr_rate_to_curr_symbol; publicadminfalse396156666626061689537cust_creditlmt_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY custinfo ADD CONSTRAINT cust_creditlmt_to_curr_symbol FOREIGN KEY (cust_creditlmt_curr_id) REFERENCES curr_symbol(curr_id); PALTER TABLE ONLY public.custinfo DROP CONSTRAINT cust_creditlmt_to_curr_symbol; publicadminfalse160156666626061689542cust_to_curr_symbol FK CONSTRAINT}ALTER TABLE ONLY custinfo ADD CONSTRAINT cust_to_curr_symbol FOREIGN KEY (cust_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.custinfo DROP CONSTRAINT cust_to_curr_symbol; publicadminfalse160156666626061689547custinfo_cust_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_cntct_id_fkey FOREIGN KEY (cust_cntct_id) REFERENCES cntct(cntct_id); NALTER TABLE ONLY public.custinfo DROP CONSTRAINT custinfo_cust_cntct_id_fkey; publicadminfalse160152664826061689552custinfo_cust_corrcntct_id_fkey FK CONSTRAINTALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_corrcntct_id_fkey FOREIGN KEY (cust_corrcntct_id) REFERENCES cntct(cntct_id); RALTER TABLE ONLY public.custinfo DROP CONSTRAINT custinfo_cust_corrcntct_id_fkey; publicadminfalse160152664826061689557custinfo_cust_custtype_fkey FK CONSTRAINTALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_custtype_fkey FOREIGN KEY (cust_custtype_id) REFERENCES custtype(custtype_id) ON UPDATE RESTRICT ON DELETE RESTRICT; NALTER TABLE ONLY public.custinfo DROP CONSTRAINT custinfo_cust_custtype_fkey; publicadminfalse160207686126061689562custinfo_cust_salesrep_fkey FK CONSTRAINTALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_salesrep_fkey FOREIGN KEY (cust_salesrep_id) REFERENCES salesrep(salesrep_id) ON UPDATE RESTRICT ON DELETE RESTRICT; NALTER TABLE ONLY public.custinfo DROP CONSTRAINT custinfo_cust_salesrep_fkey; publicadminfalse160163669726061689567custinfo_cust_shipform_fkey FK CONSTRAINTALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_shipform_fkey FOREIGN KEY (cust_shipform_id) REFERENCES shipform(shipform_id) ON UPDATE RESTRICT ON DELETE RESTRICT; NALTER TABLE ONLY public.custinfo DROP CONSTRAINT custinfo_cust_shipform_fkey; publicadminfalse160209686526061689572custinfo_cust_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_taxzone_id_fkey FOREIGN KEY (cust_taxzone_id) REFERENCES taxzone(taxzone_id); PALTER TABLE ONLY public.custinfo DROP CONSTRAINT custinfo_cust_taxzone_id_fkey; publicadminfalse160166671026061689577custinfo_cust_terms_fkey FK CONSTRAINTALTER TABLE ONLY custinfo ADD CONSTRAINT custinfo_cust_terms_fkey FOREIGN KEY (cust_terms_id) REFERENCES terms(terms_id) ON UPDATE RESTRICT ON DELETE RESTRICT; KALTER TABLE ONLY public.custinfo DROP CONSTRAINT custinfo_cust_terms_fkey; publicadminfalse1601576668T26061689582emp_emp_cntct_id_fkey FK CONSTRAINTuALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_cntct_id_fkey FOREIGN KEY (emp_cntct_id) REFERENCES cntct(cntct_id); CALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_cntct_id_fkey; publicadminfalse2141526648U26061689587emp_emp_dept_id_fkey FK CONSTRAINTqALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_dept_id_fkey FOREIGN KEY (emp_dept_id) REFERENCES dept(dept_id); BALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_dept_id_fkey; publicadminfalse2142136881V26061689592emp_emp_image_id_fkey FK CONSTRAINTuALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_image_id_fkey FOREIGN KEY (emp_image_id) REFERENCES image(image_id); CALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_image_id_fkey; publicadminfalse2141946825W26061689597emp_emp_mgr_emp_id_fkey FK CONSTRAINTuALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_mgr_emp_id_fkey FOREIGN KEY (emp_mgr_emp_id) REFERENCES emp(emp_id); EALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_mgr_emp_id_fkey; publicadminfalse2142146887X26061689602emp_emp_shift_id_fkey FK CONSTRAINTuALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_shift_id_fkey FOREIGN KEY (emp_shift_id) REFERENCES shift(shift_id); CALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_shift_id_fkey; publicadminfalse2142156889Y26061689607emp_emp_wage_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_wage_curr_id_fkey FOREIGN KEY (emp_wage_curr_id) REFERENCES curr_symbol(curr_id); GALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_wage_curr_id_fkey; publicadminfalse2141566666Z26061689612emp_emp_warehous_id_fkey FK CONSTRAINTALTER TABLE ONLY emp ADD CONSTRAINT emp_emp_warehous_id_fkey FOREIGN KEY (emp_warehous_id) REFERENCES whsinfo(warehous_id); FALTER TABLE ONLY public.emp DROP CONSTRAINT emp_emp_warehous_id_fkey; publicadminfalse214172674226061689617!empgrpitem_empgrpitem_emp_id_fkey FK CONSTRAINTALTER TABLE ONLY empgrpitem ADD CONSTRAINT empgrpitem_empgrpitem_emp_id_fkey FOREIGN KEY (empgrpitem_emp_id) REFERENCES emp(emp_id); VALTER TABLE ONLY public.empgrpitem DROP CONSTRAINT empgrpitem_empgrpitem_emp_id_fkey; publicadminfalse414214688726061689622$empgrpitem_empgrpitem_empgrp_id_fkey FK CONSTRAINTALTER TABLE ONLY empgrpitem ADD CONSTRAINT empgrpitem_empgrpitem_empgrp_id_fkey FOREIGN KEY (empgrpitem_empgrp_id) REFERENCES empgrp(empgrp_id); YALTER TABLE ONLY public.empgrpitem DROP CONSTRAINT empgrpitem_empgrpitem_empgrp_id_fkey; publicadminfalse414412722526061689627flnotes_flnotes_flhead_id_fkey FK CONSTRAINTALTER TABLE ONLY flnotes ADD CONSTRAINT flnotes_flnotes_flhead_id_fkey FOREIGN KEY (flnotes_flhead_id) REFERENCES flhead(flhead_id) ON DELETE CASCADE; PALTER TABLE ONLY public.flnotes DROP CONSTRAINT flnotes_flnotes_flhead_id_fkey; publicadminfalse434426724626061689632flnotes_flnotes_period_id_fkey FK CONSTRAINTALTER TABLE ONLY flnotes ADD CONSTRAINT flnotes_flnotes_period_id_fkey FOREIGN KEY (flnotes_period_id) REFERENCES period(period_id) ON DELETE CASCADE; PALTER TABLE ONLY public.flnotes DROP CONSTRAINT flnotes_flnotes_period_id_fkey; publicadminfalse434201684226061689637grppriv_grppriv_grp_id_fkey FK CONSTRAINT}ALTER TABLE ONLY grppriv ADD CONSTRAINT grppriv_grppriv_grp_id_fkey FOREIGN KEY (grppriv_grp_id) REFERENCES grp(grp_id); MALTER TABLE ONLY public.grppriv DROP CONSTRAINT grppriv_grppriv_grp_id_fkey; publicadminfalse449447726826061689642incdt_incdt_aropen_id_fkey FK CONSTRAINTALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_aropen_id_fkey FOREIGN KEY (incdt_aropen_id) REFERENCES aropen(aropen_id); JALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_aropen_id_fkey; publicadminfalse154159668126061689647incdt_incdt_cntct_id_fkey FK CONSTRAINT}ALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_cntct_id_fkey FOREIGN KEY (incdt_cntct_id) REFERENCES cntct(cntct_id); IALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_cntct_id_fkey; publicadminfalse154152664826061689652incdt_incdt_crmacct_id_fkey FK CONSTRAINTALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_crmacct_id_fkey FOREIGN KEY (incdt_crmacct_id) REFERENCES crmacct(crmacct_id); KALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_crmacct_id_fkey; publicadminfalse154153665226061689657incdt_incdt_incdtcat_id_fkey FK CONSTRAINTALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_incdtcat_id_fkey FOREIGN KEY (incdt_incdtcat_id) REFERENCES incdtcat(incdtcat_id); LALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_incdtcat_id_fkey; publicadminfalse154220690626061689662!incdt_incdt_incdtpriority_id_fkey FK CONSTRAINTALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_incdtpriority_id_fkey FOREIGN KEY (incdt_incdtpriority_id) REFERENCES incdtpriority(incdtpriority_id); QALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_incdtpriority_id_fkey; publicadminfalse154221691026061689667#incdt_incdt_incdtresolution_id_fkey FK CONSTRAINTALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_incdtresolution_id_fkey FOREIGN KEY (incdt_incdtresolution_id) REFERENCES incdtresolution(incdtresolution_id); SALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_incdtresolution_id_fkey; publicadminfalse154222691426061689672!incdt_incdt_incdtseverity_id_fkey FK CONSTRAINTALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_incdtseverity_id_fkey FOREIGN KEY (incdt_incdtseverity_id) REFERENCES incdtseverity(incdtseverity_id); QALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_incdtseverity_id_fkey; publicadminfalse154223691826061689677incdt_incdt_item_id_fkey FK CONSTRAINTyALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_item_id_fkey FOREIGN KEY (incdt_item_id) REFERENCES item(item_id); HALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_item_id_fkey; publicadminfalse154168672226061689682incdt_incdt_prj_id_fkey FK CONSTRAINTuALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_prj_id_fkey FOREIGN KEY (incdt_prj_id) REFERENCES prj(prj_id); GALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_prj_id_fkey; publicadminfalse154174675126061689687#incdt_incdt_recurring_incdt_id_fkey FK CONSTRAINTALTER TABLE ONLY incdt ADD CONSTRAINT incdt_incdt_recurring_incdt_id_fkey FOREIGN KEY (incdt_recurring_incdt_id) REFERENCES incdt(incdt_id); SALTER TABLE ONLY public.incdt DROP CONSTRAINT incdt_incdt_recurring_incdt_id_fkey; publicadminfalse154154665626061689692!incdthist_incdthist_incdt_id_fkey FK CONSTRAINTALTER TABLE ONLY incdthist ADD CONSTRAINT incdthist_incdthist_incdt_id_fkey FOREIGN KEY (incdthist_incdt_id) REFERENCES incdt(incdt_id); UALTER TABLE ONLY public.incdthist DROP CONSTRAINT incdthist_incdthist_incdt_id_fkey; publicadminfalse455154665626061689697invbal_invbal_itemsite_id_fkey FK CONSTRAINTALTER TABLE ONLY invbal ADD CONSTRAINT invbal_invbal_itemsite_id_fkey FOREIGN KEY (invbal_itemsite_id) REFERENCES itemsite(itemsite_id) ON DELETE CASCADE; OALTER TABLE ONLY public.invbal DROP CONSTRAINT invbal_invbal_itemsite_id_fkey; publicadminfalse150169672926061689702invbal_invbal_period_id_fkey FK CONSTRAINTALTER TABLE ONLY invbal ADD CONSTRAINT invbal_invbal_period_id_fkey FOREIGN KEY (invbal_period_id) REFERENCES period(period_id) ON DELETE CASCADE; MALTER TABLE ONLY public.invbal DROP CONSTRAINT invbal_invbal_period_id_fkey; publicadminfalse150201684226061744628"invchead_invchead_saletype_id_fkey FK CONSTRAINTALTER TABLE ONLY invchead ADD CONSTRAINT invchead_invchead_saletype_id_fkey FOREIGN KEY (invchead_saletype_id) REFERENCES saletype(saletype_id); UALTER TABLE ONLY public.invchead DROP CONSTRAINT invchead_invchead_saletype_id_fkey; publicadminfalse173722759126061744633"invchead_invchead_shipzone_id_fkey FK CONSTRAINTALTER TABLE ONLY invchead ADD CONSTRAINT invchead_invchead_shipzone_id_fkey FOREIGN KEY (invchead_shipzone_id) REFERENCES shipzone(shipzone_id); UALTER TABLE ONLY public.invchead DROP CONSTRAINT invchead_invchead_shipzone_id_fkey; publicadminfalse173212687526061689707!invchead_invchead_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY invchead ADD CONSTRAINT invchead_invchead_taxzone_id_fkey FOREIGN KEY (invchead_taxzone_id) REFERENCES taxzone(taxzone_id); TALTER TABLE ONLY public.invchead DROP CONSTRAINT invchead_invchead_taxzone_id_fkey; publicadminfalse173166671026061689712invchead_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY invchead ADD CONSTRAINT invchead_to_curr_symbol FOREIGN KEY (invchead_curr_id) REFERENCES curr_symbol(curr_id); JALTER TABLE ONLY public.invchead DROP CONSTRAINT invchead_to_curr_symbol; publicadminfalse173156666626061689717%invcheadtax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); [ALTER TABLE ONLY public.invcheadtax DROP CONSTRAINT invcheadtax_taxhist_basis_tax_id_fkey; publicadminfalse463247700826061689722"invcheadtax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES invchead(invchead_id) ON DELETE CASCADE; XALTER TABLE ONLY public.invcheadtax DROP CONSTRAINT invcheadtax_taxhist_parent_id_fkey; publicadminfalse463173674926061689727invcheadtax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); UALTER TABLE ONLY public.invcheadtax DROP CONSTRAINT invcheadtax_taxhist_tax_id_fkey; publicadminfalse463247700826061689732#invcheadtax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY invcheadtax ADD CONSTRAINT invcheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); YALTER TABLE ONLY public.invcheadtax DROP CONSTRAINT invcheadtax_taxhist_taxtype_id_fkey; publicadminfalse463170673326061689737invcitem_invchead_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invchead_id_fkey FOREIGN KEY (invcitem_invchead_id) REFERENCES invchead(invchead_id) ON UPDATE CASCADE ON DELETE CASCADE; LALTER TABLE ONLY public.invcitem DROP CONSTRAINT invcitem_invchead_id_fkey; publicadminfalse175173674926061689742#invcitem_invcitem_price_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invcitem_price_uom_id_fkey FOREIGN KEY (invcitem_price_uom_id) REFERENCES uom(uom_id); VALTER TABLE ONLY public.invcitem DROP CONSTRAINT invcitem_invcitem_price_uom_id_fkey; publicadminfalse175171673726061689747!invcitem_invcitem_qty_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invcitem_qty_uom_id_fkey FOREIGN KEY (invcitem_qty_uom_id) REFERENCES uom(uom_id); TALTER TABLE ONLY public.invcitem DROP CONSTRAINT invcitem_invcitem_qty_uom_id_fkey; publicadminfalse175171673726061689752#invcitem_invcitem_rev_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invcitem_rev_accnt_id_fkey FOREIGN KEY (invcitem_rev_accnt_id) REFERENCES accnt(accnt_id); VALTER TABLE ONLY public.invcitem DROP CONSTRAINT invcitem_invcitem_rev_accnt_id_fkey; publicadminfalse1751996837 26061689757!invcitem_invcitem_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitem ADD CONSTRAINT invcitem_invcitem_taxtype_id_fkey FOREIGN KEY (invcitem_taxtype_id) REFERENCES taxtype(taxtype_id); TALTER TABLE ONLY public.invcitem DROP CONSTRAINT invcitem_invcitem_taxtype_id_fkey; publicadminfalse175170673326061689762%invcitemtax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); [ALTER TABLE ONLY public.invcitemtax DROP CONSTRAINT invcitemtax_taxhist_basis_tax_id_fkey; publicadminfalse465247700826061689767"invcitemtax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES invcitem(invcitem_id) ON DELETE CASCADE; XALTER TABLE ONLY public.invcitemtax DROP CONSTRAINT invcitemtax_taxhist_parent_id_fkey; publicadminfalse465175675926061689772invcitemtax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); UALTER TABLE ONLY public.invcitemtax DROP CONSTRAINT invcitemtax_taxhist_tax_id_fkey; publicadminfalse465247700826061689777#invcitemtax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY invcitemtax ADD CONSTRAINT invcitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); YALTER TABLE ONLY public.invcitemtax DROP CONSTRAINT invcitemtax_taxhist_taxtype_id_fkey; publicadminfalse465170673326061689782*invhistexpcat_invhistexpcat_expcat_id_fkey FK CONSTRAINTALTER TABLE ONLY invhistexpcat ADD CONSTRAINT invhistexpcat_invhistexpcat_expcat_id_fkey FOREIGN KEY (invhistexpcat_expcat_id) REFERENCES expcat(expcat_id) ON UPDATE CASCADE ON DELETE CASCADE; bALTER TABLE ONLY public.invhistexpcat DROP CONSTRAINT invhistexpcat_invhistexpcat_expcat_id_fkey; publicadminfalse472245700226061689787+invhistexpcat_invhistexpcat_invhist_id_fkey FK CONSTRAINTALTER TABLE ONLY invhistexpcat ADD CONSTRAINT invhistexpcat_invhistexpcat_invhist_id_fkey FOREIGN KEY (invhistexpcat_invhist_id) REFERENCES invhist(invhist_id) ON UPDATE CASCADE ON DELETE CASCADE; cALTER TABLE ONLY public.invhistexpcat DROP CONSTRAINT invhistexpcat_invhistexpcat_invhist_id_fkey; publicadminfalse4724707292u26061689792ipsass_ipsass_ipshead_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsass ADD CONSTRAINT ipsass_ipsass_ipshead_id_fkey FOREIGN KEY (ipsass_ipshead_id) REFERENCES ipshead(ipshead_id); NALTER TABLE ONLY public.ipsass DROP CONSTRAINT ipsass_ipsass_ipshead_id_fkey; publicadminfalse2392196902^26061689797*ipsfreight_ipsfreight_freightclass_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_ipsfreight_freightclass_id_fkey FOREIGN KEY (ipsfreight_freightclass_id) REFERENCES freightclass(freightclass_id); _ALTER TABLE ONLY public.ipsfreight DROP CONSTRAINT ipsfreight_ipsfreight_freightclass_id_fkey; publicadminfalse2182176896_26061689802%ipsfreight_ipsfreight_ipshead_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_ipsfreight_ipshead_id_fkey FOREIGN KEY (ipsfreight_ipshead_id) REFERENCES ipshead(ipshead_id); ZALTER TABLE ONLY public.ipsfreight DROP CONSTRAINT ipsfreight_ipsfreight_ipshead_id_fkey; publicadminfalse2182196902`26061689807&ipsfreight_ipsfreight_shipzone_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_ipsfreight_shipzone_id_fkey FOREIGN KEY (ipsfreight_shipzone_id) REFERENCES shipzone(shipzone_id); [ALTER TABLE ONLY public.ipsfreight DROP CONSTRAINT ipsfreight_ipsfreight_shipzone_id_fkey; publicadminfalse2182126875a26061689812&ipsfreight_ipsfreight_warehous_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsfreight ADD CONSTRAINT ipsfreight_ipsfreight_warehous_id_fkey FOREIGN KEY (ipsfreight_warehous_id) REFERENCES whsinfo(warehous_id); [ALTER TABLE ONLY public.ipsfreight DROP CONSTRAINT ipsfreight_ipsfreight_warehous_id_fkey; publicadminfalse2181726742b26061689817ipshead_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY ipshead ADD CONSTRAINT ipshead_to_curr_symbol FOREIGN KEY (ipshead_curr_id) REFERENCES curr_symbol(curr_id); HALTER TABLE ONLY public.ipshead DROP CONSTRAINT ipshead_to_curr_symbol; publicadminfalse2191566666v26061689822ipsitem_ipshead_id_fk FK CONSTRAINTALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipshead_id_fk FOREIGN KEY (ipsitem_ipshead_id) REFERENCES ipshead(ipshead_id) ON DELETE CASCADE; KALTER TABLE ONLY public.ipsiteminfo DROP CONSTRAINT ipsitem_ipshead_id_fk; publicadminfalse2402196902w26061689827!ipsitem_ipsitem_price_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipsitem_price_uom_id_fkey FOREIGN KEY (ipsitem_price_uom_id) REFERENCES uom(uom_id); WALTER TABLE ONLY public.ipsiteminfo DROP CONSTRAINT ipsitem_ipsitem_price_uom_id_fkey; publicadminfalse2401716737x26061689832ipsitem_ipsitem_qty_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipsitem_qty_uom_id_fkey FOREIGN KEY (ipsitem_qty_uom_id) REFERENCES uom(uom_id); UALTER TABLE ONLY public.ipsiteminfo DROP CONSTRAINT ipsitem_ipsitem_qty_uom_id_fkey; publicadminfalse2401716737z26061744640 ipsitem_ipsitem_warehous_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_ipsitem_warehous_id_fkey FOREIGN KEY (ipsitem_warehous_id) REFERENCES whsinfo(warehous_id); VALTER TABLE ONLY public.ipsiteminfo DROP CONSTRAINT ipsitem_ipsitem_warehous_id_fkey; publicadminfalse1722406742y26061689837ipsitem_item_id_fk FK CONSTRAINT{ALTER TABLE ONLY ipsiteminfo ADD CONSTRAINT ipsitem_item_id_fk FOREIGN KEY (ipsitem_item_id) REFERENCES item(item_id); HALTER TABLE ONLY public.ipsiteminfo DROP CONSTRAINT ipsitem_item_id_fk; publicadminfalse2401686722{26061689842$ipsitemchar_ipsitemchar_char_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_ipsitemchar_char_id_fkey FOREIGN KEY (ipsitemchar_char_id) REFERENCES "char"(char_id); ZALTER TABLE ONLY public.ipsitemchar DROP CONSTRAINT ipsitemchar_ipsitemchar_char_id_fkey; publicadminfalse2421856807|26061689847'ipsitemchar_ipsitemchar_ipsitem_id_fkey FK CONSTRAINTALTER TABLE ONLY ipsitemchar ADD CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_fkey FOREIGN KEY (ipsitemchar_ipsitem_id) REFERENCES ipsiteminfo(ipsitem_id) ON DELETE CASCADE; ]ALTER TABLE ONLY public.ipsitemchar DROP CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_fkey; publicadminfalse242240698626061689852item_item_classcode_id_fkey FK CONSTRAINTALTER TABLE ONLY item ADD CONSTRAINT item_item_classcode_id_fkey FOREIGN KEY (item_classcode_id) REFERENCES classcode(classcode_id); JALTER TABLE ONLY public.item DROP CONSTRAINT item_item_classcode_id_fkey; publicadminfalse168224692226061689857item_item_freightclass_id_fkey FK CONSTRAINTALTER TABLE ONLY item ADD CONSTRAINT item_item_freightclass_id_fkey FOREIGN KEY (item_freightclass_id) REFERENCES freightclass(freightclass_id); MALTER TABLE ONLY public.item DROP CONSTRAINT item_item_freightclass_id_fkey; publicadminfalse168217689626061689862item_item_inv_uom_id_fkey FK CONSTRAINTyALTER TABLE ONLY item ADD CONSTRAINT item_item_inv_uom_id_fkey FOREIGN KEY (item_inv_uom_id) REFERENCES uom(uom_id); HALTER TABLE ONLY public.item DROP CONSTRAINT item_item_inv_uom_id_fkey; publicadminfalse168171673726061689867item_item_price_uom_id_fkey FK CONSTRAINT}ALTER TABLE ONLY item ADD CONSTRAINT item_item_price_uom_id_fkey FOREIGN KEY (item_price_uom_id) REFERENCES uom(uom_id); JALTER TABLE ONLY public.item DROP CONSTRAINT item_item_price_uom_id_fkey; publicadminfalse1681716737c26061689872 itemalias_itemalias_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemalias ADD CONSTRAINT itemalias_itemalias_item_id_fkey FOREIGN KEY (itemalias_item_id) REFERENCES item(item_id); TALTER TABLE ONLY public.itemalias DROP CONSTRAINT itemalias_itemalias_item_id_fkey; publicadminfalse2261686722d26061689877"itemcost_itemcost_costelem_id_fkey FK CONSTRAINTALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_itemcost_costelem_id_fkey FOREIGN KEY (itemcost_costelem_id) REFERENCES costelem(costelem_id); UALTER TABLE ONLY public.itemcost DROP CONSTRAINT itemcost_itemcost_costelem_id_fkey; publicadminfalse2282276934e26061689882itemcost_itemcost_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_itemcost_curr_id_fkey FOREIGN KEY (itemcost_curr_id) REFERENCES curr_symbol(curr_id); QALTER TABLE ONLY public.itemcost DROP CONSTRAINT itemcost_itemcost_curr_id_fkey; publicadminfalse2281566666f26061689887itemcost_itemcost_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_itemcost_item_id_fkey FOREIGN KEY (itemcost_item_id) REFERENCES item(item_id); QALTER TABLE ONLY public.itemcost DROP CONSTRAINT itemcost_itemcost_item_id_fkey; publicadminfalse2281686722g26061689892itemcost_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY itemcost ADD CONSTRAINT itemcost_to_curr_symbol FOREIGN KEY (itemcost_curr_id) REFERENCES curr_symbol(curr_id); JALTER TABLE ONLY public.itemcost DROP CONSTRAINT itemcost_to_curr_symbol; publicadminfalse228156666626061689897!itemsite_itemsite_costcat_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_itemsite_costcat_id_fkey FOREIGN KEY (itemsite_costcat_id) REFERENCES costcat(costcat_id); TALTER TABLE ONLY public.itemsite DROP CONSTRAINT itemsite_itemsite_costcat_id_fkey; publicadminfalse169229694226061689902itemsite_itemsite_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_itemsite_item_id_fkey FOREIGN KEY (itemsite_item_id) REFERENCES item(item_id); QALTER TABLE ONLY public.itemsite DROP CONSTRAINT itemsite_itemsite_item_id_fkey; publicadminfalse169168672226061689907"itemsite_itemsite_plancode_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_itemsite_plancode_id_fkey FOREIGN KEY (itemsite_plancode_id) REFERENCES plancode(plancode_id); UALTER TABLE ONLY public.itemsite DROP CONSTRAINT itemsite_itemsite_plancode_id_fkey; publicadminfalse169231694726061689912"itemsite_itemsite_warehous_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsite ADD CONSTRAINT itemsite_itemsite_warehous_id_fkey FOREIGN KEY (itemsite_warehous_id) REFERENCES whsinfo(warehous_id); UALTER TABLE ONLY public.itemsite DROP CONSTRAINT itemsite_itemsite_warehous_id_fkey; publicadminfalse1691726742j26061744647itemsrc_itemsrc_contrct_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_itemsrc_contrct_id_fkey FOREIGN KEY (itemsrc_contrct_id) REFERENCES contrct(contrct_id); QALTER TABLE ONLY public.itemsrc DROP CONSTRAINT itemsrc_itemsrc_contrct_id_fkey; publicadminfalse2327207589h26061689917itemsrc_itemsrc_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_itemsrc_item_id_fkey FOREIGN KEY (itemsrc_item_id) REFERENCES item(item_id) ON DELETE CASCADE; NALTER TABLE ONLY public.itemsrc DROP CONSTRAINT itemsrc_itemsrc_item_id_fkey; publicadminfalse2321686722i26061689922itemsrc_itemsrc_vend_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsrc ADD CONSTRAINT itemsrc_itemsrc_vend_id_fkey FOREIGN KEY (itemsrc_vend_id) REFERENCES vendinfo(vend_id) ON DELETE CASCADE; NALTER TABLE ONLY public.itemsrc DROP CONSTRAINT itemsrc_itemsrc_vend_id_fkey; publicadminfalse2321586673k26061689927!itemsrcp_itemsrcp_itemsrc_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsrcp ADD CONSTRAINT itemsrcp_itemsrcp_itemsrc_id_fkey FOREIGN KEY (itemsrcp_itemsrc_id) REFERENCES itemsrc(itemsrc_id) ON DELETE CASCADE; TALTER TABLE ONLY public.itemsrcp DROP CONSTRAINT itemsrcp_itemsrcp_itemsrc_id_fkey; publicadminfalse2332326953l26061689932itemsrcp_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY itemsrcp ADD CONSTRAINT itemsrcp_to_curr_symbol FOREIGN KEY (itemsrcp_curr_id) REFERENCES curr_symbol(curr_id); JALTER TABLE ONLY public.itemsrcp DROP CONSTRAINT itemsrcp_to_curr_symbol; publicadminfalse2331566666m26061689937#itemsub_itemsub_parent_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsub ADD CONSTRAINT itemsub_itemsub_parent_item_id_fkey FOREIGN KEY (itemsub_parent_item_id) REFERENCES item(item_id); UALTER TABLE ONLY public.itemsub DROP CONSTRAINT itemsub_itemsub_parent_item_id_fkey; publicadminfalse2341686722n26061689942 itemsub_itemsub_sub_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemsub ADD CONSTRAINT itemsub_itemsub_sub_item_id_fkey FOREIGN KEY (itemsub_sub_item_id) REFERENCES item(item_id); RALTER TABLE ONLY public.itemsub DROP CONSTRAINT itemsub_itemsub_sub_item_id_fkey; publicadminfalse2341686722o26061689947itemtax_itemtax_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemtax ADD CONSTRAINT itemtax_itemtax_item_id_fkey FOREIGN KEY (itemtax_item_id) REFERENCES item(item_id); NALTER TABLE ONLY public.itemtax DROP CONSTRAINT itemtax_itemtax_item_id_fkey; publicadminfalse2351686722p26061689952itemtax_itemtax_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY itemtax ADD CONSTRAINT itemtax_itemtax_taxtype_id_fkey FOREIGN KEY (itemtax_taxtype_id) REFERENCES taxtype(taxtype_id); QALTER TABLE ONLY public.itemtax DROP CONSTRAINT itemtax_itemtax_taxtype_id_fkey; publicadminfalse2351706733q26061689957itemtax_itemtax_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY itemtax ADD CONSTRAINT itemtax_itemtax_taxzone_id_fkey FOREIGN KEY (itemtax_taxzone_id) REFERENCES taxzone(taxzone_id); QALTER TABLE ONLY public.itemtax DROP CONSTRAINT itemtax_itemtax_taxzone_id_fkey; publicadminfalse235166671026061689962'itemtrans_itemtrans_source_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemtrans ADD CONSTRAINT itemtrans_itemtrans_source_item_id_fkey FOREIGN KEY (itemtrans_source_item_id) REFERENCES item(item_id); [ALTER TABLE ONLY public.itemtrans DROP CONSTRAINT itemtrans_itemtrans_source_item_id_fkey; publicadminfalse5071686722 26061689967'itemtrans_itemtrans_target_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemtrans ADD CONSTRAINT itemtrans_itemtrans_target_item_id_fkey FOREIGN KEY (itemtrans_target_item_id) REFERENCES item(item_id); [ALTER TABLE ONLY public.itemtrans DROP CONSTRAINT itemtrans_itemtrans_target_item_id_fkey; publicadminfalse5071686722 26061689972#itemuom_itemuom_itemuomconv_id_fkey FK CONSTRAINTALTER TABLE ONLY itemuom ADD CONSTRAINT itemuom_itemuom_itemuomconv_id_fkey FOREIGN KEY (itemuom_itemuomconv_id) REFERENCES itemuomconv(itemuomconv_id); UALTER TABLE ONLY public.itemuom DROP CONSTRAINT itemuom_itemuom_itemuomconv_id_fkey; publicadminfalse5092366969 26061689977itemuom_itemuom_uomtype_id_fkey FK CONSTRAINTALTER TABLE ONLY itemuom ADD CONSTRAINT itemuom_itemuom_uomtype_id_fkey FOREIGN KEY (itemuom_uomtype_id) REFERENCES uomtype(uomtype_id); QALTER TABLE ONLY public.itemuom DROP CONSTRAINT itemuom_itemuom_uomtype_id_fkey; publicadminfalse5096567508r26061689982(itemuomconv_itemuomconv_from_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY itemuomconv ADD CONSTRAINT itemuomconv_itemuomconv_from_uom_id_fkey FOREIGN KEY (itemuomconv_from_uom_id) REFERENCES uom(uom_id); ^ALTER TABLE ONLY public.itemuomconv DROP CONSTRAINT itemuomconv_itemuomconv_from_uom_id_fkey; publicadminfalse2361716737s26061689987$itemuomconv_itemuomconv_item_id_fkey FK CONSTRAINTALTER TABLE ONLY itemuomconv ADD CONSTRAINT itemuomconv_itemuomconv_item_id_fkey FOREIGN KEY (itemuomconv_item_id) REFERENCES item(item_id); ZALTER TABLE ONLY public.itemuomconv DROP CONSTRAINT itemuomconv_itemuomconv_item_id_fkey; publicadminfalse2361686722t26061689992&itemuomconv_itemuomconv_to_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY itemuomconv ADD CONSTRAINT itemuomconv_itemuomconv_to_uom_id_fkey FOREIGN KEY (itemuomconv_to_uom_id) REFERENCES uom(uom_id); \ALTER TABLE ONLY public.itemuomconv DROP CONSTRAINT itemuomconv_itemuomconv_to_uom_id_fkey; publicadminfalse2361716737 26061689997mrghist_mrghist_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY mrghist ADD CONSTRAINT mrghist_mrghist_cntct_id_fkey FOREIGN KEY (mrghist_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; OALTER TABLE ONLY public.mrghist DROP CONSTRAINT mrghist_mrghist_cntct_id_fkey; publicadminfalse5321526648226061690002ophead_ophead_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_cntct_id_fkey FOREIGN KEY (ophead_cntct_id) REFERENCES cntct(cntct_id); LALTER TABLE ONLY public.ophead DROP CONSTRAINT ophead_ophead_cntct_id_fkey; publicadminfalse1811526648326061690007ophead_ophead_crmacct_id_fkey FK CONSTRAINTALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_crmacct_id_fkey FOREIGN KEY (ophead_crmacct_id) REFERENCES crmacct(crmacct_id); NALTER TABLE ONLY public.ophead DROP CONSTRAINT ophead_ophead_crmacct_id_fkey; publicadminfalse1811536652426061690012ophead_ophead_opsource_id_fkey FK CONSTRAINTALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_opsource_id_fkey FOREIGN KEY (ophead_opsource_id) REFERENCES opsource(opsource_id); OALTER TABLE ONLY public.ophead DROP CONSTRAINT ophead_ophead_opsource_id_fkey; publicadminfalse1815417363526061690017ophead_ophead_opstage_id_fkey FK CONSTRAINTALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_opstage_id_fkey FOREIGN KEY (ophead_opstage_id) REFERENCES opstage(opstage_id); NALTER TABLE ONLY public.ophead DROP CONSTRAINT ophead_ophead_opstage_id_fkey; publicadminfalse1815437367626061690022ophead_ophead_optype_id_fkey FK CONSTRAINTALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_optype_id_fkey FOREIGN KEY (ophead_optype_id) REFERENCES optype(optype_id); MALTER TABLE ONLY public.ophead DROP CONSTRAINT ophead_ophead_optype_id_fkey; publicadminfalse1815457371726061690027ophead_ophead_priority_id_fkey FK CONSTRAINTALTER TABLE ONLY ophead ADD CONSTRAINT ophead_ophead_priority_id_fkey FOREIGN KEY (ophead_priority_id) REFERENCES incdtpriority(incdtpriority_id); OALTER TABLE ONLY public.ophead DROP CONSTRAINT ophead_ophead_priority_id_fkey; publicadminfalse1812216910 26061690032pack_pack_shiphead_id_fkey FK CONSTRAINTALTER TABLE ONLY pack ADD CONSTRAINT pack_pack_shiphead_id_fkey FOREIGN KEY (pack_shiphead_id) REFERENCES shiphead(shiphead_id); IALTER TABLE ONLY public.pack DROP CONSTRAINT pack_pack_shiphead_id_fkey; publicadminfalse549608745126061690037payco_payco_ccpay_id_fkey FK CONSTRAINT}ALTER TABLE ONLY payco ADD CONSTRAINT payco_payco_ccpay_id_fkey FOREIGN KEY (payco_ccpay_id) REFERENCES ccpay(ccpay_id); IALTER TABLE ONLY public.payco DROP CONSTRAINT payco_payco_ccpay_id_fkey; publicadminfalse552342714326061690042payco_payco_cohead_id_fkey FK CONSTRAINTALTER TABLE ONLY payco ADD CONSTRAINT payco_payco_cohead_id_fkey FOREIGN KEY (payco_cohead_id) REFERENCES cohead(cohead_id); JALTER TABLE ONLY public.payco DROP CONSTRAINT payco_payco_cohead_id_fkey; publicadminfalse552176676726061690047$pkgdep_pkgdep_parent_pkghead_id_fkey FK CONSTRAINTALTER TABLE ONLY pkgdep ADD CONSTRAINT pkgdep_pkgdep_parent_pkghead_id_fkey FOREIGN KEY (pkgdep_parent_pkghead_id) REFERENCES pkghead(pkghead_id); UALTER TABLE ONLY public.pkgdep DROP CONSTRAINT pkgdep_pkgdep_parent_pkghead_id_fkey; publicadminfalse554556738726061690052pkgdep_pkgdep_pkghead_id_fkey FK CONSTRAINTALTER TABLE ONLY pkgdep ADD CONSTRAINT pkgdep_pkgdep_pkghead_id_fkey FOREIGN KEY (pkgdep_pkghead_id) REFERENCES pkghead(pkghead_id); NALTER TABLE ONLY public.pkgdep DROP CONSTRAINT pkgdep_pkgdep_pkghead_id_fkey; publicadminfalse554556738726061690057pkgitem_pkgitem_pkghead_id_fkey FK CONSTRAINTALTER TABLE ONLY pkgitem ADD CONSTRAINT pkgitem_pkgitem_pkghead_id_fkey FOREIGN KEY (pkgitem_pkghead_id) REFERENCES pkghead(pkghead_id) ON DELETE CASCADE; QALTER TABLE ONLY public.pkgitem DROP CONSTRAINT pkgitem_pkgitem_pkghead_id_fkey; publicadminfalse5585567387"26061690062pohead_pohead_cohead_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_cohead_id_fkey FOREIGN KEY (pohead_cohead_id) REFERENCES cohead(cohead_id) ON DELETE SET NULL; MALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_cohead_id_fkey; publicadminfalse1781766767#26061690067"pohead_pohead_shipto_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_shipto_cntct_id_fkey FOREIGN KEY (pohead_shipto_cntct_id) REFERENCES cntct(cntct_id); SALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_shipto_cntct_id_fkey; publicadminfalse1781526648$26061690072"pohead_pohead_shiptoddress_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_shiptoddress_id_fkey FOREIGN KEY (pohead_shiptoaddress_id) REFERENCES addr(addr_id); SALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_shiptoddress_id_fkey; publicadminfalse1781846803%26061690077pohead_pohead_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_taxtype_id_fkey FOREIGN KEY (pohead_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_taxtype_id_fkey; publicadminfalse1781706733&26061690082pohead_pohead_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_taxzone_id_fkey FOREIGN KEY (pohead_taxzone_id) REFERENCES taxzone(taxzone_id); NALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_taxzone_id_fkey; publicadminfalse1781666710'26061690087pohead_pohead_terms_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_terms_id_fkey FOREIGN KEY (pohead_terms_id) REFERENCES terms(terms_id); LALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_terms_id_fkey; publicadminfalse1781576668(26061690092 pohead_pohead_vend_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_vend_cntct_id_fkey FOREIGN KEY (pohead_vend_cntct_id) REFERENCES cntct(cntct_id); QALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_vend_cntct_id_fkey; publicadminfalse1781526648)26061690097pohead_pohead_vend_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_vend_id_fkey FOREIGN KEY (pohead_vend_id) REFERENCES vendinfo(vend_id); KALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_vend_id_fkey; publicadminfalse1781586673*26061690102pohead_pohead_vendaddr_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_vendaddr_id_fkey FOREIGN KEY (pohead_vendaddr_id) REFERENCES vendaddrinfo(vendaddr_id); OALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_vendaddr_id_fkey; publicadminfalse1782487010+26061690107pohead_pohead_warehous_id_fkey FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_pohead_warehous_id_fkey FOREIGN KEY (pohead_warehous_id) REFERENCES whsinfo(warehous_id); OALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_pohead_warehous_id_fkey; publicadminfalse1781726742,26061690112pohead_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY pohead ADD CONSTRAINT pohead_to_curr_symbol FOREIGN KEY (pohead_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.pohead DROP CONSTRAINT pohead_to_curr_symbol; publicadminfalse1781566666-26061690117poitem_poitem_expcat_id_fkey FK CONSTRAINTALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_expcat_id_fkey FOREIGN KEY (poitem_expcat_id) REFERENCES expcat(expcat_id); MALTER TABLE ONLY public.poitem DROP CONSTRAINT poitem_poitem_expcat_id_fkey; publicadminfalse1792457002.26061690122poitem_poitem_itemsite_id_fkey FK CONSTRAINTALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_itemsite_id_fkey FOREIGN KEY (poitem_itemsite_id) REFERENCES itemsite(itemsite_id); OALTER TABLE ONLY public.poitem DROP CONSTRAINT poitem_poitem_itemsite_id_fkey; publicadminfalse1791696729/26061690127poitem_poitem_itemsrc_id_fkey FK CONSTRAINTALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_itemsrc_id_fkey FOREIGN KEY (poitem_itemsrc_id) REFERENCES itemsrc(itemsrc_id); NALTER TABLE ONLY public.poitem DROP CONSTRAINT poitem_poitem_itemsrc_id_fkey; publicadminfalse1792326953026061690132poitem_poitem_prj_id_fkey FK CONSTRAINTyALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_prj_id_fkey FOREIGN KEY (poitem_prj_id) REFERENCES prj(prj_id); JALTER TABLE ONLY public.poitem DROP CONSTRAINT poitem_poitem_prj_id_fkey; publicadminfalse1791746751126061690137poitem_poitem_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY poitem ADD CONSTRAINT poitem_poitem_taxtype_id_fkey FOREIGN KEY (poitem_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.poitem DROP CONSTRAINT poitem_poitem_taxtype_id_fkey; publicadminfalse179170673326061690142poreject_poreject_recv_id_fkey FK CONSTRAINTALTER TABLE ONLY poreject ADD CONSTRAINT poreject_poreject_recv_id_fkey FOREIGN KEY (poreject_recv_id) REFERENCES recv(recv_id); QALTER TABLE ONLY public.poreject DROP CONSTRAINT poreject_poreject_recv_id_fkey; publicadminfalse565591743026061690147poreject_poreject_vend_id_fkey FK CONSTRAINTALTER TABLE ONLY poreject ADD CONSTRAINT poreject_poreject_vend_id_fkey FOREIGN KEY (poreject_vend_id) REFERENCES vendinfo(vend_id); QALTER TABLE ONLY public.poreject DROP CONSTRAINT poreject_poreject_vend_id_fkey; publicadminfalse565158667326061690152prj_prj_cntct_id_fkey FK CONSTRAINTuALTER TABLE ONLY prj ADD CONSTRAINT prj_prj_cntct_id_fkey FOREIGN KEY (prj_cntct_id) REFERENCES cntct(cntct_id); CALTER TABLE ONLY public.prj DROP CONSTRAINT prj_prj_cntct_id_fkey; publicadminfalse174152664826061690157prj_prj_crmacct_id_fkey FK CONSTRAINT}ALTER TABLE ONLY prj ADD CONSTRAINT prj_prj_crmacct_id_fkey FOREIGN KEY (prj_crmacct_id) REFERENCES crmacct(crmacct_id); EALTER TABLE ONLY public.prj DROP CONSTRAINT prj_prj_crmacct_id_fkey; publicadminfalse174153665226061690162prj_prj_recurring_prj_id_fkey FK CONSTRAINTALTER TABLE ONLY prj ADD CONSTRAINT prj_prj_recurring_prj_id_fkey FOREIGN KEY (prj_recurring_prj_id) REFERENCES prj(prj_id); KALTER TABLE ONLY public.prj DROP CONSTRAINT prj_prj_recurring_prj_id_fkey; publicadminfalse1741746751826061690167prjtask_prjtask_prj_id_fkey FK CONSTRAINT}ALTER TABLE ONLY prjtask ADD CONSTRAINT prjtask_prjtask_prj_id_fkey FOREIGN KEY (prjtask_prj_id) REFERENCES prj(prj_id); MALTER TABLE ONLY public.prjtask DROP CONSTRAINT prjtask_prjtask_prj_id_fkey; publicadminfalse1821746751}26061690172prospect_prospect_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_cntct_id_fkey FOREIGN KEY (prospect_cntct_id) REFERENCES cntct(cntct_id); RALTER TABLE ONLY public.prospect DROP CONSTRAINT prospect_prospect_cntct_id_fkey; publicadminfalse2441526648~26061690177"prospect_prospect_salesrep_id_fkey FK CONSTRAINTALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_salesrep_id_fkey FOREIGN KEY (prospect_salesrep_id) REFERENCES salesrep(salesrep_id); UALTER TABLE ONLY public.prospect DROP CONSTRAINT prospect_prospect_salesrep_id_fkey; publicadminfalse244163669726061690182!prospect_prospect_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_taxzone_id_fkey FOREIGN KEY (prospect_taxzone_id) REFERENCES taxzone(taxzone_id); TALTER TABLE ONLY public.prospect DROP CONSTRAINT prospect_prospect_taxzone_id_fkey; publicadminfalse244166671026061690187"prospect_prospect_warehous_id_fkey FK CONSTRAINTALTER TABLE ONLY prospect ADD CONSTRAINT prospect_prospect_warehous_id_fkey FOREIGN KEY (prospect_warehous_id) REFERENCES whsinfo(warehous_id); UALTER TABLE ONLY public.prospect DROP CONSTRAINT prospect_prospect_warehous_id_fkey; publicadminfalse244172674226061690192qryitem_qryitem_qryhead_id_fkey FK CONSTRAINTALTER TABLE ONLY qryitem ADD CONSTRAINT qryitem_qryitem_qryhead_id_fkey FOREIGN KEY (qryitem_qryhead_id) REFERENCES qryhead(qryhead_id); QALTER TABLE ONLY public.qryitem DROP CONSTRAINT qryitem_qryitem_qryhead_id_fkey; publicadminfalse582580741126061690197"quhead_quhead_billto_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_billto_cntct_id_fkey FOREIGN KEY (quhead_billto_cntct_id) REFERENCES cntct(cntct_id); SALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_billto_cntct_id_fkey; publicadminfalse249152664826061690202 quhead_quhead_misc_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_misc_accnt_id_fkey FOREIGN KEY (quhead_misc_accnt_id) REFERENCES accnt(accnt_id); QALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_misc_accnt_id_fkey; publicadminfalse249199683726061690207quhead_quhead_ophead_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_ophead_id_fkey FOREIGN KEY (quhead_ophead_id) REFERENCES ophead(ophead_id); MALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_ophead_id_fkey; publicadminfalse249181679226061690212quhead_quhead_prj_id_fkey FK CONSTRAINTyALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_prj_id_fkey FOREIGN KEY (quhead_prj_id) REFERENCES prj(prj_id); JALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_prj_id_fkey; publicadminfalse249174675126061690217quhead_quhead_salesrep_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_salesrep_id_fkey FOREIGN KEY (quhead_salesrep_id) REFERENCES salesrep(salesrep_id); OALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_salesrep_id_fkey; publicadminfalse249163669726061744757quhead_quhead_saletype_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_saletype_id_fkey FOREIGN KEY (quhead_saletype_id) REFERENCES saletype(saletype_id); OALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_saletype_id_fkey; publicadminfalse249722759126061690222"quhead_quhead_shipto_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_shipto_cntct_id_fkey FOREIGN KEY (quhead_shipto_cntct_id) REFERENCES cntct(cntct_id); SALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_shipto_cntct_id_fkey; publicadminfalse249152664826061690227quhead_quhead_shipto_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_shipto_id_fkey FOREIGN KEY (quhead_shipto_id) REFERENCES shiptoinfo(shipto_id); MALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_shipto_id_fkey; publicadminfalse249165670826061744762quhead_quhead_shipzone_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_shipzone_id_fkey FOREIGN KEY (quhead_shipzone_id) REFERENCES shipzone(shipzone_id); OALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_shipzone_id_fkey; publicadminfalse249212687526061690232quhead_quhead_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_taxtype_id_fkey FOREIGN KEY (quhead_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_taxtype_id_fkey; publicadminfalse249170673326061690237quhead_quhead_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_taxzone_id_fkey FOREIGN KEY (quhead_taxzone_id) REFERENCES taxzone(taxzone_id); NALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_taxzone_id_fkey; publicadminfalse249166671026061690242quhead_quhead_terms_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_terms_id_fkey FOREIGN KEY (quhead_terms_id) REFERENCES terms(terms_id); LALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_terms_id_fkey; publicadminfalse249157666826061690247quhead_quhead_warehous_id_fkey FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_quhead_warehous_id_fkey FOREIGN KEY (quhead_warehous_id) REFERENCES whsinfo(warehous_id); OALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_quhead_warehous_id_fkey; publicadminfalse249172674226061690252quhead_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY quhead ADD CONSTRAINT quhead_to_curr_symbol FOREIGN KEY (quhead_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.quhead DROP CONSTRAINT quhead_to_curr_symbol; publicadminfalse249156666626061690257quitem_quitem_itemsrc_id_fkey FK CONSTRAINTALTER TABLE ONLY quitem ADD CONSTRAINT quitem_quitem_itemsrc_id_fkey FOREIGN KEY (quitem_itemsrc_id) REFERENCES itemsrc(itemsrc_id); NALTER TABLE ONLY public.quitem DROP CONSTRAINT quitem_quitem_itemsrc_id_fkey; publicadminfalse250232695326061690262quitem_quitem_price_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY quitem ADD CONSTRAINT quitem_quitem_price_uom_id_fkey FOREIGN KEY (quitem_price_uom_id) REFERENCES uom(uom_id); PALTER TABLE ONLY public.quitem DROP CONSTRAINT quitem_quitem_price_uom_id_fkey; publicadminfalse250171673726061690267quitem_quitem_qty_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY quitem ADD CONSTRAINT quitem_quitem_qty_uom_id_fkey FOREIGN KEY (quitem_qty_uom_id) REFERENCES uom(uom_id); NALTER TABLE ONLY public.quitem DROP CONSTRAINT quitem_quitem_qty_uom_id_fkey; publicadminfalse250171673726061690272quitem_quitem_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY quitem ADD CONSTRAINT quitem_quitem_taxtype_id_fkey FOREIGN KEY (quitem_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.quitem DROP CONSTRAINT quitem_quitem_taxtype_id_fkey; publicadminfalse250170673326061690277recv_recv_freight_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_freight_curr_id_fkey FOREIGN KEY (recv_freight_curr_id) REFERENCES curr_symbol(curr_id); MALTER TABLE ONLY public.recv DROP CONSTRAINT recv_recv_freight_curr_id_fkey; publicadminfalse591156666626061690282recv_recv_itemsite_id_fkey FK CONSTRAINTALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_itemsite_id_fkey FOREIGN KEY (recv_itemsite_id) REFERENCES itemsite(itemsite_id); IALTER TABLE ONLY public.recv DROP CONSTRAINT recv_recv_itemsite_id_fkey; publicadminfalse591169672926061690287 recv_recv_purchcost_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_purchcost_curr_id_fkey FOREIGN KEY (recv_purchcost_curr_id) REFERENCES curr_symbol(curr_id); OALTER TABLE ONLY public.recv DROP CONSTRAINT recv_recv_purchcost_curr_id_fkey; publicadminfalse591156666626061690292recv_recv_recvcost_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_recvcost_curr_id_fkey FOREIGN KEY (recv_recvcost_curr_id) REFERENCES curr_symbol(curr_id); NALTER TABLE ONLY public.recv DROP CONSTRAINT recv_recv_recvcost_curr_id_fkey; publicadminfalse591156666626061690297recv_recv_splitfrom_id_fkey FK CONSTRAINTALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_splitfrom_id_fkey FOREIGN KEY (recv_splitfrom_id) REFERENCES recv(recv_id); JALTER TABLE ONLY public.recv DROP CONSTRAINT recv_recv_splitfrom_id_fkey; publicadminfalse591591743026061690302recv_recv_vend_id_fkey FK CONSTRAINTyALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_vend_id_fkey FOREIGN KEY (recv_vend_id) REFERENCES vendinfo(vend_id); EALTER TABLE ONLY public.recv DROP CONSTRAINT recv_recv_vend_id_fkey; publicadminfalse591158667326061690307recv_recv_vohead_id_fkey FK CONSTRAINT}ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_vohead_id_fkey FOREIGN KEY (recv_vohead_id) REFERENCES vohead(vohead_id); GALTER TABLE ONLY public.recv DROP CONSTRAINT recv_recv_vohead_id_fkey; publicadminfalse591670752126061690312recv_recv_voitem_id_fkey FK CONSTRAINT}ALTER TABLE ONLY recv ADD CONSTRAINT recv_recv_voitem_id_fkey FOREIGN KEY (recv_voitem_id) REFERENCES voitem(voitem_id); GALTER TABLE ONLY public.recv DROP CONSTRAINT recv_recv_voitem_id_fkey; publicadminfalse591673752726061690317salesrep_salesrep_emp_id_fkey FK CONSTRAINTALTER TABLE ONLY salesrep ADD CONSTRAINT salesrep_salesrep_emp_id_fkey FOREIGN KEY (salesrep_emp_id) REFERENCES emp(emp_id); PALTER TABLE ONLY public.salesrep DROP CONSTRAINT salesrep_salesrep_emp_id_fkey; publicadminfalse1632146887[26061690322+shipdata_shipdata_base_freight_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY shipdata ADD CONSTRAINT shipdata_shipdata_base_freight_curr_id_fkey FOREIGN KEY (shipdata_base_freight_curr_id) REFERENCES curr_symbol(curr_id); ^ALTER TABLE ONLY public.shipdata DROP CONSTRAINT shipdata_shipdata_base_freight_curr_id_fkey; publicadminfalse2161566666\26061690327&shipdata_shipdata_shiphead_number_fkey FK CONSTRAINTALTER TABLE ONLY shipdata ADD CONSTRAINT shipdata_shipdata_shiphead_number_fkey FOREIGN KEY (shipdata_shiphead_number) REFERENCES shiphead(shiphead_number); YALTER TABLE ONLY public.shipdata DROP CONSTRAINT shipdata_shipdata_shiphead_number_fkey; publicadminfalse2166087453]26061690332,shipdata_shipdata_total_freight_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY shipdata ADD CONSTRAINT shipdata_shipdata_total_freight_curr_id_fkey FOREIGN KEY (shipdata_total_freight_curr_id) REFERENCES curr_symbol(curr_id); _ALTER TABLE ONLY public.shipdata DROP CONSTRAINT shipdata_shipdata_total_freight_curr_id_fkey; publicadminfalse2161566666260616903371shipdatasum_shipdatasum_base_freight_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY shipdatasum ADD CONSTRAINT shipdatasum_shipdatasum_base_freight_curr_id_fkey FOREIGN KEY (shipdatasum_base_freight_curr_id) REFERENCES curr_symbol(curr_id); gALTER TABLE ONLY public.shipdatasum DROP CONSTRAINT shipdatasum_shipdatasum_base_freight_curr_id_fkey; publicadminfalse6061566666 26061690342,shipdatasum_shipdatasum_shiphead_number_fkey FK CONSTRAINTALTER TABLE ONLY shipdatasum ADD CONSTRAINT shipdatasum_shipdatasum_shiphead_number_fkey FOREIGN KEY (shipdatasum_shiphead_number) REFERENCES shiphead(shiphead_number); bALTER TABLE ONLY public.shipdatasum DROP CONSTRAINT shipdatasum_shipdatasum_shiphead_number_fkey; publicadminfalse6066087453!260616903472shipdatasum_shipdatasum_total_freight_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY shipdatasum ADD CONSTRAINT shipdatasum_shipdatasum_total_freight_curr_id_fkey FOREIGN KEY (shipdatasum_total_freight_curr_id) REFERENCES curr_symbol(curr_id); hALTER TABLE ONLY public.shipdatasum DROP CONSTRAINT shipdatasum_shipdatasum_total_freight_curr_id_fkey; publicadminfalse6061566666"26061690352&shiphead_shiphead_freight_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_shiphead_freight_curr_id_fkey FOREIGN KEY (shiphead_freight_curr_id) REFERENCES curr_symbol(curr_id); YALTER TABLE ONLY public.shiphead DROP CONSTRAINT shiphead_shiphead_freight_curr_id_fkey; publicadminfalse6081566666#26061690357"shiphead_shiphead_shipchrg_id_fkey FK CONSTRAINTALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_shiphead_shipchrg_id_fkey FOREIGN KEY (shiphead_shipchrg_id) REFERENCES shipchrg(shipchrg_id); UALTER TABLE ONLY public.shiphead DROP CONSTRAINT shiphead_shiphead_shipchrg_id_fkey; publicadminfalse6082086863$26061690362"shiphead_shiphead_shipform_id_fkey FK CONSTRAINTALTER TABLE ONLY shiphead ADD CONSTRAINT shiphead_shiphead_shipform_id_fkey FOREIGN KEY (shiphead_shipform_id) REFERENCES shipform(shipform_id); UALTER TABLE ONLY public.shiphead DROP CONSTRAINT shiphead_shiphead_shipform_id_fkey; publicadminfalse608209686526061690367"shipitem_shipitem_invcitem_id_fkey FK CONSTRAINTALTER TABLE ONLY shipitem ADD CONSTRAINT shipitem_shipitem_invcitem_id_fkey FOREIGN KEY (shipitem_invcitem_id) REFERENCES invcitem(invcitem_id); UALTER TABLE ONLY public.shipitem DROP CONSTRAINT shipitem_shipitem_invcitem_id_fkey; publicadminfalse474175675926061690372!shipitem_shipitem_invhist_id_fkey FK CONSTRAINTALTER TABLE ONLY shipitem ADD CONSTRAINT shipitem_shipitem_invhist_id_fkey FOREIGN KEY (shipitem_invhist_id) REFERENCES invhist(invhist_id); TALTER TABLE ONLY public.shipitem DROP CONSTRAINT shipitem_shipitem_invhist_id_fkey; publicadminfalse474470729226061690377"shipitem_shipitem_shiphead_id_fkey FK CONSTRAINTALTER TABLE ONLY shipitem ADD CONSTRAINT shipitem_shipitem_shiphead_id_fkey FOREIGN KEY (shipitem_shiphead_id) REFERENCES shiphead(shiphead_id); UALTER TABLE ONLY public.shipitem DROP CONSTRAINT shipitem_shipitem_shiphead_id_fkey; publicadminfalse474608745126061690382shiptoinfo_shipto_addr_id_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_addr_id_fkey FOREIGN KEY (shipto_addr_id) REFERENCES addr(addr_id); SALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_addr_id_fkey; publicadminfalse165184680326061690387shiptoinfo_shipto_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_cntct_id_fkey FOREIGN KEY (shipto_cntct_id) REFERENCES cntct(cntct_id); TALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_cntct_id_fkey; publicadminfalse165152664826061690392shiptoinfo_shipto_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_cust_id_fkey FOREIGN KEY (shipto_cust_id) REFERENCES custinfo(cust_id); SALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_cust_id_fkey; publicadminfalse165160668526061690397shiptoinfo_shipto_salesrep_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_salesrep_fkey FOREIGN KEY (shipto_salesrep_id) REFERENCES salesrep(salesrep_id) ON UPDATE RESTRICT ON DELETE RESTRICT; TALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_salesrep_fkey; publicadminfalse165163669726061690402"shiptoinfo_shipto_salesrep_id_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_salesrep_id_fkey FOREIGN KEY (shipto_salesrep_id) REFERENCES salesrep(salesrep_id); WALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_salesrep_id_fkey; publicadminfalse165163669726061690407shiptoinfo_shipto_shipform_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_shipform_fkey FOREIGN KEY (shipto_shipform_id) REFERENCES shipform(shipform_id) ON UPDATE RESTRICT ON DELETE RESTRICT; TALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_shipform_fkey; publicadminfalse165209686526061690412"shiptoinfo_shipto_shipform_id_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_shipform_id_fkey FOREIGN KEY (shipto_shipform_id) REFERENCES shipform(shipform_id); WALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_shipform_id_fkey; publicadminfalse165209686526061690417"shiptoinfo_shipto_shipzone_id_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_shipzone_id_fkey FOREIGN KEY (shipto_shipzone_id) REFERENCES shipzone(shipzone_id); WALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_shipzone_id_fkey; publicadminfalse165212687526061690422!shiptoinfo_shipto_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY shiptoinfo ADD CONSTRAINT shiptoinfo_shipto_taxzone_id_fkey FOREIGN KEY (shipto_taxzone_id) REFERENCES taxzone(taxzone_id); VALTER TABLE ONLY public.shiptoinfo DROP CONSTRAINT shiptoinfo_shipto_taxzone_id_fkey; publicadminfalse1651666710%26061690427state_state_country_id_fkey FK CONSTRAINTALTER TABLE ONLY state ADD CONSTRAINT state_state_country_id_fkey FOREIGN KEY (state_country_id) REFERENCES country(country_id); KALTER TABLE ONLY public.state DROP CONSTRAINT state_state_country_id_fkey; publicadminfalse621391719626061690432tax_tax_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY tax ADD CONSTRAINT tax_tax_basis_tax_id_fkey FOREIGN KEY (tax_basis_tax_id) REFERENCES tax(tax_id) ON DELETE CASCADE; GALTER TABLE ONLY public.tax DROP CONSTRAINT tax_tax_basis_tax_id_fkey; publicadminfalse247247700826061690437tax_tax_sales_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY tax ADD CONSTRAINT tax_tax_sales_accnt_id_fkey FOREIGN KEY (tax_sales_accnt_id) REFERENCES accnt(accnt_id); IALTER TABLE ONLY public.tax DROP CONSTRAINT tax_tax_sales_accnt_id_fkey; publicadminfalse247199683726061690442tax_tax_taxauth_id_fkey FK CONSTRAINT}ALTER TABLE ONLY tax ADD CONSTRAINT tax_tax_taxauth_id_fkey FOREIGN KEY (tax_taxauth_id) REFERENCES taxauth(taxauth_id); EALTER TABLE ONLY public.tax DROP CONSTRAINT tax_tax_taxauth_id_fkey; publicadminfalse247210686926061690447tax_tax_taxclass_id_fkey FK CONSTRAINTALTER TABLE ONLY tax ADD CONSTRAINT tax_tax_taxclass_id_fkey FOREIGN KEY (tax_taxclass_id) REFERENCES taxclass(taxclass_id); FALTER TABLE ONLY public.tax DROP CONSTRAINT tax_tax_taxclass_id_fkey; publicadminfalse2476417497&26061690452taxass_taxass_tax_id_fkey FK CONSTRAINTyALTER TABLE ONLY taxass ADD CONSTRAINT taxass_taxass_tax_id_fkey FOREIGN KEY (taxass_tax_id) REFERENCES tax(tax_id); JALTER TABLE ONLY public.taxass DROP CONSTRAINT taxass_taxass_tax_id_fkey; publicadminfalse6382477008'26061690457taxass_taxass_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY taxass ADD CONSTRAINT taxass_taxass_taxtype_id_fkey FOREIGN KEY (taxass_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.taxass DROP CONSTRAINT taxass_taxass_taxtype_id_fkey; publicadminfalse6381706733(26061690462taxass_taxass_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY taxass ADD CONSTRAINT taxass_taxass_taxzone_id_fkey FOREIGN KEY (taxass_taxzone_id) REFERENCES taxzone(taxzone_id); NALTER TABLE ONLY public.taxass DROP CONSTRAINT taxass_taxass_taxzone_id_fkey; publicadminfalse6381666710O26061690467taxauth_taxauth_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_taxauth_accnt_id_fkey FOREIGN KEY (taxauth_accnt_id) REFERENCES accnt(accnt_id); OALTER TABLE ONLY public.taxauth DROP CONSTRAINT taxauth_taxauth_accnt_id_fkey; publicadminfalse2101996837P26061690472taxauth_taxauth_addr_id_fkey FK CONSTRAINTALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_taxauth_addr_id_fkey FOREIGN KEY (taxauth_addr_id) REFERENCES addr(addr_id); NALTER TABLE ONLY public.taxauth DROP CONSTRAINT taxauth_taxauth_addr_id_fkey; publicadminfalse2101846803Q26061690477taxauth_taxauth_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY taxauth ADD CONSTRAINT taxauth_taxauth_curr_id_fkey FOREIGN KEY (taxauth_curr_id) REFERENCES curr_symbol(curr_id); NALTER TABLE ONLY public.taxauth DROP CONSTRAINT taxauth_taxauth_curr_id_fkey; publicadminfalse210156666626061690482taxhist_taxhist_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY taxhist ADD CONSTRAINT taxhist_taxhist_curr_id_fkey FOREIGN KEY (taxhist_curr_id) REFERENCES curr_symbol(curr_id); NALTER TABLE ONLY public.taxhist DROP CONSTRAINT taxhist_taxhist_curr_id_fkey; publicadminfalse253156666626061690487taxhist_taxhist_tax_id_fkey FK CONSTRAINT}ALTER TABLE ONLY taxhist ADD CONSTRAINT taxhist_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); MALTER TABLE ONLY public.taxhist DROP CONSTRAINT taxhist_taxhist_tax_id_fkey; publicadminfalse253247700826061690492taxhist_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY taxhist ADD CONSTRAINT taxhist_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); QALTER TABLE ONLY public.taxhist DROP CONSTRAINT taxhist_taxhist_taxtype_id_fkey; publicadminfalse2531706733*26061690497taxrate_taxrate_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY taxrate ADD CONSTRAINT taxrate_taxrate_curr_id_fkey FOREIGN KEY (taxrate_curr_id) REFERENCES curr_symbol(curr_id); NALTER TABLE ONLY public.taxrate DROP CONSTRAINT taxrate_taxrate_curr_id_fkey; publicadminfalse6431566666)26061690502taxrate_taxrate_tax_id_fkey FK CONSTRAINT}ALTER TABLE ONLY taxrate ADD CONSTRAINT taxrate_taxrate_tax_id_fkey FOREIGN KEY (taxrate_tax_id) REFERENCES tax(tax_id); MALTER TABLE ONLY public.taxrate DROP CONSTRAINT taxrate_taxrate_tax_id_fkey; publicadminfalse6432477008S26061690507taxreg_taxreg_taxauth_id_fkey FK CONSTRAINTALTER TABLE ONLY taxreg ADD CONSTRAINT taxreg_taxreg_taxauth_id_fkey FOREIGN KEY (taxreg_taxauth_id) REFERENCES taxauth(taxauth_id); NALTER TABLE ONLY public.taxreg DROP CONSTRAINT taxreg_taxreg_taxauth_id_fkey; publicadminfalse2112106869R26061690512taxreg_taxreg_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY taxreg ADD CONSTRAINT taxreg_taxreg_taxzone_id_fkey FOREIGN KEY (taxreg_taxzone_id) REFERENCES taxzone(taxzone_id); NALTER TABLE ONLY public.taxreg DROP CONSTRAINT taxreg_taxreg_taxzone_id_fkey; publicadminfalse2111666710926061690517todoitem_todoitem_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_cntct_id_fkey FOREIGN KEY (todoitem_cntct_id) REFERENCES cntct(cntct_id); RALTER TABLE ONLY public.todoitem DROP CONSTRAINT todoitem_todoitem_cntct_id_fkey; publicadminfalse1831526648:26061690522!todoitem_todoitem_crmacct_id_fkey FK CONSTRAINTALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_crmacct_id_fkey FOREIGN KEY (todoitem_crmacct_id) REFERENCES crmacct(crmacct_id); TALTER TABLE ONLY public.todoitem DROP CONSTRAINT todoitem_todoitem_crmacct_id_fkey; publicadminfalse1831536652;26061690527todoitem_todoitem_incdt_id_fkey FK CONSTRAINTALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_incdt_id_fkey FOREIGN KEY (todoitem_incdt_id) REFERENCES incdt(incdt_id); RALTER TABLE ONLY public.todoitem DROP CONSTRAINT todoitem_todoitem_incdt_id_fkey; publicadminfalse1831546656<26061690532 todoitem_todoitem_ophead_id_fkey FK CONSTRAINTALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_ophead_id_fkey FOREIGN KEY (todoitem_ophead_id) REFERENCES ophead(ophead_id) ON UPDATE RESTRICT ON DELETE RESTRICT; SALTER TABLE ONLY public.todoitem DROP CONSTRAINT todoitem_todoitem_ophead_id_fkey; publicadminfalse1831816792=26061690537,todoitem_todoitem_recurring_todoitem_id_fkey FK CONSTRAINTALTER TABLE ONLY todoitem ADD CONSTRAINT todoitem_todoitem_recurring_todoitem_id_fkey FOREIGN KEY (todoitem_recurring_todoitem_id) REFERENCES todoitem(todoitem_id); _ALTER TABLE ONLY public.todoitem DROP CONSTRAINT todoitem_todoitem_recurring_todoitem_id_fkey; publicadminfalse1831836798,26061690542#trgthist_trgthist_src_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY trgthist ADD CONSTRAINT trgthist_trgthist_src_cntct_id_fkey FOREIGN KEY (trgthist_src_cntct_id) REFERENCES cntctmrgd(cntctmrgd_cntct_id) ON DELETE CASCADE; VALTER TABLE ONLY public.trgthist DROP CONSTRAINT trgthist_trgthist_src_cntct_id_fkey; publicadminfalse6503677166+26061690547$trgthist_trgthist_trgt_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY trgthist ADD CONSTRAINT trgthist_trgthist_trgt_cntct_id_fkey FOREIGN KEY (trgthist_trgt_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE; WALTER TABLE ONLY public.trgthist DROP CONSTRAINT trgthist_trgthist_trgt_cntct_id_fkey; publicadminfalse6501526648.26061690552 uomconv_uomconv_from_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY uomconv ADD CONSTRAINT uomconv_uomconv_from_uom_id_fkey FOREIGN KEY (uomconv_from_uom_id) REFERENCES uom(uom_id); RALTER TABLE ONLY public.uomconv DROP CONSTRAINT uomconv_uomconv_from_uom_id_fkey; publicadminfalse6541716737-26061690557uomconv_uomconv_to_uom_id_fkey FK CONSTRAINTALTER TABLE ONLY uomconv ADD CONSTRAINT uomconv_uomconv_to_uom_id_fkey FOREIGN KEY (uomconv_to_uom_id) REFERENCES uom(uom_id); PALTER TABLE ONLY public.uomconv DROP CONSTRAINT uomconv_uomconv_to_uom_id_fkey; publicadminfalse654171673726061690562usrgrp_usrgrp_grp_id_fkey FK CONSTRAINTyALTER TABLE ONLY usrgrp ADD CONSTRAINT usrgrp_usrgrp_grp_id_fkey FOREIGN KEY (usrgrp_grp_id) REFERENCES grp(grp_id); JALTER TABLE ONLY public.usrgrp DROP CONSTRAINT usrgrp_usrgrp_grp_id_fkey; publicadminfalse573447726826061690567vend_to_curr_symbol FK CONSTRAINT}ALTER TABLE ONLY vendinfo ADD CONSTRAINT vend_to_curr_symbol FOREIGN KEY (vend_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.vendinfo DROP CONSTRAINT vend_to_curr_symbol; publicadminfalse158156666626061690572vend_vend_cntct1_id_fkey FK CONSTRAINTALTER TABLE ONLY vendinfo ADD CONSTRAINT vend_vend_cntct1_id_fkey FOREIGN KEY (vend_cntct1_id) REFERENCES cntct(cntct_id); KALTER TABLE ONLY public.vendinfo DROP CONSTRAINT vend_vend_cntct1_id_fkey; publicadminfalse158152664826061690577vend_vend_cntct2_id_fkey FK CONSTRAINTALTER TABLE ONLY vendinfo ADD CONSTRAINT vend_vend_cntct2_id_fkey FOREIGN KEY (vend_cntct2_id) REFERENCES cntct(cntct_id); KALTER TABLE ONLY public.vendinfo DROP CONSTRAINT vend_vend_cntct2_id_fkey; publicadminfalse158152664826061690582"vendaddrinfo_vendaddr_addr_id_fkey FK CONSTRAINTALTER TABLE ONLY vendaddrinfo ADD CONSTRAINT vendaddrinfo_vendaddr_addr_id_fkey FOREIGN KEY (vendaddr_addr_id) REFERENCES addr(addr_id); YALTER TABLE ONLY public.vendaddrinfo DROP CONSTRAINT vendaddrinfo_vendaddr_addr_id_fkey; publicadminfalse248184680326061690587#vendaddrinfo_vendaddr_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY vendaddrinfo ADD CONSTRAINT vendaddrinfo_vendaddr_cntct_id_fkey FOREIGN KEY (vendaddr_cntct_id) REFERENCES cntct(cntct_id); ZALTER TABLE ONLY public.vendaddrinfo DROP CONSTRAINT vendaddrinfo_vendaddr_cntct_id_fkey; publicadminfalse248152664826061690592%vendaddrinfo_vendaddr_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY vendaddrinfo ADD CONSTRAINT vendaddrinfo_vendaddr_taxzone_id_fkey FOREIGN KEY (vendaddr_taxzone_id) REFERENCES taxzone(taxzone_id); \ALTER TABLE ONLY public.vendaddrinfo DROP CONSTRAINT vendaddrinfo_vendaddr_taxzone_id_fkey; publicadminfalse248166671026061690597vendinfo_vend_addr_id_fkey FK CONSTRAINT}ALTER TABLE ONLY vendinfo ADD CONSTRAINT vendinfo_vend_addr_id_fkey FOREIGN KEY (vend_addr_id) REFERENCES addr(addr_id); MALTER TABLE ONLY public.vendinfo DROP CONSTRAINT vendinfo_vend_addr_id_fkey; publicadminfalse158184680326061690602vendinfo_vend_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY vendinfo ADD CONSTRAINT vendinfo_vend_taxzone_id_fkey FOREIGN KEY (vend_taxzone_id) REFERENCES taxzone(taxzone_id); PALTER TABLE ONLY public.vendinfo DROP CONSTRAINT vendinfo_vend_taxzone_id_fkey; publicadminfalse158166671026061690607vendinfo_vend_vendtype_id_fkey FK CONSTRAINTALTER TABLE ONLY vendinfo ADD CONSTRAINT vendinfo_vend_vendtype_id_fkey FOREIGN KEY (vend_vendtype_id) REFERENCES vendtype(vendtype_id); QALTER TABLE ONLY public.vendinfo DROP CONSTRAINT vendinfo_vend_vendtype_id_fkey; publicadminfalse1582587042/26061690612vohead_to_curr_symbol FK CONSTRAINTALTER TABLE ONLY vohead ADD CONSTRAINT vohead_to_curr_symbol FOREIGN KEY (vohead_curr_id) REFERENCES curr_symbol(curr_id); FALTER TABLE ONLY public.vohead DROP CONSTRAINT vohead_to_curr_symbol; publicadminfalse6701566666026061690617 vohead_vohead_adjtaxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_adjtaxtype_id_fkey FOREIGN KEY (vohead_adjtaxtype_id) REFERENCES taxtype(taxtype_id); QALTER TABLE ONLY public.vohead DROP CONSTRAINT vohead_vohead_adjtaxtype_id_fkey; publicadminfalse6701706733126061690622$vohead_vohead_freighttaxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_freighttaxtype_id_fkey FOREIGN KEY (vohead_freighttaxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.vohead DROP CONSTRAINT vohead_vohead_freighttaxtype_id_fkey; publicadminfalse6701706733226061690627vohead_vohead_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_taxtype_id_fkey FOREIGN KEY (vohead_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.vohead DROP CONSTRAINT vohead_vohead_taxtype_id_fkey; publicadminfalse6701706733326061690632vohead_vohead_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_taxzone_id_fkey FOREIGN KEY (vohead_taxzone_id) REFERENCES taxzone(taxzone_id); NALTER TABLE ONLY public.vohead DROP CONSTRAINT vohead_vohead_taxzone_id_fkey; publicadminfalse6701666710426061690637vohead_vohead_vend_id_fkey FK CONSTRAINTALTER TABLE ONLY vohead ADD CONSTRAINT vohead_vohead_vend_id_fkey FOREIGN KEY (vohead_vend_id) REFERENCES vendinfo(vend_id); KALTER TABLE ONLY public.vohead DROP CONSTRAINT vohead_vohead_vend_id_fkey; publicadminfalse6701586673526061690642#voheadtax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); WALTER TABLE ONLY public.voheadtax DROP CONSTRAINT voheadtax_taxhist_basis_tax_id_fkey; publicadminfalse6722477008626061690647 voheadtax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES vohead(vohead_id) ON DELETE CASCADE; TALTER TABLE ONLY public.voheadtax DROP CONSTRAINT voheadtax_taxhist_parent_id_fkey; publicadminfalse6726707521726061690652voheadtax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); QALTER TABLE ONLY public.voheadtax DROP CONSTRAINT voheadtax_taxhist_tax_id_fkey; publicadminfalse6722477008826061690657!voheadtax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY voheadtax ADD CONSTRAINT voheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.voheadtax DROP CONSTRAINT voheadtax_taxhist_taxtype_id_fkey; publicadminfalse6721706733926061690662voitem_voitem_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY voitem ADD CONSTRAINT voitem_voitem_taxtype_id_fkey FOREIGN KEY (voitem_taxtype_id) REFERENCES taxtype(taxtype_id); NALTER TABLE ONLY public.voitem DROP CONSTRAINT voitem_voitem_taxtype_id_fkey; publicadminfalse6731706733:26061690667#voitemtax_taxhist_basis_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id); WALTER TABLE ONLY public.voitemtax DROP CONSTRAINT voitemtax_taxhist_basis_tax_id_fkey; publicadminfalse6752477008;26061690672 voitemtax_taxhist_parent_id_fkey FK CONSTRAINTALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES voitem(voitem_id) ON DELETE CASCADE; TALTER TABLE ONLY public.voitemtax DROP CONSTRAINT voitemtax_taxhist_parent_id_fkey; publicadminfalse6756737527<26061690677voitemtax_taxhist_tax_id_fkey FK CONSTRAINTALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id); QALTER TABLE ONLY public.voitemtax DROP CONSTRAINT voitemtax_taxhist_tax_id_fkey; publicadminfalse6752477008=26061690682!voitemtax_taxhist_taxtype_id_fkey FK CONSTRAINTALTER TABLE ONLY voitemtax ADD CONSTRAINT voitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id); UALTER TABLE ONLY public.voitemtax DROP CONSTRAINT voitemtax_taxhist_taxtype_id_fkey; publicadminfalse675170673326061690687whsinfo_warehous_accnt_id_fkey FK CONSTRAINTALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_accnt_id_fkey FOREIGN KEY (warehous_default_accnt_id) REFERENCES accnt(accnt_id); PALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_accnt_id_fkey; publicadminfalse172199683726061690692whsinfo_warehous_addr_id_fkey FK CONSTRAINTALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_addr_id_fkey FOREIGN KEY (warehous_addr_id) REFERENCES addr(addr_id); OALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_addr_id_fkey; publicadminfalse172184680326061690697whsinfo_warehous_cntct_id_fkey FK CONSTRAINTALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_cntct_id_fkey FOREIGN KEY (warehous_cntct_id) REFERENCES cntct(cntct_id); PALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_cntct_id_fkey; publicadminfalse172152664826061690702 whsinfo_warehous_costcat_id_fkey FK CONSTRAINTALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_costcat_id_fkey FOREIGN KEY (warehous_costcat_id) REFERENCES costcat(costcat_id); RALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_costcat_id_fkey; publicadminfalse172229694226061690707!whsinfo_warehous_shipform_id_fkey FK CONSTRAINTALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_shipform_id_fkey FOREIGN KEY (warehous_shipform_id) REFERENCES shipform(shipform_id); SALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_shipform_id_fkey; publicadminfalse172209686526061690712 whsinfo_warehous_shipvia_id_fkey FK CONSTRAINTALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_shipvia_id_fkey FOREIGN KEY (warehous_shipvia_id) REFERENCES shipvia(shipvia_id); RALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_shipvia_id_fkey; publicadminfalse172256703426061690717!whsinfo_warehous_sitetype_id_fkey FK CONSTRAINTALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_sitetype_id_fkey FOREIGN KEY (warehous_sitetype_id) REFERENCES sitetype(sitetype_id); SALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_sitetype_id_fkey; publicadminfalse172257703826061690722 whsinfo_warehous_taxzone_id_fkey FK CONSTRAINTALTER TABLE ONLY whsinfo ADD CONSTRAINT whsinfo_warehous_taxzone_id_fkey FOREIGN KEY (warehous_taxzone_id) REFERENCES taxzone(taxzone_id); RALTER TABLE ONLY public.whsinfo DROP CONSTRAINT whsinfo_warehous_taxzone_id_fkey; publicadminfalse172166671026061690727wo_wo_womatl_id_fkey FK CONSTRAINTALTER TABLE ONLY wo ADD CONSTRAINT wo_wo_womatl_id_fkey FOREIGN KEY (wo_womatl_id) REFERENCES womatl(womatl_id) ON DELETE SET NULL; AALTER TABLE ONLY public.wo DROP CONSTRAINT wo_wo_womatl_id_fkey; publicadminfalse410246700526061690732womatl_womatl_uom_id_fkey FK CONSTRAINTyALTER TABLE ONLY womatl ADD CONSTRAINT womatl_womatl_uom_id_fkey FOREIGN KEY (womatl_uom_id) REFERENCES uom(uom_id); JALTER TABLE ONLY public.womatl DROP CONSTRAINT womatl_womatl_uom_id_fkey; publicadminfalse6737246171?26061690737%womatlpost_womatlpost_invhist_id_fkey FK CONSTRAINTALTER TABLE ONLY womatlpost ADD CONSTRAINT womatlpost_womatlpost_invhist_id_fkey FOREIGN KEY (womatlpost_invhist_id) REFERENCES invhist(invhist_id); ZALTER TABLE ONLY public.womatlpost DROP CONSTRAINT womatlpost_womatlpost_invhist_id_fkey; publicadminfalse6804707292>26061690742$womatlpost_womatlpost_womatl_id_fkey FK CONSTRAINTALTER TABLE ONLY womatlpost ADD CONSTRAINT womatlpost_womatlpost_womatl_id_fkey FOREIGN KEY (womatlpost_womatl_id) REFERENCES womatl(womatl_id) ON DELETE CASCADE; YALTER TABLE ONLY public.womatlpost DROP CONSTRAINT womatlpost_womatlpost_womatl_id_fkey; publicadminfalse6802467005@26061690747pkgcmdarg_cmdarg_cmd_id_fkey FK CONSTRAINTALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id); LALTER TABLE ONLY te.pkgcmdarg DROP CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey; teadminfalse6906897541B26061690752"tecustrate_tecustrate_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY tecustrate ADD CONSTRAINT tecustrate_tecustrate_curr_id_fkey FOREIGN KEY (tecustrate_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT; SALTER TABLE ONLY te.tecustrate DROP CONSTRAINT tecustrate_tecustrate_curr_id_fkey; teadminfalse6971566666A26061690757"tecustrate_tecustrate_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY tecustrate ADD CONSTRAINT tecustrate_tecustrate_cust_id_fkey FOREIGN KEY (tecustrate_cust_id) REFERENCES public.custinfo(cust_id) ON DELETE CASCADE; SALTER TABLE ONLY te.tecustrate DROP CONSTRAINT tecustrate_tecustrate_cust_id_fkey; teadminfalse6971606685C26061690762teemp_teemp_emp_id_fkey FK CONSTRAINTALTER TABLE ONLY teemp ADD CONSTRAINT teemp_teemp_emp_id_fkey FOREIGN KEY (teemp_emp_id) REFERENCES public.emp(emp_id) ON DELETE CASCADE; CALTER TABLE ONLY te.teemp DROP CONSTRAINT teemp_teemp_emp_id_fkey; teadminfalse6992146887D26061690767teitem_teitem_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY teitem ADD CONSTRAINT teitem_teitem_curr_id_fkey FOREIGN KEY (teitem_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT; GALTER TABLE ONLY te.teitem DROP CONSTRAINT teitem_teitem_curr_id_fkey; teadminfalse7051566666E26061690772teitem_teitem_invcitem_id_fkey FK CONSTRAINTALTER TABLE ONLY teitem ADD CONSTRAINT teitem_teitem_invcitem_id_fkey FOREIGN KEY (teitem_invcitem_id) REFERENCES public.invcitem(invcitem_id) ON DELETE SET NULL; KALTER TABLE ONLY te.teitem DROP CONSTRAINT teitem_teitem_invcitem_id_fkey; teadminfalse7051756759F26061690777teitem_teitem_tehead_id_fkey FK CONSTRAINTALTER TABLE ONLY teitem ADD CONSTRAINT teitem_teitem_tehead_id_fkey FOREIGN KEY (teitem_tehead_id) REFERENCES tehead(tehead_id) ON DELETE CASCADE; IALTER TABLE ONLY te.teitem DROP CONSTRAINT teitem_teitem_tehead_id_fkey; teadminfalse7057037561G26061690782teitem_teitem_vodist_id_fkey FK CONSTRAINTALTER TABLE ONLY teitem ADD CONSTRAINT teitem_teitem_vodist_id_fkey FOREIGN KEY (teitem_vodist_id) REFERENCES public.vodist(vodist_id) ON DELETE SET NULL; IALTER TABLE ONLY te.teitem DROP CONSTRAINT teitem_teitem_vodist_id_fkey; teadminfalse7056687519I26061690787teprj_teprj_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY teprj ADD CONSTRAINT teprj_teprj_curr_id_fkey FOREIGN KEY (teprj_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET NULL; DALTER TABLE ONLY te.teprj DROP CONSTRAINT teprj_teprj_curr_id_fkey; teadminfalse7071566666H26061690792teprj_teprj_cust_id_fkey FK CONSTRAINTALTER TABLE ONLY teprj ADD CONSTRAINT teprj_teprj_cust_id_fkey FOREIGN KEY (teprj_cust_id) REFERENCES public.custinfo(cust_id) ON DELETE SET NULL; DALTER TABLE ONLY te.teprj DROP CONSTRAINT teprj_teprj_cust_id_fkey; teadminfalse7071606685J26061690797 teprjtask_teprjtask_curr_id_fkey FK CONSTRAINTALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_teprjtask_curr_id_fkey FOREIGN KEY (teprjtask_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT; PALTER TABLE ONLY te.teprjtask DROP CONSTRAINT teprjtask_teprjtask_curr_id_fkey; teadminfalse7091566666K26061690802 teprjtask_teprjtask_item_id_fkey FK CONSTRAINTALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_teprjtask_item_id_fkey FOREIGN KEY (teprjtask_item_id) REFERENCES public.item(item_id) ON DELETE SET NULL; PALTER TABLE ONLY te.teprjtask DROP CONSTRAINT teprjtask_teprjtask_item_id_fkey; teadminfalse7091686722L26061690807#teprjtask_teprjtask_prjtask_id_fkey FK CONSTRAINTALTER TABLE ONLY teprjtask ADD CONSTRAINT teprjtask_teprjtask_prjtask_id_fkey FOREIGN KEY (teprjtask_prjtask_id) REFERENCES public.prjtask(prjtask_id) ON DELETE CASCADE; SALTER TABLE ONLY te.teprjtask DROP CONSTRAINT teprjtask_teprjtask_prjtask_id_fkey; teadminfalse7091826794M26061690812pkgcmdarg_cmdarg_cmd_id_fkey FK CONSTRAINTALTER TABLE ONLY pkgcmdarg ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id); SALTER TABLE ONLY xtdesktop.pkgcmdarg DROP CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey;  xtdesktopadminfalse7572712711 x x x :xQo0ǟSBh=LUf[%4= !M$l+~vl @K`Zwϗ}u=$O9bgQ3@SsPf3)C9C h'HxH q?Ԏ3=IQl|LcN=(i1Bt$Cb@qBġE$g))Ȑ)|f|QGs%sأ<4e=Tٽ`,5~gIqѓ.\]Sۖ(1>-N!}&Y#3^HX.aNSa:҅2SsiLEbPa]> Wq]Z)tP9IW{hWE_]-`:Ig.A6<).XO*vwF~Wf z~b(AVNo>3>FqɲG:OV^j_'Ơh/F@d/s,$8V@d^eqtWvD0v\̄'Vbv Q?ю& qq0'T' :{.Q k@?p/F&MثF7ӑ%v`*t#{nƽFp}^gt丷^ONddqLs[b)HV*dk`mײ -89HY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